diff --git a/.github/workflows/merge_queue.yml b/.github/workflows/merge_queue.yml index 45ce81c2caf..70e1997a82e 100644 --- a/.github/workflows/merge_queue.yml +++ b/.github/workflows/merge_queue.yml @@ -58,13 +58,8 @@ jobs: test_name: Style check runner_type: style-checker-aarch64 run_command: | - python3 style_check.py + python3 style_check.py --no-push data: ${{ needs.RunConfig.outputs.data }} - secrets: - secret_envs: | - ROBOT_CLICKHOUSE_SSH_KEY<> "$GITHUB_ENV" << 'EOF' ${{inputs.additional_envs}} - ${{secrets.secret_envs}} DOCKER_TAG<> "$GITHUB_ENV" - name: Apply sparse checkout for contrib # in order to check that it doesn't break build diff --git a/.github/workflows/reusable_build_stage.yml b/.github/workflows/reusable_build_stage.yml index fbb6f8cbae9..77b63ccc283 100644 --- a/.github/workflows/reusable_build_stage.yml +++ b/.github/workflows/reusable_build_stage.yml @@ -18,8 +18,11 @@ name: BuildStageWF type: string required: true secrets: - secret_envs: - description: if given, it's passed to the environments + robot_git_token: + required: false + ci_db_url: + required: false + ci_db_password: required: false jobs: @@ -39,4 +42,6 @@ jobs: checkout_depth: 0 data: ${{ inputs.data }} secrets: - secret_envs: ${{ secrets.secret_envs }} + robot_git_token: ${{ secrets.robot_git_token }} + ci_db_url: ${{ secrets.ci_db_url }} + ci_db_password: ${{ secrets.ci_db_password }} diff --git a/.github/workflows/reusable_simple_job.yml b/.github/workflows/reusable_simple_job.yml index 7df98d96f79..247569c4f52 100644 --- a/.github/workflows/reusable_simple_job.yml +++ b/.github/workflows/reusable_simple_job.yml @@ -45,8 +45,11 @@ name: Simple job type: boolean default: false secrets: - secret_envs: - description: if given, it's passed to the environments + robot_git_token: + required: false + ci_db_url: + required: false + ci_db_password: required: false @@ -77,7 +80,15 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' CHECK_NAME=${{ inputs.test_name }} ${{inputs.additional_envs}} - ${{secrets.secret_envs}} + ROBOT_CLICKHOUSE_SSH_KEY<> "$GITHUB_ENV" << 'EOF' CHECK_NAME=${{ inputs.test_name }} ${{inputs.additional_envs}} - ${{secrets.secret_envs}} DOCKER_TAG< 0; } diff --git a/base/poco/Net/src/HTTPServerParams.cpp b/base/poco/Net/src/HTTPServerParams.cpp index cc871611111..e47417d4b64 100644 --- a/base/poco/Net/src/HTTPServerParams.cpp +++ b/base/poco/Net/src/HTTPServerParams.cpp @@ -22,7 +22,7 @@ namespace Net { HTTPServerParams::HTTPServerParams(): _timeout(60000000), _keepAlive(true), - _maxKeepAliveRequests(0), + _maxKeepAliveRequests(100), _keepAliveTimeout(15000000) { } @@ -32,12 +32,12 @@ HTTPServerParams::~HTTPServerParams() { } - + void HTTPServerParams::setServerName(const std::string& serverName) { _serverName = serverName; } - + void HTTPServerParams::setSoftwareVersion(const std::string& softwareVersion) { @@ -50,24 +50,24 @@ void HTTPServerParams::setTimeout(const Poco::Timespan& timeout) _timeout = timeout; } - + void HTTPServerParams::setKeepAlive(bool keepAlive) { _keepAlive = keepAlive; } - + void HTTPServerParams::setKeepAliveTimeout(const Poco::Timespan& timeout) { _keepAliveTimeout = timeout; } - -void HTTPServerParams::setMaxKeepAliveRequests(int maxKeepAliveRequests) + +void HTTPServerParams::setMaxKeepAliveRequests(size_t maxKeepAliveRequests) { poco_assert (maxKeepAliveRequests >= 0); _maxKeepAliveRequests = maxKeepAliveRequests; } - + } } // namespace Poco::Net diff --git a/base/poco/Net/src/HTTPServerSession.cpp b/base/poco/Net/src/HTTPServerSession.cpp index 8eec3e14872..5227c15ebc2 100644 --- a/base/poco/Net/src/HTTPServerSession.cpp +++ b/base/poco/Net/src/HTTPServerSession.cpp @@ -50,14 +50,14 @@ bool HTTPServerSession::hasMoreRequests() --_maxKeepAliveRequests; return socket().poll(getTimeout(), Socket::SELECT_READ); } - else if (_maxKeepAliveRequests != 0 && getKeepAlive()) + else if (canKeepAlive()) { if (_maxKeepAliveRequests > 0) --_maxKeepAliveRequests; return buffered() > 0 || socket().poll(_keepAliveTimeout, Socket::SELECT_READ); } - else - return false; + else + return false; } diff --git a/base/poco/Net/src/TCPServerConnection.cpp b/base/poco/Net/src/TCPServerConnection.cpp index 1072b182c23..2148af4267b 100644 --- a/base/poco/Net/src/TCPServerConnection.cpp +++ b/base/poco/Net/src/TCPServerConnection.cpp @@ -18,7 +18,6 @@ using Poco::Exception; -using Poco::ErrorHandler; namespace Poco { @@ -31,9 +30,7 @@ TCPServerConnection::TCPServerConnection(const StreamSocket& socket): } -TCPServerConnection::~TCPServerConnection() -{ -} +TCPServerConnection::~TCPServerConnection() = default; void TCPServerConnection::start() diff --git a/ci/__init__.py b/ci/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ci/docker/stateful-test/Dockerfile b/ci/docker/stateful-test/Dockerfile new file mode 100644 index 00000000000..e21aec4a48f --- /dev/null +++ b/ci/docker/stateful-test/Dockerfile @@ -0,0 +1,14 @@ +ARG FROM_TAG=latest +FROM clickhouse/stateless-test:$FROM_TAG + +USER root + +RUN apt-get update -y \ + && env DEBIAN_FRONTEND=noninteractive \ + apt-get install --yes --no-install-recommends \ + nodejs \ + npm \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/* \ + +USER clickhouse diff --git a/ci/docker/stateless-test/Dockerfile b/ci/docker/stateless-test/Dockerfile new file mode 100644 index 00000000000..dcfaa5f6267 --- /dev/null +++ b/ci/docker/stateless-test/Dockerfile @@ -0,0 +1,117 @@ +# docker build -t clickhouse/stateless-test . +FROM ubuntu:22.04 + +# ARG for quick switch to a given ubuntu mirror +ARG apt_archive="http://archive.ubuntu.com" +RUN sed -i "s|http://archive.ubuntu.com|$apt_archive|g" /etc/apt/sources.list + +ARG odbc_driver_url="https://github.com/ClickHouse/clickhouse-odbc/releases/download/v1.1.6.20200320/clickhouse-odbc-1.1.6-Linux.tar.gz" + + +RUN mkdir /etc/clickhouse-server /etc/clickhouse-keeper /etc/clickhouse-client && chmod 777 /etc/clickhouse-* \ + && mkdir -p /var/lib/clickhouse /var/log/clickhouse-server && chmod 777 /var/log/clickhouse-server /var/lib/clickhouse + +RUN addgroup --gid 1001 clickhouse && adduser --uid 1001 --gid 1001 --disabled-password clickhouse + +# moreutils - provides ts fo FT +# expect, bzip2 - requried by FT +# bsdmainutils - provides hexdump for FT + +# golang version 1.13 on Ubuntu 20 is enough for tests +RUN apt-get update -y \ + && env DEBIAN_FRONTEND=noninteractive \ + apt-get install --yes --no-install-recommends \ + awscli \ + brotli \ + lz4 \ + expect \ + moreutils \ + bzip2 \ + bsdmainutils \ + golang \ + lsof \ + mysql-client=8.0* \ + ncdu \ + netcat-openbsd \ + nodejs \ + npm \ + odbcinst \ + openjdk-11-jre-headless \ + openssl \ + postgresql-client \ + python3 \ + python3-pip \ + qemu-user-static \ + sqlite3 \ + sudo \ + tree \ + unixodbc \ + rustc \ + cargo \ + zstd \ + file \ + jq \ + pv \ + zip \ + unzip \ + p7zip-full \ + curl \ + wget \ + xz-utils \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/* + +ARG PROTOC_VERSION=25.1 +RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \ + && unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local \ + && rm protoc-${PROTOC_VERSION}-linux-x86_64.zip + +COPY requirements.txt / +RUN pip3 install --no-cache-dir -r /requirements.txt + +RUN mkdir -p /tmp/clickhouse-odbc-tmp \ + && cd /tmp/clickhouse-odbc-tmp \ + && curl -L ${odbc_driver_url} | tar --strip-components=1 -xz clickhouse-odbc-1.1.6-Linux \ + && mkdir /usr/local/lib64 -p \ + && cp /tmp/clickhouse-odbc-tmp/lib64/*.so /usr/local/lib64/ \ + && odbcinst -i -d -f /tmp/clickhouse-odbc-tmp/share/doc/clickhouse-odbc/config/odbcinst.ini.sample \ + && odbcinst -i -s -l -f /tmp/clickhouse-odbc-tmp/share/doc/clickhouse-odbc/config/odbc.ini.sample \ + && sed -i 's"=libclickhouseodbc"=/usr/local/lib64/libclickhouseodbc"' /etc/odbcinst.ini \ + && rm -rf /tmp/clickhouse-odbc-tmp + +ENV TZ=Europe/Amsterdam +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +ENV NUM_TRIES=1 + +# Unrelated to vars in setup_minio.sh, but should be the same there +# to have the same binaries for local running scenario +ARG MINIO_SERVER_VERSION=2024-08-03T04-33-23Z +ARG MINIO_CLIENT_VERSION=2024-07-31T15-58-33Z +ARG TARGETARCH + +# Download Minio-related binaries +RUN arch=${TARGETARCH:-amd64} \ + && curl -L "https://dl.min.io/server/minio/release/linux-${arch}/archive/minio.RELEASE.${MINIO_SERVER_VERSION}" -o /minio \ + && curl -L "https://dl.min.io/client/mc/release/linux-${arch}/archive/mc.RELEASE.${MINIO_CLIENT_VERSION}" -o /mc \ + && chmod +x /mc /minio + +ENV MINIO_ROOT_USER="clickhouse" +ENV MINIO_ROOT_PASSWORD="clickhouse" + +# for minio to work without root +RUN chmod 777 /home +ENV HOME="/home" +ENV TEMP_DIR="/tmp/praktika" +ENV PATH="/wd/tests:/tmp/praktika/input:$PATH" + +RUN curl -L --no-verbose -O 'https://archive.apache.org/dist/hadoop/common/hadoop-3.3.1/hadoop-3.3.1.tar.gz' \ + && tar -xvf hadoop-3.3.1.tar.gz \ + && rm -rf hadoop-3.3.1.tar.gz \ + && chmod 777 /hadoop-3.3.1 + + +RUN npm install -g azurite@3.30.0 \ + && npm install -g tslib && npm install -g node + +USER clickhouse diff --git a/ci/docker/stateless-test/requirements.txt b/ci/docker/stateless-test/requirements.txt new file mode 100644 index 00000000000..6f64cc08951 --- /dev/null +++ b/ci/docker/stateless-test/requirements.txt @@ -0,0 +1,6 @@ +Jinja2==3.1.3 +numpy==1.26.4 +requests==2.32.3 +pandas==1.5.3 +scipy==1.12.0 +pyarrow==18.0.0 diff --git a/ci/jobs/__init__.py b/ci/jobs/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ci/jobs/build_clickhouse.py b/ci/jobs/build_clickhouse.py index 21ed8091608..ed9fd491fcf 100644 --- a/ci/jobs/build_clickhouse.py +++ b/ci/jobs/build_clickhouse.py @@ -13,11 +13,30 @@ class JobStages(metaclass=MetaClasses.WithIter): def parse_args(): parser = argparse.ArgumentParser(description="ClickHouse Build Job") - parser.add_argument("BUILD_TYPE", help="Type: ") - parser.add_argument("--param", help="Optional custom job start stage", default=None) + parser.add_argument( + "--build-type", + help="Type: ,,", + ) + parser.add_argument( + "--param", + help="Optional user-defined job start stage (for local run)", + default=None, + ) return parser.parse_args() +CMAKE_CMD = """cmake --debug-trycompile -DCMAKE_VERBOSE_MAKEFILE=1 -LA \ +-DCMAKE_BUILD_TYPE={BUILD_TYPE} \ +-DSANITIZE={SANITIZER} \ +-DENABLE_CHECK_HEAVY_BUILDS=1 -DENABLE_CLICKHOUSE_SELF_EXTRACTING=1 \ +-DENABLE_UTILS=0 -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_PREFIX=/usr \ +-DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON \ +{AUX_DEFS} \ +-DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 \ +-DCOMPILER_CACHE={CACHE_TYPE} \ +-DENABLE_BUILD_PROFILING=1 {DIR}""" + + def main(): args = parse_args() @@ -33,23 +52,41 @@ def main(): stages.pop(0) stages.insert(0, stage) - cmake_build_type = "Release" - sanitizer = "" + build_type = args.build_type + assert ( + build_type + ), "build_type must be provided either as input argument or as a parameter of parametrized job in CI" + build_type = build_type.lower() - if "debug" in args.BUILD_TYPE.lower(): + CACHE_TYPE = "sccache" + + BUILD_TYPE = "RelWithDebInfo" + SANITIZER = "" + AUX_DEFS = " -DENABLE_TESTS=0 " + + if "debug" in build_type: print("Build type set: debug") - cmake_build_type = "Debug" - - if "asan" in args.BUILD_TYPE.lower(): + BUILD_TYPE = "Debug" + AUX_DEFS = " -DENABLE_TESTS=1 " + elif "release" in build_type: + print("Build type set: release") + AUX_DEFS = ( + " -DENABLE_TESTS=0 -DSPLIT_DEBUG_SYMBOLS=ON -DBUILD_STANDALONE_KEEPER=1 " + ) + elif "asan" in build_type: print("Sanitizer set: address") - sanitizer = "address" + SANITIZER = "address" + else: + assert False - # if Environment.is_local_run(): - # build_cache_type = "disabled" - # else: - build_cache_type = "sccache" + cmake_cmd = CMAKE_CMD.format( + BUILD_TYPE=BUILD_TYPE, + CACHE_TYPE=CACHE_TYPE, + SANITIZER=SANITIZER, + AUX_DEFS=AUX_DEFS, + DIR=Utils.cwd(), + ) - current_directory = Utils.cwd() build_dir = f"{Settings.TEMP_DIR}/build" res = True @@ -69,12 +106,7 @@ def main(): results.append( Result.create_from_command_execution( name="Cmake configuration", - command=f"cmake --debug-trycompile -DCMAKE_VERBOSE_MAKEFILE=1 -LA -DCMAKE_BUILD_TYPE={cmake_build_type} \ - -DSANITIZE={sanitizer} -DENABLE_CHECK_HEAVY_BUILDS=1 -DENABLE_CLICKHOUSE_SELF_EXTRACTING=1 -DENABLE_TESTS=0 \ - -DENABLE_UTILS=0 -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON \ - -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCOMPILER_CACHE={build_cache_type} -DENABLE_TESTS=1 \ - -DENABLE_BUILD_PROFILING=1 {current_directory}", + command=cmake_cmd, workdir=build_dir, with_log=True, ) @@ -95,7 +127,7 @@ def main(): Shell.check(f"ls -l {build_dir}/programs/") res = results[-1].is_ok() - Result.create_from(results=results, stopwatch=stop_watch).finish_job_accordingly() + Result.create_from(results=results, stopwatch=stop_watch).complete_job() if __name__ == "__main__": diff --git a/ci/jobs/check_style.py b/ci/jobs/check_style.py index f9cdc76302d..d4b81abc92c 100644 --- a/ci/jobs/check_style.py +++ b/ci/jobs/check_style.py @@ -379,4 +379,4 @@ if __name__ == "__main__": ) ) - Result.create_from(results=results, stopwatch=stop_watch).finish_job_accordingly() + Result.create_from(results=results, stopwatch=stop_watch).complete_job() diff --git a/ci/jobs/fast_test.py b/ci/jobs/fast_test.py index 1dcd65b6ed2..03a4c0cd496 100644 --- a/ci/jobs/fast_test.py +++ b/ci/jobs/fast_test.py @@ -1,120 +1,13 @@ import argparse -import threading -from pathlib import Path from praktika.result import Result from praktika.settings import Settings from praktika.utils import MetaClasses, Shell, Utils +from ci.jobs.scripts.clickhouse_proc import ClickHouseProc from ci.jobs.scripts.functional_tests_results import FTResultsProcessor -class ClickHouseProc: - def __init__(self): - self.ch_config_dir = f"{Settings.TEMP_DIR}/etc/clickhouse-server" - self.pid_file = f"{self.ch_config_dir}/clickhouse-server.pid" - self.config_file = f"{self.ch_config_dir}/config.xml" - self.user_files_path = f"{self.ch_config_dir}/user_files" - self.test_output_file = f"{Settings.OUTPUT_DIR}/test_result.txt" - self.command = f"clickhouse-server --config-file {self.config_file} --pid-file {self.pid_file} -- --path {self.ch_config_dir} --user_files_path {self.user_files_path} --top_level_domains_path {self.ch_config_dir}/top_level_domains --keeper_server.storage_path {self.ch_config_dir}/coordination" - self.proc = None - self.pid = 0 - nproc = int(Utils.cpu_count() / 2) - self.fast_test_command = f"clickhouse-test --hung-check --fast-tests-only --no-random-settings --no-random-merge-tree-settings --no-long --testname --shard --zookeeper --check-zookeeper-session --order random --print-time --report-logs-stats --jobs {nproc} -- '' | ts '%Y-%m-%d %H:%M:%S' \ - | tee -a \"{self.test_output_file}\"" - # TODO: store info in case of failure - self.info = "" - self.info_file = "" - - Utils.set_env("CLICKHOUSE_CONFIG_DIR", self.ch_config_dir) - Utils.set_env("CLICKHOUSE_CONFIG", self.config_file) - Utils.set_env("CLICKHOUSE_USER_FILES", self.user_files_path) - Utils.set_env("CLICKHOUSE_SCHEMA_FILES", f"{self.ch_config_dir}/format_schemas") - - def start(self): - print("Starting ClickHouse server") - Shell.check(f"rm {self.pid_file}") - - def run_clickhouse(): - self.proc = Shell.run_async( - self.command, verbose=True, suppress_output=True - ) - - thread = threading.Thread(target=run_clickhouse) - thread.daemon = True # Allow program to exit even if thread is still running - thread.start() - - # self.proc = Shell.run_async(self.command, verbose=True) - - started = False - try: - for _ in range(5): - pid = Shell.get_output(f"cat {self.pid_file}").strip() - if not pid: - Utils.sleep(1) - continue - started = True - print(f"Got pid from fs [{pid}]") - _ = int(pid) - break - except Exception: - pass - - if not started: - stdout = self.proc.stdout.read().strip() if self.proc.stdout else "" - stderr = self.proc.stderr.read().strip() if self.proc.stderr else "" - Utils.print_formatted_error("Failed to start ClickHouse", stdout, stderr) - return False - - print(f"ClickHouse server started successfully, pid [{pid}]") - return True - - def wait_ready(self): - res, out, err = 0, "", "" - attempts = 30 - delay = 2 - for attempt in range(attempts): - res, out, err = Shell.get_res_stdout_stderr( - 'clickhouse-client --query "select 1"', verbose=True - ) - if out.strip() == "1": - print("Server ready") - break - else: - print(f"Server not ready, wait") - Utils.sleep(delay) - else: - Utils.print_formatted_error( - f"Server not ready after [{attempts*delay}s]", out, err - ) - return False - return True - - def run_fast_test(self): - if Path(self.test_output_file).exists(): - Path(self.test_output_file).unlink() - exit_code = Shell.run(self.fast_test_command) - return exit_code == 0 - - def terminate(self): - print("Terminate ClickHouse process") - timeout = 10 - if self.proc: - Utils.terminate_process_group(self.proc.pid) - - self.proc.terminate() - try: - self.proc.wait(timeout=10) - print(f"Process {self.proc.pid} terminated gracefully.") - except Exception: - print( - f"Process {self.proc.pid} did not terminate in {timeout} seconds, killing it..." - ) - Utils.terminate_process_group(self.proc.pid, force=True) - self.proc.wait() # Wait for the process to be fully killed - print(f"Process {self.proc} was killed.") - - def clone_submodules(): submodules_to_update = [ "contrib/sysroot", @@ -240,7 +133,7 @@ def main(): Shell.check(f"rm -rf {build_dir} && mkdir -p {build_dir}") results.append( Result.create_from_command_execution( - name="Checkout Submodules for Minimal Build", + name="Checkout Submodules", command=clone_submodules, ) ) @@ -295,8 +188,8 @@ def main(): if res and JobStages.CONFIG in stages: commands = [ f"rm -rf {Settings.TEMP_DIR}/etc/ && mkdir -p {Settings.TEMP_DIR}/etc/clickhouse-client {Settings.TEMP_DIR}/etc/clickhouse-server", - f"cp {current_directory}/programs/server/config.xml {current_directory}/programs/server/users.xml {Settings.TEMP_DIR}/etc/clickhouse-server/", - f"{current_directory}/tests/config/install.sh {Settings.TEMP_DIR}/etc/clickhouse-server {Settings.TEMP_DIR}/etc/clickhouse-client", + f"cp ./programs/server/config.xml ./programs/server/users.xml {Settings.TEMP_DIR}/etc/clickhouse-server/", + f"./tests/config/install.sh {Settings.TEMP_DIR}/etc/clickhouse-server {Settings.TEMP_DIR}/etc/clickhouse-client --fast-test", # f"cp -a {current_directory}/programs/server/config.d/log_to_console.xml {Settings.TEMP_DIR}/etc/clickhouse-server/config.d/", f"rm -f {Settings.TEMP_DIR}/etc/clickhouse-server/config.d/secure_ports.xml", update_path_ch_config, @@ -310,7 +203,7 @@ def main(): ) res = results[-1].is_ok() - CH = ClickHouseProc() + CH = ClickHouseProc(fast_test=True) if res and JobStages.TEST in stages: stop_watch_ = Utils.Stopwatch() step_name = "Start ClickHouse Server" @@ -322,15 +215,17 @@ def main(): ) if res and JobStages.TEST in stages: + stop_watch_ = Utils.Stopwatch() step_name = "Tests" print(step_name) res = res and CH.run_fast_test() if res: results.append(FTResultsProcessor(wd=Settings.OUTPUT_DIR).run()) + results[-1].set_timing(stopwatch=stop_watch_) CH.terminate() - Result.create_from(results=results, stopwatch=stop_watch).finish_job_accordingly() + Result.create_from(results=results, stopwatch=stop_watch).complete_job() if __name__ == "__main__": diff --git a/ci/jobs/functional_stateful_tests.py b/ci/jobs/functional_stateful_tests.py new file mode 100644 index 00000000000..b5840fcd45d --- /dev/null +++ b/ci/jobs/functional_stateful_tests.py @@ -0,0 +1,171 @@ +import argparse +import os +import time +from pathlib import Path + +from praktika.result import Result +from praktika.settings import Settings +from praktika.utils import MetaClasses, Shell, Utils + +from ci.jobs.scripts.clickhouse_proc import ClickHouseProc +from ci.jobs.scripts.functional_tests_results import FTResultsProcessor + + +class JobStages(metaclass=MetaClasses.WithIter): + INSTALL_CLICKHOUSE = "install" + START = "start" + TEST = "test" + + +def parse_args(): + parser = argparse.ArgumentParser(description="ClickHouse Build Job") + parser.add_argument( + "--ch-path", help="Path to clickhouse binary", default=f"{Settings.INPUT_DIR}" + ) + parser.add_argument( + "--test-options", + help="Comma separated option(s): parallel|non-parallel|BATCH_NUM/BTATCH_TOT|..", + default="", + ) + parser.add_argument("--param", help="Optional job start stage", default=None) + parser.add_argument("--test", help="Optional test name pattern", default="") + return parser.parse_args() + + +def run_test( + no_parallel: bool, no_sequiential: bool, batch_num: int, batch_total: int, test="" +): + test_output_file = f"{Settings.OUTPUT_DIR}/test_result.txt" + + test_command = f"clickhouse-test --jobs 2 --testname --shard --zookeeper --check-zookeeper-session --no-stateless \ + --hung-check --print-time \ + --capture-client-stacktrace --queries ./tests/queries -- '{test}' \ + | ts '%Y-%m-%d %H:%M:%S' | tee -a \"{test_output_file}\"" + if Path(test_output_file).exists(): + Path(test_output_file).unlink() + Shell.run(test_command, verbose=True) + + +def main(): + + args = parse_args() + test_options = args.test_options.split(",") + no_parallel = "non-parallel" in test_options + no_sequential = "parallel" in test_options + batch_num, total_batches = 0, 0 + for to in test_options: + if "/" in to: + batch_num, total_batches = map(int, to.split("/")) + + # os.environ["AZURE_CONNECTION_STRING"] = Shell.get_output( + # f"aws ssm get-parameter --region us-east-1 --name azure_connection_string --with-decryption --output text --query Parameter.Value", + # verbose=True, + # strict=True + # ) + + ch_path = args.ch_path + assert Path( + ch_path + "/clickhouse" + ).is_file(), f"clickhouse binary not found under [{ch_path}]" + + stop_watch = Utils.Stopwatch() + + stages = list(JobStages) + + logs_to_attach = [] + + stage = args.param or JobStages.INSTALL_CLICKHOUSE + if stage: + assert stage in JobStages, f"--param must be one of [{list(JobStages)}]" + print(f"Job will start from stage [{stage}]") + while stage in stages: + stages.pop(0) + stages.insert(0, stage) + + res = True + results = [] + + Utils.add_to_PATH(f"{ch_path}:tests") + + if res and JobStages.INSTALL_CLICKHOUSE in stages: + commands = [ + f"rm -rf /tmp/praktika/var/log/clickhouse-server/clickhouse-server.*", + f"chmod +x {ch_path}/clickhouse", + f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-server", + f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-client", + f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-compressor", + f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-local", + f"rm -rf {Settings.TEMP_DIR}/etc/ && mkdir -p {Settings.TEMP_DIR}/etc/clickhouse-client {Settings.TEMP_DIR}/etc/clickhouse-server", + f"cp programs/server/config.xml programs/server/users.xml {Settings.TEMP_DIR}/etc/clickhouse-server/", + # TODO: find a way to work with Azure secret so it's ok for local tests as well, for now keep azure disabled + f"./tests/config/install.sh {Settings.TEMP_DIR}/etc/clickhouse-server {Settings.TEMP_DIR}/etc/clickhouse-client --s3-storage --no-azure", + # clickhouse benchmark segfaults with --config-path, so provide client config by its default location + f"cp {Settings.TEMP_DIR}/etc/clickhouse-client/* /etc/clickhouse-client/", + # update_path_ch_config, + # f"sed -i 's|>/var/|>{Settings.TEMP_DIR}/var/|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' {Settings.TEMP_DIR}/etc/clickhouse-server/config.xml", + # f"sed -i 's|>/etc/|>{Settings.TEMP_DIR}/etc/|g' {Settings.TEMP_DIR}/etc/clickhouse-server/config.d/ssl_certs.xml", + f"for file in /tmp/praktika/etc/clickhouse-server/config.d/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|>/var/log|>{Settings.TEMP_DIR}/var/log|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' $(readlink -f $file); done", + f"for file in /tmp/praktika/etc/clickhouse-server/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|>/var/log|>{Settings.TEMP_DIR}/var/log|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' $(readlink -f $file); done", + f"for file in /tmp/praktika/etc/clickhouse-server/config.d/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|local_disk|{Settings.TEMP_DIR}/local_disk|g' $(readlink -f $file); done", + f"clickhouse-server --version", + ] + results.append( + Result.create_from_command_execution( + name="Install ClickHouse", command=commands, with_log=True + ) + ) + res = results[-1].is_ok() + + CH = ClickHouseProc() + if res and JobStages.START in stages: + stop_watch_ = Utils.Stopwatch() + step_name = "Start ClickHouse Server" + print(step_name) + minio_log = "/tmp/praktika/output/minio.log" + res = res and CH.start_minio(test_type="stateful", log_file_path=minio_log) + logs_to_attach += [minio_log] + time.sleep(10) + Shell.check("ps -ef | grep minio", verbose=True) + res = res and Shell.check( + "aws s3 ls s3://test --endpoint-url http://localhost:11111/", verbose=True + ) + res = res and CH.start() + res = res and CH.wait_ready() + if res: + print("ch started") + logs_to_attach += [ + "/tmp/praktika/var/log/clickhouse-server/clickhouse-server.log", + "/tmp/praktika/var/log/clickhouse-server/clickhouse-server.err.log", + ] + results.append( + Result.create_from( + name=step_name, + status=res, + stopwatch=stop_watch_, + ) + ) + res = results[-1].is_ok() + + if res and JobStages.TEST in stages: + stop_watch_ = Utils.Stopwatch() + step_name = "Tests" + print(step_name) + # assert Shell.check("clickhouse-client -q \"insert into system.zookeeper (name, path, value) values ('auxiliary_zookeeper2', '/test/chroot/', '')\"", verbose=True) + run_test( + no_parallel=no_parallel, + no_sequiential=no_sequential, + batch_num=batch_num, + batch_total=total_batches, + test=args.test, + ) + results.append(FTResultsProcessor(wd=Settings.OUTPUT_DIR).run()) + results[-1].set_timing(stopwatch=stop_watch_) + res = results[-1].is_ok() + + Result.create_from( + results=results, stopwatch=stop_watch, files=logs_to_attach if not res else [] + ).complete_job() + + +if __name__ == "__main__": + main() diff --git a/ci/jobs/functional_stateless_tests.py b/ci/jobs/functional_stateless_tests.py new file mode 100644 index 00000000000..0d73312bd9e --- /dev/null +++ b/ci/jobs/functional_stateless_tests.py @@ -0,0 +1,183 @@ +import argparse +import os +import time +from pathlib import Path + +from praktika.result import Result +from praktika.settings import Settings +from praktika.utils import MetaClasses, Shell, Utils + +from ci.jobs.scripts.clickhouse_proc import ClickHouseProc +from ci.jobs.scripts.functional_tests_results import FTResultsProcessor + + +class JobStages(metaclass=MetaClasses.WithIter): + INSTALL_CLICKHOUSE = "install" + START = "start" + TEST = "test" + + +def parse_args(): + parser = argparse.ArgumentParser(description="ClickHouse Build Job") + parser.add_argument( + "--ch-path", help="Path to clickhouse binary", default=f"{Settings.INPUT_DIR}" + ) + parser.add_argument( + "--test-options", + help="Comma separated option(s): parallel|non-parallel|BATCH_NUM/BTATCH_TOT|..", + default="", + ) + parser.add_argument("--param", help="Optional job start stage", default=None) + parser.add_argument("--test", help="Optional test name pattern", default="") + return parser.parse_args() + + +def run_stateless_test( + no_parallel: bool, no_sequiential: bool, batch_num: int, batch_total: int, test="" +): + assert not (no_parallel and no_sequiential) + test_output_file = f"{Settings.OUTPUT_DIR}/test_result.txt" + aux = "" + nproc = int(Utils.cpu_count() / 2) + if batch_num and batch_total: + aux = f"--run-by-hash-total {batch_total} --run-by-hash-num {batch_num-1}" + statless_test_command = f"clickhouse-test --testname --shard --zookeeper --check-zookeeper-session --hung-check --print-time \ + --no-drop-if-fail --capture-client-stacktrace --queries /repo/tests/queries --test-runs 1 --hung-check \ + {'--no-parallel' if no_parallel else ''} {'--no-sequential' if no_sequiential else ''} \ + --print-time --jobs {nproc} --report-coverage --report-logs-stats {aux} \ + --queries ./tests/queries -- '{test}' | ts '%Y-%m-%d %H:%M:%S' \ + | tee -a \"{test_output_file}\"" + if Path(test_output_file).exists(): + Path(test_output_file).unlink() + Shell.run(statless_test_command, verbose=True) + + +def main(): + + args = parse_args() + test_options = args.test_options.split(",") + no_parallel = "non-parallel" in test_options + no_sequential = "parallel" in test_options + batch_num, total_batches = 0, 0 + for to in test_options: + if "/" in to: + batch_num, total_batches = map(int, to.split("/")) + + # os.environ["AZURE_CONNECTION_STRING"] = Shell.get_output( + # f"aws ssm get-parameter --region us-east-1 --name azure_connection_string --with-decryption --output text --query Parameter.Value", + # verbose=True, + # strict=True + # ) + + ch_path = args.ch_path + assert Path( + ch_path + "/clickhouse" + ).is_file(), f"clickhouse binary not found under [{ch_path}]" + + stop_watch = Utils.Stopwatch() + + stages = list(JobStages) + + logs_to_attach = [] + + stage = args.param or JobStages.INSTALL_CLICKHOUSE + if stage: + assert stage in JobStages, f"--param must be one of [{list(JobStages)}]" + print(f"Job will start from stage [{stage}]") + while stage in stages: + stages.pop(0) + stages.insert(0, stage) + + res = True + results = [] + + Utils.add_to_PATH(f"{ch_path}:tests") + + if res and JobStages.INSTALL_CLICKHOUSE in stages: + commands = [ + f"rm -rf /tmp/praktika/var/log/clickhouse-server/clickhouse-server.*", + f"chmod +x {ch_path}/clickhouse", + f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-server", + f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-client", + f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-compressor", + f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-local", + f"rm -rf {Settings.TEMP_DIR}/etc/ && mkdir -p {Settings.TEMP_DIR}/etc/clickhouse-client {Settings.TEMP_DIR}/etc/clickhouse-server", + f"cp programs/server/config.xml programs/server/users.xml {Settings.TEMP_DIR}/etc/clickhouse-server/", + # TODO: find a way to work with Azure secret so it's ok for local tests as well, for now keep azure disabled + f"./tests/config/install.sh {Settings.TEMP_DIR}/etc/clickhouse-server {Settings.TEMP_DIR}/etc/clickhouse-client --s3-storage --no-azure", + # clickhouse benchmark segfaults with --config-path, so provide client config by its default location + f"cp {Settings.TEMP_DIR}/etc/clickhouse-client/* /etc/clickhouse-client/", + # update_path_ch_config, + # f"sed -i 's|>/var/|>{Settings.TEMP_DIR}/var/|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' {Settings.TEMP_DIR}/etc/clickhouse-server/config.xml", + # f"sed -i 's|>/etc/|>{Settings.TEMP_DIR}/etc/|g' {Settings.TEMP_DIR}/etc/clickhouse-server/config.d/ssl_certs.xml", + f"for file in /tmp/praktika/etc/clickhouse-server/config.d/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|>/var/log|>{Settings.TEMP_DIR}/var/log|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' $(readlink -f $file); done", + f"for file in /tmp/praktika/etc/clickhouse-server/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|>/var/log|>{Settings.TEMP_DIR}/var/log|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' $(readlink -f $file); done", + f"for file in /tmp/praktika/etc/clickhouse-server/config.d/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|local_disk|{Settings.TEMP_DIR}/local_disk|g' $(readlink -f $file); done", + f"clickhouse-server --version", + ] + results.append( + Result.create_from_command_execution( + name="Install ClickHouse", command=commands, with_log=True + ) + ) + res = results[-1].is_ok() + + CH = ClickHouseProc() + if res and JobStages.START in stages: + stop_watch_ = Utils.Stopwatch() + step_name = "Start ClickHouse Server" + print(step_name) + hdfs_log = "/tmp/praktika/output/hdfs_mini.log" + minio_log = "/tmp/praktika/output/minio.log" + res = res and CH.start_hdfs(log_file_path=hdfs_log) + res = res and CH.start_minio(test_type="stateful", log_file_path=minio_log) + logs_to_attach += [minio_log, hdfs_log] + time.sleep(10) + Shell.check("ps -ef | grep minio", verbose=True) + Shell.check("ps -ef | grep hdfs", verbose=True) + res = res and Shell.check( + "aws s3 ls s3://test --endpoint-url http://localhost:11111/", verbose=True + ) + res = res and CH.start() + res = res and CH.wait_ready() + if res: + print("ch started") + logs_to_attach += [ + "/tmp/praktika/var/log/clickhouse-server/clickhouse-server.log", + "/tmp/praktika/var/log/clickhouse-server/clickhouse-server.err.log", + ] + results.append( + Result.create_from( + name=step_name, + status=res, + stopwatch=stop_watch_, + ) + ) + res = results[-1].is_ok() + + if res and JobStages.TEST in stages: + stop_watch_ = Utils.Stopwatch() + step_name = "Tests" + print(step_name) + assert Shell.check( + "clickhouse-client -q \"insert into system.zookeeper (name, path, value) values ('auxiliary_zookeeper2', '/test/chroot/', '')\"", + verbose=True, + ) + run_stateless_test( + no_parallel=no_parallel, + no_sequiential=no_sequential, + batch_num=batch_num, + batch_total=total_batches, + test=args.test, + ) + results.append(FTResultsProcessor(wd=Settings.OUTPUT_DIR).run()) + results[-1].set_timing(stopwatch=stop_watch_) + res = results[-1].is_ok() + + Result.create_from( + results=results, stopwatch=stop_watch, files=logs_to_attach if not res else [] + ).complete_job() + + +if __name__ == "__main__": + main() diff --git a/ci/jobs/scripts/__init__.py b/ci/jobs/scripts/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ci/jobs/scripts/clickhouse_proc.py b/ci/jobs/scripts/clickhouse_proc.py new file mode 100644 index 00000000000..6108563605f --- /dev/null +++ b/ci/jobs/scripts/clickhouse_proc.py @@ -0,0 +1,142 @@ +import subprocess +from pathlib import Path + +from praktika.settings import Settings +from praktika.utils import Shell, Utils + + +class ClickHouseProc: + BACKUPS_XML = """ + + + local + {CH_RUNTIME_DIR}/var/lib/clickhouse/disks/backups/ + + +""" + + def __init__(self, fast_test=False): + self.ch_config_dir = f"{Settings.TEMP_DIR}/etc/clickhouse-server" + self.pid_file = f"{self.ch_config_dir}/clickhouse-server.pid" + self.config_file = f"{self.ch_config_dir}/config.xml" + self.user_files_path = f"{self.ch_config_dir}/user_files" + self.test_output_file = f"{Settings.OUTPUT_DIR}/test_result.txt" + self.command = f"clickhouse-server --config-file {self.config_file} --pid-file {self.pid_file} -- --path {self.ch_config_dir} --user_files_path {self.user_files_path} --top_level_domains_path {self.ch_config_dir}/top_level_domains --keeper_server.storage_path {self.ch_config_dir}/coordination" + self.proc = None + self.pid = 0 + nproc = int(Utils.cpu_count() / 2) + self.fast_test_command = f"clickhouse-test --hung-check --fast-tests-only --no-random-settings --no-random-merge-tree-settings --no-long --testname --shard --zookeeper --check-zookeeper-session --order random --print-time --report-logs-stats --jobs {nproc} -- '' | ts '%Y-%m-%d %H:%M:%S' \ + | tee -a \"{self.test_output_file}\"" + # TODO: store info in case of failure + self.info = "" + self.info_file = "" + + Utils.set_env("CLICKHOUSE_CONFIG_DIR", self.ch_config_dir) + Utils.set_env("CLICKHOUSE_CONFIG", self.config_file) + Utils.set_env("CLICKHOUSE_USER_FILES", self.user_files_path) + # Utils.set_env("CLICKHOUSE_SCHEMA_FILES", f"{self.ch_config_dir}/format_schemas") + + # if not fast_test: + # with open(f"{self.ch_config_dir}/config.d/backups.xml", "w") as file: + # file.write(self.BACKUPS_XML) + + self.minio_proc = None + + def start_hdfs(self, log_file_path): + command = ["./ci/jobs/scripts/functional_tests/setup_hdfs_minicluster.sh"] + with open(log_file_path, "w") as log_file: + process = subprocess.Popen( + command, stdout=log_file, stderr=subprocess.STDOUT + ) + print( + f"Started setup_hdfs_minicluster.sh asynchronously with PID {process.pid}" + ) + return True + + def start_minio(self, test_type, log_file_path): + command = [ + "./ci/jobs/scripts/functional_tests/setup_minio.sh", + test_type, + "./tests", + ] + with open(log_file_path, "w") as log_file: + process = subprocess.Popen( + command, stdout=log_file, stderr=subprocess.STDOUT + ) + print(f"Started setup_minio.sh asynchronously with PID {process.pid}") + return True + + def start(self): + print("Starting ClickHouse server") + Shell.check(f"rm {self.pid_file}") + self.proc = subprocess.Popen(self.command, stderr=subprocess.STDOUT, shell=True) + started = False + try: + for _ in range(5): + pid = Shell.get_output(f"cat {self.pid_file}").strip() + if not pid: + Utils.sleep(1) + continue + started = True + print(f"Got pid from fs [{pid}]") + _ = int(pid) + break + except Exception: + pass + + if not started: + stdout = self.proc.stdout.read().strip() if self.proc.stdout else "" + stderr = self.proc.stderr.read().strip() if self.proc.stderr else "" + Utils.print_formatted_error("Failed to start ClickHouse", stdout, stderr) + return False + + print(f"ClickHouse server started successfully, pid [{pid}]") + return True + + def wait_ready(self): + res, out, err = 0, "", "" + attempts = 30 + delay = 2 + for attempt in range(attempts): + res, out, err = Shell.get_res_stdout_stderr( + 'clickhouse-client --query "select 1"', verbose=True + ) + if out.strip() == "1": + print("Server ready") + break + else: + print(f"Server not ready, wait") + Utils.sleep(delay) + else: + Utils.print_formatted_error( + f"Server not ready after [{attempts*delay}s]", out, err + ) + return False + return True + + def run_fast_test(self): + if Path(self.test_output_file).exists(): + Path(self.test_output_file).unlink() + exit_code = Shell.run(self.fast_test_command) + return exit_code == 0 + + def terminate(self): + print("Terminate ClickHouse process") + timeout = 10 + if self.proc: + Utils.terminate_process_group(self.proc.pid) + + self.proc.terminate() + try: + self.proc.wait(timeout=10) + print(f"Process {self.proc.pid} terminated gracefully.") + except Exception: + print( + f"Process {self.proc.pid} did not terminate in {timeout} seconds, killing it..." + ) + Utils.terminate_process_group(self.proc.pid, force=True) + self.proc.wait() # Wait for the process to be fully killed + print(f"Process {self.proc} was killed.") + + if self.minio_proc: + Utils.terminate_process_group(self.minio_proc.pid) diff --git a/ci/jobs/scripts/functional_tests/setup_hdfs_minicluster.sh b/ci/jobs/scripts/functional_tests/setup_hdfs_minicluster.sh new file mode 100755 index 00000000000..b810b27fe2b --- /dev/null +++ b/ci/jobs/scripts/functional_tests/setup_hdfs_minicluster.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# shellcheck disable=SC2024 + +set -e -x -a -u + +ls -lha + +cd /hadoop-3.3.1 + +export JAVA_HOME=/usr +mkdir -p target/test/data + +bin/mapred minicluster -format -nomr -nnport 12222 & + +while ! nc -z localhost 12222; do + sleep 1 +done + +lsof -i :12222 diff --git a/ci/jobs/scripts/functional_tests/setup_minio.sh b/ci/jobs/scripts/functional_tests/setup_minio.sh new file mode 100755 index 00000000000..88839c39674 --- /dev/null +++ b/ci/jobs/scripts/functional_tests/setup_minio.sh @@ -0,0 +1,162 @@ +#!/bin/bash + +set -euxf -o pipefail + +export MINIO_ROOT_USER=${MINIO_ROOT_USER:-clickhouse} +export MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-clickhouse} +TEST_DIR=${2:-/repo/tests/} + +if [ -d "$TEMP_DIR" ]; then + TEST_DIR=$(readlink -f $TEST_DIR) + cd "$TEMP_DIR" + # add / for minio mc in docker + PATH="/:.:$PATH" +fi + +usage() { + echo $"Usage: $0 (default path: /usr/share/clickhouse-test)" + exit 1 +} + +check_arg() { + local query_dir + if [ ! $# -eq 1 ]; then + if [ ! $# -eq 2 ]; then + echo "ERROR: need either one or two arguments, (default path: /usr/share/clickhouse-test)" + usage + fi + fi + case "$1" in + stateless) + query_dir="0_stateless" + ;; + stateful) + query_dir="1_stateful" + ;; + *) + echo "unknown test type ${test_type}" + usage + ;; + esac + echo ${query_dir} +} + +find_arch() { + local arch + case $(uname -m) in + x86_64) + arch="amd64" + ;; + aarch64) + arch="arm64" + ;; + *) + echo "unknown architecture $(uname -m)"; + exit 1 + ;; + esac + echo ${arch} +} + +find_os() { + local os + os=$(uname -s | tr '[:upper:]' '[:lower:]') + echo "${os}" +} + +download_minio() { + local os + local arch + local minio_server_version=${MINIO_SERVER_VERSION:-2024-08-03T04-33-23Z} + local minio_client_version=${MINIO_CLIENT_VERSION:-2024-07-31T15-58-33Z} + + os=$(find_os) + arch=$(find_arch) + wget "https://dl.min.io/server/minio/release/${os}-${arch}/archive/minio.RELEASE.${minio_server_version}" -O ./minio + wget "https://dl.min.io/client/mc/release/${os}-${arch}/archive/mc.RELEASE.${minio_client_version}" -O ./mc + chmod +x ./mc ./minio +} + +start_minio() { + pwd + mkdir -p ./minio_data + minio --version + nohup minio server --address ":11111" ./minio_data & + wait_for_it + lsof -i :11111 + sleep 5 +} + +setup_minio() { + local test_type=$1 + echo "setup_minio(), test_type=$test_type" + mc alias set clickminio http://localhost:11111 clickhouse clickhouse + mc admin user add clickminio test testtest + mc admin policy attach clickminio readwrite --user=test ||: + mc mb --ignore-existing clickminio/test + if [ "$test_type" = "stateless" ]; then + echo "Create @test bucket in minio" + mc anonymous set public clickminio/test + fi +} + +# uploads data to minio, by default after unpacking all tests +# will be in /usr/share/clickhouse-test/queries +upload_data() { + local query_dir=$1 + local test_path=$2 + local data_path=${test_path}/queries/${query_dir}/data_minio + echo "upload_data() data_path=$data_path" + + # iterating over globs will cause redundant file variable to be + # a path to a file, not a filename + # shellcheck disable=SC2045 + if [ -d "${data_path}" ]; then + mc cp --recursive "${data_path}"/ clickminio/test/ + fi +} + +setup_aws_credentials() { + local minio_root_user=${MINIO_ROOT_USER:-clickhouse} + local minio_root_password=${MINIO_ROOT_PASSWORD:-clickhouse} + mkdir -p ~/.aws + cat <> ~/.aws/credentials +[default] +aws_access_key_id=${minio_root_user} +aws_secret_access_key=${minio_root_password} +EOT +} + +wait_for_it() { + local counter=0 + local max_counter=60 + local url="http://localhost:11111" + local params=( + --silent + --verbose + ) + while ! curl "${params[@]}" "${url}" 2>&1 | grep AccessDenied + do + if [[ ${counter} == "${max_counter}" ]]; then + echo "failed to setup minio" + exit 0 + fi + echo "trying to connect to minio" + sleep 1 + counter=$((counter + 1)) + done +} + +main() { + local query_dir + query_dir=$(check_arg "$@") + if ! (minio --version && mc --version); then + download_minio + fi + start_minio + setup_minio "$1" + upload_data "${query_dir}" "$TEST_DIR" + setup_aws_credentials +} + +main "$@" diff --git a/ci/jobs/scripts/functional_tests_results.py b/ci/jobs/scripts/functional_tests_results.py index 5ac9d6b985d..06989fb0a44 100755 --- a/ci/jobs/scripts/functional_tests_results.py +++ b/ci/jobs/scripts/functional_tests_results.py @@ -1,7 +1,6 @@ import dataclasses from typing import List -from praktika.environment import Environment from praktika.result import Result OK_SIGN = "[ OK " @@ -233,6 +232,8 @@ class FTResultsProcessor: else: pass + info = f"Total: {s.total - s.skipped}, Failed: {s.failed}" + # TODO: !!! # def test_result_comparator(item): # # sort by status then by check name @@ -250,10 +251,11 @@ class FTResultsProcessor: # test_results.sort(key=test_result_comparator) return Result.create_from( - name=Environment.JOB_NAME, + name="Tests", results=test_results, status=state, files=[self.tests_output_file], + info=info, with_info_from_results=False, ) diff --git a/ci/praktika/__main__.py b/ci/praktika/__main__.py index 7f472ecd9ae..3dfdc26d69d 100644 --- a/ci/praktika/__main__.py +++ b/ci/praktika/__main__.py @@ -37,6 +37,30 @@ def create_parser(): type=str, default=None, ) + run_parser.add_argument( + "--test", + help="Custom parameter to pass into a job script, it's up to job script how to use it, for local test", + type=str, + default="", + ) + run_parser.add_argument( + "--pr", + help="PR number. Optional parameter for local run. Set if you want an required artifact to be uploaded from CI run in that PR", + type=int, + default=None, + ) + run_parser.add_argument( + "--sha", + help="Commit sha. Optional parameter for local run. Set if you want an required artifact to be uploaded from CI run on that sha, head sha will be used if not set", + type=str, + default=None, + ) + run_parser.add_argument( + "--branch", + help="Commit sha. Optional parameter for local run. Set if you want an required artifact to be uploaded from CI run on that branch, main branch name will be used if not set", + type=str, + default=None, + ) run_parser.add_argument( "--ci", help="When not set - dummy env will be generated, for local test", @@ -85,9 +109,13 @@ if __name__ == "__main__": workflow=workflow, job=job, docker=args.docker, - dummy_env=not args.ci, + local_run=not args.ci, no_docker=args.no_docker, param=args.param, + test=args.test, + pr=args.pr, + branch=args.branch, + sha=args.sha, ) else: parser.print_help() diff --git a/ci/praktika/_environment.py b/ci/praktika/_environment.py index ce9c6f5b486..734a4be3176 100644 --- a/ci/praktika/_environment.py +++ b/ci/praktika/_environment.py @@ -6,7 +6,7 @@ from types import SimpleNamespace from typing import Any, Dict, List, Type from praktika import Workflow -from praktika._settings import _Settings +from praktika.settings import Settings from praktika.utils import MetaClasses, T @@ -30,13 +30,12 @@ class _Environment(MetaClasses.Serializable): INSTANCE_ID: str INSTANCE_LIFE_CYCLE: str LOCAL_RUN: bool = False - PARAMETER: Any = None REPORT_INFO: List[str] = dataclasses.field(default_factory=list) name = "environment" @classmethod def file_name_static(cls, _name=""): - return f"{_Settings.TEMP_DIR}/{cls.name}.json" + return f"{Settings.TEMP_DIR}/{cls.name}.json" @classmethod def from_dict(cls: Type[T], obj: Dict[str, Any]) -> T: @@ -67,12 +66,12 @@ class _Environment(MetaClasses.Serializable): @staticmethod def get_needs_statuses(): - if Path(_Settings.WORKFLOW_STATUS_FILE).is_file(): - with open(_Settings.WORKFLOW_STATUS_FILE, "r", encoding="utf8") as f: + if Path(Settings.WORKFLOW_STATUS_FILE).is_file(): + with open(Settings.WORKFLOW_STATUS_FILE, "r", encoding="utf8") as f: return json.load(f) else: print( - f"ERROR: Status file [{_Settings.WORKFLOW_STATUS_FILE}] does not exist" + f"ERROR: Status file [{Settings.WORKFLOW_STATUS_FILE}] does not exist" ) raise RuntimeError() @@ -159,7 +158,8 @@ class _Environment(MetaClasses.Serializable): @classmethod def get_s3_prefix_static(cls, pr_number, branch, sha, latest=False): prefix = "" - if pr_number > 0: + assert sha or latest + if pr_number and pr_number > 0: prefix += f"{pr_number}" else: prefix += f"{branch}" @@ -171,18 +171,15 @@ class _Environment(MetaClasses.Serializable): # TODO: find a better place for the function. This file should not import praktika.settings # as it's requires reading users config, that's why imports nested inside the function - def get_report_url(self): + def get_report_url(self, settings, latest=False): import urllib - from praktika.settings import Settings - from praktika.utils import Utils - - path = Settings.HTML_S3_PATH - for bucket, endpoint in Settings.S3_BUCKET_TO_HTTP_ENDPOINT.items(): + path = settings.HTML_S3_PATH + for bucket, endpoint in settings.S3_BUCKET_TO_HTTP_ENDPOINT.items(): if bucket in path: path = path.replace(bucket, endpoint) break - REPORT_URL = f"https://{path}/{Path(Settings.HTML_PAGE_FILE).name}?PR={self.PR_NUMBER}&sha={self.SHA}&name_0={urllib.parse.quote(self.WORKFLOW_NAME, safe='')}&name_1={urllib.parse.quote(self.JOB_NAME, safe='')}" + REPORT_URL = f"https://{path}/{Path(settings.HTML_PAGE_FILE).name}?PR={self.PR_NUMBER}&sha={'latest' if latest else self.SHA}&name_0={urllib.parse.quote(self.WORKFLOW_NAME, safe='')}&name_1={urllib.parse.quote(self.JOB_NAME, safe='')}" return REPORT_URL def is_local_run(self): diff --git a/ci/praktika/_settings.py b/ci/praktika/_settings.py deleted file mode 100644 index 3052d8ef877..00000000000 --- a/ci/praktika/_settings.py +++ /dev/null @@ -1,124 +0,0 @@ -import dataclasses -from pathlib import Path -from typing import Dict, Iterable, List, Optional - - -@dataclasses.dataclass -class _Settings: - ###################################### - # Pipeline generation settings # - ###################################### - CI_PATH = "./ci" - WORKFLOW_PATH_PREFIX: str = "./.github/workflows" - WORKFLOWS_DIRECTORY: str = f"{CI_PATH}/workflows" - SETTINGS_DIRECTORY: str = f"{CI_PATH}/settings" - CI_CONFIG_JOB_NAME = "Config Workflow" - DOCKER_BUILD_JOB_NAME = "Docker Builds" - FINISH_WORKFLOW_JOB_NAME = "Finish Workflow" - READY_FOR_MERGE_STATUS_NAME = "Ready for Merge" - CI_CONFIG_RUNS_ON: Optional[List[str]] = None - DOCKER_BUILD_RUNS_ON: Optional[List[str]] = None - VALIDATE_FILE_PATHS: bool = True - - ###################################### - # Runtime Settings # - ###################################### - MAX_RETRIES_S3 = 3 - MAX_RETRIES_GH = 3 - - ###################################### - # S3 (artifact storage) settings # - ###################################### - S3_ARTIFACT_PATH: str = "" - - ###################################### - # CI workspace settings # - ###################################### - TEMP_DIR: str = "/tmp/praktika" - OUTPUT_DIR: str = f"{TEMP_DIR}/output" - INPUT_DIR: str = f"{TEMP_DIR}/input" - PYTHON_INTERPRETER: str = "python3" - PYTHON_PACKET_MANAGER: str = "pip3" - PYTHON_VERSION: str = "3.9" - INSTALL_PYTHON_FOR_NATIVE_JOBS: bool = False - INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS: str = "./ci/requirements.txt" - ENVIRONMENT_VAR_FILE: str = f"{TEMP_DIR}/environment.json" - RUN_LOG: str = f"{TEMP_DIR}/praktika_run.log" - - SECRET_GH_APP_ID: str = "GH_APP_ID" - SECRET_GH_APP_PEM_KEY: str = "GH_APP_PEM_KEY" - - ENV_SETUP_SCRIPT: str = "/tmp/praktika_setup_env.sh" - WORKFLOW_STATUS_FILE: str = f"{TEMP_DIR}/workflow_status.json" - - ###################################### - # CI Cache settings # - ###################################### - CACHE_VERSION: int = 1 - CACHE_DIGEST_LEN: int = 20 - CACHE_S3_PATH: str = "" - CACHE_LOCAL_PATH: str = f"{TEMP_DIR}/ci_cache" - - ###################################### - # Report settings # - ###################################### - HTML_S3_PATH: str = "" - HTML_PAGE_FILE: str = "./praktika/json.html" - TEXT_CONTENT_EXTENSIONS: Iterable[str] = frozenset([".txt", ".log"]) - S3_BUCKET_TO_HTTP_ENDPOINT: Optional[Dict[str, str]] = None - - DOCKERHUB_USERNAME: str = "" - DOCKERHUB_SECRET: str = "" - DOCKER_WD: str = "/wd" - - ###################################### - # CI DB Settings # - ###################################### - SECRET_CI_DB_URL: str = "CI_DB_URL" - SECRET_CI_DB_PASSWORD: str = "CI_DB_PASSWORD" - CI_DB_DB_NAME = "" - CI_DB_TABLE_NAME = "" - CI_DB_INSERT_TIMEOUT_SEC = 5 - - -_USER_DEFINED_SETTINGS = [ - "S3_ARTIFACT_PATH", - "CACHE_S3_PATH", - "HTML_S3_PATH", - "S3_BUCKET_TO_HTTP_ENDPOINT", - "TEXT_CONTENT_EXTENSIONS", - "TEMP_DIR", - "OUTPUT_DIR", - "INPUT_DIR", - "CI_CONFIG_RUNS_ON", - "DOCKER_BUILD_RUNS_ON", - "CI_CONFIG_JOB_NAME", - "PYTHON_INTERPRETER", - "PYTHON_VERSION", - "PYTHON_PACKET_MANAGER", - "INSTALL_PYTHON_FOR_NATIVE_JOBS", - "INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS", - "MAX_RETRIES_S3", - "MAX_RETRIES_GH", - "VALIDATE_FILE_PATHS", - "DOCKERHUB_USERNAME", - "DOCKERHUB_SECRET", - "READY_FOR_MERGE_STATUS_NAME", - "SECRET_CI_DB_URL", - "SECRET_CI_DB_PASSWORD", - "CI_DB_DB_NAME", - "CI_DB_TABLE_NAME", - "CI_DB_INSERT_TIMEOUT_SEC", - "SECRET_GH_APP_PEM_KEY", - "SECRET_GH_APP_ID", -] - - -class GHRunners: - ubuntu = "ubuntu-latest" - - -if __name__ == "__main__": - for setting in _USER_DEFINED_SETTINGS: - print(_Settings().__getattribute__(setting)) - # print(dataclasses.asdict(_Settings())) diff --git a/ci/praktika/cidb.py b/ci/praktika/cidb.py index 087845ec762..53088c102cd 100644 --- a/ci/praktika/cidb.py +++ b/ci/praktika/cidb.py @@ -52,7 +52,7 @@ class CIDB: check_status=result.status, check_duration_ms=int(result.duration * 1000), check_start_time=Utils.timestamp_to_str(result.start_time), - report_url=env.get_report_url(), + report_url=env.get_report_url(settings=Settings), pull_request_url=env.CHANGE_URL, base_ref=env.BASE_BRANCH, base_repo=env.REPOSITORY, diff --git a/ci/praktika/digest.py b/ci/praktika/digest.py index 93b62b13dc0..6b7e5eec07b 100644 --- a/ci/praktika/digest.py +++ b/ci/praktika/digest.py @@ -23,7 +23,7 @@ class Digest: hash_string = hash_obj.hexdigest() return hash_string - def calc_job_digest(self, job_config: Job.Config): + def calc_job_digest(self, job_config: Job.Config, docker_digests): config = job_config.digest_config if not config: return "f" * Settings.CACHE_DIGEST_LEN @@ -31,32 +31,32 @@ class Digest: cache_key = self._hash_digest_config(config) if cache_key in self.digest_cache: - return self.digest_cache[cache_key] - - included_files = Utils.traverse_paths( - job_config.digest_config.include_paths, - job_config.digest_config.exclude_paths, - sorted=True, - ) - - print( - f"calc digest for job [{job_config.name}]: hash_key [{cache_key}], include [{len(included_files)}] files" - ) - # Sort files to ensure consistent hash calculation - included_files.sort() - - # Calculate MD5 hash - res = "" - if not included_files: - res = "f" * Settings.CACHE_DIGEST_LEN - print(f"NOTE: empty digest config [{config}] - return dummy digest") + print( + f"calc digest for job [{job_config.name}]: hash_key [{cache_key}] - from cache" + ) + digest = self.digest_cache[cache_key] else: + included_files = Utils.traverse_paths( + job_config.digest_config.include_paths, + job_config.digest_config.exclude_paths, + sorted=True, + ) + print( + f"calc digest for job [{job_config.name}]: hash_key [{cache_key}], include [{len(included_files)}] files" + ) + hash_md5 = hashlib.md5() - for file_path in included_files: - res = self._calc_file_digest(file_path, hash_md5) - assert res - self.digest_cache[cache_key] = res - return res + for i, file_path in enumerate(included_files): + hash_md5 = self._calc_file_digest(file_path, hash_md5) + digest = hash_md5.hexdigest()[: Settings.CACHE_DIGEST_LEN] + self.digest_cache[cache_key] = digest + + if job_config.run_in_docker: + # respect docker digest in the job digest + docker_digest = docker_digests[job_config.run_in_docker.split("+")[0]] + digest = "-".join([docker_digest, digest]) + + return digest def calc_docker_digest( self, @@ -103,10 +103,10 @@ class Digest: print( f"WARNING: No valid file resolved by link {file_path} -> {resolved_path} - skipping digest calculation" ) - return hash_md5.hexdigest()[: Settings.CACHE_DIGEST_LEN] + return hash_md5 with open(resolved_path, "rb") as f: for chunk in iter(lambda: f.read(4096), b""): hash_md5.update(chunk) - return hash_md5.hexdigest()[: Settings.CACHE_DIGEST_LEN] + return hash_md5 diff --git a/ci/praktika/environment.py b/ci/praktika/environment.py deleted file mode 100644 index 8f53aa6230b..00000000000 --- a/ci/praktika/environment.py +++ /dev/null @@ -1,3 +0,0 @@ -from praktika._environment import _Environment - -Environment = _Environment.get() diff --git a/ci/praktika/gh.py b/ci/praktika/gh.py index 77c360a0052..b7e49628ac8 100644 --- a/ci/praktika/gh.py +++ b/ci/praktika/gh.py @@ -18,7 +18,7 @@ class GH: ret_code, out, err = Shell.get_res_stdout_stderr(command, verbose=True) res = ret_code == 0 if not res and "Validation Failed" in err: - print("ERROR: GH command validation error") + print(f"ERROR: GH command validation error.") break if not res and "Bad credentials" in err: print("ERROR: GH credentials/auth failure") diff --git a/ci/praktika/hook_cache.py b/ci/praktika/hook_cache.py index b1b5c654f20..e001e936a71 100644 --- a/ci/praktika/hook_cache.py +++ b/ci/praktika/hook_cache.py @@ -1,6 +1,5 @@ from praktika._environment import _Environment from praktika.cache import Cache -from praktika.mangle import _get_workflows from praktika.runtime import RunConfig from praktika.settings import Settings from praktika.utils import Utils @@ -8,11 +7,10 @@ from praktika.utils import Utils class CacheRunnerHooks: @classmethod - def configure(cls, _workflow): - workflow_config = RunConfig.from_fs(_workflow.name) + def configure(cls, workflow): + workflow_config = RunConfig.from_fs(workflow.name) + docker_digests = workflow_config.digest_dockers cache = Cache() - assert _Environment.get().WORKFLOW_NAME - workflow = _get_workflows(name=_Environment.get().WORKFLOW_NAME)[0] print(f"Workflow Configure, workflow [{workflow.name}]") assert ( workflow.enable_cache @@ -20,11 +18,13 @@ class CacheRunnerHooks: artifact_digest_map = {} job_digest_map = {} for job in workflow.jobs: + digest = cache.digest.calc_job_digest( + job_config=job, docker_digests=docker_digests + ) if not job.digest_config: print( f"NOTE: job [{job.name}] has no Config.digest_config - skip cache check, always run" ) - digest = cache.digest.calc_job_digest(job_config=job) job_digest_map[job.name] = digest if job.provides: # assign the job digest also to the artifacts it provides @@ -50,7 +50,6 @@ class CacheRunnerHooks: ), f"BUG, Workflow with enabled cache must have job digests after configuration, wf [{workflow.name}]" print("Check remote cache") - job_to_cache_record = {} for job_name, job_digest in workflow_config.digest_jobs.items(): record = cache.fetch_success(job_name=job_name, job_digest=job_digest) if record: @@ -60,7 +59,7 @@ class CacheRunnerHooks: ) workflow_config.cache_success.append(job_name) workflow_config.cache_success_base64.append(Utils.to_base64(job_name)) - job_to_cache_record[job_name] = record + workflow_config.cache_jobs[job_name] = record print("Check artifacts to reuse") for job in workflow.jobs: @@ -68,7 +67,7 @@ class CacheRunnerHooks: if job.provides: for artifact_name in job.provides: workflow_config.cache_artifacts[artifact_name] = ( - job_to_cache_record[job.name] + workflow_config.cache_jobs[job.name] ) print(f"Write config to GH's job output") diff --git a/ci/praktika/hook_html.py b/ci/praktika/hook_html.py index f4bd4435511..e2faefb2fa9 100644 --- a/ci/praktika/hook_html.py +++ b/ci/praktika/hook_html.py @@ -1,63 +1,125 @@ import dataclasses import json -import urllib.parse from pathlib import Path from typing import List from praktika._environment import _Environment from praktika.gh import GH from praktika.parser import WorkflowConfigParser -from praktika.result import Result, ResultInfo +from praktika.result import Result, ResultInfo, _ResultS3 from praktika.runtime import RunConfig from praktika.s3 import S3 from praktika.settings import Settings -from praktika.utils import Shell, Utils +from praktika.utils import Utils @dataclasses.dataclass class GitCommit: - date: str - message: str + # date: str + # message: str sha: str @staticmethod - def from_json(json_data: str) -> List["GitCommit"]: + def from_json(file) -> List["GitCommit"]: commits = [] + json_data = None try: - data = json.loads(json_data) - + with open(file, "r", encoding="utf-8") as f: + json_data = json.load(f) commits = [ GitCommit( - message=commit["messageHeadline"], - sha=commit["oid"], - date=commit["committedDate"], + # message=commit["messageHeadline"], + sha=commit["sha"], + # date=commit["committedDate"], ) - for commit in data.get("commits", []) + for commit in json_data ] except Exception as e: print( - f"ERROR: Failed to deserialize commit's data: [{json_data}], ex: [{e}]" + f"ERROR: Failed to deserialize commit's data [{json_data}], ex: [{e}]" ) return commits + @classmethod + def update_s3_data(cls): + env = _Environment.get() + sha = env.SHA + if not sha: + print("WARNING: Failed to retrieve commit sha") + return + commits = cls.pull_from_s3() + for commit in commits: + if sha == commit.sha: + print( + f"INFO: Sha already present in commits data [{sha}] - skip data update" + ) + return + commits.append(GitCommit(sha=sha)) + cls.push_to_s3(commits) + return + + @classmethod + def dump(cls, commits): + commits_ = [] + for commit in commits: + commits_.append(dataclasses.asdict(commit)) + with open(cls.file_name(), "w", encoding="utf8") as f: + json.dump(commits_, f) + + @classmethod + def pull_from_s3(cls): + local_path = Path(cls.file_name()) + file_name = local_path.name + env = _Environment.get() + s3_path = f"{Settings.HTML_S3_PATH}/{cls.get_s3_prefix(pr_number=env.PR_NUMBER, branch=env.BRANCH)}/{file_name}" + if not S3.copy_file_from_s3(s3_path=s3_path, local_path=local_path): + print(f"WARNING: failed to cp file [{s3_path}] from s3") + return [] + return cls.from_json(local_path) + + @classmethod + def push_to_s3(cls, commits): + print(f"INFO: push commits data to s3, commits num [{len(commits)}]") + cls.dump(commits) + local_path = Path(cls.file_name()) + file_name = local_path.name + env = _Environment.get() + s3_path = f"{Settings.HTML_S3_PATH}/{cls.get_s3_prefix(pr_number=env.PR_NUMBER, branch=env.BRANCH)}/{file_name}" + if not S3.copy_file_to_s3(s3_path=s3_path, local_path=local_path, text=True): + print(f"WARNING: failed to cp file [{local_path}] to s3") + + @classmethod + def get_s3_prefix(cls, pr_number, branch): + prefix = "" + assert pr_number or branch + if pr_number and pr_number > 0: + prefix += f"{pr_number}" + else: + prefix += f"{branch}" + return prefix + + @classmethod + def file_name(cls): + return f"{Settings.TEMP_DIR}/commits.json" + + # def _get_pr_commits(pr_number): + # res = [] + # if not pr_number: + # return res + # output = Shell.get_output(f"gh pr view {pr_number} --json commits") + # if output: + # res = GitCommit.from_json(output) + # return res + class HtmlRunnerHooks: @classmethod def configure(cls, _workflow): - - def _get_pr_commits(pr_number): - res = [] - if not pr_number: - return res - output = Shell.get_output(f"gh pr view {pr_number} --json commits") - if output: - res = GitCommit.from_json(output) - return res - # generate pending Results for all jobs in the workflow if _workflow.enable_cache: skip_jobs = RunConfig.from_fs(_workflow.name).cache_success + job_cache_records = RunConfig.from_fs(_workflow.name).cache_jobs else: skip_jobs = [] @@ -67,36 +129,22 @@ class HtmlRunnerHooks: if job.name not in skip_jobs: result = Result.generate_pending(job.name) else: - result = Result.generate_skipped(job.name) + result = Result.generate_skipped(job.name, job_cache_records[job.name]) results.append(result) summary_result = Result.generate_pending(_workflow.name, results=results) - summary_result.aux_links.append(env.CHANGE_URL) - summary_result.aux_links.append(env.RUN_URL) + summary_result.links.append(env.CHANGE_URL) + summary_result.links.append(env.RUN_URL) summary_result.start_time = Utils.timestamp() - page_url = "/".join( - ["https:/", Settings.HTML_S3_PATH, str(Path(Settings.HTML_PAGE_FILE).name)] - ) - for bucket, endpoint in Settings.S3_BUCKET_TO_HTTP_ENDPOINT.items(): - page_url = page_url.replace(bucket, endpoint) - # TODO: add support for non-PRs (use branch?) - page_url += f"?PR={env.PR_NUMBER}&sha=latest&name_0={urllib.parse.quote(env.WORKFLOW_NAME, safe='')}" - summary_result.html_link = page_url - - # clean the previous latest results in PR if any - if env.PR_NUMBER: - S3.clean_latest_result() - S3.copy_result_to_s3( - summary_result, - unlock=False, - ) + assert _ResultS3.copy_result_to_s3_with_version(summary_result, version=0) + page_url = env.get_report_url(settings=Settings) print(f"CI Status page url [{page_url}]") res1 = GH.post_commit_status( name=_workflow.name, status=Result.Status.PENDING, description="", - url=page_url, + url=env.get_report_url(settings=Settings, latest=True), ) res2 = GH.post_pr_comment( comment_body=f"Workflow [[{_workflow.name}]({page_url})], commit [{_Environment.get().SHA[:8]}]", @@ -106,23 +154,15 @@ class HtmlRunnerHooks: Utils.raise_with_error( "Failed to set both GH commit status and PR comment with Workflow Status, cannot proceed" ) - if env.PR_NUMBER: - commits = _get_pr_commits(env.PR_NUMBER) - # TODO: upload commits data to s3 to visualise it on a report page - print(commits) + # TODO: enable for branch, add commit number limiting + GitCommit.update_s3_data() @classmethod def pre_run(cls, _workflow, _job): result = Result.from_fs(_job.name) - S3.copy_result_from_s3( - Result.file_name_static(_workflow.name), - ) - workflow_result = Result.from_fs(_workflow.name) - workflow_result.update_sub_result(result) - S3.copy_result_to_s3( - workflow_result, - unlock=True, + _ResultS3.update_workflow_results( + workflow_name=_workflow.name, new_sub_results=result ) @classmethod @@ -132,14 +172,13 @@ class HtmlRunnerHooks: @classmethod def post_run(cls, _workflow, _job, info_errors): result = Result.from_fs(_job.name) - env = _Environment.get() - S3.copy_result_from_s3( - Result.file_name_static(_workflow.name), - lock=True, - ) - workflow_result = Result.from_fs(_workflow.name) - print(f"Workflow info [{workflow_result.info}], info_errors [{info_errors}]") + _ResultS3.upload_result_files_to_s3(result) + _ResultS3.copy_result_to_s3(result) + env = _Environment.get() + + new_sub_results = [result] + new_result_info = "" env_info = env.REPORT_INFO if env_info: print( @@ -151,14 +190,8 @@ class HtmlRunnerHooks: info_str = f"{_job.name}:\n" info_str += "\n".join(info_errors) print("Update workflow results with new info") - workflow_result.set_info(info_str) + new_result_info = info_str - old_status = workflow_result.status - - S3.upload_result_files_to_s3(result) - workflow_result.update_sub_result(result) - - skipped_job_results = [] if not result.is_ok(): print( "Current job failed - find dependee jobs in the workflow and set their statuses to skipped" @@ -171,7 +204,7 @@ class HtmlRunnerHooks: print( f"NOTE: Set job [{dependee_job.name}] status to [{Result.Status.SKIPPED}] due to current failure" ) - skipped_job_results.append( + new_sub_results.append( Result( name=dependee_job.name, status=Result.Status.SKIPPED, @@ -179,20 +212,18 @@ class HtmlRunnerHooks: + f" [{_job.name}]", ) ) - for skipped_job_result in skipped_job_results: - workflow_result.update_sub_result(skipped_job_result) - S3.copy_result_to_s3( - workflow_result, - unlock=True, + updated_status = _ResultS3.update_workflow_results( + new_info=new_result_info, + new_sub_results=new_sub_results, + workflow_name=_workflow.name, ) - if workflow_result.status != old_status: - print( - f"Update GH commit status [{result.name}]: [{old_status} -> {workflow_result.status}], link [{workflow_result.html_link}]" - ) + + if updated_status: + print(f"Update GH commit status [{result.name}]: [{updated_status}]") GH.post_commit_status( - name=workflow_result.name, - status=GH.convert_to_gh_status(workflow_result.status), + name=_workflow.name, + status=GH.convert_to_gh_status(updated_status), description="", - url=workflow_result.html_link, + url=env.get_report_url(settings=Settings, latest=True), ) diff --git a/ci/praktika/job.py b/ci/praktika/job.py index d0d4232cfa2..595a86456e9 100644 --- a/ci/praktika/job.py +++ b/ci/praktika/job.py @@ -52,30 +52,58 @@ class Job: self, parameter: Optional[List[Any]] = None, runs_on: Optional[List[List[str]]] = None, + provides: Optional[List[List[str]]] = None, + requires: Optional[List[List[str]]] = None, timeout: Optional[List[int]] = None, ): assert ( parameter or runs_on ), "Either :parameter or :runs_on must be non empty list for parametrisation" + if runs_on: + assert isinstance(runs_on, list) and isinstance(runs_on[0], list) if not parameter: parameter = [None] * len(runs_on) if not runs_on: runs_on = [None] * len(parameter) if not timeout: timeout = [None] * len(parameter) + if not provides: + provides = [None] * len(parameter) + if not requires: + requires = [None] * len(parameter) assert ( - len(parameter) == len(runs_on) == len(timeout) - ), "Parametrization lists must be of the same size" + len(parameter) + == len(runs_on) + == len(timeout) + == len(provides) + == len(requires) + ), f"Parametrization lists must be of the same size [{len(parameter)}, {len(runs_on)}, {len(timeout)}, {len(provides)}, {len(requires)}]" res = [] - for parameter_, runs_on_, timeout_ in zip(parameter, runs_on, timeout): + for parameter_, runs_on_, timeout_, provides_, requires_ in zip( + parameter, runs_on, timeout, provides, requires + ): obj = copy.deepcopy(self) + assert ( + not obj.provides + ), "Job.Config.provides must be empty for parametrized jobs" if parameter_: obj.parameter = parameter_ + obj.command = obj.command.format(PARAMETER=parameter_) if runs_on_: obj.runs_on = runs_on_ if timeout_: obj.timeout = timeout_ + if provides_: + assert ( + not obj.provides + ), "Job.Config.provides must be empty for parametrized jobs" + obj.provides = provides_ + if requires_: + assert ( + not obj.requires + ), "Job.Config.requires and parametrize(requires=...) are both set" + obj.requires = requires_ obj.name = obj.get_job_name_with_parameter() res.append(obj) return res @@ -84,13 +112,16 @@ class Job: name, parameter, runs_on = self.name, self.parameter, self.runs_on res = name name_params = [] - if isinstance(parameter, list) or isinstance(parameter, dict): - name_params.append(json.dumps(parameter)) - elif parameter is not None: - name_params.append(parameter) - if runs_on: + if parameter: + if isinstance(parameter, list) or isinstance(parameter, dict): + name_params.append(json.dumps(parameter)) + else: + name_params.append(parameter) + elif runs_on: assert isinstance(runs_on, list) name_params.append(json.dumps(runs_on)) + else: + assert False if name_params: name_params = [str(param) for param in name_params] res += f" ({', '.join(name_params)})" diff --git a/ci/praktika/json.html b/ci/praktika/json.html index 2f8c3e45d0b..b11106719cd 100644 --- a/ci/praktika/json.html +++ b/ci/praktika/json.html @@ -89,15 +89,27 @@ letter-spacing: -0.5px; } + .dropdown-value { + width: 100px; + font-weight: normal; + font-family: inherit; + background-color: transparent; + color: inherit; + /*border: none;*/ + /*outline: none;*/ + /*cursor: pointer;*/ + } + #result-container { background-color: var(--tile-background); margin-left: calc(var(--status-width) + 20px); - padding: 20px; + padding: 0; box-sizing: border-box; text-align: center; font-size: 18px; font-weight: normal; flex-grow: 1; + margin-bottom: 40px; } #footer { @@ -189,10 +201,7 @@ } th.name-column, td.name-column { - max-width: 400px; /* Set the maximum width for the column */ - white-space: nowrap; /* Prevent text from wrapping */ - overflow: hidden; /* Hide the overflowed text */ - text-overflow: ellipsis; /* Show ellipsis (...) for overflowed text */ + min-width: 350px; } th.status-column, td.status-column { @@ -282,6 +291,12 @@ } } + function updateUrlParameter(paramName, paramValue) { + const url = new URL(window.location.href); + url.searchParams.set(paramName, paramValue); + window.location.href = url.toString(); + } + // Attach the toggle function to the click event of the icon document.getElementById('theme-toggle').addEventListener('click', toggleTheme); @@ -291,14 +306,14 @@ const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; const month = monthNames[date.getMonth()]; - const year = date.getFullYear(); + //const year = date.getFullYear(); const hours = String(date.getHours()).padStart(2, '0'); const minutes = String(date.getMinutes()).padStart(2, '0'); const seconds = String(date.getSeconds()).padStart(2, '0'); //const milliseconds = String(date.getMilliseconds()).padStart(2, '0'); return showDate - ? `${day}-${month}-${year} ${hours}:${minutes}:${seconds}` + ? `${day}'${month} ${hours}:${minutes}:${seconds}` : `${hours}:${minutes}:${seconds}`; } @@ -328,7 +343,7 @@ const milliseconds = Math.floor((duration % 1) * 1000); const formattedSeconds = String(seconds); - const formattedMilliseconds = String(milliseconds).padStart(3, '0'); + const formattedMilliseconds = String(milliseconds).padStart(2, '0').slice(-2); return `${formattedSeconds}.${formattedMilliseconds}`; } @@ -346,8 +361,7 @@ return 'status-other'; } - function addKeyValueToStatus(key, value) { - + function addKeyValueToStatus(key, value, options = null) { const statusContainer = document.getElementById('status-container'); let keyValuePair = document.createElement('div'); @@ -357,12 +371,40 @@ keyElement.className = 'json-key'; keyElement.textContent = key + ':'; - const valueElement = document.createElement('div'); - valueElement.className = 'json-value'; - valueElement.textContent = value; + let valueElement; - keyValuePair.appendChild(keyElement) - keyValuePair.appendChild(valueElement) + if (options) { + // Create dropdown if options are provided + valueElement = document.createElement('select'); + valueElement.className = 'dropdown-value'; + + options.forEach(optionValue => { + const option = document.createElement('option'); + option.value = optionValue; + option.textContent = optionValue.slice(0, 10); + + // Set the initially selected option + if (optionValue === value) { + option.selected = true; + } + + valueElement.appendChild(option); + }); + + // Update the URL parameter when the selected value changes + valueElement.addEventListener('change', (event) => { + const selectedValue = event.target.value; + updateUrlParameter(key, selectedValue); + }); + } else { + // Create a simple text display if no options are provided + valueElement = document.createElement('div'); + valueElement.className = 'json-value'; + valueElement.textContent = value || 'N/A'; // Display 'N/A' if value is null + } + + keyValuePair.appendChild(keyElement); + keyValuePair.appendChild(valueElement); statusContainer.appendChild(keyValuePair); } @@ -486,12 +528,12 @@ const columns = ['name', 'status', 'start_time', 'duration', 'info']; const columnSymbols = { - name: '📂', - status: '✔ï¸', + name: '🗂ï¸', + status: '🧾', start_time: '🕒', duration: 'â³', - info: 'ℹï¸', - files: '📄' + info: 'ðŸ“', + files: '📎' }; function createResultsTable(results, nest_level) { @@ -500,16 +542,14 @@ const thead = document.createElement('thead'); const tbody = document.createElement('tbody'); - // Get the current URL parameters - const currentUrl = new URL(window.location.href); - // Create table headers based on the fixed columns const headerRow = document.createElement('tr'); columns.forEach(column => { const th = document.createElement('th'); - th.textContent = th.textContent = columnSymbols[column] || column; + th.textContent = columnSymbols[column] || column; th.style.cursor = 'pointer'; // Make headers clickable - th.addEventListener('click', () => sortTable(results, column, tbody, nest_level)); // Add click event to sort the table + th.setAttribute('data-sort-direction', 'asc'); // Default sort direction + th.addEventListener('click', () => sortTable(results, column, columnSymbols[column] || column, tbody, nest_level, columns)); // Add click event to sort the table headerRow.appendChild(th); }); thead.appendChild(headerRow); @@ -561,8 +601,7 @@ td.classList.add('time-column'); td.textContent = value ? formatDuration(value) : ''; } else if (column === 'info') { - // For info and other columns, just display the value - td.textContent = value || ''; + td.textContent = value.includes('\n') ? '↵' : (value || ''); td.classList.add('info-column'); } @@ -573,39 +612,33 @@ }); } - function sortTable(results, key, tbody, nest_level) { + function sortTable(results, column, key, tbody, nest_level, columns) { // Find the table header element for the given key - let th = null; - const tableHeaders = document.querySelectorAll('th'); // Select all table headers - tableHeaders.forEach(header => { - if (header.textContent.trim().toLowerCase() === key.toLowerCase()) { - th = header; - } - }); + const tableHeaders = document.querySelectorAll('th'); + let th = Array.from(tableHeaders).find(header => header.textContent === key); if (!th) { console.error(`No table header found for key: ${key}`); return; } - // Determine the current sort direction - let ascending = th.getAttribute('data-sort-direction') === 'asc' ? false : true; + const ascending = th.getAttribute('data-sort-direction') === 'asc'; + th.setAttribute('data-sort-direction', ascending ? 'desc' : 'asc'); - // Toggle the sort direction for the next click - th.setAttribute('data-sort-direction', ascending ? 'asc' : 'desc'); - - // Sort the results array by the given key results.sort((a, b) => { - if (a[key] < b[key]) return ascending ? -1 : 1; - if (a[key] > b[key]) return ascending ? 1 : -1; + if (a[column] < b[column]) return ascending ? -1 : 1; + if (a[column] > b[column]) return ascending ? 1 : -1; return 0; }); + // Clear the existing rows in tbody + tbody.innerHTML = ''; + // Re-populate the table with sorted data populateTableRows(tbody, results, columns, nest_level); } - function loadJSON(PR, sha, nameParams) { + function loadResultsJSON(PR, sha, nameParams) { const infoElement = document.getElementById('info-container'); let lastModifiedTime = null; const task = nameParams[0].toLowerCase(); @@ -630,19 +663,20 @@ let targetData = navigatePath(data, nameParams); let nest_level = nameParams.length; - if (targetData) { - infoElement.style.display = 'none'; + // Add footer links from top-level Result + if (Array.isArray(data.links) && data.links.length > 0) { + data.links.forEach(link => { + const a = document.createElement('a'); + a.href = link; + a.textContent = link.split('/').pop(); + a.target = '_blank'; + footerRight.appendChild(a); + }); + } - // Handle footer links if present - if (Array.isArray(data.aux_links) && data.aux_links.length > 0) { - data.aux_links.forEach(link => { - const a = document.createElement('a'); - a.href = link; - a.textContent = link.split('/').pop(); - a.target = '_blank'; - footerRight.appendChild(a); - }); - } + if (targetData) { + //infoElement.style.display = 'none'; + infoElement.innerHTML = (targetData.info || '').replace(/\n/g, '
'); addStatusToStatus(targetData.status, targetData.start_time, targetData.duration) @@ -721,22 +755,62 @@ } }); - if (PR) { - addKeyValueToStatus("PR", PR) - } else { - console.error("TODO") - } - addKeyValueToStatus("sha", sha); - if (nameParams[1]) { - addKeyValueToStatus("job", nameParams[1]); - } - addKeyValueToStatus("workflow", nameParams[0]); + let path_commits_json = ''; + let commitsArray = []; - if (PR && sha && root_name) { - loadJSON(PR, sha, nameParams); + if (PR) { + addKeyValueToStatus("PR", PR); + const baseUrl = window.location.origin + window.location.pathname.replace('/json.html', ''); + path_commits_json = `${baseUrl}/${encodeURIComponent(PR)}/commits.json`; } else { - document.getElementById('title').textContent = 'Error: Missing required URL parameters: PR, sha, or name_0'; + // Placeholder for a different path when PR is missing + console.error("PR parameter is missing. Setting alternate commits path."); + path_commits_json = '/path/to/alternative/commits.json'; } + + function loadCommitsArray(path) { + return fetch(path, { cache: "no-cache" }) + .then(response => { + if (!response.ok) { + console.error(`HTTP error! status: ${response.status}`) + return []; + } + return response.json(); + }) + .then(data => { + if (Array.isArray(data) && data.every(item => typeof item === 'object' && item.hasOwnProperty('sha'))) { + return data.map(item => item.sha); + } else { + throw new Error('Invalid data format: expected array of objects with a "sha" key'); + } + }) + .catch(error => { + console.error('Error loading commits JSON:', error); + return []; // Return an empty array if an error occurs + }); + } + + loadCommitsArray(path_commits_json) + .then(data => { + commitsArray = data; + }) + .finally(() => { + // Proceed with the rest of the initialization + addKeyValueToStatus("sha", sha || "latest", commitsArray.concat(["latest"])); + + if (nameParams[1]) { + addKeyValueToStatus("job", nameParams[1]); + } + addKeyValueToStatus("workflow", nameParams[0]); + + // Check if all required parameters are present to load JSON + if (PR && sha && root_name) { + const shaToLoad = (sha === 'latest') ? commitsArray[commitsArray.length - 1] : sha; + loadResultsJSON(PR, shaToLoad, nameParams); + } else { + document.getElementById('title').textContent = 'Error: Missing required URL parameters: PR, sha, or name_0'; + } + }); } window.onload = init; diff --git a/ci/praktika/mangle.py b/ci/praktika/mangle.py index 89fc52cf849..f94b11adad5 100644 --- a/ci/praktika/mangle.py +++ b/ci/praktika/mangle.py @@ -1,11 +1,10 @@ import copy import importlib.util from pathlib import Path -from typing import Any, Dict from praktika import Job -from praktika._settings import _USER_DEFINED_SETTINGS, _Settings -from praktika.utils import ContextManager, Utils +from praktika.settings import Settings +from praktika.utils import Utils def _get_workflows(name=None, file=None): @@ -14,35 +13,34 @@ def _get_workflows(name=None, file=None): """ res = [] - with ContextManager.cd(): - directory = Path(_Settings.WORKFLOWS_DIRECTORY) - for py_file in directory.glob("*.py"): - if file and file not in str(py_file): - continue - module_name = py_file.name.removeprefix(".py") - spec = importlib.util.spec_from_file_location( - module_name, f"{_Settings.WORKFLOWS_DIRECTORY}/{module_name}" - ) - assert spec - foo = importlib.util.module_from_spec(spec) - assert spec.loader - spec.loader.exec_module(foo) - try: - for workflow in foo.WORKFLOWS: - if name: - if name == workflow.name: - print(f"Read workflow [{name}] config from [{module_name}]") - res = [workflow] - break - else: - continue + directory = Path(Settings.WORKFLOWS_DIRECTORY) + for py_file in directory.glob("*.py"): + if file and file not in str(py_file): + continue + module_name = py_file.name.removeprefix(".py") + spec = importlib.util.spec_from_file_location( + module_name, f"{Settings.WORKFLOWS_DIRECTORY}/{module_name}" + ) + assert spec + foo = importlib.util.module_from_spec(spec) + assert spec.loader + spec.loader.exec_module(foo) + try: + for workflow in foo.WORKFLOWS: + if name: + if name == workflow.name: + print(f"Read workflow [{name}] config from [{module_name}]") + res = [workflow] + break else: - res += foo.WORKFLOWS - print(f"Read workflow configs from [{module_name}]") - except Exception as e: - print( - f"WARNING: Failed to add WORKFLOWS config from [{module_name}], exception [{e}]" - ) + continue + else: + res += foo.WORKFLOWS + print(f"Read workflow configs from [{module_name}]") + except Exception as e: + print( + f"WARNING: Failed to add WORKFLOWS config from [{module_name}], exception [{e}]" + ) if not res: Utils.raise_with_error(f"Failed to find workflow [{name or file}]") @@ -58,7 +56,6 @@ def _update_workflow_artifacts(workflow): artifact_job = {} for job in workflow.jobs: for artifact_name in job.provides: - assert artifact_name not in artifact_job artifact_job[artifact_name] = job.name for artifact in workflow.artifacts: artifact._provided_by = artifact_job[artifact.name] @@ -108,30 +105,3 @@ def _update_workflow_with_native_jobs(workflow): for job in workflow.jobs: aux_job.requires.append(job.name) workflow.jobs.append(aux_job) - - -def _get_user_settings() -> Dict[str, Any]: - """ - Gets user's settings - """ - res = {} # type: Dict[str, Any] - - directory = Path(_Settings.SETTINGS_DIRECTORY) - for py_file in directory.glob("*.py"): - module_name = py_file.name.removeprefix(".py") - spec = importlib.util.spec_from_file_location( - module_name, f"{_Settings.SETTINGS_DIRECTORY}/{module_name}" - ) - assert spec - foo = importlib.util.module_from_spec(spec) - assert spec.loader - spec.loader.exec_module(foo) - for setting in _USER_DEFINED_SETTINGS: - try: - value = getattr(foo, setting) - res[setting] = value - print(f"Apply user defined setting [{setting} = {value}]") - except Exception as e: - pass - - return res diff --git a/ci/praktika/native_jobs.py b/ci/praktika/native_jobs.py index f7fd4ca190b..cff6c851d0e 100644 --- a/ci/praktika/native_jobs.py +++ b/ci/praktika/native_jobs.py @@ -10,9 +10,8 @@ from praktika.gh import GH from praktika.hook_cache import CacheRunnerHooks from praktika.hook_html import HtmlRunnerHooks from praktika.mangle import _get_workflows -from praktika.result import Result, ResultInfo +from praktika.result import Result, ResultInfo, _ResultS3 from praktika.runtime import RunConfig -from praktika.s3 import S3 from praktika.settings import Settings from praktika.utils import Shell, Utils @@ -151,7 +150,7 @@ def _config_workflow(workflow: Workflow.Config, job_name): status = Result.Status.ERROR print("ERROR: ", info) else: - Shell.check(f"{Settings.PYTHON_INTERPRETER} -m praktika --generate") + assert Shell.check(f"{Settings.PYTHON_INTERPRETER} -m praktika yaml") exit_code, output, err = Shell.get_res_stdout_stderr( f"git diff-index HEAD -- {Settings.WORKFLOW_PATH_PREFIX}" ) @@ -225,6 +224,7 @@ def _config_workflow(workflow: Workflow.Config, job_name): cache_success=[], cache_success_base64=[], cache_artifacts={}, + cache_jobs={}, ).dump() # checks: @@ -250,6 +250,9 @@ def _config_workflow(workflow: Workflow.Config, job_name): info_lines.append(job_name + ": " + info) results.append(result_) + if workflow.enable_merge_commit: + assert False, "NOT implemented" + # config: if workflow.dockers: print("Calculate docker's digests") @@ -307,9 +310,8 @@ def _finish_workflow(workflow, job_name): print(env.get_needs_statuses()) print("Check Workflow results") - S3.copy_result_from_s3( + _ResultS3.copy_result_from_s3( Result.file_name_static(workflow.name), - lock=False, ) workflow_result = Result.from_fs(workflow.name) @@ -339,10 +341,12 @@ def _finish_workflow(workflow, job_name): f"NOTE: Result for [{result.name}] has not ok status [{result.status}]" ) ready_for_merge_status = Result.Status.FAILED - failed_results.append(result.name.split("(", maxsplit=1)[0]) # cut name + failed_results.append(result.name) if failed_results: - ready_for_merge_description = f"failed: {', '.join(failed_results)}" + ready_for_merge_description = ( + f'Failed {len(failed_results)} "Required for Merge" jobs' + ) if not GH.post_commit_status( name=Settings.READY_FOR_MERGE_STATUS_NAME + f" [{workflow.name}]", @@ -354,14 +358,11 @@ def _finish_workflow(workflow, job_name): env.add_info(ResultInfo.GH_STATUS_ERROR) if update_final_report: - S3.copy_result_to_s3( + _ResultS3.copy_result_to_s3( workflow_result, - unlock=False, - ) # no lock - no unlock + ) - Result.from_fs(job_name).set_status(Result.Status.SUCCESS).set_info( - ready_for_merge_description - ) + Result.from_fs(job_name).set_status(Result.Status.SUCCESS) if __name__ == "__main__": diff --git a/ci/praktika/result.py b/ci/praktika/result.py index 3d3c986d5f9..8164b1d1295 100644 --- a/ci/praktika/result.py +++ b/ci/praktika/result.py @@ -1,12 +1,13 @@ import dataclasses import datetime import sys -from collections.abc import Container from pathlib import Path -from typing import Any, Dict, List, Optional +from typing import Any, Dict, List, Optional, Union from praktika._environment import _Environment -from praktika._settings import _Settings +from praktika.cache import Cache +from praktika.s3 import S3 +from praktika.settings import Settings from praktika.utils import ContextManager, MetaClasses, Shell, Utils @@ -27,10 +28,6 @@ class Result(MetaClasses.Serializable): files (List[str]): A list of file paths or names related to the result. links (List[str]): A list of URLs related to the result (e.g., links to reports or resources). info (str): Additional information about the result. Free-form text. - # TODO: rename - aux_links (List[str]): A list of auxiliary links that provide additional context for the result. - # TODO: remove - html_link (str): A direct link to an HTML representation of the result (e.g., a detailed report page). Inner Class: Status: Defines possible statuses for the task, such as "success", "failure", etc. @@ -52,8 +49,6 @@ class Result(MetaClasses.Serializable): files: List[str] = dataclasses.field(default_factory=list) links: List[str] = dataclasses.field(default_factory=list) info: str = "" - aux_links: List[str] = dataclasses.field(default_factory=list) - html_link: str = "" @staticmethod def create_from( @@ -62,14 +57,15 @@ class Result(MetaClasses.Serializable): stopwatch: Utils.Stopwatch = None, status="", files=None, - info="", + info: Union[List[str], str] = "", with_info_from_results=True, ): if isinstance(status, bool): status = Result.Status.SUCCESS if status else Result.Status.FAILED if not results and not status: - print("ERROR: Either .results or .status must be provided") - raise + Utils.raise_with_error( + f"Either .results ({results}) or .status ({status}) must be provided" + ) if not name: name = _Environment.get().JOB_NAME if not name: @@ -78,10 +74,10 @@ class Result(MetaClasses.Serializable): result_status = status or Result.Status.SUCCESS infos = [] if info: - if isinstance(info, Container): - infos += info + if isinstance(info, str): + infos += [info] else: - infos.append(info) + infos += info if results and not status: for result in results: if result.status not in (Result.Status.SUCCESS, Result.Status.FAILED): @@ -112,7 +108,7 @@ class Result(MetaClasses.Serializable): return self.status not in (Result.Status.PENDING, Result.Status.RUNNING) def is_running(self): - return self.status not in (Result.Status.RUNNING,) + return self.status in (Result.Status.RUNNING,) def is_ok(self): return self.status in (Result.Status.SKIPPED, Result.Status.SUCCESS) @@ -155,7 +151,7 @@ class Result(MetaClasses.Serializable): @classmethod def file_name_static(cls, name): - return f"{_Settings.TEMP_DIR}/result_{Utils.normalize_string(name)}.json" + return f"{Settings.TEMP_DIR}/result_{Utils.normalize_string(name)}.json" @classmethod def from_dict(cls, obj: Dict[str, Any]) -> "Result": @@ -180,6 +176,11 @@ class Result(MetaClasses.Serializable): ) return self + def set_timing(self, stopwatch: Utils.Stopwatch): + self.start_time = stopwatch.start_time + self.duration = stopwatch.duration + return self + def update_sub_result(self, result: "Result"): assert self.results, "BUG?" for i, result_ in enumerate(self.results): @@ -233,7 +234,7 @@ class Result(MetaClasses.Serializable): ) @classmethod - def generate_skipped(cls, name, results=None): + def generate_skipped(cls, name, cache_record: Cache.CacheRecord, results=None): return Result( name=name, status=Result.Status.SKIPPED, @@ -242,7 +243,7 @@ class Result(MetaClasses.Serializable): results=results or [], files=[], links=[], - info="from cache", + info=f"from cache: sha [{cache_record.sha}], pr/branch [{cache_record.pr_number or cache_record.branch}]", ) @classmethod @@ -276,7 +277,7 @@ class Result(MetaClasses.Serializable): # Set log file path if logging is enabled log_file = ( - f"{_Settings.TEMP_DIR}/{Utils.normalize_string(name)}.log" + f"{Settings.TEMP_DIR}/{Utils.normalize_string(name)}.log" if with_log else None ) @@ -318,18 +319,35 @@ class Result(MetaClasses.Serializable): files=[log_file] if log_file else None, ) - def finish_job_accordingly(self): + def complete_job(self): self.dump() if not self.is_ok(): print("ERROR: Job Failed") - for result in self.results: - if not result.is_ok(): - print("Failed checks:") - print(" | ", result) + print(self.to_stdout_formatted()) sys.exit(1) else: print("ok") + def to_stdout_formatted(self, indent="", res=""): + if self.is_ok(): + return res + + res += f"{indent}Task [{self.name}] failed.\n" + fail_info = "" + sub_indent = indent + " " + + if not self.results: + if not self.is_ok(): + fail_info += f"{sub_indent}{self.name}:\n" + for line in self.info.splitlines(): + fail_info += f"{sub_indent}{sub_indent}{line}\n" + return res + fail_info + + for sub_result in self.results: + res = sub_result.to_stdout_formatted(sub_indent, res) + + return res + class ResultInfo: SETUP_ENV_JOB_FAILED = ( @@ -352,3 +370,202 @@ class ResultInfo: ) S3_ERROR = "S3 call failure" + + +class _ResultS3: + + @classmethod + def copy_result_to_s3(cls, result, unlock=False): + result.dump() + env = _Environment.get() + s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}" + s3_path_full = f"{s3_path}/{Path(result.file_name()).name}" + url = S3.copy_file_to_s3(s3_path=s3_path, local_path=result.file_name()) + # if unlock: + # if not cls.unlock(s3_path_full): + # print(f"ERROR: File [{s3_path_full}] unlock failure") + # assert False # TODO: investigate + return url + + @classmethod + def copy_result_from_s3(cls, local_path, lock=False): + env = _Environment.get() + file_name = Path(local_path).name + s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}/{file_name}" + # if lock: + # cls.lock(s3_path) + if not S3.copy_file_from_s3(s3_path=s3_path, local_path=local_path): + print(f"ERROR: failed to cp file [{s3_path}] from s3") + raise + + @classmethod + def copy_result_from_s3_with_version(cls, local_path): + env = _Environment.get() + file_name = Path(local_path).name + local_dir = Path(local_path).parent + file_name_pattern = f"{file_name}_*" + for file_path in local_dir.glob(file_name_pattern): + file_path.unlink() + s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}/" + if not S3.copy_file_from_s3_matching_pattern( + s3_path=s3_path, local_path=local_dir, include=file_name_pattern + ): + print(f"ERROR: failed to cp file [{s3_path}] from s3") + raise + result_files = [] + for file_path in local_dir.glob(file_name_pattern): + result_files.append(file_path) + assert result_files, "No result files found" + result_files.sort() + version = int(result_files[-1].name.split("_")[-1]) + Shell.check(f"cp {result_files[-1]} {local_path}", strict=True, verbose=True) + return version + + @classmethod + def copy_result_to_s3_with_version(cls, result, version): + result.dump() + filename = Path(result.file_name()).name + file_name_versioned = f"{filename}_{str(version).zfill(3)}" + env = _Environment.get() + s3_path_versioned = ( + f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}/{file_name_versioned}" + ) + s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}/" + if version == 0: + S3.clean_s3_directory(s3_path=s3_path) + if not S3.put( + s3_path=s3_path_versioned, + local_path=result.file_name(), + if_none_matched=True, + ): + print("Failed to put versioned Result") + return False + if not S3.put(s3_path=s3_path, local_path=result.file_name()): + print("Failed to put non-versioned Result") + return True + + # @classmethod + # def lock(cls, s3_path, level=0): + # env = _Environment.get() + # s3_path_lock = s3_path + f".lock" + # file_path_lock = f"{Settings.TEMP_DIR}/{Path(s3_path_lock).name}" + # assert Shell.check( + # f"echo '''{env.JOB_NAME}''' > {file_path_lock}", verbose=True + # ), "Never" + # + # i = 20 + # meta = S3.head_object(s3_path_lock) + # while meta: + # locked_by_job = meta.get("Metadata", {"job": ""}).get("job", "") + # if locked_by_job: + # decoded_bytes = base64.b64decode(locked_by_job) + # locked_by_job = decoded_bytes.decode("utf-8") + # print( + # f"WARNING: Failed to acquire lock, meta [{meta}], job [{locked_by_job}] - wait" + # ) + # i -= 5 + # if i < 0: + # info = f"ERROR: lock acquire failure - unlock forcefully" + # print(info) + # env.add_info(info) + # break + # time.sleep(5) + # + # metadata = {"job": Utils.to_base64(env.JOB_NAME)} + # S3.put( + # s3_path=s3_path_lock, + # local_path=file_path_lock, + # metadata=metadata, + # if_none_matched=True, + # ) + # time.sleep(1) + # obj = S3.head_object(s3_path_lock) + # if not obj or not obj.has_tags(tags=metadata): + # print(f"WARNING: locked by another job [{obj}]") + # env.add_info("S3 lock file failure") + # cls.lock(s3_path, level=level + 1) + # print("INFO: lock acquired") + # + # @classmethod + # def unlock(cls, s3_path): + # s3_path_lock = s3_path + ".lock" + # env = _Environment.get() + # obj = S3.head_object(s3_path_lock) + # if not obj: + # print("ERROR: lock file is removed") + # assert False # investigate + # elif not obj.has_tags({"job": Utils.to_base64(env.JOB_NAME)}): + # print("ERROR: lock file was acquired by another job") + # assert False # investigate + # + # if not S3.delete(s3_path_lock): + # print(f"ERROR: File [{s3_path_lock}] delete failure") + # print("INFO: lock released") + # return True + + @classmethod + def upload_result_files_to_s3(cls, result): + if result.results: + for result_ in result.results: + cls.upload_result_files_to_s3(result_) + for file in result.files: + if not Path(file).is_file(): + print(f"ERROR: Invalid file [{file}] in [{result.name}] - skip upload") + result.info += f"\nWARNING: Result file [{file}] was not found" + file_link = S3._upload_file_to_s3(file, upload_to_s3=False) + else: + is_text = False + for text_file_suffix in Settings.TEXT_CONTENT_EXTENSIONS: + if file.endswith(text_file_suffix): + print( + f"File [{file}] matches Settings.TEXT_CONTENT_EXTENSIONS [{Settings.TEXT_CONTENT_EXTENSIONS}] - add text attribute for s3 object" + ) + is_text = True + break + file_link = S3._upload_file_to_s3( + file, + upload_to_s3=True, + text=is_text, + s3_subprefix=Utils.normalize_string(result.name), + ) + result.links.append(file_link) + if result.files: + print( + f"Result files [{result.files}] uploaded to s3 [{result.links[-len(result.files):]}] - clean files list" + ) + result.files = [] + result.dump() + + @classmethod + def update_workflow_results(cls, workflow_name, new_info="", new_sub_results=None): + assert new_info or new_sub_results + + attempt = 1 + prev_status = "" + new_status = "" + done = False + while attempt < 10: + version = cls.copy_result_from_s3_with_version( + Result.file_name_static(workflow_name) + ) + workflow_result = Result.from_fs(workflow_name) + prev_status = workflow_result.status + if new_info: + workflow_result.set_info(new_info) + if new_sub_results: + if isinstance(new_sub_results, Result): + new_sub_results = [new_sub_results] + for result_ in new_sub_results: + workflow_result.update_sub_result(result_) + new_status = workflow_result.status + if cls.copy_result_to_s3_with_version(workflow_result, version=version + 1): + done = True + break + print(f"Attempt [{attempt}] to upload workflow result failed") + attempt += 1 + assert done + + if prev_status != new_status: + return new_status + else: + return None diff --git a/ci/praktika/runner.py b/ci/praktika/runner.py index 797a799a74d..38112dd5684 100644 --- a/ci/praktika/runner.py +++ b/ci/praktika/runner.py @@ -19,7 +19,7 @@ from praktika.utils import Shell, TeePopen, Utils class Runner: @staticmethod - def generate_dummy_environment(workflow, job): + def generate_local_run_environment(workflow, job, pr=None, branch=None, sha=None): print("WARNING: Generate dummy env for local test") Shell.check( f"mkdir -p {Settings.TEMP_DIR} {Settings.INPUT_DIR} {Settings.OUTPUT_DIR}" @@ -28,9 +28,9 @@ class Runner: WORKFLOW_NAME=workflow.name, JOB_NAME=job.name, REPOSITORY="", - BRANCH="", - SHA="", - PR_NUMBER=-1, + BRANCH=branch or Settings.MAIN_BRANCH if not pr else "", + SHA=sha or Shell.get_output("git rev-parse HEAD"), + PR_NUMBER=pr or -1, EVENT_TYPE="", JOB_OUTPUT_STREAM="", EVENT_FILE_PATH="", @@ -52,6 +52,7 @@ class Runner: cache_success=[], cache_success_base64=[], cache_artifacts={}, + cache_jobs={}, ) for docker in workflow.dockers: workflow_config.digest_dockers[docker.name] = Digest().calc_docker_digest( @@ -80,13 +81,12 @@ class Runner: print("Read GH Environment") env = _Environment.from_env() env.JOB_NAME = job.name - env.PARAMETER = job.parameter env.dump() print(env) return 0 - def _pre_run(self, workflow, job): + def _pre_run(self, workflow, job, local_run=False): env = _Environment.get() result = Result( @@ -96,9 +96,10 @@ class Runner: ) result.dump() - if workflow.enable_report and job.name != Settings.CI_CONFIG_JOB_NAME: - print("Update Job and Workflow Report") - HtmlRunnerHooks.pre_run(workflow, job) + if not local_run: + if workflow.enable_report and job.name != Settings.CI_CONFIG_JOB_NAME: + print("Update Job and Workflow Report") + HtmlRunnerHooks.pre_run(workflow, job) print("Download required artifacts") required_artifacts = [] @@ -123,28 +124,48 @@ class Runner: return 0 - def _run(self, workflow, job, docker="", no_docker=False, param=None): + def _run(self, workflow, job, docker="", no_docker=False, param=None, test=""): + # re-set envs for local run + env = _Environment.get() + env.JOB_NAME = job.name + env.dump() + if param: if not isinstance(param, str): Utils.raise_with_error( f"Custom param for local tests must be of type str, got [{type(param)}]" ) - env = _Environment.get() - env.dump() if job.run_in_docker and not no_docker: - # TODO: add support for any image, including not from ci config (e.g. ubuntu:latest) - docker_tag = RunConfig.from_fs(workflow.name).digest_dockers[ - job.run_in_docker - ] - docker = docker or f"{job.run_in_docker}:{docker_tag}" - cmd = f"docker run --rm --user \"$(id -u):$(id -g)\" -e PYTHONPATH='{Settings.DOCKER_WD}:{Settings.DOCKER_WD}/ci' --volume ./:{Settings.DOCKER_WD} --volume {Settings.TEMP_DIR}:{Settings.TEMP_DIR} --workdir={Settings.DOCKER_WD} {docker} {job.command}" + job.run_in_docker, docker_settings = ( + job.run_in_docker.split("+")[0], + job.run_in_docker.split("+")[1:], + ) + from_root = "root" in docker_settings + settings = [s for s in docker_settings if s.startswith("--")] + if ":" in job.run_in_docker: + docker_name, docker_tag = job.run_in_docker.split(":") + print( + f"WARNING: Job [{job.name}] use custom docker image with a tag - praktika won't control docker version" + ) + else: + docker_name, docker_tag = ( + job.run_in_docker, + RunConfig.from_fs(workflow.name).digest_dockers[job.run_in_docker], + ) + docker = docker or f"{docker_name}:{docker_tag}" + cmd = f"docker run --rm --name praktika {'--user $(id -u):$(id -g)' if not from_root else ''} -e PYTHONPATH='{Settings.DOCKER_WD}:{Settings.DOCKER_WD}/ci' --volume ./:{Settings.DOCKER_WD} --volume {Settings.TEMP_DIR}:{Settings.TEMP_DIR} --workdir={Settings.DOCKER_WD} {' '.join(settings)} {docker} {job.command}" else: cmd = job.command + python_path = os.getenv("PYTHONPATH", ":") + os.environ["PYTHONPATH"] = f".:{python_path}" if param: print(f"Custom --param [{param}] will be passed to job's script") cmd += f" --param {param}" + if test: + print(f"Custom --test [{test}] will be passed to job's script") + cmd += f" --test {test}" print(f"--- Run command [{cmd}]") with TeePopen(cmd, timeout=job.timeout) as process: @@ -219,13 +240,10 @@ class Runner: print(info) result.set_info(info).set_status(Result.Status.ERROR).dump() - result.set_files(files=[Settings.RUN_LOG]) + if not result.is_ok(): + result.set_files(files=[Settings.RUN_LOG]) result.update_duration().dump() - if result.info and result.status != Result.Status.SUCCESS: - # provide job info to workflow level - info_errors.append(result.info) - if run_exit_code == 0: providing_artifacts = [] if job.provides and workflow.artifacts: @@ -285,14 +303,24 @@ class Runner: return True def run( - self, workflow, job, docker="", dummy_env=False, no_docker=False, param=None + self, + workflow, + job, + docker="", + local_run=False, + no_docker=False, + param=None, + test="", + pr=None, + sha=None, + branch=None, ): res = True setup_env_code = -10 prerun_code = -10 run_code = -10 - if res and not dummy_env: + if res and not local_run: print( f"\n\n=== Setup env script [{job.name}], workflow [{workflow.name}] ===" ) @@ -309,13 +337,15 @@ class Runner: traceback.print_exc() print(f"=== Setup env finished ===\n\n") else: - self.generate_dummy_environment(workflow, job) + self.generate_local_run_environment( + workflow, job, pr=pr, branch=branch, sha=sha + ) - if res and not dummy_env: + if res and (not local_run or pr or sha or branch): res = False print(f"=== Pre run script [{job.name}], workflow [{workflow.name}] ===") try: - prerun_code = self._pre_run(workflow, job) + prerun_code = self._pre_run(workflow, job, local_run=local_run) res = prerun_code == 0 if not res: print(f"ERROR: Pre-run failed with exit code [{prerun_code}]") @@ -329,7 +359,12 @@ class Runner: print(f"=== Run script [{job.name}], workflow [{workflow.name}] ===") try: run_code = self._run( - workflow, job, docker=docker, no_docker=no_docker, param=param + workflow, + job, + docker=docker, + no_docker=no_docker, + param=param, + test=test, ) res = run_code == 0 if not res: @@ -339,7 +374,7 @@ class Runner: traceback.print_exc() print(f"=== Run scrip finished ===\n\n") - if not dummy_env: + if not local_run: print(f"=== Post run script [{job.name}], workflow [{workflow.name}] ===") self._post_run(workflow, job, setup_env_code, prerun_code, run_code) print(f"=== Post run scrip finished ===") diff --git a/ci/praktika/runtime.py b/ci/praktika/runtime.py index a87b67c2c79..07c24e0498c 100644 --- a/ci/praktika/runtime.py +++ b/ci/praktika/runtime.py @@ -15,17 +15,23 @@ class RunConfig(MetaClasses.Serializable): # there are might be issue with special characters in job names if used directly in yaml syntax - create base64 encoded list to avoid this cache_success_base64: List[str] cache_artifacts: Dict[str, Cache.CacheRecord] + cache_jobs: Dict[str, Cache.CacheRecord] sha: str @classmethod def from_dict(cls, obj): cache_artifacts = obj["cache_artifacts"] + cache_jobs = obj["cache_jobs"] cache_artifacts_deserialized = {} + cache_jobs_deserialized = {} for artifact_name, cache_artifact in cache_artifacts.items(): cache_artifacts_deserialized[artifact_name] = Cache.CacheRecord.from_dict( cache_artifact ) obj["cache_artifacts"] = cache_artifacts_deserialized + for job_name, cache_jobs in cache_jobs.items(): + cache_jobs_deserialized[job_name] = Cache.CacheRecord.from_dict(cache_jobs) + obj["cache_jobs"] = cache_artifacts_deserialized return RunConfig(**obj) @classmethod diff --git a/ci/praktika/s3.py b/ci/praktika/s3.py index 8cfb70a9076..82034b57b80 100644 --- a/ci/praktika/s3.py +++ b/ci/praktika/s3.py @@ -1,12 +1,11 @@ import dataclasses import json -import time from pathlib import Path from typing import Dict from praktika._environment import _Environment from praktika.settings import Settings -from praktika.utils import Shell, Utils +from praktika.utils import Shell class S3: @@ -52,23 +51,22 @@ class S3: cmd += " --content-type text/plain" res = cls.run_command_with_retries(cmd) if not res: - raise + raise RuntimeError() bucket = s3_path.split("/")[0] endpoint = Settings.S3_BUCKET_TO_HTTP_ENDPOINT[bucket] assert endpoint return f"https://{s3_full_path}".replace(bucket, endpoint) @classmethod - def put(cls, s3_path, local_path, text=False, metadata=None): + def put(cls, s3_path, local_path, text=False, metadata=None, if_none_matched=False): assert Path(local_path).exists(), f"Path [{local_path}] does not exist" assert Path(s3_path), f"Invalid S3 Path [{s3_path}]" assert Path( local_path ).is_file(), f"Path [{local_path}] is not file. Only files are supported" - file_name = Path(local_path).name s3_full_path = s3_path - if not s3_full_path.endswith(file_name): - s3_full_path = f"{s3_path}/{Path(local_path).name}" + if s3_full_path.endswith("/"): + s3_full_path = f"{s3_path}{Path(local_path).name}" s3_full_path = str(s3_full_path).removeprefix("s3://") bucket, key = s3_full_path.split("/", maxsplit=1) @@ -76,6 +74,8 @@ class S3: command = ( f"aws s3api put-object --bucket {bucket} --key {key} --body {local_path}" ) + if if_none_matched: + command += f' --if-none-match "*"' if metadata: for k, v in metadata.items(): command += f" --metadata {k}={v}" @@ -84,7 +84,7 @@ class S3: if text: cmd += " --content-type text/plain" res = cls.run_command_with_retries(command) - assert res + return res @classmethod def run_command_with_retries(cls, command, retries=Settings.MAX_RETRIES_S3): @@ -101,6 +101,14 @@ class S3: elif "does not exist" in stderr: print("ERROR: requested file does not exist") break + elif "Unknown options" in stderr: + print("ERROR: Invalid AWS CLI command or CLI client version:") + print(f" | awc error: {stderr}") + break + elif "PreconditionFailed" in stderr: + print("ERROR: AWS API Call Precondition Failed") + print(f" | awc error: {stderr}") + break if ret_code != 0: print( f"ERROR: aws s3 cp failed, stdout/stderr err: [{stderr}], out [{stdout}]" @@ -108,13 +116,6 @@ class S3: res = ret_code == 0 return res - @classmethod - def get_link(cls, s3_path, local_path): - s3_full_path = f"{s3_path}/{Path(local_path).name}" - bucket = s3_path.split("/")[0] - endpoint = Settings.S3_BUCKET_TO_HTTP_ENDPOINT[bucket] - return f"https://{s3_full_path}".replace(bucket, endpoint) - @classmethod def copy_file_from_s3(cls, s3_path, local_path): assert Path(s3_path), f"Invalid S3 Path [{s3_path}]" @@ -128,6 +129,19 @@ class S3: res = cls.run_command_with_retries(cmd) return res + @classmethod + def copy_file_from_s3_matching_pattern( + cls, s3_path, local_path, include, exclude="*" + ): + assert Path(s3_path), f"Invalid S3 Path [{s3_path}]" + assert Path( + local_path + ).is_dir(), f"Path [{local_path}] does not exist or not a directory" + assert s3_path.endswith("/"), f"s3 path is invalid [{s3_path}]" + cmd = f'aws s3 cp s3://{s3_path} {local_path} --exclude "{exclude}" --include "{include}" --recursive' + res = cls.run_command_with_retries(cmd) + return res + @classmethod def head_object(cls, s3_path): s3_path = str(s3_path).removeprefix("s3://") @@ -148,103 +162,6 @@ class S3: verbose=True, ) - # TODO: apparently should be placed into separate file to be used only inside praktika - # keeping this module clean from importing Settings, Environment and etc, making it easy for use externally - @classmethod - def copy_result_to_s3(cls, result, unlock=True): - result.dump() - env = _Environment.get() - s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}" - s3_path_full = f"{s3_path}/{Path(result.file_name()).name}" - url = S3.copy_file_to_s3(s3_path=s3_path, local_path=result.file_name()) - if env.PR_NUMBER: - print("Duplicate Result for latest commit alias in PR") - s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix(latest=True)}" - url = S3.copy_file_to_s3(s3_path=s3_path, local_path=result.file_name()) - if unlock: - if not cls.unlock(s3_path_full): - print(f"ERROR: File [{s3_path_full}] unlock failure") - assert False # TODO: investigate - return url - - @classmethod - def copy_result_from_s3(cls, local_path, lock=True): - env = _Environment.get() - file_name = Path(local_path).name - s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}/{file_name}" - if lock: - cls.lock(s3_path) - if not S3.copy_file_from_s3(s3_path=s3_path, local_path=local_path): - print(f"ERROR: failed to cp file [{s3_path}] from s3") - raise - - @classmethod - def lock(cls, s3_path, level=0): - assert level < 3, "Never" - env = _Environment.get() - s3_path_lock = s3_path + f".lock" - file_path_lock = f"{Settings.TEMP_DIR}/{Path(s3_path_lock).name}" - assert Shell.check( - f"echo '''{env.JOB_NAME}''' > {file_path_lock}", verbose=True - ), "Never" - - i = 20 - meta = S3.head_object(s3_path_lock) - while meta: - print(f"WARNING: Failed to acquire lock, meta [{meta}] - wait") - i -= 5 - if i < 0: - info = f"ERROR: lock acquire failure - unlock forcefully" - print(info) - env.add_info(info) - break - time.sleep(5) - - metadata = {"job": Utils.to_base64(env.JOB_NAME)} - S3.put( - s3_path=s3_path_lock, - local_path=file_path_lock, - metadata=metadata, - ) - time.sleep(1) - obj = S3.head_object(s3_path_lock) - if not obj or not obj.has_tags(tags=metadata): - print(f"WARNING: locked by another job [{obj}]") - env.add_info("S3 lock file failure") - cls.lock(s3_path, level=level + 1) - print("INFO: lock acquired") - - @classmethod - def unlock(cls, s3_path): - s3_path_lock = s3_path + ".lock" - env = _Environment.get() - obj = S3.head_object(s3_path_lock) - if not obj: - print("ERROR: lock file is removed") - assert False # investigate - elif not obj.has_tags({"job": Utils.to_base64(env.JOB_NAME)}): - print("ERROR: lock file was acquired by another job") - assert False # investigate - - if not S3.delete(s3_path_lock): - print(f"ERROR: File [{s3_path_lock}] delete failure") - print("INFO: lock released") - return True - - @classmethod - def get_result_link(cls, result): - env = _Environment.get() - s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix(latest=True if env.PR_NUMBER else False)}" - return S3.get_link(s3_path=s3_path, local_path=result.file_name()) - - @classmethod - def clean_latest_result(cls): - env = _Environment.get() - env.SHA = "latest" - assert env.PR_NUMBER - s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}" - S3.clean_s3_directory(s3_path=s3_path) - @classmethod def _upload_file_to_s3( cls, local_file_path, upload_to_s3: bool, text: bool = False, s3_subprefix="" @@ -260,36 +177,3 @@ class S3: ) return html_link return f"file://{Path(local_file_path).absolute()}" - - @classmethod - def upload_result_files_to_s3(cls, result): - if result.results: - for result_ in result.results: - cls.upload_result_files_to_s3(result_) - for file in result.files: - if not Path(file).is_file(): - print(f"ERROR: Invalid file [{file}] in [{result.name}] - skip upload") - result.info += f"\nWARNING: Result file [{file}] was not found" - file_link = cls._upload_file_to_s3(file, upload_to_s3=False) - else: - is_text = False - for text_file_suffix in Settings.TEXT_CONTENT_EXTENSIONS: - if file.endswith(text_file_suffix): - print( - f"File [{file}] matches Settings.TEXT_CONTENT_EXTENSIONS [{Settings.TEXT_CONTENT_EXTENSIONS}] - add text attribute for s3 object" - ) - is_text = True - break - file_link = cls._upload_file_to_s3( - file, - upload_to_s3=True, - text=is_text, - s3_subprefix=Utils.normalize_string(result.name), - ) - result.links.append(file_link) - if result.files: - print( - f"Result files [{result.files}] uploaded to s3 [{result.links[-len(result.files):]}] - clean files list" - ) - result.files = [] - result.dump() diff --git a/ci/praktika/settings.py b/ci/praktika/settings.py index 1a4068d9398..b281a95370c 100644 --- a/ci/praktika/settings.py +++ b/ci/praktika/settings.py @@ -1,8 +1,152 @@ -from praktika._settings import _Settings -from praktika.mangle import _get_user_settings +import dataclasses +import importlib.util +from pathlib import Path +from typing import Dict, Iterable, List, Optional -Settings = _Settings() -user_settings = _get_user_settings() -for setting, value in user_settings.items(): - Settings.__setattr__(setting, value) +@dataclasses.dataclass +class _Settings: + ###################################### + # Pipeline generation settings # + ###################################### + MAIN_BRANCH = "main" + CI_PATH = "./ci" + WORKFLOW_PATH_PREFIX: str = "./.github/workflows" + WORKFLOWS_DIRECTORY: str = f"{CI_PATH}/workflows" + SETTINGS_DIRECTORY: str = f"{CI_PATH}/settings" + CI_CONFIG_JOB_NAME = "Config Workflow" + DOCKER_BUILD_JOB_NAME = "Docker Builds" + FINISH_WORKFLOW_JOB_NAME = "Finish Workflow" + READY_FOR_MERGE_STATUS_NAME = "Ready for Merge" + CI_CONFIG_RUNS_ON: Optional[List[str]] = None + DOCKER_BUILD_RUNS_ON: Optional[List[str]] = None + VALIDATE_FILE_PATHS: bool = True + + ###################################### + # Runtime Settings # + ###################################### + MAX_RETRIES_S3 = 3 + MAX_RETRIES_GH = 3 + + ###################################### + # S3 (artifact storage) settings # + ###################################### + S3_ARTIFACT_PATH: str = "" + + ###################################### + # CI workspace settings # + ###################################### + TEMP_DIR: str = "/tmp/praktika" + OUTPUT_DIR: str = f"{TEMP_DIR}/output" + INPUT_DIR: str = f"{TEMP_DIR}/input" + PYTHON_INTERPRETER: str = "python3" + PYTHON_PACKET_MANAGER: str = "pip3" + PYTHON_VERSION: str = "3.9" + INSTALL_PYTHON_FOR_NATIVE_JOBS: bool = False + INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS: str = "./ci/requirements.txt" + ENVIRONMENT_VAR_FILE: str = f"{TEMP_DIR}/environment.json" + RUN_LOG: str = f"{TEMP_DIR}/praktika_run.log" + + SECRET_GH_APP_ID: str = "GH_APP_ID" + SECRET_GH_APP_PEM_KEY: str = "GH_APP_PEM_KEY" + + ENV_SETUP_SCRIPT: str = "/tmp/praktika_setup_env.sh" + WORKFLOW_STATUS_FILE: str = f"{TEMP_DIR}/workflow_status.json" + + ###################################### + # CI Cache settings # + ###################################### + CACHE_VERSION: int = 1 + CACHE_DIGEST_LEN: int = 20 + CACHE_S3_PATH: str = "" + CACHE_LOCAL_PATH: str = f"{TEMP_DIR}/ci_cache" + + ###################################### + # Report settings # + ###################################### + HTML_S3_PATH: str = "" + HTML_PAGE_FILE: str = "./praktika/json.html" + TEXT_CONTENT_EXTENSIONS: Iterable[str] = frozenset([".txt", ".log"]) + S3_BUCKET_TO_HTTP_ENDPOINT: Optional[Dict[str, str]] = None + + DOCKERHUB_USERNAME: str = "" + DOCKERHUB_SECRET: str = "" + DOCKER_WD: str = "/wd" + + ###################################### + # CI DB Settings # + ###################################### + SECRET_CI_DB_URL: str = "CI_DB_URL" + SECRET_CI_DB_PASSWORD: str = "CI_DB_PASSWORD" + CI_DB_DB_NAME = "" + CI_DB_TABLE_NAME = "" + CI_DB_INSERT_TIMEOUT_SEC = 5 + + DISABLE_MERGE_COMMIT = True + + +_USER_DEFINED_SETTINGS = [ + "S3_ARTIFACT_PATH", + "CACHE_S3_PATH", + "HTML_S3_PATH", + "S3_BUCKET_TO_HTTP_ENDPOINT", + "TEXT_CONTENT_EXTENSIONS", + "TEMP_DIR", + "OUTPUT_DIR", + "INPUT_DIR", + "CI_CONFIG_RUNS_ON", + "DOCKER_BUILD_RUNS_ON", + "CI_CONFIG_JOB_NAME", + "PYTHON_INTERPRETER", + "PYTHON_VERSION", + "PYTHON_PACKET_MANAGER", + "INSTALL_PYTHON_FOR_NATIVE_JOBS", + "INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS", + "MAX_RETRIES_S3", + "MAX_RETRIES_GH", + "VALIDATE_FILE_PATHS", + "DOCKERHUB_USERNAME", + "DOCKERHUB_SECRET", + "READY_FOR_MERGE_STATUS_NAME", + "SECRET_CI_DB_URL", + "SECRET_CI_DB_PASSWORD", + "CI_DB_DB_NAME", + "CI_DB_TABLE_NAME", + "CI_DB_INSERT_TIMEOUT_SEC", + "SECRET_GH_APP_PEM_KEY", + "SECRET_GH_APP_ID", + "MAIN_BRANCH", + "DISABLE_MERGE_COMMIT", +] + + +def _get_settings() -> _Settings: + res = _Settings() + + directory = Path(_Settings.SETTINGS_DIRECTORY) + for py_file in directory.glob("*.py"): + module_name = py_file.name.removeprefix(".py") + spec = importlib.util.spec_from_file_location( + module_name, f"{_Settings.SETTINGS_DIRECTORY}/{module_name}" + ) + assert spec + foo = importlib.util.module_from_spec(spec) + assert spec.loader + spec.loader.exec_module(foo) + for setting in _USER_DEFINED_SETTINGS: + try: + value = getattr(foo, setting) + res.__setattr__(setting, value) + # print(f"- read user defined setting [{setting} = {value}]") + except Exception as e: + # print(f"Exception while read user settings: {e}") + pass + + return res + + +class GHRunners: + ubuntu = "ubuntu-latest" + + +Settings = _get_settings() diff --git a/ci/praktika/utils.py b/ci/praktika/utils.py index b96c78e4fa7..2bcc94f2559 100644 --- a/ci/praktika/utils.py +++ b/ci/praktika/utils.py @@ -17,8 +17,6 @@ from threading import Thread from types import SimpleNamespace from typing import Any, Dict, Iterator, List, Optional, Type, TypeVar, Union -from praktika._settings import _Settings - T = TypeVar("T", bound="Serializable") @@ -81,25 +79,26 @@ class MetaClasses: class ContextManager: @staticmethod @contextmanager - def cd(to: Optional[Union[Path, str]] = None) -> Iterator[None]: + def cd(to: Optional[Union[Path, str]]) -> Iterator[None]: """ changes current working directory to @path or `git root` if @path is None :param to: :return: """ - if not to: - try: - to = Shell.get_output_or_raise("git rev-parse --show-toplevel") - except: - pass - if not to: - if Path(_Settings.DOCKER_WD).is_dir(): - to = _Settings.DOCKER_WD - if not to: - assert False, "FIX IT" - assert to + # if not to: + # try: + # to = Shell.get_output_or_raise("git rev-parse --show-toplevel") + # except: + # pass + # if not to: + # if Path(_Settings.DOCKER_WD).is_dir(): + # to = _Settings.DOCKER_WD + # if not to: + # assert False, "FIX IT" + # assert to old_pwd = os.getcwd() - os.chdir(to) + if to: + os.chdir(to) try: yield finally: diff --git a/ci/praktika/validator.py b/ci/praktika/validator.py index 29edc0a27ed..0bb722903e5 100644 --- a/ci/praktika/validator.py +++ b/ci/praktika/validator.py @@ -4,10 +4,8 @@ from itertools import chain from pathlib import Path from praktika import Workflow -from praktika._settings import GHRunners from praktika.mangle import _get_workflows -from praktika.settings import Settings -from praktika.utils import ContextManager +from praktika.settings import GHRunners, Settings class Validator: @@ -119,61 +117,56 @@ class Validator: def validate_file_paths_in_run_command(cls, workflow: Workflow.Config) -> None: if not Settings.VALIDATE_FILE_PATHS: return - with ContextManager.cd(): - for job in workflow.jobs: - run_command = job.command - command_parts = run_command.split(" ") - for part in command_parts: - if ">" in part: - return - if "/" in part: - assert ( - Path(part).is_file() or Path(part).is_dir() - ), f"Apparently run command [{run_command}] for job [{job}] has invalid path [{part}]. Setting to disable check: VALIDATE_FILE_PATHS" + for job in workflow.jobs: + run_command = job.command + command_parts = run_command.split(" ") + for part in command_parts: + if ">" in part: + return + if "/" in part: + assert ( + Path(part).is_file() or Path(part).is_dir() + ), f"Apparently run command [{run_command}] for job [{job}] has invalid path [{part}]. Setting to disable check: VALIDATE_FILE_PATHS" @classmethod def validate_file_paths_in_digest_configs(cls, workflow: Workflow.Config) -> None: if not Settings.VALIDATE_FILE_PATHS: return - with ContextManager.cd(): - for job in workflow.jobs: - if not job.digest_config: - continue - for include_path in chain( - job.digest_config.include_paths, job.digest_config.exclude_paths - ): - if "*" in include_path: - assert glob.glob( - include_path, recursive=True - ), f"Apparently file glob [{include_path}] in job [{job.name}] digest_config [{job.digest_config}] invalid, workflow [{workflow.name}]. Setting to disable check: VALIDATE_FILE_PATHS" - else: - assert ( - Path(include_path).is_file() or Path(include_path).is_dir() - ), f"Apparently file path [{include_path}] in job [{job.name}] digest_config [{job.digest_config}] invalid, workflow [{workflow.name}]. Setting to disable check: VALIDATE_FILE_PATHS" + for job in workflow.jobs: + if not job.digest_config: + continue + for include_path in chain( + job.digest_config.include_paths, job.digest_config.exclude_paths + ): + if "*" in include_path: + assert glob.glob( + include_path, recursive=True + ), f"Apparently file glob [{include_path}] in job [{job.name}] digest_config [{job.digest_config}] invalid, workflow [{workflow.name}]. Setting to disable check: VALIDATE_FILE_PATHS" + else: + assert ( + Path(include_path).is_file() or Path(include_path).is_dir() + ), f"Apparently file path [{include_path}] in job [{job.name}] digest_config [{job.digest_config}] invalid, workflow [{workflow.name}]. Setting to disable check: VALIDATE_FILE_PATHS" @classmethod def validate_requirements_txt_files(cls, workflow: Workflow.Config) -> None: - with ContextManager.cd(): - for job in workflow.jobs: - if job.job_requirements: - if job.job_requirements.python_requirements_txt: - path = Path(job.job_requirements.python_requirements_txt) - message = f"File with py requirement [{path}] does not exist" - if job.name in ( - Settings.DOCKER_BUILD_JOB_NAME, - Settings.CI_CONFIG_JOB_NAME, - Settings.FINISH_WORKFLOW_JOB_NAME, - ): - message += '\n If all requirements already installed on your runners - add setting INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS""' - message += "\n If requirements needs to be installed - add requirements file (Settings.INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS):" - message += "\n echo jwt==1.3.1 > ./ci/requirements.txt" - message += ( - "\n echo requests==2.32.3 >> ./ci/requirements.txt" - ) - message += "\n echo https://clickhouse-builds.s3.amazonaws.com/packages/praktika-0.1-py3-none-any.whl >> ./ci/requirements.txt" - cls.evaluate_check( - path.is_file(), message, job.name, workflow.name + for job in workflow.jobs: + if job.job_requirements: + if job.job_requirements.python_requirements_txt: + path = Path(job.job_requirements.python_requirements_txt) + message = f"File with py requirement [{path}] does not exist" + if job.name in ( + Settings.DOCKER_BUILD_JOB_NAME, + Settings.CI_CONFIG_JOB_NAME, + Settings.FINISH_WORKFLOW_JOB_NAME, + ): + message += '\n If all requirements already installed on your runners - add setting INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS""' + message += "\n If requirements needs to be installed - add requirements file (Settings.INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS):" + message += "\n echo jwt==1.3.1 > ./ci/requirements.txt" + message += ( + "\n echo requests==2.32.3 >> ./ci/requirements.txt" ) + message += "\n echo https://clickhouse-builds.s3.amazonaws.com/packages/praktika-0.1-py3-none-any.whl >> ./ci/requirements.txt" + cls.evaluate_check(path.is_file(), message, job.name, workflow.name) @classmethod def validate_dockers(cls, workflow: Workflow.Config): diff --git a/ci/praktika/workflow.py b/ci/praktika/workflow.py index 41e8056f9ef..8c5ec12440f 100644 --- a/ci/praktika/workflow.py +++ b/ci/praktika/workflow.py @@ -31,6 +31,7 @@ class Workflow: enable_report: bool = False enable_merge_ready_status: bool = False enable_cidb: bool = False + enable_merge_commit: bool = False def is_event_pull_request(self): return self.event == Workflow.Event.PULL_REQUEST diff --git a/ci/praktika/yaml_generator.py b/ci/praktika/yaml_generator.py index 00c469fec0c..f56715755e8 100644 --- a/ci/praktika/yaml_generator.py +++ b/ci/praktika/yaml_generator.py @@ -80,6 +80,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{{{ github.head_ref }}}} {JOB_ADDONS} - name: Prepare env script run: | @@ -102,7 +104,11 @@ jobs: run: | . /tmp/praktika_setup_env.sh set -o pipefail - {PYTHON} -m praktika run --job '''{JOB_NAME}''' --workflow "{WORKFLOW_NAME}" --ci |& tee {RUN_LOG} + if command -v ts &> /dev/null; then + python3 -m praktika run --job '''{JOB_NAME}''' --workflow "{WORKFLOW_NAME}" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee /tmp/praktika/praktika_run.log + else + python3 -m praktika run --job '''{JOB_NAME}''' --workflow "{WORKFLOW_NAME}" --ci |& tee /tmp/praktika/praktika_run.log + fi {UPLOADS_GITHUB}\ """ @@ -184,12 +190,10 @@ jobs: False ), f"Workflow event not yet supported [{workflow_config.event}]" - with ContextManager.cd(): - with open(self._get_workflow_file_name(workflow_config.name), "w") as f: - f.write(yaml_workflow_str) + with open(self._get_workflow_file_name(workflow_config.name), "w") as f: + f.write(yaml_workflow_str) - with ContextManager.cd(): - Shell.check("git add ./.github/workflows/*.yaml") + Shell.check("git add ./.github/workflows/*.yaml") class PullRequestPushYamlGen: diff --git a/ci/settings/definitions.py b/ci/settings/definitions.py index 176e865e6f3..8ebf79231ac 100644 --- a/ci/settings/definitions.py +++ b/ci/settings/definitions.py @@ -7,24 +7,33 @@ S3_BUCKET_HTTP_ENDPOINT = "clickhouse-builds.s3.amazonaws.com" class RunnerLabels: CI_SERVICES = "ci_services" CI_SERVICES_EBS = "ci_services_ebs" - BUILDER = "builder" + BUILDER_AMD = "builder" + BUILDER_ARM = "builder-aarch64" + FUNC_TESTER_AMD = "func-tester" + FUNC_TESTER_ARM = "func-tester-aarch64" BASE_BRANCH = "master" +azure_secret = Secret.Config( + name="azure_connection_string", + type=Secret.Type.AWS_SSM_VAR, +) + SECRETS = [ Secret.Config( name="dockerhub_robot_password", type=Secret.Type.AWS_SSM_VAR, ), - Secret.Config( - name="woolenwolf_gh_app.clickhouse-app-id", - type=Secret.Type.AWS_SSM_SECRET, - ), - Secret.Config( - name="woolenwolf_gh_app.clickhouse-app-key", - type=Secret.Type.AWS_SSM_SECRET, - ), + azure_secret, + # Secret.Config( + # name="woolenwolf_gh_app.clickhouse-app-id", + # type=Secret.Type.AWS_SSM_SECRET, + # ), + # Secret.Config( + # name="woolenwolf_gh_app.clickhouse-app-key", + # type=Secret.Type.AWS_SSM_SECRET, + # ), ] DOCKERS = [ @@ -118,18 +127,18 @@ DOCKERS = [ # platforms=Docker.Platforms.arm_amd, # depends_on=["clickhouse/test-base"], # ), - # Docker.Config( - # name="clickhouse/stateless-test", - # path="./ci/docker/test/stateless", - # platforms=Docker.Platforms.arm_amd, - # depends_on=["clickhouse/test-base"], - # ), - # Docker.Config( - # name="clickhouse/stateful-test", - # path="./ci/docker/test/stateful", - # platforms=Docker.Platforms.arm_amd, - # depends_on=["clickhouse/stateless-test"], - # ), + Docker.Config( + name="clickhouse/stateless-test", + path="./ci/docker/stateless-test", + platforms=Docker.Platforms.arm_amd, + depends_on=[], + ), + Docker.Config( + name="clickhouse/stateful-test", + path="./ci/docker/stateful-test", + platforms=Docker.Platforms.arm_amd, + depends_on=["clickhouse/stateless-test"], + ), # Docker.Config( # name="clickhouse/stress-test", # path="./ci/docker/test/stress", @@ -230,4 +239,6 @@ DOCKERS = [ class JobNames: STYLE_CHECK = "Style Check" FAST_TEST = "Fast test" - BUILD_AMD_DEBUG = "Build amd64 debug" + BUILD = "Build" + STATELESS = "Stateless tests" + STATEFUL = "Stateful tests" diff --git a/ci/settings/settings.py b/ci/settings/settings.py index 8d5e7bc3c87..0f3b1efcee0 100644 --- a/ci/settings/settings.py +++ b/ci/settings/settings.py @@ -4,6 +4,8 @@ from ci.settings.definitions import ( RunnerLabels, ) +MAIN_BRANCH = "master" + S3_ARTIFACT_PATH = f"{S3_BUCKET_NAME}/artifacts" CI_CONFIG_RUNS_ON = [RunnerLabels.CI_SERVICES] DOCKER_BUILD_RUNS_ON = [RunnerLabels.CI_SERVICES_EBS] diff --git a/ci/workflows/pull_request.py b/ci/workflows/pull_request.py index 74129177efb..761ab8a6ebc 100644 --- a/ci/workflows/pull_request.py +++ b/ci/workflows/pull_request.py @@ -1,5 +1,3 @@ -from typing import List - from praktika import Artifact, Job, Workflow from praktika.settings import Settings @@ -13,7 +11,10 @@ from ci.settings.definitions import ( class ArtifactNames: - ch_debug_binary = "clickhouse_debug_binary" + CH_AMD_DEBUG = "CH_AMD_DEBUG" + CH_AMD_RELEASE = "CH_AMD_RELEASE" + CH_ARM_RELEASE = "CH_ARM_RELEASE" + CH_ARM_ASAN = "CH_ARM_ASAN" style_check_job = Job.Config( @@ -25,7 +26,7 @@ style_check_job = Job.Config( fast_test_job = Job.Config( name=JobNames.FAST_TEST, - runs_on=[RunnerLabels.BUILDER], + runs_on=[RunnerLabels.BUILDER_AMD], command="python3 ./ci/jobs/fast_test.py", run_in_docker="clickhouse/fasttest", digest_config=Job.CacheDigestConfig( @@ -37,11 +38,13 @@ fast_test_job = Job.Config( ), ) -job_build_amd_debug = Job.Config( - name=JobNames.BUILD_AMD_DEBUG, - runs_on=[RunnerLabels.BUILDER], - command="python3 ./ci/jobs/build_clickhouse.py amd_debug", +build_jobs = Job.Config( + name=JobNames.BUILD, + runs_on=["...from params..."], + requires=[JobNames.FAST_TEST], + command="python3 ./ci/jobs/build_clickhouse.py --build-type {PARAMETER}", run_in_docker="clickhouse/fasttest", + timeout=3600 * 2, digest_config=Job.CacheDigestConfig( include_paths=[ "./src", @@ -54,9 +57,85 @@ job_build_amd_debug = Job.Config( "./docker/packager/packager", "./rust", "./tests/ci/version_helper.py", + "./ci/jobs/build_clickhouse.py", ], ), - provides=[ArtifactNames.ch_debug_binary], +).parametrize( + parameter=["amd_debug", "amd_release", "arm_release", "arm_asan"], + provides=[ + [ArtifactNames.CH_AMD_DEBUG], + [ArtifactNames.CH_AMD_RELEASE], + [ArtifactNames.CH_ARM_RELEASE], + [ArtifactNames.CH_ARM_ASAN], + ], + runs_on=[ + [RunnerLabels.BUILDER_AMD], + [RunnerLabels.BUILDER_AMD], + [RunnerLabels.BUILDER_ARM], + [RunnerLabels.BUILDER_ARM], + ], +) + +stateless_tests_jobs = Job.Config( + name=JobNames.STATELESS, + runs_on=[RunnerLabels.BUILDER_AMD], + command="python3 ./ci/jobs/functional_stateless_tests.py --test-options {PARAMETER}", + # many tests expect to see "/var/lib/clickhouse" in various output lines - add mount for now, consider creating this dir in docker file + run_in_docker="clickhouse/stateless-test+--security-opt seccomp=unconfined", + digest_config=Job.CacheDigestConfig( + include_paths=[ + "./ci/jobs/functional_stateless_tests.py", + ], + ), +).parametrize( + parameter=[ + "amd_debug,parallel", + "amd_debug,non-parallel", + "amd_release,parallel", + "amd_release,non-parallel", + "arm_asan,parallel", + "arm_asan,non-parallel", + ], + runs_on=[ + [RunnerLabels.BUILDER_AMD], + [RunnerLabels.FUNC_TESTER_AMD], + [RunnerLabels.BUILDER_AMD], + [RunnerLabels.FUNC_TESTER_AMD], + [RunnerLabels.BUILDER_ARM], + [RunnerLabels.FUNC_TESTER_ARM], + ], + requires=[ + [ArtifactNames.CH_AMD_DEBUG], + [ArtifactNames.CH_AMD_DEBUG], + [ArtifactNames.CH_AMD_RELEASE], + [ArtifactNames.CH_AMD_RELEASE], + [ArtifactNames.CH_ARM_ASAN], + [ArtifactNames.CH_ARM_ASAN], + ], +) + +stateful_tests_jobs = Job.Config( + name=JobNames.STATEFUL, + runs_on=[RunnerLabels.BUILDER_AMD], + command="python3 ./ci/jobs/functional_stateful_tests.py --test-options {PARAMETER}", + # many tests expect to see "/var/lib/clickhouse" + # some tests expect to see "/var/log/clickhouse" + run_in_docker="clickhouse/stateless-test+--security-opt seccomp=unconfined", + digest_config=Job.CacheDigestConfig( + include_paths=[ + "./ci/jobs/functional_stateful_tests.py", + ], + ), +).parametrize( + parameter=[ + "amd_debug,parallel", + ], + runs_on=[ + [RunnerLabels.BUILDER_AMD], + ], + requires=[ + [ArtifactNames.CH_AMD_DEBUG], + ], ) workflow = Workflow.Config( @@ -66,14 +145,31 @@ workflow = Workflow.Config( jobs=[ style_check_job, fast_test_job, - job_build_amd_debug, + *build_jobs, + *stateless_tests_jobs, + *stateful_tests_jobs, ], artifacts=[ Artifact.Config( - name=ArtifactNames.ch_debug_binary, + name=ArtifactNames.CH_AMD_DEBUG, type=Artifact.Type.S3, path=f"{Settings.TEMP_DIR}/build/programs/clickhouse", - ) + ), + Artifact.Config( + name=ArtifactNames.CH_AMD_RELEASE, + type=Artifact.Type.S3, + path=f"{Settings.TEMP_DIR}/build/programs/clickhouse", + ), + Artifact.Config( + name=ArtifactNames.CH_ARM_RELEASE, + type=Artifact.Type.S3, + path=f"{Settings.TEMP_DIR}/build/programs/clickhouse", + ), + Artifact.Config( + name=ArtifactNames.CH_ARM_ASAN, + type=Artifact.Type.S3, + path=f"{Settings.TEMP_DIR}/build/programs/clickhouse", + ), ], dockers=DOCKERS, secrets=SECRETS, @@ -84,11 +180,14 @@ workflow = Workflow.Config( WORKFLOWS = [ workflow, -] # type: List[Workflow.Config] +] -if __name__ == "__main__": - # local job test inside praktika environment - from praktika.runner import Runner - - Runner().run(workflow, fast_test_job, docker="fasttest", dummy_env=True) +# if __name__ == "__main__": +# # local job test inside praktika environment +# from praktika.runner import Runner +# from praktika.digest import Digest +# +# print(Digest().calc_job_digest(amd_debug_build_job)) +# +# Runner().run(workflow, fast_test_job, docker="fasttest", local_run=True) diff --git a/cmake/cpu_features.cmake b/cmake/cpu_features.cmake index dbc77d835be..5c68f1b6c5d 100644 --- a/cmake/cpu_features.cmake +++ b/cmake/cpu_features.cmake @@ -74,6 +74,7 @@ elseif (ARCH_AARCH64) # introduced as optional, either in v8.2 [7] or in v8.4 [8]. # rcpc: Load-Acquire RCpc Register. Better support of release/acquire of atomics. Good for allocators and high contention code. # Optional in v8.2, mandatory in v8.3 [9]. Supported in Graviton >=2, Azure and GCP instances. + # bf16: Bfloat16, a half-precision floating point format developed by Google Brain. Optional in v8.2, mandatory in v8.6. # # [1] https://github.com/aws/aws-graviton-getting-started/blob/main/c-c%2B%2B.md # [2] https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/making-the-most-of-the-arm-architecture-in-gcc-10 diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index fa0f95245f2..fcec9132cb7 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -217,7 +217,11 @@ add_contrib (libssh-cmake libssh) add_contrib (prometheus-protobufs-cmake prometheus-protobufs prometheus-protobufs-gogo) -add_contrib(numactl-cmake numactl) +add_contrib (numactl-cmake numactl) + +add_contrib (google-cloud-cpp-cmake google-cloud-cpp) # requires grpc, protobuf, absl + +add_contrib (jwt-cpp-cmake jwt-cpp) # Put all targets defined here and in subdirectories under "contrib/" folders in GUI-based IDEs. # Some of third-party projects may override CMAKE_FOLDER or FOLDER property of their targets, so they would not appear diff --git a/contrib/google-cloud-cpp b/contrib/google-cloud-cpp new file mode 160000 index 00000000000..83f30caadb8 --- /dev/null +++ b/contrib/google-cloud-cpp @@ -0,0 +1 @@ +Subproject commit 83f30caadb8613fb5c408d8c2fd545291596b53f diff --git a/contrib/google-cloud-cpp-cmake/CMakeLists.txt b/contrib/google-cloud-cpp-cmake/CMakeLists.txt new file mode 100644 index 00000000000..d4e7a885a39 --- /dev/null +++ b/contrib/google-cloud-cpp-cmake/CMakeLists.txt @@ -0,0 +1,105 @@ +set(ENABLE_GOOGLE_CLOUD_CPP_DEFAULT OFF) + +if(ENABLE_LIBRARIES AND CLICKHOUSE_CLOUD AND OS_LINUX) + set(ENABLE_GOOGLE_CLOUD_CPP_DEFAULT ON) +endif() + +option(ENABLE_GOOGLE_CLOUD_CPP "Enable Google Cloud Cpp" ${ENABLE_GOOGLE_CLOUD_CPP_DEFAULT}) + +if(NOT ENABLE_GOOGLE_CLOUD_CPP) + message(STATUS "Not using Google Cloud Cpp") + return() +endif() + +if(NOT ENABLE_GRPC) + message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use Google Cloud Cpp without gRPC") +endif() +if (NOT ENABLE_PROTOBUF) + message( ${RECONFIGURE_MESSAGE_LEVEL} "Can't use Google Cloud Cpp without protobuf") +endif() + +# Gather sources and options. +set(GOOGLE_CLOUD_CPP_SOURCES) +set(GOOGLE_CLOUD_CPP_PUBLIC_INCLUDES) +set(GOOGLE_CLOUD_CPP_PRIVATE_INCLUDES) +set(GOOGLE_CLOUD_CPP_PRIVATE_LIBS) + +# Directories. +SET(GOOGLE_CLOUD_CPP_DIR "${ClickHouse_SOURCE_DIR}/contrib/google-cloud-cpp" ) +list(APPEND GOOGLE_CLOUD_CPP_PRIVATE_INCLUDES "${GOOGLE_CLOUD_CPP_DIR}") + +# Set the PROJECT_SOURCE_DIR so that all Google Cloud cmake files work +set(PROJECT_SOURCE_DIR_BAK ${PROJECT_SOURCE_DIR}) +set(PROJECT_SOURCE_DIR ${GOOGLE_CLOUD_CPP_DIR}) + +list(APPEND CMAKE_MODULE_PATH "${GOOGLE_CLOUD_CPP_DIR}/cmake") + +# Building this target results in all protobufs being compiled. +add_custom_target(google-cloud-cpp-protos) + +include("GoogleCloudCppLibrary") + +# Set some variables required for googleapis CMakeLists.txt to work. +set(GOOGLE_CLOUD_CPP_ENABLE_GRPC ON) +set(PROJECT_VERSION "1") +set(PROJECT_VERSION_MAJOR "1") +set(PROTO_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/google-protobuf/src") +set(GOOGLE_CLOUD_CPP_GRPC_PLUGIN_EXECUTABLE $) + +include(GoogleApis.cmake) + +add_library(gRPC::grpc++ ALIAS _ch_contrib_grpc) +add_library(gRPC::grpc ALIAS _ch_contrib_grpc) + +# google-cloud-cpp-kms. +google_cloud_cpp_add_library_protos(kms) + +include(google_cloud_cpp_common.cmake) +include(google_cloud_cpp_grpc_utils.cmake) + +SET(GOOGLE_CLOUD_CPP_KMS_DIR "${GOOGLE_CLOUD_CPP_DIR}/google/cloud/kms") + +file(GLOB GOOGLE_CLOUD_CPP_KMS_SRC + "${GOOGLE_CLOUD_CPP_KMS_DIR}/v1/*.cc" + "${GOOGLE_CLOUD_CPP_KMS_DIR}/v1/internal/*.cc" + "${GOOGLE_CLOUD_CPP_KMS_DIR}/inventory/v1/*.cc" +) + +list(APPEND GOOGLE_CLOUD_CPP_SOURCES ${GOOGLE_CLOUD_CPP_KMS_SRC}) +list(APPEND GOOGLE_CLOUD_CPP_PUBLIC_INCLUDES "${GOOGLE_CLOUD_CPP_DIR}" "${CMAKE_CURRENT_BINARY_DIR}") + +set(GRPC_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/grpc") +list(APPEND GOOGLE_CLOUD_CPP_PUBLIC_INCLUDES "${GRPC_INCLUDE_DIR}/include" "${GRPC_INCLUDE_DIR}/spm-cpp-include") + +# Restore the PROJECT_SOURCE_DIR. +set(PROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR_BAK}) + +# Link against external libraries. +list(APPEND GOOGLE_CLOUD_CPP_PRIVATE_LIBS + google_cloud_cpp_common + google_cloud_cpp_grpc_utils + google_cloud_cpp_kms_protos + google_cloud_cpp_cloud_location_locations_protos + google_cloud_cpp_iam_v1_iam_policy_protos + gRPC::grpc++ + absl::optional +) + +list(APPEND GOOGLE_CLOUD_CPP_PUBLIC_LIBS + absl::optional + gRPC::grpc++ +) + +# Add library. +add_library(_gcloud ${GOOGLE_CLOUD_CPP_SOURCES}) + +target_include_directories(_gcloud SYSTEM PUBLIC ${GOOGLE_CLOUD_CPP_PUBLIC_INCLUDES}) +target_include_directories(_gcloud SYSTEM PRIVATE ${GOOGLE_CLOUD_CPP_PRIVATE_INCLUDES}) +target_link_libraries(_gcloud PRIVATE ${GOOGLE_CLOUD_CPP_PRIVATE_LIBS}) + +# The library is large - avoid bloat. +if (OMIT_HEAVY_DEBUG_SYMBOLS) + target_compile_options(_gcloud PRIVATE -g0) +endif() + +add_library(ch_contrib::google_cloud_cpp ALIAS _gcloud) diff --git a/contrib/google-cloud-cpp-cmake/GoogleApis.cmake b/contrib/google-cloud-cpp-cmake/GoogleApis.cmake new file mode 100644 index 00000000000..070ce2275c4 --- /dev/null +++ b/contrib/google-cloud-cpp-cmake/GoogleApis.cmake @@ -0,0 +1,469 @@ +# ~~~ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ~~~ + +# File copied from google-cloud-cpp/external/googleapis/CMakeLists.txt with minor modifications. + +if (NOT GOOGLE_CLOUD_CPP_ENABLE_GRPC) + return() +endif () + +include(GoogleapisConfig) + +set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_URL + "https://github.com/googleapis/googleapis/archive/${_GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA}.tar.gz" + "https://storage.googleapis.com/cloud-cpp-community-archive/github.com/googleapis/googleapis/archive/${_GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA}.tar.gz" +) +set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_URL_HASH + "${_GOOGLE_CLOUD_CPP_GOOGLEAPIS_SHA256}") +if (GOOGLE_CLOUD_CPP_OVERRIDE_GOOGLEAPIS_URL) + set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_URL + ${GOOGLE_CLOUD_CPP_OVERRIDE_GOOGLEAPIS_URL}) +endif () +if (GOOGLE_CLOUD_CPP_OVERRIDE_GOOGLEAPIS_URL_HASH) + set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_URL_HASH + "${GOOGLE_CLOUD_CPP_OVERRIDE_GOOGLEAPIS_URL_HASH}") +endif () + +set(EXTERNAL_GOOGLEAPIS_PROTO_FILES + # cmake-format: sort + "google/api/annotations.proto" + "google/api/auth.proto" + "google/api/backend.proto" + "google/api/billing.proto" + "google/api/client.proto" + "google/api/config_change.proto" + "google/api/consumer.proto" + "google/api/context.proto" + "google/api/control.proto" + "google/api/distribution.proto" + "google/api/documentation.proto" + "google/api/endpoint.proto" + "google/api/error_reason.proto" + "google/api/field_behavior.proto" + "google/api/field_info.proto" + "google/api/http.proto" + "google/api/httpbody.proto" + "google/api/label.proto" + "google/api/launch_stage.proto" + "google/api/log.proto" + "google/api/logging.proto" + "google/api/metric.proto" + "google/api/monitored_resource.proto" + "google/api/monitoring.proto" + "google/api/policy.proto" + "google/api/quota.proto" + "google/api/resource.proto" + "google/api/routing.proto" + "google/api/service.proto" + "google/api/source_info.proto" + "google/api/system_parameter.proto" + "google/api/usage.proto" + "google/api/visibility.proto" + "google/cloud/extended_operations.proto" + "google/cloud/location/locations.proto" + # orgpolicy/v**1** is used *indirectly* by google/cloud/asset, therefore it + # does not appear in protolists/asset.list. In addition, it is not compiled + # by any other library. So, added manually. + "google/cloud/orgpolicy/v1/orgpolicy.proto" + # Some gRPC based authentication is implemented by the IAM Credentials + # service. + "google/iam/credentials/v1/common.proto" + "google/iam/credentials/v1/iamcredentials.proto" + # We expose google::iam::v1::Policy in our google::cloud::IAMUpdater + "google/iam/v1/iam_policy.proto" + "google/iam/v1/options.proto" + "google/iam/v1/policy.proto" + "google/longrunning/operations.proto" + "google/rpc/code.proto" + "google/rpc/context/attribute_context.proto" + "google/rpc/error_details.proto" + "google/rpc/status.proto" + "google/type/calendar_period.proto" + "google/type/color.proto" + "google/type/date.proto" + "google/type/datetime.proto" + "google/type/dayofweek.proto" + "google/type/decimal.proto" + "google/type/expr.proto" + "google/type/fraction.proto" + "google/type/interval.proto" + "google/type/latlng.proto" + "google/type/localized_text.proto" + "google/type/money.proto" + "google/type/month.proto" + "google/type/phone_number.proto" + "google/type/postal_address.proto" + "google/type/quaternion.proto" + "google/type/timeofday.proto") + +include(GoogleCloudCppCommonOptions) + +# Set EXTERNAL_GOOGLEAPIS_SOURCE in the parent directory, as it is used by all +# the generated libraries. The Conan packages (https://conan.io), will need to +# patch this value. Setting the value in a single place makes such patching +# easier. +set(EXTERNAL_GOOGLEAPIS_PREFIX "${PROJECT_BINARY_DIR}/external/googleapis") +set(EXTERNAL_GOOGLEAPIS_SOURCE + "${EXTERNAL_GOOGLEAPIS_PREFIX}/src/googleapis_download" + PARENT_SCOPE) +set(EXTERNAL_GOOGLEAPIS_SOURCE + "${EXTERNAL_GOOGLEAPIS_PREFIX}/src/googleapis_download") + +# Include the functions to compile proto files and maintain proto libraries. +include(CompileProtos) + +set(EXTERNAL_GOOGLEAPIS_BYPRODUCTS) +foreach (proto ${EXTERNAL_GOOGLEAPIS_PROTO_FILES}) + list(APPEND EXTERNAL_GOOGLEAPIS_BYPRODUCTS + "${EXTERNAL_GOOGLEAPIS_SOURCE}/${proto}") +endforeach () + +file(GLOB protolists "protolists/*.list") +foreach (file IN LISTS protolists) + google_cloud_cpp_load_protolist(protos "${file}") + foreach (proto IN LISTS protos) + list(APPEND EXTERNAL_GOOGLEAPIS_BYPRODUCTS "${proto}") + endforeach () +endforeach () + +include(ExternalProject) + +# -- The build needs protobuf files. The original build scripts download them from a remote server (see target 'googleapis_download'). +# This is too unreliable in the context of ClickHouse ... we instead ship the downloaded archive with the ClickHouse source and +# extract it into the build directory directly. + +# Dummy googleapis_download target. This needs to exist because lots of other targets depend on it +# We however trick it a little bit saying this target generates the ${EXTERNAL_GOOGLEAPIS_BYPRODUCTS} BYPRODUCTS when +# actually the following section is the one actually providing such BYPRODUCTS. +externalproject_add( + googleapis_download + EXCLUDE_FROM_ALL ON + PREFIX "${EXTERNAL_GOOGLEAPIS_PREFIX}" + PATCH_COMMAND "" + DOWNLOAD_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + BUILD_BYPRODUCTS ${EXTERNAL_GOOGLEAPIS_BYPRODUCTS} + LOG_DOWNLOAD OFF) + +# Command that extracts the tarball into the proper dir +# Note: The hash must match the Google Cloud Api version, otherwise funny things will happen. +# Find the right hash in "strip-prefix" in MODULE.bazel in the subrepository +message(STATUS "Extracting googleapis tarball") +set(PB_HASH "e60db19f11f94175ac682c5898cce0f77cc508ea") +set(PB_ARCHIVE "${PB_HASH}.tar.gz") +set(PB_DIR "googleapis-${PB_HASH}") + +file(ARCHIVE_EXTRACT INPUT + "${ClickHouse_SOURCE_DIR}/contrib/google-cloud-cpp-cmake/googleapis/${PB_ARCHIVE}" + DESTINATION + "${EXTERNAL_GOOGLEAPIS_PREFIX}/tmp") + +file(REMOVE_RECURSE "${EXTERNAL_GOOGLEAPIS_SOURCE}") +file(RENAME + "${EXTERNAL_GOOGLEAPIS_PREFIX}/tmp/${PB_DIR}" + "${EXTERNAL_GOOGLEAPIS_SOURCE}" +) + +google_cloud_cpp_find_proto_include_dir(PROTO_INCLUDE_DIR) + +google_cloud_cpp_add_protos_property() + +function (external_googleapis_short_name var proto) + string(REPLACE "google/" "" short_name "${proto}") + string(REPLACE "/" "_" short_name "${short_name}") + string(REPLACE ".proto" "_protos" short_name "${short_name}") + set("${var}" + "${short_name}" + PARENT_SCOPE) +endfunction () + +# Create a single source proto library. +# +# * proto: the filename for the proto source. +# * (optional) ARGN: proto libraries the new library depends on. +function (external_googleapis_add_library proto) + external_googleapis_short_name(short_name "${proto}") + google_cloud_cpp_grpcpp_library( + google_cloud_cpp_${short_name} "${EXTERNAL_GOOGLEAPIS_SOURCE}/${proto}" + PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}" + "${PROTO_INCLUDE_DIR}") + + external_googleapis_set_version_and_alias("${short_name}") + + set(public_deps) + foreach (dep_short_name ${ARGN}) + list(APPEND public_deps "google-cloud-cpp::${dep_short_name}") + endforeach () + list(LENGTH public_deps public_deps_length) + if (public_deps_length EQUAL 0) + target_link_libraries("google_cloud_cpp_${short_name}") + else () + target_link_libraries("google_cloud_cpp_${short_name}" + PUBLIC ${public_deps}) + endif () +endfunction () + +function (external_googleapis_set_version_and_alias short_name) + add_dependencies("google_cloud_cpp_${short_name}" googleapis_download) + set_target_properties( + "google_cloud_cpp_${short_name}" + PROPERTIES EXPORT_NAME google-cloud-cpp::${short_name} + VERSION "${PROJECT_VERSION}" + SOVERSION ${PROJECT_VERSION_MAJOR}) + add_library("google-cloud-cpp::${short_name}" ALIAS + "google_cloud_cpp_${short_name}") +endfunction () + +if (GOOGLE_CLOUD_CPP_USE_INSTALLED_COMMON) + return() +endif () + +# Avoid adding new proto libraries to this list as these libraries are always +# installed, regardless of whether or not they are needed. See #8022 for more +# details. +set(external_googleapis_installed_libraries_list + # cmake-format: sort + google_cloud_cpp_cloud_common_common_protos + google_cloud_cpp_iam_credentials_v1_common_protos + google_cloud_cpp_iam_credentials_v1_iamcredentials_protos + google_cloud_cpp_iam_v1_iam_policy_protos + google_cloud_cpp_iam_v1_options_protos + google_cloud_cpp_iam_v1_policy_protos + google_cloud_cpp_longrunning_operations_protos) + +# These proto files cannot be added in the foreach() loop because they have +# dependencies. +set(PROTO_FILES_WITH_DEPENDENCIES + # cmake-format: sort + "google/api/annotations.proto" + "google/api/auth.proto" + "google/api/billing.proto" + "google/api/client.proto" + "google/api/control.proto" + "google/api/distribution.proto" + "google/api/endpoint.proto" + "google/api/log.proto" + "google/api/logging.proto" + "google/api/metric.proto" + "google/api/monitored_resource.proto" + "google/api/monitoring.proto" + "google/api/quota.proto" + "google/api/service.proto" + "google/api/usage.proto" + "google/cloud/location/locations.proto" + "google/rpc/status.proto") + +# For some directories *most* (but not all) the proto files are simple enough +# that the libraries can be generated with a foreach() loop. +foreach (proto IN LISTS EXTERNAL_GOOGLEAPIS_PROTO_FILES) + if (proto MATCHES "^google/api/" + OR proto MATCHES "^google/type" + OR proto MATCHES "^google/rpc/" + OR proto MATCHES "^google/cloud/") + external_googleapis_short_name(short_name "${proto}") + list(APPEND external_googleapis_installed_libraries_list + google_cloud_cpp_${short_name}) + list(FIND PROTO_FILES_WITH_DEPENDENCIES "${proto}" has_dependency) + if (has_dependency EQUAL -1) + external_googleapis_add_library("${proto}") + endif () + endif () +endforeach () + +# Out of order because they have dependencies. +external_googleapis_add_library("google/api/annotations.proto" api_http_protos) +external_googleapis_add_library("google/api/auth.proto" api_annotations_protos) +external_googleapis_add_library("google/api/client.proto" + api_launch_stage_protos) +external_googleapis_add_library("google/api/control.proto" api_policy_protos) +external_googleapis_add_library("google/api/metric.proto" + api_launch_stage_protos api_label_protos) +external_googleapis_add_library("google/api/billing.proto" + api_annotations_protos api_metric_protos) +external_googleapis_add_library("google/api/distribution.proto" + api_annotations_protos) +external_googleapis_add_library("google/api/endpoint.proto" + api_annotations_protos) +external_googleapis_add_library("google/api/log.proto" api_label_protos) +external_googleapis_add_library("google/api/logging.proto" + api_annotations_protos api_label_protos) +external_googleapis_add_library("google/api/monitored_resource.proto" + api_launch_stage_protos api_label_protos) +external_googleapis_add_library("google/api/monitoring.proto" + api_annotations_protos) +external_googleapis_add_library("google/api/quota.proto" api_annotations_protos) +external_googleapis_add_library("google/api/usage.proto" api_annotations_protos + api_visibility_protos) +external_googleapis_add_library( + "google/api/service.proto" + api_annotations_protos + api_auth_protos + api_backend_protos + api_billing_protos + api_client_protos + api_context_protos + api_control_protos + api_documentation_protos + api_endpoint_protos + api_http_protos + api_label_protos + api_log_protos + api_logging_protos + api_metric_protos + api_monitored_resource_protos + api_monitoring_protos + api_quota_protos + api_resource_protos + api_source_info_protos + api_system_parameter_protos + api_usage_protos) + +external_googleapis_add_library("google/cloud/location/locations.proto" + api_annotations_protos api_client_protos) + +external_googleapis_add_library("google/iam/v1/options.proto" + api_annotations_protos) +external_googleapis_add_library("google/iam/v1/policy.proto" + api_annotations_protos type_expr_protos) +external_googleapis_add_library("google/rpc/status.proto" + rpc_error_details_protos) + +external_googleapis_add_library( + "google/longrunning/operations.proto" api_annotations_protos + api_client_protos rpc_status_protos) + +external_googleapis_add_library( + "google/iam/v1/iam_policy.proto" + api_annotations_protos + api_client_protos + api_field_behavior_protos + api_resource_protos + iam_v1_options_protos + iam_v1_policy_protos) + +external_googleapis_add_library("google/iam/credentials/v1/common.proto" + api_field_behavior_protos api_resource_protos) + +external_googleapis_add_library( + "google/iam/credentials/v1/iamcredentials.proto" api_annotations_protos + api_client_protos iam_credentials_v1_common_protos) + +google_cloud_cpp_load_protolist(cloud_common_list "${GOOGLE_CLOUD_CPP_DIR}/external/googleapis/protolists/common.list") +google_cloud_cpp_load_protodeps(cloud_common_deps "${GOOGLE_CLOUD_CPP_DIR}/external/googleapis/protodeps/common.deps") +google_cloud_cpp_grpcpp_library( + google_cloud_cpp_cloud_common_common_protos ${cloud_common_list} + PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}" + "${PROTO_INCLUDE_DIR}") +external_googleapis_set_version_and_alias(cloud_common_common_protos) +target_link_libraries(google_cloud_cpp_cloud_common_common_protos + PUBLIC ${cloud_common_deps}) + +# Install the libraries and headers in the locations determined by +# GNUInstallDirs +include(GNUInstallDirs) + +install( + TARGETS ${external_googleapis_installed_libraries_list} + EXPORT googleapis-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT google_cloud_cpp_runtime + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT google_cloud_cpp_runtime + NAMELINK_COMPONENT google_cloud_cpp_development + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT google_cloud_cpp_development) + +foreach (target ${external_googleapis_installed_libraries_list}) + google_cloud_cpp_install_proto_library_headers("${target}") + google_cloud_cpp_install_proto_library_protos( + "${target}" "${EXTERNAL_GOOGLEAPIS_SOURCE}") +endforeach () + +# Create and install the pkg-config files. +foreach (target ${external_googleapis_installed_libraries_list}) + external_googleapis_install_pc("${target}") +endforeach () + +# Create and install the googleapis pkg-config file for backwards compatibility. +set(GOOGLE_CLOUD_CPP_PC_LIBS "") +google_cloud_cpp_set_pkgconfig_paths() +set(GOOGLE_CLOUD_CPP_PC_NAME "The Google APIS C++ Proto Library") +set(GOOGLE_CLOUD_CPP_PC_DESCRIPTION + "Provides C++ APIs to access Google Cloud Platforms.") +# This list is for backwards compatibility purposes only. DO NOT add new +# libraries to it. +string( + JOIN + " " + GOOGLE_CLOUD_CPP_PC_REQUIRES + "google_cloud_cpp_bigtable_protos" + "google_cloud_cpp_cloud_bigquery_protos" + "google_cloud_cpp_iam_protos" + "google_cloud_cpp_pubsub_protos" + "google_cloud_cpp_storage_protos" + "google_cloud_cpp_logging_protos" + "google_cloud_cpp_iam_v1_iam_policy_protos" + "google_cloud_cpp_iam_v1_options_protos" + "google_cloud_cpp_iam_v1_policy_protos" + "google_cloud_cpp_longrunning_operations_protos" + "google_cloud_cpp_api_auth_protos" + "google_cloud_cpp_api_annotations_protos" + "google_cloud_cpp_api_client_protos" + "google_cloud_cpp_api_field_behavior_protos" + "google_cloud_cpp_api_http_protos" + "google_cloud_cpp_rpc_status_protos" + "google_cloud_cpp_rpc_error_details_protos" + "google_cloud_cpp_type_expr_protos" + "grpc++" + "grpc" + "openssl" + "protobuf" + "zlib" + "libcares") +set(GOOGLE_CLOUD_CPP_PC_LIBS "") +google_cloud_cpp_set_pkgconfig_paths() +configure_file("${PROJECT_SOURCE_DIR}/cmake/templates/config.pc.in" + "googleapis.pc" @ONLY) +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/googleapis.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" + COMPONENT google_cloud_cpp_development) + +# Create and install the CMake configuration files. +# include(CMakePackageConfigHelpers) + +# configure_file("${CMAKE_CURRENT_LIST_DIR}/config.cmake.in" +# "google_cloud_cpp_googleapis-config.cmake" @ONLY) +# write_basic_package_version_file( +# "google_cloud_cpp_googleapis-config-version.cmake" +# VERSION ${PROJECT_VERSION} +# COMPATIBILITY ExactVersion) + +# Export the CMake targets to make it easy to create configuration files. +# install( +# EXPORT googleapis-targets +# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_googleapis" +# COMPONENT google_cloud_cpp_development) +# install( +# FILES +# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_googleapis-config.cmake" +# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_googleapis-config-version.cmake" +# "${PROJECT_SOURCE_DIR}/cmake/FindgRPC.cmake" +# "${PROJECT_SOURCE_DIR}/cmake/CompileProtos.cmake" +# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_googleapis" +# COMPONENT google_cloud_cpp_development) diff --git a/contrib/google-cloud-cpp-cmake/google_cloud_cpp_common.cmake b/contrib/google-cloud-cpp-cmake/google_cloud_cpp_common.cmake new file mode 100644 index 00000000000..5f23ce0fafb --- /dev/null +++ b/contrib/google-cloud-cpp-cmake/google_cloud_cpp_common.cmake @@ -0,0 +1,447 @@ +# ~~~ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ~~~ + +# File copied from google-cloud-cpp/google-cloud-cpp/google_cloud_cpp_common.cmake with minor modifications. + +set(GOOGLE_CLOUD_CPP_COMMON_DIR "${GOOGLE_CLOUD_CPP_DIR}/google/cloud") + +# Generate the version information from the CMake values. +# configure_file(${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/version_info.h.in +# ${CMAKE_CURRENT_SOURCE_DIR}/internal/version_info.h) + +# Create the file that captures build information. Having access to the compiler +# and build flags at runtime allows us to print better benchmark results. +string(TOUPPER "${CMAKE_BUILD_TYPE}" GOOGLE_CLOUD_CPP_BUILD_TYPE_UPPER) +configure_file(${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/build_info.cc.in internal/build_info.cc) + +# the client library +add_library( + google_cloud_cpp_common # cmake-format: sort + ${CMAKE_CURRENT_BINARY_DIR}/internal/build_info.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/access_token.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/access_token.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/backoff_policy.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/common_options.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/credentials.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/credentials.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/experimental_tag.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/future.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/future_generic.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/future_void.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/idempotency.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/absl_str_cat_quiet.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/absl_str_join_quiet.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/absl_str_replace_quiet.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/algorithm.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/api_client_header.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/api_client_header.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/attributes.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/auth_header_error.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/auth_header_error.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/backoff_policy.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/backoff_policy.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/base64_transforms.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/base64_transforms.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/big_endian.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/build_info.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/call_context.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/clock.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/compiler_info.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/compiler_info.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/compute_engine_util.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/compute_engine_util.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/credentials_impl.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/credentials_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_future_status.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_future_status.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/detect_gcp.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/detect_gcp_impl.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/detect_gcp_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/diagnostics_pop.inc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/diagnostics_push.inc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/disable_deprecation_warnings.inc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/disable_msvc_crt_secure_warnings.inc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/error_context.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/error_context.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/filesystem.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/filesystem.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/format_time_point.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/format_time_point.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_base.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_coroutines.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_fwd.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_impl.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_then_impl.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_then_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/getenv.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/getenv.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/group_options.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/invocation_id_generator.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/invocation_id_generator.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/invoke_result.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/ios_flags_saver.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/log_impl.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/log_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/make_status.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/make_status.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/noexcept_action.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/noexcept_action.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/non_constructible.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/opentelemetry.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/opentelemetry.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/opentelemetry_context.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/opentelemetry_context.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/pagination_range.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/parse_rfc3339.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/parse_rfc3339.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/populate_common_options.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/populate_common_options.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/port_platform.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/random.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/random.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_info.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_loop_helpers.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_loop_helpers.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_policy_impl.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_policy_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/service_endpoint.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/service_endpoint.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/sha256_hash.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/sha256_hash.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/sha256_hmac.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/sha256_hmac.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/sha256_type.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/status_payload_keys.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/status_payload_keys.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/status_utils.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/status_utils.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/strerror.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/strerror.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/subject_token.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/subject_token.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/throw_delegate.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/throw_delegate.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/timer_queue.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/timer_queue.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/trace_propagator.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/trace_propagator.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/traced_stream_range.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/tuple.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/type_list.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/type_traits.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/url_encode.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/url_encode.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/user_agent_prefix.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/user_agent_prefix.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/utility.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/version_info.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/kms_key_name.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/kms_key_name.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/location.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/location.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/log.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/log.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/no_await_tag.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/opentelemetry_options.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/optional.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/options.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/options.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/polling_policy.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/project.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/project.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/retry_policy.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/rpc_metadata.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/status.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/status.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/status_or.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/stream_range.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/terminate_handler.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/terminate_handler.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/tracing_options.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/tracing_options.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/universe_domain_options.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/version.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/version.h) +target_link_libraries( + google_cloud_cpp_common + PUBLIC absl::base + absl::memory + absl::optional + absl::span + absl::str_format + absl::time + absl::variant + Threads::Threads) +if (WIN32) + target_compile_definitions(google_cloud_cpp_common + PRIVATE WIN32_LEAN_AND_MEAN) + target_link_libraries(google_cloud_cpp_common PUBLIC bcrypt) +else () + target_link_libraries(google_cloud_cpp_common PUBLIC OpenSSL::Crypto ch_contrib::re2) +endif () + +google_cloud_cpp_add_common_options(google_cloud_cpp_common) +target_include_directories( + google_cloud_cpp_common PUBLIC $ + $) + +# We're putting generated code into ${PROJECT_BINARY_DIR} (e.g. compiled +# protobufs or build info), so we need it on the include path, however we don't +# want it checked by linters so we mark it as SYSTEM. +target_include_directories(google_cloud_cpp_common SYSTEM + PUBLIC $) +target_compile_options(google_cloud_cpp_common + PUBLIC ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) + +set_target_properties( + google_cloud_cpp_common + PROPERTIES EXPORT_NAME "google-cloud-cpp::common" + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR}) +add_library(google-cloud-cpp::common ALIAS google_cloud_cpp_common) + +#create_bazel_config(google_cloud_cpp_common YEAR 2018) + +# # Export the CMake targets to make it easy to create configuration files. +# install( +# EXPORT google_cloud_cpp_common-targets +# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_common" +# COMPONENT google_cloud_cpp_development) + +# # Install the libraries and headers in the locations determined by +# # GNUInstallDirs +# install( +# TARGETS google_cloud_cpp_common +# EXPORT google_cloud_cpp_common-targets +# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +# COMPONENT google_cloud_cpp_runtime +# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +# COMPONENT google_cloud_cpp_runtime +# NAMELINK_COMPONENT google_cloud_cpp_development +# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +# COMPONENT google_cloud_cpp_development) + +#google_cloud_cpp_install_headers(google_cloud_cpp_common include/google/cloud) + +# google_cloud_cpp_add_pkgconfig( +# "common" +# "Google Cloud C++ Client Library Common Components" +# "Common Components used by the Google Cloud C++ Client Libraries." +# "absl_optional" +# "absl_span" +# "absl_strings" +# "absl_time" +# "absl_time_zone" +# "absl_variant" +# "${GOOGLE_CLOUD_CPP_OPENTELEMETRY_API}" +# NON_WIN32_REQUIRES +# openssl +# WIN32_LIBS +# bcrypt) + +# Create and install the CMake configuration files. +# configure_file("config.cmake.in" "google_cloud_cpp_common-config.cmake" @ONLY) +# write_basic_package_version_file( +# "google_cloud_cpp_common-config-version.cmake" +# VERSION ${PROJECT_VERSION} +# COMPATIBILITY ExactVersion) + +# install( +# FILES +# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_common-config.cmake" +# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_common-config-version.cmake" +# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_common" +# COMPONENT google_cloud_cpp_development) + +# if (GOOGLE_CLOUD_CPP_WITH_MOCKS) +# # Create a header-only library for the mocks. We use a CMake `INTERFACE` +# # library for these, a regular library would not work on macOS (where the +# # library needs at least one .o file). +# add_library(google_cloud_cpp_mocks INTERFACE) +# set(google_cloud_cpp_mocks_hdrs +# # cmake-format: sort +# mocks/current_options.h mocks/mock_async_streaming_read_write_rpc.h +# mocks/mock_stream_range.h) +# export_list_to_bazel("google_cloud_cpp_mocks.bzl" +# "google_cloud_cpp_mocks_hdrs" YEAR "2022") +# target_link_libraries( +# google_cloud_cpp_mocks INTERFACE google-cloud-cpp::common GTest::gmock +# GTest::gtest) +# set_target_properties(google_cloud_cpp_mocks +# PROPERTIES EXPORT_NAME google-cloud-cpp::mocks) +# target_include_directories( +# google_cloud_cpp_mocks +# INTERFACE $ +# $ +# $) +# target_compile_options(google_cloud_cpp_mocks +# INTERFACE ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) +# add_library(google-cloud-cpp::mocks ALIAS google_cloud_cpp_mocks) + +# install( +# FILES ${google_cloud_cpp_mocks_hdrs} +# DESTINATION "include/google/cloud/mocks" +# COMPONENT google_cloud_cpp_development) + +# # Export the CMake targets to make it easy to create configuration files. +# install( +# EXPORT google_cloud_cpp_mocks-targets +# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_mocks" +# COMPONENT google_cloud_cpp_development) + +# install( +# TARGETS google_cloud_cpp_mocks +# EXPORT google_cloud_cpp_mocks-targets +# COMPONENT google_cloud_cpp_development) + +# google_cloud_cpp_add_pkgconfig( +# "mocks" "Google Cloud C++ Testing Library" +# "Helpers for testing the Google Cloud C++ Client Libraries" +# "google_cloud_cpp_common" "gmock") + +# # Create and install the CMake configuration files. +# configure_file("mocks-config.cmake.in" +# "google_cloud_cpp_mocks-config.cmake" @ONLY) +# write_basic_package_version_file( +# "google_cloud_cpp_mocks-config-version.cmake" +# VERSION ${PROJECT_VERSION} +# COMPATIBILITY ExactVersion) + +# install( +# FILES +# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_mocks-config.cmake" +# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_mocks-config-version.cmake" +# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_mocks" +# COMPONENT google_cloud_cpp_development) +# endif () + +# if (BUILD_TESTING) +# include(FindBenchmarkWithWorkarounds) + +# set(google_cloud_cpp_common_unit_tests +# # cmake-format: sort +# access_token_test.cc +# common_options_test.cc +# future_coroutines_test.cc +# future_generic_test.cc +# future_generic_then_test.cc +# future_void_test.cc +# future_void_then_test.cc +# internal/algorithm_test.cc +# internal/api_client_header_test.cc +# internal/backoff_policy_test.cc +# internal/base64_transforms_test.cc +# internal/big_endian_test.cc +# internal/call_context_test.cc +# internal/clock_test.cc +# internal/compiler_info_test.cc +# internal/compute_engine_util_test.cc +# internal/credentials_impl_test.cc +# internal/debug_future_status_test.cc +# internal/debug_string_test.cc +# internal/detect_gcp_test.cc +# internal/error_context_test.cc +# internal/filesystem_test.cc +# internal/format_time_point_test.cc +# internal/future_impl_test.cc +# internal/future_then_impl_test.cc +# internal/group_options_test.cc +# internal/invocation_id_generator_test.cc +# internal/invoke_result_test.cc +# internal/log_impl_test.cc +# internal/make_status_test.cc +# internal/noexcept_action_test.cc +# internal/opentelemetry_context_test.cc +# internal/opentelemetry_test.cc +# internal/pagination_range_test.cc +# internal/parse_rfc3339_test.cc +# internal/populate_common_options_test.cc +# internal/random_test.cc +# internal/retry_loop_helpers_test.cc +# internal/retry_policy_impl_test.cc +# internal/service_endpoint_test.cc +# internal/sha256_hash_test.cc +# internal/sha256_hmac_test.cc +# internal/status_payload_keys_test.cc +# internal/status_utils_test.cc +# internal/strerror_test.cc +# internal/subject_token_test.cc +# internal/throw_delegate_test.cc +# internal/timer_queue_test.cc +# internal/trace_propagator_test.cc +# internal/traced_stream_range_test.cc +# internal/tuple_test.cc +# internal/type_list_test.cc +# internal/url_encode_test.cc +# internal/user_agent_prefix_test.cc +# internal/utility_test.cc +# kms_key_name_test.cc +# location_test.cc +# log_test.cc +# mocks/current_options_test.cc +# mocks/mock_stream_range_test.cc +# options_test.cc +# polling_policy_test.cc +# project_test.cc +# status_or_test.cc +# status_test.cc +# stream_range_test.cc +# terminate_handler_test.cc +# tracing_options_test.cc) + +# # Export the list of unit tests so the Bazel BUILD file can pick it up. +# export_list_to_bazel("google_cloud_cpp_common_unit_tests.bzl" +# "google_cloud_cpp_common_unit_tests" YEAR "2018") + +# foreach (fname ${google_cloud_cpp_common_unit_tests}) +# google_cloud_cpp_add_executable(target "common" "${fname}") +# target_link_libraries( +# ${target} +# PRIVATE google_cloud_cpp_testing +# google-cloud-cpp::common +# google-cloud-cpp::mocks +# absl::variant +# GTest::gmock_main +# GTest::gmock +# GTest::gtest) +# google_cloud_cpp_add_common_options(${target}) +# add_test(NAME ${target} COMMAND ${target}) +# endforeach () + +# set(google_cloud_cpp_common_benchmarks # cmake-format: sort +# options_benchmark.cc) + +# # Export the list of benchmarks to a .bzl file so we do not need to maintain +# # the list in two places. +# export_list_to_bazel("google_cloud_cpp_common_benchmarks.bzl" +# "google_cloud_cpp_common_benchmarks" YEAR "2020") + +# # Generate a target for each benchmark. +# foreach (fname ${google_cloud_cpp_common_benchmarks}) +# google_cloud_cpp_add_executable(target "common" "${fname}") +# add_test(NAME ${target} COMMAND ${target}) +# target_link_libraries(${target} PRIVATE google-cloud-cpp::common +# benchmark::benchmark_main) +# google_cloud_cpp_add_common_options(${target}) +# endforeach () +# endif () + +# if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) +# google_cloud_cpp_add_samples_relative("common" "samples/") +# endif () diff --git a/contrib/google-cloud-cpp-cmake/google_cloud_cpp_grpc_utils.cmake b/contrib/google-cloud-cpp-cmake/google_cloud_cpp_grpc_utils.cmake new file mode 100644 index 00000000000..e5538b2eaa8 --- /dev/null +++ b/contrib/google-cloud-cpp-cmake/google_cloud_cpp_grpc_utils.cmake @@ -0,0 +1,350 @@ +# ~~~ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ~~~ + +# File copied from google-cloud-cpp/google-cloud-cpp/google_cloud_cpp_grpc_utils.cmake with minor modifications. + +set(GOOGLE_CLOUD_CPP_COMMON_DIR "${GOOGLE_CLOUD_CPP_DIR}/google/cloud") + +# the library +add_library( + google_cloud_cpp_grpc_utils # cmake-format: sort + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/async_operation.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/async_streaming_read_write_rpc.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/background_threads.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/completion_queue.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/completion_queue.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/connection_options.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/connection_options.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_error_delegate.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_error_delegate.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_options.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_options.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_utils/async_operation.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_utils/completion_queue.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_utils/grpc_error_delegate.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_utils/version.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/iam_updater.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_connection_ready.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_connection_ready.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_long_running_operation.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_polling_loop.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_polling_loop.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_stream_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_write_stream_auth.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_write_stream_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_write_stream_logging.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_write_stream_timeout.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_write_stream_tracing.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_retry_loop.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_retry_unary_rpc.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_rpc_details.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc_auth.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc_logging.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc_timeout.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc_tracing.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc_auth.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc_logging.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc_timeout.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc_tracing.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/background_threads_impl.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/background_threads_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/completion_queue_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string_protobuf.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string_protobuf.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string_status.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string_status.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/default_completion_queue_impl.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/default_completion_queue_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/extract_long_running_result.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/extract_long_running_result.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_access_token_authentication.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_access_token_authentication.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_api_key_authentication.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_api_key_authentication.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_async_access_token_cache.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_async_access_token_cache.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_channel_credentials_authentication.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_channel_credentials_authentication.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_impersonate_service_account.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_impersonate_service_account.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_metadata_view.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_opentelemetry.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_opentelemetry.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_request_metadata.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_request_metadata.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_service_account_authentication.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_service_account_authentication.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/log_wrapper.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/log_wrapper.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/minimal_iam_credentials_stub.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/minimal_iam_credentials_stub.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/populate_grpc_options.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/populate_grpc_options.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/resumable_streaming_read_rpc.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_loop.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/routing_matcher.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/setup_context.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_read_rpc.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_read_rpc.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_read_rpc_logging.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_read_rpc_tracing.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_write_rpc.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_write_rpc_impl.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_write_rpc_impl.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_write_rpc_logging.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_write_rpc_tracing.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/time_utils.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/time_utils.h + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/unified_grpc_credentials.cc + ${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/unified_grpc_credentials.h) +target_link_libraries( + google_cloud_cpp_grpc_utils + PUBLIC absl::function_ref + absl::memory + absl::time + absl::variant + google-cloud-cpp::iam_credentials_v1_iamcredentials_protos + google-cloud-cpp::iam_v1_policy_protos + google-cloud-cpp::longrunning_operations_protos + google-cloud-cpp::iam_v1_iam_policy_protos + google-cloud-cpp::rpc_error_details_protos + google-cloud-cpp::rpc_status_protos + google-cloud-cpp::common + gRPC::grpc++ + gRPC::grpc) +google_cloud_cpp_add_common_options(google_cloud_cpp_grpc_utils) +target_include_directories( + google_cloud_cpp_grpc_utils PUBLIC $ + $) +target_compile_options(google_cloud_cpp_grpc_utils + PUBLIC ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) +set_target_properties( + google_cloud_cpp_grpc_utils + PROPERTIES EXPORT_NAME "google-cloud-cpp::grpc_utils" + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR}) +add_library(google-cloud-cpp::grpc_utils ALIAS google_cloud_cpp_grpc_utils) + +#create_bazel_config(google_cloud_cpp_grpc_utils YEAR 2019) + +# # Install the libraries and headers in the locations determined by +# # GNUInstallDirs +# install( +# TARGETS +# EXPORT grpc_utils-targets +# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +# COMPONENT google_cloud_cpp_development) + +# # Export the CMake targets to make it easy to create configuration files. +# install( +# EXPORT grpc_utils-targets +# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_grpc_utils" +# COMPONENT google_cloud_cpp_development) + +# install( +# TARGETS google_cloud_cpp_grpc_utils +# EXPORT grpc_utils-targets +# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +# COMPONENT google_cloud_cpp_runtime +# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +# COMPONENT google_cloud_cpp_runtime +# NAMELINK_COMPONENT google_cloud_cpp_development +# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +# COMPONENT google_cloud_cpp_development) + +# google_cloud_cpp_install_headers(google_cloud_cpp_grpc_utils +# include/google/cloud) + +# google_cloud_cpp_add_pkgconfig( +# grpc_utils +# "gRPC Utilities for the Google Cloud C++ Client Library" +# "Provides gRPC Utilities for the Google Cloud C++ Client Library." +# "google_cloud_cpp_common" +# "google_cloud_cpp_iam_credentials_v1_iamcredentials_protos" +# "google_cloud_cpp_iam_v1_policy_protos" +# "google_cloud_cpp_iam_v1_iam_policy_protos" +# "google_cloud_cpp_longrunning_operations_protos" +# "google_cloud_cpp_rpc_status_protos" +# "absl_function_ref" +# "absl_strings" +# "absl_time" +# "absl_time_zone" +# "absl_variant" +# "openssl") + +# # Create and install the CMake configuration files. +# configure_file("grpc_utils/config.cmake.in" +# "google_cloud_cpp_grpc_utils-config.cmake" @ONLY) +# write_basic_package_version_file( +# "google_cloud_cpp_grpc_utils-config-version.cmake" +# VERSION ${PROJECT_VERSION} +# COMPATIBILITY ExactVersion) + +# install( +# FILES +# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_grpc_utils-config.cmake" +# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_grpc_utils-config-version.cmake" +# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_grpc_utils" +# COMPONENT google_cloud_cpp_development) + +# function (google_cloud_cpp_grpc_utils_add_test fname labels) +# google_cloud_cpp_add_executable(target "common" "${fname}") +# target_link_libraries( +# ${target} +# PRIVATE google-cloud-cpp::grpc_utils +# google_cloud_cpp_testing_grpc +# google_cloud_cpp_testing +# google-cloud-cpp::common +# absl::variant +# GTest::gmock_main +# GTest::gmock +# GTest::gtest +# gRPC::grpc++ +# gRPC::grpc) +# google_cloud_cpp_add_common_options(${target}) +# add_test(NAME ${target} COMMAND ${target}) +# set_tests_properties(${target} PROPERTIES LABELS "${labels}") +# endfunction () + +# if (BUILD_TESTING) +# include(FindBenchmarkWithWorkarounds) + +# # List the unit tests, then setup the targets and dependencies. +# set(google_cloud_cpp_grpc_utils_unit_tests +# # cmake-format: sort +# completion_queue_test.cc +# connection_options_test.cc +# grpc_error_delegate_test.cc +# grpc_options_test.cc +# internal/async_connection_ready_test.cc +# internal/async_long_running_operation_test.cc +# internal/async_polling_loop_test.cc +# internal/async_read_write_stream_auth_test.cc +# internal/async_read_write_stream_impl_test.cc +# internal/async_read_write_stream_logging_test.cc +# internal/async_read_write_stream_timeout_test.cc +# internal/async_read_write_stream_tracing_test.cc +# internal/async_retry_loop_test.cc +# internal/async_retry_unary_rpc_test.cc +# internal/async_streaming_read_rpc_auth_test.cc +# internal/async_streaming_read_rpc_impl_test.cc +# internal/async_streaming_read_rpc_logging_test.cc +# internal/async_streaming_read_rpc_timeout_test.cc +# internal/async_streaming_read_rpc_tracing_test.cc +# internal/async_streaming_write_rpc_auth_test.cc +# internal/async_streaming_write_rpc_impl_test.cc +# internal/async_streaming_write_rpc_logging_test.cc +# internal/async_streaming_write_rpc_timeout_test.cc +# internal/async_streaming_write_rpc_tracing_test.cc +# internal/background_threads_impl_test.cc +# internal/debug_string_protobuf_test.cc +# internal/debug_string_status_test.cc +# internal/extract_long_running_result_test.cc +# internal/grpc_access_token_authentication_test.cc +# internal/grpc_async_access_token_cache_test.cc +# internal/grpc_channel_credentials_authentication_test.cc +# internal/grpc_opentelemetry_test.cc +# internal/grpc_request_metadata_test.cc +# internal/grpc_service_account_authentication_test.cc +# internal/log_wrapper_test.cc +# internal/minimal_iam_credentials_stub_test.cc +# internal/populate_grpc_options_test.cc +# internal/resumable_streaming_read_rpc_test.cc +# internal/retry_loop_test.cc +# internal/routing_matcher_test.cc +# internal/streaming_read_rpc_logging_test.cc +# internal/streaming_read_rpc_test.cc +# internal/streaming_read_rpc_tracing_test.cc +# internal/streaming_write_rpc_logging_test.cc +# internal/streaming_write_rpc_test.cc +# internal/streaming_write_rpc_tracing_test.cc +# internal/time_utils_test.cc +# internal/unified_grpc_credentials_test.cc) + +# # List the unit tests, then setup the targets and dependencies. +# set(google_cloud_cpp_grpc_utils_integration_tests +# # cmake-format: sort +# internal/grpc_impersonate_service_account_integration_test.cc) + +# # Export the list of unit and integration tests so the Bazel BUILD file can +# # pick them up. +# export_list_to_bazel("google_cloud_cpp_grpc_utils_unit_tests.bzl" +# "google_cloud_cpp_grpc_utils_unit_tests" YEAR "2019") +# export_list_to_bazel( +# "google_cloud_cpp_grpc_utils_integration_tests.bzl" +# "google_cloud_cpp_grpc_utils_integration_tests" YEAR "2021") + +# foreach (fname ${google_cloud_cpp_grpc_utils_unit_tests}) +# google_cloud_cpp_grpc_utils_add_test("${fname}" "") +# endforeach () + +# # TODO(#12485) - remove dependency on bigtable in this integration test. +# if (NOT bigtable IN_LIST GOOGLE_CLOUD_CPP_ENABLE) +# list(REMOVE_ITEM google_cloud_cpp_grpc_utils_integration_tests +# "internal/grpc_impersonate_service_account_integration_test.cc") +# endif () + +# foreach (fname ${google_cloud_cpp_grpc_utils_integration_tests}) +# google_cloud_cpp_add_executable(target "common" "${fname}") +# target_link_libraries( +# ${target} +# PRIVATE google-cloud-cpp::grpc_utils +# google_cloud_cpp_testing_grpc +# google_cloud_cpp_testing +# google-cloud-cpp::common +# google-cloud-cpp::iam_credentials_v1_iamcredentials_protos +# absl::variant +# GTest::gmock_main +# GTest::gmock +# GTest::gtest +# gRPC::grpc++ +# gRPC::grpc) +# google_cloud_cpp_add_common_options(${target}) +# add_test(NAME ${target} COMMAND ${target}) +# set_tests_properties(${target} PROPERTIES LABELS +# "integration-test-production") +# # TODO(12485) - remove dep on bigtable_protos +# if (bigtable IN_LIST GOOGLE_CLOUD_CPP_ENABLE) +# target_link_libraries(${target} +# PRIVATE google-cloud-cpp::bigtable_protos) +# endif () +# endforeach () + +# set(google_cloud_cpp_grpc_utils_benchmarks # cmake-format: sortable +# completion_queue_benchmark.cc) + +# # Export the list of benchmarks to a .bzl file so we do not need to maintain +# # the list in two places. +# export_list_to_bazel("google_cloud_cpp_grpc_utils_benchmarks.bzl" +# "google_cloud_cpp_grpc_utils_benchmarks" YEAR "2020") + +# # Generate a target for each benchmark. +# foreach (fname ${google_cloud_cpp_grpc_utils_benchmarks}) +# google_cloud_cpp_add_executable(target "common" "${fname}") +# add_test(NAME ${target} COMMAND ${target}) +# target_link_libraries( +# ${target} +# PRIVATE google-cloud-cpp::grpc_utils google-cloud-cpp::common +# benchmark::benchmark_main) +# google_cloud_cpp_add_common_options(${target}) +# endforeach () +# endif () diff --git a/contrib/google-cloud-cpp-cmake/googleapis/e60db19f11f94175ac682c5898cce0f77cc508ea.tar.gz b/contrib/google-cloud-cpp-cmake/googleapis/e60db19f11f94175ac682c5898cce0f77cc508ea.tar.gz new file mode 100644 index 00000000000..07c1a189d9b Binary files /dev/null and b/contrib/google-cloud-cpp-cmake/googleapis/e60db19f11f94175ac682c5898cce0f77cc508ea.tar.gz differ diff --git a/contrib/jwt-cpp b/contrib/jwt-cpp new file mode 160000 index 00000000000..a6927cb8140 --- /dev/null +++ b/contrib/jwt-cpp @@ -0,0 +1 @@ +Subproject commit a6927cb8140858c34e05d1a954626b9849fbcdfc diff --git a/contrib/jwt-cpp-cmake/CMakeLists.txt b/contrib/jwt-cpp-cmake/CMakeLists.txt new file mode 100644 index 00000000000..4cb8716bc68 --- /dev/null +++ b/contrib/jwt-cpp-cmake/CMakeLists.txt @@ -0,0 +1,23 @@ +set(ENABLE_JWT_CPP_DEFAULT OFF) +if(ENABLE_LIBRARIES AND CLICKHOUSE_CLOUD) + set(ENABLE_JWT_CPP_DEFAULT ON) +endif() + +option(ENABLE_JWT_CPP "Enable jwt-cpp library" ${ENABLE_JWT_CPP_DEFAULT}) + +if (NOT ENABLE_JWT_CPP) + message(STATUS "Not using jwt-cpp") + return() +endif() + +if(ENABLE_JWT_CPP) + if(NOT TARGET OpenSSL::Crypto) + message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use jwt-cpp without OpenSSL") + endif() +endif() + +set (JWT_CPP_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/jwt-cpp/include") + +add_library (_jwt-cpp INTERFACE) +target_include_directories(_jwt-cpp SYSTEM BEFORE INTERFACE ${JWT_CPP_INCLUDE_DIR}) +add_library(ch_contrib::jwt-cpp ALIAS _jwt-cpp) diff --git a/contrib/update-submodules.sh b/contrib/update-submodules.sh index 072d7a5dc2f..e496f905356 100755 --- a/contrib/update-submodules.sh +++ b/contrib/update-submodules.sh @@ -24,7 +24,7 @@ git config --file .gitmodules --get-regexp '.*path' | sed 's/[^ ]* //' | xargs - # We don't want to depend on any third-party CMake files. # To check it, find and delete them. grep -o -P '"contrib/[^"]+"' .gitmodules | - grep -v -P 'contrib/(llvm-project|google-protobuf|grpc|abseil-cpp|corrosion|aws-crt-cpp)' | + grep -v -P 'contrib/(llvm-project|google-protobuf|grpc|abseil-cpp|corrosion|aws-crt-cpp|google-cloud-cpp)' | xargs -I@ find @ \ -'(' -name 'CMakeLists.txt' -or -name '*.cmake' -')' -and -not -name '*.h.cmake' \ -delete diff --git a/docker/keeper/Dockerfile b/docker/keeper/Dockerfile index 4ecc087afb4..0d75c0bd225 100644 --- a/docker/keeper/Dockerfile +++ b/docker/keeper/Dockerfile @@ -31,14 +31,14 @@ COPY entrypoint.sh /entrypoint.sh ARG TARGETARCH RUN arch=${TARGETARCH:-amd64} \ && case $arch in \ - amd64) mkdir -p /lib64 && ln -sf /lib/ld-2.31.so /lib64/ld-linux-x86-64.so.2 ;; \ - arm64) ln -sf /lib/ld-2.31.so /lib/ld-linux-aarch64.so.1 ;; \ + amd64) mkdir -p /lib64 && ln -sf /lib/ld-2.35.so /lib64/ld-linux-x86-64.so.2 ;; \ + arm64) ln -sf /lib/ld-2.35.so /lib/ld-linux-aarch64.so.1 ;; \ esac # lts / testing / prestable / etc ARG REPO_CHANNEL="stable" ARG REPOSITORY="https://packages.clickhouse.com/tgz/${REPO_CHANNEL}" -ARG VERSION="24.10.1.2812" +ARG VERSION="24.10.2.80" ARG PACKAGES="clickhouse-keeper" ARG DIRECT_DOWNLOAD_URLS="" @@ -86,7 +86,8 @@ RUN arch=${TARGETARCH:-amd64} \ ARG DEFAULT_CONFIG_DIR="/etc/clickhouse-keeper" ARG DEFAULT_DATA_DIR="/var/lib/clickhouse-keeper" ARG DEFAULT_LOG_DIR="/var/log/clickhouse-keeper" -RUN mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_LOG_DIR}" "${DEFAULT_CONFIG_DIR}" \ +RUN clickhouse-keeper --version \ + && mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_LOG_DIR}" "${DEFAULT_CONFIG_DIR}" \ && chown clickhouse:clickhouse "${DEFAULT_DATA_DIR}" \ && chown root:clickhouse "${DEFAULT_LOG_DIR}" \ && chmod ugo+Xrw -R "${DEFAULT_DATA_DIR}" "${DEFAULT_LOG_DIR}" "${DEFAULT_CONFIG_DIR}" diff --git a/docker/server/Dockerfile.alpine b/docker/server/Dockerfile.alpine index 93acf1a5773..5b3d86ca3e6 100644 --- a/docker/server/Dockerfile.alpine +++ b/docker/server/Dockerfile.alpine @@ -35,7 +35,7 @@ RUN arch=${TARGETARCH:-amd64} \ # lts / testing / prestable / etc ARG REPO_CHANNEL="stable" ARG REPOSITORY="https://packages.clickhouse.com/tgz/${REPO_CHANNEL}" -ARG VERSION="24.10.1.2812" +ARG VERSION="24.10.2.80" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" ARG DIRECT_DOWNLOAD_URLS="" diff --git a/docker/server/Dockerfile.ubuntu b/docker/server/Dockerfile.ubuntu index e6bde845c4e..2e56f676cbc 100644 --- a/docker/server/Dockerfile.ubuntu +++ b/docker/server/Dockerfile.ubuntu @@ -28,7 +28,7 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list ARG REPO_CHANNEL="stable" ARG REPOSITORY="deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb ${REPO_CHANNEL} main" -ARG VERSION="24.10.1.2812" +ARG VERSION="24.10.2.80" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" #docker-official-library:off diff --git a/docs/changelogs/v24.10.2.80-stable.md b/docs/changelogs/v24.10.2.80-stable.md new file mode 100644 index 00000000000..18b11df41ef --- /dev/null +++ b/docs/changelogs/v24.10.2.80-stable.md @@ -0,0 +1,61 @@ +--- +sidebar_position: 1 +sidebar_label: 2024 +--- + +# 2024 Changelog + +### ClickHouse release v24.10.2.80-stable (96b80057159) FIXME as compared to v24.10.1.2812-stable (9cd0a3738d5) + +#### Backward Incompatible Change +* Backported in [#71363](https://github.com/ClickHouse/ClickHouse/issues/71363): Fix possible error `No such file or directory` due to unescaped special symbols in files for JSON subcolumns. [#71182](https://github.com/ClickHouse/ClickHouse/pull/71182) ([Pavel Kruglov](https://github.com/Avogar)). + +#### Performance Improvement +* Backported in [#71852](https://github.com/ClickHouse/ClickHouse/issues/71852): Improve the performance and accuracy of system.query_metric_log collection interval by reducing the critical region. [#71473](https://github.com/ClickHouse/ClickHouse/pull/71473) ([Pablo Marcos](https://github.com/pamarcos)). + +#### Improvement +* Backported in [#71495](https://github.com/ClickHouse/ClickHouse/issues/71495): Enable `parallel_replicas_local_plan` by default. Building a full-fledged local plan on the query initiator improves parallel replicas performance with less resource consumption, provides opportunities to apply more query optimizations. [#70171](https://github.com/ClickHouse/ClickHouse/pull/70171) ([Igor Nikonov](https://github.com/devcrafter)). +* Backported in [#71985](https://github.com/ClickHouse/ClickHouse/issues/71985): Fixes RIGHT / FULL joins in queries with parallel replicas. Now, RIGHT joins can be executed with parallel replicas (right table reading is distributed). FULL joins can't be parallelized among nodes, - executed locally. [#71162](https://github.com/ClickHouse/ClickHouse/pull/71162) ([Igor Nikonov](https://github.com/devcrafter)). +* Backported in [#71670](https://github.com/ClickHouse/ClickHouse/issues/71670): When user/group is given as ID, the `clickhouse su` fails. This patch fixes it to accept `UID:GID` as well. ### Documentation entry for user-facing changes. [#71626](https://github.com/ClickHouse/ClickHouse/pull/71626) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#71940](https://github.com/ClickHouse/ClickHouse/issues/71940): Update `HostResolver` 3 times in a `history` period. [#71863](https://github.com/ClickHouse/ClickHouse/pull/71863) ([Sema Checherinda](https://github.com/CheSema)). +* Backported in [#71922](https://github.com/ClickHouse/ClickHouse/issues/71922): Allow_reorder_prewhere_conditions is on by default with old compatibility settings. [#71867](https://github.com/ClickHouse/ClickHouse/pull/71867) ([Raúl Marín](https://github.com/Algunenano)). + +#### Bug Fix (user-visible misbehavior in an official stable release) +* Backported in [#71588](https://github.com/ClickHouse/ClickHouse/issues/71588): Fix mismatched aggreage function name of quantileExactWeightedInterpolated. The bug was introduced in https://github.com/ClickHouse/ClickHouse/pull/69619. cc @Algunenano. [#71168](https://github.com/ClickHouse/ClickHouse/pull/71168) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Backported in [#71357](https://github.com/ClickHouse/ClickHouse/issues/71357): Fix bad_weak_ptr exception with Dynamic in functions comparison. [#71183](https://github.com/ClickHouse/ClickHouse/pull/71183) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#71467](https://github.com/ClickHouse/ClickHouse/issues/71467): Fix bug of memory usage increase if enable_filesystem_cache=1, but disk in storage configuration did not have any cache configuration. [#71261](https://github.com/ClickHouse/ClickHouse/pull/71261) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Backported in [#71355](https://github.com/ClickHouse/ClickHouse/issues/71355): Fix possible error "Cannot read all data" erros during deserialization of LowCardinality dictionary from Dynamic column. [#71299](https://github.com/ClickHouse/ClickHouse/pull/71299) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#71324](https://github.com/ClickHouse/ClickHouse/issues/71324): Fix incomplete cleanup of parallel output format in the client. [#71304](https://github.com/ClickHouse/ClickHouse/pull/71304) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71466](https://github.com/ClickHouse/ClickHouse/issues/71466): Added missing unescaping in named collections. Without fix clickhouse-server can't start. [#71308](https://github.com/ClickHouse/ClickHouse/pull/71308) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* Backported in [#71393](https://github.com/ClickHouse/ClickHouse/issues/71393): Fix inconsistent AST formatting when granting wrong wildcard grants [#71309](https://github.com/ClickHouse/ClickHouse/issues/71309). [#71332](https://github.com/ClickHouse/ClickHouse/pull/71332) ([pufit](https://github.com/pufit)). +* Backported in [#71379](https://github.com/ClickHouse/ClickHouse/issues/71379): Add try/catch to data parts destructors to avoid terminate. [#71364](https://github.com/ClickHouse/ClickHouse/pull/71364) ([alesapin](https://github.com/alesapin)). +* Backported in [#71751](https://github.com/ClickHouse/ClickHouse/issues/71751): Check suspicious and experimental types in JSON type hints. [#71369](https://github.com/ClickHouse/ClickHouse/pull/71369) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#71451](https://github.com/ClickHouse/ClickHouse/issues/71451): Start memory worker thread on non-Linux OS too (fixes [#71051](https://github.com/ClickHouse/ClickHouse/issues/71051)). [#71384](https://github.com/ClickHouse/ClickHouse/pull/71384) ([Alexandre Snarskii](https://github.com/snar)). +* Backported in [#71608](https://github.com/ClickHouse/ClickHouse/issues/71608): Fix error Invalid number of rows in Chunk with Variant column. [#71388](https://github.com/ClickHouse/ClickHouse/pull/71388) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#71493](https://github.com/ClickHouse/ClickHouse/issues/71493): Fix crash in `mongodb` table function when passing wrong arguments (e.g. `NULL`). [#71426](https://github.com/ClickHouse/ClickHouse/pull/71426) ([Vladimir Cherkasov](https://github.com/vdimir)). +* Backported in [#71815](https://github.com/ClickHouse/ClickHouse/issues/71815): Fix crash with optimize_rewrite_array_exists_to_has. [#71432](https://github.com/ClickHouse/ClickHouse/pull/71432) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71521](https://github.com/ClickHouse/ClickHouse/issues/71521): Fix possible error `Argument for function must be constant` (old analyzer) in case when arrayJoin can apparently appear in `WHERE` condition. Regression after https://github.com/ClickHouse/ClickHouse/pull/65414. [#71476](https://github.com/ClickHouse/ClickHouse/pull/71476) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Backported in [#71555](https://github.com/ClickHouse/ClickHouse/issues/71555): Prevent crash in SortCursor with 0 columns (old analyzer). [#71494](https://github.com/ClickHouse/ClickHouse/pull/71494) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71618](https://github.com/ClickHouse/ClickHouse/issues/71618): Analyzer fix when query inside materialized view uses IN with CTE. Closes [#65598](https://github.com/ClickHouse/ClickHouse/issues/65598). [#71538](https://github.com/ClickHouse/ClickHouse/pull/71538) ([Maksim Kita](https://github.com/kitaisreal)). +* Backported in [#71570](https://github.com/ClickHouse/ClickHouse/issues/71570): Avoid crash when using a UDF in a constraint. [#71541](https://github.com/ClickHouse/ClickHouse/pull/71541) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71646](https://github.com/ClickHouse/ClickHouse/issues/71646): Return 0 or default char instead of throwing an error in bitShift functions in case of out of bounds. [#71580](https://github.com/ClickHouse/ClickHouse/pull/71580) ([Pablo Marcos](https://github.com/pamarcos)). +* Backported in [#71880](https://github.com/ClickHouse/ClickHouse/issues/71880): Fix LOGICAL_ERROR when doing ALTER with empty tuple. This fixes [#71647](https://github.com/ClickHouse/ClickHouse/issues/71647). [#71679](https://github.com/ClickHouse/ClickHouse/pull/71679) ([Amos Bird](https://github.com/amosbird)). +* Backported in [#71741](https://github.com/ClickHouse/ClickHouse/issues/71741): Don't transform constant set in predicates over partition columns in case of NOT IN operator. [#71695](https://github.com/ClickHouse/ClickHouse/pull/71695) ([Eduard Karacharov](https://github.com/korowa)). +* Backported in [#72012](https://github.com/ClickHouse/ClickHouse/issues/72012): Fix exception for toDayOfWeek on WHERE condition with primary key of DateTime64 type. [#71849](https://github.com/ClickHouse/ClickHouse/pull/71849) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Backported in [#71897](https://github.com/ClickHouse/ClickHouse/issues/71897): Fixed filling of defaults after parsing into sparse columns. [#71854](https://github.com/ClickHouse/ClickHouse/pull/71854) ([Anton Popov](https://github.com/CurtizJ)). +* Backported in [#71955](https://github.com/ClickHouse/ClickHouse/issues/71955): Fix data race between the progress indicator and the progress table in clickhouse-client. This issue is visible when FROM INFILE is used. Intercept keystrokes during INSERT queries to toggle progress table display. [#71901](https://github.com/ClickHouse/ClickHouse/pull/71901) ([Julia Kartseva](https://github.com/jkartseva)). +* Backported in [#72006](https://github.com/ClickHouse/ClickHouse/issues/72006): Fix a crash in clickhouse-client syntax highlighting. Closes [#71864](https://github.com/ClickHouse/ClickHouse/issues/71864). [#71949](https://github.com/ClickHouse/ClickHouse/pull/71949) ([Nikolay Degterinsky](https://github.com/evillique)). + +#### Build/Testing/Packaging Improvement +* Backported in [#71692](https://github.com/ClickHouse/ClickHouse/issues/71692): Improve clickhouse-server Dockerfile.ubuntu. Deprecate `CLICKHOUSE_UID/CLICKHOUSE_GID` envs. Remove `CLICKHOUSE_DOCKER_RESTART_ON_EXIT` processing to complien requirements. Consistent `clickhouse/clickhouse-server/clickhouse-keeper` execution to not have it plain in one place and `/usr/bin/clickhouse*` in another. [#71573](https://github.com/ClickHouse/ClickHouse/pull/71573) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Backported in [#71387](https://github.com/ClickHouse/ClickHouse/issues/71387): Remove bad test `test_system_replicated_fetches`. [#71071](https://github.com/ClickHouse/ClickHouse/pull/71071) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#71586](https://github.com/ClickHouse/ClickHouse/issues/71586): Fix `WITH TOTALS` in subquery with parallel replicas. [#71224](https://github.com/ClickHouse/ClickHouse/pull/71224) ([Nikita Taranov](https://github.com/nickitat)). +* Backported in [#71437](https://github.com/ClickHouse/ClickHouse/issues/71437): Ignore `No such key` exceptions in some cases. [#71236](https://github.com/ClickHouse/ClickHouse/pull/71236) ([Antonio Andelic](https://github.com/antonio2368)). +* Backported in [#71629](https://github.com/ClickHouse/ClickHouse/issues/71629): Fix compatibility with refreshable materialized views created by old clickhouse servers. [#71556](https://github.com/ClickHouse/ClickHouse/pull/71556) ([Michael Kolupaev](https://github.com/al13n321)). +* Backported in [#71805](https://github.com/ClickHouse/ClickHouse/issues/71805): Fix issues we face on orphane backport branches and closed release PRs, when fake-master events are sent to the check DB. [#71782](https://github.com/ClickHouse/ClickHouse/pull/71782) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#71832](https://github.com/ClickHouse/ClickHouse/issues/71832): Closes [#71780](https://github.com/ClickHouse/ClickHouse/issues/71780). [#71818](https://github.com/ClickHouse/ClickHouse/pull/71818) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Backported in [#71840](https://github.com/ClickHouse/ClickHouse/issues/71840): The change has already been applied to https://github.com/docker-library/official-images/pull/17876. Backport it to every branch to have a proper `Dockerfile.ubuntu` there. [#71825](https://github.com/ClickHouse/ClickHouse/pull/71825) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/docs/changelogs/v24.3.14.35-lts.md b/docs/changelogs/v24.3.14.35-lts.md new file mode 100644 index 00000000000..5106c14a0c2 --- /dev/null +++ b/docs/changelogs/v24.3.14.35-lts.md @@ -0,0 +1,31 @@ +--- +sidebar_position: 1 +sidebar_label: 2024 +--- + +# 2024 Changelog + +### ClickHouse release v24.3.14.35-lts (cfa4e62b775) FIXME as compared to v24.3.13.40-lts (7acabd77389) + +#### Improvement +* Backported in [#71711](https://github.com/ClickHouse/ClickHouse/issues/71711): CLICKHOUSE_PASSWORD is escaped for XML in clickhouse image's entrypoint. [#69301](https://github.com/ClickHouse/ClickHouse/pull/69301) ([aohoyd](https://github.com/aohoyd)). +* Backported in [#71662](https://github.com/ClickHouse/ClickHouse/issues/71662): When user/group is given as ID, the `clickhouse su` fails. This patch fixes it to accept `UID:GID` as well. ### Documentation entry for user-facing changes. [#71626](https://github.com/ClickHouse/ClickHouse/pull/71626) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + +#### Bug Fix (user-visible misbehavior in an official stable release) +* Backported in [#65755](https://github.com/ClickHouse/ClickHouse/issues/65755): Fix the `Expression nodes list expected 1 projection names` and `Unknown expression or identifier` errors for queries with aliases to `GLOBAL IN.`. [#64517](https://github.com/ClickHouse/ClickHouse/pull/64517) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Backported in [#71600](https://github.com/ClickHouse/ClickHouse/issues/71600): Fix error Invalid number of rows in Chunk with Variant column. [#71388](https://github.com/ClickHouse/ClickHouse/pull/71388) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#71842](https://github.com/ClickHouse/ClickHouse/issues/71842): Fix crash with optimize_rewrite_array_exists_to_has. [#71432](https://github.com/ClickHouse/ClickHouse/pull/71432) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71562](https://github.com/ClickHouse/ClickHouse/issues/71562): Avoid crash when using a UDF in a constraint. [#71541](https://github.com/ClickHouse/ClickHouse/pull/71541) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71731](https://github.com/ClickHouse/ClickHouse/issues/71731): Return 0 or default char instead of throwing an error in bitShift functions in case of out of bounds. [#71580](https://github.com/ClickHouse/ClickHouse/pull/71580) ([Pablo Marcos](https://github.com/pamarcos)). + +#### Build/Testing/Packaging Improvement +* Backported in [#71697](https://github.com/ClickHouse/ClickHouse/issues/71697): Vendor in rust dependencies. [#62297](https://github.com/ClickHouse/ClickHouse/pull/62297) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71688](https://github.com/ClickHouse/ClickHouse/issues/71688): Improve clickhouse-server Dockerfile.ubuntu. Deprecate `CLICKHOUSE_UID/CLICKHOUSE_GID` envs. Remove `CLICKHOUSE_DOCKER_RESTART_ON_EXIT` processing to complien requirements. Consistent `clickhouse/clickhouse-server/clickhouse-keeper` execution to not have it plain in one place and `/usr/bin/clickhouse*` in another. [#71573](https://github.com/ClickHouse/ClickHouse/pull/71573) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Backported in [#71808](https://github.com/ClickHouse/ClickHouse/issues/71808): Fix issues we face on orphane backport branches and closed release PRs, when fake-master events are sent to the check DB. [#71782](https://github.com/ClickHouse/ClickHouse/pull/71782) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#71834](https://github.com/ClickHouse/ClickHouse/issues/71834): The change has already been applied to https://github.com/docker-library/official-images/pull/17876. Backport it to every branch to have a proper `Dockerfile.ubuntu` there. [#71825](https://github.com/ClickHouse/ClickHouse/pull/71825) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Fix bitShift test after backport. [#71861](https://github.com/ClickHouse/ClickHouse/pull/71861) ([Pablo Marcos](https://github.com/pamarcos)). +* Revert "Merge pull request [#71861](https://github.com/ClickHouse/ClickHouse/issues/71861) from pamarcos/fix-bitshift-test". [#71871](https://github.com/ClickHouse/ClickHouse/pull/71871) ([Pablo Marcos](https://github.com/pamarcos)). + diff --git a/docs/changelogs/v24.8.7.41-lts.md b/docs/changelogs/v24.8.7.41-lts.md new file mode 100644 index 00000000000..b736c2e97fb --- /dev/null +++ b/docs/changelogs/v24.8.7.41-lts.md @@ -0,0 +1,37 @@ +--- +sidebar_position: 1 +sidebar_label: 2024 +--- + +# 2024 Changelog + +### ClickHouse release v24.8.7.41-lts (e28553d4f2b) FIXME as compared to v24.8.6.70-lts (ddb8c219771) + +#### Improvement +* Backported in [#71713](https://github.com/ClickHouse/ClickHouse/issues/71713): CLICKHOUSE_PASSWORD is escaped for XML in clickhouse image's entrypoint. [#69301](https://github.com/ClickHouse/ClickHouse/pull/69301) ([aohoyd](https://github.com/aohoyd)). +* Backported in [#71666](https://github.com/ClickHouse/ClickHouse/issues/71666): When user/group is given as ID, the `clickhouse su` fails. This patch fixes it to accept `UID:GID` as well. ### Documentation entry for user-facing changes. [#71626](https://github.com/ClickHouse/ClickHouse/pull/71626) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#71936](https://github.com/ClickHouse/ClickHouse/issues/71936): Update `HostResolver` 3 times in a `history` period. [#71863](https://github.com/ClickHouse/ClickHouse/pull/71863) ([Sema Checherinda](https://github.com/CheSema)). + +#### Bug Fix (user-visible misbehavior in an official stable release) +* Backported in [#71486](https://github.com/ClickHouse/ClickHouse/issues/71486): Fix `Content-Encoding` not sent in some compressed responses. [#64802](https://github.com/ClickHouse/ClickHouse/issues/64802). [#68975](https://github.com/ClickHouse/ClickHouse/pull/68975) ([Konstantin Bogdanov](https://github.com/thevar1able)). +* Backported in [#71462](https://github.com/ClickHouse/ClickHouse/issues/71462): Added missing unescaping in named collections. Without fix clickhouse-server can't start. [#71308](https://github.com/ClickHouse/ClickHouse/pull/71308) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* Backported in [#71747](https://github.com/ClickHouse/ClickHouse/issues/71747): Check suspicious and experimental types in JSON type hints. [#71369](https://github.com/ClickHouse/ClickHouse/pull/71369) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#71604](https://github.com/ClickHouse/ClickHouse/issues/71604): Fix error Invalid number of rows in Chunk with Variant column. [#71388](https://github.com/ClickHouse/ClickHouse/pull/71388) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#71826](https://github.com/ClickHouse/ClickHouse/issues/71826): Fix crash with optimize_rewrite_array_exists_to_has. [#71432](https://github.com/ClickHouse/ClickHouse/pull/71432) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71517](https://github.com/ClickHouse/ClickHouse/issues/71517): Fix possible error `Argument for function must be constant` (old analyzer) in case when arrayJoin can apparently appear in `WHERE` condition. Regression after https://github.com/ClickHouse/ClickHouse/pull/65414. [#71476](https://github.com/ClickHouse/ClickHouse/pull/71476) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Backported in [#71551](https://github.com/ClickHouse/ClickHouse/issues/71551): Prevent crash in SortCursor with 0 columns (old analyzer). [#71494](https://github.com/ClickHouse/ClickHouse/pull/71494) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71614](https://github.com/ClickHouse/ClickHouse/issues/71614): Analyzer fix when query inside materialized view uses IN with CTE. Closes [#65598](https://github.com/ClickHouse/ClickHouse/issues/65598). [#71538](https://github.com/ClickHouse/ClickHouse/pull/71538) ([Maksim Kita](https://github.com/kitaisreal)). +* Backported in [#71566](https://github.com/ClickHouse/ClickHouse/issues/71566): Avoid crash when using a UDF in a constraint. [#71541](https://github.com/ClickHouse/ClickHouse/pull/71541) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71727](https://github.com/ClickHouse/ClickHouse/issues/71727): Return 0 or default char instead of throwing an error in bitShift functions in case of out of bounds. [#71580](https://github.com/ClickHouse/ClickHouse/pull/71580) ([Pablo Marcos](https://github.com/pamarcos)). +* Backported in [#71876](https://github.com/ClickHouse/ClickHouse/issues/71876): Fix LOGICAL_ERROR when doing ALTER with empty tuple. This fixes [#71647](https://github.com/ClickHouse/ClickHouse/issues/71647). [#71679](https://github.com/ClickHouse/ClickHouse/pull/71679) ([Amos Bird](https://github.com/amosbird)). +* Backported in [#71737](https://github.com/ClickHouse/ClickHouse/issues/71737): Don't transform constant set in predicates over partition columns in case of NOT IN operator. [#71695](https://github.com/ClickHouse/ClickHouse/pull/71695) ([Eduard Karacharov](https://github.com/korowa)). +* Backported in [#72002](https://github.com/ClickHouse/ClickHouse/issues/72002): Fix a crash in clickhouse-client syntax highlighting. Closes [#71864](https://github.com/ClickHouse/ClickHouse/issues/71864). [#71949](https://github.com/ClickHouse/ClickHouse/pull/71949) ([Nikolay Degterinsky](https://github.com/evillique)). + +#### Build/Testing/Packaging Improvement +* Backported in [#71690](https://github.com/ClickHouse/ClickHouse/issues/71690): Improve clickhouse-server Dockerfile.ubuntu. Deprecate `CLICKHOUSE_UID/CLICKHOUSE_GID` envs. Remove `CLICKHOUSE_DOCKER_RESTART_ON_EXIT` processing to complien requirements. Consistent `clickhouse/clickhouse-server/clickhouse-keeper` execution to not have it plain in one place and `/usr/bin/clickhouse*` in another. [#71573](https://github.com/ClickHouse/ClickHouse/pull/71573) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Backported in [#71801](https://github.com/ClickHouse/ClickHouse/issues/71801): Fix issues we face on orphane backport branches and closed release PRs, when fake-master events are sent to the check DB. [#71782](https://github.com/ClickHouse/ClickHouse/pull/71782) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#71836](https://github.com/ClickHouse/ClickHouse/issues/71836): The change has already been applied to https://github.com/docker-library/official-images/pull/17876. Backport it to every branch to have a proper `Dockerfile.ubuntu` there. [#71825](https://github.com/ClickHouse/ClickHouse/pull/71825) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/docs/changelogs/v24.9.3.128-stable.md b/docs/changelogs/v24.9.3.128-stable.md new file mode 100644 index 00000000000..f6caf7ad74c --- /dev/null +++ b/docs/changelogs/v24.9.3.128-stable.md @@ -0,0 +1,88 @@ +--- +sidebar_position: 1 +sidebar_label: 2024 +--- + +# 2024 Changelog + +### ClickHouse release v24.9.3.128-stable (9a816c73dd4) FIXME as compared to v24.9.2.42-stable (de7c791a2ea) + +#### Backward Incompatible Change +* Backported in [#71361](https://github.com/ClickHouse/ClickHouse/issues/71361): Fix possible error `No such file or directory` due to unescaped special symbols in files for JSON subcolumns. [#71182](https://github.com/ClickHouse/ClickHouse/pull/71182) ([Pavel Kruglov](https://github.com/Avogar)). + +#### New Feature +* Backported in [#71318](https://github.com/ClickHouse/ClickHouse/issues/71318): Allow each authentication method to have its own expiration date, remove from user entity. [#70090](https://github.com/ClickHouse/ClickHouse/pull/70090) ([Arthur Passos](https://github.com/arthurpassos)). + +#### Improvement +* Backported in [#70681](https://github.com/ClickHouse/ClickHouse/issues/70681): Don't do validation when synchronizing user_directories from keeper. [#70644](https://github.com/ClickHouse/ClickHouse/pull/70644) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71668](https://github.com/ClickHouse/ClickHouse/issues/71668): When user/group is given as ID, the `clickhouse su` fails. This patch fixes it to accept `UID:GID` as well. ### Documentation entry for user-facing changes. [#71626](https://github.com/ClickHouse/ClickHouse/pull/71626) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#71938](https://github.com/ClickHouse/ClickHouse/issues/71938): Update `HostResolver` 3 times in a `history` period. [#71863](https://github.com/ClickHouse/ClickHouse/pull/71863) ([Sema Checherinda](https://github.com/CheSema)). + +#### Bug Fix (user-visible misbehavior in an official stable release) +* Backported in [#70936](https://github.com/ClickHouse/ClickHouse/issues/70936): Fix incorrect JOIN ON section optimization in case of `IS NULL` check under any other function (like `NOT`) that may lead to wrong results. Closes [#67915](https://github.com/ClickHouse/ClickHouse/issues/67915). [#68049](https://github.com/ClickHouse/ClickHouse/pull/68049) ([Vladimir Cherkasov](https://github.com/vdimir)). +* Backported in [#70441](https://github.com/ClickHouse/ClickHouse/issues/70441): Fix vrash during insertion into FixedString column in PostgreSQL engine. [#69584](https://github.com/ClickHouse/ClickHouse/pull/69584) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#70563](https://github.com/ClickHouse/ClickHouse/issues/70563): Fix `getSubcolumn` with `LowCardinality` columns by overriding `useDefaultImplementationForLowCardinalityColumns` to return `true`. [#69831](https://github.com/ClickHouse/ClickHouse/pull/69831) ([MiÑhael Stetsyuk](https://github.com/mstetsyuk)). +* Backported in [#70871](https://github.com/ClickHouse/ClickHouse/issues/70871): Avoid reusing columns among different named tuples when evaluating `tuple` functions. This fixes [#70022](https://github.com/ClickHouse/ClickHouse/issues/70022). [#70103](https://github.com/ClickHouse/ClickHouse/pull/70103) ([Amos Bird](https://github.com/amosbird)). +* Backported in [#70434](https://github.com/ClickHouse/ClickHouse/issues/70434): Fix possible crash in JSON column. [#70172](https://github.com/ClickHouse/ClickHouse/pull/70172) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#70309](https://github.com/ClickHouse/ClickHouse/issues/70309): Fix multiple issues with arrayMin and arrayMax. [#70207](https://github.com/ClickHouse/ClickHouse/pull/70207) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#70625](https://github.com/ClickHouse/ClickHouse/issues/70625): Fix server segfault on creating a materialized view with two selects and an `INTERSECT`, e.g. `CREATE MATERIALIZED VIEW v0 AS (SELECT 1) INTERSECT (SELECT 1);`. [#70264](https://github.com/ClickHouse/ClickHouse/pull/70264) ([Konstantin Bogdanov](https://github.com/thevar1able)). +* Backported in [#70347](https://github.com/ClickHouse/ClickHouse/issues/70347): Don't modify global settings with startup scripts. Previously, changing a setting in a startup script would change it globally. [#70310](https://github.com/ClickHouse/ClickHouse/pull/70310) ([Antonio Andelic](https://github.com/antonio2368)). +* Backported in [#70428](https://github.com/ClickHouse/ClickHouse/issues/70428): Fix ALTER of Dynamic type with reducing max_types parameter that could lead to server crash. [#70328](https://github.com/ClickHouse/ClickHouse/pull/70328) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#70373](https://github.com/ClickHouse/ClickHouse/issues/70373): Fix crash when using WITH FILL incorrectly. [#70338](https://github.com/ClickHouse/ClickHouse/pull/70338) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#70690](https://github.com/ClickHouse/ClickHouse/issues/70690): Fix possible use-after-free in `SYSTEM DROP FORMAT SCHEMA CACHE FOR Protobuf`. [#70358](https://github.com/ClickHouse/ClickHouse/pull/70358) ([Azat Khuzhin](https://github.com/azat)). +* Backported in [#70496](https://github.com/ClickHouse/ClickHouse/issues/70496): Fix crash during GROUP BY JSON sub-object subcolumn. [#70374](https://github.com/ClickHouse/ClickHouse/pull/70374) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#70484](https://github.com/ClickHouse/ClickHouse/issues/70484): Don't prefetch parts for vertical merges if part has no rows. [#70452](https://github.com/ClickHouse/ClickHouse/pull/70452) ([Antonio Andelic](https://github.com/antonio2368)). +* Backported in [#70558](https://github.com/ClickHouse/ClickHouse/issues/70558): Fix crash in WHERE with lambda functions. [#70464](https://github.com/ClickHouse/ClickHouse/pull/70464) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#70922](https://github.com/ClickHouse/ClickHouse/issues/70922): Fix table creation with `CREATE ... AS table_function()` with database `Replicated` and unavailable table function source on secondary replica. [#70511](https://github.com/ClickHouse/ClickHouse/pull/70511) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Backported in [#70577](https://github.com/ClickHouse/ClickHouse/issues/70577): Ignore all output on async insert with `wait_for_async_insert=1`. Closes [#62644](https://github.com/ClickHouse/ClickHouse/issues/62644). [#70530](https://github.com/ClickHouse/ClickHouse/pull/70530) ([Konstantin Bogdanov](https://github.com/thevar1able)). +* Backported in [#71062](https://github.com/ClickHouse/ClickHouse/issues/71062): Ignore frozen_metadata.txt while traversing shadow directory from system.remote_data_paths. [#70590](https://github.com/ClickHouse/ClickHouse/pull/70590) ([Aleksei Filatov](https://github.com/aalexfvk)). +* Backported in [#70653](https://github.com/ClickHouse/ClickHouse/issues/70653): Fix creation of stateful window functions on misaligned memory. [#70631](https://github.com/ClickHouse/ClickHouse/pull/70631) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#70759](https://github.com/ClickHouse/ClickHouse/issues/70759): Fixed rare crashes in `SELECT`-s and merges after adding a column of `Array` type with non-empty default expression. [#70695](https://github.com/ClickHouse/ClickHouse/pull/70695) ([Anton Popov](https://github.com/CurtizJ)). +* Backported in [#70764](https://github.com/ClickHouse/ClickHouse/issues/70764): Fix infinite recursion when infering a proto schema with skip unsupported fields enabled. [#70697](https://github.com/ClickHouse/ClickHouse/pull/70697) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71120](https://github.com/ClickHouse/ClickHouse/issues/71120): `GroupArraySortedData` uses a PODArray with non-POD elements, manually calling constructors and destructors for the elements as needed. But it wasn't careful enough: in two places it forgot to call destructor, in one place it left elements uninitialized if an exception is thrown when deserializing previous elements. Then `GroupArraySortedData`'s destructor called destructors on uninitialized elements and crashed: ``` 2024.10.17 22:58:23.523790 [ 5233 ] {} BaseDaemon: ########## Short fault info ############ 2024.10.17 22:58:23.523834 [ 5233 ] {} BaseDaemon: (version 24.6.1.4609 (official build), build id: 5423339A6571004018D55BBE05D464AFA35E6718, git hash: fa6cdfda8a94890eb19bc7f22f8b0b56292f7a26) (from thread 682) Received signal 11 2024.10.17 22:58:23.523862 [ 5233 ] {} BaseDaemon: Signal description: Segmentation fault 2024.10.17 22:58:23.523883 [ 5233 ] {} BaseDaemon: Address: 0x8f. Access: . Address not mapped to object. 2024.10.17 22:58:23.523908 [ 5233 ] {} BaseDaemon: Stack trace: 0x0000aaaac4b78308 0x0000ffffb7701850 0x0000aaaac0104855 0x0000aaaac01048a0 0x0000aaaac501e84c 0x0000aaaac7c510d0 0x0000aaaac7c4ba20 0x0000aaaac968bbfc 0x0000aaaac968fab0 0x0000aaaac969bf50 0x0000aaaac9b7520c 0x0000aaaac9b74c74 0x0000aaaac9b8a150 0x0000aaaac9b809f0 0x0000aaaac9b80574 0x0000aaaac9b8e364 0x0000aaaac9b8e4fc 0x0000aaaac94f4328 0x0000aaaac94f428c 0x0000aaaac94f7df0 0x0000aaaac98b5a3c 0x0000aaaac950b234 0x0000aaaac49ae264 0x0000aaaac49b1dd0 0x0000aaaac49b0a80 0x0000ffffb755d5c8 0x0000ffffb75c5edc 2024.10.17 22:58:23.523936 [ 5233 ] {} BaseDaemon: ######################################## 2024.10.17 22:58:23.523959 [ 5233 ] {} BaseDaemon: (version 24.6.1.4609 (official build), build id: 5423339A6571004018D55BBE05D464AFA35E6718, git hash: fa6cdfda8a94890eb19bc7f22f8b0b56292f7a26) (from thread 682) (query_id: 6c8a33a2-f45a-4a3b-bd71-ded6a1c9ccd3::202410_534066_534078_2) (query: ) Received signal Segmentation fault (11) 2024.10.17 22:58:23.523977 [ 5233 ] {} BaseDaemon: Address: 0x8f. Access: . Address not mapped to object. 2024.10.17 22:58:23.523993 [ 5233 ] {} BaseDaemon: Stack trace: 0x0000aaaac4b78308 0x0000ffffb7701850 0x0000aaaac0104855 0x0000aaaac01048a0 0x0000aaaac501e84c 0x0000aaaac7c510d0 0x0000aaaac7c4ba20 0x0000aaaac968bbfc 0x0000aaaac968fab0 0x0000aaaac969bf50 0x0000aaaac9b7520c 0x0000aaaac9b74c74 0x0000aaaac9b8a150 0x0000aaaac9b809f0 0x0000aaaac9b80574 0x0000aaaac9b8e364 0x0000aaaac9b8e4fc 0x0000aaaac94f4328 0x0000aaaac94f428c 0x0000aaaac94f7df0 0x0000aaaac98b5a3c 0x0000aaaac950b234 0x0000aaaac49ae264 0x0000aaaac49b1dd0 0x0000aaaac49b0a80 0x0000ffffb755d5c8 0x0000ffffb75c5edc 2024.10.17 22:58:23.524817 [ 5233 ] {} BaseDaemon: 0. signalHandler(int, siginfo_t*, void*) @ 0x000000000c6f8308 2024.10.17 22:58:23.524917 [ 5233 ] {} BaseDaemon: 1. ? @ 0x0000ffffb7701850 2024.10.17 22:58:23.524962 [ 5233 ] {} BaseDaemon: 2. DB::Field::~Field() @ 0x0000000007c84855 2024.10.17 22:58:23.525012 [ 5233 ] {} BaseDaemon: 3. DB::Field::~Field() @ 0x0000000007c848a0 2024.10.17 22:58:23.526626 [ 5233 ] {} BaseDaemon: 4. DB::IAggregateFunctionDataHelper, DB::(anonymous namespace)::GroupArraySorted, DB::Field>>::destroy(char*) const (.5a6a451027f732f9fd91c13f4a13200c) @ 0x000000000cb9e84c 2024.10.17 22:58:23.527322 [ 5233 ] {} BaseDaemon: 5. DB::SerializationAggregateFunction::deserializeBinaryBulk(DB::IColumn&, DB::ReadBuffer&, unsigned long, double) const @ 0x000000000f7d10d0 2024.10.17 22:58:23.528470 [ 5233 ] {} BaseDaemon: 6. DB::ISerialization::deserializeBinaryBulkWithMultipleStreams(COW::immutable_ptr&, unsigned long, DB::ISerialization::DeserializeBinaryBulkSettings&, std::shared_ptr&, std::unordered_map::immutable_ptr, std::hash, std::equal_to, std::allocator::immutable_ptr>>>*) const @ 0x000000000f7cba20 2024.10.17 22:58:23.529213 [ 5233 ] {} BaseDaemon: 7. DB::MergeTreeReaderCompact::readData(DB::NameAndTypePair const&, COW::immutable_ptr&, unsigned long, std::function const&) @ 0x000000001120bbfc 2024.10.17 22:58:23.529277 [ 5233 ] {} BaseDaemon: 8. DB::MergeTreeReaderCompactSingleBuffer::readRows(unsigned long, unsigned long, bool, unsigned long, std::vector::immutable_ptr, std::allocator::immutable_ptr>>&) @ 0x000000001120fab0 2024.10.17 22:58:23.529319 [ 5233 ] {} BaseDaemon: 9. DB::MergeTreeSequentialSource::generate() @ 0x000000001121bf50 2024.10.17 22:58:23.529346 [ 5233 ] {} BaseDaemon: 10. DB::ISource::tryGenerate() @ 0x00000000116f520c 2024.10.17 22:58:23.529653 [ 5233 ] {} BaseDaemon: 11. DB::ISource::work() @ 0x00000000116f4c74 2024.10.17 22:58:23.529679 [ 5233 ] {} BaseDaemon: 12. DB::ExecutionThreadContext::executeTask() @ 0x000000001170a150 2024.10.17 22:58:23.529733 [ 5233 ] {} BaseDaemon: 13. DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic*) @ 0x00000000117009f0 2024.10.17 22:58:23.529763 [ 5233 ] {} BaseDaemon: 14. DB::PipelineExecutor::executeStep(std::atomic*) @ 0x0000000011700574 2024.10.17 22:58:23.530089 [ 5233 ] {} BaseDaemon: 15. DB::PullingPipelineExecutor::pull(DB::Chunk&) @ 0x000000001170e364 2024.10.17 22:58:23.530277 [ 5233 ] {} BaseDaemon: 16. DB::PullingPipelineExecutor::pull(DB::Block&) @ 0x000000001170e4fc 2024.10.17 22:58:23.530295 [ 5233 ] {} BaseDaemon: 17. DB::MergeTask::ExecuteAndFinalizeHorizontalPart::executeImpl() @ 0x0000000011074328 2024.10.17 22:58:23.530318 [ 5233 ] {} BaseDaemon: 18. DB::MergeTask::ExecuteAndFinalizeHorizontalPart::execute() @ 0x000000001107428c 2024.10.17 22:58:23.530339 [ 5233 ] {} BaseDaemon: 19. DB::MergeTask::execute() @ 0x0000000011077df0 2024.10.17 22:58:23.530362 [ 5233 ] {} BaseDaemon: 20. DB::SharedMergeMutateTaskBase::executeStep() @ 0x0000000011435a3c 2024.10.17 22:58:23.530384 [ 5233 ] {} BaseDaemon: 21. DB::MergeTreeBackgroundExecutor::threadFunction() @ 0x000000001108b234 2024.10.17 22:58:23.530410 [ 5233 ] {} BaseDaemon: 22. ThreadPoolImpl>::worker(std::__list_iterator, void*>) @ 0x000000000c52e264 2024.10.17 22:58:23.530448 [ 5233 ] {} BaseDaemon: 23. void std::__function::__policy_invoker::__call_impl::ThreadFromGlobalPoolImpl>::scheduleImpl(std::function, Priority, std::optional, bool)::'lambda0'()>(void&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x000000000c531dd0 2024.10.17 22:58:23.530476 [ 5233 ] {} BaseDaemon: 24. void* std::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::function, Priority, std::optional, bool)::'lambda0'()>>(void*) @ 0x000000000c530a80 2024.10.17 22:58:23.530514 [ 5233 ] {} BaseDaemon: 25. ? @ 0x000000000007d5c8 2024.10.17 22:58:23.530534 [ 5233 ] {} BaseDaemon: 26. ? @ 0x00000000000e5edc 2024.10.17 22:58:23.530551 [ 5233 ] {} BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read. 2024.10.17 22:58:23.531083 [ 5233 ] {} BaseDaemon: Report this error to https://github.com/ClickHouse/ClickHouse/issues 2024.10.17 22:58:23.531294 [ 5233 ] {} BaseDaemon: Changed settings: max_insert_threads = 4, max_threads = 42, use_hedged_requests = false, distributed_foreground_insert = true, alter_sync = 0, enable_memory_bound_merging_of_aggregation_results = true, cluster_for_parallel_replicas = 'default', do_not_merge_across_partitions_select_final = false, log_queries = true, log_queries_probability = 1., max_http_get_redirects = 10, enable_deflate_qpl_codec = false, enable_zstd_qat_codec = false, query_profiler_real_time_period_ns = 0, query_profiler_cpu_time_period_ns = 0, max_bytes_before_external_group_by = 90194313216, max_bytes_before_external_sort = 90194313216, max_memory_usage = 180388626432, backup_restore_keeper_retry_max_backoff_ms = 60000, cancel_http_readonly_queries_on_client_close = true, max_table_size_to_drop = 1000000000000, max_partition_size_to_drop = 1000000000000, default_table_engine = 'ReplicatedMergeTree', mutations_sync = 0, optimize_trivial_insert_select = false, database_replicated_allow_only_replicated_engine = true, cloud_mode = true, cloud_mode_engine = 2, distributed_ddl_output_mode = 'none_only_active', distributed_ddl_entry_format_version = 6, async_insert_max_data_size = 10485760, async_insert_busy_timeout_max_ms = 1000, enable_filesystem_cache_on_write_operations = true, load_marks_asynchronously = true, allow_prefetched_read_pool_for_remote_filesystem = true, filesystem_prefetch_max_memory_usage = 18038862643, filesystem_prefetches_limit = 200, compatibility = '24.6', insert_keeper_max_retries = 20, allow_experimental_materialized_postgresql_table = false, date_time_input_format = 'best_effort' ```. [#70820](https://github.com/ClickHouse/ClickHouse/pull/70820) ([Michael Kolupaev](https://github.com/al13n321)). +* Backported in [#70897](https://github.com/ClickHouse/ClickHouse/issues/70897): Disable enable_named_columns_in_function_tuple by default. [#70833](https://github.com/ClickHouse/ClickHouse/pull/70833) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#70996](https://github.com/ClickHouse/ClickHouse/issues/70996): Fix a logical error due to negative zeros in the two-level hash table. This closes [#70973](https://github.com/ClickHouse/ClickHouse/issues/70973). [#70979](https://github.com/ClickHouse/ClickHouse/pull/70979) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#71212](https://github.com/ClickHouse/ClickHouse/issues/71212): Fix logical error in `StorageS3Queue` "Cannot create a persistent node in /processed since it already exists". [#70984](https://github.com/ClickHouse/ClickHouse/pull/70984) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Backported in [#71249](https://github.com/ClickHouse/ClickHouse/issues/71249): Fixed named sessions not being closed and hanging on forever under certain circumstances. [#70998](https://github.com/ClickHouse/ClickHouse/pull/70998) ([Márcio Martins](https://github.com/marcio-absmartly)). +* Backported in [#71155](https://github.com/ClickHouse/ClickHouse/issues/71155): Fix the bug that didn't consider _row_exists column in rebuild option of projection lightweight delete. [#71089](https://github.com/ClickHouse/ClickHouse/pull/71089) ([Shichao Jin](https://github.com/jsc0218)). +* Backported in [#71353](https://github.com/ClickHouse/ClickHouse/issues/71353): Fix possible error "Cannot read all data" erros during deserialization of LowCardinality dictionary from Dynamic column. [#71299](https://github.com/ClickHouse/ClickHouse/pull/71299) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#71464](https://github.com/ClickHouse/ClickHouse/issues/71464): Added missing unescaping in named collections. Without fix clickhouse-server can't start. [#71308](https://github.com/ClickHouse/ClickHouse/pull/71308) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* Backported in [#71329](https://github.com/ClickHouse/ClickHouse/issues/71329): Fix async inserts with empty blocks via native protocol. [#71312](https://github.com/ClickHouse/ClickHouse/pull/71312) ([Anton Popov](https://github.com/CurtizJ)). +* Backported in [#71377](https://github.com/ClickHouse/ClickHouse/issues/71377): Add try/catch to data parts destructors to avoid terminate. [#71364](https://github.com/ClickHouse/ClickHouse/pull/71364) ([alesapin](https://github.com/alesapin)). +* Backported in [#71749](https://github.com/ClickHouse/ClickHouse/issues/71749): Check suspicious and experimental types in JSON type hints. [#71369](https://github.com/ClickHouse/ClickHouse/pull/71369) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#71449](https://github.com/ClickHouse/ClickHouse/issues/71449): Start memory worker thread on non-Linux OS too (fixes [#71051](https://github.com/ClickHouse/ClickHouse/issues/71051)). [#71384](https://github.com/ClickHouse/ClickHouse/pull/71384) ([Alexandre Snarskii](https://github.com/snar)). +* Backported in [#71606](https://github.com/ClickHouse/ClickHouse/issues/71606): Fix error Invalid number of rows in Chunk with Variant column. [#71388](https://github.com/ClickHouse/ClickHouse/pull/71388) ([Pavel Kruglov](https://github.com/Avogar)). +* Backported in [#71823](https://github.com/ClickHouse/ClickHouse/issues/71823): Fix crash with optimize_rewrite_array_exists_to_has. [#71432](https://github.com/ClickHouse/ClickHouse/pull/71432) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71519](https://github.com/ClickHouse/ClickHouse/issues/71519): Fix possible error `Argument for function must be constant` (old analyzer) in case when arrayJoin can apparently appear in `WHERE` condition. Regression after https://github.com/ClickHouse/ClickHouse/pull/65414. [#71476](https://github.com/ClickHouse/ClickHouse/pull/71476) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Backported in [#71553](https://github.com/ClickHouse/ClickHouse/issues/71553): Prevent crash in SortCursor with 0 columns (old analyzer). [#71494](https://github.com/ClickHouse/ClickHouse/pull/71494) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71568](https://github.com/ClickHouse/ClickHouse/issues/71568): Avoid crash when using a UDF in a constraint. [#71541](https://github.com/ClickHouse/ClickHouse/pull/71541) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#71728](https://github.com/ClickHouse/ClickHouse/issues/71728): Return 0 or default char instead of throwing an error in bitShift functions in case of out of bounds. [#71580](https://github.com/ClickHouse/ClickHouse/pull/71580) ([Pablo Marcos](https://github.com/pamarcos)). +* Backported in [#71878](https://github.com/ClickHouse/ClickHouse/issues/71878): Fix LOGICAL_ERROR when doing ALTER with empty tuple. This fixes [#71647](https://github.com/ClickHouse/ClickHouse/issues/71647). [#71679](https://github.com/ClickHouse/ClickHouse/pull/71679) ([Amos Bird](https://github.com/amosbird)). +* Backported in [#71739](https://github.com/ClickHouse/ClickHouse/issues/71739): Don't transform constant set in predicates over partition columns in case of NOT IN operator. [#71695](https://github.com/ClickHouse/ClickHouse/pull/71695) ([Eduard Karacharov](https://github.com/korowa)). +* Backported in [#72004](https://github.com/ClickHouse/ClickHouse/issues/72004): Fix a crash in clickhouse-client syntax highlighting. Closes [#71864](https://github.com/ClickHouse/ClickHouse/issues/71864). [#71949](https://github.com/ClickHouse/ClickHouse/pull/71949) ([Nikolay Degterinsky](https://github.com/evillique)). + +#### Build/Testing/Packaging Improvement +* Backported in [#71691](https://github.com/ClickHouse/ClickHouse/issues/71691): Improve clickhouse-server Dockerfile.ubuntu. Deprecate `CLICKHOUSE_UID/CLICKHOUSE_GID` envs. Remove `CLICKHOUSE_DOCKER_RESTART_ON_EXIT` processing to complien requirements. Consistent `clickhouse/clickhouse-server/clickhouse-keeper` execution to not have it plain in one place and `/usr/bin/clickhouse*` in another. [#71573](https://github.com/ClickHouse/ClickHouse/pull/71573) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + +#### NO CL ENTRY + +* NO CL ENTRY: 'Revert "Backport [#70146](https://github.com/ClickHouse/ClickHouse/issues/70146) to 24.9: Upgrade integration-runner image"'. [#70321](https://github.com/ClickHouse/ClickHouse/pull/70321) ([Max Kainov](https://github.com/maxknv)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Backported in [#70316](https://github.com/ClickHouse/ClickHouse/issues/70316): CI: Remove await feature from release branches. [#70294](https://github.com/ClickHouse/ClickHouse/pull/70294) ([Max Kainov](https://github.com/maxknv)). +* Backported in [#70390](https://github.com/ClickHouse/ClickHouse/issues/70390): CI: Enable Integration Tests for backport PRs. [#70329](https://github.com/ClickHouse/ClickHouse/pull/70329) ([Max Kainov](https://github.com/maxknv)). +* Backported in [#70705](https://github.com/ClickHouse/ClickHouse/issues/70705): Don't fail the stateless check script if we can't collect minio logs. [#70350](https://github.com/ClickHouse/ClickHouse/pull/70350) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#70382](https://github.com/ClickHouse/ClickHouse/issues/70382): Fix tiny mistake, responsible for some of kafka test flaps. Example [report](https://s3.amazonaws.com/clickhouse-test-reports/0/3198aafac59c368993e7b5f49d95674cc1b1be18/integration_tests__release__[2_4].html). [#70352](https://github.com/ClickHouse/ClickHouse/pull/70352) ([filimonov](https://github.com/filimonov)). +* Backported in [#70407](https://github.com/ClickHouse/ClickHouse/issues/70407): Closes [#69634](https://github.com/ClickHouse/ClickHouse/issues/69634). [#70354](https://github.com/ClickHouse/ClickHouse/pull/70354) ([pufit](https://github.com/pufit)). +* Backported in [#70703](https://github.com/ClickHouse/ClickHouse/issues/70703): Fix order in 03249_dynamic_alter_consistency. [#70453](https://github.com/ClickHouse/ClickHouse/pull/70453) ([Alexander Gololobov](https://github.com/davenger)). +* Backported in [#70544](https://github.com/ClickHouse/ClickHouse/issues/70544): Remove slow poll() logs in keeper. [#70508](https://github.com/ClickHouse/ClickHouse/pull/70508) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#70692](https://github.com/ClickHouse/ClickHouse/issues/70692): Fix 24.9 setting compatibility `database_replicated_allow_explicit_uuid`. [#70565](https://github.com/ClickHouse/ClickHouse/pull/70565) ([Nikita Fomichev](https://github.com/fm4v)). +* Backported in [#70683](https://github.com/ClickHouse/ClickHouse/issues/70683): Increase max_rows_to_read limit in some tests. [#70617](https://github.com/ClickHouse/ClickHouse/pull/70617) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#70805](https://github.com/ClickHouse/ClickHouse/issues/70805): When the `PR Check` status is set, it's a valid RunConfig job failure. [#70643](https://github.com/ClickHouse/ClickHouse/pull/70643) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#71762](https://github.com/ClickHouse/ClickHouse/issues/71762): Remove bad test `test_system_replicated_fetches`. [#71071](https://github.com/ClickHouse/ClickHouse/pull/71071) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#71230](https://github.com/ClickHouse/ClickHouse/issues/71230): Maybe not GWPAsan by default. [#71174](https://github.com/ClickHouse/ClickHouse/pull/71174) ([Antonio Andelic](https://github.com/antonio2368)). +* Backported in [#71435](https://github.com/ClickHouse/ClickHouse/issues/71435): Ignore `No such key` exceptions in some cases. [#71236](https://github.com/ClickHouse/ClickHouse/pull/71236) ([Antonio Andelic](https://github.com/antonio2368)). +* Backported in [#71803](https://github.com/ClickHouse/ClickHouse/issues/71803): Fix issues we face on orphane backport branches and closed release PRs, when fake-master events are sent to the check DB. [#71782](https://github.com/ClickHouse/ClickHouse/pull/71782) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#71838](https://github.com/ClickHouse/ClickHouse/issues/71838): The change has already been applied to https://github.com/docker-library/official-images/pull/17876. Backport it to every branch to have a proper `Dockerfile.ubuntu` there. [#71825](https://github.com/ClickHouse/ClickHouse/pull/71825) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/docs/en/engines/table-engines/integrations/s3.md b/docs/en/engines/table-engines/integrations/s3.md index fd27d4b6ed9..9868b2a05a8 100644 --- a/docs/en/engines/table-engines/integrations/s3.md +++ b/docs/en/engines/table-engines/integrations/s3.md @@ -258,7 +258,7 @@ CREATE TABLE table_with_asterisk (name String, value UInt32) - [s3_truncate_on_insert](/docs/en/operations/settings/settings.md#s3_truncate_on_insert) - allows to truncate file before insert into it. Disabled by default. - [s3_create_new_file_on_insert](/docs/en/operations/settings/settings.md#s3_create_new_file_on_insert) - allows to create a new file on each insert if format has suffix. Disabled by default. -- [s3_skip_empty_files](/docs/en/operations/settings/settings.md#s3_skip_empty_files) - allows to skip empty files while reading. Disabled by default. +- [s3_skip_empty_files](/docs/en/operations/settings/settings.md#s3_skip_empty_files) - allows to skip empty files while reading. Enabled by default. ## S3-related Settings {#settings} diff --git a/docs/en/engines/table-engines/integrations/s3queue.md b/docs/en/engines/table-engines/integrations/s3queue.md index 11fc357d222..89a70420069 100644 --- a/docs/en/engines/table-engines/integrations/s3queue.md +++ b/docs/en/engines/table-engines/integrations/s3queue.md @@ -122,7 +122,7 @@ Default value: `0`. ### s3queue_polling_min_timeout_ms {#polling_min_timeout_ms} -Minimal timeout before next polling (in milliseconds). +Specifies the minimum time, in milliseconds, that ClickHouse waits before making the next polling attempt. Possible values: @@ -132,7 +132,7 @@ Default value: `1000`. ### s3queue_polling_max_timeout_ms {#polling_max_timeout_ms} -Maximum timeout before next polling (in milliseconds). +Defines the maximum time, in milliseconds, that ClickHouse waits before initiating the next polling attempt. Possible values: @@ -142,7 +142,7 @@ Default value: `10000`. ### s3queue_polling_backoff_ms {#polling_backoff_ms} -Polling backoff (in milliseconds). +Determines the additional wait time added to the previous polling interval when no new files are found. The next poll occurs after the sum of the previous interval and this backoff value, or the maximum interval, whichever is lower. Possible values: diff --git a/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md b/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md index 819038ee32c..dc0f8683f11 100644 --- a/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md @@ -10,6 +10,11 @@ The engine inherits from [MergeTree](../../../engines/table-engines/mergetree-fa You can use `AggregatingMergeTree` tables for incremental data aggregation, including for aggregated materialized views. +You can see an example of how to use the AggregatingMergeTree and Aggregate functions in the below video: +
+ +
+ The engine processes all columns with the following types: ## [AggregateFunction](../../../sql-reference/data-types/aggregatefunction.md) diff --git a/docs/en/engines/table-engines/mergetree-family/mergetree.md b/docs/en/engines/table-engines/mergetree-family/mergetree.md index cd2fc69c236..2ca25a044b1 100644 --- a/docs/en/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/mergetree.md @@ -684,8 +684,7 @@ If you perform the `SELECT` query between merges, you may get expired data. To a **See Also** -- [ttl_only_drop_parts](/docs/en/operations/settings/settings.md/#ttl_only_drop_parts) setting - +- [ttl_only_drop_parts](/docs/en/operations/settings/merge-tree-settings#ttl_only_drop_parts) setting ## Disk types diff --git a/docs/en/getting-started/install.md b/docs/en/getting-started/install.md index 6209ef3c8ee..62071ddb722 100644 --- a/docs/en/getting-started/install.md +++ b/docs/en/getting-started/install.md @@ -16,7 +16,7 @@ You have four options for getting up and running with ClickHouse: - **[ClickHouse Cloud](https://clickhouse.com/cloud/):** The official ClickHouse as a service, - built by, maintained and supported by the creators of ClickHouse - **[Quick Install](#quick-install):** an easy-to-download binary for testing and developing with ClickHouse - **[Production Deployments](#available-installation-options):** ClickHouse can run on any Linux, FreeBSD, or macOS with x86-64, modern ARM (ARMv8.2-A up), or PowerPC64LE CPU architecture -- **[Docker Image](https://hub.docker.com/r/clickhouse/clickhouse-server/):** use the official Docker image in Docker Hub +- **[Docker Image](https://hub.docker.com/_/clickhouse):** use the official Docker image in Docker Hub ## ClickHouse Cloud diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index ca4938b1a47..9442aad230b 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -1643,6 +1643,7 @@ You can specify the log format that will be outputted in the console log. Curren ```json { + "date_time_utc": "2024-11-06T09:06:09Z", "date_time": "1650918987.180175", "thread_name": "#1", "thread_id": "254545", @@ -3285,3 +3286,17 @@ Use the legacy MongoDB integration implementation. Deprecated. Type: Bool Default value: `true`. + +## allowed_feature_tier + +Controls if the user can change settings related to the different feature tiers. +0 - Changes to any setting are allowed (experimental, beta, production). +1 - Only changes to beta and production feature settings are allowed. Changes to experimental settings are rejected. +2 - Only changes to production settings are allowed. Changes to experimental or beta settings are rejected. + +This is equivalent to setting a readonly constraint on all EXPERIMENTAL / BETA features. +``` + +Type: UInt32 + +Default value: `0` (all settings can be changed). diff --git a/docs/en/operations/settings/merge-tree-settings.md b/docs/en/operations/settings/merge-tree-settings.md index 45c4cdf9458..8eebaf20617 100644 --- a/docs/en/operations/settings/merge-tree-settings.md +++ b/docs/en/operations/settings/merge-tree-settings.md @@ -78,6 +78,16 @@ If `min_merge_bytes_to_use_direct_io = 0`, then direct I/O is disabled. Default value: `10 * 1024 * 1024 * 1024` bytes. +## ttl_only_drop_parts + +Controls whether data parts are fully dropped in MergeTree tables when all rows in that part have expired according to their `TTL` settings. + +When `ttl_only_drop_parts` is disabled (by default), only the rows that have expired based on their TTL settings are removed. + +When `ttl_only_drop_parts` is enabled, the entire part is dropped if all rows in that part have expired according to their `TTL` settings. + +Default value: 0. + ## merge_with_ttl_timeout Minimum delay in seconds before repeating a merge with delete TTL. @@ -1095,3 +1105,13 @@ Possible values: Default value: 0.0 Note that if both `min_free_disk_ratio_to_perform_insert` and `min_free_disk_bytes_to_perform_insert` are specified, ClickHouse will count on the value that will allow to perform inserts on a bigger amount of free memory. + +## cache_populated_by_fetch + +A Cloud only setting. + +When `cache_populated_by_fetch` is disabled (the default setting), new data parts are loaded into the cache only when a query is run that requires those parts. + +If enabled, `cache_populated_by_fetch` will instead cause all nodes to load new data parts from storage into their cache without requiring a query to trigger such an action. + +Default value: 0. \ No newline at end of file diff --git a/docs/en/operations/system-tables/asynchronous_metrics.md b/docs/en/operations/system-tables/asynchronous_metrics.md index 762d187917c..d506daba95c 100644 --- a/docs/en/operations/system-tables/asynchronous_metrics.md +++ b/docs/en/operations/system-tables/asynchronous_metrics.md @@ -211,7 +211,7 @@ Number of threads in the server of the replicas communication protocol (without The difference in time the thread for calculation of the asynchronous metrics was scheduled to wake up and the time it was in fact, woken up. A proxy-indicator of overall system latency and responsiveness. -### LoadAverage_*N* +### LoadAverage*N* The whole system load, averaged with exponential smoothing over 1 minute. The load represents the number of threads across all the processes (the scheduling entities of the OS kernel), that are currently running by CPU or waiting for IO, or ready to run but not being scheduled at this point of time. This number includes all the processes, not only clickhouse-server. The number can be greater than the number of CPU cores, if the system is overloaded, and many processes are ready to run but waiting for CPU or IO. diff --git a/docs/en/sql-reference/aggregate-functions/index.md b/docs/en/sql-reference/aggregate-functions/index.md index 5056ef2c7aa..c297214a49c 100644 --- a/docs/en/sql-reference/aggregate-functions/index.md +++ b/docs/en/sql-reference/aggregate-functions/index.md @@ -75,7 +75,7 @@ FROM t_null_big └────────────────────┴─────────────────────┘ ``` -Also you can use [Tuple](/docs/en/sql-reference/data-types/tuple.md) to work around NULL skipping behavior. The a `Tuple` that contains only a `NULL` value is not `NULL`, so the aggregate functions won't skip that row because of that `NULL` value. +Also you can use [Tuple](/docs/en/sql-reference/data-types/tuple.md) to work around NULL skipping behavior. A `Tuple` that contains only a `NULL` value is not `NULL`, so the aggregate functions won't skip that row because of that `NULL` value. ```sql SELECT @@ -110,7 +110,7 @@ GROUP BY v └──────┴─────────┴──────────┘ ``` -And here is an example of of first_value with `RESPECT NULLS` where we can see that NULL inputs are respected and it will return the first value read, whether it's NULL or not: +And here is an example of first_value with `RESPECT NULLS` where we can see that NULL inputs are respected and it will return the first value read, whether it's NULL or not: ```sql SELECT diff --git a/docs/en/sql-reference/aggregate-functions/reference/any.md b/docs/en/sql-reference/aggregate-functions/reference/any.md index 972263585f2..e7bebd4d460 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/any.md +++ b/docs/en/sql-reference/aggregate-functions/reference/any.md @@ -5,7 +5,15 @@ sidebar_position: 102 # any -Selects the first encountered value of a column, ignoring any `NULL` values. +Selects the first encountered value of a column. + +:::warning +As a query can be executed in arbitrary order, the result of this function is non-deterministic. +If you need an arbitrary but deterministic result, use functions [`min`](../reference/min.md) or [`max`](../reference/max.md). +::: + +By default, the function never returns NULL, i.e. ignores NULL values in the input column. +However, if the function is used with the `RESPECT NULLS` modifier, it returns the first value reads no matter if NULL or not. **Syntax** @@ -13,46 +21,51 @@ Selects the first encountered value of a column, ignoring any `NULL` values. any(column) [RESPECT NULLS] ``` -Aliases: `any_value`, [`first_value`](../reference/first_value.md). +Aliases `any(column)` (without `RESPECT NULLS`) +- `any_value` +- [`first_value`](../reference/first_value.md). + +Alias for `any(column) RESPECT NULLS` +- `anyRespectNulls`, `any_respect_nulls` +- `firstValueRespectNulls`, `first_value_respect_nulls` +- `anyValueRespectNulls`, `any_value_respect_nulls` **Parameters** -- `column`: The column name. +- `column`: The column name. **Returned value** -:::note -Supports the `RESPECT NULLS` modifier after the function name. Using this modifier will ensure the function selects the first value passed, regardless of whether it is `NULL` or not. -::: +The first value encountered. :::note -The return type of the function is the same as the input, except for LowCardinality which is discarded. This means that given no rows as input it will return the default value of that type (0 for integers, or Null for a Nullable() column). You might use the `-OrNull` [combinator](../../../sql-reference/aggregate-functions/combinators.md) ) to modify this behaviour. -::: - -:::warning -The query can be executed in any order and even in a different order each time, so the result of this function is indeterminate. -To get a determinate result, you can use the [`min`](../reference/min.md) or [`max`](../reference/max.md) function instead of `any`. +The return type of the function is the same as the input, except for LowCardinality which is discarded. +This means that given no rows as input it will return the default value of that type (0 for integers, or Null for a Nullable() column). +You might use the `-OrNull` [combinator](../../../sql-reference/aggregate-functions/combinators.md) ) to modify this behaviour. ::: **Implementation details** -In some cases, you can rely on the order of execution. This applies to cases when `SELECT` comes from a subquery that uses `ORDER BY`. +In some cases, you can rely on the order of execution. +This applies to cases when `SELECT` comes from a subquery that uses `ORDER BY`. -When a `SELECT` query has the `GROUP BY` clause or at least one aggregate function, ClickHouse (in contrast to MySQL) requires that all expressions in the `SELECT`, `HAVING`, and `ORDER BY` clauses be calculated from keys or from aggregate functions. In other words, each column selected from the table must be used either in keys or inside aggregate functions. To get behavior like in MySQL, you can put the other columns in the `any` aggregate function. +When a `SELECT` query has the `GROUP BY` clause or at least one aggregate function, ClickHouse (in contrast to MySQL) requires that all expressions in the `SELECT`, `HAVING`, and `ORDER BY` clauses be calculated from keys or from aggregate functions. +In other words, each column selected from the table must be used either in keys or inside aggregate functions. +To get behavior like in MySQL, you can put the other columns in the `any` aggregate function. **Example** Query: ```sql -CREATE TABLE any_nulls (city Nullable(String)) ENGINE=Log; +CREATE TABLE tab (city Nullable(String)) ENGINE=Memory; -INSERT INTO any_nulls (city) VALUES (NULL), ('Amsterdam'), ('New York'), ('Tokyo'), ('Valencia'), (NULL); +INSERT INTO tab (city) VALUES (NULL), ('Amsterdam'), ('New York'), ('Tokyo'), ('Valencia'), (NULL); -SELECT any(city) FROM any_nulls; +SELECT any(city), anyRespectNulls(city) FROM tab; ``` ```response -┌─any(city)─┠-│ Amsterdam │ -└───────────┘ +┌─any(city)─┬─anyRespectNulls(city)─┠+│ Amsterdam │ á´ºáµá´¸á´¸ │ +└───────────┴───────────────────────┘ ``` diff --git a/docs/en/sql-reference/aggregate-functions/reference/anylast.md b/docs/en/sql-reference/aggregate-functions/reference/anylast.md index 4fe21531c76..3d80533e146 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/anylast.md +++ b/docs/en/sql-reference/aggregate-functions/reference/anylast.md @@ -5,7 +5,15 @@ sidebar_position: 105 # anyLast -Selects the last value encountered, ignoring any `NULL` values by default. The result is just as indeterminate as for the [any](../../../sql-reference/aggregate-functions/reference/any.md) function. +Selects the last encountered value of a column. + +:::warning +As a query can be executed in arbitrary order, the result of this function is non-deterministic. +If you need an arbitrary but deterministic result, use functions [`min`](../reference/min.md) or [`max`](../reference/max.md). +::: + +By default, the function never returns NULL, i.e. ignores NULL values in the input column. +However, if the function is used with the `RESPECT NULLS` modifier, it returns the first value reads no matter if NULL or not. **Syntax** @@ -13,12 +21,15 @@ Selects the last value encountered, ignoring any `NULL` values by default. The r anyLast(column) [RESPECT NULLS] ``` -**Parameters** -- `column`: The column name. +Alias `anyLast(column)` (without `RESPECT NULLS`) +- [`last_value`](../reference/last_value.md). -:::note -Supports the `RESPECT NULLS` modifier after the function name. Using this modifier will ensure the function selects the last value passed, regardless of whether it is `NULL` or not. -::: +Aliases for `anyLast(column) RESPECT NULLS` +- `anyLastRespectNulls`, `anyLast_respect_nulls` +- `lastValueRespectNulls`, `last_value_respect_nulls` + +**Parameters** +- `column`: The column name. **Returned value** @@ -29,15 +40,15 @@ Supports the `RESPECT NULLS` modifier after the function name. Using this modifi Query: ```sql -CREATE TABLE any_last_nulls (city Nullable(String)) ENGINE=Log; +CREATE TABLE tab (city Nullable(String)) ENGINE=Memory; -INSERT INTO any_last_nulls (city) VALUES ('Amsterdam'),(NULL),('New York'),('Tokyo'),('Valencia'),(NULL); +INSERT INTO tab (city) VALUES ('Amsterdam'),(NULL),('New York'),('Tokyo'),('Valencia'),(NULL); -SELECT anyLast(city) FROM any_last_nulls; +SELECT anyLast(city), anyLastRespectNulls(city) FROM tab; ``` ```response -┌─anyLast(city)─┠-│ Valencia │ -└───────────────┘ +┌─anyLast(city)─┬─anyLastRespectNulls(city)─┠+│ Valencia │ á´ºáµá´¸á´¸ │ +└───────────────┴───────────────────────────┘ ``` diff --git a/docs/en/sql-reference/functions/date-time-functions.md b/docs/en/sql-reference/functions/date-time-functions.md index 34dc6e996ee..0dfa940d9a7 100644 --- a/docs/en/sql-reference/functions/date-time-functions.md +++ b/docs/en/sql-reference/functions/date-time-functions.md @@ -4489,9 +4489,9 @@ Using replacement fields, you can define a pattern for the resulting string. | k | clockhour of day (1~24) | number | 24 | | m | minute of hour | number | 30 | | s | second of minute | number | 55 | -| S | fraction of second (not supported yet) | number | 978 | -| z | time zone (short name not supported yet) | text | Pacific Standard Time; PST | -| Z | time zone offset/id (not supported yet) | zone | -0800; -08:00; America/Los_Angeles | +| S | fraction of second | number | 978 | +| z | time zone | text | Eastern Standard Time; EST | +| Z | time zone offset | zone | -0800; -0812 | | ' | escape for text | delimiter | | | '' | single quote | literal | ' | diff --git a/docs/en/sql-reference/functions/type-conversion-functions.md b/docs/en/sql-reference/functions/type-conversion-functions.md index 91bae2fe9da..5f4c59f5218 100644 --- a/docs/en/sql-reference/functions/type-conversion-functions.md +++ b/docs/en/sql-reference/functions/type-conversion-functions.md @@ -6791,7 +6791,7 @@ parseDateTime(str[, format[, timezone]]) **Returned value(s)** -Returns DateTime values parsed from input string according to a MySQL style format string. +Return a [DateTime](../data-types/datetime.md) value parsed from the input string according to a MySQL-style format string. **Supported format specifiers** @@ -6840,7 +6840,7 @@ parseDateTimeInJodaSyntax(str[, format[, timezone]]) **Returned value(s)** -Returns DateTime values parsed from input string according to a Joda style format. +Return a [DateTime](../data-types/datetime.md) value parsed from the input string according to a Joda-style format string. **Supported format specifiers** @@ -6867,9 +6867,55 @@ Same as for [parseDateTimeInJodaSyntax](#parsedatetimeinjodasyntax) except that Same as for [parseDateTimeInJodaSyntax](#parsedatetimeinjodasyntax) except that it returns `NULL` when it encounters a date format that cannot be processed. +## parseDateTime64 + +Converts a [String](../data-types/string.md) to [DateTime64](../data-types/datetime64.md) according to a [MySQL format string](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-format). + +**Syntax** + +``` sql +parseDateTime64(str[, format[, timezone]]) +``` + +**Arguments** + +- `str` — The String to be parsed. +- `format` — The format string. Optional. `%Y-%m-%d %H:%i:%s.%f` if not specified. +- `timezone` — [Timezone](/docs/en/operations/server-configuration-parameters/settings.md#timezone). Optional. + +**Returned value(s)** + +Return a [DateTime64](../data-types/datetime64.md) value parsed from the input string according to a MySQL-style format string. +The precision of the returned value is 6. + +## parseDateTime64OrZero + +Same as for [parseDateTime64](#parsedatetime64) except that it returns zero date when it encounters a date format that cannot be processed. + +## parseDateTime64OrNull + +Same as for [parseDateTime64](#parsedatetime64) except that it returns `NULL` when it encounters a date format that cannot be processed. + ## parseDateTime64InJodaSyntax -Similar to [parseDateTimeInJodaSyntax](#parsedatetimeinjodasyntax). Differently, it returns a value of type [DateTime64](../data-types/datetime64.md). +Converts a [String](../data-types/string.md) to [DateTime64](../data-types/datetime64.md) according to a [Joda format string](https://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html). + +**Syntax** + +``` sql +parseDateTime64InJodaSyntax(str[, format[, timezone]]) +``` + +**Arguments** + +- `str` — The String to be parsed. +- `format` — The format string. Optional. `yyyy-MM-dd HH:mm:ss` if not specified. +- `timezone` — [Timezone](/docs/en/operations/server-configuration-parameters/settings.md#timezone). Optional. + +**Returned value(s)** + +Return a [DateTime64](../data-types/datetime64.md) value parsed from the input string according to a Joda-style format string. +The precision of the returned value equal to the number of `S` placeholders in the format string (but at most 6). ## parseDateTime64InJodaSyntaxOrZero diff --git a/docs/en/sql-reference/statements/check-grant.md b/docs/en/sql-reference/statements/check-grant.md new file mode 100644 index 00000000000..7dc78b66bf7 --- /dev/null +++ b/docs/en/sql-reference/statements/check-grant.md @@ -0,0 +1,46 @@ +--- +slug: /en/sql-reference/statements/check-grant +sidebar_position: 56 +sidebar_label: CHECK GRANT +title: "CHECK GRANT Statement" +--- + +The `CHECK GRANT` query is used to check whether the current user/role has been granted a specific privilege. + +## Syntax + +The basic syntax of the query is as follows: + +```sql +CHECK GRANT privilege[(column_name [,...])] [,...] ON {db.table[*]|db[*].*|*.*|table[*]|*} +``` + +- `privilege` — Type of privilege. + +## Examples + +If the user used to be granted the privilege, the response`check_grant` will be `1`. Otherwise, the response `check_grant` will be `0`. + +If `table_1.col1` exists and current user is granted by privilege `SELECT`/`SELECT(con)` or role(with privilege), the response is `1`. +```sql +CHECK GRANT SELECT(col1) ON table_1; +``` + +```text +┌─result─┠+│ 1 │ +└────────┘ +``` +If `table_2.col2` doesn't exists, or current user is not granted by privilege `SELECT`/`SELECT(con)` or role(with privilege), the response is `0`. +```sql +CHECK GRANT SELECT(col2) ON table_2; +``` + +```text +┌─result─┠+│ 0 │ +└────────┘ +``` + +## Wildcard +Specifying privileges you can use asterisk (`*`) instead of a table or a database name. Please check [WILDCARD GRANTS](../../sql-reference/statements/grant.md#wildcard-grants) for wildcard rules. diff --git a/docs/en/sql-reference/statements/explain.md b/docs/en/sql-reference/statements/explain.md index e7c2000301a..62190a5ba51 100644 --- a/docs/en/sql-reference/statements/explain.md +++ b/docs/en/sql-reference/statements/explain.md @@ -161,6 +161,8 @@ Settings: - `actions` — Prints detailed information about step actions. Default: 0. - `json` — Prints query plan steps as a row in [JSON](../../interfaces/formats.md#json) format. Default: 0. It is recommended to use [TSVRaw](../../interfaces/formats.md#tabseparatedraw) format to avoid unnecessary escaping. +When `json=1` step names will contain an additional suffix with unique step identifier. + Example: ```sql @@ -194,30 +196,25 @@ EXPLAIN json = 1, description = 0 SELECT 1 UNION ALL SELECT 2 FORMAT TSVRaw; { "Plan": { "Node Type": "Union", + "Node Id": "Union_10", "Plans": [ { "Node Type": "Expression", + "Node Id": "Expression_13", "Plans": [ { - "Node Type": "SettingQuotaAndLimits", - "Plans": [ - { - "Node Type": "ReadFromStorage" - } - ] + "Node Type": "ReadFromStorage", + "Node Id": "ReadFromStorage_0" } ] }, { "Node Type": "Expression", + "Node Id": "Expression_16", "Plans": [ { - "Node Type": "SettingQuotaAndLimits", - "Plans": [ - { - "Node Type": "ReadFromStorage" - } - ] + "Node Type": "ReadFromStorage", + "Node Id": "ReadFromStorage_4" } ] } @@ -249,6 +246,7 @@ EXPLAIN json = 1, description = 0, header = 1 SELECT 1, 2 + dummy; { "Plan": { "Node Type": "Expression", + "Node Id": "Expression_5", "Header": [ { "Name": "1", @@ -261,23 +259,13 @@ EXPLAIN json = 1, description = 0, header = 1 SELECT 1, 2 + dummy; ], "Plans": [ { - "Node Type": "SettingQuotaAndLimits", + "Node Type": "ReadFromStorage", + "Node Id": "ReadFromStorage_0", "Header": [ { "Name": "dummy", "Type": "UInt8" } - ], - "Plans": [ - { - "Node Type": "ReadFromStorage", - "Header": [ - { - "Name": "dummy", - "Type": "UInt8" - } - ] - } ] } ] @@ -351,17 +339,31 @@ EXPLAIN json = 1, actions = 1, description = 0 SELECT 1 FORMAT TSVRaw; { "Plan": { "Node Type": "Expression", + "Node Id": "Expression_5", "Expression": { - "Inputs": [], + "Inputs": [ + { + "Name": "dummy", + "Type": "UInt8" + } + ], "Actions": [ { - "Node Type": "Column", + "Node Type": "INPUT", "Result Type": "UInt8", - "Result Type": "Column", + "Result Name": "dummy", + "Arguments": [0], + "Removed Arguments": [0], + "Result": 0 + }, + { + "Node Type": "COLUMN", + "Result Type": "UInt8", + "Result Name": "1", "Column": "Const(UInt8)", "Arguments": [], "Removed Arguments": [], - "Result": 0 + "Result": 1 } ], "Outputs": [ @@ -370,17 +372,12 @@ EXPLAIN json = 1, actions = 1, description = 0 SELECT 1 FORMAT TSVRaw; "Type": "UInt8" } ], - "Positions": [0], - "Project Input": true + "Positions": [1] }, "Plans": [ { - "Node Type": "SettingQuotaAndLimits", - "Plans": [ - { - "Node Type": "ReadFromStorage" - } - ] + "Node Type": "ReadFromStorage", + "Node Id": "ReadFromStorage_0" } ] } @@ -396,6 +393,8 @@ Settings: - `graph` — Prints a graph described in the [DOT](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) graph description language. Default: 0. - `compact` — Prints graph in compact mode if `graph` setting is enabled. Default: 1. +When `compact=0` and `graph=1` processor names will contain an additional suffix with unique processor identifier. + Example: ```sql diff --git a/docs/en/sql-reference/statements/select/except.md b/docs/en/sql-reference/statements/select/except.md index 8ba7544d21f..717c1f1bd4a 100644 --- a/docs/en/sql-reference/statements/select/except.md +++ b/docs/en/sql-reference/statements/select/except.md @@ -5,9 +5,14 @@ sidebar_label: EXCEPT # EXCEPT Clause -The `EXCEPT` clause returns only those rows that result from the first query without the second. The queries must match the number of columns, order, and type. The result of `EXCEPT` can contain duplicate rows. +The `EXCEPT` clause returns only those rows that result from the first query without the second. -Multiple `EXCEPT` statements are executed left to right if parenthesis are not specified. The `EXCEPT` operator has the same priority as the `UNION` clause and lower priority than the `INTERSECT` clause. +- Both queries must have the same number of columns in the same order and data type. +- The result of `EXCEPT` can contain duplicate rows. Use `EXCEPT DISTINCT` if this is not desirable. +- Multiple `EXCEPT` statements are executed from left to right if parentheses are not specified. +- The `EXCEPT` operator has the same priority as the `UNION` clause and lower priority than the `INTERSECT` clause. + +## Syntax ``` sql SELECT column1 [, column2 ] @@ -19,18 +24,33 @@ EXCEPT SELECT column1 [, column2 ] FROM table2 [WHERE condition] - ``` -The condition could be any expression based on your requirements. +The condition could be any expression based on your requirements. + +Additionally, `EXCEPT()` can be used to exclude columns from a result in the same table, as is possible with BigQuery (Google Cloud), using the following syntax: + +```sql +SELECT column1 [, column2 ] EXCEPT (column3 [, column4]) +FROM table1 +[WHERE condition] +``` ## Examples +The examples in this section demonstrate usage of the `EXCEPT` clause. + +### Filtering Numbers Using the `EXCEPT` Clause + Here is a simple example that returns the numbers 1 to 10 that are _not_ a part of the numbers 3 to 8: Query: ``` sql -SELECT number FROM numbers(1,10) EXCEPT SELECT number FROM numbers(3,6); +SELECT number +FROM numbers(1, 10) +EXCEPT +SELECT number +FROM numbers(3, 6) ``` Result: @@ -44,7 +64,53 @@ Result: └────────┘ ``` -`EXCEPT` and `INTERSECT` can often be used interchangeably with different Boolean logic, and they are both useful if you have two tables that share a common column (or columns). For example, suppose we have a few million rows of historical cryptocurrency data that contains trade prices and volume: +### Excluding Specific Columns Using `EXCEPT()` + +`EXCEPT()` can be used to quickly exclude columns from a result. For instance if we want to select all columns from a table, except a few select columns as shown in the example below: + +Query: + +```sql +SHOW COLUMNS IN system.settings + +SELECT * EXCEPT (default, alias_for, readonly, description) +FROM system.settings +LIMIT 5 +``` + +Result: + +```response + ┌─field───────┬─type─────────────────────────────────────────────────────────────────────┬─null─┬─key─┬─default─┬─extra─┠+ 1. │ alias_for │ String │ NO │ │ á´ºáµá´¸á´¸ │ │ + 2. │ changed │ UInt8 │ NO │ │ á´ºáµá´¸á´¸ │ │ + 3. │ default │ String │ NO │ │ á´ºáµá´¸á´¸ │ │ + 4. │ description │ String │ NO │ │ á´ºáµá´¸á´¸ │ │ + 5. │ is_obsolete │ UInt8 │ NO │ │ á´ºáµá´¸á´¸ │ │ + 6. │ max │ Nullable(String) │ YES │ │ á´ºáµá´¸á´¸ │ │ + 7. │ min │ Nullable(String) │ YES │ │ á´ºáµá´¸á´¸ │ │ + 8. │ name │ String │ NO │ │ á´ºáµá´¸á´¸ │ │ + 9. │ readonly │ UInt8 │ NO │ │ á´ºáµá´¸á´¸ │ │ +10. │ tier │ Enum8('Production' = 0, 'Obsolete' = 4, 'Experimental' = 8, 'Beta' = 12) │ NO │ │ á´ºáµá´¸á´¸ │ │ +11. │ type │ String │ NO │ │ á´ºáµá´¸á´¸ │ │ +12. │ value │ String │ NO │ │ á´ºáµá´¸á´¸ │ │ + └─────────────┴──────────────────────────────────────────────────────────────────────────┴──────┴─────┴─────────┴───────┘ + + ┌─name────────────────────┬─value──────┬─changed─┬─min──┬─max──┬─type────┬─is_obsolete─┬─tier───────┠+1. │ dialect │ clickhouse │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ Dialect │ 0 │ Production │ +2. │ min_compress_block_size │ 65536 │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ UInt64 │ 0 │ Production │ +3. │ max_compress_block_size │ 1048576 │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ UInt64 │ 0 │ Production │ +4. │ max_block_size │ 65409 │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ UInt64 │ 0 │ Production │ +5. │ max_insert_block_size │ 1048449 │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ UInt64 │ 0 │ Production │ + └─────────────────────────┴────────────┴─────────┴──────┴──────┴─────────┴─────────────┴────────────┘ +``` + +### Using `EXCEPT` and `INTERSECT` with Cryptocurrency Data + +`EXCEPT` and `INTERSECT` can often be used interchangeably with different Boolean logic, and they are both useful if you have two tables that share a common column (or columns). +For example, suppose we have a few million rows of historical cryptocurrency data that contains trade prices and volume: + +Query: ```sql CREATE TABLE crypto_prices @@ -72,6 +138,8 @@ ORDER BY trade_date DESC LIMIT 10; ``` +Result: + ```response ┌─trade_date─┬─crypto_name─┬──────volume─┬────price─┬───market_cap─┬──change_1_day─┠│ 2020-11-02 │ Bitcoin │ 30771456000 │ 13550.49 │ 251119860000 │ -0.013585099 │ @@ -127,7 +195,7 @@ Result: This means of the four cryptocurrencies we own, only Bitcoin has never dropped below $10 (based on the limited data we have here in this example). -## EXCEPT DISTINCT +### Using `EXCEPT DISTINCT` Notice in the previous query we had multiple Bitcoin holdings in the result. You can add `DISTINCT` to `EXCEPT` to eliminate duplicate rows from the result: @@ -146,7 +214,6 @@ Result: └─────────────┘ ``` - **See Also** - [UNION](union.md#union-clause) diff --git a/docs/en/sql-reference/table-functions/deltalake.md b/docs/en/sql-reference/table-functions/deltalake.md index 885d8df6a1e..4f8515a539f 100644 --- a/docs/en/sql-reference/table-functions/deltalake.md +++ b/docs/en/sql-reference/table-functions/deltalake.md @@ -49,4 +49,4 @@ LIMIT 2 **See Also** - [DeltaLake engine](/docs/en/engines/table-engines/integrations/deltalake.md) - +- [DeltaLake cluster table function](/docs/en/sql-reference/table-functions/deltalakeCluster.md) diff --git a/docs/en/sql-reference/table-functions/deltalakeCluster.md b/docs/en/sql-reference/table-functions/deltalakeCluster.md new file mode 100644 index 00000000000..49c2264823f --- /dev/null +++ b/docs/en/sql-reference/table-functions/deltalakeCluster.md @@ -0,0 +1,30 @@ +--- +slug: /en/sql-reference/table-functions/deltalakeCluster +sidebar_position: 46 +sidebar_label: deltaLakeCluster +title: "deltaLakeCluster Table Function" +--- +This is an extension to the [deltaLake](/docs/en/sql-reference/table-functions/deltalake.md) table function. + +Allows processing files from [Delta Lake](https://github.com/delta-io/delta) tables in Amazon S3 in parallel from many nodes in a specified cluster. On initiator it creates a connection to all nodes in the cluster and dispatches each file dynamically. On the worker node it asks the initiator about the next task to process and processes it. This is repeated until all tasks are finished. + +**Syntax** + +``` sql +deltaLakeCluster(cluster_name, url [,aws_access_key_id, aws_secret_access_key] [,format] [,structure] [,compression]) +``` + +**Arguments** + +- `cluster_name` — Name of a cluster that is used to build a set of addresses and connection parameters to remote and local servers. + +- Description of all other arguments coincides with description of arguments in equivalent [deltaLake](/docs/en/sql-reference/table-functions/deltalake.md) table function. + +**Returned value** + +A table with the specified structure for reading data from cluster in the specified Delta Lake table in S3. + +**See Also** + +- [deltaLake engine](/docs/en/engines/table-engines/integrations/deltalake.md) +- [deltaLake table function](/docs/en/sql-reference/table-functions/deltalake.md) diff --git a/docs/en/sql-reference/table-functions/hudi.md b/docs/en/sql-reference/table-functions/hudi.md index 959a32fe26d..f4cdb0bf948 100644 --- a/docs/en/sql-reference/table-functions/hudi.md +++ b/docs/en/sql-reference/table-functions/hudi.md @@ -29,4 +29,4 @@ A table with the specified structure for reading data in the specified Hudi tabl **See Also** - [Hudi engine](/docs/en/engines/table-engines/integrations/hudi.md) - +- [Hudi cluster table function](/docs/en/sql-reference/table-functions/hudiCluster.md) diff --git a/docs/en/sql-reference/table-functions/hudiCluster.md b/docs/en/sql-reference/table-functions/hudiCluster.md new file mode 100644 index 00000000000..985b7479f66 --- /dev/null +++ b/docs/en/sql-reference/table-functions/hudiCluster.md @@ -0,0 +1,30 @@ +--- +slug: /en/sql-reference/table-functions/hudiCluster +sidebar_position: 86 +sidebar_label: hudiCluster +title: "hudiCluster Table Function" +--- +This is an extension to the [hudi](/docs/en/sql-reference/table-functions/hudi.md) table function. + +Allows processing files from Apache [Hudi](https://hudi.apache.org/) tables in Amazon S3 in parallel from many nodes in a specified cluster. On initiator it creates a connection to all nodes in the cluster and dispatches each file dynamically. On the worker node it asks the initiator about the next task to process and processes it. This is repeated until all tasks are finished. + +**Syntax** + +``` sql +hudiCluster(cluster_name, url [,aws_access_key_id, aws_secret_access_key] [,format] [,structure] [,compression]) +``` + +**Arguments** + +- `cluster_name` — Name of a cluster that is used to build a set of addresses and connection parameters to remote and local servers. + +- Description of all other arguments coincides with description of arguments in equivalent [hudi](/docs/en/sql-reference/table-functions/hudi.md) table function. + +**Returned value** + +A table with the specified structure for reading data from cluster in the specified Hudi table in S3. + +**See Also** + +- [Hudi engine](/docs/en/engines/table-engines/integrations/hudi.md) +- [Hudi table function](/docs/en/sql-reference/table-functions/hudi.md) diff --git a/docs/en/sql-reference/table-functions/iceberg.md b/docs/en/sql-reference/table-functions/iceberg.md index 4f54b2cd440..28063330008 100644 --- a/docs/en/sql-reference/table-functions/iceberg.md +++ b/docs/en/sql-reference/table-functions/iceberg.md @@ -72,3 +72,4 @@ Table function `iceberg` is an alias to `icebergS3` now. **See Also** - [Iceberg engine](/docs/en/engines/table-engines/integrations/iceberg.md) +- [Iceberg cluster table function](/docs/en/sql-reference/table-functions/icebergCluster.md) diff --git a/docs/en/sql-reference/table-functions/icebergCluster.md b/docs/en/sql-reference/table-functions/icebergCluster.md new file mode 100644 index 00000000000..bc444f361d5 --- /dev/null +++ b/docs/en/sql-reference/table-functions/icebergCluster.md @@ -0,0 +1,43 @@ +--- +slug: /en/sql-reference/table-functions/icebergCluster +sidebar_position: 91 +sidebar_label: icebergCluster +title: "icebergCluster Table Function" +--- +This is an extension to the [iceberg](/docs/en/sql-reference/table-functions/iceberg.md) table function. + +Allows processing files from Apache [Iceberg](https://iceberg.apache.org/) in parallel from many nodes in a specified cluster. On initiator it creates a connection to all nodes in the cluster and dispatches each file dynamically. On the worker node it asks the initiator about the next task to process and processes it. This is repeated until all tasks are finished. + +**Syntax** + +``` sql +icebergS3Cluster(cluster_name, url [, NOSIGN | access_key_id, secret_access_key, [session_token]] [,format] [,compression_method]) +icebergS3Cluster(cluster_name, named_collection[, option=value [,..]]) + +icebergAzureCluster(cluster_name, connection_string|storage_account_url, container_name, blobpath, [,account_name], [,account_key] [,format] [,compression_method]) +icebergAzureCluster(cluster_name, named_collection[, option=value [,..]]) + +icebergHDFSCluster(cluster_name, path_to_table, [,format] [,compression_method]) +icebergHDFSCluster(cluster_name, named_collection[, option=value [,..]]) +``` + +**Arguments** + +- `cluster_name` — Name of a cluster that is used to build a set of addresses and connection parameters to remote and local servers. + +- Description of all other arguments coincides with description of arguments in equivalent [iceberg](/docs/en/sql-reference/table-functions/iceberg.md) table function. + +**Returned value** + +A table with the specified structure for reading data from cluster in the specified Iceberg table. + +**Examples** + +```sql +SELECT * FROM icebergS3Cluster('cluster_simple', 'http://test.s3.amazonaws.com/clickhouse-bucket/test_table', 'test', 'test') +``` + +**See Also** + +- [Iceberg engine](/docs/en/engines/table-engines/integrations/iceberg.md) +- [Iceberg table function](/docs/en/sql-reference/table-functions/iceberg.md) diff --git a/docs/en/sql-reference/table-functions/s3.md b/docs/en/sql-reference/table-functions/s3.md index b14eb84392f..ea7820c1aec 100644 --- a/docs/en/sql-reference/table-functions/s3.md +++ b/docs/en/sql-reference/table-functions/s3.md @@ -317,7 +317,7 @@ SELECT * from s3('s3://data/path/date=*/country=*/code=*/*.parquet') where _date - [s3_truncate_on_insert](/docs/en/operations/settings/settings.md#s3_truncate_on_insert) - allows to truncate file before insert into it. Disabled by default. - [s3_create_new_file_on_insert](/docs/en/operations/settings/settings.md#s3_create_new_file_on_insert) - allows to create a new file on each insert if format has suffix. Disabled by default. -- [s3_skip_empty_files](/docs/en/operations/settings/settings.md#s3_skip_empty_files) - allows to skip empty files while reading. Disabled by default. +- [s3_skip_empty_files](/docs/en/operations/settings/settings.md#s3_skip_empty_files) - allows to skip empty files while reading. Enabled by default. **See Also** diff --git a/docs/en/sql-reference/window-functions/first_value.md b/docs/en/sql-reference/window-functions/first_value.md index 30c3b1f99dc..c6e978bfc92 100644 --- a/docs/en/sql-reference/window-functions/first_value.md +++ b/docs/en/sql-reference/window-functions/first_value.md @@ -15,7 +15,7 @@ first_value (column_name) [[RESPECT NULLS] | [IGNORE NULLS]] OVER ([[PARTITION BY grouping_column] [ORDER BY sorting_column] [ROWS or RANGE expression_to_bound_rows_withing_the_group]] | [window_name]) FROM table_name -WINDOW window_name as ([[PARTITION BY grouping_column] [ORDER BY sorting_column]) +WINDOW window_name as ([PARTITION BY grouping_column] [ORDER BY sorting_column]) ``` Alias: `any`. @@ -23,6 +23,8 @@ Alias: `any`. :::note Using the optional modifier `RESPECT NULLS` after `first_value(column_name)` will ensure that `NULL` arguments are not skipped. See [NULL processing](../aggregate-functions/index.md/#null-processing) for more information. + +Alias: `firstValueRespectNulls` ::: For more detail on window function syntax see: [Window Functions - Syntax](./index.md/#syntax). @@ -48,7 +50,7 @@ CREATE TABLE salaries ) Engine = Memory; -INSERT INTO salaries FORMAT Values +INSERT INTO salaries FORMAT VALUES ('Port Elizabeth Barbarians', 'Gary Chen', 196000, 'F'), ('New Coreystad Archdukes', 'Charles Juarez', 190000, 'F'), ('Port Elizabeth Barbarians', 'Michael Stanley', 100000, 'D'), diff --git a/docs/en/sql-reference/window-functions/last_value.md b/docs/en/sql-reference/window-functions/last_value.md index dd7f5fa078a..9f3ef8ba4f6 100644 --- a/docs/en/sql-reference/window-functions/last_value.md +++ b/docs/en/sql-reference/window-functions/last_value.md @@ -23,6 +23,8 @@ Alias: `anyLast`. :::note Using the optional modifier `RESPECT NULLS` after `first_value(column_name)` will ensure that `NULL` arguments are not skipped. See [NULL processing](../aggregate-functions/index.md/#null-processing) for more information. + +Alias: `lastValueRespectNulls` ::: For more detail on window function syntax see: [Window Functions - Syntax](./index.md/#syntax). @@ -33,7 +35,7 @@ For more detail on window function syntax see: [Window Functions - Syntax](./ind **Example** -In this example the `last_value` function is used to find the highest paid footballer from a fictional dataset of salaries of Premier League football players. +In this example the `last_value` function is used to find the lowest paid footballer from a fictional dataset of salaries of Premier League football players. Query: @@ -48,7 +50,7 @@ CREATE TABLE salaries ) Engine = Memory; -INSERT INTO salaries FORMAT Values +INSERT INTO salaries FORMAT VALUES ('Port Elizabeth Barbarians', 'Gary Chen', 196000, 'F'), ('New Coreystad Archdukes', 'Charles Juarez', 190000, 'F'), ('Port Elizabeth Barbarians', 'Michael Stanley', 100000, 'D'), diff --git a/docs/ja/_placeholders/api/_invitations-api-reference.md b/docs/ja/_placeholders/api/_invitations-api-reference.md new file mode 100644 index 00000000000..1ad8058f5d9 --- /dev/null +++ b/docs/ja/_placeholders/api/_invitations-api-reference.md @@ -0,0 +1,8 @@ +--- +sidebar_label: 招待 +title: 招待 +--- + +## ã™ã¹ã¦ã®æ‹›å¾…を一覧表示 + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ãƒ“ルドプロセス中㫠`clickhouseapi.js` ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã¾ã™ã€‚内容を変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`clickhouseapi.js` を編集ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/_placeholders/api/_keys-api-reference.md b/docs/ja/_placeholders/api/_keys-api-reference.md new file mode 100644 index 00000000000..7e58a2195d9 --- /dev/null +++ b/docs/ja/_placeholders/api/_keys-api-reference.md @@ -0,0 +1,9 @@ +--- +sidebar_label: キー +title: キー +--- + +## ã™ã¹ã¦ã®ã‚­ãƒ¼ã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã™ã‚‹ + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ãƒ“ルドプロセス中㫠`clickhouseapi.js` ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ +内容を変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`clickhouseapi.js` を編集ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/_placeholders/api/_members-api-reference.md b/docs/ja/_placeholders/api/_members-api-reference.md new file mode 100644 index 00000000000..c274b9f5849 --- /dev/null +++ b/docs/ja/_placeholders/api/_members-api-reference.md @@ -0,0 +1,8 @@ +--- +sidebar_label: メンãƒãƒ¼ +title: メンãƒãƒ¼ +--- + +## 組織メンãƒãƒ¼ã®ä¸€è¦§ + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ãƒ“ルドプロセス中ã«`clickhouseapi.js`ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã¾ã™ã€‚内容を変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`clickhouseapi.js`を編集ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/_placeholders/api/_organizations-api-reference.md b/docs/ja/_placeholders/api/_organizations-api-reference.md new file mode 100644 index 00000000000..ec127f4cb9d --- /dev/null +++ b/docs/ja/_placeholders/api/_organizations-api-reference.md @@ -0,0 +1,8 @@ +--- +sidebar_label: 組織 +title: 組織 +--- + +## 組織ã®è©³ç´°ã‚’å–å¾—ã™ã‚‹ + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ãƒ“ルドプロセス中㫠`clickhouseapi.js` ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã¾ã™ã€‚内容を変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`clickhouseapi.js` を編集ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/_placeholders/api/_services-api-reference.md b/docs/ja/_placeholders/api/_services-api-reference.md new file mode 100644 index 00000000000..6eec8e9c637 --- /dev/null +++ b/docs/ja/_placeholders/api/_services-api-reference.md @@ -0,0 +1,8 @@ +--- +sidebar_label: サービス +title: サービス +--- + +## 組織サービスã®ä¸€è¦§ + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ãƒ“ルドプロセス中㫠`clickhouseapi.js` ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã¾ã™ã€‚内容を変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`clickhouseapi.js` を編集ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/_placeholders/changelog/_index.md b/docs/ja/_placeholders/changelog/_index.md new file mode 100644 index 00000000000..ac44d7637ff --- /dev/null +++ b/docs/ja/_placeholders/changelog/_index.md @@ -0,0 +1,8 @@ +--- +slug: /ja/whats-new/changelog/ +sidebar_position: 2 +sidebar_label: 2024 +title: 2024 Changelog +note: ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ `yarn new-build` ã«ã‚ˆã£ã¦è‡ªå‹•ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ +--- + diff --git a/docs/ja/_snippets/_GCS_authentication_and_bucket.md b/docs/ja/_snippets/_GCS_authentication_and_bucket.md new file mode 100644 index 00000000000..5e16e8bbb47 --- /dev/null +++ b/docs/ja/_snippets/_GCS_authentication_and_bucket.md @@ -0,0 +1,41 @@ +
GCS ãƒã‚±ãƒƒãƒˆã¨ HMAC キーを作æˆã™ã‚‹ + +### ch_bucket_us_east1 + +![ãƒã‚±ãƒƒãƒˆã‚’追加](@site/docs/ja/integrations/data-ingestion/s3/images/GCS-bucket-1.png) + +### ch_bucket_us_east4 + +![ãƒã‚±ãƒƒãƒˆã‚’追加](@site/docs/ja/integrations/data-ingestion/s3/images/GCS-bucket-2.png) + +### アクセスキーを生æˆã™ã‚‹ + +### サービスアカウント㮠HMAC キーã¨ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆã‚’作æˆã™ã‚‹ + +**Cloud Storage > Settings > Interoperability** ã‚’é–‹ãã€æ—¢å­˜ã® **Access key** ã‚’é¸æŠžã™ã‚‹ã‹ã€**CREATE A KEY FOR A SERVICE ACCOUNT** ã‚’é¸æŠžã—ã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€æ–°ã—ã„サービスアカウントã®æ–°ã—ã„キーを作æˆã™ã‚‹æ‰‹é †ã‚’説明ã—ã¾ã™ã€‚ + +![ãƒã‚±ãƒƒãƒˆã‚’追加](@site/docs/ja/integrations/data-ingestion/s3/images/GCS-create-a-service-account-key.png) + +### æ–°ã—ã„サービスアカウントを追加ã™ã‚‹ + +ã™ã§ã«ã‚µãƒ¼ãƒ“スアカウントãŒå­˜åœ¨ã—ãªã„プロジェクトã®å ´åˆã¯ã€**CREATE NEW ACCOUNT** をクリックã—ã¾ã™ã€‚ + +![ãƒã‚±ãƒƒãƒˆã‚’追加](@site/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-0.png) + +サービスアカウントを作æˆã™ã‚‹ã«ã¯3ã¤ã®ã‚¹ãƒ†ãƒƒãƒ—ãŒã‚ã‚Šã¾ã™ã€‚最åˆã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã¯ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«æ„味ã®ã‚ã‚‹åå‰ã€IDã€èª¬æ˜Žã‚’付ã‘ã¾ã™ã€‚ + +![ãƒã‚±ãƒƒãƒˆã‚’追加](@site/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-a.png) + +Interoperability 設定ダイアログã§ã¯ã€IAM ロールã¨ã—㦠**Storage Object Admin** ロールãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ステップ2ã§ãã®ãƒ­ãƒ¼ãƒ«ã‚’é¸æŠžã—ã¾ã™ã€‚ + +![ãƒã‚±ãƒƒãƒˆã‚’追加](@site/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-2.png) + +ステップ3ã¯ã‚ªãƒ—ションã§ã‚ã‚Šã€ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ä½¿ç”¨ã—ã¾ã›ã‚“。ãƒãƒªã‚·ãƒ¼ã«åŸºã¥ã„ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã“れらã®ç‰¹æ¨©ã‚’与ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![ãƒã‚±ãƒƒãƒˆã‚’追加](@site/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-3.png) + +サービスアカウント㮠HMAC キーãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã“ã®æƒ…報をä¿å­˜ã—ã¦ãã ã•ã„。ClickHouse ã®è¨­å®šã§ä½¿ç”¨ã—ã¾ã™ã€‚ + +![ãƒã‚±ãƒƒãƒˆã‚’追加](@site/docs/ja/integrations/data-ingestion/s3/images/GCS-guide-key.png) + +
diff --git a/docs/ja/_snippets/_S3_authentication_and_bucket.md b/docs/ja/_snippets/_S3_authentication_and_bucket.md new file mode 100644 index 00000000000..3603786c5f9 --- /dev/null +++ b/docs/ja/_snippets/_S3_authentication_and_bucket.md @@ -0,0 +1,132 @@ +
S3ãƒã‚±ãƒƒãƒˆã¨IAMユーザーã®ä½œæˆ + +ã“ã®è¨˜äº‹ã§ã¯ã€AWS IAMユーザーを設定ã—ã€S3ãƒã‚±ãƒƒãƒˆã‚’作æˆã—ã€ClickHouseã‚’ãã®ãƒã‚±ãƒƒãƒˆã‚’S3ディスクã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã‚ˆã†ã«è¨­å®šã™ã‚‹åŸºæœ¬ã‚’説明ã—ã¦ã„ã¾ã™ã€‚使用ã™ã‚‹æ¨©é™ã‚’決定ã™ã‚‹ãŸã‚ã«ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒãƒ¼ãƒ ã¨å”力ã—ã€ã“れらを出発点ã¨ã—ã¦è€ƒãˆã¦ãã ã•ã„。 + +### AWS IAMユーザーã®ä½œæˆ +ã“ã®æ‰‹é †ã§ã¯ã€ãƒ­ã‚°ã‚¤ãƒ³ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã¯ãªãサービスアカウントユーザーを作æˆã—ã¾ã™ã€‚ +1. AWS IAM 管ç†ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚ + +2. 「ユーザーã€ã§ã€**ユーザーを追加** ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![create_iam_user_0](@site/docs/ja/_snippets/images/s3/s3-1.png) + +3. ユーザーåを入力ã—ã€è³‡æ ¼æƒ…å ±ã®ç¨®é¡žã‚’ **アクセスキー - プログラムã«ã‚ˆã‚‹ã‚¢ã‚¯ã‚»ã‚¹** ã«è¨­å®šã—ã€**次: 権é™** ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![create_iam_user_1](@site/docs/ja/_snippets/images/s3/s3-2.png) + +4. ユーザーをグループã«è¿½åŠ ã›ãšã€**次: ã‚¿ã‚°** ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![create_iam_user_2](@site/docs/ja/_snippets/images/s3/s3-3.png) + +5. タグを追加ã™ã‚‹å¿…è¦ãŒãªã‘ã‚Œã°ã€**次: 確èª** ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![create_iam_user_3](@site/docs/ja/_snippets/images/s3/s3-4.png) + +6. **ユーザーを作æˆ** ã‚’é¸æŠžã—ã¾ã™ã€‚ + + :::note + ユーザーã«æ¨©é™ãŒãªã„ã¨ã„ã†è­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ç„¡è¦–ã§ãã¾ã™ã€‚次ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ãƒã‚±ãƒƒãƒˆã«å¯¾ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«æ¨©é™ãŒä»˜ä¸Žã•ã‚Œã¾ã™ã€‚ + ::: + + ![create_iam_user_4](@site/docs/ja/_snippets/images/s3/s3-5.png) + +7. ユーザーãŒä½œæˆã•ã‚Œã¾ã—ãŸã€‚**表示** をクリックã—ã€ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ã¨ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆã‚­ãƒ¼ã‚’コピーã—ã¾ã™ã€‚ +:::note +ã“ã‚ŒãŒã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ãŒåˆ©ç”¨å¯èƒ½ãªå”¯ä¸€ã®ã‚¿ã‚¤ãƒŸãƒ³ã‚°ã§ã™ã®ã§ã€ã‚­ãƒ¼ã‚’別ã®å ´æ‰€ã«ä¿å­˜ã—ã¦ãã ã•ã„。 +::: + + ![create_iam_user_5](@site/docs/ja/_snippets/images/s3/s3-6.png) + +8. é–‰ã˜ã‚‹ã‚’クリックã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ç”»é¢ã§ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’見ã¤ã‘ã¾ã™ã€‚ + + ![create_iam_user_6](@site/docs/ja/_snippets/images/s3/s3-7.png) + +9. ARN(Amazon Resource Name)をコピーã—ã€ãƒã‚±ãƒƒãƒˆã®ã‚¢ã‚¯ã‚»ã‚¹ãƒãƒªã‚·ãƒ¼ã‚’設定ã™ã‚‹éš›ã«ä½¿ç”¨ã™ã‚‹ãŸã‚ã«ä¿å­˜ã—ã¾ã™ã€‚ + + ![create_iam_user_7](@site/docs/ja/_snippets/images/s3/s3-8.png) + +### S3ãƒã‚±ãƒƒãƒˆã®ä½œæˆ +1. S3ãƒã‚±ãƒƒãƒˆã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã€**ãƒã‚±ãƒƒãƒˆã®ä½œæˆ** ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![create_s3_bucket_0](@site/docs/ja/_snippets/images/s3/s3-9.png) + +2. ãƒã‚±ãƒƒãƒˆåを入力ã—ã€ä»–ã®ã‚ªãƒ—ションã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã¾ã¾ã«ã—ã¾ã™ã€‚ +:::note +ãƒã‚±ãƒƒãƒˆåã¯AWS全体ã§ä¸€æ„ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚組織内ã ã‘ã§ãªãã€ä¸€æ„ã§ãªã„å ´åˆã¯ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +::: +3. `ã™ã¹ã¦ã®ãƒ‘ブリックアクセスをブロック` を有効ã®ã¾ã¾ã«ã—ã¾ã™ã€‚パブリックアクセスã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 + + ![create_s3_bucket_2](@site/docs/ja/_snippets/images/s3/s3-a.png) + +4. ページã®ä¸‹éƒ¨ã«ã‚ã‚‹ **ãƒã‚±ãƒƒãƒˆã®ä½œæˆ** ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![create_s3_bucket_3](@site/docs/ja/_snippets/images/s3/s3-b.png) + +5. リンクをé¸æŠžã—ã€ARNをコピーã—ã¦ã€ãƒã‚±ãƒƒãƒˆã®ã‚¢ã‚¯ã‚»ã‚¹ãƒãƒªã‚·ãƒ¼ã‚’設定ã™ã‚‹ã¨ãã«ä½¿ç”¨ã™ã‚‹ãŸã‚ã«ä¿å­˜ã—ã¾ã™ã€‚ + +6. ãƒã‚±ãƒƒãƒˆãŒä½œæˆã•ã‚ŒãŸã‚‰ã€S3ãƒã‚±ãƒƒãƒˆãƒªã‚¹ãƒˆã§æ–°ã—ã„S3ãƒã‚±ãƒƒãƒˆã‚’見ã¤ã‘ã€ãƒªãƒ³ã‚¯ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![create_s3_bucket_4](@site/docs/ja/_snippets/images/s3/s3-c.png) + +7. **フォルダを作æˆ** ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![create_s3_bucket_5](@site/docs/ja/_snippets/images/s3/s3-d.png) + +8. ClickHouse S3ディスクã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã¨ãªã‚‹ãƒ•ã‚©ãƒ«ãƒ€åを入力ã—ã€**フォルダを作æˆ** ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![create_s3_bucket_6](@site/docs/ja/_snippets/images/s3/s3-e.png) + +9. フォルダãŒãƒã‚±ãƒƒãƒˆãƒªã‚¹ãƒˆã«è¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ã€‚ + + ![create_s3_bucket_7](@site/docs/ja/_snippets/images/s3/s3-f.png) + +10. æ–°ã—ã„フォルダã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã€**URLをコピー** をクリックã—ã¾ã™ã€‚コピーã—ãŸURLã¯ã€æ¬¡ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã®ClickHouseストレージ設定ã§ä½¿ç”¨ã—ã¾ã™ã€‚ + + ![create_s3_bucket_8](@site/docs/ja/_snippets/images/s3/s3-g.png) + +11. **権é™** タブをé¸æŠžã—ã€**ãƒã‚±ãƒƒãƒˆãƒãƒªã‚·ãƒ¼** セクション㮠**編集** ボタンをクリックã—ã¾ã™ã€‚ + + ![create_s3_bucket_9](@site/docs/ja/_snippets/images/s3/s3-h.png) + +12. 以下ã®ä¾‹ã®ã‚ˆã†ã«ãƒã‚±ãƒƒãƒˆãƒãƒªã‚·ãƒ¼ã‚’追加ã—ã¾ã™: +```json +{ + "Version": "2012-10-17", + "Id": "Policy123456", + "Statement": [ + { + "Sid": "abc123", + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::921234567898:user/mars-s3-user" + }, + "Action": "s3:*", + "Resource": [ + "arn:aws:s3:::mars-doc-test", + "arn:aws:s3:::mars-doc-test/*" + ] + } + ] +} +``` + +```response +|パラメータ | 説明 | 例 | +|----------|-------------|----------------| +|Version | ãƒãƒªã‚·ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€ãã®ã¾ã¾ã«ã—ã¦ãŠã | 2012-10-17 | +|Sid | ユーザー定義ã®ãƒãƒªã‚·ãƒ¼ID | abc123 | +|Effect | ユーザーè¦æ±‚ãŒè¨±å¯ã•ã‚Œã‚‹ã‹æ‹’å¦ã•ã‚Œã‚‹ã‹ | Allow | +|Principal | 許å¯ã•ã‚Œã‚‹ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ | arn:aws:iam::921234567898:user/mars-s3-user | +|Action | ãƒã‚±ãƒƒãƒˆä¸Šã§è¨±å¯ã•ã‚Œã‚‹æ“作| s3:*| +|Resource | ãƒã‚±ãƒƒãƒˆå†…ã§æ“作ãŒè¨±å¯ã•ã‚Œã‚‹ãƒªã‚½ãƒ¼ã‚¹ | "arn:aws:s3:::mars-doc-test", "arn:aws:s3:::mars-doc-test/*" | +``` + +:::note +使用ã™ã‚‹æ¨©é™ã‚’決定ã™ã‚‹ãŸã‚ã«ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒãƒ¼ãƒ ã¨å”力ã—ã€ã“れらを出発点ã¨ã—ã¦è€ƒãˆã¦ãã ã•ã„。 +ãƒãƒªã‚·ãƒ¼ã¨è¨­å®šã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€AWSドキュメントをã”å‚ç…§ãã ã•ã„: +https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-policy-language-overview.html +::: + +13. ãƒãƒªã‚·ãƒ¼è¨­å®šã‚’ä¿å­˜ã—ã¾ã™ã€‚ + +
diff --git a/docs/ja/_snippets/_add_remote_ip_access_list_detail.md b/docs/ja/_snippets/_add_remote_ip_access_list_detail.md new file mode 100644 index 00000000000..a9ebd19b7bd --- /dev/null +++ b/docs/ja/_snippets/_add_remote_ip_access_list_detail.md @@ -0,0 +1,11 @@ +
IPアクセスリストを管ç†ã™ã‚‹ + +ClickHouse Cloudã®ã‚µãƒ¼ãƒ“スリストã‹ã‚‰ä½œæ¥­ã™ã‚‹ã‚µãƒ¼ãƒ“スをé¸æŠžã—ã€**セキュリティ**ã«åˆ‡ã‚Šæ›¿ãˆã¾ã™ã€‚IPアクセスリストã«ã€ClickHouse Cloudサービスã«æŽ¥ç¶šã™ã‚‹å¿…è¦ãŒã‚るリモートシステムã®IPアドレスや範囲ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã¯ã€**エントリを追加**ã—ã¦å•é¡Œã‚’解決ã§ãã¾ã™ã€‚ + +![サービスãŒãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’許å¯ã—ã¦ã„ã‚‹ã‹ç¢ºèª](@site/docs/ja/_snippets/images/ip-allow-list-check-list.png) + +ClickHouse Cloudサービスã«æŽ¥ç¶šã™ã‚‹å¿…è¦ãŒã‚る個別ã®IPアドレスã€ã¾ãŸã¯ã‚¢ãƒ‰ãƒ¬ã‚¹ã®ç¯„囲を追加ã—ã¾ã™ã€‚フォームをé©å®œä¿®æ­£ã—ã€**エントリを追加**ã—ã€**エントリをé€ä¿¡**ã—ã¾ã™ã€‚ + +![ç¾åœ¨ã®IPアドレスを追加](@site/docs/ja/_snippets/images/ip-allow-list-add-current-ip.png) + +
diff --git a/docs/ja/_snippets/_add_superset_detail.md b/docs/ja/_snippets/_add_superset_detail.md new file mode 100644 index 00000000000..98f5dad317c --- /dev/null +++ b/docs/ja/_snippets/_add_superset_detail.md @@ -0,0 +1,45 @@ +
Dockerã§Apache Supersetã‚’èµ·å‹• + +Supersetã¯ã€[Docker Composeを使用ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ã«Supersetをインストールã™ã‚‹](https://superset.apache.org/docs/installation/installing-superset-using-docker-compose/)手順をæä¾›ã—ã¦ã„ã¾ã™ã€‚GitHubã‹ã‚‰Apache Supersetリãƒã‚¸ãƒˆãƒªã‚’ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã—ãŸå¾Œã€æœ€æ–°ã®é–‹ç™ºã‚³ãƒ¼ãƒ‰ã‚„特定ã®ã‚¿ã‚°ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`pre-release`ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã¦ã„ãªã„最新ã®ãƒªãƒªãƒ¼ã‚¹ã§ã‚ã‚‹2.0.0ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +`docker compose`を実行ã™ã‚‹å‰ã«ã„ãã¤ã‹ã®ã‚¿ã‚¹ã‚¯ã‚’è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +1. å…¬å¼ã®ClickHouse Connectドライãƒãƒ¼ã‚’追加 +2. MapBox APIキーをå–å¾—ã—ã€ãれを環境変数ã¨ã—ã¦è¿½åŠ ï¼ˆä»»æ„) +3. 実行ã™ã‚‹Supersetã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’指定 + +:::tip +以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯GitHubリãƒã‚¸ãƒˆãƒªã®ãƒˆãƒƒãƒ—レベルã€`superset`ã‹ã‚‰å®Ÿè¡Œã—ã¦ãã ã•ã„。 +::: + +## å…¬å¼ClickHouse Connectドライãƒãƒ¼ + +Supersetデプロイメントã§ClickHouse Connectドライãƒãƒ¼ã‚’利用å¯èƒ½ã«ã™ã‚‹ãŸã‚ã«ã€ãƒ­ãƒ¼ã‚«ãƒ«ã®requirementsファイルã«è¿½åŠ ã—ã¾ã™ï¼š + +```bash +echo "clickhouse-connect" >> ./docker/requirements-local.txt +``` + +## MapBox + +ã“ã‚Œã¯ä»»æ„ã§ã™ã€‚MapBox APIキーãªã—ã§Supersetã§ä½ç½®ãƒ‡ãƒ¼ã‚¿ã‚’プロットã§ãã¾ã™ãŒã€ã‚­ãƒ¼ã‚’追加ã™ã‚‹ã¹ãã¨ã„ã†ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚Œã€åœ°å›³ã®èƒŒæ™¯ç”»åƒãŒæ¬ ã‘ã¾ã™ï¼ˆãƒ‡ãƒ¼ã‚¿ãƒã‚¤ãƒ³ãƒˆã®ã¿ãŒè¡¨ç¤ºã•ã‚Œã€åœ°å›³ã®èƒŒæ™¯ã¯è¡¨ç¤ºã•ã‚Œã¾ã›ã‚“)。MapBoxã¯ç„¡æ–™ã®ãƒ†ã‚£ã‚¢ã‚’æä¾›ã—ã¦ã„ã¾ã™ã®ã§ã€åˆ©ç”¨ã—ãŸã„å ´åˆã¯ãœã²ã”利用ãã ã•ã„。 + +ガイドãŒä½œæˆã™ã‚‹ã‚µãƒ³ãƒ—ルã®å¯è¦–化ã®ä¸€éƒ¨ã¯ã€ä¾‹ãˆã°çµŒåº¦ã‚„緯度データãªã©ã®ä½ç½®æƒ…報を使用ã—ã¾ã™ã€‚Supersetã¯MapBoxマップã®ã‚µãƒãƒ¼ãƒˆã‚’å«ã‚“ã§ã„ã¾ã™ã€‚MapBoxã®å¯è¦–化を使用ã™ã‚‹ã«ã¯ã€MapBox APIキーãŒå¿…è¦ã§ã™ã€‚[MapBoxã®ç„¡æ–™ãƒ†ã‚£ã‚¢](https://account.mapbox.com/auth/signup/)ã«ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã—ã€APIキーを生æˆã—ã¦ãã ã•ã„。 + +APIキーをSupersetã§åˆ©ç”¨å¯èƒ½ã«ã—ã¾ã™ï¼š + +```bash +echo "MAPBOX_API_KEY=pk.SAMPLE-Use-your-key-instead" >> docker/.env-non-dev +``` + +## Supersetãƒãƒ¼ã‚¸ãƒ§ãƒ³2.0.0をデプロイ + +リリース2.0.0をデプロイã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã‚’実行ã—ã¾ã™ï¼š + +```bash +git checkout 2.0.0 +TAG=2.0.0 docker-compose -f docker-compose-non-dev.yml pull +TAG=2.0.0 docker-compose -f docker-compose-non-dev.yml up +``` + +
diff --git a/docs/ja/_snippets/_aws_regions.md b/docs/ja/_snippets/_aws_regions.md new file mode 100644 index 00000000000..d6cacd43369 --- /dev/null +++ b/docs/ja/_snippets/_aws_regions.md @@ -0,0 +1,11 @@ +| 地域 | VPC サービスå | アベイラビリティーゾーン ID | +|------------------|--------------------------------------------------------------------|------------------------------| +|ap-south-1 | com.amazonaws.vpce.ap-south-1.vpce-svc-0a786406c7ddc3a1b | aps1-az1 aps1-az2 aps1-az3 | +|ap-southeast-1 | com.amazonaws.vpce.ap-southeast-1.vpce-svc-0a8b096ec9d2acb01 | apse1-az1 apse1-az2 apse1-az3| +|ap-southeast-2 | com.amazonaws.vpce.ap-southeast-2.vpce-svc-0ca446409b23f0c01 | apse2-az1 apse2-az2 apse2-az3| +|eu-central-1 | com.amazonaws.vpce.eu-central-1.vpce-svc-0536fc4b80a82b8ed | euc1-az2 euc1-az3 euc1-az1 | +|eu-west-1 | com.amazonaws.vpce.eu-west-1.vpce-svc-066b03c9b5f61c6fc | euw1-az2 euw1-az3 euw1-az1 | +|us-east-1 c0 | com.amazonaws.vpce.us-east-1.vpce-svc-0a0218fa75c646d81 | use1-az6 use1-az1 use1-az2 | +|us-east-1 c1 | com.amazonaws.vpce.us-east-1.vpce-svc-096c118db1ff20ea4 | use1-az6 use1-az4 use1-az2 | +|us-east-2 | com.amazonaws.vpce.us-east-2.vpce-svc-0b99748bf269a86b4 | use2-az1 use2-az2 use2-az3 | +|us-west-2 | com.amazonaws.vpce.us-west-2.vpce-svc-049bbd33f61271781 | usw2-az2 usw2-az1 usw2-az3 | diff --git a/docs/ja/_snippets/_check_ip_access_list_detail.md b/docs/ja/_snippets/_check_ip_access_list_detail.md new file mode 100644 index 00000000000..926a0dc8624 --- /dev/null +++ b/docs/ja/_snippets/_check_ip_access_list_detail.md @@ -0,0 +1,15 @@ +
IPアクセスリストを管ç†ã™ã‚‹ + +ClickHouse Cloudã®ã‚µãƒ¼ãƒ“スリストã‹ã‚‰ä½œæ¥­ã™ã‚‹ã‚µãƒ¼ãƒ“スをé¸ã³ã€**設定**ã«åˆ‡ã‚Šæ›¿ãˆã¾ã™ã€‚ + +![サービスã®è¨­å®š](@site/docs/ja/_snippets/images/cloud-service-settings.png) + +IPアクセスリストãŒ**ç¾åœ¨ã€ã“ã®ã‚µãƒ¼ãƒ“スã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるトラフィックã¯ã‚ã‚Šã¾ã›ã‚“**ã¨è¡¨ç¤ºã•ã‚Œã‚‹å ´åˆã¯ã€**エントリを追加**ã—ã¦å•é¡Œã‚’解決ã§ãã¾ã™ã€‚ + +![サービスãŒãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’許å¯ã—ã¦ã„ã‚‹ã‹ç¢ºèªã™ã‚‹](@site/docs/ja/_snippets/images/ip-allow-list-check-list.png) + +クイックスタートã®ãŸã‚ã«ã€ãƒ­ãƒ¼ã‚«ãƒ«ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒãƒªã‚·ãƒ¼ãŒè¨±å¯ã™ã‚‹å ´åˆã¯ã€ç¾åœ¨ã®IPアドレスã®ã¿ã‚’追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れを行ã†ã«ã¯ã€**ç¾åœ¨ã®IPを追加**を使用ã—ã€ç¾åœ¨ã®IPã¨èª¬æ˜Žã€Œãƒ›ãƒ¼ãƒ IPã€ã§ãƒ•ã‚©ãƒ¼ãƒ ã‚’自動入力ã—ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ãƒ•ã‚©ãƒ¼ãƒ ã‚’修正ã—ã€**エントリを追加**ã—**エントリをé€ä¿¡**ã—ã¾ã™ã€‚ + +![ç¾åœ¨ã®IPアドレスを追加ã™ã‚‹](@site/docs/ja/_snippets/images/ip-allow-list-add-current-ip.png) + +
diff --git a/docs/ja/_snippets/_clickhouse_mysql_cloud_setup.mdx b/docs/ja/_snippets/_clickhouse_mysql_cloud_setup.mdx new file mode 100644 index 00000000000..e5a68056176 --- /dev/null +++ b/docs/ja/_snippets/_clickhouse_mysql_cloud_setup.mdx @@ -0,0 +1,61 @@ +1. ClickHouse Cloud Serviceを作æˆã—ãŸå¾Œã€èªè¨¼æƒ…報画é¢ã§MySQLタブをé¸æŠžã—ã¾ã™ã€‚ +![Credentials screen - Prompt](./images/mysql1.png) +2. ã“ã®ç‰¹å®šã®ã‚µãƒ¼ãƒ“スã«å¯¾ã—ã¦MySQLインターフェースを有効ã«ã™ã‚‹ãŸã‚ã«ã‚¹ã‚¤ãƒƒãƒã‚’切り替ãˆã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãã®ã‚µãƒ¼ãƒ“スã§ãƒãƒ¼ãƒˆ`3306`ãŒå…¬é–‹ã•ã‚Œã€ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªMySQLユーザーåã‚’å«ã‚€MySQL接続画é¢ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚パスワードã¯ã‚µãƒ¼ãƒ“スã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ‘スワードã¨åŒã˜ã«ãªã‚Šã¾ã™ã€‚ +![Credentials screen - Enabled MySQL](./images/mysql2.png) +代ã‚ã‚Šã«ã€æ—¢å­˜ã®ã‚µãƒ¼ãƒ“スã«å¯¾ã—ã¦MySQLインターフェースを有効ã«ã™ã‚‹ã«ã¯: +3. サービスãŒ`Running`状態ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã€MySQLインターフェースを有効ã«ã™ã‚‹ã‚µãƒ¼ãƒ“スã®ã€ŒæŽ¥ç¶šæ–‡å­—列を表示ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚ +![Connection screen - Prompt MySQL](./images/mysql3.png) +4. ã“ã®ç‰¹å®šã®ã‚µãƒ¼ãƒ“スã«å¯¾ã—ã¦MySQLインターフェースを有効ã«ã™ã‚‹ãŸã‚ã«ã‚¹ã‚¤ãƒƒãƒã‚’切り替ãˆã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‘スワードを入力ã™ã‚‹ã‚ˆã†æ±‚ã‚られã¾ã™ã€‚ +![Connection screen - Prompt MySQL](./images/mysql4.png) +5. パスワードを入力ã™ã‚‹ã¨ã€ã“ã®ã‚µãƒ¼ãƒ“スã®MySQL接続文字列ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ +![Connection screen - MySQL Enabled](./images/mysql5.png) + +## ClickHouse Cloudã§è¤‡æ•°ã®MySQLユーザーを作æˆã™ã‚‹ + +デフォルトã§ã¯ã€`mysql4`ã¨ã„ã†çµ„ã¿è¾¼ã¿ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚ã‚Šã€ã“ã‚Œã¯`default`ユーザーã¨åŒã˜ãƒ‘スワードを使用ã—ã¾ã™ã€‚``部分ã¯ã‚ãªãŸã®ClickHouse Cloudホストåã®æœ€åˆã®ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã§ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€å®‰å…¨ãªæŽ¥ç¶šã‚’実装ã—ã¦ã„ã‚‹ãŒ[TLSãƒãƒ³ãƒ‰ã‚·ã‚§ã‚¤ã‚¯ã§SNI情報をæä¾›ã—ãªã„](https://www.cloudflare.com/learning/ssl/what-is-sni)ツール(MySQLコンソールクライアントãŒãã®ä¸€ä¾‹ï¼‰ã§ä½œæ¥­ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚ã“ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã«è¿½åŠ ã®ãƒ’ントをå«ã‚ãšã«ã¯å†…部ルーティングを行ã†ã“ã¨ãŒã§ãã¾ã›ã‚“。 + +ã“ã‚Œã«ã‚ˆã‚Šã€MySQLインターフェースã§ä½¿ç”¨ã™ã‚‹æ–°ã—ã„ユーザーを作æˆã™ã‚‹éš›ã«ã¯ã€`mysql4_`ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’使用ã™ã‚‹ã“ã¨ã‚’_å¼·ããŠå‹§ã‚ã—ã¾ã™_。ã“ã“ã§ã€``ã¯ã‚ãªãŸã®Cloudサービスを識別ã™ã‚‹ãŸã‚ã®ãƒ’ントã§ã‚ã‚Šã€``ã¯é¸æŠžã—ãŸä»»æ„ã®ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ã§ã™ã€‚ + +:::tip +ClickHouse CloudホストåãŒ`foobar.us-east1.aws.clickhouse.cloud`ã®å ´åˆã€``部分ã¯`foobar`ã«ç›¸å½“ã—ã€ã‚«ã‚¹ã‚¿ãƒ MySQLユーザーåã¯`mysql4foobar_team1`ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ +::: + +MySQLインターフェースを使用ã™ã‚‹ãŸã‚ã«è¿½åŠ ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€è¿½åŠ ã®è¨­å®šã‚’é©ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆãªã©ã§ã™ã€‚ + +1. オプション - カスタムユーザーã«é©ç”¨ã™ã‚‹[設定プロフィール](https://clickhouse.com/docs/ja/sql-reference/statements/create/settings-profile)を作æˆã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€å¾Œã§ä½œæˆã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§æŽ¥ç¶šã™ã‚‹ã¨ãã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§é©ç”¨ã•ã‚Œã‚‹è¿½åŠ è¨­å®šã‚’æŒã¤`my_custom_profile`: + + ```sql + CREATE SETTINGS PROFILE my_custom_profile SETTINGS prefer_column_name_to_alias=1; + ``` + + `prefer_column_name_to_alias`ã¯å˜ãªã‚‹ä¾‹ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã“ã«ä»–ã®è¨­å®šã‚’使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +2. 以下ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’使用ã—ã¦[ユーザーを作æˆ](https://clickhouse.com/docs/ja/sql-reference/statements/create/user)ã—ã¾ã™: `mysql4_` ([上記å‚ç…§](#creating-multiple-mysql-users-in-clickhouse-cloud))。パスワードã¯ãƒ€ãƒ–ルSHA1å½¢å¼ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例: + + ```sql + CREATE USER mysql4foobar_team1 IDENTIFIED WITH double_sha1_password BY 'YourPassword42$'; + ``` + + ã¾ãŸã¯ã€ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚«ã‚¹ã‚¿ãƒ ãƒ—ロフィールを使用ã—ãŸã„å ´åˆ: + + ```sql + CREATE USER mysql4foobar_team1 IDENTIFIED WITH double_sha1_password BY 'YourPassword42$' SETTINGS PROFILE 'my_custom_profile'; + ``` + + ã“ã“ã§ã€`my_custom_profile`ã¯å‰ã«ä½œæˆã—ãŸãƒ—ロフィールã®åå‰ã§ã™ã€‚ +3. æ–°ã—ã„ユーザーã«å¿…è¦ãªã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’付与ã—ã¦ã€ç›®çš„ã®ãƒ†ãƒ¼ãƒ–ルã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨å¯¾è©±ã§ãるよã†ã«ã—ã¾ã™ã€‚[権é™ã‚’付与](https://clickhouse.com/docs/ja/sql-reference/statements/grant)ã™ã‚‹ä¾‹ã¨ã—ã¦ã€ãŸã¨ãˆã°`system.query_log`ã®ã¿ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’付与ã—ãŸã„å ´åˆ: + + ```sql + GRANT SELECT ON system.query_log TO mysql4foobar_team1; + ``` + +4. 作æˆã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’使用ã—ã¦ã€MySQLインターフェースã§ClickHouse Cloudサービスã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +### ClickHouse Cloudã§ã®è¤‡æ•°ã®MySQLユーザーã®ãƒˆãƒ©ãƒ–ルシューティング + +æ–°ã—ã„MySQLユーザーを作æˆã—ã€MySQL CLIクライアントã§æŽ¥ç¶šã—ã¦ã„ã‚‹ã¨ãã«ä»¥ä¸‹ã®ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•ã‚ŒãŸå ´åˆï¼š + +``` +ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 54 +``` + +ã“ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åãŒ`mysql4_`å½¢å¼ã«å¾“ã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。[上記](#creating-multiple-mysql-users-in-clickhouse-cloud)ã§èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/_snippets/_clickhouse_mysql_on_premise_setup.mdx b/docs/ja/_snippets/_clickhouse_mysql_on_premise_setup.mdx new file mode 100644 index 00000000000..f728ab4e46b --- /dev/null +++ b/docs/ja/_snippets/_clickhouse_mysql_on_premise_setup.mdx @@ -0,0 +1,87 @@ +ClickHouseサーãƒãƒ¼ã«MySQLインターフェースを有効ã«ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯[å…¬å¼ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://clickhouse.com/docs/ja/interfaces/mysql)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +サーãƒãƒ¼ã® `config.xml` ã«ã‚¨ãƒ³ãƒˆãƒªã‚’追加ã™ã‚‹ã“ã¨ã«åŠ ãˆã¦ã€ + +```xml + + 9004 + +``` + +MySQLインターフェースを利用ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯ã€[二é‡SHA1パスワード暗å·åŒ–](https://clickhouse.com/docs/ja/operations/settings/settings-users#user-namepassword)を使用ã™ã‚‹ã“ã¨ãŒ**å¿…è¦**ã§ã™ã€‚ + +シェルã‹ã‚‰äºŒé‡SHA1ã§æš—å·åŒ–ã•ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãƒ‘スワードを生æˆã™ã‚‹ã«ã¯ä»¥ä¸‹ã‚’実行ã—ã¦ãã ã•ã„: + +```shell +PASSWORD=$(base64 < /dev/urandom | head -c16); echo "$PASSWORD"; echo -n "$PASSWORD" | sha1sum | tr -d '-' | xxd -r -p | sha1sum | tr -d '-' +``` + +出力ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +``` +LZOQYnqQN4L/T6L0 +fbc958cc745a82188a51f30de69eebfc67c40ee4 +``` + +最åˆã®è¡Œã¯ç”Ÿæˆã•ã‚ŒãŸãƒ‘スワードã§ã€2行目ã¯ClickHouseã®è¨­å®šã«ä½¿ç”¨ã™ã‚‹ãƒãƒƒã‚·ãƒ¥ã§ã™ã€‚ + +以下ã¯ç”Ÿæˆã•ã‚ŒãŸãƒãƒƒã‚·ãƒ¥ã‚’使用ã™ã‚‹`mysql_user`ã®è¨­å®šä¾‹ã§ã™ï¼š + +`/etc/clickhouse-server/users.d/mysql_user.xml` + +```xml + + + fbc958cc745a82188a51f30de69eebfc67c40ee4 + + ::/0 + + default + default + + +``` + +`password_double_sha1_hex` エントリを自分ã§ç”Ÿæˆã—ãŸäºŒé‡SHA1ãƒãƒƒã‚·ãƒ¥ã«ç½®ãæ›ãˆã¦ãã ã•ã„。 + +ã•ã‚‰ã«ã€BIツールãŒMySQLコãƒã‚¯ã‚¿ã‚’使用ã™ã‚‹éš›ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ã‚­ãƒ¼ãƒžã‚’é©åˆ‡ã«èª¿æŸ»ã§ãるよã†ã«ã€`SHOW [FULL] COLUMNS` クエリã®çµæžœã§MySQLãƒã‚¤ãƒ†ã‚£ãƒ–タイプを表示ã™ã‚‹ãŸã‚ã«ã€`use_mysql_types_in_show_columns`を使用ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ + +例ãˆã°ï¼š + +`/etc/clickhouse-server/users.d/mysql_user.xml` + +```xml + + + 1 + + +``` + +ã¾ãŸã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆä»¥å¤–ã®ç•°ãªã‚‹ãƒ—ロファイルã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +`mysql` ãƒã‚¤ãƒŠãƒªãŒåˆ©ç”¨å¯èƒ½ã§ã‚ã‚Œã°ã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‹ã‚‰æŽ¥ç¶šã‚’テストã§ãã¾ã™ã€‚以下ã¯ã€ã‚µãƒ³ãƒ—ルã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å (`mysql_user`) ã¨ãƒ‘スワード (`LZOQYnqQN4L/T6L0`) を使用ã—ãŸã‚³ãƒžãƒ³ãƒ‰ã§ã™ï¼š + +```bash +mysql --protocol tcp -h localhost -u mysql_user -P 9004 --password=LZOQYnqQN4L/T6L0 +``` + +``` +mysql> show databases; ++--------------------+ +| name | ++--------------------+ +| INFORMATION_SCHEMA | +| default | +| information_schema | +| system | ++--------------------+ +4è¡Œå–å¾—ã—ã¾ã—㟠(0.00 sec) +4行読ã¿è¾¼ã¿ã€603.00 Bã€0.00156秒ã§ã€2564è¡Œ/秒ã€377.48 KiB/秒 +``` + +最後ã«ã€ClickHouseサーãƒãƒ¼ã‚’希望ã™ã‚‹IPアドレスã§ãƒªãƒƒã‚¹ãƒ³ã™ã‚‹ã‚ˆã†ã«è¨­å®šã—ã¾ã™ã€‚例ãˆã°ã€`config.xml` ã®ä¸­ã§ã€ã™ã¹ã¦ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ãƒªãƒƒã‚¹ãƒ³ã™ã‚‹ãŸã‚ã«ä»¥ä¸‹ã‚’アンコメントã—ã¦ãã ã•ã„: + +```bash +:: +``` diff --git a/docs/ja/_snippets/_cloud_backup.md b/docs/ja/_snippets/_cloud_backup.md new file mode 100644 index 00000000000..8cd341f7a0a --- /dev/null +++ b/docs/ja/_snippets/_cloud_backup.md @@ -0,0 +1,19 @@ +## クラウドã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ãƒªã‚¹ãƒˆã‚¢ + +å„サービスã¯æ¯Žæ—¥ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•ã‚Œã¦ã„ã¾ã™ã€‚サービスã®**ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—**タブã§ã€ã‚µãƒ¼ãƒ“スã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—リストを見るã“ã¨ãŒã§ãã¾ã™ã€‚ãã“ã‹ã‚‰ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—をリストアã—ãŸã‚Šã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を削除ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ãƒªã‚¹ãƒˆ](@site/docs/ja/_snippets/images/cloud-backup-list.png) + +**ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—をリストア**アイコンをクリックã™ã‚‹ã¨ã€æ–°ã—ã作æˆã•ã‚Œã‚‹ã‚µãƒ¼ãƒ“スã®**サービスå**を指定ã—ã¦ã€**ã“ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—をリストア**ã§ãã¾ã™ã€‚ + +![ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ãƒªã‚¹ãƒˆ](@site/docs/ja/_snippets/images/cloud-backup-restore.png) + +æ–°ã—ã„サービスã¯ã€æº–å‚™ãŒæ•´ã†ã¾ã§ã‚µãƒ¼ãƒ“スリストã«**プロビジョニング**ã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +![ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ãƒªã‚¹ãƒˆ](@site/docs/ja/_snippets/images/cloud-backup-new-service.png) + +æ–°ã—ã„サービスã®ãƒ—ロビジョニングãŒå®Œäº†ã™ã‚‹ã¨ã€æŽ¥ç¶šã§ãã¾ã™ã€‚ãã®å¾Œâ€¦ + +:::note +ClickHouse Cloud サービスを利用ã™ã‚‹éš›ã«ã€SQL クライアント㧠`BACKUP` ãŠã‚ˆã³ `RESTORE` コマンドを使用ã—ãªã„ã§ãã ã•ã„。クラウドã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—㯠UI ã‹ã‚‰ç®¡ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: diff --git a/docs/ja/_snippets/_config-files.md b/docs/ja/_snippets/_config-files.md new file mode 100644 index 00000000000..cd40c778dc9 --- /dev/null +++ b/docs/ja/_snippets/_config-files.md @@ -0,0 +1,7 @@ +:::important best practices +ClickHouse Server を設定ã™ã‚‹éš›ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’追加ã¾ãŸã¯ç·¨é›†ã™ã‚‹ã¨ãã¯æ¬¡ã®ã‚ˆã†ã«ã—ã¦ãã ã•ã„: +- ファイルを `/etc/clickhouse-server/config.d/` ディレクトリã«è¿½åŠ ã™ã‚‹ +- ファイルを `/etc/clickhouse-server/users.d/` ディレクトリã«è¿½åŠ ã™ã‚‹ +- `/etc/clickhouse-server/config.xml` ファイルã¯ãã®ã¾ã¾ã«ã—ã¦ãŠã +- `/etc/clickhouse-server/users.xml` ファイルã¯ãã®ã¾ã¾ã«ã—ã¦ãŠã +::: diff --git a/docs/ja/_snippets/_gather_your_details_http.mdx b/docs/ja/_snippets/_gather_your_details_http.mdx new file mode 100644 index 00000000000..e466ee3c30e --- /dev/null +++ b/docs/ja/_snippets/_gather_your_details_http.mdx @@ -0,0 +1,17 @@ +HTTP(S) を使用ã—㦠ClickHouse ã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®æƒ…å ±ãŒå¿…è¦ã§ã™ï¼š + +- **HOST 㨠PORT**: 通常ã€TLS を使用ã™ã‚‹å ´åˆã®ãƒãƒ¼ãƒˆã¯ 8443ã€TLS を使用ã—ãªã„å ´åˆã¯ 8123 ã§ã™ã€‚ + +- **データベースå**: デフォルト㧠`default` ã¨ã„ã†åå‰ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒã‚ã‚Šã¾ã™ãŒã€æŽ¥ç¶šã—ãŸã„データベースã®åå‰ã‚’使用ã—ã¦ãã ã•ã„。 + +- **ユーザーåã¨ãƒ‘スワード**: デフォルトã§ãƒ¦ãƒ¼ã‚¶ãƒ¼å㯠`default` ã§ã™ã€‚使用ケースã«é©ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼åを使用ã—ã¦ãã ã•ã„。 + +ClickHouse Cloud サービスã®è©³ç´°ã¯ã€ClickHouse Cloud コンソールã§ç¢ºèªã§ãã¾ã™ã€‚ 接続ã™ã‚‹ã‚µãƒ¼ãƒ“スをé¸æŠžã—ã€**接続** をクリックã—ã¾ã™: + +![ClickHouse Cloud service connect button](@site/docs/ja/_snippets/images/cloud-connect-button.png) + +**HTTPS** ã‚’é¸æŠžã™ã‚‹ã¨ã€ã‚µãƒ³ãƒ—ル㮠`curl` コマンドã§è©³ç´°ãŒç¢ºèªã§ãã¾ã™ã€‚ + +![ClickHouse Cloud HTTPS connection details](@site/docs/ja/_snippets/images/connection-details-https.png) + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã® ClickHouse を使用ã—ã¦ã„ã‚‹å ´åˆã€æŽ¥ç¶šã®è©³ç´°ã¯ ClickHouse 管ç†è€…ã«ã‚ˆã£ã¦è¨­å®šã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/_snippets/_gather_your_details_native.md b/docs/ja/_snippets/_gather_your_details_native.md new file mode 100644 index 00000000000..757a2df37c7 --- /dev/null +++ b/docs/ja/_snippets/_gather_your_details_native.md @@ -0,0 +1,17 @@ +ClickHouseã«ãƒã‚¤ãƒ†ã‚£ãƒ–TCPã§æŽ¥ç¶šã™ã‚‹ã«ã¯ã€æ¬¡ã®æƒ…å ±ãŒå¿…è¦ã§ã™ã€‚ + +- **HOSTã¨PORT**: 通常ã€TLSを使用ã—ã¦ã„ã‚‹å ´åˆã¯ãƒãƒ¼ãƒˆã¯9440ã€TLSを使用ã—ã¦ã„ãªã„å ´åˆã¯9000ã§ã™ã€‚ + +- **データベースå**: デフォルトã§ã¯ã€`default`ã¨ã„ã†åå‰ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒã‚ã‚Šã¾ã™ã€‚接続ã—ãŸã„データベースã®åå‰ã‚’使用ã—ã¦ãã ã•ã„。 + +- **ユーザーåã¨ãƒ‘スワード**: デフォルトã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¯`default`ã§ã™ã€‚使用ã™ã‚‹ã‚±ãƒ¼ã‚¹ã«é©ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼åを利用ã—ã¦ãã ã•ã„。 + +ClickHouse Cloudサービスã®è©³ç´°ã¯ã€ClickHouse Cloudコンソールã§ç¢ºèªã§ãã¾ã™ã€‚接続ã™ã‚‹ã‚µãƒ¼ãƒ“スをé¸æŠžã—ã€**Connect**をクリックã—ã¾ã™ã€‚ + +![ClickHouse Cloud service connect button](@site/docs/ja/_snippets/images/cloud-connect-button.png) + +**Native** ã‚’é¸æŠžã™ã‚‹ã¨ã€ä¾‹ã¨ã—㦠`clickhouse-client` コマンドã§ä½¿ç”¨å¯èƒ½ãªè©³ç´°ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +![ClickHouse Cloud Native TCP connection details](@site/docs/ja/_snippets/images/connection-details-native.png) + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseを使用ã—ã¦ã„ã‚‹å ´åˆã€æŽ¥ç¶šã®è©³ç´°ã¯ClickHouse管ç†è€…ã«ã‚ˆã£ã¦è¨­å®šã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/_snippets/_gcp_regions.md b/docs/ja/_snippets/_gcp_regions.md new file mode 100644 index 00000000000..61207f0d01b --- /dev/null +++ b/docs/ja/_snippets/_gcp_regions.md @@ -0,0 +1,6 @@ +| リージョン | サービスアタッãƒãƒ¡ãƒ³ãƒˆ | プライベートDNSドメイン | +|--------------|-------------------------------------------------------------|------------------------------| +|asia-southeast1| projects/dataplane-production/regions/asia-southeast1/serviceAttachments/production-asia-southeast1-clickhouse-cloud| asia-southeast1.p.gcp.clickhouse.cloud| +|europe-west4| projects/dataplane-production/regions/europe-west4/serviceAttachments/production-europe-west4-clickhouse-cloud| europe-west4.p.gcp.clickhouse.cloud| +|us-central1| projects/dataplane-production/regions/us-central1/serviceAttachments/production-us-central1-clickhouse-cloud| us-central1.p.gcp.clickhouse.cloud| +|us-east1| projects/dataplane-production/regions/us-east1/serviceAttachments/production-us-east1-clickhouse-cloud| us-east1.p.gcp.clickhouse.cloud| diff --git a/docs/ja/_snippets/_keeper-config-files.md b/docs/ja/_snippets/_keeper-config-files.md new file mode 100644 index 00000000000..393445edb1d --- /dev/null +++ b/docs/ja/_snippets/_keeper-config-files.md @@ -0,0 +1,5 @@ +:::important ベストプラクティス +ClickHouse Keeperを構æˆã™ã‚‹ãŸã‚ã«è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’編集ã™ã‚‹éš›ã«ã¯ã€ä»¥ä¸‹ã‚’è¡Œã†ã¹ãã§ã™: +- `/etc/clickhouse-keeper/keeper_config.xml` ã‚’ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã™ã‚‹ +- `/etc/clickhouse-keeper/keeper_config.xml` ファイルを編集ã™ã‚‹ +::: diff --git a/docs/ja/_snippets/_launch_sql_console.md b/docs/ja/_snippets/_launch_sql_console.md new file mode 100644 index 00000000000..7ab292d93a1 --- /dev/null +++ b/docs/ja/_snippets/_launch_sql_console.md @@ -0,0 +1,11 @@ +:::tip SQL コンソール +SQL クライアント接続ãŒå¿…è¦ãªå ´åˆã€ClickHouse Cloud サービスã«ã¯é–¢é€£ä»˜ã‘られãŸã‚¦ã‚§ãƒ–ベース㮠SQL コンソールãŒã‚ã‚Šã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€ä»¥ä¸‹ã® **SQL コンソールã«æŽ¥ç¶š** を展開ã—ã¦ãã ã•ã„。 +::: + +
SQL コンソールã«æŽ¥ç¶š + +ClickHouse Cloud サービス一覧ã‹ã‚‰ã€ä½œæ¥­ã™ã‚‹ã‚µãƒ¼ãƒ“スをé¸æŠžã—ã€**接続** をクリックã—ã¾ã™ã€‚ã“ã“ã‹ã‚‰ **SQL コンソールを開ã** ã“ã¨ãŒã§ãã¾ã™ï¼š + +![SQL コンソールã«æŽ¥ç¶š](@site/docs/ja/_snippets/images/cloud-connect-to-sql-console.png) + +
diff --git a/docs/ja/_snippets/_replication-sharding-terminology.md b/docs/ja/_snippets/_replication-sharding-terminology.md new file mode 100644 index 00000000000..5a32af3c52c --- /dev/null +++ b/docs/ja/_snippets/_replication-sharding-terminology.md @@ -0,0 +1,9 @@ +## 用語集 +### レプリカ +データã®ã‚³ãƒ”ー。ClickHouseã¯å¸¸ã«ãƒ‡ãƒ¼ã‚¿ã®å°‘ãªãã¨ã‚‚1ã¤ã®ã‚³ãƒ”ーをæŒã£ã¦ã„ã‚‹ãŸã‚ã€**レプリカ**ã®æœ€å°æ•°ã¯1ã§ã™ã€‚ã“ã‚Œã¯é‡è¦ãªãƒã‚¤ãƒ³ãƒˆã§ã€å…ƒã®ãƒ‡ãƒ¼ã‚¿ã‚’レプリカã¨ã—ã¦æ•°ãˆã‚‹ã“ã¨ã«æ…£ã‚Œã¦ã„ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ClickHouseã®ã‚³ãƒ¼ãƒ‰ã¨ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯ãã®ç”¨èªžãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚データã®2番目ã®ãƒ¬ãƒ—リカを追加ã™ã‚‹ã“ã¨ã§ã€ãƒ•ã‚©ãƒ¼ãƒ«ãƒˆãƒˆãƒ¬ãƒ©ãƒ³ã‚¹ã‚’æä¾›ã§ãã¾ã™ã€‚ + +### シャード +データã®ã‚µãƒ–セット。ClickHouseã¯å¸¸ã«ãƒ‡ãƒ¼ã‚¿ã®å°‘ãªãã¨ã‚‚1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’æŒã£ã¦ã„ã‚‹ã®ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚’複数ã®ã‚µãƒ¼ãƒãƒ¼ã«åˆ†æ•£ã—ãªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚データを複数ã®ã‚µãƒ¼ãƒãƒ¼ã«åˆ†æ•£ã—ã¦ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã™ã‚‹ã“ã¨ã¯ã€å˜ä¸€ã‚µãƒ¼ãƒãƒ¼ã®å®¹é‡ã‚’超ãˆãŸå ´åˆã«è² è·ã‚’分散ã™ã‚‹ãŸã‚ã«åˆ©ç”¨ã§ãã¾ã™ã€‚宛先サーãƒãƒ¼ã¯**シャーディングキー**ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã€åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹éš›ã«å®šç¾©ã•ã‚Œã¾ã™ã€‚シャーディングキーã¯ãƒ©ãƒ³ãƒ€ãƒ ãªã‚‚ã®ã‹ã€[ãƒãƒƒã‚·ãƒ¥é–¢æ•°](https://clickhouse.com/docs/ja/sql-reference/functions/hash-functions)ã®å‡ºåŠ›ã¨ã—ã¦å®šç¾©ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚シャーディングをå«ã‚€ãƒ‡ãƒ—ロイメント例ã§ã¯ã€ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚­ãƒ¼ã¨ã—ã¦`rand()`を使用ã—ã€ã„ã¤ã©ã®ã‚ˆã†ã«ã—ã¦ç•°ãªã‚‹ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚­ãƒ¼ã‚’é¸æŠžã™ã‚‹ã‹ã«ã¤ã„ã¦ã®ã•ã‚‰ãªã‚‹æƒ…報をæä¾›ã—ã¾ã™ã€‚ + +### 分散調整 +ClickHouse Keeperã¯ã€ãƒ‡ãƒ¼ã‚¿ã®ãƒ¬ãƒ—リケーションã¨åˆ†æ•£DDLクエリã®å®Ÿè¡Œã®ãŸã‚ã®èª¿æ•´ã‚·ã‚¹ãƒ†ãƒ ã‚’æä¾›ã—ã¾ã™ã€‚ClickHouse Keeperã¯Apache ZooKeeperã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/_snippets/_self_managed_only_automated.md b/docs/ja/_snippets/_self_managed_only_automated.md new file mode 100644 index 00000000000..a13a937cc5d --- /dev/null +++ b/docs/ja/_snippets/_self_managed_only_automated.md @@ -0,0 +1,3 @@ +:::note +ã“ã®ãƒšãƒ¼ã‚¸ã¯ [ClickHouse Cloud](https://clickhouse.com/cloud) ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。ã“ã“ã§è¨˜è¼‰ã•ã‚Œã¦ã„る手順ã¯ã€ClickHouse Cloud サービスã§è‡ªå‹•åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: diff --git a/docs/ja/_snippets/_self_managed_only_no_roadmap.md b/docs/ja/_snippets/_self_managed_only_no_roadmap.md new file mode 100644 index 00000000000..1a5a90f3861 --- /dev/null +++ b/docs/ja/_snippets/_self_managed_only_no_roadmap.md @@ -0,0 +1,4 @@ +:::note +ã“ã®ãƒšãƒ¼ã‚¸ã¯[ClickHouse Cloud](https://clickhouse.com/cloud)ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。ã“ã“ã§æ–‡æ›¸åŒ–ã•ã‚Œã¦ã„る機能ã¯ã€ClickHouse Cloudサービスã§ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 +詳細ã¯ã€ClickHouseã®[Cloud Compatibility](/docs/ja/whats-new/cloud-compatibility)ガイドをã”覧ãã ã•ã„。 +::: diff --git a/docs/ja/_snippets/_self_managed_only_not_applicable.md b/docs/ja/_snippets/_self_managed_only_not_applicable.md new file mode 100644 index 00000000000..e80de64fd8c --- /dev/null +++ b/docs/ja/_snippets/_self_managed_only_not_applicable.md @@ -0,0 +1,3 @@ +:::note +ã“ã®ãƒšãƒ¼ã‚¸ã¯[ClickHouse Cloud](https://clickhouse.com/cloud)ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。ã“ã“ã«è¨˜è¼‰ã•ã‚Œã¦ã„る手順ã¯ã€ã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseデプロイメントã§ã®ã¿å¿…è¦ã§ã™ã€‚ +::: diff --git a/docs/ja/_snippets/_self_managed_only_roadmap.md b/docs/ja/_snippets/_self_managed_only_roadmap.md new file mode 100644 index 00000000000..35c88e62051 --- /dev/null +++ b/docs/ja/_snippets/_self_managed_only_roadmap.md @@ -0,0 +1,3 @@ +:::note +ã“ã®ãƒšãƒ¼ã‚¸ã¯[ClickHouse Cloud](https://clickhouse.com/cloud)ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。ã“ã“ã§æ–‡æ›¸åŒ–ã•ã‚Œã¦ã„る機能ã¯ã€ClickHouse Cloudサービスã§ã¯ã¾ã åˆ©ç”¨ã§ãã¾ã›ã‚“。詳ã—ãã¯ã€ClickHouseã®[Cloud互æ›æ€§](/docs/ja/whats-new/cloud-compatibility#roadmap)ガイドをå‚ç…§ã—ã¦ãã ã•ã„。 +::: diff --git a/docs/ja/_snippets/_service_actions_menu.md b/docs/ja/_snippets/_service_actions_menu.md new file mode 100644 index 00000000000..84d24343d1a --- /dev/null +++ b/docs/ja/_snippets/_service_actions_menu.md @@ -0,0 +1,3 @@ +

ClickHouse Cloudサービスã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’é–‹ãã€{props.menu}ã‚’é¸æŠžã—ã¾ã™ï¼š

+ +![Cloud service Actions menu](@site/docs/ja/_snippets/images/cloud-service-actions-menu.png) diff --git a/docs/ja/_snippets/_sign_in_or_trial.md b/docs/ja/_snippets/_sign_in_or_trial.md new file mode 100644 index 00000000000..1040f9b31f5 --- /dev/null +++ b/docs/ja/_snippets/_sign_in_or_trial.md @@ -0,0 +1,3 @@ +[ClickHouse.cloud](https://clickhouse.cloud)ã§ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’作æˆã™ã‚‹ã‹ã€ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã—ã¦ãã ã•ã„。 + +![Cloud sign in prompt](@site/docs/ja/_snippets/images/cloud-sign-in-or-trial.png) diff --git a/docs/ja/_snippets/_tabs.md b/docs/ja/_snippets/_tabs.md new file mode 100644 index 00000000000..68aa6b4529b --- /dev/null +++ b/docs/ja/_snippets/_tabs.md @@ -0,0 +1,22 @@ +--- +sidebar_label: タブサンプル +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + +## ステップ 1 + + + + +クラウド + + + + +セルフマãƒãƒ¼ã‚¸ãƒ‰ + + + diff --git a/docs/ja/_snippets/_users-and-roles-common.md b/docs/ja/_snippets/_users-and-roles-common.md new file mode 100644 index 00000000000..b7965705fed --- /dev/null +++ b/docs/ja/_snippets/_users-and-roles-common.md @@ -0,0 +1,447 @@ +## 管ç†è€…権é™ã®ãƒ†ã‚¹ãƒˆ + +ユーザー `default` ã‹ã‚‰ãƒ­ã‚°ã‚¢ã‚¦ãƒˆã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ `clickhouse_admin` ã¨ã—ã¦ãƒ­ã‚°ã‚¤ãƒ³ã—ç›´ã—ã¦ãã ã•ã„。 + +ã“れらã™ã¹ã¦ãŒæˆåŠŸã™ã‚‹ã¯ãšã§ã™ï¼š + +```sql +SHOW GRANTS FOR clickhouse_admin; +``` + +```sql +CREATE DATABASE db1 +``` + +```sql +CREATE TABLE db1.table1 (id UInt64, column1 String) ENGINE = MergeTree() ORDER BY id; +``` + +```sql +INSERT INTO db1.table1 (id, column1) VALUES (1, 'abc'); +``` + +```sql +SELECT * FROM db1.table1; +``` + +```sql +DROP TABLE db1.table1; +``` + +```sql +DROP DATABASE db1; +``` + +## éžç®¡ç†è€…ユーザー + +ユーザーã¯å¿…è¦ãªæ¨©é™ã‚’æŒã¡ã€å…¨å“¡ãŒç®¡ç†è€…ã§ã‚ã‚‹ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®æ®‹ã‚Šã®éƒ¨åˆ†ã§ã¯ã€ä¾‹ã®ã‚·ãƒŠãƒªã‚ªã¨å¿…è¦ãªå½¹å‰²ã‚’æä¾›ã—ã¾ã™ã€‚ + +### 準備 + +例ã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã—ã¾ã™ã€‚ + +#### サンプルデータベースã€ãƒ†ãƒ¼ãƒ–ルã€ãŠã‚ˆã³è¡Œã®ä½œæˆ + +1. ãƒ†ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’ä½œæˆ + + ```sql + CREATE DATABASE db1; + ``` + +2. ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ + + ```sql + CREATE TABLE db1.table1 ( + id UInt64, + column1 String, + column2 String + ) + ENGINE MergeTree + ORDER BY id; + ``` + +3. サンプル行ã§ãƒ†ãƒ¼ãƒ–ルを埋ã‚ã‚‹ + + ```sql + INSERT INTO db1.table1 + (id, column1, column2) + VALUES + (1, 'A', 'abc'), + (2, 'A', 'def'), + (3, 'B', 'abc'), + (4, 'B', 'def'); + ``` + +4. テーブルを確èªã™ã‚‹ï¼š + + ```sql + SELECT * + FROM db1.table1 + ``` + + ```response + Query id: 475015cc-6f51-4b20-bda2-3c9c41404e49 + + ┌─id─┬─column1─┬─column2─┠+ │ 1 │ A │ abc │ + │ 2 │ A │ def │ + │ 3 │ B │ abc │ + │ 4 │ B │ def │ + └────┴─────────┴─────────┘ + ``` + +5. 特定ã®ã‚«ãƒ©ãƒ ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’制é™ã™ã‚‹ã“ã¨ã‚’示ã™ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹é€šå¸¸ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆï¼š + + ```sql + CREATE USER column_user IDENTIFIED BY 'password'; + ``` + +6. 特定ã®å€¤ã‚’æŒã¤è¡Œã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’制é™ã™ã‚‹ã“ã¨ã‚’示ã™ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹é€šå¸¸ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆï¼š + ```sql + CREATE USER row_user IDENTIFIED BY 'password'; + ``` + +#### 役割ã®ä½œæˆ + +ã“ã®ä¾‹ã‚’使ã£ã¦ï¼š + +- カラムや行ã€ç•°ãªã‚‹æ¨©é™ã®ãŸã‚ã®å½¹å‰²ã‚’作æˆã—ã¾ã™ +- 役割ã«æ¨©é™ã‚’付与ã—ã¾ã™ +- ユーザーをå„役割ã«å‰²ã‚Šå½“ã¦ã¾ã™ + +役割ã¯ã€å„ユーザーを個別ã«ç®¡ç†ã™ã‚‹ä»£ã‚ã‚Šã«ã€ç‰¹å®šã®æ¨©é™ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚°ãƒ«ãƒ¼ãƒ—を定義ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +1. `db1` データベースãŠã‚ˆã³ `table1` ã«ãŠã„ã¦ã€`column1` ã®ã¿ã‚’閲覧ã§ãるユーザーã®å½¹å‰²ã‚’作æˆï¼š + + ```sql + CREATE ROLE column1_users; + ``` + +2. `column1` ã®ã¿ãŒé–²è¦§å¯èƒ½ãªæ¨©é™ã‚’設定 + + ```sql + GRANT SELECT(id, column1) ON db1.table1 TO column1_users; + ``` + +3. `column_user` ユーザーを `column1_users` 役割ã«è¿½åŠ  + + ```sql + GRANT column1_users TO column_user; + ``` + +4. `column1` ã« `A` ã‚’å«ã‚€è¡Œã®ã¿ã‚’閲覧ã§ãるユーザーã®å½¹å‰²ã‚’ä½œæˆ + + ```sql + CREATE ROLE A_rows_users; + ``` + +5. `row_user` ã‚’ `A_rows_users` 役割ã«è¿½åŠ  + + ```sql + GRANT A_rows_users TO row_user; + ``` + +6. `column1` ㌠`A` ã®å€¤ã‚’æŒã¤è¡Œã®ã¿ã‚’閲覧å¯èƒ½ã¨ã™ã‚‹ãƒãƒªã‚·ãƒ¼ã‚’ä½œæˆ + + ```sql + CREATE ROW POLICY A_row_filter ON db1.table1 FOR SELECT USING column1 = 'A' TO A_rows_users; + ``` + +7. データベースã¨ãƒ†ãƒ¼ãƒ–ルã¸ã®æ¨©é™ã‚’設定 + + ```sql + GRANT SELECT(id, column1, column2) ON db1.table1 TO A_rows_users; + ``` + +8. ä»–ã®å½¹å‰²ã«å¯¾ã—ã¦ã‚‚ã™ã¹ã¦ã®è¡Œã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«æ˜Žç¤ºçš„ãªæ¨©é™ã‚’付与 + + ```sql + CREATE ROW POLICY allow_other_users_filter + ON db1.table1 FOR SELECT USING 1 TO clickhouse_admin, column1_users; + ``` + + :::note + テーブルã«ãƒãƒªã‚·ãƒ¼ã‚’アタッãƒã™ã‚‹ã¨ã€ã‚·ã‚¹ãƒ†ãƒ ã¯ãã®ãƒãƒªã‚·ãƒ¼ã‚’é©ç”¨ã—ã€å®šç¾©ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨å½¹å‰²ã®ã¿ãŒãã®ãƒ†ãƒ¼ãƒ–ルã§ã®æ“作を行ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ãã®ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ“作を拒å¦ã•ã‚Œã¾ã™ã€‚制é™ã•ã‚ŒãŸè¡Œãƒãƒªã‚·ãƒ¼ãŒä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é©ç”¨ã•ã‚Œãªã„よã†ã«ã™ã‚‹ãŸã‚ã€ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨å½¹å‰²ãŒé€šå¸¸ã¾ãŸã¯ä»–ã®ã‚¿ã‚¤ãƒ—ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æŒã¤ã“ã¨ã‚’許å¯ã™ã‚‹åˆ¥ã®ãƒãƒªã‚·ãƒ¼ã‚’定義ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + ::: + +## 検証 + +### カラム制é™ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã®å½¹å‰²ã®æ¨©é™ãƒ†ã‚¹ãƒˆ + +1. `clickhouse_admin` ユーザーã§ClickHouseクライアントã«ãƒ­ã‚°ã‚¤ãƒ³ + + ``` + clickhouse-client --user clickhouse_admin --password password + ``` + +2. 管ç†è€…ユーザーを使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãƒ†ãƒ¼ãƒ–ルã€ãŠã‚ˆã³ã™ã¹ã¦ã®è¡Œã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’確èªã€‚ + + ```sql + SELECT * + FROM db1.table1 + ``` + + ```response + Query id: f5e906ea-10c6-45b0-b649-36334902d31d + + ┌─id─┬─column1─┬─column2─┠+ │ 1 │ A │ abc │ + │ 2 │ A │ def │ + │ 3 │ B │ abc │ + │ 4 │ B │ def │ + └────┴─────────┴─────────┘ + ``` + +3. `column_user` ユーザーã§ClickHouseクライアントã«ãƒ­ã‚°ã‚¤ãƒ³ + + ``` + clickhouse-client --user column_user --password password + ``` + +4. ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’使用ã—㟠`SELECT` + + ```sql + SELECT * + FROM db1.table1 + ``` + + ```response + Query id: 5576f4eb-7450-435c-a2d6-d6b49b7c4a23 + + 0 rows in set. Elapsed: 0.006 sec. + + Received exception from server (version 22.3.2): + Code: 497. DB::Exception: Received from localhost:9000. + DB::Exception: column_user: Not enough privileges. + To execute this query it's necessary to have grant + SELECT(id, column1, column2) ON db1.table1. (ACCESS_DENIED) + ``` + + :::note + ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒæŒ‡å®šã•ã‚ŒãŸãŸã‚アクセスãŒæ‹’å¦ã•ã‚Œã¾ã—ãŸã€‚ユーザー㯠`id` 㨠`column1` ã®ã¿ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’æŒã£ã¦ã„ã¾ã™ + ::: + +5. 指定ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®ã¿ã‚’用ã„㟠`SELECT` クエリを確èªï¼š + + ```sql + SELECT + id, + column1 + FROM db1.table1 + ``` + + ```response + Query id: cef9a083-d5ce-42ff-9678-f08dc60d4bb9 + + ┌─id─┬─column1─┠+ │ 1 │ A │ + │ 2 │ A │ + │ 3 │ B │ + │ 4 │ B │ + └────┴─────────┘ + ``` + +### 行制é™ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã®å½¹å‰²ã®æ¨©é™ãƒ†ã‚¹ãƒˆ + +1. `row_user` ã§ClickHouseクライアントã«ãƒ­ã‚°ã‚¤ãƒ³ + + ``` + clickhouse-client --user row_user --password password + ``` + +2. 利用å¯èƒ½ãªè¡Œã‚’表示 + + ```sql + SELECT * + FROM db1.table1 + ``` + + ```response + Query id: a79a113c-1eca-4c3f-be6e-d034f9a220fb + + ┌─id─┬─column1─┬─column2─┠+ │ 1 │ A │ abc │ + │ 2 │ A │ def │ + └────┴─────────┴─────────┘ + ``` + + :::note + 上記ã®2è¡Œã®ã¿ãŒè¿”ã•ã‚Œã‚‹ã“ã¨ã‚’確èªã—ã€`column1` ã« `B` ã®å€¤ã‚’æŒã¤è¡Œã¯é™¤å¤–ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ + ::: + +## ユーザーã¨å½¹å‰²ã®å¤‰æ›´ + +ユーザーã¯å¿…è¦ãªæ¨©é™ã®çµ„ã¿åˆã‚ã›ã«å¯¾ã—ã¦è¤‡æ•°ã®å½¹å‰²ã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚複数ã®å½¹å‰²ã‚’使用ã™ã‚‹å ´åˆã€ã‚·ã‚¹ãƒ†ãƒ ã¯å½¹å‰²ã‚’組ã¿åˆã‚ã›ã¦æ¨©é™ã‚’決定ã—ã€ãã®çµæžœã€å½¹å‰²ã®æ¨©é™ãŒç´¯ç©ã•ã‚Œã¾ã™ã€‚ + +例ãˆã°ã€1ã¤ã® `role1` ㌠`column1` ã®ã¿ã®é¸æŠžã‚’許å¯ã—ã€`role2` ㌠`column1` 㨠`column2` ã®é¸æŠžã‚’許å¯ã™ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä¸¡æ–¹ã®ã‚«ãƒ©ãƒ ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + +1. 管ç†è€…アカウントを使用ã—ã¦ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å½¹å‰²ã§è¡Œã¨ã‚«ãƒ©ãƒ ã®ä¸¡æ–¹ã‚’制é™ã™ã‚‹æ–°ã—ã„ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’ä½œæˆ + + ```sql + CREATE USER row_and_column_user IDENTIFIED BY 'password' DEFAULT ROLE A_rows_users; + ``` + +2. `A_rows_users` 役割ã«å¯¾ã™ã‚‹ä»¥å‰ã®æ¨©é™ã‚’削除 + + ```sql + REVOKE SELECT(id, column1, column2) ON db1.table1 FROM A_rows_users; + ``` + +3. `A_row_users` 役割㫠`column1` ã®ã¿ã®é¸æŠžã‚’è¨±å¯ + + ```sql + GRANT SELECT(id, column1) ON db1.table1 TO A_rows_users; + ``` + +4. `row_and_column_user` ã§ClickHouseクライアントã«ãƒ­ã‚°ã‚¤ãƒ³ + + ``` + clickhouse-client --user row_and_column_user --password password; + ``` + +5. ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã§ãƒ†ã‚¹ãƒˆï¼š + + ```sql + SELECT * + FROM db1.table1 + ``` + + ```response + Query id: 8cdf0ff5-e711-4cbe-bd28-3c02e52e8bc4 + + 0 rows in set. Elapsed: 0.005 sec. + + Received exception from server (version 22.3.2): + Code: 497. DB::Exception: Received from localhost:9000. + DB::Exception: row_and_column_user: Not enough privileges. + To execute this query it's necessary to have grant + SELECT(id, column1, column2) ON db1.table1. (ACCESS_DENIED) + ``` + +6. 制é™ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã§ãƒ†ã‚¹ãƒˆï¼š + + ```sql + SELECT + id, + column1 + FROM db1.table1 + ``` + + ```response + Query id: 5e30b490-507a-49e9-9778-8159799a6ed0 + + ┌─id─┬─column1─┠+ │ 1 │ A │ + │ 2 │ A │ + └────┴─────────┘ + ``` + +## トラブルシューティング + +権é™ãŒäº¤å·®ã¾ãŸã¯çµåˆã—ã¦äºˆæœŸã—ãªã„çµæžœã‚’生む場åˆãŒã‚ã‚Šã¾ã™ã€‚次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦ç®¡ç†è€…アカウントを使用ã—ã¦å•é¡Œã‚’絞り込むã“ã¨ãŒã§ãã¾ã™ã€‚ + +### ユーザーã®æ¨©é™ã¨å½¹å‰²ã®ãƒªã‚¹ãƒˆ + +```sql +SHOW GRANTS FOR row_and_column_user +``` + +```response +Query id: 6a73a3fe-2659-4aca-95c5-d012c138097b + +┌─GRANTS FOR row_and_column_user───────────────────────────┠+│ GRANT A_rows_users, column1_users TO row_and_column_user │ +└──────────────────────────────────────────────────────────┘ +``` + +### ClickHouse ã®å½¹å‰²ã®ãƒªã‚¹ãƒˆ + +```sql +SHOW ROLES +``` + +```response +Query id: 1e21440a-18d9-4e75-8f0e-66ec9b36470a + +┌─name────────────┠+│ A_rows_users │ +│ column1_users │ +└─────────────────┘ +``` + +### ãƒãƒªã‚·ãƒ¼ã®è¡¨ç¤º + +```sql +SHOW ROW POLICIES +``` + +```response +Query id: f2c636e9-f955-4d79-8e80-af40ea227ebc + +┌─name───────────────────────────────────┠+│ A_row_filter ON db1.table1 │ +│ allow_other_users_filter ON db1.table1 │ +└────────────────────────────────────────┘ +``` + +### ãƒãƒªã‚·ãƒ¼ãŒã©ã®ã‚ˆã†ã«å®šç¾©ã•ã‚Œã¦ã„ã‚‹ã‹ã¨ç¾åœ¨ã®æ¨©é™ã‚’表示 + +```sql +SHOW CREATE ROW POLICY A_row_filter ON db1.table1 +``` + +```response +Query id: 0d3b5846-95c7-4e62-9cdd-91d82b14b80b + +┌─CREATE ROW POLICY A_row_filter ON db1.table1────────────────────────────────────────────────┠+│ CREATE ROW POLICY A_row_filter ON db1.table1 FOR SELECT USING column1 = 'A' TO A_rows_users │ +└─────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## ロールã€ãƒãƒªã‚·ãƒ¼ã€ãŠã‚ˆã³ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’管ç†ã™ã‚‹ãŸã‚ã®ã‚³ãƒžãƒ³ãƒ‰ã®ä¾‹ + +次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦ï¼š + +- 権é™ã®å‰Šé™¤ +- ãƒãƒªã‚·ãƒ¼ã®å‰Šé™¤ +- ユーザーを役割ã‹ã‚‰è§£é™¤ +- ユーザーã¨å½¹å‰²ã®å‰Šé™¤ +
+ +:::tip +ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã¯ç®¡ç†è€…ユーザーã¾ãŸã¯ `default` ユーザーã¨ã—ã¦å®Ÿè¡Œã—ã¦ãã ã•ã„ +::: + +### 役割ã‹ã‚‰ã®æ¨©é™ã‚’削除 + +```sql +REVOKE SELECT(column1, id) ON db1.table1 FROM A_rows_users; +``` + +### ãƒãƒªã‚·ãƒ¼ã‚’削除 + +```sql +DROP ROW POLICY A_row_filter ON db1.table1; +``` + +### ユーザーを役割ã‹ã‚‰è§£é™¤ + +```sql +REVOKE A_rows_users FROM row_user; +``` + +### 役割を削除 + +```sql +DROP ROLE A_rows_users; +``` + +### ユーザーを削除 + +```sql +DROP USER row_user; +``` + +## è¦ç´„ + +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯ã€SQLユーザーã¨å½¹å‰²ã®ä½œæˆã®åŸºæœ¬ã‚’示ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŠã‚ˆã³å½¹å‰²ã®æ¨©é™ã‚’設定ãŠã‚ˆã³å¤‰æ›´ã™ã‚‹æ‰‹é †ã‚’æä¾›ã—ã¾ã—ãŸã€‚ãã‚Œãžã‚Œã®è©³ç´°æƒ…å ±ã«ã¤ã„ã¦ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¬ã‚¤ãƒ‰ãŠã‚ˆã³ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/_snippets/images/aws-rds-mysql.png b/docs/ja/_snippets/images/aws-rds-mysql.png new file mode 100644 index 00000000000..5e4456fbed5 Binary files /dev/null and b/docs/ja/_snippets/images/aws-rds-mysql.png differ diff --git a/docs/ja/_snippets/images/cloud-advanced-scaling.png b/docs/ja/_snippets/images/cloud-advanced-scaling.png new file mode 100644 index 00000000000..787f81f4bb5 Binary files /dev/null and b/docs/ja/_snippets/images/cloud-advanced-scaling.png differ diff --git a/docs/ja/_snippets/images/cloud-backup-list.png b/docs/ja/_snippets/images/cloud-backup-list.png new file mode 100644 index 00000000000..fca809ae6d7 Binary files /dev/null and b/docs/ja/_snippets/images/cloud-backup-list.png differ diff --git a/docs/ja/_snippets/images/cloud-backup-new-service.png b/docs/ja/_snippets/images/cloud-backup-new-service.png new file mode 100644 index 00000000000..eeff5a0d2c0 Binary files /dev/null and b/docs/ja/_snippets/images/cloud-backup-new-service.png differ diff --git a/docs/ja/_snippets/images/cloud-backup-restore.png b/docs/ja/_snippets/images/cloud-backup-restore.png new file mode 100644 index 00000000000..922c640ee8d Binary files /dev/null and b/docs/ja/_snippets/images/cloud-backup-restore.png differ diff --git a/docs/ja/_snippets/images/cloud-connect-button.png b/docs/ja/_snippets/images/cloud-connect-button.png new file mode 100644 index 00000000000..c61e2f3605f Binary files /dev/null and b/docs/ja/_snippets/images/cloud-connect-button.png differ diff --git a/docs/ja/_snippets/images/cloud-connect-to-sql-console.png b/docs/ja/_snippets/images/cloud-connect-to-sql-console.png new file mode 100644 index 00000000000..5037f4c0591 Binary files /dev/null and b/docs/ja/_snippets/images/cloud-connect-to-sql-console.png differ diff --git a/docs/ja/_snippets/images/cloud-load-data-sample.png b/docs/ja/_snippets/images/cloud-load-data-sample.png new file mode 100644 index 00000000000..1abd3f4f4af Binary files /dev/null and b/docs/ja/_snippets/images/cloud-load-data-sample.png differ diff --git a/docs/ja/_snippets/images/cloud-select-a-service.png b/docs/ja/_snippets/images/cloud-select-a-service.png new file mode 100644 index 00000000000..8eb530404bf Binary files /dev/null and b/docs/ja/_snippets/images/cloud-select-a-service.png differ diff --git a/docs/ja/_snippets/images/cloud-service-actions-menu.png b/docs/ja/_snippets/images/cloud-service-actions-menu.png new file mode 100644 index 00000000000..d56c183fd4d Binary files /dev/null and b/docs/ja/_snippets/images/cloud-service-actions-menu.png differ diff --git a/docs/ja/_snippets/images/cloud-service-settings.png b/docs/ja/_snippets/images/cloud-service-settings.png new file mode 100644 index 00000000000..4fa16435508 Binary files /dev/null and b/docs/ja/_snippets/images/cloud-service-settings.png differ diff --git a/docs/ja/_snippets/images/cloud-sign-in-or-trial.png b/docs/ja/_snippets/images/cloud-sign-in-or-trial.png new file mode 100644 index 00000000000..824836d5080 Binary files /dev/null and b/docs/ja/_snippets/images/cloud-sign-in-or-trial.png differ diff --git a/docs/ja/_snippets/images/cmek-performance.png b/docs/ja/_snippets/images/cmek-performance.png new file mode 100644 index 00000000000..c8726203179 Binary files /dev/null and b/docs/ja/_snippets/images/cmek-performance.png differ diff --git a/docs/ja/_snippets/images/cmek1.png b/docs/ja/_snippets/images/cmek1.png new file mode 100644 index 00000000000..5b1f4bbe6f3 Binary files /dev/null and b/docs/ja/_snippets/images/cmek1.png differ diff --git a/docs/ja/_snippets/images/cmek2.png b/docs/ja/_snippets/images/cmek2.png new file mode 100644 index 00000000000..770e6774da9 Binary files /dev/null and b/docs/ja/_snippets/images/cmek2.png differ diff --git a/docs/ja/_snippets/images/cmek3.png b/docs/ja/_snippets/images/cmek3.png new file mode 100644 index 00000000000..27b2183f44b Binary files /dev/null and b/docs/ja/_snippets/images/cmek3.png differ diff --git a/docs/ja/_snippets/images/connect1.png b/docs/ja/_snippets/images/connect1.png new file mode 100644 index 00000000000..e534d7da388 Binary files /dev/null and b/docs/ja/_snippets/images/connect1.png differ diff --git a/docs/ja/_snippets/images/connect2.png b/docs/ja/_snippets/images/connect2.png new file mode 100644 index 00000000000..5e02ec95970 Binary files /dev/null and b/docs/ja/_snippets/images/connect2.png differ diff --git a/docs/ja/_snippets/images/connect3.png b/docs/ja/_snippets/images/connect3.png new file mode 100644 index 00000000000..ea769fe176a Binary files /dev/null and b/docs/ja/_snippets/images/connect3.png differ diff --git a/docs/ja/_snippets/images/connect4.png b/docs/ja/_snippets/images/connect4.png new file mode 100644 index 00000000000..ccdbaf94427 Binary files /dev/null and b/docs/ja/_snippets/images/connect4.png differ diff --git a/docs/ja/_snippets/images/connection-details-https.png b/docs/ja/_snippets/images/connection-details-https.png new file mode 100644 index 00000000000..cdd70b179e6 Binary files /dev/null and b/docs/ja/_snippets/images/connection-details-https.png differ diff --git a/docs/ja/_snippets/images/connection-details-native.png b/docs/ja/_snippets/images/connection-details-native.png new file mode 100644 index 00000000000..9eb043b564d Binary files /dev/null and b/docs/ja/_snippets/images/connection-details-native.png differ diff --git a/docs/ja/_snippets/images/createservice1.png b/docs/ja/_snippets/images/createservice1.png new file mode 100644 index 00000000000..c1e7b131a59 Binary files /dev/null and b/docs/ja/_snippets/images/createservice1.png differ diff --git a/docs/ja/_snippets/images/createservice2.png b/docs/ja/_snippets/images/createservice2.png new file mode 100644 index 00000000000..a79b51eebf9 Binary files /dev/null and b/docs/ja/_snippets/images/createservice2.png differ diff --git a/docs/ja/_snippets/images/createservice3.png b/docs/ja/_snippets/images/createservice3.png new file mode 100644 index 00000000000..422af55a832 Binary files /dev/null and b/docs/ja/_snippets/images/createservice3.png differ diff --git a/docs/ja/_snippets/images/createservice4.png b/docs/ja/_snippets/images/createservice4.png new file mode 100644 index 00000000000..5cf0113cd04 Binary files /dev/null and b/docs/ja/_snippets/images/createservice4.png differ diff --git a/docs/ja/_snippets/images/gcp-authorized-network.png b/docs/ja/_snippets/images/gcp-authorized-network.png new file mode 100644 index 00000000000..3fdd4d18a4f Binary files /dev/null and b/docs/ja/_snippets/images/gcp-authorized-network.png differ diff --git a/docs/ja/_snippets/images/ip-allow-list-add-current-ip.png b/docs/ja/_snippets/images/ip-allow-list-add-current-ip.png new file mode 100644 index 00000000000..f24612707c1 Binary files /dev/null and b/docs/ja/_snippets/images/ip-allow-list-add-current-ip.png differ diff --git a/docs/ja/_snippets/images/ip-allow-list-check-list.png b/docs/ja/_snippets/images/ip-allow-list-check-list.png new file mode 100644 index 00000000000..ed415f0828d Binary files /dev/null and b/docs/ja/_snippets/images/ip-allow-list-check-list.png differ diff --git a/docs/ja/_snippets/images/mysql1.png b/docs/ja/_snippets/images/mysql1.png new file mode 100644 index 00000000000..0f30799f701 Binary files /dev/null and b/docs/ja/_snippets/images/mysql1.png differ diff --git a/docs/ja/_snippets/images/mysql2.png b/docs/ja/_snippets/images/mysql2.png new file mode 100644 index 00000000000..105031eafca Binary files /dev/null and b/docs/ja/_snippets/images/mysql2.png differ diff --git a/docs/ja/_snippets/images/mysql3.png b/docs/ja/_snippets/images/mysql3.png new file mode 100644 index 00000000000..9a8a24814dc Binary files /dev/null and b/docs/ja/_snippets/images/mysql3.png differ diff --git a/docs/ja/_snippets/images/mysql4.png b/docs/ja/_snippets/images/mysql4.png new file mode 100644 index 00000000000..9f1a3876a3a Binary files /dev/null and b/docs/ja/_snippets/images/mysql4.png differ diff --git a/docs/ja/_snippets/images/mysql5.png b/docs/ja/_snippets/images/mysql5.png new file mode 100644 index 00000000000..5bccdfa31b1 Binary files /dev/null and b/docs/ja/_snippets/images/mysql5.png differ diff --git a/docs/ja/_snippets/images/openapi1.png b/docs/ja/_snippets/images/openapi1.png new file mode 100644 index 00000000000..2009f085cc7 Binary files /dev/null and b/docs/ja/_snippets/images/openapi1.png differ diff --git a/docs/ja/_snippets/images/openapi2.png b/docs/ja/_snippets/images/openapi2.png new file mode 100644 index 00000000000..b182d12faaf Binary files /dev/null and b/docs/ja/_snippets/images/openapi2.png differ diff --git a/docs/ja/_snippets/images/openapi3.png b/docs/ja/_snippets/images/openapi3.png new file mode 100644 index 00000000000..92b517546a0 Binary files /dev/null and b/docs/ja/_snippets/images/openapi3.png differ diff --git a/docs/ja/_snippets/images/openapi4.png b/docs/ja/_snippets/images/openapi4.png new file mode 100644 index 00000000000..f2e0490ee37 Binary files /dev/null and b/docs/ja/_snippets/images/openapi4.png differ diff --git a/docs/ja/_snippets/images/openapi5.png b/docs/ja/_snippets/images/openapi5.png new file mode 100644 index 00000000000..0333cd56b23 Binary files /dev/null and b/docs/ja/_snippets/images/openapi5.png differ diff --git a/docs/ja/_snippets/images/s3/s3-1.png b/docs/ja/_snippets/images/s3/s3-1.png new file mode 100644 index 00000000000..23d93874fbb Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-1.png differ diff --git a/docs/ja/_snippets/images/s3/s3-2.png b/docs/ja/_snippets/images/s3/s3-2.png new file mode 100644 index 00000000000..64c09710bc3 Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-2.png differ diff --git a/docs/ja/_snippets/images/s3/s3-3.png b/docs/ja/_snippets/images/s3/s3-3.png new file mode 100644 index 00000000000..32617f3002e Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-3.png differ diff --git a/docs/ja/_snippets/images/s3/s3-4.png b/docs/ja/_snippets/images/s3/s3-4.png new file mode 100644 index 00000000000..efedf267d62 Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-4.png differ diff --git a/docs/ja/_snippets/images/s3/s3-5.png b/docs/ja/_snippets/images/s3/s3-5.png new file mode 100644 index 00000000000..12286c41e2f Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-5.png differ diff --git a/docs/ja/_snippets/images/s3/s3-6.png b/docs/ja/_snippets/images/s3/s3-6.png new file mode 100644 index 00000000000..0b39a26a340 Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-6.png differ diff --git a/docs/ja/_snippets/images/s3/s3-7.png b/docs/ja/_snippets/images/s3/s3-7.png new file mode 100644 index 00000000000..7b869d71711 Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-7.png differ diff --git a/docs/ja/_snippets/images/s3/s3-8.png b/docs/ja/_snippets/images/s3/s3-8.png new file mode 100644 index 00000000000..329c9e70ca1 Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-8.png differ diff --git a/docs/ja/_snippets/images/s3/s3-9.png b/docs/ja/_snippets/images/s3/s3-9.png new file mode 100644 index 00000000000..5a08e26dea5 Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-9.png differ diff --git a/docs/ja/_snippets/images/s3/s3-a.png b/docs/ja/_snippets/images/s3/s3-a.png new file mode 100644 index 00000000000..6dbe8745747 Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-a.png differ diff --git a/docs/ja/_snippets/images/s3/s3-b.png b/docs/ja/_snippets/images/s3/s3-b.png new file mode 100644 index 00000000000..8625bdc4b29 Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-b.png differ diff --git a/docs/ja/_snippets/images/s3/s3-c.png b/docs/ja/_snippets/images/s3/s3-c.png new file mode 100644 index 00000000000..aa0bd4e798c Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-c.png differ diff --git a/docs/ja/_snippets/images/s3/s3-d.png b/docs/ja/_snippets/images/s3/s3-d.png new file mode 100644 index 00000000000..404f2a3f565 Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-d.png differ diff --git a/docs/ja/_snippets/images/s3/s3-e.png b/docs/ja/_snippets/images/s3/s3-e.png new file mode 100644 index 00000000000..878eb6a3e3c Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-e.png differ diff --git a/docs/ja/_snippets/images/s3/s3-f.png b/docs/ja/_snippets/images/s3/s3-f.png new file mode 100644 index 00000000000..3bad9361172 Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-f.png differ diff --git a/docs/ja/_snippets/images/s3/s3-g.png b/docs/ja/_snippets/images/s3/s3-g.png new file mode 100644 index 00000000000..a1cfe53ef9e Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-g.png differ diff --git a/docs/ja/_snippets/images/s3/s3-h.png b/docs/ja/_snippets/images/s3/s3-h.png new file mode 100644 index 00000000000..6d08a3b059b Binary files /dev/null and b/docs/ja/_snippets/images/s3/s3-h.png differ diff --git a/docs/ja/about-us/_category_.yml b/docs/ja/about-us/_category_.yml new file mode 100644 index 00000000000..dfa8c8a3912 --- /dev/null +++ b/docs/ja/about-us/_category_.yml @@ -0,0 +1,6 @@ +label: 'About Us' +collapsible: true +collapsed: true +link: + type: generated-index + title: About Us diff --git a/docs/ja/about-us/adopters.md b/docs/ja/about-us/adopters.md new file mode 100644 index 00000000000..c28d11106e2 --- /dev/null +++ b/docs/ja/about-us/adopters.md @@ -0,0 +1,512 @@ +--- +slug: /ja/about-us/adopters +sidebar_label: å°Žå…¥ä¼æ¥­ +title: ClickHouse å°Žå…¥ä¼æ¥­ +sidebar_position: 60 +description: ClickHouse ã‚’å°Žå…¥ã—ã¦ã„ã‚‹ä¼æ¥­ã¨ãã®æˆåŠŸäº‹ä¾‹ã®ä¸€è¦§ +--- + +以下ã¯ã€ClickHouse ã‚’å°Žå…¥ã—ã¦ã„ã‚‹ä¼æ¥­ã¨ãã®æˆåŠŸäº‹ä¾‹ã®ä¸€è¦§ã§ã™ã€‚ã“れらã®æƒ…å ±ã¯å…¬é–‹ã•ã‚Œã¦ã„る資料ã‹ã‚‰åŽé›†ã•ã‚ŒãŸã‚‚ã®ã§ã‚ã‚Šã€ç¾åœ¨ã®çŠ¶æ³ã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚貴社ã§ã® ClickHouse 導入事例を共有ã—ã€[リストã«è¿½åŠ ](https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/en/about-us/adopters.md)ã—ã¦ã„ãŸã ã‘ã‚‹ã¨å¹¸ã„ã§ã™ã€‚ãŸã ã—ã€å…±æœ‰ã«éš›ã—ã¦ã¯ NDA(秘密ä¿æŒå¥‘約)ã«æŠµè§¦ã—ãªã„ã“ã¨ã‚’ã”確èªãã ã•ã„。他社ã®å…¬é–‹æƒ…å ±ã®æ›´æ–°ã‚‚有益ã§ã™ã€‚ + +
+ +| Company | Industry | Usecase | Cluster Size | (Un)Compressed Data Size\* | Reference | +|---------|----------|---------|--------------|------------------------------------------------------------------------------|-----------| +| [1Flow](https://1flow.ai/) | Feedback automation | - | — | — | ClickHouse Cloud user | +| [2gis](https://2gis.ru) | Maps | Monitoring | — | — | [Talk in Russian, July 2019](https://youtu.be/58sPkXfq6nw) | +| [3xpl](https://3xpl.com/) | Software & Technology | Blockchain Explorer | — | — | [Reddit, February 2023](https://www.reddit.com/r/ethereum/comments/1159pdg/new_ethereum_explorer_by_3xpl_no_ads_super_fast/) | +| [5CNetwork](https://www.5cnetwork.com/) | Software | Analytics | — | — | [Community Slack](https://clickhouse.com/slack) | +| [ASO.dev](https://aso.dev/) | Software & Technology | App store optimisation | — | — | [Twitter, April 2023](https://twitter.com/gorniv/status/1642847791226445828) | +| [AdGreetz](https://www.adgreetz.com/) | Software & Technology | AdTech & MarTech | — | — | [Blog, April 2023](https://clickhouse.com/blog/adgreetz-processes-millions-of-daily-ad-impressions) | +| [AdGuard](https://adguard.com/) | Anti-Ads | AdGuard DNS | — | 1,000,000 DNS requests per second from over 50 million users | [Official Website, August 2022](https://adguard.com/en/blog/adguard-dns-2-0-goes-open-source.html) | +| [AdScribe](http://www.adscribe.tv/) | Ads | TV Analytics | — | — | [A quote from CTO](https://altinity.com/24x7-support/) | +| [Adapty](https://adapty.io/) | Subscription Analytics | Main product | — | — | [Twitter, November 2021](https://twitter.com/iwitaly/status/1462698148061659139) | +| [Adevinta](https://www.adevinta.com/) | Software & Technology | Online Classifieds | — | — | [Blog, April 2023](https://clickhouse.com/blog/serving-real-time-analytics-across-marketplaces-at-adevinta) | +| [Admiral](https://getadmiral.com/) | Martech | Engagement Management | — | — | [Webinar Slides, June 2020](https://altinity.com/presentations/2020/06/16/big-data-in-real-time-how-clickhouse-powers-admirals-visitor-relationships-for-publishers) | +| [Admixer](https://admixer.com/) | Media & Entertainment | Ad Analytics | — | — | [Blog Post](https://clickhouse.com/blog/admixer-aggregates-over-1-billion-unique-users-a-day-using-clickhouse) | +| [Aggregations.io](https://aggregations.io/) | Real-time analytics | Main product | - | - | [Twitter](https://twitter.com/jsneedles/status/1734606200199889282) | +| [Ahrefs](https://ahrefs.com/) | SEO | Analytics | Main cluster is 100k+ CPU cores, 800TB RAM. | 110PB nvme storage, uncompressed data size on main cluster is 1EB. | [Job listing](https://ahrefs.com/jobs/data-scientist-search) | +| [Airfold](https://www.airfold.co/) | API platform | Main Product | - | - | [Documentation](https://docs.airfold.co/workspace/pipes) | +| [Aiven](https://aiven.io/) | Cloud data platform | Managed Service | - | - | [Blog post](https://aiven.io/blog/introduction-to-clickhouse) | +| [Akamai](https://www.akamai.com/) | Software & Technology | CDN | — | — | [LinkedIn](https://www.linkedin.com/in/david-piatek-bb27368/) | +| [Akvorado](https://demo.akvorado.net/) | Network Monitoring | Main Product | — | — | [Documentation](https://demo.akvorado.net/docs/intro) | +| [AlgoNode](https://algonode.io/) | Software & Technology | Algorand Hosting | — | — | [Twitter, April 2023](https://twitter.com/AlgoNode_io/status/1650594948998213632) | +| [Alibaba Cloud](https://cn.aliyun.com/) | Cloud | E-MapReduce | — | — | [Official Website](https://help.aliyun.com/document_detail/212195.html) | +| [Alibaba Cloud](https://cn.aliyun.com/) | Cloud | Managed Service | — | — | [Official Website](https://help.aliyun.com/product/144466.html) | +| [Aloha Browser](https://alohabrowser.com/) | Mobile App | Browser backend | — | — | [Slides in Russian, May 2019](https://presentations.clickhouse.com/meetup22/aloha.pdf) | +| [Altinity](https://altinity.com/) | Cloud, SaaS | Main product | — | — | [Official Website](https://altinity.com/) | +| [Amadeus](https://amadeus.com/) | Travel | Analytics | — | — | [Press Release, April 2018](https://www.altinity.com/blog/2018/4/5/amadeus-technologies-launches-investment-and-insights-tool-based-on-machine-learning-and-strategy-algorithms) | +| [AMP](https://useamp.com/) | Software & Technology | e-Commerce Metrics | — | — | [Twitter Post, May 2024](https://x.com/pc_barnes/status/1793846059724357832) [Meetup Slides](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup122/Talk%20Track%201%20-%20AMP's%20data%20journey%20from%20OSS%20to%20ClickHouse%20Cloud%20-%20Chris%20Lawrence%20.pdf) | +| [Android Hub](https://bestforandroid.com/) | Blogging, Analytics, Advertising data | — | — | — | [Official Website](https://bestforandroid.com/)| +| [AnswerAI](https://www.answerai.co.uk/) | Software & Technology | AI Customer Support | — | — | [Twitter, May 2024](https://twitter.com/TomAnswerAi/status/1791062219678998880) | +| [Anton](https://anton.tools/) | Software & Technology | Blockchain Indexer | — | — | [GitHub](https://github.com/tonindexer/anton) | +| [Antrea](https://antrea.io/) | Software & Technology | Kubernets Network Security | — | — | [Documentation](https://antrea.io/docs/main/docs/network-flow-visibility/) | +| [ApiRoad](https://apiroad.net/) | API marketplace | Analytics | — | — | [Blog post, November 2018, March 2020](https://pixeljets.com/blog/clickhouse-vs-elasticsearch/) | +| [Apitally](https://apitally.io/) | Software & Technology | API Monitoring | — | — | [Twitter, March 2024](https://twitter.com/simongurcke/status/1766005582971170926) | +| [Appsflyer](https://www.appsflyer.com) | Mobile analytics | Main product | — | — | [Talk in Russian, July 2019](https://www.youtube.com/watch?v=M3wbRlcpBbY) | +| [Aptabase](https://aptabase.com/) | Analytics | Privacy-first / open-source Firebase Analytics alternative | — | — | [GitHub Repository](https://github.com/aptabase/aptabase/tree/main/etc/clickhouse) | +| [ArenaData](https://arenadata.tech/) | Data Platform | Main product | — | — | [Slides in Russian, December 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup38/indexes.pdf) | +| [Argedor](https://www.argedor.com/en/clickhouse/) | ClickHouse support | — | — | — | [Official website](https://www.argedor.com/en/clickhouse/) | +| [Atani](https://atani.com/en/) | Software & Technology | Crypto Platform | — | — | [CTO LinkedIn](https://www.linkedin.com/in/fbadiola/) | +| [Autoblocks](https://autoblocks.ai) | Software & Technology | LLM Monitoring & Deployment | — | — | [Twitter, August 2023](https://twitter.com/nolte_adam/status/1690722237953794048) | +| [Aviso](https://www.aviso.com/) | AI Platform | Reporting | — | — | ClickHouse Cloud user | +| [Avito](https://avito.ru/) | Classifieds | Monitoring | — | — | [Meetup, April 2020](https://www.youtube.com/watch?v=n1tm4j4W8ZQ) | +| [Axis Communications](https://www.axis.com/en-ca) | Video surveillance | Main product | - | - | [Blog post](https://engineeringat.axis.com/schema-changes-clickhouse/) | +| [AzurePrice](https://azureprice.net/) | Analytics | Main Product | — | — | [Blog, November 2022](https://blog.devgenius.io/how-i-migrate-to-clickhouse-and-speedup-my-backend-7x-and-decrease-cost-by-6x-part-1-2553251a9059) | +| [AzurGames](https://azurgames.com/) | Gaming | Analytics | — | — | [AWS Blog, Aug 2024](https://aws.amazon.com/blogs/gametech/azur-games-migrates-all-game-analytics-data-to-clickhouse-cloud-on-aws/) | +| [B2Metric](https://b2metric.com/) | Marketing | Analytics | — | — | [ProductHunt, July 2023](https://www.producthunt.com/posts/b2metric-decision-intelligence?bc=1) | +| [Backpack Exchange](https://backpack.exchange/) | FinTech | Analytics | — | — | [Meetup, June 2024](https://clickhouse.com/videos/tokyo-meetup-orchestrating-multibillion-row-database-migration-to-clickhouse) | +| [BIGO](https://www.bigo.sg/) | Video | Computing Platform | — | — | [Blog Article, August 2020](https://www.programmersought.com/article/44544895251/) | +| [Badoo](https://badoo.com) | Dating | Timeseries | — | 1.6 mln events/sec (2018) | [Slides in Russian, December 2019](https://presentations.clickhouse.com/meetup38/forecast.pdf) | +| [Baidu](https://www.baidu.com/) | Internet services | Data warehousing | - | - | [GitHub](https://github.com/ClickHouse/ClickHouse/pull/60361) | +| [Baselime](https://baselime.io/) | Software & Technology | Observability for Serverless | — | — | [Official website](https://baselime.io/) | +| [Basic RUM](https://www.basicrum.com/) | Software & Technology | Real User Monitoring | — | — | [Official website](https://www.basicrum.com/) | +| [Beehiiv](https://www.beehiiv.com/) | Marketing | Analytics | — | — | [Blog, Aug 2024](https://clickhouse.com/blog/data-hive-the-story-of-beehiivs-journey-from-postgres-to-clickhouse) | +| [Beeline](https://beeline.ru/) | Telecom | Data Platform | — | — | [Blog post, July 2021](https://habr.com/en/company/beeline/blog/567508/) | +| [Beetested](https://www.beetested.com/) | Software & Technology | Game Testing | — | — | [Case Study, June 2023](https://double.cloud/resources/case-studies/beetested-analyze-millions-of-gamers-emotions-with-doublecloud/) | +| [Benocs](https://www.benocs.com/) | Network Telemetry and Analytics | Main Product | — | — | [Meetup Video, December 2022](https://www.youtube.com/watch?v=48pAVShkeCY&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=12) [Slides, December 2022](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup66/Self%20repairing%20processing%20using%20ClickHouse.pdf) [Blog Post, March 2022](https://clickhouse.com/blog/-indexing-for-data-streams-benocs-telco/) [Slides in English, October 2017](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup9/lpm.pdf) | +| [Bento](https://bento.me/en/home) | Software & Technology | Personal Portfolio | — | — | [Twitter, May 2023](https://twitter.com/gubmee/status/1653405962542219264) | +| [Better Stack](https://betterstack.com/) | Cloud, SaaS | Log Management | - | - | [Official Website](https://betterstack.com/logtail) | +| [BiliBili](https://www.bilibili.com/) | Video sharing | — | — | — | [Blog post, June 2021](https://chowdera.com/2021/06/20210622012241476b.html) | +| [Binom](https://binom.org/) | Analytics | Website analytics | — | — | [Twitter, 2023](https://twitter.com/BinomTracker/status/1722948130948206940) | +| [Bitquery](https://bitquery.io/) | Software & Technology | Blockchain Data Company | — | — | [HackerNews, December 2020](https://bitquery.io/blog/blockchain-intelligence-system) | +| [Bloomberg](https://www.bloomberg.com/) | Finance, Media | Monitoring | — | — | [Meetup Video, December 2022](https://www.youtube.com/watch?v=HmJTIrGyVls&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=9) [Slides, December 2022](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup67/ClickHouse%20for%20Financial%20Analytics%20-%20Bloomberg.pdf) | +| [Bloxy](https://bloxy.info) | Blockchain | Analytics | — | — | [Slides in Russian, August 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup17/4_bloxy.pptx) | +| [Bonree](https://www.bonree.com/) | Software & Technology | Performance Monitoring & Observability | — | — | ClickHouse Meetup in Hangzhou, May 2024 | +| [Bonside](https://www.bonside.com/) | FinTech | - | — | — | [HackerNews, July 2023](https://news.ycombinator.com/item?id=36619722) | +| [Botify](https://www.botify.com/) | SaaS | SEO | — | — | [Blog Article, September 2022](https://tech.marksblogg.com/billion-taxi-rides-doublecloud-clickhouse.html) | +| [Braintrust](https://www.usebraintrust.com/) | Software & Technology | Real-time Analytics | — | — | [Written Blog from Meetup Video, July 2024](https://clickhouse.com/blog/building-better-ai-products-faster-how-braintrust-uses-clickhouse-for-real-time-data-analysis) | +| [ByConity](https://byconity.github.io/)| Software & Technology | Big Data Analysis Engine | — | — | [GitHub](https://github.com/ByConity/ByConity) | +| [Bytedance](https://www.bytedance.com) | Social platforms | — | — | — | [The ClickHouse Meetup East, October 2020](https://www.youtube.com/watch?v=ckChUkC3Pns) | +| [CARTO](https://carto.com/) | Business Intelligence | Geo analytics | — | — | [Geospatial processing with ClickHouse](https://carto.com/blog/geospatial-processing-with-clickhouse/) | +| [CERN](http://public.web.cern.ch/public/) | Research | Experiment | — | — | [Press release, April 2012](https://www.yandex.com/company/press_center/press_releases/2012/2012-04-10/) | +| [CHEQ](https://cheq.ai/) | Software & Technology | GTM Security | — | — | [Meetup Video, January 2023](https://www.youtube.com/watch?v=rxIO6w4er3k&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=7) [Slides, January 2023](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup68/ClickHouse%20Meetup%20-%20CHEQ.pptx.pdf) | +| [Campaign Deputy](https://campaigndeputy.com/) | SaaS | Analytics, Logs | — | — | [Twitter, February 2023](https://twitter.com/joshabartley/status/1627669208074014721), [Tweet, July 2023](https://twitter.com/joshabartley/status/1677008728711651331) | +| [Canopus Networks](https://canopusnetworks.com/) | AI for telcos | Real-time analytics | - | - | [Meetup Presentation](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup126/Talk%20Track%201%20-%20Canopus%20Networks.pdf) | +| [Capgo.app](https://capgo.app/) | App development | Real-time statistics | - | - | [Twitter](https://twitter.com/martindonadieu/status/1735728943406219736) | +| [CardsMobile](https://cardsmobile.ru/) | Finance | Analytics | — | — | [VC.ru](https://vc.ru/s/cardsmobile/143449-rukovoditel-gruppy-analiza-dannyh) | +| [Castle](https://castle.io/) | Fraud Detection | Main product | — | — | [Community Slack](https://clickhouse.com/slack) | +| [Cato Networks](https://www.catonetworks.com/) | Network Security | Security event analytics | — | 8B (4TB) new events per day | [Full Stack Developers Israel, Jan 2023](https://www.youtube.com/watch?v=Is4TC2gf5EM) | +| [CDN77](https://www.cdn77.com/) | Software & Technology | Content Delivery Network | — | — | [GitHub Comment, April 2024](https://github.com/ClickHouse/ClickHouse/issues/61093#issuecomment-2070150654) | +| [Chainbase](https://chainbase.online/) | Blockchain | Main product | — | — | [Documentation](https://docs.chainbase.online/r/data-cloud-studio/data-cloud-api) | +| [ChatLayer](https://chatlayer.ai/) | AI virtual assistants | Analytics | — | — | [Press Release, December 2021](https://aiven.io/blog/aiven-for-clickhouse-now-generally-available) | +| [Checkly](https://www.checklyhq.com/) | Software Development | Analytics | — | — | [Twitter, October 2021](https://twitter.com/tim_nolet/status/1445810665743081474?s=20) | +| [ChelPipe Group](https://chelpipegroup.com/) | Analytics | — | — | — | [Blog post, June 2021](https://vc.ru/trade/253172-tyazhelomu-proizvodstvu-user-friendly-sayt-internet-magazin-trub-dlya-chtpz) | +| [Chroma](https://www.trychroma.com/) | Software & Technology | AI-native embedded database | — | — | [GitHub Repository](https://github.com/chroma-core/chroma) [Twitter, February 2023](https://twitter.com/atroyn/status/1625605732644298752) | +| [CipherStash](https://cipherstash.com/) | Software & Technology | Analytics | — | — | [Meetup Presentation](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup126/Talk%20Track%203%20-%20CipherStash.pdf) | +| [Cisco](http://cisco.com/) | Networking | Traffic analysis | — | — | [Lightning talk, October 2019](https://youtu.be/-hI1vDR2oPY?t=5057) | +| [Citadel Securities](https://www.citadelsecurities.com/) | Finance | — | — | — | [Contribution, March 2019](https://github.com/ClickHouse/ClickHouse/pull/4774) | +| [Citymobil](https://city-mobil.ru) | Taxi | Analytics | — | — | [Blog Post in Russian, March 2020](https://habr.com/en/company/citymobil/blog/490660/) | +| [Clearbit](https://clearbit.com/) | AI | Product usage | — | — | ClickHouse Cloud user | +| [ClickFunnels](https://www.clickfunnels.com/) | Website Builder | | — | — | ClickHouse Cloud user | +| [ClickVisual](https://clickvisual.net/) | Software | Logging Platform | — | — | [Blog Post, May 2022](https://golangexample.com/a-light-weight-log-visual-analytic-platform-for-clickhouse/) | +| [Clog](https://www.hybridlogic.co.uk/) | Software & Technology | Logging | — | — | [Blog, February 2023](https://www.hybridlogic.co.uk/2023/02/clog/) | +| [Cloudflare](https://cloudflare.com) | CDN | Traffic analysis | 36 servers | — | [Blog post, May 2017](https://blog.cloudflare.com/how-cloudflare-analyzes-1m-dns-queries-per-second/), [Blog post, March 2018](https://blog.cloudflare.com/http-analytics-for-6m-requests-per-second-using-clickhouse/) | +| [CloudRaft](https://www.cloudraft.io/) | Software & Technology | Consulting Services | — | — | [Twitter, May 2024](https://x.com/anjuls/status/1792048331805606156) | +| [Codegiant](https://codegiant.io/) | Security | Main product | — | — | [Blog, December 2023](https://blog.codegiant.io/clickhouse-in-codegiant-observability-ecosystem/) | +| [Cognitiv](https://cognitiv.ai/) | AdTech | Offline Feature Store | — | — | [Blog, Aug 2024](https://clickhouse.com/blog/transforming-ad-tech-how-cognitiv-uses-clickhouse-to-build-better-machine-learning-models) | +| [Coinhall](https://coinhall.org/) | Web3 | Blockchain Data Platform | — | — | [Blog, Aug 2024](https://clickhouse.com/blog/trade-secrets-how-coinhall-uses-clickhouse-to-power-its-blockchain-data-platform) | +| [Coinpaprika](https://coinpaprika.com/) | Software & Technology | Cryptocurrency Market Data Analysis | — | — | [Blog, May 2023](https://clickhouse.com/blog/coinpaprika-aggregates-pricing-data) | +| [Comcast](https://corporate.comcast.com/) | Media | CDN Traffic Analysis | — | — | [ApacheCon 2019 Talk](https://www.youtube.com/watch?v=e9TZ6gFDjNg) | +| [Common Room](https://www.commonroom.io/) | Marketing SaaS | Real-Time Analytics | — | — | [Seattle Meetup, March 2024](https://www.youtube.com/watch?v=liTgGiTuhJE) | +| [Constructor](https://constructor.io/) | E-commerce Search | E-commerce Search | — | — | ClickHouse Cloud user | +| [Contentsquare](https://contentsquare.com) | Web analytics | Main product | — | — | [Meetup Video, January 2023](https://www.youtube.com/watch?v=zvuCBAl2T0Q&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=5) [Blog Post, October 2022](https://clickhouse.com/blog/contentsquare-migration-from-elasticsearch-to-clickhouse) [Blog post in French, November 2018](http://souslecapot.net/2018/11/21/patrick-chatain-vp-engineering-chez-contentsquare-penser-davantage-amelioration-continue-que-revolution-constante/) | +| [Coroot](https://coroot.com/) | Software & Technology | Observability | — | — | [Twitter, July 2023](https://twitter.com/coroot_com/status/1680993372385804288?s=20) | +| [Corsearch](https://corsearch.com/) | Marketing SaaS (Brand Protection) | Main Datastore | — | — | [Seattle Meetup, March 2023](https://www.youtube.com/watch?v=BuS8jFL9cvw&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=10) | +| [Corunet](https://coru.net/) | Analytics | Main product | — | — | [Slides in English, April 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup21/predictive_models.pdf) | +| [Covalent](https://www.covalenthq.com/) | Financial - Crypto | Blockchain analysis | — | — | ClickHouse Cloud user | +| [CraiditX 氪信](https://www.creditx.com) | Finance AI | Analysis | — | — | [Slides in English, November 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup33/udf.pptx) | +| [Craigslist](https://sfbay.craigslist.org/) | Classifieds | Rate limiting (Redis replacement) | — | — | [SF Meetup, March 2024](https://www.youtube.com/watch?v=wRwqrbUjRe4&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=9) | +| [Crazypanda](https://crazypanda.ru/en/) | Games | | — | — | Live session on ClickHouse meetup | +| [Criteo](https://www.criteo.com/) | Retail | Main product | — | — | [Slides in English, October 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup18/3_storetail.pptx) | +| [Cryptology](https://cryptology.com/) | Digital Assets Trading Platform | — | — | — | [Job advertisement, March 2021](https://career.habr.com/companies/cryptology/vacancies) | +| [Culver Max Entertainment/Sony Pictures](https://www.sonypicturesnetworks.com/overview) | Television/Entertainment | Media streaming analytics | — | — | ClickHouse Cloud user | +| [Cumul.io](https://www.cumul.io) | Software & Technology | Customer Analytics | — | — | [Blog Post, June 2022](https://clickhouse.com/blog/optimizing-your-customer-facing-analytics-experience-with-cumul-io-and-clickhouse) | +| [DB Pilot](https://www.dbpilot.io/)| Software & Technology | Database GUI | — | — | [Twitter, August 2023](https://twitter.com/dennis_hellweg/status/1701349566354686143) | +| [DENIC](https://www.denic.de/) | Software & Technology | Data Science Analytics | — | — | [Blog Post, May 2022](https://clickhouse.com/blog/denic-improves-query-times-by-10x-with-clickhouse) | +| [DNSMonster](https://dnsmonster.dev/) | Software & Technology | DNS Monitoring | — | — | [GitHub Repository](https://github.com/mosajjal/dnsmonster) | +| [Darwinium](https://www.darwinium.com/) | Software & Technology | Security and Fraud Analytics | — | — | [Blog Post, July 2022](https://clickhouse.com/blog/fast-feature-rich-and-mutable-clickhouse-powers-darwiniums-security-and-fraud-analytics-use-cases) | +| [Dashdive](https://www.dashdive.com/) | Infrastructure management | Analytics | — | — | [Hackernews, 2024](https://news.ycombinator.com/item?id=39178753) | +| [Dassana](https://lake.dassana.io/) | Cloud data platform | Main product | - | - | [Blog Post, Jan 2023](https://clickhouse.com/blog/clickhouse-powers-dassanas-security-data-lake) [Direct reference, April 2022](https://news.ycombinator.com/item?id=31111432) | +| [Datafold](https://www.datafold.com/) | Data Reliability Platform | — | — | — | [Job advertisement, April 2022](https://www.datafold.com/careers) | +| [Dataliance for China Telecom](https://www.chinatelecomglobal.com/) | Telecom | Analytics | — | — | [Slides in Chinese, January 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup12/telecom.pdf) | +| [DeepFlow](https://deepflow.io) | Software & Technology | Observability | — | — | [GitHub](https://github.com/deepflowio/deepflow) | +| [DeepL](https://www.deepl.com/) | Machine Learning | — | — | — | [Blog Post, July 2022](https://clickhouse.com/blog/deepls-journey-with-clickhouse) [Video, October 2021](https://www.youtube.com/watch?v=WIYJiPwxXdM&t=1182s) | +| [Deepglint æ ¼çµæ·±çž³](https://www.deepglint.com/) | AI, Computer Vision | OLAP | — | — | [Official Website](https://www.deepglint.com/) | +| [Deeplay](https://deeplay.io/eng/) | Gaming Analytics | — | — | — | [Job advertisement, 2020](https://career.habr.com/vacancies/1000062568) | +| [Depot](https://depot.dev/) | Software & Technology | CI & Build Acceleration | — | — | [Twitter, April 2024](https://twitter.com/jacobwgillespie/status/1778463642150695048) | +| [Deutsche Bank](https://db.com) | Finance | BI Analytics | — | — | [Meetup Video, December 2022](https://www.youtube.com/watch?v=O3GJ6jag3Hc&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=11) [Slides in English, October 2019](https://bigdatadays.ru/wp-content/uploads/2019/10/D2-H3-3_Yakunin-Goihburg.pdf) | +| [DevHubStack](http://devhubstack.com/) | Software & Technology | Community Management | — | — | [Twitter, May 2024](https://twitter.com/thedevhubstack/status/1790655455229771789) | +| [Didi](https://web.didiglobal.com/) | Transportation & Ride Sharing | Observability | 400+ logging, 40 tracing | PBs/day / 40GB/s write throughput, 15M queries/day, 200 QPS peak | [Blog, Apr 2024](https://clickhouse.com/blog/didi-migrates-from-elasticsearch-to-clickHouse-for-a-new-generation-log-storage-system) | +| [DigiCert](https://www.digicert.com) | Network Security | DNS Platform | — | over 35 billion events per day | [Job posting, Aug 2022](https://www.indeed.com/viewjob?t=Senior+Principal+Software+Engineer+Architect&c=DigiCert&l=Lehi,+UT&jk=403c35f96c46cf37&rtk=1g9mnof7qk7dv800) | +| [Disney+](https://www.disneyplus.com/) | Video Streaming | Analytics | — | 395 TiB | [Meetup Video, December 2022](https://www.youtube.com/watch?v=CVVp6N8Xeoc&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=8) [Slides, December 2022](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup67/Disney%20plus%20ClickHouse.pdf) | +| [Dittofeed](https://dittofeed.com/) | Software & Technology | Open Source Customer Engagement | — | — | [Hackernews, June 2023](https://news.ycombinator.com/item?id=36061344) | +| [Diva-e](https://www.diva-e.com) | Digital consulting | Main Product | — | — | [Slides in English, September 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup29/ClickHouse-MeetUp-Unusual-Applications-sd-2019-09-17.pdf) | +| [Dolphin Emulator](https://dolphin-emu.org/) | Games | Analytics | — | — | [Twitter, Sept 2022](https://twitter.com/delroth_/status/1567300096160665601) | +| [DotSentry](https://forum.polkadot.network/t/dotsentry-ecosystem-wide-monitoring-solution/8210) | Software & Technology | Monitoring for Polkadot Ecosystem | — | — | [Forum Post, May 2024](https://forum.polkadot.network/t/dotsentry-ecosystem-wide-monitoring-solution/8210) | +| [DrDroid](https://www.drdroid.io/)| Software & Technology | Monitoring | — | — | [Slack, August 2023](https://clickhousedb.slack.com/archives/C04N3AU38DV/p1694151014185729) | +| [Duckbill Group](https://www.duckbillgroup.com/)| Software & Technology | — | — | — | [Twitter, May 2024](https://twitter.com/mike_julian/status/1789737184192315876) | +| [eBay](https://www.ebay.com/) | E-commerce | Logs, Metrics and Events | — | — | [Official website, Sep 2020](https://tech.ebayinc.com/engineering/ou-online-analytical-processing/) | +| [Ecommpay](https://ecommpay.com/) | Payment Processing | Logs | — | — | [Video, Nov 2019](https://www.youtube.com/watch?v=d3GdZTOWGLk) | +| [Ecwid](https://www.ecwid.com/) | E-commerce SaaS | Metrics, Logging | — | — | [Slides in Russian, April 2019](https://nastachku.ru/var/files/1/presentation/backend/2_Backend_6.pdf) | +| [Effodio](https://www.effodio.com/) | Observability, Root cause analysis | Event storage | - | - | [Blog, 2024](https://peng.fyi/post/factorial-growth-of-clickhouse-with-clause/)| +| [Egg](https://github.com/ducc/egg) | Error Aggregation | Main Product | — | — | [GitHub repository](https://github.com/ducc/egg) | +| [Engage](https://engage.so/) | Software & Technology | Customer Engagement | — | — | [Twitter Post, May 2024](https://x.com/kehers/status/1793935987778724038) | +| [Ensemble](https://ensembleanalytics.io/) | Analytics | Analytics | — | — | [Official website, Sep 2020](https://ensembleanalytics.io/blog/why-we-went-all-in-clickhouse) | +| [EventBunker.io](https://www.eventbunker.io/) | Serverless Data Processing | — | — | — | [Twitter, April 2021](https://twitter.com/Halil_D_/status/1379839133472985091) | +| [ExitLag](http://www.exitlag.com/) | Software & Technology | Gaming Data Routing | — | — | [Blog, June 2023](https://clickhouse.com/blog/boosting-game-performance-exitlag-quest-for-a-better-data-management-system) | +| [ExitLag](https://www.exitlag.com/) | Software & Technology | Optimized Gaming Experience | — | — | [ClickHouse Blog, June 2023](https://clickhouse.com/blog/boosting-game-performance-exitlag-quest-for-a-better-data-management-system) | +| [Exness](https://www.exness.com/) | Trading | Metrics, Logging | — | — | [Talk in Russian, May 2019](https://youtu.be/_rpU-TvSfZ8?t=3215) | +| [Explo](https://www.explo.co/) | Analytics | - | — | — | [Integrations Page, August 2022](https://www.explo.co/integrations/clickhouse) | +| [Fastly](https://www.fastly.com/) | Internet Services | Metrics (Graphite replacement) | — | — | [Boston Meetup, Dec 2023](https://clickhouse.com/videos/scaling-graphite-with-clickhouse) | +| [FastNetMon](https://fastnetmon.com/) | DDoS Protection | Main Product | | — | [Official website](https://fastnetmon.com/docs-fnm-advanced/fastnetmon-advanced-traffic-persistency/) | +| [Fastnear](https://fastnear.com/) | Infrastructure | Main product | — | — | [Twitter, 2024](https://twitter.com/ekuzyakov/status/1762500731154698421) | +| [FeatBit](https://www.featbit.co/) | Software & Technology | Feature Flag Management | — | — | [GitHub, August 2023](https://github.com/featbit/featbit) | +| [FinBox](https://finbox.in/)| Software & Technology | Financial Services | — | — | [Slack](https://clickhousedb.slack.com/archives/C04N3AU38DV/p1688198501884219) | +| [Fingerprint](https://fingerprint.com/) | Fraud detection | Fraud detection | — | — | [Meetup](https://www.linkedin.com/posts/system29a_clickhouse-meetup-in-berlin-tue-may-16-activity-7063805876570050561-UE-n/) | +| [Firebolt](https://www.firebolt.io/) | Analytics | Main product | - | - | [VLDB 2022 paper](https://www.firebolt.io/content/firebolt-vldb-cdms-2022), [VLDB 2022 slides](https://cdmsworkshop.github.io/2022/Slides/Fri_C2.5_MoshaPasumansky.pdf) | +| [Fl0](https://www.fl0.com/) | Cloud | Server management | - | - | [Meetup presentation](https://presentations.clickhouse.com/?path=meetup94) | +| [Flipkart](https://www.flipkart.com/) | e-Commerce | — | — | — | [Talk in English, July 2020](https://youtu.be/GMiXCMFDMow?t=239) | +| [Flipt](https://www.flipt.io/) | Software | Software development management | - | - | [Blog, 2024](https://www.flipt.io/blog/analytics-with-clickhouse) | +| [FortiSIEM](https://www.fortinet.com/) | Information Security | Supervisor and Worker | — | — | [Documentation](https://help.fortinet.com/fsiem/6-6-0/Online-Help/HTML5_Help/clickhouse_config.htm) | +| [Fortis Games](https://fortisgames.com/) | Game studio | Online data analytics | - | — | [Blog post, July 2023](https://thenewstack.io/a-real-time-data-platform-for-player-driven-game-experiences/) | +| [Foxway](https://www.foxway.com/en/) | Software & Technology | e-Commerce | — | — | [ClickHouse Meetup, April 2024](https://twitter.com/ClickHouseDB/status/1782833838886121492) | +| [Friendly Captcha](https://friendlycaptcha.com) | Bot Protection | — | — | — | [Job Posting, Aug 2022](https://news.ycombinator.com/item?id=32311825) | +| [FunCorp](https://fun.co/rp) | Games | | — | 14 bn records/day as of Jan 2021 | [Article](https://www.altinity.com/blog/migrating-from-redshift-to-clickhouse) | +| [Futurra Group](https://futurragroup.com/) | Analytics | — | — | — | [Article in Russian, December 2021](https://dou.ua/forums/topic/35587/) | +| [G-Core Labs](https://gcorelabs.com/) | Security | Main product | — | — | [Job posting, May 2022](https://careers.gcorelabs.com/jobs/Careers) | +| [Galaxy-Future](https://www.galaxy-future.com/en/home) | Software & Technology | Metric Monitoring & Measurement | — | — | [CudgX GitHub Repository](https://github.com/galaxy-future/cudgx) | +| [Geniee](https://geniee.co.jp) | Ad network | Main product | — | — | [Blog post in Japanese, July 2017](https://tech.geniee.co.jp/entry/2017/07/20/160100) | +| [Genotek](https://www.genotek.ru/) | Bioinformatics | Main product | — | — | [Video, August 2020](https://youtu.be/v3KyZbz9lEE) | +| [Gigapipe](https://gigapipe.com/) | Managed ClickHouse | Main product | — | — | [Official website](https://gigapipe.com/) | +| [Gigasheet](https://gigasheet.co/) | Analytics | Main product | — | — | Direct Reference, February 2022| +| [GitLab](https://gitlab.com/) | Code and DevOps | APM | — | — | [Official website](https://gitlab.com/gitlab-org/incubation-engineering/apm/apm) | +| [Glaber](https://glaber.io/) | Monitoring | Main product | — | — | [Website](https://glaber.io/) | +| [Glenrose Group](https://www.glenrosegroup.com/) | Expense management | — | — | — | [Twitter](https://twitter.com/EncodedRose/status/1706145758897180783) | +| [Gluten](https://github.com/oap-project/gluten) | Software & Technology | Spark performance | — | — | [Github, July 2023](https://github.com/oap-project/gluten) | +| [Goldsky](https://goldsky.com/) | Software & Technology | Blockchain data analytics | - | — | [Documentation, July 2023](https://docs.goldsky.com/) | +| [Good Job Games](https://goodjobgames.com/) | Games | Event Processing | — | — | [Job Posting, Aug 2022](https://news.ycombinator.com/item?id=32313170) | +| [Goodpeople](https://twitter.com/_suzychoi/status/1702113350258180245) | Human Resources | OLAP | — | — | [Twitter, 2023](https://twitter.com/_suzychoi/status/1702113350258180245) | +| [Gorgias](https://www.gorgias.com/) | Software & Technology | eCommerce Helpdesk Analytics | — | — | [ClickHouse Slack, April 2023](https://clickhousedb.slack.com/archives/C04N3AU38DV/p1682502827729909) | +| [Grafbase](https://grafbase.com/) | Software & Technology | GraphQL API Management | — | — | [Blog, June 2023](https://grafbase.com/blog/how-to-build-your-own-realtime-analytics-dashboards) | +| [GraphCDN](https://graphcdn.io/) | CDN | Traffic Analytics | — | — | [Blog Post in English, August 2021](https://altinity.com/blog/delivering-insight-on-graphql-apis-with-clickhouse-at-graphcdn/) | +| [GraphJSON](https://www.graphjson.com) | Cloud analytics platform | Main product | - | - | [Official Website, November 2021](https://www.graphjson.com/guides/about) | +| [GraphQL Hive](https://graphql-hive.com/) | Software Development | Traffic analysis | — | — | [Source code](https://github.com/kamilkisiela/graphql-hive) | +| [Groundcover](https://groundcover.com/) | Observability | Kubernetes Observability | - | — | [Documentation, July 2023](https://docs.groundcover.com/docs/learn-more/architecture) | +| [Grouparoo](https://www.grouparoo.com) | Data Warehouse Integrations | Main product | — | — | [Official Website, August 2021](https://www.grouparoo.com/integrations) | +| [Growthbook](https://www.growthbook.io) | Open Source Feature Flagging | Integration | — | — | [Official Website, July 2022](https://www.growthbook.io) | +| [Gumlet](https://www.gumlet.com/) | CDN | Analytics | — | — | [Meetup Presentation](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup133/Talk%20Track%202%20-%20Gumlet.pdf) | +| [HUYA](https://www.huya.com/) | Video Streaming | Analytics | — | — | [Slides in Chinese, October 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup19/7.%20ClickHouse万亿数æ®åˆ†æžå®žè·µ%20æŽæœ¬æ—º(sundy-li)%20虎牙.pdf) | +| [Haibo æµ·åšç§‘技](https://www.botech.com.cn/) | Big Data | OLAP | — | — | [Personal reference](https://github.com/ClickHouse/clickhouse-docs/pull/279) | +| [Helicone](https://helicone.ai) | Software & Technology | LLM monitoring | — | — | [Meetup, August 2023](https://clickhouse.com/blog/helicones-migration-from-postgres-to-clickhouse-for-advanced-llm-monitoring) | +| [Hewlett-Packard](https://www.hp.com) | Software & Technology | - | — | — | [LinkedIn post, November 2023](https://www.indeed.com/viewjob?t=Machine+Learning+Engineer&c=Hewlett-Packard+CDS+GmbH&l=Houston,+TX&jk=109385f349350746&rtk=1hg3128s9kkf6800) | +| [Hi-Fi](https://hi.fi/) | Software & Technology | Music Industry Analytics | — | — | [Blog Post, January 2023](https://clickhouse.com/blog/hifis-migration-from-bigquery-to-clickhouse) | +| [Highlight](https://www.highlight.io/) | Software & Technology | Monitoring | — | — | [Hacker News, February 2023](https://news.ycombinator.com/item?id=34897645), [GitHub](https://github.com/highlight/highlight/tree/87f7e3882b88e9019d690847a134231e943890fe/backend/clickhouse) | +| [HockeyStack](https://hockeystack.com/) | Analytics platform | OLAP | — | — | [Blog](https://hockeystack.com/blog/a-new-database/) | +| [Honeybadger](https://www.honeybadger.io/) | Software | Error tracking | - | - | [Mastadon 2024](https://hachyderm.io/@wood/111904268945097226) | +| [Hookdeck](https://hookdeck.com/) | Software & Technology | Webhook | — | — | [Twitter, June 2023](https://twitter.com/mkherlakian/status/1666214460824997889) | +| [Hopsteiner](https://www.hopsteiner.com/) | Agriculture | - | — | — | [Job post, July 2023](https://www.indeed.com/viewjob?t=Systems+Administrator&c=S+S+STEINER&l=Yakima,+WA&jk=5b9b7336de0577d5&rtk=1h45ruu32j30q800&from=rss) | +| [Horizon](https://horizon.io/)| Software & Technology | Gaming Analytics | — | — | [Twitter, July 2023](https://twitter.com/peterk/status/1677099027110805504) | +| [Hubalz](https://hubalz.com) | Web analytics | Main product | — | — | [Twitter, July 2023](https://twitter.com/Derinilkcan/status/1676197439152312321) | +| [Hydrolix](https://www.hydrolix.io/) | Cloud data platform | Main product | — | — | [Documentation](https://docs.hydrolix.io/guide/query) | +| [HyperDx](https://www.hyperdx.io/) | Software & Technology | Open Telemetry | — | — | [HackerNews, May 2023](https://news.ycombinator.com/item?id=35881942) | +| [Hystax](https://hystax.com) | Cloud Operations | Observability Analytics | - | - | [Blog](https://hystax.com/clickhouse-for-real-time-cost-saving-analytics-how-to-stop-hammering-screws-and-use-an-electric-screwdriver/) | +| [IBM](https://www.ibm.com) | APM Platform | Ex-Instana | — | — | See Instana | +| [IBM QRadar](https://www.ibm.com) | IBM QRadar Log Insights | Main Product | — | — | [IBM Blog](https://www.ibm.com/blog/closing-breach-window-from-data-to-action/) | +| [ICA](https://www.the-ica.com/) | FinTech | Risk Management | — | — | [Blog Post in English, Sep 2020](https://altinity.com/blog/clickhouse-vs-redshift-performance-for-fintech-risk-management?utm_campaign=ClickHouse%20vs%20RedShift&utm_content=143520807&utm_medium=social&utm_source=twitter&hss_channel=tw-3894792263) | +| [Idealista](https://www.idealista.com) | Real Estate | Analytics | — | — | [Blog Post in English, April 2019](https://clickhouse.com/blog/en/clickhouse-meetup-in-madrid-on-april-2-2019) | +| [Improvado](https://improvado.io/) | Revenue Operations | Data Stack | — | — | [Blog Post, December 2021](https://improvado.io/blog/clickhouse-warehousing-pricing) | +| [INCREFF](https://www.increff.com/) | Retail Technology | Business Intelligence | — | — | [Meetup Presentation](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup133/Talk%20Track%203%20-%20Scaling%20BI%20at%20Increff%20with%20Clickhouse.pdf) | +| [Inigo](https://inigo.io/) | Software & Technology | GraphQL Gateway | — | — | [Blog, March 2023](https://inigo.io/blog/materialized_views_and_clickhouse) [Blog, June 2023](https://clickhouse.com/blog/harnessing-the-power-of-materialized-views-and-clickhouse-for-high-performance-analytics-at-inigo) | +| [Infobaleen](https://infobaleen.com) | AI markting tool | Analytics | — | — | [Official site](https://infobaleen.com) | +| [Infovista](https://www.infovista.com/) | Networks | Analytics | — | — | [Slides in English, October 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup30/infovista.pdf) | +| [Inngest](https://www.inngest.com/) | Software & Technology | Serverless queues and jobs | — | — | [TechCrunch, July 2023](https://techcrunch.com/2023/07/12/inngest-helps-developers-build-their-backend-workflows-raises-3m/) | +| [InnoGames](https://www.innogames.com) | Games | Metrics, Logging | — | — | [Slides in Russian, September 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup28/graphite_and_clickHouse.pdf) | +| [Instabug](https://instabug.com/) | APM Platform | Main product | — | — | [Blog Post, May 2022](https://clickhouse.com/blog/10x-improved-response-times-cheaper-to-operate-and-30-storage-reduction-why-instabug-chose-clickhouse-for-apm) | +| [Instacart](https://instacart.com/) | Delivery | Data Engineering and Infrastructure | — | — | [Blog Post, May 2022](https://www.instacart.com/company/how-its-made/data-engineering-and-infrastructure-at-instacart-with-engineering-manager-abhi-kalakuntla/) | +| [Instana](https://www.instana.com) | APM Platform | Main product | — | — | [Twitter post](https://twitter.com/mieldonkers/status/1248884119158882304) | +| [Integros](https://integros.com) | Platform for video services | Analytics | — | — | [Slides in Russian, May 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup22/strategies.pdf) | +| [inwt](https://www.inwt-statistics.com/) | Software & Technology | Data Science | — | — | [Blog Post, December 2023](https://www.inwt-statistics.com/blog/business_case_air_pollution_forecast) | +| [Ippon Technologies](https://ippon.tech) | Technology Consulting | — | — | — | [Talk in English, July 2020](https://youtu.be/GMiXCMFDMow?t=205) | +| [Ivi](https://www.ivi.ru/) | Online Cinema | Analytics, Monitoring | — | — | [Article in Russian, Jan 2018](https://habr.com/en/company/ivi/blog/347408/) | +| [Jerry](https://getjerry.com/) | Automotive SaaS | Analytics (Migrate from Redshift) | — | — | [Blog, May 2024](https://juicefs.com/en/blog/user-stories/read-write-separation) | +| [Jinshuju 金数æ®](https://jinshuju.net) | BI Analytics | Main product | — | — | [Slides in Chinese, October 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup24/3.%20金数æ®æ•°æ®æž¶æž„调整方案Public.pdf) | +| [Jitsu](https://jitsu.com) | Cloud Software | Data Pipeline | — | — | [Documentation](https://jitsu.com/docs/destinations-configuration/clickhouse-destination), [Hacker News post](https://news.ycombinator.com/item?id=29106082) | +| [JuiceFS](https://juicefs.com/) | Storage | Shopping Cart | - | - | [Blog](https://juicefs.com/blog/en/posts/shopee-clickhouse-with-juicefs/) | +| [June](https://www.june.so/) | Product analytics | Main product | - | - | [Job post](https://www.ycombinator.com/companies/june/jobs/SHd7fFLYG-founding-engineer) | +| [Juspay](https://juspay.in/) | Software & Technology | Payments | — | — | [Blog, March 2023](https://clickhouse.com/blog/juspay-analyzes-payment-transactions-in-real-time-with-clickhouse) | +| [KGK Global](https://www.kgk-global.com/en/) | Vehicle monitoring | — | — | — | [Press release, June 2021](https://zoom.cnews.ru/news/item/530921) | +| [KMK Online](https://www.kmkonline.co.id/) | Digital Services | Streaming analytics | — | — | ClickHouse Cloud user | +| [Kaiko](https://www.kaiko.com/) | Digital Assets Data Provider | — | — | — | [Job advertisement, April 2022](https://kaiko.talentlyft.com/) | +| [Kakaocorp](https://www.kakaocorp.com/) | Internet company | — | — | — | [if(kakao)2020](https://tv.kakao.com/channel/3693125/cliplink/414129353), [if(kakao)2021](https://if.kakao.com/session/24) | +| [Klaviyo](https://www.klaviyo.com/) | E-Commerce Marketing Automation Platform| — | 128 nodes | — | [Klaviyo Engineering Blog, Jan 2023](https://klaviyo.tech/adaptive-concurrency-control-for-mixed-analytical-workloads-51350439aeec) , [Klaviyo Engineering Blog, July 2023](https://klaviyo.tech/taking-the-first-sip-an-overview-of-klaviyos-segmentation-improvement-project-7db997f36b39) | +| [Knock.app](https://knock.app/) | Software | Notifications management | - | - | [Twitter, 2024](https://twitter.com/cjbell_/status/1759989849577181356)| +| [Kodiak Data](https://www.kodiakdata.com/) | Clouds | Main product | — | — | [Slides in Engish, April 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup13/kodiak_data.pdf) | +| [Kontur](https://kontur.ru) | Software Development | Metrics | — | — | [Talk in Russian, November 2018](https://www.youtube.com/watch?v=U4u4Bd0FtrY) | +| [Kopo Kopo](https://kopokopo.co.ke/) | FinTech | Metrics | — | — | ClickHouse Cloud user | +| [Kuaishou](https://www.kuaishou.com/) | Video | — | — | — | [ClickHouse Meetup, October 2018](https://clickhouse.com/blog/en/2018/clickhouse-community-meetup-in-beijing-on-october-28-2018/) | +| [Kujiale 酷家ä¹](https://www.kujiale.com/) | VR smart interior design platform. | Use in log monitoring platform. | Main cluster is 800+ CPU cores, 4000+ GB RAM. | SSD 140+ TB, HDD 280+ TB. | [Blog, July 2023](https://juejin.cn/post/7251786922615111740/) | +| [Kyligence](https://kyligence.io/) | Managed Service | Main Product | — | — | [Website](https://kyligence.io/all-inclusive-olap/) | +| [LANCOM Systems](https://www.lancom-systems.com/) | Network Solutions | Traffic analysis | - | - | [ClickHouse Operator for Kubernetes](https://www.lancom-systems.com/), [Hacker News post](https://news.ycombinator.com/item?id=29413660) | +| [Langchain](https://www.langchain.com/) | Software & Technology | LLM Monitoring | - | - | [Blog, Apr 2024](https://clickhouse.com/blog/langchain-why-we-choose-clickhouse-to-power-langchain) | +| [Langtrace AI](https://www.langtrace.ai/) | Software & Technology | LLM Monitoring | - | - | [Twitter, May 2024](https://x.com/karthikkalyan90/status/1790483625743716703) | +| [Lago](https://www.getlago.com/) | Billing automation | - | — | — | [GitHub Wiki post](https://github.com/getlago/lago/wiki/How-ClickHouse-saved-our-events-engine-problem) | +| [Lagon](https://lagon.app/) | Software Development | Serverless Functions | — | — | [Twitter, 2023](https://twitter.com/tomlienard/status/1702759256909394010) | +| [Laudspeaker](https://laudspeaker.com/) | Software & Technology | Open Source Messaging | — | — | [GitHub](https://github.com/laudspeaker/laudspeaker) | +| [Lawrence Berkeley National Laboratory](https://www.lbl.gov) | Research | Traffic analysis | 5 servers | 55 TiB | [Slides in English, April 2019](https://www.smitasin.com/presentations/2019-04-17_DOE-NSM.pdf) | +| [Lever](https://www.lever.co/) | Talent Management | Recruiting | - | - | [Hacker News post](https://news.ycombinator.com/item?id=29558544) | +| [LifeStreet](https://lifestreet.com/) | Ad network | Main product | 75 servers (3 replicas) | 5.27 PiB | [Blog post in Russian, February 2017](https://habr.com/en/post/322620/) | +| [LimeChat](https://www.limechat.ai/) | Mobile chat | Whatsapp Commerce | - | - | [LinkedIn 2024](https://www.linkedin.com/pulse/scaling-analytics-clickhouse-story-nikhil-gupta-gezcc/)| +| [LiteLLM](https://github.com/BerriAI/litellm) | Software | API management | | - | [GitHub](https://github.com/BerriAI/litellm/blob/e7b88c2134a013f527304de29358238a5593f91f/cookbook/misc/clickhouse_insert_logs.py#L4) | +| [Little Red Book (Xiaohongshu)](http://www.xiaohongshu.com/) | Social Media | Data warehouse | — | — | [Presentation, March 2023](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup71/LittleRedBook.pdf) | +| [LogfireAI](https://logfire.ai/) | Software & Technology | Monitoring & Observability | — | — | [Twitter, March 2024](https://twitter.com/logfire_ai/status/1765947119200841883) | +| [LogSnag](https://logsnag.com/) | Software & Technology | Realtime Monitoring | — | — | [Interview, December 2022](https://founderbeats.com/shayan-on-building-and-growing-logsnag-as-a-solo-founder) | +| [Logtail](https://betterstack.com/logtail) | Cloud, SaaS | Log Management | - | - | [Official Website](https://betterstack.com/logtail) | +| [Loja Integrada](https://lojaintegrada.com.br/) | E-Commerce | — | — | — | [Case Study, March 2023](https://double.cloud/resources/case-studies/lojaintegrada-and-pagali-switch-to-doublecloud-to-make-running-clickhouse-easier) | +| [Lookforsale](https://lookforsale.ru/) | E-Commerce | — | — | — | [Job Posting, December 2021](https://telegram.me/javascript_jobs/587318) | +| [Loopme](https://loopme.com/) | AdTech | Analytics | — | — | [Blog, Aug 2024](https://clickhouse.com/blog/measuring-brand-impact-how-loopme-uses-clickhouse-to-deliver-better-brand-advertising-outcomes) | +| [Luabase](https://luabase.com/) | Software | Analytics | — | — | [Hacker News, April 2022](https://news.ycombinator.com/item?id=31040190) | +| [Lyft](https://lyft.com) | Rideshare | - | — | — | [Twitter, July 2023](https://twitter.com/riteshvaryani/status/1685160430606639104) | +| [MAXILECT](https://maxilect.com/) | Ad Tech, Blockchain, ML, AI | — | — | — | [Job advertisement, 2021](https://www.linkedin.com/feed/update/urn:li:activity:6780842017229430784/) | +| [MGID](https://www.mgid.com/) | Ad network | Web-analytics | — | — | [Blog post in Russian, April 2020](http://gs-studio.com/news-about-it/32777----clickhouse---c) | +| [MUX](https://mux.com/) | Online Video | Video Analytics | — | — | [Talk in English, August 2019](https://altinity.com/presentations/2019/8/13/how-clickhouse-became-the-default-analytics-database-for-mux/) | +| [Mail.ru Cloud Solutions](https://mcs.mail.ru/) | Cloud services | Main product | — | — | [Article in Russian](https://mcs.mail.ru/help/db-create/clickhouse#) | +| [Marfeel](https://www.marfeel.com/) | Mobile SaaS | — | — | — | Job offer, Apr 2022 | +| [Marilyn](https://tech.mymarilyn.ru) | Advertising | Statistics | — | — | [Talk in Russian, June 2017](https://www.youtube.com/watch?v=iXlIgx2khwc) | +| [MasMovil](https://www.masmovil.es/) | Telecom | Telecom services | - | - | [Blog](https://clickhouse.com/blog/how-grupo-masmovil-monitors-radio-access-networks-with-clickhouse) | +| [Match Systems](https://matchsystems.com/) | Software & Technology | Blockchain Intelligence & AML | — | — | [Job Posting, March 2024](https://telegra-ph.translate.goog/Senior-Database-Administrator-11-28?_x_tr_sl=ru&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp) | +| [Mello](https://mellodesign.ru/) | Marketing | Analytics | 1 server | — | [Article, October 2020](https://vc.ru/marketing/166180-razrabotka-tipovogo-otcheta-skvoznoy-analitiki) | +| [Memfault](https://https://memfault.com/) | Software & Technology | IOT Monitoring | — | — | [Job Listing, August 2023](https://www.ycombinator.com/companies/memfault/jobs/zALzwIe-backend-engineer-systems-data) | +| [cBioPortal](https://www.cbioportal.org/) | Healthcare | Datstore backing portal for cancer genomics | — | — | [NYC Meetup, Dec 2023](https://clickhouse.com/videos/fast-answers-in-cancer-research) | +| [MessageBird](https://www.messagebird.com) | Telecommunications | Statistics | — | — | [Slides in English, November 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup20/messagebird.pdf) | +| [Metoda](https://metoda.com/) | Software & Technology | Advertisting | — | — | [ClickHouse Meetup, September 2022](https://www.youtube.com/watch?v=uS5uA-aZSlQ&t=1770s) | +| [MetricFire](https://www.metricfire.com) | Managed Service | Monitoring | — | — | [Blog, November 2022](https://www.metricfire.com/blog/using-clickhouse-with-metricfire) | +| [Microsoft - Clarity](https://clarity.microsoft.com/) | Web Analytics | Clarity (Main Product) | — | — | [Meetup Video, January 2023](https://www.youtube.com/watch?v=rUVZlquVGw0&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=2) [A question on GitHub](https://github.com/ClickHouse/ClickHouse/issues/21556) | +| [Microsoft - Titan](https://www.microsoft.com/) | Software & Technology | Internal Data Analytics (Titan) | — | — | [Meetup Video, January 2023](https://www.youtube.com/watch?v=r1ZqjU8ZbNs&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=2) | +| [Middleware](https://middleware.io/) | Software | Cloud management | - | - | [SF Meetup, March 2024](https://www.youtube.com/watch?v=xCLMuXJWx80&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=10) | +| [MindsDB](https://www.mindsdb.com/) | Machine Learning | Main Product | — | — | [Official Website](https://www.mindsdb.com/blog/machine-learning-models-as-tables-in-ch) | +| [Modeo](https://modeo.ai/) | Software & Technology | Data Engineering | — | — | [Blog, June 2023](https://clickhouse.com/blog/driving-sustainable-data-management-with-clickhouse-introducing-stash-by-modeo) | +| [moosejs](https://www.moosejs.com/) | Software & Technology | Open-source developer framework | — | — | [Blog Post, May 2024](https://www.fiveonefour.com/blog/product-update-2) | +| [Motodata](https://www.motadata.com/) | Monitoring | Main Product | — | — | [Official Website](https://www.motadata.com/docs) | +| [Muse Group](https://mu.se/) | Music Software | Performance Monitoring | — | — | [Blog post in Russian, January 2021](https://habr.com/en/post/647079/) | +| [MyScale](https://myscale.com/) | Software & Technology | AI Database | — | — | [Docs](https://docs.myscale.com/en/overview/) | +| [NANO Corp](https://nanocorp.fr/en/) | Software & Technology | NOC as a Service | — | — | [Blog Post, July 2022](https://clickhouse.com/blog/from-experimentation-to-production-the-journey-to-supercolumn) | +| [NGINX](https://nginx.com/) | Application Delivery Network | NGINX Management Suite | — | — | [Documentation](https://docs.nginx.com/nginx-management-suite/admin-guides/getting-started/prerequisites/configure-clickhouse/) | +| [NIC Labs](https://niclabs.cl/) | Network Monitoring | RaTA-DNS | — | — | [Blog post, March 2021](https://niclabs.cl/ratadns/2021/03/Clickhouse) | +| [Nixys](https://nixys.io/) | Software & Technology | DevOps, SRE and DevSecOps | — | — | [Blog Post, March 2024](https://habr-com.translate.goog/ru/companies/nixys/articles/801029/?_x_tr_hist=true/ru/companies/nixys/articles/801029/?_x_tr_sl=ru&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp&_x_tr_hist=true) | +| [NLMK](https://nlmk.com/en/) | Steel | Monitoring | — | — | [Article in Russian, Jan 2022](https://habr.com/en/company/nlmk/blog/645943/) | +| [NOC Project](https://getnoc.com/) | Network Monitoring | Analytics | Main Product | — | [Official Website](https://getnoc.com/features/big-data/) | +| [Nansen](https://www.nansen.ai/) | Finance - Crypto | Analytics | — | — | [Press release](https://clickhouse.com/blog/clickhouse-cloud-on-google-cloud-platform-gcp-is-generally-available) | +| [Narrative](https://www.trynarrative.com/) | Software & Technology | AI Automation | — | — | [Hacker News, May 2024](https://news.ycombinator.com/item?id=40225998) | +| [Nationale Databank Wegverkeers](https://www.ndw.nu/) | Software & Technology | Road Traffic Monitoring | — | — | [Presentation at Foss4G, August 2019](https://av.tib.eu/media/43434) | +| [Nebius](https://nebius.com/il/docs/managed-clickhouse/) | SaaS | Main product | — | — | [Official website](https://nebius.com/il/docs/managed-clickhouse/) | +| [Neocom](https://www.neocom.ai/) | AI SaaS | Main product | - | - | [Job listing](https://news.ycombinator.com/item?id=38497724) | +| [Neocom](https://www.neocom.ai/) | Software & Technology | Sales Platform | — | — | [Hacker News, September 2023](https://news.ycombinator.com/item?id=37359122) | +| [NeonDB](https://neon.tech/) | Cloud | Postgres management | - | - | [Blog, 2024](https://double.cloud/resources/case-studies/neon-increases-data-granularity-with-managed-clickhouse/) | +| [NetMeta](https://github.com/monogon-dev/NetMeta/blob/main/README.md) | Observability | Main Product | — | — | [Twitter, December 2022](https://twitter.com/leolukde/status/1605643470239977475) | +| [Netflix](https://www.netflix.com/) | Software & Technology | Video Streaming | — | — | [Twitter, June 2023](https://twitter.com/clickhousedb/status/1673803621220360193) | +| [Netskope](https://www.netskope.com/) | Network Security | — | — | — | [Job advertisement, March 2021](https://www.mendeley.com/careers/job/senior-software-developer-backend-developer-1346348) | +| [Nexpath Networks](https://www.nexpath.net/) | Software & Technology | Network Analysis | — | — | [Slides, September 2021](https://opensips.org/events/Summit-2021Distributed/assets/presentations/2021-jon-abrams-big-telco-data-with-clickhouse.pdf) [Video, September 2021](https://www.youtube.com/watch?v=kyu_wDcO0S4&t=3840s) | +| [NineData](https://www.ninedata.cloud/) | Software & Technology | DMaaS | — | — | ClickHouse Meetup in Hangzhou, May 2024 | +| [Noction](https://www.noction.com) | Network Technology | Main Product | — | — | [Official Website](https://www.noction.com/news/irp-3-11-remote-triggered-blackholing-capability) | +| [Notionlytics](https://notionlytics.com/) | Software & Technology | Page analytics for Notion | — | — | [Twitter, July 2023](https://twitter.com/MaxPrilutskiy/status/1675428469403004928) | +| [Ntop](https://www.ntop.org/) | Network Monitoning | Monitoring | — | — | [Official website, January 2022](https://www.ntop.org/ntop/historical-traffic-analysis-at-scale-using-clickhouse-with-ntopng/) | +| [Nuna Inc.](https://www.nuna.com/) | Health Data Analytics | — | — | — | [Talk in English, July 2020](https://youtu.be/GMiXCMFDMow?t=170) | +| [Nutanix](https://www.nutanix.com/) | Software & Technology | Main Product | — | — | [Slides, March 2024](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup102/2-Unified_data_platform_with_clickhouse_by_Sachidanad_Gaurav_Nutanix.pdf) | +| [Oden](https://oden.io/) | Software & Technology | Manufacturing | — | — | [Meetup, April 2023](https://www.youtube.com/watch?v=pAKGJDOO6lo) | +| [Odoscope](https://www.odoscope.com/) | Software & Technology | Customer Engagement Platform | — | — | [Awards Submission, February 2023](https://ecommercegermanyawards.com/vote/164051) | +| [Ok.ru](https://ok.ru) | Social Network | — | 72 servers | 810 TB compressed, 50bn rows/day, 1.5 TB/day | [SmartData conference, October 2021](https://assets.ctfassets.net/oxjq45e8ilak/4JPHkbJenLgZhBGGyyonFP/57472ec6987003ec4078d0941740703b/____________________ClickHouse_______________________.pdf) | +| [Omnicomm](https://omnicomm.ru/) | Transportation Monitoring | — | — | — | [Facebook post, October 2021](https://www.facebook.com/OmnicommTeam/posts/2824479777774500) | +| [OneAPM](https://www.oneapm.com/) | Monitoring and Data Analysis | Main product | — | — | [Slides in Chinese, October 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup19/8.%20clickhouse在OneAPM的应用%20æœé¾™.pdf) | +| [OneUptime](https://oneuptime.com/) | Observability platform | Analytics | — | — | [GitHub repository](https://github.com/OneUptime/oneuptime) | +| [Onepixel.link](https://onepixel.link/) | Software | URL shorterner | - | - | [Twitter, 2024](https://twitter.com/championswimmer/status/1759195487134220415) | +| [Ongage](https://www.ongage.com/) | Marketing | Analytics | — | — | [Blog](https://clickhouse.com/blog/ongages-strategic-shift-to-clickhouse-for-real-time-email-marketing) | +| [Ookla](https://www.ookla.com/) | Software & Technology | Network Intelligence | — | — | [Presentation at J on the Beach, June 2023](https://www.youtube.com/watch?v=OZ0XpfDM8J0) | +| [OONI](https://ooni.org/) | Open Observatory of Network Interference (OONI) | Main product | — | — | [Blog, May 2023]( https://clickhouse.com/blog/ooni-analyzes-internet-censorship-data-with-clickhouse)[Twitter August 2022](https://twitter.com/OpenObservatory/status/1558014810746265600?s=20&t=hvcDU-LIrgCApP0rZCzuoA) | +| [Open Targets](https://www.opentargets.org/) | Genome Research | Genome Search | — | — | [Twitter, October 2021](https://twitter.com/OpenTargets/status/1452570865342758913?s=20), [Blog](https://blog.opentargets.org/graphql/) | +| [OpenLIT](https://openlit.io/) | Software & Technology | OTEL Monitoring with AI | — | — | [GitHub](https://github.com/openlit/openlit) | +| [OpenMeter](https://openmeter.io) | Expense Management | Main product | — | — | [Offical blog post, 2023](https://openmeter.io/blog/how-openmeter-uses-clickhouse-for-usage-metering#heading-querying-historical-usage) | +| [OpenReplay](https://openreplay.com/) | Product Analytics | Session Replay | — | — | [Docs](https://docs.openreplay.com/en/deployment/openreplay-admin/) | +| [Opensee](https://opensee.io/) | Financial Analytics | Main product | - | - | [Blog Post, February 2022](https://clickhouse.com/blog/opensee-analyzing-terabytes-of-financial-data-a-day-with-clickhouse/) [Blog Post, December 2021](https://opensee.io/news/from-moscow-to-wall-street-the-remarkable-journey-of-clickhouse/) | +| [Oppo](https://www.oppo.com/cn/) | Hardware | Consumer Electronics Company | — | — | ClickHouse Meetup in Chengdu, April 2024 | +| [OpsVerse](https://opsverse.io/) | Observability | — | — | — | [Twitter, 2022](https://twitter.com/OpsVerse/status/1584548242100219904) | +| [Opstrace](https://opstrace.com/) | Observability | — | — | — | [Source code](https://gitlab.com/gitlab-org/opstrace/jaeger-clickhouse/-/blob/main/README.md) | +| [Oxide](https://oxide.computer/) | Hardware & Software | Server Control Plane | — | — | [GitHub Repository](https://github.com/oxidecomputer/omicron) | +| [OZON](https://corp.ozon.com/) | E-commerce | — | — | — | [Official website](https://job.ozon.ru/vacancy/razrabotchik-clickhouse-ekspluatatsiya-40991870/) | +| [PITS Globale Datenrettungsdienste](https://www.pitsdatenrettung.de/) | Data Recovery | Analytics | — | — | | +| [PRANA](https://prana-system.com/en/) | Industrial predictive analytics | Main product | — | — | [News (russian), Feb 2021](https://habr.com/en/news/t/541392/) | +| [Pace](https://www.paceapp.com/) | Marketing & Sales | Internal app | — | — | ClickHouse Cloud user | +| [Panelbear](https://panelbear.com/) | Analytics | Monitoring and Analytics | — | — | [Tech Stack, November 2020](https://panelbear.com/blog/tech-stack/) | +| [Papermark](https://www.papermark.io/) | Software & Technology | Document Sharing & Analytics | — | — | [Twitter, September 2023](https://twitter.com/mfts0/status/1698670144367567263) | +| [Percent 百分点](https://www.percent.cn/) | Analytics | Main Product | — | — | [Slides in Chinese, June 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup24/4.%20ClickHouse万亿数æ®åŒä¸­å¿ƒçš„设计与实践%20.pdf) | +| [Percona](https://www.percona.com/) | Performance analysis | Percona Monitoring and Management | — | — | [Official website, Mar 2020](https://www.percona.com/blog/2020/03/30/advanced-query-analysis-in-percona-monitoring-and-management-with-direct-clickhouse-access/) | +| [Phare](https://phare.io/) | Uptime Monitoring | Main Product | — | — | [Official website, Aug 2023](https://phare.io/changelog/monthly-changelog-13) | +| [PheLiGe](https://phelige.com/about) | Software & Technology | Genetic Studies | — | — | [Academic Paper, November 2020](https://academic.oup.com/nar/article/49/D1/D1347/6007654?login=false) | +| [PingCAP](https://pingcap.com/) | Analytics | Real-Time Transactional and Analytical Processing | - | - | [GitHub, TiFlash/TiDB](https://github.com/pingcap/tiflash) | +| [Pirsch](https://pirsch.io/) | Software & Technology | Web Analytics | — | — | [Hacker News, April 2023](https://news.ycombinator.com/item?id=35692201) | +| [Piwik PRO](https://piwik.pro/) | Web Analytics | — | — | — | [Official website, Dec 2018](https://piwik.pro/blog/piwik-pro-clickhouse-faster-efficient-reports/) | +| [Plane](https://plane.so/)| Software & Technology | Project Management | — | — | [Twitter, September 2023](https://twitter.com/vamsi_kurama/status/1699593472704176441) | +| [Plausible](https://plausible.io/) | Analytics | Main Product | — | — | [Blog Post, December 2021](https://clickhouse.com/blog/plausible-analytics-uses-click-house-to-power-their-privacy-friendly-google-analytics-alternative) [Twitter, June 2020](https://twitter.com/PlausibleHQ/status/1273889629087969280) | +| [PoeticMetric](https://www.poeticmetric.com/) | Metrics | Main Product | — | — | Community Slack, April 2022 | +| [Portkey AI](https://portkey.ai/) | LLMOps | Main Product | — | — | [LinkedIn post, August 2023](https://www.linkedin.com/feed/update/urn:li:activity:7094676373826330626/) | +| [PostHog](https://posthog.com/) | Product Analytics | Main Product | — | — | [Release Notes, October 2020](https://posthog.com/blog/the-posthog-array-1-15-0), [Blog, November 2021](https://posthog.com/blog/how-we-turned-clickhouse-into-our-eventmansion) | +| [Postmates](https://postmates.com/) | Delivery | — | — | — | [Talk in English, July 2020](https://youtu.be/GMiXCMFDMow?t=188) | +| [Pragma Innovation](http://www.pragma-innovation.fr/) | Telemetry and Big Data Analysis | Main product | — | — | [Slides in English, October 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup18/4_pragma_innovation.pdf) | +| [Prefect](https://www.prefect.io/) | Software & Technology | Main Product | — | — | [Blog, May 2024](https://clickhouse.com/blog/prefect-event-driven-workflow-orchestration-powered-by-clickhouse) | +| [Propel](https://www.propeldata.com/) | Analytics | Main product | — | — | [Blog, January 2024](https://www.propeldata.com/blog/how-to-store-json-in-clickhouse-the-right-way) | +| [Property Finder](https://www.propertyfinder.com/) | Real Estate | - | — | — | ClickHouse Cloud user | +| [QINGCLOUD](https://www.qingcloud.com/) | Cloud services | Main product | — | — | [Slides in Chinese, October 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup19/4.%20Cloud%20%2B%20TSDB%20for%20ClickHouse%20å¼ å¥%20QingCloud.pdf) | +| [Qrator](https://qrator.net) | DDoS protection | Main product | — | — | [Blog Post, March 2019](https://blog.qrator.net/en/clickhouse-ddos-mitigation_37/) | +| [Qualified](https://www.qualified.com/) | Sales Pipeline Management | Data and Messaging layers | — | — | [Job posting, Nov 2022](https://news.ycombinator.com/item?id=33425109) | +| [Qube Research & Technologies](https://www.qube-rt.com/) | FinTech | Analysis | — | — | ClickHouse Cloud user | +| [QuickCheck](https://quickcheck.ng/) | FinTech | Analytics | — | — | [Blog post, May 2022](https://clickhouse.com/blog/how-quickcheck-uses-clickhouse-to-bring-banking-to-the-unbanked/) | +| [R-Vision](https://rvision.pro/en/) | Information Security | — | — | — | [Article in Russian, December 2021](https://www.anti-malware.ru/reviews/R-Vision-SENSE-15) | +| [RELEX](https://relexsolutions.com) | Supply Chain Planning | Forecasting | — | — | [Meetup Video, December 2022](https://www.youtube.com/watch?v=wyOSMR8l-DI&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=16) [Slides, December 2022](https://presentations.clickhouse.com/meetup65/CRUDy%20OLAP.pdf) | +| [Raiffeisenbank](https://www.rbinternational.com/) | Banking | Analytics | — | — | [Lecture in Russian, December 2020](https://cs.hse.ru/announcements/421965599.html) | +| [Railway](https://railway.app/) | Software & Technology | PaaS Software Tools | — | — | [Changelog, May 2023](https://railway.app/changelog/2023-05-19-horizontal-scaling#logs-are-getting-faster) | +| [Rambler](https://rambler.ru) | Internet services | Analytics | — | — | [Talk in Russian, April 2018](https://medium.com/@ramblertop/разработка-api-clickhouse-длÑ-рамблер-топ-100-f4c7e56f3141) | +| [Ramp](https://ramp.com/) | Financial Services | Real-Time Analytics, Fraud Detection | — | — | [NYC Meetup, March 2024](https://www.youtube.com/watch?v=7BtUgUb4gCs) | +| [Rapid Delivery Analytics](https://rda.team/) | Retail | Analytics | — | — | ClickHouse Cloud user | +| [Releem](https://releem.com/) | Databases | MySQL management| - | - | [Blog 2024](https://releem.com/blog/whats-new-at-releem-june-2023) | +| [Replica](https://replicahq.com) | Urban Planning | Analytics | — | — | [Job advertisement](https://boards.greenhouse.io/replica/jobs/5547732002?gh_jid=5547732002) | +| [Request Metrics](https://requestmetrics.com/) | Software & Technology | Observability | — | — | [Hacker News, May 2023](https://news.ycombinator.com/item?id=35982281) | +| [Resmo](https://replicahq.com) | Software & Technology | Cloud Security & Asset Management | 1 c7g.xlarge node, +| [Retell](https://retell.cc/) | Speech synthesis | Analytics | — | — | [Blog Article, August 2020](https://vc.ru/services/153732-kak-sozdat-audiostati-na-vashem-sayte-i-zachem-eto-nuzhno) | +| [Rivet](https://rivet.gg/) | Software & Technology | Gamer Server Scaling | — | — | [HackerNews, August 2023](https://news.ycombinator.com/item?id=37188659) | +| [Rokt](https://www.rokt.com/) | Software & Technology | eCommerce | — | — | [Meetup Video, December 2022](https://www.youtube.com/watch?v=BEP07Edor-0&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=10) [Slides, December 2022](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup67/Building%20the%20future%20of%20reporting%20at%20Rokt.pdf) | +| [Rollbar](https://www.rollbar.com) | Software Development | Main Product | — | — | [Official Website](https://www.rollbar.com) | +| [Rspamd](https://rspamd.com/) | Antispam | Analytics | — | — | [Official Website](https://rspamd.com/doc/modules/clickhouse.html) | +| [RuSIEM](https://rusiem.com/en) | SIEM | Main Product | — | — | [Official Website](https://rusiem.com/en/products/architecture) | +| [RunReveal](https://runreveal.com/) | SIEM | Main Product | — | — | [SF Meetup, Nov 2023](https://www.youtube.com/watch?v=rVZ9JnbzHTQ&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=25) | +| [S7 Airlines](https://www.s7.ru) | Airlines | Metrics, Logging | — | — | [Talk in Russian, March 2019](https://www.youtube.com/watch?v=nwG68klRpPg&t=15s) | +| [SEMrush](https://www.semrush.com/) | Marketing | Main product | — | — | [Slides in Russian, August 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup17/5_semrush.pdf) | +| [SESCO Trading](https://www.sescotrading.com/) | Financial | Analysis | — | — | ClickHouse Cloud user | +| [SGK](http://www.sgk.gov.tr/wps/portal/sgk/tr) | Government Social Security | Analytics | — | — | [Slides in English, November 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup35/ClickHouse%20Meetup-Ramazan%20POLAT.pdf) | +| [SMI2](https://smi2.ru/) | News | Analytics | — | — | [Blog Post in Russian, November 2017](https://habr.com/ru/company/smi2/blog/314558/) | +| [SQLPad](https://getsqlpad.com/en/introduction/) | Software & Technology | Web-based SQL editor. | — | — | [GitHub, March 2023](https://github.com/sqlpad/sqlpad/blob/master/server/package.json#L43) | +| [Santiment](https://www.santiment.net) | Behavioral analytics for the crypto market | Main Product | — | — | [Github repo](https://github.com/santiment/sanbase2) | +| [Sber](https://www.sberbank.com/index) | Banking, Fintech, Retail, Cloud, Media | — | 128 servers | >1 PB | [Job advertisement, March 2021](https://career.habr.com/vacancies/1000073536) | +| [Scale8](https://scale8.com) | Tag Management and Analytics | Main product | - | - | [Source Code](https://github.com/scale8/scale8) | +| [Scarf](https://about.scarf.sh/) | Open source analytics | Main product | - | - | [Tweet](https://x.com/avi_press/status/1803954179179974747) | +| [Scireum GmbH](https://www.scireum.de/) | e-Commerce | Main product | — | — | [Talk in German, February 2020](https://www.youtube.com/watch?v=7QWAn5RbyR4) | +| [ScrapingBee](https://www.scrapingbee.com/) | Software & Technology | Web scraping API | — | — | [Twitter, January 2024](https://twitter.com/PierreDeWulf/status/1745464855723986989) | +| [ScratchDB](https://scratchdb.com/) | Software & Technology | Serverless Analytics | — | — | [GitHub](https://github.com/scratchdata/ScratchDB) | +| [Segment](https://segment.com/) | Data processing | Main product | 9 * i3en.3xlarge nodes 7.5TB NVME SSDs, 96GB Memory, 12 vCPUs | — | [Slides, 2019](https://slides.com/abraithwaite/segment-clickhouse) | +| [sembot.io](https://sembot.io/) | Shopping Ads | — | — | — | A comment on LinkedIn, 2020 | +| [Sendinblue](https://www.sendinblue.com/) | Software & Technology | Segmentation | 100 nodes | — | [Blog, February 2023](https://engineering.sendinblue.com/segmentation-to-target-the-right-audience/) | +| [Sentio](https://www.sentio.xyz/) | Software & Technology | Observability | — | — | [Twitter, April 2023](https://twitter.com/qiaokan/status/1650736518955438083) | +| [Sentry](https://sentry.io/) | Software Development | Main product | — | — | [Blog Post in English, May 2019](https://blog.sentry.io/2019/05/16/introducing-snuba-sentrys-new-search-infrastructure) | +| [seo.do](https://seo.do/) | Analytics | Main product | — | — | [Slides in English, November 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup35/CH%20Presentation-%20Metehan%20Çetinkaya.pdf) | +| [Serverless](https://www.serverless.com/) | Serverless Apps | Metrics | — | — | ClickHouse Cloud user | +| [ServiceNow](https://www.servicenow.com/) | Managed Services | Qualitative Mobile Analytics | — | — | [Meetup Video, January 2023](https://www.youtube.com/watch?v=b4Pmpx3iRK4&list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U&index=6) [Slides, January 2023](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup68/Appsee%20Remodeling%20-%20ClickHouse.pdf) | +| [Sewer AI](https://www.sewerai.com/) | Software & Technology | - | — | — | ClickHouse Cloud user | +| [Shopee](https://www.shopee.com/) | E-Commerce | Distributed Tracing | - | - | [Meetup Video, April 2024](https://youtu.be/_BVy-V2wy9s?feature=shared) [Slides, April 2024](https://github.com/ClickHouse/clickhouse-presentations/blob/2b0ef2914ff594c0a0f8800d5150e5b31323be98/meetup105/Shopee%20-%20Distributed%20Tracing%20in%20ClickHouse.pdf) [Blog Post, June 2024](https://clickhouse.com/blog/seeing-the-big-picture-shopees-journey-to-distributed-tracing-with-clickhouse) | +| [SigNoz](https://signoz.io/) | Observability Platform | Main Product | — | — | [Source code](https://github.com/SigNoz/signoz) | +| [Sina](http://english.sina.com/index.html) | News | — | — | — | [Slides in Chinese, October 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup19/6.%20ClickHouse最佳实践%20高é¹_新浪.pdf) | +| [Sinch](https://www.sinch.com/) | Software & Technology | Customer Communications Cloud | — | — | [HackerNews, May 2023](https://news.ycombinator.com/item?id=36042104) | +| [Sipfront](https://www.sipfront.com/) | Software Development | Analytics | — | — | [Twitter, October 2021](https://twitter.com/andreasgranig/status/1446404332337913895?s=20) | +| [SiteBehaviour Analytics](https://www.sitebehaviour.com/) | Software| Analytics | - | - | [Twitter, 2024](https://twitter.com/developer_jass/status/1763023792970883322)| +| [slido](https://www.slido.com/) | Software & Technology | Q&A and Polling | — | — | [Meetup, April 2023](https://www.linkedin.com/events/datameetup-3-spotlightondataeng7048914766324473856/about/) | +| [Solarwinds](https://www.solarwinds.com/) | Software & Technology | Main product | — | — | [Talk in English, March 2018](https://www.youtube.com/watch?v=w8eTlqGEkkw) | +| [Sonrai Security](https://sonraisecurity.com/) | Cloud Security | - | — | — | Slack comments | +| [Spark New Zealand](https://www.spark.co.nz/) | Telecommunications | Security Operations | — | — | [Blog Post, Feb 2020](https://blog.n0p.me/2020/02/2020-02-05-dnsmonster/) | +| [Spec](https://www.specprotected.com/) | Software & Technology | Online Fraud Detection | — | — | [HackerNews, August 2023](https://news.ycombinator.com/item?id=36965317) +| [spectate](https://spectate.net/)| Software & Technology | Monitoring & Incident Management | — | — | [Twitter, August 2023](https://twitter.com/BjarnBronsveld/status/1700458569861112110) | +| [Splio](https://splio.com/en/) | Software & Technology | Individuation Marketing | — | — | [Slack, September 2023](https://clickhousedb.slack.com/archives/C04N3AU38DV/p1693995069023669) | +| [Splitbee](https://splitbee.io) | Analytics | Main Product | — | — | [Blog Post, Mai 2021](https://splitbee.io/blog/new-pricing) | +| [Splunk](https://www.splunk.com/) | Business Analytics | Main product | — | — | [Slides in English, January 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup12/splunk.pdf) | +| [Spotify](https://www.spotify.com) | Music | Experimentation | — | — | [Slides, July 2018](https://www.slideshare.net/glebus/using-clickhouse-for-experimentation-104247173) | +| [Staffbase](https://staffbase.com/en/) | Software & Technology | Internal Communications | — | — | [ClickHouse Slack, April 2023](https://clickhousedb.slack.com/archives/C04N3AU38DV/p1682781081062859) | +| [Staffcop](https://www.staffcop.ru/) | Information Security | Main Product | — | — | [Official website, Documentation](https://www.staffcop.ru/sce43) | +| [Statsig](https://statsig.com/) | Software & Technology | Real-time analytics | — | — | [Video](https://clickhouse.com/videos/statsig) | +| [Streamkap](https://streamkap.com/) | Data Platform | - | — | — | [Video](https://clickhouse.com/videos/switching-from-elasticsearch-to-clickhouse) | +| [Suning](https://www.suning.com/) | E-Commerce | User behaviour analytics | — | — | [Blog article](https://www.sohu.com/a/434152235_411876) | +| [Superology](https://superology.com/) | Software & Technology | Customer Analytics | — | — | [Blog Post, June 2022](https://clickhouse.com/blog/collecting-semi-structured-data-from-kafka-topics-using-clickhouse-kafka-engine) | +| [Superwall](https://superwall.me/) | Monetization Tooling | Main product | — | — | [Word of mouth, Jan 2022](https://github.com/ClickHouse/ClickHouse/pull/33573) | +| [SwarmFarm Robotics](https://www.swarmfarm.com/) | Agriculture & Technology | Main Product | — | — | [Meetup Slides](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup122/Talk%20Track%202%20-%20Harvesting%20Big%20Data%20at%20SwarmFarm%20Robotics%20-%20Angus%20Ross.pdf) | +| [Swetrix](https://swetrix.com) | Analytics | Main Product | — | — | [Source code](https://github.com/swetrix/swetrix-api) | +| [Swift Navigation](https://www.swiftnav.com/) | Geo Positioning | Data Pipelines | — | — | [Job posting, Nov 2022](https://news.ycombinator.com/item?id=33426590) | +| [Synerise](https://synerise.com/) | ML&AI | Feature Store | - | - | [Presentation, April 2020](https://www.slideshare.net/AndrzejMichaowski/feature-store-solving-antipatterns-in-mlsystems-232829863) | +| [Synpse](https://synpse.net/) | Application Management | Main Product | - | - | [Twitter, January 2022](https://twitter.com/KRusenas/status/1483571168363880455) | +| [Synq](https://www.synq.io) | Software & Technology | Main Product | — | — | [Blog Post, July 2023](https://clickhouse.com/blog/building-a-unified-data-platform-with-clickhouse) | +| [sumsub](https://sumsub.com/) | Software & Technology | Verification platform | — | — | [Meetup, July 2022](https://www.youtube.com/watch?v=F74bBGSMwGo) | +| [TURBOARD](https://www.turboard.com/) | BI Analytics | — | — | — | [Official website](https://www.turboard.com/blogs/clickhouse) | +| [TeamApt](https://www.teamapt.com/) | FinTech | Data Processing | — | — | [Official Website](https://www.teamapt.com/) | +| [Teamtailor](https://www.teamtailor.com/en/) | Recruitment Software | - | — | — | ClickHouse Cloud user | +| [Tekion](https://tekion.com/) | Automotive Retail | Clickstream Analytics | — | — | [Blog Post, June 2024](https://clickhouse.com/blog/tekion-adopts-clickhouse-cloud-to-power-application-performance-and-metrics-monitoring) | +| [Tencent Music Entertainment (TME)](https://www.tencentmusic.com/) | BigData | Data processing | — | — | [Blog in Chinese, June 2020](https://cloud.tencent.com/developer/article/1637840) | +| [Tencent](https://www.tencent.com) | Big Data | Data processing | — | — | [Slides in Chinese, October 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup19/5.%20ClickHouse大数æ®é›†ç¾¤åº”用_æŽä¿Šé£žè…¾è®¯ç½‘媒事业部.pdf) | +| [Tencent](https://www.tencent.com) | Messaging | Logging | — | — | [Talk in Chinese, November 2019](https://youtu.be/T-iVQRuw-QY?t=5050) | +| [Teralytics](https://www.teralytics.net/) | Mobility | Analytics | — | — | [Tech blog](https://www.teralytics.net/knowledge-hub/visualizing-mobility-data-the-scalability-challenge) | +| [Tesla](https://www.tesla.com/) | Electric vehicle and clean energy company | — | — | — | [Vacancy description, March 2021](https://news.ycombinator.com/item?id=26306170) | +| [The Guild](https://the-guild.dev/) | API Platform | Monitoring | — | — | [Blog Post, November 2022](https://clickhouse.com/blog/100x-faster-graphql-hive-migration-from-elasticsearch-to-clickhouse) [Blog](https://the-guild.dev/blog/graphql-hive-and-clickhouse) | +| [Theia](https://theia.so/) | Software & Technology | Threat Intelligence | — | — | [Twitter, July 2023](https://twitter.com/jreynoldsdev/status/1680639586999980033) | +| [ThirdWeb](https://thirdweb.com/) | Software & Technology | Blockchain analysis | — | — | ClickHouse Cloud user | +| [Timeflow](https://timeflow.systems) | Software | Analytics | — | — | [Blog](https://timeflow.systems/why-we-moved-from-druid-to-clickhouse/ ) | +| [Timeplus](https://www.timeplus.com/) | Software & Technology | Streaming Analytics | — | — | [Meetup, August 2023](https://www.meetup.com/clickhouse-silicon-valley-meetup-group/events/294472987/) | +| [Tinybird](https://www.tinybird.co/) | Real-time Data Products | Data processing | — | — | [Official website](https://www.tinybird.co/) | +| [TrackingPlan](https://www.trackingplan.com/) | Marketing & Sales | Monitoring | — | — | ClickHouse Cloud user | +| [Traffic Stars](https://trafficstars.com/) | AD network | — | 300 servers in Europe/US | 1.8 PiB, 700 000 insert rps (as of 2021) | [Slides in Russian, May 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup15/lightning/ninja.pdf) | +| [Trillabit](https://www.trillabit.com/home) | Software & Technology | Business Intelligence | — | — | [Blog, January 2023](https://clickhouse.com/blog/trillabit-utilizes-the-power-of-clickhouse-for-fast-scalable-results-within-their-self-service-search-driven-analytics-offering) | +| [Trip.com](https://trip.com/) | Travel Services | Logging | — | — | [Meetup, March 2023](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup71/Trip.com.pdf) | +| [Turkcell](https://www.turkcell.com.tr/) | Telecom | BI Analytics | 2 nodes | 2TB per day, 100TB in total | [YouTube Video](https://www.youtube.com/watch?v=ckvPBgXl82Q) | +| [Tweeq](https://tweeq.sa/en) | Fintech | Spending Account | - | - | [Engineering Blog, May 2024](https://engineering.tweeq.sa/tweeq-data-platform-journey-and-lessons-learned-clickhouse-dbt-dagster-and-superset-fa27a4a61904) | +| [URLsLab](https://www.urlslab.com/) | Software & Technology | WordPress Plugin | — | — | [Twitter, July 2023](https://twitter.com/Yasha_br/status/1680224776302784514) , [Twitter, September 2023](https://twitter.com/Yasha_br/status/1698724654339215812) | +| [UTMSTAT](https://hello.utmstat.com/) | Analytics | Main product | — | — | [Blog post, June 2020](https://vc.ru/tribuna/133956-striming-dannyh-iz-servisa-skvoznoy-analitiki-v-clickhouse) | +| [Uber](https://www.uber.com) | Taxi | Logging | — | — | [Slides, February 2020](https://presentations.clickhouse.com/meetup40/uber.pdf) | +| [Uptrace](https://uptrace.dev/) | Software | Tracing Solution | — | — | [Official website, March 2021](https://uptrace.dev/open-source/) | +| [UseTech](https://usetech.com/) | Software Development | — | — | — | [Job Posting, December 2021](https://vk.com/wall136266658_2418) | +| [Usermaven](https://usermaven.com/) | Product Analytics | Main Product | — | — | [HackerNews, January 2023](https://news.ycombinator.com/item?id=34404706) | +| [VKontakte](https://vk.com) | Social Network | Statistics, Logging | — | — | [Slides in Russian, August 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup17/3_vk.pdf) | +| [VKontech](https://vkontech.com/) | Distributed Systems | Migrating from MongoDB | - | - | [Blog, January 2022](https://vkontech.com/migrating-your-reporting-queries-from-a-general-purpose-db-mongodb-to-a-data-warehouse-clickhouse-performance-overview/) | +| [VMware](https://www.vmware.com/) | Cloud | VeloCloud, SDN | — | — | [Product documentation](https://docs.vmware.com/en/vRealize-Operations-Manager/8.3/com.vmware.vcom.metrics.doc/GUID-A9AD72E1-C948-4CA2-971B-919385AB3CA8.html) | +| [Valueleaf Services Pvt.Ltd](http://valueleaf.com/) | Software & Technology | Martech platform, Ads platform and Loan aggregator platform | — | — | [ClickHouse Slack, April 2023](https://clickhousedb.slack.com/archives/C04N3AU38DV/p1681122299263959) | +| [Vantage](https://www.vantage.sh/) | Software & Technology | Cloud Cost Management | — | — | [Meetup, April 2023](https://www.youtube.com/watch?v=gBgXcHM_ldc) , [ClickHouse Blog, June 2023](https://clickhouse.com/blog/nyc-meetup-report-vantages-journey-from-redshift-and-postgres-to-clickhouse) | +| [Velvet](https://www.usevelvet.com/) | Database management | Main product | - | - | [Job listing](https://news.ycombinator.com/item?id=38492272) | +| [Vercel](https://vercel.com/) | Traffic and Performance Analytics | — | — | — | Direct reference, October 2021 | +| [Vexo](https://www.vexo.co/) | App development | Analytics | — | — | [Twitter, December 2023](https://twitter.com/FalcoAgustin/status/1737161334213546279) | +| [Vidazoo](https://www.vidazoo.com/) | Advertising | Analytics | — | — | ClickHouse Cloud user | +| [Vimeo](https://vimeo.com/) | Video hosting | Analytics | - | - | [Blog post](https://medium.com/vimeo-engineering-blog/clickhouse-is-in-the-house-413862c8ac28) | +| [Visiology](https://visiology.com/) | Business intelligence | Analytics | - | - | [Company website](https://visiology.com/) | +| [Voltmetrix](https://voltmetrix.com/) | Database management | Main product | - | - | [Blog post](https://voltmetrix.com/blog/voltmetrix-iot-manufacturing-use-case/) | +| [Voltus](https://www.voltus.co/) | Energy | — | — | — | [Blog Post, Aug 2022](https://medium.com/voltus-engineering/migrating-kafka-to-amazon-msk-1f3a7d45b5f2) | +| [W3 Analytics](https://w3analytics.hottoshotto.com/) | Blockchain | Dashboards for NFT analytics | — | — | [Community Slack, July 2023](https://clickhousedb.slack.com/archives/CU170QE9H/p1689907164648339) | +| [WSPR Live](https://wspr.live/) | Software & Technology | WSPR Spot Data | — | — | [Twitter, April 2023](https://twitter.com/HB9VQQ/status/1652723207475015680) | +| [Waitlyst](https://waitlyst.co/) | Software & Technology | AI Customer Journey Management | — | — | [Twitter, June 2023](https://twitter.com/aaronkazah/status/1668261900554051585) | +| [Walmart Labs](https://www.walmartlabs.com/) | Internet, Retail | — | — | — | [Talk in English, July 2020](https://youtu.be/GMiXCMFDMow?t=144) | +| [WanShanData](http://wanshandata.com/home) | Software & Technology | Main Product | — | — | [Meetup Slides in Chinese](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup56/wanshandata.pdf) | +| [Wargaming](https://wargaming.com/en/) | Games | | — | — | [Interview](https://habr.com/en/post/496954/) | +| [WebGazer](https://www.webgazer.io/) | Uptime Monitoring | Main Product | — | — | Community Slack, April 2022 | +| [Weights & Biases](https://wandb.ai/site) | Software & Technology | LLM Monitoring | — | — | [Twitter, April 2024](https://x.com/ClickHouseDB/status/1780264997228011986) | +| [Wildberries](https://www.wildberries.ru/) | E-commerce | | — | — | [Official website](https://it.wildberries.ru/) | +| [Wisebits](https://wisebits.com/) | IT Solutions | Analytics | — | — | [Slides in Russian, May 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup22/strategies.pdf) | +| [Workato](https://www.workato.com/) | Automation Software | — | — | — | [Talk in English, July 2020](https://youtu.be/GMiXCMFDMow?t=334) | +| [Wowza](https://www.wowza.com/) | Video Platform | Streaming Analytics | — | — | ClickHouse Cloud user | +| [Wundergraph](https://wundergraph.com/) | Software & Technology | API Platform | — | — | [Twitter, February 2023](https://twitter.com/dustindeus/status/1628757807913750531) | +| [Xata](https://xata.io/) | Software & Technology | SaaS observability dashboard | — | — | [Twitter, March 2024](https://x.com/tudor_g/status/1770517054971318656) | +| [Xenoss](https://xenoss.io/) | Martech, Adtech development | — | — | — | [Official website](https://xenoss.io/big-data-solution-development)| +| [Xiaoxin Tech](http://www.xiaoxintech.cn/) | Education | Common purpose | — | — | [Slides in English, November 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup33/sync-clickhouse-with-mysql-mongodb.pptx) | +| [Ximalaya](https://www.ximalaya.com/) | Audio sharing | OLAP | — | — | [Slides in English, November 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup33/ximalaya.pdf) | +| [YTsaurus](https://ytsaurus.tech/) | Distributed Storage and Processing | Main product | - | - | [Main website](https://ytsaurus.tech/) | +| [Yandex Cloud](https://cloud.yandex.ru/services/managed-clickhouse) | Public Cloud | Main product | — | — | [Talk in Russian, December 2019](https://www.youtube.com/watch?v=pgnak9e_E0o) | +| [Yandex DataLens](https://cloud.yandex.ru/services/datalens) | Business Intelligence | Main product | — | — | [Slides in Russian, December 2019](https://presentations.clickhouse.com/meetup38/datalens.pdf) | +| [Yandex Market](https://market.yandex.ru/) | e-Commerce | Metrics, Logging | — | — | [Talk in Russian, January 2019](https://youtu.be/_l1qP0DyBcA?t=478) | +| [Yandex Metrica](https://metrica.yandex.com) | Web analytics | Main product | 630 servers in one cluster, 360 servers in another cluster, 1862 servers in one department | 133 PiB / 8.31 PiB / 120 trillion records | [Slides, February 2020](https://presentations.clickhouse.com/meetup40/introduction/#13) | +| [Yellowfin](https://www.yellowfinbi.com) | Analytics | Main product | - | - | [Integration](https://www.yellowfinbi.com/campaign/yellowfin-9-whats-new#el-30219e0e) | +| [Yotascale](https://www.yotascale.com/) | Cloud | Data pipeline | — | 2 bn records/day | [LinkedIn (Accomplishments)](https://www.linkedin.com/in/adilsaleem/) | +| [Your Analytics](https://www.your-analytics.org/) | Product Analytics | Main Product | — | - | [Twitter, November 2021](https://twitter.com/mikenikles/status/1459737241165565953) | +| [Zagrava Trading](https://zagravagames.com/en/) | — | — | — | — | [Job offer, May 2021](https://twitter.com/datastackjobs/status/1394707267082063874) | +| [Zappi](https://www.zappi.io/web/) | Software & Technology | Market Research | — | — | [Twitter Post, June 2024](https://x.com/HermanLangner/status/1805870318218580004)) | +| [Zerodha](https://zerodha.tech/) | Stock Broker | Logging | — | — | [Blog, March 2023](https://zerodha.tech/blog/logging-at-zerodha/) | +| [Zing Data](https://getzingdata.com/) | Software & Technology | Business Intelligence | — | — | [Blog, May 2023](https://clickhouse.com/blog/querying-clickhouse-on-your-phone-with-zing-data) | +| [Zipy](https://www.zipy.ai/) | Software & Technology | User session debug | — | — | [Blog, April 2023](https://www.zipy.ai/blog/deep-dive-into-clickhouse) | +| [Zomato](https://www.zomato.com/) | Online food ordering | Logging | — | — | [Blog, July 2023](https://www.zomato.com/blog/building-a-cost-effective-logging-platform-using-clickhouse-for-petabyte-scale) | +| [Zomato](https://www.zomato.com/ncr/golf-course-order-online) | Food & Beverage| Food Delivery | - | - | [Blog 2024](https://blog.zomato.com/building-a-cost-effective-logging-platform-using-clickhouse-for-petabyte-scale) | +| [ÐС "Стрела"](https://magenta-technology.ru/sistema-upravleniya-marshrutami-inkassacii-as-strela/) | Transportation | — | — | — | [Job posting, Jan 2022](https://vk.com/topic-111905078_35689124?post=3553) | +| [ДомКлик](https://domclick.ru/) | Real Estate | — | — | — | [Article in Russian, October 2021](https://habr.com/ru/company/domclick/blog/585936/) | +| [МКБ](https://mkb.ru/) | Bank | Web-system monitoring | — | — | [Slides in Russian, September 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup28/mkb.pdf) | +| [ООО «МПЗ БогородÑкий»](https://shop.okraina.ru/) | Agriculture | — | — | — | [Article in Russian, November 2020](https://cloud.yandex.ru/cases/okraina) | +| [ЦВТ](https://htc-cs.ru/) | Software Development | Metrics, Logging | — | — | [Blog Post, March 2019, in Russian](https://vc.ru/dev/62715-kak-my-stroili-monitoring-na-prometheus-clickhouse-i-elk) | +| [ЦФТ](https://cft.ru/) | Banking, Financial products, Payments | — | — | — | [Meetup in Russian, April 2020](https://team.cft.ru/events/162) | +| [Цифровой Рабочий](https://promo.croc.ru/digitalworker) | Industrial IoT, Analytics | — | — | — | [Blog post in Russian, March 2021](https://habr.com/en/company/croc/blog/548018/) | +
diff --git a/docs/ja/about-us/cloud.md b/docs/ja/about-us/cloud.md new file mode 100644 index 00000000000..4ba0960e608 --- /dev/null +++ b/docs/ja/about-us/cloud.md @@ -0,0 +1,38 @@ +--- +slug: /ja/about-us/cloud +sidebar_label: クラウドサービス +sidebar_position: 10 +description: ClickHouse Cloud +--- + +# ClickHouse Cloud + +ClickHouse Cloudã¯ã€äººæ°—ã®ã‚ªãƒ¼ãƒ—ンソースOLAPデータベースã§ã‚ã‚‹ClickHouseã®å…ƒé–‹ç™ºè€…ã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸã‚¯ãƒ©ã‚¦ãƒ‰ã‚ªãƒ•ã‚¡ãƒªãƒ³ã‚°ã§ã™ã€‚ +[無料トライアルを開始ã™ã‚‹](https://clickhouse.cloud/signUp)ã“ã¨ã§ã€ClickHouse Cloudを体験ã§ãã¾ã™ã€‚ + +### ClickHouse Cloudã®åˆ©ç‚¹ï¼š + +ClickHouse Cloudを使用ã™ã‚‹åˆ©ç‚¹ã®ã„ãã¤ã‹ã‚’以下ã«ç¤ºã—ã¾ã™ï¼š + +- **迅速ãªä¾¡å€¤å®Ÿç¾**: クラスターã®ã‚µã‚¤ã‚ºã‚’調整ã™ã‚‹ã“ã¨ãªãã€ã™ãã«æ§‹ç¯‰ã‚’開始ã§ãã¾ã™ã€‚ +- **シームレスãªã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°**: 自動スケーリングã«ã‚ˆã‚Šã€ãƒ”ーク時ã«éŽå‰°ãªãƒ—ロビジョニングをã—ãªãã¦ã‚‚ã€å¤šæ§˜ãªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«å¯¾å¿œã—ã¾ã™ã€‚ +- **サーãƒãƒ¼ãƒ¬ã‚¹ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³**: サイズ調整ã€ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã€ä¿¡é ¼æ€§ã€ã‚¢ãƒƒãƒ—グレードをç§ãŸã¡ã«ä»»ã›ã¦ãã ã•ã„。 +- **é€æ˜Žãªä¾¡æ ¼è¨­å®š**: 使用ã—ãŸåˆ†ã ã‘を支払ã„ã€ãƒªã‚½ãƒ¼ã‚¹ã®äºˆç´„ã¨ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’利用ã§ãã¾ã™ã€‚ +- **所有コストã®ç·é¡**: 最高ã®ä¾¡æ ¼/パフォーマンス比ã¨ä½Žç®¡ç†ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã€‚ +- **広範ãªã‚¨ã‚³ã‚·ã‚¹ãƒ†ãƒ **: ãŠæ°—ã«å…¥ã‚Šã®ãƒ‡ãƒ¼ã‚¿ã‚³ãƒã‚¯ã‚¿ãƒ¼ã€ãƒ“ジュアライゼーションツールã€SQLã€ãŠã‚ˆã³è¨€èªžã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’æŒã¡è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ + +以下ã®ãƒ“デオã§ã€å§‹ã‚æ–¹ã®ã‚¦ã‚©ãƒ¼ã‚¯ã‚¹ãƒ«ãƒ¼ã‚’ã”覧ã„ãŸã ã‘ã¾ã™ï¼š + +
+ + + +
+ +### ClickHouse Cloudã¯ã©ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ClickHouseを使用ã—ã¾ã™ã‹ï¼Ÿ + +Clickhouse Cloudã¯ã€ã‚µãƒ¼ãƒ“スを継続的ã«æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã‚¢ãƒƒãƒ—グレードã—ã¾ã™ã€‚コアデータベースãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’オープンソースã§å…¬é–‹ã—ãŸå¾Œã€ã‚¯ãƒ©ã‚¦ãƒ‰ã‚¹ãƒ†ãƒ¼ã‚¸ãƒ³ã‚°ç’°å¢ƒã§è¿½åŠ ã®æ¤œè¨¼ã‚’è¡Œã„ã€é€šå¸¸6〜8週間ã§æœ¬ç•ªç’°å¢ƒã«å±•é–‹ã—ã¾ã™ã€‚展開ã¯ã‚¯ãƒ©ã‚¦ãƒ‰ã‚µãƒ¼ãƒ“スプロãƒã‚¤ãƒ€ãƒ¼ã€ã‚µãƒ¼ãƒ“スタイプã€åœ°åŸŸã”ã¨ã«æ®µéšŽçš„ã«è¡Œã‚ã‚Œã¾ã™ã€‚ + +定期的ãªãƒªãƒªãƒ¼ã‚¹ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã«å…ˆç«‹ã¡ã€æ›´æ–°ã‚’å—ã‘å–ã‚‹ãŸã‚ã®ã€Œé«˜é€Ÿã€ãƒªãƒªãƒ¼ã‚¹ãƒãƒ£ãƒãƒ«ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚早期ã®ã‚¢ãƒƒãƒ—グレードã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã€éžæœ¬ç•ªç’°å¢ƒã§ã®ã¿æŽ¨å¥¨ã•ã‚Œã€ã‚µãƒãƒ¼ãƒˆãƒã‚±ãƒƒãƒˆã‚’ログã—ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§ãã¾ã™ã€‚ + +以å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®æ©Ÿèƒ½ã«ä¾å­˜ã—ã¦ã„ã‚‹å ´åˆã€ã‚µãƒ¼ãƒ“スã®äº’æ›æ€§è¨­å®šã‚’使用ã—ã¦ã€å…ƒã®å‹•ä½œã«æˆ»ã™ã“ã¨ãŒå¯èƒ½ãªå ´åˆãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/about-us/distinctive-features.md b/docs/ja/about-us/distinctive-features.md new file mode 100644 index 00000000000..c61c5d58e08 --- /dev/null +++ b/docs/ja/about-us/distinctive-features.md @@ -0,0 +1,96 @@ +--- +slug: /ja/about-us/distinctive-features +sidebar_label: ClickHouseã¯ãªãœãƒ¦ãƒ‹ãƒ¼ã‚¯ãªã®ã‹ï¼Ÿ +sidebar_position: 50 +description: ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã¨ã¯ç•°ãªã‚‹ClickHouseã®ç‰¹å¾´ã‚’ç†è§£ã™ã‚‹ +--- + +# ClickHouseã®ç‰¹å¾´ + +## 真ã®åˆ—指å‘データベース管ç†ã‚·ã‚¹ãƒ†ãƒ  + +真ã®åˆ—指å‘DBMSã§ã¯ã€å€¤ã«ä½™åˆ†ãªãƒ‡ãƒ¼ã‚¿ãŒä¿å­˜ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ã€å€¤ã®é•·ã•ã‚’ãã®éš£ã«ã€Œæ•°å€¤ã€ã¨ã—ã¦ä¿å­˜ã™ã‚‹ã“ã¨ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€å›ºå®šé•·ã®å€¤ã‚’サãƒãƒ¼ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€10億個ã®UInt8åž‹ã®å€¤ã¯åœ§ç¸®ã•ã‚Œã¦ã„ãªã„ã¨ãã«ç´„1GBを消費ã™ã‚‹ã¹ãã§ã‚ã‚Šã€ã“ã‚Œã¯CPUã®ä½¿ç”¨ã«å¼·ã影響ã—ã¾ã™ã€‚データを圧縮ã•ã‚Œãšã«ï¼ˆã€Œã‚´ãƒŸã€ãŒãªã)コンパクトã«ä¿å­˜ã™ã‚‹ã“ã¨ãŒé‡è¦ã§ã€ã¨ã„ã†ã®ã‚‚ã€ãƒ‡ãƒ¼ã‚¿ã®è§£å‡é€Ÿåº¦ï¼ˆCPU使用é‡ï¼‰ã¯åœ§ç¸®ã•ã‚Œã¦ã„ãªã„データã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«ä¸»ã«ä¾å­˜ã™ã‚‹ã‹ã‚‰ã§ã™ã€‚ + +ã“ã‚Œã¯ã€ç•°ãªã‚‹ã‚«ãƒ©ãƒ ã®å€¤ã‚’別々ã«ä¿å­˜ã§ãã‚‹ãŒã€åˆ†æžã‚¯ã‚¨ãƒªã‚’効果的ã«å‡¦ç†ã§ããªã„システムã€ä¾‹ãˆã°HBaseã€BigTableã€Cassandraã€HyperTableãªã©ã¨ã¯å¯¾ç…§çš„ã§ã™ã€‚ã“れらã®ã‚·ã‚¹ãƒ†ãƒ ã§ã¯ã€1秒間ã«ç´„10万行ã®ã‚¹ãƒ«ãƒ¼ãƒ—ットã¯å¾—られã¾ã™ãŒã€æ•°å„„è¡Œã¯å¾—られã¾ã›ã‚“。 + +最終的ã«ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã§ã‚ã‚Šã€å˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã¯ã‚ã‚Šã¾ã›ã‚“。実行時ã«ãƒ†ãƒ¼ãƒ–ルやデータベースを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’ロードã—ã€ã‚µãƒ¼ãƒãƒ¼ã‚’å†æ§‹æˆã›ãšã«ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ã€‚ + +## データ圧縮 {#data-compression} + +一部ã®åˆ—指å‘DBMSã¯ãƒ‡ãƒ¼ã‚¿åœ§ç¸®ã‚’使用ã—ã¾ã›ã‚“。ã—ã‹ã—ã€ãƒ‡ãƒ¼ã‚¿åœ§ç¸®ã¯å„ªã‚ŒãŸãƒ‘フォーマンスをé”æˆã™ã‚‹ãŸã‚ã®é‡è¦ãªè¦ç´ ã§ã™ã€‚ + +ディスクスペースã¨CPU消費ã®é–“ã®ãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ã‚’考慮ã—ãŸåŠ¹çŽ‡çš„ãªæ±Žç”¨åœ§ç¸®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã«åŠ ãˆã€ClickHouseã¯ç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿åž‹ã«ç‰¹åŒ–ã—ãŸ[コーデック](/docs/ja/sql-reference/statements/create/table.md#specialized-codecs)ã‚’æä¾›ã—ã€ClickHouseã¯ã‚¿ã‚¤ãƒ ã‚·ãƒªãƒ¼ã‚ºåž‹ã®ã‚ˆã†ãªç‰¹å®šã®ç”¨é€”ã«å„ªã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ç«¶äº‰ã—ã€ã•ã‚‰ã«å„ªã‚Œã¾ã™ã€‚ + +## データã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ {#disk-storage-of-data} + +データを主キーã§ç‰©ç†çš„ã«ã‚½ãƒ¼ãƒˆã—ã¦ä¿æŒã™ã‚‹ã¨ã€ç‰¹å®šã®å€¤ã¾ãŸã¯å€¤ã®ç¯„囲ã«åŸºã¥ã„ã¦ãƒ‡ãƒ¼ã‚¿ã‚’æ•°åミリ秒未満ã®ä½Žé…延ã§æŠ½å‡ºã™ã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚SAP HANAã‚„Google PowerDrillã®ã‚ˆã†ãªä¸€éƒ¨ã®åˆ—指å‘DBMSã¯RAMã§ã®ã¿å‹•ä½œã—ã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã§ã¯ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ åˆ†æžã«å¿…è¦ä»¥ä¸Šã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢äºˆç®—を確ä¿ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseã¯é€šå¸¸ã®ãƒãƒ¼ãƒ‰ãƒ‰ãƒ©ã‚¤ãƒ–ã§å‹•ä½œã™ã‚‹ã‚ˆã†ã«è¨­è¨ˆã•ã‚Œã¦ãŠã‚Šã€ã“ã‚Œã¯ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚ãŸã‚Šã®GBå˜ä½ã®ã‚³ã‚¹ãƒˆãŒä½Žã„ã“ã¨ã‚’æ„味ã—ã¾ã™ãŒã€åˆ©ç”¨å¯èƒ½ãªå ´åˆã¯SSDや追加ã®RAMも完全ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +## 複数コアã§ã®ä¸¦åˆ—å‡¦ç† {#parallel-processing-on-multiple-cores} + +大ããªã‚¯ã‚¨ãƒªã¯è‡ªç„¶ã«ä¸¦åˆ—化ã•ã‚Œã€ç¾åœ¨ã®ã‚µãƒ¼ãƒãƒ¼ã§åˆ©ç”¨å¯èƒ½ãªã™ã¹ã¦ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’利用ã—ã¾ã™ã€‚ + +## 複数サーãƒãƒ¼ã§ã®åˆ†æ•£å‡¦ç† {#distributed-processing-on-multiple-servers} + +上記ã®åˆ—指å‘DBMSã®ã»ã¨ã‚“ã©ã«åˆ†æ•£ã‚¯ã‚¨ãƒªå‡¦ç†ã®ã‚µãƒãƒ¼ãƒˆã¯ã‚ã‚Šã¾ã›ã‚“。 + +ClickHouseã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯ç•°ãªã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã«å­˜åœ¨ã§ãã¾ã™ã€‚å„シャードã¯è€éšœå®³æ€§ã®ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¬ãƒ—リカã®ã‚°ãƒ«ãƒ¼ãƒ—ã§ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã™ã¹ã¦ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¨ã£ã¦é€æ˜Žã«ä¸¦åˆ—ã§ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## SQLサãƒãƒ¼ãƒˆ {#sql-support} + +ClickHouseã¯ã€ANSI SQL標準ã¨ã»ã¼äº’æ›æ€§ã®ã‚ã‚‹[SQL言語](/ja/sql-reference/)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るクエリã«ã¯ã€[GROUP BY](../sql-reference/statements/select/group-by.md)ã€[ORDER BY](../sql-reference/statements/select/order-by.md)ã€[FROM](../sql-reference/statements/select/from.md)ã§ã®ã‚µãƒ–クエリã€[JOIN](../sql-reference/statements/select/join.md)å¥ã€[IN](../sql-reference/operators/in.md)演算å­ã€[ウィンドウ関数](../sql-reference/window-functions/index.md)やスカラーサブクエリãŒå«ã¾ã‚Œã¾ã™ã€‚ + +相関(ä¾å­˜ï¼‰ã‚µãƒ–クエリã¯åŸ·ç­†æ™‚点ã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€å°†æ¥çš„ã«ã¯åˆ©ç”¨å¯èƒ½ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## ベクター計算エンジン {#vector-engine} + +データã¯ã‚«ãƒ©ãƒ ã§ä¿å­˜ã•ã‚Œã‚‹ã ã‘ã§ãªãã€ãƒ™ã‚¯ã‚¿ãƒ¼ï¼ˆã‚«ãƒ©ãƒ ã®ä¸€éƒ¨ï¼‰ã«ã‚ˆã£ã¦å‡¦ç†ã•ã‚Œã€é«˜ã„CPU効率ãŒé”æˆã•ã‚Œã¾ã™ã€‚ + +## リアルタイムデータ挿入 {#real-time-data-updates} + +ClickHouseã¯ä¸»ã‚­ãƒ¼ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚主キーã®ç¯„囲ã§ã‚¯ã‚¨ãƒªã‚’迅速ã«å®Ÿè¡Œã™ã‚‹ãŸã‚ã«ã€ãƒ‡ãƒ¼ã‚¿ã¯ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã«MergeTreeを使用ã—ã¦ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’継続的ã«ãƒ†ãƒ¼ãƒ–ルã«è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚æ–°ã—ã„データãŒå–ã‚Šè¾¼ã¾ã‚ŒãŸéš›ã«ãƒ­ãƒƒã‚¯ã¯å–å¾—ã•ã‚Œã¾ã›ã‚“。 + +## 主インデックス {#primary-index} + +データãŒä¸»ã‚­ãƒ¼ã§ç‰©ç†çš„ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ã§ã€ç‰¹å®šã®å€¤ã¾ãŸã¯å€¤ã®ç¯„囲ã«åŸºã¥ã„ã¦ãƒ‡ãƒ¼ã‚¿ã‚’æ•°åミリ秒未満ã®ä½Žé…延ã§æŠ½å‡ºã™ã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +## 二次インデックス {#secondary-indexes} + +ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã¨ã¯ç•°ãªã‚Šã€ClickHouseã®äºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ç‰¹å®šã®è¡Œã‚„行範囲を指ã—ã¾ã›ã‚“。代ã‚ã‚Šã«ã€ã‚¯ã‚¨ãƒªã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°æ¡ä»¶ã«ä¸€è‡´ã—ãªã„ã™ã¹ã¦ã®è¡ŒãŒã‚るデータ部分ã§ãれを読ã¿è¾¼ã¾ãªã„よã†ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«äº‹å‰ã«çŸ¥ã‚‰ã›ã‚‹ãŸã‚ã€[データスキッピングインデックス](../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-data_skipping-indexes)ã¨å‘¼ã°ã‚Œã¾ã™ã€‚ + +## オンラインクエリã¸ã®é©åˆæ€§ {#suitable-for-online-queries} + +ã»ã¨ã‚“ã©ã®OLAPデータベース管ç†ã‚·ã‚¹ãƒ†ãƒ ã¯ã€1秒未満ã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã§ã®ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ã‚¯ã‚¨ãƒªã‚’目指ã—ã¦ã„ã¾ã›ã‚“。代替システムã§ã¯ã€æ•°å秒ã‹ã‚‰æ•°åˆ†é–“ã®ãƒ¬ãƒãƒ¼ãƒˆç”Ÿæˆæ™‚é–“ãŒè¨±å®¹ã•ã‚Œã‚‹ã“ã¨ãŒå¤šãã€æ™‚ã«ã¯ã•ã‚‰ã«æ™‚é–“ãŒã‹ã‹ã‚Šã€ã‚ªãƒ•ãƒ©ã‚¤ãƒ³ã§ãƒ¬ãƒãƒ¼ãƒˆã‚’準備ã™ã‚‹ã“ã¨ã‚’å¼·ã„られるã“ã¨ãŒã‚ã‚Šã¾ã™ï¼ˆäº‹å‰ã«ã€ã¾ãŸã¯ã€Œå¾Œã§æ¥ã¦ãã ã•ã„ã€ã¨ã„ã†å½¢ã§ï¼‰ã€‚ + +ClickHouseã§ã¯ã€ã€Œä½Žé…延ã€ã¨ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ãƒšãƒ¼ã‚¸ãŒèª­ã¿è¾¼ã¾ã‚Œã‚‹ã®ã¨åŒæ™‚ã«ã€é…延ãªãã€äº‹å‰ã«å›žç­”を準備ã—よã†ã¨ã›ãšã«ã‚¯ã‚¨ãƒªã‚’処ç†ã§ãã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ã§ã€‚ + +## 近似計算ã®ã‚µãƒãƒ¼ãƒˆ {#support-for-approximated-calculations} + +ClickHouseã¯ã€æ€§èƒ½ã‚’犠牲ã«ã—ã¦ç²¾åº¦ã‚’トレードオフã™ã‚‹æ§˜ã€…ãªæ–¹æ³•ã‚’æä¾›ã—ã¦ã„ã¾ã™ï¼š + +1. ç•°ãªã‚‹å€¤ã®æ•°ã€ä¸­å¤®å€¤ã€ãŠã‚ˆã³åˆ†ä½æ•°ã‚’近似計算ã™ã‚‹ãŸã‚ã®é›†è¨ˆé–¢æ•°ã€‚ +2. データã®ä¸€éƒ¨ï¼ˆã‚µãƒ³ãƒ—ル)ã«åŸºã¥ã„ã¦ã‚¯ã‚¨ãƒªã‚’実行ã—ã€è¿‘ä¼¼çµæžœã‚’得る。ã“ã®å ´åˆã€ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰å–å¾—ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®é‡ã¯æ¯”例ã—ã¦å°‘ãªããªã‚Šã¾ã™ã€‚ +3. ã™ã¹ã¦ã®ã‚­ãƒ¼ã§ã¯ãªãã€ãƒ©ãƒ³ãƒ€ãƒ ãªã‚­ãƒ¼ã®åˆ¶é™ã•ã‚ŒãŸæ•°ã®é›†è¨ˆã‚’実行ã™ã‚‹ã€‚データ内ã®ã‚­ãƒ¼åˆ†å¸ƒã®æ¡ä»¶ã«ã‚ˆã£ã¦ã¯ã€å°‘ãªã„リソースã§åˆç†çš„ã«æ­£ç¢ºãªçµæžœã‚’æä¾›ã—ã¾ã™ã€‚ + +## アダプティブジョインアルゴリズム {#adaptive-join-algorithm} + +ClickHouseã¯ã€è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルを[JOIN](../sql-reference/statements/select/join.md)ã™ã‚‹éš›ã«ã€ä¸»ã«ãƒãƒƒã‚·ãƒ¥ã‚¸ãƒ§ã‚¤ãƒ³ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’é¸æŠžã—ã€è¤‡æ•°ã®å¤§ããªãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹å ´åˆã«ã¯ãƒžãƒ¼ã‚¸ã‚¸ãƒ§ã‚¤ãƒ³ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã«ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ã¾ã™ã€‚ + +## データレプリケーションã¨ãƒ‡ãƒ¼ã‚¿æ•´åˆæ€§ã®ã‚µãƒãƒ¼ãƒˆ {#data-replication-and-data-integrity-support} + +ClickHouseã¯éžåŒæœŸãƒžãƒ«ãƒãƒžã‚¹ã‚¿ãƒ¼ãƒ¬ãƒ—リケーションを使用ã—ã¾ã™ã€‚利用å¯èƒ½ãªãƒ¬ãƒ—リカã«æ›¸ãè¾¼ã¾ã‚ŒãŸå¾Œã€æ®‹ã‚Šã®ã™ã¹ã¦ã®ãƒ¬ãƒ—リカãŒãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãã®ã‚³ãƒ”ーをå–å¾—ã—ã¾ã™ã€‚システムã¯ç•°ãªã‚‹ãƒ¬ãƒ—リカã«åŒä¸€ã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿æŒã—ã¾ã™ã€‚ã»ã¨ã‚“ã©ã®éšœå®³ã‹ã‚‰ã®å›žå¾©ã¯è‡ªå‹•ã¾ãŸã¯è¤‡é›‘ãªå ´åˆã«ã¯åŠè‡ªå‹•ã§è¡Œã‚ã‚Œã¾ã™ã€‚ + +詳細ã«ã¤ã„ã¦ã¯ã€[データレプリケーション](../engines/table-engines/mergetree-family/replication.md)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## ロールベースã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ {#role-based-access-control} + +ClickHouseã¯SQLクエリを使用ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†ã‚’実装ã—ã€ANSI SQL標準ãŠã‚ˆã³ä¸€èˆ¬çš„ãªãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã§è¦‹ã‚‰ã‚Œã‚‹[ロールベースã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã®æ§‹æˆ](/docs/ja/guides/sre/user-management/index.md)ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +## 欠点ã¨è€ƒãˆã‚‰ã‚Œã‚‹æ©Ÿèƒ½ {#clickhouse-features-that-can-be-considered-disadvantages} + +1. 本格的ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã—。 +2. 高速ã‹ã¤ä½Žé…延ã§æ—¢ã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’修正ã¾ãŸã¯å‰Šé™¤ã™ã‚‹èƒ½åŠ›ã®æ¬ å¦‚。データを整ç†ã—ãŸã‚Šå¤‰æ›´ã—ãŸã‚Šã™ã‚‹ãŸã‚ã«ãƒãƒƒãƒå‰Šé™¤ã‚„æ›´æ–°ã¯åˆ©ç”¨å¯èƒ½ã§ã™ãŒã€ä¾‹ãˆã°[GDPR](https://gdpr-info.eu)ã«æº–æ‹ ã™ã‚‹ãŸã‚ã«åˆ¥ã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚ +3. スパースãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒClickHouseã‚’ãƒã‚¤ãƒ³ãƒˆã‚¯ã‚¨ãƒªã§ã‚·ãƒ³ã‚°ãƒ«è¡Œã‚’キーã«ã‚ˆã£ã¦å–å¾—ã™ã‚‹ã®ã«ã‚ã¾ã‚ŠåŠ¹çŽ‡çš„ã§ã¯ãªã„よã†ã«ã—ã¾ã™ã€‚ diff --git a/docs/ja/about-us/history.md b/docs/ja/about-us/history.md new file mode 100644 index 00000000000..c851c8e07a5 --- /dev/null +++ b/docs/ja/about-us/history.md @@ -0,0 +1,51 @@ +--- +slug: /ja/about-us/history +sidebar_label: ClickHouseã®æ­´å² +sidebar_position: 40 +description: ãã‚ŒãŒå§‹ã¾ã£ãŸå ´æ‰€... +--- + +# ClickHouseã®æ­´å² {#clickhouse-history} + +ClickHouseã¯å½“åˆã€[世界ã§2番目ã«å¤§ããªã‚¦ã‚§ãƒ–解æžãƒ—ラットフォーム](http://w3techs.com/technologies/overview/traffic_analysis/all)ã§ã‚ã‚‹[Yandex.Metrica](https://metrica.yandex.com/)を支ãˆã‚‹ãŸã‚ã«é–‹ç™ºã•ã‚Œã€ãã®ã‚·ã‚¹ãƒ†ãƒ ã®ã‚³ã‚¢ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¨ã—ã¦ä»Šã‚‚使ã‚ã‚Œã¦ã„ã¾ã™ã€‚データベースã«ã¯13兆を超ãˆã‚‹ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒã‚ã‚Šã€1æ—¥ã‚ãŸã‚Š200億件以上ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒç™ºç”Ÿã—ã¦ã„ã¾ã™ã€‚ClickHouseã¯ã€éžé›†ç´„データã‹ã‚‰ç›´æŽ¥ã‚«ã‚¹ã‚¿ãƒ ãƒ¬ãƒãƒ¼ãƒˆã‚’ãã®å ´ã§ç”Ÿæˆã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã®è¨˜äº‹ã§ã¯ã€ClickHouseã®é–‹ç™ºåˆæœŸæ®µéšŽã§ã®ç›®æ¨™ã«ã¤ã„ã¦ç°¡å˜ã«èª¬æ˜Žã—ã¾ã™ã€‚ + +Yandex.Metricaã¯ã€ãƒ’ット数やセッション数ã«åŸºã¥ã„ã¦ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•ã‚ŒãŸãƒ¬ãƒãƒ¼ãƒˆã‚’ãã®å ´ã§ä½œæˆã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å®šç¾©ã•ã‚ŒãŸä»»æ„ã®ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã‚’使用ã—ã¾ã™ã€‚ã“ã®ãŸã‚ã«ã¯ã€ã—ã°ã—ã°ãƒ¦ãƒ‹ãƒ¼ã‚¯ãƒ¦ãƒ¼ã‚¶ãƒ¼æ•°ãªã©ã®è¤‡é›‘ãªé›†ç´„を構築ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚レãƒãƒ¼ãƒˆä½œæˆã®ãŸã‚ã®æ–°ã—ã„データã¯ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§åˆ°ç€ã—ã¾ã™ã€‚ + +2014å¹´4月時点ã§ã€Yandex.Metricaã¯1æ—¥ã‚ãŸã‚Šç´„120億件ã®ã‚¤ãƒ™ãƒ³ãƒˆï¼ˆãƒšãƒ¼ã‚¸ãƒ“ューやクリック)を追跡ã—ã¦ã„ã¾ã—ãŸã€‚ã“れらã™ã¹ã¦ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã‚«ã‚¹ã‚¿ãƒ ãƒ¬ãƒãƒ¼ãƒˆã‚’構築ã™ã‚‹ãŸã‚ã«ä¿å­˜ã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。å˜ä¸€ã®ã‚¯ã‚¨ãƒªã§ã¯æ•°ç™¾ä¸‡è¡Œã‚’数百ミリ秒以内ã§ã‚¹ã‚­ãƒ£ãƒ³ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ã“ã¨ã‚‚ã‚ã‚Œã°ã€æ•°å„„行を数秒ã§ã‚¹ã‚­ãƒ£ãƒ³ã™ã‚‹ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +## Yandex.Metricaã¨ãã®ä»–ã®Yandexサービスã§ã®ä½¿ç”¨ {#usage-in-yandex-metrica-and-other-yandex-services} + +ClickHouseã¯ã€Yandex.Metricaã«ãŠã„ã¦å¤šç›®çš„ã«åˆ©ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ 主ãªã‚¿ã‚¹ã‚¯ã¯ã€éžé›†ç´„データを使用ã—ã¦ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã§ãƒ¬ãƒãƒ¼ãƒˆã‚’作æˆã™ã‚‹ã“ã¨ã§ã™ã€‚ãã‚Œã¯374å°ã®ã‚µãƒ¼ãƒãƒ¼ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’使用ã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«20.3兆行以上をä¿å­˜ã—ã¾ã™ã€‚圧縮データã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã¯ç´„2 PBã§ã€é‡è¤‡ã¨ãƒ¬ãƒ—リカを考慮ã—ãªã„å ´åˆã®ã“ã¨ã§ã™ã€‚圧縮ã•ã‚Œã¦ã„ãªã„データ(TSVå½¢å¼ï¼‰ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã¯ç´„17 PBã«ãªã‚Šã¾ã™ã€‚ + +ClickHouseã¯ã¾ãŸã€ä»¥ä¸‹ã®ãƒ—ロセスã«ãŠã„ã¦é‡è¦ãªå½¹å‰²ã‚’æžœãŸã—ã¦ã„ã¾ã™ï¼š + +- Yandex.Metricaã‹ã‚‰ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³å†ç”Ÿãƒ‡ãƒ¼ã‚¿ã®ä¿å­˜ã€‚ +- 中間データã®å‡¦ç†ã€‚ +- Analyticsを使用ã—ãŸã‚°ãƒ­ãƒ¼ãƒãƒ«ãƒ¬ãƒãƒ¼ãƒˆã®ä½œæˆã€‚ +- Yandex.Metricaエンジンã®ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã‚¯ã‚¨ãƒªã‚’実行。 +- APIã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‹ã‚‰ã®ãƒ­ã‚°ã®è§£æžã€‚ + +ç¾åœ¨ã€ä»–ã®Yandexサービスや部門ã®æ¤œç´¢ãƒãƒ¼ãƒ†ã‚£ã‚«ãƒ«ã€eコマースã€åºƒå‘Šã€ãƒ“ジãƒã‚¹åˆ†æžã€ãƒ¢ãƒã‚¤ãƒ«é–‹ç™ºã€ãƒ‘ーソナルサービスãªã©ã§ã€æ•°å件ã®ClickHouseã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãŒè¦‹ã‚‰ã‚Œã¾ã™ã€‚ + +## 集約データã¨éžé›†ç´„データ {#aggregated-and-non-aggregated-data} + +統計を効果的ã«è¨ˆç®—ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’集約ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ã¨ã„ã†æ„見ãŒåºƒã¾ã‚Šã¤ã¤ã‚ã‚Šã¾ã™ã€‚ãªãœãªã‚‰ã€ã“ã‚Œã«ã‚ˆã‚Šãƒ‡ãƒ¼ã‚¿ã®é‡ãŒå‰Šæ¸›ã•ã‚Œã‚‹ã‹ã‚‰ã§ã™ã€‚ + +ã—ã‹ã—ã€ãƒ‡ãƒ¼ã‚¿é›†ç´„ã«ã¯å¤šãã®åˆ¶ç´„ãŒã‚ã‚Šã¾ã™ï¼š + +- å¿…è¦ãªãƒ¬ãƒãƒ¼ãƒˆã®äº‹å‰å®šç¾©ãƒªã‚¹ãƒˆãŒå¿…è¦ã§ã™ã€‚ +- ユーザーã¯ã‚«ã‚¹ã‚¿ãƒ ãƒ¬ãƒãƒ¼ãƒˆã‚’作æˆã§ãã¾ã›ã‚“。 +- 多数ã®ç•°ãªã‚‹ã‚­ãƒ¼ã«å¯¾ã—ã¦é›†ç´„ã™ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿é‡ã¯ã»ã¨ã‚“ã©å‰Šæ¸›ã•ã‚Œãªã„ãŸã‚ã€é›†ç´„ã¯ç„¡æ„味ã§ã™ã€‚ +- 多数ã®ãƒ¬ãƒãƒ¼ãƒˆã«å¯¾ã—ã¦ã€é›†ç´„ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒå¤šã™ãŽã‚‹ï¼ˆçµ„ã¿åˆã‚ã›ã®çˆ†ç™ºï¼‰ã€‚ +- 高ã„カーディナリティ(ãŸã¨ãˆã°URL)ã®ã‚­ãƒ¼ã‚’集約ã™ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿é‡ã¯ã‚ã¾ã‚Šå‰Šæ¸›ã•ã‚Œã¾ã›ã‚“(2å€æœªæº€ï¼‰ã€‚ +- ã“ã®ãŸã‚ã€é›†ç´„ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿é‡ãŒç¸®å°ã™ã‚‹ã©ã“ã‚ã‹å¢—加ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +- ユーザーã¯æˆ‘々ãŒç”Ÿæˆã™ã‚‹ã™ã¹ã¦ã®ãƒ¬ãƒãƒ¼ãƒˆã‚’閲覧ã™ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。大部分ã®è¨ˆç®—ã¯ç„¡é§„ã«ãªã‚Šã¾ã™ã€‚ +- ã•ã¾ã–ã¾ãªé›†ç´„ã«å¯¾ã—ã¦ãƒ‡ãƒ¼ã‚¿ã®è«–ç†çš„一貫性ãŒæãªã‚れるã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +何も集約ã›ãšã€éžé›†ç´„データã¨ã¨ã‚‚ã«ä½œæ¥­ã™ã‚‹å ´åˆã€ã“ã®ã‚¢ãƒ—ローãƒã«ã‚ˆã‚Šè¨ˆç®—é‡ãŒå‰Šæ¸›ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +ã—ã‹ã—ã€é›†ç´„ã§ã¯ä½œæ¥­ã®å¤§éƒ¨åˆ†ãŒã‚ªãƒ•ãƒ©ã‚¤ãƒ³ã§æ¯”較的è½ã¡ç€ã„ã¦å®Œäº†ã—ã¾ã™ã€‚ãã‚Œã«å¯¾ç…§çš„ã«ã€ã‚ªãƒ³ãƒ©ã‚¤ãƒ³è¨ˆç®—ã§ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒçµæžœã‚’å¾…ã£ã¦ã„ã‚‹ãŸã‚ã€ã§ãã‚‹ã ã‘æ—©ã計算ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +Yandex.Metricaã«ã¯ã€Metrageã¨ã„ã†ãƒ‡ãƒ¼ã‚¿ã‚’集約ã™ã‚‹ãŸã‚ã®å°‚門システムãŒã‚ã‚Šã€å¤§å¤šæ•°ã®ãƒ¬ãƒãƒ¼ãƒˆã§ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã—ãŸã€‚ 2009å¹´ã‹ã‚‰ã€Yandex.Metricaã§ã¯ã€ãƒ¬ãƒãƒ¼ãƒˆãƒ“ルダーã«ä»¥å‰ä½¿ç”¨ã•ã‚Œã¦ã„ãŸOLAPServerã¨ã„ã†éžé›†ç´„データã®ãŸã‚ã®å°‚門的ãªOLAPデータベースも使用ã—ã¦ã„ã¾ã—ãŸã€‚OLAPServerã¯éžé›†ç´„データã«ã¯ã†ã¾ã機能ã—ã¾ã—ãŸãŒã€æœ›ã¾ã—ã„ã™ã¹ã¦ã®ãƒ¬ãƒãƒ¼ãƒˆã§ä½¿ç”¨ã§ããªã„多ãã®åˆ¶ç´„ãŒã‚ã‚Šã¾ã—ãŸã€‚ã“ã‚Œã«ã¯ãƒ‡ãƒ¼ã‚¿åž‹ã®ã‚µãƒãƒ¼ãƒˆï¼ˆæ•°å€¤ã®ã¿ï¼‰ãŒãªã„ã“ã¨ã‚„ã€ãƒ‡ãƒ¼ã‚¿ã‚’リアルタイムã§å¢—分更新ã§ããªã„ã“ã¨ï¼ˆãƒ‡ãƒ¼ã‚¿ã‚’毎日書ãæ›ãˆã‚‹ã“ã¨ã®ã¿å¯èƒ½ï¼‰ãŒå«ã¾ã‚Œã¾ã™ã€‚OLAPServerã¯DBMSã§ã¯ãªãã€å°‚門的ãªDBã§ã™ã€‚ + +ClickHouseã®åˆæœŸç›®æ¨™ã¯ã€OLAPServerã®åˆ¶ç´„を撤廃ã—ã€ã™ã¹ã¦ã®ãƒ¬ãƒãƒ¼ãƒˆã§éžé›†ç´„データを用ã„ãŸä½œæ¥­ã®å•é¡Œã‚’解決ã™ã‚‹ã“ã¨ã§ã—ãŸãŒã€é•·å¹´ã«ã‚ãŸã£ã¦æˆé•·ã‚’続ã‘ã€åºƒç¯„囲ã®åˆ†æžã‚¿ã‚¹ã‚¯ã«é©ã—ãŸæ±Žç”¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã«æˆé•·ã—ã¾ã—ãŸã€‚ diff --git a/docs/ja/about-us/intro.mdx b/docs/ja/about-us/intro.mdx new file mode 100644 index 00000000000..63c6b64de13 --- /dev/null +++ b/docs/ja/about-us/intro.mdx @@ -0,0 +1,9 @@ +--- +slug: /ja/about-clickhouse +sidebar_label: 入出力フォーマット +title: ClickHouseã¨ã¯ï¼Ÿ +--- + +import Content from '@site/docs/ja/intro.md'; + + diff --git a/docs/ja/about-us/support.md b/docs/ja/about-us/support.md new file mode 100644 index 00000000000..9e8917f45e6 --- /dev/null +++ b/docs/ja/about-us/support.md @@ -0,0 +1,19 @@ +--- +slug: /ja/about-us/support +sidebar_label: サãƒãƒ¼ãƒˆ +title: ClickHouse Cloud サãƒãƒ¼ãƒˆã‚µãƒ¼ãƒ“ス +sidebar_position: 30 +--- + +ClickHouseã§ã¯ã€ClickHouse Cloudã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨é¡§å®¢å‘ã‘ã«ã‚µãƒãƒ¼ãƒˆã‚µãƒ¼ãƒ“スをæä¾›ã—ã¦ã„ã¾ã™ã€‚我々ã®ç›®æ¨™ã¯ã€ClickHouse製å“を体ç¾ã™ã‚‹ã‚µãƒãƒ¼ãƒˆã‚µãƒ¼ãƒ“スãƒãƒ¼ãƒ ã‚’構築ã™ã‚‹ã“ã¨ã§ã™ã€‚ãã‚Œã¯ã€æ¯”é¡žãªã„パフォーマンスã€ä½¿ã„ã‚„ã™ã•ã€ãŠã‚ˆã³ä¾‹å¤–çš„ã«è¿…速ã§é«˜å“質ãªçµæžœã‚’æä¾›ã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[サãƒãƒ¼ãƒˆã‚µãƒ¼ãƒ“スページ](https://clickhouse.com/support/program/)ã‚’ã”覧ãã ã•ã„。 + +[クラウドコンソールã«ãƒ­ã‚°ã‚¤ãƒ³](https://clickhouse.cloud/support)ã—ã¦ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚ªãƒ—ションã‹ã‚‰ **ヘルプ -> サãƒãƒ¼ãƒˆ** ã‚’é¸æŠžã™ã‚‹ã¨ã€æ–°ã—ã„サãƒãƒ¼ãƒˆã‚±ãƒ¼ã‚¹ã‚’é–‹ã„ã¦ã€é€ä¿¡ã—ãŸã‚±ãƒ¼ã‚¹ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’確èªã§ãã¾ã™ã€‚ + +ã¾ãŸã€[ステータスページ](https://status.clickhouse.com)ã«ç™»éŒ²ã—ã¦ã€ãƒ—ラットフォームã«å½±éŸ¿ã‚’与ãˆã‚‹ã‚¤ãƒ³ã‚·ãƒ‡ãƒ³ãƒˆã«ã¤ã„ã¦è¿…速ã«é€šçŸ¥ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +サãƒãƒ¼ãƒˆã‚¤ãƒ³ã‚·ãƒ‡ãƒ³ãƒˆã«é–¢ã™ã‚‹ã‚µãƒ¼ãƒ“スレベルアグリーメントã¯ã€ã‚µãƒ–スクリプション顧客ã®ã¿ãŒå¯¾è±¡ã§ã™ã€‚ç¾åœ¨ClickHouse Cloudã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ãªã„å ´åˆã¯ã€è³ªå•ã«ã¯ãŠç­”ãˆã—ã¾ã™ãŒã€ä»£ã‚ã‚Šã«ä»¥ä¸‹ã®ã‚³ãƒŸãƒ¥ãƒ‹ãƒ†ã‚£ãƒªã‚½ãƒ¼ã‚¹ã‚’ã”活用ã„ãŸã ãã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ï¼š + +- [ClickHouseコミュニティSlackãƒãƒ£ãƒ³ãƒãƒ«](https://clickhouse.com/slack) +- [ãã®ä»–ã®ã‚³ãƒŸãƒ¥ãƒ‹ãƒ†ã‚£ã‚ªãƒ—ション](https://github.com/ClickHouse/ClickHouse/blob/master/README.md#useful-links) +::: diff --git a/docs/ja/architecture/cluster-deployment.md b/docs/ja/architecture/cluster-deployment.md new file mode 100644 index 00000000000..e18df9c2c06 --- /dev/null +++ b/docs/ja/architecture/cluster-deployment.md @@ -0,0 +1,152 @@ +--- +slug: /ja/architecture/cluster-deployment +sidebar_label: クラスターデプロイ +sidebar_position: 100 +title: クラスターデプロイ +--- + +ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ã¯ã€ã™ã§ã«[ローカル㮠ClickHouse サーãƒãƒ¼](../getting-started/install.md)をセットアップã—ã¦ã„ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ + +ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã‚’通ã˜ã¦ã€ã‚·ãƒ³ãƒ—ル㪠ClickHouse クラスターã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—方法を学ã³ã¾ã™ã€‚å°è¦æ¨¡ã§ã™ãŒã€ãƒ•ã‚©ãƒ¼ãƒ«ãƒˆãƒˆãƒ¬ãƒ©ãƒ³ãƒˆã§ã‚¹ã‚±ãƒ¼ãƒ©ãƒ–ルã§ã™ã€‚ãã®å¾Œã€ä¾‹ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®1ã¤ã‚’使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’å……å¡«ã—ã€ãƒ‡ãƒ¢ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ + +## クラスターデプロイ {#cluster-deployment} + +ã“ã® ClickHouse クラスターã¯åŒè³ªã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã«ãªã‚Šã¾ã™ã€‚以下ã®æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„: + +1. クラスターã®ã™ã¹ã¦ã®ãƒžã‚·ãƒ³ã« ClickHouse サーãƒãƒ¼ã‚’インストールã™ã‚‹ +2. 設定ファイルã«ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ã‚³ãƒ³ãƒ•ã‚£ã‚°ã‚’設定ã™ã‚‹ +3. å„インスタンスã«ãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ +4. [分散テーブル](../engines/table-engines/special/distributed.md)を作æˆã™ã‚‹ + +[分散テーブル](../engines/table-engines/special/distributed.md)ã¯ã€ClickHouse クラスター内ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ãƒ¼ãƒ–ルã¸ã®ã€Œãƒ“ューã€ã®ä¸€ç¨®ã§ã™ã€‚分散テーブルã‹ã‚‰ã® SELECT クエリã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ã™ã¹ã¦ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚複数ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã«å¯¾ã—ã¦è¨­å®šã‚’指定ã—ã€ãã‚Œã«å¿œã˜ã¦ç•°ãªã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã«ãƒ“ューをæä¾›ã™ã‚‹ãŸã‚ã«è¤‡æ•°ã®åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルを作æˆã§ãã¾ã™ã€‚ + +以下ã¯ã€3ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã¨ãã‚Œãžã‚Œ1ã¤ã®ãƒ¬ãƒ—リカをæŒã¤ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ã‚³ãƒ³ãƒ•ã‚£ã‚°ä¾‹ã§ã™: + +```xml + + + + + example-perftest01j.clickhouse.com + 9000 + + + + + example-perftest02j.clickhouse.com + 9000 + + + + + example-perftest03j.clickhouse.com + 9000 + + + + +``` + +ã•ã‚‰ãªã‚‹ãƒ‡ãƒ¢ãƒ³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®ãŸã‚ã«ã€å˜ä¸€ãƒŽãƒ¼ãƒ‰ãƒ‡ãƒ—ロイメントãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ä½¿ç”¨ã—㟠`hits_v1` ã® `CREATE TABLE` クエリã¨åŒã˜ã‚¯ã‚¨ãƒªã‚’使用ã—ã¦ã€æ–°ã—ã„ローカルテーブルを作æˆã—ã¾ã™ãŒã€ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルåã«ã—ã¾ã™: + +```sql +CREATE TABLE tutorial.hits_local (...) ENGINE = MergeTree() ... +``` + +分散テーブルを作æˆã™ã‚‹ã¨ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹ãƒ“ューをæä¾›ã—ã¾ã™: + +```sql +CREATE TABLE tutorial.hits_all AS tutorial.hits_local +ENGINE = Distributed(perftest_3shards_1replicas, tutorial, hits_local, rand()); +``` + +一般的ãªæ–¹æ³•ã¨ã—ã¦ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ã™ã¹ã¦ã®ãƒžã‚·ãƒ³ã«åŒæ§˜ã®åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ä»»æ„ã®ãƒžã‚·ãƒ³ã§åˆ†æ•£ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ã€‚ã¾ãŸã€[remote](../sql-reference/table-functions/remote.md) テーブル関数を使用ã—ã¦ã€ç‰¹å®šã® SELECT クエリã«å¯¾ã™ã‚‹ä¸€æ™‚çš„ãªåˆ†æ•£ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã‚ªãƒ—ションもã‚ã‚Šã¾ã™ã€‚ + +分散テーブルã«å¯¾ã—㦠[INSERT SELECT](../sql-reference/statements/insert-into.md) を実行ã—ã€ãƒ†ãƒ¼ãƒ–ルを複数ã®ã‚µãƒ¼ãƒãƒ¼ã«åˆ†æ•£ã•ã›ã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +INSERT INTO tutorial.hits_all SELECT * FROM tutorial.hits_v1; +``` + +予想通りã€è¨ˆç®—é‡ã®å¤šã„クエリã¯1å°ã®ã‚µãƒ¼ãƒãƒ¼ã‚’使用ã™ã‚‹ã‚ˆã‚Šã‚‚3å°ã®ã‚µãƒ¼ãƒãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã§Nå€é€Ÿã実行ã•ã‚Œã¾ã™ã€‚ + +ã“ã®å ´åˆã€3ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’æŒã¤ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’使用ã—ã€å„シャードã«ã¯1ã¤ã®ãƒ¬ãƒ—リカãŒã‚ã‚Šã¾ã™ã€‚ + +本番環境ã§ã®å›žå¾©åŠ›ã‚’æä¾›ã™ã‚‹ãŸã‚ã«ã€å„シャードã«ã¯è¤‡æ•°ã®å¯ç”¨æ€§ã‚¾ãƒ¼ãƒ³ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼ï¼ˆã¾ãŸã¯å°‘ãªãã¨ã‚‚ラック)ã«åºƒãŒã‚‹2〜3ã®ãƒ¬ãƒ—リカをå«ã‚ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ ClickHouse ã¯ç„¡åˆ¶é™ã®æ•°ã®ãƒ¬ãƒ—リカをサãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +以下ã¯ã€1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«3ã¤ã®ãƒ¬ãƒ—リカをå«ã‚€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ã‚³ãƒ³ãƒ•ã‚£ã‚°ä¾‹ã§ã™: + +```xml + + ... + + + + example-perftest01j.clickhouse.com + 9000 + + + example-perftest02j.clickhouse.com + 9000 + + + example-perftest03j.clickhouse.com + 9000 + + + + +``` + +ãƒã‚¤ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リケーションを有効ã«ã™ã‚‹ã«ã¯ã€[ZooKeeper](http://zookeeper.apache.org/) ãŒå¿…è¦ã§ã™ã€‚ClickHouse ã¯ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã®ãƒ‡ãƒ¼ã‚¿æ•´åˆæ€§ã‚’ä¿è¨¼ã—ã€éšœå®³å¾Œè‡ªå‹•çš„ã«å¾©å…ƒæ‰‹ç¶šãを実行ã—ã¾ã™ã€‚ZooKeeper クラスターを他ã®ãƒ—ロセス(ClickHouse ã‚’å«ã‚€ï¼‰ãŒå®Ÿè¡Œã•ã‚Œã¦ã„ãªã„別ã®ã‚µãƒ¼ãƒãƒ¼ã«ãƒ‡ãƒ—ロイã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +:::note Note +ZooKeeper ã¯åŽ³å¯†ã«ã¯å¿…é ˆã§ã¯ã‚ã‚Šã¾ã›ã‚“: 一部ã®ç°¡å˜ãªã‚±ãƒ¼ã‚¹ã§ã¯ã€ã‚¢ãƒ—リケーションコードã‹ã‚‰ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むã“ã¨ã§ãƒ‡ãƒ¼ã‚¿ã‚’複製ã§ãã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã¯**推奨ã•ã‚Œã¾ã›ã‚“**。ãªãœãªã‚‰ã€ã“ã®å ´åˆã€ClickHouse ã¯ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§ã®ãƒ‡ãƒ¼ã‚¿æ•´åˆæ€§ã‚’ä¿è¨¼ã§ãã¾ã›ã‚“。ã“ã®ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿æ•´åˆæ€§ã®è²¬ä»»ã¯ã‚¢ãƒ—リケーションã«ã‚ã‚Šã¾ã™ã€‚ +::: + +ZooKeeper ã®å ´æ‰€ã¯è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§æŒ‡å®šã•ã‚Œã¾ã™: + +```xml + + + zoo01.clickhouse.com + 2181 + + + zoo02.clickhouse.com + 2181 + + + zoo03.clickhouse.com + 2181 + + +``` + +ã¾ãŸã€ãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã¨ãƒ¬ãƒ—リカを識別ã™ã‚‹ãŸã‚ã®ãƒžã‚¯ãƒ­ã‚’設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: + +```xml + + 01 + 01 + +``` + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ä½œæˆæ™‚ã«ãƒ¬ãƒ—リカãŒå­˜åœ¨ã—ãªã„å ´åˆã€æ–°ã—ã„最åˆã®ãƒ¬ãƒ—リカãŒã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•ã‚Œã¾ã™ã€‚ã™ã§ã«ãƒ©ã‚¤ãƒ–レプリカãŒã‚ã‚‹å ´åˆã€æ–°ã—ã„レプリカã¯æ—¢å­˜ã®ã‚‚ã®ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’クローンã—ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを先ã«ä½œæˆã—ã¦ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã‹ã€ã‚ã‚‹ã„ã¯ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ä¸­ã¾ãŸã¯å¾Œã«ä»–ã®ãƒ¬ãƒ—リカを追加ã™ã‚‹ã‹ã®ã„ãšã‚Œã‹ã®ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +CREATE TABLE tutorial.hits_replica (...) +ENGINE = ReplicatedMergeTree( + '/clickhouse_perftest/tables/{shard}/hits', + '{replica}' +) +... +``` + +ã“ã“ã§ã¯ã€[ReplicatedMergeTree](../engines/table-engines/mergetree-family/replication.md) テーブルエンジンを使用ã—ã¦ã„ã¾ã™ã€‚パラメーターã§ã¯ã€ã‚·ãƒ£ãƒ¼ãƒ‰ã¨ãƒ¬ãƒ—リカ識別å­ã‚’å«ã‚€ ZooKeeper パスを指定ã—ã¾ã™ã€‚ + +```sql +INSERT INTO tutorial.hits_replica SELECT * FROM tutorial.hits_local; +``` + +レプリケーションã¯ãƒžãƒ«ãƒãƒžã‚¹ã‚¿ãƒ¼ãƒ¢ãƒ¼ãƒ‰ã§å‹•ä½œã—ã¾ã™ã€‚データã¯ä»»æ„ã®ãƒ¬ãƒ—リカã«ãƒ­ãƒ¼ãƒ‰ã§ãã€ã‚·ã‚¹ãƒ†ãƒ ã¯ä»–ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¨è‡ªå‹•çš„ã«åŒæœŸã—ã¾ã™ã€‚レプリケーションã¯éžåŒæœŸã§ã‚ã‚‹ãŸã‚ã€ã‚る時点ã§ã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカãŒæœ€è¿‘挿入ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ã¨ã¯é™ã‚Šã¾ã›ã‚“。ãŸã ã—ã€ãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ã‚²ã‚¹ãƒˆã‚’許å¯ã™ã‚‹ã«ã¯ã€å°‘ãªãã¨ã‚‚1ã¤ã®ãƒ¬ãƒ—リカãŒç¨¼åƒã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã®ä»–ã®ãƒ¬ãƒ—リカã¯å†ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化ã™ã‚‹ã¨ãƒ‡ãƒ¼ã‚¿ã‚’åŒæœŸã—ã€ä¸€è²«æ€§ã‚’修復ã—ã¾ã™ã€‚ã“ã®æ–¹æ³•ã«ã‚ˆã‚Šã€æœ€è¿‘挿入ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒå¤±ã‚れるå¯èƒ½æ€§ãŒä½Žã„ã¨ã„ã†åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/chdb/data-formats.md b/docs/ja/chdb/data-formats.md new file mode 100644 index 00000000000..dd6a9fff7cb --- /dev/null +++ b/docs/ja/chdb/data-formats.md @@ -0,0 +1,98 @@ +--- +title: ãƒ‡ãƒ¼ã‚¿å½¢å¼ +sidebar_label: ãƒ‡ãƒ¼ã‚¿å½¢å¼ +slug: /ja/chdb/data-formats +description: chDBã®ãƒ‡ãƒ¼ã‚¿å½¢å¼ +keywords: [chdb, データ形å¼] +--- + +データ形å¼ã«ã¤ã„ã¦è¨€ãˆã°ã€chDBã¯ClickHouseã¨100%機能互æ›ã§ã™ã€‚ + +入力形å¼ã¯ã€`File`ã€`URL`ã€ã¾ãŸã¯`S3`ã®ã‚ˆã†ãªãƒ•ã‚¡ã‚¤ãƒ«å¯¾å¿œãƒ†ãƒ¼ãƒ–ルã¸ã®`INSERT`ãŠã‚ˆã³`SELECT`ã«æä¾›ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’解æžã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚出力形å¼ã¯ã€`SELECT`ã®çµæžœã‚’æ•´ç†ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«å¯¾å¿œãƒ†ãƒ¼ãƒ–ルã¸ã®`INSERT`を実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ClickHouseãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿å½¢å¼ã«åŠ ãˆã¦ã€chDBも以下をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +- 出力形å¼ã¨ã—ã¦ã®`ArrowTable`ã€ã‚¿ã‚¤ãƒ—ã¯Pythonã®`pyarrow.Table` +- 入力ãŠã‚ˆã³å‡ºåŠ›å½¢å¼ã¨ã—ã¦ã®`DataFrame`ã€ã‚¿ã‚¤ãƒ—ã¯Pythonã®`pandas.DataFrame`。例ã«ã¤ã„ã¦ã¯ã€[test_joindf.py](https://github.com/chdb-io/chdb/blob/main/tests/test_joindf.py)ã‚’ã”å‚ç…§ãã ã•ã„。 +- 出力ã¨ã—ã¦ã®`Debug`(`CSV`ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¨ã—ã¦ï¼‰ã€ãŸã ã—ClickHouseã‹ã‚‰ã®ãƒ‡ãƒãƒƒã‚°å†—長出力を有効ã«ã—ã¦ã„ã¾ã™ã€‚ + +ClickHouseãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿å½¢å¼ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +| Format | Input | Output | +|---------------------------------|-------|--------| +| TabSeparated | ✔ | ✔ | +| TabSeparatedRaw | ✔ | ✔ | +| TabSeparatedWithNames | ✔ | ✔ | +| TabSeparatedWithNamesAndTypes | ✔ | ✔ | +| TabSeparatedRawWithNames | ✔ | ✔ | +| TabSeparatedRawWithNamesAndTypes| ✔ | ✔ | +| Template | ✔ | ✔ | +| TemplateIgnoreSpaces | ✔ | ✗ | +| CSV | ✔ | ✔ | +| CSVWithNames | ✔ | ✔ | +| CSVWithNamesAndTypes | ✔ | ✔ | +| CustomSeparated | ✔ | ✔ | +| CustomSeparatedWithNames | ✔ | ✔ | +| CustomSeparatedWithNamesAndTypes| ✔ | ✔ | +| SQLInsert | ✗ | ✔ | +| Values | ✔ | ✔ | +| Vertical | ✗ | ✔ | +| JSON | ✔ | ✔ | +| JSONAsString | ✔ | ✗ | +| JSONStrings | ✔ | ✔ | +| JSONColumns | ✔ | ✔ | +| JSONColumnsWithMetadata | ✔ | ✔ | +| JSONCompact | ✔ | ✔ | +| JSONCompactStrings | ✗ | ✔ | +| JSONCompactColumns | ✔ | ✔ | +| JSONEachRow | ✔ | ✔ | +| PrettyJSONEachRow | ✗ | ✔ | +| JSONEachRowWithProgress | ✗ | ✔ | +| JSONStringsEachRow | ✔ | ✔ | +| JSONStringsEachRowWithProgress | ✗ | ✔ | +| JSONCompactEachRow | ✔ | ✔ | +| JSONCompactEachRowWithNames | ✔ | ✔ | +| JSONCompactEachRowWithNamesAndTypes | ✔ | ✔ | +| JSONCompactStringsEachRow | ✔ | ✔ | +| JSONCompactStringsEachRowWithNames | ✔ | ✔ | +| JSONCompactStringsEachRowWithNamesAndTypes | ✔ | ✔ | +| JSONObjectEachRow | ✔ | ✔ | +| BSONEachRow | ✔ | ✔ | +| TSKV | ✔ | ✔ | +| Pretty | ✗ | ✔ | +| PrettyNoEscapes | ✗ | ✔ | +| PrettyMonoBlock | ✗ | ✔ | +| PrettyNoEscapesMonoBlock | ✗ | ✔ | +| PrettyCompact | ✗ | ✔ | +| PrettyCompactNoEscapes | ✗ | ✔ | +| PrettyCompactMonoBlock | ✗ | ✔ | +| PrettyCompactNoEscapesMonoBlock | ✗ | ✔ | +| PrettySpace | ✗ | ✔ | +| PrettySpaceNoEscapes | ✗ | ✔ | +| PrettySpaceMonoBlock | ✗ | ✔ | +| PrettySpaceNoEscapesMonoBlock | ✗ | ✔ | +| Prometheus | ✗ | ✔ | +| Protobuf | ✔ | ✔ | +| ProtobufSingle | ✔ | ✔ | +| Avro | ✔ | ✔ | +| AvroConfluent | ✔ | ✗ | +| Parquet | ✔ | ✔ | +| ParquetMetadata | ✔ | ✗ | +| Arrow | ✔ | ✔ | +| ArrowStream | ✔ | ✔ | +| ORC | ✔ | ✔ | +| One | ✔ | ✗ | +| RowBinary | ✔ | ✔ | +| RowBinaryWithNames | ✔ | ✔ | +| RowBinaryWithNamesAndTypes | ✔ | ✔ | +| RowBinaryWithDefaults | ✔ | ✔ | +| Native | ✔ | ✔ | +| Null | ✗ | ✔ | +| XML | ✗ | ✔ | +| CapnProto | ✔ | ✔ | +| LineAsString | ✔ | ✔ | +| Regexp | ✔ | ✗ | +| RawBLOB | ✔ | ✔ | +| MsgPack | ✔ | ✔ | +| MySQLDump | ✔ | ✗ | +| Markdown | ✗ | ✔ | + +詳細ãŠã‚ˆã³ä¾‹ã«ã¤ã„ã¦ã¯ã€[ClickHouseã®å…¥åŠ›ãŠã‚ˆã³å‡ºåŠ›ãƒ‡ãƒ¼ã‚¿å½¢å¼](/docs/ja/interfaces/formats)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/chdb/getting-started.md b/docs/ja/chdb/getting-started.md new file mode 100644 index 00000000000..1d957bb91ad --- /dev/null +++ b/docs/ja/chdb/getting-started.md @@ -0,0 +1,367 @@ +--- +title: chDBã®ä½¿ã„始゠+sidebar_label: 使ã„始゠+slug: /ja/chdb/getting-started +description: chDBã¯ClickHouseã«ã‚ˆã£ã¦ãƒ‘ワードã•ã‚ŒãŸãƒ—ロセス内SQL OLAPエンジンã§ã™ +keywords: [chdb, embedded, clickhouse-lite, in-process, in process] +--- + +# chDBã®ä½¿ã„始゠+ +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€chDBã®Pythonãƒãƒªã‚¢ãƒ³ãƒˆã‚’セットアップã—ã¦ã„ãã¾ã™ã€‚ã¾ãšã€S3上ã®JSONファイルã«ã‚¯ã‚¨ãƒªã‚’実行ã—ã€ãれを基ã«chDBã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’è¡Œã„ã¾ã™ã€‚ã•ã‚‰ã«ã€ã‚¯ã‚¨ãƒªçµæžœã‚’Apache Arrowã‚„Pandasãªã©ç•°ãªã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§å–å¾—ã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã€æœ€çµ‚çš„ã«ã¯Pandas DataFrameã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹æ–¹æ³•ã‚’紹介ã—ã¾ã™ã€‚ + +## セットアップ + +ã¾ãšã¯ä»®æƒ³ç’°å¢ƒã‚’作æˆã—ã¾ã™: + +```bash +python -m venv .venv +source .venv/bin/activate +``` + +次ã«chDBをインストールã—ã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³2.0.3以上ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„: + +```bash +pip install "chdb>=2.0.2" +``` + +ãã—ã¦[ipython](https://ipython.org/)をインストールã—ã¾ã™: + +```bash +pip install ipython +``` + +ã“ã®ã‚¬ã‚¤ãƒ‰ã®æ®‹ã‚Šã§ã¯`ipython`を使ã£ã¦ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã§`ipython`ã‚’èµ·å‹•ã§ãã¾ã™: + +```bash +ipython +``` + +ã•ã‚‰ã«ã€Pandasã¨Apache Arrowを使用ã™ã‚‹ã®ã§ã€ãれらã®ãƒ©ã‚¤ãƒ–ラリもインストールã—ã¾ã™: + +```bash +pip install pandas pyarrow +``` + +## S3上ã«ã‚ã‚‹JSONファイルã«ã‚¯ã‚¨ãƒª + +次ã«ã€S3ãƒã‚±ãƒƒãƒˆã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹JSONファイルã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªã‚’è¡Œã†æ–¹æ³•ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚[YouTubeã®éžè¡¨ç¤ºãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ](https://clickhouse.com/docs/ja/getting-started/example-datasets/youtube-dislikes)ã«ã¯ã€2021å¹´ã¾ã§ã®YouTubeå‹•ç”»ã®éžè¡¨ç¤ºæ•°ãŒ4億以上å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®JSONファイルã®1ã¤ã‚’使ã£ã¦ã„ãã¾ã™ã€‚ + +chdbをインãƒãƒ¼ãƒˆã—ã¾ã™: + +```python +import chdb +``` + +次ã®ã‚¯ã‚¨ãƒªã§ã€JSONファイルã®æ§‹é€ ã‚’調ã¹ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```python +chdb.query( + """ + DESCRIBE s3( + 's3://clickhouse-public-datasets/youtube/original/files/' || + 'youtubedislikes_20211127161229_18654868.1637897329_vid.json.zst', + 'JSONLines' + ) + SETTINGS describe_compact_output=1 + """ +) +``` + +```text +"id","Nullable(String)" +"fetch_date","Nullable(String)" +"upload_date","Nullable(String)" +"title","Nullable(String)" +"uploader_id","Nullable(String)" +"uploader","Nullable(String)" +"uploader_sub_count","Nullable(Int64)" +"is_age_limit","Nullable(Bool)" +"view_count","Nullable(Int64)" +"like_count","Nullable(Int64)" +"dislike_count","Nullable(Int64)" +"is_crawlable","Nullable(Bool)" +"is_live_content","Nullable(Bool)" +"has_subtitles","Nullable(Bool)" +"is_ads_enabled","Nullable(Bool)" +"is_comments_enabled","Nullable(Bool)" +"description","Nullable(String)" +"rich_metadata","Array(Tuple( + call Nullable(String), + content Nullable(String), + subtitle Nullable(String), + title Nullable(String), + url Nullable(String)))" +"super_titles","Array(Tuple( + text Nullable(String), + url Nullable(String)))" +"uploader_badges","Nullable(String)" +"video_badges","Nullable(String)" +``` + +ã¾ãŸã€ãã®ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®è¡Œæ•°ã‚’カウントã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +```python +chdb.query( + """ + SELECT count() + FROM s3( + 's3://clickhouse-public-datasets/youtube/original/files/' || + 'youtubedislikes_20211127161229_18654868.1637897329_vid.json.zst', + 'JSONLines' + )""" +) +``` + +```text +336432 +``` + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯30万以上ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +chDBã¯ã¾ã ã‚¯ã‚¨ãƒªãƒ‘ラメータã®å—ã‘渡ã—をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“ãŒã€ãƒ‘スをå–り出ã—ã¦f-Stringを使ã£ã¦æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```python +path = 's3://clickhouse-public-datasets/youtube/original/files/youtubedislikes_20211127161229_18654868.1637897329_vid.json.zst' +``` + +```python +chdb.query( + f""" + SELECT count() + FROM s3('{path}','JSONLines') + """ +) +``` + +:::warning +ã“ã‚Œã¯ãƒ—ログラム内ã§å®šç¾©ã•ã‚ŒãŸå¤‰æ•°ã‚’使用ã™ã‚‹é™ã‚Šã§ã¯å•é¡Œã‚ã‚Šã¾ã›ã‚“ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰æä¾›ã•ã‚ŒãŸå…¥åŠ›ã§è¡Œã†ã¨ã€ã‚¯ã‚¨ãƒªãŒSQLインジェクションã«å¯¾ã—ã¦è„†å¼±ã«ãªã‚Šã¾ã™ã€‚ +::: + +## 出力フォーマットã®è¨­å®š + +デフォルトã®å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯`CSV`ã§ã™ãŒã€`output_format`パラメータを使ã£ã¦å¤‰æ›´ã§ãã¾ã™ã€‚chDBã¯ClickHouseã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«åŠ ãˆã€`DataFrame`ãªã©[chDB独自ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ](data-formats.md)をサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€Pandas DataFrameã‚’è¿”ã—ã¾ã™: + +```python +result = chdb.query( + f""" + SELECT is_ads_enabled, count() + FROM s3('{path}','JSONLines') + GROUP BY ALL + """, + output_format="DataFrame" +) + +print(type(result)) +print(result) +``` + +```text + + is_ads_enabled count() +0 False 301125 +1 True 35307 +``` + +ã¾ãŸã€Apache Arrowテーブルをå–å¾—ã—ãŸã„å ´åˆã¯: + +```python +result = chdb.query( + f""" + SELECT is_live_content, count() + FROM s3('{path}','JSONLines') + GROUP BY ALL + """, + output_format="ArrowTable" +) + +print(type(result)) +print(result) +``` + +```text + +pyarrow.Table +is_live_content: bool +count(): uint64 not null +---- +is_live_content: [[false,true]] +count(): [[315746,20686]] +``` + +## JSONファイルã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã®ä½œæˆ + +次ã«ã€chDBã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹æ–¹æ³•ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ã“れを行ã†ã«ã¯ã€ç•°ãªã‚‹APIを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã®ã§ã€ã¾ãšãれをインãƒãƒ¼ãƒˆã—ã¾ã™: + +```python +from chdb import session as chs +``` + +次ã«ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’åˆæœŸåŒ–ã—ã¾ã™ã€‚セッションをディスクã«ä¿å­˜ã—ãŸã„å ´åˆã¯ã€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªåを指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れを空ã«ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ãƒ¡ãƒ¢ãƒªä¸Šã«é…ç½®ã•ã‚Œã€Pythonã®ãƒ—ロセスを終了ã™ã‚‹ã¨æ¶ˆåŽ»ã•ã‚Œã¾ã™ã€‚ + +```python +sess = chs.Session("gettingStarted.chdb") +``` + +次ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã—ã¾ã™: + +```python +sess.query("CREATE DATABASE IF NOT EXISTS youtube") +``` + +次ã«ã€JSONファイルã®ã‚¹ã‚­ãƒ¼ãƒžã«åŸºã¥ã„ã¦`dislikes`テーブルを`CREATE...EMPTY AS`技法を使ã£ã¦ä½œæˆã—ã¾ã™ã€‚カラムã®åž‹ã‚’ã™ã¹ã¦`Nullable`ã«ã—ãªã„よã†ã«[`schema_inference_make_columns_nullable`](/docs/ja/operations/settings/formats/#schema_inference_make_columns_nullable)設定を使用ã—ã¾ã™ã€‚ + +```python +sess.query(f""" + CREATE TABLE youtube.dislikes + ORDER BY fetch_date + EMPTY AS + SELECT * + FROM s3('{path}','JSONLines') + SETTINGS schema_inference_make_columns_nullable=0 + """ +) +``` + +ãã®å¾Œã€`DESCRIBE`å¥ã‚’使ã£ã¦ã‚¹ã‚­ãƒ¼ãƒžã‚’確èªã§ãã¾ã™: + +```python +sess.query(f""" + DESCRIBE youtube.dislikes + SETTINGS describe_compact_output=1 + """ +) +``` + +```text +"id","String" +"fetch_date","String" +"upload_date","String" +"title","String" +"uploader_id","String" +"uploader","String" +"uploader_sub_count","Int64" +"is_age_limit","Bool" +"view_count","Int64" +"like_count","Int64" +"dislike_count","Int64" +"is_crawlable","Bool" +"is_live_content","Bool" +"has_subtitles","Bool" +"is_ads_enabled","Bool" +"is_comments_enabled","Bool" +"description","String" +"rich_metadata","Array(Tuple( + call String, + content String, + subtitle String, + title String, + url String))" +"super_titles","Array(Tuple( + text String, + url String))" +"uploader_badges","String" +"video_badges","String" +``` + +次ã«ã€ãã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™: + +```python +sess.query(f""" + INSERT INTO youtube.dislikes + SELECT * + FROM s3('{path}','JSONLines') + SETTINGS schema_inference_make_columns_nullable=0 + """ +) +``` + +ã“れらã®ã‚¹ãƒ†ãƒƒãƒ—ã‚’1回ã®æ“作ã§è¡Œã†ã“ã¨ã‚‚ã§ãã¾ã™ã€‚`CREATE...AS`技法を使ã£ã¦ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¦ã¿ã¾ã™: + +```python +sess.query(f""" + CREATE TABLE youtube.dislikes2 + ORDER BY fetch_date + AS + SELECT * + FROM s3('{path}','JSONLines') + SETTINGS schema_inference_make_columns_nullable=0 + """ +) +``` + +## テーブルã¸ã®ã‚¯ã‚¨ãƒª + +最後ã«ã€ãƒ†ãƒ¼ãƒ–ルã«ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™: + +```sql +df = sess.query(""" + SELECT uploader, sum(view_count) AS viewCount, sum(like_count) AS likeCount, sum(dislike_count) AS dislikeCount + FROM youtube.dislikes + GROUP BY ALL + ORDER BY viewCount DESC + LIMIT 10 + """, + "DataFrame" +) +df +``` + +```text + uploader viewCount likeCount dislikeCount +0 Jeremih 139066569 812602 37842 +1 TheKillersMusic 109313116 529361 11931 +2 LetsGoMartin- Canciones Infantiles 104747788 236615 141467 +3 Xiaoying Cuisine 54458335 1031525 37049 +4 Adri 47404537 279033 36583 +5 Diana and Roma IND 43829341 182334 148740 +6 ChuChuTV Tamil 39244854 244614 213772 +7 Cheez-It 35342270 108 27 +8 Anime Uz 33375618 1270673 60013 +9 RC Cars OFF Road 31952962 101503 49489 +``` + +例ãˆã°ã€æ¬¡ã«DataFrameã«likesã¨dislikesã®æ¯”率を計算ã™ã‚‹ã‚«ãƒ©ãƒ ã‚’追加ã™ã‚‹å ´åˆã€æ¬¡ã®ã‚³ãƒ¼ãƒ‰ã‚’書ãã“ã¨ãŒã§ãã¾ã™: + +```python +df["likeDislikeRatio"] = df["likeCount"] / df["dislikeCount"] +``` + +## Pandas DataFrameã¸ã®ã‚¯ã‚¨ãƒª + +次ã«ã€ãã®DataFrameã«å¯¾ã—ã¦chDBã‹ã‚‰ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™: + +```python +chdb.query( + """ + SELECT uploader, likeDislikeRatio + FROM Python(df) + """, + output_format="DataFrame" +) +``` + +```text + uploader likeDislikeRatio +0 Jeremih 21.473548 +1 TheKillersMusic 44.368536 +2 LetsGoMartin- Canciones Infantiles 1.672581 +3 Xiaoying Cuisine 27.842182 +4 Adri 7.627395 +5 Diana and Roma IND 1.225857 +6 ChuChuTV Tamil 1.144275 +7 Cheez-It 4.000000 +8 Anime Uz 21.173296 +9 RC Cars OFF Road 2.051021 +``` + +Pandas DataFrameã¸ã®ã‚¯ã‚¨ãƒªã«ã¤ã„ã¦ã®è©³ç´°ã¯[Querying Pandas developer guide](guides/querying-pandas.md)ã§è©³ã—ã説明ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## 次ã®ã‚¹ãƒ†ãƒƒãƒ— + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§chDBã®æ¦‚è¦ãŒç†è§£ã§ããŸã§ã—ょã†ã‹ã€‚ã•ã‚‰ãªã‚‹å­¦ç¿’ã«ã¯ã€ä»¥ä¸‹ã®ãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーガイドをã”å‚ç…§ãã ã•ã„: + +* [Pandas DataFrameã¸ã®ã‚¯ã‚¨ãƒª](guides/querying-pandas.md) +* [Apache Arrowã¸ã®ã‚¯ã‚¨ãƒª](guides/querying-apache-arrow.md) +* [JupySQLã§ã®chDBã®ä½¿ç”¨](guides/jupysql.md) +* [既存ã®clickhouse-localデータベースã§ã®chDBã®ä½¿ç”¨](guides/clickhouse-local.md) diff --git a/docs/ja/chdb/guides/clickhouse-local.md b/docs/ja/chdb/guides/clickhouse-local.md new file mode 100644 index 00000000000..850e4802656 --- /dev/null +++ b/docs/ja/chdb/guides/clickhouse-local.md @@ -0,0 +1,127 @@ +--- +title: clickhouse-localデータベースã®ä½¿ç”¨æ–¹æ³• +sidebar_label: clickhouse-localデータベースã®ä½¿ç”¨æ–¹æ³• +slug: /ja/chdb/guides/clickhouse-local +description: chDBã§clickhouse-localデータベースを使用ã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ +keywords: [chdb, clickhouse-local] +--- + +[clickhouse-local](/ja/operations/utilities/clickhouse-local) ã¯ã€ClickHouseã®åŸ‹ã‚è¾¼ã¿ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã™ã‚‹CLIã§ã‚ã‚Šã€ã‚µãƒ¼ãƒãƒ¼ã‚’インストールã™ã‚‹ã“ã¨ãªãClickHouseã®æ©Ÿèƒ½ã‚’利用ã§ãるよã†ã«ã—ã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€chDBã‹ã‚‰clickhouse-localデータベースを使用ã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ + +## セットアップ + +最åˆã«ä»®æƒ³ç’°å¢ƒã‚’作æˆã—ã¾ã—ょã†ï¼š + +```bash +python -m venv .venv +source .venv/bin/activate +``` + +次ã«ã€chDBをインストールã—ã¾ã™ã€‚ +ãƒãƒ¼ã‚¸ãƒ§ãƒ³2.0.2以上ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„: + +```bash +pip install "chdb>=2.0.2" +``` + +続ã„ã¦[ipython](https://ipython.org/)をインストールã—ã¾ã™ï¼š + +```bash +pip install ipython +``` + +ã“ã®ã‚¬ã‚¤ãƒ‰ã®æ®‹ã‚Šã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ãŸã‚ã«`ipython`を使用ã—ã¾ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã§èµ·å‹•ã§ãã¾ã™ï¼š + +```bash +ipython +``` + +## clickhouse-localã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +clickhouse-localã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¨ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã¯ã€[ClickHouseã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¨ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«](https://clickhouse.com/docs/ja/install)ã¨åŒã˜ã§ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + +```bash +curl https://clickhouse.com/ | sh +``` + +データをディレクトリã«ä¿å­˜ã—ã¦clickhouse-localã‚’èµ·å‹•ã™ã‚‹ã«ã¯ã€`--path`を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```bash +./clickhouse -m --path demo.chdb +``` + +## clickhouse-localã«ãƒ‡ãƒ¼ã‚¿ã‚’å–り込む + +デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ãƒ¡ãƒ¢ãƒªã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ã ã‘ãªã®ã§ã€ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿æŒã™ã‚‹ã«ã¯åå‰ä»˜ãデータベースを作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +CREATE DATABASE foo; +``` + +次ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãƒ©ãƒ³ãƒ€ãƒ ãªæ•°å€¤ã‚’挿入ã—ã¾ã™ï¼š + +```sql +CREATE TABLE foo.randomNumbers +ORDER BY number AS +SELECT rand() AS number +FROM numbers(10_000_000); +``` + +データを確èªã™ã‚‹ãŸã‚ã«ã‚¯ã‚¨ãƒªã‚’実行ã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT quantilesExact(0, 0.5, 0.75, 0.99)(number) AS quants +FROM foo.randomNumbers + +┌─quants────────────────────────────────┠+│ [69,2147776478,3221525118,4252096960] │ +└───────────────────────────────────────┘ +``` + +ãã®å¾Œã€CLIã‹ã‚‰`exit;`ã™ã‚‹ã“ã¨ã‚’忘れãªã„ã§ãã ã•ã„。ディレクトリã«å¯¾ã™ã‚‹ãƒ­ãƒƒã‚¯ã‚’ä¿æŒã§ãã‚‹ã®ã¯ä¸€ã¤ã®ãƒ—ロセスã ã‘ã§ã™ã€‚ã“ã®æ“作を怠るã¨ã€chDBã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã—よã†ã¨ã—ãŸã¨ãã«æ¬¡ã®ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ï¼š + +```text +ChdbError: Code: 76. DB::Exception: Cannot lock file demo.chdb/status. Another server instance in same directory is already running. (CANNOT_OPEN_FILE) +``` + +## clickhouse-localデータベースã¸ã®æŽ¥ç¶š + +`ipython`シェルã«æˆ»ã‚Šã€chDBã‹ã‚‰`session`モジュールをインãƒãƒ¼ãƒˆã—ã¾ã™ï¼š + +```python +from chdb import session as chs +``` + +`demo.chdb`を指ã™ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’åˆæœŸåŒ–ã—ã¾ã™ï¼š + +``` +sess = chs.Session("demo.chdb") +``` + +次ã«ã€æ•°å€¤ã®åˆ†ä½ã‚’è¿”ã™åŒã˜ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ï¼š + +```python +sess.query(""" +SELECT quantilesExact(0, 0.5, 0.75, 0.99)(number) AS quants +FROM foo.randomNumbers +""", "Vertical") + +Row 1: +────── +quants: [0,9976599,2147776478,4209286886] +``` + +chDBã‹ã‚‰ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```python +sess.query(""" +INSERT INTO foo.randomNumbers +SELECT rand() AS number FROM numbers(10_000_000) +""") + +Row 1: +────── +quants: [0,9976599,2147776478,4209286886] +``` + +ãã®å¾Œã€chDBã¾ãŸã¯clickhouse-localã‹ã‚‰åˆ†ä½æ•°ã‚¯ã‚¨ãƒªã‚’å†å®Ÿè¡Œã§ãã¾ã™ã€‚ diff --git a/docs/ja/chdb/guides/images/players_per_rank.png b/docs/ja/chdb/guides/images/players_per_rank.png new file mode 100644 index 00000000000..16ca6da241d Binary files /dev/null and b/docs/ja/chdb/guides/images/players_per_rank.png differ diff --git a/docs/ja/chdb/guides/jupysql.md b/docs/ja/chdb/guides/jupysql.md new file mode 100644 index 00000000000..281ffbcff18 --- /dev/null +++ b/docs/ja/chdb/guides/jupysql.md @@ -0,0 +1,420 @@ +--- +title: JupySQLã¨chDB +sidebar_label: JupySQL +slug: /ja/chdb/guides/jupysql +description: Bunã®ãŸã‚ã®chDBã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ–¹æ³• +keywords: [chdb, jupysql] +--- + +[JupySQL](https://jupysql.ploomber.io/en/latest/quick-start.html) ã¯ã€JupyterノートブックやiPythonシェルã§SQLを実行ã™ã‚‹ãŸã‚ã®Pythonライブラリã§ã™ã€‚ +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€chDBã¨JupySQLを使ã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ + +
+ +
+ +## セットアップ + +ã¾ãšã€ä»®æƒ³ç’°å¢ƒã‚’作æˆã—ã¾ã—ょã†ï¼š + +```bash +python -m venv .venv +source .venv/bin/activate +``` + +次ã«ã€JupySQLã€iPythonã€ãŠã‚ˆã³Jupyter Labをインストールã—ã¾ã™ï¼š + +```bash +pip install jupysql ipython jupyterlab +``` + +iPythonã§JupySQLを使用ã§ãるよã†ã«ã€ä»¥ä¸‹ã‚’実行ã—ã¦èµ·å‹•ã—ã¾ã™ï¼š + +```bash +ipython +``` + +ã‚ã‚‹ã„ã¯ã€Jupyter Labã§ä»¥ä¸‹ã‚’実行ã—ã¦èµ·å‹•ã§ãã¾ã™ï¼š + +```bash +jupyter lab +``` + +:::note +Jupyter Labを使用ã—ã¦ã„ã‚‹å ´åˆã€ã‚¬ã‚¤ãƒ‰ã®ç¶šãã‚’è¡Œã†å‰ã«ãƒŽãƒ¼ãƒˆãƒ–ックを作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## データセットã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ + +[Jeff Sackmannã®tennis_atp](https://github.com/JeffSackmann/tennis_atp) データセットを使用ã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ã€é¸æ‰‹ã¨ãã®ãƒ©ãƒ³ã‚­ãƒ³ã‚°ã«é–¢ã™ã‚‹ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ +最åˆã«ãƒ©ãƒ³ã‚­ãƒ³ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンロードã—ã¾ã—ょã†ï¼š + +```python +from urllib.request import urlretrieve +``` + +```python +files = ['00s', '10s', '20s', '70s', '80s', '90s', 'current'] +base = "https://raw.githubusercontent.com/JeffSackmann/tennis_atp/master" +for file in files: + _ = urlretrieve( + f"{base}/atp_rankings_{file}.csv", + f"atp_rankings_{file}.csv", + ) +``` + +## chDBã¨JupySQLã®è¨­å®š + +次ã«ã€chDBã®`dbapi`モジュールをインãƒãƒ¼ãƒˆã—ã¾ã™ï¼š + +```python +from chdb import dbapi +``` + +ãã—ã¦ã€chDB接続を作æˆã—ã¾ã™ã€‚ +ä¿å­˜ã—ãŸãƒ‡ãƒ¼ã‚¿ã¯ã™ã¹ã¦`atp.chdb`ディレクトリã«ä¿å­˜ã•ã‚Œã¾ã™ï¼š + +```python +conn = dbapi.connect(path="atp.chdb") +``` + +次ã«ã€`sql`マジックをロードã—ã€chDBã¸ã®æŽ¥ç¶šã‚’作æˆã—ã¾ã™ï¼š + +```python +%load_ext sql +%sql conn --alias chdb +``` + +次ã«ã€ã‚¯ã‚¨ãƒªã®çµæžœãŒåˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œãªã„よã†ã«è¡¨ç¤ºåˆ¶é™ã‚’設定ã—ã¾ã™ï¼š + +```python +%config SqlMagic.displaylimit = None +``` + +## CSVファイルã®ãƒ‡ãƒ¼ã‚¿ã‚¯ã‚¨ãƒª + +`atp_rankings`プレフィックスã®ã¤ã„ãŸè¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンロードã—ã¾ã—ãŸã€‚ +`DESCRIBE`å¥ã‚’使ã£ã¦ã‚¹ã‚­ãƒ¼ãƒžã‚’ç†è§£ã—ã¾ã—ょã†ï¼š + +```python +%%sql +DESCRIBE file('atp_rankings*.csv') +SETTINGS describe_compact_output=1, + schema_inference_make_columns_nullable=0 +``` + +```text ++--------------+-------+ +| name | type | ++--------------+-------+ +| ranking_date | Int64 | +| rank | Int64 | +| player | Int64 | +| points | Int64 | ++--------------+-------+ +``` + +ã¾ãŸã€ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã—ã¦ç›´æŽ¥`SELECT`クエリを書ã„ã¦ãƒ‡ãƒ¼ã‚¿ã®å†…容を確èªã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```python +%sql SELECT * FROM file('atp_rankings*.csv') LIMIT 1 +``` + +```text ++--------------+------+--------+--------+ +| ranking_date | rank | player | points | ++--------------+------+--------+--------+ +| 20000110 | 1 | 101736 | 4135 | ++--------------+------+--------+--------+ +``` + +データã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒå°‘ã—ä¸æ€è­°ã§ã™ã€‚ +ã“ã®æ—¥ä»˜ã‚’ãã‚Œã„ã«ã—ã€`REPLACE`å¥ã‚’使ã£ã¦ã‚¯ãƒªãƒ¼ãƒ³ãª`ranking_date`ã‚’è¿”ã—ã¾ã™ï¼š + +```python +%%sql +SELECT * REPLACE ( + toDate(parseDateTime32BestEffort(toString(ranking_date))) AS ranking_date +) +FROM file('atp_rankings*.csv') +LIMIT 10 +SETTINGS schema_inference_make_columns_nullable=0 +``` + +```text ++--------------+------+--------+--------+ +| ranking_date | rank | player | points | ++--------------+------+--------+--------+ +| 2000-01-10 | 1 | 101736 | 4135 | +| 2000-01-10 | 2 | 102338 | 2915 | +| 2000-01-10 | 3 | 101948 | 2419 | +| 2000-01-10 | 4 | 103017 | 2184 | +| 2000-01-10 | 5 | 102856 | 2169 | +| 2000-01-10 | 6 | 102358 | 2107 | +| 2000-01-10 | 7 | 102839 | 1966 | +| 2000-01-10 | 8 | 101774 | 1929 | +| 2000-01-10 | 9 | 102701 | 1846 | +| 2000-01-10 | 10 | 101990 | 1739 | ++--------------+------+--------+--------+ +``` + +## CSVファイルをchDBã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +ã“ã‚Œã§ã“れらCSVファイルã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’テーブルã«ä¿å­˜ã—ã¾ã™ã€‚ +デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã¯ãƒ‡ãƒ¼ã‚¿ãŒãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•ã‚Œãªã„ã®ã§ã€æœ€åˆã«åˆ¥ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```python +%sql CREATE DATABASE atp +``` + +次ã«ã€CSVファイルã®ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‹ã‚‰æ´¾ç”Ÿã™ã‚‹ã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¤`rankings`ã¨ã„ã†ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +```python +%%sql +CREATE TABLE atp.rankings +ENGINE=MergeTree +ORDER BY ranking_date AS +SELECT * REPLACE ( + toDate(parseDateTime32BestEffort(toString(ranking_date))) AS ranking_date +) +FROM file('atp_rankings*.csv') +SETTINGS schema_inference_make_columns_nullable=0 +``` + +テーブル内ã®ãƒ‡ãƒ¼ã‚¿ã‚’ç°¡å˜ã«ç¢ºèªã—ã¾ã—ょã†ï¼š + +```python +%sql SELECT * FROM atp.rankings LIMIT 10 +``` + +```text ++--------------+------+--------+--------+ +| ranking_date | rank | player | points | ++--------------+------+--------+--------+ +| 2000-01-10 | 1 | 101736 | 4135 | +| 2000-01-10 | 2 | 102338 | 2915 | +| 2000-01-10 | 3 | 101948 | 2419 | +| 2000-01-10 | 4 | 103017 | 2184 | +| 2000-01-10 | 5 | 102856 | 2169 | +| 2000-01-10 | 6 | 102358 | 2107 | +| 2000-01-10 | 7 | 102839 | 1966 | +| 2000-01-10 | 8 | 101774 | 1929 | +| 2000-01-10 | 9 | 102701 | 1846 | +| 2000-01-10 | 10 | 101990 | 1739 | ++--------------+------+--------+--------+ +``` + +見ãŸç›®ã¯è‰¯ã•ãã†ã§ã™ã€‚予想通りã€CSVファイルを直接クエリã—ãŸã¨ãã¨åŒã˜å‡ºåŠ›ã§ã™ã€‚ + +é¸æ‰‹ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ã¤ã„ã¦ã‚‚åŒã˜ãƒ—ロセスã«å¾“ã„ã¾ã™ã€‚ +今回ã¯ãƒ‡ãƒ¼ã‚¿ãŒã™ã¹ã¦å˜ä¸€ã®CSVファイル内ã«ã‚ã‚‹ã®ã§ã€ãã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンロードã—ã¾ã—ょã†ï¼š + +```python +_ = urlretrieve( + f"{base}/atp_players.csv", + "atp_players.csv", +) +``` + +次ã«ã€CSVファイルã®å†…容ã«åŸºã¥ã„ã¦`players`ã¨ã„ã†ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ +ã¾ãŸã€`dob`フィールドを`Date32`åž‹ã«ã—ã¦ãã‚Œã„ã«ã—ã¾ã™ã€‚ + +> ClickHouseã§ã¯ã€`Date`åž‹ã¯1970年以é™ã®æ—¥ä»˜ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚`dob`カラムãŒ1970年以å‰ã®æ—¥ä»˜ã‚’å«ã‚€ãŸã‚ã€ä»£ã‚ã‚Šã«`Date32`型を使用ã—ã¾ã™ã€‚ + +```python +%%sql +CREATE TABLE atp.players +Engine=MergeTree +ORDER BY player_id AS +SELECT * REPLACE ( + makeDate32( + toInt32OrNull(substring(toString(dob), 1, 4)), + toInt32OrNull(substring(toString(dob), 5, 2)), + toInt32OrNull(substring(toString(dob), 7, 2)) + )::Nullable(Date32) AS dob +) +FROM file('atp_players.csv') +SETTINGS schema_inference_make_columns_nullable=0 +``` + +実行ãŒå®Œäº†ã—ãŸã‚‰ã€å–り込んã ãƒ‡ãƒ¼ã‚¿ã‚’確èªã—ã¦ã¿ã¾ã—ょã†ï¼š + +```python +%sql SELECT * FROM atp.players LIMIT 10 +``` + +```text ++-----------+------------+-----------+------+------------+-----+--------+-------------+ +| player_id | name_first | name_last | hand | dob | ioc | height | wikidata_id | ++-----------+------------+-----------+------+------------+-----+--------+-------------+ +| 100001 | Gardnar | Mulloy | R | 1913-11-22 | USA | 185 | Q54544 | +| 100002 | Pancho | Segura | R | 1921-06-20 | ECU | 168 | Q54581 | +| 100003 | Frank | Sedgman | R | 1927-10-02 | AUS | 180 | Q962049 | +| 100004 | Giuseppe | Merlo | R | 1927-10-11 | ITA | 0 | Q1258752 | +| 100005 | Richard | Gonzalez | R | 1928-05-09 | USA | 188 | Q53554 | +| 100006 | Grant | Golden | R | 1929-08-21 | USA | 175 | Q3115390 | +| 100007 | Abe | Segal | L | 1930-10-23 | RSA | 0 | Q1258527 | +| 100008 | Kurt | Nielsen | R | 1930-11-19 | DEN | 0 | Q552261 | +| 100009 | Istvan | Gulyas | R | 1931-10-14 | HUN | 0 | Q51066 | +| 100010 | Luis | Ayala | R | 1932-09-18 | CHI | 170 | Q1275397 | ++-----------+------------+-----------+------+------------+-----+--------+-------------+ +``` + +## chDBã§ã®ã‚¯ã‚¨ãƒª + +データã®å–ã‚Šè¾¼ã¿ãŒå®Œäº†ã—ãŸã®ã§ã€ã„よã„よ楽ã—ã„部分ã§ã™ - データをクエリã—ã¾ã—ょã†ï¼ + +テニスé¸æ‰‹ã¯ã€å‚戦ã—ãŸãƒˆãƒ¼ãƒŠãƒ¡ãƒ³ãƒˆã§ã®æˆç¸¾ã«åŸºã¥ã„ã¦ãƒã‚¤ãƒ³ãƒˆã‚’ç²å¾—ã—ã¾ã™ã€‚ +ãƒã‚¤ãƒ³ãƒˆã¯52週間ã®ãƒ­ãƒ¼ãƒªãƒ³ã‚°æœŸé–“ã§å„é¸æ‰‹ã«å¯¾ã—ã¦è©•ä¾¡ã•ã‚Œã¾ã™ã€‚ +å„é¸æ‰‹ãŒç²å¾—ã—ãŸæœ€å¤§ãƒã‚¤ãƒ³ãƒˆã¨ãã®æ™‚ã®ãƒ©ãƒ³ã‚­ãƒ³ã‚°ã‚’見ã¤ã‘るクエリを書ãã¾ã™ï¼š + +```python +%%sql +SELECT name_first, name_last, + max(points) as maxPoints, + argMax(rank, points) as rank, + argMax(ranking_date, points) as date +FROM atp.players +JOIN atp.rankings ON rankings.player = players.player_id +GROUP BY ALL +ORDER BY maxPoints DESC +LIMIT 10 +``` + +```text ++------------+-----------+-----------+------+------------+ +| name_first | name_last | maxPoints | rank | date | ++------------+-----------+-----------+------+------------+ +| Novak | Djokovic | 16950 | 1 | 2016-06-06 | +| Rafael | Nadal | 15390 | 1 | 2009-04-20 | +| Andy | Murray | 12685 | 1 | 2016-11-21 | +| Roger | Federer | 12315 | 1 | 2012-10-29 | +| Daniil | Medvedev | 10780 | 2 | 2021-09-13 | +| Carlos | Alcaraz | 9815 | 1 | 2023-08-21 | +| Dominic | Thiem | 9125 | 3 | 2021-01-18 | +| Jannik | Sinner | 8860 | 2 | 2024-05-06 | +| Stefanos | Tsitsipas | 8350 | 3 | 2021-09-20 | +| Alexander | Zverev | 8240 | 4 | 2021-08-23 | ++------------+-----------+-----------+------+------------+ +``` + +ã“ã®ãƒªã‚¹ãƒˆã«ã‚ã‚‹é¸æ‰‹ã®ä¸­ã«ã¯ã€éžå¸¸ã«å¤šãã®ãƒã‚¤ãƒ³ãƒˆã‚’ç²å¾—ã—ãªãŒã‚‰ã‚‚1ä½ã«ãªã‚‰ãªã‹ã£ãŸé¸æ‰‹ãŒã„ã‚‹ã®ãŒèˆˆå‘³æ·±ã„ã§ã™ã€‚ + +## クエリã®ä¿å­˜ + +クエリã¯`%%sql`マジックã®åŒã˜è¡Œã§`--save`パラメータを使用ã—ã¦ä¿å­˜ã§ãã¾ã™ã€‚ +`--no-execute`パラメータã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ + +```python +%%sql --save best_points --no-execute +SELECT name_first, name_last, + max(points) as maxPoints, + argMax(rank, points) as rank, + argMax(ranking_date, points) as date +FROM atp.players +JOIN atp.rankings ON rankings.player = players.player_id +GROUP BY ALL +ORDER BY maxPoints DESC +``` + +ä¿å­˜ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã¨ã€å®Ÿè¡Œå‰ã«å…±é€šãƒ†ãƒ¼ãƒ–ルå¼ï¼ˆCTE)ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ +次ã®ã‚¯ã‚¨ãƒªã§ã¯ã€1ä½ã«ãƒ©ãƒ³ã‚¯ã‚¤ãƒ³ã—ãŸã¨ãã«ãƒ—レーヤーãŒé”æˆã—ãŸæœ€å¤§ãƒã‚¤ãƒ³ãƒˆã‚’計算ã—ã¾ã™ï¼š + +```python +%sql select * FROM best_points WHERE rank=1 +``` + +```text ++-------------+-----------+-----------+------+------------+ +| name_first | name_last | maxPoints | rank | date | ++-------------+-----------+-----------+------+------------+ +| Novak | Djokovic | 16950 | 1 | 2016-06-06 | +| Rafael | Nadal | 15390 | 1 | 2009-04-20 | +| Andy | Murray | 12685 | 1 | 2016-11-21 | +| Roger | Federer | 12315 | 1 | 2012-10-29 | +| Carlos | Alcaraz | 9815 | 1 | 2023-08-21 | +| Pete | Sampras | 5792 | 1 | 1997-08-11 | +| Andre | Agassi | 5652 | 1 | 1995-08-21 | +| Lleyton | Hewitt | 5205 | 1 | 2002-08-12 | +| Gustavo | Kuerten | 4750 | 1 | 2001-09-10 | +| Juan Carlos | Ferrero | 4570 | 1 | 2003-10-20 | +| Stefan | Edberg | 3997 | 1 | 1991-02-25 | +| Jim | Courier | 3973 | 1 | 1993-08-23 | +| Ivan | Lendl | 3420 | 1 | 1990-02-26 | +| Ilie | Nastase | 0 | 1 | 1973-08-27 | ++-------------+-----------+-----------+------+------------+ +``` + +## パラメータを使用ã—ãŸã‚¯ã‚¨ãƒª + +クエリ内ã§ãƒ‘ラメータを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +パラメータã¯é€šå¸¸ã®å¤‰æ•°ã§ã™ï¼š + +```python +rank = 10 +``` + +次ã«`{{variable}}`構文をクエリ内ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ +以下ã®ã‚¯ã‚¨ãƒªã§ã¯ã€ãƒ—レーヤーãŒãƒˆãƒƒãƒ—10ã«ãƒ©ãƒ³ã‚¯ã‚¤ãƒ³ã—ãŸåˆæ—¥ã¨æœ€çµ‚æ—¥ã¨ã®é–“ã®æ—¥æ•°ãŒæœ€çŸ­ã®ãƒ—レーヤーを見ã¤ã‘ã¾ã™ï¼š + +```python +%%sql +SELECT name_first, name_last, + MIN(ranking_date) AS earliest_date, + MAX(ranking_date) AS most_recent_date, + most_recent_date - earliest_date AS days, + 1 + (days/7) AS weeks +FROM atp.rankings +JOIN atp.players ON players.player_id = rankings.player +WHERE rank <= {{rank}} +GROUP BY ALL +ORDER BY days +LIMIT 10 +``` + +```text ++------------+-----------+---------------+------------------+------+-------+ +| name_first | name_last | earliest_date | most_recent_date | days | weeks | ++------------+-----------+---------------+------------------+------+-------+ +| Alex | Metreveli | 1974-06-03 | 1974-06-03 | 0 | 1 | +| Mikael | Pernfors | 1986-09-22 | 1986-09-22 | 0 | 1 | +| Felix | Mantilla | 1998-06-08 | 1998-06-08 | 0 | 1 | +| Wojtek | Fibak | 1977-07-25 | 1977-07-25 | 0 | 1 | +| Thierry | Tulasne | 1986-08-04 | 1986-08-04 | 0 | 1 | +| Lucas | Pouille | 2018-03-19 | 2018-03-19 | 0 | 1 | +| John | Alexander | 1975-12-15 | 1975-12-15 | 0 | 1 | +| Nicolas | Massu | 2004-09-13 | 2004-09-20 | 7 | 2 | +| Arnaud | Clement | 2001-04-02 | 2001-04-09 | 7 | 2 | +| Ernests | Gulbis | 2014-06-09 | 2014-06-23 | 14 | 3 | ++------------+-----------+---------------+------------------+------+-------+ +``` + +## ヒストグラムã®ãƒ—ロット + +JupySQLã«ã¯é™å®šçš„ãªãƒãƒ£ãƒ¼ãƒˆæ©Ÿèƒ½ã‚‚ã‚ã‚Šã¾ã™ã€‚ +ボックスプロットやヒストグラムを作æˆã§ãã¾ã™ã€‚ + +ã“ã“ã§ã¯ã€100ä½ä»¥å†…ã«ãƒ©ãƒ³ã‚¯ã‚¤ãƒ³ã—ãŸãã‚Œãžã‚Œã®ãƒ¬ãƒ³ã‚­ãƒ³ã‚°ã‚’é”æˆã—ãŸé¸æ‰‹ã®æ•°ã‚’カウントã™ã‚‹ãƒ’ストグラムを作æˆã—ã¾ã™ãŒã€ãã®å‰ã«ãƒ—レーヤーãŒé”æˆã—ãŸãƒ©ãƒ³ã‚¯ã‚’計算ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’書ã„ã¦ä¿å­˜ã—ã¾ã—ょã†ï¼š + +```python +%%sql --save players_per_rank --no-execute +select distinct player, rank +FROM atp.rankings +WHERE rank <= 100 +``` + +次ã«ã€æ¬¡ã®æ‰‹é †ã§ãƒ’ストグラムを作æˆã§ãã¾ã™ï¼š + +```python +from sql.ggplot import ggplot, geom_histogram, aes + +plot = ( + ggplot( + table="players_per_rank", + with_="players_per_rank", + mapping=aes(x="rank", fill="#69f0ae", color="#fff"), + ) + geom_histogram(bins=100) +) +``` + +Self-managed ClickHouseã‹ã‚‰ã®ç§»è¡Œ diff --git a/docs/ja/chdb/guides/query-remote-clickhouse.md b/docs/ja/chdb/guides/query-remote-clickhouse.md new file mode 100644 index 00000000000..7e95ce025fb --- /dev/null +++ b/docs/ja/chdb/guides/query-remote-clickhouse.md @@ -0,0 +1,186 @@ +--- +title: リモートClickHouseサーãƒãƒ¼ã¸ã®ã‚¯ã‚¨ãƒªæ–¹æ³• +sidebar_label: リモートClickHouseã¸ã®ã‚¯ã‚¨ãƒª +slug: /ja/chdb/guides/query-remote-clickhouse +description: ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€chDBã‹ã‚‰ãƒªãƒ¢ãƒ¼ãƒˆClickHouseサーãƒãƒ¼ã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹æ–¹æ³•ã‚’学習ã—ã¾ã™ã€‚ +keywords: [chdb, clickhouse] +--- + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€chDBã‹ã‚‰ãƒªãƒ¢ãƒ¼ãƒˆClickHouseサーãƒãƒ¼ã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹æ–¹æ³•ã‚’学習ã—ã¾ã™ã€‚ + +## セットアップ + +ã¾ãšä»®æƒ³ç’°å¢ƒã‚’作æˆã—ã¾ã—ょã†ï¼š + +```bash +python -m venv .venv +source .venv/bin/activate +``` + +次ã«chDBをインストールã—ã¾ã™ã€‚ +ãƒãƒ¼ã‚¸ãƒ§ãƒ³2.0.2以上ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„: + +```bash +pip install "chdb>=2.0.2" +``` + +次ã«pandasã¨ipythonをインストールã—ã¾ã™ï¼š + +```bash +pip install pandas ipython +``` + +ã“ã®ã‚¬ã‚¤ãƒ‰ã®æ®‹ã‚Šã®éƒ¨åˆ†ã§ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ãŸã‚ã«`ipython`を使用ã—ã¾ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã§èµ·å‹•ã§ãã¾ã™ï¼š + +```bash +ipython +``` + +ã¾ãŸã€ã“ã®ã‚³ãƒ¼ãƒ‰ã‚’PythonスクリプトやãŠå¥½ã¿ã®ãƒŽãƒ¼ãƒˆãƒ–ックã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## ClickPyã®ç´¹ä»‹ + +ã“ã‚Œã‹ã‚‰ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ãƒªãƒ¢ãƒ¼ãƒˆClickHouseサーãƒãƒ¼ã¯[ClickPy](https://clickpy.clickhouse.com)ã§ã™ã€‚ +ClickPyã¯PyPiパッケージã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰æ•°ã‚’追跡ã—ã€UIを通ã˜ã¦ãƒ‘ッケージã®çµ±è¨ˆæƒ…報を探るã“ã¨ãŒã§ãã¾ã™ã€‚基礎ã¨ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯`play`ユーザーを使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ã€‚ + +ClickPyã®è©³ç´°ã¯[ãã®GitHubリãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/clickpy)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +## ClickPy ClickHouseサービスã¸ã®ã‚¯ã‚¨ãƒª + +chDBをインãƒãƒ¼ãƒˆã—ã¾ã—ょã†ï¼š + +```python +import chdb +``` + +`remoteSecure`関数を使用ã—ã¦ClickPyã«ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã«ã¯å°‘ãªãã¨ã‚‚ホストåã€ãƒ†ãƒ¼ãƒ–ルåã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åãŒå¿…è¦ã§ã™ã€‚ + +[`openai`パッケージ](https://clickpy.clickhouse.com/dashboard/openai)ã®1æ—¥ã”ã¨ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰æ•°ã‚’Pandas DataFrameã¨ã—ã¦å–å¾—ã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```python +query = """ +SELECT + toStartOfDay(date)::Date32 AS x, + sum(count) AS y +FROM remoteSecure( + 'clickpy-clickhouse.clickhouse.com', + 'pypi.pypi_downloads_per_day', + 'play' +) +WHERE project = 'openai' +GROUP BY x +ORDER BY x ASC +""" + +openai_df = chdb.query(query, "DataFrame") +openai_df.sort_values(by=["x"], ascending=False).head(n=10) +``` + +```text + x y +2392 2024-10-02 1793502 +2391 2024-10-01 1924901 +2390 2024-09-30 1749045 +2389 2024-09-29 1177131 +2388 2024-09-28 1157323 +2387 2024-09-27 1688094 +2386 2024-09-26 1862712 +2385 2024-09-25 2032923 +2384 2024-09-24 1901965 +2383 2024-09-23 1777554 +``` + +次ã«[`scikit-learn`](https://clickpy.clickhouse.com/dashboard/scikit-learn)ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰æ•°ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«åŒã˜ã“ã¨ã‚’è¡Œã£ã¦ã¿ã¾ã—ょã†ï¼š + +```python +query = """ +SELECT + toStartOfDay(date)::Date32 AS x, + sum(count) AS y +FROM remoteSecure( + 'clickpy-clickhouse.clickhouse.com', + 'pypi.pypi_downloads_per_day', + 'play' +) +WHERE project = 'scikit-learn' +GROUP BY x +ORDER BY x ASC +""" + +sklearn_df = chdb.query(query, "DataFrame") +sklearn_df.sort_values(by=["x"], ascending=False).head(n=10) +``` + +```text + x y +2392 2024-10-02 1793502 +2391 2024-10-01 1924901 +2390 2024-09-30 1749045 +2389 2024-09-29 1177131 +2388 2024-09-28 1157323 +2387 2024-09-27 1688094 +2386 2024-09-26 1862712 +2385 2024-09-25 2032923 +2384 2024-09-24 1901965 +2383 2024-09-23 1777554 +``` + +## Pandas DataFrameã®ãƒžãƒ¼ã‚¸ + +ç¾åœ¨ã€2ã¤ã®DataFrameã‚’æŒã£ã¦ã„ã¾ã™ã€‚ã“れを日付(`x`カラム)を基ã«ã—ã¦ãƒžãƒ¼ã‚¸ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```python +df = openai_df.merge( + sklearn_df, + on="x", + suffixes=("_openai", "_sklearn") +) +df.head(n=5) +``` + +```text + x y_openai y_sklearn +0 2018-02-26 83 33971 +1 2018-02-27 31 25211 +2 2018-02-28 8 26023 +3 2018-03-01 8 20912 +4 2018-03-02 5 23842 +``` + +次ã«ã€ã“ã®ã‚ˆã†ã«ã—ã¦OpenAIã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰æ•°ã¨scikit-learnã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰æ•°ã®æ¯”率を計算ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```python +df['ratio'] = df['y_openai'] / df['y_sklearn'] +df.head(n=5) +``` + +```text + x y_openai y_sklearn ratio +0 2018-02-26 83 33971 0.002443 +1 2018-02-27 31 25211 0.001230 +2 2018-02-28 8 26023 0.000307 +3 2018-03-01 8 20912 0.000383 +4 2018-03-02 5 23842 0.000210 +``` + +## Pandas DataFrameã®ã‚¯ã‚¨ãƒª + +次ã«ã€æœ€ã‚‚良ã„比率ã¨æœ€æ‚ªã®æ¯”率ã®æ—¥ä»˜ã‚’探ã—ãŸã„ã¨ã—ã¾ã™ã€‚ +chDBã«æˆ»ã£ã¦ã“れらã®å€¤ã‚’計算ã—ã¾ã™ï¼š + +```python +chdb.query(""" +SELECT max(ratio) AS bestRatio, + argMax(x, ratio) AS bestDate, + min(ratio) AS worstRatio, + argMin(x, ratio) AS worstDate +FROM Python(df) +""", "DataFrame") +``` + +```text + bestRatio bestDate worstRatio worstDate +0 0.693855 2024-09-19 0.000003 2020-02-09 +``` + +Pandas DataFrameã¸ã®ã‚¯ã‚¨ãƒªã«ã¤ã„ã¦ã•ã‚‰ã«å­¦ã³ãŸã„å ´åˆã¯ã€[Pandas DataFrames 開発者ガイド](querying-pandas.md)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/chdb/guides/querying-apache-arrow.md b/docs/ja/chdb/guides/querying-apache-arrow.md new file mode 100644 index 00000000000..af3e1f0a6e0 --- /dev/null +++ b/docs/ja/chdb/guides/querying-apache-arrow.md @@ -0,0 +1,169 @@ +--- +title: chDBã§Apache Arrowをクエリã™ã‚‹æ–¹æ³• +sidebar_label: Apache Arrowをクエリã™ã‚‹ +slug: /ja/chdb/guides/apache-arrow +description: ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€chDBを使用ã—ã¦Apache Arrowテーブルをクエリã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ +keywords: [chdb, apache-arrow] +--- + +[Apache Arrow](https://arrow.apache.org/) ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚³ãƒŸãƒ¥ãƒ‹ãƒ†ã‚£ã§äººæ°—ã‚’åšã—ã¦ã„る標準化ã•ã‚ŒãŸåˆ—指å‘メモリフォーマットã§ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€`Python`テーブル関数を使用ã—ã¦Apache Arrowをクエリã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ + +## セットアップ + +ã¾ãšã€ä»®æƒ³ç’°å¢ƒã‚’作æˆã—ã¾ã™ï¼š + +```bash +python -m venv .venv +source .venv/bin/activate +``` + +次ã«ã€chDBをインストールã—ã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³2.0.2以上ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„: + +```bash +pip install "chdb>=2.0.2" +``` + +次ã«ã€pyarrowã€pandasã€ipythonをインストールã—ã¾ã™ï¼š + +```bash +pip install pyarrow pandas ipython +``` + +ã“ã®å¾Œã®ã‚¬ã‚¤ãƒ‰ã§ä½¿ç”¨ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ãŸã‚ã«ã€`ipython`を使用ã—ã¾ã™ã€‚èµ·å‹•ã™ã‚‹ã«ã¯ä»¥ä¸‹ã‚’実行ã—ã¦ãã ã•ã„: + +```bash +ipython +``` + +ã¾ãŸã€Pythonスクリプトや好ããªãƒŽãƒ¼ãƒˆãƒ–ックã§ã‚‚コードを使用ã§ãã¾ã™ã€‚ + +## ファイルã‹ã‚‰Apache Arrowテーブルを作æˆã™ã‚‹ + +ã¾ãšã€[AWS CLIツール](https://aws.amazon.com/cli/)を使用ã—ã¦ã€[Ooklaデータセット](https://github.com/teamookla/ookla-open-data)ã®Parquetファイルã®1ã¤ã‚’ダウンロードã—ã¾ã™ï¼š + +```bash +aws s3 cp \ + --no-sign \ + s3://ookla-open-data/parquet/performance/type=mobile/year=2023/quarter=2/2023-04-01_performance_mobile_tiles.parquet . +``` + +:::note +ファイルをもã£ã¨ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ãŸã„å ´åˆã¯ã€`aws s3 ls`を使ã£ã¦ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã—ã€ä¸Šè¨˜ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。 +::: + +次ã«ã€pyarrowパッケージã‹ã‚‰Parquetモジュールをインãƒãƒ¼ãƒˆã—ã¾ã™ï¼š + +```python +import pyarrow.parquet as pq +``` + +ãã—ã¦ã€ParquetファイルをApache Arrowテーブルã«èª­ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã™ï¼š + +```python +arrow_table = pq.read_table("./2023-04-01_performance_mobile_tiles.parquet") +``` + +スキーマã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```python +arrow_table.schema +``` + +```text +quadkey: string +tile: string +tile_x: double +tile_y: double +avg_d_kbps: int64 +avg_u_kbps: int64 +avg_lat_ms: int64 +avg_lat_down_ms: int32 +avg_lat_up_ms: int32 +tests: int64 +devices: int64 +``` + +`shape`属性を呼ã³å‡ºã™ã“ã¨ã§è¡Œã¨ã‚«ãƒ©ãƒ ã®æ•°ã‚’å–å¾—ã§ãã¾ã™ï¼š + +```python +arrow_table.shape +``` + +```text +(3864546, 11) +``` + +## Apache Arrowをクエリã™ã‚‹ + +次ã«ã€chDBã‹ã‚‰Arrowテーブルをクエリã—ã¾ã—ょã†ã€‚ã¾ãšã€chDBをインãƒãƒ¼ãƒˆã—ã¾ã™ï¼š + +```python +import chdb +``` + +ãã—ã¦ã€ãƒ†ãƒ¼ãƒ–ルを記述ã—ã¾ã™ï¼š + +```python +chdb.query(""" +DESCRIBE Python(arrow_table) +SETTINGS describe_compact_output=1 +""", "DataFrame") +``` + +```text + name type +0 quadkey String +1 tile String +2 tile_x Float64 +3 tile_y Float64 +4 avg_d_kbps Int64 +5 avg_u_kbps Int64 +6 avg_lat_ms Int64 +7 avg_lat_down_ms Int32 +8 avg_lat_up_ms Int32 +9 tests Int64 +10 devices Int64 +``` + +è¡Œã®æ•°ã‚‚カウントã§ãã¾ã™ï¼š + +```python +chdb.query("SELECT count() FROM Python(arrow_table)", "DataFrame") +``` + +```text + count() +0 3864546 +``` + +ã§ã¯ã€ã‚‚ã†å°‘ã—興味深ã„ã“ã¨ã‚’ã—ã¾ã—ょã†ã€‚以下ã®ã‚¯ã‚¨ãƒªã¯ã€`quadkey`ãŠã‚ˆã³`tile.*`カラムを除外ã—ã€æ®‹ã‚Šã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã®å¹³å‡ã¨æœ€å¤§å€¤ã‚’計算ã—ã¾ã™ï¼š + +```python +chdb.query(""" +WITH numericColumns AS ( + SELECT * EXCEPT ('tile.*') EXCEPT(quadkey) + FROM Python(arrow_table) +) +SELECT * APPLY(max), * APPLY(avg) APPLY(x -> round(x, 2)) +FROM numericColumns +""", "Vertical") +``` + +```text +Row 1: +────── +max(avg_d_kbps): 4155282 +max(avg_u_kbps): 1036628 +max(avg_lat_ms): 2911 +max(avg_lat_down_ms): 2146959360 +max(avg_lat_up_ms): 2146959360 +max(tests): 111266 +max(devices): 1226 +round(avg(avg_d_kbps), 2): 84393.52 +round(avg(avg_u_kbps), 2): 15540.4 +round(avg(avg_lat_ms), 2): 41.25 +round(avg(avg_lat_down_ms), 2): 554355225.76 +round(avg(avg_lat_up_ms), 2): 552843178.3 +round(avg(tests), 2): 6.31 +round(avg(devices), 2): 2.88 +``` diff --git a/docs/ja/chdb/guides/querying-pandas.md b/docs/ja/chdb/guides/querying-pandas.md new file mode 100644 index 00000000000..60d6cf3ce2a --- /dev/null +++ b/docs/ja/chdb/guides/querying-pandas.md @@ -0,0 +1,398 @@ +--- +title: chDBã§Pandas DataFrameをクエリã™ã‚‹æ–¹æ³• +sidebar_label: Pandasã¸ã®ã‚¯ã‚¨ãƒª +slug: /ja/chdb/guides/pandas +description: chDBã§Pandas DataFrameをクエリã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ +keywords: [chdb, pandas] +--- + +[Pandas](https://pandas.pydata.org/)ã¯ã€Pythonã§ã®ãƒ‡ãƒ¼ã‚¿æ“作ã¨åˆ†æžã®ãŸã‚ã®äººæ°—ã®ã‚るライブラリã§ã™ã€‚ +chDBã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³2ã§ã¯ã€Pandas DataFrameã¸ã®ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスをå‘上ã—ã€æ–°ã—ã„`Python`テーブル関数を導入ã—ã¾ã—ãŸã€‚ +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€`Python`テーブル関数を使用ã—ã¦Pandasをクエリã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ + +## セットアップ + +ã¾ãšã¯ä»®æƒ³ç’°å¢ƒã‚’作æˆã—ã¾ã—ょã†ï¼š + +```bash +python -m venv .venv +source .venv/bin/activate +``` + +次ã«chDBをインストールã—ã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³2.0.2以上ãŒå¿…è¦ã§ã™ï¼š + +```bash +pip install "chdb>=2.0.2" +``` + +次ã«ã€Pandasã¨ãã®ä»–ã®ãƒ©ã‚¤ãƒ–ラリをインストールã—ã¾ã™ï¼š + +```bash +pip install pandas requests ipython +``` + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ä½¿ç”¨ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ãŸã‚ã«`ipython`を使用ã—ã¾ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã§èµ·å‹•ã§ãã¾ã™ï¼š + +```bash +ipython +``` + +ã¾ãŸã¯ã€PythonスクリプトやãŠæ°—ã«å…¥ã‚Šã®ãƒŽãƒ¼ãƒˆãƒ–ックã§ã‚³ãƒ¼ãƒ‰ã‚’使用ã§ãã¾ã™ã€‚ + +## URLã‹ã‚‰Pandas DataFrameを作æˆã™ã‚‹ + +[StatsBomb GitHubリãƒã‚¸ãƒˆãƒª](https://github.com/statsbomb/open-data/tree/master?tab=readme-ov-file)ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’クエリã—ã¾ã™ã€‚ +ã¾ãšã¯requestsã¨pandasをインãƒãƒ¼ãƒˆã—ã¾ã™ï¼š + +```python +import requests +import pandas as pd +``` + +次ã«ã€ã‚る試åˆã®JSONファイルをDataFrameã«ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ï¼š + +```python +response = requests.get( + "https://raw.githubusercontent.com/statsbomb/open-data/master/data/matches/223/282.json" +) +matches_df = pd.json_normalize(response.json(), sep='_') +``` + +扱ã†ãƒ‡ãƒ¼ã‚¿ã‚’確èªã—ã¾ã—ょã†ï¼š + +```python +matches_df.iloc[0] +``` + +```text +match_id 3943077 +match_date 2024-07-15 +kick_off 04:15:00.000 +home_score 1 +away_score 0 +match_status available +match_status_360 unscheduled +last_updated 2024-07-15T15:50:08.671355 +last_updated_360 None +match_week 6 +competition_competition_id 223 +competition_country_name South America +competition_competition_name Copa America +season_season_id 282 +season_season_name 2024 +home_team_home_team_id 779 +home_team_home_team_name Argentina +home_team_home_team_gender male +home_team_home_team_group None +home_team_country_id 11 +home_team_country_name Argentina +home_team_managers [{'id': 5677, 'name': 'Lionel Sebastián Scalon... +away_team_away_team_id 769 +away_team_away_team_name Colombia +away_team_away_team_gender male +away_team_away_team_group None +away_team_country_id 49 +away_team_country_name Colombia +away_team_managers [{'id': 5905, 'name': 'Néstor Gabriel Lorenzo'... +metadata_data_version 1.1.0 +metadata_shot_fidelity_version 2 +metadata_xy_fidelity_version 2 +competition_stage_id 26 +competition_stage_name Final +stadium_id 5337 +stadium_name Hard Rock Stadium +stadium_country_id 241 +stadium_country_name United States of America +referee_id 2638 +referee_name Raphael Claus +referee_country_id 31 +referee_country_name Brazil +Name: 0, dtype: object +``` + +次ã«ã€ã‚‚ã†ä¸€ã¤ã®ã‚¤ãƒ™ãƒ³ãƒˆJSONファイルをロードã—ã€ãã®DataFrameã«`match_id`カラムを追加ã—ã¾ã™ï¼š + +```python +response = requests.get( + "https://raw.githubusercontent.com/statsbomb/open-data/master/data/events/3943077.json" +) +events_df = pd.json_normalize(response.json(), sep='_') +events_df["match_id"] = 3943077 +``` + +ãã—ã¦ã€æœ€åˆã®è¡Œã‚’確èªã—ã¾ã—ょã†ï¼š + +```python +with pd.option_context("display.max_rows", None): + first_row = events_df.iloc[0] + non_nan_columns = first_row[first_row.notna()].T + display(non_nan_columns) +``` + +```text +id 279b7d66-92b5-4daa-8ff6-cba8fce271d9 +index 1 +period 1 +timestamp 00:00:00.000 +minute 0 +second 0 +possession 1 +duration 0.0 +type_id 35 +type_name Starting XI +possession_team_id 779 +possession_team_name Argentina +play_pattern_id 1 +play_pattern_name Regular Play +team_id 779 +team_name Argentina +tactics_formation 442.0 +tactics_lineup [{'player': {'id': 6909, 'name': 'Damián Emili... +match_id 3943077 +Name: 0, dtype: object +``` + +## Pandas DataFrameã¸ã®ã‚¯ã‚¨ãƒª + +次ã«ã€chDBを使ã£ã¦ã“れらã®DataFrameã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹æ–¹æ³•ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ +ライブラリをインãƒãƒ¼ãƒˆã—ã¾ã™ï¼š + +```python +import chdb +``` + +`Python`テーブル関数を使用ã—ã¦Pandas DataFrameã«ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM Python() +``` + +ã—ãŸãŒã£ã¦ã€`matches_df`ã®ã‚«ãƒ©ãƒ ã‚’列挙ã™ã‚‹å ´åˆã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«è¨˜è¿°ã§ãã¾ã™ï¼š + +```python +chdb.query(""" +DESCRIBE Python(matches_df) +SETTINGS describe_compact_output=1 +""", "DataFrame") +``` + +```text + name type +0 match_id Int64 +1 match_date String +2 kick_off String +3 home_score Int64 +4 away_score Int64 +5 match_status String +6 match_status_360 String +7 last_updated String +8 last_updated_360 String +9 match_week Int64 +10 competition_competition_id Int64 +11 competition_country_name String +12 competition_competition_name String +13 season_season_id Int64 +14 season_season_name String +15 home_team_home_team_id Int64 +16 home_team_home_team_name String +17 home_team_home_team_gender String +18 home_team_home_team_group String +19 home_team_country_id Int64 +20 home_team_country_name String +21 home_team_managers String +22 away_team_away_team_id Int64 +23 away_team_away_team_name String +24 away_team_away_team_gender String +25 away_team_away_team_group String +26 away_team_country_id Int64 +27 away_team_country_name String +28 away_team_managers String +29 metadata_data_version String +30 metadata_shot_fidelity_version String +31 metadata_xy_fidelity_version String +32 competition_stage_id Int64 +33 competition_stage_name String +34 stadium_id Int64 +35 stadium_name String +36 stadium_country_id Int64 +37 stadium_country_name String +38 referee_id Int64 +39 referee_name String +40 referee_country_id Int64 +41 referee_country_name String +``` + +次ã«ã€ã©ã®å¯©åˆ¤ãŒ2回以上ã®è©¦åˆã‚’担当ã—ãŸã‹ã‚’確èªã™ã‚‹ãŸã‚ã«ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’記述ã§ãã¾ã™ï¼š + +```python +chdb.query(""" +SELECT referee_name, count() AS count +FROM Python(matches_df) +GROUP BY ALL +HAVING count > 1 +ORDER BY count DESC +""", "DataFrame") +``` + +```text + referee_name count +0 César Arturo Ramos Palazuelos 3 +1 Maurizio Mariani 3 +2 Piero Maza Gomez 3 +3 Mario Alberto Escobar Toca 2 +4 Wilmar Alexander Roldán Pérez 2 +5 Jesús Valenzuela Sáez 2 +6 Wilton Pereira Sampaio 2 +7 Darío Herrera 2 +8 Andrés Matonte 2 +9 Raphael Claus 2 +``` + +次ã«ã€`events_df`を探索ã—ã¾ã—ょã†ã€‚ + +```python +chdb.query(""" +SELECT pass_recipient_name, count() +FROM Python(events_df) +WHERE type_name = 'Pass' AND pass_recipient_name <> '' +GROUP BY ALL +ORDER BY count() DESC +LIMIT 10 +""", "DataFrame") +``` + +```text + pass_recipient_name count() +0 Davinson Sánchez Mina 76 +1 Ãngel Fabián Di María Hernández 64 +2 Alexis Mac Allister 62 +3 Enzo Fernandez 57 +4 James David Rodríguez Rubio 56 +5 Johan Andrés Mojica Palacio 55 +6 Rodrigo Javier De Paul 54 +7 Jefferson Andrés Lerma Solís 53 +8 Jhon Adolfo Arias Andrade 52 +9 Carlos Eccehomo Cuesta Figueroa 50 +``` + +## Pandas DataFrameã®çµåˆ + +ã¾ãŸã€ã‚¯ã‚¨ãƒªå†…ã§DataFrameã‚’çµåˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +例ãˆã°ã€è©¦åˆã®æ¦‚è¦ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’書ãã“ã¨ãŒã§ãã¾ã™ï¼š + +```python +chdb.query(""" +SELECT home_team_home_team_name, away_team_away_team_name, home_score, away_score, + countIf(type_name = 'Pass' AND possession_team_id=home_team_home_team_id) AS home_passes, + countIf(type_name = 'Pass' AND possession_team_id=away_team_away_team_id) AS away_passes, + countIf(type_name = 'Shot' AND possession_team_id=home_team_home_team_id) AS home_shots, + countIf(type_name = 'Shot' AND possession_team_id=away_team_away_team_id) AS away_shots +FROM Python(matches_df) AS matches +JOIN Python(events_df) AS events ON events.match_id = matches.match_id +GROUP BY ALL +LIMIT 5 +""", "DataFrame").iloc[0] +``` + +```text +home_team_home_team_name Argentina +away_team_away_team_name Colombia +home_score 1 +away_score 0 +home_passes 527 +away_passes 669 +home_shots 11 +away_shots 19 +Name: 0, dtype: object +``` + +## DataFrameã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒ‡ãƒ¼ã‚¿ã®æŠ•å…¥ + +ã¾ãŸã€DataFrameã‹ã‚‰ClickHouseã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’投入ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +chDBã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹å ´åˆã€Stateful Session APIを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +セッションモジュールをインãƒãƒ¼ãƒˆã—ã¾ã—ょã†ï¼š + +```python +from chdb import session as chs +``` + +セッションをåˆæœŸåŒ–ã—ã¾ã™ï¼š + +``` +sess = chs.Session() +``` + +次ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã—ã¾ã™ï¼š + +```python +sess.query("CREATE DATABASE statsbomb") +``` + +続ã„ã¦ã€`events_df`ã«åŸºã¥ã„ã¦`events`テーブルを作æˆã—ã¾ã™ï¼š + +```python +sess.query(""" +CREATE TABLE statsbomb.events ORDER BY id AS +SELECT * +FROM Python(events_df) +""") +``` + +最も多ãã®ãƒ‘スをå—ã‘ãŸé¸æ‰‹ã‚’è¿”ã™ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ï¼š + +```python +sess.query(""" +SELECT pass_recipient_name, count() +FROM statsbomb.events +WHERE type_name = 'Pass' AND pass_recipient_name <> '' +GROUP BY ALL +ORDER BY count() DESC +LIMIT 10 +""", "DataFrame") +``` + +```text + pass_recipient_name count() +0 Davinson Sánchez Mina 76 +1 Ãngel Fabián Di María Hernández 64 +2 Alexis Mac Allister 62 +3 Enzo Fernandez 57 +4 James David Rodríguez Rubio 56 +5 Johan Andrés Mojica Palacio 55 +6 Rodrigo Javier De Paul 54 +7 Jefferson Andrés Lerma Solís 53 +8 Jhon Adolfo Arias Andrade 52 +9 Carlos Eccehomo Cuesta Figueroa 50 +``` + +## Pandas DataFrameã¨ãƒ†ãƒ¼ãƒ–ルã®çµåˆ + +最後ã«ã€`matches_df` DataFrameã¨`statsbomb.events`テーブルをçµåˆã™ã‚‹ãŸã‚ã«ã€çµåˆã‚¯ã‚¨ãƒªã‚’æ›´æ–°ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```python +sess.query(""" +SELECT home_team_home_team_name, away_team_away_team_name, home_score, away_score, + countIf(type_name = 'Pass' AND possession_team_id=home_team_home_team_id) AS home_passes, + countIf(type_name = 'Pass' AND possession_team_id=away_team_away_team_id) AS away_passes, + countIf(type_name = 'Shot' AND possession_team_id=home_team_home_team_id) AS home_shots, + countIf(type_name = 'Shot' AND possession_team_id=away_team_away_team_id) AS away_shots +FROM Python(matches_df) AS matches +JOIN statsbomb.events AS events ON events.match_id = matches.match_id +GROUP BY ALL +LIMIT 5 +""", "DataFrame").iloc[0] +``` + +```text +home_team_home_team_name Argentina +away_team_away_team_name Colombia +home_score 1 +away_score 0 +home_passes 527 +away_passes 669 +home_shots 11 +away_shots 19 +Name: 0, dtype: object +``` diff --git a/docs/ja/chdb/guides/querying-parquet.md b/docs/ja/chdb/guides/querying-parquet.md new file mode 100644 index 00000000000..3ab1f8abaf6 --- /dev/null +++ b/docs/ja/chdb/guides/querying-parquet.md @@ -0,0 +1,171 @@ +--- +title: Parquetファイルをクエリã™ã‚‹æ–¹æ³• +sidebar_label: Parquetファイルã®ã‚¯ã‚¨ãƒª +slug: /ja/chdb/guides/querying-parquet +description: chDBを使用ã—ã¦Parquetファイルをクエリã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ +keywords: [chdb, parquet] +--- + +世界中ã®ãƒ‡ãƒ¼ã‚¿ã®å¤šãã¯Amazon S3ãƒã‚±ãƒƒãƒˆã«å­˜åœ¨ã—ã¦ã„ã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€chDBを使用ã—ã¦ãã®ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ + +## セットアップ + +ã¾ãšã€ä»®æƒ³ç’°å¢ƒã‚’作æˆã—ã¾ã—ょã†: + +```bash +python -m venv .venv +source .venv/bin/activate +``` + +次ã«ã€chDBをインストールã—ã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³2.0.2以上ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„: + +```bash +pip install "chdb>=2.0.2" +``` + +次ã«ã€iPythonをインストールã—ã¾ã™: + +```bash +pip install ipython +``` + +`ipython`を使用ã—ã¦ã“ã®ã‚¬ã‚¤ãƒ‰ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚èµ·å‹•ã™ã‚‹ã«ã¯ä»¥ä¸‹ã‚’実行ã—ã¾ã™: + +```bash +ipython +``` + +ã¾ãŸã€PythonスクリプトやãŠå¥½ã¿ã®ãƒŽãƒ¼ãƒˆãƒ–ックã§ã‚³ãƒ¼ãƒ‰ã‚’使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## Parquetメタデータã®æŽ¢ç´¢ + +ã“ã‚Œã‹ã‚‰ã€[Amazonレビュー](/docs/ja/getting-started/example-datasets/amazon-reviews)データセットã®Parquetファイルを探索ã—ã¾ã™ã€‚ã¾ãšã€`chDB`をインストールã—ã¾ã—ょã†: + +```python +import chdb +``` + +Parquetファイルをクエリã™ã‚‹éš›ã«ã€[`ParquetMetadata`](/docs/ja/interfaces/formats#parquetmetadata-data-format-parquet-metadata)入力フォーマットを使用ã—ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®å†…容ã§ã¯ãªãParquetメタデータを返ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’使用ã™ã‚‹éš›ã«è¿”ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’`DESCRIBE`å¥ã‚’使ã£ã¦ç¢ºèªã—ã¾ã—ょã†: + +```python +query = """ +DESCRIBE s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/amazon_reviews/amazon_reviews_2015.snappy.parquet', + ParquetMetadata +) +SETTINGS describe_compact_output=1 +""" + +chdb.query(query, 'TabSeparated') +``` + +```text +num_columns UInt64 +num_rows UInt64 +num_row_groups UInt64 +format_version String +metadata_size UInt64 +total_uncompressed_size UInt64 +total_compressed_size UInt64 +columns Array(Tuple(name String, path String, max_definition_level UInt64, max_repetition_level UInt64, physical_type String, logical_type String, compression String, total_uncompressed_size UInt64, total_compressed_size UInt64, space_saved String, encodings Array(String))) +row_groups Array(Tuple(num_columns UInt64, num_rows UInt64, total_uncompressed_size UInt64, total_compressed_size UInt64, columns Array(Tuple(name String, path String, total_compressed_size UInt64, total_uncompressed_size UInt64, have_statistics Bool, statistics Tuple(num_values Nullable(UInt64), null_count Nullable(UInt64), distinct_count Nullable(UInt64), min Nullable(String), max Nullable(String)))))) +``` + +ç¾åœ¨ã€ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚`columns`ã¨`row_groups`ã¯å¤šãã®ãƒ—ロパティをå«ã‚€ã‚¿ãƒ—ルã®é…列ãªã®ã§ã€ä»Šå›žã¯ãれらを除外ã—ã¾ã™ã€‚ + +```python +query = """ +SELECT * EXCEPT(columns, row_groups) +FROM s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/amazon_reviews/amazon_reviews_2015.snappy.parquet', + ParquetMetadata +) +""" + +chdb.query(query, 'Vertical') +``` + +```text +Row 1: +────── +num_columns: 15 +num_rows: 41905631 +num_row_groups: 42 +format_version: 2.6 +metadata_size: 79730 +total_uncompressed_size: 14615827169 +total_compressed_size: 9272262304 +``` + +ã“ã®å‡ºåŠ›ã‹ã‚‰ã€ã“ã®Parquetファイルã«ã¯40百万行以上ã®è¡ŒãŒã‚ã‚Šã€42ã®è¡Œã‚°ãƒ«ãƒ¼ãƒ—ã«åˆ†å‰²ã•ã‚Œã€å„è¡Œã«15ã®ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚行グループã¯ãƒ‡ãƒ¼ã‚¿ã‚’è«–ç†çš„ã«æ°´å¹³ã«åˆ†å‰²ã—ãŸã‚‚ã®ã§ã™ã€‚å„行グループã«ã¯é–¢é€£ã™ã‚‹ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚Šã€ã‚¯ã‚¨ãƒªãƒ„ールã¯ãã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’使用ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‚’効率的ã«ã‚¯ã‚¨ãƒªã§ãã¾ã™ã€‚ + +行グループã®1ã¤ã‚’見ã¦ã¿ã¾ã—ょã†: + +```python +query = """ +WITH rowGroups AS ( + SELECT rg + FROM s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/amazon_reviews/amazon_reviews_2015.snappy.parquet', + ParquetMetadata + ) + ARRAY JOIN row_groups AS rg + LIMIT 1 +) +SELECT tupleElement(c, 'name') AS name, tupleElement(c, 'total_compressed_size') AS total_compressed_size, + tupleElement(c, 'total_uncompressed_size') AS total_uncompressed_size, + tupleElement(tupleElement(c, 'statistics'), 'min') AS min, + tupleElement(tupleElement(c, 'statistics'), 'max') AS max +FROM rowGroups +ARRAY JOIN tupleElement(rg, 'columns') AS c +""" + +chdb.query(query, 'DataFrame') +``` + +```text + name total_compressed_size total_uncompressed_size min max +0 review_date 493 646 16455 16472 +1 marketplace 66 64 US US +2 customer_id 5207967 7997207 10049 53096413 +3 review_id 14748425 17991290 R10004U8OQDOGE RZZZUTBAV1RYI +4 product_id 8003456 13969668 0000032050 BT00DDVMVQ +5 product_parent 5758251 7974737 645 999999730 +6 product_title 41068525 63355320 ! Small S 1pc Black 1pc Navy (Blue) Replacemen... 🌴 Vacation On The Beach +7 product_category 1726 1815 Apparel Pet Products +8 star_rating 369036 374046 1 5 +9 helpful_votes 538940 1022990 0 3440 +10 total_votes 610902 1080520 0 3619 +11 vine 11426 125999 0 1 +12 verified_purchase 102634 125999 0 1 +13 review_headline 16538189 27634740 🤹ðŸ½â€â™‚ï¸ðŸŽ¤Great product. Practice makes perfect. D... +14 review_body 145886383 232457911 🚅 +ðŸ§=💥 😀 +``` + +## Parquetファイルã®ã‚¯ã‚¨ãƒª + +次ã«ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®å†…容をクエリã—ã¾ã™ã€‚上記ã®ã‚¯ã‚¨ãƒªã‚’調整ã—ã¦ã€`ParquetMetadata`を削除ã—ã€ã™ã¹ã¦ã®ãƒ¬ãƒ“ューã§æœ€ã‚‚人気ã®ã‚ã‚‹`star_rating`を計算ã—ã¦ã¿ã¾ã—ょã†: + +```python +query = """ +SELECT star_rating, count() AS count, formatReadableQuantity(count) +FROM s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/amazon_reviews/amazon_reviews_2015.snappy.parquet' +) +GROUP BY ALL +ORDER BY star_rating +""" + +chdb.query(query, 'DataFrame') +``` + +```text + star_rating count formatReadableQuantity(count()) +0 1 3253070 3.25 million +1 2 1865322 1.87 million +2 3 3130345 3.13 million +3 4 6578230 6.58 million +4 5 27078664 27.08 million +``` + +興味深ã„ã“ã¨ã«ã€5ã¤æ˜Ÿãƒ¬ãƒ“ューã¯ä»–ã®ã™ã¹ã¦ã®è©•ä¾¡ã‚’åˆã‚ã›ãŸã‚‚ã®ã‚ˆã‚Šã‚‚多ã„ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚Amazonã®å•†å“ãŒå¥½ã¾ã‚Œã¦ã„るよã†ã«è¦‹ãˆã¾ã™ãŒã€ã‚‚ã—æ°—ã«å…¥ã‚‰ãªã„å ´åˆã¯è©•ä¾¡ã‚’付ã‘ãªã„ã“ã¨ãŒå¤šã„よã†ã§ã™ã€‚ diff --git a/docs/ja/chdb/guides/querying-s3-bucket.md b/docs/ja/chdb/guides/querying-s3-bucket.md new file mode 100644 index 00000000000..43bb53b1ab6 --- /dev/null +++ b/docs/ja/chdb/guides/querying-s3-bucket.md @@ -0,0 +1,192 @@ +--- +title: S3ãƒã‚±ãƒƒãƒˆå†…ã®ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹æ–¹æ³• +sidebar_label: S3ã§ã®ã‚¯ã‚¨ãƒª +slug: /ja/chdb/guides/querying-s3 +description: chDBを使用ã—ã¦S3ãƒã‚±ãƒƒãƒˆå†…ã®ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ +keywords: [chdb, s3] +--- + +世界中ã®å¤šãã®ãƒ‡ãƒ¼ã‚¿ã¯Amazon S3ãƒã‚±ãƒƒãƒˆã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€chDBを使用ã—ã¦ãã®ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ + +## セットアップ + +ã¾ãšã€ä»®æƒ³ç’°å¢ƒã‚’作æˆã—ã¾ã—ょã†ï¼š + +```bash +python -m venv .venv +source .venv/bin/activate +``` + +次ã«ã€chDBをインストールã—ã¾ã™ã€‚ ãƒãƒ¼ã‚¸ãƒ§ãƒ³2.0.2以上を確実ã«ä½¿ç”¨ã—ã¦ãã ã•ã„: + +```bash +pip install "chdb>=2.0.2" +``` + +次ã«ã€iPythonをインストールã—ã¾ã™ï¼š + +```bash +pip install ipython +``` + +ã“ã®ã‚¬ã‚¤ãƒ‰ã®æ®‹ã‚Šã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ãŸã‚ã«`ipython`を使用ã—ã¾ã™ã€‚èµ·å‹•ã™ã‚‹ã«ã¯æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + +```bash +ipython +``` + +ã¾ãŸã€PythonスクリプトやãŠå¥½ã¿ã®ãƒŽãƒ¼ãƒˆãƒ–ックã§ã‚‚コードを使用ã§ãã¾ã™ã€‚ + +## S3ãƒã‚±ãƒƒãƒˆå†…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’一覧表示 + +ã¾ãšã¯ã˜ã‚ã«ã€[Amazonレビューをå«ã‚€S3ãƒã‚±ãƒƒãƒˆ](/docs/ja/getting-started/example-datasets/amazon-reviews)内ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’一覧表示ã—ã¾ã—ょã†ã€‚ ã“れを行ã†ãŸã‚ã«ã€[`s3`テーブル関数](/docs/ja/sql-reference/table-functions/s3)を使用ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘スã¾ãŸã¯ä¸€é€£ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’渡ã—ã¾ã™ã€‚ + +:::tip +ãƒã‚±ãƒƒãƒˆåã®ã¿ã‚’渡ã™ã¨ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +::: + +ã¾ãŸã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒè§£æžã•ã‚Œãšã€ãƒ•ã‚¡ã‚¤ãƒ«ã”ã¨ã«ä¸€è¡Œã®ã¿ãŒè¿”ã•ã‚Œã€`_file`ãƒãƒ¼ãƒãƒ£ãƒ«ã‚«ãƒ©ãƒ ã¨`_path`ãƒãƒ¼ãƒãƒ£ãƒ«ã‚«ãƒ©ãƒ çµŒç”±ã§ãƒ•ã‚¡ã‚¤ãƒ«ã¨ãƒ‘スã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ã™ã‚‹ãŸã‚ã«ã€[`One`](/docs/ja/interfaces/formats#data-format-one)入力フォーマットを使用ã—ã¾ã™ã€‚ + +```python +import chdb + +chdb.query(""" +SELECT + _file, + _path +FROM s3('s3://datasets-documentation/amazon_reviews/*.parquet', One) +SETTINGS output_format_pretty_row_numbers=0 +""", 'PrettyCompact') +``` + +```text +┌─_file───────────────────────────────┬─_path─────────────────────────────────────────────────────────────────────┠+│ amazon_reviews_2010.snappy.parquet │ datasets-documentation/amazon_reviews/amazon_reviews_2010.snappy.parquet │ +│ amazon_reviews_1990s.snappy.parquet │ datasets-documentation/amazon_reviews/amazon_reviews_1990s.snappy.parquet │ +│ amazon_reviews_2013.snappy.parquet │ datasets-documentation/amazon_reviews/amazon_reviews_2013.snappy.parquet │ +│ amazon_reviews_2015.snappy.parquet │ datasets-documentation/amazon_reviews/amazon_reviews_2015.snappy.parquet │ +│ amazon_reviews_2014.snappy.parquet │ datasets-documentation/amazon_reviews/amazon_reviews_2014.snappy.parquet │ +│ amazon_reviews_2012.snappy.parquet │ datasets-documentation/amazon_reviews/amazon_reviews_2012.snappy.parquet │ +│ amazon_reviews_2000s.snappy.parquet │ datasets-documentation/amazon_reviews/amazon_reviews_2000s.snappy.parquet │ +│ amazon_reviews_2011.snappy.parquet │ datasets-documentation/amazon_reviews/amazon_reviews_2011.snappy.parquet │ +└─────────────────────────────────────┴───────────────────────────────────────────────────────────────────────────┘ +``` + +ã“ã®ãƒã‚±ãƒƒãƒˆã«ã¯Parquetファイルã®ã¿ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +## S3ãƒã‚±ãƒƒãƒˆå†…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚¯ã‚¨ãƒª + +次ã«ã€ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã—ょã†ã€‚ å„ファイルã®è¡Œæ•°ã‚’カウントã—ãŸã„å ´åˆã¯ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ï¼š + +```python +chdb.query(""" +SELECT + _file, + count() AS count, + formatReadableQuantity(count) AS readableCount +FROM s3('s3://datasets-documentation/amazon_reviews/*.parquet') +GROUP BY ALL +SETTINGS output_format_pretty_row_numbers=0 +""", 'PrettyCompact') +``` + +```text +┌─_file───────────────────────────────┬────count─┬─readableCount───┠+│ amazon_reviews_2013.snappy.parquet │ 28034255 │ 28.03 million │ +│ amazon_reviews_1990s.snappy.parquet │ 639532 │ 639.53 thousand │ +│ amazon_reviews_2011.snappy.parquet │ 6112495 │ 6.11 million │ +│ amazon_reviews_2015.snappy.parquet │ 41905631 │ 41.91 million │ +│ amazon_reviews_2012.snappy.parquet │ 11541011 │ 11.54 million │ +│ amazon_reviews_2000s.snappy.parquet │ 14728295 │ 14.73 million │ +│ amazon_reviews_2014.snappy.parquet │ 44127569 │ 44.13 million │ +│ amazon_reviews_2010.snappy.parquet │ 3868472 │ 3.87 million │ +└─────────────────────────────────────┴──────────┴─────────────────┘ +``` + +ã¾ãŸã€S3ãƒã‚±ãƒƒãƒˆã®HTTP URIを渡ã™ã“ã¨ã§ã‚‚åŒã˜çµæžœã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```python +chdb.query(""" +SELECT + _file, + count() AS count, + formatReadableQuantity(count) AS readableCount +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/amazon_reviews/*.parquet') +GROUP BY ALL +SETTINGS output_format_pretty_row_numbers=0 +""", 'PrettyCompact') +``` + +ã§ã¯ã€`DESCRIBE`å¥ã‚’使用ã—ã¦ã“れらã®Parquetファイルã®ã‚¹ã‚­ãƒ¼ãƒžã‚’見ã¦ã¿ã¾ã—ょã†ï¼š + +```python +chdb.query(""" +DESCRIBE s3('s3://datasets-documentation/amazon_reviews/*.parquet') +SETTINGS describe_compact_output=1 +""", 'PrettyCompact') +``` + +```text + ┌─name──────────────┬─type─────────────┠+ 1. │ review_date │ Nullable(UInt16) │ + 2. │ marketplace │ Nullable(String) │ + 3. │ customer_id │ Nullable(UInt64) │ + 4. │ review_id │ Nullable(String) │ + 5. │ product_id │ Nullable(String) │ + 6. │ product_parent │ Nullable(UInt64) │ + 7. │ product_title │ Nullable(String) │ + 8. │ product_category │ Nullable(String) │ + 9. │ star_rating │ Nullable(UInt8) │ +10. │ helpful_votes │ Nullable(UInt32) │ +11. │ total_votes │ Nullable(UInt32) │ +12. │ vine │ Nullable(Bool) │ +13. │ verified_purchase │ Nullable(Bool) │ +14. │ review_headline │ Nullable(String) │ +15. │ review_body │ Nullable(String) │ + └───────────────────┴──────────────────┘ +``` + +次ã«ã€ãƒ¬ãƒ“ューã®æ•°ã«åŸºã¥ã„ã¦ãƒˆãƒƒãƒ—ã®è£½å“カテゴリーを計算ã—ã€å¹³å‡ã®æ˜Ÿè©•ä¾¡ã‚‚計算ã—ã¦ã¿ã¾ã—ょã†ï¼š + +```python +chdb.query(""" +SELECT product_category, count() AS reviews, round(avg(star_rating), 2) as avg +FROM s3('s3://datasets-documentation/amazon_reviews/*.parquet') +GROUP BY ALL +LIMIT 10 +""", 'PrettyCompact') +``` + +```text + ┌─product_category─┬──reviews─┬──avg─┠+ 1. │ Toys │ 4864056 │ 4.21 │ + 2. │ Apparel │ 5906085 │ 4.11 │ + 3. │ Luggage │ 348644 │ 4.22 │ + 4. │ Kitchen │ 4880297 │ 4.21 │ + 5. │ Books │ 19530930 │ 4.34 │ + 6. │ Outdoors │ 2302327 │ 4.24 │ + 7. │ Video │ 380596 │ 4.19 │ + 8. │ Grocery │ 2402365 │ 4.31 │ + 9. │ Shoes │ 4366757 │ 4.24 │ +10. │ Jewelry │ 1767667 │ 4.14 │ + └──────────────────┴──────────┴──────┘ +``` + +## プライベートãªS3ãƒã‚±ãƒƒãƒˆå†…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚¯ã‚¨ãƒªã™ã‚‹ + +プライベートãªS3ãƒã‚±ãƒƒãƒˆå†…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹å ´åˆã«ã¯ã€ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ã¨ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®è³‡æ ¼æƒ…報を`s3`テーブル関数ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ï¼š + +```python +chdb.query(""" +SELECT product_category, count() AS reviews, round(avg(star_rating), 2) as avg +FROM s3('s3://datasets-documentation/amazon_reviews/*.parquet', 'access-key', 'secret') +GROUP BY ALL +LIMIT 10 +""", 'PrettyCompact') +``` + +:::note +ã“ã®ã‚¯ã‚¨ãƒªã¯ãƒ‘ブリックãƒã‚±ãƒƒãƒˆãªã®ã§å‹•ä½œã—ã¾ã›ã‚“ï¼ +::: + +別ã®æ–¹æ³•ã¨ã—ã¦ã€[åå‰ä»˜ãコレクション](/docs/ja/operations/named-collections)を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€ã“ã®ã‚¢ãƒ—ローãƒã¯ã¾ã chDBã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 diff --git a/docs/ja/chdb/index.md b/docs/ja/chdb/index.md new file mode 100644 index 00000000000..3393b34c594 --- /dev/null +++ b/docs/ja/chdb/index.md @@ -0,0 +1,61 @@ +--- +title: chDB +sidebar_label: Overview +slug: /ja/chdb +description: chDBã¯ClickHouseã«ã‚ˆã£ã¦é§†å‹•ã•ã‚Œã‚‹ã‚¤ãƒ³ãƒ—ロセスSQL OLAPエンジンã§ã™ +keywords: [chdb, embedded, clickhouse-lite, in-process, in process] +--- + +# chDB + +chDBã¯ã€[ClickHouse](https://github.com/clickhouse/clickhouse)ã«ã‚ˆã£ã¦é§†å‹•ã•ã‚Œã‚‹é«˜é€Ÿãªã‚¤ãƒ³ãƒ—ロセスSQL OLAPエンジンã§ã™ã€‚ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ãªãã€ãƒ—ログラミング言語ã§ClickHouseã®åŠ›ã‚’å¾—ãŸã„å ´åˆã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +## chDBã¯ã©ã®è¨€èªžã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã‹ï¼Ÿ + +chDBã¯ä»¥ä¸‹ã®è¨€èªžãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’æä¾›ã—ã¦ã„ã¾ã™ï¼š + +* [Python](install/python.md) +* [Go](install/go.md) +* [Rust](install/rust.md) +* [NodeJS](install/nodejs.md) +* [Bun](install/bun.md) + +## ã©ã®å…¥åŠ›ãŠã‚ˆã³å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã‹ï¼Ÿ + +chDBã¯Parquetã€CSVã€JSONã€Apache Arrowã€ORCã€[60以上ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ](https://clickhouse.com/docs/ja/interfaces/formats)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +## ã©ã®ã‚ˆã†ã«é–‹å§‹ã—ã¾ã™ã‹ï¼Ÿ + +* [Go](install/go.md)ã€[Rust](install/rust.md)ã€[NodeJS](install/nodejs.md)ã€ã¾ãŸã¯[Bun](install/bun.md)を使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€å¯¾å¿œã™ã‚‹è¨€èªžãƒšãƒ¼ã‚¸ã‚’ã”覧ãã ã•ã„。 +* Pythonを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€[開発者å‘ã‘ã®é–‹å§‹ã‚¬ã‚¤ãƒ‰](getting-started.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。以下ã®ã‚ˆã†ãªä¸€èˆ¬çš„ãªã‚¿ã‚¹ã‚¯ã‚’è¡Œã†ãŸã‚ã®ã‚¬ã‚¤ãƒ‰ã‚‚用æ„ã•ã‚Œã¦ã„ã¾ã™ï¼š + * [JupySQL](guides/jupysql.md) + * [Pandasã®ã‚¯ã‚¨ãƒª](guides/querying-pandas.md) + * [Apache Arrowã¸ã®ã‚¯ã‚¨ãƒª](guides/querying-apache-arrow.md) + * [S3内ã®ãƒ‡ãƒ¼ã‚¿ã¸ã®ã‚¯ã‚¨ãƒª](guides/querying-s3-bucket.md) + * [Parquetファイルã¸ã®ã‚¯ã‚¨ãƒª](guides/querying-parquet.md) + * [リモートClickHouseã¸ã®ã‚¯ã‚¨ãƒª](guides/query-remote-clickhouse.md) + * [clickhouse-localデータベースã®ä½¿ç”¨](guides/clickhouse-local.md) + + + +## 紹介ビデオ + +ClickHouseã®ã‚ªãƒªã‚¸ãƒŠãƒ«ä½œæˆè€…ã€Alexey Milovidovã«ã‚ˆã‚‹chDBã®ç°¡æ½”ãªãƒ—ロジェクト紹介をãŠèžããã ã•ã„: + +
+ +
+ +## chDBã«ã¤ã„㦠+ +- [Auxtenã®ãƒ–ログ](https://clickhouse.com/blog/chdb-embedded-clickhouse-rocket-engine-on-a-bicycle)ã§chDBプロジェクト誕生ã®å…¨éŽç¨‹ã‚’読む +- [å…¬å¼ClickHouseブログ](https://clickhouse.com/blog/welcome-chdb-to-clickhouse)ã§chDBã¨ãã®ä½¿ç”¨äº‹ä¾‹ã«ã¤ã„ã¦èª­ã‚€ +- [codapiã®ä¾‹](https://antonz.org/trying-chdb/)を使用ã—ã¦ãƒ–ラウザã§chDBを発見ã™ã‚‹ + +## ã©ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã‹ï¼Ÿ + +chDBã¯Apache License, Version 2.0ã®ã‚‚ã¨ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ diff --git a/docs/ja/chdb/install/bun.md b/docs/ja/chdb/install/bun.md new file mode 100644 index 00000000000..1598e8e08ee --- /dev/null +++ b/docs/ja/chdb/install/bun.md @@ -0,0 +1,55 @@ +--- +title: Installing chDB for Bun +sidebar_label: Bun +slug: /ja/chdb/install/bun +description: How to install chDB for Bun +keywords: [chdb, embedded, clickhouse-lite, bun, install] +--- + +# Bun用ã®chDBをインストールã™ã‚‹ + +## è¦ä»¶ + +[libchdb](https://github.com/chdb-io/chdb) をインストールã—ã¾ã™: + +```bash +curl -sL https://lib.chdb.io | bash +``` + +## インストール + +å‚考: [chdb-bun](https://github.com/chdb-io/chdb-bun) + +## GitHubリãƒã‚¸ãƒˆãƒª + +プロジェクトã®GitHubリãƒã‚¸ãƒˆãƒªã¯ [chdb-io/chdb-bun](https://github.com/chdb-io/chdb-bun) ã«ã‚ã‚Šã¾ã™ã€‚ + +## 使用方法 + +### Query(query, *format) (一時的) + +```javascript +import { query } from 'chdb-bun'; + +// クエリ(一時的) +var result = query("SELECT version()", "CSV"); +console.log(result); // 23.10.1.1 +``` + +### Session.Query(query, *format) + +```javascript +import { Session } from 'chdb-bun'; +const sess = new Session('./chdb-bun-tmp'); + +// セッションã§ã‚¯ã‚¨ãƒªï¼ˆæ°¸ç¶šåŒ–) +sess.query("CREATE FUNCTION IF NOT EXISTS hello AS () -> 'Hello chDB'", "CSV"); +var result = sess.query("SELECT hello()", "CSV"); +console.log(result); + +// クリーンアップå‰ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’`./chdb-bun-tmp`ã«è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ + +sess.cleanup(); // セッションをクリーンアップã€ã“ã‚Œã«ã‚ˆã‚Šãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒå‰Šé™¤ã•ã‚Œã¾ã™ +``` + + diff --git a/docs/ja/chdb/install/c.md b/docs/ja/chdb/install/c.md new file mode 100644 index 00000000000..5ef158ac164 --- /dev/null +++ b/docs/ja/chdb/install/c.md @@ -0,0 +1,45 @@ +--- +title: Cã¨C++å‘ã‘ã®chDBã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« +sidebar_label: Cã¨C++ +slug: /ja/chdb/install/c +description: Cã¨C++å‘ã‘ã®chDBをインストールã™ã‚‹æ–¹æ³• +keywords: [chdb, 組ã¿è¾¼ã¿, clickhouse-lite, インストール] +--- + +# Cã¨C++å‘ã‘ã®chDBã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +## è¦ä»¶ + +[libchdb](https://github.com/chdb-io/chdb)をインストールã—ã¾ã™: + +```bash +curl -sL https://lib.chdb.io | bash +``` + + +## 使用方法 + +[libchdb](https://github.com/chdb-io/chdb/blob/main/bindings.md)ã®æ‰‹é †ã«å¾“ã£ã¦é–‹å§‹ã—ã¦ãã ã•ã„。 + +`chdb.h` + +```c +#pragma once +#include +#include + +extern "C" { +struct local_result +{ + char * buf; + size_t len; + void * _vec; // std::vector *ã®è§£æ”¾ç”¨ + double elapsed; + uint64_t rows_read; + uint64_t bytes_read; +}; + +local_result * query_stable(int argc, char ** argv); +void free_result(local_result * result); +} +``` diff --git a/docs/ja/chdb/install/go.md b/docs/ja/chdb/install/go.md new file mode 100644 index 00000000000..e02248aa7f3 --- /dev/null +++ b/docs/ja/chdb/install/go.md @@ -0,0 +1,30 @@ +--- +title: Go 用 chDB ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« +sidebar_label: Go +slug: /ja/chdb/install/go +description: Go 用 chDB ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ–¹æ³• +keywords: [chdb, embedded, clickhouse-lite, go, install] +--- + +# Go 用 chDB ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +## å¿…è¦æ¡ä»¶ + +[libchdb](https://github.com/chdb-io/chdb) をインストールã—ã¾ã™: + +```bash +curl -sL https://lib.chdb.io | bash +``` + +## インストール + +å‚ç…§: [chdb-go](https://github.com/chdb-io/chdb-go) + +## GitHub リãƒã‚¸ãƒˆãƒª + +プロジェクト㮠GitHub リãƒã‚¸ãƒˆãƒªã¯ [chdb-io/chdb-go](https://github.com/chdb-io/chdb-go) ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 使用法 + +- API ドキュメント: [高レベル API](https://github.com/chdb-io/chdb-go/blob/main/chdb.md) +- 低レベル API ドキュメント: [低レベル API](https://github.com/chdb-io/chdb-go/blob/main/lowApi.md) diff --git a/docs/ja/chdb/install/nodejs.md b/docs/ja/chdb/install/nodejs.md new file mode 100644 index 00000000000..7331596eb9e --- /dev/null +++ b/docs/ja/chdb/install/nodejs.md @@ -0,0 +1,65 @@ +--- +title: NodeJS 用 chDB ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« +sidebar_label: NodeJS +slug: /ja/chdb/install/nodejs +description: NodeJS 用 chDB ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ–¹æ³• +keywords: [chdb, embedded, clickhouse-lite, nodejs, install] +--- + +# NodeJS 用 chDB ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +## è¦ä»¶ + +[libchdb](https://github.com/chdb-io/chdb) をインストールã—ã¾ã™ï¼š + +```bash +curl -sL https://lib.chdb.io | bash +``` + +## インストール + +```bash +npm i chdb +``` + +## GitHub リãƒã‚¸ãƒˆãƒª + +プロジェクト㮠GitHub リãƒã‚¸ãƒˆãƒªã¯ [chdb-io/chdb-node](https://github.com/chdb-io/chdb-node) ã§ç¢ºèªã§ãã¾ã™ã€‚ + +## 使用法 + +NodeJS アプリケーション㧠chdb-node モジュールをインãƒãƒ¼ãƒˆã—ã€ãã®å¼·åŠ›ãªæ©Ÿèƒ½ã‚’活用ã§ãã¾ã™ï¼š + +```javascript +const { query, Session } = require("chdb"); + +var ret; + +// スタンドアローンã®ã‚¯ã‚¨ãƒªã‚’テスト +ret = query("SELECT version(), 'Hello chDB', chdb()", "CSV"); +console.log("Standalone Query Result:", ret); + +// セッションã®ã‚¯ã‚¨ãƒªã‚’テスト +// æ–°ã—ã„ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’ä½œæˆ +const session = new Session("./chdb-node-tmp"); +ret = session.query("SELECT 123", "CSV") +console.log("Session Query Result:", ret); +ret = session.query("CREATE DATABASE IF NOT EXISTS testdb;" + + "CREATE TABLE IF NOT EXISTS testdb.testtable (id UInt32) ENGINE = MergeTree() ORDER BY id;"); + +session.query("USE testdb; INSERT INTO testtable VALUES (1), (2), (3);") + +ret = session.query("SELECT * FROM testtable;") +console.log("Session Query Result:", ret); + +// セッションã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ— +session.cleanup(); +``` + +## ソースã‹ã‚‰ãƒ“ルド + +```bash +npm run libchdb +npm install +npm run test +``` diff --git a/docs/ja/chdb/install/python.md b/docs/ja/chdb/install/python.md new file mode 100644 index 00000000000..3f9a7b77922 --- /dev/null +++ b/docs/ja/chdb/install/python.md @@ -0,0 +1,257 @@ +--- +title: Pythonå‘ã‘ã®chDBã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« +sidebar_label: Python +slug: /ja/chdb/install/python +description: Pythonå‘ã‘ã®chDBã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ–¹æ³• +keywords: [chdb, embedded, clickhouse-lite, python, install] +--- + +# Pythonå‘ã‘ã®chDBã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +## å¿…è¦æ¡ä»¶ + +macOSã¨Linux(x86_64ãŠã‚ˆã³ARM64)上ã®Python 3.8+ + +## インストール + +```bash +pip install chdb +``` + +## 使用法 + +CLI例: + +```python +python3 -m chdb [SQL] [OutputFormat] +``` + +```python +python3 -m chdb "SELECT 1, 'abc'" Pretty +``` + +Pythonファイル例: + +```python +import chdb + +res = chdb.query("SELECT 1, 'abc'", "CSV") +print(res, end="") +``` + +クエリã¯ã€`Dataframe`ã‚„`Debug`ã‚’å«ã‚€[サãƒãƒ¼ãƒˆå½¢å¼](/docs/ja/interfaces/formats)ã®ã„ãšã‚Œã‹ã‚’使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## GitHubリãƒã‚¸ãƒˆãƒª + +プロジェクトã®GitHubリãƒã‚¸ãƒˆãƒªã¯[chdb-io/chdb](https://github.com/chdb-io/chdb)ã«ã‚ã‚Šã¾ã™ã€‚ + +## データ入力 + +以下ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã—ã¦ã€ã‚ªãƒ³ãƒ‡ã‚£ã‚¹ã‚¯ãŠã‚ˆã³ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ã€‚ + +### ファイル上ã§ã®ã‚¯ã‚¨ãƒª (Parquet, CSV, JSON, Arrow, ORC ãªã©60+) + +SQLを実行ã—ã€å¸Œæœ›ã®å½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã›ã¾ã™ã€‚ + +```python +import chdb +res = chdb.query('select version()', 'Pretty'); print(res) +``` + +**Parquetã¾ãŸã¯CSVã§ã®æ“作** + +```python +# データ型ã®è©³ç´°ã¯ tests/format_output.py ã‚’å‚ç…§ +res = chdb.query('select * from file("data.parquet", Parquet)', 'JSON'); print(res) +res = chdb.query('select * from file("data.csv", CSV)', 'CSV'); print(res) +print(f"SQL read {res.rows_read()} rows, {res.bytes_read()} bytes, elapsed {res.elapsed()} seconds") +``` + +**Pandas dataframe出力** +```python +# 詳細ã¯https://clickhouse.com/docs/ja/interfaces/formatsã‚’å‚ç…§ +chdb.query('select * from file("data.parquet", Parquet)', 'Dataframe') +``` + +### テーブル上ã§ã®ã‚¯ã‚¨ãƒª (Pandas DataFrame, Parquet file/bytes, Arrow bytes) + +**Pandas DataFrame上ã§ã®ã‚¯ã‚¨ãƒª** + +```python +import chdb.dataframe as cdf +import pandas as pd +# 2ã¤ã®DataFrameã‚’çµåˆ +df1 = pd.DataFrame({'a': [1, 2, 3], 'b': ["one", "two", "three"]}) +df2 = pd.DataFrame({'c': [1, 2, 3], 'd': ["â‘ ", "â‘¡", "â‘¢"]}) +ret_tbl = cdf.query(sql="select * from __tbl1__ t1 join __tbl2__ t2 on t1.a = t2.c", + tbl1=df1, tbl2=df2) +print(ret_tbl) +# DataFrameテーブルã§ã®ã‚¯ã‚¨ãƒª +print(ret_tbl.query('select b, sum(a) from __table__ group by b')) +``` + +### 状態をæŒã¤ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ã®ã‚¯ã‚¨ãƒª + +セッションã¯ã‚¯ã‚¨ãƒªã®çŠ¶æ…‹ã‚’ä¿æŒã—ã¾ã™ã€‚ã™ã¹ã¦ã®DDLãŠã‚ˆã³DMLã®çŠ¶æ…‹ã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ä¿æŒã•ã‚Œã¾ã™ã€‚ディレクトリパスã¯å¼•æ•°ã¨ã—ã¦æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚指定ã•ã‚Œãªã„å ´åˆã€ä¸€æ™‚ディレクトリãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +パスãŒæŒ‡å®šã•ã‚Œãªã„å ´åˆã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚ªãƒ–ジェクトãŒå‰Šé™¤ã•ã‚Œã‚‹ã¨ãã«ä¸€æ™‚ディレクトリãŒå‰Šé™¤ã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ãƒ‘スã¯ä¿æŒã•ã‚Œã¾ã™ã€‚ + +デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯`_local`ã§ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯`Memory`ã§ã‚ã‚‹ãŸã‚ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã¯ãƒ¡ãƒ¢ãƒªã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ディスクã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã—ãŸã„å ´åˆã¯ã€åˆ¥ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```python +from chdb import session as chs + +## 一時セッションã§DBã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ“ューを作æˆã—ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒå‰Šé™¤ã•ã‚Œã‚‹ã¨è‡ªå‹•çš„ã«ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ã—ã¾ã™ã€‚ +sess = chs.Session() +sess.query("CREATE DATABASE IF NOT EXISTS db_xxx ENGINE = Atomic") +sess.query("CREATE TABLE IF NOT EXISTS db_xxx.log_table_xxx (x String, y Int) ENGINE = Log;") +sess.query("INSERT INTO db_xxx.log_table_xxx VALUES ('a', 1), ('b', 3), ('c', 2), ('d', 5);") +sess.query( + "CREATE VIEW db_xxx.view_xxx AS SELECT * FROM db_xxx.log_table_xxx LIMIT 4;" +) +print("ビューã‹ã‚‰é¸æŠž:\n") +print(sess.query("SELECT * FROM db_xxx.view_xxx", "Pretty")) +``` + +関連情報: [test_stateful.py](https://github.com/chdb-io/chdb/blob/main/tests/test_stateful.py). + +### Python DB-API 2.0ã§ã®ã‚¯ã‚¨ãƒª + +```python +import chdb.dbapi as dbapi +print("chdbドライãƒãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³: {0}".format(dbapi.get_client_info())) + +conn1 = dbapi.connect() +cur1 = conn1.cursor() +cur1.execute('select version()') +print("説明: ", cur1.description) +print("データ: ", cur1.fetchone()) +cur1.close() +conn1.close() +``` + +### UDF(ユーザー定義関数)ã§ã®ã‚¯ã‚¨ãƒª + +```python +from chdb.udf import chdb_udf +from chdb import query + +@chdb_udf() +def sum_udf(lhs, rhs): + return int(lhs) + int(rhs) + +print(query("select sum_udf(12,22)")) +``` + +chDBã®Python UDF(ユーザー定義関数)デコレーターã«é–¢ã™ã‚‹æ³¨æ„点。 +1. 関数ã¯ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¬ã‚¹ã§ã‚ã‚‹ã¹ãã§ã™ã€‚UDF(ユーザー定義関数)ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€UDAF(ユーザー定義集約関数)ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +2. デフォルトã®æˆ»ã‚Šå€¤ã®åž‹ã¯Stringã§ã™ã€‚戻り値ã®åž‹ã‚’変更ã—ãŸã„å ´åˆã¯ã€å¼•æ•°ã¨ã—ã¦æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚戻り値ã®åž‹ã¯[次ã®ã„ãšã‚Œã‹](/ja/sql-reference/data-types)ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +3. 関数ã¯Stringåž‹ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹ã¹ãã§ã™ã€‚入力ãŒã‚¿ãƒ–区切りã§ã‚ã‚‹ãŸã‚ã€ã™ã¹ã¦ã®å¼•æ•°ã¯æ–‡å­—列ã§ã™ã€‚ +4. 関数ã¯å…¥åŠ›ã®å„è¡Œã”ã¨ã«å‘¼ã³å‡ºã•ã‚Œã‚‹ã§ã—ょã†ã€‚例: + ```python + def sum_udf(lhs, rhs): + return int(lhs) + int(rhs) + + for line in sys.stdin: + args = line.strip().split('\t') + lhs = args[0] + rhs = args[1] + print(sum_udf(lhs, rhs)) + sys.stdout.flush() + ``` +5. 関数ã¯ç´”粋ãªPython関数ã§ã‚ã‚‹ã¹ãã§ã™ã€‚関数内ã§ä½¿ç”¨ã™ã‚‹ã™ã¹ã¦ã®Pythonモジュールをインãƒãƒ¼ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + ```python + def func_use_json(arg): + import json + ... + ``` +6. 使用ã•ã‚Œã‚‹Pythonインタープリタã¯ã€ã‚¹ã‚¯ãƒªãƒ—トを実行ã—ã¦ã„ã‚‹ã‚‚ã®ã¨åŒã˜ã§ã™ã€‚`sys.executable`ã‹ã‚‰å–å¾—ã§ãã¾ã™ã€‚ + +関連情報: [test_udf.py](https://github.com/chdb-io/chdb/blob/main/tests/test_udf.py). + +### Pythonテーブルエンジン + +### Pandas DataFrameã§ã®ã‚¯ã‚¨ãƒª + +```python +import chdb +import pandas as pd +df = pd.DataFrame( + { + "a": [1, 2, 3, 4, 5, 6], + "b": ["tom", "jerry", "auxten", "tom", "jerry", "auxten"], + } +) + +chdb.query("SELECT b, sum(a) FROM Python(df) GROUP BY b ORDER BY b").show() +``` + +### Arrowテーブルã§ã®ã‚¯ã‚¨ãƒª + +```python +import chdb +import pyarrow as pa +arrow_table = pa.table( + { + "a": [1, 2, 3, 4, 5, 6], + "b": ["tom", "jerry", "auxten", "tom", "jerry", "auxten"], + } +) + +chdb.query( + "SELECT b, sum(a) FROM Python(arrow_table) GROUP BY b ORDER BY b", "debug" +).show() +``` + +### chdb.PyReaderクラスã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã§ã®ã‚¯ã‚¨ãƒª + +1. chdb.PyReaderクラスを継承ã—ã€`read`メソッドを実装ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +2. `read`メソッドã¯ä»¥ä¸‹ã‚’è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™: + 1. リストã®ãƒªã‚¹ãƒˆã‚’è¿”ã™ã“ã¨ã€‚第一次元ã¯ã‚«ãƒ©ãƒ ã€ç¬¬äºŒæ¬¡å…ƒã¯è¡Œã§ã™ã€‚カラムã®é †åºã¯ã€`read`ã®æœ€åˆã®å¼•æ•°`col_names`ã¨åŒã˜ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ + 1. 読ã¿ç–²ã‚ŒãŸæ™‚ã«ç©ºã®ãƒªã‚¹ãƒˆã‚’è¿”ã™ã“ã¨ã€‚ + 1. 状態をæŒã¡ã€ã‚«ãƒ¼ã‚½ãƒ«ã¯`read`メソッド内ã§æ›´æ–°ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ +3. オプションã§`get_schema`メソッドを実装ã—ã¦ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ã‚­ãƒ¼ãƒžã‚’è¿”ã™ã“ã¨ãŒã§ãã¾ã™ã€‚プロトタイプã¯`def get_schema(self) -> List[Tuple[str, str]]:`ã§ã™ã€‚返り値ã¯ã‚¿ãƒ—ルã®ãƒªã‚¹ãƒˆã§ã€å„タプルã¯ã‚«ãƒ©ãƒ åã¨ã‚«ãƒ©ãƒ ã®åž‹ã‚’å«ã¿ã¾ã™ã€‚カラム型ã¯[次ã®ã„ãšã‚Œã‹](/ja/sql-reference/data-types)ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +
+ +```python +import chdb + +class myReader(chdb.PyReader): + def __init__(self, data): + self.data = data + self.cursor = 0 + super().__init__(data) + + def read(self, col_names, count): + print("Python func read", col_names, count, self.cursor) + if self.cursor >= len(self.data["a"]): + return [] + block = [self.data[col] for col in col_names] + self.cursor += len(block[0]) + return block + +reader = myReader( + { + "a": [1, 2, 3, 4, 5, 6], + "b": ["tom", "jerry", "auxten", "tom", "jerry", "auxten"], + } +) + +chdb.query( + "SELECT b, sum(a) FROM Python(reader) GROUP BY b ORDER BY b" +).show() +``` + +関連情報: [test_query_py.py](https://github.com/chdb-io/chdb/blob/main/tests/test_query_py.py). + +## 制é™äº‹é … + +1. サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るカラム型: pandas.Series, pyarrow.array, chdb.PyReader +1. サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型: Int, UInt, Float, String, Date, DateTime, Decimal +1. Pythonオブジェクト型ã¯Stringã«å¤‰æ›ã•ã‚Œã‚‹ +1. Pandas DataFrameã®ãƒ‘フォーマンスã¯æœ€é«˜ã§ã€Arrow Tableã¯PyReaderよりも優れã¦ã„ã¾ã™ã€‚ + +
+ +より多ãã®ä¾‹ã«ã¤ã„ã¦ã¯ã€[examples](https://github.com/chdb-io/chdb/tree/main/examples)ãŠã‚ˆã³[tests](https://github.com/chdb-io/chdb/tree/main/tests)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/chdb/install/rust.md b/docs/ja/chdb/install/rust.md new file mode 100644 index 00000000000..9d482064027 --- /dev/null +++ b/docs/ja/chdb/install/rust.md @@ -0,0 +1,23 @@ +--- +title: Rust用chDBã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« +sidebar_label: Rust +slug: /ja/chdb/install/rust +description: Rust用chDBã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ–¹æ³• +keywords: [chdb, 組ã¿è¾¼ã¿, clickhouse-lite, bun, インストール] +--- + +## è¦ä»¶ + +[libchdb](https://github.com/chdb-io/chdb)をインストールã—ã¾ã™ï¼š + +```bash +curl -sL https://lib.chdb.io | bash +``` + +## 使用法 + +ã“ã®ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã¯ç¾åœ¨é–‹ç™ºä¸­ã§ã™ã€‚[chdb-rust](https://github.com/chdb-io/chdb-rust)ã®æŒ‡ç¤ºã«å¾“ã£ã¦å§‹ã‚ã¦ãã ã•ã„。 + +## GitHubリãƒã‚¸ãƒˆãƒª + +プロジェクトã®GitHubリãƒã‚¸ãƒˆãƒªã¯[chdb-io/chdb-rust](https://github.com/chdb-io/chdb-rust)ã§ç¢ºèªã§ãã¾ã™ã€‚ diff --git a/docs/ja/chdb/sql-reference.md b/docs/ja/chdb/sql-reference.md new file mode 100644 index 00000000000..eb6aa03397e --- /dev/null +++ b/docs/ja/chdb/sql-reference.md @@ -0,0 +1,20 @@ +--- +title: SQLリファレンス +sidebar_label: SQLリファレンス +slug: /ja/chdb/sql-reference +description: chDBã®SQLリファレンス +keywords: [chdb, sql リファレンス] +--- + +chDBã¯ã€ClickHouseã¨åŒã˜SQL構文ã€ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã€ã‚¨ãƒ³ã‚¸ãƒ³ã€ãŠã‚ˆã³é–¢æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +- [SQL構文](/docs/ja/sql-reference/syntax) +- [ステートメント](/docs/ja/sql-reference/statements) +- [テーブルエンジン](/docs/ja/engines/table-engines) +- [データベースエンジン](/docs/ja/engines/database-engines) +- [通常ã®é–¢æ•°](/docs/ja/sql-reference/functions) +- [集計関数](/docs/ja/sql-reference/aggregate-functions) +- [テーブル関数](/docs/ja/sql-reference/table-functions) +- [ウィンドウ関数](/docs/ja/sql-reference/window-functions) + +詳細情報や例ã«ã¤ã„ã¦ã¯ã€[ClickHouse SQLリファレンス](/docs/ja/sql-reference)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/cloud-index.md b/docs/ja/cloud-index.md new file mode 100644 index 00000000000..db456a2dcaf --- /dev/null +++ b/docs/ja/cloud-index.md @@ -0,0 +1,9 @@ +--- +slug: /ja/cloud/overview +keywords: [AWS, Cloud, serverless] +title: æ¦‚è¦ +hide_title: true +--- +import Content from '@site/docs/ja/about-us/cloud.md'; + + diff --git a/docs/ja/cloud/_category_.yml b/docs/ja/cloud/_category_.yml new file mode 100644 index 00000000000..4fcbe452846 --- /dev/null +++ b/docs/ja/cloud/_category_.yml @@ -0,0 +1,7 @@ +position: 1 +label: 'Benefits' +collapsible: true +collapsed: true +link: + type: doc + id: en/cloud/index diff --git a/docs/ja/cloud/bestpractices/_category_.yml b/docs/ja/cloud/bestpractices/_category_.yml new file mode 100644 index 00000000000..0477dadedc4 --- /dev/null +++ b/docs/ja/cloud/bestpractices/_category_.yml @@ -0,0 +1,7 @@ +label: 'Best Practices' +collapsible: true +collapsed: true +link: + type: generated-index + title: Best Practices + slug: /ja/cloud/bestpractices/ diff --git a/docs/ja/cloud/bestpractices/asyncinserts.md b/docs/ja/cloud/bestpractices/asyncinserts.md new file mode 100644 index 00000000000..a47745cbe24 --- /dev/null +++ b/docs/ja/cloud/bestpractices/asyncinserts.md @@ -0,0 +1,58 @@ +--- +slug: /ja/cloud/bestpractices/asynchronous-inserts +sidebar_label: éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆ +title: éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆ (async_insert) +--- + +ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’大è¦æ¨¡ãªãƒãƒƒãƒã§æŒ¿å…¥ã™ã‚‹ã“ã¨ã¯ãƒ™ã‚¹ãƒˆãƒ—ラクティスã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã‚³ãƒ³ãƒ”ュータã®æ¼”算サイクルã¨ãƒ‡ã‚£ã‚¹ã‚¯I/OãŒç¯€ç´„ã•ã‚Œã€çµæžœçš„ã«ã‚³ã‚¹ãƒˆã‚‚削減ã•ã‚Œã¾ã™ã€‚ClickHouse外部ã§ãƒãƒƒãƒå‡¦ç†ã‚’è¡Œã†ã“ã¨ãŒå¯èƒ½ã§ã‚ã‚Œã°ã€ãれも一ã¤ã®é¸æŠžè‚¢ã§ã™ãŒã€ClickHouseã«ãƒãƒƒãƒã‚’作æˆã•ã›ãŸã„å ´åˆã¯ã€ã“ã“ã§èª¬æ˜Žã™ã‚‹éžåŒæœŸINSERTモードを使用ã§ãã¾ã™ã€‚ + +éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§ãƒ‡ãƒ¼ã‚¿ã‚’ãƒãƒƒãƒå‡¦ç†ã—ã€æŒ¿å…¥çŽ‡ã‚’毎秒一ã¤ã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚¯ã‚¨ãƒªç¨‹åº¦ã«ç¶­æŒã™ã‚‹ä»£æ›¿æ‰‹æ®µã¨ã—ã¦ã€[async_insert](/docs/ja/operations/settings/settings.md/#async_insert)設定を有効ã«ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ClickHouseãŒã‚µãƒ¼ãƒãƒ¼å´ã§ãƒãƒƒãƒå‡¦ç†ã‚’è¡Œã„ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’åŒæœŸçš„ã«æ›¸ã込んã§ã„ã¾ã™ã€‚ClickHouseã«é€ä¿¡ã•ã‚ŒãŸå„インサートã¯ã€å³åº§ã«ãã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ‘ートを作æˆã—ã¾ã™ã€‚ã“ã‚Œã¯ã€async_insert設定ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã®0ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ã¨ãã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å‹•ä½œã§ã™: + +![compression block diagram](images/async-01.png) + +async_insertã‚’1ã«è¨­å®šã™ã‚‹ã¨ã€ClickHouseã¯ã¾ãšå—ä¿¡ã—ãŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’メモリ内ãƒãƒƒãƒ•ã‚¡ã«ä¿å­˜ã—ã€ãれを定期的ã«ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ + +ClickHouseãŒãƒãƒƒãƒ•ã‚¡ã‚’ディスクã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹åŽŸå› ã¨ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹æ¡ä»¶ã¯æ¬¡ã®äºŒã¤ã§ã™: +- ãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚ºãŒNãƒã‚¤ãƒˆã«é”ã—ãŸï¼ˆNã¯[async_insert_max_data_size](/docs/ja/operations/settings/settings.md/#async-insert-max-data-size)ã§è¨­å®šå¯èƒ½ï¼‰ +- 最後ã®ãƒãƒƒãƒ•ã‚¡ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã‹ã‚‰Nミリ秒以上ãŒçµŒéŽã—ãŸï¼ˆNã¯[async_insert_busy_timeout_ms](/docs/ja/operations/settings/settings.md/#async-insert-busy-timeout-ms)ã§è¨­å®šå¯èƒ½ï¼‰ + +上記ã®æ¡ä»¶ãŒæº€ãŸã•ã‚Œã‚‹ãŸã³ã«ã€ClickHouseã¯ãƒ¡ãƒ¢ãƒªå†…ãƒãƒƒãƒ•ã‚¡ã‚’ディスクã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ + +:::note +データãŒè¨˜æ†¶è£…ç½®ã®ãƒ‘ートã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ã¨ã€èª­ã¿å–りクエリã®ãŸã‚ã«ãƒ‡ãƒ¼ã‚¿ãŒåˆ©ç”¨å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ã“ã®ã“ã¨ã¯ã€`async_insert_busy_timeout_ms`(デフォルトã§ã¯1秒ã«è¨­å®šï¼‰ã‚„`async_insert_max_data_size`(デフォルトã§ã¯10 MiBã«è¨­å®šï¼‰è¨­å®šã‚’変更ã™ã‚‹éš›ã«è€ƒæ…®ã—ã¦ãã ã•ã„。 +::: + +[wait_for_async_insert](/docs/ja/operations/settings/settings.md/#wait-for-async-insert)設定を使ã†ã“ã¨ã§ã€ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆãŒãƒãƒƒãƒ•ã‚¡ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入後ã™ãã«å¿œç­”ã‚’è¿”ã™ã‹ï¼ˆwait_for_async_insert = 0)ã€ã‚ã‚‹ã„ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã€ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¦ãƒ‘ートã«ãƒ‡ãƒ¼ã‚¿ãŒæ›¸ãè¾¼ã¾ã‚ŒãŸå¾Œã§å¿œç­”ã‚’è¿”ã™ã‹ï¼ˆwait_for_async_insert = 1)を設定ã§ãã¾ã™ã€‚ + +以下ã®äºŒã¤ã®å›³ã¯ã€async_insertã¨wait_for_async_insertã®äºŒã¤ã®è¨­å®šã‚’示ã—ã¦ã„ã¾ã™: + +![compression block diagram](images/async-02.png) + +![compression block diagram](images/async-03.png) + + +### éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã®æœ‰åŠ¹åŒ– + +éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã¯ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ã¾ãŸã¯ç‰¹å®šã®ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦æœ‰åŠ¹åŒ–ã§ãã¾ã™: + +- ユーザーレベルã§ã®éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã®æœ‰åŠ¹åŒ–。ã“ã®ä¾‹ã§ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼`default`を使用ã—ã¦ã„ã¾ã™ãŒã€åˆ¥ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã—ãŸå ´åˆã¯ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã«ç½®ãæ›ãˆã¦ãã ã•ã„: + ```sql + ALTER USER default SETTINGS async_insert = 1 + ``` +- インサートクエリã®SETTINGSå¥ã‚’使用ã—ã¦éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã®è¨­å®šã‚’指定ã§ãã¾ã™: + ```sql + INSERT INTO YourTable SETTINGS async_insert=1, wait_for_async_insert=1 VALUES (...) + ``` +- ã¾ãŸã€ClickHouseプログラミング言語クライアントを使用ã™ã‚‹éš›ã«æŽ¥ç¶šãƒ‘ラメータã¨ã—ã¦éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã®è¨­å®šã‚’指定ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + + 例ã¨ã—ã¦ã€ClickHouse Cloudã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«ClickHouse Java JDBCドライãƒãƒ¼ã‚’使用ã™ã‚‹å ´åˆã€JDBC接続文字列内ã§æ¬¡ã®ã‚ˆã†ã«æŒ‡å®šã§ãã¾ã™: + ```bash + "jdbc:ch://HOST.clickhouse.cloud:8443/?user=default&password=PASSWORD&ssl=true&custom_http_params=async_insert=1,wait_for_async_insert=1" + ``` +éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’使用ã™ã‚‹å ´åˆã€async_insert=1,wait_for_async_insert=1を使用ã™ã‚‹ã“ã¨ã‚’å¼·ã推奨ã—ã¾ã™ã€‚wait_for_async_insert=0を使用ã™ã‚‹ã“ã¨ã¯éžå¸¸ã«ãƒªã‚¹ã‚¯ãŒé«˜ãã€INSERTクライアントãŒã‚¨ãƒ©ãƒ¼ã‚’èªè­˜ã§ããªã„å¯èƒ½æ€§ãŒã‚ã‚Šã€ã¾ãŸã€ClickHouseサーãƒãƒ¼ãŒæ›¸ãè¾¼ã¿é€Ÿåº¦ã‚’減速ã•ã›ã¦ãƒãƒƒã‚¯ãƒ—レッシャーを作æˆã™ã‚‹å¿…è¦ãŒã‚る状æ³ã§ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒé«˜é€Ÿã§æ›¸ãè¾¼ã¿ã‚’続ã‘ã‚‹ã¨æ½œåœ¨çš„ãªã‚ªãƒ¼ãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ + +:::note éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’使用ã™ã‚‹å ´åˆã€è‡ªå‹•é‡è¤‡æŽ’除ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ +手動ã®ãƒãƒƒãƒå‡¦ç†ï¼ˆ[上記セクション](#ingest-data-in-bulk)å‚照)ã¯ã€ï¼ˆæ­£ç¢ºã«ï¼‰åŒã˜ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆãŒä¸€æ™‚çš„ãªãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶šå•é¡Œã«ã‚ˆã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã§ã®è‡ªå‹•å†è©¦è¡Œã®ãŸã‚ClickHouse Cloudã«è¤‡æ•°å›žé€ä¿¡ã•ã‚Œã‚‹å ´åˆã«ã€ãƒ†ãƒ¼ãƒ–ルデータã®[built-in automatic deduplication](/docs/ja/engines/table-engines/mergetree-family/replication.md)をサãƒãƒ¼ãƒˆã™ã‚‹åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ã€‚ +::: diff --git a/docs/ja/cloud/bestpractices/avoidmutations.md b/docs/ja/cloud/bestpractices/avoidmutations.md new file mode 100644 index 00000000000..6790f1fd091 --- /dev/null +++ b/docs/ja/cloud/bestpractices/avoidmutations.md @@ -0,0 +1,13 @@ +--- +slug: /ja/cloud/bestpractices/avoid-mutations +sidebar_label: ミューテーションをé¿ã‘ã‚‹ +title: ミューテーションをé¿ã‘ã‚‹ +--- + +ミューテーションã¨ã¯ã€ãƒ†ãƒ¼ãƒ–ルデータを削除ã¾ãŸã¯æ›´æ–°ã™ã‚‹ [ALTER](/docs/ja/sql-reference/statements/alter/) クエリã®ã“ã¨ã‚’指ã—ã¾ã™ã€‚主㫠ALTER TABLE … DELETE, UPDATE ãªã©ã®ã‚¯ã‚¨ãƒªãŒã“ã‚Œã«è©²å½“ã—ã¾ã™ã€‚ã“ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®æ–°ã—ã„変異ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€ã“ã®ã‚ˆã†ãªã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®å‰ã«æŒ¿å…¥ã•ã‚ŒãŸã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®å…¨ä½“を書ãç›´ã™ã“ã¨ã‚’引ãèµ·ã“ã—ã€å¤§é‡ã®æ›¸ãè¾¼ã¿è¦æ±‚ã«ç¹‹ãŒã‚Šã¾ã™ã€‚ + +æ›´æ–°ã«é–¢ã—ã¦ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã® MergeTree ã®ãƒ†ãƒ¼ãƒ–ルエンジンã®ä»£ã‚ã‚Šã«ã€[ReplacingMergeTree](/docs/ja/engines/table-engines/mergetree-family/replacingmergetree.md) ã¾ãŸã¯ [CollapsingMergeTree](/docs/ja/engines/table-engines/mergetree-family/collapsingmergetree.md) ãªã©ã®å°‚用ã®ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã™ã‚‹ã“ã¨ã§ã€ã“ã®å¤§é‡ã®æ›¸ãè¾¼ã¿è¦æ±‚を回é¿ã§ãã¾ã™ã€‚ + +## 関連コンテンツ + +- ブログ: [ClickHouseã§ã®æ›´æ–°ã¨å‰Šé™¤ã®å‡¦ç†](https://clickhouse.com/blog/handling-updates-and-deletes-in-clickhouse) diff --git a/docs/ja/cloud/bestpractices/avoidnullablecolumns.md b/docs/ja/cloud/bestpractices/avoidnullablecolumns.md new file mode 100644 index 00000000000..8a782f756cd --- /dev/null +++ b/docs/ja/cloud/bestpractices/avoidnullablecolumns.md @@ -0,0 +1,36 @@ +--- +slug: /ja/cloud/bestpractices/avoid-nullable-columns +sidebar_label: Nullableカラムをé¿ã‘ã‚‹ +title: Nullableカラムをé¿ã‘ã‚‹ +--- + +[`Nullable`カラム](/docs/ja/sql-reference/data-types/nullable/)(例: `Nullable(String)`)ã¯`UInt8`åž‹ã®åˆ¥ã‚«ãƒ©ãƒ ã‚’作æˆã—ã¾ã™ã€‚ã“ã®è¿½åŠ ã®ã‚«ãƒ©ãƒ ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒNullableカラムをæ“作ã™ã‚‹ãŸã³ã«å‡¦ç†ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€è¿½åŠ ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¹ãƒšãƒ¼ã‚¹ãŒå¿…è¦ã«ãªã‚Šã€ã»ã¨ã‚“ã©ã®å ´åˆã€ãƒ‘フォーマンスã«æ‚ªå½±éŸ¿ã‚’åŠã¼ã—ã¾ã™ã€‚ + +`Nullable`カラムをé¿ã‘ã‚‹ã«ã¯ã€ãã®ã‚«ãƒ©ãƒ ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’設定ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。例ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã™ã‚‹ä»£ã‚ã‚Šã«ï¼š + +```sql +CREATE TABLE default.sample +( + `x` Int8, + # highlight-next-line + `y` Nullable(Int8) +) +ENGINE = MergeTree +ORDER BY x +``` +次ã®ã‚ˆã†ã«ä½¿ç”¨ã—ã¾ã™ + +```sql +CREATE TABLE default.sample2 +( + `x` Int8, + # highlight-next-line + `y` Int8 DEFAULT 0 +) +ENGINE = MergeTree +ORDER BY x +``` + +:::note +ユースケースを考慮ã—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒä¸é©åˆ‡ã§ã‚ã‚‹å¯èƒ½æ€§ã‚‚ã‚ã‚Šã¾ã™ã€‚ +::: diff --git a/docs/ja/cloud/bestpractices/avoidoptimizefinal.md b/docs/ja/cloud/bestpractices/avoidoptimizefinal.md new file mode 100644 index 00000000000..9fdc7a5a6f1 --- /dev/null +++ b/docs/ja/cloud/bestpractices/avoidoptimizefinal.md @@ -0,0 +1,9 @@ +--- +slug: /ja/cloud/bestpractices/avoid-optimize-final +sidebar_label: Optimize Finalã‚’é¿ã‘ã‚‹ +title: Optimize Finalã‚’é¿ã‘ã‚‹ +--- + +[`OPTIMIZE TABLE ... FINAL`](/docs/ja/sql-reference/statements/optimize/) クエリを使用ã™ã‚‹ã¨ã€ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを1ã¤ã«ãƒžãƒ¼ã‚¸ã™ã‚‹äºˆå®šå¤–ã®ãƒžãƒ¼ã‚¸ãŒé–‹å§‹ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ—ロセス中ã€ClickHouseã¯ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを読ã¿è¾¼ã¿ã€ãれらを解å‡ã—ã€ãƒžãƒ¼ã‚¸ã—ã€1ã¤ã®ãƒ‘ートã«åœ§ç¸®ã—ç›´ã—ã€ã‚ªãƒ–ジェクトストアã«æ›¸ã戻ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å¤šå¤§ãªCPUãŠã‚ˆã³IOリソースãŒæ¶ˆè²»ã•ã‚Œã¾ã™ã€‚ + +ã“ã®æœ€é©åŒ–ã§ã¯ã€ã™ã§ã«1ã¤ã®ãƒ‘ーツã«ãƒžãƒ¼ã‚¸ã•ã‚Œã¦ã„ã‚‹å ´åˆã§ã‚‚ã€ãã®1ã¤ã®ãƒ‘ーツを書ãæ›ãˆã‚‹ã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ã¾ãŸã€ã€Œ1ã¤ã®ãƒ‘ーツã€ã®ç¯„囲ã«ã¤ã„ã¦ã‚‚é‡è¦ã§ã™ - ã“ã‚Œã¯ã€è¨­å®šå€¤ [`max_bytes_to_merge_at_max_space_in_pool`](https://clickhouse.com/docs/ja/operations/settings/merge-tree-settings#max-bytes-to-merge-at-max-space-in-pool) ãŒç„¡è¦–ã•ã‚Œã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚例ãˆã°ã€[`max_bytes_to_merge_at_max_space_in_pool`](https://clickhouse.com/docs/ja/operations/settings/merge-tree-settings#max-bytes-to-merge-at-max-space-in-pool) ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§150 GBã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚OPTIMIZE TABLE ... FINALを実行ã™ã‚‹ã¨ã€æ®‹ã‚Šã®1ã¤ã®ãƒ‘ーツãŒã“ã®ã‚µã‚¤ã‚ºã‚’超ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚150 GBã®å¤šæ•°ã®ãƒ‘ーツを1ã¤ã«ãƒžãƒ¼ã‚¸ã™ã‚‹ã“ã¨ã¯ã€å¤§é‡ã®æ™‚間やメモリをè¦ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’一般的ã«ä½¿ç”¨ã—ãªã„ã‚‚ã†ä¸€ã¤ã®é‡è¦ãªè€ƒæ…®ç‚¹ã§ã™ã€‚ diff --git a/docs/ja/cloud/bestpractices/bulkinserts.md b/docs/ja/cloud/bestpractices/bulkinserts.md new file mode 100644 index 00000000000..f81d7127ca0 --- /dev/null +++ b/docs/ja/cloud/bestpractices/bulkinserts.md @@ -0,0 +1,13 @@ +--- +slug: /ja/cloud/bestpractices/bulk-inserts +sidebar_position: 63 +sidebar_label: ãƒãƒ«ã‚¯ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’使用ã™ã‚‹ +title: ãƒãƒ«ã‚¯ã‚¤ãƒ³ã‚µãƒ¼ãƒˆ +--- + +## データを一括ã§å–り込む +デフォルトã§ã¯ã€ClickHouseã«é€ä¿¡ã•ã‚ŒãŸå„インサートã¯ã€ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¨ä¸€ç·’ã«ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ä»–ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ä¸Šã®ãƒ‘ートをå³åº§ã«ä½œæˆã—ã¾ã™ã€‚ãã®ãŸã‚ã€å°‘ãªã„æ•°ã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã§å„インサートã«å¤šãã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚ã‚‹æ–¹ãŒã€å¤šãã®æ•°ã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã§å„インサートã«å°‘ãªã„データをå«ã‚るよりもã€å¿…è¦ãªæ›¸ãè¾¼ã¿ã®æ•°ãŒæ¸›ã‚Šã¾ã™ã€‚一般的ã«ã€1回ã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã§å°‘ãªãã¨ã‚‚1,000è¡Œã€ç†æƒ³çš„ã«ã¯10,000ã‹ã‚‰100,000è¡Œã®å¤§ããªãƒãƒƒãƒã§ãƒ‡ãƒ¼ã‚¿ã‚’インサートã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ãã®ãŸã‚ã«ã¯ã€[Bufferテーブルエンジン](/docs/ja/engines/table-engines/special/buffer.md)を使用ã—ã¦ãƒãƒƒãƒã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’å¯èƒ½ã«ã™ã‚‹ãƒãƒƒãƒ•ã‚¡ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’実装ã™ã‚‹ã‹ã€éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’利用ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„([éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆ](/docs/ja/cloud/bestpractices/asyncinserts.md)ã‚’å‚照)。 + +:::tip +インサートã®ã‚µã‚¤ã‚ºã«é–¢ä¿‚ãªãã€ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚¯ã‚¨ãƒªã®æ•°ã‚’1秒ã«1回程度ã«ä¿ã¤ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã®æŽ¨å¥¨ã®ç†ç”±ã¯ã€ä½œæˆã•ã‚ŒãŸãƒ‘ートãŒãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§å¤§å®¹é‡ã®ãƒ‘ートã«ãƒžãƒ¼ã‚¸ã•ã‚Œã€èª­ã¿å–りクエリã®æœ€é©åŒ–ã‚’è¡Œã†ãŸã‚ã§ã™ã€‚1秒間ã«å¤šãã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã™ã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã®ãƒžãƒ¼ã‚¸ãŒå¤šæ•°ã®æ–°ã—ã„パートã«è¿½ã„ã¤ã‘ãªããªã‚‹çŠ¶æ³ã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãŸã ã—ã€éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’使用ã™ã‚‹å ´åˆã¯ã€1秒間ã«ã‚ˆã‚Šå¤šãã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚¯ã‚¨ãƒªã‚’使用ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ï¼ˆ[éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆ](/docs/ja/cloud/bestpractices/asyncinserts.md)ã‚’å‚照)。 +::: diff --git a/docs/ja/cloud/bestpractices/images/async-01.png b/docs/ja/cloud/bestpractices/images/async-01.png new file mode 100644 index 00000000000..5ac0f7cd712 Binary files /dev/null and b/docs/ja/cloud/bestpractices/images/async-01.png differ diff --git a/docs/ja/cloud/bestpractices/images/async-02.png b/docs/ja/cloud/bestpractices/images/async-02.png new file mode 100644 index 00000000000..30446e4f73d Binary files /dev/null and b/docs/ja/cloud/bestpractices/images/async-02.png differ diff --git a/docs/ja/cloud/bestpractices/images/async-03.png b/docs/ja/cloud/bestpractices/images/async-03.png new file mode 100644 index 00000000000..ecd82e950a7 Binary files /dev/null and b/docs/ja/cloud/bestpractices/images/async-03.png differ diff --git a/docs/ja/cloud/bestpractices/images/async.excalidraw b/docs/ja/cloud/bestpractices/images/async.excalidraw new file mode 100644 index 00000000000..a310e8e73ec --- /dev/null +++ b/docs/ja/cloud/bestpractices/images/async.excalidraw @@ -0,0 +1,8682 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://app.excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 9191, + "versionNonce": 647165293, + "isDeleted": false, + "id": "z7b22yE8RBNw-dJti7WVw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 11713.625100217656, + "y": -362.5020983032264, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 573.0429734446138, + "height": 1493.1072881078205, + "seed": 77762255, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "veotS3i5mtgTncfBapy56", + "type": "arrow" + }, + { + "id": "kt7o2EcGvutAPunnwRp85", + "type": "arrow" + }, + { + "id": "0wAEvWjfkReYdnXnKEP-h", + "type": "arrow" + }, + { + "id": "HQHHlxtTUMpxfg5tg2cgp", + "type": "arrow" + }, + { + "id": "QcBHPr75biqSQUSeenF-n", + "type": "arrow" + }, + { + "id": "SW4ZoMUP2yAJ0tQGqBBMv", + "type": "arrow" + } + ], + "updated": 1664526042739, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 9406, + "versionNonce": 2018714595, + "isDeleted": false, + "id": "0kqbthpF2BiBxnmmuryaa", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 70, + "angle": 0, + "x": 11789.731349070416, + "y": -220.98991573643434, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 1138.870180087369, + "seed": 1270704335, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "zWRCMAu8b-b3yhe5MqdXu", + "type": "arrow" + }, + { + "id": "_GH5FCHHFjL8ucTQMTU2M", + "type": "arrow" + }, + { + "id": "Lvf51imWTee_5K2D3NesT", + "type": "arrow" + }, + { + "id": "MHgyHI7AE34K9ew6I8yKE", + "type": "arrow" + } + ], + "updated": 1664526042739, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8358, + "versionNonce": 1480017389, + "isDeleted": false, + "id": "bC-MZJnsb_BfYPNP8wLol", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 12653.566657908705, + "y": -3253.871411737997, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 573.0429734446138, + "height": 1340.6118210378552, + "seed": 810810465, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "Lk_di2Do9dqrCKDW8N0Gm", + "type": "arrow" + }, + { + "id": "YPI_35Zw_AwduFo1kpFcA", + "type": "arrow" + }, + { + "id": "f9HEnxVOpTBviKw8tXThY", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 640, + "versionNonce": 1580866403, + "isDeleted": false, + "id": "d4vLH9jcWs8UgK72bcfg3", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12686.881791728685, + "y": -3218.149529222761, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 498, + "height": 59, + "seed": 742471215, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "Cloud Object Storage", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Cloud Object Storage" + }, + { + "type": "rectangle", + "version": 7072, + "versionNonce": 1318191181, + "isDeleted": false, + "id": "8_SkgbVKhlR-i00bKx4GO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 12770.276081935259, + "y": -2966.5796372067907, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 331.74912391788905, + "height": 187.53194150601996, + "seed": 473417793, + "groupIds": [ + "_o2D4Ff754LPiJ3lANnSl" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Lk_di2Do9dqrCKDW8N0Gm", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 625, + "versionNonce": 466007811, + "isDeleted": false, + "id": "dF8SSKrHtIz-FHa6Xtnzg", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12846.17314606392, + "y": -2926.513937048745, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 189.04938640566917, + "height": 102.30907970189156, + "seed": 976787535, + "groupIds": [ + "_o2D4Ff754LPiJ3lANnSl" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 80.06797541887164, + "fontFamily": 1, + "text": "Part", + "baseline": 71.30907970189156, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Part" + }, + { + "type": "rectangle", + "version": 7201, + "versionNonce": 1919315629, + "isDeleted": false, + "id": "TRbPz9TYXzrkV2ImWH0Q6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 12778.69576288221, + "y": -2629.001616539861, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 331.74912391788905, + "height": 187.53194150601996, + "seed": 360126497, + "groupIds": [ + "UK_p7ZURolHsxzKbESJfP" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "YPI_35Zw_AwduFo1kpFcA", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 779, + "versionNonce": 545185443, + "isDeleted": false, + "id": "ZnThar1RbW3QRqk_PHGdz", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12851.583200290752, + "y": -2582.7230820505692, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 189.04938640566917, + "height": 102.30907970189156, + "seed": 1933489775, + "groupIds": [ + "UK_p7ZURolHsxzKbESJfP" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 80.06797541887164, + "fontFamily": 1, + "text": "Part", + "baseline": 71.30907970189156, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Part" + }, + { + "type": "rectangle", + "version": 7280, + "versionNonce": 1381896461, + "isDeleted": false, + "id": "e7TqDGRkXzcjPEEyP5vcS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 12787.749619364122, + "y": -2305.301487900526, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 331.74912391788905, + "height": 187.53194150601996, + "seed": 1845586945, + "groupIds": [ + "eYxxul4F4EQgO40CK_jWL" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "f9HEnxVOpTBviKw8tXThY", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 864, + "versionNonce": 386994755, + "isDeleted": false, + "id": "ZUb7SBz2Tb-ELWFc663jz", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12861.177245411945, + "y": -2256.9089129349886, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 189.04938640566917, + "height": 102.30907970189156, + "seed": 2115768463, + "groupIds": [ + "eYxxul4F4EQgO40CK_jWL" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 80.06797541887164, + "fontFamily": 1, + "text": "Part", + "baseline": 71.30907970189156, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Part" + }, + { + "type": "rectangle", + "version": 8588, + "versionNonce": 1811048301, + "isDeleted": false, + "id": "r4asxMHx9AF_CwQuXL5fr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 11717.33779159477, + "y": -3251.8698951545557, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 573.0429734446138, + "height": 1335.3865333455474, + "seed": 232145889, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "gBlSD1bJsqWNZiq5ArccA", + "type": "arrow" + }, + { + "id": "_LoAwX3tpSgnbaB7aSy5P", + "type": "arrow" + }, + { + "id": "YPI_35Zw_AwduFo1kpFcA", + "type": "arrow" + }, + { + "id": "f9HEnxVOpTBviKw8tXThY", + "type": "arrow" + }, + { + "id": "oM06BNl4jMhDCQawN0zMG", + "type": "arrow" + }, + { + "id": "Lk_di2Do9dqrCKDW8N0Gm", + "type": "arrow" + }, + { + "id": "CNm4GJJ-rnwmdgPRGLvid", + "type": "arrow" + }, + { + "id": "7DX8HA8axopnXqPbjokVE", + "type": "arrow" + }, + { + "id": "6PEFg4n0JDF3pzWvnf30o", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 783, + "versionNonce": 1348194787, + "isDeleted": false, + "id": "7m-mbZyIVyy569uTn4tBd", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11772.853936454947, + "y": -3217.188579668402, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 373, + "height": 59, + "seed": 344532655, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "ClickHouse Cloud", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse Cloud" + }, + { + "type": "image", + "version": 7612, + "versionNonce": 1366094285, + "isDeleted": false, + "id": "2x--W-ZvY7ju0oGWOTVyT", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12173.67001282949, + "y": -3219.1902669673636, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 69.82062964662826, + "height": 62.056575629923195, + "seed": 822419393, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 8618, + "versionNonce": 2104335747, + "isDeleted": false, + "id": "w3eLzAqXtWGhH7PGEgS30", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 10923.404910249546, + "y": -3064.805232181765, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 202.38417375812654, + "seed": 623802575, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7215, + "versionNonce": 266809389, + "isDeleted": false, + "id": "yyBPzm_6f5xE0byBRF1rD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10936.419143009847, + "y": -3050.3868957032555, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1705869217, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1249, + "versionNonce": 1430954637, + "isDeleted": false, + "id": "86JAnse64Kf1MqKWhOdCo", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11137.620333766728, + "y": -2974.834601195555, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1241441153, + "groupIds": [ + "FTTlvUwZNT9_ZQyZQ4cjm" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1422, + "versionNonce": 1947228355, + "isDeleted": false, + "id": "eZcTl0fr3lgHxYeTJeIbl", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11137.620333766728, + "y": -2965.320276036416, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 74699023, + "groupIds": [ + "FTTlvUwZNT9_ZQyZQ4cjm" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1318, + "versionNonce": 1448134893, + "isDeleted": false, + "id": "-8pzVLkx5sWZfu5BrM1xQ", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11137.620333766728, + "y": -2955.805950877277, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 171494241, + "groupIds": [ + "FTTlvUwZNT9_ZQyZQ4cjm" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1321, + "versionNonce": 1954751309, + "isDeleted": false, + "id": "g7iFjimxwzRqo-hVVsMtx", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11051.450247834839, + "y": -3051.063348010731, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 514504513, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8633, + "versionNonce": 898354083, + "isDeleted": false, + "id": "14um3uuD-lJpKFHhdHqFV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 10932.414242905656, + "y": -2412.763441454721, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 202.38417375812654, + "seed": 618041871, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8664, + "versionNonce": 1114187203, + "isDeleted": false, + "id": "1Q4k4j8GjWiWN_1lKHWFI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 10927.65208851143, + "y": -2740.7145584258697, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 202.38417375812654, + "seed": 2019432303, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "arrow", + "version": 1604, + "versionNonce": 1795828707, + "isDeleted": false, + "id": "gBlSD1bJsqWNZiq5ArccA", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 10594.324968228852, + "y": -2851.518633431533, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 1113.9555986959022, + "height": 2.7898041151352118, + "seed": 1972267183, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "r4asxMHx9AF_CwQuXL5fr", + "focus": 0.40524785955330467, + "gap": 9.057224670014875 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1113.9555986959022, + -2.7898041151352118 + ] + ] + }, + { + "type": "arrow", + "version": 1845, + "versionNonce": 1122580429, + "isDeleted": false, + "id": "_LoAwX3tpSgnbaB7aSy5P", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 10595.202639827345, + "y": -2526.7935270425287, + "strokeColor": "#3f78ec", + "backgroundColor": "#ef9236", + "width": 1109.8649363564746, + "height": 1.4805954349831154, + "seed": 1064107457, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "r4asxMHx9AF_CwQuXL5fr", + "focus": -0.08308029355720341, + "gap": 12.270215410949277 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1109.8649363564746, + -1.4805954349831154 + ] + ] + }, + { + "type": "arrow", + "version": 1483, + "versionNonce": 624998275, + "isDeleted": false, + "id": "oM06BNl4jMhDCQawN0zMG", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 10602.4096126515, + "y": -2190.2900278869147, + "strokeColor": "#ef9236", + "backgroundColor": "#ef9236", + "width": 1109.2581114153727, + "height": 5.8104704563475025, + "seed": 2017163983, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "startBinding": { + "elementId": "v0VPu-dOzqZnKb6oWmVs8", + "focus": -1.8456662495571472, + "gap": 15.409080937494991 + }, + "endBinding": { + "elementId": "r4asxMHx9AF_CwQuXL5fr", + "focus": -0.5776284899645453, + "gap": 5.670067527896208 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1109.2581114153727, + -5.8104704563475025 + ] + ] + }, + { + "type": "text", + "version": 1524, + "versionNonce": 1441445421, + "isDeleted": false, + "id": "wzVySREK89VXORifFN-n9", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11128.489472206526, + "y": -2151.5439128164917, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 32.60579993680513, + "height": 136.3515270084578, + "seed": 1466539425, + "groupIds": [ + "lZRMHQF9ze0VLmpdEoOHb" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 106.70989070227132, + "fontFamily": 1, + "text": ".", + "baseline": 96.3515270084578, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1688, + "versionNonce": 1541721891, + "isDeleted": false, + "id": "MPwhakWq6HiTskDXqVC7k", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11128.489472206526, + "y": -2094.1637864092327, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 32.60579993680513, + "height": 136.3515270084578, + "seed": 1673611503, + "groupIds": [ + "lZRMHQF9ze0VLmpdEoOHb" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 106.70989070227132, + "fontFamily": 1, + "text": ".", + "baseline": 96.3515270084578, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1600, + "versionNonce": 1559062669, + "isDeleted": false, + "id": "BwdLyi1-L2RUYXy9xHXDo", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11128.489472206526, + "y": -2036.7836600019737, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 32.60579993680513, + "height": 136.3515270084578, + "seed": 713507201, + "groupIds": [ + "lZRMHQF9ze0VLmpdEoOHb" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 106.70989070227132, + "fontFamily": 1, + "text": ".", + "baseline": 96.3515270084578, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1382, + "versionNonce": 1097134787, + "isDeleted": false, + "id": "Z28owIXwt3E5af-gPVQxO", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12932.009569792115, + "y": -2153.7487984083537, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 32.60579993680513, + "height": 136.3515270084578, + "seed": 363352847, + "groupIds": [ + "YlXP2qvWycHOudlREYVDP" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 106.70989070227132, + "fontFamily": 1, + "text": ".", + "baseline": 96.3515270084578, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1546, + "versionNonce": 699059949, + "isDeleted": false, + "id": "EHzBoQcSe594ZnDZZB330", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12932.009569792115, + "y": -2096.3686720010946, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 32.60579993680513, + "height": 136.3515270084578, + "seed": 906324321, + "groupIds": [ + "YlXP2qvWycHOudlREYVDP" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 106.70989070227132, + "fontFamily": 1, + "text": ".", + "baseline": 96.3515270084578, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1458, + "versionNonce": 912237155, + "isDeleted": false, + "id": "A-KLwRYqMrBpalqDDXAWH", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12932.009569792115, + "y": -2038.9885455938356, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 32.60579993680513, + "height": 136.3515270084578, + "seed": 644421935, + "groupIds": [ + "YlXP2qvWycHOudlREYVDP" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 106.70989070227132, + "fontFamily": 1, + "text": ".", + "baseline": 96.3515270084578, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "arrow", + "version": 1168, + "versionNonce": 447506765, + "isDeleted": false, + "id": "Lk_di2Do9dqrCKDW8N0Gm", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 12296.561868915402, + "y": -2865.0059960429708, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 462.7328840911905, + "height": 0.516881397756606, + "seed": 590583105, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "startBinding": { + "elementId": "r4asxMHx9AF_CwQuXL5fr", + "focus": -0.4208841931785951, + "gap": 6.181103876019733 + }, + "endBinding": { + "elementId": "8_SkgbVKhlR-i00bKx4GO", + "focus": -0.09070770920808076, + "gap": 10.981328928668518 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 462.7328840911905, + 0.516881397756606 + ] + ] + }, + { + "type": "arrow", + "version": 1533, + "versionNonce": 61038083, + "isDeleted": false, + "id": "YPI_35Zw_AwduFo1kpFcA", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 12302.170083829382, + "y": -2542.438861037297, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 459.3807302084424, + "height": 3.0096084426559173, + "seed": 191634255, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "startBinding": { + "elementId": "r4asxMHx9AF_CwQuXL5fr", + "focus": 0.05941742942559109, + "gap": 11.789318789999925 + }, + "endBinding": { + "elementId": "TRbPz9TYXzrkV2ImWH0Q6", + "focus": 0.03157068329610485, + "gap": 17.144948844385 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 459.3807302084424, + 3.0096084426559173 + ] + ] + }, + { + "type": "arrow", + "version": 1700, + "versionNonce": 21739437, + "isDeleted": false, + "id": "f9HEnxVOpTBviKw8tXThY", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 12300.222597391738, + "y": -2200.9445397735844, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 468.09049532253266, + "height": 1.2695973711279294, + "seed": 1165051169, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "startBinding": { + "elementId": "r4asxMHx9AF_CwQuXL5fr", + "focus": 0.5744992460351734, + "gap": 9.841832352355596 + }, + "endBinding": { + "elementId": "e7TqDGRkXzcjPEEyP5vcS", + "focus": -0.09360166648365265, + "gap": 19.436526649851658 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 468.09049532253266, + -1.2695973711279294 + ] + ] + }, + { + "type": "text", + "version": 1210, + "versionNonce": 1412343203, + "isDeleted": false, + "id": "tWvUA7xEsE36cUtoFfqnY", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10926.030907155478, + "y": -3218.297896217668, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 432, + "height": 59, + "seed": 2030688623, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "Insert statements", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Insert statements" + }, + { + "type": "arrow", + "version": 1048, + "versionNonce": 1202862605, + "isDeleted": false, + "id": "NqjEpSR_dJCttOCntuu_V", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10711.25765719908, + "y": -3407.8988617918803, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 7.589343086200643, + "height": 1643.9036701963516, + "seed": 1479407873, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 7.589343086200643, + 1643.9036701963516 + ] + ] + }, + { + "type": "text", + "version": 1526, + "versionNonce": 1865414979, + "isDeleted": false, + "id": "X5mm-BFXTFimTtdsX49P2", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10668.784552386063, + "y": -1705.5793083778499, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 93, + "height": 59, + "seed": 76206991, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "time", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "time" + }, + { + "type": "arrow", + "version": 2204, + "versionNonce": 1457090669, + "isDeleted": false, + "id": "CNm4GJJ-rnwmdgPRGLvid", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 11707.428256649255, + "y": -2816.1450649511416, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 1053.9157014066477, + "height": 1.088799603037387, + "seed": 2095657185, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "startBinding": { + "elementId": "r4asxMHx9AF_CwQuXL5fr", + "focus": 0.3477221783787709, + "gap": 9.90953494551377 + }, + "endBinding": { + "elementId": "OKueZSKQ2ETJEZPzWvtfg", + "focus": 0.01912997293608503, + "gap": 11.687067524372651 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1053.9157014066477, + 1.088799603037387 + ] + ] + }, + { + "type": "arrow", + "version": 2320, + "versionNonce": 839244003, + "isDeleted": false, + "id": "7DX8HA8axopnXqPbjokVE", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 11704.118186549878, + "y": -2490.0246239209296, + "strokeColor": "#3f78ec", + "backgroundColor": "#ef9236", + "width": 1048.317345240992, + "height": 2.6603627831809717, + "seed": 103254447, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "startBinding": { + "elementId": "r4asxMHx9AF_CwQuXL5fr", + "focus": -0.14199550169923875, + "gap": 13.219605044890159 + }, + "endBinding": { + "elementId": "xE19T5e9Wysn8zoUG985g", + "focus": -0.05287449867237143, + "gap": 11.259228929836354 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1048.317345240992, + -2.6603627831809717 + ] + ] + }, + { + "type": "arrow", + "version": 2296, + "versionNonce": 1015732941, + "isDeleted": false, + "id": "6PEFg4n0JDF3pzWvnf30o", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 11709.515568986542, + "y": -2160.8492028620435, + "strokeColor": "#ef9236", + "backgroundColor": "#ef9236", + "width": 1047.0984069373608, + "height": 4.357566102021792, + "seed": 2033347777, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "startBinding": { + "elementId": "r4asxMHx9AF_CwQuXL5fr", + "focus": -0.6310532427810328, + "gap": 7.822222608226184 + }, + "endBinding": { + "elementId": "v0VPu-dOzqZnKb6oWmVs8", + "focus": 0.026668879454902896, + "gap": 8.517975295454562 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1047.0984069373608, + 4.357566102021792 + ] + ] + }, + { + "type": "text", + "version": 1734, + "versionNonce": 1245627523, + "isDeleted": false, + "id": "OKueZSKQ2ETJEZPzWvtfg", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10586.743002549409, + "y": -2833.4164856067873, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 55.082485168825606, + "height": 36.109629166230114, + "seed": 990411727, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "16_ypIlxoTp2M1Dk710RX", + "type": "arrow" + }, + { + "id": "eEfVfgGYmCShzGgSTsASX", + "type": "arrow" + }, + { + "id": "CNm4GJJ-rnwmdgPRGLvid", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 28.566036840756308, + "fontFamily": 1, + "text": "ACK", + "baseline": 26.109629166230114, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ACK" + }, + { + "type": "text", + "version": 1888, + "versionNonce": 291502381, + "isDeleted": false, + "id": "xE19T5e9Wysn8zoUG985g", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10589.459127210226, + "y": -2509.87993220553, + "strokeColor": "#3f78ec", + "backgroundColor": "#ef9236", + "width": 55.082485168825606, + "height": 36.109629166230114, + "seed": 883502241, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "7DX8HA8axopnXqPbjokVE", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 28.566036840756308, + "fontFamily": 1, + "text": "ACK", + "baseline": 26.109629166230114, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ACK" + }, + { + "type": "text", + "version": 1858, + "versionNonce": 798571555, + "isDeleted": false, + "id": "v0VPu-dOzqZnKb6oWmVs8", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10598.816701584903, + "y": -2174.88094694942, + "strokeColor": "#ef9236", + "backgroundColor": "#ef9236", + "width": 55.082485168825606, + "height": 36.109629166230114, + "seed": 658909679, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "W7YDiu09-OR0Tvc8g-7Jc", + "type": "arrow" + }, + { + "id": "oM06BNl4jMhDCQawN0zMG", + "type": "arrow" + }, + { + "id": "6PEFg4n0JDF3pzWvnf30o", + "type": "arrow" + } + ], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 28.566036840756308, + "fontFamily": 1, + "text": "ACK", + "baseline": 26.109629166230114, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ACK" + }, + { + "type": "text", + "version": 987, + "versionNonce": 516049805, + "isDeleted": false, + "id": "wGlVn0CphcZySt9Az-yK1", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10707.799612223622, + "y": -3622.7366339723703, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 883.1604826321716, + "height": 113.30422280648524, + "seed": 1996288129, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 94.13763794752755, + "fontFamily": 3, + "text": "async_insert = 0", + "baseline": 91.30422280648524, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "async_insert = 0" + }, + { + "type": "rectangle", + "version": 7416, + "versionNonce": 1577304003, + "isDeleted": false, + "id": "Xl8BQ7srbKrePLFbE4SMU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10936.043282909015, + "y": -2999.083422964102, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 68103183, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7493, + "versionNonce": 1156272621, + "isDeleted": false, + "id": "gof0jujEL7V0RU2-OMofS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10934.88593975075, + "y": -2912.657600075194, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 988612129, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1432, + "versionNonce": 1335676771, + "isDeleted": false, + "id": "wR_KU6UfVZ7MXN3S-2vIf", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11051.074387734008, + "y": -3000.2993183406566, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 64613057, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 1502, + "versionNonce": 551849037, + "isDeleted": false, + "id": "YdX5glsCRgrBKx-sdZZxb", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11053.649724186334, + "y": -2915.3126642838592, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 38451983, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7326, + "versionNonce": 917695235, + "isDeleted": false, + "id": "_gMJ3F4wObYW0YE904ube", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10942.865710780368, + "y": -2725.47459735298, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 15769665, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1359, + "versionNonce": 1921481389, + "isDeleted": false, + "id": "5UKdvAcS_JRJz2Ts4MjtV", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11144.06690153725, + "y": -2649.92230284528, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1008287823, + "groupIds": [ + "tbhrmuasja2WmqQisk8eb" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1532, + "versionNonce": 2009371299, + "isDeleted": false, + "id": "tmOOB6qKUgyVhYl1ayWL2", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11144.06690153725, + "y": -2640.407977686141, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 492105761, + "groupIds": [ + "tbhrmuasja2WmqQisk8eb" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1428, + "versionNonce": 1115528461, + "isDeleted": false, + "id": "aP3ZitQYd7dZFdDhVMoF9", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11144.06690153725, + "y": -2630.893652527002, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1120558703, + "groupIds": [ + "tbhrmuasja2WmqQisk8eb" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1431, + "versionNonce": 1669350979, + "isDeleted": false, + "id": "nelC_MSr6sa8ochhSpqLX", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11057.896815605358, + "y": -2726.151049660456, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1818510337, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7528, + "versionNonce": 1212183405, + "isDeleted": false, + "id": "7HORGwMmckivbaMESZS8T", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10942.682298282823, + "y": -2673.978677010538, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 770881679, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7604, + "versionNonce": 818185699, + "isDeleted": false, + "id": "jJkQz8kHAKT63YuDxjQn8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10941.332507521269, + "y": -2587.745301724918, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1780358113, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1542, + "versionNonce": 270106061, + "isDeleted": false, + "id": "KvP2hjBcsmNlV1YU2dY17", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11057.520955504528, + "y": -2675.3870199903813, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1665846959, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 1612, + "versionNonce": 916443523, + "isDeleted": false, + "id": "XrActUzzlVbNq1YqaOOrb", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11060.096291956854, + "y": -2590.400365933584, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1720842177, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7290, + "versionNonce": 1629633581, + "isDeleted": false, + "id": "yBrqnOHauqTiYzo-koLn2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10948.290542613031, + "y": -2401.50628656556, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 200568559, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1323, + "versionNonce": 1716562211, + "isDeleted": false, + "id": "lOp4e9Assx2rdxXWmmDNf", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11149.491733369912, + "y": -2325.95399205786, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 788626305, + "groupIds": [ + "LcLU-acPh-sOPixH08K9g" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1496, + "versionNonce": 1665412749, + "isDeleted": false, + "id": "ZiytRED6G1DfjCEUe5Tgx", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11149.491733369912, + "y": -2316.43966689872, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1485224207, + "groupIds": [ + "LcLU-acPh-sOPixH08K9g" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1392, + "versionNonce": 88444099, + "isDeleted": false, + "id": "V3Z5_GgCKKDRZl86yTysp", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11149.491733369912, + "y": -2306.925341739582, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1663591265, + "groupIds": [ + "LcLU-acPh-sOPixH08K9g" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1395, + "versionNonce": 87610605, + "isDeleted": false, + "id": "ysDzDodoBlYWx0JNoVRKz", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11063.32164743802, + "y": -2402.1827388730353, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 210419503, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7492, + "versionNonce": 656211043, + "isDeleted": false, + "id": "DnkgM_S5MqjruI9CcnD-c", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10947.914682512197, + "y": -2350.202813826406, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1709657921, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042746, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7568, + "versionNonce": 579448653, + "isDeleted": false, + "id": "SBWRJK-TvopNXwt72IjkM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10946.757339353931, + "y": -2263.7769909374983, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1248395599, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1506, + "versionNonce": 1738897411, + "isDeleted": false, + "id": "-A2HLwAuj10deyHVG8xPR", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11062.94578733719, + "y": -2351.4187092029615, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 765312801, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 1577, + "versionNonce": 1771060653, + "isDeleted": false, + "id": "PHVvYTFt-Tu8Q95XcKSkf", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11065.521123789516, + "y": -2266.4320551461633, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1400504175, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8837, + "versionNonce": 1692237731, + "isDeleted": false, + "id": "awUEWAA8CLP17LpYHvH6P", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 12648.405314950462, + "y": -364.49402835267574, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 573.0429734446138, + "height": 1494.474639367547, + "seed": 642251951, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "UGSRJmN3MsDMsRVN5QR7B", + "type": "arrow" + }, + { + "id": "PwlCoKb42UzW0NYlczmWr", + "type": "arrow" + }, + { + "id": "wBMhNAE5SnGg_sE0i_bOK", + "type": "arrow" + } + ], + "updated": 1664526042747, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 8045, + "versionNonce": 1882486381, + "isDeleted": false, + "id": "0Y0mlivbwuVpvOyf4i_lH", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12168.508669871244, + "y": -329.6339005635946, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 69.82062964662826, + "height": 62.056575629923195, + "seed": 2049301743, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664526042747, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 9051, + "versionNonce": 877015779, + "isDeleted": false, + "id": "uJ3Qd7btEme-7LxdKsay7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 10918.243567291298, + "y": -175.24886577799566, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 202.38417375812654, + "seed": 157674881, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1664526042747, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 9094, + "versionNonce": 1132135683, + "isDeleted": false, + "id": "1t0QMqrqIxrfcoGgOfXia", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 10922.740670054958, + "y": 148.84180797789918, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 202.38417375812654, + "seed": 1595694305, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1664526042747, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 9066, + "versionNonce": 818447139, + "isDeleted": false, + "id": "3-nEIP9R4LmFUQOcEORys", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 10927.252899947409, + "y": 476.7929249490485, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 202.38417375812654, + "seed": 67186753, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1664526042747, + "link": null, + "locked": false + }, + { + "type": "arrow", + "version": 3234, + "versionNonce": 994258243, + "isDeleted": false, + "id": "veotS3i5mtgTncfBapy56", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 10585.180157747885, + "y": 40.859038939258426, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 1125.8776942209497, + "height": 1.2625051858872212, + "seed": 982902689, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "startBinding": { + "elementId": "G_cjG9NGUMqeUkqehWFVW", + "focus": -1.7951399188514814, + "gap": 14.384573043244245 + }, + "endBinding": { + "elementId": "z7b22yE8RBNw-dJti7WVw", + "focus": 0.4616290704639783, + "gap": 2.567248248819851 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1125.8776942209497, + -1.2625051858872212 + ] + ] + }, + { + "type": "arrow", + "version": 2845, + "versionNonce": 1875082349, + "isDeleted": false, + "id": "kt7o2EcGvutAPunnwRp85", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 10585.223726389402, + "y": 363.68658303561233, + "strokeColor": "#3f78ec", + "backgroundColor": "#ef9236", + "width": 1116.2054327063452, + "height": 0.17707567252489298, + "seed": 1339465455, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "z7b22yE8RBNw-dJti7WVw", + "focus": 0.027577621242712277, + "gap": 12.195941121907708 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1116.2054327063452, + -0.17707567252489298 + ] + ] + }, + { + "type": "arrow", + "version": 2417, + "versionNonce": 2106756323, + "isDeleted": false, + "id": "0wAEvWjfkReYdnXnKEP-h", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 10596.763967093577, + "y": 701.5290982506217, + "strokeColor": "#ef9236", + "backgroundColor": "#ef9236", + "width": 1111.7174391889857, + "height": 1.2681875196597048, + "seed": 899304321, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "z7b22yE8RBNw-dJti7WVw", + "focus": -0.4272148747293711, + "gap": 5.143693935092415 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1111.7174391889857, + 1.2681875196597048 + ] + ] + }, + { + "type": "text", + "version": 1641, + "versionNonce": 1146316493, + "isDeleted": false, + "id": "bC9SsYY-nMMJaLxOwA8uq", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10920.72556093747, + "y": -328.59316281899237, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 432, + "height": 59, + "seed": 1084418319, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "Insert statements", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Insert statements" + }, + { + "type": "text", + "version": 1563, + "versionNonce": 674694445, + "isDeleted": false, + "id": "SizfOxTHDWIgtEcHg8XQY", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11797.422041457132, + "y": -213.31559077092766, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 92.45010600653902, + "height": 38.412367988632404, + "seed": 27324207, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "fontSize": 30.38771497908792, + "fontFamily": 1, + "text": "buffer", + "baseline": 26.412367988632404, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "buffer" + }, + { + "type": "rectangle", + "version": 8206, + "versionNonce": 1837531757, + "isDeleted": false, + "id": "43VjTFhKz7zS5KS6W6hIM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 12788.992867861649, + "y": 857.1898514414802, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 331.74912391788905, + "height": 74.02775544479714, + "seed": 1254318319, + "groupIds": [ + "xG1_N6lq3vxstfhJ518Ri" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "oJnjijS90rJ0_z-bJ1AH1", + "type": "arrow" + } + ], + "updated": 1664526042747, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8303, + "versionNonce": 1978328803, + "isDeleted": false, + "id": "uGohHPKAhjZroszXJ1HQM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 12788.49645007739, + "y": 781.549592369844, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 331.74912391788905, + "height": 74.02775544479714, + "seed": 1045604737, + "groupIds": [ + "xG1_N6lq3vxstfhJ518Ri" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "oJnjijS90rJ0_z-bJ1AH1", + "type": "arrow" + } + ], + "updated": 1664526042747, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8389, + "versionNonce": 1606790349, + "isDeleted": false, + "id": "0yU25xOLabv_GmVIIjKWQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 12790.162349148173, + "y": 708.7057069267507, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 331.74912391788905, + "height": 74.02775544479714, + "seed": 78080783, + "groupIds": [ + "xG1_N6lq3vxstfhJ518Ri" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "oJnjijS90rJ0_z-bJ1AH1", + "type": "arrow" + } + ], + "updated": 1664526042747, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2223, + "versionNonce": 710021763, + "isDeleted": false, + "id": "-A14N5H_8zguTVEKam-Ws", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12806.55951702084, + "y": 723.5286297668713, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 308.2869528801066, + "height": 166.83764508805757, + "seed": 203673953, + "groupIds": [ + "xG1_N6lq3vxstfhJ518Ri" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "fontSize": 130.56859180804503, + "fontFamily": 1, + "text": "Part", + "baseline": 117.83764508805757, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Part" + }, + { + "type": "arrow", + "version": 2489, + "versionNonce": 1768983341, + "isDeleted": false, + "id": "MHgyHI7AE34K9ew6I8yKE", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 12233.050567512346, + "y": 821.3452400154339, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 535.859357916067, + "height": 0.06534604596265581, + "seed": 365244719, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "startBinding": { + "elementId": "0kqbthpF2BiBxnmmuryaa", + "focus": 0.8304810387070579, + "gap": 3.5584119912728056 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 535.859357916067, + -0.06534604596265581 + ] + ] + }, + { + "type": "arrow", + "version": 3548, + "versionNonce": 202557987, + "isDeleted": false, + "id": "HQHHlxtTUMpxfg5tg2cgp", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 11703.93290592633, + "y": 73.07819509761953, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 1055.3643529877809, + "height": 0.7398101402201291, + "seed": 2034564417, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "startBinding": { + "elementId": "z7b22yE8RBNw-dJti7WVw", + "focus": 0.41671124609872856, + "gap": 9.692194291325904 + }, + "endBinding": { + "elementId": "G_cjG9NGUMqeUkqehWFVW", + "focus": 0.03027275457975293, + "gap": 11.795086622790222 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1055.3643529877809, + 0.7398101402201291 + ] + ] + }, + { + "type": "arrow", + "version": 3000, + "versionNonce": 183541133, + "isDeleted": false, + "id": "QcBHPr75biqSQUSeenF-n", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 11700.87286745263, + "y": 395.7151579146706, + "strokeColor": "#3f78ec", + "backgroundColor": "#ef9236", + "width": 1049.7659968221255, + "height": 2.5139289048910314, + "seed": 1736782671, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "startBinding": { + "elementId": "z7b22yE8RBNw-dJti7WVw", + "focus": -0.01656803953296109, + "gap": 12.752232765024928 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1049.7659968221255, + -2.5139289048910314 + ] + ] + }, + { + "type": "arrow", + "version": 3651, + "versionNonce": 1343983043, + "isDeleted": false, + "id": "SW4ZoMUP2yAJ0tQGqBBMv", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 11702.52803898585, + "y": 738.0648827446084, + "strokeColor": "#ef9236", + "backgroundColor": "#ef9236", + "width": 1048.547058518494, + "height": 4.493016513437169, + "seed": 622177569, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "startBinding": { + "elementId": "z7b22yE8RBNw-dJti7WVw", + "focus": -0.47171278936871536, + "gap": 11.097061231804219 + }, + "endBinding": { + "elementId": "STPsN7OleYbzTtI1M9_1-", + "focus": 0.06296681167862889, + "gap": 13.903084420416235 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1048.547058518494, + 4.493016513437169 + ] + ] + }, + { + "type": "arrow", + "version": 1403, + "versionNonce": 2071946221, + "isDeleted": false, + "id": "FRemx_DRYWXJhWJZ7KHKo", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10698.525446260344, + "y": -401.118879155345, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 7.589343086200643, + "height": 1643.9036701963516, + "seed": 574615919, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 7.589343086200643, + 1643.9036701963516 + ] + ] + }, + { + "type": "text", + "version": 1920, + "versionNonce": 160095587, + "isDeleted": false, + "id": "6320NDc33yTz5Sv0IRTA2", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10657.106588296567, + "y": 1271.317266339392, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 93, + "height": 59, + "seed": 386228481, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "time", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "time" + }, + { + "type": "text", + "version": 2047, + "versionNonce": 1327914573, + "isDeleted": false, + "id": "G_cjG9NGUMqeUkqehWFVW", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10581.690981146934, + "y": 55.24361198250267, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 55.082485168825606, + "height": 36.109629166230114, + "seed": 1329458063, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "HQHHlxtTUMpxfg5tg2cgp", + "type": "arrow" + }, + { + "id": "veotS3i5mtgTncfBapy56", + "type": "arrow" + } + ], + "updated": 1664526042747, + "link": null, + "locked": false, + "fontSize": 28.566036840756308, + "fontFamily": 1, + "text": "ACK", + "baseline": 26.109629166230114, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ACK" + }, + { + "type": "text", + "version": 2199, + "versionNonce": 1672427779, + "isDeleted": false, + "id": "Q8pPOj73Aj2Wi5lsQGe8O", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10577.598920219556, + "y": 381.07072283767593, + "strokeColor": "#3f78ec", + "backgroundColor": "#ef9236", + "width": 55.082485168825606, + "height": 36.109629166230114, + "seed": 1016305889, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "fontSize": 28.566036840756308, + "fontFamily": 1, + "text": "ACK", + "baseline": 26.109629166230114, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ACK" + }, + { + "type": "text", + "version": 2192, + "versionNonce": 1556024493, + "isDeleted": false, + "id": "STPsN7OleYbzTtI1M9_1-", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10584.995410878117, + "y": 723.5363882379029, + "strokeColor": "#ef9236", + "backgroundColor": "#ef9236", + "width": 55.082485168825606, + "height": 36.109629166230114, + "seed": 985113007, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "SW4ZoMUP2yAJ0tQGqBBMv", + "type": "arrow" + } + ], + "updated": 1664526042747, + "link": null, + "locked": false, + "fontSize": 28.566036840756308, + "fontFamily": 1, + "text": "ACK", + "baseline": 26.109629166230114, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ACK" + }, + { + "type": "text", + "version": 2110, + "versionNonce": 470229155, + "isDeleted": false, + "id": "BU_OIQXM7fVXdcf65bMhn", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10492.550278189203, + "y": 6.870146264230243, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 28, + "height": 56, + "seed": 659543233, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 3, + "text": "t", + "baseline": 45, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "t" + }, + { + "type": "arrow", + "version": 2502, + "versionNonce": 1676865293, + "isDeleted": false, + "id": "rvBS-i9vxpvnrZyITMkMn", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10579.376449067948, + "y": 825.4320721280069, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 1623.7136677156018, + "height": 1.9093365596636431, + "seed": 366318543, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042747, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1623.7136677156018, + -1.9093365596636431 + ] + ] + }, + { + "type": "text", + "version": 2189, + "versionNonce": 1933280621, + "isDeleted": false, + "id": "qg3LJ1Z2_KBSk1KVC1v20", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 9677.080137272706, + "y": 795.4488267744159, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 903, + "height": 56, + "seed": 1487946223, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "tf4f5Ttd3vc2bvxc1uMXA", + "type": "arrow" + } + ], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 3, + "text": "t + async_insert_busy_timeout_ms ", + "baseline": 45, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "t + async_insert_busy_timeout_ms " + }, + { + "type": "text", + "version": 1452, + "versionNonce": 339448803, + "isDeleted": false, + "id": "HTKKa4w7JMH6KIb4s0H1P", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10729.150882897164, + "y": -766.9086906142543, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 884, + "height": 113, + "seed": 2061523073, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 94.13763794752755, + "fontFamily": 3, + "text": "async_insert = 1", + "baseline": 91, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "async_insert = 1" + }, + { + "type": "text", + "version": 1575, + "versionNonce": 232935373, + "isDeleted": false, + "id": "xy4zXW3-DJNw6qjK-ICLf", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10731.029806058092, + "y": -625.932343140094, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 1380, + "height": 113, + "seed": 1682975759, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 94.13763794752755, + "fontFamily": 3, + "text": "wait_for_async_insert = 0", + "baseline": 91, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "wait_for_async_insert = 0" + }, + { + "type": "rectangle", + "version": 8940, + "versionNonce": 1946492803, + "isDeleted": false, + "id": "lTG-8QtXaYksBy1xibPuJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 10915.494547140497, + "y": 155.17015197481192, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 202.38417375812654, + "seed": 451595425, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7601, + "versionNonce": 302042669, + "isDeleted": false, + "id": "st2P9a8klcShYP2PY-sR-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10930.708169409438, + "y": 170.41011304770177, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 2003732975, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1634, + "versionNonce": 635189027, + "isDeleted": false, + "id": "1tXEudKHe-zdZjmPKvz7F", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11131.909360166319, + "y": 245.9624075554018, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1678413953, + "groupIds": [ + "PMuYsSIh9qDGZeLS0Z8pp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1807, + "versionNonce": 1585479821, + "isDeleted": false, + "id": "u_B-oAXydFUBM40i3DVKY", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11131.909360166319, + "y": 255.47673271454073, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 604337167, + "groupIds": [ + "PMuYsSIh9qDGZeLS0Z8pp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1703, + "versionNonce": 674192067, + "isDeleted": false, + "id": "f0FHVNQ171mhmzueoD9N8", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11131.909360166319, + "y": 264.99105787367967, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 541513825, + "groupIds": [ + "PMuYsSIh9qDGZeLS0Z8pp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1706, + "versionNonce": 958064365, + "isDeleted": false, + "id": "Oy0vu1Ud9lem8FozjQvEI", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11045.739274234424, + "y": 169.73366074022556, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 242883119, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7803, + "versionNonce": 664603235, + "isDeleted": false, + "id": "VI8vFlMwoKX5HprA0nXXb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10930.524756911891, + "y": 221.9060333901441, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1097802817, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7879, + "versionNonce": 1952022861, + "isDeleted": false, + "id": "0aaB4qQ_8f_0vicGJNMVv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10929.174966150335, + "y": 308.13940867576343, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 733281359, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1817, + "versionNonce": 955500035, + "isDeleted": false, + "id": "lbp7pzODv2KPFBtlq_zPV", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11045.363414133593, + "y": 220.49769041030027, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1398993953, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 1887, + "versionNonce": 1435881389, + "isDeleted": false, + "id": "v55jU8UjTDppudrTge9hV", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11047.93875058592, + "y": 305.48434446709757, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1066310255, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7430, + "versionNonce": 1395789219, + "isDeleted": false, + "id": "3WG85fNKmNshZUroQX5FM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10932.631584221082, + "y": -159.67267227329876, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1729037473, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1464, + "versionNonce": 989417997, + "isDeleted": false, + "id": "vcyHYwDLe9WwOzrtxN3JT", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11133.832774977964, + "y": -84.12037776559828, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 415879663, + "groupIds": [ + "30EqGw61csf9bYrCg0E5p" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1637, + "versionNonce": 159801667, + "isDeleted": false, + "id": "HHizHG17ix82VUUJV04Rw", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11133.832774977964, + "y": -74.60605260645934, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 250071169, + "groupIds": [ + "30EqGw61csf9bYrCg0E5p" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1533, + "versionNonce": 25004141, + "isDeleted": false, + "id": "doozI8AKUrwVFjkTcPFQ4", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11133.832774977964, + "y": -65.09172744732041, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 179813391, + "groupIds": [ + "30EqGw61csf9bYrCg0E5p" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1536, + "versionNonce": 89080035, + "isDeleted": false, + "id": "wCyO7RWIuIJgWYqOgj_pS", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11047.662689046076, + "y": -160.34912458077406, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1790775393, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7631, + "versionNonce": 720106189, + "isDeleted": false, + "id": "pimrBrFug0s_5JxRkfZ4H", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10932.255724120252, + "y": -108.36919953414508, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 2007196207, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7708, + "versionNonce": 1075522691, + "isDeleted": false, + "id": "B1phD7w2CvvQ0tcUn93lq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10931.098380961987, + "y": -21.943376645237095, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1348361281, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1647, + "versionNonce": 1138626861, + "isDeleted": false, + "id": "uRq_dTrNr-07Dp1uOEM3S", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11047.286828945245, + "y": -109.58509491069981, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 812991567, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 1717, + "versionNonce": 2108204067, + "isDeleted": false, + "id": "LSAK1peaoCVSNpUDZYhQo", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11049.862165397572, + "y": -24.598440853902503, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 799747105, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7586, + "versionNonce": 163406733, + "isDeleted": false, + "id": "GIK2xnh3xjVoH2mNgXJgJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10938.167335942951, + "y": 492.6610330784283, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1834457153, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1619, + "versionNonce": 98969539, + "isDeleted": false, + "id": "ty_23HO_RT9IwAFtzP-Tm", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11139.368526699833, + "y": 568.2133275861283, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1740490831, + "groupIds": [ + "R-bC9tyDYJCoovcGPRLpm" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1792, + "versionNonce": 1354983917, + "isDeleted": false, + "id": "FMYyXedAzwG0rs0AMArOn", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11139.368526699833, + "y": 577.7276527452682, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1377626145, + "groupIds": [ + "R-bC9tyDYJCoovcGPRLpm" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1688, + "versionNonce": 519190371, + "isDeleted": false, + "id": "VeP44CoINcBxdlooIZprg", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11139.368526699833, + "y": 587.2419779044062, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 413001327, + "groupIds": [ + "R-bC9tyDYJCoovcGPRLpm" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1691, + "versionNonce": 704226381, + "isDeleted": false, + "id": "VLsqQ39mYA485LtqqUGXp", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11053.198440767941, + "y": 491.984580770953, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 896351233, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7788, + "versionNonce": 1192973059, + "isDeleted": false, + "id": "yrIAuCc6PANbGI_p2hCjK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10937.791475842118, + "y": 543.9645058175824, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 269828239, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7864, + "versionNonce": 1228509869, + "isDeleted": false, + "id": "hKLE0HIHfe15WnCdNwZ61", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10936.634132683852, + "y": 630.39032870649, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 390599649, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1802, + "versionNonce": 786430627, + "isDeleted": false, + "id": "Ns5IsS-4cSyV1v9yX-oAF", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11052.82258066711, + "y": 542.7486104410268, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1876711087, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 1873, + "versionNonce": 724350221, + "isDeleted": false, + "id": "M430CtOqQcBFAh-Idslo-", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11055.397917119437, + "y": 627.735264497825, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1270673345, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7789, + "versionNonce": 1928244803, + "isDeleted": false, + "id": "fJI4KGFfz5fIAGJ2ar8m0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11802.593530459948, + "y": 170.27465419642976, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 39594191, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1822, + "versionNonce": 2068613997, + "isDeleted": false, + "id": "L3QIoulxLeLgfAneabny_", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12003.79472121683, + "y": 245.8269487041298, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 2138230689, + "groupIds": [ + "SETiNalYS9O2cZrxDcLNZ" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1995, + "versionNonce": 371584483, + "isDeleted": false, + "id": "jmi8wXf8oByCKj5zwJQrV", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12003.79472121683, + "y": 255.34127386326873, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 27014895, + "groupIds": [ + "SETiNalYS9O2cZrxDcLNZ" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1891, + "versionNonce": 971150797, + "isDeleted": false, + "id": "mHV27wpghy6wGwJySxi-R", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12003.79472121683, + "y": 264.85559902240766, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 513422209, + "groupIds": [ + "SETiNalYS9O2cZrxDcLNZ" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1894, + "versionNonce": 999569795, + "isDeleted": false, + "id": "iDcdx6J7TsZAYtk721XVj", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11917.624635284934, + "y": 169.59820188895355, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1442152719, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7991, + "versionNonce": 570971181, + "isDeleted": false, + "id": "_tohoIGOJyx7I3YyQrOl-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11802.410117962401, + "y": 221.7705745388721, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1323965281, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8067, + "versionNonce": 544739619, + "isDeleted": false, + "id": "8wu7Rh5P2H97hyWd-oUQt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11801.060327200845, + "y": 308.00394982449143, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 14714671, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2005, + "versionNonce": 1336362637, + "isDeleted": false, + "id": "jB6lodUtI_6Aec1ro7KM2", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11917.248775184104, + "y": 220.36223155902826, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1622280001, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 2075, + "versionNonce": 1447032003, + "isDeleted": false, + "id": "PjpfBY_pPlkRtVcVk-GVZ", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11919.82411163643, + "y": 305.34888561582557, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1086703951, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7618, + "versionNonce": 628681965, + "isDeleted": false, + "id": "q7tN7khLnuThoxptNGme7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11804.516945271593, + "y": -159.80813112457076, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1850832673, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1652, + "versionNonce": 1015702627, + "isDeleted": false, + "id": "d6ERGGBwjCqxCYBvK-s-Q", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12005.718136028474, + "y": -84.25583661687028, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1929234287, + "groupIds": [ + "TYes1eYl5zdUdjc_MrH4F" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1825, + "versionNonce": 1929824077, + "isDeleted": false, + "id": "6-r6-zLERnCs1T424R6Wv", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12005.718136028474, + "y": -74.74151145773135, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 439872257, + "groupIds": [ + "TYes1eYl5zdUdjc_MrH4F" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1721, + "versionNonce": 992337923, + "isDeleted": false, + "id": "xqlODkL6jeqVQ4RF0YgtE", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12005.718136028474, + "y": -65.22718629859241, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 902889871, + "groupIds": [ + "TYes1eYl5zdUdjc_MrH4F" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1724, + "versionNonce": 1521112493, + "isDeleted": false, + "id": "HqoC90JqkvTgArlp3bcEq", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11919.548050096586, + "y": -160.48458343204607, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 216326881, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7819, + "versionNonce": 1007740835, + "isDeleted": false, + "id": "wBs5xU2Ypww9eKDisJBjJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11804.141085170762, + "y": -108.50465838541709, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1249376175, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7896, + "versionNonce": 2005735437, + "isDeleted": false, + "id": "hI0nlmUp8gxFMcIFD9ed3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11802.983742012497, + "y": -22.0788354965091, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 854056641, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1835, + "versionNonce": 1702492995, + "isDeleted": false, + "id": "ahj_JCsl_bgmKiBBIf-8c", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11919.172189995756, + "y": -109.72055376197181, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 924527055, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 1905, + "versionNonce": 1135119981, + "isDeleted": false, + "id": "QWbQDk1jXsuCEYXARV7ga", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11921.747526448082, + "y": -24.733899705174508, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 987782817, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7774, + "versionNonce": 331324131, + "isDeleted": false, + "id": "81Xym2Ei4mixHPJO_a8tp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11810.052696993462, + "y": 492.5255742271563, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 684922863, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1807, + "versionNonce": 1036400845, + "isDeleted": false, + "id": "CZjGCbM2W7MjicflG3y93", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12011.253887750343, + "y": 568.0778687348563, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1400758913, + "groupIds": [ + "YdoDx14OFuFiJEc9W5Nie" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1980, + "versionNonce": 326125187, + "isDeleted": false, + "id": "x_S5tPlu6ol9a3lsse9EY", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12011.253887750343, + "y": 577.5921938939962, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 363348495, + "groupIds": [ + "YdoDx14OFuFiJEc9W5Nie" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1876, + "versionNonce": 1333761837, + "isDeleted": false, + "id": "8_cNNQ2X-EPzDrde0dTXe", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12011.253887750343, + "y": 587.1065190531342, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 696248929, + "groupIds": [ + "YdoDx14OFuFiJEc9W5Nie" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1879, + "versionNonce": 457866787, + "isDeleted": false, + "id": "eCZRcUYfKOGZ5CFt8YBr8", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11925.083801818451, + "y": 491.849121919681, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 512960559, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7976, + "versionNonce": 1933453709, + "isDeleted": false, + "id": "TwlNxmXGHUH8Y72e2g-M1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11809.676836892628, + "y": 543.8290469663104, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 632682049, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8052, + "versionNonce": 104645059, + "isDeleted": false, + "id": "WYABx-odVUAWdjvyhwilr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11808.519493734362, + "y": 630.254869855218, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 830229071, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1990, + "versionNonce": 440102893, + "isDeleted": false, + "id": "0RZuZQp2fIzg-DrN3WmFq", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11924.707941717621, + "y": 542.6131515897548, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1795130913, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 2061, + "versionNonce": 1298501987, + "isDeleted": false, + "id": "5yUiLONIflckY6ODlMoZO", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11927.283278169947, + "y": 627.599805646553, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1799104623, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "arrow", + "version": 1432, + "versionNonce": 1384180301, + "isDeleted": false, + "id": "p_mujapNK1HLZFLfWV-Mz", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10704.109137958572, + "y": 2773.8210159356904, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 2.5207489314871054, + "height": 1616.867889645605, + "seed": 2053011503, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -2.5207489314871054, + 1616.867889645605 + ] + ] + }, + { + "type": "rectangle", + "version": 9224, + "versionNonce": 1108569347, + "isDeleted": false, + "id": "_S1VsQeCe9jmCVzltaNiq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 12665.741083768607, + "y": 2829.781771902455, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 573.0429734446138, + "height": 1494.474639367547, + "seed": 990357057, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "UGSRJmN3MsDMsRVN5QR7B", + "type": "arrow" + }, + { + "id": "PwlCoKb42UzW0NYlczmWr", + "type": "arrow" + }, + { + "id": "wBMhNAE5SnGg_sE0i_bOK", + "type": "arrow" + } + ], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 9576, + "versionNonce": 130340003, + "isDeleted": false, + "id": "yeWaxa45GzF-9jIgCsb1L", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 11730.481174921983, + "y": 2832.224937774474, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 573.0429734446138, + "height": 1493.1072881078205, + "seed": 1251685921, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "E0USEpWMl2ARgev0503M4", + "type": "arrow" + }, + { + "id": "SymoFzBsIWLDxRI5vaxAl", + "type": "arrow" + }, + { + "id": "1RNOM6dFYkRgYxvim7D4z", + "type": "arrow" + }, + { + "id": "FTHurF4qeJGBxvj8o5fpQ", + "type": "arrow" + }, + { + "id": "nmnzK2jrZye5qir7thmrP", + "type": "arrow" + }, + { + "id": "cUji-Br17Nea8XRPh-Tdx", + "type": "arrow" + } + ], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 8433, + "versionNonce": 1311262787, + "isDeleted": false, + "id": "1Vdo7vOfKL16u6y5-VU-G", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12185.844438689384, + "y": 2864.904565961666, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 69.82062964662826, + "height": 62.056575629923195, + "seed": 1693567489, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664526042748, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 9440, + "versionNonce": 1032950125, + "isDeleted": false, + "id": "CykemVIDRFm_2ZKrr3jqH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 10935.579336109446, + "y": 3019.2896007472655, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 202.38417375812654, + "seed": 1936233103, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 9483, + "versionNonce": 1265110349, + "isDeleted": false, + "id": "cbuTOKVr20FDKIkgA4GIy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 10940.076438873106, + "y": 3343.38027450316, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 202.38417375812654, + "seed": 911218991, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 9454, + "versionNonce": 609557805, + "isDeleted": false, + "id": "io_CdIt9rtIAJ8p1B4f_s", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 10944.588668765557, + "y": 3671.3313914743085, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 202.38417375812654, + "seed": 2056223695, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "arrow", + "version": 3381, + "versionNonce": 599539981, + "isDeleted": false, + "id": "E0USEpWMl2ARgev0503M4", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 10624.61016191806, + "y": 3237.7806316767555, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 1103.303764755099, + "height": 3.4156117718298447, + "seed": 566049391, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "yeWaxa45GzF-9jIgCsb1L", + "focus": 0.4619878782807352, + "gap": 2.56724824882167 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1103.303764755099, + -3.4156117718298447 + ] + ] + }, + { + "type": "arrow", + "version": 3562, + "versionNonce": 904782403, + "isDeleted": false, + "id": "SymoFzBsIWLDxRI5vaxAl", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 10634.460843708423, + "y": 3558.2368459784275, + "strokeColor": "#3f78ec", + "backgroundColor": "#ef9236", + "width": 1084.2764893954172, + "height": 0.3618028454022806, + "seed": 1335699457, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "yeWaxa45GzF-9jIgCsb1L", + "focus": 0.026894030096862375, + "gap": 11.743841818141846 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1084.2764893954172, + 0.3618028454022806 + ] + ] + }, + { + "type": "arrow", + "version": 3175, + "versionNonce": 1376425837, + "isDeleted": false, + "id": "1RNOM6dFYkRgYxvim7D4z", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 10634.483945443835, + "y": 3896.0675647758826, + "strokeColor": "#ef9236", + "backgroundColor": "#ef9236", + "width": 1090.8535355430568, + "height": 1.4317591920334962, + "seed": 1646924943, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "yeWaxa45GzF-9jIgCsb1L", + "focus": -0.42722033057796605, + "gap": 5.143693935090596 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1090.8535355430568, + 1.4317591920334962 + ] + ] + }, + { + "type": "text", + "version": 2028, + "versionNonce": 454992355, + "isDeleted": false, + "id": "9VJJNqw6p5GTpzOi0i0R4", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10938.061329755617, + "y": 2865.9453037062685, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 432, + "height": 59, + "seed": 1016758241, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "Insert statements", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Insert statements" + }, + { + "type": "rectangle", + "version": 9783, + "versionNonce": 620700109, + "isDeleted": false, + "id": "sYKGvj4ZYFGztvmWLWbC7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 70, + "angle": 0, + "x": 11794.329063970248, + "y": 2964.41449903395, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 439.76080645065736, + "height": 1138.870180087369, + "seed": 1345759919, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "zWRCMAu8b-b3yhe5MqdXu", + "type": "arrow" + }, + { + "id": "_GH5FCHHFjL8ucTQMTU2M", + "type": "arrow" + }, + { + "id": "Z1c6cYExM1G6PzJDzZsKg", + "type": "arrow" + } + ], + "updated": 1664526042748, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1942, + "versionNonce": 123104643, + "isDeleted": false, + "id": "d6dmPkhgAN5kOZ4hRC3fu", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11806.75781027528, + "y": 2981.2228757543335, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 92.45010600653902, + "height": 38.412367988632404, + "seed": 1944181697, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042748, + "link": null, + "locked": false, + "fontSize": 30.38771497908792, + "fontFamily": 1, + "text": "buffer", + "baseline": 26.412367988632404, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "buffer" + }, + { + "type": "rectangle", + "version": 8594, + "versionNonce": 306150467, + "isDeleted": false, + "id": "t0Lm7jv4Uqovyoh3gdifz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 12806.328636679795, + "y": 4051.728317966744, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 331.74912391788905, + "height": 74.02775544479714, + "seed": 1221363201, + "groupIds": [ + "89T9p7Et_qq5s53SV7pNo" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "oJnjijS90rJ0_z-bJ1AH1", + "type": "arrow" + } + ], + "updated": 1664526042749, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8691, + "versionNonce": 1354210669, + "isDeleted": false, + "id": "91oVB3IrvKFXhHwP1biGW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 12805.832218895532, + "y": 3976.0880588951086, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 331.74912391788905, + "height": 74.02775544479714, + "seed": 1554486927, + "groupIds": [ + "89T9p7Et_qq5s53SV7pNo" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "oJnjijS90rJ0_z-bJ1AH1", + "type": "arrow" + } + ], + "updated": 1664526042749, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8777, + "versionNonce": 1848441827, + "isDeleted": false, + "id": "7QkYFrJhQcTM3nhBUz0XN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 12807.49811796632, + "y": 3903.2441734520135, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 331.74912391788905, + "height": 74.02775544479714, + "seed": 1412308449, + "groupIds": [ + "89T9p7Et_qq5s53SV7pNo" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "oJnjijS90rJ0_z-bJ1AH1", + "type": "arrow" + } + ], + "updated": 1664526042749, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2610, + "versionNonce": 337340365, + "isDeleted": false, + "id": "w201R2yI0d1xjhmRe1NRL", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12823.895285838986, + "y": 3918.067096292135, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 308.2869528801066, + "height": 166.83764508805757, + "seed": 1672735919, + "groupIds": [ + "89T9p7Et_qq5s53SV7pNo" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "fontSize": 130.56859180804503, + "fontFamily": 1, + "text": "Part", + "baseline": 117.83764508805757, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Part" + }, + { + "type": "arrow", + "version": 3265, + "versionNonce": 1535739779, + "isDeleted": false, + "id": "Z1c6cYExM1G6PzJDzZsKg", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 12246.386336330486, + "y": 4015.883740840124, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 539.859357916067, + "height": 0.06538034538743887, + "seed": 1397864897, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "startBinding": { + "elementId": "sYKGvj4ZYFGztvmWLWbC7", + "focus": 0.8465226964412093, + "gap": 12.296465909581457 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 539.859357916067, + -0.06538034538743887 + ] + ] + }, + { + "type": "arrow", + "version": 3755, + "versionNonce": 559343149, + "isDeleted": false, + "id": "FTHurF4qeJGBxvj8o5fpQ", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 11721.516926577138, + "y": 4053.4068377157064, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 1088.0919143642882, + "height": 2.0576826928454466, + "seed": 252739279, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "startBinding": { + "elementId": "yeWaxa45GzF-9jIgCsb1L", + "focus": -0.6345500353195794, + "gap": 8.964248344843327 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1088.0919143642882, + 2.0576826928454466 + ] + ] + }, + { + "type": "arrow", + "version": 3995, + "versionNonce": 1888722723, + "isDeleted": false, + "id": "nmnzK2jrZye5qir7thmrP", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 11718.979084065571, + "y": 4079.250110135018, + "strokeColor": "#3f78ec", + "backgroundColor": "#ef9236", + "width": 1085.8857366791058, + "height": 4.3606847360542815, + "seed": 123132321, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "startBinding": { + "elementId": "yeWaxa45GzF-9jIgCsb1L", + "focus": -0.6677435996583445, + "gap": 11.502090856410177 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1085.8857366791058, + 4.3606847360542815 + ] + ] + }, + { + "type": "arrow", + "version": 3984, + "versionNonce": 1263769741, + "isDeleted": false, + "id": "cUji-Br17Nea8XRPh-Tdx", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 11722.28484108962, + "y": 4104.806050024824, + "strokeColor": "#ef9236", + "backgroundColor": "#ef9236", + "width": 1083.6525604448043, + "height": 5.3380759152805695, + "seed": 1633012975, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "startBinding": { + "elementId": "yeWaxa45GzF-9jIgCsb1L", + "focus": -0.7013371646566656, + "gap": 8.196333832361233 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1083.6525604448043, + 5.3380759152805695 + ] + ] + }, + { + "type": "text", + "version": 2125, + "versionNonce": 2008662723, + "isDeleted": false, + "id": "kpx6D1BZgInUySlMmcKMk", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10662.876379519015, + "y": 4435.489757261454, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 93, + "height": 59, + "seed": 1634532737, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "time", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "time" + }, + { + "type": "text", + "version": 2234, + "versionNonce": 1271594733, + "isDeleted": false, + "id": "oORPywmtzEdDIA38uLsmV", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10508.040178570109, + "y": 3208.8911580020595, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 28, + "height": 56, + "seed": 1980520207, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 3, + "text": "t", + "baseline": 45, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "t" + }, + { + "type": "text", + "version": 2238, + "versionNonce": 471170691, + "isDeleted": false, + "id": "JejiZv2Lhs1BQDFDgWZbn", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12334.981048376341, + "y": 3855.2843238079936, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 311, + "height": 59, + "seed": 13870433, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526058444, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "(buffer flush)", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "(buffer flush)" + }, + { + "type": "arrow", + "version": 3552, + "versionNonce": 1766234445, + "isDeleted": false, + "id": "Oa17vadiLj-ZBcDq-DqIk", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10593.318463100519, + "y": 4017.0103647230762, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 1623.7136677156018, + "height": 1.5859618770700763, + "seed": 1672256815, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "startBinding": { + "elementId": "hm31v-0wN6ou-nmHxIPH0", + "focus": 0.1492379286659515, + "gap": 6.042136718009715 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1623.7136677156018, + -1.5859618770700763 + ] + ] + }, + { + "type": "text", + "version": 2358, + "versionNonce": 654585347, + "isDeleted": false, + "id": "hm31v-0wN6ou-nmHxIPH0", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 9684.276326382509, + "y": 3985.212792576559, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 903, + "height": 56, + "seed": 1893355841, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Oa17vadiLj-ZBcDq-DqIk", + "type": "arrow" + } + ], + "updated": 1664526042749, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 3, + "text": "t + async_insert_busy_timeout_ms ", + "baseline": 45, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "t + async_insert_busy_timeout_ms " + }, + { + "type": "text", + "version": 2219, + "versionNonce": 1562372013, + "isDeleted": false, + "id": "KpOYZoUP4SClVKsdPAHxq", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10550.943919991476, + "y": 4036.405356736873, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 55.082485168825606, + "height": 36.109629166230114, + "seed": 1570709327, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "fontSize": 28.566036840756308, + "fontFamily": 1, + "text": "ACK", + "baseline": 26.109629166230114, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ACK" + }, + { + "type": "text", + "version": 2280, + "versionNonce": 1928689059, + "isDeleted": false, + "id": "-X43xJfW7Yf_FgejE1zeg", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10549.61384360674, + "y": 4066.434251750293, + "strokeColor": "#3f78ec", + "backgroundColor": "#ef9236", + "width": 55.082485168825606, + "height": 36.109629166230114, + "seed": 652247329, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "fontSize": 28.566036840756308, + "fontFamily": 1, + "text": "ACK", + "baseline": 26.109629166230114, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ACK" + }, + { + "type": "text", + "version": 2332, + "versionNonce": 2038458893, + "isDeleted": false, + "id": "9f_kAYbnsT2Vh1dMfEQsP", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10551.240741578482, + "y": 4095.052602904413, + "strokeColor": "#ef9236", + "backgroundColor": "#ef9236", + "width": 55.082485168825606, + "height": 36.109629166230114, + "seed": 373054831, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "fontSize": 28.566036840756308, + "fontFamily": 1, + "text": "ACK", + "baseline": 26.109629166230114, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ACK" + }, + { + "type": "text", + "version": 1802, + "versionNonce": 748472643, + "isDeleted": false, + "id": "qZLys518MSHE9KFozhw9P", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10764.549728213735, + "y": 2413.58935629607, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 884, + "height": 113, + "seed": 1079358721, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "fontSize": 94.13763794752755, + "fontFamily": 3, + "text": "async_insert = 1", + "baseline": 91, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "async_insert = 1" + }, + { + "type": "text", + "version": 1926, + "versionNonce": 258056301, + "isDeleted": false, + "id": "FN_7uUXENg-Zb2CTwTub9", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 10766.428651374665, + "y": 2554.5657037702304, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 1380, + "height": 113, + "seed": 1624037263, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042749, + "link": null, + "locked": false, + "fontSize": 94.13763794752755, + "fontFamily": 3, + "text": "wait_for_async_insert = 1", + "baseline": 91, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "wait_for_async_insert = 1" + }, + { + "type": "rectangle", + "version": 8025, + "versionNonce": 1142325347, + "isDeleted": false, + "id": "IYdOW9I1xTMKTJosj30GX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10946.687808089993, + "y": 3360.0748238687197, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1130789857, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2058, + "versionNonce": 249195341, + "isDeleted": false, + "id": "_FbyIQaFzC0WBOSCXcGwb", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11147.888998846875, + "y": 3435.6271183764197, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1765306031, + "groupIds": [ + "VDiG1DocIiukvG1E9yQR8" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2231, + "versionNonce": 852392963, + "isDeleted": false, + "id": "2aiIoEHfH-YeyGBsQfSIL", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11147.888998846875, + "y": 3445.1414435355587, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 936269761, + "groupIds": [ + "VDiG1DocIiukvG1E9yQR8" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2127, + "versionNonce": 74021293, + "isDeleted": false, + "id": "aV7bDtVPAiTMOI9XdIW4C", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11147.888998846875, + "y": 3454.6557686946976, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 884261071, + "groupIds": [ + "VDiG1DocIiukvG1E9yQR8" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2130, + "versionNonce": 1816527779, + "isDeleted": false, + "id": "Rh29BPVpHZ5EbvkDrW6oV", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11061.71891291498, + "y": 3359.3983715612435, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 781170593, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8227, + "versionNonce": 1707588621, + "isDeleted": false, + "id": "MumMrQClgIVTc_aeyit88", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10946.50439559245, + "y": 3411.570744211162, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 220319471, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8303, + "versionNonce": 145463107, + "isDeleted": false, + "id": "B6yh7mf8KW5M3SAqUO4RU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10945.15460483089, + "y": 3497.8041194967814, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 702159745, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2241, + "versionNonce": 1525592685, + "isDeleted": false, + "id": "AxR63i3op5_Z0lr3SxcMI", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11061.343052814149, + "y": 3410.162401231318, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 218634511, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 2311, + "versionNonce": 375240419, + "isDeleted": false, + "id": "jXSzypt57Z6MwfD2r4UNC", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11063.918389266475, + "y": 3495.1490552881155, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 971834209, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 7854, + "versionNonce": 1353178317, + "isDeleted": false, + "id": "viN28jDwCZLRzxbPm8qYD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10948.611222901638, + "y": 3029.992038547719, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1776295727, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1888, + "versionNonce": 1407902339, + "isDeleted": false, + "id": "7Bynw_FOhmEDYNADUePwl", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11149.81241365852, + "y": 3105.54433305542, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 991424321, + "groupIds": [ + "AlbRq5oCO2_ZUbqffArRh" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2061, + "versionNonce": 1586281261, + "isDeleted": false, + "id": "eoOIvMh_KtX2QVo1rqEwh", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11149.81241365852, + "y": 3115.058658214559, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 370303311, + "groupIds": [ + "AlbRq5oCO2_ZUbqffArRh" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1957, + "versionNonce": 705796643, + "isDeleted": false, + "id": "bar4rLJDqgN6x_yIAMFd7", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11149.81241365852, + "y": 3124.5729833736978, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1404722977, + "groupIds": [ + "AlbRq5oCO2_ZUbqffArRh" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1960, + "versionNonce": 1829162381, + "isDeleted": false, + "id": "J3Q335dN1YkNLoV15xyBg", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11063.642327726631, + "y": 3029.3155862402436, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 586637167, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8055, + "versionNonce": 1707105731, + "isDeleted": false, + "id": "pZTV2Gis7cMCK-GhVqRkb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10948.235362800808, + "y": 3081.295511286873, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 843305729, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8132, + "versionNonce": 458200045, + "isDeleted": false, + "id": "7dTfotbVGv3ZLMWMDnKgL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10947.078019642542, + "y": 3167.7213341757806, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1658296719, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2071, + "versionNonce": 840281443, + "isDeleted": false, + "id": "_sP0J4vAk4xFfi2xu-BKa", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11063.266467625801, + "y": 3080.0796159103184, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 187943649, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 2141, + "versionNonce": 1701875277, + "isDeleted": false, + "id": "gNV6gfYyyn_VbrnMX7wMY", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11065.841804078127, + "y": 3165.0662699671157, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1256951727, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8010, + "versionNonce": 1382025475, + "isDeleted": false, + "id": "vcwOCQwmDPJLycZmVeU4j", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10954.14697462351, + "y": 3682.325743899446, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1461307073, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2043, + "versionNonce": 172178605, + "isDeleted": false, + "id": "0nQNxLhAsQg5dNDliiSX7", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11155.348165380392, + "y": 3757.878038407146, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 358334927, + "groupIds": [ + "dtDjaa7pTpGYGYdvGNe-A" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2216, + "versionNonce": 471724195, + "isDeleted": false, + "id": "lmVGruSF5NaGuBSdM4d17", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11155.348165380392, + "y": 3767.392363566286, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1351960225, + "groupIds": [ + "dtDjaa7pTpGYGYdvGNe-A" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2112, + "versionNonce": 829497101, + "isDeleted": false, + "id": "G6ykDBV-0ILG6ml87D1Rt", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11155.348165380392, + "y": 3776.906688725424, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 591441903, + "groupIds": [ + "dtDjaa7pTpGYGYdvGNe-A" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2115, + "versionNonce": 821945411, + "isDeleted": false, + "id": "USHW4L2bxJUTINt6JYu6p", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11069.178079448497, + "y": 3681.6492915919707, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 844483201, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8212, + "versionNonce": 1366537581, + "isDeleted": false, + "id": "iXptNufhM6VXOZpXhWL0b", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10953.771114522673, + "y": 3733.6292166386, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 513989135, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8288, + "versionNonce": 2027840483, + "isDeleted": false, + "id": "U_WUE9BHj3jgpyrUJ49Mu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 10952.613771364408, + "y": 3820.0550395275077, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 890950241, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2226, + "versionNonce": 1435795405, + "isDeleted": false, + "id": "ut74Ykqn19rhyLruk1o1n", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11068.802219347666, + "y": 3732.4133212620445, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1551548463, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 2297, + "versionNonce": 1540222851, + "isDeleted": false, + "id": "vuYuvrTMziW5dlYvcjNjn", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11071.377555799992, + "y": 3817.3999753188427, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1303633473, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8180, + "versionNonce": 1007355683, + "isDeleted": false, + "id": "ziz5U4AHNE05XNxEUV_RN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11801.142829149712, + "y": 3357.0968931548437, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 855708961, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2213, + "versionNonce": 593932429, + "isDeleted": false, + "id": "c1PwyUB-GOq8A6H1AINUl", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12002.344019906594, + "y": 3432.6491876625437, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1226770799, + "groupIds": [ + "BaikFKfAK7E_cKcSJFHpb" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2386, + "versionNonce": 805579459, + "isDeleted": false, + "id": "8QoIeYrd9Biqt4x6cVhxo", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12002.344019906594, + "y": 3442.1635128216826, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 591644929, + "groupIds": [ + "BaikFKfAK7E_cKcSJFHpb" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2282, + "versionNonce": 1639651053, + "isDeleted": false, + "id": "_kFMFYBZspxagDHEo83ZH", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12002.344019906594, + "y": 3451.6778379808216, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 2054816655, + "groupIds": [ + "BaikFKfAK7E_cKcSJFHpb" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2285, + "versionNonce": 2086132323, + "isDeleted": false, + "id": "7kU808MNImIHGuzKzfLvf", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11916.173933974698, + "y": 3356.4204408473674, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 80019681, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8382, + "versionNonce": 2037625165, + "isDeleted": false, + "id": "9r7NcOrR4aNLUvURSOWbS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11800.959416652166, + "y": 3408.592813497286, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1454422447, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8458, + "versionNonce": 1305777667, + "isDeleted": false, + "id": "ubWP0wfyZ5QsVrvlIqa4I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11799.60962589061, + "y": 3494.8261887829053, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 890518721, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2396, + "versionNonce": 401211309, + "isDeleted": false, + "id": "LL82mbBZKNEX7E97g3N9F", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11915.798073873868, + "y": 3407.184470517442, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 48999375, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 2466, + "versionNonce": 863559075, + "isDeleted": false, + "id": "NTNR1x7Hz2_jl6dCQ4Dva", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11918.373410326194, + "y": 3492.1711245742395, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 869334177, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8009, + "versionNonce": 55017997, + "isDeleted": false, + "id": "BPbI-pzlVJWzz0VKmiSGn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11803.066243961357, + "y": 3027.014107833843, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1799576047, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2043, + "versionNonce": 1483944259, + "isDeleted": false, + "id": "zsHl9mSslN3hICr_if6yK", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12004.267434718238, + "y": 3102.5664023415434, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1621803137, + "groupIds": [ + "GJmb3oJHg1SrPhlhubiqt" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2216, + "versionNonce": 8763501, + "isDeleted": false, + "id": "vpkaRXh35Dqj7WK7tnapD", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12004.267434718238, + "y": 3112.0807275006823, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1690321935, + "groupIds": [ + "GJmb3oJHg1SrPhlhubiqt" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2112, + "versionNonce": 2116161763, + "isDeleted": false, + "id": "7yfg7aL65VWc06PJnVieq", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12004.267434718238, + "y": 3121.5950526598212, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 2036402273, + "groupIds": [ + "GJmb3oJHg1SrPhlhubiqt" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2115, + "versionNonce": 2037261005, + "isDeleted": false, + "id": "-PONHZbeWcaSELx-4w7xz", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11918.09734878635, + "y": 3026.3376555263676, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 257616431, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8210, + "versionNonce": 907279491, + "isDeleted": false, + "id": "Ta2DTCNo-H7H5hyFrozJC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11802.690383860527, + "y": 3078.3175805729966, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1472418881, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8287, + "versionNonce": 1654276397, + "isDeleted": false, + "id": "Z0ZmqhoY_08H9xoijWIqt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11801.533040702261, + "y": 3164.7434034619046, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 2012990543, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2226, + "versionNonce": 1543992355, + "isDeleted": false, + "id": "xatSANBjvVijniigEF9OF", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11917.72148868552, + "y": 3077.101685196442, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1873880097, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 2296, + "versionNonce": 1634964365, + "isDeleted": false, + "id": "fQqghPsYUR6hAjb8Ut7uU", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11920.296825137846, + "y": 3162.088339253239, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 2054908527, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8165, + "versionNonce": 1340798915, + "isDeleted": false, + "id": "TN0S4WRgv9ljtxPoVxfMe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11808.601995683226, + "y": 3679.34781318557, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 219805697, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2198, + "versionNonce": 842242541, + "isDeleted": false, + "id": "pSHdUmsJdsopwlwDcoHfG", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12009.803186440107, + "y": 3754.90010769327, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1671578767, + "groupIds": [ + "hAXDLk53p66dDHQES9Ls3" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2371, + "versionNonce": 1876756323, + "isDeleted": false, + "id": "MJImwjrzupofDn03QZLzS", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12009.803186440107, + "y": 3764.41443285241, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1375555553, + "groupIds": [ + "hAXDLk53p66dDHQES9Ls3" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2267, + "versionNonce": 1306776653, + "isDeleted": false, + "id": "hTQVLdlZDB3yRAD5ZuXJq", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12009.803186440107, + "y": 3773.928758011548, + "strokeColor": "#000000", + "backgroundColor": "#31303d", + "width": 11, + "height": 46, + "seed": 1395186351, + "groupIds": [ + "hAXDLk53p66dDHQES9Ls3" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": ".", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2270, + "versionNonce": 1378624259, + "isDeleted": false, + "id": "CfA9T6orB6dHSYaWt0x7d", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11923.633100508216, + "y": 3678.6713608780947, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1953147841, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "rectangle", + "version": 8367, + "versionNonce": 1348321965, + "isDeleted": false, + "id": "aPjHudTPMcgtXIrW6c3pI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11808.226135582392, + "y": 3730.651285924724, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1572318415, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8443, + "versionNonce": 1062652579, + "isDeleted": false, + "id": "PSVCS5G7PGQG0iPPypxQL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11807.068792424127, + "y": 3817.0771088136316, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 414.1541017154242, + "height": 42.079701266153464, + "seed": 1015122849, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2381, + "versionNonce": 508224781, + "isDeleted": false, + "id": "NTw2RdcN_QV6vazLQUA0d", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11923.257240407385, + "y": 3729.4353905481685, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1860647663, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 2452, + "versionNonce": 1812692547, + "isDeleted": false, + "id": "ZOtFdqAWvj2Jc45Dh-hoQ", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11925.832576859711, + "y": 3814.4220446049667, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 184.09189206544056, + "height": 45.39252133120452, + "seed": 1114730369, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row values", + "baseline": 32.39252133120452, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row values" + }, + { + "type": "text", + "version": 830, + "versionNonce": 1932049891, + "isDeleted": false, + "id": "qj6hv-WOiJhA9USWOHQ9p", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11771.021756865077, + "y": -323.41194902328493, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 373, + "height": 59, + "seed": 979582115, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "ClickHouse Cloud", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse Cloud" + }, + { + "type": "text", + "version": 833, + "versionNonce": 1060423117, + "isDeleted": false, + "id": "AXuo8IqvL5-2aw3co9o7t", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 11790.304811255894, + "y": 2867.8935130919144, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 373, + "height": 59, + "seed": 1999681251, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "ClickHouse Cloud", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse Cloud" + }, + { + "type": "text", + "version": 717, + "versionNonce": 264046979, + "isDeleted": false, + "id": "btddqkw1cZS62_THR2GYh", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12683.94961784368, + "y": -325.0135316138835, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 498, + "height": 59, + "seed": 1377695565, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "Cloud Object Storage", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Cloud Object Storage" + }, + { + "type": "text", + "version": 678, + "versionNonce": 496272429, + "isDeleted": false, + "id": "VNX0MVuuZ5Kl2GuOrpQxt", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12701.094559476043, + "y": 2872.2978652160627, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 498, + "height": 59, + "seed": 1674277123, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "Cloud Object Storage", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Cloud Object Storage" + }, + { + "type": "text", + "version": 1380, + "versionNonce": 386326819, + "isDeleted": false, + "id": "g7-WS88S7JoAMr2mrsptm", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12326.288227843892, + "y": -2940.675759076498, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 310, + "height": 59, + "seed": 1678436461, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "write request", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "write request" + }, + { + "type": "text", + "version": 1503, + "versionNonce": 1781364365, + "isDeleted": false, + "id": "6fyUyh2YBG2MD71WbAfGC", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12323.509990871042, + "y": -2619.5338150727944, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 310, + "height": 59, + "seed": 1540880717, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "write request", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "write request" + }, + { + "type": "text", + "version": 1559, + "versionNonce": 846513347, + "isDeleted": false, + "id": "8eDBGTeemF7ORaQbQcCC7", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12324.015643259972, + "y": -2270.6228942437424, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 310, + "height": 59, + "seed": 1831670019, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "write request", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "write request" + }, + { + "type": "text", + "version": 1572, + "versionNonce": 1874402541, + "isDeleted": false, + "id": "x_eolzVi2Mg95cM0UuSxk", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12315.293707918483, + "y": 739.602421190865, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 310, + "height": 59, + "seed": 1566931203, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526042750, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "write request", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "write request" + }, + { + "type": "text", + "version": 1559, + "versionNonce": 134090573, + "isDeleted": false, + "id": "s37cDZFs6IJmoX27kEN36", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12338.720101626945, + "y": 3939.5894787966467, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 310, + "height": 59, + "seed": 402576397, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526049982, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "write request", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "write request" + }, + { + "type": "text", + "version": 2303, + "versionNonce": 509947331, + "isDeleted": false, + "id": "sjwBpE5-_ikOWdPUq0yP6", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 12315.032301894369, + "y": 664.1448671068708, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 311, + "height": 59, + "seed": 1250473507, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664526062894, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "(buffer flush)", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "(buffer flush)" + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": { + "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947": { + "mimeType": "image/svg+xml", + "id": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "dataURL": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjIyMiIgdmlld0JveD0iMCAwIDkgOCIgd2lkdGg9IjI1MDAiPjxwYXRoIGQ9Im0wIDdoMXYxaC0xeiIgZmlsbD0iI2YwMCIvPjxwYXRoIGQ9Im0wIDBoMXY3aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDMuMjVoMXYxLjVoLTF6IiBmaWxsPSIjZmMwIi8+PC9zdmc+", + "created": 1648232988228 + } + } +} \ No newline at end of file diff --git a/docs/ja/cloud/bestpractices/images/partitioning-01.png b/docs/ja/cloud/bestpractices/images/partitioning-01.png new file mode 100644 index 00000000000..9e247f9a624 Binary files /dev/null and b/docs/ja/cloud/bestpractices/images/partitioning-01.png differ diff --git a/docs/ja/cloud/bestpractices/images/partitioning-02.png b/docs/ja/cloud/bestpractices/images/partitioning-02.png new file mode 100644 index 00000000000..d950418eb18 Binary files /dev/null and b/docs/ja/cloud/bestpractices/images/partitioning-02.png differ diff --git a/docs/ja/cloud/bestpractices/images/partitioning.excalidraw b/docs/ja/cloud/bestpractices/images/partitioning.excalidraw new file mode 100644 index 00000000000..7f9a2d7d2ad --- /dev/null +++ b/docs/ja/cloud/bestpractices/images/partitioning.excalidraw @@ -0,0 +1,2143 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://app.excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 8392, + "versionNonce": 1227065807, + "isDeleted": false, + "id": "ytCCGuuNAl5mXEevQ2lnb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 1146.2109714243088, + "y": 513.407612987312, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 573.0429734446138, + "height": 1340.6118210378552, + "seed": 1187087823, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "nvI7iaZJc_sIHmKpMgIRb", + "type": "arrow" + }, + { + "id": "HPb8eRyX_GzXs4w6r6T9Q", + "type": "arrow" + }, + { + "id": "ZOS1J46buP8mtNNhrfw0Z", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 648, + "versionNonce": 2054765857, + "isDeleted": false, + "id": "2U1NfEIC2koZguRQyXHWo", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1178.209094859074, + "y": 549.6215312910845, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 498, + "height": 59, + "seed": 610124449, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "Cloud Object Storage", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Cloud Object Storage" + }, + { + "type": "rectangle", + "version": 7474, + "versionNonce": 1947074209, + "isDeleted": false, + "id": "gNVuw3A600BXCoHv3EC7c", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1265.417474754835, + "y": 994.6497055136697, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 331.74912391788905, + "height": 187.53194150601996, + "seed": 726529007, + "groupIds": [ + "eDtfL_Sgf5F8PSFREEFF-" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "HPb8eRyX_GzXs4w6r6T9Q", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1147, + "versionNonce": 309156751, + "isDeleted": false, + "id": "i5zJoABS_6-sDiT1QdU2G", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1282.616099027975, + "y": 1043.2616824546585, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 295.8908110752025, + "height": 93.15081089404521, + "seed": 1873725057, + "groupIds": [ + "eDtfL_Sgf5F8PSFREEFF-" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 73.12153761678803, + "fontFamily": 1, + "text": "p2 Part", + "baseline": 65.15081089404521, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "p2 Part" + }, + { + "type": "rectangle", + "version": 7542, + "versionNonce": 449804271, + "isDeleted": false, + "id": "HBQehfo4MHRh5w3tvalRT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1270.3958273975732, + "y": 1231.9362684673142, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 331.74912391788905, + "height": 187.53194150601996, + "seed": 1013423631, + "groupIds": [ + "uFV2oeSZ1fgqwbQx4K8SQ" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "ZOS1J46buP8mtNNhrfw0Z", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1219, + "versionNonce": 1184720065, + "isDeleted": false, + "id": "YdUFQp_xcMayIzqoiOO6m", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1288.516377154232, + "y": 1284.2083456618957, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 287.042075503265, + "height": 91.20963146832715, + "seed": 1442074209, + "groupIds": [ + "uFV2oeSZ1fgqwbQx4K8SQ" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 71.59775029774868, + "fontFamily": 1, + "text": "p3 Part", + "baseline": 64.20963146832715, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "p3 Part" + }, + { + "type": "rectangle", + "version": 7251, + "versionNonce": 1442284161, + "isDeleted": false, + "id": "liaaaHSb5LS68aKA8ueyk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1263.1816070109999, + "y": 754.7917901459059, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 331.74912391788905, + "height": 187.53194150601996, + "seed": 1829176367, + "groupIds": [ + "2-WexmjQimmSUbUglwKwC" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "nvI7iaZJc_sIHmKpMgIRb", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 909, + "versionNonce": 383103471, + "isDeleted": false, + "id": "tp7k4CGVLbyjHzwDqa9tV", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1286.8524369793122, + "y": 794.1194366211439, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 288, + "height": 102, + "seed": 234740289, + "groupIds": [ + "2-WexmjQimmSUbUglwKwC" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 80.06797541887164, + "fontFamily": 1, + "text": "p1 Part", + "baseline": 71, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "p1 Part" + }, + { + "type": "rectangle", + "version": 8603, + "versionNonce": 1226351119, + "isDeleted": false, + "id": "6BrYz5A_65JCBILSCP-Rb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 208.66509472515827, + "y": 515.9011653592916, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 573.0429734446138, + "height": 1335.3865333455474, + "seed": 1024763471, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "HPb8eRyX_GzXs4w6r6T9Q", + "type": "arrow" + }, + { + "id": "ZOS1J46buP8mtNNhrfw0Z", + "type": "arrow" + }, + { + "id": "nvI7iaZJc_sIHmKpMgIRb", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 808, + "versionNonce": 1735949377, + "isDeleted": false, + "id": "SU1wj2by1cKenGjLc1kbu", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 264.5118131009185, + "y": 552.8911457395243, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 373, + "height": 59, + "seed": 1219160609, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "ClickHouse Cloud", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse Cloud" + }, + { + "type": "image", + "version": 7622, + "versionNonce": 1808108129, + "isDeleted": false, + "id": "z4xzMa6CG3-iUpwM8j5t8", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 664.9973159598812, + "y": 548.5807935464818, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 69.82062964662826, + "height": 62.056575629923195, + "seed": 459867247, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "arrow", + "version": 1618, + "versionNonce": 1819369871, + "isDeleted": false, + "id": "nvI7iaZJc_sIHmKpMgIRb", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 793.4982581488621, + "y": 1066.5072897775426, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 456.004113499861, + "height": 206.85168414643067, + "seed": 1860894209, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "startBinding": { + "focus": 0.022857239875283614, + "gap": 11.790189979089519, + "elementId": "6BrYz5A_65JCBILSCP-Rb" + }, + "endBinding": { + "focus": 0.41625427260255443, + "gap": 13.679235362276813, + "elementId": "liaaaHSb5LS68aKA8ueyk" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 456.004113499861, + -206.85168414643067 + ] + ] + }, + { + "type": "arrow", + "version": 2357, + "versionNonce": 1459258081, + "isDeleted": false, + "id": "HPb8eRyX_GzXs4w6r6T9Q", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 790.5542163049286, + "y": 1102.5390659111563, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 457.71830960552325, + "height": 0.7691905232532008, + "seed": 130850447, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "startBinding": { + "focus": -0.12056576898605727, + "gap": 8.846148135156, + "elementId": "6BrYz5A_65JCBILSCP-Rb" + }, + "endBinding": { + "focus": -0.13872800851895606, + "gap": 17.144948844385, + "elementId": "gNVuw3A600BXCoHv3EC7c" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 457.71830960552325, + -0.7691905232532008 + ] + ] + }, + { + "type": "arrow", + "version": 2415, + "versionNonce": 235689903, + "isDeleted": false, + "id": "ZOS1J46buP8mtNNhrfw0Z", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 792.3176841712157, + "y": 1136.7878431507952, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 464.8585314017764, + "height": 188.7879937583566, + "seed": 532518369, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "startBinding": { + "focus": -0.2136039098150314, + "gap": 10.6096160014431, + "elementId": "6BrYz5A_65JCBILSCP-Rb" + }, + "endBinding": { + "focus": -0.4506101730849665, + "gap": 13.219611824582898, + "elementId": "HBQehfo4MHRh5w3tvalRT" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 464.8585314017764, + 188.7879937583566 + ] + ] + }, + { + "type": "text", + "version": 1737, + "versionNonce": 2106011599, + "isDeleted": false, + "id": "IMMDHmEFDIX4XiDFJvLl1", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -575.8442671654957, + "y": 448.52679181050735, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 511, + "height": 177, + "seed": 1962407087, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "One insert statement\nto a table \nwith a partitioning key", + "baseline": 160, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "One insert statement\nto a table \nwith a partitioning key" + }, + { + "type": "text", + "version": 1837, + "versionNonce": 1491302369, + "isDeleted": false, + "id": "Tcrvvv55VlBbr7vVgffEp", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 836.67647335332, + "y": 1044.8510036585758, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 310, + "height": 59, + "seed": 1848783297, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "write request", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "write request" + }, + { + "type": "text", + "version": 1907, + "versionNonce": 857289391, + "isDeleted": false, + "id": "YjlyyRnrt7Ylre3oOEZw_", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 5.878136486069045, + "x": 805.6496778206056, + "y": 916.008548841548, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 310, + "height": 59, + "seed": 1788053199, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "write request", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "write request" + }, + { + "type": "rectangle", + "version": 9601, + "versionNonce": 1157072943, + "isDeleted": false, + "id": "jhBuDNqZYlJjCRfKQIRjZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": -612.5562085513739, + "y": 647.6077528341903, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 632.8936334499986, + "height": 443.819296284645, + "seed": 1600672161, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8105, + "versionNonce": 232588495, + "isDeleted": false, + "id": "rGimYRCmNzXs601Y-_DRz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -596.7125836977539, + "y": 660.2425398916548, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 1731712239, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2346, + "versionNonce": 234730401, + "isDeleted": false, + "id": "7e3Suymps2XLBcuGnqe2u", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -586.9085938875069, + "y": 661.6909858169511, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 571, + "height": 44, + "seed": 680490369, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row with partitioning key value p1", + "baseline": 31, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row with partitioning key value p1" + }, + { + "type": "rectangle", + "version": 8287, + "versionNonce": 547459823, + "isDeleted": false, + "id": "uN2cLElqqsu7q_mg4YUDG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -597.2104803172842, + "y": 720.1080842102838, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 40722191, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2528, + "versionNonce": 1646827393, + "isDeleted": false, + "id": "1YbCbJqKQ8agLm9B9SB17", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -587.4064905070336, + "y": 721.55653013558, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 571, + "height": 44, + "seed": 753343841, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row with partitioning key value p1", + "baseline": 31, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row with partitioning key value p1" + }, + { + "type": "rectangle", + "version": 8398, + "versionNonce": 602889487, + "isDeleted": false, + "id": "8KwJxRA3hSvwXtSmoxXvk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -595.6929856487986, + "y": 780.327410341537, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 1319937327, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2702, + "versionNonce": 1527512929, + "isDeleted": false, + "id": "zPAR13QXWuo3KVyIVbkvJ", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -584.888995838548, + "y": 782.6591494062359, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 573.1653197288124, + "height": 42.96298819091612, + "seed": 1002359105, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 34.41208789220834, + "fontFamily": 1, + "text": "row with partitioning key value p2", + "baseline": 29.96298819091612, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row with partitioning key value p2" + }, + { + "type": "rectangle", + "version": 8506, + "versionNonce": 725541679, + "isDeleted": false, + "id": "9LIQNrk4yjEzIk4tvFO51", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -596.0797616563832, + "y": 841.8644648811187, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 2069768015, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2789, + "versionNonce": 1459055425, + "isDeleted": false, + "id": "o2FgNu9pmx50HxL9ZeUgi", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -585.7757718461326, + "y": 844.1454760331981, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 572.864491742517, + "height": 43.01371610353369, + "seed": 242612513, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 34.45271945581906, + "fontFamily": 1, + "text": "row with partitioning key value p3", + "baseline": 30.01371610353369, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row with partitioning key value p3" + }, + { + "type": "rectangle", + "version": 8583, + "versionNonce": 1190700367, + "isDeleted": false, + "id": "nSMnYrc18ZX6n28zgbjdM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -597.3075751356955, + "y": 905.2758954574438, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 920282479, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2872, + "versionNonce": 1045060385, + "isDeleted": false, + "id": "Q6BeQetN84MzgOOphoMT-", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -587.1741158735385, + "y": 907.5806845167008, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 574.5950664431072, + "height": 43.14365686603535, + "seed": 108801281, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 34.556798178651775, + "fontFamily": 1, + "text": "row with partitioning key value p3", + "baseline": 30.14365686603535, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row with partitioning key value p3" + }, + { + "type": "rectangle", + "version": 8684, + "versionNonce": 1718952815, + "isDeleted": false, + "id": "080dLIBHN4iyHp-90Mhu3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -597.2995936802945, + "y": 967.1898086710771, + "strokeColor": "#000000", + "backgroundColor": "#3f78ec", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 1349115791, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2950, + "versionNonce": 1098141441, + "isDeleted": false, + "id": "GoGIR65l13G0boADpkaiZ", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -588.4956038700439, + "y": 968.9469168193446, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 580.8314185457511, + "height": 43.537619107347616, + "seed": 726721761, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 34.872350328190464, + "fontFamily": 1, + "text": "row with partitioning key value p2", + "baseline": 30.537619107347616, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row with partitioning key value p2" + }, + { + "type": "rectangle", + "version": 8847, + "versionNonce": 2046614927, + "isDeleted": false, + "id": "BhascU_S-8OKk8c9oVSEU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -599.640084392835, + "y": 1031.7764432704407, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 440735151, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3088, + "versionNonce": 1458882273, + "isDeleted": false, + "id": "_44rpKtL53AtsvgYAPjla", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -589.8360945825843, + "y": 1033.2248891957333, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 571, + "height": 44, + "seed": 1753456833, + "groupIds": [ + "iFwwsrTMeNAlW1UFhQsWp" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row with partitioning key value p1", + "baseline": 31, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row with partitioning key value p1" + }, + { + "type": "arrow", + "version": 2232, + "versionNonce": 1422414767, + "isDeleted": false, + "id": "5chJcUtzPG7EIT7tbAgEQ", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": -667.2743215585033, + "y": 1106.5483905154306, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 839.4409531609472, + "height": 0.049243034357004944, + "seed": 194283471, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 839.4409531609472, + -0.049243034357004944 + ] + ] + }, + { + "type": "text", + "version": 2047, + "versionNonce": 2036024001, + "isDeleted": false, + "id": "PaH1GTDE9O9k8-ruU5SJS", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0.35292370782435256, + "x": 803.7652428088804, + "y": 1220.5199159714066, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 310, + "height": 59, + "seed": 196337825, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082345, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "write request", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "write request" + }, + { + "type": "rectangle", + "version": 8692, + "versionNonce": 1313314369, + "isDeleted": false, + "id": "tY0lEpRAtvwvYaLCWr6rH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 1134.231348113888, + "y": -1043.3382565332922, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 573.0429734446138, + "height": 1340.6118210378552, + "seed": 577811951, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "mkx18XmSxEj5Vcu4Arum6", + "type": "arrow" + }, + { + "id": "6mbk2of81QqkwqeCTJHEw", + "type": "arrow" + }, + { + "id": "zRPoWxUngFL8GlzLlat0E", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 947, + "versionNonce": 652897487, + "isDeleted": false, + "id": "k3bIG421DCIliNMg3xCR7", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1166.2294715486532, + "y": -1007.1243382295197, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 498, + "height": 59, + "seed": 43066497, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "Cloud Object Storage", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Cloud Object Storage" + }, + { + "type": "rectangle", + "version": 7776, + "versionNonce": 1280617039, + "isDeleted": false, + "id": "odJGlE-0FJvpHrIQ0RkOM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1253.437851444418, + "y": -562.0961640069345, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 331.74912391788905, + "height": 187.53194150601996, + "seed": 98705423, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "6mbk2of81QqkwqeCTJHEw", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1450, + "versionNonce": 228765569, + "isDeleted": false, + "id": "QKg4x_DVd1UVUPqXrzKUZ", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1333.2808458953805, + "y": -513.4841870659457, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 171, + "height": 93, + "seed": 1490742369, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 73.12153761678803, + "fontFamily": 1, + "text": "Part", + "baseline": 65, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Part" + }, + { + "type": "rectangle", + "version": 8905, + "versionNonce": 1348281889, + "isDeleted": false, + "id": "3_yFoyRHAuHMrV5fXruVD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 196.68547141473755, + "y": -1040.8447041613126, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 573.0429734446138, + "height": 1335.3865333455474, + "seed": 1742816815, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + }, + { + "id": "6mbk2of81QqkwqeCTJHEw", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1107, + "versionNonce": 1063602991, + "isDeleted": false, + "id": "5gukj8EzYoTsYPfJxgSHB", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 252.5321897904978, + "y": -1003.8547237810799, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 373, + "height": 59, + "seed": 1986050113, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "ClickHouse Cloud", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse Cloud" + }, + { + "type": "image", + "version": 7922, + "versionNonce": 1275627631, + "isDeleted": false, + "id": "zYmWY1RWdJgQ5PzPmB-k-", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 653.0176926494605, + "y": -1008.1650759741224, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 69.82062964662826, + "height": 62.056575629923195, + "seed": 659990607, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "arrow", + "version": 3259, + "versionNonce": 1766424257, + "isDeleted": false, + "id": "6mbk2of81QqkwqeCTJHEw", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": 778.5745929945078, + "y": -454.2068036094479, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 457.71830960552325, + "height": 0.7691905232532008, + "seed": 486672417, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "startBinding": { + "focus": -0.12056576898605588, + "gap": 8.846148135156, + "elementId": "3_yFoyRHAuHMrV5fXruVD" + }, + "endBinding": { + "focus": -0.1387280085189851, + "gap": 17.144948844386818, + "elementId": "odJGlE-0FJvpHrIQ0RkOM" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 457.71830960552325, + -0.7691905232532008 + ] + ] + }, + { + "type": "text", + "version": 2038, + "versionNonce": 299594529, + "isDeleted": false, + "id": "JkleSkvUtz1cgLpuEFlLW", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -595.8238904759164, + "y": -1108.0194340251674, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 527, + "height": 177, + "seed": 840615535, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "One insert statement\nto a table \nwith no partitioning key", + "baseline": 160, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "One insert statement\nto a table \nwith no partitioning key" + }, + { + "type": "text", + "version": 2136, + "versionNonce": 572623727, + "isDeleted": false, + "id": "q8IymnOBsiDPsKuJ_iBLn", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 824.6968500428993, + "y": -511.8948658620302, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 310, + "height": 59, + "seed": 648961025, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 46.674424870051325, + "fontFamily": 1, + "text": "write request", + "baseline": 42, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "write request" + }, + { + "type": "rectangle", + "version": 9903, + "versionNonce": 1022736897, + "isDeleted": false, + "id": "Sz1E7l4chxIw_8w_1bqa8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": -624.5358318617946, + "y": -909.2859706537874, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 632.8936334499986, + "height": 443.819296284645, + "seed": 653664399, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "OI5QQaDo2-dUJpru_TigX", + "type": "arrow" + }, + { + "id": "G5dDrKKKvk9yYrUHFcQq2", + "type": "arrow" + }, + { + "id": "JoNx2LU7OR76D9NccpSzy", + "type": "arrow" + } + ], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8406, + "versionNonce": 1406944655, + "isDeleted": false, + "id": "fOMUBMRGRcnjdpazp7psn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -608.692207008171, + "y": -896.6511835963229, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 56964065, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2648, + "versionNonce": 455073505, + "isDeleted": false, + "id": "gdhALTIy442Ipa0DWa4wQ", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -350.8882171979276, + "y": -895.2027376710266, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 75, + "height": 44, + "seed": 933312175, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row ", + "baseline": 31, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row " + }, + { + "type": "rectangle", + "version": 8588, + "versionNonce": 242924463, + "isDeleted": false, + "id": "OIjrC_2jIZyGjoZedd4Is", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -609.190103627705, + "y": -836.7856392776939, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 2000031681, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8700, + "versionNonce": 946035393, + "isDeleted": false, + "id": "PaBqBdJZsQvP9YxksSM-G", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -607.6726089592194, + "y": -776.5663131464407, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 1254394063, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8808, + "versionNonce": 1982164431, + "isDeleted": false, + "id": "wq776HHlWhs-_oxx39OOD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -608.0593849668003, + "y": -715.029258606859, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 406876065, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8885, + "versionNonce": 2072795809, + "isDeleted": false, + "id": "j2w7ND7W09iLpxz-rXGz1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -609.2871984461162, + "y": -651.6178280305339, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 1576572655, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8986, + "versionNonce": 368368623, + "isDeleted": false, + "id": "oShdRrQzd2oRbBtnVD3yI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -609.2792169907152, + "y": -589.7039148169006, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 213111681, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 9148, + "versionNonce": 357195393, + "isDeleted": false, + "id": "BP_YtM86AN_kYWrmX4ElW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -611.6197077032557, + "y": -525.117280217537, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 597.3727241313998, + "height": 46.84180196316288, + "seed": 667279631, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false + }, + { + "type": "arrow", + "version": 2531, + "versionNonce": 32605711, + "isDeleted": false, + "id": "XhekCJTItof9UkArjLoLv", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 70, + "angle": 0, + "x": -679.2539448689204, + "y": -450.1974790051736, + "strokeColor": "#000000", + "backgroundColor": "#ef9236", + "width": 839.4409531609472, + "height": 0.049243034357004944, + "seed": 147831649, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 839.4409531609472, + -0.049243034357004944 + ] + ] + }, + { + "type": "text", + "version": 2718, + "versionNonce": 1952245345, + "isDeleted": false, + "id": "bURwFMyU6EGVRTpVpNt9e", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -355.8928036015204, + "y": -833.8691935706102, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 75, + "height": 44, + "seed": 2040850223, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row ", + "baseline": 31, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row " + }, + { + "type": "text", + "version": 2783, + "versionNonce": 957606959, + "isDeleted": false, + "id": "c8j0IrT_RH-FBPWFVopf0", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -354.0435519338971, + "y": -772.4449061587493, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 75, + "height": 44, + "seed": 216246081, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row ", + "baseline": 31, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row " + }, + { + "type": "text", + "version": 2865, + "versionNonce": 59994689, + "isDeleted": false, + "id": "KXf8lrRU_PcdBLk21aCfX", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -355.51282038214777, + "y": -711.7679190783219, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 75, + "height": 44, + "seed": 1644046671, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row ", + "baseline": 31, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row " + }, + { + "type": "text", + "version": 2938, + "versionNonce": 1195675215, + "isDeleted": false, + "id": "GktA0qQQ5YeSySgXCr8l_", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -353.89789169980577, + "y": -651.8635645439626, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 75, + "height": 44, + "seed": 1666127649, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row ", + "baseline": 31, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row " + }, + { + "type": "text", + "version": 3036, + "versionNonce": 667779617, + "isDeleted": false, + "id": "ieCANeOQpEEdVo4agRv90", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -354.32853934842933, + "y": -586.8041043334179, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 75, + "height": 44, + "seed": 237643631, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row ", + "baseline": 31, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row " + }, + { + "type": "text", + "version": 3110, + "versionNonce": 660335727, + "isDeleted": false, + "id": "b2rV3wYSFJovt1VvCL4Qt", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -353.48624321215175, + "y": -522.6312716347547, + "strokeColor": "#ffffff", + "backgroundColor": "#ef9236", + "width": 75, + "height": 44, + "seed": 1585548033, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1665051082346, + "link": null, + "locked": false, + "fontSize": 35.242703801904284, + "fontFamily": 1, + "text": "row ", + "baseline": 31, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "row " + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": { + "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947": { + "mimeType": "image/svg+xml", + "id": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "dataURL": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjIyMiIgdmlld0JveD0iMCAwIDkgOCIgd2lkdGg9IjI1MDAiPjxwYXRoIGQ9Im0wIDdoMXYxaC0xeiIgZmlsbD0iI2YwMCIvPjxwYXRoIGQ9Im0wIDBoMXY3aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDMuMjVoMXYxLjVoLTF6IiBmaWxsPSIjZmMwIi8+PC9zdmc+", + "created": 1648232988228 + } + } +} \ No newline at end of file diff --git a/docs/ja/cloud/bestpractices/partitioningkey.md b/docs/ja/cloud/bestpractices/partitioningkey.md new file mode 100644 index 00000000000..99ce06be220 --- /dev/null +++ b/docs/ja/cloud/bestpractices/partitioningkey.md @@ -0,0 +1,18 @@ +--- +slug: /ja/cloud/bestpractices/low-cardinality-partitioning-key +sidebar_label: 低カーディナリティã®ãƒ‘ーティションキーをé¸æŠž +title: 低カーディナリティã®ãƒ‘ーティションキーをé¸æŠž +--- + +大é‡ã®è¡Œã‚’å«ã‚€ã¹ã[å‰ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³](#ingest-data-in-bulk)ã§è¿°ã¹ãŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’ClickHouse Cloudã®ãƒ†ãƒ¼ãƒ–ルã«é€ä¿¡ã—ã€ãã®ãƒ†ãƒ¼ãƒ–ルãŒ[パーティションキー](/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key.md)を使用ã—ã¦ã„ãªã„å ´åˆã€ãã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‹ã‚‰ã®ã™ã¹ã¦ã®è¡Œãƒ‡ãƒ¼ã‚¿ã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®æ–°ã—ã„パートã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +![compression block diagram](images/partitioning-01.png) + +ã—ã‹ã—ã€ClickHouse Cloudã®ãƒ†ãƒ¼ãƒ–ルã«ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’é€ä¿¡ã—ã€ãã®ãƒ†ãƒ¼ãƒ–ルãŒãƒ‘ーティションキーをæŒã£ã¦ã„ã‚‹å ´åˆã€ClickHouseã¯æ¬¡ã®å‡¦ç†ã‚’è¡Œã„ã¾ã™ï¼š +- インサートã«å«ã¾ã‚Œã‚‹è¡Œã®ãƒ‘ーティションキーã®å€¤ã‚’確èªã—ã¾ã™ +- ç•°ãªã‚‹ãƒ‘ーティションキーã®å€¤ã”ã¨ã«ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«æ–°ã—ã„パートを作æˆã—ã¾ã™ +- パーティションキーã®å€¤ã«ã‚ˆã£ã¦å¯¾å¿œã™ã‚‹ãƒ‘ートã«è¡Œã‚’é…ç½®ã—ã¾ã™ + +![compression block diagram](images/partitioning-02.png) + +ã—ãŸãŒã£ã¦ã€ClickHouse Cloudオブジェクトストレージã¸ã®æ›¸ãè¾¼ã¿è¦æ±‚ã®æ•°ã‚’最å°é™ã«æŠ‘ãˆã‚‹ãŸã‚ã«ã¯ã€ä½Žã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã®ãƒ‘ーティションキーを使用ã™ã‚‹ã‹ã€ãƒ†ãƒ¼ãƒ–ルã«ãƒ‘ーティションキーを使用ã—ãªã„よã†ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ diff --git a/docs/ja/cloud/changelogs/changelog-24-5.md b/docs/ja/cloud/changelogs/changelog-24-5.md new file mode 100644 index 00000000000..4e2f2fb3ac5 --- /dev/null +++ b/docs/ja/cloud/changelogs/changelog-24-5.md @@ -0,0 +1,181 @@ +--- +slug: /ja/changelogs/24.5 +title: v24.5 Changelog for Cloud +description: Fast release changelog for v24.5 +keywords: [chaneglog, cloud] +--- + +# v24.5 Changelog for Cloud + +Relevant changes for ClickHouse Cloud services based on the v24.5 release. + +## Breaking Changes + +* Change the column name from duration_ms to duration_microseconds in the system.zookeeper table to reflect the reality that the duration is in the microsecond resolution. [#60774](https://github.com/ClickHouse/ClickHouse/pull/60774) (Duc Canh Le). + +* Don't allow to set max_parallel_replicas to 0 as it doesn't make sense. Setting it to 0 could lead to unexpected logical errors. Closes #60140. [#61201](https://github.com/ClickHouse/ClickHouse/pull/61201) (Kruglov Pavel). + +* Remove support for INSERT WATCH query (part of the experimental LIVE VIEW feature). [#62382](https://github.com/ClickHouse/ClickHouse/pull/62382) (Alexey Milovidov). + +* Usage of functions neighbor, runningAccumulate, runningDifferenceStartingWithFirstValue, runningDifference deprecated (because it is error-prone). Proper window functions should be used instead. To enable them back, set allow_deprecated_error_prone_window_functions=1. [#63132](https://github.com/ClickHouse/ClickHouse/pull/63132) (Nikita Taranov). + + +## Backward Incompatible Changes + +* In the new ClickHouse version, the functions geoDistance, greatCircleDistance, and greatCircleAngle will use 64-bit double precision floating point data type for internal calculations and return type if all the arguments are Float64. This closes #58476. In previous versions, the function always used Float32. You can switch to the old behavior by setting geo_distance_returns_float64_on_float64_arguments to false or setting compatibility to 24.2 or earlier. [#61848](https://github.com/ClickHouse/ClickHouse/pull/61848) (Alexey Milovidov). + +* Queries from system.columns will work faster if there is a large number of columns, but many databases or tables are not granted for SHOW TABLES. Note that in previous versions, if you grant SHOW COLUMNS to individual columns without granting SHOW TABLES to the corresponding tables, the system.columns table will show these columns, but in a new version, it will skip the table entirely. Remove trace log messages "Access granted" and "Access denied" that slowed down queries. [#63439](https://github.com/ClickHouse/ClickHouse/pull/63439) (Alexey Milovidov). + +* Fix crash in largestTriangleThreeBuckets. This changes the behaviour of this function and makes it to ignore NaNs in the series provided. Thus the resultset might differ from previous versions. [#62646](https://github.com/ClickHouse/ClickHouse/pull/62646) (Raúl Marín). + +## New Features + +* The new analyzer is enabled by default on new services. + +* Supports dropping multiple tables at the same time like drop table a,b,c;. [#58705](https://github.com/ClickHouse/ClickHouse/pull/58705) (zhongyuankai). + +* User can now parse CRLF with TSV format using a setting input_format_tsv_crlf_end_of_line. Closes #56257. [#59747](https://github.com/ClickHouse/ClickHouse/pull/59747) (Shaun Struwig). + +* Table engine is grantable now, and it won't affect existing users behavior. [#60117](https://github.com/ClickHouse/ClickHouse/pull/60117) (jsc0218). + +* Adds the Form Format to read/write a single record in the application/x-www-form-urlencoded format. [#60199](https://github.com/ClickHouse/ClickHouse/pull/60199) (Shaun Struwig). + +* Added possibility to compress in CROSS JOIN. [#60459](https://github.com/ClickHouse/ClickHouse/pull/60459) (p1rattttt). + +* New setting input_format_force_null_for_omitted_fields that forces NULL values for omitted fields. [#60887](https://github.com/ClickHouse/ClickHouse/pull/60887) (Constantine Peresypkin). + +* Support join with inequal conditions which involve columns from both left and right table. e.g. `t1.y < t2.y`. To enable, SET allow_experimental_join_condition = 1. [#60920](https://github.com/ClickHouse/ClickHouse/pull/60920) (lgbo). + +* Add a new function, getClientHTTPHeader. This closes #54665. Co-authored with @lingtaolf. [#61820](https://github.com/ClickHouse/ClickHouse/pull/61820) (Alexey Milovidov). + +* For convenience purpose, SELECT * FROM numbers() will work in the same way as SELECT * FROM system.numbers - without a limit. [#61969](https://github.com/ClickHouse/ClickHouse/pull/61969) (YenchangChan). + +* Modifying memory table settings through ALTER MODIFY SETTING is now supported. ALTER TABLE memory MODIFY SETTING min_rows_to_keep = 100, max_rows_to_keep = 1000;. [#62039](https://github.com/ClickHouse/ClickHouse/pull/62039) (zhongyuankai). + +* Analyzer support recursive CTEs. [#62074](https://github.com/ClickHouse/ClickHouse/pull/62074) (Maksim Kita). + +* Earlier our s3 storage and s3 table function didn't support selecting from archive files. I created a solution that allows to iterate over files inside archives in S3. [#62259](https://github.com/ClickHouse/ClickHouse/pull/62259) (Daniil Ivanik). + +* Support for conditional function clamp. [#62377](https://github.com/ClickHouse/ClickHouse/pull/62377) (skyoct). + +* Add npy output format. [#62430](https://github.com/ClickHouse/ClickHouse/pull/62430) (豪肥肥). + +* Analyzer support QUALIFY clause. Closes #47819. [#62619](https://github.com/ClickHouse/ClickHouse/pull/62619) (Maksim Kita). + +* Added role query parameter to the HTTP interface. It works similarly to SET ROLE x, applying the role before the statement is executed. This allows for overcoming the limitation of the HTTP interface, as multiple statements are not allowed, and it is not possible to send both SET ROLE x and the statement itself at the same time. It is possible to set multiple roles that way, e.g., ?role=x&role=y, which will be an equivalent of SET ROLE x, y. [#62669](https://github.com/ClickHouse/ClickHouse/pull/62669) (Serge Klochkov). + +* Add SYSTEM UNLOAD PRIMARY KEY. [#62738](https://github.com/ClickHouse/ClickHouse/pull/62738) (Pablo Marcos). + +* Added SQL functions generateUUIDv7, generateUUIDv7ThreadMonotonic, generateUUIDv7NonMonotonic (with different monotonicity/performance trade-offs) to generate version 7 UUIDs aka. timestamp-based UUIDs with random component. Also added a new function UUIDToNum to extract bytes from a UUID and a new function UUIDv7ToDateTime to extract timestamp component from a UUID version 7. [#62852](https://github.com/ClickHouse/ClickHouse/pull/62852) (Alexey Petrunyaka). + +* Raw as a synonym for TSVRaw. [#63394](https://github.com/ClickHouse/ClickHouse/pull/63394) (Unalian). + +* Added possibility to do cross join in temporary file if size exceeds limits. [#63432](https://github.com/ClickHouse/ClickHouse/pull/63432) (p1rattttt). + +## Performance Improvements + +* Skip merging of newly created projection blocks during INSERT-s. [#59405](https://github.com/ClickHouse/ClickHouse/pull/59405) (Nikita Taranov). + +* Reduce overhead of the mutations for SELECTs (v2). [#60856](https://github.com/ClickHouse/ClickHouse/pull/60856) (Azat Khuzhin). + +* JOIN filter push down improvements using equivalent sets. [#61216](https://github.com/ClickHouse/ClickHouse/pull/61216) (Maksim Kita). + +* Add a new analyzer pass to optimize in single value. [#61564](https://github.com/ClickHouse/ClickHouse/pull/61564) (LiuNeng). + +* Process string functions XXXUTF8 'asciily' if input strings are all ASCII chars. Inspired by apache/doris#29799. Overall speed up by 1.07x~1.62x. Notice that peak memory usage had been decreased in some cases. [#61632](https://github.com/ClickHouse/ClickHouse/pull/61632) (æŽæ‰¬). + +* Enabled fast Parquet encoder by default (output_format_parquet_use_custom_encoder). [#62088](https://github.com/ClickHouse/ClickHouse/pull/62088) (Michael Kolupaev). + +* Improve JSONEachRowRowInputFormat by skipping all remaining fields when all required fields are read. [#62210](https://github.com/ClickHouse/ClickHouse/pull/62210) (lgbo). + +* Functions splitByChar and splitByRegexp were speed up significantly. [#62392](https://github.com/ClickHouse/ClickHouse/pull/62392) (æŽæ‰¬). + +* Improve trivial insert select from files in file/s3/hdfs/url/... table functions. Add separate max_parsing_threads setting to control the number of threads used in parallel parsing. [#62404](https://github.com/ClickHouse/ClickHouse/pull/62404) (Kruglov Pavel). + +* Support parallel write buffer for AzureBlobStorage managed by setting azure_allow_parallel_part_upload. [#62534](https://github.com/ClickHouse/ClickHouse/pull/62534) (SmitaRKulkarni). + +* Functions to_utc_timestamp and from_utc_timestamp are now about 2x faster. [#62583](https://github.com/ClickHouse/ClickHouse/pull/62583) (KevinyhZou). + +* Functions parseDateTimeOrNull, parseDateTimeOrZero, parseDateTimeInJodaSyntaxOrNull and parseDateTimeInJodaSyntaxOrZero now run significantly faster (10x - 1000x) when the input contains mostly non-parseable values. [#62634](https://github.com/ClickHouse/ClickHouse/pull/62634) (LiuNeng). + +* Change HostResolver behavior on fail to keep only one record per IP [#62652](https://github.com/ClickHouse/ClickHouse/pull/62652) (Anton Ivashkin). + +* Add a new configurationprefer_merge_sort_block_bytes to control the memory usage and speed up sorting 2 times when merging when there are many columns. [#62904](https://github.com/ClickHouse/ClickHouse/pull/62904) (LiuNeng). + +* QueryPlan convert OUTER JOIN to INNER JOIN optimization if filter after JOIN always filters default values. Optimization can be controlled with setting query_plan_convert_outer_join_to_inner_join, enabled by default. [#62907](https://github.com/ClickHouse/ClickHouse/pull/62907) (Maksim Kita). + +* Enable optimize_rewrite_sum_if_to_count_if by default. [#62929](https://github.com/ClickHouse/ClickHouse/pull/62929) (Raúl Marín). + +* Micro-optimizations for the new analyzer. [#63429](https://github.com/ClickHouse/ClickHouse/pull/63429) (Raúl Marín). + +* Index analysis will work if DateTime is compared to DateTime64. This closes #63441. [#63443](https://github.com/ClickHouse/ClickHouse/pull/63443) (Alexey Milovidov). + +* Speed up indices of type set a little (around 1.5 times) by removing garbage. [#64098](https://github.com/ClickHouse/ClickHouse/pull/64098) (Alexey Milovidov). + +# Improvements + +* Remove optimize_monotonous_functions_in_order_by setting this is becoming a no-op. [#63004](https://github.com/ClickHouse/ClickHouse/pull/63004) (Raúl Marín). + +* Maps can now have Float32, Float64, Array(T), Map(K,V) and Tuple(T1, T2, ...) as keys. Closes #54537. [#59318](https://github.com/ClickHouse/ClickHouse/pull/59318) (æŽæ‰¬). + +* Add asynchronous WriteBuffer for AzureBlobStorage similar to S3. [#59929](https://github.com/ClickHouse/ClickHouse/pull/59929) (SmitaRKulkarni). + +* Multiline strings with border preservation and column width change. [#59940](https://github.com/ClickHouse/ClickHouse/pull/59940) (Volodyachan). + +* Make RabbitMQ nack broken messages. Closes #45350. [#60312](https://github.com/ClickHouse/ClickHouse/pull/60312) (Kseniia Sumarokova). + +* Add a setting first_day_of_week which affects the first day of the week considered by functions toStartOfInterval(..., INTERVAL ... WEEK). This allows for consistency with function toStartOfWeek which defaults to Sunday as the first day of the week. [#60598](https://github.com/ClickHouse/ClickHouse/pull/60598) (Jordi Villar). + +* Added persistent virtual column _block_offset which stores original number of row in block that was assigned at insert. Persistence of column _block_offset can be enabled by setting enable_block_offset_column. Added virtual column_part_data_version which contains either min block number or mutation version of part. Persistent virtual column _block_number is not considered experimental anymore. [#60676](https://github.com/ClickHouse/ClickHouse/pull/60676) (Anton Popov). + +* Functions date_diff and age now calculate their result at nanosecond instead of microsecond precision. They now also offer nanosecond (or nanoseconds or ns) as a possible value for the unit parameter. [#61409](https://github.com/ClickHouse/ClickHouse/pull/61409) (Austin Kothig). + +* Now marks are not loaded for wide parts during merges. [#61551](https://github.com/ClickHouse/ClickHouse/pull/61551) (Anton Popov). + +* Enable output_format_pretty_row_numbers by default. It is better for usability. [#61791](https://github.com/ClickHouse/ClickHouse/pull/61791) (Alexey Milovidov). + +* The progress bar will work for trivial queries with LIMIT from system.zeros, system.zeros_mt (it already works for system.numbers and system.numbers_mt), and the generateRandom table function. As a bonus, if the total number of records is greater than the max_rows_to_read limit, it will throw an exception earlier. This closes #58183. [#61823](https://github.com/ClickHouse/ClickHouse/pull/61823) (Alexey Milovidov). + +* Add TRUNCATE ALL TABLES. [#61862](https://github.com/ClickHouse/ClickHouse/pull/61862) (豪肥肥). + +* Add a setting input_format_json_throw_on_bad_escape_sequence, disabling it allows saving bad escape sequences in JSON input formats. [#61889](https://github.com/ClickHouse/ClickHouse/pull/61889) (Kruglov Pavel). + +* Fixed grammar from "a" to "the" in the warning message. There is only one Atomic engine, so it should be "to the new Atomic engine" instead of "to a new Atomic engine". [#61952](https://github.com/ClickHouse/ClickHouse/pull/61952) (shabroo). + +* Fix logical-error when undoing quorum insert transaction. [#61953](https://github.com/ClickHouse/ClickHouse/pull/61953) (Han Fei). + +* Automatically infer Nullable column types from Apache Arrow schema. [#61984](https://github.com/ClickHouse/ClickHouse/pull/61984) (Maksim Kita). + +* Allow to cancel parallel merge of aggregate states during aggregation. Example: uniqExact. [#61992](https://github.com/ClickHouse/ClickHouse/pull/61992) (Maksim Kita). + +* Dictionary source with INVALIDATE_QUERY is not reloaded twice on startup. [#62050](https://github.com/ClickHouse/ClickHouse/pull/62050) (vdimir). + +* OPTIMIZE FINAL for ReplicatedMergeTree now will wait for currently active merges to finish and then reattempt to schedule a final merge. This will put it more in line with ordinary MergeTree behaviour. [#62067](https://github.com/ClickHouse/ClickHouse/pull/62067) (Nikita Taranov). + +* While read data from a hive text file, it would use the first line of hive text file to resize of number of input fields, and sometimes the fields number of first line is not matched with the hive table defined , such as the hive table is defined to have 3 columns, like test_tbl(a Int32, b Int32, c Int32), but the first line of text file only has 2 fields, and in this suitation, the input fields will be resized to 2, and if the next line of the text file has 3 fields, then the third field can not be read but set a default value 0, which is not right. [#62086](https://github.com/ClickHouse/ClickHouse/pull/62086) (KevinyhZou). + +* The syntax highlighting while typing in the client will work on the syntax level (previously, it worked on the lexer level). [#62123](https://github.com/ClickHouse/ClickHouse/pull/62123) (Alexey Milovidov). + +* Fix an issue where when a redundant = 1 or = 0 is added after a boolean expression involving the primary key, the primary index is not used. For example, both `SELECT * FROM WHERE IN () = 1` and `SELECT * FROM
WHERE NOT IN () = 0` will both perform a full table scan, when the primary index can be used. [#62142](https://github.com/ClickHouse/ClickHouse/pull/62142) (josh-hildred). + +* Added setting lightweight_deletes_sync (default value: 2 - wait all replicas synchronously). It is similar to setting mutations_sync but affects only behaviour of lightweight deletes. [#62195](https://github.com/ClickHouse/ClickHouse/pull/62195) (Anton Popov). + +* Distinguish booleans and integers while parsing values for custom settings: SET custom_a = true; SET custom_b = 1;. [#62206](https://github.com/ClickHouse/ClickHouse/pull/62206) (Vitaly Baranov). + +* Support S3 access through AWS Private Link Interface endpoints. Closes #60021, #31074 and #53761. [#62208](https://github.com/ClickHouse/ClickHouse/pull/62208) (Arthur Passos). + +* Client has to send header 'Keep-Alive: timeout=X' to the server. If a client receives a response from the server with that header, client has to use the value from the server. Also for a client it is better not to use a connection which is nearly expired in order to avoid connection close race. [#62249](https://github.com/ClickHouse/ClickHouse/pull/62249) (Sema Checherinda). + +* Added nano- micro- milliseconds unit for date_trunc. [#62335](https://github.com/ClickHouse/ClickHouse/pull/62335) (Misz606). + +* The query cache now no longer caches results of queries against system tables (system.*, information_schema.*, INFORMATION_SCHEMA.*). [#62376](https://github.com/ClickHouse/ClickHouse/pull/62376) (Robert Schulze). + +* MOVE PARTITION TO TABLE query can be delayed or can throw TOO_MANY_PARTS exception to avoid exceeding limits on the part count. The same settings and limits are applied as for theINSERT query (see max_parts_in_total, parts_to_delay_insert, parts_to_throw_insert, inactive_parts_to_throw_insert, inactive_parts_to_delay_insert, max_avg_part_size_for_too_many_parts, min_delay_to_insert_ms and max_delay_to_insert settings). [#62420](https://github.com/ClickHouse/ClickHouse/pull/62420) (Sergei Trifonov). + +* Make transform always return the first match. [#62518](https://github.com/ClickHouse/ClickHouse/pull/62518) (Raúl Marín). + +* Avoid evaluating table DEFAULT expressions while executing RESTORE. [#62601](https://github.com/ClickHouse/ClickHouse/pull/62601) (Vitaly Baranov). + +* Allow quota key with different auth scheme in HTTP requests. [#62842](https://github.com/ClickHouse/ClickHouse/pull/62842) (Kseniia Sumarokova). + +* Close session if user's valid_until is reached. [#63046](https://github.com/ClickHouse/ClickHouse/pull/63046) (Konstantin Bogdanov). diff --git a/docs/ja/cloud/changelogs/changelog-24-6.md b/docs/ja/cloud/changelogs/changelog-24-6.md new file mode 100644 index 00000000000..bcfc4158869 --- /dev/null +++ b/docs/ja/cloud/changelogs/changelog-24-6.md @@ -0,0 +1,139 @@ +--- +slug: /ja/changelogs/24.6 +title: v24.6 Changelog for Cloud +description: Fast release changelog for v24.6 +keywords: [chaneglog, cloud] +--- + +# v24.6 Changelog for Cloud + +Relevant changes for ClickHouse Cloud services based on the v24.6 release. + +## Backward Incompatible Change +* Rework parallel processing in `Ordered` mode of storage `S3Queue`. This PR is backward incompatible for Ordered mode if you used settings `s3queue_processing_threads_num` or `s3queue_total_shards_num`. Setting `s3queue_total_shards_num` is deleted, previously it was allowed to use only under `s3queue_allow_experimental_sharded_mode`, which is now deprecated. A new setting is added - `s3queue_buckets`. [#64349](https://github.com/ClickHouse/ClickHouse/pull/64349) ([Kseniia Sumarokova](https://github.com/kssenii)). +* New functions `snowflakeIDToDateTime`, `snowflakeIDToDateTime64`, `dateTimeToSnowflakeID`, and `dateTime64ToSnowflakeID` were added. Unlike the existing functions `snowflakeToDateTime`, `snowflakeToDateTime64`, `dateTimeToSnowflake`, and `dateTime64ToSnowflake`, the new functions are compatible with function `generateSnowflakeID`, i.e. they accept the snowflake IDs generated by `generateSnowflakeID` and produce snowflake IDs of the same type as `generateSnowflakeID` (i.e. `UInt64`). Furthermore, the new functions default to the UNIX epoch (aka. 1970-01-01), just like `generateSnowflakeID`. If necessary, a different epoch, e.g. Twitter's/X's epoch 2010-11-04 aka. 1288834974657 msec since UNIX epoch, can be passed. The old conversion functions are deprecated and will be removed after a transition period: to use them regardless, enable setting `allow_deprecated_snowflake_conversion_functions`. [#64948](https://github.com/ClickHouse/ClickHouse/pull/64948) ([Robert Schulze](https://github.com/rschu1ze)). + +## New Feature + +* Support empty tuples. [#55061](https://github.com/ClickHouse/ClickHouse/pull/55061) ([Amos Bird](https://github.com/amosbird)). +* Add Hilbert Curve encode and decode functions. [#60156](https://github.com/ClickHouse/ClickHouse/pull/60156) ([Artem Mustafin](https://github.com/Artemmm91)). +* Add support for index analysis over `hilbertEncode`. [#64662](https://github.com/ClickHouse/ClickHouse/pull/64662) ([Artem Mustafin](https://github.com/Artemmm91)). +* Added support for reading `LINESTRING` geometry in the WKT format using function `readWKTLineString`. [#62519](https://github.com/ClickHouse/ClickHouse/pull/62519) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Added new SQL functions `generateSnowflakeID` for generating Twitter-style Snowflake IDs. [#63577](https://github.com/ClickHouse/ClickHouse/pull/63577) ([Danila Puzov](https://github.com/kazalika)). +* Add support for comparing `IPv4` and `IPv6` types using the `=` operator. [#64292](https://github.com/ClickHouse/ClickHouse/pull/64292) ([Francisco J. Jurado Moreno](https://github.com/Beetelbrox)). +* Support decimal arguments in binary math functions (pow, atan2, max2, min2, hypot). [#64582](https://github.com/ClickHouse/ClickHouse/pull/64582) ([Mikhail Gorshkov](https://github.com/mgorshkov)). +* Added SQL functions `parseReadableSize` (along with `OrNull` and `OrZero` variants). [#64742](https://github.com/ClickHouse/ClickHouse/pull/64742) ([Francisco J. Jurado Moreno](https://github.com/Beetelbrox)). +* Add `_time` virtual column to file alike storages (s3/file/hdfs/url/azureBlobStorage). [#64947](https://github.com/ClickHouse/ClickHouse/pull/64947) ([Ilya Golshtein](https://github.com/ilejn)). +* Introduced new functions `base64URLEncode`, `base64URLDecode` and `tryBase64URLDecode`. [#64991](https://github.com/ClickHouse/ClickHouse/pull/64991) ([Mikhail Gorshkov](https://github.com/mgorshkov)). +* Add new function `editDistanceUTF8`, which calculates the [edit distance](https://en.wikipedia.org/wiki/Edit_distance) between two UTF8 strings. [#65269](https://github.com/ClickHouse/ClickHouse/pull/65269) ([LiuNeng](https://github.com/liuneng1994)). +* Add `http_response_headers` configuration to support custom response headers in custom HTTP handlers. [#63562](https://github.com/ClickHouse/ClickHouse/pull/63562) ([Grigorii](https://github.com/GSokol)). +* Added a new table function `loop` to support returning query results in an infinite loop. [#63452](https://github.com/ClickHouse/ClickHouse/pull/63452) ([Sariel](https://github.com/sarielwxm)). This is useful for testing. +* Introduced two additional columns in the `system.query_log`: `used_privileges` and `missing_privileges`. `used_privileges` is populated with the privileges that were checked during query execution, and `missing_privileges` contains required privileges that are missing. [#64597](https://github.com/ClickHouse/ClickHouse/pull/64597) ([Alexey Katsman](https://github.com/alexkats)). +* Added a setting `output_format_pretty_display_footer_column_names` which when enabled displays column names at the end of the table for long tables (50 rows by default), with the threshold value for minimum number of rows controlled by `output_format_pretty_display_footer_column_names_min_rows`. [#65144](https://github.com/ClickHouse/ClickHouse/pull/65144) ([Shaun Struwig](https://github.com/Blargian)). + +## Performance Improvement + +* Fix performance regression in cross join introduced in #60459 (24.5). #65243 (Nikita Taranov). +* Improve io_uring resubmits visibility. Rename profile event IOUringSQEsResubmits -> IOUringSQEsResubmitsAsync and add a new one IOUringSQEsResubmitsSync. #63699 (Tomer Shafir). +* Introduce assertions to verify all functions are called with columns of the right size. #63723 (Raúl Marín). +* Add the ability to reshuffle rows during insert to optimize for size without violating the order set by `PRIMARY KEY`. It's controlled by the setting `optimize_row_order` (off by default). [#63578](https://github.com/ClickHouse/ClickHouse/pull/63578) ([Igor Markelov](https://github.com/ElderlyPassionFruit)). +* Add a native parquet reader, which can read parquet binary to ClickHouse Columns directly. It's controlled by the setting `input_format_parquet_use_native_reader` (disabled by default). [#60361](https://github.com/ClickHouse/ClickHouse/pull/60361) ([ZhiHong Zhang](https://github.com/copperybean)). +* Support partial trivial count optimization when the query filter is able to select exact ranges from merge tree tables. [#60463](https://github.com/ClickHouse/ClickHouse/pull/60463) ([Amos Bird](https://github.com/amosbird)). +* Reduce max memory usage of multithreaded `INSERT`s by collecting chunks of multiple threads in a single transform. [#61047](https://github.com/ClickHouse/ClickHouse/pull/61047) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Reduce the memory usage when using Azure object storage by using fixed memory allocation, avoiding the allocation of an extra buffer. [#63160](https://github.com/ClickHouse/ClickHouse/pull/63160) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Reduce the number of virtual function calls in `ColumnNullable::size`. [#60556](https://github.com/ClickHouse/ClickHouse/pull/60556) ([HappenLee](https://github.com/HappenLee)). +* Speedup `splitByRegexp` when the regular expression argument is a single-character. [#62696](https://github.com/ClickHouse/ClickHouse/pull/62696) ([Robert Schulze](https://github.com/rschu1ze)). +* Speed up aggregation by 8-bit and 16-bit keys by keeping track of the min and max keys used. This allows to reduce the number of cells that need to be verified. [#62746](https://github.com/ClickHouse/ClickHouse/pull/62746) ([Jiebin Sun](https://github.com/jiebinn)). +* Optimize operator IN when the left hand side is `LowCardinality` and the right is a set of constants. [#64060](https://github.com/ClickHouse/ClickHouse/pull/64060) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Use a thread pool to initialize and destroy hash tables inside `ConcurrentHashJoin`. [#64241](https://github.com/ClickHouse/ClickHouse/pull/64241) ([Nikita Taranov](https://github.com/nickitat)). +* Optimized vertical merges in tables with sparse columns. [#64311](https://github.com/ClickHouse/ClickHouse/pull/64311) ([Anton Popov](https://github.com/CurtizJ)). +* Enabled prefetches of data from remote filesystem during vertical merges. It improves latency of vertical merges in tables with data stored on remote filesystem. [#64314](https://github.com/ClickHouse/ClickHouse/pull/64314) ([Anton Popov](https://github.com/CurtizJ)). +* Reduce redundant calls to `isDefault` of `ColumnSparse::filter` to improve performance. [#64426](https://github.com/ClickHouse/ClickHouse/pull/64426) ([Jiebin Sun](https://github.com/jiebinn)). +* Speedup `find_super_nodes` and `find_big_family` keeper-client commands by making multiple asynchronous getChildren requests. [#64628](https://github.com/ClickHouse/ClickHouse/pull/64628) ([Alexander Gololobov](https://github.com/davenger)). +* Improve function `least`/`greatest` for nullable numberic type arguments. [#64668](https://github.com/ClickHouse/ClickHouse/pull/64668) ([KevinyhZou](https://github.com/KevinyhZou)). +* Allow merging two consequent filtering steps of a query plan. This improves filter-push-down optimization if the filter condition can be pushed down from the parent step. [#64760](https://github.com/ClickHouse/ClickHouse/pull/64760) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Remove bad optimization in the vertical final implementation and re-enable vertical final algorithm by default. [#64783](https://github.com/ClickHouse/ClickHouse/pull/64783) ([Duc Canh Le](https://github.com/canhld94)). +* Remove ALIAS nodes from the filter expression. This slightly improves performance for queries with `PREWHERE` (with the new analyzer). [#64793](https://github.com/ClickHouse/ClickHouse/pull/64793) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Re-enable OpenSSL session caching. [#65111](https://github.com/ClickHouse/ClickHouse/pull/65111) ([Robert Schulze](https://github.com/rschu1ze)). +* Added settings to disable materialization of skip indexes and statistics on inserts (`materialize_skip_indexes_on_insert` and `materialize_statistics_on_insert`). [#64391](https://github.com/ClickHouse/ClickHouse/pull/64391) ([Anton Popov](https://github.com/CurtizJ)). +* Use the allocated memory size to calculate the row group size and reduce the peak memory of the parquet writer in the single-threaded mode. [#64424](https://github.com/ClickHouse/ClickHouse/pull/64424) ([LiuNeng](https://github.com/liuneng1994)). +* Improve the iterator of sparse column to reduce call of `size`. [#64497](https://github.com/ClickHouse/ClickHouse/pull/64497) ([Jiebin Sun](https://github.com/jiebinn)). +* Update condition to use server-side copy for backups to Azure blob storage. [#64518](https://github.com/ClickHouse/ClickHouse/pull/64518) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Optimized memory usage of vertical merges for tables with high number of skip indexes. [#64580](https://github.com/ClickHouse/ClickHouse/pull/64580) ([Anton Popov](https://github.com/CurtizJ)). + +## Improvement + +* Returned back the behaviour of how ClickHouse works and interprets Tuples in CSV format. This change effectively reverts ClickHouse/ClickHouse#60994 and makes it available only under a few settings: output_format_csv_serialize_tuple_into_separate_columns, input_format_csv_deserialize_separate_columns_into_tuple and input_format_csv_try_infer_strings_from_quoted_tuples. #65170 (Nikita Mikhaylov). +* `SHOW CREATE TABLE` executed on top of system tables will now show the super handy comment unique for each table which will explain why this table is needed. [#63788](https://github.com/ClickHouse/ClickHouse/pull/63788) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* The second argument (scale) of functions `round()`, `roundBankers()`, `floor()`, `ceil()` and `trunc()` can now be non-const. [#64798](https://github.com/ClickHouse/ClickHouse/pull/64798) ([Mikhail Gorshkov](https://github.com/mgorshkov)). +* Avoid possible deadlock during MergeTree index analysis when scheduling threads in a saturated service. [#59427](https://github.com/ClickHouse/ClickHouse/pull/59427) ([Sean Haynes](https://github.com/seandhaynes)). +* Several minor corner case fixes to S3 proxy support & tunneling. [#63427](https://github.com/ClickHouse/ClickHouse/pull/63427) ([Arthur Passos](https://github.com/arthurpassos)). +* Add metrics to track the number of directories created and removed by the `plain_rewritable` metadata storage, and the number of entries in the local-to-remote in-memory map. [#64175](https://github.com/ClickHouse/ClickHouse/pull/64175) ([Julia Kartseva](https://github.com/jkartseva)). +* The query cache now considers identical queries with different settings as different. This increases robustness in cases where different settings (e.g. `limit` or `additional_table_filters`) would affect the query result. [#64205](https://github.com/ClickHouse/ClickHouse/pull/64205) ([Robert Schulze](https://github.com/rschu1ze)). +* Support the non standard error code `QpsLimitExceeded` in object storage as a retryable error. [#64225](https://github.com/ClickHouse/ClickHouse/pull/64225) ([Sema Checherinda](https://github.com/CheSema)). +* Added a new setting `input_format_parquet_prefer_block_bytes` to control the average output block bytes, and modified the default value of `input_format_parquet_max_block_size` to 65409. [#64427](https://github.com/ClickHouse/ClickHouse/pull/64427) ([LiuNeng](https://github.com/liuneng1994)). +* Settings from the user's config don't affect merges and mutations for `MergeTree` on top of object storage. [#64456](https://github.com/ClickHouse/ClickHouse/pull/64456) ([alesapin](https://github.com/alesapin)). +* Support the non standard error code `TotalQpsLimitExceeded` in object storage as a retryable error. [#64520](https://github.com/ClickHouse/ClickHouse/pull/64520) ([Sema Checherinda](https://github.com/CheSema)). +* Updated Advanced Dashboard for both open-source and ClickHouse Cloud versions to include a chart for 'Maximum concurrent network connections'. [#64610](https://github.com/ClickHouse/ClickHouse/pull/64610) ([Thom O'Connor](https://github.com/thomoco)). +* Improve progress report on `zeros_mt` and `generateRandom`. [#64804](https://github.com/ClickHouse/ClickHouse/pull/64804) ([Raúl Marín](https://github.com/Algunenano)). +* Add an asynchronous metric `jemalloc.profile.active` to show whether sampling is currently active. This is an activation mechanism in addition to prof.active; both must be active for the calling thread to sample. [#64842](https://github.com/ClickHouse/ClickHouse/pull/64842) ([Unalian](https://github.com/Unalian)). +* Remove mark of `allow_experimental_join_condition` as important. This mark may have prevented distributed queries in a mixed versions cluster from being executed successfully. [#65008](https://github.com/ClickHouse/ClickHouse/pull/65008) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Added server Asynchronous metrics `DiskGetObjectThrottler*` and `DiskGetObjectThrottler*` reflecting request per second rate limit defined with `s3_max_get_rps` and `s3_max_put_rps` disk settings and currently available number of requests that could be sent without hitting throttling limit on the disk. Metrics are defined for every disk that has a configured limit. [#65050](https://github.com/ClickHouse/ClickHouse/pull/65050) ([Sergei Trifonov](https://github.com/serxa)). +* Add a validation when creating a user with `bcrypt_hash`. [#65242](https://github.com/ClickHouse/ClickHouse/pull/65242) ([Raúl Marín](https://github.com/Algunenano)). +* Add profile events for number of rows read during/after `PREWHERE`. [#64198](https://github.com/ClickHouse/ClickHouse/pull/64198) ([Nikita Taranov](https://github.com/nickitat)). +* Print query in `EXPLAIN PLAN` with parallel replicas. [#64298](https://github.com/ClickHouse/ClickHouse/pull/64298) ([vdimir](https://github.com/vdimir)). +* Rename `allow_deprecated_functions` to `allow_deprecated_error_prone_window_functions`. [#64358](https://github.com/ClickHouse/ClickHouse/pull/64358) ([Raúl Marín](https://github.com/Algunenano)). +* Respect `max_read_buffer_size` setting for file descriptors as well in the `file` table function. [#64532](https://github.com/ClickHouse/ClickHouse/pull/64532) ([Azat Khuzhin](https://github.com/azat)). +* Disable transactions for unsupported storages even for materialized views. [#64918](https://github.com/ClickHouse/ClickHouse/pull/64918) ([alesapin](https://github.com/alesapin)). +* Forbid `QUALIFY` clause in the old analyzer. The old analyzer ignored `QUALIFY`, so it could lead to unexpected data removal in mutations. [#65356](https://github.com/ClickHouse/ClickHouse/pull/65356) ([Dmitry Novik](https://github.com/novikd)). + +## Bug Fix (user-visible misbehavior in an official stable release) +* Fixed 'set' skip index not working with IN and indexHint(). #62083 (Michael Kolupaev). +* Fix queries with FINAL give wrong result when table does not use adaptive granularity. #62432 (Duc Canh Le). +* Support executing function during assignment of parameterized view value. #63502 (SmitaRKulkarni). +* Fixed parquet memory tracking. #63584 (Michael Kolupaev). +* Fix rare case with missing data in the result of distributed query. #63691 (vdimir). +* Fixed reading of columns of type Tuple(Map(LowCardinality(String), String), ...). #63956 (Anton Popov). +* Fix resolve of unqualified COLUMNS matcher. Preserve the input columns order and forbid usage of unknown identifiers. #63962 (Dmitry Novik). +* Fix an Cyclic aliases error for cyclic aliases of different type (expression and function). #63993 (Nikolai Kochetov). +* This fix will use a proper redefined context with the correct definer for each individual view in the query pipeline. #64079 (pufit). +* Fix analyzer: "Not found column" error is fixed when using INTERPOLATE. #64096 (Yakov Olkhovskiy). +* Prevent LOGICAL_ERROR on CREATE TABLE as MaterializedView. #64174 (Raúl Marín). +* The query cache now considers two identical queries against different databases as different. The previous behavior could be used to bypass missing privileges to read from a table. #64199 (Robert Schulze). +* Fix possible abort on uncaught exception in ~WriteBufferFromFileDescriptor in StatusFile. #64206 (Kruglov Pavel). +* Fix duplicate alias error for distributed queries with ARRAY JOIN. #64226 (Nikolai Kochetov). +* Fix unexpected accurateCast from string to integer. #64255 (wudidapaopao). +* Fixed CNF simplification, in case any OR group contains mutually exclusive atoms. #64256 (Eduard Karacharov). +* Fix Query Tree size validation. #64377 (Dmitry Novik). +* Fix Logical error: Bad cast for Buffer table with PREWHERE. #64388 (Nikolai Kochetov). +* Fixed CREATE TABLE AS queries for tables with default expressions. #64455 (Anton Popov). +* Fixed optimize_read_in_order behaviour for ORDER BY ... NULLS FIRST / LAST on tables with nullable keys. #64483 (Eduard Karacharov). +* Fix the Expression nodes list expected 1 projection names and Unknown expression or identifier errors for queries with aliases to GLOBAL IN.. #64517 (Nikolai Kochetov). +* Fix an error Cannot find column in distributed queries with constant CTE in the GROUP BY key. #64519 (Nikolai Kochetov). +* Fix the output of function formatDateTimeInJodaSyntax when a formatter generates an uneven number of characters and the last character is 0. For example, SELECT formatDateTimeInJodaSyntax(toDate('2012-05-29'), 'D') now correctly returns 150 instead of previously 15. #64614 (LiuNeng). +* Do not rewrite aggregation if -If combinator is already used. #64638 (Dmitry Novik). +* Fix type inference for float (in case of small buffer, i.e. --max_read_buffer_size 1). #64641 (Azat Khuzhin). +* Fix bug which could lead to non-working TTLs with expressions. #64694 (alesapin). +* Fix removing the WHERE and PREWHERE expressions, which are always true (for the new analyzer). #64695 (Nikolai Kochetov). +* Fixed excessive part elimination by token-based text indexes (ngrambf , full_text) when filtering by result of startsWith, endsWith, match, multiSearchAny. #64720 (Eduard Karacharov). +* Fixes incorrect behaviour of ANSI CSI escaping in the UTF8::computeWidth function. #64756 (Shaun Struwig). +* Fix a case of incorrect removal of ORDER BY / LIMIT BY across subqueries. #64766 (Raúl Marín). +* Fix (experimental) unequal join with subqueries for sets which are in the mixed join conditions. #64775 (lgbo). +* Fix crash in a local cache over plain_rewritable disk. #64778 (Julia Kartseva). +* Fix Cannot find column in distributed query with ARRAY JOIN by Nested column. Fixes #64755. #64801 (Nikolai Kochetov). +* Fix memory leak in slru cache policy. #64803 (Kseniia Sumarokova). +* Fixed possible incorrect memory tracking in several kinds of queries: queries that read any data from S3, queries via http protocol, asynchronous inserts. #64844 (Anton Popov). +* Fix the Block structure mismatch error for queries reading with PREWHERE from the materialized view when the materialized view has columns of different types than the source table. Fixes #64611. #64855 (Nikolai Kochetov). +* Fix rare crash when table has TTL with subquery + database replicated + parallel replicas + analyzer. It's really rare, but please don't use TTLs with subqueries. #64858 (alesapin). +* Fix ALTER MODIFY COMMENT query that was broken for parameterized VIEWs in ClickHouse/ClickHouse#54211. #65031 (Nikolay Degterinsky). +* Fix host_id in DatabaseReplicated when cluster_secure_connection parameter is enabled. Previously all the connections within the cluster created by DatabaseReplicated were not secure, even if the parameter was enabled. #65054 (Nikolay Degterinsky). +* Fixing the Not-ready Set error after the PREWHERE optimization for StorageMerge. #65057 (Nikolai Kochetov). +* Avoid writing to finalized buffer in File-like storages. #65063 (Kruglov Pavel). +* Fix possible infinite query duration in case of cyclic aliases. Fixes #64849. #65081 (Nikolai Kochetov). +* Fix the Unknown expression identifier error for remote queries with INTERPOLATE (alias) (new analyzer). Fixes #64636. #65090 (Nikolai Kochetov). +* Fix pushing arithmetic operations out of aggregation. In the new analyzer, optimization was applied only once. #65104 (Dmitry Novik). +* Fix aggregate function name rewriting in the new analyzer. #65110 (Dmitry Novik). +* Respond with 5xx instead of 200 OK in case of receive timeout while reading (parts of) the request body from the client socket. #65118 (Julian Maicher). +* Fix possible crash for hedged requests. #65206 (Azat Khuzhin). +* Fix the bug in Hashed and Hashed_Array dictionary short circuit evaluation, which may read uninitialized number, leading to various errors. #65256 (jsc0218). +* This PR ensures that the type of the constant(IN operator's second parameter) is always visible during the IN operator's type conversion process. Otherwise, losing type information may cause some conversions to fail, such as the conversion from DateTime to Date. fix (#64487). #65315 (pn). \ No newline at end of file diff --git a/docs/ja/cloud/changelogs/changelog-24-8.md b/docs/ja/cloud/changelogs/changelog-24-8.md new file mode 100644 index 00000000000..e1b53785d38 --- /dev/null +++ b/docs/ja/cloud/changelogs/changelog-24-8.md @@ -0,0 +1,65 @@ +--- +slug: /ja/changelogs/24.8 +title: v24.8 Changelog for Cloud +description: Fast release changelog for v24.8 +keywords: [chaneglog, cloud] +--- + +Relevant changes for ClickHouse Cloud services based on the v24.8 release. + +## Backward Incompatible Change + +- Change binary serialization of Variant data type: add compact mode to avoid writing the same discriminator multiple times for granules with single variant or with only NULL values. Add MergeTree setting use_compact_variant_discriminators_serialization that is enabled by default. Note that Variant type is still experimental and backward-incompatible change in serialization should not impact you unless you have been working with support to get this feature enabled earlier. [#62774](https://github.com/ClickHouse/ClickHouse/pull/62774) (Kruglov Pavel). + +- Forbid CREATE MATERIALIZED VIEW ... ENGINE Replicated*MergeTree POPULATE AS SELECT ... with Replicated databases. This specific PR is only applicable to users still using, ReplicatedMergeTree. [#63963](https://github.com/ClickHouse/ClickHouse/pull/63963) (vdimir). + +- Metric KeeperOutstandingRequets was renamed to KeeperOutstandingRequests. This fixes a typo reported in [#66179](https://github.com/ClickHouse/ClickHouse/issues/66179). [#66206](https://github.com/ClickHouse/ClickHouse/pull/66206) (Robert Schulze). + +- clickhouse-client and clickhouse-local now default to multi-query mode (instead single-query mode). As an example, clickhouse-client -q "SELECT 1; SELECT 2" now works, whereas users previously had to add --multiquery (or -n). The --multiquery/-n switch became obsolete. INSERT queries in multi-query statements are treated specially based on their FORMAT clause: If the FORMAT is VALUES (the most common case), the end of the INSERT statement is represented by a trailing semicolon ; at the end of the query. For all other FORMATs (e.g. CSV or JSONEachRow), the end of the INSERT statement is represented by two newlines \n\n at the end of the query. [#63898](https://github.com/ClickHouse/ClickHouse/pull/63898) (wxybear). + +- In previous versions, it was possible to use an alternative syntax for LowCardinality data types by appending WithDictionary to the name of the data type. It was an initial working implementation, and it was never documented or exposed to the public. Now, it is deprecated. If you have used this syntax, you have to ALTER your tables and rename the data types to LowCardinality. [#66842](https://github.com/ClickHouse/ClickHouse/pull/66842)(Alexey Milovidov). + +- Fix logical errors with storage Buffer used with distributed destination table. It's a backward incompatible change: queries using Buffer with a distributed destination table may stop working if the table appears more than once in the query (e.g., in a self-join). [#67015](https://github.com/vdimir) (vdimir). + +- In previous versions, calling functions for random distributions based on the Gamma function (such as Chi-Squared, Student, Fisher) with negative arguments close to zero led to a long computation or an infinite loop. In the new version, calling these functions with zero or negative arguments will produce an exception. This closes [#67297](https://github.com/ClickHouse/ClickHouse/issues/67297). [#67326](https://github.com/ClickHouse/ClickHouse/pull/67326) (Alexey Milovidov). + +- In previous versions, arrayWithConstant can be slow if asked to generate very large arrays. In the new version, it is limited to 1 GB per array. This closes [#32754](https://github.com/ClickHouse/ClickHouse/issues/32754). [#67741](https://github.com/ClickHouse/ClickHouse/pull/67741) (Alexey Milovidov). + +- Fix REPLACE modifier formatting (forbid omitting brackets). [#67774](https://github.com/ClickHouse/ClickHouse/pull/67774) (Azat Khuzhin). + + +## New Feature + +- Extend function tuple to construct named tuples in query. Introduce function tupleNames to extract names from tuples. [#54881](https://github.com/ClickHouse/ClickHouse/pull/54881) (Amos Bird). + +- ASOF JOIN support for full_sorting_join algorithm Close [#54493](https://github.com/ClickHouse/ClickHouse/issues/54493). [#55051](https://github.com/ClickHouse/ClickHouse/pull/55051) (vdimir). + +- A new table function, fuzzQuery, was added. This function allows you to modify a given query string with random variations. Example: SELECT query FROM fuzzQuery('SELECT 1');. [#62103](https://github.com/ClickHouse/ClickHouse/pull/62103) (pufit). + +- Add new window function percent_rank. [#62747](https://github.com/ClickHouse/ClickHouse/pull/62747) (lgbo). + +- Support JWT authentication in clickhouse-client. [#62829](https://github.com/ClickHouse/ClickHouse/pull/62829) (Konstantin Bogdanov). + +- Add SQL functions changeYear, changeMonth, changeDay, changeHour, changeMinute, changeSecond. For example, SELECT changeMonth(toDate('2024-06-14'), 7) returns date 2024-07-14. [#63186](https://github.com/ClickHouse/ClickHouse/pull/63186) (cucumber95). + +- Add system.error_log which contains history of error values from table system.errors, periodically flushed to disk. [#65381](https://github.com/ClickHouse/ClickHouse/pull/65381) (Pablo Marcos). + +- Add aggregate function groupConcat. About the same as arrayStringConcat( groupArray(column), ',') Can receive 2 parameters: a string delimiter and the number of elements to be processed. [#65451](https://github.com/ClickHouse/ClickHouse/pull/65451) (Yarik Briukhovetskyi). + +- Add AzureQueue storage. [#65458](https://github.com/ClickHouse/ClickHouse/pull/65458) (Kseniia Sumarokova). + +- Add a new setting to disable/enable writing page index into parquet files. [#65475](https://github.com/ClickHouse/ClickHouse/pull/65475) (lgbo). + +- Automatically append a wildcard * to the end of a directory path with table function file. [#66019](https://github.com/ClickHouse/ClickHouse/pull/66019) (Zhidong (David) Guo). + +- Add --memory-usage option to client in non interactive mode. [#66393](https://github.com/ClickHouse/ClickHouse/pull/66393) (vdimir). + +- Add _etag virtual column for S3 table engine. Fixes [#65312](https://github.com/ClickHouse/ClickHouse/issues/65312). [#65386](https://github.com/ClickHouse/ClickHouse/pull/65386) (skyoct) + +- This pull request introduces Hive-style partitioning for different engines (File, URL, S3, AzureBlobStorage, HDFS). Hive-style partitioning organizes data into partitioned sub-directories, making it efficient to query and manage large datasets. Currently, it only creates virtual columns with the appropriate name and data. The follow-up PR will introduce the appropriate data filtering (performance speedup). [#65997](https://github.com/ClickHouse/ClickHouse/pull/65997) (Yarik Briukhovetskyi). + +- Add function printf for spark compatiability. [#66257](https://github.com/ClickHouse/ClickHouse/pull/66257) (æŽæ‰¬). + +- Added support for reading MULTILINESTRING geometry in WKT format using function readWKTLineString. [#67647](https://github.com/ClickHouse/ClickHouse/pull/67647) (Jacob Reckhard). + +- Added a tagging (namespace) mechanism for the query cache. The same queries with different tags are considered different by the query cache. Example: SELECT 1 SETTINGS use_query_cache = 1, query_cache_tag = 'abc' and SELECT 1 SETTINGS use_query_cache = 1, query_cache_tag = 'def' now create different query cache entries. [#68235](https://github.com/ClickHouse/ClickHouse/pull/68235)(sakulali). \ No newline at end of file diff --git a/docs/ja/cloud/images/sqlconsole/abc.png b/docs/ja/cloud/images/sqlconsole/abc.png new file mode 100644 index 00000000000..be7ecb98e26 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/abc.png differ diff --git a/docs/ja/cloud/images/sqlconsole/add-more-filters.png b/docs/ja/cloud/images/sqlconsole/add-more-filters.png new file mode 100644 index 00000000000..ed228d9cfe6 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/add-more-filters.png differ diff --git a/docs/ja/cloud/images/sqlconsole/adjust-axis-scale.png b/docs/ja/cloud/images/sqlconsole/adjust-axis-scale.png new file mode 100644 index 00000000000..185c7484471 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/adjust-axis-scale.png differ diff --git a/docs/ja/cloud/images/sqlconsole/authentication-success.png b/docs/ja/cloud/images/sqlconsole/authentication-success.png new file mode 100644 index 00000000000..183e90d5367 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/authentication-success.png differ diff --git a/docs/ja/cloud/images/sqlconsole/bar-chart.png b/docs/ja/cloud/images/sqlconsole/bar-chart.png new file mode 100644 index 00000000000..10c251cb76d Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/bar-chart.png differ diff --git a/docs/ja/cloud/images/sqlconsole/cancel-a-query.png b/docs/ja/cloud/images/sqlconsole/cancel-a-query.png new file mode 100644 index 00000000000..97f01a60f40 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/cancel-a-query.png differ diff --git a/docs/ja/cloud/images/sqlconsole/change-from-bar-to-area.png b/docs/ja/cloud/images/sqlconsole/change-from-bar-to-area.png new file mode 100644 index 00000000000..574e12cbf4b Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/change-from-bar-to-area.png differ diff --git a/docs/ja/cloud/images/sqlconsole/create-a-query-from-sorts-and-filters.png b/docs/ja/cloud/images/sqlconsole/create-a-query-from-sorts-and-filters.png new file mode 100644 index 00000000000..19ef230145b Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/create-a-query-from-sorts-and-filters.png differ diff --git a/docs/ja/cloud/images/sqlconsole/creating-a-query.png b/docs/ja/cloud/images/sqlconsole/creating-a-query.png new file mode 100644 index 00000000000..eae12583eeb Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/creating-a-query.png differ diff --git a/docs/ja/cloud/images/sqlconsole/download-as-csv.png b/docs/ja/cloud/images/sqlconsole/download-as-csv.png new file mode 100644 index 00000000000..5910d502524 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/download-as-csv.png differ diff --git a/docs/ja/cloud/images/sqlconsole/endpoints-completed.png b/docs/ja/cloud/images/sqlconsole/endpoints-completed.png new file mode 100644 index 00000000000..55f3c5dd1fb Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/endpoints-completed.png differ diff --git a/docs/ja/cloud/images/sqlconsole/endpoints-configure.png b/docs/ja/cloud/images/sqlconsole/endpoints-configure.png new file mode 100644 index 00000000000..75c4f934187 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/endpoints-configure.png differ diff --git a/docs/ja/cloud/images/sqlconsole/endpoints-createkey.png b/docs/ja/cloud/images/sqlconsole/endpoints-createkey.png new file mode 100644 index 00000000000..ae91e705ce5 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/endpoints-createkey.png differ diff --git a/docs/ja/cloud/images/sqlconsole/endpoints-curltest.png b/docs/ja/cloud/images/sqlconsole/endpoints-curltest.png new file mode 100644 index 00000000000..44917ae8f69 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/endpoints-curltest.png differ diff --git a/docs/ja/cloud/images/sqlconsole/endpoints-monitoring.png b/docs/ja/cloud/images/sqlconsole/endpoints-monitoring.png new file mode 100644 index 00000000000..1ad8cdb79ea Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/endpoints-monitoring.png differ diff --git a/docs/ja/cloud/images/sqlconsole/endpoints-savequery.png b/docs/ja/cloud/images/sqlconsole/endpoints-savequery.png new file mode 100644 index 00000000000..ffa80de31f6 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/endpoints-savequery.png differ diff --git a/docs/ja/cloud/images/sqlconsole/endpoints-testquery.png b/docs/ja/cloud/images/sqlconsole/endpoints-testquery.png new file mode 100644 index 00000000000..f51f86e50bf Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/endpoints-testquery.png differ diff --git a/docs/ja/cloud/images/sqlconsole/enter-credentials.png b/docs/ja/cloud/images/sqlconsole/enter-credentials.png new file mode 100644 index 00000000000..0da62a82d16 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/enter-credentials.png differ diff --git a/docs/ja/cloud/images/sqlconsole/filter-on-radio-column-equal-gsm.png b/docs/ja/cloud/images/sqlconsole/filter-on-radio-column-equal-gsm.png new file mode 100644 index 00000000000..966fa17306d Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/filter-on-radio-column-equal-gsm.png differ diff --git a/docs/ja/cloud/images/sqlconsole/filtering-and-sorting-together.png b/docs/ja/cloud/images/sqlconsole/filtering-and-sorting-together.png new file mode 100644 index 00000000000..323ea9d8073 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/filtering-and-sorting-together.png differ diff --git a/docs/ja/cloud/images/sqlconsole/give-a-query-a-name.png b/docs/ja/cloud/images/sqlconsole/give-a-query-a-name.png new file mode 100644 index 00000000000..3cb64dca734 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/give-a-query-a-name.png differ diff --git a/docs/ja/cloud/images/sqlconsole/insights_drilldown.png b/docs/ja/cloud/images/sqlconsole/insights_drilldown.png new file mode 100644 index 00000000000..3063dc50aef Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/insights_drilldown.png differ diff --git a/docs/ja/cloud/images/sqlconsole/insights_latency.png b/docs/ja/cloud/images/sqlconsole/insights_latency.png new file mode 100644 index 00000000000..34e768dc013 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/insights_latency.png differ diff --git a/docs/ja/cloud/images/sqlconsole/insights_overview.png b/docs/ja/cloud/images/sqlconsole/insights_overview.png new file mode 100644 index 00000000000..12f5221a896 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/insights_overview.png differ diff --git a/docs/ja/cloud/images/sqlconsole/insights_query_info.png b/docs/ja/cloud/images/sqlconsole/insights_query_info.png new file mode 100644 index 00000000000..adbb15624c9 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/insights_query_info.png differ diff --git a/docs/ja/cloud/images/sqlconsole/insights_recent.png b/docs/ja/cloud/images/sqlconsole/insights_recent.png new file mode 100644 index 00000000000..35ec081553e Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/insights_recent.png differ diff --git a/docs/ja/cloud/images/sqlconsole/inspecting-cell-content.png b/docs/ja/cloud/images/sqlconsole/inspecting-cell-content.png new file mode 100644 index 00000000000..63116ec7a7e Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/inspecting-cell-content.png differ diff --git a/docs/ja/cloud/images/sqlconsole/match-in-body.png b/docs/ja/cloud/images/sqlconsole/match-in-body.png new file mode 100644 index 00000000000..936a24cc80a Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/match-in-body.png differ diff --git a/docs/ja/cloud/images/sqlconsole/open-sql-console-from-service.png b/docs/ja/cloud/images/sqlconsole/open-sql-console-from-service.png new file mode 100644 index 00000000000..f236cf96bee Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/open-sql-console-from-service.png differ diff --git a/docs/ja/cloud/images/sqlconsole/pagination-nav.png b/docs/ja/cloud/images/sqlconsole/pagination-nav.png new file mode 100644 index 00000000000..ccb488d4541 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/pagination-nav.png differ diff --git a/docs/ja/cloud/images/sqlconsole/pagination.png b/docs/ja/cloud/images/sqlconsole/pagination.png new file mode 100644 index 00000000000..6bfe15f50f8 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/pagination.png differ diff --git a/docs/ja/cloud/images/sqlconsole/run-at-cursor-2.png b/docs/ja/cloud/images/sqlconsole/run-at-cursor-2.png new file mode 100644 index 00000000000..d1ad23258a0 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/run-at-cursor-2.png differ diff --git a/docs/ja/cloud/images/sqlconsole/run-at-cursor.png b/docs/ja/cloud/images/sqlconsole/run-at-cursor.png new file mode 100644 index 00000000000..54aed6713b8 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/run-at-cursor.png differ diff --git a/docs/ja/cloud/images/sqlconsole/run-selected-query.png b/docs/ja/cloud/images/sqlconsole/run-selected-query.png new file mode 100644 index 00000000000..7c986647088 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/run-selected-query.png differ diff --git a/docs/ja/cloud/images/sqlconsole/save-the-query.png b/docs/ja/cloud/images/sqlconsole/save-the-query.png new file mode 100644 index 00000000000..41ee8ba62fd Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/save-the-query.png differ diff --git a/docs/ja/cloud/images/sqlconsole/search-github.png b/docs/ja/cloud/images/sqlconsole/search-github.png new file mode 100644 index 00000000000..0359429b05d Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/search-github.png differ diff --git a/docs/ja/cloud/images/sqlconsole/select-a-service.png b/docs/ja/cloud/images/sqlconsole/select-a-service.png new file mode 100644 index 00000000000..408a5167cae Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/select-a-service.png differ diff --git a/docs/ja/cloud/images/sqlconsole/sort-descending-on-column.png b/docs/ja/cloud/images/sqlconsole/sort-descending-on-column.png new file mode 100644 index 00000000000..58d47f8740d Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/sort-descending-on-column.png differ diff --git a/docs/ja/cloud/images/sqlconsole/switch-from-query-to-chart.png b/docs/ja/cloud/images/sqlconsole/switch-from-query-to-chart.png new file mode 100644 index 00000000000..d8f23e4d2ec Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/switch-from-query-to-chart.png differ diff --git a/docs/ja/cloud/images/sqlconsole/switch-services.png b/docs/ja/cloud/images/sqlconsole/switch-services.png new file mode 100644 index 00000000000..9ca0834e0cd Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/switch-services.png differ diff --git a/docs/ja/cloud/images/sqlconsole/table-list-and-schema.png b/docs/ja/cloud/images/sqlconsole/table-list-and-schema.png new file mode 100644 index 00000000000..533bf98b6e6 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/table-list-and-schema.png differ diff --git a/docs/ja/cloud/images/sqlconsole/tabular-query-results.png b/docs/ja/cloud/images/sqlconsole/tabular-query-results.png new file mode 100644 index 00000000000..429db85a22d Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/tabular-query-results.png differ diff --git a/docs/ja/cloud/images/sqlconsole/trip-total-by-week.png b/docs/ja/cloud/images/sqlconsole/trip-total-by-week.png new file mode 100644 index 00000000000..6cc38b441e1 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/trip-total-by-week.png differ diff --git a/docs/ja/cloud/images/sqlconsole/update-query-name.png b/docs/ja/cloud/images/sqlconsole/update-query-name.png new file mode 100644 index 00000000000..0501e03c50d Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/update-query-name.png differ diff --git a/docs/ja/cloud/images/sqlconsole/update-subtitle-etc.png b/docs/ja/cloud/images/sqlconsole/update-subtitle-etc.png new file mode 100644 index 00000000000..f6e11642e74 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/update-subtitle-etc.png differ diff --git a/docs/ja/cloud/images/sqlconsole/view-columns.png b/docs/ja/cloud/images/sqlconsole/view-columns.png new file mode 100644 index 00000000000..fd7d2eeb449 Binary files /dev/null and b/docs/ja/cloud/images/sqlconsole/view-columns.png differ diff --git a/docs/ja/cloud/manage/_category_.yml b/docs/ja/cloud/manage/_category_.yml new file mode 100644 index 00000000000..59089856c86 --- /dev/null +++ b/docs/ja/cloud/manage/_category_.yml @@ -0,0 +1,6 @@ +label: 'Manage Cloud' +collapsible: true +collapsed: true +link: + type: generated-index + title: Manage ClickHouse Cloud diff --git a/docs/ja/cloud/manage/account-close.md b/docs/ja/cloud/manage/account-close.md new file mode 100644 index 00000000000..e36a627365c --- /dev/null +++ b/docs/ja/cloud/manage/account-close.md @@ -0,0 +1,53 @@ +--- +sidebar_label: アカウント削除 +slug: /ja/cloud/manage/close_account +title: アカウントクローズã¨å‰Šé™¤ +--- + +## アカウントクローズã¨å‰Šé™¤ + +ç§ãŸã¡ã®ç›®æ¨™ã¯ã€ã‚ãªãŸã®ãƒ—ロジェクトãŒæˆåŠŸã™ã‚‹ã“ã¨ã§ã™ã€‚ã“ã®ã‚µã‚¤ãƒˆã§å›žç­”ã•ã‚Œã¦ã„ãªã„質å•ã‚„特定ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã®è©•ä¾¡ãŒå¿…è¦ãªå ´åˆã¯ã€[support@clickhouse.com](mailto:support@clickhouse.com)ã¾ã§ãŠå•ã„åˆã‚ã›ãã ã•ã„。 + +時ã«ã¯ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚¯ãƒ­ãƒ¼ã‚ºãŒå¿…è¦ã¨ãªã‚‹çŠ¶æ³ãŒã‚ã‚‹ã“ã¨ã‚‚ç†è§£ã—ã¦ã„ã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€ãã®ãƒ—ロセスを支æ´ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ + +## クローズã¨å‰Šé™¤ã®é•ã„ + +顧客ã¯ã‚¯ãƒ­ãƒ¼ã‚ºã•ã‚ŒãŸã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«å†ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ã€ä½¿ç”¨çŠ¶æ³ã€è«‹æ±‚ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆãƒ¬ãƒ™ãƒ«ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ“ティログを確èªã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã®æ–‡æ›¸åŒ–ã‹ã‚‰å¹´æœ«ã®ç¨Žé‡‘用ã®è«‹æ±‚書ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã«ã„ãŸã‚‹ã¾ã§ã€ã•ã¾ã–ã¾ãªç›®çš„ã«å½¹ç«‹ã¤è©³ç´°ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ã¾ãŸã€ã‚¯ãƒ­ãƒ¼ã‚ºã•ã‚ŒãŸã‚¢ã‚«ã‚¦ãƒ³ãƒˆã¯æ–°ã—ã„サービスを開始ã™ã‚‹ãŸã‚ã«ã„ã¤ã§ã‚‚å†é–‹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +個人データã®å‰Šé™¤ã‚’è¦æ±‚ã™ã‚‹é¡§å®¢ã¯ã€ã“ã®ãƒ—ロセスãŒä¸å¯é€†ã§ã‚ã‚‹ã“ã¨ã‚’èªè­˜ã—ã¦ãã ã•ã„。アカウントãŠã‚ˆã³é–¢é€£æƒ…å ±ã¯åˆ©ç”¨ã§ããªããªã‚Šã¾ã™ã€‚製å“ã®æ›´æ–°æƒ…å ±ã¯å—ã‘å–ã‚Œãšã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’å†é–‹ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã›ã‚“。ã“ã‚Œã¯ãƒ‹ãƒ¥ãƒ¼ã‚¹ãƒ¬ã‚¿ãƒ¼ã®è³¼èª­ã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 + +ニュースレターã®è³¼èª­è€…ã¯ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’クローズã—ãŸã‚Šæƒ…報を削除ã—ãŸã‚Šã›ãšã«ã€ãƒ‹ãƒ¥ãƒ¼ã‚¹ãƒ¬ã‚¿ãƒ¼ã®ãƒ¡ãƒ¼ãƒ«æœ«å°¾ã®è³¼èª­è§£é™¤ãƒªãƒ³ã‚¯ã‚’使用ã—ã¦ã„ã¤ã§ã‚‚購読解除ã§ãã¾ã™ã€‚ + +## クローズã®æº–å‚™ + +アカウントクローズをè¦æ±‚ã™ã‚‹å‰ã«ã€æ¬¡ã®æ‰‹é †ã‚’実行ã—ã¦ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’準備ã—ã¦ãã ã•ã„。 + +1. ä¿å­˜ãŒå¿…è¦ãªã‚µãƒ¼ãƒ“スã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +2. サービスをåœæ­¢ã—削除ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§è¿½åŠ ã®æ–™é‡‘ãŒç™ºç”Ÿã™ã‚‹ã“ã¨ã‚’防ã’ã¾ã™ã€‚ +3. クローズをè¦æ±‚ã™ã‚‹ç®¡ç†è€…以外ã®ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’削除ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ—ロセスãŒå®Œäº†ã™ã‚‹é–“ã«æ–°ã—ã„サービスãŒä½œæˆã•ã‚Œã‚‹ã“ã¨ã‚’防ãã“ã¨ãŒã§ãã¾ã™ã€‚ +4. コントロールパãƒãƒ«ã® 'Usage'(使用状æ³) ã¨'Billing'(請求) タブを確èªã—ã€ã™ã¹ã¦ã®æ–™é‡‘ãŒæ”¯æ‰•ã‚ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚未払ã„残高ã®ã‚るアカウントã¯ã‚¯ãƒ­ãƒ¼ã‚ºã§ãã¾ã›ã‚“。 + +## アカウントクローズをè¦æ±‚ + +クローズã¨å‰Šé™¤ã®è¦æ±‚ã‚’èªè¨¼ã™ã‚‹ã“ã¨ãŒæ±‚ã‚られã¾ã™ã€‚è¦æ±‚ãŒè¿…速ã«å‡¦ç†ã•ã‚Œã‚‹ã‚ˆã†ã«ã€ä»¥ä¸‹ã®æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„。 + +1. clickhouse.cloudアカウントã«ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã—ã¾ã™ã€‚ +2. 上記㮠_クローズã®æº–å‚™_ セクションã®æ®‹ã‚Šã®æ‰‹é †ã‚’完了ã—ã¾ã™ã€‚ +3. ç”»é¢å³ä¸Šã®ãƒ˜ãƒ«ãƒ—ボタン(質å•ãƒžãƒ¼ã‚¯ï¼‰ã‚’クリックã—ã¾ã™ã€‚ +4. 'Support'(サãƒãƒ¼ãƒˆ) ã®ä¸‹ã§ 'Create case.'(ケース作æˆ) をクリックã—ã¾ã™ã€‚ +5. 'Create new case'(æ–°ã—ã„ケースã®ä½œæˆ) ç”»é¢ã§æ¬¡ã®æƒ…報を入力ã—ã¾ã™ã€‚ +``` +Priority: Severity 3 +Subject: Please close my ClickHouse account +Description: We would appreciate it if you would share a brief note about why you are cancelling. +``` +1. 'Create new case'(æ–°ã—ã„ケースã®ä½œæˆ) をクリックã—ã¾ã™ã€‚ +2. アカウントをクローズã—ã€å®Œäº†æ™‚ã«ç¢ºèªãƒ¡ãƒ¼ãƒ«ã‚’é€ä¿¡ã—ã¾ã™ã€‚ + +## 個人データ削除ã®è¦æ±‚ + +ClickHouseã‹ã‚‰å€‹äººãƒ‡ãƒ¼ã‚¿å‰Šé™¤ã‚’è¦æ±‚ã§ãã‚‹ã®ã¯ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†è€…ã®ã¿ã§ã™ã€‚アカウント管ç†è€…ã§ãªã„å ´åˆã¯ã€ClickHouseアカウント管ç†è€…ã«é€£çµ¡ã—ã¦ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‹ã‚‰ã®å‰Šé™¤ã‚’è¦æ±‚ã—ã¦ãã ã•ã„。 + +データ削除をè¦æ±‚ã™ã‚‹ã«ã¯ã€ä¸Šè¨˜ã®ã€Œã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚¯ãƒ­ãƒ¼ã‚ºã®è¦æ±‚ã€ã®æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„。ケース情報を入力ã™ã‚‹éš›ã«ã€ä»¶åã‚’ 'Please close my ClickHouse account and delete my personal data.'(ç§ã®ClickHouseアカウントをクローズã—ã€å€‹äººãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¦ãã ã•ã„) ã«å¤‰æ›´ã—ã¦ãã ã•ã„。 + +個人データ削除ã®è¦æ±‚ã¯30日以内ã«å®Œäº†ã—ã¾ã™ã€‚ diff --git a/docs/ja/cloud/manage/api/api-overview.md b/docs/ja/cloud/manage/api/api-overview.md new file mode 100644 index 00000000000..71133cd3324 --- /dev/null +++ b/docs/ja/cloud/manage/api/api-overview.md @@ -0,0 +1,32 @@ +--- +sidebar_label: æ¦‚è¦ +sidebar_position: 1 +--- + +# ClickHouse Cloud API + +## æ¦‚è¦ + +ClickHouse Cloud APIã¯ã€ClickHouse Cloud上ã®çµ„織やサービスを簡å˜ã«ç®¡ç†ã§ãるよã†ã«è¨­è¨ˆã•ã‚ŒãŸREST APIã§ã™ã€‚ã“ã®Cloud APIを使用ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒ“スã®ä½œæˆã‚„管ç†ã€APIキーã®ãƒ—ロビジョニングã€çµ„織内ã®ãƒ¡ãƒ³ãƒãƒ¼ã®è¿½åŠ ã¾ãŸã¯å‰Šé™¤ãªã©ãŒå¯èƒ½ã§ã™ã€‚ + +[最åˆã®APIキーを作æˆã—ã¦ClickHouse Cloud APIã®ä½¿ç”¨ã‚’開始ã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã—ょã†ã€‚](/docs/ja/cloud/manage/openapi.md) + +## ãƒ¬ãƒ¼ãƒˆåˆ¶é™ + +開発者ã¯ã€1ã¤ã®çµ„ç¹”ã«ã¤ã100個ã®APIキーã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚å„APIキーã¯ã€10秒間ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å†…ã§10回ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚組織ã®ãŸã‚ã«APIキーや10秒ã”ã¨ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆæ•°ã‚’増やã—ãŸã„å ´åˆã¯ã€support@clickhouse.comã¾ã§ã”連絡ãã ã•ã„。 + +## Terraformプロãƒã‚¤ãƒ€ãƒ¼ + +å…¬å¼ã®ClickHouse Terraformプロãƒã‚¤ãƒ€ãƒ¼ã‚’利用ã™ã‚‹ã¨ã€[コードã¨ã—ã¦ã®ã‚¤ãƒ³ãƒ•ãƒ©ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£](https://www.redhat.com/en/topics/automation/what-is-infrastructure-as-code-iac)を使用ã—ã¦ã€äºˆæ¸¬å¯èƒ½ã§ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç†ã•ã‚ŒãŸè¨­å®šã‚’作æˆã—ã€ãƒ‡ãƒ—ロイメントã®ã‚¨ãƒ©ãƒ¼ç™ºç”Ÿã‚’大幅ã«æ¸›ã‚‰ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +Terraformプロãƒã‚¤ãƒ€ãƒ¼ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ã€[Terraformレジストリ](https://registry.terraform.io/providers/ClickHouse/clickhouse/latest/docs)ã§é–²è¦§ã§ãã¾ã™ã€‚ + +ClickHouse Terraformプロãƒã‚¤ãƒ€ãƒ¼ã«è²¢çŒ®ã—ãŸã„å ´åˆã¯ã€[GitHubリãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/terraform-provider-clickhouse)ã§ã‚½ãƒ¼ã‚¹ã‚’確èªã§ãã¾ã™ã€‚ + +## Swagger(OpenAPI)エンドãƒã‚¤ãƒ³ãƒˆã¨UI + +ClickHouse Cloud APIã¯ã‚ªãƒ¼ãƒ—ンソースã®[OpenAPI仕様](https://www.openapis.org/)ã«åŸºã¥ã„ã¦æ§‹ç¯‰ã•ã‚Œã¦ãŠã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§ã®äºˆæ¸¬å¯èƒ½ãªåˆ©ç”¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ClickHouse Cloud APIドキュメントをプログラムã§åˆ©ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€https://api.clickhouse.cloud/v1を通ã—ã¦JSONベースã®Swaggerエンドãƒã‚¤ãƒ³ãƒˆã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚当社ã®APIリファレンスドキュメントã¯ã€åŒã˜ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‹ã‚‰è‡ªå‹•ç”Ÿæˆã•ã‚Œã¦ã„ã¾ã™ã€‚Swagger UIを通ã—ã¦APIドキュメントを閲覧ã—ãŸã„å ´åˆã¯ã€[ã“ã¡ã‚‰](https://clickhouse.com/docs/ja/cloud/manage/api/swagger)をクリックã—ã¦ãã ã•ã„。 + +## サãƒãƒ¼ãƒˆ + +迅速ãªã‚µãƒãƒ¼ãƒˆã‚’å¾—ã‚‹ã«ã¯ã€ã¾ãš[当社ã®Slackãƒãƒ£ãƒãƒ«](https://clickhouse.com/slack)を訪れるã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚APIã‚„ãã®æ©Ÿèƒ½ã«é–¢ã—ã¦è¿½åŠ ã®ãƒ˜ãƒ«ãƒ—や詳細情報ãŒå¿…è¦ãªå ´åˆã¯ã€https://clickhouse.cloud/supportã§ClickHouseサãƒãƒ¼ãƒˆã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/api/invitations-api-reference.md b/docs/ja/cloud/manage/api/invitations-api-reference.md new file mode 100644 index 00000000000..edd820393c3 --- /dev/null +++ b/docs/ja/cloud/manage/api/invitations-api-reference.md @@ -0,0 +1,8 @@ +--- +sidebar_label: 招待 +title: 招待 +--- + +## ã™ã¹ã¦ã®æ‹›å¾…を一覧表示ã™ã‚‹ + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ãƒ“ルドプロセス中ã«`clickhouseapi.js`ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã¾ã™ã€‚内容を変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`clickhouseapi.js`を編集ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/api/keys-api-reference.md b/docs/ja/cloud/manage/api/keys-api-reference.md new file mode 100644 index 00000000000..56d3f4d0629 --- /dev/null +++ b/docs/ja/cloud/manage/api/keys-api-reference.md @@ -0,0 +1,9 @@ +--- +sidebar_label: キー +title: キー +--- + +## ã™ã¹ã¦ã®ã‚­ãƒ¼ã®ä¸€è¦§ã‚’å–å¾— + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ãƒ“ルドプロセス中㫠`clickhouseapi.js` ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ +内容を変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`clickhouseapi.js` を編集ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/api/members-api-reference.md b/docs/ja/cloud/manage/api/members-api-reference.md new file mode 100644 index 00000000000..95b06578377 --- /dev/null +++ b/docs/ja/cloud/manage/api/members-api-reference.md @@ -0,0 +1,9 @@ +--- +sidebar_label: メンãƒãƒ¼ +title: メンãƒãƒ¼ +--- + +## メンãƒãƒ¼ä¸€è¦§ + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ãƒ“ルドプロセス中ã«`clickhouseapi.js`ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ +内容を変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`clickhouseapi.js`を編集ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/api/organizations-api-reference.md b/docs/ja/cloud/manage/api/organizations-api-reference.md new file mode 100644 index 00000000000..a78d4757fc9 --- /dev/null +++ b/docs/ja/cloud/manage/api/organizations-api-reference.md @@ -0,0 +1,8 @@ +--- +sidebar_label: 組織 +title: 組織 +--- + +## 組織ã®è©³ç´°ã‚’å–å¾—ã™ã‚‹ + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ãƒ“ルドプロセス中㫠`clickhouseapi.js` ã§ç”Ÿæˆã•ã‚Œã¾ã™ã€‚内容を変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`clickhouseapi.js` を編集ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/api/services-api-reference.md b/docs/ja/cloud/manage/api/services-api-reference.md new file mode 100644 index 00000000000..44160dc0f33 --- /dev/null +++ b/docs/ja/cloud/manage/api/services-api-reference.md @@ -0,0 +1,8 @@ +--- +sidebar_label: サービス +title: サービス +--- + +## 組織サービスã®ä¸€è¦§ + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ãƒ“ルドプロセス中㫠`clickhouseapi.js` ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ 内容を変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ `clickhouseapi.js` を編集ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/backups.md b/docs/ja/cloud/manage/backups.md new file mode 100644 index 00000000000..6f68b97c418 --- /dev/null +++ b/docs/ja/cloud/manage/backups.md @@ -0,0 +1,191 @@ +--- +sidebar_label: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— +slug: /ja/cloud/manage/backups +description: ClickHouse Cloudã§ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ç®¡ç† +keywords: [ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—, クラウドãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—, 復元] +--- + +# ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— + +:::note +ClickHouse Cloudã®ã‚µãƒ¼ãƒ“スã§`BACKUP`ã¨`RESTORE`コマンドを使用ã—ãªã„ã§ãã ã•ã„。クラウドãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯UIã‹ã‚‰ç®¡ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +データベースã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã€å®‰å…¨ãªæ–¹æ³•ã‚’æä¾›ã—ã€äºˆæœŸã—ãªã„ç†ç”±ã§ãƒ‡ãƒ¼ã‚¿ãŒå¤±ã‚ã‚ŒãŸå ´åˆã§ã‚‚ã€ã‚µãƒ¼ãƒ“スを以å‰ã®æ­£å¸¸ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—状態ã«å¾©å…ƒã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ€ã‚¦ãƒ³ã‚¿ã‚¤ãƒ ã‚’最å°é™ã«æŠ‘ãˆã€ãƒ“ジãƒã‚¹ã«é‡è¦ãªãƒ‡ãƒ¼ã‚¿ãŒæ°¸ä¹…ã«å¤±ã‚れるã“ã¨ã‚’防ãŽã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ClickHouse Cloudã§ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å‹•ä½œã€ã‚µãƒ¼ãƒ“スã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を構æˆã™ã‚‹ãŸã‚ã®ã‚ªãƒ—ションã€ãŠã‚ˆã³ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã®å¾©å…ƒæ–¹æ³•ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +## ClickHouse Cloudã§ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å‹•ä½œ + +ClickHouse Cloudã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãƒã‚§ãƒ¼ãƒ³ã‚’構æˆã™ã‚‹ã€Œãƒ•ãƒ«ã€ã¨ã€Œå¢—分ã€ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®çµ„ã¿åˆã‚ã›ã§ã™ã€‚ãƒã‚§ãƒ¼ãƒ³ã¯ãƒ•ãƒ«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å§‹ã¾ã‚Šã€ãã®å¾Œã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚ŒãŸæ™‚é–“ã«å¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒè¡Œã‚ã‚Œã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãƒã‚§ãƒ¼ãƒ³ãŒä¸€å®šã®é•·ã•ã«é”ã™ã‚‹ã¨ã€æ–°ã—ã„ãƒã‚§ãƒ¼ãƒ³ãŒé–‹å§‹ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å…¨ä½“ã®ãƒã‚§ãƒ¼ãƒ³ã¯ã€å¿…è¦ã«å¿œã˜ã¦æ–°ã—ã„サービスã«ãƒ‡ãƒ¼ã‚¿ã‚’復元ã™ã‚‹ãŸã‚ã«åˆ©ç”¨ã•ã‚Œã¾ã™ã€‚サービスã®ä¿æŒæœŸé–“(後述)をéŽãŽã‚‹ã¨ã€ç‰¹å®šã®ãƒã‚§ãƒ¼ãƒ³ã«å«ã¾ã‚Œã‚‹ã™ã¹ã¦ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ç ´æ£„ã•ã‚Œã¾ã™ã€‚ + +以下ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã§ã¯ã€å®Ÿç·šã®å››è§’å½¢ãŒãƒ•ãƒ«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を示ã—ã€ç‚¹ç·šã®å››è§’å½¢ãŒå¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を示ã—ã¦ã„ã¾ã™ã€‚実線ã®å››è§’å½¢ã§å›²ã¾ã‚ŒãŸé ˜åŸŸã¯ä¿æŒæœŸé–“を示ã—ã€ã‚¨ãƒ³ãƒ‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¡¨ç¤ºã•ã‚Œã‚‹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を示ã—ã¾ã™ã€‚以下ã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯24時間ã”ã¨ã«å®Ÿè¡Œã•ã‚Œã€2日間ä¿æŒã•ã‚Œã¾ã™ã€‚ + +Day 1ã«ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãƒã‚§ãƒ¼ãƒ³ã‚’開始ã™ã‚‹ãŸã‚ã«ãƒ•ãƒ«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒè¡Œã‚ã‚Œã¾ã™ã€‚Day 2ã«ã¯å¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒè¡Œã‚ã‚Œã€ç¾åœ¨å¾©å…ƒå¯èƒ½ãªãƒ•ãƒ«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå­˜åœ¨ã—ã¾ã™ã€‚Day 7ã¾ã§ã«ã¯ã€ãƒã‚§ãƒ¼ãƒ³å†…ã«1ã¤ã®ãƒ•ãƒ«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨6ã¤ã®å¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒã‚ã‚Šã¾ã™ã€‚ユーザーã«ã¯æœ€æ–°ã®2ã¤ã®å¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚Day 8ã«ã¯æ–°ã—ã„フルãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒè¡Œã‚ã‚Œã€Day 9ã«ã¯æ–°ã—ã„ãƒã‚§ãƒ¼ãƒ³ã«2ã¤ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒã‚る時点ã§ã€ä»¥å‰ã®ãƒã‚§ãƒ¼ãƒ³ã¯ç ´æ£„ã•ã‚Œã¾ã™ã€‚ + +![ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãƒã‚§ãƒ¼ãƒ³](./images/backup-chain.png) + +*ClickHouse Cloudã®**Production**層ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãƒãƒªã‚·ãƒ¼ã¨ä¿æŒ* + +## デフォルトãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãƒãƒªã‚·ãƒ¼ + +ClickHouse Cloudã¯ã€ã‚µãƒ¼ãƒ“スã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を毎24時間ã”ã¨ã«ä½œæˆã—ã¾ã™ã€‚**Production**サービスã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯2日間ä¿æŒã•ã‚Œã€**Development**サービスã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯1日間ä¿æŒã•ã‚Œã¾ã™ã€‚以下ã§èª¬æ˜Žã™ã‚‹ã‚ˆã†ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—スケジュールをカスタマイズã—ãªã„å ´åˆã€ã“ã‚ŒãŒã‚µãƒ¼ãƒ“スã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—スケジュールã¨ä¿æŒãƒãƒªã‚·ãƒ¼ã§ã™ã€‚ClickHouse Cloudã§ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ã¯è²»ç”¨ã¯ã‹ã‹ã‚Šã¾ã›ã‚“。 + +## カスタマイズå¯èƒ½ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— + +ClickHouse Cloudã§ã¯ã€**Production**ãŠã‚ˆã³**Dedicated**層サービスã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—スケジュールを構æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ãƒ“ジãƒã‚¹ãƒ‹ãƒ¼ã‚ºã«åŸºã¥ã„ã¦æ¬¡ã®ãƒ‡ã‚£ãƒ¡ãƒ³ã‚·ãƒ§ãƒ³ã«æ²¿ã£ã¦æ§‹æˆã§ãã¾ã™ã€‚ + +- **ä¿æŒ**: å„ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒä¿æŒã•ã‚Œã‚‹æ—¥æ•°ã€‚ä¿æŒæœŸé–“ã¯æœ€å°ã§1æ—¥ã‹ã‚‰ã€æœ€å¤§ã§30æ—¥ã¾ã§æŒ‡å®šå¯èƒ½ã§ã™ã€‚ +- **頻度**: 次回ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ã§ã®æ™‚間を指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚「12時間ã”ã¨ã€ã®é »åº¦ã®å ´åˆã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯12時間ã”ã¨ã«è¡Œã‚ã‚Œã¾ã™ã€‚頻度ã¯ã€Œ6時間ã”ã¨ã€ã‹ã‚‰ã€Œ48時間ã”ã¨ã€ã¾ã§ã€æ¬¡ã®æ™‚é–“å˜ä½ã§æŒ‡å®šã§ãã¾ã™: 6, 8, 12, 16, 20, 24, 36, 48。 +- **開始時刻**: 毎日ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—をスケジュールã—ãŸã„開始時刻を指定ã—ã¾ã™ã€‚開始時刻を指定ã™ã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã€Œé »åº¦ã€ã¯24時間ã”ã¨ã«1回ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šã•ã‚Œã¾ã™ã€‚ClickHouse Cloudã¯æŒ‡å®šã•ã‚ŒãŸé–‹å§‹æ™‚刻ã®1時間以内ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を開始ã—ã¾ã™ã€‚ + +:::note +カスタムスケジュールã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚µãƒ¼ãƒ“スã«å¯¾ã™ã‚‹ClickHouse Cloudã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãƒãƒªã‚·ãƒ¼ã‚’上書ãã—ã¾ã™ã€‚ +::: + +サービスã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—スケジュールを構æˆã™ã‚‹ã«ã¯ã€ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã®**設定**タブã«ç§»å‹•ã—ã€**ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—構æˆã®å¤‰æ›´**をクリックã—ã¾ã™ã€‚ + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ã®æ§‹æˆ + +ã“ã‚Œã«ã‚ˆã‚Šã€ä¿æŒæœŸé–“ã€é »åº¦ã€ãŠã‚ˆã³é–‹å§‹æ™‚刻ã®å€¤ã‚’é¸æŠžã§ãる別ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒé–‹ãã¾ã™ã€‚é¸æŠžã—ãŸè¨­å®šã‚’ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ä¿æŒæœŸé–“ã¨é »åº¦ã®é¸æŠž + +:::note +開始時刻ã¨é »åº¦ã¯äº’ã„ã«æŽ’ä»–çš„ã§ã™ã€‚開始時刻ãŒå„ªå…ˆã•ã‚Œã¾ã™ã€‚ +::: + +:::note +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—スケジュールã®å¤‰æ›´ã¯ã€ã‚µãƒ¼ãƒ“スã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ã‚«ãƒãƒ¼ã•ã‚Œãªã„ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒã‚ã‚‹å ´åˆã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«å¯¾ã™ã‚‹æœˆæ¬¡æ–™é‡‘ãŒä¸Šæ˜‡ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚「ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—コストã®ç†è§£ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ステータスリスト + +サービスã®è¨­å®šã—ãŸã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã«åŸºã¥ã„ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒè¡Œã‚ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æ—¥æ¬¡ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã‹ã€ã¾ãŸã¯è‡ªåˆ†ã§é¸ã‚“ã ã‚«ã‚¹ã‚¿ãƒ ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã®ã„ãšã‚Œã‹ã§ã™ã€‚利用å¯èƒ½ãªã™ã¹ã¦ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã€ã‚µãƒ¼ãƒ“スã®**ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—**タブã§è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã“ã‹ã‚‰ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã€æœŸé–“ã€ã‚µã‚¤ã‚ºã‚’確èªã§ãã¾ã™ã€‚ã¾ãŸã€**æ“作**列ã‹ã‚‰ç‰¹å®šã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を復元ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +![ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ステータスリスト](./images/backup-status-list.png) + +## ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—コストã®ç†è§£ + +ClickHouse Cloudã¯ç„¡æ–™ã§2ã¤ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ã‚ˆã‚Šå¤šãã®ãƒ‡ãƒ¼ã‚¿ã®ä¿æŒã‚„より頻ç¹ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’å¿…è¦ã¨ã™ã‚‹ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’é¸æŠžã™ã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«å¯¾ã—ã¦è¿½åŠ ã®æ–™é‡‘ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚デフォルト設定を変更ã—ãªã‘ã‚Œã°ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—コストã¯ç™ºç”Ÿã—ã¾ã›ã‚“。 + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—コストをç†è§£ã™ã‚‹ãŸã‚ã«ã¯ã€ä½¿ç”¨ç”»é¢ã‹ã‚‰ã‚µãƒ¼ãƒ“スã”ã¨ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—コストを確èªã§ãã¾ã™ï¼ˆä»¥ä¸‹ã«ç¤ºã™ã‚ˆã†ã«ï¼‰ã€‚カスタマイズã—ãŸã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã§æ•°æ—¥é–“ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå®Ÿè¡Œã•ã‚ŒãŸå¾Œã€ã‚³ã‚¹ãƒˆã®è¦‹ç©ã‚‚ã‚Šã‚’å¾—ã¦ã€æœˆæ¬¡ã‚³ã‚¹ãƒˆã‚’推測ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—使用é‡ãƒãƒ£ãƒ¼ãƒˆ](./images/backup-usage.png) + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ç·ã‚³ã‚¹ãƒˆã‚’推定ã™ã‚‹ã«ã¯ã€ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’設定ã™ã‚‹å‰ã«[料金計算機](https://clickhouse.com/pricing)ã‚’æ›´æ–°ã—ã€æœˆæ¬¡ã®ã‚³ã‚¹ãƒˆã®è¦‹ç©ã‚‚ã‚Šã‚’å¾—ã‚‹ãŸã‚ã®ä½œæ¥­ã‚‚è¡Œã£ã¦ã„ã¾ã™ã€‚コストを見ç©ã‚‚ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®å…¥åŠ›ãŒå¿…è¦ã§ã™: +- フルãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚µã‚¤ã‚º +- 希望ã™ã‚‹é »åº¦ +- 希望ã™ã‚‹ä¿æŒ +- クラウドプロãƒã‚¤ãƒ€ãƒ¼ã¨åœ°åŸŸ + +:::note +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®æŽ¨å®šã‚³ã‚¹ãƒˆã¯ã€ã‚µãƒ¼ãƒ“ス内ã®ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºãŒæ™‚é–“ã¨ã¨ã‚‚ã«å¤‰åŒ–(増加)ã™ã‚‹ã«ã¤ã‚Œã¦å¤‰ã‚ã‚‹ã“ã¨ã‚’念頭ã«ç½®ã„ã¦ãã ã•ã„。 +::: + + +## ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を復元ã™ã‚‹ + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã€å…ƒã®ã‚µãƒ¼ãƒ“スã‹ã‚‰ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå–られãŸæ—¢å­˜ã®ã‚µãƒ¼ãƒ“スã§ã¯ãªãã€æ–°ã—ã„ClickHouse Cloudサービスã«å¾©å…ƒã•ã‚Œã¾ã™ã€‚ + +**復元**ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—アイコンをクリックã—ãŸå¾Œã€æ–°ã—ã作æˆã•ã‚Œã‚‹ã‚µãƒ¼ãƒ“スã®ã‚µãƒ¼ãƒ“スåを指定ã—ã€ã“ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を復元ã§ãã¾ã™ï¼š + +![ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å¾©å…ƒ](./images/backup-restore.png) + +æ–°ã—ã„サービスã¯`Provisioning`ã¨ã„ã†ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã§ã‚µãƒ¼ãƒ“スリストã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚準備ãŒæ•´ã†ã¾ã§ï¼š + +サービスã®ãƒ—ロビジョニング中 + +## 復元ã•ã‚ŒãŸã‚µãƒ¼ãƒ“スã®åˆ©ç”¨ + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå¾©å…ƒã•ã‚Œã‚‹ã¨ã€ç¾åœ¨ã®**å…ƒã®ã‚µãƒ¼ãƒ“ス**ã¨ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å¾©å…ƒã•ã‚ŒãŸæ–°ã—ã„**復元ã•ã‚ŒãŸã‚µãƒ¼ãƒ“ス**ã®2ã¤ã®é¡žä¼¼ã—ãŸã‚µãƒ¼ãƒ“スãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å¾©å…ƒãŒå®Œäº†ã—ãŸã‚‰ã€æ¬¡ã®ã„ãšã‚Œã‹ã‚’è¡Œã†ã¹ãã§ã™ï¼š +- æ–°ã—ã„復元ã•ã‚ŒãŸã‚µãƒ¼ãƒ“スを使用ã—ã€å…ƒã®ã‚µãƒ¼ãƒ“スを削除ã—ã¾ã™ã€‚ +- æ–°ã—ã„復元ã•ã‚ŒãŸã‚µãƒ¼ãƒ“スã‹ã‚‰å…ƒã®ã‚µãƒ¼ãƒ“スã«ãƒ‡ãƒ¼ã‚¿ã‚’移行ã—ã€æ–°ã—ã„復元ã•ã‚ŒãŸã‚µãƒ¼ãƒ“スを削除ã—ã¾ã™ã€‚ + +### **æ–°ã—ã„復元ã•ã‚ŒãŸã‚µãƒ¼ãƒ“ス**を使用ã™ã‚‹ + +æ–°ã—ã„サービスを使用ã™ã‚‹ã«ã¯ã€æ¬¡ã®æ‰‹é †ã‚’実行ã—ã¾ã™ï¼š + +1. æ–°ã—ã„サービスãŒã€åˆ©ç”¨ã‚±ãƒ¼ã‚¹ã«å¿…è¦ãªIPアクセスリストã®ã‚¨ãƒ³ãƒˆãƒªã‚’æŒã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +1. æ–°ã—ã„サービスãŒå¿…è¦ãªãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +1. å…ƒã®ã‚µãƒ¼ãƒ“スを削除ã—ã¾ã™ã€‚ + +### **æ–°ã—ã„復元ã•ã‚ŒãŸã‚µãƒ¼ãƒ“ス**ã‹ã‚‰**å…ƒã®ã‚µãƒ¼ãƒ“ス**ã¸ãƒ‡ãƒ¼ã‚¿ã‚’移行ã™ã‚‹ + +æ–°ã—ã復元ã•ã‚ŒãŸã‚µãƒ¼ãƒ“スを使用ã§ããªã„ç†ç”±ãŒã‚ã‚‹å ´åˆï¼ˆãŸã¨ãˆã°ã€æ—¢å­˜ã®ã‚µãƒ¼ãƒ“スã«æŽ¥ç¶šã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„アプリケーションãŒã‚ã‚‹å ´åˆï¼‰ã€æ–°ã—ã復元ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’å…ƒã®ã‚µãƒ¼ãƒ“スã«ç§»è¡Œã™ã‚‹ã“ã¨ã‚’é¸æŠžã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã®ç§»è¡Œã¯æ¬¡ã®æ‰‹é †ã§è¡Œã†ã“ã¨ãŒã§ãã¾ã™ï¼š + +**æ–°ã—ã復元ã•ã‚ŒãŸã‚µãƒ¼ãƒ“スã¸ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã™ã‚‹** + +æ–°ã—ã„サービスã¯é€šå¸¸ã€å…ƒã®ã‚µãƒ¼ãƒ“スã¨åŒã˜IPアクセスリストã‹ã‚‰ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ã—ã¦å¾©å…ƒã•ã‚Œã¾ã™ã€‚ä»–ã®ClickHouse Cloudサービスã¸ã®æŽ¥ç¶šã¯è¨±å¯ã•ã‚Œã¦ã„ãªã„ã€ã¾ãŸã¯ã‚¢ã‚¯ã‚»ã‚¹ãŒ**Anywhere**ã¨ã—ã¦è¨±å¯ã•ã‚Œã¦ã„ãªã„é™ã‚Šã€æŽ¥ç¶šã¯è¨±å¯ã•ã‚Œã¾ã›ã‚“。一時的ã«ã©ã“ã‹ã‚‰ã§ã‚‚アクセスを許å¯ã™ã‚‹ãŸã‚ã«è¨±å¯ãƒªã‚¹ãƒˆã‚’変更ã—ã¾ã™ã€‚詳細ã¯[IPアクセスリスト](/docs/ja/cloud/security/setting-ip-filters)ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**æ–°ã—ã復元ã•ã‚ŒãŸClickHouseサービスã§ï¼ˆå¾©å…ƒã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’ホストã—ã¦ã„るシステム)** + +:::note +æ–°ã—ã„サービスã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ‘スワードをリセットã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚サービスリストã®**設定**タブã‹ã‚‰è¡Œãˆã¾ã™ã€‚ +::: + +ソーステーブル(ã“ã®ä¾‹ã§ã¯`db.table`)を読ã¿å–ã‚Šå¯èƒ½ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’追加ã—ã¾ã™ï¼š + + ```sql + CREATE USER exporter + IDENTIFIED WITH SHA256_PASSWORD BY 'password-here' + SETTINGS readonly = 1; + ``` + + ```sql + GRANT SELECT ON db.table TO exporter; + ``` + +テーブル定義をコピーã—ã¾ã™ï¼š + + ```sql + select create_table_query + from system.tables + where database = 'db' and table = 'table' + ``` + +**é€ä¿¡å…ˆã®ClickHouse Cloudシステム上ã§ï¼ˆç ´æã—ãŸãƒ†ãƒ¼ãƒ–ルãŒã‚る所)** + +é€ä¿¡å…ˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã—ã¾ã™ï¼š + ```sql + CREATE DATABASE db + ``` + +ソースã‹ã‚‰ã®`CREATE TABLE`ステートメントを使用ã—ã€é€ä¿¡å…ˆã‚’作æˆã—ã¾ã™ï¼š + +:::tip +`CREATE`ステートメントを実行ã—ãŸéš›ã«ã€`ENGINE`ã‚’`ReplicatedMergeTree`ã«å¤‰æ›´ã—ã€ãƒ‘ラメータをçœç•¥ã—ã¾ã™ã€‚ClickHouse Cloudã¯å¸¸ã«ãƒ†ãƒ¼ãƒ–ルを複数コピーã—ã€æ­£ã—ã„パラメータをæä¾›ã—ã¾ã™ã€‚ +::: + + ```sql + CREATE TABLE db.table ... + # highlight-next-line + ENGINE = ReplicatedMergeTree + ORDER BY ... + ``` + +`remoteSecure`関数を使用ã—ã¦ã€æ–°ã—ã復元ã•ã‚ŒãŸClickHouse Cloudサービスã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å…ƒã®ã‚µãƒ¼ãƒ“スã«å–ã‚Šè¾¼ã¿ã¾ã™ï¼š + + ```sql + INSERT INTO db.table SELECT * FROM + remoteSecure('source-hostname', db, table, 'exporter', 'password-here') + ``` + +データを元ã®ã‚µãƒ¼ãƒ“スã«æ­£å¸¸ã«æŒ¿å…¥ã—ãŸå¾Œã€ã‚µãƒ¼ãƒ“ス内ã®ãƒ‡ãƒ¼ã‚¿ã‚’確èªã—ã¦ãã ã•ã„。データãŒç¢ºèªå¾Œã€æ–°ã—ã„サービスã¯å‰Šé™¤ã™ã‚‹ã¹ãã§ã™ã€‚ + +## テーブルã®å‰Šé™¤è§£é™¤ã¾ãŸã¯å‰Šé™¤å–り消㗠+ +ClickHouse Cloudã¯`UNDROP`コマンドをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。テーブルを誤ã£ã¦`DROP`ã—ãŸå ´åˆã€æœ€é©ãªå¯¾ç­–ã¯æœ€å¾Œã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å¾©å…ƒã—ã€ãã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルをå†ä½œæˆã™ã‚‹ã“ã¨ã§ã™ã€‚ + +ユーザーãŒãƒ†ãƒ¼ãƒ–ルを誤ã£ã¦å‰Šé™¤ã™ã‚‹ã“ã¨ã‚’防ããŸã‚ã«ã€[`GRANT`æ–‡](/docs/ja/sql-reference/statements/grant)を使用ã—ã¦ã€ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã®[`DROP TABLE`コマンド](/docs/ja/sql-reference/statements/drop#drop-table)ã®æ¨©é™ã‚’å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã•ã‚‰ã«ã€ãƒ‡ãƒ¼ã‚¿ã®èª¤å‰Šé™¤ã‚’防ããŸã‚ã«ã€ClickHouse Cloudã§ã¯>`1TB`を超ãˆã‚‹ãƒ†ãƒ¼ãƒ–ルを削除ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。テーブルをã“ã®é–¾å€¤ã‚’超ãˆã¦å‰Šé™¤ã—ãŸã„å ´åˆã¯ã€support@clickhouse.comã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/billing.md b/docs/ja/cloud/manage/billing.md new file mode 100644 index 00000000000..68ef68673d4 --- /dev/null +++ b/docs/ja/cloud/manage/billing.md @@ -0,0 +1,200 @@ +--- +sidebar_label: æ¦‚è¦ +slug: /ja/manage/billing +title: 課金 +--- + +## 料金 + +料金情報ã«ã¤ã„ã¦ã¯ã€[ClickHouse Cloud 料金](https://clickhouse.com/pricing)ã®ãƒšãƒ¼ã‚¸ã‚’ã”覧ãã ã•ã„。請求é¡ã«å½±éŸ¿ã™ã‚‹è¦å› ã‚„ã€æ”¯å‡ºã‚’管ç†ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦çŸ¥ã‚ŠãŸã„æ–¹ã¯ã€å¼•ã続ããŠèª­ã¿ãã ã•ã„。 + +## Amazon Web Services (AWS) ã®ä¾‹ + +:::note +価格㯠AWS `us-east-1` ã®æ–™é‡‘ã‚’å映ã—ã¦ã„ã¾ã™ã€‚ +::: + +### 開発: æœˆé¡ $51 ã‹ã‚‰ + +é©ç”¨ã«æœ€é©: åˆæœŸãƒ—ロジェクト・ステージング +- 開発サービス +- 16 GiB RAM, 2 vCPU +- 1 TB データ + +#### ã“ã®ä¾‹ã®æ–™é‡‘内訳: + + | | 活動率 10% | 活動率 50% | å¸¸æ™‚ç¨¼åƒ | + |---------|-----------:|-----------:|----------:| + | コンピュート | $16 | $79 | $158 | + | ストレージ | $35 | $35 | $35 | + | åˆè¨ˆ | $51 | $114 | $193 | + +:::note +使用ディスク㌠1TB 未満ã®å ´åˆã€æ¶ˆè²»ã¯ã•ã‚‰ã«ä½Žã抑ãˆã‚‰ã‚Œã¾ã™ã€‚ +::: + +### 本番 (アイドリングã€è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°): æœˆé¡ $172 ã‹ã‚‰ + +#### é©ç”¨ã«æœ€é©: コストã«æ•æ„Ÿãªã‚¢ãƒ‰ãƒ›ãƒƒã‚¯åˆ†æžã‚¢ãƒ—リケーション +- 本番サービス +- 活動ワークロード約 25% 時間 +- デフォルト設定ã§ã®ã‚¢ã‚¤ãƒ‰ãƒªãƒ³ã‚° +- 暴走請求を防ããŸã‚ã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°æœ€å¤§å€¤è¨­å®š + +#### ã“ã®ä¾‹ã®æ–™é‡‘内訳: + + | | 例 1 | 例 2 | 例 3 | + |---------|------------------------------:|--------------------------------:|---------------------------------:| + | コンピュート | 24 GiB RAM, 6 vCPU
$125 | 192 GiB RAM, 48 vCPU
$1000 | 720 GiB RAM, 180 vCPU
$3750 | + | ストレージ | 1 TB データ
$47 | 5 TB データ
$235 | 10 TB データ
$470 | + | åˆè¨ˆ | $172 | $1,235 | $4,220 | + +### 本番 (常時稼åƒã€äºˆç´„容é‡): æœˆé¡ $550 ã‹ã‚‰â€‹ + +é©ç”¨ã«æœ€é©: レイテンシーã«æ•æ„Ÿãªã‚¢ãƒ—リケーション + +- 本番サービス +- 活動ワークロード約 100% 時間 +- 容é‡äºˆç´„ã®ãŸã‚ã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°æœ€å°å€¤è¨­å®š + +#### ã“ã®ä¾‹ã®æ–™é‡‘内訳: + + | | 例 1 | 例 2 | 例 3 | + |---------|------------------------------:|-------------------------------:|-------------------------------:| + | コンピュート | 24 GiB RAM, 6 vCPU
$503 | 96 GiB RAM, 24 vCPU
$2,012 | 360 GiB RAM, 90 vCPU
$7,545 | + | ストレージ | 1 TB データ
$47 | 4 TB データ
$188 | 8 TB データ
$376 | + | åˆè¨ˆ | $550 | $2,200 | $7,921 | + +ã•ã‚‰ãªã‚‹è¦‹ç©ã‚‚ã‚Šã®æ”¯æ´ãŒå¿…è¦ãªå ´åˆã€ã™ã§ã« ClickHouse Cloud ユーザーã§ã‚れ㰠[サãƒãƒ¼ãƒˆ](https://clickhouse.cloud/support)ã«å•ã„åˆã‚ã›ã‚‹ã‹ã€ã¾ãŸã¯ [sales@clickhouse.com](mailto:sales@clickhouse.com) ã¾ã§ã”連絡ãã ã•ã„。 + +## Google Cloud Platform (GCP) ã®ä¾‹ + +:::note +価格㯠GCP `us-central-1` ã®æ–™é‡‘ã‚’å映ã—ã¦ã„ã¾ã™ã€‚ +::: + +### 開発: æœˆé¡ $46 ã‹ã‚‰ + +é©ç”¨ã«æœ€é©: åˆæœŸãƒ—ロジェクト・ステージング +- 開発サービス +- 16 GiB RAM, 2 vCPU +- 1 TB データ + +#### ã“ã®ä¾‹ã®æ–™é‡‘内訳: + + | | 活動率 10% | 活動率 50% | å¸¸æ™‚ç¨¼åƒ | + |---------|-----------:|-----------:|----------:| + | コンピュート | $15 | $74 | $147 | + | ストレージ | $31 | $31 | $31 | + | åˆè¨ˆ | $46 | $105 | $178 | + +:::note +使用ディスク㌠1TB 未満ã®å ´åˆã€æ¶ˆè²»ã¯ã•ã‚‰ã«ä½Žã抑ãˆã‚‰ã‚Œã¾ã™ã€‚ +::: + +### 本番 (アイドリングã€è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°): æœˆé¡ $146 ã‹ã‚‰ + +#### é©ç”¨ã«æœ€é©: コストã«æ•æ„Ÿãªã‚¢ãƒ‰ãƒ›ãƒƒã‚¯åˆ†æžã‚¢ãƒ—リケーション +- 本番サービス +- 活動ワークロード約 25% 時間 +- デフォルト設定ã§ã®ã‚¢ã‚¤ãƒ‰ãƒªãƒ³ã‚° +- 暴走請求を防ããŸã‚ã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°æœ€å¤§å€¤è¨­å®š + +#### ã“ã®ä¾‹ã®æ–™é‡‘内訳: + + | | 例 1 | 例 2 | 例 3 | + |---------|------------------------------:|-------------------------------:|-------------------------------:| + | コンピュート | 24 GiB RAM, 6 vCPU
$105 | 192 GiB RAM, 48 vCPU
$843 | 720 GiB RAM, 180 vCPU
$3162 | + | ストレージ | 1 TB データ
$41 | 5 TB データ
$205 | 10 TB データ
$410 | + | åˆè¨ˆ | $146 | $1,048 | $3,572 | + +### 本番 (常時稼åƒã€äºˆç´„容é‡): æœˆé¡ $463 ã‹ã‚‰â€‹ + +é©ç”¨ã«æœ€é©: レイテンシーã«æ•æ„Ÿãªã‚¢ãƒ—リケーション + +- 本番サービス +- 活動ワークロード約 100% 時間 +- 容é‡äºˆç´„ã®ãŸã‚ã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°æœ€å°å€¤è¨­å®š + +#### ã“ã®ä¾‹ã®æ–™é‡‘内訳: + + | | 例 1 | 例 2 | 例 3 | + |---------|------------------------------:|-------------------------------:|-------------------------------:| + | コンピュート | 24 GiB RAM, 6 vCPU
$422 | 96 GiB RAM, 24 vCPU
$1,686 | 360 GiB RAM, 90 vCPU
$6,342 | + | ストレージ | 1 TB データ
$41 | 4 TB データ
$164 | 8 TB データ
$328 | + | åˆè¨ˆ | $463 | $1,850 | $6,652 | + +ã•ã‚‰ãªã‚‹è¦‹ç©ã‚‚ã‚Šã®æ”¯æ´ãŒå¿…è¦ãªå ´åˆã€ã™ã§ã« ClickHouse Cloud ユーザーã§ã‚れ㰠[サãƒãƒ¼ãƒˆ](https://clickhouse.cloud/support)ã«å•ã„åˆã‚ã›ã‚‹ã‹ã€ã¾ãŸã¯ [sales@clickhouse.com](mailto:sales@clickhouse.com) ã¾ã§ã”連絡ãã ã•ã„。 + +## FAQ + +### 計算リソースã®æ¸¬å®šæ–¹æ³•ã¯ï¼Ÿ + +ClickHouse Cloud ã¯ã€8G RAM ã”ã¨ã®å˜ä½ã§ã€1 分ã‚ãŸã‚Šã®åŸºæº–ã§è¨ˆç®—リソースを測定ã—ã¾ã™ã€‚ + +### ディスク上ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¯ã©ã®ã‚ˆã†ã«è¨ˆç®—ã•ã‚Œã¾ã™ã‹ï¼Ÿ + +ClickHouse Cloud ã¯ã‚¯ãƒ©ã‚¦ãƒ‰ã‚ªãƒ–ジェクトストレージを使用ã—ã€ClickHouse テーブルã«ä¿å­˜ã•ã‚Œã¦ã„るデータã®åœ§ç¸®ã‚µã‚¤ã‚ºã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ + +### ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯åˆè¨ˆã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«å«ã¾ã‚Œã¾ã™ã‹ï¼Ÿ + +ClickHouse Cloud ã¯ã€æœ¬ç•ªã‚µãƒ¼ãƒ“スã«ã¯ 2 ã¤ã€é–‹ç™ºã‚µãƒ¼ãƒ“スã«ã¯ 1 ã¤ã®ç„¡æ–™ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’æä¾›ã—ã¦ãŠã‚Šã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«å«ã¾ã‚Œã¾ã›ã‚“。 + +### 圧縮ã®è¦‹ç©ã‚‚ã‚Šã‚’ã©ã†è¡Œã†ã®ã§ã™ã‹ï¼Ÿ + +圧縮率ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã‚ˆã£ã¦å¤§ãã変ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚データãŒã©ã‚Œã ã‘圧縮å¯èƒ½ã§ã‚ã‚‹ã‹ï¼ˆé«˜ï¼ä½Žã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®æ•°ï¼‰ã‚„ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¹ã‚­ãƒ¼ãƒžã‚’ã©ã®ã‚ˆã†ã«è¨­å®šã™ã‚‹ã‹ï¼ˆã‚ªãƒ—ションã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã‚’使用ã™ã‚‹ã‹ã©ã†ã‹ãªã©ï¼‰ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚一般的ãªåˆ†æžãƒ‡ãƒ¼ã‚¿ã®ã‚¿ã‚¤ãƒ—ã§ã¯ 10 å€ç¨‹åº¦ã§ã™ãŒã€ã¯ã‚‹ã‹ã«ä½Žããªã‚‹å ´åˆã‚‚高ããªã‚‹å ´åˆã‚‚ã‚ã‚Šã¾ã™ã€‚ガイダンスã«ã¤ã„ã¦ã¯[最é©åŒ–](/docs/ja/guides/best-practices/asyncinserts.md)ドキュメントをå‚ç…§ã—ã¦ãã ã•ã„。データセットを ClickHouse ã«å–ã‚Šè¾¼ã¿ã€ClickHouse ã«æ ¼ç´ã•ã‚ŒãŸã‚µã‚¤ã‚ºã¨æ¯”較ã™ã‚‹ã“ã¨ãŒå”¯ä¸€ã®å®Ÿç”¨çš„ãªæ–¹æ³•ã§ã™ã€‚ + +クエリ `SELECT formatReadableSize(total_bytes) FROM system.tables WHERE name = ` を使用ã§ãã¾ã™ã€‚ + +### セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ãƒ‡ãƒ—ロイメントãŒã‚ã‚‹å ´åˆã€ã‚¯ãƒ©ã‚¦ãƒ‰ã§ã®ã‚µãƒ¼ãƒ“スé‹å–¶ã‚³ã‚¹ãƒˆã‚’見ç©ã‚‚ã‚‹ãŸã‚ã®ãƒ„ールを ClickHouse ã¯æä¾›ã—ã¦ã„ã¾ã™ã‹ï¼Ÿ + +ClickHouse クエリログã¯ã€ClickHouse Cloud ã§ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰é‹å–¶ã‚³ã‚¹ãƒˆã®è¦‹ç©ã‚‚ã‚Šã«ä½¿ç”¨ã§ãã‚‹[主è¦ãƒ¡ãƒˆãƒªã‚¯ã‚¹](/docs/ja/operations/system-tables/query_log.md)を記録ã—ã¾ã™ã€‚セルフマãƒãƒ¼ã‚¸ãƒ‰ã‹ã‚‰ ClickHouse Cloud ã¸ã®ç§»è¡Œã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[移行ドキュメント](/docs/ja/integrations/migration/clickhouse-to-cloud.md)ã‚’å‚ç…§ã—ã€ã•ã‚‰ãªã‚‹è³ªå•ãŒã‚ã‚Œã°[ClickHouse Cloud サãƒãƒ¼ãƒˆ](https://clickhouse.cloud/support)ã«é€£çµ¡ã—ã¦ãã ã•ã„。 + +### ClickHouse Cloud ã®èª²é‡‘オプションã¯ã©ã®ã‚ˆã†ãªã‚‚ã®ã§ã™ã‹ï¼Ÿ + +ClickHouse Cloud ã¯æ¬¡ã®èª²é‡‘オプションã«å¯¾å¿œã—ã¦ã„ã¾ã™: +- セルフサービスã«ã‚ˆã‚‹æœˆã”ã¨ã®æ”¯æ‰•ã„(USDã€ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰çµŒç”±ï¼‰ +- 直接販売ã«ã‚ˆã‚‹å¹´æ¬¡ï¼è¤‡æ•°å¹´å¥‘約(å‰æ‰• "ClickHouse クレジット" 経由ã€USDã€è¿½åŠ æ”¯æ‰•ã„オプションã‚り) + +### 課金サイクルã®æœŸé–“ã¯ã©ã®ãらã„ã§ã™ã‹ï¼Ÿ + +課金ã¯æœˆæ¬¡èª²é‡‘サイクルã«å¾“ã„ã€ClickHouse Cloud ã®çµ„ç¹”ãŒä½œæˆã•ã‚ŒãŸæ—¥ä»˜ãŒé–‹å§‹æ—¥ã¨ã—ã¦è¿½è·¡ã•ã‚Œã¾ã™ã€‚ + +### 本番サービスã®ã‚³ã‚¹ãƒˆç®¡ç†ã«å¯¾ã—ã€ClickHouse Cloud ã¯ã©ã®ã‚ˆã†ãªã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’æä¾›ã—ã¦ã„ã¾ã™ã‹ï¼Ÿ + +- トライアルã¨å¹´é–“コミット顧客ã«ã¯ã€æ¶ˆè²»ãŒä¸€å®šã®é–¾å€¤ã«é”ã—ãŸã¨ãã«è‡ªå‹•ãƒ¡ãƒ¼ãƒ«ã§é€šçŸ¥ã•ã‚Œã¾ã™ï¼ˆ50%ã€75%ã€90%)。 +- ClickHouse Cloud ã¯ã€è¨ˆç®—リソースã®[高度ãªã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«](/docs/ja/cloud/manage/scaling.md)を通ã˜ã¦æœ€å¤§è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°åˆ¶é™ã‚’設定ã§ãるよã†ã«ã—ã€åˆ†æžãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®é‡è¦ãªã‚³ã‚¹ãƒˆè¦å› ã«å¯¾å‡¦ã—ã¾ã™ã€‚ +- [高度ãªã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«](/docs/ja/cloud/manage/scaling.md) ã§ã¯ã€ãƒ¡ãƒ¢ãƒªåˆ¶é™ã‚’設定ã—ã€éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–時ã®ä¸€æ™‚åœæ­¢ï¼ã‚¢ã‚¤ãƒ‰ãƒªãƒ³ã‚°ã®å‹•ä½œã‚’制御ã™ã‚‹ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚ + +### 開発者å‘ã‘サービスã®ã‚³ã‚¹ãƒˆç®¡ç†ã«å¯¾ã—ã€ClickHouse Cloud ã¯ã©ã®ã‚ˆã†ãªã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’æä¾›ã—ã¦ã„ã¾ã™ã‹ï¼Ÿ + +- [高度ãªã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«](/docs/ja/cloud/manage/scaling.md) ã§ã¯ã€éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–時ã®ä¸€æ™‚åœæ­¢ï¼ã‚¢ã‚¤ãƒ‰ãƒªãƒ³ã‚°ã®å‹•ä½œã‚’制御ã§ãã¾ã™ã€‚開発者å‘ã‘サービスã§ã¯ãƒ¡ãƒ¢ãƒªå‰²ã‚Šå½“ã¦ã®èª¿æ•´ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- デフォルト設定ã§ã¯éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªæœŸé–“後ã«ã‚µãƒ¼ãƒ“スãŒä¸€æ™‚åœæ­¢ã—ã¾ã™ã€‚ + +### 複数ã®ã‚µãƒ¼ãƒ“スãŒã‚ã‚‹å ´åˆã€ã‚µãƒ¼ãƒ“スã”ã¨ã«è«‹æ±‚書ãŒç™ºè¡Œã•ã‚Œã‚‹ã®ã‹ã€ãã‚Œã¨ã‚‚åˆç®—ã•ã‚ŒãŸè«‹æ±‚書ãŒç™ºè¡Œã•ã‚Œã‚‹ã®ã‹ï¼Ÿ + +課金期間ã«ãŠã‘る特定ã®çµ„織内ã®ã™ã¹ã¦ã®ã‚µãƒ¼ãƒ“スã«å¯¾ã—ã¦ã€åˆç®—ã•ã‚ŒãŸè«‹æ±‚書ãŒç™ºè¡Œã•ã‚Œã¾ã™ã€‚ + +### クレジットカードを追加ã—ã€ãƒˆãƒ©ã‚¤ã‚¢ãƒ«æœŸé–“ã¨ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆãŒçµ‚了ã™ã‚‹å‰ã«ã‚¢ãƒƒãƒ—グレードã—ãŸå ´åˆã€èª²é‡‘ã¯ã©ã†ãªã‚Šã¾ã™ã‹ï¼Ÿ + +ユーザー㌠30 日間ã®ãƒˆãƒ©ã‚¤ã‚¢ãƒ«æœŸé–“ãŒçµ‚了ã™ã‚‹å‰ã«ãƒˆãƒ©ã‚¤ã‚¢ãƒ«ã‹ã‚‰æœ‰æ–™ã«å¤‰æ›ã—ãŸå ´åˆã€ãƒˆãƒ©ã‚¤ã‚¢ãƒ«ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã®æ®‹é¡ãŒã‚ã‚‹å ´åˆã¯ã€åˆå›žã® 30 日間ã®ãƒˆãƒ©ã‚¤ã‚¢ãƒ«æœŸé–“中ã¯ãƒˆãƒ©ã‚¤ã‚¢ãƒ«ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‹ã‚‰å¼•ãè½ã¨ã—を続ã‘ã€ãã®å¾Œã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰ã¸ã®è«‹æ±‚ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +### 支出を管ç†ã™ã‚‹ã«ã¯ã©ã†ã™ã‚Œã°è‰¯ã„ã§ã™ã‹ï¼Ÿ + +ClickHouse Cloud コンソールã«ã¯ã€ã€Œä½¿ç”¨é‡ã€è¡¨ç¤ºãŒã‚ã‚Šã€è¨ˆç®—ãŠã‚ˆã³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã”ã¨ã«å„サービスã®ä½¿ç”¨é‡ã«é–¢ã™ã‚‹è©³ç´°æƒ…報をæä¾›ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¡ãƒ¼ã‚¿ãƒ¼å˜ä½ã§ã®ã‚³ã‚¹ãƒˆå†…訳をç†è§£ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### ClickHouse Cloud サービス㮠AWS マーケットプレース購読ã«ã¤ã„ã¦ã®è«‹æ±‚書ã¯ã©ã®ã‚ˆã†ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã‹ï¼Ÿ + +ã™ã¹ã¦ã®ãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レース購読㯠AWS ã«ã‚ˆã£ã¦èª²é‡‘ãŠã‚ˆã³è«‹æ±‚ã•ã‚Œã¾ã™ã€‚請求書㯠AWS 請求ダッシュボードã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ + +### 使用é‡ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®æ—¥ä»˜ãŒ AWS マーケットプレース請求書ã®æ—¥ä»˜ã¨ä¸€è‡´ã—ãªã„ã®ã¯ãªãœã§ã™ã‹ï¼Ÿ + +AWS マーケットプレースã®è«‹æ±‚ã¯æš¦æœˆã®ã‚µã‚¤ã‚¯ãƒ«ã«å¾“ã„ã¾ã™ã€‚ãŸã¨ãˆã°ã€ä½¿ç”¨æœŸé–“㌠2022 å¹´ 12 月 1 æ—¥ã‹ã‚‰ 2023 å¹´ 1 月 1 æ—¥ã¾ã§ã®å ´åˆã€è«‹æ±‚書㯠2023 å¹´ 1 月 3 æ—¥ã‹ã‚‰ 5 æ—¥ã®é–“ã«ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +ClickHouse Cloud ã®ä½¿ç”¨é‡ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ç•°ãªã‚‹èª²é‡‘サイクルã«å¾“ã„ã€ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã®æ—¥ã‹ã‚‰ 30 日間ã«ã‚ãŸã£ã¦ä½¿ç”¨é‡ãŒæ¸¬å®šãŠã‚ˆã³å ±å‘Šã•ã‚Œã¾ã™ã€‚ + +使用é‡ã¨è«‹æ±‚書ã®æ—¥ä»˜ãŒç•°ãªã‚‹å ´åˆã€ã“れらã®æ—¥ä»˜ãŒä¸€è‡´ã—ã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚使用é‡ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ç‰¹å®šã®ã‚µãƒ¼ãƒ“スã«å¯¾ã™ã‚‹æ—¥ã”ã¨ã®ä½¿ç”¨é‡ã‚’記録ã™ã‚‹ãŸã‚ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã«ä¾å­˜ã—ã¦ã‚³ã‚¹ãƒˆå†…訳を確èªã§ãã¾ã™ã€‚ + +### å‰æ‰•ã„クレジットã®ä½¿ç”¨ã«é–¢ã—ã¦åˆ¶é™ã¯ã‚ã‚Šã¾ã™ã‹ï¼Ÿ + +ClickHouse Cloud ã®å‰æ‰•ã„クレジット(ClickHouse 直接ã¾ãŸã¯ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã®ãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レース経由)ã«ã¤ã„ã¦ã¯ã€å¥‘ç´„ã®æ¡ä»¶ã®ãŸã‚ã«ã®ã¿åˆ©ç”¨ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€å—ã‘入れ日ã¾ãŸã¯å°†æ¥ã®æ—¥ä»˜ã«é©ç”¨ã•ã‚Œã€éŽåŽ»ã®æœŸé–“ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。å‰æ‰•ã„クレジットã§ã‚«ãƒãƒ¼ã•ã‚Œãªã„超éŽåˆ†ã¯ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰æ”¯æ‰•ã„ã€ã¾ãŸã¯ãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レースã®æœˆæ¬¡è«‹æ±‚ã§ã‚«ãƒãƒ¼ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/cloud/manage/billing/marketplace/aws-marketplace-committed.md b/docs/ja/cloud/manage/billing/marketplace/aws-marketplace-committed.md new file mode 100644 index 00000000000..18a1b49314e --- /dev/null +++ b/docs/ja/cloud/manage/billing/marketplace/aws-marketplace-committed.md @@ -0,0 +1,114 @@ +--- +slug: /ja/cloud/billing/marketplace/aws-marketplace-committed-contract +title: AWS Marketplace コミットメント契約 +description: AWS Marketplace (コミットメント契約) 経由㧠ClickHouse Cloud ã«ç™»éŒ²ã™ã‚‹æ–¹æ³• +keywords: [aws, amazon, marketplace, billing, committed, committed contract] +--- + +[AWS Marketplace](https://aws.amazon.com/marketplace) を通ã˜ã¦ã‚³ãƒŸãƒƒãƒˆãƒ¡ãƒ³ãƒˆå¥‘約㧠ClickHouse Cloud を始ã‚ã¾ã—ょã†ã€‚コミットメント契約ã€ã¾ãŸã¯ãƒ—ライベートオファーã¨ã‚‚呼ã°ã‚Œã‚‹ã‚‚ã®ã¯ã€é¡§å®¢ãŒç‰¹å®šã®æœŸé–“ã«ã‚ãŸã‚Š ClickHouse Cloud ã«ä¸€å®šã®é‡‘é¡ã‚’支払ã†ã“ã¨ã‚’ç´„æŸã§ãる契約ã§ã™ã€‚ + +## å‰ææ¡ä»¶ + +- 特定ã®å¥‘ç´„æ¡ä»¶ã«åŸºã¥ã ClickHouse ã‹ã‚‰ã®ãƒ—ライベートオファー。 + +## サインアップã®æ‰‹é † + +1. プライベートオファーを確èªã—ã¦å—ç†ã™ã‚‹ãƒªãƒ³ã‚¯ãŒè¨˜è¼‰ã•ã‚ŒãŸãƒ¡ãƒ¼ãƒ«ã‚’å—ã‘å–ã‚‹ã¯ãšã§ã™ã€‚ + +
+ +AWS Marketplace プライベートオファーメール + +
+ +2. メール㮠**Review Offer** リンクをクリックã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ—ライベートオファーã®è©³ç´°ãŒè¨˜è¼‰ã•ã‚ŒãŸ AWS Marketplace ページã«ç§»å‹•ã—ã¾ã™ã€‚プライベートオファーをå—ã‘入れる際ã«ã¯ã€å¥‘約オプションã®ãƒ—ルダウンã§ãƒ¦ãƒ‹ãƒƒãƒˆæ•°ã‚’1ã«è¨­å®šã—ã¦ãã ã•ã„。 + +3. AWS ãƒãƒ¼ã‚¿ãƒ«ã§ã®è³¼èª­æ‰‹ç¶šãを完了ã—ã€**Set up your account** をクリックã—ã¾ã™ã€‚ã“ã®æ™‚点㧠ClickHouse Cloud ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã—ã€æ–°è¦ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’登録ã™ã‚‹ã‹æ—¢å­˜ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã—ã¦ãã ã•ã„。ã“ã®ã‚¹ãƒ†ãƒƒãƒ—を完了ã—ãªã„ã¨ã€AWS Marketplace サブスクリプションを ClickHouse Cloud ã¨ãƒªãƒ³ã‚¯ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 + +4. ClickHouse Cloud ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã—ãŸã‚‰ã€æ—¢å­˜ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ã‹ã€æ–°ã—ã„アカウントを登録ã—ã¦ãã ã•ã„。ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ã€ClickHouse Cloud オーガニゼーションを AWS Marketplace ã®è«‹æ±‚設定ã«æŽ¥ç¶šã™ã‚‹ãŸã‚éžå¸¸ã«é‡è¦ã§ã™ã€‚ + +
+ +ClickHouse Cloud サインインページ + +
+ +æ–°ã—ã„ ClickHouse Cloud ユーザーã®å ´åˆã¯ã€ãƒšãƒ¼ã‚¸ä¸‹éƒ¨ã® **Register** をクリックã—ã¾ã™ã€‚æ–°ã—ã„ユーザーを作æˆã—ã€ãƒ¡ãƒ¼ãƒ«ã‚’確èªã™ã‚‹ã‚ˆã†ã«æ±‚ã‚られã¾ã™ã€‚メールを確èªã—ãŸå¾Œã¯ã€ClickHouse Cloud ログインページを離れã€æ–°ã—ã„ユーザーåを使用ã—㦠[https://clickhouse.cloud](https://clickhouse.cloud) ã«ãƒ­ã‚°ã‚¤ãƒ³ã§ãã¾ã™ã€‚ + +
+ +ClickHouse Cloud æ–°è¦ç™»éŒ²ãƒšãƒ¼ã‚¸ + +
+ +æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®å ´åˆã¯ã€ãƒ“ジãƒã‚¹ã®åŸºæœ¬æƒ…報もæä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。以下ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã‚’ã”覧ãã ã•ã„。 + +
+ +ClickHouse Cloud æ–°è¦ç™»éŒ²æƒ…報フォーム + +
+ +
+ +ClickHouse Cloud æ–°è¦ç™»éŒ²æƒ…報フォーム 2 + +
+ +既存㮠ClickHouse Cloud ユーザーã®å ´åˆã¯ã€å˜ã«è³‡æ ¼æƒ…報を使用ã—ã¦ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ãã ã•ã„。 + +5. ログインãŒæˆåŠŸã™ã‚‹ã¨ã€æ–°ã—ã„ ClickHouse Cloud オーガニゼーションãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã®ã‚ªãƒ¼ã‚¬ãƒ‹ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã¯ AWS ã®è«‹æ±‚アカウントã«æŽ¥ç¶šã•ã‚Œã€ã™ã¹ã¦ã®åˆ©ç”¨ãŒ AWS アカウントを通ã˜ã¦è«‹æ±‚ã•ã‚Œã¾ã™ã€‚ + +6. ログイン後ã€è«‹æ±‚㌠AWS Marketplace ã«çµã³ã¤ã„ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã€ClickHouse Cloud リソースã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—を開始ã§ãã¾ã™ã€‚ + +
+ +AWS Marketplace ã®è«‹æ±‚を表示ã™ã‚‹ ClickHouse Cloud + +
+ +ClickHouse Cloud 新サービスページ + +
+ +6. サインアップ確èªãƒ¡ãƒ¼ãƒ«ã‚’å—ã‘å–ã‚‹ã¯ãšã§ã™ï¼š + +
+ +AWS Marketplace 確èªãƒ¡ãƒ¼ãƒ« + +
+ +何ã‹å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€ãŠæ°—軽ã«[サãƒãƒ¼ãƒˆãƒãƒ¼ãƒ ](https://clickhouse.com/support/program) ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/billing/marketplace/aws-marketplace-payg.md b/docs/ja/cloud/manage/billing/marketplace/aws-marketplace-payg.md new file mode 100644 index 00000000000..bc3df0d1b8a --- /dev/null +++ b/docs/ja/cloud/manage/billing/marketplace/aws-marketplace-payg.md @@ -0,0 +1,169 @@ +--- +slug: /ja/cloud/billing/marketplace/aws-marketplace-payg +title: AWS Marketplace PAYG +description: AWS Marketplace(PAYG)を介ã—ã¦ClickHouse Cloudã«ã‚µãƒ–スクライブã—ã¾ã™ã€‚ +keywords: [aws, marketplace, 請求, payg] +--- + +[AWS Marketplace](https://aws.amazon.com/marketplace)ã§ã®PAYG(従é‡èª²é‡‘制)パブリックオファーを通ã˜ã¦ClickHouse Cloudを始ã‚ã¾ã—ょã†ã€‚ + +## å‰ææ¡ä»¶ + +- 購入権é™ãŒè«‹æ±‚管ç†è€…ã«ã‚ˆã£ã¦æœ‰åŠ¹åŒ–ã•ã‚Œã¦ã„ã‚‹AWSアカウント。 +- 購入ã™ã‚‹ã«ã¯ã€ã“ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§AWS Marketplaceã«ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## サインアップã®æ‰‹é † + +1. [AWS Marketplace](https://aws.amazon.com/marketplace)ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã€ClickHouse Cloudを検索ã—ã¾ã™ã€‚ + +
+ +AWS Marketplace ホームページ + +
+ +2. [リスティング](https://aws.amazon.com/marketplace/pp/prodview-jettukeanwrfc)をクリックã—ã€**購入オプションã®è¡¨ç¤º**ã‚’é¸æŠžã—ã¾ã™ã€‚ + +
+ +AWS Marketplace ClickHouse 検索 + +
+ +3. 次ã®ç”»é¢ã§å¥‘約を設定ã—ã¾ã™ï¼š +- **契約ã®æœŸé–“** - PAYG契約ã¯æœˆå˜ä½ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +- **更新設定** - 契約ã®è‡ªå‹•æ›´æ–°ã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 自動更新を有効ã«ã—ãªã„å ´åˆã€çµ„ç¹”ã¯è«‹æ±‚サイクルã®çµ‚了時ã«è‡ªå‹•çš„ã«çŒ¶äºˆæœŸé–“ã«å…¥ã‚Šã€ãã®å¾Œåœæ­¢ã•ã‚Œã¾ã™ã€‚ + +- **契約オプション** - ã“ã®ãƒ†ã‚­ã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ä»»æ„ã®æ•°ï¼ˆã¾ãŸã¯1)を入力ã§ãã¾ã™ã€‚ã“れらã®å˜ä½ã®ä¾¡æ ¼ã¯ãƒ‘ブリックオファーã®å ´åˆ$0ã§ã‚ã‚‹ãŸã‚ã€ä¾¡æ ¼ã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。ã“れらã®å˜ä½ã¯é€šå¸¸ã€ClickHouse Cloudã‹ã‚‰ã®ãƒ—ライベートオファーをå—ã‘入れる際ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +- **発注書** - ã“ã‚Œã¯ä»»æ„ãªã®ã§ã€ç„¡è¦–ã—ã¦ã‚‚å•é¡Œã‚ã‚Šã¾ã›ã‚“。 + +
+ +AWS Marketplace 契約設定 + +
+ +上記ã®æƒ…報を入力ã—ãŸã‚‰ã€**契約を作æˆ**をクリックã—ã¾ã™ã€‚ 契約価格ãŒ0ドルã§è¡¨ç¤ºã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã§ãã¾ã™ãŒã€ã“ã‚Œã¯æ”¯æ‰•ã„ãŒãªã„ã“ã¨ã‚’æ„味ã—ã€ä½¿ç”¨ã«åŸºã¥ã„ã¦è«‹æ±‚ãŒç™ºç”Ÿã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ + +
+ +AWS Marketplace å¥‘ç´„ç¢ºèª + +
+ +4. **契約を作æˆ**をクリックã™ã‚‹ã¨ã€ç¢ºèªã—ã¦æ”¯æ‰•ã†ãŸã‚ã®ãƒ¢ãƒ¼ãƒ€ãƒ«ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼ˆ$0ã®æ”¯æ‰•ã„予定)。 + +5. **今ã™ã支払ã†**をクリックã™ã‚‹ã¨ã€ClickHouse Cloudã®AWS Marketplaceオファリングを購読ã—ã¦ã„ã‚‹ã“ã¨ã®ç¢ºèªãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +
+ +AWS Marketplace 支払ã„ç¢ºèª + +
+ +6. ã“ã®æ™‚点ã§ã€è¨­å®šã¯ã¾ã å®Œäº†ã—ã¦ã„ã¾ã›ã‚“。**アカウントを設定ã™ã‚‹**をクリックã—ã¦ClickHouse Cloudã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã—ã€ãã“ã§ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +7. ClickHouse Cloudã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã—ãŸã‚‰ã€æ—¢å­˜ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ã‹ã€æ–°ã—ã„アカウントを登録ã§ãã¾ã™ã€‚ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ã€AWS Marketplaceã®è«‹æ±‚ã«ClickHouse Cloudã®çµ„織をçµã³ã¤ã‘ã‚‹ãŸã‚ã«éžå¸¸ã«é‡è¦ã§ã™ã€‚ + +
+ +ClickHouse Cloud サインインページ + +
+ +æ–°ã—ã„ClickHouse Cloudユーザーã§ã‚ã‚‹å ´åˆã¯ã€ãƒšãƒ¼ã‚¸ã®ä¸‹éƒ¨ã«ã‚ã‚‹**登録**をクリックã—ã¾ã™ã€‚æ–°ã—ã„ユーザーを作æˆã—ã¦ãƒ¡ãƒ¼ãƒ«ã‚’確èªã™ã‚‹ã‚ˆã†ã«æ±‚ã‚られã¾ã™ã€‚メールを確èªã—ãŸå¾Œã€ClickHouse Cloudã®ãƒ­ã‚°ã‚¤ãƒ³ãƒšãƒ¼ã‚¸ã‹ã‚‰é›¢ã‚Œã€æ–°ã—ã„ユーザーåを使用ã—ã¦[https://clickhouse.cloud](https://clickhouse.cloud)ã§ãƒ­ã‚°ã‚¤ãƒ³ã§ãã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインアップページ + +
+ +æ–°ã—ã„ユーザーã§ã‚ã‚‹å ´åˆã¯ã€ãƒ“ジãƒã‚¹ã«é–¢ã™ã‚‹åŸºæœ¬çš„ãªæƒ…報もæä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +
+ +ClickHouse Cloud サインアップ情報フォーム2 + +
+ +既存ã®ClickHouse Cloudユーザーã§ã‚ã‚‹å ´åˆã¯ã€è³‡æ ¼æƒ…報を使用ã—ã¦ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ã ã‘ã§ã™ã€‚ + +8. ログインã«æˆåŠŸã™ã‚‹ã¨ã€æ–°ã—ã„ClickHouse Cloud組織ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã®çµ„ç¹”ã¯AWSã®è«‹æ±‚アカウントã«æŽ¥ç¶šã•ã‚Œã€ã™ã¹ã¦ã®ä½¿ç”¨ãŒAWSアカウントを通ã˜ã¦è«‹æ±‚ã•ã‚Œã¾ã™ã€‚ + +9. ログインã™ã‚‹ã¨ã€è«‹æ±‚ãŒAWS Marketplaceã«çµã³ã¤ã„ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã€ClickHouse Cloudリソースã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—を開始ã§ãã¾ã™ã€‚ + +
+ +ClickHouse Cloud AWS Marketplace è«‹æ±‚ç¢ºèª + +
+ +ClickHouse Cloud æ–°ã—ã„サービスページ + +
+ +10. サインアップ確èªã®ãƒ¡ãƒ¼ãƒ«ã‚’å—ã‘å–ã‚‹ã¯ãšã§ã™ï¼š + +
+ +AWS Marketplace 確èªãƒ¡ãƒ¼ãƒ« + +
+ +å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€[サãƒãƒ¼ãƒˆãƒãƒ¼ãƒ ](https://clickhouse.com/support/program)ã«ãŠæ°—軽ã«ã”連絡ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/billing/marketplace/azure-marketplace-committed.md b/docs/ja/cloud/manage/billing/marketplace/azure-marketplace-committed.md new file mode 100644 index 00000000000..555daacca51 --- /dev/null +++ b/docs/ja/cloud/manage/billing/marketplace/azure-marketplace-committed.md @@ -0,0 +1,174 @@ +--- +slug: /ja/cloud/billing/marketplace/azure-marketplace-committed-contract +title: Azure Marketplace コミットメント契約 +description: コミットメント契約を通ã˜ã¦ Azure Marketplace 㧠ClickHouse Cloud ã«ç™»éŒ² +keywords: [Microsoft, Azure, Marketplace, 請求, コミットメント, コミットメント契約] +--- + +[Azure Marketplace](https://azuremarketplace.microsoft.com/en-us/marketplace/apps)ã§ã‚³ãƒŸãƒƒãƒˆãƒ¡ãƒ³ãƒˆå¥‘約を通ã˜ã¦ClickHouse Cloudを始ã‚ã¾ã—ょã†ã€‚コミットメント契約ã€ã¾ãŸã¯ãƒ—ライベートオファーã¨ã‚‚呼ã°ã‚Œã‚‹ã“ã®å¥‘ç´„ã§ã¯ã€ä¸€å®šæœŸé–“中ã«ClickHouse Cloud ã«ä¸€å®šé¡ã‚’支払ã†ã“ã¨ã‚’ãŠå®¢æ§˜ãŒç´„æŸã—ã¾ã™ã€‚ + +## å‰ææ¡ä»¶ + +- 特定ã®å¥‘ç´„æ¡ä»¶ã«åŸºã¥ãClickHouseã‹ã‚‰ã®ãƒ—ライベートオファー。 + +## 登録手順 + +1. プライベートオファーを確èªã—ã¦å—ã‘入れるãŸã‚ã®ãƒªãƒ³ã‚¯ãŒè¨˜è¼‰ã•ã‚ŒãŸãƒ¡ãƒ¼ãƒ«ã‚’å—ã‘å–ã£ã¦ã„ã‚‹ã¯ãšã§ã™ã€‚ + +
+ +Azure Marketplace プライベートオファーã®ãƒ¡ãƒ¼ãƒ« + +
+ +2. メール内ã®**プライベートオファーを確èª**リンクをクリックã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ—ライベートオファーã®è©³ç´°ãŒè¡¨ç¤ºã•ã‚ŒãŸGCP Marketplaceã®ãƒšãƒ¼ã‚¸ã«ç§»å‹•ã—ã¾ã™ã€‚ + +
+ +Azure Marketplace プライベートオファーã®è©³ç´° + +
+ +3. オファーをå—ã‘入れるã¨ã€**プライベートオファー管ç†**ç”»é¢ã«ç§»å‹•ã—ã¾ã™ã€‚Azureã¯è³¼å…¥æº–å‚™ã«å°‘ã—時間ãŒã‹ã‹ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +
+ +Azure Marketplace プライベートオファー管ç†ãƒšãƒ¼ã‚¸ + +
+ +Azure Marketplace プライベートオファー管ç†ãƒšãƒ¼ã‚¸ã®èª­ã¿è¾¼ã¿ä¸­ + +
+ +4. 数分後ã«ãƒšãƒ¼ã‚¸ã‚’リフレッシュã—ã¾ã™ã€‚オファーãŒ**購入**å¯èƒ½ã«ãªã£ã¦ã„ã‚‹ã¯ãšã§ã™ã€‚ + +
+ +Azure Marketplace プライベートオファー管ç†ãƒšãƒ¼ã‚¸ è³¼å…¥å¯ + +
+ +5. **購入**をクリックã™ã‚‹ã¨ã€ãƒ•ãƒ©ã‚¤ã‚¢ã‚¦ãƒˆãŒé–‹ãã¾ã™ã€‚次ã®ã“ã¨ã‚’完了ã—ã¦ãã ã•ã„: + +
+ +- サブスクリプションã¨ãƒªã‚½ãƒ¼ã‚¹ã‚°ãƒ«ãƒ¼ãƒ— +- SaaSサブスクリプションã®åå‰ã‚’æä¾› +- プライベートオファーãŒè¨­å®šã•ã‚ŒãŸèª²é‡‘プランをé¸æŠžã—ã¾ã™ã€‚プライベートオファーãŒä½œæˆã•ã‚ŒãŸæœŸé–“ã®ã¿ï¼ˆé‡‘é¡ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼ˆä¾‹: 1年)。他ã®èª²é‡‘期間オプションã«ã¯$0ã®é‡‘é¡ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼‰ã€‚ +- 定期課金ã®æœ‰ç„¡ã‚’é¸æŠžã—ã¾ã™ã€‚定期課金ãŒé¸æŠžã•ã‚Œã¦ã„ãªã„å ´åˆã€å¥‘ç´„ã¯è«‹æ±‚期間ã®çµ‚ã‚ã‚Šã«çµ‚了ã—ã€ãƒªã‚½ãƒ¼ã‚¹ã¯å»ƒæ­¢äºˆå®šã¨ãªã‚Šã¾ã™ã€‚ +- **レビューã—ã¦ã‚µãƒ–スクライブ**をクリックã—ã¾ã™ã€‚ + +
+ +Azure Marketplace サブスクリプションフォーム + +
+ +6. 次ã®ç”»é¢ã§ã€ã™ã¹ã¦ã®è©³ç´°ã‚’確èªã—ã€**サブスクライブ**を押ã—ã¾ã™ã€‚ + +
+ +Azure Marketplace ã‚µãƒ–ã‚¹ã‚¯ãƒªãƒ—ã‚·ãƒ§ãƒ³ç¢ºèª + +
+ +7. 次ã®ç”»é¢ã§ã¯ã€**SaaSサブスクリプションã¯é€²è¡Œä¸­ã§ã™**ã¨ã„ã†ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +
+ +Azure Marketplace サブスクリプションé€ä¿¡ãƒšãƒ¼ã‚¸ + +
+ +8. 準備ãŒæ•´ã£ãŸã‚‰ã€**今ã™ãアカウントを構æˆ**をクリックã—ã¾ã™ã€‚ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯é‡è¦ã§ã™ã€‚Azureã®ã‚µãƒ–スクリプションをãŠå®¢æ§˜ã®ClickHouse Cloud組織ã«çµã³ã¤ã‘る役割を果ãŸã—ã¾ã™ã€‚ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ãŒãªã„ã¨ã€Marketplaceã®ã‚µãƒ–スクリプションã¯å®Œäº†ã—ã¾ã›ã‚“。 + +
+ +Azure Marketplace アカウント構æˆä»Šã™ãボタン + +
+ +9. ClickHouse Cloudã®ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã¾ãŸã¯ã‚µã‚¤ãƒ³ã‚¤ãƒ³ãƒšãƒ¼ã‚¸ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•ã‚Œã¾ã™ã€‚æ–°ã—ã„アカウントを使用ã—ã¦ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã™ã‚‹ã‹ã€æ—¢å­˜ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’使用ã—ã¦ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã§ãã¾ã™ã€‚サインインãŒå®Œäº†ã™ã‚‹ã¨ã€Azure Marketplaceを通ã˜ã¦è«‹æ±‚ã•ã‚Œã€ä½¿ç”¨å¯èƒ½ãªæ–°ã—ã„組織ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +10. ã„ãã¤ã‹ã®è³ªå•ã«ç­”ãˆã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚次ã®ã‚¹ãƒ†ãƒƒãƒ—ã«é€²ã‚€å‰ã«ã€ä½æ‰€ã‚„会社ã®è©³ç´°ã‚’入力ã—ã¦ãã ã•ã„。 + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +ClickHouse Cloud サインアップ情報フォーム 2 + +
+ +11. **サインアップを完了**をクリックã™ã‚‹ã¨ã€ClickHouse Cloud内ã®çµ„ç¹”ã«ç§»å‹•ã—ã€Azure Marketplaceを通ã˜ã¦èª²é‡‘ã•ã‚Œã‚‹ã“ã¨ã‚’確èªã§ãã€ã‚µãƒ¼ãƒ“スを作æˆã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +
+ +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€[サãƒãƒ¼ãƒˆãƒãƒ¼ãƒ ](https://clickhouse.com/support/program) ã«ãŠæ°—軽ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/billing/marketplace/azure-marketplace-payg.md b/docs/ja/cloud/manage/billing/marketplace/azure-marketplace-payg.md new file mode 100644 index 00000000000..c396b699bd1 --- /dev/null +++ b/docs/ja/cloud/manage/billing/marketplace/azure-marketplace-payg.md @@ -0,0 +1,187 @@ +--- +slug: /ja/cloud/billing/marketplace/azure-marketplace-payg +title: Azure Marketplace PAYG +description: Azure Marketplace (PAYG) を通ã˜ã¦ ClickHouse Cloud ã«ç™»éŒ²ã™ã‚‹æ–¹æ³•ã€‚ +keywords: [azure, marketplace, 課金, payg] +--- + +[Azure Marketplace](https://azuremarketplace.microsoft.com/en-us/marketplace/apps) ã§ã€ŒPAYG (Pay-as-you-go)ã€ã®ãƒ‘ブリックオファーを利用ã—㦠ClickHouse Cloud を始ã‚ã¾ã—ょã†ã€‚ + +## å‰ææ¡ä»¶ + +- ã‚ãªãŸã®èª²é‡‘管ç†è€…ã«ã‚ˆã£ã¦è³¼å…¥æ¨©é™ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹ Azure プロジェクト。 +- Azure Marketplace 㧠ClickHouse Cloud を購読ã™ã‚‹ã«ã¯ã€è³¼å…¥æ¨©é™ã®ã‚るアカウントã§ãƒ­ã‚°ã‚¤ãƒ³ã—ã€é©åˆ‡ãªãƒ—ロジェクトをé¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +1. [Azure Marketplace](https://azuremarketplace.microsoft.com/en-us/marketplace/apps) ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã€ClickHouse Cloud を検索ã—ã¦ãã ã•ã„。マーケットプレースã§ã‚ªãƒ•ã‚¡ãƒ¼ã‚’購入ã§ãるよã†ã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +2. 製å“リストページã§ã€**Get It Now** をクリックã—ã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +3. 次ã®ç”»é¢ã§ã€åå‰ã€ãƒ¡ãƒ¼ãƒ«ã€æ‰€åœ¨åœ°ã®æƒ…報をæä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +4. 次ã®ç”»é¢ã§ã€**Subscribe** をクリックã—ã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +5. 次ã®ç”»é¢ã§ã€ã‚µãƒ–スクリプションã€ãƒªã‚½ãƒ¼ã‚¹ã‚°ãƒ«ãƒ¼ãƒ—ã€ãŠã‚ˆã³ãƒªã‚½ãƒ¼ã‚¹ã‚°ãƒ«ãƒ¼ãƒ—ã®å ´æ‰€ã‚’é¸æŠžã—ã¾ã™ã€‚リソースグループã®å ´æ‰€ã¯ã€ClickHouse Cloud ã§ã‚µãƒ¼ãƒ“スを起動ã™ã‚‹äºˆå®šã®å ´æ‰€ã¨åŒã˜ã§ã‚ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +6. サブスクリプションã®åå‰ã‚’æä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€åˆ©ç”¨å¯èƒ½ãªã‚ªãƒ—ションã‹ã‚‰èª²é‡‘æ¡ä»¶ã‚’é¸æŠžã—ã¾ã™ã€‚**Recurring billing** をオンã¾ãŸã¯ã‚ªãƒ•ã«è¨­å®šã§ãã¾ã™ã€‚オフã«è¨­å®šã™ã‚‹ã¨ã€èª²é‡‘æ¡ä»¶ãŒçµ‚了ã—ãŸæ™‚点ã§å¥‘ç´„ãŒçµ‚了ã—ã€ãƒªã‚½ãƒ¼ã‚¹ãŒå»ƒæ­¢ã•ã‚Œã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +7. **"Review + subscribe"** をクリックã—ã¾ã™ã€‚ + +8. 次ã®ç”»é¢ã§ã€ã™ã¹ã¦ãŒæ­£ã—ã„ã“ã¨ã‚’確èªã—ã€**Subscribe** をクリックã—ã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +9. ã“ã®æ™‚点ã§ã€ClickHouse Cloud ã® Azure サブスクリプションã«ç™»éŒ²ã•ã‚Œã¦ã„ã¾ã™ãŒã€ClickHouse Cloud アカウントã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã¯ã¾ã è¡Œã‚ã‚Œã¦ã„ã¾ã›ã‚“。ã“ã®æ¬¡ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ã€ClickHouse Cloud ㌠Azure サブスクリプションã«ãƒã‚¤ãƒ³ãƒ‰ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã‚ã‚Šã€Azure マーケットプレイスを通ã˜ã¦æ­£ã—ã課金ã•ã‚Œã‚‹ãŸã‚ã«é‡è¦ã§ã™ã€‚ + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +10. Azure ã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ãŒå®Œäº†ã™ã‚‹ã¨ã€**Configure account now** ボタンãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«ãªã‚Šã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +11. **Configure account now** をクリックã—ã¾ã™ã€‚ + +
+ +アカウントã®è¨­å®šã«é–¢ã™ã‚‹è©³ç´°ã‚’記載ã—ãŸä»¥ä¸‹ã®ã‚ˆã†ãªãƒ¡ãƒ¼ãƒ«ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +12. ClickHouse Cloud ã®ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã¾ãŸã¯ã‚µã‚¤ãƒ³ã‚¤ãƒ³ãƒšãƒ¼ã‚¸ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•ã‚Œã¾ã™ã€‚æ–°ã—ã„アカウントを使用ã—ã¦ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã™ã‚‹ã‹ã€æ—¢å­˜ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’使用ã—ã¦ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚サインインãŒå®Œäº†ã™ã‚‹ã¨ã€Azure Marketplace を介ã—ã¦è«‹æ±‚ã•ã‚Œã‚‹æº–å‚™ãŒæ•´ã£ãŸæ–°ã—ã„組織ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +13. 続行ã™ã‚‹å‰ã«ã€ä½æ‰€ã‚„会社ã®è©³ç´°ã«é–¢ã™ã‚‹ã„ãã¤ã‹ã®è³ªå•ã«ç­”ãˆã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +ClickHouse Cloud サインアップ情報フォーム 2 + +
+ +14. **Complete sign up** をクリックã™ã‚‹ã¨ã€ClickHouse Cloud 内ã®çµ„ç¹”ã«ç§»å‹•ã—ã€Azure Marketplace 経由ã§è«‹æ±‚ã•ã‚Œã‚‹ã“ã¨ã‚’確èªã—ã€ã‚µãƒ¼ãƒ“スを作æˆã§ãる請求画é¢ã‚’表示ã§ãã¾ã™ã€‚ + +
+ +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +15. ã‚‚ã—å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€é æ…®ãªã[サãƒãƒ¼ãƒˆãƒãƒ¼ãƒ ](https://clickhouse.com/support/program)ã¾ã§ã”連絡ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/billing/marketplace/gcp-marketplace-committed.md b/docs/ja/cloud/manage/billing/marketplace/gcp-marketplace-committed.md new file mode 100644 index 00000000000..f253a2206e4 --- /dev/null +++ b/docs/ja/cloud/manage/billing/marketplace/gcp-marketplace-committed.md @@ -0,0 +1,179 @@ +--- +slug: /ja/cloud/billing/marketplace/gcp-marketplace-committed-contract +title: GCP Marketplace コミット契約 +description: GCP Marketplaceを通ã˜ã¦ClickHouse Cloudã«ã‚µãƒ–スクライブã™ã‚‹ï¼ˆã‚³ãƒŸãƒƒãƒˆå¥‘約) +keywords: [gcp, google, marketplace, billing, committed, committed contract] +--- + +[GCP Marketplace](https://console.cloud.google.com/marketplace)を通ã˜ã¦ClickHouse Cloudを利用ã™ã‚‹ã«ã¯ã€ã‚³ãƒŸãƒƒãƒˆå¥‘ç´„ã‚’è¡Œã„ã¾ã™ã€‚コミット契約ã¯ãƒ—ライベートオファーã¨ã‚‚呼ã°ã‚Œã€ä¸€å®šæœŸé–“ã€ClickHouse Cloudã«å¯¾ã—ã¦ä¸€å®šé¡ã‚’支出ã™ã‚‹ã“ã¨ã‚’コミットã™ã‚‹å¥‘ç´„ã§ã™ã€‚ + +## å‰ææ¡ä»¶ + +- 特定ã®å¥‘ç´„æ¡ä»¶ã«åŸºã¥ãClickHouseã‹ã‚‰ã®ãƒ—ライベートオファー。 + +## 登録手順 + +1. プライベートオファーã®ãƒ¬ãƒ“ューã¨æ‰¿èªã‚’求ã‚られるメールをå—ä¿¡ã—ã¦ã„ã‚‹ã¯ãšã§ã™ã€‚ + +
+ +GCP Marketplace プライベートオファーã®ãƒ¡ãƒ¼ãƒ« + +
+ +2. メール内ã®**オファーをレビュー**リンクをクリックã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ—ライベートオファーã®è©³ç´°ã‚’å«ã‚€GCP Marketplaceページã«é·ç§»ã—ã¾ã™ã€‚ + +
+ +GCP Marketplace オファーã®æ¦‚è¦ + +
+ +GCP Marketplace 価格ã®æ¦‚è¦ + +
+ +3. プライベートオファーã®è©³ç´°ã‚’レビューã—ã€å•é¡ŒãŒãªã‘ã‚Œã°**承èª**をクリックã—ã¾ã™ã€‚ + +
+ +GCP Marketplace 承èªãƒšãƒ¼ã‚¸ + +
+ +4. **製å“ページã«ç§»å‹•**をクリックã—ã¾ã™ã€‚ + +
+ +GCP Marketplace 承èªç¢ºèª + +
+ +5. **プロãƒã‚¤ãƒ€ã§ç®¡ç†**をクリックã—ã¾ã™ã€‚ + +
+ +GCP Marketplace ClickHouse Cloudページ + +
+ +ã“ã“ã§ClickHouse Cloudã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã—ã€ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã¾ãŸã¯ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã‚’è¡Œã†ã“ã¨ãŒä¸å¯æ¬ ã§ã™ã€‚ã“ã®ã‚¹ãƒ†ãƒƒãƒ—を完了ã—ãªã„ã¨ã€GCP Marketplaceã®ã‚µãƒ–スクリプションをClickHouse Cloudã«ãƒªãƒ³ã‚¯ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 + +
+ +GCP Marketplace サイト離脱確èªãƒ¢ãƒ¼ãƒ€ãƒ« + +
+ +6. ClickHouse Cloudã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•ã‚Œã‚‹ã¨ã€æ—¢å­˜ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ã‹ã€æ–°ã—ã„アカウントを登録ã§ãã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインインページ + +
+ +æ–°ã—ã„ClickHouse Cloudユーザーã®å ´åˆã¯ã€ãƒšãƒ¼ã‚¸ä¸‹éƒ¨ã®**登録**をクリックã—ã¦ãã ã•ã„。新ã—ã„ユーザーを作æˆã—ã€ãƒ¡ãƒ¼ãƒ«ã‚’確èªã™ã‚‹ã‚ˆã†ã«ä¿ƒã•ã‚Œã¾ã™ã€‚メールを確èªã—ãŸå¾Œã€ClickHouse Cloudã®ãƒ­ã‚°ã‚¤ãƒ³ãƒšãƒ¼ã‚¸ã‚’離れã€æ–°ã—ã„ユーザーåを使用ã—ã¦[https://clickhouse.cloud](https://clickhouse.cloud)ã§ãƒ­ã‚°ã‚¤ãƒ³ã§ãã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインアップページ + +
+ +æ–°ã—ã„ユーザーã®å ´åˆã€ãƒ“ジãƒã‚¹ã«é–¢ã™ã‚‹åŸºæœ¬æƒ…報もæä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +ClickHouse Cloud サインアップ情報フォーム 2 + +
+ +既存ã®ClickHouse Cloudユーザーã®å ´åˆã¯ã€è³‡æ ¼æƒ…報を使用ã—ã¦ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ã ã‘ã§ã™ã€‚ + +7. ログインã«æˆåŠŸã™ã‚‹ã¨ã€æ–°ã—ã„ClickHouse Cloud組織ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã®çµ„ç¹”ã¯GCP課金アカウントã¨æŽ¥ç¶šã•ã‚Œã€ã™ã¹ã¦ã®ä½¿ç”¨é‡ãŒGCPアカウントを通ã˜ã¦èª²é‡‘ã•ã‚Œã¾ã™ã€‚ + +8. ログイン後ã€èª²é‡‘ãŒGCP Marketplaceã«ç¢ºå®Ÿã«çµã³ä»˜ã‘られã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã€ClickHouse Cloudリソースã®è¨­å®šã‚’開始ã§ãã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインインページ + +
+ +ClickHouse Cloud 新サービスページ + +
+ +9. サインアップã®ç¢ºèªãƒ¡ãƒ¼ãƒ«ãŒé€ä¿¡ã•ã‚Œã‚‹ã¯ãšã§ã™ï¼š + +
+
+ +GCP Marketplace 確èªãƒ¡ãƒ¼ãƒ« + +
+ +
+ +å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€[サãƒãƒ¼ãƒˆãƒãƒ¼ãƒ ](https://clickhouse.com/support/program)ã«ãŠæ°—軽ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/billing/marketplace/gcp-marketplace-payg.md b/docs/ja/cloud/manage/billing/marketplace/gcp-marketplace-payg.md new file mode 100644 index 00000000000..5232e1b69fd --- /dev/null +++ b/docs/ja/cloud/manage/billing/marketplace/gcp-marketplace-payg.md @@ -0,0 +1,155 @@ +--- +slug: /ja/cloud/billing/marketplace/gcp-marketplace-payg +title: GCP Marketplace PAYG +description: GCP Marketplace 㧠ClickHouse Cloud ã« PAYG å½¢å¼ã§ã‚µãƒ–スクライブã™ã‚‹ã€‚ +keywords: [gcp, marketplace, billing, payg] +--- + +[GCP Marketplace](https://console.cloud.google.com/marketplace) を通ã˜ã¦ã€PAYG(従é‡èª²é‡‘制)公開オファー㧠ClickHouse Cloud を始ã‚ã¾ã—ょã†ã€‚ + +## å‰ææ¡ä»¶ + +- 請求管ç†è€…ã«ã‚ˆã£ã¦è³¼å…¥æ¨©é™ãŒæœ‰åŠ¹åŒ–ã•ã‚ŒãŸ GCP プロジェクト。 +- GCP Marketplace 㧠ClickHouse Cloud ã«ã‚µãƒ–スクライブã™ã‚‹ã«ã¯ã€è³¼å…¥æ¨©é™ã‚’æŒã£ãŸã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§ãƒ­ã‚°ã‚¤ãƒ³ã—ã€é©åˆ‡ãªãƒ—ロジェクトをé¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## 申ã—è¾¼ã¿æ‰‹é † + +1. [GCP Marketplace](https://cloud.google.com/marketplace) ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã€ClickHouse Cloud を検索ã—ã¾ã™ã€‚é©åˆ‡ãªãƒ—ロジェクトãŒé¸æŠžã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +
+ +GCP Marketplace ホームページ + +
+ +2. [リスト](https://console.cloud.google.com/marketplace/product/clickhouse-public/clickhouse-cloud)をクリックã—ã€**購読** ボタンを押ã—ã¾ã™ã€‚ + +
+ +GCP Marketplace ã® ClickHouse Cloud + +
+ +3. 次ã®ç”»é¢ã§ã‚µãƒ–スクリプションを設定ã—ã¾ã™ï¼š + +- プランã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ "ClickHouse Cloud" ã«ãªã‚Šã¾ã™ +- サブスクリプション期間㯠"月次" +- é©åˆ‡ãªèª²é‡‘アカウントをé¸æŠž +- 利用æ¡ä»¶ã‚’確èªã—ã€**購読** ボタンをクリック + +
+ +GCP Marketplace ã§ã®ã‚µãƒ–スクリプション設定 + +
+ +4. **購読** をクリックã™ã‚‹ã¨ã€**ClickHouse ã¸ã®ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—** ã¨ã„ã†ãƒ¢ãƒ¼ãƒ€ãƒ«ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +
+ +GCP Marketplace サインアップモーダル + +
+ +5. ã“ã“ã§è¨­å®šã¯ã¾ã å®Œäº†ã—ã¦ã„ã¾ã›ã‚“。**アカウントを設定** をクリックã—㦠ClickHouse Cloud ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã—ã€ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—を完了ã—ã¦ãã ã•ã„。 + +6. ClickHouse Cloud ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã—ãŸã‚‰ã€æ—¢å­˜ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ã‹ã€æ–°ã—ã„アカウントã§ç™»éŒ²ã—ã¾ã™ã€‚ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ã€ClickHouse Cloud ã®çµ„織を GCP Marketplace ã®è«‹æ±‚ã«ç´ä»˜ã‘ã‚‹ãŸã‚ã«éžå¸¸ã«é‡è¦ã§ã™ã€‚ + +
+ +ClickHouse Cloud サインインページ + +
+ +æ–°ã—ã„ ClickHouse Cloud ユーザーã®å ´åˆã¯ã€ãƒšãƒ¼ã‚¸ä¸‹éƒ¨ã® **登録** をクリックã—ã¾ã™ã€‚æ–°ã—ã„ユーザーを作æˆã—ã€ãƒ¡ãƒ¼ãƒ«ã‚’確èªã™ã‚‹ã‚ˆã†ã«ä¿ƒã•ã‚Œã¾ã™ã€‚メールを確èªã—ãŸå¾Œã¯ã€ClickHouse Cloud ã®ãƒ­ã‚°ã‚¤ãƒ³ãƒšãƒ¼ã‚¸ã‚’é–‰ã˜ã€[https://clickhouse.cloud](https://clickhouse.cloud) ã§æ–°ã—ã„ユーザーåを使用ã—ã¦ãƒ­ã‚°ã‚¤ãƒ³ã§ãã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインアップページ + +
+ +æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®å ´åˆã€äº‹æ¥­ã«é–¢ã™ã‚‹åŸºæœ¬çš„ãªæƒ…報をæä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。以下ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +
+ +ClickHouse Cloud サインアップ情報フォーム + +
+ +ClickHouse Cloud サインアップ情報フォーム 2 + +
+ +既存㮠ClickHouse Cloud ユーザーã§ã‚ã‚Œã°ã€å˜ã«èªè¨¼æƒ…報を使用ã—ã¦ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚ + +7. ログインãŒæˆåŠŸã™ã‚‹ã¨ã€æ–°ã—ã„ ClickHouse Cloud ã®çµ„ç¹”ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã®çµ„織㯠GCP ã®è«‹æ±‚アカウントã«æŽ¥ç¶šã•ã‚Œã€ã™ã¹ã¦ã®ä½¿ç”¨é‡ãŒ GCP アカウントを通ã˜ã¦è«‹æ±‚ã•ã‚Œã¾ã™ã€‚ + +8. ログイン後ã«ã€è«‹æ±‚㌠GCP Marketplace ã«ç´ä»˜ã‘られã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã€ClickHouse Cloud ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’設定ã—始ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +
+ +ClickHouse Cloud サインインページ + +
+ +ClickHouse Cloud æ–°ã—ã„サービスページ + +
+ +9. サインアップを確èªã™ã‚‹ãƒ¡ãƒ¼ãƒ«ã‚’å—ã‘å–ã‚‹ã¯ãšã§ã™: + +
+
+ +GCP Marketplace 確èªãƒ¡ãƒ¼ãƒ« + +
+ +
+ +å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€ã©ã†ãž [サãƒãƒ¼ãƒˆãƒãƒ¼ãƒ ](https://clickhouse.com/support/program) ã¾ã§ã”連絡ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-committed-1.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-committed-1.png new file mode 100644 index 00000000000..85bb249999e Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-committed-1.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-1.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-1.png new file mode 100644 index 00000000000..e66938a4032 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-1.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-10.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-10.png new file mode 100644 index 00000000000..5ffa405fa97 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-10.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-11.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-11.png new file mode 100644 index 00000000000..a35707d9553 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-11.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-12.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-12.png new file mode 100644 index 00000000000..5444fc098dd Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-12.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-2.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-2.png new file mode 100644 index 00000000000..53331473a2c Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-2.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-3.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-3.png new file mode 100644 index 00000000000..fae6dfde6fd Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-3.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-4.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-4.png new file mode 100644 index 00000000000..270e8416a28 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-4.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-5.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-5.png new file mode 100644 index 00000000000..a78f24ed126 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-5.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-6.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-6.png new file mode 100644 index 00000000000..83da15ef569 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-6.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-7.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-7.png new file mode 100644 index 00000000000..eed74cc64da Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-7.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-8.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-8.png new file mode 100644 index 00000000000..6b344256b9a Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-8.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-9.png b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-9.png new file mode 100644 index 00000000000..d31fe6cab73 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/aws-marketplace-payg-9.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-1.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-1.png new file mode 100644 index 00000000000..ecb8b673fff Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-1.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-2.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-2.png new file mode 100644 index 00000000000..01d5d8af8ca Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-2.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-3.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-3.png new file mode 100644 index 00000000000..2db001f79e9 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-3.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-4.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-4.png new file mode 100644 index 00000000000..2d2b30fa3af Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-4.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-5.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-5.png new file mode 100644 index 00000000000..dfaf3887e1e Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-5.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-6.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-6.png new file mode 100644 index 00000000000..bb091fcb35a Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-6.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-7.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-7.png new file mode 100644 index 00000000000..ed3527f2fe5 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-7.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-8.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-8.png new file mode 100644 index 00000000000..a5ee3c6fdcb Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-8.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-9.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-9.png new file mode 100644 index 00000000000..8d0e32998f8 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-committed-9.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-1.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-1.png new file mode 100644 index 00000000000..b01014470cc Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-1.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-10.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-10.png new file mode 100644 index 00000000000..067161e54da Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-10.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-11.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-11.png new file mode 100644 index 00000000000..c0375474cc2 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-11.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-12.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-12.png new file mode 100644 index 00000000000..f1fb00ee790 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-12.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-2.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-2.png new file mode 100644 index 00000000000..24cebeb8bf5 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-2.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-3.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-3.png new file mode 100644 index 00000000000..abf8fccfcb8 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-3.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-4.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-4.png new file mode 100644 index 00000000000..993270f861c Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-4.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-5.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-5.png new file mode 100644 index 00000000000..1410ba80ee1 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-5.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-6.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-6.png new file mode 100644 index 00000000000..c96297ed13f Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-6.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-7.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-7.png new file mode 100644 index 00000000000..db13f7e369e Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-7.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-8.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-8.png new file mode 100644 index 00000000000..04961189abe Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-8.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-9.png b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-9.png new file mode 100644 index 00000000000..2c2926b51e1 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/azure-marketplace-payg-9.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-1.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-1.png new file mode 100644 index 00000000000..8a33fe48e06 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-1.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-2.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-2.png new file mode 100644 index 00000000000..a29bc20bc71 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-2.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-3.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-3.png new file mode 100644 index 00000000000..122609794eb Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-3.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-4.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-4.png new file mode 100644 index 00000000000..1502dc6fd5e Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-4.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-5.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-5.png new file mode 100644 index 00000000000..f6558cc919d Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-5.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-6.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-6.png new file mode 100644 index 00000000000..72786e05bd1 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-6.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-7.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-7.png new file mode 100644 index 00000000000..c592e055fbf Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-committed-7.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-1.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-1.png new file mode 100644 index 00000000000..8d0041f565b Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-1.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-2.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-2.png new file mode 100644 index 00000000000..3906d1181d4 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-2.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-3.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-3.png new file mode 100644 index 00000000000..6e0623e11d9 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-3.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-4.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-4.png new file mode 100644 index 00000000000..5069638cef9 Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-4.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-5.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-5.png new file mode 100644 index 00000000000..2d20a49f45f Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-5.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-6.png b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-6.png new file mode 100644 index 00000000000..7bbcd75c23b Binary files /dev/null and b/docs/ja/cloud/manage/billing/marketplace/images/gcp-marketplace-payg-6.png differ diff --git a/docs/ja/cloud/manage/billing/marketplace/index.md b/docs/ja/cloud/manage/billing/marketplace/index.md new file mode 100644 index 00000000000..69fe86c5cef --- /dev/null +++ b/docs/ja/cloud/manage/billing/marketplace/index.md @@ -0,0 +1,69 @@ +--- +slug: /ja/cloud/marketplace +title: Marketplaceã®æ”¯æ‰•ã„ +description: AWSã€GCPã€Azure Marketplaceを通ã˜ã¦ClickHouse Cloudã«ã‚µãƒ–スクライブ。 +keywords: [aws, azure, gcp, google cloud, marketplace, billing] +--- + +ClickHouse Cloudã«ã‚µãƒ–スクライブã™ã‚‹ã«ã¯ã€AWSã€GCPã€Azureã®å„マーケットプレイスを通ã˜ã¦è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æ—¢å­˜ã®ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã®è«‹æ±‚を通ã˜ã¦ClickHouse Cloudã®æ”¯æ‰•ã„ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +**従é‡èª²é‡‘制**(PAYG)を利用ã™ã‚‹ã‹ã€å¸‚場を通ã˜ã¦ClickHouse Cloudã¨ã®å¥‘ç´„ã‚’ç· çµã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚請求ã¯ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã«ã‚ˆã£ã¦å‡¦ç†ã•ã‚Œã€ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¦ãƒ‰ã‚µãƒ¼ãƒ“スã«å¯¾ã—ã¦å˜ä¸€ã®è«‹æ±‚書をå—å–ã‚Šã¾ã™ã€‚ + +- [AWS Marketplace PAYG](/ja/cloud/billing/marketplace/aws-marketplace-payg) +- [AWS Marketplace Committed Contract](/ja/cloud/billing/marketplace/aws-marketplace-committed-contract) +- [GCP Marketplace PAYG](/ja/cloud/billing/marketplace/gcp-marketplace-payg) +- [GCP Marketplace Committed Contract](/ja/cloud/billing/marketplace/gcp-marketplace-committed-contract) +- [Azure Marketplace PAYG](/ja/cloud/billing/marketplace/azure-marketplace-payg) +- [Azure Marketplace Committed Contract](/ja/cloud/billing/marketplace/azure-marketplace-committed-contract) + +## よãã‚る質å•ï¼ˆFAQ) + +**自分ã®çµ„ç¹”ãŒãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レイス請求ã«æŽ¥ç¶šã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’ã©ã®ã‚ˆã†ã«ç¢ºèªã§ãã¾ã™ã‹ï¼Ÿ** + +ClickHouse Cloudコンソールã§ã€**Billing** ã«ç§»å‹•ã—ã¾ã™ã€‚**Payment details** セクションã«ãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レイスã®åå‰ã¨ãƒªãƒ³ã‚¯ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ã€‚ + +**既存ã®ClickHouse Cloudユーザーã§ã™ã€‚AWS / GCP / Azureマーケットプレイスを介ã—ã¦ClickHouse Cloudã«ã‚µãƒ–スクライブã—ãŸå ´åˆã€ã©ã†ãªã‚Šã¾ã™ã‹ï¼Ÿ** + +クラウドプロãƒã‚¤ãƒ€ãƒ¼ãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レイスã‹ã‚‰ClickHouse Cloudã«ç™»éŒ²ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®2ステップãŒå¿…è¦ã§ã™ï¼š +1. 最åˆã«ã€ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã®ãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レースãƒãƒ¼ã‚¿ãƒ«ã§ClickHouse Cloudã«ã€Œã‚µãƒ–スクライブã€ã—ã¾ã™ã€‚サブスクライブを完了ã—ãŸã‚‰ã€ã€ŒPay Nowã€ã¾ãŸã¯ã€ŒManage on Providerã€ï¼ˆãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レイスã«ã‚ˆã£ã¦ç•°ãªã‚‹ï¼‰ã‚’クリックã—ã¾ã™ã€‚ã“ã‚Œã§ã€ClickHouse Cloudã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•ã‚Œã¾ã™ã€‚ +2. ClickHouse Cloudã§æ–°ã—ã„アカウントã«ç™»éŒ²ã™ã‚‹ã‹ã€æ—¢å­˜ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã—ã¾ã™ã€‚ã©ã¡ã‚‰ã®å ´åˆã‚‚ã€ãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レイス請求ã«ç´ä»˜ã‘られãŸæ–°ã—ã„ClickHouse Cloud組織ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +**注**:以å‰ã®ClickHouse Cloudサインアップã§ä½œæˆã•ã‚ŒãŸæ—¢å­˜ã®ã‚µãƒ¼ãƒ“スã¨çµ„ç¹”ã¯æ®‹ã‚Šã€ãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レイス請求ã«ã¯æŽ¥ç¶šã•ã‚Œã¾ã›ã‚“。ClickHouse Cloudã§ã¯ã€åŒä¸€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§ç•°ãªã‚‹è«‹æ±‚方法をæŒã¤è¤‡æ•°ã®çµ„織を管ç†ã§ãã¾ã™ã€‚ + +ClickHouse Cloudコンソールã®å·¦ä¸‹ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰çµ„織を切り替ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**既存ã®ClickHouse Cloudユーザーã§ã™ã€‚既存ã®ã‚µãƒ¼ãƒ“スをマーケットプレイス経由ã§è«‹æ±‚ã—ãŸã„å ´åˆã¯ã©ã†ã™ã‚Œã°è‰¯ã„ã§ã™ã‹ï¼Ÿ** + +ãã®å ´åˆã¯ã€[ClickHouse Cloudサãƒãƒ¼ãƒˆ](https://clickhouse.com/support/program)ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。マーケットプレイスを通ã˜ã¦ClickHouse Cloudã«ã‚µãƒ–スクライブã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ãƒªã‚½ãƒ¼ã‚¹ã¸ã®çµ„ç¹”ã®ãƒªãƒ³ã‚¯ã‚’切り替ãˆã¦ã€è«‹æ±‚ãŒãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レイスを通ã˜ã¦è¡Œã‚れるよã†ã«ã—ã¾ã™ã€‚ + +**マーケットプレイスユーザーã¨ã—ã¦ClickHouse Cloudã«ã‚µãƒ–スクライブã—ã¾ã—ãŸã€‚ã©ã®ã‚ˆã†ã«ã—ã¦è³¼èª­ã‚’解除ã§ãã¾ã™ã‹ï¼Ÿ** + +ClickHouse Cloudã®ä½¿ç”¨ã‚’åœæ­¢ã—ã¦ã€æ—¢å­˜ã®ã™ã¹ã¦ã®ClickHouse Cloudサービスを削除ã™ã‚‹ã ã‘ã§ã‚‚å•é¡Œã‚ã‚Šã¾ã›ã‚“。サブスクリプションã¯å¼•ã続ã有効ã§ã™ãŒã€å†ç™ºæ–™é‡‘ã¯ãªã„ãŸã‚ã€æ–™é‡‘ã¯ç™ºç”Ÿã—ã¾ã›ã‚“。 + +ã‚‚ã—サブスクリプションã®è§£é™¤ã‚’希望ã™ã‚‹å ´åˆã¯ã€ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«ç§»å‹•ã—ã€ãã“ã§ã‚µãƒ–スクリプションã®æ›´æ–°ã‚’キャンセルã—ã¦ãã ã•ã„。サブスクリプションãŒçµ‚了ã™ã‚‹ã¨ã€ã™ã¹ã¦ã®æ—¢å­˜ã‚µãƒ¼ãƒ“スã¯åœæ­¢ã•ã‚Œã€ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰ã®ç™»éŒ²ãŒæ±‚ã‚られã¾ã™ã€‚カードãŒè¿½åŠ ã•ã‚Œã¦ã„ãªã„å ´åˆã€2週間後ã«ã™ã¹ã¦ã®æ—¢å­˜ã‚µãƒ¼ãƒ“スãŒå‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +**マーケットプレイスユーザーã¨ã—ã¦ClickHouse Cloudã«ã‚µãƒ–スクライブã—ã¦ã‹ã‚‰ã€ã‚µãƒ–スクリプションを解除ã—ã¾ã—ãŸã€‚å†åº¦ã‚µãƒ–スクライブã™ã‚‹ã«ã¯ã©ã†ã™ã‚Œã°è‰¯ã„ã§ã™ã‹ï¼Ÿ** + +ãã®å ´åˆã¯ã€é€šå¸¸é€šã‚ŠClickHouse Cloudã«ã‚µãƒ–スクライブã—ã¦ãã ã•ã„(マーケットプレイス経由ã§ã®ã‚µãƒ–スクライブã«é–¢ã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚照)。 + +- AWSマーケットプレイスã®å ´åˆã€æ–°ã—ã„ClickHouse Cloud組織ãŒä½œæˆã•ã‚Œã€ãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レイスã«æŽ¥ç¶šã•ã‚Œã¾ã™ã€‚ +- GCPマーケットプレイスã®å ´åˆã¯ã€å¤ã„組織ãŒå†æœ‰åŠ¹åŒ–ã•ã‚Œã¾ã™ã€‚ + +マーケットプレイスを利用ã—ãŸçµ„ç¹”ã®å†æ´»æ€§åŒ–ã«å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€[ClickHouse Cloudサãƒãƒ¼ãƒˆ](https://clickhouse.com/support/program)ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 + +**ClickHouse Cloudサービスã®ãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レイスサブスクリプションã®è«‹æ±‚書ã«ã¯ã©ã“ã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã‹ï¼Ÿ** + +- [AWS請求コンソール](https://us-east-1.console.aws.amazon.com/billing/home) +- [GCPマーケットプレースオーダー](https://console.cloud.google.com/marketplace/orders)(サブスクリプションã«ä½¿ç”¨ã—ãŸè«‹æ±‚アカウントをé¸æŠžï¼‰ + +**ãªãœä½¿ç”¨çŠ¶æ³ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®æ—¥ä»˜ãŒãƒžãƒ¼ã‚±ãƒƒãƒˆãƒ—レイス請求書ã¨ä¸€è‡´ã—ãªã„ã®ã§ã™ã‹ï¼Ÿ** + +マーケットプレイスã®è«‹æ±‚ã¯ã‚«ãƒ¬ãƒ³ãƒ€ãƒ¼æœˆã®ã‚µã‚¤ã‚¯ãƒ«ã«å¾“ã„ã¾ã™ã€‚ãŸã¨ãˆã°ã€12月1æ—¥ã‹ã‚‰1月1æ—¥ã¾ã§ã®ä½¿ç”¨ã«ã¤ã„ã¦ã€1月3æ—¥ã‹ã‚‰5æ—¥ã®é–“ã«è«‹æ±‚書ãŒç™ºè¡Œã•ã‚Œã¾ã™ã€‚ + +ClickHouse Cloudã®ä½¿ç”¨çŠ¶æ³ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã€ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—æ—¥ã‹ã‚‰å§‹ã¾ã‚‹30日間ã®ã‚µã‚¤ã‚¯ãƒ«ã«å¾“ã£ã¦ãƒ¡ãƒ¼ã‚¿ãƒ¼ã•ã‚Œã€å ±å‘Šã•ã‚Œã¾ã™ã€‚ + +ã“れらã®æ—¥ä»˜ãŒåŒã˜ã§ãªã„å ´åˆã¯ã€ä½¿ç”¨çŠ¶æ³ã¨è«‹æ±‚書ã®æ—¥ä»˜ãŒç•°ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚使用状æ³ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã€ç‰¹å®šã®ã‚µãƒ¼ãƒ“スã®ä¸€æ—¥ã®ä½¿ç”¨ã‚’追跡ã™ã‚‹ãŸã‚ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãã®è²»ç”¨ã®å†…訳を確èªã™ã‚‹éš›ã«ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã«é ¼ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**一般的ãªè«‹æ±‚情報ã¯ã©ã“ã§ç¢ºèªã§ãã¾ã™ã‹ï¼Ÿ** + +[Billing overview page](http://localhost:3000/docs/en/manage/billing)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/billing/payment-thresholds.md b/docs/ja/cloud/manage/billing/payment-thresholds.md new file mode 100644 index 00000000000..a72ee142202 --- /dev/null +++ b/docs/ja/cloud/manage/billing/payment-thresholds.md @@ -0,0 +1,15 @@ +--- +sidebar_label: 支払ã„é™åº¦é¡ +slug: /ja/cloud/billing/payment-thresholds +title: 支払ã„é™åº¦é¡ +description: ClickHouse Cloud ã®æ”¯æ‰•ã„é™åº¦é¡ã¨è‡ªå‹•è«‹æ±‚。 +keywords: [請求, 支払ã„é™åº¦é¡, 自動請求書, 請求書] +--- + +# 支払ã„é™åº¦é¡ + +ClickHouse Cloudã®è«‹æ±‚期間中ã®æ”¯æ‰•ã„金é¡ãŒ10,000米ドルã¾ãŸã¯ãã‚Œã«ç›¸å½“ã™ã‚‹é‡‘é¡ã«é”ã—ãŸå ´åˆã€ç™»éŒ²ã•ã‚Œã¦ã„ã‚‹ãŠæ”¯æ‰•ã„方法ã§è‡ªå‹•çš„ã«æ±ºæ¸ˆã•ã‚Œã¾ã™èª²é‡‘ã®å¤±æ•—ã¯ã€çŒ¶äºˆæœŸé–“後ã«ã‚µãƒ¼ãƒ“スã®åœæ­¢ã¾ãŸã¯çµ‚了を招ãå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æ”¯æ‰•ã„é™åº¦é¡ã¯ã€ClickHouseã¨ã®ã‚³ãƒŸãƒƒãƒˆãƒ¡ãƒ³ãƒˆå¥‘ç´„ã¾ãŸã¯ä»–ã®äº¤æ¸‰æ¸ˆã¿å¥‘ç´„ã‚’æŒã£ã¦ã„ã‚‹ãŠå®¢æ§˜ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。 + +組織ãŒæ”¯æ‰•ã„é™åº¦é¡ã®90%ã«åˆ°é”ã—ã€æœŸé–“中ã«ãã®é™åº¦ã‚’超ãˆã‚‹è¦‹è¾¼ã¿ãŒã‚ã‚‹å ´åˆã€çµ„ç¹”ã«é–¢é€£ä»˜ã‘られãŸè«‹æ±‚メールã«é€šçŸ¥ãŒé€ä¿¡ã•ã‚Œã¾ã™ã€‚ã¾ãŸã€æ”¯æ‰•ã„é™åº¦é¡ã‚’超ãˆãŸéš›ã«ã¯ã€è«‹æ±‚書ã¨å…±ã«ãƒ¡ãƒ¼ãƒ«é€šçŸ¥ãŒé€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +ã“れらã®æ”¯æ‰•ã„é™åº¦é¡ã¯èª¿æ•´å¯èƒ½ã§ã™ã€‚ã”質å•ãŒã‚ã‚‹å ´åˆã¯ã€è©³ç´°ã«ã¤ã„ã¦support@clickhouse.comã¾ã§ã”連絡ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/images/AutoScaling.png b/docs/ja/cloud/manage/images/AutoScaling.png new file mode 100644 index 00000000000..0d76dcbafaf Binary files /dev/null and b/docs/ja/cloud/manage/images/AutoScaling.png differ diff --git a/docs/ja/cloud/manage/images/backup-chain.png b/docs/ja/cloud/manage/images/backup-chain.png new file mode 100644 index 00000000000..1b11ec88df6 Binary files /dev/null and b/docs/ja/cloud/manage/images/backup-chain.png differ diff --git a/docs/ja/cloud/manage/images/backup-configuration-form.png b/docs/ja/cloud/manage/images/backup-configuration-form.png new file mode 100644 index 00000000000..c8401383d68 Binary files /dev/null and b/docs/ja/cloud/manage/images/backup-configuration-form.png differ diff --git a/docs/ja/cloud/manage/images/backup-restore.png b/docs/ja/cloud/manage/images/backup-restore.png new file mode 100644 index 00000000000..6b36ecbb03a Binary files /dev/null and b/docs/ja/cloud/manage/images/backup-restore.png differ diff --git a/docs/ja/cloud/manage/images/backup-service-provisioning.png b/docs/ja/cloud/manage/images/backup-service-provisioning.png new file mode 100644 index 00000000000..45f16a912c9 Binary files /dev/null and b/docs/ja/cloud/manage/images/backup-service-provisioning.png differ diff --git a/docs/ja/cloud/manage/images/backup-settings.png b/docs/ja/cloud/manage/images/backup-settings.png new file mode 100644 index 00000000000..74e45fef84a Binary files /dev/null and b/docs/ja/cloud/manage/images/backup-settings.png differ diff --git a/docs/ja/cloud/manage/images/backup-status-list.png b/docs/ja/cloud/manage/images/backup-status-list.png new file mode 100644 index 00000000000..d38aca20669 Binary files /dev/null and b/docs/ja/cloud/manage/images/backup-status-list.png differ diff --git a/docs/ja/cloud/manage/images/backup-usage.png b/docs/ja/cloud/manage/images/backup-usage.png new file mode 100644 index 00000000000..3471ec931b7 Binary files /dev/null and b/docs/ja/cloud/manage/images/backup-usage.png differ diff --git a/docs/ja/cloud/manage/images/cloud-settings-sidebar.png b/docs/ja/cloud/manage/images/cloud-settings-sidebar.png new file mode 100644 index 00000000000..b15ab174422 Binary files /dev/null and b/docs/ja/cloud/manage/images/cloud-settings-sidebar.png differ diff --git a/docs/ja/cloud/manage/images/notifications-1.png b/docs/ja/cloud/manage/images/notifications-1.png new file mode 100644 index 00000000000..39a48f4eea8 Binary files /dev/null and b/docs/ja/cloud/manage/images/notifications-1.png differ diff --git a/docs/ja/cloud/manage/images/notifications-2.png b/docs/ja/cloud/manage/images/notifications-2.png new file mode 100644 index 00000000000..288017bfed0 Binary files /dev/null and b/docs/ja/cloud/manage/images/notifications-2.png differ diff --git a/docs/ja/cloud/manage/images/notifications-3.png b/docs/ja/cloud/manage/images/notifications-3.png new file mode 100644 index 00000000000..454c9830f45 Binary files /dev/null and b/docs/ja/cloud/manage/images/notifications-3.png differ diff --git a/docs/ja/cloud/manage/images/notifications-4.png b/docs/ja/cloud/manage/images/notifications-4.png new file mode 100644 index 00000000000..3a8103f9be3 Binary files /dev/null and b/docs/ja/cloud/manage/images/notifications-4.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman1.png b/docs/ja/cloud/manage/images/postman/postman1.png new file mode 100644 index 00000000000..7798ce24b81 Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman1.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman10.png b/docs/ja/cloud/manage/images/postman/postman10.png new file mode 100644 index 00000000000..283f17311f6 Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman10.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman11.png b/docs/ja/cloud/manage/images/postman/postman11.png new file mode 100644 index 00000000000..80cfcc7e031 Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman11.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman12.png b/docs/ja/cloud/manage/images/postman/postman12.png new file mode 100644 index 00000000000..c5d7f750ebe Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman12.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman13.png b/docs/ja/cloud/manage/images/postman/postman13.png new file mode 100644 index 00000000000..7b31505bc23 Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman13.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman14.png b/docs/ja/cloud/manage/images/postman/postman14.png new file mode 100644 index 00000000000..bc14279548c Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman14.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman15.png b/docs/ja/cloud/manage/images/postman/postman15.png new file mode 100644 index 00000000000..affc6156d14 Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman15.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman16.png b/docs/ja/cloud/manage/images/postman/postman16.png new file mode 100644 index 00000000000..e6e89872c2c Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman16.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman17.png b/docs/ja/cloud/manage/images/postman/postman17.png new file mode 100644 index 00000000000..668d7260027 Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman17.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman2.png b/docs/ja/cloud/manage/images/postman/postman2.png new file mode 100644 index 00000000000..43601b1600f Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman2.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman3.png b/docs/ja/cloud/manage/images/postman/postman3.png new file mode 100644 index 00000000000..4b5ad18d1fe Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman3.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman4.png b/docs/ja/cloud/manage/images/postman/postman4.png new file mode 100644 index 00000000000..b329c17e433 Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman4.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman5.png b/docs/ja/cloud/manage/images/postman/postman5.png new file mode 100644 index 00000000000..b1309e3f445 Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman5.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman6.png b/docs/ja/cloud/manage/images/postman/postman6.png new file mode 100644 index 00000000000..bd240b7be72 Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman6.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman7.png b/docs/ja/cloud/manage/images/postman/postman7.png new file mode 100644 index 00000000000..77c3bbb5134 Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman7.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman8.png b/docs/ja/cloud/manage/images/postman/postman8.png new file mode 100644 index 00000000000..5fe4241d5c6 Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman8.png differ diff --git a/docs/ja/cloud/manage/images/postman/postman9.png b/docs/ja/cloud/manage/images/postman/postman9.png new file mode 100644 index 00000000000..1a71845869b Binary files /dev/null and b/docs/ja/cloud/manage/images/postman/postman9.png differ diff --git a/docs/ja/cloud/manage/images/scaling-configure.png b/docs/ja/cloud/manage/images/scaling-configure.png new file mode 100644 index 00000000000..eff7dc9ef0b Binary files /dev/null and b/docs/ja/cloud/manage/images/scaling-configure.png differ diff --git a/docs/ja/cloud/manage/images/scaling-memory-allocation.png b/docs/ja/cloud/manage/images/scaling-memory-allocation.png new file mode 100644 index 00000000000..fe11ac96a8f Binary files /dev/null and b/docs/ja/cloud/manage/images/scaling-memory-allocation.png differ diff --git a/docs/ja/cloud/manage/images/scaling-patch-request.png b/docs/ja/cloud/manage/images/scaling-patch-request.png new file mode 100644 index 00000000000..eab877a75cf Binary files /dev/null and b/docs/ja/cloud/manage/images/scaling-patch-request.png differ diff --git a/docs/ja/cloud/manage/images/scaling-patch-response.png b/docs/ja/cloud/manage/images/scaling-patch-response.png new file mode 100644 index 00000000000..47b1e2b5d8b Binary files /dev/null and b/docs/ja/cloud/manage/images/scaling-patch-response.png differ diff --git a/docs/ja/cloud/manage/images/trial-expired.png b/docs/ja/cloud/manage/images/trial-expired.png new file mode 100644 index 00000000000..91eb3ea9484 Binary files /dev/null and b/docs/ja/cloud/manage/images/trial-expired.png differ diff --git a/docs/ja/cloud/manage/integrations.md b/docs/ja/cloud/manage/integrations.md new file mode 100644 index 00000000000..3a9b5909ade --- /dev/null +++ b/docs/ja/cloud/manage/integrations.md @@ -0,0 +1,32 @@ +--- +sidebar_label: インテグレーション +slug: /ja/manage/integrations +title: インテグレーション +--- + +ClickHouseã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®å…¨ãƒªã‚¹ãƒˆã‚’見るã«ã¯ã€[ã“ã¡ã‚‰ã®ãƒšãƒ¼ã‚¸](/ja/integrations)ã‚’ã”覧ãã ã•ã„。 + +## ClickHouse Cloudã®å°‚用インテグレーション + +ClickHouseã«ã¯å¤šæ•°ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãŒç”¨æ„ã•ã‚Œã¦ã„ã¾ã™ãŒã€ClickHouse Cloudã«ã®ã¿åˆ©ç”¨å¯èƒ½ãªå°‚用インテグレーションも存在ã—ã¾ã™ã€‚ + +### ClickPipes + +[ClickPipes](/ja/integrations/clickpipes)ã¯ã€å˜ç´”ãªã‚¦ã‚§ãƒ–ベースUIを使用ã—ã¦ã€ClickHouse Cloudã«ãƒ‡ãƒ¼ã‚¿ã‚’å–り込むãŸã‚ã®ç®¡ç†ã•ã‚ŒãŸã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒ—ラットフォームã§ã™ã€‚ç¾åœ¨ã€Apache Kafkaã€S3ã€GCSã€Amazon Kinesisをサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ã•ã‚‰ã«å¤šãã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãŒè¿‘日中ã«è¿½åŠ äºˆå®šã§ã™ã€‚ + +### ClickHouse Cloud用Looker Studio + +[Looker Studio](https://lookerstudio.google.com/)ã¯ã€GoogleãŒæä¾›ã™ã‚‹äººæ°—ã®ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ãƒ„ールã§ã™ã€‚Looker Studioã¯ç¾åœ¨ã€ClickHouseコãƒã‚¯ã‚¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚‰ãšã€ä»£ã‚ã‚Šã«MySQLワイヤープロトコルを使用ã—ã¦ClickHouseã«æŽ¥ç¶šã—ã¦ã„ã¾ã™ã€‚ + +Looker Studioã‚’ClickHouse Cloudã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã€[MySQLインターフェース](/ja/interfaces/mysql)を有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚Looker Studioã‚’ClickHouse Cloudã«æŽ¥ç¶šã™ã‚‹æ–¹æ³•ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[ã“ã¡ã‚‰ã®ãƒšãƒ¼ã‚¸](/ja/interfaces/mysql#enabling-the-mysql-interface-on-clickhouse-cloud)ã‚’ã”覧ãã ã•ã„。 + +### MySQLインターフェース + +一部ã®ã‚¢ãƒ—リケーションã¯ã€ç¾åœ¨ClickHouseワイヤープロトコルをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。ã“れらã®ã‚¢ãƒ—リケーションã§ClickHouse Cloudを使用ã™ã‚‹ã«ã¯ã€Cloud Consoleを通ã˜ã¦MySQLワイヤープロトコルを有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚Cloud Consoleを通ã˜ã¦MySQLワイヤープロトコルを有効ã«ã™ã‚‹æ–¹æ³•ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[ã“ã¡ã‚‰ã®ãƒšãƒ¼ã‚¸](/ja/interfaces/mysql#enabling-the-mysql-interface-on-clickhouse-cloud)ã‚’ã”覧ãã ã•ã„。 + +## 未対応ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ + +以下ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³æ©Ÿèƒ½ã¯ç¾åœ¨ã€ClickHouse Cloudã§ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。ã“れらã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã§ã‚ã‚‹ãŸã‚ã€ã‚¢ãƒ—リケーションã§ã“れらã®æ©Ÿèƒ½ã‚’サãƒãƒ¼ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€support@clickhouse.comã¾ã§ã”連絡ãã ã•ã„。 + +- [MaterializedPostgreSQL](/ja/engines/database-engines/materialized-mysql) +- [MaterializedMySQL](/ja/engines/table-engines/integrations/materialized-postgresql) diff --git a/docs/ja/cloud/manage/notifications.md b/docs/ja/cloud/manage/notifications.md new file mode 100644 index 00000000000..5fbf5f5c841 --- /dev/null +++ b/docs/ja/cloud/manage/notifications.md @@ -0,0 +1,60 @@ +--- +title: 通知 +slug: /ja/cloud/notifications +description: ã‚ãªãŸã®ClickHouse Cloudサービスã®é€šçŸ¥ +keywords: [cloud, notifications] +--- + +ClickHouse Cloudã¯ã€ã‚ãªãŸã®ã‚µãƒ¼ãƒ“スや組織ã«é–¢é€£ã™ã‚‹é‡è¦ãªã‚¤ãƒ™ãƒ³ãƒˆã«ã¤ã„ã¦ã®é€šçŸ¥ã‚’é€ä¿¡ã—ã¾ã™ã€‚通知ãŒé€ä¿¡ã•ã‚Œã€è¨­å®šã•ã‚Œã‚‹æ–¹æ³•ã‚’ç†è§£ã™ã‚‹ãŸã‚ã«ã€ã„ãã¤ã‹ã®æ¦‚念を覚ãˆã¦ãŠãå¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +1. **通知カテゴリ**: 請求通知やサービス関連通知ãªã©ã®é€šçŸ¥ã®ã‚°ãƒ«ãƒ¼ãƒ—を指ã—ã¾ã™ã€‚å„カテゴリ内ã«ã¯ã€é…信モードを設定ã§ãる複数ã®é€šçŸ¥ãŒã‚ã‚Šã¾ã™ã€‚ +2. **通知ã®é‡å¤§åº¦**: 通知ã®é‡è¦åº¦ã«å¿œã˜ã¦ã€é€šçŸ¥ã®é‡å¤§åº¦ã¯`情報`ã€`警告`ã€ã¾ãŸã¯`クリティカル`ã§ã™ã€‚ã“ã‚Œã¯è¨­å®šã§ãã¾ã›ã‚“。 +3. **通知ãƒãƒ£ãƒ³ãƒãƒ«**: ãƒãƒ£ãƒ³ãƒãƒ«ã¯ã€UIã€ãƒ¡ãƒ¼ãƒ«ã€Slackãªã©ã€é€šçŸ¥ãŒå—ä¿¡ã•ã‚Œã‚‹æ–¹æ³•ã‚’指ã—ã¾ã™ã€‚ã“ã‚Œã¯ã»ã¨ã‚“ã©ã®é€šçŸ¥ã§è¨­å®šå¯èƒ½ã§ã™ã€‚ + +## 通知ã®å—ä¿¡ + +通知ã¯ã•ã¾ã–ã¾ãªãƒãƒ£ãƒ³ãƒãƒ«ã‚’通ã˜ã¦å—ä¿¡ã§ãã¾ã™ã€‚ç¾åœ¨ã€ClickHouse Cloudã¯ãƒ¡ãƒ¼ãƒ«ãŠã‚ˆã³ClickHouse Cloud UIを通ã˜ã¦é€šçŸ¥ã‚’å—ä¿¡ã§ãã¾ã™ã€‚左上ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã§ãƒ™ãƒ«ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚’クリックã™ã‚‹ã¨ç¾åœ¨ã®é€šçŸ¥ãŒè¡¨ç¤ºã•ã‚Œã‚‹ãƒ•ãƒ©ã‚¤ã‚¢ã‚¦ãƒˆãŒé–‹ãã¾ã™ã€‚フライアウトã®ä¸‹ã«ã‚ã‚‹**ã™ã¹ã¦è¡¨ç¤º**ボタンをクリックã™ã‚‹ã¨ã€ã™ã¹ã¦ã®é€šçŸ¥ã®æ´»å‹•ãƒ­ã‚°ã‚’表示ã™ã‚‹ãƒšãƒ¼ã‚¸ã«ç§»å‹•ã—ã¾ã™ã€‚ + +
+ +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ã®æ§‹æˆ + +
+ +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ã®æ§‹æˆ + +## 通知ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º + +å„通知ã«ã¤ã„ã¦ã€é€šçŸ¥ã‚’å—ä¿¡ã™ã‚‹æ–¹æ³•ã‚’カスタマイズã§ãã¾ã™ã€‚通知フライアウトã¾ãŸã¯é€šçŸ¥æ´»å‹•ãƒ­ã‚°ã®2番目ã®ã‚¿ãƒ–ã‹ã‚‰è¨­å®šç”»é¢ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + +特定ã®é€šçŸ¥ã®é…信を設定ã™ã‚‹ã«ã¯ã€é‰›ç­†ã‚¢ã‚¤ã‚³ãƒ³ã‚’クリックã—ã¦é€šçŸ¥é…ä¿¡ãƒãƒ£ãƒ³ãƒãƒ«ã‚’変更ã—ã¾ã™ã€‚ + +
+ +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ã®æ§‹æˆ + +
+ +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ã®æ§‹æˆ + +
+ +:::note +**支払ã„失敗**ãªã©ã®**å¿…é ˆ**通知ã¯è¨­å®šã§ãã¾ã›ã‚“。 +::: + +## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る通知 + +ç¾åœ¨ã€è«‹æ±‚関連ã®é€šçŸ¥ï¼ˆæ”¯æ‰•ã„失敗ã€ä½¿ç”¨é‡ãŒä¸€å®šã®ã—ãã„値を超ãˆãŸå ´åˆãªã©ï¼‰ã‚„スケーリングイベントã«é–¢é€£ã™ã‚‹é€šçŸ¥ï¼ˆã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°å®Œäº†ã€ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ãƒ–ロックãªã©ï¼‰ã‚’é€ä¿¡ã—ã¦ã„ã¾ã™ã€‚今後ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã€ClickPipesã€ãã®ä»–関連ã™ã‚‹ã‚«ãƒ†ã‚´ãƒªã®é€šçŸ¥ã‚’追加ã™ã‚‹äºˆå®šã§ã™ã€‚ diff --git a/docs/ja/cloud/manage/openapi.md b/docs/ja/cloud/manage/openapi.md new file mode 100644 index 00000000000..b72ceade3bf --- /dev/null +++ b/docs/ja/cloud/manage/openapi.md @@ -0,0 +1,50 @@ +--- +sidebar_label: APIキーã®ç®¡ç† +slug: /ja/cloud/manage/openapi +title: APIキーã®ç®¡ç† +--- + +ClickHouse Cloudã¯ã€OpenAPIを利用ã—ãŸAPIã‚’æä¾›ã—ã¦ãŠã‚Šã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆãŠã‚ˆã³ã‚µãƒ¼ãƒ“スã®å„種è¦ç´ ã‚’プログラムã§ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +# APIキーã®ç®¡ç† + +:::note +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ã€ClickHouse Cloud APIã«ã¤ã„ã¦èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚データベースAPIã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã«ã¤ã„ã¦ã¯ã€[Cloud Endpoints API](/docs/ja/cloud/security/cloud-endpoints-api.md)ã‚’ã”覧ãã ã•ã„。 +::: + +1. å·¦å´ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®**API Keys**タブを使用ã—ã¦ã€APIキーã®ä½œæˆã¨ç®¡ç†ãŒã§ãã¾ã™ã€‚ + + ![ClickHouse Cloud API Keys Tab](@site/docs/ja/_snippets/images/openapi1.png) + +2. **API Keys**ページã¯ã€æœ€åˆã«APIキーを作æˆã™ã‚‹ãŸã‚ã®ãƒ—ロンプトを表示ã—ã¾ã™ã€‚最åˆã®ã‚­ãƒ¼ã‚’作æˆã—ãŸå¾Œã¯ã€ç”»é¢å³ä¸Šã«è¡¨ç¤ºã•ã‚Œã‚‹ `New API Key` ボタンを使用ã—ã¦æ–°ã—ã„キーを作æˆã§ãã¾ã™ã€‚ + + ![Initial API Screen](@site/docs/ja/_snippets/images/openapi2.png) + +3. APIキーを作æˆã™ã‚‹ã«ã¯ã€ã‚­ãƒ¼åã€ã‚­ãƒ¼ã®æ¨©é™ã€ãŠã‚ˆã³æœ‰åŠ¹æœŸé™ã‚’指定ã—ã€`Generate API Key` をクリックã—ã¾ã™ã€‚ + + ![Create API Key](@site/docs/ja/_snippets/images/openapi3.png) + +4. 次ã®ç”»é¢ã§ã¯ã€Key ID 㨠Key secret ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã“ã®å€¤ã‚’コピーã—ã¦ã€é‡‘庫ãªã©ã®å®‰å…¨ãªå ´æ‰€ã«ä¿ç®¡ã—ã¦ãã ã•ã„。ã“ã®ç”»é¢ã‚’離れãŸå¾Œã¯ã€ã“れらã®å€¤ã¯è¡¨ç¤ºã•ã‚Œã¾ã›ã‚“。 + + ![API Key ID and Key Secret](@site/docs/ja/_snippets/images/openapi4.png) + +5. ClickHouse Cloud APIã¯ã€[HTTP Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication)を使用ã—ã¦APIキーã®æœ‰åŠ¹æ€§ã‚’確èªã—ã¾ã™ã€‚以下ã¯ã€`curl`を使用ã—ã¦ClickHouse Cloud APIã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã™ã‚‹ä¾‹ã§ã™ï¼š + +```bash +$ KEY_ID=mykeyid +$ KEY_SECRET=mykeysecret + +$ curl --user $KEY_ID:$KEY_SECRET https://api.clickhouse.cloud/v1/organizations +``` + +6. **API Keys**ページã«æˆ»ã‚‹ã¨ã€ã‚­ãƒ¼ã®åå‰ã€Key IDã®æœ€å¾Œã®4文字ã€æ¨©é™ã€ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã€æº€æœŸæ—¥ã€ãŠã‚ˆã³ä½œæˆè€…ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã“ã®ç”»é¢ã‹ã‚‰ã‚­ãƒ¼åã€æ¨©é™ã€ãŠã‚ˆã³æœ‰åŠ¹æœŸé™ã‚’編集ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚キーã¯ã“ã®ç”»é¢ã‹ã‚‰ç„¡åŠ¹åŒ–ã¾ãŸã¯å‰Šé™¤ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +:::note +APIキーを削除ã™ã‚‹ã¨ã€ã“ã®æ“作ã¯å–り消ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã“ã®ã‚­ãƒ¼ã‚’使用ã—ã¦ã„るサービスã¯ã€ã™ãã«ClickHouse Cloudã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ãŒã§ããªããªã‚Šã¾ã™ã€‚ +::: + + ![API Key Management](@site/docs/ja/_snippets/images/openapi5.png) + +## エンドãƒã‚¤ãƒ³ãƒˆ + +[エンドãƒã‚¤ãƒ³ãƒˆãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ã“ã¡ã‚‰](/docs/ja/cloud/manage/api/invitations-api-reference.md)。API Key 㨠API Secret を利用ã—ã¦ã€ãƒ™ãƒ¼ã‚¹URL `https://api.clickhouse.cloud/v1` を使用ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/postman.md b/docs/ja/cloud/manage/postman.md new file mode 100644 index 00000000000..66639d7a9af --- /dev/null +++ b/docs/ja/cloud/manage/postman.md @@ -0,0 +1,74 @@ +--- +slug: /ja/cloud/manage/postman +sidebar_label: Postmanを使用ã—ãŸãƒ—ログラムã«ã‚ˆã‚‹APIアクセス +title: Postmanを使用ã—ãŸãƒ—ログラムã«ã‚ˆã‚‹APIアクセス +--- + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€[Postman](https://www.postman.com/product/what-is-postman/)を使用ã—ã¦ClickHouse Cloud APIをテストã™ã‚‹æ–¹æ³•ã‚’紹介ã—ã¾ã™ã€‚Postmanアプリケーションã¯ã€Webブラウザ内ã§ä½¿ç”¨ã™ã‚‹ã‹ã€ãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—ã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ + +### ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’ä½œæˆ +* ç„¡æ–™ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã¯[https://www.postman.com](https://www.postman.com)ã§åˆ©ç”¨ã§ãã¾ã™ã€‚ +![Postmanサイト](@site/docs/ja/cloud/manage/images/postman/postman1.png) + +### ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’ä½œæˆ +* ワークスペースã«åå‰ã‚’付ã‘ã€è¡¨ç¤ºãƒ¬ãƒ™ãƒ«ã‚’設定ã—ã¾ã™ã€‚ +![ワークスペースを作æˆ](@site/docs/ja/cloud/manage/images/postman/postman2.png) + +### ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’ä½œæˆ +* 左上ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®ã€ŒExploreã€ä»¥ä¸‹ã§ã€ŒImportã€ã‚’クリックã—ã¾ã™ã€‚ +![Explore > Import](@site/docs/ja/cloud/manage/images/postman/postman3.png) + +* モーダルãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ +![API URLã®å…¥åŠ›](@site/docs/ja/cloud/manage/images/postman/postman4.png) + +* APIアドレス「https://api.clickhouse.cloud/v1ã€ã‚’入力ã—ã€'Enter'を押ã—ã¾ã™ã€‚ +![インãƒãƒ¼ãƒˆ](@site/docs/ja/cloud/manage/images/postman/postman5.png) + +* 「Importã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ã€ŒPostman Collectionã€ã‚’é¸æŠžã—ã¾ã™ã€‚ +![コレクション > Import](@site/docs/ja/cloud/manage/images/postman/postman6.png) + +### ClickHouse Cloud API仕様ã¨ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ +* 「ClickHouse Cloudã®API仕様ã€ãŒã€ŒCollectionsã€å†…ã«è¡¨ç¤ºã•ã‚Œã¾ã™ï¼ˆå·¦ãƒŠãƒ“ゲーション)。 +![APIã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ](@site/docs/ja/cloud/manage/images/postman/postman7.png) + +* 「ClickHouse Cloudã®API仕様ã€ã‚’クリックã—ã¾ã™ã€‚中央ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‹ã‚‰ã€ŒAuthorizationã€ã‚¿ãƒ–ã‚’é¸æŠžã—ã¾ã™ã€‚ +![インãƒãƒ¼ãƒˆå®Œäº†](@site/docs/ja/cloud/manage/images/postman/postman8.png) + +### èªè¨¼ã‚’設定 +* ドロップダウンメニューを切り替ãˆã¦ã€ŒBasic Authã€ã‚’é¸æŠžã—ã¾ã™ã€‚ +![Basic auth](@site/docs/ja/cloud/manage/images/postman/postman9.png) + +* ClickHouse Cloud APIキーを設定ã—ãŸã¨ãã«å—ã‘å–ã£ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードを入力ã—ã¾ã™ã€‚ +![クレデンシャル](@site/docs/ja/cloud/manage/images/postman/postman10.png) + +### 変数を有効化 +* [変数](https://learning.postman.com/docs/sending-requests/variables/)を利用ã™ã‚‹ã¨ã€Postmanã§å€¤ã‚’ä¿å­˜ã—ã¦å†åˆ©ç”¨ã§ãã€APIテストãŒå®¹æ˜“ã«ãªã‚Šã¾ã™ã€‚ +#### 組織IDã¨ã‚µãƒ¼ãƒ“スIDを設定 +* 「Collectionã€å†…ã§ã€ä¸­å¤®ã®ãƒšã‚¤ãƒ³ã«ã‚る「Variableã€ã‚¿ãƒ–をクリックã—ã¾ã™ï¼ˆãƒ™ãƒ¼ã‚¹URLã¯å…ˆã»ã©ã®APIインãƒãƒ¼ãƒˆã«ã‚ˆã£ã¦è¨­å®šã•ã‚Œã¦ã„ã¾ã™ï¼‰ã€‚ +* 「baseURLã€ä»¥ä¸‹ã§ã€ŒAdd new valueã€ã¨æ›¸ã‹ã‚ŒãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’é–‹ãã€çµ„ç¹”IDã¨ã‚µãƒ¼ãƒ“スIDを代入ã—ã¾ã™ã€‚ +![組織IDã¨ã‚µãƒ¼ãƒ“スID](@site/docs/ja/cloud/manage/images/postman/postman11.png) + +## ClickHouse Cloud API機能ã®ãƒ†ã‚¹ãƒˆ +### "GET list of available organizations"ã®ãƒ†ã‚¹ãƒˆ +* 「OpenAPI spec for ClickHouse Cloudã€ä»¥ä¸‹ã§ãƒ•ã‚©ãƒ«ãƒ€ã‚’展開ã—ã€> V1 > organizationsã‚’é¸æŠžã—ã¾ã™ã€‚ +* 「GET list of available organizationsã€ã‚’クリックã—ã€å³ã®é’ã„「Sendã€ãƒœã‚¿ãƒ³ã‚’押ã—ã¾ã™ã€‚ +![組織ã®å–得テスト](@site/docs/ja/cloud/manage/images/postman/postman12.png) +* 戻りçµæžœã¯ã€Œstatus: 200ã€ã¨ã¨ã‚‚ã«çµ„ç¹”ã®è©³ç´°ã‚’è¿”ã™ã¹ãã§ã™ã€‚(組織情報ãŒè¡¨ç¤ºã•ã‚Œãšã€Œstatus: 400ã€ã‚’å—ã‘å–ã£ãŸå ´åˆã€è¨­å®šãŒæ­£ã—ãã‚ã‚Šã¾ã›ã‚“)。 +![ステータス](@site/docs/ja/cloud/manage/images/postman/postman13.png) + +### "GET organizational details"ã®ãƒ†ã‚¹ãƒˆ +* organizationidフォルダ以下ã§ã€ŒGET organizational detailsã€ã«ç§»å‹•ã—ã¾ã™ã€‚ +* 中央フレームã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã§Paramsã®ä¸‹ã«ã€organizationidãŒå¿…è¦ã§ã™ã€‚ +![組織詳細ã®å–得テスト](@site/docs/ja/cloud/manage/images/postman/postman14.png) +* ã“ã®å€¤ã‚’中括弧ã§å›²ã¾ã‚ŒãŸ"{{orgid}}"ã«ç·¨é›†ã—ã¾ã™ï¼ˆã“ã®å€¤ã‚’以å‰ã«è¨­å®šã—ãŸãŸã‚ã€å€¤ãŒè¡¨ç¤ºã•ã‚Œã‚‹ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãŒç¾ã‚Œã¾ã™ï¼‰ã€‚ +![テストã®æ出](@site/docs/ja/cloud/manage/images/postman/postman15.png) +* 「Saveã€ãƒœã‚¿ãƒ³ã‚’押ã—ãŸå¾Œã€ç”»é¢å³ä¸Šã®é’ã„「Sendã€ãƒœã‚¿ãƒ³ã‚’押ã—ã¾ã™ã€‚ +![返り値](@site/docs/ja/cloud/manage/images/postman/postman16.png) +* 戻りçµæžœã¯ã€Œstatus: 200ã€ã¨ã¨ã‚‚ã«çµ„ç¹”ã®è©³ç´°ã‚’è¿”ã™ã¹ãã§ã™ã€‚(組織情報ãŒè¡¨ç¤ºã•ã‚Œãšã€Œstatus: 400ã€ã‚’å—ã‘å–ã£ãŸå ´åˆã€è¨­å®šãŒæ­£ã—ãã‚ã‚Šã¾ã›ã‚“)。 + +### "GET service details"ã®ãƒ†ã‚¹ãƒˆ +* 「GET service detailsã€ã‚’クリックã—ã¾ã™ã€‚ +* organizationidãŠã‚ˆã³serviceidã®å€¤ã‚’ãã‚Œãžã‚Œ{{orgid}}ã¨{{serviceid}}ã«ç·¨é›†ã—ã¾ã™ã€‚ +* 「Saveã€ã‚’押ã—ã€ãã®å¾Œå³ã®é’ã„「Sendã€ãƒœã‚¿ãƒ³ã‚’押ã—ã¾ã™ã€‚ +![サービスã®ãƒªã‚¹ãƒˆ](@site/docs/ja/cloud/manage/images/postman/postman17.png) +* 戻りçµæžœã¯ã€Œstatus: 200ã€ã¨ã¨ã‚‚ã«ã‚µãƒ¼ãƒ“スã®ä¸€è¦§ã¨ãã®è©³ç´°ã‚’è¿”ã™ã¹ãã§ã™ã€‚(サービス情報ãŒè¡¨ç¤ºã•ã‚Œãšã€Œstatus: 400ã€ã‚’å—ã‘å–ã£ãŸå ´åˆã€è¨­å®šãŒæ­£ã—ãã‚ã‚Šã¾ã›ã‚“)。 diff --git a/docs/ja/cloud/manage/scaling.md b/docs/ja/cloud/manage/scaling.md new file mode 100644 index 00000000000..e92a50a193a --- /dev/null +++ b/docs/ja/cloud/manage/scaling.md @@ -0,0 +1,105 @@ +--- +sidebar_position: 1 +sidebar_label: 自動スケーリング +slug: /ja/manage/scaling +description: ClickHouse Cloudã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°è¨­å®š +keywords: [autoscaling, auto scaling, scaling, horizontal, vertical, bursts] +--- + +# 自動スケーリング + +スケーリングã¨ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®éœ€è¦ã«å¿œã˜ã¦ä½¿ç”¨å¯èƒ½ãªãƒªã‚½ãƒ¼ã‚¹ã‚’調整ã™ã‚‹èƒ½åŠ›ã®ã“ã¨ã§ã™ã€‚サービスã¯APIをプログラム的ã«å‘¼ã³å‡ºã—ãŸã‚Šã€UIã§ã‚·ã‚¹ãƒ†ãƒ ãƒªã‚½ãƒ¼ã‚¹ã‚’調整ã™ã‚‹è¨­å®šã‚’変更ã™ã‚‹ã“ã¨ã§æ‰‹å‹•ã§ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã§ãã¾ã™ã€‚代ã‚ã‚Šã«ã€ã‚µãƒ¼ãƒ“スã¯ã‚¢ãƒ—リケーションã®è¦æ±‚ã«åˆã‚ã›ã¦**自動スケーリング**ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +:::note +スケーリングã¯**Production**ティアã®ã‚µãƒ¼ãƒ“スã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚**Development**ティアã®ã‚µãƒ¼ãƒ“スã¯ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã—ã¾ã›ã‚“。スケーリングã™ã‚‹ãŸã‚ã«ã¯ã€**Development**ティアã‹ã‚‰**Production**ティアã«ã‚µãƒ¼ãƒ“スを**アップグレード**ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚一度**Development**サービスãŒã‚¢ãƒƒãƒ—グレードã•ã‚Œã‚‹ã¨ã€ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +::: + +## ClickHouse Cloudã«ãŠã‘るスケーリングã®ä»•çµ„ã¿ +**Production**サービスã¯ã€ï¼ˆã‚ˆã‚Šå¤§ããªãƒ¬ãƒ—リカã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ã§ï¼‰åž‚ç›´ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã—ãŸã‚Šã€ï¼ˆåŒã˜ã‚µã‚¤ã‚ºã®ãƒ¬ãƒ—リカを追加ã™ã‚‹ã“ã¨ã§ï¼‰æ°´å¹³ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã—ãŸã‚Šã§ãã¾ã™ã€‚デフォルトã§ã¯ã€ClickHouse Cloudã®**Production**サービスã¯3ã¤ã®ç•°ãªã‚‹å¯ç”¨æ€§ã‚¾ãƒ¼ãƒ³ã«3ã¤ã®ãƒ¬ãƒ—リカã§é‹ç”¨ã•ã‚Œã¾ã™ã€‚垂直スケーリングã¯ã€é•·æ™‚é–“ã®æŒ¿å…¥ã‚„読ã¿å–ã‚Šã«å¤šãã®ãƒ¡ãƒ¢ãƒªã‚’å¿…è¦ã¨ã™ã‚‹ã‚¯ã‚¨ãƒªã«å½¹ç«‹ã¡ã€æ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã¯ä¸¦åˆ—化ã«ã‚ˆã£ã¦åŒæ™‚実行クエリをサãƒãƒ¼ãƒˆã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +ç¾åœ¨ã€ClickHouse Cloudã¯ã‚µãƒ¼ãƒ“スを垂直ã«ã®ã¿è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã—ã¾ã™ã€‚æ°´å¹³ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã™ã‚‹ã«ã¯ï¼ˆç¾åœ¨ãƒ—ライベートプレビュー中)ã€ClickHouse Cloudコンソールã¾ãŸã¯Cloud APIを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚サービスã§æ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚’有効ã«ã™ã‚‹ã«ã¯ã€support@clickhouse.comã«ãŠå•ã„åˆã‚ã›ã®ã†ãˆã€[セルフサーブ水平スケーリング](#self-serve-horizontal-scaling)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’ã”覧ãã ã•ã„。 + +### 垂直自動スケーリング +**Production**サービスã¯ã€CPUã¨ãƒ¡ãƒ¢ãƒªã®ä½¿ç”¨é‡ã«åŸºã¥ã„ã¦è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚éŽåŽ»30時間ã®ãƒ«ãƒƒã‚¯ãƒãƒƒã‚¯ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã‚ãŸã£ã¦ã‚µãƒ¼ãƒ“スã®ä½¿ç”¨å±¥æ­´ã‚’常ã«ç›£è¦–ã—ã€ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã®åˆ¤æ–­ã‚’è¡Œã„ã¾ã™ã€‚使用é‡ãŒç‰¹å®šã®é–¾å€¤ã‚’上回ã£ãŸã‚Šä¸‹å›žã£ãŸã‚Šã—ãŸå ´åˆã€éœ€è¦ã«å¿œã˜ã¦ã‚µãƒ¼ãƒ“スをé©åˆ‡ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã—ã¾ã™ã€‚ + +CPUベースã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã¯ã€CPU使用率ãŒ50-75ï¼…ã®ç¯„囲ã®ä¸Šé™é–¾å€¤ã‚’超ãˆãŸã¨ãã«å§‹å‹•ã—ã¾ã™ã€‚ã“ã®æ™‚点ã§ã€ã‚¯ãƒ©ã‚¹ã‚¿ã¸ã®CPU割り当ã¦ãŒå€å¢—ã•ã‚Œã¾ã™ã€‚CPU使用率ãŒä¸Šé™é–¾å€¤ã®åŠåˆ†ã‚’下回ã£ãŸå ´åˆï¼ˆãŸã¨ãˆã°ã€ä¸Šé™é–¾å€¤ãŒ50ï¼…ã®å ´åˆã€25%)ã€CPU割り当ã¦ãŒåŠæ¸›ã•ã‚Œã¾ã™ã€‚ + +メモリベースã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã§ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ã¯æœ€å¤§ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã®125ï¼…ã€ã¾ãŸã¯ãƒ¡ãƒ¢ãƒªä¸è¶³ã‚¨ãƒ©ãƒ¼ï¼ˆOOM)ãŒç™ºç”Ÿã—ãŸå ´åˆã¯æœ€å¤§150ï¼…ã¾ã§ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +CPUã¾ãŸã¯ãƒ¡ãƒ¢ãƒªã®æŽ¨å¥¨å€¤ã§**より大ãã„æ–¹**ãŒé¸ã°ã‚Œã€ã‚µãƒ¼ãƒ“スã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹CPUã¨ãƒ¡ãƒ¢ãƒªã¯`1` CPUã¨`4 GiB`メモリã®åŒæœŸã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã§ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +注æ„: ç¾åœ¨ã®å®Ÿè£…ã§ã¯ã€åž‚直自動スケーリングã¯ãƒ¡ãƒ¢ãƒªã¨CPUã®ãƒ‹ãƒ¼ã‚ºãŒç·©ã‚„ã‹ã«å¢—加ã™ã‚‹å ´é¢ã§ã¯ã†ã¾ã機能ã—ã€ä¿å®ˆçš„ã«ãªã‚‹å‚¾å‘ãŒã‚ã‚Šã¾ã™ã€‚ワークロードã®æ€¥å¢—ã«å¯¾å¿œã§ãるよã†ã€ã‚ˆã‚Šå‹•çš„ã«ã—ã€ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã®ãŸã‚ã«ã‚ˆã‚Šç©æ¥µçš„ãªCPU/メモリ閾値を使用ã—ã€é©åˆ‡ãªãƒ«ãƒƒã‚¯ãƒãƒƒã‚¯ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’使用ã—ã¦åž‚直スケーリングã®æ„æ€æ±ºå®šã‚’è¡Œã†ã‚ˆã†æ”¹å–„を進ã‚ã¦ã„ã¾ã™ã€‚ + +### 垂直自動スケーリングã®è¨­å®š +ClickHouse Cloud Productionサービスã®ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã¯ã€**Admin**ロールをæŒã¤çµ„ç¹”ã®ãƒ¡ãƒ³ãƒãƒ¼ã«ã‚ˆã£ã¦èª¿æ•´ã§ãã¾ã™ã€‚垂直自動スケーリングを設定ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒ“ス詳細ページã®**設定**タブã«ç§»å‹•ã—ã€æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒ¡ãƒ¢ãƒªã€åŠã³CPU設定を調整ã—ã¾ã™ã€‚ + +スケーリング設定ページ + +**最大メモリ**ã‚’**最å°ãƒ¡ãƒ¢ãƒª**よりも高ã設定ã—ã¦ãã ã•ã„。ã™ã‚‹ã¨ã€å¿…è¦ã«å¿œã˜ã¦ãã®ç¯„囲内ã§ã‚µãƒ¼ãƒ“スãŒã‚¹ã‚±ãƒ¼ãƒ«ã—ã¾ã™ã€‚ã“れらã®è¨­å®šã¯ã€åˆæœŸã®ã‚µãƒ¼ãƒ“ス作æˆãƒ•ãƒ­ãƒ¼ã§ã‚‚利用å¯èƒ½ã§ã™ã€‚サービス内ã®å„レプリカã«ã¯ã€åŒã˜ãƒ¡ãƒ¢ãƒªã¨CPUリソースãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ + +ã“れらã®å€¤ã‚’åŒã˜ã«è¨­å®šã™ã‚‹ã“ã¨ã‚‚é¸æŠžã§ãã€ãã®å ´åˆã€ç‰¹å®šã®è¨­å®šã«ã‚µãƒ¼ãƒ“スを固定ã—ã¾ã™ã€‚ãã†ã™ã‚‹ã“ã¨ã§ã€é¸æŠžã—ãŸã‚µã‚¤ã‚ºã«ã™ãã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ãŒå¼·åˆ¶ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ã§ã®ä»»æ„ã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚’無効ã«ã—ã€ã“ã®è¨­å®šã‚’超ãˆãŸCPUã¾ãŸã¯ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã®å¢—加ã‹ã‚‰ã‚µãƒ¼ãƒ“スをä¿è­·ã—ãªããªã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +## セルフサービスã«ã‚ˆã‚‹æ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚° {#self-serve-horizontal-scaling} + +ClickHouse Cloudã®æ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã¯ç¾åœ¨**プライベートプレビュー**中ã§ã™ã€‚一旦水平スケーリングãŒã‚µãƒ¼ãƒ“スã§æœ‰åŠ¹ã«ãªã‚‹ã¨ã€ClickHouse Cloud [公開API](https://clickhouse.com/docs/ja/cloud/manage/api/swagger#/paths/~1v1~1organizations~1:organizationId~1services~1:serviceId~1scaling/patch)を使用ã—ã¦ã€ã‚µãƒ¼ãƒ“スã®ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°è¨­å®šã‚’æ›´æ–°ã™ã‚‹ã“ã¨ã§ã‚µãƒ¼ãƒ“スをスケールã§ãã¾ã™ã€‚ + +- 機能ãŒã‚µãƒ¼ãƒ“スã§æœ‰åŠ¹ã«ãªã£ã¦ã„ãªã„å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯`BAD_REQUEST: Adjusting number of replicas is not enabled for your instance"ã¨ã„ã†ã‚¨ãƒ©ãƒ¼ã§æ‹’å¦ã•ã‚Œã¾ã™ã€‚ã“ã®ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•ã‚Œã€ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ãŒæ—¢ã«æœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹ã¨è€ƒãˆã‚‹å ´åˆã¯ã€ClickHouse Cloudサãƒãƒ¼ãƒˆã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 +- **Production** ClickHouseサービスã¯æœ€ä½Žã§ã‚‚`3`ã¤ã®ãƒ¬ãƒ—リカãŒå¿…è¦ã§ã™ã€‚ç¾åœ¨ã€**Production**サービスãŒã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ã‚¦ãƒˆå¯èƒ½ãªæœ€å¤§ãƒ¬ãƒ—リカ数ã¯`20`ã§ã™ã€‚ã“れらã®åˆ¶é™ã¯æ™‚é–“ã¨ã¨ã‚‚ã«å¢—加ã—ã¾ã™ã€‚ç¾åœ¨ã€ã‚ˆã‚Šé«˜ã„制é™ãŒå¿…è¦ãªå ´åˆã¯ã€ClickHouse Cloudサãƒãƒ¼ãƒˆãƒãƒ¼ãƒ ã«ã”連絡ãã ã•ã„。 +- ç¾åœ¨ã€ã‚¹ã‚±ãƒ¼ãƒ«ã‚¤ãƒ³æ“作中ã«å‰Šé™¤ã•ã‚Œã‚‹ãƒ¬ãƒ—リカã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルデータã¯ä¿æŒã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルデータを利用ã—ã¦ã„るダッシュボードや他ã®æ©Ÿèƒ½ã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +### APIを介ã—ãŸæ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚° + +クラスタを水平スケーリングã™ã‚‹ã«ã¯ã€APIを通ã˜ã¦`PATCH`リクエストを発行ã—ã€ãƒ¬ãƒ—リカ数を調整ã—ã¾ã™ã€‚以下ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã¯ã€`3`レプリカã®ã‚¯ãƒ©ã‚¹ã‚¿ã‚’`6`レプリカã«ã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ã‚¦ãƒˆã™ã‚‹APIコールã¨ã€ãã®å¯¾å¿œã™ã‚‹ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +スケーリング設定ページ + +*レプリカ数を更新ã™ã‚‹`PATCH`リクエスト* + +スケーリング設定ページ + +*`PATCH`リクエストã‹ã‚‰ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹* + +æ–°ã—ã„スケーリングリクエストや複数ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’連続ã—ã¦ç™ºè¡Œã™ã‚‹ã¨ã€ãã®ã†ã¡1ã¤ãŒé€²è¡Œä¸­ã®å ´åˆã€ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚µãƒ¼ãƒ“スã¯ä¸­é–“状態を無視ã—ã€æœ€çµ‚çš„ãªãƒ¬ãƒ—リカ数ã«åŽæŸã—ã¾ã™ã€‚ + +### UIを介ã—ãŸæ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚° + +UIã‹ã‚‰ã‚µãƒ¼ãƒ“スを水平スケーリングã™ã‚‹ã«ã¯ã€**設定**ページã§ã‚µãƒ¼ãƒ“スã®ãƒŽãƒ¼ãƒ‰æ•°ã‚’調整ã—ã¾ã™ã€‚ + +スケーリング設定ページ + +*ClickHouse Cloudコンソールã‹ã‚‰ã®ã‚µãƒ¼ãƒ“ススケーリング設定* + +サービスã®ã‚¹ã‚±ãƒ¼ãƒ«ãŒå®Œäº†ã™ã‚‹ã¨ã€ã‚¯ãƒ©ã‚¦ãƒ‰ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã®ãƒ¡ãƒˆãƒªãƒƒã‚¯ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã«æ­£ã—ã„割り当ã¦ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ã€‚以下ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ãŒ`96 GiB`ã®ç·ãƒ¡ãƒ¢ãƒªã«ã‚¹ã‚±ãƒ¼ãƒ«ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¦ãŠã‚Šã€ã“ã‚Œã¯`6`レプリカã€å„レプリカã«GiBã®ãƒ¡ãƒ¢ãƒªãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ + +スケーリング設定ページ + +## 自動アイドリング +**設定**ページã§ã¯ã€ã‚µãƒ¼ãƒ“スãŒéžã‚¢ã‚¯ãƒ†ã‚£ãƒ–時ã«è‡ªå‹•ã‚¢ã‚¤ãƒ‰ãƒªãƒ³ã‚°ãŒè¨±å¯ã•ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’é¸æŠžã§ãã¾ã™ï¼ˆã™ãªã‚ã¡ã€ã‚µãƒ¼ãƒ“スãŒãƒ¦ãƒ¼ã‚¶ãƒ¼æ出ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¦ã„ãªã„ã¨ã)。自動アイドリングã«ã‚ˆã‚Šã€ã‚µãƒ¼ãƒ“スã®ã‚³ã‚¹ãƒˆã‚’削減ã§ãã€ã‚µãƒ¼ãƒ“スãŒä¸€æ™‚åœæ­¢ä¸­ã¯ã‚³ãƒ³ãƒ”ューティングリソースã«å¯¾ã—ã¦è«‹æ±‚ãŒç™ºç”Ÿã—ã¾ã›ã‚“。 + +:::danger 自動アイドリングを使用ã—ãªã„å ´åˆ +自動アイドリングã¯ã€ã‚¯ã‚¨ãƒªã«å¿œç­”ã™ã‚‹å‰ã«é…延を許容ã§ãã‚‹å ´åˆã®ã¿ä½¿ç”¨ã—ã¦ãã ã•ã„。サービスãŒä¸€æ™‚åœæ­¢ã•ã‚Œã‚‹ã¨ã€ãã®é–“ã®æŽ¥ç¶šãŒã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã—ã¾ã™ã€‚自動アイドリングã¯ã€ä½¿ç”¨é »åº¦ãŒå°‘ãªãã€é…延ãŒè¨±å®¹ã§ãるサービスã«ç†æƒ³çš„ã§ã™ã€‚é »ç¹ã«ä½¿ç”¨ã•ã‚Œã‚‹é¡§å®¢å‘ã‘機能を動ã‹ã™ã‚µãƒ¼ãƒ“スã«ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 +::: + +## çªç™ºçš„ãªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®å–り扱ㄠ+予想ã•ã‚Œã‚‹ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®ã‚¹ãƒ‘イクãŒã‚ã‚‹å ´åˆã¯ã€[ClickHouse Cloud API](/docs/ja/cloud/manage/api/services-api-reference.md)を使用ã—ã¦ã€ã‚らã‹ã˜ã‚サービスを拡張ã—ã€ã‚¹ãƒ‘イクを処ç†ã—ãŸå¾Œã«éœ€è¦ãŒè½ã¡ç€ã„ãŸã‚‰ã‚¹ã‚±ãƒ¼ãƒ«ãƒ€ã‚¦ãƒ³ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚å„レプリカã®ç¾åœ¨ã®CPUコアã¨ãƒ¡ãƒ¢ãƒªãƒªã‚½ãƒ¼ã‚¹ã‚’ç†è§£ã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM clusterAllReplicas('default', view( + SELECT + hostname() AS server, + anyIf(value, metric = 'CGroupMaxCPU') AS cpu_cores, + formatReadableSize(anyIf(value, metric = 'CGroupMemoryTotal')) AS memory + FROM system.asynchronous_metrics +)) +ORDER BY server ASC +SETTINGS skip_unavailable_shards = 1 +``` diff --git a/docs/ja/cloud/manage/service-types.md b/docs/ja/cloud/manage/service-types.md new file mode 100644 index 00000000000..717cce7a216 --- /dev/null +++ b/docs/ja/cloud/manage/service-types.md @@ -0,0 +1,61 @@ +--- +sidebar_label: サービスタイプ +slug: /ja/cloud/manage/service-types +title: サービスタイプ +--- + +# サービスタイプ + +ClickHouse Cloud ã§ã¯ã€ã„ãã¤ã‹ã®ã‚µãƒ¼ãƒ“スタイプãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«æœ€é©ãªã‚µãƒ¼ãƒ“スタイプã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ClickHouse Cloud 組織内ã§ç•°ãªã‚‹ã‚µãƒ¼ãƒ“スをæŒã¤ã“ã¨ãŒå¯èƒ½ã§ã€ãã‚Œãžã‚Œã«æŒ‡å®šã•ã‚ŒãŸã‚µãƒ¼ãƒ“スタイプãŒã‚ã‚Šã¾ã™ã€‚ + +**サービスタイプã®æ¦‚è¦ï¼š** + +| | 開発 | 本番 | 専用 | +|:---------|:-----|:---------|:---------| +|**ユースケース**|å°è¦æ¨¡ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã€ãƒ—ロトタイプ|中è¦æ¨¡ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã€é¡§å®¢å‘ã‘アプリケーション|厳ã—ã„å¾…ã¡æ™‚é–“ã¨åˆ†é›¢è¦ä»¶ãŒã‚ã‚Šã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºãŒå¿…è¦ãªã‚¢ãƒ—リケーション| +|**ストレージ**|最大 1TB|無制é™|無制é™| +|**メモリ**|16 GiB|24GiB+|無制é™| +|**計算**|ãƒãƒ¼ã‚¹ãƒˆå¯èƒ½ãªCPU|専用CPU|カスタム計算オプション| +|**ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—**|24時間ã”ã¨ã€1æ—¥ä¿æŒ|24時間ã”ã¨ã€2æ—¥ä¿æŒ|カスタムãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ä¿æŒ| +|**アップグレード**|自動|自動|スケジュールå¯èƒ½| +|**SLAã¨ã‚µãƒãƒ¼ãƒˆ**|24時間ã®å¿œç­”時間|1時間ã®å¿œç­”時間|カスタムSLAã€å°‚ä»»ã®ã‚µãƒãƒ¼ãƒˆã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢| + +## 開発 + +`開発`サービスã¯ã€å°è¦æ¨¡ãªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚„スタートプロジェクトå‘ã‘ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ClickHouse Cloud ã§æœ€ã‚‚低コストã®ã‚ªãƒ—ションã§ã™ã€‚ä»–ã®ã‚µãƒ¼ãƒ“スタイプよりも低価格ã§ã™ãŒã€`開発`サービスã¯é«˜ã„信頼性をæŒã¡ã€2ã¤ã®å¯ç”¨æ€§ã‚¾ãƒ¼ãƒ³ã«ã‚ãŸã£ã¦ãƒ¬ãƒ—リケートã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**制é™äº‹é …** + +`開発`サービスã¯è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。`開発`サービスã¯ã€å†…部プロジェクトやプロトタイプã€ClickHouse を試ã™é–‹ç™ºè€…ã«æœ€é©ã§ã™ã€‚ + +`開発`サービスã®åŸºç›¤ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¯ã‚·ã‚¹ãƒ†ãƒ ã®éŽè² è·ã‚’防ããŸã‚ã«åˆ¶é™ã•ã‚Œã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚継続的ãªæŒ¿å…¥ã‚’ä¼´ã†ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¯ã€ãƒŽãƒ¼ãƒ‰ã‚ãŸã‚Š1秒ã‚ãŸã‚Š4回ã®æŒ¿å…¥ã«åˆ¶é™ã•ã‚Œã¾ã™ã€‚高ã„頻度ã®ä¸€æ™‚çš„ãªæŒ¿å…¥ã¯è¨±å¯ã•ã‚Œã¾ã™ã€‚ + +[**エクスペリメンタル**](/docs/ja/beta-and-experimental-features#experimental-features)ãªæ©Ÿèƒ½ã¯ã€ä¸å®‰å®šã§ã‚ã£ãŸã‚Šã€ã‚µãƒ¼ãƒ“スã®ç•°å¸¸å‹•ä½œã‚„クラッシュを引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ClickHouse Cloud ã§ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。ClickHouse Cloud ã§ã¯ã„ãã¤ã‹ã®[**ベータ**](/docs/ja/beta-and-experimental-features)機能ãŒåˆ©ç”¨å¯èƒ½ã§ã™ - **ベータ**ã¯ã€ãã®æ©Ÿèƒ½ãŒ**一般公開("GA")**ã«å‘ã‹ã£ã¦ç©æ¥µçš„ã«é€²è¡Œã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ + +:::note +`開発`サービス㯠Azure ã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: + +## 本番 + +`本番`サービスã¯ã€é¡§å®¢å‘ã‘アプリケーションや中è¦æ¨¡ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰å‘ã‘ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚自動スケーリングã€AWS Private Link サãƒãƒ¼ãƒˆã€S3 ロールベースã®ã‚¢ã‚¯ã‚»ã‚¹ãªã©ã€`開発`サービスよりも高度ãªæ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +`本番`サービスã¯ã€ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¨ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®å¤‰å‹•ã«å¯¾å‡¦ã™ã‚‹ãŸã‚ã«è‡ªå‹•çš„ã«ã‚¹ã‚±ãƒ¼ãƒ«ã—ã¾ã™ã€‚`本番`サービスã¯ã€ã»ã¨ã‚“ã©ã®ã‚¹ã‚¿ãƒ¼ãƒˆã‚¢ãƒƒãƒ—やエンタープライズã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«ãŠã„ã¦æœ€ã‚‚一般的ãªã‚µãƒ¼ãƒ“スタイプã§ã™ã€‚ + +## 専用 + +`専用`サービスã¯ã€åŽ³ã—ã„分離ã¨å¾…ã¡æ™‚é–“è¦ä»¶ãŒã‚るエンタープライズワークロードå‘ã‘ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚計算ã¨ãƒ¡ãƒ¢ãƒªã®è¨­å®šãŒé«˜åº¦ã«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºå¯èƒ½ã§ã€ã“れらã®ã‚µãƒ¼ãƒ“スã¯ã‚¢ãƒ—リケーションã®ãƒ‹ãƒ¼ã‚ºã«æ­£ç¢ºã«åˆã‚ã›ã‚‰ã‚Œã¾ã™ã€‚ + +`専用`サービスã¯ã€é«˜ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®é¡§å®¢å‘ã‘アプリケーションをサãƒãƒ¼ãƒˆã™ã‚‹ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚„ã€é‡è¦ãªç¤¾å†…使用ã«å¯¾å¿œã™ã‚‹ã‚¨ãƒ³ã‚¿ãƒ¼ãƒ—ライズã«æœ€é©ã§ã™ã€‚ + +## 別ã®ãƒ†ã‚£ã‚¢ã¸ã®ã‚¢ãƒƒãƒ—グレード + +`開発`ã‹ã‚‰`本番`ã‚„ã€`本番`ã‹ã‚‰`専用`ã¸ã‚¢ãƒƒãƒ—グレードã§ãã¾ã™ã€‚ [サãƒãƒ¼ãƒˆã‚±ãƒ¼ã‚¹](https://console.clickhouse.cloud/support)を作æˆã—ã¦ãã ã•ã„。 + +`専用`サービスã¯ã€åŽ³ã—ã„分離ã¨å¾…ã¡æ™‚é–“è¦ä»¶ãŒã‚るエンタープライズワークロードå‘ã‘ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚計算ã¨ãƒ¡ãƒ¢ãƒªã®è¨­å®šãŒé«˜åº¦ã«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºå¯èƒ½ã§ã€ã“れらã®ã‚µãƒ¼ãƒ“スã¯ã‚¢ãƒ—リケーションã®ãƒ‹ãƒ¼ã‚ºã«æ­£ç¢ºã«åˆã‚ã›ã‚‰ã‚Œã¾ã™ã€‚ + +`専用`サービスã¯ã€é«˜ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®é¡§å®¢å‘ã‘アプリケーションをサãƒãƒ¼ãƒˆã™ã‚‹ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚„ã€é‡è¦ãªç¤¾å†…使用ã«å¯¾å¿œã™ã‚‹ã‚¨ãƒ³ã‚¿ãƒ¼ãƒ—ライズã«æœ€é©ã§ã™ã€‚ + +--- + +サービスタイプã«é–¢ã™ã‚‹è³ªå•ãŒã‚ã‚Œã°ã€[価格ページ](https://clickhouse.com/pricing)を確èªã™ã‚‹ã‹ã€support@clickhouse.com ã¾ã§ãŠå•ã„åˆã‚ã›ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/service-uptime.md b/docs/ja/cloud/manage/service-uptime.md new file mode 100644 index 00000000000..8f29f6d24bf --- /dev/null +++ b/docs/ja/cloud/manage/service-uptime.md @@ -0,0 +1,13 @@ +--- +sidebar_label: サービス稼åƒæ™‚é–“ã¨SLA +slug: /ja/cloud/manage/service-uptime +title: サービス稼åƒæ™‚é–“ +--- + +## 稼åƒæ™‚間アラート + +ユーザーã¯ç¾åœ¨ã€[ステータスページ](https://status.clickhouse.com/)ã§åœ°åŸŸã”ã¨ã®ç¨¼åƒæ™‚間を確èªã—ã€ã‚µãƒ¼ãƒ“スã®ä¸­æ–­ã«é–¢ã™ã‚‹ã‚¢ãƒ©ãƒ¼ãƒˆã‚’購読ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## SLA + +ç§ãŸã¡ã¯ã€ãƒ—ロダクションインスタンスã«å¯¾ã—ã¦ã‚µãƒ¼ãƒ“スレベルアグリーメント(SLA)もæä¾›ã—ã¦ã„ã¾ã™ã€‚SLAãƒãƒªã‚·ãƒ¼ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[sales@clickhouse.com](mailto:sales@clickhouse.com)ã¾ã§ãŠå•ã„åˆã‚ã›ãã ã•ã„。 diff --git a/docs/ja/cloud/manage/settings.md b/docs/ja/cloud/manage/settings.md new file mode 100644 index 00000000000..6f673a4815d --- /dev/null +++ b/docs/ja/cloud/manage/settings.md @@ -0,0 +1,14 @@ +--- +sidebar_label: 設定ã®æ§‹æˆ +slug: /ja/manage/settings +--- + +# 設定ã®æ§‹æˆ + +特定ã®[ユーザー](/docs/ja/operations/access-rights#user-account-management)ã¾ãŸã¯[ロール](/docs/ja/operations/access-rights#role-management)ã«å¯¾ã—ã¦ClickHouse Cloudサービスã®è¨­å®šã‚’指定ã™ã‚‹ã«ã¯ã€[SQL主導ã®è¨­å®šãƒ—ロファイル](/docs/ja/operations/access-rights#settings-profiles-management)を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚設定プロファイルをé©ç”¨ã™ã‚‹ã“ã¨ã§ã€ã‚µãƒ¼ãƒ“スãŒåœæ­¢ã€å¾…æ©Ÿã€ã‚¢ãƒƒãƒ—グレードã—ãŸå ´åˆã§ã‚‚構æˆã—ãŸè¨­å®šãŒæŒç¶šã•ã‚Œã¾ã™ã€‚設定プロファイルã«ã¤ã„ã¦è©³ã—ãã¯ã€[ã“ã¡ã‚‰ã®ãƒšãƒ¼ã‚¸](/docs/ja/operations/settings/settings-profiles.md)ã‚’ã”覧ãã ã•ã„。 + +ç¾åœ¨ã€ClickHouse Cloudã§ã¯XMLベースã®è¨­å®šãƒ—ロファイルãŠã‚ˆã³[構æˆãƒ•ã‚¡ã‚¤ãƒ«](/docs/ja/operations/configuration-files.md)ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ã“ã¨ã«ã”注æ„ãã ã•ã„。 + +ClickHouse Cloudサービスã«å¯¾ã—ã¦æŒ‡å®šã§ãる設定ã«ã¤ã„ã¦è©³ã—ãã¯ã€[ã“ã¡ã‚‰ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](/docs/ja/operations/settings)ã§ã‚«ãƒ†ã‚´ãƒªæ¯Žã«ã™ã¹ã¦ã®å¯èƒ½ãªè¨­å®šã‚’ã”覧ãã ã•ã„。 + + diff --git a/docs/ja/cloud/manage/troubleshooting-billing-issues.md b/docs/ja/cloud/manage/troubleshooting-billing-issues.md new file mode 100644 index 00000000000..caee3bdcd07 --- /dev/null +++ b/docs/ja/cloud/manage/troubleshooting-billing-issues.md @@ -0,0 +1,20 @@ +--- +sidebar_label: 請求å•é¡Œã®ãƒˆãƒ©ãƒ–ルシューティング +slug: /ja/manage/troubleshooting-billing-issues +title: 請求å•é¡Œã®ãƒˆãƒ©ãƒ–ルシューティング +--- + +# 請求å•é¡Œã®ãƒˆãƒ©ãƒ–ルシューティング + +## 機能ã—ãªã„支払ã„情報ã®ä¿®æ­£ + +ClickHouse Cloud ã®åˆ©ç”¨ã«ã¯ã€æœ‰åŠ¹ã§æ­£å¸¸ã«æ©Ÿèƒ½ã™ã‚‹ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰ãŒå¿…è¦ã§ã™ã€‚試用期間ã®çµ‚了後ã€ã¾ãŸã¯æœ€å¾Œã®æ”¯æ‰•ã„ãŒæˆåŠŸã—ãŸå¾Œã‹ã‚‰30日間ã€ã‚µãƒ¼ãƒ“スã¯ç¶™ç¶šã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ã—ã‹ã—ã€æœ‰åŠ¹ãªã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰ã«èª²é‡‘ã§ããªã„å ´åˆã€ã‚¯ãƒ©ã‚¦ãƒ‰ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã®æ©Ÿèƒ½ã¯çµ„ç¹”ã«å¯¾ã—ã¦åˆ¶é™ã•ã‚Œã¾ã™ã€‚ + +**試用期間終了後ã¾ãŸã¯æœ€å¾Œã®æ”¯æ‰•ã„æˆåŠŸã‹ã‚‰30日以内ã«æœ‰åŠ¹ãªã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰ãŒè¿½åŠ ã•ã‚Œãªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚** + +支払ã„情報ã«å•é¡ŒãŒã‚ã‚‹ã€ã¾ãŸã¯ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰ã‚’追加ã§ããªã„å ´åˆã¯ã€[サãƒãƒ¼ãƒˆãƒãƒ¼ãƒ ](https://clickhouse.com/support/program)ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 + +
+ +試用期間ã®çµ‚了 + diff --git a/docs/ja/cloud/manage/upgrades.md b/docs/ja/cloud/manage/upgrades.md new file mode 100644 index 00000000000..89e15ecb14e --- /dev/null +++ b/docs/ja/cloud/manage/upgrades.md @@ -0,0 +1,54 @@ +--- +sidebar_label: アップグレード +slug: /ja/manage/updates +--- + +# アップグレード + +ClickHouse Cloud ã§ã¯ã€ãƒ‘ッãƒé©ç”¨ã‚„アップグレードã«ã¤ã„ã¦å¿ƒé…ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã›ã‚“。修正ã€æ–°æ©Ÿèƒ½ã€æ€§èƒ½æ”¹å–„ã‚’å«ã‚€ã‚¢ãƒƒãƒ—グレードを定期的ã«å±•é–‹ã—ã¦ã„ã¾ã™ã€‚ClickHouse ã®æ–°æ©Ÿèƒ½ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[Cloud ã®å¤‰æ›´å±¥æ­´](/docs/ja/cloud/reference/changelog.md)ã‚’ã”覧ãã ã•ã„。 + +## ãƒãƒ¼ã‚¸ãƒ§ãƒ³äº’æ›æ€§ + +サービスを作æˆã™ã‚‹ã¨ãã€[`compatibility` 設定](/docs/ja/operations/settings/settings#compatibility)ã¯ã€ã‚µãƒ¼ãƒ“スãŒæœ€åˆã«ãƒ—ロビジョニングã•ã‚ŒãŸæ™‚点㧠ClickHouse Cloud ã«ã‚ˆã£ã¦æä¾›ã•ã‚Œã¦ã„る最新㮠ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ + +`compatibility` 設定ã«ã‚ˆã‚Šã€ä»¥å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®è¨­å®šã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’使用ã§ãã¾ã™ã€‚サービスãŒæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã‚¢ãƒƒãƒ—グレードã•ã‚Œã¦ã‚‚ã€`compatibility` 設定ã«æŒ‡å®šã•ã‚ŒãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ã€ã‚µãƒ¼ãƒ“スを作æˆã—ãŸã¨ãã«å­˜åœ¨ã—ã¦ã„ãŸè¨­å®šã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒå¤‰æ›´ã•ã‚Œãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ï¼ˆãŸã ã—ã€æ—¢ã«ãれらã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’上書ãã—ã¦ã„ã‚‹å ´åˆã€ãれらã¯ã‚¢ãƒƒãƒ—グレード後もæŒç¶šã—ã¾ã™ï¼‰ã€‚ + +サービス㮠`compatibility` 設定ã¯ç®¡ç†ã§ãã¾ã›ã‚“。`compatibility` 設定ã«æŒ‡å®šã•ã‚Œã¦ã„ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’変更ã—ãŸã„å ´åˆã¯ã€[サãƒãƒ¼ãƒˆã«é€£çµ¡](https://clickhouse.com/support/program)ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## メンテナンスモード + +å ´åˆã«ã‚ˆã£ã¦ã¯ã€ã‚µãƒ¼ãƒ“スを更新ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚„アイドリングãªã©ã®ç‰¹å®šã®æ©Ÿèƒ½ã‚’無効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã¾ã‚Œã«ã€å•é¡ŒãŒç™ºç”Ÿã—ã¦ã„るサービスã«å¯¾ã—ã¦ä½•ã‚‰ã‹ã®æŽªç½®ã‚’講ã˜ã€æ­£å¸¸ãªçŠ¶æ…‹ã«æˆ»ã™å¿…è¦ãŒç”Ÿã˜ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚ˆã†ãªãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ä¸­ã¯ã€ã‚µãƒ¼ãƒ“スページã«ã€Œãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ãŒé€²è¡Œä¸­ã€ã¨æ›¸ã‹ã‚ŒãŸãƒãƒŠãƒ¼ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã“ã®é–“ã§ã‚‚クエリã®ãŸã‚ã«ã‚µãƒ¼ãƒ“スを利用ã§ãã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +メンテナンス中ã®æ™‚é–“ã«å¯¾ã—ã¦ã¯æ–™é‡‘ãŒèª²ã•ã‚Œã¾ã›ã‚“。_メンテナンスモード_ ã¯ã¾ã‚Œãªå‡ºæ¥äº‹ã§ã‚ã‚Šã€é€šå¸¸ã®ã‚µãƒ¼ãƒ“スアップグレードã¨æ··åŒã—ãªã„ã§ãã ã•ã„。 + +## リリースãƒãƒ£ãƒãƒ«ï¼ˆã‚¢ãƒƒãƒ—グレードスケジュール) + +ClickHouse Cloud サービスã®ã‚¢ãƒƒãƒ—グレードスケジュールを特定ã®ãƒªãƒªãƒ¼ã‚¹ãƒãƒ£ãƒãƒ«ã«ç™»éŒ²ã™ã‚‹ã“ã¨ã§æŒ‡å®šã§ãã¾ã™ã€‚通常ã®ã‚¢ãƒƒãƒ—グレードスケジュールã«åŠ ãˆã€é€šå¸¸ã®ãƒªãƒªãƒ¼ã‚¹ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã®å‰ã«ã‚µãƒ¼ãƒ“スを更新ã—ãŸã„å ´åˆã€**Fast release** ãƒãƒ£ãƒãƒ«ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚早期ã®ã‚¢ãƒƒãƒ—グレードã®ãŸã‚ã® **Fast release** ãƒãƒ£ãƒãƒ«ã¸ã®ç™»éŒ²ã¯ã€æœ¬ç•ªç’°å¢ƒä»¥å¤–ã§ã®åˆ©ç”¨ã‚’推奨ã—ã¦ãŠã‚Šã€ã‚µãƒãƒ¼ãƒˆãƒã‚±ãƒƒãƒˆã‚’記録ã™ã‚‹ã“ã¨ã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§ãã¾ã™ã€‚ + +### Fast release ãƒãƒ£ãƒãƒ«ï¼ˆæ—©æœŸã‚¢ãƒƒãƒ—グレード) + +- 最新㮠ClickHouse リリースをå—ã‘å–ã‚‹ +- æ–°ã—ã„リリースãŒãƒ†ã‚¹ãƒˆã•ã‚Œã‚‹ãŸã‚ã€ã‚¢ãƒƒãƒ—グレード頻度ãŒã‚ˆã‚Šé«˜ã„ +- ç¾åœ¨**Production** サービスã§æ§‹æˆå¯èƒ½ +- é‡è¦ã§ãªã„環境ã§ã®æ–°æ©Ÿèƒ½ã®ãƒ†ã‚¹ãƒˆã«é©ã—ã¦ã„ã¾ã™ã€‚厳ã—ã„稼åƒæ™‚é–“ã¨ä¿¡é ¼æ€§è¦ä»¶ãŒã‚る本番ワークロードã«ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + サービスã®ãƒªãƒªãƒ¼ã‚¹ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯ã€Cloud コンソールã§å¤‰æ›´ã§ãã¾ã™ã€‚構æˆã¯ã€ã‚µãƒ¼ãƒ“スã®è¨­å®šã‚¿ãƒ–ã«ã‚ã‚Šã¾ã™ã€‚ + +Configure backup settings + +Configure backup settings + +:::note +開発サービスã¯ã€Fast release ãƒãƒ£ãƒãƒ«ã®ç›´å¾Œã«ã‚¢ãƒƒãƒ—グレードã•ã‚Œã¾ã™ã€‚ +::: + +### 通常リリースãƒãƒ£ãƒãƒ« + +- 本番環境ã«æŽ¨å¥¨ +- æ–°ã—ã„マイナーãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ **Fast release** ãƒãƒ£ãƒãƒ«ã®å°‘ãªãã¨ã‚‚ 2 週間後ã«ãƒªãƒªãƒ¼ã‚¹ã•ã‚Œã¾ã™ +- æ–°ã—ã„パッãƒãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ **Fast release** ãƒãƒ£ãƒãƒ«ã®å°‘ãªãã¨ã‚‚ 2 日後ã«ãƒªãƒªãƒ¼ã‚¹ã•ã‚Œã¾ã™ diff --git a/docs/ja/cloud/reference/_category_.yml b/docs/ja/cloud/reference/_category_.yml new file mode 100644 index 00000000000..79520c71142 --- /dev/null +++ b/docs/ja/cloud/reference/_category_.yml @@ -0,0 +1,7 @@ +label: 'Cloud Reference' +position: 1 +collapsible: true +collapsed: true +link: + type: generated-index + title: Cloud Reference diff --git a/docs/ja/cloud/reference/architecture.md b/docs/ja/cloud/reference/architecture.md new file mode 100644 index 00000000000..7b3d3d63736 --- /dev/null +++ b/docs/ja/cloud/reference/architecture.md @@ -0,0 +1,46 @@ +--- +sidebar_label: アーキテクãƒãƒ£ +slug: /ja/cloud/reference/architecture +--- + +# ClickHouse Cloud アーキテクãƒãƒ£ + +![ClickHouse Cloud architecture](@site/docs/ja/cloud/reference/images/architecture.svg) + +## オブジェクトストアã«æ”¯ãˆã‚‰ã‚ŒãŸã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ +- 事実上無制é™ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ +- データを手動ã§å…±æœ‰ã™ã‚‹å¿…è¦ãªã— +- 特ã«ã‚ã¾ã‚Šé »ç¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œãªã„データをä¿å­˜ã™ã‚‹éš›ã®ã‚³ã‚¹ãƒˆãŒå¤§å¹…ã«ä½Žæ¸› + +## コンピュート +- 自動スケーリングã¨ã‚¢ã‚¤ãƒ‰ãƒªãƒ³ã‚°ï¼šäº‹å‰ã«ã‚µã‚¤ã‚ºã‚’決定ã™ã‚‹å¿…è¦ãŒãªãã€ãƒ”ーク使用ã«åˆã‚ã›ã¦éŽå‰°ãƒ—ロビジョンã™ã‚‹å¿…è¦ã‚‚ãªã— +- 自動アイドリングã¨å†é–‹ï¼šèª°ã‚‚使ã£ã¦ã„ãªã„ã¨ãã«æœªä½¿ç”¨ã®ã‚³ãƒ³ãƒ”ュートを走らã›ã‚‹å¿…è¦ãŒãªã„ +- デフォルトã§å®‰å…¨ã§é«˜å¯ç”¨æ€§ + +## ç®¡ç† +- セットアップã€ç›£è¦–ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã€ãŠã‚ˆã³è«‹æ±‚ã¯è‡ªå‹•çš„ã«è¡Œã‚ã‚Œã¾ã™ã€‚ +- コストコントロールã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã§ã‚ã‚Šã€Cloud コンソールを通ã˜ã¦èª¿æ•´ã§ãã¾ã™ã€‚ + +## サービスã®ã‚¢ã‚¤ã‚½ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ + +### ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®ã‚¢ã‚¤ã‚½ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ + +ã™ã¹ã¦ã®ã‚µãƒ¼ãƒ“スã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å±¤ã§ã‚¢ã‚¤ã‚½ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### コンピュートã®ã‚¢ã‚¤ã‚½ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ + +`Production` ãŠã‚ˆã³ `Development` サービスã¯ã€ãã‚Œãžã‚Œã® Kubernetes スペース内ã§åˆ¥ã€…ã®ãƒãƒƒãƒ‰ã«ãƒ‡ãƒ—ロイã•ã‚Œã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ¬ãƒ™ãƒ«ã§ã‚¢ã‚¤ã‚½ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã•ã‚Œã¦ã„ã¾ã™ã€‚`Dedicated` サービスã¯å°‚用㮠VM 上ã§è‡ªèº«ã® Kubernetes オペレーターã¨å…±ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +### ストレージã®ã‚¢ã‚¤ã‚½ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ + +ã™ã¹ã¦ã®ã‚µãƒ¼ãƒ“スã¯ã€å…±æœ‰ãƒã‚±ãƒƒãƒˆ(AWS, GCP)ã¾ãŸã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚³ãƒ³ãƒ†ãƒŠ(Azure)ã®åˆ¥ã€…ã®ã‚µãƒ–パスを使用ã—ã¾ã™ã€‚ + +AWS ã§ã¯ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ AWS IAM を介ã—ã¦åˆ¶å¾¡ã•ã‚Œã€å„ IAM ロールã¯ã‚µãƒ¼ãƒ“スã”ã¨ã«ãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ã™ã€‚**Production** ãŠã‚ˆã³ **Dedicated** サービスã«ã¤ã„ã¦ã¯ã€[CMEK](/docs/ja/cloud/security/cmek)ãŒæœ‰åŠ¹åŒ–ã•ã‚Œã¦ä½¿ç”¨åœæ­¢æ™‚ã®é«˜åº¦ãªãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¤ã‚½ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’æä¾›ã—ã¾ã™ã€‚CMEK ã¯ç¾åœ¨ã€AWS サービスã®ã¿ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +GCP ãŠã‚ˆã³ Azure ã§ã¯ã€ã‚µãƒ¼ãƒ“スã¯ã‚ªãƒ–ジェクトストレージã®ã‚¢ã‚¤ã‚½ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãŒç¢ºä¿ã•ã‚Œã¦ãŠã‚Šï¼ˆã™ã¹ã¦ã®ã‚µãƒ¼ãƒ“スãŒè‡ªèº«ã®ãƒã‚±ãƒƒãƒˆã¾ãŸã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚³ãƒ³ãƒ†ãƒŠã‚’æŒã£ã¦ã„ã¾ã™ï¼‰ã€‚ + +## åŒæ™‚å®Ÿè¡Œåˆ¶é™ + +ClickHouse Cloud サービスã§ã¯ã€ç§’ã‚ãŸã‚Šã®ã‚¯ã‚¨ãƒªæ•° (QPS) ã«åˆ¶é™ã¯ã‚ã‚Šã¾ã›ã‚“。ãŸã ã—ã€1 レプリカã‚ãŸã‚Š1000 ã®åŒæ™‚クエリ制é™ãŒã‚ã‚Šã¾ã™ã€‚QPS ã¯æœ€çµ‚çš„ã«ã€å¹³å‡ã‚¯ã‚¨ãƒªå®Ÿè¡Œæ™‚é–“ã¨ã‚µãƒ¼ãƒ“ス内ã®ãƒ¬ãƒ—リカ数ã«ã‚ˆã‚‹é–¢æ•°ã¨ãªã‚Šã¾ã™ã€‚ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã® ClickHouse インスタンスや他ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹/データウェアãƒã‚¦ã‚¹ã¨æ¯”較ã—㟠ClickHouse Cloud ã®ä¸»ãªåˆ©ç‚¹ã¯ã€[レプリカを追加ã™ã‚‹ï¼ˆæ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ï¼‰](/docs/ja/manage/scaling#self-serve-horizontal-scaling)ã“ã¨ã§ç°¡å˜ã«åŒæ™‚実行数を増やã›ã‚‹ã“ã¨ã§ã™ã€‚ diff --git a/docs/ja/cloud/reference/byoc.md b/docs/ja/cloud/reference/byoc.md new file mode 100644 index 00000000000..bc3d21d9a7b --- /dev/null +++ b/docs/ja/cloud/reference/byoc.md @@ -0,0 +1,322 @@ +--- +title: AWS用BYOC (Bring Your Own Cloud) - プライベートプレビュー +slug: /ja/cloud/reference/byoc +sidebar_label: BYOC (Bring Your Own Cloud) +keywords: [byoc, cloud, bring your own cloud] +description: 独自ã®ã‚¯ãƒ©ã‚¦ãƒ‰ã‚¤ãƒ³ãƒ•ãƒ©ã«ClickHouseをデプロイ +--- + +## æ¦‚è¦ + +BYOC (Bring Your Own Cloud) を使用ã™ã‚‹ã¨ã€è‡ªèº«ã®ã‚¯ãƒ©ã‚¦ãƒ‰ã‚¤ãƒ³ãƒ•ãƒ©ã«ClickHouse Cloudをデプロイã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ClickHouse Cloudã®ç®¡ç†ã‚µãƒ¼ãƒ“スを使用ã™ã‚‹ã“ã¨ãŒã§ããªã„具体的ãªè¦ä»¶ã‚„制約ãŒã‚ã‚‹å ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +**BYOCã¯ç¾åœ¨ãƒ—ライベートプレビュー中ã§ã™ã€‚アクセスを希望ã•ã‚Œã‚‹å ´åˆã¯ã€[サãƒãƒ¼ãƒˆ](https://clickhouse.com/support/program)ã¾ã§ãŠå•ã„åˆã‚ã›ãã ã•ã„。** プライベートプレビューã«é–¢ã™ã‚‹è¿½åŠ æƒ…å ±ã¯ã€[利用è¦ç´„](https://clickhouse.com/legal/agreements/terms-of-service) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +BYOCã¯ç¾åœ¨ã€AWSã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€GCPãŠã‚ˆã³Microsoft Azureã¯é–‹ç™ºä¸­ã§ã™ã€‚ + +:::note +BYOCã¯å¤§è¦æ¨¡ãªãƒ‡ãƒ—ロイメント専用ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +## 用語集 + +- **ClickHouse VPC:** ClickHouse CloudãŒæ‰€æœ‰ã™ã‚‹VPC。 +- **Customer BYOC VPC:** ClickHouse Cloudã«ã‚ˆã£ã¦ãƒ—ロビジョニングãŠã‚ˆã³ç®¡ç†ã•ã‚Œã€ClickHouse Cloud BYOCã®ãƒ‡ãƒ—ロイメントã«å°‚念ã™ã‚‹é¡§å®¢ã‚¯ãƒ©ã‚¦ãƒ‰ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã®VPC。 +- **Customer VPC** 顧客クラウドアカウントãŒæ‰€æœ‰ã™ã‚‹ä»–ã®VPCã§ã€Customer BYOC VPCã«æŽ¥ç¶šã™ã‚‹å¿…è¦ãŒã‚るアプリケーション用ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## アーキテクãƒãƒ£ + +メトリクスã¨ãƒ­ã‚°ã¯é¡§å®¢ã®BYOC VPC内ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ログã¯ç¾åœ¨ã€ãƒ­ãƒ¼ã‚«ãƒ«ã®EBSã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚次ã®ã‚¢ãƒƒãƒ—デートã§ã€ãƒ­ã‚°ã¯LogHouse(顧客ã®BYOC VPCã«ã‚ã‚‹ClickHouseサービス)ã«ä¿å­˜ã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚メトリクスã¯Prometheusã¨Thanosスタックを介ã—ã¦é¡§å®¢ã®BYOC VPC内ã«ãƒ­ãƒ¼ã‚«ãƒ«ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +
+ +BYOC Architecture + +
+ +## オンボーディングプロセス + +プライベートプレビュー中ã¯ã€ClickHouse [サãƒãƒ¼ãƒˆ](https://clickhouse.com/support/program) ã«é€£çµ¡ã™ã‚‹ã“ã¨ã§ã‚ªãƒ³ãƒœãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ãƒ—ロセスを開始ã—ã¾ã™ã€‚顧客ã¯å°‚用ã®AWSアカウントをæŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã€ä½¿ç”¨ã™ã‚‹ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã‚’知ã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ç¾æ™‚点ã§ã¯ã€ClickHouse Cloudをサãƒãƒ¼ãƒˆã—ã¦ã„る地域ã§ã®ã¿BYOCサービスã®èµ·å‹•ã‚’許å¯ã—ã¦ã„ã¾ã™ã€‚ + +BYOCã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã¯CloudFormationスタックを通ã˜ã¦ç®¡ç†ã•ã‚Œã¾ã™ã€‚ã“ã®CloudFormationスタックã¯ã€ClickHouse Cloudã®BYOCコントローラーãŒã‚¤ãƒ³ãƒ•ãƒ©ã‚’設定ãŠã‚ˆã³ç®¡ç†ã™ã‚‹ãŸã‚ã®å½¹å‰²ã‚’作æˆã™ã‚‹ã®ã¿ã§ã™ã€‚ClickHouseを実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹S3ã€VPCã€ãŠã‚ˆã³ã‚³ãƒ³ãƒ”ュートリソースã¯CloudFormationスタックã®ä¸€éƒ¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## アップグレードプロセス + +定期的ã«ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã‚’アップグレードã—ã¾ã™ã€‚ã“ã‚Œã«ã¯ã€ClickHouseデータベースã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚¢ãƒƒãƒ—グレードã€ClickHouse Operatorã€EKSã€ãŠã‚ˆã³ãã®ä»–ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒå«ã¾ã‚Œã¾ã™ã€‚ + +アップグレードをã§ãã‚‹ã ã‘シームレスã«ã™ã‚‹ã‚ˆã†åŠªã‚ã¦ã„ã¾ã™ï¼ˆä¾‹: ローリングアップグレードã¨å†èµ·å‹•ï¼‰ãŒã€ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®å¤‰æ›´ã‚„EKSノードã®ã‚¢ãƒƒãƒ—グレードãªã©ã€ä¸€éƒ¨ã®ã‚¢ãƒƒãƒ—グレードã¯ã‚µãƒ¼ãƒ“スã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãã®å ´åˆã€é¡§å®¢ã¯ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ï¼ˆä¾‹: 毎週ç«æ›œæ—¥ã®åˆå‰1時PDT)を指定ã§ãã¾ã™ã€‚ãã®ã‚ˆã†ãªã‚¢ãƒƒãƒ—グレードã¯ã€ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚ŒãŸãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ä¸­ã«ã®ã¿å®Ÿè¡Œã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ + +メンテナンスウィンドウã¯ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãŠã‚ˆã³è„†å¼±æ€§ä¿®æ­£ã«ã¯é©ç”¨ã•ã‚Œãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“れらã¯ã‚ªãƒ•ã‚µã‚¤ã‚¯ãƒ«ã‚¢ãƒƒãƒ—グレードã¨ã—ã¦å‡¦ç†ã•ã‚Œã€é¡§å®¢ã¨è¿…速ã«ã‚³ãƒŸãƒ¥ãƒ‹ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚’å–ã‚Šã€å¿…è¦ãªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã—ã€æ“作ã¸ã®å½±éŸ¿ã‚’最å°é™ã«æŠ‘ãˆã‚‹ãŸã‚ã®é©åˆ‡ãªæ™‚間を調整ã—ã¾ã™ã€‚ + +## CloudFormation IAM Roles + +### Bootstrap IAMロール + +bootstrap IAMロールã«ã¯ã“れらã®æ¨©é™ãŒã‚ã‚Šã¾ã™ï¼š + +- VPCã¨EKSクラスターã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã«å¿…è¦ãªEC2ãŠã‚ˆã³VPCæ“作。 +- ãƒã‚±ãƒƒãƒˆã‚’作æˆã™ã‚‹ãŸã‚ã«å¿…è¦ãª`s3:CreateBucket`ãªã©ã®S3æ“作ãŒå¿…è¦ã§ã™ã€‚ +- 外部DNSã«ãŠã‘ã‚‹route53ã®ãƒ¬ã‚³ãƒ¼ãƒ‰è¨­å®šã®ãŸã‚ã«`route53:*`ãŒå¿…è¦ã§ã™ã€‚ +- コントローラーãŒè¿½åŠ ã®å½¹å‰²ã‚’作æˆã™ã‚‹ãŸã‚ã«`iam:CreatePolicy`ãªã©ã®IAM関連ã®æ“作ãŒå¿…è¦ã§ã™ã€‚詳細ã¯æ¬¡ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- `ClickHouse-cloud`プリフィックスã§å§‹ã¾ã‚‹ãƒªã‚½ãƒ¼ã‚¹ã«é™å®šã•ã‚ŒãŸeks:xxæ“作。 + +### コントローラーã«ã‚ˆã£ã¦ä½œæˆã•ã‚Œã‚‹è¿½åŠ ã®IAMロール + +CloudFormationを通ã˜ã¦ä½œæˆã•ã‚ŒãŸ`ClickHouseManagementRole`ã«åŠ ãˆã¦ã€ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ©ãƒ¼ã¯ä»–ã«ã„ãã¤ã‹ã®å½¹å‰²ã‚’作æˆã—ã¾ã™ã€‚ + +ã“れらã®å½¹å‰²ã¯ã€é¡§å®¢ã®EKSクラスターã§å®Ÿè¡Œã•ã‚Œã‚‹ã‚¢ãƒ—リケーションã«ã‚ˆã£ã¦å¼•ãå—ã‘られるã“ã¨ã‚’æ„図ã—ã¦ã„ã¾ã™ã€‚ +- **State exporter role** + - ClickHouseコンãƒãƒ¼ãƒãƒ³ãƒˆãŒã‚µãƒ¼ãƒ“スã®å¥åº·æƒ…報をClickHouse Cloudã«å ±å‘Šã™ã‚‹ã‚‚ã®ã€‚ + - ClickHouse CloudãŒæ‰€æœ‰ã™ã‚‹SQSã«æ›¸ãè¾¼ã¿æ¨©é™ãŒå¿…è¦ +- **Load-balancer-controller** + - 標準的ãªAWSロードãƒãƒ©ãƒ³ã‚µãƒ¼ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ©ãƒ¼ + - ClickHouseサービスã«å¿…è¦ãªãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’管ç†ã™ã‚‹ãŸã‚ã®EBS CSIコントローラー +- **External-dns**ã€route53ã«DNS設定をä¼æ¬ã™ã‚‹ãŸã‚ +- **Cert-manager**ã€BYOCサービスドメイン用ã«TLS証明書をプロビジョニングã™ã‚‹ãŸã‚ +- **Cluster autoscaler**ã€ãƒŽãƒ¼ãƒ‰ã‚°ãƒ«ãƒ¼ãƒ—ã‚’é©å®œã‚¹ã‚±ãƒ¼ãƒ«ã™ã‚‹ãŸã‚ + +**K8s-control-plane**ã¨**k8s-worker**ロールã¯AWS EKSサービスã«ã‚ˆã£ã¦å¼•ãå—ã‘られるã“ã¨ã‚’æ„図ã—ã¦ã„ã¾ã™ã€‚ + +最後ã«ã€**data-plane-mgmt**ã¯ã‚«ã‚¹ã‚¿ãƒ ãƒªã‚½ãƒ¼ã‚¹ã®`ClickHouseCluster`ã‚„Istio Virtual Service/Gatewayãªã©ã‚’調整ã™ã‚‹ãŸã‚ã®ClickHouseクラウドコントロールプレーンコンãƒãƒ¼ãƒãƒ³ãƒˆã«è¨±å¯ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ + +## ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å¢ƒç•Œ + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€é¡§å®¢ã®BYOC VPCã¸ã®ãŠã‚ˆã³ã‹ã‚‰ã®ã•ã¾ã–ã¾ãªãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚ + +- **インãƒã‚¦ãƒ³ãƒ‰**: 顧客ã®BYOC VPCã«é€ã‚‰ã‚Œã‚‹ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã€‚ +- **アウトãƒã‚¦ãƒ³ãƒ‰**: 顧客ã®BYOC VPCã‹ã‚‰ç™ºä¿¡ã•ã‚Œã€ãã®VPC外ã®å®›å…ˆã«é€ä¿¡ã•ã‚Œã‚‹ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ +- **パブリック**: 公共ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã«å…¬é–‹ã•ã‚Œã¦ã„ã‚‹ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚¢ãƒ‰ãƒ¬ã‚¹ +- **プライベート**: VPCピアリングã€VPCプライベートリンクã€Tailscaleãªã©ã‚’通ã˜ã¦ã®ã¿ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãªãƒ—ライベートãªãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚¢ãƒ‰ãƒ¬ã‚¹ + +**Istio ingressã¯AWS NLBã®èƒŒå¾Œã«ãƒ‡ãƒ—ロイã•ã‚Œã€ClickHouseクライアントトラフィックをå—ã‘入れã¾ã™** + +*インãƒã‚¦ãƒ³ãƒ‰ã€ãƒ‘ブリック(プライベートã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™)* + +Istio ingress gatewayã¯TLSを終了ã—ã¾ã™ã€‚証明書ã¯Let's Encryptã§CertManagerã«ã‚ˆã£ã¦ãƒ—ロビジョニングã•ã‚Œã€EKSクラスター内ã«ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚Istioã¨ClickHouseé–“ã®ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã¯[AWSã«ã‚ˆã£ã¦æš—å·åŒ–](https://docs.aws.amazon.com/whitepapers/latest/logical-separation/encrypting-data-at-rest-and--in-transit.html#:~:text=All%20network%20traffic%20between%20AWS,supported%20Amazon%20EC2%20instance%20types)ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯ã€ã‚¤ãƒ³ãƒ†å…¥ã¯IP許å¯ãƒªã‚¹ãƒˆãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã§ãƒ‘ブリックインターãƒãƒƒãƒˆã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚顧客ã¯VPCピアリングを設定ã—ã¦ãƒ—ライベートã«ã—ã¦ãƒ‘ブリック接続を無効ã«ã™ã‚‹ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚アクセスを制é™ã™ã‚‹ã«[IPフィルター](/ja/cloud/security/setting-ip-filters)を設定ã™ã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚ + +**トラブルシューティングアクセス** + +ClickHouseクラウドエンジニアã¯ãƒˆãƒ©ãƒ–ルシューティングアクセスã«Tailscaleã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚BYOCデプロイメントã¸ã®è¨¼æ˜Žæ›¸ãƒ™ãƒ¼ã‚¹ã®èªè¨¼ã‚’求ã‚ã€ã‚¿ã‚¤ãƒ ãƒªãƒ¼ã«æä¾›ã•ã‚Œã¾ã™ã€‚ + +*インãƒã‚¦ãƒ³ãƒ‰ã€ãƒ‘ブリック(プライベートã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™)* + +**課金スクレイパー** + +*アウトãƒã‚¦ãƒ³ãƒ‰ã€ãƒ—ライベート* + +課金スクレイパーã¯ã€ClickHouseã‹ã‚‰èª²é‡‘データをåŽé›†ã—ã€ClickHouseクラウドãŒæ‰€æœ‰ã™ã‚‹S3ãƒã‚±ãƒƒãƒˆã«é€ä¿¡ã—ã¾ã™ã€‚スクレイパーã¯ã€ClickHouseサーãƒãƒ¼ã‚³ãƒ³ãƒ†ãƒŠã®æ¨ªã§ã‚µã‚¤ãƒ‰ã‚«ãƒ¼ãƒˆã—ã¦åƒãコンãƒãƒ¼ãƒãƒ³ãƒˆã§ã™ã€‚定期的ã«ClickHouseã®CPUã¨ãƒ¡ãƒ¢ãƒªã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’スクレイプã—ã¾ã™ã€‚åŒã˜ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯VPCゲートウェイサービスã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’介ã—ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ + +**アラート** + +*アウトãƒã‚¦ãƒ³ãƒ‰ã€ãƒ‘ブリック* + +AlertManagerã¯ã€é¡§å®¢ã®ClickHouseクラスターãŒå¥åº·ã§ã¯ãªã„ã¨ãã«ã‚¢ãƒ©ãƒ¼ãƒˆã‚’ClickHouseクラウドã«é€ä¿¡ã™ã‚‹ã‚ˆã†ã«æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚メトリクスã¨ãƒ­ã‚°ã¯é¡§å®¢ã®BYOC VPC内ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ログã¯ç¾åœ¨ã€ãƒ­ãƒ¼ã‚«ãƒ«ã®EBSã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚次ã®ã‚¢ãƒƒãƒ—デートã§ã€ãƒ­ã‚°ã¯LogHouse(顧客ã®BYOC VPCã«ã‚ã‚‹ClickHouseサービス)ã«ä¿å­˜ã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚メトリクスã¯Prometheusã¨Thanosスタックを介ã—ã¦é¡§å®¢ã®BYOC VPC内ã«ãƒ­ãƒ¼ã‚«ãƒ«ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +**サービス状態** + +*アウトãƒã‚¦ãƒ³ãƒ‰* + +State Exporterã¯ClickHouseã®ã‚µãƒ¼ãƒ“ス状態情報をClickHouseクラウド所有ã®SQSã«é€ä¿¡ã—ã¾ã™ã€‚ + +## 機能 + +### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る機能 + +- SharedMergeTree: ClickHouse Cloudã¨BYOCã¯åŒã˜ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³è¨­å®šã‚’使用 +- サービス状態を管ç†ã™ã‚‹ãŸã‚ã®ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã‚¢ã‚¯ã‚»ã‚¹ + - サãƒãƒ¼ãƒˆã•ã‚Œã‚‹æ“作ã«ã¯é–‹å§‹ã€åœæ­¢ã€çµ‚了ãŒå«ã¾ã‚Œã¾ã™ + - サービスã¨çŠ¶æ…‹ã‚’表示 +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ãƒªã‚¹ãƒˆã‚¢ +- 手動ã«ã‚ˆã‚‹åž‚ç›´ãŠã‚ˆã³æ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚° +- Falcoã«ã‚ˆã‚‹ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ç›£è¦–ã¨ã‚¢ãƒ©ãƒ¼ãƒˆï¼ˆfalco-metrics) +- Tailscaleã«ã‚ˆã‚‹ã‚¼ãƒ­ãƒˆãƒ©ã‚¹ãƒˆãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ +- 監視: クラウドコンソールã«ã¯ã‚µãƒ¼ãƒ“スã®å¥åº·ã‚’監視ã™ã‚‹ãŸã‚ã®çµ„ã¿è¾¼ã¿ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ãŒã‚ã‚Šã¾ã™ +- 中央ダッシュボードを使用ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã‚‹ç›£è¦–ã‚’é¸æŠžã™ã‚‹ãŸã‚ã®Prometheusã®ã‚¹ã‚¯ãƒ¬ã‚¤ãƒ”ング。今日ã€Prometheusã€Grafanaã€Datadogをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚セットアップã®è©³ç´°ãªæ‰‹é †ã«ã¤ã„ã¦ã¯ã€[Prometheusドキュメント](/ja/integrations/prometheus) ã‚’å‚ç…§ã—ã¦ãã ã•ã„ +- VPCピアリング +- [ã“ã®ãƒšãƒ¼ã‚¸](/ja/integrations) ã«ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„ã‚‹çµ±åˆ +- セキュアãªS3 + +### 計画ã•ã‚ŒãŸæ©Ÿèƒ½ï¼ˆç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“) + +- [AWS PrivateLink](https://aws.amazon.com/privatelink/) +- [AWS KMS](https://aws.amazon.com/kms/) 別åCMEK(顧客管ç†åž‹æš—å·åŒ–キー) +- インジェスト用ã®ClickPipes +- 自動スケーリング +- イドル化 +- MySQLインターフェース + +## FAQ + +### コンピュート + +**ã“ã®å˜ä¸€ã®EKSクラスターã«è¤‡æ•°ã®ã‚µãƒ¼ãƒ“スを作æˆã§ãã¾ã™ã‹ï¼Ÿ** + +ã¯ã„。インフラストラクãƒãƒ£ã¯ã€AWSアカウントã¨ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã®çµ„ã¿åˆã‚ã›ã”ã¨ã«ä¸€åº¦ãƒ—ロビジョニングã™ã‚‹ã ã‘ã§ã™ã€‚ + +**BYOCをサãƒãƒ¼ãƒˆã—ã¦ã„る地域ã¯ã©ã“ã§ã™ã‹ï¼Ÿ** + +BYOCã¯ClickHouse Cloudã¨åŒã˜[リージョン](/ja/cloud/reference/supported-regions#aws-regions )セットをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +**リソースオーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã¯ã‚ã‚Šã¾ã™ã‹ï¼ŸClickHouseインスタンス以外ã®ã‚µãƒ¼ãƒ“スを実行ã™ã‚‹ãŸã‚ã«å¿…è¦ãªãƒªã‚½ãƒ¼ã‚¹ã¯ä½•ã§ã™ã‹ï¼Ÿ** + +Clickhouseインスタンス(ClickHouseサーãƒãƒ¼ãŠã‚ˆã³ClickHouse Keeper)ã®ä»–ã«ã€clickhouse-operatorã€aws-cluster-autoscalerã€Istioãªã©ãªã©ã®ã‚µãƒ¼ãƒ“スや監視スタックを実行ã—ã¦ã„ã¾ã™ã€‚ + +ç¾åœ¨ã€ãれらã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ãŸã‚ã«å°‚用ã®ãƒŽãƒ¼ãƒ‰ã‚°ãƒ«ãƒ¼ãƒ—ã«3ã¤ã®m5.xlargeノード(å„AZã«1ã¤ãšã¤ï¼‰ãŒã‚ã‚Šã¾ã™ã€‚ + +### ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¨ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ + +**セットアップãŒå®Œäº†ã—ãŸå¾Œã«ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—中ã«è¨­å®šã•ã‚ŒãŸæ¨©é™ã‚’å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã‹ï¼Ÿ** + +ç¾æ™‚点ã§ã¯ä¸å¯èƒ½ã§ã™ã€‚ + +**ClickHouseエンジニアãŒãƒˆãƒ©ãƒ–ルシューティングã®ãŸã‚ã«é¡§å®¢ã®ã‚¤ãƒ³ãƒ•ãƒ©ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹éš›ã®å°†æ¥ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’検討ã—ã¦ã„ã¾ã™ã‹ï¼Ÿ** + +ã¯ã„。顧客ãŒã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’承èªã§ãるよã†ã«ã™ã‚‹é¡§å®¢åˆ¶å¾¡ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã®å®Ÿè£…ã¯ã€æˆ‘々ã®ãƒ­ãƒ¼ãƒ‰ãƒžãƒƒãƒ—ã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ç¾æ™‚点ã§ã¯ã€ã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã¸ã®ã‚¿ã‚¤ãƒ ãƒªãƒ¼ãªã‚¢ã‚¯ã‚»ã‚¹ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ã€å†…部ã®ã‚¨ã‚¹ã‚«ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒ—ロセスを経る必è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯è¨˜éŒ²ã•ã‚Œã€å½“社ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒãƒ¼ãƒ ã«ã‚ˆã£ã¦ç›£æŸ»ã•ã‚Œã¾ã™ã€‚ + +**VPCピアリングをã©ã®ã‚ˆã†ã«ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã—ã¾ã™ã‹ï¼Ÿ** + +VPCピアリングã®ä½œæˆã¨å‰Šé™¤ã¯ã€ã‚µãƒãƒ¼ãƒˆã‚¨ã‚¹ã‚«ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’通ã˜ã¦è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚å‰ææ¡ä»¶ã¨ã—ã¦ã€ãƒ”アリングã•ã‚ŒãŸVPCé–“ã§CIDR範囲ãŒé‡è¤‡ã—ã¦ã„ãªã„å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseサãƒãƒ¼ãƒˆã«ã‚ˆã£ã¦VPCピアリングã®æ§‹æˆãŒå®Œäº†ã—ãŸã‚‰ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå®Œäº†ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã„ãã¤ã‹ã®æ“作ãŒã‚ã‚Šã¾ã™ã€‚ + +1. ピアリングã•ã‚ŒãŸVPCã®AWSアカウントã§VPCピアリングリクエストをå—ã‘å–ã‚Šã€å—ã‘入れる必è¦ãŒã‚ã‚Šã¾ã™ã€‚**VPC -> Peering connections -> Actions -> Accept request**ã«ç§»å‹•ã—ã¦ãã ã•ã„。 + + +2. ピアリングã•ã‚ŒãŸVPCã®ãƒ«ãƒ¼ãƒˆãƒ†ãƒ¼ãƒ–ルを調整ã—ã¾ã™ã€‚ClickHouseインスタンスã«æŽ¥ç¶šã™ã‚‹å¿…è¦ãŒã‚るピアリングã•ã‚ŒãŸVPCã®ã‚µãƒ–ãƒãƒƒãƒˆã‚’見ã¤ã‘ã¾ã™ã€‚ã“ã®ã‚µãƒ–ãƒãƒƒãƒˆã®ãƒ«ãƒ¼ãƒˆãƒ†ãƒ¼ãƒ–ルを編集ã—ã€æ¬¡ã®æ§‹æˆã§1ã¤ã®ãƒ«ãƒ¼ãƒˆã‚’追加ã—ã¾ã™ï¼š +- é€ä¿¡å…ˆ: ClickHouse BYOC VPC CIDR (例: 10.0.0.0/16) +- ターゲット: ピアリング接続ã€pcx-12345678(ドロップダウンリストã§å®Ÿéš›ã®IDãŒè¡¨ç¤ºã•ã‚Œã‚‹ï¼‰ + +
+ +BYOC network configuration + +
+ +3. 既存ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚°ãƒ«ãƒ¼ãƒ—を確èªã—ã€BYOC VPCã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ブロックã—ãªã„ルールãŒã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +ピアリングã•ã‚ŒãŸVPCã‹ã‚‰ClickHouseサービスã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +ClickHouseサービスã«ãƒ—ライベートã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€ãƒ—ライベートロードãƒãƒ©ãƒ³ã‚µãƒ¼ã¨ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆãŒãƒ—ロビジョニングã•ã‚Œã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ”ã‚¢VPCã‹ã‚‰ãƒ—ライベートã«æŽ¥ç¶šã§ãã¾ã™ã€‚エンドãƒã‚¤ãƒ³ãƒˆã¯`-private`ã®ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ã§ã€ãƒ‘ブリックエンドãƒã‚¤ãƒ³ãƒˆã¨åŒæ§˜ã§ã™ã€‚例: +ã‚‚ã—公開エンドãƒã‚¤ãƒ³ãƒˆãŒ `h5ju65kv87.mhp0y4dmph.us-west-2.aws.byoc.clickhouse.cloud`ã§ã‚ã‚‹ãªã‚‰ã€ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã¯`h5ju65kv87-private.mhp0y4dmph.us-west-2.aws.byoc.clickhouse.cloud`ã«ãªã‚Šã¾ã™ã€‚ + +**EKSクラスター用ã«ä½œæˆã•ã‚Œã‚‹VPC IP範囲をé¸æŠžã§ãã¾ã™ã‹ï¼Ÿ** + +VPC CIDR範囲をé¸æŠžã§ãã¾ã™ã€‚ã“ã‚Œã¯VPCピアリング機能ã«å½±éŸ¿ã‚’与ãˆã‚‹ãŸã‚ã§ã™ã€‚オンボーディング時ã«ã‚µãƒãƒ¼ãƒˆãƒã‚±ãƒƒãƒˆã«è¨˜è¼‰ã—ã¦ãã ã•ã„。 + +**作æˆã•ã‚Œã‚‹VPC IP範囲ã®ã‚µã‚¤ã‚ºã¯ã©ã‚Œãらã„ã§ã™ã‹ï¼Ÿ** + +å°†æ¥ã®æ‹¡å¼µã‚’考慮ã—ã¦å°‘ãªãã¨ã‚‚/22を予約ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ãŒã€ç¸®å°ã‚’希望ã™ã‚‹å ´åˆã¯/23を使用ã—ã¦ã€30ã®ã‚µãƒ¼ãƒãƒ¼ãƒãƒƒãƒ‰ã«åˆ¶é™ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹å ´åˆã¯å¯èƒ½ã§ã™ã€‚ + +**メンテナンスã®é »åº¦ã‚’決ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã‹ï¼Ÿ** + +サãƒãƒ¼ãƒˆã«é€£çµ¡ã—ã¦ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’スケジュールã—ã¦ãã ã•ã„。少ãªãã¨ã‚‚隔週ã®ã‚¢ãƒƒãƒ—デートスケジュールã®äºˆå®šã§ã™ã€‚ + +## 観測å¯èƒ½æ€§ + +### 組ã¿è¾¼ã¿ã®ç›£è¦–ツール + +#### 観測å¯èƒ½æ€§ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ + +ClickHouse Cloudã«ã¯ã€ãƒ¡ãƒ¢ãƒªä½¿ç”¨çŽ‡ã€ã‚¯ã‚¨ãƒªãƒ¬ãƒ¼ãƒˆã€I/Oãªã©ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’表示ã™ã‚‹é«˜åº¦ãªè¦³æ¸¬å¯èƒ½æ€§ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ClickHouse Cloudã®ã‚¦ã‚§ãƒ–コンソールインターフェースã®**監視**セクションã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + +
+ +Observability dashboard + +
+ +#### 高度ãªãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ + +`system.metrics`ã€`system.events`ã€`system.asynchronous_metrics`ãªã©ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’使用ã—ã¦ã€ã‚µãƒ¼ãƒãƒ¼ã®ãƒ‘フォーマンスã¨ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨çŠ¶æ³ã‚’詳細ã«ç›£è¦–ã™ã‚‹ãŸã‚ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’カスタマイズã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +
+ +Advanced dashboard + +
+ +#### Prometheusçµ±åˆ + +ClickHouse Cloudã¯ç›£è¦–ã®ãŸã‚ã«ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’スクレイプã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã‚‹Prometheusエンドãƒã‚¤ãƒ³ãƒˆã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€Grafanaã‚„Datadogãªã©ã®ãƒ„ールã¨ã®çµ±åˆãŒå¯èƒ½ã§ã™ã€‚ + +**/metrics_allã®httpsエンドãƒã‚¤ãƒ³ãƒˆã‚’介ã—ãŸã‚µãƒ³ãƒ—ルリクエスト** + +```bash +curl --user : https://i6ro4qarho.mhp0y4dmph.us-west-2.aws.byoc.clickhouse.cloud:8443/metrics_all +``` + +**サンプルレスãƒãƒ³ã‚¹** + +```bash +# HELP ClickHouse_CustomMetric_StorageSystemTablesS3DiskBytes The amount of bytes stored on disk `s3disk` in system database +# TYPE ClickHouse_CustomMetric_StorageSystemTablesS3DiskBytes gauge +ClickHouse_CustomMetric_StorageSystemTablesS3DiskBytes{hostname="c-jet-ax-16-server-43d5baj-0"} 62660929 +# HELP ClickHouse_CustomMetric_NumberOfBrokenDetachedParts The number of broken detached parts +# TYPE ClickHouse_CustomMetric_NumberOfBrokenDetachedParts gauge +ClickHouse_CustomMetric_NumberOfBrokenDetachedParts{hostname="c-jet-ax-16-server-43d5baj-0"} 0 +# HELP ClickHouse_CustomMetric_LostPartCount The age of the oldest mutation (in seconds) +# TYPE ClickHouse_CustomMetric_LostPartCount gauge +ClickHouse_CustomMetric_LostPartCount{hostname="c-jet-ax-16-server-43d5baj-0"} 0 +# HELP ClickHouse_CustomMetric_NumberOfWarnings The number of warnings issued by the server. It usually indicates about possible misconfiguration +# TYPE ClickHouse_CustomMetric_NumberOfWarnings gauge +ClickHouse_CustomMetric_NumberOfWarnings{hostname="c-jet-ax-16-server-43d5baj-0"} 2 +# HELP ClickHouseErrorMetric_FILE_DOESNT_EXIST FILE_DOESNT_EXIST +# TYPE ClickHouseErrorMetric_FILE_DOESNT_EXIST counter +ClickHouseErrorMetric_FILE_DOESNT_EXIST{hostname="c-jet-ax-16-server-43d5baj-0",table="system.errors"} 1 +# HELP ClickHouseErrorMetric_UNKNOWN_ACCESS_TYPE UNKNOWN_ACCESS_TYPE +# TYPE ClickHouseErrorMetric_UNKNOWN_ACCESS_TYPE counter +ClickHouseErrorMetric_UNKNOWN_ACCESS_TYPE{hostname="c-jet-ax-16-server-43d5baj-0",table="system.errors"} 8 +# HELP ClickHouse_CustomMetric_TotalNumberOfErrors The total number of errors on server since the last restart +# TYPE ClickHouse_CustomMetric_TotalNumberOfErrors gauge +ClickHouse_CustomMetric_TotalNumberOfErrors{hostname="c-jet-ax-16-server-43d5baj-0"} 9 +``` + +**èªè¨¼** + +ClickHouseã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードã®ãƒšã‚¢ã‚’使用ã—ã¦èªè¨¼ã‚’è¡Œã„ã¾ã™ã€‚メトリクスをスクレイプã™ã‚‹ãŸã‚ã«æœ€å°é™ã®æ¨©é™ã§å°‚用ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚å°‘ãªãã¨ã‚‚ã€ãƒ¬ãƒ—リカ間ã§`system.custom_metrics`テーブルã¸ã®`READ`権é™ãŒå¿…è¦ã§ã™ã€‚例: + +```sql +GRANT REMOTE ON *.* TO scraping_user +GRANT SELECT ON system.custom_metrics TO scraping_user +``` + +**Prometheusã®è¨­å®š** + +以下ã¯è¨­å®šä¾‹ã§ã™ã€‚`targets`エンドãƒã‚¤ãƒ³ãƒˆã¯ClickHouseサービスã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚‚ã®ã¨åŒã˜ã§ã™ã€‚ + +```bash +global: + scrape_interval: 15s + +scrape_configs: + - job_name: "prometheus" + static_configs: + - targets: ["localhost:9090"] + - job_name: "clickhouse" + static_configs: + - targets: ["..aws.byoc.clickhouse.cloud:8443"] + scheme: https + metrics_path: "/metrics_all" + basic_auth: + username: + password: + honor_labels: true +``` + +ã¾ãŸ[ã“ã®ãƒ–ログ記事](https://clickhouse.com/blog/clickhouse-cloud-now-supports-prometheus-monitoring) ãŠã‚ˆã³ [ClickHouse用ã®Prometheusセットアップドキュメント](/ja/integrations/prometheus)ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/cloud/reference/changelog.md b/docs/ja/cloud/reference/changelog.md new file mode 100644 index 00000000000..64a33bfd759 --- /dev/null +++ b/docs/ja/cloud/reference/changelog.md @@ -0,0 +1,1048 @@ +--- + +slug: /ja/whats-new/cloud +sidebar_label: Cloud Changelog +title: Cloud Changelog + +--- + +ã“ã®ClickHouse Cloudã®å¤‰æ›´ãƒ­ã‚°ã«åŠ ãˆã€[Cloud Compatibility](/docs/ja/cloud/reference/cloud-compatibility.md)ã®ãƒšãƒ¼ã‚¸ã‚‚ã”覧ãã ã•ã„。 + +## 2024å¹´10月4æ—¥ + +### ClickHouse Cloud ㌠GCPã§ã®ãƒ™ãƒ¼ã‚¿ç‰ˆHIPAA対応サービスをæ供開始 + +ä¿è­·ã•ã‚ŒãŸå¥åº·æƒ…報(PHI)ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’強化ã—ãŸã„ã¨è€ƒãˆã¦ã„ã‚‹ãŠå®¢æ§˜ã¯ã€[Google Cloud Platform (GCP)](https://cloud.google.com/)上ã§ClickHouse Cloudã«ã‚ªãƒ³ãƒœãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ClickHouseã¯[HIPAAセキュリティルール](https://www.hhs.gov/hipaa/for-professionals/security/index.html)ã«åŸºã¥ã管ç†çš„ã€ç‰©ç†çš„ã€ãŠã‚ˆã³æŠ€è¡“çš„ãªä¿è­·ç­–を実施ã—ã€ç”¨é€”やワークロードã«å¿œã˜ã¦å®Ÿè£…å¯èƒ½ãªã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šãŒç”¨æ„ã•ã‚Œã¦ã„ã¾ã™ã€‚利用å¯èƒ½ãªã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[Security Shared Responsibility Model](/docs/ja/cloud/security/shared-responsibility-model)ã‚’ã”å‚ç…§ãã ã•ã„。 + +サービスã¯GCPã®`us-central-1`ã§ã€**Dedicated**サービスタイプã®ãŠå®¢æ§˜å‘ã‘ã«æä¾›ã•ã‚Œã€æ¥­å‹™å”力契約(BAA)ãŒå¿…è¦ã§ã™ã€‚ã“ã®æ©Ÿèƒ½ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’リクエストã™ã‚‹ã‹ã€è¿½åŠ ã®GCPã€AWSã€Azureã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã®å¾…機リストã«å‚加ã™ã‚‹ã«ã¯ã€[sales](mailto:sales@clickhouse.com)ã¾ãŸã¯[support](https://clickhouse.com/support/program)ã¾ã§ãŠå•ã„åˆã‚ã›ãã ã•ã„。 + +### Compute-Compute分離ãŒGCPã¨Azureã§ãƒ—ライベートプレビュー開始 + +最近ã€AWSã§ã®Compute-Compute分離ã®ãƒ—ライベートプレビューを発表ã—ã¾ã—ãŸãŒã€ä»Šå›žã€GCPã¨Azureã§ã‚‚利用å¯èƒ½ã«ãªã‚Šã¾ã—ãŸã€‚ + +Compute-Compute分離ã¯ã€ç‰¹å®šã®ã‚µãƒ¼ãƒ“スを読ã¿æ›¸ãã¾ãŸã¯èª­ã¿å–り専用ã®ã‚µãƒ¼ãƒ“スã¨ã—ã¦æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã€ã‚¢ãƒ—リケーションã«æœ€é©ãªã‚³ãƒ³ãƒ”ュート構æˆã‚’設計ã—ã¦ã‚³ã‚¹ãƒˆã¨ãƒ‘フォーマンスを最é©åŒ–ã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯[ドキュメントをãŠèª­ã¿ãã ã•ã„](/docs/ja/cloud/reference/compute-compute-separation)。 + +### セルフサービスã«ã‚ˆã‚‹MFAリカãƒãƒªãƒ¼ã‚³ãƒ¼ãƒ‰ + +多è¦ç´ èªè¨¼ã‚’使用ã—ã¦ã„ã‚‹ãŠå®¢æ§˜ã¯ã€æºå¸¯é›»è©±ã‚’紛失ã—ãŸå ´åˆã‚„トークンを誤ã£ã¦å‰Šé™¤ã—ãŸå ´åˆã«ä½¿ç”¨ã§ãるリカãƒãƒªãƒ¼ã‚³ãƒ¼ãƒ‰ã‚’å–å¾—ã§ãるよã†ã«ãªã‚Šã¾ã—ãŸã€‚åˆã‚ã¦MFAã«ç™»éŒ²ã™ã‚‹ãŠå®¢æ§˜ã«ã¯è¨­å®šæ™‚ã«ã‚³ãƒ¼ãƒ‰ãŒæä¾›ã•ã‚Œã¾ã™ã€‚既存ã®MFAã‚’æŒã¤ãŠå®¢æ§˜ã¯ã€æ—¢å­˜ã®MFAトークンを削除ã—ã¦æ–°ã—ã„ã‚‚ã®ã‚’追加ã™ã‚‹ã“ã¨ã§ãƒªã‚«ãƒãƒªãƒ¼ã‚³ãƒ¼ãƒ‰ã‚’å–å¾—ã§ãã¾ã™ã€‚ + +### ClickPipesã®ã‚¢ãƒƒãƒ—デート: カスタム証明書ã€ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã‚¤ãƒ³ã‚µã‚¤ãƒˆãªã©ï¼ + +ClickPipesã®æœ€æ–°ã‚¢ãƒƒãƒ—デートをã”紹介ã§ãã‚‹ã“ã¨ã‚’嬉ã—ãæ€ã„ã¾ã™ã€‚ClickPipesã¯ã€ClickHouseサービスã«ãƒ‡ãƒ¼ã‚¿ã‚’å–り込む最も簡å˜ãªæ–¹æ³•ã§ã™ï¼ã“れらã®æ–°æ©Ÿèƒ½ã¯ã€ãƒ‡ãƒ¼ã‚¿å–ã‚Šè¾¼ã¿ã®åˆ¶å¾¡ã‚’強化ã—ã€ãƒ‘フォーマンスメトリクスã¸ã®å¯è¦–性を高ã‚るよã†ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +*Kafka用カスタムèªè¨¼è¨¼æ˜Žæ›¸* + +ClickPipes for Kafkaã¯ã€SASL&公開ã®SSL/TLSを使用ã™ã‚‹Kafkaブローカー用ã®ã‚«ã‚¹ã‚¿ãƒ èªè¨¼è¨¼æ˜Žæ›¸ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ClickPipeã®è¨­å®šä¸­ã«SSL証明書セクションã«ç°¡å˜ã«è‡ªåˆ†è‡ªèº«ã®è¨¼æ˜Žæ›¸ã‚’アップロードã—ã€Kafkaã¸ã®ã‚ˆã‚Šå®‰å…¨ãªæŽ¥ç¶šã‚’確ä¿ã§ãã¾ã™ã€‚ + +*KafkaãŠã‚ˆã³Kinesisã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ãƒ¡ãƒˆãƒªã‚¯ã‚¹å°Žå…¥* + +パフォーマンスã®å¯è¦–性ã¯é‡è¦ã§ã™ã€‚ClickPipesã¯ç¾åœ¨ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒ—ロダクション(Kafkaトピックã¾ãŸã¯Kinesisストリームã‹ã‚‰ï¼‰ã‹ã‚‰ClickHouse Cloudã¸ã®å–ã‚Šè¾¼ã¿ã¾ã§ã®æ™‚é–“ã«é–¢ã™ã‚‹ã‚¤ãƒ³ã‚µã‚¤ãƒˆã‚’æä¾›ã™ã‚‹ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã‚°ãƒ©ãƒ•ã‚’特徴ã¨ã—ã¦ã„ã¾ã™ã€‚ã“ã®æ–°ã—ã„メトリクスを使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘イプラインã®ãƒ‘フォーマンスをより注æ„æ·±ã監視ã—ã€ãã‚Œã«å¿œã˜ã¦æœ€é©åŒ–ã§ãã¾ã™ã€‚ + +Latency Metrics graph + +
+ +*KafkaãŠã‚ˆã³Kinesisã®ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«(プライベートベータ)* + +高スループットã¯ã€ãƒ‡ãƒ¼ã‚¿é‡ã¨ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã®ãƒ‹ãƒ¼ã‚ºã‚’満ãŸã™ãŸã‚ã«è¿½åŠ ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’è¦æ±‚ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚クリックã ã‘ã§ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ãƒªã‚½ãƒ¼ã‚¹ã‚’より効果的ã«èª¿æ•´ã§ãる水平スケーリングをClickPipesã§ç´¹ä»‹ã—ã¦ã„ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ç¾åœ¨ãƒ—ライベートベータã§ã€è¦ä»¶ã«åŸºã¥ã„ã¦ãƒªã‚½ãƒ¼ã‚¹ã‚’æ‹¡å¼µã§ãã¾ã™ã€‚[support](https://clickhouse.com/support/program)ã«é€£çµ¡ã—ã¦ãƒ™ãƒ¼ã‚¿ç‰ˆã«å‚加ã—ã¦ãã ã•ã„。 + +*KafkaãŠã‚ˆã³Kinesisã®ç”Ÿãƒ¡ãƒƒã‚»ãƒ¼ã‚¸å–ã‚Šè¾¼ã¿* + +Kafkaã¾ãŸã¯Kinesisã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸å…¨ä½“をパースã›ãšã«å–り込むã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã—ãŸã€‚ClickPipesã¯ã€å®Œå…¨ãªãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å˜ä¸€ã®Stringカラムã«ãƒžãƒƒãƒ”ングã§ãã‚‹`_raw_message`[仮想カラム](/docs/ja/integrations/clickpipes/kafka#kafka-virtual-columns)ã®ã‚µãƒãƒ¼ãƒˆã‚’æä¾›ã—ã¦ãŠã‚Šã€ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚’å¿…è¦ã«å¿œã˜ã¦æ“作ã™ã‚‹æŸ”軟性をæä¾›ã—ã¾ã™ã€‚ + +## 2024å¹´8月29æ—¥ + +### æ–°ã—ã„Terraformプロãƒã‚¤ãƒ€ãƒ¼ ãƒãƒ¼ã‚¸ãƒ§ãƒ³ - v1.0.0 + +Terrafromを使用ã™ã‚‹ã¨ã€ClickHouse Cloudサービスをプログラムã§åˆ¶å¾¡ã—ã€æ§‹æˆã‚’コードã¨ã—ã¦ä¿å­˜ã§ãã¾ã™ã€‚ç§ãŸã¡ã®Terraformプロãƒã‚¤ãƒ€ãƒ¼ã¯20万以上ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ãŒã‚ã‚Šã€å…¬å¼ã«ãƒãƒ¼ã‚¸ãƒ§ãƒ³v1.0.0ã«ãªã‚Šã¾ã—ãŸï¼ã“ã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ãƒªãƒˆãƒ©ã‚¤ãƒ­ã‚¸ãƒƒã‚¯ã®æ”¹å–„ã‚„ã€ClickHouse Cloudサービスã«ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’追加ã™ã‚‹æ–°ã—ã„リソースãªã©ã®æ”¹è‰¯ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ [Terraform provider here](https://registry.terraform.io/providers/ClickHouse/clickhouse/latest)ãŠã‚ˆã³[完全ãªå¤‰æ›´ãƒ­ã‚°ã¯ã“ã¡ã‚‰](https://github.com/ClickHouse/terraform-provider-clickhouse/releases/tag/v1.0.0)ダウンロードã§ãã¾ã™ã€‚ + +### 2024å¹´ã®SOC 2 Type IIレãƒãƒ¼ãƒˆã¨æ›´æ–°ã•ã‚ŒãŸISO 27001èªè¨¼æ›¸ + +Azureã§æ–°ãŸã«é–‹å§‹ã•ã‚ŒãŸã‚µãƒ¼ãƒ“スã ã‘ã§ãªãã€AWSã¨GCPã§ã®ã‚µãƒ¼ãƒ“スをå«ã‚€ã€2024å¹´ã®SOC 2 Type IIレãƒãƒ¼ãƒˆã¨æ›´æ–°ã•ã‚ŒãŸISO 27001èªè¨¼æ›¸ã®åˆ©ç”¨é–‹å§‹ã®ç™ºè¡¨ã‚’誇らã—ãæ€ã„ã¾ã™ã€‚ + +SOC 2 Type IIã¯ã€ClickHouseユーザーã«æä¾›ã™ã‚‹ã‚µãƒ¼ãƒ“スã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã€å¯ç”¨æ€§ã€å‡¦ç†ã®å®Œå…¨æ€§ã€ãŠã‚ˆã³æ©Ÿå¯†æ€§ã®ç¢ºä¿ã«å‘ã‘ãŸç¶™ç¶šçš„ãªå–り組ã¿ã‚’示ã—ã¦ã„ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€ã‚¢ãƒ¡ãƒªã‚«å…¬èªä¼šè¨ˆå£«å”会(AICPA)ãŒç™ºè¡Œã™ã‚‹[SOC 2 - サービス組織用SOC: 信頼サービス基準](https://www.aicpa-cima.com/resources/landing/system-and-organization-controls-soc-suite-of-services)ãŠã‚ˆã³å›½éš›æ¨™æº–化機構(ISO)ã®[ISO/IEC 27001ã«ã¤ã„ã¦](https://www.iso.org/standard/27001)ã‚’ã”確èªãã ã•ã„。 + +ã¾ãŸã€å½“社ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãŠã‚ˆã³ã‚³ãƒ³ãƒ—ライアンス文書ã¨ãƒ¬ãƒãƒ¼ãƒˆã«ã¤ã„ã¦ã¯ã€å½“社㮠[Trust Center](https://trust.clickhouse.com/) ã‚‚ã”覧ãã ã•ã„。 + +## 2024å¹´8月15æ—¥ + +### Compute-compute分離ãŒAWSã§ãƒ—ライベートプレビュー開始 + +既存ã®ClickHouse Cloudサービスã§ã¯ã€ãƒ¬ãƒ—リカãŒèª­ã¿å–ã‚Šã¨æ›¸ãè¾¼ã¿ã®ä¸¡æ–¹ã‚’処ç†ã—ã€ç‰¹å®šã®ãƒ¬ãƒ—リカãŒç‰¹å®šã®æ“作ã®ã¿ã‚’処ç†ã™ã‚‹ã‚ˆã†ã«è¨­å®šã™ã‚‹æ–¹æ³•ãŒã‚ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚読ã¿æ›¸ãå¯èƒ½ã¾ãŸã¯èª­ã¿å–り専用ã®ã‚µãƒ¼ãƒ“スã¨ã—ã¦ç‰¹å®šã®ã‚µãƒ¼ãƒ“スを指定ã§ãã€ã‚¢ãƒ—リケーションã®æœ€é©ãªã‚³ãƒ³ãƒ”ュート構æˆã‚’設計ã—ã¦ã€ã‚³ã‚¹ãƒˆã¨ãƒ‘フォーマンスを最é©åŒ–ã™ã‚‹æ–°ã—ã„機能ã§ã‚ã‚‹Compute-compute分離ãŒç™»å ´ã—ã¾ã™ã€‚ + +æ–°ã—ã„Compute-compute分離機能を使用ã™ã‚‹ã¨ã€è¤‡æ•°ã®ã‚ªãƒ–ジェクトストレージフォルダã¨ã€åŒã˜ãƒ†ãƒ¼ãƒ–ルã€ãƒ“ューãªã©ã‚’使用ã—ã¦ã„ã‚‹å„々ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’æŒã¤è¤‡æ•°ã®ã‚³ãƒ³ãƒ”ュートノードグループを作æˆã§ãã¾ã™ã€‚[Compute-compute分離ã®è©³ç´°ã¯ã“ã¡ã‚‰](/ja/cloud/reference/compute-compute-separation)。ã“ã®æ©Ÿèƒ½ã«ãƒ—ライベートプレビューã§ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã„å ´åˆã¯ã€[サãƒãƒ¼ãƒˆã¸ã®é€£çµ¡](https://clickhouse.com/support/program)ã‚’ã—ã¦ãã ã•ã„。 + +Compute-compute分離ã®ä¾‹ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ + +### ClickPipes for S3ã¨GCSãŒGA(一般æ供)ã«ç§»è¡Œã€ç¶™ç¶šãƒ¢ãƒ¼ãƒ‰ã®ã‚µãƒãƒ¼ãƒˆ + +ClickPipesã¯ã€ClickHouse Cloudã¸ã®ãƒ‡ãƒ¼ã‚¿å–ã‚Šè¾¼ã¿ã‚’最も簡å˜ã«è¡Œã†æ–¹æ³•ã§ã™ã€‚[ClickPipes](https://clickhouse.com/cloud/clickpipes)ãŒS3ãŠã‚ˆã³GCS用ã¨ã—ã¦**一般æä¾›**ã•ã‚Œã‚‹ã“ã¨ã‚’嬉ã—ãæ€ã„ã¾ã™ã€‚ClickPipesã¯ä¸€åº¦é™ã‚Šã®ãƒãƒƒãƒå°Žå…¥ã¨ã€Œç¶™ç¶šãƒ¢ãƒ¼ãƒ‰ã€ã®ä¸¡æ–¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚å–ã‚Šè¾¼ã¿ã‚¿ã‚¹ã‚¯ã¯ç‰¹å®šã®ãƒªãƒ¢ãƒ¼ãƒˆãƒã‚±ãƒƒãƒˆã‹ã‚‰ãƒ‘ターンã«ä¸€è‡´ã™ã‚‹ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ClickHouse宛先テーブルã«ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚「継続モードã€ã§ã¯ã€ClickPipesジョブã¯å¸¸ã«å®Ÿè¡Œã•ã‚Œã€ãƒªãƒ¢ãƒ¼ãƒˆã‚ªãƒ–ジェクトストレージãƒã‚±ãƒƒãƒˆã«è¿½åŠ ã•ã‚Œã‚‹ãƒžãƒƒãƒã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å–り込んã§ã„ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ä»»æ„ã®ã‚ªãƒ–ジェクトストレージ ãƒã‚±ãƒƒãƒˆã‚’ClickHouse Cloudã¸ã®ãƒ‡ãƒ¼ã‚¿å–ã‚Šè¾¼ã¿ç”¨ã®å®Œå…¨ãªã‚¹ãƒ†ãƒ¼ã‚¸ãƒ³ã‚°ã‚¨ãƒªã‚¢ã«å¤‰ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚[関連ドキュメント](/ja/integrations/clickpipes)ã‚’ãŠèª­ã¿ãã ã•ã„。 + +## 2024å¹´7月18æ—¥ + +### Prometheusã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆãŒä¸€èˆ¬æ供㫠+ +å‰å›žã®ã‚¯ãƒ©ã‚¦ãƒ‰å¤‰æ›´ãƒ­ã‚°ã§ã€ClickHouse Cloudã‹ã‚‰[Prometheus](https://prometheus.io/)メトリクスをエクスãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®ãƒ—ライベートプレビューを発表ã—ã¾ã—ãŸã€‚ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€[Grafana](https://grafana.com/)ã‚„[Datadog](https://www.datadoghq.com/)ãªã©ã®ãƒ„ールã§å¯è¦–化ã™ã‚‹ãŸã‚ã«ã€[ClickHouse Cloud API](/ja/cloud/manage/api/api-overview)ã‹ã‚‰ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ãŒ**一般æä¾›**ã•ã‚Œã‚‹ã“ã¨ã‚’嬉ã—ãæ€ã„ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã®è©³ç´°ã¯[ドキュメント](/ja/integrations/prometheus)ã‚’ã”å‚ç…§ãã ã•ã„。 + +### クラウドコンソールã®ãƒ†ãƒ¼ãƒ–ルインスペクター + +ClickHouseã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルを調査ã—ã¦ã‚¹ã‚­ãƒ¼ãƒžã‚’確èªã™ã‚‹ãŸã‚ã«[`DESCRIBE`](/ja/sql-reference/statements/describe-table)ãªã©ã®ã‚³ãƒžãƒ³ãƒ‰ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«å‡ºåŠ›ã•ã‚Œã¾ã™ãŒã€ãƒ†ãƒ¼ãƒ–ルã¨ã‚«ãƒ©ãƒ ã«é–¢ã™ã‚‹ã™ã¹ã¦ã®é–¢é€£ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ã¯è¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚’組ã¿åˆã‚ã›ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€ã—ã°ã—ã°ä¾¿åˆ©ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +クラウドコンソールã«**テーブル インスペクター**ã‚’æ–°ãŸã«å°Žå…¥ã—ã¾ã—ãŸã€‚ã“ã‚Œã«ã‚ˆã‚Šã€SQLを書ãå¿…è¦ãªãUI上ã§é‡è¦ãªãƒ†ãƒ¼ãƒ–ルã¨ã‚«ãƒ©ãƒ æƒ…報をå–å¾—ã§ãã¾ã™ã€‚クラウドコンソールã§ãƒ†ãƒ¼ãƒ–ルインスペクターを試ã—ã¦ã¿ã¦ãã ã•ã„。スキーマã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã€åœ§ç¸®ã€ãã®ä»–ã®æƒ…報を一ã¤ã®çµ±ä¸€ã•ã‚ŒãŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã§æä¾›ã—ã¾ã™ã€‚ + +テーブルインスペクターUI + +### æ–°ã—ã„JavaクライアントAPI + +[Java Client](https://github.com/ClickHouse/clickhouse-java)ã¯ã€ClickHouseã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«æœ€ã‚‚人気ã®ã‚るクライアントã®ä¸€ã¤ã§ã™ã€‚ã“れをã•ã‚‰ã«ç°¡å˜ã§ç›´æ„Ÿçš„ã«ä½¿ç”¨ã§ãるよã†ã«ã—ãŸã„ã¨è€ƒãˆã¦ãŠã‚Šã€æ–°ã—ã„API設計ã¨ã•ã¾ã–ã¾ãªãƒ‘フォーマンス最é©åŒ–ã‚’å«ã‚€å¤‰æ›´ã‚’è¡Œã„ã¾ã—ãŸã€‚ã“ã‚Œã«ã‚ˆã‚Šã€Javaアプリケーションã‹ã‚‰ClickHouseã¸ã®æŽ¥ç¶šãŒå¤§å¹…ã«å®¹æ˜“ã«ãªã‚Šã¾ã™ã€‚[ã“ã¡ã‚‰ã®ãƒ–ログ投稿](https://clickhouse.com/blog/java-client-sequel)ã§ã€æ›´æ–°ã•ã‚ŒãŸJavaクライアントã®ä½¿ç”¨æ–¹æ³•ã«ã¤ã„ã¦è©³ã—ããŠèª­ã¿ã„ãŸã ã‘ã¾ã™ã€‚ + +### æ–°ã—ã„アナライザーãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹åŒ– + +éŽåŽ»æ•°å¹´ã«ã‚ãŸã‚Šã€ã‚¯ã‚¨ãƒªã‚¢ãƒŠãƒªã‚·ã‚¹ã¨æœ€é©åŒ–ã®ãŸã‚ã®æ–°ã—ã„アナライザーã«å–り組んã§ã„ã¾ã™ã€‚ã“ã®ã‚¢ãƒŠãƒ©ã‚¤ã‚¶ãƒ¼ã¯ã‚¯ã‚¨ãƒªæ€§èƒ½ã‚’å‘上ã•ã›ã€ã•ã‚‰ãªã‚‹æœ€é©åŒ–ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã‚Œã«ã¯ã€ã‚ˆã‚Šé«˜é€Ÿã‹ã¤åŠ¹çŽ‡çš„ãª`JOIN`ã‚’å«ã¿ã¾ã™ã€‚以å‰ã¯ã€ã“ã®æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹ãŸã‚ã«æ–°ã—ã„ユーザーã¯`allow_experimental_analyzer`設定を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã—ãŸã€‚ã“ã®æ”¹è‰¯ã•ã‚ŒãŸã‚¢ãƒŠãƒ©ã‚¤ã‚¶ãƒ¼ã¯æ–°ã—ã„ClickHouse Cloudサービスã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§åˆ©ç”¨ã§ãã¾ã™ã€‚ + +ã•ã‚‰ãªã‚‹æœ€é©åŒ–を計画ã—ã¦ãŠã‚Šã€ã‚¢ãƒŠãƒ©ã‚¤ã‚¶ãƒ¼ã®æ”¹å–„ãŒç¶šãã“ã¨ã‚’ãŠæ¥½ã—ã¿ãã ã•ã„ï¼ + +## 2024å¹´6月28æ—¥ + +### ClickHouse CloudãŒMicrosoft Azureã§ä¸€èˆ¬æä¾›é–‹å§‹ï¼ + +[今年ã®5月](https://clickhouse.com/blog/clickhouse-cloud-is-now-on-azure-in-public-beta)ã«ãƒ™ãƒ¼ã‚¿ç‰ˆã§Microsoft Azureサãƒãƒ¼ãƒˆã‚’最åˆã«ç™ºè¡¨ã—ã¾ã—ãŸã€‚最新ã®ã‚¯ãƒ©ã‚¦ãƒ‰ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€Azureã®ã‚µãƒãƒ¼ãƒˆãŒãƒ™ãƒ¼ã‚¿ã‹ã‚‰ä¸€èˆ¬æä¾›ã¸ç§»è¡Œã—ã¾ã™ã€‚ClickHouse Cloudã¯AWSã€Google Cloud Platformã€ãã—ã¦Microsoft Azureã¨ã„ã†ä¸‰å¤§ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ラットフォームã®ã™ã¹ã¦ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã«ã¯ã€[Microsoft Azure Marketplace](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/clickhouse.clickhouse_cloud)を通ã˜ã¦ã‚µãƒ–スクリプションをサãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ã‚‚å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ã‚µãƒ¼ãƒ“スã¯æœ€åˆã«ä»¥ä¸‹ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ï¼š +- 米国:West US 3(アリゾナ) +- 米国:East US 2(ãƒãƒ¼ã‚¸ãƒ‹ã‚¢ï¼‰ +- ヨーロッパ:Germany West Central(フランクフルト) + +特定ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã§ã®ã‚µãƒãƒ¼ãƒˆã‚’ã”希望ã®å ´åˆã¯ã€[ã“ã¡ã‚‰ã‹ã‚‰ã”連絡ãã ã•ã„](https://clickhouse.com/support/program)。 + +### クエリログインサイト + +æ–°ã—ã„クエリインサイトUI in ClickHouse Cloudã®ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã¯ã€ClickHouse内蔵ã®ã‚¯ã‚¨ãƒªãƒ­ã‚°ã®ä½¿ç”¨ã‚’大幅ã«ç°¡å˜ã«ã—ã¾ã™ã€‚ClickHouseã®`system.query_log`テーブルã¯ã€ã‚¯ã‚¨ãƒªæœ€é©åŒ–ã€ãƒ‡ãƒãƒƒã‚°ã€ãŠã‚ˆã³ã‚¯ãƒ©ã‚¹ã‚¿å…¨ä½“ã®å¥å…¨æ€§ã¨æ€§èƒ½ã®ç›£è¦–ã«ã¨ã£ã¦é‡è¦ãªæƒ…å ±æºã§ã™ã€‚ãŸã ã—ã€70以上ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¨ã‚¯ã‚¨ãƒªã”ã¨ã«è¤‡æ•°ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒã‚ã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªãƒ­ã‚°ã‚’ç†è§£ã™ã‚‹ã“ã¨ã¯æ€¥ãªå­¦ç¿’曲線を伴ã„ã¾ã™ã€‚クエリインサイトã®ã“ã®åˆæœŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ã‚¯ã‚¨ãƒªãƒ‡ãƒãƒƒã‚°ã¨æœ€é©åŒ–パターンã®ç°¡ç´ åŒ–ã®ãŸã‚ã®ãƒ–ループリントをæä¾›ã—ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã‚’ã•ã‚‰ã«ç™ºå±•ã•ã›ã¦ã„ã中ã§ã®ãƒ•ã‚£ãƒ¼ãƒ‰ãƒãƒƒã‚¯ã‚’ãŠå¾…ã¡ã—ã¦ã„ã¾ã™ã€ãœã²ã”æ„見をãŠå¯„ã›ãã ã•ã„ï¼ + +クエリインサイトUI + +### Prometheusã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆï¼ˆãƒ—ライベートプレビュー) + +ãŠãらã最も求ã‚られã¦ã„る機能ã®ä¸€ã¤ï¼šClickHouse Cloudã‹ã‚‰[Prometheus](https://prometheus.io/)メトリクスを[Grafana](https://grafana.com/)ã‚„[Datadog](https://www.datadoghq.com/)ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã¦å¯è¦–化ã§ãるよã†ã«ãªã‚Šã¾ã—ãŸã€‚Prometheusã¯ã€ClickHouseを監視ã—ã€ã‚«ã‚¹ã‚¿ãƒ ã‚¢ãƒ©ãƒ¼ãƒˆã‚’設定ã™ã‚‹ãŸã‚ã®ã‚ªãƒ¼ãƒ—ンソースソリューションをæä¾›ã—ã¾ã™ã€‚ClickHouse Cloudサービス用ã®Prometheusメトリクスã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯[ClickHouse Cloud API](https://clickhouse.com/docs/ja/integrations/prometheus)を介ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ç¾åœ¨ãƒ—ライベートプレビューã§ã™ã€‚組織用ã«ã“ã®æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹ã«ã¯ã€[サãƒãƒ¼ãƒˆãƒãƒ¼ãƒ ](https://clickhouse.com/support/program)ã¾ã§ã”連絡ãã ã•ã„。 + +Grafanaã¨ã®Prometheusメトリクス + +### ãã®ä»–ã®æ©Ÿèƒ½ï¼š +- [カスタマイズå¯èƒ½ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—](/ja/cloud/manage/backups#configurable-backups)ã§ã€é »åº¦ã€ä¿æŒã€ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ãªã©ã®ã‚«ã‚¹ã‚¿ãƒ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãƒãƒªã‚·ãƒ¼ã‚’設定å¯èƒ½ã§ã™ã€‚ + +## 2024å¹´6月13æ—¥ + +### Kafka ClickPipesコãƒã‚¯ã‚¿ç”¨ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã®è¨­å®šå¯èƒ½æ€§ï¼ˆãƒ™ãƒ¼ã‚¿ç‰ˆï¼‰ + +ã“ã‚Œã¾ã§ã€æ–°ã—ã„[Kafkaコãƒã‚¯ã‚¿ç”¨ClickPipes](/docs/ja/integrations/clickpipes/kafka)をセットアップã™ã‚‹ãŸã³ã«ã€å¸¸ã«Kafkaトピックã®æœ€åˆã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’消費ã—ã¦ã„ã¾ã—ãŸã€‚ã“ã®çŠ¶æ³ã§ã¯ã€æ­´å²çš„データã®å†å‡¦ç†ãŒå¿…è¦ãªå ´åˆã€ã¾ãŸã¯æ–°ã—ã„ç€ä¿¡ãƒ‡ãƒ¼ã‚¿ã‚’監視ã™ã‚‹å ´åˆã€ã¾ãŸã¯ç‰¹å®šã®ãƒã‚¤ãƒ³ãƒˆã‹ã‚‰å†é–‹ã™ã‚‹å ´åˆã«ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«å分ã«æŸ”軟ã§ã¯ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickPipes for Kafkaã«ã¯ã€Kafkaトピックã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿æ¶ˆè²»ã«å¯¾ã™ã‚‹æŸ”軟性ã¨åˆ¶å¾¡ã‚’強化ã™ã‚‹æ–°æ©Ÿèƒ½ãŒè¿½åŠ ã•ã‚Œã¾ã—ãŸã€‚データã®æ¶ˆè²»ã‚’開始ã™ã‚‹ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’設定ã§ãã¾ã™ã€‚ + +é¸æŠžå¯èƒ½ãªã‚ªãƒ—ションã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š +- 最åˆã‹ã‚‰: Kafkaトピックã®éžå¸¸ã«é–‹å§‹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã®æ¶ˆè²»ã‚’開始ã—ã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションã¯ã€ã™ã¹ã¦ã®æ­´å²çš„データをå†å‡¦ç†ã™ã‚‹å¿…è¦ãŒã‚るユーザーã«ç†æƒ³çš„ã§ã™ã€‚ +- 最新ã‹ã‚‰: 最新ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã®æ¶ˆè²»ã‚’始ã‚ã¾ã™ã€‚ã“ã‚Œã¯ã€æ–°ã—ã„メッセージã«ã®ã¿é–¢å¿ƒã®ã‚るユーザーã«ã¨ã£ã¦ä¾¿åˆ©ã§ã™ã€‚ +- タイムスタンプã‹ã‚‰: 特定ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã§ç”Ÿæˆã•ã‚ŒãŸã¾ãŸã¯ãã®å¾Œã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã®æ¶ˆè²»ã‚’開始ã—ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€ã‚ˆã‚Šæ­£ç¢ºãªåˆ¶å¾¡ãŒå¯èƒ½ã¨ãªã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ­£ç¢ºãªæ™‚点ã‹ã‚‰ã®å‡¦ç†å†é–‹ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +Kafkaコãƒã‚¯ã‚¿ç”¨ã‚ªãƒ•ã‚»ãƒƒãƒˆã®è¨­å®š + +### 高速リリースãƒãƒ£ãƒ³ãƒãƒ«ã¸ã®ã‚µãƒ¼ãƒ“ス登録 + +高速リリースãƒãƒ£ãƒ³ãƒãƒ«ã«ã‚ˆã‚Šã€å¾“æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚ˆã‚Šã‚‚æ—©ãサービスã®æ›´æ–°ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹ãŸã‚ã«ã¯ã‚µãƒãƒ¼ãƒˆãƒãƒ¼ãƒ ã®æ”¯æ´ãŒå¿…è¦ã§ã—ãŸãŒã€ç¾åœ¨ã§ã¯ClickHouse Cloudコンソールを使用ã—ã¦ã“ã®æ©Ÿèƒ½ã‚’サービスã«ç›´æŽ¥æœ‰åŠ¹åŒ–ã§ãã¾ã™ã€‚**設定**ã«ç§»å‹•ã—ã€**高速リリースã«ç™»éŒ²**をクリックã™ã‚‹ã ã‘ã§ã™ã€‚ã“ã‚Œã§ã€æ›´æ–°ãŒã§ã次第ãã®éƒ½åº¦å—ã‘å–ã‚Šã¾ã™ï¼ + +高速リリースã«ç™»éŒ² + +### Terraformã«ã‚ˆã‚‹æ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã®ã‚µãƒãƒ¼ãƒˆ + +ClickHouse Cloudã¯[水平スケーリング](/docs/ja/manage/scaling#vertical-and-horizontal-scaling)ã€ã™ãªã‚ã¡åŒã˜ã‚µã‚¤ã‚ºã®ãƒ¬ãƒ—リカをサービスã«è¿½åŠ ã™ã‚‹èƒ½åŠ›ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚水平スケーリングã¯ã€ãƒ‘フォーマンスã¨ä¸¦è¡Œæ€§ã‚’å‘上ã•ã›ã¦ä¸¦è¡Œã‚¯ã‚¨ãƒªã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚以å‰ã¯ã€ClickHouse CloudコンソールやAPIを使用ã—ã¦ä»–ã®ãƒ¬ãƒ—リカを追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã—ãŸãŒã€ç¾åœ¨ã§ã¯Terraformを使用ã—ã¦ã‚µãƒ¼ãƒ“スã‹ã‚‰ãƒ¬ãƒ—リカを追加ã¾ãŸã¯å‰Šé™¤ã§ãã€å¿…è¦ã«å¿œã˜ã¦ClickHouseサービスをプログラムã§ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã§ãã¾ã™ã€‚ + +詳細ã«ã¤ã„ã¦ã¯ã€[ClickHouse Terraformプロãƒã‚¤ãƒ€](https://registry.terraform.io/providers/ClickHouse/clickhouse/latest/docs)ã‚’ã”覧ãã ã•ã„。 + +## 2024å¹´5月30æ—¥ + +### ãƒãƒ¼ãƒ ãƒ¡ã‚¤ãƒˆã¨ã‚¯ã‚¨ãƒªã‚’共有 + +SQLクエリを書ã„ãŸå ´åˆã€ãã®ã‚¯ã‚¨ãƒªãŒã‚ãªãŸã®ãƒãƒ¼ãƒ ã®ä»–ã®ãƒ¡ãƒ³ãƒãƒ¼ã«ã‚‚役立ã¤å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚以å‰ã¯ã€ã‚¯ã‚¨ãƒªã‚’Slackやメールã§é€ä¿¡ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ã‚ãªãŸãŒå¤‰æ›´ã‚’加ãˆãŸå ´åˆã«è‡ªå‹•ã§ãã®ã‚¯ã‚¨ãƒªã‚’å—ã‘å–る方法ãŒã‚ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚ + +ClickHouse Cloudコンソールを通ã˜ã¦ã‚¯ã‚¨ãƒªã‚’ç°¡å˜ã«å…±æœ‰ã§ãã‚‹ã“ã¨ã‚’ã†ã‚Œã—ãæ€ã„ã¾ã™ã€‚クエリエディタã‹ã‚‰ã€ã‚¯ã‚¨ãƒªã‚’ãƒãƒ¼ãƒ å…¨ä½“ã¾ãŸã¯ç‰¹å®šã®ãƒ¡ãƒ³ãƒãƒ¼ã¨ç›´æŽ¥å…±æœ‰ã§ãã¾ã™ã€‚ã¾ãŸã€èª­ã¿å–ã‚Šã¾ãŸã¯æ›¸ãè¾¼ã¿å°‚用アクセスã¨ã—ã¦æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚クエリエディタã®**共有**ボタンをクリックã—ã¦ã€æ–°ã—ã„共有クエリ機能をãŠè©¦ã—ãã ã•ã„。 + +クエリを共有 + +### ClickHouse CloudãŒMicrosoft Azureã§ãƒ™ãƒ¼ã‚¿ç‰ˆæ供開始 + +Microsoft Azureã§ClickHouse Cloudサービスを作æˆã™ã‚‹æ©Ÿèƒ½ã‚’ã¤ã„ã«é–‹å§‹ã—ã¾ã—ãŸï¼ã™ã§ã«å¤šãã®é¡§å®¢ãŒãƒ—ライベートプレビュー プログラムã®ä¸€ç’°ã¨ã—ã¦Azure上ã§ClickHouse Cloudを本番ã§ä½¿ç”¨ã—ã¦ã„ã¾ã™ã€‚今後ã€ä»»æ„ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒAzureã«è‡ªèº«ã®ã‚µãƒ¼ãƒ“スを作æˆã§ãã¾ã™ã€‚AWSãŠã‚ˆã³GCPã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ClickHouse機能ã¯Azureã§ã‚‚動作ã—ã¾ã™ã€‚ + +ClickHouse Cloud for Azureã¯æ¬¡ã®æ•°é€±é–“以内ã«ä¸€èˆ¬æä¾›ã«å‘ã‘ãŸæº–備を進ã‚ã¦ã„ã¾ã™ã€‚[ã“ã®ãƒ–ログ投稿をãŠèª­ã¿ãã ã•ã„](https://clickhouse.com/blog/clickhouse-cloud-is-now-on-azure-in-public-beta) ã¾ãŸã¯ClickHouse Cloudコンソールを通ã˜ã¦Azureを使用ã—ã¦æ–°ã—ã„サービスを作æˆã—ã¦ãã ã•ã„。 + +注æ„: ç¾æ™‚点ã§ã¯Azureã®**開発**サービスã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +### クラウドコンソールã«ã‚ˆã‚‹ãƒ—ライベートリンクã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ— + +ç§ãŸã¡ã®ãƒ—ライベートリンク機能ã¯ã€ClickHouse Cloudサービスを自分ã®ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ロãƒã‚¤ãƒ€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆå†…ã®å†…部サービスã«æŽ¥ç¶šã—ã€ãƒ‘ブリックインターãƒãƒƒãƒˆã«ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’é€ä¿¡ã™ã‚‹ã“ã¨ãªãコスト削減ã¨ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’強化ã—ã¾ã™ã€‚以å‰ã¯ã€è¨­å®šãŒé›£ã—ãã€ClickHouse Cloud APIã®ä½¿ç”¨ãŒå¿…è¦ã§ã—ãŸã€‚ + +ç¾åœ¨ã§ã¯ã€ClickHouse Cloudコンソールã‹ã‚‰ãƒœã‚¿ãƒ³ã‚’数回クリックã™ã‚‹ã ã‘ã§ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’設定ã§ãã¾ã™ã€‚サービス㮠**設定** ã«ç§»å‹•ã—ã€**セキュリティ** セクション㧠**プライベートエンドãƒã‚¤ãƒ³ãƒˆã®è¨­å®š** をクリックã™ã‚‹ã ã‘ã§ã™ã€‚ + +![プライベートエンドãƒã‚¤ãƒ³ãƒˆã®è¨­å®š](./images/may-30-private-endpoints.png) + +## 2024å¹´5月17æ—¥ + +### Amazon Kinesisを使用ã—ãŸClickPipesã«ã‚ˆã‚‹ãƒ‡ãƒ¼ã‚¿å–ã‚Šè¾¼ã¿ï¼ˆBeta) + +ClickPipesã¯ã‚¯ãƒªãƒƒã‚¯ãƒã‚¦ã‚¹ã‚¯ãƒ©ã‚¦ãƒ‰ã«ã‚ˆã‚‹ã‚³ãƒ¼ãƒ‰ä¸è¦ã®ãƒ‡ãƒ¼ã‚¿å–ã‚Šè¾¼ã¿ç‹¬è‡ªã‚µãƒ¼ãƒ“スã§ã™ã€‚Amazon Kinesisã¯AWSã®ãƒ•ãƒ«ãƒžãƒãƒ¼ã‚¸ãƒ‰ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã‚µãƒ¼ãƒ“スã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’å—ä¿¡ã—ä¿å­˜ã—ã€å‡¦ç†ã™ã‚‹ãŸã‚ã«ç”¨ã„られã¾ã™ã€‚最もリクエストã®ã‚ã‚‹çµ±åˆã®ä¸€ã¤ã§ã‚ã‚‹Amazon Kinesisã®ClickPipes betaを開始ã—ã¾ã—ãŸã€‚ç§ãŸã¡ã¯ClickPipesã«ã•ã‚‰ã«å¤šãã®çµ±åˆã‚’追加ã—ã¦ã„ã予定ã§ã™ã®ã§ã€ã©ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã»ã—ã„ã‹æ•™ãˆã¦ãã ã•ã„ï¼ã“ã®æ©Ÿèƒ½ã®è©³ç´°ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](https://clickhouse.com/blog/clickpipes-amazon-kinesis)ã‚’ãŠèª­ã¿ãã ã•ã„。 + +クラウドコンソールã§æ–°ã—ã„Amazon Kinesisçµ±åˆã‚’ClickPipesã§è©¦ã—ã¦ã¿ã¦ãã ã•ã„: + +![Amazon Kinesis on ClickPipes](./images/may-17-kinesis.png) + +### カスタマイズå¯èƒ½ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— (プライベート プレビュー) + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ï¼ˆã“む論ã˜ã‚‹ã“ã¨ãªã)ã«ã¨ã£ã¦é‡è¦ã§ã™ã€‚ClickHouse Cloudã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯åˆæ—¥ã‹ã‚‰éžå¸¸ã«é‡è¦–ã—ã¦ã„ã¾ã™ã€‚今週ã€ã‚ˆã‚Šå¤šãã®æŸ”軟性をæŒãŸã›ã‚‹ãŸã‚ã®ã‚µãƒ¼ãƒ“スã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’å¯èƒ½ã«ã™ã‚‹ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºå¯èƒ½ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を開始ã—ã¾ã—ãŸã€‚開始時刻ã€ä¿æŒã€ãŠã‚ˆã³é »åº¦ã®åˆ¶å¾¡ãŒå¯èƒ½ã«ãªã‚Šã¾ã—ãŸã€‚ã“ã®æ©Ÿèƒ½ã¯**本番用**ãŠã‚ˆã³**専用**サービスå‘ã‘ã«æä¾›ã•ã‚Œã¦ãŠã‚Šã€**開発**サービスã«ã¯å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“。ã“ã®æ©Ÿèƒ½ã¯ãƒ—ライベートプレビューã§ã‚ã‚‹ãŸã‚ã€ã“ã®æ©Ÿèƒ½ã‚’サービス用ã«æœ‰åŠ¹ã«ã™ã‚‹ã«ã¯support@clickhouse.comã¾ã§ãŠå•ã„åˆã‚ã›ãã ã•ã„。[カスタマイズå¯èƒ½ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®è©³ç´°ã¯ã“ã¡ã‚‰](https://clickhouse.com/blog/configurable-backups-in-clickhouse-cloud). + +### SQLクエリã‹ã‚‰APIを作æˆï¼ˆãƒ™ãƒ¼ã‚¿ç‰ˆï¼‰ + +ClickHouse用ã«SQLクエリを書ãã¨ã€ã‚¢ãƒ—リケーションã¸ã®ã‚¯ã‚¨ãƒªå…¬é–‹ã®ãŸã‚ã«ClickHouseã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®ãƒ‰ãƒ©ã‚¤ãƒãƒ¼ãŒå¿…è¦ã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€**クエリエンドãƒã‚¤ãƒ³ãƒˆ**機能を使ã£ã¦ã€ä»»æ„ã®è¨­å®šã‚’è¡Œã‚ãšã«APIã‹ã‚‰SQLクエリを直接実行ã§ãã¾ã™ã€‚クエリエンドãƒã‚¤ãƒ³ãƒˆã¯JSONã€CSVã€ã¾ãŸã¯TSVã‚’è¿”ã™ã“ã¨ãŒã§ãã¾ã™ã€‚クラウドコンソール内㮠**共有** ボタンをクリックã—ã¦ã€ã“ã®æ–°ã—ã„クエリ機能を試ã—ã¦ã¿ã¦ãã ã•ã„。[クエリエンドãƒã‚¤ãƒ³ãƒˆã®è©³ç´°ã¯ã“ã¡ã‚‰](https://clickhouse.com/blog/automatic-query-endpoints). + +クエリエンドãƒã‚¤ãƒ³ãƒˆã‚’設定 + +### å…¬å¼ClickHouseèªå®šãŒåˆ©ç”¨å¯èƒ½ã« + +ClickHouse Developトレーニングコースã«ã¯12ã®ç„¡æ–™ãƒˆãƒ¬ãƒ¼ãƒ‹ãƒ³ã‚°ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ãŒã‚ã‚Šã¾ã™ã€‚今週ã¾ã§ã€ClickHouseã®å…¬å¼ã®ç¿’熟度を証明ã™ã‚‹æ–¹æ³•ãŒã‚ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚ç¾åœ¨ã€**ClickHouseèªå®šé–‹ç™ºè€…**ã¨ãªã‚‹ãŸã‚ã®å…¬å¼è©¦é¨“を開始ã—ã¾ã—ãŸã€‚ã“ã®è©¦é¨“を完了ã™ã‚‹ã“ã¨ã§ã€ç¾åœ¨ãŠã‚ˆã³å°†æ¥ã®é›‡ç”¨ä¸»ã«å¯¾ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿å–ã‚Šè¾¼ã¿ã€ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã€åˆ†æžã€ãƒ‘フォーマンス最é©åŒ–ãªã©ã®ãƒˆãƒ”ックã«ãŠã‘ã‚‹ClickHouseã®ç¿’熟度を共有ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚[ã“ã¡ã‚‰ã§è©¦é¨“ã‚’å—ã‘ã‚‹](https://clickhouse.com/learn/certification)ã“ã¨ãŒã§ãã€ClickHouseèªå®šã«ã¤ã„ã¦[ブログ投稿を読む](https://clickhouse.com/blog/first-official-clickhouse-certification)ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## 2024å¹´4月25æ—¥ + +### S3ãŠã‚ˆã³GCSã‹ã‚‰ClickPipesを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ロード + +æ–°ã—ãリリースã•ã‚ŒãŸã‚¯ãƒ©ã‚¦ãƒ‰ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã§ã¯ã€â€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹â€ã¨å‘¼ã°ã‚Œã‚‹æ–°ã—ã„セクションãŒã‚ã‚Šã¾ã™ã€‚ã“ã®â€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹â€ãƒšãƒ¼ã‚¸ã¯ã€ClickPipesã«ã‚ˆã£ã¦å‹•ä½œã—ã€ClickHouse Cloudã«ã•ã¾ã–ã¾ãªã‚½ãƒ¼ã‚¹ã‹ã‚‰ç°¡å˜ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã§ãã¾ã™ã€‚ + +最新ã®ClickPipesã®æ›´æ–°ã§ã¯ã€Amazon S3ãŠã‚ˆã³Google Cloud Storageã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’直接アップロードã™ã‚‹æ©Ÿèƒ½ãŒè¿½åŠ ã•ã‚Œã¾ã—ãŸã€‚組ã¿è¾¼ã¿ã®ãƒ†ãƒ¼ãƒ–ル関数を引ã続ã使用ã§ãã¾ã™ãŒã€ClickPipesã¯UIを通ã˜ãŸå®Œå…¨ã«ç®¡ç†ã•ã‚ŒãŸã‚µãƒ¼ãƒ“スã§ã€S3ãŠã‚ˆã³GCSã‹ã‚‰æ•°ã‚¯ãƒªãƒƒã‚¯ã§ãƒ‡ãƒ¼ã‚¿ã‚’å–り込むã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã¾ã ãƒ—ライベートプレビューã§ã™ãŒã€ã‚¯ãƒ©ã‚¦ãƒ‰ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã§è©¦ã—ã¦ã¿ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![ClickPipes S3 and GCS](./images/clickpipes-s3-gcs.png) + +### Fivetranを使用ã—ã¦500以上ã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰ClickHouse Cloudã«ãƒ‡ãƒ¼ã‚¿ã‚’ロード + +ClickHouseã¯å¤§è¦æ¨¡ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’迅速ã«ã‚¯ã‚¨ãƒªã§ãã¾ã™ãŒã€ã‚‚ã¡ã‚ん最åˆã«ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«æŒ¿å…¥ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚Fivetranã®åŒ…括的ãªã‚³ãƒã‚¯ã‚¿ç¯„囲を利用ã™ã‚Œã°ã€Zendeskã‚„Slackãªã©ã®ãŠæ°—ã«å…¥ã‚Šã®ã‚¢ãƒ—リケーションã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ç´ æ—©ãロードã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚Fivetranã®æ–°ã—ã„ClickHouse宛先を使用ã—ã¦ã€ã‚¢ãƒ—リケーションデータã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã—ã¦ClickHouseを指定ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +ã“ã‚Œã¯ç§ãŸã¡ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒãƒ¼ãƒ ãŒå¤šãã®åŠªåŠ›ã‚’é‡ã­ã¦æ§‹ç¯‰ã—ãŸã‚ªãƒ¼ãƒ—ンソースã®çµ±åˆã§ã™ã€‚ç§ãŸã¡ã®[リリースブログ投稿](https://clickhouse.com/blog/fivetran-destination-clickhouse-cloud)ãŠã‚ˆã³[GitHubリãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/clickhouse-fivetran-destination)を確èªã§ãã¾ã™ã€‚ + +### ãã®ä»–ã®å¤‰æ›´ + +**コンソールã®å¤‰æ›´** +- SQLコンソールã§ã®å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚µãƒãƒ¼ãƒˆ + +**インテグレーションã®å¤‰æ›´** +- ClickPipes Kafkaコãƒã‚¯ã‚¿ã¯è¤‡æ•°ã®ãƒ–ローカー設定をサãƒãƒ¼ãƒˆã—ã¾ã™ +- ODBCドライãƒãƒ¼ã®æ§‹æˆã‚ªãƒ—ションを指定ã™ã‚‹PowerBIコãƒã‚¯ã‚¿ã®ã‚µãƒãƒ¼ãƒˆ + +## 2024å¹´4月18æ—¥ + +### AWSæ±äº¬ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ãŒClickHouse Cloudã«å¯¾å¿œ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã€ClickHouse Cloud用ã®æ–°ã—ã„AWSæ±äº¬ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆ`ap-northeast-1`)を導入ã—ã¾ã—ãŸã€‚ClickHouseを最速ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã—ãŸã„ã¨è€ƒãˆã¦ã„ã‚‹ãŸã‚ã€ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã‚’å¯èƒ½ãªé™ã‚ŠçŸ­ãã™ã‚‹ãŸã‚ã«å…¨ã¦ã®ã‚¯ãƒ©ã‚¦ãƒ‰ã«ãŠã‘るリージョンã®è¿½åŠ ã‚’続ã‘ã¦ã„ã¾ã™ã€‚æ›´æ–°ã•ã‚ŒãŸã‚¯ãƒ©ã‚¦ãƒ‰ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã§æ±äº¬ã«æ–°ã—ã„サービスを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![æ±äº¬ã‚µãƒ¼ãƒ“スã®ä½œæˆ](./images/create-tokyo-service.png) + +ãã®ä»–ã®å¤‰æ›´ï¼š + +### コンソールã®å¤‰æ›´ +- ClickPipes用Kafkaã¸ã®Avroフォーマットサãƒãƒ¼ãƒˆãŒä¸€èˆ¬æä¾› +- Terraformプロãƒã‚¤ãƒ€ã®ã‚µãƒ¼ãƒ“スã¨ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã®ãƒªã‚½ãƒ¼ã‚¹ã‚¤ãƒ³ãƒãƒ¼ãƒˆã®å®Œå…¨ãªã‚µãƒãƒ¼ãƒˆã‚’実装 + +### インテグレーションã®å¤‰æ›´ +- NodeJSクライアントã®ä¸»è¦ãªå®‰å®šãƒªãƒªãƒ¼ã‚¹ï¼šquery + ResultSet用ã®ã‚¢ãƒ‰ãƒãƒ³ã‚¹ãƒˆTypeScriptサãƒãƒ¼ãƒˆã€URLæ§‹æˆ +- Kafkaコãƒã‚¯ã‚¿ã®ä¿®æ­£ï¼šDLQã«æ›¸ã込む際ã®ä¾‹å¤–を無視ã™ã‚‹å•é¡Œã€Avro Enumタイプã®ã‚µãƒãƒ¼ãƒˆã‚’追加ã€[MSK](https://www.youtube.com/watch?v=6lKI_WlQ3-s)ãŠã‚ˆã³[Confluent Cloud](https://www.youtube.com/watch?v=SQAiPVbd3gg)ã§ã®ã‚³ãƒã‚¯ã‚¿ã®ä½¿ç”¨ã‚¬ã‚¤ãƒ‰ã‚’公開 +- Grafanaã®ä¿®æ­£ï¼šUIã§ã®Nullableタイプサãƒãƒ¼ãƒˆã€å‹•çš„OTELトレーステーブルåã®ã‚µãƒãƒ¼ãƒˆ +- DBTã®ä¿®æ­£ï¼šã‚«ã‚¹ã‚¿ãƒ ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ç”¨ã®ãƒ¢ãƒ‡ãƒ«è¨­å®š +- Javaクライアントã®ä¿®æ­£ï¼šã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰ã®è§£æžã®ä¸å‚™ +- Pythonクライアントã®ä¿®æ­£ï¼šæ•°å€¤ã‚¿ã‚¤ãƒ—ã®ãƒ‘ラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã€ã‚¯ã‚¨ãƒªãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã®éš›ã®ãƒŠãƒ³ãƒãƒ¼ãƒªã‚¹ãƒˆã«é–¢ã™ã‚‹ãƒã‚°ä¿®æ­£ã€SQLAlchemyãƒã‚¤ãƒ³ãƒˆã‚µãƒãƒ¼ãƒˆã‚’追加 + +## 2024å¹´4月4æ—¥ + +### æ–°ã—ã„ClickHouse Cloud Consoleã®ã”紹介 + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€æ–°ã—ã„クラウドコンソールã®ãƒ—ライベートプレビューを導入ã—ã¦ã„ã¾ã™ã€‚ + +ClickHouseã§ã¯ã€é–‹ç™ºè€…エクスペリエンスã®å‘上ã«ã¤ã„ã¦å¸¸ã«è€ƒãˆã¦ã„ã¾ã™ã€‚ç§ãŸã¡ã¯ã€æœ€é€Ÿã®ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ãƒ‡ãƒ¼ã‚¿ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹ã‚’æä¾›ã™ã‚‹ã ã‘ã§ãªãã€ä½¿ã„ã‚„ã™ã管ç†ã—ã‚„ã™ã„ã‚‚ã®ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã‚’èªè­˜ã—ã¦ã„ã¾ã™ã€‚ + +ClickHouse Cloudã®ä½•åƒäººã‚‚ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ¯Žæœˆæ•°åå„„ã®ã‚¯ã‚¨ãƒªã‚’SQLコンソールã§å®Ÿè¡Œã—続ã‘ã¦ã„ã¾ã™ã€‚ãã®ãŸã‚ã€ClickHouse Cloudサービスã¨ç›¸äº’作用ã™ã‚‹ã“ã¨ã‚’ã•ã‚‰ã«ç°¡å˜ã«ã™ã‚‹ãŸã‚ã«ã€ä¸€æµã®ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«ã•ã‚‰ã«æŠ•è³‡ã™ã‚‹ã“ã¨ã‚’決断ã—ã¾ã—ãŸã€‚今回ã®æ–°ã—ã„クラウドコンソール体験ã¯ã€ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³SQLエディタã¨ç®¡ç†ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã‚’一ã¤ã®ç›´æ„Ÿçš„ãªUIã«çµ„ã¿åˆã‚ã›ã¦ã„ã¾ã™ã€‚ + +é¸ã°ã‚ŒãŸé¡§å®¢ãŒæ–°ã—ã„クラウドコンソール体験ã®ãƒ—レビューをå—ã‘ã¾ã™ - ClickHouseã§ãƒ‡ãƒ¼ã‚¿ã‚’探索ã—ã€ç®¡ç†ã™ã‚‹ãŸã‚ã®çµ±ä¸€ã•ã‚ŒãŸæ²¡å…¥çš„ãªæ–¹æ³•ã§ã™ã€‚優先アクセスを希望ã™ã‚‹æ–¹ã¯ã€support@clickhouse.comã¾ã§ã”連絡ãã ã•ã„。 + +![æ–°ã—ã„クラウドコンソール](./images/new-cloud-console.gif) + +## 2024å¹´3月28æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€Microsoft Azureã®ã‚µãƒãƒ¼ãƒˆã€APIを介ã—ãŸæ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã€ãƒ—ライベートプレビューã§ã®ãƒªãƒªãƒ¼ã‚¹ãƒãƒ£ãƒãƒ«ãŒå°Žå…¥ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### 一般的ãªæ›´æ–° +- プライベートプレビューã§ã®Microsoft Azureã®ã‚µãƒãƒ¼ãƒˆã‚’導入。アクセスを得るã«ã¯ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†ã¾ãŸã¯ã‚µãƒãƒ¼ãƒˆã«ãŠå•ã„åˆã‚ã›ãã ã•ã„ã€ã¾ãŸã¯[待機リスト](https://clickhouse.com/cloud/azure-waitlist)ã«å‚加ã—ã¦ãã ã•ã„。 +- リリースãƒãƒ£ãƒãƒ«ã®å°Žå…¥ - 環境タイプã«åŸºã¥ã„ãŸã‚¢ãƒƒãƒ—グレードタイミングã®æŒ‡å®šæ©Ÿèƒ½ã€‚ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€éžæœ¬ç•ªç’°å¢ƒã‚’本番環境ã®å‰ã«ã‚¢ãƒƒãƒ—グレードã™ã‚‹ãŸã‚ã®ã€Œå¿«é€Ÿã€ãƒªãƒªãƒ¼ã‚¹ãƒãƒ£ãƒãƒ«ã‚’追加ã—ã¾ã—ãŸï¼ˆæœ‰åŠ¹ã«ã™ã‚‹ã«ã¯ã‚µãƒãƒ¼ãƒˆã«ã”連絡ãã ã•ã„)。 + +### 管ç†å¤‰æ›´ +- APIを利用ã—ãŸæ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°æ§‹æˆã‚’サãƒãƒ¼ãƒˆï¼ˆãƒ—ライベートプレビューã€æœ‰åŠ¹åŒ–ã«ã¯ã‚µãƒãƒ¼ãƒˆã¸ã®é€£çµ¡ãŒå¿…è¦ï¼‰ +- 起動時ã«ãƒ¡ãƒ¢ãƒªä¸è¶³ã‚¨ãƒ©ãƒ¼ã«ç›´é¢ã—ã¦ã„るサービスã®ã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—を改善 +- AWSã®CMEKã®Terraformプロãƒã‚¤ãƒ€ãƒ¼ã§ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 + +### コンソールã®å¤‰æ›´ +- Microsoftソーシャルログインã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- SQLコンソールã§ã®ã‚¯ã‚¨ãƒªå…±æœ‰æ©Ÿèƒ½ã‚’追加 +- クエリエディタã®ãƒ‘フォーマンスを大幅ã«æ”¹å–„(EU地域ã®ä¸€éƒ¨ã§5秒ã‹ã‚‰1.5秒ã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ï¼‰ + +### インテグレーションã®å¤‰æ›´ +- ClickHouse OpenTelemetryエクスãƒãƒ¼ã‚¿ãƒ¼ï¼šClickHouseã®ãƒ¬ãƒ—リケーションテーブルエンジンã«å¯¾ã™ã‚‹[サãƒãƒ¼ãƒˆã‚’追加](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31920)ã—[çµ±åˆãƒ†ã‚¹ãƒˆã‚’追加](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31896) +- ClickHouse DBTアダプタ:TTL表ç¾ã‚µãƒãƒ¼ãƒˆã«é–¢ã™ã‚‹[テスト](https://github.com/ClickHouse/dbt-clickhouse/pull/254)ã¨[Dictionaryã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ãƒžã‚¯ãƒ­ã‚µãƒãƒ¼ãƒˆ](https://github.com/ClickHouse/dbt-clickhouse/pull/255)を追加 +- ClickHouse Kafka Connect Sink:[Kafkaプラグイン検出](https://github.com/ClickHouse/clickhouse-kafka-connect/issues/350)ã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ï¼ˆã‚³ãƒŸãƒ¥ãƒ‹ãƒ†ã‚£ã®è²¢çŒ®ï¼‰ +- ClickHouse Javaクライアント:[æ–°ã—ã„クライアントAPIパッケージ](https://github.com/ClickHouse/clickhouse-java/pull/1574)ã‚’å°Žå…¥ã—ã€[クラウドテスト用ã®ãƒ†ã‚¹ãƒˆã‚«ãƒãƒ¬ãƒƒã‚¸ã‚’追加](https://github.com/ClickHouse/clickhouse-java/pull/1575) +- ClickHouse NodeJSクライアント:新ã—ã„HTTPキープアライブ動作ã®ãƒ†ã‚¹ãƒˆã¨ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’拡張。v0.3.0リリース以é™åˆ©ç”¨å¯èƒ½ +- ClickHouse Golangクライアント:Mapã®ã‚­ãƒ¼ã¨ã—ã¦ã®Enumã«[ãƒã‚°ã‚’修正](https://github.com/ClickHouse/clickhouse-go/pull/1236); エラー接続ãŒæŽ¥ç¶šãƒ—ールã«æ®‹ã•ã‚Œã‚‹[ãƒã‚°ã‚’修正](https://github.com/ClickHouse/clickhouse-go/pull/1237)(コミュニティã®è²¢çŒ®ï¼‰ +- ClickHouse Pythonクライアント:PyArrow経由ã§ã®ã‚¯ã‚¨ãƒªã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã‚’[サãƒãƒ¼ãƒˆ](https://github.com/ClickHouse/clickhouse-connect/issues/155) (コミュニティã®è²¢çŒ®ï¼‰ + +### セキュリティ更新 +- [「クエリキャッシングãŒæœ‰åŠ¹ãªå ´åˆã€å½¹å‰²ãƒ™ãƒ¼ã‚¹ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ãŒãƒã‚¤ãƒ‘スã•ã‚Œã‚‹ã€](https://github.com/ClickHouse/ClickHouse/security/advisories/GHSA-45h5-f7g3-gr8r)(CVE-2024-22412)を防ããŸã‚ã«ClickHouse Cloudã‚’æ›´æ–°ã—ã¾ã—ãŸã€‚ + +## 2024å¹´3月14æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ã€æ–°ã—ã„クラウドコンソール体験ã€S3ãŠã‚ˆã³GCSã‹ã‚‰ã®ClickPipesã®ãƒ‡ãƒ¼ã‚¿ä¸€æ‹¬ãƒ­ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®ãƒ—レビュー版ã€ãŠã‚ˆã³ClickPipesã§ã®Kafka用Avroフォーマットã®ã‚µãƒãƒ¼ãƒˆã‚’ã‚‚ãŸã‚‰ã—ã¾ã™ã€‚ã¾ãŸã€ClickHouseデータベースãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’24.1ã«ã‚¢ãƒƒãƒ—グレードã—ã€æ–°ã—ã„関数ã€ãƒ‘フォーマンスã€ãŠã‚ˆã³ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨æœ€é©åŒ–をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +### コンソールã®å¤‰æ›´ +- 早期アクセスã§ã®æ–°ã—ã„クラウドコンソール体験ãŒåˆ©ç”¨å¯èƒ½ï¼ˆå‚加ã«èˆˆå‘³ãŒã‚ã‚‹æ–¹ã¯ã‚µãƒãƒ¼ãƒˆã«ãŠå•ã„åˆã‚ã›ãã ã•ã„)。 +- S3ãŠã‚ˆã³GCSã‹ã‚‰ã®ä¸€æ‹¬ãƒ­ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®ãŸã‚ã®ClickPipesãŒæ—©æœŸã‚¢ã‚¯ã‚»ã‚¹ã§åˆ©ç”¨å¯èƒ½ï¼ˆå‚加ã«èˆˆå‘³ãŒã‚ã‚‹æ–¹ã¯ã‚µãƒãƒ¼ãƒˆã«ãŠå•ã„åˆã‚ã›ãã ã•ã„)。 +- Kafkaã®ClickPipesã§ã®Avroフォーマットサãƒãƒ¼ãƒˆãŒæ—©æœŸã‚¢ã‚¯ã‚»ã‚¹ã§åˆ©ç”¨å¯èƒ½ï¼ˆå‚加ã«èˆˆå‘³ãŒã‚ã‚‹æ–¹ã¯ã‚µãƒãƒ¼ãƒˆã«ãŠå•ã„åˆã‚ã›ãã ã•ã„)。 + +### ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚¢ãƒƒãƒ—グレード +- FINALã®æœ€é©åŒ–ã€ãƒ™ã‚¯ãƒˆãƒ«åŒ–ã®è¨­è¨ˆæ”¹å–„ã€ã‚ˆã‚Šé€Ÿã„集計 - [23.12リリースブログ](https://clickhouse.com/blog/clickhouse-release-23-12#optimizations-for-final)ã§è©³ç´°ã‚’å‚ç…§ +- Punycode処ç†ã€æ–‡å­—列類似性ã€å¤–れ値検出ã®ãŸã‚ã®æ–°ã—ã„関数ã€ãã—ã¦Keeperã®ãƒ¡ãƒ¢ãƒªãƒ¼æœ€é©åŒ– - [24.1リリースブログ](https://clickhouse.com/blog/clickhouse-release-24-01)ãŠã‚ˆã³[プレゼンテーション](https://presentations.clickhouse.com/release_24.1/)ã§è©³ç´°æƒ…報をå‚ç…§ +- ã“ã®ClickHouse cloudãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯24.1ã«åŸºã¥ã„ã¦ãŠã‚Šã€æ•°åã®æ–°æ©Ÿèƒ½ã€æ€§èƒ½æ”¹å–„ã€ãŠã‚ˆã³ãƒã‚°ä¿®æ­£ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚詳細ã¯[コアデータベース変更ログ](/docs/ja/whats-new/changelog/2023#2312)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### インテグレーションã®å¤‰æ›´ +- Grafana:v4å‘ã‘ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ç§»è¡Œä¿®æ­£ã€ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã®è«–ç†è£œæ­£ +- Tableau Connector:DATENAME関数ã¨ã€Œrealã€å¼•æ•°ã®å››æ¨äº”入処ç†ã‚’修正 +- Kafka Connector:接続åˆæœŸåŒ–時ã®NPE修正ã€JDBCドライãƒãƒ¼ã‚ªãƒ—ション指定機能追加 +- Golang クライアント:レスãƒãƒ³ã‚¹ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡å‰Šæ¸›ã€Date32極値修正ã€åœ§ç¸®ãŒæœ‰åŠ¹ãªå ´åˆã®ã‚¨ãƒ©ãƒ¼å ±å‘Šæ”¹å–„ +- Python Client:datetimeパラメータã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚µãƒãƒ¼ãƒˆæ”¹å–„ã€Pandas DataFrameã®ãƒ‘フォーマンス改善 + +## 2024å¹´2月29æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ã€SQLコンソールアプリケーションã®èª­ã¿è¾¼ã¿æ™‚間を改善ã—ã€ClickPipesã§SCRAM-SHA-256èªè¨¼ã®ã‚µãƒãƒ¼ãƒˆã‚’追加ã—ã€Kafka Connectã§ãƒã‚¹ãƒˆã•ã‚ŒãŸæ§‹é€ ä½“ã®ã‚µãƒãƒ¼ãƒˆã‚’æ‹¡å¼µã—ã¾ã™ã€‚ + +### コンソールã®å¤‰æ›´ +- SQLコンソールアプリケーションã®åˆæœŸèª­ã¿è¾¼ã¿æ™‚間を最é©åŒ– +- 'authentication failed'エラーを引ãèµ·ã“ã™SQLコンソール競åˆçŠ¶æ…‹ã‚’修正 +- 監視ページã§æœ€æ–°ã®ãƒ¡ãƒ¢ãƒªã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³å€¤ãŒæ™‚々ä¸æ­£ç¢ºã§ã‚ã£ãŸæŒ¯ã‚‹èˆžã„を修正 +- SQLコンソールãŒæ™‚々é‡è¤‡ã—ãŸKILLクエリコマンドを発行ã™ã‚‹å•é¡Œã‚’修正 +- SCRAM-SHA-256èªè¨¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã™ã‚‹Kafkaベースã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ç”¨ClickPipesã®ã‚µãƒãƒ¼ãƒˆã‚’追加 + +### インテグレーションã®å¤‰æ›´ +- Kafka Connector:複雑ãªãƒã‚¹ãƒˆã•ã‚ŒãŸæ§‹é€ ä½“(Arrayã€Map)ã®ã‚µãƒãƒ¼ãƒˆã‚’拡張;FixedStringタイプã®ã‚µãƒãƒ¼ãƒˆã‚’追加;複数ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¸ã®å–ã‚Šè¾¼ã¿ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Metabase:ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³23.8より低ã„å ´åˆã®éžäº’æ›æ€§ã‚’修正 +- DBT:モデル作æˆã¸ã®è¨­å®šã‚’渡ã™èƒ½åŠ›ã‚’追加 +- Node.jsクライアント:長時間ã®ã‚¯ã‚¨ãƒª (>1時間) ã®ã‚µãƒãƒ¼ãƒˆã‚’追加ã€ç©ºã®å€¤ã‚’正常ã«å‡¦ç†ã™ã‚‹ + +## 2024å¹´2月15æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ã‚³ã‚¢ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®æ›´æ–°ã€Terraformを使用ã—ãŸãƒ—ライベートリンクã®è¨­å®šæ©Ÿèƒ½ã‚’追加ã—ã€Kafka Connectを介ã—ãŸéžåŒæœŸæŒ¿å…¥ã«å¯¾ã™ã‚‹æ­£ç¢ºãªä¸€åº¦ã®ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +### ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚¢ãƒƒãƒ—グレード +- S3Queueテーブルエンジンã¯ã€S3ã‹ã‚‰ã®é€£ç¶šã‹ã¤ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ã®ãŸã‚ã®ãƒ—ロダクション対応ã¨ãªã‚Šã¾ã™ã€‚ - [23.11リリースブログ](https://clickhouse.com/blog/clickhouse-release-23-11) ã§è©³ç´°ã‚’ã”確èªãã ã•ã„。 +- FINALã®é‡è¦ãªãƒ‘フォーマンスå‘上ã¨ã€SIMD命令用ã®ãƒ™ã‚¯ãƒˆãƒ«åŒ–å‘上ã®çµæžœã¨ã—ã¦ã®é«˜é€Ÿãªã‚¯ã‚¨ãƒª - [23.12リリースブログ](https://clickhouse.com/blog/clickhouse-release-23-12#optimizations-for-final) ã§è©³ç´°ã‚’ã”覧ãã ã•ã„。 +- ã“ã®ClickHouseクラウドãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯23.12ã«åŸºã¥ã„ã¦ã„ã¦ã€å¤šæ•°ã®æ–°æ©Ÿèƒ½ã€æ€§èƒ½å‘上ã€ãŠã‚ˆã³ãƒã‚°ä¿®æ­£ãŒè¡Œã‚ã‚Œã¦ã„ã¾ã™ã€‚詳細ã¯[コアデータベースã®å¤‰æ›´ãƒ­ã‚°](https://clickhouse.com/docs/ja/whats-new/changelog/2023#2312)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### コンソールã®å¤‰æ›´ +- AWS Private Linkã¨GCP Private Service Connectã‚’Terraformプロãƒã‚¤ãƒ€ãƒ¼ã‚’通ã˜ã¦è¨­å®šã™ã‚‹æ©Ÿèƒ½ã‚’追加 +- リモートファイルデータインãƒãƒ¼ãƒˆã®å›žå¾©åŠ›å‘上 +- インãƒãƒ¼ãƒˆã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã®è©³ç´°ã‚’ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚¤ãƒ³ãƒãƒ¼ãƒˆã¸è¿½åŠ  +- S3データインãƒãƒ¼ãƒˆã¸ã®ã‚­ãƒ¼/秘密éµè³‡æ ¼æƒ…報サãƒãƒ¼ãƒˆã‚’追加 + +### インテグレーションã®å¤‰æ›´ +* Kafka Connect + * `async_insert` ã®æ­£ç¢ºãªä¸€åº¦ã®ã‚µãƒãƒ¼ãƒˆãŒè¿½åŠ ã•ã‚Œã¾ã—ãŸï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ç„¡åŠ¹ï¼‰ +* Golangクライアント + * DateTimeãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’修正 + * ãƒãƒƒãƒæŒ¿å…¥æ€§èƒ½ã‚’改善 +* Javaクライアント + * リクエスト圧縮ã®å•é¡Œã‚’修正 + +### 設定変更 +* `use_mysql_types_in_show_columns` ã¯ã‚‚ã¯ã‚„å¿…é ˆã§ã¯ã‚ã‚Šã¾ã›ã‚“。MySQLインターフェースを介ã—ã¦æŽ¥ç¶šã™ã‚‹éš›ã«è‡ªå‹•çš„ã«æœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ +* `async_insert_max_data_size` ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒ `10 MiB` ã«ãªã‚Šã¾ã—㟠+ +## 2024å¹´2月2æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ClickPipes for Azure Event Hubã®åˆ©ç”¨å¯èƒ½æ€§ã‚’ã‚‚ãŸã‚‰ã—ã€v4 ClickHouse Grafanaコãƒã‚¯ã‚¿ãƒ¼ã‚’用ã„ã¦ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ãƒŠãƒ“ゲーションã®ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã‚’劇的ã«æ”¹å–„ã—ã€FlywayãŠã‚ˆã³Atlasデータベーススキーマ管ç†ãƒ„ールã®ã‚µãƒãƒ¼ãƒˆã‚’公開ã—ã¾ã—ãŸã€‚ + +### コンソールã®å¤‰æ›´ +* Azure Event Hubã«å¯¾ã™ã‚‹ClickPipesã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +* æ–°ã—ã„サービスã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚¢ã‚¤ãƒ‰ãƒªãƒ³ã‚°æ™‚é–“ã¯15分ã§ã™ + +### インテグレーションã®å¤‰æ›´ +* [ClickHouseデータソース for Grafana](https://grafana.com/grafana/plugins/grafana-clickhouse-datasource/) v4リリース + * Tableã€Logsã€Time Seriesã€ãŠã‚ˆã³Traces用ã®å°‚用エディタを備ãˆãŸå®Œå…¨ã«å†æ§‹ç¯‰ã•ã‚ŒãŸã‚¯ã‚¨ãƒªãƒ“ルダー + * より複雑ã§å‹•çš„ãªã‚¯ã‚¨ãƒªã‚’サãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®å®Œå…¨ã«å†æ§‹ç¯‰ã•ã‚ŒãŸSQLジェãƒãƒ¬ãƒ¼ã‚¿ + * OpenTelemetryã¸ã®å„ªã‚ŒãŸã‚µãƒãƒ¼ãƒˆã‚’Logã¨Traceビューã«è¿½åŠ  + * Logsã¨Tracesã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ†ãƒ¼ãƒ–ルã¨åˆ—を指定ã™ã‚‹ãŸã‚ã®æ‹¡å¼µè¨­å®š + * カスタムHTTPヘッダを指定ã™ã‚‹èƒ½åŠ›ã‚’追加 + * ãã®ä»–多ãã®æ”¹å–„ - 完全ãª[変更ログ](https://github.com/grafana/clickhouse-datasource/blob/main/CHANGELOG.md#400)を確èªã—ã¦ãã ã•ã„ +* データベーススキーマ管ç†ãƒ„ール + * [FlywayãŒClickHouseサãƒãƒ¼ãƒˆã‚’追加](https://github.com/flyway/flyway-community-db-support/packages/2037428) + * [Ariga AtlasãŒClickHouseサãƒãƒ¼ãƒˆã‚’追加](https://atlasgo.io/blog/2023/12/19/atlas-v-0-16#clickhouse-beta-program) +* Kafkaコãƒã‚¯ã‚¿ã‚·ãƒ³ã‚¯ + * デフォルト値をæŒã¤ãƒ†ãƒ¼ãƒ–ルã¸ã®å–ã‚Šè¾¼ã¿ã‚’最é©åŒ– + * DateTime64ã§ã®æ–‡å­—列ベースã®æ—¥ä»˜ã‚’サãƒãƒ¼ãƒˆ +* Metabase + * 複数データベースã¸ã®æŽ¥ç¶šã‚’サãƒãƒ¼ãƒˆ + +## 2024å¹´1月18æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯AWSã®æ–°ã—ã„地域(ロンドン / eu-west-2)をもãŸã‚‰ã—ã€RedPandaã€Upstashã€Warpstreamã«å¯¾ã™ã‚‹ClickPipesã®ã‚µãƒãƒ¼ãƒˆã‚’追加ã—ã€[is_deleted](https://clickhouse.com/docs/ja/engines/table-engines/mergetree-family/replacingmergetree#is_deleted)コアデータベース機能ã®ä¿¡é ¼æ€§ã‚’改善ã—ã¾ã—ãŸã€‚ + +### 一般的ãªå¤‰æ›´ +- æ–°ã—ã„AWS地域:ロンドン (eu-west-2) + +### コンソールã®å¤‰æ›´ +- RedPandaã€Upstashã€Warpstreamã«å¯¾ã™ã‚‹ClickPipesã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- ClickPipesã®èªè¨¼æ©Ÿæ§‹ã‚’UIã«ãŠã„ã¦è¨­å®šå¯èƒ½ã« + +### インテグレーションã®å¤‰æ›´ +- Javaクライアント: + - 破壊的変更:ランダムURLãƒãƒ³ãƒ‰ãƒ«ã®ã‚³ãƒ¼ãƒ«ã§ã®æŒ‡å®šã‚’削除ã—ã¾ã—ãŸã€‚ã“ã®æ©Ÿèƒ½ã¯ClickHouseã‹ã‚‰å‰Šé™¤ã•ã‚Œã¾ã—㟠+ - 廃止予定機能:Java CLIクライアントã¨GRPCパッケージ + - エクサビームã®è¦æ±‚ã«ã‚ˆã‚Šã€ClickHouseインスタンスã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚’減少ã•ã›ã‚‹ãŸã‚ã®RowBinaryWithDefaultsフォーマットã®ã‚µãƒãƒ¼ãƒˆã‚’追加 + - ClickHouseã¨ã®äº’æ›æ€§ã®ãŸã‚ã®Date32ã¨DateTime64範囲境界ã€Spark Array文字列タイプã¨ã®äº’æ›æ€§ã€ãƒŽãƒ¼ãƒ‰é¸æŠžãƒ¡ã‚«ãƒ‹ã‚ºãƒ  +- Kafkaコãƒã‚¯ã‚¿ï¼šGrafana用ã®JMXモニタリングダッシュボードを追加 +- PowerBI:ODBCドライãƒãƒ¼ã®è¨­å®šã‚’UIã§æŒ‡å®šå¯èƒ½ã« +- JavaScriptクライアント:クエリã®æ¦‚è¦æƒ…報を公開ã—ã€æŒ¿å…¥ã®éš›ã®ç‰¹å®šåˆ—を指定å¯èƒ½ã«ã€webクライアント用ã«keep_aliveを設定å¯èƒ½ã« +- Pythonクライアント:SQLAlchemyã®Nothingタイプサãƒãƒ¼ãƒˆã‚’追加 + +### 信頼性ã®å¤‰æ›´ +- ユーザーå‘ã‘ã®å¾Œæ–¹äº’æ›æ€§ã®ç„¡ã„変更:以å‰ã€ã‚ã‚‹æ¡ä»¶ä¸‹ã§äºŒã¤ã®æ©Ÿèƒ½ï¼ˆ[is_deleted](https://clickhouse.com/docs/ja/engines/table-engines/mergetree-family/replacingmergetree#is_deleted)ã¨``OPTIMIZE CLEANUP``)ãŒClickHouse内ã®ãƒ‡ãƒ¼ã‚¿ã®ç ´æを引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã—ãŸã€‚ユーザーã®ãƒ‡ãƒ¼ã‚¿ã®æ•´åˆæ€§ã‚’ä¿æŒã™ã‚‹ãŸã‚ã«ã‚³ã‚¢æ©Ÿèƒ½ã‚’維æŒã—ãªãŒã‚‰ã€ã“ã‚ŒãŒã©ã®ã‚ˆã†ã«å‹•ä½œã™ã‚‹ã‹ã‚’調整ã—ã¾ã—ãŸã€‚具体的ã«ã¯ã€MergeTree設定``clean_deleted_rows``ã¯éžæŽ¨å¥¨ã¨ãªã‚Šã€ã‚‚ã¯ã‚„効果をæŒã¡ã¾ã›ã‚“。``CLEANUP``キーワードã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“(ã“れを使用ã™ã‚‹ã«ã¯``allow_experimental_replacing_merge_with_cleanup``を有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚``CLEANUP``を使用ã™ã‚‹å ´åˆã€``OPTIMIZE FINAL CLEANUP``を実行ã—ãŸå¾Œã§å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®è¡ŒãŒæŒ¿å…¥ã•ã‚Œãªã„ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## 2023å¹´12月18æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯GCPã®æ–°ã—ã„地域(us-east1)ã€ã‚»ã‚­ãƒ¥ã‚¢ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆæŽ¥ç¶šã®ã‚»ãƒ«ãƒ•ã‚µãƒ¼ãƒ“ス機能ã€DBT 1.7ã‚’å«ã‚€è¿½åŠ çµ±åˆã®ã‚µãƒãƒ¼ãƒˆã€æ•°å¤šãã®ãƒã‚°ä¿®æ­£ã¨ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£å¼·åŒ–ã‚’ã‚‚ãŸã‚‰ã—ã¾ã™ã€‚ + +### 一般的ãªå¤‰æ›´ +- ClickHouse Cloudã¯GCP us-east1 (サウスカロライナ)地域ã§ã”利用ã„ãŸã ã‘ã¾ã™ +- AWS Private LinkãŠã‚ˆã³GCP Private Service Connectã®è¨­å®šèƒ½åŠ›ã‚’OpenAPIã§å°Žå…¥ + +### コンソールã®å¤‰æ›´ +- 開発者ロールã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å‘ã‘ã«SQLコンソールã¸ã®ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ãƒ­ã‚°ã‚¤ãƒ³ã‚’有効化 +- オンボーディング中ã®ã‚¢ã‚¤ãƒ‰ãƒªãƒ³ã‚°ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«è¨­å®šãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã‚’簡素化 + +### インテグレーションã®å¤‰æ›´ +- DBT コãƒã‚¯ã‚¿ï¼šDBT v1.7ã¾ã§ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Metabase:Metabase v0.48ã¸ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- PowerBI Connector:PowerBI Cloud 上ã§ã®å®Ÿè¡ŒãŒå¯èƒ½ã«ãªã‚Šã¾ã—㟠+- ClickPipes 内部ユーザー設定を設定å¯èƒ½ã« +- Kafka Connect + - é‡è¤‡æŽ’除ロジックã¨Nullableåž‹ã®å–ã‚Šè¾¼ã¿ã‚’改善 + - テキストベースフォーマットã®è¿½åŠ ã‚µãƒãƒ¼ãƒˆ (CSV, TSV) +- Apache Beam: Booleanã¨LowCardinality型をサãƒãƒ¼ãƒˆ +- Nodejs クライアント: Parquetフォーマットã®ã‚µãƒãƒ¼ãƒˆã‚’追加 + +### セキュリティ発表 +- 3ã¤ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è„†å¼±æ€§ã‚’パッム- 詳細ã¯[セキュリティ変更ログ](https://clickhouse.com/docs/ja/whats-new/security-changelog)ã‚’ã”å‚ç…§ãã ã•ã„: + - CVE 2023-47118 (CVSS 7.0) - デフォルトã§ãƒãƒ¼ãƒˆ9000/tcpã§å‹•ä½œã—ã¦ã„ã‚‹ãƒã‚¤ãƒ†ã‚£ãƒ–インターフェースã«å½±éŸ¿ã‚’与ãˆã‚‹ãƒ’ープãƒãƒƒãƒ•ã‚¡ãƒ¼ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼è„†å¼±æ€§ + - CVE-2023-48704 (CVSS 7.0) - デフォルトã§ãƒãƒ¼ãƒˆ9000/tcpã§å‹•ä½œã—ã¦ã„ã‚‹ãƒã‚¤ãƒ†ã‚£ãƒ–インターフェースã«å½±éŸ¿ã‚’与ãˆã‚‹ãƒ’ープãƒãƒƒãƒ•ã‚¡ãƒ¼ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼è„†å¼±æ€§ + - CVE 2023-48298 (CVSS 5.9) - FPC圧縮コーデックã«ãŠã‘る整数アンダーフロー脆弱性 + +## 2023å¹´11月22æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ã‚³ã‚¢ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’アップグレードã—ã€ãƒ­ã‚°ã‚¤ãƒ³ãŠã‚ˆã³èªè¨¼ãƒ•ãƒ­ãƒ¼ã®æ”¹å–„ã€Kafka Connect Sinkã«ãƒ—ロキシサãƒãƒ¼ãƒˆã‚’追加ã—ã¾ã™ã€‚ + +### ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚¢ãƒƒãƒ—グレード + +- Parquetファイルã®èª­ã¿å–ã‚Šã®ãƒ‘フォーマンスãŒåŠ‡çš„ã«æ”¹å–„ã•ã‚Œã¾ã—ãŸã€‚詳細ã¯[23.8リリースブログ](https://clickhouse.com/blog/clickhouse-release-23-08)ã‚’ã”覧ãã ã•ã„。 +- JSON用ã®åž‹æŽ¨è«–サãƒãƒ¼ãƒˆã‚’追加ã—ã¾ã—ãŸã€‚詳細ã¯[23.9リリースブログ](https://clickhouse.com/blog/clickhouse-release-23-09)ã‚’ã”覧ãã ã•ã„。 +- `ArrayFold`ã®ã‚ˆã†ãªå¼·åŠ›ãªã‚¢ãƒŠãƒªã‚¹ãƒˆå‘ã‘関数を導入ã—ã¾ã—ãŸã€‚詳細ã¯[23.10リリースブログ](https://clickhouse.com/blog/clickhouse-release-23-10)ã‚’ã”覧ãã ã•ã„。 +- **ユーザーå‘ã‘後方互æ›æ€§ãªã„変更**:サンプルデータãŒæ•°å­—ã«ä¼¼ã¦ã„る文字列をå«ã‚€å ´åˆã®è§£æžã‚¨ãƒ©ãƒ¼ã‚’å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€JSONフォーマットã§æ–‡å­—列ã‹ã‚‰æ•°å€¤æŽ¨è«–ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§è¨­å®š`input_format_json_try_infer_numbers_from_strings`を無効化。 +- 新機能ã€ãƒ‘フォーマンスå‘上ã€ãƒã‚°ä¿®æ­£ãŒå¤šæ•°ã€‚詳細ã¯[コアデータベースã®å¤‰æ›´ãƒ­ã‚°](https://clickhouse.com/docs/ja/whats-new/changelog)ã‚’ã”覧ãã ã•ã„。 + +### コンソールã®å¤‰æ›´ + +- ログインã¨èªè¨¼ãƒ•ãƒ­ãƒ¼ã‚’改善ã—ã¾ã—ãŸã€‚ +- 大è¦æ¨¡ãªã‚¹ã‚­ãƒ¼ãƒžã‚’よりよãサãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«AIベースã®ã‚¯ã‚¨ãƒªæ案を改善ã—ã¾ã—ãŸã€‚ + +### インテグレーションã®å¤‰æ›´ + +- Kafka Connect Sink:プロキシサãƒãƒ¼ãƒˆã€`topic-tablename`マッピングã€ãŠã‚ˆã³Keeper _exactly-once_ é…信プロパティã®è¨­å®šå¯èƒ½æ€§ã‚’追加。 +- Node.js クライアント:Parquetフォーマットã®ã‚µãƒãƒ¼ãƒˆã‚’追加。 +- Metabase:`datetimeDiff`関数ã®ã‚µãƒãƒ¼ãƒˆã‚’追加。 +- Pythonクライアント:カラムåã«ç‰¹æ®Šæ–‡å­—ã®ã‚µãƒãƒ¼ãƒˆã‚’追加。タイムゾーンパラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’修正。 + +## 2023å¹´11月2æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ã€ã‚¢ã‚¸ã‚¢ã§ã®é–‹ç™ºã‚µãƒ¼ãƒ“スã«å¯¾ã™ã‚‹åœ°åŸŸã‚µãƒãƒ¼ãƒˆã‚’æ‹¡å¼µã—ã€é¡§å®¢ç®¡ç†ã®æš—å·åŒ–キーã«å¯¾ã™ã‚‹ã‚­ãƒ¼å›žè»¢æ©Ÿèƒ½ã€è«‹æ±‚コンソールã®ç¨Žè¨­å®šã®è©³ç´°åº¦ã‚’å‘上ã•ã›ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る言語クライアントã®ãƒã‚°ä¿®æ­£ã‚’æä¾›ã—ã¾ã™ã€‚ + +### 一般的ãªæ›´æ–° +- 開発サービスãŒAWSã®`ap-south-1`(ムンãƒã‚¤) 㨠`ap-southeast-1`(シンガãƒãƒ¼ãƒ«) ã§åˆ©ç”¨å¯èƒ½ã«ãªã‚Šã¾ã—㟠+- 顧客管ç†ã®æš—å·åŒ–キー (CMEK) ã«ã‚­ãƒ¼å›žè»¢ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 + +### コンソールã®å¤‰æ›´ +- クレジットカード追加時ã«ç´°ã‹ãªç¨Žè¨­å®šã‚’構æˆã™ã‚‹èƒ½åŠ›ã‚’追加 + +### インテグレーションã®å¤‰æ›´ +- MySQL + - MySQLを介ã—ã¦Tableau Onlineã¨QuickSightã®ã‚µãƒãƒ¼ãƒˆã‚’改善ã—ã¾ã—㟠+- Kafka コãƒã‚¯ã‚¿ + - テキストベースフォーマット(CSVã€TSV)をサãƒãƒ¼ãƒˆã™ã‚‹æ–°ã—ã„StringConverterã‚’å°Žå…¥ + - ãƒã‚¤ãƒˆæ•°åŠã³å°æ•°ç‚¹æ•°ãƒ‡ãƒ¼ã‚¿åž‹ã‚’サãƒãƒ¼ãƒˆ + - エラー.トレランス=ã™ã¹ã¦ã®å ´åˆã§ã‚‚ã€å†è©¦è¡Œå¯èƒ½ä¾‹å¤–を常ã«å†è©¦è¡Œã™ã‚‹ã‚ˆã†ã«èª¿æ•´ +- Node.js クライアント + - 大è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ã‚¹ãƒˆãƒªãƒ¼ãƒ ã§æä¾›ã™ã‚‹ç ´æã—ãŸçµæžœã«é–¢ã™ã‚‹å•é¡Œã‚’修正 +- Python クライアント + - 大é‡æŒ¿å…¥æ™‚ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚’修正 + - Numpy/Pandasã®Date32ã«é–¢ã™ã‚‹å•é¡Œã‚’修正 +​​- Golang クライアント + - 空ã®ãƒžãƒƒãƒ—ã‚’JSONカラムã«æŒ¿å…¥ã™ã‚‹éš›ã®å•é¡Œã‚’修正ã€åœ§ç¸®ãƒãƒƒãƒ•ã‚¡ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ã€ã‚¯ã‚¨ãƒªã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã€IPv4åŠã³IPv6ã®ã‚¼ãƒ­/ nilã§ã®ãƒ‘ニック + - キャンセルã•ã‚ŒãŸæŒ¿å…¥ã‚’監視ã™ã‚‹ã‚¦ã‚©ãƒƒãƒãƒ‰ãƒƒã‚°ã‚’追加 +- DBT + - 分散テーブルã®ã‚µãƒãƒ¼ãƒˆã‚’テストã§æ”¹å–„ + +## 2023å¹´10月19æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ã€SQLコンソールã®ä½¿ã„ã‚„ã™ã•ã¨ãƒ‘フォーマンスã®å‘上ã€Metabaseコãƒã‚¯ã‚¿ã®IPデータタイプ処ç†ã®æ”¹å–„ã€ãŠã‚ˆã³Javaã¨Node.jsクライアントã§ã®æ–°æ©Ÿèƒ½ã‚’ã‚‚ãŸã‚‰ã—ã¾ã™ã€‚ + +### コンソールã®å¤‰æ›´ +- SQLコンソールã®ä½¿ã„ã‚„ã™ã•ã‚’改善(例ãˆã°ã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œé–“ã®åˆ—幅を維æŒã™ã‚‹ï¼‰ +- SQLコンソールã®ãƒ‘フォーマンスを改善 + +### インテグレーションã®å¤‰æ›´ +- Java クライアント: + - オープンコãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’å†åˆ©ç”¨ã™ã‚‹ãŸã‚ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ©ã‚¤ãƒ–ラリを切り替ãˆã€ãƒ‘フォーマンスをå‘上 + - プロキシサãƒãƒ¼ãƒˆã‚’追加 + - Trust Storeを使用ã—ãŸå®‰å…¨ãªæŽ¥ç¶šã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Node.jsクライアント:挿入クエリã®keep-alive動作を修正 +- Metabase:IPv4/IPv6カラムã®ã‚·ãƒªã‚¢ãƒ«åŒ–を修正 + +## 2023å¹´9月28æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯Kafkaã€Confluent Cloudã€Amazon MSKãŠã‚ˆã³Kafka Connect ClickHouse Sink用ã®ClickPipesã®ä¸€èˆ¬æ供をå¯èƒ½ã«ã—ã€AWS S3ã¸ã®å®‰å…¨ãªã‚¢ã‚¯ã‚»ã‚¹ã®è‡ªå·±ã‚µãƒ¼ãƒ“スワークフローã€ãŠã‚ˆã³AI支æ´ã‚¯ã‚¨ãƒªæ案(プライベートプレビュー)をæä¾›ã—ã¾ã™ã€‚ + +### コンソールã®å¤‰æ›´ +- [AWS S3ã¸ã®å®‰å…¨ãªã‚¢ã‚¯ã‚»ã‚¹](/docs/ja/cloud/security/secure-s3)ã®è‡ªå·±ã‚µãƒ¼ãƒ“スワークフローを追加 +- プライベートプレビューã§AI支æ´ã«ã‚ˆã‚‹ã‚¯ã‚¨ãƒªæ案を導入(試ã—ã¦ã¿ãŸã„æ–¹ã¯[ClickHouse Cloudサãƒãƒ¼ãƒˆ](https://clickhouse.cloud/support)ã¾ã§ãŠå•ã„åˆã‚ã›ãã ã•ã„) + +### インテグレーションã®å¤‰æ›´ +- Kafkaã€Confluent Cloudã€Amazon MSK用ã®ClickPipesã®ä¸€èˆ¬æ供を発表([リリースブログ](https://clickhouse.com/blog/clickpipes-is-generally-available)ã‚’ã”å‚ç…§ãã ã•ã„) +- Kafka Connect ClickHouse Sinkã®ä¸€èˆ¬æä¾›ã«åˆ°é” + - `clickhouse.settings`プロパティを使用ã—ãŸã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•ã‚ŒãŸClickHouse設定サãƒãƒ¼ãƒˆã‚’æ‹¡å¼µ + - 動的フィールドを考慮ã—ãŸé‡è¤‡æŽ’除動作を改善 + - ClickHouseã‹ã‚‰ã®ãƒ†ãƒ¼ãƒ–ル変更å–得用ã«`tableRefreshInterval`を追加 +- [PowerBI](/docs/ja/integrations/powerbi)ãŠã‚ˆã³ ClickHouse データ型ã¨ã®é–“ã®SSL接続å•é¡Œã¨åž‹ãƒžãƒƒãƒ”ングを修正 + +## 2023å¹´9月7æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯PowerBI Desktopã®å…¬å¼ã‚³ãƒã‚¯ã‚¿ã®ãƒ™ãƒ¼ã‚¿ãƒªãƒªãƒ¼ã‚¹ã€ã‚¤ãƒ³ãƒ‰ã§ã®ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰æ±ºæ¸ˆå‡¦ç†ã®æ”¹å–„ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る言語クライアントã§ã®è¤‡æ•°ã®æ”¹å–„ã‚’æä¾›ã—ã¾ã™ã€‚ + +### コンソールã®å¤‰æ›´ +- インドã‹ã‚‰ã®è«‹æ±‚をサãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«æ®‹é«˜ã¨æ”¯æ‰•ã„å†è©¦è¡Œã‚’追加 + +### インテグレーションã®å¤‰æ›´ +- Kafka コãƒã‚¯ã‚¿: ClickHouse設定を構æˆã™ã‚‹ã‚µãƒãƒ¼ãƒˆã‚’追加ã€ã‚¨ãƒ©ãƒ¼.tolerance構æˆã‚ªãƒ—ションを追加 +- PowerBI Desktop: å…¬å¼ã‚³ãƒã‚¯ã‚¿ãƒ¼ã®ãƒ™ãƒ¼ã‚¿ç‰ˆã‚’リリース +- Grafana: ãƒã‚¤ãƒ³ãƒˆã‚¸ã‚ªã‚¿ã‚¤ãƒ—ã®ã‚µãƒãƒ¼ãƒˆã‚’追加ã€Data Analystダッシュボードã®ãƒ‘ãƒãƒ«ã‚’修正ã€timeIntervalマクロを修正 +- Pythonクライアント: Pandas 2.1.0ã¨ã®äº’æ›æ€§, Python 3.7ã®ã‚µãƒãƒ¼ãƒˆã‚’終了ã—ã€nullable JSONåž‹ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Node.js クライアント: default_format 設定ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Golang クライアント: boolåž‹ã®å–り扱ã„を修正ã€æ–‡å­—列ã®åˆ¶é™ã‚’解除 + +## 2023å¹´8月24æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ClickHouseデータベースã¸ã®MySQLインターフェースサãƒãƒ¼ãƒˆã€æ–°ã—ã„å…¬å¼PowerBIコãƒã‚¯ã‚¿ã€ã‚¯ãƒ©ã‚¦ãƒ‰ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã§ã®ã€Œå®Ÿè¡Œä¸­ã®ã‚¯ã‚¨ãƒªã€ãƒ“ューã€ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³23.7ã¸ã®æ›´æ–°ã‚’追加ã—ã¾ã™ã€‚ + +### 一般的ãªæ›´æ–° +- [MySQLプロトコル](https://clickhouse.com/docs/ja/interfaces/mysql)ã¸ã®ã‚µãƒãƒ¼ãƒˆã‚’追加ã—ã¾ã—ãŸã€‚ã“ã®ã‚µãƒãƒ¼ãƒˆã«ã‚ˆã‚Šã€å¤šãã®æ—¢å­˜ã®BIツールã¨ã®äº’æ›æ€§ãŒå¯èƒ½ã§ã™ã€‚会社ã«å¯¾ã™ã‚‹ã“ã®æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹ã«ã¯ã‚µãƒãƒ¼ãƒˆã¾ã§ãŠå•ã„åˆã‚ã›ãã ã•ã„。 +- æ–°ã—ã„å…¬å¼PowerBIコãƒã‚¯ã‚¿ã‚’å°Žå…¥ã—ã¾ã—㟠+ +### コンソールã®å¤‰æ›´ +- SQLコンソールã§ã®ã€Œå®Ÿè¡Œä¸­ã®ã‚¯ã‚¨ãƒªã€ãƒ“ューサãƒãƒ¼ãƒˆã‚’追加 + +### ClickHouse 23.7 ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚¢ãƒƒãƒ—グレード +- Azureテーブル関数ã®ã‚µãƒãƒ¼ãƒˆã‚’追加ã—ã€ãƒ—ロダクション対応ã®ã‚¸ã‚ªãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã€ã‚¸ãƒ§ã‚¤ãƒ³ãƒ‘フォーマンスを改善 - 23.5リリース [ブログ](https://clickhouse.com/blog/clickhouse-release-23-05) ã§è©³ç´°ã‚’å‚ç…§ +- MongoDBã®çµ±åˆã‚’ãƒãƒ¼ã‚¸ãƒ§ãƒ³6.0ã¾ã§æ‹¡å¼µ - 23.6リリース [ブログ](https://clickhouse.com/blog/clickhouse-release-23-06) ã§è©³ç´°ã‚’å‚ç…§ +- Parquetå½¢å¼ã¸ã®æ›¸ãè¾¼ã¿ãƒ‘フォーマンスを6å€ã«å‘上ã—ã€PRQLクエリ言語ã®ã‚µãƒãƒ¼ãƒˆã‚’追加ã—ã€SQL互æ›æ€§ã‚’å‘上 - 23.7リリース [デック](https://presentations.clickhouse.com/release_23.7/)ã§è©³ç´°ã‚’å‚ç…§ +- 新機能ã€ãƒ‘フォーマンスå‘上ã€ãŠã‚ˆã³ãƒã‚°ä¿®æ­£ãŒå¤šæ•° - 23.5ã€23.6ã€23.7ã®è©³ç´°ãª[変更ログ](https://clickhouse.com/docs/ja/whats-new/changelog)ã‚’ã”å‚ç…§ãã ã•ã„ + +### インテグレーションã®å¤‰æ›´ +- Kafkaコãƒã‚¯ã‚¿ï¼š Avro日付ãŠã‚ˆã³æ™‚間タイプã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- JavaScriptクライアント: ウェブベースã®ç’°å¢ƒç”¨ã«å®‰å®šç‰ˆã‚’リリース +- Grafana: フィルターロジックã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å処ç†ã‚’改善ã—ã€ã‚µãƒ–秒精度ã®TimeIntevalをサãƒãƒ¼ãƒˆ +- Golangクライアント:複数ã®ãƒãƒƒãƒãŠã‚ˆã³éžåŒæœŸãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®å•é¡Œã‚’修正 +- Metabase:v0.47をサãƒãƒ¼ãƒˆã—ã€æŽ¥ç¶šã«ç–‘似化を追加ã€ãƒ‡ãƒ¼ã‚¿åž‹ãƒžãƒƒãƒ”ングを修正 + +## 2023å¹´7月27æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ã€Kafkaã€ClickHouse用ã®ClickPipesã®ãƒ—ライベートプレビューã€æ–°ã—ã„データローディング体験ã€ãŠã‚ˆã³ã‚¯ãƒ©ã‚¦ãƒ‰ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã‚’使用ã—ã¦URLã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ロードã™ã‚‹èƒ½åŠ›ã‚’å°Žå…¥ã—ã¾ã™ã€‚ + +### インテグレーションã®å¤‰æ›´ +- ClickPipes for Kafkaã®ãƒ—ライベートプレビューを導入ã—ã€ã‚«ãƒ•ã‚«ã¨Confluent Cloudã‹ã‚‰ã®å¤§è¦æ¨¡ãƒ‡ãƒ¼ã‚¿ã‚’数クリックã§å–り込むクラウドãƒã‚¤ãƒ†ã‚£ãƒ–ã®çµ±åˆã‚¨ãƒ³ã‚¸ãƒ³ã€‚å‚加をã”希望ã®æ–¹ã¯ã“ã¡ã‚‰ã®[待機リスト](https://clickhouse.com/cloud/clickpipes#joinwaitlist)ã«ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã—ã¦ãã ã•ã„。 +- JavaScriptクライアント:ウェブベースã®ç’°å¢ƒï¼ˆãƒ–ラウザã€Cloudflareワーカー)ã®ã‚µãƒãƒ¼ãƒˆã‚’リリース。コミュニティã«ã‚ˆã‚‹ã‚«ã‚¹ã‚¿ãƒ ç’°å¢ƒå‘ã‘コãƒã‚¯ã‚¿ä½œæˆã‚’許å¯ã™ã‚‹ãŸã‚ã«ã‚³ãƒ¼ãƒ‰ã‚’リファクタリング。 +- Kafkaコãƒã‚¯ã‚¿ï¼šTimestamp ã¨Time Kafkaタイプã§ã®ã‚¤ãƒ³ãƒ©ã‚¤ãƒ³ã‚¹ã‚­ãƒ¼ãƒžã‚µãƒãƒ¼ãƒˆã‚’追加 +- Pythonクライアント:挿入圧縮ãŠã‚ˆã³LowCardinality読ã¿å–ã‚Šã®å•é¡Œã‚’修正 + +### コンソールã®å¤‰æ›´ +- 変更時ã®ãƒ†ãƒ¼ãƒ–ル作æˆè¨­å®šã‚ªãƒ—ションを多数æƒãˆãŸæ–°ã—ã„データローディング体験を追加 +- クラウドコンソールを使用ã—ãŸURLã‹ã‚‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ­ãƒ¼ãƒ‰æ©Ÿèƒ½ã‚’å°Žå…¥ +- å‚加フローを改善ã—ã€åˆ¥ã®çµ„ç¹”ã«å‚加ã™ã‚‹ãŸã‚ã®è¿½åŠ ã‚ªãƒ—ションã¨ã€ã™ã¹ã¦ã®ä¿ç•™ä¸­ã®å‚加を表示 + +## 2023å¹´7月14æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ã€å°‚用サービスを立ã¡ä¸Šã’る能力ã€æ–°ã—ã„AWSリージョンオーストラリアã€ãŠã‚ˆã³ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®æš—å·åŒ–データã«å¯¾ã™ã‚‹ç‹¬è‡ªã®ã‚­ãƒ¼æŒã¡è¾¼ã¿èƒ½åŠ›ã‚’å°Žå…¥ã—ã¾ã™ã€‚ + +### 一般的ãªæ›´æ–° +- æ–°ã—ã„AWSオーストラリア地域:シドニー (ap-southeast-2) +- レイテンシーを厳ã—ã監視ã—ãŸãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ç”¨ã®å°‚用階層サービス(セットアップã«ã¯[サãƒãƒ¼ãƒˆ](https://clickhouse.cloud/support)ã«é€£çµ¡ã—ã¦ãã ã•ã„) +- ç£æ°—ディスク上ã®æš—å·åŒ–データã®ãŸã‚ã®ç‹¬è‡ªã®ã‚­ãƒ¼æŒã¡è¾¼ã¿èƒ½åŠ› (設置ã«ã¯[サãƒãƒ¼ãƒˆ](https://clickhouse.cloud/support)ã«é€£çµ¡ã—ã¦ãã ã•ã„) + +### コンソールã®å¤‰æ›´ +- éžåŒæœŸæŒ¿å…¥ç”¨ã®è¦³æ¸¬æ€§ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã¸ã®æ”¹å–„ +- サãƒãƒ¼ãƒˆã¨ã®çµ±åˆã®ãŸã‚ã®ãƒãƒ£ãƒƒãƒˆãƒœãƒƒãƒˆã®æŒ¯ã‚‹èˆžã„を改善 + +### インテグレーションã®å¤‰æ›´ +- NodeJSクライアント:ソケットタイムアウトã«ã‚ˆã‚‹æŽ¥ç¶šå¤±æ•—ã®ä¿®æ­£ +- Pythonクライアント:挿入クエリã«å¯¾ã™ã‚‹QuerySummaryã®è¿½åŠ ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã§ã®ç‰¹æ®Šæ–‡å­—サãƒãƒ¼ãƒˆ +- Metabase:JDBCドライãƒãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€DateTime64サãƒãƒ¼ãƒˆã€ãƒ‘フォーマンス改善を更新 + +### コアデータベースã®å¤‰æ›´ +- [クエリキャッシュ](https://clickhouse.com/docs/ja/operations/query-cache)ã¯ClickHouse Cloudã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚有効ã«ã™ã‚‹ã¨ã€æˆåŠŸã—ãŸã‚¯ã‚¨ãƒªã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§1分間キャッシュã•ã‚Œã€ä»¥é™ã®ã‚¯ã‚¨ãƒªã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸçµæžœã‚’使用ã—ã¾ã™ã€‚ + +## 2023å¹´6月20æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ClickHouse Cloud on GCPを一般æä¾›ã—ã€Cloud API用ã®Terraformプロãƒã‚¤ãƒ€ãƒ¼ã‚’æä¾›ã—ã€ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³23.4ã¸æ›´æ–°ã—ã¾ã™ã€‚ + +### 一般的ãªæ›´æ–° +- ClickHouse Cloud on GCPã¯GAã§ã€GCPマーケットプレースã®çµ±åˆã€ãƒ—ライベートサービス接続ã®ã‚µãƒãƒ¼ãƒˆã€ãŠã‚ˆã³è‡ªå‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— (詳細ã¯[ブログ](https://clickhouse.com/blog/clickhouse-cloud-on-google-cloud-platform-gcp-is-generally-available)ã¨[プレスリリース](https://clickhouse.com/blog/clickhouse-cloud-expands-choice-with-launch-on-google-cloud-platform)ã‚’å‚ç…§) ã‚’ã‚‚ãŸã‚‰ã—ã¾ã™ã€‚ +- [Terraformプロãƒã‚¤ãƒ€ãƒ¼](https://registry.terraform.io/providers/ClickHouse/clickhouse/latest/docs)ãŒCloud APIã§åˆ©ç”¨å¯èƒ½ã«ãªã‚Šã¾ã—㟠+ +### コンソールã®å¤‰æ›´ +- サービスã®ãŸã‚ã®æ–°ã—ã„çµ±åˆè¨­å®šãƒšãƒ¼ã‚¸ã‚’追加 +- ストレージã¨è¨ˆç®—ã®ãŸã‚ã®ãƒ¡ãƒ¼ã‚¿ãƒªãƒ³ã‚°ç²¾åº¦ã‚’調整 + +### インテグレーションã®å¤‰æ›´ +- Pythonクライアント:挿入パフォーマンスを改善ã—ã€å†…部ä¾å­˜ã‚’リファクタリングã—ã¦ãƒžãƒ«ãƒãƒ—ロセッシングをサãƒãƒ¼ãƒˆ +- Kafkaコãƒã‚¯ã‚¿ï¼š Confluent Cloudã«ã‚¢ãƒƒãƒ—ロードãŠã‚ˆã³ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ãã€è‡¨æ™‚ã®æŽ¥ç¶šå•é¡Œã‚’å†è©¦è¡Œã€ç„¡åŠ¹ãªã‚³ãƒã‚¯ã‚¿ã‚¹ãƒ†ãƒ¼ãƒˆã‚’自動リセット + +### ClickHouse 23.4 ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚¢ãƒƒãƒ—グレード +- 並列レプリカã®JOINサãƒãƒ¼ãƒˆã‚’追加 (設置ã«ã¯[サãƒãƒ¼ãƒˆ](https://clickhouse.cloud/support)ã¾ã§ã”連絡ãã ã•ã„) +- è«–ç†å‰Šé™¤ã®ãƒ‘フォーマンスを改善 +- 大è¦æ¨¡æŒ¿å…¥ã®å‡¦ç†ä¸­ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’改善 + +### 管ç†å¤‰æ›´ +- éžã€Œãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãŸã‚ã®ãƒ­ãƒ¼ã‚«ãƒ«Dictionary作æˆã‚’æ‹¡å¼µ + +## 2023å¹´5月30æ—¥ +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ClickHouse Cloudã®ç®¡ç†ãƒ—レーンæ“作å‘ã‘プログラムAPIã®ä¸€èˆ¬å…¬é–‹ï¼ˆè©³ç´°ã¯[ブログ](https://clickhouse.com/blog/using-the-new-clickhouse-cloud-api-to-automate-deployments)ã‚’å‚照)ã€IAMロールを用ã„ãŸS3アクセスã€ãŠã‚ˆã³è¿½åŠ ã®ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚ªãƒ—ションをæä¾›ã—ã¾ã™ã€‚ + +### 一般的ãªå¤‰æ›´ +- ClickHouse Cloud用APIサãƒãƒ¼ãƒˆã€‚æ–°ã—ã„Cloud APIを使用ã™ã‚‹ã¨ã€æ—¢å­˜ã®CI/CDパイプラインã«ç®¡ç†ã‚µãƒ¼ãƒ“スをシームレスã«çµ±åˆã—ã€ã‚µãƒ¼ãƒ“スをプログラムã§ç®¡ç†ã§ãã¾ã™ã€‚ +- IAMロールを使用ã—ãŸS3アクセス。IAMロールを活用ã—ã¦ã€ãƒ—ライベートãªAmazon Simple Storage Service (S3) ãƒã‚±ãƒƒãƒˆã«å®‰å…¨ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ãªã‚Šã¾ã—ãŸï¼ˆè¨­å®šã™ã‚‹ã«ã¯ã‚µãƒãƒ¼ãƒˆã«ãŠå•ã„åˆã‚ã›ãã ã•ã„)。 + +### スケーリングã®å¤‰æ›´ +- [水平スケーリング](/docs/ja/manage/scaling#adding-more-nodes-horizontal-scaling)。より多ãã®ä¸¦åˆ—化ãŒå¿…è¦ãªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¯ã€æœ€å¤§10ã®ãƒ¬ãƒ—リカã§æ§‹æˆã§ãるよã†ã«ãªã‚Šã¾ã—ãŸï¼ˆè¨­å®šã™ã‚‹ã«ã¯ã‚µãƒãƒ¼ãƒˆã«ãŠå•ã„åˆã‚ã›ãã ã•ã„)。 +- [CPUベースã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°](/docs/ja/manage/scaling)。CPUè² è·ã®é«˜ã„ワークロードã¯ã€è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ãƒãƒªã‚·ãƒ¼ã«è¿½åŠ ã®ãƒˆãƒªã‚¬ãƒ¼ã‚’利用ã§ãã¾ã™ã€‚ + +### コンソールã®å¤‰æ›´ +- Devサービスã‹ã‚‰Productionサービスã¸ã®ç§»è¡Œï¼ˆæœ‰åŠ¹ã«ã™ã‚‹ã«ã¯ã‚µãƒãƒ¼ãƒˆã«ãŠå•ã„åˆã‚ã›ãã ã•ã„)。 +- インスタンス作æˆãƒ•ãƒ­ãƒ¼ä¸­ã®ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°è¨­å®šã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã®è¿½åŠ  +- デフォルトã®ãƒ‘スワードãŒãƒ¡ãƒ¢ãƒªã«å­˜åœ¨ã—ãªã„ã¨ãã®æŽ¥ç¶šæ–‡å­—列ã®ä¿®æ­£ + +### çµ±åˆã®å¤‰æ›´ +- Golangクライアント:ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルã§ã®ä¸å‡è¡¡ãªæŽ¥ç¶šã‚’引ãèµ·ã“ã™å•é¡Œã‚’修正ã—ã€ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルã§ã®ã‚«ã‚¹ã‚¿ãƒ è¨­å®šã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Nodejsクライアント:nodejs v14ã®ã‚µãƒãƒ¼ãƒˆã‚’中止ã—ã€v20ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Kafka Connector:LowCardinalityåž‹ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Metabase:タイムレンジã§ã®ã‚°ãƒ«ãƒ¼ãƒ—化を修正ã—ã€Metabaseã«çµ„ã¿è¾¼ã¾ã‚ŒãŸè³ªå•ã§ã®æ•´æ•°ã‚µãƒãƒ¼ãƒˆã‚’修正 + +### パフォーマンスã¨ä¿¡é ¼æ€§ +- 書ãè¾¼ã¿è² è·ã®é«˜ã„ワークロードã®åŠ¹çŽ‡ã¨ãƒ‘フォーマンスを改善 +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®é€Ÿåº¦ã¨åŠ¹çŽ‡ã‚’上ã’ã‚‹ãŸã‚ã®å¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—戦略を展開 + +## 2023å¹´5月11æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ClickHouse Cloud on GCPã®~~パブリックベータ~~ (ç¾åœ¨GAã€è©³ã—ãã¯6月20æ—¥ã®é …目をå‚ç…§) ã‚’æä¾›ã—ã€ç®¡ç†è€…権é™ã®æ‹¡å¼µã«ã‚ˆã‚Šã‚¯ã‚¨ãƒªã®çµ‚了権é™ã‚’付与ã—ã€Cloudコンソールã§MFAユーザーã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã®å¯è¦–性をå‘上ã•ã›ã¾ã™ã€‚ + +### ClickHouse Cloud on GCP ~~(パブリックベータ)~~ (ç¾åœ¨GAã€è©³ã—ãã¯6月20æ—¥ã®é …目をå‚ç…§) +- Google Computeã¨Google Cloud Storage上ã§å‹•ä½œã™ã‚‹ã€å®Œå…¨ã«ç®¡ç†ã•ã‚ŒãŸã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã‚³ãƒ³ãƒ”ュートã®åˆ†é›¢ã•ã‚ŒãŸClickHouseオファリングを開始 +- 米国アイオワ(us-central1)ã€ã‚ªãƒ©ãƒ³ãƒ€(ヨーロッパ西部4)ã€ã‚·ãƒ³ã‚¬ãƒãƒ¼ãƒ«(アジアå—æ±éƒ¨1)ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã§åˆ©ç”¨å¯èƒ½ +- ã™ã¹ã¦ã®åˆæœŸãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã§é–‹ç™ºãŠã‚ˆã³æœ¬ç•ªã‚µãƒ¼ãƒ“スをサãƒãƒ¼ãƒˆ +- デフォルトã§å¼·åŠ›ãªã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’æ供:転é€ä¸­ã®ã‚¨ãƒ³ãƒ‰ãƒ„ーエンド暗å·åŒ–ã€é™æ­¢ä¸­ã®ãƒ‡ãƒ¼ã‚¿æš—å·åŒ–ã€IP許å¯ãƒªã‚¹ãƒˆ + +### çµ±åˆã®å¤‰æ›´ +- Golangクライアント:プロキシ環境変数ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Grafana:Grafanaデータソースセットアップã§ClickHouseカスタム設定ã¨ãƒ—ロキシ環境変数を指定ã™ã‚‹æ©Ÿèƒ½ã‚’追加 +- Kafka Connector:空ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã®å‡¦ç†ã‚’改善 + +### コンソールã®å¤‰æ›´ +- ユーザーリストã«å¤šè¦ç´ èªè¨¼(MFA)使用ã®ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ã‚’追加 + +### パフォーマンスã¨ä¿¡é ¼æ€§ +- 管ç†è€…å‘ã‘ã«ã‚¯ã‚¨ãƒªçµ‚了権é™ã®ã‚ˆã‚Šç´°ã‹ã„制御を追加 + +## 2023å¹´5月4æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€æ–°ã—ã„ヒートマップãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒ—ã‚’å°Žå…¥ã—ã€èª²é‡‘使用ページを改善ã—ã€ã‚µãƒ¼ãƒ“スã®èµ·å‹•æ™‚間を改善ã—ã¾ã™ã€‚ + +### コンソールã®å¤‰æ›´ +- SQLコンソールã«ãƒ’ートマップãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒ—を追加 +- å„課金ディメンション内ã§æ¶ˆè²»ã•ã‚ŒãŸã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚’表示ã™ã‚‹ã‚ˆã†ã«èª²é‡‘使用ページを改善 + +### çµ±åˆã®å¤‰æ›´ +- Kafkaコãƒã‚¯ã‚¿ï¼šä¸€æ™‚çš„ãªæŽ¥ç¶šã‚¨ãƒ©ãƒ¼ã®å†è©¦è¡Œãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’追加 +- Pythonクライアント:http接続ãŒæ°¸é ã«å†åˆ©ç”¨ã•ã‚Œãªã„よã†ã«ã™ã‚‹max_connection_age設定を追加。ã“ã‚Œã«ã‚ˆã‚Šã€ç‰¹å®šã®ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ã®å•é¡Œã‚’解決ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ +- Node.jsクライアント:Node.js v20ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Javaクライアント:クライアント証明書èªè¨¼ã®ã‚µãƒãƒ¼ãƒˆã‚’改善ã—ã€ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚¿ãƒ—ルã€ãƒžãƒƒãƒ—ã€ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚¿ã‚¤ãƒ—ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 + +### パフォーマンスã¨ä¿¡é ¼æ€§ +- 大é‡ã®ãƒ‘ーツãŒå­˜åœ¨ã™ã‚‹éš›ã®ã‚µãƒ¼ãƒ“スã®èµ·å‹•æ™‚間を改善 +- SQLコンソールã®ãƒ­ãƒ³ã‚°ãƒ©ãƒ³ãƒ‹ãƒ³ã‚°ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒ³ã‚»ãƒ«ã®ãƒ­ã‚¸ãƒƒã‚¯ã‚’最é©åŒ– + +### ãƒã‚°ä¿®æ­£ +- ‘Cell Towers’サンプルデータセットã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆãŒå¤±æ•—ã™ã‚‹ãƒã‚°ã‚’修正 + +## 2023å¹´4月20æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’23.3ã«æ›´æ–°ã—ã€ã‚³ãƒ¼ãƒ«ãƒ‰ãƒªãƒ¼ãƒ‰ã®é€Ÿåº¦ã‚’大幅ã«æ”¹å–„ã—ã€ã‚µãƒãƒ¼ãƒˆã¨ã®ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ãƒãƒ£ãƒƒãƒˆã‚’æä¾›ã—ã¾ã™ã€‚ + +### コンソールã®å¤‰æ›´ +- サãƒãƒ¼ãƒˆã¨ã®ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ãƒãƒ£ãƒƒãƒˆã‚ªãƒ—ションを追加 + +### çµ±åˆã®å¤‰æ›´ +- Kafka コãƒã‚¯ã‚¿ï¼šNullable åž‹ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Golang クライアント:外部テーブルã®ã‚µãƒãƒ¼ãƒˆã‚’追加ã€ãƒ–ールã¨ãƒã‚¤ãƒ³ã‚¿åž‹ã®ãƒ‘ラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’サãƒãƒ¼ãƒˆ + +### 設定ã®å¤‰æ›´ +- `max_table_size_to_drop` 㨠`max_partition_size_to_drop` ã®è¨­å®šã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã—ã¦å¤§ããªãƒ†ãƒ¼ãƒ–ルを削除ã™ã‚‹èƒ½åŠ›ã‚’追加 + +### パフォーマンスã¨ä¿¡é ¼æ€§ +- S3 プリフェッãƒã‚’通ã˜ã¦ã‚³ãƒ¼ãƒ«ãƒ‰ãƒªãƒ¼ãƒ‰ã®é€Ÿåº¦ã‚’改善ã™ã‚‹ `allow_prefetched_read_pool_for_remote_filesystem` 設定を導入 + +### ClickHouse 23.3 ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚¢ãƒƒãƒ—グレード +- è«–ç†å‰Šé™¤ãŒæœ¬ç•ªå¯¾å¿œã¨ãªã‚Šã€è©³ç´°ã¯23.3リリース[ブログ](https://clickhouse.com/blog/clickhouse-release-23-03)ã‚’å‚ç…§ +- 複数ステージã®PREWHEREをサãƒãƒ¼ãƒˆã«è¿½åŠ ã€23.2リリース[ブログ](https://clickhouse.com/blog/clickhouse-release-23-03)ã‚’å‚ç…§ +- 新機能ã€ãƒ‘フォーマンス改善ã€ãƒã‚°ä¿®æ­£å¤šæ•° - 詳細ãª[変更ログ](/docs/ja/whats-new/changelog/index.md)ã‚’å‚ç…§ãã ã•ã„ + +## 2023å¹´4月6æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ã‚¯ãƒ©ã‚¦ãƒ‰ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’å–å¾—ã™ã‚‹ãŸã‚ã®APIã€æœ€å°ã‚¢ã‚¤ãƒ‰ãƒ«ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã®ãŸã‚ã®é«˜åº¦ãªã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°åˆ¶å¾¡ã€ãŠã‚ˆã³Pythonクライアントクエリメソッドã§ã®å¤–部データã®ã‚µãƒãƒ¼ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚ + +### APIã®å¤‰æ›´ +* [Cloud Endpoints API](/docs/ja/cloud/security/cloud-endpoints-api.md)経由ã§ClickHouse Cloudエンドãƒã‚¤ãƒ³ãƒˆã‚’プログラムã§ã‚¯ã‚¨ãƒªã™ã‚‹èƒ½åŠ›ã‚’追加 + +### コンソールã®å¤‰æ›´ +- 高度ãªã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°è¨­å®šã«ã€Œæœ€å°ã‚¢ã‚¤ãƒ‰ãƒ«ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€è¨­å®šã‚’追加 +- データロードモーダルã§ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã«æœ€å–„努力ã®æ—¥ä»˜æ™‚刻検出を追加 + +### çµ±åˆã®å¤‰æ›´ +- [Metabase](/docs/ja/integrations/data-visualization/metabase-and-clickhouse.md):複数ã®ã‚¹ã‚­ãƒ¼ãƒžã‚µãƒãƒ¼ãƒˆã‚’追加 +- [Go client](/docs/ja/integrations/language-clients/go/index.md):TLS接続ã®ã‚¢ã‚¤ãƒ‰ãƒ«æŽ¥ç¶šãƒ©ã‚¤ãƒ–ãƒã‚¹ãƒã‚§ãƒƒã‚¯ã‚’修正 +- [Python client](/docs/ja/integrations/language-clients/python/index.md) + - クエリメソッドã§ã®å¤–部データã®ã‚µãƒãƒ¼ãƒˆã‚’追加 + - クエリçµæžœã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚µãƒãƒ¼ãƒˆã‚’追加 + - `no_proxy` / `NO_PROXY` 環境変数ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 + - Nullableåž‹ã®NULL値ã®ã‚µãƒ¼ãƒãƒ¼å´ãƒ‘ラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’修正 + +### ãƒã‚°ä¿®æ­£ +* SQLコンソールã‹ã‚‰ã® `INSERT INTO … SELECT …` 実行時ã«é¸æŠžã‚¯ã‚¨ãƒªã¨åŒã˜è¡Œåˆ¶é™ãŒèª¤ã£ã¦é©ç”¨ã•ã‚Œã‚‹å•é¡Œã‚’修正 + +## 2023å¹´3月23æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‘スワードã®è¤‡é›‘ã•ãƒ«ãƒ¼ãƒ«ã‚’å°Žå…¥ã—ã€å¤§è¦æ¨¡ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å¾©å…ƒé€Ÿåº¦ã‚’大幅ã«å‘上ã•ã›ã€Grafana Trace Viewã§ã®ãƒˆãƒ¬ãƒ¼ã‚¹è¡¨ç¤ºã‚µãƒãƒ¼ãƒˆã‚’追加ã—ã¾ã™ã€‚ + +### セキュリティã¨ä¿¡é ¼æ€§ +- 基幹データベースエンドãƒã‚¤ãƒ³ãƒˆã¯ãƒ‘スワードã®è¤‡é›‘ã•ãƒ«ãƒ¼ãƒ«ã‚’施行 +- 大è¦æ¨¡ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å¾©å…ƒæ™‚間を改善 + +### コンソールã®å¤‰æ›´ +- オンボーディングワークフローをåˆç†åŒ–ã—ã€æ–°ã—ã„デフォルトã¨ã‚ˆã‚Šã‚³ãƒ³ãƒ‘クトãªãƒ“ューを導入 +- サインアップãŠã‚ˆã³ã‚µã‚¤ãƒ³ã‚¤ãƒ³é…延を削減 + +### çµ±åˆã®å¤‰æ›´ +- Grafana: + - ClickHouseã«ä¿å­˜ã•ã‚ŒãŸãƒˆãƒ¬ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ã®Trace View表示サãƒãƒ¼ãƒˆã‚’追加 + - 時間範囲フィルタを改善ã—ã€ãƒ†ãƒ¼ãƒ–ルåã«ç‰¹æ®Šæ–‡å­—サãƒãƒ¼ãƒˆã‚’追加 +- Superset:ãƒã‚¤ãƒ†ã‚£ãƒ–ClickHouseサãƒãƒ¼ãƒˆã‚’追加 +- Kafka Connect Sink:自動日付変æ›ã¨Nullカラム処ç†ã‚’追加 +- Metabase:v0.46ã¨ã®äº’æ›æ€§ã‚’実装 +- Pythonクライアント:一時テーブルã¸ã®æŒ¿å…¥ã‚’修正ã—ã€Pandas Nullサãƒãƒ¼ãƒˆã‚’追加 +- Golangクライアント:タイムゾーンã§Dateåž‹ã‚’æ­£è¦åŒ– +- Javaクライアント + - 圧縮ã€ã‚¤ãƒ³ãƒ•ã‚¡ã‚¤ãƒ«ã€ã‚¢ã‚¦ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã®SQLパーサーサãƒãƒ¼ãƒˆã‚’追加 + - 資格情報ã®è² è·ã‚’追加 + - `ON CLUSTER`ã§ã®ãƒãƒƒãƒã‚µãƒãƒ¼ãƒˆã‚’修正 +- Node.jsクライアント + - JSONStrings, JSONCompact, JSONCompactStrings, JSONColumnsWithMetadataå½¢å¼ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 + - ã™ã¹ã¦ã®ä¸»è¦ãªã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã« `query_id` ã‚’æä¾›å¯èƒ½ + +### ãƒã‚°ä¿®æ­£ +- æ–°ã—ã„サービスã®åˆæœŸãƒ—ロビジョニングã¨èµ·å‹•æ™‚é–“ã®é…延を引ãèµ·ã“ã™ãƒã‚°ã‚’修正 +- キャッシュã®èª¤è¨­å®šã«ã‚ˆã‚‹ã‚¯ã‚¨ãƒªæ€§èƒ½ã®ä½Žä¸‹ã‚’引ãèµ·ã“ã™ãƒã‚°ã‚’修正 + +## 2023å¹´3月9æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ç›£è¦–ダッシュボードを改善ã—ã€å¤§è¦æ¨¡ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ä½œæˆæ™‚間を最é©åŒ–ã—ã€å¤§è¦æ¨¡ãªãƒ†ãƒ¼ãƒ–ルやパーティションを削除ã™ã‚‹ãŸã‚ã«å¿…è¦ãªè¨­å®šã‚’追加ã—ã¾ã™ã€‚ + +### コンソールã®å¤‰æ›´ +- 高度ãªç›£è¦–ダッシュボードã®è¿½åŠ ï¼ˆãƒ—レビュー) +- 監視ダッシュボードã«ãƒ¡ãƒ¢ãƒªã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ãƒãƒ£ãƒ¼ãƒˆã‚’å°Žå…¥ +- SQLコンソールã®ã‚¹ãƒ—レッドシートビューã§ã®ã‚¹ãƒšãƒ¼ã‚¹ã¨æ”¹è¡Œå‡¦ç†ã‚’改善 + +### 信頼性ã¨ãƒ‘フォーマンス +- データãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã®ã¿ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå®Ÿè¡Œã•ã‚Œã‚‹ã‚ˆã†ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—スケジュールを最é©åŒ– +- 大è¦æ¨¡ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å®Œäº†æ™‚間を改善 + +### 設定ã®å¤‰æ›´ +- クエリã¾ãŸã¯æŽ¥ç¶šãƒ¬ãƒ™ãƒ«ã§è¨­å®š `max_table_size_to_drop` 㨠`max_partition_size_to_drop` をオーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ã“ã¨ã§ãƒ†ãƒ¼ãƒ–ルã¨ãƒ‘ーティションを削除ã™ã‚‹ãŸã‚ã®åˆ¶é™ã‚’増やã™èƒ½åŠ›ã‚’追加 +- クエリログã«ã‚½ãƒ¼ã‚¹IPを追加ã—ã€ã‚½ãƒ¼ã‚¹IPã«åŸºã¥ã„ãŸã‚¯ã‚©ãƒ¼ã‚¿ã¨ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã®æ–½è¡Œã‚’å¯èƒ½ã« + +### çµ±åˆ +- [Python client](/docs/ja/integrations/language-clients/python/index.md):Pandasサãƒãƒ¼ãƒˆã‚’改善ã—ã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³é–¢é€£ã®å•é¡Œã‚’修正 +- [Metabase](/docs/ja/integrations/data-visualization/metabase-and-clickhouse.md):Metabase 0.46.xã®äº’æ›æ€§ã¨SimpleAggregateFunctionã®ã‚µãƒãƒ¼ãƒˆ +- [Kafka-Connect](/docs/ja/integrations/data-ingestion/kafka/index.md):暗黙的ãªæ—¥ä»˜å¤‰æ›ã¨nullカラムã®ã‚ˆã‚Šè‰¯ã„å–り扱ㄠ+- [Java Client](https://github.com/ClickHouse/clickhouse-java):Javaマップã¸ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸå¤‰æ› + +## 2023å¹´2月23æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ClickHouse 23.1コアリリースã®æ©Ÿèƒ½ã®ä¸€éƒ¨ã‚’有効化ã—ã€Amazon Managed Streaming for Apache Kafka(MSK)ã¨ã®ç›¸äº’é‹ç”¨æ€§ã‚’æä¾›ã—ã€ã‚¢ã‚¯ãƒ†ã‚£ãƒ“ティログã§ã®é«˜åº¦ãªã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã¨ã‚¢ã‚¤ãƒ‰ãƒªãƒ³ã‚°ã®èª¿æ•´ã‚’公開ã—ã¾ã™ã€‚ + +### ClickHouse 23.1 ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚¢ãƒƒãƒ—グレード + +ClickHouse 23.1ã®æ©Ÿèƒ½ã®ä¸€éƒ¨ã‚’追加。例: +- Mapåž‹ã¨ã®ARRAY JOIN +- SQL標準ã®16進数ã¨ãƒã‚¤ãƒŠãƒªãƒªãƒ†ãƒ©ãƒ« +- æ–°ã—ã„関数ã€`age()`ã€`quantileInterpolatedWeighted()`ã€`quantilesInterpolatedWeighted()`ãªã© +- `generateRandom` ã§å¼•æ•°ãªã—ã§æŒ¿å…¥ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã‚’使用ã™ã‚‹èƒ½åŠ› +- éŽåŽ»ã®åå‰ã®å†åˆ©ç”¨ã‚’å¯èƒ½ã«ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ä½œæˆã¨åå‰å¤‰æ›´ãƒ­ã‚¸ãƒƒã‚¯ã®æ”¹å–„ +- 詳細ã¯23.1リリース[ウェビナースライド](https://presentations.clickhouse.com/release_23.1/#cover)ãŠã‚ˆã³[23.1リリース変更ログ](/docs/ja/whats-new/changelog/index.md/#clickhouse-release-231)ã‚’å‚ç…§ãã ã•ã„ + +### çµ±åˆã®å¤‰æ›´ +- [Kafka-Connect](/docs/ja/integrations/data-ingestion/kafka/index.md):Amazon MSKã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- [Metabase](/docs/ja/integrations/data-visualization/metabase-and-clickhouse.md):1.0.0ã®åˆæœŸå®‰å®šãƒªãƒªãƒ¼ã‚¹ + - 接続ãŒ[Metabase Cloud](https://www.metabase.com/start/)ã§åˆ©ç”¨å¯èƒ½ + - 利用å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’ã™ã¹ã¦æŽ¢ç´¢ã™ã‚‹æ©Ÿèƒ½ã‚’追加 + - AggregationFunctionåž‹ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã®åŒæœŸã‚’修正 +- [DBT-clickhouse](/docs/ja/integrations/data-ingestion/etl-tools/dbt/index.md):最新ã®DBTãƒãƒ¼ã‚¸ãƒ§ãƒ³v1.4.1ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- [Python client](/docs/ja/integrations/language-clients/python/index.md):プロキシã¨SSHトンãƒãƒªãƒ³ã‚°ã®ã‚µãƒãƒ¼ãƒˆã‚’改善。Pandasデータフレームã®ãŸã‚ã®ã„ãã¤ã‹ã®ä¿®æ­£ã¨ãƒ‘フォーマンス最é©åŒ–を追加 +- [Nodejs client](/docs/ja/integrations/language-clients/js.md):`system.query_log`ã‹ã‚‰ã‚¯ã‚¨ãƒªãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ä½¿ç”¨å¯èƒ½ãª`query_id`をクエリçµæžœã«æ·»ä»˜ã™ã‚‹æ©Ÿèƒ½ã‚’リリース +- [Golang client](/docs/ja/integrations/language-clients/go/index.md):ClickHouse Cloudã¨ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶šã‚’最é©åŒ– + +### コンソールã®å¤‰æ›´ +- アクティビティログã«é«˜åº¦ãªã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ãŠã‚ˆã³ã‚¢ã‚¤ãƒ‰ãƒªãƒ³ã‚°è¨­å®šã®èª¿æ•´ã‚’追加 +- パスワードリセットメールã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã¨IP情報を追加 +- Google OAuthã®ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—フローメカニクスを改善 + +### 信頼性ã¨ãƒ‘フォーマンス +- 大è¦æ¨¡ã‚µãƒ¼ãƒ“スã®ãƒªã‚¸ãƒ¥ãƒ¼ãƒ æ™‚間をスピードアップ +- 大è¦æ¨¡ãªãƒ†ãƒ¼ãƒ–ルã¨ãƒ‘ーティションをæŒã¤ã‚µãƒ¼ãƒ“スã®ãƒªãƒ¼ãƒ‰é…延を改善 + +### ãƒã‚°ä¿®æ­£ +- サービスパスワードã®ãƒªã‚»ãƒƒãƒˆãŒãƒ‘スワードãƒãƒªã‚·ãƒ¼ã«å¾“ã£ã¦ã„ãªã‹ã£ãŸå‹•ä½œã‚’修正 +- 組織招待メールã®æ¤œè¨¼ã‚’大文字å°æ–‡å­—を区別ã—ãªã„よã†ã«å¤‰æ›´ + +## 2023å¹´2月2æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€å…¬å¼ã«ã‚µãƒãƒ¼ãƒˆã•ã‚ŒãŸMetabaseçµ±åˆã€ä¸»è¦ãªJavaクライアント/JDBCドライãƒãƒªãƒªãƒ¼ã‚¹ã€ãŠã‚ˆã³SQLコンソールã§ã®ãƒ“ューã¨Materialized Viewサãƒãƒ¼ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚ + +### çµ±åˆã®å¤‰æ›´ +- [Metabase](/docs/ja/integrations/data-visualization/metabase-and-clickhouse.md) プラグイン: ClickHouseãŒä¿å®ˆã™ã‚‹å…¬å¼ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã¨ã—ã¦ã®æä¾› +- [dbt](/docs/ja/integrations/data-ingestion/etl-tools/dbt/index.md) プラグイン: [複数スレッド](https://github.com/ClickHouse/dbt-clickhouse/blob/main/CHANGELOG.md)ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- [Grafana](/docs/ja/integrations/data-visualization/grafana/index.md) プラグイン: 接続エラーã®ã‚ˆã‚Šè‰¯ã„å‡¦ç† +- [Python](/docs/ja/integrations/language-clients/python/index.md) クライアント: 挿入æ“作ã®[ストリーミングサãƒãƒ¼ãƒˆ](/docs/ja/integrations/language-clients/python/index.md#streaming-queries) +- [Go](/docs/ja/integrations/language-clients/go/index.md) クライアント: [ãƒã‚°ä¿®æ­£](https://github.com/ClickHouse/clickhouse-go/blob/main/CHANGELOG.md): キャンセルã•ã‚ŒãŸæŽ¥ç¶šã®ã‚¯ãƒ­ãƒ¼ã‚ºã‚’修正ã€æŽ¥ç¶šã‚¨ãƒ©ãƒ¼ã®ã‚ˆã‚Šè‰¯ã„å‡¦ç† +- [JS](/docs/ja/integrations/language-clients/js.md) クライアント: [exec/insertã®ç ´å£Šçš„ãªå¤‰æ›´](https://github.com/ClickHouse/clickhouse-js/releases/tag/0.0.12); 返戻タイプã§query_idを公開 +- [Java](https://github.com/ClickHouse/clickhouse-java#readme) クライアント/JDBCドライãƒãƒ¼ã®å¤§å¹…ãªãƒªãƒªãƒ¼ã‚¹ + - [破壊的ãªå¤‰æ›´](https://github.com/ClickHouse/clickhouse-java/releases): 廃止ã•ã‚ŒãŸãƒ¡ã‚½ãƒƒãƒ‰ã€ã‚¯ãƒ©ã‚¹ã€ãŠã‚ˆã³ãƒ‘ッケージãŒå‰Šé™¤ + - R2DBCドライãƒãƒ¼ã¨ãƒ•ã‚¡ã‚¤ãƒ«æŒ¿å…¥ã‚µãƒãƒ¼ãƒˆã‚’追加 + +### コンソールã®å¤‰æ›´ +- SQLコンソールã§ã®ãƒ“ューã¨Materialized Viewã®ã‚µãƒãƒ¼ãƒˆã‚’追加 + +### パフォーマンスã¨ä¿¡é ¼æ€§ +- åœæ­¢ä¸­/アイドリング中ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®ãƒ‘スワードリセットを高速化 +- より正確ãªã‚¢ã‚¯ãƒ†ã‚£ãƒ“ティトラッキングã«ã‚ˆã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ãƒ€ã‚¦ãƒ³å‹•ä½œã®æ”¹å–„ +- SQLコンソールã§ã®CSVエクスãƒãƒ¼ãƒˆãŒåˆ‡ã‚Šæ¨ã¦ã‚‰ã‚ŒãŸãƒã‚°ã‚’修正 +- サンプルデータã®ã‚¢ãƒƒãƒ—ロードã«æ–­ç¶šçš„ãªéšœå®³ãŒç™ºç”Ÿã™ã‚‹ãƒã‚°ã‚’修正 + +## 2023å¹´1月12æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’22.12ã«æ›´æ–°ã—ã€å¤šãã®æ–°ã—ã„ソースã§Dictionaryを有効ã«ã—ã€ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスを改善ã—ã¾ã™ã€‚ + +### 一般的ãªå¤‰æ›´ +- 外部ClickHouseã€Cassandraã€MongoDBã€MySQLã€PostgreSQLã€Redisã‚’å«ã‚€è¿½åŠ ã®ã‚½ãƒ¼ã‚¹ã®ãŸã‚Dictionaryを有効化 + +### ClickHouse 22.12 ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚¢ãƒƒãƒ—グレード +- Grace Hash Joinã‚’å«ã‚€JOINサãƒãƒ¼ãƒˆã‚’æ‹¡å¼µ +- ファイルを読ã¿å–ã‚‹ãŸã‚ã®ãƒã‚¤ãƒŠãƒªJSON(BSON)サãƒãƒ¼ãƒˆã‚’追加 +- GROUP BY ALLã®æ¨™æº–SQL構文をサãƒãƒ¼ãƒˆ +- 固定精度ã§ã®å°æ•°æ¼”ç®—ã®ãŸã‚ã®æ–°ã—ã„数学関数を追加 +- 完全ãªå¤‰æ›´ã®ãƒªã‚¹ãƒˆã¯[22.12 リリースブログ](https://clickhouse.com/blog/clickhouse-release-22-12)ã¨[詳細㪠22.12 changelog](/docs/ja/whats-new/changelog/2022.md/#-clickhouse-release-2212-2022-12-15)ã‚’å‚ç…§ + +### コンソールã®å¤‰æ›´ +- SQLコンソールã§ã®è‡ªå‹•è£œå®Œæ©Ÿèƒ½ã‚’改善 +- デフォルトリージョンãŒå¤§é™¸ã®ãƒ­ãƒ¼ã‚«ãƒªãƒ†ã‚£ã‚’考慮ã™ã‚‹ã‚ˆã†ã« +- 課金使用ページを改善ã—ã€èª²é‡‘å˜ä½ã¨ã‚¦ã‚§ãƒ–サイトå˜ä½ã®ä¸¡æ–¹ã‚’表示 + +### çµ±åˆã®å¤‰æ›´ +- DBTリリース[v1.3.2](https://github.com/ClickHouse/dbt-clickhouse/blob/main/CHANGELOG.md#release-132-2022-12-23) + - delete+insertインクリメンタルストラテジーã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã‚µãƒãƒ¼ãƒˆã‚’追加 + - æ–°ã—ã„s3sourceマクロ +- Pythonクライアント[v0.4.8](https://github.com/ClickHouse/clickhouse-connect/blob/main/CHANGELOG.md#048-2023-01-02) + - ファイル挿入サãƒãƒ¼ãƒˆ + - サーãƒãƒ¼ã‚µã‚¤ãƒ‰ã‚¯ã‚¨ãƒª[パラメータãƒã‚¤ãƒ³ãƒ‰](/docs/ja/interfaces/cli.md/#cli-queries-with-parameters) +- Goクライアント[v2.5.0](https://github.com/ClickHouse/clickhouse-go/releases/tag/v2.5.0) + - 圧縮ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡å‰Šæ¸› + - サーãƒãƒ¼ã‚µã‚¤ãƒ‰ã‚¯ã‚¨ãƒª[パラメータãƒã‚¤ãƒ³ãƒ‰](/docs/ja/interfaces/cli.md/#cli-queries-with-parameters) + +### 信頼性ã¨ãƒ‘フォーマンス +- オブジェクトストア上ã§å°ã•ãªãƒ•ã‚¡ã‚¤ãƒ«ã‚’大é‡ã«å–å¾—ã™ã‚‹ã‚¯ã‚¨ãƒªã®ãƒªãƒ¼ãƒ‰ãƒ‘フォーマンスを改善 +- æ–°ã—ãèµ·å‹•ã•ã‚ŒãŸã‚µãƒ¼ãƒ“スã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ClickHouseリリース設定をもã¨ã«ã‚µãƒ¼ãƒ“スを起動ã™ã‚‹ã¨ãã®[互æ›æ€§](/docs/ja/cloud/manage/upgrades.md/#use-the-default-settings-of-a-clickhouse-release)設定を設定 + +### ãƒã‚°ä¿®æ­£ +高度ãªã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚¹ãƒ©ã‚¤ãƒ€ãƒ¼ã‚’使用ã—ã¦ãƒªã‚½ãƒ¼ã‚¹ã‚’予約ã™ã‚‹ã¨ã€ã™ãã«åŠ¹æžœã‚’発æ®ã™ã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã—ãŸã€‚ + +## 2022å¹´12月20æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ç®¡ç†è€…ãŒSQLコンソールã«ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ã«ãƒ­ã‚°ã‚¤ãƒ³ã§ãるよã†ã«ãªã‚Šã€ã‚³ãƒ¼ãƒ«ãƒ‰ãƒªãƒ¼ãƒ‰ã®èª­ã¿å–りパフォーマンスを改善ã—ã€ClickHouse Cloud用ã®Metabaseコãƒã‚¯ã‚¿ã‚’改善ã—ã¾ã™ã€‚ + +### コンソールã®å¤‰æ›´ +- 管ç†è€…ユーザーå‘ã‘ã«SQLコンソールã¸ã®ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ã‚¢ã‚¯ã‚»ã‚¹ã‚’有効㫠+- æ–°ã—ã„招待者ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ­ãƒ¼ãƒ«ã‚’「管ç†è€…ã€ã«å¤‰æ›´ +- オンボーディングサーベイを追加 + +### 信頼性ã¨ãƒ‘フォーマンス +- ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯éšœå®³æ™‚ã«ãƒªã‚«ãƒãƒªã™ã‚‹ãŸã‚ã®é•·æ™‚間実行ã™ã‚‹æŒ¿å…¥ã‚¯ã‚¨ãƒªã®å†è©¦è¡Œãƒ­ã‚¸ãƒƒã‚¯ã‚’追加 +- コールドリードã®ãƒªãƒ¼ãƒ‰ãƒ‘フォーマンスを改善 + +### çµ±åˆã®å¤‰æ›´ +- [Metabaseプラグイン](/docs/ja/integrations/data-visualization/metabase-and-clickhouse.md)ã¯ã€å¾…望ã®v0.9.1メジャーアップデートをå—ã‘ã¾ã—ãŸã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æœ€æ–°ã®Metabaseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨ã®äº’æ›æ€§ãŒã‚ã‚Šã€ClickHouse Cloudã«å¯¾ã—ã¦å¾¹åº•çš„ã«ãƒ†ã‚¹ãƒˆã•ã‚Œã¾ã—ãŸã€‚ + +## 2022å¹´12月6æ—¥ - 一般æä¾› + +ClickHouse CloudãŒSOC2 Type II準拠ã€ç¨¼åƒçŽ‡SLAã€å…¬å…±ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒšãƒ¼ã‚¸ã‚’å‚™ãˆãŸã€ä¸€èˆ¬æ供対応ã¨ãªã‚Šã¾ã—ãŸã€‚ã“ã®ãƒªãƒªãƒ¼ã‚¹ã«ã¯ã€AWS Marketplaceçµ±åˆã€ClickHouseユーザーã®ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿æŽ¢ç´¢ãƒ¯ãƒ¼ã‚¯ãƒ™ãƒ³ãƒã§ã‚ã‚‹SQLコンソールã€ClickHouse Cloudã§ã®è‡ªå·±å­¦ç¿’ã®ãŸã‚ã®ClickHouse Academyã¨ã„ã£ãŸæ–°ãŸãªä¸»è¦æ©Ÿèƒ½ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚詳細ã¯ã“ã®[ブログ](https://clickhouse.com/blog/clickhouse-cloud-generally-available)ã‚’ã”覧ãã ã•ã„。 + +### 生産準備完了 +- SOC2 Type II準拠(詳細ã¯[ブログ](https://clickhouse.com/blog/clickhouse-cloud-is-now-soc-2-type-ii-compliant)ãŠã‚ˆã³[Trust Center](https://trust.clickhouse.com/)ã‚’å‚照) +- ClickHouse Cloudã®å…¬é–‹[ステータスページ](https://status.clickhouse.com/) +- 稼åƒçŽ‡SLAãŒç”Ÿç”£ç”¨é€”ã«åˆ©ç”¨å¯èƒ½ +- [AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-jettukeanwrfc)上ã§ã®åˆ©ç”¨å¯èƒ½ + +### 主è¦ãªæ–°æ©Ÿèƒ½ +- SQLコンソールã®å°Žå…¥ã€ClickHouseユーザーå‘ã‘ã®ãƒ‡ãƒ¼ã‚¿æŽ¢ç´¢ã®ãŸã‚ã®ãƒ¯ãƒ¼ã‚¯ãƒ™ãƒ³ãƒ +- 自己学習ã®ãŸã‚ã®[ClickHouse Academy](https://learn.clickhouse.com/visitor_class_catalog)ã®é–‹å§‹ã€ClickHouse Cloudã§ã®å­¦ç¿’ + +### 価格ã¨ãƒ¡ãƒ¼ã‚¿ãƒªãƒ³ã‚°ã®å¤‰æ›´ +- 試用期間を30日間ã«å»¶é•· +- åˆå¿ƒè€…å‘ã‘プロジェクトã¨é–‹ç™º/ステージング環境ã«é©ã—ãŸå›ºå®šå®¹é‡ã§ä½Žæœˆé¡ã®é–‹ç™ºã‚µãƒ¼ãƒ“スを導入 +- ClickHouse Cloudã®é‹ç”¨ã¨ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚’改善ã™ã‚‹ãŸã‚ã«ç¶™ç¶šã—ã¦ã€æ–°ã—ã„生産サービスã®ä½Žä¾¡æ ¼ã‚’å°Žå…¥ +- コンピュートã®è¨ˆæ¸¬ã«ãŠã‘る粒度ã¨å¿ å®Ÿåº¦ã‚’改善 + +### çµ±åˆã®å¤‰æ›´ +- ClickHouse Postgres / MySQLçµ±åˆã‚¨ãƒ³ã‚¸ãƒ³ã®ã‚µãƒãƒ¼ãƒˆã‚’有効化 +- SQLユーザー定義関数(UDF)ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- Kafka Connectシンクをベータステータスã«æ˜‡æ ¼ +- çµ±åˆUIを改善ã—ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«é–¢ã™ã‚‹ãƒªãƒƒãƒãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã€æ›´æ–°çŠ¶æ³ãªã©ã‚’å°Žå…¥ + +### コンソールã®å¤‰æ›´ +- クラウドコンソールã§ã®å¤šè¦ç´ èªè¨¼ã‚µãƒãƒ¼ãƒˆ +- モãƒã‚¤ãƒ«ãƒ‡ãƒã‚¤ã‚¹å‘ã‘ã«ã‚¯ãƒ©ã‚¦ãƒ‰ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ãƒŠãƒ“ゲーションを改善 + +### ドキュメントã®å¤‰æ›´ +- ClickHouse Cloudã«å°‚用ã®[ドキュメント](https://clickhouse.com/docs/ja/cloud/overview)セクションを導入 + +### ãƒã‚°ä¿®æ­£ +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã®å¾©å…ƒãŒä¾å­˜é–¢ä¿‚ã®è§£æ±ºã«ã‚ˆã‚Šå¸¸ã«å‹•ä½œã—ãªã„ã“ã¨ãŒã‚ã‚‹ã¨ã„ã†æ—¢çŸ¥ã®å•é¡Œã‚’修正 + +## 2022å¹´11月29æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯SOC2 Type II準拠ã€ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’22.11ã«æ›´æ–°ã—ã€å¤šæ•°ã®ClickHouseクライアントã¨çµ±åˆã‚’改善ã—ã¾ã™ã€‚ + +### 一般的ãªå¤‰æ›´ +- SOC2 Type II準拠ã«é”(詳細ã¯[ブログ](https://clickhouse.com/blog/clickhouse-cloud-is-now-soc-2-type-ii-compliant)ãŠã‚ˆã³[Trust Center](https://trust.clickhouse.com)ã‚’å‚照) + +### コンソールã®å¤‰æ›´ +- サービスãŒè‡ªå‹•çš„ã«ä¸€æ™‚åœæ­¢ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’示ã™ã€Œã‚¢ã‚¤ãƒ‰ãƒ«ã€ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ã‚’追加 + +### ClickHouse 22.11 ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚¢ãƒƒãƒ—グレード + +- Hudiã¨DeltaLakeテーブルエンジンã¨ãƒ†ãƒ¼ãƒ–ル関数ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- S3ã®å†å¸°çš„ãªãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãƒˆãƒ©ãƒãƒ¼ã‚µãƒ«ã‚’改善 +- 複åˆæ™‚間間隔構文ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- 挿入時ã®ä¿¡é ¼æ€§ã‚’å‘上ã—ã€æŒ¿å…¥æ™‚ã«å†è©¦è¡Œã‚’行ㆠ+- 完全ãªå¤‰æ›´ã®ãƒªã‚¹ãƒˆã¯[detailed 22.11 changelog](/docs/ja/whats-new/changelog/2022.md/#-clickhouse-release-2211-2022-11-17)ã‚’å‚ç…§ + +### çµ±åˆ +- Pythonクライアント:v3.11ã®ã‚µãƒãƒ¼ãƒˆã€æŒ¿å…¥ãƒ‘フォーマンスを改善 +- Goクライアント:DateTimeãŠã‚ˆã³Int64 ã®ã‚µãƒãƒ¼ãƒˆã‚’修正 +- JSクライアント:相互SSLèªè¨¼ã®ã‚µãƒãƒ¼ãƒˆ +- dbt-clickhouse:DBT v1.3ã®ã‚µãƒãƒ¼ãƒˆ + +### ãƒã‚°ä¿®æ­£ +- アップグレード後ã«å¤ã„ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’表示ã™ã‚‹ãƒã‚°ã‚’修正 +- "default" アカウントã®æ¨©é™ã‚’変更ã—ã¦ã‚‚セッションãŒä¸­æ–­ã•ã‚Œãªããªã‚Šã¾ã—㟠+- æ–°ã—ã作æˆã•ã‚ŒãŸéžç®¡ç†ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æŒãŸãªããªã‚Šã¾ã—㟠+ +### ã“ã®ãƒªãƒªãƒ¼ã‚¹ã®æ—¢çŸ¥ã®å•é¡Œ +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã®å¾©å…ƒãŒä¾å­˜é–¢ä¿‚ã®è§£æ±ºã«ã‚ˆã‚Šå‹•ä½œã—ãªã„å¯èƒ½æ€§ãŒã‚ã‚‹ + +## 2022å¹´11月17æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«ClickHouseテーブルãŠã‚ˆã³HTTPソースã‹ã‚‰ã®Dictionaryを有効化ã—ã€ãƒ ãƒ³ãƒã‚¤ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚µãƒãƒ¼ãƒˆã‚’å°Žå…¥ã—ã€ã‚¯ãƒ©ã‚¦ãƒ‰ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ã‚¯ã‚¹ãƒšãƒªã‚¨ãƒ³ã‚¹ã‚’改善ã—ã¾ã™ã€‚ + +### 一般的ãªå¤‰æ›´ +- ローカルClickHouseテーブルãŠã‚ˆã³HTTPソースã‹ã‚‰ã®[Dictionary](/docs/ja/sql-reference/dictionaries/index.md)ã®ã‚µãƒãƒ¼ãƒˆã‚’追加 +- ムンãƒã‚¤[リージョン](/docs/ja/cloud/reference/supported-regions.md)ã®ã‚µãƒãƒ¼ãƒˆã‚’å°Žå…¥ + +### コンソールã®å¤‰æ›´ +- 請求書ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’改善 +- 支払ã„方法キャプãƒãƒ£ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’åˆç†åŒ– +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚ˆã‚Šç´°ã‹ã„アクティビティログを追加 +- ファイルアップロード中ã®ã‚¨ãƒ©ãƒ¼ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°ã‚’改善 + +### ãƒã‚°ä¿®æ­£ +- 一部パーツ内ã«å˜ä¸€ã®å¤§ããªãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã™ã‚‹å ´åˆã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå¤±æ•—ã™ã‚‹ãƒã‚°ã‚’修正 +- アクセスリストã®å¤‰æ›´ãŒåŒæ™‚ã«é©ç”¨ã•ã‚ŒãŸå ´åˆã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã®å¾©å…ƒãŒæˆåŠŸã—ãªã„ãƒã‚°ã‚’修正 + +### 既知ã®å•é¡Œ +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã®å¾©å…ƒãŒä¾å­˜é–¢ä¿‚ã®è§£æ±ºã«ã‚ˆã‚Šå‹•ä½œã—ãªã„å¯èƒ½æ€§ãŒã‚ã‚‹ + +## 2022å¹´11月3æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€æ–™é‡‘ã‹ã‚‰èª­ã¿å–り・書ãè¾¼ã¿å˜ä½ã‚’削除ã—(詳細ã¯[料金ページ](https://clickhouse.com/pricing)ã‚’å‚照)ã€ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’22.10ã«æ›´æ–°ã—ã€ã‚»ãƒ«ãƒ•ã‚µãƒ¼ãƒ“スã®ãŠå®¢æ§˜å‘ã‘ã«ã‚ˆã‚Šé«˜ã„垂直スケーリングをサãƒãƒ¼ãƒˆã—ã€ã‚ˆã‚Šè‰¯ã„デフォルトを通ã˜ã¦ä¿¡é ¼æ€§ã‚’å‘上ã•ã›ã¾ã™ã€‚ + +### 一般的ãªå¤‰æ›´ +- 読ã¿å–ã‚Š/書ãè¾¼ã¿å˜ä½ã‚’料金モデルã‹ã‚‰å‰Šé™¤ + +### 設定ã®å¤‰æ›´ +- `allow_suspicious_low_cardinality_types`ã€`allow_suspicious_fixed_string_types`ã€ãŠã‚ˆã³`allow_suspicious_codecs`(デフォルトã¯false)ã®è¨­å®šã¯ã€å®‰å®šæ€§ã®ãŸã‚ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å¤‰æ›´ã§ããªããªã‚Šã¾ã—ãŸã€‚ + +### コンソールã®å¤‰æ›´ +- 有料顧客ã®ãŸã‚ã«åž‚直スケーリングã®ã‚»ãƒ«ãƒ•ã‚µãƒ¼ãƒ“ス最大を720GBã®ãƒ¡ãƒ¢ãƒªã«å¼•ã上㒠+- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã®å¾©å…ƒãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã‚’改善ã—ã€IPアクセスリストルールã¨ãƒ‘スワードを設定 +- サービス作æˆãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã«GCPã¨Azureã®ã‚¦ã‚§ã‚¤ãƒˆãƒªã‚¹ãƒˆã‚’å°Žå…¥ +- ファイルアップロード中ã®ã‚¨ãƒ©ãƒ¼ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°ã‚’改善 +- 課金管ç†ã®ãŸã‚ã®ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã‚’改善 + +### ClickHouse 22.10 ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚¢ãƒƒãƒ—グレード +- 多ãã®å¤§ããªãƒ‘ーツ(少ãªãã¨ã‚‚10 GiB)ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€"多ã™ãŽã‚‹ãƒ‘ーツ"ã®ã—ãã„値を緩和ã™ã‚‹ã“ã¨ã§ã€ã‚ªãƒ–ジェクトストア上ã§ã®çµåˆã‚’改善。ã“ã‚Œã«ã‚ˆã‚Šã€å˜ä¸€ãƒ†ãƒ¼ãƒ–ルã®å˜ä¸€ãƒ‘ーティションã§æœ€å¤§ãƒšã‚¿ãƒã‚¤ãƒˆã®ãƒ‡ãƒ¼ã‚¿ã‚’有効ã«ã€‚ +- 一定ã®æ™‚é–“ã—ãã„値を超ãˆãŸå¾Œã«ãƒžãƒ¼ã‚¸ã™ã‚‹ãŸã‚ã®`min_age_to_force_merge_seconds`設定を改善。 +- 設定をリセットã™ã‚‹ãŸã‚ã®MySQL互æ›ã®æ§‹æ–‡ã‚’追加`SET setting_name = DEFAULT`。 +- Morton曲線エンコーディングã€Javaæ•´æ•°ãƒãƒƒã‚·ãƒ¥ã€ãŠã‚ˆã³ãƒ©ãƒ³ãƒ€ãƒ æ•°ç”Ÿæˆã®ãŸã‚ã®é–¢æ•°ã‚’追加。 +- 完全ãªå¤‰æ›´ã®ãƒªã‚¹ãƒˆã¯[detailed 22.10 changelog](/docs/ja/whats-new/changelog/2022.md/#-clickhouse-release-2210-2022-10-25)ã‚’å‚ç…§ãã ã•ã„。 + +## 2022å¹´10月25æ—¥ + +ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯ã€å°è¦æ¨¡ãªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®è¨ˆç®—消費を大幅ã«å‰Šæ¸›ã—ã€è¨ˆç®—料金を引ã下ã’(詳細ã¯[料金ページ](https://clickhouse.com/pricing)ã‚’å‚照)ã€ã‚ˆã‚Šè‰¯ã„デフォルトを通ã˜ã¦å®‰å®šæ€§ã‚’å‘上ã•ã›ã€ClickHouse Cloudコンソールã®èª²é‡‘ã¨ä½¿ç”¨ãƒ“ューを強化ã—ã¾ã™ã€‚ + +### 一般的ãªå¤‰æ›´ +- 最å°ã‚µãƒ¼ãƒ“スメモリアロケーションを24Gã«å‰Šæ¸› +- サービスアイドルタイムアウトを30分ã‹ã‚‰5分ã«çŸ­ç¸® + +### 設定ã®å¤‰æ›´ +- max_parts_in_totalã‚’100kã‹ã‚‰10kã«å‰Šæ¸›ã€‚MergeTreeテーブルã®`max_parts_in_total`設定ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯100,000ã‹ã‚‰10,000ã«ä¸‹ã’られã¾ã—ãŸã€‚ã“ã®å¤‰æ›´ã®ç†ç”±ã¯ã€ã‚¯ãƒ©ã‚¦ãƒ‰ã§ã®ã‚µãƒ¼ãƒ“ス起動時間ãŒé…ããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚データパーツã®å¤šã•ã¯ã€å¤šãã®å ´åˆã€éžå¸¸ã«ç²’度ã®ç´°ã‹ã„パーティションキーã®é¸æŠžã‚’示ã—ã¦ãŠã‚Šã€ã“ã‚Œã¯é€šå¸¸èª¤ã£ã¦è¡Œã‚ã‚Œã€é¿ã‘ã‚‹ã¹ãã§ã™ã€‚ã“ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å¤‰æ›´ã¯ã€ã“れらã®ã‚±ãƒ¼ã‚¹ã‚’より早ã検出ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +### コンソールã®å¤‰æ›´ +- トライアルユーザーå‘ã‘ã®èª²é‡‘ビューã§ã®ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆä½¿ç”¨ã®è©³ç´°ã‚’強化 +- ツールãƒãƒƒãƒ—ã¨ãƒ˜ãƒ«ãƒ—テキストを改善ã—ã€ä½¿ç”¨ãƒ“ューã«æ–™é‡‘ページã¸ã®ãƒªãƒ³ã‚¯ã‚’追加 +- IPフィルタリングã®ã‚ªãƒ—ションを切り替ãˆã‚‹éš›ã®ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã‚’改善 +- クラウドコンソールã«å†é€ãƒ¡ãƒ¼ãƒ«ç¢ºèªãƒœã‚¿ãƒ³ã‚’追加 + +## 2022å¹´10月4æ—¥ - Beta + +ClickHouse Cloudã¯2022å¹´10月4æ—¥ã«ãƒ‘ブリックベータを開始ã—ã¾ã—ãŸã€‚詳細ã¯ã“ã®[ブログ](https://clickhouse.com/blog/clickhouse-cloud-public-beta)ã‚’ã”覧ãã ã•ã„。 + +ClickHouse Cloudãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ClickHouseコアv22.10ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚互æ›æ€§ã®ã‚る機能ã®ãƒªã‚¹ãƒˆã¯[Cloud Compatibility](/docs/ja/cloud/reference/cloud-compatibility.md)ガイドをå‚ç…§ãã ã•ã„。 diff --git a/docs/ja/cloud/reference/cloud-compatibility.md b/docs/ja/cloud/reference/cloud-compatibility.md new file mode 100644 index 00000000000..c7dd9af37c6 --- /dev/null +++ b/docs/ja/cloud/reference/cloud-compatibility.md @@ -0,0 +1,136 @@ +--- +slug: /ja/whats-new/cloud-compatibility +sidebar_label: Cloud Compatibility +title: クラウド互æ›æ€§ +--- + +# ClickHouse Cloud — 互æ›æ€§ã‚¬ã‚¤ãƒ‰ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€ClickHouse Cloudã«ãŠã‘る機能的ãŠã‚ˆã³æ“作上ã®æœŸå¾…を概観ã—ã¾ã™ã€‚ClickHouse Cloudã¯ã‚ªãƒ¼ãƒ—ンソースã®ClickHouseディストリビューションã«åŸºã¥ã„ã¦ã„ã¾ã™ãŒã€ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã‚„実装ã«ã„ãã¤ã‹ã®é•ã„ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。[ClickHouse Cloudã‚’ã©ã®ã‚ˆã†ã«æ§‹ç¯‰ã—ãŸã‹](https://clickhouse.com/blog/building-clickhouse-cloud-from-scratch-in-a-year)ã«ã¤ã„ã¦ã®ãƒ–ログも背景ã¨ã—ã¦èˆˆå‘³æ·±ã„ã§ã—ょã†ã€‚ + +## ClickHouse Cloud アーキテクãƒãƒ£ +ClickHouse Cloudã¯ã€é‹ç”¨ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’大幅ã«ç°¡ç´ åŒ–ã—ã€å¤§è¦æ¨¡ã«ClickHouseã‚’é‹ç”¨ã™ã‚‹ã‚³ã‚¹ãƒˆã‚’削減ã—ã¾ã™ã€‚デプロイメントã®ã‚µã‚¤ã‚ºã‚’事å‰ã«è¨­å®šã—ãŸã‚Šã€é«˜å¯ç”¨æ€§ã®ãŸã‚ã«ãƒ¬ãƒ—リケーションを設定ã—ãŸã‚Šã€æ‰‹å‹•ã§ãƒ‡ãƒ¼ã‚¿ã‚’シャードã—ãŸã‚Šã€ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ãŒå¢—ãˆãŸã¨ãã«ã‚µãƒ¼ãƒãƒ¼ã‚’スケールアップã—ãŸã‚Šã€ä½¿ç”¨ã—ã¦ã„ãªã„ã¨ãã«ã‚¹ã‚±ãƒ¼ãƒ«ãƒ€ã‚¦ãƒ³ã—ãŸã‚Šã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。ã“れらã¯ã™ã¹ã¦ã€ç§ãŸã¡ãŒå‡¦ç†ã—ã¾ã™ã€‚ + +ã“れらã®åˆ©ç‚¹ã¯ã€ClickHouse Cloudã®åŸºç›¤ã¨ãªã‚‹ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã®é¸æŠžã«ã‚ˆã‚‹ã‚‚ã®ã§ã™ï¼š +- コンピュートã¨ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒåˆ†é›¢ã•ã‚Œã¦ãŠã‚Šã€ç•°ãªã‚‹æ¬¡å…ƒã§è‡ªå‹•çš„ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã§ãã‚‹ãŸã‚ã€é™çš„ãªã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹æ§‹æˆã§ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚„コンピュートをéŽå‰°ã«ãƒ—ロビジョンã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 +- オブジェクトストアã®ä¸Šã«ã‚る階層型ストレージã¨å¤šå±¤ã‚­ãƒ£ãƒƒã‚·ãƒ³ã‚°ã¯ã€äº‹å®Ÿä¸Šç„¡åˆ¶é™ã®ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã¨è‰¯å¥½ãªä¾¡æ ¼/性能比をæä¾›ã—ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ‘ーティションを事å‰ã«è¨­å®šã™ã‚‹å¿…è¦ã‚„高ã„ストレージコストã«ã¤ã„ã¦å¿ƒé…ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 +- 高å¯ç”¨æ€§ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚ªãƒ³ã«ãªã£ã¦ãŠã‚Šã€ãƒ¬ãƒ—リケーションã¯é€éŽçš„ã«ç®¡ç†ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€ã‚¢ãƒ—リケーションã®æ§‹ç¯‰ã‚„データã®åˆ†æžã«é›†ä¸­ã§ãã¾ã™ã€‚ +- 変動ã™ã‚‹ç¶™ç¶šçš„ãªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®ãŸã‚ã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚ªãƒ³ã«ãªã£ã¦ãŠã‚Šã€ã‚µãƒ¼ãƒ“スã®ã‚µã‚¤ã‚ºã‚’事å‰ã«è¨­å®šã—ãŸã‚Šã€ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ãŒå¢—ãˆãŸã¨ãã«ã‚µãƒ¼ãƒãƒ¼ã‚’スケールアップã—ãŸã‚Šã€ã‚¢ã‚¯ãƒ†ã‚£ãƒ“ティãŒæ¸›å°‘ã—ãŸã¨ãã«æ‰‹å‹•ã§ã‚µãƒ¼ãƒãƒ¼ã‚’スケールダウンã—ãŸã‚Šã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 +- 断続的ãªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®ãŸã‚ã®ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ãªãƒã‚¤ãƒãƒãƒ¼ã‚·ãƒ§ãƒ³ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚ªãƒ³ã«ãªã£ã¦ãŠã‚Šã€æ–°ã—ã„クエリãŒåˆ°ç€ã—ãŸã¨ãã«è¨ˆç®—リソースを自動的ã«ä¸€æ™‚åœæ­¢ã—ã€é€éŽçš„ã«å†é–‹ã™ã‚‹ãŸã‚ã€ã‚¢ã‚¤ãƒ‰ãƒ«ãƒªã‚½ãƒ¼ã‚¹ã®æ”¯æ‰•ã„ã‚’ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 +- 高度ãªã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°åˆ¶å¾¡ã‚’使用ã—ã¦ã€ã‚³ã‚¹ãƒˆåˆ¶å¾¡ã®ãŸã‚ã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°æœ€å¤§å€¤ã‚’設定ã—ãŸã‚Šã€å°‚門的ãªæ€§èƒ½è¦ä»¶ã‚’æŒã¤ã‚¢ãƒ—リケーションã®ãŸã‚ã«ã‚³ãƒ³ãƒ”ュートリソースを予約ã™ã‚‹ãŸã‚ã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°æœ€å°å€¤ã‚’設定ã§ãã¾ã™ã€‚ + +## 機能 +ClickHouse Cloudã¯ã€ã‚ªãƒ¼ãƒ—ンソースディストリビューションã®ClickHouseã®åŽ³é¸ã•ã‚ŒãŸæ©Ÿèƒ½ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚以下ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ç¾æ™‚点ã§ClickHouse Cloudã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã‚‹ã„ãã¤ã‹ã®æ©Ÿèƒ½ã‚’説明ã—ã¦ã„ã¾ã™ã€‚ + +### DDL構文 +ClickHouse Cloudã®DDL構文ã¯ã€å¤§éƒ¨åˆ†ãŒã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§åˆ©ç”¨å¯èƒ½ãªã‚‚ã®ã¨ä¸€è‡´ã™ã‚‹ã¯ãšã§ã™ã€‚一部ã®é¡•è‘—ãªä¾‹å¤–: + - ç¾åœ¨åˆ©ç”¨ã§ããªã„`CREATE AS SELECT`ã®ã‚µãƒãƒ¼ãƒˆã€‚代替策ã¨ã—ã¦ã€`CREATE ... EMPTY ... AS SELECT`を使用ã—ã€ãã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ï¼ˆä¾‹ã«ã¤ã„ã¦ã¯[ã“ã®ãƒ–ログ](https://clickhouse.com/blog/getting-data-into-clickhouse-part-1)ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + - 一部ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ§‹æ–‡ã¯ç„¡åŠ¹ã«ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€ãŸã¨ãˆã°`ALTER TABLE … MODIFY QUERY`æ–‡ã§ã™ã€‚ + - セキュリティ上ã®ç†ç”±ã‹ã‚‰ä¸€éƒ¨ã®ã‚¤ãƒ³ãƒˆãƒ­ã‚¹ãƒšã‚¯ã‚·ãƒ§ãƒ³æ©Ÿèƒ½ãŒç„¡åŠ¹ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã€ãŸã¨ãˆã°`addressToLine` SQL関数ãªã©ã§ã™ã€‚ + - ClickHouse Cloudã§`ON CLUSTER`パラメータを使用ã—ãªã„ã§ãã ã•ã„。ã“れらã¯åŸºæœ¬çš„ã«ç„¡åŠ¹ãªé–¢æ•°ã§ã™ãŒã€[マクロ](https://clickhouse.com/docs/ja/operations/server-configuration-parameters/settings#macros)を使用ã—よã†ã¨ã™ã‚‹ã¨ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚マクロã¯ClickHouse Cloudã§ã¯é€šå¸¸æ©Ÿèƒ½ã—ãªã„ã—ã€å¿…è¦ã§ã‚‚ã‚ã‚Šã¾ã›ã‚“。 + +### データベースãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルエンジン + +ClickHouse Cloudã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§é«˜å¯ç”¨æ€§ã®ãƒ¬ãƒ—リケートã•ã‚ŒãŸã‚µãƒ¼ãƒ“スをæä¾›ã—ã¾ã™ã€‚ãã®çµæžœã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルエンジンã¯ã€ŒReplicatedã€ã¨ãªã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€`ReplicatedMergeTree`ã¨`MergeTree`ã¯ClickHouse Cloudã§ä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€åŒä¸€ã§ã™ã€‚ + +**サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るテーブルエンジン** + + - ReplicatedMergeTree (指定ãŒãªã„å ´åˆã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ) + - ReplicatedSummingMergeTree + - ReplicatedAggregatingMergeTree + - ReplicatedReplacingMergeTree + - ReplicatedCollapsingMergeTree + - ReplicatedVersionedCollapsingMergeTree + - MergeTree (ReplicatedMergeTreeã«å¤‰æ›) + - SummingMergeTree (ReplicatedSummingMergeTreeã«å¤‰æ›) + - AggregatingMergeTree (ReplicatedAggregatingMergeTreeã«å¤‰æ›) + - ReplacingMergeTree (ReplicatedReplacingMergeTreeã«å¤‰æ›) + - CollapsingMergeTree (ReplicatedCollapsingMergeTreeã«å¤‰æ›) + - VersionedCollapsingMergeTree (ReplicatedVersionedCollapsingMergeTreeã«å¤‰æ›) + - URL + - View + - MaterializedView + - GenerateRandom + - Null + - Buffer + - Memory + - Deltalake + - Hudi + - MySQL + - MongoDB + - NATS + - RabbitMQ + - PostgreSQL + - S3 + +### インターフェース +ClickHouse Cloudã¯HTTPSã€ãƒã‚¤ãƒ†ã‚£ãƒ–インターフェースã€ãŠã‚ˆã³[MySQLワイヤプロトコル](/docs/ja/interfaces/mysql)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚Postgresã®ã‚ˆã†ãªä»–ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã®ã‚µãƒãƒ¼ãƒˆã¯è¿‘日中ã«äºˆå®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### Dictionary +Dictionaryã¯ã€ClickHouseã§ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—を高速化ã™ã‚‹ãŸã‚ã®ä¸€èˆ¬çš„ãªæ–¹æ³•ã§ã™ã€‚ClickHouse Cloudã¯ç¾åœ¨ã€PostgreSQLã€MySQLã€ãƒªãƒ¢ãƒ¼ãƒˆãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒ«ClickHouseサーãƒãƒ¼ã€Redisã€MongoDBã€ãŠã‚ˆã³HTTPソースã‹ã‚‰ã®Dictionaryをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### 分散クエリ +クラウド内ã§ã®ã‚¯ãƒ­ã‚¹ã‚¯ãƒ©ã‚¹ã‚¿é€šä¿¡ã¨å¤–部セルフマãƒãƒ¼ã‚¸ãƒ‰ClickHouseクラスタã¨ã®é€šä¿¡ã®ãŸã‚ã«ã€åˆ†æ•£ClickHouseクエリをサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ClickHouse Cloudã¯ç¾åœ¨ã€ä»¥ä¸‹ã®çµ±åˆã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã—ã¦åˆ†æ•£ã‚¯ã‚¨ãƒªã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + - Deltalake + - Hudi + - MySQL + - MongoDB + - NATS + - RabbitMQ + - PostgreSQL + - S3 + +SQLiteã€ODBCã€JDBCã€Redisã€HDFSã€Hiveã®ã‚ˆã†ãªä¸€éƒ¨ã®å¤–部データベースãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルエンジンã¨ã®åˆ†æ•£ã‚¯ã‚¨ãƒªã¯ã¾ã ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +### ユーザー定義関数 + +ユーザー定義関数ã¯ã€ClickHouseã®æœ€è¿‘ã®æ©Ÿèƒ½ã§ã™ã€‚ClickHouse Cloudã¯ç¾åœ¨ã€SQL UDFã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### エクスペリメンタル機能 + +エクスペリメンタル機能ã¯ã€ã‚µãƒ¼ãƒ“スデプロイメントã®å®‰å®šæ€§ã‚’確ä¿ã™ã‚‹ãŸã‚ã«ClickHouse Cloudサービスã§ç„¡åŠ¹åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### Kafka + +[Kafka テーブルエンジン](/docs/ja/integrations/data-ingestion/kafka/index.md)ã¯ã€ClickHouse Cloudã§ä¸€èˆ¬ã«åˆ©ç”¨å¯èƒ½ã§ã¯ã‚ã‚Šã¾ã›ã‚“。代ã‚ã‚Šã«ã€Kafka接続コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’ClickHouseサービスã‹ã‚‰åˆ†é›¢ã™ã‚‹ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã‚’利用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚Kafkaストリームã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’プルã™ã‚‹ãŸã‚ã«ã¯ã€[ClickPipes](https://clickhouse.com/cloud/clickpipes)ã‚’ãŠå‹§ã‚ã„ãŸã—ã¾ã™ã€‚ã‚ã‚‹ã„ã¯ã€ãƒ—ッシュベースã®ä»£æ›¿æ¡ˆã¨ã—ã¦ã€[Kafkaユーザーガイド](/docs/ja/integrations/data-ingestion/kafka/index.md)ã«ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„るオプションを検討ã—ã¦ãã ã•ã„。 + +### Named collections + +[Named collections](/ja/operations/named-collections)ã¯ç¾åœ¨ã€ClickHouse Cloudã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +## é‹ç”¨ä¸Šã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨è€ƒæ…®äº‹é … +以下ã¯ClickHouse Cloudサービスã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šã§ã™ã€‚一部ã®è¨­å®šã¯ã‚µãƒ¼ãƒ“スã®é©åˆ‡ãªé‹ç”¨ã‚’確ä¿ã™ã‚‹ãŸã‚ã«å›ºå®šã•ã‚Œã¦ãŠã‚Šã€ä»–ã®è¨­å®šã¯èª¿æ•´å¯èƒ½ã§ã™ã€‚ + +### é‹ç”¨ã®åˆ¶é™ + +#### `max_parts_in_total: 10,000` +MergeTreeテーブルã®`max_parts_in_total`設定ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ã€100,000ã‹ã‚‰10,000ã«å¼•ã下ã’られã¾ã—ãŸã€‚ã“ã®å¤‰æ›´ã®ç†ç”±ã¯ã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツãŒã‚¯ãƒ©ã‚¦ãƒ‰ã§ã®ã‚µãƒ¼ãƒ“スã®èµ·å‹•æ™‚é–“ã‚’é…らã›ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ãŒã‚ã‹ã£ãŸãŸã‚ã§ã™ã€‚多数ã®ãƒ‘ーツã¯ã€é€šå¸¸ã¯ãƒ‘ーティションキーã®é¸å®šãŒç´°ã‹ã™ãŽã‚‹ã“ã¨ã‚’示ã—ã€ã“ã‚Œã¯é€šå¸¸èª¤ã£ã¦è¡Œã‚れるãŸã‚é¿ã‘ã‚‹ã¹ãã§ã™ã€‚ã“ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å¤‰æ›´ã«ã‚ˆã‚Šã€ã“れらã®ã‚±ãƒ¼ã‚¹ãŒæ—©æœŸã«æ¤œå‡ºã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +#### `max_concurrent_queries: 1,000` +ã“ã®ã‚µãƒ¼ãƒãƒ¼å˜ä½ã®è¨­å®šã‚’デフォルトã®100ã‹ã‚‰1000ã«å¢—加ã•ã›ã€ã‚ˆã‚Šå¤šãã®åŒæ™‚性を許å¯ã—ã¾ã—ãŸã€‚ã“ã‚Œã«ã‚ˆã‚Šã€é–‹ç™ºã‚µãƒ¼ãƒ“スã§ã¯2,000ã®åŒæ™‚クエリã€ãƒ—ロダクションã§ã¯3,000ã®åŒæ™‚クエリãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +#### `max_table_size_to_drop: 1,000,000,000,000` +ã“ã®è¨­å®šã‚’50GBã‹ã‚‰1TBã¾ã§ãƒ†ãƒ¼ãƒ–ル/パーティションã®å‰Šé™¤ã‚’許å¯ã™ã‚‹ãŸã‚ã«å¢—加ã—ã¾ã—ãŸã€‚ + +### システム設定 +ClickHouse Cloudã¯å¯å¤‰ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«æœ€é©åŒ–ã•ã‚Œã¦ãŠã‚Šã€ãã®ãŸã‚大多数ã®ã‚·ã‚¹ãƒ†ãƒ è¨­å®šã¯ç¾æ™‚点ã§æ§‹æˆå¯èƒ½ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã»ã¨ã‚“ã©ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¨ã£ã¦ã‚·ã‚¹ãƒ†ãƒ è¨­å®šã®èª¿æ•´ã¯ä¸è¦ã¨è€ƒãˆã¦ã„ã¾ã™ãŒã€é«˜åº¦ãªã‚·ã‚¹ãƒ†ãƒ èª¿æ•´ã«é–¢ã™ã‚‹è³ªå•ãŒã‚ã‚‹å ´åˆã¯ã€ClickHouse Cloudサãƒãƒ¼ãƒˆã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 + +### 高度ãªã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ç®¡ç† +ClickHouseサービスã®ä½œæˆã®ä¸€ç’°ã¨ã—ã¦ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŠã‚ˆã³ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«åºƒç¯„ãªæ¨©é™ã‚’æŒã¤ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã®æœ€åˆã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã—ã€ãã®æ¨©é™ã‚’ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れを超ãˆã¦ã€Kerberosã€LDAPã€ã¾ãŸã¯SSL X.509証明書èªè¨¼ã‚’用ã„ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ä»¥ä¸‹ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹æ©Ÿèƒ½ã¯ç¾æ™‚点ã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +## ロードマップ +以下ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ä¸Šè¨˜ã§èª¬æ˜Žã—ãŸã„ãã¤ã‹ã®æ©Ÿèƒ½ã‚’æ‹¡å¼µã™ã‚‹ãŸã‚ã®å–り組ã¿ã‚’è¦ç´„ã—ã¦ã„ã¾ã™ã€‚フィードãƒãƒƒã‚¯ãŒã‚ã‚‹å ´åˆã¯ã€[ã“ã¡ã‚‰ã«æ出](mailto:feedback@clickhouse.com)ã—ã¦ãã ã•ã„。 + +| 機能 | çŠ¶æ³ | +|---------------------------------------------------------------------------------------------|:----------------------------------------| +|Dictionaryサãƒãƒ¼ãƒˆï¼šPostgreSQLã€MySQLã€ãƒªãƒ¢ãƒ¼ãƒˆãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒ«ClickHouseサーãƒãƒ¼ã€Redisã€MongoDBã€ãŠã‚ˆã³HTTPソース | **GAã§è¿½åŠ æ¸ˆã¿** | +|SQLユーザー定義関数(UDF) | **GAã§è¿½åŠ æ¸ˆã¿** | +|MySQLãŠã‚ˆã³PostgreSQLエンジン | **GAã§è¿½åŠ æ¸ˆã¿** | +|MySQLインターフェース | **GAã§è¿½åŠ æ¸ˆã¿** | +|Postgresインターフェース | 近日公開 | +|SQLiteã€ODBCã€Redisã€HDFSã€Hiveå‘ã‘エンジン | 近日公開 | +|Protobufã€Cap'n'Protoフォーマット | 近日公開 | +|Kafkaテーブルエンジン | 推奨ã•ã‚Œã¾ã›ã‚“; ※上記ã®ä»£æ›¿æ¡ˆã‚’å‚ç…§ | +|JDBCテーブルエンジン | 推奨ã•ã‚Œã¾ã›ã‚“ | +|EmbeddedRocksDBエンジン | 需è¦ã‚’評価中 | +|実行å¯èƒ½ãªãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•° | 需è¦ã‚’評価中 | diff --git a/docs/ja/cloud/reference/compute-compute-separation.md b/docs/ja/cloud/reference/compute-compute-separation.md new file mode 100644 index 00000000000..87c2dd38cfc --- /dev/null +++ b/docs/ja/cloud/reference/compute-compute-separation.md @@ -0,0 +1,190 @@ +--- +title: ウェアãƒã‚¦ã‚¹ã€ã¾ãŸã¯ã‚³ãƒ³ãƒ”ュート・コンピュート分離 +slug: /ja/cloud/reference/compute-compute-separation +keywords: [コンピュート分離, クラウド, アーキテクãƒãƒ£, コンピュート・コンピュート, ウェアãƒã‚¦ã‚¹, ウェアãƒã‚¦ã‚¹] +description: ClickHouse Cloud ã§ã®è¤‡æ•°ã®ã€åˆ†é›¢ã•ã‚ŒãŸãƒŽãƒ¼ãƒ‰ã‚°ãƒ«ãƒ¼ãƒ—ã®ä½¿ç”¨æ–¹æ³• + +--- + +# ウェアãƒã‚¦ã‚¹ã€ã¾ãŸã¯ã‚³ãƒ³ãƒ”ュート・コンピュート分離(プライベートプレビュー) + +## コンピュート・コンピュート分離ã¨ã¯? + +å„ClickHouse Cloudサービスã«ã¯ä»¥ä¸‹ãŒå«ã¾ã‚Œã¾ã™ï¼š +- ClickHouseノード(ã¾ãŸã¯ãƒ¬ãƒ—リカ)ã®ã‚°ãƒ«ãƒ¼ãƒ— - **開発**ティアサービスã«ã¯2ノードã€**本番**ティアサービスã«ã¯3ノード +- サービスã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆï¼ˆã¾ãŸã¯ClickHouse Cloud UIコンソールã§ä½œæˆã•ã‚ŒãŸè¤‡æ•°ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆï¼‰ã€ã“ã‚Œã¯ã‚µãƒ¼ãƒ“スURLã§ã™ï¼ˆä¾‹ï¼š`https://dv2fzne24g.us-east-1.aws.clickhouse.cloud:8443`) +- サービスãŒã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã¨ä¸€éƒ¨ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ã‚ªãƒ–ジェクトストレージフォルダー: + +
+ +NEEDS ALT + +
+ +_Fig. 1 - ç¾åœ¨ã®ClickHouse Cloudサービス_ + +コンピュート・コンピュート分離ã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è¤‡æ•°ã®ã‚³ãƒ³ãƒ”ュートノードグループを作æˆã§ãã¾ã™ã€‚ã“れらã¯ãã‚Œãžã‚Œç‹¬è‡ªã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’æŒã¡ã€åŒã˜ã‚ªãƒ–ジェクトストレージフォルダーを使用ã™ã‚‹ãŸã‚ã€åŒã˜ãƒ†ãƒ¼ãƒ–ルã€ãƒ“ューãªã©ã‚’æŒã¤ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +å„コンピュートノードグループã¯ç‹¬è‡ªã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’æŒã¤ãŸã‚ã€ã©ã®ãƒ¬ãƒ—リカセットをワークロードã«ä½¿ç”¨ã™ã‚‹ã‹é¸æŠžã§ãã¾ã™ã€‚ã‚るワークロードã¯å°åž‹ã®ãƒ¬ãƒ—リカ1ã¤ã§æº€è¶³ã§ãã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ã—ã€ä»–ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¯é«˜å¯ç”¨æ€§ï¼ˆHA)ã¨ä½•ç™¾ã‚®ã‚¬ã®ãƒ¡ãƒ¢ãƒªã‚’å¿…è¦ã¨ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。コンピュート・コンピュート分離ã«ã‚ˆã‚Šã€èª­ã¿å–ã‚Šæ“作を書ãè¾¼ã¿æ“作ã‹ã‚‰åˆ†é›¢ã—ã€ç›¸äº’ã«å¹²æ¸‰ã—ãªã„よã†ã«ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +
+ +NEEDS ALT + +
+ +_Fig. 2 - ClickHouse Cloudã®ã‚³ãƒ³ãƒ”ュート_ + +ã“ã®ãƒ—ライベートプレビュープログラムã§ã¯ã€æ—¢å­˜ã®ã‚µãƒ¼ãƒ“スã®ãƒ‡ãƒ¼ã‚¿ã‚’共有ã™ã‚‹æ–°ã—ã„サービスを作æˆã—ãŸã‚Šã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’共有ã™ã‚‹è¤‡æ•°ã®ã‚µãƒ¼ãƒ“スをæŒã¤å®Œå…¨ã«æ–°ã—ã„セットアップを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## ウェアãƒã‚¦ã‚¹ã¨ã¯ä½•ã§ã™ã‹? + +ClickHouse Cloudã§ã®_ウェアãƒã‚¦ã‚¹_ã¯ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’共有ã™ã‚‹ã‚µãƒ¼ãƒ“スã®ã‚»ãƒƒãƒˆã§ã™ã€‚ +å„ウェアãƒã‚¦ã‚¹ã«ã¯ä¸»è¦ãªã‚µãƒ¼ãƒ“ス(最åˆã«ä½œæˆã•ã‚ŒãŸã‚µãƒ¼ãƒ“ス)ã¨å‰¯ã‚µãƒ¼ãƒ“スãŒã‚ã‚Šã¾ã™ã€‚以下ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã§ã¯ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’共有ã™ã‚‹ã€ŒDWH Prodã€ã¨ã„ã†ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹ã¨2ã¤ã®ã‚µãƒ¼ãƒ“スãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ãŒåˆ†ã‹ã‚Šã¾ã™ï¼š +- 主è¦ã‚µãƒ¼ãƒ“ス「DWH Prod〠+- 副サービス「DWH Prod Subservice〠+ +
+ +NEEDS ALT + +
+ +_Fig. 3 - ウェアãƒã‚¦ã‚¹ã®ä¾‹_ + +ウェアãƒã‚¦ã‚¹å†…ã®ã™ã¹ã¦ã®ã‚µãƒ¼ãƒ“スã¯åŒã˜ã‚‚ã®ã‚’共有ã—ã¾ã™ï¼š + +- 地域(例:us-east1) +- クラウドサービスプロãƒã‚¤ãƒ€ãƒ¼ï¼ˆAWS, GCPã¾ãŸã¯Azure) +- ClickHouseデータベースã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ + +サービスã¯æ‰€å±žã™ã‚‹ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹ã”ã¨ã«ã‚½ãƒ¼ãƒˆã§ãã¾ã™ã€‚ + +## アクセス制御 + +### データベース資格情報 + +ウェアãƒã‚¦ã‚¹å†…ã®ã™ã¹ã¦ãŒåŒã˜ãƒ†ãƒ¼ãƒ–ルセットを共有ã—ã¦ã„ã‚‹ãŸã‚ã€ä»–ã®ã‚µãƒ¼ãƒ“スã¸ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã‚‚共有ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚µãƒ¼ãƒ“ス1ã§ä½œæˆã•ã‚ŒãŸã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã€åŒã˜æ¨©é™ï¼ˆãƒ†ãƒ¼ãƒ–ルã€ãƒ“ューã¸ã®ä»˜ä¸Žãªã©ï¼‰ã‚’æŒã£ã¦ã‚µãƒ¼ãƒ“ス2も使用ã§ãã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ユーザーã¯å„サービスã®åˆ¥ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’使用ã—ã¾ã™ãŒã€åŒã˜ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードを使用ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€_ユーザーã¯åŒã˜ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’使ã£ã¦ä½œæ¥­ã™ã‚‹ã‚µãƒ¼ãƒ“ス間ã§å…±æœ‰ã•ã‚Œã¾ã™ï¼š_ + +
+ +NEEDS ALT + +
+ +_Fig. 4 - ユーザーAliceã¯ã‚µãƒ¼ãƒ“ス1ã§ä½œæˆã•ã‚Œã¾ã—ãŸãŒã€åŒã˜è³‡æ ¼æƒ…報を使ã£ã¦åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’共有ã™ã‚‹ã™ã¹ã¦ã®ã‚µãƒ¼ãƒ“スã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™_ + +### ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ + +ä»–ã®ã‚¢ãƒ—リケーションやアドホックユーザーã«ã‚ˆã‚‹ç‰¹å®šã®ã‚µãƒ¼ãƒ“スã®ä½¿ç”¨ã‚’制é™ã™ã‚‹ã“ã¨ã¯ã—ã°ã—ã°æœ‰ç”¨ã§ã™ã€‚ã“ã‚Œã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯åˆ¶é™ã‚’使用ã—ã¦å®Ÿç¾ã§ãã¾ã™ã€‚ç¾åœ¨é€šå¸¸ã®ã‚µãƒ¼ãƒ“スã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ã®ã¨åŒæ§˜ã«è¨­å®šã§ãã¾ã™ï¼ˆClickHouse Cloudコンソールã®ç‰¹å®šã®ã‚µãƒ¼ãƒ“スタブã®**設定**ã«ç§»å‹•ï¼‰ã€‚ + +IPフィルタリング設定をå„サービスã«åˆ¥ã€…ã«é©ç”¨ã§ãã‚‹ãŸã‚ã€ã©ã®ã‚¢ãƒ—リケーションãŒã©ã®ã‚µãƒ¼ãƒ“スã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã‹ã‚’制御ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ç‰¹å®šã®ã‚µãƒ¼ãƒ“スã®åˆ©ç”¨ã‚’制é™ã§ãã¾ã™ï¼š + +
+ +NEEDS ALT + +
+ +_Fig. 5 - ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¨­å®šã«ã‚ˆã‚ŠAliceã¯ã‚µãƒ¼ãƒ“ス2ã«ã‚¢ã‚¯ã‚»ã‚¹ä¸å¯ã¨ã•ã‚Œã¦ã„ã¾ã™_ + +### 読ã¿å–ã‚Š vs 読ã¿æ›¸ã + +特定ã®ã‚µãƒ¼ãƒ“スã®æ›¸ãè¾¼ã¿ã‚¢ã‚¯ã‚»ã‚¹ã‚’制é™ã—ã€ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹å†…ã®ã‚µãƒ¼ãƒ“スã®ã‚µãƒ–セットã®ã¿ãŒæ›¸ãè¾¼ã¿ã‚’許å¯ã•ã‚Œã‚‹ã‚ˆã†ã«ã™ã‚‹ã“ã¨ãŒæœ‰ç”¨ãªå ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“れを行ã†ã«ã¯ã€2番目ãŠã‚ˆã³n番目ã®ã‚µãƒ¼ãƒ“スを作æˆã™ã‚‹ã¨ãã«è¡Œãˆã¾ã™ï¼ˆæœ€åˆã®ã‚µãƒ¼ãƒ“スã¯å¸¸ã«èª­ã¿æ›¸ãå¯èƒ½ã§ã‚ã‚‹ã¹ãã§ã™ï¼‰ï¼š + +
+ +NEEDS ALT + +
+ +_Fig. 6 - ウェアãƒã‚¦ã‚¹å†…ã®èª­ã¿æ›¸ãå¯èƒ½ãŠã‚ˆã³èª­ã¿å–り専用ã®ã‚µãƒ¼ãƒ“ス_ + +## スケーリング + +ウェアãƒã‚¦ã‚¹å†…ã®å„サービスã¯ä»¥ä¸‹ã«å¯¾ã—ã¦ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«åˆã‚ã›ã¦èª¿æ•´ã§ãã¾ã™ï¼š +- ノード(レプリカ)ã®æ•°ã€‚ç¾åœ¨ã€ãƒŽãƒ¼ãƒ‰ï¼ˆãƒ¬ãƒ—リカ)ã®æœ€å°æ•°ã¯2ã§ã™ã€‚ +- ノード(レプリカ)ã®ã‚µã‚¤ã‚º +- サービスãŒè‡ªå‹•çš„ã«ã‚¹ã‚±ãƒ¼ãƒ«ã™ã‚‹ã‹ã©ã†ã‹ +- サービスãŒéžã‚¢ã‚¯ãƒ†ã‚£ãƒ–時ã«ã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã«ã™ã‚‹ã¹ãã‹ï¼ˆã‚°ãƒ«ãƒ¼ãƒ—内ã®æœ€åˆã®ã‚µãƒ¼ãƒ“スã«ã¯é©ç”¨ã§ãã¾ã›ã‚“ - **制é™**セクションをå‚ç…§ã—ã¦ãã ã•ã„) + +## 動作ã®å¤‰æ›´ + +サービスã§ã‚³ãƒ³ãƒ”ュート・コンピュートãŒæœ‰åŠ¹ã«ãªã‚‹ã¨ï¼ˆå°‘ãªãã¨ã‚‚1ã¤ã®å‰¯ã‚µãƒ¼ãƒ“スãŒä½œæˆã•ã‚ŒãŸå ´åˆï¼‰ã€`clusterAllReplicas()` 関数呼ã³å‡ºã—ã¯`default` クラスタåを使用ã—ã¦ã€å‘¼ã³å‡ºã•ã‚ŒãŸã‚µãƒ¼ãƒ“スã®ãƒ¬ãƒ—リカã®ã¿ã‚’活用ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«æŽ¥ç¶šã•ã‚Œã¦ã„ã‚‹2ã¤ã®ã‚µãƒ¼ãƒ“スãŒã‚ã‚Šã€ã‚µãƒ¼ãƒ“ス1ã‹ã‚‰ `clusterAllReplicas(default, system, processes)` ãŒå‘¼ã°ã‚Œã‚‹å ´åˆã€ã‚µãƒ¼ãƒ“ス1ã§å®Ÿè¡Œã•ã‚Œã¦ã„るプロセスã®ã¿ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã€ä¾‹ãˆã° `clusterAllReplicas('all_groups.default', system, processes)` を呼ã³å‡ºã—ã¦ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«åˆ°é”ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## 制é™äº‹é … + +ã“ã®ã‚³ãƒ³ãƒ”ュート・コンピュート分離ãŒç¾åœ¨ãƒ—ライベートプレビュー中ã§ã‚ã‚‹ãŸã‚ã€ã“ã®æ©Ÿèƒ½ã‚’使用ã™ã‚‹å ´åˆã«ã¯ã„ãã¤ã‹ã®åˆ¶é™äº‹é …ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®åˆ¶é™ã®å¤šãã¯ã€æ©Ÿèƒ½ãŒGA(一般公開)ã«ãƒªãƒªãƒ¼ã‚¹ã•ã‚ŒãŸå¾Œã«è§£é™¤ã•ã‚Œã¾ã™ï¼š + +1. **主è¦ï¼ˆå…ƒã®ï¼‰ã‚µãƒ¼ãƒ“スã¯æœ€è¿‘作æˆã•ã‚ŒãŸã‹ã€ç§»è¡Œã•ã‚Œã¦ã„ã‚‹ã¹ãã§ã™ã€‚** 残念ãªãŒã‚‰ã€ã™ã¹ã¦ã®æ—¢å­˜ã®ã‚µãƒ¼ãƒ“スãŒä»–ã®ã‚µãƒ¼ãƒ“スã¨ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’共有ã§ãã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。昨年中ã«ã‚µãƒ¼ãƒ“スãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã„ãã¤ã‹ã®æ©Ÿèƒ½ï¼ˆå…±æœ‰Merge Treeエンジンãªã©ï¼‰ã‚’リリースã—ãŸãŸã‚ã€æœªæ›´æ–°ã®ã‚µãƒ¼ãƒ“スã¯ã»ã¨ã‚“ã©ä»–ã®ã‚µãƒ¼ãƒ“スã¨ãƒ‡ãƒ¼ã‚¿ã‚’共有ã§ãã¾ã›ã‚“。ã“ã‚Œã¯ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ä¾å­˜ã—ã¾ã›ã‚“。 + + 良ã„ニュースã¯ã€æˆ‘々ãŒå¤ã„サービスを新ã—ã„エンジンã«ç§»è¡Œã—ã€è¿½åŠ ã®ã‚µãƒ¼ãƒ“スを作æˆã§ãるよã†ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã”希望ã®ã‚µãƒ¼ãƒ“スãŒç§»è¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã©ã†ã‹ã€ã‚µãƒãƒ¼ãƒˆã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 + +2. **主è¦ã‚µãƒ¼ãƒ“スã¯å¸¸ã«ç¨¼åƒä¸­ã§ã‚ã‚Šã€ã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã«ãªã£ã¦ã¯ãªã‚‰ãªã„(GAã®æ•°æ™‚間後ã«ã“ã®åˆ¶é™ã¯è§£é™¤ã•ã‚Œã¾ã™ï¼‰ã€‚** プライベートプレビュー中ãŠã‚ˆã³GA後ã®æ•°æ™‚é–“ã¯ã€ä¸»è¦ã‚µãƒ¼ãƒ“ス(通常ã¯ä»–ã®ã‚µãƒ¼ãƒ“スを追加ã™ã‚‹ã“ã¨ã§æ‹¡å¼µã—ãŸã„既存ã®ã‚µãƒ¼ãƒ“ス)ã¯å¸¸ã«ç¨¼åƒã—ã¦ãŠã‚Šã€ã‚¢ã‚¤ãƒ‰ãƒ«è¨­å®šãŒç„¡åŠ¹åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚å°‘ãªãã¨ã‚‚1ã¤ã®å‰¯ã‚µãƒ¼ãƒ“スãŒã‚ã‚‹å ´åˆã€ä¸»è¦ã‚µãƒ¼ãƒ“スをåœæ­¢ã¾ãŸã¯ã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã™ã¹ã¦ã®å‰¯ã‚µãƒ¼ãƒ“スãŒå‰Šé™¤ã•ã‚ŒãŸã‚‰ã€å…ƒã®ã‚µãƒ¼ãƒ“スをå†ã³åœæ­¢ã¾ãŸã¯ã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã«ã§ãã¾ã™ã€‚ + +3. **時ã«ã¯ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚’隔離ã§ããªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚** データベースワークロードを互ã„ã«éš”離ã™ã‚‹ã‚ªãƒ—ションをæä¾›ã™ã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ãŒã€1ã¤ã®ã‚µãƒ¼ãƒ“スã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ãŒåŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’共有ã™ã‚‹åˆ¥ã®ã‚µãƒ¼ãƒ“スã«å½±éŸ¿ã‚’与ãˆã‚‹ã‚³ãƒ¼ãƒŠãƒ¼ã‚±ãƒ¼ã‚¹ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ä¸»ã«OLTPã®ã‚ˆã†ãªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«é–¢é€£ã™ã‚‹éžå¸¸ã«ç¨€ãªçŠ¶æ³ã§ã™ã€‚ + +4. **ã™ã¹ã¦ã®èª­ã¿æ›¸ãå¯èƒ½ãªã‚µãƒ¼ãƒ“スã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸æ“作を実施ã—ã¾ã™ã€‚** ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ã€æœ€åˆã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ステージングパーティションã«æŒ¿å…¥ã—ã€ãã®å¾Œãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒžãƒ¼ã‚¸æ“作を行ã„ã¾ã™ã€‚ã“れらã®ãƒžãƒ¼ã‚¸ã¯ãƒ¡ãƒ¢ãƒªã¨CPUリソースを消費ã—ã¾ã™ã€‚2ã¤ã®èª­ã¿æ›¸ãå¯èƒ½ãªã‚µãƒ¼ãƒ“スãŒåŒã˜ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’共有ã—ã¦ã„ã‚‹å ´åˆã€ä¸¡æ–¹ã¨ã‚‚ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作を実行ã—ã¦ã„ã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚µãƒ¼ãƒ“ス1ã§`INSERT`クエリãŒã‚ã‚Šã¾ã™ãŒã€ãƒžãƒ¼ã‚¸æ“作ãŒã‚µãƒ¼ãƒ“ス2ã§å®Œäº†ã™ã‚‹ã“ã¨ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。読ã¿å–り専用ã®ã‚µãƒ¼ãƒ“スã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã‚’実行ã—ãªã„ãŸã‚ã€ã“ã®æ“作ã«ãƒªã‚½ãƒ¼ã‚¹ã‚’費やã—ã¾ã›ã‚“。 + +5. **一ã¤ã®èª­ã¿æ›¸ãå¯èƒ½ãªã‚µãƒ¼ãƒ“スã§ã®æŒ¿å…¥æ“作ãŒã€ã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã«ã—ãŸå ´åˆã®ã‚‚ã†ä¸€ã¤ã®èª­ã¿æ›¸ãå¯èƒ½ãªã‚µãƒ¼ãƒ“スを防ãã“ã¨ãŒã‚る。** å‰ã®ãƒã‚¤ãƒ³ãƒˆã®ãŸã‚ã€ç¬¬äºŒã®ã‚µãƒ¼ãƒ“スãŒæœ€åˆã®ã‚µãƒ¼ãƒ“ス用ã«ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸æ“作を行ã„ã¾ã™ã€‚ã“れらã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作ã¯ã€ç¬¬äºŒã®ã‚µãƒ¼ãƒ“スãŒã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã«ãªã‚‹ã®ã‚’妨ã’ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作ãŒå®Œäº†ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒ“スã¯ã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã«ãªã‚Šã¾ã™ã€‚読ã¿å–り専用サービスã¯å½±éŸ¿ã‚’å—ã‘ãšã€é…延ãªãアイドル状態ã«ãªã‚Šã¾ã™ã€‚ + +6. **CREATE/RENAME/DROP DATABASEクエリã¯ã‚¢ã‚¤ãƒ‰ãƒ«/åœæ­¢çŠ¶æ…‹ã®ã‚µãƒ¼ãƒ“スã«ã‚ˆã£ã¦ãƒ–ロックã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚る(GAã®éš›ã«åˆ¶é™ã¯è§£é™¤ã•ã‚Œã¾ã™ï¼‰ã€‚** ã“れらã®ã‚¯ã‚¨ãƒªã¯ãƒãƒ³ã‚°ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“れを回é¿ã™ã‚‹ã«ã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¾ãŸã¯ã‚¯ã‚¨ãƒªå˜ä½ã§ `settings distributed_ddl_task_timeout=0` ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例: + +```sql +create database db_test_ddl_single_query_setting +settings distributed_ddl_task_timeout=0 +``` + +## 料金 + +プライベートプレビュー中ã«ä½œæˆã•ã‚ŒãŸè¿½åŠ ã®ã‚µãƒ¼ãƒ“スã¯é€šå¸¸ã©ãŠã‚Šè«‹æ±‚ã•ã‚Œã¾ã™ã€‚コンピュート価格ã¯ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹å†…ã®ã™ã¹ã¦ã®ã‚µãƒ¼ãƒ“ス(主ãŠã‚ˆã³å‰¯ï¼‰ã§åŒã˜ã§ã™ã€‚ストレージã¯ä¸€åº¦ã ã‘請求ã•ã‚Œã¾ã™ - ãã‚Œã¯æœ€åˆã®ï¼ˆã‚ªãƒªã‚¸ãƒŠãƒ«ã®ï¼‰ã‚µãƒ¼ãƒ“スã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +## プライベートプレビュー終了後ã«ä½•ãŒèµ·ã“ã‚‹ã‹ + +プライベートプレビュープログラムãŒçµ‚了ã—ã€ã‚³ãƒ³ãƒ”ュート・コンピュート分離機能ãŒGAã«ãƒªãƒªãƒ¼ã‚¹ã•ã‚Œã‚‹ã¨ã€æ–°ã—ã作æˆã•ã‚ŒãŸã‚µãƒ¼ãƒ“スã¯ã‚³ãƒ³ãƒ”ュート・コンピュート分離機能ã®ä¸€éƒ¨ã¨ã—ã¦ãã®ã¾ã¾æ®‹ã‚Šã¾ã™ã€‚データやサービスãŒå‰Šé™¤ã•ã‚Œã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— + +- å˜ä¸€ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹å†…ã®ã™ã¹ã¦ã®ã‚µãƒ¼ãƒ“スãŒåŒã˜ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’共有ã—ã¦ã„ã‚‹ãŸã‚ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ä¸»è¦ï¼ˆåˆæœŸï¼‰ã‚µãƒ¼ãƒ“ス上ã®ã¿ã§ä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹å†…ã®ã™ã¹ã¦ã®ã‚µãƒ¼ãƒ“スã®ãƒ‡ãƒ¼ã‚¿ãŒãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +- ウェアãƒã‚¦ã‚¹ã®ä¸»è¦ã‚µãƒ¼ãƒ“スã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を復元ã™ã‚‹å ´åˆã€æ—¢å­˜ã®ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹ã¨æŽ¥ç¶šã•ã‚Œã¦ã„ãªã„完全ã«æ–°ã—ã„サービスã«å¾©å…ƒã•ã‚Œã¾ã™ã€‚復元ãŒå®Œäº†ã—ãŸç›´å¾Œã«æ–°ã—ã„サービスã«ä»–ã®ã‚µãƒ¼ãƒ“スを追加ã§ãã¾ã™ã€‚ + +## 始ã‚る方法 + +組織内ã§ã‚³ãƒ³ãƒ”ュート・コンピュート分離プライベートプレビューを有効ã«ã™ã‚‹ã«ã¯ã€ClickHouse Cloudサãƒãƒ¼ãƒˆãƒãƒ¼ãƒ ã«é€£çµ¡ã—ã¦ãã ã•ã„。ãƒãƒ¼ãƒ ãŒã“ã®æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹ã¨ã€çµ„織内ã®æ—¢å­˜ã®ã‚µãƒ¼ãƒ“スã«è¿½åŠ ã®ã‚µãƒ¼ãƒ“スを作æˆã§ãるよã†ã«ãªã‚Šã€ãƒ—ラス記å·ã‚’クリックã—ã¾ã™ã€‚ + +
+ +NEEDS ALT + +
+ +_Fig. 7 - ウェアãƒã‚¦ã‚¹å†…ã§æ–°ã—ã„サービスを作æˆã™ã‚‹ãŸã‚ã«ãƒ—ラス記å·ã‚’クリック_ + diff --git a/docs/ja/cloud/reference/images/architecture.svg b/docs/ja/cloud/reference/images/architecture.svg new file mode 100644 index 00000000000..73043b42179 --- /dev/null +++ b/docs/ja/cloud/reference/images/architecture.svg @@ -0,0 +1,476 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/ja/cloud/reference/images/aug-15-compute-compute.png b/docs/ja/cloud/reference/images/aug-15-compute-compute.png new file mode 100644 index 00000000000..c5dfb2b6c85 Binary files /dev/null and b/docs/ja/cloud/reference/images/aug-15-compute-compute.png differ diff --git a/docs/ja/cloud/reference/images/aug-29-scaling.png b/docs/ja/cloud/reference/images/aug-29-scaling.png new file mode 100644 index 00000000000..e77b0dfcea5 Binary files /dev/null and b/docs/ja/cloud/reference/images/aug-29-scaling.png differ diff --git a/docs/ja/cloud/reference/images/byoc-1.png b/docs/ja/cloud/reference/images/byoc-1.png new file mode 100644 index 00000000000..5702d22a618 Binary files /dev/null and b/docs/ja/cloud/reference/images/byoc-1.png differ diff --git a/docs/ja/cloud/reference/images/byoc-2.png b/docs/ja/cloud/reference/images/byoc-2.png new file mode 100644 index 00000000000..dcb54f675b6 Binary files /dev/null and b/docs/ja/cloud/reference/images/byoc-2.png differ diff --git a/docs/ja/cloud/reference/images/byoc-3.png b/docs/ja/cloud/reference/images/byoc-3.png new file mode 100644 index 00000000000..683e63a9ab7 Binary files /dev/null and b/docs/ja/cloud/reference/images/byoc-3.png differ diff --git a/docs/ja/cloud/reference/images/byoc-4.png b/docs/ja/cloud/reference/images/byoc-4.png new file mode 100644 index 00000000000..f171dbc68bb Binary files /dev/null and b/docs/ja/cloud/reference/images/byoc-4.png differ diff --git a/docs/ja/cloud/reference/images/clickpipes-s3-gcs.png b/docs/ja/cloud/reference/images/clickpipes-s3-gcs.png new file mode 100644 index 00000000000..834a5d70016 Binary files /dev/null and b/docs/ja/cloud/reference/images/clickpipes-s3-gcs.png differ diff --git a/docs/ja/cloud/reference/images/compute-compute-1.png b/docs/ja/cloud/reference/images/compute-compute-1.png new file mode 100644 index 00000000000..8547a3d0efe Binary files /dev/null and b/docs/ja/cloud/reference/images/compute-compute-1.png differ diff --git a/docs/ja/cloud/reference/images/compute-compute-2.png b/docs/ja/cloud/reference/images/compute-compute-2.png new file mode 100644 index 00000000000..c5dfb2b6c85 Binary files /dev/null and b/docs/ja/cloud/reference/images/compute-compute-2.png differ diff --git a/docs/ja/cloud/reference/images/compute-compute-3.png b/docs/ja/cloud/reference/images/compute-compute-3.png new file mode 100644 index 00000000000..1433fc5624e Binary files /dev/null and b/docs/ja/cloud/reference/images/compute-compute-3.png differ diff --git a/docs/ja/cloud/reference/images/compute-compute-4.png b/docs/ja/cloud/reference/images/compute-compute-4.png new file mode 100644 index 00000000000..cd7da5b5401 Binary files /dev/null and b/docs/ja/cloud/reference/images/compute-compute-4.png differ diff --git a/docs/ja/cloud/reference/images/compute-compute-5.png b/docs/ja/cloud/reference/images/compute-compute-5.png new file mode 100644 index 00000000000..a53d8285388 Binary files /dev/null and b/docs/ja/cloud/reference/images/compute-compute-5.png differ diff --git a/docs/ja/cloud/reference/images/compute-compute-6.png b/docs/ja/cloud/reference/images/compute-compute-6.png new file mode 100644 index 00000000000..80cefbe1013 Binary files /dev/null and b/docs/ja/cloud/reference/images/compute-compute-6.png differ diff --git a/docs/ja/cloud/reference/images/compute-compute-7.png b/docs/ja/cloud/reference/images/compute-compute-7.png new file mode 100644 index 00000000000..af397e08e0d Binary files /dev/null and b/docs/ja/cloud/reference/images/compute-compute-7.png differ diff --git a/docs/ja/cloud/reference/images/compute-compute-8.png b/docs/ja/cloud/reference/images/compute-compute-8.png new file mode 100644 index 00000000000..a4c329474c9 Binary files /dev/null and b/docs/ja/cloud/reference/images/compute-compute-8.png differ diff --git a/docs/ja/cloud/reference/images/create-tokyo-service.png b/docs/ja/cloud/reference/images/create-tokyo-service.png new file mode 100644 index 00000000000..edcef59bc63 Binary files /dev/null and b/docs/ja/cloud/reference/images/create-tokyo-service.png differ diff --git a/docs/ja/cloud/reference/images/july-18-table-inspector.png b/docs/ja/cloud/reference/images/july-18-table-inspector.png new file mode 100644 index 00000000000..f2efc2c97a5 Binary files /dev/null and b/docs/ja/cloud/reference/images/july-18-table-inspector.png differ diff --git a/docs/ja/cloud/reference/images/june-13-fast-releases.png b/docs/ja/cloud/reference/images/june-13-fast-releases.png new file mode 100644 index 00000000000..351fb3470e3 Binary files /dev/null and b/docs/ja/cloud/reference/images/june-13-fast-releases.png differ diff --git a/docs/ja/cloud/reference/images/june-13-kafka-config.png b/docs/ja/cloud/reference/images/june-13-kafka-config.png new file mode 100644 index 00000000000..391bc3548d3 Binary files /dev/null and b/docs/ja/cloud/reference/images/june-13-kafka-config.png differ diff --git a/docs/ja/cloud/reference/images/june-28-prometheus.png b/docs/ja/cloud/reference/images/june-28-prometheus.png new file mode 100644 index 00000000000..1e1e1685dbf Binary files /dev/null and b/docs/ja/cloud/reference/images/june-28-prometheus.png differ diff --git a/docs/ja/cloud/reference/images/june-28-query-insights.png b/docs/ja/cloud/reference/images/june-28-query-insights.png new file mode 100644 index 00000000000..e4b9681e232 Binary files /dev/null and b/docs/ja/cloud/reference/images/june-28-query-insights.png differ diff --git a/docs/ja/cloud/reference/images/may-17-kinesis.png b/docs/ja/cloud/reference/images/may-17-kinesis.png new file mode 100644 index 00000000000..97dbec0a753 Binary files /dev/null and b/docs/ja/cloud/reference/images/may-17-kinesis.png differ diff --git a/docs/ja/cloud/reference/images/may-17-query-endpoints.png b/docs/ja/cloud/reference/images/may-17-query-endpoints.png new file mode 100644 index 00000000000..4bc93b357a4 Binary files /dev/null and b/docs/ja/cloud/reference/images/may-17-query-endpoints.png differ diff --git a/docs/ja/cloud/reference/images/may-30-private-endpoints.png b/docs/ja/cloud/reference/images/may-30-private-endpoints.png new file mode 100644 index 00000000000..a2ec543d44e Binary files /dev/null and b/docs/ja/cloud/reference/images/may-30-private-endpoints.png differ diff --git a/docs/ja/cloud/reference/images/may-30-share-queries.png b/docs/ja/cloud/reference/images/may-30-share-queries.png new file mode 100644 index 00000000000..56808712665 Binary files /dev/null and b/docs/ja/cloud/reference/images/may-30-share-queries.png differ diff --git a/docs/ja/cloud/reference/images/new-cloud-console.gif b/docs/ja/cloud/reference/images/new-cloud-console.gif new file mode 100644 index 00000000000..ebc96f10ba3 Binary files /dev/null and b/docs/ja/cloud/reference/images/new-cloud-console.gif differ diff --git a/docs/ja/cloud/reference/images/oct-4-latency-insights.png b/docs/ja/cloud/reference/images/oct-4-latency-insights.png new file mode 100644 index 00000000000..214f8c706b8 Binary files /dev/null and b/docs/ja/cloud/reference/images/oct-4-latency-insights.png differ diff --git a/docs/ja/cloud/reference/images/shared-merge-tree-1.png b/docs/ja/cloud/reference/images/shared-merge-tree-1.png new file mode 100644 index 00000000000..447d00a2712 Binary files /dev/null and b/docs/ja/cloud/reference/images/shared-merge-tree-1.png differ diff --git a/docs/ja/cloud/reference/images/shared-merge-tree-2.png b/docs/ja/cloud/reference/images/shared-merge-tree-2.png new file mode 100644 index 00000000000..3c68e03c743 Binary files /dev/null and b/docs/ja/cloud/reference/images/shared-merge-tree-2.png differ diff --git a/docs/ja/cloud/reference/shared-merge-tree.md b/docs/ja/cloud/reference/shared-merge-tree.md new file mode 100644 index 00000000000..e79b2cffa51 --- /dev/null +++ b/docs/ja/cloud/reference/shared-merge-tree.md @@ -0,0 +1,119 @@ +--- +slug: /ja/cloud/reference/shared-merge-tree +sidebar_label: SharedMergeTree +title: SharedMergeTree +keywords: [shared merge tree sharedmergetree engine] +--- + +# SharedMergeTree テーブルエンジン + +*\* ClickHouse Cloud(ãŠã‚ˆã³ä¸€éƒ¨ã®ãƒ‘ートナークラウドサービス)ã§ã®ã¿åˆ©ç”¨å¯èƒ½* + +SharedMergeTree テーブルエンジンファミリーã¯ã€ReplicatedMergeTree エンジンã®ã‚¯ãƒ©ã‚¦ãƒ‰ãƒã‚¤ãƒ†ã‚£ãƒ–ãªä»£æ›¿å“ã§ã‚ã‚Šã€å…±æœ‰ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ï¼ˆä¾‹ï¼šAmazon S3ã€Google Cloud Storageã€MinIOã€Azure Blob Storage)上ã§ã®å‹•ä½œã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚特定㮠MergeTree エンジンタイプã”ã¨ã« SharedMergeTree アナログãŒå­˜åœ¨ã—ã€ã¤ã¾ã‚Š ReplacingSharedMergeTree 㯠ReplacingReplicatedMergeTree ã‚’ç½®ãæ›ãˆã¾ã™ã€‚ + +SharedMergeTree テーブルエンジンファミリーã¯ã€ClickHouse Cloud ã®åŸºç›¤ã§ã™ã€‚エンドユーザーã«ã¨ã£ã¦ã€ReplicatedMergeTree ベースã®ã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã™ã‚‹ä»£ã‚ã‚Šã« SharedMergeTree エンジンファミリーを使ã„始ã‚ã‚‹ãŸã‚ã«ä½•ã‹ã‚’変更ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。以下ã®è¿½åŠ ã®åˆ©ç‚¹ã‚’æä¾›ã—ã¾ã™ï¼š + +- 高ã„挿入スループット +- ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã®ã‚¹ãƒ«ãƒ¼ãƒ—ットã®å‘上 +- ミューテーションã®ã‚¹ãƒ«ãƒ¼ãƒ—ットã®å‘上 +- スケールアップãŠã‚ˆã³ã‚¹ã‚±ãƒ¼ãƒ«ãƒ€ã‚¦ãƒ³æ“作ã®é«˜é€ŸåŒ– +- é¸æŠžã‚¯ã‚¨ãƒªã®ã‚ˆã‚Šè»½é‡ãªå¼·æ•´åˆæ€§ + +SharedMergeTree ãŒã‚‚ãŸã‚‰ã™é‡è¦ãªæ”¹å–„点ã¯ã€ReplicatedMergeTree ã«æ¯”ã¹ã¦è¨ˆç®—ã¨ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ã‚ˆã‚Šæ·±ã„分離をæä¾›ã™ã‚‹ã“ã¨ã§ã™ã€‚以下㧠ReplicatedMergeTree ãŒè¨ˆç®—ã¨ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’ã©ã®ã‚ˆã†ã«åˆ†é›¢ã™ã‚‹ã‹ã‚’確èªã§ãã¾ã™ï¼š + +![ReplicatedMergeTree Diagram](./images/shared-merge-tree-1.png) + +ã”覧ã®ã¨ãŠã‚Šã€ReplicatedMergeTree ã«ä¿å­˜ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯ã‚ªãƒ–ジェクトストレージã«ã‚ã‚Šã¾ã™ãŒã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯ä¾ç„¶ã¨ã—ã¦å„ clickhouse-server ã«å­˜åœ¨ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リケーションæ“作ã®ãŸã‚ã«ã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚‚ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«ãƒ¬ãƒ—リケートã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +![ReplicatedMergeTree Diagram with Metadata](./images/shared-merge-tree-2.png) + +ReplicatedMergeTree ã¨ã¯ç•°ãªã‚Šã€SharedMergeTree ã¯ãƒ¬ãƒ—リカåŒå£«ã®é€šä¿¡ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“。代ã‚ã‚Šã«ã€ã™ã¹ã¦ã®é€šä¿¡ã¯å…±æœ‰ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ clickhouse-keeper を通ã˜ã¦è¡Œã‚ã‚Œã¾ã™ã€‚SharedMergeTree ã¯éžåŒæœŸã®ãƒªãƒ¼ãƒ€ãƒ¼ãƒ¬ã‚¹ãƒ¬ãƒ—リケーションを実装ã—ã€clickhouse-keeper を調整ãŠã‚ˆã³ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«ä½¿ç”¨ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚µãƒ¼ãƒ“スã®ã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—ãŠã‚ˆã³ã‚¹ã‚±ãƒ¼ãƒ«ãƒ€ã‚¦ãƒ³ã«ä¼´ã£ã¦ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’レプリケートã™ã‚‹å¿…è¦ãŒãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¬ãƒ—リケーションã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã€ãƒžãƒ¼ã‚¸ãŠã‚ˆã³ã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—ã®æ“作ãŒé«˜é€ŸåŒ–ã•ã‚Œã¾ã™ã€‚SharedMergeTree ã¯å„テーブルã«å¯¾ã—ã¦ä½•ç™¾ã‚‚ã®ãƒ¬ãƒ—リカをå¯èƒ½ã«ã—ã€ã‚·ãƒ£ãƒ¼ãƒ‰ãªã—ã§å‹•çš„ã«ã‚¹ã‚±ãƒ¼ãƒ«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouse Cloud ã§ã¯ã€åˆ†æ•£ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚¢ãƒ—ローãƒãŒæŽ¡ç”¨ã•ã‚Œã€ã‚ˆã‚Šå¤šãã®ã‚³ãƒ³ãƒ”ュートリソースãŒã‚¯ã‚¨ãƒªã«åˆ©ç”¨ã•ã‚Œã¾ã™ã€‚ + +## 内部監視 + +ReplicatedMergeTree ã®å†…部監視ã«ä½¿ç”¨ã•ã‚Œã‚‹ã»ã¨ã‚“ã©ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã¯ã€SharedMergeTree ã«ã‚‚存在ã—ã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã¨ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ãƒ¬ãƒ—リケーションãŒç™ºç”Ÿã—ãªã„ãŸã‚ã€`system.replication_queue` 㨠`system.replicated_fetches` ã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。ã—ã‹ã—ã€SharedMergeTree ã«ã¯ã“れら2ã¤ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾å¿œã™ã‚‹ä»£æ›¿æ¡ˆãŒã‚ã‚Šã¾ã™ã€‚ + +**system.virtual_parts** + +ã“ã®ãƒ†ãƒ¼ãƒ–ル㯠`system.replication_queue` ã«å¯¾ã™ã‚‹ SharedMergeTree ã®ä»£æ›¿ã¨ã—ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚ç¾åœ¨ã®ãƒ‘ーツã®æœ€æ–°ã‚»ãƒƒãƒˆã€ãªã‚‰ã³ã«ãƒžãƒ¼ã‚¸ã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã€ãŠã‚ˆã³å‰Šé™¤ã•ã‚ŒãŸãƒ‘ーティションãªã©ã®é€²è¡Œä¸­ã®å°†æ¥ã®ãƒ‘ーツã«é–¢ã™ã‚‹æƒ…報を格ç´ã—ã¾ã™ã€‚ + +**system.shared_merge_tree_fetches** + +ã“ã®ãƒ†ãƒ¼ãƒ–ル㯠`system.replicated_fetches` ã«å¯¾ã™ã‚‹ SharedMergeTree ã®ä»£æ›¿ã§ã™ã€‚メモリã«èª­ã¿è¾¼ã¾ã‚Œã‚‹ä¸»ã‚­ãƒ¼ã¨ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã®é€²è¡Œä¸­ã®ãƒ•ã‚§ãƒƒãƒã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +## SharedMergeTree ã®æœ‰åŠ¹åŒ– + +`SharedMergeTree` ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +SharedMergeTree テーブルエンジンをサãƒãƒ¼ãƒˆã™ã‚‹ã‚µãƒ¼ãƒ“スã§ã¯ã€æ‰‹å‹•ã§ä½•ã‹ã‚’有効ã«ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。以å‰ã¨åŒæ§˜ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã¨ã€CREATE TABLE クエリã§æŒ‡å®šã•ã‚ŒãŸã‚¨ãƒ³ã‚¸ãƒ³ã«å¯¾å¿œã™ã‚‹ SharedMergeTree ベースã®ãƒ†ãƒ¼ãƒ–ルエンジンãŒè‡ªå‹•çš„ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +```sql +CREATE TABLE my_table( + key UInt64, + value String +) +ENGINE = MergeTree +ORDER BY key +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€SharedMergeTree テーブルエンジンを使用ã—㦠`my_table` テーブルãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +ClickHouse Cloud ã§ã¯ `default_table_engine=MergeTree` ã¨ã—ã¦è¨­å®šã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€`ENGINE=MergeTree` を指定ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。以下ã®ã‚¯ã‚¨ãƒªã¯ã€ä¸Šè¨˜ã®ã‚¯ã‚¨ãƒªã¨åŒä¸€ã§ã™ã€‚ + +```sql +CREATE TABLE my_table( + key UInt64, + value String +) +ORDER BY key +``` + +ã‚‚ã— Replacing, Collapsing, Aggregating, Summing, VersionedCollapsing, ã¾ãŸã¯ Graphite MergeTree テーブルを使用ã™ã‚‹ã¨ã€ãã‚Œã«å¯¾å¿œã™ã‚‹ SharedMergeTree ベースã®ãƒ†ãƒ¼ãƒ–ルエンジンã«è‡ªå‹•çš„ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +```sql +CREATE TABLE myFirstReplacingMT +( + `key` Int64, + `someCol` String, + `eventTime` DateTime +) +ENGINE = ReplacingMergeTree +ORDER BY key; +``` + +特定ã®ãƒ†ãƒ¼ãƒ–ルã«ã¤ã„ã¦ã€`CREATE TABLE` ステートメントã§ä½¿ç”¨ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルエンジンを確èªã™ã‚‹ã«ã¯ã€`SHOW CREATE TABLE` を使用ã—ã¾ã™ã€‚ +``` sql +SHOW CREATE TABLE myFirstReplacingMT; +``` + +```sql +CREATE TABLE default.myFirstReplacingMT +( `key` Int64, `someCol` String, `eventTime` DateTime ) +ENGINE = SharedReplacingMergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}') +ORDER BY key +SETTINGS index_granularity = 8192 +``` + +## 設定 + +ã„ãã¤ã‹ã®è¨­å®šã®æŒ™å‹•ãŒå¤§å¹…ã«å¤‰æ›´ã•ã‚Œã¦ã„ã¾ã™ï¼š + +- `insert_quorum` -- ã™ã¹ã¦ã® SharedMergeTree ã¸ã®æŒ¿å…¥ã¯ã‚¯ã‚ªãƒ¼ãƒ©ãƒ æŒ¿å…¥ï¼ˆå…±æœ‰ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ï¼‰ã§ã™ã®ã§ã€ã“ã®è¨­å®šã¯ SharedMergeTree テーブルエンジンを使用ã™ã‚‹éš›ã«ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 +- `insert_quorum_parallel` -- ã™ã¹ã¦ã® SharedMergeTree ã¸ã®æŒ¿å…¥ã¯ã‚¯ã‚ªãƒ¼ãƒ©ãƒ æŒ¿å…¥ï¼ˆå…±æœ‰ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ï¼‰ã§ã™ã®ã§ã€ã“ã®è¨­å®šã¯ SharedMergeTree テーブルエンジンを使用ã™ã‚‹éš›ã«ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 +- `select_sequential_consistency` -- クオーラム挿入を必è¦ã¨ã›ãšã€`SELECT` クエリã«è¿½åŠ ã®è² è·ã‚’ clickhouse-keeper ã«ã‹ã‘ã¾ã™ã€‚ + +## 一貫性 + +SharedMergeTree ã¯ã€ReplicatedMergeTree よりも軽é‡ãªä¸€è²«æ€§ã‚’æä¾›ã—ã¾ã™ã€‚SharedMergeTree ã«æŒ¿å…¥ã™ã‚‹éš›ã«ã¯ã€`insert_quorum` ã‚„ `insert_quorum_parallel` ã®ã‚ˆã†ãªè¨­å®šã‚’æä¾›ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。挿入ã¯ã‚¯ã‚ªãƒ¼ãƒ©ãƒ æŒ¿å…¥ã§ã‚ã‚Šã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯ ClickHouse-Keeper ã«ä¿å­˜ã•ã‚Œã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯å°‘ãªãã¨ã‚‚ ClickHouse-keepers ã®ã‚¯ã‚ªãƒ¼ãƒ©ãƒ ã«è¤‡è£½ã•ã‚Œã¾ã™ã€‚クラスター内ã®å„レプリカã¯ã€éžåŒæœŸã« ClickHouse-Keeper ã‹ã‚‰æ–°ã—ã„情報をフェッãƒã—ã¾ã™ã€‚ + +通常ã€`select_sequential_consistency` ã‚„ `SYSTEM SYNC REPLICA LIGHTWEIGHT` を使用ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。éžåŒæœŸãƒ¬ãƒ—リケーションã¯ã»ã¨ã‚“ã©ã®ã‚·ãƒŠãƒªã‚ªã‚’ã‚«ãƒãƒ¼ã—ã€éžå¸¸ã«ä½Žã„レイテンシーをæŒã£ã¦ã„ã¾ã™ã€‚ã©ã†ã—ã¦ã‚‚å¤ã„データを読ã¿ãŸããªã„å ´åˆã«ã¯ã€ä»¥ä¸‹ã®æŽ¨å¥¨äº‹é …を優先順ä½ã«å¾“ã£ã¦å®Ÿè¡Œã—ã¦ãã ã•ã„: + +1. クエリをåŒã˜ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¾ãŸã¯åŒã˜ãƒŽãƒ¼ãƒ‰ã§èª­ã¿æ›¸ãã—ã¦ã„ã‚‹å ´åˆã€`select_sequential_consistency` ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。ã™ã§ã«ãƒ¬ãƒ—リカãŒæœ€æ–°ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’æŒã£ã¦ã„ã‚‹ã‹ã‚‰ã§ã™ã€‚ + +2. 一方ã®ãƒ¬ãƒ—リカã«æ›¸ãè¾¼ã¿ã€åˆ¥ã®ãƒ¬ãƒ—リカã‹ã‚‰èª­ã¿å–ã‚‹å ´åˆã€`SYSTEM SYNC REPLICA LIGHTWEIGHT` を使用ã—ã¦ã€ãƒ¬ãƒ—リカ㌠ClickHouse-Keeper ã‹ã‚‰ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ã‚ˆã†ã«å¼·åˆ¶ã§ãã¾ã™ã€‚ + +3. クエリã®ä¸€éƒ¨ã¨ã—㦠`select_sequential_consistency` ã¨ã„ã†è¨­å®šã‚’使用ã—ã¾ã™ã€‚ + +## 関連コンテンツ + +- [ClickHouse Cloud ㌠SharedMergeTree ã¨è»½é‡ã‚¢ãƒƒãƒ—デートã§ãƒ‘フォーマンスをå‘上](https://clickhouse.com/blog/clickhouse-cloud-boosts-performance-with-sharedmergetree-and-lightweight-updates) diff --git a/docs/ja/cloud/reference/supported-regions.md b/docs/ja/cloud/reference/supported-regions.md new file mode 100644 index 00000000000..1df725dd921 --- /dev/null +++ b/docs/ja/cloud/reference/supported-regions.md @@ -0,0 +1,49 @@ +--- +title: サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るクラウドリージョン +sidebar_label: サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るクラウドリージョン +keywords: [aws, gcp, google cloud, azure, クラウド, リージョン] +description: ClickHouse CloudãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ +--- +# サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るクラウドリージョン +## AWSリージョン + +- ap-northeast-1 (æ±äº¬) +- ap-south-1 (ムンãƒã‚¤) +- ap-southeast-1 (シンガãƒãƒ¼ãƒ«) +- ap-southeast-2 (シドニー) +- eu-central-1 (フランクフルト) +- eu-west-1 (アイルランド) +- eu-west-2 (ロンドン) +- us-east-1 (北ãƒãƒ¼ã‚¸ãƒ‹ã‚¢) +- us-east-2 (オãƒã‚¤ã‚ª) +- us-west-2 (オレゴン) + +**検討中:** +- ca-central-1 (カナダ) +- me-central-1 (中æ±) +- af-south-1 (å—アフリカ) +- eu-north-1 (ストックホルム) +- sa-east-1 (å—アメリカ) + + +## Google Cloudリージョン + +- asia-southeast1 (シンガãƒãƒ¼ãƒ«) +- europe-west4 (オランダ) +- us-central1 (アイオワ) +- us-east1 (サウスカロライナ) + +**検討中:** +- australia-southeast1 (シドニー) +- us-west-1 (オレゴン) +- eu-west-1 (ベルギー) + +## Azureリージョン + +- 西 US 3 (アリゾナ) +- æ± US 2 (ãƒãƒ¼ã‚¸ãƒ‹ã‚¢) +- ドイツ西中央 (フランクフルト) + +:::note +ç¾åœ¨ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„ãªã„リージョンã¸ã®ãƒ‡ãƒ—ロイãŒå¿…è¦ã§ã™ã‹ï¼Ÿ [リクエストをé€ä¿¡](https://clickhouse.com/pricing?modal=open)ã—ã¦ãã ã•ã„。 +::: diff --git a/docs/ja/cloud/security/_category_.yml b/docs/ja/cloud/security/_category_.yml new file mode 100644 index 00000000000..b7253753fd5 --- /dev/null +++ b/docs/ja/cloud/security/_category_.yml @@ -0,0 +1,6 @@ +label: 'Cloud Security' +collapsible: true +collapsed: true +link: + type: generated-index + title: Cloud Security diff --git a/docs/ja/cloud/security/accessing-s3-data-securely.md b/docs/ja/cloud/security/accessing-s3-data-securely.md new file mode 100644 index 00000000000..501ce1ebdc1 --- /dev/null +++ b/docs/ja/cloud/security/accessing-s3-data-securely.md @@ -0,0 +1,140 @@ +--- +slug: /ja/cloud/security/secure-s3 +sidebar_label: S3データã«å®‰å…¨ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ +title: S3データã«å®‰å…¨ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ +--- + +ã“ã®è¨˜äº‹ã§ã¯ã€ClickHouse Cloudã®é¡§å®¢ãŒå½¹å‰²ãƒ™ãƒ¼ã‚¹ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’活用ã—ã¦Amazon Simple Storage Service (S3) ã«èªè¨¼ã—ã€å®‰å…¨ã«ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚ + +## ã¯ã˜ã‚ã« + +安全ãªS3アクセスã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã«é€²ã‚€å‰ã«ã€ãã®ä»•çµ„ã¿ã«ã¤ã„ã¦ç†è§£ã™ã‚‹ã“ã¨ãŒé‡è¦ã§ã™ã€‚以下ã¯ã€ClickHouseサービスãŒé¡§å®¢ã®AWSアカウント内ã®å½¹å‰²ã‚’引ãå—ã‘ã¦ãƒ—ライベートS3ãƒã‚±ãƒƒãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ–¹æ³•ã®æ¦‚è¦ã§ã™ã€‚ + +![secures3](@site/docs/ja/cloud/security/images/secures3.jpg) + +ã“ã®ã‚¢ãƒ—ローãƒã«ã‚ˆã‚Šã€é¡§å®¢ã¯å…¨ã¦ã®S3ãƒã‚±ãƒƒãƒˆã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’一ã‹æ‰€ï¼ˆå¼•ãå—ã‘ãŸå½¹å‰²ã®IAMãƒãƒªã‚·ãƒ¼ï¼‰ã§ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã€ãƒã‚±ãƒƒãƒˆãƒãƒªã‚·ãƒ¼ã‚’ã™ã¹ã¦è¦‹ç›´ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã‚’追加ã¾ãŸã¯å‰Šé™¤ã™ã‚‹å¿…è¦ãŒãªããªã‚Šã¾ã™ã€‚ + +## セットアップ + +### ClickHouseサービスã®IAMロールArnã‚’å–å¾— + +1 - ClickHouseクラウドアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚ + +2 - çµ±åˆã‚’作æˆã—ãŸã„ClickHouseサービスをé¸æŠžã—ã¾ã™ã€‚ + +3 - **設定** タブをé¸æŠžã—ã¾ã™ã€‚ + +4 - ページã®ä¸‹éƒ¨ã«ã‚ã‚‹ **ã“ã®ã‚µãƒ¼ãƒ“スã«ã¤ã„ã¦** セクションã¾ã§ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ã¾ã™ã€‚ + +5 - 下ã«ç¤ºã•ã‚Œã¦ã„るよã†ã«ã€ã‚µãƒ¼ãƒ“スã«å±žã™ã‚‹ **IAMロール** 値をコピーã—ã¾ã™ã€‚ + +![s3info](@site/docs/ja/cloud/security/images/secures3_arn.jpg) + +### IAM引ãå—ã‘ロールã®è¨­å®š + +#### オプション1: CloudFormationスタックを使用ã—ã¦ãƒ‡ãƒ—ロイ + +1 - IAMロールã®ä½œæˆã¨ç®¡ç†ã®æ¨©é™ã‚’æŒã¤IAMユーザーã§ã€ã‚¦ã‚§ãƒ–ブラウザã‹ã‚‰AWSアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚ + +2 - [ã“ã®URL](https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/quickcreate?templateURL=https://s3.us-east-2.amazonaws.com/clickhouse-public-resources.clickhouse.cloud/cf-templates/secure-s3.yaml&stackName=ClickHouseSecureS3) ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦CloudFormationスタックを構æˆã—ã¾ã™ã€‚ + +3 - ClickHouseサービスã«å±žã™ã‚‹ **IAMロール** を入力(ã¾ãŸã¯è²¼ã‚Šä»˜ã‘)ã—ã¾ã™ã€‚ + +4 - CloudFormationスタックを設定ã—ã¾ã™ã€‚以下ã¯å„パラメータã«ã¤ã„ã¦ã®è¿½åŠ æƒ…å ±ã§ã™ã€‚ + +| パラメータ | デフォルト値 | 説明 | +| :--- | :----: | :---- | +| RoleName | ClickHouseAccess-001 | ClickHouse CloudãŒã‚ãªãŸã®S3ãƒã‚±ãƒƒãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹æ–°ã—ã„ロールã®åå‰ | +| Role Session Name | * | Role Session Nameã¯ã€ãƒã‚±ãƒƒãƒˆã‚’ã•ã‚‰ã«ä¿è­·ã™ã‚‹ãŸã‚ã®å…±æœ‰ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ | +| ClickHouse Instance Roles | | ã“ã®Secure S3çµ±åˆã‚’使用ã§ãã‚‹ClickHouseサービス IAMロールã®ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šãƒªã‚¹ãƒˆã€‚ | +| Bucket Access | Read | æä¾›ã•ã‚ŒãŸãƒã‚±ãƒƒãƒˆã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚»ã‚¹ãƒ¬ãƒ™ãƒ«ã‚’設定ã—ã¾ã™ã€‚ | +| Bucket Names | | ã“ã®ãƒ­ãƒ¼ãƒ«ãŒã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’æŒã¤**ãƒã‚±ãƒƒãƒˆå**ã®ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šãƒªã‚¹ãƒˆã€‚ | + +*注æ„*: フルãƒã‚±ãƒƒãƒˆArnã§ã¯ãªãã€ãƒã‚±ãƒƒãƒˆåã®ã¿ã‚’入力ã—ã¦ãã ã•ã„。 + +5 - **AWS CloudFormationãŒã‚«ã‚¹ã‚¿ãƒ å付ãã®IAMリソースを作æˆã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚** ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ã€‚ + +6 - å³ä¸‹ã® **スタックを作æˆ** ボタンをクリックã—ã¾ã™ã€‚ + +7 - CloudFormationスタックãŒã‚¨ãƒ©ãƒ¼ãªã完了ã™ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +8 - CloudFormationスタック㮠**Outputs** ã‚’é¸æŠžã—ã¾ã™ã€‚ + +9 - ã“ã®çµ±åˆã«å¿…è¦ãª **RoleArn** 値をコピーã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€S3ãƒã‚±ãƒƒãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + +![s3info](@site/docs/ja/cloud/security/images/secures3_output.jpg) + +#### オプション2: IAMロールを手動ã§ä½œæˆã™ã‚‹ + +1 - IAMロールã®ä½œæˆã¨ç®¡ç†ã®æ¨©é™ã‚’æŒã¤IAMユーザーã§ã€ã‚¦ã‚§ãƒ–ブラウザã‹ã‚‰AWSアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚ + +2 - IAMサービスコンソールã«ç§»å‹•ã—ã¾ã™ã€‚ + +3 - 以下ã®IAMãƒãƒªã‚·ãƒ¼ã¨ä¿¡é ¼ãƒãƒªã‚·ãƒ¼ã‚’æŒã¤æ–°ã—ã„IAMロールを作æˆã—ã¾ã™ã€‚ + +ä¿¡é ¼ãƒãƒªã‚·ãƒ¼ï¼ˆ{ClickHouse_IAM_ARN}ã‚’ClickHouseインスタンスã«å±žã™ã‚‹IAMロールã®arnã«ç½®ãæ›ãˆã¦ãã ã•ã„): + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": "{ClickHouse_IAM_ARN}" + }, + "Action": "sts:AssumeRole" + } + ] +} +``` + +IAMãƒãƒªã‚·ãƒ¼ï¼ˆ{BUCKET_NAME}ã‚’ã‚ãªãŸã®ãƒã‚±ãƒƒãƒˆåã«ç½®ãæ›ãˆã¦ãã ã•ã„): + +``` +{ + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "s3:GetBucketLocation", + "s3:ListBucket" + ], + "Resource": [ + "arn:aws:s3:::{BUCKET_NAME}" + ], + "Effect": "Allow" + }, + { + "Action": [ + "s3:Get*", + "s3:List*" + ], + "Resource": [ + "arn:aws:s3:::{BUCKET_NAME}/*" + ], + "Effect": "Allow" + } + ] +} +``` + +4 - 作æˆå¾Œã®æ–°ã—ã„ **IAMロールArn** をコピーã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€S3ãƒã‚±ãƒƒãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + +## ClickHouseAccessロールã§S3ãƒã‚±ãƒƒãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ + +ClickHouse Cloudã«ã¯ã€æ–°ã—ã作æˆã—ãŸãƒ­ãƒ¼ãƒ«ã‚’使用ã—ã¦`extra_credentials`ã‚’S3テーブル関数ã®ä¸€éƒ¨ã¨ã—ã¦æŒ‡å®šã§ãる新機能ãŒã‚ã‚Šã¾ã™ã€‚以下ã¯ã€æ–°ã—ã作æˆã—ãŸãƒ­ãƒ¼ãƒ«ã‚’使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ä¾‹ã§ã™ã€‚ + +``` +describe table s3('https://s3.amazonaws.com/BUCKETNAME/BUCKETOBJECT.csv','CSVWithNames',extra_credentials(role_arn = 'arn:aws:iam::111111111111:role/ClickHouseAccessRole-001')) +``` + +以下ã¯ã€`role_session_name`を共有シークレットã¨ã—ã¦ä½¿ç”¨ã—ã¦ãƒã‚±ãƒƒãƒˆã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹ä¾‹ã§ã™ã€‚`role_session_name`ãŒæ­£ã—ããªã„å ´åˆã€ã“ã®æ“作ã¯å¤±æ•—ã—ã¾ã™ã€‚ + +``` +describe table s3('https://s3.amazonaws.com/BUCKETNAME/BUCKETOBJECT.csv','CSVWithNames',extra_credentials(role_arn = 'arn:aws:iam::111111111111:role/ClickHouseAccessRole-001', role_session_name = 'secret-role-name')) +``` + +:::note +データ転é€æ–™ã‚’削減ã™ã‚‹ãŸã‚ã«ã€ã‚½ãƒ¼ã‚¹S3ãŒClickHouse Cloudサービスã¨åŒã˜åœ°åŸŸã«ã‚ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[S3料金]( https://aws.amazon.com/s3/pricing/) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: diff --git a/docs/ja/cloud/security/audit-logging.md b/docs/ja/cloud/security/audit-logging.md new file mode 100644 index 00000000000..08caa5bbaf3 --- /dev/null +++ b/docs/ja/cloud/security/audit-logging.md @@ -0,0 +1,58 @@ +--- +sidebar_label: 監査ログ +slug: /ja/cloud/security/audit-logging +title: 監査ログ +--- + +ClickHouse Cloud ã§ã¯ã€å·¦å´ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«ã‚ã‚‹**アクティビティ**タブを使ã£ã¦ã€ã‚ãªãŸã® ClickHouse Cloud オーガニゼーションã«å¯¾ã—ã¦ã©ã®ã‚ˆã†ãªå¤‰æ›´ãŒè¡Œã‚ã‚ŒãŸã‹ã€èª°ãŒå¤‰æ›´ã‚’è¡Œã£ãŸã®ã‹ã€ã„ã¤è¡Œã‚ã‚ŒãŸã®ã‹ã‚’確èªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouse Cloud 活動タブ + +
+ +**アクティビティ**ページã§ã¯ã€ã‚ªãƒ¼ã‚¬ãƒ‹ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã«é–¢ã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã®ãƒªã‚¹ãƒˆãŒãƒ­ã‚°ã«è¨˜éŒ²ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを表示ã—ã¾ã™ã€‚デフォルトã§ã¯ã€ã“ã®ãƒªã‚¹ãƒˆã¯é€†æ™‚系列(最新ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒä¸Šéƒ¨ï¼‰ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚テーブルã®é †åºã¯ã€å„カラムã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’クリックã™ã‚‹ã“ã¨ã§å¤‰æ›´ã§ãã¾ã™ã€‚テーブルã®å„é …ç›®ã«ã¯ä»¥ä¸‹ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒå«ã¾ã‚Œã¦ã„ã¾ã™: + +- **アクティビティ:** イベントを説明ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆã‚¹ãƒ‹ãƒšãƒƒãƒˆ +- **ユーザー:** イベントを開始ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ +- **IP アドレス:** 該当ã™ã‚‹å ´åˆã€ã‚¤ãƒ™ãƒ³ãƒˆã‚’開始ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã® IP アドレス +- **時間:** イベントã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ— + +![ClickHouse Cloud アクティビティテーブル](./images/activity_log2.png) + +
+ +æä¾›ã•ã‚Œã¦ã„る検索ãƒãƒ¼ã‚’使用ã—ã¦ã€ã‚µãƒ¼ãƒ“スåã‚„ IP アドレスãªã©ã®åŸºæº–ã«åŸºã¥ã„ã¦ã‚¤ãƒ™ãƒ³ãƒˆã‚’絞り込むã“ã¨ãŒã§ãã¾ã™ã€‚ã¾ãŸã€ã“ã®æƒ…報を CSV å½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã¦ã€å¤–部ツールã§é…布や分æžã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +
+ +![ClickHouse Cloud アクティビティ CSV エクスãƒãƒ¼ãƒˆ](./images/activity_log3.png) +
+ +## ログ記録ã•ã‚ŒãŸã‚¤ãƒ™ãƒ³ãƒˆã®ä¸€è¦§ + +オーガニゼーション用ã«ã‚­ãƒ£ãƒ—ãƒãƒ£ã•ã‚ŒãŸã•ã¾ã–ã¾ãªç¨®é¡žã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€**サービス**ã€**オーガニゼーション**ã€ãŠã‚ˆã³ **ユーザー**ã®3ã¤ã®ã‚«ãƒ†ã‚´ãƒªã«ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚Œã¦ã„ã¾ã™ã€‚ログ記録ã•ã‚ŒãŸã‚¤ãƒ™ãƒ³ãƒˆã®ãƒªã‚¹ãƒˆã«ã¯æ¬¡ã®ã‚‚ã®ãŒå«ã¾ã‚Œã¾ã™: + +### サービス + +- サービスãŒä½œæˆã•ã‚Œã¾ã—㟠+- サービスãŒå‰Šé™¤ã•ã‚Œã¾ã—㟠+- サービスãŒåœæ­¢ã•ã‚Œã¾ã—㟠+- サービスãŒé–‹å§‹ã•ã‚Œã¾ã—㟠+- サービスåãŒå¤‰æ›´ã•ã‚Œã¾ã—㟠+- サービス IP アクセスリストãŒå¤‰æ›´ã•ã‚Œã¾ã—㟠+- サービスã®ãƒ‘スワードãŒãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã—㟠+ +### オーガニゼーション + +- オーガニゼーションãŒä½œæˆã•ã‚Œã¾ã—㟠+- オーガニゼーションãŒå‰Šé™¤ã•ã‚Œã¾ã—㟠+- オーガニゼーションåãŒå¤‰æ›´ã•ã‚Œã¾ã—㟠+ +### ユーザー + +- ユーザーã®å½¹å‰²ãŒå¤‰æ›´ã•ã‚Œã¾ã—㟠+- ユーザーãŒã‚ªãƒ¼ã‚¬ãƒ‹ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‹ã‚‰å‰Šé™¤ã•ã‚Œã¾ã—㟠+- ユーザーãŒã‚ªãƒ¼ã‚¬ãƒ‹ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã«æ‹›å¾…ã•ã‚Œã¾ã—㟠+- ユーザーãŒã‚ªãƒ¼ã‚¬ãƒ‹ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã«å‚加ã—ã¾ã—㟠+- ユーザー招待ãŒå‰Šé™¤ã•ã‚Œã¾ã—㟠+- ユーザーãŒã‚ªãƒ¼ã‚¬ãƒ‹ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‹ã‚‰é€€å‡ºã—ã¾ã—㟠diff --git a/docs/ja/cloud/security/aws-privatelink.md b/docs/ja/cloud/security/aws-privatelink.md new file mode 100644 index 00000000000..721b9faccd9 --- /dev/null +++ b/docs/ja/cloud/security/aws-privatelink.md @@ -0,0 +1,416 @@ +--- +title: "AWS PrivateLink" +description: "ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ã€AWS PrivateLink を使用ã—㦠ClickHouse Cloud ã«æŽ¥ç¶šã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚" +slug: /ja/manage/security/aws-privatelink +--- + +# AWS PrivateLink + +[AWS PrivateLink](https://aws.amazon.com/privatelink/) を使用ã—ã¦ã€VPCã€AWS サービスã€ãŠå®¢æ§˜ã®ã‚ªãƒ³ãƒ—レミスシステムã€ãŠã‚ˆã³ ClickHouse Cloud ã¨ã®é–“ã§ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã‚’通ã•ãšã«æŽ¥ç¶šã‚’æä¾›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ã€AWS PrivateLink を使用ã—㦠ClickHouse Cloud ã«æŽ¥ç¶šã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚AWS PrivateLink アドレス以外ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‹ã‚‰ã® ClickHouse Cloud サービスã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’無効ã«ã™ã‚‹ã«ã¯ã€ClickHouse Cloud ã® [IP アクセスリスト](https://clickhouse.com/docs/ja/cloud/security/setting-ip-filters) を使用ã—ã¾ã™ã€‚ + +:::note 本番環境ã§ã®ã¿åˆ©ç”¨å¯èƒ½ +AWS PrivateLink 㯠ClickHouse Cloud 本番サービスã§ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚開発サービスã¯ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。 +::: + +AWS PrivateLink を有効ã«ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®æ‰‹é †ã‚’完了ã—ã¦ãã ã•ã„。 +1. エンドãƒã‚¤ãƒ³ãƒˆã‚µãƒ¼ãƒ“スåã‚’å–å¾—ã—ã¾ã™ã€‚ +2. サービスエンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã—ã¾ã™ã€‚ +3. エンドãƒã‚¤ãƒ³ãƒˆ ID ã‚’ ClickHouse Cloud 組織ã«è¿½åŠ ã—ã¾ã™ã€‚ +4. エンドãƒã‚¤ãƒ³ãƒˆ ID をサービスã®è¨±å¯ãƒªã‚¹ãƒˆã«è¿½åŠ ã—ã¾ã™ã€‚ + +AWS PrivateLink ã®å®Œå…¨ãª Terraform 例ã«ã¤ã„ã¦ã¯ã€[ã“ã¡ã‚‰](https://github.com/ClickHouse/terraform-provider-clickhouse/tree/main/examples/PrivateLink)ã‚’ã”å‚ç…§ãã ã•ã„。 + +## å‰ææ¡ä»¶ + +始ã‚ã‚‹å‰ã«å¿…è¦ãªã‚‚ã®ï¼š + +1. AWS アカウント。 +2. プライベートリンクを作æˆãŠã‚ˆã³ç®¡ç†ã™ã‚‹ãŸã‚ã®å¿…è¦ãªæ¨©é™ã‚’æŒã¤ API キー。 + +## 手順 + +以下ã®æ‰‹é †ã«å¾“ã£ã¦ã€ClickHouse Cloud ã‚’ AWS PrivateLink ã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +### エンドãƒã‚¤ãƒ³ãƒˆã‚µãƒ¼ãƒ“スåã®å–å¾— + +#### オプション 1: ClickHouse Cloud コンソール + +ClickHouse Cloud コンソールã§ã€PrivateLink を介ã—ã¦æŽ¥ç¶šã—ãŸã„サービスを開ãã€**Settings** メニューを開ãã¾ã™ã€‚**Set up private endpoint** ボタンをクリックã—ã¾ã™ã€‚Private Link ã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã«ä½¿ç”¨ã™ã‚‹ **Service name** をコピーã—ã¾ã™ã€‚ + +![Private Endpoints](./images/aws-privatelink-pe-create.png) + +#### オプション 2: API + +コマンドを実行ã™ã‚‹å‰ã«ã€ä»¥ä¸‹ã®ç’°å¢ƒå¤‰æ•°ã‚’設定ã—ã¾ã™ã€‚ + +```shell +REGION= +PROVIDER=aws +KEY_ID=<キー ID> +KEY_SECRET=<キー シークレット> +ORG_ID= +SERVICE_NAME= +``` + +リージョンã€ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã€ãŠã‚ˆã³ã‚µãƒ¼ãƒ“スåã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¦ã€ç›®çš„ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ ID ã‚’å–å¾—ã—ã¾ã™ã€‚ + +```shell +export INSTANCE_ID=$(curl --silent --user ${KEY_ID:?}:${KEY_SECRET:?} \ +https://api.clickhouse.cloud/v1/organizations/$ORG_ID/services | \ +jq ".result[] | select (.region==\"${REGION:?}\" and .provider==\"${PROVIDER:?}\" and .name==\"${SERVICE_NAME:?}\") | .id " -r) +``` + +Private Link 構æˆã®ãŸã‚ã® AWS Service Name ã‚’å–å¾—ã—ã¾ã™ã€‚ + +```bash +curl --silent --user ${KEY_ID:?}:${KEY_SECRET:?} \ +https://api.clickhouse.cloud/v1/organizations/${ORG_ID:?}/services/${INSTANCE_ID:?}/privateEndpointConfig | \ +jq .result +``` + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã¨ã€æ¬¡ã®ã‚ˆã†ãªçµæžœãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +```result +{ + ... + "endpointServiceId": "com.amazonaws.vpce.yy-xxxx-N.vpce-svc-xxxxxxxxxxxx", + ... +} +``` + +`endpointServiceId` をメモã—ã¦ã€[手順 2 ã«é€²ã¿ã¾ã™](#create-a-service-endpoint)。 + +### サービスエンドãƒã‚¤ãƒ³ãƒˆã®ä½œæˆ + +次ã«ã€å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã§å–å¾—ã—㟠`endpointServiceId` を使用ã—ã¦ã‚µãƒ¼ãƒ“スãƒã‚¤ãƒ³ãƒˆã‚’作æˆã—ã¾ã™ã€‚ + +#### オプション 1: AWS コンソール + +AWS コンソールを開ãã€**VPC** → **Endpoints** → **Create endpoints** ã«é€²ã¿ã¾ã™ã€‚ + +**Other endpoint services** ã‚’é¸æŠžã—ã€å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã§å–å¾—ã—㟠`endpointServiceId` を使用ã—ã¾ã™ã€‚完了ã—ãŸã‚‰ã€**Verify service** をクリックã—ã¾ã™ã€‚ + +![](./images/aws-privatelink-endpoint-settings.png) + +次ã«ã€VPC ã¨ã‚µãƒ–ãƒãƒƒãƒˆã‚’é¸æŠžã—ã¾ã™ã€‚ + +![Select VPC and subnets](./images/aws-privatelink-select-vpc-and-subnets.png) + +オプションã¨ã—ã¦ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚°ãƒ«ãƒ¼ãƒ—/タグを割り当ã¦ã¾ã™ã€‚ + +:::note ãƒãƒ¼ãƒˆ +セキュリティグループã§ãƒãƒ¼ãƒˆ `8443` 㨠`9440` ãŒè¨±å¯ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +::: + +VPC エンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã—ãŸå¾Œã€`Endpoint ID` ã®å€¤ã‚’メモã—ã¦ãã ã•ã„。ã“ã‚Œã¯æ¬¡ã®ã‚¹ãƒ†ãƒƒãƒ—ã§å¿…è¦ã«ãªã‚Šã¾ã™ã€‚ + +![VPC endpoint ID](@site/docs/ja/cloud/security/images/aws-privatelink-vpc-endpoint-id.png) + +#### オプション 2: AWS CloudFormation + +æ­£ã—ã„サブãƒãƒƒãƒˆ IDã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚°ãƒ«ãƒ¼ãƒ—ã€ãŠã‚ˆã³ VPC ID を使用ã™ã‚‹ã‚ˆã†ã«ã—ã¦ãã ã•ã„。 + +```response +Resources: + ClickHouseInterfaceEndpoint: + Type: 'AWS::EC2::VPCEndpoint' + Properties: + VpcEndpointType: Interface + PrivateDnsEnabled: false + ServiceName: + VpcId: vpc-vpc_id + SubnetIds: + - subnet-subnet_id1 + - subnet-subnet_id2 + - subnet-subnet_id3 + SecurityGroupIds: + - sg-security_group_id1 + - sg-security_group_id2 + - sg-security_group_id3 +``` + +#### オプション 3: Terraform + +```json +resource "aws_vpc_endpoint" "this" { + vpc_id = var.vpc_id + service_name = "" + vpc_endpoint_type = "Interface" + security_group_ids = [ + var.security_group_id1,var.security_group_id2, var.security_group_id3, + ] + subnet_ids = [var.subnet_id1,var.subnet_id2,var.subnet_id3] + private_dns_enabled = false +} +``` + +#### エンドãƒã‚¤ãƒ³ãƒˆã®ãƒ—ライベート DNS åを変更ã™ã‚‹ + +ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã¯ã€ãƒ—ライベート DNS ゾーン `.vpce.aws.clickhouse.cloud` ã®æ§‹æˆã‚’ AWS VPC ã«æ³¨å…¥ã—ã¾ã™ã€‚ + +:::note DNS リゾルãƒãƒ¼ +独自㮠DNS リゾルãƒãƒ¼ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€`.vpce.aws.clickhouse.cloud` ã® DNS ゾーンを作æˆã—ã€ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ãƒ¬ã‚³ãƒ¼ãƒ‰ `*..vpce.aws.clickhouse.cloud` をエンドãƒã‚¤ãƒ³ãƒˆ ID IP アドレスã«ãƒã‚¤ãƒ³ãƒˆã—ã¾ã™ã€‚ +::: + +#### オプション 1: AWS コンソール + +**VPC Endpoints** ã«ç§»å‹•ã—ã¦ã€VPC エンドãƒã‚¤ãƒ³ãƒˆã‚’å³ã‚¯ãƒªãƒƒã‚¯ã—ã€**Modify private DNS name** ã‚’é¸æŠžã—ã¾ã™ã€‚ + +![Endpoints menu](@site/docs/ja/cloud/security/images/aws-privatelink-endpoints-menu.png) + +é–‹ã„ãŸãƒšãƒ¼ã‚¸ã§ã€**Enable private DNS names** ã‚’é¸æŠžã—ã¾ã™ã€‚ + +![Modify DNS names](@site/docs/ja/cloud/security/images/aws-privatelink-modify-dns-name.png) + +#### オプション 2: AWS CloudFormation + +`CloudFormation` テンプレートを更新ã—ã€`PrivateDnsEnabled` ã‚’ `true` ã«è¨­å®šã—ã¾ã™ã€‚ + +```json +PrivateDnsEnabled: true +``` + +変更をé©ç”¨ã—ã¾ã™ã€‚ + +#### オプション 3: Terraform + +- Terraform コード内㮠`aws_vpc_endpoint` リソースを変更ã—ã€`private_dns_enabled` ã‚’ `true` ã«è¨­å®šã—ã¾ã™ã€‚ + +```json +private_dns_enabled = true +``` + +変更をé©ç”¨ã—ã¾ã™ã€‚ + +### エンドãƒã‚¤ãƒ³ãƒˆ ID ã‚’ ClickHouse Cloud 組織ã«è¿½åŠ  + +#### オプション 1: ClickHouse Cloud コンソール + +組織ã«ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’追加ã™ã‚‹ã«ã¯ã€[サービスã®è¨±å¯ãƒªã‚¹ãƒˆã«ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ ID を追加](#add-endpoint-id-to-services-allow-list)ã®ã‚¹ãƒ†ãƒƒãƒ—ã«é€²ã‚“ã§ãã ã•ã„。ClickHouse Cloud コンソールã§ã‚µãƒ¼ãƒ“ス許å¯ãƒªã‚¹ãƒˆã« `Endpoint ID` を追加ã™ã‚‹ã¨ã€è‡ªå‹•çš„ã«çµ„ç¹”ã«ã‚‚追加ã•ã‚Œã¾ã™ã€‚ + +エンドãƒã‚¤ãƒ³ãƒˆã‚’削除ã™ã‚‹ã«ã¯ã€**Organization details -> Private Endpoints** ã‚’é–‹ãã€å‰Šé™¤ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’削除ã—ã¾ã™ã€‚ + +![endpoints](./images/pe-remove-private-endpoint.png) + +#### オプション 2: API + +コマンドを実行ã™ã‚‹å‰ã«ã€ä»¥ä¸‹ã®ç’°å¢ƒå¤‰æ•°ã‚’設定ã—ã¾ã™ã€‚ + +```bash +PROVIDER=aws +KEY_ID=<キー ID> +KEY_SECRET=<キー シークレット> +ORG_ID= +ENDPOINT_ID=<å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã‹ã‚‰ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ ID> +REGION=<リージョンコード, AWS フォーマットを使用ã—ã¦ãã ã•ã„> +``` + +å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’使用ã—㦠`VPC_ENDPOINT` 環境変数を設定ã—ã¾ã™ã€‚ + +エンドãƒã‚¤ãƒ³ãƒˆã‚’追加ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ + +```bash +cat < +KEY_SECRET=<キー シークレット> +ORG_ID= +ENDPOINT_ID=<å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã‹ã‚‰ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ ID> +INSTANCE_ID=<インスタンス ID> +``` + +許å¯ãƒªã‚¹ãƒˆã«ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ ID を追加ã™ã‚‹ã«ã¯ï¼š + +```bash +cat < +KEY_SECRET=<キー シークレット> +ORG_ID= +INSTANCE_ID=<インスタンス ID> +``` + +次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + +```bash +curl --silent --user ${KEY_ID:?}:${KEY_SECRET:?} \ +https://api.clickhouse.cloud/v1/organizations/${ORG_ID:?}/services/${INSTANCE_ID:?}/privateEndpointConfig | \ +jq .result +``` + +ã“ã‚Œã¯æ¬¡ã®ã‚ˆã†ãªå‡ºåŠ›ã‚’è¿”ã—ã¾ã™ï¼š + +```result +{ + "endpointServiceId": "com.amazonaws.vpce.yy-xxxx-N.vpce-svc-xxxxxxxxxxxx", + "privateDnsHostname": "xxxxxxx.yy-xxxx-N.vpce.aws.clickhouse.cloud" +} +``` + +ã“ã®ä¾‹ã§ã¯ã€ãƒ›ã‚¹ãƒˆå `xxxxxxx.yy-xxxx-N.vpce.aws.clickhouse.cloud` ã¸ã®æŽ¥ç¶šã¯ PrivateLink ã¸ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã•ã‚Œã¾ã™ãŒã€`xxxxxxx.yy-xxxx-N.aws.clickhouse.cloud` ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã‚’経由ã—ã¦ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +## トラブルシューティング + +### 1 ã¤ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«è¤‡æ•°ã® PrivateLink + +åŒã˜ AWS リージョン内㧠2 ã¤ä»¥ä¸Šã® AWS Private Link ã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã€æ¬¡ã®ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„:ClickHouse ã§ã¯ã€ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ãƒ¬ãƒ™ãƒ«ã§ VPC エンドãƒã‚¤ãƒ³ãƒˆã‚µãƒ¼ãƒ“スをæä¾›ã—ã¦ã„ã¾ã™ã€‚1 ã¤ã® VPC ã« 2 ã¤ä»¥ä¸Šã® VPC エンドãƒã‚¤ãƒ³ãƒˆã‚’セットアップã™ã‚‹ã¨ã€AWS VPC ã®è¦³ç‚¹ã‹ã‚‰ã¯ã€1 ã¤ã® AWS Private Link を使用ã—ã¦ã„ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚åŒã˜ãƒªãƒ¼ã‚¸ãƒ§ãƒ³å†…㧠2 ã¤ä»¥ä¸Šã® AWS Private Link を構æˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€1 ã¤ã® VPC ã« 1 ã¤ã® VPC エンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã—ã€ClickHouse ã«ä¾é ¼ã—ã¦åŒã˜ VPC エンドãƒã‚¤ãƒ³ãƒˆ ID ã‚’åŒã˜ AWS リージョン内ã®ã™ã¹ã¦ã® ClickHouse サービスã«è¨­å®šã—ã¦ãã ã•ã„。 + +### プライベートエンドãƒã‚¤ãƒ³ãƒˆã¸ã®æŽ¥ç¶šãŒã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã™ã‚‹ + +- VPC エンドãƒã‚¤ãƒ³ãƒˆã«ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚°ãƒ«ãƒ¼ãƒ—をアタッãƒã—ã¦ãã ã•ã„。 +- エンドãƒã‚¤ãƒ³ãƒˆã«ã‚¢ã‚¿ãƒƒãƒã•ã‚ŒãŸã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚°ãƒ«ãƒ¼ãƒ—ã® `インãƒã‚¦ãƒ³ãƒ‰` ルールを確èªã—ã€ClickHouse ã®ãƒãƒ¼ãƒˆã‚’許å¯ã—ã¦ãã ã•ã„。 +- 接続テストã«ä½¿ç”¨ã—㟠VM ã«ã‚¢ã‚¿ãƒƒãƒã•ã‚ŒãŸã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚°ãƒ«ãƒ¼ãƒ—ã® `アウトãƒã‚¦ãƒ³ãƒ‰` ルールを確èªã—ã€ClickHouse ã®ãƒãƒ¼ãƒˆã¸ã®æŽ¥ç¶šã‚’許å¯ã—ã¦ãã ã•ã„。 + +### プライベートホストå: ホストã®ã‚¢ãƒ‰ãƒ¬ã‚¹ãŒè¦‹ã¤ã‹ã‚‰ãªã„ + +- "Private DNS names" オプションãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。詳細ã¯[ステップ](#modify-private-dns-name-for-endpoint)ã‚’ã”確èªãã ã•ã„。 + +### ピアã«ã‚ˆã‚‹æŽ¥ç¶šã®ãƒªã‚»ãƒƒãƒˆ + +- エンドãƒã‚¤ãƒ³ãƒˆ ID ãŒã‚µãƒ¼ãƒ“ス許å¯ãƒªã‚¹ãƒˆã«è¿½åŠ ã•ã‚Œã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚[ステップ](#add-endpoint-id-to-services-allow-list)ã‚’ã”確èªãã ã•ã„。 + +### エンドãƒã‚¤ãƒ³ãƒˆãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã®ç¢ºèª + +コマンドを実行ã™ã‚‹å‰ã«ã€ä»¥ä¸‹ã®ç’°å¢ƒå¤‰æ•°ã‚’設定ã—ã¾ã™ã€‚ + +```bash +KEY_ID=<キー ID> +KEY_SECRET=<キー シークレット> +ORG_ID= +INSTANCE_ID=<インスタンス ID> +``` + +次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + +```shell +curl --silent --user ${KEY_ID:?}:${KEY_SECRET:?} \ +-X GET -H "Content-Type: application/json" \ +https://api.clickhouse.cloud/v1/organizations/${ORG_ID:?}/services/${INSTANCE_ID:?} | \ +jq .result.privateEndpointIds +``` + +### リモートデータベースã¸ã®æŽ¥ç¶š + +ä»®ã«ã€ClickHouse Cloud 㧠[MySQL](../../sql-reference/table-functions/mysql.md) ã‚„ [PostgreSQL](../../sql-reference/table-functions/postgresql.md) テーブル関数を使用ã—ã¦ã€Amazon Web Services (AWS) VPC ã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„るデータベースã«æŽ¥ç¶šã—よã†ã¨ã—ã¦ã„ã‚‹ã¨ã—ã¾ã™ã€‚ã“ã®æŽ¥ç¶šã‚’安全ã«æœ‰åŠ¹ã«ã™ã‚‹ãŸã‚ã« AWS PrivateLink を使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。PrivateLink ã¯ç‰‡æ–¹å‘ã€ä¸€æ–¹å‘ã®æŽ¥ç¶šã§ã™ã€‚内部ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¾ãŸã¯ Amazon VPC ãŒå®‰å…¨ã« ClickHouse Cloud ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ãŒã€ClickHouse Cloud ã‹ã‚‰å†…部ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +[AWS PrivateLink ドキュメント](https://docs.aws.amazon.com/whitepapers/latest/building-scalable-secure-multi-vpc-network-infrastructure/aws-privatelink.html)ã«ã‚ˆã‚‹ã¨ï¼š + +> AWS PrivateLink を使用ã—ã¦ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼è¨­å®šã§ã€æ¶ˆè²»è€… VPC ãŒãƒ—ロãƒã‚¤ãƒ€ãƒ¼ VPC ã«ã‚る特定ã®ã‚µãƒ¼ãƒ“スã¾ãŸã¯ä¸€é€£ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«ä¸€æ–¹å‘ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ãŸã„å ´åˆã«ä½¿ç”¨ã—ã¾ã™ã€‚消費者 VPC ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã ã‘ãŒã€ã‚µãƒ¼ãƒ“スプロãƒã‚¤ãƒ€ãƒ¼ VPC ã®ã‚µãƒ¼ãƒ“スã«æŽ¥ç¶šã‚’開始ã§ãã¾ã™ã€‚ + +ã“れを実ç¾ã™ã‚‹ãŸã‚ã«ã€ClickHouse Cloud ã‹ã‚‰å†…部/プライベートãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚µãƒ¼ãƒ“スã¸ã®æŽ¥ç¶šã‚’許å¯ã™ã‚‹ã‚ˆã†ã« AWS セキュリティグループを設定ã—ã¦ãã ã•ã„。ClickHouse Cloud ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«ãŠã‘ã‚‹[デフォルトã®é€ä¿¡å…ƒ IP アドレス](https://clickhouse.com/docs/ja/manage/security/cloud-endpoints-api)ã¨ã€[利用å¯èƒ½ãªé™çš„ IP アドレス](https://api.clickhouse.cloud/static-ips.json)を確èªã—ã¦ãã ã•ã„。 diff --git a/docs/ja/cloud/security/azure-privatelink.md b/docs/ja/cloud/security/azure-privatelink.md new file mode 100644 index 00000000000..a801e3ea027 --- /dev/null +++ b/docs/ja/cloud/security/azure-privatelink.md @@ -0,0 +1,527 @@ +--- +title: Azure Private Link +sidebar_label: Azure Private Link +slug: /ja/cloud/security/azure-privatelink +description: How to set up Azure Private Link +keywords: [azure, private link, privatelink] +--- + +# Azure Private Link + +:::note +Azure Private Linkã¯ClickHouse Cloudã®**Production**サービスã§ã®ã¿æœ‰åŠ¹ã«ã§ãã¾ã™ã€‚**Development**サービスã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: + +ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€Azure Private Linkを使用ã—ã¦ã€Azure(顧客所有ãŠã‚ˆã³Microsoftパートナーサービスをå«ã‚€ï¼‰ã¨ClickHouse Cloudã®é–“ã«ä»®æƒ³ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’介ã—ãŸãƒ—ライベート接続をæä¾›ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚Azure Private Linkã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã‚’簡素化ã—ã€Azure内ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆé–“ã®ãƒ‡ãƒ¼ã‚¿ã®å…¬é–‹ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã¸ã®éœ²å‡ºã‚’排除ã™ã‚‹ã“ã¨ã§æŽ¥ç¶šã‚’ä¿è­·ã—ã¾ã™ã€‚ + +![Overview of PrivateLink](@site/docs/ja/cloud/security/images/azure-pe.png) + +AWSã‚„GCPã¨ã¯ç•°ãªã‚Šã€Azureã¯Private Linkを介ã—ãŸã‚¯ãƒ­ã‚¹ãƒªãƒ¼ã‚¸ãƒ§ãƒ³æŽ¥ç¶šã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€è¤‡æ•°ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«ãƒ‡ãƒ—ロイã•ã‚ŒãŸClickHouseサービス間ã§ã®æŽ¥ç¶šã‚’確立ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +リージョン間トラフィックã«ã¯è¿½åŠ æ–™é‡‘ãŒã‹ã‹ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚最新ã®Azureドキュメントをã”確èªãã ã•ã„。 +::: + +Azure Private Linkを有効ã«ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®æ‰‹é †ã‚’完了ã—ã¦ãã ã•ã„。 + +1. Private Linkã®ãŸã‚ã®Azure接続エイリアスをå–å¾—ã™ã‚‹ +1. Azureã§ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã™ã‚‹ +1. ClickHouse Cloud組織ã«ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆGUIDを追加ã™ã‚‹ +1. サービスã®è¨±å¯ãƒªã‚¹ãƒˆã«ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆGUIDを追加ã™ã‚‹ +1. Private Linkを使用ã—ã¦ClickHouse Cloudサービスã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ + +Azure Private Linkã®å®Œå…¨ãªTerraform例ã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/terraform-provider-clickhouse/tree/main/examples/PrivateLinkAzure)ã‚’ã”覧ãã ã•ã„。 + +## Private Link用ã®Azure接続エイリアスをå–å¾—ã™ã‚‹ + +### オプション 1: ClickHouse Cloudコンソール + +ClickHouse Cloudコンソールã§ã€PrivateLink経由ã§æŽ¥ç¶šã—ãŸã„サービスを開ãã€**Settings**メニューを開ãã¾ã™ã€‚**Set up private endpoint**ボタンをクリックã—ã¾ã™ã€‚ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã§è¨­å®šã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹**Service name**をコピーã—ã¾ã™ã€‚ + +![Private Endpoints](./images/azure-privatelink-pe-create.png) + +### オプション 2: API + +開始ã™ã‚‹å‰ã«ã€ClickHouse Cloud APIキーãŒå¿…è¦ã§ã™ã€‚[æ–°ã—ã„キーを作æˆ](https://clickhouse.com/docs/ja/cloud/manage/openapi)ã™ã‚‹ã‹ã€æ—¢å­˜ã®ã‚­ãƒ¼ã‚’使用ã—ã¦ãã ã•ã„。Private Link構æˆã‚’管ç†ã™ã‚‹ã«ã¯**Admin**キーãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚ + +APIキーを入手ã—ãŸã‚‰ã€ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹å‰ã«æ¬¡ã®ç’°å¢ƒå¤‰æ•°ã‚’設定ã—ã¦ãã ã•ã„。 + +```bash +REGION= +PROVIDER=azure +KEY_ID= +KEY_SECRET= +ORG_ID= +``` + +リージョンã‹ã‚‰ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹IDã‚’å–å¾—ã—ã¾ã™ã€‚ + +指定ã•ã‚ŒãŸãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«å°‘ãªãã¨ã‚‚1ã¤ã®ClickHouse CloudサービスãŒãƒ‡ãƒ—ロイã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```bash +curl --silent --user ${KEY_ID:?}:${KEY_SECRET:?} https://api.clickhouse.cloud/v1/organizations/${ORG_ID:?}/services | jq ".result[] | select (.region==\"${REGION:?}\" and .provider==\"${PROVIDER:?}\") | .id " -r | head -1 | tee instance_id +``` + +å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã§å—ã‘å–ã£ãŸIDを使用ã—ã¦`INSTANCE_ID`環境変数を作æˆã—ã¾ã™ã€‚ + +```bash +INSTANCE_ID=$(cat instance_id) +``` + +Azure接続エイリアスã¨Private DNSホストåã‚’å–å¾—ã—ã¾ã™ã€‚ + +```bash +curl --silent --user ${KEY_ID:?}:${KEY_SECRET:?} https://api.clickhouse.cloud/v1/organizations/${ORG_ID:?}/services/${INSTANCE_ID:?}/privateEndpointConfig | jq .result +{ + "endpointServiceId": "production-westus3-0-0.63c890a9-4d32-48cc-a08c-8cd92dfb1ad3.westus3.azure.privatelinkservice", + ... +} +``` + +`endpointServiceId`をメモã—ã¦ãŠã„ã¦ãã ã•ã„。次ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ä½¿ç”¨ã—ã¾ã™ã€‚ + +## Azureã§ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã™ã‚‹ {#create-private-endpoint-in-azure} + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€Azureã§ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã—ã¾ã™ã€‚Azureãƒãƒ¼ã‚¿ãƒ«ã¾ãŸã¯Terraformã®ã„ãšã‚Œã‹ã‚’使用ã§ãã¾ã™ã€‚ + +### オプション 1: Azure Portalを使用ã—ã¦Azureã§ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’ä½œæˆ + +Azureãƒãƒ¼ã‚¿ãƒ«ã§ã€**Private Link Center → Private Endpoints**ã‚’é–‹ãã¾ã™ã€‚ + +![Open Azure Private Center](@site/docs/ja/cloud/security/images/azure-private-link-center.png) + +**Create**ボタンをクリックã—ã¦ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆä½œæˆãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’é–‹ãã¾ã™ã€‚ + +![Create PE](@site/docs/ja/cloud/security/images/azure-private-link-center.png) + +--- + +次ã®ç”»é¢ã§ã€æ¬¡ã®ã‚ªãƒ—ションを指定ã—ã¾ã™ã€‚ + +- **Subscription** / **Resource Group**: プライベートエンドãƒã‚¤ãƒ³ãƒˆç”¨ã«Azureサブスクリプションã¨ãƒªã‚½ãƒ¼ã‚¹ã‚°ãƒ«ãƒ¼ãƒ—ã‚’é¸æŠžã—ã¦ãã ã•ã„。 +- **Name**: **Private Endpoint**ã®åå‰ã‚’設定ã—ã¾ã™ã€‚ +- **Region**: Private Linkを介ã—ã¦ClickHouse Cloudã¨æŽ¥ç¶šã™ã‚‹VNETãŒãƒ‡ãƒ—ロイã•ã‚Œã¦ã„るリージョンをé¸æŠžã—ã¾ã™ã€‚ + +上記ã®ã‚¹ãƒ†ãƒƒãƒ—を完了ã—ãŸã‚‰ã€**Next: Resource**ボタンをクリックã—ã¾ã™ã€‚ + +![Create PE](@site/docs/ja/cloud/security/images/azure-pe-create-basic.png) + +--- + +**Connect to an Azure resource by resource ID or alias**オプションをé¸æŠžã—ã¾ã™ã€‚ + +**Resource ID or alias**ã¨ã—ã¦ã€[Private Link用ã®Azure接続エイリアスをå–å¾—](#obtain-azure-connection-alias-for-private-link)ステップã§å–å¾—ã—ãŸ**endpointServiceId**を使用ã—ã¾ã™ã€‚ + +**Next: Virtual Network**ボタンをクリックã—ã¾ã™ã€‚ + +![PE resource](@site/docs/ja/cloud/security/images/azure-pe-resource.png) + +--- + +- **Virtual network**: Private Linkを使用ã—ã¦ClickHouse Cloudã¨æŽ¥ç¶šã—ãŸã„VNETã‚’é¸æŠžã—ã¾ã™ã€‚ +- **Subnet**: プライベートエンドãƒã‚¤ãƒ³ãƒˆãŒä½œæˆã•ã‚Œã‚‹ã‚µãƒ–ãƒãƒƒãƒˆã‚’é¸æŠžã—ã¾ã™ã€‚ + +オプション: + +- **Application security group**: ASGをプライベートエンドãƒã‚¤ãƒ³ãƒˆã«ã‚¢ã‚¿ãƒƒãƒã—ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚°ãƒ«ãƒ¼ãƒ—ã§ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã¸ã®/ã‹ã‚‰ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’フィルタリングã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**Next: DNS**ボタンをクリックã—ã¾ã™ã€‚ + +![PE network](@site/docs/ja/cloud/security/images/azure-pe-create-vnet.png) + +**Next: Tags**ボタンをクリックã—ã¾ã™ã€‚ + +--- + +![PE DNS](@site/docs/ja/cloud/security/images/azure-pe-create-dns.png) + +タグをプライベートエンドãƒã‚¤ãƒ³ãƒˆã«ã‚¢ã‚¿ãƒƒãƒã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆä»»æ„)。 + +**Next: Review + create**ボタンをクリックã—ã¾ã™ã€‚ + +--- + +![PE tags](@site/docs/ja/cloud/security/images/azure-pe-create-tags.png) + +最後ã«ã€**Create**ボタンをクリックã—ã¾ã™ã€‚ + +![PE review](@site/docs/ja/cloud/security/images/azure-pe-create-review.png) + +作æˆã•ã‚ŒãŸãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã®**Connection status**ã¯**Pending**状態ã«ãªã‚Šã¾ã™ã€‚ã“ã®ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’サービス許å¯ãƒªã‚¹ãƒˆã«è¿½åŠ ã™ã‚‹ã¨**Approved**状態ã«å¤‰æ›´ã•ã‚Œã¾ã™ã€‚ + +プライベートエンドãƒã‚¤ãƒ³ãƒˆã«é–¢é€£ã—ãŸãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’é–‹ãã€æ¬¡ã®ã‚¹ãƒ†ãƒƒãƒ—ã§å¿…è¦ã«ãªã‚‹**Private IPv4 address**(ã“ã®ä¾‹ã§ã¯10.0.0.4)をコピーã—ã¾ã™ã€‚ + +![PE IP address](@site/docs/ja/cloud/security/images/azure-pe-ip.png) + +### オプション 2: Terraformを使用ã—ã¦Azureã§ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã™ã‚‹ + +Terraformを使用ã—ã¦ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã™ã‚‹ãŸã‚ã®ä»¥ä¸‹ã®ãƒ†ãƒ³ãƒ—レートを使用ã—ã¾ã™ã€‚ + +```json +resource "azurerm_private_endpoint" "example_clickhouse_cloud" { + name = var.pe_name + location = var.pe_location + resource_group_name = var.pe_resource_group_name + subnet_id = var.pe_subnet_id + + private_service_connection { + name = "test-pl" + private_connection_resource_alias = "" + is_manual_connection = true + } +} +``` + +### プライベートエンドãƒã‚¤ãƒ³ãƒˆresourceGuidã®å–å¾— {#obtaining-private-endpoint-resourceguid} + +Private Linkを使用ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆæŽ¥ç¶šGUIDをサービス許å¯ãƒªã‚¹ãƒˆã«è¿½åŠ ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +プライベートエンドãƒã‚¤ãƒ³ãƒˆãƒªã‚½ãƒ¼ã‚¹GUIDã¯Azureãƒãƒ¼ã‚¿ãƒ«ã§ã®ã¿è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ä½œæˆã—ãŸãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’é–‹ãã€**JSON View**をクリックã—ã¾ã™ã€‚ + +![PE GUID](@site/docs/ja/cloud/security/images/azure-pe-view.png) + +`resourceGuid`フィールドを見ã¤ã‘ã€ã“ã®å€¤ã‚’コピーã—ã¾ã™ã€‚ + +![PE GUID](@site/docs/ja/cloud/security/images/azure-pe-resource-guid.png) + +## Private Linkã®ãŸã‚ã®DNSã®è¨­å®š + +Private Linkを介ã—ã¦ãƒªã‚½ãƒ¼ã‚¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ã€ãƒ—ライベートDNSゾーン (`${location_code}.privatelink.azure.clickhouse.cloud`) を作æˆã—ã€ãれをVNETã«ã‚¢ã‚¿ãƒƒãƒã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### Private DNSã‚¾ãƒ¼ãƒ³ã‚’ä½œæˆ + +**オプション 1: Azureãƒãƒ¼ã‚¿ãƒ«ã‚’使用** + +[Azure Portalを使用ã—ã¦AzureプライベートDNSゾーンを作æˆã™ã‚‹](https://learn.microsoft.com/en-us/azure/dns/private-dns-getstarted-portal)ãŸã‚ã®ã‚¬ã‚¤ãƒ‰ã«å¾“ã£ã¦ãã ã•ã„。 + +**オプション 2: Terraformを使用** + +Private DNSゾーンを作æˆã™ã‚‹ãŸã‚ã®ä»¥ä¸‹ã®Terraformテンプレートを使用ã—ã¾ã™ã€‚ + +```json +resource "azurerm_private_dns_zone" "clickhouse_cloud_private_link_zone" { + name = "${var.location}.privatelink.azure.clickhouse.cloud" + resource_group_name = var.resource_group_name +} +``` + +### ワイルドカードDNSãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’ä½œæˆ + +ワイルドカードレコードを作æˆã—ã€ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã«ãƒã‚¤ãƒ³ãƒˆã—ã¾ã™ã€‚ + +**オプション 1: Azureãƒãƒ¼ã‚¿ãƒ«ã‚’使用** + +1. MyAzureResourceGroupリソースグループを開ãã€`${region_code}.privatelink.azure.clickhouse.cloud`プライベートゾーンをé¸æŠžã—ã¾ã™ã€‚ +2. **+ Record set**ã‚’é¸æŠžã—ã¾ã™ã€‚ +3. **Name**ã«`*`を入力ã—ã¾ã™ã€‚ +4. **IP Address**ã«ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã®IPアドレスを入力ã—ã¾ã™ã€‚ +5. **OK**ã‚’é¸æŠžã—ã¾ã™ã€‚ + +![PE review](@site/docs/ja/cloud/security/images/azure-pl-dns-wildcard.png) + +**オプション 2: Terraformを使用** + +ワイルドカードDNSレコードを作æˆã™ã‚‹ãŸã‚ã®ä»¥ä¸‹ã®Terraformテンプレートを使用ã—ã¾ã™ã€‚ + +```json +resource "azurerm_private_dns_a_record" "example" { + name = "*" + zone_name = var.zone_name + resource_group_name = var.resource_group_name + ttl = 300 + records = ["10.0.0.4"] +} +``` + +### 仮想ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒªãƒ³ã‚¯ã‚’ä½œæˆ + +プライベートDNSゾーンを仮想ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«ãƒªãƒ³ã‚¯ã™ã‚‹ãŸã‚ã«ã€ä»®æƒ³ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒªãƒ³ã‚¯ã‚’作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**オプション 1: Azureãƒãƒ¼ã‚¿ãƒ«ã‚’使用** + +[プライベートDNSゾーンã«ä»®æƒ³ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’リンクã™ã‚‹](https://learn.microsoft.com/en-us/azure/dns/private-dns-getstarted-portal#link-the-virtual-network)ãŸã‚ã®ã‚¬ã‚¤ãƒ‰ã«å¾“ã£ã¦ãã ã•ã„。 + +**オプション 2: Terraformを使用** + +仮想ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’プライベートDNSゾーンã«ãƒªãƒ³ã‚¯ã™ã‚‹ãŸã‚ã®ä»¥ä¸‹ã®Terraformテンプレートを使用ã—ã¾ã™ã€‚ + +```json +resource "azurerm_private_dns_zone_virtual_network_link" "example" { + name = "test" + resource_group_name = var.resource_group_name + private_dns_zone_name = var.zone_name + virtual_network_id = var.virtual_network_id +} +``` + +### DNS設定ã®æ¤œè¨¼ + +westus3.privatelink.azure.clickhouse.cloudドメイン内ã®ä»»æ„ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆIPã«ãƒã‚¤ãƒ³ãƒˆã•ã‚Œã‚‹ã¹ãã§ã™ï¼ˆã“ã®ä¾‹ã§ã¯10.0.0.4)。 + +```bash +nslookup instance-id.westus3.privatelink.azure.clickhouse.cloud. +Server: 127.0.0.53 +Address: 127.0.0.53#53 + +Non-authoritative answer: +Name: instance-id.westus3.privatelink.azure.clickhouse.cloud +Address: 10.0.0.4 +``` + +## ClickHouse Cloud組織ã«ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆGUIDを追加ã™ã‚‹ + +### オプション 1: ClickHouse Cloudコンソール + +組織ã«ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’追加ã™ã‚‹ã«ã¯ã€[Add the Private Endpoint GUID to your service(s) allow list](#add-private-endpoint-guid-to-services-allow-list)ステップã«é€²ã‚“ã§ãã ã•ã„。ClickHouse Cloudコンソールを使用ã—ã¦ã‚µãƒ¼ãƒ“ス許å¯ãƒªã‚¹ãƒˆã«`Private Endpoint GUID`を追加ã™ã‚‹ã¨ã€ãã‚ŒãŒçµ„ç¹”ã«ã‚‚自動的ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +エンドãƒã‚¤ãƒ³ãƒˆã‚’削除ã™ã‚‹ã«ã¯ã€**Organization details -> Private Endpoints**ã‚’é–‹ãã€å‰Šé™¤ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’削除ã—ã¾ã™ã€‚ + +![endpoints](./images/azure-pe-remove-private-endpoint.png) + +### オプション 2: API + +コマンドを実行ã™ã‚‹å‰ã«æ¬¡ã®ç’°å¢ƒå¤‰æ•°ã‚’設定ã—ã¦ãã ã•ã„。 + +```bash +PROVIDER=azure +KEY_ID= +KEY_SECRET= +ORG_ID= +ENDPOINT_ID= +REGION= +``` + +[プライベートエンドãƒã‚¤ãƒ³ãƒˆresourceGuidã®å–å¾—](#obtaining-private-endpoint-resourceguid)ステップã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’使用ã—ã¦`VPC_ENDPOINT`環境変数を設定ã—ã¾ã™ã€‚ + +プライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’追加ã™ã‚‹ãŸã‚ã«æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ + +```bash +cat < +KEY_SECRET= +ORG_ID= +ENDPOINT_ID= +INSTANCE_ID= +``` + +プライベートリンクを使用ã—ã¦åˆ©ç”¨å¯èƒ½ã«ã—ãŸã„å„サービスã§å®Ÿè¡Œã—ã¾ã™ã€‚ + +サービス許å¯ãƒªã‚¹ãƒˆã«ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’追加ã™ã‚‹ãŸã‚ã«æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ + +```bash +cat < +KEY_SECRET= +ORG_ID= +INSTANCE_ID= +``` + +次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ + +```bash +curl --silent --user ${KEY_ID:?}:${KEY_SECRET:?} https://api.clickhouse.cloud/v1/organizations/${ORG_ID:?}/services/${INSTANCE_ID:?}/privateEndpointConfig | jq .result +``` + +次ã®ã‚ˆã†ãªå¿œç­”ã‚’å—ã‘ã‚‹ã¯ãšã§ã™ã€‚ + +```response +{ + ... + "privateDnsHostname": "xxxxxxx..privatelink.azure.clickhouse.cloud" +} +``` + +ã“ã®ä¾‹ã§ã¯ã€`xxxxxxx.region_code.privatelink.azure.clickhouse.cloud`ホストåã¸ã®æŽ¥ç¶šã¯Private Linkã«ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚一方ã€`xxxxxxx.region_code.azure.clickhouse.cloud`ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã‚’介ã—ã¦ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +`privateDnsHostname`を使用ã—ã¦ã€ãƒ—ライベートリンクを介ã—ã¦ClickHouse Cloudサービスã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +## トラブルシューティング + +### DNS設定ã®ãƒ†ã‚¹ãƒˆ + +`${region_code}.privatelink.azure.clickhouse.cloud.`ゾーン内ã®ã™ã¹ã¦ã®DNSレコードã¯[Azureã§ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆ](#create-private-endpoint-in-azure)ステップã‹ã‚‰ã®å†…部IPアドレスã«ãƒã‚¤ãƒ³ãƒˆã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã¯`westus3`ã§ã™ã€‚ + +次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ + +```bash +nslookup abcd.westus3.privatelink.azure.clickhouse.cloud. +``` + +次ã®ã‚ˆã†ãªå¿œç­”ã‚’å—ã‘ã‚‹ã¯ãšã§ã™ã€‚ + +```response +Non-authoritative answer: +Name: abcd.westus3.privatelink.azure.clickhouse.cloud +Address: 10.0.0.4 +``` + +### ピアã«ã‚ˆã‚‹æŽ¥ç¶šãƒªã‚»ãƒƒãƒˆ + +ãŠãらãã€ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆGUIDãŒã‚µãƒ¼ãƒ“ス許å¯ãƒªã‚¹ãƒˆã«è¿½åŠ ã•ã‚Œã¦ã„ã¾ã›ã‚“。[サービスã®è¨±å¯ãƒªã‚¹ãƒˆã«ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆGUIDを追加ã™ã‚‹](#add-private-endpoint-guid-to-services-allow-list)ステップã«å†åº¦å–り組んã§ãã ã•ã„。 + +### プライベートエンドãƒã‚¤ãƒ³ãƒˆãŒPending状態 + +ãŠãらãã€ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆGUIDãŒã‚µãƒ¼ãƒ“ス許å¯ãƒªã‚¹ãƒˆã«è¿½åŠ ã•ã‚Œã¦ã„ã¾ã›ã‚“。[サービスã®è¨±å¯ãƒªã‚¹ãƒˆã«ãƒ—ライベートエンドãƒã‚¤ãƒ³ãƒˆGUIDを追加ã™ã‚‹](#add-private-endpoint-guid-to-services-allow-list)ステップã«å†åº¦å–り組んã§ãã ã•ã„。 + +### 接続ã®ãƒ†ã‚¹ãƒˆ + +Private Link経由ã§æŽ¥ç¶šã«å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€`openssl`を使用ã—ã¦æŽ¥ç¶šã‚’確èªã—ã¾ã™ã€‚Private Linkエンドãƒã‚¤ãƒ³ãƒˆã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãŒ`Accepted`ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +OpenSSLã¯æŽ¥ç¶šå¯èƒ½ã§ã‚ã‚‹ã¯ãšã§ã™ï¼ˆå‡ºåŠ›ã«CONNECTEDãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼‰ã€‚`errno=104`ã¯äºˆæœŸã•ã‚ŒãŸã‚‚ã®ã§ã™ã€‚ + +```bash +openssl s_client -connect abcd.westus3.privatelink.azure.clickhouse.cloud.cloud:9440 +``` + +```response +# highlight-next-line +CONNECTED(00000003) +write:errno=104 +--- +no peer certificate available +--- +No client certificate CA names sent +--- +SSL handshake has read 0 bytes and written 335 bytes +Verification: OK +--- +New, (NONE), Cipher is (NONE) +Secure Renegotiation IS NOT supported +Compression: NONE +Expansion: NONE +No ALPN negotiated +Early data was not sent +Verify return code: 0 (ok) +``` + +### プライベートエンドãƒã‚¤ãƒ³ãƒˆãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã®ç¢ºèª + +コマンドを実行ã™ã‚‹å‰ã«æ¬¡ã®ç’°å¢ƒå¤‰æ•°ã‚’設定ã—ã¦ãã ã•ã„。 + +```bash +KEY_ID= +KEY_SECRET= +ORG_ID= +INSTANCE_ID= +``` + +プライベートエンドãƒã‚¤ãƒ³ãƒˆãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’確èªã™ã‚‹ãŸã‚ã«æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ + +```bash +curl --silent --user ${KEY_ID:?}:${KEY_SECRET:?} -X GET -H "Content-Type: application/json" https://api.clickhouse.cloud/v1/organizations/${ORG_ID:?}/services/${INSTANCE_ID:?} | jq .result.privateEndpointIds +[] +``` + +## 詳細情報 + +Azure Private Linkã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[azure.microsoft.com/en-us/products/private-link](https://azure.microsoft.com/en-us/products/private-link)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/cloud/security/cloud-access-management.md b/docs/ja/cloud/security/cloud-access-management.md new file mode 100644 index 00000000000..6571d2bfb48 --- /dev/null +++ b/docs/ja/cloud/security/cloud-access-management.md @@ -0,0 +1,140 @@ +--- +sidebar_label: æ¦‚è¦ +slug: /ja/cloud/security/cloud-access-management +title: ã‚¯ãƒ©ã‚¦ãƒ‰ã‚¢ã‚¯ã‚»ã‚¹ç®¡ç† +--- + +# ClickHouse Cloudã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ +ClickHouseã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚¯ã‚»ã‚¹ã‚’コンソールã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®2ã¤ã®å ´æ‰€ã§åˆ¶å¾¡ã—ã¾ã™ã€‚コンソールアクセスã¯clickhouse.cloudã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’介ã—ã¦ç®¡ç†ã•ã‚Œã¾ã™ã€‚データベースアクセスã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã¨ãƒ­ãƒ¼ãƒ«ã‚’通ã˜ã¦ç®¡ç†ã•ã‚Œã¾ã™ã€‚ã•ã‚‰ã«ã€ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯SQLコンソールを介ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã‚„ã‚Šå–ã‚Šã§ãるよã†ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ãƒ­ãƒ¼ãƒ«ã‚’付与ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +## ロールã®ç¨®é¡ž +利用å¯èƒ½ãªãƒ­ãƒ¼ãƒ«ã®ç¨®é¡žã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š +- **コンソールロール** clickhouse.cloudコンソールã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’å¯èƒ½ã«ã—ã¾ã™ +- **データベースロール** å˜ä¸€ã®ã‚µãƒ¼ãƒ“ス内ã®æ¨©é™ç®¡ç†ã‚’å¯èƒ½ã«ã—ã¾ã™ +- **SQLコンソールロール** コンソールユーザーãŒSQLコンソールを介ã—ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸæ¨©é™ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ã™ã‚‹ç‰¹åˆ¥ã«å付ã‘られãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ­ãƒ¼ãƒ«ã€‚ + +## 定義済ã¿ã®ãƒ­ãƒ¼ãƒ« +ClickHouse Cloudã¯ã€ã‚¢ã‚¯ã‚»ã‚¹ç®¡ç†ã‚’å¯èƒ½ã«ã™ã‚‹ãŸã‚ã®é™ã‚‰ã‚ŒãŸæ•°ã®å®šç¾©æ¸ˆã¿ãƒ­ãƒ¼ãƒ«ã‚’æä¾›ã—ã¾ã™ã€‚追加ã®ã‚«ã‚¹ã‚¿ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ­ãƒ¼ãƒ«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã§[CREATE ROLE](/ja/sql-reference/statements/create/role)ãŠã‚ˆã³[GRANT](/ja/sql-reference/statements/grant)コマンドを使用ã—ã¦ã„ã¤ã§ã‚‚作æˆã§ãã¾ã™ã€‚ + +| コンテキスト | ロールå | 説明 | +|--------------|-----------------------|------------------------------------------------------------------------------------| +| コンソール | Admin | ClickHouse組織ã¸ã®å®Œå…¨ã‚¢ã‚¯ã‚»ã‚¹ | +| コンソール | Developer | ClickHouse組織ã¸ã®èª­ã¿å–り専用アクセス | +| SQLコンソール | sql_console_admin | データベースã¸ã®ç®¡ç†è€…アクセス | +| SQLコンソール | sql_console_read_only | データベースã¸ã®èª­ã¿å–り専用アクセス | +| データベース | default | データベースã¸ã®ç®¡ç†è€…アクセス。サービス作æˆæ™‚ã«`default`ユーザーã«è‡ªå‹•çš„ã«ä»˜ä¸Žã•ã‚Œã‚‹ | + +## åˆæœŸè¨­å®š +ClickHouse Cloudアカウントを最åˆã«è¨­å®šã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ã‚³ãƒ³ã‚½ãƒ¼ãƒ«å†…ã§è‡ªå‹•çš„ã«AdminロールãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’組織ã«æ‹›å¾…ã—ã€Adminã¾ãŸã¯Developerロールをユーザーã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +コンソール内ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ­ãƒ¼ãƒ«ã‚’変更ã™ã‚‹ã«ã¯ã€å·¦å´ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«ç§»å‹•ã—ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ­ãƒ¼ãƒ«ã‚’変更ã—ã¦ãã ã•ã„。 +::: + +データベースã«ã¯ã€è‡ªå‹•çš„ã«è¿½åŠ ã•ã‚Œã€ã‚µãƒ¼ãƒ“ス作æˆæ™‚ã«default_roleãŒä»˜ä¸Žã•ã‚ŒãŸ`default`ã¨ã„ã†ã‚¢ã‚«ã‚¦ãƒ³ãƒˆãŒã‚ã‚Šã¾ã™ã€‚サービスãŒä½œæˆã•ã‚ŒãŸã¨ãã«ã€ã“ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã®ãƒ©ãƒ³ãƒ€ãƒ ã«ç”Ÿæˆã•ã‚ŒãŸãƒ‘スワードãŒä½¿ç”¨ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚åˆæœŸè¨­å®šå¾Œã¯ãƒ‘スワードã¯è¡¨ç¤ºã•ã‚Œã¾ã›ã‚“ãŒã€ã‚³ãƒ³ã‚½ãƒ¼ãƒ«å†…ã§ç®¡ç†è€…権é™ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¾Œã§å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã¾ãŸã¯ã‚³ãƒ³ã‚½ãƒ¼ãƒ«å†…ã§ç®¡ç†è€…権é™ã‚’æŒã¤ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã¯ã€ã„ã¤ã§ã‚‚追加ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ãƒ­ãƒ¼ãƒ«ã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +コンソール内ã§`default`アカウントã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ‘スワードを変更ã™ã‚‹ã«ã¯ã€å·¦å´ã®ã‚µãƒ¼ãƒ“スメニューã«ç§»å‹•ã—ã¦ã‚µãƒ¼ãƒ“スã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã€è¨­å®šã‚¿ãƒ–ã«ç§»å‹•ã—ã¦ãƒ‘スワードã®ãƒªã‚»ãƒƒãƒˆãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãã ã•ã„。 +::: + +æ–°ã—ã„ユーザーアカウントを作æˆã—ã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«default_roleを付与ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¡Œã£ãŸæ“作ãŒå½¼ã‚‰ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼IDã«é–¢é€£ä»˜ã‘られã€`default`アカウントãŒç·Šæ€¥æ™‚対応æ“作用ã«äºˆç´„ã•ã‚Œã‚‹ãŸã‚ã§ã™ã€‚ + +``` +CREATE USER userID IDENTIFIED WITH sha256_hash by 'hashed_password'; +GRANT default_role to userID; +``` + +ユーザーã¯SHA256ãƒãƒƒã‚·ãƒ¥ã‚¸ã‚§ãƒãƒ¬ãƒ¼ã‚¿ãƒ¼ã¾ãŸã¯Pythonã®hashlibã®ã‚ˆã†ãªã‚³ãƒ¼ãƒ‰é–¢æ•°ã‚’使用ã—ã¦ã€é©åˆ‡ãªè¤‡é›‘性をæŒã¤12文字以上ã®ãƒ‘スワードをSHA256文字列ã«å¤‰æ›ã—ã€ã‚·ã‚¹ãƒ†ãƒ ç®¡ç†è€…ã«æä¾›ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ç®¡ç†è€…ãŒã‚¯ãƒªã‚¢ãƒ†ã‚­ã‚¹ãƒˆã®ãƒ‘スワードを見ãŸã‚Šæ‰±ã£ãŸã‚Šã™ã‚‹ã“ã¨ãŒãªããªã‚Šã¾ã™ã€‚ + +## コンソールロール +コンソールユーザーã«ã¯ãƒ­ãƒ¼ãƒ«ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã€Adminã¾ãŸã¯Developerロールを割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚å„ロールã«é–¢é€£ä»˜ã‘られãŸæ¨©é™ã¯ä»¥ä¸‹ã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +| コンãƒãƒ¼ãƒãƒ³ãƒˆ | 機能 | Admin | Developer | +|-----------------------------------|-----------------------------|--------|-----------| +| サービスã®ç®¡ç† | サービスを見る | ✅ | ✅ | +| | サービスを作æˆã™ã‚‹ | ✅ | ⌠| +| | サービスを削除ã™ã‚‹ | ✅ | ⌠| +| | サービスをåœæ­¢ã™ã‚‹ | ✅ | ⌠| +| | サービスをå†èµ·å‹•ã™ã‚‹ | ✅ | ⌠| +| | サービスパスワードã®ãƒªã‚»ãƒƒãƒˆ | ✅ | ⌠| +| | サービスメトリクスを表示 | ✅ | ✅ | +| クラウドAPI | APIキーã®è¨˜éŒ²ã‚’見る | ✅ | ✅ | +| | APIキーを作æˆã™ã‚‹ | ✅ | Read-Only | +| | APIキーを削除ã™ã‚‹ | ✅ | 自分ã®ã‚­ãƒ¼| +| コンソールユーザーã®ç®¡ç† | ユーザーを見る | ✅ | ✅ | +| | ユーザーを招待ã™ã‚‹ | ✅ | ⌠| +| | ユーザーロールを変更ã™ã‚‹ | ✅ | ⌠| +| | ユーザーを削除ã™ã‚‹ | ✅ | ⌠| +| 請求ã€çµ„ç¹”ã€ã‚µãƒãƒ¼ãƒˆ | 請求を見る | ✅ | ✅ | +| | 請求を管ç†ã™ã‚‹ | ✅ | ⌠| +| | 組織活動を見る | ✅ | ⌠| +| | サãƒãƒ¼ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’æ出ã™ã‚‹| ✅ | ✅ | +| | çµ±åˆã‚’見る | ✅ | ✅ | + +## SQLコンソールロール +ç§ãŸã¡ã®ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«ã¯ã€ãƒ‘スワード無ã—ã®èªè¨¼ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã‚„ã‚Šå–ã‚Šã™ã‚‹ãŸã‚ã®SQLコンソールãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚コンソールã§ç®¡ç†è€…権é™ãŒä»˜ä¸Žã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€çµ„織内ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«å¯¾ã™ã‚‹ç®¡ç†ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’æŒã£ã¦ã„ã¾ã™ã€‚DeveloperロールãŒä¸Žãˆã‚‰ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚¢ã‚¯ã‚»ã‚¹æ¨©ãŒã‚ã‚Šã¾ã›ã‚“ãŒã€ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã‹ã‚‰â€œãƒ•ãƒ«ã‚¢ã‚¯ã‚»ã‚¹â€ã¾ãŸã¯â€œèª­ã¿å–り専用â€ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹æ¨©é™ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚“読ã¿å–り専用â€ãƒ­ãƒ¼ãƒ«ã¯æœ€åˆã«èª­ã¿å–り専用アクセスをアカウントã«ä»˜ä¸Žã—ã¾ã™ã€‚ã—ã‹ã—ã€èª­ã¿å–り専用アクセスãŒä»˜ä¸Žã•ã‚ŒãŸå¾Œã€ç‰¹å®šã®SQLコンソールユーザーã®ãŸã‚ã«æ–°ã—ã„カスタムロールを作æˆã—ã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒSQLコンソールを介ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã™ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚ˆã†ã«ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é–¢é€£ä»˜ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +コンソール内ã®DeveloperロールをæŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒSQLコンソールã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ã™ã‚‹ã«ã¯ã€å·¦å´ã®ã‚µãƒ¼ãƒ“スメニューã«ç§»å‹•ã—ã€ã‚µãƒ¼ãƒ“スã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦è¨­å®šã‚’クリックã—ã€SQLコンソールアクセスセクションã¾ã§ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ã€â€œãƒ•ãƒ«ã‚¢ã‚¯ã‚»ã‚¹â€ã¾ãŸã¯â€œèª­ã¿å–り専用â€ã‚’é¸æŠžã—ã¾ã™ã€‚アクセス権ãŒä»˜ä¸Žã•ã‚ŒãŸã‚‰ã€ä»¥ä¸‹ã®***SQLコンソールロールã®ä½œæˆ***ã§ç¤ºã•ã‚Œã¦ã„るプロセスを使用ã—ã¦ã‚«ã‚¹ã‚¿ãƒ ãƒ­ãƒ¼ãƒ«ã‚’割り当ã¦ã¦ãã ã•ã„。 +::: + +### パスワードレスèªè¨¼ã«ã¤ã„㦠+SQLコンソールユーザーã¯å„セッションã”ã¨ã«ä½œæˆã•ã‚Œã€è‡ªå‹•ã§ãƒ­ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã•ã‚Œã‚‹X.509証明書を使用ã—ã¦èªè¨¼ã•ã‚Œã¾ã™ã€‚セッションãŒçµ‚了ã™ã‚‹ã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚監査ã®ãŸã‚ã«ã‚¢ã‚¯ã‚»ã‚¹ãƒªã‚¹ãƒˆã‚’生æˆã™ã‚‹å ´åˆã¯ã€ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã®ã‚µãƒ¼ãƒ“スã®è¨­å®šã‚¿ãƒ–ã«ç§»å‹•ã—ã¦ã€SQLコンソールアクセスã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã«å­˜åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’確èªã—ã¦ãã ã•ã„。カスタムロールãŒæ§‹æˆã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã§çµ‚ã‚るロールã«ãƒªã‚¹ãƒˆã•ã‚Œã¾ã™ã€‚ + +## SQLコンソールロールã®ä½œæˆ +SQLコンソールユーザーã«é–¢é€£ä»˜ã‘られãŸã‚«ã‚¹ã‚¿ãƒ ãƒ­ãƒ¼ãƒ«ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚SQLコンソールã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ–°ã—ã„セッションを開ããŸã³ã«æ–°ã—ã„ユーザーアカウントを作æˆã™ã‚‹ãŸã‚ã€ã‚·ã‚¹ãƒ†ãƒ ã¯ãƒ­ãƒ¼ãƒ«åã®å‘½åè¦å‰‡ã‚’使用ã—ã¦ã‚«ã‚¹ã‚¿ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ­ãƒ¼ãƒ«ã‚’ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é–¢é€£ä»˜ã‘ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãã‚Œãžã‚Œã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å€‹åˆ¥ã®ãƒ­ãƒ¼ãƒ«ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚個別ã®ãƒ­ãƒ¼ãƒ«ã¯ã€GRANT文を通ã˜ã¦ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã‚‹ã‹ã€ä¸€èˆ¬çš„ãªæ–°ã—ã„ロール(例ãˆã°database_developerã‚„security_administrator)を確立ã—ã€å€‹åˆ¥ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ­ãƒ¼ãƒ«ã«ãã®ä¸€èˆ¬çš„ãªãƒ­ãƒ¼ãƒ«ã‚’通ã˜ã¦ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’与ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +SQLコンソールユーザー用ã®ã‚«ã‚¹ã‚¿ãƒ ãƒ­ãƒ¼ãƒ«ã‚’作æˆã—ã€ä¸€èˆ¬çš„ãªãƒ­ãƒ¼ãƒ«ã‚’付与ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚メールアドレスã¯ã‚³ãƒ³ã‚½ãƒ¼ãƒ«å†…ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã¨ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +1. database_developerロールを作æˆã—ã€SHOWã€CREATEã€ALTERã€ãŠã‚ˆã³DELETE権é™ã‚’付与ã—ã¾ã™ã€‚ + +``` +CREATE ROLE OR REPLACE database_developer; +GRANT SHOW ON * TO database_developer; +GRANT CREATE ON * TO database_developer; +GRANT ALTER ON * TO database_developer; +GRANT DELETE ON * TO database_developer; +``` + +2. SQLコンソールユーザーmy.user@domain.comã®ãŸã‚ã®ãƒ­ãƒ¼ãƒ«ã‚’作æˆã—ã€database_developerロールをãã®ãƒ­ãƒ¼ãƒ«ã«å‰²ã‚Šå½“ã¦ã¾ã™ã€‚ + +``` +CREATE ROLE OR REPLACE `sql-console-role:my.user@domain.com`; +GRANT database_developer TO `sql-console-role:my.user@domain.com`; +``` + +ã“ã®ãƒ­ãƒ¼ãƒ«ã®æ§‹æˆã‚’使用ã™ã‚‹ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå­˜åœ¨ã—ãªã„å ´åˆã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚¯ã‚»ã‚¹ã‚’表示ã™ã‚‹ã‚¯ã‚¨ãƒªã¯ã€ãƒ­ãƒ¼ãƒ«å¯¾ãƒ­ãƒ¼ãƒ«ã®ä»˜ä¸Žã‚’å«ã‚ã‚‹ãŸã‚ã«ä¿®æ­£ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` +SELECT grants.user_name, + grants.role_name, + users.name AS role_member, + grants.access_type, + grants.database, + grants.table +FROM system.grants LEFT OUTER JOIN system.role_grants ON grants.role_name = role_grants.granted_role_name + LEFT OUTER JOIN system.users ON role_grants.user_name = users.name + +UNION ALL + +SELECT grants.user_name, + grants.role_name, + role_grants.role_name AS role_member, + grants.access_type, + grants.database, + grants.table +FROM system.role_grants LEFT OUTER JOIN system.grants ON role_grants.granted_role_name = grants.role_name +WHERE role_grants.user_name is null; +``` + +## データベースロール +ユーザーã¨ã‚«ã‚¹ã‚¿ãƒ ãƒ­ãƒ¼ãƒ«ã¯ã€CREATE User, CREATE Role, GRANTステートメントを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã§ç›´æŽ¥ä½œæˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚SQLコンソール用ã«ä½œæˆã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã‚’除ãã€ã“れらã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ãƒ­ãƒ¼ãƒ«ã¯ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ãƒ­ãƒ¼ãƒ«ã¨ã¯ç‹¬ç«‹ã—ã¦ã„ã¾ã™ã€‚ + +データベースロールã¯åŠ ç®—çš„ã§ã™ã€‚ã“ã‚Œã¯ã¤ã¾ã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ2ã¤ã®ãƒ­ãƒ¼ãƒ«ã®ãƒ¡ãƒ³ãƒãƒ¼ã§ã‚ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãã®2ã¤ã®ãƒ­ãƒ¼ãƒ«ã«ä»˜ä¸Žã•ã‚ŒãŸæœ€ã‚‚多ã„アクセス権をæŒã£ã¦ã„ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ロールを追加ã™ã‚‹ã“ã¨ã§ã‚¢ã‚¯ã‚»ã‚¹æ¨©ãŒå¤±ã‚れるã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。 + +データベースロールã¯ä»–ã®ãƒ­ãƒ¼ãƒ«ã«ä»˜ä¸Žã™ã‚‹ã“ã¨ãŒã§ãã€éšŽå±¤æ§‹é€ ãŒå¯èƒ½ã§ã™ã€‚ロールã¯ã€ãƒ¡ãƒ³ãƒãƒ¼ã§ã‚るロールã®ã™ã¹ã¦ã®æ¨©é™ã‚’継承ã—ã¾ã™ã€‚ + +データベースロールã¯ã‚µãƒ¼ãƒ“スã”ã¨ã«ãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ã‚ã‚Šã€åŒã˜ã‚µãƒ¼ãƒ“ス内ã®è¤‡æ•°ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«é©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +以下ã®å›³ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«æ¨©é™ãŒä»˜ä¸Žã•ã‚Œã‚‹å¯èƒ½æ€§ã®ã‚ã‚‹ç•°ãªã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +![Screenshot 2024-01-18 at 5 14 41 PM](https://github.com/ClickHouse/clickhouse-docs/assets/110556185/94b45f98-48cc-4907-87d8-5eff1ac468e5) diff --git a/docs/ja/cloud/security/cloud-authentication.md b/docs/ja/cloud/security/cloud-authentication.md new file mode 100644 index 00000000000..11296d435ed --- /dev/null +++ b/docs/ja/cloud/security/cloud-authentication.md @@ -0,0 +1,122 @@ +--- +sidebar_label: クラウドèªè¨¼ +slug: /ja/cloud/security/cloud-authentication +title: クラウドèªè¨¼ +--- +# クラウドèªè¨¼ + +ClickHouse Cloudã¯ã€èªè¨¼æ–¹æ³•ã‚’ã„ãã¤ã‹æä¾›ã—ã¦ã„ã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€èªè¨¼ã‚’構æˆã™ã‚‹ãŸã‚ã®è‰¯ã„プラクティスを説明ã—ã¾ã™ã€‚èªè¨¼æ–¹æ³•ã‚’é¸æŠžã™ã‚‹éš›ã¯ã€å¿…ãšã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒãƒ¼ãƒ ã«ç¢ºèªã—ã¦ãã ã•ã„。 + +## パスワード設定 + +コンソールã¨ã‚µãƒ¼ãƒ“ス(データベース)ã®æœ€å°ãƒ‘スワード設定ã¯ã€ç¾åœ¨ [NIST 800-63B](https://pages.nist.gov/800-63-3/sp800-63b.html#sec4) èªè¨¼å™¨ä¿è¨¼ãƒ¬ãƒ™ãƒ«1ã«æº–æ‹ ã—ã¦ã„ã¾ã™ã€‚ +- 最å°12文字 +- 次ã®4é …ç›®ã®ã†ã¡ã€3項目をå«ã‚€: + - 1ã¤ã®å¤§æ–‡å­— + - 1ã¤ã®å°æ–‡å­— + - 1ã¤ã®æ•°å­— + - 1ã¤ã®ç‰¹æ®Šæ–‡å­— + +## メール + パスワード + +ClickHouse Cloudã§ã¯ã€ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã¨ãƒ‘スワードã§èªè¨¼ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®æ–¹æ³•ã‚’使用ã™ã‚‹éš›ã€ClickHouseアカウントをä¿è­·ã™ã‚‹æœ€è‰¯ã®æ–¹æ³•ã¯å¼·åŠ›ãªãƒ‘スワードを使用ã™ã‚‹ã“ã¨ã§ã™ã€‚覚ãˆã‚„ã™ã„パスワードを考ãˆã‚‹ãŸã‚ã®ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒªã‚½ãƒ¼ã‚¹ã¯ã„ãã¤ã‚‚ã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€ãƒ©ãƒ³ãƒ€ãƒ ãªãƒ‘スワード生æˆå™¨ã‚’使用ã—ã€ãƒ‘スワードマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã«ãƒ‘スワードをä¿ç®¡ã™ã‚‹ã“ã¨ã§ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’強化ã§ãã¾ã™ã€‚ + +## Googleã¾ãŸã¯Microsoftã®ã‚½ãƒ¼ã‚·ãƒ£ãƒ«èªè¨¼ã‚’使用ã—ãŸSSO + +ã‚ãªãŸã®ä¼šç¤¾ãŒGoogle Workspaceã¾ãŸã¯Microsoft 365を使用ã—ã¦ã„ã‚‹å ´åˆã€ç¾åœ¨ã®ã‚·ãƒ³ã‚°ãƒ«ã‚µã‚¤ãƒ³ã‚ªãƒ³ï¼ˆSSO)ã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã‚’ClickHouse Cloud内ã§åˆ©ç”¨ã§ãã¾ã™ã€‚ã“ã®ãŸã‚ã«ã¯ã€å˜ã«ä¼šç¤¾ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã—ã€ãã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’使用ã—ã¦ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’招待ã—ã¾ã™ã€‚ãã®çµæžœã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ClickHouse Cloudã«èªè¨¼ã™ã‚‹å‰ã«ã€ä¼šç¤¾ã®ãƒ­ã‚°ã‚¤ãƒ³ãƒ•ãƒ­ãƒ¼ï¼ˆIDプロãƒã‚¤ãƒ€ãƒ¼çµŒç”±ã¾ãŸã¯ç›´æŽ¥Googleã¾ãŸã¯Microsoftèªè¨¼ã‚’通ã˜ã¦ï¼‰ã‚’使用ã—ã¦ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## 多è¦ç´ èªè¨¼ + +メール+パスワードã¾ãŸã¯ã‚½ãƒ¼ã‚·ãƒ£ãƒ«èªè¨¼ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€å¤šè¦ç´ èªè¨¼ï¼ˆMFA)を使用ã—ã¦ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã®å®‰å…¨æ€§ã‚’ã•ã‚‰ã«é«˜ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚MFAを設定ã™ã‚‹ã«ã¯: +1. console.clickhouse.cloudã«ãƒ­ã‚°ã‚¤ãƒ³ +2. ClickHouseロゴã®éš£ã«ã‚る左上ã®ã‚¤ãƒ‹ã‚·ãƒ£ãƒ«ã‚’クリック +3. プロフィールをé¸æŠž +4. å·¦å´ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’é¸æŠž +5. èªè¨¼ã‚¢ãƒ—リタイルã®ã€Œã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã€ã‚’クリック +6. Authyã€1Passwordã€ã¾ãŸã¯Google Authenticatorãªã©ã®èªè¨¼ã‚¢ãƒ—リを使用ã—ã¦QRコードをスキャン +7. コードを入力ã—ã¦ç¢ºèª +8. 次ã®ç”»é¢ã§å¾©æ—§ã‚³ãƒ¼ãƒ‰ã‚’コピーã—ã€å®‰å…¨ãªå ´æ‰€ã«ä¿å­˜ +9. `ç§ã¯ã“ã®ã‚³ãƒ¼ãƒ‰ã‚’安全ã«è¨˜éŒ²ã—ã¾ã—ãŸ`ã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚’オン +10. 続行をクリック + +## アカウントリカãƒãƒªãƒ¼ + +
+ 復旧コードをå–å¾— + + 以å‰ã«MFAã«ç™»éŒ²ã—ã€å¾©æ—§ã‚³ãƒ¼ãƒ‰ã‚’作æˆã—ã¦ã„ãªã„ã‹ç´›å¤±ã—ãŸå ´åˆã¯ã€æ–°ã—ã„復旧コードをå–å¾—ã™ã‚‹ãŸã‚ã«ä»¥ä¸‹ã®æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„。 + 1. https://console.clickhouse.cloudã«ã‚¢ã‚¯ã‚»ã‚¹ + 2. 資格情報ã¨MFAã§ã‚µã‚¤ãƒ³ã‚¤ãƒ³ + 3. 左上ã®ãƒ—ロフィールã«ç§»å‹• + 4. å·¦å´ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’クリック + 5. èªè¨¼ã‚¢ãƒ—リã®æ¨ªã«ã‚るゴミ箱をクリック + 6. èªè¨¼ã‚¢ãƒ—リを削除 + 7. コードを入力ã—ã¦ç¶šè¡Œã‚’クリック + 8. èªè¨¼ã‚¢ãƒ—リセクションã§ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—をクリック + 9. QRコードをスキャンã—ã¦æ–°ã—ã„コードを入力 + 10. 復旧コードをコピーã—ã¦å®‰å…¨ãªå ´æ‰€ã«ä¿å­˜ + 11. `ç§ã¯ã“ã®ã‚³ãƒ¼ãƒ‰ã‚’安全ã«è¨˜éŒ²ã—ã¾ã—ãŸ`ã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚’オン + 12. 続行をクリック + +
+
+ パスワードを忘れãŸå ´åˆ + + パスワードを忘れãŸå ´åˆã€è‡ªåˆ†ã§å›žå¾©ã™ã‚‹ãŸã‚ã®æ‰‹é †ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + 1. https://console.clickhouse.cloudã«ã‚¢ã‚¯ã‚»ã‚¹ + 2. メールアドレスを入力ã—ã¦ç¶šè¡Œã‚’クリック + 3. パスワードをãŠå¿˜ã‚Œã§ã™ã‹ï¼Ÿã‚’クリック + 4. パスワードリセットリンクをé€ä¿¡ã‚’クリック + 5. メールをãƒã‚§ãƒƒã‚¯ã—ã¦ã€ãƒ¡ãƒ¼ãƒ«ã‹ã‚‰ãƒ‘スワードをリセットをクリック + 6. æ–°ã—ã„パスワードを入力ã—ã€ãƒ‘スワードを確èªã—ã¦ã€ãƒ‘スワードã®æ›´æ–°ã‚’クリック + 7. サインインã«æˆ»ã‚‹ã‚’クリック + 8. æ–°ã—ã„パスワードã§é€šå¸¸é€šã‚Šã‚µã‚¤ãƒ³ã‚¤ãƒ³ + +
+
+ MFAデãƒã‚¤ã‚¹ã¾ãŸã¯ãƒˆãƒ¼ã‚¯ãƒ³ã‚’紛失ã—ãŸå ´åˆ + + MFAデãƒã‚¤ã‚¹ã‚’紛失ã™ã‚‹ã‹ã€ãƒˆãƒ¼ã‚¯ãƒ³ã‚’削除ã—ãŸå ´åˆã€æ–°ã—ã„トークンを作æˆã™ã‚‹ãŸã‚ã®æ‰‹é †ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + 1. https://console.clickhouse.cloudã«ã‚¢ã‚¯ã‚»ã‚¹ + 2. 資格情報を入力ã—ã¦ç¶šè¡Œã‚’クリック + 3. 多è¦ç´ èªè¨¼ç”»é¢ã§ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã‚’クリック + 4. 復旧コードをクリック + 5. コードを入力ã—ã¦ç¶šè¡Œã‚’押㙠+ 6. æ–°ã—ã„復旧コードをコピーã—ã¦ã€å®‰å…¨ãªå ´æ‰€ã«ä¿ç®¡ + 7. `ç§ã¯ã“ã®ã‚³ãƒ¼ãƒ‰ã‚’安全ã«è¨˜éŒ²ã—ã¾ã—ãŸ`ã®ãƒœãƒƒã‚¯ã‚¹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€ç¶šè¡Œã‚’クリック + 8. サインイン後ã€å·¦ä¸Šã®ãƒ—ロフィールã«ç§»å‹• + 9. 左上ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’クリック + 10. èªè¨¼ã‚¢ãƒ—リã®æ¨ªã«ã‚るゴミ箱アイコンをクリックã—ã€å¤ã„èªè¨¼ã‚¢ãƒ—リを削除 + 11. èªè¨¼ã‚¢ãƒ—リを削除をクリック + 12. 多è¦ç´ èªè¨¼ã‚’求ã‚られãŸã‚‰ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã‚’クリック + 13. 復旧コードをクリック + 14. 復旧コード(ステップ7ã§ç”Ÿæˆã•ã‚ŒãŸæ–°ã—ã„コード)を入力ã—ã¦ç¶šè¡Œã‚’クリック + 15. æ–°ã—ã„復旧コードをコピーã—ã€å®‰å…¨ãªå ´æ‰€ã«ä¿ç®¡ - 削除プロセス中ã«ç”»é¢ã‚’離れãŸå ´åˆã®ãƒ•ã‚§ã‚¤ãƒ«ã‚»ãƒ¼ãƒ•ã§ã™ + 16. `ç§ã¯ã“ã®ã‚³ãƒ¼ãƒ‰ã‚’安全ã«è¨˜éŒ²ã—ã¾ã—ãŸ`ã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚’オンã«ã—ã¦ç¶šè¡Œ + 17. æ–°ã—ã„MFAファクターを設定ã™ã‚‹ãŸã‚ã®ä¸Šè¨˜ã®æ‰‹é †ã«å¾“ㆠ+ +
+
+ MFAã¨å¾©æ—§ã‚³ãƒ¼ãƒ‰ã‚’両方ã¨ã‚‚紛失ã—ãŸå ´åˆ + + MFAデãƒã‚¤ã‚¹ã¨å¾©æ—§ã‚³ãƒ¼ãƒ‰ã‚’両方ã¨ã‚‚紛失ã—ãŸã€ã¾ãŸã¯MFAデãƒã‚¤ã‚¹ã‚’紛失ã—ã€å¾©æ—§ã‚³ãƒ¼ãƒ‰ã‚’å–å¾—ã—ãŸã“ã¨ãŒãªã„å ´åˆã€ãƒªã‚»ãƒƒãƒˆã‚’リクエストã™ã‚‹ãŸã‚ã«ã¯ä»¥ä¸‹ã®æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„。 + + **ãƒã‚±ãƒƒãƒˆã‚’æ出ã™ã‚‹**: ä»–ã®ç®¡ç†ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã„る組織ã«ã„ã‚‹å ´åˆã€ãŸã¨ãˆä¸€äººã ã‘ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼çµ„ç¹”ã«ã‚¢ã‚¯ã‚»ã‚¹ã—よã†ã¨ã—ã¦ã„ã‚‹å ´åˆã§ã‚ã£ã¦ã‚‚ã€çµ„ç¹”ã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã€ã‚ãªãŸã«ä»£ã‚ã£ã¦MFAをリセットã™ã‚‹ã‚ˆã†ã‚µãƒãƒ¼ãƒˆãƒã‚±ãƒƒãƒˆã‚’æ出ã™ã‚‹å½¹å‰²ã‚’æŒã¤çµ„ç¹”ã®ãƒ¡ãƒ³ãƒãƒ¼ã«ä¾é ¼ã—ã¦ãã ã•ã„。リクエストãŒèªè¨¼ã•ã‚ŒãŸã“ã¨ã‚’確èªå¾Œã€MFAをリセットã—ã€ç®¡ç†è€…ã«é€šçŸ¥ã—ã¾ã™ã€‚通常通りã«MFAãªã—ã§ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã—ã€æ–°ã—ã„ファクターを登録ã—ãŸã„å ´åˆã¯ãƒ—ロフィール設定ã«ç§»å‹•ã—ã¦ãã ã•ã„。 + + **メールã§ãƒªã‚»ãƒƒãƒˆ**: 組織ã®å”¯ä¸€ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã‚ã‚‹å ´åˆã¯ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«ç´ä»˜ã‘られãŸãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’使用ã—ã¦ã€ã‚µãƒãƒ¼ãƒˆã‚±ãƒ¼ã‚¹ã‚’メール(support@clickhouse.com)ã§æ出ã—ã¦ãã ã•ã„。正ã—ã„メールã‹ã‚‰ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§ã‚ã‚‹ã“ã¨ã‚’確èªå¾Œã€MFAã¨ãƒ‘スワードをリセットã—ã¾ã™ã€‚パスワードリセットリンクã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ãƒ¡ãƒ¼ãƒ«ã‚’確èªã—ã¦ãã ã•ã„。新ã—ã„パスワードを設定ã—ã€æ–°ã—ã„ファクターを登録ã—ãŸã„å ´åˆã¯ãƒ—ロフィール設定ã«ç§»å‹•ã—ã¾ã™ã€‚ + +
+ +## SAML SSO + +ClickHouse Cloudã¯ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚¢ã‚µãƒ¼ã‚·ãƒ§ãƒ³ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—言語(SAML)シングルサインオン(SSO)もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[SAML SSOã®è¨­å®š](/docs/ja/cloud/security/saml-setup)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## データベースユーザーID + パスワード + +パスワードをä¿è­·ã™ã‚‹ãŸã‚ã«ã€[ユーザーアカウントを作æˆã™ã‚‹](/docs/ja/sql-reference/statements/create/user.md)éš›ã«SHA256_hashメソッドを使用ã—ã¦ãã ã•ã„。 + +**TIP:** 管ç†æ¨©é™ã®ãªã„ユーザーã¯è‡ªåˆ†ã§ãƒ‘スワードを設定ã§ããªã„ã®ã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ãƒ‘スワードを生æˆå™¨ã§ãƒãƒƒã‚·ãƒ¥ã™ã‚‹ã‚ˆã†ä¾é ¼ã—ã€[ã“ã®ãƒ„ール](https://tools.keycdn.com/sha256-online-generator)ãªã©ã‚’使用ã—ã¦ã‹ã‚‰ã€ãれを管ç†è€…ã«æä¾›ã—ã¦ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’設定ã—ã¦ã‚‚らã„ã¾ã™ã€‚パスワードã¯ä¸Šè¨˜ã®[è¦ä»¶](#establish-strong-passwords)ã«å¾“ã†å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` +CREATE USER userName IDENTIFIED WITH sha256_hash BY 'hash'; +``` diff --git a/docs/ja/cloud/security/cloud-endpoints-api.md b/docs/ja/cloud/security/cloud-endpoints-api.md new file mode 100644 index 00000000000..bb86e375d36 --- /dev/null +++ b/docs/ja/cloud/security/cloud-endpoints-api.md @@ -0,0 +1,131 @@ +--- +slug: /ja/manage/security/cloud-endpoints-api +sidebar_label: クラウドIPアドレス +title: クラウドIPアドレス +--- + +## é™çš„IPã®ä¸€è¦§ + +以下ã®è¡¨ã¯ã€ClickHouse Cloudã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹å„クラウドã¨ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«ãŠã‘ã‚‹é™çš„IPã¨S3エンドãƒã‚¤ãƒ³ãƒˆã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +### AWS + +#### Egress IPs + +| リージョン | IPアドレス | +|--------|------| +| ap-northeast-1 | `35.73.179.23` `54.248.225.163` `54.65.53.160` | +| ap-south-1 | `15.206.7.77` `3.110.39.68` `3.6.83.17` | +| ap-southeast-1 | `46.137.240.41` `52.74.24.166` `54.254.37.170` | +| ap-southeast-2 | `13.210.79.90` `13.236.190.252` `13.54.63.56` | +| eu-central-1 | `18.197.49.136` `3.64.109.93` `3.74.177.59` | +| eu-west-1 | `108.128.86.193` `34.240.176.195` `54.73.98.215` | +| eu-west-2 | `13.43.228.235` `18.135.36.159` `3.10.239.194` | +| us-east-1 | `18.211.40.49` `35.175.32.241` `44.197.47.227` `44.208.152.165` `52.205.46.187` `52.22.199.32` | +| us-east-2 | `18.117.209.120` `3.135.147.1` `3.21.42.89` | +| us-west-2 | `35.165.97.55` `44.236.63.111` `54.244.160.153` | + +#### Ingress IPs + +| リージョン | IPアドレス | +|--------|------| +| ap-northeast-1 | `18.182.162.251` `52.194.58.178` `54.150.231.136` | +| ap-south-1 | `15.206.78.111` `3.6.185.108` `43.204.6.248` | +| ap-southeast-1 | `18.138.54.172` `18.143.38.5` `18.143.51.125` | +| ap-southeast-2 | `3.105.241.252` `3.24.14.253` `3.25.31.112` | +| eu-central-1 | `3.125.141.249` `3.75.55.98` `52.58.240.109` | +| eu-west-1 | `79.125.122.80` `99.80.3.151` `99.81.5.155` | +| eu-west-2 | `18.133.60.223` `18.134.36.146` `18.170.151.77` | +| us-east-1 | `3.224.78.251` `3.217.93.62` `52.4.220.199` `54.166.56.105` `44.210.169.212` `52.206.111.15` | +| us-east-2 | `18.216.18.121` `18.218.245.169` `18.225.29.123` | +| us-west-2 | `35.82.252.60` `35.85.205.122` `44.226.232.172` | + +#### S3エンドãƒã‚¤ãƒ³ãƒˆ + +| リージョン | IPアドレス | +|--------|------| +| ap-northeast-1 | `vpce-0047c645aecb997e7` | +| ap-south-1 | `vpce-0a975c9130d07276d` | +| ap-southeast-1 | `vpce-04c0b7c7066498854` | +| ap-southeast-2 | `vpce-0b45293a83527b13c` | +| eu-central-1 | `vpce-0c58e8f7ed0f63623` | +| eu-west-1 | `vpce-0c85c2795779d8fb2` | +| eu-west-2 | `vpce-0ecd990a9f380d784` | +| us-east-1 | `vpce-05f1eeb392b983932` `vpce-0b8b558ea42181cf6` | +| us-east-2 | `vpce-09ff616fa76e09734` | +| us-west-2 | `vpce-0bc78cc5e63dfb27c` | + +### GCP + +#### Egress IPs + +| リージョン | IPアドレス | +|--------|------| +| europe-west4 | `34.147.18.130` `34.90.110.137` `34.90.16.52` `34.91.142.156` `35.234.163.128` | +| asia-southeast1 | `34.124.237.2` `34.142.232.74` `34.143.238.252` `35.240.251.145` `35.247.141.182` | +| us-central1 | `34.136.25.254` `34.170.139.51` `34.172.174.233` `34.173.64.62` `34.66.234.85` | +| us-east1 | `104.196.202.44` `34.74.136.232` `104.196.211.50` `34.74.115.64` `35.237.218.133` | + +#### Ingress IPs + +| リージョン | IPアドレス | +|--------|------| +| europe-west4 | `35.201.102.65` | +| asia-southeast1 | `34.160.80.214` | +| us-central1 | `35.186.193.237` | +| us-east1 | `34.36.105.62` | + +### Azure + +#### Egress IPs + +| リージョン | IPアドレス | +|--------|------| +| eastus2 | `20.109.60.147` `20.242.123.110` `20.75.77.143` | +| westus3 | `20.14.94.21` `20.150.217.205` `20.38.32.164` | +| germanywestcentral | `20.218.133.244` `20.79.167.238` `51.116.96.61` | + +### Ingress IPs + +| リージョン | IPアドレス | +|--------|------| +| eastus2 | `4.152.12.124` | +| westus3 | `4.227.34.126` | +| germanywestcentral | `4.182.8.168` | + +## é™çš„IPã®API + +é™çš„IPã®ãƒªã‚¹ãƒˆã‚’プログラムã§å–å¾—ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ä»¥ä¸‹ã®ClickHouse Cloud APIエンドãƒã‚¤ãƒ³ãƒˆã‚’使用ã§ãã¾ã™: [`https://api.clickhouse.cloud/static-ips.json`](https://api.clickhouse.cloud/static-ips.json)。ã“ã®APIã¯ã€ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã”ã¨ãŠã‚ˆã³ã‚¯ãƒ©ã‚¦ãƒ‰ã”ã¨ã®ingress/egress IPã‚„S3エンドãƒã‚¤ãƒ³ãƒˆã®æƒ…報をæä¾›ã—ã¾ã™ã€‚ + +MySQLã‚„PostgreSQLエンジンã®ã‚ˆã†ãªçµ±åˆã‚’使用ã—ã¦ã„ã‚‹å ´åˆã€ClickHouse CloudãŒã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«æ‰¿èªã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã®APIを使用ã—ã¦ã€ãƒ‘ブリックIPã‚’å–å¾—ã—ã€GCPã®`firewalls`ã¾ãŸã¯`Authorized networks`ã€Azureã‚„AWSã®`Security Groups`ã€ã‚‚ã—ãã¯ä»–ã®ä»»æ„ã®ã‚¤ãƒ³ãƒ•ãƒ©eコãƒã‚¯ãƒˆã‚¹ãƒˆã®ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã§è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +例ãˆã°ã€`ap-south-1`リージョンã§ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„ã‚‹AWSã®ClickHouse Cloudサービスã‹ã‚‰ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã™ã‚‹ã«ã¯ã€ãã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã®`egress_ips`アドレスを追加ã—ã¾ã™: + +``` +⯠curl -s https://api.clickhouse.cloud/static-ips.json | jq '.' +{ + "aws": [ + { + "egress_ips": [ + "3.110.39.68", + "15.206.7.77", + "3.6.83.17" + ], + "ingress_ips": [ + "15.206.78.111", + "3.6.185.108", + "43.204.6.248" + ], + "region": "ap-south-1", + "s3_endpoints": "vpce-0a975c9130d07276d" + }, +... +``` + +例ãˆã°ã€`us-east-2`ã§ç¨¼åƒã—ã¦ã„ã‚‹AWS RDSインスタンスãŒClickHouse Cloudサービスã«æŽ¥ç¶šã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ä»¥ä¸‹ã®Inboundセキュリティグループルールを設定ã—ã¾ã™: + +![AWS Security group rules](@site/docs/ja/_snippets/images/aws-rds-mysql.png) + +åŒã˜ã`us-east-2`ã®ClickHouse CloudサービスãŒGCP上ã®MySQLã«æŽ¥ç¶šã™ã‚‹å ´åˆã€`Authorized networks`ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +![GCP Authorized networks](@site/docs/ja/_snippets/images/gcp-authorized-network.png) diff --git a/docs/ja/cloud/security/cmek.md b/docs/ja/cloud/security/cmek.md new file mode 100644 index 00000000000..ee370d78ee0 --- /dev/null +++ b/docs/ja/cloud/security/cmek.md @@ -0,0 +1,132 @@ +--- +sidebar_label: ユーザー管ç†ã®æš—å·åŒ–キー +slug: /ja/cloud/security/cmek +title: ユーザー管ç†ã®æš—å·åŒ–キー (CMEK) +--- + +# ユーザー管ç†ã®æš—å·åŒ–キー (CMEK) + +ClickHouse Cloudã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼è‡ªèº«ã®ã‚­ãƒ¼ç®¡ç†ã‚µãƒ¼ãƒ“ス (KMS) キーを活用ã—ã¦ã‚µãƒ¼ãƒ“スをä¿è­·ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ç§ãŸã¡ã¯ã€ClickHouseã®çµ„ã¿è¾¼ã¿æ©Ÿèƒ½ã§ã‚ã‚‹[データ暗å·åŒ–用ã®ä»®æƒ³ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ æ©Ÿèƒ½](/docs/ja/operations/storing-data#encrypted-virtual-file-system)を利用ã—ã€ã‚ãªãŸã®ãƒ‡ãƒ¼ã‚¿ã‚’æš—å·åŒ–・ä¿è­·ã—ã¾ã™ã€‚ClickHouse Cloudサービスã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿æš—å·åŒ–キーã¯ã€[エンベロープ暗å·åŒ–](https://docs.aws.amazon.com/wellarchitected/latest/financial-services-industry-lens/use-envelope-encryption-with-customer-master-keys.html)ã¨ã—ã¦çŸ¥ã‚‰ã‚Œã‚‹ãƒ—ロセスを通ã˜ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæä¾›ã—ãŸKMSキーを使用ã—ã¦æš—å·åŒ–・ä¿è­·ã•ã‚Œã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã‚’動作ã•ã›ã‚‹ãŸã‚ã«å¿…è¦ãªã®ã¯ã€ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã§ãƒ‡ãƒ¼ã‚¿æš—å·åŒ–キーを復å·ãƒ»æš—å·åŒ–ã™ã‚‹ãŸã‚ã®KMSキーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã§ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã¯ ClickHouse Cloud ã®ãƒ—ロダクションサービスã«é™å®šã•ã‚Œã¦ãŠã‚Šã€ã“ã®æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹ã«ã¯[support](/docs/ja/cloud/support)ã«ã”連絡ãã ã•ã„。ユーザー管ç†ã®æš—å·åŒ–キーã¯ã€ã‚µãƒ¼ãƒ“ス作æˆæ™‚ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€æ—¢å­˜ã®ã‚µãƒ¼ãƒ“スã§ã¯ã“ã®ã‚ªãƒ—ションを使用ã§ãã¾ã›ã‚“。[ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¾©å…ƒ](#backup-and-restore)を確èªã—ã¦ä»£æ›¿ã‚ªãƒ—ションをã”覧ãã ã•ã„。 + +ç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ KMS プロãƒã‚¤ãƒ€ãƒ¼: + +- AWSã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„るサービスå‘ã‘ã®[AWS Key Management Service](https://aws.amazon.com/kms) + +è¿‘æ—¥æ供予定: + +- Azureã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„るサービスå‘ã‘ã®[Azure Key Vault](https://azure.microsoft.com/en-us/products/key-vault) +- GCPã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„るサービスå‘ã‘ã®[GCP Cloud Key Management](https://cloud.google.com/security-key-management) +- AWSã€Azureã€GCPã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„るサービスå‘ã‘ã®[Hashicorp Vault](https://www.hashicorp.com/products/vault) + +:::warning +ClickHouse Cloud サービスã®æš—å·åŒ–ã«ä½¿ç”¨ã•ã‚ŒãŸKMSキーを削除ã™ã‚‹ã¨ã€ClickHouseサービスã¯åœæ­¢ã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿ãŠã‚ˆã³æ—¢å­˜ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯å–å¾—ä¸å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ +::: + +## 手順1. KMSキーã®ä½œæˆ + +### AWS KMSを使用 + +AWSコンソールã€CloudFormation スタックã€ã¾ãŸã¯Terraform プロãƒã‚¤ãƒ€ã‚’使用ã—ã¦AWS KMSキーを作æˆã§ãã¾ã™ã€‚以下ã«ãã‚Œãžã‚Œã®æ‰‹é †ã‚’説明ã—ã¾ã™ã€‚ + +#### オプション1. AWSコンソールを使用ã—ã¦KMSキーを手動ã§ä½œæˆ + +*注æ„: æ—¢ã«ä½¿ç”¨ã—ãŸã„KMSキーãŒã‚ã‚‹å ´åˆã¯ã€æ¬¡ã®ã‚¹ãƒ†ãƒƒãƒ—ã«é€²ã‚“ã§ãã ã•ã„。* + +1. AWSアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã€Key Management Service ã«ç§»å‹•ã—ã¾ã™ã€‚ +2. å·¦å´ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰__ユーザー管ç†ã‚­ãƒ¼__ã‚’é¸æŠžã—ã¾ã™ã€‚ +3. å³ä¸Šã®__キーを作æˆ__をクリックã—ã¾ã™ã€‚ +4. __キータイプ__「対称キーã€ã¨__キー使用__「暗å·åŒ–ãŠã‚ˆã³å¾©å·åŒ–ã€ã‚’é¸æŠžã—ã€æ¬¡ã¸ã‚’クリックã—ã¾ã™ã€‚ +5. キーã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ï¼ˆè¡¨ç¤ºå)を入力ã—ã€æ¬¡ã¸ã‚’クリックã—ã¾ã™ã€‚ +6. キー管ç†è€…ã‚’é¸æŠžã—ã€æ¬¡ã¸ã‚’クリックã—ã¾ã™ã€‚ +7. (オプション)キーã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’é¸æŠžã—ã€æ¬¡ã¸ã‚’クリックã—ã¾ã™ã€‚ +8. __キー ãƒãƒªã‚·ãƒ¼__ã®ä¸‹ã«ã€ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã‚¹ãƒ‹ãƒšãƒƒãƒˆã‚’追加ã—ã¾ã™: + + ```json + { + "Sid": "Allow ClickHouse Access", + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::576599896960:role/prod-kms-request-role" + }, + "Action": ["kms:GetPublicKey", + "kms:Decrypt", + "kms:GenerateDataKeyPair", + "kms:Encrypt", + "kms:GetKeyRotationStatus", + "kms:GenerateDataKey", + "kms:DescribeKey"], + "Resource": "*" + } + ``` + + ![æš—å·åŒ–キー ãƒãƒªã‚·ãƒ¼](@site/docs/ja/_snippets/images/cmek1.png) + +9. 完了をクリックã—ã¾ã™ã€‚ +10. 作æˆã—ãŸã‚­ãƒ¼ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’クリックã—ã¾ã™ã€‚ +11. コピー ボタンを使用ã—ã¦ARNをコピーã—ã¾ã™ã€‚ + +#### オプション2. CloudFormationスタックを使用ã—ã¦KMSキーを設定ã¾ãŸã¯ä½œæˆ + +ClickHouseã¯ã€ã‚­ãƒ¼ã®ãŸã‚ã®AWSãƒãƒªã‚·ãƒ¼ã‚’デプロイã™ã‚‹ãŸã‚ã®ç°¡å˜ãªCloudFormationスタックをæä¾›ã—ã¾ã™ã€‚ã“ã®æ–¹æ³•ã¯ã€æ—¢å­˜ã®KMSキーãŠã‚ˆã³ClickHouse Cloudçµ±åˆã®ãŸã‚ã®æ–°ã—ã„KMSキーã®ä½œæˆã®ä¸¡æ–¹ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +##### 既存ã®KMSキーを使用 + +1. AWS アカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚ +2. [ã“ã®ãƒªãƒ³ã‚¯](https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/quickcreate?templateURL=https://s3.us-east-2.amazonaws.com/clickhouse-public-resources.clickhouse.cloud/cf-templates/cmek.yaml&stackName=ClickHouseBYOK¶m_KMSCreate=false¶m_ClickHouseRole=arn:aws:iam::576599896960:role/prod-kms-request-role)を訪å•ã—ã¦CloudFormation テンプレートを準備ã—ã¾ã™ã€‚ +3. 使用ã—ãŸã„KMSキーã®ARNを入力ã—ã¾ã™ï¼ˆã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚Šã€ã‚¹ãƒšãƒ¼ã‚¹ã‚’空ã‘ãªã„ã“ã¨ï¼‰ã€‚ +4. 「AWS CloudFormationãŒã‚«ã‚¹ã‚¿ãƒ åã§IAMリソースを作æˆã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã‚’èªè­˜ã—ã¦ã„ã¾ã™ã€‚ã€ã«åŒæ„ã—ã€__スタックを作æˆ__をクリックã—ã¾ã™ã€‚ +5. 次ã®ã‚¹ãƒ†ãƒƒãƒ—ã§å¿…è¦ãªã‚¹ã‚¿ãƒƒã‚¯å‡ºåŠ›ã®`RoleArn`ã¨`KeyArn`を書ãç•™ã‚ã¾ã™ã€‚ + +##### æ–°ã—ã„KMSã‚­ãƒ¼ã‚’ä½œæˆ + +1. AWS アカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚ +2. [ã“ã®ãƒªãƒ³ã‚¯](https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/quickcreate?templateURL=https://s3.us-east-2.amazonaws.com/clickhouse-public-resources.clickhouse.cloud/cf-templates/cmek.yaml&stackName=ClickHouseBYOK¶m_KMSCreate=true¶m_ClickHouseRole=arn:aws:iam::576599896960:role/prod-kms-request-role)を訪å•ã—ã¦CloudFormation テンプレートを準備ã—ã¾ã™ã€‚ +3. 「AWS CloudFormationãŒã‚«ã‚¹ã‚¿ãƒ åã§IAMリソースを作æˆã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã‚’èªè­˜ã—ã¦ã„ã¾ã™ã€‚ã€ã«åŒæ„ã—ã€__スタックを作æˆ__をクリックã—ã¾ã™ã€‚ +4. 次ã®ã‚¹ãƒ†ãƒƒãƒ—ã§å¿…è¦ãªã‚¹ã‚¿ãƒƒã‚¯å‡ºåŠ›ã®`KeyArn`を書ãç•™ã‚ã¾ã™ã€‚ + +#### オプション3. Terraformを通ã˜ã¦KMSã‚­ãƒ¼ã‚’ä½œæˆ + +キーをTerraformを使用ã—ã¦ãƒ‡ãƒ—ロイã—ãŸã„ユーザーå‘ã‘ã«ã€AWSプロãƒã‚¤ãƒ€ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯[ã“ã¡ã‚‰](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key)ã‚’ã”覧ãã ã•ã„。 + +## 手順2. ユーザー管ç†ã®æš—å·åŒ–キーを使用ã—ã¦ClickHouseサービスを開始 + +1. ClickHouse Cloudアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚ +2. サービス画é¢ã«ç§»å‹•ã—ã¾ã™ã€‚ +3. __æ–°ã—ã„サービス__ をクリックã—ã¾ã™ã€‚ +4. クラウドプロãƒã‚¤ãƒ€ãƒ¼ã€ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã‚’é¸æŠžã—ã€ã‚µãƒ¼ãƒ“スã«åå‰ã‚’付ã‘ã¾ã™ã€‚ +5. __æš—å·åŒ–キーã®è¨­å®š (CMEK)__をクリックã—ã¾ã™ã€‚例ã¯AWS KMSプロãƒã‚¤ãƒ€ãƒ¼ã‚’使用ã—ã¦ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ +6. ウィンドウã®å³å´ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«AWS ARNを貼り付ã‘ã¾ã™ã€‚ + + ![æš—å·åŒ–設定](@site/docs/ja/_snippets/images/cmek2.png) + +7. システムã¯æš—å·åŒ–キーãŒã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +8. AWS ARNボックスã®ä¸Šã«__有効__メッセージãŒè¡¨ç¤ºã•ã‚ŒãŸã‚‰__サービスを作æˆ__をクリックã—ã¾ã™ã€‚ +9. サービス画é¢ã®ã‚µãƒ¼ãƒ“スタイルã®å³ä¸Šéš…ã«ã‚­ãƒ¼ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•ã‚Œã€æš—å·åŒ–ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’知らã›ã¾ã™ã€‚ + + ![サービス暗å·åŒ–済ã¿](@site/docs/ja/_snippets/images/cmek3.png) + +## ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¾©å…ƒ + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã€é–¢é€£ã™ã‚‹ã‚µãƒ¼ãƒ“スã¨åŒã˜ã‚­ãƒ¼ã‚’使用ã—ã¦æš—å·åŒ–ã•ã‚Œã¾ã™ã€‚æš—å·åŒ–ã•ã‚ŒãŸãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を復元ã™ã‚‹ã“ã¨ã§ã€å…ƒã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¨åŒã˜KMSキーを使用ã™ã‚‹æš—å·åŒ–済ã¿ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒä½œæˆã•ã‚Œã¾ã™ã€‚KMSキーを回転ã•ã›ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚詳細ã«ã¤ã„ã¦ã¯[キーã®å›žè»¢](#key-rotation)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +æš—å·åŒ–済ã¿ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã€éžæš—å·åŒ–ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を復元ã—ã€æ–°ã—ã„サービスã®ãŸã‚ã«å¸Œæœ›ã™ã‚‹KMSキーを指定ã™ã‚‹ã“ã¨ã§ä½œæˆã§ãã¾ã™ã®ã§ã€[support](/docs/ja/cloud/support)ã«ã”連絡ãã ã•ã„。 + +## KMS キーãƒãƒ¼ãƒ©ãƒ¼ + +エンベロープ暗å·åŒ–を使用ã™ã‚‹å ´åˆã€æä¾›ã•ã‚ŒãŸKMSキーãŒä¾ç„¶ã¨ã—ã¦æœ‰åŠ¹ã§ã‚ã‚‹ã“ã¨ã‚’定期的ã«ç¢ºèªã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚KMSキーã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’10分ã”ã¨ã«ç¢ºèªã—ã¾ã™ã€‚アクセスãŒç„¡åŠ¹ã«ãªã£ãŸæ™‚点ã§ClickHouseサービスをåœæ­¢ã—ã¾ã™ã€‚サービスをå†é–‹ã™ã‚‹ã«ã¯ã€ã“ã®ã‚¬ã‚¤ãƒ‰ã®æ‰‹é †ã«å¾“ã£ã¦ã‚¢ã‚¯ã‚»ã‚¹ã‚’復活ã•ã›ã€ãã‚Œã‹ã‚‰ã‚µãƒ¼ãƒ“スを開始ã—ã¦ãã ã•ã„。 + +ã“ã®æ©Ÿèƒ½ã®æ€§è³ªä¸Šã€KMSキーãŒå‰Šé™¤ã•ã‚ŒãŸå¾Œã«ClickHouse Cloudサービスを復旧ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã“れを防ããŸã‚ã«ã€ã»ã¨ã‚“ã©ã®ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã¯ã‚­ãƒ¼ã‚’ã™ãã«å‰Šé™¤ã›ãšã€å‰Šé™¤ã‚’スケジュールã—ã¾ã™ã€‚プロãƒã‚¤ãƒ€ãƒ¼ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’確èªã™ã‚‹ã‹ã€ã“ã®ãƒ—ロセスã«ã¤ã„ã¦[support](/docs/ja/cloud/support)ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 + +## キーã®å›žè»¢ + +キー回転ã¯åŒã˜KMSプロãƒã‚¤ãƒ€ãƒ¼å†…ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯æ–°ã—ã„KMSキーを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿æš—å·åŒ–キーをå†æš—å·åŒ–ã—ã€ã“ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ClickHouseサービスã®ãƒ€ã‚¦ãƒ³ã‚¿ã‚¤ãƒ ãªã—ã§å³æ™‚ã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚ã“ã®æ“作を実行ã™ã‚‹ã«ã¯ã€è¨­å®šã•ã‚ŒãŸKMSキーã¨æ–°ã—ã„KMSキーã®ä¸¡æ–¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã“ã¨ã‚’確èªã—ã€KMSキー情報を添ãˆã¦[support](/docs/ja/cloud/support)ã«ã”連絡ãã ã•ã„。 + +## パフォーマンス + +本ページã§æŒ‡å®šã•ã‚Œã¦ã„るよã†ã«ã€ç§ãŸã¡ã¯ClickHouseã®çµ„ã¿è¾¼ã¿æ©Ÿèƒ½ã§ã‚ã‚‹[データ暗å·åŒ–用ã®ä»®æƒ³ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ æ©Ÿèƒ½](/docs/ja/operations/storing-data#encrypted-virtual-file-system)を利用ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’æš—å·åŒ–・ä¿è­·ã—ã¦ã„ã¾ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯`AES_256_CTR`ã§ã‚ã‚Šã€ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«å¿œã˜ã¦5-15%ã®ãƒ‘フォーマンス低下ãŒäºˆæƒ³ã•ã‚Œã¾ã™ï¼š + +![CMEKパフォーマンス低下](@site/docs/ja/_snippets/images/cmek-performance.png) diff --git a/docs/ja/cloud/security/common-access-management-queries.md b/docs/ja/cloud/security/common-access-management-queries.md new file mode 100644 index 00000000000..7dd01461b5c --- /dev/null +++ b/docs/ja/cloud/security/common-access-management-queries.md @@ -0,0 +1,68 @@ +--- +sidebar_label: "一般的ãªã‚¢ã‚¯ã‚»ã‚¹ç®¡ç†ã‚¯ã‚¨ãƒª" +title: "一般的ãªã‚¢ã‚¯ã‚»ã‚¹ç®¡ç†ã‚¯ã‚¨ãƒª" +slug: "/ja/cloud/security/common-access-management-queries" +--- + +import CommonUserRolesContent from '@site/docs/ja/_snippets/_users-and-roles-common.md'; + +# 一般的ãªã‚¢ã‚¯ã‚»ã‚¹ç®¡ç†ã‚¯ã‚¨ãƒª + +:::tip セルフマãƒãƒ¼ã‚¸ãƒ‰ +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€[SQLユーザーã¨ãƒ­ãƒ¼ãƒ«](/docs/ja/guides/sre/user-management/index.md)ã‚’ã”覧ãã ã•ã„。 +::: + +ã“ã®è¨˜äº‹ã§ã¯ã€SQLユーザーã¨ãƒ­ãƒ¼ãƒ«ã‚’定義ã—ã€ãれらã®ç‰¹æ¨©ã¨æ¨©é™ã‚’データベースã€ãƒ†ãƒ¼ãƒ–ルã€è¡Œã€ã‚«ãƒ©ãƒ ã«é©ç”¨ã™ã‚‹åŸºæœ¬çš„ãªæ–¹æ³•ã‚’示ã—ã¾ã™ã€‚ + +## 管ç†ãƒ¦ãƒ¼ã‚¶ãƒ¼ + +ClickHouse Cloudサービスã«ã¯ã€ã‚µãƒ¼ãƒ“ス作æˆæ™‚ã«ä½œæˆã•ã‚Œã‚‹`default`ã¨ã„ã†ç®¡ç†ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã„ã¾ã™ã€‚パスワードã¯ã‚µãƒ¼ãƒ“ス作æˆæ™‚ã«æä¾›ã•ã‚Œã€**Admin**ã®ãƒ­ãƒ¼ãƒ«ã‚’æŒã¤ClickHouse Cloudユーザーã«ã‚ˆã£ã¦ãƒªã‚»ãƒƒãƒˆã§ãã¾ã™ã€‚ + +ClickHouse Cloudサービスã«è¿½åŠ ã®SQLユーザーを追加ã™ã‚‹å ´åˆã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯SQLユーザーåã¨ãƒ‘スワードãŒå¿…è¦ã§ã™ã€‚管ç†ãƒ¬ãƒ™ãƒ«ã®ç‰¹æ¨©ã‚’付与ã—ãŸã„å ´åˆã¯ã€æ–°ã—ã„ユーザーã«`default_role`ロールを割り当ã¦ã¦ãã ã•ã„。例ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼`clickhouse_admin`を追加ã—ã¾ã™: + +```sql +CREATE USER IF NOT EXISTS clickhouse_admin +IDENTIFIED WITH sha256_password BY 'P!@ssword42!'; +``` + +```sql +GRANT default_role TO clickhouse_admin; +``` + +:::note +SQLコンソールを使用ã™ã‚‹å ´åˆã€SQLステートメントã¯`default`ユーザーã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã›ã‚“。代ã‚ã‚Šã«ã€`sql-console:${cloud_login_email}`ã¨ã„ã†åå‰ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã€`cloud_login_email`ã¯ã‚¯ã‚¨ãƒªã‚’ç¾åœ¨å®Ÿè¡Œã—ã¦ã„るユーザーã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã™ã€‚ + +ã“れらã®è‡ªå‹•ç”Ÿæˆã•ã‚ŒãŸSQLコンソールユーザーã«ã¯`default`ロールãŒä»˜ä¸Žã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +## パスワードãªã—èªè¨¼ + +SQLコンソールã«ã¯2ã¤ã®ãƒ­ãƒ¼ãƒ«ãŒåˆ©ç”¨å¯èƒ½ã§ã™: `sql_console_admin`ã¯`default_role`ã¨åŒã˜æ¨©é™ã‚’æŒã¡ã€`sql_console_read_only`ã¯èª­ã¿å–り専用ã®æ¨©é™ã‚’æŒã¡ã¾ã™ã€‚ + +管ç†ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`sql_console_admin`ロールãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã‚‹ãŸã‚ã€ä½•ã‚‚変更ã¯ã‚ã‚Šã¾ã›ã‚“。ãŸã ã—ã€`sql_console_read_only`ロールを使用ã™ã‚‹ã¨ã€ç®¡ç†è€…ã§ãªã„ユーザーã§ã‚‚読ã¿å–り専用ã¾ãŸã¯å®Œå…¨ãªã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’ä»»æ„ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚管ç†è€…ãŒã“ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®ãƒ­ãƒ¼ãƒ«ã¯`GRANT`ã¾ãŸã¯`REVOKE`コマンドを使用ã—ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹å›ºæœ‰ã®è¦ä»¶ã«åˆã‚ã›ã¦èª¿æ•´ã§ãã¾ã™ã€‚ã“れらã®ãƒ­ãƒ¼ãƒ«ã«å¯¾ã™ã‚‹å¤‰æ›´ã¯æ°¸ç¶šåŒ–ã•ã‚Œã¾ã™ã€‚ + +### 詳細ãªã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ + +ã“ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡æ©Ÿèƒ½ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ¬ãƒ™ãƒ«ã®è©³ç´°åº¦ã§æ‰‹å‹•ã§è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚æ–°ã—ã„`sql_console_*`ロールをユーザーã«å‰²ã‚Šå½“ã¦ã‚‹å‰ã«ã€`sql-console-role:`ã¨ã„ã†åå‰ç©ºé–“ã«ä¸€è‡´ã™ã‚‹SQLコンソールユーザー専用ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ­ãƒ¼ãƒ«ã‚’作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°: + +```sql +CREATE ROLE OR REPLACE sql-console-role:; +GRANT TO sql-console-role:; +``` + +一致ã™ã‚‹ãƒ­ãƒ¼ãƒ«ãŒæ¤œå‡ºã•ã‚Œã‚‹ã¨ã€ãƒ†ãƒ³ãƒ—レートロールã§ã¯ãªãã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚より複雑ãªã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã®è¨­å®šãŒå¯èƒ½ã¨ãªã‚Šã€ä¾‹ãˆã°`sql_console_sa_role`ã‚„`sql_console_pm_role`ã®ã‚ˆã†ãªãƒ­ãƒ¼ãƒ«ã‚’作æˆã—ã€ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ä»˜ä¸Žã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°: + +```sql +CREATE ROLE OR REPLACE sql_console_sa_role; +GRANT TO sql_console_sa_role; +CREATE ROLE OR REPLACE sql_console_pm_role; +GRANT TO sql_console_pm_role; +CREATE ROLE OR REPLACE `sql-console-role:christoph@clickhouse.com`; +CREATE ROLE OR REPLACE `sql-console-role:jake@clickhouse.com`; +CREATE ROLE OR REPLACE `sql-console-role:zach@clickhouse.com`; +GRANT sql_console_sa_role to `sql-console-role:christoph@clickhouse.com`; +GRANT sql_console_sa_role to `sql-console-role:jake@clickhouse.com`; +GRANT sql_console_pm_role to `sql-console-role:zach@clickhouse.com`; +``` + + diff --git a/docs/ja/cloud/security/compliance-overview.md b/docs/ja/cloud/security/compliance-overview.md new file mode 100644 index 00000000000..f8225c8e50b --- /dev/null +++ b/docs/ja/cloud/security/compliance-overview.md @@ -0,0 +1,55 @@ +--- +sidebar_label: セキュリティã¨ã‚³ãƒ³ãƒ—ライアンス +slug: /ja/cloud/security/security-and-compliance +title: セキュリティã¨ã‚³ãƒ³ãƒ—ライアンス +--- + +# セキュリティã¨ã‚³ãƒ³ãƒ—ライアンスレãƒãƒ¼ãƒˆ +ClickHouse Cloud ã¯å¸¸ã«ãŠå®¢æ§˜ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã¨ã‚³ãƒ³ãƒ—ライアンスã®ãƒ‹ãƒ¼ã‚ºã‚’評価ã—ã€è¿½åŠ ã®ãƒ¬ãƒãƒ¼ãƒˆãŒè¦æ±‚ã•ã‚Œã‚‹ãŸã³ã«ãƒ—ログラムを拡大ã—ã¦ã„ã¾ã™ã€‚詳ã—ã„情報やレãƒãƒ¼ãƒˆã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã«ã¤ã„ã¦ã¯ã€å½“社ã®[信頼センター](https://trust.clickhouse.com)ã‚’ã”覧ãã ã•ã„。 + +### SOC 2 タイプ II(2022å¹´ã‹ã‚‰ï¼‰ + +システムã¨çµ„ç¹”ã®ç®¡ç†ï¼ˆSOC)2 ã¯ã€çµ„ç¹”ã®ã‚·ã‚¹ãƒ†ãƒ ã«é©ç”¨ã•ã‚Œã‚‹ãƒˆãƒ©ã‚¹ãƒˆã‚µãƒ¼ãƒ“ス基準 (TSC) ã«å«ã¾ã‚Œã‚‹ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã€å¯ç”¨æ€§ã€æ©Ÿå¯†æ€§ã€å‡¦ç†ã®å®Œå…¨æ€§ã€ãŠã‚ˆã³ãƒ—ライãƒã‚·ãƒ¼ã®åŸºæº–ã«ç„¦ç‚¹ã‚’当ã¦ãŸãƒ¬ãƒãƒ¼ãƒˆã§ã‚ã‚Šã€ãŠå®¢æ§˜ï¼ˆä¾æ‹ ã™ã‚‹ç¬¬ä¸‰è€…)ã«ã“れらã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã«ã¤ã„ã¦ã®ä¿è¨¼ã‚’æä¾›ã™ã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚ClickHouse ã¯ã€ç‹¬ç«‹ã—ãŸå¤–部監査人ã¨å”力ã—ã€ClickHouse Cloud ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã€å¯ç”¨æ€§ã€æ©Ÿå¯†æ€§ã€ãŠã‚ˆã³å‡¦ç†ã®å®Œå…¨æ€§ã«é–¢ã™ã‚‹ç›£æŸ»ã‚’å°‘ãªãã¨ã‚‚å¹´ã«ä¸€åº¦å®Ÿæ–½ã—ã¦ã„ã¾ã™ã€‚ + +### ISO 27001(2023å¹´ã‹ã‚‰ï¼‰ + +国際標準化機構(ISO)27001 ã¯ã€æƒ…報セキュリティã®å›½éš›æ¨™æº–ã§ã™ã€‚ãã‚Œã¯ã€ãƒªã‚¹ã‚¯ã‚’管ç†ã—ã€ãƒãƒªã‚·ãƒ¼ã‚’作æˆãƒ»ä¼é”ã—ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’実装ã—ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒé–¢é€£æ€§ã‚’æŒã¡æœ‰åŠ¹ã§ã‚り続ã‘ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ãŸã‚ã®ãƒ—ロセスをå«ã‚€æƒ…報セキュリティマãƒã‚¸ãƒ¡ãƒ³ãƒˆã‚·ã‚¹ãƒ†ãƒ ï¼ˆISMS)ã®å®Ÿè£…ã‚’ä¼æ¥­ã«æ±‚ã‚ã¦ã„ã¾ã™ã€‚ClickHouse ã¯å†…部監査を実施ã—ã€èªè¨¼ç™ºè¡Œå¾Œ2å¹´é–“ã®ç›£æŸ»ãŠã‚ˆã³ä¸­é–“検査をå—ã‘ã‚‹ãŸã‚ã«ç‹¬ç«‹ã—ãŸå¤–部監査人ã¨å”力ã—ã¦ã„ã¾ã™ã€‚ + +### 米国 DPF(2024å¹´ã‹ã‚‰ï¼‰ + +米国データプライãƒã‚·ãƒ¼ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã¯ã€ç±³å›½ã‹ã‚‰æ¬§å·žé€£åˆ/欧州経済地域ã€è‹±å›½ã€ãŠã‚ˆã³ã‚¹ã‚¤ã‚¹ã¸ã®å€‹äººãƒ‡ãƒ¼ã‚¿è»¢é€ã®ãŸã‚ã®ä¿¡é ¼ã§ãるメカニズムを米国ã®çµ„ç¹”ã«æä¾›ã™ã‚‹ãŸã‚ã«é–‹ç™ºã•ã‚Œã¾ã—ãŸï¼ˆEUã€è‹±å›½ã€ã‚¹ã‚¤ã‚¹ã®æ³•å¾‹ã¨ä¸€è²«ã—ã¦ã„ã¾ã™ï¼‰ã€‚ClickHouse ã¯ã“ã®ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã«è‡ªå·±èªå®šã•ã‚Œã€[データプライãƒã‚·ãƒ¼ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ãƒªã‚¹ãƒˆ](https://dataprivacyframework.gov/list) ã«æŽ²è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### HIPAA(ベータ版) + +:::note +HIPAA 対応サービス㯠GCP ã®ãƒ™ãƒ¼ã‚¿ç‰ˆã§ã€**専用** サービスタイプã§ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚オンボーディングã«ã¯ãƒ“ジãƒã‚¹ã‚¢ã‚½ã‚·ã‚¨ã‚¤ãƒˆå¥‘約(BAA)ãŒå¿…è¦ã§ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯[サãƒãƒ¼ãƒˆ](https://clickhouse.com/support/program)ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 +::: + +1996å¹´ã®åŒ»ç™‚ä¿é™ºã®æºè¡Œæ€§ã¨è²¬ä»»ã«é–¢ã™ã‚‹æ³•å¾‹ï¼ˆHIPAA)ã¯ã€ä¿è­·ã•ã‚ŒãŸå¥åº·æƒ…報(PHI)ã®ç®¡ç†ã«ç„¦ç‚¹ã‚’当ã¦ãŸç±³å›½ã®ãƒ—ライãƒã‚·ãƒ¼æ³•ã§ã™ã€‚HIPAAã«ã¯ã€é›»å­çš„個人å¥åº·æƒ…報(ePHI)ã®ä¿è­·ã«ç„¦ç‚¹ã‚’当ã¦ãŸ[セキュリティルール](https://www.hhs.gov/hipaa/for-professionals/security/index.html)ãªã©ã®è¦æ±‚ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ClickHouse ã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚µãƒ¼ãƒ“スã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ ePHI ã®æ©Ÿå¯†æ€§ã€å®Œå…¨æ€§ãŠã‚ˆã³ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’ä¿è¨¼ã™ã‚‹ãŸã‚ã«ã€ç®¡ç†çš„ã€ç‰©ç†çš„ãŠã‚ˆã³æŠ€è¡“çš„ãªä¿è­·æŽªç½®ã‚’実施ã—ã¦ã„ã¾ã™ã€‚ç§ãŸã¡ã¯ã€2025å¹´åˆã‚ã«HIPAAã‚’SOC 2ã«è¿½åŠ ã—ã¦ã€ç§ãŸã¡ã®ã‚³ãƒ³ãƒ—ライアンスプログラムã®å¤–部ä¿è¨¼ã‚’æä¾›ã™ã‚‹äºˆå®šã§ã™ã€‚ + +ePHIをサービスã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ã‚’希望ã™ã‚‹ãŠå®¢æ§˜ã¯ã€è©²å½“ã™ã‚‹ã‚±ãƒ¼ã‚¹ã”ã¨ã«é©åˆ‡ãªã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’確èªã€é¸æŠžãŠã‚ˆã³å®Ÿè£…ã™ã‚‹ãŸã‚ã«ã€ç§ãŸã¡ã®[共有責任モデル](/docs/ja/cloud/security/shared-responsibility-model)を確èªã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +# プライãƒã‚·ãƒ¼ã‚³ãƒ³ãƒ—ライアンス + +上記ã®é …ç›®ã«åŠ ãˆã¦ã€ClickHouseã¯ä¸€èˆ¬ãƒ‡ãƒ¼ã‚¿ä¿è­·è¦å‰‡ï¼ˆGDPR)ã€ã‚«ãƒªãƒ•ã‚©ãƒ«ãƒ‹ã‚¢å·žæ¶ˆè²»è€…プライãƒã‚·ãƒ¼æ³•ï¼ˆCCPA)ãŠã‚ˆã³ãã®ä»–関連ã™ã‚‹ãƒ—ライãƒã‚·ãƒ¼ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã«å¯¾å¿œã™ã‚‹å†…部コンプライアンスプログラムを維æŒã—ã¦ã„ã¾ã™ã€‚ClickHouseãŒåŽé›†ã™ã‚‹å€‹äººãƒ‡ãƒ¼ã‚¿ã€ãã®ä½¿ç”¨æ–¹æ³•ã€ä¿è­·æ–¹æ³•ãŠã‚ˆã³ãã®ä»–プライãƒã‚·ãƒ¼é–¢é€£æƒ…å ±ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€ä»¥ä¸‹ã®å ´æ‰€ã§ç¢ºèªã§ãã¾ã™ã€‚ + +### 法的文書 + +- [プライãƒã‚·ãƒ¼ãƒãƒªã‚·ãƒ¼](https://clickhouse.com/legal/privacy-policy) +- [クッキーãƒãƒªã‚·ãƒ¼](https://clickhouse.com/legal/cookie-policy) +- [データプライãƒã‚·ãƒ¼ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯é€šçŸ¥](https://clickhouse.com/legal/data-privacy-framework) +- [データ処ç†è£œéº (DPA)](https://clickhouse.com/legal/agreements/data-processing-addendum) + +### 処ç†å ´æ‰€ + +- [サブプロセッサーã¨é–¢é€£ä¼šç¤¾](https://clickhouse.com/legal/agreements/subprocessors) +- [データ処ç†å ´æ‰€](https://trust.clickhouse.com) + +### 追加手続ã + +- [個人データアクセス](/docs/ja/cloud/security/personal-data-access) +- [アカウント削除](/docs/ja/cloud/manage/close_account) + +# 支払ã„コンプライアンス + +ClickHouseã¯ã€[PCI SAQ A v4.0](https://www.pcisecuritystandards.org/document_library/)ã«æº–æ‹ ã—ãŸã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰ã«ã‚ˆã‚‹å®‰å…¨ãªæ”¯æ‰•ã„方法をæä¾›ã—ã¾ã™ã€‚ diff --git a/docs/ja/cloud/security/gcp-private-service-connect.md b/docs/ja/cloud/security/gcp-private-service-connect.md new file mode 100644 index 00000000000..540a6d6b21a --- /dev/null +++ b/docs/ja/cloud/security/gcp-private-service-connect.md @@ -0,0 +1,488 @@ +--- +title: "GCP Private Service Connect" +description: "ã“ã®æ–‡æ›¸ã¯ã€Google Cloud Platform (GCP) ã® Private Service Connect (PSC) を使用ã—㦠ClickHouse Cloud ã«æŽ¥ç¶šã™ã‚‹æ–¹æ³•ã€ãŠã‚ˆã³ GCP PSC アドレス以外ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‹ã‚‰ ClickHouse Cloud サービスã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ ClickHouse Cloud IP アクセスリストを使用ã—ã¦ç„¡åŠ¹ã«ã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚" +sidebar_label: "GCP Private Service Connect" +slug: /ja/manage/security/gcp-private-service-connect +--- + +## Private Service Connect + +Private Service Connect (PSC) ã¯ã€Google Cloud ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æ©Ÿèƒ½ã§ã‚ã‚Šã€æ¶ˆè²»è€…ãŒè‡ªåˆ†ã®ä»®æƒ³ãƒ—ライベートクラウド (VPC) ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å†…ã§ç®¡ç†ã‚µãƒ¼ãƒ“スã«ãƒ—ライベートã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ã—ã¾ã™ã€‚åŒæ§˜ã«ã€ç®¡ç†ã‚µãƒ¼ãƒ“スã®æ供者ã¯ã€ã“れらã®ã‚µãƒ¼ãƒ“スを独自ã®åˆ¥ã® VPC ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«ãƒ›ã‚¹ãƒˆã—ã€æ¶ˆè²»è€…ã«ãƒ—ライベート接続をæä¾›ã§ãã¾ã™ã€‚ + +サービスæ供者ã¯ã€Private Service Connect サービスを作æˆã™ã‚‹ã“ã¨ã§ã€æ¶ˆè²»è€…ã«è‡ªåˆ†ã®ã‚¢ãƒ—リケーションを公開ã—ã¾ã™ã€‚サービス消費者ã¯ã€ã“れら㮠Private Service Connect タイプã®ã„ãšã‚Œã‹ã‚’通ã˜ã¦ã€ç›´æŽ¥ãã®ã‚µãƒ¼ãƒ“スã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ + +![Overview of PSC](@site/docs/ja/cloud/security/images/gcp-psc-overview.png) + +:::important +デフォルトã§ã¯ã€PSC 接続ãŒæ‰¿èªã•ã‚Œç¢ºç«‹ã•ã‚Œã¦ã„ã¦ã‚‚ã€ClickHouse サービス㯠Private Service 接続ã‹ã‚‰ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。インスタンスレベル㧠PSC ID を許å¯ãƒªã‚¹ãƒˆã«æ˜Žç¤ºçš„ã«è¿½åŠ ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚[ステップ](#add-endpoint-id-to-services-allow-list)を完了ã—ã¦ãã ã•ã„。 +::: + +:::note +GCP Private Service Connect 㯠ClickHouse Cloud Production サービスã§ã®ã¿æœ‰åŠ¹ã«ã§ãã¾ã™ã€‚ +::: + +リージョン間ã®æŽ¥ç¶šã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。æ供者ã¨æ¶ˆè²»è€…ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã¯åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。PSC レベルã§ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚¢ã‚¯ã‚»ã‚¹ã‚’有効ã«ã™ã‚Œã°ã€è‡ªåˆ†ã® VPC 内ã®ä»–ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã‹ã‚‰ã§ã‚‚接続ã§ãるよã†ã«ãªã‚Šã¾ã™ï¼ˆä»¥ä¸‹ã‚’å‚照)。 + +ã“ã®ãƒ—ロセスã¯ä»¥ä¸‹ã®4ã¤ã®ã‚¹ãƒ†ãƒƒãƒ—ã«åˆ†ã‹ã‚Œã¦ã„ã¾ã™ï¼š + +1. Private Service Connect用ã®GCPサービスアタッãƒãƒ¡ãƒ³ãƒˆã‚’å–å¾—ã—ã¾ã™ã€‚ +1. サービスエンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã—ã¾ã™ã€‚ +1. Endpoint ID ã‚’ ClickHouse Cloud 組織ã«è¿½åŠ ã—ã¾ã™ã€‚ +1. Endpoint ID をサービスã®è¨±å¯ãƒªã‚¹ãƒˆã«è¿½åŠ ã—ã¾ã™ã€‚ + +:::note +以下ã®ä¾‹ã§ã¯ã€æ¬¡ã®äº‹é …を使用ã—ã¾ã™ï¼š + - GCP リージョン: `us-central1` + - GCP プロジェクト (顧客ã®GCPプロジェクト): `my-gcp-project` + - 顧客ã®GCPプロジェクト内ã®GCPプライベートIPアドレス: `10.128.0.2` + - 顧客ã®GCPプロジェクト内ã®GCP VPC: `default` + +以下ã«ã€ClickHouse Cloud サービス内㧠Private Service Connect を設定ã™ã‚‹æ–¹æ³•ã‚’示ã™ã‚³ãƒ¼ãƒ‰ä¾‹ã‚’示ã—ã¾ã™ã€‚ +::: + +## ã¯ã˜ã‚ã« + +ClickHouse Cloud サービスã«é–¢ã™ã‚‹æƒ…報をå–å¾—ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ClickHouse Cloud コンソールã¾ãŸã¯ ClickHouse API を通ã˜ã¦ã“れを行ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouse API を使用ã™ã‚‹å ´åˆã€ä»¥ä¸‹ã®ç’°å¢ƒå¤‰æ•°ã‚’設定ã—ã¦ã‹ã‚‰é€²ã‚ã¦ãã ã•ã„: + +```bash +export REGION=us-central1 +export PROVIDER=gcp +export KEY_ID= +export KEY_SECRET= +export ORG_ID= +export INSTANCE_ID=$(curl --silent --user ${KEY_ID:?}:${KEY_SECRET:?} "https://api.clickhouse.cloud/v1/organizations/${ORG_ID:?}/services" | jq ".result[] | select (.region==\"${REGION:?}\" and .provider==\"${PROVIDER:?}\") | .id " -r | head -1) +``` +:::note + - 自身ã®Organization IDã¯ClickHouseコンソール (Organization -> Organization Details)ã‹ã‚‰å–å¾—å¯èƒ½ã§ã™ã€‚ + - [æ–°ã—ã„キーを作æˆ](https://clickhouse.com/docs/ja/cloud/manage/openapi)ã™ã‚‹ã‹ã€æ—¢å­˜ã®ã‚‚ã®ã‚’使用ã§ãã¾ã™ã€‚ +::: + +## GCP サービスアタッãƒãƒ¡ãƒ³ãƒˆã¨ Private Service Connect 用㮠DNS åã‚’å–å¾—ã™ã‚‹ + +### オプション 1: ClickHouse Cloud コンソール + +ClickHouse Cloud コンソールã§ã€Private Service Connect 経由ã§æŽ¥ç¶šã—ãŸã„サービスを開ãã€**設定** メニューを開ãã¾ã™ã€‚**プライベートエンドãƒã‚¤ãƒ³ãƒˆã‚’設定ã™ã‚‹** ボタンをクリックã—ã¾ã™ã€‚**サービスå** (`endpointServiceId`) 㨠**DNS å** (`privateDnsHostname`) をメモã—ã¦ãŠã„ã¦ãã ã•ã„。次ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ä½¿ç”¨ã—ã¾ã™ã€‚ + +![Private Endpoints](./images/gcp-privatelink-pe-create.png) + +### オプション 2: API + +:::note +ã“ã®ã‚¹ãƒ†ãƒƒãƒ—を実行ã™ã‚‹ãŸã‚ã«ã€å°‘ãªãã¨ã‚‚1ã¤ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒãƒªãƒ¼ã‚¸ãƒ§ãƒ³å†…ã§ãƒ‡ãƒ—ロイã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +GCP サービスアタッãƒãƒ¡ãƒ³ãƒˆã¨ Private Service Connect 用㮠DNS åã‚’å–å¾—ã—ã¾ã™ï¼š + +```bash +curl --silent --user ${KEY_ID:?}:${KEY_SECRET:?} "https://api.clickhouse.cloud/v1/organizations/${ORG_ID:?}/services/${INSTANCE_ID:?}/privateEndpointConfig" | jq .result +{ + "endpointServiceId": "projects/.../regions/us-central1/serviceAttachments/production-us-central1-clickhouse-cloud", + "privateDnsHostname": "xb164akwxw.us-central1.p.gcp.clickhouse.cloud" +} +``` + +`endpointServiceId` 㨠`privateDnsHostname` をメモã—ã¦ãŠã„ã¦ãã ã•ã„。次ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ä½¿ç”¨ã—ã¾ã™ã€‚ + +## サービスエンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã™ã‚‹ + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€ã‚µãƒ¼ãƒ“スエンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã—ã¾ã™ã€‚ + +### Private Service Connection ã®è¿½åŠ  + +ã¾ãšæœ€åˆã«ã€Private Service Connection を作æˆã—ã¾ã™ã€‚ + +#### オプション 1: Google Cloud コンソールを使用ã™ã‚‹ + +Google Cloud コンソールã§ã€**Network services -> Private Service Connect** ã«ç§»å‹•ã—ã¾ã™ã€‚ + +![Open PSC](@site/docs/ja/cloud/security/images/gcp-psc-open.png) + +**Connect Endpoint** ボタンをクリックã—ã¦ã€Private Service Connect 作æˆãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’é–‹ãã¾ã™ã€‚ + +- **Target**: **Published service** を使用ã—ã¦ãã ã•ã„ +- **Target service**: [Private Service Connect 用㮠GCP サービスアタッãƒãƒ¡ãƒ³ãƒˆå–å¾—](#obtain-gcp-service-attachment-for-private-service-connect) ステップ㮠**endpointServiceId** を使用ã—ã¦ãã ã•ã„。 +- **Endpoint name**: PSC ã® **Endpoint name** åを設定ã—ã¾ã™ã€‚ +- **Network/Subnetwork/IP address**: 接続ã«ä½¿ç”¨ã™ã‚‹ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’é¸æŠžã—ã¦ãã ã•ã„。Private Service Connect エンドãƒã‚¤ãƒ³ãƒˆã® IP アドレスを新è¦ä½œæˆã™ã‚‹ã‹æ—¢å­˜ã®ã‚‚ã®ã‚’使用ã—ã¾ã™ã€‚例ã§ã¯ã€åå‰ **your-ip-address** ã§IPアドレス `10.128.0.2` を事å‰ã«ä½œæˆã—ã¦å‰²ã‚Šå½“ã¦ã¦ã„ã¾ã™ã€‚ +- エンドãƒã‚¤ãƒ³ãƒˆã‚’ä»»æ„ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã‹ã‚‰åˆ©ç”¨å¯èƒ½ã«ã™ã‚‹ã«ã¯ã€**Enable global access** ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚’有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![Enable Global Access](@site/docs/ja/cloud/security/images/gcp-psc-enable-global-access.png) + +**ADD ENDPOINT** ボタンを使ã£ã¦ PSC エンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã—ã¾ã™ã€‚ + +接続ãŒæ‰¿èªã•ã‚Œã‚‹ã¨ã€**Status** 列㌠**Pending** ã‹ã‚‰ **Accepted** ã«å¤‰ã‚ã‚Šã¾ã™ã€‚ + +![Accepted](@site/docs/ja/cloud/security/images/gcp-psc-copy-connection-id.png) + +***PSC Connection ID*** をコピーã—ã¾ã™ã€‚ã“ã® ID を次ã®ã‚¹ãƒ†ãƒƒãƒ—㧠***Endpoint ID*** ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +#### オプション 2: Terraform を使用ã™ã‚‹ + +```json +provider "google" { + project = "my-gcp-project" + region = "us-central1" +} + +variable "region" { + type = string + default = "us-central1" +} + +variable "subnetwork" { + type = string + default = "https://www.googleapis.com/compute/v1/projects/my-gcp-project/regions/us-central1/subnetworks/default" +} + +variable "network" { + type = string + default = "https://www.googleapis.com/compute/v1/projects/my-gcp-project/global/networks/default" +} + +resource "google_compute_address" "psc_endpoint_ip" { + address = "10.128.0.2" + address_type = "INTERNAL" + name = "your-ip-address" + purpose = "GCE_ENDPOINT" + region = var.region + subnetwork = var.subnetwork +} + +resource "google_compute_forwarding_rule" "clickhouse_cloud_psc" { + ip_address = google_compute_address.psc_endpoint_ip.self_link + name = "ch-cloud-${var.region}" + network = var.network + region = var.region + load_balancing_scheme = "" + # service attachment + target = "https://www.googleapis.com/compute/v1/$TARGET" # 以下ã®ãƒŽãƒ¼ãƒˆã‚’å‚ç…§ +} + +output "psc_connection_id" { + value = google_compute_forwarding_rule.clickhouse_cloud_psc.psc_connection_id + description = "インスタンスレベルã§è¨±å¯ãƒªã‚¹ãƒˆã«GCP PSC接続IDを追加ã—ã¾ã™ã€‚" +} +``` + +:::note +TARGET - [Private Service Connect 用㮠GCP サービスアタッãƒãƒ¡ãƒ³ãƒˆå–å¾—](#obtain-gcp-service-attachment-for-private-service-connect) ステップã§ã® **endpointServiceId** を使用ã—ã¦ãã ã•ã„。 +::: + +## DNS ã®è¨­å®š + +Google Cloud コンソールを使用ã™ã‚‹ã‚‚ã®ã¨ `gcloud` CLI を使用ã™ã‚‹ã‚‚ã®ã®2ã¤ã®ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚ + +### オプション 1: Google Cloud コンソールを使用ã™ã‚‹ + +- **Supported regions** ã‹ã‚‰ãƒ—ライベート DNS ゾーンを作æˆã—ã¾ã™ã€‚ +- **Network services -> Cloud DNS** ã‚’é–‹ãã¾ã™ã€‚ +- **Create Zone** ã‚’é¸æŠžã—ã¾ã™ï¼š + +![Create Zone](@site/docs/ja/cloud/security/images/gcp-psc-create-zone.png) + +ゾーンタイプダイアログã§ä»¥ä¸‹ã‚’設定ã—ã¾ã™ï¼š + +- ゾーンタイプ: **Private** +- ゾーンå: é©åˆ‡ãªã‚¾ãƒ¼ãƒ³åを入力ã—ã¾ã™ã€‚ +- DNS å: **Supported regions** テーブル㮠**Private DNS domain** 列をリージョンã«åˆã‚ã›ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ +- ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯: ClickHouse Cloud ã« PSC を使ã£ã¦æŽ¥ç¶šã™ã‚‹äºˆå®šã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã« DNS ゾーンをアタッãƒã—ã¾ã™ã€‚ + +![Zone Type](@site/docs/ja/cloud/security/images/gcp-psc-zone-type.png) + +#### プライベート DNS ゾーンã§ã® DNS レコードã®ä½œæˆ + +[Private Service Connection ã®è¿½åŠ ](#adding-a-private-service-connection) ステップã§ä½œæˆã—㟠IP アドレスを指ã™ã‚ˆã†ã«è¨­å®šã—ã¾ã™ã€‚ + +![DNS Record](@site/docs/ja/cloud/security/images/gcp-psc-dns-record.png) + +### オプション 2: `gcloud` CLI を使用ã™ã‚‹ + +#### DNS ゾーンã®ä½œæˆ + +```bash +gcloud dns \ + --project=my-gcp-project \ + managed-zones create ch-cloud-us-central1 \ + --description="Private DNS zone for PSC" \ + --dns-name="us-central1.p.gcp.clickhouse.cloud." \ + --visibility="private" \ + --networks="https://www.googleapis.com/compute/v1/projects/my-gcp-project/global/networks/default" +``` + +#### DNS レコードã®ä½œæˆ + +```bash +gcloud dns \ + --project=my-gcp-project \ + record-sets create $DNS_RECORD \ + --zone="ch-cloud-us-central1" \ + --type="A" \ + --ttl="300" \ + --rrdatas="10.128.0.2" +``` +:::note +DNS_RECORD - [Private Service Connect 用㮠GCP サービスアタッãƒãƒ¡ãƒ³ãƒˆå–å¾—](#obtain-gcp-service-attachment-for-private-service-connect) ステップã§ã® **privateDnsHostname** を使用ã—ã¾ã™ã€‚ +::: + +### オプション 3: Terraform を使用ã™ã‚‹ + +```json +variable "ch_dns_record" { + type = string + default = "$DNS_NAME" # 以下ã®ãƒŽãƒ¼ãƒˆã‚’å‚ç…§ +} + +resource "google_dns_managed_zone" "clickhouse_cloud_private_service_connect" { + description = "Private DNS zone for accessing ClickHouse Cloud using Private Service Connect" + dns_name = "${var.region}.p.gcp.clickhouse.cloud." + force_destroy = false + name = "clickhouse-cloud-private-service-connect-${var.region}" + visibility = "private" +} + +resource "google_dns_record_set" "psc_dns_record" { + managed_zone = google_dns_managed_zone.clickhouse_cloud_private_service_connect.name + name = "${var.ch_dns_record}" + type = "A" + rrdatas = [google_compute_address.psc_endpoint_ip.address] +} +``` + +:::note +DNS_NAME - [Private Service Connect 用㮠GCP サービスアタッãƒãƒ¡ãƒ³ãƒˆå–å¾—](#obtain-gcp-service-attachment-for-private-service-connect) ステップã§ã® **privateDnsHostname** を使用ã—ã¾ã™ã€‚ +::: + +## DNS 設定ã®ç¢ºèª + +DNS_RECORD - [Private Service Connect 用㮠GCP サービスアタッãƒãƒ¡ãƒ³ãƒˆå–å¾—](#obtain-gcp-service-attachment-for-private-service-connect) ステップã§ã® **privateDnsHostname** を使用ã—ã¾ã™ã€‚ + +```bash +ping $DNS_RECORD +``` + +## Endpoint ID ã‚’ ClickHouse Cloud 組織ã«è¿½åŠ ã™ã‚‹ + +### オプション 1: ClickHouse Cloud コンソール + +組織ã«ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’追加ã™ã‚‹ã«ã¯ã€[サービスã®è¨±å¯ãƒªã‚¹ãƒˆã« Endpoint ID を追加](#add-endpoint-id-to-services-allow-list) ステップã«é€²ã¿ã¾ã™ã€‚ClickHouse Cloud コンソールを使用ã—ã¦è¨±å¯ãƒªã‚¹ãƒˆã« `PSC Connection ID` を追加ã™ã‚‹ã¨ã€çµ„ç¹”ã«ã‚‚自動的ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +エンドãƒã‚¤ãƒ³ãƒˆã‚’削除ã™ã‚‹ã«ã¯ã€**Organization details -> Private Endpoints** ã‚’é–‹ãã€å‰Šé™¤ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’削除ã—ã¾ã™ã€‚ + +![endpoints](./images/gcp-pe-remove-private-endpoint.png) + +### オプション 2: API + +コマンドを実行ã™ã‚‹å‰ã«æ¬¡ã®ç’°å¢ƒå¤‰æ•°ã‚’設定ã—ã¾ã™ï¼š + +`ENDPOINT_ID` ã‚’ã€[Private Service Connection ã®è¿½åŠ ](#adding-a-private-service-connection) ステップã§ã® **Endpoint ID** ã®å€¤ã«ç½®ãæ›ãˆã¾ã™ã€‚ + +エンドãƒã‚¤ãƒ³ãƒˆã‚’追加ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã‚’実行ã—ã¾ã™ï¼š + +```bash +cat <.p.gcp.clickhouse.cloud" +} +``` + +ã“ã®ä¾‹ã§ã¯ã€`xxxxxxx.yy-xxxxN.p.gcp.clickhouse.cloud` ホストåã¸ã®æŽ¥ç¶šãŒ Private Service Connect ã«ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚一方ã€`xxxxxxx.yy-xxxxN.gcp.clickhouse.cloud` ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆçµŒç”±ã§ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +## トラブルシューティング + +### DNS 設定ã®ãƒ†ã‚¹ãƒˆ + +DNS_NAME - [Private Service Connect 用㮠GCP サービスアタッãƒãƒ¡ãƒ³ãƒˆå–å¾—](#obtain-gcp-service-attachment-for-private-service-connect) ステップã§ã® **privateDnsHostname** を使用ã—ã¾ã™ã€‚ + +```bash +nslookup $DNS_NAME +``` + +```response +Non-authoritative answer: +... +Address: 10.128.0.2 +``` + +### Connection reset by peer + +- 最もå¯èƒ½æ€§ãŒé«˜ã„ã®ã¯ã€ã‚µãƒ¼ãƒ“ス許å¯ãƒªã‚¹ãƒˆã« Endpoint ID ãŒè¿½åŠ ã•ã‚Œã¦ã„ãªã„å ´åˆã§ã™ã€‚[サービスã®è¨±å¯ãƒªã‚¹ãƒˆã« Endpoint ID を追加](#add-endpoint-id-to-services-allow-list) ステップをå†ç¢ºèªã—ã¦ãã ã•ã„。 + +### 接続テスト + +PSCリンクを使用ã—ã¦æŽ¥ç¶šã™ã‚‹éš›ã«å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€`openssl` を使用ã—ã¦æŽ¥ç¶šã‚’テストã—ã¦ãã ã•ã„。Private Service Connect エンドãƒã‚¤ãƒ³ãƒˆã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãŒ `Accepted` ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„: + +OpenSSL ã¯æŽ¥ç¶šã§ãã‚‹ã¯ãšã§ã™ï¼ˆå‡ºåŠ›ã« CONNECTED ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼‰ã€‚`errno=104` ã¯äºˆæœŸã•ã‚ŒãŸã‚‚ã®ã§ã™ã€‚ + +DNS_NAME - [Private Service Connect 用㮠GCP サービスアタッãƒãƒ¡ãƒ³ãƒˆå–å¾—](#obtain-gcp-service-attachment-for-private-service-connect) ステップã§ã® **privateDnsHostname** を使用ã—ã¾ã™ã€‚ + +```bash +openssl s_client -connect ${DNS_NAME}:9440 +``` + +```response +# highlight-next-line +CONNECTED(00000003) +write:errno=104 +--- +no peer certificate available +--- +No client certificate CA names sent +--- +SSL handshake has read 0 bytes and written 335 bytes +Verification: OK +--- +New, (NONE), Cipher is (NONE) +Secure Renegotiation IS NOT supported +Compression: NONE +Expansion: NONE +No ALPN negotiated +Early data was not sent +Verify return code: 0 (ok) +``` + +### エンドãƒã‚¤ãƒ³ãƒˆãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã®ç¢ºèª + +#### REST API + +```bash +curl --silent --user ${KEY_ID:?}:${KEY_SECRET:?} -X GET -H "Content-Type: application/json" "https://api.clickhouse.cloud/v1/organizations/${ORG_ID:?}/services/${INSTANCE_ID:?}" | jq .result.privateEndpointIds +[ + "102600141743718403" +] +``` + +### リモートデータベースã¸ã®æŽ¥ç¶š + +MySQL](../../sql-reference/table-functions/mysql.md) ã¾ãŸã¯ [PostgreSQL](../../sql-reference/table-functions/postgresql.md) テーブル関数を使用ã—ã¦ã€ClickHouse Cloud ã‹ã‚‰GCPã«ãƒ›ã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã—よã†ã¨ã—ã¦ã„ã‚‹ã¨ã—ã¾ã™ã€‚GCP PSC ã¯ã“ã®æŽ¥ç¶šã‚’安全ã«æœ‰åŠ¹ã«ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。PSC ã¯ä¸€æ–¹å‘ã§ã€å˜æ–¹å‘接続ã§ã™ã€‚内部ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚„GCP VPC㌠ClickHouse Cloud ã«å®‰å…¨ã«æŽ¥ç¶šã§ãるよã†ã«ã—ã¾ã™ãŒã€ClickHouse Cloud ã‹ã‚‰å†…部ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +[GCP Private Service Connect ドキュメント](https://cloud.google.com/vpc/docs/private-service-connect) ã«ã‚ˆã‚‹ã¨ï¼š + +> サービス指å‘ã®è¨­è¨ˆ: プロデューサーサービスã¯ã€æ¶ˆè²»è€…VPCãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«å˜ä¸€ã® IP アドレスを公開ã™ã‚‹ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚µãƒ¼ã‚’通ã˜ã¦å…¬é–‹ã•ã‚Œã¾ã™ã€‚プロデューサーサービスã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ¶ˆè²»è€…トラフィックã¯å˜æ–¹å‘ã§ã‚ã‚Šã€ãƒ”アリングã•ã‚ŒãŸVPCãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å…¨ä½“ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã®ã§ã¯ãªãã€ã‚µãƒ¼ãƒ“スIPアドレスã®ã¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + +ã“ã®ãŸã‚ã«ã¯ã€ClickHouse Cloud ã‹ã‚‰å†…部/プライベートデータベースサービスã¸ã®æŽ¥ç¶šã‚’許å¯ã™ã‚‹ã‚ˆã†ã« GCP VPC ã®ãƒ•ã‚¡ã‚¤ã‚¢ã‚¦ã‚©ãƒ¼ãƒ«ãƒ«ãƒ¼ãƒ«ã‚’構æˆã—ã¦ãã ã•ã„。ClickHouse Cloud リージョンã®[デフォルトã®Egress IPアドレス](https://clickhouse.com/docs/ja/manage/security/cloud-endpoints-api)ã¨åˆ©ç”¨å¯èƒ½ãª[é™çš„ IP アドレス](https://api.clickhouse.cloud/static-ips.json)を確èªã—ã¦ãã ã•ã„。 + +## 詳細情報 + +詳細ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€[cloud.google.com/vpc/docs/configure-private-service-connect-services](https://cloud.google.com/vpc/docs/configure-private-service-connect-services) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/cloud/security/images/activity_log1.png b/docs/ja/cloud/security/images/activity_log1.png new file mode 100644 index 00000000000..05790390b9f Binary files /dev/null and b/docs/ja/cloud/security/images/activity_log1.png differ diff --git a/docs/ja/cloud/security/images/activity_log2.png b/docs/ja/cloud/security/images/activity_log2.png new file mode 100644 index 00000000000..4e2f5479789 Binary files /dev/null and b/docs/ja/cloud/security/images/activity_log2.png differ diff --git a/docs/ja/cloud/security/images/activity_log3.png b/docs/ja/cloud/security/images/activity_log3.png new file mode 100644 index 00000000000..bbfe3212310 Binary files /dev/null and b/docs/ja/cloud/security/images/activity_log3.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-endpoint-settings.png b/docs/ja/cloud/security/images/aws-privatelink-endpoint-settings.png new file mode 100644 index 00000000000..71027ff2a18 Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-endpoint-settings.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-endpoints-menu.png b/docs/ja/cloud/security/images/aws-privatelink-endpoints-menu.png new file mode 100644 index 00000000000..52972f33106 Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-endpoints-menu.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-flow.excalidraw b/docs/ja/cloud/security/images/aws-privatelink-flow.excalidraw new file mode 100644 index 00000000000..7bc215e2013 --- /dev/null +++ b/docs/ja/cloud/security/images/aws-privatelink-flow.excalidraw @@ -0,0 +1,611 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 917, + "versionNonce": 94597768, + "isDeleted": false, + "id": "w3o5tB4I0DAoE2Z_8IKNs", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 676.5, + "y": 710.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 204, + "height": 394, + "seed": 1090013588, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "RGcUE81uoGG9Wjr69IRRM" + }, + { + "id": "XtxP2K6AUmA8yxdc-7ttT", + "type": "arrow" + } + ], + "updated": 1662904263610, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 300, + "versionNonce": 2031817484, + "isDeleted": false, + "id": "RGcUE81uoGG9Wjr69IRRM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 681.5, + "y": 888, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 194, + "height": 39, + "seed": 1493094828, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1662925920265, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Your VPC", + "baseline": 27, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "w3o5tB4I0DAoE2Z_8IKNs", + "originalText": "Your VPC" + }, + { + "type": "text", + "version": 576, + "versionNonce": 707762444, + "isDeleted": false, + "id": "6olbLzrgL1MA0e-Mk_Sno", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1004, + "y": 1156, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 154, + "height": 36, + "seed": 1581616747, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1662925936896, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "AWS Region", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "AWS Region" + }, + { + "type": "rectangle", + "version": 1132, + "versionNonce": 1757040120, + "isDeleted": false, + "id": "fTTGbxiaLOJbMhRhUsc4v", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 997.5, + "y": 835, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 215, + "height": 133, + "seed": 1345975444, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "IUs6Kr5j_CgrMHavwSWab" + }, + { + "id": "0IqXaCVB97fUCwQlxDYn8", + "type": "arrow" + }, + { + "id": "XtxP2K6AUmA8yxdc-7ttT", + "type": "arrow" + } + ], + "updated": 1662904088791, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 446, + "versionNonce": 1364438408, + "isDeleted": false, + "id": "IUs6Kr5j_CgrMHavwSWab", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1002.5, + "y": 862.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 205, + "height": 78, + "seed": 617182356, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1662904088791, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "AWS \nPrivateLink", + "baseline": 66, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "fTTGbxiaLOJbMhRhUsc4v", + "originalText": "AWS PrivateLink" + }, + { + "type": "text", + "version": 875, + "versionNonce": 1521914104, + "isDeleted": false, + "id": "DQhN188gSYbb8QNCNO-ur", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1300.5, + "y": 816, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 193, + "height": 180, + "seed": 1144070700, + "groupIds": [ + "WaWg_oFZTAxIjjhW8pi0O" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1662904130802, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Your \nClickHouse \nservice in \nClickHouse \nCloud", + "baseline": 169, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "RjSTnPTzFEcCQwfgRryLR", + "originalText": "Your ClickHouse service in ClickHouse Cloud" + }, + { + "type": "rectangle", + "version": 1363, + "versionNonce": 237698612, + "isDeleted": false, + "id": "RjSTnPTzFEcCQwfgRryLR", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1295.5, + "y": 709, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 203, + "height": 394, + "seed": 378158636, + "groupIds": [ + "WaWg_oFZTAxIjjhW8pi0O" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "DQhN188gSYbb8QNCNO-ur" + }, + { + "id": "0IqXaCVB97fUCwQlxDYn8", + "type": "arrow" + } + ], + "updated": 1662925686472, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 1147, + "versionNonce": 1732384904, + "isDeleted": false, + "id": "mHwVKgVtq-QNgT610tzXi", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1315.6291629162915, + "y": 1042, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1030718757, + "groupIds": [ + "WaWg_oFZTAxIjjhW8pi0O" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1662904130803, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "arrow", + "version": 1598, + "versionNonce": 1799010552, + "isDeleted": false, + "id": "XtxP2K6AUmA8yxdc-7ttT", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 995.217005038814, + "y": 905.5521202608265, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 109.21700503881402, + "height": 2.447879739173459, + "seed": 1006009620, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1662904263610, + "link": null, + "locked": false, + "startBinding": { + "elementId": "fTTGbxiaLOJbMhRhUsc4v", + "gap": 2.282994961186039, + "focus": -0.023096342081524727 + }, + "endBinding": { + "elementId": "w3o5tB4I0DAoE2Z_8IKNs", + "focus": 0.014599092234048315, + "gap": 5.5 + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -109.21700503881402, + 2.447879739173459 + ] + ] + }, + { + "type": "arrow", + "version": 2969, + "versionNonce": 937114764, + "isDeleted": false, + "id": "0IqXaCVB97fUCwQlxDYn8", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1293.6396361557422, + "y": 908.2894000233572, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 79.92502428359603, + "height": 1.031792461256714, + "seed": 2125579948, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1662925716768, + "link": null, + "locked": false, + "startBinding": { + "elementId": "RjSTnPTzFEcCQwfgRryLR", + "gap": 1.860363844257874, + "focus": -0.01860928002735619 + }, + "endBinding": { + "elementId": "fTTGbxiaLOJbMhRhUsc4v", + "gap": 1.2146118721461183, + "focus": 0.06413755642360305 + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -79.92502428359603, + -1.031792461256714 + ] + ] + }, + { + "id": "q6UyjPQniYUq_jNJ9B14G", + "type": "text", + "x": 1376, + "y": 1044, + "width": 108, + "height": 44, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 603208440, + "version": 214, + "versionNonce": 1400458488, + "isDeleted": false, + "boundElements": null, + "updated": 1662904232106, + "link": null, + "locked": false, + "text": "ClickHouse\nAWS account", + "fontSize": 16.923076923076845, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 37, + "containerId": null, + "originalText": "ClickHouse\nAWS account" + }, + { + "type": "text", + "version": 270, + "versionNonce": 1005124344, + "isDeleted": false, + "id": "qXU0J3uJIe9GR7ViB3lOm", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 770, + "y": 1045, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 77, + "height": 44, + "seed": 1102179976, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1662904298533, + "link": null, + "locked": false, + "fontSize": 16.923076923076845, + "fontFamily": 1, + "text": "Your AWS\naccount", + "baseline": 37, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "Your AWS\naccount" + }, + { + "type": "rectangle", + "version": 1281, + "versionNonce": 2136517388, + "isDeleted": false, + "id": "hHi2XvG7fY54sO6ehpQEh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 646.5, + "y": 657, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 893, + "height": 493, + "seed": 823428876, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "id": "XtxP2K6AUmA8yxdc-7ttT", + "type": "arrow" + } + ], + "updated": 1662925759113, + "link": null, + "locked": false + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": { + "6a7ab914e457c49e24cbce1b5454bd1d4dcce288": { + "mimeType": "image/svg+xml", + "id": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "dataURL": "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIyMjIiIHZpZXdCb3g9IjAgMCA5IDgiIHdpZHRoPSIyNTAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0wIDdoMXYxaC0xeiIgZmlsbD0iI2YwMCIvPjxwYXRoIGQ9Im0wIDBoMXY3aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDMuMjVoMXYxLjVoLTF6IiBmaWxsPSIjZmMwIi8+PC9zdmc+", + "created": 1648219958285 + } + } +} \ No newline at end of file diff --git a/docs/ja/cloud/security/images/aws-privatelink-flow.png b/docs/ja/cloud/security/images/aws-privatelink-flow.png new file mode 100644 index 00000000000..9abe122ed1e Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-flow.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-get-dns-names.png b/docs/ja/cloud/security/images/aws-privatelink-get-dns-names.png new file mode 100644 index 00000000000..4ff0798578d Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-get-dns-names.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-modify-dns-name.png b/docs/ja/cloud/security/images/aws-privatelink-modify-dns-name.png new file mode 100644 index 00000000000..6014e2429be Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-modify-dns-name.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-network-diagram.png b/docs/ja/cloud/security/images/aws-privatelink-network-diagram.png new file mode 100644 index 00000000000..59586558e87 Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-network-diagram.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-pe-create.png b/docs/ja/cloud/security/images/aws-privatelink-pe-create.png new file mode 100644 index 00000000000..eaca4de0c0a Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-pe-create.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-pe-dns-name.png b/docs/ja/cloud/security/images/aws-privatelink-pe-dns-name.png new file mode 100644 index 00000000000..abb84188886 Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-pe-dns-name.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-pe-filters.png b/docs/ja/cloud/security/images/aws-privatelink-pe-filters.png new file mode 100644 index 00000000000..c21b2e4b367 Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-pe-filters.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-select-vpc-and-subnets.png b/docs/ja/cloud/security/images/aws-privatelink-select-vpc-and-subnets.png new file mode 100644 index 00000000000..57c3efd6487 Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-select-vpc-and-subnets.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-subnets-tab.png b/docs/ja/cloud/security/images/aws-privatelink-subnets-tab.png new file mode 100644 index 00000000000..8c974031495 Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-subnets-tab.png differ diff --git a/docs/ja/cloud/security/images/aws-privatelink-vpc-endpoint-id.png b/docs/ja/cloud/security/images/aws-privatelink-vpc-endpoint-id.png new file mode 100644 index 00000000000..6da8aa8ad74 Binary files /dev/null and b/docs/ja/cloud/security/images/aws-privatelink-vpc-endpoint-id.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-create-basic.png b/docs/ja/cloud/security/images/azure-pe-create-basic.png new file mode 100644 index 00000000000..a7a0127452f Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-create-basic.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-create-dns.png b/docs/ja/cloud/security/images/azure-pe-create-dns.png new file mode 100644 index 00000000000..ca82906065c Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-create-dns.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-create-resource.png b/docs/ja/cloud/security/images/azure-pe-create-resource.png new file mode 100644 index 00000000000..b0f9104563d Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-create-resource.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-create-review.png b/docs/ja/cloud/security/images/azure-pe-create-review.png new file mode 100644 index 00000000000..ed744880b10 Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-create-review.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-create-tags.png b/docs/ja/cloud/security/images/azure-pe-create-tags.png new file mode 100644 index 00000000000..a99ee794a45 Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-create-tags.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-create-vnet.png b/docs/ja/cloud/security/images/azure-pe-create-vnet.png new file mode 100644 index 00000000000..fe81428f500 Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-create-vnet.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-ip.png b/docs/ja/cloud/security/images/azure-pe-ip.png new file mode 100644 index 00000000000..144a365eacd Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-ip.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-provate-ip.png b/docs/ja/cloud/security/images/azure-pe-provate-ip.png new file mode 100644 index 00000000000..6c69912ee97 Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-provate-ip.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-remove-private-endpoint.png b/docs/ja/cloud/security/images/azure-pe-remove-private-endpoint.png new file mode 100644 index 00000000000..71034d3e58b Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-remove-private-endpoint.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-resource-guid.png b/docs/ja/cloud/security/images/azure-pe-resource-guid.png new file mode 100644 index 00000000000..cd10a32bb8d Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-resource-guid.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-resource.png b/docs/ja/cloud/security/images/azure-pe-resource.png new file mode 100644 index 00000000000..324a312557a Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-resource.png differ diff --git a/docs/ja/cloud/security/images/azure-pe-view.png b/docs/ja/cloud/security/images/azure-pe-view.png new file mode 100644 index 00000000000..24738b814a5 Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe-view.png differ diff --git a/docs/ja/cloud/security/images/azure-pe.png b/docs/ja/cloud/security/images/azure-pe.png new file mode 100644 index 00000000000..3f4dedd14ae Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pe.png differ diff --git a/docs/ja/cloud/security/images/azure-pl-dns-wildcard.png b/docs/ja/cloud/security/images/azure-pl-dns-wildcard.png new file mode 100644 index 00000000000..c20d5904c17 Binary files /dev/null and b/docs/ja/cloud/security/images/azure-pl-dns-wildcard.png differ diff --git a/docs/ja/cloud/security/images/azure-private-link-center.png b/docs/ja/cloud/security/images/azure-private-link-center.png new file mode 100644 index 00000000000..580229a5723 Binary files /dev/null and b/docs/ja/cloud/security/images/azure-private-link-center.png differ diff --git a/docs/ja/cloud/security/images/azure-privatelink-pe-create.png b/docs/ja/cloud/security/images/azure-privatelink-pe-create.png new file mode 100644 index 00000000000..568da552c0d Binary files /dev/null and b/docs/ja/cloud/security/images/azure-privatelink-pe-create.png differ diff --git a/docs/ja/cloud/security/images/azure-privatelink-pe-dns.png b/docs/ja/cloud/security/images/azure-privatelink-pe-dns.png new file mode 100644 index 00000000000..89cecaf88ac Binary files /dev/null and b/docs/ja/cloud/security/images/azure-privatelink-pe-dns.png differ diff --git a/docs/ja/cloud/security/images/azure-privatelink-pe-filter.png b/docs/ja/cloud/security/images/azure-privatelink-pe-filter.png new file mode 100644 index 00000000000..3c26603f2ed Binary files /dev/null and b/docs/ja/cloud/security/images/azure-privatelink-pe-filter.png differ diff --git a/docs/ja/cloud/security/images/gcp-pe-remove-private-endpoint.png b/docs/ja/cloud/security/images/gcp-pe-remove-private-endpoint.png new file mode 100644 index 00000000000..47a55382cb4 Binary files /dev/null and b/docs/ja/cloud/security/images/gcp-pe-remove-private-endpoint.png differ diff --git a/docs/ja/cloud/security/images/gcp-privatelink-pe-create.png b/docs/ja/cloud/security/images/gcp-privatelink-pe-create.png new file mode 100644 index 00000000000..615d896ff35 Binary files /dev/null and b/docs/ja/cloud/security/images/gcp-privatelink-pe-create.png differ diff --git a/docs/ja/cloud/security/images/gcp-privatelink-pe-dns.png b/docs/ja/cloud/security/images/gcp-privatelink-pe-dns.png new file mode 100644 index 00000000000..4e708b94776 Binary files /dev/null and b/docs/ja/cloud/security/images/gcp-privatelink-pe-dns.png differ diff --git a/docs/ja/cloud/security/images/gcp-privatelink-pe-filters.png b/docs/ja/cloud/security/images/gcp-privatelink-pe-filters.png new file mode 100644 index 00000000000..5d2126c4eae Binary files /dev/null and b/docs/ja/cloud/security/images/gcp-privatelink-pe-filters.png differ diff --git a/docs/ja/cloud/security/images/gcp-psc-copy-connection-id.png b/docs/ja/cloud/security/images/gcp-psc-copy-connection-id.png new file mode 100644 index 00000000000..f6a781901ca Binary files /dev/null and b/docs/ja/cloud/security/images/gcp-psc-copy-connection-id.png differ diff --git a/docs/ja/cloud/security/images/gcp-psc-create-zone.png b/docs/ja/cloud/security/images/gcp-psc-create-zone.png new file mode 100644 index 00000000000..359c3efbdaa Binary files /dev/null and b/docs/ja/cloud/security/images/gcp-psc-create-zone.png differ diff --git a/docs/ja/cloud/security/images/gcp-psc-dns-record.png b/docs/ja/cloud/security/images/gcp-psc-dns-record.png new file mode 100644 index 00000000000..3a54090a43c Binary files /dev/null and b/docs/ja/cloud/security/images/gcp-psc-dns-record.png differ diff --git a/docs/ja/cloud/security/images/gcp-psc-enable-global-access.png b/docs/ja/cloud/security/images/gcp-psc-enable-global-access.png new file mode 100644 index 00000000000..6044304c50e Binary files /dev/null and b/docs/ja/cloud/security/images/gcp-psc-enable-global-access.png differ diff --git a/docs/ja/cloud/security/images/gcp-psc-open.png b/docs/ja/cloud/security/images/gcp-psc-open.png new file mode 100644 index 00000000000..f118fba4026 Binary files /dev/null and b/docs/ja/cloud/security/images/gcp-psc-open.png differ diff --git a/docs/ja/cloud/security/images/gcp-psc-overview.png b/docs/ja/cloud/security/images/gcp-psc-overview.png new file mode 100644 index 00000000000..f76fe31ef67 Binary files /dev/null and b/docs/ja/cloud/security/images/gcp-psc-overview.png differ diff --git a/docs/ja/cloud/security/images/gcp-psc-zone-type.png b/docs/ja/cloud/security/images/gcp-psc-zone-type.png new file mode 100644 index 00000000000..91ae67b0ee3 Binary files /dev/null and b/docs/ja/cloud/security/images/gcp-psc-zone-type.png differ diff --git a/docs/ja/cloud/security/images/ip-filter-add-single-ip.png b/docs/ja/cloud/security/images/ip-filter-add-single-ip.png new file mode 100644 index 00000000000..25317d64b88 Binary files /dev/null and b/docs/ja/cloud/security/images/ip-filter-add-single-ip.png differ diff --git a/docs/ja/cloud/security/images/ip-filtering-after-provisioning.png b/docs/ja/cloud/security/images/ip-filtering-after-provisioning.png new file mode 100644 index 00000000000..c1788532787 Binary files /dev/null and b/docs/ja/cloud/security/images/ip-filtering-after-provisioning.png differ diff --git a/docs/ja/cloud/security/images/pe-remove-private-endpoint.png b/docs/ja/cloud/security/images/pe-remove-private-endpoint.png new file mode 100644 index 00000000000..840561f4cb5 Binary files /dev/null and b/docs/ja/cloud/security/images/pe-remove-private-endpoint.png differ diff --git a/docs/ja/cloud/security/images/secures3.jpg b/docs/ja/cloud/security/images/secures3.jpg new file mode 100644 index 00000000000..55311413e44 Binary files /dev/null and b/docs/ja/cloud/security/images/secures3.jpg differ diff --git a/docs/ja/cloud/security/images/secures3_arn.jpg b/docs/ja/cloud/security/images/secures3_arn.jpg new file mode 100644 index 00000000000..13bdf7a2fd6 Binary files /dev/null and b/docs/ja/cloud/security/images/secures3_arn.jpg differ diff --git a/docs/ja/cloud/security/images/secures3_output.jpg b/docs/ja/cloud/security/images/secures3_output.jpg new file mode 100644 index 00000000000..329a041b963 Binary files /dev/null and b/docs/ja/cloud/security/images/secures3_output.jpg differ diff --git a/docs/ja/cloud/security/images/support-case-form.png b/docs/ja/cloud/security/images/support-case-form.png new file mode 100644 index 00000000000..7966f13b90d Binary files /dev/null and b/docs/ja/cloud/security/images/support-case-form.png differ diff --git a/docs/ja/cloud/security/personal-data-access.md b/docs/ja/cloud/security/personal-data-access.md new file mode 100644 index 00000000000..e26cf405647 --- /dev/null +++ b/docs/ja/cloud/security/personal-data-access.md @@ -0,0 +1,55 @@ +--- +sidebar_label: 個人データアクセス +slug: /ja/cloud/security/personal-data-access +title: 個人データアクセス +--- + +## ã¯ã˜ã‚ã« +登録ユーザーã§ã‚ã‚Œã°ã€ClickHouseを使用ã—ã¦ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã®å€‹äººãƒ‡ãƒ¼ã‚¿ã‚’表示ãŠã‚ˆã³ä¿®æ­£ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã¯ã€é€£çµ¡å…ˆæƒ…報やã€å½¹å‰²ã«å¿œã˜ã¦çµ„織内ã®ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®é€£çµ¡å…ˆæƒ…å ±ã€APIキーã®è©³ç´°æƒ…å ±ã€ãã®ä»–ã®æƒ…å ±ãŒå«ã¾ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã¯ClickHouseã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ï¼ˆUI)ã‹ã‚‰è‡ªå·±ç®¡ç†ã§è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**データ主体アクセスè¦æ±‚(DSAR)ã¨ã¯** +ã‚ãªãŸã®æ‰€åœ¨åœ°ã«ã‚ˆã£ã¦ã¯ã€é©ç”¨æ³•ã«ã‚ˆã‚ŠClickHouseãŒä¿æŒã™ã‚‹ã‚ãªãŸã®å€‹äººãƒ‡ãƒ¼ã‚¿ã«é–¢ã™ã‚‹è¿½åŠ ã®æ¨©åˆ©ï¼ˆãƒ‡ãƒ¼ã‚¿ä¸»ä½“ã®æ¨©åˆ©ï¼‰ãŒæä¾›ã•ã‚Œã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æ¨©åˆ©ã«ã¤ã„ã¦ã¯ã€ClickHouseã®ãƒ—ライãƒã‚·ãƒ¼ãƒãƒªã‚·ãƒ¼ã§èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™ã€‚データ主体ã®æ¨©åˆ©ã‚’行使ã™ã‚‹ãŸã‚ã®ãƒ—ロセスã¯ã€ãƒ‡ãƒ¼ã‚¿ä¸»ä½“アクセスè¦æ±‚(DSAR)ã¨ã—ã¦çŸ¥ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ + +**個人データã®ç¯„囲** +ClickHouseãŒåŽé›†ã™ã‚‹å€‹äººãƒ‡ãƒ¼ã‚¿ã®è©³ç´°ã‚„ãã®ä½¿ç”¨æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€ClickHouseã®ãƒ—ライãƒã‚·ãƒ¼ãƒãƒªã‚·ãƒ¼ã‚’ã”確èªãã ã•ã„。 + +## セルフサービス +デフォルトã§ã¯ã€ClickHouseã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè‡ªåˆ†ã®å€‹äººãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ï¼ˆUI)ã‹ã‚‰ç›´æŽ¥è¡¨ç¤ºã§ãるよã†ã«ã—ã¾ã™ã€‚ + +以下ã«ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’設定ã—サービスを使用ã™ã‚‹éš›ã«ClickHouseãŒåŽé›†ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®æ¦‚è¦ã¨ã€ç‰¹å®šã®å€‹äººãƒ‡ãƒ¼ã‚¿ã‚’ClickHouse UI内ã§è¡¨ç¤ºã§ãる場所を示ã—ã¾ã™ã€‚ + +| 場所/URL | 説明 | 個人データ | +|-------------|----------------|-----------------------------------------| +| https://auth.clickhouse.cloud/u/signup/ | アカウント登録 | メールã€ãƒ‘スワード | +| https://clickhouse.cloud/profile | 一般的ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロファイル詳細 | åå‰ã€ãƒ¡ãƒ¼ãƒ« | +| https://clickhouse.cloud/organizations/OrgID/members | 組織内ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒªã‚¹ãƒˆ | åå‰ã€ãƒ¡ãƒ¼ãƒ« | +| https://clickhouse.cloud/organizations/OrgID/keys | APIキーã®ãƒªã‚¹ãƒˆã¨ãれを作æˆã—ãŸäºº | メール | +| https://clickhouse.cloud/organizations/OrgID/activity | ユーザーã”ã¨ã®è¡Œå‹•ãƒ­ã‚° | メール | +| https://clickhouse.cloud/organizations/OrgID/admin/billing | 請求情報ã¨è«‹æ±‚書 | 請求先ä½æ‰€ã€ãƒ¡ãƒ¼ãƒ« | +| https://control-plane.clickhouse-dev.com/support | ClickHouseサãƒãƒ¼ãƒˆã¨ã®ã‚„ã‚Šå–ã‚Š | åå‰ã€ãƒ¡ãƒ¼ãƒ« | + +注æ„: `OrgID`ãŒå«ã¾ã‚Œã‚‹URLã¯ã€ã‚ãªãŸã®ç‰¹å®šã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«å¯¾å¿œã™ã‚‹OrgIDã«æ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### 既存ã®ãŠå®¢æ§˜ +ãŠå®¢æ§˜ãŒç§ãŸã¡ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’ãŠæŒã¡ã§ã€ä¸Šè¨˜ã®ã‚»ãƒ«ãƒ•ã‚µãƒ¼ãƒ“スオプションã§å€‹äººãƒ‡ãƒ¼ã‚¿ã®å•é¡ŒãŒè§£æ±ºã›ãšã€ãƒ—ライãƒã‚·ãƒ¼ãƒãƒªã‚·ãƒ¼ã«åŸºã¥ã„ã¦ãƒ‡ãƒ¼ã‚¿ä¸»ä½“アクセスè¦æ±‚ã‚’è¡Œã„ãŸã„å ´åˆã¯ã€ClickHouseアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã€[サãƒãƒ¼ãƒˆã‚±ãƒ¼ã‚¹ã‚’é–‹ã„ã¦](https://clickhouse.cloud/support)ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€ã‚ãªãŸã®èº«å…ƒã‚’確èªã—ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’完了ã™ã‚‹ãŸã‚ã®æ‰‹é †ã‚’減らã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã‚±ãƒ¼ã‚¹ã«ã¯ä»¥ä¸‹ã®è©³ç´°ã‚’å«ã‚ã¦ãã ã•ã„: + +| é …ç›® | リクエストã«å«ã‚るテキスト | +|-------------|---------------------------------------------------| +| 件å | データ主体アクセスè¦æ±‚(DSAR) | +| 説明 | ClickHouseã«æŽ¢ã—ã¦ã€åŽé›†ã—ã¦ã€ã¾ãŸã¯æä¾›ã—ã¦ã»ã—ã„情報ã®è©³ç´°ãªèª¬æ˜Žã€‚ | + +サãƒãƒ¼ãƒˆã‚±ãƒ¼ã‚¹ãƒ•ã‚©ãƒ¼ãƒ  + +### アカウントをãŠæŒã¡ã§ãªã„æ–¹ +アカウントをãŠæŒã¡ã§ãªãã€ä¸Šè¨˜ã®ã‚»ãƒ«ãƒ•ã‚µãƒ¼ãƒ“スオプションã§å€‹äººãƒ‡ãƒ¼ã‚¿ã®å•é¡ŒãŒè§£æ±ºã—ãªã„å ´åˆã¯ã€ãƒ—ライãƒã‚·ãƒ¼ãƒãƒªã‚·ãƒ¼ã«åŸºã¥ã„ã¦ãƒ‡ãƒ¼ã‚¿ä¸»ä½“アクセスè¦æ±‚ã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã€[privacy@clickhouse.com](mailto:privacy@clickhouse.com)ã«ãƒ¡ãƒ¼ãƒ«ã§æ出ã—ã¦ãã ã•ã„。 + +## èº«å…ƒç¢ºèª + +メール経由ã§ãƒ‡ãƒ¼ã‚¿ä¸»ä½“アクセスè¦æ±‚ã‚’æ出ã—ãŸå ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’処ç†ã—ã‚ãªãŸã®èº«å…ƒã‚’確èªã™ã‚‹ãŸã‚ã«ç‰¹å®šã®æƒ…報をãŠé¡˜ã„ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚é©ç”¨æ³•ã«ã‚ˆã‚Šã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’æ‹’å¦ã™ã‚‹ç¾©å‹™ãŒã‚ã£ãŸã‚Šã€è¨±å¯ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚リクエストを拒å¦ã™ã‚‹å ´åˆã¯ã€æ³•çš„ãªåˆ¶é™ã«å¾“ã„ãã®ç†ç”±ã‚’ãŠä¼ãˆã—ã¾ã™ã€‚ + +詳細ã«ã¤ã„ã¦ã¯ã€[ClickHouseプライãƒã‚·ãƒ¼ãƒãƒªã‚·ãƒ¼](https://clickhouse.com/legal/privacy-policy)ã‚’ã”確èªãã ã•ã„。 diff --git a/docs/ja/cloud/security/private-link-overview.md b/docs/ja/cloud/security/private-link-overview.md new file mode 100644 index 00000000000..cc4b2a835a7 --- /dev/null +++ b/docs/ja/cloud/security/private-link-overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: プライベートリンクã®æ¦‚è¦ +slug: /ja/cloud/security/private-link-overview +title: プライベートリンクã®æ¦‚è¦ +--- + +# プライベートリンクã®æ¦‚è¦ + +ClickHouse Cloud ã¯ã€ã‚ãªãŸã®ã‚¯ãƒ©ã‚¦ãƒ‰ä»®æƒ³ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«ã‚µãƒ¼ãƒ“スを接続ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚以下ã®ãƒ—ロãƒã‚¤ãƒ€ãƒ¼å‘ã‘ã®ã‚¬ã‚¤ãƒ‰ã‚’å‚ç…§ã—ã¦ãã ã•ã„: + +- [AWS プライベートリンク](/ja/cloud/security/aws-privatelink.md) +- [GCP プライベートサービスコãƒã‚¯ãƒˆ](/ja/cloud/security/gcp-private-service-connect.md) +- [Azure プライベートリンク](/ja/cloud/security/azure-privatelink.md) diff --git a/docs/ja/cloud/security/saml-sso-setup.md b/docs/ja/cloud/security/saml-sso-setup.md new file mode 100644 index 00000000000..069fb1766d9 --- /dev/null +++ b/docs/ja/cloud/security/saml-sso-setup.md @@ -0,0 +1,276 @@ +--- +sidebar_label: SAML SSO設定 +slug: /ja/cloud/security/saml-setup +title: SAML SSO設定 +description: ClickHouse Cloudã§ã®SAML SSOã®è¨­å®šæ–¹æ³• +--- + +# SAML SSO設定 + +:::note +SAML SSOã¯ãƒ—ライベートプレビュー中ã§ã™ã€‚利用å¯èƒ½ã‹ã©ã†ã‹ã€ãŠå•ã„åˆã‚ã›ã¯support@clickhouse.comã¾ã§ã”連絡ãã ã•ã„。 +::: + +ClickHouse Cloudã¯ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚¢ã‚µãƒ¼ã‚·ãƒ§ãƒ³ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—言語(SAML)を介ã—ãŸã‚·ãƒ³ã‚°ãƒ«ã‚µã‚¤ãƒ³ã‚ªãƒ³ï¼ˆSSO)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¢ã‚¤ãƒ‡ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ï¼ˆIdP)を使用ã—ã¦å®‰å…¨ã«ClickHouse Cloudã®çµ„ç¹”ã«ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã§ãã¾ã™ã€‚ + +ç¾åœ¨ã€ã‚µãƒ¼ãƒ“スプロãƒã‚¤ãƒ€ãƒ¼ä¸»å°Žã®SSOã€åˆ¥ã€…ã®æŽ¥ç¶šã‚’使用ã™ã‚‹è¤‡æ•°ã®çµ„ç¹”ã€ãŠã‚ˆã³ã‚¸ãƒ£ã‚¹ãƒˆã‚¤ãƒ³ã‚¿ã‚¤ãƒ ãƒ—ロビジョニングをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ドメイン間アイデンティティ管ç†ã‚·ã‚¹ãƒ†ãƒ ï¼ˆSCIM)や属性マッピングã¯ã¾ã ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。 + +## 始ã‚ã‚‹å‰ã« + +IdPã§ã®ç®¡ç†æ¨©é™ãŠã‚ˆã³ClickHouse Cloud組織ã§ã®**管ç†è€…**ロールãŒå¿…è¦ã§ã™ã€‚IdP内ã§ã®æŽ¥ç¶šè¨­å®šã®å¾Œã€ä»¥ä¸‹ã®æ‰‹é †ã§æ±‚ã‚られる情報を使用ã—ã¦ãƒ—ロセスを完了ã™ã‚‹ãŸã‚ã«ã”連絡ãã ã•ã„。 + +SAML接続ã«åŠ ãˆã€**組織ã¸ã®ç›´æŽ¥ãƒªãƒ³ã‚¯**を設定ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ­ã‚°ã‚¤ãƒ³ãƒ—ロセスãŒç°¡å˜ã«ãªã‚Šã¾ã™ã€‚å„IdPã§ã®è¨­å®šã¯ç•°ãªã‚‹ãŸã‚ã€ãŠä½¿ã„ã®IdPã«ã¤ã„ã¦ã®æƒ…報を以下ã§ãŠèª­ã¿ãã ã•ã„。 + +## IdPã®è¨­å®šæ–¹æ³• + +### å…¨ã¦ã®IdPs + +å…¨ã¦ã®è¨­å®šã«ã¯çµ„ç¹”IDãŒå¿…è¦ã§ã™ã€‚組織IDã‚’å–å¾—ã™ã‚‹ã«ã¯æ¬¡ã®æ‰‹é †ã‚’è¡Œã„ã¾ã™ï¼š +1. [ClickHouse Cloud](https://console.clickhouse.cloud)ã®çµ„ç¹”ã«ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã—ã¦ãã ã•ã„。 + + Organization ID + +3. 左下隅ã§ã€**組織**ã®ä¸‹ã«ã‚る組織åをクリックã—ã¾ã™ã€‚ + +4. ãƒãƒƒãƒ—アップメニューã§ã€**組織ã®è©³ç´°**ã‚’é¸æŠžã—ã¾ã™ã€‚ + +5. 下記ã§ä½¿ã†ãŸã‚ã®**組織ID**をメモã—ã¦ãŠã„ã¦ãã ã•ã„。 + +### Okta SAMLã®è¨­å®š + +å„ClickHouse組織ã«å¯¾ã—ã¦ã€Oktaã§2ã¤ã®ã‚¢ãƒ—リ統åˆã‚’設定ã—ã¾ã™ï¼š1ã¤ã®SAMLアプリã¨ã€ç›´æŽ¥ãƒªãƒ³ã‚¯ã‚’æ ¼ç´ã™ã‚‹ãŸã‚ã®ãƒ–ックマークã§ã™ã€‚ + +#### アクセスを管ç†ã™ã‚‹ãŸã‚ã®ã‚°ãƒ«ãƒ¼ãƒ—を作æˆï¼š + +1. **管ç†è€…**ã¨ã—ã¦Oktaインスタンスã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚ + +2. å·¦å´ã§**グループ**ã‚’é¸æŠžã—ã¾ã™ã€‚ + +3. **グループを追加**をクリックã—ã¾ã™ã€‚ + +4. グループã®åå‰ã¨èª¬æ˜Žã‚’入力ã—ã¾ã™ã€‚ã“ã®ã‚°ãƒ«ãƒ¼ãƒ—ã¯SAMLアプリã¨ãã®é–¢é€£ãƒ–ックマークアプリã®é–“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’一貫ã•ã›ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +5. **ä¿å­˜**をクリックã—ã¾ã™ã€‚ + +6. 作æˆã—ãŸã‚°ãƒ«ãƒ¼ãƒ—ã®åå‰ã‚’クリックã—ã¾ã™ã€‚ + +7. ã“ã®ClickHouse組織ã«ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ãŸã„ユーザーを割り当ã¦ã‚‹ãŸã‚ã«**人を割り当ã¦ã‚‹**をクリックã—ã¾ã™ã€‚ + +#### ユーザーãŒã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ã«ãƒ­ã‚°ã‚¤ãƒ³ã§ãるよã†ã«ãƒ–ックマークアプリを作æˆï¼š + +1. å·¦å´ã§**アプリケーション**ã‚’é¸æŠžã—ã€æ¬¡ã«**アプリケーション**ã®ã‚µãƒ–ヘディングをé¸æŠžã—ã¾ã™ã€‚ + +2. **アプリカタログを閲覧**をクリックã—ã¾ã™ã€‚ + +3. **ブックマークアプリ**を検索ã—ã¦é¸æŠžã—ã¾ã™ã€‚ + +4. **çµ±åˆã‚’追加**をクリックã—ã¾ã™ã€‚ + +5. アプリã®ãƒ©ãƒ™ãƒ«ã‚’é¸æŠžã—ã¾ã™ã€‚ + +6. URLã¨ã—ã¦`https://console.clickhouse.cloud?connection={organizationid}`を入力ã—ã¾ã™ã€‚ + +7. **割り当ã¦**タブã«ç§»å‹•ã—ã€ä¸Šè¨˜ã§ä½œæˆã—ãŸã‚°ãƒ«ãƒ¼ãƒ—を追加ã—ã¾ã™ã€‚ + +#### 接続をå¯èƒ½ã«ã™ã‚‹SAMLアプリを作æˆï¼š + +1. å·¦å´ã§**アプリケーション**ã‚’é¸æŠžã—ã€æ¬¡ã«**アプリケーション**ã®ã‚µãƒ–ヘディングをé¸æŠžã—ã¾ã™ã€‚ + +2. **アプリ統åˆã‚’作æˆ**をクリックã—ã¾ã™ã€‚ + +3. SAML 2.0ã‚’é¸æŠžã—ã€æ¬¡ã‚’クリックã—ã¾ã™ã€‚ + +4. アプリケーションã®åå‰ã‚’入力ã—ã€**アプリケーションアイコンをユーザーã«è¡¨ç¤ºã—ãªã„**ã®ãƒœãƒƒã‚¯ã‚¹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€æ¬¡ã‚’クリックã—ã¾ã™ã€‚ + +5. 以下ã®å€¤ã‚’使用ã—ã¦ã€SAML設定画é¢ã‚’入力ã—ã¾ã™ã€‚ + + | フィールド | 値 | + |-----------------|------------------------------------------| + | シングルサインオンURL | https://auth.clickhouse.cloud/login/callback?connection={organizationid} | + | オーディエンスURI (SPエンティティID) | urn:auth0:ch-production:{organizationid} | + | デフォルトリレーステート | 空白ã®ã¾ã¾ | + | Name IDフォーマット | 指定ãªã— | + | アプリケーションユーザーå | Email | + | アプリケーションユーザーåã®æ›´æ–° | 作æˆãŠã‚ˆã³æ›´æ–° | + +7. 以下ã®å±žæ€§ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’入力ã—ã¾ã™ã€‚ + + | フィールド | 値 | + |-----------------|------------| + | Name | email | + | Name format | Basic | + | Value | user.email | + +8. **次ã¸**をクリックã—ã¾ã™ã€‚ + +9. フィードãƒãƒƒã‚¯ç”»é¢ã§æ±‚ã‚られる情報を入力ã—ã€**完了**をクリックã—ã¾ã™ã€‚ + +10. **割り当ã¦**タブã«ç§»å‹•ã—ã€ä¸Šè¨˜ã§ä½œæˆã—ãŸã‚°ãƒ«ãƒ¼ãƒ—を追加ã—ã¾ã™ã€‚ + +11. æ–°ã—ã„アプリã®**サインオン**タブã§ã€**SAMLセットアップ手順を見る**ボタンをクリックã—ã¾ã™ã€‚ + + Okta SAML Setup Instructions + +13. 以下ã®3ã¤ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’集ã‚ã¦ã€ãƒ—ロセスを完了ã™ã‚‹ãŸã‚ã«[サãƒãƒ¼ãƒˆã‚±ãƒ¼ã‚¹ã‚’æ出](#submit-a-support-case)ã—ã¦ãã ã•ã„。 + - Identity Provider Single Sign-On URL + - Identity Provider Issuer + - X.509 Certificate + +### Google SAMLã®è¨­å®š + +å„組織ã”ã¨ã«1ã¤ã®SAMLアプリをGoogleã«è¨­å®šã—ã€è¤‡æ•°çµ„ç¹”SSOを使用ã™ã‚‹å ´åˆã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ç›´æŽ¥ãƒªãƒ³ã‚¯ï¼ˆ`https://console.clickhouse.cloud?connection={organizationId}`)をブックマークã¨ã—ã¦æä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +1. Google管ç†ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ï¼ˆadmin.google.com)ã«ç§»å‹•ã—ã¾ã™ã€‚ + + Google SAML App + +2. **アプリ**をクリックã—ã€å·¦å´ã§**ウェブã¨ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リ**ã‚’é¸æŠžã—ã¾ã™ã€‚ + +3. 上部メニューã‹ã‚‰**アプリを追加**をクリックã—ã€æ¬¡ã«**カスタムSAMLアプリを追加**ã‚’é¸æŠžã—ã¾ã™ã€‚ + +4. アプリã®åå‰ã‚’入力ã—ã€**続行**をクリックã—ã¾ã™ã€‚ + +5. 以下ã®2ã¤ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’集ã‚ã€æƒ…報をé€ä¿¡ã™ã‚‹ãŸã‚ã«[サãƒãƒ¼ãƒˆã‚±ãƒ¼ã‚¹ã‚’æ出](#submit-a-support-case)ã—ã¦ãã ã•ã„。注æ„:ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’コピーã™ã‚‹å‰ã«è¨­å®šã‚’完了ã—ãŸå ´åˆã¯ã€ã‚¢ãƒ—リã®ãƒ›ãƒ¼ãƒ ç”»é¢ã‹ã‚‰**メタデータをダウンロード**をクリックã—ã¦X.509証明書をå–å¾—ã—ã¦ãã ã•ã„。 + - SSO URL + - X.509 Certificate + +7. 以下ã®ACS URLã¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£IDを入力ã—ã¾ã™ã€‚ + + | フィールド | 値 | + |---------------|---------------------------------------------------------------| + | ACS URL | https://auth.clickhouse.cloud/login/callback?connection={organizationid} | + | エンティティID | urn:auth0:ch-production:{organizationid} | + +8. **ç½²å付ã応答**ã®ãƒœãƒƒã‚¯ã‚¹ã«ãƒã‚§ãƒƒã‚¯ã‚’入れã¾ã™ã€‚ + +9. Name IDフォーマットã¨ã—ã¦**EMAIL**ã‚’é¸æŠžã—ã€Name IDã‚’**基本情報 > プライマリメール**ã®ã¾ã¾ã«ã—ã¦ãŠãã¾ã™ã€‚ + +10. **続行**をクリックã—ã¾ã™ã€‚ + +11. 以下ã®å±žæ€§ãƒžãƒƒãƒ”ングを入力ã—ã¾ã™ï¼š + + | フィールド | 値 | + |-------------------|---------| + | 基本情報 | プライマリメール | + | アプリ属性 | email | + +13. **完了**をクリックã—ã¾ã™ã€‚ + +14. アプリを有効ã«ã™ã‚‹ã«ã¯**オフ**をクリックã—ã€è¨­å®šã‚’**全員ã«å¯¾ã—ã¦ã‚ªãƒ³**ã«å¤‰æ›´ã—ã¾ã™ã€‚å·¦å´ã®ã‚ªãƒ—ションをé¸æŠžã—ã¦ã€ã‚¢ã‚¯ã‚»ãƒ«åˆ¶é™ã‚’グループã¾ãŸã¯çµ„ç¹”å˜ä½ã¸ã¨è¡Œã†ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +### Azure (Microsoft) SAMLã®è¨­å®š + +Azure (Microsoft) SAMLã¯Azure Active Directory (AD)ã‚„Microsoft Entraã¨ã‚‚呼ã°ã‚Œã¾ã™ã€‚ + +組織ã”ã¨ã«åˆ¥ã€…ã®ã‚µã‚¤ãƒ³ã‚ªãƒ³URLを用æ„ã—ãŸã‚¢ãƒ—リケーション統åˆã‚’1ã¤ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã—ã¾ã™ã€‚ + +1. Microsoft Entra管ç†ã‚»ãƒ³ã‚¿ãƒ¼ã«ãƒ­ã‚°ã‚ªãƒ³ã—ã¾ã™ã€‚ + +2. å·¦å´ã§**アプリケーション > エンタープライズアプリケーション**ã«ç§»å‹•ã—ã¾ã™ã€‚ + +3. 上部メニューã§**æ–°ã—ã„アプリケーション**をクリックã—ã¾ã™ã€‚ + +4. 上部メニューã§**æ–°ã—ã„アプリケーションを作æˆ**をクリックã—ã¾ã™ã€‚ + +5. åå‰ã‚’入力ã—ã€**ギャラリーã«ãªã„ä»–ã®ã‚¢ãƒ—リケーションを統åˆã™ã‚‹ï¼ˆéžã‚®ãƒ£ãƒ©ãƒªãƒ¼ï¼‰**ã‚’é¸æŠžã—ã€**作æˆ**をクリックã—ã¾ã™ã€‚ + + Azure Non-Gallery App + +6. å·¦å´ã§**ユーザーã¨ã‚°ãƒ«ãƒ¼ãƒ—**をクリックã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’割り当ã¦ã¾ã™ã€‚ + +7. å·¦å´ã§**シングルサインオン**をクリックã—ã¾ã™ã€‚ + +8. **SAML**をクリックã—ã¾ã™ã€‚ + +9. 基本設定SAML構æˆç”»é¢ã‚’以下ã®è¨­å®šã§åŸ‹ã‚ã¾ã™ã€‚ + + | フィールド | 値 | + |-----------------------------|---------------------------------------------------------------| + | 識別å­ï¼ˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ID) | urn:auth0:ch-production:{organizationid} | + | 応答URL(アサーション消費サービスURL) | https://auth.clickhouse.cloud/login/callback?connection={organizationid} | + | サインオンURL | https://console.clickhouse.cloud?connection={organizationid} | + | リレーステート | 空白 | + | ログアウトURL | 空白 | + +11. 以下を属性ã¨ã‚¯ãƒ¬ãƒ¼ãƒ ã®ä¸‹ã«ï¼ˆA)を追加ã¾ãŸã¯ï¼ˆU)を更新: + + | クレームå | フォーマット | ソース属性 | + |------------------------------------------|---------------|------------------| + | (U) 一æ„ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è­˜åˆ¥å­ï¼ˆName ID) | メールアドレス | user.mail | + | (A) email | Basic | user.mail | + | (U) /identity/claims/name | çœç•¥ã•ã‚ŒãŸ | user.mail | + + Attributes and Claims + +12. 以下ã®2ã¤ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’åŽé›†ã—ã€[サãƒãƒ¼ãƒˆã‚±ãƒ¼ã‚¹ã‚’æ出](#submit-a-support-case)ã—ã¦ãƒ—ロセスを完了ã•ã›ã¦ãã ã•ã„: + - ログインURL + - 証明書(Base64) + +### サãƒãƒ¼ãƒˆã‚±ãƒ¼ã‚¹ã‚’æ出 + +1. ClickHouse Cloudコンソールã«æˆ»ã‚Šã¾ã™ã€‚ + +2. å·¦å´ã§**ヘルプ**ã‚’é¸æŠžã—ã€ã‚µãƒãƒ¼ãƒˆã‚µãƒ–メニューをé¸æŠžã—ã¾ã™ã€‚ + +3. **æ–°ã—ã„ケース**をクリックã—ã¾ã™ã€‚ + +4. 件åã«ã€ŒSAML SSO設定ã€ã¨å…¥åŠ›ã—ã¾ã™ã€‚ + +5. 説明欄ã«ã€ä¸Šè¨˜ã®æ‰‹é †ã‹ã‚‰é›†ã‚ãŸãƒªãƒ³ã‚¯ã‚’貼り付ã‘ã€è¨¼æ˜Žæ›¸ã‚’ãƒã‚±ãƒƒãƒˆã«æ·»ä»˜ã—ã¾ã™ã€‚ + +6. ã©ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ãŒã“ã®æŽ¥ç¶šã«è¨±å¯ã•ã‚Œã‚‹ã¹ãã‹ã‚‚ãŠçŸ¥ã‚‰ã›ãã ã•ã„(例:domain.comã€domain.aiãªã©ï¼‰ã€‚ + +7. æ–°ã—ã„ケースを作æˆã—ã¾ã™ã€‚ + +8. ClickHouse Cloud内ã§ã®è¨­å®šã‚’完了ã—ã€ãƒ†ã‚¹ãƒˆæº–å‚™ãŒæ•´ã£ãŸéš›ã«ãŠçŸ¥ã‚‰ã›ã—ã¾ã™ã€‚ + +9. å…ƒã®èªè¨¼æ–¹æ³•ã§ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã—ã€æ–°ã—ã„SSOアカウントã«ç®¡ç†è€…ロールを割り当ã¦ã¦ãã ã•ã„。 + - メール + パスワードアカウントã®å ´åˆã¯ã€`https://clickhouse.cloud/?with=email`を使用ã—ã¦ãã ã•ã„。 + - ソーシャルログインã®å ´åˆã¯ã€é©åˆ‡ãªãƒœã‚¿ãƒ³ï¼ˆ**Googleã§ç¶šè¡Œ**ã¾ãŸã¯**Microsoftã§ç¶šè¡Œ**)をクリックã—ã¦ãã ã•ã„。 + +## 動作方法 + +### サービスプロãƒã‚¤ãƒ€ãƒ¼ä¸»å°Žã®SSO + +ç§ãŸã¡ã¯ã‚µãƒ¼ãƒ“スプロãƒã‚¤ãƒ€ãƒ¼ä¸»å°Žã®SSOã®ã¿ã‚’利用ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ`https://console.clickhouse.cloud`ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã€ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’入力ã—ã¦IdPã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•ã‚Œã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚IdP経由ã§æ—¢ã«èªè¨¼ã•ã‚Œã¦ã„るユーザーã¯ã€ãƒ­ã‚°ã‚¤ãƒ³ãƒšãƒ¼ã‚¸ã§ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’入力ã›ãšã«ã€ç›´æŽ¥ãƒªãƒ³ã‚¯ã‚’使用ã—ã¦è‡ªå‹•çš„ã«çµ„ç¹”ã«ãƒ­ã‚°ã‚¤ãƒ³ã§ãã¾ã™ã€‚ + +### ユーザーロールã®å‰²ã‚Šå½“㦠+ +ユーザーã¯ã€IdPアプリケーションã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦åˆã‚ã¦ã€ClickHouse Cloudコンソールã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚組織内ã§å°‘ãªãã¨ã‚‚1人ã®SSOユーザーãŒç®¡ç†è€…ロールをæŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚å…ƒã®èªè¨¼æ–¹æ³•ã‚’使用ã—ã¦ã€SSOロールを更新ã™ã‚‹ã«ã¯ã‚½ãƒ¼ã‚·ãƒ£ãƒ«ãƒ­ã‚°ã‚¤ãƒ³ã¾ãŸã¯`https://clickhouse.cloud?with=email`を使用ã—ã¦ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ãã ã•ã„。 + +### SSOを利用ã—ãªã„ユーザーã®å‰Šé™¤ + +SSOユーザーを設定ã—ã€å°‘ãªãã¨ã‚‚1人ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ç®¡ç†è€…ロールを割り当ã¦ãŸå¾Œã€ç®¡ç†è€…ã¯ä»–ã®æ–¹æ³•ï¼ˆä¾‹ï¼šã‚½ãƒ¼ã‚·ãƒ£ãƒ«èªè¨¼ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ID + パスワード)を使用ã—ã¦ã„るユーザーを削除ã§ãã¾ã™ã€‚Googleèªè¨¼ã¯SSO設定後も機能ã—続ã‘ã¾ã™ã€‚ユーザーID + パスワードã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ãƒ¡ãƒ¼ãƒ«ãƒ‰ãƒ¡ã‚¤ãƒ³ã«åŸºã¥ã„ã¦SSOã¸è‡ªå‹•çš„ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•ã‚Œã¾ã™ãŒã€`https://clickhouse.cloud?with=email`を使用ã™ã‚‹ã¨ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã‚’回é¿ã§ãã¾ã™ã€‚ + +### ãƒ¦ãƒ¼ã‚¶ãƒ¼ç®¡ç† + +ClickHouse Cloudã¯ç¾åœ¨SSOã®ãŸã‚ã«SAMLを実装ã—ã¦ã„ã¾ã™ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ç®¡ç†ã®ãŸã‚ã®SCIMã¯ã¾ã å®Ÿè£…ã—ã¦ã„ã¾ã›ã‚“。ã¤ã¾ã‚Šã€SSOユーザーã¯ClickHouse Cloud組織ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ã€IdP内ã®ã‚¢ãƒ—リケーションã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ユーザーã¯ClickHouse Cloudã«ä¸€åº¦ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ã¨ã€çµ„織内ã®**ユーザー**エリアã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚IdPã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå‰Šé™¤ã•ã‚Œã‚‹ã¨ã€SSOを使用ã—ã¦ClickHouse Cloudã«ãƒ­ã‚°ã‚¤ãƒ³ã§ããªããªã‚Šã¾ã™ãŒã€SSOユーザーã¯ç®¡ç†è€…ãŒæ‰‹å‹•ã§å‰Šé™¤ã™ã‚‹ã¾ã§çµ„織内ã«è¡¨ç¤ºã•ã‚Œç¶šã‘ã¾ã™ã€‚ + +### マルãƒã‚ªãƒ¼ã‚¬ãƒŠã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³SSO + +ClickHouse Cloudã¯ã€å„組織ã«åˆ¥ã€…ã®æŽ¥ç¶šã‚’æä¾›ã™ã‚‹ã“ã¨ã§ã€è¤‡æ•°çµ„ç¹”ã®SSOをサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚å„組織ã«ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ã«ã¯ã€ç›´æŽ¥ãƒªãƒ³ã‚¯ï¼ˆ`https://console.clickhouse.cloud?connection={organizationid}`)を使用ã—ã¦ãã ã•ã„。別ã®çµ„ç¹”ã«ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹å‰ã«ä¸€åº¦ãƒ­ã‚°ã‚¢ã‚¦ãƒˆã™ã‚‹ã“ã¨ã‚’忘れãšã«ã—ã¦ãã ã•ã„。 + +## 追加情報 + +èªè¨¼ã®éš›ã«ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã¯æœ€å„ªå…ˆäº‹é …ã§ã™ã€‚ãã®ãŸã‚ã€SSOを実装ã™ã‚‹éš›ã«ã„ãã¤ã‹ã®æ±ºå®šã‚’è¡Œã„ã¾ã—ãŸã®ã§ãŠçŸ¥ã‚‰ã›ã—ã¾ã™ã€‚ + +- **サービスプロãƒã‚¤ãƒ€ãƒ¼ã«ã‚ˆã£ã¦é–‹å§‹ã•ã‚Œã‚‹èªè¨¼ãƒ•ãƒ­ãƒ¼ã®ã¿ã‚’処ç†ã—ã¾ã™ã€‚** ユーザーã¯ã€`https://console.clickhouse.cloud`ã«ç§»å‹•ã—ã¦ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’入力ã—ã€IdPã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ブックマークアプリケーションã¾ãŸã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’追加ã™ã‚‹æ‰‹é †ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒURLを覚ãˆã‚‹å¿…è¦ãŒãªã„よã†ã«ä¾¿å®œä¸Šæä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +- **IdP経由ã§ã‚¢ãƒ—リã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸå…¨ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯åŒã˜ãƒ¡ãƒ¼ãƒ«ãƒ‰ãƒ¡ã‚¤ãƒ³ã‚’æŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚** ClickHouseアカウントã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã„ベンダーã€å¥‘約者ã€ã¾ãŸã¯ã‚³ãƒ³ã‚µãƒ«ã‚¿ãƒ³ãƒˆãŒã„ã‚‹å ´åˆã€å½¼ã‚‰ã¯å¾“業員ã¨åŒã˜ãƒ‰ãƒ¡ã‚¤ãƒ³ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ï¼ˆä¾‹ï¼šuser@domain.com)をæŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +- **SSOã¨éžSSOアカウントを自動的ã«ãƒªãƒ³ã‚¯ã—ã¾ã›ã‚“。** åŒã˜ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’使用ã—ã¦ã„ã¦ã‚‚ã€ClickHouseユーザーリストã«è¤‡æ•°ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆãŒè¡¨ç¤ºã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/cloud/security/setting-ip-filters.md b/docs/ja/cloud/security/setting-ip-filters.md new file mode 100644 index 00000000000..6cd70f56485 --- /dev/null +++ b/docs/ja/cloud/security/setting-ip-filters.md @@ -0,0 +1,82 @@ +--- +sidebar_label: IPフィルタã®è¨­å®š +slug: /ja/cloud/security/setting-ip-filters +title: IPフィルタã®è¨­å®š +--- + +## IPフィルタã®è¨­å®š + +IPアクセスリストã¯ã€ClickHouseサービスã¸ã®ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’フィルタリングã—ã€ã©ã®é€ä¿¡å…ƒã‚¢ãƒ‰ãƒ¬ã‚¹ãŒClickHouseサービスã«æŽ¥ç¶šã‚’許å¯ã•ã‚Œã¦ã„ã‚‹ã‹ã‚’指定ã—ã¾ã™ã€‚リストã¯å„サービスã”ã¨ã«è¨­å®šå¯èƒ½ã§ã™ã€‚サービスã®å±•é–‹æ™‚ã€ã¾ãŸã¯ãã®å¾Œã«è¨­å®šã§ãã¾ã™ã€‚プロビジョニング中ã«IPアクセスリストを設定ã—ãªã„å ´åˆã‚„ã€æœ€åˆã®ãƒªã‚¹ãƒˆã‚’変更ã—ãŸã„å ´åˆã¯ã€ã‚µãƒ¼ãƒ“スをé¸æŠžã—ã€**Security** タブã§å¤‰æ›´ã§ãã¾ã™ã€‚ + +:::important +ClickHouse Cloudサービスã«å¯¾ã™ã‚‹IPアクセスリストã®ä½œæˆã‚’スキップã—ãŸå ´åˆã€ã‚µãƒ¼ãƒ“スã¸ã®ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã¯è¨±å¯ã•ã‚Œã¾ã›ã‚“。 +::: + +## 準備 + +開始ã™ã‚‹å‰ã«ã€ã‚¢ã‚¯ã‚»ã‚¹ãƒªã‚¹ãƒˆã«è¿½åŠ ã™ã¹ãIPアドレスã¾ãŸã¯ç¯„囲をåŽé›†ã—ã¾ã™ã€‚リモートワーカーã€ã‚ªãƒ³ã‚³ãƒ¼ãƒ«ã®å ´æ‰€ã€VPNãªã©ã‚’考慮ã«å…¥ã‚Œã¦ãã ã•ã„。IPアクセスリストã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã¯ã€å€‹ã€…ã®ä½æ‰€ã¨CIDR表記をå—ã‘付ã‘ã¾ã™ã€‚ + +クラスレスドメイン間ルーティング(CIDR)表記を使用ã™ã‚‹ã¨ã€å¾“æ¥ã®ã‚¯ãƒ©ã‚¹Aã€Bã€C(8ã€6ã€ã¾ãŸã¯24)サブãƒãƒƒãƒˆãƒžã‚¹ã‚¯ã‚µã‚¤ã‚ºã‚ˆã‚Šã‚‚å°ã•ã„IPアドレス範囲を指定ã§ãã¾ã™ã€‚[ARIN](https://account.arin.net/public/cidrCalculator) ãªã©ã®çµ„ç¹”ã¯CIDRé›»å“ã‚’æä¾›ã—ã¦ãŠã‚Šã€CIDR表記ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[クラスレスドメイン間ルーティング (CIDR)](https://www.rfc-editor.org/rfc/rfc4632.html) RFCã‚’ã”å‚ç…§ãã ã•ã„。 + +## IPアクセスリストã®ä½œæˆã¾ãŸã¯å¤‰æ›´ + +ClickHouse Cloudサービスリストã‹ã‚‰ã‚µãƒ¼ãƒ“スをé¸æŠžã—ã€**Settings** ã‚’é¸æŠžã—ã¾ã™ã€‚**Security** セクションã®ä¸‹ã«IPアクセスリストãŒã‚ã‚Šã¾ã™ã€‚テキストã«ã‚るリンクをクリックã—ã¾ã™: *ã“ã®ã‚µãƒ¼ãƒ“スã«æŽ¥ç¶šã§ãる場所* **(ã©ã“ã‹ã‚‰ã§ã‚‚ | 特定ã®x地点ã‹ã‚‰)** + +サイドãƒãƒ¼ãŒè¡¨ç¤ºã•ã‚Œã€ä»¥ä¸‹ã®ã‚ªãƒ—ションを設定ã§ãã¾ã™: + +- ã©ã“ã‹ã‚‰ã§ã‚‚サービスã«å¯¾ã™ã‚‹ç€ä¿¡ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’è¨±å¯ +- 特定ã®å ´æ‰€ã‹ã‚‰ã®ã‚µãƒ¼ãƒ“スã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’è¨±å¯ +- サービスã¸ã®ã™ã¹ã¦ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æ‹’å¦ + +ã“ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã¯ã€ã€ŒNY Office rangeã€ã¨ã—ã¦èª¬æ˜Žã•ã‚ŒãŸIPアドレスã®ç¯„囲ã‹ã‚‰ã®ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’許å¯ã™ã‚‹ã‚¢ã‚¯ã‚»ã‚¹ãƒªã‚¹ãƒˆã‚’示ã—ã¦ã„ã¾ã™: + + ![既存ã®ã‚¢ã‚¯ã‚»ã‚¹ãƒªã‚¹ãƒˆ](@site/docs/ja/cloud/security/images/ip-filtering-after-provisioning.png) + +### å¯èƒ½ãªæ“作 + +1. 追加ã®ã‚¨ãƒ³ãƒˆãƒªã‚’追加ã™ã‚‹ã«ã¯ã€**+ Add new IP** を使用 + + ã“ã®ä¾‹ã§ã¯ã€`London server` ã¨èª¬æ˜Žã•ã‚ŒãŸå˜ä¸€ã®IPアドレスを追加ã—ã¾ã™: + + ![アクセスリストã«å˜ä¸€ã®IPを追加](@site/docs/ja/cloud/security/images/ip-filter-add-single-ip.png) + +2. 既存ã®ã‚¨ãƒ³ãƒˆãƒªã‚’削除 + + クロス(x)をクリックã™ã‚‹ã¨ã‚¨ãƒ³ãƒˆãƒªãŒå‰Šé™¤ã•ã‚Œã¾ã™ + +3. 既存ã®ã‚¨ãƒ³ãƒˆãƒªã‚’編集 + + エントリを直接変更 + +4. **Anywhere** ã‹ã‚‰ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã™ã‚‹ã‚ˆã†ã«åˆ‡ã‚Šæ›¿ãˆã‚‹ + + ã“ã‚Œã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“ãŒã€è¨±å¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ClickHouse上ã«æ§‹ç¯‰ã•ã‚ŒãŸã‚¢ãƒ—リケーションを公開ã—ã€ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã®ClickHouse Cloudサービスã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’制é™ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +変更をå映ã•ã›ã‚‹ã«ã¯ã€**Save** をクリックã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## 検証 + +フィルタを作æˆã—ãŸã‚‰ã€ç¯„囲内ã‹ã‚‰ã®æŽ¥ç¶šã‚’確èªã—ã€è¨±å¯ã•ã‚ŒãŸç¯„囲外ã‹ã‚‰ã®æŽ¥ç¶šãŒæ‹’å¦ã•ã‚Œã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ç°¡å˜ãª `curl` コマンドを使用ã—ã¦ç¢ºèªã§ãã¾ã™: +```bash title="許å¯ãƒªã‚¹ãƒˆå¤–ã‹ã‚‰ã®æŽ¥ç¶šè©¦è¡ŒãŒæ‹’å¦ã•ã‚Œã‚‹" +curl https://.clickhouse.cloud:8443 +``` +```response +curl: (35) error:02FFF036:system library:func(4095):Connection reset by peer +``` +ã¾ãŸã¯ +```response +curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to HOSTNAME.clickhouse.cloud:8443 +``` + +```bash title="許å¯ãƒªã‚¹ãƒˆå†…ã‹ã‚‰ã®æŽ¥ç¶šè©¦è¡ŒãŒè¨±å¯ã•ã‚Œã‚‹" +curl https://.clickhouse.cloud:8443 +``` +```response +Ok. +``` + +## 制é™äº‹é … + +- ç¾åœ¨ã€IPアクセスリストã¯IPv4ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ + + diff --git a/docs/ja/cloud/security/shared-responsibility-model.md b/docs/ja/cloud/security/shared-responsibility-model.md new file mode 100644 index 00000000000..27b3c135f5b --- /dev/null +++ b/docs/ja/cloud/security/shared-responsibility-model.md @@ -0,0 +1,110 @@ +--- +sidebar_label: 共有責任モデル +slug: /ja/cloud/security/shared-responsibility-model +title: セキュリティ共有責任モデル +--- + +## サービスタイプ + +ClickHouse Cloud ã¯3ã¤ã®ã‚µãƒ¼ãƒ“スタイプをæä¾›ã—ã¦ã„ã¾ã™ã€‚詳細ã¯ã€[サービスタイプ](/docs/ja/cloud/manage/service-types)ページをã”覧ãã ã•ã„。 + +- 開発: å°è¦æ¨¡ãªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚„開発環境ã«æœ€é© +- 本番: 中è¦æ¨¡ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚„顧客å‘ã‘アプリケーションå‘ã‘ +- 専用: 厳ã—ã„レイテンシや分離è¦ä»¶ãŒã‚るアプリケーションå‘ã‘ + +## クラウドアーキテクãƒãƒ£ + +クラウドアーキテクãƒãƒ£ã¯ã€ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãƒ—レーンã¨ãƒ‡ãƒ¼ã‚¿ãƒ—レーンã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚コントロールプレーンã¯ã€çµ„ç¹”ã®ä½œæˆã€ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãƒ—レーン内ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ç®¡ç†ã€ã‚µãƒ¼ãƒ“ス管ç†ã€APIキー管ç†ã€ãŠã‚ˆã³è«‹æ±‚を担当ã—ã¦ã„ã¾ã™ã€‚データプレーンã¯ã€ã‚ªãƒ¼ã‚±ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã¨ç®¡ç†ã®ãŸã‚ã®ãƒ„ールを実行ã—ã€é¡§å®¢ã‚µãƒ¼ãƒ“スをåŽå®¹ã—ã¾ã™ã€‚詳細ã¯ã€[ClickHouse Cloudアーキテクãƒãƒ£](/docs/ja/cloud/reference/architecture)図をã”覧ãã ã•ã„。 + +## BYOCアーキテクãƒãƒ£ + +自身ã®ã‚¯ãƒ©ã‚¦ãƒ‰ï¼ˆBYOC:Bring Your Own Cloud)を使用ã™ã‚‹ã¨ã€é¡§å®¢ã¯è‡ªåˆ†ã®ã‚¯ãƒ©ã‚¦ãƒ‰ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§ãƒ‡ãƒ¼ã‚¿ãƒ—レーンを実行ã§ãã¾ã™ã€‚詳細ã¯ã€[BYOC(Bring Your Own Cloud)](/docs/ja/cloud/reference/byoc)ページをã”覧ãã ã•ã„。 + +## ClickHouse Cloudã®å…±æœ‰è²¬ä»»ãƒ¢ãƒ‡ãƒ« + +| コントロール | ClickHouse Cloud | 顧客 - クラウド | 顧客 - BYOC | +|-----------------------------------------------------------------------|-------------------|------------------|-----------------| +| 環境ã®åˆ†é›¢ã‚’維æŒã™ã‚‹ | âœ”ï¸ | | âœ”ï¸ | +| ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¨­å®šã‚’管ç†ã™ã‚‹ | âœ”ï¸ | âœ”ï¸ | âœ”ï¸ | +| ClickHouseシステムã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’安全ã«ç®¡ç†ã™ã‚‹ | âœ”ï¸ | | | +| コントロールプレーンãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®çµ„織ユーザーを安全ã«ç®¡ç† | | âœ”ï¸ | âœ”ï¸ | +| ユーザー管ç†ã¨ç›£æŸ» | âœ”ï¸ | âœ”ï¸ | âœ”ï¸ | +| データを転é€ä¸­ãŠã‚ˆã³ä¿ç®¡ä¸­ã«æš—å·åŒ–ã™ã‚‹ | âœ”ï¸ | | | +| 顧客管ç†ã®æš—å·åŒ–キーを安全ã«æ‰±ã† | | âœ”ï¸ | âœ”ï¸ | +| 冗長インフラストラクãƒãƒ£ã‚’æä¾›ã™ã‚‹ | âœ”ï¸ | | âœ”ï¸ | +| データã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— | âœ”ï¸ | | | +| ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—リカãƒãƒªæ©Ÿèƒ½ã‚’確èªã™ã‚‹ | âœ”ï¸ | | | +| データä¿æŒè¨­å®šã‚’実装ã™ã‚‹ | | âœ”ï¸ | âœ”ï¸ | +| セキュリティ構æˆç®¡ç† | âœ”ï¸ | | âœ”ï¸ | +| ソフトウェアãŠã‚ˆã³ã‚¤ãƒ³ãƒ•ãƒ©ã®è„†å¼±æ€§ä¿®æ­£ | âœ”ï¸ | | | +| ペãƒãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒ†ã‚¹ãƒˆã‚’実施ã™ã‚‹ | âœ”ï¸ | | | +| è„…å¨ã®æ¤œå‡ºã¨å¯¾å¿œ | âœ”ï¸ | | âœ”ï¸ | +| セキュリティインシデント対応 | âœ”ï¸ | | âœ”ï¸ | + +## ClickHouse Cloudã®è¨­å®šå¯èƒ½ãªã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£æ©Ÿèƒ½ + +
+ ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶š + + | 設定 | ステータス | クラウド | サービスレベル | + |------------------------------------------------------------------------------------------------------|-----------|-------------------|-------------------------| + | サービスã¸ã®æŽ¥ç¶šã‚’制é™ã™ã‚‹[IPフィルタ](/docs/ja/cloud/security/setting-ip-filters) | Available | AWS, GCP, Azure | All | + | サービスã¸ã®å®‰å…¨ãªæŽ¥ç¶šã®ãŸã‚ã®[プライベートリンク](/docs/ja/cloud/security/private-link-overview)| Available | AWS, GCP, Azure | Production or Dedicated | + +
+
+ ã‚¢ã‚¯ã‚»ã‚¹ç®¡ç† + + + | 設定 | ステータス | クラウド | サービスレベル | + |------------------------------------------------------------------------------------------------------|-----------|-------------------|-------------------------| + | コントロールプレーンã§ã®[標準ã®ãƒ­ãƒ¼ãƒ«ãƒ™ãƒ¼ã‚¹ã‚¢ã‚¯ã‚»ã‚¹](/docs/ja/cloud/security/cloud-access-management) | Available | AWS, GCP, Azure | All | + | [多è¦ç´ èªè¨¼ï¼ˆMFA)](/docs/ja/cloud/security/cloud-authentication#multi-factor-authhentication)利用å¯èƒ½ | Available | AWS, GCP, Azure | All | + | コントロールプレーンã¸ã®[SAMLシングルサインオン](/docs/ja/cloud/security/saml-setup)利用å¯èƒ½ | Preview | AWS, GCP, Azure | Qualified Customers | + | データベースã«ãŠã‘ã‚‹[詳細ãªãƒ­ãƒ¼ãƒ«ãƒ™ãƒ¼ã‚¹ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡](/docs/ja/cloud/security/cloud-access-management#database-roles) | Available | AWS, GCP, Azure | All | + +
+
+ データセキュリティ + + | 設定 | ステータス | クラウド | サービスレベル | + |------------------------------------------------------------------------------------------------------|-----------|-------------------|-------------------------| + | [クラウドプロãƒã‚¤ãƒ€ãƒ¼ã¨ãƒªãƒ¼ã‚¸ãƒ§ãƒ³](/docs/ja/cloud/reference/supported-regions)ã®é¸æŠž | Available | AWS, GCP, Azure | All | + | 制é™ä»˜ãã®[ç„¡æ–™ã®ãƒ‡ã‚¤ãƒªãƒ¼ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—](/docs/ja/cloud/manage/backups#default-backup-policy) | Available | AWS, GCP, Azure | All | + | [カスタムãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定](/docs/ja/cloud/manage/backups#configurable-backups)利用å¯èƒ½ | Available | GCP, AWS, Azure | Production or Dedicated | + | 顧客管ç†ã®æš—å·åŒ–キー(CMEK)ã«ã‚ˆã‚‹é€éŽçš„ãªãƒ‡ãƒ¼ã‚¿æš—å·åŒ–利用å¯èƒ½ | Available | AWS | Production or Dedicated | + | 手動キー管ç†ã«ã‚ˆã‚‹[フィールドレベル暗å·åŒ–](/docs/ja/sql-reference/functions/encryption-functions) | Availablle | GCP, AWS, Azure | All | + + +
+
+ データä¿æŒ + + | 設定 | ステータス | クラウド | サービスレベル | + |------------------------------------------------------------------------------------------------------|-----------|-------------------|-------------------------| + | [有効期é™(TTL)](/docs/ja/sql-reference/statements/alter/ttl)設定ã«ã‚ˆã‚‹ä¿æŒç®¡ç† | Available | AWS, GCP, Azure | All | + | 大é‡å‰Šé™¤ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®ãŸã‚ã®[ALTER TABLE DELETE](/docs/ja/sql-reference/statements/alter/delete) | Available | AWS, GCP, Azure | All | + | 測定ã•ã‚ŒãŸå‰Šé™¤æ´»å‹•ã®ãŸã‚ã®[軽é‡DELETE](/docs/ja/sql-reference/statements/delete) | Available | AWS, GCP, Azure | All | + +
+
+ 監査ã¨ãƒ­ã‚®ãƒ³ã‚° + + | 設定 | ステータス | クラウド | サービスレベル | + |------------------------------------------------------------------------------------------------------|-----------|-------------------|-------------------------| + | コントロールプレーン活動ã®ãŸã‚ã®[監査ログ](/docs/ja/cloud/security/audit-logging) | Available | AWS, GCP, Azure | All | + | データベース活動ã®ãŸã‚ã®[セッションログ](/docs/ja/operations/system-tables/session_log) | Available | AWS, GCP, Azure | All | + | データベース活動ã®ãŸã‚ã®[クエリログ](/docs/ja/operations/system-tables/query_log) | Available | AWS, GCP, Azure | All | + +
+ +## ClickHouse Cloudコンプライアンス + + | フレームワーク | ステータス | クラウド | サービスレベル | + |------------------------------------------------------------------------------------------------------|-----------|-------------------|-------------------------| + | ISO 27001コンプライアンス | Available | AWS, GCP, Azure | All | + | SOC 2 Type IIコンプライアンス | Available | AWS, GCP, Azure | All | + | GDPRãŠã‚ˆã³CCPAコンプライアンス | Available | AWS, GCP, Azure | All | + | HIPAAコンプライアンス | Beta | GCP, `AWSã¯é–“ã‚‚ãªã対応予定` | Dedicated | + + 対応ã—ã¦ã„るコンプライアンスフレームワークã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[セキュリティã¨ã‚³ãƒ³ãƒ—ライアンス](/docs/ja/cloud/security/security-and-compliance)ページをã”覧ãã ã•ã„。 diff --git a/docs/ja/cloud/support.md b/docs/ja/cloud/support.md new file mode 100644 index 00000000000..c119bce7c23 --- /dev/null +++ b/docs/ja/cloud/support.md @@ -0,0 +1,8 @@ +--- +sidebar_label: クラウドサãƒãƒ¼ãƒˆ +--- +# クラウドサãƒãƒ¼ãƒˆ + +import Content from '@site/docs/ja/about-us/support.md'; + + diff --git a/docs/ja/concepts/glossary.md b/docs/ja/concepts/glossary.md new file mode 100644 index 00000000000..929b45dc246 --- /dev/null +++ b/docs/ja/concepts/glossary.md @@ -0,0 +1,34 @@ +--- +sidebar_label: "用語集" +description: "ã“ã®ãƒšãƒ¼ã‚¸ã«ã¯ã€ClickHouseã«é–¢é€£ã™ã‚‹ä¸€èˆ¬çš„ã«ä½¿ç”¨ã•ã‚Œã‚‹ç”¨èªžã¨ãã®å®šç¾©ãŒæŽ²è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚" +--- + +# 用語集 + +## 完全性(Atomicity) + +完全性ã¯ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ï¼ˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹æ“作ã®ä¸€é€£ã®å‡¦ç†ï¼‰ãŒå˜ä¸€ã‹ã¤ä¸å¯åˆ†ã®å˜ä½ã¨ã—ã¦å‡¦ç†ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å†…ã®ã™ã¹ã¦ã®æ“作ãŒå®Ÿè¡Œã•ã‚Œã‚‹ã‹ã€ã‚‚ã—ãã¯å…¨ã実行ã•ã‚Œãªã„ã‹ã®ã©ã¡ã‚‰ã‹ã§ã™ã€‚例ãˆã°ã€ã‚る銀行å£åº§ã‹ã‚‰åˆ¥ã®å£åº§ã¸ã®é€é‡‘ã¯åŽŸå­ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®ä¸€ä¾‹ã§ã™ã€‚é€é‡‘ã®ã„ãšã‚Œã‹ã®ã‚¹ãƒ†ãƒƒãƒ—ãŒå¤±æ•—ã—ãŸå ´åˆã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã¯å¤±æ•—ã—ã€é€é‡‘å…ƒã®å£åº§ã«ãŠé‡‘ãŒæ®‹ã‚Šã¾ã™ã€‚完全性ã¯ã€é‡‘銭ãŒå¤±ã‚ã‚ŒãŸã‚Šã€ä½œã‚Šå‡ºã•ã‚ŒãŸã‚Šã—ãªã„ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ + +## クラスター + +データã®ä¿å­˜ã¨å‡¦ç†ã‚’å…±åŒã§è¡Œã†ãƒŽãƒ¼ãƒ‰ï¼ˆã‚µãƒ¼ãƒãƒ¼ï¼‰ã®é›†åˆã€‚ + +## CMEK + +顧客管ç†ã«ã‚ˆã‚‹æš—å·åŒ–キー(CMEK)を使用ã™ã‚‹ã¨ã€é¡§å®¢ã¯ã‚­ãƒ¼ç®¡ç†ã‚µãƒ¼ãƒ“ス(KMS)キーを使用ã—ã¦ClickHouseディスクデータキーを暗å·åŒ–ã—ã€ä¿å­˜ãƒ‡ãƒ¼ã‚¿ã‚’ä¿è­·ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## Dictionary + +Dictionaryã¯ã‚­ãƒ¼ã¨å€¤ã®ãƒšã‚¢ã®ãƒžãƒƒãƒ”ングã§ã€ã•ã¾ã–ã¾ãªç¨®é¡žã®å‚照リストã«ä¾¿åˆ©ã§ã™ã€‚クエリã§Dictionaryを効率的ã«ä½¿ç”¨ã™ã‚‹ãŸã‚ã®å¼·åŠ›ãªæ©Ÿèƒ½ã§ã‚ã‚Šã€å‚照テーブルã¨ã®`JOIN`を使用ã™ã‚‹ã‚ˆã‚Šã‚‚効率的ã§ã‚ã‚‹ã“ã¨ãŒå¤šã„ã§ã™ã€‚ + +## パーツ + +テーブルデータã®ä¸€éƒ¨ã‚’ディスクã«ä¿å­˜ã™ã‚‹ç‰©ç†ãƒ•ã‚¡ã‚¤ãƒ«ã§ã™ã€‚ã“ã‚Œã¯ã€ãƒ‘ーティションキーを使用ã—ã¦ä½œæˆã•ã‚Œã‚‹ã€ãƒ†ãƒ¼ãƒ–ルデータã®è«–ç†çš„ãªåˆ†å‰²ã§ã‚るパーティションã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ + +## レプリカ + +ClickHouseデータベースã«ä¿å­˜ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã‚³ãƒ”ーã§ã™ã€‚åŒä¸€ãƒ‡ãƒ¼ã‚¿ã®ãƒ¬ãƒ—リカã¯å†—長性ã¨ä¿¡é ¼æ€§ã®ãŸã‚ã«ä»»æ„ã®æ•°ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚レプリカã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’ç•°ãªã‚‹ã‚µãƒ¼ãƒãƒ¼é–“ã§åŒæœŸã•ã›ã‚‹ClickHouseã®ReplicatedMergeTreeテーブルエンジンã¨å…±ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## シャード + +データã®éƒ¨åˆ†é›†åˆã§ã™ã€‚ClickHouseã«ã¯å¿…ãšå°‘ãªãã¨ã‚‚1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ãŒã‚ã‚Šã¾ã™ã€‚データを複数ã®ã‚µãƒ¼ãƒãƒ¼ã«åˆ†å‰²ã—ãªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚データを複数ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§åˆ†å‰²ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€å˜ä¸€ã‚µãƒ¼ãƒãƒ¼ã®å®¹é‡ã‚’超ãˆã‚‹è² è·ã‚’分散ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ diff --git a/docs/ja/concepts/olap.md b/docs/ja/concepts/olap.md new file mode 100644 index 00000000000..3a71b40e282 --- /dev/null +++ b/docs/ja/concepts/olap.md @@ -0,0 +1,41 @@ +--- +sidebar_position: 2 +sidebar_label: OLAPã¨ã¯ä½•ã‹ï¼Ÿ +description: "OLAPã¯Online Analytical Processing(オンライン分æžå‡¦ç†ï¼‰ã®ç•¥ã§ã™ã€‚技術的ãŠã‚ˆã³ãƒ“ジãƒã‚¹çš„観点ã‹ã‚‰åºƒç¯„ã«ç†è§£ã§ãる用語ã§ã™ã€‚" +--- + +# OLAPã¨ã¯ä½•ã‹ï¼Ÿ + + + +[OLAP](https://en.wikipedia.org/wiki/Online_analytical_processing)ã¯ã€Online Analytical Processing(オンライン分æžå‡¦ç†ï¼‰ã®ç•¥ã§ã™ã€‚技術的ãŠã‚ˆã³ãƒ“ジãƒã‚¹çš„観点ã‹ã‚‰åºƒç¯„ã«ç†è§£ã§ãる用語ã§ã™ã€‚最高レベルã§ã¯ã€ã“ã®è¨€è‘‰ã‚’逆ã«èª­ã‚€ã“ã¨ãŒã§ãã¾ã™ï¼š + +Processing(処ç†ï¼‰ +: ã„ãã¤ã‹ã®ã‚½ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ãŒå‡¦ç†ã•ã‚Œâ€¦ + +Analytical(分æžï¼‰ +: …分æžãƒ¬ãƒãƒ¼ãƒˆã‚„洞察を生æˆã™ã‚‹ãŸã‚ã§ã‚り… + +Online(オンライン) +: …リアルタイムã§è¡Œã‚ã‚Œã¾ã™ã€‚ + +## ビジãƒã‚¹ã®è¦³ç‚¹ã‹ã‚‰è¦‹ãŸOLAP {#olap-from-the-business-perspective} + +è¿‘å¹´ã€ãƒ“ジãƒã‚¹ã®é–¢ä¿‚者ã¯ãƒ‡ãƒ¼ã‚¿ã®ä¾¡å€¤ã‚’èªè­˜ã—始ã‚ã¦ã„ã¾ã™ã€‚盲目的ã«æ„æ€æ±ºå®šã‚’è¡Œã†ä¼æ¥­ã¯ã€ç«¶äº‰ã«é…ã‚Œãªã„ã“ã¨ãŒå¤šã„ã®ã§ã™ã€‚æˆåŠŸã—ã¦ã„ã‚‹ä¼æ¥­ã®ãƒ‡ãƒ¼ã‚¿é§†å‹•åž‹ã‚¢ãƒ—ローãƒã¯ã€ãƒ“ジãƒã‚¹ä¸Šã®æ„æ€æ±ºå®šã«å°‘ã—ã§ã‚‚有用ã§ã‚ã‚‹å¯èƒ½æ€§ã®ã‚ã‚‹ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’åŽé›†ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ã“ã¨ã‚’強制ã—ã€å½¼ã‚‰ãŒã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’タイムリーã«åˆ†æžã™ã‚‹ãŸã‚ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ã“ã“ã§ã€OLAPデータベース管ç†ã‚·ã‚¹ãƒ†ãƒ ï¼ˆDBMS)ãŒç™»å ´ã—ã¾ã™ã€‚ + +ビジãƒã‚¹ã®è¦³ç‚¹ã‹ã‚‰è¨€ãˆã°ã€OLAPã¯ä¼æ¥­ãŒé‹ç”¨æ´»å‹•ã‚’継続的ã«è¨ˆç”»ã—ã€åˆ†æžã—ã€å ±å‘Šã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã€ã“ã‚Œã«ã‚ˆã‚ŠåŠ¹çŽ‡æ€§ã‚’最大化ã—ã€çµŒè²»ã‚’削減ã—ã€æœ€çµ‚çš„ã«å¸‚場シェアをç²å¾—ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ç¤¾å†…システムã§è¡Œã†ã“ã¨ã‚‚ã€Web/モãƒã‚¤ãƒ«åˆ†æžã‚µãƒ¼ãƒ“スã€CRMサービスãªã©ã®SaaSプロãƒã‚¤ãƒ€ãƒ¼ã«å¤–注ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚OLAPã¯ã€å¤šãã®BIアプリケーション(ビジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ï¼‰ã®åŸºç›¤æŠ€è¡“ã§ã™ã€‚ + +ClickHouseã¯ã€ç‰¹å®šã®ãƒ‰ãƒ¡ã‚¤ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚’分æžã™ã‚‹ãŸã‚ã®ã“れらã®SaaSソリューションã®ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã¨ã—ã¦éžå¸¸ã«é »ç¹ã«ä½¿ç”¨ã•ã‚Œã‚‹OLAPデータベース管ç†ã‚·ã‚¹ãƒ†ãƒ ã§ã™ã€‚ã—ã‹ã—ã€ä¾ç„¶ã¨ã—ã¦ä¸€éƒ¨ã®ä¼æ¥­ã¯ç¬¬ä¸‰è€…プロãƒã‚¤ãƒ€ãƒ¼ã¨ãƒ‡ãƒ¼ã‚¿ã‚’共有ã™ã‚‹ã“ã¨ã«æ¶ˆæ¥µçš„ã§ã‚ã‚Šã€ç¤¾å†…データウェアãƒã‚¦ã‚¹ã®ã‚·ãƒŠãƒªã‚ªã‚‚有効ã§ã™ã€‚ + +## 技術的観点ã‹ã‚‰è¦‹ãŸOLAP {#olap-from-the-technical-perspective} + +ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã¯ã€OLAP(Online **Analytical** Processing)ã¨OLTP(Online **Transactional** Processing)ã®2ã¤ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«åˆ†é¡žã§ãã¾ã™ã€‚å‰è€…ã¯ã€å„レãƒãƒ¼ãƒˆã‚’大é‡ã®å±¥æ­´ãƒ‡ãƒ¼ã‚¿ã«åŸºã¥ã„ã¦æ§‹ç¯‰ã—ã¾ã™ãŒã€ãれを頻ç¹ã«ã¯è¡Œã„ã¾ã›ã‚“。後者ã¯é€šå¸¸ã€ç¶™ç¶šçš„ã«ãƒ‡ãƒ¼ã‚¿ã®ç¾åœ¨ã®çŠ¶æ…‹ã‚’変更ã™ã‚‹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’処ç†ã—ã¾ã™ã€‚ + +実際ã«ã¯ã€OLAPã¨OLTPã¯äºŒé …カテゴリã¨ã—ã¦è¦‹ã‚‹ã®ã§ã¯ãªãã€ã‚¹ãƒšã‚¯ãƒˆãƒ«ã¨ã—ã¦è¦‹ã‚‹ã¹ãã§ã™ã€‚ã»ã¨ã‚“ã©ã®å®Ÿéš›ã®ã‚·ã‚¹ãƒ†ãƒ ã¯ã€ä¸»ã«ã“れらã®ã„ãšã‚Œã‹ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ãŒã€å対ã®ç¨®é¡žã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ãŒæœ›ã¾ã—ã„å ´åˆã«ä½•ã‚‰ã‹ã®è§£æ±ºç­–や回é¿ç­–ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ã“ã®çŠ¶æ³ã¯ã€å¤šãã®ä¼æ¥­ã«è¤‡æ•°ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚·ã‚¹ãƒ†ãƒ ã‚’çµ±åˆã—ã¦é‹ç”¨ã™ã‚‹ã“ã¨ã‚’余儀ãªãã—ã¾ã™ã€‚ã“ã‚Œã¯ãã‚Œã»ã©å¤§ã—ãŸå•é¡Œã§ã¯ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€å¤šãã®ã‚·ã‚¹ãƒ†ãƒ ã‚’æŒã¤ã“ã¨ã¯ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ã‚³ã‚¹ãƒˆã‚’増加ã•ã›ã‚‹ãŸã‚ã€è¿‘å¹´ã®ãƒˆãƒ¬ãƒ³ãƒ‰ã¯å˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã§ä¸¡æ–¹ã®ç¨®é¡žã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚’ç­‰ã—ã処ç†ã§ãã‚‹HTAP(**Hybrid Transactional/Analytical Processing**)ã«å‘ã‹ã£ã¦ã„ã¾ã™ã€‚ + +DBMSãŒç´”粋ãªOLAPã¾ãŸã¯ç´”粋ãªOLTPã¨ã—ã¦å§‹ã¾ã£ãŸã¨ã—ã¦ã‚‚ã€ç«¶äº‰ã«è¿½ã„ã¤ããŸã‚ã«HTAPã®æ–¹å‘ã«é€²ã¾ã–ã‚‹ã‚’å¾—ã¾ã›ã‚“。ClickHouseも例外ã§ã¯ã‚ã‚Šã¾ã›ã‚“。当åˆã¯[å¯èƒ½ãªé™ã‚Šé«˜é€ŸãªOLAPシステム](/ja/concepts/why-clickhouse-is-so-fast)ã¨ã—ã¦è¨­è¨ˆã•ã‚Œã¦ãŠã‚Šã€ä»Šã§ã‚‚本格的ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚µãƒãƒ¼ãƒˆã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€ãƒ‡ãƒ¼ã‚¿ã®ä¸€è²«ã—ãŸèª­ã¿å–ã‚Š/書ãè¾¼ã¿ã‚„æ›´æ–°/削除ã®ãŸã‚ã®å¤‰ç•°ã®ã‚ˆã†ãªæ©Ÿèƒ½ãŒè¿½åŠ ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +OLAPã¨OLTPシステムã®é–“ã®åŸºæœ¬çš„ãªãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +- 分æžãƒ¬ãƒãƒ¼ãƒˆã‚’効率的ã«æ§‹ç¯‰ã™ã‚‹ã«ã¯ã€ã‚«ãƒ©ãƒ ã‚’個別ã«èª­ã¿å–ã‚‹ã“ã¨ãŒé‡è¦ã§ã‚ã‚Šã€ãã®ãŸã‚ã€ã»ã¨ã‚“ã©ã®OLAPデータベースã¯[列指å‘](/knowledgebase/columnar-database)ã§ã™ã€‚ +- カラムを個別ã«ä¿å­˜ã™ã‚‹ã¨ã€è¡Œã®æ“作ã€ä¾‹ãˆã°ã‚¢ãƒšãƒ³ãƒ‰ã‚„インプレースã®ä¿®æ­£ã®ã‚³ã‚¹ãƒˆãŒã€ã‚«ãƒ©ãƒ ã®æ•°ï¼ˆç‰¹ã«ã‚·ã‚¹ãƒ†ãƒ ãŒã‚¤ãƒ™ãƒ³ãƒˆã®ã™ã¹ã¦ã®è©³ç´°ã‚’ã¡ã‚‡ã†ã©ä¸€å¿œåŽé›†ã—よã†ã¨ã™ã‚‹å ´åˆã¯éžå¸¸ã«å¤šããªã‚‹å¯èƒ½æ€§ãŒã‚る)ã«æ¯”例ã—ã¦å¢—加ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ã»ã¨ã‚“ã©ã®OLTPシステムã¯ã€è¡Œã”ã¨ã«ãƒ‡ãƒ¼ã‚¿ã‚’é…ç½®ã—ã¾ã™ã€‚ diff --git a/docs/ja/concepts/why-clickhouse-is-so-fast.md b/docs/ja/concepts/why-clickhouse-is-so-fast.md new file mode 100644 index 00000000000..530e3e609c4 --- /dev/null +++ b/docs/ja/concepts/why-clickhouse-is-so-fast.md @@ -0,0 +1,112 @@ +--- +sidebar_position: 1 +sidebar_label: ClickHouseã¯ãªãœé€Ÿã„ã®ã‹ï¼Ÿ +description: "高速ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã—ãŸã€‚クエリ実行ã®ãƒ‘フォーマンスã¯å¸¸ã«é–‹ç™ºãƒ—ロセスã§æœ€å„ªå…ˆã•ã‚Œã¦ã„ã¾ã—ãŸãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ•ãƒ¬ãƒ³ãƒ‰ãƒªãƒ¼ã•ã€ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã¨ã„ã£ãŸä»–ã®é‡è¦ãªç‰¹æ€§ã‚‚考慮ã•ã‚Œã€ClickHouseãŒç¾å®Ÿã®ãƒ—ロダクションシステムã¨ãªã‚‹ã“ã¨ãŒã§ãã¾ã—ãŸã€‚" +--- + +# ClickHouseã¯ãªãœé€Ÿã„ã®ã‹ï¼Ÿ {#why-clickhouse-is-so-fast} + +[データã®æŒ‡å‘性](/docs/ja/intro#row-oriented-vs-column-oriented-storage)ã®ä»–ã«ã‚‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‘フォーマンスã«ã¯å¤šãã®è¦å› ãŒå¯„与ã—ã¾ã™ã€‚ +ã“ã‚Œã‹ã‚‰ã€ClickHouseãŒç‰¹ã«ä»–ã®åˆ—指å‘データベースã¨æ¯”較ã—ã¦é€Ÿã„ç†ç”±ã‚’詳ã—ã説明ã—ã¾ã™ã€‚ + +アーキテクãƒãƒ£ã®è¦³ç‚¹ã‹ã‚‰è¦‹ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯å°‘ãªãã¨ã‚‚ストレージ層ã¨ã‚¯ã‚¨ãƒªå‡¦ç†å±¤ã‹ã‚‰æˆã‚Šç«‹ã£ã¦ã„ã¾ã™ã€‚ストレージ層ã¯ãƒ†ãƒ¼ãƒ–ルデータã®ä¿å­˜ã€èª­ã¿è¾¼ã¿ã€ç®¡ç†ã‚’担当ã—ã€ã‚¯ã‚¨ãƒªå‡¦ç†å±¤ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’è¡Œã„ã¾ã™ã€‚ClickHouseã¯ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨æ¯”較ã—ã¦ã€æŒ¿å…¥ã¨Selectクエリを極ã‚ã¦é«˜é€Ÿã«è¡Œã†ã“ã¨ã‚’å¯èƒ½ã«ã™ã‚‹ä¸¡å±¤ã®é©æ–°ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ + +## ストレージ層: åŒæ™‚挿入ã¯ç›¸äº’ã«åˆ†é›¢ã•ã‚Œã‚‹ + +ClickHouseã§ã¯ã€å„テーブルã¯è¤‡æ•°ã®ã€Œãƒ†ãƒ¼ãƒ–ルパーツã€ã‹ã‚‰æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚ユーザーãŒãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ãŸã³ã«ï¼ˆINSERT文)ã€ãƒ‘ートãŒä½œæˆã•ã‚Œã¾ã™ã€‚クエリã¯ã€ã‚¯ã‚¨ãƒªãŒé–‹å§‹ã•ã‚ŒãŸæ™‚点ã«å­˜åœ¨ã™ã‚‹ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルパーツã«å¯¾ã—ã¦å¸¸ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +パーツãŒå¤šããŸã¾ã‚Šã™ãŽãªã„よã†ã«ã™ã‚‹ãŸã‚ã«ã€ClickHouseã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§è¤‡æ•°ã®ï¼ˆå°ã•ãªï¼‰ãƒ‘ーツをå˜ä¸€ã®å¤§ããªãƒ‘ーツã«ç¶™ç¶šçš„ã«çµ„ã¿åˆã‚ã›ã‚‹çµåˆæ“作を実行ã—ã¾ã™ã€‚ + +ã“ã®ã‚¢ãƒ—ローãƒã«ã¯ã„ãã¤ã‹ã®åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ã€‚一方ã§ã€å€‹ã€…ã®æŒ¿å…¥ã¯ã€Œãƒ­ãƒ¼ã‚«ãƒ«ã€ã§ã‚ã‚Šã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ã€ã™ãªã‚ã¡ãƒ†ãƒ¼ãƒ–ル全体ã®ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚’æ›´æ–°ã™ã‚‹å¿…è¦ãŒãªã„ã¨ã„ã†ç‚¹ã§ã™ã€‚çµæžœã¨ã—ã¦ã€è¤‡æ•°ã®åŒæ™‚挿入ã¯ç›¸äº’ã®åŒæœŸã‚„既存ã®ãƒ†ãƒ¼ãƒ–ルデータã¨ã®åŒæœŸã‚’å¿…è¦ã¨ã›ãšã€ãƒ‡ã‚£ã‚¹ã‚¯I/Oã®é€Ÿåº¦ã§æŒ¿å…¥ã‚’è¡Œã†ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +## ストレージ層: åŒæ™‚挿入ãŠã‚ˆã³é¸æŠžã¯åˆ†é›¢ã•ã‚Œã‚‹ + +一方ã§ã€ãƒ‘ーツã®çµåˆã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¦‹ãˆãªã„ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作ã§ã‚ã‚Šã€åŒæ™‚é¸æŠžã‚¯ã‚¨ãƒªã«ã¯å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。実際ã€ã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã¯æŒ¿å…¥ã¨é¸æŠžã‚’éžå¸¸ã«åŠ¹æžœçš„ã«åˆ†é›¢ã—ã¦ãŠã‚Šã€å¤šãã®ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§æŽ¡ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## ストレージ層: çµåˆæ™‚ã®è¨ˆç®— + +ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã¯ç•°ãªã‚Šã€ClickHouseã¯çµåˆæ“作中ã«è¿½åŠ ã®ãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚‚実行ã§ãã¾ã™ã€‚ã“ã®ä¾‹ã«ã¯ä»¥ä¸‹ãŒå«ã¾ã‚Œã¾ã™ï¼š + +- **Replacing merges**ã«ã‚ˆã£ã¦ã€å…¥åŠ›ãƒ‘ーツã®è¡Œã®æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã¿ã‚’ä¿æŒã—ã€ä»–ã®ã™ã¹ã¦ã®è¡Œãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’破棄ã—ã¾ã™ã€‚Replacing mergesã¯çµåˆæ™‚ã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—æ“作ã¨è€ƒãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- **Aggregating merges**ã«ã‚ˆã£ã¦ã€å…¥åŠ›ãƒ‘ーツã®ä¸­é–“集計状態を新ã—ã„集計状態ã«çµåˆã—ã¾ã™ã€‚ã“ã‚Œã¯ã€å®Ÿéš›ã«ã¯ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«é›†è¨ˆã‚’実装ã™ã‚‹ã ã‘ã§ã™ã€‚ + +- **æœ‰åŠ¹æœŸé™ (TTL) ã®çµåˆ** ã«ã‚ˆã‚Šã€ç‰¹å®šã®æ™‚間ベースã®ãƒ«ãƒ¼ãƒ«ã«åŸºã¥ã„ã¦è¡Œã‚’圧縮ã€ç§»å‹•ã€ã¾ãŸã¯å‰Šé™¤ã—ã¾ã™ã€‚ + +ã“れらã®å¤‰æ›ã®ãƒã‚¤ãƒ³ãƒˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œæ™‚ã«ã‹ã‹ã‚‹ä½œæ¥­ï¼ˆè¨ˆç®—)をçµåˆæ™‚ã«ã‚·ãƒ•ãƒˆã™ã‚‹ã“ã¨ã§ã™ã€‚ã“ã‚ŒãŒé‡è¦ãªç†ç”±ã¯2ã¤ã‚ã‚Šã¾ã™ï¼š + +一方ã§ã¯ã€ã‚¯ã‚¨ãƒªãŒå¤‰æ›å¾Œã®ãƒ‡ãƒ¼ã‚¿ï¼ˆä¾‹ï¼šäº‹å‰é›†è¨ˆãƒ‡ãƒ¼ã‚¿ï¼‰ã‚’活用ã§ãã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ã‚¨ãƒªã¯åŠ‡çš„ã«é€Ÿããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚時ã«ã¯1000å€ä»¥ä¸Šé€Ÿããªã‚‹ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +ä»–æ–¹ã§ã¯ã€çµåˆã®å®Ÿè¡Œæ™‚é–“ã®å¤§éƒ¨åˆ†ã¯ã€å…¥åŠ›ãƒ‘ーツã®èª­ã¿è¾¼ã¿ã¨å‡ºåŠ›ãƒ‘ーツã®ä¿å­˜ã«è²»ã‚„ã•ã‚Œã¾ã™ã€‚çµåˆä¸­ã«ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã™ã‚‹ãŸã‚ã®è¿½åŠ ä½œæ¥­ã¯ã€é€šå¸¸ã€çµåˆã®å®Ÿè¡Œæ™‚é–“ã«ã‚ã¾ã‚Šå½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。ã“れらã®é­”法ã¯å®Œå…¨ã«é€æ˜Žã§ã‚ã‚Šã€ã‚¯ã‚¨ãƒªã®çµæžœã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“(パフォーマンスを除ã„ã¦ï¼‰ã€‚ + +## ストレージ層: データã®ãƒ—ルーニング + +実際ã«ã¯ã€å¤šãã®ã‚¯ã‚¨ãƒªã¯ç¹°ã‚Šè¿”ã—å¯èƒ½ã§ã‚ã‚Šã€å¤‰æ›´ãªã—ã¾ãŸã¯ã‚ãšã‹ãªä¿®æ­£ï¼ˆä¾‹ï¼šç•°ãªã‚‹ãƒ‘ラメータ値)ã§å®šæœŸçš„ãªé–“éš”ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚åŒã˜ã¾ãŸã¯é¡žä¼¼ã®ã‚¯ã‚¨ãƒªã‚’何度も実行ã™ã‚‹ã“ã¨ã§ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’追加ã—ãŸã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’å†ç·¨æˆã—ã¦é »ç¹ãªã‚¯ã‚¨ãƒªãŒãƒ‡ãƒ¼ã‚¿ã«ã‚ˆã‚Šé€Ÿãアクセスã§ãるよã†ã«ã—ã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã¯ã€Œãƒ‡ãƒ¼ã‚¿ãƒ—ルーニングã€ã¨ã—ã¦ã‚‚知られã¦ãŠã‚Šã€ClickHouseã¯ã“ã‚Œã«å¯¾ã—ã¦3ã¤ã®æŠ€è¡“ã‚’æä¾›ã—ã¦ã„ã¾ã™ï¼š + +1. [主キーインデックス](https://clickhouse.com/docs/ja/optimize/sparse-primary-indexes) ã¯ã€ãƒ†ãƒ¼ãƒ–ルデータã®ã‚½ãƒ¼ãƒˆé †ã‚’定義ã—ã¾ã™ã€‚é©åˆ‡ã«é¸ã°ã‚ŒãŸä¸»ã‚­ãƒ¼ã¯ã€ä¸Šè¨˜ã®ã‚¯ã‚¨ãƒªã§ã®WHEREå¥ã®ã‚ˆã†ãªãƒ•ã‚£ãƒ«ã‚¿ã‚’ã€ãƒ•ãƒ«ã‚«ãƒ©ãƒ ã‚¹ã‚­ãƒ£ãƒ³ã§ã¯ãªã高速ãªäºŒåˆ†æŽ¢ç´¢ã§è©•ä¾¡ã§ãるよã†ã«ã—ã¾ã™ã€‚より技術的ã«ã¯ã€ã‚¹ã‚­ãƒ£ãƒ³ã®å®Ÿè¡Œæ™‚é–“ã¯ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã«å¯¾ã—ã¦ç·šå½¢ã§ã¯ãªã対数ã«ãªã‚Šã¾ã™ã€‚ + +2. [テーブルã®ãƒ—ロジェクション](https://clickhouse.com/docs/ja/sql-reference/statements/alter/projection) ã¯ã€ç•°ãªã‚‹ä¸»ã‚­ãƒ¼ã§ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸåŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®åˆ¥ã®å†…部ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨ã—ã¦å½¹ç«‹ã¡ã¾ã™ã€‚プロジェクションã¯ã€è¤‡æ•°ã®é »ç¹ãªãƒ•ã‚£ãƒ«ã‚¿æ¡ä»¶ãŒã‚ã‚‹å ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +3. [スキッピングインデックス](https://clickhouse.com/docs/ja/optimize/skipping-indexes) ã¯ã€æœ€å°å€¤ã‚„最大値ã€ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå€¤ã®ã‚»ãƒƒãƒˆãªã©ã€è¿½åŠ ã®ãƒ‡ãƒ¼ã‚¿çµ±è¨ˆã‚’カラムã«åŸ‹ã‚è¾¼ã¿ã¾ã™ã€‚スキッピングインデックスã¯ä¸»ã‚­ãƒ¼ã‚„テーブルプロジェクションã¨ã¯ç›´äº¤ã—ã¦ãŠã‚Šã€ã‚«ãƒ©ãƒ å†…ã®ãƒ‡ãƒ¼ã‚¿åˆ†å¸ƒã«å¿œã˜ã¦ã€ãƒ•ã‚£ãƒ«ã‚¿ã®è©•ä¾¡ã‚’大幅ã«é«˜é€ŸåŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“れら3ã¤ã®æŠ€è¡“ã¯ã™ã¹ã¦ã€ãƒ•ãƒ«ã‚«ãƒ©ãƒ ã®èª­ã¿è¾¼ã¿æ™‚ã«ã§ãã‚‹ã ã‘多ãã®è¡Œã‚’スキップã™ã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ãŠã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’最も速ã読ã¿å–る方法ã¯ã€ãã‚‚ãも読ã¿å–らãªã„ã“ã¨ã§ã™ã€‚ + +## ストレージ層: データ圧縮 + +ã•ã‚‰ã«ã€ClickHouseã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å±¤ã¯ç”Ÿã®ãƒ†ãƒ¼ãƒ–ルデータをã•ã¾ã–ã¾ãªã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã‚’使用ã—ã¦ï¼ˆã¾ãŸã¯å¿…è¦ã«å¿œã˜ã¦ï¼‰åœ§ç¸®ã—ã¾ã™ã€‚ + +列ストアã¯ã“ã®ã‚ˆã†ãªåœ§ç¸®ã«éžå¸¸ã«é©ã—ã¦ãŠã‚Šã€åŒã˜åž‹ã¨ãƒ‡ãƒ¼ã‚¿åˆ†å¸ƒã®å€¤ãŒä¸€ç·’ã«é…ç½®ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ユーザーã¯ã€[設定](https://clickhouse.com/blog/optimize-clickhouse-codecs-compression-schema) ã«ã‚ˆã£ã¦ã€ã‚«ãƒ©ãƒ ã‚’様々ãªä¸€èˆ¬çš„ãªåœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ï¼ˆZSTDãªã©ï¼‰ã‚„特化ã—ãŸã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã€ä¾‹ãˆã°æµ®å‹•å°æ•°ç‚¹æ•°ç”¨ã®Gorillaã¨FPCã€æ•´æ•°å€¤ç”¨ã®Deltaã¨GCDã€ã‚ã‚‹ã„ã¯æš—å·åŒ–コーデックã¨ã—ã¦ã®AESãªã©ã§åœ§ç¸®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +データ圧縮ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚µã‚¤ã‚ºã‚’削減ã™ã‚‹ã ã‘ã§ãªãã€å¤šãã®å ´åˆã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ã‚„ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯I/OãŒä½Žã‚¹ãƒ«ãƒ¼ãƒ—ットã«åˆ¶ç´„ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスもå‘上ã•ã›ã¾ã™ã€‚ + +## 最新鋭ã®ã‚¯ã‚¨ãƒªå‡¦ç†å±¤ + +最後ã«ã€ClickHouseã¯ãƒ™ã‚¯ãƒˆãƒ«åŒ–ã•ã‚ŒãŸã‚¯ã‚¨ãƒªå‡¦ç†å±¤ã‚’採用ã—ã¦ãŠã‚Šã€æœ€å¤§é€Ÿåº¦ã¨åŠ¹çŽ‡ã‚’実ç¾ã™ã‚‹ãŸã‚ã«ãƒªã‚½ãƒ¼ã‚¹ã‚’最大é™ã«æ´»ç”¨ã—ã¦ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’並列化ã—ã¦ã„ã¾ã™ã€‚ + +「ベクトル化ã€ã¨ã¯ã€ã‚¯ã‚¨ãƒªãƒ—ランオペレーターãŒä¸­é–“çµæžœã®è¡Œã‚’å˜ä¸€è¡Œã§ã¯ãªããƒãƒƒãƒã§æ¸¡ã™ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€CPUキャッシュã®åˆ©ç”¨ãŒå‘上ã—ã€ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ãƒ¼ãŒSIMD命令をé©ç”¨ã—ã¦è¤‡æ•°ã®å€¤ã‚’一度ã«å‡¦ç†ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚実際ã€å¤šãã®ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ãƒ¼ã¯è¤‡æ•°ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æŒã£ã¦ãŠã‚Šã€ãã‚Œãžã‚Œã®SIMD命令セット世代ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ClickHouseã¯ã€å‹•ä½œã™ã‚‹ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®èƒ½åŠ›ã«åŸºã¥ã„ã¦ã€æœ€æ–°ã‹ã¤æœ€é€Ÿã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’自動的ã«é¸æŠžã—ã¾ã™ã€‚ + +ç¾ä»£ã®ã‚·ã‚¹ãƒ†ãƒ ã«ã¯æ•°åã®CPUコアãŒã‚ã‚Šã¾ã™ã€‚å…¨ã¦ã®ã‚³ã‚¢ã‚’活用ã™ã‚‹ãŸã‚ã«ã€ClickHouseã¯ã‚¯ã‚¨ãƒªãƒ—ランを複数ã®ãƒ¬ãƒ¼ãƒ³ã«å±•é–‹ã—ã€é€šå¸¸ã¯ã‚³ã‚¢ã”ã¨ã«1ã¤ã®ãƒ¬ãƒ¼ãƒ³ã‚’作æˆã—ã¾ã™ã€‚å„レーンã¯ãƒ†ãƒ¼ãƒ–ルデータã®éžé‡è¤‡ç¯„囲を処ç†ã—ã¾ã™ã€‚ã“ã®æ–¹æ³•ã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‘フォーマンスã¯åˆ©ç”¨å¯èƒ½ãªã‚³ã‚¢æ•°ã«å¿œã˜ã¦ã€Œåž‚ç›´ã«ã€æ‹¡å¼µã•ã‚Œã¾ã™ã€‚ + +å˜ä¸€ãƒŽãƒ¼ãƒ‰ãŒãƒ†ãƒ¼ãƒ–ルデータをä¿æŒã™ã‚‹ã«ã¯å°ã•ã™ãŽã‚‹å ´åˆã€ã•ã‚‰ã«ãƒŽãƒ¼ãƒ‰ã‚’追加ã—ã¦ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’å½¢æˆã§ãã¾ã™ã€‚テーブルを分割ã—ã¦ï¼ˆã€Œã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€ã—ã¦ï¼‰ãƒŽãƒ¼ãƒ‰é–“ã«åˆ†æ•£ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouseã¯ãƒ†ãƒ¼ãƒ–ルデータを格ç´ã™ã‚‹ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã§ã‚¯ã‚¨ãƒªã‚’実行ã—ã€ã“ã‚Œã«ã‚ˆã‚Šåˆ©ç”¨å¯èƒ½ãªãƒŽãƒ¼ãƒ‰æ•°ã«å¿œã˜ã¦ã€Œæ°´å¹³ã«ã€ã‚¹ã‚±ãƒ¼ãƒ«ã•ã‚Œã¾ã™ã€‚ + +## 細部ã¸ã®å¾¹åº•çš„ãªã“ã ã‚ã‚Š + +> **「ClickHouseã¯é©šç•°çš„ãªã‚·ã‚¹ãƒ†ãƒ ã§ã™ - ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®20ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒã‚ã‚Šã¾ã™ã€‚通常ã®ã‚·ã‚¹ãƒ†ãƒ ãŒ1ã¤ã®ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルをæŒã¤ã¨ã“ã‚ã€ClickHouseã¯å¤šæ§˜ãªã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—ã€ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã€åˆ†å¸ƒã‚„インデックス設定ã«ã‚ãŸã‚Šã€å¤šæ•°ã®å°‚門的ãªã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’æŒã¤ãŸã‚ã€é©šç•°çš„ãªãƒ‘フォーマンスを実ç¾ã—ã¦ã„ã¾ã™ã€‚ã€** [Andy Pavlo, CMUã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹æ•™æŽˆ](https://www.youtube.com/watch?v=Vy2t_wZx4Is&t=3579s) + +ClickHouseを特別ãªå­˜åœ¨ã«ã™ã‚‹ã®ã¯ã€ä½Žãƒ¬ãƒ™ãƒ«ã®æœ€é©åŒ–ã¸ã®å¾¹åº•çš„ãªã“ã ã‚ã‚Šã§ã™ã€‚å˜ã«å‹•ä½œã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’構築ã™ã‚‹ã“ã¨ã‚‚一ã¤ã®ã“ã¨ã§ã™ãŒã€ã•ã¾ã–ã¾ãªã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—ã€ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã€åˆ†å¸ƒã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹è¨­å®šã‚’横断ã—ã¦é«˜é€ŸåŒ–を実ç¾ã™ã‚‹ãŸã‚ã®ã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ãƒªãƒ³ã‚°ã“ããŒã€Œé©šç•°çš„ãªã‚·ã‚¹ãƒ†ãƒ ã€ã®èŠ¸è¡“ãŒè¼ãã¨ã“ã‚ã§ã™ã€‚ + +**ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ル。** ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルを例ã«å–ã£ã¦ã¿ã¾ã—ょã†ã€‚ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã¯ã€çµåˆã‚„集計ã§ä½¿ç”¨ã•ã‚Œã‚‹ä¸­å¿ƒçš„ãªãƒ‡ãƒ¼ã‚¿æ§‹é€ ã§ã™ã€‚プログラマーã¨ã—ã¦ã¯ã€ä»¥ä¸‹ã®è¨­è¨ˆæ±ºå®šã‚’検討ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +* é¸æŠžã™ã‚‹ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã€ +* è¡çªã®è§£æ±ºï¼š [オープンアドレッシング](https://en.wikipedia.org/wiki/Open_addressing) ã¾ãŸã¯ [ãƒã‚§ã‚¤ãƒ‹ãƒ³ã‚°](https://en.wikipedia.org/wiki/Hash_table#Separate_chaining)〠+* メモリã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆï¼šã‚­ãƒ¼ã¨å€¤ã®ãŸã‚ã®1ã¤ã®é…列ã‹ã€ãã‚Œã¨ã‚‚別々ã®é…列ã‹ï¼Ÿ +* フィルファクタ:ã„ã¤ã©ã®ã‚ˆã†ã«ãƒªã‚µã‚¤ã‚ºã™ã‚‹ã‹ï¼Ÿãƒªã‚µã‚¤ã‚ºæ™‚ã«å€¤ã‚’ã©ã®ã‚ˆã†ã«ç§»å‹•ã™ã‚‹ã‹ï¼Ÿ +* 削除:ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã¯ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã‚’削除ã™ã‚‹ã“ã¨ã‚’許å¯ã™ã¹ãã‹ï¼Ÿ + +サードパーティã®ãƒ©ã‚¤ãƒ–ラリãŒæä¾›ã™ã‚‹æ¨™æº–ã®ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã¯æ©Ÿèƒ½çš„ã«ã¯å‹•ä½œã—ã¾ã™ãŒã€é«˜é€Ÿã§ã¯ã‚ã‚Šã¾ã›ã‚“。優れãŸãƒ‘フォーマンスã¯ã€å¾¹åº•çš„ãªãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ã¨å®Ÿé¨“ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ + +[ClickHouseã«ãŠã‘ã‚‹ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®å®Ÿè£…](https://clickhouse.com/blog/hash-tables-in-clickhouse-and-zero-cost-abstractions) ã¯ã€ã‚¯ã‚¨ãƒªã¨ãƒ‡ãƒ¼ã‚¿ã®ç‰¹æ€§ã«åŸºã¥ã„ã¦**30を超ãˆã‚‹äº‹å‰ã‚³ãƒ³ãƒ‘イルã•ã‚ŒãŸãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³**ã‹ã‚‰é¸æŠžã—ã¦ã„ã¾ã™ã€‚ + +**アルゴリズム。** アルゴリズムã«ã¤ã„ã¦ã‚‚åŒæ§˜ã§ã™ã€‚例ãˆã°ã€ã‚½ãƒ¼ãƒˆã®å ´åˆã‚’考ãˆã¦ã¿ã¾ã—ょã†ï¼š + +* 何をソートã™ã¹ãã‹ï¼šæ•°å­—ã€ã‚¿ãƒ—ルã€æ–‡å­—列ã€ã¾ãŸã¯æ§‹é€ ä½“ã‹ï¼Ÿ +* データã¯RAMã«ã‚ã‚‹ã‹ï¼Ÿ +* ソートã¯å®‰å®šã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ï¼Ÿ +* ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’ソートã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã€éƒ¨åˆ†çš„ãªã‚½ãƒ¼ãƒˆã§å分ã‹ï¼Ÿ + +データã®ç‰¹å¾´ã«ä¾å­˜ã™ã‚‹ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ã€ãã®ä¸€èˆ¬çš„ãªå¯¾å¿œç‰©ã‚ˆã‚Šã‚‚パフォーマンスãŒå„ªã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚ˆãã‚ã‚Šã¾ã™ã€‚データã®ç‰¹æ€§ãŒäº‹å‰ã«ä¸æ˜Žãªå ´åˆã€ã‚·ã‚¹ãƒ†ãƒ ã¯ã•ã¾ã–ã¾ãªå®Ÿè£…を試ã—ã€å®Ÿè¡Œæ™‚ã«æœ€é©ãªã‚‚ã®ã‚’é¸æŠžã§ãã¾ã™ã€‚例ãˆã°ã€ClickHouseã«ãŠã‘ã‚‹LZ4デコードã®å®Ÿè£…方法ã«ã¤ã„ã¦ã®[記事](https://habr.com/en/company/yandex/blog/457612/)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## VLDB 2024 è«–æ–‡ + +2024å¹´8月ã«ã€ç§ãŸã¡ã®æœ€åˆã®ç ”究論文ãŒVLDBã«å—ç†ã•ã‚Œã€å…¬é–‹ã•ã‚Œã¾ã—ãŸã€‚ +VLDBã¯éžå¸¸ã«å¤§ããªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«é–¢ã™ã‚‹å›½éš›ä¼šè­°ã§ã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ç®¡ç†ã®åˆ†é‡Žã§æœ€ã‚‚権å¨ã®ã‚る会議ã®ä¸€ã¤ã¨åºƒã見ãªã•ã‚Œã¦ã„ã¾ã™ã€‚ +数百件ã®æ出物ã®ä¸­ã§ã€VLDBã®æŽ¡æŠžçŽ‡ã¯é€šå¸¸ç´„20%ã§ã™ã€‚ + +ClickHouseãŒãªãœãã“ã¾ã§é«˜æ€§èƒ½ãªã®ã‹ã«ã¤ã„ã¦ãã®æœ€ã‚‚興味深ã„アーキテクãƒãƒ£ãŠã‚ˆã³ã‚·ã‚¹ãƒ†ãƒ ãƒ‡ã‚¶ã‚¤ãƒ³ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’ç°¡æ½”ã«èª¬æ˜Žã™ã‚‹[PDFã®è«–æ–‡](https://www.vldb.org/pvldb/vol17/p3731-schulze.pdf)を読むã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouseã®CTOã§ã‚り創設者ã§ã‚‚ã‚ã‚‹Alexey MilovidovãŒã€è«–文を発表ã—(スライドã¯[ã“ã¡ã‚‰](https://raw.githubusercontent.com/ClickHouse/clickhouse-presentations/master/vldb_2024/VLDB_2024_presentation.pdf)ã§å…¥æ‰‹å¯èƒ½ï¼‰ã€æ™‚間切れã¨ãªã£ãŸè³ªç–‘応答を行ã„ã¾ã—ãŸã€‚ +記録ã•ã‚ŒãŸãƒ—レゼンテーションã¯ã“ã¡ã‚‰ã§ã”覧ã«ãªã‚Œã¾ã™ï¼š + + diff --git a/docs/ja/data-compression/compression-in-clickhouse.md b/docs/ja/data-compression/compression-in-clickhouse.md new file mode 100644 index 00000000000..a953b4ae17b --- /dev/null +++ b/docs/ja/data-compression/compression-in-clickhouse.md @@ -0,0 +1,220 @@ +--- +slug: /ja/data-compression/compression-in-clickhouse +title: ClickHouseã«ãŠã‘る圧縮 +description: ClickHouseã®åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®é¸æŠž +keywords: [圧縮, コーデック, エンコーディング] +--- + +ClickHouseã®ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã®ç§˜å¯†ã®ä¸€ã¤ã¯åœ§ç¸®ã§ã™ã€‚ + +ディスク上ã®ãƒ‡ãƒ¼ã‚¿ãŒå°‘ãªã‘ã‚Œã°ã€I/OãŒæ¸›å°‘ã—ã€ã‚¯ã‚¨ãƒªã‚„挿入ãŒé€Ÿããªã‚Šã¾ã™ã€‚通常ã€CPUã«é–¢é€£ã™ã‚‹ä»»æ„ã®åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã¯ã€I/Oã®å‰Šæ¸›ã«ã‚ˆã£ã¦ä¸Šå›žã‚Šã¾ã™ã€‚ãã®ãŸã‚ã€ClickHouseã®ã‚¯ã‚¨ãƒªã‚’高速化ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®åœ§ç¸®ã‚’改善ã™ã‚‹ã“ã¨ã«æœ€åˆã«æ³¨åŠ›ã™ã‚‹ã¹ãã§ã™ã€‚ + +> ClickHouseãŒãƒ‡ãƒ¼ã‚¿ã‚’ã†ã¾ã圧縮ã™ã‚‹ç†ç”±ã«ã¤ã„ã¦ã¯ã€[ã“ã®è¨˜äº‹](https://clickhouse.com/blog/optimize-clickhouse-codecs-compression-schema)ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚è¦ç´„ã™ã‚‹ã¨ã€åˆ—指å‘データベースã¨ã—ã¦ã€å€¤ã¯ã‚«ãƒ©ãƒ é †ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ã“れらã®å€¤ãŒã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹å ´åˆã€åŒã˜å€¤ãŒäº’ã„ã«éš£æŽ¥ã—ã¾ã™ã€‚圧縮アルゴリズムã¯é€£ç¶šã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ‘ターンを利用ã—ã¾ã™ã€‚ã•ã‚‰ã«ã€ClickHouseã«ã¯ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã‚„ç´°ã‹ãªãƒ‡ãƒ¼ã‚¿åž‹ãŒå­˜åœ¨ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒåœ§ç¸®æŠ€è¡“ã‚’ã•ã‚‰ã«èª¿æ•´ã§ãるよã†ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +ClickHouseã«ãŠã‘る圧縮ã¯ä¸»ã«ä»¥ä¸‹ã®3ã¤ã®è¦å› ã«å½±éŸ¿ã•ã‚Œã¾ã™ï¼š +- é †åºã‚­ãƒ¼ +- データ型 +- 使用ã•ã‚Œã‚‹ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ + +ã“れらã¯ã™ã¹ã¦ã‚¹ã‚­ãƒ¼ãƒžã‚’通ã˜ã¦è¨­å®šã•ã‚Œã¾ã™ã€‚ + +## 圧縮を最é©åŒ–ã™ã‚‹ãŸã‚ã«é©åˆ‡ãªãƒ‡ãƒ¼ã‚¿åž‹ã‚’é¸æŠž + +Stack Overflowã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’例ã«ã—ã¾ã—ょã†ã€‚以下ã®`posts`テーブルã®ã‚¹ã‚­ãƒ¼ãƒžã«ã¤ã„ã¦ã®åœ§ç¸®çµ±è¨ˆã‚’比較ã—ã¾ã™ï¼š + +- `posts` - é †åºã‚­ãƒ¼ã®ãªã„タイプ最é©åŒ–ãŒã•ã‚Œã¦ã„ãªã„スキーマ。 +- `posts_v3` - å„カラムã«é©åˆ‡ãªåž‹ã¨ãƒ“ットサイズをæŒã¡ã€é †åºã‚­ãƒ¼`(PostTypeId, toDate(CreationDate), CommentCount)`ã‚’å‚™ãˆãŸã‚¿ã‚¤ãƒ—最é©åŒ–スキーマ。 + +以下ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¦ã€å„カラムã®ç¾åœ¨ã®åœ§ç¸®æ¸ˆã¿ãŠã‚ˆã³æœªåœ§ç¸®ã®ã‚µã‚¤ã‚ºã‚’測定ã§ãã¾ã™ã€‚最åˆã®`posts`ã®é †åºã‚­ãƒ¼ãªã—ã§ã®æœ€é©åŒ–スキーマã®ã‚µã‚¤ã‚ºã‚’調ã¹ã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +SELECT name, + formatReadableSize(sum(data_compressed_bytes)) AS compressed_size, + formatReadableSize(sum(data_uncompressed_bytes)) AS uncompressed_size, + round(sum(data_uncompressed_bytes) / sum(data_compressed_bytes), 2) AS ratio +FROM system.columns +WHERE table = 'posts' +GROUP BY name + +┌─name──────────────────┬─compressed_size─┬─uncompressed_size─┬───ratio─┠+│ Body │ 46.14 GiB │ 127.31 GiB │ 2.76 │ +│ Title │ 1.20 GiB │ 2.63 GiB │ 2.19 │ +│ Score │ 84.77 MiB │ 736.45 MiB │ 8.69 │ +│ Tags │ 475.56 MiB │ 1.40 GiB │ 3.02 │ +│ ParentId │ 210.91 MiB │ 696.20 MiB │ 3.3 │ +│ Id │ 111.17 MiB │ 736.45 MiB │ 6.62 │ +│ AcceptedAnswerId │ 81.55 MiB │ 736.45 MiB │ 9.03 │ +│ ClosedDate │ 13.99 MiB │ 517.82 MiB │ 37.02 │ +│ LastActivityDate │ 489.84 MiB │ 964.64 MiB │ 1.97 │ +│ CommentCount │ 37.62 MiB │ 565.30 MiB │ 15.03 │ +│ OwnerUserId │ 368.98 MiB │ 736.45 MiB │ 2 │ +│ AnswerCount │ 21.82 MiB │ 622.35 MiB │ 28.53 │ +│ FavoriteCount │ 280.95 KiB │ 508.40 MiB │ 1853.02 │ +│ ViewCount │ 95.77 MiB │ 736.45 MiB │ 7.69 │ +│ LastEditorUserId │ 179.47 MiB │ 736.45 MiB │ 4.1 │ +│ ContentLicense │ 5.45 MiB │ 847.92 MiB │ 155.5 │ +│ OwnerDisplayName │ 14.30 MiB │ 142.58 MiB │ 9.97 │ +│ PostTypeId │ 20.93 MiB │ 565.30 MiB │ 27 │ +│ CreationDate │ 314.17 MiB │ 964.64 MiB │ 3.07 │ +│ LastEditDate │ 346.32 MiB │ 964.64 MiB │ 2.79 │ +│ LastEditorDisplayName │ 5.46 MiB │ 124.25 MiB │ 22.75 │ +│ CommunityOwnedDate │ 2.21 MiB │ 509.60 MiB │ 230.94 │ +└───────────────────────┴─────────────────┴───────────────────┴─────────┘ +``` + +ã“ã“ã§ã¯åœ§ç¸®æ¸ˆã¿ã‚µã‚¤ã‚ºã¨æœªåœ§ç¸®ã‚µã‚¤ã‚ºã®ä¸¡æ–¹ã‚’表示ã—ã¦ã„ã¾ã™ã€‚ã©ã¡ã‚‰ã‚‚é‡è¦ã§ã™ã€‚圧縮済ã¿ã‚µã‚¤ã‚ºã¯ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰èª­ã¿å–ã‚‹å¿…è¦ãŒã‚ã‚‹ã‚‚ã®ã‚’指ã—ã€ã“ã‚Œã¯ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンス(ãŠã‚ˆã³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚³ã‚¹ãƒˆï¼‰ã‚’最å°åŒ–ã™ã‚‹ãŸã‚ã«æ¸›ã‚‰ã—ãŸã„ã‚‚ã®ã§ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯èª­ã¿å–ã‚‹å‰ã«è§£å‡ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æœªåœ§ç¸®ã‚µã‚¤ã‚ºã¯ãƒ‡ãƒ¼ã‚¿åž‹ã«ä¾å­˜ã—ã¾ã™ã€‚ã“ã®ã‚µã‚¤ã‚ºã‚’最å°åŒ–ã™ã‚‹ã“ã¨ã§ã€ã‚¯ã‚¨ãƒªã®ãƒ¡ãƒ¢ãƒªã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’減少ã•ã›ã€ã‚¯ã‚¨ãƒªã§å‡¦ç†ã™ã‚‹å¿…è¦ãŒã‚るデータを削減ã—ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®åˆ©ç”¨åŠ¹çŽ‡ã‚’å‘上ã•ã›ã€æœ€çµ‚çš„ã«ã‚¯ã‚¨ãƒªæ™‚間を短縮ã—ã¾ã™ã€‚ + +> 上記ã®ã‚¯ã‚¨ãƒªã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®`columns`テーブルã«ä¾å­˜ã—ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ClickHouseã«ã‚ˆã£ã¦ç®¡ç†ã•ã‚Œã€ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスメトリクスã‹ã‚‰ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãƒ­ã‚°ã«è‡³ã‚‹ã¾ã§ã€ã•ã¾ã–ã¾ãªæœ‰ç”¨ãªæƒ…å ±ã®å®åº«ã§ã™ã€‚好奇心旺盛ãªèª­è€…ã«ã¯ã€["System Tables and a Window into the Internals of ClickHouse"](https://clickhouse.com/blog/clickhouse-debugging-issues-with-system-tables)ã‚„ã€é–¢é€£ã™ã‚‹è¨˜äº‹[[1]](https://clickhouse.com/blog/monitoring-troubleshooting-insert-queries-clickhouse)[[2]](https://clickhouse.com/blog/monitoring-troubleshooting-select-queries-clickhouse)ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +テーブル全体ã®ã‚µã‚¤ã‚ºã‚’è¦ç´„ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’簡素化ã§ãã¾ã™ï¼š + +```sql +SELECT formatReadableSize(sum(data_compressed_bytes)) AS compressed_size, + formatReadableSize(sum(data_uncompressed_bytes)) AS uncompressed_size, + round(sum(data_uncompressed_bytes) / sum(data_compressed_bytes), 2) AS ratio +FROM system.columns +WHERE table = 'posts' + +┌─compressed_size─┬─uncompressed_size─┬─ratio─┠+│ 50.16 GiB │ 143.47 GiB │ 2.86 │ +└─────────────────┴───────────────────┴───────┘ +``` + +最é©åŒ–ã•ã‚ŒãŸåž‹ã¨é †åºã‚­ãƒ¼ã‚’æŒã¤`posts_v3`テーブルã«å¯¾ã—ã¦ã“ã®ã‚¯ã‚¨ãƒªã‚’ç¹°ã‚Šè¿”ã™ã“ã¨ã§ã€æœªåœ§ç¸®ã‚µã‚¤ã‚ºã¨åœ§ç¸®æ¸ˆã¿ã‚µã‚¤ã‚ºãŒå¤§å¹…ã«å‰Šæ¸›ã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ + +```sql +SELECT + formatReadableSize(sum(data_compressed_bytes)) AS compressed_size, + formatReadableSize(sum(data_uncompressed_bytes)) AS uncompressed_size, + round(sum(data_uncompressed_bytes) / sum(data_compressed_bytes), 2) AS ratio +FROM system.columns +WHERE `table` = 'posts_v3' + +┌─compressed_size─┬─uncompressed_size─┬─ratio─┠+│ 25.15 GiB │ 68.87 GiB │ 2.74 │ +└─────────────────┴───────────────────┴───────┘ +``` + +カラム別ã®è©³ç´°ãªåˆ†æžã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’圧縮å‰ã«é †åºåŒ–ã—ã€é©åˆ‡ãªåž‹ã‚’使用ã™ã‚‹ã“ã¨ã§ã€`Body`ã€`Title`ã€`Tags`ã€`CreationDate`カラムã§å¤§ããªå‰Šæ¸›ãŒé”æˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```sql +SELECT + name, + formatReadableSize(sum(data_compressed_bytes)) AS compressed_size, + formatReadableSize(sum(data_uncompressed_bytes)) AS uncompressed_size, + round(sum(data_uncompressed_bytes) / sum(data_compressed_bytes), 2) AS ratio +FROM system.columns +WHERE `table` = 'posts_v3' +GROUP BY name + +┌─name──────────────────┬─compressed_size─┬─uncompressed_size─┬───ratio─┠+│ Body │ 23.10 GiB │ 63.63 GiB │ 2.75 │ +│ Title │ 614.65 MiB │ 1.28 GiB │ 2.14 │ +│ Score │ 40.28 MiB │ 227.38 MiB │ 5.65 │ +│ Tags │ 234.05 MiB │ 688.49 MiB │ 2.94 │ +│ ParentId │ 107.78 MiB │ 321.33 MiB │ 2.98 │ +│ Id │ 159.70 MiB │ 227.38 MiB │ 1.42 │ +│ AcceptedAnswerId │ 40.34 MiB │ 227.38 MiB │ 5.64 │ +│ ClosedDate │ 5.93 MiB │ 9.49 MiB │ 1.6 │ +│ LastActivityDate │ 246.55 MiB │ 454.76 MiB │ 1.84 │ +│ CommentCount │ 635.78 KiB │ 56.84 MiB │ 91.55 │ +│ OwnerUserId │ 183.86 MiB │ 227.38 MiB │ 1.24 │ +│ AnswerCount │ 9.67 MiB │ 113.69 MiB │ 11.76 │ +│ FavoriteCount │ 19.77 KiB │ 147.32 KiB │ 7.45 │ +│ ViewCount │ 45.04 MiB │ 227.38 MiB │ 5.05 │ +│ LastEditorUserId │ 86.25 MiB │ 227.38 MiB │ 2.64 │ +│ ContentLicense │ 2.17 MiB │ 57.10 MiB │ 26.37 │ +│ OwnerDisplayName │ 5.95 MiB │ 16.19 MiB │ 2.72 │ +│ PostTypeId │ 39.49 KiB │ 56.84 MiB │ 1474.01 │ +│ CreationDate │ 181.23 MiB │ 454.76 MiB │ 2.51 │ +│ LastEditDate │ 134.07 MiB │ 454.76 MiB │ 3.39 │ +│ LastEditorDisplayName │ 2.15 MiB │ 6.25 MiB │ 2.91 │ +│ CommunityOwnedDate │ 824.60 KiB │ 1.34 MiB │ 1.66 │ +└───────────────────────┴─────────────────┴───────────────────┴─────────┘ +``` + +## é©åˆ‡ãªã‚«ãƒ©ãƒ ã®åœ§ç¸®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã®é¸æŠž + +カラム圧縮コーデックを使用ã™ã‚‹ã¨ã€å„カラムをエンコードãŠã‚ˆã³åœ§ç¸®ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ï¼ˆãŠã‚ˆã³ãã®è¨­å®šï¼‰ã‚’変更ã§ãã¾ã™ã€‚ + +エンコーディングã¨åœ§ç¸®ã¯è‹¥å¹²ç•°ãªã‚‹ä»•çµ„ã¿ã§å‹•ä½œã—ã¾ã™ãŒã€ç›®çš„ã¯åŒã˜ã§ã™ï¼šãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã‚’削減ã™ã‚‹ã“ã¨ã§ã™ã€‚エンコーディングã¯ç§ãŸã¡ã®ãƒ‡ãƒ¼ã‚¿ã«ãƒžãƒƒãƒ”ングをé©ç”¨ã—ã€ãƒ‡ãƒ¼ã‚¿åž‹ã®ç‰¹æ€§ã‚’利用ã—ãŸé–¢æ•°ã«åŸºã¥ã„ã¦å€¤ã‚’変æ›ã—ã¾ã™ã€‚逆ã«ã€åœ§ç¸®ã¯ãƒã‚¤ãƒˆãƒ¬ãƒ™ãƒ«ã§ãƒ‡ãƒ¼ã‚¿ã‚’圧縮ã™ã‚‹ä¸€èˆ¬çš„ãªã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¾ã™ã€‚ + +通常ã€ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯åœ§ç¸®ãŒä½¿ç”¨ã•ã‚Œã‚‹å‰ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ç•°ãªã‚‹ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¨åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ã€ç•°ãªã‚‹å€¤ã®åˆ†å¸ƒã«å¯¾ã—ã¦æœ‰åŠ¹ãªã®ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚’ç†è§£ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseã¯å¤šãã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¨åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚以下ã¯é‡è¦åº¦ã®é †ã«ã„ãã¤ã‹ã®æŽ¨å¥¨äº‹é …ã§ã™ï¼š + +- **`ZSTD`を基本ã¨ã™ã‚‹** - `ZSTD`圧縮ã¯æœ€é«˜ã®åœ§ç¸®çŽ‡ã‚’æä¾›ã—ã¾ã™ã€‚`ZSTD(1)`ã¯ã€æœ€ã‚‚一般的ãªåž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨ã—ã¦è¨­å®šã•ã‚Œã‚‹ã¹ãã§ã™ã€‚圧縮率を高ã‚ã‚‹ãŸã‚ã«æ•°å€¤ã‚’変更ã™ã‚‹ã“ã¨ãŒè©¦ã¿ã‚‰ã‚Œã¾ã™ãŒã€æŒ¿å…¥é€Ÿåº¦ãŒé…ããªã‚‹ã‚³ã‚¹ãƒˆã‚’考慮ã™ã‚‹ã¨ã€3以上ã®å€¤ã‚’使用ã™ã‚‹ã“ã¨ã¯ã»ã¨ã‚“ã©ãªã„ã§ã—ょã†ã€‚ +- **整数や日付ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã«ã¯`Delta`ã‚’** - `Delta`ベースã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¯ã€å˜èª¿ãªã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚„連続ã™ã‚‹å€¤ã®é–“ã§å°ã•ãªãƒ‡ãƒ«ã‚¿ãŒã‚ã‚‹å ´åˆã«ã†ã¾ã機能ã—ã¾ã™ã€‚より具体的ã«ã¯ã€`Delta`コーデックã¯ã€å¾®åˆ†ãŒå°ã•ãªæ•°å€¤ã‚’生æˆã™ã‚‹å ´åˆã«ã‚ˆã機能ã—ã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã¯ã€`DoubleDelta`を試ã™ä¾¡å€¤ãŒã‚ã‚Šã¾ã™ï¼ˆã“ã‚Œã¯é€šå¸¸ã€`Delta`ã®æœ€åˆã®ãƒ¬ãƒ™ãƒ«ã®å°Žé–¢æ•°ãŒã™ã§ã«éžå¸¸ã«å°ã•ã„å ´åˆã«ã¯ã•ã»ã©å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“)。å˜èª¿ãªå¢—加ãŒä¸€å®šã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€ä¾‹ãˆã°æ—¥ä»˜æ™‚間フィールドã¯ã•ã‚‰ã«ã‚ˆã圧縮ã•ã‚Œã¾ã™ã€‚ +- **`Delta`ã¯`ZSTD`を改善ã™ã‚‹** - `ZSTD`ã¯ãƒ‡ãƒ«ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ãŠã„ã¦åŠ¹æžœçš„ãªã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã§ã™ã€‚逆ã«ã€ãƒ‡ãƒ«ã‚¿ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯`ZSTD`ã®åœ§ç¸®ã‚’改善ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`ZSTD`ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ä»–ã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¯ã•ã‚‰ãªã‚‹æ”¹å–„ã‚’ã»ã¨ã‚“ã©æä¾›ã—ã¾ã›ã‚“。 +- **å¯èƒ½ã§ã‚ã‚Œã°`ZSTD`よりも`LZ4`ã‚’** - `LZ4`ã¨`ZSTD`ãŒåŒç­‰ã®åœ§ç¸®ã‚’æä¾›ã™ã‚‹å ´åˆã€å¾Œè€…ã®ã»ã†ãŒé«˜é€Ÿãªè§£å‡ã‚’æä¾›ã—ã€ã‚ˆã‚Šå°‘ãªã„CPUã‚’å¿…è¦ã¨ã™ã‚‹ãŸã‚ã€`LZ4`ã‚’é¸ã¶ã»ã†ãŒè‰¯ã„ã§ã—ょã†ã€‚ã—ã‹ã—ã€ã»ã¨ã‚“ã©ã®å ´åˆ`ZSTD`ã¯`LZ4`を大幅ã«ä¸Šå›žã‚‹æ€§èƒ½ã‚’発æ®ã—ã¾ã™ã€‚ã“れらã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã®ä¸€éƒ¨ã¯ã€`LZ4`ã¨çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ã§ã€`ZSTD`ã«åŒ¹æ•µã™ã‚‹åœ§ç¸®ã‚’æä¾›ã—ãªãŒã‚‰é«˜é€Ÿã«å‹•ä½œã™ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ãŒã€ã“ã‚Œã«ã¯ãƒ†ã‚¹ãƒˆãŒå¿…è¦ã§ã™ã€‚ +- **スパースデータやå°ç¯„囲ã«ã¯`T64`ã‚’** - `T64`ã¯ã‚¹ãƒ‘ースデータやブロック内ã®ç¯„囲ãŒå°ã•ã„å ´åˆã«åŠ¹æžœçš„ã§ã™ã€‚ランダムãªæ•°å€¤ã«ã¯`T64`ã‚’é¿ã‘ã‚‹ã¹ãã§ã™ã€‚ +- **未知ã®ãƒ‘ターンã«ã¯`Gorilla`ã¨`T64`を試ã™** - データãŒæœªçŸ¥ã®ãƒ‘ターンをæŒã¤å ´åˆã€`Gorilla`ã¨`T64`を試ã™ä¾¡å€¤ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +- **ゲージデータã«ã¯`Gorilla`ã‚’** - `Gorilla`ã¯æµ®å‹•å°æ•°ç‚¹ãƒ‡ãƒ¼ã‚¿ã€ç‰¹ã«ã‚²ãƒ¼ã‚¸èª­ã¿å–りを表ã™ãƒ‡ãƒ¼ã‚¿ã€ã™ãªã‚ã¡ãƒ©ãƒ³ãƒ€ãƒ ãªã‚¹ãƒ‘イクã«åŠ¹æžœçš„ã§ã™ã€‚ + +ã•ã‚‰ã«è©³ã—ã„オプションã¯[ã“ã¡ã‚‰](/ja/sql-reference/statements/create/table#column_compression_codec)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +以下ã§ã¯ã€`Id`ã€`ViewCount`ã€`AnswerCount`ã«å¯¾ã—ã¦`Delta`コーデックを指定ã—ã¾ã™ã€‚ã“れらãŒé †åºã‚­ãƒ¼ã¨ç·šå½¢ã«ç›¸é–¢ã—ã¦ã„ã‚‹ã¨ä»®å®šã—ã€Deltaエンコードã‹ã‚‰æ©æµã‚’å—ã‘ã‚‹ã¯ãšã§ã™ã€‚ + +```sql +CREATE TABLE posts_v4 +( + `Id` Int32 CODEC(Delta, ZSTD), + `PostTypeId` Enum('Question' = 1, 'Answer' = 2, 'Wiki' = 3, 'TagWikiExcerpt' = 4, 'TagWiki' = 5, 'ModeratorNomination' = 6, 'WikiPlaceholder' = 7, 'PrivilegeWiki' = 8), + `AcceptedAnswerId` UInt32, + `CreationDate` DateTime64(3, 'UTC'), + `Score` Int32, + `ViewCount` UInt32 CODEC(Delta, ZSTD), + `Body` String, + `OwnerUserId` Int32, + `OwnerDisplayName` String, + `LastEditorUserId` Int32, + `LastEditorDisplayName` String, + `LastEditDate` DateTime64(3, 'UTC'), + `LastActivityDate` DateTime64(3, 'UTC'), + `Title` String, + `Tags` String, + `AnswerCount` UInt16 CODEC(Delta, ZSTD), + `CommentCount` UInt8, + `FavoriteCount` UInt8, + `ContentLicense` LowCardinality(String), + `ParentId` String, + `CommunityOwnedDate` DateTime64(3, 'UTC'), + `ClosedDate` DateTime64(3, 'UTC') +) +ENGINE = MergeTree +ORDER BY (PostTypeId, toDate(CreationDate), CommentCount) +``` + +ã“れらã®ã‚«ãƒ©ãƒ ã®åœ§ç¸®ã®æ”¹å–„ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```sql +SELECT + `table`, + name, + formatReadableSize(sum(data_compressed_bytes)) AS compressed_size, + formatReadableSize(sum(data_uncompressed_bytes)) AS uncompressed_size, + round(sum(data_uncompressed_bytes) / sum(data_compressed_bytes), 2) AS ratio +FROM system.columns +WHERE (name IN ('Id', 'ViewCount', 'AnswerCount')) AND (`table` IN ('posts_v3', 'posts_v4')) +GROUP BY + `table`, + name +ORDER BY + name ASC, + `table` ASC + +┌─table────┬─name────────┬─compressed_size─┬─uncompressed_size─┬─ratio─┠+│ posts_v3 │ AnswerCount │ 9.67 MiB │ 113.69 MiB │ 11.76 │ +│ posts_v4 │ AnswerCount │ 10.39 MiB │ 111.31 MiB │ 10.71 │ +│ posts_v3 │ Id │ 159.70 MiB │ 227.38 MiB │ 1.42 │ +│ posts_v4 │ Id │ 64.91 MiB │ 222.63 MiB │ 3.43 │ +│ posts_v3 │ ViewCount │ 45.04 MiB │ 227.38 MiB │ 5.05 │ +│ posts_v4 │ ViewCount │ 52.72 MiB │ 222.63 MiB │ 4.22 │ +└──────────┴─────────────┴─────────────────┴───────────────────┴───────┘ + +6 rows in set. Elapsed: 0.008 sec +``` + +### ClickHouse Cloudã«ãŠã‘る圧縮 + +ClickHouse Cloudã§ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`ZSTD`圧縮アルゴリズム(デフォルト値ã¯1)を利用ã—ã¦ã„ã¾ã™ã€‚ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®åœ§ç¸®é€Ÿåº¦ã¯åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ãŒï¼ˆåœ§ç¸®ãƒ¬ãƒ™ãƒ«ãŒé«˜ã„ã»ã©é…ããªã‚‹ï¼‰ã€è§£å‡ãŒä¸€è²«ã—ã¦é«˜é€Ÿï¼ˆç´„20ï¼…ã®ã°ã‚‰ã¤ã)ã§ã‚ã‚Šã€ä¸¦åˆ—化ã®æ©æµã‚’å—ã‘る能力をæŒã£ã¦ã„ã‚‹ã¨ã„ã†åˆ©ç‚¹ã‚’æŒã£ã¦ã„ã¾ã™ã€‚éŽåŽ»ã®ãƒ†ã‚¹ãƒˆã§ã¯ã€ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ãŒéžå¸¸ã«åŠ¹æžœçš„ã§ã‚ã‚Šã€`LZ4`ã¨ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã®çµ„ã¿åˆã‚ã›ã‚ˆã‚Šã‚‚優れã¦ã„ã‚‹å ´åˆãŒå¤šã„ã“ã¨ãŒç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ã»ã¨ã‚“ã©ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨æƒ…å ±ã®åˆ†å¸ƒã«å¯¾ã—ã¦åŠ¹æžœçš„ã§ã‚ã‚‹ãŸã‚ã€ä¸€èˆ¬ç›®çš„ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨ã—ã¦ç†ã«ã‹ãªã£ã¦ãŠã‚Šã€æœ€åˆã®åœ§ç¸®ãŒæœ€é©åŒ–ã•ã‚Œã¦ã„ãªãã¦ã‚‚ã™ã§ã«å„ªã‚Œã¦ã„ã‚‹ç†ç”±ã§ã™ã€‚ diff --git a/docs/ja/data-compression/compression-modes.md b/docs/ja/data-compression/compression-modes.md new file mode 100644 index 00000000000..def9e50d8a4 --- /dev/null +++ b/docs/ja/data-compression/compression-modes.md @@ -0,0 +1,51 @@ +--- +slug: /ja/data-compression/compression-modes +sidebar_position: 6 +title: 圧縮モード +description: ClickHouseã®ã‚«ãƒ©ãƒ åœ§ç¸®ãƒ¢ãƒ¼ãƒ‰ +keywords: [圧縮, コーデック, エンコーディング, モード] +--- + +# 圧縮モード + +ClickHouseプロトコルã¯ã€ãƒã‚§ãƒƒã‚¯ã‚µãƒ ä»˜ãã§**データブロック**ã®åœ§ç¸®ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã©ã®ãƒ¢ãƒ¼ãƒ‰ã‚’é¸ã¶ã‹è¿·ã£ãŸå ´åˆã¯ã€`LZ4`を使用ã—ã¦ãã ã•ã„。 + +:::tip +使用å¯èƒ½ãª[カラム圧縮コーデック](/docs/ja/sql-reference/statements/create/table.md/#column-compression-codecs)ã«ã¤ã„ã¦è©³ã—ãå­¦ã³ã€ãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã¾ãŸã¯ãã®å¾Œã«æŒ‡å®šã—ã¦ãã ã•ã„。 +::: + +## モード + +| 値 | åå‰ | 説明 | +|--------|--------------------|----------------------------------------------| +| `0x02` | [None](#none-mode) | 圧縮ãªã—ã€ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã®ã¿ | +| `0x82` | LZ4 | éžå¸¸ã«é«˜é€Ÿã§ã€è‰¯å¥½ãªåœ§ç¸® | +| `0x90` | ZSTD | Zstandardã€ã‹ãªã‚Šé«˜é€Ÿã§æœ€è‰¯ã®åœ§ç¸® | + +LZ4ã¨ZSTDã¯åŒã˜ä½œè€…ã«ã‚ˆã£ã¦ä½œã‚‰ã‚Œã¦ã„ã¾ã™ãŒã€ç•°ãªã‚‹ãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ãŒã‚ã‚Šã¾ã™ã€‚ +[Facebookã®ãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯](https://facebook.github.io/zstd/#benchmarks)ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ï¼š + +| åå‰ | 比率 | エンコーディング | デコーディング | +|----------------------|-------|------------------|------------------| +| **zstd** 1.4.5 -1 | 2.8 | 500 MB/s | 1660 MB/s | +| **lz4** 1.9.2 | 2.1 | 740 MB/s | 4530 MB/s | + +## ブロック + +| フィールド | åž‹ | 説明 | +|-------------------|---------|--------------------------------------------------------| +| checksum | uint128 | (ヘッダー + 圧縮データ)ã®[ãƒãƒƒã‚·ãƒ¥](../native-protocol/hash.md) | +| raw_size | uint32 | ヘッダーãªã—ã®ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚º | +| data_size | uint32 | éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚º | +| mode | byte | 圧縮モード | +| compressed_data | binary | 圧縮データã®ãƒ–ロック | + +![圧縮ブロック図](../native-protocol/images/ch_compression_block.drawio.svg) + +ヘッダーã¯(raw_size + data_size + mode)ã§æ§‹æˆã•ã‚Œã€ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã¯(ヘッダー + 圧縮データ)ã®é•·ã•ã«ãªã‚Šã¾ã™ã€‚ + +ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã¯`hash(header + compressed_data)`ã§ã€[ClickHouse CityHash](../native-protocol/hash.md)を使用ã—ã¦ã„ã¾ã™ã€‚ + +## Noneモード + +*None*モードãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€`compressed_data`ã¯å…ƒã®ãƒ‡ãƒ¼ã‚¿ã¨åŒã˜ã§ã™ã€‚圧縮を行ã‚ãªã„モードã¯ã€ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã«ã‚ˆã£ã¦è¿½åŠ ã®ãƒ‡ãƒ¼ã‚¿æ•´åˆæ€§ã‚’確ä¿ã™ã‚‹ã®ã«æœ‰ç”¨ã§ã‚ã‚Šã€ãƒãƒƒã‚·ãƒ¥å‡¦ç†ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã¯ã”ãã‚ãšã‹ã§ã™ã€‚ diff --git a/docs/ja/data-modeling/denormalization.md b/docs/ja/data-modeling/denormalization.md new file mode 100644 index 00000000000..c135820b382 --- /dev/null +++ b/docs/ja/data-modeling/denormalization.md @@ -0,0 +1,375 @@ +--- +slug: /ja/data-modeling/denormalization +title: データã®éžæ­£è¦åŒ– +description: クエリパフォーマンスをå‘上ã•ã›ã‚‹ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿éžæ­£è¦åŒ–ã®ä½¿ç”¨æ³• +keywords: [データã®éžæ­£è¦åŒ–, éžæ­£è¦åŒ–, クエリ最é©åŒ–] +--- + +# データã®éžæ­£è¦åŒ– + +データã®éžæ­£è¦åŒ–ã¯ã€ClickHouseã«ãŠã„ã¦ã€ãƒ†ãƒ¼ãƒ–ルを平å¦åŒ–ã—ã¦çµåˆã‚’é¿ã‘ã‚‹ã“ã¨ã§ã‚¯ã‚¨ãƒªé…延を最å°åŒ–ã™ã‚‹æŠ€è¡“ã§ã™ã€‚ + +## æ­£è¦åŒ–ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒž vs. éžæ­£è¦åŒ–ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã®æ¯”較 + +データã®éžæ­£è¦åŒ–ã¯ã€ç‰¹å®šã®ã‚¯ã‚¨ãƒªãƒ‘ターンã®ãŸã‚ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ‘フォーマンスを最é©åŒ–ã™ã‚‹ç›®çš„ã§ã€æ„図的ã«æ­£è¦åŒ–プロセスを逆ã«ã—ã¾ã™ã€‚æ­£è¦åŒ–ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã¯ã€å†—長性を最å°åŒ–ã—データ整åˆæ€§ã‚’確ä¿ã™ã‚‹ãŸã‚ã«ã€ãƒ‡ãƒ¼ã‚¿ã¯è¤‡æ•°ã®é–¢é€£ã—ãŸãƒ†ãƒ¼ãƒ–ルã«åˆ†å‰²ã•ã‚Œã¾ã™ã€‚éžæ­£è¦åŒ–ã¯ã€ãƒ†ãƒ¼ãƒ–ルをçµåˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’é‡è¤‡ã•ã›ã€è¨ˆç®—ã•ã‚ŒãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’å˜ä¸€ã¾ãŸã¯å°‘æ•°ã®ãƒ†ãƒ¼ãƒ–ルã«çµ„ã¿è¾¼ã‚€ã“ã¨ã§å†—長性をå†å°Žå…¥ã—ã¾ã™ - ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªæ™‚ã«çµåˆã™ã‚‹ã®ã§ã¯ãªã挿入時ã«çµåˆã•ã›ã¾ã™ã€‚ + +ã“ã®ãƒ—ロセスã¯ã‚¯ã‚¨ãƒªæ™‚ã®è¤‡é›‘ãªçµåˆã®å¿…è¦æ€§ã‚’削減ã—ã€èª­ã¿å–ã‚Šæ“作を大幅ã«é«˜é€ŸåŒ–ã§ãã‚‹ãŸã‚ã€é‡ã„読ã¿è¾¼ã¿è¦æ±‚ã¨è¤‡é›‘ãªã‚¯ã‚¨ãƒªã‚’æŒã¤ã‚¢ãƒ—リケーションã«æœ€é©ã§ã™ã€‚ã—ã‹ã—ã€æ›¸ãè¾¼ã¿æ“作やメンテナンスã®è¤‡é›‘ã•ãŒå¢—ã—ã€é‡è¤‡ã—ãŸãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›´ã‚’å…¨ã¦ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«ä¼æ’­ã—ã¦æ•´åˆæ€§ã‚’ä¿ã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseã«ãŠã‘ã‚‹éžæ­£è¦åŒ– + +
+ +NoSQLソリューションãŒæ™®åŠã—ãŸä¸€èˆ¬çš„ãªæŠ€è¡“ã¯ã€`JOIN`サãƒãƒ¼ãƒˆãŒãªã„å ´åˆã«ãƒ‡ãƒ¼ã‚¿ã‚’éžæ­£è¦åŒ–ã—ã¦ã€çµ±è¨ˆã‚„関連ã™ã‚‹è¡Œã‚’親行ã«ã‚«ãƒ©ãƒ ã‚„ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚ªãƒ–ジェクトã¨ã—ã¦ä¿å­˜ã™ã‚‹ã“ã¨ã§ã™ã€‚例ãˆã°ã€ãƒ–ログã®ä¾‹ã®ã‚¹ã‚­ãƒ¼ãƒžã§ã¯ã€å…¨ã¦ã®`Comments`を該当ã™ã‚‹æŠ•ç¨¿ã®ã‚ªãƒ–ジェクトã®`Array`ã¨ã—ã¦ä¿å­˜ã§ãã¾ã™ã€‚ + +## éžæ­£è¦åŒ–を使用ã™ã‚‹ã¹ã時 + +一般的ã«ã€ä»¥ä¸‹ã®ã‚±ãƒ¼ã‚¹ã§éžæ­£è¦åŒ–ã‚’ãŠå‹§ã‚ã—ã¾ã™: + +- é »ç¹ã«å¤‰æ›´ã•ã‚Œãªã„テーブルã€ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãŒåˆ†æžã‚¯ã‚¨ãƒªã«åˆ©ç”¨å¯èƒ½ã«ãªã‚‹ã¾ã§ã®é…延ãŒè¨±å®¹ã§ãるテーブルをéžæ­£è¦åŒ–ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’ãƒãƒƒãƒã§å®Œå…¨ã«å†ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ +- 多対多ã®é–¢ä¿‚ã‚’éžæ­£è¦åŒ–ã—ãªã„よã†ã«ã—ã¾ã™ã€‚1ã¤ã®å…ƒãƒ‡ãƒ¼ã‚¿è¡ŒãŒå¤‰æ›´ã•ã‚Œã‚‹ã¨å¤šãã®è¡Œã‚’æ›´æ–°ã™ã‚‹å¿…è¦ãŒç”Ÿã˜ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- カーディナリティãŒé«˜ã„関係をéžæ­£è¦åŒ–ã—ãªã„よã†ã«ã—ã¾ã™ã€‚テーブル内ã®å„è¡ŒãŒåˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã«æ•°åƒã®é–¢é€£ã‚¨ãƒ³ãƒˆãƒªã‚’æŒã¤å ´åˆã€ã“れらã¯`Array`ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ - プリミティブタイプã¾ãŸã¯ã‚¿ãƒ—ルã®ã©ã¡ã‚‰ã‹ã§ã™ã€‚通常ã€1000以上ã®ã‚¿ãƒ—ルをæŒã¤é…列ã¯ãŠå‹§ã‚ã—ã¾ã›ã‚“。 +- å…¨ã¦ã®ã‚«ãƒ©ãƒ ã‚’ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚ªãƒ–ジェクトã¨ã—ã¦éžæ­£è¦åŒ–ã™ã‚‹ã‚ˆã‚Šã€Materialized Viewを使用ã—ã¦çµ±è¨ˆã®ã¿ã‚’éžæ­£è¦åŒ–ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„(以下å‚照)。 + +å…¨ã¦ã®æƒ…報をéžæ­£è¦åŒ–ã™ã‚‹å¿…è¦ã¯ãªãã€é »ç¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã‚‹é‡è¦ãªæƒ…å ±ã®ã¿ã‚’éžæ­£è¦åŒ–ã—ã¦ãã ã•ã„。 + +éžæ­£è¦åŒ–ã®ä½œæ¥­ã¯ClickHouseã¾ãŸã¯ä¸Šæµã§å‡¦ç†ã§ãã¾ã™ã€‚例ãˆã°ã€Apache Flinkを使用ã—ã¾ã™ã€‚ + +## é »ç¹ã«æ›´æ–°ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã§ã®éžæ­£è¦åŒ–ã‚’é¿ã‘ã‚‹ + +ClickHouseã®ãŸã‚ã«ã€éžæ­£è¦åŒ–ã¯ã‚¯ã‚¨ãƒªãƒ‘フォーマンスを最é©åŒ–ã™ã‚‹ãŸã‚ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒä½¿ç”¨ã§ãã‚‹ã„ãã¤ã‹ã®ã‚ªãƒ—ションã®1ã¤ã§ã™ãŒã€æ³¨æ„ã—ã¦ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚データãŒé »ç¹ã«æ›´æ–°ã•ã‚Œã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã«è¿‘ã„æ›´æ–°ãŒå¿…è¦ãªå ´åˆã€ã“ã®ã‚¢ãƒ—ローãƒã¯é¿ã‘ã‚‹ã¹ãã§ã™ã€‚メインテーブルãŒä¸»ã«è¿½åŠ ã®ã¿ã§ã‚ã‚‹ã‹ã€ãƒãƒƒãƒã¨ã—ã¦å®šæœŸçš„ã«å†ãƒ­ãƒ¼ãƒ‰ã§ãã‚‹å ´åˆã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +アプローãƒã¨ã—ã¦ã¯ä¸»ã«ã€æ›¸ãè¾¼ã¿ãƒ‘フォーマンスã¨ãƒ‡ãƒ¼ã‚¿ã®æ›´æ–°ã¨ã„ã†1ã¤ã®ä¸»è¦ãªèª²é¡Œã‚’抱ãˆã¦ã„ã¾ã™ã€‚具体的ã«ã¯ã€éžæ­£è¦åŒ–ã¯ãƒ‡ãƒ¼ã‚¿ã®çµåˆã®è²¬ä»»ã‚’クエリ時ã‹ã‚‰ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆæ™‚ã«åŠ¹æžœçš„ã«ç§»ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã‚¯ã‚¨ãƒªãƒ‘フォーマンスãŒå¤§å¹…ã«å‘上ã™ã‚‹ä¸€æ–¹ã§ã€ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆã‚’複雑ã«ã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘イプラインãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã«è¡Œã‚’ClickHouseã«å†æŒ¿å…¥ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¤ã¾ã‚Šã€å˜ä¸€ã®å…ƒãƒ‡ãƒ¼ã‚¿è¡Œã®å¤‰æ›´ã¯ã€ClickHouse内ã®å¤šãã®è¡Œã‚’æ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。複雑ãªã‚¹ã‚­ãƒ¼ãƒžã§ã€ä¸€é€£ã®çµåˆã‹ã‚‰æ§‹æˆã•ã‚ŒãŸè¡ŒãŒã‚ã‚‹å ´åˆã€çµåˆã®ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®1è¡Œã®å¤‰æ›´ã¯ã€æ½œåœ¨çš„ã«ä½•ç™¾ä¸‡ã‚‚ã®è¡Œã‚’æ›´æ–°ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +リアルタイムã§ã“れをé”æˆã™ã‚‹ã®ã¯ç¾å®Ÿçš„ã§ãªã„ã“ã¨ãŒå¤šãã€å¤§ããªæŠ€è¡“的努力ãŒå¿…è¦ã§ã™ã€‚ãã®ç†ç”±ã¯2ã¤ã®èª²é¡Œã«ã‚ˆã‚Šã¾ã™: + +1. テーブル行ãŒå¤‰æ›´ã•ã‚ŒãŸã¨ãã«é©åˆ‡ãªçµåˆã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’トリガーã™ã‚‹ã“ã¨ã§ã™ã€‚ç†æƒ³çš„ã«ã¯çµåˆã®å…¨ã¦ã®ã‚ªãƒ–ジェクトãŒæ›´æ–°ã•ã‚Œã‚‹åŽŸå› ã¨ãªã‚‰ãªã„よã†ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ - 影響をå—ã‘ãŸã‚‚ã®ã ã‘ã§ã™ã€‚高スループット下ã§æ­£ã—ã„è¡Œã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ãŸã‚ã«çµåˆã‚’修正ã—ã€ã“ã®ä½œæ¥­ã‚’実ç¾ã™ã‚‹ã«ã¯å¤–部ツールやエンジニアリングãŒå¿…è¦ã§ã™ã€‚ +1. ClickHouseã§ã®è¡Œã®æ›´æ–°ã«ã¯æ…Žé‡ãªç®¡ç†ãŒå¿…è¦ã§ã€è¿½åŠ ã®è¤‡é›‘ã•ãŒå°Žå…¥ã•ã‚Œã¾ã™ã€‚ + +
+ +ã—ãŸãŒã£ã¦ã€ã™ã¹ã¦ã®éžæ­£è¦åŒ–ã•ã‚ŒãŸã‚ªãƒ–ジェクトを定期的ã«å†ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ãƒãƒƒãƒæ›´æ–°ãƒ—ロセスãŒã‚ˆã‚Šä¸€èˆ¬çš„ã§ã™ã€‚ + +## éžæ­£è¦åŒ–ã®å®Ÿéš›çš„ãªã‚±ãƒ¼ã‚¹ + +éžæ­£è¦åŒ–ãŒç†ã«ã‹ãªã£ã¦ã„ã‚‹å ´åˆã¨ã€ä»–ã®æ–¹æ³•ãŒæœ›ã¾ã—ã„å ´åˆã®å®Ÿéš›çš„ãªä¾‹ã‚’ã„ãã¤ã‹è€ƒãˆã¦ã¿ã¾ã—ょã†ã€‚ + +æ—¢ã«`AnswerCount`ã‚„`CommentCount`ãªã©ã®çµ±è¨ˆãŒéžæ­£è¦åŒ–ã•ã‚Œã¦ã„ã‚‹`Posts`テーブルを考ãˆã¦ã¿ã¾ã™ã€‚ソースデータãŒã“ã®å½¢ã§æä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚実際ã€ã“ã‚Œã¯é »ç¹ã«å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒé«˜ã„ãŸã‚ã€å®Ÿéš›ã«ã¯ã“ã®æƒ…報を正è¦åŒ–ã—ãŸã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“れらã®å¤šãã®ã‚«ãƒ©ãƒ ã‚‚ä»–ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰åˆ©ç”¨å¯èƒ½ã§ã™ 例ãˆã°ã€æŠ•ç¨¿ã«å¯¾ã™ã‚‹ã‚³ãƒ¡ãƒ³ãƒˆã¯`PostId`カラムã¨`Comments`テーブルを介ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚例示目的ã®ãŸã‚ã€æŠ•ç¨¿ãŒãƒãƒƒãƒãƒ—ロセスã§å†ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ + +ã¾ãŸã€åˆ†æžã®ãŸã‚ã®ãƒ¡ã‚¤ãƒ³ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦`Posts`ã«ä»–ã®ãƒ†ãƒ¼ãƒ–ルをéžæ­£è¦åŒ–ã™ã‚‹ã ã‘を考ãˆã¾ã™ã€‚éžæ­£è¦åŒ–ã¯ã€åŒã˜è€ƒæ…®äº‹é …ãŒé©ç”¨ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã®ãŸã‚ã«ä»–ã®æ–¹å‘性ã«ã‚‚é©ã—ã¦ã„ã¾ã™ã€‚ + +*以下ã®å„例ã§ã¯ã€ã©ã¡ã‚‰ã®ãƒ†ãƒ¼ãƒ–ルもçµåˆã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªãŒå­˜åœ¨ã™ã‚‹ã¨æƒ³å®šã—ã¾ã™ã€‚* + +### Posts 㨠Votes + +Votesã¯åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®æœ€é©åŒ–ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã¯ä»¥ä¸‹ã«ç¤ºã•ã‚Œã¦ãŠã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ãŸã‚ã®æŒ¿å…¥ã‚³ãƒžãƒ³ãƒ‰ã‚‚示ã•ã‚Œã¦ã„ã¾ã™ï¼š + +```sql +CREATE TABLE votes +( + `Id` UInt32, + `PostId` Int32, + `VoteTypeId` UInt8, + `CreationDate` DateTime64(3, 'UTC'), + `UserId` Int32, + `BountyAmount` UInt8 +) +ENGINE = MergeTree +ORDER BY (VoteTypeId, CreationDate, PostId) + +INSERT INTO votes SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/votes/*.parquet') + +0 rows in set. Elapsed: 26.272 sec. Processed 238.98 million rows, 2.13 GB (9.10 million rows/s., 80.97 MB/s.) +``` + +一見ã€ã“れらã¯æŠ•ç¨¿ãƒ†ãƒ¼ãƒ–ルã§éžæ­£è¦åŒ–ã™ã‚‹ãŸã‚ã®å€™è£œã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã—ã‹ã—ã€ã“ã®ã‚¢ãƒ—ローãƒã«ã¯ã„ãã¤ã‹ã®èª²é¡ŒãŒã‚ã‚Šã¾ã™ã€‚ + +投票ã¯é »ç¹ã«æŠ•ç¨¿ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚時間ãŒçµŒã¤ã«ã¤ã‚Œã¦æŠ•ç¨¿ã”ã¨ã«æ¸›å°‘ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã¯ã€3万件ã®æŠ•ç¨¿ã«å¯¾ã—ã¦æ™‚é–“ã‚ãŸã‚Šç´„4万件ã®æŠ•ç¥¨ãŒã‚ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +```sql +SELECT round(avg(c)) AS avg_votes_per_hr, round(avg(posts)) AS avg_posts_per_hr +FROM +( + SELECT + toStartOfHour(CreationDate) AS hr, + count() AS c, + uniq(PostId) AS posts + FROM votes + GROUP BY hr +) + +┌─avg_votes_per_hr─┬─avg_posts_per_hr─┠+│ 41759 │ 33322 │ +└──────────────────┴──────────────────┘ +``` + +é…延ãŒè¨±å®¹ã§ãã‚‹å ´åˆã¯ãƒãƒƒãƒå‡¦ç†ã§å¯¾ç­–ã§ãã¾ã™ãŒã€ã“ã‚Œã§ã‚‚更新を処ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€å…¨ã¦ã®æŠ•ç¨¿ã‚’定期的ã«å†ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ï¼ˆæœ›ã¾ã—ã„ã¨ã¯é™ã‚Šã¾ã›ã‚“)必è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ã•ã‚‰ã«å•é¡Œãªã®ã¯ã€ã„ãã¤ã‹ã®æŠ•ç¨¿ã«ã¯éžå¸¸ã«å¤šãã®æŠ•ç¥¨ãŒã‚ã‚‹ã“ã¨ã§ã™ï¼š + +```sql +SELECT PostId, concat('https://stackoverflow.com/questions/', PostId) AS url, count() AS c +FROM votes +GROUP BY PostId +ORDER BY c DESC +LIMIT 5 + +┌───PostId─┬─url──────────────────────────────────────────┬─────c─┠+│ 11227902 │ https://stackoverflow.com/questions/11227902 │ 35123 │ +│ 927386 │ https://stackoverflow.com/questions/927386 │ 29090 │ +│ 11227809 │ https://stackoverflow.com/questions/11227809 │ 27475 │ +│ 927358 │ https://stackoverflow.com/questions/927358 │ 26409 │ +│ 2003515 │ https://stackoverflow.com/questions/2003515 │ 25899 │ +└──────────┴──────────────────────────────────────────────┴───────┘ +``` + +ã“ã“ã§ã®ä¸»ãªè¦³å¯Ÿç‚¹ã¯ã€å„投稿ã®é›†è¨ˆã•ã‚ŒãŸæŠ•ç¥¨çµ±è¨ˆãŒã»ã¨ã‚“ã©ã®åˆ†æžã«ã¯å分ã§ã‚ã‚‹ã¨ã„ã†ã“ã¨ã§ã™ - å…¨ã¦ã®æŠ•ç¥¨æƒ…報をéžæ­£è¦åŒ–ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。例ãˆã°ã€ç¾åœ¨ã®`Score`カラムã¯ä¾‹ãˆã°ç·ã‚¢ãƒƒãƒ—票数ã¨ç·ãƒ€ã‚¦ãƒ³ç¥¨æ•°ã®å·®ã¨ã„ã†çµ±è¨ˆã‚’表ã—ã¦ã„ã¾ã™ã€‚ç†æƒ³çš„ã«ã¯ã€ã‚·ãƒ³ãƒ—ルãªãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—ã§ã‚¯ã‚¨ãƒªæ™‚ã«ã“れらã®çµ±è¨ˆã‚’å–å¾—ã§ãる([dictionaries](/ja/dictionary)å‚照)ã¨è‰¯ã„ã§ã—ょã†ã€‚ + +### Users 㨠Badges + +次ã«`Users`ã¨`Badges`を考ãˆã¦ã¿ã¾ã—ょã†ï¼š + +Usersã¨Badgesã®ã‚¹ã‚­ãƒ¼ãƒž + +

+ã¾ãšä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使ã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ï¼š +

+ +```sql +CREATE TABLE users +( + `Id` Int32, + `Reputation` LowCardinality(String), + `CreationDate` DateTime64(3, 'UTC') CODEC(Delta(8), ZSTD(1)), + `DisplayName` String, + `LastAccessDate` DateTime64(3, 'UTC'), + `AboutMe` String, + `Views` UInt32, + `UpVotes` UInt32, + `DownVotes` UInt32, + `WebsiteUrl` String, + `Location` LowCardinality(String), + `AccountId` Int32 +) +ENGINE = MergeTree +ORDER BY (Id, CreationDate) +``` + +```sql +CREATE TABLE badges +( + `Id` UInt32, + `UserId` Int32, + `Name` LowCardinality(String), + `Date` DateTime64(3, 'UTC'), + `Class` Enum8('Gold' = 1, 'Silver' = 2, 'Bronze' = 3), + `TagBased` Bool +) +ENGINE = MergeTree +ORDER BY UserId + +INSERT INTO users SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/users.parquet') + +0 rows in set. Elapsed: 26.229 sec. Processed 22.48 million rows, 1.36 GB (857.21 thousand rows/s., 51.99 MB/s.) + +INSERT INTO badges SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/badges.parquet') + +0 rows in set. Elapsed: 18.126 sec. Processed 51.29 million rows, 797.05 MB (2.83 million rows/s., 43.97 MB/s.) +``` + +ユーザーã¯é »ç¹ã«ãƒãƒƒã‚¸ã‚’ç²å¾—ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’1日以上ã«ã‚ãŸã£ã¦æ›´æ–°ã™ã‚‹å¿…è¦ã¯ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ãƒãƒƒã‚¸ã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®é–¢ä¿‚ã¯ä¸€å¯¾å¤šã§ã™ã€‚タプルã®ãƒªã‚¹ãƒˆã¨ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ãƒãƒƒã‚¸ã‚’å˜ç´”ã«éžæ­£è¦åŒ–ã§ããªã„ã§ã—ょã†ã‹ï¼Ÿ å¯èƒ½ã§ã™ãŒã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‹ã‚‰ç¢ºèªã™ã‚‹ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã”ã¨ã®ãƒãƒƒã‚¸ã®æœ€é«˜æ•°ãŒç†æƒ³çš„ã§ãªã„ã“ã¨ã‚’示唆ã—ã¦ã„ã¾ã™ï¼š + +```sql +SELECT UserId, count() AS c FROM badges GROUP BY UserId ORDER BY c DESC LIMIT 5 + +┌─UserId─┬─────c─┠+│ 22656 │ 19334 │ +│ 6309 │ 10516 │ +│ 100297 │ 7848 │ +│ 157882 │ 7574 │ +│ 29407 │ 6512 │ +└────────┴───────┘ +``` + +19k以上ã®ã‚ªãƒ–ジェクトをå˜ä¸€è¡Œã«éžæ­£è¦åŒ–ã™ã‚‹ã®ã¯ç¾å®Ÿçš„ã§ã¯ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 ã“ã®é–¢ä¿‚ã¯åˆ¥ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦æ®‹ã™ã‹ã€çµ±è¨ˆã‚’追加ã™ã‚‹ã®ãŒè‰¯ã„ã§ã—ょã†ã€‚ + +> ãƒãƒƒã‚¸ã®çµ±è¨ˆã‚’ユーザーã«å¯¾ã—ã¦éžæ­£è¦åŒ–ã—ãŸã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã®æŒ¿å…¥æ™‚ã«dictionariesを使用ã—ãŸä¾‹ã‚’考慮ã—ã¦ã„ã¾ã™ã€‚ + +### Posts 㨠PostLinks + +`PostLinks`ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒé–¢é€£ã—ã¦ã„ã‚‹ã¾ãŸã¯é‡è¤‡ã—ã¦ã„ã‚‹ã¨è€ƒãˆã‚‹`Posts`を接続ã—ã¾ã™ã€‚ 以下ã®ã‚¯ã‚¨ãƒªã¯ã‚¹ã‚­ãƒ¼ãƒžã¨ãƒ­ãƒ¼ãƒ‰ã‚³ãƒžãƒ³ãƒ‰ã‚’示ã—ã¦ã„ã¾ã™ï¼š + +```sql +CREATE TABLE postlinks +( + `Id` UInt64, + `CreationDate` DateTime64(3, 'UTC'), + `PostId` Int32, + `RelatedPostId` Int32, + `LinkTypeId` Enum('Linked' = 1, 'Duplicate' = 3) +) +ENGINE = MergeTree +ORDER BY (PostId, RelatedPostId) + +INSERT INTO postlinks SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/postlinks.parquet') + +0 rows in set. Elapsed: 4.726 sec. Processed 6.55 million rows, 129.70 MB (1.39 million rows/s., 27.44 MB/s.) +``` + +éžæ­£è¦åŒ–を防ã投稿ã®å¤šãã®ãƒªãƒ³ã‚¯ãŒãªã„ã“ã¨ã‚’確èªã§ãã¾ã™ï¼š + +```sql +SELECT PostId, count() AS c +FROM postlinks +GROUP BY PostId +ORDER BY c DESC LIMIT 5 + +┌───PostId─┬───c─┠+│ 22937618 │ 125 │ +│ 9549780 │ 120 │ +│ 3737139 │ 109 │ +│ 18050071 │ 103 │ +│ 25889234 │ 82 │ +└──────────┴─────┘ +``` + +åŒæ§˜ã«ã€ã“れらã®ãƒªãƒ³ã‚¯ã¯æ¥µç«¯ã«é »ç¹ã«ç™ºç”Ÿã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã§ã¯ã‚ã‚Šã¾ã›ã‚“: + +```sql +SELECT + round(avg(c)) AS avg_votes_per_hr, + round(avg(posts)) AS avg_posts_per_hr +FROM +( + SELECT + toStartOfHour(CreationDate) AS hr, + count() AS c, + uniq(PostId) AS posts + FROM postlinks + GROUP BY hr +) + +┌─avg_votes_per_hr─┬─avg_posts_per_hr─┠+│ 54 │ 44 │ +└──────────────────┴──────────────────┘ +``` + +ã“れを以下ã®éžæ­£è¦åŒ–ã®ä¾‹ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +### シンプルãªçµ±è¨ˆã®ä¾‹ + +ã»ã¨ã‚“ã©ã®å ´åˆã€éžæ­£è¦åŒ–ã¯è¦ªè¡Œã«å˜ä¸€ã®ã‚«ãƒ©ãƒ ã¾ãŸã¯çµ±è¨ˆã‚’追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€è¤‡è£½æŠ•ç¨¿ã®æ•°ã§æŠ•ç¨¿ã‚’豊ã‹ã«ã—ãŸã„å ´åˆã¯ã€å˜ä¸€ã®ã‚«ãƒ©ãƒ ã‚’追加ã™ã‚‹ã ã‘ã§ã™ã€‚ + +```sql +CREATE TABLE posts_with_duplicate_count +( + `Id` Int32 CODEC(Delta(4), ZSTD(1)), + ... -other columns + `DuplicatePosts` UInt16 +) ENGINE = MergeTree +ORDER BY (PostTypeId, toDate(CreationDate), CommentCount) +``` + +ã“ã®ãƒ†ãƒ¼ãƒ–ルを埋ã‚ã‚‹ãŸã‚ã«ã€é‡è¤‡çµ±è¨ˆã¨æŠ•ç¨¿ã‚’çµåˆã™ã‚‹`INSERT INTO SELECT`を利用ã—ã¾ã™ã€‚ + +```sql +INSERT INTO posts_with_duplicate_count SELECT + posts.*, + DuplicatePosts +FROM posts AS posts +LEFT JOIN +( + SELECT PostId, countIf(LinkTypeId = 'Duplicate') AS DuplicatePosts + FROM postlinks + GROUP BY PostId +) AS postlinks ON posts.Id = postlinks.PostId +``` + +### 多対一ã®é–¢ä¿‚ã«å¯¾ã™ã‚‹è¤‡é›‘ãªåž‹ã®æ´»ç”¨ + +éžæ­£è¦åŒ–ã‚’è¡Œã†ãŸã‚ã«ã¯ã€è¤‡é›‘ãªåž‹ã‚’活用ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ãŒå¤šã„ã§ã™ã€‚一対一ã®é–¢ä¿‚ãŒéžæ­£è¦åŒ–ã•ã‚Œã€ã‚«ãƒ©ãƒ ãŒå°‘ãªã„å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã“れらを元ã®åž‹ã®ã¾ã¾è¡Œã¨ã—ã¦è¿½åŠ ã§ãã¾ã™ã€‚ã—ã‹ã—ã€ã‚ˆã‚Šå¤§ããªã‚ªãƒ–ジェクトや一対多ã®é–¢ä¿‚ã§ã“ã‚Œã¯æœ›ã¾ã—ããªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +複雑ãªã‚ªãƒ–ジェクトや一対多ã®é–¢ä¿‚ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä»¥ä¸‹ã‚’使用ã§ãã¾ã™ï¼š + +- åå‰ä»˜ãタプル - 複雑ãªæ§‹é€ ã‚’列ã®é›†åˆã¨ã—ã¦è¡¨ç¾ã—ã¾ã™ã€‚ +- Array(Tuple) ã¾ãŸã¯ Nested - åå‰ä»˜ãタプルã®é…列ã€ã¤ã¾ã‚ŠNestedã€å„エントリãŒã‚ªãƒ–ジェクトを表ç¾ã—ã¾ã™ã€‚一対多ã®é–¢ä¿‚ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +例ã¨ã—ã¦ã€`PostLinks`ã‚’`Posts`ã«éžæ­£è¦åŒ–ã™ã‚‹éŽç¨‹ã‚’示ã—ã¾ã™ã€‚ + +å„投稿ã¯ä»–ã®æŠ•ç¨¿ã¸ã®ãƒªãƒ³ã‚¯ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚以å‰ã«ç¤ºã—ãŸ`PostLinks`スキーマã¨ã—ã¦ã€‚ãƒã‚¹ãƒˆã•ã‚ŒãŸåž‹ã¨ã—ã¦ã€ãƒªãƒ³ã‚¯ã¨é‡è¤‡ã—ãŸæŠ•ç¨¿ã‚’以下ã®ã‚ˆã†ã«è¡¨ç¾ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +SET flatten_nested=0 +CREATE TABLE posts_with_links +( + `Id` Int32 CODEC(Delta(4), ZSTD(1)), + ... -other columns + `LinkedPosts` Nested(CreationDate DateTime64(3, 'UTC'), PostId Int32), + `DuplicatePosts` Nested(CreationDate DateTime64(3, 'UTC'), PostId Int32), +) ENGINE = MergeTree +ORDER BY (PostTypeId, toDate(CreationDate), CommentCount) +``` + +> ãƒã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã®ãƒ•ãƒ©ãƒƒãƒˆåŒ–を無効ã«ã™ã‚‹è¨­å®š `flatten_nested=0` ã®ä½¿ç”¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 ãƒã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã®ãƒ•ãƒ©ãƒƒãƒˆåŒ–を無効ã«ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¦ã„ã¾ã™ã€‚ + +`OUTER JOIN`クエリを使ã£ãŸ`INSERT INTO SELECT`ã§ã“ã®éžæ­£è¦åŒ–を実行ã§ãã¾ã™ï¼š + +```sql +INSERT INTO posts_with_links +SELECT + posts.*, + arrayMap(p -> (p.1, p.2), arrayFilter(p -> p.3 = 'Linked' AND p.2 != 0, Related)) AS LinkedPosts, + arrayMap(p -> (p.1, p.2), arrayFilter(p -> p.3 = 'Duplicate' AND p.2 != 0, Related)) AS DuplicatePosts +FROM posts +LEFT JOIN ( + SELECT + PostId, + groupArray((CreationDate, RelatedPostId, LinkTypeId)) AS Related + FROM postlinks + GROUP BY PostId +) AS postlinks ON posts.Id = postlinks.PostId + +0 rows in set. Elapsed: 155.372 sec. Processed 66.37 million rows, 76.33 GB (427.18 thousand rows/s., 491.25 MB/s.) +Peak memory usage: 6.98 GiB. +``` + +> ã“ã“ã§ã®æ™‚é–“ã«æ³¨æ„ã—ã¦ãã ã•ã„。約2分ã§6600万行をéžæ­£è¦åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã—ãŸã€‚後ã§è¦‹ã‚‹ã‚ˆã†ã«ã€ã“ã‚Œã¯ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ãã‚‹æ“作ã§ã™ã€‚ + +`PostId`ã”ã¨ã«`PostLinks`ã‚’é…列ã«åœ§ç¸®ã™ã‚‹ãŸã‚ã«`groupArray`関数を使用ã—ã¦çµåˆå‰ã«è¡Œã„ã¾ã™ã€‚次ã«ã“ã®é…列をã€`LinkedPosts`ã¨`DuplicatePosts`ã®2ã¤ã®ã‚µãƒ–リストã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã€å¤–部çµåˆã‹ã‚‰ã®ç©ºã®çµæžœã‚’除外ã—ã¾ã™ã€‚ + +æ–°ã—ã„éžæ­£è¦åŒ–ã•ã‚ŒãŸæ§‹é€ ã‚’見るãŸã‚ã«ã„ãã¤ã‹ã®è¡Œã‚’é¸æŠžã§ãã¾ã™ï¼š + +```sql +SELECT LinkedPosts, DuplicatePosts +FROM posts_with_links +WHERE (length(LinkedPosts) > 2) AND (length(DuplicatePosts) > 0) +LIMIT 1 +FORMAT Vertical + +Row 1: +────── +LinkedPosts: [('2017-04-11 11:53:09.583',3404508),('2017-04-11 11:49:07.680',3922739),('2017-04-11 11:48:33.353',33058004)] +DuplicatePosts: [('2017-04-11 12:18:37.260',3922739),('2017-04-11 12:18:37.260',33058004)] +``` + +## éžæ­£è¦åŒ–ã®ã‚ªãƒ¼ã‚±ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã¨ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚° + +### ãƒãƒƒãƒ + +éžæ­£è¦åŒ–を利用ã™ã‚‹ã«ã¯ã€ãれを実行ã—ã€ã‚ªãƒ¼ã‚±ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã§ãる変æ›ãƒ—ロセスãŒå¿…è¦ã§ã™ã€‚ + +上記ã§ç¤ºã—ãŸã‚ˆã†ã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’ロードã—ãŸå¾Œã«`INSERT INTO SELECT`を通ã˜ã¦ã“ã®å¤‰æ›ã‚’実行ã§ãã¾ã™ã€‚ã“ã‚Œã¯å®šæœŸçš„ãªãƒãƒƒãƒå¤‰æ›ã«é©ã—ã¦ã„ã¾ã™ã€‚ + +ユーザーã¯ã€å®šæœŸçš„ãªãƒãƒƒãƒãƒ­ãƒ¼ãƒ‰ãƒ—ロセスãŒè¨±å®¹ã•ã‚Œã‚‹ã‚‚ã®ã¨ã™ã‚‹ã¨ã€ClickHouseã§ã“れをオーケストレーションã™ã‚‹ãŸã‚ã®ã„ãã¤ã‹ã®ã‚ªãƒ—ションをæŒã£ã¦ã„ã¾ã™ï¼š + +- **外部ツール** - [dbt](https://www.getdbt.com/)ã‚„[Airflow](https://airflow.apache.org/)ãªã©ã®ãƒ„ールを利用ã—ã¦å¤‰æ›ã‚’定期的ã«ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã—ã¾ã™ã€‚ [ClickHouseã®dbtçµ±åˆ](/ja/integrations/dbt)ã¯ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒä½œæˆã•ã‚Œã€ãã®å¾ŒåŽŸå­ã«é–¢é€£ã™ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨äº¤æ›ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ï¼ˆ[EXCHANGE](/ja/sql-reference/statements/exchange)コマンドを介ã—ã¦ï¼‰ã€‚ +- **[Refreshable Materialized Views(エクスペリメンタル)](/ja/materialized-view/refreshable-materialized-view)** - æ›´æ–°å¯èƒ½ãªãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯ã€ã‚¯ã‚¨ãƒªã®çµæžœãŒã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«é€ã‚‰ã‚Œã‚‹ã‚ˆã†ã«å®šæœŸçš„ã«ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚クエリãŒå®Ÿè¡Œã•ã‚Œã‚‹ã¨ã€ãƒ“ューã¯ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルãŒåŽŸå­ã«æ›´æ–°ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ClickHouseãƒã‚¤ãƒ†ã‚£ãƒ–ãªæ–¹æ³•ã§ã“ã®ä½œæ¥­ã‚’スケジュールã™ã‚‹ã‚‚ã®ã§ã™ã€‚ + +### ストリーミング + +ユーザーã¯ã€ä»£ã‚ã‚Šã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°æŠ€è¡“ã€ä¾‹ãˆã°[Apache Flink](https://flink.apache.org/)を使用ã—ã¦ã€ClickHouseã®å¤–部ã§æŒ¿å…¥å‰ã«ã“れを実行ã™ã‚‹ã“ã¨ã‚’希望ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。代ã‚ã‚Šã«ã€ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãª[マテリアライズドビュー](/ja/guides/developer/cascading-materialized-views)を使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãŒæŒ¿å…¥ã•ã‚Œã‚‹ã¨ã“ã®ãƒ—ロセスを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ diff --git a/docs/ja/data-modeling/images/denormalization-diagram.png b/docs/ja/data-modeling/images/denormalization-diagram.png new file mode 100644 index 00000000000..54e4def8d3e Binary files /dev/null and b/docs/ja/data-modeling/images/denormalization-diagram.png differ diff --git a/docs/ja/data-modeling/images/denormalization-schema.png b/docs/ja/data-modeling/images/denormalization-schema.png new file mode 100644 index 00000000000..6a1ea8703a2 Binary files /dev/null and b/docs/ja/data-modeling/images/denormalization-schema.png differ diff --git a/docs/ja/data-modeling/images/schema-design-indices.png b/docs/ja/data-modeling/images/schema-design-indices.png new file mode 100644 index 00000000000..381771653df Binary files /dev/null and b/docs/ja/data-modeling/images/schema-design-indices.png differ diff --git a/docs/ja/data-modeling/images/schema-design-types.png b/docs/ja/data-modeling/images/schema-design-types.png new file mode 100644 index 00000000000..94b3782b29d Binary files /dev/null and b/docs/ja/data-modeling/images/schema-design-types.png differ diff --git a/docs/ja/data-modeling/images/stackoverflow-schema.png b/docs/ja/data-modeling/images/stackoverflow-schema.png new file mode 100644 index 00000000000..749a2dc0c36 Binary files /dev/null and b/docs/ja/data-modeling/images/stackoverflow-schema.png differ diff --git a/docs/ja/data-modeling/schema-design.md b/docs/ja/data-modeling/schema-design.md new file mode 100644 index 00000000000..360fd0d740a --- /dev/null +++ b/docs/ja/data-modeling/schema-design.md @@ -0,0 +1,334 @@ +--- +slug: /ja/data-modeling/schema-design +title: スキーマ設計 +description: ClickHouse スキーマã®ã‚¯ã‚¨ãƒªãƒ‘フォーマンス最é©åŒ– +keywords: [スキーマ, スキーマ設計, クエリ最é©åŒ–] +--- + +効果的ãªã‚¹ã‚­ãƒ¼ãƒžè¨­è¨ˆã‚’ç†è§£ã™ã‚‹ã“ã¨ã¯ã€ClickHouse ã®ãƒ‘フォーマンスを最é©åŒ–ã™ã‚‹éµã§ã‚ã‚Šã€ã“ã‚Œã¯å¤šãã®å ´åˆãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ã‚’ä¼´ã†é¸æŠžè‚¢ã‚’å«ã¿ã¾ã™ã€‚最é©ãªã‚¢ãƒ—ローãƒã¯æä¾›ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã‚„データã®æ›´æ–°é »åº¦ã€ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·è¦ä»¶ã€ãƒ‡ãƒ¼ã‚¿é‡ãªã©ã®è¦å› ã«ä¾å­˜ã—ã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ClickHouse ã®ãƒ‘フォーマンスを最é©åŒ–ã™ã‚‹ãŸã‚ã®ã‚¹ã‚­ãƒ¼ãƒžè¨­è¨ˆã®ãƒ™ã‚¹ãƒˆãƒ—ラクティスã¨ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒªãƒ³ã‚°æŠ€æ³•ã®æ¦‚è¦ã‚’æä¾›ã—ã¾ã™ã€‚ + +## Stack Overflow データセット + +ã“ã®ã‚¬ã‚¤ãƒ‰ã®ä¾‹ã§ã¯ã€Stack Overflow データセットã®ã‚µãƒ–セットを使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€2008å¹´ã‹ã‚‰2024å¹´4月ã¾ã§ã€Stack Overflow ã§ç™ºç”Ÿã—ãŸã™ã¹ã¦ã®æŠ•ç¨¿ã€æŠ•ç¥¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ã‚³ãƒ¡ãƒ³ãƒˆã€ãƒãƒƒã‚¸ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ã€ä»¥ä¸‹ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—㦠Parquet フォーマット㧠S3 ãƒã‚±ãƒƒãƒˆ `s3://datasets-documentation/stackoverflow/parquet/` ã«ã¦å…¬é–‹ã•ã‚Œã¦ã„ã¾ã™: + +> 指定ã•ã‚ŒãŸä¸»ã‚­ãƒ¼ã¨ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚·ãƒƒãƒ—ã¯åˆ¶ç´„を通ã˜ã¦å¼·åˆ¶ã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã§ã¯ãªã (Parquet ã¯ãƒ•ã‚¡ã‚¤ãƒ«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã‚りテーブルフォーマットã§ã¯ãªã„ãŸã‚)ã€ãƒ‡ãƒ¼ã‚¿ãŒã©ã®ã‚ˆã†ã«é–¢ä¿‚ã—ã¦ãŠã‚Šã€ã©ã®ã‚ˆã†ãªãƒ¦ãƒ‹ãƒ¼ã‚¯ã‚­ãƒ¼ã‚’æŒã¤ã‹ã‚’å˜ã«ç¤ºã—ã¦ã„ã¾ã™ã€‚ + +Stack Overflow スキーマ + +
+ +Stack Overflow データセットã«ã¯ã€ã„ãã¤ã‹ã®é–¢é€£ãƒ†ãƒ¼ãƒ–ルãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã„ã‹ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã‚¿ã‚¹ã‚¯ã«ãŠã„ã¦ã‚‚ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã¾ãšä¸»ãƒ†ãƒ¼ãƒ–ルã®ãƒ­ãƒ¼ãƒ‰ã«é›†ä¸­ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ãã‚Œã¯å¿…ãšã—も最大ã®ãƒ†ãƒ¼ãƒ–ルã§ã‚ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€ã‚€ã—ã‚ã‚ãªãŸãŒæœ€ã‚‚分æžã‚¯ã‚¨ãƒªã‚’å—ã‘å–ã‚‹ã¨äºˆæƒ³ã—ã¦ã„るテーブルã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ç‰¹ã« OLTP 背景ã‹ã‚‰ç§»è¡Œã™ã‚‹å ´åˆã€ClickHouse ã®ä¸»ãªæ¦‚念ã¨åž‹ã«æ…£ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ClickHouse ã®æ©Ÿèƒ½ã‚’完全ã«æ´»ç”¨ã—最é©ãªãƒ‘フォーマンスを得るãŸã‚ã«ã€è¿½åŠ ã®ãƒ†ãƒ¼ãƒ–ルãŒè¿½åŠ ã•ã‚Œã‚‹ã«ã¤ã‚Œã¦å†ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ãŒå¿…è¦ã«ãªã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +上記ã®ã‚¹ã‚­ãƒ¼ãƒžã¯ã€ã“ã®ã‚¬ã‚¤ãƒ‰ã®ç›®çš„ã®ãŸã‚ã«æ„図的ã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +## åˆæœŸã‚¹ã‚­ãƒ¼ãƒžã®ç¢ºç«‹ + +`posts` テーブルã¯ã»ã¨ã‚“ã©ã®åˆ†æžã‚¯ã‚¨ãƒªã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã¨ãªã‚‹ãŸã‚ã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ã‚­ãƒ¼ãƒžã‚’確立ã™ã‚‹ã“ã¨ã«ç„¦ç‚¹ã‚’当ã¦ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ S3 ã®ãƒ‘ブリックãƒã‚±ãƒƒãƒˆ `s3://datasets-documentation/stackoverflow/parquet/posts/*.parquet` ã«ã¦å¹´æ¯Žã®ãƒ•ã‚¡ã‚¤ãƒ«ã§æä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +> Parquet フォーマットã§ã® S3 ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ã“ã¨ã¯ã€æœ€ã‚‚一般的ã§å¥½ã¾ã—ã„ ClickHouse ã«ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹æ–¹æ³•ã§ã™ã€‚ClickHouse 㯠Parquet ã®å‡¦ç†ã«æœ€é©åŒ–ã•ã‚Œã¦ãŠã‚Šã€S3 ã‹ã‚‰æ¯Žç§’何åƒä¸‡ã‚‚ã®è¡Œã‚’読ã¿è¾¼ã¿ã€æŒ¿å…¥ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +ClickHouse ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®åž‹ã‚’自動的ã«è­˜åˆ¥ã™ã‚‹ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–機能をæä¾›ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€Parquet ã‚’å«ã‚€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã‚’活用ã—ã¦ã€s3 テーブル関数ãŠã‚ˆã³[`DESCRIBE`](/ja/sql-reference/statements/describe-table) コマンドを通ã˜ã¦ ClickHouse ã®åž‹ã‚’識別ã§ãã¾ã™ã€‚以下ã§ã¯ã€ãƒ‘ターン `*.parquet` を使用ã—㦠`stackoverflow/parquet/posts` フォルダ内ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿å–ã£ã¦ã„ã¾ã™ã€‚ + +```sql +DESCRIBE TABLE s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/*.parquet') +SETTINGS describe_compact_output = 1 + +┌─name──────────────────┬─type───────────────────────────┠+│ Id │ Nullable(Int64) │ +│ PostTypeId │ Nullable(Int64) │ +│ AcceptedAnswerId │ Nullable(Int64) │ +│ CreationDate │ Nullable(DateTime64(3, 'UTC')) │ +│ Score │ Nullable(Int64) │ +│ ViewCount │ Nullable(Int64) │ +│ Body │ Nullable(String) │ +│ OwnerUserId │ Nullable(Int64) │ +│ OwnerDisplayName │ Nullable(String) │ +│ LastEditorUserId │ Nullable(Int64) │ +│ LastEditorDisplayName │ Nullable(String) │ +│ LastEditDate │ Nullable(DateTime64(3, 'UTC')) │ +│ LastActivityDate │ Nullable(DateTime64(3, 'UTC')) │ +│ Title │ Nullable(String) │ +│ Tags │ Nullable(String) │ +│ AnswerCount │ Nullable(Int64) │ +│ CommentCount │ Nullable(Int64) │ +│ FavoriteCount │ Nullable(Int64) │ +│ ContentLicense │ Nullable(String) │ +│ ParentId │ Nullable(String) │ +│ CommunityOwnedDate │ Nullable(DateTime64(3, 'UTC')) │ +│ ClosedDate │ Nullable(DateTime64(3, 'UTC')) │ +└───────────────────────┴────────────────────────────────┘ +``` + +> [s3 テーブル関数](/ja/sql-reference/table-functions/s3)ã¯ã€ClickHouse ã‹ã‚‰ S3 内ã®ãƒ‡ãƒ¼ã‚¿ã‚’ãã®ã¾ã¾ã‚¯ã‚¨ãƒªã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€ClickHouse ãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“ã‚Œã«ã‚ˆã‚Šã€æœ€åˆã®éžæœ€é©åŒ–スキーマãŒæä¾›ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯ã€ClickHouse ã¯ã“れらをåŒç­‰ã® Nullable åž‹ã«ãƒžãƒƒãƒ”ングã—ã¾ã™ã€‚ã“ã®åž‹ã‚’使用ã—ã¦ã€ç°¡å˜ãª `CREATE EMPTY AS SELECT` コマンド㧠ClickHouse テーブルを作æˆã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE posts +ENGINE = MergeTree +ORDER BY () EMPTY AS +SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/*.parquet') +``` + +ã„ãã¤ã‹ã®é‡è¦ãªç‚¹: + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ãŸå¾Œã€ç§ãŸã¡ã® posts テーブルã¯ç©ºã§ã™ã€‚データã¯ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã¾ã›ã‚“。 +MergeTree をテーブルエンジンã¨ã—ã¦æŒ‡å®šã—ã¦ã„ã¾ã™ã€‚MergeTree ã¯ãŠãらãã‚ãªãŸãŒæœ€ã‚‚使用ã™ã‚‹ ClickHouse テーブルエンジンã§ã™ã€‚ã“ã‚Œã¯ã€é‰…大ãªãƒ‡ãƒ¼ã‚¿ã®å‡¦ç†ãŒå¯èƒ½ãª ClickHouse ボックス内ã®ä¸‡èƒ½ãƒ„ールã§ã‚ã‚Šã€ã»ã¨ã‚“ã©ã®åˆ†æžãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«å¯¾å¿œã—ã¾ã™ã€‚ä»–ã®ãƒ†ãƒ¼ãƒ–ルエンジンã¯ã€åŠ¹çŽ‡çš„ãªæ›´æ–°ã‚’サãƒãƒ¼ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ CDC ãªã©ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«å­˜åœ¨ã—ã¾ã™ã€‚ + +å¥ `ORDER BY ()` ã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒãªãã€ã‚ˆã‚Šå…·ä½“çš„ã«ã¯ãƒ‡ãƒ¼ã‚¿ã«é †åºãŒãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ã“ã‚Œã«ã¤ã„ã¦ã¯å¾Œã»ã©è©³ç´°ã«èª¬æ˜Žã—ã¾ã™ãŒã€ä»Šã¯ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªãŒç·šå½¢ã‚¹ã‚­ãƒ£ãƒ³ã‚’å¿…è¦ã¨ã™ã‚‹ã“ã¨ã‚’知ã£ã¦ãŠã„ã¦ãã ã•ã„。 + +テーブルãŒä½œæˆã•ã‚ŒãŸã“ã¨ã‚’確èªã™ã‚‹ã«ã¯: + +```sql +SHOW CREATE TABLE posts + +CREATE TABLE posts +( + `Id` Nullable(Int64), + `PostTypeId` Nullable(Int64), + `AcceptedAnswerId` Nullable(Int64), + `CreationDate` Nullable(DateTime64(3, 'UTC')), + `Score` Nullable(Int64), + `ViewCount` Nullable(Int64), + `Body` Nullable(String), + `OwnerUserId` Nullable(Int64), + `OwnerDisplayName` Nullable(String), + `LastEditorUserId` Nullable(Int64), + `LastEditorDisplayName` Nullable(String), + `LastEditDate` Nullable(DateTime64(3, 'UTC')), + `LastActivityDate` Nullable(DateTime64(3, 'UTC')), + `Title` Nullable(String), + `Tags` Nullable(String), + `AnswerCount` Nullable(Int64), + `CommentCount` Nullable(Int64), + `FavoriteCount` Nullable(Int64), + `ContentLicense` Nullable(String), + `ParentId` Nullable(String), + `CommunityOwnedDate` Nullable(DateTime64(3, 'UTC')), + `ClosedDate` Nullable(DateTime64(3, 'UTC')) +) +ENGINE = MergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}') +ORDER BY tuple() +``` + +åˆæœŸã‚¹ã‚­ãƒ¼ãƒžãŒå®šç¾©ã•ã‚ŒãŸã‚‰ã€s3 テーブル関数を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã€`INSERT INTO SELECT` を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’投入ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ã€8コア㮠ClickHouse Cloud インスタンスã§ç´„2分㧠`posts` データをロードã—ã¾ã™ã€‚ + +```sql +INSERT INTO posts SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/*.parquet') + +0 rows in set. Elapsed: 148.140 sec. Processed 59.82 million rows, 38.07 GB (403.80 thousand rows/s., 257.00 MB/s.) +``` + +> 上記ã®ã‚¯ã‚¨ãƒªã¯ 60m 行をロードã—ã¾ã™ã€‚ClickHouse ã«ã¨ã£ã¦å°è¦æ¨¡ã®ãƒ‡ãƒ¼ã‚¿ã§ã™ãŒã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆæŽ¥ç¶šãŒé…ã„ユーザーã¯ãƒ‡ãƒ¼ã‚¿ã®ã‚µãƒ–セットをロードã—ãŸã„å ´åˆãŒã‚ã‚‹ã§ã—ょã†ã€‚ã“ã‚Œã¯ãƒ‘ターン e.g. `https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/2008.parquet` ã¾ãŸã¯ `https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/{2008, 2009}.parquet` を指定ã™ã‚‹ã“ã¨ã§å®Ÿç¾ã§ãã¾ã™ã€‚パターンを使ã£ã¦ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚µãƒ–セットを指定ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](/ja/sql-reference/table-functions/file#globs-in-path)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## åž‹ã®æœ€é©åŒ– + +ClickHouse クエリパフォーマンスã®ç§˜å¯†ã®ã²ã¨ã¤ã¯åœ§ç¸®ã§ã™ã€‚ + +ディスク上ã®ãƒ‡ãƒ¼ã‚¿ãŒå°‘ãªã„ã»ã©ã€I/O ãŒæ¸›ã‚Šã€ã‚¯ã‚¨ãƒªã‚„挿入ãŒé«˜é€Ÿã«ãªã‚Šã¾ã™ã€‚CPU ã«é–¢ã—ã¦ã¯ã€ã„ã‹ãªã‚‹åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚‚ I/O ã®å‰Šæ¸›ã«ã‚ˆã£ã¦ã»ã¨ã‚“ã©ã®å ´åˆä¸Šå›žã‚‹ã§ã—ょã†ã€‚ãã®ãŸã‚ã€ClickHouse クエリãŒé€Ÿã„ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹éš›ã«ã¯ã€æœ€åˆã«ãƒ‡ãƒ¼ã‚¿ã®åœ§ç¸®ã‚’å‘上ã™ã‚‹ã“ã¨ã‚’第一ã®èª²é¡Œã«ã™ã¹ãã§ã™ã€‚ + +> ClickHouse ãŒãƒ‡ãƒ¼ã‚¿ã‚’éžå¸¸ã«åŠ¹çŽ‡ã‚ˆã圧縮ã™ã‚‹ç†ç”±ã«ã¤ã„ã¦ã¯ã€[ã“ã¡ã‚‰ã®è¨˜äº‹](https://clickhouse.com/blog/optimize-clickhouse-codecs-compression-schema) ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚è¦ç´„ã™ã‚‹ã¨ã€åˆ—指å‘データベースã§ã‚ã‚‹ãŸã‚ã€å€¤ã¯ã‚«ãƒ©ãƒ é †ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ã“れらã®å€¤ãŒä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã‚‹ã¨ã€åŒä¸€ã®å€¤ãŒéš£æŽ¥ã—ã¦æ›¸ãè¾¼ã¾ã‚Œã€åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯é€£ç¶šã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ‘ターンを利用ã—ã¾ã™ã€‚ã“ã‚Œã«åŠ ãˆã¦ã€ClickHouse ã«ã¯ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã‚„精密ãªãƒ‡ãƒ¼ã‚¿åž‹ãŒã‚ã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒåœ§ç¸®æŠ€è¡“ã‚’ã•ã‚‰ã«èª¿æ•´ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +ClickHouse ã§ã®åœ§ç¸®ã¯ã€3ã¤ã®ä¸»è¦ãªè¦å› ã«ã‚ˆã£ã¦å½±éŸ¿ã‚’å—ã‘ã¾ã™ï¼šã‚ªãƒ¼ãƒ€ãƒªãƒ³ã‚°ã‚­ãƒ¼ã€ãƒ‡ãƒ¼ã‚¿åž‹ã€ãŠã‚ˆã³ä½¿ç”¨ã™ã‚‹ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã€‚ã“れらã¯ã™ã¹ã¦ã‚¹ã‚­ãƒ¼ãƒžã‚’通ã˜ã¦è¨­å®šã•ã‚Œã¾ã™ã€‚ + +最åˆã®å¤§ããªåœ§ç¸®ã¨ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã®æ”¹å–„ã¯ã€å˜ç´”ãªåž‹æœ€é©åŒ–ã®ãƒ—ロセスを通ã˜ã¦å¾—られã¾ã™ã€‚ã„ãã¤ã‹ã®ç°¡å˜ãªãƒ«ãƒ¼ãƒ«ã‚’é©ç”¨ã™ã‚‹ã“ã¨ã§ã‚¹ã‚­ãƒ¼ãƒžã‚’最é©åŒ–ã§ãã¾ã™: + +- **厳密ãªåž‹ã‚’使用ã™ã‚‹** - 我々ã®åˆæœŸã‚¹ã‚­ãƒ¼ãƒžã¯å¤šãã®ã‚«ãƒ©ãƒ ã§æ–‡å­—列型を使用ã—ã¦ã„ã¾ã™ãŒã€ã“れらã¯æ˜Žã‚‰ã‹ã«æ•°å€¤ã§ã™ã€‚ãã®ãŸã‚ã€é©åˆ‡ãªåž‹ã‚’使用ã™ã‚‹ã“ã¨ã§ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚„集計時ã«æœŸå¾…ã•ã‚Œã‚‹æ„味論を確ä¿ã§ãã¾ã™ã€‚åŒã˜ã“ã¨ãŒã€Parquet ファイルã§æ­£ã—ãæä¾›ã•ã‚Œã¦ã„る日付型ã«ã‚‚当ã¦ã¯ã¾ã‚Šã¾ã™ã€‚ +- **Nullable カラムã®å›žé¿** - 上記ã®ã‚«ãƒ©ãƒ ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ Null ã¨ä»®å®šã•ã‚Œã¦ã„ã¾ã™ã€‚Nullable åž‹ã¯ã‚¯ã‚¨ãƒªãŒç©ºå€¤ã¨ Null 値を区別ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ãŒã€ã“ã‚Œã«ã‚ˆã‚Š UInt8 åž‹ã®åˆ¥ã®ã‚«ãƒ©ãƒ ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã®è¿½åŠ ã®ã‚«ãƒ©ãƒ ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ Nullable カラムをæ“作ã™ã‚‹ãŸã³ã«å‡¦ç†ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã€è¿½åŠ ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒä½¿ç”¨ã•ã‚Œã€ã»ã¼å¸¸ã«ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã«æ‚ªå½±éŸ¿ã‚’与ãˆã¾ã™ã€‚åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ç©ºã®å€¤ã¨ Null ã¨ã®é•ã„ãŒã‚ã‚‹å ´åˆã«é™ã‚Šã€Nullable を使用ã—ã¦ãã ã•ã„。例ãˆã°ã€`ViewCount` カラムã®ç©ºã®å€¤ã«å¯¾ã—㦠0 を扱ã†ã“ã¨ã¯ã€ã»ã¨ã‚“ã©ã®ã‚¯ã‚¨ãƒªã§å•é¡Œãªã影響を与ãˆãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚空ã®å€¤ãŒç•°ãªã‚‹æ‰±ã„ã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã§ã—ã°ã—ã°ã‚¯ã‚¨ãƒªã‹ã‚‰é™¤å¤–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **数値型ã®æœ€å°ç²¾åº¦ã‚’使用ã™ã‚‹** - ClickHouse ã«ã¯ã€ç•°ãªã‚‹æ•°å€¤ç¯„囲ã¨ç²¾åº¦ã«åˆã‚ã›ãŸæ•°å¤šãã®æ•°å€¤åž‹ãŒã‚ã‚Šã¾ã™ã€‚常ã«ã‚«ãƒ©ãƒ ã‚’表ã™ã®ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ“ット数を最å°åŒ–ã™ã‚‹ã“ã¨ã‚’心ãŒã‘ã¦ãã ã•ã„。例ãˆã°ã€ã‚ˆã‚Šå°ã•ãªãƒ“ット数ã®æ•´æ•°ãªã© e.g. Int16 ã«åŠ ãˆã€è² ã§ãªã„ãƒãƒªã‚¢ãƒ³ãƒˆã‚’サãƒãƒ¼ãƒˆã—ã€æœ€å°å€¤ãŒ 0 ã®ç„¡ç¬¦å·åž‹ãŒå­˜åœ¨ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚«ãƒ©ãƒ ã«ä½¿ç”¨ã™ã‚‹ãƒ“ット数を減らã™ã“ã¨ãŒã§ãã¾ã™ã€‚å¯èƒ½ã§ã‚ã‚Œã°ã€ã“れらã®åž‹ã‚’大ããªç„¡ç¬¦å·ãƒãƒªã‚¢ãƒ³ãƒˆã‚ˆã‚Šå„ªå…ˆã•ã›ã‚‹ã¹ãã§ã™ã€‚ +- **日付型ã®æœ€å°ç²¾åº¦** - ClickHouse ã¯ã€ã„ãã¤ã‹ã®æ—¥ä»˜ãŠã‚ˆã³æ—¥æ™‚型をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚Date 㨠Date32 ã¯ç´”粋ãªæ—¥ä»˜ã®ä¿å­˜ã«ä½¿ç”¨ã§ãã€å¾Œè€…ã¯ã‚ˆã‚Šå¤§ããªæ—¥ä»˜ç¯„囲をサãƒãƒ¼ãƒˆã—ã¾ã™ãŒã€ã‚ˆã‚Šå¤šãã®ãƒ“ットを使用ã—ã¾ã™ã€‚DateTime ãŠã‚ˆã³ DateTime64 ã¯æ—¥æ™‚ã®ã‚µãƒãƒ¼ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚DateTime ã¯ç§’å˜ä½ã®ç²¾åº¦ã«åˆ¶é™ã•ã‚Œã¦ãŠã‚Šã€32 ビットを使用ã—ã¾ã™ã€‚DateTime64 ã¯ãã®åã®é€šã‚Š 64 ビットを使用ã—ã¾ã™ãŒãƒŠãƒŽç§’å˜ä½ã¾ã§ã®ç²¾åº¦ã‚’æä¾›ã—ã¾ã™ã€‚常ã«ã‚¯ã‚¨ãƒªã«å¿…è¦ãªæœ€ã‚‚ç²—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’é¸ã³ã€å¿…è¦ãªãƒ“ット数を最å°åŒ–ã—ã¦ãã ã•ã„。 +- **LowCardinality ã®ä½¿ç”¨** - 低数ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯å€¤ã‚’æŒã¤æ•°å€¤ã€æ–‡å­—列ã€Dateã¾ãŸã¯DateTimeカラムã¯ã€LowCardinality 型を使用ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã§ãã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯å€¤ã‚’ディクショナリエンコードã—ã¦ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ã‚µã‚¤ã‚ºã‚’減少ã•ã›ã¾ã™ã€‚1万未満ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯å€¤ã‚’æŒã¤ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦ã“れを考慮ã—ã¦ãã ã•ã„。 +固定長文字列を特別ãªã‚±ãƒ¼ã‚¹ã§ä½¿ç”¨ - 固定長ã®æ–‡å­—列㯠FixedString åž‹ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€ä¾‹ãˆã°è¨€èªžã‚„通貨コード。ã“ã®ç¨®ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯ãƒ‡ãƒ¼ã‚¿ãŒæ­£ç¢ºã« N ãƒã‚¤ãƒˆã®é•·ã•ã‚’æŒã¤æ™‚ã«åŠ¹çŽ‡çš„ã§ã™ã€‚ãã®ä»–ã®å ´åˆã«ãŠã„ã¦ã¯ã€åŠ¹çŽ‡ã‚’低下ã•ã›ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€LowCardinality ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ +- **データ検証ã«å¯¾ã™ã‚‹åˆ—挙型ã®åˆ©ç”¨** - Enum åž‹ã¯åˆ—挙型を効率的ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚Enum ã¯ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå€¤ã‚’æ ¼ç´ã™ã‚‹å¿…è¦ã«å¿œã˜ã¦ 8 ビットã¾ãŸã¯ 16 ビットã«ãªã‚Šå¾—ã¾ã™ã€‚ã“ã®åž‹ã®åˆ©ç”¨ã‚’検討ã™ã‚‹éš›ã«ã¯ã€ç™»éŒ²ã•ã‚Œã¦ã„ãªã„値を挿入時ã«æ‹’å¦ã™ã‚‹é–¢é€£æ¤œè¨¼ã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã‚„列挙ã•ã‚ŒãŸå€¤ã«è‡ªç„¶ãªé †åºãŒã‚ã‚Šã€ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹å ´åˆãªã©ã‚’考慮ã—ã¦ãã ã•ã„。例ã¨ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ•ã‚£ãƒ¼ãƒ‰ãƒãƒƒã‚¯ã‚«ãƒ©ãƒ ãŒ `Enum(':(' = 1, ':|' = 2, ':)' = 3)` ã‚’å«ã‚€å ´åˆãŒæŒ™ã’られã¾ã™ã€‚ + +> ヒント: ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã®ç¯„囲ãŠã‚ˆã³ãƒ¦ãƒ‹ãƒ¼ã‚¯å€¤ã®æ•°ã‚’見ã¤ã‘ã‚‹ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ç°¡å˜ãªã‚¯ã‚¨ãƒª `SELECT * APPLY min, * APPLY max, * APPLY uniq FROM table FORMAT Vertical` を使用ã§ãã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ¼ã‚¿ã®å°ã•ãªã‚µãƒ–セットã«å¯¾ã—ã¦ã®å®Ÿè¡Œã‚’ãŠå‹§ã‚ã—ã¾ã™ã€ã¨ã„ã†ã®ã‚‚ã“ã®ã‚¯ã‚¨ãƒªã¯é«˜è² è·ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªãŒæ•°å€¤ã‚’正確ã«ç‰¹å®šã™ã‚‹ãŸã‚ã«ã¯ã€å°‘ãªãã¨ã‚‚定義ãŒå¿…è¦ã§ã™ã€‚ã“ã‚Œã¯æ–‡å­—列ã§ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +ã“れらã®å˜ç´”ãªãƒ«ãƒ¼ãƒ«ã‚’ posts テーブルã«é©ç”¨ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€å„カラムã®æœ€é©ãªåž‹ã‚’特定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +Stack Overflow スキーマ + +
+ +上記を元ã«ä»¥ä¸‹ã®ã‚¹ã‚­ãƒ¼ãƒžãŒç¤ºã•ã‚Œã¾ã™ï¼š + +```sql +CREATE TABLE posts_v2 +( + `Id` Int32, + `PostTypeId` Enum('Question' = 1, 'Answer' = 2, 'Wiki' = 3, 'TagWikiExcerpt' = 4, 'TagWiki' = 5, 'ModeratorNomination' = 6, 'WikiPlaceholder' = 7, 'PrivilegeWiki' = 8), + `AcceptedAnswerId` UInt32, + `CreationDate` DateTime, + `Score` Int32, + `ViewCount` UInt32, + `Body` String, + `OwnerUserId` Int32, + `OwnerDisplayName` String, + `LastEditorUserId` Int32, + `LastEditorDisplayName` String, + `LastEditDate` DateTime, + `LastActivityDate` DateTime, + `Title` String, + `Tags` String, + `AnswerCount` UInt16, + `CommentCount` UInt8, + `FavoriteCount` UInt8, + `ContentLicense`LowCardinality(String), + `ParentId` String, + `CommunityOwnedDate` DateTime, + `ClosedDate` DateTime +) +ENGINE = MergeTree +ORDER BY tuple() +COMMENT 'Optimized types' +``` + +ã“ã‚Œã¯å‰ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰æ–°ã—ã„テーブルã¸ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚“ã§ã€ã“ã®æ–°ã—ã„テーブルã«æŒ¿å…¥ã™ã‚‹ã“ã¨ã§åŸ‹ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +INSERT INTO posts_v2 SELECT * FROM posts + +0 rows in set. Elapsed: 146.471 sec. Processed 59.82 million rows, 83.82 GB (408.40 thousand rows/s., 572.25 MB/s.) +``` + +æ–°ã—ã„スキーマã§ã¯ã€ã‚‚ã¯ã‚„ null 値をä¿æŒã—ã¾ã›ã‚“。上記ã®æŒ¿å…¥ã§ã¯ã€æš—é»™ã®ã†ã¡ã«ãã‚Œãžã‚Œã®åž‹ã«å¯¾ã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å€¤ã« null 値を変æ›ã—ã¾ã™ - æ•´æ•°ã®å ´åˆã¯ 0ã€æ–‡å­—列ã®å ´åˆã¯ç©ºã®å€¤ã¨ãªã‚Šã¾ã™ã€‚ClickHouse ã¯ã¾ãŸã€ã‚らゆる数値を目的ã®ç²¾åº¦ã«è‡ªå‹•çš„ã«å¤‰æ›ã—ã¾ã™ã€‚ +ClickHouse ã«ãŠã‘る主キー (オーダリングキー) +OLTP データベースã‹ã‚‰æ¥ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ClickHouse ã«ã‚ã‚‹åŒç­‰ã®æ¦‚念を探ã™ã“ã¨ãŒã‚ˆãã‚ã‚Šã¾ã™ã€‚ + +## オーダリングキーã®é¸æŠž + +ClickHouse ãŒä¸€èˆ¬çš„ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ã§ã¯ã€ãƒ¡ãƒ¢ãƒªã¨ãƒ‡ã‚£ã‚¹ã‚¯ã®åŠ¹çŽ‡ãŒéžå¸¸ã«é‡è¦ã§ã™ã€‚データ㯠ClickHouse テーブルã«ãƒãƒ£ãƒ³ã‚¯ã¨ã—ã¦æ›¸ãè¾¼ã¾ã‚Œã€ã“ã®ãƒãƒ£ãƒ³ã‚¯ã¯ãƒ‘ートã¨ã—ã¦çŸ¥ã‚‰ã‚Œã€èƒŒæ™¯ã§ãƒ‘ートを統åˆã™ã‚‹ãŸã‚ã®ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ClickHouse ã§ã¯ã€å„パートã«ã¯ãれ自体ã®ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒã‚ã‚Šã¾ã™ã€‚複数ã®ãƒ‘ートãŒçµ±åˆã•ã‚Œã‚‹ã¨ã€çµ±åˆã•ã‚ŒãŸãƒ‘ートã®ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚‚çµ±åˆã•ã‚Œã¾ã™ã€‚パートã®ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—ã”ã¨ã«1ã¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¨ãƒ³ãƒˆãƒªã‚’æŒã£ã¦ã„ã¾ã™ - ã“ã®æŠ€æ³•ã¯ã‚¹ãƒšãƒ¼ã‚¹ã‚¤ãƒ³ãƒ‡ã‚¯ã‚·ãƒ³ã‚°ã¨å‘¼ã°ã‚Œã¾ã™ã€‚ + +ClickHouse ã«ãŠã‘るスペースインデクシング + +
+ +ClickHouse ã§é¸æŠžã•ã‚ŒãŸã‚­ãƒ¼ã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã ã‘ã§ãªãã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ãƒ‡ãƒ¼ã‚¿ãŒæ›¸ãè¾¼ã¾ã‚Œã‚‹é †åºã‚’決定ã—ã¾ã™ã€‚ã“ã®ãŸã‚ã€ã“ã‚Œã¯ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã«å¤§ããªå½±éŸ¿ã‚’åŠã¼ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã»ã¨ã‚“ã©ã®ã‚«ãƒ©ãƒ ã®å€¤ãŒé€£ç¶šã—ãŸé †åºã§æ›¸ãè¾¼ã¾ã‚Œã‚‹æ³¨æ–‡ã‚­ãƒ¼ã¯ã€é¸æŠžã•ã‚ŒãŸåœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ  (ãŠã‚ˆã³ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯) ãŒãƒ‡ãƒ¼ã‚¿ã‚’より効果的ã«åœ§ç¸®ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +> テーブル内ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã¯ã€ã‚ªãƒ¼ãƒ€ãƒªãƒ³ã‚°ã‚­ãƒ¼ã¨ã—ã¦æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å€¤ã«åŸºã¥ã„ã¦ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚キ自体ã«å«ã¾ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã¯å•ã‚ãšã€ã™ã¹ã¦ãŒã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚例ãˆã°ã€`CreationDate` ãŒã‚­ãƒ¼ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€ãã®ä»–ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã®å€¤ã®é †åºã¯ `CreationDate` カラムã®å€¤ã®é †åºã«å¯¾å¿œã—ã¾ã™ã€‚複数ã®ã‚ªãƒ¼ãƒ€ãƒªãƒ³ã‚°ã‚­ãƒ¼ã‚’指定ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ - ã“れ㯠`SELECT` クエリ㧠`ORDER BY` å¥ã‚’使用ã™ã‚‹éš›ã®åŒã˜ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã§ã‚½ãƒ¼ãƒˆã—ã¾ã™ã€‚ + +オーダリングキーをé¸æŠžã™ã‚‹éš›ã«ç°¡å˜ãªãƒ«ãƒ¼ãƒ«ã‚’é©ç”¨ã§ãã¾ã™ã€‚以下ã¯æ™‚ã«ã¯è¡çªã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã®ã§ã€é †ç•ªã«æ¤œè¨Žã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ—ロセスã‹ã‚‰ã„ãã¤ã‹ã®ã‚­ãƒ¼ã‚’特定ã™ã‚‹ã“ã¨ãŒã§ãã€é€šå¸¸4-5ã¤ã§å分ã§ã™ï¼š + +- 一般的ãªãƒ•ã‚£ãƒ«ã‚¿ã¨ä¸€è‡´ã™ã‚‹ã‚«ãƒ©ãƒ ã‚’é¸æŠžã—ã¦ãã ã•ã„。カラム㌠`WHERE` å¥ã«ã‚ˆã使用ã•ã‚Œã‚‹å ´åˆã€å„ªå…ˆé †ä½ä»˜ã‘ã—ã€ä½¿ç”¨é »åº¦ãŒå°‘ãªã„ã‚‚ã®ã‚ˆã‚Šã‚‚ã“れをキーã«å«ã‚ã¦ãã ã•ã„。 +- フィルタリング時ã«å…¨ä½“ã®è¡Œã®å¤§éƒ¨åˆ†ã‚’除外ã™ã‚‹ã®ã«å½¹ç«‹ã¤ã‚«ãƒ©ãƒ ã‚’好んã§é¸æŠžã—ã¦ãã ã•ã„ã€ã“ã‚Œã¯èª­ã¿å–ã‚‹å¿…è¦ã®ã‚るデータé‡ã‚’減少ã•ã›ã¾ã™ã€‚ +- テーブル内ã®ä»–ã®ã‚«ãƒ©ãƒ ã¨éžå¸¸ã«ç›¸é–¢ã™ã‚‹ã‚«ãƒ©ãƒ ã‚’好んã§é¸æŠžã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€ã“れらã®å€¤ãŒé€£ç¶šã—ã¦ä¿å­˜ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã€åœ§ç¸®ã‚’改善ã—ã¾ã™ã€‚ +`GROUP BY` åŠã³ `ORDER BY` 演算ã¯ã‚­ãƒ¼å†…ã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦è¡Œã†ã“ã¨ã§ã‚ˆã‚Šãƒ¡ãƒ¢ãƒªåŠ¹çŽ‡ã‚’高ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +オーダリングキーã®ã‚µãƒ–セットを特定ã™ã‚‹éš›ã«ã¯ã€ã‚«ãƒ©ãƒ ã‚’特定ã®é †åºã§å®£è¨€ã—ã¦ãã ã•ã„。ã“ã®é †åºã¯ã‚¯ã‚¨ãƒªã®å‰¯æ¬¡ã‚­ãƒ¼ã«ãŠã‘るフィルタリングã®åŠ¹çŽ‡æ€§ã¨ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã®åœ§ç¸®æ¯”率ã®ä¸¡æ–¹ã«ã‹ãªã‚Šå½±éŸ¿ã‚’与ãˆã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚一般的ã«ã¯ã€ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã®æ˜‡é †ã§ã‚­ãƒ¼ã‚’é †åºã¥ã‘ã‚‹ã®ãŒæœ€é©ã§ã™ã€‚ã“ã‚Œã¯ã€ã‚­ãƒ¼å†…ã®è¦ç´ ã®é †åºãŒãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ãŒåŠ¹çŽ‡çš„ã§ã‚ã‚‹ã“ã¨ã‚’ãƒãƒ©ãƒ³ã‚¹è‰¯ã求ã‚ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ã“れらã®å‹•ä½œã‚’ãƒãƒ©ãƒ³ã‚¹ã‚ˆãå–り入れã¦ã€ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンを考慮ã—(ãã—ã¦ã‚‚ã£ã¨é‡è¦ãªã“ã¨ã«ç•°ãªã‚‹è¦å› ã‚’テストã—ã¾ã—ょã†ï¼‰ã€‚ + +### 例 + +上記ã®ã‚¬ã‚¤ãƒ‰ãƒ©ã‚¤ãƒ³ã‚’ `posts` テーブルã«é©ç”¨ã™ã‚‹ã¨ã€ä¾‹ãˆã°ã€åˆ©ç”¨è€…ãŒæ—¥ä»˜ãŠã‚ˆã³æŠ•ç¨¿ã‚¿ã‚¤ãƒ—ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¦åˆ†æžã‚’è¡Œã„ãŸã„ã¨ä»®å®šã—ã¾ã™: + +「直近3ヶ月ã§æœ€ã‚‚コメントã•ã‚ŒãŸè³ªå•ã¯ã©ã‚Œã§ã™ã‹ã€ã€‚ + +ã“ã®è³ªå•ã®ã‚¯ã‚¨ãƒªã¯ã€ã‚ªãƒ¼ãƒ€ãƒªãƒ³ã‚°ã‚­ãƒ¼ã‚’æŒãŸãªã„ `posts_v2` テーブルã§åž‹ã‚’最é©åŒ–ã—ãŸã‚‚ã®ã‚’使用ã™ã‚‹ã¨æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +``` +SELECT + Id, + Title, + CommentCount +FROM posts_v2 +WHERE (CreationDate >= '2024-01-01') AND (PostTypeId = 'Question') +ORDER BY CommentCount DESC +LIMIT 3 + +┌───────Id─┬─Title─────────────────────────────────────────────────────────────┬─CommentCount─┠+│ 78203063 │ How to avoid default initialization of objects in std::vector? │ 74 │ +│ 78183948 │ About memory barrier │ 52 │ +│ 77900279 │ Speed Test for Buffer Alignment: IBM's PowerPC results vs. my CPU │ 49 │ +└──────────┴───────────────────────────────────────────────────────────────────┴────────────── + +10 rows in set. Elapsed: 0.070 sec. Processed 59.82 million rows, 569.21 MB (852.55 million rows/s., 8.11 GB/s.) +Peak memory usage: 429.38 MiB. +``` + +> ã“ã“ã§ã¯ã‚¯ã‚¨ãƒªãŒã¨ã¦ã‚‚高速ã§ã™ã€ã™ã¹ã¦ã® 60m è¡ŒãŒç·šå½¢ã‚¹ã‚­ãƒ£ãƒ³ã•ã‚Œã¦ã„ã‚‹ã«ã‚‚ã‹ã‹ã‚ら㚠- ClickHouse ã¯ãŸã é€Ÿã„ã®ã§ :) オーダリングキー㌠TB ã‚„ PB スケールã§ä¾¡å€¤ãŒã‚ã‚‹ã¨ä¿¡ã˜ã¦ãã ã•ã„ï¼ + +`PostTypeId` 㨠`CreationDate` をオーダリングキーã¨ã—ã¦é¸æŠžã—ã¾ã—ょã†ã€‚ + +ãŠãらãç§ãŸã¡ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯å¸¸ã« `PostTypeId` ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã¨äºˆæƒ³ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ãŒ 8 ã§ã‚ã‚Šã€ã‚ªãƒ¼ãƒ€ãƒªãƒ³ã‚°ã‚­ãƒ¼ã®æœ€åˆã®ã‚¨ãƒ³ãƒˆãƒªã¨ã—ã¦è«–ç†çš„ãªé¸æŠžè‚¢ã§ã™ã€‚日付ã®ç²’度ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ãŒå分ã§ã‚ã‚‹ã¨èªè­˜ã•ã‚Œã‚‹ã®ã§ (ãã‚Œã¯ä¾ç„¶ã¨ã—㦠datetime フィルターã®åˆ©ç›Šã‚’å¾—ã¾ã™) `toDate(CreationDate)` をキーã®2番目ã®è¦ç´ ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šå°ã•ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚‚生æˆã•ã‚Œã€æ—¥ä»˜ã¯16ã§è¡¨ã•ã‚Œã‚‹ã“ã¨ãŒã§ãã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’高速化ã—ã¾ã™ã€‚我々ã®æœ€çµ‚キーエントリ㯠`CommentCount` ã§ã€æœ€ã‚‚多ãコメントã•ã‚ŒãŸæŠ•ç¨¿ã‚’見ã¤ã‘ã‚‹ã®ã‚’手助ã‘ã—ã¾ã™ (最終ソート)。 + +```sql +CREATE TABLE posts_v3 +( + `Id` Int32, + `PostTypeId` Enum('Question' = 1, 'Answer' = 2, 'Wiki' = 3, 'TagWikiExcerpt' = 4, 'TagWiki' = 5, 'ModeratorNomination' = 6, 'WikiPlaceholder' = 7, 'PrivilegeWiki' = 8), + `AcceptedAnswerId` UInt32, + `CreationDate` DateTime, + `Score` Int32, + `ViewCount` UInt32, + `Body` String, + `OwnerUserId` Int32, + `OwnerDisplayName` String, + `LastEditorUserId` Int32, + `LastEditorDisplayName` String, + `LastEditDate` DateTime, + `LastActivityDate` DateTime, + `Title` String, + `Tags` String, + `AnswerCount` UInt16, + `CommentCount` UInt8, + `FavoriteCount` UInt8, + `ContentLicense` LowCardinality(String), + `ParentId` String, + `CommunityOwnedDate` DateTime, + `ClosedDate` DateTime +) +ENGINE = MergeTree +ORDER BY (PostTypeId, toDate(CreationDate), CommentCount) +COMMENT 'オーダリングキー' + +--既存ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルを埋ã‚ã‚‹ + +INSERT INTO posts_v3 SELECT * FROM posts_v2 + +0 rows in set. Elapsed: 158.074 sec. Processed 59.82 million rows, 76.21 GB (378.42 thousand rows/s., 482.14 MB/s.) +Peak memory usage: 6.41 GiB. + + +以å‰ã®ã‚¯ã‚¨ãƒªã«æ¯”ã¹ã€ã‚¯ã‚¨ãƒªå¿œç­”時間ãŒ3å€ä»¥ä¸Šæ”¹å–„ã•ã‚Œã¾ã™: + +SELECT + Id, + Title, + CommentCount +FROM posts_v3 +WHERE (CreationDate >= '2024-01-01') AND (PostTypeId = 'Question') +ORDER BY CommentCount DESC +LIMIT 3 + +10 rows in set. Elapsed: 0.020 sec. Processed 290.09 thousand rows, 21.03 MB (14.65 million rows/s., 1.06 GB/s.) +``` + +特定ã®åž‹ã¨é©åˆ‡ãªã‚ªãƒ¼ãƒ€ãƒªãƒ³ã‚°ã‚­ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦é”æˆã•ã‚Œã‚‹åœ§ç¸®ã®æ”¹å–„ã«é–¢å¿ƒã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€[ClickHouse ã«ãŠã‘る圧縮](/ja/data-compression/compression-in-clickhouse) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。ユーザーãŒåœ§ç¸®ã‚’ã•ã‚‰ã«æ”¹å–„ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€[é©åˆ‡ãªã‚«ãƒ©ãƒ åœ§ç¸®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã®é¸æŠž](/ja/data-compression/compression-in-clickhouse#choosing-the-right-column-compression-codec)セクションをãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## 次ã¸: データモデリング技法 + +ã“ã“ã¾ã§ã€ç§ãŸã¡ã¯å˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルã®ã¿ã‚’移行ã—ã¾ã—ãŸã€‚ã“ã‚Œã«ã‚ˆã‚Š ClickHouse ã®åŸºæœ¬çš„ãªæ¦‚念を紹介ã™ã‚‹ã“ã¨ãŒã§ãã¾ã—ãŸãŒã€æ®‹å¿µãªãŒã‚‰å¤§åŠã®ã‚¹ã‚­ãƒ¼ãƒžã¯ã“ã‚Œã»ã©å˜ç´”ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +以下ã®ä¸€è¦§ã®ä»–ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€æœ€é©ãª ClickHouse クエリã®ãŸã‚ã«ã‚¹ã‚­ãƒ¼ãƒžå…¨ä½“ã‚’å†æ§‹ç¯‰ã™ã‚‹ãŸã‚ã®ã„ãã¤ã‹ã®æŠ€è¡“を探求ã—ã¾ã™ã€‚ã“ã®ãƒ—ロセスを通ã˜ã¦ã€`Posts` ã‚’ã»ã¨ã‚“ã©ã®åˆ†æžã‚¯ã‚¨ãƒªãŒå®Ÿè¡Œã•ã‚Œã‚‹ä¸­å¿ƒçš„ãªãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦ç¶­æŒã™ã‚‹ã“ã¨ã‚’目指ã—ã¾ã™ã€‚ä»–ã®ãƒ†ãƒ¼ãƒ–ルも独自ã«ã‚¯ã‚¨ãƒªã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ãŒã€æˆ‘々ã¯ã»ã¨ã‚“ã©ã®åˆ†æžãŒ `posts` を文脈ã¨ã—ãŸã‚‚ã®ã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã“ã¨ã‚’想定ã—ã¦ã„ã¾ã™ã€‚ + +> ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’通ã˜ã¦ã€ä»–ã®ãƒ†ãƒ¼ãƒ–ルã®æœ€é©åŒ–ã•ã‚ŒãŸãƒãƒªã‚¢ãƒ³ãƒˆã‚’使用ã—ã¾ã™ã€‚ã“れらã®ã‚¹ã‚­ãƒ¼ãƒžã¯æä¾›ã—ã¾ã™ãŒã€ç°¡æ½”ã«ã™ã‚‹ãŸã‚ã«è¡Œã‚ã‚ŒãŸæ±ºå®šã¯çœç•¥ã—ã¾ã™ã€‚ã“れらã¯å‰è¿°ã®ãƒ«ãƒ¼ãƒ«ã«åŸºã¥ãã€èª­è€…ã«æ±ºå®šã‚’推測ã™ã‚‹ã“ã¨ã‚’ä»»ã›ã¦ã„ã¾ã™ã€‚ + +次ã®ã‚¢ãƒ—ローãƒã¯ã„ãšã‚Œã‚‚ã€èª­ã¿å–ã‚Šã¨ã‚¯ã‚¨ãƒªãƒ‘フォーマンスを最é©åŒ–ã™ã‚‹ãŸã‚ã« JOIN を使用ã™ã‚‹å¿…è¦æ€§ã‚’最å°é™ã«æŠ‘ãˆã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚ClickHouse ã§ã¯ JOIN ãŒå®Œå…¨ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ãŒã€æœ€é©ãªãƒ‘フォーマンスをé”æˆã™ã‚‹ãŸã‚ã«ã¯ã€JOIN ã®ä½¿ç”¨ã‚’控ãˆã‚ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ï¼ˆJOIN クエリ内ã§2〜3テーブルã«ã™ã‚‹ã®ãŒç†æƒ³ã§ã™ï¼‰ã€‚ + +> ClickHouse ã«ã¯å¤–部キーã®æ¦‚念ãŒã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯çµåˆã‚’ç¦æ­¢ã™ã‚‹ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€å‚照整åˆæ€§ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¢ãƒ—リケーションレベルã§ç®¡ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ClickHouse ã®ã‚ˆã†ãª OLAP システムã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®æ•´åˆæ€§ã¯é€šå¸¸ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è‡ªä½“ã§ã¯ãªãアプリケーションレベルやデータå–ã‚Šè¾¼ã¿ãƒ—ロセスã§ç®¡ç†ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚ŠæŸ”軟性ãŒå‘上ã—ã€é«˜é€Ÿã®ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã«ã‚ˆã‚Šã€éžå¸¸ã«å¤§ããªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã®èª­ã¿å–ã‚Šã¨æŒ¿å…¥ã‚¯ã‚¨ãƒªã®é€Ÿåº¦ã¨ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティã«é‡ç‚¹ã‚’ç½®ã ClickHouse ã®åˆ©ç‚¹ãŒæœ€å¤§åŒ–ã•ã‚Œã¾ã™ã€‚ + +ユーザーãŒã‚¯ã‚¨ãƒªæ™‚ã« JOIN ã®ä½¿ç”¨ã‚’最å°é™ã«æŠ‘ãˆã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®ãƒ„ール/アプローãƒãŒã‚ã‚Šã¾ã™: + +- [**データã®éžæ­£è¦åŒ–**](/ja/data-modeling/denormalization) - テーブルを組ã¿åˆã‚ã›ã€éž1:1リレーションシップã®ãŸã‚ã«è¤‡åˆåž‹ã‚’使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚’éžæ­£è¦åŒ–ã—ã¾ã™ã€‚ã“ã‚Œã«ã¯å¤šãã®å ´åˆã€ã‚¯ã‚¨ãƒªæ™‚é–“ã‹ã‚‰æŒ¿å…¥æ™‚é–“ã¸ã®çµåˆã®ç§»å‹•ãŒå«ã¾ã‚Œã¾ã™ã€‚ +- [**ディクショナリ**](/ja/dictionary) - 直接çµåˆãŠã‚ˆã³ã‚­ãƒ¼å€¤ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—を扱ã†ãŸã‚ã® ClickHouse 固有ã®æ©Ÿèƒ½ã€‚ +- [**インクリメンタルマテリアライズドビュー**](/ja/materialized-view) - 計算ã®ã‚³ã‚¹ãƒˆã‚’クエリ時間ã‹ã‚‰æŒ¿å…¥æ™‚é–“ã«ã‚·ãƒ•ãƒˆã™ã‚‹ãŸã‚ã® ClickHouse ã®æ©Ÿèƒ½ã€‚集計値をインクリメンタルã«è¨ˆç®—ã™ã‚‹èƒ½åŠ›ã‚’å«ã¿ã¾ã™ã€‚ +- [**リフレッシャブルマテリアライズドビュー**](/ja/materialized-view/refreshable-materialized-view) - ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è£½å“ã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¨ä¼¼ã¦ãŠã‚Šã€ã‚¯ã‚¨ãƒªã®çµæžœã‚’定期的ã«è¨ˆç®—ã—ã€çµæžœã‚’キャッシュã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +ã“れらã®ã‚¢ãƒ—ローãƒã‚’å„ガイドã§æŽ¢æ±‚ã—ã€Stack Overflow データセットã®è³ªå•ã‚’解決ã™ã‚‹ãŸã‚ã«ã“れをé©ç”¨ã™ã‚‹æ–¹æ³•ã‚’例示ã™ã‚‹éš›ã«ã©ã‚ŒãŒé©åˆ‡ã‹ã‚’強調ã—ã¾ã™ã€‚ diff --git a/docs/ja/deployment-guides/horizontal-scaling.md b/docs/ja/deployment-guides/horizontal-scaling.md new file mode 100644 index 00000000000..f618f5b0be4 --- /dev/null +++ b/docs/ja/deployment-guides/horizontal-scaling.md @@ -0,0 +1,468 @@ +--- +slug: /ja/architecture/horizontal-scaling +sidebar_label: 水平拡張 +sidebar_position: 10 +title: 水平拡張 +--- +import ReplicationShardingTerminology from '@site/docs/ja/_snippets/_replication-sharding-terminology.md'; +import ConfigFileNote from '@site/docs/ja/_snippets/_config-files.md'; + +## æ¦‚è¦ +ã“ã®ä¾‹ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã¯ã€ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティをæä¾›ã™ã‚‹ã‚ˆã†ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã¡ã‚‰ã«ã¯3ã¤ã®ãƒŽãƒ¼ãƒ‰ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ï¼š2ã¤ã®ClickHouseã¨ã‚³ãƒ¼ãƒ‡ã‚£ãƒãƒ¼ã‚·ãƒ§ãƒ³ï¼ˆClickHouse Keeper)サーãƒãƒ¼ãŒçµ„ã¿åˆã‚ã•ã£ãŸã‚‚ã®ã€ãŠã‚ˆã³ã“ã®ã‚¯ã‚©ãƒ¼ãƒ©ãƒ ã‚’完æˆã•ã›ã‚‹ãŸã‚ã®ClickHouse Keeperã®ã¿ã‚’æŒã¤3番目ã®ã‚µãƒ¼ãƒãƒ¼ã§ã™ã€‚ã“ã®ä¾‹ã‚’使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãƒ†ãƒ¼ãƒ–ルã€ãŠã‚ˆã³2ã¤ã®ãƒŽãƒ¼ãƒ‰ã®ä¸¡æ–¹ã§ãƒ‡ãƒ¼ã‚¿ã‚’クエリã§ãる分散テーブルを作æˆã—ã¾ã™ã€‚ + +## レベル: 基本 + + + +## 環境 +### アーキテクãƒãƒ£å›³ +![2シャードã¨1レプリカã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£å›³](@site/docs/ja/deployment-guides/images/scaling-out-1.png) + +|ノード|説明| +|----|-----------| +|chnode1|データ + ClickHouse Keeper| +|chnode2|データ + ClickHouse Keeper| +|chnode3|ClickHouse Keeperクォーラムã«ä½¿ç”¨| + +:::note +本番環境ã§ã¯ã€ClickHouse Keeperを専用ホストã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã®åŸºæœ¬æ§‹æˆã§ã¯ã€ClickHouse Serverプロセス内ã§Keeper機能を実行ã—ã¦ã„ã¾ã™ã€‚ClickHouse Keeperをスタンドアロンã§ãƒ‡ãƒ—ロイã™ã‚‹æ‰‹é †ã¯ã€[インストールドキュメント](/docs/ja/getting-started/install.md/#install-standalone-clickhouse-keeper)ã§ç¢ºèªã§ãã¾ã™ã€‚ +::: + +## インストール + +3ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã«Clickhouseをインストールã—ã€[アーカイブタイプã”ã¨ã®æ‰‹é †](/docs/ja/getting-started/install.md/#available-installation-options) (.deb, .rpm, .tar.gzãªã©) ã«å¾“ã£ã¦ãã ã•ã„。ã“ã®ä¾‹ã§ã¯ã€3å°ã®ãƒžã‚·ãƒ³ã™ã¹ã¦ã«ClickHouse Serverã¨Clientã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ‰‹é †ã«å¾“ã„ã¾ã™ã€‚ + +## 設定ファイルã®ç·¨é›† + + + +## chnode1ã®è¨­å®š + +chnode1ã«ã¯ã€5ã¤ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’1ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¾ã¨ã‚ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆå†…ã§å€‹åˆ¥ã«è¦‹ã‚‹æ–¹ãŒæ˜Žç¢ºã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。設定ファイルを読ã¿é€²ã‚ã‚‹ã¨ã€chnode1ã¨chnode2ã®ã»ã¨ã‚“ã©ã®è¨­å®šãŒåŒã˜ã§ã‚ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚一部ã®é•ã„ã¯å¼·èª¿ã•ã‚Œã¾ã™ã€‚ + +### ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¨ãƒ­ã‚°è¨­å®š + +ã“れらã®å€¤ã¯ã€ãŠå¥½ã¿ã§ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã§ãã¾ã™ã€‚ã“ã®ä¾‹ã®è¨­å®šã¯ã€1000Mã§3回ロールオーãƒãƒ¼ã™ã‚‹ãƒ‡ãƒãƒƒã‚°ãƒ­ã‚°ã‚’æä¾›ã—ã¾ã™ã€‚ClickHouseã¯IPv4ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã§ãƒãƒ¼ãƒˆ8123ã¨9000ã§ãƒªãƒƒã‚¹ãƒ³ã—ã€ã‚¤ãƒ³ã‚¿ãƒ¼ã‚µãƒ¼ãƒãƒ¼é€šä¿¡ã«ãƒãƒ¼ãƒˆ9009を使用ã—ã¾ã™ã€‚ + +```xml title="network-and-logging.xml on chnode1" + + + debug + /var/log/clickhouse-server/clickhouse-server.log + /var/log/clickhouse-server/clickhouse-server.err.log + 1000M + 3 + + clickhouse + 0.0.0.0 + 8123 + 9000 + 9009 + +``` + +### ClickHouse Keeper設定 + +ClickHouse Keeperã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ¬ãƒ—リケーションã¨åˆ†æ•£DDLクエリã®å®Ÿè¡Œã®ãŸã‚ã®ã‚³ãƒ¼ãƒ‡ã‚£ãƒãƒ¼ã‚·ãƒ§ãƒ³ã‚·ã‚¹ãƒ†ãƒ ã‚’æä¾›ã—ã¾ã™ã€‚ClickHouse Keeperã¯Apache ZooKeeperã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã§ã¯ã€ãƒãƒ¼ãƒˆ9181ã§ClickHouse Keeperを有効ã«ã—ã¾ã™ã€‚強調表示ã•ã‚Œã¦ã„ã‚‹è¡Œã¯ã€Keeperã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«`server_id`ã‚’1ã¨ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ã“ã®`enable-keeper.xml`ファイルã®é•ã„ã¯3ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã™ã¹ã¦ã§ã“ã‚Œã ã‘ã§ã™ã€‚`chnode2`ã§ã¯`server_id`ã¯`2`ã«è¨­å®šã•ã‚Œã€`chnode3`ã§ã¯`server_id`ã¯`3`ã«è¨­å®šã•ã‚Œã¾ã™ã€‚raft構æˆã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯3ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã™ã¹ã¦ã§åŒã˜ã§ã‚ã‚Šã€ä¸‹è¨˜ã«å¼·èª¿ã•ã‚Œã¦ã€`server_id`ã¨raft構æˆå†…ã®`server`インスタンスã®é–¢ä¿‚を示ã—ã¾ã™ã€‚ + +:::note +何らã‹ã®ç†ç”±ã§KeeperノードãŒäº¤æ›ã¾ãŸã¯å†æ§‹ç¯‰ã•ã‚ŒãŸå ´åˆã€æ—¢å­˜ã®`server_id`ã‚’å†åˆ©ç”¨ã—ãªã„ã§ãã ã•ã„。例ãˆã°ã€`server_id`ãŒ`2`ã§ã‚ã‚‹KeeperノードãŒå†æ§‹ç¯‰ã•ã‚ŒãŸå ´åˆã¯ã€`server_id`ã‚’`4`以上ã«ã—ã¦ãã ã•ã„。 +::: + +```xml title="enable-keeper.xml on chnode1" + + + 9181 + # highlight-next-line + 1 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + + 10000 + 30000 + trace + + + + # highlight-start + + 1 + chnode1 + 9234 + + # highlight-end + + 2 + chnode2 + 9234 + + + 3 + chnode3 + 9234 + + + + +``` + +### マクロ設定 + +マクロ`shard`ã¨`replica`ã«ã‚ˆã‚Šã€åˆ†æ•£DDLã®è¤‡é›‘ã•ãŒè»½æ¸›ã•ã‚Œã¾ã™ã€‚設定ã•ã‚ŒãŸå€¤ã¯DDLクエリ内ã§è‡ªå‹•çš„ã«ç½®ãæ›ãˆã‚‰ã‚Œã‚‹ãŸã‚ã€DDLを簡素化ã§ãã¾ã™ã€‚ã“ã®è¨­å®šã®ãƒžã‚¯ãƒ­ã¯ã€å„ノードã®ã‚·ãƒ£ãƒ¼ãƒ‰ã¨ãƒ¬ãƒ—リカ番å·ã‚’指定ã—ã¾ã™ã€‚ã“ã®2シャード1レプリカã®ä¾‹ã§ã¯ã€ãƒ¬ãƒ—リカマクロã¯chnode1ã¨chnode2ã®ä¸¡æ–¹ã§`replica_1`ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚シャードマクロã¯chnode1ã§ã¯`1`ã€chnode2ã§ã¯`2`ã§ã™ã€‚ + +```xml title="macros.xml on chnode1" + + + # highlight-next-line + 1 + replica_1 + + +``` + +### レプリケーションã¨ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°è¨­å®š + +以下ã®è¨­å®šã®å¤§ã¾ã‹ãªæ¦‚è¦ã§ã™ï¼š +- XMLã®`remote_servers`セクションã¯ã€ç’°å¢ƒå†…ã®å„クラスターを指定ã—ã¾ã™ã€‚属性`replace=true`ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ClickHouse設定ã®ã‚µãƒ³ãƒ—ル`remote_servers`ã‚’ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã§æŒ‡å®šã•ã‚ŒãŸ`remote_servers`設定ã§ç½®ãæ›ãˆã¾ã™ã€‚ã“ã®å±žæ€§ãŒãªã„å ´åˆã€ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚µãƒ³ãƒ—ルリストã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ +- ã“ã®ä¾‹ã§ã¯ã€1ã¤ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãŒ`cluster_2S_1R`ã¨ã„ã†åå‰ã§å­˜åœ¨ã—ã¾ã™ã€‚ +- クラスター`cluster_2S_1R`ã®ãŸã‚ã®ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆãŒ`mysecretphrase`ã¨ã„ã†å€¤ã§ä½œæˆã•ã‚Œã¾ã™ã€‚環境内ã®ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼é–“ã§ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆãŒå…±æœ‰ã•ã‚Œã€æ­£ã—ã„サーãƒãƒ¼ãŒä¸€ç·’ã«çµåˆã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ +- クラスター`cluster_2S_1R`ã«ã¯2ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ãŒã‚ã‚Šã€ãã‚Œãžã‚Œã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«1ã¤ã®ãƒ¬ãƒ—リカãŒã‚ã‚Šã¾ã™ã€‚文書ã®å†’é ­è¿‘ãã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£å›³ã‚’見ã¦ã€ä»¥ä¸‹ã®XMLã®2ã¤ã®`shard`定義ã¨æ¯”較ã—ã¦ãã ã•ã„。å„シャード定義ã«ã¯1ã¤ã®ãƒ¬ãƒ—リカãŒã‚ã‚Šã¾ã™ã€‚レプリカã¯ç‰¹å®šã®ã‚·ãƒ£ãƒ¼ãƒ‰ç”¨ã§ã™ã€‚レプリカã®ãƒ›ã‚¹ãƒˆã¨ãƒãƒ¼ãƒˆãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã™ã€‚最åˆã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®è¨­å®šã®ãƒ¬ãƒ—リカã¯`chnode1`ã«ä¿å­˜ã•ã‚Œã€2番目ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®è¨­å®šã®ãƒ¬ãƒ—リカã¯`chnode2`ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ +- シャードã®å†…部レプリケーションã¯trueã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚å„シャードã¯è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§`internal_replication`パラメーターを定義ã™ã‚‹ã“ã¨ãŒã§ãã€ã“ã®ãƒ‘ラメーターãŒtrueã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€æ›¸ãè¾¼ã¿æ“作ã¯æœ€åˆã®æ­£å¸¸ãªãƒ¬ãƒ—リカをé¸æŠžã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’書ãè¾¼ã¿ã¾ã™ã€‚ + +```xml title="remote-servers.xml on chnode1" + + + + mysecretphrase + + true + + chnode1 + 9000 + + + + true + + chnode2 + 9000 + + + + + +``` + +### Keeperã®ä½¿ç”¨è¨­å®š + +上ã§ClickHouse KeeperãŒè¨­å®šã•ã‚Œã¾ã—ãŸã€‚ã“ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«`use-keeper.xml`ã¯ã€ãƒ¬ãƒ—リケーションã¨åˆ†æ•£DDLã®ã‚³ãƒ¼ãƒ‡ã‚£ãƒãƒ¼ã‚·ãƒ§ãƒ³ã®ãŸã‚ã«ClickHouse ServerãŒClickHouse Keeperを使用ã™ã‚‹è¨­å®šã‚’è¡Œã£ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ClickHouse ServerãŒãƒãƒ¼ãƒˆ9181ã§chnode1ã‹ã‚‰3ã®Keeperを使用ã™ã‚‹ã‚ˆã†ã«æŒ‡å®šã—ã¦ãŠã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ã¯`chnode1`ã¨`chnode2`ã§åŒã˜ã§ã™ã€‚ + +```xml title="use-keeper.xml on chnode1" + + + + chnode1 + 9181 + + + chnode2 + 9181 + + + chnode3 + 9181 + + + +``` + +## chnode2ã®è¨­å®š + +chnode1ã¨chnode2ã®è¨­å®šã¯éžå¸¸ã«ä¼¼ã¦ã„ã‚‹ãŸã‚ã€ã“ã“ã§ã¯é•ã„ã®ã¿ã‚’指摘ã—ã¾ã™ã€‚ + +### ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¨ãƒ­ã‚°è¨­å®š + +```xml title="network-and-logging.xml on chnode2" + + + debug + /var/log/clickhouse-server/clickhouse-server.log + /var/log/clickhouse-server/clickhouse-server.err.log + 1000M + 3 + + clickhouse + 0.0.0.0 + 8123 + 9000 + 9009 + +``` + +### ClickHouse Keeper設定 + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯chnode1ã¨chnode2ã®é•ã„ã®ä¸€ã¤ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚Keeperã®è¨­å®šã§`server_id`ãŒ`2`ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```xml title="enable-keeper.xml on chnode2" + + + 9181 + # highlight-next-line + 2 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + + 10000 + 30000 + trace + + + + + 1 + chnode1 + 9234 + + # highlight-start + + 2 + chnode2 + 9234 + + # highlight-end + + 3 + chnode3 + 9234 + + + + +``` + +### マクロ設定 + +マクロ設定ã«ã¯chnode1ã¨chnode2ã®é•ã„ã®ä¸€ã¤ãŒã‚ã‚Šã¾ã™ã€‚`shard`ã¯ã“ã®ãƒŽãƒ¼ãƒ‰ã§ã¯`2`ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```xml title="macros.xml on chnode2" + + + # highlight-next-line + 2 + replica_1 + + +``` + +### レプリケーションã¨ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°è¨­å®š + +```xml title="remote-servers.xml on chnode2" + + + + mysecretphrase + + true + + chnode1 + 9000 + + + + true + + chnode2 + 9000 + + + + + +``` + +### Keeperã®ä½¿ç”¨è¨­å®š + +```xml title="use-keeper.xml on chnode2" + + + + chnode1 + 9181 + + + chnode2 + 9181 + + + chnode3 + 9181 + + + +``` + +## chnode3ã®è¨­å®š + +chnode3ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã›ãšã€ClickHouse KeeperãŒã‚¯ã‚©ãƒ¼ãƒ©ãƒ ã®3番目ã®ãƒŽãƒ¼ãƒ‰ã‚’æä¾›ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€chnode3ã«ã¯ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¨ãƒ­ã‚°ã‚’設定ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã¨ClickHouse Keeperを設定ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®2ã¤ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®ã¿ãŒã‚ã‚Šã¾ã™ã€‚ + +### ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¨ãƒ­ã‚°è¨­å®š + +```xml title="network-and-logging.xml on chnode3" + + + debug + /var/log/clickhouse-server/clickhouse-server.log + /var/log/clickhouse-server/clickhouse-server.err.log + 1000M + 3 + + clickhouse + 0.0.0.0 + 8123 + 9000 + 9009 + +``` + +### ClickHouse Keeper設定 + +```xml title="enable-keeper.xml on chnode3" + + + 9181 + # highlight-next-line + 3 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + + 10000 + 30000 + trace + + + + + 1 + chnode1 + 9234 + + + 2 + chnode2 + 9234 + + # highlight-start + + 3 + chnode3 + 9234 + + # highlight-end + + + +``` + +## テスト + +1. `chnode1`ã«æŽ¥ç¶šã—ã€ä¸Šã§è¨­å®šã•ã‚ŒãŸã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼`cluster_2S_1R`ãŒå­˜åœ¨ã™ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +```sql +SHOW CLUSTERS +``` +```response +┌─cluster───────┠+│ cluster_2S_1R │ +└───────────────┘ +``` + +2. クラスター上ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã—ã¾ã™ã€‚ +```sql +CREATE DATABASE db1 ON CLUSTER cluster_2S_1R +``` +```response +┌─host────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+│ chnode2 │ 9000 │ 0 │ │ 1 │ 0 │ +│ chnode1 │ 9000 │ 0 │ │ 0 │ 0 │ +└─────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘ +``` + +3. クラスター上ã«MergeTreeテーブルエンジンを使用ã—ãŸãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ +:::note +テーブルエンジンã®ãƒ‘ラメーターを指定ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。ã“れらã¯ãƒžã‚¯ãƒ­ã«åŸºã¥ã„ã¦è‡ªå‹•çš„ã«å®šç¾©ã•ã‚Œã¾ã™ã€‚ +::: + +```sql +CREATE TABLE db1.table1 ON CLUSTER cluster_2S_1R +( + `id` UInt64, + `column1` String +) +ENGINE = MergeTree +ORDER BY id +``` +```response +┌─host────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+│ chnode1 │ 9000 │ 0 │ │ 1 │ 0 │ +│ chnode2 │ 9000 │ 0 │ │ 0 │ 0 │ +└─────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘ +``` + +4. `chnode1`ã«æŽ¥ç¶šã—ã¦1行を挿入ã—ã¾ã™ã€‚ +```sql +INSERT INTO db1.table1 (id, column1) VALUES (1, 'abc'); +``` + +5. `chnode2`ã«æŽ¥ç¶šã—ã¦1行を挿入ã—ã¾ã™ã€‚ + +```sql +INSERT INTO db1.table1 (id, column1) VALUES (2, 'def'); +``` + +6. `chnode1`ã¾ãŸã¯`chnode2`ã®ã©ã¡ã‚‰ã‹ã«æŽ¥ç¶šã—ã€ãã®ãƒŽãƒ¼ãƒ‰ã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚ŒãŸè¡Œã®ã¿ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +例ãˆã°ã€`chnode2`㧠+```sql +SELECT * FROM db1.table1; +``` +```response +┌─id─┬─column1─┠+│ 2 │ def │ +└────┴─────────┘ +``` + +7. 両方ã®ãƒŽãƒ¼ãƒ‰ã§ä¸¡æ–¹ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’クエリã™ã‚‹åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ +(ã“ã®ä¾‹ã§ã¯ã€`rand()`関数をシャーディングキーã¨ã—ã¦è¨­å®šã—ã€å„挿入をランダムã«åˆ†æ•£ã•ã›ã¾ã™ï¼‰ +```sql +CREATE TABLE db1.table1_dist ON CLUSTER cluster_2S_1R +( + `id` UInt64, + `column1` String +) +ENGINE = Distributed('cluster_2S_1R', 'db1', 'table1', rand()) +``` +```response +┌─host────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+│ chnode2 │ 9000 │ 0 │ │ 1 │ 0 │ +│ chnode1 │ 9000 │ 0 │ │ 0 │ 0 │ +└─────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘ +``` + +8. `chnode1`ã¾ãŸã¯`chnode2`ã«æŽ¥ç¶šã—ã€ä¸¡æ–¹ã®è¡Œã‚’確èªã™ã‚‹ãŸã‚ã«åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルをクエリã—ã¾ã™ã€‚ +``` +SELECT * FROM db1.table1_dist; +``` +```reponse +┌─id─┬─column1─┠+│ 2 │ def │ +└────┴─────────┘ +┌─id─┬─column1─┠+│ 1 │ abc │ +└────┴─────────┘ +``` + +## ã•ã‚‰ã«è©³ã—ã„情報: + +- [分散テーブルエンジン](/docs/ja/engines/table-engines/special/distributed.md) +- [ClickHouse Keeper](/docs/ja/guides/sre/keeper/index.md) diff --git a/docs/ja/deployment-guides/images/Architecture.1S_2R_ReplicatedMergeTree_5-nodes.3.CH.Keeper.nodes.2.CH.nodes.excalidraw b/docs/ja/deployment-guides/images/Architecture.1S_2R_ReplicatedMergeTree_5-nodes.3.CH.Keeper.nodes.2.CH.nodes.excalidraw new file mode 100644 index 00000000000..0e77b31365f --- /dev/null +++ b/docs/ja/deployment-guides/images/Architecture.1S_2R_ReplicatedMergeTree_5-nodes.3.CH.Keeper.nodes.2.CH.nodes.excalidraw @@ -0,0 +1,1796 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://app.excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 1113, + "versionNonce": 1012871836, + "isDeleted": false, + "id": "6bX_E24wLaoVkuQUL49rE", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 902.74609375, + "y": 414.8828125, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 361.0546875, + "seed": 1554965524, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617310939, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1557, + "versionNonce": 1146325476, + "isDeleted": false, + "id": "YNTKiIr_dIR3MH3HkfcRz", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 778.38671875, + "y": 856.23046875, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 163.015625, + "seed": 1654017836, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757519, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 367, + "versionNonce": 1127866140, + "isDeleted": false, + "id": "FvPf0x839jBfeRK1Oi7VH", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 924.2421875, + "y": 420.765625, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 120.98332977294922, + "height": 25, + "seed": 892344108, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "jbZVPsflGswjF3TO0mtkh", + "type": "arrow" + } + ], + "updated": 1680617361728, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "clickhouse-01", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "clickhouse-01", + "lineHeight": 1.25 + }, + { + "type": "text", + "version": 683, + "versionNonce": 1514646684, + "isDeleted": false, + "id": "ZImh9dDrhSU9bFSj4RyVP", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 798.19921875, + "y": 863.02734375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 190.1999969482422, + "height": 25, + "seed": 1947896212, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ch2PpBqvlYoVfwfXC0ccU", + "type": "arrow" + } + ], + "updated": 1680617399915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "clickhouse-keeper-01", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "clickhouse-keeper-01", + "lineHeight": 1.25 + }, + { + "type": "rectangle", + "version": 1118, + "versionNonce": 1736358052, + "isDeleted": false, + "id": "KSZ6WPivPmlFfEae7MOmZ", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 930.76171875, + "y": 462.62890625, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 210.33593749999986, + "height": 283.26953125, + "seed": 115425684, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "vVIDbj6IOHJZPxahYvtay", + "type": "arrow" + } + ], + "updated": 1680617289086, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 367, + "versionNonce": 254095524, + "isDeleted": false, + "id": "zJgfnGBoFA0_lAsCwa7ok", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 964.75, + "y": 476.84765625, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 146.78334045410156, + "height": 25, + "seed": 1140609452, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617275111, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "cluster_1S_2R", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "cluster_1S_2R", + "lineHeight": 1.25 + }, + { + "type": "rectangle", + "version": 1264, + "versionNonce": 174543772, + "isDeleted": false, + "id": "GJLXUfVbLlM2wK6poU-QC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 948.9453125, + "y": 523.5546875, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 179.11328125, + "height": 205.06249999999994, + "seed": 1173090068, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617272029, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 866, + "versionNonce": 1843075100, + "isDeleted": false, + "id": "ftuuNibnMRnfPHFUpjZwu", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 973.640625, + "y": 574.84375, + "strokeColor": "#000000", + "backgroundColor": "#4c6ef5", + "width": 136.69531249999997, + "height": 130.546875, + "seed": 1381841964, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6ZwQTNxgnbNvCbFscx6Wf", + "type": "arrow" + }, + { + "id": "AxQowbCdMeLIF6o69yEgK", + "type": "arrow" + } + ], + "updated": 1680617236476, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 835, + "versionNonce": 110602204, + "isDeleted": false, + "id": "f0u6srndZkKL_EodskHfD", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 805.7578125, + "y": 910.84765625, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 208.04687500000003, + "height": 54.5078125, + "seed": 162401964, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "3ggSRTy32SXrl5tfDxejC", + "type": "arrow" + } + ], + "updated": 1673465757520, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 640, + "versionNonce": 152748068, + "isDeleted": false, + "id": "mY3bL5nc3pLNDLQ051PJm", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 835.640625, + "y": 929.8984375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 171.10000610351562, + "height": 25, + "seed": 989889044, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "rkre42NcpDm8yTNezH5zh", + "type": "arrow" + }, + { + "id": "mTAnUdCoqWUUHAhjuWbQ4", + "type": "arrow" + }, + { + "id": "3ggSRTy32SXrl5tfDxejC", + "type": "arrow" + } + ], + "updated": 1680616542430, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "ClickHouse Keeper", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse Keeper", + "lineHeight": 1.25 + }, + { + "type": "rectangle", + "version": 836, + "versionNonce": 39439644, + "isDeleted": false, + "id": "vUZRMf0MD0fkmVVh5EFbT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 998.5625, + "y": 637.43359375, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 87.93359375, + "height": 44.3203125, + "seed": 94517780, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "hYeY6OHHfBb0xSadzrIUO", + "type": "arrow" + }, + { + "id": "uzhB9dcVibDhLKTA43AqJ", + "type": "arrow" + } + ], + "updated": 1680617100682, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 610, + "versionNonce": 1849252380, + "isDeleted": false, + "id": "8Uy6RO4B05r0YaoY6xozj", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1011.875, + "y": 647.30078125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 56.41666793823242, + "height": 25, + "seed": 1212490028, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617142629, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table1", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "table1", + "lineHeight": 1.25 + }, + { + "type": "text", + "version": 525, + "versionNonce": 867028636, + "isDeleted": false, + "id": "CRUfTbXb5AainVI-px46P", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 964.71484375, + "y": 527.5234375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 143.8333282470703, + "height": 25, + "seed": 586798996, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617241195, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "shard1_replica1", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "shard1_replica1", + "lineHeight": 1.25 + }, + { + "type": "text", + "version": 588, + "versionNonce": 11332900, + "isDeleted": false, + "id": "jHqW0NK5gsCGvLnYvHCx6", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 992.9453125, + "y": 584.51953125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 26.96666717529297, + "height": 25, + "seed": 65018796, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617230665, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "db1", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "db1", + "lineHeight": 1.25 + }, + { + "type": "rectangle", + "version": 1774, + "versionNonce": 343666332, + "isDeleted": false, + "id": "3TaKvrFaS02XpN5DtDPRI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1135.3515625, + "y": 243.8984375, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 131.59375, + "height": 70.859375, + "seed": 4729388, + "groupIds": [ + "q2JYxHDMqBGnppLd-e_zx" + ], + "roundness": null, + "boundElements": [ + { + "id": "jbZVPsflGswjF3TO0mtkh", + "type": "arrow" + }, + { + "id": "tOhL3LAMqpegl6h9MHUJR", + "type": "arrow" + } + ], + "updated": 1680617339653, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 401, + "versionNonce": 1953814820, + "isDeleted": false, + "id": "VL9EHZ6BBa0MzyG_Ul-8O", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1168.78515625, + "y": 263.09375, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 51.25, + "height": 25, + "seed": 1746995884, + "groupIds": [ + "q2JYxHDMqBGnppLd-e_zx" + ], + "roundness": null, + "boundElements": [], + "updated": 1680617339653, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "client", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "client", + "lineHeight": 1.25 + }, + { + "type": "arrow", + "version": 875, + "versionNonce": 540882972, + "isDeleted": false, + "id": "jbZVPsflGswjF3TO0mtkh", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1155.583501385608, + "y": 318.25390625, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 136.72767491982881, + "height": 96.68672591477593, + "seed": 679203860, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617327380, + "link": null, + "locked": false, + "startBinding": { + "elementId": "3TaKvrFaS02XpN5DtDPRI", + "focus": -0.08180572844618887, + "gap": 3.49609375 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -136.72767491982881, + 96.68672591477593 + ] + ] + }, + { + "type": "rectangle", + "version": 1625, + "versionNonce": 255595612, + "isDeleted": false, + "id": "_NgRKPWWRBMhWmORFbqfG", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1074.103515625, + "y": 853.1796875, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 163.015625, + "seed": 549292591, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ch2PpBqvlYoVfwfXC0ccU", + "type": "arrow" + }, + { + "id": "vVIDbj6IOHJZPxahYvtay", + "type": "arrow" + }, + { + "id": "rkre42NcpDm8yTNezH5zh", + "type": "arrow" + } + ], + "updated": 1673465757520, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 726, + "versionNonce": 268977692, + "isDeleted": false, + "id": "Pw_o-YfuyZUoUg14Bk9B9", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1103.5625, + "y": 875.25, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 199.01666259765625, + "height": 25, + "seed": 304529441, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617409398, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "clickhouse-keeper-02", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "clickhouse-keeper-02", + "lineHeight": 1.25 + }, + { + "type": "rectangle", + "version": 985, + "versionNonce": 834101988, + "isDeleted": false, + "id": "LCD1WmlJ4y-REz1dTpJ9Q", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1092.140625, + "y": 912.42578125, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 208.04687500000003, + "height": 54.5078125, + "seed": 1815246127, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "rkre42NcpDm8yTNezH5zh", + "type": "arrow" + }, + { + "id": "CCQnVa7FiCpQ1z9gZkFIw", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 713, + "versionNonce": 1328207388, + "isDeleted": false, + "id": "oVA_VcnjylIcDRkS4Umwt", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1111.875, + "y": 934.8984375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 171.10000610351562, + "height": 25, + "seed": 1269328577, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "MJUWDY2EZev-CXvdwbrqg", + "type": "arrow" + }, + { + "id": "CCQnVa7FiCpQ1z9gZkFIw", + "type": "arrow" + } + ], + "updated": 1680616542431, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "ClickHouse Keeper", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse Keeper", + "lineHeight": 1.25 + }, + { + "type": "rectangle", + "version": 1722, + "versionNonce": 974218852, + "isDeleted": false, + "id": "yu32XFDVxjsltOILQkLVA", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1365.177734375, + "y": 855.53515625, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 163.015625, + "seed": 63815567, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "2Qvve3RQu79DrGbdGSIoE", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 828, + "versionNonce": 126603164, + "isDeleted": false, + "id": "Vx1u3JBG4wFPZTH61H34k", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1394.63671875, + "y": 877.60546875, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 198.39999389648438, + "height": 25, + "seed": 949683425, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617418925, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "clickhouse-keeper-03", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "clickhouse-keeper-03", + "lineHeight": 1.25 + }, + { + "type": "rectangle", + "version": 1037, + "versionNonce": 1063188964, + "isDeleted": false, + "id": "TkyDDTKdzhCr1PFXHjU_H", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1383.89453125, + "y": 921.984375, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 208.04687500000003, + "height": 54.5078125, + "seed": 1982657967, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "3ggSRTy32SXrl5tfDxejC", + "type": "arrow" + }, + { + "id": "mTAnUdCoqWUUHAhjuWbQ4", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 815, + "versionNonce": 1075950236, + "isDeleted": false, + "id": "ZBfU0ngueuYsWz6I8bCKK", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1402.94921875, + "y": 937.25390625, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 171.10000610351562, + "height": 25, + "seed": 126468289, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "CCQnVa7FiCpQ1z9gZkFIw", + "type": "arrow" + }, + { + "id": "3ggSRTy32SXrl5tfDxejC", + "type": "arrow" + } + ], + "updated": 1680616542431, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "ClickHouse Keeper", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse Keeper", + "lineHeight": 1.25 + }, + { + "type": "rectangle", + "version": 1170, + "versionNonce": 78335780, + "isDeleted": false, + "id": "jhjA6EMo6vpUCUZHQr_mX", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1208.259765625, + "y": 415.166015625, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 356.94921874999994, + "seed": 1369749569, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "b44c5shkNkGvKfI3BvYTr", + "type": "arrow" + }, + { + "id": "hYeY6OHHfBb0xSadzrIUO", + "type": "arrow" + }, + { + "id": "tOhL3LAMqpegl6h9MHUJR", + "type": "arrow" + } + ], + "updated": 1680617306431, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 432, + "versionNonce": 1158418724, + "isDeleted": false, + "id": "qNOaN3pVAJBSsMo2IDl3A", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1223.572265625, + "y": 418.486328125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 129.8000030517578, + "height": 25, + "seed": 1875249185, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617368552, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "clickhouse-02", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "clickhouse-02", + "lineHeight": 1.25 + }, + { + "type": "rectangle", + "version": 1296, + "versionNonce": 2122700196, + "isDeleted": false, + "id": "rGWPbCPCIaA6wd0vf3cAm", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1236.419921875, + "y": 456.099609375, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 210.33593749999986, + "height": 288.86328125000006, + "seed": 15883265, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617283881, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 476, + "versionNonce": 1412661796, + "isDeleted": false, + "id": "wRq1_meRS7lJ2EKHgKk2W", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 6.281358663757188, + "x": 1267.544930397291, + "y": 468.6558154667901, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 146.78334045410156, + "height": 25, + "seed": 1965634529, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617278612, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "cluster_1S_2R", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "cluster_1S_2R", + "lineHeight": 1.25 + }, + { + "type": "rectangle", + "version": 1216, + "versionNonce": 1943787940, + "isDeleted": false, + "id": "oluxJzMjFfYOyn5-B0dka", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1256.251953125, + "y": 515.349609375, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 179.11328125, + "height": 210.81250000000006, + "seed": 276434881, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617267455, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1003, + "versionNonce": 2082700572, + "isDeleted": false, + "id": "Dz6jzUvxO4147RhI8WZFh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1278.189453125, + "y": 574.775390625, + "strokeColor": "#000000", + "backgroundColor": "#4c6ef5", + "width": 136.69531249999997, + "height": 134.49218750000003, + "seed": 1761898401, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "tOhL3LAMqpegl6h9MHUJR", + "type": "arrow" + } + ], + "updated": 1680617219354, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 860, + "versionNonce": 150225052, + "isDeleted": false, + "id": "fQkUz2oj2eZkEPDYYWcRA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1299.408203125, + "y": 644.103515625, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 87.93359375, + "height": 44.3203125, + "seed": 1680320321, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6-aQPb-PIw6Gb0uCJY8hW", + "type": "arrow" + }, + { + "id": "hYeY6OHHfBb0xSadzrIUO", + "type": "arrow" + }, + { + "id": "uzhB9dcVibDhLKTA43AqJ", + "type": "arrow" + } + ], + "updated": 1680617100682, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 735, + "versionNonce": 11259044, + "isDeleted": false, + "id": "WbMJv-HlFhemifDr5ojCi", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1317.958984375, + "y": 652.669921875, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 56.41666793823242, + "height": 25, + "seed": 840111905, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617149028, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table1", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "table1", + "lineHeight": 1.25 + }, + { + "type": "text", + "version": 562, + "versionNonce": 103297316, + "isDeleted": false, + "id": "T_zXJHMRuYqBH6Q5bzK86", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1266.513671875, + "y": 529.224609375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 152.64999389648438, + "height": 25, + "seed": 885361409, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617259516, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "shard1_replica2", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "shard1_replica2", + "lineHeight": 1.25 + }, + { + "type": "text", + "version": 663, + "versionNonce": 150592668, + "isDeleted": false, + "id": "bLICR7aFNDfOBor8HGukz", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1295.689453125, + "y": 594.177734375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 26.96666717529297, + "height": 25, + "seed": 1153336033, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617224609, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "db1", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "db1", + "lineHeight": 1.25 + }, + { + "type": "rectangle", + "version": 585, + "versionNonce": 2069895836, + "isDeleted": false, + "id": "6XFHR168qyQdZGSSAkdVQ", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 745.27734375, + "y": 834.29296875, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 927.33984375, + "height": 226.73828125, + "seed": 1140814639, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "b44c5shkNkGvKfI3BvYTr", + "type": "arrow" + }, + { + "id": "vVIDbj6IOHJZPxahYvtay", + "type": "arrow" + } + ], + "updated": 1680616745288, + "link": null, + "locked": false + }, + { + "type": "arrow", + "version": 422, + "versionNonce": 152229660, + "isDeleted": false, + "id": "vVIDbj6IOHJZPxahYvtay", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1029.014821415791, + "y": 772.0078125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 48.793872493344224, + "height": 57.15797501558586, + "seed": 409206113, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617289086, + "link": null, + "locked": false, + "startBinding": { + "elementId": "KSZ6WPivPmlFfEae7MOmZ", + "gap": 26.109375, + "focus": 0.6647589899269046 + }, + "endBinding": { + "elementId": "6XFHR168qyQdZGSSAkdVQ", + "gap": 5.127181234414138, + "focus": -0.053496678221884524 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 48.793872493344224, + 57.15797501558586 + ] + ] + }, + { + "type": "arrow", + "version": 581, + "versionNonce": 477915612, + "isDeleted": false, + "id": "rkre42NcpDm8yTNezH5zh", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1012.7137950088186, + "y": 942.859375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 76.44618790627374, + "height": 0.9470375155858619, + "seed": 1085866177, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "startBinding": { + "elementId": "mY3bL5nc3pLNDLQ051PJm", + "focus": -0.04919159442148933, + "gap": 5.073170008818579 + }, + "endBinding": { + "elementId": "LCD1WmlJ4y-REz1dTpJ9Q", + "focus": -0.1910241746788114, + "gap": 2.980642084907686 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 76.44618790627374, + 0.9470375155858619 + ] + ] + }, + { + "type": "arrow", + "version": 816, + "versionNonce": 1195160036, + "isDeleted": false, + "id": "EN1jjvyD4pydVpNBYGCu1", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1092.8192637588186, + "y": 955.4648437500002, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 85.31943709372626, + "height": 2.150618734414138, + "seed": 362368975, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -85.31943709372626, + -2.150618734414138 + ] + ] + }, + { + "type": "arrow", + "version": 1189, + "versionNonce": 1569377884, + "isDeleted": false, + "id": "3ggSRTy32SXrl5tfDxejC", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1476.4091075088186, + "y": 977.5000000000002, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 546.1514683437263, + "height": 47.83421248441391, + "seed": 1811691279, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "ZBfU0ngueuYsWz6I8bCKK", + "focus": -1.1502483311217826, + "gap": 15.246093750000227 + }, + "endBinding": { + "elementId": "mY3bL5nc3pLNDLQ051PJm", + "focus": 0.7278040192946851, + "gap": 10.16969376558609 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -295.1825450088186, + 35.40234374999977 + ], + [ + -546.1514683437263, + -12.431868734414138 + ] + ] + }, + { + "type": "arrow", + "version": 1379, + "versionNonce": 806671716, + "isDeleted": false, + "id": "mTAnUdCoqWUUHAhjuWbQ4", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 898.9989512588186, + "y": 966.4609375000002, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 599.6297816562737, + "height": 78.08984374999977, + "seed": 678064929, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "mY3bL5nc3pLNDLQ051PJm", + "focus": 0.8457577505333682, + "gap": 11.562500000000227 + }, + "endBinding": { + "elementId": "TkyDDTKdzhCr1PFXHjU_H", + "focus": -0.6356670190591646, + "gap": 1.9079750155860893 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 289.9658924911814, + 78.08984374999977 + ], + [ + 599.6297816562737, + 11.939225015585862 + ] + ] + }, + { + "type": "arrow", + "version": 698, + "versionNonce": 676897500, + "isDeleted": false, + "id": "MJUWDY2EZev-CXvdwbrqg", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1299.1825450088186, + "y": 944.21484375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 86.67665665627374, + "height": 0.9900062655858619, + "seed": 449797199, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "oVA_VcnjylIcDRkS4Umwt", + "focus": -0.3219568458920805, + "gap": 15.307545008818579 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 86.67665665627374, + 0.9900062655858619 + ] + ] + }, + { + "type": "arrow", + "version": 873, + "versionNonce": 555518180, + "isDeleted": false, + "id": "CCQnVa7FiCpQ1z9gZkFIw", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1387.1161387588186, + "y": 956.75, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 87.63584334372626, + "height": 1.271256265585862, + "seed": 206368865, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "ZBfU0ngueuYsWz6I8bCKK", + "focus": -0.4014460800505109, + "gap": 15.833079991181421 + }, + "endBinding": { + "elementId": "oVA_VcnjylIcDRkS4Umwt", + "focus": 0.8799195690060025, + "gap": 15.605295415092314 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -87.63584334372626, + 1.271256265585862 + ] + ] + }, + { + "type": "arrow", + "version": 994, + "versionNonce": 1246018852, + "isDeleted": false, + "id": "hYeY6OHHfBb0xSadzrIUO", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1297.1161387588186, + "y": 656.75, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 206.63584334372626, + "height": 0.2712562655858619, + "seed": 1937283236, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1680617086016, + "link": null, + "locked": false, + "startBinding": { + "elementId": "fQkUz2oj2eZkEPDYYWcRA", + "focus": 0.43093221645966545, + "gap": 2.292064366181421 + }, + "endBinding": { + "elementId": "vUZRMf0MD0fkmVVh5EFbT", + "focus": -0.11295173263187792, + "gap": 3.984201665092314 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -206.63584334372626, + 0.2712562655858619 + ] + ] + }, + { + "type": "arrow", + "version": 1016, + "versionNonce": 1595197860, + "isDeleted": false, + "id": "uzhB9dcVibDhLKTA43AqJ", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1088.397851454096, + "y": 673.75, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 206.63584334372626, + "height": 0.2712562655858619, + "seed": 879940508, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1680617123754, + "link": null, + "locked": false, + "startBinding": { + "elementId": "fQkUz2oj2eZkEPDYYWcRA", + "focus": -0.334099379708353, + "gap": 4.292064366181421 + }, + "endBinding": { + "elementId": "vUZRMf0MD0fkmVVh5EFbT", + "focus": 0.6520798635361406, + "gap": 1.9842016650923142 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 206.63584334372626, + 0.2712562655858619 + ] + ] + }, + { + "type": "arrow", + "version": 278, + "versionNonce": 1497562140, + "isDeleted": false, + "id": "b44c5shkNkGvKfI3BvYTr", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1345.1127923846934, + "y": 774.953125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 30.47958511315369, + "height": 58.33984375, + "seed": 1409554959, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617306430, + "link": null, + "locked": false, + "startBinding": { + "elementId": "jhjA6EMo6vpUCUZHQr_mX", + "gap": 2.837890625, + "focus": -0.4532829275804875 + }, + "endBinding": { + "elementId": "6XFHR168qyQdZGSSAkdVQ", + "gap": 1, + "focus": 0.08784463162487417 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -30.47958511315369, + 58.33984375 + ] + ] + }, + { + "type": "arrow", + "version": 1033, + "versionNonce": 1150801052, + "isDeleted": false, + "id": "tOhL3LAMqpegl6h9MHUJR", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1205.19351783071, + "y": 317.2890625, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 154.68974224248336, + "height": 96.876953125, + "seed": 301771727, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1680617327380, + "link": null, + "locked": false, + "startBinding": { + "elementId": "3TaKvrFaS02XpN5DtDPRI", + "gap": 2.53125, + "focus": 0.46306101005588857 + }, + "endBinding": { + "elementId": "jhjA6EMo6vpUCUZHQr_mX", + "gap": 1, + "focus": 0.7410412358955756 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 154.68974224248336, + 96.876953125 + ] + ] + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file diff --git a/docs/ja/deployment-guides/images/Architecture.1S_2R_ReplicatedMergeTree_5-nodes.3.CH.Keeper.nodes.2.CH.nodes.png b/docs/ja/deployment-guides/images/Architecture.1S_2R_ReplicatedMergeTree_5-nodes.3.CH.Keeper.nodes.2.CH.nodes.png new file mode 100644 index 00000000000..a8d39ee2436 Binary files /dev/null and b/docs/ja/deployment-guides/images/Architecture.1S_2R_ReplicatedMergeTree_5-nodes.3.CH.Keeper.nodes.2.CH.nodes.png differ diff --git a/docs/ja/deployment-guides/images/Architecture.7-nodes.3.CH.Keeper.nodes.4.CH.nodes.excalidraw b/docs/ja/deployment-guides/images/Architecture.7-nodes.3.CH.Keeper.nodes.4.CH.nodes.excalidraw new file mode 100644 index 00000000000..d99984f9da4 --- /dev/null +++ b/docs/ja/deployment-guides/images/Architecture.7-nodes.3.CH.Keeper.nodes.4.CH.nodes.excalidraw @@ -0,0 +1,3484 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://app.excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 999, + "versionNonce": 1717040740, + "isDeleted": false, + "id": "doz_ZqNC1Q3flhyTKvtq5", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 603.00390625, + "y": 266.80859375, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 507.79296875, + "seed": 202448172, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757519, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1076, + "versionNonce": 1142165980, + "isDeleted": false, + "id": "6bX_E24wLaoVkuQUL49rE", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 902.74609375, + "y": 267.8828125, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 508.0546875, + "seed": 1554965524, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757519, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1557, + "versionNonce": 1146325476, + "isDeleted": false, + "id": "YNTKiIr_dIR3MH3HkfcRz", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 778.38671875, + "y": 856.23046875, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 163.015625, + "seed": 1654017836, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757519, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1708, + "versionNonce": 65893980, + "isDeleted": false, + "id": "3TaKvrFaS02XpN5DtDPRI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1112.3515625, + "y": 112.8984375, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 131.59375, + "height": 70.859375, + "seed": 4729388, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "yo5OoqsCs2uygBiUbUHP4", + "type": "arrow" + }, + { + "id": "jbZVPsflGswjF3TO0mtkh", + "type": "arrow" + }, + { + "id": "tOhL3LAMqpegl6h9MHUJR", + "type": "arrow" + }, + { + "id": "s-HYeFkwN90Wnid3rJNWl", + "type": "arrow" + } + ], + "updated": 1673465757519, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 227, + "versionNonce": 1009142492, + "isDeleted": false, + "id": "-FTntIW0fZhWsbhRDx1VV", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 623.5390625, + "y": 273.60546875, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 97, + "height": 25, + "seed": 1952607148, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757519, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "chnode1-dr", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "chnode1-dr" + }, + { + "type": "text", + "version": 298, + "versionNonce": 945643748, + "isDeleted": false, + "id": "FvPf0x839jBfeRK1Oi7VH", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 923.2421875, + "y": 274.765625, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 106, + "height": 25, + "seed": 892344108, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "jbZVPsflGswjF3TO0mtkh", + "type": "arrow" + } + ], + "updated": 1673465757519, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "chnode2-dr", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "chnode2-dr" + }, + { + "type": "text", + "version": 662, + "versionNonce": 256937820, + "isDeleted": false, + "id": "ZImh9dDrhSU9bFSj4RyVP", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 798.19921875, + "y": 863.02734375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 87, + "height": 25, + "seed": 1947896212, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ch2PpBqvlYoVfwfXC0ccU", + "type": "arrow" + } + ], + "updated": 1673465757519, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "chkeeper1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "chkeeper1" + }, + { + "type": "rectangle", + "version": 1035, + "versionNonce": 927442020, + "isDeleted": false, + "id": "AatWa1WT64MRIbtUJHkYx", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 631.01953125, + "y": 329.22265625, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 210.33593749999986, + "height": 418.41796874999994, + "seed": 579706924, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ch2PpBqvlYoVfwfXC0ccU", + "type": "arrow" + } + ], + "updated": 1673465757519, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1078, + "versionNonce": 2109621212, + "isDeleted": false, + "id": "KSZ6WPivPmlFfEae7MOmZ", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 930.76171875, + "y": 330.62890625, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 210.33593749999986, + "height": 415.26953125, + "seed": 115425684, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "vVIDbj6IOHJZPxahYvtay", + "type": "arrow" + } + ], + "updated": 1673465757519, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 253, + "versionNonce": 763455580, + "isDeleted": false, + "id": "2lqhMLfXV7dc8MZPEp48A", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 646.92578125, + "y": 356.5625, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 157, + "height": 25, + "seed": 897234988, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757519, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "cluster_2S_2R", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "cluster_2S_2R" + }, + { + "type": "text", + "version": 334, + "versionNonce": 1944902500, + "isDeleted": false, + "id": "zJgfnGBoFA0_lAsCwa7ok", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 955.75, + "y": 356.84765625, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 157, + "height": 25, + "seed": 1140609452, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757519, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "cluster_2S_2R", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "cluster_2S_2R" + }, + { + "type": "rectangle", + "version": 1044, + "versionNonce": 1606383068, + "isDeleted": false, + "id": "fZfl-1njFTrlC29HslsoW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 650.9375, + "y": 389.72265625, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 179.11328125, + "height": 337.06640625, + "seed": 901892628, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757519, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1229, + "versionNonce": 377513444, + "isDeleted": false, + "id": "GJLXUfVbLlM2wK6poU-QC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 948.9453125, + "y": 394.5546875, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 179.11328125, + "height": 334.06249999999994, + "seed": 1173090068, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757519, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 761, + "versionNonce": 1153567076, + "isDeleted": false, + "id": "vVj99ZeKac_jZ9gKhUbVl", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 670.64453125, + "y": 439.24609375, + "strokeColor": "#000000", + "backgroundColor": "#4c6ef5", + "width": 136.69531249999997, + "height": 265.8203125, + "seed": 1851706412, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6ZwQTNxgnbNvCbFscx6Wf", + "type": "arrow" + }, + { + "id": "AxQowbCdMeLIF6o69yEgK", + "type": "arrow" + } + ], + "updated": 1673465757519, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 831, + "versionNonce": 1732816604, + "isDeleted": false, + "id": "ftuuNibnMRnfPHFUpjZwu", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 973.640625, + "y": 445.84375, + "strokeColor": "#000000", + "backgroundColor": "#4c6ef5", + "width": 136.69531249999997, + "height": 259.546875, + "seed": 1381841964, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6ZwQTNxgnbNvCbFscx6Wf", + "type": "arrow" + }, + { + "id": "AxQowbCdMeLIF6o69yEgK", + "type": "arrow" + } + ], + "updated": 1673465757519, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 835, + "versionNonce": 110602204, + "isDeleted": false, + "id": "f0u6srndZkKL_EodskHfD", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 805.7578125, + "y": 910.84765625, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 208.04687500000003, + "height": 54.5078125, + "seed": 162401964, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "3ggSRTy32SXrl5tfDxejC", + "type": "arrow" + } + ], + "updated": 1673465757520, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 639, + "versionNonce": 43005796, + "isDeleted": false, + "id": "mY3bL5nc3pLNDLQ051PJm", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 835.640625, + "y": 929.8984375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 172, + "height": 25, + "seed": 989889044, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "rkre42NcpDm8yTNezH5zh", + "type": "arrow" + }, + { + "id": "mTAnUdCoqWUUHAhjuWbQ4", + "type": "arrow" + }, + { + "id": "3ggSRTy32SXrl5tfDxejC", + "type": "arrow" + } + ], + "updated": 1673465757520, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "ClickHouse Keeper", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse Keeper" + }, + { + "type": "rectangle", + "version": 742, + "versionNonce": 1010266076, + "isDeleted": false, + "id": "ZuIcO9LuMMsXU2q8TNX4t", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 693.16796875, + "y": 629.05078125, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 87.93359375, + "height": 44.3203125, + "seed": 1011039508, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6ZwQTNxgnbNvCbFscx6Wf", + "type": "arrow" + }, + { + "id": "tkW1YXf04V5gI2gykZZWk", + "type": "arrow" + }, + { + "id": "1WvL53BsCMiWVlo9S9qDj", + "type": "arrow" + } + ], + "updated": 1673465857006, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 833, + "versionNonce": 299608804, + "isDeleted": false, + "id": "vUZRMf0MD0fkmVVh5EFbT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 998.5625, + "y": 637.43359375, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 87.93359375, + "height": 44.3203125, + "seed": 94517780, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "AxQowbCdMeLIF6o69yEgK", + "type": "arrow" + }, + { + "id": "unoFZopHnWdvFsNWTavXu", + "type": "arrow" + }, + { + "id": "5RUswZgGGqCu9DU8-oSb4", + "type": "arrow" + }, + { + "id": "RvqXzcYlAYrBDtzpvQA7I", + "type": "arrow" + }, + { + "id": "boGY68T7ABd6-pM8vIoq1", + "type": "arrow" + } + ], + "updated": 1673465757520, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 545, + "versionNonce": 1414703844, + "isDeleted": false, + "id": "nuAmSlrm7esiXAbRY2ndR", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 710.46484375, + "y": 643.0234375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 57, + "height": 25, + "seed": 1708723372, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "AxQowbCdMeLIF6o69yEgK", + "type": "arrow" + }, + { + "id": "1een57Hw-GyI1s8UmYJ8e", + "type": "arrow" + }, + { + "id": "1WvL53BsCMiWVlo9S9qDj", + "type": "arrow" + } + ], + "updated": 1673465854871, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "table1" + }, + { + "type": "text", + "version": 607, + "versionNonce": 1780388700, + "isDeleted": false, + "id": "8Uy6RO4B05r0YaoY6xozj", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1011.875, + "y": 647.30078125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 57, + "height": 25, + "seed": 1212490028, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6ZwQTNxgnbNvCbFscx6Wf", + "type": "arrow" + }, + { + "id": "1een57Hw-GyI1s8UmYJ8e", + "type": "arrow" + }, + { + "id": "049uSUUbRTCQs9PJO_e9o", + "type": "arrow" + } + ], + "updated": 1673465866531, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "table1" + }, + { + "type": "text", + "version": 432, + "versionNonce": 311973724, + "isDeleted": false, + "id": "TPjlSolDR9g-3HcygjMeq", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 663.671875, + "y": 398.828125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 145, + "height": 25, + "seed": 1652917932, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757520, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "shard1_replica1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "shard1_replica1" + }, + { + "type": "text", + "version": 482, + "versionNonce": 1128291428, + "isDeleted": false, + "id": "CRUfTbXb5AainVI-px46P", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 962.71484375, + "y": 405.5234375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 154, + "height": 25, + "seed": 586798996, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757520, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "shard1_replica2", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "shard1_replica2" + }, + { + "type": "text", + "version": 563, + "versionNonce": 1933520868, + "isDeleted": false, + "id": "HGgdkIwc4LcjNtxr76kvh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 682.26171875, + "y": 452.109375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 28, + "height": 25, + "seed": 1746101396, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757520, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "db1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "db1" + }, + { + "type": "text", + "version": 531, + "versionNonce": 1198993500, + "isDeleted": false, + "id": "jHqW0NK5gsCGvLnYvHCx6", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 989.9453125, + "y": 460.51953125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 28, + "height": 25, + "seed": 65018796, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757520, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "db1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "db1" + }, + { + "type": "text", + "version": 363, + "versionNonce": 648115932, + "isDeleted": false, + "id": "VL9EHZ6BBa0MzyG_Ul-8O", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1150.78515625, + "y": 135.09375, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 52, + "height": 25, + "seed": 1746995884, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757520, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "client", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "client" + }, + { + "type": "arrow", + "version": 416, + "versionNonce": 662369508, + "isDeleted": false, + "id": "yo5OoqsCs2uygBiUbUHP4", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1119.9719128948714, + "y": 186.63257168045592, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 385.68675664487137, + "height": 326.43774081954405, + "seed": 972317100, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757520, + "link": null, + "locked": false, + "startBinding": { + "elementId": "3TaKvrFaS02XpN5DtDPRI", + "focus": 0.12000836906439498, + "gap": 2.874759180455925 + }, + "endBinding": { + "elementId": "mfP2BtyKXz42duAKGG1wP", + "focus": -0.41223771360231753, + "gap": 3.87890625 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -385.68675664487137, + 326.43774081954405 + ] + ] + }, + { + "type": "arrow", + "version": 708, + "versionNonce": 1501969244, + "isDeleted": false, + "id": "jbZVPsflGswjF3TO0mtkh", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1161.033824898155, + "y": 187.25390625, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 126.17799843237572, + "height": 330.68672591477593, + "seed": 679203860, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757520, + "link": null, + "locked": false, + "startBinding": { + "elementId": "3TaKvrFaS02XpN5DtDPRI", + "focus": 0.02851841252306824, + "gap": 3.49609375 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -126.17799843237572, + 330.68672591477593 + ] + ] + }, + { + "type": "arrow", + "version": 410, + "versionNonce": 361936996, + "isDeleted": false, + "id": "6ZwQTNxgnbNvCbFscx6Wf", + "fillStyle": "cross-hatch", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 786.62109375, + "y": 641.2413335655827, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 210.3812421588275, + "height": 3.9088842671210386, + "seed": 769023380, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757520, + "link": null, + "locked": false, + "startBinding": { + "elementId": "ZuIcO9LuMMsXU2q8TNX4t", + "focus": -0.47428717728252356, + "gap": 5.51953125 + }, + "endBinding": { + "elementId": "8Uy6RO4B05r0YaoY6xozj", + "focus": 1.0625631962676507, + "gap": 15.02734375 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 210.3812421588275, + 3.9088842671210386 + ] + ] + }, + { + "type": "arrow", + "version": 457, + "versionNonce": 1281257436, + "isDeleted": false, + "id": "AxQowbCdMeLIF6o69yEgK", + "fillStyle": "cross-hatch", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 993.64453125, + "y": 668.4932436399571, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 213.38671875, + "height": 1.9319300322227946, + "seed": 1549785132, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757520, + "link": null, + "locked": false, + "startBinding": { + "elementId": "vUZRMf0MD0fkmVVh5EFbT", + "focus": -0.4139713939639972, + "gap": 4.91796875 + }, + "endBinding": { + "elementId": "nuAmSlrm7esiXAbRY2ndR", + "focus": 0.8358676393880391, + "gap": 12.79296875 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -213.38671875, + -1.9319300322227946 + ] + ] + }, + { + "type": "rectangle", + "version": 1625, + "versionNonce": 255595612, + "isDeleted": false, + "id": "_NgRKPWWRBMhWmORFbqfG", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1074.103515625, + "y": 853.1796875, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 163.015625, + "seed": 549292591, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ch2PpBqvlYoVfwfXC0ccU", + "type": "arrow" + }, + { + "id": "vVIDbj6IOHJZPxahYvtay", + "type": "arrow" + }, + { + "id": "rkre42NcpDm8yTNezH5zh", + "type": "arrow" + } + ], + "updated": 1673465757520, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 705, + "versionNonce": 562229092, + "isDeleted": false, + "id": "Pw_o-YfuyZUoUg14Bk9B9", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1103.5625, + "y": 875.25, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 96, + "height": 25, + "seed": 304529441, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "chkeeper2", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "chkeeper2" + }, + { + "type": "rectangle", + "version": 985, + "versionNonce": 834101988, + "isDeleted": false, + "id": "LCD1WmlJ4y-REz1dTpJ9Q", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1092.140625, + "y": 912.42578125, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 208.04687500000003, + "height": 54.5078125, + "seed": 1815246127, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "rkre42NcpDm8yTNezH5zh", + "type": "arrow" + }, + { + "id": "CCQnVa7FiCpQ1z9gZkFIw", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 712, + "versionNonce": 1913630044, + "isDeleted": false, + "id": "oVA_VcnjylIcDRkS4Umwt", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1111.875, + "y": 934.8984375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 172, + "height": 25, + "seed": 1269328577, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "MJUWDY2EZev-CXvdwbrqg", + "type": "arrow" + }, + { + "id": "CCQnVa7FiCpQ1z9gZkFIw", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "ClickHouse Keeper", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse Keeper" + }, + { + "type": "rectangle", + "version": 1722, + "versionNonce": 974218852, + "isDeleted": false, + "id": "yu32XFDVxjsltOILQkLVA", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1365.177734375, + "y": 855.53515625, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 163.015625, + "seed": 63815567, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "2Qvve3RQu79DrGbdGSIoE", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 807, + "versionNonce": 921280988, + "isDeleted": false, + "id": "Vx1u3JBG4wFPZTH61H34k", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1394.63671875, + "y": 877.60546875, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 96, + "height": 25, + "seed": 949683425, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "chkeeper3", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "chkeeper3" + }, + { + "type": "rectangle", + "version": 1037, + "versionNonce": 1063188964, + "isDeleted": false, + "id": "TkyDDTKdzhCr1PFXHjU_H", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1383.89453125, + "y": 921.984375, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 208.04687500000003, + "height": 54.5078125, + "seed": 1982657967, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "3ggSRTy32SXrl5tfDxejC", + "type": "arrow" + }, + { + "id": "mTAnUdCoqWUUHAhjuWbQ4", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 814, + "versionNonce": 630261340, + "isDeleted": false, + "id": "ZBfU0ngueuYsWz6I8bCKK", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1402.94921875, + "y": 937.25390625, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 172, + "height": 25, + "seed": 126468289, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "CCQnVa7FiCpQ1z9gZkFIw", + "type": "arrow" + }, + { + "id": "3ggSRTy32SXrl5tfDxejC", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "ClickHouse Keeper", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse Keeper" + }, + { + "type": "rectangle", + "version": 1122, + "versionNonce": 2091785572, + "isDeleted": false, + "id": "jhjA6EMo6vpUCUZHQr_mX", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1208.259765625, + "y": 266.166015625, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 505.94921874999994, + "seed": 1369749569, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "b44c5shkNkGvKfI3BvYTr", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1224, + "versionNonce": 47700700, + "isDeleted": false, + "id": "4Sga6YK0N6BhYlnzfY-If", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1507.833984375, + "y": 267.642578125, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 260.78515625, + "height": 505.75, + "seed": 307406927, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 368, + "versionNonce": 458019044, + "isDeleted": false, + "id": "qNOaN3pVAJBSsMo2IDl3A", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1223.572265625, + "y": 273.486328125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 105, + "height": 25, + "seed": 1875249185, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "chnode3-dr", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "chnode3-dr" + }, + { + "type": "text", + "version": 421, + "versionNonce": 693116764, + "isDeleted": false, + "id": "FQeMCzI5wpNs4VKgvsRbJ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1528.771484375, + "y": 278.841796875, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 105, + "height": 25, + "seed": 1570162287, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "chnode4-dr", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "chnode4-dr" + }, + { + "type": "rectangle", + "version": 1264, + "versionNonce": 1791562852, + "isDeleted": false, + "id": "rGWPbCPCIaA6wd0vf3cAm", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1236.419921875, + "y": 329.099609375, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 210.33593749999986, + "height": 415.86328125000006, + "seed": 15883265, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1213, + "versionNonce": 1363923932, + "isDeleted": false, + "id": "cy7O-CTpJ-KentMW4VdfJ", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1536.193359375, + "y": 325.974609375, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 210.33593749999986, + "height": 424.23828125000006, + "seed": 49422479, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "2Qvve3RQu79DrGbdGSIoE", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 432, + "versionNonce": 418441188, + "isDeleted": false, + "id": "wRq1_meRS7lJ2EKHgKk2W", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 6.281358663757188, + "x": 1253.544921875, + "y": 354.646484375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 157, + "height": 25, + "seed": 1965634529, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "cluster_2S_2R", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "cluster_2S_2R" + }, + { + "type": "text", + "version": 434, + "versionNonce": 1490876508, + "isDeleted": false, + "id": "ZNj_OF3A8KOYCPIJxemRv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1557.603515625, + "y": 346.330078125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 157, + "height": 25, + "seed": 874329775, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "cluster_2S_2R", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "cluster_2S_2R" + }, + { + "type": "rectangle", + "version": 1172, + "versionNonce": 1775389540, + "isDeleted": false, + "id": "oluxJzMjFfYOyn5-B0dka", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1256.251953125, + "y": 390.349609375, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 179.11328125, + "height": 335.81250000000006, + "seed": 276434881, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1189, + "versionNonce": 198544604, + "isDeleted": false, + "id": "ajb0Y-1AIvf3mpC8Gisy9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1555.865234375, + "y": 390.783203125, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 179.11328125, + "height": 337.78125000000006, + "seed": 1472235727, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 933, + "versionNonce": 1874542308, + "isDeleted": false, + "id": "Dz6jzUvxO4147RhI8WZFh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1278.189453125, + "y": 445.775390625, + "strokeColor": "#000000", + "backgroundColor": "#4c6ef5", + "width": 136.69531249999997, + "height": 263.49218749999994, + "seed": 1761898401, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "tOhL3LAMqpegl6h9MHUJR", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 960, + "versionNonce": 1808240988, + "isDeleted": false, + "id": "7mjktKEHbPcChuXq2eo5m", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1578.818359375, + "y": 439.923828125, + "strokeColor": "#000000", + "backgroundColor": "#4c6ef5", + "width": 136.69531249999997, + "height": 268.22656249999994, + "seed": 1802802927, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 857, + "versionNonce": 958586972, + "isDeleted": false, + "id": "fQkUz2oj2eZkEPDYYWcRA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1299.408203125, + "y": 644.103515625, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 87.93359375, + "height": 44.3203125, + "seed": 1680320321, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Tc6pUBn2VamfWcVF02hrZ", + "type": "arrow" + }, + { + "id": "6-aQPb-PIw6Gb0uCJY8hW", + "type": "arrow" + } + ], + "updated": 1673465879926, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 905, + "versionNonce": 929709788, + "isDeleted": false, + "id": "OgP2fCzCGSSYc_ZLdu3tr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1607.759765625, + "y": 635.228515625, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 87.93359375, + "height": 44.3203125, + "seed": 284830031, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6k5d9f3O3ERrytVDoaHKq", + "type": "arrow" + }, + { + "id": "fqVZi7oKcvz45aVHwi1GP", + "type": "arrow" + }, + { + "id": "fPSg8iqk4AEDCGu9JUbZh", + "type": "arrow" + }, + { + "id": "5KB-9zBxZdK0MPSlVVNg7", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 732, + "versionNonce": 2132948964, + "isDeleted": false, + "id": "WbMJv-HlFhemifDr5ojCi", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1317.958984375, + "y": 652.669921875, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 57, + "height": 25, + "seed": 840111905, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6k5d9f3O3ERrytVDoaHKq", + "type": "arrow" + }, + { + "id": "6-aQPb-PIw6Gb0uCJY8hW", + "type": "arrow" + } + ], + "updated": 1673465881826, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "table1" + }, + { + "type": "text", + "version": 714, + "versionNonce": 1365349732, + "isDeleted": false, + "id": "oMjTSaM1N58ACMutJDQo3", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1622.029296875, + "y": 646.466796875, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 57, + "height": 25, + "seed": 2108041071, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Tc6pUBn2VamfWcVF02hrZ", + "type": "arrow" + }, + { + "id": "Q2_sAmVp3gwWZ2oKNQ7rL", + "type": "arrow" + } + ], + "updated": 1673465892668, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "table1" + }, + { + "type": "text", + "version": 529, + "versionNonce": 518221924, + "isDeleted": false, + "id": "T_zXJHMRuYqBH6Q5bzK86", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1265.513671875, + "y": 408.224609375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 154, + "height": 25, + "seed": 885361409, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "shard2_replica1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "shard2_replica1" + }, + { + "type": "text", + "version": 584, + "versionNonce": 1200961500, + "isDeleted": false, + "id": "gtCtR7kY6nZwt9rq7tTlS", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1568.044921875, + "y": 407.763671875, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 162, + "height": 25, + "seed": 208494991, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "shard2_replica2", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "shard2_replica2" + }, + { + "type": "text", + "version": 618, + "versionNonce": 291488740, + "isDeleted": false, + "id": "bLICR7aFNDfOBor8HGukz", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1289.689453125, + "y": 457.177734375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 28, + "height": 25, + "seed": 1153336033, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "db1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "db1" + }, + { + "type": "text", + "version": 658, + "versionNonce": 140106844, + "isDeleted": false, + "id": "pt4oXdVb7fXEfmAyVP0IK", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1586.337890625, + "y": 447.916015625, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 28, + "height": 25, + "seed": 1317558191, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "db1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "db1" + }, + { + "type": "arrow", + "version": 576, + "versionNonce": 671459172, + "isDeleted": false, + "id": "Tc6pUBn2VamfWcVF02hrZ", + "fillStyle": "cross-hatch", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1392.861328125, + "y": 653.3642358962176, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 214.14436429998887, + "height": 7.23265463879045, + "seed": 2123202241, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "startBinding": { + "elementId": "fQkUz2oj2eZkEPDYYWcRA", + "focus": -0.47428717728252356, + "gap": 5.51953125 + }, + "endBinding": { + "elementId": "oMjTSaM1N58ACMutJDQo3", + "focus": 1.062590750239405, + "gap": 15.02734375 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 214.14436429998887, + -7.23265463879045 + ] + ] + }, + { + "type": "arrow", + "version": 677, + "versionNonce": 34992348, + "isDeleted": false, + "id": "6k5d9f3O3ERrytVDoaHKq", + "fillStyle": "cross-hatch", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1602.841796875, + "y": 668.5903858023075, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 214.08984375, + "height": 6.469282503233785, + "seed": 438274511, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "startBinding": { + "elementId": "OgP2fCzCGSSYc_ZLdu3tr", + "focus": -0.4139713939639972, + "gap": 4.91796875 + }, + "endBinding": { + "elementId": "WbMJv-HlFhemifDr5ojCi", + "focus": 0.8358333991526675, + "gap": 13.79296875 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -214.08984375, + 6.469282503233785 + ] + ] + }, + { + "type": "arrow", + "version": 1313, + "versionNonce": 1193482980, + "isDeleted": false, + "id": "ch2PpBqvlYoVfwfXC0ccU", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 745.5982475475205, + "y": 771.9687500000001, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 34.99830724046308, + "height": 59.742187499999886, + "seed": 2122204719, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "startBinding": { + "elementId": "AatWa1WT64MRIbtUJHkYx", + "gap": 24.328125000000114, + "focus": 0.5593528890074575 + }, + "endBinding": { + "elementId": "6XFHR168qyQdZGSSAkdVQ", + "gap": 2.58203125, + "focus": -0.6799372564994136 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 34.99830724046308, + 59.742187499999886 + ] + ] + }, + { + "type": "rectangle", + "version": 583, + "versionNonce": 73102684, + "isDeleted": false, + "id": "6XFHR168qyQdZGSSAkdVQ", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 745.27734375, + "y": 834.29296875, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 927.33984375, + "height": 226.73828125, + "seed": 1140814639, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ch2PpBqvlYoVfwfXC0ccU", + "type": "arrow" + }, + { + "id": "b44c5shkNkGvKfI3BvYTr", + "type": "arrow" + }, + { + "id": "2Qvve3RQu79DrGbdGSIoE", + "type": "arrow" + }, + { + "id": "vVIDbj6IOHJZPxahYvtay", + "type": "arrow" + } + ], + "updated": 1673465757521, + "link": null, + "locked": false + }, + { + "type": "arrow", + "version": 316, + "versionNonce": 424025700, + "isDeleted": false, + "id": "vVIDbj6IOHJZPxahYvtay", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1041.2723887588186, + "y": 772.0078125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 44.938375406273735, + "height": 57.15797501558586, + "seed": 409206113, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "startBinding": { + "elementId": "KSZ6WPivPmlFfEae7MOmZ", + "focus": 0.6647589899269046, + "gap": 26.109375 + }, + "endBinding": { + "elementId": "6XFHR168qyQdZGSSAkdVQ", + "focus": -0.053496678221884524, + "gap": 5.127181234414138 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 44.938375406273735, + 57.15797501558586 + ] + ] + }, + { + "type": "arrow", + "version": 581, + "versionNonce": 477915612, + "isDeleted": false, + "id": "rkre42NcpDm8yTNezH5zh", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1012.7137950088186, + "y": 942.859375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 76.44618790627374, + "height": 0.9470375155858619, + "seed": 1085866177, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "startBinding": { + "elementId": "mY3bL5nc3pLNDLQ051PJm", + "focus": -0.04919159442148933, + "gap": 5.073170008818579 + }, + "endBinding": { + "elementId": "LCD1WmlJ4y-REz1dTpJ9Q", + "focus": -0.1910241746788114, + "gap": 2.980642084907686 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 76.44618790627374, + 0.9470375155858619 + ] + ] + }, + { + "type": "arrow", + "version": 816, + "versionNonce": 1195160036, + "isDeleted": false, + "id": "EN1jjvyD4pydVpNBYGCu1", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1092.8192637588186, + "y": 955.4648437500002, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 85.31943709372626, + "height": 2.150618734414138, + "seed": 362368975, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757521, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -85.31943709372626, + -2.150618734414138 + ] + ] + }, + { + "type": "arrow", + "version": 1189, + "versionNonce": 1569377884, + "isDeleted": false, + "id": "3ggSRTy32SXrl5tfDxejC", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1476.4091075088186, + "y": 977.5000000000002, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 546.1514683437263, + "height": 47.83421248441391, + "seed": 1811691279, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "ZBfU0ngueuYsWz6I8bCKK", + "focus": -1.1502483311217826, + "gap": 15.246093750000227 + }, + "endBinding": { + "elementId": "mY3bL5nc3pLNDLQ051PJm", + "focus": 0.7278040192946851, + "gap": 10.16969376558609 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -295.1825450088186, + 35.40234374999977 + ], + [ + -546.1514683437263, + -12.431868734414138 + ] + ] + }, + { + "type": "arrow", + "version": 1379, + "versionNonce": 806671716, + "isDeleted": false, + "id": "mTAnUdCoqWUUHAhjuWbQ4", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 898.9989512588186, + "y": 966.4609375000002, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 599.6297816562737, + "height": 78.08984374999977, + "seed": 678064929, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "mY3bL5nc3pLNDLQ051PJm", + "focus": 0.8457577505333682, + "gap": 11.562500000000227 + }, + "endBinding": { + "elementId": "TkyDDTKdzhCr1PFXHjU_H", + "focus": -0.6356670190591646, + "gap": 1.9079750155860893 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 289.9658924911814, + 78.08984374999977 + ], + [ + 599.6297816562737, + 11.939225015585862 + ] + ] + }, + { + "type": "arrow", + "version": 698, + "versionNonce": 676897500, + "isDeleted": false, + "id": "MJUWDY2EZev-CXvdwbrqg", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1299.1825450088186, + "y": 944.21484375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 86.67665665627374, + "height": 0.9900062655858619, + "seed": 449797199, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "oVA_VcnjylIcDRkS4Umwt", + "focus": -0.3219568458920805, + "gap": 15.307545008818579 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 86.67665665627374, + 0.9900062655858619 + ] + ] + }, + { + "type": "arrow", + "version": 873, + "versionNonce": 555518180, + "isDeleted": false, + "id": "CCQnVa7FiCpQ1z9gZkFIw", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1387.1161387588186, + "y": 956.75, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 87.63584334372626, + "height": 1.271256265585862, + "seed": 206368865, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "ZBfU0ngueuYsWz6I8bCKK", + "focus": -0.4014460800505109, + "gap": 15.833079991181421 + }, + "endBinding": { + "elementId": "oVA_VcnjylIcDRkS4Umwt", + "focus": 0.8799195690060025, + "gap": 15.605295415092314 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -87.63584334372626, + 1.271256265585862 + ] + ] + }, + { + "type": "arrow", + "version": 166, + "versionNonce": 1937237852, + "isDeleted": false, + "id": "b44c5shkNkGvKfI3BvYTr", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1333.1940083568848, + "y": 774.953125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 26.673004044225536, + "height": 58.33984375, + "seed": 1409554959, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "jhjA6EMo6vpUCUZHQr_mX", + "gap": 2.837890625, + "focus": -0.4532829275804875 + }, + "endBinding": { + "elementId": "6XFHR168qyQdZGSSAkdVQ", + "gap": 1, + "focus": 0.08784463162487417 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -26.673004044225536, + 58.33984375 + ] + ] + }, + { + "type": "arrow", + "version": 118, + "versionNonce": 322608092, + "isDeleted": false, + "id": "2Qvve3RQu79DrGbdGSIoE", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1617.1379086119434, + "y": 771.7812500000002, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 32.41041515605525, + "height": 60.64843749999977, + "seed": 1501924399, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "cy7O-CTpJ-KentMW4VdfJ", + "focus": -0.460679729792005, + "gap": 21.568359375 + }, + "endBinding": { + "elementId": "6XFHR168qyQdZGSSAkdVQ", + "focus": 0.5993280341824869, + "gap": 1.86328125 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -32.41041515605525, + 60.64843749999977 + ] + ] + }, + { + "type": "arrow", + "version": 738, + "versionNonce": 1211277284, + "isDeleted": false, + "id": "tOhL3LAMqpegl6h9MHUJR", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1184.8139520877953, + "y": 186.2890625, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 164.54126937196384, + "height": 319.25795742166434, + "seed": 301771727, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "3TaKvrFaS02XpN5DtDPRI", + "focus": 0.15345616469956536, + "gap": 2.53125 + }, + "endBinding": { + "elementId": "IyEuh1a9LnHG-JUDXlB-i", + "focus": 0.2722825954194206, + "gap": 6.443214453335656 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 164.54126937196384, + 319.25795742166434 + ] + ] + }, + { + "type": "arrow", + "version": 671, + "versionNonce": 28491868, + "isDeleted": false, + "id": "s-HYeFkwN90Wnid3rJNWl", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1217.6726151735345, + "y": 185.75, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "width": 421.75279968733844, + "height": 318.4728011716643, + "seed": 127429455, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "startBinding": { + "elementId": "3TaKvrFaS02XpN5DtDPRI", + "focus": 0.08901572298861447, + "gap": 1.9921875 + }, + "endBinding": { + "elementId": "voKu0tXBmEaJrouiIomsC", + "focus": 0.3985151838540141, + "gap": 6.150245703335713 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 421.75279968733844, + 318.4728011716643 + ] + ] + }, + { + "type": "rectangle", + "version": 330, + "versionNonce": 403749220, + "isDeleted": false, + "id": "mfP2BtyKXz42duAKGG1wP", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 682.0859375, + "y": 516.94921875, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 114.61328125, + "height": 40.12890625, + "seed": 973303009, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "type": "text", + "id": "oaJS_EqromiKeDyr4nClL" + }, + { + "id": "yo5OoqsCs2uygBiUbUHP4", + "type": "arrow" + }, + { + "id": "MP8lFTuT_14mccQcuYSdA", + "type": "arrow" + } + ], + "updated": 1673465845302, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 18, + "versionNonce": 649221340, + "isDeleted": false, + "id": "oaJS_EqromiKeDyr4nClL", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 694.392578125, + "y": 527.013671875, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 90, + "height": 18, + "seed": 768116271, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757522, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "table1_dist", + "baseline": 13, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "mfP2BtyKXz42duAKGG1wP", + "originalText": "table1_dist" + }, + { + "type": "rectangle", + "version": 417, + "versionNonce": 1711377380, + "isDeleted": false, + "id": "Vd91FLWRYUL8pd6YtU7Ig", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 985.517578125, + "y": 514.974609375, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 114.61328125, + "height": 40.12890625, + "seed": 768359599, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "type": "text", + "id": "Ctzwpzg-cg95BAO7Tv1FS" + }, + { + "id": "GK4Iba9Rr6jxTDbnCF0CO", + "type": "arrow" + } + ], + "updated": 1673465805598, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 110, + "versionNonce": 896268516, + "isDeleted": false, + "id": "Ctzwpzg-cg95BAO7Tv1FS", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 997.82421875, + "y": 525.0390625, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 90, + "height": 18, + "seed": 296118721, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757523, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "table1_dist", + "baseline": 13, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "Vd91FLWRYUL8pd6YtU7Ig", + "originalText": "table1_dist" + }, + { + "type": "rectangle", + "version": 399, + "versionNonce": 1938282844, + "isDeleted": false, + "id": "IyEuh1a9LnHG-JUDXlB-i", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1287.291015625, + "y": 511.990234375, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 114.61328125, + "height": 40.12890625, + "seed": 1249761391, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "type": "text", + "id": "2_hYlsGbdDpkQgofRihLh" + }, + { + "id": "tOhL3LAMqpegl6h9MHUJR", + "type": "arrow" + }, + { + "id": "KN4O7IzixCRBlvLndlDry", + "type": "arrow" + } + ], + "updated": 1673465816623, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 91, + "versionNonce": 1187200100, + "isDeleted": false, + "id": "2_hYlsGbdDpkQgofRihLh", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1299.59765625, + "y": 522.0546875, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 90, + "height": 18, + "seed": 121465345, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757523, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "table1_dist", + "baseline": 13, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "IyEuh1a9LnHG-JUDXlB-i", + "originalText": "table1_dist" + }, + { + "type": "rectangle", + "version": 414, + "versionNonce": 1278780772, + "isDeleted": false, + "id": "voKu0tXBmEaJrouiIomsC", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1583.408203125, + "y": 510.373046875, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 114.61328125, + "height": 40.12890625, + "seed": 567927759, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "type": "text", + "id": "oShiptiUcsFKb5N0Wzg3C" + }, + { + "id": "s-HYeFkwN90Wnid3rJNWl", + "type": "arrow" + }, + { + "id": "3BvHiCA3kPGONkw1BkNH4", + "type": "arrow" + } + ], + "updated": 1673465835890, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 100, + "versionNonce": 1130762212, + "isDeleted": false, + "id": "oShiptiUcsFKb5N0Wzg3C", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1595.71484375, + "y": 520.4375, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "width": 90, + "height": 18, + "seed": 1812087969, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1673465757523, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "table1_dist", + "baseline": 13, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "voKu0tXBmEaJrouiIomsC", + "originalText": "table1_dist" + }, + { + "id": "WqsIP0xQf7vNqaQ6aUdmI", + "type": "line", + "x": 726.6935763888889, + "y": 596.2447916666666, + "width": 927.4435763888889, + "height": 1.640625, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 688969572, + "version": 136, + "versionNonce": 1318437084, + "isDeleted": false, + "boundElements": null, + "updated": 1673465790669, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 927.4435763888889, + -1.640625 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "MP8lFTuT_14mccQcuYSdA", + "type": "arrow", + "x": 729.657986111111, + "y": 596.9869791666666, + "width": 2.569444444444514, + "height": 30.837673611111086, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 2137248604, + "version": 176, + "versionNonce": 793877604, + "isDeleted": false, + "boundElements": null, + "updated": 1673465840507, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 2.569444444444514, + -30.837673611111086 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "mfP2BtyKXz42duAKGG1wP", + "focus": 0.08032629512951014, + "gap": 9.071180555555543 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "1WvL53BsCMiWVlo9S9qDj", + "type": "arrow", + "x": 729.40625, + "y": 593.8619791666667, + "width": 0.00868055555565661, + "height": 32.8342013888888, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 1567607772, + "version": 441, + "versionNonce": 1837770972, + "isDeleted": false, + "boundElements": null, + "updated": 1673465859923, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 0.00868055555565661, + 32.8342013888888 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "ZuIcO9LuMMsXU2q8TNX4t", + "focus": -0.17541251232267535, + "gap": 2.354600694444457 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "049uSUUbRTCQs9PJO_e9o", + "type": "arrow", + "x": 1040.9774305555559, + "y": 599.7126736111112, + "width": 0.45572916666674246, + "height": 35.954861111111086, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 640574180, + "version": 542, + "versionNonce": 943795164, + "isDeleted": false, + "boundElements": null, + "updated": 1673465873521, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -0.45572916666674246, + 35.954861111111086 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "8Uy6RO4B05r0YaoY6xozj", + "focus": -0.005554677651451976, + "gap": 11.633246527777715 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "6-aQPb-PIw6Gb0uCJY8hW", + "type": "arrow", + "x": 1344.5494791666665, + "y": 594.7647569444445, + "width": 1.1631944444443434, + "height": 47.63020833333326, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 1218252772, + "version": 636, + "versionNonce": 492411748, + "isDeleted": false, + "boundElements": null, + "updated": 1673465884314, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 1.1631944444443434, + 47.63020833333326 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "WbMJv-HlFhemifDr5ojCi", + "focus": -0.006600020736089099, + "gap": 10.274956597222285 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "Q2_sAmVp3gwWZ2oKNQ7rL", + "type": "arrow", + "x": 1654.206597222222, + "y": 590.4592013888889, + "width": 1.1631944444443434, + "height": 47.63020833333326, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 2095530332, + "version": 719, + "versionNonce": 257035868, + "isDeleted": false, + "boundElements": null, + "updated": 1673465892668, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 1.1631944444443434, + 47.63020833333326 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "oMjTSaM1N58ACMutJDQo3", + "focus": 0.18574203708432807, + "gap": 8.377387152777828 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "GK4Iba9Rr6jxTDbnCF0CO", + "type": "arrow", + "x": 1039.675347222222, + "y": 595.4982638888889, + "width": 0.5555555555554861, + "height": 36.25, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 62790628, + "version": 279, + "versionNonce": 1248237412, + "isDeleted": false, + "boundElements": null, + "updated": 1673465824931, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -0.5555555555554861, + -36.25 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "Vd91FLWRYUL8pd6YtU7Ig", + "focus": 0.0707369614114876, + "gap": 4.144748263888914 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "KN4O7IzixCRBlvLndlDry", + "type": "arrow", + "x": 1344.4756944444443, + "y": 592.5859375, + "width": 0.6684027777778851, + "height": 35.3125, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 355364708, + "version": 315, + "versionNonce": 1083789156, + "isDeleted": false, + "boundElements": null, + "updated": 1673465828566, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -0.6684027777778851, + -35.3125 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "IyEuh1a9LnHG-JUDXlB-i", + "focus": 0.021975891860499298, + "gap": 5.154296875 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "3BvHiCA3kPGONkw1BkNH4", + "type": "arrow", + "x": 1652.8871527777778, + "y": 593.0069444444445, + "width": 0.6684027777778851, + "height": 35.3125, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 737200348, + "version": 416, + "versionNonce": 783416924, + "isDeleted": false, + "boundElements": null, + "updated": 1673465835890, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -0.6684027777778851, + -35.3125 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "voKu0tXBmEaJrouiIomsC", + "focus": -0.1904777562411242, + "gap": 7.192491319444457 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file diff --git a/docs/ja/deployment-guides/images/HA-plus-horizontal-scaling-1.png b/docs/ja/deployment-guides/images/HA-plus-horizontal-scaling-1.png new file mode 100644 index 00000000000..e98eb3fc7d0 Binary files /dev/null and b/docs/ja/deployment-guides/images/HA-plus-horizontal-scaling-1.png differ diff --git a/docs/ja/deployment-guides/images/scaling-out-1.png b/docs/ja/deployment-guides/images/scaling-out-1.png new file mode 100644 index 00000000000..36696c1c801 Binary files /dev/null and b/docs/ja/deployment-guides/images/scaling-out-1.png differ diff --git a/docs/ja/deployment-guides/replicated.md b/docs/ja/deployment-guides/replicated.md new file mode 100644 index 00000000000..6c7d859ff2d --- /dev/null +++ b/docs/ja/deployment-guides/replicated.md @@ -0,0 +1,557 @@ +--- +slug: /ja/architecture/replication +sidebar_label: 障害è€æ€§ã®ãŸã‚ã®ãƒ¬ãƒ—リケーション +sidebar_position: 10 +title: 障害è€æ€§ã®ãŸã‚ã®ãƒ¬ãƒ—リケーション +--- +import ReplicationShardingTerminology from '@site/docs/ja/_snippets/_replication-sharding-terminology.md'; +import ConfigFileNote from '@site/docs/ja/_snippets/_config-files.md'; +import KeeperConfigFileNote from '@site/docs/ja/_snippets/_keeper-config-files.md'; + + +## 説明 +ã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã§ã¯ã€5å°ã®ã‚µãƒ¼ãƒãƒ¼ãŒæ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚2å°ã¯ãƒ‡ãƒ¼ã‚¿ã®ã‚³ãƒ”ーをホストã™ã‚‹ãŸã‚ã«ä½¿ã‚ã‚Œã¾ã™ã€‚残りã®3å°ã®ã‚µãƒ¼ãƒãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿ã®ãƒ¬ãƒ—リケーションを調整ã™ã‚‹ãŸã‚ã«ä½¿ã‚ã‚Œã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€ReplicatedMergeTreeテーブルエンジンを使用ã—ã¦ã€ä¸¡æ–¹ã®ãƒ‡ãƒ¼ã‚¿ãƒŽãƒ¼ãƒ‰ã«ã‚ãŸã£ã¦ãƒ¬ãƒ—リケートã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ + +## レベル: 基本 + + + +## 環境 +### アーキテクãƒãƒ£å›³ +![ReplicatedMergeTreeを使用ã—ãŸ1シャードã¨2レプリカã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£å›³](@site/docs/ja/deployment-guides/images/Architecture.1S_2R_ReplicatedMergeTree_5-nodes.3.CH.Keeper.nodes.2.CH.nodes.png) + +|Node|説明| +|----|-----------| +|clickhouse-01|データ| +|clickhouse-02|データ| +|clickhouse-keeper-01|分散コーディãƒãƒ¼ã‚·ãƒ§ãƒ³| +|clickhouse-keeper-02|分散コーディãƒãƒ¼ã‚·ãƒ§ãƒ³| +|clickhouse-keeper-03|分散コーディãƒãƒ¼ã‚·ãƒ§ãƒ³| + +:::note +本番環境ã§ã¯ã€ClickHouse Keeperã®ãŸã‚ã«*専用*ã®ãƒ›ã‚¹ãƒˆã‚’使用ã™ã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚テスト環境ã§ã¯ã€ClickHouse Serverã¨ClickHouse Keeperã‚’åŒã˜ã‚µãƒ¼ãƒãƒ¼ä¸Šã§çµ„ã¿åˆã‚ã›ã¦å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒè¨±å®¹ã•ã‚Œã¾ã™ã€‚ä»–ã®åŸºæœ¬çš„ãªä¾‹ã€[スケールアウト](/docs/ja/deployment-guides/horizontal-scaling.md)ã§ã¯ã€ã“ã®æ–¹æ³•ã‚’使用ã—ã¦ã„ã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€Keeperã¨ClickHouse Serverを分離ã™ã‚‹æŽ¨å¥¨ã•ã‚Œã‚‹æ–¹æ³•ã‚’示ã—ã¾ã™ã€‚Keeperサーãƒãƒ¼ã¯å°ã•ãã™ã‚‹ã“ã¨ãŒã§ãã€ClickHouse ServersãŒéžå¸¸ã«å¤§ãããªã‚‹ã¾ã§ã€å„Keeperサーãƒãƒ¼ã«ã¯é€šå¸¸4GB RAMãŒã‚ã‚Œã°å分ã§ã™ã€‚ +::: + +## インストール + +2å°ã®ã‚µãƒ¼ãƒãƒ¼`clickhouse-01`ã¨`clickhouse-02`ã«ClickHouse serverã¨clientをインストールã—ã¾ã™ã€‚[アーカイブタイプã«å¿œã˜ãŸæ‰‹é †](/docs/ja/getting-started/install.md/#available-installation-options) (.deb, .rpm, .tar.gzãªã©)ã«å¾“ã£ã¦ãã ã•ã„。 + +3å°ã®ã‚µãƒ¼ãƒãƒ¼`clickhouse-keeper-01`ã€`clickhouse-keeper-02`ã€`clickhouse-keeper-03`ã«ClickHouse Keeperをインストールã—ã¾ã™ã€‚[アーカイブタイプã«å¿œã˜ãŸæ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„](/docs/ja/getting-started/install.md/#install-standalone-clickhouse-keeper) (.deb, .rpm, .tar.gzãªã©)。 + +## 設定ファイルã®ç·¨é›† + + + +## clickhouse-01ã®è¨­å®š + +clickhouse-01ã«ã¯5ã¤ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’1ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¾ã¨ã‚ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®æ˜Žç¢ºã•ã®ãŸã‚ã«åˆ¥ã€…ã«è¦‹ã‚‹ã»ã†ãŒç°¡å˜ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。設定ファイルを読ã¿é€²ã‚ã‚‹ã¨ã€ã»ã¨ã‚“ã©ã®è¨­å®šãŒclickhouse-01ã¨clickhouse-02ã§åŒã˜ã§ã‚ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã€é•ã„ã¯å¼·èª¿ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¨ãƒ­ã‚°ã®è¨­å®š + +ã“れらã®å€¤ã¯ãŠå¥½ã¿ã«å¿œã˜ã¦ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã§ãã¾ã™ã€‚ã“ã®ä¾‹ã®è¨­å®šã§ã¯ã€ä»¥ä¸‹ã‚’æä¾›ã—ã¾ã™: +- 1000Mã®ãƒ­ãƒ¼ãƒ«ã‚ªãƒ¼ãƒãƒ¼ã‚’3回行ã†ãƒ‡ãƒãƒƒã‚°ãƒ­ã‚° +- `clickhouse-client`ã§æŽ¥ç¶šã—ãŸã¨ãã«è¡¨ç¤ºã•ã‚Œã‚‹åå‰ã¯ `cluster_1S_2R node 1`ã§ã™ +- ClickHouseã¯ãƒãƒ¼ãƒˆ8123ã¨9000ã§IPV4ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’介ã—ã¦ãƒªãƒƒã‚¹ãƒ³ã—ã¾ã™ã€‚ + +```xml title="/etc/clickhouse-server/config.d/network-and-logging.xml on clickhouse-01" + + + debug + /var/log/clickhouse-server/clickhouse-server.log + /var/log/clickhouse-server/clickhouse-server.err.log + 1000M + 3 + + cluster_1S_2R node 1 + 0.0.0.0 + 8123 + 9000 + +``` + +### マクロã®è¨­å®š + +マクロ`shard`ã¨`replica`ã¯åˆ†æ•£DDLã®è¤‡é›‘ã•ã‚’軽減ã—ã¾ã™ã€‚設定ã•ã‚ŒãŸå€¤ã¯DDLクエリã§è‡ªå‹•çš„ã«ç½®ãæ›ãˆã‚‰ã‚Œã€DDLã‚’ç°¡å˜ã«ã—ã¾ã™ã€‚ã“ã®è¨­å®šã®ãƒžã‚¯ãƒ­ã¯ã€å„ノードã®ã‚·ãƒ£ãƒ¼ãƒ‰ç•ªå·ã¨ãƒ¬ãƒ—リカ番å·ã‚’指定ã—ã¾ã™ã€‚ +ã“ã®1シャード2レプリカã®ä¾‹ã§ã¯ã€ãƒ¬ãƒ—リカマクロã¯clickhouse-01ã§`replica_1`ã€clickhouse-02ã§`replica_2`ã§ã™ã€‚シャードマクロã¯ã€1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã—ã‹ãªã„ãŸã‚ã€clickhouse-01ã¨clickhouse-02ã®ä¸¡æ–¹ã§`1`ã§ã™ã€‚ + +```xml title="/etc/clickhouse-server/config.d/macros.xml on clickhouse-01" + + + 01 + + 01 + cluster_1S_2R + + +``` + +### レプリケーションã¨ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®è¨­å®š + +上ã‹ã‚‰å§‹ã‚ã¦ï¼š +- XMLã®remote_serversセクションã¯ç’°å¢ƒå†…ã®å„クラスタを指定ã—ã¾ã™ã€‚属性`replace=true`ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ClickHouse設定内ã®ã‚µãƒ³ãƒ—ルremote_serversã‚’ã€ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«å†…ã§æŒ‡å®šã•ã‚ŒãŸremote_server設定ã§ç½®ãæ›ãˆã¾ã™ã€‚ã“ã®å±žæ€§ãŒãªã„å ´åˆã€ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚µãƒ³ãƒ—ルリストã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ +- ã“ã®ä¾‹ã§ã¯ã€`cluster_1S_2R`ã¨ã„ã†åå‰ã®ã‚¯ãƒ©ã‚¹ã‚¿ãŒ1ã¤ã‚ã‚Šã¾ã™ã€‚ +- `cluster_1S_2R`ã¨ã„ã†åå‰ã®ã‚¯ãƒ©ã‚¹ã‚¿ã«ã¯ã€å€¤`mysecretphrase`ã®ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã®ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆã¯ã€ç’°å¢ƒå†…ã®ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼é–“ã§å…±æœ‰ã•ã‚Œã€æ­£ã—ã„サーãƒãƒ¼ãŒä¸€ç·’ã«å‚加ã™ã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ +- `cluster_1S_2R`クラスタã«ã¯1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã¨2ã¤ã®ãƒ¬ãƒ—リカãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®å†’é ­ã«ã‚るアーキテクãƒãƒ£å›³ã¨ã€ä»¥ä¸‹ã®XMLã®ã‚·ãƒ£ãƒ¼ãƒ‰å®šç¾©ã‚’比較ã—ã¦ãã ã•ã„。シャード定義ã«ã¯2ã¤ã®ãƒ¬ãƒ—リカãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚å„レプリカã®ãƒ›ã‚¹ãƒˆã¨ãƒãƒ¼ãƒˆãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã™ã€‚1ã¤ã®ãƒ¬ãƒ—リカã¯`clickhouse-01`ã«ä¿å­˜ã•ã‚Œã€ã‚‚ã†1ã¤ã®ãƒ¬ãƒ—リカã¯`clickhouse-02`ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ +- シャードã®å†…部レプリケーションã¯trueã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚å„シャードã¯ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§internal_replicationパラメータを定義ã§ãã¾ã™ã€‚ã“ã®ãƒ‘ラメータãŒtrueã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€æ›¸ãè¾¼ã¿æ“作ã¯æœ€åˆã«å¥åº·ãªãƒ¬ãƒ—リカをé¸æŠžã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’書ãè¾¼ã¿ã¾ã™ã€‚ + +```xml title="/etc/clickhouse-server/config.d/remote-servers.xml on clickhouse-01" + + + + mysecretphrase + + true + + clickhouse-01 + 9000 + + + clickhouse-02 + 9000 + + + + + +``` + +### Keeperã®ä½¿ç”¨ã‚’設定ã™ã‚‹ + +ã“ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«`use-keeper.xml`ã¯ã€ClickHouse ServerãŒãƒ¬ãƒ—リケーションã¨åˆ†æ•£DDLã®èª¿æ•´ã«ClickHouse Keeperを使用ã™ã‚‹ã‚ˆã†ã«è¨­å®šã—ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ClickHouse ServerãŒãƒãƒ¼ãƒˆ9181ã§ãƒŽãƒ¼ãƒ‰clickhouse-keeper-01〜03上ã®Keeperを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã‚’指定ã—ã¦ãŠã‚Šã€`clickhouse-01`ãŠã‚ˆã³`clickhouse-02`ã§åŒã˜ã§ã™ã€‚ + +```xml title="/etc/clickhouse-server/config.d/use-keeper.xml on clickhouse-01" + + + + + clickhouse-keeper-01 + 9181 + + + clickhouse-keeper-02 + 9181 + + + clickhouse-keeper-03 + 9181 + + + +``` + +## clickhouse-02ã®è¨­å®š + +設定ã¯ã€clickhouse-01ã¨clickhouse-02ã§éžå¸¸ã«ä¼¼ã¦ã„ã‚‹ãŸã‚ã€ã“ã“ã§ã¯é•ã„ã®ã¿ã‚’指摘ã—ã¾ã™ã€‚ + +### ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¨ãƒ­ã‚°ã®è¨­å®š + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€`display_name`を除ãã€clickhouse-01ã¨clickhouse-02ã§åŒã˜ã§ã™ã€‚ + +```xml title="/etc/clickhouse-server/config.d/network-and-logging.xml on clickhouse-02" + + + debug + /var/log/clickhouse-server/clickhouse-server.log + /var/log/clickhouse-server/clickhouse-server.err.log + 1000M + 3 + + + cluster_1S_2R node 2 + 0.0.0.0 + 8123 + 9000 + +``` + +### マクロã®è¨­å®š + +マクロã®è¨­å®šã¯clickhouse-01ã¨clickhouse-02ã§ç•°ãªã‚Šã¾ã™ã€‚`replica`ã¯ã“ã®ãƒŽãƒ¼ãƒ‰ã§`02`ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```xml title="/etc/clickhouse-server/config.d/macros.xml on clickhouse-02" + + + 01 + + 02 + cluster_1S_2R + + +``` + +### レプリケーションã¨ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®è¨­å®š + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€clickhouse-01ã¨clickhouse-02ã§åŒã˜ã§ã™ã€‚ + +```xml title="/etc/clickhouse-server/config.d/remote-servers.xml on clickhouse-02" + + + + mysecretphrase + + true + + clickhouse-01 + 9000 + + + clickhouse-02 + 9000 + + + + + +``` + +### Keeperã®ä½¿ç”¨ã‚’設定ã™ã‚‹ + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€clickhouse-01ã¨clickhouse-02ã§åŒã˜ã§ã™ã€‚ + +```xml title="/etc/clickhouse-server/config.d/use-keeper.xml on clickhouse-02" + + + + + clickhouse-keeper-01 + 9181 + + + clickhouse-keeper-02 + 9181 + + + clickhouse-keeper-03 + 9181 + + + +``` + +## clickhouse-keeper-01ã®è¨­å®š + + + +ClickHouse Keeperã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ¬ãƒ—リケーションã¨åˆ†æ•£DDLクエリã®å®Ÿè¡Œã‚’調整ã™ã‚‹ã‚·ã‚¹ãƒ†ãƒ ã‚’æä¾›ã—ã¾ã™ã€‚ClickHouse Keeperã¯Apache ZooKeeperã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã¯ãƒãƒ¼ãƒˆ9181ã§ClickHouse Keeperを有効ã«ã—ã¾ã™ã€‚強調ã•ã‚Œã¦ã„ã‚‹è¡Œã¯ã€ã“ã®Keeperã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒserver_id 1ã‚’æŒã£ã¦ã„ã‚‹ã“ã¨ã‚’指定ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€3ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã™ã¹ã¦ã®`enable-keeper.xml`ファイルã§å”¯ä¸€ã®é•ã„ã§ã™ã€‚`clickhouse-keeper-02`ã§ã¯`server_id`ãŒ`2`ã«è¨­å®šã•ã‚Œã€`clickhouse-keeper-03`ã§ã¯`server_id`ãŒ`3`ã«è¨­å®šã•ã‚Œã¾ã™ã€‚raft設定セクションã¯3å°ã®ã‚µãƒ¼ãƒãƒ¼ã™ã¹ã¦ã§åŒã˜ã§ã‚ã‚Šã€`server_id`ã¨raft設定内ã®`server`インスタンスã®é–¢ä¿‚を示ã™ãŸã‚ã«ä»¥ä¸‹ã§å¼·èª¿ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +:::note +ãªã‚“らã‹ã®ç†ç”±ã§KeeperノードãŒç½®ãæ›ãˆã‚‰ã‚ŒãŸã‚Šå†æ§‹ç¯‰ã•ã‚ŒãŸã‚Šã—ãŸå ´åˆã€æ—¢å­˜ã®`server_id`ã‚’å†åˆ©ç”¨ã—ãªã„ã§ãã ã•ã„。例ãˆã°ã€`server_id`ãŒ`2`ã®KeeperノードãŒå†æ§‹ç¯‰ã•ã‚ŒãŸå ´åˆã€`server_id`ã‚’`4`以上ã«è¨­å®šã—ã¦ãã ã•ã„。 +::: + +```xml title="/etc/clickhouse-keeper/keeper_config.xml on clickhouse-keeper-01" + + + trace + /var/log/clickhouse-keeper/clickhouse-keeper.log + /var/log/clickhouse-keeper/clickhouse-keeper.err.log + 1000M + 3 + + 0.0.0.0 + + 9181 + + 1 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + 10000 + 30000 + trace + + + + + 1 + clickhouse-keeper-01 + 9234 + + + + 2 + clickhouse-keeper-02 + 9234 + + + 3 + clickhouse-keeper-03 + 9234 + + + + +``` + +## clickhouse-keeper-02ã®è¨­å®š + +`clickhouse-keeper-01`ã¨`clickhouse-keeper-02`é–“ã«ã¯1è¡Œã®é•ã„ã—ã‹ã‚ã‚Šã¾ã›ã‚“。ã“ã®ãƒŽãƒ¼ãƒ‰ã§ã¯`server_id`ãŒ`2`ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```xml title="/etc/clickhouse-keeper/keeper_config.xml on clickhouse-keeper-02" + + + trace + /var/log/clickhouse-keeper/clickhouse-keeper.log + /var/log/clickhouse-keeper/clickhouse-keeper.err.log + 1000M + 3 + + 0.0.0.0 + + 9181 + + 2 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + 10000 + 30000 + trace + + + + 1 + clickhouse-keeper-01 + 9234 + + + + 2 + clickhouse-keeper-02 + 9234 + + + + 3 + clickhouse-keeper-03 + 9234 + + + + +``` + +## clickhouse-keeper-03ã®è¨­å®š + +`clickhouse-keeper-01`ã¨`clickhouse-keeper-03`é–“ã«ã¯1è¡Œã®é•ã„ã—ã‹ã‚ã‚Šã¾ã›ã‚“。ã“ã®ãƒŽãƒ¼ãƒ‰ã§ã¯`server_id`ãŒ`3`ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```xml title="/etc/clickhouse-keeper/keeper_config.xml on clickhouse-keeper-03" + + + trace + /var/log/clickhouse-keeper/clickhouse-keeper.log + /var/log/clickhouse-keeper/clickhouse-keeper.err.log + 1000M + 3 + + 0.0.0.0 + + 9181 + + 3 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + 10000 + 30000 + trace + + + + 1 + clickhouse-keeper-01 + 9234 + + + 2 + clickhouse-keeper-02 + 9234 + + + + 3 + clickhouse-keeper-03 + 9234 + + + + + +``` + +## テスト + +ReplicatedMergeTreeã¨ClickHouse Keeperã®çµŒé¨“ã‚’å¾—ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¦ã¿ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€ä»¥ä¸‹ã®æ“作ãŒè¡Œãˆã¾ã™ï¼š +- 上記ã§è¨­å®šã•ã‚ŒãŸã‚¯ãƒ©ã‚¹ã‚¿ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã™ã‚‹ +- ReplicatedMergeTreeテーブルエンジンを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ +- 1ã¤ã®ãƒŽãƒ¼ãƒ‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã€åˆ¥ã®ãƒŽãƒ¼ãƒ‰ã§ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ +- 1ã¤ã®ClickHouseサーãƒãƒ¼ãƒŽãƒ¼ãƒ‰ã‚’åœæ­¢ã™ã‚‹ +- 動作中ã®ãƒŽãƒ¼ãƒ‰ã«ã•ã‚‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ +- åœæ­¢ã—ãŸãƒŽãƒ¼ãƒ‰ã‚’å†èµ·å‹•ã™ã‚‹ +- å†èµ·å‹•ã—ãŸãƒŽãƒ¼ãƒ‰ã§ã‚¯ã‚¨ãƒªã‚’実行ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãŒåˆ©ç”¨å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ + +### ClickHouse KeeperãŒå‹•ä½œã—ã¦ã„ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ + +`mntr`コマンドã¯ã€ClickHouse KeeperãŒå‹•ä½œã—ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã€3ã¤ã®Keeperノードã®é–¢ä¿‚ã«é–¢ã™ã‚‹çŠ¶æ…‹æƒ…報を得るãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®ä¾‹ã§ä½¿ç”¨ã•ã‚Œã¦ã„る設定ã§ã¯ã€3ã¤ã®ãƒŽãƒ¼ãƒ‰ãŒä¸€ç·’ã«å‹•ä½œã—ã¾ã™ã€‚ノードã¯ãƒªãƒ¼ãƒ€ãƒ¼ã‚’é¸å‡ºã—ã€æ®‹ã‚Šã®ãƒŽãƒ¼ãƒ‰ã¯ãƒ•ã‚©ãƒ­ãƒ¯ãƒ¼ã«ãªã‚Šã¾ã™ã€‚`mntr`コマンドã¯ã€ãƒ‘フォーマンスã«é–¢é€£ã™ã‚‹æƒ…報やã€ç‰¹å®šã®ãƒŽãƒ¼ãƒ‰ãŒãƒ•ã‚©ãƒ­ãƒ¯ãƒ¼ã‹ãƒªãƒ¼ãƒ€ãƒ¼ã§ã‚ã‚‹ã‹ã‚’示ã—ã¾ã™ã€‚ + +:::tip +Keeperã«`mntr`コマンドをé€ä¿¡ã™ã‚‹ãŸã‚ã«`netcat`をインストールã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ダウンロード情報ã«ã¤ã„ã¦ã¯[nmap.org](https://nmap.org/ncat/)ページをã”覧ãã ã•ã„。 +::: + +```bash title="clickhouse-keeper-01ã€clickhouse-keeper-02ã€ãŠã‚ˆã³clickhouse-keeper-03ã®ã‚·ã‚§ãƒ«ã§å®Ÿè¡Œ" +echo mntr | nc localhost 9181 +``` +```response title="フォロワーã‹ã‚‰ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹" +zk_version v23.3.1.2823-testing-46e85357ce2da2a99f56ee83a079e892d7ec3726 +zk_avg_latency 0 +zk_max_latency 0 +zk_min_latency 0 +zk_packets_received 0 +zk_packets_sent 0 +zk_num_alive_connections 0 +zk_outstanding_requests 0 +# highlight-next-line +zk_server_state follower +zk_znode_count 6 +zk_watch_count 0 +zk_ephemerals_count 0 +zk_approximate_data_size 1271 +zk_key_arena_size 4096 +zk_latest_snapshot_size 0 +zk_open_file_descriptor_count 46 +zk_max_file_descriptor_count 18446744073709551615 +``` + +```response title="リーダーã‹ã‚‰ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹" +zk_version v23.3.1.2823-testing-46e85357ce2da2a99f56ee83a079e892d7ec3726 +zk_avg_latency 0 +zk_max_latency 0 +zk_min_latency 0 +zk_packets_received 0 +zk_packets_sent 0 +zk_num_alive_connections 0 +zk_outstanding_requests 0 +# highlight-next-line +zk_server_state leader +zk_znode_count 6 +zk_watch_count 0 +zk_ephemerals_count 0 +zk_approximate_data_size 1271 +zk_key_arena_size 4096 +zk_latest_snapshot_size 0 +zk_open_file_descriptor_count 48 +zk_max_file_descriptor_count 18446744073709551615 +# highlight-start +zk_followers 2 +zk_synced_followers 2 +# highlight-end +``` + +### ClickHouseクラスタã®æ©Ÿèƒ½ã‚’確èªã™ã‚‹ + +1ã¤ã®ã‚·ã‚§ãƒ«ã§`clickhouse-01`ã«`clickhouse client`ã§æŽ¥ç¶šã—ã€ã‚‚ã†1ã¤ã®ã‚·ã‚§ãƒ«ã§`clickhouse-02`ã«`clickhouse client`ã§æŽ¥ç¶šã—ã¾ã™ã€‚ + +1. 上記ã§è¨­å®šã•ã‚ŒãŸã‚¯ãƒ©ã‚¹ã‚¿ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã™ã‚‹ + +```sql title="ノードclickhouse-01ã¾ãŸã¯clickhouse-02ã®ã„ãšã‚Œã‹ã§å®Ÿè¡Œ" +CREATE DATABASE db1 ON CLUSTER cluster_1S_2R +``` +```response +┌─host──────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+│ clickhouse-02 │ 9000 │ 0 │ │ 1 │ 0 │ +│ clickhouse-01 │ 9000 │ 0 │ │ 0 │ 0 │ +└───────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘ +``` + +2. ReplicatedMergeTreeテーブルエンジンを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ +```sql title="ノードclickhouse-01ã¾ãŸã¯clickhouse-02ã®ã„ãšã‚Œã‹ã§å®Ÿè¡Œ" +CREATE TABLE db1.table1 ON CLUSTER cluster_1S_2R +( + `id` UInt64, + `column1` String +) +ENGINE = ReplicatedMergeTree +ORDER BY id +``` +```response +┌─host──────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+│ clickhouse-02 │ 9000 │ 0 │ │ 1 │ 0 │ +│ clickhouse-01 │ 9000 │ 0 │ │ 0 │ 0 │ +└───────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘ +``` +3. 1ã¤ã®ãƒŽãƒ¼ãƒ‰ã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã€åˆ¥ã®ãƒŽãƒ¼ãƒ‰ã§ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ +```sql title="ノードclickhouse-01ã§å®Ÿè¡Œ" +INSERT INTO db1.table1 (id, column1) VALUES (1, 'abc'); +``` + +4. ノード`clickhouse-02`ã§ãƒ†ãƒ¼ãƒ–ルをクエリã™ã‚‹ +```sql title="ノードclickhouse-02ã§å®Ÿè¡Œ" +SELECT * +FROM db1.table1 +``` +```response +┌─id─┬─column1─┠+│ 1 │ abc │ +└────┴─────────┘ +``` + +5. ä»–ã®ãƒŽãƒ¼ãƒ‰ã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã€ãƒŽãƒ¼ãƒ‰`clickhouse-01`ã§ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ +```sql title="ノードclickhouse-02ã§å®Ÿè¡Œ" +INSERT INTO db1.table1 (id, column1) VALUES (2, 'def'); +``` + +```sql title="ノードclickhouse-01ã§å®Ÿè¡Œ" +SELECT * +FROM db1.table1 +``` +```response +┌─id─┬─column1─┠+│ 1 │ abc │ +└────┴─────────┘ +┌─id─┬─column1─┠+│ 2 │ def │ +└────┴─────────┘ +``` + +6. 1å°ã®ClickHouseサーãƒãƒ¼ãƒŽãƒ¼ãƒ‰ã‚’åœæ­¢ã™ã‚‹ +1å°ã®ClickHouseサーãƒãƒ¼ãƒŽãƒ¼ãƒ‰ã‚’åœæ­¢ã™ã‚‹ã«ã¯ã€ãƒŽãƒ¼ãƒ‰ã®èµ·å‹•ã«ä½¿ç”¨ã—ãŸã‚‚ã®ã¨ä¼¼ãŸã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚`systemctl start`ã§ãƒŽãƒ¼ãƒ‰ã‚’èµ·å‹•ã—ãŸå ´åˆã€`systemctl stop`を使用ã—ã¦åœæ­¢ã—ã¾ã™ã€‚ + +7. 動作中ã®ãƒŽãƒ¼ãƒ‰ã«ã•ã‚‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ +```sql title="動作中ã®ãƒŽãƒ¼ãƒ‰ã§å®Ÿè¡Œ" +INSERT INTO db1.table1 (id, column1) VALUES (3, 'ghi'); +``` + +データをé¸æŠžã—ã¾ã™ï¼š +```sql title="動作中ã®ãƒŽãƒ¼ãƒ‰ã§å®Ÿè¡Œ" +SELECT * +FROM db1.table1 +``` +```response +┌─id─┬─column1─┠+│ 1 │ abc │ +└────┴─────────┘ +┌─id─┬─column1─┠+│ 2 │ def │ +└────┴─────────┘ +┌─id─┬─column1─┠+│ 3 │ ghi │ +└────┴─────────┘ +``` + +8. åœæ­¢ã—ãŸãƒŽãƒ¼ãƒ‰ã‚’å†èµ·å‹•ã—ã€ãã“ã§ã‚‚é¸æŠžã™ã‚‹ + +```sql title="å†èµ·å‹•ã—ãŸãƒŽãƒ¼ãƒ‰ã§å®Ÿè¡Œ" +SELECT * +FROM db1.table1 +``` +```response +┌─id─┬─column1─┠+│ 1 │ abc │ +└────┴─────────┘ +┌─id─┬─column1─┠+│ 2 │ def │ +└────┴─────────┘ +┌─id─┬─column1─┠+│ 3 │ ghi │ +└────┴─────────┘ +``` + diff --git a/docs/ja/deployment-guides/terminology.md b/docs/ja/deployment-guides/terminology.md new file mode 100644 index 00000000000..5be89bb6107 --- /dev/null +++ b/docs/ja/deployment-guides/terminology.md @@ -0,0 +1,39 @@ +--- +slug: /ja/architecture/introduction +sidebar_label: ã¯ã˜ã‚ã« +title: ã¯ã˜ã‚ã« +sidebar_position: 1 +--- +import ReplicationShardingTerminology from '@site/docs/ja/_snippets/_replication-sharding-terminology.md'; + +ã“れらã®ãƒ‡ãƒ—ロイメント例ã¯ã€ClickHouse Support and Services 組織㌠ClickHouse ユーザーã«æä¾›ã—ãŸã‚¢ãƒ‰ãƒã‚¤ã‚¹ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ã“れらã¯å®Ÿéš›ã«å‹•ä½œã™ã‚‹ä¾‹ã§ã‚ã‚Šã€ãœã²è©¦ã—ã¦ã¿ã¦ã‹ã‚‰ãƒ‹ãƒ¼ã‚ºã«åˆã‚ã›ã¦èª¿æ•´ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã“ã§ã€ã‚ãªãŸã®è¦ä»¶ã«ã´ã£ãŸã‚Šåˆã†ä¾‹ã‚’見ã¤ã‘ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã‚ã‚‹ã„ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒ2回ã§ã¯ãªã3回レプリケートã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ã“ã“ã§ç¤ºã•ã‚Œã¦ã„るパターンã«å¾“ã£ã¦ã‚‚ã†1ã¤ã®ãƒ¬ãƒ—リカを追加ã™ã‚‹ã“ã¨ãŒã§ãã‚‹ã§ã—ょã†ã€‚ + + + +## 例 + +### 基本 + +- [**スケールアウト**](/docs/ja/deployment-guides/horizontal-scaling.md)ã®ä¾‹ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’2ã¤ã®ãƒŽãƒ¼ãƒ‰ã«ã‚·ãƒ£ãƒ¼ãƒ‰ã—ã€åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルを使用ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ãŒ2ã¤ã® ClickHouse ノードã«å­˜åœ¨ã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚2ã¤ã® ClickHouse ノードã¯ã€åˆ†æ•£åŒæœŸã‚’æä¾›ã™ã‚‹ ClickHouse Keeper も実行ã—ã¾ã™ã€‚3ã¤ç›®ã®ãƒŽãƒ¼ãƒ‰ã¯ã€ClickHouse Keeper クォーラムを完了ã™ã‚‹ãŸã‚ã«å˜ç‹¬ã§ ClickHouse Keeper を実行ã—ã¾ã™ã€‚ + +- [**フォルトトレランスã®ãŸã‚ã®ãƒ¬ãƒ—リケーション**](/docs/ja/deployment-guides/replicated.md)ã®ä¾‹ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’2ã¤ã®ãƒŽãƒ¼ãƒ‰ã«ãƒ¬ãƒ—リケートã—ã€ReplicatedMergeTree テーブルを使用ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ãŒ2ã¤ã® ClickHouse ノードã«å­˜åœ¨ã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚2ã¤ã® ClickHouse サーãƒãƒ¼ãƒŽãƒ¼ãƒ‰ã«åŠ ãˆã¦ã€ãƒ¬ãƒ—リケーションを管ç†ã™ã‚‹ãŸã‚ã®3ã¤ã® ClickHouse Keeper å˜ç‹¬ãƒŽãƒ¼ãƒ‰ãŒã‚ã‚Šã¾ã™ã€‚ + +
+ +
+ +### 中級 + +- 近日公開 + +### 上級 + +- 近日公開 diff --git a/docs/ja/development/_category_.yml b/docs/ja/development/_category_.yml new file mode 100644 index 00000000000..4db6474fff8 --- /dev/null +++ b/docs/ja/development/_category_.yml @@ -0,0 +1,8 @@ +position: 101 +label: 'Building ClickHouse' +collapsible: true +collapsed: true +link: + type: generated-index + title: Building ClickHouse + slug: /ja/development diff --git a/docs/ja/development/adding_test_queries.md b/docs/ja/development/adding_test_queries.md new file mode 100644 index 00000000000..fcb1057674e --- /dev/null +++ b/docs/ja/development/adding_test_queries.md @@ -0,0 +1,152 @@ +--- +slug: /ja/development/adding_test_queries +sidebar_label: テストクエリã®è¿½åŠ  +sidebar_position: 63 +title: ClickHouse CIã«ãƒ†ã‚¹ãƒˆã‚¯ã‚¨ãƒªã‚’追加ã™ã‚‹æ–¹æ³• +description: ClickHouseã®ç¶™ç¶šçš„インテグレーションã«ãƒ†ã‚¹ãƒˆã‚±ãƒ¼ã‚¹ã‚’追加ã™ã‚‹æ‰‹é † +--- + +ClickHouseã«ã¯ä½•ç™¾ã€ä½•åƒã‚‚ã®æ©Ÿèƒ½ãŒã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®ã‚³ãƒŸãƒƒãƒˆã¯ã€ä½•åƒã‚‚ã®ãƒ†ã‚¹ãƒˆã‚±ãƒ¼ã‚¹ã‚’å«ã‚€è¤‡é›‘ãªãƒ†ã‚¹ãƒˆã‚»ãƒƒãƒˆã«ã‚ˆã£ã¦ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ + +コア機能ã¯éžå¸¸ã«ã‚ˆãテストã•ã‚Œã¦ã„ã¾ã™ãŒã€ClickHouse CIã«ã‚ˆã£ã¦ç‰¹ç•°ãªã‚±ãƒ¼ã‚¹ã‚„ã•ã¾ã–ã¾ãªæ©Ÿèƒ½ã®çµ„ã¿åˆã‚ã›ãŒæ˜Žã‚‰ã‹ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +ç§ãŸã¡ãŒè¦‹ã¦ããŸãƒã‚°/回帰ã®å¤šãã¯ã€ãƒ†ã‚¹ãƒˆã‚«ãƒãƒ¬ãƒƒã‚¸ãŒä¹ã—ã„「グレーゾーンã€ã§ç™ºç”Ÿã—ã¦ã„ã¾ã™ã€‚ + +ç§ãŸã¡ã¯ã€ã§ãã‚‹é™ã‚Šå¤šãã®ã‚·ãƒŠãƒªã‚ªã‚„実際ã«ä½¿ã‚れる機能ã®çµ„ã¿åˆã‚ã›ã‚’テストã§ã‚«ãƒãƒ¼ã™ã‚‹ã“ã¨ã«éžå¸¸ã«èˆˆå‘³ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ + +## ãªãœãƒ†ã‚¹ãƒˆã‚’追加ã™ã‚‹ã®ã‹ + +ClickHouseã®ã‚³ãƒ¼ãƒ‰ã«ãƒ†ã‚¹ãƒˆã‚±ãƒ¼ã‚¹ã‚’追加ã™ã¹ãç†ç”±/タイミング: +1) 複雑ãªã‚·ãƒŠãƒªã‚ªã‚„機能ã®çµ„ã¿åˆã‚ã›ã‚’使用ã™ã‚‹ / ã‚ã¾ã‚Šä¸€èˆ¬çš„ã§ãªã„特異ãªã‚±ãƒ¼ã‚¹ãŒã‚ã‚‹ +2) ãƒã‚§ãƒ³ã‚¸ãƒ­ã‚°ã«é€šçŸ¥ã•ã‚Œãšã«ãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã§ç‰¹å®šã®å‹•ä½œãŒå¤‰ã‚ã£ãŸã“ã¨ã«æ°—ã¥ã +3) ClickHouseã®å“質å‘上ã«è²¢çŒ®ã—ã€ä½¿ç”¨ä¸­ã®æ©Ÿèƒ½ãŒå°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§å£Šã‚Œãªã„よã†ã«ã™ã‚‹ +4) テストãŒè¿½åŠ /å—å…¥ã•ã‚Œã‚‹ã¨ã€ãã®ç‰¹ç•°ãªã‚±ãƒ¼ã‚¹ãŒå¶ç„¶å£Šã‚Œã‚‹ã“ã¨ã¯ãªããªã‚‹ +5) 素晴らã—ã„オープンソースコミュニティã®ä¸€å“¡ã«ãªã‚‹ +6) `system.contributors`テーブルã«ã‚ãªãŸã®åå‰ãŒè¡¨ç¤ºã•ã‚Œã‚‹! +7) 世界を少ã—良ãã™ã‚‹ :) + +### 実施手順 + +#### å‰ææ¡ä»¶ + +Linuxマシンを使用ã—ã¦ã„ã‚‹ã¨ä»®å®šã—ã¾ã™ï¼ˆä»–ã®OSã§ã¯docker/仮想マシンを使用ã§ãã¾ã™ï¼‰ã€‚最新ã®ãƒ–ラウザ/インターãƒãƒƒãƒˆæŽ¥ç¶šã¨ã€åŸºæœ¬çš„ãªLinux & SQLスキルãŒå¿…è¦ã§ã™ã€‚ + +高度ãªå°‚門知識ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“(C++ã‚„ClickHouse CIã®å†…部ã«ã¤ã„ã¦çŸ¥ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“)。 + +#### 準備 + +1) [GitHubアカウントを作æˆ](https://github.com/join)(ã¾ã æŒã£ã¦ã„ãªã„å ´åˆï¼‰ +2) [gitをセットアップ](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/set-up-git) +```bash +# Ubuntuã®å ´åˆ +sudo apt-get update +sudo apt-get install git + +git config --global user.name "John Doe" # ã‚ãªãŸã®åå‰ã‚’記入ã—ã¦ãã ã•ã„ +git config --global user.email "email@example.com" # ã‚ãªãŸã®ãƒ¡ãƒ¼ãƒ«ã‚’記入ã—ã¦ãã ã•ã„ + +``` +3) [ClickHouseプロジェクトをフォーク](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo) - [https://github.com/ClickHouse/ClickHouse](https://github.com/ClickHouse/ClickHouse) ã‚’é–‹ãã€å³ä¸Šã®ãƒ•ã‚©ãƒ¼ã‚¯ãƒœã‚¿ãƒ³ã‚’押ã™ã ã‘ã§ã™: +![フォークリãƒã‚¸ãƒˆãƒª](https://github-images.s3.amazonaws.com/help/bootcamp/Bootcamp-Fork.png) + +4) 自分ã®ãƒ•ã‚©ãƒ¼ã‚¯ã‚’PCã®ä»»æ„ã®ãƒ•ã‚©ãƒ«ãƒ€ã«ã‚¯ãƒ­ãƒ¼ãƒ³ã€ä¾‹: `~/workspace/ClickHouse` +``` +mkdir ~/workspace && cd ~/workspace +git clone https://github.com/<ã‚ãªãŸã®GitHubユーザå>/ClickHouse +cd ClickHouse +git remote add upstream https://github.com/ClickHouse/ClickHouse +``` + +#### テスト用ã®æ–°ã—ã„ブランム+ +1) 最新ã®ClickHouseマスターã‹ã‚‰æ–°ã—ã„ブランãƒã‚’ä½œæˆ +``` +cd ~/workspace/ClickHouse +git fetch upstream +git checkout -b name_for_a_branch_with_my_test upstream/master +``` + +#### ClickHouseã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã¨å®Ÿè¡Œ + +1) `clickhouse-server`をインストール([å…¬å¼ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://clickhouse.com/docs/ja/getting-started/install/) ã«å¾“ã†ï¼‰ +2) テスト設定をインストール(Zookeeperã®ãƒ¢ãƒƒã‚¯å®Ÿè£…を使用ã—ã€ã„ãã¤ã‹ã®è¨­å®šã‚’調整) +``` +cd ~/workspace/ClickHouse/tests/config +sudo ./install.sh +``` +3) clickhouse-serverを実行 +``` +sudo systemctl restart clickhouse-server +``` + +#### テストファイルã®ä½œæˆ + +1) ã‚ãªãŸã®ãƒ†ã‚¹ãƒˆã®ç•ªå·ã‚’見ã¤ã‘ã¾ã™ - `tests/queries/0_stateless/`内ã®ãƒ•ã‚¡ã‚¤ãƒ«ã§ä¸€ç•ªå¤§ãã„番å·ã‚’見ã¤ã‘ã¾ã™ + +```sh +$ cd ~/workspace/ClickHouse +$ ls tests/queries/0_stateless/[0-9]*.reference | tail -n 1 +tests/queries/0_stateless/01520_client_print_query_id.reference +``` +ç¾åœ¨ã®ãƒ†ã‚¹ãƒˆã®æœ€å¾Œã®ç•ªå·ã¯ `01520` ãªã®ã§ã€æ¬¡ã®ç•ªå·ã¨ã—ã¦ç§ã®ãƒ†ã‚¹ãƒˆã¯ `01521` ã«ãªã‚Šã¾ã™ã€‚ + +2) 次ã®ç•ªå·ã¨ãƒ†ã‚¹ãƒˆã™ã‚‹æ©Ÿèƒ½ã®åå‰ã§SQLãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä½œæˆ + +```sh +touch tests/queries/0_stateless/01521_dummy_test.sql +``` + +3) 好ããªã‚¨ãƒ‡ã‚£ã‚¿ã§SQLファイルを編集(テスト作æˆã®ãƒ’ントをå‚照) +```sh +vim tests/queries/0_stateless/01521_dummy_test.sql +``` + +4) テストを実行ã—ã€ãã®çµæžœã‚’リファレンスファイルã«å…¥ã‚Œã¾ã™: +``` +clickhouse-client -nm < tests/queries/0_stateless/01521_dummy_test.sql | tee tests/queries/0_stateless/01521_dummy_test.reference +``` + +5) ã™ã¹ã¦ãŒæ­£ã—ã„ã“ã¨ã‚’確èªã—ã€ãƒ†ã‚¹ãƒˆå‡ºåŠ›ãŒé–“é•ã£ã¦ã„ã‚‹å ´åˆã¯ï¼ˆä¾‹ãˆã°ãƒã‚°ã«ã‚ˆã‚‹ï¼‰ã€ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ã‚’使用ã—ã¦ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’調整。 + +#### 良ã„テストを作æˆã™ã‚‹æ–¹æ³• + +- テストã¯æ¬¡ã®è¦ç´ ã‚’æŒã¤ã¹ãã§ã™ + - **最å°é™** - テストã™ã‚‹æ©Ÿèƒ½ã«é–¢é€£ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®ã¿ã‚’作æˆã—ã€é–¢é€£ã—ãªã„カラムやクエリã®éƒ¨åˆ†ã‚’除去 + - **高速** - 数秒以内(ç†æƒ³çš„ã«ã¯ã‚µãƒ–セカンド)ã§çµ‚了 + - **正確** - 機能ãŒå‹•ä½œã—ã¦ã„ãªã„å ´åˆã«å¤±æ•— + - **決定的** + - **分離/ステートレス** - 環境ã«ä¾å­˜ã—ãªã„ + - タイミングã«é ¼ã‚‰ãªã„ +- 特異ãªã‚±ãƒ¼ã‚¹ï¼ˆ0 / Null / 空ã®ã‚»ãƒƒãƒˆ / 例外スロー)をカãƒãƒ¼ã™ã‚‹ã‚ˆã†ã«å¿ƒãŒã‘ã‚‹ +- クエリãŒã‚¨ãƒ©ãƒ¼ã‚’è¿”ã™ã“ã¨ã‚’テストã™ã‚‹ã«ã¯ã€ã‚¯ã‚¨ãƒªã®å¾Œã«ç‰¹åˆ¥ãªã‚³ãƒ¡ãƒ³ãƒˆã‚’付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š`-- { serverError 60 }` ã¾ãŸã¯ `-- { clientError 20 }` +- データベースを切り替ãˆãªã„(必è¦ãªå ´åˆã‚’除ã) +- å¿…è¦ã«å¿œã˜ã¦ã€åŒã˜ãƒŽãƒ¼ãƒ‰ã«è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルレプリカを作æˆã§ãã¾ã™ +- å¿…è¦ã«å¿œã˜ã¦ã€ãƒ†ã‚¹ãƒˆã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å®šç¾©ã®ä¸€ã¤ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆ`system.clusters`ã‚’å‚照) +- クエリやデータã®åˆæœŸåŒ–ã«ã¯ `number` / `numbers_mt` / `zeros` / `zeros_mt` ãªã©ã‚’使ㆠ+- テストã®å‰å¾Œã«ä½œæˆã—ãŸã‚ªãƒ–ジェクトをクリーンアップ(DROP IF EXISTS) - 汚れãŸçŠ¶æ…‹ã®ã‚±ãƒ¼ã‚¹ã‚’考慮 +- æ“作ã®åŒæœŸãƒ¢ãƒ¼ãƒ‰ã‚’優先(ミューテーションã€ãƒžãƒ¼ã‚¸ãªã©ï¼‰ +- `0_stateless`フォルダ内ã®ä»–ã®SQLファイルをå‚考㫠+- テストã—よã†ã¨ã™ã‚‹æ©Ÿèƒ½/機能ã®çµ„ã¿åˆã‚ã›ãŒæ—¢å­˜ã®ãƒ†ã‚¹ãƒˆã§ã‚«ãƒãƒ¼ã•ã‚Œã¦ã„ãªã„ã“ã¨ã‚’ç¢ºèª + +#### テスト命åè¦å‰‡ + +テストをé©åˆ‡ã«åå‰ä»˜ã‘ã™ã‚‹ã“ã¨ã¯é‡è¦ã§ã™ã€‚ã“ã†ã™ã‚‹ã“ã¨ã§ã€clickhouse-test ã®å‘¼ã³å‡ºã—時ã«ç‰¹å®šã®ãƒ†ã‚¹ãƒˆã‚µãƒ–セットをオフã«ã§ãã¾ã™ã€‚ + +| テスターフラグ | テストåã«å«ã‚ã‚‹ã¹ã内容 | フラグを追加ã™ã¹ãã¨ã | +|---|---|---| +| `--[no-]zookeeper`| "zookeeper" ã¾ãŸã¯ "replica" | テストãŒ`ReplicatedMergeTree`ファミリーã®ãƒ†ãƒ¼ãƒ–ルを使用ã™ã‚‹å ´åˆ | +| `--[no-]shard` | "shard" ã¾ãŸã¯ "distributed" ã¾ãŸã¯ "global"| テストãŒ127.0.0.2ãªã©ã¸ã®æŽ¥ç¶šã‚’使用ã™ã‚‹å ´åˆ | +| `--[no-]long` | "long" ã¾ãŸã¯ "deadlock" ã¾ãŸã¯ "race" | テストãŒ60秒以上ã‹ã‹ã‚‹å ´åˆ | + +#### コミット / プッシュ / PRã®ä½œæˆ + +1) 変更をコミット & プッシュ +```sh +cd ~/workspace/ClickHouse +git add tests/queries/0_stateless/01521_dummy_test.sql +git add tests/queries/0_stateless/01521_dummy_test.reference +git commit # å¯èƒ½ã§ã‚ã‚Œã°ç´ æ•µãªã‚³ãƒŸãƒƒãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’使用 +git push origin HEAD +``` +2) プッシュ中ã«è¡¨ç¤ºã•ã‚ŒãŸãƒªãƒ³ã‚¯ã‚’使用ã—ã¦ã€ãƒ¡ã‚¤ãƒ³ãƒªãƒã‚¸ãƒˆãƒªã«PRã‚’ä½œæˆ +3) PRã®ã‚¿ã‚¤ãƒˆãƒ«ã¨å†…容を調整ã—ã€`Changelog category (leave one)`ã«ã¯ `Build/Testing/Packaging Improvement` ã‚’ä¿æŒã—ã€ä»–ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’å¿…è¦ã«å¿œã˜ã¦è¨˜å…¥ã€‚ diff --git a/docs/ja/development/architecture.md b/docs/ja/development/architecture.md new file mode 100644 index 00000000000..68c599afd9f --- /dev/null +++ b/docs/ja/development/architecture.md @@ -0,0 +1,272 @@ +--- +slug: /ja/development/architecture +sidebar_label: アーキテクãƒãƒ£æ¦‚è¦ +sidebar_position: 62 +--- + +# ClickHouseアーキテクãƒãƒ£ã®æ¦‚è¦ + +ClickHouseã¯çœŸã®åˆ—指å‘DBMSã§ã™ã€‚データã¯ã‚«ãƒ©ãƒ å˜ä½ã§ä¿å­˜ã•ã‚Œã€é…列(ベクトルã¾ãŸã¯ã‚«ãƒ©ãƒ ã®ãƒãƒ£ãƒ³ã‚¯ï¼‰ã®å®Ÿè¡Œä¸­ã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚ +å¯èƒ½ãªé™ã‚Šã€å€‹ã€…ã®å€¤ã§ã¯ãªãé…列ã«å¯¾ã™ã‚‹æ“作ãŒè¡Œã‚ã‚Œã¾ã™ã€‚ã“れを「ベクトル化クエリ実行ã€ã¨å‘¼ã³ã€å®Ÿéš›ã®ãƒ‡ãƒ¼ã‚¿å‡¦ç†ã®ã‚³ã‚¹ãƒˆã‚’下ã’ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +> ã“ã®ã‚¢ã‚¤ãƒ‡ã‚¢ã¯æ–°ã—ã„ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。`APL`(1957å¹´ã®ãƒ—ログラミング言語)ã«é¡ã‚Šã€ãã®å¾Œç¶™ã¨ã—ã¦`A +`(APL方言)ã€`J`(1990)ã€`K`(1993)ã€ãŠã‚ˆã³`Q`(Kx Systemsã®ãƒ—ログラミング言語ã€2003)ãŒã‚ã‚Šã¾ã™ã€‚é…列プログラミングã¯ç§‘学データ処ç†ã§ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚関係データベースã§ã‚‚æ–°ã—ã„アイデアã§ã¯ã‚ã‚Šã¾ã›ã‚“:例ãˆã°ã€`VectorWise`システム(Actian Corporationã«ã‚ˆã‚‹Actian Vector Analytical Databaseã¨ã—ã¦ã‚‚知られã¦ã„ã¾ã™ï¼‰ã§ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +クエリ処ç†ã‚’加速ã™ã‚‹ãŸã‚ã®ã‚¢ãƒ—ローãƒã«ã¯ã€ãƒ™ã‚¯ãƒˆãƒ«åŒ–クエリ実行ã¨å®Ÿè¡Œæ™‚コード生æˆã®2ã¤ãŒã‚ã‚Šã¾ã™ã€‚後者ã¯ã™ã¹ã¦ã®é–“接å‚ç…§ã¨å‹•çš„ディスパッãƒã‚’å–り除ãã¾ã™ã€‚ã“れらã®æ–¹æ³•ã®ã„ãšã‚Œã‚‚ã€ã‚‚ã†ä¸€æ–¹ã‚ˆã‚Šã‚‚å¿…ãšã—も優れã¦ã„ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。実行時コード生æˆã¯å¤šãã®æ“作をèžåˆã—ã€CPUã®å®Ÿè¡Œãƒ¦ãƒ‹ãƒƒãƒˆã¨ãƒ‘イプラインを完全ã«æ´»ç”¨ã™ã‚‹å ´åˆã«ã‚ˆã‚ŠåŠ¹æžœçš„ã§ã™ã€‚ベクトル化クエリ実行ã¯ä¸€æ™‚çš„ãªãƒ™ã‚¯ãƒˆãƒ«ã‚’キャッシュã«æ›¸ãè¾¼ã¿ã€ãれを読ã¿æˆ»ã™å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€å®Ÿç”¨çš„ã§ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚一時データãŒL2キャッシュã«åŽã¾ã‚‰ãªã„å ´åˆã€ã“ã‚ŒãŒå•é¡Œã«ãªã‚Šã¾ã™ã€‚ã—ã‹ã—ã€ãƒ™ã‚¯ãƒˆãƒ«åŒ–クエリ実行ã¯ã€CPUã®SIMD機能をより簡å˜ã«åˆ©ç”¨ã§ãã¾ã™ã€‚[å‹äººã«ã‚ˆã‚‹ç ”究論文](http://15721.courses.cs.cmu.edu/spring2016/papers/p5-sompolski.pdf)ã«ã‚ˆã‚Œã°ã€ä¸¡æ–¹ã®ã‚¢ãƒ—ローãƒã‚’組ã¿åˆã‚ã›ã‚‹æ–¹ãŒè‰¯ã„ã¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ClickHouseã¯ãƒ™ã‚¯ãƒˆãƒ«åŒ–クエリ実行を使用ã—ã€å®Ÿè¡Œæ™‚コード生æˆã®ãŸã‚ã®é™å®šçš„ãªåˆæœŸã‚µãƒãƒ¼ãƒˆãŒã‚ã‚Šã¾ã™ã€‚ + +## カラム {#columns} + +`IColumn`インターフェースã¯ã€ãƒ¡ãƒ¢ãƒªå†…ã®ã‚«ãƒ©ãƒ ï¼ˆå®Ÿéš›ã«ã¯ã‚«ãƒ©ãƒ ã®ãƒãƒ£ãƒ³ã‚¯ï¼‰ã‚’表ã™ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã¯ã€ã•ã¾ã–ã¾ãªé–¢ä¿‚演算å­ã®å®Ÿè£…を支æ´ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’æä¾›ã—ã¾ã™ã€‚ã»ã¼ã™ã¹ã¦ã®æ“作ã¯ã‚¤ãƒŸãƒ¥ãƒ¼ã‚¿ãƒ–ルã§ã™ï¼šå…ƒã®ã‚«ãƒ©ãƒ ã‚’変更ã›ãšã€æ–°ã—ã„ã‚‚ã®ã‚’作æˆã—ã¾ã™ã€‚例ãˆã°ã€`IColumn :: filter`メソッドã¯ãƒ•ã‚£ãƒ«ã‚¿ãƒã‚¤ãƒˆãƒžã‚¹ã‚¯ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ã“ã‚Œã¯`WHERE`ã¨`HAVING`ã®é–¢ä¿‚演算å­ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚追加ã®ä¾‹ï¼š`ORDER BY`をサãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®`IColumn :: permute`メソッドã€`LIMIT`をサãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®`IColumn :: cut`メソッド。 + +ã•ã¾ã–ã¾ãª`IColumn`実装(`ColumnUInt8`ã€`ColumnString`ãªã©ï¼‰ã¯ã€ã‚«ãƒ©ãƒ ã®ãƒ¡ãƒ¢ãƒªãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’担当ã—ã¾ã™ã€‚メモリレイアウトã¯é€šå¸¸ã€é€£ç¶šã—ãŸé…列ã§ã™ã€‚カラムã®æ•´æ•°åž‹ã®å ´åˆã€`std :: vector`ã®ã‚ˆã†ã«ã€ãŸã 1ã¤ã®é€£ç¶šã—ãŸé…列ã§ã™ã€‚`String`ã‚„`Array`カラムã®å ´åˆã€ã™ã¹ã¦ã®é…列è¦ç´ ã‚’連続ã—ã¦é…ç½®ã™ã‚‹1ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«ã¨ã€å„é…列ã®å…ˆé ­ã¸ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’æŒã¤2番目ã®ãƒ™ã‚¯ãƒˆãƒ«ãŒå­˜åœ¨ã—ã¾ã™ã€‚ã¾ãŸã€`ColumnConst`ã¯ãƒ¡ãƒ¢ãƒªã«1ã¤ã®å€¤ã ã‘ã‚’ä¿å­˜ã—ã€ã‚«ãƒ©ãƒ ã®ã‚ˆã†ã«è¦‹ãˆã¾ã™ã€‚ + +## フィールド {#field} + +ãã‚Œã§ã‚‚ã€å€‹ã€…ã®å€¤ã‚’æ“作ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚個々ã®å€¤ã‚’表ã™ãŸã‚ã«ã€`Field`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚`Field`ã¯`UInt64`ã€`Int64`ã€`Float64`ã€`String`ã€ãŠã‚ˆã³`Array`ã®åŒºåˆ¥ã•ã‚ŒãŸå…±ç”¨ä½“ã«éŽãŽã¾ã›ã‚“。`IColumn`ã«ã¯ã€`n`番目ã®å€¤ã‚’`Field`ã¨ã—ã¦å–å¾—ã™ã‚‹ãŸã‚ã®`operator []`メソッドã¨ã€`Field`をカラムã®æœ«å°¾ã«è¿½åŠ ã™ã‚‹ãŸã‚ã®`insert`メソッドãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€å€‹ã€…ã®å€¤ã‚’表ã™ãƒ†ãƒ³ãƒãƒ©ãƒªã®`Field`オブジェクトを扱ã†å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€éžå¸¸ã«åŠ¹çŽ‡çš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。もã£ã¨åŠ¹çŽ‡çš„ãªãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—ã¦`insertFrom`ã‚„`insertRangeFrom`ãªã©ãŒã‚ã‚Šã¾ã™ã€‚ + +`Field`ã«ã¯ã€ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿åž‹ã«é–¢ã™ã‚‹å分ãªæƒ…å ±ã¯ã‚ã‚Šã¾ã›ã‚“。例ãˆã°ã€`UInt8`ã€`UInt16`ã€`UInt32`ã€ãŠã‚ˆã³`UInt64`ã¯ã™ã¹ã¦`Field`内ã§ã¯`UInt64`ã§è¡¨ã•ã‚Œã¾ã™ã€‚ + +## リーキー抽象 {#leaky-abstractions} + +`IColumn`ã¯ãƒ‡ãƒ¼ã‚¿ã®ä¸€èˆ¬çš„ãªé–¢ä¿‚変æ›ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’æŒã£ã¦ã„ã¾ã™ãŒã€ã™ã¹ã¦ã®ãƒ‹ãƒ¼ã‚ºã‚’満ãŸã™ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。例ãˆã°ã€`ColumnUInt64`ã«ã¯2ã¤ã®ã‚«ãƒ©ãƒ ã‚’åˆè¨ˆã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ãŒãªãã€`ColumnString`ã«ã¯éƒ¨åˆ†æ–‡å­—列検索を実行ã™ã‚‹ãŸã‚ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚ã‚Šã¾ã›ã‚“。ã“れらã®ç„¡æ•°ã®ãƒ«ãƒ¼ãƒãƒ³ã¯ã€`IColumn`ã®å¤–部ã§å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +カラム上ã®ã•ã¾ã–ã¾ãªé–¢æ•°ã¯ã€`Field`値を抽出ã™ã‚‹ãŸã‚ã«`IColumn`メソッドを使用ã—ã¦ä¸€èˆ¬çš„ã«éžåŠ¹çŽ‡çš„ãªæ–¹æ³•ã§å®Ÿè£…ã•ã‚Œã‚‹ã‹ã€ç‰¹å®šã®`IColumn`実装内ã®ãƒ‡ãƒ¼ã‚¿ã®å†…部メモリレイアウトを知ã£ã¦ã„ã¦ç‰¹æ®Šãªæ–¹æ³•ã§å®Ÿè£…ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ç‰¹å®šã®`IColumn`åž‹ã«ã‚­ãƒ£ã‚¹ãƒˆé–¢æ•°ã‚’実装ã—ã€å†…部表ç¾ã‚’直接扱ã†ã“ã¨ã«ã‚ˆã£ã¦å®Ÿç¾ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€`ColumnUInt64`ã«ã¯å†…部é…列ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ã‚’è¿”ã™`getData`メソッドãŒã‚ã‚Šã€åˆ¥ã®ãƒ«ãƒ¼ãƒãƒ³ãŒãã®é…列を直接読ã¿å–ã£ãŸã‚ŠåŸ‹ã‚ãŸã‚Šã—ã¾ã™ã€‚効率的ãªç‰¹æ®ŠåŒ–ã‚’å¯èƒ½ã«ã™ã‚‹ãŸã‚ã®ã€Œãƒªãƒ¼ã‚­ãƒ¼æŠ½è±¡ã€ãŒã‚ã‚Šã¾ã™ã€‚ + +## データ型 {#data_types} + +`IDataType`ã¯ã‚·ãƒªã‚¢ãƒ«åŒ–ãŠã‚ˆã³é€†ã‚·ãƒªã‚¢ãƒ«åŒ–ã«è²¬ä»»ã‚’è² ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚«ãƒ©ãƒ ã®ãƒãƒ£ãƒ³ã‚¯ã¾ãŸã¯å€‹ã€…ã®å€¤ã‚’ãƒã‚¤ãƒŠãƒªã¾ãŸã¯ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ã§èª­ã¿æ›¸ãã§ãã¾ã™ã€‚`IDataType`ã¯ãƒ†ãƒ¼ãƒ–ル内ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«ç›´æŽ¥å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚例ãˆã°ã€`DataTypeUInt32`ã€`DataTypeDateTime`ã€`DataTypeString`ãªã©ãŒã‚ã‚Šã¾ã™ã€‚ + +`IDataType`ã¨`IColumn`ã¯äº’ã„ã«ã‚†ã‚‹ã関連ã—ã¦ã„ã¾ã™ã€‚ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ãŒã€åŒã˜`IColumn`実装ã«ã‚ˆã£ã¦ãƒ¡ãƒ¢ãƒªä¸Šã§è¡¨ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€`DataTypeUInt32`ã¨`DataTypeDateTime`ã¯ã€ã©ã¡ã‚‰ã‚‚`ColumnUInt32`ã¾ãŸã¯`ColumnConstUInt32`ã§è¡¨ã•ã‚Œã¾ã™ã€‚ã•ã‚‰ã«ã€åŒã˜ãƒ‡ãƒ¼ã‚¿åž‹ãŒç•°ãªã‚‹`IColumn`実装ã«ã‚ˆã£ã¦è¡¨ã•ã‚Œã‚‹ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€`DataTypeUInt8`ã¯`ColumnUInt8`ã‚„`ColumnConstUInt8`ã«ã‚ˆã£ã¦è¡¨ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +`IDataType`ã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’ä¿æŒã—ã¾ã™ã€‚例ã¨ã—ã¦ã¯ã€`DataTypeUInt8`ã¯ä½•ã‚‚ä¿æŒã—ã¦ãŠã‚‰ãšï¼ˆä»®æƒ³ãƒã‚¤ãƒ³ã‚¿`vptr`を除ã)ã€`DataTypeFixedString`ã¯`N`(固定サイズ文字列ã®ã‚µã‚¤ã‚ºï¼‰ã ã‘ã‚’ä¿æŒã—ã¾ã™ã€‚ + +`IDataType`ã¯ã•ã¾ã–ã¾ãªãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ãŸã‚ã®ãƒ˜ãƒ«ãƒ‘ーメソッドをæŒã£ã¦ã„ã¾ã™ã€‚例ã¨ã—ã¦ã€ã‚¯ã‚©ãƒ¼ãƒˆã®å¯èƒ½æ€§ã‚’考慮ã—ã¦å€¤ã‚’シリアル化ã™ã‚‹æ–¹æ³•ã€JSONã®ãŸã‚ã«å€¤ã‚’シリアル化ã™ã‚‹æ–¹æ³•ã€ãŠã‚ˆã³XMLå½¢å¼ã®ä¸€éƒ¨ã¨ã—ã¦å€¤ã‚’シリアル化ã™ã‚‹æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚データフォーマットã¨ã®ç›´æŽ¥ã®å¯¾å¿œã¯ã‚ã‚Šã¾ã›ã‚“。例ãˆã°ã€ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ`Pretty`ã¨`TabSeparated`ã¯ã€`IDataType`インターフェースã®`serializeTextEscaped`ヘルパーメソッドを共有ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +## ブロック {#block} + +`Block`ã¯ãƒ¡ãƒ¢ãƒªå†…ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚µãƒ–セット(ãƒãƒ£ãƒ³ã‚¯ï¼‰ã‚’表ã™ã‚³ãƒ³ãƒ†ãƒŠã§ã™ã€‚ãã‚Œã¯å˜ã«3ã¤çµ„(`IColumn, IDataType, カラムå`)ã®ã‚»ãƒƒãƒˆã§ã™ã€‚クエリ実行中ã€ãƒ‡ãƒ¼ã‚¿ã¯`Block`ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚`Block`ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ï¼ˆ`IColumn`オブジェクト内ã«ï¼‰ã‚‚æŒã¡ã€ã‚¿ã‚¤ãƒ—ã«é–¢ã™ã‚‹æƒ…報(`IDataType`内)ãŒã‚ã‚Šã€ã‚«ãƒ©ãƒ ãŒã©ã®ã‚ˆã†ã«å‡¦ç†ã•ã‚Œã‚‹ã‹ã‚’æ•™ãˆã¾ã™ã€‚ãã—ã¦ã‚«ãƒ©ãƒ åã‚‚ã‚ã‚Šã¾ã™ã€‚ãã‚Œã¯ã€ã‚‚ã¨ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®ã‚«ãƒ©ãƒ åã‹ã€è¨ˆç®—çµæžœã‚’一時的ã«å–å¾—ã™ã‚‹ãŸã‚ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸäººå·¥çš„ãªåå‰ã§ã™ã€‚ + +ブロック内ã§ã‚«ãƒ©ãƒ ã«é–¢æ•°ã‚’計算ã™ã‚‹å ´åˆã€çµæžœã‚’å«ã‚€åˆ¥ã®ã‚«ãƒ©ãƒ ã‚’ブロックã«è¿½åŠ ã—ã€é–¢æ•°ã®å¼•æ•°ç”¨ã®ã‚«ãƒ©ãƒ ã«ã¯è§¦ã‚Œã¾ã›ã‚“。æ“作ã¯ã‚¤ãƒŸãƒ¥ãƒ¼ã‚¿ãƒ–ルã§ã™ã€‚後ã§ä¸è¦ãªã‚«ãƒ©ãƒ ã¯ãƒ–ロックã‹ã‚‰å‰Šé™¤ã§ãã¾ã™ãŒã€å¤‰æ›´ã¯ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯å…±é€šéƒ¨åˆ†å¼ã®æ¶ˆåŽ»ã«ä¾¿åˆ©ã§ã™ã€‚ + +ブロックã¯å‡¦ç†ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒãƒ£ãƒ³ã‚¯ã”ã¨ã«ä½œæˆã•ã‚Œã¾ã™ã€‚注æ„ã™ã¹ãã¯ã€åŒã˜ã‚¿ã‚¤ãƒ—ã®è¨ˆç®—ã§ã¯ç•°ãªã‚‹ãƒ–ロックã§ã‚‚カラムåã¨ã‚¿ã‚¤ãƒ—ãŒåŒã˜ã§ã‚ã‚‹ãŸã‚ã€ã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ã ã‘ãŒå¤‰åŒ–ã—ã¾ã™ã€‚ブロックデータã¯ãƒ–ロックヘッダーã‹ã‚‰åˆ†é›¢ã™ã‚‹æ–¹ãŒè‰¯ã„ã§ã™ã€‚å°ã•ãªãƒ–ロックサイズã¯ã€`shared_ptr`ã®ã‚³ãƒ”ーやカラムåã®ä¸€æ™‚文字列ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒé«˜ã„ã§ã™ã€‚ + +## プロセッサ + +記述ã¯[https://github.com/ClickHouse/ClickHouse/blob/master/src/Processors/IProcessor.h](https://github.com/ClickHouse/ClickHouse/blob/master/src/Processors/IProcessor.h)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## フォーマット {#formats} + +データフォーマットã¯ãƒ—ロセッサã§å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## I/O {#io} + +ãƒã‚¤ãƒˆæŒ‡å‘ã®å…¥å‡ºåŠ›ã«ã¯ã€`ReadBuffer`ã¨`WriteBuffer`ã®æŠ½è±¡ã‚¯ãƒ©ã‚¹ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã¯C++ã®`iostream`ã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚心é…ã—ãªã„ã§ãã ã•ã„:æˆç†Ÿã—ãŸC++プロジェクトã¯ã€è‰¯ã„ç†ç”±ã§å¸¸ã«`iostream`以外ã®ä½•ã‹ã‚’使用ã—ã¦ã„ã¾ã™ã€‚ + +`ReadBuffer`ã¨`WriteBuffer`ã¯ã€å˜ãªã‚‹é€£ç¶šã—ãŸãƒãƒƒãƒ•ã‚¡ã¨ãã®ãƒãƒƒãƒ•ã‚¡å†…ã®ä½ç½®ã‚’指ã™ã‚«ãƒ¼ã‚½ãƒ«ã§ã™ã€‚実装ã¯ãƒãƒƒãƒ•ã‚¡ã®ãƒ¡ãƒ¢ãƒªã‚’ä¿æŒã™ã‚‹å ´åˆã¨ã—ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ãƒãƒƒãƒ•ã‚¡ã‚’次ã®ãƒ‡ãƒ¼ã‚¿ã§æº€ãŸã™ãŸã‚(`ReadBuffer`ã®å ´åˆï¼‰ã¾ãŸã¯ã©ã“ã‹ã«ãƒãƒƒãƒ•ã‚¡ã‚’フラッシュã™ã‚‹ãŸã‚(`WriteBuffer`ã®å ´åˆï¼‰ã®ä»®æƒ³ãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚ã‚Šã¾ã™ã€‚仮想メソッドã¯ã‚ã¾ã‚Šå‘¼ã°ã‚Œã¾ã›ã‚“。 + +`ReadBuffer`/`WriteBuffer`ã®å®Ÿè£…ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã¨ãƒ•ã‚¡ã‚¤ãƒ«è¨˜è¿°å­ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚½ã‚±ãƒƒãƒˆã§å‹•ä½œã™ã‚‹ãŸã‚ã‚„ã€åœ§ç¸®ã‚’実装ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ï¼ˆ`CompressedWriteBuffer`ã¯åˆ¥ã®WriteBufferã§åˆæœŸåŒ–ã•ã‚Œã€ãã“ã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むå‰ã«åœ§ç¸®ã‚’è¡Œã„ã¾ã™ï¼‰ä»–ã®ç›®çš„ã®ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™â€“åå‰`ConcatReadBuffer`ã€`LimitReadBuffer`ã€ãŠã‚ˆã³`HashingWriteBuffer`ã¯ãれ自体を物語ã£ã¦ã„ã¾ã™ã€‚ + +Read/WriteBuffersã¯ãƒã‚¤ãƒˆã‚’扱ã†ã ã‘ã§ã™ã€‚入力/出力ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’支æ´ã™ã‚‹ãŸã‚ã«ã€`ReadHelpers`ãŠã‚ˆã³`WriteHelpers`ヘッダーファイルã‹ã‚‰ã®é–¢æ•°ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€å°æ•°å½¢å¼ã§æ•°å€¤ã‚’書ããŸã‚ã®ãƒ˜ãƒ«ãƒ‘ーãŒã‚ã‚Šã¾ã™ã€‚ + +çµæžœã‚»ãƒƒãƒˆã‚’`JSON`å½¢å¼ã§æ¨™æº–出力ã«æ›¸ã込むã¨ãã«ä½•ãŒèµ·ã“ã‚‹ã‹ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ +çµæžœã‚»ãƒƒãƒˆã¯ã€ãƒ—ルクエリパイプラインã‹ã‚‰ãƒ•ã‚§ãƒƒãƒã•ã‚Œã‚‹æº–å‚™ãŒæ•´ã£ã¦ã„ã¾ã™ã€‚ +ã¾ãšã€æ¨™æº–出力ã«ãƒã‚¤ãƒˆã‚’書ã込むãŸã‚ã«`WriteBufferFromFileDescriptor(STDOUT_FILENO)`を作æˆã—ã¾ã™ã€‚ +次ã«ã€ã‚¯ã‚¨ãƒªãƒ‘イプラインã®çµæžœã‚’`JSON`å½¢å¼ã§æ¨™æº–出力ã«è¡Œã‚’出力ã™ã‚‹`JSONRowOutputFormat`ã«æŽ¥ç¶šã—ã¾ã™ã€‚ +ã“ã‚Œã¯`complete`メソッドを介ã—ã¦è¡Œã†ã“ã¨ãŒã§ãã€ãƒ—ルクエリパイプラインを完了ã—ãŸã‚¯ã‚¨ãƒªãƒ‘イプラインã«å¤‰æ›ã—ã¾ã™ã€‚ +内部的ã«ã¯ã€`JSONRowOutputFormat`ã¯ã•ã¾ã–ã¾ãªJSONデリミタを書ãè¾¼ã¿ã€`IDataType::serializeTextJSON`メソッドを`IColumn`ã¨è¡Œç•ªå·ã®å‚ç…§ã¨ã—ã¦å‘¼ã³å‡ºã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€`IDataType::serializeTextJSON`ã¯`WriteHelpers.h`ã‹ã‚‰ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ã¾ã™ï¼šä¾‹ãˆã°æ•°å€¤ã‚¿ã‚¤ãƒ—ã®`writeText`ã‚„`DataTypeString`ã®`writeJSONString`ã§ã™ã€‚ + +## テーブル {#tables} + +`IStorage`インターフェースã¯ãƒ†ãƒ¼ãƒ–ルを表ã—ã¾ã™ã€‚ãã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã®ç•°ãªã‚‹å®Ÿè£…ã¯ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルエンジンã§ã™ã€‚例ã¨ã—ã¦ã¯ã€`StorageMergeTree`ã€`StorageMemory`ãªã©ã§ã™ã€‚ã“れらã®ã‚¯ãƒ©ã‚¹ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã€ãŸã ãƒ†ãƒ¼ãƒ–ルを表ã—ã¾ã™ã€‚ + +`IStorage`ã®ä¸»è¦ãªãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€`read`ã¨`write`ã§ã™ã€‚ä»–ã«ã‚‚`alter`ã€`rename`ã€`drop`ãŒã‚ã‚Šã¾ã™ã€‚`read`メソッドã¯æ¬¡ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã™ï¼šãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–るカラムã®ã‚»ãƒƒãƒˆã€è€ƒæ…®ã™ã‚‹`AST`クエリã€ãŠã‚ˆã³æœ›ã¾ã—ã„ストリームã®æ•°ã§ã™ã€‚ãã—ã¦`Pipe`ã‚’è¿”ã—ã¾ã™ã€‚ + +ã»ã¨ã‚“ã©ã®å ´åˆã€èª­ã¿å–りメソッドã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã‚’読むã ã‘ã®è²¬ä»»ãŒã‚ã‚Šã¾ã™ã€‚ãれ以外ã®ãƒ‡ãƒ¼ã‚¿å‡¦ç†ã¯ãƒ‘イプラインã®ä»–ã®éƒ¨åˆ†ã§è¡Œã‚ã‚Œã€`IStorage`ã®è²¬ä»»ç¯„囲外ã§ã™ã€‚ + +ã—ã‹ã—ã€é¡•è‘—ãªä¾‹å¤–ãŒã‚ã‚Šã¾ã™ï¼š + +- ASTクエリã¯`read`メソッドã«æ¸¡ã•ã‚Œã€ãƒ†ãƒ¼ãƒ–ルエンジンãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä½¿ç”¨ã‚’推論ã—ã€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã‚ˆã‚Šå°‘ãªã„データを読ã¿å–ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ +- 時ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルエンジンãŒç‰¹å®šã®ã‚¹ãƒ†ãƒ¼ã‚¸ã¾ã§ãƒ‡ãƒ¼ã‚¿ã‚’自分ã§å‡¦ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€`StorageDistributed`ã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒã«ã‚¯ã‚¨ãƒªã‚’é€ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã—ã¦ç•°ãªã‚‹ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒã‹ã‚‰ãƒžãƒ¼ã‚¸ã§ãるステージã¾ã§è¦æ±‚ã—ã€ãã®å‰å‡¦ç†ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ãã®å¾Œã€ã‚¯ã‚¨ãƒªã‚¤ãƒ³ã‚¿ãƒ—リタãŒãƒ‡ãƒ¼ã‚¿å‡¦ç†ã‚’完了ã—ã¾ã™ã€‚ + +テーブルã®`read`メソッドã¯ã€é€šå¸¸ã¯è¤‡æ•°ã®`Processor`ã§æ§‹æˆã•ã‚Œã‚‹`Pipe`ã‚’è¿”ã—ã¾ã™ã€‚ã“れらã®ãƒ—ロセッサã¯ã€ä¸¦è¡Œã—ã¦ãƒ†ãƒ¼ãƒ–ルを読むã“ã¨ãŒã§ãã¾ã™ã€‚ +次ã«ã€ã“れらã®ãƒ—ロセッサをã•ã¾ã–ã¾ãªä»–ã®å¤‰æ›ï¼ˆå¼ã®è©•ä¾¡ã‚„フィルタリングãªã©ï¼‰ã«æŽ¥ç¶šã§ãã¾ã™ã€‚ã“れらã¯ç‹¬ç«‹ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ +ãã—ã¦ã€ãれらã®ä¸Šã«`QueryPipeline`を作æˆã—ã€`PipelineExecutor`を介ã—ã¦å®Ÿè¡Œã—ã¾ã™ã€‚ + +ã¾ãŸã€`TableFunction`ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã¯`FROM`å¥ã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã«ä¸€æ™‚çš„ãª`IStorage`オブジェクトを返ã™é–¢æ•°ã§ã™ã€‚ + +テーブルエンジンã®å®Ÿè£…方法を簡å˜ã«çŸ¥ã‚‹ãŸã‚ã«ã¯ã€`StorageMemory`ã‚„`StorageTinyLog`ã®ã‚ˆã†ãªå˜ç´”ãªã‚‚ã®ã‚’見ã¦ãã ã•ã„。 + +> `IStorage`ã®`read`メソッドã®çµæžœã¨ã—ã¦ã€`QueryProcessingStage`—ストレージ内ã§æ—¢ã«è¨ˆç®—ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã®éƒ¨åˆ†ã«ã¤ã„ã¦ã®æƒ…報を返ã—ã¾ã™ã€‚ + +## パーサ {#parsers} + +クエリã¯æ‰‹æ›¸ãã®å†å¸°åž‹ä¸‹é™æ³•ã®ãƒ‘ーサã«ã‚ˆã£ã¦è§£æžã•ã‚Œã¾ã™ã€‚例ãˆã°ã€`ParserSelectQuery`ã¯ã‚¯ã‚¨ãƒªã®ã•ã¾ã–ã¾ãªéƒ¨åˆ†ã®ãŸã‚ã®åŸºç¤Žçš„ãªãƒ‘ーサをå†å¸°çš„ã«å‘¼ã³å‡ºã—ã¾ã™ã€‚パーサã¯`AST`を生æˆã—ã¾ã™ã€‚`AST`ã¯ãƒŽãƒ¼ãƒ‰ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã€ã“ã‚Œã¯`IAST`ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã§ã™ã€‚ + +> パーサジェãƒãƒ¬ãƒ¼ã‚¿ã¯æ­´å²çš„ãªç†ç”±ã‹ã‚‰ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +## インタプリタ {#interpreters} + +インタプリタã¯ã€ASTã‹ã‚‰ã‚¯ã‚¨ãƒªå®Ÿè¡Œãƒ‘イプラインを作æˆã™ã‚‹è²¬ä»»ãŒã‚ã‚Šã¾ã™ã€‚å˜ç´”ãªã‚¤ãƒ³ã‚¿ãƒ—リタ(`InterpreterExistsQuery`ã‚„`InterpreterDropQuery`)ã¨ã€ã‚ˆã‚Šé«˜åº¦ãª`InterpreterSelectQuery`ãŒã‚ã‚Šã¾ã™ã€‚ + +クエリ実行パイプラインã¯ã€ç‰¹å®šã®ã‚¿ã‚¤ãƒ—ã®åˆ—セットã®ãƒãƒ£ãƒ³ã‚¯ã‚’消費ã—ã€ç”Ÿæˆã§ãるプロセッサã®çµ„ã¿åˆã‚ã›ã§ã™ã€‚ +プロセッサã¯ãƒãƒ¼ãƒˆã‚’介ã—ã¦é€šä¿¡ã—ã€è¤‡æ•°ã®å…¥åŠ›ãƒãƒ¼ãƒˆã¨è¤‡æ•°ã®å‡ºåŠ›ãƒãƒ¼ãƒˆã‚’æŒã¤ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +詳細ãªèª¬æ˜Žã¯[src/Processors/IProcessor.h](https://github.com/ClickHouse/ClickHouse/blob/master/src/Processors/IProcessor.h)ã«ã‚ã‚Šã¾ã™ã€‚ + +例ãˆã°ã€`SELECT`クエリã®ã‚¤ãƒ³ã‚¿ãƒ—リタã®çµæžœã¯ã€çµæžœã‚»ãƒƒãƒˆã‹ã‚‰èª­ã¿å–る特別ãªå‡ºåŠ›ãƒãƒ¼ãƒˆãŒã‚る「プルクエリパイプラインã€ã§ã™ã€‚ +`INSERT`クエリã®çµæžœã¯ã€æŒ¿å…¥ç”¨ã®ãƒ‡ãƒ¼ã‚¿ã‚’書ã込む入力ãƒãƒ¼ãƒˆã‚’æŒã¤ã€Œãƒ—ッシュクエリパイプラインã€ã§ã™ã€‚ +`INSERT SELECT`クエリã®ã‚¤ãƒ³ã‚¿ãƒ—リタã®çµæžœã¯ã€å…¥åŠ›ã¾ãŸã¯å‡ºåŠ›ã‚’æŒãŸãšã€åŒæ™‚ã«`SELECT`ã‹ã‚‰`INSERT`ã«ãƒ‡ãƒ¼ã‚¿ã‚’コピーã™ã‚‹ã€Œå®Œäº†ã—ãŸã‚¯ã‚¨ãƒªãƒ‘イプラインã€ã§ã™ã€‚ + +`InterpreterSelectQuery`ã¯ã‚¯ã‚¨ãƒªã‚¢ãƒŠãƒªã‚·ã‚¹ã¨å¤‰æ›ã®ãŸã‚ã«`ExpressionAnalyzer`ã¨`ExpressionActions`ã®ä»•çµ„ã¿ã‚’使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã»ã¨ã‚“ã©ã®ãƒ«ãƒ¼ãƒ«ãƒ™ãƒ¼ã‚¹ã®ã‚¯ã‚¨ãƒªæœ€é©åŒ–ãŒè¡Œã‚れる場所ã§ã™ã€‚`ExpressionAnalyzer`ã¯ã‹ãªã‚Šè¤‡é›‘ã§ã€ã‚¯ã‚¨ãƒªå¤‰æ›ã¨æœ€é©åŒ–を個別ã®ã‚¯ãƒ©ã‚¹ã«æŠ½å‡ºã—ã€ã‚¯ã‚¨ãƒªã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«å¤‰æ›ã‚’å¯èƒ½ã«ã™ã‚‹ãŸã‚ã«æ›¸ãç›´ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +インタプリタã«å­˜åœ¨ã™ã‚‹å•é¡Œã‚’解決ã™ã‚‹ãŸã‚ã«ã€æ–°ã—ã„`InterpreterSelectQueryAnalyzer`ãŒé–‹ç™ºã•ã‚Œã¾ã—ãŸã€‚ã“ã‚Œã¯`ExpressionAnalyzer`を使用ã—ãªã„`InterpreterSelectQuery`ã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã‚ã‚Šã€`AST`ã¨`QueryPipeline`ã®é–“ã«`QueryTree`ã¨ã„ã†è¿½åŠ ã®æŠ½è±¡åŒ–層を導入ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ—ロダクションã§ã®ä½¿ç”¨ã«å®Œå…¨ã«æº–å‚™ã•ã‚Œã¦ã„ã¾ã™ãŒã€å¿µã®ãŸã‚ãã®`enable_analyzer`設定を`false`ã«è¨­å®šã™ã‚‹ã“ã¨ã§ã‚ªãƒ•ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 関数 {#functions} + +通常ã®é–¢æ•°ã¨é›†ç´„関数ãŒã‚ã‚Šã¾ã™ã€‚集約関数ã«ã¤ã„ã¦ã¯æ¬¡ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +通常ã®é–¢æ•°ã¯è¡Œæ•°ã‚’変更ã—ã¾ã›ã‚“。å„行を独立ã—ã¦å‡¦ç†ã™ã‚‹ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ã€‚実際ã«ã¯ã€é–¢æ•°ã¯å€‹ã€…ã®è¡Œã®ãŸã‚ã§ã¯ãªãã€ãƒ™ã‚¯ãƒˆãƒ«åŒ–クエリ実行を実ç¾ã™ã‚‹ãŸã‚ã«`Block`ã®ãƒ‡ãƒ¼ã‚¿ã®ãŸã‚ã«å‘¼ã³å‡ºã•ã‚Œã¾ã™ã€‚ + +ã„ãã¤ã‹ã®é›‘多ãªé–¢æ•°ãŒã‚ã‚Šã¾ã™ã€‚[blockSize](../sql-reference/functions/other-functions.md#blocksize-function-blocksize)ã€[rowNumberInBlock](../sql-reference/functions/other-functions.md#rownumberinblock-function-rownumberinblock)ã€ãŠã‚ˆã³[runningAccumulate](../sql-reference/functions/other-functions.md#runningaccumulate-runningaccumulate)ãªã©ãŒã‚ã‚Šã€ãƒ–ロック処ç†ã‚’利用ã—ã€è¡Œã®ç‹¬ç«‹æ€§ã«é•åã—ã¾ã™ã€‚ + +ClickHouseã¯å¼·åŠ›ãªåž‹ä»˜ã‘ã‚’æŒã£ã¦ã„ã‚‹ãŸã‚ã€æš—é»™ã®åž‹å¤‰æ›ã¯ã‚ã‚Šã¾ã›ã‚“。関数ãŒç‰¹å®šã®åž‹ã®çµ„ã¿åˆã‚ã›ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„å ´åˆã€ä¾‹å¤–をスローã—ã¾ã™ã€‚ã—ã‹ã—ã€é–¢æ•°ã¯å¤šãã®ç•°ãªã‚‹åž‹ã®çµ„ã¿åˆã‚ã›ã«å¯¾ã—ã¦ã‚ªãƒ¼ãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦å‹•ä½œã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€`plus`関数(`+`演算å­ã‚’実装ã™ã‚‹ãŸã‚ã®ï¼‰ã¯ã€ä»»æ„ã®æ•°å€¤åž‹ã®çµ„ã¿åˆã‚ã›ã§å‹•ä½œã—ã¾ã™ï¼š`UInt8` + `Float32`ã€`UInt16` + `Int8`ãªã©ã€‚ã¾ãŸã€ã„ãã¤ã‹ã®å¯å¤‰çš„ãªé–¢æ•°ã¯ä»»æ„ã®æ•°ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚例ãˆã°`concat`関数ã§ã™ã€‚ + +関数を実装ã™ã‚‹ã“ã¨ã¯ã‚„ã‚„ä¸ä¾¿ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ãªãœãªã‚‰ã€é–¢æ•°ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹`IColumns`を明示的ã«ãƒ‡ã‚£ã‚¹ãƒ‘ッãƒã™ã‚‹ãŸã‚ã§ã™ã€‚例ãˆã°ã€`plus`関数ã¯å„数値型ã®çµ„ã¿åˆã‚ã›ã¨å®šæ•°ã¾ãŸã¯éžå®šæ•°ã®å·¦ãŠã‚ˆã³å³ã®å¼•æ•°ã«å¯¾ã—ã¦C++テンプレートã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã«ã‚ˆã‚‹ã‚³ãƒ¼ãƒ‰ç”Ÿæˆã‚’æŒã£ã¦ã„ã¾ã™ã€‚ + +ランタイムコード生æˆã‚’実装ã—ã¦ãƒ†ãƒ³ãƒ—レートコードã®è‚¥å¤§åŒ–ã‚’é¿ã‘ã‚‹ã«ã¯å„ªã‚ŒãŸå ´æ‰€ã§ã™ã€‚ã¾ãŸã€ä¹—算加算をèžåˆã•ã›ãŸé–¢æ•°ã‚„一ã¤ã®ãƒ«ãƒ¼ãƒ—å復ã§è¤‡æ•°ã®æ¯”較を行ã†ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +ベクトル化クエリ実行ã®ãŸã‚ã€é–¢æ•°ã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚µãƒ¼ã‚­ãƒƒãƒˆã•ã‚Œã¾ã›ã‚“。例ãˆã°ã€`WHERE f(x) AND g(y)`ã¨æ›¸ãã¨ã€ä¸¡æ–¹ã®å´ãŒè¨ˆç®—ã•ã‚Œã€`f(x)`ãŒã‚¼ãƒ­ã§ã‚ã‚‹è¡Œã§ã‚‚計算ã•ã‚Œã¾ã™ï¼ˆãŸã ã—ã€`f(x)`ãŒã‚¼ãƒ­å®šæ•°å¼ã§ãªã„é™ã‚Šï¼‰ã€‚ã—ã‹ã—ã€`f(x)`æ¡ä»¶ã®é¸æŠžæ€§ãŒé«˜ãã€`f(x)`ã®è¨ˆç®—ãŒ`g(y)`よりもã¯ã‚‹ã‹ã«å®‰ã„å ´åˆã€ãƒžãƒ«ãƒãƒ‘ス計算を実装ã—ãŸæ–¹ãŒè‰¯ã„ã§ã™ã€‚最åˆã«`f(x)`を計算ã—ã€æ¬¡ã«ãã®çµæžœã§ã‚«ãƒ©ãƒ ã‚’フィルタリングã—ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚ŒãŸå°ã•ã„データãƒãƒ£ãƒ³ã‚¯ã®ãŸã‚ã«ã®ã¿`g(y)`を計算ã—ã¾ã™ã€‚ + +## 集約関数 {#aggregate-functions} + +集約関数ã¯çŠ¶æ…‹ã‚’ä¿æŒã™ã‚‹é–¢æ•°ã§ã™ã€‚渡ã•ã‚ŒãŸå€¤ã‚’ã„ãã¤ã‹ã®çŠ¶æ…‹ã«è“„ç©ã—ã€ãã®çŠ¶æ…‹ã‹ã‚‰çµæžœã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã¯`IAggregateFunction`インターフェースã§ç®¡ç†ã•ã‚Œã¾ã™ã€‚状態ã¯éžå¸¸ã«å˜ç´”(`AggregateFunctionCount`ã®çŠ¶æ…‹ã¯å˜ä¸€ã®`UInt64`値ã§ã™ï¼‰ãªå ´åˆã‚‚ã‚ã‚Šã¾ã™ã—ã€éžå¸¸ã«è¤‡é›‘(`AggregateFunctionUniqCombined`ã®çŠ¶æ…‹ã¯ç·šå½¢é…列ã€ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã€ãã—ã¦`HyperLogLog`確率データ構造ã®çµ„ã¿åˆã‚ã›ã§ã™ï¼‰ãªå ´åˆã‚‚ã‚ã‚Šã¾ã™ã€‚ + +状態ã¯`Arena`(メモリプール)ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ã“ã‚Œã¯é«˜ã„カーディナリティã®`GROUP BY`クエリを実行ã™ã‚‹éš›ã«è¤‡æ•°ã®çŠ¶æ…‹ã‚’処ç†ã™ã‚‹ãŸã‚ã§ã™ã€‚状態ã«ã¯éžè‡ªæ˜Žãªã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã¨ãƒ‡ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãŒã‚ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€è¤‡é›‘ãªé›†ç´„状態ã¯è‡ªåˆ†è‡ªèº«ã§è¿½åŠ ã®ãƒ¡ãƒ¢ãƒªã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€çŠ¶æ…‹ã‚’作æˆã—破棄ã™ã‚‹éš›ã®æ³¨æ„ãŒå¿…è¦ã§ã‚ã‚Šã€æ‰€æœ‰æ¨©ã®é©åˆ‡ãªå¼•ã継ãŽã¨ç ´æ£„é †åºãŒå¿…è¦ã§ã™ã€‚ + +集約状態ã¯ã€åˆ†æ•£ã‚¯ã‚¨ãƒªå®Ÿè¡Œä¸­ã«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’介ã—ã¦æ¸¡ã—ãŸã‚Šã€RAMãŒä¸è¶³ã—ã¦ãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ã込むãŸã‚ã«ã‚·ãƒªã‚¢ãƒ«åŒ–ãŠã‚ˆã³é€†ã‚·ãƒªã‚¢ãƒ«åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãれらã¯ã€`DataTypeAggregateFunction`ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã—ã¦ãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«é›†ç´„ã‚’å¯èƒ½ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +> 集約関数状態ã®ã‚·ãƒªã‚¢ãƒ«åŒ–ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿å½¢å¼ã¯ã€ç¾åœ¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç†ã•ã‚Œã¦ã„ã¾ã›ã‚“。集約状態ãŒä¸€æ™‚çš„ã«ã—ã‹ä¿æŒã•ã‚Œãªã„å ´åˆã€ã“ã‚Œã¯å•é¡Œã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã—ã‹ã—ã€ç§ãŸã¡ã«ã¯ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«é›†ç´„ã®ãŸã‚ã®`AggregatingMergeTree`テーブルエンジンãŒã‚ã‚Šã€ã™ã§ã«ãƒ—ロダクションã§ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ãã‚ŒãŒã€å°†æ¥çš„ã«ã‚·ãƒªã‚¢ãƒ«åŒ–å½¢å¼ã‚’変更ã™ã‚‹éš›ã«ã€ã“ã®ã‚ˆã†ãªå½¢å¼äº’æ›æ€§ãŒå¿…è¦ã«ãªã‚‹ç†ç”±ã§ã™ã€‚ + +## サーム{#server} + +サーãƒã¯ç•°ãªã‚‹ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’実装ã—ã¦ã„ã¾ã™ï¼š + +- ä»»æ„ã®å¤–部クライアント用ã®HTTPインターフェース。 +- ãƒã‚¤ãƒ†ã‚£ãƒ–ãªClickHouseクライアントや分散クエリ実行中ã®ã‚¯ãƒ­ã‚¹ã‚µãƒ¼ãƒé€šä¿¡ç”¨ã®TCPインターフェース。 +- レプリケーションã®ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿è»¢é€ç”¨ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã€‚ + +内部的ã«ã¯ã€ãŸã ã®ãƒ—リミティブãªãƒžãƒ«ãƒã‚¹ãƒ¬ãƒƒãƒ‰ã‚µãƒ¼ãƒã§ã€ã‚³ãƒ«ãƒ¼ãƒãƒ³ã‚„ファイãƒãƒ¼ã¯ã‚ã‚Šã¾ã›ã‚“。サーãƒã¯å˜ç´”ãªã‚¯ã‚¨ãƒªã‚’高率ã«å‡¦ç†ã™ã‚‹ãŸã‚ã§ã¯ãªãã€æ¯”較的少ãªã„é‡ã®è¤‡é›‘ãªã‚¯ã‚¨ãƒªã‚’処ç†ã—ã€ãã‚Œãžã‚ŒãŒåˆ†æžã®ãŸã‚ã«è†¨å¤§ãªãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã§ãるよã†ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +サーãƒã¯ã‚¯ã‚¨ãƒªå®Ÿè¡Œã«å¿…è¦ãªç’°å¢ƒã‚’æŒã¤`Context`クラスをåˆæœŸåŒ–ã—ã¾ã™ï¼šåˆ©ç”¨å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒªã‚¹ãƒˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ã‚¢ã‚¯ã‚»ã‚¹æ¨©é™ã€è¨­å®šã€ã‚¯ãƒ©ã‚¹ã‚¿ã€ãƒ—ロセスリストã€ã‚¯ã‚¨ãƒªãƒ­ã‚°ãªã©ã§ã™ã€‚インタプリタã¯ã“ã®ç’°å¢ƒã‚’使用ã—ã¾ã™ã€‚ + +サーãƒTCPプロトコルã¯ã€å¾Œæ–¹ãŠã‚ˆã³å‰æ–¹äº’æ›æ€§ã‚’完全ã«ç¶­æŒã—ã¾ã™ï¼šå¤ã„クライアントã¯æ–°ã—ã„サーãƒã¨é€šä¿¡ã§ãã€æ–°ã—ã„クライアントã¯å¤ã„サーãƒã¨é€šä¿¡ã§ãã¾ã™ã€‚ã—ã‹ã—ã€æ°¸é ã«ãれを維æŒã—続ã‘ãŸãã¯ãªã„ã®ã§ã€ç§ãŸã¡ã¯ç´„1年後ã«å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚µãƒãƒ¼ãƒˆã‚’削除ã—ã¦ã„ã¾ã™ã€‚ + +:::note +ã»ã¨ã‚“ã©ã®å¤–部アプリケーションã«å¯¾ã—ã¦ã¯ã€HTTPインターフェースã®ä½¿ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã¯ã‚·ãƒ³ãƒ—ルã§ä½¿ã„ã‚„ã™ã„ã§ã™ã€‚TCPプロトコルã¯å†…部データ構造ã¨ã‚ˆã‚ŠåŽ³å¯†ã«ãƒªãƒ³ã‚¯ã•ã‚Œã¦ãŠã‚Šã€ãƒ‡ãƒ¼ã‚¿ãƒ–ロックを渡ã™ãŸã‚ã«å†…部形å¼ã‚’使用ã—ã€åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ç‹¬è‡ªã®ãƒ•ãƒ¬ãƒ¼ãƒ ã‚’使用ã—ã¾ã™ã€‚ã“ã®ãƒ—ロトコルã®Cライブラリをリリースã—ã¦ã„ã¾ã›ã‚“。ã“ã‚Œã¯ClickHouseã®ã‚³ãƒ¼ãƒ‰ãƒ™ãƒ¼ã‚¹ã®ã»ã¨ã‚“ã©ã‚’リンクã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€å®Ÿç”¨çš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +## 設定 {#configuration} + +ClickHouseサーãƒã¯POCO C++ライブラリをベースã«ã—ã¦ãŠã‚Šã€ãã®æ§‹æˆã‚’表ã™ãŸã‚ã«`Poco::Util::AbstractConfiguration`を使用ã—ã¾ã™ã€‚構æˆã¯`Poco::Util::ServerApplication`クラスã«ã‚ˆã£ã¦ä¿æŒã•ã‚Œã€ã“れを`DaemonBase`クラスãŒç¶™æ‰¿ã—ã€ãã‚ŒãŒã•ã‚‰ã«`DB::Server`クラスã«ã‚ˆã‚Šç¶™æ‰¿ã•ã‚Œã€clickhouse-server自体を実装ã—ã¦ã„ã¾ã™ã€‚ãã®ãŸã‚ã€æ§‹æˆã¯`ServerApplication::config()`メソッドã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + +構æˆã¯è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ï¼ˆXMLã¾ãŸã¯YAMLå½¢å¼ã§ï¼‰èª­ã¿å–られã€`ConfigProcessor`クラスã«ã‚ˆã£ã¦å˜ä¸€ã®`AbstractConfiguration`ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚構æˆã¯ã‚µãƒ¼ãƒã®èµ·å‹•æ™‚ã«èª­ã¿è¾¼ã¾ã‚Œã€ãã®å¾Œã€æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã®æ›´æ–°ã€å‰Šé™¤ã¾ãŸã¯è¿½åŠ ãŒã‚ã‚‹å ´åˆã«ã¯å†èª­ã¿è¾¼ã¿ã•ã‚Œã¾ã™ã€‚`ConfigReloader`クラスã¯ã€ã“れらã®å¤‰æ›´ã®å®šæœŸçš„ãªç›£è¦–ã¨å†èª­ã¿è¾¼ã¿æ‰‹ç¶šãを担当ã—ã¾ã™ã€‚`SYSTEM RELOAD CONFIG`クエリも構æˆã‚’å†èª­ã¿è¾¼ã¿ã•ã›ã‚‹ãƒˆãƒªã‚¬ãƒ¼ã«ãªã‚Šã¾ã™ã€‚ + +`Server`以外ã®ã‚¯ã‚¨ãƒªã‚„サブシステムã«ã¯æ§‹æˆãŒ`Context::getConfigRef()`メソッドを使ã£ã¦ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ã€‚サーãƒã‚’å†èµ·å‹•ã›ãšã«æ§‹æˆã‚’リロードã§ãるサブシステムã¯ã€`Server::main()`メソッド内ã®ãƒªãƒ­ãƒ¼ãƒ‰ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã«ç™»éŒ²ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚æ–°ã—ã„構æˆã«ã‚¨ãƒ©ãƒ¼ãŒã‚ã‚‹å ´åˆã€å¤šãã®ã‚µãƒ–システムã¯æ–°ã—ã„構æˆã‚’無視ã—ã€è­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ログã«è¨˜éŒ²ã—ã€ä»¥å‰ã«èª­ã¿è¾¼ã¾ã‚ŒãŸæ§‹æˆã§å‹•ä½œã‚’続行ã—ã¾ã™ã€‚`AbstractConfiguration`ã®æ€§è³ªä¸Šã€ç‰¹å®šã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¸ã®å‚照を渡ã™ã“ã¨ã¯ã§ããªã„ãŸã‚ã€é€šå¸¸ã¯`String config_prefix`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## スレッドã¨ã‚¸ãƒ§ãƒ– {#threads-and-jobs} + +クエリを実行ã—ã€å‰¯ä½œç”¨ã‚’è¡Œã†ãŸã‚ã«ClickHouseã¯ã€ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã‹ã‚‰ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’割り当ã¦ã€é »ç¹ãªã‚¹ãƒ¬ãƒƒãƒ‰ã®ä½œæˆã¨ç ´æ£„ã‚’é¿ã‘ã¾ã™ã€‚目的ã¨ã‚¸ãƒ§ãƒ–ã®æ§‹é€ ã«å¿œã˜ã¦é¸ã°ã‚Œã‚‹ã„ãã¤ã‹ã®ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールãŒã‚ã‚Šã¾ã™ï¼š + * クライアントセッションã®ãŸã‚ã®ã‚µãƒ¼ãƒãƒ—ール。 + * 一般的ãªã‚¸ãƒ§ãƒ–ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ´»å‹•ã€ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®ãŸã‚ã®ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ール。 + * 主ã«ä½•ã‚‰ã‹ã®IOã§ãƒ–ロックã•ã‚ŒCPUè² è·ãŒå°‘ãªã„ジョブã®ãŸã‚ã®IOスレッドプール。 + * 定期的ãªã‚¿ã‚¹ã‚¯ã®ãŸã‚ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ール。 + * ステップã«åˆ†å‰²ã§ãるプリエンプタブルãªã‚¿ã‚¹ã‚¯ã®ãŸã‚ã®ãƒ—ール。 + +サーãƒãƒ—ールã¯`Server::main()`メソッドã§å®šç¾©ã•ã‚ŒãŸ`Poco::ThreadPool`クラスã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã§ã™ã€‚最大ã§`max_connection`スレッドをæŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ãã‚Œãžã‚Œã®ã‚¹ãƒ¬ãƒƒãƒ‰ã¯1ã¤ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªæŽ¥ç¶šã«å°‚念ã—ã¦ã„ã¾ã™ã€‚ + +グローãƒãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã¯`GlobalThreadPool`シングルトンクラスã§ã™ã€‚ã“ã‚Œã‹ã‚‰ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’割り当ã¦ã‚‹ã«ã¯`ThreadFromGlobalPool`を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯`std::thread`ã«ä¼¼ãŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æŒã£ã¦ãŠã‚Šã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ãƒ—ールã‹ã‚‰ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’プルã—ã€å¿…è¦ãªåˆæœŸåŒ–ã‚’ã™ã¹ã¦è¡Œã„ã¾ã™ã€‚以下ã®è¨­å®šã§æ§‹æˆã•ã‚Œã¾ã™ï¼š + * `max_thread_pool_size` - プール内スレッド数ã®åˆ¶é™ã€‚ + * `max_thread_pool_free_size` - æ–°ã—ã„ジョブを待ã¤ã‚¢ã‚¤ãƒ‰ãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã®åˆ¶é™ã€‚ + * `thread_pool_queue_size` - スケジュールã•ã‚ŒãŸã‚¸ãƒ§ãƒ–æ•°ã®åˆ¶é™ã€‚ + +グローãƒãƒ«ãƒ—ールã¯ãƒ¦ãƒ‹ãƒãƒ¼ã‚µãƒ«ã§ã‚ã‚Šã€ä»¥ä¸‹ã«èª¬æ˜Žã™ã‚‹ã™ã¹ã¦ã®ãƒ—ールã¯ãã®ä¸Šã«å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ãƒ—ールã®éšŽå±¤ã¨ã—ã¦è€ƒãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚特定ã®ãƒ—ールã¯`ThreadPool`クラスを使用ã—ã¦ã‚°ãƒ­ãƒ¼ãƒãƒ«ãƒ—ールã‹ã‚‰ãã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’å–å¾—ã—ã¾ã™ã€‚ãã®ãŸã‚ã€ç‰¹å®šã®ãƒ—ールã®ä¸»ãªç›®çš„ã¯ã€åŒæ™‚ジョブã®æ•°ã«åˆ¶é™ã‚’é©ç”¨ã—ã€ã‚¸ãƒ§ãƒ–ã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’è¡Œã†ã“ã¨ã§ã™ã€‚スレッドプールã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚ˆã‚Šå¤šãã®ã‚¸ãƒ§ãƒ–ãŒã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€`ThreadPool`ãŒå„ªå…ˆé †ä½ä»˜ãã®ã‚­ãƒ¥ãƒ¼ã«ã‚¸ãƒ§ãƒ–ã‚’è“„ç©ã—ã¾ã™ã€‚ãã‚Œãžã‚Œã®ã‚¸ãƒ§ãƒ–ã«ã¯æ•´æ•°ã®å„ªå…ˆåº¦ãŒã‚ã‚Šã¾ã™ã€‚デフォルトã®å„ªå…ˆåº¦ã¯ã‚¼ãƒ­ã§ã™ã€‚優先度ã®å€¤ãŒé«˜ã„ジョブã¯ã€å„ªå…ˆåº¦ã®å€¤ãŒä½Žã„ジョブより先ã«é–‹å§‹ã•ã‚Œã¾ã™ã€‚ã—ã‹ã—ã€ã™ã§ã«å®Ÿè¡Œã•ã‚Œã¦ã„るジョブã®é–“ã«ã¯é•ã„ã¯ãªãã€ãã®ãŸã‚優先度ã¯ä¸»ã«ãƒ—ールãŒéŽè² è·çŠ¶æ…‹ã§ã‚ã‚‹ã¨ãã«é‡è¦ã§ã™ã€‚ + +IOスレッドプールã¯ã€`IOThreadPool::get()`メソッドã§ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãªãƒ—レーンãª`ThreadPool`ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€`max_io_thread_pool_size`ã€`max_io_thread_pool_free_size`ã€ãŠã‚ˆã³`io_thread_pool_queue_size`設定ã¨åŒæ§˜ã«æ§‹æˆã•ã‚Œã¾ã™ã€‚IOスレッドプールã®ä¸»ãªç›®çš„ã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ãƒ—ールをIOジョブã§æ¶ˆè€—ã•ã›ãªã„よã†ã«ã—ã€ãã‚ŒãŒã‚¯ã‚¨ãƒªã®ãŸã‚ã«CPUを完全ã«æ´»ç”¨ã§ããªã„ã“ã¨ã‚’é¿ã‘ã‚‹ã“ã¨ã§ã™ã€‚S3ã¸ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯å¤šãã®IOæ“作を行ã†ãŸã‚ã€ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªã‚¯ã‚¨ãƒªã¸ã®å½±éŸ¿ã‚’é¿ã‘ã‚‹ãŸã‚ã«åˆ¥ã®`BackupsIOThreadPool`ãŒã‚ã‚Šã€`max_backups_io_thread_pool_size`ã€`max_backups_io_thread_pool_free_size`ã€ãŠã‚ˆã³`backups_io_thread_pool_queue_size`設定ã§æ§‹æˆã•ã‚Œã¾ã™ã€‚ + +定期的ãªã‚¿ã‚¹ã‚¯å®Ÿè¡Œã®ãŸã‚ã«`BackgroundSchedulePool`クラスãŒã‚ã‚Šã¾ã™ã€‚`BackgroundSchedulePool::TaskHolder`オブジェクトを使用ã—ã¦ã‚¿ã‚¹ã‚¯ã‚’登録ã™ã‚‹ã“ã¨ãŒã§ãã€ãƒ—ールã¯2ã¤ã®ã‚¸ãƒ§ãƒ–ãŒåŒæ™‚ã«å®Ÿè¡Œã•ã‚Œãªã„ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚タスク実行を特定ã®å°†æ¥ã®çž¬é–“ã«å»¶æœŸã—ãŸã‚Šã€ä¸€æ™‚çš„ã«ã‚¿ã‚¹ã‚¯ã‚’éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–化ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚グローãƒãƒ«`Context`ã¯ã“れを異ãªã‚‹ç›®çš„ã§ã„ãã¤ã‹ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚一般的ãªç›®çš„ã®ã‚¿ã‚¹ã‚¯ã«ã¯`Context::getSchedulePool()`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +プリエンプタブルãªã‚¿ã‚¹ã‚¯ã®ãŸã‚ã®ç‰¹åŒ–ã—ãŸã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールもã‚ã‚Šã¾ã™ã€‚ãã®ã‚ˆã†ãª`IExecutableTask`タスクã¯ã€ã‚¹ãƒ†ãƒƒãƒ—ã¨å‘¼ã°ã‚Œã‚‹ã‚¸ãƒ§ãƒ–ã®é †åºä»˜ã‘られãŸã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã«åˆ†å‰²ã§ãã¾ã™ã€‚短ã„タスクãŒé•·ã„タスクより優先ã•ã‚Œã‚‹ã‚ˆã†ã«ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã™ã‚‹ãŸã‚ã«`MergeTreeBackgroundExecutor`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚åå‰ãŒç¤ºã™ã‚ˆã†ã«ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã®MergeTree関連ã®æ“作ã€ä¾‹ãˆã°ãƒžãƒ¼ã‚¸ã‚„ミューテーションã€ãƒ•ã‚§ãƒƒãƒã€ãƒ ãƒ¼ãƒ–ã®ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚プールã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯`Context::getCommonExecutor()`ãŠã‚ˆã³ãã‚Œã«é¡žä¼¼ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã§ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +ã©ã®ãƒ—ールをジョブã«ä½¿ç”¨ã™ã‚‹ã‹ã«é–¢ä¿‚ãªãã€é–‹å§‹æ™‚ã«ã“ã®ã‚¸ãƒ§ãƒ–ã®ãŸã‚ã«`ThreadStatus`インスタンスãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã¯ã™ã¹ã¦ã®ã‚¹ãƒ¬ãƒƒãƒ‰å›ºæœ‰ã®æƒ…報(スレッドIDã€ã‚¯ã‚¨ãƒªIDã€ãƒ‘フォーマンスカウンターã€ãƒªã‚½ãƒ¼ã‚¹æ¶ˆè²»é‡ãªã©ï¼‰ãŒå«ã¾ã‚Œã¾ã™ã€‚ジョブã¯ãƒ­ãƒ¼ã‚«ãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒã‚¤ãƒ³ã‚¿ã«ã‚ˆã£ã¦`CurrentThread::get()`呼ã³å‡ºã—ã§ã“ã‚Œã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ãã®ãŸã‚ã€ã™ã¹ã¦ã®é–¢æ•°ã«ã“れを渡ã™å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +スレッドãŒã‚¯ã‚¨ãƒªå®Ÿè¡Œã«é–¢é€£ã—ã¦ã„ã‚‹å ´åˆã€`ThreadStatus`ã«æ·»ä»˜ã•ã‚Œã‚‹æœ€ã‚‚é‡è¦ãªã‚‚ã®ã¯ã‚¯ã‚¨ãƒªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ`ContextPtr`ã§ã™ã€‚ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã«ã¯ã€ã‚µãƒ¼ãƒãƒ—ール内ã®ãƒžã‚¹ã‚¿ãƒ¼ã‚¹ãƒ¬ãƒƒãƒ‰ãŒã‚ã‚Šã¾ã™ã€‚マスタースレッドã¯`ThreadStatus::QueryScope query_scope(query_context)`オブジェクトをä¿æŒã™ã‚‹ã“ã¨ã§ã‚¢ã‚¿ãƒƒãƒãƒ¡ãƒ³ã‚’è¡Œã„ã¾ã™ã€‚マスタースレッドã¯ã¾ãŸã€`ThreadGroupStatus`オブジェクトã§è¡¨ã•ã‚Œã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã‚°ãƒ«ãƒ¼ãƒ—を作æˆã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œä¸­ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ã™ã¹ã¦ã®è¿½åŠ ã‚¹ãƒ¬ãƒƒãƒ‰ã¯`CurrentThread::attachTo(thread_group)`呼ã³å‡ºã—ã§ãã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚°ãƒ«ãƒ¼ãƒ—ã«æ·»ä»˜ã•ã‚Œã¾ã™ã€‚スレッドグループã¯ãƒ—ロファイルイベントカウンタã®é›†ç´„ã—ã€å˜ä¸€ã‚¿ã‚¹ã‚¯ã«å°‚用ã•ã‚ŒãŸå…¨ã‚¹ãƒ¬ãƒƒãƒ‰ã«ã‚ˆã‚‹ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚’追跡ã™ã‚‹ã®ã«ä½¿ç”¨ã•ã‚Œã¾ã™ï¼ˆè©³ç´°ã¯`MemoryTracker`ãŠã‚ˆã³`ProfileEvents::Counters`クラスをå‚ç…§ã—ã¦ãã ã•ã„)。 + +## åŒæ™‚実行制御 {#concurrency-control} + +並列実行å¯èƒ½ãªã‚¯ã‚¨ãƒªã¯ã€`max_threads`設定を使用ã—ã¦åˆ¶é™ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ã€å˜ä¸€ã‚¯ã‚¨ãƒªãŒã™ã¹ã¦ã®CPUコアを最大é™ã«æ´»ç”¨ã§ãるよã†ã«é¸æŠžã•ã‚Œã¦ã„ã¾ã™ã€‚ã—ã‹ã—ã€è¤‡æ•°ã®åŒæ™‚実行クエリãŒã‚ã‚Šã€ãã‚Œãžã‚ŒãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®`max_threads`設定値を使用ã™ã‚‹å ´åˆã¯ã©ã†ã§ã—ょã†ã‹ï¼Ÿãã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯CPUリソースを共有ã—ã¾ã™ã€‚OSã¯ã€æ–°è¦ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’é »ç¹ã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ã§å…¬å¹³æ€§ã‚’ä¿è¨¼ã—ã¾ã™ãŒã€ã“ã‚Œã«ã¯ãã‚Œãªã‚Šã®ãƒ‘フォーマンスペナルティãŒã‚ã‚Šã¾ã™ã€‚`ConcurrencyControl`ã¯ã“ã®ãƒšãƒŠãƒ«ãƒ†ã‚£ã‚’処ç†ã—ã€å¤šãã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®å‰²ã‚Šå½“ã¦ã‚’é¿ã‘ã‚‹ã“ã¨ã«å½¹ç«‹ã¡ã¾ã™ã€‚スロットã®æ¦‚念ãŒå°Žå…¥ã•ã‚Œã¦ã„ã¾ã™ã€‚スロットã¯åŒæ™‚実行性ã®å˜ä½ã§ã™ï¼šã‚¹ãƒ¬ãƒƒãƒ‰ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ãŸã‚ã«ã¯ã€äº‹å‰ã«ã‚¹ãƒ­ãƒƒãƒˆã‚’å–å¾—ã—ã€ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’åœæ­¢ã—ãŸã‚‰ãれを解放ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚スロットã®æ•°ã¯ã‚µãƒ¼ãƒã§å…¨ä½“ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚åˆè¨ˆã‚¹ãƒ­ãƒƒãƒˆæ•°ã‚’超ãˆãŸå ´åˆã«ã¯ã€è¤‡æ•°ã®åŒæ™‚実行クエリãŒCPUスロットを競争ã—ã¾ã™ã€‚`ConcurrencyControl`ã¯ã€ã“ã®ç«¶äº‰ã‚’公平ã«è§£æ±ºã™ã‚‹ãŸã‚ã«CPUスロットã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°ã‚’è¡Œã†è²¬ä»»ãŒã‚ã‚Šã¾ã™ã€‚ + +ãã‚Œãžã‚Œã®ã‚¹ãƒ­ãƒƒãƒˆã¯ã€ä»¥ä¸‹ã®çŠ¶æ…‹ã‚’æŒã¤ç‹¬ç«‹ã—ãŸçŠ¶æ…‹æ©Ÿæ¢°ã¨ã—ã¦è¦‹ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + * `free`: スロットã¯ä»»æ„ã®ã‚¯ã‚¨ãƒªãŒå‰²ã‚Šå½“ã¦ã‚‹ãŸã‚ã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + * `granted`: スロットã¯ç‰¹å®šã®ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦`allocated`ã•ã‚Œã¾ã™ãŒã€ã¾ã ã‚¹ãƒ¬ãƒƒãƒ‰ã«ç²å¾—ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + * `acquired`: スロットã¯ç‰¹å®šã®ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦`allocated`ã•ã‚Œã€ã‚¹ãƒ¬ãƒƒãƒ‰ã«ã‚ˆã£ã¦ç²å¾—ã•ã‚Œã¾ã™ã€‚ + +注:`allocated`ã•ã‚ŒãŸã‚¹ãƒ­ãƒƒãƒˆã¯`granted`ã¨`acquired`ã®2ã¤ã®ç•°ãªã‚‹çŠ¶æ…‹ã«ã‚ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚å‰è€…ã¯ç§»è¡ŒçŠ¶æ…‹ã§ã‚ã‚Šã€å®Ÿéš›ã«ã¯ã‚¹ãƒ­ãƒƒãƒˆãŒã‚¯ã‚¨ãƒªã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸçž¬é–“ã‹ã‚‰ãã®ã‚¯ã‚¨ãƒªã®ã„ãšã‚Œã‹ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã«ã‚ˆã£ã¦ã‚¢ãƒƒãƒ—スケーリング手続ããŒå®Ÿè¡Œã•ã‚Œã‚‹çž¬é–“ã¾ã§ã®çŸ­ã„状態ã§ã™ã€‚ + +```mermaid +stateDiagram-v2 + direction LR + [*] --> free + free --> allocated: allocate + state allocated { + direction LR + [*] --> granted + granted --> acquired: acquire + acquired --> [*] + } + allocated --> free: release +``` + +`ConcurrencyControl`ã®APIã¯ä»¥ä¸‹ã®æ©Ÿèƒ½ã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ï¼š +1. クエリã®ãŸã‚ã®ãƒªã‚½ãƒ¼ã‚¹å‰²ã‚Šå½“ã¦ã‚’作æˆï¼š`auto slots = ConcurrencyControl::instance().allocate(1, max_threads);`。少ãªãã¨ã‚‚1ã¤ã®ã‚¹ãƒ­ãƒƒãƒˆã‚’割り当ã¦ã€æœ€å¤§ã§`max_threads`ã®ã‚¹ãƒ­ãƒƒãƒˆã‚’割り当ã¦ã¾ã™ã€‚最åˆã®ã‚¹ãƒ­ãƒƒãƒˆã¯å³åº§ã«è¨±å¯ã•ã‚Œã¾ã™ãŒã€æ®‹ã‚Šã®ã‚¹ãƒ­ãƒƒãƒˆã¯å¾Œã§è¨±å¯ã•ã‚Œã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ãã®ãŸã‚é™åº¦ã¯æŸ”軟ã§ã™ã€‚ãªãœãªã‚‰ã€ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã¯å°‘ãªãã¨ã‚‚1ã¤ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’å–å¾—ã—ã¾ã™ã€‚ +2. ãã‚Œãžã‚Œã®ã‚¹ãƒ¬ãƒƒãƒ‰ã¯å‰²ã‚Šå½“ã¦ã‹ã‚‰ã‚¹ãƒ­ãƒƒãƒˆã‚’ç²å¾—ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š`while (auto slot = slots->tryAcquire()) spawnThread([slot = std::move(slot)] { ... });`。 +3. スロットã®å…¨ä½“æ•°ã‚’æ›´æ–°ã—ã¾ã™ï¼š`ConcurrencyControl::setMaxConcurrency(concurrent_threads_soft_limit_num)`。サーãƒå†èµ·å‹•ã›ãšã«å®Ÿè¡Œä¸­ã«è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®APIã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªã¯å°‘ãªãã¨ã‚‚1ã¤ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§é–‹å§‹ã—(CPU圧力ãŒã‚ã‚‹å ´åˆï¼‰ã€ãã®å¾Œ`max_threads`ã¾ã§ã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—ã§ãã¾ã™ã€‚ + +## 分散クエリ実行 {#distributed-query-execution} + +クラスターセットアップã§ã®ã‚µãƒ¼ãƒãƒ¼ã¯ä¸»ã«ç‹¬ç«‹ã—ã¦ã„ã¾ã™ã€‚クラスターã®1ã¤ã¾ãŸã¯ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã«`Distributed`テーブルを作æˆã§ãã¾ã™ã€‚`Distributed`テーブルã¯ãƒ‡ãƒ¼ã‚¿è‡ªä½“ã‚’ä¿å­˜ã›ãšã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å†…ã®è¤‡æ•°ãƒŽãƒ¼ãƒ‰ã®ã™ã¹ã¦ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ãƒ¼ãƒ–ルã¸ã®ã€Œãƒ“ューã€ã‚’æä¾›ã—ã¾ã™ã€‚`Distributed`テーブルã‹ã‚‰SELECTã™ã‚‹ã¨ã€ãã®ã‚¯ã‚¨ãƒªã‚’å†æ›¸ãè¾¼ã¿ã—ã€è² è·åˆ†æ•£è¨­å®šã«å¿œã˜ã¦ãƒªãƒ¢ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã‚’é¸æŠžã—ã€ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã—ã¾ã™ã€‚`Distributed`テーブルã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒã«ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã—ã€ç•°ãªã‚‹ã‚µãƒ¼ãƒã‹ã‚‰ã®ä¸­é–“çµæžœã‚’マージã§ãる段階ã¾ã§å‡¦ç†ã•ã›ã€æ¬¡ã«ä¸­é–“çµæžœã‚’å—ã‘å–ã‚Šã€ãれをマージã—ã¾ã™ã€‚分散テーブルã¯ã§ãã‚‹ã ã‘多ãã®ä½œæ¥­ã‚’リモートサーãƒã«åˆ†é…ã—ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä¸Šã§ä¸­é–“データをã‚ã¾ã‚Šé€ä¿¡ã—ã¾ã›ã‚“。 + +INã¾ãŸã¯JOINå¥å†…ã®ã‚µãƒ–クエリをæŒã¡ã€ãã‚Œãžã‚ŒãŒ`Distributed`テーブルを使用ã™ã‚‹å ´åˆã€ç‰©äº‹ã¯ã‚ˆã‚Šè¤‡é›‘ã«ãªã‚Šã¾ã™ã€‚ã“れらã®ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã«ã¯ç•°ãªã‚‹æˆ¦ç•¥ãŒã‚ã‚Šã¾ã™ã€‚ + +分散クエリ実行ã®ãŸã‚ã®ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚¯ã‚¨ãƒªãƒ—ランã¯ã‚ã‚Šã¾ã›ã‚“。å„ノードã¯ãã®ã‚¿ã‚¹ã‚¯ã®ãŸã‚ã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚¯ã‚¨ãƒªãƒ—ランã®ã¿ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ç§ãŸã¡ã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã«ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã—ã€æ¬¡ã«çµæžœã‚’マージã™ã‚‹ã‚·ãƒ³ãƒ—ルãªãƒ¯ãƒ³ãƒ‘ス分散クエリ実行ã®ã¿ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ã—ã‹ã—ã€ã“ã‚Œã ã‘ã§ã¯ã€é«˜ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã®`GROUP BY`ã‚’æŒã¤è¤‡é›‘ãªã‚¯ã‚¨ãƒªã‚„JOINã®ãŸã‚ã®å¤šé‡ã®ä¸€æ™‚データをæŒã¤ã‚¯ã‚¨ãƒªã«ã¯å®Ÿç¾å¯èƒ½ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ãã®ã‚ˆã†ãªå ´åˆã€ã‚µãƒ¼ãƒãƒ¼é–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’「å†ã‚·ãƒ£ãƒƒãƒ•ãƒ«ã€ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€è¿½åŠ ã®èª¿æ•´ãŒå¿…è¦ã§ã™ã€‚ClickHouseã¯ãã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚‰ãšã€ã“ã®ãŸã‚ã®ä½œæ¥­ãŒå¿…è¦ã§ã™ã€‚ + +## MergeTree {#merge-tree} + +`MergeTree`ã¯ä¸»ã‚­ãƒ¼ã§ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’付ã‘ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã®ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã§ã™ã€‚主キーã¯ã‚«ãƒ©ãƒ ã¾ãŸã¯å¼ã®ä»»æ„ã®ã‚¿ãƒ—ルã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`MergeTree`テーブル内ã®ãƒ‡ãƒ¼ã‚¿ã¯ã€Œãƒ‘ーツã€ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚å„パーツã¯ä¸»ã‚­ãƒ¼é †ã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ã¯ä¸»ã‚­ãƒ¼ã‚¿ãƒ—ルã«ã‚ˆã‚Šè¾žæ›¸é †ã«æ•´åˆ—ã•ã‚Œã¦ã„ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルカラムã¯ã€ã“れらã®ãƒ‘ーツã®ä¸­ã®å€‹åˆ¥ã®`column.bin`ファイルã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ファイルã¯åœ§ç¸®ã•ã‚ŒãŸãƒ–ロックã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚å„ブロックã¯ã€é€šå¸¸ã€æœªåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®64 KBã‹ã‚‰1 MBã®ç¯„囲ã§ã€å¹³å‡å€¤ã‚µã‚¤ã‚ºã«ä¾å­˜ã—ã¾ã™ã€‚ブロックã¯ã‚«ãƒ©ãƒ å€¤ã‚’連続ã—ã¦ä¸€ã¤ãšã¤é…ç½®ã•ã‚Œã¦ã„ã¾ã™ã€‚カラム値ã¯å„カラムã§åŒã˜é †åºã«ã‚り(主キーãŒé †åºã‚’定義ã—ã¦ã„ã¾ã™ï¼‰ã€å¤šãã®ã‚«ãƒ©ãƒ ã‚’å復ã™ã‚‹ã¨ãã«å¯¾å¿œã™ã‚‹è¡Œã®å€¤ãŒå¾—られã¾ã™ã€‚ + +主キー自体ã¯ã€Œã‚¹ãƒ‘ースã€ã§ã™ã€‚ã“ã‚Œã¯ã€å„行を指ã™ã®ã§ã¯ãªãã€ãƒ‡ãƒ¼ã‚¿ã®ã„ãã¤ã‹ã®ç¯„囲ã ã‘を指ã—ã¾ã™ã€‚`primary.idx`ã¨å‘¼ã°ã‚Œã‚‹åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯ã€N番目ã®è¡Œã”ã¨ã«ä¸»ã‚­ãƒ¼ã®å€¤ãŒè¨˜éŒ²ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã“ã§Nã¯`index_granularity`(通常ã€N = 8192)ã¨å‘¼ã°ã‚Œã¾ã™ã€‚ã¾ãŸã€å„カラムã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®å„N番目ã®è¡Œã¸ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’æŒã¤`column.mrk`ファイルãŒã‚ã‚Šã¾ã™ã€‚å„マークã¯ãƒšã‚¢ã§ã‚ã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®åœ§ç¸®ãƒ–ロックã®å…ˆé ­ã¸ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã¨ã€ãƒ‡ã‚³ãƒ³ãƒ—レッションã•ã‚ŒãŸãƒ–ロックã«ãŠã‘るデータã®æœ€åˆã¸ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã§ã™ã€‚通常ã€åœ§ç¸®ãƒ–ロックã¯ãƒžãƒ¼ã‚¯ã¨æ•´åˆã•ã‚Œã¦ãŠã‚Šã€ãƒ‡ã‚³ãƒ³ãƒ—レッションã•ã‚ŒãŸãƒ–ロック内ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã¯ã‚¼ãƒ­ã§ã™ã€‚`primary.idx`ã®ãƒ‡ãƒ¼ã‚¿ã¯å¸¸ã«ãƒ¡ãƒ¢ãƒªã«å­˜åœ¨ã—ã€`column.mrk`ファイルã®ãƒ‡ãƒ¼ã‚¿ã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ + +`MergeTree`内ã®ãƒ‘ーツã‹ã‚‰ä½•ã‹ã‚’読ã¿å–ã‚ã†ã¨ã™ã‚‹ã¨ã€`primary.idx`データを見ã¦ã€è¦æ±‚ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€å¯èƒ½æ€§ã®ã‚る範囲を見ã¤ã‘ã€æ¬¡ã«`column.mrk`データを見ã¦ã€ãれらã®ç¯„囲を読ã¿å§‹ã‚る場所ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’計算ã—ã¾ã™ã€‚スパースã®ãŸã‚ã€ä½™è¨ˆãªãƒ‡ãƒ¼ã‚¿ãŒèª­ã¿å–られるã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ClickHouseã¯ã€ã‚·ãƒ³ãƒ—ルãªãƒã‚¤ãƒ³ãƒˆã‚¯ã‚¨ãƒªã®é«˜è² è·ã«é©ã—ã¦ã„ã¾ã›ã‚“。ãªãœãªã‚‰ã€å„キーã®ãŸã‚ã«`index_granularity`行をæŒã¤å…¨ç¯„囲ãŒèª­ã¿å–られる必è¦ãŒã‚ã‚Šã€å„カラムã®ãŸã‚ã«åœ§ç¸®ãƒ–ロック全体ãŒãƒ‡ã‚³ãƒ³ãƒ—レッションã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚ç§ãŸã¡ã¯ã€å˜ä¸€ã®ã‚µãƒ¼ãƒã§æ•°å…†è¡Œã‚’管ç†ã—ã€ç´¢å¼•ã®ãŸã‚ã®ç›®ç«‹ãŸãªã„メモリ消費をå¯èƒ½ã«ã™ã‚‹ãŸã‚ã«ç´¢å¼•ã‚’スパースã«ã—ã¾ã—ãŸã€‚ã¾ãŸã€ä¸»ã‚­ãƒ¼ãŒã‚¹ãƒ‘ースã§ã‚ã‚‹ãŸã‚ã€ä¸€æ„ã§ã¯ã‚ã‚Šã¾ã›ã‚“:テーブルã¸ã®INSERT時ã«ã¯ã‚­ãƒ¼ãŒå­˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹ã‚’確èªã§ãã¾ã›ã‚“。テーブル内ã«åŒã˜ã‚­ãƒ¼ã‚’æŒã¤å¤šãã®è¡ŒãŒã‚ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +`MergeTree`ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ã€ãã®ãƒãƒƒãƒãŒä¸»ã‚­ãƒ¼é †ã«ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã€æ–°ã—ã„パーツを形æˆã—ã¾ã™ã€‚ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¹ãƒ¬ãƒƒãƒ‰ãŒã„ãã¤ã‹ã®ãƒ‘ーツをé¸ã³ã€ãれらをå˜ä¸€ã®ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸãƒ‘ーツã«çµ±åˆã™ã‚‹ä½œæ¥­ã‚’定期的ã«è¡Œã„ã€ãƒ‘ーツã®æ•°ã‚’比較的低ãä¿ã¡ã¾ã™ã€‚ã“ã‚Œã¯`MergeTree`ã¨å‘¼ã°ã‚Œã‚‹ç†ç”±ã§ã™ã€‚ã‚‚ã¡ã‚ã‚“ã€ãƒžãƒ¼ã‚¸ã¯ã€Œæ›¸ãè¾¼ã¿å¢—å¹…ã€ã«ã¤ãªãŒã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ‘ーツã¯ä¸å¤‰ã§ã‚り:作æˆã•ã‚Œã€å‰Šé™¤ã•ã‚Œã‚‹ã ã‘ã§ä¿®æ­£ã•ã‚Œã¾ã›ã‚“。SELECTãŒå®Ÿè¡Œã•ã‚Œã‚‹ã¨ãã¯ã€ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ãƒŠãƒƒãƒ—ショット(パーツã®ã‚»ãƒƒãƒˆï¼‰ãŒä¿æŒã•ã‚Œã¾ã™ã€‚マージ後ã€éšœå®³ç™ºç”Ÿå¾Œã®ãƒªã‚«ãƒãƒªãƒ¼ã‚’容易ã«ã™ã‚‹ãŸã‚ã«ä¸€æ™‚çš„ã«å¤ã„パーツもä¿æŒã•ã‚Œã¦ãŠã‚Šã€ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒ‘ーツãŒå£Šã‚Œã¦ã„ã‚‹ã¨è¦‹ãªã•ã‚Œã‚‹å ´åˆã¯ã€ãã®ã‚½ãƒ¼ã‚¹ãƒ‘ーツã§ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`MergeTree`ã¯LSMツリーã§ã¯ã‚ã‚Šã¾ã›ã‚“。ãªãœãªã‚‰ã€MEMTABLEãŠã‚ˆã³LOGã‚’å«ã¾ãªã„ãŸã‚ã§ã™ã€‚挿入ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ç›´æŽ¥æ›¸ãè¾¼ã¿ã¾ã™ã€‚ã“ã®å‹•ä½œã«ã‚ˆã‚Šã€MergeTreeã¯ãƒãƒƒãƒã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã®ã«ã‚ˆã‚Šé©ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€é »ç¹ã«å°‘é‡ã®è¡Œã‚’挿入ã™ã‚‹ã®ã¯MergeTreeã«ã¯ç†æƒ³çš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。例ãˆã°ã€æ•°è¡Œã‚’1秒ã”ã¨ã«æŒ¿å…¥ã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ãŒã€1秒ã«åƒå›žè¡Œã†ã“ã¨ã¯MergeTreeã«æœ€é©ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã—ã‹ã—ã€å°è¦æ¨¡ãªæŒ¿å…¥ã‚’å…‹æœã™ã‚‹ãŸã‚ã®éžåŒæœŸæŒ¿å…¥ãƒ¢ãƒ¼ãƒ‰ãŒã‚ã‚Šã¾ã™ã€‚ç§ãŸã¡ã¯ã€ç§ãŸã¡ã®ã‚¢ãƒ—リケーションã§ãƒãƒƒãƒã§ãƒ‡ãƒ¼ã‚¿ã‚’ã™ã§ã«æŒ¿å…¥ã—ã¦ã„ã‚‹ãŸã‚ã€ç°¡æ½”ã•ã®ãŸã‚ã«ã“ã®æ–¹æ³•ã‚’å–ã‚Šã¾ã—㟠+ +背景åˆä½µä¸­ã«è¿½åŠ ä½œæ¥­ã‚’è¡Œã†MergeTreeエンジンもã‚ã‚Šã¾ã™ã€‚例ã¨ã—ã¦ã¯ã€`CollapsingMergeTree`ã‚„`AggregatingMergeTree`ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã¯ç‰¹åˆ¥ãªæ›´æ–°ã‚µãƒãƒ¼ãƒˆã¨ã—ã¦æ‰±ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã¯å®Ÿéš›ã«ã¯æ›´æ–°ã§ã¯ãªãã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯é€šå¸¸ã€èƒŒæ™¯åˆä½µãŒå®Ÿè¡Œã•ã‚Œã‚‹æ™‚間を制御ã§ããšã€`MergeTree`テーブル内ã®ãƒ‡ãƒ¼ã‚¿ã¯ã»ã¨ã‚“ã©ã®å ´åˆã€å®Œå…¨ã«åˆä½µã•ã‚ŒãŸå½¢å¼ã§ã¯ãªãã€è¤‡æ•°ã®ãƒ‘ーツã§ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## レプリケーション {#replication} + +ClickHouseã®ãƒ¬ãƒ—リケーションã¯ãƒ†ãƒ¼ãƒ–ルã”ã¨ã«è¨­å®šã§ãã¾ã™ã€‚å˜ä¸€ã‚µãƒ¼ãƒã§ã„ãã¤ã‹ã®ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¨ãƒ¬ãƒ—リケートã•ã‚Œã¦ã„ãªã„テーブルをæŒã¤ã“ã¨ãŒã§ãã€ç•°ãªã‚‹æ–¹æ³•ã§ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルもæŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€äºŒé‡ãƒ¬ãƒ—リケーションをæŒã¤ãƒ†ãƒ¼ãƒ–ルã¨ä¸‰é‡ãƒ¬ãƒ—リケーションをæŒã¤åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã§ã™ã€‚ + +レプリケーションã¯ã€`ReplicatedMergeTree`ストレージエンジンã§å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚`ZooKeeper`内ã®ãƒ‘スã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã®ãƒ‘ラメータã¨ã—ã¦æŒ‡å®šã•ã‚Œã¾ã™ã€‚åŒã˜`ZooKeeper`パスをæŒã¤ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã¯ãŠäº’ã„ã®ãƒ¬ãƒ—リカã«ãªã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’åŒæœŸã—ã€ä¸€è²«æ€§ã‚’ä¿ã¡ã¾ã™ã€‚レプリカã¯ãƒ†ãƒ¼ãƒ–ルã®ä½œæˆã¾ãŸã¯å‰Šé™¤ã§å‹•çš„ã«è¿½åŠ ãŠã‚ˆã³å‰Šé™¤ã§ãã¾ã™ã€‚ + +レプリケーションã¯ã€éžåŒæœŸã®ãƒžãƒ«ãƒãƒžã‚¹ã‚¿ãƒ¼æ–¹å¼ã‚’使用ã—ã¾ã™ã€‚`ZooKeeper`ã¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’æŒã¤ä»»æ„ã®ãƒ¬ãƒ—リカã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã§ãã€ãã®ãƒ‡ãƒ¼ã‚¿ã¯ä»–ã®ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«éžåŒæœŸã§ãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚ClickHouseã¯UPDATEをサãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ãŸã‚ã€ãƒ¬ãƒ—リケーションã¯ç«¶åˆã—ã¾ã›ã‚“。デフォルトã§ã¯ã€æŒ¿å…¥ã®ã‚¯ã‚©ãƒ¼ãƒ©ãƒ ã«ã‚ˆã‚‹ç¢ºèªãŒãªã„ãŸã‚ã€æ–°ã—ã挿入ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯ãƒŽãƒ¼ãƒ‰ã®éšœå®³ãŒç™ºç”Ÿã—ãŸå ´åˆã«å¤±ã‚れるå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚挿入クォーラムã¯ã€`insert_quorum`設定を使用ã—ã¦æœ‰åŠ¹ã«ã§ãã¾ã™ã€‚ + +レプリケーションã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯ZooKeeperã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚実行ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®ãƒªã‚¹ãƒˆãƒ¬ãƒ—リケーションログãŒã‚ã‚Šã¾ã™ã€‚アクションã¯ã€ãƒ‘ーツã®å–å¾—ã€ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ã€ãƒ‘ーティションã®å‰Šé™¤ãªã©ã§ã™ã€‚å„レプリカã¯ã€ãƒ¬ãƒ—リケーションログをキューã«ã‚³ãƒ”ーã—ã€ã‚­ãƒ¥ãƒ¼ã‹ã‚‰ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã—ã¾ã™ã€‚例ãˆã°ã€æŒ¿å…¥æ™‚ã«ã¯ã€Œãƒ‘ーツをå–å¾—ã€ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒãƒ­ã‚°ã«ä½œæˆã•ã‚Œã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã¯ãã®ãƒ‘ーツをダウンロードã—ã¾ã™ã€‚マージã¯ã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§ãƒã‚¤ãƒˆä¸€è‡´ã®çµæžœã‚’å¾—ã‚‹ãŸã‚ã«èª¿æ•´ã•ã‚Œã¦ã„ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ‘ーツã¯ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§åŒã˜ã‚ˆã†ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚リーダーã®ä¸€ã¤ã¯æœ€åˆã«æ–°ã—ã„マージを開始ã—ã€ã€Œãƒžãƒ¼ã‚¸ãƒ‘ーツã€ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’ログã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚複数ã®ãƒ¬ãƒ—リカ(ã¾ãŸã¯ã™ã¹ã¦ï¼‰ãŒåŒæ™‚ã«ãƒªãƒ¼ãƒ€ãƒ¼ã«ãªã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚レプリカãŒãƒªãƒ¼ãƒ€ãƒ¼ã«ãªã‚‰ãªã„よã†ã«ã€`merge_tree`設定ã®`replicated_can_become_leader`を使用ã—ã¦é˜²ãã“ã¨ãŒã§ãã¾ã™ã€‚リーダーã¯èƒŒæ™¯åˆä½µã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’担当ã—ã¾ã™ã€‚ + +レプリケーションã¯ç‰©ç†çš„ã§ã™ï¼šã‚¯ã‚¨ãƒªã§ã¯ãªãã€åœ§ç¸®ã•ã‚ŒãŸéƒ¨åˆ†ã ã‘ãŒãƒŽãƒ¼ãƒ‰é–“ã§è»¢é€ã•ã‚Œã¾ã™ã€‚マージã¯é€šå¸¸ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚³ã‚¹ãƒˆã‚’削減ã—ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å¢—幅を回é¿ã™ã‚‹ãŸã‚ã«å„レプリカã§ç‹¬ç«‹ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚レプリケーションã®é…ã‚ŒãŒå¤§ãã„å ´åˆã«é™ã‚Šã€å¤§ããマージã•ã‚ŒãŸãƒ‘ーツãŒãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å†…ã§é€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +ã¾ãŸã€å„レプリカã¯ãã®çŠ¶æ…‹ã‚’ZooKeeperã«ã‚»ãƒƒãƒˆã•ã‚Œã€ãれらã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚‚å«ã¾ã‚Œã‚‹ã€‚ローカルファイルシステムã§ã®çŠ¶æ…‹ãŒZooKeeperã§ã®å‚照状態ã¨ç•°ãªã‚‹å ´åˆã€ãã®ãƒ¬ãƒ—リカã¯ä»–ã®ãƒ¬ãƒ—リカã‹ã‚‰æ¬ è½ã—ãŸã‚Šç ´å£Šã•ã‚ŒãŸãƒ‘ーツをダウンロードã—ã¦ä¸€è²«æ€§ã‚’回復ã—ã¾ã™ã€‚予期ã—ãªã„ã€ã‚‚ã—ãã¯ç ´æã—ãŸãƒ‡ãƒ¼ã‚¿ãŒãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ä¸Šã«ã‚ã‚‹å ´åˆã€ClickHouseã¯ãれを削除ã›ãšã€åˆ¥ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ç§»å‹•ã—忘れã¾ã™ã€‚ + +:::note +ClickHouseクラスターã¯ç‹¬ç«‹ã—ãŸã‚·ãƒ£ãƒ¼ãƒ‰ã§æ§‹æˆã•ã‚Œã¦ãŠã‚Šã€ãã‚Œãžã‚Œã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«ã¯ãƒ¬ãƒ—リカãŒã‚ã‚Šã¾ã™ã€‚クラスターã¯**エラスティック**ã§ã¯ãªã„ãŸã‚ã€æ–°ã—ã„シャードを追加ã—ã¦ã‚‚ã€ã‚·ãƒ£ãƒ¼ãƒ‰é–“ã§ãƒ‡ãƒ¼ã‚¿ãŒè‡ªå‹•çš„ã«å†åˆ†æ•£ã•ã‚Œã¾ã›ã‚“。代ã‚ã‚Šã«ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®è² è·ãŒå‡ç­‰ã«èª¿æ•´ã•ã‚Œã‚‹ã¨æƒ³å®šã•ã‚Œã¾ã™ã€‚å°ã•ãªã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã€ä¾‹ãˆã°10ノード程度ã§ã¯ã“ã®å®Ÿè£…ã¯ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãŒã—ã‚„ã™ã„ã§ã™ãŒã€ãƒ—ロダクションã§ä½¿ç”¨ã™ã‚‹æ•°ç™¾ãƒŽãƒ¼ãƒ‰ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã«å¯¾ã—ã¦ã€ã“ã®ã‚¢ãƒ—ローãƒã¯å¤§ããªæ¬ ç‚¹ã«ãªã‚Šã¾ã™ã€‚クラスター全体ã«åºƒãŒã‚Šã€è‡ªå‹•çš„ã«ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼é–“ã§åˆ†å‰²ã—ãƒãƒ©ãƒ³ã‚¹ã•ã‚Œã‚‹å‹•çš„ã«ãƒ¬ãƒ—リケートã•ã‚Œã‚‹ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルエンジンを実装ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: diff --git a/docs/ja/development/build-cross-arm.md b/docs/ja/development/build-cross-arm.md new file mode 100644 index 00000000000..df243f8ae96 --- /dev/null +++ b/docs/ja/development/build-cross-arm.md @@ -0,0 +1,10 @@ +--- +slug: /ja/development/build-cross-arm +sidebar_position: 67 +title: Linux上ã§AARCH64 (ARM64)アーキテクãƒãƒ£ç”¨ã«ClickHouseをビルドã™ã‚‹æ–¹æ³• +sidebar_label: AARCH64 (ARM64)用ビルド +--- + +AArch64マシンを使用ã—ã¦ãŠã‚Šã€AArch64用ã«ClickHouseをビルドã—ãŸã„å ´åˆã¯ã€é€šå¸¸é€šã‚Šã«ãƒ“ルドã—ã¦ãã ã•ã„。 + +x86_64マシンを使用ã—ã¦ãŠã‚Šã€AArch64用ã«ã‚¯ãƒ­ã‚¹ã‚³ãƒ³ãƒ‘イルã—ãŸã„å ´åˆã¯ã€`cmake`ã«ä»¥ä¸‹ã®ãƒ•ãƒ©ã‚°ã‚’追加ã—ã¦ãã ã•ã„: `-DCMAKE_TOOLCHAIN_FILE=cmake/linux/toolchain-aarch64.cmake` diff --git a/docs/ja/development/build-cross-loongarch.md b/docs/ja/development/build-cross-loongarch.md new file mode 100644 index 00000000000..e58c296ecd6 --- /dev/null +++ b/docs/ja/development/build-cross-loongarch.md @@ -0,0 +1,31 @@ +--- +slug: /ja/development/build-cross-loongarch +sidebar_position: 70 +title: LoongArch64アーキテクãƒãƒ£å‘ã‘ã«Linuxã§ClickHouseをビルドã™ã‚‹æ–¹æ³• +sidebar_label: LoongArch64å‘ã‘Linuxã§ã®ãƒ“ルド +--- + +執筆時点(2024/03/15)ã§ã¯ã€loongarchå‘ã‘ã®ãƒ“ルドã¯éžå¸¸ã«ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ã™ã¹ã¦ã®æ©Ÿèƒ½ã‚’有効ã«ã§ãã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +ã“ã‚Œã¯ã€Linuxマシンを使用ã—ã¦ã€LoongArch64 CPUアーキテクãƒãƒ£ã®åˆ¥ã®Linuxマシンã§å®Ÿè¡Œã™ã‚‹`clickhouse`ãƒã‚¤ãƒŠãƒªã‚’ビルドã—ãŸã„å ´åˆã®ã‚¬ã‚¤ãƒ‰ã§ã™ã€‚ã“ã‚Œã¯ã€Linuxサーãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã‚‹ç¶™ç¶šçš„インテグレーションãƒã‚§ãƒƒã‚¯ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚ + +LoongArch64å‘ã‘ã®ã‚¯ãƒ­ã‚¹ãƒ“ルドã¯ã€[ビルド手順](../development/build.md)ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ã¾ãšã¯ãã‚Œã«å¾“ã£ã¦ãã ã•ã„。 + +## Clang-18ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +Ubuntuã¾ãŸã¯Debianã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã«å¯¾ã—ã¦ã€https://apt.llvm.org/ ã®æ‰‹é †ã«å¾“ã†ã‹ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ +``` +sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" +``` + +## ClickHouseã®ãƒ“ルド {#build-clickhouse} + +ビルドã«å¿…è¦ãªllvmã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯18.1.0以上ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +``` bash +cd ClickHouse +mkdir build-loongarch64 +CC=clang-18 CXX=clang++-18 cmake . -Bbuild-loongarch64 -G Ninja -DCMAKE_TOOLCHAIN_FILE=cmake/linux/toolchain-loongarch64.cmake +ninja -C build-loongarch64 +``` + +ã“ã®çµæžœã¨ã—ã¦å¾—られるãƒã‚¤ãƒŠãƒªã¯ã€LoongArch64 CPUアーキテクãƒãƒ£ã‚’æ­è¼‰ã—ãŸLinuxã§ã®ã¿å®Ÿè¡Œã§ãã¾ã™ã€‚ diff --git a/docs/ja/development/build-cross-osx.md b/docs/ja/development/build-cross-osx.md new file mode 100644 index 00000000000..55e41e2a1a2 --- /dev/null +++ b/docs/ja/development/build-cross-osx.md @@ -0,0 +1,63 @@ +--- +slug: /ja/development/build-cross-osx +sidebar_position: 66 +title: Linux上ã§macOS用ClickHouseをビルドã™ã‚‹æ–¹æ³• +sidebar_label: Linux上ã§macOS用ã«ãƒ“ルド +--- + +ã“ã‚Œã¯ã€Linuxマシンを使用ã—ã¦OS Xã§å®Ÿè¡Œã•ã‚Œã‚‹`clickhouse`ãƒã‚¤ãƒŠãƒªã‚’ビルドã—ãŸã„å ´åˆã®æ‰‹é †ã§ã™ã€‚ ã“ã‚Œã¯Linuxサーãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã‚‹ç¶™ç¶šçš„ãªã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒã‚§ãƒƒã‚¯ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚ macOS上ã§ç›´æŽ¥ClickHouseをビルドã—ãŸã„å ´åˆã¯ã€[別ã®æ‰‹é †](../development/build-osx.md)ã«é€²ã‚“ã§ãã ã•ã„。 + +macOS用ã®ã‚¯ãƒ­ã‚¹ãƒ“ルドã¯ã€[ビルド手順](../development/build.md)ã«åŸºã¥ã„ã¦ã„ã¾ã™ã®ã§ã€æœ€åˆã«ãã‚Œã«å¾“ã£ã¦ãã ã•ã„。 + +以下ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€`x86_64` macOS用ã«ClickHouseをビルドã™ã‚‹ãŸã‚ã®æ‰‹é †ã‚’説明ã—ã¾ã™ã€‚ARMアーキテクãƒãƒ£ã‚’対象ã¨ã™ã‚‹å ´åˆã¯ã€ã™ã¹ã¦ã®`x86_64`ã‚’`aarch64`ã«ç½®ãæ›ãˆã¦ãã ã•ã„。ãŸã¨ãˆã°ã€æ‰‹é †å†…ã®`x86_64-apple-darwin`ã‚’`aarch64-apple-darwin`ã«ç½®ãæ›ãˆã¾ã™ã€‚ + +## clang-18をインストールã™ã‚‹ + +Ubuntuã¾ãŸã¯Debianセットアップã«åˆã£ãŸhttps://apt.llvm.org/ã®æŒ‡ç¤ºã«å¾“ã£ã¦ãã ã•ã„。 ãŸã¨ãˆã°ã€Bionicã®ã‚³ãƒžãƒ³ãƒ‰ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +```bash +sudo echo "deb [trusted=yes] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-17 main" >> /etc/apt/sources.list +sudo apt-get install clang-18 +``` + +## クロスコンパイルツールセットをインストールã™ã‚‹ {#install-cross-compilation-toolset} + +`cctools`をインストールã™ã‚‹ãƒ‘スを${CCTOOLS}ã¨ã—ã¦è¨˜æ†¶ã—ã¦ãŠãã¾ã—ょㆠ+ +```bash +mkdir ~/cctools +export CCTOOLS=$(cd ~/cctools && pwd) +cd ${CCTOOLS} + +git clone https://github.com/tpoechtrager/apple-libtapi.git +cd apple-libtapi +git checkout 15dfc2a8c9a2a89d06ff227560a69f5265b692f9 +INSTALLPREFIX=${CCTOOLS} ./build.sh +./install.sh +cd .. + +git clone https://github.com/tpoechtrager/cctools-port.git +cd cctools-port/cctools +git checkout 2a3e1c2a6ff54a30f898b70cfb9ba1692a55fad7 +./configure --prefix=$(readlink -f ${CCTOOLS}) --with-libtapi=$(readlink -f ${CCTOOLS}) --target=x86_64-apple-darwin +make install +``` + +ã¾ãŸã€macOS X SDKを作業ツリーã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```bash +cd ClickHouse/cmake/toolchain/darwin-x86_64 +curl -L 'https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz' | tar xJ --strip-components=1 +``` + +## ClickHouseをビルドã™ã‚‹ {#build-clickhouse} + +```bash +cd ClickHouse +mkdir build-darwin +cd build-darwin +CC=clang-18 CXX=clang++-18 cmake -DCMAKE_AR:FILEPATH=${CCTOOLS}/bin/x86_64-apple-darwin-ar -DCMAKE_INSTALL_NAME_TOOL=${CCTOOLS}/bin/x86_64-apple-darwin-install_name_tool -DCMAKE_RANLIB:FILEPATH=${CCTOOLS}/bin/x86_64-apple-darwin-ranlib -DLINKER_NAME=${CCTOOLS}/bin/x86_64-apple-darwin-ld -DCMAKE_TOOLCHAIN_FILE=cmake/darwin/toolchain-x86_64.cmake .. +ninja +``` + +生æˆã•ã‚Œã‚‹ãƒã‚¤ãƒŠãƒªã¯Mach-O実行形å¼ã§ã€Linux上ã§ã¯å®Ÿè¡Œã§ãã¾ã›ã‚“。 diff --git a/docs/ja/development/build-cross-riscv.md b/docs/ja/development/build-cross-riscv.md new file mode 100644 index 00000000000..b571b79a3b3 --- /dev/null +++ b/docs/ja/development/build-cross-riscv.md @@ -0,0 +1,30 @@ +--- +slug: /ja/development/build-cross-riscv +sidebar_position: 68 +title: Linuxã§RISC-V 64アーキテクãƒãƒ£ç”¨ClickHouseをビルドã™ã‚‹æ–¹æ³• +sidebar_label: RISC-V 64用Linuxã§ã®ãƒ“ルド +--- + +執筆時点(2021å¹´11月11日)ã§ã¯ã€RISC-V用ã®ãƒ“ルドã¯éžå¸¸ã«ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã¨è€ƒãˆã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ã™ã¹ã¦ã®æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +ã“ã‚Œã¯ã€LinuxマシンをæŒã£ã¦ã„ã¦ã€ãã®ãƒžã‚·ãƒ³ã§RISC-V 64 CPUアーキテクãƒãƒ£ã‚’å‚™ãˆãŸåˆ¥ã®Linuxマシンã§å®Ÿè¡Œã™ã‚‹`clickhouse`ãƒã‚¤ãƒŠãƒªã‚’ビルドã—ãŸã„å ´åˆã®æ‰‹é †ã§ã™ã€‚ã“ã‚Œã¯Linuxサーãƒãƒ¼ã§å®Ÿè¡Œã•ã‚Œã‚‹ç¶™ç¶šçš„インテグレーションãƒã‚§ãƒƒã‚¯ç”¨ã«æ„図ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +RISC-V 64用ã®ã‚¯ãƒ­ã‚¹ãƒ“ルドã¯[ビルド手順](../development/build.md)ã«åŸºã¥ã„ã¦ã„ã‚‹ãŸã‚ã€ã¾ãšãã‚Œã«å¾“ã£ã¦ãã ã•ã„。 + +## Clang-18ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +ã‚ãªãŸã®Ubuntuã¾ãŸã¯Debian環境ã«åˆã‚ã›ã¦ã€https://apt.llvm.org/ ã®æŒ‡ç¤ºã«å¾“ã£ã¦ãã ã•ã„。ã¾ãŸã¯ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ +``` +sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" +``` + +## ClickHouseをビルドã™ã‚‹ {#build-clickhouse} + +``` bash +cd ClickHouse +mkdir build-riscv64 +CC=clang-18 CXX=clang++-18 cmake . -Bbuild-riscv64 -G Ninja -DCMAKE_TOOLCHAIN_FILE=cmake/linux/toolchain-riscv64.cmake -DGLIBC_COMPATIBILITY=OFF -DENABLE_LDAP=OFF -DOPENSSL_NO_ASM=ON -DENABLE_JEMALLOC=ON -DENABLE_PARQUET=OFF -DENABLE_GRPC=OFF -DENABLE_HDFS=OFF -DENABLE_MYSQL=OFF +ninja -C build-riscv64 +``` + +生æˆã•ã‚ŒãŸãƒã‚¤ãƒŠãƒªã¯RISC-V 64 CPUアーキテクãƒãƒ£ã‚’æŒã¤Linuxã§ã®ã¿å®Ÿè¡Œå¯èƒ½ã§ã™ã€‚ diff --git a/docs/ja/development/build-cross-s390x.md b/docs/ja/development/build-cross-s390x.md new file mode 100644 index 00000000000..93a541f3e97 --- /dev/null +++ b/docs/ja/development/build-cross-s390x.md @@ -0,0 +1,207 @@ +--- +slug: /ja/development/build-cross-s390x +sidebar_position: 69 +title: Linuxã§ã®ClickHouseã®ãƒ“ルドã€å®Ÿè¡Œã€ãŠã‚ˆã³ãƒ‡ãƒãƒƒã‚°ï¼ˆs390x用ã€zLinux) +sidebar_label: Linuxã§ã®s390x(zLinux)用ビルド +--- + +執筆時点(2024å¹´5月)ã§ã¯ã€s390xプラットフォームã®ã‚µãƒãƒ¼ãƒˆã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªã‚‚ã®ã¨ã•ã‚Œã¦ãŠã‚Šã€ä¸€éƒ¨æ©Ÿèƒ½ã¯s390xã§ã¯ç„¡åŠ¹åŒ–ã¾ãŸã¯ä¸å…·åˆãŒç™ºç”Ÿã—ã¦ã„ã¾ã™ã€‚ + +## s390xå‘ã‘ClickHouseã®ãƒ“ルド + +s390xã«ã¯2ã¤ã®OpenSSL関連ã®ãƒ“ルドオプションãŒã‚ã‚Šã¾ã™ï¼š +- デフォルトã§ã¯ã€OpenSSLã¯s390x上ã§å…±æœ‰ãƒ©ã‚¤ãƒ–ラリã¨ã—ã¦ãƒ“ルドã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ä»–ã®ã™ã¹ã¦ã®ãƒ—ラットフォームã¨ç•°ãªã‚Šã€OpenSSLã¯é™çš„ライブラリã¨ã—ã¦ãƒ“ルドã•ã‚Œã¾ã™ã€‚ +- OpenSSLã‚’é™çš„ライブラリã¨ã—ã¦ãƒ“ルドã™ã‚‹ã«ã¯ã€CMakeã«`-DENABLE_OPENSSL_DYNAMIC=0`を渡ã—ã¾ã™ã€‚ + +ã“れらã®æŒ‡ç¤ºã¯ã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ãŒx86_64ã§ã‚ã‚Šã€[ビルド手順](../development/build.md)ã«åŸºã¥ã„ã¦ãƒã‚¤ãƒ†ã‚£ãƒ–ã«ãƒ“ルドã™ã‚‹ãŸã‚ã«å¿…è¦ãªãƒ„ールをã™ã¹ã¦å‚™ãˆã¦ã„ã‚‹ã¨æƒ³å®šã—ã¦ã„ã¾ã™ã€‚ã¾ãŸã€ãƒ›ã‚¹ãƒˆãŒUbuntu 22.04ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ãŒã€ä»¥ä¸‹ã®æŒ‡ç¤ºã¯Ubuntu 20.04ã§ã‚‚動作ã™ã‚‹ã¯ãšã§ã™ã€‚ + +ãƒã‚¤ãƒ†ã‚£ãƒ–ã«ãƒ“ルドã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ„ールをインストールã™ã‚‹ã“ã¨ã«åŠ ãˆã¦ã€ä»¥ä¸‹ã®è¿½åŠ ãƒ‘ッケージãŒå¿…è¦ã§ã™ï¼š + +```bash +apt-get install binutils-s390x-linux-gnu libc6-dev-s390x-cross gcc-s390x-linux-gnu binfmt-support qemu-user-static +``` + +Rustコードをクロスコンパイルã—ãŸã„å ´åˆã¯ã€s390x用ã®Rustクロスコンパイルターゲットをインストールã—ã¾ã™ï¼š + +```bash +rustup target add s390x-unknown-linux-gnu +``` + +s390xã®ãƒ“ルドã«ã¯moldリンカを使用ã—ã¾ã™ã€‚https://github.com/rui314/mold/releases/download/v2.0.0/mold-2.0.0-x86_64-linux.tar.gz ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã€`$PATH`ã«é…ç½®ã—ã¦ãã ã•ã„。 + +s390xå‘ã‘ã«ãƒ“ルドã™ã‚‹ã«ã¯ï¼š + +```bash +cmake -DCMAKE_TOOLCHAIN_FILE=cmake/linux/toolchain-s390x.cmake .. +ninja +``` + +## 実行 + +ビルドãŒå®Œäº†ã—ãŸã‚‰ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã§ãƒã‚¤ãƒŠãƒªã‚’実行ã§ãã¾ã™ï¼š + +```bash +qemu-s390x-static -L /usr/s390x-linux-gnu ./clickhouse +``` + +## デãƒãƒƒã‚° + +LLDBをインストールã—ã¾ã™ï¼š + +```bash +apt-get install lldb-15 +``` + +s390xã®å®Ÿè¡Œãƒ•ã‚¡ã‚¤ãƒ«ã‚’デãƒãƒƒã‚°ã™ã‚‹ã«ã¯ã€QEMUã®ãƒ‡ãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰ã§clickhouseを実行ã—ã¾ã™ï¼š + +```bash +qemu-s390x-static -g 31338 -L /usr/s390x-linux-gnu ./clickhouse +``` + +別ã®ã‚·ã‚§ãƒ«ã§LLDBを実行ã—ã¦ã‚¢ã‚¿ãƒƒãƒã—ã¾ã™ã€‚``ã¨``を環境ã«åˆã£ãŸå€¤ã«ç½®ãæ›ãˆã¦ãã ã•ã„。 + +```bash +lldb-15 +(lldb) target create ./clickhouse +Current executable set to '//ClickHouse//programs/clickhouse' (s390x). +(lldb) settings set target.source-map //ClickHouse +(lldb) gdb-remote 31338 +Process 1 stopped +* thread #1, stop reason = signal SIGTRAP + frame #0: 0x0000004020e74cd0 +-> 0x4020e74cd0: lgr %r2, %r15 + 0x4020e74cd4: aghi %r15, -160 + 0x4020e74cd8: xc 0(8,%r15), 0(%r15) + 0x4020e74cde: brasl %r14, 275429939040 +(lldb) b main +Breakpoint 1: 9 locations. +(lldb) c +Process 1 resuming +Process 1 stopped +* thread #1, stop reason = breakpoint 1.1 + frame #0: 0x0000004005cd9fc0 clickhouse`main(argc_=1, argv_=0x0000004020e594a8) at main.cpp:450:17 + 447 #if !defined(FUZZING_MODE) + 448 int main(int argc_, char ** argv_) + 449 { +-> 450 inside_main = true; + 451 SCOPE_EXIT({ inside_main = false; }); + 452 + 453 /// PHDR cache is required for query profiler to work reliably +``` + +## Visual Studio Codeçµ±åˆ + +- ビジュアルデãƒãƒƒã‚°ã«ã¯[CodeLLDB](https://github.com/vadimcn/vscode-lldb)拡張機能ãŒå¿…è¦ã§ã™ã€‚ +- [Command Variable](https://github.com/rioj7/command-variable)拡張機能を使用ã™ã‚‹ã¨ã€[CMake Variants](https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/variants.md)を使用ã—ã¦å‹•çš„ãªèµ·å‹•ã‚’助ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- LLVMをインストールã—ã¦ã„ã‚‹ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã‚’å¿…ãšè¨­å®šã—ã¦ãã ã•ã„(例:`"lldb.library": "/usr/lib/x86_64-linux-gnu/liblldb-15.so"`)。 +- èµ·å‹•å‰ã«å¿…ãšãƒ‡ãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰ã§clickhouse実行ファイルを実行ã—ã¦ãã ã•ã„。(ã“れを自動化ã™ã‚‹`preLaunchTask`を作æˆã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚) + +### 例ã®è¨­å®š +#### cmake-variants.yaml +```yaml +buildType: + default: relwithdebinfo + choices: + debug: + short: Debug + long: Emit debug information + buildType: Debug + release: + short: Release + long: Optimize generated code + buildType: Release + relwithdebinfo: + short: RelWithDebInfo + long: Release with Debug Info + buildType: RelWithDebInfo + tsan: + short: MinSizeRel + long: Minimum Size Release + buildType: MinSizeRel + +toolchain: + default: default + description: Select toolchain + choices: + default: + short: x86_64 + long: x86_64 + s390x: + short: s390x + long: s390x + settings: + CMAKE_TOOLCHAIN_FILE: cmake/linux/toolchain-s390x.cmake +``` + +#### launch.json +```json +{ + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "custom", + "name": "(lldb) Launch s390x with qemu", + "targetCreateCommands": ["target create ${command:cmake.launchTargetPath}"], + "processCreateCommands": ["gdb-remote 2159"], + "preLaunchTask": "Run ClickHouse" + } + ] +} +``` + +#### settings.json +ç•°ãªã‚‹ãƒ“ルドを`build`フォルダ内ã®ç•°ãªã‚‹ã‚µãƒ–フォルダã«é…ç½®ã™ã‚‹è¨­å®šã§ã™ã€‚ +```json +{ + "cmake.buildDirectory": "${workspaceFolder}/build/${buildKitVendor}-${buildKitVersion}-${variant:toolchain}-${variant:buildType}", + "lldb.library": "/usr/lib/x86_64-linux-gnu/liblldb-15.so" +} +``` + +#### run-debug.sh +```sh +#! /bin/sh +echo 'Starting debugger session' +cd $1 +qemu-s390x-static -g 2159 -L /usr/s390x-linux-gnu $2 $3 $4 +``` + +#### tasks.json +`tmp`フォルダ内ã§`server`モードã§ã‚³ãƒ³ãƒ‘イルã•ã‚ŒãŸå®Ÿè¡Œãƒ•ã‚¡ã‚¤ãƒ«ã‚’ã€`programs/server/config.xml`ã®è¨­å®šã§å®Ÿè¡Œã™ã‚‹ã‚¿ã‚¹ã‚¯ã‚’定義ã—ã¾ã™ã€‚ +```json +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Run ClickHouse", + "type": "shell", + "isBackground": true, + "command": "${workspaceFolder}/.vscode/run-debug.sh", + "args": [ + "${command:cmake.launchTargetDirectory}/tmp", + "${command:cmake.launchTargetPath}", + "server", + "--config-file=${workspaceFolder}/programs/server/config.xml" + ], + "problemMatcher": [ + { + "pattern": [ + { + "regexp": ".", + "file": 1, + "location": 2, + "message": 3 + } + ], + "background": { + "activeOnStart": true, + "beginsPattern": "^Starting debugger session", + "endsPattern": ".*" + } + } + ] + } + ] +} +``` diff --git a/docs/ja/development/build-osx.md b/docs/ja/development/build-osx.md new file mode 100644 index 00000000000..f661d8a3b11 --- /dev/null +++ b/docs/ja/development/build-osx.md @@ -0,0 +1,137 @@ +--- +slug: /ja/development/build-osx +sidebar_position: 65 +sidebar_label: macOSã§ãƒ“ルド +title: macOSã§ClickHouseをビルドã™ã‚‹æ–¹æ³• +description: macOSå‘ã‘ã«ClickHouseをビルドã™ã‚‹æ–¹æ³• +--- + +:::info ClickHouseを自分ã§ãƒ“ルドã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“ï¼ +[クイックスタート](https://clickhouse.com/#quick-start)ã«è¨˜è¼‰ã•ã‚Œã¦ã„るよã†ã«ã€äº‹å‰ã«ãƒ“ルドã•ã‚ŒãŸClickHouseをインストールã§ãã¾ã™ã€‚**macOS (Intel)** ã¾ãŸã¯ **macOS (Apple silicon)** ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„。 +::: + +ã“ã®ãƒ“ルドã¯macOS 10.15 (Catalina)以é™ã®x86_64 (Intel)ãŠã‚ˆã³arm64 (Apple Silicon)ã§ã€Homebrewã®æ¨™æº–Clangを使用ã—ã¦å‹•ä½œã—ã¾ã™ã€‚ + +:::note +Appleã®XCode `apple-clang`ã§ã‚‚コンパイルã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ãŒã€ã“ã‚Œã¯å¼·ã推奨ã•ã‚Œã¾ã›ã‚“。 +::: + +## Homebrewをインストールã™ã‚‹ {#install-homebrew} + +ã¾ãšã€[Homebrew](https://brew.sh/)をインストールã—ã¦ãã ã•ã„。 + +## Appleã®Clangを使用ã™ã‚‹å ´åˆï¼ˆéžæŽ¨å¥¨ï¼‰ï¼šXCodeãŠã‚ˆã³ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ„ールã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« {#install-xcode-and-command-line-tools} + +App Storeã‹ã‚‰æœ€æ–°ã®[XCode](https://apps.apple.com/am/app/xcode/id497799835?mt=12)をインストールã—ã¾ã™ã€‚ + +å°‘ãªãã¨ã‚‚一度開ã„ã¦ã€ã‚¨ãƒ³ãƒ‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ©ã‚¤ã‚»ãƒ³ã‚¹å¥‘ç´„ã«åŒæ„ã—ã€è‡ªå‹•çš„ã«å¿…è¦ãªã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’インストールã—ã¾ã™ã€‚ + +次ã«ã€æœ€æ–°ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ„ールãŒã‚·ã‚¹ãƒ†ãƒ ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦é¸æŠžã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„: + +``` bash +sudo rm -rf /Library/Developer/CommandLineTools +sudo xcode-select --install +``` + +## å¿…è¦ãªã‚³ãƒ³ãƒ‘イラã€ãƒ„ールã€ãŠã‚ˆã³ãƒ©ã‚¤ãƒ–ラリã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« {#install-required-compilers-tools-and-libraries} + +``` bash +brew update +brew install ccache cmake ninja libtool gettext llvm gcc binutils grep findutils nasm +``` + +## ClickHouseソースã®ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆ {#checkout-clickhouse-sources} + +``` bash +git clone --recursive git@github.com:ClickHouse/ClickHouse.git +# ...ã¾ãŸã¯ã€https://github.com/ClickHouse/ClickHouse.git をリãƒã‚¸ãƒˆãƒªURLã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +``` + +Appleã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãªãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚’使用ã—ã¦ã„ã¾ã™ã€‚通常ã€ã“ã‚Œã¯ã‚³ãƒ³ãƒ‘イルã«å½±éŸ¿ã¯ã‚ã‚Šã¾ã›ã‚“(特ã«ã‚¹ã‚¯ãƒ©ãƒƒãƒãƒ¡ã‚¤ã‚¯ã¯å•é¡Œãªã動作ã—ã¾ã™ï¼‰ãŒã€`git mv`ã®ã‚ˆã†ãªãƒ•ã‚¡ã‚¤ãƒ«æ“作を混乱ã•ã›ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚macOSã§æœ¬æ ¼çš„ãªé–‹ç™ºã‚’è¡Œã†å ´åˆã€ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ãŒã‚±ãƒ¼ã‚¹ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãªãƒ‡ã‚£ã‚¹ã‚¯ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。ãŸã¨ãˆã°ã€[ã“れらã®æ‰‹é †](https://brianboyko.medium.com/a-case-sensitive-src-folder-for-mac-programmers-176cc82a3830)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## ClickHouseをビルドã™ã‚‹ {#build-clickhouse} + +Homebrewã®æ¨™æº–Clangコンパイラを使用ã—ã¦ãƒ“ルドã™ã‚‹å ´åˆï¼ˆå”¯ä¸€ã®**推奨ã•ã‚Œã‚‹**方法): + +``` bash +cd ClickHouse +mkdir build +export PATH=$(brew --prefix llvm)/bin:$PATH +cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=$(brew --prefix llvm)/bin/clang -DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++ -S . -B build +cmake --build build +# çµæžœã¨ã—ã¦ç”Ÿæˆã•ã‚Œã‚‹ãƒã‚¤ãƒŠãƒªã¯æ¬¡ã®å ´æ‰€ã«ä½œæˆã•ã‚Œã¾ã™: build/programs/clickhouse +``` + +XCodeã®ãƒã‚¤ãƒ†ã‚£ãƒ–AppleClangコンパイラを使用ã—ã¦XCode IDEã§ãƒ“ルドã™ã‚‹å ´åˆï¼ˆã“ã®ã‚ªãƒ—ションã¯é–‹ç™ºãƒ“ルドã¨ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã®ã¿ã§ã‚ã‚Šã€ã‚ãªãŸãŒä½•ã‚’ã—ã¦ã„ã‚‹ã‹ã«ã¤ã„ã¦ç†è§£ãŒã‚ã‚‹å ´åˆã‚’除ãã€**推奨ã•ã‚Œã¾ã›ã‚“**): + +``` bash +cd ClickHouse +rm -rf build +mkdir build +cd build +XCODE_IDE=1 ALLOW_APPLECLANG=1 cmake -G Xcode -DCMAKE_BUILD_TYPE=Debug -DENABLE_JEMALLOC=OFF .. +cmake --open . +# ...次ã«ã€XCode IDEã§ALL_BUILDスキームをé¸æŠžã—ã€ãƒ“ルドプロセスを開始ã—ã¾ã™ã€‚ +# çµæžœã¨ã—ã¦ç”Ÿæˆã•ã‚Œã‚‹ãƒã‚¤ãƒŠãƒªã¯æ¬¡ã®å ´æ‰€ã«ä½œæˆã•ã‚Œã¾ã™: ./programs/Debug/clickhouse +``` + +## 注æ„事項 {#caveats} + +`clickhouse-server`を実行ã™ã‚‹äºˆå®šãŒã‚ã‚‹å ´åˆã€ã‚·ã‚¹ãƒ†ãƒ ã®`maxfiles`変数を増やã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +`sudo`を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +ãã®ãŸã‚ã«ã¯ã€æ¬¡ã®å†…容ã§`/Library/LaunchDaemons/limit.maxfiles.plist`ファイルを作æˆã—ã¾ã™: + +``` xml + + + + + Label + limit.maxfiles + ProgramArguments + + launchctl + limit + maxfiles + 524288 + 524288 + + RunAtLoad + + ServiceIPC + + + +``` + +ファイルã«æ­£ã—ã„権é™ã‚’与ãˆã¾ã™: + +``` bash +sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist +``` + +ファイルãŒæ­£ã—ã„ã“ã¨ã‚’確èªã—ã¾ã™: + +``` bash +plutil /Library/LaunchDaemons/limit.maxfiles.plist +``` + +ファイルをロードã—ã¾ã™ï¼ˆã¾ãŸã¯å†èµ·å‹•ã—ã¾ã™ï¼‰: + +``` bash +sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist +``` + +機能ã—ã¦ã„ã‚‹ã‹ç¢ºèªã™ã‚‹ã«ã¯ã€`ulimit -n`ã¾ãŸã¯`launchctl limit maxfiles`コマンドを使用ã—ã¾ã™ã€‚ + +## ClickHouseサーãƒãƒ¼ã‚’実行ã™ã‚‹ + +``` bash +cd ClickHouse +./build/programs/clickhouse-server --config-file ./programs/server/config.xml +``` diff --git a/docs/ja/development/build.md b/docs/ja/development/build.md new file mode 100644 index 00000000000..48d2649fb79 --- /dev/null +++ b/docs/ja/development/build.md @@ -0,0 +1,152 @@ +--- +slug: /ja/development/build +sidebar_position: 64 +sidebar_label: Linux ã§ã®ãƒ“ルド +title: Linux ã§ã® ClickHouse ã®ãƒ“ルド方法 +description: Linux ã§ã® ClickHouse ã®ãƒ“ルド方法 +--- + +対応プラットフォーム: + +- x86_64 +- AArch64 +- PowerPC 64 LE(エクスペリメンタル) +- RISC-V 64(エクスペリメンタル) + +## Ubuntu ã§ã®ãƒ“ルド + +以下ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã¯ Ubuntu Linux ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ +é©åˆ‡ãªå¤‰æ›´ã‚’加ãˆã‚Œã°ã€ä»–ã® Linux ディストリビューションã§ã‚‚機能ã™ã‚‹ã¯ãšã§ã™ã€‚ +開発ã«æŽ¨å¥¨ã•ã‚Œã‚‹æœ€å°ã® Ubuntu ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ 22.04 LTS ã§ã™ã€‚ + +### å¿…è¦æ¡ä»¶ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« {#install-prerequisites} + +``` bash +sudo apt-get update +sudo apt-get install git cmake ccache python3 ninja-build nasm yasm gawk lsb-release wget software-properties-common gnupg +``` + +### Clang コンパイラã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã¨ä½¿ç”¨ + +Ubuntu/Debian ã§ã¯ LLVM ã®è‡ªå‹•ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚¹ã‚¯ãƒªãƒ—トを使用ã§ãã¾ã™ã€‚[ã“ã¡ã‚‰](https://apt.llvm.org/)ã‚’ã”覧ãã ã•ã„。 + +``` bash +sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" +``` + +注æ„: å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€æ¬¡ã®æ–¹æ³•ã‚‚使用ã§ãã¾ã™: + +```bash +sudo apt-get install software-properties-common +sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test +``` + +ä»–ã® Linux ディストリビューションã§ã¯ã€LLVM ã®[事å‰ãƒ“ルドパッケージ](https://releases.llvm.org/download.html)ã®åˆ©ç”¨å¯èƒ½æ€§ã‚’確èªã—ã¦ãã ã•ã„。 + +2024 å¹´ 3 月時点ã§ã€clang-17 以上ãŒå‹•ä½œã—ã¾ã™ã€‚ +GCC ã¯ã‚³ãƒ³ãƒ‘イラã¨ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +特定㮠Clang ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ãƒ“ルドã™ã‚‹ã«ã¯: + +:::tip +ã“ã‚Œã¯ä»»æ„ã§ã™ã€‚指示ã«å¾“ã£ã¦ Clang をインストールã—ãŸã°ã‹ã‚Šã®å ´åˆã¯ã€ +ã“ã®ç’°å¢ƒå¤‰æ•°ã‚’設定ã™ã‚‹å‰ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’確èªã—ã¦ãã ã•ã„。 +::: + +``` bash +export CC=clang-18 +export CXX=clang++-18 +``` + +### Rust コンパイラã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +ã¾ãšã€å…¬å¼ã® [rust ドキュメント](https://www.rust-lang.org/tools/install)㧠`rustup` をインストールã™ã‚‹æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„。 + +C++ ä¾å­˜é–¢ä¿‚ã¨åŒæ§˜ã«ã€ClickHouse ã¯ãƒ™ãƒ³ãƒ€ãƒªãƒ³ã‚°ã‚’使用ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã‚‹ã‚‚ã®ã‚’正確ã«ç®¡ç†ã—ã€ã‚µãƒ¼ãƒ‰ãƒ‘ーティã®ã‚µãƒ¼ãƒ“ス(`crates.io` レジストリã®ã‚ˆã†ãªï¼‰ã«ä¾å­˜ã—ãªã„よã†ã«ã—ã¦ã„ã¾ã™ã€‚ + +リリースモードã§ã¯ã€æœ€æ–°ã® rustup toolchain ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã‚ã‚Œã°ã€ã“ã®ä¾å­˜é–¢ä¿‚ã§å‹•ä½œã™ã‚‹ã¯ãšã§ã™ãŒã€ +サニタイザを有効ã«ã™ã‚‹äºˆå®šãŒã‚ã‚‹å ´åˆã¯ã€CI ã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚‚ã®ã¨åŒã˜ `std` ã¨ä¸€è‡´ã™ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆcrates をベンダリングã—ã¦ã„ã¾ã™ï¼‰: + +```bash +rustup toolchain install nightly-2024-04-01 +rustup default nightly-2024-04-01 +rustup component add rust-src +``` + +### ClickHouse ソースをãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã™ã‚‹ {#checkout-clickhouse-sources} + +``` bash +git clone --recursive --shallow-submodules git@github.com:ClickHouse/ClickHouse.git +``` + +ã¾ãŸã¯ + +``` bash +git clone --recursive --shallow-submodules https://github.com/ClickHouse/ClickHouse.git +``` + +### ClickHouse をビルドã™ã‚‹ {#build-clickhouse} + +``` bash +cd ClickHouse +mkdir build +cmake -S . -B build +cmake --build build # ã¾ãŸã¯: `cd build; ninja` +``` + +:::tip +`cmake` ãŒåˆ©ç”¨å¯èƒ½ãªè«–ç†ã‚³ã‚¢æ•°ã‚’検出ã§ããªã„å ´åˆã€ãƒ“ルド㯠1 スレッドã§è¡Œã‚ã‚Œã¾ã™ã€‚ã“れを解決ã™ã‚‹ã«ã¯ã€`cmake` ã« `-j` フラグを使用ã—ã¦ç‰¹å®šã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’使ã†ã‚ˆã†ã«è¨­å®šã§ãã¾ã™ã€‚例ãˆã°ã€`cmake --build build -j 16` ã§ã™ã€‚ã¾ãŸã€ãƒ•ãƒ©ã‚°ã‚’常ã«è¨­å®šã—ãªãã¦ã‚‚よã„よã†ã«ã€äºˆã‚特定ã®ã‚¸ãƒ§ãƒ–æ•°ã§ãƒ“ルドファイルを生æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: `cmake -DPARALLEL_COMPILE_JOBS=16 -S . -B build`ã€ã“ã“㧠`16` ã¯æœ›ã‚€ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã§ã™ã€‚ +::: + +実行ファイルを作æˆã™ã‚‹ã«ã¯ã€`cmake --build build --target clickhouse` を実行ã—ã¾ã™ï¼ˆã¾ãŸã¯: `cd build; ninja clickhouse`)。 +ã“れ㧠`build/programs/clickhouse` ã¨ã„ã†å®Ÿè¡Œãƒ•ã‚¡ã‚¤ãƒ«ãŒä½œæˆã•ã‚Œã€`client` ã¾ãŸã¯ `server` 引数ã¨ã¨ã‚‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +## ã©ã® Linux ã§ã‚‚ビルドã™ã‚‹ {#how-to-build-clickhouse-on-any-linux} + +ビルドã«ã¯æ¬¡ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒå¿…è¦ã§ã™: + +- Git(ソースã®ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã«ä½¿ç”¨ã€ãƒ“ルドã«ã¯ä¸è¦ï¼‰ +- CMake 3.20 以上 +- コンパイラ: clang-18 以上 +- リンカー: lld-17 以上 +- Ninja +- Yasm +- Gawk +- rustc + +ã™ã¹ã¦ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ä¸Šè¨˜ã®æ‰‹é †ã¨åŒæ§˜ã«ãƒ“ルドã§ãã¾ã™ã€‚ + +OpenSUSE Tumbleweed ã®ä¾‹: + +``` bash +sudo zypper install git cmake ninja clang-c++ python lld nasm yasm gawk +git clone --recursive https://github.com/ClickHouse/ClickHouse.git +mkdir build +cmake -S . -B build +cmake --build build +``` + +Fedora Rawhide ã®ä¾‹: + +``` bash +sudo yum update +sudo yum --nogpg install git cmake make clang python3 ccache lld nasm yasm gawk +git clone --recursive https://github.com/ClickHouse/ClickHouse.git +mkdir build +cmake -S . -B build +cmake --build build +``` + +## Docker ã§ã®ãƒ“ルド + +CI ビルドã«ã¯ã€`clickhouse/binary-builder` ã¨ã„ㆠDocker イメージを使用ã—ã¦ã„ã¾ã™ã€‚ã“ã®ã‚¤ãƒ¡ãƒ¼ã‚¸ã«ã¯ã€ãƒã‚¤ãƒŠãƒªã¨ãƒ‘ッケージをビルドã™ã‚‹ãŸã‚ã«å¿…è¦ãªã™ã¹ã¦ã®ã‚‚ã®ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚イメージã®ä½¿ç”¨ã‚’簡略化ã™ã‚‹ãŸã‚ã« `docker/packager/packager` ã¨ã„ã†ã‚¹ã‚¯ãƒªãƒ—トãŒã‚ã‚Šã¾ã™: + +```bash +# 出力アーティファクト用ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå®šç¾© +output_dir="build_results" +# シンプルãªãƒ“ルド +./docker/packager/packager --package-type=binary --output-dir "$output_dir" +# debian パッケージã®ãƒ“ルド +./docker/packager/packager --package-type=deb --output-dir "$output_dir" +# デフォルトã§ã¯ã€debian パッケージã¯ã‚¹ãƒªãƒ ãª LTO を使用ã™ã‚‹ãŸã‚ã€ãƒ“ルドを高速化ã™ã‚‹ãŸã‚ã«ã“れをオーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã§ãã¾ã™ +CMAKE_FLAGS='-DENABLE_THINLTO=' ./docker/packager/packager --package-type=deb --output-dir "./$(git rev-parse --show-cdup)/build_results" +``` diff --git a/docs/ja/development/continuous-integration.md b/docs/ja/development/continuous-integration.md new file mode 100644 index 00000000000..1b910504537 --- /dev/null +++ b/docs/ja/development/continuous-integration.md @@ -0,0 +1,200 @@ +--- +slug: /ja/development/continuous-integration +sidebar_position: 62 +sidebar_label: Continuous Integration Checks +title: Continuous Integration Checks +description: プルリクエストをé€ä¿¡ã™ã‚‹ã¨ã€ClickHouseã®ç¶™ç¶šçš„インテグレーション (CI) システムã«ã‚ˆã‚Šè‡ªå‹•åŒ–ã•ã‚ŒãŸãƒã‚§ãƒƒã‚¯ãŒã‚³ãƒ¼ãƒ‰ã«å¯¾ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ +--- + +プルリクエストをé€ä¿¡ã™ã‚‹ã¨ã€ClickHouseã®[継続的インテグレーション (CI) システム](tests.md#test-automation)ã«ã‚ˆã‚Šã€è‡ªå‹•åŒ–ã•ã‚ŒãŸãƒã‚§ãƒƒã‚¯ãŒã‚³ãƒ¼ãƒ‰ã«å¯¾ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒªãƒã‚¸ãƒˆãƒªã®ç®¡ç†è€…(ClickHouseãƒãƒ¼ãƒ ã®èª°ã‹ï¼‰ãŒã‚³ãƒ¼ãƒ‰ã‚’確èªã—ã€ãƒ—ルリクエストã«`can be tested`ラベルを追加ã—ãŸå¾Œã«è¡Œã‚ã‚Œã¾ã™ã€‚ãƒã‚§ãƒƒã‚¯ã®çµæžœã¯ã€[GitHubãƒã‚§ãƒƒã‚¯ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-status-checks)ã«è¨˜è¼‰ã•ã‚Œã¦ã„るよã†ã«ã€GitHubã®ãƒ—ルリクエストページã«ä¸€è¦§è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ãƒã‚§ãƒƒã‚¯ãŒå¤±æ•—ã—ãŸå ´åˆã€ãれを修正ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€é­é‡ã™ã‚‹å¯èƒ½æ€§ã®ã‚ã‚‹ãƒã‚§ãƒƒã‚¯ã®æ¦‚è¦ã¨ã€ãれを修正ã™ã‚‹ãŸã‚ã«ã§ãã‚‹ã“ã¨ã‚’説明ã—ã¾ã™ã€‚ + +ãƒã‚§ãƒƒã‚¯ã®å¤±æ•—ãŒå¤‰æ›´å†…容ã¨ã¯é–¢ä¿‚ãªã„よã†ã«è¦‹ãˆã‚‹å ´åˆã€ãã‚Œã¯ä¸€æ™‚çš„ãªå¤±æ•—やインフラã®å•é¡Œã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。プルリクエストã«ç©ºã®ã‚³ãƒŸãƒƒãƒˆã‚’プッシュã—ã¦ã€CIãƒã‚§ãƒƒã‚¯ã‚’å†èµ·å‹•ã—ã¦ãã ã•ã„。 +``` +git reset +git commit --allow-empty +git push +``` + +ã©ã†ã™ã‚Œã°ã‚ˆã„ã‹åˆ†ã‹ã‚‰ãªã„å ´åˆã¯ã€ç®¡ç†è€…ã«åŠ©ã‘を求ã‚ã¦ãã ã•ã„。 + + +## Merge With Master + +PRãŒãƒžã‚¹ã‚¿ãƒ¼ã«ãƒžãƒ¼ã‚¸ã§ãã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ã§ããªã„å ´åˆã€`Cannot fetch mergecommit`ã¨ã„ã†ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã§å¤±æ•—ã—ã¾ã™ã€‚ã“ã®ãƒã‚§ãƒƒã‚¯ã‚’修正ã™ã‚‹ãŸã‚ã«ã¯ã€[GitHubã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github)ã«è¨˜è¼‰ã•ã‚Œã¦ã„るよã†ã«ã‚³ãƒ³ãƒ•ãƒªã‚¯ãƒˆã‚’解決ã™ã‚‹ã‹ã€gitを使用ã—ã¦`master`ブランãƒã‚’プルリクエストã®ãƒ–ランãƒã«ãƒžãƒ¼ã‚¸ã—ã¾ã™ã€‚ + + +## Docs check + +ClickHouseã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚µã‚¤ãƒˆã®ãƒ“ルドを試ã¿ã¾ã™ã€‚ドキュメントã«ä½•ã‹å¤‰æ›´ã‚’加ãˆãŸå ´åˆã«å¤±æ•—ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚最もå¯èƒ½æ€§ãŒé«˜ã„原因ã¯ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆå†…ã®ã‚¯ãƒ­ã‚¹ãƒªãƒ³ã‚¯ãŒé–“é•ã£ã¦ã„ã‚‹ã“ã¨ã§ã™ã€‚ãƒã‚§ãƒƒã‚¯ãƒ¬ãƒãƒ¼ãƒˆã«ç§»å‹•ã—ã€`ERROR`ãŠã‚ˆã³`WARNING`メッセージを探ã—ã¦ãã ã•ã„。 + + +## Description Check + +プルリクエストã®èª¬æ˜ŽãŒãƒ†ãƒ³ãƒ—レート[PULL_REQUEST_TEMPLATE.md](https://github.com/ClickHouse/ClickHouse/blob/master/.github/PULL_REQUEST_TEMPLATE.md)ã«æº–æ‹ ã—ã¦ã„ã‚‹ã‹ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚変更ã«å¯¾ã™ã‚‹å¤‰æ›´ãƒ­ã‚°ã‚«ãƒ†ã‚´ãƒªï¼ˆä¾‹: Bug Fix)を指定ã—ã€[CHANGELOG.md](../whats-new/changelog/index.md)ã«å¤‰æ›´ã‚’説明ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼å‘ã‘メッセージを書ã‹ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + + +## Push To DockerHub + +ビルドやテストã«ä½¿ç”¨ã•ã‚Œã‚‹Dockerイメージをビルドã—ã€DockerHubã«ãƒ—ッシュã—ã¾ã™ã€‚ + + +## Marker Check + +ã“ã®ãƒã‚§ãƒƒã‚¯ã¯CIシステムãŒãƒ—ルリクエストã®å‡¦ç†ã‚’開始ã—ãŸã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚'pending'ステータスã®ã¨ãã¯ã€ã¾ã ã™ã¹ã¦ã®ãƒã‚§ãƒƒã‚¯ãŒé–‹å§‹ã•ã‚Œã¦ã„ãªã„ã“ã¨ã‚’示ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒã‚§ãƒƒã‚¯ãŒé–‹å§‹ã•ã‚Œã‚‹ã¨ã€ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã¯'success'ã«å¤‰æ›´ã•ã‚Œã¾ã™ã€‚ + + +## Style Check + +[`utils/check-style/check-style`](https://github.com/ClickHouse/ClickHouse/blob/master/utils/check-style/check-style)ãƒã‚¤ãƒŠãƒªã‚’使用ã—ã¦ã€ã‚³ãƒ¼ãƒ‰ã‚¹ã‚¿ã‚¤ãƒ«ã®å˜ç´”ãªæ­£è¦è¡¨ç¾ãƒ™ãƒ¼ã‚¹ã®ãƒã‚§ãƒƒã‚¯ã‚’è¡Œã„ã¾ã™ï¼ˆãƒ­ãƒ¼ã‚«ãƒ«ã§å®Ÿè¡Œå¯èƒ½ã§ã™ï¼‰ã€‚失敗ã®å ´åˆã¯ã€[コーディングスタイルガイド](style.md)ã«å¾“ã£ã¦ã‚¹ã‚¿ã‚¤ãƒ«ã‚¨ãƒ©ãƒ¼ã‚’修正ã—ã¦ãã ã•ã„。 + +#### ローカルã§ã‚¹ã‚¿ã‚¤ãƒ«ãƒã‚§ãƒƒã‚¯ã‚’実行ã™ã‚‹: +```sh +mkdir -p /tmp/test_output +# å…¨ã¦ã®ãƒã‚§ãƒƒã‚¯ã‚’実行 +python3 tests/ci/style_check.py --no-push + +# 指定ã•ã‚ŒãŸãƒã‚§ãƒƒã‚¯ã‚¹ã‚¯ãƒªãƒ—トを実行(例: ./check-mypy) +docker run --rm --volume=.:/ClickHouse --volume=/tmp/test_output:/test_output -u $(id -u ${USER}):$(id -g ${USER}) --cap-add=SYS_PTRACE --entrypoint= -w/ClickHouse/utils/check-style clickhouse/style-test ./check-mypy + +# スタイルãƒã‚§ãƒƒã‚¯ã‚¹ã‚¯ãƒªãƒ—トãŒã‚るディレクトリã¸ç§»å‹•: +cd ./utils/check-style + +# é‡è¤‡ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ã‚’ãƒã‚§ãƒƒã‚¯ +./check-duplicate-includes.sh + +# C++フォーマットをãƒã‚§ãƒƒã‚¯ +./check-style + +# Pythonフォーマットをblackã§ãƒã‚§ãƒƒã‚¯ +./check-black + +# Pythonã®åž‹ãƒ’ントをmypyã§ãƒã‚§ãƒƒã‚¯ +./check-mypy + +# flake8ã§Pythonã‚’ãƒã‚§ãƒƒã‚¯ +./check-flake8 + +# codespellã§ã‚³ãƒ¼ãƒ‰ã‚’ãƒã‚§ãƒƒã‚¯ +./check-typos + +# ドキュメントã®ã‚¹ãƒšãƒ«ã‚’ãƒã‚§ãƒƒã‚¯ +./check-doc-aspell + +# 空白をãƒã‚§ãƒƒã‚¯ +./check-whitespaces + +# GitHub Actionsã®ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã‚’ãƒã‚§ãƒƒã‚¯ +./check-workflows + +# サブモジュールをãƒã‚§ãƒƒã‚¯ +./check-submodules + +# shellcheckã§ã‚·ã‚§ãƒ«ã‚¹ã‚¯ãƒªãƒ—トをãƒã‚§ãƒƒã‚¯ +./shellcheck-run.sh +``` + +## Fast Test + +通常ã“ã‚Œã¯PRã«å¯¾ã—ã¦æœ€åˆã«å®Ÿè¡Œã•ã‚Œã‚‹ãƒã‚§ãƒƒã‚¯ã§ã™ã€‚ClickHouseã®ãƒ“ルドã¨ã€å¤šãã®[ステートレス機能テスト](tests.md#functional-tests)ãŒå®Ÿè¡Œã•ã‚Œã¾ã™ãŒã€ä¸€éƒ¨ã¯çœç•¥ã•ã‚Œã¾ã™ã€‚ã“ã‚ŒãŒå¤±æ•—ã™ã‚‹ã¨ã€ãã‚ŒãŒä¿®æ­£ã•ã‚Œã‚‹ã¾ã§ã•ã‚‰ãªã‚‹ãƒã‚§ãƒƒã‚¯ã¯é–‹å§‹ã•ã‚Œã¾ã›ã‚“。ã©ã®ãƒ†ã‚¹ãƒˆãŒå¤±æ•—ã—ãŸã‹ã‚’確èªã—ã€ãれをローカルã§å†ç¾ã™ã‚‹æ–¹æ³•ã¯[ã“ã¡ã‚‰](tests.md#functional-test-locally)ã«ã‚ã‚Šã¾ã™ã€‚ + +#### ローカルã§Fast Testを実行ã™ã‚‹: +```sh +mkdir -p /tmp/test_output +mkdir -p /tmp/fasttest-workspace +cd ClickHouse +# ã“ã®dockerコマンドã¯æœ€å°é™ã®ClickHouseビルドを行ã„ã€FastTestsを実行ã—ã¾ã™ +docker run --rm --cap-add=SYS_PTRACE -u $(id -u ${USER}):$(id -g ${USER}) --network=host -e FASTTEST_WORKSPACE=/fasttest-workspace -e FASTTEST_OUTPUT=/test_output -e FASTTEST_SOURCE=/ClickHouse --cap-add=SYS_PTRACE -e stage=clone_submodules --volume=/tmp/fasttest-workspace:/fasttest-workspace --volume=.:/ClickHouse --volume=/tmp/test_output:/test_output clickhouse/fasttest +``` + + +#### ステータスページファイル +- `runlog.out.log`ã¯ã™ã¹ã¦ã®ä»–ã®ãƒ­ã‚°ã‚’å«ã‚€ä¸€èˆ¬çš„ãªãƒ­ã‚°ã§ã™ã€‚ +- `test_log.txt` +- `submodule_log.txt`ã«ã¯ã€å¿…è¦ãªã‚µãƒ–モジュールã®ã‚¯ãƒ­ãƒ¼ãƒ³åŒ–ãŠã‚ˆã³ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã«é–¢ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå«ã¾ã‚Œã¾ã™ã€‚ +- `stderr.log` +- `stdout.log` +- `clickhouse-server.log` +- `clone_log.txt` +- `install_log.txt` +- `clickhouse-server.err.log` +- `build_log.txt` +- `cmake_log.txt`ã«ã¯C/C++ãŠã‚ˆã³Linuxフラグãƒã‚§ãƒƒã‚¯ã«é–¢ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +#### ステータスページã®ã‚«ãƒ©ãƒ  + +- *Test name*:テストã®åå‰ï¼ˆãƒ‘スを除ãã€ä¾‹ãˆã°ã™ã¹ã¦ã®ã‚¿ã‚¤ãƒ—ã®ãƒ†ã‚¹ãƒˆã¯åå‰ã«çµ±åˆã•ã‚Œã¾ã™ï¼‰ã€‚ +- *Test status* -- _Skipped_, _Success_, _Fail_ã®ã„ãšã‚Œã‹ã€‚ +- *Test time, sec.* -- ã“ã®ãƒ†ã‚¹ãƒˆã§ã¯ç©ºç™½ã§ã™ã€‚ + + +## ビルドãƒã‚§ãƒƒã‚¯ {#build-check} + +ã•ã¾ã–ã¾ãªæ§‹æˆã§ClickHouseをビルドã—ã€ã•ã‚‰ã«ã‚¹ãƒ†ãƒƒãƒ—ã§ä½¿ç”¨ã—ã¾ã™ã€‚失敗ã—ãŸãƒ“ルドを修正ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ビルドログã«ã¯ã‚¨ãƒ©ãƒ¼ã‚’修正ã™ã‚‹ãŸã‚ã®å分ãªæƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ãŒå¤šã„ã§ã™ãŒã€ãƒ­ãƒ¼ã‚«ãƒ«ã§å¤±æ•—ã‚’å†ç¾ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。`cmake`オプションã¯ãƒ“ルドログã§`cmake`を探ã—ã¦è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã®ã‚ªãƒ—ションを使用ã—ã¦[一般的ãªãƒ“ルドプロセス](../development/build.md)ã«å¾“ã£ã¦ãã ã•ã„。 + +### レãƒãƒ¼ãƒˆè©³ç´° + +- **Compiler**: `clang-18`ã€ã‚ªãƒ—ションã§ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ—ラットフォームã®åå‰ +- **Build type**: `Debug`ã¾ãŸã¯`RelWithDebInfo` (cmake)。 +- **Sanitizer**: `none`(サニタイザーãªã—)ã€`address` (ASan)ã€`memory` (MSan)ã€`undefined` (UBSan)ã€ã¾ãŸã¯`thread` (TSan)。 +- **Status**: `success`ã¾ãŸã¯`fail` +- **Build log**: ビルドãŠã‚ˆã³ãƒ•ã‚¡ã‚¤ãƒ«ã‚³ãƒ”ーã®ãƒ­ã‚°ã¸ã®ãƒªãƒ³ã‚¯ã€ãƒ“ルド失敗時ã«å½¹ç«‹ã¡ã¾ã™ã€‚ +- **Build time**。 +- **Artifacts**: ビルドçµæžœãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆ`XXX`ã¯ã‚µãƒ¼ãƒãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ä¾‹: `20.8.1.4344`)。 + - `clickhouse-client_XXX_amd64.deb` + - `clickhouse-common-static-dbg_XXX[+asan, +msan, +ubsan, +tsan]_amd64.deb` + - `clickhouse-common-staticXXX_amd64.deb` + - `clickhouse-server_XXX_amd64.deb` + - `clickhouse`: 主ãªãƒ“ルド済ã¿ãƒã‚¤ãƒŠãƒªã€‚ + - `clickhouse-odbc-bridge` + - `unit_tests_dbms`: ClickHouseã®ãƒ¦ãƒ‹ãƒƒãƒˆãƒ†ã‚¹ãƒˆã‚’å«ã‚€GoogleTestãƒã‚¤ãƒŠãƒªã€‚ + - `performance.tar.zst`: パフォーマンステスト用ã®ç‰¹åˆ¥ãƒ‘ッケージ。 + + +## 特殊ビルドãƒã‚§ãƒƒã‚¯ + +`clang-tidy`を使用ã—ã¦é™çš„解æžã¨ã‚³ãƒ¼ãƒ‰ã‚¹ã‚¿ã‚¤ãƒ«ã®ãƒã‚§ãƒƒã‚¯ã‚’è¡Œã„ã¾ã™ã€‚レãƒãƒ¼ãƒˆã¯[ビルドãƒã‚§ãƒƒã‚¯](#build-check)ã«é¡žä¼¼ã—ã¦ã„ã¾ã™ã€‚ビルドログã®ä¸­ã§è¦‹ã¤ã‹ã£ãŸã‚¨ãƒ©ãƒ¼ã‚’修正ã—ã¦ãã ã•ã„。 + +#### ローカルã§clang-tidyを実行ã™ã‚‹: +Dockerã§clang-tidyビルドを実行ã™ã‚‹ä¾¿åˆ©ãª`packager`スクリプトãŒã‚ã‚Šã¾ã™ +```sh +mkdir build_tidy +./docker/packager/packager --output-dir=./build_tidy --package-type=binary --compiler=clang-18 --debug-build --clang-tidy +``` + + +## Stateless 機能テスト + +ã•ã¾ã–ã¾ãªæ§‹æˆã§ãƒ“ルドã•ã‚ŒãŸClickHouseãƒã‚¤ãƒŠãƒªã«å¯¾ã—ã¦ã€[ステートレス機能テスト](tests.md#functional-tests)を実行ã—ã¾ã™ã€‚ã©ã®ãƒ†ã‚¹ãƒˆãŒå¤±æ•—ã—ãŸã‹ã‚’確èªã—ã€ãれをローカルã§å†ç¾ã™ã‚‹æ–¹æ³•ã¯[ã“ã¡ã‚‰](tests.md#functional-test-locally)ã«ã‚ã‚Šã¾ã™ã€‚æ­£ã—ã„ビルド構æˆã‚’使用ã—ã¦å†ç¾ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。アドレスサニタイザ(AddressSanitizer)ã§å¤±æ•—ã™ã‚‹ãƒ†ã‚¹ãƒˆãŒãƒ‡ãƒãƒƒã‚°ã§æˆåŠŸã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãƒã‚¤ãƒŠãƒªã‚’[CIビルドãƒã‚§ãƒƒã‚¯ãƒšãƒ¼ã‚¸](../development/build.md#you-dont-have-to-build-clickhouse)ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã‹ã€ãƒ­ãƒ¼ã‚«ãƒ«ã§ãƒ“ルドã—ã¦ãã ã•ã„。 + +## Stateful 機能テスト + +[Stateful 機能テスト](tests.md#functional-tests)を実行ã—ã¾ã™ã€‚ステートレス機能テストã¨åŒæ§˜ã«æ‰±ã„ã¾ã™ã€‚é•ã„ã¯[clickstreamデータセット](../getting-started/example-datasets/metrica.md)ã‹ã‚‰`hits`ãŠã‚ˆã³`visits`テーブルãŒå¿…è¦ãªã“ã¨ã§ã™ã€‚ + +## çµ±åˆãƒ†ã‚¹ãƒˆ + +[çµ±åˆãƒ†ã‚¹ãƒˆ](tests.md#integration-tests)を実行ã—ã¾ã™ã€‚ + +## ãƒã‚°ä¿®æ­£æ¤œè¨¼ãƒã‚§ãƒƒã‚¯ + +æ–°ã—ã„テスト(機能ã¾ãŸã¯çµ±åˆï¼‰ãŒã‚ã‚‹ã‹ã€ãƒžã‚¹ã‚¿ãƒ¼ãƒ–ランãƒã§ãƒ“ルドã•ã‚ŒãŸãƒã‚¤ãƒŠãƒªã§å¤±æ•—ã™ã‚‹å¤‰æ›´ã•ã‚ŒãŸãƒ†ã‚¹ãƒˆãŒã‚ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚プルリクエストã«"pr-bugfix"ラベルãŒä»˜ã„ã¦ã„ã‚‹ã¨ã“ã®ãƒã‚§ãƒƒã‚¯ãŒãƒˆãƒªã‚¬ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +## ストレステスト + +åŒæ™‚ã«è¤‡æ•°ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¬ã‚¹æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã‚’実行ã—ã€åŒæ™‚実行性ã«é–¢é€£ã™ã‚‹ã‚¨ãƒ©ãƒ¼ã‚’検出ã—ã¾ã™ã€‚ã“ã‚ŒãŒå¤±æ•—ã—ãŸå ´åˆ: + + * ã¾ãšã™ã¹ã¦ã®ä»–ã®ãƒ†ã‚¹ãƒˆã®å¤±æ•—を修正ã—ã¦ãã ã•ã„; + * レãƒãƒ¼ãƒˆã‚’見ã¦ã€ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€ã‚¨ãƒ©ãƒ¼ã®å¯èƒ½æ€§ã®ã‚る原因を調ã¹ã¦ãã ã•ã„。 + + + +## 互æ›æ€§ãƒã‚§ãƒƒã‚¯ + +`clickhouse`ãƒã‚¤ãƒŠãƒªãŒå¤ã„libcãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ‡ã‚£ã‚¹ãƒˆãƒªãƒ“ューションã§å®Ÿè¡Œã•ã‚Œã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚失敗ã—ãŸå ´åˆã€ç®¡ç†è€…ã«åŠ©ã‘を求ã‚ã¦ãã ã•ã„。 + +## AST ファジング + +プログラムエラーを発見ã™ã‚‹ãŸã‚ã«ãƒ©ãƒ³ãƒ€ãƒ ã«ç”Ÿæˆã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚失敗ã—ãŸå ´åˆã¯ã€ç®¡ç†è€…ã«åŠ©ã‘を求ã‚ã¦ãã ã•ã„。 + +## パフォーマンステスト + +クエリã®ãƒ‘フォーマンスã®å¤‰åŒ–を測定ã—ã¾ã™ã€‚ã“ã‚Œã¯æœ€ã‚‚é•·ã„ãƒã‚§ãƒƒã‚¯ã§ã€å®Ÿè¡Œã«ã¯ç´„6時間ã‹ã‹ã‚Šã¾ã™ã€‚パフォーマンステストレãƒãƒ¼ãƒˆã®è©³ç´°ã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/ClickHouse/tree/master/docker/test/performance-comparison#how-to-read-the-report)ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/development/contrib.md b/docs/ja/development/contrib.md new file mode 100644 index 00000000000..e8c1bff880a --- /dev/null +++ b/docs/ja/development/contrib.md @@ -0,0 +1,38 @@ +--- +slug: /ja/development/contrib +sidebar_position: 73 +sidebar_label: サードパーティライブラリ +description: 使用ã•ã‚Œã¦ã„るサードパーティライブラリã®ä¸€è¦§ +--- + +# 使用ã•ã‚Œã¦ã„るサードパーティライブラリ + +ClickHouseã¯ã€ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¸ã®æŽ¥ç¶šã‚„ã€ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロード/ä¿å­˜ã™ã‚‹éš›ã®ãƒ‡ã‚³ãƒ¼ãƒ‰/エンコードã€ç‰¹å®šã®å°‚門的ãªSQL関数ã®å®Ÿè£…ãªã©ã€ã•ã¾ã–ã¾ãªç›®çš„ã§ã‚µãƒ¼ãƒ‰ãƒ‘ーティライブラリを利用ã—ã¦ã„ã¾ã™ã€‚ターゲットシステムã«å­˜åœ¨ã™ã‚‹ãƒ©ã‚¤ãƒ–ラリã«ä¾å­˜ã›ãšã«æ¸ˆã‚€ã‚ˆã†ã«ã€å„サードパーティライブラリã¯ClickHouseã®ã‚½ãƒ¼ã‚¹ãƒ„リーã«Gitサブモジュールã¨ã—ã¦ã‚¤ãƒ³ãƒãƒ¼ãƒˆã•ã‚Œã€ClickHouseã¨å…±ã«ã‚³ãƒ³ãƒ‘イルãŠã‚ˆã³ãƒªãƒ³ã‚¯ã•ã‚Œã¾ã™ã€‚サードパーティライブラリã¨ãã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã®ä¸€è¦§ã¯ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã§å–å¾—ã§ãã¾ã™ã€‚ + +``` sql +SELECT library_name, license_type, license_path FROM system.licenses ORDER BY library_name COLLATE 'en'; +``` + +ã“ã®ä¸€è¦§ã«ã‚るライブラリã¯ã€ClickHouseリãƒã‚¸ãƒˆãƒªã®`contrib/`ディレクトリã«ä½ç½®ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ビルドオプションã«ã‚ˆã£ã¦ã¯ã€ã„ãã¤ã‹ã®ãƒ©ã‚¤ãƒ–ラリã¯ã‚³ãƒ³ãƒ‘イルã•ã‚Œã¦ãŠã‚‰ãšã€ãã®çµæžœã€å®Ÿè¡Œæ™‚ã«æ©Ÿèƒ½ãŒåˆ©ç”¨ã§ããªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +[例](https://sql.clickhouse.com?query_id=478GCPU7LRTSZJBNY3EJT3) + +## サードパーティライブラリã®è¿½åŠ ã¨ç®¡ç† + +å„サードパーティライブラリã¯ã€ClickHouseリãƒã‚¸ãƒˆãƒªã®`contrib/`ディレクトリ下ã®å°‚用ディレクトリã«é…ç½®ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚外部コードã®ã‚³ãƒ”ーをライブラリディレクトリã«ç›´æŽ¥æŠ•å…¥ã™ã‚‹ã®ã¯é¿ã‘ã¦ãã ã•ã„。代ã‚ã‚Šã«ã€Gitサブモジュールを作æˆã—ã¦ã€å¤–部ã®ä¸Šæµãƒªãƒã‚¸ãƒˆãƒªã‹ã‚‰ã‚µãƒ¼ãƒ‰ãƒ‘ーティコードをå–å¾—ã—ã¾ã™ã€‚ + +ClickHouseãŒä½¿ç”¨ã™ã‚‹ã™ã¹ã¦ã®ã‚µãƒ–モジュールã¯ã€`.gitmodule`ファイルã«ä¸€è¦§ã•ã‚Œã¦ã„ã¾ã™ã€‚ +- ライブラリãŒãã®ã¾ã¾ä½¿ç”¨ã§ãã‚‹å ´åˆï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å ´åˆï¼‰ã€ç›´æŽ¥ä¸Šæµãƒªãƒã‚¸ãƒˆãƒªã‚’å‚ç…§ã§ãã¾ã™ã€‚ +- ライブラリã«ãƒ‘ッãƒã‚’当ã¦ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ä¸Šæµãƒªãƒã‚¸ãƒˆãƒªã‚’[GitHubã®ClickHouse組織](https://github.com/ClickHouse)ã«ãƒ•ã‚©ãƒ¼ã‚¯ã—ã¦ãã ã•ã„。 + +後者ã®å ´åˆã€ã‚«ã‚¹ã‚¿ãƒ ãƒ‘ッãƒã‚’ã§ãã‚‹ã ã‘上æµã®ã‚³ãƒŸãƒƒãƒˆã‹ã‚‰åˆ†é›¢ã™ã‚‹ã“ã¨ã‚’目指ã—ã¾ã™ã€‚ãã®ãŸã‚ã€ç›®çš„ã®ãƒ–ランãƒã‚„ã‚¿ã‚°ã‹ã‚‰`ClickHouse/`ã¨ã„ã†ãƒ—レフィックス付ãã®ãƒ–ランãƒã‚’作æˆã—ã¾ã™ã€‚例ãˆã°ã€`ClickHouse/2024_2`(ブランãƒ`2024_2`ã®å ´åˆï¼‰ã¾ãŸã¯`ClickHouse/release/vX.Y.Z`(タグ`release/vX.Y.Z`ã®å ´åˆï¼‰ã§ã™ã€‚上æµã®é–‹ç™ºãƒ–ランãƒ`master`ã€`main`ã€`dev`(ã™ãªã‚ã¡ãƒ•ã‚©ãƒ¼ã‚¯ãƒªãƒã‚¸ãƒˆãƒªå†…ã§`ClickHouse/master`ã€`ClickHouse/main`ã€`ClickHouse/dev`ã¨ã„ã†ãƒ—レフィックスãŒä»˜ã„ãŸãƒ–ランãƒï¼‰ã‚’追跡ã—ãªã„ã§ãã ã•ã„。ã“れらã®ãƒ–ランãƒã¯å‹•çš„ã§ã‚ã‚Šã€é©åˆ‡ãªãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç†ãŒå›°é›£ã§ã™ã€‚プレフィックスブランãƒã«ã‚ˆã‚Šã€ãƒ•ã‚©ãƒ¼ã‚¯ã¸ã®ä¸Šæµãƒªãƒã‚¸ãƒˆãƒªã‹ã‚‰ã®ãƒ—ルã¯ã‚«ã‚¹ã‚¿ãƒ `ClickHouse/`ブランãƒã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。`contrib/`内ã®ã‚µãƒ–モジュールã¯ã€ãƒ•ã‚©ãƒ¼ã‚¯ã•ã‚ŒãŸã‚µãƒ¼ãƒ‰ãƒ‘ーティリãƒã‚¸ãƒˆãƒªã®`ClickHouse/`ブランãƒã®ã¿ã‚’追跡ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +パッãƒã¯å¤–部ライブラリã®`ClickHouse/`ブランãƒã«å¯¾ã—ã¦ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +以下ã®2ã¤ã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™ï¼š +- サニタイザ修正ã®ã‚ˆã†ãªæ–°ã—ã„修正をフォークリãƒã‚¸ãƒˆãƒªã®`ClickHouse/`プレフィックスブランãƒã«å¯¾ã—ã¦è¡Œã„ãŸã„å ´åˆã€‚ãã®å ´åˆã€ä¿®æ­£ã‚’`ClickHouse/`プレフィックス付ãã®ãƒ–ランãƒã¨ã—ã¦ãƒ—ッシュã—ã€ã‚«ã‚¹ã‚¿ãƒ è¿½è·¡ãƒ–ランãƒã«å¯¾ã—ã¦PRを作æˆã—ã€ãƒžãƒ¼ã‚¸ã—ã¾ã™ã€‚例ãˆã°ã€`ClickHouse/2024_2 <-- ClickHouse/fix-sanitizer-disaster`。 +- サブモジュールを更新ã—ã¦ã€ä»¥å‰ã®ãƒ‘ッãƒã‚’å†é©ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€‚ã“ã®å ´åˆã€å¤ã„PRã‚’å†ä½œæˆã™ã‚‹ã®ã¯éŽå‰°ã§ã™ã€‚代ã‚ã‚Šã«ã€ä»¥å‰ã®ã‚³ãƒŸãƒƒãƒˆã‚’æ–°ã—ã„`ClickHouse/`ブランãƒï¼ˆæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«å¯¾å¿œï¼‰ã«å˜ã«ãƒã‚§ãƒªãƒ¼ãƒ”ックã—ã¦ãã ã•ã„。複数ã®ã‚³ãƒŸãƒƒãƒˆãŒã‚ã£ãŸPRã®ã‚³ãƒŸãƒƒãƒˆã‚’スクワッシュã—ã¦ã‚‚構ã„ã¾ã›ã‚“。ç†æƒ³çš„ã«ã¯ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ‘ッãƒã‚’上æµã«å†è²¢çŒ®ã—ã€æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ãƒ‘ッãƒã‚’çœç•¥ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +サブモジュールãŒæ›´æ–°ã•ã‚ŒãŸã‚‰ã€ãƒ•ã‚©ãƒ¼ã‚¯å†…ã®æ–°ã—ã„ãƒãƒƒã‚·ãƒ¥ã‚’指ã™ã‚ˆã†ã«ClickHouse内ã§ã‚µãƒ–モジュールを更新ã—ã¾ã™ã€‚ + +å…¬å¼ãƒªãƒã‚¸ãƒˆãƒªã‚’念頭ã«ç½®ã„ã¦ã‚µãƒ¼ãƒ‰ãƒ‘ーティライブラリã®ãƒ‘ッãƒã‚’作æˆã—ã€ä¸Šæµãƒªãƒã‚¸ãƒˆãƒªã¸ã®ãƒ‘ッãƒã®å†è²¢çŒ®ã‚’検討ã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚‚パッãƒã®æ©æµã‚’å—ã‘ã€ClickHouseãƒãƒ¼ãƒ ã®ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹è² æ‹…を軽減ã§ãã¾ã™ã€‚ diff --git a/docs/ja/development/developer-instruction.md b/docs/ja/development/developer-instruction.md new file mode 100644 index 00000000000..c04fd628c7a --- /dev/null +++ b/docs/ja/development/developer-instruction.md @@ -0,0 +1,322 @@ +--- +slug: /ja/development/developer-instruction +sidebar_position: 61 +sidebar_label: ã¯ã˜ã‚ã« +description: ClickHouseã®ãƒ“ルド方法ã®æ¦‚è¦ã¨å‰ææ¡ä»¶ã«ã¤ã„㦠+--- + +# ClickHouseビルドã®ãŸã‚ã®ã‚¬ã‚¤ãƒ‰ + +ClickHouseã¯Linuxã€FreeBSDã€macOSã§ãƒ“ルドã§ãã¾ã™ã€‚Windowsを使用ã—ã¦ã„ã‚‹å ´åˆã§ã‚‚ã€Linuxを実行ã—ã¦ã„る仮想マシン(例:Ubuntuを使用ã—ãŸ[VirtualBox](https://www.virtualbox.org/))ã§ClickHouseをビルドã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouseをコンパイルã—ã¦å®Ÿè¡Œã™ã‚‹ã«ã¯64ビットシステムãŒå¿…è¦ã§ã™ã€‚32ビットシステムã§ã¯å‹•ä½œã—ã¾ã›ã‚“。 + +## GitHubã§ã®ãƒªãƒã‚¸ãƒˆãƒªä½œæˆ {#creating-a-repository-on-github} + +ClickHouseã®é–‹ç™ºã‚’開始ã™ã‚‹ã«ã¯ã€[GitHub](https://www.virtualbox.org/) アカウントãŒå¿…è¦ã§ã™ã€‚ã¾ãŸã€ãƒ­ãƒ¼ã‚«ãƒ«ã§SSHキーã®ç”Ÿæˆï¼ˆæœªç”Ÿæˆã®å ´åˆï¼‰ãŠã‚ˆã³å…¬é–‹ã‚­ãƒ¼ã‚’GitHubã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹ã“ã¨ã‚‚ã€ãƒ‘ッãƒã‚’æä¾›ã™ã‚‹ãŸã‚ã®å‰ææ¡ä»¶ã§ã™ã€‚ + +次ã«ã€ãƒ‘ーソナルアカウントã§[ClickHouseリãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/ClickHouse/)をフォークã™ã‚‹ã«ã¯ã€å³ä¸Šã«ã‚ã‚‹"フォーク" ボタンをクリックã—ã¦ãã ã•ã„。 + +ãŸã¨ãˆã°ã€å•é¡Œã®ä¿®æ­£ã‚„機能ã®æ供を貢献ã™ã‚‹ã«ã¯ã€ãƒ•ã‚©ãƒ¼ã‚¯ã•ã‚ŒãŸãƒªãƒã‚¸ãƒˆãƒªã®ãƒ–ランãƒã«å¤‰æ›´ã‚’コミットã—ã€ãã®å¤‰æ›´ã‚’メインリãƒã‚¸ãƒˆãƒªã«"プルリクエスト"ã¨ã—ã¦ä½œæˆã—ã¦ãã ã•ã„。 + +Gitリãƒã‚¸ãƒˆãƒªã‚’æ“作ã™ã‚‹ãŸã‚ã«ã€`git`をインストールã—ã¦ãã ã•ã„。Ubuntuã§ã¯ã€ã‚¿ãƒ¼ãƒŸãƒŠãƒ«ã§ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + +```sh +sudo apt update +sudo apt install git +``` + +Gitã®ä½¿ç”¨ã«é–¢ã™ã‚‹ãƒãƒ¼ãƒˆã‚·ãƒ¼ãƒˆã¯[ã“ã¡ã‚‰](https://education.github.com/git-cheat-sheet-education.pdf)ã«ã‚ã‚Šã¾ã™ã€‚Gitã®è©³ç´°ãªãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã¯[ã“ã¡ã‚‰](https://git-scm.com/book/en/v2)ã‚’ã”覧ãã ã•ã„。 + +## 開発マシンã¸ã®ãƒªãƒã‚¸ãƒˆãƒªã®ã‚¯ãƒ­ãƒ¼ãƒ³ {#cloning-a-repository-to-your-development-machine} + +ã¾ãšã€ä½œæ¥­ãƒžã‚·ãƒ³ã«ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンロードã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒªãƒã‚¸ãƒˆãƒªã‚’クローンã—ã¾ã™ï¼š + +```sh +git clone git@github.com:your_github_username/ClickHouse.git # プレースホルダーをã‚ãªãŸã®GitHubユーザåã§ç½®ãæ›ãˆã¦ãã ã•ã„ +cd ClickHouse +``` + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ClickHouseã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’å«ã‚€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª`ClickHouse/`を作æˆã—ã¾ã™ã€‚URLã®å¾Œã«ã‚«ã‚¹ã‚¿ãƒ ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€ã“ã®ãƒ‘スã«ç©ºç™½ãŒå«ã¾ã‚Œã¦ã„ãªã„ã“ã¨ãŒé‡è¦ã§ã™ã€‚後ã§ãƒ“ルドã«å•é¡Œã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseリãƒã‚¸ãƒˆãƒªã«ã¯ã€Gitサブモジュールã€ã¤ã¾ã‚Šã€å¤–部リãƒã‚¸ãƒˆãƒªï¼ˆé€šå¸¸ã€ClickHouseã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚µãƒ¼ãƒ‰ãƒ‘ーティライブラリ)ã¸ã®å‚ç…§ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“れらã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã•ã‚Œã¾ã›ã‚“。ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã™ã‚‹ã«ã¯ã€æ¬¡ã®ã„ãšã‚Œã‹ã‚’実行ã—ã¾ã™ï¼š + +- `--recurse-submodules` オプションを付ã‘ã¦`git clone`を実行ã—ã¾ã™ã€‚ + +- `git clone`ãŒã‚µãƒ–モジュールをãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã—ãªã‹ã£ãŸå ´åˆã€`git submodule update --init --jobs `(例:` = 12`ã¨æŒ‡å®šã™ã‚‹ã¨ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã®ä¸¦åˆ—化ãŒå¯èƒ½ï¼‰ã‚’実行ã—ã€å‰è¿°ã®ã¨åŒæ§˜ã®çµæžœã‚’å¾—ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +- `git clone`ãŒã‚µãƒ–モジュールをãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã—ãªã‹ã£ãŸå ´åˆã€ä¸è¦ãªãƒ•ã‚¡ã‚¤ãƒ«ã‚„履歴をçœã„ã¦ã‚µãƒ–モジュールをãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã™ã‚‹ãŸã‚ã«[sparse](https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout/)ãŠã‚ˆã³[shallow](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/)ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã‚’使用ã™ã‚‹å ´åˆã¯ã€`./contrib/update-submodules.sh`を実行ã—ã¾ã™ã€‚一般的ã«ã¯ã€ã‚µãƒ–モジュールã®æ“作ãŒä¸ä¾¿ã§é…ããªã‚‹ãŸã‚ã€ãŠå‹§ã‚ã—ã¾ã›ã‚“。 + +Gitã®çŠ¶æ…‹ã‚’確èªã™ã‚‹ãŸã‚ã«ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š`git submodule status`。 + +次ã®ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚ŒãŸå ´åˆï¼š + + Permission denied (publickey). + fatal: Could not read from remote repository. + + Please make sure you have the correct access rights + and the repository exists. + +一般ã«ã€GitHubã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®SSHキーãŒä¸è¶³ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ã“れらã®ã‚­ãƒ¼ã¯é€šå¸¸ã€`~/.ssh`ã«ã‚ã‚Šã¾ã™ã€‚SSHキーãŒå—ã‘入れられるãŸã‚ã«ã¯ã€GitHubã®è¨­å®šã§ã“れをアップロードã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +httpsプロトコルを介ã—ã¦ãƒªãƒã‚¸ãƒˆãƒªã‚’クローンã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + + git clone --recursive --shallow-submodules https://github.com/ClickHouse/ClickHouse.git + +ã—ã‹ã—ã€ã“ã®æ–¹æ³•ã§ã¯å¤‰æ›´ã‚’サーãƒã«é€ä¿¡ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。一時的ã«ä½¿ç”¨ã—ã€SSHキーを追加ã—ã¦ã€`git remote` コマンドを使用ã—ã¦ãƒªãƒã‚¸ãƒˆãƒªã®ãƒªãƒ¢ãƒ¼ãƒˆã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +作業中ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒªãƒã‚¸ãƒˆãƒªã«ã‚ªãƒªã‚¸ãƒŠãƒ«ã®ClickHouseリãƒã‚¸ãƒˆãƒªã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’追加ã—ã¦ã€ãã“ã‹ã‚‰æ›´æ–°ã‚’引ã出ã™ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + + git remote add upstream git@github.com:ClickHouse/ClickHouse.git + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ãŒæ­£å¸¸ã«å®Ÿè¡Œã•ã‚ŒãŸå¾Œã€`git pull upstream master`を実行ã™ã‚‹ã“ã¨ã§ã€ãƒ¡ã‚¤ãƒ³ã®ClickHouseリãƒã‚¸ãƒˆãƒªã‹ã‚‰æ›´æ–°ã‚’引ã出ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +以下ã®èª¬æ˜Žã¯ã€Linuxã§ãƒ“ルドã—ã¦ã„ã‚‹ã“ã¨å‰æã¨ã—ã¦ã„ã¾ã™ã€‚クロスコンパイルやmacOSã§ã®ãƒ“ルドを行ã†å ´åˆã€ç‰¹å®šã®ã‚¬ã‚¤ãƒ‰ã‚‚確èªã—ã¦ãã ã•ã„。例ãˆã°ã€[macOSã§ã®ãƒ“ルド](build-osx.md)ã€[Linuxã§ã®macOSå‘ã‘ビルド](build-cross-osx.md)ã€[Linuxã§ã®Linux/RISC-Vå‘ã‘ビルド](build-cross-riscv.md)ã€[Linuxã§ã®Linux/LoongArchå‘ã‘ビルド](build-cross-loongarch.md)ãªã©ã§ã™ã€‚ +::: + +## ビルドシステム {#build-system} + +ClickHouseã¯ãƒ“ルドã«CMakeã¨Ninjaを使用ã—ã¾ã™ã€‚ + +- CMake - Ninjaファイル(ビルドタスク)を生æˆã™ã‚‹ãƒ¡ã‚¿ãƒ“ルドシステム。 + +- Ninja - ãれらã®cmake生æˆã‚¿ã‚¹ã‚¯ã‚’実行ã™ã‚‹ãŸã‚ã®ã‚¹ãƒ”ードã«ç„¦ç‚¹ã‚’当ã¦ãŸå°è¦æ¨¡ãªãƒ“ルドシステム。 + +- ccache - コンパイラã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã€‚以å‰ã®ã‚³ãƒ³ãƒ‘イルをキャッシュã—ã€åŒã˜ã‚³ãƒ³ãƒ‘イルãŒå†åº¦è¡Œã‚れるã¨ãã«ãれを検出ã—ã¦å†ã‚³ãƒ³ãƒ‘イルを高速化ã—ã¾ã™ã€‚ + +:::tip +ccacheã®ä»£æ›¿ã¨ã—ã¦ã€[sccache](https://github.com/mozilla/sccache)を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ãれを使用ã™ã‚‹ã«ã¯ã€`-DCOMPILER_CACHE=sccache` CMakeフラグを使用ã—ã¦ãã ã•ã„。 +::: + +Ubuntuã€Debianã¾ãŸã¯Mintã®å ´åˆã€`sudo apt install cmake ninja-build ccache`を実行ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¾ã™ã€‚ + +CentOSã€RedHatã®å ´åˆã€`sudo yum install cmake ninja-build ccache`を実行ã—ã¾ã™ã€‚ + +Archã¾ãŸã¯Gentooを使用ã—ã¦ã„ã‚‹å ´åˆã€CMakeãŠã‚ˆã³ãã®ä»–ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ–¹æ³•ã‚’知ã£ã¦ã„ã¾ã™ã§ã—ょã†ã€‚ + +## C++コンパイラ {#c-compiler} + +ClickHouseã®ãƒ“ルドã«ã¯ã€Clangãƒãƒ¼ã‚¸ãƒ§ãƒ³16ã‹ã‚‰ã®ã‚³ãƒ³ãƒ‘イラをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +Clangã¯gccã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ãŸã ã—ã€æˆ‘々ã®ç¶™ç¶šçš„インテグレーション(CI)プラットフォームã§ã¯ã€ç´„12種類ã®ãƒ“ルドã®çµ„ã¿åˆã‚ã›ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ã„ã¾ã™ã€‚ + +Ubuntu/Debianã§ã¯ã€ï¼ˆå…¬å¼ã‚¦ã‚§ãƒ–ページを確èªã—ã¦ãã ã•ã„)[å…¬å¼ã‚¦ã‚§ãƒ–ページ](https://apt.llvm.org/)ã®è‡ªå‹•ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚¹ã‚¯ãƒªãƒ—トを使用ã§ãã¾ã™ã€‚ + +```bash +sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" +``` + +## ビルドプロセス {#the-building-process} + +ClickHouseをビルドã™ã‚‹æº–å‚™ãŒã§ããŸã‚‰ã€`ClickHouse`内ã«ãƒ“ルドæˆæžœç‰©ã‚’ã™ã¹ã¦å«ã‚€åˆ¥ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª`build`を作æˆã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ï¼š + + mkdir build + cd build + +ç•°ãªã‚‹ãƒ“ルドタイプã®ãŸã‚ã«è¤‡æ•°ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ï¼ˆä¾‹ï¼šbuild_releaseã€build_debug等)。 + +`build`ディレクトリ内ã§ã€æœ€åˆã«ã‚³ãƒ³ãƒ‘イラを指定ã™ã‚‹ç’°å¢ƒå¤‰æ•°ã‚’定義ã—ãŸå¾Œã€CMakeを実行ã—ã¦ãƒ“ルドを構æˆã—ã¾ã™ã€‚ + + export CC=clang CXX=clang++ + cmake .. + +上ã®è‡ªå‹•ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚¹ã‚¯ãƒªãƒ—トを使用ã—ã¦clangをインストールã—ãŸå ´åˆã¯ã€æœ€åˆã®ã‚³ãƒžãƒ³ãƒ‰å†…ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚ŒãŸclangã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚‚指定ã—ã¦ãã ã•ã„。例:`export CC=clang-18 CXX=clang++-18`。clangã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã‚¹ã‚¯ãƒªãƒ—トã®å‡ºåŠ›ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +`CC`変数ã¯Cコンパイラを指定ã—ã€`CXX`変数ã¯ãƒ“ルドã«ä½¿ç”¨ã™ã‚‹C++コンパイラを指定ã—ã¾ã™ã€‚ + +より速ã„ビルドã®ãŸã‚ã«ã€æœ€é©åŒ–ãªã—ã®ãƒ‡ãƒãƒƒã‚°ãƒ“ルドタイプを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã®å ´åˆã€ä»¥ä¸‹ã®ãƒ‘ラメータを指定ã—ã¦ãã ã•ã„:`-D CMAKE_BUILD_TYPE=Debug`: + + cmake -D CMAKE_BUILD_TYPE=Debug .. + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’`build`ディレクトリ内ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ãƒ“ルドタイプを変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ninjaを実行ã—ã¦ãƒ“ルドã—ã¾ã™ï¼š + + ninja clickhouse-server clickhouse-client + +ã“ã®ä¾‹ã§ã¯ã€å¿…è¦ãªãƒã‚¤ãƒŠãƒªã®ã¿ãŒãƒ“ルドã•ã‚Œã¾ã™ã€‚ + +ã™ã¹ã¦ã®ãƒã‚¤ãƒŠãƒªï¼ˆãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã‚„テスト)をビルドã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ãƒ‘ラメータãªã—ã§ninjaを実行ã—ã¾ã™ï¼š + + ninja + +完全ãªãƒ“ルドã«ã¯ç´„30GBã®ç©ºãディスクスペースãŒå¿…è¦ã§ã€ãƒ¡ã‚¤ãƒ³ãƒã‚¤ãƒŠãƒªã‚’ビルドã™ã‚‹ãŸã‚ã«ã¯ç´„15GBãŒå¿…è¦ã§ã™ã€‚ + +å分ãªé‡ã®RAMãŒãƒ“ルドマシンã«ã‚ã‚‹å ´åˆã¯ã€`-j`パラメータã§åŒæ™‚ã«å®Ÿè¡Œã•ã‚Œã‚‹ãƒ“ルドタスクã®æ•°ã‚’制é™ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + + ninja -j 1 clickhouse-server clickhouse-client + +4GBã®RAMã‚’æŒã¤ãƒžã‚·ãƒ³ã§ã¯ã€1を指定ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã€8GBã®RAMã§ã¯`-j 2`を指定ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +メッセージ`ninja: error: loading 'build.ninja': No such file or directory`ã‚’å—ã‘ãŸå ´åˆã€ãƒ“ルド構æˆã®ç”ŸæˆãŒå¤±æ•—ã—ã¦ã„ã‚‹ã“ã¨ã‚’æ„味ã—ã€ä¸Šè¨˜ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’確èªã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ビルドプロセスãŒæ­£å¸¸ã«é–‹å§‹ã•ã‚Œã‚‹ã¨ã€å‡¦ç†ã•ã‚ŒãŸã‚¿ã‚¹ã‚¯ã®æ•°ã¨ã‚¿ã‚¹ã‚¯ã®ç·æ•°ã‚’示ã™ãƒ“ルド進行状æ³ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +ビルド中ã«LLVMライブラリã«é–¢ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ä½•ã‚‚影響ã›ãšã€å®‰å…¨ã«ç„¡è¦–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ビルドãŒæ­£å¸¸ã«å®Œäº†ã™ã‚‹ã¨ã€å®Ÿè¡Œå¯èƒ½ãƒ•ã‚¡ã‚¤ãƒ«`ClickHouse//programs/clickhouse`ãŒå¾—られã¾ã™ï¼š + + ls -l programs/clickhouse + +### 高度ãªãƒ“ルドプロセス {#advanced-building-process} + +#### 最å°ãƒ“ルド {#minimal-build} + +サードパーティライブラリã«ã‚ˆã‚‹æ©Ÿèƒ½ã«èˆˆå‘³ãŒãªã„å ´åˆã€ãƒ“ルドをã•ã‚‰ã«é«˜é€ŸåŒ–ã™ã‚‹ãŸã‚ã«ã€`cmake`オプションを使用ã§ãã¾ã™ã€‚ + +``` +cmake -DENABLE_LIBRARIES=OFF +``` + +開発オプションã«é–¢ã—ã¦å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã€è‡ªå·±è²¬ä»»ã§ã™ã€‚ + +#### Rustサãƒãƒ¼ãƒˆ {#rust-support} + +Rustã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆæŽ¥ç¶šãŒå¿…è¦ã§ã€æŽ¥ç¶šãŒãªã„å ´åˆã¯Rustサãƒãƒ¼ãƒˆã‚’無効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +``` +cmake -DENABLE_RUST=OFF +``` + +## ClickHouseã®å®Ÿè¡Œå¯èƒ½ãƒ•ã‚¡ã‚¤ãƒ«ã®å®Ÿè¡Œ {#running-the-built-executable-of-clickhouse} + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã‚µãƒ¼ãƒãƒ¼ã‚’実行ã™ã‚‹ã«ã¯ã€`ClickHouse/programs/server/`ã«ç§»å‹•ã—ã¦å®Ÿè¡Œã—ã¾ã™ï¼ˆ`build`ã®å¤–ã«ã‚ã‚Šã¾ã™ï¼‰ï¼š + + ../../build/programs/clickhouse server + +ã“ã®å ´åˆã€ClickHouseã¯ç¾åœ¨ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚る設定ファイルを使用ã—ã¾ã™ã€‚ä»»æ„ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰å®Ÿè¡Œã—ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘スをコマンドラインパラメータ`--config-file`ã¨ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚ + +別ã®ã‚¿ãƒ¼ãƒŸãƒŠãƒ«ã§clickhouse-clientを使用ã—ã¦ClickHouseã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã€`ClickHouse/build/programs/`ã«ç§»å‹•ã—ã€`./clickhouse client`を実行ã—ã¾ã™ã€‚ + +macOSã¾ãŸã¯FreeBSDã§`Connection refused`メッセージãŒè¡¨ç¤ºã•ã‚ŒãŸå ´åˆã€ãƒ›ã‚¹ãƒˆã‚¢ãƒ‰ãƒ¬ã‚¹127.0.0.1を指定ã—ã¦ã¿ã¦ãã ã•ã„: + + clickhouse client --host 127.0.0.1 + +システムã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚ŒãŸClickHouseãƒã‚¤ãƒŠãƒªã‚’ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ“ルドã—ãŸClickHouseãƒã‚¤ãƒŠãƒªã§ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れを行ã†ã«ã¯ã€å…¬å¼ã‚¦ã‚§ãƒ–サイトã®æŒ‡ç¤ºã«å¾“ã„ã€ãƒžã‚·ãƒ³ã«ClickHouseをインストールã—ã¦ãã ã•ã„。ãã®å¾Œã€ä»¥ä¸‹ã‚’実行ã—ã¾ã™ï¼š + + sudo service clickhouse-server stop + sudo cp ClickHouse/build/programs/clickhouse /usr/bin/ + sudo service clickhouse-server start + +`clickhouse-client`ã€`clickhouse-server`ãªã©ã¯ã€å…±é€šã®`clickhouse`ãƒã‚¤ãƒŠãƒªã¸ã®ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ãƒªãƒ³ã‚¯ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +ã¾ãŸã€ã‚·ã‚¹ãƒ†ãƒ ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚ŒãŸClickHouseパッケージã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ã¦ã‚«ã‚¹ã‚¿ãƒ ãƒ“ルドã—ãŸClickHouseãƒã‚¤ãƒŠãƒªã‚’実行ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + + sudo service clickhouse-server stop + sudo -u clickhouse ClickHouse/build/programs/clickhouse server --config-file /etc/clickhouse-server/config.xml + +## IDE(統åˆé–‹ç™ºç’°å¢ƒï¼‰ {#ide-integrated-development-environment} + +**CLion(推奨)** + +ã©ã®IDEを使用ã™ã‚‹ã‹åˆ†ã‹ã‚‰ãªã„å ´åˆã€[CLion](https://www.jetbrains.com/clion/) を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚CLionã¯å•†ç”¨ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã§ã™ãŒã€30日間ã®ç„¡æ–™ãƒˆãƒ©ã‚¤ã‚¢ãƒ«ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ã¾ãŸã€å­¦ç”Ÿã¯ç„¡æ–™ã§åˆ©ç”¨ã§ãã¾ã™ã€‚CLionã¯Linuxã¨macOSã®ä¸¡æ–¹ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +CLionを使用ã—ã¦ClickHouseを開発ã™ã‚‹éš›ã«çŸ¥ã£ã¦ãŠãã¹ãã“ã¨ï¼š + +- CLionã¯ç‹¬è‡ªã«`build`パスを作æˆã—ã€ãƒ“ルドタイプã¨ã—ã¦è‡ªå‹•çš„ã«`debug`ã‚’é¸æŠžã—ã¾ã™ã€‚ +- 使用ã™ã‚‹CMakeã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãŸã‚‚ã®ã§ã¯ãªãã€CLion内ã§å®šç¾©ã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã§ã™ã€‚ +- CLionã¯`ninja`ã§ã¯ãªã`make`を使用ã—ã¦ãƒ“ルドタスクを実行ã—ã¾ã™ï¼ˆã“ã‚Œã¯é€šå¸¸ã®å‹•ä½œã§ã™ï¼‰ã€‚ + +**ãã®ä»–ã®ä»£æ›¿IDE** + +[QTCreator](https://www.qt.io/product/development-tools) ãŠã‚ˆã³ [KDevelop](https://kdevelop.org/) ã¯ã€ClickHouse開発ã®ãŸã‚ã®ä»–ã®ç´ æ™´ã‚‰ã—ã„代替IDEã§ã™ã€‚KDevelopã¯å„ªã‚ŒãŸIDEã§ã™ãŒã€æ™‚々ä¸å®‰å®šã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚プロジェクトを開ãéš›ã«KDevelopãŒã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã—ãŸå ´åˆã€ãƒ—ロジェクトã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒªã‚¹ãƒˆãŒé–‹ã‹ã‚ŒãŸã‚‰ã™ãã«ã€Œã™ã¹ã¦ã‚’åœæ­¢ã€ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れを行ã†ã¨ã€KDevelopã¯å•é¡Œãªã動作ã™ã‚‹ã¯ãšã§ã™ã€‚ + +ãã®ä»–ã®IDEã¨ã—ã¦ã¯ã€[Sublime Text](https://www.sublimetext.com/)ã€[Visual Studio Code](https://code.visualstudio.com/)ã€ã¾ãŸã¯[Kate](https://kate-editor.org/) (ã„ãšã‚Œã‚‚Linuxã§åˆ©ç”¨å¯èƒ½ï¼‰ã‚’使用ã§ãã¾ã™ã€‚VS Codeを使用ã—ã¦ã„ã‚‹å ´åˆã€IntelliSenseよりもパフォーマンスãŒå¤§å¹…ã«å‘上ã™ã‚‹ãŸã‚ã€[clangdæ‹¡å¼µ](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd)ã®ä½¿ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## コードを書ã {#writing-code} + +ClickHouseã®ãŸã‚ã«ã‚³ãƒ¼ãƒ‰ã‚’書ãéš›ã«å½¹ç«‹ã¤ã‚¯ã‚¤ãƒƒã‚¯ãƒªãƒ³ã‚¯ã‚’以下ã«ç¤ºã—ã¾ã™ï¼š + +- [ClickHouseアーキテクãƒãƒ£ã®èª¬æ˜Ž](https://clickhouse.com/docs/ja/development/architecture/)。 +- [コードスタイルガイド](https://clickhouse.com/docs/ja/development/style/)。 +- [サードパーティライブラリã®è¿½åŠ ](https://clickhouse.com/docs/ja/development/contrib/#adding-third-party-libraries)。 +- [テストを書ã](https://clickhouse.com/docs/ja/development/tests/)。 +- [オープンãªå•é¡Œã®ãƒªã‚¹ãƒˆ](https://github.com/ClickHouse/ClickHouse/issues?q=is%3Aopen+is%3Aissue+label%3A%22easy+task%22)。 + +## ドキュメントを書ã {#writing-documentation} + +新機能を追加ã™ã‚‹ãƒ—ルリクエストã®ä¸€ç’°ã¨ã—ã¦ã€ãã®æ©Ÿèƒ½ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’書ãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ドキュメントã®å¤‰æ›´ã‚’プレビューã—ãŸã„å ´åˆã€ãƒ­ãƒ¼ã‚«ãƒ«ã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒšãƒ¼ã‚¸ã‚’ビルドã™ã‚‹ãŸã‚ã®æ‰‹é †ãŒ[ã“ã¡ã‚‰ã®README.mdファイル](https://github.com/ClickHouse/clickhouse-docs)ã«ã‚ã‚Šã¾ã™ã€‚ClickHouseã«æ–°ã—ã„関数を追加ã™ã‚‹éš›ã«ã¯ã€ä»¥ä¸‹ã®ãƒ†ãƒ³ãƒ—レートをガイドã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ï¼š + +```markdown +# newFunctionName + +ã“ã“ã«é–¢æ•°ã®ç°¡å˜ãªèª¬æ˜Žã‚’記載ã—ã¾ã™ã€‚関数ã®æ©Ÿèƒ½ã¨å…¸åž‹çš„ãªä½¿ç”¨ä¾‹ã«ã¤ã„ã¦ç°¡å˜ã«èª¬æ˜Žã—ã¦ãã ã•ã„。 + +**Syntax** + +\```sql +newFunctionName(arg1, arg2[, arg3]) +\``` + +**Arguments** + +- `arg1` — 引数ã®èª¬æ˜Žã€‚[DataType](../data-types/float.md) +- `arg2` — 引数ã®èª¬æ˜Žã€‚[DataType](../data-types/float.md) +- `arg3` — オプションã®å¼•æ•°ã®èª¬æ˜Žï¼ˆã‚ªãƒ—ション)。[DataType](../data-types/float.md) + +**Implementation Details** + +関連ãŒã‚ã‚‹å ´åˆã¯ã€å®Ÿè£…ã®è©³ç´°ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +**Returned value** + +- {関数ãŒè¿”ã™å†…容をã“ã“ã«è¨˜è¼‰ã—ã¾ã™}。[DataType](../data-types/float.md) + +**Example** + +クエリ: + +\```sql +SELECT 'write your example query here'; +\``` + +レスãƒãƒ³ã‚¹: + +\```response +┌───────────────────────────────────┠+│ the result of the query │ +└───────────────────────────────────┘ +\``` +``` + +## テストデータ {#test-data} + +ClickHouseã®é–‹ç™ºã§ã¯ã€ç¾å®Ÿçš„ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ãƒ­ãƒ¼ãƒ‰ãŒé »ç¹ã«å¿…è¦ã§ã™ã€‚ã“ã‚Œã¯ç‰¹ã«ãƒ‘フォーマンステストã«é‡è¦ã§ã™ã€‚我々ã¯ç‰¹åˆ¥ã«æº–å‚™ã•ã‚ŒãŸWebアナリティクスã®åŒ¿åデータセットをæŒã£ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã®ãƒ­ãƒ¼ãƒ‰ã«ã¯è¿½åŠ ã§ç´„3GBã®ç©ºãディスクスペースãŒå¿…è¦ã§ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ã»ã¨ã‚“ã©ã®é–‹ç™ºä½œæ¥­ã«ã¯å¿…é ˆã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + + sudo apt install wget xz-utils + + wget https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz + wget https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz + + xz -v -d hits_v1.tsv.xz + xz -v -d visits_v1.tsv.xz + + clickhouse-client + + CREATE DATABASE IF NOT EXISTS test + + CREATE TABLE test.hits ( WatchID UInt64, JavaEnable UInt8, Title String, GoodEvent Int16, EventTime DateTime, EventDate Date, CounterID UInt32, ClientIP UInt32, ClientIP6 FixedString(16), RegionID UInt32, UserID UInt64, CounterClass Int8, OS UInt8, UserAgent UInt8, URL String, Referer String, URLDomain String, RefererDomain String, Refresh UInt8, IsRobot UInt8, RefererCategories Array(UInt16), URLCategories Array(UInt16), URLRegions Array(UInt32), RefererRegions Array(UInt32), ResolutionWidth UInt16, ResolutionHeight UInt16, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, FlashMinor2 String, NetMajor UInt8, NetMinor UInt8, UserAgentMajor UInt16, UserAgentMinor FixedString(2), CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, MobilePhone UInt8, MobilePhoneModel String, Params String, IPNetworkID UInt32, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, IsArtifical UInt8, WindowClientWidth UInt16, WindowClientHeight UInt16, ClientTimeZone Int16, ClientEventTime DateTime, SilverlightVersion1 UInt8, SilverlightVersion2 UInt8, SilverlightVersion3 UInt32, SilverlightVersion4 UInt16, PageCharset String, CodeVersion UInt32, IsLink UInt8, IsDownload UInt8, IsNotBounce UInt8, FUniqID UInt64, HID UInt32, IsOldCounter UInt8, IsEvent UInt8, IsParameter UInt8, DontCountHits UInt8, WithHash UInt8, HitColor FixedString(1), UTCEventTime DateTime, Age UInt8, Sex UInt8, Income UInt8, Interests UInt16, Robotness UInt8, GeneralInterests Array(UInt16), RemoteIP UInt32, RemoteIP6 FixedString(16), WindowName Int32, OpenerName Int32, HistoryLength Int16, BrowserLanguage FixedString(2), BrowserCountry FixedString(2), SocialNetwork String, SocialAction String, HTTPError UInt16, SendTiming Int32, DNSTiming Int32, ConnectTiming Int32, ResponseStartTiming Int32, ResponseEndTiming Int32, FetchTiming Int32, RedirectTiming Int32, DOMInteractiveTiming Int32, DOMContentLoadedTiming Int32, DOMCompleteTiming Int32, LoadEventStartTiming Int32, LoadEventEndTiming Int32, NSToDOMContentLoadedTiming Int32, FirstPaintTiming Int32, RedirectCount Int8, SocialSourceNetworkID UInt8, SocialSourcePage String, ParamPrice Int64, ParamOrderID String, ParamCurrency FixedString(3), ParamCurrencyID UInt16, GoalsReached Array(UInt32), OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, RefererHash UInt64, URLHash UInt64, CLID UInt32, YCLID UInt64, ShareService String, ShareURL String, ShareTitle String, `ParsedParams.Key1` Array(String), `ParsedParams.Key2` Array(String), `ParsedParams.Key3` Array(String), `ParsedParams.Key4` Array(String), `ParsedParams.Key5` Array(String), `ParsedParams.ValueDouble` Array(Float64), IslandID FixedString(16), RequestNum UInt32, RequestTry UInt8) ENGINE = MergeTree PARTITION BY toYYYYMM(EventDate) SAMPLE BY intHash32(UserID) ORDER BY (CounterID, EventDate, intHash32(UserID), EventTime); + + CREATE TABLE test.visits ( CounterID UInt32, StartDate Date, Sign Int8, IsNew UInt8, VisitID UInt64, UserID UInt64, StartTime DateTime, Duration UInt32, UTCStartTime DateTime, PageViews Int32, Hits Int32, IsBounce UInt8, Referer String, StartURL String, RefererDomain String, StartURLDomain String, EndURL String, LinkURL String, IsDownload UInt8, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, PlaceID Int32, RefererCategories Array(UInt16), URLCategories Array(UInt16), URLRegions Array(UInt32), RefererRegions Array(UInt32), IsYandex UInt8, GoalReachesDepth Int32, GoalReachesURL Int32, GoalReachesAny Int32, SocialSourceNetworkID UInt8, SocialSourcePage String, MobilePhoneModel String, ClientEventTime DateTime, RegionID UInt32, ClientIP UInt32, ClientIP6 FixedString(16), RemoteIP UInt32, RemoteIP6 FixedString(16), IPNetworkID UInt32, SilverlightVersion3 UInt32, CodeVersion UInt32, ResolutionWidth UInt16, ResolutionHeight UInt16, UserAgentMajor UInt16, UserAgentMinor UInt16, WindowClientWidth UInt16, WindowClientHeight UInt16, SilverlightVersion2 UInt8, SilverlightVersion4 UInt16, FlashVersion3 UInt16, FlashVersion4 UInt16, ClientTimeZone Int16, OS UInt8, UserAgent UInt8, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, NetMajor UInt8, NetMinor UInt8, MobilePhone UInt8, SilverlightVersion1 UInt8, Age UInt8, Sex UInt8, Income UInt8, JavaEnable UInt8, CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, BrowserLanguage UInt16, BrowserCountry UInt16, Interests UInt16, Robotness UInt8, GeneralInterests Array(UInt16), Params Array(String), `Goals.ID` Array(UInt32), `Goals.Serial` Array(UInt32), `Goals.EventTime` Array(DateTime), `Goals.Price` Array(Int64), `Goals.OrderID` Array(String), `Goals.CurrencyID` Array(UInt32), WatchIDs Array(UInt64), ParamSumPrice Int64, ParamCurrency FixedString(3), ParamCurrencyID UInt16, ClickLogID UInt64, ClickEventID Int32, ClickGoodEvent Int32, ClickEventTime DateTime, ClickPriorityID Int32, ClickPhraseID Int32, ClickPageID Int32, ClickPlaceID Int32, ClickTypeID Int32, ClickResourceID Int32, ClickCost UInt32, ClickClientIP UInt32, ClickDomainID UInt32, ClickURL String, ClickAttempt UInt8, ClickOrderID UInt32, ClickBannerID(UInt32, ClickMarketCategoryID UInt32, ClickMarketPP UInt32, ClickMarketCategoryName String, ClickMarketPPName String, ClickAWAPSCampaignName String, ClickPageName String, ClickTargetType(UInt16, ClickTargetPhraseID(UInt64, ClickContextType(UInt8, ClickSelectType(Int8, ClickOptions String, ClickGroupBannerID(Int32, OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID(String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign(String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, FirstVisit DateTime, PredLastVisit Date, LastVisit Date, TotalVisits(UInt32, `TraficSource.ID` Array(Int8), `TraficSource.SearchEngineID` Array(UInt16), `TraficSource.AdvEngineID` Array(UInt8), `TraficSource.PlaceID` Array(UInt16), `TraficSource.SocialSourceNetworkID` Array(UInt8), `TraficSource.Domain` Array(String), `TraficSource.SearchPhrase` Array(String), `TraficSource.SocialSourcePage` Array(String), Attendance FixedString(16), CLID UInt32, YCLID UInt64, NormalizedRefererHash UInt64, SearchPhraseHash UInt64, RefererDomainHash UInt64, NormalizedStartURLHash(UInt64, StartURLDomainHash UInt64, NormalizedEndURLHash UInt64, TopLevelDomain(UInt64, URLScheme(UInt64, OpenstatServiceNameHash UInt64, OpenstatCampaignIDHash UInt64, OpenstatAdIDHash(UInt64, OpenstatSourceIDHash(UInt64, UTMSourceHash(UInt64, UTMMediumHash(UInt64, UTMCampaignHash(UInt64, UTMContentHash(UInt64, UTMTermHash(UInt64, FromHash(UInt64, WebVisorEnabled(UInt8, WebVisorActivity(UInt32, `ParsedParams.Key1` Array(String), `ParsedParams.Key2(Array(String), `ParsedParams.Key3` Array(String), `ParsedParams.Key4` Array(String), `ParsedParams.Key5` Array(String), `ParsedParams.ValueDouble` Array(Float64), `Market.Type` Array(UInt8), `Market.GoalID` Array(UInt32), `Market.OrderID(Array(String), `Market.OrderPrice(Array(Int64), `Market.PP` Array(UInt32), `Market.DirectPlaceID` Array(UInt32), `Market.DirectOrderID(Array(UInt32), `Market.DirectBannerID(Array(UInt32), `Market.GoodID(Array(String), `Market.GoodName(Array(String), `Market.GoodQuantity` Array(Int32), `Market.GoodPrice(Array(Int64), IslandID FixedString(16)) ENGINE = CollapsingMergeTree(Sign) PARTITION BY toYYYYMM(StartDate) SAMPLE BY intHash32(UserID) ORDER BY (CounterID, StartDate, intHash32(UserID), VisitID); + + clickhouse-client --max_insert_block_size 100000 --query "INSERT INTO test.hits FORMAT TSV" < hits_v1.tsv + clickhouse-client --max_insert_block_size 100000 --query "INSERT INTO test.visits FORMAT TSV" < visits_v1.tsv + +## プルリクエストã®ä½œæˆ {#creating-pull-request} + +GitHubã®UIã§ãƒ•ã‚©ãƒ¼ã‚¯ãƒªãƒã‚¸ãƒˆãƒªã«ç§»å‹•ã—ã¾ã™ã€‚ä»–ã®ãƒ–ランãƒã§é–‹ç™ºã—ã¦ã„ã‚‹å ´åˆã¯ã€ãã®ãƒ–ランãƒã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"プルリクエスト"ボタンãŒç”»é¢ã«ã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯æœ¬è³ªçš„ã«ã€Œãƒ¡ã‚¤ãƒ³ãƒªãƒã‚¸ãƒˆãƒªã¸ã®å¤‰æ›´ã‚’å—ã‘入れるãŸã‚ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’作æˆã™ã‚‹ã€ã¨ã„ã†æ„味ã§ã™ã€‚ + +作業ãŒå®Œäº†ã—ã¦ã„ãªã„å ´åˆã§ã‚‚ã€ãƒ—ルリクエストを作æˆã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ã‚¿ã‚¤ãƒˆãƒ«ã®å†’é ­ã«ã€ŒWIPã€ï¼ˆä½œæ¥­ä¸­ï¼‰ã¨ã„ã†å˜èªžã‚’ç½®ã„ã¦ãã ã•ã„。ã“ã‚Œã¯å¾Œã§å¤‰æ›´ã§ãã¾ã™ã€‚変更ã®å…±åŒãƒ¬ãƒ“ューや議論ã€ãŠã‚ˆã³åˆ©ç”¨å¯èƒ½ãªã™ã¹ã¦ã®ãƒ†ã‚¹ãƒˆã®å®Ÿè¡Œã«å½¹ç«‹ã¡ã¾ã™ã€‚変更ã®ç°¡å˜ãªèª¬æ˜Žã‚’å¿…ãšæä¾›ã—ã¦ãã ã•ã„。ã“ã‚Œã¯å¾Œã§ãƒªãƒªãƒ¼ã‚¹ã®ãƒã‚§ãƒ³ã‚¸ãƒ­ã‚°ã‚’生æˆã™ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +ClickHouseã®ç¤¾å“¡ãŒãƒ—ルリクエストã«"テストå¯èƒ½"ã®ã‚¿ã‚°ã‚’付ã‘ã‚‹ã¨ã™ãã«ãƒ†ã‚¹ãƒˆãŒé–‹å§‹ã•ã‚Œã¾ã™ã€‚最åˆã®ã„ãã¤ã‹ã®ãƒã‚§ãƒƒã‚¯ã®çµæžœï¼ˆä¾‹ï¼šã‚³ãƒ¼ãƒ‰ã‚¹ã‚¿ã‚¤ãƒ«ï¼‰ã¯æ•°åˆ†ä»¥å†…ã«å±Šãã¾ã™ã€‚ビルドãƒã‚§ãƒƒã‚¯çµæžœã¯30分以内ã«å±Šãã¾ã™ã€‚主è¦ãªãƒ†ã‚¹ãƒˆã‚»ãƒƒãƒˆã¯1時間以内ã«å ±å‘Šã•ã‚Œã¾ã™ã€‚ + +システムã¯ãƒ—ルリクエストã”ã¨ã«ClickHouseãƒã‚¤ãƒŠãƒªãƒ“ルドを個別ã«æº–å‚™ã—ã¾ã™ã€‚[詳細]リンクをクリックã™ã‚‹ã¨ã€ã€Œãƒ“ルドã€ã®ã‚¨ãƒ³ãƒˆãƒªã®æ¨ªã«ã‚ã‚‹ãƒã‚§ãƒƒã‚¯ãƒªã‚¹ãƒˆãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ãã“ã«ã¯ãƒ“ルトã•ã‚ŒãŸ.debパッケージã®ç›´ãƒªãƒ³ã‚¯ãŒã‚ã‚Šã€å¿…è¦ã«å¿œã˜ã¦ãƒ—ロダクションサーãƒãƒ¼ã«ãƒ‡ãƒ—ロイã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼ˆæã‚Œãªã„å ´åˆï¼‰ã€‚ + +最åˆã®è©¦ã¿ã§ã¯ã€å› ã‚‹ã¨ã“ã‚多ãã®ãƒ“ルドãŒå¤±æ•—ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚我々ã¯gccã¨clangã®ä¸¡æ–¹ã§ãƒ“ルドをãƒã‚§ãƒƒã‚¯ã—ã€clangã§ã¯ã»ã¼ã™ã¹ã¦ã®è­¦å‘Šï¼ˆå¸¸ã«`-Werror`フラグ)を有効ã«ã—ã¦ã„ã¾ã™ã€‚ãã®åŒã˜ãƒšãƒ¼ã‚¸ã§ã€ã™ã¹ã¦ã®ãƒ“ルドログãŒè¦‹ã¤ã‹ã‚‹ã®ã§ã€å…¨ã¦ã®å¯èƒ½ãªæ–¹æ³•ã§ClickHouseをビルドã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## ClickHouseソースコードを見る {#browse-clickhouse-source-code} + +GitHubã®çµ±åˆã‚³ãƒ¼ãƒ‰ãƒ–ラウザを[ã“ã¡ã‚‰ã§](https://github.dev/ClickHouse/ClickHouse)使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã¾ãŸã€é€šå¸¸ã®ã‚ˆã†ã«[GitHub](https://github.com/ClickHouse/ClickHouse)ã§ã‚½ãƒ¼ã‚¹ã‚’閲覧ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ diff --git a/docs/ja/development/images/concurrency.png b/docs/ja/development/images/concurrency.png new file mode 100644 index 00000000000..ffd344a54fb Binary files /dev/null and b/docs/ja/development/images/concurrency.png differ diff --git a/docs/ja/development/images/find-build-artifact.png b/docs/ja/development/images/find-build-artifact.png new file mode 100644 index 00000000000..dc52e92c319 Binary files /dev/null and b/docs/ja/development/images/find-build-artifact.png differ diff --git a/docs/ja/development/integrating_rust_libraries.md b/docs/ja/development/integrating_rust_libraries.md new file mode 100644 index 00000000000..e1e8f9f5885 --- /dev/null +++ b/docs/ja/development/integrating_rust_libraries.md @@ -0,0 +1,72 @@ +--- +slug: /ja/development/integrating_rust_libraries +--- +# Rustライブラリã®çµ±åˆ + +Rustライブラリã®çµ±åˆã¯ã€BLAKE3ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®çµ±åˆã‚’基ã«èª¬æ˜Žã—ã¾ã™ã€‚ + +çµ±åˆã®æœ€åˆã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ã€ãƒ©ã‚¤ãƒ–ラリを/rustフォルダã«è¿½åŠ ã™ã‚‹ã“ã¨ã§ã™ã€‚ã“れを行ã†ã«ã¯ã€ç©ºã®Rustプロジェクトを作æˆã—ã€Cargo.tomlã«å¿…è¦ãªãƒ©ã‚¤ãƒ–ラリをå«ã‚ã¾ã™ã€‚ã¾ãŸã€æ–°ã—ã„ライブラリã®ã‚³ãƒ³ãƒ‘イルをé™çš„ã«è¨­å®šã™ã‚‹ãŸã‚ã«ã€Cargo.tomlã«`crate-type = ["staticlib"]`を追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +次ã«ã€Corrosionライブラリを使用ã—ã¦CMakeã«ãƒ©ã‚¤ãƒ–ラリをリンクã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚最åˆã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ã€/rustフォルダ内ã®CMakeLists.txtã«ãƒ©ã‚¤ãƒ–ラリフォルダを追加ã™ã‚‹ã“ã¨ã§ã™ã€‚ãã®å¾Œã€ãƒ©ã‚¤ãƒ–ラリディレクトリã«CMakeLists.txtファイルを追加ã—ã¾ã™ã€‚ã“ã®ä¸­ã§ã€Corrosionã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆé–¢æ•°ã‚’呼ã³å‡ºã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚BLAKE3をインãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ä»¥ä¸‹ã®è¡ŒãŒä½¿ç”¨ã•ã‚Œã¾ã—ãŸï¼š + +``` +corrosion_import_crate(MANIFEST_PATH Cargo.toml NO_STD) + +target_include_directories(_ch_rust_blake3 INTERFACE include) +add_library(ch_rust::blake3 ALIAS _ch_rust_blake3) +``` + +ã“ã®ã‚ˆã†ã«ã—ã¦ã€Corrosionを使用ã—ã¦æ­£ã—ã„CMakeターゲットを作æˆã—ã€ãã®å¾Œã‚ˆã‚Šä¾¿åˆ©ãªåå‰ã«ãƒªãƒãƒ¼ãƒ ã—ã¾ã™ã€‚ãªãŠã€åå‰ã®`_ch_rust_blake3`ã¯Cargo.tomlã‹ã‚‰æ¥ã¦ãŠã‚Šã€ãƒ—ロジェクトå(`name = "_ch_rust_blake3"`)ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +Rustã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯C/C++ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨äº’æ›æ€§ãŒãªã„ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã—ã€ãƒ©ã‚¤ãƒ–ラリメソッドを呼ã³å‡ºã—ã€å‡ºåŠ›ãƒ‡ãƒ¼ã‚¿ã‚’逆変æ›ã™ã‚‹ãŸã‚ã®Shimメソッドを空ã®ãƒ©ã‚¤ãƒ–ラリプロジェクトã§ä½œæˆã—ã¾ã™ã€‚例ãˆã°ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯BLAKE3ã®ãŸã‚ã«æ›¸ã‹ã‚Œã¾ã—ãŸï¼š + +``` +#[no_mangle] +pub unsafe extern "C" fn blake3_apply_shim( + begin: *const c_char, + _size: u32, + out_char_data: *mut u8, +) -> *mut c_char { + if begin.is_null() { + let err_str = CString::new("input was a null pointer").unwrap(); + return err_str.into_raw(); + } + let mut hasher = blake3::Hasher::new(); + let input_bytes = CStr::from_ptr(begin); + let input_res = input_bytes.to_bytes(); + hasher.update(input_res); + let mut reader = hasher.finalize_xof(); + reader.fill(std::slice::from_raw_parts_mut(out_char_data, blake3::OUT_LEN)); + std::ptr::null_mut() +} +``` + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯C互æ›ã®æ–‡å­—列ã€ãã®ã‚µã‚¤ã‚ºã€å‡ºåŠ›æ–‡å­—列ãƒã‚¤ãƒ³ã‚¿ã‚’入力ã¨ã—ã¦å–å¾—ã—ã¾ã™ã€‚ãã‚Œã‹ã‚‰ã€C互æ›ã®å…¥åŠ›ã‚’実際ã®ãƒ©ã‚¤ãƒ–ラリメソッドã§ä½¿ç”¨ã•ã‚Œã‚‹åž‹ã«å¤‰æ›ã—ã€ãれらを呼ã³å‡ºã—ã¾ã™ã€‚ãã®å¾Œã€ãƒ©ã‚¤ãƒ–ラリメソッドã®å‡ºåŠ›ã‚’C互æ›ã®åž‹ã«æˆ»ã—ã¦å¤‰æ›ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ã“ã®ç‰¹å®šã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ãƒ©ã‚¤ãƒ–ラリãŒfill()メソッドã«ã‚ˆã‚‹ãƒã‚¤ãƒ³ã‚¿ã¸ã®ç›´æŽ¥æ›¸ãè¾¼ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ãŸãŸã‚ã€å¤‰æ›ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚ã“ã“ã§ã®ä¸»ãªã‚¢ãƒ‰ãƒã‚¤ã‚¹ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚’å°‘ãªã作æˆã™ã‚‹ã“ã¨ã§ã€å„メソッド呼ã³å‡ºã—ã®å¤‰æ›ã‚’å°‘ãªãã—ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’ã‚ã¾ã‚Šä½œæˆã—ãªã„よã†ã«ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +`#[no_mangle]`属性ã¨`extern "C"`ã¯ã€ã™ã¹ã¦ã®ãã®ã‚ˆã†ãªãƒ¡ã‚½ãƒƒãƒ‰ã«å¿…é ˆã§ã™ã€‚ã“れらãŒãªã‘ã‚Œã°ã€æ­£ã—ã„C/C++互æ›ã®ã‚³ãƒ³ãƒ‘イルを行ã†ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã•ã‚‰ã«ã€ãれらã¯çµ±åˆã®æ¬¡ã®ã‚¹ãƒ†ãƒƒãƒ—ã«å¿…è¦ã§ã™ã€‚ + +Shimメソッドã®ã‚³ãƒ¼ãƒ‰ã‚’記述ã—ãŸå¾Œã€ãƒ©ã‚¤ãƒ–ラリã®ãƒ˜ãƒƒãƒ€ãƒ¼ãƒ•ã‚¡ã‚¤ãƒ«ã‚’準備ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯æ‰‹å‹•ã§è¡Œã†ã“ã¨ã‚‚ã€cbindgenライブラリを使用ã—ã¦è‡ªå‹•ç”Ÿæˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚cbindgenを使用ã™ã‚‹å ´åˆã€build.rsビルドスクリプトを書ãã€cbindgenをビルドä¾å­˜ã¨ã—ã¦å«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ヘッダーファイルを自動生æˆã§ãるビルドスクリプトã®ä¾‹ï¼š + +``` + let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); + + let package_name = env::var("CARGO_PKG_NAME").unwrap(); + let output_file = ("include/".to_owned() + &format!("{}.h", package_name)).to_string(); + + match cbindgen::generate(&crate_dir) { + Ok(header) => { + header.write_to_file(&output_file); + } + Err(err) => { + panic!("{}", err) + } + } +``` + +ã¾ãŸã€ã™ã¹ã¦ã®C互æ›å±žæ€§ã«ã¯`#[no_mangle]`ãŠã‚ˆã³`extern "C"`属性を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚ŒãŒãªã„ã¨ã€ãƒ©ã‚¤ãƒ–ラリã¯èª¤ã£ã¦ã‚³ãƒ³ãƒ‘イルã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€cbindgenã¯ãƒ˜ãƒƒãƒ€ãƒ¼ã®è‡ªå‹•ç”Ÿæˆã‚’èµ·å‹•ã—ã¾ã›ã‚“。 + +ã“れらã™ã¹ã¦ã®ã‚¹ãƒ†ãƒƒãƒ—ã®å¾Œã€å°ã•ãªãƒ—ロジェクトã§ãƒ©ã‚¤ãƒ–ラリをテストã—ã¦ã€äº’æ›æ€§ã‚„ヘッダー生æˆã®å•é¡Œã‚’ã™ã¹ã¦è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ヘッダー生æˆä¸­ã«å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€cbindgen.tomlファイルã§è¨­å®šã‚’試ã¿ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆãƒ†ãƒ³ãƒ—レートã¯ã“ã¡ã‚‰ï¼š[https://github.com/eqrion/cbindgen/blob/master/template.toml](https://github.com/eqrion/cbindgen/blob/master/template.toml))。 + +BLAKE3ã®çµ±åˆæ™‚ã«ç™ºç”Ÿã—ãŸå•é¡Œã¨ã—ã¦ã€MemorySanitizerãŒã‚る変数ãŒRustã§åˆæœŸåŒ–ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’確èªã§ããªã„ãŸã‚ã€å½é™½æ€§ã®ãƒ¬ãƒãƒ¼ãƒˆã‚’生æˆã™ã‚‹ã“ã¨ãŒã‚ã‚‹ã“ã¨ã¯æ³¨æ„ã™ã¹ãã§ã™ã€‚ã“ã‚Œã¯ã€å¤‰æ•°ã®ã‚ˆã‚Šæ˜Žç¤ºçš„ãªå®šç¾©ã‚’æŒã¤ãƒ¡ã‚½ãƒƒãƒ‰ã‚’記述ã™ã‚‹ã“ã¨ã§è§£æ±ºã•ã‚Œã¾ã—ãŸãŒã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®å®Ÿè£…ã¯é…ãã€MemorySanitizerビルドを修正ã™ã‚‹ãŸã‚ã«ã®ã¿ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/development/style.md b/docs/ja/development/style.md new file mode 100644 index 00000000000..c038dc2ef61 --- /dev/null +++ b/docs/ja/development/style.md @@ -0,0 +1,870 @@ +--- +slug: /ja/development/style +sidebar_position: 71 +sidebar_label: C++ ガイド +description: コーディングスタイルã€å‘½åè¦å‰‡ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãªã©ã«é–¢ã™ã‚‹æŽ¨å¥¨äº‹é …ã®ä¸€è¦§ +--- + +# C++ コードã®æ›¸ãæ–¹ + +## 一般的ãªæŽ¨å¥¨äº‹é … {#general-recommendations} + +**1.** 以下ã®å†…容ã¯æŽ¨å¥¨äº‹é …ã§ã‚ã‚Šã€å¿…é ˆã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +**2.** コードを編集ã™ã‚‹å ´åˆã¯ã€æ—¢å­˜ã®ã‚³ãƒ¼ãƒ‰ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¾“ã†ã®ãŒç†ã«ã‹ãªã£ã¦ã„ã¾ã™ã€‚ + +**3.** コードスタイルã¯ä¸€è²«æ€§ã®ãŸã‚ã«å¿…è¦ã§ã™ã€‚一貫性ãŒã‚ã‚‹ã“ã¨ã§ã‚³ãƒ¼ãƒ‰ã‚’読ã¿ã‚„ã™ãã—ã€ã‚³ãƒ¼ãƒ‰æ¤œç´¢ã‚‚容易ã«ãªã‚Šã¾ã™ã€‚ + +**4.** 多ãã®ãƒ«ãƒ¼ãƒ«ã«ã¯è«–ç†çš„ãªç†ç”±ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€ç¢ºç«‹ã•ã‚ŒãŸæ…£è¡Œã«å¾“ã£ã¦ã„ã¾ã™ã€‚ + +## フォーマット {#formatting} + +**1.** `clang-format` ã«ã‚ˆã‚Šã€ã»ã¨ã‚“ã©ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯è‡ªå‹•çš„ã«è¡Œã‚ã‚Œã¾ã™ã€‚ + +**2.** インデントã¯4スペースã§ã™ã€‚タブã§4スペースãŒè¿½åŠ ã•ã‚Œã‚‹ã‚ˆã†é–‹ç™ºç’°å¢ƒã‚’設定ã—ã¦ãã ã•ã„。 + +**3.** 開閉中括弧ã¯åˆ¥è¡Œã«ç½®ã‹ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +``` cpp +inline void readBoolText(bool & x, ReadBuffer & buf) +{ + char tmp = '0'; + readChar(tmp, buf); + x = tmp != '0'; +} +``` + +**4.** 関数ã®æœ¬ä½“全体ãŒå˜ä¸€ã® `statement` ã§ã‚ã‚‹å ´åˆã€ãれをå˜ä¸€è¡Œã«ç½®ãã“ã¨ãŒã§ãã¾ã™ã€‚中括弧ã®å‘¨ã‚Šã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’ç½®ã„ã¦ãã ã•ã„(行末ã®ã‚¹ãƒšãƒ¼ã‚¹ã‚’除ã„ã¦ï¼‰ã€‚ + +``` cpp +inline size_t mask() const { return buf_size() - 1; } +inline size_t place(HashValue x) const { return x & mask(); } +``` + +**5.** 関数ã®å ´åˆã€æ‹¬å¼§ã®å‘¨ã‚Šã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’入れãªã„ã§ãã ã•ã„。 + +``` cpp +void reinsert(const Value & x) +``` + +``` cpp +memcpy(&buf[place_value], &x, sizeof(x)); +``` + +**6.** `if`ã€`for`ã€`while` ãªã©ã®å¼ã§ã¯ã€é–‹ã括弧ã®å‰ã«ã‚¹ãƒšãƒ¼ã‚¹ãŒæŒ¿å…¥ã•ã‚Œã¾ã™ï¼ˆé–¢æ•°å‘¼ã³å‡ºã—ã¨ã¯å¯¾ç…§çš„ã«ï¼‰ã€‚ + +``` cpp +for (size_t i = 0; i < rows; i += storage.index_granularity) +``` + +**7.** 二項演算å­ï¼ˆ`+`ã€`-`ã€`*`ã€`/`ã€`%`ã€...)ã¨ä¸‰é …æ¼”ç®—å­ `?:` ã®å‘¨ã‚Šã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’追加ã—ã¦ãã ã•ã„。 + +``` cpp +UInt16 year = (s[0] - '0') * 1000 + (s[1] - '0') * 100 + (s[2] - '0') * 10 + (s[3] - '0'); +UInt8 month = (s[5] - '0') * 10 + (s[6] - '0'); +UInt8 day = (s[8] - '0') * 10 + (s[9] - '0'); +``` + +**8.** 改行ãŒå…¥ã‚‹å ´åˆã¯ã€æ¼”ç®—å­ã‚’æ–°ã—ã„è¡Œã«ç½®ãã€ãã®å‰ã«ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã‚’増やã—ã¾ã™ã€‚ + +``` cpp +if (elapsed_ns) + message << " (" + << rows_read_on_server * 1000000000 / elapsed_ns << " rows/s., " + << bytes_read_on_server * 1000.0 / elapsed_ns << " MB/s.) "; +``` + +**9.** å¿…è¦ã«å¿œã˜ã¦ã€è¡Œå†…ã®æ•´åˆ—ã®ãŸã‚ã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +``` cpp +dst.ClickLogID = click.LogID; +dst.ClickEventID = click.EventID; +dst.ClickGoodEvent = click.GoodEvent; +``` + +**10.** æ¼”ç®—å­ `.`ã€`->` ã®å‘¨ã‚Šã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’使用ã—ãªã„ã§ãã ã•ã„。 + +å¿…è¦ã§ã‚ã‚Œã°ã€æ¼”ç®—å­ã‚’次ã®è¡Œã«åŒ…ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€å‰ã«ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã‚’増やã—ã¾ã™ã€‚ + +**11.** å˜é …演算å­ï¼ˆ`--`ã€`++`ã€`*`ã€`&`ã€...)を引数ã‹ã‚‰åˆ†é›¢ã™ã‚‹ãŸã‚ã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’使用ã—ãªã„ã§ãã ã•ã„。 + +**12.** コンマã®å¾Œã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’入れã€å‰ã«ã¯å…¥ã‚Œãªã„ã§ãã ã•ã„。åŒã˜ãƒ«ãƒ¼ãƒ«ã¯ `for` å¼å†…ã®ã‚»ãƒŸã‚³ãƒ­ãƒ³ã«ã‚‚当ã¦ã¯ã¾ã‚Šã¾ã™ã€‚ + +**13.** `[]` 演算å­ã‚’分離ã™ã‚‹ãŸã‚ã®ã‚¹ãƒšãƒ¼ã‚¹ã‚’使用ã—ãªã„ã§ãã ã•ã„。 + +**14.** `template <...>` å¼ã§ã¯ã€`template` 㨠`<` ã®é–“ã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’使用ã—ã€`<` ã®ç›´å¾Œã¾ãŸã¯ `>` ã®ç›´å‰ã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’入れãªã„ã§ãã ã•ã„。 + +``` cpp +template +struct AggregatedStatElement +{} +``` + +**15.** クラスや構造体ã§ã¯ã€`public`ã€`private`ã€`protected` ã‚’ `class/struct` ã¨åŒã˜ãƒ¬ãƒ™ãƒ«ã«æ›¸ãã€ãれ以外ã®ã‚³ãƒ¼ãƒ‰ã¯ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã—ã¾ã™ã€‚ + +``` cpp +template +class MultiVersion +{ +public: + /// Version of object for usage. shared_ptr manage lifetime of version. + using Version = std::shared_ptr; + ... +} +``` + +**16.** ファイル全体ã§åŒã˜ `namespace` ãŒä½¿ç”¨ã•ã‚Œã€ä»–ã«é‡è¦ãªã“ã¨ãŒãªã‘ã‚Œã°ã€`namespace` 内ã§ã®ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã¯ä¸è¦ã§ã™ã€‚ + +**17.** `if`ã€`for`ã€`while`ã€ãã®ä»–ã®å¼ã®ãƒ–ロックãŒå˜ä¸€ã® `statement` ã§æ§‹æˆã•ã‚Œã¦ã„ã‚‹å ´åˆã€ä¸­æ‹¬å¼§ã¯ã‚ªãƒ—ションã§ã™ã€‚`statement` を別行ã«ç½®ã„ã¦ãã ã•ã„。ã“ã®ãƒ«ãƒ¼ãƒ«ã¯ãƒã‚¹ãƒˆã•ã‚ŒãŸ `if`ã€`for`ã€`while` ã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +ã—ã‹ã—ã€å†…部 `statement` ã«ä¸­æ‹¬å¼§ã‚„ `else` ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€å¤–部ブロックã¯ä¸­æ‹¬å¼§ã§æ›¸ã‹ã‚Œã‚‹ã¹ãã§ã™ã€‚ + +``` cpp +/// Finish write. +for (auto & stream : streams) + stream.second->finalize(); +``` + +**18.** 行末ã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’入れãªã„ã§ãã ã•ã„。 + +**19.** ソースファイル㯠UTF-8 エンコードã§ã™ã€‚ + +**20.** éžASCII文字ã¯æ–‡å­—列リテラル内ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +``` cpp +<< ", " << (timer.elapsed() / chunks_stats.hits) << " μsec/hit."; +``` + +**21.** å˜ä¸€è¡Œã«è¤‡æ•°ã®å¼ã‚’書ã‹ãªã„ã§ãã ã•ã„。 + +**22.** 関数内ã®ã‚³ãƒ¼ãƒ‰ã‚’セクションã§ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã€æœ€å¤§ã§1ã¤ã®ç©ºè¡Œã§åˆ†é›¢ã—ã¾ã™ã€‚ + +**23.** 関数ã€ã‚¯ãƒ©ã‚¹ãªã©ã‚’1è¡Œã¾ãŸã¯2è¡Œã®ç©ºè¡Œã§åˆ†é›¢ã—ã¾ã™ã€‚ + +**24.** `A const`(値ã«é–¢é€£ã™ã‚‹ã‚‚ã®ï¼‰ã¯åž‹åã®å‰ã«æ›¸ã‹ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +``` cpp +//æ­£ã—ã„書ãæ–¹ +const char * pos +const std::string & s +//誤ã£ãŸæ›¸ãæ–¹ +char const * pos +``` + +**25.** ãƒã‚¤ãƒ³ã‚¿ã¾ãŸã¯å‚照を宣言ã™ã‚‹ã¨ãã€`*` ãŠã‚ˆã³ `&` 記å·ã¯ä¸¡å´ã«ã‚¹ãƒšãƒ¼ã‚¹ã§åˆ†é›¢ã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +``` cpp +//æ­£ã—ã„書ãæ–¹ +const char * pos +//誤ã£ãŸæ›¸ãæ–¹ +const char* pos +const char *pos +``` + +**26.** テンプレート型を使用ã™ã‚‹å ´åˆã€ï¼ˆæœ€ã‚‚ç°¡å˜ãªå ´åˆã‚’除ã„ã¦ï¼‰`using` キーワードã§ã‚¨ã‚¤ãƒªã‚¢ã‚¹åŒ–ã—ã¦ãã ã•ã„。 + +別ã®è¨€ã„方をã™ã‚‹ã¨ã€ãƒ†ãƒ³ãƒ—レートパラメータ㯠`using` ã«ã®ã¿æŒ‡å®šã•ã‚Œã€ã‚³ãƒ¼ãƒ‰å†…ã§ç¹°ã‚Šè¿”ã•ã‚Œã¾ã›ã‚“。 + +`using` ã¯é–¢æ•°å†…ãªã©ã§ãƒ­ãƒ¼ã‚«ãƒ«ã«å®£è¨€ã§ãã¾ã™ã€‚ + +``` cpp +//æ­£ã—ã„書ãæ–¹ +using FileStreams = std::map>; +FileStreams streams; +//誤ã£ãŸæ›¸ãæ–¹ +std::map> streams; +``` + +**27.** ç•°ãªã‚‹åž‹ã®è¤‡æ•°ã®å¤‰æ•°ã‚’一度ã«å®£è¨€ã—ãªã„ã§ãã ã•ã„。 + +``` cpp +//誤ã£ãŸæ›¸ãæ–¹ +int x, *y; +``` + +**28.** C スタイルã®ã‚­ãƒ£ã‚¹ãƒˆã‚’使用ã—ãªã„ã§ãã ã•ã„。 + +``` cpp +//誤ã£ãŸæ›¸ãæ–¹ +std::cerr << (int)c <<; std::endl; +//æ­£ã—ã„書ãæ–¹ +std::cerr << static_cast(c) << std::endl; +``` + +**29.** クラスや構造体ã§ã¯ã€ãƒ¡ãƒ³ãƒãƒ¼ã¨é–¢æ•°ã‚’ãã‚Œãžã‚Œã®å¯è¦–範囲内ã§åˆ¥ã€…ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã¾ã™ã€‚ + +**30.** å°ã•ã„クラスや構造体ã§ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å®£è¨€ã¨å®Ÿè£…を分ã‘ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +ã©ã®ã‚¯ãƒ©ã‚¹ã‚„構造体ã§ã‚‚å°ã•ãªãƒ¡ã‚½ãƒƒãƒ‰ã«ã¯åŒæ§˜ã§ã™ã€‚ + +テンプレートクラスや構造体ã§ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å®£è¨€ã¨å®Ÿè£…を分ã‘ãªã„ã§ãã ã•ã„(ãã†ã—ãªã„ã¨ã€åŒã˜ç¿»è¨³å˜ä½ã«å®šç¾©ã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“)。 + +**31.** 140文字ã§æ”¹è¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€80文字ã§ã¯ãªã。 + +**32.** 後置インクリメント/デクリメント演算å­ãŒå¿…è¦ãªã„å ´åˆã¯ã€å¸¸ã«å‰ç½®ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆ/デクリメント演算å­ã‚’使用ã—ã¦ãã ã•ã„。 + +``` cpp +for (Names::const_iterator it = column_names.begin(); it != column_names.end(); ++it) +``` + +## コメント {#comments} + +**1.** 複雑ãªéƒ¨åˆ†ã®ã‚³ãƒ¼ãƒ‰ã«ã¯å¿…ãšã‚³ãƒ¡ãƒ³ãƒˆã‚’追加ã—ã¦ãã ã•ã„。 + +ã“ã‚Œã¯éžå¸¸ã«é‡è¦ã§ã™ã€‚コメントを書ãã“ã¨ã§ã€ãã®ã‚³ãƒ¼ãƒ‰ãŒä¸è¦ã§ã‚ã‚‹ã‹ã€è¨­è¨ˆãŒé–“é•ã£ã¦ã„ã‚‹ã“ã¨ã«æ°—付ãå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +``` cpp +/** 使用ã§ãるメモリã®éƒ¨åˆ†ã€‚ + * 例ãˆã°ã€internal_buffer ㌠1MB ã§ã€èª­ã¿è¾¼ã¿ã®ãŸã‚ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒãƒƒãƒ•ã‚¡ã« 10 ãƒã‚¤ãƒˆã—ã‹ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ãªã„å ´åˆã€ + * working_buffer ã¯10ãƒã‚¤ãƒˆã®ã‚µã‚¤ã‚ºã‚’æŒã¡ã¾ã™ã€‚ + * (working_buffer.end() ã¯èª­ã¿å–ã‚Šå¯èƒ½ãª10ãƒã‚¤ãƒˆã®ç›´å¾Œã®ä½ç½®ã‚’指ã—ã¾ã™ï¼‰ã€‚ + */ +``` + +**2.** コメントã¯å¿…è¦ã«å¿œã˜ã¦è©³ç´°ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +**3.** コメントã¯ã€ãã®èª¬æ˜Žå¯¾è±¡ã‚³ãƒ¼ãƒ‰ã®å‰ã«ç½®ã„ã¦ãã ã•ã„。ã¾ã‚Œã«ã€åŒã˜è¡Œå†…ã®ã‚³ãƒ¼ãƒ‰ã®å¾Œã«ç½®ãã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +``` cpp +/** クエリを解æžã—ã€å®Ÿè¡Œã—ã¾ã™ã€‚ +*/ +void executeQuery( + ReadBuffer & istr, /// クエリを(INSERTã®å ´åˆã¯ãƒ‡ãƒ¼ã‚¿ã‚‚)読ã¿è¾¼ã‚€å ´æ‰€ + WriteBuffer & ostr, /// çµæžœã‚’書ã込む場所 + Context & context, /// DBã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ‡ãƒ¼ã‚¿åž‹ã€ã‚¨ãƒ³ã‚¸ãƒ³ã€é–¢æ•°ã€é›†è¨ˆé–¢æ•°... + BlockInputStreamPtr & query_plan, /// クエリãŒã©ã®ã‚ˆã†ã«å®Ÿè¡Œã•ã‚ŒãŸã‹ã®èª¬æ˜ŽãŒã“ã“ã«æ›¸ã‹ã‚Œã‚‹ + QueryProcessingStage::Enum stage = QueryProcessingStage::Complete /// SELECT クエリをã©ã®æ®µéšŽã¾ã§å‡¦ç†ã™ã‚‹ã‹ + ) +``` + +**4.** コメントã¯è‹±èªžã§ã®ã¿æ›¸ã‹ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**5.** ライブラリを書ã„ã¦ã„ã‚‹å ´åˆã¯ã€ãƒ¡ã‚¤ãƒ³ãƒ˜ãƒƒãƒ€ãƒ¼ãƒ•ã‚¡ã‚¤ãƒ«ã«è©³ã—ã„説明コメントをå«ã‚ã¦ãã ã•ã„。 + +**6.** 追加情報をæä¾›ã—ãªã„コメントを追加ã—ãªã„ã§ãã ã•ã„。特ã«ã€ä»¥ä¸‹ã®ã‚ˆã†ãªç©ºã‚³ãƒ¡ãƒ³ãƒˆã‚’残ã•ãªã„ã§ãã ã•ã„: + +``` cpp +/* +* Procedure Name: +* Original procedure name: +* Author: +* Date of creation: +* Dates of modification: +* Modification authors: +* Original file name: +* Purpose: +* Intent: +* Designation: +* Classes used: +* Constants: +* Local variables: +* Parameters: +* Date of creation: +* Purpose: +*/ +``` + +例ã¯ãƒªã‚½ãƒ¼ã‚¹ http://home.tamk.fi/~jaalto/course/coding-style/doc/unmaintainable-code/ ã‹ã‚‰å¼•ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**7.** å„ファイルã®å†’é ­ã«ã¯ã€ä½œæˆè€…や作æˆæ—¥ãªã©ã®ã‚´ãƒŸã‚³ãƒ¡ãƒ³ãƒˆã‚’書ã‹ãªã„ã§ãã ã•ã„。 + +**8.** å˜ä¸€è¡Œã®ã‚³ãƒ¡ãƒ³ãƒˆã¯ä¸‰ã¤ã®ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ `///` ã§å§‹ã¾ã‚Šã€è¤‡æ•°è¡Œã®ã‚³ãƒ¡ãƒ³ãƒˆã¯ `/**` ã§å§‹ã¾ã‚Šã¾ã™ã€‚ã“れらã®ã‚³ãƒ¡ãƒ³ãƒˆã¯ã€Œãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã€ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +注æ„: Doxygen を使ã£ã¦ã“れらã®ã‚³ãƒ¡ãƒ³ãƒˆã‹ã‚‰ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’生æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã—ã‹ã—ã€é€šå¸¸ã¯IDEã§ã‚³ãƒ¼ãƒ‰ã‚’ナビゲートã™ã‚‹æ–¹ãŒä¾¿åˆ©ã§ã™ã€‚ + +**9.** 複数行ã®ã‚³ãƒ¡ãƒ³ãƒˆã¯ã€å†’é ­ã¨æœ«å°¾ã«ç©ºè¡Œã‚’ç½®ã‹ãªã„ã§ãã ã•ã„(複数行コメントを閉ã˜ã‚‹è¡Œã‚’除ã)。 + +**10.** コードをコメントアウトã™ã‚‹ãŸã‚ã«ã¯ã€åŸºæœ¬çš„ãªã‚³ãƒ¡ãƒ³ãƒˆã‚’使用ã—ã€ã€Œãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã€ã‚³ãƒ¡ãƒ³ãƒˆã‚’使ã‚ãªã„ã§ãã ã•ã„。 + +**11.** コミットå‰ã«ã¯ã‚³ãƒ¡ãƒ³ãƒˆã‚¢ã‚¦ãƒˆã•ã‚ŒãŸã‚³ãƒ¼ãƒ‰éƒ¨åˆ†ã‚’削除ã—ã¦ãã ã•ã„。 + +**12.** コメントやコードã«ä¸é©åˆ‡ãªè¨€è‘‰ã‚’使ã‚ãªã„ã§ãã ã•ã„。 + +**13.** 大文字を使用ã—ãªã„ã§ãã ã•ã„。éŽå‰°ãªå¥èª­ç‚¹ã‚’使ã‚ãªã„ã§ãã ã•ã„。 + +``` cpp +/// WHAT THE FAIL??? +``` + +**14.** コメントã§åŒºåˆ‡ã‚Šã‚’作らãªã„ã§ãã ã•ã„。 + +``` cpp +///****************************************************** +``` + +**15.** コメント内ã§è­°è«–を始ã‚ãªã„ã§ãã ã•ã„。 + +``` cpp +/// Why did you do this stuff? +``` + +**16.** ブロックãŒä½•ã§ã‚ã£ãŸã‹ã‚’最後ã«èª¬æ˜Žã™ã‚‹ã‚³ãƒ¡ãƒ³ãƒˆã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 + +``` cpp +/// for +``` + +## åå‰ {#names} + +**1.** 変数ã¨ã‚¯ãƒ©ã‚¹ãƒ¡ãƒ³ãƒãƒ¼ã®åå‰ã«ã¯å°æ–‡å­—ã¨ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã‚’使用ã—ã¦ãã ã•ã„。 + +``` cpp +size_t max_block_size; +``` + +**2.** 関数(メソッド)ã®åå‰ã«ã¯ã€å°æ–‡å­—ã§å§‹ã¾ã‚‹ã‚­ãƒ£ãƒ¡ãƒ«ã‚±ãƒ¼ã‚¹ã‚’使用ã—ã¦ãã ã•ã„。 + +``` cpp +std::string getName() const override { return "Memory"; } +``` + +**3.** クラス(構造体)ã®åå‰ã«ã¯ã€å¤§æ–‡å­—ã§å§‹ã¾ã‚‹ã‚­ãƒ£ãƒ¡ãƒ«ã‚±ãƒ¼ã‚¹ã‚’使用ã—ã¦ãã ã•ã„。インターフェイスã«ã¯ I 以外ã®ãƒ—レフィックスã¯ä½¿ç”¨ã—ã¾ã›ã‚“。 + +``` cpp +class StorageMemory : public IStorage +``` + +**4.** `using` ã¯ã‚¯ãƒ©ã‚¹ã¨åŒã˜ã‚ˆã†ã«å付ã‘られã¾ã™ã€‚ + +**5.** テンプレート型ã®å¼•æ•°ã®åå‰ã¯ã€ç°¡å˜ãªå ´åˆã«ã¯ `T`; `T`, `U`; `T1`, `T2`. を使用ã—ã¾ã™ã€‚ + +より複雑ãªå ´åˆã«ã¯ã€ã‚¯ãƒ©ã‚¹åã®è¦å‰‡ã«å¾“ã†ã‹ã€ãƒ—レフィックス `T` を追加ã—ã¾ã™ã€‚ + +``` cpp +template +struct AggregatedStatElement +``` + +**6.** テンプレート定数引数ã®åå‰ã¯ã€å¤‰æ•°åã®è¦å‰‡ã«å¾“ã†ã‹ã€ç°¡å˜ãªå ´åˆã«ã¯ `N` を使用ã—ã¾ã™ã€‚ + +``` cpp +template +struct ExtractDomain +``` + +**7.** 抽象クラス(インターフェース)ã®å ´åˆã€`I` プレフィックスを追加ã§ãã¾ã™ã€‚ + +``` cpp +class IProcessor +``` + +**8.** 変数をローカルã«ä½¿ç”¨ã™ã‚‹å ´åˆã€çŸ­ã„åå‰ã‚’使用ã§ãã¾ã™ã€‚ + +ä»–ã®ã™ã¹ã¦ã®å ´åˆã¯æ„味を説明ã™ã‚‹åå‰ã‚’使用ã—ã¦ãã ã•ã„。 + +``` cpp +bool info_successfully_loaded = false; +``` + +**9.** `define` やグローãƒãƒ«å®šæ•°ã®åå‰ã¯ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã‚’使用ã—㟠ALL_CAPS を使用ã—ã¾ã™ã€‚ + +``` cpp +#define MAX_SRC_TABLE_NAMES_TO_STORE 1000 +``` + +**10.** ファイルåã¯ãã®å†…容ã¨åŒã˜ã‚¹ã‚¿ã‚¤ãƒ«ã‚’使用ã—ã¾ã™ã€‚ + +ファイルãŒå˜ä¸€ã®ã‚¯ãƒ©ã‚¹ã‚’å«ã‚€å ´åˆã€ã‚¯ãƒ©ã‚¹ã¨åŒã˜ã‚ˆã†ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å付ã‘ã¾ã™ï¼ˆCamelCase)。 + +ファイルãŒå˜ä¸€ã®é–¢æ•°ã‚’å«ã‚€å ´åˆã€é–¢æ•°ã¨åŒã˜ã‚ˆã†ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å付ã‘ã¾ã™ï¼ˆcamelCase)。 + +**11.** åå‰ã«ç•¥èªžãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆï¼š + +- 変数åã®å ´åˆã€ç•¥èªžã¯å°æ–‡å­—ã®ã¾ã¾ `mysql_connection`(`mySQL_connection` ã§ã¯ãªã„)ã§ä½¿ç”¨ã—ã¾ã™ã€‚ +- クラスや関数ã®åå‰ã§ã¯ã€çœç•¥èªžã®å¤§æ–‡å­—を維æŒã™ã‚‹ `MySQLConnection`(`MySqlConnection` ã§ã¯ãªã„)。 + +**12.** クラスメンãƒãƒ¼ã‚’åˆæœŸåŒ–ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼å¼•æ•°ã¯ã€ã‚¯ãƒ©ã‚¹ãƒ¡ãƒ³ãƒãƒ¼ã¨åŒã˜ã‚ˆã†ã«å付ã‘ã¾ã™ãŒã€æœ«å°¾ã«ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã‚’付ã‘ã¦å付ã‘ã¾ã™ã€‚ + +``` cpp +FileQueueProcessor( + const std::string & path_, + const std::string & prefix_, + std::shared_ptr handler_) + : path(path_), + prefix(prefix_), + handler(handler_), + log(&Logger::get("FileQueueProcessor")) +{ +} +``` + +構造体ã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼æœ¬ä½“ã§ä½¿ç”¨ã•ã‚Œãªã„å ´åˆã¯ã€æœ«å°¾ã®ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã‚’çœãã“ã¨ãŒã§ãã¾ã™ã€‚ + +**13.** ローカル変数ã¨ã‚¯ãƒ©ã‚¹ãƒ¡ãƒ³ãƒãƒ¼ã«ã¯é•ã„ãŒã‚ã‚Šã¾ã›ã‚“(プレフィックスã¯ä¸è¦ã§ã™ï¼‰ã€‚ + +``` cpp +timer(`m_timer` ã§ã¯ãªã) +``` + +**14.** `enum` ã®å®šæ•°ã«ã¯ã€å¤§æ–‡å­—ã‹ã‚‰å§‹ã¾ã‚‹ CamelCase を使用ã—ã¾ã™ã€‚ALL_CAPS ã‚‚å—ã‘入れられã¾ã™ã€‚`enum` ãŒãƒ­ãƒ¼ã‚«ãƒ«ã§ãªã„å ´åˆã¯ã€`enum class` を使用ã—ã¦ãã ã•ã„。 + +``` cpp +enum class CompressionMethod +{ + QuickLZ = 0, + LZ4 = 1, +}; +``` + +**15.** ã™ã¹ã¦ã®åå‰ã¯è‹±èªžã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ヘブライ文字ã®ç¿»å­—ã¯è¨±å¯ã•ã‚Œã¾ã›ã‚“。 + + T_PAAMAYIM_NEKUDOTAYIMã§ã¯ã‚ã‚Šã¾ã›ã‚“ + +**16.** よã知られã¦ã„る略語ãŒè¨±å®¹ã•ã‚Œã¾ã™ï¼ˆç•¥èªžã®æ„味をウィキペディアや検索エンジンã§ç°¡å˜ã«è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã‚‹å ´åˆï¼‰ã€‚ + + `AST`ã€`SQL`。 + + `NVDH`(ランダムãªæ–‡å­—ã®åˆ—)ã§ã¯ãªã„ + +一般的ãªä½¿ç”¨ã§çŸ­ç¸®ã•ã‚ŒãŸå˜èªžã¯è¨±å®¹ã•ã‚Œã¾ã™ã€‚ + +略語ã®æ„味ãŒã‚³ãƒ¡ãƒ³ãƒˆã§ä½µè¨˜ã•ã‚Œã¦ã„ã‚‹å ´åˆã‚‚使用ã§ãã¾ã™ã€‚ + +**17.** C++ ソースコードã®ãƒ•ã‚¡ã‚¤ãƒ«åã«ã¯ `.cpp` æ‹¡å¼µå­ã‚’使ã‚ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ヘッダーファイルã«ã¯ `.h` æ‹¡å¼µå­ã‚’使ã‚ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +## コードã®æ›¸ãæ–¹ {#how-to-write-code} + +**1.** メモリ管ç†ã€‚ + +手動ã§ã®ãƒ¡ãƒ¢ãƒªã®è§£æ”¾ï¼ˆ`delete`)ã¯ãƒ©ã‚¤ãƒ–ラリコードã§ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ライブラリコードã§ã¯ã€`delete` 演算å­ã¯ãƒ‡ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã§ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚ + +アプリケーションコードã§ã¯ã€ãƒ¡ãƒ¢ãƒªã¯ãã®æ‰€æœ‰è€…ã§ã‚るオブジェクトãŒè§£æ”¾ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +例: + +- 最も簡å˜ãªã®ã¯ã€ã‚ªãƒ–ジェクトをスタックã«ç½®ãã‹ã€ä»–ã®ã‚¯ãƒ©ã‚¹ã®ãƒ¡ãƒ³ãƒãƒ¼ã«ã™ã‚‹ã“ã¨ã§ã™ã€‚ +- å°ã•ãªã‚ªãƒ–ジェクトã®å¤šãを扱ã†ãŸã‚ã«ã¯ã€ã‚³ãƒ³ãƒ†ãƒŠã‚’使用ã—ã¾ã™ã€‚ +- ヒープã«ã‚ã‚‹å°‘æ•°ã®ã‚ªãƒ–ジェクトã®è‡ªå‹•è§£æ”¾ã®ãŸã‚ã«ã¯ã€`shared_ptr/unique_ptr` を使用ã—ã¾ã™ã€‚ + +**2.** リソース管ç†ã€‚ + +`RAII` を使用ã—ã€ä¸Šè¨˜ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**3.** エラーãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°ã€‚ + +例外を使ã£ã¦ãã ã•ã„。ã»ã¨ã‚“ã©ã®å ´åˆã€ä¾‹å¤–を投ã’ã‚‹ã ã‘ã§ã‚­ãƒ£ãƒƒãƒã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“(`RAII` ã®ãŸã‚)。 + +オフラインデータ処ç†ã‚¢ãƒ—リケーションã§ã¯ã€ä¾‹å¤–をキャッãƒã—ãªã„ã“ã¨ãŒã—ã°ã—ã°è¨±å®¹ã•ã‚Œã¾ã™ã€‚ + +ユーザーリクエストを処ç†ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã§ã¯ã€é€šå¸¸ã€æŽ¥ç¶šãƒãƒ³ãƒ‰ãƒ©ã®æœ€ä¸Šä½ãƒ¬ãƒ™ãƒ«ã§ä¾‹å¤–をキャッãƒã™ã‚‹ã ã‘ã§å分ã§ã™ã€‚ + +スレッド関数内ã§ã¯ã€ã™ã¹ã¦ã®ä¾‹å¤–をキャッãƒã—ã¦ä¿æŒã—ã€`join` ã®å¾Œã«ãƒ¡ã‚¤ãƒ³ã‚¹ãƒ¬ãƒƒãƒ‰ã§å†ã‚¹ãƒ­ãƒ¼ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` cpp +/// 計算ãŒã¾ã è¡Œã‚ã‚Œã¦ã„ãªã„å ´åˆã€æœ€åˆã®ãƒ–ロックをåŒæœŸçš„ã«è¨ˆç®—ã—ã¾ã™ +if (!started) +{ + calculate(); + started = true; +} +else /// 計算ãŒã™ã§ã«é€²è¡Œä¸­ã§ã‚ã‚‹å ´åˆã€çµæžœã‚’å¾…ã¡ã¾ã™ + pool.wait(); + +if (exception) + exception->rethrow(); +``` + +例外を処ç†ã›ãšã«ç„¡è¦–ã—ãªã„ã§ãã ã•ã„。ãŸã ä¾‹å¤–をログã«å‡ºåŠ›ã™ã‚‹ã ã‘ã®è¡Œç‚ºã¯ã—ãªã„ã§ãã ã•ã„。 + +``` cpp +//æ­£ã—ãã‚ã‚Šã¾ã›ã‚“ +catch (...) {} +``` + +一部ã®ä¾‹å¤–を無視ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ç‰¹å®šã®ã‚‚ã®ã«é™å®šã—ã€æ®‹ã‚Šã¯å†ã‚¹ãƒ­ãƒ¼ã—ã¦ãã ã•ã„。 + +``` cpp +catch (const DB::Exception & e) +{ + if (e.code() == ErrorCodes::UNKNOWN_AGGREGATE_FUNCTION) + return nullptr; + else + throw; +} +``` + +応答コードや `errno` ã‚’æŒã¤é–¢æ•°ã‚’使用ã™ã‚‹å ´åˆã€å¸¸ã«çµæžœã‚’確èªã—ã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +``` cpp +if (0 != close(fd)) + throw ErrnoException(ErrorCodes::CANNOT_CLOSE_FILE, "Cannot close file {}", file_name); +``` + +コードã®ä¸å¤‰æ¡ä»¶ã‚’確èªã™ã‚‹ã«ã¯ã€ã‚¢ã‚µãƒ¼ãƒˆã‚’使用ã§ãã¾ã™ã€‚ + +**4.** 例外ã®ç¨®é¡žã€‚ + +アプリケーションコードã§ã®è¤‡é›‘ãªä¾‹å¤–階層を使用ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。例外ã®ãƒ†ã‚­ã‚¹ãƒˆã¯ã‚·ã‚¹ãƒ†ãƒ ç®¡ç†è€…ã«ç†è§£ã§ãã‚‹ã‚‚ã®ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ + +**5.** デストラクタã‹ã‚‰ã®ä¾‹å¤–ã®æŠ•ã’。 + +ã“ã‚Œã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“ãŒã€è¨±å¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +次ã®ã‚ªãƒ—ションを使用ã—ã¦ãã ã•ã„: + +- 例外を引ãèµ·ã“ã™å¯èƒ½æ€§ã®ã‚ã‚‹ã™ã¹ã¦ã®ä½œæ¥­ã‚’事å‰ã«è¡Œã† `done()` ã¾ãŸã¯ `finalize()` ã¨ã„ã†é–¢æ•°ã‚’作æˆã—ã¾ã™ã€‚ãã®é–¢æ•°ãŒå‘¼ã°ã‚ŒãŸå ´åˆã€å¾Œã®ãƒ‡ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã«ä¾‹å¤–ãŒãªã„ã¯ãšã§ã™ã€‚ +- 余りã«è¤‡é›‘ãªã‚¿ã‚¹ã‚¯ï¼ˆä¾‹ãˆã°ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®é€ä¿¡ï¼‰ã¯ã€ã‚¯ãƒ©ã‚¹ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒç ´å£Šå‰ã«å‘¼ã³å‡ºã™å¿…è¦ãŒã‚る別ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«ç½®ãã“ã¨ãŒã§ãã¾ã™ã€‚ +- デストラクタã§ä¾‹å¤–ãŒç™ºç”Ÿã—ãŸå ´åˆã€ï¼ˆãƒ­ã‚¬ãƒ¼ãŒåˆ©ç”¨å¯èƒ½ã§ã‚ã‚Œã°ï¼‰éš ã™ã‚ˆã‚Šã‚‚ログを残ã™æ–¹ãŒè‰¯ã„ã§ã™ã€‚ +- å˜ç´”ãªã‚¢ãƒ—リケーションã§ã¯ã€ä¾‹å¤–ã®å‡¦ç†ã« `std::terminate` ã«ä¾å­˜ã™ã‚‹ï¼ˆC++11ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã® `noexcept` ã®å ´åˆï¼‰ã“ã¨ãŒè¨±å®¹ã•ã‚Œã¾ã™ã€‚ + +**6.** 匿åコードブロック。 + +å˜ä¸€ã®é–¢æ•°å†…ã«åˆ¥ã®ã‚³ãƒ¼ãƒ‰ãƒ–ロックを作æˆã—ã¦ã€ç‰¹å®šã®å¤‰æ•°ã‚’ローカルã«ã—ã€ãƒ–ロックを抜ã‘ã‚‹éš›ã«ãƒ‡ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +``` cpp +Block block = data.in->read(); + +{ + std::lock_guard lock(mutex); + data.ready = true; + data.block = block; +} + +ready_any.set(); +``` + +**7.** マルãƒã‚¹ãƒ¬ãƒƒãƒ‰ã€‚ + +オフラインデータ処ç†ãƒ—ログラムã§ã¯ï¼š + +- å˜ä¸€ã® CPU コアã§æœ€é«˜ã®ãƒ‘フォーマンスを得るã“ã¨ã‚’目指ã—ã¦ãã ã•ã„。必è¦ã«å¿œã˜ã¦ã‚³ãƒ¼ãƒ‰ã‚’並列化ã§ãã¾ã™ã€‚ + +サーãƒãƒ¼ã‚¢ãƒ—リケーションã§ã¯ï¼š + +- リクエストを処ç†ã™ã‚‹ãŸã‚ã«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールを使用ã—ã¾ã™ã€‚ユーザースペースã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚¹ã‚¤ãƒƒãƒã‚’å¿…è¦ã¨ã™ã‚‹ã‚¿ã‚¹ã‚¯ã¯ã¾ã ã‚ã‚Šã¾ã›ã‚“。 + +並列化ã®ãŸã‚ã«ãƒ•ã‚©ãƒ¼ã‚¯ã¯ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +**8.** スレッドã®åŒæœŸã€‚ + +多ãã®å ´åˆã€ç•°ãªã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ãŒç•°ãªã‚‹ãƒ¡ãƒ¢ãƒªã‚»ãƒ«ã‚’使用ã™ã‚‹ã‚ˆã†ã«ã™ã‚‹ã“ã¨ãŒã§ã(ã•ã‚‰ã«è‰¯ã„ã®ã¯ç•°ãªã‚‹ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ©ã‚¤ãƒ³ï¼‰ã€ã‚¹ãƒ¬ãƒƒãƒ‰ã®åŒæœŸã‚’使用ã—ãªã„よã†ã«ã—ã¾ã™ï¼ˆ`joinAll` を除ã)。 + +åŒæœŸãŒå¿…è¦ãªå ´åˆã€ã»ã¨ã‚“ã©ã®å ´åˆã€`lock_guard` ã§ãƒŸãƒ¥ãƒ¼ãƒ†ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹ã ã‘ã§å分ã§ã™ã€‚ + +ä»–ã®å ´åˆã¯ã€ã‚·ã‚¹ãƒ†ãƒ åŒæœŸãƒ—リミティブを使用ã—ã¾ã™ã€‚ビジーウェイトを使用ã—ãªã„ã§ãã ã•ã„。 + +アトミックæ“作ã¯æœ€ã‚‚ç°¡å˜ãªå ´åˆã«ã®ã¿ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +専門的ãªé ˜åŸŸã§ãªã„é™ã‚Šã€ãƒ­ãƒƒã‚¯ãƒ•ãƒªãƒ¼ã®ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚’実装ã—よã†ã¨ã—ãªã„ã§ãã ã•ã„。 + +**9.** ãƒã‚¤ãƒ³ã‚¿ã¨å‚照。 + +ã»ã¨ã‚“ã©ã®å ´åˆã€å‚照を使用ã—ã¦ãã ã•ã„。 + +**10.** `const`。 + +定数å‚ç…§ã€å®šæ•°ã¸ã®ãƒã‚¤ãƒ³ã‚¿ã€`const_iterator`ã€`const` メソッドを使用ã—ã¦ãã ã•ã„。 + +`const` をデフォルトã¨è€ƒãˆã€å¿…è¦ãªå ´åˆã®ã¿éž `const` を使用ã—ã¾ã™ã€‚ + +値渡ã—ã§å¤‰æ•°ã‚’渡ã™å ´åˆã€é€šå¸¸ `const` を使用ã™ã‚‹æ„味ã¯ã‚ã‚Šã¾ã›ã‚“。 + +**11.** unsigned。 + +å¿…è¦ã§ã‚れ㰠`unsigned` を使用ã—ã¦ãã ã•ã„。 + +**12.** 数値型。 + +åž‹ `UInt8`ã€`UInt16`ã€`UInt32`ã€`UInt64`ã€`Int8`ã€`Int16`ã€`Int32`ã€`Int64` を使用ã—ã¦ãã ã•ã„。ã¾ãŸ `size_t`ã€`ssize_t`ã€`ptrdiff_t` も使用ã—ã¦ãã ã•ã„。 + +ã“れらã®åž‹ã‚’æ•°å­—ã«ã¯ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„:`signed/unsigned long`ã€`long long`ã€`short`ã€`signed/unsigned char`ã€`char`。 + +**13.** 引数ã®æ¸¡ã—方。 + +値ãŒè¤‡é›‘ã§ã‚ã‚‹å ´åˆã€ç§»å‹•ã™ã‚‹å ´åˆã¯å€¤æ¸¡ã—ã‚’ã—ã€`std::move` を使用ã—ã¾ã™ã€‚値を更新ã—ãŸã„å ´åˆã¯å‚照渡ã—ã‚’ã—ã¾ã™ã€‚ + +ヒープã«ä½œæˆã•ã‚ŒãŸã‚ªãƒ–ジェクトã®æ‰€æœ‰æ¨©ã‚’関数ãŒå–å¾—ã™ã‚‹å ´åˆã€å¼•æ•°ã®åž‹ã‚’ `shared_ptr` ã¾ãŸã¯ `unique_ptr` ã«ã—ã¾ã™ã€‚ + +**14.** 戻り値。 + +ã»ã¨ã‚“ã©ã®å ´åˆã€ãŸã  `return` を使用ã—ã¦ãã ã•ã„。`return std::move(res)` ã¨æ›¸ã‹ãªã„ã§ãã ã•ã„。 + +関数ãŒãƒ’ープã«ã‚ªãƒ–ジェクトを割り当ã¦ã¦ãれを返ã™å ´åˆã€`shared_ptr` ã¾ãŸã¯ `unique_ptr` を使用ã—ã¦ãã ã•ã„。 + +ã¾ã‚Œã«ï¼ˆãƒ«ãƒ¼ãƒ—中ã«å€¤ã‚’æ›´æ–°ã™ã‚‹å ´åˆï¼‰ã€å¼•æ•°ã‚’通ã˜ã¦å€¤ã‚’è¿”ã™å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã®å ´åˆã€å¼•æ•°ã¯å‚ç…§ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ + +``` cpp +using AggregateFunctionPtr = std::shared_ptr; + +/** åå‰ã«åŸºã¥ã„ã¦é›†è¨ˆé–¢æ•°ã‚’作æˆã§ãるよã†ã«ã—ã¾ã™ã€‚ + */ +class AggregateFunctionFactory +{ +public: + AggregateFunctionFactory(); + AggregateFunctionPtr get(const String & name, const DataTypes & argument_types) const; +``` + +**15.** `namespace`。 + +アプリケーションコードã«ã¯å€‹åˆ¥ã® `namespace` を使用ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +å°ã•ãªãƒ©ã‚¤ãƒ–ラリã«ã‚‚å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 + +中大è¦æ¨¡ã®ãƒ©ã‚¤ãƒ–ラリã¯ã™ã¹ã¦ã‚’ `namespace` ã«ç½®ãã¾ã™ã€‚ + +ライブラリ㮠`.h` ファイルã§ã¯ã€å®Ÿè£…ã®è©³ç´°ã‚’éš ã™ãŸã‚ã« `namespace detail` を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`.cpp` ファイルã§ã¯ã€ã‚·ãƒ³ãƒœãƒ«ã‚’éš ã™ãŸã‚ã« `static` ã¾ãŸã¯åŒ¿åã® `namespace` を使用ã§ãã¾ã™ã€‚ + +別途外部 `namespace` ã«å‡ºã•ãªã„ãŸã‚ `enum` ã« `namespace` を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼ˆãŸã ã— `enum class` を使用ã™ã‚‹æ–¹ãŒè‰¯ã„ã§ã™ï¼‰ã€‚ + +**16.** é…延åˆæœŸåŒ–。 + +åˆæœŸåŒ–ã«å¼•æ•°ãŒå¿…è¦ãªå ´åˆã€é€šå¸¸ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã‚’書ãã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +後ã§åˆæœŸåŒ–ã‚’é…らã›ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ç„¡åŠ¹ãªã‚ªãƒ–ジェクトを作æˆã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã‚’追加ã§ãã¾ã™ã€‚ã¾ãŸã¯ã€å°‘æ•°ã®ã‚ªãƒ–ジェクトã«ã¤ã„ã¦ã¯ `shared_ptr/unique_ptr` を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +``` cpp +Loader(DB::Connection * connection_, const std::string & query, size_t max_block_size_); + +/// é…延åˆæœŸåŒ–ã®ãŸã‚ã« +Loader() {} +``` + +**17.** 仮想関数。 + +クラスãŒãƒãƒªãƒ¢ãƒ¼ãƒ•ã‚£ãƒƒã‚¯ãªä½¿ç”¨ã‚’æ„図ã—ã¦ã„ãªã‘ã‚Œã°ã€é–¢æ•°ã‚’仮想化ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯ãƒ‡ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã«ã‚‚ã‚ã¦ã¯ã¾ã‚Šã¾ã™ã€‚ + +**18.** エンコーディング。 + +ã©ã“ã§ã‚‚ UTF-8 を使用ã—ã¦ãã ã•ã„。`std::string` 㨠`char *` を使用ã—ã¦ãã ã•ã„。`std::wstring` 㨠`wchar_t` ã¯ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 + +**19.** ロギング。 + +コードã®è‡³ã‚‹ã¨ã“ã‚ã«ã‚る例をå‚ç…§ã—ã¦ãã ã•ã„。 + +コミットã™ã‚‹å‰ã«ã€æ„味ã®ãªã„ログã€ãƒ‡ãƒãƒƒã‚°ãƒ­ã‚°ã€ãã®ä»–ã®ç¨®é¡žã®ãƒ‡ãƒãƒƒã‚°å‡ºåŠ›ã‚’削除ã—ã¦ãã ã•ã„。 + +サイクル中ã®ãƒ­ã‚®ãƒ³ã‚°ã¯ã€ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ¬ãƒ™ãƒ«ã§ã‚‚é¿ã‘ã‚‹ã¹ãã§ã™ã€‚ + +ログã¯ã©ã®ãƒ­ã‚°ãƒ¬ãƒ™ãƒ«ã§ã‚‚読ã¿ã‚„ã™ããªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +基本的ã«ã¯ã€ã‚¢ãƒ—リケーションコードã§ã®ã¿ãƒ­ã‚®ãƒ³ã‚°ã‚’è¡Œã„ã¾ã™ã€‚ + +ログメッセージã¯è‹±èªžã§æ›¸ã‹ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +ログã¯ã‚·ã‚¹ãƒ†ãƒ ç®¡ç†è€…ãŒç†è§£ã§ãã‚‹ã‚‚ã®ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ + +ログã«ä¸é©åˆ‡ãªè¨€è‘‰ã‚’使ã‚ãªã„ã§ãã ã•ã„。 + +ログã«ã¯ UTF-8 エンコードを使用ã—ã¾ã™ã€‚ã¾ã‚Œã«ã€ãƒ­ã‚°ã«éžASCII文字を使用ã™ã‚‹ã“ã¨ãŒè¨±å®¹ã•ã‚Œã¾ã™ã€‚ + +**20.** 入出力。 + +アプリケーションã®æ€§èƒ½ã«ã¨ã£ã¦é‡è¦ãªå†…部サイクルã§ã¯ `iostreams` を使用ã—ãªã„ã§ãã ã•ã„(ãã—㦠`stringstream` ã¯ä¸€åˆ‡ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„)。 + +代ã‚ã‚Šã« `DB/IO` ライブラリを使用ã—ã¦ãã ã•ã„。 + +**21.** 日付ã¨æ™‚刻。 + +`DateLUT` ライブラリをå‚ç…§ã—ã¦ãã ã•ã„。 + +**22.** include。 + +インクルードガードã®ä»£ã‚ã‚Šã«å¸¸ã« `#pragma once` を使用ã—ã¦ãã ã•ã„。 + +**23.** using。 + +`using namespace` ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。特定ã®ã‚‚ã®ã«ã¤ã„ã¦ã¯ `using` を使用ã§ãã¾ã™ã€‚ã§ã‚‚クラスや関数内ã§ãƒ­ãƒ¼ã‚«ãƒ«ã«ã—ã¦ãã ã•ã„。 + +**24.** å¿…è¦ã§ãªã„é™ã‚Šã€é–¢æ•°ã« `trailing return type` を使用ã—ãªã„ã§ãã ã•ã„。 + +``` cpp +auto f() -> void +``` + +**25.** 変数ã®å®£è¨€ã¨åˆæœŸåŒ–。 + +``` cpp +//æ­£ã—ã„方法 +std::string s = "Hello"; +std::string s{"Hello"}; + +//誤ã£ãŸæ–¹æ³• +auto s = std::string{"Hello"}; +``` + +**26.** 仮想関数ã®å ´åˆã€åŸºåº•ã‚¯ãƒ©ã‚¹ã§ `virtual` ã‚’ã€æ´¾ç”Ÿã‚¯ãƒ©ã‚¹ã§ã¯ `virtual` ã®ä»£ã‚ã‚Šã« `override` を書ã„ã¦ãã ã•ã„。 + +## 未使用㮠C++ 機能 {#unused-features-of-c} + +**1.** 仮想継承ã¯ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +**2.** 最新㮠C++ ã§ä¾¿åˆ©ãªã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚·ãƒ¥ã‚¬ãƒ¼ã‚’æŒã¤æ§‹é€ ä½“ã€ä¾‹ãˆã°ï¼š + +``` +// シンタックスシュガーã®ãªã„従æ¥ã®æ–¹æ³• +template ::value, void>> // SFINAE ã‚’ std::enable_if ã§ä½¿ç”¨ã€ ::value ã®ä½¿ç”¨ + +std::pair func(const E & e) // 返り値型を明示指定 +{ + if (elements.count(e)) // .count() メンãƒãƒ¼ã‚·ãƒƒãƒ—テスト + { + // ... + } + + elements.erase( + std::remove_if( + elements.begin(), elements.end(), + [&](const auto x){ + return x == 1; + }), + elements.end()); // remove-erase イディオム + + return std::make_pair(1, 2); // make_pair() ã§ãƒšã‚¢ã‚’ä½œæˆ +} + +// シンタックスシュガーを使用ã—ãŸæ–¹æ³• (C++14/17/20) +template +requires std::same_v // SFINAE ã‚’ C++20 ã®ã‚³ãƒ³ã‚»ãƒ—トã§ã€C++14 テンプレートエイリアスã®ä½¿ç”¨ +auto func(const E & e) // auto 返り値型 (C++14) +{ + if (elements.contains(e)) // C++20 .contains メンãƒãƒ¼ã‚·ãƒƒãƒ—テスト + { + // ... + } + + elements.erase_if( + elements, + [&](const auto x){ + return x == 1; + }); // C++20 std::erase_if + + return {1, 2}; // ã¾ãŸã¯ï¼š return std::pair(1, 2); // åˆæœŸåŒ–リストや値åˆæœŸåŒ– (C++17) ã§ãƒšã‚¢ã‚’ä½œæˆ +} +``` + +## プラットフォーム {#platform} + +**1.** 特定ã®ãƒ—ラットフォーム用ã«ã‚³ãƒ¼ãƒ‰ã‚’書ã„ã¦ã„ã¾ã™ã€‚ + +ã—ã‹ã—ã€ä»–ã®æ¡ä»¶ãŒåŒã˜ã§ã‚ã‚Œã°ã€ã‚¯ãƒ­ã‚¹ãƒ—ラットフォームã¾ãŸã¯ç§»æ¤å¯èƒ½ãªã‚³ãƒ¼ãƒ‰ãŒå¥½ã¾ã‚Œã¾ã™ã€‚ + +**2.** 言語: C++20(使用å¯èƒ½ãª [C++20 機能](https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B20_features) ã®ãƒªã‚¹ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +**3.** コンパイラ: `clang`。執筆時(2022å¹´7月ç¾åœ¨ï¼‰ã€ã‚³ãƒ¼ãƒ‰ã¯ã‚¯ãƒ©ãƒ³ãƒãƒ¼ã‚¸ãƒ§ãƒ³ >= 12 を使用ã—ã¦ã‚³ãƒ³ãƒ‘イルã•ã‚Œã¦ã„ã¾ã™ã€‚(`gcc` ã§ã‚‚コンパイルã§ãã¾ã™ãŒã€ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ãŠã‚‰ãšã€æœ¬ç•ªä½¿ç”¨ã«ã¯é©ã—ã¦ã„ã¾ã›ã‚“)。 + +標準ライブラリã¯ã€Œ`libc++`ã€ã‚’使用ã—ã¾ã™ã€‚ + +**4.**OS: Linux Ubuntuã€Precise以é™ã€‚ + +**5.** コード㯠x86_64 CPU アーキテクãƒãƒ£ç”¨ã«æ›¸ã‹ã‚Œã¦ã„ã¾ã™ã€‚ + +CPU 命令セットã¯ã‚µãƒ¼ãƒãƒ¼ã®ä¸­ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る最å°ã®ã‚»ãƒƒãƒˆã§ã™ã€‚ç¾åœ¨ã¯ SSE 4.2 ã§ã™ã€‚ + +**6.** 許å¯ã•ã‚Œã¦ã„ã‚‹ã„ãã¤ã‹ã®ä¾‹å¤–を除ã„㦠`-Wall -Wextra -Werror -Weverything` コンパイルフラグを使用ã—ã¾ã™ã€‚ + +**7.** é™çš„リンクをã€é™çš„ã«æŽ¥ç¶šã™ã‚‹ã®ãŒé›£ã—ã„ライブラリを除ã„ã¦ã€ã™ã¹ã¦ã®ãƒ©ã‚¤ãƒ–ラリã§ä½¿ç”¨ã—ã¾ã™ï¼ˆ`ldd` コマンドã®å‡ºåŠ›ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +**8.** コードã¯ãƒªãƒªãƒ¼ã‚¹è¨­å®šã§é–‹ç™ºãŠã‚ˆã³ãƒ‡ãƒãƒƒã‚°ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## ツール {#tools} + +**1.** KDevelop ã¯è‰¯ã„ IDE ã§ã™ã€‚ + +**2.** デãƒãƒƒã‚°ã«ã¯ `gdb`ã€`valgrind`(`memcheck`)ã€`strace`ã€`-fsanitize=...`ã€`tcmalloc_minimal_debug` を使用ã—ã¾ã™ã€‚ + +**3.** プロファイリングã«ã¯ `Linux Perf`ã€`valgrind`(`callgrind`)ã€`strace -cf` を使用ã—ã¾ã™ã€‚ + +**4.** ソース㯠Git ã«ã‚ã‚Šã¾ã™ã€‚ + +**5.** 組ã¿ç«‹ã¦ã«ã¯ `CMake` を使用ã—ã¾ã™ã€‚ + +**6.** プログラム㯠`deb` パッケージを用ã„ã¦ãƒªãƒªãƒ¼ã‚¹ã•ã‚Œã¾ã™ã€‚ + +**7.** マスタã¸ã®ã‚³ãƒŸãƒƒãƒˆã¯ãƒ“ルドを壊ã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 + +ãŸã ã—ã€é¸æŠžã•ã‚ŒãŸãƒªãƒ“ジョンã®ã¿ãŒå‹•ä½œå¯èƒ½ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +**8.** コードã¯å®Œå…¨ã«æº–å‚™ãŒæ•´ã£ã¦ã„ãªãã¦ã‚‚ã€ã§ãã‚‹ã ã‘é »ç¹ã«ã‚³ãƒŸãƒƒãƒˆã—ã¦ãã ã•ã„。 + +ã“ã®ç›®çš„ã®ãŸã‚ã«ãƒ–ランãƒã‚’使用ã—ã¾ã™ã€‚ + +`master` ブランãƒã§ã®ã‚³ãƒ¼ãƒ‰ãŒã¾ã ãƒ“ルドå¯èƒ½ã§ãªã„å ´åˆã€`push` ã®å‰ã«ãれをビルドã‹ã‚‰é™¤å¤–ã—ã¦ãã ã•ã„。数日以内ã«å®Œæˆã•ã›ã‚‹ã‹ã€å‰Šé™¤ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**9.** éžè‡ªæ˜Žãªå¤‰æ›´ã«ã¯ãƒ–ランãƒã‚’使用ã—ã€ã‚µãƒ¼ãƒãƒ¼ã«å…¬é–‹ã—ã¦ãã ã•ã„。 + +**10.** 使用ã•ã‚Œã¦ã„ãªã„コードã¯ãƒªãƒã‚¸ãƒˆãƒªã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã€‚ + +## ライブラリ {#libraries} + +**1.** C++20 標準ライブラリ(エクスペリメンタルãªæ‹¡å¼µã‚’å«ã‚€ï¼‰ã€`boost`ã€`Poco` フレームワークãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**2.** OS パッケージã‹ã‚‰ã®ãƒ©ã‚¤ãƒ–ラリã®ä½¿ç”¨ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。ã¾ãŸã€äº‹å‰ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚ŒãŸãƒ©ã‚¤ãƒ–ラリã®ä½¿ç”¨ã‚‚許å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。ã™ã¹ã¦ã®ãƒ©ã‚¤ãƒ–ラリ㯠`contrib` ディレクトリã«ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®å½¢ã§é…ç½®ã•ã‚Œã€ClickHouse ã¨å…±ã«ãƒ“ルドã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。詳細ã«ã¤ã„ã¦ã¯ [æ–°ã—ã„サードパーティライブラリã®è¿½åŠ ã«é–¢ã™ã‚‹ã‚¬ã‚¤ãƒ‰ãƒ©ã‚¤ãƒ³](contrib.md#adding-third-party-libraries) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**3.** 常ã«æ—¢ã«ä½¿ç”¨ã•ã‚Œã¦ã„るライブラリを優先ã—ã¾ã™ã€‚ + +## 一般的ãªæŽ¨å¥¨äº‹é … {#general-recommendations-1} + +**1.** å¯èƒ½ãªé™ã‚Šå°‘ãªã„コードを書ãよã†ã«ã—ã¾ã™ã€‚ + +**2.** 最も簡å˜ãªè§£æ±ºç­–を試ã¿ã¾ã™ã€‚ + +**3.** 動作ã¨å†…部ループã®å‹•ä½œãŒã‚ã‹ã‚‹ã¾ã§ã‚³ãƒ¼ãƒ‰ã‚’書ã‹ãªã„ã§ãã ã•ã„。 + +**4.** å˜ç´”ãªã‚±ãƒ¼ã‚¹ã§ã¯ `using` を使用ã—ã¦ã‚¯ãƒ©ã‚¹ã‚„構造体ã®ä»£ã‚ã‚Šã«ã—ã¾ã™ã€‚ + +**5.** コピコンストラクタã€å‰²ã‚Šå½“ã¦æ¼”ç®—å­ã€ãƒ‡ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ï¼ˆã‚¯ãƒ©ã‚¹ãŒå°‘ãªãã¨ã‚‚1ã¤ã®ä»®æƒ³é–¢æ•°ã‚’å«ã‚€å ´åˆã®ä»®æƒ³ãƒ‡ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã‚’除ã„ã¦ï¼‰ã€ãƒ ãƒ¼ãƒ–コンストラクタã¾ãŸã¯ãƒ ãƒ¼ãƒ–割り当ã¦æ¼”ç®—å­ã‚’å¯èƒ½ãªé™ã‚Šæ›¸ã‹ãªã„ã§ãã ã•ã„。言ã„æ›ãˆã‚Œã°ã€ã‚³ãƒ³ãƒ‘イラãŒç”Ÿæˆã™ã‚‹é–¢æ•°ãŒæ­£ã—ã動作ã™ã‚‹ã¯ãšã§ã™ã€‚`default` を使用ã§ãã¾ã™ã€‚ + +**6.** コードã®ç°¡ç´ åŒ–ãŒå¥¨åŠ±ã•ã‚Œã¾ã™ã€‚å¯èƒ½ãªå ´åˆã€ã‚³ãƒ¼ãƒ‰ã®ã‚µã‚¤ã‚ºã‚’縮å°ã—ã¾ã™ã€‚ + +## 追加ã®æŽ¨å¥¨äº‹é … {#additional-recommendations} + +**1.** `stddef.h` ã‹ã‚‰ã®åž‹ã« `std::` を明示的ã«æŒ‡å®šã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。言ã„æ›ãˆã‚Œã°ã€`std::size_t` ã§ã¯ãªãã€çŸ­ã„方㮠`size_t` ã¨æ›¸ãã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +`std::` を追加ã™ã‚‹ã“ã¨ã¯è¨±å®¹ã•ã‚Œã¾ã™ã€‚ + +**2.** 標準Cライブラリã®é–¢æ•°ã« `std::` を明示的ã«æŒ‡å®šã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。言ã„æ›ãˆã‚Œã°ã€`memcpy` ã¨æ›¸ãã¾ã™ï¼ˆ`std::memcpy` ã§ã¯ãªã„)。 + +ç†ç”±ã¯ã€æ¨™æº–ã§ã¯ãªã„類似関数ã€ä¾‹ãˆã° `memmem` ãŒå­˜åœ¨ã™ã‚‹ãŸã‚ã§ã™ã€‚ã“れらã®é–¢æ•°ã¯ `namespace std` ã«å­˜åœ¨ã—ã¾ã›ã‚“。 + +ã©ã“ã«ã§ã‚‚ `memcpy` ã®ä»£ã‚ã‚Šã« `std::memcpy` ã¨è¨˜è¿°ã™ã‚‹ãªã‚‰ã€`memmem` ã‚’ `std::` ãªã—ã§è¨˜è¿°ã™ã‚‹ã®ã¯å¥‡å¦™ã«è¦‹ãˆã‚‹ã§ã—ょã†ã€‚ + +ãã‚Œã«ã‚‚ã‹ã‹ã‚らãšã€`std::` ãŒå¥½ã¾ã•ã‚Œã‚Œã°ã€ãれを使用ã§ãã¾ã™ã€‚ + +**3.** 標準C++ライブラリã«åŒã˜ã‚‚ã®ãŒã‚ã‚‹å ´åˆã« C ã®é–¢æ•°ã‚’使用ã™ã‚‹ã“ã¨ã€‚ + +ã“ã‚Œã¯ã‚ˆã‚ŠåŠ¹çŽ‡çš„ã§ã‚ã‚‹å ´åˆã«ã¯å—ã‘入れられã¾ã™ã€‚ + +例ãˆã°ã€å¤§ããªãƒ¡ãƒ¢ãƒªãƒãƒ£ãƒ³ã‚¯ã®ã‚³ãƒ”ーã«ã¯ `memcpy` を使用ã—ã¾ã™ï¼ˆ`std::copy` より)。 + +**4.** 複数行ã®é–¢æ•°å¼•æ•°ã€‚ + +次ã®ã‚ˆã†ãªæŠ˜ã‚Šè¿”ã—スタイルãŒè¨±å®¹ã•ã‚Œã¾ã™ï¼š + +``` cpp +function( + T1 x1, + T2 x2) +``` + +``` cpp +function( + size_t left, size_t right, + const & RangesInDataParts ranges, + size_t limit) +``` + +``` cpp +function(size_t left, size_t right, + const & RangesInDataParts ranges, + size_t limit) +``` + +``` cpp +function(size_t left, size_t right, + const & RangesInDataParts ranges, + size_t limit) +``` + +``` cpp +function( + size_t left, + size_t right, + const & RangesInDataParts ranges, + size_t limit) +``` + diff --git a/docs/ja/development/tests.md b/docs/ja/development/tests.md new file mode 100644 index 00000000000..cd3e9e0f62f --- /dev/null +++ b/docs/ja/development/tests.md @@ -0,0 +1,370 @@ +--- +slug: /ja/development/tests +sidebar_position: 72 +sidebar_label: テスト +title: ClickHouseã®ãƒ†ã‚¹ãƒˆ +description: ã»ã¨ã‚“ã©ã®ClickHouseã®æ©Ÿèƒ½ã¯æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã§ãƒ†ã‚¹ãƒˆå¯èƒ½ã§ã‚ã‚Šã€ClickHouseコードã®å¤‰æ›´ã«ã¯å¿…ãšã“れを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +--- + +## 機能テスト + +機能テストã¯æœ€ã‚‚ç°¡å˜ã§ä¾¿åˆ©ã«ä½¿ç”¨ã§ãã‚‹ã‚‚ã®ã§ã™ã€‚ã»ã¨ã‚“ã©ã®ClickHouseã®æ©Ÿèƒ½ã¯æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã§ãƒ†ã‚¹ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã€ãã®ã‚ˆã†ã«ãƒ†ã‚¹ãƒˆã§ãã‚‹ClickHouseコードã®å¤‰æ›´ã«ã¯å¿…ãšä½¿ç”¨ã™ã‚‹ã“ã¨ãŒæ±‚ã‚られã¾ã™ã€‚ + +å„機能テストã¯ã€å®Ÿè¡Œä¸­ã®ClickHouseサーãƒãƒ¼ã«å¯¾ã—ã¦ä¸€ã¤ã¾ãŸã¯è¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã—ã€çµæžœã‚’å‚ç…§ã¨æ¯”較ã—ã¾ã™ã€‚ + +テスト㯠`queries` ディレクトリã«é…ç½®ã•ã‚Œã¦ã„ã¾ã™ã€‚二ã¤ã®ã‚µãƒ–ディレクトリãŒã‚ã‚Šã€ãã‚Œãžã‚Œ `stateless` 㨠`stateful` ã§ã™ã€‚Statelessテストã¯ã€äº‹å‰ã«ãƒ­ãƒ¼ãƒ‰ã—ãŸãƒ†ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãªã—ã§ã‚¯ã‚¨ãƒªã‚’実行ã—ã€ãƒ†ã‚¹ãƒˆå†…ã§å°ã•ãªåˆæˆãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’å³å¸­ã§ä½œæˆã™ã‚‹ã“ã¨ãŒå¤šã„ã§ã™ã€‚Statefulテストã¯ã€ClickHouseã‹ã‚‰äº‹å‰ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ†ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã‚’å¿…è¦ã¨ã—ã€ä¸€èˆ¬å…¬é–‹ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +å„テスト㯠`.sql` ã¾ãŸã¯ `.sh` ã®ã©ã¡ã‚‰ã‹ã®å½¢å¼ã§ã‚ã‚Šå¾—ã¾ã™ã€‚`.sql` テスト㯠`clickhouse-client` ã«ãƒ‘イプã•ã‚Œã‚‹å˜ç´”ãªSQLスクリプトã§ã™ã€‚`.sh` テストã¯ãれ自体ã§å®Ÿè¡Œã•ã‚Œã‚‹ã‚¹ã‚¯ãƒªãƒ—トã§ã™ã€‚通常ã€SQLテスト㯠`.sh` テストよりも好ã¾ã‚Œã¾ã™ã€‚`.sh` テストã¯é€šå¸¸ã®SQLã§ã¯è©¦ã›ãªã„機能(`clickhouse-client` ã«ãƒ‡ãƒ¼ã‚¿ã‚’パイプã—ãŸã‚Šã€`clickhouse-local` をテストã—ãŸã‚Šã™ã‚‹éš›ãªã©ï¼‰ã®ãƒ†ã‚¹ãƒˆãŒå¿…è¦ãªå ´åˆã«ã®ã¿ä½¿ç”¨ã™ã¹ãã§ã™ã€‚ + +:::note +`DateTime` ãŠã‚ˆã³ `DateTime64` データ型をテストã™ã‚‹éš›ã®ä¸€èˆ¬çš„ãªèª¤ã‚Šã¯ã€ã‚µãƒ¼ãƒãƒ¼ãŒç‰¹å®šã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ï¼ˆä¾‹ï¼š"UTC")を使用ã—ã¦ã„ã‚‹ã¨ä»®å®šã™ã‚‹ã“ã¨ã§ã™ã€‚実際ã«ã¯ãã†ã§ã¯ãªãã€CIテスト実行時ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯æ„図的ã«ãƒ©ãƒ³ãƒ€ãƒ åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚最も簡å˜ãªå›žé¿ç­–ã¯ã€ãƒ†ã‚¹ãƒˆå€¤ã«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’明示的ã«æŒ‡å®šã™ã‚‹ã“ã¨ã§ã™ã€‚例ãˆã°ã€`toDateTime64(val, 3, 'Europe/Amsterdam')` ãªã©ã§ã™ã€‚ +::: + +### ローカルã§ãƒ†ã‚¹ãƒˆã‚’実行ã™ã‚‹ {#functional-test-locally} + +ClickHouseサーãƒãƒ¼ã‚’デフォルトã®ãƒãƒ¼ãƒˆ(9000)ã§ãƒ­ãƒ¼ã‚«ãƒ«ã§èµ·å‹•ã—ã¾ã™ã€‚例ãˆã°ã€`01428_hash_set_nan_key` テストを実行ã™ã‚‹ã«ã¯ã€ãƒªãƒã‚¸ãƒˆãƒªã®ãƒ•ã‚©ãƒ«ãƒ€ã«ç§»å‹•ã—次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™: + +``` +PATH=:$PATH tests/clickhouse-test 01428_hash_set_nan_key +``` + +テストçµæžœï¼ˆ`stderr` ãŠã‚ˆã³ `stdout`)ã¯ã€ãƒ†ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«è‡ªä½“ã®è¿‘ãã«ã‚ã‚‹ `01428_hash_set_nan_key.[stderr|stdout]` ã¨ã„ã†ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ï¼ˆã¤ã¾ã‚Š `queries/0_stateless/foo.sql` ã®å‡ºåŠ›ã¯ `queries/0_stateless/foo.stdout` ã«ã‚ã‚Šã¾ã™ï¼‰ã€‚ + +詳細ãªã‚ªãƒ—ション㯠`tests/clickhouse-test --help` ã‚’å‚ç…§ã—ã¦ãã ã•ã„。全ã¦ã®ãƒ†ã‚¹ãƒˆã‚’å˜ã«å®Ÿè¡Œã™ã‚‹ã‹ã€ãƒ†ã‚¹ãƒˆåã«å«ã¾ã‚Œã‚‹ã‚µãƒ–ストリングã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚ŒãŸãƒ†ã‚¹ãƒˆã®ã‚µãƒ–セットを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: `./clickhouse-test substring`。ã¾ãŸã€ãƒ†ã‚¹ãƒˆã‚’並行ã—ã¦å®Ÿè¡Œã—ãŸã‚Šã€ãƒ©ãƒ³ãƒ€ãƒ ãªé †åºã§å®Ÿè¡Œã—ãŸã‚Šã™ã‚‹ã‚ªãƒ—ションもã‚ã‚Šã¾ã™ã€‚ + +### æ–°ã—ã„テストã®è¿½åŠ  + +æ–°ã—ã„テストを追加ã™ã‚‹ã«ã¯ã€`queries/0_stateless` ディレクトリ㫠`.sql` ã¾ãŸã¯ `.sh` ファイルを作æˆã—ã€æ‰‹å‹•ã§ç¢ºèªã—ãŸå¾Œã§æ¬¡ã®æ–¹æ³•ã§ `.reference` ファイルを生æˆã—ã¾ã™: `clickhouse-client < 00000_test.sql > 00000_test.reference` ã¾ãŸã¯ `./00000_test.sh > ./00000_test.reference`。 + +テストã¯ã€äº‹å‰ã«ä½œæˆã•ã‚Œã¦ã„ã‚‹ã¨ä»®å®šã•ã‚Œã‚‹ `test` データベース内ã®ãƒ†ãƒ¼ãƒ–ル(作æˆã€å‰Šé™¤ãªã©ï¼‰ã‚’使用ã™ã‚‹ã®ã¿ã§ã€ã¾ãŸä¸€æ™‚テーブルを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +### テスト実行を制é™ã™ã‚‹ + +テストã«ã¯ã€ãƒ†ã‚¹ãƒˆå®Ÿè¡Œã®åˆ¶é™ã‚’指定ã™ã‚‹ãŸã‚ã«é›¶å€‹ã¾ãŸã¯ãれ以上㮠_テストタグ_ ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`.sh` テストã®ã‚¿ã‚°ã¯ã€äºŒè¡Œç›®ã«ã‚³ãƒ¡ãƒ³ãƒˆã¨ã—ã¦è¨˜è¿°ã—ã¾ã™: + +```bash +#!/usr/bin/env bash +# Tags: no-fasttest +``` + +`.sql` テストã®ã‚¿ã‚°ã¯ã€ä¸€è¡Œç›®ã«SQLコメントã¨ã—ã¦é…ç½®ã—ã¾ã™: + +```sql +-- Tags: no-fasttest +SELECT 1 +``` + +| ã‚¿ã‚°å | 内容 | 使用例 | +|---|---|---| +| `disabled`| テストã¯å®Ÿè¡Œã•ã‚Œãªã„ || +| `long` | テストã®å®Ÿè¡Œæ™‚é–“ã‚’1分ã‹ã‚‰10分ã¸å»¶é•· || +| `deadlock` | テストを長時間ループã§å®Ÿè¡Œ || +| `race` | `deadlock`ã¨åŒã˜ã€‚`deadlock`を優先 || +| `shard` | サーãƒãƒ¼ãŒ `127.0.0.*` をリッスンã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ || +| `distributed` | `shard`ã¨åŒã˜ã€‚`shard`を優先 || +| `global` | `shard`ã¨åŒã˜ã€‚`shard`を優先 || +| `zookeeper` | テストã«ã¯Zookeeperã¾ãŸã¯ClickHouse KeeperãŒå¿…è¦ | テスト㯠`ReplicatedMergeTree` を使用 | +| `replica` | `zookeeper`ã¨åŒã˜ã€‚`zookeeper`を優先 || +| `no-fasttest`| [高速テスト](continuous-integration.md#fast-test) ã§ãƒ†ã‚¹ãƒˆã•ã‚Œãªã„ | `MySQL` テーブルエンジンã¯é«˜é€Ÿãƒ†ã‚¹ãƒˆã§ç„¡åŠ¹åŒ–ã•ã‚Œã¦ã„ã‚‹ | +| `no-[asan, tsan, msan, ubsan]` | [サニタイザ](#sanitizers)を使用ã™ã‚‹ãƒ“ルドã§ãƒ†ã‚¹ãƒˆã‚’無効化 | QEMUã®ä¸‹ã§ã®ãƒ†ã‚¹ãƒˆã¯ã‚µãƒ‹ã‚¿ã‚¤ã‚¶ã¨å‹•ä½œã—ãªã„ | +| `no-replicated-database` ||| +| `no-ordinary-database` ||| +| `no-parallel` | ä»–ã®ãƒ†ã‚¹ãƒˆã¨ä¸¦è¡Œã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã“ã¨ã‚’ç¦æ­¢ | テスト㯠`system` テーブルã‹ã‚‰èª­ã¿å–られã€ä¸å¤‰æ¡ä»¶ãŒç ´ã‚‰ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ | +| `no-parallel-replicas` ||| +| `no-debug` ||| +| `no-stress` ||| +| `no-polymorphic-parts` ||| +| `no-random-settings` ||| +| `no-random-merge-tree-settings` ||| +| `no-backward-compatibility-check` ||| +| `no-cpu-x86_64` ||| +| `no-cpu-aarch64` ||| +| `no-cpu-ppc64le` ||| +| `no-s3-storage` ||| + +上記ã®è¨­å®šã«åŠ ãˆã¦ã€ç‰¹å®šã®ClickHouse機能ã®ä½¿ç”¨ã‚’定義ã™ã‚‹ãŸã‚ã« `system.build_options` ã® `USE_*` フラグを使用ã§ãã¾ã™ã€‚ +例ãˆã°ã€ãƒ†ã‚¹ãƒˆãŒMySQLテーブルを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€`use-mysql` タグを追加ã—ã¦ãã ã•ã„。 + +### ランダム設定ã®é™ç•Œã‚’指定ã™ã‚‹ + +テストã¯ã€å®Ÿè¡Œä¸­ã«ãƒ©ãƒ³ãƒ€ãƒ åŒ–ã•ã‚Œã‚‹è¨­å®šã«ã¤ã„ã¦ã€æœ€å°ãŠã‚ˆã³æœ€å¤§è¨±å®¹å€¤ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`.sh` テストã®å ´åˆã€é™ç•Œã¯ã‚¿ã‚°ã®æ¬¡ã®è¡Œã¾ãŸã¯ã‚¿ã‚°ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯äºŒè¡Œç›®ã«ã‚³ãƒ¡ãƒ³ãƒˆã¨ã—ã¦è¨˜è¿°ã—ã¾ã™: + +```bash +#!/usr/bin/env bash +# Tags: no-fasttest +# Random settings limits: max_block_size=(1000, 10000); index_granularity=(100, None) +``` + +`.sql` テストã®å ´åˆã€é™ç•Œã¯ã‚¿ã‚°ã®æ¬¡ã®è¡Œã¾ãŸã¯ä¸€è¡Œç›®ã«SQLコメントã¨ã—ã¦æŒ‡å®šã—ã¾ã™: + +```sql +-- Tags: no-fasttest +-- Random settings limits: max_block_size=(1000, 10000); index_granularity=(100, None) +SELECT 1 +``` + +一ã¤ã®é™ç•Œã®ã¿ã‚’指定ã™ã‚‹å ´åˆã¯ã€ã‚‚ã†ä¸€æ–¹ã« `None` を使用ã§ãã¾ã™ã€‚ + +### テストåã®é¸ã³æ–¹ + +テストåã¯ã€5æ¡ã®æŽ¥é ­è¾žã«ç¶šã説明的ãªåå‰ã§é–‹å§‹ã—ã¾ã™ï¼ˆä¾‹: `00422_hash_function_constexpr.sql`)。接頭辞をé¸ã¶ã«ã¯ã€ãã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§æ—¢ã«å­˜åœ¨ã™ã‚‹æœ€å¤§ã®æŽ¥é ­è¾žã‚’見ã¤ã‘ã€ãれを1ãšã¤å¢—ã‚„ã—ã¾ã™ã€‚ãã®é–“ã«ã€åŒã˜æ•°ã®æŽ¥é ­è¾žã‚’æŒã¤ä»–ã®ãƒ†ã‚¹ãƒˆãŒè¿½åŠ ã•ã‚Œã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ãã‚Œã¯å•é¡Œã§ã¯ãªãã€ãã®å¾Œã§å¤‰æ›´ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### 発生ã™ã¹ãエラーã®ç¢ºèª + +時々ã€ã‚µãƒ¼ãƒãƒ¼ã‚¨ãƒ©ãƒ¼ãŒä¸æ­£ãªã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ç™ºç”Ÿã™ã‚‹ã‹ãƒ†ã‚¹ãƒˆã—ãŸã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãŸã‚ã«ã€SQLテストã§æ¬¡ã®å½¢å¼ã®ç‰¹åˆ¥ãªã‚¢ãƒŽãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: +``` +select x; -- { serverError 49 } +``` +ã“ã®ãƒ†ã‚¹ãƒˆã¯ã€ã‚µãƒ¼ãƒãƒ¼ãŒæœªçŸ¥ã®ã‚«ãƒ©ãƒ  `x` ã«é–¢ã™ã‚‹ã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰49ã‚’è¿”ã™ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚エラーãŒç™ºç”Ÿã—ãªã„ã‹ã€åˆ¥ã®ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã€ãƒ†ã‚¹ãƒˆã¯å¤±æ•—ã—ã¾ã™ã€‚クライアントå´ã§ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã™ã‚‹ã“ã¨ã‚’確èªã—ãŸã„å ´åˆã¯ã€`clientError` アノテーションを使用ã—ã¦ãã ã•ã„。 + +エラーメッセージã®å…·ä½“çš„ãªè¡¨ç¾ã®ç¢ºèªã¯ã—ãªã„ã§ãã ã•ã„。将æ¥çš„ã«å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€ãƒ†ã‚¹ãƒˆãŒä¸å¿…è¦ã«å£Šã‚Œã¾ã™ã€‚エラーコードã ã‘を確èªã—ã¦ãã ã•ã„。既存ã®ã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰ãŒã‚ãªãŸã®ãƒ‹ãƒ¼ã‚ºã«å分ã«åŽ³å¯†ã§ãªã„å ´åˆã€æ–°ã—ã„エラーコードを追加ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。 + +### 分散クエリã®ãƒ†ã‚¹ãƒˆ + +機能テストã§åˆ†æ•£ã‚¯ã‚¨ãƒªã‚’使用ã—ãŸã„å ´åˆã¯ã€`127.0.0.{1..2}` アドレスを使ã£ã¦ã‚µãƒ¼ãƒãƒ¼ãŒè‡ªèº«ã‚’クエリã™ã‚‹ `remote` テーブル関数を活用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã¾ãŸã¯ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§äº‹å‰ã«å®šç¾©ã•ã‚ŒãŸãƒ†ã‚¹ãƒˆã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ï¼ˆä¾‹: `test_shard_localhost`)を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚分散クエリをサãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ã‚µãƒ¼ãƒãƒ¼ãŒæ­£ã—ã構æˆã•ã‚Œã¦ã„ã‚‹CI設定ã§å®Ÿè¡Œã•ã‚Œã‚‹ã‚ˆã†ã€ãƒ†ã‚¹ãƒˆåã« `shard` ã¾ãŸã¯ `distributed` ã¨ã„ã†å˜èªžã‚’追加ã—ã¦ãã ã•ã„。 + +### 一時ファイルã®å–り扱ㄠ+ +時ã«ã¯ã‚·ã‚§ãƒ«ãƒ†ã‚¹ãƒˆã§ã€ä½œæ¥­ç”¨ã«å³å¸­ã§ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã„ãã¤ã‹ã®CIãƒã‚§ãƒƒã‚¯ã§ã¯ã€ãƒ†ã‚¹ãƒˆãŒä¸¦è¡Œã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹ãŸã‚ã€ä¸€æ„ã§ã¯ãªã„åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スクリプト内ã§ä½œæˆã¾ãŸã¯å‰Šé™¤ã™ã‚‹ã¨ã€ãƒ•ãƒ¬ãƒ¼ã‚¯çŠ¶ã®ãƒ•ã‚¡ã‚¤ãƒ«ãªã©ã®CIãƒã‚§ãƒƒã‚¯ãŒå¤±æ•—ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å•é¡Œã‚’回é¿ã™ã‚‹ãŸã‚ã€ç’°å¢ƒå¤‰æ•° `$CLICKHOUSE_TEST_UNIQUE_NAME` を使用ã—ã¦ã€å®Ÿè¡Œä¸­ã®ãƒ†ã‚¹ãƒˆã«å›ºæœ‰ã®åå‰ã‚’一時ファイルã«ä»˜ã‘ã‚‹ã¹ãã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—時ã«ä½œæˆã—ãŸã‚Šã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—時ã«å‰Šé™¤ã—ãŸã‚Šã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ãŒã€ãã®ãƒ†ã‚¹ãƒˆã®ã¿ã§ä½¿ç”¨ä¸­ã®ãƒ•ã‚¡ã‚¤ãƒ«ã§ã‚ã‚Šã€ä¸¦è¡Œã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹ä»–ã®ãƒ†ã‚¹ãƒˆã§ã¯ãªã„ã“ã¨ãŒç¢ºèªã§ãã¾ã™ã€‚ + +## 既知ã®ãƒã‚° {#known-bugs} + +機能テストã«ã‚ˆã£ã¦å®¹æ˜“ã«å†ç¾ã§ãã‚‹ãƒã‚°ãŒè¦‹ã¤ã‹ã£ã¦ã„ã‚‹å ´åˆã€ãã®æº–å‚™ã•ã‚ŒãŸæ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã‚’ `tests/queries/bugs` ディレクトリã«ä¿å­˜ã—ã¾ã™ã€‚ãƒã‚°ãŒä¿®æ­£ã•ã‚ŒãŸéš›ã«ã¯ã€ã“れらã®ãƒ†ã‚¹ãƒˆã¯ `tests/queries/0_stateless` ã«ç§»å‹•ã•ã‚Œã¾ã™ã€‚ + +## çµ±åˆãƒ†ã‚¹ãƒˆ {#integration-tests} + +çµ±åˆãƒ†ã‚¹ãƒˆã¯ã€ClickHouseã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼æ§‹æˆã§ã®ãƒ†ã‚¹ãƒˆã‚„ã€ClickHouseãŒMySQLã€Postgresã€MongoDBãªã©ã®ä»–ã®ã‚µãƒ¼ãƒãƒ¼ã¨ã©ã®ã‚ˆã†ã«é€£æºã™ã‚‹ã‹ã‚’テストã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“れらã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯åˆ†å‰²ã‚„パケットドロップãªã©ã‚’エミュレートã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ã“れらã®ãƒ†ã‚¹ãƒˆã¯Docker上ã§å®Ÿè¡Œã•ã‚Œã€æ§˜ã€…ãªã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã‚’å«ã‚€è¤‡æ•°ã®ã‚³ãƒ³ãƒ†ãƒŠã‚’作æˆã—ã¾ã™ã€‚ + +ã“れらã®ãƒ†ã‚¹ãƒˆã‚’実行ã™ã‚‹æ–¹æ³•ã¯ `tests/integration/README.md` ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ClickHouseã¨ã‚µãƒ¼ãƒ‰ãƒ‘ーティドライãƒã®çµ±åˆã¯ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ã„ãªã„ã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ã¾ãŸã€ç¾åœ¨ã€JDBCãŠã‚ˆã³ODBCドライãƒã¨ã®çµ±åˆãƒ†ã‚¹ãƒˆã¯ã‚ã‚Šã¾ã›ã‚“。 + +## ユニットテスト {#unit-tests} + +ユニットテストã¯ã€ClickHouse全体ã§ã¯ãªãã€å˜ä¸€ã®ç‹¬ç«‹ã—ãŸãƒ©ã‚¤ãƒ–ラリやクラスをテストã—ãŸã„å ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚CMakeオプション㮠`ENABLE_TESTS` ã§ãƒ†ã‚¹ãƒˆã®ãƒ“ルドを有効ã¾ãŸã¯ç„¡åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ユニットテスト(ãŠã‚ˆã³ãã®ä»–ã®ãƒ†ã‚¹ãƒˆãƒ—ログラム)ã¯ã€ã‚³ãƒ¼ãƒ‰å…¨ä½“ã® `tests` サブディレクトリã«ã‚ã‚Šã¾ã™ã€‚ユニットテストを実行ã™ã‚‹ã«ã¯ã€`ninja test` ã¨å…¥åŠ›ã—ã¾ã™ã€‚一部ã®ãƒ†ã‚¹ãƒˆã¯ `gtest` を使用ã—ã¦ã„ã¾ã™ãŒã€ãƒ†ã‚¹ãƒˆãŒå¤±æ•—ã™ã‚‹ã¨éžã‚¼ãƒ­ã®çµ‚了コードを返ã™ãƒ—ログラムもã‚ã‚Šã¾ã™ã€‚ + +コードãŒæ—¢ã«æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã§ã‚«ãƒãƒ¼ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ¦ãƒ‹ãƒƒãƒˆãƒ†ã‚¹ãƒˆã‚’æŒã¤å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“(通常ã€æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã¯ä½¿ç”¨ãŒéžå¸¸ã«ç°¡å˜ã§ã™ï¼‰ã€‚ + +個々ã®gtestãƒã‚§ãƒƒã‚¯ã‚’実行ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«å®Ÿè¡Œãƒ•ã‚¡ã‚¤ãƒ«ã‚’直接呼ã³å‡ºã—ã¾ã™: + +```bash +$ ./src/unit_tests_dbms --gtest_filter=LocalAddress* +``` + +## パフォーマンステスト {#performance-tests} + +パフォーマンステストã¯ã€ClickHouseã®ã‚る特定ã®éƒ¨åˆ†ã®ãƒ‘フォーマンスを測定ã—ã€åˆæˆã‚¯ã‚¨ãƒªã§æ¯”較ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚パフォーマンステスト㯠`tests/performance/` ã«é…ç½®ã•ã‚Œã¦ã„ã¾ã™ã€‚å„テストã¯ãƒ†ã‚¹ãƒˆã‚±ãƒ¼ã‚¹ã®èª¬æ˜Žã‚’å«ã‚€ `.xml` ファイルã§è¡¨ç¾ã•ã‚Œã¾ã™ã€‚テスト㯠`docker/test/performance-comparison` ツールを使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚起動方法ã¯Readmeファイルã§ç¢ºèªã—ã¦ãã ã•ã„。 + +å„テストã¯ä¸€ã¤ã¾ãŸã¯è¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚’ループã§å®Ÿè¡Œã—ã¾ã™ï¼ˆãƒ‘ラメータã®çµ„ã¿åˆã‚ã›ã‚’ä¼´ã†å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚ + +ClickHouseã®ãƒ‘フォーマンスをã‚るシナリオã§æ”¹å–„ã—ãŸã„å ´åˆã€ãã—ã¦æ”¹å–„ãŒå˜ç´”ãªã‚¯ã‚¨ãƒªã§è¦³å¯Ÿã•ã‚Œã‚‹ã®ã§ã‚ã‚Œã°ã€ãƒ‘フォーマンステストを書ãã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚ã¾ãŸã€æ¯”較的孤立ã—ã¦ãŠã‚Šã€ã‚ã¾ã‚Šè¤‡é›‘ã§ãªã„SQL関数を追加ã¾ãŸã¯å¤‰æ›´ã™ã‚‹å ´åˆã«ã‚‚ã€ãƒ‘フォーマンステストを書ãã“ã¨ã‚’推奨ã—ã¾ã™ã€‚テストã®éš›ã«ã¯å¸¸ã« `perf top` ã‚„ä»–ã® `perf` ツールを使用ã™ã‚‹ã“ã¨ãŒæ„味ãŒã‚ã‚Šã¾ã™ã€‚ + +## テストツールã¨ã‚¹ã‚¯ãƒªãƒ—ト {#test-tools-and-scripts} + +`tests` ディレクトリ内ã®ã„ãã¤ã‹ã®ãƒ—ログラムã¯æº–å‚™ã•ã‚ŒãŸãƒ†ã‚¹ãƒˆã§ã¯ãªãã€ãƒ†ã‚¹ãƒˆãƒ„ールã§ã™ã€‚例ãˆã°ã€`Lexer` ã®ãŸã‚ã« `src/Parsers/tests/lexer` ã¨ã„ã†ãƒ„ールãŒã‚ã‚Šã€ã“ã‚Œã¯æ¨™æº–入力ã®ãƒˆãƒ¼ã‚¯ãƒ³åŒ–ã‚’è¡Œã„ã€æ¨™æº–出力ã«ã‚«ãƒ©ãƒ¼åŒ–ã•ã‚ŒãŸçµæžœã‚’書ã出ã—ã¾ã™ã€‚ã“れらã®ç¨®é¡žã®ãƒ„ールã¯ã‚³ãƒ¼ãƒ‰ä¾‹ã¨ã—ã¦ã€ã¾ãŸã¯æ¤œè¨¼ã‚„手動テストã®ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +## ãã®ä»–ã®ãƒ†ã‚¹ãƒˆ {#miscellaneous-tests} + +`tests/external_models` ã«ã¯æ©Ÿæ¢°å­¦ç¿’モデルã®ãƒ†ã‚¹ãƒˆãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®ãƒ†ã‚¹ãƒˆã¯æ›´æ–°ã•ã‚Œã¦ãŠã‚‰ãšã€çµ±åˆãƒ†ã‚¹ãƒˆã«ç§»è¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +クォーラム挿入ã®ãŸã‚ã®å€‹åˆ¥ã®ãƒ†ã‚¹ãƒˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ†ã‚¹ãƒˆã¯ClickHouseクラスターを別ã®ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã—ã€ã„ãã¤ã‹ã®æ•…障ケースをエミュレートã—ã¾ã™: ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯åˆ†å‰²ã€ãƒ‘ケットドロップ(ClickHouseノード間ã€ClickHouseã¨ZooKeeperé–“ã€ClickHouseサーãƒãƒ¼ã¨ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆé–“ãªã©ï¼‰ã€`kill -9`ã€`kill -STOP`ã€ãŠã‚ˆã³`kill -CONT`ãªã©ã‚’ã€[Jepsen](https://aphyr.com/tags/Jepsen) ã®ã‚ˆã†ã«ã€‚ãã—ã¦ã€ã™ã¹ã¦ã®ç¢ºèªã•ã‚ŒãŸæŒ¿å…¥ãŒè¨˜éŒ²ã•ã‚Œã€ã™ã¹ã¦æ‹’å¦ã•ã‚ŒãŸæŒ¿å…¥ãŒè¨˜éŒ²ã•ã‚Œã¦ã„ãªã„ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +クォーラムテストã¯ã€ClickHouseãŒã‚ªãƒ¼ãƒ—ンソース化ã•ã‚Œã‚‹å‰ã«åˆ¥ã®ãƒãƒ¼ãƒ ã«ã‚ˆã£ã¦æ›¸ã‹ã‚Œã¾ã—ãŸã€‚ã“ã®ãƒãƒ¼ãƒ ã¯ç¾åœ¨ClickHouseã«é–¢ä¸Žã—ã¦ã„ã¾ã›ã‚“。テストã¯èª¤ã£ã¦Javaã§æ›¸ã‹ã‚Œã¦ã—ã¾ã„ã¾ã—ãŸã€‚ã“れらã®ç†ç”±ã‹ã‚‰ã€ã‚¯ã‚©ãƒ¼ãƒ©ãƒ ãƒ†ã‚¹ãƒˆã¯æ›¸ãç›´ã•ã‚Œã€çµ±åˆãƒ†ã‚¹ãƒˆã«ç§»è¡Œã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ + +## 手動テスト {#manual-testing} + +æ–°ã—ã„機能を開発ã™ã‚‹éš›ã«ã¯ã€æ‰‹å‹•ã§æ©Ÿèƒ½ã‚’テストã™ã‚‹ã“ã¨ã‚‚åˆç†çš„ã§ã™ã€‚以下ã®æ‰‹é †ã§ãれを行ã†ã“ã¨ãŒã§ãã¾ã™: + +ClickHouseをビルドã—ã¾ã™ã€‚ターミナルã‹ã‚‰ClickHouseを実行ã—ã¾ã™: `programs/clickhouse-server` ディレクトリã«ç§»å‹•ã—ã€`./clickhouse-server` ã§å®Ÿè¡Œã—ã¾ã™ã€‚デフォルトã§ç¾åœ¨ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆ`config.xml`ã€`users.xml`ã€ãŠã‚ˆã³ `config.d` 㨠`users.d` ディレクトリ内ã®ãƒ•ã‚¡ã‚¤ãƒ«ï¼‰ã‚’使用ã—ã¾ã™ã€‚ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã€`programs/clickhouse-client/clickhouse-client` を実行ã—ã¾ã™ã€‚ + +ã™ã¹ã¦ã®clickhouseツール(サーãƒãƒ¼ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãªã©ï¼‰ã¯ `clickhouse` ã¨ã„ã†å˜ä¸€ã®ãƒã‚¤ãƒŠãƒªã«ãƒªãƒ³ã‚¯ã•ã‚Œã¦ã„ã‚‹ã ã‘ã§ã™ã€‚ã“ã®ãƒã‚¤ãƒŠãƒªã¯ `programs/clickhouse` ã«ã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ„ール㯠`clickhouse tool` ã¨ã—ã¦ã€ã‚ã‚‹ã„㯠`clickhouse-tool` ã¨ã—ã¦èµ·å‹•ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +別ã®æ–¹æ³•ã¨ã—ã¦ã€ClickHouseパッケージをインストールã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: ClickHouseリãƒã‚¸ãƒˆãƒªã‹ã‚‰ã®å®‰å®šç‰ˆãƒªãƒªãƒ¼ã‚¹ã¾ãŸã¯`./release` を使用ã—ã¦è‡ªåˆ†è‡ªèº«ã§ãƒ“ルドã—ãŸãƒ‘ッケージを入手å¯èƒ½ã§ã™ã€‚サーãƒãƒ¼ã‚’èµ·å‹•ã™ã‚‹ã«ã¯ `sudo clickhouse start`(ã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ã‚’åœæ­¢ã™ã‚‹ã«ã¯ stop)を実行ã—ã¾ã™ã€‚ログ㯠`/etc/clickhouse-server/clickhouse-server.log` ã«ã‚ã‚Šã¾ã™ã€‚ + +システムã«ã™ã§ã«ClickHouseãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹å ´åˆã€æ–°ã—ã„ `clickhouse` ãƒã‚¤ãƒŠãƒªã‚’ビルドã—ã€æ—¢å­˜ã®ãƒã‚¤ãƒŠãƒªã‚’ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™: + +``` bash +$ sudo clickhouse stop +$ sudo cp ./clickhouse /usr/bin/ +$ sudo clickhouse start +``` + +ã¾ãŸã‚·ã‚¹ãƒ†ãƒ ã®clickhouse-serverã‚’åœæ­¢ã—ã€åŒã˜è¨­å®šã§ç‹¬è‡ªã®ã‚µãƒ¼ãƒãƒ¼ã‚’ターミナルã§ãƒ­ã‚°ã‚’å–ã‚ŠãªãŒã‚‰å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +``` bash +$ sudo clickhouse stop +$ sudo -u clickhouse /usr/bin/clickhouse server --config-file /etc/clickhouse-server/config.xml +``` + +gdbを使ã£ãŸä¾‹: + +``` bash +$ sudo -u clickhouse gdb --args /usr/bin/clickhouse server --config-file /etc/clickhouse-server/config.xml +``` + +システムã®clickhouse-serverãŒã™ã§ã«å®Ÿè¡Œä¸­ã§ã‚ã‚Šã€ãれをåœæ­¢ã—ãŸããªã„å ´åˆã€`config.d` ディレクトリ内ã®ãƒ•ã‚¡ã‚¤ãƒ«ã§ä¸Šæ›¸ãã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šè‡ªåˆ†ã® `config.xml` ã®ãƒãƒ¼ãƒˆç•ªå·ã‚’変更ã—ã¦é©åˆ‡ãªãƒ‡ãƒ¼ã‚¿ãƒ‘スをæä¾›ã—ã€å®Ÿè¡Œã§ãã¾ã™ã€‚ + +`clickhouse` ãƒã‚¤ãƒŠãƒªã¯ã»ã¨ã‚“ã©ä¾å­˜é–¢ä¿‚ãŒãªãã€å¹…広ã„Linuxディストリビューションã§å‹•ä½œã—ã¾ã™ã€‚サーãƒãƒ¼ä¸Šã§ã®å¤‰æ›´ã‚’ç´ æ—©ã確èªã—ãŸã„å ´åˆã€ãƒ“ルドã—㟠`clickhouse` ãƒã‚¤ãƒŠãƒªã‚’サーãƒãƒ¼ã« `scp` ã—ã€ä¸Šè¨˜ã®ä¾‹ã®ã‚ˆã†ã«ãれを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## ビルドテスト {#build-tests} + +ビルドテストを行ã†ã“ã¨ã§ã€ç•°ãªã‚‹ä»£æ›¿æ§‹æˆã‚„一部ã®å¤–国ã®ã‚·ã‚¹ãƒ†ãƒ ã§ãƒ“ルドãŒå£Šã‚Œã¦ã„ãªã„ã“ã¨ã‚’確èªã§ãã¾ã™ã€‚ã“れらã®ãƒ†ã‚¹ãƒˆã¯è‡ªå‹•åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +例: +- Darwin x86_64(macOS)用ã®ã‚¯ãƒ­ã‚¹ã‚³ãƒ³ãƒ‘イル +- FreeBSD x86_64用ã®ã‚¯ãƒ­ã‚¹ã‚³ãƒ³ãƒ‘イル +- Linux AArch64用ã®ã‚¯ãƒ­ã‚¹ã‚³ãƒ³ãƒ‘イル +- システムパッケージã‹ã‚‰ã®ãƒ©ã‚¤ãƒ–ラリã§Ubuntu上ã§ãƒ“ルド(推奨ã•ã‚Œãªã„) +- ライブラリã®å…±æœ‰ãƒªãƒ³ã‚¯ã§ãƒ“ルド(推奨ã•ã‚Œãªã„) + +例ãˆã°ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ‘ッケージã‹ã‚‰ã®ãƒ“ルドã¯æ‚ªã„慣習ã§ã™ã€‚ãªãœãªã‚‰ã€ã‚·ã‚¹ãƒ†ãƒ ãŒä½•ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ‘ッケージをæŒã¤ã‹ã‚’ä¿è¨¼ã§ããªã„ã‹ã‚‰ã§ã™ã€‚ã—ã‹ã—ã€ã“ã‚Œã¯Debianã®ãƒ¡ãƒ³ãƒ†ãƒŠã«ã‚ˆã£ã¦ã©ã†ã—ã¦ã‚‚å¿…è¦ã¨ã•ã‚Œã¾ã™ã€‚ã“ã®ãŸã‚ã€å°‘ãªãã¨ã‚‚ã“ã®ãƒ“ルドã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã‚’サãƒãƒ¼ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚別ã®ä¾‹ã¨ã—ã¦ã¯ã€å…±æœ‰ãƒªãƒ³ã‚¯ã¯ä¸€èˆ¬çš„ãªãƒˆãƒ©ãƒ–ルã®åŽŸå› ã¨ãªã‚Šã¾ã™ãŒã€ä¸€éƒ¨ã®æ„›å¥½å®¶ã«ã¯å¿…è¦ã§ã™ã€‚ + +å…¨ã¦ã®ãƒ“ルドã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã«å…¨ã¦ã®ãƒ†ã‚¹ãƒˆã‚’実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€å°‘ãªãã¨ã‚‚様々ãªãƒ“ルドãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒå£Šã‚Œã¦ã„ãªã„ã“ã¨ã¯ç¢ºèªã—ãŸã„ã¨è€ƒãˆã¦ã„ã¾ã™ã€‚ã“ã®ç›®çš„ã§ãƒ“ルドテストを使用ã—ã¾ã™ã€‚ + +ã¾ãŸã€ã‚³ãƒ³ãƒ‘イルã™ã‚‹ã®ã«æ™‚é–“ãŒã‹ã‹ã‚‹ã‹ã€å¤šãã®RAMã‚’å¿…è¦ã¨ã™ã‚‹ç¿»è¨³å˜ä½ãŒãªã„ã“ã¨ã‚‚テストã—ã¾ã™ã€‚ + +ã¾ãŸã€å¤§ãã™ãŽã‚‹ã‚¹ã‚¿ãƒƒã‚¯ãƒ•ãƒ¬ãƒ¼ãƒ ãŒãªã„ã“ã¨ã‚‚テストã—ã¾ã™ã€‚ + +## プロトコル互æ›æ€§ã®ãƒ†ã‚¹ãƒˆ {#testing-for-protocol-compatibility} + +ClickHouseãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ—ロトコルを拡張ã™ã‚‹éš›ã«ã¯ã€å¤ã„clickhouse-clientãŒæ–°ã—ã„clickhouse-serverã¨å‹•ä½œã™ã‚‹ã‹ã€æ–°ã—ã„clickhouse-clientãŒå¤ã„clickhouse-serverã¨å‹•ä½œã™ã‚‹ã‹ã‚’手動ã§ãƒ†ã‚¹ãƒˆã—ã¦ã„ã¾ã™ï¼ˆå¯¾å¿œã™ã‚‹ãƒ‘ッケージã‹ã‚‰ã®ãƒã‚¤ãƒŠãƒªã‚’実行ã™ã‚‹ã“ã¨ã§ç¢ºèªï¼‰ã€‚ + +ã¾ãŸã€çµ±åˆãƒ†ã‚¹ãƒˆã§ã„ãã¤ã‹ã®ã‚±ãƒ¼ã‚¹ã‚’自動的ã«ãƒ†ã‚¹ãƒˆã—ã¦ã„ã¾ã™: +- å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ClickHouseã«ã‚ˆã£ã¦æ›¸ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§æ­£ã—ã読ã¿å–ã‚Šå¯èƒ½ã§ã‚ã‚‹ã‹ã©ã†ã‹ã€‚ +- ç•°ãªã‚‹ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒæ··åœ¨ã™ã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã§åˆ†æ•£ã‚¯ã‚¨ãƒªãŒæ©Ÿèƒ½ã™ã‚‹ã‹ã©ã†ã‹ã€‚ + +## コンパイラã®æ”¯æ´ {#help-from-the-compiler} + +メインã®ClickHouseコード(`dbms` ディレクトリã«ã‚るコード)ã¯ã€`-Wall -Wextra -Werror` ãŠã‚ˆã³ã„ãã¤ã‹ã®è¿½åŠ ã®è­¦å‘ŠãŒæœ‰åŠ¹ã«ãªã£ã¦ãƒ“ルドã•ã‚Œã¾ã™ã€‚ãŸã ã—ã€ã“れらã®ã‚ªãƒ—ションã¯ã‚µãƒ¼ãƒ‰ãƒ‘ーティã®ãƒ©ã‚¤ãƒ–ラリã«ã¯é©ç”¨ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +Clangã«ã¯ã•ã‚‰ã«å¤šãã®æœ‰ç”¨ãªè­¦å‘ŠãŒã‚ã‚Šã¾ã™ - `-Weverything` を使ã£ã¦ãれらを探ã—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ“ルドã«å–り入れるもã®ã‚’é¸ã¶ã“ã¨ãŒã§ãã¾ã™ã€‚ + +本番ビルドã§ã¯clangãŒä½¿ç”¨ã•ã‚Œã¾ã™ãŒã€gccビルドもテストã—ã¦ã„ã¾ã™ã€‚開発ã§ã¯ã€clangを使用ã™ã‚‹æ–¹ãŒé€šå¸¸ã¯ä¾¿åˆ©ã§ã™ã€‚自分ã®ãƒžã‚·ãƒ³ã§ãƒ‡ãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰ã§ãƒ“ルドã™ã‚‹ï¼ˆãƒ©ãƒƒãƒ—トップã®ãƒãƒƒãƒ†ãƒªãƒ¼ã‚’節約ã™ã‚‹ãŸã‚)ã“ã¨ãŒã§ãã¾ã™ãŒã€ã‚³ãƒ³ãƒ‘イラ㯠`-O3` を使ã£ã¦ã‚ˆã‚Šè‰¯ã„制御フローãŠã‚ˆã³æ‰‹ç¶šã間解æžã‚’è¡Œã„ã€ã‚ˆã‚Šå¤šãã®è­¦å‘Šã‚’生æˆã™ã‚‹ã“ã¨ãŒã§ãã‚‹ã“ã¨ã‚’注æ„ã—ã¦ãã ã•ã„。デãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰ã§clangを使用ã™ã‚‹ã¨ãã€`libc++` ã®ãƒ‡ãƒãƒƒã‚°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒä½¿ç”¨ã•ã‚Œã€å®Ÿè¡Œæ™‚ã«ã‚ˆã‚Šå¤šãã®ã‚¨ãƒ©ãƒ¼ã‚’キャッãƒã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +## サニタイザ {#sanitizers} + +:::note +ローカルã§èµ·å‹•ã™ã‚‹ã¨ãã«ãƒ—ロセス(ClickHouseサーãƒãƒ¼ã¾ãŸã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆï¼‰ãŒã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹å ´åˆã¯ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ç©ºé–“レイアウトランダム化を無効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“: `sudo sysctl kernel.randomize_va_space=0` +::: + +### アドレスサニタイザ +ASanã®ä¸‹ã§ã®æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã€çµ±åˆãƒ†ã‚¹ãƒˆã€ã‚¹ãƒˆãƒ¬ã‚¹ãƒ†ã‚¹ãƒˆã€ãŠã‚ˆã³ãƒ¦ãƒ‹ãƒƒãƒˆãƒ†ã‚¹ãƒˆã‚’コミットã”ã¨ã«å®Ÿè¡Œã—ã¦ã„ã¾ã™ã€‚ + +### スレッドサニタイザ +TSanã®ä¸‹ã§ã®æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã€çµ±åˆãƒ†ã‚¹ãƒˆã€ã‚¹ãƒˆãƒ¬ã‚¹ãƒ†ã‚¹ãƒˆã€ãŠã‚ˆã³ãƒ¦ãƒ‹ãƒƒãƒˆãƒ†ã‚¹ãƒˆã‚’コミットã”ã¨ã«å®Ÿè¡Œã—ã¦ã„ã¾ã™ã€‚ + +### メモリサニタイザ +MSanã®ä¸‹ã§ã®æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã€çµ±åˆãƒ†ã‚¹ãƒˆã€ã‚¹ãƒˆãƒ¬ã‚¹ãƒ†ã‚¹ãƒˆã€ãŠã‚ˆã³ãƒ¦ãƒ‹ãƒƒãƒˆãƒ†ã‚¹ãƒˆã‚’コミットã”ã¨ã«å®Ÿè¡Œã—ã¦ã„ã¾ã™ã€‚ + +### ä¸å®šå‹•ä½œã‚µãƒ‹ã‚¿ã‚¤ã‚¶ +UBSanã®ä¸‹ã§ã®æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã€çµ±åˆãƒ†ã‚¹ãƒˆã€ã‚¹ãƒˆãƒ¬ã‚¹ãƒ†ã‚¹ãƒˆã€ãŠã‚ˆã³ãƒ¦ãƒ‹ãƒƒãƒˆãƒ†ã‚¹ãƒˆã‚’コミットã”ã¨ã«å®Ÿè¡Œã—ã¦ã„ã¾ã™ã€‚ã„ãã¤ã‹ã®ã‚µãƒ¼ãƒ‰ãƒ‘ーティライブラリã®ã‚³ãƒ¼ãƒ‰ã¯UBã«ã¤ã„ã¦ã®ã‚µãƒ‹ã‚¿ã‚¤ã‚¸ãƒ³ã‚°ãŒã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +### Valgrind(Memcheck) +éŽåŽ»ã«ã¯Valgrindを使ã£ã¦å¤œé–“ã«æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã‚’実行ã—ã¦ã„ã¾ã—ãŸãŒã€ä»Šã¯è¡Œã£ã¦ã„ã¾ã›ã‚“。数時間ã‹ã‹ã‚Šã¾ã™ã€‚ç¾åœ¨ã€`re2` ライブラリã«æ—¢çŸ¥ã®å½é™½æ€§ãŒä¸€ã¤ã‚ã‚Šã¾ã™ã€‚詳細ã¯[ã“ã®è¨˜äº‹](https://research.swtch.com/sparse)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## ファジング {#fuzzing} + +ClickHouseã®ãƒ•ã‚¡ã‚¸ãƒ³ã‚°ã¯ã€[libFuzzer](https://llvm.org/docs/LibFuzzer.html) ã¨ãƒ©ãƒ³ãƒ€ãƒ SQLクエリã®ä¸¡æ–¹ã‚’使用ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ +ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¸ãƒ¼ãƒ†ã‚¹ãƒˆã¯ã‚µãƒ‹ã‚¿ã‚¤ã‚¶ï¼ˆã‚¢ãƒ‰ãƒ¬ã‚¹ãŠã‚ˆã³ä¸å®šå‹•ä½œï¼‰ã‚’使用ã—ã¦å®Ÿè¡Œã™ã‚‹ã¹ãã§ã™ã€‚ + +LibFuzzerã¯ãƒ©ã‚¤ãƒ–ラリコードã®å­¤ç«‹ã—ãŸãƒ•ã‚¡ã‚¸ãƒ¼ãƒ†ã‚¹ãƒˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ファジーã¯ãƒ†ã‚¹ãƒˆã‚³ãƒ¼ãƒ‰ã®ä¸€éƒ¨ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã€ã€Œ_fuzzerã€ã¨ã„ã†åå‰ã®æŽ¥å°¾è¾žãŒä»˜ã‘られã¾ã™ã€‚ +ファザーã®ä¾‹ã¯ `src/Parsers/fuzzers/lexer_fuzzer.cpp` ã«ã‚ã‚Šã¾ã™ã€‚LibFuzzer固有ã®è¨­å®šã€Dictionaryã€ãŠã‚ˆã³ã‚³ãƒ¼ãƒ‘ス㯠`tests/fuzz` ã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ +ユーザー入力を処ç†ã™ã‚‹ã™ã¹ã¦ã®æ©Ÿèƒ½ã«å¯¾ã—ã¦ãƒ•ã‚¡ã‚¸ãƒ¼ãƒ†ã‚¹ãƒˆã‚’書ãã“ã¨ã‚’奨励ã—ã¾ã™ã€‚ + +ファッザーã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ãƒ“ルドã•ã‚Œã¾ã›ã‚“。ファッザーをビルドã™ã‚‹ã«ã¯ `-DENABLE_FUZZING=1` ãŠã‚ˆã³ `-DENABLE_TESTS=1` オプションを設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +ジェマロックを無効ã«ã—ã¦ãƒ•ã‚¡ã‚¸ãƒ¼ãƒ†ã‚¹ãƒˆã‚’ビルドã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ClickHouseã®ãƒ•ã‚¡ãƒƒã‚¸ãƒ³ã‚°ã‚’Googleã®OSS-Fuzzã«çµ±åˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æ§‹æˆã¯ `docker/fuzz` ã«ã‚ã‚Šã¾ã™ã€‚ + +ã¾ãŸã€ã‚µãƒ¼ãƒãƒ¼ãŒãれらを実行ã™ã‚‹ã¨ãã«æ­»ãªãªã„ã“ã¨ã‚’確èªã™ã‚‹ãŸã‚ã«ãƒ©ãƒ³ãƒ€ãƒ SQLクエリを生æˆã™ã‚‹å˜ç´”ãªãƒ•ã‚¡ã‚¸ãƒ¼ãƒ†ã‚¹ãƒˆã‚‚使用ã—ã¾ã™ã€‚ +`00746_sql_fuzzy.pl` ã«ã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ç¶™ç¶šçš„ã«ï¼ˆå¤œé–“や長時間ã«ã‚ãŸã£ã¦ï¼‰å®Ÿè¡Œã•ã‚Œã‚‹ã¹ãテストã§ã™ã€‚ + +ã¾ãŸã€ASTベースã®é«˜åº¦ãªã‚¯ã‚¨ãƒªãƒ•ã‚¡ã‚¶ãƒ¼ã‚’使用ã—ã€å¤šãã®ã‚³ãƒ¼ãƒŠãƒ¼ã‚±ãƒ¼ã‚¹ã‚’見ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã‚¯ã‚¨ãƒªASTã§ãƒ©ãƒ³ãƒ€ãƒ ãªç½®æ›ã‚’è¡Œã„ã¾ã™ã€‚テストã®é€”中ã§ãれらをランダムãªé †åºã§å‡¦ç†ã™ã‚‹éš›ã«ã€ä»¥å‰ã®ãƒ†ã‚¹ãƒˆã‹ã‚‰ASTノードを記憶ã—ã€å¾Œç¶šã®ãƒ†ã‚¹ãƒˆã®ãƒ•ã‚¡ã‚¸ãƒ³ã‚°ã«ãれらを使用ã—ã¾ã™ã€‚ã“ã®ãƒ•ã‚¡ã‚¶ãƒ¼ã«ã¤ã„ã¦ã®è©³ç´°ã¯[ã“ã®ãƒ–ログ記事](https://clickhouse.com/blog/fuzzing-click-house)ã§å­¦ã¶ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## ストレステスト + +ストレステストã¯ãƒ•ã‚¡ã‚¸ãƒ³ã‚°ã®åˆ¥ã®ã‚±ãƒ¼ã‚¹ã§ã™ã€‚ã“ã‚Œã¯ä¸€ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã§ãƒ©ãƒ³ãƒ€ãƒ ãªé †åºã§ä¸¦è¡Œã—ã¦ã™ã¹ã¦ã®æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆã‚’実行ã—ã¾ã™ã€‚テストçµæžœã¯ç¢ºèªã•ã‚Œã¾ã›ã‚“。 + +確èªã•ã‚Œã‚‹ã“ã¨: +- サーãƒãƒ¼ãŒã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã—ãªã„ã“ã¨ã€ãƒ‡ãƒãƒƒã‚°ã¾ãŸã¯ã‚µãƒ‹ã‚¿ã‚¤ã‚¶ã®ãƒˆãƒ©ãƒƒãƒ—ãŒç™ºå‹•ã•ã‚Œãªã„ã“㨠+- デッドロックãŒãªã„ã“㨠+- データベース構造ãŒä¸€è²«ã—ã¦ã„ã‚‹ã“㨠+- テスト後ã«ã‚µãƒ¼ãƒãƒ¼ãŒæ­£å¸¸ã«åœæ­¢ã§ãã€ä¾‹å¤–ãªãå†èµ·å‹•ã§ãã‚‹ã“㨠+ +デãƒãƒƒã‚°ã€ASanã€TSanã€MSanã€UBSanã®äº”ã¤ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒã‚ã‚Šã¾ã™ã€‚ + +## スレッドファザー + +スレッドサニタイザã¨æ··åŒã—ãªã„ã§ãã ã•ã„。スレッドファザーã¯ã‚¹ãƒ¬ãƒƒãƒ‰ã®å®Ÿè¡Œé †åºã‚’ランダム化ã™ã‚‹åˆ¥ã®ç¨®é¡žã®ãƒ•ã‚¡ã‚¸ãƒ³ã‚°ã§ã™ã€‚ãã‚Œã«ã‚ˆã‚Šã€ã•ã‚‰ã«ç‰¹åˆ¥ãªã‚±ãƒ¼ã‚¹ã‚’見ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## セキュリティ監査 + +セキュリティãƒãƒ¼ãƒ ã¯ClickHouseã®èƒ½åŠ›ã«ã¤ã„ã¦åŸºæœ¬çš„ãªæ¦‚è¦ã‚’è¡Œã„ã¾ã—ãŸã€‚ + +## é™çš„è§£æž {#static-analyzers} + +`clang-tidy` をコミットã”ã¨ã«å®Ÿè¡Œã—ã¦ã„ã¾ã™ã€‚`clang-static-analyzer` ãƒã‚§ãƒƒã‚¯ã‚‚有効ã«ã—ã¦ã„ã¾ã™ã€‚`clang-tidy` ã¯ä¸€éƒ¨ã®ã‚¹ã‚¿ã‚¤ãƒ«ãƒã‚§ãƒƒã‚¯ã«ã‚‚使用ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +`clang-tidy`ã€`Coverity`ã€`cppcheck`ã€`PVS-Studio`ã€`tscancode`ã€`CodeQL` を評価ã—ã¾ã—ãŸã€‚使用方法ã«ã¤ã„ã¦ã®æŒ‡ç¤ºã¯ `tests/instructions/` ディレクトリã«ã‚ã‚Šã¾ã™ã€‚ + +`CLion` ã‚’IDEã¨ã—ã¦ä½¿ç”¨ã—ã¦ã„ã‚‹å ´åˆã€ã„ãã¤ã‹ã® `clang-tidy` ãƒã‚§ãƒƒã‚¯ã‚’ãã®ã¾ã¾ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã¾ãŸã€`shellcheck` をシェルスクリプトã®é™çš„解æžã«ä½¿ç”¨ã—ã¦ãŠã‚Šã¾ã™ã€‚ + +## ãƒãƒ¼ãƒ‰ãƒ‹ãƒ³ã‚° {#hardening} + +デãƒãƒƒã‚°ãƒ“ルドã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ¬ãƒ™ãƒ«ã®å‰²ã‚Šå½“ã¦ã®ASLR(アドレス空間レイアウトランダム化)を行ã†ã‚«ã‚¹ã‚¿ãƒ ã‚¢ãƒ­ã‚±ãƒ¼ã‚¿ã‚’使用ã—ã¦ã„ã¾ã™ã€‚ + +ã¾ãŸã€ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³å¾Œã«èª­ã¿å–り専用ã§ã‚ã‚‹ã“ã¨ãŒæœŸå¾…ã•ã‚Œã‚‹ãƒ¡ãƒ¢ãƒªé ˜åŸŸã‚’手動ã§ä¿è­·ã—ã¾ã™ã€‚ + +デãƒãƒƒã‚°ãƒ“ルドã§ã¯ã€å¤ãã€éžæŽ¨å¥¨ã§ã‚ã‚‹ã‹ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šå•é¡ŒãŒã‚ã‚‹ã‹ã€ã‚¹ãƒ¬ãƒƒãƒ‰å®‰å…¨ã§ãªã„ã¨ã•ã‚Œã‚‹é–¢æ•°ãŒå‘¼ã³å‡ºã•ã‚Œãªã„ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºãŒæ–½ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +デãƒãƒƒã‚°ã‚¢ã‚µãƒ¼ã‚·ãƒ§ãƒ³ãŒåºƒç¯„ã«ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +デãƒãƒƒã‚°ãƒ“ルドã§ã¯ã€"è«–ç†ã‚¨ãƒ©ãƒ¼" コード(ãƒã‚°ã‚’å«æ„)ã§ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã‚‹å ´åˆã€ãƒ—ログラムã¯ç›´ã¡ã«åœæ­¢ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒªãƒªãƒ¼ã‚¹ãƒ“ルドã§ã¯ä¾‹å¤–を使用ã—ã€ãƒ‡ãƒãƒƒã‚°ãƒ“ルドã§ã¯ã‚¢ã‚µãƒ¼ã‚·ãƒ§ãƒ³ã¨ã—ã¦æ‰±ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +デãƒãƒƒã‚°ãƒ“ルドã§ã¯ã‚¸ã‚§ãƒžãƒ­ãƒƒã‚¯ã®ãƒ‡ãƒãƒƒã‚°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¦ã„ã¾ã™ã€‚ +デãƒãƒƒã‚°ãƒ“ルドã§ã¯libc++ã®ãƒ‡ãƒãƒƒã‚°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚‚使用ã—ã¦ã„ã¾ã™ã€‚ + +## 実行時整åˆæ€§ãƒã‚§ãƒƒã‚¯ + +ディスクã«ä¿å­˜ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«ã¯ãƒã‚§ãƒƒã‚¯ã‚µãƒ ãŒä»˜ã‘られã¦ã„ã¾ã™ã€‚MergeTreeテーブルã®ãƒ‡ãƒ¼ã‚¿ã¯3ã¤ã®æ–¹æ³•ã§åŒæ™‚ã«ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã•ã‚Œã¾ã™ï¼ˆåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã€éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã€ãƒ–ロック間ã®ç·åˆãƒã‚§ãƒƒã‚¯ã‚µãƒ ï¼‰ã€‚クライアントã¨ã‚µãƒ¼ãƒãƒ¼é–“ã€ã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼é–“ã§è»¢é€ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã‚‚ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã•ã‚Œã¦ã„ã¾ã™ã€‚レプリケーションã¯ãƒ¬ãƒ—リカ上ã®ãƒ“ットå˜ä½ã§åŒä¸€ã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ + +ã“ã‚Œã¯ã€æ•…éšœã—ãŸãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ï¼ˆã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¡ãƒ‡ã‚£ã‚¢ã®ãƒ“ットè…食ã€ã‚µãƒ¼ãƒãƒ¼ã®RAMã®ãƒ“ットフリップã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ©ã®RAMã®ãƒ“ットフリップã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¹ã‚¤ãƒƒãƒã®RAMã®ãƒ“ットフリップã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®RAMã®ãƒ“ットフリップã€ãƒ¯ã‚¤ãƒ¤ä¸Šã®ãƒ“ットフリップ)ã‹ã‚‰ä¿è­·ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚ビットフリップã¯ä¸€èˆ¬çš„ã§ã‚ã‚Šã€ECC RAMã§ã‚‚ã€TCPãƒã‚§ãƒƒã‚¯ã‚µãƒ ãŒå­˜åœ¨ã—ã¦ã„ã¦ã‚‚発生ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼ˆæ•°åƒã®ã‚µãƒ¼ãƒãƒ¼ãŒæ¯Žæ—¥ãƒšã‚¿ãƒã‚¤ãƒˆã®ãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã™ã‚‹ã¨ç®¡ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ï¼‰ã€‚[動画をå‚ç…§ã—ã¦ãã ã•ã„(ロシア語)](https://www.youtube.com/watch?v=ooBAQIe0KlQ). + +ClickHouseã¯opsエンジニアãŒæ•…éšœã—ãŸãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‚’見ã¤ã‘ã‚‹ã®ã«å½¹ç«‹ã¤è¨ºæ–­ã‚’æä¾›ã—ã¾ã™ã€‚ + +\* ãã—ã¦ãã‚Œã¯é…ãã‚ã‚Šã¾ã›ã‚“。 + +## コードスタイル {#code-style} + +コードスタイルã®ãƒ«ãƒ¼ãƒ«ã¯[ã“ã“](style.md)ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +一般的ãªã‚¹ã‚¿ã‚¤ãƒ«é•åã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ãŸã‚ã«ã€`utils/check-style` スクリプトを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +コードã®é©åˆ‡ãªã‚¹ã‚¿ã‚¤ãƒ«ã‚’強制ã™ã‚‹ãŸã‚ã«ã€`clang-format` を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`.clang-format` ファイルã¯ã‚½ãƒ¼ã‚¹ã®ãƒ«ãƒ¼ãƒˆã«ã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ç§ãŸã¡ã®å®Ÿéš›ã®ã‚³ãƒ¼ãƒ‰ã‚¹ã‚¿ã‚¤ãƒ«ã¨ä¸»ã«ä¸€è‡´ã—ã¦ã„ã¾ã™ã€‚ã—ã‹ã—ã€æ—¢å­˜ã®ãƒ•ã‚¡ã‚¤ãƒ«ã« `clang-format` ã‚’é©ç”¨ã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。フォーマットãŒæ‚ªããªã‚‹ã‹ã‚‰ã§ã™ã€‚clangソースリãƒã‚¸ãƒˆãƒªã«ã‚ã‚‹ `clang-format-diff` ツールを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã¾ãŸã€`uncrustify` ツールを試ã—ã¦ã‚³ãƒ¼ãƒ‰ã‚’å†ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚設定ã¯ã‚½ãƒ¼ã‚¹ã®ãƒ«ãƒ¼ãƒˆã«ã‚ã‚‹ `uncrustify.cfg` ã«ã‚ã‚Šã¾ã™ã€‚`clang-format` よりもテストã•ã‚Œã¦ã„ãªã„部分ãŒã‚ã‚Šã¾ã™ã€‚ + +`CLion` ã«ã¯ç‹¬è‡ªã®ã‚³ãƒ¼ãƒ‰ãƒ•ã‚©ãƒ¼ãƒžãƒƒã‚¿ãŒã‚ã‚Šã€ç§ãŸã¡ã®ã‚³ãƒ¼ãƒ‰ã‚¹ã‚¿ã‚¤ãƒ«ã«åˆã‚ã›ã¦èª¿æ•´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ã¾ãŸã€`codespell` を使用ã—ã¦ã‚³ãƒ¼ãƒ‰å†…ã®ã‚¹ãƒšãƒ«ãƒŸã‚¹ã‚’見ã¤ã‘ã¾ã™ã€‚ã“ã‚Œã¯è‡ªå‹•åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## テストカãƒãƒ¬ãƒƒã‚¸ {#test-coverage} + +機能テストã®ã¿ã§ãƒ†ã‚¹ãƒˆã‚«ãƒãƒ¬ãƒƒã‚¸ã‚’追跡ã—ã¦ã„ã¾ã™ãŒã€clickhouse-serverã®ã¿ã§ã™ã€‚ã“ã‚Œã¯æ—¥æ¬¡ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +## テストã®ãŸã‚ã®ãƒ†ã‚¹ãƒˆ + +ä¸å®‰å®šãªãƒ†ã‚¹ãƒˆç”¨ã®è‡ªå‹•ãƒã‚§ãƒƒã‚¯ãŒã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®æ–°ã—ã„テストを100回(機能テストã®å ´åˆï¼‰ã¾ãŸã¯10回(統åˆãƒ†ã‚¹ãƒˆã®å ´åˆï¼‰å®Ÿè¡Œã—ã¾ã™ã€‚å°‘ãªãã¨ã‚‚一回ã§ã‚‚テストãŒå¤±æ•—ã—ãŸå ´åˆã€ãã‚Œã¯ãƒ•ãƒ¬ãƒ¼ã‚¯çŠ¶ã¨ã¿ãªã•ã‚Œã¾ã™ã€‚ + +## テストã®è‡ªå‹•åŒ– {#test-automation} + +テストã¯[GitHub Actions](https://github.com/features/actions)を利用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +ビルドジョブã¨ãƒ†ã‚¹ãƒˆã¯ã‚³ãƒŸãƒƒãƒˆã”ã¨ã«Sandboxã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚生æˆã•ã‚ŒãŸãƒ‘ッケージã¨ãƒ†ã‚¹ãƒˆçµæžœã¯GitHubã«å…¬é–‹ã•ã‚Œã€ç›´æŽ¥ãƒªãƒ³ã‚¯ã§ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚æˆæžœç‰©ã¯æ•°ã‹æœˆé–“ä¿å­˜ã•ã‚Œã¾ã™ã€‚GitHubã§ãƒ—ルリクエストをé€ä¿¡ã™ã‚‹ã¨ã€ãã‚Œã¯ã€Œãƒ†ã‚¹ãƒˆå¯èƒ½ã€ã¨ã‚¿ã‚°ä»˜ã‘ã•ã‚Œã€CIシステムãŒClickHouseパッケージ(リリースã€ãƒ‡ãƒãƒƒã‚°ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚µãƒ‹ã‚¿ã‚¤ã‚¶ä»˜ï¼‰ã‚’ビルドã—ã¦ãã‚Œã¾ã™ã€‚ + +時間ã¨è¨ˆç®—力ã«åˆ¶é™ãŒã‚ã‚‹ãŸã‚ã€Travis CIã¯ä½¿ç”¨ã—ã¦ã„ã¾ã›ã‚“。 +Jenkinsã¯ä½¿ç”¨ã—ã¦ã„ã¾ã›ã‚“。ãã‚Œã¯ã‹ã¤ã¦ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã—ãŸãŒã€ç¾åœ¨ã¯ä½¿ç”¨ã—ã¦ã„ãªã„ã“ã¨ã«æº€è¶³ã—ã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/dictionary/images/dictionary-left-any-join.png b/docs/ja/dictionary/images/dictionary-left-any-join.png new file mode 100644 index 00000000000..ee121aa073f Binary files /dev/null and b/docs/ja/dictionary/images/dictionary-left-any-join.png differ diff --git a/docs/ja/dictionary/images/dictionary-use-cases.png b/docs/ja/dictionary/images/dictionary-use-cases.png new file mode 100644 index 00000000000..a67ef6271cd Binary files /dev/null and b/docs/ja/dictionary/images/dictionary-use-cases.png differ diff --git a/docs/ja/dictionary/index.md b/docs/ja/dictionary/index.md new file mode 100644 index 00000000000..e04b063cf8c --- /dev/null +++ b/docs/ja/dictionary/index.md @@ -0,0 +1,334 @@ +--- +slug: /ja/dictionary +title: Dictionary +keywords: [dictionary, dictionaries] +description: Dictionaryã¯ãƒ‡ãƒ¼ã‚¿ã‚’高速ã«æ¤œç´¢ã™ã‚‹ãŸã‚ã®ã‚­ãƒ¼-ãƒãƒªãƒ¥ãƒ¼è¡¨ç¾ã‚’æä¾›ã—ã¾ã™ã€‚ +--- + +# Dictionary + +ClickHouseã®Dictionaryã¯ã€ã•ã¾ã–ã¾ãª[内部ãŠã‚ˆã³å¤–部ソース](/ja/sql-reference/dictionaries#dictionary-sources)ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’インメモリã®[キー-ãƒãƒªãƒ¥ãƒ¼](https://en.wikipedia.org/wiki/Key%E2%80%93value_database)å½¢å¼ã§è¡¨ç¾ã—ã€è¶…低レイテンシーã®ã‚¯ã‚¨ãƒªæ¤œç´¢ã«æœ€é©åŒ–ã—ã¾ã™ã€‚ + +Dictionaryã¯ä»¥ä¸‹ã®ç”¨é€”ã«å½¹ç«‹ã¡ã¾ã™ï¼š +- 特ã«`JOIN`を使用ã™ã‚‹ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ +- インジェストプロセスをé…らã›ã‚‹ã“ã¨ãªãã€å–り込んã ãƒ‡ãƒ¼ã‚¿ã‚’ãã®å ´ã§è±Šã‹ã«ã™ã‚‹ + +![Uses cases for Dictionary in ClickHouse](./images/dictionary-use-cases.png) + +## Dictionaryを利用ã—ã¦JOINを高速化ã™ã‚‹ + +Dictionaryã¯ç‰¹å®šã®ç¨®é¡žã®`JOIN`ã€ã™ãªã‚ã¡çµåˆã‚­ãƒ¼ãŒåŸºåº•ã®ã‚­ãƒ¼-ãƒãƒªãƒ¥ãƒ¼ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ã‚­ãƒ¼å±žæ€§ã¨ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚‹[`LEFT ANY`åž‹](/ja/sql-reference/statements/select/join#supported-types-of-join)ã®é€Ÿåº¦ã‚’å‘上ã•ã›ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +Using Dictionary with LEFT ANY JOIN + +ã“ã®å ´åˆã€ClickHouseã¯Dictionaryを利用ã—ã¦[Direct Join](https://clickhouse.com/blog/clickhouse-fully-supports-joins-direct-join-part4#direct-join)を実行ã§ãã¾ã™ã€‚ã“ã‚Œã¯ClickHouseã®æœ€é€Ÿã®JOINアルゴリズムã§ã‚ã‚Šã€å³ãƒ†ãƒ¼ãƒ–ルã®[テーブルエンジン](/ja/engines/table-engines)ãŒä½Žãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã®ã‚­ãƒ¼-ãƒãƒªãƒ¥ãƒ¼ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’サãƒãƒ¼ãƒˆã™ã‚‹å ´åˆã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ClickHouseã«ã¯3ã¤ã®ã“ã®è¦ä»¶ã‚’満ãŸã™ãƒ†ãƒ¼ãƒ–ルエンジンãŒã‚ã‚Šã¾ã™ï¼š[Join](/ja/engines/table-engines/special/join)(基本的ã«äº‹å‰è¨ˆç®—ã•ã‚ŒãŸãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ル)ã€[EmbeddedRocksDB](/ja/engines/table-engines/integrations/embedded-rocksdb)ã€ãŠã‚ˆã³[Dictionary](/ja/engines/table-engines/special/dictionary)ã§ã™ã€‚以下ã§ã¯Dictionaryを利用ã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ãŒã€ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯ã“れら3ã¤ã®ã‚¨ãƒ³ã‚¸ãƒ³ã§åŒã˜ã§ã™ã€‚ + +直接çµåˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ã€å³ãƒ†ãƒ¼ãƒ–ルãŒDictionaryã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã€çµåˆã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ãŒã™ã§ã«ä½Žãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã®ã‚­ãƒ¼-ãƒãƒªãƒ¥ãƒ¼ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®å½¢å¼ã§ãƒ¡ãƒ¢ãƒªã«å­˜åœ¨ã—ã¦ã„ã‚‹ã“ã¨ã‚’è¦æ±‚ã—ã¾ã™ã€‚ + +### 例 + +StackOverflowã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’使用ã—ã¦ã€æ¬¡ã®è³ªå•ã«ç­”ãˆã¾ã™ï¼š +*Hacker Newsã§æœ€ã‚‚議論を呼んã§ã„ã‚‹SQLã«é–¢ã™ã‚‹æŠ•ç¨¿ã¯ä½•ã§ã™ã‹ï¼Ÿ* + +議論を呼ã¶æŠ•ç¨¿ã¨ã¯ã€è³›æˆç¥¨ã¨å対票ãŒä¼¼ãŸæ•°ã§ã‚ã‚‹ã‚‚ã®ã¨å®šç¾©ã—ã¾ã™ã€‚ã“ã®çµ¶å¯¾å·®ã‚’計算ã—ã€0ã«è¿‘ã„値ã»ã©è«–争ã®çš„ã«ãªã£ã¦ã„ã¾ã™ã€‚投稿ã«ã¯å°‘ãªãã¨ã‚‚10以上ã®è³›æˆç¥¨ã¨å対票ãŒã‚ã‚‹å¿…è¦ãŒã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚投票ã•ã‚Œãªã„投稿ã¯ãã‚Œã»ã©è­°è«–ã®çš„ã«ãªã£ã¦ã„ã¾ã›ã‚“。 + +データãŒæ­£è¦åŒ–ã•ã‚ŒãŸçŠ¶æ…‹ã§ã€ã“ã®ã‚¯ã‚¨ãƒªã¯`posts`ã¨`votes`テーブルを使用ã—ãŸ`JOIN`ã‚’è¦æ±‚ã—ã¾ã™ï¼š + +```sql +WITH PostIds AS +( + SELECT Id + FROM posts + WHERE Title ILIKE '%SQL%' +) +SELECT + Id, + Title, + UpVotes, + DownVotes, + abs(UpVotes - DownVotes) AS Controversial_ratio +FROM posts +INNER JOIN +( + SELECT + PostId, + countIf(VoteTypeId = 2) AS UpVotes, + countIf(VoteTypeId = 3) AS DownVotes + FROM votes + WHERE PostId IN (PostIds) + GROUP BY PostId + HAVING (UpVotes > 10) AND (DownVotes > 10) +) AS votes ON posts.Id = votes.PostId +WHERE Id IN (PostIds) +ORDER BY Controversial_ratio ASC +LIMIT 1 + +Row 1: +────── +Id: 25372161 +Title: How to add exception handling to SqlDataSource.UpdateCommand +UpVotes: 13 +DownVotes: 13 +Controversial_ratio: 0 + +1 rows in set. Elapsed: 1.283 sec. Processed 418.44 million rows, 7.23 GB (326.07 million rows/s., 5.63 GB/s.) +Peak memory usage: 3.18 GiB. +``` + +>**`JOIN`ã®å³å´ã«å°ã•ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’使用ã™ã‚‹**:ã“ã®ã‚¯ã‚¨ãƒªã¯å¿…è¦ä»¥ä¸Šã«å†—é•·ã«è¦‹ãˆã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€`PostId`ã§ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’外部ãŠã‚ˆã³ã‚µãƒ–クエリã®ä¸¡æ–¹ã§è¡Œã£ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã‚¯ã‚¨ãƒªå¿œç­”時間を速ãã™ã‚‹ãŸã‚ã®ãƒ‘フォーマンス最é©åŒ–ã§ã™ã€‚最é©ãªãƒ‘フォーマンスを得るãŸã‚ã«ã¯ã€å¸¸ã«`JOIN`ã®å³å´ãŒå°ã•ãªã‚»ãƒƒãƒˆã§ã‚ã‚Šã€å¯èƒ½ãªé™ã‚Šå°ã•ãã™ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。JOINパフォーマンスを最é©åŒ–ã—ã€ä½¿ç”¨å¯èƒ½ãªã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’ç†è§£ã™ã‚‹ãŸã‚ã®ãƒ’ントã«ã¤ã„ã¦ã¯ã€[ã“ã®ãƒ–ログ記事シリーズ](https://clickhouse.com/blog/clickhouse-fully-supports-joins-part1)ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +ã“ã®ã‚¯ã‚¨ãƒªã¯é€Ÿã„ã§ã™ãŒã€è‰¯å¥½ãªãƒ‘フォーマンスを実ç¾ã™ã‚‹ãŸã‚ã«ç§ãŸã¡ãŒJOINã‚’æ…Žé‡ã«æ›¸ãã“ã¨ã«ä¾å­˜ã—ã¦ã„ã¾ã™ã€‚ç†æƒ³çš„ã«ã¯ã€æŠ•ç¨¿ã‚’「SQLã€ã‚’å«ã‚€ã‚‚ã®ã ã‘ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã€ãã®ã‚µãƒ–セットã®ãƒ–ログã«å¯¾ã—ã¦`UpVote`ã¨`DownVote`ã®ã‚«ã‚¦ãƒ³ãƒˆã‚’確èªã—ã€æˆ‘々ã®æŒ‡æ¨™ã‚’計算ã™ã‚‹ã®ãŒæœ›ã¾ã—ã„ã§ã—ょã†ã€‚ + +#### Dictionaryã®é©ç”¨ + +ã“れらã®æ¦‚念を説明ã™ã‚‹ãŸã‚ã«ã€æŠ•ç¥¨ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦Dictionaryを使用ã—ã¾ã™ã€‚Dictionaryã¯é€šå¸¸ãƒ¡ãƒ¢ãƒªå†…ã«ä¿æŒã•ã‚Œã¾ã™ï¼ˆ[ssd_cache](/ja/sql-reference/dictionaries#ssd_cache)ã¯ä¾‹å¤–ã§ã™ï¼‰ã€ã—ãŸãŒã£ã¦ãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºã«æ³¨æ„を払ã†å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚我々ã®`votes`テーブルサイズを確èªã—ã¾ã™ï¼š + +```sql +SELECT table, + formatReadableSize(sum(data_compressed_bytes)) AS compressed_size, + formatReadableSize(sum(data_uncompressed_bytes)) AS uncompressed_size, + round(sum(data_uncompressed_bytes) / sum(data_compressed_bytes), 2) AS ratio +FROM system.columns +WHERE table IN ('votes') +GROUP BY table + +┌─table───────────┬─compressed_size─┬─uncompressed_size─┬─ratio─┠+│ votes │ 1.25 GiB │ 3.79 GiB │ 3.04 │ +└─────────────────┴─────────────────┴───────────────────┴───────┘ +``` + +Dictionary内ã«ãƒ‡ãƒ¼ã‚¿ã‚’éžåœ§ç¸®ã§ä¿å­˜ã™ã‚‹ãŸã‚ã€ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’(ã—ã¾ã›ã‚“ãŒï¼‰Dictionaryã«ä¿å­˜ã™ã‚‹ãªã‚‰ã°ã€å°‘ãªãã¨ã‚‚4GBã®ãƒ¡ãƒ¢ãƒªãŒå¿…è¦ã§ã™ã€‚Dictionaryã¯ã‚¯ãƒ©ã‚¹ã‚¿å…¨ä½“ã§ãƒ¬ãƒ—リケートã•ã‚Œã‚‹ãŸã‚ã€ã“ã®ãƒ¡ãƒ¢ãƒªé‡ã¯*å„ノード*ã”ã¨ã«äºˆç´„ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +> 以下ã®ä¾‹ã§ã¯ã€Dictionaryã®ãƒ‡ãƒ¼ã‚¿ã¯ClickHouseテーブルã‹ã‚‰å–å¾—ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚ŒãŒDictionaryã®æœ€ã‚‚一般的ãªã‚½ãƒ¼ã‚¹ã‚’表ã—ã¦ã„ã¾ã™ãŒã€[複数ã®ã‚½ãƒ¼ã‚¹](/ja/sql-reference/dictionaries#dictionary-sources)ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã€httpã€Postgresã‚’å«ã‚€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒå«ã¾ã‚Œã€ãã®ä¸­ã«ã¯å°ã•ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒå®Œå…¨ã«æ›´æ–°ã•ã‚Œã‚‹ç†æƒ³çš„ãªæ–¹æ³•ã¨ã—ã¦è‡ªå‹•çš„ã«ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã•ã‚Œã€ç›´æŽ¥JOINã«åˆ©ç”¨ã•ã‚Œã‚‹ã‚‚ã®ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +Dictionaryã«ã¯ã€ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå®Ÿè¡Œã•ã‚Œã‚‹ä¸»ã‚­ãƒ¼ãŒå¿…è¦ã§ã™ã€‚ã“ã‚Œã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ä¸»ã‚­ãƒ¼ã¨æ¦‚念的ã«åŒä¸€ã§ã‚ã‚Šã€ä¸€æ„ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚å…ˆã»ã©ã®ã‚¯ã‚¨ãƒªã§ã¯ã€çµåˆã‚­ãƒ¼ã§ã‚ã‚‹`PostId`ã§ã®ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå¿…è¦ã§ã™ã€‚Dictionaryã¯`votes`テーブルã‹ã‚‰`PostId`ã”ã¨ã®è³›æˆç¥¨ã¨å対票ã®åˆè¨ˆã‚’å«ã‚ã¦ã‚ªãƒªã‚¸ãƒŠãƒ«ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®Dictionaryデータをå–å¾—ã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +```sql +SELECT PostId, + countIf(VoteTypeId = 2) AS UpVotes, + countIf(VoteTypeId = 3) AS DownVotes +FROM votes +GROUP BY PostId +``` + +Dictionaryを作æˆã™ã‚‹ãŸã‚ã®ä»¥ä¸‹ã®DDLãŒå¿…è¦ã§ã™ - クエリã®ä½¿ç”¨ã«æ³¨æ„ã—ã¦ãã ã•ã„: + +```sql +CREATE DICTIONARY votes_dict +( + `PostId` UInt64, + `UpVotes` UInt32, + `DownVotes` UInt32 +) +PRIMARY KEY PostId +SOURCE(CLICKHOUSE(QUERY 'SELECT PostId, countIf(VoteTypeId = 2) AS UpVotes, countIf(VoteTypeId = 3) AS DownVotes FROM votes GROUP BY PostId')) +LIFETIME(MIN 600 MAX 900) +LAYOUT(HASHED()) + +0 rows in set. Elapsed: 36.063 sec. +``` + +> セルフマãƒãƒ¼ã‚¸ãƒ‰ã®OSSã§ã¯ã€ä¸Šè¨˜ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã§å®Ÿè¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ClickHouse Cloudã§ã¯ã€Dictionaryã¯è‡ªå‹•çš„ã«ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã«ãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚上記ã¯64GBã®RAMã‚’æŒã¤ClickHouse Cloudノードã§å®Ÿè¡Œã•ã‚Œã€ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã®ã«36秒ã‹ã‹ã‚Šã¾ã™ã€‚ + +DictionaryãŒæ¶ˆè²»ã™ã‚‹ãƒ¡ãƒ¢ãƒªã‚’確èªã™ã‚‹ï¼š + +```sql +SELECT formatReadableSize(bytes_allocated) AS size +FROM system.dictionaries +WHERE name = 'votes_dict' + +┌─size─────┠+│ 4.00 GiB │ +└──────────┘ +``` + +特定ã®`PostId`ã®è³›æˆç¥¨ã¨å対票をå–å¾—ã™ã‚‹ã«ã¯ã€å˜ç´”ãª`dictGet`関数を使用ã§ãã¾ã™ã€‚以下ã«ã¯æŠ•ç¨¿`11227902`ã®å€¤ã‚’å–å¾—ã—ã¾ã™ï¼š + +```sql +SELECT dictGet('votes_dict', ('UpVotes', 'DownVotes'), '11227902') AS votes + +┌─votes──────┠+│ (34999,32) │ +└────────────┘ +``` + +ã“れをå‰ã®ã‚¯ã‚¨ãƒªã§åˆ©ç”¨ã—ã¦ã€JOINを削除ã§ãã¾ã™ï¼š + +```sql +WITH PostIds AS +( + SELECT Id + FROM posts + WHERE Title ILIKE '%SQL%' +) +SELECT Id, Title, + dictGet('votes_dict', 'UpVotes', Id) AS UpVotes, + dictGet('votes_dict', 'DownVotes', Id) AS DownVotes, + abs(UpVotes - DownVotes) AS Controversial_ratio +FROM posts +WHERE (Id IN (PostIds)) AND (UpVotes > 10) AND (UpVotes > 10) +ORDER BY Controversial_ratio ASC +LIMIT 3 + +3 rows in set. Elapsed: 0.551 sec. Processed 119.64 million rows, 3.29 GB (216.96 million rows/s., 5.97 GB/s.) +Peak memory usage: 552.26 MiB. +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯å˜ç´”ã§ã‚ã‚‹ã ã‘ã§ãªãã€2å€ä»¥ä¸Šé€Ÿããªã‚Šã¾ã—ãŸã€‚æ›´ã«æœ€é©åŒ–ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã«ã™ã‚‹ãŸã‚ã«ã€10票以上ã®è³›æˆç¥¨ã¨å対票をæŒã¤æŠ•ç¨¿ã®ã¿ã‚’Dictionaryã«ãƒ­ãƒ¼ãƒ‰ã—ã€äº‹å‰è¨ˆç®—ã•ã‚ŒãŸè­°è«–値をä¿å­˜ã™ã‚‹ã ã‘ã§ã™ã€‚ + +## クエリ時ã®ã‚¨ãƒ³ãƒªãƒƒãƒãƒ¡ãƒ³ãƒˆ + +Dictionariesã¯ã‚¯ã‚¨ãƒªæ™‚ã«å€¤ã‚’ルックアップã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ã“れらã®å€¤ã¯çµæžœã«å«ã‚ã‚‹ã“ã¨ã‚‚ã€é›†è¨ˆã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ユーザーIDã‚’ãã®å ´æ‰€ã«ãƒžãƒƒãƒ”ングã™ã‚‹Dictionaryを作æˆã—ãŸã¨ã—ã¾ã—ょã†ï¼š + +```sql +CREATE DICTIONARY users_dict +( + `Id` Int32, + `Location` String +) +PRIMARY KEY Id +SOURCE(CLICKHOUSE(QUERY 'SELECT Id, Location FROM stackoverflow.users')) +LIFETIME(MIN 600 MAX 900) +LAYOUT(HASHED()) +``` + +ã“ã®Dictionaryを使用ã—ã¦æŠ•ç¨¿ã®çµæžœã‚’豊ã‹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +SELECT + Id, + Title, + dictGet('users_dict', 'Location', CAST(OwnerUserId, 'UInt64')) AS location +FROM posts +WHERE Title ILIKE '%clickhouse%' +LIMIT 5 +FORMAT PrettyCompactMonoBlock + +┌───────Id─┬─Title─────────────────────────────────────────────────────────┬─Location──────────────┠+│ 52296928 │ Comparision between two Strings in ClickHouse │ Spain │ +│ 52345137 │ How to use a file to migrate data from mysql to a clickhouse? │ 中国江è‹çœNanjing Shi │ +│ 61452077 │ How to change PARTITION in clickhouse │ Guangzhou, 广东çœä¸­å›½ │ +│ 55608325 │ Clickhouse select last record without max() on all table │ Moscow, Russia │ +│ 55758594 │ ClickHouse create temporary table │ Perm', Russia │ +└──────────┴───────────────────────────────────────────────────────────────┴───────────────────────┘ + +5 rows in set. Elapsed: 0.033 sec. Processed 4.25 million rows, 82.84 MB (130.62 million rows/s., 2.55 GB/s.) +Peak memory usage: 249.32 MiB. +``` + +以å‰ã®JOINã®ä¾‹ã¨åŒæ§˜ã«ã€åŒã˜Dictionaryを使ã£ã¦ã©ã“ã‹ã‚‰ã®æŠ•ç¨¿ãŒæœ€ã‚‚多ã„ã‹ã‚’効率的ã«ç¢ºèªã§ãã¾ã™ï¼š + +```sql +SELECT + dictGet('users_dict', 'Location', CAST(OwnerUserId, 'UInt64')) AS location, + count() AS c +FROM posts +WHERE location != '' +GROUP BY location +ORDER BY c DESC +LIMIT 5 + +┌─location───────────────┬──────c─┠+│ India │ 787814 │ +│ Germany │ 685347 │ +│ United States │ 595818 │ +│ London, United Kingdom │ 538738 │ +│ United Kingdom │ 537699 │ +└────────────────────────┴────────┘ + +5 rows in set. Elapsed: 0.763 sec. Processed 59.82 million rows, 239.28 MB (78.40 million rows/s., 313.60 MB/s.) +Peak memory usage: 248.84 MiB. +``` + +## インデックス時ã®ã‚¨ãƒ³ãƒªãƒƒãƒãƒ¡ãƒ³ãƒˆ + +上ã®ä¾‹ã§ã¯ã€ã‚¯ã‚¨ãƒªæ™‚ã«Dictionaryを使用ã—ã¦JOINを削除ã—ã¾ã—ãŸãŒã€Dictionaryã¯INSERT時ã«è¡Œã‚’エンリッãƒã™ã‚‹ãŸã‚ã«ã‚‚使用ã§ãã¾ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã€ã‚¨ãƒ³ãƒªãƒƒãƒãƒ¡ãƒ³ãƒˆå€¤ãŒå¤‰æ›´ã•ã‚Œãšã€Dictionaryを作æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹å¤–部ソースã«å­˜åœ¨ã™ã‚‹å ´åˆã«é©ã—ã¦ã„ã¾ã™ã€‚ã“ã®å ´åˆã€è¡Œã‚’INSERT時ã«ã‚¨ãƒ³ãƒªãƒƒãƒã™ã‚‹ã“ã¨ã§ã€ã‚¯ã‚¨ãƒªæ™‚ã®Dictionaryã¸ã®ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—を回é¿ã§ãã¾ã™ã€‚ + +Stack Overflowã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®`Location`(実際ã«ã¯å¤‰ã‚る)ã¯æ±ºã—ã¦å¤‰æ›´ã—ãªã„ã¨ä»®å®šã—ã¾ã™ - 特ã«`users`テーブルã®`Location`カラムã§ã™ã€‚投稿テーブルã§Locationã”ã¨ã«åˆ†æžã‚¯ã‚¨ãƒªã‚’実行ã—ãŸã„ã¨ä»®å®šã—ã¾ã™ã€‚投稿テーブルã«ã¯`UserId`ãŒã‚ã‚Šã¾ã™ã€‚ + +ユーザーIDã‹ã‚‰å ´æ‰€ã¸ã®ãƒžãƒƒãƒ”ングをæä¾›ã™ã‚‹Dictionaryを作æˆã—ã¾ã™ã€‚ã“ã‚Œã¯`users`テーブルã«ãƒãƒƒã‚¯ã•ã‚Œã¦ã„ã¾ã™ï¼š + +```sql +CREATE DICTIONARY users_dict +( + `Id` UInt64, + `Location` String +) +PRIMARY KEY Id +SOURCE(CLICKHOUSE(QUERY 'SELECT Id, Location FROM users WHERE Id >= 0')) +LIFETIME(MIN 600 MAX 900) +LAYOUT(HASHED()) +``` + +> `Id < 0`ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’除外ã—ã€`Hashed`字典タイプを使用å¯èƒ½ã«ã—ã¦ã„ã¾ã™ã€‚`Id < 0`ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã™ã€‚ + +投稿テーブルã«å¯¾ã—ã¦INSERT時ã«ã“ã®Dictionaryを利用ã™ã‚‹ã«ã¯ã€ã‚¹ã‚­ãƒ¼ãƒžã‚’修正ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +CREATE TABLE posts_with_location +( + `Id` UInt32, + `PostTypeId` Enum8('Question' = 1, 'Answer' = 2, 'Wiki' = 3, 'TagWikiExcerpt' = 4, 'TagWiki' = 5, 'ModeratorNomination' = 6, 'WikiPlaceholder' = 7, 'PrivilegeWiki' = 8), + … + `Location` MATERIALIZED dictGet(users_dict, 'Location', OwnerUserId::'UInt64') +) +ENGINE = MergeTree +ORDER BY (PostTypeId, toDate(CreationDate), CommentCount) +``` + +ã“ã®ä¾‹ã§ã¯ã€`Location`ã¯`MATERIALIZED`カラムã¨ã—ã¦å®£è¨€ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€`INSERT`クエリã®ä¸€éƒ¨ã¨ã—ã¦å€¤ãŒæä¾›ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€å¸¸ã«è¨ˆç®—ã•ã‚Œã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +> ClickHouseã¯ã¾ãŸã€[`DEFAULT`カラム](/ja/sql-reference/statements/create/table#default_values)もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼ˆå€¤ã¯æŒ¿å…¥ã•ã‚Œã‚‹ã‹ã€æä¾›ã•ã‚Œã¦ã„ãªã„å ´åˆã¯è¨ˆç®—ã•ã‚Œã¾ã™ï¼‰ã€‚ + +テーブルをãƒãƒ”ュレートã™ã‚‹ãŸã‚ã«ã€é€šå¸¸ã®`INSERT INTO SELECT`ã‚’S3ã‹ã‚‰ä½¿ç”¨ã§ãã¾ã™ï¼š + +```sql +INSERT INTO posts_with_location SELECT Id, PostTypeId::UInt8, AcceptedAnswerId, CreationDate, Score, ViewCount, Body, OwnerUserId, OwnerDisplayName, LastEditorUserId, LastEditorDisplayName, LastEditDate, LastActivityDate, Title, Tags, AnswerCount, CommentCount, FavoriteCount, ContentLicense, ParentId, CommunityOwnedDate, ClosedDate FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/*.parquet') + +0 rows in set. Elapsed: 36.830 sec. Processed 238.98 million rows, 2.64 GB (6.49 million rows/s., 71.79 MB/s.) +``` + +ã“ã‚Œã§ã€æœ€ã‚‚多ãã®æŠ•ç¨¿ãŒã©ã®å ´æ‰€ã‹ã‚‰æ¥ã¦ã„ã‚‹ã‹ã‚’確èªã§ãã¾ã™ï¼š + +```sql +SELECT Location, count() AS c +FROM posts_with_location +WHERE Location != '' +GROUP BY Location +ORDER BY c DESC +LIMIT 4 + +┌─Location───────────────┬──────c─┠+│ India │ 787814 │ +│ Germany │ 685347 │ +│ United States │ 595818 │ +│ London, United Kingdom │ 538738 │ +└────────────────────────┘ + +4 rows in set. Elapsed: 0.142 sec. Processed 59.82 million rows, 1.08 GB (420.73 million rows/s., 7.60 GB/s.) +Peak memory usage: 666.82 MiB. +``` + +## 高度ãªDictionaryトピック + +### Dictionary`LAYOUT`ã®é¸æŠž + +`LAYOUT`å¥ã¯Dictionaryã®å†…部データ構造を制御ã—ã¾ã™ã€‚ã„ãã¤ã‹ã®ã‚ªãƒ—ションãŒå­˜åœ¨ã—ã€[ã“ã¡ã‚‰](/ja/sql-reference/dictionaries#ways-to-store-dictionaries-in-memory)ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆåŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚æ­£ã—ã„レイアウトをé¸ã¶ãŸã‚ã®ãƒ’ントã¯[ã“ã¡ã‚‰](https://clickhouse.com/blog/faster-queries-dictionaries-clickhouse#choosing-a-layout)ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### Dictionaryã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ + +Dictionaryã«ã¯`LIFETIME`ã¨ã—ã¦`MIN 600 MAX 900`を指定ã—ã¦ã„ã¾ã™ã€‚LIFETIMEã¯Dictionaryã®æ›´æ–°é–“隔を指ã—ã€ã“ã“ã§ã®å€¤ã¯600ã‹ã‚‰900秒ã®ãƒ©ãƒ³ãƒ€ãƒ ãªé–“éš”ã§å‘¨æœŸçš„ã«ãƒªãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ©ãƒ³ãƒ€ãƒ ãªé–“éš”ã¯ã€å¤šæ•°ã®ã‚µãƒ¼ãƒãƒ¼ä¸Šã§æ›´æ–°ã™ã‚‹éš›ã®Dictionaryソースã®è² è·ã‚’分散ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚更新中ã§ã‚‚å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®Dictionaryã¯ä¾ç„¶ã¨ã—ã¦ã‚¯ã‚¨ãƒªå¯èƒ½ã§ã€æœ€åˆã®ãƒ­ãƒ¼ãƒ‰ã®ã¿ãŒã‚¯ã‚¨ãƒªã‚’ブロックã—ã¾ã™ã€‚`(LIFETIME(0))`を設定ã™ã‚‹ã¨ã€Dictionaryã®æ›´æ–°ãŒé˜²æ­¢ã•ã‚Œã¾ã™ã€‚Dictionaryã¯`SYSTEM RELOAD DICTIONARY`コマンドを使用ã—ã¦å¼·åˆ¶çš„ã«ãƒªãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouseã‚„Postgresã®ã‚ˆã†ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚½ãƒ¼ã‚¹ã®å ´åˆã€DictionaryãŒæœ¬å½“ã«å¤‰æ›´ã•ã‚ŒãŸå ´åˆã®ã¿ï¼ˆã‚¯ã‚¨ãƒªã®å¿œç­”ã«ã‚ˆã‚Šåˆ¤æ–­ã•ã‚Œã¾ã™ï¼‰æ›´æ–°ã™ã‚‹ã‚ˆã†ã«ã‚¯ã‚¨ãƒªã‚’設定ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã€å‘¨æœŸçš„ãªé–“隔よりも効率的ã§ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](/ja/sql-reference/dictionaries#refreshing-dictionary-data-using-lifetime)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +### ä»–ã®Dictionaryタイプ + +ClickHouseã¯[階層型](/ja/sql-reference/dictionaries#hierarchical-dictionaries)ã€[ãƒãƒªã‚´ãƒ³åž‹](/ja/sql-reference/dictionaries#polygon-dictionaries)ãŠã‚ˆã³[æ­£è¦è¡¨ç¾](/ja/sql-reference/dictionaries#regexp-tree-dictionary)Dictionaryもサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### 詳細ãªèª­ã¿ç‰© + +- [クエリを加速ã™ã‚‹ãŸã‚ã®Dictionaryã®ä½¿ç”¨](https://clickhouse.com/blog/faster-queries-dictionaries-clickhouse) +- [Dictionaryã®é«˜åº¦ãªè¨­å®š](/ja/sql-reference/dictionaries) diff --git a/docs/ja/engines/_category_.yml b/docs/ja/engines/_category_.yml new file mode 100644 index 00000000000..4901fe1edb4 --- /dev/null +++ b/docs/ja/engines/_category_.yml @@ -0,0 +1,7 @@ +position: 30 +label: 'Database & Table Engines' +collapsible: true +collapsed: true +link: + type: generated-index + slug: /ja/engines diff --git a/docs/ja/engines/database-engines/atomic.md b/docs/ja/engines/database-engines/atomic.md new file mode 100644 index 00000000000..2a6903122d9 --- /dev/null +++ b/docs/ja/engines/database-engines/atomic.md @@ -0,0 +1,62 @@ +--- +slug: /ja/engines/database-engines/atomic +sidebar_label: Atomic +sidebar_position: 10 +--- + +# Atomic + +éžãƒ–ロッキングãª[DROP TABLE](#drop-detach-table)ãŠã‚ˆã³[RENAME TABLE](#rename-table)クエリやã€ã‚¢ãƒˆãƒŸãƒƒã‚¯ãª[EXCHANGE TABLES](#exchange-tables)クエリã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚`Atomic` データベースエンジンã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## データベースã®ä½œæˆ {#creating-a-database} + +``` sql +CREATE DATABASE test [ENGINE = Atomic]; +``` + +## 特徴ã¨æŽ¨å¥¨äº‹é … {#specifics-and-recommendations} + +### テーブル UUID {#table-uuid} + +`Atomic` データベース内ã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯æ°¸ç¶šçš„ãª[UUID](../../sql-reference/data-types/uuid.md)ãŒã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª `/clickhouse_path/store/xxx/xxxyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/` ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“ã“㧠`xxxyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy` ã¯ãƒ†ãƒ¼ãƒ–ルã®UUIDã§ã™ã€‚通常ã€UUIDã¯è‡ªå‹•çš„ã«ç”Ÿæˆã•ã‚Œã¾ã™ãŒã€ãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ˜Žç¤ºçš„ã«UUIDを指定ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼ˆæŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“)。 + +例: + +```sql +CREATE TABLE name UUID '28f1c61c-2970-457a-bffe-454156ddcfef' (n UInt64) ENGINE = ...; +``` + +:::note +`SHOW CREATE` クエリã§UUIDを表示ã™ã‚‹ã«ã¯ã€[show_table_uuid_in_table_create_query_if_not_nil](../../operations/settings/settings.md#show_table_uuid_in_table_create_query_if_not_nil) 設定を使用ã§ãã¾ã™ã€‚ +::: + +### RENAME TABLE {#rename-table} + +[RENAME](../../sql-reference/statements/rename.md) クエリã¯UUIDを変更ã—ãŸã‚Šã€ãƒ†ãƒ¼ãƒ–ルデータを移動ã™ã‚‹ã“ã¨ãªã実行ã•ã‚Œã¾ã™ã€‚ã“れらã®ã‚¯ã‚¨ãƒªã¯ã€ãƒ†ãƒ¼ãƒ–ルを使用ã—ã¦ã„るクエリã®å®Œäº†ã‚’å¾…ã¤ã“ã¨ãªã瞬時ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +### DROP/DETACH TABLE {#drop-detach-table} + +`DROP TABLE` ã®éš›ã€ãƒ‡ãƒ¼ã‚¿ã¯å‰Šé™¤ã•ã‚Œãšã€`Atomic` データベースã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’ `/clickhouse_path/metadata_dropped/` ã«ç§»å‹•ã—ã¦ãƒ†ãƒ¼ãƒ–ルを削除ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã—ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¹ãƒ¬ãƒƒãƒ‰ã«é€šçŸ¥ã—ã¾ã™ã€‚最終的ãªãƒ†ãƒ¼ãƒ–ルデータ削除ã¾ã§ã®é…延ã¯ã€[database_atomic_delay_before_drop_table_sec](../../operations/server-configuration-parameters/settings.md#database_atomic_delay_before_drop_table_sec) 設定ã§æŒ‡å®šã•ã‚Œã¾ã™ã€‚`SYNC` 修飾å­ã‚’使用ã—ã¦åŒæœŸãƒ¢ãƒ¼ãƒ‰ã‚’指定ã§ãã¾ã™ã€‚ã“ã®è¨­å®šã¯[database_atomic_wait_for_drop_and_detach_synchronously](../../operations/settings/settings.md#database_atomic_wait_for_drop_and_detach_synchronously)を用ã„ã¦è¡Œã„ã¾ã™ã€‚ã“ã®å ´åˆã€`DROP`ã¯ãƒ†ãƒ¼ãƒ–ルを使用ã—ã¦ã„ã‚‹`SELECT`ã€`INSERT`ãŠã‚ˆã³ãã®ä»–ã®ã‚¯ã‚¨ãƒªã®çµ‚了を待ã¡ã¾ã™ã€‚テーブルã¯ä½¿ç”¨ã•ã‚Œã¦ã„ãªã„ã¨ãã«å®Ÿéš›ã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +### EXCHANGE TABLES/DICTIONARIES {#exchange-tables} + +[EXCHANGE](../../sql-reference/statements/exchange.md) クエリã¯ã€ãƒ†ãƒ¼ãƒ–ルã¾ãŸã¯ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªãƒ¼ã‚’アトミックã«äº¤æ›ã—ã¾ã™ã€‚例ãˆã°ã€ã“ã®éžã‚¢ãƒˆãƒŸãƒƒã‚¯ãªæ“作を行ã†ä»£ã‚ã‚Šã«ï¼š + +```sql +RENAME TABLE new_table TO tmp, old_table TO new_table, tmp TO old_table; +``` + +å˜ä¸€ã®ã‚¢ãƒˆãƒŸãƒƒã‚¯ãªã‚¯ã‚¨ãƒªã‚’使用ã§ãã¾ã™ï¼š + +``` sql +EXCHANGE TABLES new_table AND old_table; +``` + +### Atomic データベース内㮠ReplicatedMergeTree {#replicatedmergetree-in-atomic-database} + +[ReplicatedMergeTree](../table-engines/mergetree-family/replication.md#table_engines-replication) テーブルã«å¯¾ã—ã¦ã¯ã€ã‚¨ãƒ³ã‚¸ãƒ³ãƒ‘ラメータ(ZooKeeperã®ãƒ‘スã¨ãƒ¬ãƒ—リカå)を指定ã—ãªã„ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã®å ´åˆã€è¨­å®šãƒ‘ラメータ [default_replica_path](../../operations/server-configuration-parameters/settings.md#default_replica_path) 㨠[default_replica_name](../../operations/server-configuration-parameters/settings.md#default_replica_name) ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚エンジンパラメータを明示的ã«æŒ‡å®šã—ãŸã„å ´åˆã¯ã€`{uuid}` マクロを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ZooKeeper内ã®å„テーブルã«å¯¾ã—ã¦è‡ªå‹•çš„ã«ä¸€æ„ã®ãƒ‘スãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +## 関連項目 + +- [system.databases](../../operations/system-tables/databases.md) システムテーブル + diff --git a/docs/ja/engines/database-engines/index.md b/docs/ja/engines/database-engines/index.md new file mode 100644 index 00000000000..d3ee8718c00 --- /dev/null +++ b/docs/ja/engines/database-engines/index.md @@ -0,0 +1,28 @@ +--- +slug: /ja/engines/database-engines/ +toc_folder_title: データベースエンジン +toc_priority: 27 +toc_title: ã¯ã˜ã‚ã« +--- + +# データベースエンジン + +データベースエンジンを使用ã™ã‚‹ã¨ã€ãƒ†ãƒ¼ãƒ–ルをæ“作ã§ãã¾ã™ã€‚デフォルトã§ã¯ã€ClickHouse 㯠[Atomic](../../engines/database-engines/atomic.md) データベースエンジンを使用ã—ã€ã“ã‚Œã«ã‚ˆã‚Šè¨­å®šå¯èƒ½ãª[テーブルエンジン](../../engines/table-engines/index.md)ã‚„[SQL 方言](../../sql-reference/syntax.md)ã‚’æä¾›ã—ã¾ã™ã€‚ + +以下ã¯åˆ©ç”¨å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã®å®Œå…¨ãªãƒªã‚¹ãƒˆã§ã™ã€‚詳細ã¯ãƒªãƒ³ã‚¯å…ˆã‚’ã”å‚ç…§ãã ã•ã„: + +- [Atomic](../../engines/database-engines/atomic.md) + +- [Lazy](../../engines/database-engines/lazy.md) + +- [MaterializedPostgreSQL](../../engines/database-engines/materialized-postgresql.md) + +- [MaterializedMySQL](../../engines/database-engines/materialized-mysql.md) + +- [MySQL](../../engines/database-engines/mysql.md) + +- [PostgreSQL](../../engines/database-engines/postgresql.md) + +- [Replicated](../../engines/database-engines/replicated.md) + +- [SQLite](../../engines/database-engines/sqlite.md) diff --git a/docs/ja/engines/database-engines/lazy.md b/docs/ja/engines/database-engines/lazy.md new file mode 100644 index 00000000000..cfb8748a0b4 --- /dev/null +++ b/docs/ja/engines/database-engines/lazy.md @@ -0,0 +1,15 @@ +--- +slug: /ja/engines/database-engines/lazy +sidebar_label: Lazy +sidebar_position: 20 +--- + +# Lazy + +最後ã«ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã¦ã‹ã‚‰ `expiration_time_in_seconds` 秒間ã®ã¿ãƒ†ãƒ¼ãƒ–ルをRAMã«ä¿æŒã—ã¾ã™ã€‚ã“ã‚Œã¯ã€\*Log テーブルã®ã¿ã§ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +アクセス間ã®æ™‚é–“é–“éš”ãŒé•·ã„å°ã•ãª \*Log テーブルを多数ä¿å­˜ã™ã‚‹ã®ã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## データベースã®ä½œæˆ {#creating-a-database} + + CREATE DATABASE testlazy ENGINE = Lazy(expiration_time_in_seconds); diff --git a/docs/ja/engines/database-engines/materialized-mysql.md b/docs/ja/engines/database-engines/materialized-mysql.md new file mode 100644 index 00000000000..c32e115e1ac --- /dev/null +++ b/docs/ja/engines/database-engines/materialized-mysql.md @@ -0,0 +1,11 @@ +--- +slug: /ja/engines/database-engines/materialized-mysql +sidebar_label: MaterializedMySQL +sidebar_position: 70 +--- + +# [experimental] MaterializedMySQL + +:::note +ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã¯å»ƒæ­¢ã•ã‚Œã¦ãŠã‚Šã€ä½¿ç”¨ã§ãã¾ã›ã‚“。 +::: diff --git a/docs/ja/engines/database-engines/materialized-postgresql.md b/docs/ja/engines/database-engines/materialized-postgresql.md new file mode 100644 index 00000000000..a5fce376670 --- /dev/null +++ b/docs/ja/engines/database-engines/materialized-postgresql.md @@ -0,0 +1,283 @@ +--- +slug: /ja/engines/database-engines/materialized-postgresql +sidebar_label: MaterializedPostgreSQL +sidebar_position: 60 +--- + +# [experimental] MaterializedPostgreSQL + +PostgreSQL データベースã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルを ClickHouse データベースã¨ã—ã¦ä½œæˆã—ã¾ã™ã€‚最åˆã«ã€`MaterializedPostgreSQL` エンジンを使ã£ã¦ PostgreSQL データベースã®ã‚¹ãƒŠãƒƒãƒ—ショットを作æˆã—ã€å¿…è¦ãªãƒ†ãƒ¼ãƒ–ルをロードã—ã¾ã™ã€‚å¿…è¦ãªãƒ†ãƒ¼ãƒ–ルã«ã¯ã€æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ä»»æ„ã®ã‚¹ã‚­ãƒ¼ãƒžã®ä»»æ„ã®ã‚µãƒ–セットã®ãƒ†ãƒ¼ãƒ–ルをå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚スナップショットã®å–å¾—ã¨åŒæ™‚ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã¯ LSN ã‚’å–å¾—ã—ã€ãƒ†ãƒ¼ãƒ–ルã®åˆæœŸãƒ€ãƒ³ãƒ—ãŒè¡Œã‚れるã¨ã€WAL ã‹ã‚‰æ›´æ–°ã‚’プルã—始ã‚ã¾ã™ã€‚データベースãŒä½œæˆã•ã‚Œã‚‹ã¨ã€PostgreSQL データベースã«æ–°ã—ã追加ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯è‡ªå‹•çš„ã«ãƒ¬ãƒ—リケーションã«è¿½åŠ ã•ã‚Œã¾ã›ã‚“。ãれら㯠`ATTACH TABLE db.table` クエリを使用ã—ã¦æ‰‹å‹•ã§è¿½åŠ ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +レプリケーション㯠PostgreSQL ã®è«–ç†ãƒ¬ãƒ—リケーションプロトコルã§å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€DDL ã®ãƒ¬ãƒ—リケートã¯ã§ãã¾ã›ã‚“ãŒã€ãƒ¬ãƒ—リケーションを壊ã™å¤‰æ›´ï¼ˆã‚«ãƒ©ãƒ åž‹ã®å¤‰æ›´ã€ã‚«ãƒ©ãƒ ã®è¿½åŠ /削除)ãŒç™ºç”Ÿã—ãŸã‹ã©ã†ã‹ã‚’知るã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ã‚ˆã†ãªå¤‰æ›´ãŒæ¤œå‡ºã•ã‚Œã‚‹ã¨ã€è©²å½“ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®æ›´æ–°å—ä¿¡ãŒåœæ­¢ã—ã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ルを完全ã«å†èª­ã¿è¾¼ã¿ã™ã‚‹ã«ã¯ `ATTACH`/`DETACH PERMANENTLY` クエリを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã‚‚ã— DDL ãŒãƒ¬ãƒ—リケーションを壊ã•ãªã‘ã‚Œã°ï¼ˆä¾‹ãˆã°ã€ã‚«ãƒ©ãƒ ã®åå‰å¤‰æ›´ï¼‰ã€ãƒ†ãƒ¼ãƒ–ルã¯æ›´æ–°ã‚’å—ä¿¡ã—続ã‘ã¾ã™ï¼ˆæŒ¿å…¥ã¯ä½ç½®ã§è¡Œã‚ã‚Œã¾ã™ï¼‰ã€‚ + +:::note +ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã§ã™ã€‚使用ã™ã‚‹ã«ã¯ã€æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã§ `allow_experimental_database_materialized_postgresql` ã‚’ 1 ã«è¨­å®šã™ã‚‹ã‹ã€`SET` コマンドを使用ã—ã¾ã™: +```sql +SET allow_experimental_database_materialized_postgresql=1 +``` +::: + +## データベースã®ä½œæˆ {#creating-a-database} + +``` sql +CREATE DATABASE [IF NOT EXISTS] db_name [ON CLUSTER cluster] +ENGINE = MaterializedPostgreSQL('host:port', 'database', 'user', 'password') [SETTINGS ...] +``` + +**エンジンパラメータ** + +- `host:port` — PostgreSQL サーãƒãƒ¼ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã€‚ +- `database` — PostgreSQL データベースå。 +- `user` — PostgreSQL ユーザー。 +- `password` — ユーザーパスワード。 + +## 使用例 {#example-of-use} + +``` sql +CREATE DATABASE postgres_db +ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgres_user', 'postgres_password'); + +SHOW TABLES FROM postgres_db; + +┌─name───┠+│ table1 │ +└────────┘ + +SELECT * FROM postgresql_db.postgres_table; +``` + +## æ–°ã—ã„テーブルを動的ã«ãƒ¬ãƒ—リケーションã«è¿½åŠ  {#dynamically-adding-table-to-replication} + +`MaterializedPostgreSQL` データベースãŒä½œæˆã•ã‚ŒãŸå¾Œã€å¯¾å¿œã™ã‚‹ PostgreSQL データベースã®æ–°ã—ã„テーブルã¯è‡ªå‹•çš„ã«æ¤œå‡ºã•ã‚Œã¾ã›ã‚“。ã“れらã®ãƒ†ãƒ¼ãƒ–ルã¯æ‰‹å‹•ã§è¿½åŠ ã§ãã¾ã™: + +``` sql +ATTACH TABLE postgres_database.new_table; +``` + +:::warning +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 22.1 以å‰ã§ã¯ã€ãƒ¬ãƒ—リケーションã«ãƒ†ãƒ¼ãƒ–ルを追加ã™ã‚‹ã¨ã€å‰Šé™¤ã•ã‚Œãªã„一時的ãªãƒ¬ãƒ—リケーションスロット(`{db_name}_ch_replication_slot_tmp` ã¨å‘½å)ãŒæ®‹ã‚Šã¾ã™ã€‚22.1 よりå‰ã® ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ãƒ†ãƒ¼ãƒ–ルをアタッãƒã™ã‚‹å ´åˆã¯ã€æ‰‹å‹•ã§å‰Šé™¤ã™ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„(`SELECT pg_drop_replication_slot('{db_name}_ch_replication_slot_tmp')`)。ã•ã‚‚ãªã„ã¨ã€ãƒ‡ã‚£ã‚¹ã‚¯ä½¿ç”¨é‡ãŒå¢—加ã—ã¾ã™ã€‚ã“ã®å•é¡Œã¯ 22.1 ã§ä¿®æ­£ã•ã‚Œã¾ã—ãŸã€‚ +::: + +## レプリケーションã‹ã‚‰ã®ãƒ†ãƒ¼ãƒ–ルを動的ã«å‰Šé™¤ {#dynamically-removing-table-from-replication} + +特定ã®ãƒ†ãƒ¼ãƒ–ルをレプリケーションã‹ã‚‰å‰Šé™¤ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +``` sql +DETACH TABLE postgres_database.table_to_remove PERMANENTLY; +``` + +## PostgreSQL スキーマ {#schema} + +PostgreSQL [スキーマ](https://www.postgresql.org/docs/9.1/ddl-schemas.html) 㯠3 ã¤ã®æ–¹æ³•ã§è¨­å®šã§ãã¾ã™ï¼ˆãƒãƒ¼ã‚¸ãƒ§ãƒ³ 21.12 以é™ï¼‰ã€‚ + +1. `MaterializedPostgreSQL` データベースエンジンã«å¯¾ã—㦠1 ã¤ã®ã‚¹ã‚­ãƒ¼ãƒžã€‚設定 `materialized_postgresql_schema` を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +テーブルã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ãƒ†ãƒ¼ãƒ–ルåã®ã¿ã‚’介ã—ã¾ã™: + +``` sql +CREATE DATABASE postgres_database +ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgres_user', 'postgres_password') +SETTINGS materialized_postgresql_schema = 'postgres_schema'; + +SELECT * FROM postgres_database.table1; +``` + +2. ä»»æ„ã®æ•°ã®ã‚¹ã‚­ãƒ¼ãƒžã¨æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルセットをæŒã¤ `MaterializedPostgreSQL` データベースエンジン。設定 `materialized_postgresql_tables_list` を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã‚Œãžã‚Œã®ãƒ†ãƒ¼ãƒ–ルã¯ã‚¹ã‚­ãƒ¼ãƒžã¨å…±ã«æ›¸ã‹ã‚Œã¾ã™ã€‚ +テーブルã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã‚¹ã‚­ãƒ¼ãƒžåã¨ãƒ†ãƒ¼ãƒ–ルåã‚’åŒæ™‚ã«æŒ‡å®šã—ã¦è¡Œã‚ã‚Œã¾ã™: + +``` sql +CREATE DATABASE database1 +ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgres_user', 'postgres_password') +SETTINGS materialized_postgresql_tables_list = 'schema1.table1,schema2.table2,schema1.table3', + materialized_postgresql_tables_list_with_schema = 1; + +SELECT * FROM database1.`schema1.table1`; +SELECT * FROM database1.`schema2.table2`; +``` + +ã—ã‹ã—ã€ã“ã®å ´åˆã€`materialized_postgresql_tables_list` ã«ã‚ã‚‹ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã¯ã‚¹ã‚­ãƒ¼ãƒžåã¨ä¸€ç·’ã«æ›¸ã‹ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +`materialized_postgresql_tables_list_with_schema = 1` ãŒå¿…è¦ã§ã™ã€‚ + +注æ„: ã“ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ルåã«ãƒ‰ãƒƒãƒˆã¯è¨±å¯ã•ã‚Œã¾ã›ã‚“。 + +3. ä»»æ„ã®æ•°ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¡ã€å…¨ãƒ†ãƒ¼ãƒ–ルを設定ã™ã‚‹ `MaterializedPostgreSQL` データベースエンジン。設定 `materialized_postgresql_schema_list` を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` sql +CREATE DATABASE database1 +ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgres_user', 'postgres_password') +SETTINGS materialized_postgresql_schema_list = 'schema1,schema2,schema3'; + +SELECT * FROM database1.`schema1.table1`; +SELECT * FROM database1.`schema1.table2`; +SELECT * FROM database1.`schema2.table2`; +``` + +注æ„: ã“ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ルåã«ãƒ‰ãƒƒãƒˆã¯è¨±å¯ã•ã‚Œã¾ã›ã‚“。 + +## å¿…è¦æ¡ä»¶ {#requirements} + +1. [wal_level](https://www.postgresql.org/docs/current/runtime-config-wal.html) 設定㯠`logical` ã®å€¤ã‚’æŒã¡ã€`max_replication_slots` パラメータ㯠PostgreSQL 設定ファイルã§å°‘ãªãã¨ã‚‚ `2` ã®å€¤ã‚’æŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +2. ãã‚Œãžã‚Œã®ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯æ¬¡ã®ã„ãšã‚Œã‹ã® [レプリカアイデンティティ](https://www.postgresql.org/docs/10/sql-altertable.html#SQL-CREATETABLE-REPLICA-IDENTITY) ã‚’æŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™: + +- 主キー(デフォルト) + +- インデックス + +``` bash +postgres# CREATE TABLE postgres_table (a Integer NOT NULL, b Integer, c Integer NOT NULL, d Integer, e Integer NOT NULL); +postgres# CREATE unique INDEX postgres_table_index on postgres_table(a, c, e); +postgres# ALTER TABLE postgres_table REPLICA IDENTITY USING INDEX postgres_table_index; +``` + +主キーã¯å¸¸ã«æœ€åˆã«ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚存在ã—ãªã„å ´åˆã€ãƒ¬ãƒ—リカアイデンティティインデックスã¨ã—ã¦å®šç¾©ã•ã‚ŒãŸã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚インデックスã¯ãƒ¬ãƒ—リカアイデンティティã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€ãƒ†ãƒ¼ãƒ–ル内ã«ä¸€ã¤ã ã‘存在ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +特定ã®ãƒ†ãƒ¼ãƒ–ルã§ã©ã®ã‚¿ã‚¤ãƒ—ãŒä½¿ç”¨ã•ã‚Œã‚‹ã‹ã‚’確èªã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¾ã™: + +``` bash +postgres# SELECT CASE relreplident + WHEN 'd' THEN 'default' + WHEN 'n' THEN 'nothing' + WHEN 'f' THEN 'full' + WHEN 'i' THEN 'index' + END AS replica_identity +FROM pg_class +WHERE oid = 'postgres_table'::regclass; +``` + +:::note +[**TOAST**](https://www.postgresql.org/docs/9.5/storage-toast.html) 値ã®ãƒ¬ãƒ—リケーションã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。デフォルトã§ã¯ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +## 設定 {#settings} + +### `materialized_postgresql_tables_list` {#materialized-postgresql-tables-list} + + PostgreSQL データベーステーブルã®ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šãƒªã‚¹ãƒˆã‚’設定ã—ã¾ã™ã€‚ã“れらã®ãƒ†ãƒ¼ãƒ–ル㯠[MaterializedPostgreSQL](../../engines/database-engines/materialized-postgresql.md) データベースエンジンを介ã—ã¦ãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚ + + å„テーブルã¯ã€æ‹¬å¼§å†…ã«ãƒ¬ãƒ—リケートã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®ã‚µãƒ–セットをæŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚カラムã®ã‚µãƒ–セットãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€ãƒ†ãƒ¼ãƒ–ルã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚ + + ``` sql + materialized_postgresql_tables_list = 'table1(co1, col2),table2,table3(co3, col5, col7) + ``` + + デフォルト値: 空ã®ãƒªã‚¹ãƒˆ — PostgreSQL データベース全体ãŒãƒ¬ãƒ—リケートã•ã‚Œã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +### `materialized_postgresql_schema` {#materialized-postgresql-schema} + + デフォルト値: 空ã®æ–‡å­—列。(デフォルトスキーマãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼‰ + +### `materialized_postgresql_schema_list` {#materialized-postgresql-schema-list} + + デフォルト値: 空ã®ãƒªã‚¹ãƒˆã€‚(デフォルトスキーマãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼‰ + +### `materialized_postgresql_max_block_size` {#materialized-postgresql-max-block-size} + + PostgreSQL データベーステーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むå‰ã«ãƒ¡ãƒ¢ãƒªã«åŽé›†ã•ã‚Œã‚‹è¡Œæ•°ã‚’設定ã—ã¾ã™ã€‚ + + å¯èƒ½ãªå€¤: + + - æ­£ã®æ•´æ•°ã€‚ + + デフォルト値: `65536`. + +### `materialized_postgresql_replication_slot` {#materialized-postgresql-replication-slot} + + ユーザーãŒä½œæˆã—ãŸãƒ¬ãƒ—リケーションスロット。`materialized_postgresql_snapshot` ã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### `materialized_postgresql_snapshot` {#materialized-postgresql-snapshot} + + 文字列ã¨ã—ã¦è­˜åˆ¥ã•ã‚Œã‚‹ã‚¹ãƒŠãƒƒãƒ—ショット。ã“ã‚Œã«ã‚ˆã‚Šã€[PostgreSQL テーブルã®åˆæœŸãƒ€ãƒ³ãƒ—](../../engines/database-engines/materialized-postgresql.md)ãŒå®Ÿè¡Œã•ã‚Œã¾ã™ã€‚`materialized_postgresql_replication_slot` ã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + + ``` sql + CREATE DATABASE database1 + ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgres_user', 'postgres_password') + SETTINGS materialized_postgresql_tables_list = 'table1,table2,table3'; + + SELECT * FROM database1.table1; + ``` + + 設定㯠DDL クエリを使用ã—ã¦å¿…è¦ã«å¿œã˜ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ãŸã ã—ã€`materialized_postgresql_tables_list` 設定ã¯å¤‰æ›´ã§ãã¾ã›ã‚“。ã“ã®è¨­å®šã§ãƒ†ãƒ¼ãƒ–ルã®ãƒªã‚¹ãƒˆã‚’æ›´æ–°ã™ã‚‹ã«ã¯ã€`ATTACH TABLE` クエリを使用ã—ã¦ãã ã•ã„。 + + ``` sql + ALTER DATABASE postgres_database MODIFY SETTING materialized_postgresql_max_block_size = ; + ``` + +### `materialized_postgresql_use_unique_replication_consumer_identifier` {#materialized-postgresql-use-unique-replication-consumer-identifier} + +レプリケーションã®ãŸã‚ã«ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªãƒ¬ãƒ—リケーションコンシューマ識別å­ã‚’使用ã—ã¾ã™ã€‚デフォルト: `0`。 +ã‚‚ã— `1` ã«è¨­å®šã™ã‚‹ã¨ã€åŒã˜ `PostgreSQL` テーブルを指ã—示ã™è¤‡æ•°ã® `MaterializedPostgreSQL` テーブルを設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 注æ„事項 {#notes} + +### è«–ç†ãƒ¬ãƒ—リケーションスロットã®ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼ {#logical-replication-slot-failover} + +プライマリã«å­˜åœ¨ã™ã‚‹è«–ç†ãƒ¬ãƒ—リケーションスロットã¯ã€ã‚¹ã‚¿ãƒ³ãƒã‚¤ãƒ¬ãƒ—リカã§ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 +ã—ãŸãŒã£ã¦ã€ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã€æ–°ã—ã„プライマリ(å¤ã„物ç†ã‚¹ã‚¿ãƒ³ãƒã‚¤ï¼‰ã¯ã€å¤ã„プライマリã§å­˜åœ¨ã—ã¦ã„ãŸã‚¹ãƒ­ãƒƒãƒˆã‚’èªè­˜ã—ã¾ã›ã‚“。ã“れ㯠PostgreSQL ã‹ã‚‰ã®ãƒ¬ãƒ—リケーションを壊ã™ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ +ã“れを解決ã™ã‚‹æ–¹æ³•ã®ä¸€ã¤ã¯ã€ãƒ¬ãƒ—リケーションスロットを自分ã§ç®¡ç†ã—ã€æ°¸ç¶šçš„ãªãƒ¬ãƒ—リケーションスロットを定義ã™ã‚‹ã“ã¨ã§ã™ï¼ˆã„ãã¤ã‹ã®æƒ…å ±ã¯[ã“ã¡ã‚‰](https://patroni.readthedocs.io/en/latest/SETTINGS.html)ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼‰ã€‚`materialized_postgresql_replication_slot` 設定を通ã˜ã¦ã‚¹ãƒ­ãƒƒãƒˆåを渡ã™å¿…è¦ãŒã‚ã‚Šã€`EXPORT SNAPSHOT` オプションã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚スナップショット識別å­ã¯ `materialized_postgresql_snapshot` 設定を通ã˜ã¦æ¸¡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +注æ„ã™ã¹ãã¯ã€æœ¬å½“ã«å¿…è¦ãªå ´åˆã®ã¿ã“れを使用ã™ã¹ãã§ã‚ã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚ã“れを行ã†å…·ä½“çš„ãªå¿…è¦æ€§ã‚„完全ãªç†è§£ãŒãªã„é™ã‚Šã€ãƒ†ãƒ¼ãƒ–ルエンジンãŒç‹¬è‡ªã«ãƒ¬ãƒ—リケーションスロットを作æˆã—管ç†ã™ã‚‹ã“ã¨ã‚’許å¯ã—ãŸæ–¹ãŒè‰¯ã„ã§ã™ã€‚ + +**例([@bchrobot](https://github.com/bchrobot) より)** + +1. PostgreSQL ã§ãƒ¬ãƒ—リケーションスロットを設定ã—ã¾ã™ã€‚ + + ```yaml + apiVersion: "acid.zalan.do/v1" + kind: postgresql + metadata: + name: acid-demo-cluster + spec: + numberOfInstances: 2 + postgresql: + parameters: + wal_level: logical + patroni: + slots: + clickhouse_sync: + type: logical + database: demodb + plugin: pgoutput + ``` + +2. レプリケーションスロットãŒæº–å‚™ã•ã‚Œã‚‹ã®ã‚’å¾…ã¡ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’開始ã—ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚¹ãƒŠãƒƒãƒ—ショット識別å­ã‚’エクスãƒãƒ¼ãƒˆã—ã¾ã™: + + ```sql + BEGIN; + SELECT pg_export_snapshot(); + ``` + +3. ClickHouse ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã—ã¾ã™: + + ```sql + CREATE DATABASE demodb + ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgres_user', 'postgres_password') + SETTINGS + materialized_postgresql_replication_slot = 'clickhouse_sync', + materialized_postgresql_snapshot = '0000000A-0000023F-3', + materialized_postgresql_tables_list = 'table1,table2,table3'; + ``` + +4. PostgreSQL トランザクションを終了ã—ãŸã‚‰ã€ClickHouse DB ã¸ã®ãƒ¬ãƒ—リケーションãŒç¢ºèªã•ã‚Œã¾ã™ã€‚フェイルオーãƒãƒ¼å¾Œã‚‚レプリケーションãŒç¶šãã“ã¨ã‚’確èªã—ã¾ã™: + + ```bash + kubectl exec acid-demo-cluster-0 -c postgres -- su postgres -c 'patronictl failover --candidate acid-demo-cluster-1 --force' + ``` + +### å¿…è¦ãªæ¨©é™ + +1. [CREATE PUBLICATION](https://postgrespro.ru/docs/postgresql/14/sql-createpublication) -- 作æˆã‚¯ã‚¨ãƒªæ¨©é™ã€‚ + +2. [CREATE_REPLICATION_SLOT](https://postgrespro.ru/docs/postgrespro/10/protocol-replication#PROTOCOL-REPLICATION-CREATE-SLOT) -- レプリケーション権é™ã€‚ + +3. [pg_drop_replication_slot](https://postgrespro.ru/docs/postgrespro/9.5/functions-admin#functions-replication) -- レプリケーション権é™ã¾ãŸã¯ã‚¹ãƒ¼ãƒ‘ーユーザー。 + +4. [DROP PUBLICATION](https://postgrespro.ru/docs/postgresql/10/sql-droppublication) -- パブリケーションã®æ‰€æœ‰è€…(`MaterializedPostgreSQL` エンジン内㮠`username`)。 + +`materialized_postgresql_replication_slot` 㨠`materialized_postgresql_snapshot` 設定を使用ã™ã‚‹ã“ã¨ã§ã€ã‚³ãƒžãƒ³ãƒ‰ `2` ãŠã‚ˆã³ `3` ã®å®Ÿè¡Œã¨ãã®æ¨©é™ã‚’é¿ã‘ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ãŸã ã—ã€éžå¸¸ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ + +テーブルã¸ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©: + +1. pg_publication + +2. pg_replication_slots + +3. pg_publication_tables diff --git a/docs/ja/engines/database-engines/mysql.md b/docs/ja/engines/database-engines/mysql.md new file mode 100644 index 00000000000..37e5ace6a16 --- /dev/null +++ b/docs/ja/engines/database-engines/mysql.md @@ -0,0 +1,154 @@ +--- +slug: /ja/engines/database-engines/mysql +sidebar_position: 50 +sidebar_label: MySQL +--- + +import CloudNotSupportedBadge from '@theme/badges/CloudNotSupportedBadge'; + +# MySQL データベースエンジン + + + +リモート㮠MySQL サーãƒãƒ¼ä¸Šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã—ã€`INSERT` ãŠã‚ˆã³ `SELECT` クエリを実行ã—㦠ClickHouse 㨠MySQL é–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’交æ›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`MySQL` データベースエンジンã¯ã‚¯ã‚¨ãƒªã‚’ MySQL サーãƒãƒ¼ã«ç¿»è¨³ã™ã‚‹ãŸã‚ã€`SHOW TABLES` ã‚„ `SHOW CREATE TABLE` ã®ã‚ˆã†ãªæ“作を実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +以下ã®ã‚¯ã‚¨ãƒªã¯å®Ÿè¡Œã§ãã¾ã›ã‚“: + +- `RENAME` +- `CREATE TABLE` +- `ALTER` + +## データベースã®ä½œæˆ {#creating-a-database} + +``` sql +CREATE DATABASE [IF NOT EXISTS] db_name [ON CLUSTER cluster] +ENGINE = MySQL('host:port', ['database' | database], 'user', 'password') +``` + +**エンジンパラメータ** + +- `host:port` — MySQL サーãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ +- `database` — リモートデータベースå。 +- `user` — MySQL ユーザー。 +- `password` — ユーザーパスワード。 + +## データ型サãƒãƒ¼ãƒˆ {#data_types-support} + +| MySQL | ClickHouse | +|----------------------------------|--------------------------------------------------------------| +| UNSIGNED TINYINT | [UInt8](../../sql-reference/data-types/int-uint.md) | +| TINYINT | [Int8](../../sql-reference/data-types/int-uint.md) | +| UNSIGNED SMALLINT | [UInt16](../../sql-reference/data-types/int-uint.md) | +| SMALLINT | [Int16](../../sql-reference/data-types/int-uint.md) | +| UNSIGNED INT, UNSIGNED MEDIUMINT | [UInt32](../../sql-reference/data-types/int-uint.md) | +| INT, MEDIUMINT | [Int32](../../sql-reference/data-types/int-uint.md) | +| UNSIGNED BIGINT | [UInt64](../../sql-reference/data-types/int-uint.md) | +| BIGINT | [Int64](../../sql-reference/data-types/int-uint.md) | +| FLOAT | [Float32](../../sql-reference/data-types/float.md) | +| DOUBLE | [Float64](../../sql-reference/data-types/float.md) | +| DATE | [Date](../../sql-reference/data-types/date.md) | +| DATETIME, TIMESTAMP | [DateTime](../../sql-reference/data-types/datetime.md) | +| BINARY | [FixedString](../../sql-reference/data-types/fixedstring.md) | + +ãã®ä»–ã®ã™ã¹ã¦ã® MySQL データ型㯠[String](../../sql-reference/data-types/string.md) ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +[Nullable](../../sql-reference/data-types/nullable.md) ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## グローãƒãƒ«å¤‰æ•°ã‚µãƒãƒ¼ãƒˆ {#global-variables-support} + +より高ã„互æ›æ€§ã®ãŸã‚ã«ã€MySQL スタイル㧠`@@identifier` ã¨ã—ã¦ã‚°ãƒ­ãƒ¼ãƒãƒ«å¤‰æ•°ã‚’使用ã§ãã¾ã™ã€‚ + +ã“れらã®å¤‰æ•°ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼š +- `version` +- `max_allowed_packet` + +:::note +ç¾æ™‚点ã§ã¯ã€ã“れらã®å¤‰æ•°ã¯ã‚¹ã‚¿ãƒ–ã§ã‚ã‚Šã€ä½•ã‹ã«å¯¾å¿œã—ã¦ã„ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +例: + +``` sql +SELECT @@version; +``` + +## 使用例 {#examples-of-use} + +MySQL ã®ãƒ†ãƒ¼ãƒ–ル: + +``` text +mysql> USE test; +Database changed + +mysql> CREATE TABLE `mysql_table` ( + -> `int_id` INT NOT NULL AUTO_INCREMENT, + -> `float` FLOAT NOT NULL, + -> PRIMARY KEY (`int_id`)); +Query OK, 0 rows affected (0,09 sec) + +mysql> insert into mysql_table (`int_id`, `float`) VALUES (1,2); +Query OK, 1 row affected (0,00 sec) + +mysql> select * from mysql_table; ++------+-----+ +| int_id | value | ++------+-----+ +| 1 | 2 | ++------+-----+ +1 row in set (0,00 sec) +``` + +MySQL サーãƒãƒ¼ã¨ãƒ‡ãƒ¼ã‚¿ã‚’交æ›ã™ã‚‹ ClickHouse ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ï¼š + +``` sql +CREATE DATABASE mysql_db ENGINE = MySQL('localhost:3306', 'test', 'my_user', 'user_password') SETTINGS read_write_timeout=10000, connect_timeout=100; +``` + +``` sql +SHOW DATABASES +``` + +``` text +┌─name─────┠+│ default │ +│ mysql_db │ +│ system │ +└──────────┘ +``` + +``` sql +SHOW TABLES FROM mysql_db +``` + +``` text +┌─name─────────┠+│ mysql_table │ +└──────────────┘ +``` + +``` sql +SELECT * FROM mysql_db.mysql_table +``` + +``` text +┌─int_id─┬─value─┠+│ 1 │ 2 │ +└────────┴───────┘ +``` + +``` sql +INSERT INTO mysql_db.mysql_table VALUES (3,4) +``` + +``` sql +SELECT * FROM mysql_db.mysql_table +``` + +``` text +┌─int_id─┬─value─┠+│ 1 │ 2 │ +│ 3 │ 4 │ +└────────┴───────┘ +``` diff --git a/docs/ja/engines/database-engines/postgresql.md b/docs/ja/engines/database-engines/postgresql.md new file mode 100644 index 00000000000..37b26e8803c --- /dev/null +++ b/docs/ja/engines/database-engines/postgresql.md @@ -0,0 +1,142 @@ +--- +slug: /ja/engines/database-engines/postgresql +sidebar_position: 40 +sidebar_label: PostgreSQL +--- + +# PostgreSQL + +リモート㮠[PostgreSQL](https://www.postgresql.org) サーãƒãƒ¼ä¸Šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã§ãるよã†ã«ã—ã¾ã™ã€‚ClickHouse 㨠PostgreSQL ã®é–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’交æ›ã™ã‚‹ãŸã‚ã®èª­ã¿æ›¸ãæ“作(`SELECT` 㨠`INSERT` クエリ)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +`SHOW TABLES` ãŠã‚ˆã³ `DESCRIBE TABLE` クエリを使用ã—ã¦ã€ãƒªãƒ¢ãƒ¼ãƒˆ PostgreSQL ã‹ã‚‰ã®ãƒ†ãƒ¼ãƒ–ルリストã¨ãƒ†ãƒ¼ãƒ–ル構造ã«ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + +テーブル構造ã®å¤‰æ›´ï¼ˆ`ALTER TABLE ... ADD|DROP COLUMN`)をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚`use_table_cache` パラメーター(以下ã®ã‚¨ãƒ³ã‚¸ãƒ³ãƒ‘ラメーターをå‚照)㌠`1` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ†ãƒ¼ãƒ–ル構造ã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã€å¤‰æ›´ãŒãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã›ã‚“ãŒã€`DETACH` ãŠã‚ˆã³ `ATTACH` クエリã§æ›´æ–°ã§ãã¾ã™ã€‚ + +## データベースã®ä½œæˆ {#creating-a-database} + +``` sql +CREATE DATABASE test_database +ENGINE = PostgreSQL('host:port', 'database', 'user', 'password'[, `schema`, `use_table_cache`]); +``` + +**エンジンパラメーター** + +- `host:port` — PostgreSQL サーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ +- `database` — リモートデータベースå。 +- `user` — PostgreSQL ユーザー。 +- `password` — ユーザーパスワード。 +- `schema` — PostgreSQL スキーマ。 +- `use_table_cache` — データベースã®ãƒ†ãƒ¼ãƒ–ル構造をキャッシュã™ã‚‹ã‹ã©ã†ã‹ã‚’定義ã—ã¾ã™ã€‚オプション。デフォルト値: `0`。 + +## データ型ã®ã‚µãƒãƒ¼ãƒˆ {#data_types-support} + +| PostgreSQL | ClickHouse | +|------------------|--------------------------------------------------------------| +| DATE | [Date](../../sql-reference/data-types/date.md) | +| TIMESTAMP | [DateTime](../../sql-reference/data-types/datetime.md) | +| REAL | [Float32](../../sql-reference/data-types/float.md) | +| DOUBLE | [Float64](../../sql-reference/data-types/float.md) | +| DECIMAL, NUMERIC | [Decimal](../../sql-reference/data-types/decimal.md) | +| SMALLINT | [Int16](../../sql-reference/data-types/int-uint.md) | +| INTEGER | [Int32](../../sql-reference/data-types/int-uint.md) | +| BIGINT | [Int64](../../sql-reference/data-types/int-uint.md) | +| SERIAL | [UInt32](../../sql-reference/data-types/int-uint.md) | +| BIGSERIAL | [UInt64](../../sql-reference/data-types/int-uint.md) | +| TEXT, CHAR | [String](../../sql-reference/data-types/string.md) | +| INTEGER | Nullable([Int32](../../sql-reference/data-types/int-uint.md))| +| ARRAY | [Array](../../sql-reference/data-types/array.md) | + +## 使用例 {#examples-of-use} + +ClickHouse ã§ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒã€PostgreSQL サーãƒãƒ¼ã¨ãƒ‡ãƒ¼ã‚¿ã‚’交æ›ã—ã¾ã™: + +``` sql +CREATE DATABASE test_database +ENGINE = PostgreSQL('postgres1:5432', 'test_database', 'postgres', 'mysecretpassword', 'schema_name',1); +``` + +``` sql +SHOW DATABASES; +``` + +``` text +┌─name──────────┠+│ default │ +│ test_database │ +│ system │ +└───────────────┘ +``` + +``` sql +SHOW TABLES FROM test_database; +``` + +``` text +┌─name───────┠+│ test_table │ +└────────────┘ +``` + +PostgreSQL テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™: + +``` sql +SELECT * FROM test_database.test_table; +``` + +``` text +┌─id─┬─value─┠+│ 1 │ 2 │ +└────┴───────┘ +``` + +PostgreSQL テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’書ãè¾¼ã¿ã¾ã™: + +``` sql +INSERT INTO test_database.test_table VALUES (3,4); +SELECT * FROM test_database.test_table; +``` + +``` text +┌─int_id─┬─value─┠+│ 1 │ 2 │ +│ 3 │ 4 │ +└────────┴───────┘ +``` + +PostgreSQL ã§ãƒ†ãƒ¼ãƒ–ル構造ãŒå¤‰æ›´ã•ã‚ŒãŸã¨ã—ã¾ã™: + +``` sql +postgre> ALTER TABLE test_table ADD COLUMN data Text +``` + +データベースを作æˆã™ã‚‹ã¨ãã« `use_table_cache` パラメーター㌠`1` ã«è¨­å®šã•ã‚Œã¦ã„ãŸãŸã‚ã€ClickHouse ã®ãƒ†ãƒ¼ãƒ–ル構造ã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã€å¤‰æ›´ã•ã‚Œã¦ã„ã¾ã›ã‚“ã§ã—ãŸ: + +``` sql +DESCRIBE TABLE test_database.test_table; +``` +``` text +┌─name───┬─type──────────────┠+│ id │ Nullable(Integer) │ +│ value │ Nullable(Integer) │ +└────────┴───────────────────┘ +``` + +テーブルをデタッãƒã—ã¦å†ã³ã‚¢ã‚¿ãƒƒãƒã—ãŸå¾Œã€æ§‹é€ ãŒæ›´æ–°ã•ã‚Œã¾ã—ãŸ: + +``` sql +DETACH TABLE test_database.test_table; +ATTACH TABLE test_database.test_table; +DESCRIBE TABLE test_database.test_table; +``` +``` text +┌─name───┬─type──────────────┠+│ id │ Nullable(Integer) │ +│ value │ Nullable(Integer) │ +│ data │ Nullable(String) │ +└────────┴───────────────────┘ +``` + +## 関連コンテンツ + +- ブログ: [ClickHouse and PostgreSQL - a match made in data heaven - part 1](https://clickhouse.com/blog/migrating-data-between-clickhouse-postgres) +- ブログ: [ClickHouse and PostgreSQL - a Match Made in Data Heaven - part 2](https://clickhouse.com/blog/migrating-data-between-clickhouse-postgres-part-2) diff --git a/docs/ja/engines/database-engines/replicated.md b/docs/ja/engines/database-engines/replicated.md new file mode 100644 index 00000000000..f3a9c7c4ff3 --- /dev/null +++ b/docs/ja/engines/database-engines/replicated.md @@ -0,0 +1,124 @@ +--- +slug: /ja/engines/database-engines/replicated +sidebar_position: 30 +sidebar_label: Replicated +--- + +# Replicated + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯[Atomic](../../engines/database-engines/atomic.md)エンジンã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ZooKeeperã«æ›¸ãè¾¼ã¾ã‚Œã€ç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§å®Ÿè¡Œã•ã‚Œã‚‹DDLログを通ã˜ã¦ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ãƒ¬ãƒ—リケーションをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +1ã¤ã®ClickHouseサーãƒãƒ¼ã¯è¤‡æ•°ã®ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’åŒæ™‚ã«å®Ÿè¡ŒãŠã‚ˆã³æ›´æ–°ã§ãã¾ã™ã€‚ãŸã ã—ã€åŒã˜ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®è¤‡æ•°ã®ãƒ¬ãƒ—リカをæŒã¤ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## データベースã®ä½œæˆ {#creating-a-database} +``` sql +CREATE DATABASE testdb ENGINE = Replicated('zoo_path', 'shard_name', 'replica_name') [SETTINGS ...] +``` + +**エンジンパラメータ** + +- `zoo_path` — ZooKeeperã®ãƒ‘ス。åŒã˜ZooKeeperパスã¯åŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«å¯¾å¿œã—ã¾ã™ã€‚ +- `shard_name` — シャードå。データベースレプリカã¯`shard_name`ã«ã‚ˆã£ã¦ã‚·ãƒ£ãƒ¼ãƒ‰ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚Œã¾ã™ã€‚ +- `replica_name` — レプリカå。åŒã˜ã‚·ãƒ£ãƒ¼ãƒ‰ã®ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«å¯¾ã—ã¦ãƒ¬ãƒ—リカåã¯ç•°ãªã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +[ReplicatedMergeTree](../table-engines/mergetree-family/replication.md#table_engines-replication)テーブルã®å ´åˆã€å¼•æ•°ãŒæä¾›ã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å¼•æ•°ãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼š`/clickhouse/tables/{uuid}/{shard}`ãŠã‚ˆã³`{replica}`。ã“れらã¯ã‚µãƒ¼ãƒãƒ¼è¨­å®š[default_replica_path](../../operations/server-configuration-parameters/settings.md#default_replica_path)ãŠã‚ˆã³[default_replica_name](../../operations/server-configuration-parameters/settings.md#default_replica_name)ã§å¤‰æ›´ã§ãã¾ã™ã€‚マクロ`{uuid}`ã¯ãƒ†ãƒ¼ãƒ–ルã®UUIDã«å±•é–‹ã•ã‚Œã€`{shard}`ãŠã‚ˆã³`{replica}`ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ãƒ‘ラメータã§ã¯ãªãサーãƒãƒ¼è¨­å®šã‹ã‚‰ã®å€¤ã«å±•é–‹ã•ã‚Œã¾ã™ã€‚ã—ã‹ã—å°†æ¥çš„ã«ã¯ã€Replicatedデータベースã®`shard_name`ãŠã‚ˆã³`replica_name`を使用ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +## 特徴ã¨æŽ¨å¥¨äº‹é … {#specifics-and-recommendations} + +`Replicated`データベースを使用ã—ãŸDDLクエリã¯ã€[ON CLUSTER](../../sql-reference/distributed-ddl.md)クエリã¨é¡žä¼¼ã®æ–¹æ³•ã§å‹•ä½œã—ã¾ã™ãŒã€ã„ãã¤ã‹ã®é•ã„ãŒã‚ã‚Šã¾ã™ã€‚ + +ã¾ãšã€DDLリクエストã¯èµ·å‹•è€…(ユーザーã‹ã‚‰ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’最åˆã«å—ã‘å–ã£ãŸãƒ›ã‚¹ãƒˆï¼‰ã§å®Ÿè¡Œã‚’試ã¿ã¾ã™ã€‚リクエストãŒå®Œäº†ã—ãªã„å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã™ãã«ã‚¨ãƒ©ãƒ¼ã‚’å—ã‘å–ã‚Šã€ä»–ã®ãƒ›ã‚¹ãƒˆã¯ãれを実行ã—よã†ã¨ã¯ã—ã¾ã›ã‚“。リクエストãŒèµ·å‹•è€…ã§æ­£å¸¸ã«å®Œäº†ã—ãŸå ´åˆã€ä»–ã®ã™ã¹ã¦ã®ãƒ›ã‚¹ãƒˆã¯ãã‚ŒãŒå®Œäº†ã™ã‚‹ã¾ã§è‡ªå‹•çš„ã«å†è©¦è¡Œã—ã¾ã™ã€‚起動者ã¯ä»–ã®ãƒ›ã‚¹ãƒˆã§ã‚¯ã‚¨ãƒªãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ã¨ã†ã¨ã—([distributed_ddl_task_timeout](../../operations/settings/settings.md#distributed_ddl_task_timeout)を超ãˆã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“)ã€å„ホストã§ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを返ã—ã¾ã™ã€‚ + +エラーã®å ´åˆã®å‹•ä½œã¯[distributed_ddl_output_mode](../../operations/settings/settings.md#distributed_ddl_output_mode)設定ã«ã‚ˆã£ã¦è¦åˆ¶ã•ã‚Œã€`Replicated`データベースã§ã¯`null_status_on_timeout`ã«è¨­å®šã™ã‚‹ã®ãŒæœ›ã¾ã—ã„ã§ã™ã€‚ã¤ã¾ã‚Šã€ã‚るホストãŒ[distributed_ddl_task_timeout](../../operations/settings/settings.md#distributed_ddl_task_timeout)中ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã™ã‚‹ã®ã«æ™‚é–“ãŒãªã„å ´åˆã€ä¾‹å¤–を投ã’ã‚‹ã®ã§ã¯ãªãã€ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦`NULL`ステータスを表示ã—ã¾ã™ã€‚ + +[system.clusters](../../operations/system-tables/clusters.md)システムテーブルã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§æ§‹æˆã•ã‚Œã‚‹ã€ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨åŒã˜åå‰ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã¯ãƒ¬ãƒ—リカã®ä½œæˆ/削除時ã«è‡ªå‹•çš„ã«æ›´æ–°ã•ã‚Œã€[分散テーブル](../../engines/table-engines/special/distributed.md#distributed)用ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +æ–°ã—ã„データベースレプリカを作æˆã™ã‚‹éš›ã€ã“ã®ãƒ¬ãƒ—リカã¯è‡ªåˆ†ã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚レプリカãŒé•·æ™‚間使用ã§ããªã„状態ã«ã‚ã‚Šã€ãƒ¬ãƒ—リケーションログã‹ã‚‰é…れをã¨ã£ãŸå ´åˆã€ãã‚Œã¯è‡ªåˆ†ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’ç¾åœ¨ã®ZooKeeperã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¨æ¯”較ã—ã€ä½™åˆ†ãªãƒ†ãƒ¼ãƒ–ルをデータ付ãã§éžãƒ¬ãƒ—リケートã•ã‚ŒãŸåˆ¥ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ç§»å‹•ã—(余計ãªã‚‚ã®ã‚’誤ã£ã¦å‰Šé™¤ã—ãªã„よã†ã«ï¼‰ã€æ¬ ã‘ã¦ã„るテーブルを作æˆã—ã€åå‰ãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã«ã¯ãƒ†ãƒ¼ãƒ–ルåã‚’æ›´æ–°ã—ã¾ã™ã€‚データã¯`ReplicatedMergeTree`レベルã§ãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒ†ãƒ¼ãƒ–ルãŒãƒ¬ãƒ—リケートã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ¬ãƒ—リケートã•ã‚Œã¾ã›ã‚“(データベースã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ã¿ã®è²¬ä»»ã‚’è² ã„ã¾ã™ï¼‰ã€‚ + +[`ALTER TABLE FREEZE|ATTACH|FETCH|DROP|DROP DETACHED|DETACH PARTITION|PART`](../../sql-reference/statements/alter/partition.md)クエリã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã™ãŒã€ãƒ¬ãƒ—リケートã•ã‚Œã¾ã›ã‚“。データベースエンジンã¯ç¾åœ¨ã®ãƒ¬ãƒ—リカã«ã®ã¿ãƒ‘ーティション/パートを追加/å–å¾—/削除ã—ã¾ã™ã€‚ãŸã ã—ã€ãƒ†ãƒ¼ãƒ–ル自体ãŒãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルエンジンを使用ã—ã¦ã„ã‚‹å ´åˆã€`ATTACH`を使用ã—ãŸå¾Œã«ãƒ‡ãƒ¼ã‚¿ãŒãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚ + +テーブルã®ãƒ¬ãƒ—リケーションを維æŒã›ãšã«ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’設定ã™ã‚‹ã ã‘ãŒå¿…è¦ãªå ´åˆã¯ã€[クラスターã®è‡ªå‹•æ¤œå‡º](../../operations/cluster-discovery.md)機能をå‚ç…§ã—ã¦ãã ã•ã„。 + +## 使用例 {#usage-example} + +3ã¤ã®ãƒ›ã‚¹ãƒˆã§ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’作æˆã™ã‚‹ï¼š + +``` sql +node1 :) CREATE DATABASE r ENGINE=Replicated('some/path/r','shard1','replica1'); +node2 :) CREATE DATABASE r ENGINE=Replicated('some/path/r','shard1','other_replica'); +node3 :) CREATE DATABASE r ENGINE=Replicated('some/path/r','other_shard','{replica}'); +``` + +DDLクエリを実行ã™ã‚‹ï¼š + +``` sql +CREATE TABLE r.rmt (n UInt64) ENGINE=ReplicatedMergeTree ORDER BY n; +``` + +``` text +┌─────hosts────────────┬──status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+│ shard1|replica1 │ 0 │ │ 2 │ 0 │ +│ shard1|other_replica │ 0 │ │ 1 │ 0 │ +│ other_shard|r1 │ 0 │ │ 0 │ 0 │ +└──────────────────────┴─────────┴───────┴─────────────────────┴──────────────────┘ +``` + +システムテーブルを表示ã™ã‚‹ï¼š + +``` sql +SELECT cluster, shard_num, replica_num, host_name, host_address, port, is_local +FROM system.clusters WHERE cluster='r'; +``` + +``` text +┌─cluster─┬─shard_num─┬─replica_num─┬─host_name─┬─host_address─┬─port─┬─is_local─┠+│ r │ 1 │ 1 │ node3 │ 127.0.0.1 │ 9002 │ 0 │ +│ r │ 2 │ 1 │ node2 │ 127.0.0.1 │ 9001 │ 0 │ +│ r │ 2 │ 2 │ node1 │ 127.0.0.1 │ 9000 │ 1 │ +└─────────┴───────────┴─────────────┴───────────┴──────────────┴──────┴──────────┘ +``` + +分散テーブルを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ï¼š + +``` sql +node2 :) CREATE TABLE r.d (n UInt64) ENGINE=Distributed('r','r','rmt', n % 2); +node3 :) INSERT INTO r.d SELECT * FROM numbers(10); +node1 :) SELECT materialize(hostName()) AS host, groupArray(n) FROM r.d GROUP BY host; +``` + +``` text +┌─hosts─┬─groupArray(n)─┠+│ node3 │ [1,3,5,7,9] │ +│ node2 │ [0,2,4,6,8] │ +└───────┴───────────────┘ +``` + +ã‚‚ã†1ã¤ã®ãƒ›ã‚¹ãƒˆã«ãƒ¬ãƒ—リカを追加ã™ã‚‹ï¼š + +``` sql +node4 :) CREATE DATABASE r ENGINE=Replicated('some/path/r','other_shard','r2'); +``` + +クラスターã®æ§‹æˆã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +``` text +┌─cluster─┬─shard_num─┬─replica_num─┬─host_name─┬─host_address─┬─port─┬─is_local─┠+│ r │ 1 │ 1 │ node3 │ 127.0.0.1 │ 9002 │ 0 │ +│ r │ 1 │ 2 │ node4 │ 127.0.0.1 │ 9003 │ 0 │ +│ r │ 2 │ 1 │ node2 │ 127.0.0.1 │ 9001 │ 0 │ +│ r │ 2 │ 2 │ node1 │ 127.0.0.1 │ 9000 │ 1 │ +└─────────┴───────────┴─────────────┴───────────┴──────────────┴──────┴──────────┘ +``` + +分散テーブルã¯æ–°ã—ã„ホストã‹ã‚‰ã‚‚データをå–å¾—ã—ã¾ã™ï¼š + +```sql +node2 :) SELECT materialize(hostName()) AS host, groupArray(n) FROM r.d GROUP BY host; +``` + +```text +┌─hosts─┬─groupArray(n)─┠+│ node2 │ [1,3,5,7,9] │ +│ node4 │ [0,2,4,6,8] │ +└───────┴───────────────┘ +``` diff --git a/docs/ja/engines/database-engines/sqlite.md b/docs/ja/engines/database-engines/sqlite.md new file mode 100644 index 00000000000..b410297be3c --- /dev/null +++ b/docs/ja/engines/database-engines/sqlite.md @@ -0,0 +1,81 @@ +--- +slug: /ja/engines/database-engines/sqlite +sidebar_position: 55 +sidebar_label: SQLite +--- + +# SQLite + +[SQLite](https://www.sqlite.org/index.html) データベースã«æŽ¥ç¶šã—ã€ClickHouse 㨠SQLite ã®é–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’交æ›ã™ã‚‹ãŸã‚ã« `INSERT` 㨠`SELECT` クエリを実行ã§ãã¾ã™ã€‚ + +## データベースã®ä½œæˆ {#creating-a-database} + +``` sql + CREATE DATABASE sqlite_database + ENGINE = SQLite('db_path') +``` + +**エンジンパラメータ** + +- `db_path` — SQLite データベースã®ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。 + +## データ型ã®ã‚µãƒãƒ¼ãƒˆ {#data_types-support} + +| SQLite | ClickHouse | +|---------------|---------------------------------------------------------| +| INTEGER | [Int32](../../sql-reference/data-types/int-uint.md) | +| REAL | [Float32](../../sql-reference/data-types/float.md) | +| TEXT | [String](../../sql-reference/data-types/string.md) | +| BLOB | [String](../../sql-reference/data-types/string.md) | + +## 特記ãŠã‚ˆã³æŽ¨å¥¨äº‹é … {#specifics-and-recommendations} + +SQLite ã¯ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å…¨ä½“(定義ã€ãƒ†ãƒ¼ãƒ–ルã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€ãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿è‡ªä½“)をå˜ä¸€ã®ã‚¯ãƒ­ã‚¹ãƒ—ラットフォームファイルã¨ã—ã¦ä¿å­˜ã—ã¾ã™ã€‚書ãè¾¼ã¿ä¸­ã¯ SQLite ãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«å…¨ä½“をロックã™ã‚‹ãŸã‚ã€æ›¸ãè¾¼ã¿æ“作ã¯é †æ¬¡å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚読ã¿å–ã‚Šæ“作ã¯ãƒžãƒ«ãƒã‚¿ã‚¹ã‚¯å¯èƒ½ã§ã™ã€‚ +SQLite ã¯ï¼ˆèµ·å‹•ã‚¹ã‚¯ãƒªãƒ—トãªã©ã®ï¼‰ã‚µãƒ¼ãƒ“ス管ç†ã‚„ `GRANT` やパスワードã«åŸºã¥ãアクセス制御を必è¦ã¨ã—ã¾ã›ã‚“。アクセス制御ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«è‡ªä½“ã«ä¸Žãˆã‚‰ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ãƒ‘ーミッションã«ã‚ˆã£ã¦ç®¡ç†ã•ã‚Œã¾ã™ã€‚ + +## 使用例 {#usage-example} + +ClickHouse ã§ã€SQLite ã«æŽ¥ç¶šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹: + +``` sql +CREATE DATABASE sqlite_db ENGINE = SQLite('sqlite.db'); +SHOW TABLES FROM sqlite_db; +``` + +``` text +┌──name───┠+│ table1 │ +│ table2 │ +└─────────┘ +``` + +テーブルを表示: + +``` sql +SELECT * FROM sqlite_db.table1; +``` + +``` text +┌─col1──┬─col2─┠+│ line1 │ 1 │ +│ line2 │ 2 │ +│ line3 │ 3 │ +└───────┴──────┘ +``` +ClickHouse ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ SQLite テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入: + +``` sql +CREATE TABLE clickhouse_table(`col1` String,`col2` Int16) ENGINE = MergeTree() ORDER BY col2; +INSERT INTO clickhouse_table VALUES ('text',10); +INSERT INTO sqlite_db.table1 SELECT * FROM clickhouse_table; +SELECT * FROM sqlite_db.table1; +``` + +``` text +┌─col1──┬─col2─┠+│ line1 │ 1 │ +│ line2 │ 2 │ +│ line3 │ 3 │ +│ text │ 10 │ +└───────┴──────┘ +``` diff --git a/docs/ja/engines/table-engines/index.md b/docs/ja/engines/table-engines/index.md new file mode 100644 index 00000000000..bde707073ab --- /dev/null +++ b/docs/ja/engines/table-engines/index.md @@ -0,0 +1,90 @@ +--- +slug: /ja/engines/table-engines/ +toc_folder_title: テーブルエンジン +toc_priority: 26 +toc_title: ã¯ã˜ã‚ã« +--- + +# テーブルエンジン + +テーブルエンジン(テーブルã®ç¨®é¡žï¼‰ã¯æ¬¡ã®ç‚¹ã‚’決定ã—ã¾ã™ï¼š + +- データã®ä¿å­˜æ–¹æ³•ã¨ä¿å­˜å ´æ‰€ã€æ›¸ãè¾¼ã¿ãŠã‚ˆã³èª­ã¿è¾¼ã¿å…ˆã€‚ +- サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るクエリã¨ãã®æ–¹æ³•ã€‚ +- åŒæ™‚データアクセス。 +- インデックスã®ä½¿ç”¨ï¼ˆå­˜åœ¨ã™ã‚‹å ´åˆï¼‰ã€‚ +- マルãƒã‚¹ãƒ¬ãƒƒãƒ‰ã§ã®è¦æ±‚実行ãŒå¯èƒ½ã‹ã©ã†ã‹ã€‚ +- データレプリケーションã®ãƒ‘ラメータ。 + +## エンジンファミリー {#engine-families} + +### MergeTree {#mergetree} + +高負è·ã‚¿ã‚¹ã‚¯å‘ã‘ã®æœ€ã‚‚汎用的ã‹ã¤æ©Ÿèƒ½çš„ãªãƒ†ãƒ¼ãƒ–ルエンジンã§ã™ã€‚ã“れらエンジンã®å…±é€šã®ç‰¹å¾´ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®è¿…速ãªæŒ¿å…¥ã¨ãã®å¾Œã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã®ãƒ‡ãƒ¼ã‚¿å‡¦ç†ã§ã™ã€‚`MergeTree`ファミリーエンジンã¯ãƒ‡ãƒ¼ã‚¿ã®ãƒ¬ãƒ—リケーション(エンジンã®[Replicated\*](../../engines/table-engines/mergetree-family/replication.md#table_engines-replication) ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã€ãƒ‘ーティションã€äºŒæ¬¡ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ”ングインデックスãªã©ã€ä»–ã®ã‚¨ãƒ³ã‚¸ãƒ³ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„機能をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +ã“ã®ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã«å«ã¾ã‚Œã‚‹ã‚¨ãƒ³ã‚¸ãƒ³ï¼š + +- [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md#mergetree) +- [ReplacingMergeTree](../../engines/table-engines/mergetree-family/replacingmergetree.md#replacingmergetree) +- [SummingMergeTree](../../engines/table-engines/mergetree-family/summingmergetree.md#summingmergetree) +- [AggregatingMergeTree](../../engines/table-engines/mergetree-family/aggregatingmergetree.md#aggregatingmergetree) +- [CollapsingMergeTree](../../engines/table-engines/mergetree-family/collapsingmergetree.md#table_engine-collapsingmergetree) +- [VersionedCollapsingMergeTree](../../engines/table-engines/mergetree-family/versionedcollapsingmergetree.md#versionedcollapsingmergetree) +- [GraphiteMergeTree](../../engines/table-engines/mergetree-family/graphitemergetree.md#graphitemergetree) + +### Log {#log} + +最å°ã®æ©Ÿèƒ½ã‚’æŒã¤è»½é‡ãª[エンジン](../../engines/table-engines/log-family/index.md)ã§ã™ã€‚å°è¦æ¨¡ãªãƒ†ãƒ¼ãƒ–ル(最大約100万行)を迅速ã«æ›¸ãè¾¼ã¿ã€ãã®å¾Œå…¨ä½“を読ã¿å–ã‚ŠãŸã„å ´åˆã«æœ€ã‚‚効果的ã§ã™ã€‚ + +ã“ã®ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã«å«ã¾ã‚Œã‚‹ã‚¨ãƒ³ã‚¸ãƒ³ï¼š + +- [TinyLog](../../engines/table-engines/log-family/tinylog.md#tinylog) +- [StripeLog](../../engines/table-engines/log-family/stripelog.md#stripelog) +- [Log](../../engines/table-engines/log-family/log.md#log) + +### インテグレーションエンジン {#integration-engines} + +ä»–ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŠã‚ˆã³å‡¦ç†ã‚·ã‚¹ãƒ†ãƒ ã¨é€šä¿¡ã™ã‚‹ãŸã‚ã®ã‚¨ãƒ³ã‚¸ãƒ³ã§ã™ã€‚ + +ã“ã®ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã«å«ã¾ã‚Œã‚‹ã‚¨ãƒ³ã‚¸ãƒ³ï¼š + +- [ODBC](../../engines/table-engines/integrations/odbc.md) +- [JDBC](../../engines/table-engines/integrations/jdbc.md) +- [MySQL](../../engines/table-engines/integrations/mysql.md) +- [MongoDB](../../engines/table-engines/integrations/mongodb.md) +- [Redis](../../engines/table-engines/integrations/redis.md) +- [HDFS](../../engines/table-engines/integrations/hdfs.md) +- [S3](../../engines/table-engines/integrations/s3.md) +- [Kafka](../../engines/table-engines/integrations/kafka.md) +- [EmbeddedRocksDB](../../engines/table-engines/integrations/embedded-rocksdb.md) +- [RabbitMQ](../../engines/table-engines/integrations/rabbitmq.md) +- [PostgreSQL](../../engines/table-engines/integrations/postgresql.md) +- [S3Queue](../../engines/table-engines/integrations/s3queue.md) +- [TimeSeries](../../engines/table-engines/integrations/time-series.md) + +### 特殊エンジン {#special-engines} + +ã“ã®ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã«å«ã¾ã‚Œã‚‹ã‚¨ãƒ³ã‚¸ãƒ³ï¼š + +- [分散テーブル](../../engines/table-engines/special/distributed.md#distributed) +- [Dictionary](../../engines/table-engines/special/dictionary.md#dictionary) +- [Merge](../../engines/table-engines/special/merge.md#merge) +- [File](../../engines/table-engines/special/file.md#file) +- [Null](../../engines/table-engines/special/null.md#null) +- [Set](../../engines/table-engines/special/set.md#set) +- [Join](../../engines/table-engines/special/join.md#join) +- [URL](../../engines/table-engines/special/url.md#table_engines-url) +- [View](../../engines/table-engines/special/view.md#table_engines-view) +- [Memory](../../engines/table-engines/special/memory.md#memory) +- [Buffer](../../engines/table-engines/special/buffer.md#buffer) +- [KeeperMap](../../engines/table-engines/special/keepermap.md) + +## 仮想カラム {#table_engines-virtual_columns} + +仮想カラムã¯ã€ã‚¨ãƒ³ã‚¸ãƒ³ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰å†…ã§å®šç¾©ã•ã‚Œã¦ã„ã‚‹çµ±åˆãƒ†ãƒ¼ãƒ–ルエンジンã®å±žæ€§ã§ã™ã€‚ + +`CREATE TABLE` クエリã§ä»®æƒ³ã‚«ãƒ©ãƒ ã‚’指定ã™ã¹ãã§ã¯ãªãã€`SHOW CREATE TABLE` ã‚„ `DESCRIBE TABLE` クエリã®çµæžœã«ä»®æƒ³ã‚«ãƒ©ãƒ ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。仮想カラムã¯èª­ã¿å–り専用ã®ãŸã‚ã€ä»®æƒ³ã‚«ãƒ©ãƒ ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã›ã‚“。 + +仮想カラムã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ã«ã¯ã€`SELECT` クエリã§ãã®åå‰ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`SELECT *` ã§ã¯ä»®æƒ³ã‚«ãƒ©ãƒ ã®å€¤ã¯è¿”ã•ã‚Œã¾ã›ã‚“。 + +テーブルを作æˆã™ã‚‹éš›ã«ã€ä»®æƒ³ã‚«ãƒ©ãƒ ã¨åŒã˜åå‰ã®ã‚«ãƒ©ãƒ ã‚’作æˆã—ãŸå ´åˆã€ä»®æƒ³ã‚«ãƒ©ãƒ ã¯ä½¿ç”¨ã§ããªããªã‚Šã¾ã™ã€‚ã“ã®ã‚ˆã†ãªã“ã¨ã¯ãŠå‹§ã‚ã—ã¾ã›ã‚“。è¡çªã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€ä»®æƒ³ã‚«ãƒ©ãƒ ã®åå‰ã«ã¯é€šå¸¸ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã‚’接頭辞ã¨ã—ã¦ä»˜ã‘られã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/engines/table-engines/integrations/ExternalDistributed.md b/docs/ja/engines/table-engines/integrations/ExternalDistributed.md new file mode 100644 index 00000000000..bc6567bc5f4 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/ExternalDistributed.md @@ -0,0 +1,53 @@ +--- +slug: /ja/engines/table-engines/integrations/ExternalDistributed +sidebar_position: 55 +sidebar_label: ExternalDistributed +title: ExternalDistributed +--- + +`ExternalDistributed`エンジンã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã®MySQLã¾ãŸã¯PostgreSQLã«ä¿å­˜ã•ã‚Œã¦ã„るデータã«å¯¾ã—ã¦`SELECT`クエリを実行ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚引数ã¨ã—ã¦[MySQL](../../../engines/table-engines/integrations/mysql.md)ã¾ãŸã¯[PostgreSQL](../../../engines/table-engines/integrations/postgresql.md)エンジンをå—ã‘入れã€ã‚·ãƒ£ãƒ¼ãƒ‰ãŒå¯èƒ½ã§ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1] [TTL expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2] [TTL expr2], + ... +) ENGINE = ExternalDistributed('engine', 'host:port', 'database', 'table', 'user', 'password'); +``` + +[CREATE TABLE](../../../sql-reference/statements/create/table.md#create-table-query)クエリã®è©³ç´°ãªèª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +テーブル構造ã¯å…ƒã®ãƒ†ãƒ¼ãƒ–ル構造ã¨ç•°ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ï¼š + +- カラムåã¯å…ƒã®ãƒ†ãƒ¼ãƒ–ルã¨åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“ãŒã€ã“れらã®ã‚«ãƒ©ãƒ ã®ä¸€éƒ¨ã®ã¿ã‚’ä»»æ„ã®é †åºã§åˆ©ç”¨ã§ãã¾ã™ã€‚ +- カラム型ã¯å…ƒã®ãƒ†ãƒ¼ãƒ–ルã¨ç•°ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã¯å€¤ã‚’ClickHouseã®ãƒ‡ãƒ¼ã‚¿åž‹ã«[キャスト](../../../sql-reference/functions/type-conversion-functions.md#type_conversion_function-cast)ã—よã†ã¨ã—ã¾ã™ã€‚ + +**エンジンパラメータ** + +- `engine` — テーブルエンジン `MySQL` ã¾ãŸã¯ `PostgreSQL`。 +- `host:port` — MySQLã¾ãŸã¯PostgreSQLサーãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ +- `database` — リモートデータベースå。 +- `table` — リモートテーブルå。 +- `user` — ユーザーå。 +- `password` — ユーザーパスワード。 + +## 実装ã®è©³ç´° {#implementation-details} + +複数ã®ãƒ¬ãƒ—リカをサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€`|`ã§ãƒªã‚¹ãƒˆã—ã€ã‚·ãƒ£ãƒ¼ãƒ‰ã¯`,`ã§ãƒªã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例: + +```sql +CREATE TABLE test_shards (id UInt32, name String, age UInt32, money UInt32) ENGINE = ExternalDistributed('MySQL', `mysql{1|2}:3306,mysql{3|4}:3306`, 'clickhouse', 'test_replicas', 'root', 'clickhouse'); +``` + +レプリカを指定ã™ã‚‹éš›ã«ã¯ã€èª­ã¿è¾¼ã¿æ™‚ã«ã‚·ãƒ£ãƒ¼ãƒ‰ã”ã¨ã«åˆ©ç”¨å¯èƒ½ãªãƒ¬ãƒ—リカã®ä¸€ã¤ãŒé¸æŠžã•ã‚Œã¾ã™ã€‚接続ãŒå¤±æ•—ã—ãŸå ´åˆã€æ¬¡ã®ãƒ¬ãƒ—リカãŒé¸æŠžã•ã‚Œã€ã“ã®å‡¦ç†ã¯ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«å¯¾ã—ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§æŽ¥ç¶šè©¦è¡ŒãŒå¤±æ•—ã—ãŸå ´åˆã€åŒã˜æ–¹æ³•ã§ä½•åº¦ã‹è©¦è¡ŒãŒç¹°ã‚Šè¿”ã•ã‚Œã¾ã™ã€‚ + +ä»»æ„ã®æ•°ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã¨å„シャードã«å¯¾ã™ã‚‹ä»»æ„ã®æ•°ã®ãƒ¬ãƒ—リカを指定ã§ãã¾ã™ã€‚ + +**関連項目** + +- [MySQL テーブルエンジン](../../../engines/table-engines/integrations/mysql.md) +- [PostgreSQL テーブルエンジン](../../../engines/table-engines/integrations/postgresql.md) +- [分散テーブルエンジン](../../../engines/table-engines/special/distributed.md) diff --git a/docs/ja/engines/table-engines/integrations/azure-queue.md b/docs/ja/engines/table-engines/integrations/azure-queue.md new file mode 100644 index 00000000000..38adfbe2f20 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/azure-queue.md @@ -0,0 +1,73 @@ +--- +slug: /ja/engines/table-engines/integrations/azure-queue +sidebar_position: 181 +sidebar_label: AzureQueue +--- + +# AzureQueue テーブルエンジン + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€[Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs) エコシステムã¨ã®çµ±åˆã‚’æä¾›ã—ã€ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE test (name String, value UInt32) + ENGINE = AzureQueue(...) + [SETTINGS] + [mode = '',] + [after_processing = 'keep',] + [keeper_path = '',] + ... +``` + +**エンジンパラメータ** + +`AzureQueue` ã®ãƒ‘ラメータã¯ã€`AzureBlobStorage` テーブルエンジンãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã‚‚ã®ã¨åŒã˜ã§ã™ã€‚パラメータã®è©³ç´°ã¯[ã“ã¡ã‚‰](../../../engines/table-engines/integrations/azureBlobStorage.md)ã‚’ã”覧ãã ã•ã„。 + +**例** + +```sql +CREATE TABLE azure_queue_engine_table (name String, value UInt32) +ENGINE=AzureQueue('DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite1:10000/devstoreaccount1/data/') +SETTINGS + mode = 'unordered' +``` + +## 設定 {#settings} + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る設定ã®ã‚»ãƒƒãƒˆã¯ã€`S3Queue` テーブルエンジンã¨åŒã˜ã§ã™ãŒã€`s3queue_` プレフィックスã¯ã‚ã‚Šã¾ã›ã‚“。設定ã®å®Œå…¨ãªãƒªã‚¹ãƒˆã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](../../../engines/table-engines/integrations/s3queue.md#settings)ã‚’ã”覧ãã ã•ã„。 +テーブルã«è¨­å®šã•ã‚ŒãŸè¨­å®šã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã™ã‚‹ã«ã¯ã€`system.s3_queue_settings` テーブルを使用ã—ã¾ã™ã€‚`24.10` ã‹ã‚‰ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +## 説明 {#description} + +`SELECT` ã¯ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã‚¤ãƒ³ãƒãƒ¼ãƒˆã«ã¯ç‰¹ã«æœ‰ç”¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“(デãƒãƒƒã‚°ã‚’除ã)ã€ãªãœãªã‚‰å„ファイルã¯ä¸€åº¦ã—ã‹ã‚¤ãƒ³ãƒãƒ¼ãƒˆã§ããªã„ã‹ã‚‰ã§ã™ã€‚[Materialized View](../../../sql-reference/statements/create/view.md) を使用ã—ã¦ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’作æˆã™ã‚‹æ–¹ãŒå®Ÿç”¨çš„ã§ã™ã€‚手順ã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +1. エンジンを使用ã—ã¦ã€S3 ã®æŒ‡å®šã•ã‚ŒãŸãƒ‘スã‹ã‚‰æ¶ˆè²»ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãれをデータストリームã¨ã—ã¦è€ƒæ…®ã—ã¾ã™ã€‚ +2. å¿…è¦ãªæ§‹é€ ã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ +3. エンジンã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã—ã€å‰ã«ä½œæˆã—ãŸãƒ†ãƒ¼ãƒ–ルã«æŠ•å…¥ã™ã‚‹ Materialized View を作æˆã—ã¾ã™ã€‚ + +`MATERIALIZED VIEW` ãŒã‚¨ãƒ³ã‚¸ãƒ³ã«æŽ¥ç¶šã•ã‚Œã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ãƒ¼ã‚¿ã®åŽé›†ã‚’開始ã—ã¾ã™ã€‚ + +例: + +``` sql + CREATE TABLE azure_queue_engine_table (name String, value UInt32) + ENGINE=AzureQueue('', 'CSV', 'gzip') + SETTINGS + mode = 'unordered'; + + CREATE TABLE stats (name String, value UInt32) + ENGINE = MergeTree() ORDER BY name; + + CREATE MATERIALIZED VIEW consumer TO stats + AS SELECT name, value FROM azure_queue_engine_table; + + SELECT * FROM stats ORDER BY name; +``` + +## 仮想カラム {#virtual-columns} + +- `_path` — ファイルã¸ã®ãƒ‘ス。 +- `_file` — ファイルã®åå‰ã€‚ + +仮想カラムã«é–¢ã™ã‚‹è©³ç´°ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](../../../engines/table-engines/index.md#table_engines-virtual_columns)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/engines/table-engines/integrations/azureBlobStorage.md b/docs/ja/engines/table-engines/integrations/azureBlobStorage.md new file mode 100644 index 00000000000..41b2ac5b1a9 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/azureBlobStorage.md @@ -0,0 +1,97 @@ +--- +slug: /ja/engines/table-engines/integrations/azureBlobStorage +sidebar_position: 10 +sidebar_label: Azure Blob Storage +--- + +# AzureBlobStorage テーブルエンジン + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€[Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs) エコシステムã¨ã®çµ±åˆã‚’æä¾›ã—ã¾ã™ã€‚ + +## ãƒ†ãƒ¼ãƒ–ãƒ«ä½œæˆ + +``` sql +CREATE TABLE azure_blob_storage_table (name String, value UInt32) + ENGINE = AzureBlobStorage(connection_string|storage_account_url, container_name, blobpath, [account_name, account_key, format, compression]) + [PARTITION BY expr] + [SETTINGS ...] +``` + +### エンジンパラメータ + +- `endpoint` — container & prefix ã‚’å«ã‚€ AzureBlobStorage ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ URL。èªè¨¼æ–¹æ³•ã«ã‚ˆã£ã¦ã¯ account_name ã‚’å«ã‚€å ´åˆãŒã‚ã‚Šã¾ã™ã€‚(http://azurite1:{port}/[account_name]{container_name}/{data_prefix}) ã¾ãŸã¯ã€ã“れらã®ãƒ‘ラメータを別々ã«æä¾›ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼ˆstorage_account_url, account_name & container を使用)。prefix を指定ã™ã‚‹ã«ã¯ã€ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’使用ã—ã¦ãã ã•ã„。 +- `endpoint_contains_account_name` - ã“ã®ãƒ•ãƒ©ã‚°ã¯ã€ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã« account_name ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’指定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ã“ã‚Œã¯ç‰¹å®šã®èªè¨¼æ–¹æ³•ã§ã®ã¿å¿…è¦ã§ã™ã€‚(デフォルト: true) +- `connection_string|storage_account_url` — connection_string ã«ã¯ã‚¢ã‚«ã‚¦ãƒ³ãƒˆåã¨ã‚­ãƒ¼ãŒå«ã¾ã‚Œã¾ã™ ([Create connection string](https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&bc=%2Fazure%2Fstorage%2Fblobs%2Fbreadcrumb%2Ftoc.json#configure-a-connection-string-for-an-azure-storage-account)) ã¾ãŸã¯ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¢ã‚«ã‚¦ãƒ³ãƒˆ URL ã¨ã—ã¦æä¾›ã—ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆåã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚­ãƒ¼ã‚’別々ã®ãƒ‘ラメータã¨ã—ã¦æŒ‡å®šã§ãã¾ã™ï¼ˆãƒ‘ラメータ account_name & account_key å‚照)。 +- `container_name` - コンテナå +- `blobpath` - ファイルパス。読ã¿å–り専用モードã§ä»¥ä¸‹ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™: `*`, `**`, `?`, `{abc,def}` ãŠã‚ˆã³ `{N..M}`ã€ã“ã“㧠`N`, `M` — 数値, `'abc'`, `'def'` — 文字列。 +- `account_name` - storage_account_url を使用ã—ã¦ã„ã‚‹å ´åˆã€ã“ã“ã§ã‚¢ã‚«ã‚¦ãƒ³ãƒˆåを指定ã§ãã¾ã™ã€‚ +- `account_key` - storage_account_url を使用ã—ã¦ã„ã‚‹å ´åˆã€ã“ã“ã§ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚­ãƒ¼ã‚’指定ã§ãã¾ã™ã€‚ +- `format` — ファイルã®[フォーマット](/docs/ja/interfaces/formats.md)。 +- `compression` — サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る値: `none`, `gzip/gz`, `brotli/br`, `xz/LZMA`, `zstd/zst`。デフォルトã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«ã‚ˆã£ã¦åœ§ç¸®ã‚’自動検出ã—ã¾ã™ã€‚(`auto` ã¨è¨­å®šã—ãŸå ´åˆã¨åŒã˜å‹•ä½œï¼‰ã€‚ + +**例** + +``` sql +CREATE TABLE test_table (key UInt64, data String) + ENGINE = AzureBlobStorage('DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite1:10000/devstoreaccount1/;', + 'test_container', 'test_table', 'CSV'); + +INSERT INTO test_table VALUES (1, 'a'), (2, 'b'), (3, 'c'); + +SELECT * FROM test_table; +``` + +```text +┌─key──┬─data──┠+│ 1 │ a │ +│ 2 │ b │ +│ 3 │ c │ +└──────┴───────┘ +``` + +## 仮想カラム {#virtual-columns} + +- `_path` — ファイルã¸ã®ãƒ‘ス。型: `LowCardinalty(String)`。 +- `_file` — ファイルå。型: `LowCardinalty(String)`。 +- `_size` — ファイルã®ãƒã‚¤ãƒˆå˜ä½ã§ã®ã‚µã‚¤ã‚ºã€‚åž‹: `Nullable(UInt64)`。サイズãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL`。 +- `_time` — ファイルã®æœ€çµ‚更新日時。型: `Nullable(DateTime)`。日時ãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL`。 + +## èªè¨¼ + +ç¾åœ¨ã€3ã¤ã®èªè¨¼æ–¹æ³•ãŒã‚ã‚Šã¾ã™: +- `Managed Identity` - `endpoint`ã€`connection_string` ã¾ãŸã¯ `storage_account_url` ã‚’æä¾›ã™ã‚‹ã“ã¨ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ +- `SAS Token` - `endpoint`ã€`connection_string` ã¾ãŸã¯ `storage_account_url` ã‚’æä¾›ã™ã‚‹ã“ã¨ã§ä½¿ç”¨ã§ãã¾ã™ã€‚URL ã« '?' ãŒå«ã¾ã‚Œã‚‹å ´åˆã«è­˜åˆ¥ã•ã‚Œã¾ã™ã€‚ +- `Workload Identity` - `endpoint` ã¾ãŸã¯ `storage_account_url` ã‚’æä¾›ã™ã‚‹ã“ã¨ã§ä½¿ç”¨ã§ãã¾ã™ã€‚config ã« `use_workload_identity` パラメータãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€[workload identity](https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/identity/azure-identity#authenticate-azure-hosted-applications) ãŒèªè¨¼ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +### データキャッシュ {#data-cache} + +`Azure` テーブルエンジンã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +ファイルシステムキャッシュã®è¨­å®šã‚ªãƒ—ションã¨ä½¿ç”¨æ³•ã«ã¤ã„ã¦ã¯ã€ã“ã®[セクション](/docs/ja/operations/storing-data.md/#using-local-cache)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +キャッシュã¯ãƒ‘スãŠã‚ˆã³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚ªãƒ–ジェクト㮠ETag ã«åŸºã¥ã„ã¦è¡Œã‚れるãŸã‚ã€ClickHouse ã¯å¤ã„キャッシュãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’読ã¿å–ã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。 + +キャッシュを有効ã«ã™ã‚‹ã«ã¯ã€è¨­å®šã‚’ `filesystem_cache_name = ''` ãŠã‚ˆã³ `enable_filesystem_cache = 1` ã¨ã—ã¾ã™ã€‚ + +```sql +SELECT * +FROM azureBlobStorage('DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite1:10000/devstoreaccount1/;', 'test_container', 'test_table', 'CSV') +SETTINGS filesystem_cache_name = 'cache_for_azure', enable_filesystem_cache = 1; +``` + +1. ClickHouse ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«æ¬¡ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’追加ã—ã¦ãã ã•ã„: + +``` xml + + + + path to cache directory + 10Gi + + + +``` + +2. ClickHouse ã® `storage_configuration` セクションã‹ã‚‰ã‚­ãƒ£ãƒƒã‚·ãƒ¥è¨­å®šï¼ˆãŠã‚ˆã³ã—ãŸãŒã£ã¦ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ï¼‰ã‚’å†åˆ©ç”¨ã—ã¾ã™ã€‚[ã“ã¡ã‚‰ã§èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™](/docs/ja/operations/storing-data.md/#using-local-cache) + +## å‚ç…§ + +[Azure Blob Storage テーブル関数](/docs/ja/sql-reference/table-functions/azureBlobStorage) diff --git a/docs/ja/engines/table-engines/integrations/deltalake.md b/docs/ja/engines/table-engines/integrations/deltalake.md new file mode 100644 index 00000000000..34d25c7cefe --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/deltalake.md @@ -0,0 +1,57 @@ +--- +slug: /ja/engines/table-engines/integrations/deltalake +sidebar_position: 40 +sidebar_label: DeltaLake +--- + +# DeltaLake テーブルエンジン + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€Amazon S3 ã«å­˜åœ¨ã™ã‚‹æ—¢å­˜ã® [Delta Lake](https://github.com/delta-io/delta) テーブルã¸ã®èª­ã¿å–り専用ã®çµ±åˆã‚’æä¾›ã—ã¾ã™ã€‚ + +## ãƒ†ãƒ¼ãƒ–ãƒ«ä½œæˆ + +Delta Lake テーブルã¯ã™ã§ã« S3 ã«å­˜åœ¨ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯æ–°ã—ã„テーブルを作æˆã™ã‚‹ãŸã‚ã® DDL パラメータをå—ã‘å–ã‚Šã¾ã›ã‚“。 + +``` sql +CREATE TABLE deltalake + ENGINE = DeltaLake(url, [aws_access_key_id, aws_secret_access_key,]) +``` + +**エンジンパラメータ** + +- `url` — 既存㮠Delta Lake テーブルã¸ã®ãƒ‘スをæŒã¤ãƒã‚±ãƒƒãƒˆã® URL。 +- `aws_access_key_id`, `aws_secret_access_key` - [AWS](https://aws.amazon.com/) アカウントユーザーã®é•·æœŸçš„ãªèªè¨¼æƒ…報。ã“れを使用ã—ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’èªè¨¼ã§ãã¾ã™ã€‚ã“ã®ãƒ‘ラメータã¯ã‚ªãƒ—ションã§ã™ã€‚èªè¨¼æƒ…å ±ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +エンジンパラメータã¯ã€[Named Collections](/docs/ja/operations/named-collections.md) を使用ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚ + +**例** + +```sql +CREATE TABLE deltalake ENGINE=DeltaLake('http://mars-doc-test.s3.amazonaws.com/clickhouse-bucket-3/test_table/', 'ABC123', 'Abc+123') +``` + +Named collections を使用ã™ã‚‹ï¼š + +``` xml + + + + http://mars-doc-test.s3.amazonaws.com/clickhouse-bucket-3/ + ABC123 + Abc+123 + + + +``` + +```sql +CREATE TABLE deltalake ENGINE=DeltaLake(deltalake_conf, filename = 'test_table') +``` + +### データキャッシュ {#data-cache} + +`Iceberg` テーブルエンジンãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã¯ã€`S3`ã€`AzureBlobStorage`ã€`HDFS` ストレージã¨åŒæ§˜ã«ãƒ‡ãƒ¼ã‚¿ã‚­ãƒ£ãƒƒã‚·ãƒ³ã‚°ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚[ã“ã¡ã‚‰](../../../engines/table-engines/integrations/s3.md#data-cache)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## å‚ç…§ + +- [deltaLake テーブル関数](../../../sql-reference/table-functions/deltalake.md) diff --git a/docs/ja/engines/table-engines/integrations/embedded-rocksdb.md b/docs/ja/engines/table-engines/integrations/embedded-rocksdb.md new file mode 100644 index 00000000000..cc72c502cd8 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/embedded-rocksdb.md @@ -0,0 +1,222 @@ +--- +slug: /ja/engines/table-engines/integrations/embedded-rocksdb +sidebar_position: 50 +sidebar_label: EmbeddedRocksDB +--- + +import CloudNotSupportedBadge from '@theme/badges/CloudNotSupportedBadge'; + +# EmbeddedRocksDB エンジン + + + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€ClickHouseã‚’[RocksDB](http://rocksdb.org/)ã¨çµ±åˆã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE = EmbeddedRocksDB([ttl, rocksdb_dir, read_only]) PRIMARY KEY(primary_key_name) +[ SETTINGS name=value, ... ] +``` + +エンジンパラメータ: + +- `ttl` - 値ã®æœ‰åŠ¹æœŸé™ï¼ˆTTL)。TTLã¯ç§’å˜ä½ã§æŒ‡å®šã•ã‚Œã¾ã™ã€‚TTLãŒ0ã®å ´åˆã€é€šå¸¸ã®RocksDBインスタンスãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼ˆTTLãªã—)。 +- `rocksdb_dir` - 既存ã®RocksDBã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ãƒ‘スã€ã¾ãŸã¯ä½œæˆã•ã‚ŒãŸRocksDBã®ç›®çš„地ã®ãƒ‘ス。指定ã•ã‚ŒãŸ`rocksdb_dir`ã§ãƒ†ãƒ¼ãƒ–ルをオープンã—ã¾ã™ã€‚ +- `read_only` - `read_only`ãŒtrueã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€èª­ã¿å–り専用モードãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚TTLã®ã‚るストレージã§ã¯ã€æ‰‹å‹•ãŠã‚ˆã³è‡ªå‹•ã„ãšã‚Œã®ã‚³ãƒ³ãƒ‘クションもトリガーã•ã‚Œãªã„ãŸã‚ã€æœŸé™åˆ‡ã‚Œã®ã‚¨ãƒ³ãƒˆãƒªã¯å‰Šé™¤ã•ã‚Œã¾ã›ã‚“。 +- `primary_key_name` – カラムリストã®ä»»æ„ã®ã‚«ãƒ©ãƒ å。 +- `主キー`ã¯å¿…ãšæŒ‡å®šã•ã‚Œã€ä¸€ã¤ã®ã‚«ãƒ©ãƒ ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚主キーã¯ãƒã‚¤ãƒŠãƒªã§`rocksdb key`ã¨ã—ã¦ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œã¾ã™ã€‚ +- 主キー以外ã®ã‚«ãƒ©ãƒ ã¯ã€å¯¾å¿œã™ã‚‹é †åºã§ãƒã‚¤ãƒŠãƒªã§`rocksdb`値ã¨ã—ã¦ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œã¾ã™ã€‚ +- `equals`ã¾ãŸã¯`in`フィルタリングを使用ã—ãŸã‚¯ã‚¨ãƒªã¯ã€`rocksdb`ã‹ã‚‰ã®ãƒžãƒ«ãƒã‚­ãƒ¼æ¤œç´¢ã«æœ€é©åŒ–ã•ã‚Œã¾ã™ã€‚ + +エンジン設定: + +- `optimize_for_bulk_insert` – テーブルã¯ãƒãƒ«ã‚¯ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ï¼ˆã‚¤ãƒ³ã‚µãƒ¼ãƒˆãƒ‘イプラインã¯SSTファイルを作æˆã—ã€memtablesã¸ã®æ›¸ãè¾¼ã¿ã®ä»£ã‚ã‚Šã«rocksdbデータベースã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ã¾ã™ï¼‰ã€‚デフォルト値: `1`。 +- `bulk_insert_block_size` - ãƒãƒ«ã‚¯ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã«ã‚ˆã£ã¦ä½œæˆã•ã‚Œã‚‹SSTファイルã®æœ€å°ã‚µã‚¤ã‚ºï¼ˆè¡Œå˜ä½ï¼‰ï¼›ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤: `1048449`。 + +例: + +``` sql +CREATE TABLE test +( + `key` String, + `v1` UInt32, + `v2` String, + `v3` Float32 +) +ENGINE = EmbeddedRocksDB +PRIMARY KEY key +``` + +## メトリクス + +`system.rocksdb`テーブルも存在ã—ã€rocksdbã®çµ±è¨ˆã‚’公開ã—ã¦ã„ã¾ã™ï¼š + +```sql +SELECT + name, + value +FROM system.rocksdb + +┌─name──────────────────────┬─value─┠+│ no.file.opens │ 1 │ +│ number.block.decompressed │ 1 │ +└───────────────────────────┴───────┘ +``` + +## 設定 + +構æˆã‚’使用ã—ã¦ä»»æ„ã®[rocksdbオプション](https://github.com/facebook/rocksdb/wiki/Option-String-and-Option-Map)を変更ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```xml + + + 8 + + + 2 + + +
+ TABLE + + 8 + + + 2 + +
+ + +``` + +デフォルトã§ç°¡æ˜“近似カウント最é©åŒ–ã¯ã‚ªãƒ•ã«ãªã£ã¦ãŠã‚Šã€`count()`クエリã®ãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æœ€é©åŒ–を有効ã«ã™ã‚‹ã«ã¯ã€`optimize_trivial_approximate_count_query = 1`を設定ã—ã¦ãã ã•ã„。ã¾ãŸã€ã“ã®è¨­å®šã¯EmbeddedRocksDBエンジンã®`system.tables`ã«ã‚‚影響を与ãˆã€`total_rows`ãŠã‚ˆã³`total_bytes`ã®è¿‘似値を表示ã™ã‚‹ãŸã‚ã«è¨­å®šã‚’オンã«ã—ã¦ãã ã•ã„。 + +## 対応æ“作 {#supported-operations} + +### インサート + +æ–°ã—ã„è¡ŒãŒ`EmbeddedRocksDB`ã«æŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€ã‚­ãƒ¼ãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã¯å€¤ãŒæ›´æ–°ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°æ–°ã—ã„キーãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +INSERT INTO test VALUES ('some key', 1, 'value', 3.2); +``` + +### 削除 + +`DELETE`クエリや`TRUNCATE`を使用ã—ã¦è¡Œã‚’削除ã§ãã¾ã™ã€‚ + +```sql +DELETE FROM test WHERE key LIKE 'some%' AND v1 > 1; +``` + +```sql +ALTER TABLE test DELETE WHERE key LIKE 'some%' AND v1 > 1; +``` + +```sql +TRUNCATE TABLE test; +``` + +### æ›´æ–° + +`ALTER TABLE`クエリを使用ã—ã¦å€¤ã‚’æ›´æ–°ã§ãã¾ã™ã€‚主キーã¯æ›´æ–°ã§ãã¾ã›ã‚“。 + +```sql +ALTER TABLE test UPDATE v1 = v1 * 10 + 2 WHERE key LIKE 'some%' AND v3 > 3.1; +``` + +### ジョイン + +EmbeddedRocksDBテーブルã¨ã®ç‰¹åˆ¥ãª`direct`ジョインãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã‚¸ãƒ§ã‚¤ãƒ³ã¯ã€ãƒ¡ãƒ¢ãƒªã«ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルを形æˆã›ãšã€EmbeddedRocksDBã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’直接アクセスã—ã¾ã™ã€‚ + +大è¦æ¨¡ãªã‚¸ãƒ§ã‚¤ãƒ³ã®å ´åˆã€ãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã‚¸ãƒ§ã‚¤ãƒ³ã«ã‚ˆã‚Šãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ãŒå¤§å¹…ã«ä½Žæ¸›ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ãªãœãªã‚‰ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルãŒä½œæˆã•ã‚Œãªã„ã‹ã‚‰ã§ã™ã€‚ + +ダイレクトジョインを有効ã«ã™ã‚‹ã«ã¯ï¼š + +```sql +SET join_algorithm = 'direct, hash' +``` + +:::tip +`join_algorithm`ãŒ`direct, hash`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å¯èƒ½ãªå ´åˆã¯ãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã‚¸ãƒ§ã‚¤ãƒ³ãŒä½¿ç”¨ã•ã‚Œã€ãれ以外ã¯ãƒãƒƒã‚·ãƒ¥ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +#### 例 + +##### EmbeddedRocksDBテーブルを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ï¼š + +```sql +CREATE TABLE rdb +( + `key` UInt32, + `value` Array(UInt32), + `value2` String +) +ENGINE = EmbeddedRocksDB +PRIMARY KEY key +``` + +```sql +INSERT INTO rdb + SELECT + toUInt32(sipHash64(number) % 10) as key, + [key, key+1] as value, + ('val2' || toString(key)) as value2 + FROM numbers_mt(10); +``` + +##### テーブル`t2`を作æˆã—ã€`rdb`テーブルã¨ã‚¸ãƒ§ã‚¤ãƒ³ã™ã‚‹ãŸã‚ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入: + +```sql +CREATE TABLE t2 +( + `k` UInt16 +) +ENGINE = TinyLog +``` + +```sql +INSERT INTO t2 SELECT number AS k +FROM numbers_mt(10) +``` + +##### ジョインアルゴリズムを`direct`ã«è¨­å®šï¼š + +```sql +SET join_algorithm = 'direct' +``` + +##### INNER JOIN: +```sql +SELECT * +FROM +( + SELECT k AS key + FROM t2 +) AS t2 +INNER JOIN rdb ON rdb.key = t2.key +ORDER BY key ASC +``` +```response +┌─key─┬─rdb.key─┬─value──┬─value2─┠+│ 0 │ 0 │ [0,1] │ val20 │ +│ 2 │ 2 │ [2,3] │ val22 │ +│ 3 │ 3 │ [3,4] │ val23 │ +│ 6 │ 6 │ [6,7] │ val26 │ +│ 7 │ 7 │ [7,8] │ val27 │ +│ 8 │ 8 │ [8,9] │ val28 │ +│ 9 │ 9 │ [9,10] │ val29 │ +└─────┴─────────┴────────┴────────┘ +``` + +### ジョインã«é–¢ã™ã‚‹è©³ç´°æƒ…å ± +- [`join_algorithm`設定](/docs/ja/operations/settings/settings.md#join_algorithm) +- [JOINå¥](/docs/ja/sql-reference/statements/select/join.md) diff --git a/docs/ja/engines/table-engines/integrations/hdfs.md b/docs/ja/engines/table-engines/integrations/hdfs.md new file mode 100644 index 00000000000..76eb9a50132 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/hdfs.md @@ -0,0 +1,243 @@ +--- +slug: /ja/engines/table-engines/integrations/hdfs +sidebar_position: 80 +sidebar_label: HDFS +--- + +# HDFS + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€[Apache Hadoop](https://en.wikipedia.org/wiki/Apache_Hadoop) エコシステムã¨ã®çµ±åˆã‚’æä¾›ã—ã€ClickHouseを通ã˜ã¦ [HDFS](https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html) 上ã®ãƒ‡ãƒ¼ã‚¿ã‚’管ç†ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ [File](../../../engines/table-engines/special/file.md#table_engines-file) ã‚„ [URL](../../../engines/table-engines/special/url.md#table_engines-url) エンジンã«ä¼¼ã¦ã„ã¾ã™ãŒã€Hadoop特有ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã¯ClickHouseã®ã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ã«ã‚ˆã‚‹ã‚µãƒãƒ¼ãƒˆå¯¾è±¡ã§ã¯ãªãã€å“質ãŒä¸å®‰å®šã§ã‚ã‚‹ã“ã¨ãŒçŸ¥ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€è‡ªåˆ†ã§ä¿®æ­£ã—ã¦ãƒ—ルリクエストをé€ã£ã¦ãã ã•ã„。 + +## 使用法 {#usage} + +``` sql +ENGINE = HDFS(URI, format) +``` + +**エンジンパラメータ** + +- `URI` - HDFS内ã®å…¨ä½“ã®ãƒ•ã‚¡ã‚¤ãƒ«URI。`URI`ã®ãƒ‘ス部分ã«ã¯ã‚°ãƒ­ãƒ–ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã¯èª­ã¿å–り専用ã«ãªã‚Šã¾ã™ã€‚ +- `format` - 利用å¯èƒ½ãªãƒ•ã‚¡ã‚¤ãƒ«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ã„ãšã‚Œã‹ã‚’指定ã—ã¾ã™ã€‚ +`SELECT` クエリを実行ã™ã‚‹å ´åˆã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯å…¥åŠ›ç”¨ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã€`INSERT` クエリを実行ã™ã‚‹å ´åˆã¯å‡ºåŠ›ç”¨ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚利用å¯èƒ½ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ [Formats](../../../interfaces/formats.md#formats) セクションã«ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +- [PARTITION BY expr] + +### PARTITION BY + +`PARTITION BY` — オプションã§ã™ã€‚ã»ã¨ã‚“ã©ã®å ´åˆã€ãƒ‘ーティションキーã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“ãŒã€å¿…è¦ãªå ´åˆã§ã‚‚通常ã¯æœˆã”ã¨ã«åˆ†ã‘ã‚‹ã»ã©è©³ç´°ãªãƒ‘ーティションキーã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。パーティショニングã¯ã‚¯ã‚¨ãƒªã‚’高速化ã—ã¾ã›ã‚“(ORDER BY å¼ã¨ã¯å¯¾ç…§çš„ã«ï¼‰ã€‚éžå¸¸ã«è©³ç´°ãªãƒ‘ーティショニングã¯é¿ã‘ã¦ãã ã•ã„。クライアントIDã‚„åå‰ã§ãƒ‡ãƒ¼ã‚¿ã‚’パーティション分割ã—ãªã„ã§ãã ã•ã„(代ã‚ã‚Šã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆIDã‚„åå‰ã‚’ORDER BY å¼ã®æœ€åˆã®ã‚«ãƒ©ãƒ ã«ã—ã¾ã™ï¼‰ã€‚ + +月ã”ã¨ã«ãƒ‘ーティションを分ã‘ã‚‹å ´åˆã¯ã€`toYYYYMM(date_column)` å¼ã‚’使用ã—ã¾ã™ã€‚ã“ã“ã§ã€`date_column` 㯠[Date](/docs/ja/sql-reference/data-types/date.md) åž‹ã®æ—¥ä»˜ã‚’æŒã¤ã‚«ãƒ©ãƒ ã§ã™ã€‚ã“ã“ã§ã®ãƒ‘ーティションå㯠`"YYYYMM"` フォーマットã«ãªã‚Šã¾ã™ã€‚ + +**例:** + +**1.** `hdfs_engine_table` テーブルをセットアップ: + +``` sql +CREATE TABLE hdfs_engine_table (name String, value UInt32) ENGINE=HDFS('hdfs://hdfs1:9000/other_storage', 'TSV') +``` + +**2.** ファイルを埋ã‚る: + +``` sql +INSERT INTO hdfs_engine_table VALUES ('one', 1), ('two', 2), ('three', 3) +``` + +**3.** データをクエリ: + +``` sql +SELECT * FROM hdfs_engine_table LIMIT 2 +``` + +``` text +┌─name─┬─value─┠+│ one │ 1 │ +│ two │ 2 │ +└──────┴───────┘ +``` + +## 実装ã®è©³ç´° {#implementation-details} + +- 読ã¿å–ã‚Šã¨æ›¸ãè¾¼ã¿ã¯ä¸¦åˆ—ã§è¡Œã‚れるå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ã‚‚ã®ï¼š + - `ALTER` ãŠã‚ˆã³ `SELECT...SAMPLE` æ“作。 + - インデックス。 + - [ゼロコピー](../../../operations/storing-data.md#zero-copy) レプリケーションã¯å¯èƒ½ã§ã™ãŒã€æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + + :::note + ゼロコピーã®ãƒ¬ãƒ—リケーションã¯æœ¬ç•ªç’°å¢ƒã«ã¯å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“ + ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³22.8以é™ã§ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯æœ¬ç•ªç’°å¢ƒã§ã®ä½¿ç”¨ã‚’推奨ã—ã¾ã›ã‚“。 + ::: + +**パス内ã®ã‚°ãƒ­ãƒ–** + +複数ã®ãƒ‘スコンãƒãƒ¼ãƒãƒ³ãƒˆãŒã‚°ãƒ­ãƒ–ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚処ç†ã•ã‚Œã‚‹ãŸã‚ã«ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã—ã€å…¨ä½“ã®ãƒ‘スパターンã«ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ファイルã®ãƒªã‚¹ãƒˆã¯ `SELECT` 中ã«æ±ºå®šã•ã‚Œã¾ã™ï¼ˆ`CREATE` 時点ã§ã¯ãªã)。 + +- `*` — `/` を除ãä»»æ„ã®æ–‡å­—を空文字列ã¨ã—ã¦å«ã‚ãŸä»»æ„ã®æ•°ã«ç½®ãæ›ãˆã¾ã™ã€‚ +- `?` — ä»»æ„ã®ä¸€æ–‡å­—ã«ç½®ãæ›ãˆã¾ã™ã€‚ +- `{some_string,another_string,yet_another_one}` — 文字列 `'some_string'`, `'another_string'`, `'yet_another_one'` ã®ã„ãšã‚Œã‹ã«ç½®ãæ›ãˆã¾ã™ã€‚ +- `{N..M}` — N ã‹ã‚‰ M ã¾ã§ã®ç¯„囲ã®ä»»æ„ã®æ•°å­—ã«ç½®ãæ›ãˆã¾ã™ï¼ˆä¸¡ç«¯ã‚’å«ã‚€ï¼‰ã€‚ + +`{}`を用ã„ãŸæ§‹æ–‡ã¯ [remote](../../../sql-reference/table-functions/remote.md) テーブル関数ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +**例** + +1. TSVå½¢å¼ã®æ•°ãƒ•ã‚¡ã‚¤ãƒ«ãŒHDFSã«ä»¥ä¸‹ã®URIã§ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ã¨ã—ã¾ã™ï¼š + + - 'hdfs://hdfs1:9000/some_dir/some_file_1' + - 'hdfs://hdfs1:9000/some_dir/some_file_2' + - 'hdfs://hdfs1:9000/some_dir/some_file_3' + - 'hdfs://hdfs1:9000/another_dir/some_file_1' + - 'hdfs://hdfs1:9000/another_dir/some_file_2' + - 'hdfs://hdfs1:9000/another_dir/some_file_3' + +1. ã™ã¹ã¦ã®6ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰æˆã‚‹ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹æ–¹æ³•ã¯ã„ãã¤ã‹ã‚ã‚Šã¾ã™ï¼š + +``` sql +CREATE TABLE table_with_range (name String, value UInt32) ENGINE = HDFS('hdfs://hdfs1:9000/{some,another}_dir/some_file_{1..3}', 'TSV') +``` + +別ã®æ–¹æ³•ï¼š + +``` sql +CREATE TABLE table_with_question_mark (name String, value UInt32) ENGINE = HDFS('hdfs://hdfs1:9000/{some,another}_dir/some_file_?', 'TSV') +``` + +両方ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰æ§‹æˆã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ル(クエリã§è¨˜è¿°ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ã‚¹ã‚­ãƒ¼ãƒžã«é©åˆã™ã‚‹ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ï¼‰ï¼š + +``` sql +CREATE TABLE table_with_asterisk (name String, value UInt32) ENGINE = HDFS('hdfs://hdfs1:9000/{some,another}_dir/*', 'TSV') +``` + +:::note +ファイルã®ãƒªã‚¹ãƒˆãŒå…ˆé ­ã‚¼ãƒ­ä»˜ãã®æ•°å€¤ç¯„囲をå«ã‚€å ´åˆã¯ã€å€‹ã€…ã®æ•°å­—ã«å¯¾ã—ã¦ä¸­æ‹¬å¼§ `{}` を使用ã™ã‚‹ã‹ã€`?` を使用ã—ã¦ãã ã•ã„。 +::: + +**例** + +ファイルå㌠`file000`, `file001`, ... , `file999` ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆï¼š + +``` sql +CREATE TABLE big_table (name String, value UInt32) ENGINE = HDFS('hdfs://hdfs1:9000/big_dir/file{0..9}{0..9}{0..9}', 'CSV') +``` + +## 設定 {#configuration} + +GraphiteMergeTreeã¨åŒæ§˜ã«ã€HDFSエンジンã¯ClickHouseã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ãŸæ‹¡å¼µè¨­å®šã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚使用ã§ãる設定キーã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ï¼ˆ`hdfs`)ã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ¬ãƒ™ãƒ«ï¼ˆ`hdfs_*`)ã®äºŒã¤ã§ã™ã€‚グローãƒãƒ«è¨­å®šãŒæœ€åˆã«é©ç”¨ã•ã‚Œã€æ¬¡ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ¬ãƒ™ãƒ«ã®è¨­å®šãŒé©ç”¨ã•ã‚Œã¾ã™ï¼ˆå­˜åœ¨ã™ã‚‹å ´åˆï¼‰ã€‚ + +``` xml + + + /tmp/keytab/clickhouse.keytab + clickuser@TEST.CLICKHOUSE.TECH + kerberos + + + + + root@TEST.CLICKHOUSE.TECH + +``` + +### 設定オプション {#configuration-options} + +#### libhdfs3ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る設定 {#supported-by-libhdfs3} + +| **パラメータ** | **デフォルト値** | +| - | - | +| rpc\_client\_connect\_tcpnodelay | true | +| dfs\_client\_read\_shortcircuit | true | +| output\_replace-datanode-on-failure | true | +| input\_notretry-another-node | false | +| input\_localread\_mappedfile | true | +| dfs\_client\_use\_legacy\_blockreader\_local | false | +| rpc\_client\_ping\_interval | 10 * 1000 | +| rpc\_client\_connect\_timeout | 600 * 1000 | +| rpc\_client\_read\_timeout | 3600 * 1000 | +| rpc\_client\_write\_timeout | 3600 * 1000 | +| rpc\_client\_socket\_linger\_timeout | -1 | +| rpc\_client\_connect\_retry | 10 | +| rpc\_client\_timeout | 3600 * 1000 | +| dfs\_default\_replica | 3 | +| input\_connect\_timeout | 600 * 1000 | +| input\_read\_timeout | 3600 * 1000 | +| input\_write\_timeout | 3600 * 1000 | +| input\_localread\_default\_buffersize | 1 * 1024 * 1024 | +| dfs\_prefetchsize | 10 | +| input\_read\_getblockinfo\_retry | 3 | +| input\_localread\_blockinfo\_cachesize | 1000 | +| input\_read\_max\_retry | 60 | +| output\_default\_chunksize | 512 | +| output\_default\_packetsize | 64 * 1024 | +| output\_default\_write\_retry | 10 | +| output\_connect\_timeout | 600 * 1000 | +| output\_read\_timeout | 3600 * 1000 | +| output\_write\_timeout | 3600 * 1000 | +| output\_close\_timeout | 3600 * 1000 | +| output\_packetpool\_size | 1024 | +| output\_heartbeat\_interval | 10 * 1000 | +| dfs\_client\_failover\_max\_attempts | 15 | +| dfs\_client\_read\_shortcircuit\_streams\_cache\_size | 256 | +| dfs\_client\_socketcache\_expiryMsec | 3000 | +| dfs\_client\_socketcache\_capacity | 16 | +| dfs\_default\_blocksize | 64 * 1024 * 1024 | +| dfs\_default\_uri | "hdfs://localhost:9000" | +| hadoop\_security\_authentication | "simple" | +| hadoop\_security\_kerberos\_ticket\_cache\_path | "" | +| dfs\_client\_log\_severity | "INFO" | +| dfs\_domain\_socket\_path | "" | + + +[HDFS Configuration Reference](https://hawq.apache.org/docs/userguide/2.3.0.0-incubating/reference/HDFSConfigurationParameterReference.html) ã¯ã„ãã¤ã‹ã®ãƒ‘ラメータを説明ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +#### ClickHouseエクストラ {#clickhouse-extras} + +| **パラメータ** | **デフォルト値** | +| - | - | +|hadoop\_kerberos\_keytab | "" | +|hadoop\_kerberos\_principal | "" | +|libhdfs3\_conf | "" | + +### 制é™äº‹é … {#limitations} +* `hadoop_security_kerberos_ticket_cache_path` ãŠã‚ˆã³ `libhdfs3_conf` ã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã®ã¿ã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼å›ºæœ‰ã«ã¯ã§ãã¾ã›ã‚“ + +## Kerberosサãƒãƒ¼ãƒˆ {#kerberos-support} + +ã‚‚ã— `hadoop_security_authentication` パラメータ㌠`kerberos` ã®å€¤ã‚’æŒã¤ã¨ãã€ClickHouseã¯Kerberosを通ã˜ã¦èªè¨¼ã—ã¾ã™ã€‚ +パラメータ㯠[ã“ã¡ã‚‰](#clickhouse-extras) ã§ã€`hadoop_security_kerberos_ticket_cache_path` ãŒå½¹ç«‹ã¤ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +libhdfs3ã®åˆ¶é™ã«ã‚ˆã‚Šå¤ã„方法ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€ +データノードã®é€šä¿¡ã¯SASLã§ä¿è­·ã•ã‚Œã¦ã„ã¾ã›ã‚“(`HADOOP_SECURE_DN_USER` ã¯ãã®ã‚ˆã†ãªã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚¢ãƒ—ローãƒã®ä¿¡é ¼ã§ãる指標ã§ã™ï¼‰ã€‚`tests/integration/test_storage_kerberized_hdfs/hdfs_configs/bootstrap.sh` ã‚’å‚ç…§ã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +`hadoop_kerberos_keytab`ã€`hadoop_kerberos_principal` ã¾ãŸã¯ `hadoop_security_kerberos_ticket_cache_path` ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€Kerberosèªè¨¼ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®å ´åˆã€`hadoop_kerberos_keytab` 㨠`hadoop_kerberos_principal` ã¯å¿…é ˆã§ã™ã€‚ + +## HDFS Namenode HAサãƒãƒ¼ãƒˆ {#namenode-ha} + +libhdfs3ã¯HDFS namenode HAをサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +- `hdfs-site.xml` ã‚’HDFSノードã‹ã‚‰ `/etc/clickhouse-server/` ã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ +- ClickHouseã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«ä»¥ä¸‹ã®éƒ¨åˆ†ã‚’追加ã—ã¾ã™ï¼š + +``` xml + + /etc/clickhouse-server/hdfs-site.xml + +``` + +- ãã®å¾Œã€HDFS URIã§namenodeアドレスã¨ã—㦠`hdfs-site.xml` ã® `dfs.nameservices` タグ値を使用ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€`hdfs://appadmin@192.168.101.11:8020/abc/` ã‚’ `hdfs://appadmin@my_nameservice/abc/` ã«ç½®ãæ›ãˆã¾ã™ã€‚ + +## 仮想カラム {#virtual-columns} + +- `_path` — ファイルã¸ã®ãƒ‘ス。型:`LowCardinalty(String)`。 +- `_file` — ファイルã®å称。型:`LowCardinalty(String)`。 +- `_size` — ファイルã®ãƒã‚¤ãƒˆå˜ä½ã®ã‚µã‚¤ã‚ºã€‚型:`Nullable(UInt64)`。サイズãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL` ã§ã™ã€‚ +- `_time` — ファイルã®æœ€çµ‚修正時刻。型:`Nullable(DateTime)`。時刻ãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL` ã§ã™ã€‚ + +## ストレージ設定 {#storage-settings} + +- [hdfs_truncate_on_insert](/docs/ja/operations/settings/settings.md#hdfs_truncate_on_insert) - 挿入時ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’切り詰ã‚ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ +- [hdfs_create_new_file_on_insert](/docs/ja/operations/settings/settings.md#hdfs_create_new_file_on_insert) - サフィックスをæŒã¤ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€æŒ¿å…¥ã”ã¨ã«æ–°ã—ã„ファイルを作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ +- [hdfs_skip_empty_files](/docs/ja/operations/settings/settings.md#hdfs_skip_empty_files) - 読ã¿å–り時ã«ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +**関連項目** + +- [仮想カラム](../../../engines/table-engines/index.md#table_engines-virtual_columns) diff --git a/docs/ja/engines/table-engines/integrations/hive.md b/docs/ja/engines/table-engines/integrations/hive.md new file mode 100644 index 00000000000..8b27537d45e --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/hive.md @@ -0,0 +1,408 @@ +--- +slug: /ja/engines/table-engines/integrations/hive +sidebar_position: 84 +sidebar_label: Hive +--- + +# Hive + +Hiveエンジンã¯ã€HDFS Hiveテーブルã«å¯¾ã™ã‚‹`SELECT`クエリを実行ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ç¾åœ¨ã€ä»¥ä¸‹ã®å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +- Text: `binary`を除ãã€å˜ç´”ãªã‚¹ã‚«ãƒ©ãƒ¼ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã®ã¿ã‚’サãƒãƒ¼ãƒˆ + +- ORC: `char`を除ãã€å˜ç´”ãªã‚¹ã‚«ãƒ©ãƒ¼ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—をサãƒãƒ¼ãƒˆã€‚`array`ã®ã‚ˆã†ãªè¤‡é›‘ãªã‚¿ã‚¤ãƒ—ã®ã¿ã‚’サãƒãƒ¼ãƒˆ + +- Parquet: ã™ã¹ã¦ã®å˜ç´”ãªã‚¹ã‚«ãƒ©ãƒ¼ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—をサãƒãƒ¼ãƒˆã€‚`array`ã®ã‚ˆã†ãªè¤‡é›‘ãªã‚¿ã‚¤ãƒ—ã®ã¿ã‚’サãƒãƒ¼ãƒˆ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [ALIAS expr1], + name2 [type2] [ALIAS expr2], + ... +) ENGINE = Hive('thrift://host:port', 'database', 'table'); +PARTITION BY expr +``` +[CREATE TABLE](../../../sql-reference/statements/create/table.md#create-table-query)クエリã®è©³ç´°ãªèª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +テーブル構造ã¯ã€å…ƒã®Hiveテーブル構造ã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼š +- カラムåã¯å…ƒã®Hiveテーブルã¨åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“ãŒã€ã“れらã®ã‚«ãƒ©ãƒ ã®ä¸€éƒ¨ã®ã¿ã‚’ä»»æ„ã®é †åºã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã€ä»–ã®ã‚«ãƒ©ãƒ ã‚’å…ƒã«è¨ˆç®—ã•ã‚ŒãŸã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚«ãƒ©ãƒ ã‚’使用ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ +- カラムタイプã¯ã€å…ƒã®Hiveテーブルã®ã‚‚ã®ã¨åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +- パーティションキーã®è¡¨ç¾ã¯ã€å…ƒã®Hiveテーブルã¨ä¸€è‡´ã•ã›ã‚‹å¿…è¦ãŒã‚ã‚Šã€ãƒ‘ーティションキーã®è¡¨ç¾ã«å«ã¾ã‚Œã‚‹ã‚«ãƒ©ãƒ ã¯ãƒ†ãƒ¼ãƒ–ル構造内ã«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**エンジンパラメータ** + +- `thrift://host:port` — Hiveメタストアã®ã‚¢ãƒ‰ãƒ¬ã‚¹ + +- `database` — リモートデータベースå。 + +- `table` — リモートテーブルå。 + +## 使用例 {#usage-example} + +### HDFSファイルシステム用ã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã™ã‚‹æ–¹æ³• +リモートファイルシステム用ã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’有効ã«ã™ã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚ベンãƒãƒžãƒ¼ã‚¯ã§ã¯ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã™ã‚‹ã¨ç´„2å€é€Ÿããªã‚Šã¾ã™ã€‚ + +キャッシュを使用ã™ã‚‹å‰ã«ã€`config.xml`ã«ä»¥ä¸‹ã‚’追加ã—ã¦ãã ã•ã„。 +``` xml + + true + local_cache + 559096952 + 1048576 + +``` + +- enable: trueã®å ´åˆã€ClickHouseã¯èµ·å‹•å¾Œã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ (HDFS)用ã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’維æŒã—ã¾ã™ã€‚ +- root_dir: 必須。リモートファイルシステム用ã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿å­˜ã™ã‚‹ãƒ«ãƒ¼ãƒˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã€‚ +- limit_size: 必須。ローカルキャッシュファイルã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ +- bytes_read_before_flush: リモートファイルシステムã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンロードã™ã‚‹éš›ã«ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹å‰ã®ãƒã‚¤ãƒˆé‡ã‚’制御ã—ã¾ã™ã€‚デフォルト値ã¯1MBã§ã™ã€‚ + +ClickHouseãŒãƒªãƒ¢ãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ç”¨ã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒæœ‰åŠ¹ã§èµ·å‹•ã•ã‚Œã¦ã„ã‚‹å ´åˆã§ã‚‚ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚¯ã‚¨ãƒªã§`settings use_local_cache_for_remote_storage = 0`を使用ã—ã¦ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ãªã„ã“ã¨ã‚’é¸æŠžã§ãã¾ã™ã€‚デフォルトã§`use_local_cache_for_remote_storage`ã¯`1`ã§ã™ã€‚ + +### ORC入力フォーマットã§Hiveテーブルを照会 + +#### Hiveã§ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ +``` text +hive > CREATE TABLE `test`.`test_orc`( + `f_tinyint` tinyint, + `f_smallint` smallint, + `f_int` int, + `f_integer` int, + `f_bigint` bigint, + `f_float` float, + `f_double` double, + `f_decimal` decimal(10,0), + `f_timestamp` timestamp, + `f_date` date, + `f_string` string, + `f_varchar` varchar(100), + `f_bool` boolean, + `f_binary` binary, + `f_array_int` array, + `f_array_string` array, + `f_array_float` array, + `f_array_array_int` array>, + `f_array_array_string` array>, + `f_array_array_float` array>) +PARTITIONED BY ( + `day` string) +ROW FORMAT SERDE + 'org.apache.hadoop.hive.ql.io.orc.OrcSerde' +STORED AS INPUTFORMAT + 'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat' +OUTPUTFORMAT + 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat' +LOCATION + 'hdfs://testcluster/data/hive/test.db/test_orc' + +OK +Time taken: 0.51 seconds + +hive > insert into test.test_orc partition(day='2021-09-18') select 1, 2, 3, 4, 5, 6.11, 7.22, 8.333, current_timestamp(), current_date(), 'hello world', 'hello world', 'hello world', true, 'hello world', array(1, 2, 3), array('hello world', 'hello world'), array(float(1.1), float(1.2)), array(array(1, 2), array(3, 4)), array(array('a', 'b'), array('c', 'd')), array(array(float(1.11), float(2.22)), array(float(3.33), float(4.44))); +OK +Time taken: 36.025 seconds + +hive > select * from test.test_orc; +OK +1 2 3 4 5 6.11 7.22 8 2021-11-05 12:38:16.314 2021-11-05 hello world hello world hello world true hello world [1,2,3] ["hello world","hello world"] [1.1,1.2] [[1,2],[3,4]] [["a","b"],["c","d"]] [[1.11,2.22],[3.33,4.44]] 2021-09-18 +Time taken: 0.295 seconds, Fetched: 1 row(s) +``` + +#### ClickHouseã§ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ +上記ã§ä½œæˆã—ãŸHiveテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ClickHouseã®ãƒ†ãƒ¼ãƒ–ル: +``` sql +CREATE TABLE test.test_orc +( + `f_tinyint` Int8, + `f_smallint` Int16, + `f_int` Int32, + `f_integer` Int32, + `f_bigint` Int64, + `f_float` Float32, + `f_double` Float64, + `f_decimal` Float64, + `f_timestamp` DateTime, + `f_date` Date, + `f_string` String, + `f_varchar` String, + `f_bool` Bool, + `f_binary` String, + `f_array_int` Array(Int32), + `f_array_string` Array(String), + `f_array_float` Array(Float32), + `f_array_array_int` Array(Array(Int32)), + `f_array_array_string` Array(Array(String)), + `f_array_array_float` Array(Array(Float32)), + `day` String +) +ENGINE = Hive('thrift://202.168.117.26:9083', 'test', 'test_orc') +PARTITION BY day +``` + +``` sql +SELECT * FROM test.test_orc settings input_format_orc_allow_missing_columns = 1\G +``` + +``` text +SELECT * +FROM test.test_orc +SETTINGS input_format_orc_allow_missing_columns = 1 + +Query id: c3eaffdc-78ab-43cd-96a4-4acc5b480658 + +Row 1: +────── +f_tinyint: 1 +f_smallint: 2 +f_int: 3 +f_integer: 4 +f_bigint: 5 +f_float: 6.11 +f_double: 7.22 +f_decimal: 8 +f_timestamp: 2021-12-04 04:00:44 +f_date: 2021-12-03 +f_string: hello world +f_varchar: hello world +f_bool: true +f_binary: hello world +f_array_int: [1,2,3] +f_array_string: ['hello world','hello world'] +f_array_float: [1.1,1.2] +f_array_array_int: [[1,2],[3,4]] +f_array_array_string: [['a','b'],['c','d']] +f_array_array_float: [[1.11,2.22],[3.33,4.44]] +day: 2021-09-18 + +1 rows in set. Elapsed: 0.078 sec. +``` + +### Parquet入力フォーマットã§Hiveテーブルを照会 + +#### Hiveã§ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ +``` text +hive > +CREATE TABLE `test`.`test_parquet`( + `f_tinyint` tinyint, + `f_smallint` smallint, + `f_int` int, + `f_integer` int, + `f_bigint` bigint, + `f_float` float, + `f_double` double, + `f_decimal` decimal(10,0), + `f_timestamp` timestamp, + `f_date` date, + `f_string` string, + `f_varchar` varchar(100), + `f_char` char(100), + `f_bool` boolean, + `f_binary` binary, + `f_array_int` array, + `f_array_string` array, + `f_array_float` array, + `f_array_array_int` array>, + `f_array_array_string` array>, + `f_array_array_float` array>) +PARTITIONED BY ( + `day` string) +ROW FORMAT SERDE + 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe' +STORED AS INPUTFORMAT + 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat' +OUTPUTFORMAT + 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat' +LOCATION + 'hdfs://testcluster/data/hive/test.db/test_parquet' +OK +Time taken: 0.51 seconds + +hive > insert into test.test_parquet partition(day='2021-09-18') select 1, 2, 3, 4, 5, 6.11, 7.22, 8.333, current_timestamp(), current_date(), 'hello world', 'hello world', 'hello world', true, 'hello world', array(1, 2, 3), array('hello world', 'hello world'), array(float(1.1), float(1.2)), array(array(1, 2), array(3, 4)), array(array('a', 'b'), array('c', 'd')), array(array(float(1.11), float(2.22)), array(float(3.33), float(4.44))); +OK +Time taken: 36.025 seconds + +hive > select * from test.test_parquet; +OK +1 2 3 4 5 6.11 7.22 8 2021-12-14 17:54:56.743 2021-12-14 hello world hello world hello world true hello world [1,2,3] ["hello world","hello world"] [1.1,1.2] [[1,2],[3,4]] [["a","b"],["c","d"]] [[1.11,2.22],[3.33,4.44]] 2021-09-18 +Time taken: 0.766 seconds, Fetched: 1 row(s) +``` + +#### ClickHouseã§ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ +上記ã§ä½œæˆã—ãŸHiveテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ClickHouseã®ãƒ†ãƒ¼ãƒ–ル: +``` sql +CREATE TABLE test.test_parquet +( + `f_tinyint` Int8, + `f_smallint` Int16, + `f_int` Int32, + `f_integer` Int32, + `f_bigint` Int64, + `f_float` Float32, + `f_double` Float64, + `f_decimal` Float64, + `f_timestamp` DateTime, + `f_date` Date, + `f_string` String, + `f_varchar` String, + `f_char` String, + `f_bool` Bool, + `f_binary` String, + `f_array_int` Array(Int32), + `f_array_string` Array(String), + `f_array_float` Array(Float32), + `f_array_array_int` Array(Array(Int32)), + `f_array_array_string` Array(Array(String)), + `f_array_array_float` Array(Array(Float32)), + `day` String +) +ENGINE = Hive('thrift://localhost:9083', 'test', 'test_parquet') +PARTITION BY day +``` + +``` sql +SELECT * FROM test.test_parquet settings input_format_parquet_allow_missing_columns = 1\G +``` + +``` text +SELECT * +FROM test_parquet +SETTINGS input_format_parquet_allow_missing_columns = 1 + +Query id: 4e35cf02-c7b2-430d-9b81-16f438e5fca9 + +Row 1: +────── +f_tinyint: 1 +f_smallint: 2 +f_int: 3 +f_integer: 4 +f_bigint: 5 +f_float: 6.11 +f_double: 7.22 +f_decimal: 8 +f_timestamp: 2021-12-14 17:54:56 +f_date: 2021-12-14 +f_string: hello world +f_varchar: hello world +f_char: hello world +f_bool: true +f_binary: hello world +f_array_int: [1,2,3] +f_array_string: ['hello world','hello world'] +f_array_float: [1.1,1.2] +f_array_array_int: [[1,2],[3,4]] +f_array_array_string: [['a','b'],['c','d']] +f_array_array_float: [[1.11,2.22],[3.33,4.44]] +day: 2021-09-18 + +1 rows in set. Elapsed: 0.357 sec. +``` + +### Text入力フォーマットã§Hiveテーブルを照会 +#### Hiveã§ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ +``` text +hive > +CREATE TABLE `test`.`test_text`( + `f_tinyint` tinyint, + `f_smallint` smallint, + `f_int` int, + `f_integer` int, + `f_bigint` bigint, + `f_float` float, + `f_double` double, + `f_decimal` decimal(10,0), + `f_timestamp` timestamp, + `f_date` date, + `f_string` string, + `f_varchar` varchar(100), + `f_char` char(100), + `f_bool` boolean, + `f_binary` binary, + `f_array_int` array, + `f_array_string` array, + `f_array_float` array, + `f_array_array_int` array>, + `f_array_array_string` array>, + `f_array_array_float` array>) +PARTITIONED BY ( + `day` string) +ROW FORMAT SERDE + 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' +STORED AS INPUTFORMAT + 'org.apache.hadoop.mapred.TextInputFormat' +OUTPUTFORMAT + 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' +LOCATION + 'hdfs://testcluster/data/hive/test.db/test_text' +Time taken: 0.1 seconds, Fetched: 34 row(s) + +hive > insert into test.test_text partition(day='2021-09-18') select 1, 2, 3, 4, 5, 6.11, 7.22, 8.333, current_timestamp(), current_date(), 'hello world', 'hello world', 'hello world', true, 'hello world', array(1, 2, 3), array('hello world', 'hello world'), array(float(1.1), float(1.2)), array(array(1, 2), array(3, 4)), array(array('a', 'b'), array('c', 'd')), array(array(float(1.11), float(2.22)), array(float(3.33), float(4.44))); +OK +Time taken: 36.025 seconds + +hive > select * from test.test_text; +OK +1 2 3 4 5 6.11 7.22 8 2021-12-14 18:11:17.239 2021-12-14 hello world hello world hello world true hello world [1,2,3] ["hello world","hello world"] [1.1,1.2] [[1,2],[3,4]] [["a","b"],["c","d"]] [[1.11,2.22],[3.33,4.44]] 2021-09-18 +Time taken: 0.624 seconds, Fetched: 1 row(s) +``` + +#### ClickHouseã§ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ + +上記ã§ä½œæˆã—ãŸHiveテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ClickHouseã®ãƒ†ãƒ¼ãƒ–ル: +``` sql +CREATE TABLE test.test_text +( + `f_tinyint` Int8, + `f_smallint` Int16, + `f_int` Int32, + `f_integer` Int32, + `f_bigint` Int64, + `f_float` Float32, + `f_double` Float64, + `f_decimal` Float64, + `f_timestamp` DateTime, + `f_date` Date, + `f_string` String, + `f_varchar` String, + `f_char` String, + `f_bool` Bool, + `day` String +) +ENGINE = Hive('thrift://localhost:9083', 'test', 'test_text') +PARTITION BY day +``` + +``` sql +SELECT * FROM test.test_text settings input_format_skip_unknown_fields = 1, input_format_with_names_use_header = 1, date_time_input_format = 'best_effort'\G +``` + +``` text +SELECT * +FROM test.test_text +SETTINGS input_format_skip_unknown_fields = 1, input_format_with_names_use_header = 1, date_time_input_format = 'best_effort' + +Query id: 55b79d35-56de-45b9-8be6-57282fbf1f44 + +Row 1: +────── +f_tinyint: 1 +f_smallint: 2 +f_int: 3 +f_integer: 4 +f_bigint: 5 +f_float: 6.11 +f_double: 7.22 +f_decimal: 8 +f_timestamp: 2021-12-14 18:11:17 +f_date: 2021-12-14 +f_string: hello world +f_varchar: hello world +f_char: hello world +f_bool: true +day: 2021-09-18 +``` + + diff --git a/docs/ja/engines/table-engines/integrations/hudi.md b/docs/ja/engines/table-engines/integrations/hudi.md new file mode 100644 index 00000000000..d8c4d02f375 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/hudi.md @@ -0,0 +1,53 @@ +--- +slug: /ja/engines/table-engines/integrations/hudi +sidebar_position: 86 +sidebar_label: Hudi +--- + +# Hudi テーブルエンジン + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€Amazon S3 ã«å­˜åœ¨ã™ã‚‹ Apache [Hudi](https://hudi.apache.org/) テーブルã¨ã®èª­ã¿å–り専用ã®çµ±åˆæ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ + +Hudi テーブルã¯ã™ã§ã« S3 ã«å­˜åœ¨ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯æ–°ã—ã„テーブルを作æˆã™ã‚‹ãŸã‚ã® DDL パラメータをå—ã‘å–ã‚Šã¾ã›ã‚“。 + +``` sql +CREATE TABLE hudi_table + ENGINE = Hudi(url, [aws_access_key_id, aws_secret_access_key,]) +``` + +**エンジンパラメータ** + +- `url` — 既存㮠Hudi テーブルã¸ã®ãƒ‘スをå«ã‚€ãƒã‚±ãƒƒãƒˆã® URL。 +- `aws_access_key_id`, `aws_secret_access_key` - [AWS](https://aws.amazon.com/) アカウントユーザーã®ãŸã‚ã®é•·æœŸè³‡æ ¼æƒ…報。ã“れを使用ã—ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’èªè¨¼ã§ãã¾ã™ã€‚ã“ã®ãƒ‘ラメータã¯ã‚ªãƒ—ションã§ã™ã€‚資格情報ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +エンジンパラメータ㯠[Named Collections](/docs/ja/operations/named-collections.md) を使用ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚ + +**例** + +```sql +CREATE TABLE hudi_table ENGINE=Hudi('http://mars-doc-test.s3.amazonaws.com/clickhouse-bucket-3/test_table/', 'ABC123', 'Abc+123') +``` + +Named Collections を使用ã™ã‚‹å ´åˆ: + +``` xml + + + + http://mars-doc-test.s3.amazonaws.com/clickhouse-bucket-3/ + ABC123 + Abc+123 + + + +``` + +```sql +CREATE TABLE hudi_table ENGINE=Hudi(hudi_conf, filename = 'test_table') +``` + +## å‚ç…§ + +- [hudi テーブル関数](/docs/ja/sql-reference/table-functions/hudi.md) diff --git a/docs/ja/engines/table-engines/integrations/iceberg.md b/docs/ja/engines/table-engines/integrations/iceberg.md new file mode 100644 index 00000000000..632a94e6360 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/iceberg.md @@ -0,0 +1,70 @@ +--- +slug: /ja/engines/table-engines/integrations/iceberg +sidebar_position: 90 +sidebar_label: Iceberg +--- + +# Iceberg テーブルエンジン + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€Amazon S3ã€Azureã€HDFS ãã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ã«ä¿å­˜ã•ã‚ŒãŸ Apache [Iceberg](https://iceberg.apache.org/) テーブルã¨æ—¢å­˜ã®ãƒ†ãƒ¼ãƒ–ルã¸ã®èª­ã¿å–り専用ã®çµ±åˆã‚’æä¾›ã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ + +Iceberg テーブルã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«ã™ã§ã«å­˜åœ¨ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€æ–°ã—ã„テーブルを作æˆã™ã‚‹ãŸã‚ã®DDLパラメータをå—ã‘å–ã‚Šã¾ã›ã‚“。 + +``` sql +CREATE TABLE iceberg_table_s3 + ENGINE = IcebergS3(url, [, NOSIGN | access_key_id, secret_access_key, [session_token]], format, [,compression]) + +CREATE TABLE iceberg_table_azure + ENGINE = IcebergAzure(connection_string|storage_account_url, container_name, blobpath, [account_name, account_key, format, compression]) + +CREATE TABLE iceberg_table_hdfs + ENGINE = IcebergHDFS(path_to_table, [,format] [,compression_method]) + +CREATE TABLE iceberg_table_local + ENGINE = IcebergLocal(path_to_table, [,format] [,compression_method]) +``` + +**エンジンã®å¼•æ•°** + +引数ã®èª¬æ˜Žã¯ã€`S3`ã€`AzureBlobStorage`ã€`HDFS` ãã—㦠`File` ã®å„エンジンã®å¼•æ•°èª¬æ˜Žã¨ä¸€è‡´ã—ã¾ã™ã€‚ +`format` ã¯ã€Iceberg テーブル内ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã®å½¢å¼ã‚’表ã—ã¾ã™ã€‚ + +エンジンパラメータã¯ã€[Named Collections](../../../operations/named-collections.md) を使用ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚ + +**例** + +```sql +CREATE TABLE iceberg_table ENGINE=IcebergS3('http://test.s3.amazonaws.com/clickhouse-bucket/test_table', 'test', 'test') +``` + +Named Collectionsを使用: + +``` xml + + + + http://test.s3.amazonaws.com/clickhouse-bucket/ + test + test + + + +``` + +```sql +CREATE TABLE iceberg_table ENGINE=IcebergS3(iceberg_conf, filename = 'test_table') +``` + +**エイリアス** + +テーブルエンジン `Iceberg` ã¯ç¾åœ¨ `IcebergS3` ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã™ã€‚ + +### データキャッシュ {#data-cache} + +`Iceberg` テーブルエンジンãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã¯ã€`S3`ã€`AzureBlobStorage`ã€`HDFS` ストレージã¨åŒæ§˜ã«ãƒ‡ãƒ¼ã‚¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](../../../engines/table-engines/integrations/s3.md#data-cache)ã‚’ã”覧ãã ã•ã„。 + +## å‚ç…§ + +- [Iceberg テーブル関数](/docs/ja/sql-reference/table-functions/iceberg.md) diff --git a/docs/ja/engines/table-engines/integrations/index.md b/docs/ja/engines/table-engines/integrations/index.md new file mode 100644 index 00000000000..dd3964b530f --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/index.md @@ -0,0 +1,9 @@ +--- +slug: /ja/engines/table-engines/integrations/ +sidebar_position: 40 +sidebar_label: インテグレーション +--- + +# インテグレーション用テーブルエンジン + +ClickHouseã¯ã€å¤–部システムã¨ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®ãŸã‚ã«ã€ã•ã¾ã–ã¾ãªæ‰‹æ®µã‚’æä¾›ã—ã¦ãŠã‚Šã€ãã®ä¸­ã«ã¯ãƒ†ãƒ¼ãƒ–ルエンジンもå«ã¾ã‚Œã¾ã™ã€‚ ä»–ã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルエンジンã¨åŒæ§˜ã«ã€è¨­å®šã¯ `CREATE TABLE` ã¾ãŸã¯ `ALTER TABLE` クエリを用ã„ã¦è¡Œã„ã¾ã™ã€‚ ユーザーã®è¦³ç‚¹ã‹ã‚‰è¦‹ã‚‹ã¨ã€è¨­å®šã•ã‚ŒãŸã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã¯é€šå¸¸ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚ˆã†ã«è¦‹ãˆã¾ã™ãŒã€ãã®ã‚¯ã‚¨ãƒªã¯å¤–部システムã«ãƒ—ロキシã•ã‚Œã¾ã™ã€‚ã“ã®é€éŽçš„ãªã‚¯ã‚¨ãƒªã¯ã€Dictionaryやテーブル関数ã®ã‚ˆã†ãªä»£æ›¿ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³æ–¹æ³•ã«å¯¾ã™ã‚‹å¤§ããªåˆ©ç‚¹ã®ä¸€ã¤ã§ã€å„使用時ã«ã‚«ã‚¹ã‚¿ãƒ ã‚¯ã‚¨ãƒªãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã›ã‚“。 diff --git a/docs/ja/engines/table-engines/integrations/jdbc.md b/docs/ja/engines/table-engines/integrations/jdbc.md new file mode 100644 index 00000000000..8806bbe8ada --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/jdbc.md @@ -0,0 +1,99 @@ +--- +slug: /ja/engines/table-engines/integrations/jdbc +sidebar_position: 100 +sidebar_label: JDBC +--- + +# JDBC + +:::note +clickhouse-jdbc-bridgeã«ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªã‚³ãƒ¼ãƒ‰ãŒå«ã¾ã‚Œã¦ãŠã‚Šã€ã‚‚ã¯ã‚„サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。信頼性ã®å•é¡Œã‚„セキュリティã®è„†å¼±æ€§ã‚’å«ã‚€å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚使用ã™ã‚‹éš›ã¯è‡ªå·±è²¬ä»»ã§ãŠé¡˜ã„ã—ã¾ã™ã€‚ +ClickHouseã§ã¯ã€Postgresã€MySQLã€MongoDBãªã©ã®ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ãªã‚¯ã‚¨ãƒªã‚·ãƒŠãƒªã‚ªã«å¯¾ã™ã‚‹ã‚ˆã‚Šè‰¯ã„代替手段をæä¾›ã™ã‚‹ClickHouseã«å†…蔵ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル関数を使用ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¦ã„ã¾ã™ã€‚ +::: + +ClickHouseãŒå¤–部データベースã«[**JDBC**](https://en.wikipedia.org/wiki/Java_Database_Connectivity)経由ã§æŽ¥ç¶šã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +JDBC接続を実装ã™ã‚‹ãŸã‚ã«ã€ClickHouseã¯ãƒ‡ãƒ¼ãƒ¢ãƒ³ã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹åˆ¥å€‹ã®ãƒ—ログラム[clickhouse-jdbc-bridge](https://github.com/ClickHouse/clickhouse-jdbc-bridge)を使用ã—ã¾ã™ã€‚ + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯[Nullable](../../../sql-reference/data-types/nullable.md)データ型をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name +( + columns list... +) +ENGINE = JDBC(datasource_uri, external_database, external_table) +``` + +**エンジンパラメータ** + + +- `datasource_uri` — 外部DBMSã®URIã¾ãŸã¯åå‰ã€‚ + + URIå½¢å¼: `jdbc:://:/?user=&password=`。 + MySQLã®ä¾‹: `jdbc:mysql://localhost:3306/?user=root&password=root`。 + +- `external_database` — 外部DBMSã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚ + +- `external_table` — `external_database`内ã®ãƒ†ãƒ¼ãƒ–ルåã€ã¾ãŸã¯`select * from table1 where column1=1`ã®ã‚ˆã†ãªselect クエリ。 + +## 使用例 {#usage-example} + +MySQLサーãƒãƒ¼ã®ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ç›´æŽ¥æŽ¥ç¶šã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™: + +``` text +mysql> CREATE TABLE `test`.`test` ( + -> `int_id` INT NOT NULL AUTO_INCREMENT, + -> `int_nullable` INT NULL DEFAULT NULL, + -> `float` FLOAT NOT NULL, + -> `float_nullable` FLOAT NULL DEFAULT NULL, + -> PRIMARY KEY (`int_id`)); +Query OK, 0 rows affected (0,09 sec) + +mysql> insert into test (`int_id`, `float`) VALUES (1,2); +Query OK, 1 row affected (0,00 sec) + +mysql> select * from test; ++------+----------+-----+----------+ +| int_id | int_nullable | float | float_nullable | ++------+----------+-----+----------+ +| 1 | NULL | 2 | NULL | ++------+----------+-----+----------+ +1 row in set (0,00 sec) +``` + +ClickHouseサーãƒãƒ¼ã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—データをé¸æŠžã—ã¾ã™: + +``` sql +CREATE TABLE jdbc_table +( + `int_id` Int32, + `int_nullable` Nullable(Int32), + `float` Float32, + `float_nullable` Nullable(Float32) +) +ENGINE JDBC('jdbc:mysql://localhost:3306/?user=root&password=root', 'test', 'test') +``` + +``` sql +SELECT * +FROM jdbc_table +``` + +``` text +┌─int_id─┬─int_nullable─┬─float─┬─float_nullable─┠+│ 1 │ á´ºáµá´¸á´¸ │ 2 │ á´ºáµá´¸á´¸ │ +└────────┴──────────────┴───────┴────────────────┘ +``` + +``` sql +INSERT INTO jdbc_table(`int_id`, `float`) +SELECT toInt32(number), toFloat32(number * 1.0) +FROM system.numbers +``` + +## 関連項目 {#see-also} + +- [JDBCテーブル関数](../../../sql-reference/table-functions/jdbc.md)。 diff --git a/docs/ja/engines/table-engines/integrations/kafka.md b/docs/ja/engines/table-engines/integrations/kafka.md new file mode 100644 index 00000000000..2d8b581f625 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/kafka.md @@ -0,0 +1,295 @@ +--- +slug: /ja/engines/table-engines/integrations/kafka +sidebar_position: 110 +sidebar_label: Kafka +--- + +# Kafka + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ [Apache Kafka](http://kafka.apache.org/) ã¨é€£æºã—ã¾ã™ã€‚ + +Kafkaã®åˆ©ç‚¹: + +- データフローã®ç™ºè¡Œã‚„購読ãŒå¯èƒ½ã§ã™ã€‚ +- フォールトトレラントãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’æ•´ç†ã§ãã¾ã™ã€‚ +- ストリームを利用å¯èƒ½ã«ã—ãŸæ™‚点ã§å‡¦ç†ã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [ALIAS expr1], + name2 [type2] [ALIAS expr2], + ... +) ENGINE = Kafka() +SETTINGS + kafka_broker_list = 'host:port', + kafka_topic_list = 'topic1,topic2,...', + kafka_group_name = 'group_name', + kafka_format = 'data_format'[,] + [kafka_schema = '',] + [kafka_num_consumers = N,] + [kafka_max_block_size = 0,] + [kafka_skip_broken_messages = N,] + [kafka_commit_every_batch = 0,] + [kafka_client_id = '',] + [kafka_poll_timeout_ms = 0,] + [kafka_poll_max_batch_size = 0,] + [kafka_flush_interval_ms = 0,] + [kafka_thread_per_consumer = 0,] + [kafka_handle_error_mode = 'default',] + [kafka_commit_on_select = false,] + [kafka_max_rows_per_message = 1]; +``` + +必須パラメータ: + +- `kafka_broker_list` — ブローカーã®ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šãƒªã‚¹ãƒˆ (例: `localhost:9092`)。 +- `kafka_topic_list` — Kafka トピックã®ãƒªã‚¹ãƒˆã€‚ +- `kafka_group_name` — Kafka コンシューマã®ã‚°ãƒ«ãƒ¼ãƒ—。å„グループã®èª­ã¿å–り範囲ã¯åˆ¥ã€…ã«è¿½è·¡ã•ã‚Œã¾ã™ã€‚クラスタ内ã§ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒé‡è¤‡ã—ãªã„よã†ã«ã™ã‚‹å ´åˆã€ã™ã¹ã¦ã®å ´æ‰€ã§åŒã˜ã‚°ãƒ«ãƒ¼ãƒ—åを使用ã—ã¾ã™ã€‚ +- `kafka_format` — メッセージフォーマット。SQL ã® `FORMAT` 関数ã¨åŒã˜è¨˜æ³•ãŒä½¿ç”¨ã•ã‚Œã€ä¾‹ãˆã° `JSONEachRow` ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚詳細㯠[Formats](../../../interfaces/formats.md) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +オプションパラメータ: + +- `kafka_schema` — フォーマットãŒã‚¹ã‚­ãƒ¼ãƒžå®šç¾©ã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‘ラメータ。例ãˆã° [Cap’n Proto](https://capnproto.org/) ã§ã¯ã€ã‚¹ã‚­ãƒ¼ãƒžãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘スã¨ãƒ«ãƒ¼ãƒˆ `schema.capnp:Message` オブジェクトã®åå‰ãŒå¿…è¦ã§ã™ã€‚ +- `kafka_num_consumers` — テーブルã‚ãŸã‚Šã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžæ•°ã€‚1 ã¤ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã®ã‚¹ãƒ«ãƒ¼ãƒ—ットãŒä¸å分ãªå ´åˆã¯ã€ã•ã‚‰ã«ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã‚’指定ã—ã¾ã™ã€‚トピックã®ãƒ‘ーティション数を超ãˆãªã„æ•°ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚1 ã¤ã®ãƒ‘ーティションã«ã¯ 1 ã¤ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã—ã‹å‰²ã‚Šå½“ã¦ã‚‰ã‚Œãšã€ClickHouse ãŒãƒ‡ãƒ—ロイã•ã‚ŒãŸã‚µãƒ¼ãƒãƒ¼ä¸Šã®ç‰©ç†ã‚³ã‚¢æ•°ã‚’超ãˆã¦ã¯ã„ã‘ã¾ã›ã‚“。デフォルト: `1`。 +- `kafka_max_block_size` — ãƒãƒ¼ãƒªãƒ³ã‚°ã®æœ€å¤§ãƒãƒƒãƒã‚µã‚¤ã‚º(メッセージå˜ä½)。デフォルト: [max_insert_block_size](../../../operations/settings/settings.md#max_insert_block_size)。 +- `kafka_skip_broken_messages` — Kafka メッセージã®ãƒ‘ーサãŒãƒ–ロックã”ã¨ã«ã‚¹ã‚­ãƒ¼ãƒžã¨äº’æ›æ€§ã®ãªã„メッセージを許容ã™ã‚‹ã‹ã©ã†ã‹ã€‚`kafka_skip_broken_messages = N` ã®å ´åˆã€ãƒ‘ーサã§è§£æžã§ããªã„ *N* ã® Kafka メッセージ(メッセージã¯ãƒ‡ãƒ¼ã‚¿ã®1è¡Œã«ç›¸å½“)をスキップã—ã¾ã™ã€‚デフォルト: `0`。 +- `kafka_commit_every_batch` — 全ブロックã«æ›¸ãè¾¼ã¿å¾Œã®å˜ä¸€ã‚³ãƒŸãƒƒãƒˆã§ã¯ãªãã€æ¶ˆè²»ãŠã‚ˆã³å‡¦ç†ã•ã‚ŒãŸå„ãƒãƒƒãƒã‚’コミットã—ã¾ã™ã€‚デフォルト: `0`。 +- `kafka_client_id` — クライアント識別å­ã€‚デフォルトã¯ç©ºã§ã™ã€‚ +- `kafka_poll_timeout_ms` — Kafka ã‹ã‚‰ã®å˜ä¸€ãƒãƒ¼ãƒ«ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚デフォルト: [stream_poll_timeout_ms](../../../operations/settings/settings.md#stream_poll_timeout_ms)。 +- `kafka_poll_max_batch_size` — å˜ä¸€ã® Kafka ãƒãƒ¼ãƒ«ã§ãƒãƒ¼ãƒªãƒ³ã‚°ã•ã‚Œã‚‹æœ€å¤§ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸é‡ã€‚デフォルト: [max_block_size](../../../operations/settings/settings.md#setting-max_block_size)。 +- `kafka_flush_interval_ms` — Kafka ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚デフォルト: [stream_flush_interval_ms](../../../operations/settings/settings.md#stream-flush-interval-ms)。 +- `kafka_thread_per_consumer` — å„コンシューマã«ç‹¬ç«‹ã—ãŸã‚¹ãƒ¬ãƒƒãƒ‰ã‚’æä¾›ã—ã¾ã™ã€‚有効ã«ã™ã‚‹ã¨ã€å„コンシューマã¯ãƒ‡ãƒ¼ã‚¿ã‚’独立ã—ã¦ã€ä¸¦è¡Œã—ã¦ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ï¼ˆãã†ã§ãªã„å ´åˆã¯ã€è¤‡æ•°ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã‹ã‚‰ã®è¡ŒãŒé›†ç´„ã•ã‚Œã¦1ブロックを形æˆã—ã¾ã™ï¼‰ã€‚デフォルト: `0`。 +- `kafka_handle_error_mode` — Kafka エンジンã®ã‚¨ãƒ©ãƒ¼ã‚’ã©ã®ã‚ˆã†ã«å¯¾å‡¦ã™ã‚‹ã‹ã‚’指定ã—ã¾ã™ã€‚å¯èƒ½ãªå€¤: デフォルト(メッセージã®è§£æžã«å¤±æ•—ã—ãŸå ´åˆã«ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã‚‹ï¼‰ã€ã‚¹ãƒˆãƒªãƒ¼ãƒ ï¼ˆä¾‹å¤–メッセージã¨æœªåŠ å·¥ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒä»®æƒ³ã‚«ãƒ©ãƒ  `_error` åŠã³ `_raw_message` ã«ä¿å­˜ã•ã‚Œã¾ã™ï¼‰ã€‚ +- `kafka_commit_on_select` — Select クエリãŒå®Ÿè¡Œã•ã‚ŒãŸã¨ãã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’コミットã—ã¾ã™ã€‚デフォルト: `false`。 +- `kafka_max_rows_per_message` — 行ベースã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆç”¨ã® 1 ã¤ã® Kafka メッセージã«æ›¸ãè¾¼ã¾ã‚Œã‚‹æœ€å¤§è¡Œæ•°ã€‚デフォルト : `1`。 + +例: + +``` sql + CREATE TABLE queue ( + timestamp UInt64, + level String, + message String + ) ENGINE = Kafka('localhost:9092', 'topic', 'group1', 'JSONEachRow'); + + SELECT * FROM queue LIMIT 5; + + CREATE TABLE queue2 ( + timestamp UInt64, + level String, + message String + ) ENGINE = Kafka SETTINGS kafka_broker_list = 'localhost:9092', + kafka_topic_list = 'topic', + kafka_group_name = 'group1', + kafka_format = 'JSONEachRow', + kafka_num_consumers = 4; + + CREATE TABLE queue3 ( + timestamp UInt64, + level String, + message String + ) ENGINE = Kafka('localhost:9092', 'topic', 'group1') + SETTINGS kafka_format = 'JSONEachRow', + kafka_num_consumers = 4; +``` + +
+ +éžæŽ¨å¥¨ã®ãƒ†ãƒ¼ãƒ–ル作æˆãƒ¡ã‚½ãƒƒãƒ‰ + +:::note +æ–°ã—ã„プロジェクトã§ã¯ã“ã®æ–¹æ³•ã‚’使用ã—ãªã„ã§ãã ã•ã„。å¯èƒ½ã§ã‚ã‚Œã°ã€ä¸Šã§èª¬æ˜Žã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã«æ—§ãƒ—ロジェクトを切り替ãˆã¦ãã ã•ã„。 +::: + +``` sql +Kafka(kafka_broker_list, kafka_topic_list, kafka_group_name, kafka_format + [, kafka_row_delimiter, kafka_schema, kafka_num_consumers, kafka_max_block_size, kafka_skip_broken_messages, kafka_commit_every_batch, kafka_client_id, kafka_poll_timeout_ms, kafka_poll_max_batch_size, kafka_flush_interval_ms, kafka_thread_per_consumer, kafka_handle_error_mode, kafka_commit_on_select, kafka_max_rows_per_message]); +``` + +
+ +:::info +Kafkaテーブルエンジンã¯[デフォルト値](../../../sql-reference/statements/create/table.md#default_value)ã‚’æŒã¤ã‚«ãƒ©ãƒ ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。デフォルト値をæŒã¤ã‚«ãƒ©ãƒ ãŒå¿…è¦ãªå ´åˆã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®ãƒ¬ãƒ™ãƒ«ã§è¿½åŠ ã§ãã¾ã™ï¼ˆä¸‹è¨˜å‚照)。 +::: + +## 説明 {#description} + +æä¾›ã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯è‡ªå‹•çš„ã«è¿½è·¡ã•ã‚Œã€ã‚°ãƒ«ãƒ¼ãƒ—内ã®å„メッセージã¯1回ã®ã¿ã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã™ã€‚データを2回å–å¾—ã—ãŸã„å ´åˆã¯ã€åˆ¥ã®ã‚°ãƒ«ãƒ¼ãƒ—åã§ãƒ†ãƒ¼ãƒ–ルã®ã‚³ãƒ”ーを作æˆã—ã¾ã™ã€‚ + +グループã¯æŸ”軟ã§ã‚¯ãƒ©ã‚¹ã‚¿å†…ã§åŒæœŸã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€10ã®ãƒˆãƒ”ックã¨ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚³ãƒ”ーãŒ5ã¤ã‚ã‚‹å ´åˆã€ãã‚Œãžã‚Œã®ã‚³ãƒ”ーã¯2ã¤ã®ãƒˆãƒ”ックをå–å¾—ã—ã¾ã™ã€‚コピーã®æ•°ãŒå¤‰ã‚ã‚‹ã¨ã€ãƒˆãƒ”ックã¯è‡ªå‹•çš„ã«ã‚³ãƒ”ー間ã§å†é…ä¿¡ã•ã‚Œã¾ã™ã€‚詳細㯠http://kafka.apache.org/intro ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +`SELECT` ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®èª­ã¿å–ã‚Šã«ã¯ç‰¹ã«æœ‰ç”¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“(デãƒãƒƒã‚°ã‚’除ã)ãªãœãªã‚‰å„メッセージã¯ä¸€åº¦ã®ã¿èª­ã¿å–れるã‹ã‚‰ã§ã™ã€‚実際ã«ã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを使用ã—ã¦ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’作æˆã™ã‚‹æ–¹ãŒå®Ÿç”¨çš„ã§ã™ã€‚以下ã®æ‰‹é †ã§è¡Œã„ã¾ã™: + +1. エンジンを使用ã—㦠Kafka コンシューマを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒªãƒ¼ãƒ ã¨è¦‹ãªã—ã¾ã™ã€‚ +2. 所望ã®æ§‹é€ ã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ +3. データをエンジンã‹ã‚‰å¤‰æ›ã—ã€ä»¥å‰ã«ä½œæˆã—ãŸãƒ†ãƒ¼ãƒ–ルã«æŠ•å…¥ã™ã‚‹ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを作æˆã—ã¾ã™ã€‚ + +`MATERIALIZED VIEW` ãŒã‚¨ãƒ³ã‚¸ãƒ³ã«æŽ¥ç¶šã•ã‚Œã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ãƒ¼ã‚¿ã®åŽé›†ãŒå§‹ã¾ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€Kafkaã‹ã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’継続的ã«å—ä¿¡ã—〠`SELECT` を使用ã—ã¦å¿…è¦ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¤‰æ›ã§ãã¾ã™ã€‚ +1ã¤ã®Kafkaテーブルã«ã¯ã€å¥½ããªã ã‘多ãã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューをæŒã¤ã“ã¨ãŒã§ãã€ãれらã¯kafkaテーブルã‹ã‚‰ç›´æŽ¥ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã®ã§ã¯ãªãã€æ–°ã—ã„レコード(ブロックå˜ä½ï¼‰ã‚’å—ä¿¡ã—ã¾ã™ã€‚ã“ã®æ–¹æ³•ã§ã€ç•°ãªã‚‹è©³ç´°ãƒ¬ãƒ™ãƒ«ï¼ˆé›†ç´„ã‚り・ãªã—)ã®è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルã«æ›¸ã込むã“ã¨ãŒã§ãã¾ã™ã€‚ + +例: + +``` sql + CREATE TABLE queue ( + timestamp UInt64, + level String, + message String + ) ENGINE = Kafka('localhost:9092', 'topic', 'group1', 'JSONEachRow'); + + CREATE TABLE daily ( + day Date, + level String, + total UInt64 + ) ENGINE = SummingMergeTree(day, (day, level), 8192); + + CREATE MATERIALIZED VIEW consumer TO daily + AS SELECT toDate(toDateTime(timestamp)) AS day, level, count() as total + FROM queue GROUP BY day, level; + + SELECT level, sum(total) FROM daily GROUP BY level; +``` +パフォーマンスをå‘上ã•ã›ã‚‹ãŸã‚ã«ã€å—ä¿¡ã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ [max_insert_block_size](../../../operations/settings/settings.md#max_insert_block_size) ã®ã‚µã‚¤ã‚ºã®ãƒ–ロックã«ã¾ã¨ã‚られã¾ã™ã€‚ブロックãŒ[stream_flush_interval_ms](../../../operations/settings/settings.md/#stream-flush-interval-ms)ミリ秒以内ã«å½¢æˆã•ã‚Œãªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ–ロックãŒå®Œå…¨ã§ã‚ã‚‹ã‹ã©ã†ã‹ã«é–¢ä¿‚ãªãテーブルã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ + +トピックデータã®å—ä¿¡ã‚’åœæ­¢ã™ã‚‹ã‹ã€å¤‰æ›ãƒ­ã‚¸ãƒƒã‚¯ã‚’変更ã™ã‚‹ã«ã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューをデタッãƒã—ã¾ã™: + +``` sql + DETACH TABLE consumer; + ATTACH TABLE consumer; +``` + +`ALTER` を使用ã—ã¦ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルを変更ã—ãŸã„å ´åˆã¯ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã¨ãƒ“ューã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿é–“ã®ä¸ä¸€è‡´ã‚’é¿ã‘ã‚‹ãŸã‚ã«ãƒžãƒ†ãƒªã‚¢ãƒ«ãƒ“ューを無効ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## 設定 {#configuration} + +GraphiteMergeTree ã¨åŒæ§˜ã«ã€Kafka エンジン㯠ClickHouse ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ãŸæ‹¡å¼µè¨­å®šã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚使用ã§ãる設定キーã¯2ã¤ã‚ã‚Šã¾ã™: グローãƒãƒ«ï¼ˆ`` 以下)㨠トピックレベル(`` 以下)。最åˆã«ã‚°ãƒ­ãƒ¼ãƒãƒ«è¨­å®šãŒé©ç”¨ã•ã‚Œã€ãã®å¾Œã«ãƒˆãƒ”ックレベルã®è¨­å®šãŒé©ç”¨ã•ã‚Œã¾ã™ï¼ˆå­˜åœ¨ã™ã‚‹å ´åˆï¼‰ã€‚ + +``` xml + + + cgrp + 3000 + + + logs + 4000 + + + + + smallest + + logs + 100000 + + + + stats + 50000 + + + + + + + logs + 250 + + + + stats + 400 + + + +``` + +å¯èƒ½ãªè¨­å®šã‚ªãƒ—ションã®ãƒªã‚¹ãƒˆã«ã¤ã„ã¦ã¯ã€[librdkafka configuration reference](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。ClickHouse 設定ã§ã¯ã€ãƒ‰ãƒƒãƒˆ (`_`) ã®ä»£ã‚ã‚Šã«ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ (`_`) を使用ã—ã¾ã™ã€‚例ãˆã°ã€`check.crcs=true` 㯠`true` ã¨ãªã‚Šã¾ã™ã€‚ + +### Kerberos サãƒãƒ¼ãƒˆ {#kafka-kerberos-support} + +Kerberosã‚’èªè­˜ã™ã‚‹Kafkaを扱ã†ã«ã¯ã€`security_protocol` ã®å­è¦ç´ ã¨ã—㦠`sasl_plaintext` ã®å€¤ã‚’追加ã—ã¾ã™ã€‚Kerberosãƒã‚±ãƒƒãƒˆãŒOSã«ã‚ˆã£ã¦å–å¾—ã•ã‚Œã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¦ã„ã‚‹é™ã‚Šã€ãã‚Œã§å分ã§ã™ã€‚ +ClickHouse 㯠keytab ファイルを使用ã—ã¦Kerberos 資格情報を管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`sasl_kerberos_service_name`ã€`sasl_kerberos_keytab`ã€`sasl_kerberos_principal` ã®å­è¦ç´ ã‚’考慮ã—ã¦ãã ã•ã„。 + +例: + +``` xml + + + SASL_PLAINTEXT + /home/kafkauser/kafkauser.keytab + kafkauser/kafkahost@EXAMPLE.COM + +``` + +## 仮想カラム {#virtual-columns} + +- `_topic` — Kafka トピック。データ型: `LowCardinality(String)`。 +- `_key` — メッセージã®ã‚­ãƒ¼ã€‚データ型: `String`。 +- `_offset` — メッセージã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã€‚データ型: `UInt64`。 +- `_timestamp` — メッセージã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。データ型: `Nullable(DateTime)`。 +- `_timestamp_ms` — メッセージã®ãƒŸãƒªç§’å˜ä½ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。データ型: `Nullable(DateTime64(3))`。 +- `_partition` — Kafka トピックã®ãƒ‘ーティション。データ型: `UInt64`。 +- `_headers.name` — メッセージã®ãƒ˜ãƒƒãƒ€ã‚­ãƒ¼ã®é…列。データ型: `Array(String)`。 +- `_headers.value` — メッセージã®ãƒ˜ãƒƒãƒ€å€¤ã®é…列。データ型: `Array(String)`。 + +`kafka_handle_error_mode='stream'` ã®å ´åˆã®è¿½åŠ ä»®æƒ³ã‚«ãƒ©ãƒ : + +- `_raw_message` - 解æžã«å¤±æ•—ã—ãŸç”Ÿãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€‚データ型: `String`。 +- `_error` - 解æžå¤±æ•—時ã®ä¾‹å¤–メッセージ。データ型: `String`。 + +注æ„: `_raw_message` 㨠`_error` ã®ä»®æƒ³ã‚«ãƒ©ãƒ ã¯ã€è§£æžä¸­ã®ä¾‹å¤–ã®å ´åˆã«ã®ã¿å…¥åŠ›ã•ã‚Œã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒæ­£å¸¸ã«è§£æžã•ã‚ŒãŸå ´åˆã¯å¸¸ã«ç©ºã§ã™ã€‚ + +## データフォーマットã®ã‚µãƒãƒ¼ãƒˆ {#data-formats-support} + +Kafka エンジンã¯ã€ClickHouse ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ã™ã¹ã¦ã® [フォーマット](../../../interfaces/formats.md) をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +1ã¤ã® Kafka メッセージ内ã®è¡Œæ•°ã¯ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒè¡Œãƒ™ãƒ¼ã‚¹ã‹ãƒ–ロックベースã‹ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ + +- 行ベースã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€1ã¤ã® Kafka メッセージ内ã®è¡Œæ•°ã¯ `kafka_max_rows_per_message` 設定ã«ã‚ˆã£ã¦åˆ¶å¾¡ã§ãã¾ã™ã€‚ +- ブロックベースã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€ãƒ–ロックをå°ã•ãªéƒ¨åˆ†ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€1ã¤ã®ãƒ–ロック内ã®è¡Œæ•°ã¯ä¸€èˆ¬è¨­å®š [max_block_size](../../../operations/settings/settings.md#setting-max_block_size) ã«ã‚ˆã£ã¦åˆ¶å¾¡ã§ãã¾ã™ã€‚ + +## コミット済ã¿ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’ClickHouse Keeperã«æ ¼ç´ã™ã‚‹ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã‚¨ãƒ³ã‚¸ãƒ³ {#experimental-kafka-keeper} + +`allow_experimental_kafka_offsets_storage_in_keeper` ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ä»¥ä¸‹ã®2ã¤ã®è¨­å®šã‚’ Kafka テーブルエンジンã«æŒ‡å®šã§ãã¾ã™: + - `kafka_keeper_path` 㯠ClickHouse Keeper ã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒ‘スを指定ã—ã¾ã™ã€‚ + - `kafka_replica_name` 㯠ClickHouse Keeper 内ã®ãƒ¬ãƒ—リカåを指定ã—ã¾ã™ã€‚ + +ã“れらã®è¨­å®šã¯ã„ãšã‚Œã‚‚å˜ç‹¬ã§æŒ‡å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。両方ã®è¨­å®šãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€æ–°ã—ã„エクスペリメンタル㪠Kafka エンジンãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®æ–°ã—ã„エンジンã¯ã€è¨­å®šæ¸ˆã¿ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’Kafkaã«ä¿å­˜ã™ã‚‹ã“ã¨ã«ã¯ä¾å­˜ã›ãšã€ClickHouse Keeperã«ãれらをä¿å­˜ã—ã¾ã™ã€‚ãŸã ã—ã€Kafkaã¸ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚³ãƒŸãƒƒãƒˆã¯ã¾ã è©¦ã¿ã‚‰ã‚Œã¾ã™ãŒã€ãƒ†ãƒ¼ãƒ–ルãŒä½œæˆã•ã‚Œã‚‹éš›ã«ã®ã¿ãれらã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã«ä¾å­˜ã—ã¾ã™ã€‚ãã®ä»–ã®çŠ¶æ³ï¼ˆãƒ†ãƒ¼ãƒ–ルã®å†èµ·å‹•ã¾ãŸã¯ã‚¨ãƒ©ãƒ¼å¾Œã®å¾©æ—§ï¼‰ã§ã¯ã€ClickHouse Keeperã«ä¿å­˜ã•ã‚ŒãŸã‚ªãƒ•ã‚»ãƒƒãƒˆãŒãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ¶ˆè²»ã‚’続ã‘ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚コミット済ã¿ã‚ªãƒ•ã‚»ãƒƒãƒˆã«åŠ ãˆã¦ã€æœ€å¾Œã®ãƒãƒƒãƒã§æ¶ˆè²»ã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æ•°ã‚‚ä¿å­˜ã•ã‚Œã€æŒ¿å…¥ã«å¤±æ•—ã—ãŸå ´åˆã€åŒã˜ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æ•°ãŒæ¶ˆè²»ã•ã‚Œã‚‹ãŸã‚ã€å¿…è¦ã«å¿œã˜ã¦é‡è¤‡é™¤åŽ»ãŒå¯èƒ½ã§ã™ã€‚ + +例: + +``` sql +CREATE TABLE experimental_kafka (key UInt64, value UInt64) +ENGINE = Kafka('localhost:19092', 'my-topic', 'my-consumer', 'JSONEachRow') +SETTINGS + kafka_keeper_path = '/clickhouse/{database}/experimental_kafka', + kafka_replica_name = 'r1' +SETTINGS allow_experimental_kafka_offsets_storage_in_keeper=1; +``` + +ã¾ãŸã¯ã€`uuid` 㨠`replica` マクロを ReplicatedMergeTree ã¨åŒæ§˜ã«åˆ©ç”¨ã™ã‚‹ã«ã¯: + +``` sql +CREATE TABLE experimental_kafka (key UInt64, value UInt64) +ENGINE = Kafka('localhost:19092', 'my-topic', 'my-consumer', 'JSONEachRow') +SETTINGS + kafka_keeper_path = '/clickhouse/{database}/{uuid}', + kafka_replica_name = '{replica}' +SETTINGS allow_experimental_kafka_offsets_storage_in_keeper=1; +``` + +### 既知ã®åˆ¶é™ + +æ–°ã—ã„エンジンã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã§ã‚ã‚Šã€ã¾ã æœ¬ç•ªä½¿ç”¨ã«ã¯é©ã—ã¦ã„ã¾ã›ã‚“。ã„ãã¤ã‹ã®æ—¢çŸ¥ã®åˆ¶é™ãŒã‚ã‚Šã¾ã™: + - 最大ã®åˆ¶é™ç‚¹ã¯ã€ã‚¨ãƒ³ã‚¸ãƒ³ãŒç›´æŽ¥èª­ã¿å–りをサãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ã“ã¨ã§ã™ã€‚マテリアライズドビューを使用ã—ãŸã‚¨ãƒ³ã‚¸ãƒ³ã‹ã‚‰ã®èª­ã¿å–ã‚Šã¨ã‚¨ãƒ³ã‚¸ãƒ³ã¸ã®æ›¸ãè¾¼ã¿ã¯å‹•ä½œã—ã¾ã™ãŒã€ç›´æŽ¥èª­ã¿å–ã‚Šã¯å‹•ä½œã—ã¾ã›ã‚“。ãã®çµæžœã€ã™ã¹ã¦ã®ç›´æŽ¥ `SELECT` クエリã¯å¤±æ•—ã—ã¾ã™ã€‚ + - テーブルã®æ€¥é€Ÿãªå‰Šé™¤ã¨å†ä½œæˆã€ã¾ãŸã¯ç•°ãªã‚‹ã‚¨ãƒ³ã‚¸ãƒ³ã«åŒã˜ ClickHouse Keeper パスを指定ã™ã‚‹ã“ã¨ã¯ã€å•é¡Œã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚パスã®è¡çªã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€`kafka_keeper_path` ã« `{uuid}` を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + - ç¹°ã‚Šè¿”ã—å¯èƒ½ãªèª­ã¿å–ã‚Šã‚’è¡Œã†ãŸã‚ã«ã¯ã€1 ã¤ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§è¤‡æ•°ã®ãƒ‘ーティションã‹ã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’消費ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 一方ã§ã€Kafka コンシューマã¯å®šæœŸçš„ã«ãƒãƒ¼ãƒªãƒ³ã‚°ã—ã¦ç”Ÿã‹ã—ã¦ãŠãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れら2ã¤ã®ç›®çš„を満ãŸã™ãŸã‚ã«ã€`kafka_thread_per_consumer` ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã«ã®ã¿è¤‡æ•°ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã‚’作æˆã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã€ãã†ã§ãªã‘ã‚Œã°å®šæœŸçš„ã«ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã‚’ãƒãƒ¼ãƒªãƒ³ã‚°ã™ã‚‹ã“ã¨ã«é–¢ã—ã¦å•é¡Œã‚’回é¿ã™ã‚‹ã®ãŒé›£ã—ã™ãŽã¾ã™ã€‚ + - æ–°ã—ã„ストレージエンジンã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã¯ã€[`system.kafka_consumers`](../../../operations/system-tables/kafka_consumers.md) テーブルã«è¡¨ç¤ºã•ã‚Œã¾ã›ã‚“。 + +**関連情報** + +- [仮想カラム](../../../engines/table-engines/index.md#table_engines-virtual_columns) +- [background_message_broker_schedule_pool_size](../../../operations/server-configuration-parameters/settings.md#background_message_broker_schedule_pool_size) +- [system.kafka_consumers](../../../operations/system-tables/kafka_consumers.md) diff --git a/docs/ja/engines/table-engines/integrations/materialized-postgresql.md b/docs/ja/engines/table-engines/integrations/materialized-postgresql.md new file mode 100644 index 00000000000..11d013cf564 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/materialized-postgresql.md @@ -0,0 +1,66 @@ +--- +slug: /ja/engines/table-engines/integrations/materialized-postgresql +sidebar_position: 130 +sidebar_label: MaterializedPostgreSQL +--- + +# [エクスペリメンタル] MaterializedPostgreSQL + +PostgreSQL テーブルã®åˆæœŸãƒ‡ãƒ¼ã‚¿ãƒ€ãƒ³ãƒ—を作æˆã—ã€ãƒ¬ãƒ—リケーションプロセスを開始ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒªãƒ¢ãƒ¼ãƒˆã® PostgreSQL データベース内㮠PostgreSQL テーブルã§ç™ºç”Ÿã—ãŸæ–°ã—ã„変更をé€æ¬¡é©ç”¨ã™ã‚‹ãŸã‚ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¸ãƒ§ãƒ–を実行ã—ã¾ã™ã€‚ + +:::note +ã“ã®ãƒ†ãƒ¼ãƒ–ルエンジンã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã§ã™ã€‚使用ã™ã‚‹ã«ã¯ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ `SET` コマンドを使用ã—㦠`allow_experimental_materialized_postgresql_table` ã‚’ 1 ã«è¨­å®šã—ã¾ã™: +```sql +SET allow_experimental_materialized_postgresql_table=1 +``` +::: + +複数ã®ãƒ†ãƒ¼ãƒ–ルãŒå¿…è¦ãªå ´åˆã¯ã€ãƒ†ãƒ¼ãƒ–ルエンジンã§ã¯ãªã[MaterializedPostgreSQL](../../../engines/database-engines/materialized-postgresql.md) データベースエンジンを使用ã—ã€ãƒ¬ãƒ—リケートã™ã‚‹ãƒ†ãƒ¼ãƒ–ルを指定ã™ã‚‹ `materialized_postgresql_tables_list` 設定(データベース`スキーマ`も追加å¯èƒ½ã«ãªã‚Šã¾ã™ï¼‰ã‚’使用ã™ã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€CPU ã®è¦³ç‚¹ã§éžå¸¸ã«å„ªã‚Œã€ãƒªãƒ¢ãƒ¼ãƒˆ PostgreSQL データベース内ã®æŽ¥ç¶šæ•°ã¨ãƒ¬ãƒ—リケーションスロットãŒå°‘ãªãã¦æ¸ˆã¿ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE postgresql_db.postgresql_replica (key UInt64, value UInt64) +ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgresql_table', 'postgres_user', 'postgres_password') +PRIMARY KEY key; +``` + +**エンジンパラメータ** + +- `host:port` — PostgreSQL サーãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ +- `database` — リモートデータベースå。 +- `table` — リモートテーブルå。 +- `user` — PostgreSQL ユーザー。 +- `password` — ユーザーパスワード。 + +## è¦ä»¶ {#requirements} + +1. PostgreSQL ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§ã€[wal_level](https://www.postgresql.org/docs/current/runtime-config-wal.html) 設定㯠`logical` ã€`max_replication_slots` パラメータã¯å°‘ãªãã¨ã‚‚ `2` ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +2. `MaterializedPostgreSQL` エンジンをæŒã¤ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€PostgreSQL テーブルã®ãƒ¬ãƒ—リカアイデンティティインデックス(デフォルトã§ã¯ä¸»ã‚­ãƒ¼ã€[レプリカアイデンティティインデックスã®è©³ç´°ã¯ã“ã¡ã‚‰](../../../engines/database-engines/materialized-postgresql.md#requirements))ã¨åŒã˜ä¸»ã‚­ãƒ¼ãŒå¿…è¦ã§ã™ã€‚ + +3. データベース[Atomic](https://en.wikipedia.org/wiki/Atomicity_(database_systems)) ã®ã¿ãŒè¨±å¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +4. `MaterializedPostgreSQL` テーブルエンジンã¯ã€PostgreSQL ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒ >= 11 ã§ã®ã¿å‹•ä½œã—ã¾ã™ã€‚ã“ã‚Œã¯ã€[pg_replication_slot_advance](https://pgpedia.info/p/pg_replication_slot_advance.html) PostgreSQL 関数を必è¦ã¨ã™ã‚‹ãŸã‚ã§ã™ã€‚ + +## ãƒãƒ¼ãƒãƒ£ãƒ«ã‚«ãƒ©ãƒ  {#virtual-columns} + +- `_version` — トランザクションカウンター。タイプ: [UInt64](../../../sql-reference/data-types/int-uint.md)。 + +- `_sign` — 削除マーク。タイプ: [Int8](../../../sql-reference/data-types/int-uint.md)。å¯èƒ½ãªå€¤: + - `1` — è¡Œã¯å‰Šé™¤ã•ã‚Œã¦ã„ã¾ã›ã‚“〠+ - `-1` — è¡Œã¯å‰Šé™¤ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“れらã®ã‚«ãƒ©ãƒ ã¯ãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã«è¿½åŠ ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。`SELECT` クエリã§å¸¸ã«ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ã€‚`_version` カラム㯠`WAL` ã® `LSN` ä½ç½®ã«ç­‰ã—ã„ã®ã§ã€ãƒ¬ãƒ—リケーションã®æœ€æ–°çŠ¶æ…‹ã‚’確èªã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +``` sql +CREATE TABLE postgresql_db.postgresql_replica (key UInt64, value UInt64) +ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgresql_replica', 'postgres_user', 'postgres_password') +PRIMARY KEY key; + +SELECT key, value, _version FROM postgresql_db.postgresql_replica; +``` + +:::note +[**TOAST**](https://www.postgresql.org/docs/9.5/storage-toast.html) 値ã®ãƒ¬ãƒ—リケーションã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。データ型ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +::: diff --git a/docs/ja/engines/table-engines/integrations/mongodb.md b/docs/ja/engines/table-engines/integrations/mongodb.md new file mode 100644 index 00000000000..05a5b7e02ce --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/mongodb.md @@ -0,0 +1,181 @@ +--- +slug: /ja/engines/table-engines/integrations/mongodb +sidebar_position: 135 +sidebar_label: MongoDB +--- + +# MongoDB + +MongoDB エンジンã¯ãƒªãƒ¢ãƒ¼ãƒˆ [MongoDB](https://www.mongodb.com/) コレクションã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã®èª­ã¿å–り専用テーブルエンジンã§ã™ã€‚ + +MongoDB v3.6+ サーãƒãƒ¼ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +[シードリスト(`mongodb+srv`)](https://www.mongodb.com/docs/manual/reference/glossary/#std-term-seed-list)ã¯ã¾ã ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +:::note +トラブルãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€å•é¡Œã‚’報告ã—ã€[従æ¥ã®å®Ÿè£…](../../../operations/server-configuration-parameters/settings.md#use_legacy_mongodb_integration)を試ã—ã¦ã¿ã¦ãã ã•ã„。ãŸã ã—ã€ã“ã‚Œã¯éžæŽ¨å¥¨ã§ã‚ã‚Šã€æ¬¡ã®ãƒªãƒªãƒ¼ã‚¹ã§å‰Šé™¤ã•ã‚Œã‚‹äºˆå®šã§ã™ã®ã§ã”注æ„ãã ã•ã„。 +::: + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name +( + name1 [type1], + name2 [type2], + ... +) ENGINE = MongoDB(host:port, database, collection, user, password [, options]); +``` + +**エンジンパラメータ** + +- `host:port` — MongoDB サーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ + +- `database` — リモートデータベースå。 + +- `collection` — リモートコレクションå。 + +- `user` — MongoDB ユーザー。 + +- `password` — ユーザーパスワード。 + +- `options` — MongoDB 接続文字列オプション(çœç•¥å¯èƒ½ãªãƒ‘ラメータ)。 + +:::tip +MongoDB Atlas クラウドæä¾›ã®æŽ¥ç¶š URL 㯠'Atlas SQL' オプションã‹ã‚‰å–å¾—ã§ãã¾ã™ã€‚シードリスト(`mongodb**+srv**`)ã¯ã¾ã ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§è¿½åŠ ã•ã‚Œã‚‹äºˆå®šã§ã™ã€‚ +::: + +ã¾ãŸã€URI ã‚’ç°¡å˜ã«æ¸¡ã™ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +``` sql +ENGINE = MongoDB(uri, collection); +``` + +**エンジンパラメータ** + +- `uri` — MongoDB サーãƒãƒ¼ã®æŽ¥ç¶š URI + +- `collection` — リモートコレクションå。 + +## åž‹ã®ãƒžãƒƒãƒ”ング + +| MongoDB | ClickHouse | +|--------------------|-----------------------------------------------------------------------| +| bool, int32, int64 | *ä»»æ„ã®æ•°å€¤åž‹*, String | +| double | Float64, String | +| date | Date, Date32, DateTime, DateTime64, String | +| string | String, UUID | +| document | String(as JSON) | +| array | Array, String(as JSON) | +| oid | String | +| binary | カラムã«ã‚ã‚‹å ´åˆã¯ Stringã€é…列やドキュメントã«ã‚ã‚‹å ´åˆã¯ base64 エンコードã•ã‚ŒãŸ String| +| *ãã®ä»–* | String | + +キー㌠MongoDB ドキュメントã«å­˜åœ¨ã—ãªã„å ´åˆï¼ˆä¾‹ãˆã°ã€ã‚«ãƒ©ãƒ åãŒä¸€è‡´ã—ãªã„å ´åˆï¼‰ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¾ãŸã¯ `NULL`(カラム㌠nullable ã®å ´åˆï¼‰ãŒæŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹å¥ + +å˜ç´”ãªå¼ã®ã‚¯ã‚¨ãƒªã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼ˆä¾‹ï¼š`WHERE field = ORDER BY field2 LIMIT `)。ã“ã†ã—ãŸå¼ã¯ MongoDB クエリ言語ã«å¤‰æ›ã•ã‚Œã€ã‚µãƒ¼ãƒãƒ¼å´ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +ã“れらã®åˆ¶é™ã‚’ã™ã¹ã¦ç„¡åŠ¹ã«ã—ãŸã„å ´åˆã¯ã€[mongodb_throw_on_unsupported_query](../../../operations/settings/settings.md#mongodb_throw_on_unsupported_query)を使用ã—ã¦ãã ã•ã„。ãã®å ´åˆã€ClickHouse ã¯ãƒ™ã‚¹ãƒˆã‚¨ãƒ•ã‚©ãƒ¼ãƒˆã§ã‚¯ã‚¨ãƒªã‚’変æ›ã—よã†ã¨ã—ã¾ã™ãŒã€ãƒ•ãƒ«ãƒ†ãƒ¼ãƒ–ルスキャンや ClickHouse å´ã§ã®å‡¦ç†ã«ã¤ãªãŒã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +リテラルã®åž‹ã‚’明示的ã«æŒ‡å®šã—ãŸæ–¹ãŒè‰¯ã„ã§ã™ã€‚ã“れ㯠Mongo ãŒåŽ³å¯†åž‹ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’è¦æ±‚ã™ã‚‹ãŸã‚ã§ã™ã€‚\ +例ãˆã° `Date` ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã—ãŸã„å ´åˆï¼š + +```sql +SELECT * FROM mongo_table WHERE date = '2024-01-01' +``` + +ã“ã‚Œã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。ãªãœãªã‚‰ Mongo ã¯æ–‡å­—列を `Date` ã«ã‚­ãƒ£ã‚¹ãƒˆã—ãªã„ãŸã‚ã§ã™ã€‚ã—ãŸãŒã£ã¦ã€æ‰‹å‹•ã§ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +SELECT * FROM mongo_table WHERE date = '2024-01-01'::Date OR date = toDate('2024-01-01') +``` + +ã“れ㯠`Date`ã€`Date32`ã€`DateTime`ã€`Bool`ã€`UUID` ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +::: + +## 使用例 {#usage-example} + +MongoDB ã« [sample_mflix](https://www.mongodb.com/docs/atlas/sample-data/sample-mflix) データセットãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ + +MongoDB コレクションã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–れる ClickHouse ã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +``` sql +CREATE TABLE sample_mflix_table +( + _id String, + title String, + plot String, + genres Array(String), + directors Array(String), + writers Array(String), + released Date, + imdb String, + year String, +) ENGINE = MongoDB('mongodb://:@atlas-sql-6634be87cefd3876070caf96-98lxs.a.query.mongodb.net/sample_mflix?ssl=true&authSource=admin', 'movies'); +``` + +クエリ: + +``` sql +SELECT count() FROM sample_mflix_table +``` + +``` text + ┌─count()─┠+1. │ 21349 │ + └─────────┘ +``` + +```SQL +-- JSONExtractString 㯠MongoDB ã«ã¯ãƒ—ッシュダウンã§ãã¾ã›ã‚“ +SET mongodb_throw_on_unsupported_query = 0; + +-- 評価㌠7.5 を超ãˆã‚‹ 'Back to the Future' シリーズã®ç¶šç·¨ã‚’見ã¤ã‘ã‚‹ +SELECT title, plot, genres, directors, released FROM sample_mflix_table +WHERE title IN ('Back to the Future', 'Back to the Future Part II', 'Back to the Future Part III') + AND toFloat32(JSONExtractString(imdb, 'rating')) > 7.5 +ORDER BY year +FORMAT Vertical; +``` + +```text +Row 1: +────── +title: Back to the Future +plot: A young man is accidentally sent 30 years into the past in a time-traveling DeLorean invented by his friend, Dr. Emmett Brown, and must make sure his high-school-age parents unite in order to save his own existence. +genres: ['Adventure','Comedy','Sci-Fi'] +directors: ['Robert Zemeckis'] +released: 1985-07-03 + +Row 2: +────── +title: Back to the Future Part II +plot: After visiting 2015, Marty McFly must repeat his visit to 1955 to prevent disastrous changes to 1985... without interfering with his first trip. +genres: ['Action','Adventure','Comedy'] +directors: ['Robert Zemeckis'] +released: 1989-11-22 +``` + +```SQL +-- Cormac McCarthy ã®æœ¬ã«åŸºã¥ã„ãŸãƒˆãƒƒãƒ—3ã®æ˜ ç”»ã‚’探㙠+SELECT title, toFloat32(JSONExtractString(imdb, 'rating')) as rating +FROM sample_mflix_table +WHERE arrayExists(x -> x like 'Cormac McCarthy%', writers) +ORDER BY rating DESC +LIMIT 3; +``` + +```text + ┌─title──────────────────┬─rating─┠+1. │ No Country for Old Men │ 8.1 │ +2. │ The Sunset Limited │ 7.4 │ +3. │ The Road │ 7.3 │ + └────────────────────────┴────────┘ +``` + +## トラブルシューティング +DEBUG レベルã®ãƒ­ã‚°ã§ç”Ÿæˆã•ã‚ŒãŸ MongoDB クエリを見るã“ã¨ãŒã§ãã¾ã™ã€‚ + +実装ã®è©³ç´°ã¯ [mongocxx](https://github.com/mongodb/mongo-cxx-driver) ãŠã‚ˆã³ [mongoc](https://github.com/mongodb/mongo-c-driver) ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/engines/table-engines/integrations/mysql.md b/docs/ja/engines/table-engines/integrations/mysql.md new file mode 100644 index 00000000000..4b7a8a5c44e --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/mysql.md @@ -0,0 +1,198 @@ +--- +slug: /ja/engines/table-engines/integrations/mysql +sidebar_position: 138 +sidebar_label: MySQL +--- + +# MySQL テーブルエンジン + +MySQL エンジンを使用ã™ã‚‹ã¨ã€ãƒªãƒ¢ãƒ¼ãƒˆã® MySQL サーãƒãƒ¼ã«ä¿å­˜ã•ã‚Œã¦ã„るデータã«å¯¾ã—㦠`SELECT` ãŠã‚ˆã³ `INSERT` クエリを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1] [TTL expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2] [TTL expr2], + ... +) ENGINE = MySQL({host:port, database, table, user, password[, replace_query, on_duplicate_clause] | named_collection[, option=value [,..]]}) +SETTINGS + [ connection_pool_size=16, ] + [ connection_max_tries=3, ] + [ connection_wait_timeout=5, ] + [ connection_auto_close=true, ] + [ connect_timeout=10, ] + [ read_write_timeout=300 ] +; +``` + +[CREATE TABLE](../../../sql-reference/statements/create/table.md#create-table-query) クエリã®è©³ç´°ãªèª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +テーブル構造ã¯å…ƒã® MySQL テーブル構造ã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼š + +- カラムåã¯å…ƒã® MySQL テーブルã¨åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“ãŒã€ã“れらã®ã‚«ãƒ©ãƒ ã®ä¸€éƒ¨ã—ã‹ä½¿ç”¨ã—ãªã„ã“ã¨ãŒã§ãã€é †åºã‚‚ä»»æ„ã§ã™ã€‚ +- カラムタイプã¯å…ƒã® MySQL テーブルã®ã‚‚ã®ã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ClickHouse ã¯å€¤ã‚’ ClickHouse ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã«[キャスト](../../../engines/database-engines/mysql.md#data_types-support)ã—よã†ã¨ã—ã¾ã™ã€‚ +- [external_table_functions_use_nulls](../../../operations/settings/settings.md#external-table-functions-use-nulls) 設定㯠Nullable カラムã®å‡¦ç†æ–¹æ³•ã‚’定義ã—ã¾ã™ã€‚デフォルト値: 1。0ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ル関数㯠Nullable カラムを作æˆã›ãšã€null ã®ä»£ã‚ã‚Šã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’挿入ã—ã¾ã™ã€‚ã“ã‚Œã¯é…列内㮠NULL 値ã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +:::note +MySQL テーブルエンジンã¯ã€ç¾åœ¨ MacOS 用㮠ClickHouse ビルドã§ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“([issue](https://github.com/ClickHouse/ClickHouse/issues/21191)) +::: + +**エンジンパラメータ** + +- `host:port` — MySQL サーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ +- `database` — リモートデータベースå。 +- `table` — リモートテーブルå。 +- `user` — MySQL ユーザー。 +- `password` — ユーザーパスワード。 +- `replace_query` — `INSERT INTO` クエリを `REPLACE INTO` クエリã«å¤‰æ›ã™ã‚‹ãƒ•ãƒ©ã‚°ã€‚`replace_query=1` ã®å ´åˆã€ã‚¯ã‚¨ãƒªãŒç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ +- `on_duplicate_clause` — `INSERT` クエリã«è¿½åŠ ã•ã‚Œã‚‹ `ON DUPLICATE KEY on_duplicate_clause` å¼ã€‚例: `INSERT INTO t (c1,c2) VALUES ('a', 2) ON DUPLICATE KEY UPDATE c2 = c2 + 1` ã§ã€`on_duplicate_clause` 㯠`UPDATE c2 = c2 + 1` ã§ã™ã€‚`ON DUPLICATE KEY` å¥ã§ä½¿ç”¨å¯èƒ½ãª `on_duplicate_clause` ã«ã¤ã„ã¦ã¯ [MySQL ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html)ã‚’ã”覧ãã ã•ã„。`on_duplicate_clause` を指定ã™ã‚‹ã«ã¯ã€`replace_query` パラメータ㫠`0` を渡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`replace_query = 1` 㨠`on_duplicate_clause` ã®ä¸¡æ–¹ã‚’åŒæ™‚ã«æ¸¡ã™ã¨ã€ClickHouse ã¯ä¾‹å¤–を生æˆã—ã¾ã™ã€‚ + +引数ã¯[åå‰ä»˜ãコレクション](/docs/ja/operations/named-collections.md)を使用ã—ã¦æ¸¡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`host` 㨠`port` ã¯åˆ¥ã€…ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã¯æœ¬ç•ªç’°å¢ƒã§æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +`=, !=, >, >=, <, <=` ã®ã‚ˆã†ãªã‚·ãƒ³ãƒ—ル㪠`WHERE` æ¡ä»¶ã¯ MySQL サーãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +残りã®æ¡ä»¶ã¨ `LIMIT` サンプリング制約ã¯ã€MySQL ã¸ã®ã‚¯ã‚¨ãƒªãŒå®Œäº†ã—ãŸå¾Œã« ClickHouse ã§ã®ã¿å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +複数ã®ãƒ¬ãƒ—リカをサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€`|` ã§ãƒªã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ï¼š + +```sql +CREATE TABLE test_replicas (id UInt32, name String, age UInt32, money UInt32) ENGINE = MySQL(`mysql{2|3|4}:3306`, 'clickhouse', 'test_replicas', 'root', 'clickhouse'); +``` + +## 使用例 {#usage-example} + +MySQL ã§ãƒ†ãƒ¼ãƒ–ルを作æˆï¼š + +``` text +mysql> CREATE TABLE `test`.`test` ( + -> `int_id` INT NOT NULL AUTO_INCREMENT, + -> `int_nullable` INT NULL DEFAULT NULL, + -> `float` FLOAT NOT NULL, + -> `float_nullable` FLOAT NULL DEFAULT NULL, + -> PRIMARY KEY (`int_id`)); +Query OK, 0 rows affected (0,09 sec) + +mysql> insert into test (`int_id`, `float`) VALUES (1,2); +Query OK, 1 row affected (0,00 sec) + +mysql> select * from test; ++------+----------+-----+----------+ +| int_id | int_nullable | float | float_nullable | ++------+----------+-----+----------+ +| 1 | NULL | 2 | NULL | ++------+----------+-----+----------+ +1 row in set (0,00 sec) +``` + +ClickHouse ã§å¼•æ•°ã‚’使ã£ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆï¼š + +``` sql +CREATE TABLE mysql_table +( + `float_nullable` Nullable(Float32), + `int_id` Int32 +) +ENGINE = MySQL('localhost:3306', 'test', 'test', 'bayonet', '123') +``` + +ã¾ãŸã¯[åå‰ä»˜ãコレクション](/docs/ja/operations/named-collections.md)を使用: + +```sql +CREATE NAMED COLLECTION creds AS + host = 'localhost', + port = 3306, + database = 'test', + user = 'bayonet', + password = '123'; +CREATE TABLE mysql_table +( + `float_nullable` Nullable(Float32), + `int_id` Int32 +) +ENGINE = MySQL(creds, table='test') +``` + +MySQL テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–得: + +``` sql +SELECT * FROM mysql_table +``` + +``` text +┌─float_nullable─┬─int_id─┠+│ á´ºáµá´¸á´¸ │ 1 │ +└────────────────┴────────┘ +``` + +## 設定 {#mysql-settings} + +デフォルト設定ã¯éžå¸¸ã«åŠ¹çŽ‡çš„ã§ã¯ãªãã€æŽ¥ç¶šã‚’å†åˆ©ç”¨ã™ã‚‹ã“ã¨ã™ã‚‰ã—ã¾ã›ã‚“。ã“れらã®è¨­å®šã«ã‚ˆã‚Šã€ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªæ•°ã‚’秒å˜ä½ã§å¢—ã‚„ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### connection_auto_close {#connection-auto-close} + +クエリ実行後ã«æŽ¥ç¶šã‚’自動的ã«ã‚¯ãƒ­ãƒ¼ã‚ºã—ã€æŽ¥ç¶šã®å†åˆ©ç”¨ã‚’無効ã«ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 1 — 自動クローズ接続ãŒè¨±å¯ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€æŽ¥ç¶šã®å†åˆ©ç”¨ã¯ç„¡åŠ¹ã§ã™ +- 0 — 自動クローズ接続ã¯è¨±å¯ã•ã‚Œã¦ã„ãªã„ãŸã‚ã€æŽ¥ç¶šã®å†åˆ©ç”¨ã¯æœ‰åŠ¹ã§ã™ + +デフォルト値: `1`。 + +### connection_max_tries {#connection-max-tries} + +フォールオーãƒãƒ¼ä»˜ãプールã®å†è©¦è¡Œå›žæ•°ã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — フォールオーãƒãƒ¼ä»˜ãプールã®å†è©¦è¡Œã¯ã‚ã‚Šã¾ã›ã‚“。 + +デフォルト値: `3`。 + +### connection_pool_size {#connection-pool-size} + +接続プールã®ã‚µã‚¤ã‚º (ã™ã¹ã¦ã®æŽ¥ç¶šãŒä½¿ç”¨ä¸­ã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯æŽ¥ç¶šãŒè§£æ”¾ã•ã‚Œã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™)。 + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `16`。 + +### connection_wait_timeout {#connection-wait-timeout} + +空ã接続を待ã¤ãŸã‚ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’å˜ä½ï¼‰ï¼ˆã™ã§ã« connection_pool_size ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªæŽ¥ç¶šãŒã‚ã‚‹å ´åˆï¼‰ã€0 - å¾…æ©Ÿã—ãªã„。 + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `5`。 + +### connect_timeout {#connect-timeout} + +接続タイムアウト(秒å˜ä½ï¼‰ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `10`。 + +### read_write_timeout {#read-write-timeout} + +読ã¿å–ã‚Š/書ãè¾¼ã¿ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’å˜ä½ï¼‰ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `300`。 + +## 関連項目 {#see-also} + +- [mysql テーブル関数](../../../sql-reference/table-functions/mysql.md) +- [Dictionary ソースã¨ã—㦠MySQL を使用](../../../sql-reference/dictionaries/index.md#dictionary-sources#dicts-external_dicts_dict_sources-mysql) diff --git a/docs/ja/engines/table-engines/integrations/nats.md b/docs/ja/engines/table-engines/integrations/nats.md new file mode 100644 index 00000000000..6f5be8e4688 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/nats.md @@ -0,0 +1,183 @@ +--- +slug: /ja/engines/table-engines/integrations/nats +sidebar_position: 140 +sidebar_label: NATS +--- + +# NATS エンジン {#redisstreams-engine} + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã™ã‚‹ã¨ã€ClickHouseã‚’[NATS](https://nats.io/)ã¨çµ±åˆã§ãã¾ã™ã€‚ + +`NATS` ã¯ä»¥ä¸‹ã‚’å¯èƒ½ã«ã—ã¾ã™: + +- メッセージã®ã‚µãƒ–ジェクトを発行ã—ãŸã‚Šã€è³¼èª­ã—ãŸã‚Šã—ã¾ã™ã€‚ +- æ–°ã—ã„メッセージを利用å¯èƒ½ã«ãªã‚‹ã¨å‡¦ç†ã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE = NATS SETTINGS + nats_url = 'host:port', + nats_subjects = 'subject1,subject2,...', + nats_format = 'data_format'[,] + [nats_schema = '',] + [nats_num_consumers = N,] + [nats_queue_group = 'group_name',] + [nats_secure = false,] + [nats_max_reconnect = N,] + [nats_reconnect_wait = N,] + [nats_server_list = 'host1:port1,host2:port2,...',] + [nats_skip_broken_messages = N,] + [nats_max_block_size = N,] + [nats_flush_interval_ms = N,] + [nats_username = 'user',] + [nats_password = 'password',] + [nats_token = 'clickhouse',] + [nats_credential_file = '/var/nats_credentials',] + [nats_startup_connect_tries = '5'] + [nats_max_rows_per_message = 1,] + [nats_handle_error_mode = 'default'] +``` + +必須パラメータ: + +- `nats_url` – ホストã¨ãƒãƒ¼ãƒˆ (例: `localhost:5672`). +- `nats_subjects` – NATS テーブルãŒã‚µãƒ–スクライブ/発行ã™ã‚‹ã‚µãƒ–ジェクトã®ãƒªã‚¹ãƒˆã€‚`foo.*.bar`ã‚„`baz.>`ã®ã‚ˆã†ãªãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚µãƒ–ジェクトをサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +- `nats_format` – メッセージフォーマット。SQL ã® `FORMAT` 関数ã®åŒã˜è¡¨è¨˜ã‚’使用ã—ã€`JSONEachRow` ãªã©ãŒã‚ã‚Šã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[フォーマット](../../../interfaces/formats.md)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +オプションã®ãƒ‘ラメータ: + +- `nats_schema` – フォーマットãŒã‚¹ã‚­ãƒ¼ãƒžã®å®šç¾©ã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã«ä½¿ç”¨ã™ã‚‹ãƒ‘ラメータ。例ãˆã°ã€[Cap’n Proto](https://capnproto.org/) ã¯ã‚¹ã‚­ãƒ¼ãƒžãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘スã¨ãƒ«ãƒ¼ãƒˆ `schema.capnp:Message` オブジェクトã®åå‰ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ +- `nats_num_consumers` – テーブルã”ã¨ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžãƒ¼ã®æ•°ã€‚デフォルト: `1`。1ã¤ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžãƒ¼ã®ã‚¹ãƒ«ãƒ¼ãƒ—ットãŒä¸å分ãªå ´åˆã¯ã€ã‚ˆã‚Šå¤šãã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžãƒ¼ã‚’指定ã—ã¾ã™ã€‚ +- `nats_queue_group` – NATS サブスクライãƒãƒ¼ã®ã‚­ãƒ¥ãƒ¼ã‚°ãƒ«ãƒ¼ãƒ—å。デフォルトã¯ãƒ†ãƒ¼ãƒ–ルåã§ã™ã€‚ +- `nats_max_reconnect` – NATSã¸ã®æŽ¥ç¶š1回ã‚ãŸã‚Šã®å†æŽ¥ç¶šè©¦è¡Œã®æœ€å¤§å›žæ•°ã€‚デフォルト: `5`。 +- `nats_reconnect_wait` – å†æŽ¥ç¶šè©¦è¡Œé–“ã«ç¡çœ ã™ã‚‹æ™‚é–“ (ミリ秒)。デフォルト: `5000`。 +- `nats_server_list` - 接続ã™ã‚‹ãŸã‚ã®ã‚µãƒ¼ãƒãƒ¼ãƒªã‚¹ãƒˆã€‚NATSクラスターã¸ã®æŽ¥ç¶šã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- `nats_skip_broken_messages` - シャード内ã®ã‚¹ã‚­ãƒ¼ãƒžéžäº’æ›ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«å¯¾ã™ã‚‹ NATS メッセージパーサーã®è¨±å®¹åº¦ã€‚デフォルト: `0`。`nats_skip_broken_messages = N`ã®å ´åˆã€è§£æžã§ããªã„*N*件ã®NATSメッセージをスキップã—ã¾ã™ (メッセージã¯ãƒ‡ãƒ¼ã‚¿ã®è¡Œã«ç›¸å½“ã—ã¾ã™)。 +- `nats_max_block_size` - NATSã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ãŸã‚ã®ãƒãƒ¼ãƒ«(s)ã§åŽé›†ã•ã‚ŒãŸè¡Œã®æ•°ã€‚デフォルト: [max_insert_block_size](../../../operations/settings/settings.md#max_insert_block_size)。 +- `nats_flush_interval_ms` - NATSã‹ã‚‰èª­ã¿å–ã£ãŸãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ãŸã‚ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚デフォルト: [stream_flush_interval_ms](../../../operations/settings/settings.md#stream-flush-interval-ms)。 +- `nats_username` - NATS ユーザーå。 +- `nats_password` - NATS パスワード。 +- `nats_token` - NATSèªè¨¼ãƒˆãƒ¼ã‚¯ãƒ³ã€‚ +- `nats_credential_file` - NATSèªè¨¼æƒ…報ファイルã®ãƒ‘ス。 +- `nats_startup_connect_tries` - 起動時ã®æŽ¥ç¶šè©¦è¡Œå›žæ•°ã€‚デフォルト: `5`。 +- `nats_max_rows_per_message` — 行ベースã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§1ã¤ã®NATSメッセージã«æ›¸ã込む最大行数。(デフォルト : `1`)。 +- `nats_handle_error_mode` — NATSエンジンã®ã‚¨ãƒ©ãƒ¼å‡¦ç†æ–¹æ³•ã€‚å¯èƒ½ãªå€¤: default (メッセージã®è§£æžã«å¤±æ•—ã—ãŸå ´åˆã«ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™)ã€stream (例外メッセージã¨ç”Ÿã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒä»®æƒ³ã‚«ãƒ©ãƒ  `_error` 㨠`_raw_message` ã«ä¿å­˜ã•ã‚Œã¾ã™)。 + +SSL接続: + +安全ãªæŽ¥ç¶šã«ã¯ `nats_secure = 1` を使用ã—ã¾ã™ã€‚ +使用ã•ã‚Œã‚‹ãƒ©ã‚¤ãƒ–ラリã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å‹•ä½œã§ã¯ã€ä½œæˆã•ã‚ŒãŸTLS接続ãŒå分ã«å®‰å…¨ã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã›ã‚“。期é™åˆ‡ã‚Œã€è‡ªç½²åã€æ¬ è½ã€ã¾ãŸã¯ç„¡åŠ¹ãªè¨¼æ˜Žæ›¸ã§ã‚ã£ã¦ã‚‚ã€æŽ¥ç¶šã¯å˜ã«è¨±å¯ã•ã‚Œã¾ã™ã€‚証明書ã®ã‚ˆã‚ŠåŽ³å¯†ãªãƒã‚§ãƒƒã‚¯ã¯ã€å°†æ¥çš„ã«å®Ÿè£…ã§ãã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +NATSテーブルã¸ã®æ›¸ãè¾¼ã¿: + +テーブルãŒ1ã¤ã®ã‚µãƒ–ジェクトã‹ã‚‰ã—ã‹èª­ã¿å–らãªã„å ´åˆã€ä»»æ„ã®æŒ¿å…¥ã¯åŒã˜ã‚µãƒ–ジェクトã«å…¬é–‹ã•ã‚Œã¾ã™ã€‚ +ãŸã ã—ã€ãƒ†ãƒ¼ãƒ–ルãŒè¤‡æ•°ã®ã‚µãƒ–ジェクトã‹ã‚‰èª­ã¿å–ã‚‹å ´åˆã€ã©ã®ã‚µãƒ–ジェクトã«å…¬é–‹ã™ã‚‹ã‹ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +ãã®ãŸã‚ã€è¤‡æ•°ã®ã‚µãƒ–ジェクトをæŒã¤ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹éš›ã¯ã€`stream_like_engine_insert_queue`ã®è¨­å®šãŒå¿…è¦ã§ã™ã€‚ +テーブルãŒèª­ã¿å–るサブジェクトã®1ã¤ã‚’é¸æŠžã—ã€ãã“ã«ãƒ‡ãƒ¼ã‚¿ã‚’公開ã§ãã¾ã™ã€‚例ãˆã°ï¼š + +``` sql + CREATE TABLE queue ( + key UInt64, + value UInt64 + ) ENGINE = NATS + SETTINGS nats_url = 'localhost:4444', + nats_subjects = 'subject1,subject2', + nats_format = 'JSONEachRow'; + + INSERT INTO queue + SETTINGS stream_like_engine_insert_queue = 'subject2' + VALUES (1, 1); +``` + +ã¾ãŸã€nats関連ã®è¨­å®šã¨å…±ã«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆè¨­å®šã‚’追加ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +例: + +``` sql + CREATE TABLE queue ( + key UInt64, + value UInt64, + date DateTime + ) ENGINE = NATS + SETTINGS nats_url = 'localhost:4444', + nats_subjects = 'subject1', + nats_format = 'JSONEachRow', + date_time_input_format = 'best_effort'; +``` + +NATSサーãƒãƒ¼ã®è¨­å®šã¯ã€ClickHouseã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ã¦è¿½åŠ ã§ãã¾ã™ã€‚ +特ã«ã€NATSエンジン用ã®Redisパスワードを追加ã§ãã¾ã™: + +``` xml + + click + house + clickhouse + +``` + +## 説明 {#description} + +`SELECT` ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’読ã¿å–ã‚‹ãŸã‚ã«ç‰¹ã«æœ‰ç”¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“(デãƒãƒƒã‚°ã‚’除ã)ã€ãªãœãªã‚‰å„メッセージã¯ä¸€åº¦ã ã‘読ã¿å–ã‚Œã¾ã™ã€‚実際ã«ã¯ã€[Materialized View](../../../sql-reference/statements/create/view.md)を使用ã—ã¦ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’作æˆã™ã‚‹æ–¹ãŒå®Ÿç”¨çš„ã§ã™ã€‚ã“れを行ã†ã«ã¯: + +1. エンジンを使用ã—ã¦NATSコンシューマーを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒªãƒ¼ãƒ ã¨è¦‹ãªã—ã¾ã™ã€‚ +2. 望む構造をæŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ +3. エンジンã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã—ã€äº‹å‰ã«ä½œæˆã—ãŸãƒ†ãƒ¼ãƒ–ルã«æ ¼ç´ã™ã‚‹Materialized Viewを作æˆã—ã¾ã™ã€‚ + +`MATERIALIZED VIEW` ãŒã‚¨ãƒ³ã‚¸ãƒ³ã«æŽ¥ç¶šã•ã‚Œã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ãƒ¼ã‚¿ã‚’åŽé›†ã—始ã‚ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€NATSã‹ã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’継続的ã«å—ä¿¡ã—ã€`SELECT` を使用ã—ã¦è¦æ±‚ã•ã‚Œã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¤‰æ›ã§ãã¾ã™ã€‚ +1ã¤ã®NATS テーブルã«ã¯å¥½ããªã ã‘多ãã®Materialized Viewã‚’æŒãŸã›ã‚‹ã“ã¨ãŒã§ãã€ã“れらã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ç›´æŽ¥ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã®ã§ã¯ãªãã€æ–°ã—ã„レコード(ブロックå˜ä½ï¼‰ã‚’å—ä¿¡ã—ã¾ã™ã€‚ã“ã®ã‚ˆã†ã«ã—ã¦ç•°ãªã‚‹è©³ç´°ãƒ¬ãƒ™ãƒ«ã§ï¼ˆé›†ç´„ã‚’ä¼´ã†é›†è¨ˆã‚„集計ãªã—ã§ï¼‰è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルã«æ›¸ã込むã“ã¨ãŒã§ãã¾ã™ã€‚ + +例: + +``` sql + CREATE TABLE queue ( + key UInt64, + value UInt64 + ) ENGINE = NATS + SETTINGS nats_url = 'localhost:4444', + nats_subjects = 'subject1', + nats_format = 'JSONEachRow', + date_time_input_format = 'best_effort'; + + CREATE TABLE daily (key UInt64, value UInt64) + ENGINE = MergeTree() ORDER BY key; + + CREATE MATERIALIZED VIEW consumer TO daily + AS SELECT key, value FROM queue; + + SELECT key, value FROM daily ORDER BY key; +``` + +ストリームデータã®å—ä¿¡ã‚’æ­¢ã‚ãŸã‚Šã€å¤‰æ›ãƒ­ã‚¸ãƒƒã‚¯ã‚’変更ã—ãŸã‚Šã™ã‚‹ã«ã¯ã€Materialized Viewをデタッãƒã—ã¾ã™: + +``` sql + DETACH TABLE consumer; + ATTACH TABLE consumer; +``` + +ターゲットテーブルを`ALTER`を使ã£ã¦å¤‰æ›´ã—ãŸã„å ´åˆã¯ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã¨ãƒ“ューã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿é–“ã®ä¸ä¸€è‡´ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€ãƒžãƒ†ãƒªã‚¢ãƒ«ãƒ“ューを無効ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## 仮想カラム {#virtual-columns} + +- `_subject` - NATS メッセージã®ã‚µãƒ–ジェクト。データ型: `String`. + +`nats_handle_error_mode='stream'`ã®å ´åˆã®è¿½åŠ ä»®æƒ³ã‚«ãƒ©ãƒ : + +- `_raw_message` - 解æžã«å¤±æ•—ã—ãŸç”Ÿãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€‚データ型: `Nullable(String)`。 +- `_error` - 解æžã«å¤±æ•—ã—ãŸã¨ãã®ä¾‹å¤–メッセージ。データ型: `Nullable(String)`。 + +注æ„: `_raw_message`ã¨`_error`仮想カラムã¯ã€è§£æžä¸­ã«ä¾‹å¤–ãŒç™ºç”Ÿã—ãŸå ´åˆã®ã¿åŸ‹ã‚られã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒæ­£å¸¸ã«è§£æžã•ã‚ŒãŸå ´åˆã¯å¸¸ã«`NULL`ã§ã™ã€‚ + +## データフォーマットã®ã‚µãƒãƒ¼ãƒˆ {#data-formats-support} + +NATS エンジンã¯ã€ClickHouseã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®[フォーマット](../../../interfaces/formats.md)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +1ã¤ã®NATSメッセージ内ã®è¡Œæ•°ã¯ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒè¡Œãƒ™ãƒ¼ã‚¹ã‹ãƒ–ロックベースã‹ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: + +- 行ベースã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®å ´åˆã€1ã¤ã®NATSメッセージ内ã®è¡Œæ•°ã¯ã€`nats_max_rows_per_message`設定ã§åˆ¶å¾¡ã§ãã¾ã™ã€‚ +- ブロックベースã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®å ´åˆã€ãƒ–ロックをå°ã•ãªéƒ¨åˆ†ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€1ã¤ã®ãƒ–ロック内ã®è¡Œæ•°ã¯ã€ä¸€èˆ¬è¨­å®šã®[max_block_size](../../../operations/settings/settings.md#setting-max_block_size)ã§åˆ¶å¾¡ã§ãã¾ã™ã€‚ diff --git a/docs/ja/engines/table-engines/integrations/odbc.md b/docs/ja/engines/table-engines/integrations/odbc.md new file mode 100644 index 00000000000..3512283a8de --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/odbc.md @@ -0,0 +1,135 @@ +--- + +slug: /ja/engines/table-engines/integrations/odbc +sidebar_position: 150 +sidebar_label: ODBC + +--- + +# ODBC + +ClickHouseãŒ[ODBC](https://en.wikipedia.org/wiki/Open_Database_Connectivity)を介ã—ã¦å¤–部データベースã«æŽ¥ç¶šã§ãるよã†ã«ã—ã¾ã™ã€‚ + +ODBC接続を安全ã«å®Ÿè£…ã™ã‚‹ãŸã‚ã«ã€ClickHouseã¯åˆ¥ã®ãƒ—ログラム`clickhouse-odbc-bridge`を使用ã—ã¾ã™ã€‚ã‚‚ã—ODBCドライãƒãŒ`clickhouse-server`ã‹ã‚‰ç›´æŽ¥ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸå ´åˆã€ãƒ‰ãƒ©ã‚¤ãƒã®å•é¡ŒãŒClickHouseサーãƒã‚’クラッシュã•ã›ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã¯å¿…è¦ã«å¿œã˜ã¦`clickhouse-odbc-bridge`を自動的ã«é–‹å§‹ã—ã¾ã™ã€‚ODBCブリッジプログラムã¯ã€`clickhouse-server`ã¨åŒã˜ãƒ‘ッケージã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¾ã™ã€‚ + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯[Nullable](../../../sql-reference/data-types/nullable.md)データ型をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1], + name2 [type2], + ... +) +ENGINE = ODBC(connection_settings, external_database, external_table) +``` + +[CREATE TABLE](../../../sql-reference/statements/create/table.md#create-table-query)クエリã®è©³ç´°ãªèª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +テーブル構造ã¯ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ル構造ã¨ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼š + +- カラムåã¯ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã¨åŒã˜ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒã€ã“れらã®ã‚«ãƒ©ãƒ ã®ä¸€éƒ¨ã ã‘ã‚’ä»»æ„ã®é †åºã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- カラムタイプã¯ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã¯å€¤ã‚’ClickHouseデータ型ã«[キャスト](../../../sql-reference/functions/type-conversion-functions.md#type_conversion_function-cast)ã—よã†ã¨ã—ã¾ã™ã€‚ +- [external_table_functions_use_nulls](../../../operations/settings/settings.md#external-table-functions-use-nulls)設定ã¯Nullableカラムã®å‡¦ç†æ–¹æ³•ã‚’定義ã—ã¾ã™ã€‚デフォルト値: 1。0ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ル関数ã¯Nullableカラムを作æˆã›ãšã€nullã®ä»£ã‚ã‚Šã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’挿入ã—ã¾ã™ã€‚ã“ã‚Œã¯é…列内ã®NULL値ã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +**エンジンパラメータ** + +- `connection_settings` — `odbc.ini`ファイルã®æŽ¥ç¶šè¨­å®šã‚’å«ã‚€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®åå‰ã€‚ +- `external_database` — 外部DBMS内ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å。 +- `external_table` — `external_database`内ã®ãƒ†ãƒ¼ãƒ–ルå。 + +## 使用例 {#usage-example} + +**ODBCを介ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«MySQLインストールã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹** + +ã“ã®ä¾‹ã¯Ubuntu Linux 18.04ãŠã‚ˆã³MySQLサーãƒ5.7ã§ç¢ºèªã•ã‚Œã¦ã„ã¾ã™ã€‚ + +unixODBCã¨MySQL ConnectorãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +デフォルトã§ã¯ï¼ˆãƒ‘ッケージã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚ŒãŸå ´åˆï¼‰ã€ClickHouseã¯ãƒ¦ãƒ¼ã‚¶`clickhouse`ã¨ã—ã¦é–‹å§‹ã•ã‚Œã¾ã™ã€‚ãã®ãŸã‚ã€MySQLサーãƒã§ã“ã®ãƒ¦ãƒ¼ã‚¶ã‚’作æˆã—ã¦è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` bash +$ sudo mysql +``` + +``` sql +mysql> CREATE USER 'clickhouse'@'localhost' IDENTIFIED BY 'clickhouse'; +mysql> GRANT ALL PRIVILEGES ON *.* TO 'clickhouse'@'localhost' WITH GRANT OPTION; +``` + +ãã®å¾Œã€`/etc/odbc.ini`ã§æŽ¥ç¶šã‚’設定ã—ã¾ã™ã€‚ + +``` bash +$ cat /etc/odbc.ini +[mysqlconn] +DRIVER = /usr/local/lib/libmyodbc5w.so +SERVER = 127.0.0.1 +PORT = 3306 +DATABASE = test +USER = clickhouse +PASSWORD = clickhouse +``` + +unixODBCインストールã®`isql`ユーティリティを使ã£ã¦æŽ¥ç¶šã‚’確èªã§ãã¾ã™ã€‚ + +``` bash +$ isql -v mysqlconn ++-------------------------+ +| Connected! | +| | +... +``` + +MySQLã®ãƒ†ãƒ¼ãƒ–ル: + +``` text +mysql> CREATE DATABASE test; +Query OK, 1 row affected (0,01 sec) + +mysql> CREATE TABLE `test`.`test` ( + -> `int_id` INT NOT NULL AUTO_INCREMENT, + -> `int_nullable` INT NULL DEFAULT NULL, + -> `float` FLOAT NOT NULL, + -> `float_nullable` FLOAT NULL DEFAULT NULL, + -> PRIMARY KEY (`int_id`)); +Query OK, 0 rows affected (0,09 sec) + +mysql> insert into test.test (`int_id`, `float`) VALUES (1,2); +Query OK, 1 row affected (0,00 sec) + +mysql> select * from test.test; ++------+-------------+-------+----------------+ +| int_id | int_nullable | float | float_nullable | ++------+-------------+-------+----------------+ +| 1 | NULL | 2 | NULL | ++------+-------------+-------+----------------+ +1 row in set (0,00 sec) +``` + +MySQLテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ClickHouseã®ãƒ†ãƒ¼ãƒ–ル: + +``` sql +CREATE TABLE odbc_t +( + `int_id` Int32, + `float_nullable` Nullable(Float32) +) +ENGINE = ODBC('DSN=mysqlconn', 'test', 'test') +``` + +``` sql +SELECT * FROM odbc_t +``` + +``` text +┌─int_id─┬─float_nullable─┠+│ 1 │ á´ºáµá´¸á´¸ │ +└────────┴────────────────┘ +``` + +## å‚ç…§ {#see-also} + +- [ODBC dictionaries](../../../sql-reference/dictionaries/index.md#dictionary-sources#dicts-external_dicts_dict_sources-odbc) +- [ODBC table function](../../../sql-reference/table-functions/odbc.md) diff --git a/docs/ja/engines/table-engines/integrations/postgresql.md b/docs/ja/engines/table-engines/integrations/postgresql.md new file mode 100644 index 00000000000..e0c22adfc93 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/postgresql.md @@ -0,0 +1,225 @@ +--- +slug: /ja/engines/table-engines/integrations/postgresql +title: PostgreSQL テーブルエンジン +sidebar_position: 160 +sidebar_label: PostgreSQL +--- + +PostgreSQLエンジンを使用ã™ã‚‹ã¨ã€ãƒªãƒ¢ãƒ¼ãƒˆã®PostgreSQLサーãƒãƒ¼ã«ä¿å­˜ã•ã‚Œã¦ã„るデータã«å¯¾ã—ã¦`SELECT`ãŠã‚ˆã³`INSERT`クエリを実行ã§ãã¾ã™ã€‚ + +:::note +ç¾åœ¨ã€PostgreSQLãƒãƒ¼ã‚¸ãƒ§ãƒ³12以上ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +:::note Postgresデータã®ãƒ¬ãƒ—リケーションã¾ãŸã¯ç§»è¡Œã«PeerDBを使用ã™ã‚‹ +> Postgresテーブルエンジンã«åŠ ãˆã¦ã€ClickHouseã«ã‚ˆã‚‹[PeerDB](https://docs.peerdb.io/introduction)を使用ã—ã¦ã€Postgresã‹ã‚‰ClickHouseã¸ã®ç¶™ç¶šçš„ãªãƒ‡ãƒ¼ã‚¿ãƒ‘イプラインを設定ã§ãã¾ã™ã€‚PeerDBã¯ã€å¤‰åŒ–データキャプãƒãƒ£ï¼ˆCDC)を使用ã—ã¦Postgresã‹ã‚‰ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’レプリケートã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚ŒãŸãƒ„ールã§ã™ã€‚ +::: + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 type1 [DEFAULT|MATERIALIZED|ALIAS expr1] [TTL expr1], + name2 type2 [DEFAULT|MATERIALIZED|ALIAS expr2] [TTL expr2], + ... +) ENGINE = PostgreSQL({host:port, database, table, user, password[, schema, [, on_conflict]] | named_collection[, option=value [,..]]}) +``` + +[CREATE TABLE](../../../sql-reference/statements/create/table.md#create-table-query) クエリã®è©³ç´°ãªèª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +テーブル構造ã¯ã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã®PostgreSQLテーブル構造ã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼š + +- カラムåã¯ã‚ªãƒªã‚¸ãƒŠãƒ«ã®PostgreSQLテーブルã¨åŒã˜ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒã€ã“れらã®ã‚«ãƒ©ãƒ ã®ä¸€éƒ¨ã‚’ä»»æ„ã®é †åºã§ä½¿ç”¨ã§ãã¾ã™ã€‚ +- カラムタイプã¯ã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã®PostgreSQLテーブルã®ã‚¿ã‚¤ãƒ—ã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã¯å€¤ã‚’ClickHouseデータタイプã«[キャスト](../../../engines/database-engines/postgresql.md#data_types-support)ã—よã†ã¨ã—ã¾ã™ã€‚ +- [external_table_functions_use_nulls](../../../operations/settings/settings.md#external-table-functions-use-nulls)設定ã¯ã€Nullableカラムをã©ã®ã‚ˆã†ã«å‡¦ç†ã™ã‚‹ã‹ã‚’定義ã—ã¾ã™ã€‚デフォルト値: 1。0ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ル関数ã¯Nullableカラムを作æˆã›ãšã€nullã®ä»£ã‚ã‚Šã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’挿入ã—ã¾ã™ã€‚ã“ã‚Œã¯é…列内ã®NULL値ã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +**エンジンパラメータ** + +- `host:port` — PostgreSQLサーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ +- `database` — リモートã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å。 +- `table` — リモートã®ãƒ†ãƒ¼ãƒ–ルå。 +- `user` — PostgreSQLユーザー。 +- `password` — ユーザーパスワード。 +- `schema` — デフォルト以外ã®ãƒ†ãƒ¼ãƒ–ルスキーマ。オプション。 +- `on_conflict` — è¡çªè§£æ±ºæˆ¦ç•¥ã€‚例: `ON CONFLICT DO NOTHING`。オプション。ã“ã®ã‚ªãƒ—ションを追加ã™ã‚‹ã¨æŒ¿å…¥ãŒéžåŠ¹çŽ‡ã«ãªã‚Šã¾ã™ã€‚ + +プロダクション環境ã§ã¯[åå‰ä»˜ãコレクション](/docs/ja/operations/named-collections.md)(ãƒãƒ¼ã‚¸ãƒ§ãƒ³21.11以é™ã§åˆ©ç”¨å¯èƒ½ï¼‰ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚以下ã¯ä¾‹ã§ã™ï¼š + +``` + + + localhost + 5432 + postgres + **** + schema1 + + +``` + +一部ã®ãƒ‘ラメータã¯ã‚­ãƒ¼å€¤å¼•æ•°ã«ã‚ˆã£ã¦ä¸Šæ›¸ãå¯èƒ½ã§ã™ï¼š +``` sql +SELECT * FROM postgresql(postgres_creds, table='table1'); +``` + +## 実装ã®è©³ç´° {#implementation-details} + +PostgreSQLå´ã®`SELECT`クエリã¯ã€èª­ã¿å–り専用ã®PostgreSQLトランザクション内ã§`COPY (SELECT ...) TO STDOUT`ã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã€å„`SELECT`クエリã®å¾Œã«ã‚³ãƒŸãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +`=`, `!=`, `>`, `>=`, `<`, `<=`, `IN`ã®ã‚ˆã†ãªå˜ç´”ãª`WHERE`å¥ã¯PostgreSQLサーãƒãƒ¼ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +ã™ã¹ã¦ã®çµåˆã€é›†è¨ˆã€ä¸¦ã¹æ›¿ãˆã€`IN [ array ]`æ¡ä»¶ã€ãŠã‚ˆã³`LIMIT`サンプリング制約ã¯ã€PostgreSQLã¸ã®ã‚¯ã‚¨ãƒªãŒçµ‚了ã—ãŸå¾Œã«ã®ã¿ClickHouseã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +PostgreSQLå´ã®`INSERT`クエリã¯ã€å„`INSERT`ステートメントã®å¾Œã«è‡ªå‹•ã‚³ãƒŸãƒƒãƒˆã•ã‚Œã‚‹PostgreSQLトランザクション内ã§`COPY "table_name" (field1, field2, ... fieldN) FROM STDIN`ã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +PostgreSQLã®`Array`åž‹ã¯ClickHouseã®é…列ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +:::note +æ³¨æ„ - PostgreSQLã§ã¯ã€`type_name[]`ã®ã‚ˆã†ã«ä½œæˆã•ã‚ŒãŸé…列データã¯ã€åŒã˜ã‚«ãƒ©ãƒ å†…ã®ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ル行ã«ç•°ãªã‚‹æ¬¡å…ƒã®å¤šæ¬¡å…ƒé…列をå«ã‚€ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã—ã‹ã—ClickHouseã§ã¯ã€åŒã˜ã‚«ãƒ©ãƒ å†…ã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ル行ã«åŒã˜æ¬¡å…ƒæ•°ã®å¤šæ¬¡å…ƒé…列をæŒã¤ã“ã¨ã®ã¿ãŒè¨±å¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +複数ã®ãƒ¬ãƒ—リカをサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€`|`ã§ãƒªã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例: + +```sql +CREATE TABLE test_replicas (id UInt32, name String) ENGINE = PostgreSQL(`postgres{2|3|4}:5432`, 'clickhouse', 'test_replicas', 'postgres', 'mysecretpassword'); +``` + +PostgreSQL Dictionary ソース用ã®ãƒ¬ãƒ—リカプライオリティãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚マップ内ã®æ•°å­—ãŒå¤§ãã„ã»ã©å„ªå…ˆé †ä½ã¯ä½Žãã€æœ€é«˜å„ªå…ˆé †ä½ã¯`0`ã§ã™ã€‚ + +以下ã®ä¾‹ã§ã¯ã€ãƒ¬ãƒ—リカ`example01-1`ãŒæœ€é«˜å„ªå…ˆé †ä½ã‚’æŒã£ã¦ã„ã¾ã™ï¼š + +```xml + + 5432 + clickhouse + qwerty + + example01-1 + 1 + + + example01-2 + 2 + + db_name + table_name
+ id=10 + SQL_QUERY +
+ +``` + +## 使用例 {#usage-example} + +### PostgreSQLã®ãƒ†ãƒ¼ãƒ–ル + +``` text +postgres=# CREATE TABLE "public"."test" ( +"int_id" SERIAL, +"int_nullable" INT NULL DEFAULT NULL, +"float" FLOAT NOT NULL, +"str" VARCHAR(100) NOT NULL DEFAULT '', +"float_nullable" FLOAT NULL DEFAULT NULL, +PRIMARY KEY (int_id)); + +CREATE TABLE + +postgres=# INSERT INTO test (int_id, str, "float") VALUES (1,'test',2); +INSERT 0 1 + +postgresql> SELECT * FROM test; + int_id | int_nullable | float | str | float_nullable + --------+--------------+-------+------+---------------- + 1 | | 2 | test | + (1 row) +``` + +### ClickHouseã§ã®ãƒ†ãƒ¼ãƒ–ル作æˆã¨ä¸Šè¨˜ã§ä½œæˆã—ãŸPostgreSQLテーブルã¸ã®æŽ¥ç¶š + +ã“ã®ä¾‹ã§ã¯ã€[PostgreSQLテーブルエンジン](/docs/ja/engines/table-engines/integrations/postgresql.md)を使用ã—ã¦ã€ClickHouseテーブルをPostgreSQLテーブルã«æŽ¥ç¶šã—ã€PostgreSQLデータベースã«å¯¾ã—ã¦`SELECT`ã¨`INSERT`ã®ä¸¡æ–¹ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’使用ã—ã¾ã™ï¼š + +``` sql +CREATE TABLE default.postgresql_table +( + `float_nullable` Nullable(Float32), + `str` String, + `int_id` Int32 +) +ENGINE = PostgreSQL('localhost:5432', 'public', 'test', 'postges_user', 'postgres_password'); +``` + +### SELECTクエリを使用ã—ã¦PostgreSQLテーブルã‹ã‚‰ClickHouseテーブルã«åˆæœŸãƒ‡ãƒ¼ã‚¿ã‚’挿入 + +[postgresqlテーブル関数](/docs/ja/sql-reference/table-functions/postgresql.md)ã¯ã€PostgreSQLã‹ã‚‰ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚’コピーã—ã€ClickHouseã§ã‚¯ã‚¨ãƒªã‚’実行ã¾ãŸã¯åˆ†æžã‚’è¡Œã†ã“ã¨ã§ãƒ‡ãƒ¼ã‚¿ã®ã‚¯ã‚¨ãƒªãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ã‹ã€PostgreSQLã‹ã‚‰ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã“ã§ã¯PostgreSQLã‹ã‚‰ClickHouseã¸ãƒ‡ãƒ¼ã‚¿ã‚’コピーã™ã‚‹ã®ã§ã€ClickHouseã§ã¯MergeTreeテーブルエンジンを使用ã—ã€postgresql_copyã¨å‘¼ã³ã¾ã™ï¼š + +``` sql +CREATE TABLE default.postgresql_copy +( + `float_nullable` Nullable(Float32), + `str` String, + `int_id` Int32 +) +ENGINE = MergeTree +ORDER BY (int_id); +``` + +``` sql +INSERT INTO default.postgresql_copy +SELECT * FROM postgresql('localhost:5432', 'public', 'test', 'postges_user', 'postgres_password'); +``` + +### PostgreSQLテーブルã‹ã‚‰ClickHouseテーブルã¸ã®å¢—分データã®æŒ¿å…¥ + +åˆå›žã®æŒ¿å…¥å¾Œã«PostgreSQLテーブルã¨ClickHouseテーブルã®é–“ã§ç¶™ç¶šçš„ãªåŒæœŸã‚’è¡Œã†å ´åˆã€ClickHouseã§WHEREå¥ã‚’使用ã—ã¦ã€ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã¾ãŸã¯ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªã‚·ãƒ¼ã‚±ãƒ³ã‚¹IDã«åŸºã¥ã„ã¦PostgreSQLã«è¿½åŠ ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’挿入ã§ãã¾ã™ã€‚ + +ã“ã‚Œã¯ä»¥å‰ã«è¿½åŠ ã•ã‚ŒãŸæœ€å¤§ã®IDã¾ãŸã¯ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—を追跡ã™ã‚‹ã¨ã„ã£ãŸä½œæ¥­ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚例: + +``` sql +SELECT max(`int_id`) AS maxIntID FROM default.postgresql_copy; +``` + +ãã®å¾Œã€PostgreSQLテーブルã‹ã‚‰maxIDより大ãã„値を挿入ã—ã¾ã™ï¼š + +``` sql +INSERT INTO default.postgresql_copy +SELECT * FROM postgresql('localhost:5432', 'public', 'test', 'postges_user', 'postgres_password'); +WHERE int_id > maxIntID; +``` + +### ClickHouseテーブルã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿é¸æŠž + +``` sql +SELECT * FROM postgresql_copy WHERE str IN ('test'); +``` + +``` text +┌─float_nullable─┬─str──┬─int_id─┠+│ á´ºáµá´¸á´¸ │ test │ 1 │ +└────────────────┴──────┴────────┘ +``` + +### デフォルト以外ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã™ã‚‹ + +```text +postgres=# CREATE SCHEMA "nice.schema"; + +postgres=# CREATE TABLE "nice.schema"."nice.table" (a integer); + +postgres=# INSERT INTO "nice.schema"."nice.table" SELECT i FROM generate_series(0, 99) as t(i) +``` + +```sql +CREATE TABLE pg_table_schema_with_dots (a UInt32) + ENGINE PostgreSQL('localhost:5432', 'clickhouse', 'nice.table', 'postgrsql_user', 'password', 'nice.schema'); +``` + +**関連項目** + +- [`postgresql`テーブル関数](../../../sql-reference/table-functions/postgresql.md) +- [PostgreSQLã‚’Dictionaryソースã¨ã—ã¦ä½¿ç”¨ã™ã‚‹](../../../sql-reference/dictionaries/index.md#dictionary-sources#dicts-external_dicts_dict_sources-postgresql) + +## 関連コンテンツ + +- ブログ: [ClickHouse 㨠PostgreSQL - データヘブンã§ã®å‡ºä¼šã„ - パート1](https://clickhouse.com/blog/migrating-data-between-clickhouse-postgres) +- ブログ: [ClickHouse 㨠PostgreSQL - データヘブンã§ã®å‡ºä¼šã„ - パート2](https://clickhouse.com/blog/migrating-data-between-clickhouse-postgres-part-2) diff --git a/docs/ja/engines/table-engines/integrations/rabbitmq.md b/docs/ja/engines/table-engines/integrations/rabbitmq.md new file mode 100644 index 00000000000..a61c56ca1a1 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/rabbitmq.md @@ -0,0 +1,210 @@ +--- +slug: /ja/engines/table-engines/integrations/rabbitmq +sidebar_position: 170 +sidebar_label: RabbitMQ +--- + +# RabbitMQ エンジン + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã™ã‚‹ã¨ã€ClickHouse ã‚’ [RabbitMQ](https://www.rabbitmq.com) ã¨çµ±åˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`RabbitMQ` を使用ã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ï¼š + +- データフローã®ãƒ‘ブリッシュã¾ãŸã¯ã‚µãƒ–スクライブ +- ストリームãŒåˆ©ç”¨å¯èƒ½ã«ãªã‚‹ã¨å‡¦ç† + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1], + name2 [type2], + ... +) ENGINE = RabbitMQ SETTINGS + rabbitmq_host_port = 'host:port' [or rabbitmq_address = 'amqp(s)://guest:guest@localhost/vhost'], + rabbitmq_exchange_name = 'exchange_name', + rabbitmq_format = 'data_format'[,] + [rabbitmq_exchange_type = 'exchange_type',] + [rabbitmq_routing_key_list = 'key1,key2,...',] + [rabbitmq_secure = 0,] + [rabbitmq_schema = '',] + [rabbitmq_num_consumers = N,] + [rabbitmq_num_queues = N,] + [rabbitmq_queue_base = 'queue',] + [rabbitmq_deadletter_exchange = 'dl-exchange',] + [rabbitmq_persistent = 0,] + [rabbitmq_skip_broken_messages = N,] + [rabbitmq_max_block_size = N,] + [rabbitmq_flush_interval_ms = N,] + [rabbitmq_queue_settings_list = 'x-dead-letter-exchange=my-dlx,x-max-length=10,x-overflow=reject-publish',] + [rabbitmq_queue_consume = false,] + [rabbitmq_address = '',] + [rabbitmq_vhost = '/',] + [rabbitmq_username = '',] + [rabbitmq_password = '',] + [rabbitmq_commit_on_select = false,] + [rabbitmq_max_rows_per_message = 1,] + [rabbitmq_handle_error_mode = 'default'] +``` + +必須パラメータ: + +- `rabbitmq_host_port` – ホスト:ãƒãƒ¼ãƒˆï¼ˆä¾‹: `localhost:5672`)。 +- `rabbitmq_exchange_name` – RabbitMQ エクスãƒã‚§ãƒ³ã‚¸å。 +- `rabbitmq_format` – メッセージ形å¼ã€‚SQL ã® `FORMAT` 関数ã®è¨˜æ³•ã¨åŒã˜å½¢å¼ã‚’使用ã—ã€ä¾‹ãˆã° `JSONEachRow`。詳細ã¯ã€[フォーマット](../../../interfaces/formats.md)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +ä»»æ„パラメータ: + +- `rabbitmq_exchange_type` – RabbitMQ エクスãƒã‚§ãƒ³ã‚¸ã®ç¨®é¡ž: `direct`, `fanout`, `topic`, `headers`, `consistent_hash`。デフォルト: `fanout`。 +- `rabbitmq_routing_key_list` – 経路指定キーã®ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šãƒªã‚¹ãƒˆã€‚ +- `rabbitmq_schema` – å½¢å¼ãŒã‚¹ã‚­ãƒ¼ãƒžå®šç¾©ã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã«ä½¿ç”¨ã™ã‚‹ãƒ‘ラメータ。例ãˆã°ã€[Cap’n Proto](https://capnproto.org/) ã§ã¯ã‚¹ã‚­ãƒ¼ãƒžãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘スã¨ãƒ«ãƒ¼ãƒˆ `schema.capnp:Message` オブジェクトã®åå‰ãŒå¿…è¦ã§ã™ã€‚ +- `rabbitmq_num_consumers` – テーブルã‚ãŸã‚Šã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžæ•°ã€‚1ã¤ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã®ã‚¹ãƒ«ãƒ¼ãƒ—ットãŒä¸å分ãªå ´åˆã¯ã€ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžæ•°ã‚’増やã—ã¾ã™ã€‚デフォルト: `1` +- `rabbitmq_num_queues` – キューã®åˆè¨ˆæ•°ã€‚ã“ã®æ•°ã‚’増やã™ã¨ã€ãƒ‘フォーマンスãŒå¤§å¹…ã«å‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚デフォルト: `1`。 +- `rabbitmq_queue_base` - キューåã®ãƒ’ントを指定。以下ã«è¨­å®šã®ä½¿ç”¨ä¾‹ã‚’説明ã—ã¾ã™ã€‚ +- `rabbitmq_deadletter_exchange` - [デッドレターエクスãƒã‚§ãƒ³ã‚¸](https://www.rabbitmq.com/dlx.html)ã®åå‰ã‚’指定。デッドレターエクスãƒã‚§ãƒ³ã‚¸ã«å†å…¬é–‹ã•ã‚ŒãŸå ´åˆã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’åŽé›†ã™ã‚‹ãŸã‚ã«ã€ã“ã®ã‚¨ã‚¯ã‚¹ãƒã‚§ãƒ³ã‚¸åã‚’æŒã¤åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã§ãã¾ã™ã€‚デフォルトã§ã¯ãƒ‡ãƒƒãƒ‰ãƒ¬ã‚¿ãƒ¼ã‚¨ã‚¯ã‚¹ãƒã‚§ãƒ³ã‚¸ã¯æŒ‡å®šã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `rabbitmq_persistent` - 値ãŒ1(true)ã®å ´åˆã€ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚¯ã‚¨ãƒªé…信モードãŒ2ã«è¨­å®šã•ã‚Œï¼ˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒã€Œæ°¸ç¶šçš„ã€ã¨ãƒžãƒ¼ã‚¯ã•ã‚Œã¾ã™ï¼‰ã€‚デフォルト: `0`。 +- `rabbitmq_skip_broken_messages` – ブロックã”ã¨ã«ã‚¹ã‚­ãƒ¼ãƒžä¸é©åˆã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ RabbitMQ メッセージパーサãŒè¨±å®¹ã™ã‚‹æ•°ã€‚`rabbitmq_skip_broken_messages = N` ã®å ´åˆã€ã‚¨ãƒ³ã‚¸ãƒ³ã¯è§£æžã§ããªã„ *N* RabbitMQ メッセージをスキップã—ã¾ã™ï¼ˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ãƒ‡ãƒ¼ã‚¿ã®è¡Œã«ç›¸å½“)。デフォルト: `0`。 +- `rabbitmq_max_block_size` - RabbitMQ ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹å‰ã«åŽé›†ã™ã‚‹è¡Œæ•°ã€‚デフォルト: [max_insert_block_size](../../../operations/settings/settings.md#max_insert_block_size)。 +- `rabbitmq_flush_interval_ms` - RabbitMQ ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚デフォルト: [stream_flush_interval_ms](../../../operations/settings/settings.md#stream-flush-interval-ms)。 +- `rabbitmq_queue_settings_list` - キューを作æˆã™ã‚‹éš›ã« RabbitMQ 設定をセットã—ã¾ã™ã€‚利用å¯èƒ½ãªè¨­å®š: `x-max-length`, `x-max-length-bytes`, `x-message-ttl`, `x-expires`, `x-priority`, `x-max-priority`, `x-overflow`, `x-dead-letter-exchange`, `x-queue-type`。キューã«å¯¾ã—㦠`durable` 設定ãŒè‡ªå‹•çš„ã«æœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ +- `rabbitmq_address` - 接続用アドレス。ã“ã®è¨­å®šã‹ `rabbitmq_host_port` を使用ã—ã¾ã™ã€‚ +- `rabbitmq_vhost` - RabbitMQ vhost。デフォルト: `'/'`。 +- `rabbitmq_queue_consume` - ユーザー定義ã®ã‚­ãƒ¥ãƒ¼ã‚’使用ã—ã€RabbitMQã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã‚’è¡Œã‚ãªã„: エクスãƒã‚§ãƒ³ã‚¸ã€ã‚­ãƒ¥ãƒ¼ã€ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã®å®£è¨€ãªã©ã€‚デフォルト: `false`。 +- `rabbitmq_username` - RabbitMQ ユーザーå。 +- `rabbitmq_password` - RabbitMQ パスワード。 +- `reject_unhandled_messages` - エラーã®å ´åˆã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’æ‹’å¦ï¼ˆRabbitMQ ã«å¦å®šçš„ãªæ‰¿èªã‚’é€ä¿¡ï¼‰ã€‚ã“ã®è¨­å®šã¯ `rabbitmq_queue_settings_list` ã« `x-dead-letter-exchange` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã«è‡ªå‹•çš„ã«æœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ +- `rabbitmq_commit_on_select` - select クエリãŒå®Ÿè¡Œã•ã‚ŒãŸéš›ã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’コミット。デフォルト: `false`。 +- `rabbitmq_max_rows_per_message` — 行ベースã®å½¢å¼ã«å¯¾ã—ã¦ã€ä¸€ã¤ã® RabbitMQ メッセージã«æ›¸ãè¾¼ã¾ã‚Œã‚‹æœ€å¤§è¡Œæ•°ã€‚デフォルト: `1`。 +- `rabbitmq_empty_queue_backoff_start` — RabbitMQ キューãŒç©ºã®å ´åˆã®èª­ã¿å–ã‚Šå†ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã®é–‹å§‹ãƒãƒƒã‚¯ã‚ªãƒ•ãƒã‚¤ãƒ³ãƒˆã€‚ +- `rabbitmq_empty_queue_backoff_end` — RabbitMQ キューãŒç©ºã®å ´åˆã®èª­ã¿å–ã‚Šå†ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã®çµ‚了ãƒãƒƒã‚¯ã‚ªãƒ•ãƒã‚¤ãƒ³ãƒˆã€‚ +- `rabbitmq_handle_error_mode` — RabbitMQエンジンã®ã‚¨ãƒ©ãƒ¼ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°æ–¹æ³•ã€‚é¸æŠžå¯èƒ½ãªå€¤: default(メッセージã®ãƒ‘ースã«å¤±æ•—ã™ã‚‹ã¨ä¾‹å¤–ãŒç™ºç”Ÿã™ã‚‹ï¼‰ã€stream(例外メッセージã¨ç”Ÿã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒä»®æƒ³ã‚«ãƒ©ãƒ  `_error` 㨠`_raw_message` ã«ä¿å­˜ã•ã‚Œã‚‹ï¼‰ã€‚ + + * [ ] SSL 接続: + +`rabbitmq_secure = 1` ã¾ãŸã¯æŽ¥ç¶šã‚¢ãƒ‰ãƒ¬ã‚¹ã« `amqps` を使用: `rabbitmq_address = 'amqps://guest:guest@localhost/vhost'`。 +使用ã•ã‚Œã‚‹ãƒ©ã‚¤ãƒ–ラリã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå‹•ä½œã¯ã€ä½œæˆã•ã‚ŒãŸ TLS 接続ãŒå分ã«å®‰å…¨ã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ãªã„ã“ã¨ã§ã™ã€‚証明書ãŒæœŸé™åˆ‡ã‚Œã€è‡ªåˆ†ã§ç½²åã€æ¬ è½ã€ç„¡åŠ¹ã§ã‚ã£ã¦ã‚‚ã€æŽ¥ç¶šãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚証明書ã®ã‚ˆã‚ŠåŽ³æ ¼ãªç¢ºèªã¯å°†æ¥çš„ã«å®Ÿè£…ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +rabbitmq関連ã®è¨­å®šã¨å…±ã«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆè¨­å®šã‚‚追加ã§ãã¾ã™ã€‚ + +例: + +``` sql + CREATE TABLE queue ( + key UInt64, + value UInt64, + date DateTime + ) ENGINE = RabbitMQ SETTINGS rabbitmq_host_port = 'localhost:5672', + rabbitmq_exchange_name = 'exchange1', + rabbitmq_format = 'JSONEachRow', + rabbitmq_num_consumers = 5, + date_time_input_format = 'best_effort'; +``` + +RabbitMQ サーãƒãƒ¼è¨­å®šã¯ ClickHouse ã®ã‚³ãƒ³ãƒ•ã‚£ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ã¦è¿½åŠ ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ + +必須コンフィグレーション: + +``` xml + + root + clickhouse + +``` + +追加コンフィグレーション: + +``` xml + + clickhouse + +``` + +## 説明 {#description} + +`SELECT` ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®èª­ã¿å–ã‚Šã«ç‰¹ã«æœ‰ç”¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“(デãƒãƒƒã‚°ã‚’除ã)ã€ãªãœãªã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ä¸€åº¦ã ã‘ã—ã‹èª­ã¿å–ã‚‹ã“ã¨ãŒã§ããªã„ã‹ã‚‰ã§ã™ã€‚より実用的ã«ã¯ã€[マテリアライズドビュー](../../../sql-reference/statements/create/view.md)を使用ã—ã¦ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’作æˆã—ã¾ã™ã€‚ã“れを行ã†ã«ã¯ï¼š + +1. エンジンを使用ã—㦠RabbitMQ コンシューマを作æˆã—ã€ãれをデータストリームã¨ã¿ãªã—ã¾ã™ã€‚ +2. 希望ã®æ§‹é€ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ +3. エンジンã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã—ã€å‰è¿°ã®ãƒ†ãƒ¼ãƒ–ルã«å…¥ã‚Œã‚‹ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを作æˆã—ã¾ã™ã€‚ + +`MATERIALIZED VIEW` ãŒã‚¨ãƒ³ã‚¸ãƒ³ã«æŽ¥ç¶šã•ã‚Œã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ãƒ¼ã‚¿ã®åŽé›†ã‚’開始ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€RabbitMQ ã‹ã‚‰ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’継続的ã«å—ä¿¡ã—ã€`SELECT` を使用ã—ã¦å¿…è¦ãªå½¢å¼ã«å¤‰æ›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +1ã¤ã® RabbitMQ テーブルã«ã¯ã€ã„ãã¤ã§ã‚‚マテリアライズドビューを作るã“ã¨ãŒã§ãã¾ã™ã€‚ + +データ㯠`rabbitmq_exchange_type` ã¨æŒ‡å®šã•ã‚ŒãŸ `rabbitmq_routing_key_list` ã«åŸºã¥ã„ã¦ãƒãƒ£ãƒãƒ«åŒ–ã§ãã¾ã™ã€‚ +1テーブルã‚ãŸã‚Šã®ã‚¨ã‚¯ã‚¹ãƒã‚§ãƒ³ã‚¸ã¯1ã¤ã¾ã§ã§ã€1ã¤ã®ã‚¨ã‚¯ã‚¹ãƒã‚§ãƒ³ã‚¸ã¯è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ル間ã§å…±æœ‰ã§ãã¾ã™ - ã“ã‚Œã«ã‚ˆã‚Šã€åŒæ™‚ã«è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +エクスãƒã‚§ãƒ³ã‚¸ã‚¿ã‚¤ãƒ—オプション: + +- `direct` - キーã®æ­£ç¢ºãªä¸€è‡´ã«åŸºã¥ãルーティング。例:テーブルã®ã‚­ãƒ¼ãƒªã‚¹ãƒˆ `key1,key2,key3,key4,key5`ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚­ãƒ¼ã¯ãã®ã„ãšã‚Œã‹ã«ç­‰ã—ã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- `fanout` - キーã«é–¢ä¿‚ãªãã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ル(エクスãƒã‚§ãƒ³ã‚¸åãŒåŒã˜ï¼‰ã¸ã®ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã€‚ +- `topic` - ドットã§åŒºåˆ‡ã‚‰ã‚ŒãŸã‚­ãƒ¼ã‚’使用ã—ãŸãƒ‘ターンã«åŸºã¥ãルーティング。例: `*.logs`, `records.*.*.2020`, `*.2018,*.2019,*.2020`。 +- `headers` - `key=value` ã®ä¸€è‡´ã«åŸºã¥ãルーティング(`x-match=all` ã¾ãŸã¯ `x-match=any` 設定を使用) 。例:テーブルキーリスト `x-match=all,format=logs,type=report,year=2020`。 +- `consistent_hash` - データãŒã™ã¹ã¦ã®ãƒã‚¤ãƒ³ãƒ‰ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル間ã§å‡ç­‰ã«åˆ†é…ã•ã‚Œã‚‹ï¼ˆã‚¨ã‚¯ã‚¹ãƒã‚§ãƒ³ã‚¸åãŒåŒã˜ï¼‰ã€‚注æ„ã€ã“ã®ã‚¨ã‚¯ã‚¹ãƒã‚§ãƒ³ã‚¸ã‚¿ã‚¤ãƒ—㯠RabbitMQ プラグインã§æœ‰åŠ¹ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: `rabbitmq-plugins enable rabbitmq_consistent_hash_exchange`. + +設定 `rabbitmq_queue_base` ã¯æ¬¡ã®ç”¨é€”ã«ä½¿ç”¨ã§ãã¾ã™: + +- ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã«ã‚­ãƒ¥ãƒ¼ã‚’共有ã•ã›ã‚‹ã“ã¨ã§ã€ä¸€ã¤ã®ã‚­ãƒ¥ãƒ¼ã«è¤‡æ•°ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã‚’登録å¯èƒ½ã¨ãªã‚Šã€ã‚ˆã‚Šè‰¯ã„パフォーマンスを実ç¾ã—ã¾ã™ã€‚`rabbitmq_num_consumers` ãŠã‚ˆã³/ã¾ãŸã¯ `rabbitmq_num_queues` 設定を使用ã™ã‚‹å ´åˆã€ã“れらã®ãƒ‘ラメータãŒåŒã˜ã§ã‚ã‚‹ã¨æ­£ç¢ºãªã‚­ãƒ¥ãƒ¼ã®ä¸€è‡´ãŒé”æˆã•ã‚Œã¾ã™ã€‚ +- ã™ã¹ã¦ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒæ­£å¸¸ã«æ¶ˆè²»ã•ã‚Œãªã‹ã£ãŸå ´åˆã«ç‰¹å®šã®æ°¸ç¶šã‚­ãƒ¥ãƒ¼ã‹ã‚‰èª­ã¿å–りを復元ã™ã‚‹ãŸã‚。一ã¤ã®ç‰¹å®šã®ã‚­ãƒ¥ãƒ¼ã‹ã‚‰æ¶ˆè²»ã‚’å†é–‹ã™ã‚‹ã«ã¯ã€ãã®åå‰ã‚’ `rabbitmq_queue_base` 設定ã«ã‚»ãƒƒãƒˆã—ã€`rabbitmq_num_consumers` ãŠã‚ˆã³ `rabbitmq_num_queues` を指定ã—ãªã„ã§ãã ã•ã„(デフォルト㯠1)。特定ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦å®£è¨€ã•ã‚ŒãŸã™ã¹ã¦ã®ã‚­ãƒ¥ãƒ¼ã‹ã‚‰ã®æ¶ˆè²»ã‚’å†é–‹ã™ã‚‹ã«ã¯ã€åŒã˜è¨­å®šã‚’指定ã™ã‚‹ã ã‘ã§ã™: `rabbitmq_queue_base`, `rabbitmq_num_consumers`, `rabbitmq_num_queues`。デフォルトã§ã¯ã€ã‚­ãƒ¥ãƒ¼åã¯ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ãƒ¦ãƒ‹ãƒ¼ã‚¯ã«ãªã‚Šã¾ã™ã€‚ +- キューã¯è€ä¹…性ãŒã‚ã‚Šã€è‡ªå‹•å‰Šé™¤ã•ã‚Œãªã„ãŸã‚å†åˆ©ç”¨å¯èƒ½ã§ã™ã€‚(RabbitMQ CLI ツールã®ã„ãšã‚Œã‹ã§å‰Šé™¤å¯èƒ½ï¼‰ + +パフォーマンスå‘上ã®ãŸã‚ã«ã€å—ä¿¡ã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ [max_insert_block_size](../../../operations/server-configuration-parameters/settings.md#settings-max_insert_block_size) サイズã®ãƒ–ロックã«ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚Œã¾ã™ã€‚ブロック㌠[stream_flush_interval_ms](../../../operations/server-configuration-parameters/settings.md) ミリ秒以内ã«å½¢æˆã•ã‚Œãªã‹ã£ãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ–ロックã®å®Œå…¨æ€§ã«é–¢ä¿‚ãªãテーブルã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ + +`rabbitmq_num_consumers` ãŠã‚ˆã³/ã¾ãŸã¯ `rabbitmq_num_queues` 設定㌠`rabbitmq_exchange_type` ã¨å…±ã«æŒ‡å®šã•ã‚ŒãŸå ´åˆ: + +- `rabbitmq-consistent-hash-exchange` プラグインを有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- 公開ã•ã‚Œã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã® `message_id` プロパティãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆå„メッセージ/ãƒãƒƒãƒã«å¯¾ã—ã¦ãƒ¦ãƒ‹ãƒ¼ã‚¯ï¼‰ã€‚ + +挿入クエリã«ã¯ã€å„公開ã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«è¿½åŠ ã•ã‚Œã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚Šã¾ã™: `messageID` ãŠã‚ˆã³ `republished` フラグ(真ã®å ´åˆã€å†å…¬é–‹ã•ã‚ŒãŸå ´åˆï¼‰ - メッセージヘッダーを通ã˜ã¦ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ã€‚ + +挿入ã¨ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã«åŒã˜ãƒ†ãƒ¼ãƒ–ルを使用ã—ãªã„ã§ãã ã•ã„。 + +例: + +``` sql + CREATE TABLE queue ( + key UInt64, + value UInt64 + ) ENGINE = RabbitMQ SETTINGS rabbitmq_host_port = 'localhost:5672', + rabbitmq_exchange_name = 'exchange1', + rabbitmq_exchange_type = 'headers', + rabbitmq_routing_key_list = 'format=logs,type=report,year=2020', + rabbitmq_format = 'JSONEachRow', + rabbitmq_num_consumers = 5; + + CREATE TABLE daily (key UInt64, value UInt64) + ENGINE = MergeTree() ORDER BY key; + + CREATE MATERIALIZED VIEW consumer TO daily + AS SELECT key, value FROM queue; + + SELECT key, value FROM daily ORDER BY key; +``` + +## 仮想カラム {#virtual-columns} + +- `_exchange_name` - RabbitMQ エクスãƒã‚§ãƒ³ã‚¸å。データ型: `String`。 +- `_channel_id` - メッセージをå—ä¿¡ã—ãŸæ¶ˆè²»è€…ãŒå®£è¨€ã•ã‚ŒãŸ ChannelID。データ型: `String`。 +- `_delivery_tag` - å—ä¿¡ã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã® DeliveryTag。ãƒãƒ£ãƒãƒ«ã”ã¨ã«ã‚¹ã‚³ãƒ¼ãƒ—ã•ã‚Œã‚‹ã€‚データ型: `UInt64`。 +- `_redelivered` - メッセージ㮠`redelivered` フラグ。データ型: `UInt8`。 +- `_message_id` - å—ä¿¡ã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã® messageID。設定ã•ã‚ŒãŸå ´åˆã¯éžç©ºã€‚データ型: `String`。 +- `_timestamp` - å—ä¿¡ã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。設定ã•ã‚ŒãŸå ´åˆã¯éžç©ºã€‚データ型: `UInt64`。 + +`kafka_handle_error_mode='stream'` ã®å ´åˆã®è¿½åŠ ä»®æƒ³ã‚«ãƒ©ãƒ : + +- `_raw_message` - æ­£ã—ã解æžã•ã‚Œãªã‹ã£ãŸç”Ÿãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€‚データ型: `Nullable(String)`。 +- `_error` - 解æžã®å¤±æ•—時ã«ç™ºç”Ÿã—ãŸä¾‹å¤–メッセージ。データ型: `Nullable(String)`。 + +注: `_raw_message` 㨠`_error` 仮想カラムã¯ã€è§£æžä¸­ã®ä¾‹å¤–時ã«ã®ã¿åŸ‹ã‚られã¾ã™ã€‚正常ã«è§£æžã•ã‚ŒãŸå ´åˆã¯å¸¸ã« `NULL` ã§ã™ã€‚ + +## 注æ„点 {#caveats} + +[デフォルトカラムå¼](/docs/ja/sql-reference/statements/create/table.md/#default_values)(`DEFAULT`, `MATERIALIZED`, `ALIAS` ãªã©ï¼‰ã‚’テーブル定義ã«æŒ‡å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ãŒã€ãれらã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚代ã‚ã‚Šã«ã€ã‚«ãƒ©ãƒ ã¯ãã®åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§åŸ‹ã‚られã¾ã™ã€‚ + +## データ形å¼ã‚µãƒãƒ¼ãƒˆ {#data-formats-support} + +RabbitMQ エンジンã¯ã€ClickHouse ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®[å½¢å¼](../../../interfaces/formats.md)をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +1ã¤ã® RabbitMQ メッセージ内ã®è¡Œæ•°ã¯ã€å½¢å¼ãŒè¡Œãƒ™ãƒ¼ã‚¹ã‹ãƒ–ロックベースã‹ã«ã‚ˆã‚Šã¾ã™ï¼š + +- 行ベースã®å½¢å¼ã®å ´åˆã€1ã¤ã® RabbitMQ メッセージ内ã®è¡Œæ•°ã¯ `rabbitmq_max_rows_per_message` を設定ã™ã‚‹ã“ã¨ã§åˆ¶å¾¡ã§ãã¾ã™ã€‚ +- ブロックベースã®å½¢å¼ã®å ´åˆã€ãƒ–ロックをå°ã•ãªéƒ¨åˆ†ã«åˆ†ã‘ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€1ブロック内ã®è¡Œæ•°ã¯ä¸€èˆ¬è¨­å®š [max_block_size](../../../operations/settings/settings.md#setting-max_block_size) ã§åˆ¶å¾¡ã§ãã¾ã™ã€‚ diff --git a/docs/ja/engines/table-engines/integrations/redis.md b/docs/ja/engines/table-engines/integrations/redis.md new file mode 100644 index 00000000000..631b251031f --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/redis.md @@ -0,0 +1,154 @@ +--- +slug: /ja/engines/table-engines/integrations/redis +sidebar_position: 175 +sidebar_label: Redis +--- + +# Redis + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€ClickHouseã‚’[Redis](https://redis.io/)ã¨çµ±åˆã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚Redisã¯kvモデルを採用ã—ã¦ã„ã‚‹ãŸã‚ã€`where k=xx` ã‚„ `where k in (xx, xx)` ã®ã‚ˆã†ã«ã€ç‰¹å®šã®æ–¹æ³•ã§ã‚¯ã‚¨ãƒªã‚’è¡Œã†ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name +( + name1 [type1], + name2 [type2], + ... +) ENGINE = Redis({host:port[, db_index[, password[, pool_size]]] | named_collection[, option=value [,..]] }) +PRIMARY KEY(primary_key_name); +``` + +**エンジンパラメータ** + +- `host:port` — Redisサーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã™ã€‚ãƒãƒ¼ãƒˆã‚’無視ã§ãã¾ã™ã€‚デフォルトã¯Redisã®ãƒãƒ¼ãƒˆ6379ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- `db_index` — Redisã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç¯„囲ã¯0ã‹ã‚‰15ã¾ã§ã§ã™ã€‚デフォルトã¯0ã§ã™ã€‚ +- `password` — ユーザーã®ãƒ‘スワードã§ã™ã€‚デフォルトã¯ç©ºã®æ–‡å­—列ã§ã™ã€‚ +- `pool_size` — Redisã®æœ€å¤§æŽ¥ç¶šãƒ—ールサイズã§ã™ã€‚デフォルトã¯16ã§ã™ã€‚ +- `primary_key_name` - カラムリスト内ã®ä»»æ„ã®ã‚«ãƒ©ãƒ åã§ã™ã€‚ + +:::note シリアル化 +`PRIMARY KEY` ã¯1ã¤ã®ã‚«ãƒ©ãƒ ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚主キーã¯Redisキーã¨ã—ã¦ãƒã‚¤ãƒŠãƒªã§ã‚·ãƒªã‚¢ãƒ«åŒ–ã•ã‚Œã¾ã™ã€‚ +主キー以外ã®ã‚«ãƒ©ãƒ ã¯Redis値ã¨ã—ã¦å¯¾å¿œã™ã‚‹é †åºã§ãƒã‚¤ãƒŠãƒªã§ã‚·ãƒªã‚¢ãƒ«åŒ–ã•ã‚Œã¾ã™ã€‚ +::: + +引数ã¯[named collections](/docs/ja/operations/named-collections.md)を使用ã—ã¦æ¸¡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`host` 㨠`port` ã¯åˆ¥ã€…ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æ–¹æ³•ã¯æœ¬ç•ªç’°å¢ƒã§æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ç¾åœ¨ã€Redisã«named collectionsを使用ã—ã¦æ¸¡ã•ã‚Œã‚‹ã™ã¹ã¦ã®ãƒ‘ラメータã¯å¿…é ˆã§ã™ã€‚ + +:::note フィルタリング +`key equals` ã‚„ `in filtering` を使用ã—ãŸã‚¯ã‚¨ãƒªã¯ã€Redisã‹ã‚‰ã®ãƒžãƒ«ãƒã‚­ãƒ¼æ¤œç´¢ã«æœ€é©åŒ–ã•ã‚Œã¾ã™ã€‚フィルタリングキーãªã—ã®ã‚¯ã‚¨ãƒªã§ã¯ã€ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルをスキャンã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ãŒã€ã“ã‚Œã¯é‡ã„æ“作ã§ã™ã€‚ +::: + +## 使用例 {#usage-example} + +`Redis`エンジンを使用ã—ã¦ClickHouseã«ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ä¾‹: + +``` sql +CREATE TABLE redis_table +( + `key` String, + `v1` UInt32, + `v2` String, + `v3` Float32 +) +ENGINE = Redis('redis1:6379') PRIMARY KEY(key); +``` + +ã¾ãŸã¯[named collections](/docs/ja/operations/named-collections.md)を使用ã™ã‚‹å ´åˆ: + +``` + + + localhost + 6379 + **** + 16 + s0 + + +``` + +```sql +CREATE TABLE redis_table +( + `key` String, + `v1` UInt32, + `v2` String, + `v3` Float32 +) +ENGINE = Redis(redis_creds) PRIMARY KEY(key); +``` + +挿入: + +```sql +INSERT INTO redis_table Values('1', 1, '1', 1.0), ('2', 2, '2', 2.0); +``` + +クエリ: + +``` sql +SELECT COUNT(*) FROM redis_table; +``` + +``` text +┌─count()─┠+│ 2 │ +└─────────┘ +``` + +``` sql +SELECT * FROM redis_table WHERE key='1'; +``` + +```text +┌─key─┬─v1─┬─v2─┬─v3─┠+│ 1 │ 1 │ 1 │ 1 │ +└─────┴────┴────┴────┘ +``` + +``` sql +SELECT * FROM redis_table WHERE v1=2; +``` + +```text +┌─key─┬─v1─┬─v2─┬─v3─┠+│ 2 │ 2 │ 2 │ 2 │ +└─────┴────┴────┴────┘ +``` + +æ›´æ–°: + +主キーã¯æ›´æ–°ã§ããªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +```sql +ALTER TABLE redis_table UPDATE v1=2 WHERE key='1'; +``` + +削除: + +```sql +ALTER TABLE redis_table DELETE WHERE key='1'; +``` + +削除: + +RedisデータベースをéžåŒæœŸçš„ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ã¾ãŸã€`Truncate`ã¯SYNCモードをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +```sql +TRUNCATE TABLE redis_table SYNC; +``` + +çµåˆ: + +ä»–ã®ãƒ†ãƒ¼ãƒ–ルã¨çµåˆã—ã¾ã™ã€‚ + +``` +SELECT * FROM redis_table JOIN merge_tree_table ON merge_tree_table.key=redis_table.key; +``` + +## åˆ¶é™ {#limitations} + +Redisエンジンã¯`where k > xx`ã®ã‚ˆã†ãªã‚¹ã‚­ãƒ£ãƒ³ã‚¯ã‚¨ãƒªã‚‚サãƒãƒ¼ãƒˆã—ã¾ã™ãŒã€ã„ãã¤ã‹ã®åˆ¶é™ãŒã‚ã‚Šã¾ã™: +1. スキャンクエリã¯ã€å†ãƒãƒƒã‚·ãƒ³ã‚°ä¸­ã«éžå¸¸ã«ç¨€ã«é‡è¤‡ã—ãŸã‚­ãƒ¼ã‚’生æˆã™ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚[Redis Scan](https://github.com/redis/redis/blob/e4d183afd33e0b2e6e8d1c79a832f678a04a7886/src/dict.c#L1186-L1269)ã®è©³ç´°ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +2. スキャン中ã«ã‚­ãƒ¼ãŒä½œæˆã¾ãŸã¯å‰Šé™¤ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€çµæžœã¨ã—ã¦å¾—られるデータセットã¯æœ‰åŠ¹ãªæ™‚点を表ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。 diff --git a/docs/ja/engines/table-engines/integrations/s3.md b/docs/ja/engines/table-engines/integrations/s3.md new file mode 100644 index 00000000000..ecca7591669 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/s3.md @@ -0,0 +1,360 @@ +--- +slug: /ja/engines/table-engines/integrations/s3 +sidebar_position: 180 +sidebar_label: S3 +--- + +# S3 テーブルエンジン + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ [Amazon S3](https://aws.amazon.com/s3/) エコシステムã¨ã®çµ±åˆã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ [HDFS](../../../engines/table-engines/special/file.md#table_engines-hdfs) エンジンã«ä¼¼ã¦ã„ã¾ã™ãŒã€S3特有ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +## 例 + +``` sql +CREATE TABLE s3_engine_table (name String, value UInt32) + ENGINE=S3('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/test-data.csv.gz', 'CSV', 'gzip') + SETTINGS input_format_with_names_use_header = 0; + +INSERT INTO s3_engine_table VALUES ('one', 1), ('two', 2), ('three', 3); + +SELECT * FROM s3_engine_table LIMIT 2; +``` + +```text +┌─name─┬─value─┠+│ one │ 1 │ +│ two │ 2 │ +└──────┴───────┘ +``` + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE s3_engine_table (name String, value UInt32) + ENGINE = S3(path [, NOSIGN | aws_access_key_id, aws_secret_access_key,] format, [compression]) + [PARTITION BY expr] + [SETTINGS ...] +``` + +### エンジンã®ãƒ‘ラメータ {#parameters} + +- `path` — ファイルã¸ã®ãƒ‘スをå«ã‚€ãƒã‚±ãƒƒãƒˆURL。以下ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’読ã¿å–り専用モードã§ã‚µãƒãƒ¼ãƒˆã—ã¾ã™ï¼š`*`, `**`, `?`, `{abc,def}` ãŠã‚ˆã³ `{N..M}`(`N`, `M` ã¯æ•°å€¤ã€ `'abc'`, `'def'` ã¯æ–‡å­—列)。詳細ã¯[下記](#wildcards-in-path)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- `NOSIGN` - ã“ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ãŒã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ã®ä»£ã‚ã‚Šã«æŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã™ã¹ã¦ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ç½²åã•ã‚Œã¾ã›ã‚“。 +- `format` — ファイルã®[フォーマット](../../../interfaces/formats.md#formats)。 +- `aws_access_key_id`, `aws_secret_access_key` - [AWS](https://aws.amazon.com/) アカウントユーザーã®é•·æœŸã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ã€‚ã“れを使用ã—ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®èªè¨¼ãŒå¯èƒ½ã§ã™ã€‚ã“ã®ãƒ‘ラメータã¯ã‚ªãƒ—ションã§ã™ã€‚クレデンシャルãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚詳細ã¯[Using S3 for Data Storage](../mergetree-family/mergetree.md#table_engine-mergetree-s3)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- `compression` — 圧縮タイプ。サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å€¤ã¯ `none`, `gzip/gz`, `brotli/br`, `xz/LZMA`, `zstd/zst`。ã“ã®ãƒ‘ラメータã¯ã‚ªãƒ—ションã§ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«ã‚ˆã£ã¦åœ§ç¸®å½¢å¼ã‚’自動的ã«æ¤œå‡ºã—ã¾ã™ã€‚ + +### データキャッシュ {#data-cache} + +`S3` テーブルエンジンã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +ファイルシステムキャッシュã®æ§‹æˆã‚ªãƒ—ションã¨ä½¿ç”¨æ³•ã«ã¤ã„ã¦ã¯ã€ã“ã®[セクション](/docs/ja/operations/storing-data.md/#using-local-cache)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +キャッシュã¯ãƒ‘スã¨ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚ªãƒ–ジェクトã®ETagã«åŸºã¥ã„ã¦è¡Œã‚れるãŸã‚ã€ClickHouseã¯å¤ã„キャッシュãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’読ã¿ã¾ã›ã‚“。 + +キャッシュを有効ã«ã™ã‚‹ã«ã¯ã€è¨­å®š `filesystem_cache_name = ''` 㨠`enable_filesystem_cache = 1` を使用ã—ã¦ãã ã•ã„。 + +```sql +SELECT * +FROM s3('http://minio:10000/clickhouse//test_3.csv', 'minioadmin', 'minioadminpassword', 'CSV') +SETTINGS filesystem_cache_name = 'cache_for_s3', enable_filesystem_cache = 1; +``` + +構æˆãƒ•ã‚¡ã‚¤ãƒ«ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’定義ã™ã‚‹æ–¹æ³•ã¯2ã¤ã‚ã‚Šã¾ã™ã€‚ + +1. 次ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’ClickHouseã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã«è¿½åŠ ã—ã¾ã™ï¼š + +``` xml + + + + キャッシュディレクトリã¸ã®ãƒ‘ス + 10Gi + + + +``` + +2. ClickHouseã® `storage_configuration` セクションã‹ã‚‰ã‚­ãƒ£ãƒƒã‚·ãƒ¥æ§‹æˆã‚’å†åˆ©ç”¨ã—ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’使用ã—ã¾ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](/docs/ja/operations/storing-data.md/#using-local-cache)ã‚’ã”覧ãã ã•ã„。 + +### PARTITION BY + +`PARTITION BY` — オプションã§ã™ã€‚ã»ã¨ã‚“ã©ã®å ´åˆã€åˆ†å‰²ã‚­ãƒ¼ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“ãŒã€å¿…è¦ãªå ´åˆã§ã‚‚通常ã¯1ヶ月å˜ä½ã‚ˆã‚Šç´°ã‹ã„分割キーã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。パーティショニングã¯ã‚¯ã‚¨ãƒªã®é«˜é€ŸåŒ–ã«å¯„与ã—ã¾ã›ã‚“(ORDER BY 表ç¾ã¨ã¯å¯¾ç…§çš„ã«ï¼‰ã€‚決ã—ã¦ç´°ã‹ã™ãŽã‚‹ãƒ‘ーティショニングを使ã£ã¦ã¯ã„ã‘ã¾ã›ã‚“。クライアントIDã‚„åå‰ã§ãƒ‡ãƒ¼ã‚¿ã‚’分割ã™ã‚‹ã®ã§ã¯ãªãã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆIDã‚„åå‰ã‚’ ORDER BY 表ç¾ã®æœ€åˆã®ã‚«ãƒ©ãƒ ã«ã™ã‚‹ã¹ãã§ã™ã€‚ + +月å˜ä½ã§åˆ†å‰²ã™ã‚‹ã«ã¯ã€`toYYYYMM(date_column)` å¼ã‚’使用ã—ã¾ã™ã€‚ã“ã“㧠`date_column` 㯠[Date](/docs/ja/sql-reference/data-types/date.md) åž‹ã®æ—¥ä»˜ã‚’æŒã¤ã‚«ãƒ©ãƒ ã§ã™ã€‚ã“ã“ã§ã®ãƒ‘ーティションå㯠`"YYYYMM"` フォーマットã§ã™ã€‚ + +### パーティションã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã‚¯ã‚¨ãƒª + +ã“ã®ä¾‹ã¯ã€ClickHouseã¨MinIOã‚’çµ±åˆã™ã‚‹[ドッカーコンãƒãƒ¼ã‚ºãƒ¬ã‚·ãƒ”](https://github.com/ClickHouse/examples/tree/5fdc6ff72f4e5137e23ea075c88d3f44b0202490/docker-compose-recipes/recipes/ch-and-minio-S3)を使用ã—ã¾ã™ã€‚åŒã˜ã‚¯ã‚¨ãƒªã‚’使用ã—ã¦ã€ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚„èªè¨¼å€¤ã‚’ç½®ãæ›ãˆã‚‹ã“ã¨ã§ã€S3を利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`ENGINE` 構æˆã®S3エンドãƒã‚¤ãƒ³ãƒˆã«ã¯ã€S3オブジェクト(ファイルå)ã®ä¸€éƒ¨ã¨ã—㦠`_partition_id` パラメータトークンを使用ã—ã€ãれらã®çµæžœã‚ªãƒ–ジェクトå(例:`test_3.csv`)をé¸æŠžã—ã¾ã™ã€‚ + +:::note +例ã«ç¤ºã•ã‚Œã¦ã„るよã†ã«ã€ç¾åœ¨ã®ã¨ã“ã‚パーティション化ã•ã‚ŒãŸS3テーブルã‹ã‚‰ã®ã‚¯ã‚¨ãƒªã¯ç›´æŽ¥ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€S3テーブル関数を使用ã—ã¦å€‹ã€…ã®ãƒ‘ーティションをクエリã™ã‚‹ã“ã¨ã§é”æˆã§ãã¾ã™ã€‚ + +主ãªãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã¯ã€S3ã§ãƒ‘ーティション化ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’書ã込むã“ã¨ã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’ä»–ã® ClickHouseシステムã«è»¢é€ã™ã‚‹ã“ã¨ï¼ˆä¾‹ãˆã°ã€ã‚ªãƒ³ãƒ—レミスシステムã‹ã‚‰ClickHouse Cloudã«ç§»è¡Œï¼‰ã§ã™ã€‚ClickHouseã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯éžå¸¸ã«å¤§ãã„ã“ã¨ãŒå¤šã„ãŸã‚ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®ä¿¡é ¼æ€§ãŒæ¬ ã‘ã‚‹ã“ã¨ã‚‚ã‚ã‚‹ã®ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’部分ã”ã¨ã«è»¢é€ã™ã‚‹ã®ãŒåˆç†çš„ã§ã™ã€‚ã—ãŸãŒã£ã¦ã€ãƒ‘ーティション化ã•ã‚ŒãŸæ›¸ãè¾¼ã¿ãŒå½¹ç«‹ã¡ã¾ã™ã€‚ +::: + +#### テーブルã®ä½œæˆ +```sql +CREATE TABLE p +( + `column1` UInt32, + `column2` UInt32, + `column3` UInt32 +) +ENGINE = S3( +# highlight-next-line + 'http://minio:10000/clickhouse//test_{_partition_id}.csv', + 'minioadmin', + 'minioadminpassword', + 'CSV') +PARTITION BY column3 +``` + +#### データã®æŒ¿å…¥ +```sql +insert into p values (1, 2, 3), (3, 2, 1), (78, 43, 45) +``` + +#### パーティション 3 ã‹ã‚‰ã®é¸æŠž + +:::tip +ã“ã®ã‚¯ã‚¨ãƒªã¯s3テーブル関数を使用ã—ã¦ã„ã¾ã™ +::: + +```sql +SELECT * +FROM s3('http://minio:10000/clickhouse//test_3.csv', 'minioadmin', 'minioadminpassword', 'CSV') +``` +```response +┌─c1─┬─c2─┬─c3─┠+│ 1 │ 2 │ 3 │ +└────┴────┴────┘ +``` + +#### パーティション 1 ã‹ã‚‰ã®é¸æŠž +```sql +SELECT * +FROM s3('http://minio:10000/clickhouse//test_1.csv', 'minioadmin', 'minioadminpassword', 'CSV') +``` +```response +┌─c1─┬─c2─┬─c3─┠+│ 3 │ 2 │ 1 │ +└────┴────┴────┘ +``` + +#### パーティション 45 ã‹ã‚‰ã®é¸æŠž +```sql +SELECT * +FROM s3('http://minio:10000/clickhouse//test_45.csv', 'minioadmin', 'minioadminpassword', 'CSV') +``` +```response +┌─c1─┬─c2─┬─c3─┠+│ 78 │ 43 │ 45 │ +└────┴────┴────┘ +``` + +#### åˆ¶é™ + +当然 `Select * from p` を試ã—ã¦ã¿ãŸããªã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€å‰è¿°ã®é€šã‚Šã€ã“ã®ã‚¯ã‚¨ãƒªã¯å¤±æ•—ã—ã¾ã™ã€‚å‰ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¦ãã ã•ã„。 + +```sql +SELECT * FROM p +``` +```response +Received exception from server (version 23.4.1): +Code: 48. DB::Exception: Received from localhost:9000. DB::Exception: Reading from a partitioned S3 storage is not implemented yet. (NOT_IMPLEMENTED) +``` + +## 仮想カラム {#virtual-columns} + +- `_path` — ファイルã¸ã®ãƒ‘ス。型: `LowCardinalty(String)`。 +- `_file` — ファイルå。型: `LowCardinalty(String)`。 +- `_size` — ファイルã®ãƒã‚¤ãƒˆå˜ä½ã®ã‚µã‚¤ã‚ºã€‚åž‹: `Nullable(UInt64)`。サイズãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL`。 +- `_time` — ファイルã®æœ€çµ‚変更時間。型: `Nullable(DateTime)`。時間ãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL`。 +- `_etag` — ファイルã®ETag。型: `LowCardinalty(String)`。ETagãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL`。 + +仮想カラムã«ã¤ã„ã¦ã®è©³ç´°ã¯[ã“ã¡ã‚‰](../../../engines/table-engines/index.md#table_engines-virtual_columns)ã‚’ã”覧ãã ã•ã„。 + +## 実装ã®è©³ç´° {#implementation-details} + +- 読ã¿æ›¸ãã¯ä¸¦è¡Œã—ã¦è¡Œã†ã“ã¨ãŒå¯èƒ½ +- サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“: + - `ALTER` ãŠã‚ˆã³ `SELECT...SAMPLE` æ“作。 + - インデックス。 + - [ゼロコピーã®](../../../operations/storing-data.md#zero-copy)レプリケーションã¯å¯èƒ½ã§ã™ãŒã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + + :::note + プロダクションã«ã¯ã‚¼ãƒ­ã‚³ãƒ”ーã®ãƒ¬ãƒ—リケーションã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“ + ゼロコピーã®ãƒ¬ãƒ—リケーションã¯ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³22.8以é™ã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ãƒ—ロダクション環境ã§ã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + ::: + +## パス内ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ {#wildcards-in-path} + +`path` 引数ã¯bashã®ã‚ˆã†ãªãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’用ã„ã¦è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’指定ã§ãã¾ã™ã€‚処ç†ã•ã‚Œã‚‹ãŸã‚ã«ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã—ã€ãƒ‘スパターン全体ã«ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ファイルã®ãƒªã‚¹ãƒˆã¯ `SELECT` 時ã«æ±ºå®šã•ã‚Œã¾ã™ï¼ˆ`CREATE` ã®æ™‚点ã§ã¯ã‚ã‚Šã¾ã›ã‚“)。 + +- `*` — `/` を除ãä»»æ„ã®æ•°ã®ä»»æ„ã®æ–‡å­—を空文字列もå«ã‚ã¦ä»£æ›¿ã—ã¾ã™ã€‚ +- `**` — `/` ã‚’å«ã‚€ä»»æ„ã®æ•°ã®ä»»æ„ã®æ–‡å­—を空文字列もå«ã‚ã¦ä»£æ›¿ã—ã¾ã™ã€‚ +- `?` — ä»»æ„ã®å˜ä¸€ã®æ–‡å­—を代替ã—ã¾ã™ã€‚ +- `{some_string,another_string,yet_another_one}` — 文字列 `'some_string', 'another_string', 'yet_another_one'` ã®ã„ãšã‚Œã‹ã‚’代替ã—ã¾ã™ã€‚ +- `{N..M}` — Nã‹ã‚‰Mã¾ã§ã®ç¯„囲ã®ã„ãšã‚Œã‹ã®æ•°ã‚’å«ã‚€ã€‚範囲ã«ã¯Nã¨Mã‚‚å«ã¾ã‚Œã¾ã™ã€‚NãŠã‚ˆã³Mã¯å…ˆé ­ã«ã‚¼ãƒ­ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆä¾‹ï¼š`000..078`)。 + +`{}` を使ã£ãŸæ§‹é€ ã¯ã€[remote](../../../sql-reference/table-functions/remote.md) テーブル関数ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +:::note +ファイルã®ãƒªã‚¹ãƒˆã«å…ˆé ­ã«ã‚¼ãƒ­ãŒã‚る数値ã®ç¯„囲をå«ã‚€å ´åˆã€å„æ¡ã”ã¨ã«ã‹ã£ã“ã§æ§‹æˆã™ã‚‹ã‹ã€ã¾ãŸã¯ `?` を使用ã—ã¦ãã ã•ã„。 +::: + +**ワイルドカードを使用ã—ãŸä¾‹ 1** + +ファイルå㌠`file-000.csv`, `file-001.csv`, ... , `file-999.csv` ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ + +``` sql +CREATE TABLE big_table (name String, value UInt32) + ENGINE = S3('https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/my_folder/file-{000..999}.csv', 'CSV'); +``` + +**ワイルドカードを使用ã—ãŸä¾‹ 2** + +S3ã«ã¯CSVフォーマットã®ä»¥ä¸‹ã®URIã‚’æŒã¤ã„ãã¤ã‹ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š + +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/some_folder/some_file_1.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/some_folder/some_file_2.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/some_folder/some_file_3.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/another_folder/some_file_1.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/another_folder/some_file_2.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/another_folder/some_file_3.csv' + +ã“れら6ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’構æˆã™ã‚‹ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹æ–¹æ³•ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +1. ファイルã®æŽ¥å°¾è¾žã®ç¯„囲を指定ã—ã¾ã™ï¼š + +``` sql +CREATE TABLE table_with_range (name String, value UInt32) + ENGINE = S3('https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/{some,another}_folder/some_file_{1..3}', 'CSV'); +``` + +2. `some_file_` プレフィックスをæŒã¤ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å–å¾—ã—ã¾ã™ï¼ˆä¸¡æ–¹ã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«ãã®ã‚ˆã†ãªãƒ—レフィックスã®ä½™åˆ†ãªãƒ•ã‚¡ã‚¤ãƒ«ãŒãªã„ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„): + +``` sql +CREATE TABLE table_with_question_mark (name String, value UInt32) + ENGINE = S3('https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/{some,another}_folder/some_file_?', 'CSV'); +``` + +3. 両方ã®ãƒ•ã‚©ãƒ«ãƒ€å†…ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å–å¾—ã—ã¾ã™ï¼ˆã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚¯ã‚¨ãƒªã§èª¬æ˜Žã•ã‚Œã¦ã„るフォーマットã¨ã‚¹ã‚­ãƒ¼ãƒžã‚’満ãŸã™å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ï¼š + +``` sql +CREATE TABLE table_with_asterisk (name String, value UInt32) + ENGINE = S3('https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/{some,another}_folder/*', 'CSV'); +``` + +## ストレージ設定 {#storage-settings} + +- [s3_truncate_on_insert](/docs/ja/operations/settings/settings.md#s3_truncate_on_insert) - 挿入ã™ã‚‹å‰ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’切り詰ã‚ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [s3_create_new_file_on_insert](/docs/ja/operations/settings/settings.md#s3_create_new_file_on_insert) - フォーマットã«æŽ¥å°¾è¾žãŒä»˜ã„ã¦ã„ã‚‹å ´åˆã€æŒ¿å…¥ã”ã¨ã«æ–°ã—ã„ファイルを作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [s3_skip_empty_files](/docs/ja/operations/settings/settings.md#s3_skip_empty_files) - 読ã¿å–り中ã«ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ + +## S3ã«é–¢é€£ã—ãŸè¨­å®š {#settings} + +以下ã®è¨­å®šã¯ã‚¯ã‚¨ãƒªå®Ÿè¡Œå‰ã«è¨­å®šã§ãã‚‹ã‹ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«é…ç½®ã§ãã¾ã™ã€‚ + +- `s3_max_single_part_upload_size` — S3ã¸ã®å˜ä¸€ãƒ‘ートアップロードを使用ã—ãŸã‚ªãƒ–ジェクトをアップロードã™ã‚‹éš›ã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚デフォルト値㯠`32Mb`。 +- `s3_min_upload_part_size` — [S3マルãƒãƒ‘ートアップロード](https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)中ã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹ãƒ‘ートã®æœ€å°ã‚µã‚¤ã‚ºã€‚デフォルト値㯠`16Mb`。 +- `s3_max_redirects` — 許å¯ã•ã‚Œã‚‹S3リダイレクトホップã®æœ€å¤§æ•°ã€‚デフォルト値㯠`10`。 +- `s3_single_read_retries` — å˜ä¸€ã®èª­ã¿å–り中ã®è©¦è¡Œæœ€å¤§æ•°ã€‚デフォルト値㯠`4`。 +- `s3_max_put_rps` — スロットリングå‰ã®1秒ã‚ãŸã‚Šã®æœ€å¤§PUTリクエスト数。デフォルト値㯠`0` (無制é™)。 +- `s3_max_put_burst` — 秒å˜ä½ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆåˆ¶é™ã«é”ã™ã‚‹å‰ã«åŒæ™‚ã«ç™ºè¡Œã§ãる最大リクエスト数。デフォルトã§ã¯ (`0`値) `s3_max_put_rps` ã«ç­‰ã—ã„。 +- `s3_max_get_rps` — スロットリングå‰ã®1秒ã‚ãŸã‚Šã®æœ€å¤§GETリクエスト数。デフォルト値㯠`0` (無制é™)。 +- `s3_max_get_burst` — 秒å˜ä½ã®GETリクエスト制é™ã«é”ã™ã‚‹å‰ã«åŒæ™‚ã«ç™ºè¡Œã§ãる最大リクエスト数。デフォルトã§ã¯ (`0`値) `s3_max_get_rps` ã«ç­‰ã—ã„。 +- `s3_upload_part_size_multiply_factor` - S3ã«ä¸€åº¦ã«æ›¸ãè¾¼ã¿ã•ã‚ŒãŸå¾Œã« `s3_multiply_parts_count_threshold` パートãŒã‚¢ãƒƒãƒ—ロードã•ã‚Œã‚‹ãŸã³ã« `s3_min_upload_part_size` ã‚’ã“ã®ãƒ•ã‚¡ã‚¯ã‚¿ãƒ¼ã§æŽ›ã‘ç®—ã—ã¾ã™ã€‚デフォルト値㯠`2`。 +- `s3_upload_part_size_multiply_parts_count_threshold` - S3ã«ç‰¹å®šã®æ•°ã®ãƒ‘ートãŒã‚¢ãƒƒãƒ—ロードã•ã‚Œã‚‹ãŸã³ã«ã€`s3_min_upload_part_size` 㯠`s3_upload_part_size_multiply_factor` ã§æŽ›ã‘ç®—ã•ã‚Œã¾ã™ã€‚デフォルト値㯠`500`。 +- `s3_max_inflight_parts_for_one_file` - 1ã¤ã®ã‚ªãƒ–ジェクトã®ãŸã‚ã«åŒæ™‚ã«å®Ÿè¡Œå¯èƒ½ãªPUTリクエストã®æ•°ã‚’制é™ã—ã¾ã™ã€‚制é™ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚値 `0` ã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚デフォルト値㯠`20`。飛行中ã®å„パートã¯ã€æœ€åˆã® `s3_upload_part_size_multiply_factor` パート㧠`s3_min_upload_part_size` ã®ã‚µã‚¤ã‚ºã§ãƒãƒƒãƒ•ã‚¡ã‚’æŒã¡ã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒéžå¸¸ã«å¤§ãã„å ´åˆã«ã¯ã‚ˆã‚Šå¤šããªã‚Šã¾ã™ã€`upload_part_size_multiply_factor` ã‚’å‚ç…§ã—ã¦ãã ã•ã„。デフォルト設定ã§ã€ã‚¢ãƒƒãƒ—ロードã•ã‚Œã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã¯ `8G`未満ã®å ´åˆã¯ `320Mb`以上を消費ã—ã¾ã›ã‚“。消費ã¯ã‚ˆã‚Šå¤§ããªãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯ã•ã‚‰ã«å¤§ãããªã‚Šã¾ã™ã€‚ + +セキュリティã®è€ƒæ…®ç‚¹: ä»»æ„ã®S3 URLを指定å¯èƒ½ãªæ‚ªæ„ã®ã‚るユーザーãŒã„ãŸå ´åˆã€`s3_max_redirects` をゼロã«è¨­å®šã—㦠[SSRF](https://en.wikipedia.org/wiki/Server-side_request_forgery) 攻撃を回é¿ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã¯ã€ã‚µãƒ¼ãƒãƒ¼æ§‹æˆã§ `remote_host_filter` を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## エンドãƒã‚¤ãƒ³ãƒˆãƒ™ãƒ¼ã‚¹ã®è¨­å®š {#endpoint-settings} + +以下ã®è¨­å®šã¯ã€ç‰¹å®šã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆï¼ˆURLã®æ­£ç¢ºãªãƒ—レフィックスã¨ä¸€è‡´ã™ã‚‹ï¼‰ã«å¯¾ã—ã¦æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã§æŒ‡å®šã§ãã¾ã™ï¼š + +- `endpoint` — エンドãƒã‚¤ãƒ³ãƒˆã®ãƒ—レフィックスを指定ã—ã¾ã™ã€‚å¿…é ˆã§ã™ã€‚ +- `access_key_id` 㨠`secret_access_key` — 特定ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã«ä½¿ç”¨ã™ã‚‹ã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ã‚’指定ã—ã¾ã™ã€‚ä»»æ„ã§ã™ã€‚ +- `use_environment_credentials` — `true` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€S3クライアントã¯ç’°å¢ƒå¤‰æ•°ã¨ [Amazon EC2](https://en.wikipedia.org/wiki/Amazon_Elastic_Compute_Cloud) メタデータã‹ã‚‰ã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ã‚’å–å¾—ã—よã†ã¨ã—ã¾ã™ã€‚ä»»æ„ã§ã™ã€‚デフォルト値㯠`false`。 +- `region` — S3リージョンåを指定ã—ã¾ã™ã€‚ä»»æ„ã§ã™ã€‚ +- `use_insecure_imds_request` — `true` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€S3クライアントã¯Amazon EC2メタデータã‹ã‚‰ã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ã‚’å–å¾—ã™ã‚‹éš›ã«ä¸å®‰å…¨ãªIMDSリクエストを使用ã—ã¾ã™ã€‚ä»»æ„ã§ã™ã€‚デフォルト値㯠`false`。 +- `expiration_window_seconds` — 期é™ãƒ™ãƒ¼ã‚¹ã®ã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ãŒæœŸé™åˆ‡ã‚Œã‹ã©ã†ã‹ã‚’確èªã™ã‚‹ãŸã‚ã®çŒ¶äºˆæœŸé–“。任æ„ã§ã™ã€‚デフォルト値㯠`120`。 +- `no_sign_request` - ã™ã¹ã¦ã®ã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ã‚’無視ã—ã¦ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒç½²åã•ã‚Œãªã„よã†ã«ã—ã¾ã™ã€‚公開ãƒã‚±ãƒƒãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹éš›ã«ä¾¿åˆ©ã§ã™ã€‚ +- `header` — 特定ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«æŒ‡å®šã•ã‚ŒãŸHTTPヘッダを追加ã—ã¾ã™ã€‚ä»»æ„ã§ã€è¤‡æ•°å›žæŒ‡å®šã§ãã¾ã™ã€‚ +- `access_header` - ä»–ã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰ã®ã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ãŒãªã„å ´åˆã€ç‰¹å®šã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆç”¨ã«æŒ‡å®šã•ã‚ŒãŸHTTPヘッダーを追加ã—ã¾ã™ã€‚ +- `server_side_encryption_customer_key_base64` — 指定ã•ã‚ŒãŸå ´åˆã€SSE-Cæš—å·åŒ–ã§S3オブジェクトã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«å¿…è¦ãªãƒ˜ãƒƒãƒ€ãƒ¼ãŒã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ä»»æ„ã§ã™ã€‚ +- `server_side_encryption_kms_key_id` - 指定ã•ã‚ŒãŸå ´åˆã€[SSE-KMSæš—å·åŒ–](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html)ã•ã‚ŒãŸS3オブジェクトã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«å¿…è¦ãªãƒ˜ãƒƒãƒ€ãƒ¼ãŒã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚空ã®æ–‡å­—列ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€AWS管ç†ã®S3キーãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ä»»æ„ã§ã™ã€‚ +- `server_side_encryption_kms_encryption_context` - `server_side_encryption_kms_key_id` ã¨å…±ã«æŒ‡å®šã•ã‚ŒãŸå ´åˆã€SSE-KMSã®ãŸã‚ã®æŒ‡å®šã•ã‚ŒãŸæš—å·åŒ–コンテキストヘッダーãŒã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ä»»æ„ã§ã™ã€‚ +- `server_side_encryption_kms_bucket_key_enabled` - `server_side_encryption_kms_key_id` ã¨å…±ã«æŒ‡å®šã•ã‚ŒãŸå ´åˆã€SSE-KMSã®ãŸã‚ã«S3ãƒã‚±ãƒƒãƒˆã‚­ãƒ¼ã‚’有効ã«ã™ã‚‹ãŸã‚ã®ãƒ˜ãƒƒãƒ€ãƒ¼ãŒã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚オプションã§ã€`true`ã¾ãŸã¯`false`を設定ã§ãã¾ã™ã€‚デフォルトã§ã¯ä½•ã‚‚設定ã•ã‚Œã¦ã„ã¾ã›ã‚“(ãƒã‚±ãƒƒãƒˆãƒ¬ãƒ™ãƒ«è¨­å®šã«ä¸€è‡´ï¼‰ã€‚ +- `max_single_read_retries` — å˜ä¸€ã®èª­ã¿å–り中ã®è©¦è¡Œæœ€å¤§æ•°ã€‚デフォルト値㯠`4`。任æ„ã§ã™ã€‚ +- `max_put_rps`, `max_put_burst`, `max_get_rps`, `max_get_burst` - 特定ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªå˜ä½ã§ã¯ãªã使用ã™ã‚‹ã‚¹ãƒ­ãƒƒãƒˆãƒªãƒ³ã‚°è¨­å®šï¼ˆä¸Šè¨˜èª¬æ˜Žå‚照)。任æ„ã§ã™ã€‚ + +**例:** + +``` xml + + + https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/ + + + + + + + + + + + + + + + +``` + +## アーカイブã®æ“作 + +S3ã«ã‚る以下ã®URIã®è¤‡æ•°ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ファイルãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š + +- 'https://s3-us-west-1.amazonaws.com/umbrella-static/top-1m-2018-01-10.csv.zip' +- 'https://s3-us-west-1.amazonaws.com/umbrella-static/top-1m-2018-01-11.csv.zip' +- 'https://s3-us-west-1.amazonaws.com/umbrella-static/top-1m-2018-01-12.csv.zip' + +ã“れらã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’抽出ã™ã‚‹ã“ã¨ãŒ `::` を使用ã—ã¦å¯èƒ½ã§ã™ã€‚グロブã¯URL部分ã¨ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–内ã®ãƒ•ã‚¡ã‚¤ãƒ«åを担当ã™ã‚‹éƒ¨åˆ†ã®ä¸¡æ–¹ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +``` sql +SELECT * +FROM s3( + 'https://s3-us-west-1.amazonaws.com/umbrella-static/top-1m-2018-01-1{0..2}.csv.zip :: *.csv' +); +``` + +:::note +ClickHouseã¯æ¬¡ã®3ã¤ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–フォーマットをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š +ZIP +TAR +7Z +ZIPãŠã‚ˆã³TARアーカイブã¯ä»»æ„ã®ã‚µãƒãƒ¼ãƒˆã•ã‚ŒãŸã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ãŒã€7Zアーカイブã¯ClickHouseãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„るローカルファイルシステムã‹ã‚‰ã®ã¿èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + + +## 公開ãƒã‚±ãƒƒãƒˆã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ + +ClickHouseã¯ã•ã¾ã–ã¾ãªç¨®é¡žã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰ã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ã‚’å–å¾—ã—よã†ã¨ã—ã¾ã™ã€‚ +時ã¨ã—ã¦ã€ã“ã®ã“ã¨ãŒã€ãƒ‘ブリックã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãる一部ã®ãƒã‚±ãƒƒãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹éš›ã«å•é¡Œã‚’引ãèµ·ã“ã—ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒ `403` エラーコードを返ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã®å•é¡Œã¯ã€`NOSIGN` キーワードを使用ã—ã¦ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã™ã¹ã¦ã®ã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ã‚’無視ã—ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚µã‚¤ãƒ³ã‚’ã—ãªã„よã†ã«ã™ã‚‹ã“ã¨ã§å›žé¿ã§ãã¾ã™ã€‚ + +``` sql +CREATE TABLE big_table (name String, value UInt32) + ENGINE = S3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/aapl_stock.csv', NOSIGN, 'CSVWithNames'); +``` + +## パフォーマンスã®æœ€é©åŒ– + +s3 関数ã®ãƒ‘フォーマンス最é©åŒ–ã«é–¢ã™ã‚‹è©³ç´°ã¯[詳細ガイド](/docs/ja/integrations/s3/performance)ã‚’ã”覧ãã ã•ã„。 + +## 関連情報 + +- [s3 テーブル関数](../../../sql-reference/table-functions/s3.md) diff --git a/docs/ja/engines/table-engines/integrations/s3queue.md b/docs/ja/engines/table-engines/integrations/s3queue.md new file mode 100644 index 00000000000..639e6373de8 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/s3queue.md @@ -0,0 +1,365 @@ +--- +slug: /ja/engines/table-engines/integrations/s3queue +sidebar_position: 181 +sidebar_label: S3Queue +--- + +# S3Queue テーブルエンジン + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ [Amazon S3](https://aws.amazon.com/s3/) エコシステムã¨ã®çµ±åˆã‚’æä¾›ã—ã€ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã‚¤ãƒ³ãƒãƒ¼ãƒˆã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ [Kafka](../../../engines/table-engines/integrations/kafka.md)ã€[RabbitMQ](../../../engines/table-engines/integrations/rabbitmq.md) エンジンã«ä¼¼ã¦ã„ã¾ã™ãŒã€S3 特有ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE s3_queue_engine_table (name String, value UInt32) + ENGINE = S3Queue(path, [NOSIGN, | aws_access_key_id, aws_secret_access_key,] format, [compression]) + [SETTINGS] + [mode = '',] + [after_processing = 'keep',] + [keeper_path = '',] + [loading_retries = 0,] + [processing_threads_num = 1,] + [enable_logging_to_s3queue_log = 0,] + [polling_min_timeout_ms = 1000,] + [polling_max_timeout_ms = 10000,] + [polling_backoff_ms = 0,] + [tracked_file_ttl_sec = 0,] + [tracked_files_limit = 1000,] + [cleanup_interval_min_ms = 10000,] + [cleanup_interval_max_ms = 30000,] +``` + +:::warning +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ `24.7` 以å‰ã§ã¯ã€`mode`ã€`after_processing`ã€`keeper_path` を除ãã™ã¹ã¦ã®è¨­å®šã« `s3queue_` プレフィックスを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**エンジンパラメータ** + +`S3Queue` ã®ãƒ‘ラメータ㯠`S3` テーブルエンジンãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã‚‚ã®ã¨åŒã˜ã§ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](../../../engines/table-engines/integrations/s3.md#parameters)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**例** + +```sql +CREATE TABLE s3queue_engine_table (name String, value UInt32) +ENGINE=S3Queue('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/*', 'CSV', 'gzip') +SETTINGS + mode = 'unordered'; +``` + +ãƒãƒ¼ãƒ ãƒ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’使用ã™ã‚‹å ´åˆï¼š + +``` xml + + + + 'https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/* + test + test + + + +``` + +```sql +CREATE TABLE s3queue_engine_table (name String, value UInt32) +ENGINE=S3Queue(s3queue_conf, format = 'CSV', compression_method = 'gzip') +SETTINGS + mode = 'ordered'; +``` + +## 設定 {#settings} + +テーブルã«è¨­å®šã•ã‚ŒãŸè¨­å®šã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã™ã‚‹ã«ã¯ã€`system.s3_queue_settings` テーブルを使用ã—ã¾ã™ã€‚`24.10` ã‹ã‚‰ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +### mode {#mode} + +å¯èƒ½ãªå€¤ï¼š + +- unordered — ç„¡é †åºãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ã™ã§ã«å‡¦ç†ã•ã‚ŒãŸã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚»ãƒƒãƒˆãŒ ZooKeeper ã®æŒç¶šçš„ãªãƒŽãƒ¼ãƒ‰ã§è¿½è·¡ã•ã‚Œã¾ã™ã€‚ +- ordered — é †åºä»˜ãモードã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã¯è¾žæ›¸é †ã§å‡¦ç†ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚る時点㧠'BBB' ã¨ã„ã†åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå‡¦ç†ã•ã‚Œã€å¾Œã§ 'AA' ã¨ã„ã†åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒãƒã‚±ãƒƒãƒˆã«è¿½åŠ ã•ã‚ŒãŸå ´åˆã€ç„¡è¦–ã•ã‚Œã¾ã™ã€‚辞書的ãªæ„味ã§ã®æœ€å¤§ã®åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¨ã€èª­ã¿è¾¼ã¿ãŒå¤±æ•—ã—ãŸå¾Œã«å†è©¦è¡Œã•ã‚Œã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®åå‰ã®ã¿ãŒ ZooKeeper ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +デフォルト値:ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 24.6 よりå‰ã¯ `ordered`。24.6 以é™ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒãªãã€æ‰‹å‹•ã§è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯ã€ä¸‹ä½äº’æ›æ€§ã®ãŸã‚ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒ `Ordered` ã®ã¾ã¾ã¨ãªã‚Šã¾ã™ã€‚ + +### after_processing {#after_processing} + +処ç†ãŒæˆåŠŸã—ãŸå¾Œã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’削除ã¾ãŸã¯ä¿æŒã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- keep. +- delete. + +デフォルト値:`keep`。 + +### keeper_path {#keeper_path} + +ZooKeeper ã®ãƒ‘スã¯ãƒ†ãƒ¼ãƒ–ルエンジンã®è¨­å®šã¨ã—ã¦æŒ‡å®šã™ã‚‹ã‹ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«è¨­å®šã‹ã‚‰æä¾›ã•ã‚Œã‚‹ãƒ‘スã¨ãƒ†ãƒ¼ãƒ–ル UUID ã‹ã‚‰ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‘スを形æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 文字列。 + +デフォルト値:`/`。 + +### s3queue_loading_retries {#loading_retries} + +指定ã•ã‚ŒãŸå›žæ•°ã¾ã§ãƒ•ã‚¡ã‚¤ãƒ«ã®èª­ã¿è¾¼ã¿ã‚’å†è©¦è¡Œã—ã¾ã™ã€‚デフォルトã§ã¯å†è©¦è¡Œã¯ã‚ã‚Šã¾ã›ã‚“。 + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値:`0`。 + +### s3queue_processing_threads_num {#processing_threads_num} + +処ç†ã‚’è¡Œã†ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’指定ã—ã¾ã™ã€‚`Unordered` モードã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +デフォルト値:`1`。 + +### s3queue_enable_logging_to_s3queue_log {#enable_logging_to_s3queue_log} + +`system.s3queue_log` ã¸ã®ãƒ­ã‚°ã‚’有効ã«ã—ã¾ã™ã€‚ + +デフォルト値:`0`。 + +### s3queue_polling_min_timeout_ms {#polling_min_timeout_ms} + +次回ã®ãƒãƒ¼ãƒªãƒ³ã‚°ã¾ã§ã®æœ€å°ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆãƒŸãƒªç§’å˜ä½ï¼‰ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値:`1000`。 + +### s3queue_polling_max_timeout_ms {#polling_max_timeout_ms} + +次回ã®ãƒãƒ¼ãƒªãƒ³ã‚°ã¾ã§ã®æœ€å¤§ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆãƒŸãƒªç§’å˜ä½ï¼‰ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値:`10000`。 + +### s3queue_polling_backoff_ms {#polling_backoff_ms} + +ãƒãƒ¼ãƒªãƒ³ã‚°ã®ãƒãƒƒã‚¯ã‚ªãƒ•ï¼ˆãƒŸãƒªç§’å˜ä½ï¼‰ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値:`0`。 + +### s3queue_tracked_files_limit {#tracked_files_limit} + +「unorderedã€ãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã« Zookeeper ノードã®æ•°ã‚’制é™ã™ã‚‹ã“ã¨ãŒã§ãã€ã€Œorderedã€ãƒ¢ãƒ¼ãƒ‰ã§ã¯ä½•ã‚‚è¡Œã„ã¾ã›ã‚“。制é™ã«é”ã—ãŸå ´åˆã€ZooKeeper ノードã‹ã‚‰æœ€ã‚‚å¤ã„処ç†æ¸ˆã¿ãƒ•ã‚¡ã‚¤ãƒ«ãŒå‰Šé™¤ã•ã‚Œã€å†å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値:`1000`。 + +### s3queue_tracked_file_ttl_sec {#tracked_file_ttl_sec} + +「unorderedã€ãƒ¢ãƒ¼ãƒ‰ã§ ZooKeeper ノードã«ä¿å­˜ã•ã‚Œã‚‹å‡¦ç†æ¸ˆã¿ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿å­˜ã™ã‚‹ç§’数(デフォルトã§ã¯æ°¸ä¹…ä¿å­˜ï¼‰ã€`ordered` モードã®å ´åˆã¯ä½•ã‚‚ã—ã¾ã›ã‚“。指定ã•ã‚ŒãŸç§’数後ã€ãƒ•ã‚¡ã‚¤ãƒ«ã¯å†ã‚¤ãƒ³ãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値:`0`。 + +### s3queue_cleanup_interval_min_ms {#cleanup_interval_min_ms} + +「Orderedã€ãƒ¢ãƒ¼ãƒ‰ã®å ´åˆã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¿ã‚¹ã‚¯ã®å†ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«é–“éš”ã®æœ€å°å¢ƒç•Œã‚’定義ã—ã¾ã™ã€‚ã“ã®ã‚¿ã‚¹ã‚¯ã¯ã€è¿½è·¡ãƒ•ã‚¡ã‚¤ãƒ«ã® TTL ã¨æœ€å¤§è¿½è·¡ãƒ•ã‚¡ã‚¤ãƒ«ã‚»ãƒƒãƒˆã®ç®¡ç†ã‚’担当ã—ã¾ã™ã€‚ + +デフォルト値:`10000`。 + +### s3queue_cleanup_interval_max_ms {#cleanup_interval_max_ms} + +「Orderedã€ãƒ¢ãƒ¼ãƒ‰ã®å ´åˆã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¿ã‚¹ã‚¯ã®å†ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«é–“éš”ã®æœ€å¤§å¢ƒç•Œã‚’定義ã—ã¾ã™ã€‚ã“ã®ã‚¿ã‚¹ã‚¯ã¯ã€è¿½è·¡ãƒ•ã‚¡ã‚¤ãƒ«ã® TTL ã¨æœ€å¤§è¿½è·¡ãƒ•ã‚¡ã‚¤ãƒ«ã‚»ãƒƒãƒˆã®ç®¡ç†ã‚’担当ã—ã¾ã™ã€‚ + +デフォルト値:`30000`。 + +### s3queue_buckets {#buckets} + +「Orderedã€ãƒ¢ãƒ¼ãƒ‰ã®å ´åˆã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³ `24.6` ã‹ã‚‰ä½¿ç”¨å¯èƒ½ã§ã™ã€‚S3Queue テーブルã®è¤‡æ•°ã®ãƒ¬ãƒ—リカãŒåŒã˜ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§å‹•ä½œã—ã¦ã„ã‚‹å ´åˆã€`s3queue_buckets` ã®å€¤ã¯å°‘ãªãã¨ã‚‚レプリカã®æ•°ã«ç­‰ã—ãã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`s3queue_processing_threads` 設定ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€`s3queue_buckets` 設定ã®å€¤ã‚’ã•ã‚‰ã«å¤§ããã™ã‚‹ã“ã¨ãŒå¦¥å½“ã§ã™ã€‚ã“れ㯠`S3Queue` 処ç†ã®å®Ÿéš›ã®ä¸¦è¡Œæ€§ã‚’定義ã™ã‚‹ãŸã‚ã§ã™ã€‚ + +## S3 関連ã®è¨­å®š {#s3-settings} + +エンジンã¯ã™ã¹ã¦ã® S3 関連ã®è¨­å®šã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚S3 設定ã«é–¢ã™ã‚‹è©³ç´°ã¯[ã“ã¡ã‚‰](../../../engines/table-engines/integrations/s3.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## S3Queue é †åºä»˜ãモード {#ordered-mode} + +`S3Queue` ã®å‡¦ç†ãƒ¢ãƒ¼ãƒ‰ã¯ã€ZooKeeper ã«ä¿å­˜ã™ã‚‹ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å°‘ãªãã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€æ™‚é–“çš„ã«ã‚ã¨ã§è¿½åŠ ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚¢ãƒ«ãƒ•ã‚¡ãƒ™ãƒƒãƒˆé †ã§ã‚ˆã‚Šå¤§ããªåå‰ã‚’æŒã¤å¿…è¦ãŒã‚ã‚‹ã¨ã„ã†åˆ¶é™ãŒã‚ã‚Šã¾ã™ã€‚ + +`S3Queue` ã® `ordered` モードã§ã¯ã€`unordered` モードã¨åŒæ§˜ã« `(s3queue_)processing_threads_num` 設定(`s3queue_` プレフィックスã¯ã‚ªãƒ—ション)をサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€`S3` ファイルをサーãƒãƒ¼ã§ãƒ­ãƒ¼ã‚«ãƒ«ã«å‡¦ç†ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’制御ã§ãã¾ã™ã€‚ã•ã‚‰ã«ã€`ordered` モードã¯ã€`(s3queue_)buckets` ã¨ã„ã†è¨­å®šã‚‚å°Žå…¥ã—ã¦ãŠã‚Šã€ã“ã‚Œã¯ã€Œè«–ç†ã‚¹ãƒ¬ãƒƒãƒ‰ã€ã‚’æ„味ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼ã§ `S3Queue` テーブルã®ãƒ¬ãƒ—リカãŒã‚ã‚Šã€ã“ã®è¨­å®šãŒå‡¦ç†å˜ä½ã®æ•°ã‚’定義ã™ã‚‹åˆ†æ•£ã‚·ãƒŠãƒªã‚ªã§ã¯ã€å„ `S3Queue` レプリカã®å„処ç†ã‚¹ãƒ¬ãƒƒãƒ‰ãŒå‡¦ç†ã®ãŸã‚ã«ç‰¹å®šã® `bucket` をロックã—よã†ã¨ã—ã¾ã™ã€‚å„ `bucket` ã¯ãƒ•ã‚¡ã‚¤ãƒ«åã®ãƒãƒƒã‚·ãƒ¥ã«ã‚ˆã£ã¦ç‰¹å®šã®ãƒ•ã‚¡ã‚¤ãƒ«ã«é–¢é€£ä»˜ã‘られã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€åˆ†æ•£ã‚·ãƒŠãƒªã‚ªã§ã¯ã€`(s3queue_)buckets` 設定ãŒãƒ¬ãƒ—リカã®æ•°ä»¥ä¸Šã§ã‚ã‚‹ã“ã¨ãŒå¼·ã推奨ã•ã‚Œã¾ã™ã€‚ãƒã‚±ãƒƒãƒˆã®æ•°ãŒãƒ¬ãƒ—リカã®æ•°ã‚ˆã‚Šã‚‚多ã„ã®ã¯å•é¡Œã‚ã‚Šã¾ã›ã‚“。最も最é©ãªã‚·ãƒŠãƒªã‚ªã¯ã€`(s3queue_)buckets` 設定㌠`number_of_replicas` 㨠`(s3queue_)processing_threads_num` ã®ç©ã¨ç­‰ã—ã„ã“ã¨ã§ã™ã€‚ + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ `24.6` よりå‰ã§ã¯ `(s3queue_)processing_threads_num` 設定ã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ `24.6` ã‹ã‚‰ã¯ `(s3queue_)buckets` 設定ãŒä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +## 説明 {#description} + +`SELECT` ã¯ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã‚¤ãƒ³ãƒãƒ¼ãƒˆã«ã¯ç‰¹ã«æœ‰ç”¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“(デãƒãƒƒã‚°ã‚’除ã)ã®ã§ã€å„ファイルã¯ä¸€åº¦ã—ã‹ã‚¤ãƒ³ãƒãƒ¼ãƒˆã§ãã¾ã›ã‚“。実際ã«ã¯ã€[マテリアライズドビュー](../../../sql-reference/statements/create/view.md)を使用ã—ã¦ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’作æˆã™ã‚‹æ–¹ãŒå®Ÿç”¨çš„ã§ã™ã€‚ã“れを行ã†ã«ã¯ï¼š + +1. S3 ã®æŒ‡å®šã•ã‚ŒãŸãƒ‘スã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’消費ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルをエンジンを使ã£ã¦ä½œæˆã—ã€ãれをデータストリームã¨è¦‹ãªã—ã¾ã™ã€‚ +2. 希望ã™ã‚‹æ§‹é€ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ +3. エンジンã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã—ã€å‰ã«ä½œæˆã—ãŸãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’投入ã™ã‚‹ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを作æˆã—ã¾ã™ã€‚ + +`MATERIALIZED VIEW` ãŒã‚¨ãƒ³ã‚¸ãƒ³ã«çµåˆã•ã‚Œã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ãƒ¼ã‚¿ã®åŽé›†ã‚’開始ã—ã¾ã™ã€‚ + +例: + +``` sql + CREATE TABLE s3queue_engine_table (name String, value UInt32) + ENGINE=S3Queue('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/*', 'CSV', 'gzip') + SETTINGS + mode = 'unordered'; + + CREATE TABLE stats (name String, value UInt32) + ENGINE = MergeTree() ORDER BY name; + + CREATE MATERIALIZED VIEW consumer TO stats + AS SELECT name, value FROM s3queue_engine_table; + + SELECT * FROM stats ORDER BY name; +``` + +## 仮想カラム {#virtual-columns} + +- `_path` — ファイルã¸ã®ãƒ‘ス。 +- `_file` — ファイルã®åå‰ã€‚ + +仮想カラムã®è©³ç´°ã¯[ã“ã¡ã‚‰](../../../engines/table-engines/index.md#table_engines-virtual_columns)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## パスã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ {#wildcards-in-path} + +`path` 引数ã¯ã€bash ã®ã‚ˆã†ãªãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’使ã£ã¦è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’指定ã§ãã¾ã™ã€‚処ç†ã•ã‚Œã‚‹ã«ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã—ã€ãƒ‘スパターン全体ã«ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ファイルã®ãƒªã‚¹ãƒˆã¯ `SELECT` 時ã«æ±ºå®šã•ã‚Œã¾ã™ï¼ˆ`CREATE` 時ã§ã¯ã‚ã‚Šã¾ã›ã‚“)。 + +- `*` — `/` を除ãä»»æ„ã®æ–‡å­—ã‚’ä»»æ„ã®å›žæ•°ç½®ãæ›ãˆã¾ã™ï¼ˆç©ºæ–‡å­—列をå«ã‚€ï¼‰ã€‚ +- `**` — `/` ã‚’å«ã‚ã€ä»»æ„ã®æ–‡å­—ã‚’ä»»æ„ã®å›žæ•°ç½®ãæ›ãˆã¾ã™ï¼ˆç©ºæ–‡å­—列をå«ã‚€ï¼‰ã€‚ +- `?` — ä»»æ„ã®å˜ä¸€ã®æ–‡å­—ã‚’ç½®ãæ›ãˆã¾ã™ã€‚ +- `{some_string,another_string,yet_another_one}` — 文字列 `'some_string', 'another_string', 'yet_another_one'` ã®ã„ãšã‚Œã‹ã‚’ç½®ãæ›ãˆã¾ã™ã€‚ +- `{N..M}` — N 㨠M ã‚’å«ã‚€ç¯„囲ã®ä»»æ„ã®æ•°å­—ã‚’ç½®ãæ›ãˆã¾ã™ã€‚N 㨠M ã¯å…ˆè¡Œã‚¼ãƒ­ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ï¼ˆä¾‹ï¼š`000..078`)。 + +`{}` を使ã£ãŸæ§‹ç¯‰ã¯ [remote](../../../sql-reference/table-functions/remote.md) テーブル関数ã¨ä¼¼ã¦ã„ã¾ã™ã€‚ + +## 制é™äº‹é … {#limitations} + +1. é‡è¤‡ã—ãŸè¡ŒãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã®ã¯æ¬¡ã®ã‚ˆã†ãªå ´åˆã§ã™ï¼š + +- ファイル処ç†ã®é€”中ã§è§£æžæ™‚ã«ä¾‹å¤–ãŒç™ºç”Ÿã—ã€`s3queue_loading_retries` ã«ã‚ˆã£ã¦å†è©¦è¡ŒãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€‚ + +- `S3Queue` ㌠zookeeper 内ã®åŒã˜ãƒ‘スを指ã™è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼ã§è¨­å®šã•ã‚Œã€ã‚­ãƒ¼ãƒ‘ーセッションãŒæœŸé™åˆ‡ã‚Œã«ãªã‚‹å‰ã«ã€ã‚るサーãƒãƒ¼ãŒå‡¦ç†æ¸ˆã¿ãƒ•ã‚¡ã‚¤ãƒ«ã‚’コミットã™ã‚‹ã®ã«å¤±æ•—ã—ãŸå ´åˆã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æœ€åˆã®ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦éƒ¨åˆ†çš„ã¾ãŸã¯å®Œå…¨ã«å‡¦ç†ã•ã‚ŒãŸå¯èƒ½æ€§ã®ã‚るファイルを別ã®ã‚µãƒ¼ãƒãƒ¼ãŒå‡¦ç†ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +- 異常ãªã‚µãƒ¼ãƒãƒ¼ã®çµ‚了。 + +2. `S3Queue` ㌠zookeeper 内ã®åŒã˜ãƒ‘スを指ã™è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼ã§è¨­å®šã•ã‚Œã¦ã„ã¦ã€`Ordered` モードãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€`s3queue_loading_retries` ã¯å‹•ä½œã—ã¾ã›ã‚“。ã“ã‚Œã¯ã™ãã«ä¿®æ­£ã•ã‚Œã¾ã™ã€‚ + +## 内部検査 {#introspection} + +内部検査ã«ã¯ã€`system.s3queue` ステートレステーブル㨠`system.s3queue_log` 永続テーブルを使用ã—ã¾ã™ã€‚ + +1. `system.s3queue`。ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯æ°¸ç¶šçš„ã§ã¯ãªãã€`S3Queue` ã®ãƒ¡ãƒ¢ãƒªå†…ã®çŠ¶æ…‹ã‚’示ã—ã¾ã™ï¼šç¾åœ¨å‡¦ç†ä¸­ã®ãƒ•ã‚¡ã‚¤ãƒ«ã€å‡¦ç†æ¸ˆã¿ã¾ãŸã¯å¤±æ•—ã—ãŸãƒ•ã‚¡ã‚¤ãƒ«ã€‚ + +``` sql +┌─statement──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ CREATE TABLE system.s3queue +( + `database` String, + `table` String, + `file_name` String, + `rows_processed` UInt64, + `status` String, + `processing_start_time` Nullable(DateTime), + `processing_end_time` Nullable(DateTime), + `ProfileEvents` Map(String, UInt64) + `exception` String +) +ENGINE = SystemS3Queue +COMMENT 'Contains in-memory state of S3Queue metadata and currently processed rows per file.' │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +例: + +``` sql + +SELECT * +FROM system.s3queue + +Row 1: +────── +zookeeper_path: /clickhouse/s3queue/25ea5621-ae8c-40c7-96d0-cec959c5ab88/3b3f66a1-9866-4c2e-ba78-b6bfa154207e +file_name: wikistat/original/pageviews-20150501-030000.gz +rows_processed: 5068534 +status: Processed +processing_start_time: 2023-10-13 13:09:48 +processing_end_time: 2023-10-13 13:10:31 +ProfileEvents: {'ZooKeeperTransactions':3,'ZooKeeperGet':2,'ZooKeeperMulti':1,'SelectedRows':5068534,'SelectedBytes':198132283,'ContextLock':1,'S3QueueSetFileProcessingMicroseconds':2480,'S3QueueSetFileProcessedMicroseconds':9985,'S3QueuePullMicroseconds':273776,'LogTest':17} +exception: +``` + +2. `system.s3queue_log`。永続的ãªãƒ†ãƒ¼ãƒ–ルã§ã™ã€‚`processed` ãŠã‚ˆã³ `failed` ファイルã«ã¤ã„㦠`system.s3queue` ã¨åŒã˜æƒ…報をæŒã£ã¦ã„ã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +``` sql +SHOW CREATE TABLE system.s3queue_log + +Query id: 0ad619c3-0f2a-4ee4-8b40-c73d86e04314 + +┌─statement──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ CREATE TABLE system.s3queue_log +( + `event_date` Date, + `event_time` DateTime, + `table_uuid` String, + `file_name` String, + `rows_processed` UInt64, + `status` Enum8('Processed' = 0, 'Failed' = 1), + `processing_start_time` Nullable(DateTime), + `processing_end_time` Nullable(DateTime), + `ProfileEvents` Map(String, UInt64), + `exception` String +) +ENGINE = MergeTree +PARTITION BY toYYYYMM(event_date) +ORDER BY (event_date, event_time) +SETTINGS index_granularity = 8192 │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +`system.s3queue_log` を利用ã™ã‚‹ãŸã‚ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã«ãã®è¨­å®šã‚’定義ã—ã¾ã™ï¼š + +``` xml + + system + s3queue_log
+
+``` + +例: + +``` sql +SELECT * +FROM system.s3queue_log + +Row 1: +────── +event_date: 2023-10-13 +event_time: 2023-10-13 13:10:12 +table_uuid: +file_name: wikistat/original/pageviews-20150501-020000.gz +rows_processed: 5112621 +status: Processed +processing_start_time: 2023-10-13 13:09:48 +processing_end_time: 2023-10-13 13:10:12 +ProfileEvents: {'ZooKeeperTransactions':3,'ZooKeeperGet':2,'ZooKeeperMulti':1,'SelectedRows':5112621,'SelectedBytes':198577687,'ContextLock':1,'S3QueueSetFileProcessingMicroseconds':1934,'S3QueueSetFileProcessedMicroseconds':17063,'S3QueuePullMicroseconds':5841972,'LogTest':17} +exception: +``` diff --git a/docs/ja/engines/table-engines/integrations/sqlite.md b/docs/ja/engines/table-engines/integrations/sqlite.md new file mode 100644 index 00000000000..e955e1a7f28 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/sqlite.md @@ -0,0 +1,60 @@ +--- +slug: /ja/engines/table-engines/integrations/sqlite +sidebar_position: 185 +sidebar_label: SQLite +--- + +# SQLite + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€SQLite ã¸ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆãŠã‚ˆã³ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’å¯èƒ½ã«ã—ã€ClickHouse ã‹ã‚‰ç›´æŽ¥ SQLite テーブルã¸ã®ã‚¯ã‚¨ãƒªã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql + CREATE TABLE [IF NOT EXISTS] [db.]table_name + ( + name1 [type1], + name2 [type2], ... + ) ENGINE = SQLite('db_path', 'table') +``` + +**エンジンパラメータ** + +- `db_path` — データベースをå«ã‚€ SQLite ファイルã¸ã®ãƒ‘ス。 +- `table` — SQLite データベース内ã®ãƒ†ãƒ¼ãƒ–ルå。 + +## 使用例 {#usage-example} + +SQLite テーブルを作æˆã™ã‚‹ã‚¯ã‚¨ãƒªã‚’示ã—ã¾ã™ï¼š + +```sql +SHOW CREATE TABLE sqlite_db.table2; +``` + +``` text +CREATE TABLE SQLite.table2 +( + `col1` Nullable(Int32), + `col2` Nullable(String) +) +ENGINE = SQLite('sqlite.db','table2'); +``` + +テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ï¼š + +``` sql +SELECT * FROM sqlite_db.table2 ORDER BY col1; +``` + +```text +┌─col1─┬─col2──┠+│ 1 │ text1 │ +│ 2 │ text2 │ +│ 3 │ text3 │ +└──────┴───────┘ +``` + +**関連項目** + +- [SQLite](../../../engines/database-engines/sqlite.md) エンジン +- [sqlite](../../../sql-reference/table-functions/sqlite.md) テーブル関数 diff --git a/docs/ja/engines/table-engines/integrations/time-series.md b/docs/ja/engines/table-engines/integrations/time-series.md new file mode 100644 index 00000000000..2c25c9c0f02 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/time-series.md @@ -0,0 +1,290 @@ +--- +slug: /ja/engines/table-engines/special/time_series +sidebar_position: 60 +sidebar_label: TimeSeries +--- + +# TimeSeries エンジン [エクスペリメンタル] + +タイムシリーズã€ã™ãªã‚ã¡ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã¨ã‚¿ã‚°ï¼ˆã¾ãŸã¯ãƒ©ãƒ™ãƒ«ï¼‰ã«é–¢é€£ä»˜ã‘られãŸå€¤ã®ã‚»ãƒƒãƒˆã‚’æ ¼ç´ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルエンジン: + +``` +metric_name1[tag1=value1, tag2=value2, ...] = {timestamp1: value1, timestamp2: value2, ...} +metric_name2[...] = ... +``` + +:::info +ã“ã‚Œã¯å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§å¾Œæ–¹äº’æ›æ€§ãŒãªã„å½¢ã§å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ã®ã‚るエクスペリメンタル機能ã§ã™ã€‚ +TimeSeries テーブルエンジンã®ä½¿ç”¨ã‚’ +[allow_experimental_time_series_table](../../../operations/settings/settings.md#allow-experimental-time-series-table) 設定ã§æœ‰åŠ¹ã«ã—ã¦ãã ã•ã„。 +コマンド `set allow_experimental_time_series_table = 1` を入力ã—ã¾ã™ã€‚ +::: + +## 構文 {#syntax} + +``` sql +CREATE TABLE name [(columns)] ENGINE=TimeSeries +[SETTINGS var1=value1, ...] +[DATA db.data_table_name | DATA ENGINE data_table_engine(arguments)] +[TAGS db.tags_table_name | TAGS ENGINE tags_table_engine(arguments)] +[METRICS db.metrics_table_name | METRICS ENGINE metrics_table_engine(arguments)] +``` + +## 使用法 {#usage} + +ã™ã¹ã¦ã‚’デフォルトã§è¨­å®šã—ãŸçŠ¶æ…‹ã§å§‹ã‚ã‚‹ã¨ç°¡å˜ã§ã™ï¼ˆ`TimeSeries` テーブルをカラムã®ãƒªã‚¹ãƒˆã‚’指定ã›ãšã«ä½œæˆã™ã‚‹ã“ã¨ãŒè¨±å¯ã•ã‚Œã¦ã„ã¾ã™ï¼‰ï¼š + +``` sql +CREATE TABLE my_table ENGINE=TimeSeries +``` + +ã“ã®å¾Œã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯æ¬¡ã®ãƒ—ロトコルã§ä½¿ç”¨ã§ãã¾ã™ï¼ˆã‚µãƒ¼ãƒãƒ¼æ§‹æˆã§ãƒãƒ¼ãƒˆã‚’割り当ã¦ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“): +- [prometheus remote-write](../../../interfaces/prometheus.md#remote-write) +- [prometheus remote-read](../../../interfaces/prometheus.md#remote-read) + +## ターゲットテーブル {#target-tables} + +`TimeSeries` テーブルã«ã¯ç‹¬è‡ªã®ãƒ‡ãƒ¼ã‚¿ã¯ãªãã€ã™ã¹ã¦ãŒãã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚ +ã“ã‚Œã¯[Materialized View](../../../sql-reference/statements/create/view#materialized-view) ã®å‹•ä½œã«ä¼¼ã¦ã„ã¾ã™ãŒã€ +Materialized View ã¯1ã¤ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルをæŒã¤ã®ã«å¯¾ã—〠+`TimeSeries` テーブル㯠[data]{#data-table}ã€[tags]{#tags-table}ã€[metrics]{#metrics-table} ã¨ã„ã†åå‰ã®3ã¤ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルをæŒã¡ã¾ã™ã€‚ + +ターゲットテーブル㯠`CREATE TABLE` クエリã§æ˜Žç¤ºçš„ã«æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã—〠+TimeSeries テーブルエンジンãŒå†…部ターゲットテーブルを自動的ã«ç”Ÿæˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +ターゲットテーブルã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š +1. _data_ テーブル {#data-table} ã¯ã€ç‰¹å®šã®è­˜åˆ¥å­ã«é–¢é€£ä»˜ã‘られãŸã‚¿ã‚¤ãƒ ã‚·ãƒªãƒ¼ã‚ºã‚’å«ã¿ã¾ã™ã€‚ +_data_ テーブルã¯ä»¥ä¸‹ã®ã‚«ãƒ©ãƒ ã‚’æŒãŸãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“: + +| åå‰ | å¿…é ˆ? | デフォルトタイプ | å¯èƒ½ãªã‚¿ã‚¤ãƒ— | 説明 | +|---|---|---|---|---| +| `id` | [x] | `UUID` | ä»»æ„ | メトリックåã¨ã‚¿ã‚°ã®çµ„ã¿åˆã‚ã›ã‚’識別ã—ã¾ã™ | +| `timestamp` | [x] | `DateTime64(3)` | `DateTime64(X)` | 時点 | +| `value` | [x] | `Float64` | `Float32` ã¾ãŸã¯ `Float64` | `timestamp` ã«é–¢é€£ä»˜ã‘られãŸå€¤ | + +2. _tags_ テーブル {#tags-table} ã¯ã€ãƒ¡ãƒˆãƒªãƒƒã‚¯åã¨ã‚¿ã‚°ã®å„組ã¿åˆã‚ã›ã«å¯¾ã—ã¦è¨ˆç®—ã•ã‚ŒãŸè­˜åˆ¥å­ã‚’å«ã¿ã¾ã™ã€‚ +_tags_ テーブルã¯ä»¥ä¸‹ã®ã‚«ãƒ©ãƒ ã‚’æŒãŸãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“: + +| åå‰ | å¿…é ˆ? | デフォルトタイプ | å¯èƒ½ãªã‚¿ã‚¤ãƒ— | 説明 | +|---|---|---|---|---| +| `id` | [x] | `UUID` | ä»»æ„ ï¼ˆ[data]{#data-table} テーブル㮠`id` ã®ã‚¿ã‚¤ãƒ—ã¨ä¸€è‡´ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“) | `id` ã¯ãƒ¡ãƒˆãƒªãƒƒã‚¯åã¨ã‚¿ã‚°ã®çµ„ã¿åˆã‚ã›ã‚’識別ã—ã¾ã™ã€‚DEFAULT å¼ã¯ãã®ã‚ˆã†ãªè­˜åˆ¥å­ã‚’計算ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¾ã™ | +| `metric_name` | [x] | `LowCardinality(String)` | `String` ã¾ãŸã¯ `LowCardinality(String)` | メトリックã®åå‰ | +| `` | [ ] | `String` | `String` ã¾ãŸã¯ `LowCardinality(String)` ã¾ãŸã¯ `LowCardinality(Nullable(String))` | 特定ã®ã‚¿ã‚°ã®å€¤ã€ã‚¿ã‚°ã®åå‰ã¨å¯¾å¿œã™ã‚‹ã‚«ãƒ©ãƒ ã®åå‰ã¯ [tags_to_columns](#settings) 設定ã§æŒ‡å®š | +| `tags` | [x] | `Map(LowCardinality(String), String)` | `Map(String, String)` ã¾ãŸã¯ `Map(LowCardinality(String), String)` ã¾ãŸã¯ `Map(LowCardinality(String), LowCardinality(String))` | メトリックåã‚’å«ã‚€ã‚¿ã‚° `__name__` 㨠[tags_to_columns](#settings) 設定ã§åˆ—挙ã•ã‚Œã‚‹åå‰ã®ã‚¿ã‚°ã‚’除ãã‚¿ã‚°ã®ãƒžãƒƒãƒ— | +| `all_tags` | [ ] | `Map(String, String)` | `Map(String, String)` ã¾ãŸã¯ `Map(LowCardinality(String), String)` ã¾ãŸã¯ `Map(LowCardinality(String), LowCardinality(String))` | 一時的ãªã‚«ãƒ©ãƒ ã€å„è¡Œã¯ãƒ¡ãƒˆãƒªãƒƒã‚¯åã‚’å«ã‚€ã‚¿ã‚° `__name__` を除ãã™ã¹ã¦ã®ã‚¿ã‚°ã®ãƒžãƒƒãƒ—ã§ã™ã€‚ãã®ã‚«ãƒ©ãƒ ã®å”¯ä¸€ã®ç›®çš„㯠`id` を計算ã™ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã‚‹ã“ã¨ã§ã™ | +| `min_time` | [ ] | `Nullable(DateTime64(3))` | `DateTime64(X)` ã¾ãŸã¯ `Nullable(DateTime64(X))` | ãã® `id` ã‚’æŒã¤ã‚¿ã‚¤ãƒ ã‚·ãƒªãƒ¼ã‚ºã®æœ€å°ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。ã“ã®ã‚«ãƒ©ãƒ ã¯ [store_min_time_and_max_time](#settings) ㌠`true` ã®å ´åˆã«ä½œæˆã•ã‚Œã¾ã™ | +| `max_time` | [ ] | `Nullable(DateTime64(3))` | `DateTime64(X)` ã¾ãŸã¯ `Nullable(DateTime64(X))` | ãã® `id` ã‚’æŒã¤ã‚¿ã‚¤ãƒ ã‚·ãƒªãƒ¼ã‚ºã®æœ€å¤§ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。ã“ã®ã‚«ãƒ©ãƒ ã¯ [store_min_time_and_max_time](#settings) ㌠`true` ã®å ´åˆã«ä½œæˆã•ã‚Œã¾ã™ | + +3. _metrics_ テーブル {#metrics-table} ã¯ã€åŽé›†ã•ã‚ŒãŸãƒ¡ãƒˆãƒªãƒƒã‚¯ã«ã¤ã„ã¦ã®ã„ãã¤ã‹ã®æƒ…å ±ã€ã“れらã®ãƒ¡ãƒˆãƒªãƒƒã‚¯ã®ã‚¿ã‚¤ãƒ—ã¨ãã®èª¬æ˜Žã‚’å«ã¿ã¾ã™ã€‚ +_metrics_ テーブルã¯ä»¥ä¸‹ã®ã‚«ãƒ©ãƒ ã‚’æŒãŸãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“: + +| åå‰ | å¿…é ˆ? | デフォルトタイプ | å¯èƒ½ãªã‚¿ã‚¤ãƒ— | 説明 | +|---|---|---|---|---| +| `metric_family_name` | [x] | `String` | `String` ã¾ãŸã¯ `LowCardinality(String)` | メトリックファミリーã®åå‰ | +| `type` | [x] | `String` | `String` ã¾ãŸã¯ `LowCardinality(String)` | メトリックファミリーã®ã‚¿ã‚¤ãƒ—。ã“ã‚Œã«ã¯ "counter", "gauge", "summary", "stateset", "histogram", "gaugehistogram" ã®ã„ãšã‚Œã‹ãŒã‚ã‚Šã¾ã™ | +| `unit` | [x] | `String` | `String` ã¾ãŸã¯ `LowCardinality(String)` | メトリックã§ä½¿ç”¨ã•ã‚Œã‚‹å˜ä½ | +| `help` | [x] | `String` | `String` ã¾ãŸã¯ `LowCardinality(String)` | メトリックã®èª¬æ˜Ž | + +`TimeSeries` テーブルã«æŒ¿å…¥ã•ã‚ŒãŸè¡Œã¯ã€å®Ÿéš›ã«ã¯ã“れら3ã¤ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚ +`TimeSeries` テーブルã«ã¯ [data]{#data-table}ã€[tags]{#tags-table}ã€[metrics]{#metrics-table} ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +## ä½œæˆ {#creation} + +`TimeSeries` テーブルエンジンを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã«ã¯ã„ãã¤ã‹ã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚最もシンプルãªæ–‡ã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚ + +``` sql +CREATE TABLE my_table ENGINE=TimeSeries +``` + +実際ã«ã¯ã€æ¬¡ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼ˆ`SHOW CREATE TABLE my_table` を実行ã™ã‚‹ã¨è¦‹ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼‰ï¼š + +``` sql +CREATE TABLE my_table +( + `id` UUID DEFAULT reinterpretAsUUID(sipHash128(metric_name, all_tags)), + `timestamp` DateTime64(3), + `value` Float64, + `metric_name` LowCardinality(String), + `tags` Map(LowCardinality(String), String), + `all_tags` Map(String, String), + `min_time` Nullable(DateTime64(3)), + `max_time` Nullable(DateTime64(3)), + `metric_family_name` String, + `type` String, + `unit` String, + `help` String +) +ENGINE = TimeSeries +DATA ENGINE = MergeTree ORDER BY (id, timestamp) +DATA INNER UUID '01234567-89ab-cdef-0123-456789abcdef' +TAGS ENGINE = AggregatingMergeTree PRIMARY KEY metric_name ORDER BY (metric_name, id) +TAGS INNER UUID '01234567-89ab-cdef-0123-456789abcdef' +METRICS ENGINE = ReplacingMergeTree ORDER BY metric_family_name +METRICS INNER UUID '01234567-89ab-cdef-0123-456789abcdef' +``` + +ã—ãŸãŒã£ã¦ã€ã‚«ãƒ©ãƒ ã¯è‡ªå‹•çš„ã«ç”Ÿæˆã•ã‚Œã€ã•ã‚‰ã«3ã¤ã®å†…部UUIDãŒã‚ã‚Šã¾ã™ã€‚ +ãã‚Œãžã‚Œã®å†…部ターゲットテーブルãŒä½œæˆã•ã‚Œã¾ã—ãŸã€‚ +(内部UUIDã¯é€šå¸¸ã¯è¨­å®š +[show_table_uuid_in_table_create_query_if_not_nil](../../../operations/settings/settings#show_table_uuid_in_table_create_query_if_not_nil) +ãŒè¨­å®šã•ã‚Œã‚‹ã¾ã§è¡¨ç¤ºã•ã‚Œã¾ã›ã‚“。) + +内部ターゲットテーブル㯠`.inner_id.data.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`, +`.inner_id.tags.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`, `.inner_id.metrics.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` ã®ã‚ˆã†ãªåå‰ã‚’æŒã¡ã€ +å„ターゲットテーブルã¯ãƒ¡ã‚¤ãƒ³ã® `TimeSeries` テーブルã®ã‚«ãƒ©ãƒ ã®ã‚µãƒ–セットをæŒã¡ã¾ã™ï¼š + +``` sql +CREATE TABLE default.`.inner_id.data.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` +( + `id` UUID, + `timestamp` DateTime64(3), + `value` Float64 +) +ENGINE = MergeTree +ORDER BY (id, timestamp) +``` + +``` sql +CREATE TABLE default.`.inner_id.tags.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` +( + `id` UUID DEFAULT reinterpretAsUUID(sipHash128(metric_name, all_tags)), + `metric_name` LowCardinality(String), + `tags` Map(LowCardinality(String), String), + `all_tags` Map(String, String) EPHEMERAL, + `min_time` SimpleAggregateFunction(min, Nullable(DateTime64(3))), + `max_time` SimpleAggregateFunction(max, Nullable(DateTime64(3))) +) +ENGINE = AggregatingMergeTree +PRIMARY KEY metric_name +ORDER BY (metric_name, id) +``` + +``` sql +CREATE TABLE default.`.inner_id.metrics.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` +( + `metric_family_name` String, + `type` String, + `unit` String, + `help` String +) +ENGINE = ReplacingMergeTree +ORDER BY metric_family_name +``` + +## カラムタイプã®èª¿æ•´ {#adjusting-column-types} + +メインテーブルを定義ã™ã‚‹éš›ã«æ˜Žç¤ºçš„ã«æŒ‡å®šã™ã‚‹ã“ã¨ã§ã€å†…部ターゲットテーブルã®ã»ã¼ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã®ã‚¿ã‚¤ãƒ—を調整ã§ãã¾ã™ã€‚例ãˆã°ã€ + +``` sql +CREATE TABLE my_table +( + timestamp DateTime64(6) +) ENGINE=TimeSeries +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€å†…部㮠[data]{#data-table} テーブルãŒãƒžã‚¤ã‚¯ãƒ­ç§’å˜ä½ã§ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã‚’æ ¼ç´ã—ã¾ã™ï¼š + +``` sql +CREATE TABLE default.`.inner_id.data.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` +( + `id` UUID, + `timestamp` DateTime64(6), + `value` Float64 +) +ENGINE = MergeTree +ORDER BY (id, timestamp) +``` + +## `id` カラム {#id-column} + +`id` カラムã«ã¯è­˜åˆ¥å­ãŒå«ã¾ã‚Œã€ã™ã¹ã¦ã®è­˜åˆ¥å­ã¯ãƒ¡ãƒˆãƒªãƒƒã‚¯åã¨ã‚¿ã‚°ã®çµ„ã¿åˆã‚ã›ã«å¯¾ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ +`id` カラム㮠DEFAULT å¼ã¯ã€ãã®ã‚ˆã†ãªè­˜åˆ¥å­ã‚’計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹å¼ã§ã™ã€‚ +`id` カラムã®ã‚¿ã‚¤ãƒ—ã¨ãã®å¼ã¯ã€æ˜Žç¤ºçš„ã«æŒ‡å®šã™ã‚‹ã“ã¨ã§èª¿æ•´ã§ãã¾ã™ï¼š + +``` sql +CREATE TABLE my_table +( + id UInt64 DEFAULT sipHash64(metric_name, all_tags) +) ENGINE=TimeSeries +``` + +## `tags` ãŠã‚ˆã³ `all_tags` カラム {#tags-and-all-tags} + +ã‚¿ã‚°ã®ãƒžãƒƒãƒ—ã‚’å«ã‚€2ã¤ã®ã‚«ãƒ©ãƒ  - `tags` 㨠`all_tags` ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯åŒã˜æ„味をæŒã¡ã¾ã™ãŒã€ +設定 `tags_to_columns` ãŒä½¿ç”¨ã•ã‚ŒãŸå ´åˆã«ã¯ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +特定ã®ã‚¿ã‚°ãŒ `tags` カラム内ã®ãƒžãƒƒãƒ—ã«æ ¼ç´ã•ã‚Œã‚‹ä»£ã‚ã‚Šã«ã€åˆ¥ã®ã‚«ãƒ©ãƒ ã«æ ¼ç´ã•ã‚Œã‚‹ã¹ãã§ã‚ã‚‹ã“ã¨ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +``` sql +CREATE TABLE my_table ENGINE=TimeSeries SETTINGS = {'instance': 'instance', 'job': 'job'} +``` + +ã“ã®æ–‡ã¯æ¬¡ã®ã‚«ãƒ©ãƒ ã‚’追加ã—ã¾ã™ï¼š +``` + `instance` String, + `job` String +``` +ã“ã‚Œã«ã‚ˆã‚Šã€`my_table` ã¨å†…部㮠[tags]{#tags-table} ターゲットテーブルã®ä¸¡æ–¹ã®å®šç¾©ã«ã‚«ãƒ©ãƒ ãŒè¿½åŠ ã•ã‚Œã¾ã™ã€‚ +ã“ã®å ´åˆã€`tags` カラムã«ã¯ `instance` 㨠`job` ã®ã‚¿ã‚°ãŒå«ã¾ã‚Œã¾ã›ã‚“ãŒã€`all_tags` カラムã«ã¯ãれらãŒå«ã¾ã‚Œã¾ã™ã€‚`all_tags` カラムã¯ä¸€æ™‚çš„ã§ã‚ã‚Šã€`id` カラム㮠DEFAULT å¼ã§ä½¿ç”¨ã•ã‚Œã‚‹ã“ã¨ãŒå”¯ä¸€ã®ç›®çš„ã§ã™ã€‚ + +カラムã®ã‚¿ã‚¤ãƒ—ã¯æ˜Žç¤ºçš„ã«æŒ‡å®šã™ã‚‹ã“ã¨ã§èª¿æ•´ã§ãã¾ã™ï¼š + +``` sql +CREATE TABLE my_table (instance LowCardinality(String), job LowCardinality(Nullable(String))) +ENGINE=TimeSeries SETTINGS = {'instance': 'instance', 'job': 'job'} +``` + +## 内部ターゲットテーブルã®ãƒ†ãƒ¼ãƒ–ルエンジン {#inner-table-engines} + +デフォルトã§ã¯ã€å†…部ターゲットテーブルã¯æ¬¡ã®ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã—ã¾ã™ï¼š +- [data]{#data-table} テーブル㯠[MergeTree](../mergetree-family/mergetree) を使用ã—ã¾ã™ï¼› +- [tags]{#tags-table} テーブル㯠[AggregatingMergeTree](../mergetree-family/aggregatingmergetree) を使用ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯åŒã˜ãƒ‡ãƒ¼ã‚¿ãŒé »ç¹ã«è¤‡æ•°å›žæŒ¿å…¥ã•ã‚Œã‚‹ãŸã‚ã€é‡è¤‡ã‚’削除ã™ã‚‹æ–¹æ³•ãŒå¿…è¦ã§ã‚ã‚Šã€`min_time` ãŠã‚ˆã³ `max_time` カラムã®é›†è¨ˆãŒå¿…è¦ã ã‹ã‚‰ã§ã™ï¼› +- [metrics]{#metrics-table} テーブル㯠[ReplacingMergeTree](../mergetree-family/replacingmergetree) を使用ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯åŒã˜ãƒ‡ãƒ¼ã‚¿ãŒé »ç¹ã«è¤‡æ•°å›žæŒ¿å…¥ã•ã‚Œã‚‹ãŸã‚ã€é‡è¤‡ã‚’削除ã™ã‚‹æ–¹æ³•ãŒå¿…è¦ã§ã™ã€‚ + +内部ターゲットテーブルã«ä»–ã®ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã™ã‚‹ã“ã¨ã‚‚指定ãŒã‚ã‚Œã°å¯èƒ½ã§ã™ï¼š + +``` sql +CREATE TABLE my_table ENGINE=TimeSeries +DATA ENGINE=ReplicatedMergeTree +TAGS ENGINE=ReplicatedAggregatingMergeTree +METRICS ENGINE=ReplicatedReplacingMergeTree +``` + +## 外部ターゲットテーブル {#external-target-tables} + +`TimeSeries` テーブルãŒæ‰‹å‹•ã§ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを使用ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼š + +``` sql +CREATE TABLE data_for_my_table +( + `id` UUID, + `timestamp` DateTime64(3), + `value` Float64 +) +ENGINE = MergeTree +ORDER BY (id, timestamp); + +CREATE TABLE tags_for_my_table ... + +CREATE TABLE metrics_for_my_table ... + +CREATE TABLE my_table ENGINE=TimeSeries DATA data_for_my_table TAGS tags_for_my_table METRICS metrics_for_my_table; +``` + +## 設定 {#settings} + +`TimeSeries` テーブルを定義ã™ã‚‹éš›ã«æŒ‡å®šã§ãる設定ã®ãƒªã‚¹ãƒˆã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +| åå‰ | タイプ | デフォルト | 説明 | +|---|---|---|---| +| `tags_to_columns` | Map | {} | [tags]{#tags-table} テーブルã«ãŠã„ã¦ã€ã©ã®ã‚¿ã‚°ãŒåˆ¥ã®ã‚«ãƒ©ãƒ ã«é…ç½®ã•ã‚Œã‚‹ã¹ãã‹ã‚’指定ã™ã‚‹ãƒžãƒƒãƒ—。構文: `{'tag1': 'column1', 'tag2' : column2, ...}` | +| `use_all_tags_column_to_generate_id` | Bool | true | タイムシリーズã®è­˜åˆ¥å­ã‚’計算ã™ã‚‹å¼ã‚’生æˆã™ã‚‹éš›ã«ã€ãã®è¨ˆç®—ã« `all_tags` カラムを使用ã™ã‚‹ã“ã¨ã‚’有効ã«ã™ã‚‹ãƒ•ãƒ©ã‚° | +| `store_min_time_and_max_time` | Bool | true | true ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯å„タイムシリーズ㮠`min_time` 㨠`max_time` ã‚’æ ¼ç´ã—ã¾ã™ | +| `aggregate_min_time_and_max_time` | Bool | true | 内部ターゲット `tags` テーブルを作æˆã™ã‚‹éš›ã«ã€ã“ã®ãƒ•ãƒ©ã‚°ãŒè¨­å®šã•ã‚Œã¦ã„る㨠`min_time` カラムã®ã‚¿ã‚¤ãƒ—ã¨ã—㦠`Nullable(DateTime64(3))` ã®ä»£ã‚ã‚Šã« `SimpleAggregateFunction(min, Nullable(DateTime64(3)))` を使用ã—ã€`max_time` カラムã®å ´åˆã‚‚åŒæ§˜ã§ã™ | +| `filter_by_min_time_and_max_time` | Bool | true | true ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã‚¿ã‚¤ãƒ ã‚·ãƒªãƒ¼ã‚ºã‚’フィルタリングã™ã‚‹ãŸã‚ã« `min_time` 㨠`max_time` カラムを使用ã—ã¾ã™ | + +# 関数 {#functions} + +以下ã¯ã€`TimeSeries` テーブルを引数ã¨ã—ã¦ã‚µãƒãƒ¼ãƒˆã™ã‚‹é–¢æ•°ã®ãƒªã‚¹ãƒˆã§ã™ï¼š +- [timeSeriesData](../../../sql-reference/table-functions/timeSeriesData.md) +- [timeSeriesTags](../../../sql-reference/table-functions/timeSeriesTags.md) +- [timeSeriesMetrics](../../../sql-reference/table-functions/timeSeriesMetrics.md) diff --git a/docs/ja/engines/table-engines/log-family/index.md b/docs/ja/engines/table-engines/log-family/index.md new file mode 100644 index 00000000000..97297683c60 --- /dev/null +++ b/docs/ja/engines/table-engines/log-family/index.md @@ -0,0 +1,45 @@ +--- +slug: /ja/engines/table-engines/log-family/ +sidebar_position: 20 +sidebar_label: Logファミリー +--- + +# Log エンジンファミリー + +ã“れらã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€å¤šãã®å°ã•ãªãƒ†ãƒ¼ãƒ–ル(約100万行ã¾ã§ï¼‰ã‚’ã™ã°ã‚„ã書ãè¾¼ã¿ã€å¾Œã§å…¨ä½“ã¨ã—ã¦èª­ã‚€å¿…è¦ãŒã‚るシナリオã®ãŸã‚ã«é–‹ç™ºã•ã‚Œã¾ã—ãŸã€‚ + +ファミリーã®ã‚¨ãƒ³ã‚¸ãƒ³: + +- [StripeLog](/docs/ja/engines/table-engines/log-family/stripelog.md) +- [Log](/docs/ja/engines/table-engines/log-family/log.md) +- [TinyLog](/docs/ja/engines/table-engines/log-family/tinylog.md) + +`Log`ファミリーã®ãƒ†ãƒ¼ãƒ–ルエンジンã¯ã€[HDFS](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-hdfs)ã‚„[S3](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-s3)ã®åˆ†æ•£ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã§ãã¾ã™ã€‚ + +## 共通ã®ãƒ—ロパティ {#common-properties} + +エンジンã®ç‰¹å¾´: + +- データをディスクã«ä¿å­˜ã—ã¾ã™ã€‚ + +- データをファイルã®æœ«å°¾ã«è¿½åŠ ã—ã¦æ›¸ãè¾¼ã¿ã¾ã™ã€‚ + +- åŒæ™‚データアクセス用ã®ãƒ­ãƒƒã‚¯ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + + `INSERT`クエリã®é–“ã€ãƒ†ãƒ¼ãƒ–ルã¯ãƒ­ãƒƒã‚¯ã•ã‚Œã€ä»–ã®èª­ã¿æ›¸ãクエリã¯ãƒ†ãƒ¼ãƒ–ルãŒã‚¢ãƒ³ãƒ­ãƒƒã‚¯ã•ã‚Œã‚‹ã®ã‚’å¾…ã¡ã¾ã™ã€‚データ書ãè¾¼ã¿ã®ã‚¯ã‚¨ãƒªãŒãªã„å ´åˆã€ä»»æ„ã®æ•°ã®ãƒ‡ãƒ¼ã‚¿èª­ã¿å–りクエリを並行ã—ã¦å®Ÿè¡Œã§ãã¾ã™ã€‚ + +- [ミューテーション](/docs/ja/sql-reference/statements/alter/index.md#alter-mutations)をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“。 + +- インデックスをサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“。 + + ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ç¯„囲ã®`SELECT`クエリã¯åŠ¹çŽ‡çš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +- データをアトミックã«æ›¸ãè¾¼ã¿ã¾ã›ã‚“。 + + ãŸã¨ãˆã°ã€ã‚µãƒ¼ãƒãƒ¼ã®ç•°å¸¸çµ‚了ãªã©ã§æ›¸ãè¾¼ã¿æ“作ãŒä¸­æ–­ã•ã‚Œã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ãŒç ´æã—ãŸãƒ†ãƒ¼ãƒ–ルãŒå¾—られるå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## 差異 {#differences} + +`TinyLog`エンジンã¯ã€ãƒ•ã‚¡ãƒŸãƒªãƒ¼å†…ã§æœ€ã‚‚シンプルã§ã€æ©Ÿèƒ½ã¨åŠ¹çŽ‡ãŒæœ€ã‚‚低ã„ã§ã™ã€‚`TinyLog`エンジンã¯ã€å˜ä¸€ã‚¯ã‚¨ãƒªã§è¤‡æ•°ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã«ã‚ˆã‚‹ä¸¦è¡Œãƒ‡ãƒ¼ã‚¿èª­ã¿å–りをサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“。å˜ä¸€ã®ã‚¯ã‚¨ãƒªã‹ã‚‰ä¸¦è¡Œèª­ã¿å–りをサãƒãƒ¼ãƒˆã™ã‚‹ä»–ã®ã‚¨ãƒ³ã‚¸ãƒ³ã‚ˆã‚Šã‚‚データを読むã®ãŒé…ãã€å„カラムを別々ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã™ã‚‹ãŸã‚ã€`Log`エンジンã¨ã»ã¼åŒã˜æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ãƒªãƒ—タを使用ã—ã¾ã™ã€‚ç°¡å˜ãªã‚·ãƒŠãƒªã‚ªã§ã®ã¿ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +`Log`ãŠã‚ˆã³`StripeLog`エンジンã¯ä¸¦è¡Œãƒ‡ãƒ¼ã‚¿èª­ã¿å–りをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚データを読ã¿å–ã‚‹éš›ã€ClickHouseã¯è¤‡æ•°ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’使用ã—ã€å„スレッドã¯åˆ¥ã€…ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックを処ç†ã—ã¾ã™ã€‚`Log`エンジンã¯ãƒ†ãƒ¼ãƒ–ルã®å„カラムã«å¯¾ã—ã¦åˆ¥ã€…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ã¾ã™ã€‚一方ã€`StripeLog`ã¯ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’1ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«æ ¼ç´ã—ã¾ã™ã€‚ãã®çµæžœã€`StripeLog`エンジンã¯ä½¿ç”¨ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ãƒªãƒ—ã‚¿ãŒå°‘ãªããªã‚Šã¾ã™ãŒã€`Log`エンジンã®æ–¹ãŒãƒ‡ãƒ¼ã‚¿èª­ã¿å–ã‚Šã®åŠ¹çŽ‡ãŒé«˜ããªã‚Šã¾ã™ã€‚ diff --git a/docs/ja/engines/table-engines/log-family/log.md b/docs/ja/engines/table-engines/log-family/log.md new file mode 100644 index 00000000000..743f500a444 --- /dev/null +++ b/docs/ja/engines/table-engines/log-family/log.md @@ -0,0 +1,13 @@ +--- +slug: /ja/engines/table-engines/log-family/log +toc_priority: 33 +toc_title: Log +--- + +# Log + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ `Log` エンジンファミリーã«å±žã—ã¾ã™ã€‚`Log` エンジンã®å…±é€šãƒ—ロパティã¨ãã®é•ã„ã«ã¤ã„ã¦ã¯ã€[Log エンジンファミリー](../../../engines/table-engines/log-family/index.md)ã®è¨˜äº‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +`Log` 㯠[TinyLog](../../../engines/table-engines/log-family/tinylog.md) ã¨ç•°ãªã‚Šã€ã‚«ãƒ©ãƒ ãƒ•ã‚¡ã‚¤ãƒ«ã¨ä¸€ç·’ã«å°ã•ãªã€Œãƒžãƒ¼ã‚¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã—ã¾ã™ã€‚ã“れらã®ãƒžãƒ¼ã‚¯ã¯ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã”ã¨ã«æ›¸ãè¾¼ã¾ã‚Œã€æŒ‡å®šã•ã‚ŒãŸè¡Œæ•°ã‚’スキップã™ã‚‹ãŸã‚ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ã©ã“ã‹ã‚‰èª­ã¿å§‹ã‚ã‚‹ã‹ã‚’示ã™ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’å«ã¿ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ†ãƒ¼ãƒ–ルデータを複数ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§èª­ã¿å–ã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ +åŒæ™‚ã«ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å ´åˆã€èª­ã¿å–ã‚Šæ“作ã¯åŒæ™‚ã«å®Ÿè¡Œã§ãã¾ã™ãŒã€æ›¸ãè¾¼ã¿æ“作ã¯èª­ã¿å–ã‚ŠãŠã‚ˆã³ä»–ã®æ›¸ãè¾¼ã¿ã‚’ブロックã—ã¾ã™ã€‚ +`Log` エンジンã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。åŒæ§˜ã«ã€ãƒ†ãƒ¼ãƒ–ルã¸ã®æ›¸ãè¾¼ã¿ã«å¤±æ•—ã—ãŸå ´åˆã€ãƒ†ãƒ¼ãƒ–ルã¯å£Šã‚Œã¦ãŠã‚Šã€èª­ã¿å–ã‚Šã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚`Log` エンジンã¯ã€ä¸€æ™‚çš„ãªãƒ‡ãƒ¼ã‚¿ã€æ›¸ãè¾¼ã¿ãŒä¸€åº¦ã ã‘è¡Œã‚れるテーブルã€ãƒ†ã‚¹ãƒˆã¾ãŸã¯ãƒ‡ãƒ¢ãƒ³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®ç›®çš„ã«é©ã—ã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/engines/table-engines/log-family/stripelog.md b/docs/ja/engines/table-engines/log-family/stripelog.md new file mode 100644 index 00000000000..638dbbc4c51 --- /dev/null +++ b/docs/ja/engines/table-engines/log-family/stripelog.md @@ -0,0 +1,92 @@ +--- +slug: /ja/engines/table-engines/log-family/stripelog +toc_priority: 32 +toc_title: StripeLog +--- + +# Stripelog + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ãƒ­ã‚°ã‚¨ãƒ³ã‚¸ãƒ³ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã«å±žã—ã¾ã™ã€‚ログエンジンã®å…±é€šã®ç‰¹æ€§ã¨ãã®é•ã„ã«ã¤ã„ã¦ã¯ã€[Log Engine Family](../../../engines/table-engines/log-family/index.md)ã®è¨˜äº‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€å°é‡ã®ãƒ‡ãƒ¼ã‚¿ï¼ˆ100万行未満)をæŒã¤å¤šãã®ãƒ†ãƒ¼ãƒ–ルを書ã込む必è¦ãŒã‚るシナリオã§ä½¿ç”¨ã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#table_engines-stripelog-creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + column1_name [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + column2_name [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE = StripeLog +``` + +[CREATE TABLE](../../../sql-reference/statements/create/table.md#create-table-query) クエリã®è©³ç´°ãªèª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## データã®æ›¸ã込㿠{#table_engines-stripelog-writing-the-data} + +`StripeLog`エンジンã¯ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’1ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã—ã¾ã™ã€‚å„`INSERT`クエリã«å¯¾ã—ã¦ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ãƒ–ロックをテーブルファイルã®æœ«å°¾ã«è¿½åŠ ã—ã€ã‚«ãƒ©ãƒ ã‚’一ã¤ãšã¤æ›¸ãè¾¼ã¿ã¾ã™ã€‚ + +å„テーブルã«å¯¾ã—ã¦ClickHouseã¯ä»¥ä¸‹ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’書ãè¾¼ã¿ã¾ã™ï¼š + +- `data.bin` — データファイル。 +- `index.mrk` — マークをå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã€‚マークã¯ã€æŒ¿å…¥ã•ã‚ŒãŸå„データブロックã®å„カラムã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’å«ã¿ã¾ã™ã€‚ + +`StripeLog`エンジンã¯`ALTER UPDATE`ãŠã‚ˆã³`ALTER DELETE`æ“作をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。 + +## データã®èª­ã¿å–ã‚Š {#table_engines-stripelog-reading-the-data} + +マークをå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚ˆã‚Šã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã®èª­ã¿å–りを並列化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€`SELECT`クエリãŒè¡Œã‚’予測ä¸èƒ½ãªé †åºã§è¿”ã—ã¾ã™ã€‚行をソートã™ã‚‹ã«ã¯`ORDER BY`å¥ã‚’使用ã—ã¦ãã ã•ã„。 + +## 使用例 {#table_engines-stripelog-example-of-use} + +テーブルã®ä½œæˆï¼š + +``` sql +CREATE TABLE stripe_log_table +( + timestamp DateTime, + message_type String, + message String +) +ENGINE = StripeLog +``` + +データã®æŒ¿å…¥ï¼š + +``` sql +INSERT INTO stripe_log_table VALUES (now(),'REGULAR','The first regular message') +INSERT INTO stripe_log_table VALUES (now(),'REGULAR','The second regular message'),(now(),'WARNING','The first warning message') +``` + +`data.bin`ファイル内ã«2ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックを作æˆã™ã‚‹ãŸã‚ã«ã€2ã¤ã®`INSERT`クエリを使用ã—ã¾ã—ãŸã€‚ + +ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹éš›ã«è¤‡æ•°ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’使用ã—ã¾ã™ã€‚å„スレッドã¯åˆ¥ã€…ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックを読ã¿å–ã£ã¦ã€ãã‚Œãžã‚Œå®Œäº†æ™‚ã«çµæžœã®è¡Œã‚’独立ã—ã¦è¿”ã—ã¾ã™ã€‚ãã®çµæžœã€å‡ºåŠ›ã®ãƒ–ロックã®é †åºã¯å…¥åŠ›ã®åŒã˜ãƒ–ロックã®é †åºã«ã¯ã»ã¨ã‚“ã©ã®å ´åˆä¸€è‡´ã—ã¾ã›ã‚“。例: + +``` sql +SELECT * FROM stripe_log_table +``` + +``` text +┌───────────timestamp─┬─message_type─┬─message────────────────────┠+│ 2019-01-18 14:27:32 │ REGULAR │ The second regular message │ +│ 2019-01-18 14:34:53 │ WARNING │ The first warning message │ +└─────────────────────┴──────────────┴────────────────────────────┘ +┌───────────timestamp─┬─message_type─┬─message───────────────────┠+│ 2019-01-18 14:23:43 │ REGULAR │ The first regular message │ +└─────────────────────┴──────────────┴───────────────────────────┘ +``` + +çµæžœã®ã‚½ãƒ¼ãƒˆï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æ˜‡é †ï¼‰ï¼š + +``` sql +SELECT * FROM stripe_log_table ORDER BY timestamp +``` + +``` text +┌───────────timestamp─┬─message_type─┬─message────────────────────┠+│ 2019-01-18 14:23:43 │ REGULAR │ The first regular message │ +│ 2019-01-18 14:27:32 │ REGULAR │ The second regular message │ +│ 2019-01-18 14:34:53 │ WARNING │ The first warning message │ +└─────────────────────┴──────────────┴────────────────────────────┘ +``` diff --git a/docs/ja/engines/table-engines/log-family/tinylog.md b/docs/ja/engines/table-engines/log-family/tinylog.md new file mode 100644 index 00000000000..8e887a5ff94 --- /dev/null +++ b/docs/ja/engines/table-engines/log-family/tinylog.md @@ -0,0 +1,13 @@ +--- +slug: /ja/engines/table-engines/log-family/tinylog +toc_priority: 34 +toc_title: TinyLog +--- + +# TinyLog + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ãƒ­ã‚°ã‚¨ãƒ³ã‚¸ãƒ³ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã«å±žã—ã¾ã™ã€‚ログエンジンã®å…±é€šç‰¹æ€§ã¨ãã®é•ã„ã«ã¤ã„ã¦ã¯ã€[ログエンジンファミリー](../../../engines/table-engines/log-family/index.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®ãƒ†ãƒ¼ãƒ–ルエンジンã¯é€šå¸¸ã€æ›¸ãè¾¼ã¿ã‚’一度ã ã‘è¡Œã„ã€ãã®å¾Œå¿…è¦ã«å¿œã˜ã¦ä½•åº¦ã‚‚読ã¿å–ã‚‹ã¨ã„ã†æ–¹æ³•ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€`TinyLog` åž‹ã®ãƒ†ãƒ¼ãƒ–ルã¯å°ã•ãªãƒãƒƒãƒã§å‡¦ç†ã•ã‚Œã‚‹ä¸­é–“データã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€å¤šæ•°ã®å°ã•ãªãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ã“ã¨ã¯éžåŠ¹çŽ‡çš„ã§ã™ã€‚ + +クエリã¯å˜ä¸€ã®ã‚¹ãƒˆãƒªãƒ¼ãƒ ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯æ¯”較的少ãªã„テーブル (ãŠã‚ˆã1,000,000è¡Œã¾ã§) ã«å‘ã„ã¦ã„ã¾ã™ã€‚多数ã®å°ã•ãªãƒ†ãƒ¼ãƒ–ルをæŒã£ã¦ã„ã‚‹å ´åˆã€ã“ã®ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã™ã‚‹ã“ã¨ã«æ„味ãŒã‚ã‚Šã¾ã™ã€‚ãªãœãªã‚‰ã€[Log](../../../engines/table-engines/log-family/log.md) エンジンよりもå˜ç´”ã§ï¼ˆé–‹ãå¿…è¦ã®ã‚るファイルãŒå°‘ãªãã¦æ¸ˆã‚€ï¼‰æ¸ˆã‚€ã‹ã‚‰ã§ã™ã€‚ diff --git a/docs/ja/engines/table-engines/mergetree-family/aggregatingmergetree.md b/docs/ja/engines/table-engines/mergetree-family/aggregatingmergetree.md new file mode 100644 index 00000000000..137f03bfa00 --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/aggregatingmergetree.md @@ -0,0 +1,161 @@ +--- +slug: /ja/engines/table-engines/mergetree-family/aggregatingmergetree +sidebar_position: 60 +sidebar_label: AggregatingMergeTree +--- + +# AggregatingMergeTree + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ãƒ­ã‚¸ãƒƒã‚¯ã‚’変更ã—ãŸ[MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md#table_engines-mergetree)ã‹ã‚‰ç¶™æ‰¿ã—ã¦ã„ã¾ã™ã€‚ClickHouseã§ã¯ã€åŒã˜ä¸»ã‚­ãƒ¼ï¼ˆã‚ˆã‚Šæ­£ç¢ºã«ã¯ã€åŒã˜[ソートキー](../../../engines/table-engines/mergetree-family/mergetree.md))をæŒã¤ã™ã¹ã¦ã®è¡Œã‚’ã€ãã®ã‚­ãƒ¼ã‚’æŒã¤ã™ã¹ã¦ã®è¡Œã®çµåˆçŠ¶æ…‹ã‚’ä¿å­˜ã™ã‚‹å˜ä¸€ã®è¡Œã«ç½®ãæ›ãˆã¾ã™ï¼ˆåŒä¸€ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツ内ã§ï¼‰ã€‚ + +`AggregatingMergeTree`テーブルã¯ã€é›†è¨ˆã•ã‚ŒãŸãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューをå«ã‚€å¢—分データ集計ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€ä»¥ä¸‹ã®åž‹ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’処ç†ã—ã¾ã™ï¼š + +## [AggregateFunction](../../../sql-reference/data-types/aggregatefunction.md) +## [SimpleAggregateFunction](../../../sql-reference/data-types/simpleaggregatefunction.md) + +`AggregatingMergeTree`を使用ã™ã‚‹ã®ãŒé©åˆ‡ãªã®ã¯ã€è¡Œæ•°ã‚’何æ¡ã‚‚削減ã§ãã‚‹å ´åˆã§ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE = AggregatingMergeTree() +[PARTITION BY expr] +[ORDER BY expr] +[SAMPLE BY expr] +[TTL expr] +[SETTINGS name=value, ...] +``` + +リクエストパラメータã®èª¬æ˜Žã«ã¤ã„ã¦ã¯ã€[リクエストã®èª¬æ˜Ž](../../../sql-reference/statements/create/table.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**クエリå¥** + +`AggregatingMergeTree`テーブルを作æˆã™ã‚‹ã¨ãã«ã¯ã€`MergeTree`テーブルを作æˆã™ã‚‹ã¨ãã¨åŒã˜[å¥](../../../engines/table-engines/mergetree-family/mergetree.md)ãŒå¿…è¦ã§ã™ã€‚ + +
+ +éžæŽ¨å¥¨ã®ãƒ†ãƒ¼ãƒ–ル作æˆãƒ¡ã‚½ãƒƒãƒ‰ + +:::note +æ–°ã—ã„プロジェクトã§ã¯ã“ã®æ–¹æ³•ã‚’使用ã›ãšã€å¯èƒ½ã§ã‚ã‚Œã°å¤ã„プロジェクトを上記ã®æ–¹æ³•ã«åˆ‡ã‚Šæ›¿ãˆã¦ãã ã•ã„。 +::: + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE [=] AggregatingMergeTree(date-column [, sampling_expression], (primary, key), index_granularity) +``` + +ã™ã¹ã¦ã®ãƒ‘ラメータã¯ã€`MergeTree`ã¨åŒã˜æ„味をæŒã¡ã¾ã™ã€‚ +
+ +## SELECTã¨INSERT {#select-and-insert} + +データを挿入ã™ã‚‹ã«ã¯ã€é›†è¨ˆ-State-関数を使用ã—ã¦[INSERT SELECT](../../../sql-reference/statements/insert-into.md)クエリを使用ã—ã¾ã™ã€‚ +`AggregatingMergeTree`テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹éš›ã«ã¯ã€`GROUP BY`å¥ã¨æŒ¿å…¥æ™‚ã«ä½¿ç”¨ã—ãŸã‚‚ã®ã¨åŒã˜é›†è¨ˆé–¢æ•°ã‚’ã€`-Merge`サフィックスをã¤ã‘ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +`SELECT`クエリã®çµæžœã«ãŠã„ã¦ã€`AggregateFunction`タイプã®å€¤ã¯ã€ã™ã¹ã¦ã®ClickHouse出力フォーマットã«å¯¾ã—ã¦å®Ÿè£…ä¾å­˜ã®ãƒã‚¤ãƒŠãƒªè¡¨ç¾ã‚’æŒã¡ã¾ã™ã€‚ãŸã¨ãˆã°ã€`TabSeparated`フォーマットã§`SELECT`クエリã«ã‚ˆã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ダンプã™ã‚‹å ´åˆã€ã“ã®ãƒ€ãƒ³ãƒ—ã¯`INSERT`クエリを使用ã—ã¦å†ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ + +## 集計マテリアライズドビューã®ä¾‹ {#example-of-an-aggregated-materialized-view} + +以下ã®ä¾‹ã§ã¯ã€`test`ã¨ã„ã†åå‰ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒã™ã§ã«ã‚ã‚‹ã¨ä»®å®šã—ã¦ã„ã¾ã™ã®ã§ã€ã¾ã å­˜åœ¨ã—ãªã„å ´åˆã¯ä½œæˆã—ã¦ãã ã•ã„: + +```sql +CREATE DATABASE test; +``` + +次ã«ã€ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ†ãƒ¼ãƒ–ル`test.visits`を作æˆã—ã¾ã™ï¼š + +``` sql +CREATE TABLE test.visits + ( + StartDate DateTime64 NOT NULL, + CounterID UInt64, + Sign Nullable(Int32), + UserID Nullable(Int32) +) ENGINE = MergeTree ORDER BY (StartDate, CounterID); +``` + +次ã«ã€ç·è¨ªå•æ•°ã¨ä¸€æ„ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼æ•°ã‚’追跡ã™ã‚‹`AggregationFunction`ã‚’æ ¼ç´ã™ã‚‹`AggregatingMergeTree`テーブルãŒå¿…è¦ã§ã™ã€‚ + +`test.visits`テーブルを監視ã—ã€`AggregateFunction`タイプを使用ã™ã‚‹`AggregatingMergeTree`マテリアライズドビューを作æˆã—ã¾ã™ï¼š + +``` sql +CREATE TABLE test.agg_visits ( + StartDate DateTime64 NOT NULL, + CounterID UInt64, + Visits AggregateFunction(sum, Nullable(Int32)), + Users AggregateFunction(uniq, Nullable(Int32)) +) +ENGINE = AggregatingMergeTree() ORDER BY (StartDate, CounterID); +``` + +`test.visits`ã‹ã‚‰`test.agg_visits`ã«ãƒ‡ãƒ¼ã‚¿ã‚’入力ã™ã‚‹ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを作æˆã—ã¾ã™ï¼š + +```sql +CREATE MATERIALIZED VIEW test.visits_mv TO test.agg_visits +AS SELECT + StartDate, + CounterID, + sumState(Sign) AS Visits, + uniqState(UserID) AS Users +FROM test.visits +GROUP BY StartDate, CounterID; +``` + +`test.visits`テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ï¼š + +``` sql +INSERT INTO test.visits (StartDate, CounterID, Sign, UserID) + VALUES (1667446031000, 1, 3, 4), (1667446031000, 1, 6, 3); +``` + +データã¯`test.visits`ã¨`test.agg_visits`ã®ä¸¡æ–¹ã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +集計ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€`SELECT ... GROUP BY ...`クエリをマテリアライズドビュー`test.mv_visits`ã‹ã‚‰å®Ÿè¡Œã—ã¾ã™ï¼š + +```sql +SELECT + StartDate, + sumMerge(Visits) AS Visits, + uniqMerge(Users) AS Users +FROM test.agg_visits +GROUP BY StartDate +ORDER BY StartDate; +``` + +```text +┌───────────────StartDate─┬─Visits─┬─Users─┠+│ 2022-11-03 03:27:11.000 │ 9 │ 2 │ +└─────────────────────────┴────────┴───────┘ +``` + +`test.visits`ã«ã•ã‚‰ã«2ã¤ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’追加ã—ã¾ã™ãŒã€ä»Šå›žã¯1ã¤ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã«ç•°ãªã‚‹ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—を使用ã—ã¦ã¿ã¾ã™ï¼š + +```sql +INSERT INTO test.visits (StartDate, CounterID, Sign, UserID) + VALUES (1669446031000, 2, 5, 10), (1667446031000, 3, 7, 5); +``` + +å†ã³`SELECT`クエリを実行ã™ã‚‹ã¨ã€ä»¥ä¸‹ã®å‡ºåŠ›ãŒè¿”ã•ã‚Œã¾ã™ï¼š + +```text +┌───────────────StartDate─┬─Visits─┬─Users─┠+│ 2022-11-03 03:27:11.000 │ 16 │ 3 │ +│ 2022-11-26 07:00:31.000 │ 5 │ 1 │ +└─────────────────────────┴────────┴───────┘ +``` + +## 関連コンテンツ + +- ブログ: [Using Aggregate Combinators in ClickHouse](https://clickhouse.com/blog/aggregate-functions-combinators-in-clickhouse-for-arrays-maps-and-states) diff --git a/docs/ja/engines/table-engines/mergetree-family/annindexes.md b/docs/ja/engines/table-engines/mergetree-family/annindexes.md new file mode 100644 index 00000000000..e2e059a27ee --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/annindexes.md @@ -0,0 +1,116 @@ +# 近似最é©è¿‘å‚探索インデックス [エクスペリメンタル] + +最é©è¿‘å‚探索ã¯ã€N次元ベクトル空間ã§ä¸Žãˆã‚‰ã‚ŒãŸç‚¹ã«å¯¾ã—ã¦æœ€ã‚‚è¿‘ã„M個ã®ç‚¹ã‚’見ã¤ã‘ã‚‹å•é¡Œã§ã™ã€‚ã“ã®å•é¡Œã‚’解決ã™ã‚‹æœ€ã‚‚å˜ç´”ãªã‚¢ãƒ—ローãƒã¯ã€ãƒ™ã‚¯ãƒˆãƒ«ç©ºé–“内ã®ã™ã¹ã¦ã®ç‚¹ã¨å‚照点ã®è·é›¢ã‚’計算ã™ã‚‹ãƒ–ルートフォース検索ã§ã™ã€‚ã“ã®æ–¹æ³•ã¯å®Œå…¨ãªç²¾åº¦ã‚’ä¿è¨¼ã—ã¾ã™ãŒã€å®Ÿéš›ã®ã‚¢ãƒ—リケーションã«ãŠã„ã¦ã¯é€šå¸¸ã€é€Ÿåº¦ãŒé…ã™ãŽã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€æœ€é©è¿‘å‚探索ã®å•é¡Œã¯ã€å¤šãã®å ´åˆ[近似アルゴリズム](https://github.com/erikbern/ann-benchmarks)ã§è§£æ±ºã•ã‚Œã¾ã™ã€‚近似最é©è¿‘å‚探索技術ã¯ã€[埋ã‚è¾¼ã¿ãƒ¡ã‚½ãƒƒãƒ‰](https://cloud.google.com/architecture/overview-extracting-and-serving-feature-embeddings-for-machine-learning)ã¨çµ„ã¿åˆã‚ã›ã¦ã€å¤§é‡ã®ãƒ¡ãƒ‡ã‚£ã‚¢ï¼ˆç”»åƒã€æ›²ã€è¨˜äº‹ãªã©ï¼‰ã‚’ミリ秒å˜ä½ã§æ¤œç´¢ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +ブログ: +- [ClickHouseã§ã®ãƒ™ã‚¯ãƒˆãƒ«æ¤œç´¢ - Part 1](https://clickhouse.com/blog/vector-search-clickhouse-p1) +- [ClickHouseã§ã®ãƒ™ã‚¯ãƒˆãƒ«æ¤œç´¢ - Part 2](https://clickhouse.com/blog/vector-search-clickhouse-p2) + +SQLã§ã¯ã€æœ€é©è¿‘å‚å•é¡Œã‚’次ã®ã‚ˆã†ã«è¡¨ç¾ã§ãã¾ã™: + +``` sql +SELECT * +FROM table +ORDER BY Distance(vectors, Point) +LIMIT N +``` + +`vectors`ã¯ã€[Array(Float32)](../../../sql-reference/data-types/array.md)ã¾ãŸã¯Array(Float64)åž‹ã®N次元ã®å€¤ï¼ˆä¾‹ãˆã°åŸ‹ã‚è¾¼ã¿ï¼‰ã‚’å«ã¿ã¾ã™ã€‚関数`Distance`ã¯ã€äºŒã¤ã®ãƒ™ã‚¯ãƒˆãƒ«é–“ã®è·é›¢ã‚’計算ã—ã¾ã™ã€‚è·é›¢é–¢æ•°ã¨ã—ã¦ã¯ã€ã—ã°ã—ã°ãƒ¦ãƒ¼ã‚¯ãƒªãƒƒãƒ‰ï¼ˆL2)è·é›¢ãŒé¸ã°ã‚Œã¾ã™ãŒã€[ä»–ã®è·é›¢é–¢æ•°](/docs/ja/sql-reference/functions/distance-functions.md)ã‚‚å¯èƒ½ã§ã™ã€‚`Point`ã¯å‚照点ã€ä¾‹ãˆã°`(0.17, 0.33, ...)`ã§ã€`N`ã¯æ¤œç´¢çµæžœã®æ•°ã‚’制é™ã—ã¾ã™ã€‚ + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€å‚照点ã«æœ€ã‚‚è¿‘ã„トップ`N`個ã®ç‚¹ã‚’è¿”ã—ã¾ã™ã€‚`N`引数ã¯è¿”ã•ã‚Œã‚‹å€¤ã®æ•°ã‚’制é™ã—ã€äº‹å‰ã«`MaxDistance`を決定ã™ã‚‹ã®ãŒé›£ã—ã„å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ + +ブルートフォース検索ã§ã¯ã€`vectors`内ã®ã™ã¹ã¦ã®ç‚¹ã¨`Point`é–“ã®è·é›¢ã‚’計算ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªã¯é«˜ä¾¡ã§ã™ï¼ˆç‚¹ã®æ•°ã«å¯¾ã—ã¦ç·šå½¢ã§ã™ï¼‰ã€‚ã“ã®ãƒ—ロセスを速ã‚ã‚‹ãŸã‚ã«ã€è¿‘似最é©è¿‘å‚探索インデックス(ANNインデックス)ã¯æ¤œç´¢ç©ºé–“ã®ã‚³ãƒ³ãƒ‘クトãªè¡¨ç¾ï¼ˆã‚¯ãƒ©ã‚¹ã‚¿ãƒªãƒ³ã‚°ã€æ¤œç´¢ãƒ„リーãªã©ã®ä½¿ç”¨ï¼‰ã‚’ä¿å­˜ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€è¿‘似的ãªç­”ãˆã‚’より迅速ã«ï¼ˆã‚µãƒ–線形時間ã§ï¼‰è¨ˆç®—ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +# ベクトル類似インデックスã®ä½œæˆã¨ä½¿ç”¨ + +[Array(Float32)](../../../sql-reference/data-types/array.md)カラムã«å¯¾ã™ã‚‹ãƒ™ã‚¯ãƒˆãƒ«é¡žä¼¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’作æˆã™ã‚‹æ§‹æ–‡: + +```sql +CREATE TABLE table +( + id Int64, + vectors Array(Float32), + INDEX index_name vectors TYPE vector_similarity(method, distance_function[, quantization, hnsw_max_connections_per_layer, hnsw_candidate_list_size_for_construction]) [GRANULARITY N] +) +ENGINE = MergeTree +ORDER BY id; +``` + +パラメータ: +- `method`: ç¾åœ¨ã¯`hnsw`ã®ã¿ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +- `distance_function`: `L2Distance`([ユークリッドè·é›¢](https://en.wikipedia.org/wiki/Euclidean_distance) - ユークリッド空間内ã®äºŒç‚¹é–“ã®ç·šã®é•·ã•ï¼‰ã¾ãŸã¯`cosineDistance`([コサインè·é›¢](https://en.wikipedia.org/wiki/Cosine_similarity#Cosine_distance)- ゼロã§ãªã„二ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«é–“ã®è§’度)。 +- `quantization`: ベクトルを精度をè½ã¨ã—ã¦ä¿å­˜ã™ã‚‹ãŸã‚ã®`f64`ã€`f32`ã€`f16`ã€`bf16`ã€ã¾ãŸã¯`i8`(オプションã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: `bf16`) +- `hnsw_max_connections_per_layer`: HNSWグラフノードã”ã¨ã®éš£æŽ¥ãƒŽãƒ¼ãƒ‰æ•°ã€[HNSWペーパー](https://doi.org/10.1109/TPAMI.2018.2889473)ã§`M`ã¨ã—ã¦çŸ¥ã‚‰ã‚Œã¦ã„ã¾ã™ï¼ˆã‚ªãƒ—ションã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: 32) +- `hnsw_candidate_list_size_for_construction`: HNSWグラフを構築ã™ã‚‹éš›ã®å‹•çš„候補リストã®ã‚µã‚¤ã‚ºã€å…ƒã®[HNSWペーパー](https://doi.org/10.1109/TPAMI.2018.2889473)ã§`ef_construction`ã¨ã—ã¦çŸ¥ã‚‰ã‚Œã¦ã„ã¾ã™ï¼ˆã‚ªãƒ—ションã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: 128) + +`hnsw_max_connections_per_layer`ãŠã‚ˆã³`hnsw_candidate_list_size_for_construction`ã®å€¤ãŒ0ã®å ´åˆã€ã“れらã®ãƒ‘ラメータã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +CREATE TABLE table +( + id Int64, + vectors Array(Float32), + INDEX idx vectors TYPE vector_similarity('hnsw', 'L2Distance') -- 代替構文: TYPE vector_similarity(hnsw, L2Distance) +) +ENGINE = MergeTree +ORDER BY id; +``` + +ベクトル類似インデックスã¯[USearchライブラリ](https://github.com/unum-cloud/usearch)ã«åŸºã¥ã„ã¦ãŠã‚Šã€[HNSWアルゴリズム](https://arxiv.org/abs/1603.09320)を実装ã—ã¦ã„ã¾ã™ã€‚ã™ãªã‚ã¡ã€å„点ãŒãƒ™ã‚¯ãƒˆãƒ«ã‚’表ã—ã€è¾ºãŒé¡žä¼¼æ€§ã‚’表ã™éšŽå±¤çš„ãªã‚°ãƒ©ãƒ•ã§ã™ã€‚ã“ã®ã‚ˆã†ãªéšŽå±¤æ§‹é€ ã¯å¤§è¦æ¨¡ãªã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«éžå¸¸ã«åŠ¹çŽ‡çš„ã§ã™ã€‚全体ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‹ã‚‰0.05%以下ã®ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ãªãŒã‚‰ã€99ï¼…ã®å†ç¾çŽ‡ã‚’æä¾›ã™ã‚‹ã“ã¨ãŒé »ç¹ã«ã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯é«˜æ¬¡å…ƒãƒ™ã‚¯ãƒˆãƒ«ä½œæ¥­ã§ç‰¹ã«å½¹ç«‹ã¡ã¾ã™ã€‚高次元ベクトルã¯ãƒ­ãƒ¼ãƒ‰ã¨æ¯”較ã«ã‚³ã‚¹ãƒˆãŒã‹ã‹ã‚‹ã‹ã‚‰ã§ã™ã€‚ã“ã®ãƒ©ã‚¤ãƒ–ラリã¯ã¾ãŸã€æœ€æ–°ã®Arm(NEONã¨SVE)ãŠã‚ˆã³x86(AVX2ã¨AVX-512)CPUã§è·é›¢è¨ˆç®—ã‚’ã•ã‚‰ã«åŠ é€Ÿã™ã‚‹ãŸã‚ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢å›ºæœ‰ã®SIMD最é©åŒ–ã‚„ã€RAMã«ãƒ­ãƒ¼ãƒ‰ã›ãšã«ä¸å¤‰ã®æ°¸ç¶šãƒ•ã‚¡ã‚¤ãƒ«å‘¨ã‚Šã‚’効率的ã«ãƒŠãƒ“ゲートã™ã‚‹ãŸã‚ã®OS固有ã®æœ€é©åŒ–ã‚‚å‚™ãˆã¦ã„ã¾ã™ã€‚ + +USearchインデックスã¯ç¾åœ¨ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã§ã‚ã‚Šã€ä½¿ç”¨ã™ã‚‹ã«ã¯ã¾ãš`SET allow_experimental_vector_similarity_index = 1`を設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ベクトル類似インデックスã¯ç¾åœ¨äºŒã¤ã®è·é›¢é–¢æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: +- `L2Distance`ã€ãƒ¦ãƒ¼ã‚¯ãƒªãƒƒãƒ‰è·é›¢ã¨ã‚‚呼ã°ã‚Œã€ãƒ¦ãƒ¼ã‚¯ãƒªãƒƒãƒ‰ç©ºé–“内ã®äºŒç‚¹é–“ã®ç·šåˆ†ã®é•·ã•ï¼ˆ[Wikipedia](https://en.wikipedia.org/wiki/Euclidean_distance))。 +- `cosineDistance`ã€ã‚³ã‚µã‚¤ãƒ³é¡žä¼¼æ€§ã¨ã‚‚呼ã°ã‚Œã€äºŒã¤ã®ï¼ˆã‚¼ãƒ­ã§ãªã„)ベクトル間ã®è§’度ã®ã‚³ã‚µã‚¤ãƒ³ï¼ˆ[Wikipedia](https://en.wikipedia.org/wiki/Cosine_similarity))。 + +ベクトル類似インデックスã¯ãƒ™ã‚¯ãƒˆãƒ«ã‚’精度をè½ã¨ã—ãŸå½¢å¼ã§ä¿å­˜ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るスカラー型ã¯`f64`ã€`f32`ã€`f16`ã€`bf16`ã€ãŠã‚ˆã³`i8`ã§ã™ã€‚インデックス作æˆæ™‚ã«ã‚¹ã‚«ãƒ©ãƒ¼åž‹ã‚’指定ã—ãªã‹ã£ãŸå ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`bf16`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +æ­£è¦åŒ–ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«ã¯é€šå¸¸`L2Distance`ãŒã‚ˆã‚Šè‰¯ã„é¸æŠžã§ã‚ã‚Šã€ãã†ã§ãªã„å ´åˆã¯ã‚¹ã‚±ãƒ¼ãƒ«ã‚’補ã†ãŸã‚`cosineDistance`ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚インデックス作æˆæ™‚ã«è·é›¢é–¢æ•°ãŒæŒ‡å®šã•ã‚Œãªã‹ã£ãŸå ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`L2Distance`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +:::note +ã™ã¹ã¦ã®é…列ã¯åŒã˜é•·ã•ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚エラーを回é¿ã™ã‚‹ãŸã‚ã«ã€ä¾‹ãˆã°`CONSTRAINT constraint_name_1 CHECK length(vectors) = 256`ã¨ã„ã£ãŸ[CONSTRAINT](/docs/ja/sql-reference/statements/create/table.md#constraints)を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã¾ãŸã€`INSERT`æ–‡ã§ç©ºã®`Arrays`や指定ã•ã‚Œã¦ã„ãªã„`Array`値(ã¤ã¾ã‚Šãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼‰ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: + +:::note +ç¾åœ¨ã€ãƒ™ã‚¯ãƒˆãƒ«é¡žä¼¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ãƒ†ãƒ¼ãƒ–ルã”ã¨ã«è¨­å®šã•ã‚Œã‚‹éžãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®`index_granularity`設定ã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。[ã“ã¡ã‚‰ã‚’å‚ç…§](https://github.com/ClickHouse/ClickHouse/pull/51325#issuecomment-1605920475)。必è¦ãŒã‚ã‚Œã°ã€config.xmlã§å€¤ã‚’変更ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +ベクトルインデックス作æˆã¯é…ã„ã“ã¨ãŒçŸ¥ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ—ロセスを速ã‚ã‚‹ãŸã‚ã«ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä½œæˆã‚’並列化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚スレッドã®æœ€å¤§æ•°ã¯ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šã®[max_build_vector_similarity_index_thread_pool_size](../../../operations/server-configuration-parameters/settings.md#server_configuration_parameters_max_build_vector_similarity_index_thread_pool_size)ã§è¨­å®šã§ãã¾ã™ã€‚ + +ANNインデックスã¯ã‚«ãƒ©ãƒ ã®æŒ¿å…¥ãŠã‚ˆã³ãƒžãƒ¼ã‚¸æ™‚ã«æ§‹ç¯‰ã•ã‚Œã¾ã™ã€‚ãã®çµæžœã€`INSERT`ã‚„`OPTIMIZE`ステートメントã¯é€šå¸¸ã®ãƒ†ãƒ¼ãƒ–ルã«æ¯”ã¹ã¦é…ããªã‚Šã¾ã™ã€‚ANNインデックスã¯åŸºæœ¬çš„ã«ä¸å¤‰ã¾ãŸã¯ã¾ã‚Œã«ã—ã‹å¤‰æ›´ã•ã‚Œãªã„データã«ã®ã¿ä½¿ç”¨ã•ã‚Œã€èª­ã¿å–ã‚Šè¦æ±‚ãŒæ›¸ãè¾¼ã¿è¦æ±‚よりも多ã„å ´åˆã«ç†æƒ³çš„ã§ã™ã€‚ + +:::tip +ベクトル類似インデックスã®æ§‹ç¯‰ã‚³ã‚¹ãƒˆã‚’削減ã™ã‚‹ã«ã¯ã€æ–°ã—ã挿入ã•ã‚ŒãŸãƒ‘ーツã«ã‚¹ã‚­ãƒƒãƒ—インデックスã®æ§‹ç¯‰ã‚’無効ã«ã™ã‚‹`materialize_skip_indexes_on_insert`を設定ã—ã¦ãã ã•ã„。検索ã¯æ­£ç¢ºãªæ¤œç´¢ã«ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ã¾ã™ãŒã€æŒ¿å…¥ã•ã‚ŒãŸãƒ‘ーツã¯é€šå¸¸ãƒ†ãƒ¼ãƒ–ル全体ã®ã‚µã‚¤ã‚ºã«æ¯”ã¹ã¦å°ã•ã„ã®ã§ã€ãã®å½±éŸ¿ã¯ç„¡è¦–ã§ãる程度ã§ã™ã€‚ + +ANNインデックスã¯ã“ã®ç¨®ã®ã‚¯ã‚¨ãƒªã‚’サãƒãƒ¼ãƒˆã—ã¾ã™: + +``` sql +WITH [...] AS reference_vector +SELECT * +FROM table +WHERE ... -- WHEREå¥ã¯ã‚ªãƒ—ション +ORDER BY Distance(vectors, reference_vector) +LIMIT N +SETTINGS enable_analyzer = 0; -- 一時的ãªåˆ¶é™ã§ã€è§£é™¤ã•ã‚Œã‚‹äºˆå®š +``` + +:::tip +大ããªãƒ™ã‚¯ãƒˆãƒ«ã‚’出力ã™ã‚‹ã®ã‚’é¿ã‘ã‚‹ãŸã‚ã€[クエリパラメータ](/docs/ja/interfaces/cli.md#queries-with-parameters-cli-queries-with-parameters)を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€ + +```bash +clickhouse-client --param_vec='hello' --query="SELECT * FROM table WHERE L2Distance(vectors, {vec: Array(Float32)}) < 1.0" +``` +::: + +HNSWパラメータ`hnsw_candidate_list_size_for_search`(デフォルト: 256)を異ãªã‚‹å€¤ã§æ¤œç´¢ã™ã‚‹ãŸã‚ã«ã€`SELECT`クエリを`SETTINGS hnsw_candidate_list_size_for_search = `を指定ã—ã¦å®Ÿè¡Œã—ã¾ã™ã€‚ + +**制é™äº‹é …**: 近似アルゴリズムを使用ã—ã¦æœ€é©è¿‘å‚を決定ã™ã‚‹ãŸã‚ã«ã€åˆ¶é™ãŒå¿…è¦ã§ã™ã€‚ãã®ãŸã‚ã€`LIMIT`å¥ã®ãªã„クエリã¯ANNインデックスを利用ã§ãã¾ã›ã‚“。ã¾ãŸã€ANNインデックスã¯ã‚¯ã‚¨ãƒªã«`max_limit_for_ann_queries`(デフォルト: 100万行)よりå°ã•ã„`LIMIT`値ãŒã‚ã‚‹å ´åˆã«ã®ã¿ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€è¿‘似近å‚検索ã®ãŸã‚ã«å¤–部ライブラリã«ã‚ˆã‚‹å¤§è¦æ¨¡ãªãƒ¡ãƒ¢ãƒªå‰²ã‚Šå½“ã¦ã‚’防ããŸã‚ã®å®‰å…¨ç­–ã§ã™ã€‚ + +**スキップインデックスã¨ã®é•ã„** 通常ã®[スキップインデックス](https://clickhouse.com/docs/ja/optimize/skipping-indexes)ã¨åŒæ§˜ã«ã€ANNインデックスã¯ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã”ã¨ã«æ§‹ç¯‰ã•ã‚Œã€å„インデックスブロックã¯`GRANULARITY = [N]`グラニュール(通常ã®ã‚¹ã‚­ãƒƒãƒ—インデックスã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`[N]` = 1)ã§æ§‹æˆã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ãƒ†ãƒ¼ãƒ–ルã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ©ãƒªãƒ†ã‚£ãŒ8192(`index_granularity = 8192`設定)ã§ã‚ã‚Šã€`GRANULARITY = 2`ã®å ´åˆã€å„インデックスブロックã¯16384行をå«ã¿ã¾ã™ã€‚ã—ã‹ã—ã€è¿‘似近å‚検索ã®ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã¨ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ï¼ˆé€šå¸¸å¤–部ライブラリã‹ã‚‰æä¾›ã•ã‚Œã‚‹ï¼‰ã¯æœ¬è³ªçš„ã«è¡ŒæŒ‡å‘ã§ã™ã€‚ãれらã¯ä¸€é€£ã®è¡Œã‚’コンパクトã«è¡¨ç¾ã—ã€ANNクエリã«å¯¾ã™ã‚‹è¡Œã‚‚è¿”ã—ã¾ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã®ã‚¹ã‚­ãƒƒãƒ—インデックスãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ–ロックã®ç²’度ã§ãƒ‡ãƒ¼ã‚¿ã‚’飛ã³è¶Šãˆã‚‹æ–¹æ³•ã¨ã¯ç•°ãªã‚‹æŒ¯ã‚‹èˆžã„を引ãèµ·ã“ã—ã¾ã™ã€‚ + +ユーザーãŒã‚«ãƒ©ãƒ ã«ANNインデックスを定義ã™ã‚‹ã¨ã€ClickHouseã¯å†…部的ã«å„インデックスブロックã«å¯¾ã—ã¦ANN「サブインデックスã€ã‚’作æˆã—ã¾ã™ã€‚サブインデックスã¯ã€Œãƒ­ãƒ¼ã‚«ãƒ«ã€ã§ã‚ã‚Šã€è‡ªèº«ã®å«ã‚€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ–ロック内ã®è¡Œã®ã¿ã‚’èªè­˜ã—ã¦ã„ã¾ã™ã€‚å‰è¿°ã®ä¾‹ã§ã€ã‚«ãƒ©ãƒ ãŒ65536è¡Œã‚ã‚‹ã¨ä»®å®šã™ã‚‹ã¨ã€å››ã¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ–ロック(八ã¤ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã«ã¾ãŸãŒã‚‹ï¼‰ãŒå¾—られã€ãã‚Œãžã‚Œã«ANNサブインデックスãŒä½œæˆã•ã‚Œã¾ã™ã€‚サブインデックスã¯ç†è«–çš„ã«ã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ–ロック内ã§N個ã®æœ€ã‚‚è¿‘ã„点をæŒã¤è¡Œã‚’直接返ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã—ã‹ã—ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’ディスクã‹ã‚‰ãƒ¡ãƒ¢ãƒªã«ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã®ç²’度ã§ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã€ã‚µãƒ–インデックスã¯ä¸€è‡´ã™ã‚‹è¡Œã‚’グラニュール粒度ã«å¤–挿ã—ã¾ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã®ã‚¹ã‚­ãƒƒãƒ—インデックスãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ–ロックã®ç²’度ã§ãƒ‡ãƒ¼ã‚¿ã‚’飛ã³è¶Šãˆã‚‹æ–¹æ³•ã¨ç•°ãªã‚Šã¾ã™ã€‚ + +`GRANULARITY`パラメータã¯ã€ã„ãã¤ã®ANNサブインデックスãŒä½œæˆã•ã‚Œã‚‹ã‹ã‚’決定ã—ã¾ã™ã€‚大ããª`GRANULARITY`値ã¯ã€å°‘ãªã„ãŒå¤§ããªANNSサブインデックスをæ„味ã—ã€ä¸€ã¤ã®ã‚µãƒ–インデックスãŒã‚るカラム(ã¾ãŸã¯ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ート)ã®å ´åˆã¾ã§ã€å¤§ãã•ã‚’増やã—ã¾ã™ã€‚ãã®å ´åˆã€ã‚µãƒ–インデックスã¯ã‚«ãƒ©ãƒ è¡Œå…¨ä½“(ã¾ãŸã¯ãã®ä¸€éƒ¨ï¼‰ã®ã™ã¹ã¦ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã‚’直接返ã›ã‚‹ã€Œã‚°ãƒ­ãƒ¼ãƒãƒ«ã€ãªãƒ“ューをæŒã¡ã¾ã™ï¼ˆé–¢é€£ã™ã‚‹è¡ŒãŒã‚るグラニュールã¯æœ€å¤§ã§`LIMIT [N]`個ã§ã™ï¼‰ã€‚次ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã¯ã€ClickHouseãŒã“れらã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã‚’ロードã—ã€ãƒ–ルートフォースã§è·é›¢è¨ˆç®—ã‚’è¡Œã†ã“ã¨ã«ã‚ˆã‚Šã€å®Ÿéš›ã®æœ€è‰¯ã®è¡Œã‚’確èªã—ã¾ã™ã€‚å°ã•ã„`GRANULARITY`値ã§ã¯ã€å„サブインデックスãŒæœ€å¤§`LIMIT N`ã¾ã§ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚çµæžœã¨ã—ã¦ã€ã‚ˆã‚Šå¤šãã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã‚’ロードã—ã¦å¾Œå‡¦ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚一方ã€å¤§ããª`GRANULARITY`値を使用ã™ã‚‹ã“ã¨ãŒä¸€èˆ¬çš„ã«æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ANNインデックスã®å‡¦ç†æ€§èƒ½ãŒç•°ãªã‚‹ã ã‘ã§ã€æ¤œç´¢ç²¾åº¦ã«ã¯ä¸¡æ–¹ã¨ã‚‚ç­‰ã—ã良ã„影響を与ãˆã¾ã™ã€‚`GRANULARITY`ãŒANNインデックスã§æŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯1å„„ã§ã™ã€‚ diff --git a/docs/ja/engines/table-engines/mergetree-family/collapsingmergetree.md b/docs/ja/engines/table-engines/mergetree-family/collapsingmergetree.md new file mode 100644 index 00000000000..8c45ef21e4c --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/collapsingmergetree.md @@ -0,0 +1,308 @@ +--- +slug: /ja/engines/table-engines/mergetree-family/collapsingmergetree +sidebar_position: 70 +sidebar_label: CollapsingMergeTree +--- + +# CollapsingMergeTree + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ [MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md)ã‹ã‚‰ç¶™æ‰¿ã—ã¦ãŠã‚Šã€è¡Œã®æŠ˜ã‚Šç•³ã¿ãƒ­ã‚¸ãƒƒã‚¯ã‚’データパーツã®ãƒžãƒ¼ã‚¸ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã«è¿½åŠ ã—ã¦ã„ã¾ã™ã€‚ + +`CollapsingMergeTree` ã¯ã€ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ (`ORDER BY`)内ã®ç‰¹å®šã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰`Sign`ãŒã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¨ç­‰ä¾¡ã§ã‚ã‚‹å ´åˆã«ã€1 㨠-1 ã®å€¤ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã«ã€è¡Œã®ãƒšã‚¢ã‚’éžåŒæœŸçš„ã«å‰Šé™¤ï¼ˆæŠ˜ã‚Šç•³ã¿ï¼‰ã—ã¾ã™ã€‚ペアãŒãªã„è¡Œã¯ä¿æŒã•ã‚Œã¾ã™ã€‚詳細ã¯ã€æœ¬ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã® [Collapsing](#table_engine-collapsingmergetree-collapsing) セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã«ã‚ˆã‚Šã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ãŒå¤§å¹…ã«å‰Šæ¸›ã•ã‚Œã€`SELECT`クエリã®åŠ¹çŽ‡ãŒå‘上ã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE = CollapsingMergeTree(sign) +[PARTITION BY expr] +[ORDER BY expr] +[SAMPLE BY expr] +[SETTINGS name=value, ...] +``` + +クエリパラメータã®èª¬æ˜Žã«ã¤ã„ã¦ã¯ã€[クエリ説明](../../../sql-reference/statements/create/table.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## CollapsingMergeTree パラメータ + +### sign + +`sign` — è¡Œã®ã‚¿ã‚¤ãƒ—を示ã™ã‚«ãƒ©ãƒ ã®åå‰: `1` ã¯ã€ŒçŠ¶æ…‹ã€ã®è¡Œã§ã€`-1` ã¯ã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€è¡Œã§ã™ã€‚ + + カラムã®ãƒ‡ãƒ¼ã‚¿åž‹ — `Int8`. + +## ã‚¯ã‚¨ãƒªå¥ + +`CollapsingMergeTree`テーブルを作æˆã™ã‚‹å ´åˆã€`MergeTree`テーブルを作æˆã™ã‚‹ã¨ãã¨åŒã˜[クエリå¥](../../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)ãŒå¿…è¦ã§ã™ã€‚ + +
+ +推奨ã•ã‚Œãªã„方法ã§ã®ãƒ†ãƒ¼ãƒ–ãƒ«ä½œæˆ + +:::note +æ–°ã—ã„プロジェクトã§ã¯ã“ã®æ–¹æ³•ã‚’使用ã›ãšã€å¯èƒ½ã§ã‚ã‚Œã°ä¸Šè¨˜ã§èª¬æ˜Žã—ãŸæ–¹æ³•ã«å¤ã„プロジェクトを切り替ãˆã¦ãã ã•ã„。 +::: + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE [=] CollapsingMergeTree(date-column [, sampling_expression], (primary, key), index_granularity, sign) +``` + +`sign`を除ãã™ã¹ã¦ã®ãƒ‘ラメータã¯`MergeTree`ã¨åŒã˜æ„味をæŒã¡ã¾ã™ã€‚ + +- `sign` — è¡Œã®ã‚¿ã‚¤ãƒ—を示ã™ã‚«ãƒ©ãƒ å: `1` — 「状態ã€ã®è¡Œ, `-1` — 「キャンセルã€è¡Œã€‚ + + カラムデータ型 — `Int8`. + +
+ +## Collapsing {#table_engine-collapsingmergetree-collapsing} + +### データ {#data} + +特定ã®ã‚ªãƒ–ジェクトã®ç¶™ç¶šçš„ã«å¤‰åŒ–ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚る状æ³ã‚’考ãˆã¦ã¿ã¦ãã ã•ã„。オブジェクトã®1行をæŒã¡ã€å¤‰æ›´æ™‚ã«ãれを更新ã™ã‚‹ã®ãŒè«–ç†çš„ã«èžã“ãˆã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€æ›´æ–°æ“作ã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å†…ã®ãƒ‡ãƒ¼ã‚¿ã®æ›¸ãæ›ãˆã‚’å¿…è¦ã¨ã™ã‚‹ãŸã‚ã€DBMSã«ã¨ã£ã¦æ™‚é–“ã¨è²»ç”¨ã®ã‹ã‹ã‚‹æ“作ã§ã™ã€‚データを迅速ã«æ›¸ã込む必è¦ãŒã‚ã‚‹å ´åˆã€æ›´æ–°ã¯å®¹èªã§ãã¾ã›ã‚“ãŒã€æ¬¡ã®ã‚ˆã†ã«ã‚ªãƒ–ジェクトã®å¤‰æ›´ã‚’順次書ã込むã“ã¨ãŒã§ãã¾ã™ã€‚ + +特定ã®ã‚«ãƒ©ãƒ  `Sign` を使用ã—ã¾ã™ã€‚`Sign = 1` ã®å ´åˆã€è¡Œã¯ã‚ªãƒ–ジェクトã®çŠ¶æ…‹ã‚’示ã—ã€ã€ŒçŠ¶æ…‹ã€è¡Œã¨å‘¼ã³ã¾ã™ã€‚`Sign = -1` ã®å ´åˆã€åŒã˜å±žæ€§ã‚’æŒã¤ã‚ªãƒ–ジェクトã®çŠ¶æ…‹ã®ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã‚’示ã—ã€ã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€è¡Œã¨å‘¼ã³ã¾ã™ã€‚ + +例ãˆã°ã€ã‚るサイトã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒã‚§ãƒƒã‚¯ã—ãŸãƒšãƒ¼ã‚¸ã¨ãã“ã§ã®æ»žåœ¨æ™‚間を計算ã—ãŸã„ã¨ã—ã¾ã™ã€‚ã‚る時点ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ“ティ状態を次ã®è¡Œã§è¨˜éŒ²ã—ã¾ã™ã€‚ + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┠+│ 4324182021466249494 │ 5 │ 146 │ 1 │ +└─────────────────────┴───────────┴──────────┴──────┘ +``` + +後ã®ã‚る時点ã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ“ティã®å¤‰åŒ–を登録ã—ã€æ¬¡ã®2è¡Œã§è¨˜éŒ²ã—ã¾ã™ã€‚ + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┠+│ 4324182021466249494 │ 5 │ 146 │ -1 │ +│ 4324182021466249494 │ 6 │ 185 │ 1 │ +└─────────────────────┴───────────┴──────────┴──────┘ +``` + +最åˆã®è¡Œã¯ã‚ªãƒ–ジェクト(ユーザー)ã®ä»¥å‰ã®çŠ¶æ…‹ã‚’キャンセルã—ã¾ã™ã€‚キャンセルã•ã‚ŒãŸçŠ¶æ…‹ã®ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’ Sign を除ã„ã¦ã‚³ãƒ”ーã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +2番目ã®è¡Œã«ã¯ç¾åœ¨ã®çŠ¶æ…‹ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +ç§ãŸã¡ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®æ´»å‹•ã®æœ€å¾Œã®çŠ¶æ…‹ã®ã¿ã‚’å¿…è¦ã¨ã—ã¦ã„ã‚‹ã®ã§ã€æ¬¡ã®è¡Œ + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┠+│ 4324182021466249494 │ 5 │ 146 │ 1 │ +│ 4324182021466249494 │ 5 │ 146 │ -1 │ +└─────────────────────┴───────────┴──────────┴──────┘ +``` + +ã¯ã‚ªãƒ–ジェクトã®ç„¡åŠ¹ãªï¼ˆå¤ã„)状態を折り畳んã§å‰Šé™¤ã§ãã¾ã™ã€‚`CollapsingMergeTree` ã¯ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ä¸­ã«ã“れを行ã„ã¾ã™ã€‚ + +ãªãœã™ã¹ã¦ã®å¤‰æ›´ã«å¯¾ã—ã¦2è¡ŒãŒå¿…è¦ãªã®ã‹ã€[アルゴリズム](#table_engine-collapsingmergetree-collapsing-algorithm)ã®æ®µè½ã§èª¬æ˜Žã—ã¾ã™ã€‚ + +**ã“ã®ã‚¢ãƒ—ローãƒã®ç‰¹ç•°ãªç‰¹æ€§** + +1. データを書ãプログラムã¯ã€ã‚ªãƒ–ジェクトをキャンセルã§ãるよã†ã«ãã®çŠ¶æ…‹ã‚’記憶ã—ã¦ãŠãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚「キャンセルã€æ–‡å­—列ã¯ã€ŒçŠ¶æ…‹ã€æ–‡å­—列ã®ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®ã‚³ãƒ”ーã¨å対ã®`Sign` ã‚’å«ã‚€ã¹ãã§ã™ã€‚åˆæœŸã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚µã‚¤ã‚ºã‚’増大ã•ã›ã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã‚’ã™ã°ã‚„ã書ã込むã“ã¨ãŒã§ãã¾ã™ã€‚ +2. カラム内ã®é•·ã„増加ã™ã‚‹é…列ã¯ã€æ›¸ãè¾¼ã¿è² è·ã®ãŸã‚ã€ã‚¨ãƒ³ã‚¸ãƒ³ã®åŠ¹çŽ‡ã‚’低下ã•ã›ã¾ã™ã€‚よりå˜ç´”ãªãƒ‡ãƒ¼ã‚¿ã®æ–¹ãŒåŠ¹çŽ‡ã¯é«˜ããªã‚Šã¾ã™ã€‚ +3. `SELECT`ã®çµæžœã¯ã‚ªãƒ–ジェクト変更履歴ã®ä¸€è²«æ€§ã«å¤§ããä¾å­˜ã—ã¾ã™ã€‚挿入用データを準備ã™ã‚‹éš›ã«ã¯æ­£ç¢ºã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚一貫性ã®ãªã„データã§ã¯ã€ä¾‹ãˆã°ã‚»ãƒƒã‚·ãƒ§ãƒ³æ·±åº¦ã®ã‚ˆã†ãªéžè² ã®ãƒ¡ãƒˆãƒªãƒƒã‚¯ã«å¯¾ã—ã¦è² ã®å€¤ã‚’å¾—ã‚‹ã¨ã„ã£ãŸäºˆæ¸¬ä¸å¯èƒ½ãªçµæžœãŒç”Ÿã˜ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +### アルゴリズム {#table_engine-collapsingmergetree-collapsing-algorithm} + +ClickHouseãŒãƒ‡ãƒ¼ã‚¿ãƒ‘ーツをマージã™ã‚‹éš›ã€åŒã˜ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ (`ORDER BY`)ã‚’æŒã¤é€£ç¶šã™ã‚‹è¡Œã®å„グループã¯ã€`Sign = 1` ã®è¡Œï¼ˆã€ŒçŠ¶æ…‹ã€è¡Œï¼‰ã¨ `Sign = -1` ã®è¡Œï¼ˆã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€è¡Œï¼‰ã‚’æŒã¤2行以下ã«æ¸›å°‘ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚¨ãƒ³ãƒˆãƒªã¯å´©å£Šã—ã¾ã™ã€‚ + +çµæžœã¨ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®å„々ã«ã¤ã„ã¦ã€ClickHouse ã¯æ¬¡ã®ã“ã¨ã‚’è¡Œã„ã¾ã™ï¼š + +1. 「状態ã€è¡Œã¨ã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€è¡Œã®æ•°ãŒä¸€è‡´ã—ã€æœ€å¾Œã®è¡ŒãŒã€ŒçŠ¶æ…‹ã€è¡Œã®å ´åˆã€æœ€åˆã®ã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€è¡Œã¨æœ€å¾Œã®ã€ŒçŠ¶æ…‹ã€è¡Œã‚’ä¿æŒã—ã¾ã™ã€‚ +2. 「状態ã€è¡ŒãŒã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€è¡Œã‚ˆã‚Šå¤šã„å ´åˆã€æœ€å¾Œã®ã€ŒçŠ¶æ…‹ã€è¡Œã‚’ä¿æŒã—ã¾ã™ã€‚ +3. 「キャンセルã€è¡ŒãŒã€ŒçŠ¶æ…‹ã€è¡Œã‚ˆã‚Šå¤šã„å ´åˆã€æœ€åˆã®ã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€è¡Œã‚’ä¿æŒã—ã¾ã™ã€‚ +4. ä»–ã®ã™ã¹ã¦ã®å ´åˆã€ã©ã®è¡Œã‚‚ä¿æŒã—ã¾ã›ã‚“。 + +ã¾ãŸã€ã€ŒçŠ¶æ…‹ã€è¡ŒãŒã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€è¡Œã‚ˆã‚Šå°‘ãªãã¨ã‚‚2ã¤ä»¥ä¸Šå¤šã„å ´åˆã€ã¾ãŸã¯ã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€è¡ŒãŒã€ŒçŠ¶æ…‹ã€è¡Œã‚ˆã‚Šå°‘ãªãã¨ã‚‚2ã¤ä»¥ä¸Šå¤šã„å ´åˆã€ãƒžãƒ¼ã‚¸ã¯ç¶šè¡Œã•ã‚Œã¾ã™ãŒã€ClickHouse ã¯ã“ã®çŠ¶æ³ã‚’è«–ç†çš„エラーã¨ã—ã¦æ‰±ã„ã€ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã«è¨˜éŒ²ã—ã¾ã™ã€‚ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ãŒè¤‡æ•°å›žæŒ¿å…¥ã•ã‚ŒãŸå ´åˆã«ç™ºç”Ÿã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +ã—ãŸãŒã£ã¦ã€å´©å£Šã¯çµ±è¨ˆè¨ˆç®—ã®çµæžœã‚’変更ã™ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +変更ã¯å¾ã€…ã«æŠ˜ã‚Šç•³ã¾ã‚Œã€æœ€çµ‚çš„ã«ã¯ã»ã¼ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã®æœ€å¾Œã®çŠ¶æ…‹ã®ã¿ãŒæ®‹ã‚Šã¾ã™ã€‚ + +`Sign` ã¯å¿…é ˆã§ã™ã€‚ãªãœãªã‚‰ã€ãƒžãƒ¼ã‚¸ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯åŒã˜ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’æŒã¤ã™ã¹ã¦ã®è¡ŒãŒåŒã˜çµæžœã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツやåŒã˜ç‰©ç†ã‚µãƒ¼ãƒãƒ¼ä¸Šã«ã‚ã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ãªã„ã‹ã‚‰ã§ã™ã€‚ClickHouse ã¯è¤‡æ•°ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§`SELECT`クエリを処ç†ã—ã€çµæžœä¸­ã®è¡Œã®é †åºã‚’予測ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。`CollapsingMergeTree` テーブルã‹ã‚‰å®Œå…¨ã«ã€ŒæŠ˜ã‚Šç•³ã¾ã‚ŒãŸã€ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€é›†è¨ˆãŒå¿…è¦ã§ã™ã€‚ + +最終的ãªå´©å£Šã‚’è¡Œã†ã«ã¯ã€`GROUP BY` å¥ã¨ç¬¦å·ã‚’考慮ã«å…¥ã‚ŒãŸé›†è¨ˆé–¢æ•°ã‚’å«ã‚€ã‚¯ã‚¨ãƒªã‚’書ãã¾ã™ã€‚ãŸã¨ãˆã°ã€æ•°é‡ã‚’計算ã™ã‚‹å ´åˆã¯`count()`ã®ä»£ã‚ã‚Šã«`sum(Sign)`を使用ã—ã¾ã™ã€‚何ã‹ã®åˆè¨ˆã‚’計算ã™ã‚‹å ´åˆã¯`sum(x)`ã®ä»£ã‚ã‚Šã«`sum(Sign * x)`を使用ã™ã‚‹ãªã©ã—ã€ã•ã‚‰ã«`HAVING sum(Sign) > 0`を追加ã—ã¾ã™ã€‚ + +ã“ã®æ–¹æ³•ã§`count`ã€`sum`ã€ãŠã‚ˆã³`avg`を計算ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚オブジェクトãŒæŠ˜ã‚Šç•³ã¾ã‚Œãªã„状態を少ãªãã¨ã‚‚1ã¤æŒã£ã¦ã„ã‚‹å ´åˆã€`uniq`を計算ã§ãã¾ã™ã€‚`CollapsingMergeTree`ãŒæŠ˜ã‚Šç•³ã¾ã‚ŒãŸçŠ¶æ…‹ã®å€¤ã®å±¥æ­´ã‚’ä¿å­˜ã—ãªã„ãŸã‚ã€`min`ãŠã‚ˆã³`max`を計算ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +集計ãªã—ã§ãƒ‡ãƒ¼ã‚¿ã‚’抽出ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆï¼ˆãŸã¨ãˆã°ã€æœ€æ–°ã®å€¤ãŒç‰¹å®šã®æ¡ä»¶ã¨ä¸€è‡´ã™ã‚‹è¡ŒãŒå­˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹ã‚’確èªã™ã‚‹å ´åˆï¼‰ã€`FROM`å¥ã«`FINAL`修飾å­ã‚’使用ã§ãã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã¯éžå¸¸ã«åŠ¹çŽ‡ãŒæ‚ªã„ã§ã™ã€‚ + +## 使用例 {#example-of-use} + +サンプルデータ: + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┠+│ 4324182021466249494 │ 5 │ 146 │ 1 │ +│ 4324182021466249494 │ 5 │ 146 │ -1 │ +│ 4324182021466249494 │ 6 │ 185 │ 1 │ +└─────────────────────┴───────────┴──────────┴──────┘ +``` + +テーブルã®ä½œæˆ: + +``` sql +CREATE TABLE UAct +( + UserID UInt64, + PageViews UInt8, + Duration UInt8, + Sign Int8 +) +ENGINE = CollapsingMergeTree(Sign) +ORDER BY UserID +``` + +データã®æŒ¿å…¥: + +``` sql +INSERT INTO UAct VALUES (4324182021466249494, 5, 146, 1) +``` + +``` sql +INSERT INTO UAct VALUES (4324182021466249494, 5, 146, -1),(4324182021466249494, 6, 185, 1) +``` + +我々ã¯2ã¤ã®`INSERT`クエリを使用ã—ã¦2ã¤ã®ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを作æˆã—ã¾ã—ãŸã€‚1ã¤ã®ã‚¯ã‚¨ãƒªã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹å ´åˆã¯ã€ClickHouseã¯1ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを作æˆã—ã€ãƒžãƒ¼ã‚¸ã¯ç™ºç”Ÿã—ã¾ã›ã‚“。 + +データã®å–å¾—: + +``` sql +SELECT * FROM UAct +``` + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┠+│ 4324182021466249494 │ 5 │ 146 │ -1 │ +│ 4324182021466249494 │ 6 │ 185 │ 1 │ +└─────────────────────┴───────────┴──────────┴──────┘ +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┠+│ 4324182021466249494 │ 5 │ 146 │ 1 │ +└─────────────────────┴───────────┴──────────┴──────┘ +``` + +何を見ã¦ã€ã©ã“ã§æŠ˜ã‚Šç•³ã¿ãŒè¡Œã‚れるã®ã‹ï¼Ÿ + +2ã¤ã®`INSERT`クエリを通ã˜ã¦ã€2ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを作æˆã—ã¾ã—ãŸã€‚`SELECT`クエリã¯2ã¤ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§å®Ÿè¡Œã•ã‚Œã€æˆ‘々ã¯è¡Œã®ãƒ©ãƒ³ãƒ€ãƒ ãªé †åºã‚’å¾—ã¾ã—ãŸã€‚折り畳ã¿ã¯ç™ºç”Ÿã—ã¾ã›ã‚“ã§ã—ãŸã€‚ãªãœãªã‚‰ã€ã¾ã ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ãŒè¡Œã‚ã‚Œã¦ã„ãªã„ã‹ã‚‰ã§ã™ã€‚ClickHouseã¯äºˆæ¸¬ã§ããªã„瞬間ã«ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツをマージã—ã¾ã™ã€‚ + +ã—ãŸãŒã£ã¦ã€é›†è¨ˆãŒå¿…è¦ã§ã™ï¼š + +``` sql +SELECT + UserID, + sum(PageViews * Sign) AS PageViews, + sum(Duration * Sign) AS Duration +FROM UAct +GROUP BY UserID +HAVING sum(Sign) > 0 +``` + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┠+│ 4324182021466249494 │ 6 │ 185 │ +└─────────────────────┴───────────┴──────────┘ +``` + +集計ãŒå¿…è¦ãªãã¦ã€å¼·åˆ¶çš„ã«æŠ˜ã‚Šç•³ã¿ã‚’è¡Œã„ãŸã„å ´åˆã¯ã€`FROM`å¥ã«`FINAL`修飾å­ã‚’使用ã§ãã¾ã™ã€‚ + +``` sql +SELECT * FROM UAct FINAL +``` + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┠+│ 4324182021466249494 │ 6 │ 185 │ 1 │ +└─────────────────────┴───────────┴──────────┴──────┘ +``` + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã®é¸æŠžæ–¹æ³•ã¯éžå¸¸ã«éžåŠ¹çŽ‡çš„ã§ã™ã€‚大ããªãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ã¯ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 + +## 別ã®ã‚¢ãƒ—ローãƒã®ä½¿ç”¨ä¾‹ {#example-of-another-approach} + +サンプルデータ: + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┠+│ 4324182021466249494 │ 5 │ 146 │ 1 │ +│ 4324182021466249494 │ -5 │ -146 │ -1 │ +│ 4324182021466249494 │ 6 │ 185 │ 1 │ +└─────────────────────┴───────────┴──────────┴──────┘ +``` + +マージã¯ã‚­ãƒ¼ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®ã¿ã‚’考慮ã™ã‚‹ã¨ã„ã†ã‚¢ã‚¤ãƒ‡ã‚¢ã§ã™ã€‚「キャンセルã€è¡Œã§ã¯ã€`Sign` カラムを使用ã›ãšã«åˆè¨ˆã™ã‚‹ã¨ãã«è¡Œã®å‰ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’相殺ã™ã‚‹è² ã®å€¤ã‚’指定ã§ãã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã§ã¯ã€è² ã®å€¤ã‚’æ ¼ç´ã§ãるよã†ã«`PageViews`,`Duration`ã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’UInt8ã‹ã‚‰Int16ã«å¤‰æ›´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` sql +CREATE TABLE UAct +( + UserID UInt64, + PageViews Int16, + Duration Int16, + Sign Int8 +) +ENGINE = CollapsingMergeTree(Sign) +ORDER BY UserID +``` + +ã“ã®ã‚¢ãƒ—ローãƒã‚’テストã—ã¾ã—ょã†ï¼š + +``` sql +insert into UAct values(4324182021466249494, 5, 146, 1); +insert into UAct values(4324182021466249494, -5, -146, -1); +insert into UAct values(4324182021466249494, 6, 185, 1); + +select * from UAct final; // 本番環境ã§ã¯finalã®ä½¿ç”¨ã‚’é¿ã‘ã¦ãã ã•ã„(テストやå°ã•ãªãƒ†ãƒ¼ãƒ–ルã®å ´åˆã®ã¿ï¼‰ +``` + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┠+│ 4324182021466249494 │ 6 │ 185 │ 1 │ +└─────────────────────┴───────────┴──────────┴──────┘ +``` + +``` sql +SELECT + UserID, + sum(PageViews) AS PageViews, + sum(Duration) AS Duration +FROM UAct +GROUP BY UserID +``` + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┠+│ 4324182021466249494 │ 6 │ 185 │ +└─────────────────────┴───────────┴──────────┘ +``` + +``` sql +select count() FROM UAct +``` + +``` text +┌─count()─┠+│ 3 │ +└─────────┘ +``` + +``` sql +optimize table UAct final; + +select * FROM UAct +``` + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┠+│ 4324182021466249494 │ 6 │ 185 │ 1 │ +└─────────────────────┴───────────┴──────────┴──────┘ +``` diff --git a/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key.md b/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key.md new file mode 100644 index 00000000000..7afe33be059 --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key.md @@ -0,0 +1,181 @@ +--- +slug: /ja/engines/table-engines/mergetree-family/custom-partitioning-key +sidebar_position: 30 +sidebar_label: カスタムパーティショニングキー +--- + +# カスタムパーティショニングキー + +:::note +ã»ã¨ã‚“ã©ã®å ´åˆã€ãƒ‘ーティションキーã¯å¿…è¦ãªãã€ãã®ä»–多ãã®å ´åˆã‚‚月å˜ä½ä»¥ä¸Šã«è©³ç´°ãªãƒ‘ーティションキーã¯ä¸è¦ã§ã™ã€‚ + +ã‚ã¾ã‚Šã«è©³ç´°ãªãƒ‘ーティショニングã¯çµ¶å¯¾ã«é¿ã‘ã¦ãã ã•ã„。データをクライアントIDã‚„åå‰ã§ãƒ‘ーティショニングã—ãªã„ã§ãã ã•ã„。代ã‚ã‚Šã«ã€`ORDER BY` å¼ã®æœ€åˆã®ã‚«ãƒ©ãƒ ã¨ã—ã¦ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆIDã‚„åå‰ã‚’設定ã—ã¦ãã ã•ã„。 +::: + +パーティショニングã¯ã€[MergeTree ファミリーã®ãƒ†ãƒ¼ãƒ–ル](../../../engines/table-engines/mergetree-family/mergetree.md)ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ã“ã‚Œã«ã¯ã€[レプリケートテーブル](../../../engines/table-engines/mergetree-family/replication.md)ã‚„[マテリアライズドビュー](../../../sql-reference/statements/create/view.md#materialized-view)ã‚‚å«ã¾ã‚Œã¾ã™ã€‚ + +パーティションã¨ã¯ã€æŒ‡å®šã•ã‚ŒãŸåŸºæº–ã«ã‚ˆã£ã¦ãƒ†ãƒ¼ãƒ–ル内ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’è«–ç†çš„ã«çµ„ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚月å˜ä½ã€æ—¥å˜ä½ã€ã¾ãŸã¯ã‚¤ãƒ™ãƒ³ãƒˆã‚¿ã‚¤ãƒ—別ãªã©ã€ä»»æ„ã®åŸºæº–ã§ãƒ‘ーティションを設定ã§ãã¾ã™ã€‚ãã‚Œãžã‚Œã®ãƒ‘ーティションã¯å€‹åˆ¥ã«ä¿å­˜ã•ã‚Œã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã®æ“作を簡素化ã—ã¾ã™ã€‚データã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹éš›ã€ClickHouse ã¯å¯èƒ½ãªé™ã‚Šæœ€å°ã®ãƒ‘ーティションサブセットを使用ã—ã¾ã™ã€‚パーティションキーをå«ã‚€ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスã¯ã€ãƒ‘ーティションã«ã‚ˆã£ã¦å‘上ã—ã¾ã™ã€‚ClickHouse ã¯ãƒ‘ーツやグラニュールをé¸æŠžã™ã‚‹å‰ã«ã€ãã®ãƒ‘ーティションをフィルタ処ç†ã—ã¾ã™ã€‚ + +パーティションã¯ã€[テーブル作æˆæ™‚](../../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)ã® `PARTITION BY expr` å¥ã§æŒ‡å®šã•ã‚Œã¾ã™ã€‚パーティションキーã¯ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã‹ã‚‰ä»»æ„ã®å¼ã‚’用ã„ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€æœˆåˆ¥ã®ãƒ‘ーティショニングを指定ã™ã‚‹ã«ã¯ã€`toYYYYMM(date_column)` ã¨ã„ã†å¼ã‚’使用ã—ã¾ã™ã€‚ + +``` sql +CREATE TABLE visits +( + VisitDate Date, + Hour UInt8, + ClientID UUID +) +ENGINE = MergeTree() +PARTITION BY toYYYYMM(VisitDate) +ORDER BY Hour; +``` + +パーティションキーã¯ã€è¤‡æ•°ã®å¼ã®ã‚¿ãƒ—ルã«ã‚‚ã§ãã¾ã™ï¼ˆ[主キー](../../../engines/table-engines/mergetree-family/mergetree.md#primary-keys-and-indexes-in-queries)ã¨ä¼¼ã¦ã„ã¾ã™ï¼‰ã€‚例ãˆã°ï¼š + +``` sql +ENGINE = ReplicatedCollapsingMergeTree('/clickhouse/tables/name', 'replica1', Sign) +PARTITION BY (toMonday(StartDate), EventType) +ORDER BY (CounterID, StartDate, intHash32(UserID)); +``` + +ã“ã®ä¾‹ã§ã¯ã€å½“週中ã«ç™ºç”Ÿã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã‚¿ã‚¤ãƒ—ã§ãƒ‘ーティショニングを設定ã—ã¦ã„ã¾ã™ã€‚ + +デフォルトã§ã¯ã€æµ®å‹•å°æ•°ç‚¹ã®ãƒ‘ーティションキーã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。使用ã™ã‚‹ã«ã¯ã€è¨­å®š [allow_floating_point_partition_key](../../../operations/settings/merge-tree-settings.md#allow_floating_point_partition_key) を有効ã«ã—ã¦ãã ã•ã„。 + +æ–°ã—ã„データをテーブルã«æŒ¿å…¥ã™ã‚‹éš›ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ä¸»ã‚­ãƒ¼ã§ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸå€‹åˆ¥ã®ãƒ‘ーツ(ãƒãƒ£ãƒ³ã‚¯ï¼‰ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚挿入ã‹ã‚‰10-15分後ã«ã€åŒã˜ãƒ‘ーティションã®ãƒ‘ーツãŒçµ±åˆã•ã‚Œã¾ã™ã€‚ + +:::info +çµ±åˆã¯ãƒ‘ーティショニングå¼ãŒåŒã˜å€¤ã‚’æŒã¤ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã«å¯¾ã—ã¦ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€**éŽå‰°ã«è©³ç´°ãªãƒ‘ーティションを作æˆã—ãªã„ã§ãã ã•ã„**(約1,000パーティション以上)。ã•ã‚‚ãªã„ã¨ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«æ•°ãŒä¸å½“ã«å¤šãã€ã‚ªãƒ¼ãƒ—ンファイルディスクリプタãŒè†¨å¤§ã«ãªã‚‹ãŸã‚ `SELECT` クエリã®ãƒ‘フォーマンスãŒæ‚ªããªã‚Šã¾ã™ã€‚ +::: + +[system.parts](../../../operations/system-tables/parts.md#system_tables-parts) テーブルを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルã®ãƒ‘ーツã¨ãƒ‘ーティションを表示ã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€æœˆåˆ¥ãƒ‘ーティショニング㮠`visits` テーブルをæŒã£ã¦ã„ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚`system.parts` テーブルã«å¯¾ã—㦠`SELECT` クエリを実行ã—ã¦ã¿ã¾ã—ょã†ã€‚ + +``` sql +SELECT + partition, + name, + active +FROM system.parts +WHERE table = 'visits' +``` + +``` text +┌─partition─┬─name──────────────┬─active─┠+│ 201901 │ 201901_1_3_1 │ 0 │ +│ 201901 │ 201901_1_9_2_11 │ 1 │ +│ 201901 │ 201901_8_8_0 │ 0 │ +│ 201901 │ 201901_9_9_0 │ 0 │ +│ 201902 │ 201902_4_6_1_11 │ 1 │ +│ 201902 │ 201902_10_10_0_11 │ 1 │ +│ 201902 │ 201902_11_11_0_11 │ 1 │ +└───────────┴───────────────────┴────────┘ +``` + +`partition` カラムã«ã¯ãƒ‘ーティションã®åå‰ãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€`201901` 㨠`201902` ã®2ã¤ã®ãƒ‘ーティションãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚«ãƒ©ãƒ ã®å€¤ã‚’使用ã—ã¦ã€[ALTER ... PARTITION](../../../sql-reference/statements/alter/partition.md) クエリã§ãƒ‘ーティションåを指定ã§ãã¾ã™ã€‚ + +`name` カラムã«ã¯ãƒ‘ーティションデータパーツã®åå‰ãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ã‚«ãƒ©ãƒ ã‚’使用ã—ã¦ã€[ALTER ATTACH PART](../../../sql-reference/statements/alter/partition.md#alter_attach-partition) クエリã§ãƒ‘ーツã®åå‰ã‚’指定ã§ãã¾ã™ã€‚ + +パーツå `201901_1_9_2_11` ã®å†…訳ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ã€‚ + +- `201901` ã¯ãƒ‘ーティションåã§ã™ã€‚ +- `1` ã¯ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®æœ€å°ç•ªå·ã§ã™ã€‚ +- `9` ã¯ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®æœ€å¤§ç•ªå·ã§ã™ã€‚ +- `2` ã¯ãƒãƒ£ãƒ³ã‚¯ãƒ¬ãƒ™ãƒ«ï¼ˆç”Ÿæˆã•ã‚Œã‚‹ MergeTree ã®æ·±ã•ï¼‰ã§ã™ã€‚ +- `11` ã¯å¤‰æ›´ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆãƒ‘ーツãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆï¼‰ + +:::info +å¤ã„タイプã®ãƒ†ãƒ¼ãƒ–ルパーツåã¯æ¬¡ã®å½¢å¼ã§ã™ï¼š`20190117_20190123_2_2_0`(最å°æ—¥ä»˜ - 最大日付 - 最å°ãƒ–ãƒ­ãƒƒã‚¯ç•ªå· - æœ€å¤§ãƒ–ãƒ­ãƒƒã‚¯ç•ªå· - レベル)。 +::: + +`active` カラムã¯ãƒ‘ーツã®çŠ¶æ…‹ã‚’示ã—ã¾ã™ã€‚`1` ã¯ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã€`0` ã¯éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã™ã€‚éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツã¯ã€ä¾‹ãˆã°ã€ã‚ˆã‚Šå¤§ããªãƒ‘ーツã«çµ±åˆã•ã‚ŒãŸå¾Œã«æ®‹ã‚‹ã‚½ãƒ¼ã‚¹ãƒ‘ーツã§ã™ã€‚ç ´æã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ‘ーツもéžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã¨ã—ã¦ç¤ºã•ã‚Œã¾ã™ã€‚ + +例ã§ç¤ºã™ã‚ˆã†ã«ã€åŒã˜ãƒ‘ーティションã«å±žã™ã‚‹ã„ãã¤ã‹ã®åˆ†é›¢ã•ã‚ŒãŸãƒ‘ーツãŒã‚ã‚Šã¾ã™ï¼ˆä¾‹ãˆã°ã€`201901_1_3_1` 㨠`201901_1_9_2`)。ã“ã‚Œã¯ã¾ã çµ±åˆã•ã‚Œã¦ã„ãªã„状態を示ã—ã¦ã„ã¾ã™ã€‚ClickHouse ã¯ãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥ã‹ã‚‰ç´„15分後ã«ã€æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを定期的ã«çµ±åˆã—ã¾ã™ã€‚ã•ã‚‰ã«ã€[OPTIMIZE](../../../sql-reference/statements/optimize.md) クエリを使用ã—ã¦éžã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã®çµ±åˆã‚’è¡Œã†ã“ã¨ã‚‚ã§ãã¾ã™ã€‚例: + +``` sql +OPTIMIZE TABLE visits PARTITION 201902; +``` + +``` text +┌─partition─┬─name─────────────┬─active─┠+│ 201901 │ 201901_1_3_1 │ 0 │ +│ 201901 │ 201901_1_9_2_11 │ 1 │ +│ 201901 │ 201901_8_8_0 │ 0 │ +│ 201901 │ 201901_9_9_0 │ 0 │ +│ 201902 │ 201902_4_6_1 │ 0 │ +│ 201902 │ 201902_4_11_2_11 │ 1 │ +│ 201902 │ 201902_10_10_0 │ 0 │ +│ 201902 │ 201902_11_11_0 │ 0 │ +└───────────┴──────────────────┴────────┘ +``` + +éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツã¯çµ±åˆã‹ã‚‰ç´„10分後ã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +パーツã¨ãƒ‘ーティションã®ã‚»ãƒƒãƒˆã‚’見る別ã®æ–¹æ³•ã¨ã—ã¦ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ–¹æ³•ãŒã‚ã‚Šã¾ã™ï¼š`/var/lib/clickhouse/data///`。例: + +``` bash +/var/lib/clickhouse/data/default/visits$ ls -l +total 40 +drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 1 16:48 201901_1_3_1 +drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 5 16:17 201901_1_9_2_11 +drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 5 15:52 201901_8_8_0 +drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 5 15:52 201901_9_9_0 +drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 5 16:17 201902_10_10_0 +drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 5 16:17 201902_11_11_0 +drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 5 16:19 201902_4_11_2_11 +drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 5 12:09 201902_4_6_1 +drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 1 16:48 detached +``` + +フォルダー ‘201901_1_1_0’, ‘201901_1_7_1’ ãªã©ã¯ãƒ‘ーツã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã™ã€‚å„パーツã¯å¯¾å¿œã™ã‚‹ãƒ‘ーティションã«å±žã—ã€ç‰¹å®šã®æœˆï¼ˆã“ã®ä¾‹ã®ãƒ†ãƒ¼ãƒ–ルã¯æœˆå˜ä½ã§ãƒ‘ーティショニングã•ã‚Œã¦ã„ã¾ã™ï¼‰ã®ãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’å«ã¿ã¾ã™ã€‚ + +`detached` ディレクトリã«ã¯ã€[DETACH](../../../sql-reference/statements/alter/partition.md#alter_detach-partition) クエリを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰åˆ‡ã‚Šé›¢ã•ã‚ŒãŸãƒ‘ーツãŒå«ã¾ã‚Œã¾ã™ã€‚ç ´æã—ãŸãƒ‘ーツも削除ã®ä»£ã‚ã‚Šã«ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ç§»å‹•ã•ã‚Œã¾ã™ã€‚サーãƒãƒ¼ã¯ `detached` ディレクトリã®ãƒ‘ーツを使用ã—ã¾ã›ã‚“。ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…ã®ãƒ‡ãƒ¼ã‚¿ã¯ã„ã¤ã§ã‚‚追加ã€å‰Šé™¤ã€å¤‰æ›´ã§ãã¾ã™ãŒã€ã‚µãƒ¼ãƒãƒ¼ã¯ [ATTACH](../../../sql-reference/statements/alter/partition.md#alter_attach-partition) クエリを実行ã™ã‚‹ã¾ã§ã“ã®ã“ã¨ã‚’èªè­˜ã—ã¾ã›ã‚“。 + +動作中ã®ã‚µãƒ¼ãƒãƒ¼ã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ä¸Šã®ãƒ‘ーツやãã®ãƒ‡ãƒ¼ã‚¿ã®ã‚»ãƒƒãƒˆã‚’手動ã§å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。サーãƒãƒ¼ã¯ãれをèªè­˜ã—ãªã„ãŸã‚ã§ã™ã€‚éžãƒ¬ãƒ—リケートテーブルã®å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ãŒåœæ­¢ã—ã¦ã„ã‚‹ã¨ãã«ã“れを行ã†ã“ã¨ãŒã§ãã¾ã™ãŒã€ãŠå‹§ã‚ã—ã¾ã›ã‚“。レプリケートテーブルã®å ´åˆã€ãƒ‘ーツã®ã‚»ãƒƒãƒˆã‚’変更ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +ClickHouse ã¯ãƒ‘ーティションã«å¯¾ã—ã¦æ“作を行ã†ã“ã¨ãŒã§ãã¾ã™ï¼šå‰Šé™¤ã€åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ã‚³ãƒ”ーã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ä½œæˆãªã©ã€‚ã™ã¹ã¦ã®æ“作ã®ãƒªã‚¹ãƒˆã¯[パーティションã¨ãƒ‘ーツã®æ“作](../../../sql-reference/statements/alter/partition.md#alter_manipulations-with-partitions)セクションをã”覧ãã ã•ã„。 + +## パーティションキーを使用ã—㟠GROUP BY 最é©åŒ– + +テーブルã®ãƒ‘ーティションキーã¨ã‚¯ã‚¨ãƒªã® GROUP BY キーã®çµ„ã¿åˆã‚ã›ã«ã‚ˆã£ã¦ã¯ã€å„パーティションã”ã¨ã«ç‹¬ç«‹ã—ã¦é›†è¨ˆå‡¦ç†ã‚’実行ã§ãã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã®å ´åˆã€ã™ã¹ã¦ã®å®Ÿè¡Œã‚¹ãƒ¬ãƒƒãƒ‰ã®éƒ¨åˆ†çš„ã«é›†è¨ˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’最終的ã«ãƒžãƒ¼ã‚¸ã™ã‚‹å¿…è¦ãŒãªããªã‚Šã¾ã™ã€‚ +ã“ã‚Œã¯ã€å„ GROUP BY キーã®å€¤ãŒç•°ãªã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®ä½œæ¥­ã‚»ãƒƒãƒˆã«ç¾ã‚Œãªã„ã¨ã„ã†ä¿è¨¼ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ + +典型的ãªä¾‹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +``` sql +CREATE TABLE session_log +( + UserID UInt64, + SessionID UUID +) +ENGINE = MergeTree +PARTITION BY sipHash64(UserID) % 16 +ORDER BY tuple(); + +SELECT + UserID, + COUNT() +FROM session_log +GROUP BY UserID; +``` + +:::note +ã“ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスã¯ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã«å¤§ããä¾å­˜ã—ã¾ã™ã€‚ãã®ãŸã‚ã€ã“ã®æœ€é©åŒ–ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯æœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã›ã‚“。 +::: + +良好ãªãƒ‘フォーマンスã®ãŸã‚ã®é‡è¦ãªè¦ç´ ï¼š + +- クエリã«é–¢ä¸Žã™ã‚‹ãƒ‘ーティションã®æ•°ãŒå分ã«å¤§ãã„ã“ã¨ï¼ˆ`max_threads / 2` より多ã„)ã€ãã†ã§ãªã„ã¨ã‚¯ã‚¨ãƒªã¯ãƒžã‚·ãƒ³ã‚’å分ã«åˆ©ç”¨ã§ãã¾ã›ã‚“ +- パーティションãŒå°ã•ã™ãŽã¦ã¯ã„ã‘ã¾ã›ã‚“。ãã†ã§ãªã„ã¨ã€ãƒãƒƒãƒå‡¦ç†ãŒè¡Œã”ã¨ã®å‡¦ç†ã«é€€åŒ–ã—ã¾ã™ +- パーティションã¯å¤§ãã•ãŒæ¯”較å¯èƒ½ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ãã†ã™ã‚‹ã¨ã€ã™ã¹ã¦ã®ã‚¹ãƒ¬ãƒƒãƒ‰ãŒã»ã¼åŒç­‰ã®ä½œæ¥­é‡ã‚’è¡Œã„ã¾ã™ + +:::info +データをå‡ç­‰ã«ãƒ‘ーティション間ã§åˆ†æ•£ã•ã›ã‚‹ãŸã‚ã«ã¯ã€`partition by` å¥ã®ã‚«ãƒ©ãƒ ã«ã„ãã¤ã‹ã®ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã‚’é©ç”¨ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ +::: + +関連ã™ã‚‹è¨­å®šã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +- `allow_aggregate_partitions_independently` - 最é©åŒ–ã®ä½¿ç”¨ãŒæœ‰åŠ¹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ +- `force_aggregate_partitions_independently` - æ­£ã—ã•ã®è¦³ç‚¹ã‹ã‚‰ä½¿ç”¨å¯èƒ½ãªå ´åˆã ãŒã€å†…部ロジックã«ã‚ˆã‚Šãã®å®Ÿè¡Œæ€§ãŒè©•ä¾¡ã•ã‚Œã¦ç„¡åŠ¹åŒ–ã•ã‚Œã¦ã„ã‚‹å ´åˆã«ä½¿ç”¨ã‚’強制ã—ã¾ã™ +- `max_number_of_partitions_for_independent_aggregation` - テーブルãŒä¿æŒã™ã‚‹ã“ã¨ãŒã§ãるパーティションã®æœ€å¤§æ•°ã«å¯¾ã™ã‚‹åˆ¶é™ + diff --git a/docs/ja/engines/table-engines/mergetree-family/graphitemergetree.md b/docs/ja/engines/table-engines/mergetree-family/graphitemergetree.md new file mode 100644 index 00000000000..686f04fae6b --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/graphitemergetree.md @@ -0,0 +1,272 @@ +--- +slug: /ja/engines/table-engines/mergetree-family/graphitemergetree +sidebar_position: 90 +sidebar_label: GraphiteMergeTree +--- + +# GraphiteMergeTree + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€[Graphite](http://graphite.readthedocs.io/en/latest/index.html) データã®é–“引ãã¨é›†è¨ˆ/å¹³å‡åŒ–(ロールアップ)を目的ã¨ã—ã¦ã„ã¾ã™ã€‚ClickHouseã‚’Graphiteã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¨ã—ã¦ä½¿ç”¨ã—ãŸã„開発者ã«ã¨ã£ã¦å½¹ç«‹ã¤ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +ロールアップãŒä¸è¦ãªå ´åˆã¯ã€ä»»æ„ã®ClickHouseテーブルエンジンを使用ã—ã¦Graphiteデータをä¿å­˜ã§ãã¾ã™ãŒã€ãƒ­ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—ãŒå¿…è¦ãªå ´åˆã¯ `GraphiteMergeTree` を使用ã—ã¦ãã ã•ã„。ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®å®¹é‡ã‚’削減ã—ã€Graphiteã‹ã‚‰ã®ã‚¯ã‚¨ãƒªã®åŠ¹çŽ‡ã‚’å‘上ã•ã›ã¾ã™ã€‚ + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€[MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md)ã®ãƒ—ロパティを継承ã—ã¦ã„ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + Path String, + Time DateTime, + Value Float64, + Version + ... +) ENGINE = GraphiteMergeTree(config_section) +[PARTITION BY expr] +[ORDER BY expr] +[SAMPLE BY expr] +[SETTINGS name=value, ...] +``` + +[CREATE TABLE](../../../sql-reference/statements/create/table.md#create-table-query)クエリã®è©³ç´°ãªèª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +Graphiteデータã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€ä»¥ä¸‹ã®ãƒ‡ãƒ¼ã‚¿ç”¨ã«ä»¥ä¸‹ã®ã‚«ãƒ©ãƒ ãŒå¿…è¦ã§ã™ï¼š + +- メトリックå(Graphiteセンサー)。データ型:`String`。 + +- メトリックを計測ã—ãŸæ™‚間。データ型:`DateTime`。 + +- メトリックã®å€¤ã€‚データ型:`Float64`。 + +- メトリックã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚データ型:任æ„ã®æ•°å€¤åž‹ï¼ˆClickHouseã¯æœ€é«˜ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®è¡Œã¾ãŸã¯åŒä¸€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®å ´åˆã¯æœ€å¾Œã«æ›¸ãè¾¼ã¾ã‚ŒãŸè¡Œã‚’ä¿å­˜ã—ã¾ã™ã€‚ä»–ã®è¡Œã¯ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã®ãƒžãƒ¼ã‚¸ä¸­ã«å‰Šé™¤ã•ã‚Œã¾ã™ï¼‰ã€‚ + +ã“れらã®ã‚«ãƒ©ãƒ ã®åå‰ã¯ãƒ­ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—設定ã§æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**GraphiteMergeTreeã®ãƒ‘ラメータ** + +- `config_section` — ロールアップã®ãƒ«ãƒ¼ãƒ«ãŒè¨­å®šã•ã‚Œã¦ã„る設定ファイル内ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³å。 + +**クエリå¥** + +`GraphiteMergeTree` テーブルを作æˆã™ã‚‹éš›ã€`MergeTree` テーブルを作æˆã™ã‚‹å ´åˆã¨åŒæ§˜ã«ã€åŒã˜[クエリå¥](../../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)ãŒå¿…è¦ã§ã™ã€‚ + +
+ +éžæŽ¨å¥¨ã®ãƒ†ãƒ¼ãƒ–ル作æˆæ–¹æ³• + +:::note +æ–°ã—ã„プロジェクトã§ã¯ã“ã®æ–¹æ³•ã‚’使用ã›ãšã€å¯èƒ½ã§ã‚ã‚Œã°å¤ã„プロジェクトを上記ã®æ–¹æ³•ã«åˆ‡ã‚Šæ›¿ãˆã¦ãã ã•ã„。 +::: + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + EventDate Date, + Path String, + Time DateTime, + Value Float64, + Version + ... +) ENGINE [=] GraphiteMergeTree(date-column [, sampling_expression], (primary, key), index_granularity, config_section) +``` + +`config_section` を除ãã™ã¹ã¦ã®ãƒ‘ラメータ㯠`MergeTree` ã¨åŒã˜æ„味をæŒã¡ã¾ã™ã€‚ + +- `config_section` — ロールアップã®ãƒ«ãƒ¼ãƒ«ãŒè¨­å®šã•ã‚Œã¦ã„る設定ファイル内ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³å。 + +
+ +## ロールアップ設定 {#rollup-configuration} + +ロールアップã®è¨­å®šã¯ã€ã‚µãƒ¼ãƒãƒ¼æ§‹æˆå†…ã®[graphite_rollup](../../../operations/server-configuration-parameters/settings.md#graphite)パラメータã«ã‚ˆã£ã¦å®šç¾©ã•ã‚Œã¾ã™ã€‚パラメータåã¯ä»»æ„ã«è¨­å®šã§ãã¾ã™ã€‚複数ã®æ§‹æˆã‚’作æˆã—ã€ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +ロールアップ構æˆã®æ§‹é€ ï¼š + +``` +required-columns +patterns +``` + +### 必須カラム {#required-columns} + +#### path_column_name + +`path_column_name` — メトリックå(Graphiteセンサー)をä¿å­˜ã™ã‚‹ã‚«ãƒ©ãƒ ã®åå‰ã€‚デフォルト値㯠`Path` ã§ã™ã€‚ + +#### time_column_name +`time_column_name` — メトリックを計測ã—ãŸæ™‚é–“ã‚’ä¿å­˜ã™ã‚‹ã‚«ãƒ©ãƒ ã®åå‰ã€‚デフォルト値㯠`Time` ã§ã™ã€‚ + +#### value_column_name +`value_column_name` — `time_column_name` ã«è¨­å®šã•ã‚ŒãŸæ™‚é–“ã«ãŠã‘るメトリックã®å€¤ã‚’ä¿å­˜ã™ã‚‹ã‚«ãƒ©ãƒ ã®åå‰ã€‚デフォルト値㯠`Value` ã§ã™ã€‚ + +#### version_column_name +`version_column_name` — メトリックã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ä¿å­˜ã™ã‚‹ã‚«ãƒ©ãƒ ã®åå‰ã€‚デフォルト値㯠`Timestamp` ã§ã™ã€‚ + +### パターン {#patterns} + +`patterns` セクションã®æ§‹é€ ï¼š + +``` text +pattern + rule_type + regexp + function +pattern + rule_type + regexp + age + precision + ... +pattern + rule_type + regexp + function + age + precision + ... +pattern + ... +default + function + age + precision + ... +``` + +:::important +パターンã¯ä»¥ä¸‹ã®é †åºã§åŽ³å¯†ã«è¨˜è¿°ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +1. `function` ã¾ãŸã¯ `retention` ãŒãªã„パターン。 +2. `function` 㨠`retention` ã®ä¸¡æ–¹ã‚’æŒã¤ãƒ‘ターン。 +3. `default` パターン。 +::: + +行を処ç†ã™ã‚‹éš›ã€ClickHouseã¯`pattern`セクションã®ãƒ«ãƒ¼ãƒ«ã‚’確èªã—ã¾ã™ã€‚å„`pattern`(`default`ã‚’å«ã‚€ï¼‰ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯é›†è¨ˆç”¨ã®`function`パラメータã€ã¾ãŸã¯`retention`パラメータã€ã¾ãŸã¯ä¸¡æ–¹ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚メトリックåãŒ`regexp`ã«ä¸€è‡´ã™ã‚‹ã¨ã€`pattern`セクション(ã¾ãŸã¯ã‚»ã‚¯ã‚·ãƒ§ãƒ³ï¼‰ã‹ã‚‰ã®ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã¯`default`セクションã‹ã‚‰ã®ãƒ«ãƒ¼ãƒ«ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +`pattern` 㨠`default` セクション用フィールド: + +- `rule_type` - ルールã®ã‚¿ã‚¤ãƒ—。特定ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚エンジンã¯ã€ãƒ—レーンメトリクスã¨ã‚¿ã‚°ä»˜ãメトリクスを分ã‘ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚オプションã®ãƒ‘ラメータ。デフォルト値㯠`all` ã§ã™ã€‚ + パフォーマンスãŒé‡è¦ã§ãªã„å ´åˆã€ã¾ãŸã¯1種類ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã—ã‹ä½¿ç”¨ã—ãªã„å ´åˆï¼ˆä¾‹ï¼šãƒ—レーンメトリクス)ã«ã¯ä¸è¦ã§ã™ã€‚デフォルトã§ã¯1種類ã®ãƒ«ãƒ¼ãƒ«ã‚»ãƒƒãƒˆã®ã¿ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ãれ以外ã®å ´åˆã€ç‰¹å®šã®ã‚¿ã‚¤ãƒ—ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€2ã¤ã®ç•°ãªã‚‹ã‚»ãƒƒãƒˆãŒä½œæˆã•ã‚Œã¾ã™ã€‚1ã¤ã¯ãƒ—レーンメトリクス用(root.branch.leaf)ã€ã‚‚ã†1ã¤ã¯ã‚¿ã‚°ä»˜ãメトリクス用(root.branch.leaf;tag1=value1)ã§ã™ã€‚ + デフォルトルールã¯ä¸¡æ–¹ã®ã‚»ãƒƒãƒˆã«çµ„ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ + 有効ãªå€¤ï¼š + + - `all`(デフォルト)- `rule_type`ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¦ãƒ‹ãƒãƒ¼ã‚µãƒ«ãƒ«ãƒ¼ãƒ«ã€‚ + - `plain` - プレーンメトリクス用ã®ãƒ«ãƒ¼ãƒ«ã€‚`regexp`フィールドã¯æ­£è¦è¡¨ç¾ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + - `tagged` - タグ付ãメトリクス用ã®ãƒ«ãƒ¼ãƒ«ï¼ˆãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯ `someName?tag1=value1&tag2=value2&tag3=value3` å½¢å¼ã§DBã«ä¿å­˜ã•ã‚Œã¾ã™ï¼‰ã€‚æ­£è¦è¡¨ç¾ã¯ã‚¿ã‚°åã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã‘ã‚Œã°ãªã‚‰ãšã€å­˜åœ¨ã™ã‚‹å ´åˆã¯æœ€åˆã®ã‚¿ã‚°ã¯ `__name__` ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。`regexp`フィールドã¯æ­£è¦è¡¨ç¾ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + - `tag_list` - タグ付ãメトリクス用ã®ãƒ«ãƒ¼ãƒ«ã€‚クリックãƒã‚¦ã‚¹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‹ã¤ `someName;tag1=value1;tag2=value2` ã¾ãŸã¯ `someName` ã¾ãŸã¯ `tag1=value1;tag2=value2` フォーマットã§ã€ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®è¨˜è¿°ã‚’ç°¡å˜ã«ã™ã‚‹ãŸã‚ã®DSL。`regexp`フィールド㯠`tagged` ルールã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ã‚¿ã‚°åã«ã‚ˆã‚‹ã‚½ãƒ¼ãƒˆã¯è‡ªå‹•çš„ã«è¡Œã‚れるã®ã§ä¸è¦ã§ã™ã€‚ã‚¿ã‚°ã®å€¤ï¼ˆåå‰ã§ã¯ãªã)ã¯æ­£è¦è¡¨ç¾ã¨ã—ã¦è¨­å®šã§ãã¾ã™ã€‚例ãˆã° `env=(dev|staging)`。 + +- `regexp` – メトリックåã®ãƒ‘ターン(正è¦è¡¨ç¾ã¾ãŸã¯DSL)。 +- `age` – データã®æœ€å°å¹´é½¢ï¼ˆç§’å˜ä½ï¼‰ã€‚ +- `precision` – データã®å¹´é½¢ã‚’秒å˜ä½ã§ã©ã®ç¨‹åº¦æ­£ç¢ºã«å®šç¾©ã™ã‚‹ã‹ã€‚86400(1æ—¥ã®ç§’数)ã®ç´„æ•°ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- `function` – `[age, age + precision]` ã®ç¯„囲内ã§ãƒ‡ãƒ¼ã‚¿ã«é©ç”¨ã™ã‚‹é›†ç´„関数ã®åå‰ã€‚å—ã‘入れられる関数:min / max / any / avg。平å‡ã¯å¹³å‡ã®å¹³å‡ã¨ã—ã¦ä¸æ­£ç¢ºã«è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +### ルールタイプãªã—ã®è¨­å®šä¾‹ {#configuration-example} + +``` xml + + Version + + click_cost + any + + 0 + 5 + + + 86400 + 60 + + + + max + + 0 + 60 + + + 3600 + 300 + + + 86400 + 3600 + + + +``` + +### ルールタイプをå«ã‚€è¨­å®šä¾‹ {#configuration-typed-example} + +``` xml + + Version + + plain + click_cost + any + + 0 + 5 + + + 86400 + 60 + + + + tagged + ^((.*)|.)min\? + min + + 0 + 5 + + + 86400 + 60 + + + + tagged + + min + + 0 + 5 + + + 86400 + 60 + + + + tag_list + someName;tag2=value2 + + 0 + 5 + + + 86400 + 60 + + + + max + + 0 + 60 + + + 3600 + 300 + + + 86400 + 3600 + + + +``` + +:::note +データã®ãƒ­ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—ã¯ãƒžãƒ¼ã‚¸ä¸­ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚通常ã€å¤ã„パーティションã«å¯¾ã—ã¦ã¯ãƒžãƒ¼ã‚¸ãŒé–‹å§‹ã•ã‚Œãªã„ãŸã‚ã€ãƒ­ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—ã®ãŸã‚ã«ã¯[optimize](../../../sql-reference/statements/optimize.md)を使用ã—ã¦äºˆå®šå¤–ã®ãƒžãƒ¼ã‚¸ã‚’トリガーã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã¯ã€[graphite-ch-optimizer](https://github.com/innogames/graphite-ch-optimizer)ã®ã‚ˆã†ãªè¿½åŠ ãƒ„ールを使用ã—ã¦ãã ã•ã„。 +::: diff --git a/docs/ja/engines/table-engines/mergetree-family/index.md b/docs/ja/engines/table-engines/mergetree-family/index.md new file mode 100644 index 00000000000..cd43f5ff2a0 --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/index.md @@ -0,0 +1,17 @@ +--- +slug: /ja/engines/table-engines/mergetree-family/ +sidebar_position: 10 +sidebar_label: MergeTree ファミリー +--- + +# MergeTree エンジンファミリー + +MergeTree ファミリーã®ãƒ†ãƒ¼ãƒ–ルエンジンã¯ã€ClickHouse ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸æ©Ÿèƒ½ã®ä¸­æ ¸ã‚’æˆã—ã¦ã„ã¾ã™ã€‚ã“れらã¯ã‚«ãƒ©ãƒ åž‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ‘ーティショニングã€ã‚¹ãƒ‘ースãªä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ—用ã®ã‚»ã‚«ãƒ³ãƒ€ãƒªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãªã©ã€å›žå¾©åŠ›ã¨é«˜æ€§èƒ½ãƒ‡ãƒ¼ã‚¿å–å¾—ã®ãŸã‚ã®ã»ã¨ã‚“ã©ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +基本的㪠[MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md) テーブルエンジンã¯ã€å˜ä¸€ãƒŽãƒ¼ãƒ‰ã® ClickHouse インスタンスã«ãŠã‘るデフォルトã®ãƒ†ãƒ¼ãƒ–ルエンジンã¨è¦‹ãªã›ã¾ã™ã€‚ã“ã‚Œã¯æ±Žç”¨æ€§ãŒé«˜ãã€å¤šãã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«å¯¾ã—ã¦å®Ÿç”¨çš„ã§ã™ã€‚ + +実é‹ç”¨ã§ã¯ã€[ReplicatedMergeTree](../../../engines/table-engines/mergetree-family/replication.md) を使用ã™ã‚‹ã®ãŒä¸€èˆ¬çš„ã§ã™ã€‚ã“ã‚Œã¯ã€é€šå¸¸ã® MergeTree エンジンã®ã™ã¹ã¦ã®æ©Ÿèƒ½ã«é«˜å¯ç”¨æ€§ã‚’追加ã—ã¾ã™ã€‚ã•ã‚‰ã«ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥æ™‚ã®è‡ªå‹•ãƒ‡ãƒ¼ã‚¿é‡è¤‡æŽ’除も行ã†ãŸã‚ã€æŒ¿å…¥ä¸­ã«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®å•é¡ŒãŒã‚ã£ã¦ã‚‚ソフトウェアãŒå®‰å…¨ã«å†è©¦è¡Œã§ãã¾ã™ã€‚ + +MergeTree ファミリーã®ä»–ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«å¯¾ã—ã¦è¿½åŠ æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚通常ã€ã“ã‚Œã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã®è¿½åŠ ãƒ‡ãƒ¼ã‚¿æ“作ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¾ã™ã€‚ + +MergeTree エンジンã®ä¸»ãªæ¬ ç‚¹ã¯ã€ãã‚ŒãŒæ¯”較的é‡ã„ã“ã¨ã§ã™ã€‚ãã®ãŸã‚ã€å…¸åž‹çš„ãªãƒ‘ターンã¯ã€ãã‚Œã»ã©å¤šãã®ãƒ†ãƒ¼ãƒ–ルをæŒãŸãªã„ã“ã¨ã§ã™ã€‚例ãˆã°ã€ä¸€æ™‚データ用ã«å¤šãã®å°ã•ãªãƒ†ãƒ¼ãƒ–ルãŒå¿…è¦ãªå ´åˆã¯ã€[Log エンジンファミリー](../../../engines/table-engines/log-family/index.md)を検討ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/engines/table-engines/mergetree-family/invertedindexes.md b/docs/ja/engines/table-engines/mergetree-family/invertedindexes.md new file mode 100644 index 00000000000..b061946bf91 --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/invertedindexes.md @@ -0,0 +1,203 @@ +--- +slug: /ja/engines/table-engines/mergetree-family/invertedindexes +sidebar_label: テキスト検索インデックス +description: テキスト内ã®æ¤œç´¢èªžã‚’迅速ã«è¦‹ã¤ã‘ã¾ã™ã€‚ +keywords: [フルテキスト検索, テキスト検索, インデックス, インデックス] +--- + +# フルテキスト検索を使用ã—ãŸãƒ†ã‚­ã‚¹ãƒˆæ¤œç´¢ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ [エクスペリメンタル] + +フルテキストインデックスã¯ã€[二次インデックス](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#available-types-of-indices)ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªã‚¿ã‚¤ãƒ—ã§ã‚ã‚Šã€[String](/docs/ja/sql-reference/data-types/string.md)ã¾ãŸã¯[FixedString](/docs/ja/sql-reference/data-types/fixedstring.md)カラムã®é«˜é€Ÿãƒ†ã‚­ã‚¹ãƒˆæ¤œç´¢æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚フルテキストインデックスã®ä¸»ãªã‚¢ã‚¤ãƒ‡ã‚¢ã¯ã€ã€Œç”¨èªžã€ã‹ã‚‰ã“れらã®ç”¨èªžã‚’å«ã‚€è¡Œã¸ã®ãƒžãƒƒãƒ”ングをä¿æŒã™ã‚‹ã“ã¨ã§ã™ã€‚「用語ã€ã¯æ–‡å­—列カラムã®ãƒˆãƒ¼ã‚¯ãƒ³åŒ–ã•ã‚ŒãŸã‚»ãƒ«ã§ã™ã€‚例ãˆã°ã€æ–‡å­—列セル「I will be a little lateã€ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§6ã¤ã®ç”¨èªžã€ŒIã€ã€ã€Œwillã€ã€ã€Œbeã€ã€ã€Œaã€ã€ã€Œlittleã€ã€ã€Œlateã€ã«ãƒˆãƒ¼ã‚¯ãƒ³åŒ–ã•ã‚Œã¾ã™ã€‚別ã®ãƒˆãƒ¼ã‚¯ãƒ³åŒ–手法ã¨ã—ã¦ã¯n-gramãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€3-gramトークン化ã®çµæžœã¯ã€ã€ŒI wã€ã€ã€Œwiã€ã€ã€Œwilã€ã€ã€Œillã€ã€ã€Œllã€ã€ã€Œl bã€ã€ã€Œ bã€ãªã©21ã®ç”¨èªžã«ãªã‚Šã¾ã™ã€‚入力文字列ãŒç´°ã‹ãトークン化ã•ã‚Œã‚‹ã»ã©ã€ç”Ÿæˆã•ã‚Œã‚‹ãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯å¤§ãããªã‚Šã¾ã™ãŒã€ã‚ˆã‚Šæœ‰ç”¨ã«ãªã‚Šã¾ã™ã€‚ + +
+ +
+ +:::note +フルテキストインデックスã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã§ã‚ã‚Šã€ã¾ã æœ¬ç•ªç’°å¢ƒã§ä½¿ç”¨ã™ã‚‹ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã¡ã‚‰ã¯ä»Šå¾Œã€å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€ãã®DDL/DQL構文やパフォーマンス/圧縮特性ã«é–¢ã—ã¦ã§ã™ã€‚ +::: + +## 使ã„æ–¹ + +フルテキストインデックスを使用ã™ã‚‹ã«ã¯ã€ã¾ãšè¨­å®šã§ãれらを有効ã«ã—ã¾ã™: + +```sql +SET allow_experimental_full_text_index = true; +``` + +フルテキストインデックスã¯æ¬¡ã®ã‚ˆã†ãªæ§‹æ–‡ã§æ–‡å­—列カラムã«å®šç¾©ã§ãã¾ã™ã€‚ + +``` sql +CREATE TABLE tab +( + `key` UInt64, + `str` String, + INDEX inv_idx(str) TYPE full_text(0) GRANULARITY 1 +) +ENGINE = MergeTree +ORDER BY key +``` + +:::note +åˆæœŸã®ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ã€å¯¾å¿œã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—åã¯`inverted`ã§ã—ãŸã€‚ +::: + +ã“ã“ã§`N`ã¯ãƒˆãƒ¼ã‚¯ãƒŠã‚¤ã‚¶ã‚’指定ã—ã¾ã™ï¼š + +- `full_text(0)`(短ãã—ã¦`full_text()`ã§ã‚‚å¯ï¼‰ã¯ãƒˆãƒ¼ã‚¯ãƒŠã‚¤ã‚¶ã‚’「トークンã€ã«è¨­å®šã—ã€ã‚¹ãƒšãƒ¼ã‚¹ã§æ–‡å­—列を分割ã—ã¾ã™ã€‚ +- `full_text(N)`ã§`N`ãŒ2ã‹ã‚‰8ã®é–“ã®å ´åˆã€ãƒˆãƒ¼ã‚¯ãƒŠã‚¤ã‚¶ã‚’「ngrams(N)ã€ã«è¨­å®šã—ã¾ã™ã€‚ + +ãƒã‚¹ãƒ†ã‚£ãƒ³ã‚°ãƒªã‚¹ãƒˆã”ã¨ã®æœ€å¤§è¡Œæ•°ã¯2番目ã®ãƒ‘ラメータã§æŒ‡å®šã§ãã¾ã™ã€‚ã“ã®ãƒ‘ラメータã¯ã€å·¨å¤§ãªãƒã‚¹ãƒ†ã‚£ãƒ³ã‚°ãƒªã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã®ç”Ÿæˆã‚’防ããŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚以下ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒã‚ã‚Šã¾ã™ï¼š + +- `full_text(ngrams, max_rows_per_postings_list)`: 指定ã•ã‚ŒãŸmax_rows_per_postings_listを使用(0ã§ãªã„å ´åˆï¼‰ +- `full_text(ngrams, 0)`: ãƒã‚¹ãƒ†ã‚£ãƒ³ã‚°ãƒªã‚¹ãƒˆã”ã¨ã®æœ€å¤§è¡Œæ•°ã«åˆ¶é™ãªã— +- `full_text(ngrams)`: デフォルトã®æœ€å¤§è¡Œæ•°64Kを使用 + +スキッピングインデックスã®ä¸€ç¨®ã¨ã—ã¦ã€ãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€ãƒ†ãƒ¼ãƒ–ル作æˆå¾Œã«ã‚«ãƒ©ãƒ ã«è¿½åŠ ã¾ãŸã¯å‰Šé™¤ã§ãã¾ã™ï¼š + +``` sql +ALTER TABLE tab DROP INDEX inv_idx; +ALTER TABLE tab ADD INDEX inv_idx(s) TYPE full_text(2); +``` + +インデックスを使用ã™ã‚‹ãŸã‚ã«ç‰¹åˆ¥ãªé–¢æ•°ã‚„構文ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。典型的ãªæ–‡å­—列検索述語ã¯è‡ªå‹•çš„ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’活用ã—ã¾ã™ã€‚例ã¨ã—ã¦ä»¥ä¸‹ã‚’考慮ã—ã¦ãã ã•ã„: + +```sql +INSERT INTO tab(key, str) values (1, 'Hello World'); +SELECT * from tab WHERE str == 'Hello World'; +SELECT * from tab WHERE str IN ('Hello', 'World'); +SELECT * from tab WHERE str LIKE '%Hello%'; +SELECT * from tab WHERE multiSearchAny(str, ['Hello', 'World']); +SELECT * from tab WHERE hasToken(str, 'Hello'); +``` + +フルテキストインデックスã¯ã€`Array(String)`ã€`Array(FixedString)`ã€`Map(String)`ã€`Map(String)`タイプã®ã‚«ãƒ©ãƒ ã§ã‚‚機能ã—ã¾ã™ã€‚ + +ä»–ã®äºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨åŒæ§˜ã«ã€å„カラムパートã¯ç‹¬è‡ªã®ãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’æŒã¡ã¾ã™ã€‚ã•ã‚‰ã«ã€å„フルテキストインデックスã¯å†…部的ã«ã€Œã‚»ã‚°ãƒ¡ãƒ³ãƒˆã€ã«åˆ†å‰²ã•ã‚Œã¦ã„ã¾ã™ã€‚セグメントã®å­˜åœ¨ã¨ã‚µã‚¤ã‚ºã¯ä¸€èˆ¬çš„ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦é€æ˜Žã§ã™ãŒã€ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã‚µã‚¤ã‚ºã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹æ§‹ç¯‰æ™‚ã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚’決定ã—ã¾ã™ï¼ˆä¾‹ãˆã°ã€2ã¤ã®ãƒ‘ートãŒçµåˆã•ã‚ŒãŸã¨ã)。設定パラメータ「max_digestion_size_per_segmentã€ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯256 MB)ã¯ã€æ–°ã—ã„セグメントãŒä½œæˆã•ã‚Œã‚‹å‰ã«ä½¿ç”¨ã•ã‚Œã‚‹åŸºç›¤ã¨ãªã‚‹ã‚«ãƒ©ãƒ ã‹ã‚‰æ¶ˆè²»ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®é‡ã‚’制御ã—ã¾ã™ã€‚パラメータを増やã™ã¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹æ§‹ç¯‰ã®ä¸­é–“メモリ消費ãŒå¢—ãˆã¾ã™ãŒã€æ¤œç´¢ãƒ‘フォーマンスを改善ã—ã€å¹³å‡çš„ã«ã‚¯ã‚¨ãƒªã‚’評価ã™ã‚‹ãŸã‚ã«ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã‚»ã‚°ãƒ¡ãƒ³ãƒˆæ•°ãŒå°‘ãªããªã‚Šã¾ã™ã€‚ + +## Hacker Newsデータセットã®ãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆæ¤œç´¢ + +大é‡ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’æŒã¤å¤§è¦æ¨¡ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã®ãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒ‘フォーマンス改善を見ã¦ã¿ã¾ã—ょã†ã€‚人気ã®ã‚ã‚‹Hacker Newsウェブサイトã®ã‚³ãƒ¡ãƒ³ãƒˆ28.7M行を使用ã—ã¾ã™ã€‚フルテキストインデックスをæŒãŸãªã„テーブルã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™ï¼š + +```sql +CREATE TABLE hackernews ( + id UInt64, + deleted UInt8, + type String, + author String, + timestamp DateTime, + comment String, + dead UInt8, + parent UInt64, + poll UInt64, + children Array(UInt32), + url String, + score UInt32, + title String, + parts Array(UInt32), + descendants UInt32 +) +ENGINE = MergeTree +ORDER BY (type, author); +``` + +28.7Mè¡Œã¯S3ã«ã‚ã‚‹Parquetファイルã«å…¥ã£ã¦ã„ã¾ã™ - ãれらを`hackernews`テーブルã«æŒ¿å…¥ã—ã¾ã—ょã†ï¼š + +```sql +INSERT INTO hackernews + SELECT * FROM s3Cluster( + 'default', + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/hackernews/hacknernews.parquet', + 'Parquet', + ' + id UInt64, + deleted UInt8, + type String, + by String, + time DateTime, + text String, + dead UInt8, + parent UInt64, + poll UInt64, + kids Array(UInt32), + url String, + score UInt32, + title String, + parts Array(UInt32), + descendants UInt32'); +``` + +`comment`カラムã«ã€ŒClickHouseã€ã¨ã„ã†ç”¨èªžï¼ˆã¨ãã®å¤§æ–‡å­—å°æ–‡å­—ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ï¼‰ã‚’検索ã™ã‚‹ä»¥ä¸‹ã®ã‚·ãƒ³ãƒ—ルãªæ¤œç´¢ã‚’考ãˆã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT count() +FROM hackernews +WHERE hasToken(lower(comment), 'clickhouse'); +``` + +クエリã®å®Ÿè¡Œã«ã¯3秒ã‹ã‹ã‚Šã¾ã™ï¼š + +```response +┌─count()─┠+│ 1145 │ +└─────────┘ + +1 row in set. Elapsed: 3.001 sec. Processed 28.74 million rows, 9.75 GB (9.58 million rows/s., 3.25 GB/s.) +``` + +`ALTER TABLE`を使用ã—ã¦`comment`カラムã®å°æ–‡å­—版ã«ãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’追加ã—ã€ãれをマテリアライズã—ã¾ã™ï¼ˆæ™‚é–“ãŒã‹ã‹ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ - マテリアライズã™ã‚‹ã®ã‚’å¾…ã¡ã¾ã™ï¼‰ï¼š + +```sql +ALTER TABLE hackernews + ADD INDEX comment_lowercase(lower(comment)) TYPE full_text; + +ALTER TABLE hackernews MATERIALIZE INDEX comment_lowercase; +``` + +åŒã˜ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã¨... + +```sql +SELECT count() +FROM hackernews +WHERE hasToken(lower(comment), 'clickhouse') +``` + +...クエリ実行時間ãŒ4å€é€Ÿããªã‚Šã¾ã™ï¼š + +```response +┌─count()─┠+│ 1145 │ +└─────────┘ + +1 row in set. Elapsed: 0.747 sec. Processed 4.49 million rows, 1.77 GB (6.01 million rows/s., 2.37 GB/s.) +``` + +ã¾ãŸã€è¤‡æ•°ã®ç”¨èªžã®ã†ã¡ä¸€ã¤ã¾ãŸã¯å…¨ã¦ã‚’検索ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚例ãˆã°ã€ORã‚„ANDæ¡ä»¶ã§ã™ï¼š + +```sql +-- 複数ã®ORæ¡ä»¶ +SELECT count(*) +FROM hackernews +WHERE multiSearchAny(lower(comment), ['oltp', 'olap']); + +-- 複数ã®ANDæ¡ä»¶ +SELECT count(*) +FROM hackernews +WHERE hasToken(lower(comment), 'avx') AND hasToken(lower(comment), 'sve'); +``` + +:::note +ä»–ã®äºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ç•°ãªã‚Šã€ãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ï¼ˆç¾çŠ¶ã§ã¯ï¼‰ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«IDã§ã¯ãªã行番å·ï¼ˆè¡ŒID)ã«ãƒžãƒƒãƒ—ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ‡ã‚¶ã‚¤ãƒ³ã®ç†ç”±ã¯ãƒ‘フォーマンスã«ã‚ˆã‚‹ã‚‚ã®ã§ã™ã€‚実際ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è¤‡æ•°ã®ç”¨èªžã‚’一度ã«æ¤œç´¢ã™ã‚‹ã“ã¨ãŒå¤šã„ã§ã™ã€‚例ãˆã°ã€ãƒ•ã‚£ãƒ«ã‚¿æ¡ä»¶`WHERE s LIKE '%little%' OR s LIKE '%big%'`ã¯ã€ã€Œlittleã€ãŠã‚ˆã³ã€Œbigã€ã®è¡ŒIDリストã®åˆè¨ˆã‚’å½¢æˆã—ã¦ã€ãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’直接使用ã—ã¦è©•ä¾¡ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä½œæˆæ™‚ã«æŒ‡å®šã•ã‚ŒãŸ`GRANULARITY`パラメータã«æ„味ãŒãªã„ã“ã¨ã‚’æ„味ã—ã€å°†æ¥çš„ã«æ§‹æ–‡ã‹ã‚‰å‰Šé™¤ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## 関連コンテンツ + +- ブログ: [ClickHouseã§ã®ã‚¤ãƒ³ãƒãƒ¼ãƒ†ãƒƒãƒ‰ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ç´¹ä»‹](https://clickhouse.com/blog/clickhouse-search-with-inverted-indices) diff --git a/docs/ja/engines/table-engines/mergetree-family/mergetree.md b/docs/ja/engines/table-engines/mergetree-family/mergetree.md new file mode 100644 index 00000000000..435345a3877 --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/mergetree.md @@ -0,0 +1,1068 @@ +--- +slug: /ja/engines/table-engines/mergetree-family/mergetree +sidebar_position: 11 +sidebar_label: MergeTree +--- + +# MergeTree + +`MergeTree`エンジンãŠã‚ˆã³`MergeTree`ファミリーã®ä»–ã®ã‚¨ãƒ³ã‚¸ãƒ³ï¼ˆä¾‹ãˆã°ã€`ReplacingMergeTree`ã€`AggregatingMergeTree`)ã¯ã€ClickHouseã§æœ€ã‚‚一般的ã«ä½¿ç”¨ã•ã‚Œã€æœ€ã‚‚堅牢ãªãƒ†ãƒ¼ãƒ–ルエンジンã§ã™ã€‚ + +`MergeTree`ファミリーã®ãƒ†ãƒ¼ãƒ–ルエンジンã¯ã€é«˜ã„データå–ã‚Šè¾¼ã¿é€Ÿåº¦ã¨è†¨å¤§ãªãƒ‡ãƒ¼ã‚¿é‡ã‚’処ç†ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +データã®æŒ¿å…¥æ“作ã¯ãƒ†ãƒ¼ãƒ–ルã®ãƒ‘ーツを作æˆã—ã€ã“れらã®ãƒ‘ーツã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセスã§ä»–ã®ãƒ†ãƒ¼ãƒ–ルパーツã¨ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚ + +`MergeTree`ファミリーã®ãƒ†ãƒ¼ãƒ–ルエンジンã®ä¸»ãªç‰¹å¾´: + +- テーブルã®ä¸»ã‚­ãƒ¼ã¯ã€å„テーブルパーツ内ã®ã‚½ãƒ¼ãƒˆé †ã‚’決定ã—ã¾ã™ï¼ˆã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼åŒ–インデックス)。主キーã¯8192è¡Œã®ãƒ–ロック(グラニュールã¨å‘¼ã°ã‚Œã‚‹ï¼‰ã‚’å‚ç…§ã—ã€å€‹ã€…ã®è¡Œã‚’å‚ç…§ã—ã¾ã›ã‚“。ã“ã‚Œã«ã‚ˆã‚Šã€å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ä¸»ã‚­ãƒ¼ãŒãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã«ä¿æŒã§ãã‚‹ã»ã©å°ã•ããªã‚‹ä¸€æ–¹ã§ã€ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¸ã®è¿…速ãªã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ + +- テーブルã¯ä»»æ„ã®ãƒ‘ーティションå¼ã‚’使用ã—ã¦ãƒ‘ーティションを分ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚パーティションプルーニングã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªãŒè¨±ã™å ´åˆã«èª­ã¿å–ã‚Šã‹ã‚‰ãƒ‘ーティションを除外ã§ãã¾ã™ã€‚ + +- データã¯é«˜å¯ç”¨æ€§ã€ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼ã€ãƒ€ã‚¦ãƒ³ã‚¿ã‚¤ãƒ ã‚¼ãƒ­ã§ã®ã‚¢ãƒƒãƒ—グレードã®ãŸã‚ã«è¤‡æ•°ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ãƒŽãƒ¼ãƒ‰ã«ã¾ãŸãŒã£ã¦ãƒ¬ãƒ—リケートã§ãã¾ã™ã€‚[データレプリケーション](/docs/ja/engines/table-engines/mergetree-family/replication.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +- `MergeTree`テーブルエンジンã¯ã€ã‚¯ã‚¨ãƒªæœ€é©åŒ–を支æ´ã™ã‚‹ãŸã‚ã«æ§˜ã€…ãªçµ±è¨ˆæƒ…報やサンプリング方法をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +:::note +ä¼¼ãŸåå‰ã§ã™ãŒã€[Merge](/docs/ja/engines/table-engines/special/merge.md/#merge)エンジンã¯`*MergeTree`エンジンã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ +::: + +## テーブルã®ä½œæˆ {#table_engine-mergetree-creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [[NOT] NULL] [DEFAULT|MATERIALIZED|ALIAS|EPHEMERAL expr1] [COMMENT ...] [CODEC(codec1)] [STATISTICS(stat1)] [TTL expr1] [PRIMARY KEY] [SETTINGS (name = value, ...)], + name2 [type2] [[NOT] NULL] [DEFAULT|MATERIALIZED|ALIAS|EPHEMERAL expr2] [COMMENT ...] [CODEC(codec2)] [STATISTICS(stat2)] [TTL expr2] [PRIMARY KEY] [SETTINGS (name = value, ...)], + ... + INDEX index_name1 expr1 TYPE type1(...) [GRANULARITY value1], + INDEX index_name2 expr2 TYPE type2(...) [GRANULARITY value2], + ... + PROJECTION projection_name_1 (SELECT [GROUP BY] [ORDER BY]), + PROJECTION projection_name_2 (SELECT [GROUP BY] [ORDER BY]) +) ENGINE = MergeTree() +ORDER BY expr +[PARTITION BY expr] +[PRIMARY KEY expr] +[SAMPLE BY expr] +[TTL expr + [DELETE|TO DISK 'xxx'|TO VOLUME 'xxx' [, ...] ] + [WHERE conditions] + [GROUP BY key_expr [SET v1 = aggr_func(v1) [, v2 = aggr_func(v2) ...]] ] ] +[SETTINGS name = value, ...] +``` + +パラメータã®è©³ç´°ãªèª¬æ˜Žã¯ã€[CREATE TABLE](/docs/ja/sql-reference/statements/create/table.md)ステートメントをå‚ç…§ã—ã¦ãã ã•ã„。 + +### ã‚¯ã‚¨ãƒªå¥ {#mergetree-query-clauses} + +#### ENGINE + +`ENGINE` — エンジンã®åå‰ã¨ãƒ‘ラメータ。`ENGINE = MergeTree()`。`MergeTree`エンジンã«ã¯ãƒ‘ラメータã¯ã‚ã‚Šã¾ã›ã‚“。 + +#### ORDER_BY + +`ORDER BY` — ソートキー。 + +カラムåã‚„ä»»æ„ã®å¼ã®ã‚¿ãƒ—ル。例: `ORDER BY (CounterID + 1, EventDate)`。 + +主キーãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆï¼ˆã¤ã¾ã‚Šã€`PRIMARY KEY`ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆï¼‰ã€ClickHouseã¯ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’主キーã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +ソートã®å¿…è¦ãŒãªã„å ´åˆã¯ã€`ORDER BY tuple()`ã¨ã„ã†æ§‹æ–‡ã‚’使用ã§ãã¾ã™ã€‚ +ã¾ãŸã€`create_table_empty_primary_key_by_default`設定を有効ã«ã™ã‚‹ã¨ã€`CREATE TABLE`ステートメントã«`ORDER BY tuple()`ãŒæš—黙的ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚[主キーã®é¸æŠž](#selecting-a-primary-key)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### PARTITION BY + +`PARTITION BY` — [パーティションキー](/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key.md)。オプションã§ã™ã€‚多ãã®å ´åˆã€ãƒ‘ーティションキーã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“ãŒã€ãƒ‘ーティション分ã‘ãŒå¿…è¦ãªå ´åˆã§ã‚‚一般的ã«ã¯æœˆã”ã¨ã®ãƒ‘ーティションキー以上ã®ç²’度ãŒå¿…è¦ã‚ã‚Šã¾ã›ã‚“。パーティション分ã‘ã¯ã‚¯ã‚¨ãƒªã‚’速ãã™ã‚‹ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“(`ORDER BY`å¼ã¨ã¯å¯¾ç…§çš„ã«ï¼‰ã€‚éŽåº¦ã«ç´°ã‹ã„パーティション分ã‘ã¯é¿ã‘ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚クライアントã®è­˜åˆ¥å­ã‚„åå‰ã§ãƒ‡ãƒ¼ã‚¿ã‚’パーティション分ã‘ã—ãªã„ã§ãã ã•ã„(代ã‚ã‚Šã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®è­˜åˆ¥å­ã¾ãŸã¯åå‰ã‚’`ORDER BY`å¼ã®æœ€åˆã®ã‚«ãƒ©ãƒ ã«è¨­å®šã—ã¦ãã ã•ã„)。 + +月ã«ã‚ˆã‚‹ãƒ‘ーティション分ã‘ã«ã¯ã€`toYYYYMM(date_column)`å¼ã‚’使用ã—ã¾ã™ã€‚ã“ã“ã§`date_column`ã¯[Date](/docs/ja/sql-reference/data-types/date.md)åž‹ã®æ—¥ä»˜ã‚’æŒã¤ã‚«ãƒ©ãƒ ã§ã™ã€‚パーティションåã¯`"YYYYMM"`å½¢å¼ã«ãªã‚Šã¾ã™ã€‚ + +#### PRIMARY KEY + +`PRIMARY KEY` — [ソートキーã¨ç•°ãªã‚‹ä¸»ã‚­ãƒ¼ã‚’é¸æŠžã™ã‚‹](#choosing-a-primary-key-that-differs-from-the-sorting-key)å ´åˆã®ä¸»ã‚­ãƒ¼ã€‚オプションã§ã™ã€‚ + +ソートキーを指定ã™ã‚‹ï¼ˆ`ORDER BY`å¥ã‚’使用ã™ã‚‹ï¼‰ã“ã¨ã§ã€æš—黙的ã«ä¸»ã‚­ãƒ¼ãŒæŒ‡å®šã•ã‚Œã¾ã™ã€‚ +ソートキーã«åŠ ãˆã¦ä¸»ã‚­ãƒ¼ã‚’指定ã™ã‚‹å¿…è¦ã¯é€šå¸¸ã‚ã‚Šã¾ã›ã‚“。 + +#### SAMPLE BY + +`SAMPLE BY` — サンプリングå¼ã€‚オプションã§ã™ã€‚ + +指定ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ä¸»ã‚­ãƒ¼ã«å«ã¾ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +サンプリングå¼ã¯ç¬¦å·ãªã—æ•´æ•°ã‚’çµæžœã¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +例: `SAMPLE BY intHash32(UserID) ORDER BY (CounterID, EventDate, intHash32(UserID))`。 + +#### TTL + +`TTL` — è¡Œã®ä¿å­˜æœŸé–“ã¨è‡ªå‹•ãƒ‘ーツ移動ã®ãƒ­ã‚¸ãƒƒã‚¯ã‚’指定ã™ã‚‹ãƒ«ãƒ¼ãƒ«ã®ãƒªã‚¹ãƒˆ [ディスクã¨ãƒœãƒªãƒ¥ãƒ¼ãƒ é–“](#table_engine-mergetree-multiple-volumes)。オプションã§ã™ã€‚ + +å¼ã¯`Date`ã¾ãŸã¯`DateTime`ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ã¨ã—㦠`TTL date + INTERVAL 1 DAY`。 + +ルールã®ç¨®é¡ž`DELETE|TO DISK 'xxx'|TO VOLUME 'xxx'|GROUP BY`ã¯ã€å¼ãŒæº€ãŸã•ã‚ŒãŸå ´åˆï¼ˆç¾åœ¨æ™‚刻ã«é”ã™ã‚‹ï¼‰ã€ãã®ãƒ‘ートã«å¯¾ã—ã¦è¡Œã‚れるアクションを指定ã—ã¾ã™ï¼šæœŸé™åˆ‡ã‚Œã®è¡Œã®å‰Šé™¤ã€ç‰¹å®šãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®ãƒ‘ートã®ç§»å‹•ï¼ˆ`TO DISK 'xxx'`)ã€ã¾ãŸã¯ãƒœãƒªãƒ¥ãƒ¼ãƒ ï¼ˆ`TO VOLUME 'xxx'`)ã¸ã®ç§»å‹•ã€ã¾ãŸã¯æœŸé™åˆ‡ã‚Œè¡Œã®é›†è¨ˆã€‚デフォルトã®ãƒ«ãƒ¼ãƒ«ã‚¿ã‚¤ãƒ—ã¯å‰Šé™¤ï¼ˆ`DELETE`)ã§ã™ã€‚複数ã®ãƒ«ãƒ¼ãƒ«ã‚’設定ã§ãã¾ã™ãŒã€`DELETE`ルールã¯1ã¤ã ã‘ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +詳細ã«ã¤ã„ã¦ã¯ã€[カラムã¨ãƒ†ãƒ¼ãƒ–ルã®TTL](#table_engine-mergetree-ttl)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### SETTINGS + +[MergeTree設定](../../../operations/settings/merge-tree-settings.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**セクション設定ã®ä¾‹** + +``` sql +ENGINE MergeTree() PARTITION BY toYYYYMM(EventDate) ORDER BY (CounterID, EventDate, intHash32(UserID)) SAMPLE BY intHash32(UserID) SETTINGS index_granularity=8192 +``` + +例ã§ã¯ã€æœˆã«ã‚ˆã‚‹ãƒ‘ーティション分ã‘を設定ã—ã¦ã„ã¾ã™ã€‚ + +ã¾ãŸã€ãƒ¦ãƒ¼ã‚¶ãƒ¼IDã§ã®ãƒãƒƒã‚·ãƒ¥ã¨ã—ã¦ã‚µãƒ³ãƒ—リングã®å¼ã‚‚設定ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å„`CounterID`ãŠã‚ˆã³`EventDate`ã®ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ル内ã®ãƒ‡ãƒ¼ã‚¿ã‚’疑似ランダムã«åŒ–ã™ã“ã¨ãŒã§ãã¾ã™ã€‚データã®é¸æŠžæ™‚ã«[SAMPLE](/docs/ja/sql-reference/statements/select/sample.md/#select-sample-clause)å¥ã‚’定義ã™ã‚‹å ´åˆã€ClickHouseã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚µãƒ–セットã«å¯¾ã—ã¦å‡ä¸€ãªç–‘似ランダムデータサンプルを返ã—ã¾ã™ã€‚ + +`index_granularity`設定ã¯çœç•¥å¯èƒ½ã§ã™ã€‚デフォルト値ã¯8192ã§ã™ã€‚ + +
+ +テーブル作æˆã®éžæŽ¨å¥¨ãƒ¡ã‚½ãƒƒãƒ‰ + +:::note +æ–°ã—ã„プロジェクトã§ã“ã®æ–¹æ³•ã‚’使用ã—ãªã„ã§ãã ã•ã„。å¯èƒ½ã§ã‚ã‚Œã°ã€å¤ã„プロジェクトを上記ã®æ–¹æ³•ã«åˆ‡ã‚Šæ›¿ãˆã¦ãã ã•ã„。 +::: + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE [=] MergeTree(date-column [, sampling_expression], (primary, key), index_granularity) +``` + +**MergeTree()ã®ãƒ‘ラメータ** + +- `date-column` — [Date](/docs/ja/sql-reference/data-types/date.md)åž‹ã®ã‚«ãƒ©ãƒ å。ClickHouseã¯ã“ã®ã‚«ãƒ©ãƒ ã«åŸºã¥ã„ã¦æœˆã”ã¨ã«ãƒ‘ーティションを自動作æˆã—ã¾ã™ã€‚パーティションåã¯`"YYYYMM"`å½¢å¼ã§ã™ã€‚ +- `sampling_expression` — サンプリングã®ãŸã‚ã®å¼ã€‚ +- `(primary, key)` — 主キー。型:[Tuple()](/docs/ja/sql-reference/data-types/tuple.md) +- `index_granularity` — インデックスã®ç²’度。インデックスã®ã€Œãƒžãƒ¼ã‚¯ã€ã®é–“ã®ãƒ‡ãƒ¼ã‚¿è¡Œæ•°ã€‚8192ã¨ã„ã†å€¤ã¯ã€ã»ã¨ã‚“ã©ã®ã‚¿ã‚¹ã‚¯ã«é©ã—ã¦ã„ã¾ã™ã€‚ + +**例** + +``` sql +MergeTree(EventDate, intHash32(UserID), (CounterID, EventDate, intHash32(UserID)), 8192) +``` + +`MergeTree`エンジンã¯ã€ä¸Šè¨˜ã®ä¸»è¦ã‚¨ãƒ³ã‚¸ãƒ³è¨­å®šæ–¹æ³•ã®ä¾‹ã¨åŒã˜æ–¹æ³•ã§æ§‹æˆã•ã‚Œã¾ã™ã€‚ +
+ +## データストレージ {#mergetree-data-storage} + +テーブルã¯ã€ä¸»ã‚­ãƒ¼ã§ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ‘ートã‹ã‚‰æ§‹æˆã•ã‚Œã¾ã™ã€‚ + +テーブルã«ãƒ‡ãƒ¼ã‚¿ãŒæŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€å€‹åˆ¥ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ートãŒä½œæˆã•ã‚Œã€ãã‚Œãžã‚ŒãŒä¸»ã‚­ãƒ¼ã§è¾žæ›¸é †ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ä¸»ã‚­ãƒ¼ãŒ`(CounterID, Date)`ã®å ´åˆã€ãƒ‘ート内ã®ãƒ‡ãƒ¼ã‚¿ã¯`CounterID`ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã€å„`CounterID`内ã§`Date`ã§ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ + +ç•°ãªã‚‹ãƒ‘ーティションã«å±žã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ã€ç•°ãªã‚‹ãƒ‘ートã«åˆ†é›¢ã•ã‚Œã¾ã™ã€‚ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ãƒ‘ートをマージã—ã¦ã€ã‚ˆã‚ŠåŠ¹çŽ‡çš„ã«ä¿ç®¡ã—ã¾ã™ã€‚ç•°ãªã‚‹ãƒ‘ーティションã«å±žã™ã‚‹ãƒ‘ーツã¯ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã›ã‚“。マージメカニズムã¯ã€åŒã˜ä¸»ã‚­ãƒ¼ã‚’æŒã¤å…¨ã¦ã®è¡ŒãŒåŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ‘ートã«å«ã¾ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã›ã‚“。 + +データパートã¯`Wide`ã¾ãŸã¯`Compact`フォーマットã§ä¿å­˜ã§ãã¾ã™ã€‚`Wide`フォーマットã§ã¯ã€å„カラムã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ å†…ã®åˆ¥ã€…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã•ã‚Œã€`Compact`フォーマットã§ã¯å…¨ã¦ã®ã‚«ãƒ©ãƒ ãŒ1ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚`Compact`フォーマットã¯ã€å°è¦æ¨¡ã§é »ç¹ãªæŒ¿å…¥ã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +データã®ä¿å­˜ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€ãƒ†ãƒ¼ãƒ–ルエンジンã®`min_bytes_for_wide_part`ã¨`min_rows_for_wide_part`設定ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚データパートã®ãƒã‚¤ãƒˆã¾ãŸã¯è¡Œæ•°ãŒå¯¾å¿œã™ã‚‹è¨­å®šå€¤ã‚ˆã‚Šå°‘ãªã„å ´åˆã€ãƒ‘ートã¯`Compact`フォーマットã§ä¿å­˜ã•ã‚Œã¾ã™ã€‚ãれ以外ã®å ´åˆã¯`Wide`フォーマットã§ä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“れらã®è¨­å®šãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ートã¯`Wide`フォーマットã§ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +å„データパートã¯ã€è«–ç†çš„ã«ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã«åˆ†å‰²ã•ã‚Œã¾ã™ã€‚グラニュールã¯ã€ClickHouseãŒãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹éš›ã«èª­ã¿å–る最å°ã®ä¸å¯åˆ†ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã™ã€‚ClickHouseã¯è¡Œã‚„値を分割ã—ãªã„ãŸã‚ã€å„グラニュールã«ã¯å¸¸ã«æ•´æ•°ã®è¡Œæ•°ãŒå«ã¾ã‚Œã¾ã™ã€‚グラニュールã®æœ€åˆã®è¡Œã¯ã€ãã®è¡Œã®ä¸»ã‚­ãƒ¼ã®å€¤ã§ãƒžãƒ¼ã‚¯ã•ã‚Œã¦ã„ã¾ã™ã€‚å„データパートã«ã¤ã„ã¦ã€ClickHouseã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã—ã€ãƒžãƒ¼ã‚¯ã‚’ä¿å­˜ã—ã¾ã™ã€‚プライマリキーã«ã‚ã‚‹ã‹ã©ã†ã‹ã«ã‹ã‹ã‚らãšã€å„カラムã«ã¤ã„ã¦ã‚‚åŒæ§˜ã®ãƒžãƒ¼ã‚¯ãŒä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“れらã®ãƒžãƒ¼ã‚¯ã«ã‚ˆã‚Šã€ã‚«ãƒ©ãƒ ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ãƒ‡ãƒ¼ã‚¿ã‚’直接見ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +グラニュールã®ã‚µã‚¤ã‚ºã¯ã€ãƒ†ãƒ¼ãƒ–ルエンジンã®`index_granularity`ã¨`index_granularity_bytes`設定ã«ã‚ˆã£ã¦åˆ¶é™ã•ã‚Œã¾ã™ã€‚グラニュール内ã®è¡Œã®æ•°ã¯`[1, index_granularity]`範囲内ã«ã‚ã‚Šã€è¡Œã®ã‚µã‚¤ã‚ºã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚グラニュールã®ã‚µã‚¤ã‚ºã¯ã€å˜ä¸€ã®è¡Œã®ã‚µã‚¤ã‚ºãŒè¨­å®šå€¤ã‚ˆã‚Šå¤§ãã„å ´åˆã€`index_granularity_bytes`を超ãˆã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã®ã‚µã‚¤ã‚ºã¯è¡Œã®ã‚µã‚¤ã‚ºã«ç­‰ã—ããªã‚Šã¾ã™ã€‚ + +## クエリã§ã®ä¸»ã‚­ãƒ¼ã¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ {#primary-keys-and-indexes-in-queries} + +例ãˆã°ã€`(CounterID, Date)`ã®ä¸»ã‚­ãƒ¼ã‚’考ãˆã¾ã™ã€‚ã“ã®å ´åˆã€ã‚½ãƒ¼ãƒˆã¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯æ¬¡ã®ã‚ˆã†ã«å›³ç¤ºã•ã‚Œã¾ã™ï¼š + + 全データ: [---------------------------------------------] + CounterID: [aaaaaaaaaaaaaaaaaabbbbcdeeeeeeeeeeeeefgggggggghhhhhhhhhiiiiiiiiikllllllll] + Date: [1111111222222233331233211111222222333211111112122222223111112223311122333] + マーク: | | | | | | | | | | | + a,1 a,2 a,3 b,3 e,2 e,3 g,1 h,2 i,1 i,3 l,3 + マーク番å·: 0 1 2 3 4 5 6 7 8 9 10 + +データクエリãŒæ¬¡ã‚’指定ã—ã¦ã„ã‚‹å ´åˆï¼š + +- `CounterID in ('a', 'h')`ã€ã‚µãƒ¼ãƒãƒ¼ã¯ãƒžãƒ¼ã‚¯ã®ç¯„囲`[0, 3)`ã¨`[6, 8)`ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ +- `CounterID IN ('a', 'h') AND Date = 3`ã€ã‚µãƒ¼ãƒãƒ¼ã¯ãƒžãƒ¼ã‚¯ã®ç¯„囲`[1, 3)`ã¨`[7, 8)`ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ +- `Date = 3`ã€ã‚µãƒ¼ãƒãƒ¼ã¯ãƒžãƒ¼ã‚¯ã®ç¯„囲`[1, 10]`ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ + +上記ã®ä¾‹ã¯ã€ãƒ•ãƒ«ã‚¹ã‚­ãƒ£ãƒ³ã‚ˆã‚Šã‚‚インデックスを使用ã™ã‚‹æ–¹ãŒå¸¸ã«åŠ¹æžœçš„ã§ã‚ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +訳注: + +スパースインデックスã¯ã€è¿½åŠ ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚プライマリキーã®å˜ä¸€ç¯„囲を読ã¿å–ã‚‹éš›ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã”ã¨ã«æœ€å¤§`index_granularity * 2`ã®è¿½åŠ è¡Œã‚’読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +スパースインデックスã«ã‚ˆã‚Šã€å¤§é‡ã®ãƒ†ãƒ¼ãƒ–ル行を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãªãœãªã‚‰ã€ã»ã¨ã‚“ã©ã®å ´åˆã€ã“ã®ã‚ˆã†ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã‚³ãƒ³ãƒ”ューターã®RAMã«åŽã¾ã‚‹ã‹ã‚‰ã§ã™ã€‚ + +ClickHouseã¯ä¸€æ„ã®ãƒ—ライマリキーを必è¦ã¨ã—ã¾ã›ã‚“。åŒã˜ãƒ—ライマリキーをæŒã¤è¤‡æ•°ã®è¡Œã‚’挿入ã§ãã¾ã™ã€‚ + +`Nullable`åž‹ã®å¼ã‚’`PRIMARY KEY`ã¨`ORDER BY`å¥ã«ä½¿ç”¨ã§ãã¾ã™ãŒã€å¼·ã推奨ã•ã‚Œã¾ã›ã‚“。ã“ã®æ©Ÿèƒ½ã‚’許å¯ã™ã‚‹ã«ã¯ã€[allow_nullable_key](/docs/ja/operations/settings/settings.md/#allow-nullable-key)設定をオンã«ã—ã¾ã™ã€‚`ORDER BY`å¥ã«ãŠã‘ã‚‹`NULL`値ã«ã¯[NULLS_LAST](/docs/ja/sql-reference/statements/select/order-by.md/#sorting-of-special-values)原則ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ + +### 主キーã®é¸æŠž {#selecting-a-primary-key} + +主キーã«å«ã¾ã‚Œã‚‹ã‚«ãƒ©ãƒ ã®æ•°ã«æ˜Žç¤ºçš„ãªåˆ¶é™ã¯ã‚ã‚Šã¾ã›ã‚“。データ構造ã«ã‚ˆã£ã¦ã€ãƒ—ライマリキーã«å¤šãã®ã‚«ãƒ©ãƒ ã‚’å«ã‚ã‚‹ã“ã¨ã‚‚ã€å°‘ãªã„カラムをå«ã‚ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šä»¥ä¸‹ã®ã“ã¨ãŒå¯èƒ½ã§ã™ï¼š + +- インデックスã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ã€‚ + + 主キーãŒ`(a, b)`ã®å ´åˆã€ä»¥ä¸‹ã®æ¡ä»¶ãŒæº€ãŸã•ã‚Œã‚‹ã¨ã€è¿½åŠ ã®ã‚«ãƒ©ãƒ `c`を追加ã™ã‚‹ã“ã¨ã§ãƒ‘フォーマンスãŒå‘上ã—ã¾ã™ï¼š + + - カラム`c`ã«å¯¾ã™ã‚‹æ¡ä»¶ã‚’æŒã¤ã‚¯ã‚¨ãƒªãŒå­˜åœ¨ã™ã‚‹ã€‚ + - `(a, b)`ã®å€¤ãŒåŒä¸€ã®é•·ã„データ範囲(`index_granularity`ã®æ•°å€ç¨‹åº¦ã®é•·ã•ï¼‰ãŒä¸€èˆ¬çš„ã§ã‚る。ã¤ã¾ã‚Šã€é•·ã„データ範囲をスキップã§ãã‚‹å ´åˆã«ã€è¿½åŠ ã®ã‚«ãƒ©ãƒ ã‚’追加ã™ã‚‹æ„味ãŒã‚ã‚Šã¾ã™ã€‚ + +- データ圧縮ã®å‘上。 + + ClickHouseã¯ãƒ—ライマリキーã«ã‚ˆã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ソートã™ã‚‹ãŸã‚ã€ä¸€è²«æ€§ãŒé«˜ã„ã»ã©ã€åœ§ç¸®ãŒå‘上ã—ã¾ã™ã€‚ + +- [CollapsingMergeTree](/docs/ja/engines/table-engines/mergetree-family/collapsingmergetree.md/#table_engine-collapsingmergetree)ãŠã‚ˆã³[SummingMergeTree](/docs/ja/engines/table-engines/mergetree-family/summingmergetree.md)エンジンã§ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツをマージã™ã‚‹éš›ã®è¿½åŠ ãƒ­ã‚¸ãƒƒã‚¯ã‚’æä¾›ã—ã¾ã™ã€‚ + + ã“ã®å ´åˆã€ä¸»ã‚­ãƒ¼ã¨ã¯ç•°ãªã‚‹*ソートキー*を指定ã™ã‚‹ã“ã¨ã«ã¯æ„義ãŒã‚ã‚Šã¾ã™ã€‚ + +é•·ã„プライマリキーã¯æŒ¿å…¥ãƒ‘フォーマンスã¨ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã«æ‚ªå½±éŸ¿ã‚’与ãˆã¾ã™ãŒã€è¿½åŠ ã®ã‚«ãƒ©ãƒ ã¯`SELECT`クエリã®ãƒ‘フォーマンスã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 + +`ORDER BY tuple()`構文を使用ã—ã¦ã€ãƒ—ライマリキーãªã—ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ClickHouseã¯æŒ¿å…¥ã®é †åºã§ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã—ã¾ã™ã€‚`INSERT ... SELECT`クエリã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ãã«ãƒ‡ãƒ¼ã‚¿ã®é †åºã‚’ä¿æŒã—ãŸã„å ´åˆã¯ã€[max_insert_threads = 1](/docs/ja/operations/settings/settings.md/#max-insert-threads)を設定ã—ã¾ã™ã€‚ + +åˆæœŸã®é †åºã§ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ã«ã¯ã€[å˜ä¸€ã‚¹ãƒ¬ãƒƒãƒ‰](/docs/ja/operations/settings/settings.md/#max_threads)ã®`SELECT`クエリを使用ã—ã¾ã™ã€‚ + +### ソートキーã¨ç•°ãªã‚‹ä¸»ã‚­ãƒ¼ã®é¸æŠž {#choosing-a-primary-key-that-differs-from-the-sorting-key} + +プライマリキー(マークã”ã¨ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹å€¤ã®å¼ï¼‰ãŒã€ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ï¼ˆãƒ‡ãƒ¼ã‚¿ãƒ‘ーツ内ã®è¡Œã‚’ソートã™ã‚‹ãŸã‚ã®å¼ï¼‰ã¨ç•°ãªã‚‹å ´åˆã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ—ライマリキーã®å¼ã‚¿ãƒ—ルã¯ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã®å¼ã‚¿ãƒ—ルã®ãƒ—レフィックスã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã¯[SummingMergeTree](/docs/ja/engines/table-engines/mergetree-family/summingmergetree.md)ã‚„[AggregatingMergeTree](/docs/ja/engines/table-engines/mergetree-family/aggregatingmergetree.md)ã®ã‚¨ãƒ³ã‚¸ãƒ³ã§ä½¿ç”¨ã™ã‚‹éš›ã«å½¹ç«‹ã¡ã¾ã™ã€‚通常ã€ã“れらã®ã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã™ã‚‹å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã«ã¯*ディメンション*ã¨*メジャー*ã®2種類ã®ã‚«ãƒ©ãƒ ãŒã‚ã‚Šã¾ã™ã€‚典型的ãªã‚¯ã‚¨ãƒªã§ã¯ã€ãƒ‡ã‚£ãƒ¡ãƒ³ã‚·ãƒ§ãƒ³ã‚’`GROUP BY`ãŠã‚ˆã³ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¦ã€ãƒ¡ã‚¸ãƒ£ãƒ¼ã‚«ãƒ©ãƒ ã®å€¤ã‚’集計ã—ã¾ã™ã€‚SummingMergeTreeã¨AggregatingMergeTreeã¯ã€ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã®å€¤ãŒåŒã˜è¡Œã‚’集計ã™ã‚‹ãŸã‚ã€ãƒ‡ã‚£ãƒ¡ãƒ³ã‚·ãƒ§ãƒ³ã®å…¨ã¦ã‚’ソートキーã«è¿½åŠ ã™ã‚‹ã®ã¯è‡ªç„¶ã§ã™ã€‚ã“ã®çµæžœã€ã‚­ãƒ¼ã®å¼ã¯é•·ã„カラムリストã¨ãªã‚Šã€æ–°ãŸã«è¿½åŠ ã•ã‚ŒãŸãƒ‡ã‚£ãƒ¡ãƒ³ã‚·ãƒ§ãƒ³ã§é »ç¹ã«æ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“ã®å ´åˆã€åŠ¹çŽ‡çš„ãªç¯„囲スキャンをæä¾›ã™ã‚‹å°‘æ•°ã®ã‚«ãƒ©ãƒ ã ã‘をプライマリキーã«æ®‹ã—ã€æ®‹ã‚Šã®ãƒ‡ã‚£ãƒ¡ãƒ³ã‚·ãƒ§ãƒ³ã‚«ãƒ©ãƒ ã‚’ソートキータプルã«è¿½åŠ ã™ã‚‹ã®ãŒè³¢æ˜Žã§ã™ã€‚ + +ソートキーã®[ALTER](/docs/ja/sql-reference/statements/alter/index.md)ã¯è»½é‡ãªæ“作ã§ã™ã€‚æ–°ã—ã„カラムãŒãƒ†ãƒ¼ãƒ–ルã«è¿½åŠ ã•ã‚Œã€åŒæ™‚ã«ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã«è¿½åŠ ã•ã‚Œã‚‹ã¨ãã€æ—¢å­˜ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを変更ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。å¤ã„ソートキーãŒæ–°ã—ã„ソートキーã®ãƒ—レフィックスã§ã‚ã‚Šã€æ–°ã—ã追加ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã«æ—¢å­˜ã®ãƒ‡ãƒ¼ã‚¿ãŒãªã„ãŸã‚ã€ãƒ†ãƒ¼ãƒ–ル変更ã®çž¬é–“ã«ãƒ‡ãƒ¼ã‚¿ã¯ä¸¡æ–¹ã®å¤ã„ã¨æ–°ã—ã„ソートキーã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +### クエリã«ãŠã‘るインデックスã¨ãƒ‘ーティションã®åˆ©ç”¨ {#use-of-indexes-and-partitions-in-queries} + +`SELECT`クエリã«å¯¾ã—ã¦ã€ClickHouseã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒä½¿ç”¨å¯èƒ½ã‹ã©ã†ã‹ã‚’分æžã—ã¾ã™ã€‚インデックスã¯ã€`WHERE/PREWHERE`å¥ã«ãƒ—ライマリキーã¾ãŸã¯ãƒ‘ーティションキーã«å«ã¾ã‚Œã‚‹ã‚«ãƒ©ãƒ ã‚„å¼ã€ã¾ãŸã¯ã“れらã®ç‰¹å®šã®éƒ¨åˆ†çš„ã«ç¹°ã‚Šè¿”ã•ã‚Œã‚‹é–¢æ•°ãŒå«ã¾ã‚Œã‚‹å ´åˆã«ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ã¾ãŸã€ã“れらã®å¼ã‚„ãれらã®è«–ç†çš„ãªé–¢ä¿‚ãŒå«ã¾ã‚Œã‚‹å ´åˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +ã—ãŸãŒã£ã¦ã€ãƒ—ライマリキーã®1ã¤ã¾ãŸã¯è¤‡æ•°ã®ç¯„囲ã§ã‚¯ã‚¨ãƒªã‚’迅速ã«å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€ç‰¹å®šã®ãƒˆãƒ©ãƒƒã‚­ãƒ³ã‚°ã‚¿ã‚°ã€ç‰¹å®šã®ã‚¿ã‚°ã¨æ—¥ä»˜ç¯„囲ã€ç‰¹å®šã®ã‚¿ã‚°ã¨æ—¥ä»˜ã€è¤‡æ•°ã®ã‚¿ã‚°ã¨æ—¥ä»˜ç¯„囲ãªã©ã«å¯¾ã™ã‚‹ã‚¯ã‚¨ãƒªãŒé«˜é€Ÿã«ãªã‚Šã¾ã™ã€‚ + +次ã®ã‚ˆã†ã«ã‚¨ãƒ³ã‚¸ãƒ³ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã‚’見ã¦ã¿ã¾ã—ょã†ï¼š +```sql +ENGINE MergeTree() +PARTITION BY toYYYYMM(EventDate) +ORDER BY (CounterID, EventDate) +SETTINGS index_granularity=8192 +``` + +ã“ã®å ´åˆã€ã‚¯ã‚¨ãƒªã§ã¯ï¼š + +``` sql +SELECT count() FROM table +WHERE EventDate = toDate(now()) +AND CounterID = 34 + +SELECT count() FROM table +WHERE EventDate = toDate(now()) +AND (CounterID = 34 OR CounterID = 42) + +SELECT count() FROM table +WHERE ((EventDate >= toDate('2014-01-01') +AND EventDate <= toDate('2014-01-31')) OR EventDate = toDate('2014-05-01')) +AND CounterID IN (101500, 731962, 160656) +AND (CounterID = 101500 OR EventDate != toDate('2014-05-01')) +``` + +ClickHouseã¯ãƒ—ライマリキーインデックスを使用ã—ã¦ä¸é©åˆ‡ãªãƒ‡ãƒ¼ã‚¿ã‚’トリムã—ã€æœˆã”ã¨ã®ãƒ‘ーティションキーを使用ã—ã¦ä¸é©åˆ‡ãªæ—¥ä»˜ç¯„囲ã®ãƒ‘ーティションをトリムã—ã¾ã™ã€‚ + +上記ã®ã‚¯ã‚¨ãƒªã¯ã€è¤‡é›‘ãªå¼ã§ã‚‚インデックスãŒä½¿ç”¨ã•ã‚Œã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚テーブルã‹ã‚‰ã®èª­ã¿å–ã‚Šã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ä½¿ç”¨ãŒãƒ•ãƒ«ã‚¹ã‚­ãƒ£ãƒ³ã‚ˆã‚Šé…ããªã‚‹ã“ã¨ãŒãªã„よã†ã«æ•´ç†ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +以下ã®ä¾‹ã§ã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã§ãã¾ã›ã‚“。 + +``` sql +SELECT count() FROM table WHERE CounterID = 34 OR URL LIKE '%upyachka%' +``` + +クエリを実行ã™ã‚‹éš›ã«ClickHouseãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã§ãã‚‹ã‹ã©ã†ã‹ã‚’確èªã™ã‚‹ãŸã‚ã«ã€[force_index_by_date](/docs/ja/operations/settings/settings.md/#force_index_by_date)ãŠã‚ˆã³[force_primary_key](/docs/ja/operations/settings/settings.md/#force-primary-key)設定を使用ã—ã¦ãã ã•ã„。 + +月ã”ã¨ã®ãƒ‘ーティションã§ãƒ‘ーティション分ã‘ã‚’è¡Œã†ã‚­ãƒ¼ã¯ã€é©åˆ‡ãªç¯„囲ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®ã¿ã‚’読ã¿å–ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã«ã¯å¤šãã®æ—¥ä»˜ï¼ˆå ´åˆã«ã‚ˆã£ã¦ã¯ä¸¸ã”ã¨æœˆã¾ã§ï¼‰ãŒå«ã¾ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ブロック内ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ—ライマリキーã§ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ãŒã€æ—¥ä»˜ãŒæœ€åˆã®ã‚«ãƒ©ãƒ ã¨ã—ã¦å«ã¾ã‚Œã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ãƒ—ライマリキーã®ãƒ—レフィックスを指定ã—ãªã„ãŸã ã®æ—¥ä»˜æ¡ä»¶ã§ã®ã‚¯ã‚¨ãƒªã®ä½¿ç”¨ã¯ã€å˜ä¸€ã®æ—¥ä»˜ã‚ˆã‚Šã‚‚多ãã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–る原因ã¨ãªã‚Šã¾ã™ã€‚ + +### 部分的ã«å˜èª¿ãªãƒ—ライマリキーã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä½¿ç”¨ {#use-of-index-for-partially-monotonic-primary-keys} + +例ãˆã°ã€æœˆã®æ—¥æ•°ã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚一ヶ月ã«å¯¾ã—ã¦ã¯[å˜èª¿ãªã‚·ãƒ¼ã‚±ãƒ³ã‚¹](https://en.wikipedia.org/wiki/Monotonic_function)ã‚’å½¢æˆã—ã¾ã™ãŒã€ã‚ˆã‚Šé•·ã„期間ã«å¯¾ã—ã¦ã¯å˜èª¿ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯éƒ¨åˆ†çš„ã«å˜èª¿ãªã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§ã™ã€‚ユーザーãŒéƒ¨åˆ†çš„ã«å˜èª¿ãªãƒ—ライマリキーã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ãŸå ´åˆã€ClickHouseã¯é€šå¸¸ã®ã‚ˆã†ã«ã‚¹ãƒ‘ースインデックスを作æˆã—ã¾ã™ã€‚ユーザーãŒã“ã®ç¨®ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹éš›ã€ClickHouseã¯ã‚¯ã‚¨ãƒªæ¡ä»¶ã‚’分æžã—ã¾ã™ã€‚ユーザーãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®2ã¤ã®ãƒžãƒ¼ã‚¯é–“ã®ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ã€ä¸¡ãƒžãƒ¼ã‚¯ãŒ1ヶ月内ã«åŽã¾ã‚‹å ´åˆã€ClickHouseã¯ã“ã®ç‰¹å®šã®ã‚±ãƒ¼ã‚¹ã§ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã§ãã¾ã™ã€‚ãªãœãªã‚‰ã€ã‚¯ã‚¨ãƒªãƒ‘ラメータã¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯é–“ã®è·é›¢ã‚’計算ã§ãã‚‹ã‹ã‚‰ã§ã™ã€‚ + +ClickHouseã¯ã€ã‚¯ã‚¨ãƒªãƒ‘ラメータ範囲内ã®ãƒ—ライマリキーã®å€¤ãŒå˜èª¿ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’表ã—ã¦ã„ãªã„å ´åˆã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã§ãã¾ã›ã‚“。ã“ã®å ´åˆã€ClickHouseã¯ãƒ•ãƒ«ã‚¹ã‚­ãƒ£ãƒ³ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã—ã¾ã™ã€‚ + +ClickHouseã¯ã€ã“ã®ãƒ­ã‚¸ãƒƒã‚¯ã‚’月ã®æ—¥ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã ã‘ã§ãªãã€éƒ¨åˆ†çš„ã«å˜èª¿ãªã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’表ã™ã‚らゆるプライマリキーã«å¯¾ã—ã¦ã‚‚使用ã—ã¾ã™ã€‚ + +### データスキッピングインデックス {#table_engine-mergetree-data_skipping-indexes} + +インデックス宣言ã¯`CREATE`クエリã®ã‚«ãƒ©ãƒ ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§è¡Œã‚ã‚Œã¾ã™ã€‚ + +``` sql +INDEX index_name expr TYPE type(...) [GRANULARITY granularity_value] +``` + +`*MergeTree`ファミリーã®ãƒ†ãƒ¼ãƒ–ルã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ”ングインデックスを指定ã§ãã¾ã™ã€‚ + +ã“れらã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€ã‚°ãƒ©ãƒ³ãƒ©ãƒªãƒ†ã‚£å€¤`granularity_value`ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã§æ§‹æˆã•ã‚ŒãŸãƒ–ロック上ã§æŒ‡å®šã•ã‚ŒãŸå¼ã«ã¤ã„ã¦ã®æƒ…報を集計ã—ã€é›†è¨ˆçµæžœã‚’`SELECT`クエリã§ä½¿ç”¨ã—ã¦ã€ã‚¯ã‚¨ãƒªãŒæº€ãŸã™ã“ã¨ãŒã§ããªã„大ããªãƒ‡ãƒ¼ã‚¿ãƒ–ロックをスキップã™ã‚‹ã“ã¨ã§ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰èª­ã¿å–るデータé‡ã‚’削減ã—ã¾ã™ã€‚ + +`GRANULARITY`å¥ã¯çœç•¥å¯èƒ½ã§ã€`granularity_value`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯1ã§ã™ã€‚ + +**例** + +``` sql +CREATE TABLE table_name +( + u64 UInt64, + i32 Int32, + s String, + ... + INDEX idx1 u64 TYPE bloom_filter GRANULARITY 3, + INDEX idx2 u64 * i32 TYPE minmax GRANULARITY 3, + INDEX idx3 u64 * length(s) TYPE set(1000) GRANULARITY 4 +) ENGINE = MergeTree() +... +``` + +例ã«ç¤ºã•ã‚Œã¦ã„るインデックスã¯ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã«ãŠã„ã¦ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰èª­ã¿å–るデータé‡ã‚’削減ã™ã‚‹ãŸã‚ã«ClickHouseã«ã‚ˆã£ã¦åˆ©ç”¨ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ï¼š + +``` sql +SELECT count() FROM table WHERE u64 == 10; +SELECT count() FROM table WHERE u64 * i32 >= 1234 +SELECT count() FROM table WHERE u64 * length(s) == 1234 +``` + +データスキッピングインデックスã¯ã€è¤‡åˆé›†åˆã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦ã‚‚作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +-- Mapåž‹ã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦: +INDEX map_key_index mapKeys(map_column) TYPE bloom_filter +INDEX map_value_index mapValues(map_column) TYPE bloom_filter + +-- Tupleåž‹ã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦: +INDEX tuple_1_index tuple_column.1 TYPE bloom_filter +INDEX tuple_2_index tuple_column.2 TYPE bloom_filter + +-- Nestedåž‹ã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦: +INDEX nested_1_index col.nested_col1 TYPE bloom_filter +INDEX nested_2_index col.nested_col2 TYPE bloom_filter +``` + +### 使用å¯èƒ½ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ— {#available-types-of-indices} + +#### MinMax + +指定ã•ã‚ŒãŸå¼ã®æ¥µå€¤ã‚’ä¿å­˜ã—ã¾ã™ï¼ˆã‚‚ã—å¼ãŒ`tuple`ã®å ´åˆã¯ã€`tuple`ã®å„è¦ç´ ã®æ¥µå€¤ã‚’ä¿å­˜ã—ã¾ã™ï¼‰ã€‚ä¿å­˜ã•ã‚ŒãŸæƒ…報を利用ã—ã¦ã€ãƒ—ライマリキーã®ã‚ˆã†ã«ãƒ‡ãƒ¼ã‚¿ãƒ–ロックをスキップã—ã¾ã™ã€‚ + +構文: `minmax` + +#### Set + +指定ã•ã‚ŒãŸå¼ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå€¤ã‚’ä¿å­˜ã—ã¾ã™ï¼ˆæœ€å¤§è¡Œæ•°ãŒ`max_rows`è¡Œã§ã€`max_rows=0`ã¯ã€Œåˆ¶é™ãªã—ã€ã‚’æ„味ã—ã¾ã™ï¼‰ã€‚ãã®å€¤ã‚’使用ã—ã¦ã€`WHERE`å¼ãŒãƒ‡ãƒ¼ã‚¿ãƒ–ロックã§æº€ãŸã›ãªã„å ´åˆã‚’確èªã—ã¾ã™ã€‚ + +構文: `set(max_rows)` + +#### ブルームフィルタ + +指定ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦[ブルームフィルタ](https://en.wikipedia.org/wiki/Bloom_filter)ã‚’ä¿å­˜ã—ã¾ã™ã€‚オプションã®`false_positive`パラメータã¯ã€0ã‹ã‚‰1ã®å€¤ã§ãƒ•ã‚£ãƒ«ã‚¿ã‹ã‚‰å½é™½æ€§ã®å¿œç­”ã‚’å—ã‘å–る確率を指定ã—ã¾ã™ã€‚デフォルト値: 0.025。サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型: `Int*`〠`UInt*`〠`Float*`〠`Enum`〠`Date`〠`DateTime`〠`String`〠`FixedString`〠`Array`〠`LowCardinality`〠`Nullable`〠`UUID`〠`Map`。`Map`データ型ã«å¯¾ã—ã¦ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯[mapKeys](/docs/ja/sql-reference/functions/tuple-map-functions.md/#mapkeys)ã¾ãŸã¯[mapValues](/docs/ja/sql-reference/functions/tuple-map-functions.md/#mapvalues)関数を使用ã—ã¦ã€ã‚­ãƒ¼ã¾ãŸã¯å€¤ã«å¯¾ã—ã¦ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’作æˆã™ã¹ãã‹ã‚’指定ã§ãã¾ã™ã€‚ + +構文: `bloom_filter([false_positive])` + +#### N-gramブルームフィルタ + +ブロックデータã‹ã‚‰å…¨ã¦ã®n-gramã‚’å«ã‚€[ブルームフィルタ](https://en.wikipedia.org/wiki/Bloom_filter)ã‚’ä¿å­˜ã—ã¾ã™ã€‚データ型ãŒ[String](/docs/ja/sql-reference/data-types/string.md)ã€[FixedString](/docs/ja/sql-reference/data-types/fixedstring.md)ã€[Map](/docs/ja/sql-reference/data-types/map.md)ã«å¯¾å¿œã—ã¾ã™ã€‚`EQUALS`ã€`LIKE`ã€`IN`å¼ã®æœ€é©åŒ–ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +構文: `ngrambf_v1(n, size_of_bloom_filter_in_bytes, number_of_hash_functions, random_seed)` + +- `n` — ngramã®ã‚µã‚¤ã‚ºã€ +- `size_of_bloom_filter_in_bytes` — ブルームフィルタã®ã‚µã‚¤ã‚ºï¼ˆå¤§ããªå€¤ã‚’使用ã§ãã¾ã™ã€‚例ãˆã°ã€256ã¾ãŸã¯512ã¯åœ§ç¸®åŠ¹çŽ‡ãŒè‰¯ã„ã§ã™ï¼‰ã€‚ +- `number_of_hash_functions` — ブルームフィルタã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®æ•°ã€‚ +- `random_seed` — ブルームフィルタã®ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®ã‚·ãƒ¼ãƒ‰ã€‚ + +ユーザーã¯`ngrambf_v1`ã®ãƒ‘ラメータセットを推定ã™ã‚‹ãŸã‚ã«[UDF](/docs/ja/sql-reference/statements/create/function.md)を作æˆã§ãã¾ã™ã€‚以下ã«ç¤ºã™ã‚¯ã‚¨ãƒªæ–‡ã‚’実行ã—ã¾ã™ï¼š + +```sql +CREATE FUNCTION bfEstimateFunctions [ON CLUSTER cluster] +AS +(total_number_of_all_grams, size_of_bloom_filter_in_bits) -> round((size_of_bloom_filter_in_bits / total_number_of_all_grams) * log(2)); + +CREATE FUNCTION bfEstimateBmSize [ON CLUSTER cluster] +AS +(total_number_of_all_grams, probability_of_false_positives) -> ceil((total_number_of_all_grams * log(probability_of_false_positives)) / log(1 / pow(2, log(2)))); + +CREATE FUNCTION bfEstimateFalsePositive [ON CLUSTER cluster] +AS +(total_number_of_all_grams, number_of_hash_functions, size_of_bloom_filter_in_bytes) -> pow(1 - exp(-number_of_hash_functions/ (size_of_bloom_filter_in_bytes / total_number_of_all_grams)), number_of_hash_functions); + +CREATE FUNCTION bfEstimateGramNumber [ON CLUSTER cluster] +AS +(number_of_hash_functions, probability_of_false_positives, size_of_bloom_filter_in_bytes) -> ceil(size_of_bloom_filter_in_bytes / (-number_of_hash_functions / log(1 - exp(log(probability_of_false_positives) / number_of_hash_functions)))) + +``` +ãれらã®é–¢æ•°ã‚’使用ã™ã‚‹ãŸã‚ã«ã¯ã€å°‘ãªãã¨ã‚‚2ã¤ã®ãƒ‘ラメータを指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +例ãˆã°ã€ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã§4300ngramãŒã‚ã‚Šã€å½é™½æ€§ã‚’0.0001以下ã«äºˆæœŸã—ã¦ã„ã‚‹å ´åˆã§ã™ã€‚ä»–ã®ãƒ‘ラメーターã¯ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã§æŽ¨å®šã§ãã¾ã™ï¼š + +```sql +--- フィルタ内ã®ãƒ“ット数を推定 +SELECT bfEstimateBmSize(4300, 0.0001) / 8 as size_of_bloom_filter_in_bytes; + +┌─size_of_bloom_filter_in_bytes─┠+│ 10304 │ +└───────────────────────────────┘ + +--- ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®æ•°ã‚’推定 +SELECT bfEstimateFunctions(4300, bfEstimateBmSize(4300, 0.0001)) as number_of_hash_functions + +┌─number_of_hash_functions─┠+│ 13 │ +└──────────────────────────┘ + +``` +ã‚‚ã¡ã‚ã‚“ã€ã“れらã®é–¢æ•°ã‚’使用ã—ã¦ã€ä»–ã®æ¡ä»¶ã«åŸºã¥ã„ãŸãƒ‘ラメータã®æŽ¨å®šã‚‚å¯èƒ½ã§ã™ã€‚ +ã“れら関数ã®å†…容ã¯[ã“ã¡ã‚‰](https://hur.st/bloomfilter)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### トークンブルームフィルタ + +`ngrambf_v1`ã¨åŒæ§˜ã ãŒã€ãƒˆãƒ¼ã‚¯ãƒ³ã‚’æ ¼ç´ã—ã¾ã™ã€‚トークンã¯éžè‹±æ•°å­—文字ã§åŒºåˆ‡ã‚‰ã‚ŒãŸæ–‡å­—列ã§ã™ã€‚ + +構文: `tokenbf_v1(size_of_bloom_filter_in_bytes, number_of_hash_functions, random_seed)` + +#### 特殊目的 + +- 近似最近隣(ANN)検索をサãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚詳細ã¯[ã“ã¡ã‚‰](annindexes.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- フルテキスト検索をサãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚詳細ã¯[ã“ã¡ã‚‰](invertedindexes.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る機能 {#functions-support} + +`WHERE`å¥ã®æ¡ä»¶ã¯ã€ã‚«ãƒ©ãƒ ã‚’æ“作ã™ã‚‹é–¢æ•°ã®å‘¼ã³å‡ºã—ã‚’å«ã¿ã¾ã™ã€‚カラムãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ä¸€éƒ¨ã§ã‚ã‚‹å ´åˆã€ClickHouseã¯é–¢æ•°ã‚’実行ã™ã‚‹éš›ã«ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’利用ã—よã†ã¨ã—ã¾ã™ã€‚ClickHouseã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«å¯¾ã—ã¦ç•°ãªã‚‹é–¢æ•°ã®ã‚µãƒ–セットをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +`set`åž‹ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€ã™ã¹ã¦ã®é–¢æ•°ã«ã‚ˆã£ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ä»–ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—ã¯æ¬¡ã®ã‚ˆã†ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼š + +| 関数(オペレーター)/ インデックス | プライマリキー | minmax | ngrambf_v1 | tokenbf_v1 | bloom_filter | full_text | +|--------------------------------------------------------------------------------------------------|-------------|--------|------------|------------|--------------|-----------| +| [equals (=, ==)](/docs/ja/sql-reference/functions/comparison-functions.md/#equals) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [notEquals(!=, <>)](/docs/ja/sql-reference/functions/comparison-functions.md/#notequals) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [like](/docs/ja/sql-reference/functions/string-search-functions.md/#like) | ✔ | ✔ | ✔ | ✔ | ✗ | ✔ | +| [notLike](/docs/ja/sql-reference/functions/string-search-functions.md/#notlike) | ✔ | ✔ | ✔ | ✔ | ✗ | ✔ | +| [match](/docs/ja/sql-reference/functions/string-search-functions.md/#match) | ✗ | ✗ | ✔ | ✔ | ✗ | ✔ | +| [startsWith](/docs/ja/sql-reference/functions/string-functions.md/#startswith) | ✔ | ✔ | ✔ | ✔ | ✗ | ✔ | +| [endsWith](/docs/ja/sql-reference/functions/string-functions.md/#endswith) | ✗ | ✗ | ✔ | ✔ | ✗ | ✔ | +| [multiSearchAny](/docs/ja/sql-reference/functions/string-search-functions.md/#multisearchany) | ✗ | ✗ | ✔ | ✗ | ✗ | ✔ | +| [in](/docs/ja/sql-reference/functions/in-functions) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [notIn](/docs/ja/sql-reference/functions/in-functions) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [less (<)](/docs/ja/sql-reference/functions/comparison-functions.md/#less) | ✔ | ✔ | ✗ | ✗ | ✗ | ✗ | +| [greater (>)](/docs/ja/sql-reference/functions/comparison-functions.md/#greater) | ✔ | ✔ | ✗ | ✗ | ✗ | ✗ | +| [lessOrEquals (<=)](/docs/ja/sql-reference/functions/comparison-functions.md/#lessorequals) | ✔ | ✔ | ✗ | ✗ | ✗ | ✗ | +| [greaterOrEquals (>=)](/docs/ja/sql-reference/functions/comparison-functions.md/#greaterorequals) | ✔ | ✔ | ✗ | ✗ | ✗ | ✗ | +| [empty](/docs/ja/sql-reference/functions/array-functions/#empty) | ✔ | ✔ | ✗ | ✗ | ✗ | ✗ | +| [notEmpty](/docs/ja/sql-reference/functions/array-functions/#notempty) | ✔ | ✔ | ✗ | ✗ | ✗ | ✗ | +| [has](/docs/ja/sql-reference/functions/array-functions/#has) | ✗ | ✗ | ✔ | ✔ | ✔ | ✔ | +| [hasAny](/docs/ja/sql-reference/functions/array-functions/#hasany) | ✗ | ✗ | ✔ | ✔ | ✔ | ✗ | +| [hasAll](/docs/ja/sql-reference/functions/array-functions/#hasall) | ✗ | ✗ | ✗ | ✗ | ✔ | ✗ | +| hasToken | ✗ | ✗ | ✗ | ✔ | ✗ | ✔ | +| hasTokenOrNull | ✗ | ✗ | ✗ | ✔ | ✗ | ✔ | +| hasTokenCaseInsensitive (*) | ✗ | ✗ | ✗ | ✔ | ✗ | ✗ | +| hasTokenCaseInsensitiveOrNull (*) | ✗ | ✗ | ✗ | ✔ | ✗ | ✗ | + +定数引数ã®ã‚る関数ã§ã€ngramサイズよりå°ã•ã„ã‚‚ã®ã¯`ngrambf_v1`ã«ã‚ˆã£ã¦ã‚¯ã‚¨ãƒªæœ€é©åŒ–ã«ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 + +(*) `hasTokenCaseInsensitive`ãŠã‚ˆã³`hasTokenCaseInsensitiveOrNull`ãŒåŠ¹æžœçš„ã§ã‚ã‚‹ãŸã‚ã«ã¯ã€`tokenbf_v1`インデックスãŒå°æ–‡å­—化ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ä½œæˆã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°`INDEX idx (lower(str_col)) TYPE tokenbf_v1(512, 3, 0)`。 + +:::note +ブルームフィルタã¯å½é™½æ€§ãƒžãƒƒãƒã‚’æŒã¤å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€`ngrambf_v1`ã€`tokenbf_v1`ã€`bloom_filter`インデックスã¯ã€é–¢æ•°ã®çµæžœãŒå½ã§ã‚ã‚‹ã¨äºˆæƒ³ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã®æœ€é©åŒ–ã«ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 + +例ãˆã°ï¼š + +- 最é©åŒ–å¯èƒ½ï¼š + - `s LIKE '%test%'` + - `NOT s NOT LIKE '%test%'` + - `s = 1` + - `NOT s != 1` + - `startsWith(s, 'test')` +- 最é©åŒ–ä¸å¯èƒ½ï¼š + - `NOT s LIKE '%test%'` + - `s NOT LIKE '%test%'` + - `NOT s = 1` + - `s != 1` + - `NOT startsWith(s, 'test')` +::: + +## プロジェクション {#projections} + +プロジェクションã¯ã€ãƒ‘ートレベルã§å®šç¾©ã•ã‚Œã‚‹[マテリアライズドビュー](/docs/ja/sql-reference/statements/create/view.md/#materialized)ã«ä¼¼ã¦ã„ã¾ã™ã€‚一貫性ã®ã‚ã‚‹ä¿è¨¼ã¨ã‚¯ã‚¨ãƒªã§ã®è‡ªå‹•ä½¿ç”¨ã‚’æä¾›ã—ã¾ã™ã€‚ + +:::note +プロジェクションを実装ã™ã‚‹éš›ã«ã¯ã€[force_optimize_projection](/docs/ja/operations/settings/settings.md/#force-optimize-projection)設定も考慮ã—ã¦ãã ã•ã„。 +::: + +プロジェクションã¯[FINAL](/docs/ja/sql-reference/statements/select/from.md/#select-from-final)修飾å­ã‚’使用ã—ãŸ`SELECT`ステートメントã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã›ã‚“。 + +### プロジェクションクエリ {#projection-query} + +プロジェクションクエリã¯ãƒ—ロジェクションを定義ã™ã‚‹ã‚‚ã®ã§ã™ã€‚暗黙的ã«è¦ªãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã—ã¾ã™ã€‚ + +**構文** + +```sql +SELECT [GROUP BY] [ORDER BY] +``` + +プロジェクションã¯ã€[ALTER](/docs/ja/sql-reference/statements/alter/projection.md)ステートメントã§å¤‰æ›´ã¾ãŸã¯å‰Šé™¤ã§ãã¾ã™ã€‚ + +### プロジェクションストレージ {#projection-storage} + +プロジェクションã¯ãƒ‘ートディレクトリ内ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ä¼¼ã¦ã„ã¾ã™ãŒã€åŒ¿åã®`MergeTree`テーブルã®ãƒ‘ートを格ç´ã™ã‚‹ã‚µãƒ–ディレクトリをå«ã¿ã¾ã™ã€‚テーブルã¯ãƒ—ロジェクションã®å®šç¾©ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦èª˜å°Žã•ã‚Œã¾ã™ã€‚`GROUP BY`å¥ãŒã‚ã‚‹å ´åˆã€åŸºç›¤ã¨ãªã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã¯[AggregatingMergeTree](aggregatingmergetree.md)ã¨ãªã‚Šã€å…¨ã¦ã®é›†è¨ˆé–¢æ•°ãŒ`AggregateFunction`ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚`ORDER BY`å¥ãŒã‚ã‚‹å ´åˆã€`MergeTree`テーブルã¯ãれを主キーå¼ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚マージプロセス中ã«ãƒ—ロジェクションパートã¯ãã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ãƒžãƒ¼ã‚¸ãƒ«ãƒ¼ãƒãƒ³ã‚’通ã˜ã¦ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚親テーブルã®ãƒ‘ートã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã¯ãƒ—ロジェクションã®ãƒ‘ートã¨çµåˆã•ã‚Œã¾ã™ã€‚ä»–ã®ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ã‚¸ãƒ§ãƒ–もスキップインデックスã¨ä¼¼ã¦ã„ã¾ã™ã€‚ + +### クエリアナリシス {#projection-query-analysis} + +1. 特定ã®ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ãƒ—ロジェクションãŒä½¿ç”¨å¯èƒ½ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚ãã‚ŒãŒãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルをクエリã™ã‚‹ã®ã¨åŒã˜ç­”ãˆã‚’生æˆã™ã‚‹ã“ã¨ã€‚ +2. 読ã¿å–るグラニュールãŒæœ€ã‚‚å°‘ãªã„最高ã®é©åˆã‚’é¸æŠžã—ã¾ã™ã€‚ +3. プロジェクションを使用ã™ã‚‹ã‚¯ã‚¨ãƒªãƒ‘イプラインã¯ã€å…ƒã®ãƒ‘ーツを使用ã™ã‚‹ã‚‚ã®ã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚プロジェクションãŒä¸€éƒ¨ã®ãƒ‘ーツã«å­˜åœ¨ã—ãªã„å ´åˆã€ãれをå³åº§ã«ã€Œãƒ—ロジェクトã€ã™ã‚‹ãŸã‚ã®ãƒ‘イプラインを追加ã§ãã¾ã™ã€‚ + +## åŒæ™‚データアクセス {#concurrent-data-access} + +åŒæ™‚ã®ãƒ†ãƒ¼ãƒ–ルアクセスã«ã¯ã€ãƒžãƒ«ãƒãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚°ã‚’使用ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒ†ãƒ¼ãƒ–ルãŒåŒæ™‚ã«èª­ã¿å–ã‚Šã¨æ›´æ–°ã•ã‚Œã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªæ™‚ã«ç¾åœ¨ã®ãƒ‘ーツセットã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ãŒèª­ã¿å–られã¾ã™ã€‚長期間ã®ãƒ­ãƒƒã‚¯ã¯ã‚ã‚Šã¾ã›ã‚“。挿入ãŒèª­ã¿å–ã‚Šæ“作を妨ã’ã¾ã›ã‚“。 + +テーブルã‹ã‚‰ã®èª­ã¿å–ã‚Šã¯è‡ªå‹•çš„ã«ä¸¦åˆ—化ã•ã‚Œã¾ã™ã€‚ + +## カラムã¨ãƒ†ãƒ¼ãƒ–ルã®TTL {#table_engine-mergetree-ttl} + +値ã®æœ‰åŠ¹æœŸé–“を決定ã—ã¾ã™ã€‚ + +`TTL`å¥ã¯ãƒ†ãƒ¼ãƒ–ル全体ãŠã‚ˆã³å„カラムã”ã¨ã«è¨­å®šã§ãã¾ã™ã€‚テーブルレベルã®`TTL`ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã¨ãƒœãƒªãƒ¥ãƒ¼ãƒ é–“ã®è‡ªå‹•ãƒ‡ãƒ¼ã‚¿ç§»å‹•ã®ãƒ­ã‚¸ãƒƒã‚¯ã‚„ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒæœŸé™åˆ‡ã‚Œã«ãªã£ãŸãƒ‘ーツã®å†åœ§ç¸®ã‚’指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +å¼ã¯[Date](/docs/ja/sql-reference/data-types/date.md)ã¾ãŸã¯[DateTime](/docs/ja/sql-reference/data-types/datetime.md)åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +カラムã®TTLを設定: + +``` sql +TTL time_column +TTL time_column + interval +``` + +`interval`を定義ã™ã‚‹ã«ã¯ã€[時間間隔](/docs/ja/sql-reference/operators/index.md#operators-datetime)演算å­ã‚’使用ã—ã¾ã™ã€‚例ãˆã°ï¼š + +``` sql +TTL date_time + INTERVAL 1 MONTH +TTL date_time + INTERVAL 15 HOUR +``` + +### カラムTTL {#mergetree-column-ttl} + +カラム内ã®å€¤ãŒæœŸé™åˆ‡ã‚Œã«ãªã‚‹ã¨ã€ClickHouseã¯ãれらをカラムデータ型ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«ç½®ãæ›ãˆã¾ã™ã€‚データパート内ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ å€¤ãŒæœŸé™åˆ‡ã‚Œã«ãªã‚‹ã¨ã€ClickHouseã¯ã“ã®ã‚«ãƒ©ãƒ ã‚’ファイルシステム内ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ートã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã€‚ + +`TTL`å¥ã¯ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã«ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 + +**例** + +#### `TTL`を使用ã—ãŸãƒ†ãƒ¼ãƒ–ルã®ä½œæˆï¼š + +``` sql +CREATE TABLE tab +( + d DateTime, + a Int TTL d + INTERVAL 1 MONTH, + b Int TTL d + INTERVAL 1 MONTH, + c String +) +ENGINE = MergeTree +PARTITION BY toYYYYMM(d) +ORDER BY d; +``` + +#### 既存テーブルã®ã‚«ãƒ©ãƒ ã¸ã®TTL追加 + +``` sql +ALTER TABLE tab + MODIFY COLUMN + c String TTL d + INTERVAL 1 DAY; +``` + +#### カラムã®TTLã®å¤‰æ›´ + +``` sql +ALTER TABLE tab + MODIFY COLUMN + c String TTL d + INTERVAL 1 MONTH; +``` + +### テーブルTTL {#mergetree-table-ttl} + +テーブルã«ã¯æœŸé™åˆ‡ã‚Œã®è¡Œã‚’削除ã™ã‚‹ãŸã‚ã®å¼ã€ãŠã‚ˆã³[ディスクã¾ãŸã¯ãƒœãƒªãƒ¥ãƒ¼ãƒ é–“](#table_engine-mergetree-multiple-volumes)ã§ãƒ‘ーツを自動移動ã™ã‚‹ãŸã‚ã®è¤‡æ•°ã®å¼ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚テーブル内ã®è¡ŒãŒæœŸé™åˆ‡ã‚Œã«ãªã‚‹ã¨ã€ClickHouseã¯å¯¾å¿œã™ã‚‹ã™ã¹ã¦ã®è¡Œã‚’削除ã—ã¾ã™ã€‚パーツã®ç§»å‹•ã¾ãŸã¯å†åœ§ç¸®ã®å ´åˆã€ã™ã¹ã¦ã®è¡Œã¯`TTL`å¼ã®åŸºæº–を満ãŸã•ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +``` sql +TTL expr + [DELETE|RECOMPRESS codec_name1|TO DISK 'xxx'|TO VOLUME 'xxx'][, DELETE|RECOMPRESS codec_name2|TO DISK 'aaa'|TO VOLUME 'bbb'] ... + [WHERE conditions] + [GROUP BY key_expr [SET v1 = aggr_func(v1) [, v2 = aggr_func(v2) ...]] ] +``` + +TTLルールã®ã‚¿ã‚¤ãƒ—ã¯å„TTLå¼ã«ç¶šãã“ã¨ãŒã§ãã€å¼ãŒæº€ãŸã•ã‚ŒãŸå ´åˆï¼ˆç¾åœ¨ã®æ™‚刻ã«é”ã™ã‚‹ï¼‰ã€å®Ÿè¡Œã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«å½±éŸ¿ã‚’与ãˆã¾ã™ï¼š + +- `DELETE` - 期é™åˆ‡ã‚Œã®è¡Œã‚’削除ã™ã‚‹ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ï¼‰ã€‚ +- `RECOMPRESS codec_name` - `codec_name`ã§ãƒ‡ãƒ¼ã‚¿ãƒ‘ートをå†åœ§ç¸®ã™ã‚‹ã€‚ +- `TO DISK 'aaa'` - パートをディスク`aaa`ã«ç§»å‹•ã™ã‚‹ã€‚ +- `TO VOLUME 'bbb'` - パートをディスク`bbb`ã«ç§»å‹•ã™ã‚‹ã€‚ +- `GROUP BY` - 期é™åˆ‡ã‚Œã®è¡Œã‚’集計ã™ã‚‹ã€‚ + +`DELETE`アクションã¯`WHERE`æ¡ä»¶ã¨å…±ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã€æ—¢ã«æœŸé™ãŒåˆ‡ã‚ŒãŸç‰¹å®šã®è¡Œã®ã¿ã‚’フィルタæ¡ä»¶ã«åŸºã¥ã„ã¦å‰Šé™¤ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +``` sql +TTL time_column + INTERVAL 1 MONTH DELETE WHERE column = 'value' +``` + +`GROUP BY`å¼ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®ä¸»ã‚­ãƒ¼ã®æŽ¥é ­è¾žã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +`GROUP BY`å¼ã«å«ã¾ã‚Œãªã„カラムã§ã€`SET`å¥ã§æ˜Žç¤ºçš„ã«è¨­å®šã•ã‚Œã¦ã„ãªã„ã‚‚ã®ã¯ã€çµæžœè¡Œã§ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚ŒãŸè¡Œã‹ã‚‰ä»»æ„ã®å€¤ã‚’å«ã¿ã¾ã™ï¼ˆagg関数`any`ãŒé©ç”¨ã•ã‚Œã‚‹ã‹ã®ã‚ˆã†ï¼‰ã€‚ + +**例** + +#### `TTL`を使用ã—ãŸãƒ†ãƒ¼ãƒ–ルã®ä½œæˆï¼š + +``` sql +CREATE TABLE tab +( + d DateTime, + a Int +) +ENGINE = MergeTree +PARTITION BY toYYYYMM(d) +ORDER BY d +TTL d + INTERVAL 1 MONTH DELETE, + d + INTERVAL 1 WEEK TO VOLUME 'aaa', + d + INTERVAL 2 WEEK TO DISK 'bbb'; +``` + +#### テーブルã®`TTL`ã®å¤‰æ›´ï¼š + +``` sql +ALTER TABLE tab + MODIFY TTL d + INTERVAL 1 DAY; +``` + +è¡ŒãŒ1ヶ月後ã«å¤±åŠ¹ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€æœŸé™åˆ‡ã‚Œã®æ—¥ä»˜ãŒæœˆæ›œæ—¥ã§ã‚ã‚‹å ´åˆã¯è¡Œã‚’削除ã™ã‚‹ï¼š + +``` sql +CREATE TABLE table_with_where +( + d DateTime, + a Int +) +ENGINE = MergeTree +PARTITION BY toYYYYMM(d) +ORDER BY d +TTL d + INTERVAL 1 MONTH DELETE WHERE toDayOfWeek(d) = 1; +``` + +#### 期é™åˆ‡ã‚Œã®è¡ŒãŒå†åœ§ç¸®ã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルを作æˆï¼š + +```sql +CREATE TABLE table_for_recompression +( + d DateTime, + key UInt64, + value String +) ENGINE MergeTree() +ORDER BY tuple() +PARTITION BY key +TTL d + INTERVAL 1 MONTH RECOMPRESS CODEC(ZSTD(17)), d + INTERVAL 1 YEAR RECOMPRESS CODEC(LZ4HC(10)) +SETTINGS min_rows_for_wide_part = 0, min_bytes_for_wide_part = 0; +``` + +期é™åˆ‡ã‚Œã®è¡ŒãŒé›†è¨ˆã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルを作æˆã€‚çµæžœè¡Œã§`x`ã¯ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚ŒãŸè¡Œã®æœ€å¤§å€¤ã‚’å«ã¿ã€`y`ã¯æœ€å°å€¤ã‚’å«ã¿ã€`d`ã¯ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚ŒãŸè¡Œã‹ã‚‰ã®ä»»æ„ã®å€¤ã‚’å«ã¿ã¾ã™ã€‚ + +``` sql +CREATE TABLE table_for_aggregation +( + d DateTime, + k1 Int, + k2 Int, + x Int, + y Int +) +ENGINE = MergeTree +ORDER BY (k1, k2) +TTL d + INTERVAL 1 MONTH GROUP BY k1, k2 SET x = max(x), y = min(y); +``` + +### 期é™åˆ‡ã‚Œãƒ‡ãƒ¼ã‚¿ã®å‰Šé™¤ {#mergetree-removing-expired-data} + +有効期é™ãŒåˆ‡ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯ã€ClickHouseãŒãƒ‡ãƒ¼ã‚¿ãƒ‘ーツをマージã™ã‚‹ã¨ãã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +ClickHouseãŒãƒ‡ãƒ¼ã‚¿ãŒæœŸé™åˆ‡ã‚Œã§ã‚ã‚‹ã“ã¨ã‚’検出ã™ã‚‹ã¨ã€äºˆå®šå¤–ã®ãƒžãƒ¼ã‚¸ã‚’実行ã—ã¾ã™ã€‚ã“ã®ã‚ˆã†ãªãƒžãƒ¼ã‚¸ã®é »åº¦ã‚’制御ã™ã‚‹ã«ã¯ã€`merge_with_ttl_timeout`を設定ã§ãã¾ã™ã€‚値ãŒä½Žã™ãŽã‚‹ã¨ã€å¤šãã®äºˆå®šå¤–ã®ãƒžãƒ¼ã‚¸ãŒå®Ÿè¡Œã•ã‚Œã€ãƒªã‚½ãƒ¼ã‚¹ã‚’大é‡ã«æ¶ˆè²»ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +マージã®é–“ã«`SELECT`クエリを実行ã™ã‚‹ã¨ã€æœŸé™åˆ‡ã‚Œã®ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“れをé¿ã‘ã‚‹ãŸã‚ã«ã¯ã€`SELECT`ã®å‰ã«[OPTIMIZE](/docs/ja/sql-reference/statements/optimize.md)クエリを使用ã—ã¦ãã ã•ã„。 + +**関連項目** + +- [ttl_only_drop_parts](/docs/ja/operations/settings/settings.md/#ttl_only_drop_parts)設定 + +## ディスクタイプ + +ClickHouseã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ–ロックデãƒã‚¤ã‚¹ã«åŠ ãˆã€ä»¥ä¸‹ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: +- [S3ã¨MinIOã®`s3`](#table_engine-mergetree-s3) +- [GCS用`gcs`](/docs/ja/integrations/data-ingestion/gcs/index.md/#creating-a-disk) +- [Azure Blob Storage用`blob_storage_disk`](#table_engine-mergetree-azure-blob-storage) +- [HDFS用`hdfs`](#hdfs-storage) +- [Webã‹ã‚‰ã®èª­ã¿å–り専用用`web`](#web-storage) +- [ローカルキャッシュ用`cache`](/docs/ja/operations/storing-data.md/#using-local-cache) +- [S3ã¸ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—用`s3_plain`](/docs/ja/operations/backup#backuprestore-using-an-s3-disk) +- [S3ã®ä¸å¤‰ã€éžãƒ¬ãƒ—リカテーブル用`s3_plain_rewritable`](/docs/ja/operations/storing-data.md#s3-plain-rewritable-storage) + +## データストレージã«è¤‡æ•°ã®ãƒ–ロックデãƒã‚¤ã‚¹ã‚’使用ã™ã‚‹ {#table_engine-mergetree-multiple-volumes} + +### æ¦‚è¦ {#introduction} + +`MergeTree`ファミリーã®ãƒ†ãƒ¼ãƒ–ルエンジンã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’複数ã®ãƒ–ロックデãƒã‚¤ã‚¹ã«ä¿å­˜ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãŒæš—黙的ã«"ホット"ãŠã‚ˆã³"コールド"ã«åˆ†å‰²ã•ã‚Œã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚最近ã®ãƒ‡ãƒ¼ã‚¿ã¯å®šæœŸçš„ã«è¦æ±‚ã•ã‚Œã¾ã™ãŒã€å¿…è¦ãªã‚¹ãƒšãƒ¼ã‚¹ã¯å°ã•ã„ã§ã™ã€‚å対ã«ã€æ­´å²çš„データã¯ã¾ã‚Œã«è¦æ±‚ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã€é€šå¸¸ã€å¤šãã®ã‚¹ãƒšãƒ¼ã‚¹ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚複数ã®ãƒ‡ã‚£ã‚¹ã‚¯ãŒåˆ©ç”¨å¯èƒ½ãªå ´åˆã€"ホット"データã¯é«˜é€Ÿãƒ‡ã‚£ã‚¹ã‚¯ï¼ˆä¾‹ãˆã°ã€NVMe SSDやメモリ内)ã«é…ç½®ã—ã€"コールド"データã¯æ¯”較的é…ã„ディスク(例ãˆã°ã€HDD)ã«é…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +データパートã¯`MergeTree`-エンジンテーブルã«ãŠã‘る最å°ç§»å‹•å˜ä½ã§ã™ã€‚1ã¤ã®ãƒ‘ートã«å±žã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ã€1ã¤ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚データパーツã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®è¨­å®šã«å¾“ã£ã¦ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ç§»å‹•ã™ã‚‹ã“ã¨ã‚„ã€[ALTER](/docs/ja/sql-reference/statements/alter/partition.md/#alter_move-partition)クエリを使用ã—ã¦ç§»å‹•ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### 用語 {#terms} + +- ディスク — ファイルシステムã«ãƒžã‚¦ãƒ³ãƒˆã•ã‚ŒãŸãƒ–ロックデãƒã‚¤ã‚¹ã€‚ +- デフォルトディスク — [path](/docs/ja/operations/server-configuration-parameters/settings.md/#path)サーãƒãƒ¼è¨­å®šã§æŒ‡å®šã•ã‚ŒãŸãƒ‘スをä¿ç®¡ã™ã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ã€‚ +- ボリューム — ç­‰ã—ã„ディスクã®é †åºä»˜ãセット([JBOD](https://en.wikipedia.org/wiki/Non-RAID_drive_architectures)ã«é¡žä¼¼ï¼‰ã€‚ +- ストレージãƒãƒªã‚·ãƒ¼ — ボリュームã¨ãれらã®é–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’移動ã™ã‚‹ãŸã‚ã®ãƒ«ãƒ¼ãƒ«ã®ã‚»ãƒƒãƒˆã€‚ + +説明ã•ã‚ŒãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«ä¸Žãˆã‚‰ã‚ŒãŸåå‰ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル[system.storage_policies](/docs/ja/operations/system-tables/storage_policies.md/#system_tables-storage_policies)ãŠã‚ˆã³[system.disks](/docs/ja/operations/system-tables/disks.md/#system_tables-disks)ã«ã‚ã‚Šã¾ã™ã€‚テーブルã«é©ç”¨ã•ã‚ŒãŸã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã‚’指定ã™ã‚‹ãŸã‚ã«ã€`MergeTree`-エンジンファミリーテーブルã®`storage_policy`設定を使用ã—ã¾ã™ã€‚ + +### 設定 {#table_engine-mergetree-multiple-volumes_configure} + +ディスクã€ãƒœãƒªãƒ¥ãƒ¼ãƒ ã€ãŠã‚ˆã³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã¯ã€``タグ内ã§ã€ã‚‚ã—ãã¯`config.d`ディレクトリ内ã®ãƒ•ã‚¡ã‚¤ãƒ«ã§å®£è¨€ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ + +:::tip +ディスクã¯ã‚¯ã‚¨ãƒªã®`SETTINGS`セクションã§ã‚‚宣言ã§ãã¾ã™ã€‚ã“ã‚Œã¯ä¾‹ãˆã°URLã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„る一時的ãªãƒ‡ã‚£ã‚¹ã‚¯ã‚’アタッãƒã™ã‚‹ãŸã‚ã®ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ãªåˆ†æžã«ä¾¿åˆ©ã§ã™ã€‚詳細ã«ã¤ã„ã¦ã¯[動的ストレージ](#dynamic-storage)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +設定構造: + +``` xml + + + + /mnt/fast_ssd/clickhouse/ + + + /mnt/hdd1/clickhouse/ + 10485760 + + + /mnt/hdd2/clickhouse/ + 10485760 + + + ... + + + ... + +``` + +タグ: + +- `` — ディスクå。全ã¦ã®ãƒ‡ã‚£ã‚¹ã‚¯ã§åå‰ãŒç•°ãªã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- `path` — サーãƒãƒ¼ãŒãƒ‡ãƒ¼ã‚¿ï¼ˆ`data`ãŠã‚ˆã³`shadow`フォルダー)をä¿å­˜ã™ã‚‹ãƒ‘スã¯'/'ã§çµ‚ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- `keep_free_space_bytes` — 予約ã•ã‚Œã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ã®ç©ºã容é‡ã®é‡ã€‚ + +ディスク定義ã®é †åºã¯é‡è¦ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +ストレージãƒãƒªã‚·ãƒ¼è¨­å®šãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—: + +``` xml + + ... + + + + + disk_name_from_disks_configuration + 1073741824 + round_robin + + + + + + + 0.2 + + + + + + + + ... + +``` + +タグ: + +- `policy_name_N` — ãƒãƒªã‚·ãƒ¼å。ãƒãƒªã‚·ãƒ¼åã¯ãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +- `volume_name_N` — ボリュームå。ボリュームåã¯ãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +- `disk` — ボリューム内ã®ãƒ‡ã‚£ã‚¹ã‚¯ã€‚ +- `max_data_part_size_bytes` — ボリュームã®ã„ãšã‚Œã‹ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã§ãるパートã®æœ€å¤§ã‚µã‚¤ã‚ºã§ã™ã€‚çµ±åˆã•ã‚Œã‚‹ãƒ‘ートã®ã‚µã‚¤ã‚ºãŒ`max_data_part_size_bytes`よりも大ãã„å ´åˆã€ã“ã®ãƒ‘ートã¯æ¬¡ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚基本的ã«ã€ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€æ–°ã—ã„/å°ã•ãªãƒ‘ーツをホット(SSD)ボリュームã«ä¿æŒã—ã€ãã‚ŒãŒå¤§ããªã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã¨ã‚³ãƒ¼ãƒ«ãƒ‰ï¼ˆHDD)ボリュームã«ç§»å‹•ã•ã›ã¾ã™ã€‚ãƒãƒªã‚·ãƒ¼ãŒ1ã¤ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã—ã‹æŒãŸãªã„å ´åˆã€ã“ã®è¨­å®šã¯ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 +- `move_factor` — 利用å¯èƒ½ãªç©ºãスペースã®é‡ãŒã“ã®ãƒ•ã‚¡ã‚¯ã‚¿ãƒ¼ä»¥ä¸‹ã«ãªã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯è‡ªå‹•çš„ã«æ¬¡ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«ç§»å‹•ã‚’開始ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯0.1)。ClickHouseã¯æ—¢å­˜ã®ãƒ‘ートをサイズã®å¤§ãã„順番ã§ä¸¦ã¹æ›¿ãˆï¼ˆé™é †ã§ï¼‰`move_factor`æ¡ä»¶ã‚’満ãŸã™ã®ã«å分ãªåˆè¨ˆã‚µã‚¤ã‚ºã®ãƒ‘ートをé¸æŠžã—ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ‘ートã®åˆè¨ˆã‚µã‚¤ã‚ºãŒä¸å分ãªå ´åˆã€ã™ã¹ã¦ã®ãƒ‘ートãŒç§»å‹•ã•ã‚Œã¾ã™ã€‚ +- `perform_ttl_move_on_insert` — データパート挿入時ã®TTL移動を無効ã«ã—ã¾ã™ã€‚(デフォルトã§ã¯æœ‰åŠ¹ã§ã™ï¼‰ã‚‚ã—挿入ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ‘ートãŒã™ã§ã«TTL移動ルールã«ã‚ˆã£ã¦æœŸé™åˆ‡ã‚Œã ã£ãŸå ´åˆã€ãã‚Œã¯å³åº§ã«ç§»å‹•ãƒ«ãƒ¼ãƒ«ã§å®£è¨€ã•ã‚ŒãŸãƒœãƒªãƒ¥ãƒ¼ãƒ /ディスクã«ç§»å‹•ã—ã¾ã™ã€‚ã‚‚ã—ã€ã“ã®è¨­å®šãŒç„¡åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ã™ã§ã«æœŸé™åˆ‡ã‚Œã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ートã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒœãƒªãƒ¥ãƒ¼ãƒ ã«æ›¸ãè¾¼ã¾ã‚Œã€ãã®å¾Œã«TTLボリュームã«ç§»å‹•ã•ã‚Œã¾ã™ã€‚ +- `load_balancing` - ディスクãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ã®ãƒãƒªã‚·ãƒ¼ã€`round_robin`ã¾ãŸã¯`least_used`。 +- `least_used_ttl_ms` - ã™ã¹ã¦ã®ãƒ‡ã‚£ã‚¹ã‚¯ã®åˆ©ç”¨å¯èƒ½ãªã‚¹ãƒšãƒ¼ã‚¹ã‚’æ›´æ–°ã™ã‚‹ãŸã‚ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚’設定ã—ã¾ã™ï¼ˆãƒŸãƒªç§’å˜ä½ã€`0` - 常ã«æ›´æ–°ã€`-1` - 一度も更新ã—ãªã„ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯`60000`)。ディスクã¯ClickHouseã«ã‚ˆã£ã¦ã®ã¿ä½¿ç”¨å¯èƒ½ã§ã‚ã‚Šã€ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã®ã‚µã‚¤ã‚ºå¤‰æ›´/縮å°ã®å¯¾è±¡ã§ã¯ãªã„å ´åˆã€ãれを`-1`ã«è¨­å®šã§ãã¾ã™ãŒã€ä»–ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€èª¤ã£ãŸã‚¹ãƒšãƒ¼ã‚¹é…分を引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ãŠå‹§ã‚ã§ãã¾ã›ã‚“。 +- `prefer_not_to_merge` — ã“ã®è¨­å®šã‚’使用ã—ãªã„ã§ãã ã•ã„。ã“ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã§ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ã‚’無効ã«ã—ã¾ã™ï¼ˆã“ã®è¨­å®šã¯æœ‰å®³ã§ãƒ‘フォーマンス低下をもãŸã‚‰ã—ã¾ã™ï¼‰ã€‚ã“ã®è¨­å®šãŒæœ‰åŠ¹ãªå ´åˆï¼ˆãã†ã—ãªã„ã§ãã ã•ã„)ã€ã“ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã§ã®ãƒ‡ãƒ¼ã‚¿ãƒžãƒ¼ã‚¸ã¯è¨±å¯ã•ã‚Œã¾ã›ã‚“(ã“ã‚Œã¯æ‚ªã„ã“ã¨ã§ã™ï¼‰ã€‚ã“ã‚Œã«ã‚ˆã‚Šï¼ˆã§ã‚‚何ã‹ã‚’制御ã—よã†ã¨ã—ã¦ã„ã‚‹ãªã‚‰ã€é–“é•ã£ã¦ã„ã¾ã™ï¼‰ã€ClickHouseãŒé…ã„ディスクã¨ã†ã¾ã動作ã™ã‚‹æ–¹æ³•ã‚’制御ã—ã¾ã™ï¼ˆã—ã‹ã—ã€ClickHouseã¯ãれをよã知ã£ã¦ã„ã‚‹ã®ã§ã€ã“ã®è¨­å®šã‚’使用ã—ãªã„ã§ãã ã•ã„)。 +- `volume_priority` — ボリュームãŒåŸ‹ã‚られる順åºï¼ˆå„ªå…ˆé †ä½ï¼‰ã‚’定義ã—ã¾ã™ã€‚低ã„値ã¯é«˜ã„優先度をæ„味ã—ã¾ã™ã€‚ã“ã®ãƒ‘ラメータã®å€¤ã¯è‡ªç„¶æ•°ã§ã‚ã‚Šã€ã‚¹ã‚­ãƒƒãƒ—ç„¡ã—ã«Nã¾ã§ã®ç¯„囲をカãƒãƒ¼ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆæœ€ã‚‚低ã„優先順ä½ãŒä¸Žãˆã‚‰ã‚ŒãŸã‚‚ã®ï¼‰ã€‚ + * ã™ã¹ã¦ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ãŒã‚¿ã‚°ä»˜ã‘ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãれらã¯æŒ‡å®šã•ã‚ŒãŸé †åºã§å„ªå…ˆã•ã‚Œã¾ã™ã€‚ + * 一部ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã®ã¿ãŒã‚¿ã‚°ä»˜ã‘ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãれらã¯ã‚¿ã‚°ã®ãªã„ボリュームã®æœ€ä½Žå„ªå…ˆé †ä½ã‚’æŒã¡ã€ãれらã¯è¨­å®šå†…ã§å®šç¾©ã•ã‚Œã¦ã„ã‚‹é †åºã«ãªã‚Šã¾ã™ã€‚ + * ã™ã¹ã¦ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ãŒã‚¿ã‚°ä»˜ã‘ã•ã‚Œã¦ã„ãªã„å ´åˆã€ãれらã®å„ªå…ˆåº¦ã¯è¨­å®šã§å®£è¨€ã•ã‚Œã¦ã„ã‚‹é †åºã«å¿œã˜ã¦è¨­å®šã•ã‚Œã¾ã™ã€‚ + * 2ã¤ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ãŒåŒã˜å„ªå…ˆåº¦ã®å€¤ã‚’æŒã¤ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +設定例: + +``` xml + + ... + + + + + disk1 + disk2 + + + + + + + + fast_ssd + 1073741824 + + + disk1 + + + 0.2 + + + + +
+ jbod1 +
+ + external + +
+
+
+ ... +
+``` + +ã“ã®ä¾‹ã§ã€`hdd_in_order`ãƒãƒªã‚·ãƒ¼ã¯[ラウンドロビン](https://en.wikipedia.org/wiki/Round-robin_scheduling)æ–¹å¼ã‚’実装ã—ã¦ã„ã¾ã™ã€‚よã£ã¦ã€ã“ã®ãƒãƒªã‚·ãƒ¼ã¯1ã¤ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ï¼ˆ`single`)ã®ã¿ã‚’定義ã—ã€ã“ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«ã¯å¾ªç’°çš„ã«ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツãŒä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“ã®ã‚ˆã†ãªãƒãƒªã‚·ãƒ¼ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã«è¤‡æ•°ã®é¡žä¼¼ãƒ‡ã‚£ã‚¹ã‚¯ãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„ã‚‹ãŒRAIDãŒæ§‹æˆã•ã‚Œã¦ã„ãªã„å ´åˆã«éžå¸¸ã«ä¾¿åˆ©ã§ã™ã€‚列個ã®ãƒ‡ã‚£ã‚¹ã‚¯ãƒ‰ãƒ©ã‚¤ãƒ–ã¯ä¿¡é ¼æ€§ãŒä½Žã„ã®ã§ã€3以上ã®ãƒ¬ãƒ—リケーションファクターã§ãれを補ã†ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +システムã«ç•°ãªã‚‹ç¨®é¡žã®ãƒ‡ã‚£ã‚¹ã‚¯ãŒã‚ã‚‹å ´åˆã€ä»£ã‚ã‚Šã«`moving_from_ssd_to_hdd`ãƒãƒªã‚·ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ボリューム`hot`ã¯SSDディスク(`fast_ssd`)ã‹ã‚‰æ§‹æˆã•ã‚Œã¦ãŠã‚Šã€ãã®æœ€å¤§ãƒ‘ートサイズã¯1GBã§ã™ã€‚1GBを超ãˆã‚‹ã‚µã‚¤ã‚ºã®ã™ã¹ã¦ã®ãƒ‘ートã¯ã€ç›´æŽ¥`cold`ボリューム(`disk1`ãŒHDDディスク)ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ +ã¾ãŸã€`fast_ssd`ディスクã®ã‚¹ãƒšãƒ¼ã‚¹ãŒ80%以上ã§åŸ‹ã¾ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセスã«ã‚ˆã£ã¦`disk1`ã«è»¢é€ã•ã‚Œã¾ã™ã€‚ +ストレージãƒãƒªã‚·ãƒ¼å†…ã§ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ åˆ—挙ã®é †åºã¯ã€å°‘ãªãã¨ã‚‚一ã¤ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«æ˜Žç¤ºçš„ãª`volume_priority`パラメータãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€é‡è¦ã§ã™ã€‚ã‚るボリュームãŒæº€æ¯ã«ãªã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯æ¬¡ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã¸ç§»å‹•ã—ã¾ã™ã€‚ディスク列挙ã®é †åºã‚‚é‡è¦ã§ã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã¯é †ç•ªã«è¨˜æ†¶ã•ã‚Œã¾ã™ã€‚ + +テーブルを作æˆã™ã‚‹éš›ã€è¨­å®šæ¸ˆã¿ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã®ä¸€ã¤ã‚’é©ç”¨ã§ãã¾ã™: + +``` sql +CREATE TABLE table_with_non_default_policy ( + EventDate Date, + OrderID UInt64, + BannerID UInt64, + SearchPhrase String +) ENGINE = MergeTree +ORDER BY (OrderID, BannerID) +PARTITION BY toYYYYMM(EventDate) +SETTINGS storage_policy = 'moving_from_ssd_to_hdd' +``` + +`default`ストレージãƒãƒªã‚·ãƒ¼ã¯ä¸€ã¤ã®ãƒ‡ã‚£ã‚¹ã‚¯ã®ã¿ã‚’用ã„る一ã¤ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’使用ã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚テーブル作æˆå¾Œã«ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã‚’[ALTER TABLE ... MODIFY SETTING]クエリã§å¤‰æ›´å¯èƒ½ã§ã€æ–°ãƒãƒªã‚·ãƒ¼ã«ã¯åŒã˜åå‰ã®å¤ã„ディスクã¨ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’å…¨ã¦å«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +データパーツã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ç§»å‹•ã‚’è¡Œã†ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã¯ã€[background_move_pool_size](/docs/ja/operations/server-configuration-parameters/settings.md/#background_move_pool_size)設定ã§å¤‰æ›´ã§ãã¾ã™ã€‚ + +### 詳細 {#details} + +`MergeTree`テーブルã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯ç•°ãªã‚‹æ–¹æ³•ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•ã‚Œã¾ã™ï¼š + +- インサートã®çµæžœã¨ã—ã¦ï¼ˆ`INSERT`クエリ)。 +- ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã®ãƒžãƒ¼ã‚¸ã‚„[変異](/docs/ja/sql-reference/statements/alter/index.md#alter-mutations)ã®é–“。 +- ä»–ã®ãƒ¬ãƒ—リカã‹ã‚‰ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰æ™‚。 +- パーティションã®å‡çµã®çµæžœã¨ã—ã¦[ALTER TABLE ... FREEZE PARTITION](/docs/ja/sql-reference/statements/alter/partition.md/#alter_freeze-partition)。 + +変異ã¨ãƒ‘ーティションã®å‡çµã‚’除ãä»–ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ãƒ‘ーツã¯æŒ‡å®šã•ã‚ŒãŸã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã«å¾“ã£ã¦ãƒœãƒªãƒ¥ãƒ¼ãƒ ãŠã‚ˆã³ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ä¿å­˜ã•ã‚Œã¾ã™ï¼š + +1. ディスクスペースãŒå分ã§(`unreserved_space > current_part_size`)ã‹ã¤æŒ‡å®šã‚µã‚¤ã‚ºã®ãƒ‘ーツをä¿å­˜ã§ãã‚‹(`max_data_part_size_bytes > current_part_size`)最åˆã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ãŒé¸ã°ã‚Œã¾ã™ã€‚ +2. ã“ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ å†…ã§ã¯ã€ä»¥å‰ä¿å­˜ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒãƒ£ãƒ³ã‚¯ã«ç¶šãディスクã‹ã¤ãƒ‘ーツサイズより自由スペースãŒå¤§ãã„(`unreserved_space - keep_free_space_bytes > current_part_size`)ディスクãŒé¸ã°ã‚Œã¾ã™ã€‚ + +内部ã§ã¯ã€å¤‰ç•°ã‚„パーティションã®å‡çµã¯[ãƒãƒ¼ãƒ‰ãƒªãƒ³ã‚¯](https://en.wikipedia.org/wiki/Hard_link)を使用ã—ã¾ã™ã€‚ç•°ãªã‚‹ãƒ‡ã‚£ã‚¹ã‚¯é–“ã®ãƒãƒ¼ãƒ‰ãƒªãƒ³ã‚¯ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ãã®ã‚ˆã†ãªå ´åˆã€çµæžœã¨ã—ã¦å¾—られるパーツã¯æœ€åˆã®ã‚‚ã®ã¨åŒã˜ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã€ãƒ‘ーツã¯è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«å®£è¨€ã•ã‚ŒãŸé †åºã«åŸºã¥ãã€è‡ªç”±ã‚¹ãƒšãƒ¼ã‚¹ã®é‡(`move_factor`パラメータ)ã«åŸºã¥ã„ã¦ãƒœãƒªãƒ¥ãƒ¼ãƒ é–“ã§ç§»å‹•ã•ã‚Œã¾ã™ã€‚データã¯æœ€å¾Œã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‹ã‚‰æœ€åˆã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«ã¯æ±ºã—ã¦ç§»ã•ã‚Œã¾ã›ã‚“。システムテーブル[system.part_log](/docs/ja/operations/system-tables/part_log.md/#system_tables-part-log)(フィールド`type = MOVE_PART`)ãŠã‚ˆã³[system.parts](/docs/ja/operations/system-tables/parts.md/#system_tables-parts)(フィールド`path`åŠã³`disk`)を使用ã—ã¦ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã®ç§»å‹•ã‚’監視ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ãªæƒ…å ±ã¯ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã«ã‚‚記録ã•ã‚Œã¾ã™ã€‚ + +ユーザーã¯ã‚¯ã‚¨ãƒª[ALTER TABLE ... MOVE PART\|PARTITION ... TO VOLUME\|DISK ...](/docs/ja/sql-reference/statements/alter/partition.md/#alter_move-partition)を使用ã—ã¦ã€ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‹ã‚‰ãƒœãƒªãƒ¥ãƒ¼ãƒ ã¸ã€ã‚ã‚‹ã„ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®ãƒ‘ーツやパーティションã®ç§»å‹•ã‚’強制ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作ã®åˆ¶é™ãŒè€ƒæ…®ã•ã‚Œã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯è‡ªèº«ã§ç§»å‹•ã‚’開始ã—ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作ã®å®Œäº†ã‚’å¾…ã¡ã¾ã›ã‚“。å分ãªç©ºãスペースãŒãªã„ã‹ã€å¿…è¦ãªæ¡ä»¶ãŒæº€ãŸã•ã‚Œãªã„å ´åˆã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +データã®ç§»å‹•ã¯ãƒ‡ãƒ¼ã‚¿ã®ãƒ¬ãƒ—リケーションã«å¹²æ¸‰ã—ã¾ã›ã‚“。ã—ãŸãŒã£ã¦ã€ç•°ãªã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã‚’åŒã˜ãƒ†ãƒ¼ãƒ–ルã®ç•°ãªã‚‹ãƒ¬ãƒ—リカã«æŒ‡å®šã§ãã¾ã™ã€‚ + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã®ãƒžãƒ¼ã‚¸ã‚„変異ãŒå®Œäº†ã—ãŸå¾Œã€å¤ã„パーツã¯ä¸€å®šæœŸé–“(`old_parts_lifetime`)を経ã¦ã‹ã‚‰ã®ã¿å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ã“ã®æ™‚間内ã€ã“れらã¯ä»–ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚„ディスクã«ã¯ç§»å‹•ã•ã‚Œã¾ã›ã‚“。ãã®ãŸã‚ã€ãƒ‘ーツãŒæœ€çµ‚çš„ã«å‰Šé™¤ã•ã‚Œã‚‹ã¾ã§ã€ãれらã¯ä¾ç„¶ã¨ã—ã¦ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã®è©•ä¾¡ã«è€ƒæ…®ã•ã‚Œã¾ã™ã€‚ + +ユーザーã¯ã€[JBOD](https://en.wikipedia.org/wiki/Non-RAID_drive_architectures)ボリュームã®ç•°ãªã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ã«å¯¾ã—ã¦ã€æ–°ã—ã„大ããªãƒ‘ーツをãƒãƒ©ãƒ³ã‚¹è‰¯ã割り当ã¦ã‚‹ã“ã¨ãŒã§ãã€[min_bytes_to_rebalance_partition_over_jbod](/docs/ja/operations/settings/merge-tree-settings.md/#min-bytes-to-rebalance-partition-over-jbod)設定を使用ã—ã¾ã™ã€‚ + +## 外部ストレージを用ã„ãŸãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ä½¿ç”¨ {#table_engine-mergetree-s3} + +[MergeTree](/docs/ja/engines/table-engines/mergetree-family/mergetree.md)ファミリーテーブルエンジンã¯ã€ã‚¿ã‚¤ãƒ—` s3`ã€` azure_blob_storage`ã€` hdfs`ã‚’æŒã¤ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’`S3`ã€`AzureBlobStorage`ã€`HDFS`ã«ä¿å­˜ã§ãã¾ã™ã€‚詳細ã¯[外部ストレージオプションã®è¨­å®š](/docs/ja/operations/storing-data.md/#configuring-external-storage)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +外部ストレージã¨ã—ã¦`S3`を使用ã™ã‚‹å ´åˆã®ä¾‹ï¼š + +設定マークアップ: +``` xml + + ... + + + s3 + true + https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/root-path/ + your_access_key_id + your_secret_access_key + +
Authorization: Bearer SOME-TOKEN
+ your_base64_encoded_customer_key + your_kms_key_id + your_kms_encryption_context + true + + http://proxy1 + http://proxy2 + + 10000 + 5000 + 10 + 4 + 1000 + /var/lib/clickhouse/disks/s3/ + false +
+ + cache + s3 + /var/lib/clickhouse/disks/s3_cache/ + 10Gi + +
+ ... +
+``` + +ã¾ãŸ[外部ストレージオプションã®è¨­å®š](/docs/ja/operations/storing-data.md/#configuring-external-storage)ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +:::note cache configuration +ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 22.3 ã‹ã‚‰ 22.7 ã¯ç•°ãªã‚‹ã‚­ãƒ£ãƒƒã‚·ãƒ¥è¨­å®šã‚’使用ã—ã¦ã„ã¾ã™ã€‚ã“れらã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã¯[ローカルキャッシュã®ä½¿ç”¨](/docs/ja/operations/storing-data.md/#using-local-cache)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## 仮想カラム {#virtual-columns} + +- `_part` — パーツã®åå‰ã€‚ +- `_part_index` — クエリçµæžœã§ã®ãƒ‘ーツã®é€£ç¶šã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚ +- `_partition_id` — パーティションã®åå‰ã€‚ +- `_part_uuid` — 一æ„ã®ãƒ‘ーツ識別å­ï¼ˆMergeTree設定`assign_part_uuids`ãŒæœ‰åŠ¹ãªå ´åˆï¼‰ã€‚ +- `_partition_value` — `partition by`å¼ã®å€¤ï¼ˆã‚¿ãƒ—ル)。 +- `_sample_factor` — サンプルファクター(クエリã‹ã‚‰ï¼‰ã€‚ +- `_block_number` — è¡Œã®ãƒ–ロック番å·ã€‚`allow_experimental_block_number_column`ãŒçœŸã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ãƒžãƒ¼ã‚¸ã§ä¿æŒã•ã‚Œã¾ã™ã€‚ + +## カラム統計 (エクスペリメンタル) {#column-statistics} + +統計ã®å®£è¨€ã¯`set allow_experimental_statistics = 1`を有効ã«ã—ãŸéš›ã€`*MergeTree*`ファミリーã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹`CREATE`クエリã®ã‚«ãƒ©ãƒ ã‚»ã‚¯ã‚·ãƒ§ãƒ³å†…ã«ã‚ã‚Šã¾ã™ã€‚ + +``` sql +CREATE TABLE tab +( + a Int64 STATISTICS(TDigest, Uniq), + b Float64 +) +ENGINE = MergeTree +ORDER BY a +``` + +統計ã¯`ALTER`文を使ã£ã¦æ“作ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +```sql +ALTER TABLE tab ADD STATISTICS b TYPE TDigest, Uniq; +ALTER TABLE tab DROP STATISTICS a; +``` + +ã“れらã®è»½é‡ãªçµ±è¨ˆã¯ã‚«ãƒ©ãƒ å†…ã®å€¤ã®åˆ†å¸ƒã«é–¢ã™ã‚‹æƒ…報を集約ã—ã¾ã™ã€‚統計ã¯å„パーツã«ä¿å­˜ã•ã‚Œã€å„インサートãŒè¡Œã‚れるãŸã³ã«æ›´æ–°ã•ã‚Œã¾ã™ã€‚ +`set allow_statistics_optimize = 1`を有効ã«ã™ã‚Œã°ã€ãƒ—レウェア最é©åŒ–ã«ã®ã¿ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +### カラム統計ã®åˆ©ç”¨å¯èƒ½ãªã‚¿ã‚¤ãƒ— {#available-types-of-column-statistics} + +- `MinMax` + + 数値カラムã®ç¯„囲フィルターã®é¸æŠžæ€§ã‚’推定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ã‚«ãƒ©ãƒ å€¤ã€‚ + + 構文: `minmax` + +- `TDigest` + + 数値カラムã«å¯¾ã—ã¦ãŠãŠã‚ˆãã®ç™¾åˆ†ä½æ•°ï¼ˆä¾‹ï¼š90パーセンタイル)を計算ã™ã‚‹ãŸã‚ã®[TDigest](https://github.com/tdunning/t-digest)スケッãƒã€‚ + + 構文: `tdigest` + +- `Uniq` + + カラムãŒå«ã‚€ç•°ãªã‚‹å€¤ã®æ•°ã‚’推定ã™ã‚‹ãŸã‚ã®[HyperLogLog](https://en.wikipedia.org/wiki/HyperLogLog)スケッãƒã€‚ + + 構文: `uniq` + +- `CountMin` + + カラム内ã®å„値ã®é »åº¦ã‚’ãŠãŠã‚ˆãカウントã™ã‚‹[CountMin](https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch)スケッãƒã€‚ + + 構文: `countmin` + +### サãƒãƒ¼ãƒˆã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ {#supported-data-types} + +| | (U)Int*, Float*, Decimal(*), Date*, Boolean, Enum* | String or FixedString | +|-----------|----------------------------------------------------|-----------------------| +| CountMin | ✔ | ✔ | +| MinMax | ✔ | ✗ | +| TDigest | ✔ | ✗ | +| Uniq | ✔ | ✔ | + +### サãƒãƒ¼ãƒˆã•ã‚Œã‚‹æ“作 {#supported-operations} + +| | Equality filters (==) | Range filters (>, >=, <, <=) | +|-----------|-----------------------|------------------------------| +| CountMin | ✔ | ✗ | +| MinMax | ✗ | ✔ | +| TDigest | ✗ | ✔ | +| Uniq | ✔ | ✗ | + +## カラムレベルã®è¨­å®š {#column-level-settings} + +特定ã®MergeTree設定ã¯ã‚«ãƒ©ãƒ ãƒ¬ãƒ™ãƒ«ã§ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰å¯èƒ½ã§ã™ï¼š + +- `max_compress_block_size` — テーブルã¸ã®æ›¸ãè¾¼ã¿æ™‚ã«åœ§ç¸®ã•ã‚Œã‚‹å‰ã®éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ +- `min_compress_block_size` — 次ã®ãƒžãƒ¼ã‚¯ã®æ›¸ãè¾¼ã¿æ™‚ã«åœ§ç¸®ãŒå¿…è¦ãªéžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®æœ€å°ã‚µã‚¤ã‚ºã€‚ + +例: + +```sql +CREATE TABLE tab +( + id Int64, + document String SETTINGS (min_compress_block_size = 16777216, max_compress_block_size = 16777216) +) +ENGINE = MergeTree +ORDER BY id +``` + +カラムレベルã®è¨­å®šã¯[ALTER MODIFY COLUMN](/docs/ja/sql-reference/statements/alter/column.md)を使用ã—ã¦ä¿®æ­£ã¾ãŸã¯å‰Šé™¤ã§ãã¾ã™ã€ä¾‹ï¼š + +- カラム宣言ã‹ã‚‰`SETTINGS`を削除: + +```sql +ALTER TABLE tab MODIFY COLUMN document REMOVE SETTINGS; +``` + +- 設定を修正: + +```sql +ALTER TABLE tab MODIFY COLUMN document MODIFY SETTING min_compress_block_size = 8192; +``` + +- 一ã¤ã¾ãŸã¯è¤‡æ•°ã®è¨­å®šã‚’リセットã—ã€ãƒ†ãƒ¼ãƒ–ルã®`CREATE`クエリã§ã®ã‚«ãƒ©ãƒ è¡¨ç¾å†…ã®è¨­å®šå®£è¨€ã‚‚削除: + +```sql +ALTER TABLE tab MODIFY COLUMN document RESET SETTING min_compress_block_size; +``` diff --git a/docs/ja/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/ja/engines/table-engines/mergetree-family/replacingmergetree.md new file mode 100644 index 00000000000..2d5351903ad --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/replacingmergetree.md @@ -0,0 +1,214 @@ +--- +slug: /ja/engines/table-engines/mergetree-family/replacingmergetree +sidebar_position: 40 +sidebar_label: ReplacingMergeTree +--- + +# ReplacingMergeTree + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€[MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md#table_engines-mergetree)ã¨ç•°ãªã‚Šã€åŒã˜[ソートキー](../../../engines/table-engines/mergetree-family/mergetree.md)ã®å€¤ã‚’æŒã¤é‡è¤‡ã‚¨ãƒ³ãƒˆãƒªã‚’削除ã—ã¾ã™ï¼ˆ`PRIMARY KEY`ã§ã¯ãªãã€ãƒ†ãƒ¼ãƒ–ルã®`ORDER BY`セクション)。 + +データã®é‡è¤‡æŽ’除ã¯ãƒžãƒ¼ã‚¸ã®éš›ã«ã®ã¿ç™ºç”Ÿã—ã¾ã™ã€‚マージã¯èƒŒæ™¯ã§ä¸æ˜Žãªæ™‚点ã§ç™ºç”Ÿã™ã‚‹ãŸã‚ã€è¨ˆç”»ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。一部ã®ãƒ‡ãƒ¼ã‚¿ã¯æœªå‡¦ç†ã®ã¾ã¾æ®‹ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚`OPTIMIZE`クエリを使用ã—ã¦äºˆå®šå¤–ã®ãƒžãƒ¼ã‚¸ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿æ›¸ãã™ã‚‹ãŸã‚ã€ã“ã‚Œã«ä¾å­˜ã—ãªã„ã§ãã ã•ã„。 + +ã—ãŸãŒã£ã¦ã€`ReplacingMergeTree`ã¯é‡è¤‡ãƒ‡ãƒ¼ã‚¿ã‚’背景ã§å‰Šé™¤ã—ã€ã‚¹ãƒšãƒ¼ã‚¹ã‚’節約ã™ã‚‹ã®ã«é©ã—ã¦ã„ã¾ã™ãŒã€é‡è¤‡ãŒå­˜åœ¨ã—ãªã„ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +:::note +ReplacingMergeTreeã®è©³ç´°ã‚¬ã‚¤ãƒ‰ã«ã¯ãƒ™ã‚¹ãƒˆãƒ—ラクティスやパフォーマンスã®æœ€é©åŒ–方法もå«ã¾ã‚Œã¦ãŠã‚Šã€[ã“ã¡ã‚‰](/docs/ja/guides/replacing-merge-tree)ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ +::: + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE = ReplacingMergeTree([ver [, is_deleted]]) +[PARTITION BY expr] +[ORDER BY expr] +[PRIMARY KEY expr] +[SAMPLE BY expr] +[SETTINGS name=value, ...] +``` + +リクエストパラメータã®èª¬æ˜Žã«ã¤ã„ã¦ã¯ã€[ステートメントã®èª¬æ˜Ž](../../../sql-reference/statements/create/table.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +:::note +è¡Œã®ä¸€æ„性ã¯`PRIMARY KEY`ã§ã¯ãªãã€ãƒ†ãƒ¼ãƒ–ルã®`ORDER BY`セクションã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã¾ã™ã€‚ +::: + +## ReplacingMergeTree パラメーター + +### ver + +`ver` — ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’æŒã¤ã‚«ãƒ©ãƒ ã€‚タイプ㯠`UInt*`ã€`Date`ã€`DateTime`ã¾ãŸã¯`DateTime64`ã§ã™ã€‚オプションã®ãƒ‘ラメーターã§ã™ã€‚ + +マージ時ã«ã€`ReplacingMergeTree`ã¯åŒã˜ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’æŒã¤è¡Œã®ä¸­ã‹ã‚‰1ã¤ã ã‘を残ã—ã¾ã™ï¼š + +- `ver`ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€é¸æŠžã•ã‚ŒãŸã‚‚ã®ã®æœ€å¾Œã®ã‚‚ã®ã€‚é¸æŠžã¯ã€ãƒžãƒ¼ã‚¸ã«å‚加ã—ã¦ã„るパーツã®é›†åˆã‹ã‚‰ãªã‚‹è¡Œã®é›†åˆã§ã™ã€‚最も最近ã«ä½œæˆã•ã‚ŒãŸãƒ‘ーツ(最後ã®æŒ¿å…¥ï¼‰ãŒé¸æŠžã®æœ€å¾Œã«ãªã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€é‡è¤‡å‡¦ç†å¾Œã€æœ€ã‚‚最近ã®æŒ¿å…¥ã‹ã‚‰æ¥ã‚‹æœ€å¾Œã®è¡ŒãŒå„ユニークãªã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã«æ®‹ã‚Šã¾ã™ã€‚ +- `ver`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€æœ€å¤§ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ã‚‚ã—複数ã®è¡Œã§`ver`ãŒåŒã˜ã§ã‚ã‚Œã°ã€ã€Œ`ver`ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã®ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•ã‚Œã¾ã™ã€ã™ãªã‚ã¡ã€æœ€ã‚‚最近ã«æŒ¿å…¥ã•ã‚ŒãŸè¡ŒãŒæ®‹ã‚Šã¾ã™ã€‚ + +例: + +```sql +-- verãªã— - 最後ã«æŒ¿å…¥ã•ã‚ŒãŸè¡ŒãŒæ®‹ã‚‹ +CREATE TABLE myFirstReplacingMT +( + `key` Int64, + `someCol` String, + `eventTime` DateTime +) +ENGINE = ReplacingMergeTree +ORDER BY key; + +INSERT INTO myFirstReplacingMT Values (1, 'first', '2020-01-01 01:01:01'); +INSERT INTO myFirstReplacingMT Values (1, 'second', '2020-01-01 00:00:00'); + +SELECT * FROM myFirstReplacingMT FINAL; + +┌─key─┬─someCol─┬───────────eventTime─┠+│ 1 │ second │ 2020-01-01 00:00:00 │ +└─────┴─────────┴─────────────────────┘ + + +-- ver使用 - 最大ã®verã‚’æŒã¤è¡ŒãŒæ®‹ã‚‹ +CREATE TABLE mySecondReplacingMT +( + `key` Int64, + `someCol` String, + `eventTime` DateTime +) +ENGINE = ReplacingMergeTree(eventTime) +ORDER BY key; + +INSERT INTO mySecondReplacingMT Values (1, 'first', '2020-01-01 01:01:01'); +INSERT INTO mySecondReplacingMT Values (1, 'second', '2020-01-01 00:00:00'); + +SELECT * FROM mySecondReplacingMT FINAL; + +┌─key─┬─someCol─┬───────────eventTime─┠+│ 1 │ first │ 2020-01-01 01:01:01 │ +└─────┴─────────┴─────────────────────┘ +``` + +### is_deleted + +`is_deleted` — ã“ã®è¡Œã®ãƒ‡ãƒ¼ã‚¿ãŒçŠ¶æ…‹ã‚’表ã—ã¦ã„ã‚‹ã‹å‰Šé™¤ã•ã‚Œã‚‹ã¹ãã‹ã‚’決定ã™ã‚‹ãŸã‚ã«ãƒžãƒ¼ã‚¸ä¸­ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã®åå‰ï¼š`1`ã¯"削除"ã•ã‚ŒãŸè¡Œã€`0`ã¯"状態"ã®è¡Œã€‚ + +カラムデータ型 — `UInt8`。 + +:::note +`is_deleted`ã¯`ver`を使用ã—ã¦ã„ã‚‹å ´åˆã«ã®ã¿æœ‰åŠ¹ã«ã§ãã¾ã™ã€‚ + +è¡Œã¯`OPTIMIZE ... FINAL CLEANUP`ã§ã®ã¿å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ã“ã®`CLEANUP`特別キーワードã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€`allow_experimental_replacing_merge_with_cleanup` MergeTree設定を有効ã«ã™ã‚‹ã¨ä½¿ç”¨ã§ãã¾ã™ã€‚ + +データã«å¯¾ã™ã‚‹æ“作ãŒä½•ã§ã‚ã‚Œã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯å¢—加ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。åŒã˜ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’æŒã¤äºŒã¤ã®æŒ¿å…¥ã•ã‚ŒãŸè¡ŒãŒã‚ã‚‹å ´åˆã€æœ€å¾Œã«æŒ¿å…¥ã•ã‚ŒãŸè¡ŒãŒæ®‹ã‚Šã¾ã™ã€‚ + +::: + +例: +```sql +-- verã¨is_deleted㧠+CREATE OR REPLACE TABLE myThirdReplacingMT +( + `key` Int64, + `someCol` String, + `eventTime` DateTime, + `is_deleted` UInt8 +) +ENGINE = ReplacingMergeTree(eventTime, is_deleted) +ORDER BY key +SETTINGS allow_experimental_replacing_merge_with_cleanup = 1; + +INSERT INTO myThirdReplacingMT Values (1, 'first', '2020-01-01 01:01:01', 0); +INSERT INTO myThirdReplacingMT Values (1, 'first', '2020-01-01 01:01:01', 1); + +select * from myThirdReplacingMT final; + +0 rows in set. Elapsed: 0.003 sec. + +-- is_deletedã‚’æŒã¤è¡Œã‚’削除 +OPTIMIZE TABLE myThirdReplacingMT FINAL CLEANUP; + +INSERT INTO myThirdReplacingMT Values (1, 'first', '2020-01-01 00:00:00', 0); + +select * from myThirdReplacingMT final; + +┌─key─┬─someCol─┬───────────eventTime─┬─is_deleted─┠+│ 1 │ first │ 2020-01-01 00:00:00 │ 0 │ +└─────┴─────────┴─────────────────────┴────────────┘ +``` + +## クエリã®æ¡é … + +`ReplacingMergeTree`テーブルを作æˆã™ã‚‹éš›ã«ã¯ã€`MergeTree`テーブルを作æˆã™ã‚‹å ´åˆã¨åŒã˜[æ¡é …](../../../engines/table-engines/mergetree-family/mergetree.md)ãŒå¿…è¦ã§ã™ã€‚ + +
+ +éžæŽ¨å¥¨ã®ãƒ†ãƒ¼ãƒ–ル作æˆæ–¹æ³• + +:::note +æ–°ã—ã„プロジェクトã§ã¯ã“ã®æ–¹æ³•ã‚’使用ã›ãšã€å¯èƒ½ã§ã‚ã‚Œã°å¤ã„プロジェクトを上記ã®æ–¹æ³•ã«åˆ‡ã‚Šæ›¿ãˆã¦ãã ã•ã„。 +::: + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE [=] ReplacingMergeTree(date-column [, sampling_expression], (primary, key), index_granularity, [ver]) +``` + +`ver`を除ãã™ã¹ã¦ã®ãƒ‘ラメーターã¯ã€`MergeTree`ã®å ´åˆã¨åŒã˜æ„味をæŒã¡ã¾ã™ã€‚ + +- `ver` - ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æŒã¤ã‚«ãƒ©ãƒ ã€‚オプションã®ãƒ‘ラメーター。説明ã«ã¤ã„ã¦ã¯ä¸Šè¨˜ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’ã”覧ãã ã•ã„。 + +
+ +## クエリ時間ã®é‡è¤‡æŽ’除 & FINAL + +マージ時ã«ã€ReplacingMergeTreeã¯`ORDER BY`カラムã®å€¤ã‚’ユニークãªè­˜åˆ¥å­ã¨ã—ã¦ä½¿ç”¨ã—ã¦é‡è¤‡è¡Œã‚’識別ã—ã€æœ€é«˜ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã¿ã‚’ä¿æŒã—ã¾ã™ã€‚ã—ã‹ã—ãªãŒã‚‰ã€ã“ã‚Œã¯äº‹å¾Œçš„ã«æ­£ã—ã•ã‚’æä¾›ã™ã‚‹ã®ã¿ã§ã‚ã‚Šã€è¡ŒãŒé‡è¤‡æŽ’除ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ã‚‚ã®ã§ã¯ãªã„ãŸã‚ã€ã“ã‚Œã«é ¼ã‚‹ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã—ãŸãŒã£ã¦ã€ã‚¯ã‚¨ãƒªã¯å•é¡ŒãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€é©åˆ‡ãªå›žç­”ã‚’å¾—ã‚‹ãŸã‚ã«ã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã®ãƒžãƒ¼ã‚¸ã¨ã‚¯ã‚¨ãƒªæ™‚é–“ã§ã®é‡è¤‡æŽ’除ã¨å‰Šé™¤ã®æŽ’除を補完ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯`FINAL`演算å­ã‚’使用ã—ã¦å¯èƒ½ã§ã™ã€‚以下ã®ä¾‹ã‚’考ãˆã¦ã¿ã¦ãã ã•ã„: + +```sql +CREATE TABLE rmt_example +( + `number` UInt16 +) +ENGINE = ReplacingMergeTree +ORDER BY number + +INSERT INTO rmt_example SELECT floor(randUniform(0, 100)) AS number +FROM numbers(1000000000) + +0 rows in set. Elapsed: 19.958 sec. Processed 1.00 billion rows, 8.00 GB (50.11 million rows/s., 400.84 MB/s.) +``` +`FINAL`ãªã—ã§ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã¨ã€ä¸æ­£ç¢ºãªæ•°ãŒå‡ºåŠ›ã•ã‚Œã¾ã™ï¼ˆæ­£ç¢ºãªçµæžœã¯ãƒžãƒ¼ã‚¸çŠ¶æ³ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ï¼‰ï¼š + +```sql +SELECT count() +FROM rmt_example + +┌─count()─┠+│ 200 │ +└─────────┘ + +1 row in set. Elapsed: 0.002 sec. +``` + +`FINAL`を追加ã™ã‚‹ã¨ã€æ­£ã—ã„çµæžœãŒå¾—られã¾ã™ï¼š + +```sql +SELECT count() +FROM rmt_example +FINAL + +┌─count()─┠+│ 100 │ +└─────────┘ + +1 row in set. Elapsed: 0.002 sec. +``` + +`FINAL`ãŠã‚ˆã³ãã®æœ€é©åŒ–方法ã«ã¤ã„ã¦ã‚ˆã‚Šè©³ç´°ãªæƒ…å ±ã¯ã€[ReplacingMergeTreeã®è©³ç´°ã‚¬ã‚¤ãƒ‰](/docs/ja/guides/replacing-merge-tree)ã‚’å‚ç…§ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ diff --git a/docs/ja/engines/table-engines/mergetree-family/replication.md b/docs/ja/engines/table-engines/mergetree-family/replication.md new file mode 100644 index 00000000000..4527ab0fc42 --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/replication.md @@ -0,0 +1,349 @@ +--- +slug: /ja/engines/table-engines/mergetree-family/replication +sidebar_position: 20 +sidebar_label: Data Replication +--- + +# データレプリケーション + +:::note +ClickHouse Cloudã§ã¯ã€ãƒ¬ãƒ—リケーションã¯è‡ªå‹•ã§ç®¡ç†ã•ã‚Œã¾ã™ã€‚テーブルを作æˆã™ã‚‹éš›ã€å¼•æ•°ã‚’追加ã›ãšã«è¡Œã£ã¦ãã ã•ã„。例ãˆã°ã€ä»¥ä¸‹ã®ä¾‹ã§ã¯æ¬¡ã®ã‚ˆã†ã«ç½®ãæ›ãˆã¦ãã ã•ã„: + +```sql +ENGINE = ReplicatedMergeTree( + '/clickhouse/tables/{shard}/table_name', + '{replica}', + ver +) +``` + +次ã®ã‚ˆã†ã«ï¼š + +```sql +ENGINE = ReplicatedMergeTree +``` +::: + +レプリケーションã¯ã€MergeTreeファミリーã®ãƒ†ãƒ¼ãƒ–ルã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼š + +- ReplicatedMergeTree +- ReplicatedSummingMergeTree +- ReplicatedReplacingMergeTree +- ReplicatedAggregatingMergeTree +- ReplicatedCollapsingMergeTree +- ReplicatedVersionedCollapsingMergeTree +- ReplicatedGraphiteMergeTree + +レプリケーションã¯ã€ã‚µãƒ¼ãƒå…¨ä½“ã§ã¯ãªãã€å€‹åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルレベルã§å‹•ä½œã—ã¾ã™ã€‚1ã¤ã®ã‚µãƒ¼ãƒã¯ã€ãƒ¬ãƒ—リケートテーブルã¨éžãƒ¬ãƒ—リケートテーブルã®ä¸¡æ–¹ã‚’åŒæ™‚ã«ä¿å­˜ã§ãã¾ã™ã€‚ + +レプリケーションã¯ã‚·ãƒ£ãƒ¼ãƒ‰ã«ã¯ä¾å­˜ã—ã¾ã›ã‚“。å„シャードã¯ç‹¬è‡ªã®ãƒ¬ãƒ—リケーションをæŒã£ã¦ã„ã¾ã™ã€‚ + +`INSERT` ã‚„ `ALTER` クエリã®åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã¯ãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ï¼ˆè©³ç´°ã¯ã€[ALTER](/docs/ja/sql-reference/statements/alter/index.md#query_language_queries_alter)ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +`CREATE`ã€`DROP`ã€`ATTACH`ã€`DETACH`ã€`RENAME` クエリã¯å˜ä¸€ã®ã‚µãƒ¼ãƒã§å®Ÿè¡Œã•ã‚Œã€ãƒ¬ãƒ—リケートã•ã‚Œã¾ã›ã‚“: + +- `CREATE TABLE` クエリã¯ã€ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã‚µãƒ¼ãƒä¸Šã«æ–°ã—ã„レプリケートå¯èƒ½ãªãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルãŒä»–ã®ã‚µãƒ¼ãƒä¸Šã«æ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€æ–°ã—ã„レプリカを追加ã—ã¾ã™ã€‚ +- `DROP TABLE` クエリã¯ã€ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã‚µãƒ¼ãƒä¸Šã«ã‚るレプリカを削除ã—ã¾ã™ã€‚ +- `RENAME` クエリã¯ã€ãƒ¬ãƒ—リカã®1ã¤ä¸Šã§ãƒ†ãƒ¼ãƒ–ルåを変更ã—ã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€ãƒ¬ãƒ—リケートテーブルã¯ç•°ãªã‚‹ãƒ¬ãƒ—リカã«ç•°ãªã‚‹åå‰ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouseã¯ã€ãƒ¬ãƒ—リカã®ãƒ¡ã‚¿æƒ…報をä¿å­˜ã™ã‚‹ãŸã‚ã« [ClickHouse Keeper](/docs/ja/guides/sre/keeper/index.md) を使用ã—ã¾ã™ã€‚ZooKeeperãƒãƒ¼ã‚¸ãƒ§ãƒ³3.4.5以é™ã®åˆ©ç”¨ã‚‚å¯èƒ½ã§ã™ãŒã€ClickHouse Keeperã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +レプリケーションを使用ã™ã‚‹ã«ã¯ã€[zookeeper](/docs/ja/operations/server-configuration-parameters/settings.md/#server-settings_zookeeper)ã®ã‚µãƒ¼ãƒè¨­å®šã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ãƒ‘ラメータを設定ã—ã¦ãã ã•ã„。 + +:::note +セキュリティ設定を軽視ã—ãªã„ã§ãã ã•ã„。ClickHouseã¯ZooKeeperセキュリティサブシステム㮠`digest` [ACLスキーム](https://zookeeper.apache.org/doc/current/zookeeperProgrammers.html#sc_ZooKeeperAccessControl)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +::: + +ClickHouse Keeperクラスタã®ã‚¢ãƒ‰ãƒ¬ã‚¹è¨­å®šä¾‹ï¼š + +``` xml + + + example1 + 2181 + + + example2 + 2181 + + + example3 + 2181 + + +``` + +ClickHouseã¯ã¾ãŸã€è£œåŠ©ZooKeeperクラスタã«ãƒ¬ãƒ—リカã®ãƒ¡ã‚¿æƒ…報をä¿å­˜ã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚エンジンã®å¼•æ•°ã¨ã—ã¦ZooKeeperクラスタåã¨ãƒ‘スをæä¾›ã™ã‚‹ã“ã¨ã§ã“れを行ã„ã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’ç•°ãªã‚‹ZooKeeperクラスタã«ä¿å­˜ã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +補助ZooKeeperクラスタã®ã‚¢ãƒ‰ãƒ¬ã‚¹è¨­å®šä¾‹ï¼š + +``` xml + + + + example_2_1 + 2181 + + + example_2_2 + 2181 + + + example_2_3 + 2181 + + + + + example_3_1 + 2181 + + + +``` + +デフォルトã®ZooKeeperクラスタã®ä»£ã‚ã‚Šã«è£œåŠ©ZooKeeperクラスタã«ãƒ†ãƒ¼ãƒ–ルメタデータをä¿å­˜ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã« SQL を使ã£ã¦ ReplicatedMergeTree エンジンã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +CREATE TABLE table_name ( ... ) ENGINE = ReplicatedMergeTree('zookeeper_name_configured_in_auxiliary_zookeepers:path', 'replica_name') ... +``` +既存ã®ZooKeeperクラスタを指定ã™ã‚‹ã“ã¨ã§ã€ã‚·ã‚¹ãƒ†ãƒ ã¯ãã“ã§è‡ªåˆ†ã®ãƒ‡ãƒ¼ã‚¿ç”¨ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’使ã„ã¾ã™ï¼ˆãƒ¬ãƒ—リケートå¯èƒ½ãªãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹éš›ã«ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãŒæŒ‡å®šã•ã‚Œã¾ã™ï¼‰ã€‚ + +ZooKeeperãŒè¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«è¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ¬ãƒ—リケートテーブルを作æˆã™ã‚‹ã“ã¨ã¯ã§ããšã€æ—¢å­˜ã®ãƒ¬ãƒ—リケートテーブルã¯èª­ã¿å–り専用ã«ãªã‚Šã¾ã™ã€‚ + +`SELECT` クエリã§ã¯ZooKeeperã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。レプリケーション㯠`SELECT` ã®ãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆãšã€éžãƒ¬ãƒ—リケーションテーブルã¨åŒã˜é€Ÿã•ã§ã‚¯ã‚¨ãƒªãŒå®Ÿè¡Œã•ã‚Œã¾ã™ã€‚分散レプリケートテーブルをクエリã™ã‚‹éš›ã€ClickHouseã®å‹•ä½œã¯[max_replica_delay_for_distributed_queries](/docs/ja/operations/settings/settings.md/#max_replica_delay_for_distributed_queries)ãŠã‚ˆã³[fallback_to_stale_replicas_for_distributed_queries](/docs/ja/operations/settings/settings.md/#fallback_to_stale_replicas_for_distributed_queries)ã®è¨­å®šã§åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ + +å„ `INSERT` クエリã”ã¨ã«ã€ãŠã‚ˆã10件ã®ã‚¨ãƒ³ãƒˆãƒªãŒè¤‡æ•°ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’介ã—ã¦ZooKeeperã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚(より正確ã«ã¯ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥ã•ã‚ŒãŸå„ブロックã”ã¨ã§ã™ã€‚`INSERT` クエリã¯ä¸€ã¤ã®ãƒ–ロックã€ã¾ãŸã¯ `max_insert_block_size = 1048576` è¡Œã”ã¨ã«ä¸€ã¤ã®ãƒ–ロックをå«ã¿ã¾ã™ã€‚)ã“ã‚Œã¯ã€éžãƒ¬ãƒ—リケートテーブルã¨æ¯”較ã—㦠`INSERT` ã®é…延をã‚ãšã‹ã«é•·ãã—ã¾ã™ã€‚ãŸã ã—ã€1秒ã‚ãŸã‚Š1ã¤ã® `INSERT` を超ãˆãªã„ãƒãƒƒãƒã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ã„ã†æŽ¨å¥¨äº‹é …ã«å¾“ã†ã¨å•é¡Œã¯ã‚ã‚Šã¾ã›ã‚“。1ã¤ã®ZooKeeperクラスタã§èª¿æ•´ã•ã‚Œã‚‹ClickHouseクラスタ全体ã§ã€1秒ã‚ãŸã‚Šæ•°ç™¾ã® `INSERT` ãŒè¡Œã‚ã‚Œã¾ã™ã€‚データ挿入ã®ã‚¹ãƒ«ãƒ¼ãƒ—ット(1秒ã‚ãŸã‚Šã®è¡Œæ•°ï¼‰ã¯ã€éžãƒ¬ãƒ—リケートデータã®å ´åˆã¨åŒã˜ãらã„高ã„ã§ã™ã€‚ + +éžå¸¸ã«å¤§ããªã‚¯ãƒ©ã‚¹ã‚¿ã®å ´åˆã€ç•°ãªã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã§ç•°ãªã‚‹ZooKeeperクラスタを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã—ã‹ã—ã€ã“ã‚Œã¾ã§ã®çµŒé¨“上ã€ã“ã‚Œã¯ç´„300サーãƒã®æœ¬ç•ªã‚¯ãƒ©ã‚¹ã‚¿ã§å¿…è¦ã§ã‚ã‚‹ã¨ã¯è¨¼æ˜Žã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +レプリケーションã¯éžåŒæœŸã§ãƒžãƒ«ãƒãƒžã‚¹ã‚¿ãƒ¼ã§ã™ã€‚`INSERT` クエリ(ãŠã‚ˆã³ `ALTER`)ã¯åˆ©ç”¨å¯èƒ½ãªä»»æ„ã®ã‚µãƒ¼ãƒã«é€ä¿¡ã§ãã¾ã™ã€‚データã¯ã‚¯ã‚¨ãƒªãŒå®Ÿè¡Œã•ã‚ŒãŸã‚µãƒ¼ãƒã«æŒ¿å…¥ã•ã‚Œã€æ¬¡ã«ä»–ã®ã‚µãƒ¼ãƒã«ã‚³ãƒ”ーã•ã‚Œã¾ã™ã€‚éžåŒæœŸã§ã‚ã‚‹ãŸã‚ã€æ–°ãŸã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒä»–ã®ãƒ¬ãƒ—リカã«è¡¨ç¤ºã•ã‚Œã‚‹ã«ã¯ã„ãらã‹ã®é…延ãŒã‚ã‚Šã¾ã™ã€‚一部ã®ãƒ¬ãƒ—リカãŒåˆ©ç”¨ä¸å¯ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯åˆ©ç”¨å¯èƒ½ã«ãªã£ãŸéš›ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚レプリカãŒåˆ©ç”¨å¯èƒ½ãªå ´åˆã€é…延ã¯åœ§ç¸®ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ–ロックをãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã«è»¢é€ã™ã‚‹ã®ã«ã‹ã‹ã‚‹æ™‚é–“ã§ã™ã€‚レプリケートテーブルã«ãŠã„ã¦ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¿ã‚¹ã‚¯ã‚’実行ã™ã‚‹ãŸã‚ã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã¯ã€[background_schedule_pool_size](/docs/ja/operations/server-configuration-parameters/settings.md/#background_schedule_pool_size)設定ã§è¨­å®šã§ãã¾ã™ã€‚ + +`ReplicatedMergeTree` エンジンã¯ã€ãƒ¬ãƒ—リケートフェッãƒç”¨ã«åˆ¥ã®ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールを使用ã—ã¾ã™ã€‚プールã®ã‚µã‚¤ã‚ºã¯ã‚µãƒ¼ãƒã‚’å†èµ·å‹•ã—ã¦èª¿æ•´å¯èƒ½ãª[background_fetches_pool_size](/docs/ja/operations/settings/settings.md/#background_fetches_pool_size)設定ã«ã‚ˆã£ã¦åˆ¶é™ã•ã‚Œã¾ã™ã€‚ + +デフォルトã§ã¯ã€`INSERT` クエリã¯1ã¤ã®ãƒ¬ãƒ—リカã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿æ›¸ãè¾¼ã¿ç¢ºèªã‚’å¾…ã¡ã¾ã™ã€‚ã‚‚ã—データãŒ1ã¤ã®ãƒ¬ãƒ—リカã«ã®ã¿æ­£å¸¸ã«æ›¸ãè¾¼ã¾ã‚Œã€ãã®ãƒ¬ãƒ—リカã®ã‚るサーãƒãŒæ¶ˆå¤±ã—ãŸå ´åˆã€ä¿å­˜ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯å¤±ã‚ã‚Œã¾ã™ã€‚複数ã®ãƒ¬ãƒ—リカã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿æ›¸ãè¾¼ã¿ç¢ºèªã‚’å¾—ã‚‹ã«ã¯ã€`insert_quorum` オプションを使用ã—ã¾ã™ã€‚ + +å„データブロックã¯åŽŸå­çš„ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚`INSERT` クエリã¯`max_insert_block_size = 1048576` è¡Œã¾ã§ã®ãƒ–ロックã«åˆ†ã‘られã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€`INSERT` クエリãŒ1048576行未満ã®å ´åˆã€ãã‚Œã¯åŽŸå­çš„ã«è¡Œã‚ã‚Œã¾ã™ã€‚ + +データブロックã¯é‡è¤‡å‰Šé™¤ã•ã‚Œã¾ã™ã€‚åŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®è¤‡æ•°å›žã®æ›¸ãè¾¼ã¿ï¼ˆåŒã˜è¡ŒãŒåŒã˜é †åºã§å«ã¾ã‚Œã‚‹åŒã˜ã‚µã‚¤ã‚ºã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロック)ã§ã¯ã€ãƒ–ロックã¯1回ã ã‘書ãè¾¼ã¾ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯éšœå®³ãŒç™ºç”Ÿã—ãŸå ´åˆã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションãŒãƒ‡ãƒ¼ã‚¿ãŒDBã«æ›¸ãè¾¼ã¾ã‚ŒãŸã‹ã©ã†ã‹ä¸æ˜Žãªã¨ãã«ã€`INSERT` クエリをå˜ã«å†å®Ÿè¡Œã§ãるよã†ã«ã™ã‚‹ãŸã‚ã§ã™ã€‚åŒã˜ãƒ‡ãƒ¼ã‚¿ã® `INSERT` ã¯ã©ã®ãƒ¬ãƒ—リカã«é€ä¿¡ã•ã‚Œã¦ã‚‚å•é¡Œã‚ã‚Šã¾ã›ã‚“。`INSERT` ã¯å†ªç­‰ã§ã™ã€‚é‡è¤‡å‰Šé™¤ã®ãƒ‘ラメータã¯[merge_tree](/docs/ja/operations/server-configuration-parameters/settings.md/#merge_tree)サーãƒè¨­å®šã§åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ + +レプリケーション中ã«ã¯æŒ¿å…¥ã™ã‚‹å…ƒãƒ‡ãƒ¼ã‚¿ã®ã¿ãŒãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã«è»¢é€ã•ã‚Œã¾ã™ã€‚データã®ã•ã‚‰ãªã‚‹å¤‰æ›ï¼ˆãƒžãƒ¼ã‚¸ï¼‰ã¯ã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§åŒæ§˜ã«èª¿æ•´ã•ã‚Œã€å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä½¿ç”¨ãŒæœ€å°é™ã«æŠ‘ãˆã‚‰ã‚Œã€ãƒ¬ãƒ—リカãŒç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼ã«å­˜åœ¨ã™ã‚‹å ´åˆã§ã‚‚レプリケーションãŒã†ã¾ã機能ã—ã¾ã™ã€‚(異ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼ã§ã®ãƒ‡ãƒ¼ã‚¿ã®è¤‡è£½ãŒãƒ¬ãƒ—リケーションã®ä¸»ãªç›®çš„ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。) + +åŒã˜ãƒ‡ãƒ¼ã‚¿ã®ãƒ¬ãƒ—リカを任æ„ã®æ•°ã ã‘æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚我々ã®çµŒé¨“上ã§ã¯ã€æ¯”較的信頼性ãŒã‚り便利ãªè§£æ±ºç­–ã¯ã€å„サーãƒã«RAID-5ã¾ãŸã¯RAID-6(場åˆã«ã‚ˆã£ã¦ã¯RAID-10)を使用ã—ã¦ã€æœ¬ç•ªç’°å¢ƒã§äºŒé‡ãƒ¬ãƒ—リケーションを使用ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +システムã¯ãƒ¬ãƒ—リカ上ã®ãƒ‡ãƒ¼ã‚¿ã®åŒæœŸæ€§ã‚’監視ã—ã€éšœå®³å¾Œã®ãƒªã‚«ãƒãƒªãŒå¯èƒ½ã§ã™ã€‚フェイルオーãƒãƒ¼ã¯è‡ªå‹•ï¼ˆãƒ‡ãƒ¼ã‚¿ã®å°ã•ãªå·®ã®å ´åˆï¼‰ã¾ãŸã¯åŠè‡ªå‹•ï¼ˆãƒ‡ãƒ¼ã‚¿ãŒéžå¸¸ã«ç•°ãªã‚‹å ´åˆã€ã“ã‚Œã¯è¨­å®šã‚¨ãƒ©ãƒ¼ã‚’示ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼‰ã§ã™ã€‚ + +## レプリケートテーブルã®ä½œæˆ {#creating-replicated-tables} + +:::note +ClickHouse Cloudã§ã¯ã€ãƒ¬ãƒ—リケーションã¯è‡ªå‹•ã§ç®¡ç†ã•ã‚Œã¾ã™ã€‚テーブルを作æˆã™ã‚‹éš›ã€å¼•æ•°ã‚’追加ã›ãšã«ä½œæˆã—ã¦ãã ã•ã„。例ãˆã°ã€ä»¥ä¸‹ã®ä¾‹ã§ã¯æ¬¡ã®ã‚ˆã†ã«ç½®ãæ›ãˆã¦ãã ã•ã„: +``` +ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/table_name', '{replica}', ver) +``` +次ã®ã‚ˆã†ã«ï¼š +``` +ENGINE = ReplicatedMergeTree +``` +::: + +テーブルエンジンåã®ãƒ—レフィックス㫠`Replicated` を追加ã—ã¾ã™ã€‚例ãˆã°ï¼š`ReplicatedMergeTree`。 + +:::tip +ClickHouse Cloudã§ã¯ã€ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŒãƒ¬ãƒ—リケートã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€`Replicated` を追加ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +### Replicated\*MergeTree パラメータ + +#### zoo_path + +`zoo_path` — ClickHouse Keeper内ã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒ‘ス。 + +#### replica_name + +`replica_name` — ClickHouse Keeper内ã®ãƒ¬ãƒ—リカå。 + +#### other_parameters + +`other_parameters` — レプリケートãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’作æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¨ãƒ³ã‚¸ãƒ³ã®ãƒ‘ラメータ。例ãˆã°ã€`ReplacingMergeTree` 内ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãªã©ã€‚ + +例: + +``` sql +CREATE TABLE table_name +( + EventDate DateTime, + CounterID UInt32, + UserID UInt32, + ver UInt16 +) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/table_name', '{replica}', ver) +PARTITION BY toYYYYMM(EventDate) +ORDER BY (CounterID, EventDate, intHash32(UserID)) +SAMPLE BY intHash32(UserID); +``` + +
+ +旧構文ã®ä¾‹ + +``` sql +CREATE TABLE table_name +( + EventDate DateTime, + CounterID UInt32, + UserID UInt32 +) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/table_name', '{replica}', EventDate, intHash32(UserID), (CounterID, EventDate, intHash32(UserID), EventTime), 8192); +``` + +
+ +例ã«ç¤ºã—ãŸã‚ˆã†ã«ã€ã“れらã®ãƒ‘ラメータã¯æ³¢æ‹¬å¼§ã§å›²ã¾ã‚ŒãŸç½®æ›ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ç½®æ›ã•ã‚ŒãŸå€¤ã¯ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®[macros](/docs/ja/operations/server-configuration-parameters/settings.md/#macros)セクションã‹ã‚‰å–å¾—ã•ã‚Œã¾ã™ã€‚ + +例: + +``` xml + + 02 + example05-02-1 + +``` + +ClickHouse Keeper内ã§ã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒ‘スã¯ã€å„レプリケートテーブルã”ã¨ã«ãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ç•°ãªã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã®ãƒ†ãƒ¼ãƒ–ルã¯ç•°ãªã‚‹ãƒ‘スをæŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ‘スã¯æ¬¡ã®éƒ¨åˆ†ã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ï¼š + +`/clickhouse/tables/` ã¯å…±é€šã®ãƒ—レフィックスã§ã™ã€‚ã“ã‚Œã¨ã¾ã£ãŸãåŒã˜ã‚‚ã®ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +`{shard}` ã¯ã‚·ãƒ£ãƒ¼ãƒ‰è­˜åˆ¥å­ã«å±•é–‹ã•ã‚Œã¾ã™ã€‚ + +`table_name` ã¯ã€ClickHouse Keeper内ã®ãƒ†ãƒ¼ãƒ–ル用ノードã®åå‰ã§ã™ã€‚ã“ã‚Œã¯ãƒ†ãƒ¼ãƒ–ルåã¨åŒã˜ã«ã™ã‚‹ã®ãŒè‰¯ã„考ãˆã§ã™ã€‚ã“ã‚Œã¯æ˜Žç¤ºçš„ã«å®šç¾©ã•ã‚Œã¦ãŠã‚Šã€RENAMEクエリ後ã«ãƒ†ãƒ¼ãƒ–ルåãŒå¤‰ã‚らãªã„ãŸã‚ã§ã™ã€‚ +*ヒント*: `table_name` ã®å‰ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åを追加ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚例:`db_name.table_name` + +組ã¿è¾¼ã¿ã®ç½®æ› `{database}` ãŠã‚ˆã³ `{table}` を使用ã™ã‚‹ã“ã¨ãŒã§ãã€ã“れらã¯ãã‚Œãžã‚Œãƒ†ãƒ¼ãƒ–ルåã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã«å±•é–‹ã•ã‚Œã¾ã™ï¼ˆã“れらã®ãƒžã‚¯ãƒ­ãŒ `macros` セクションã§å®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã‚’除ã)。ã—ãŸãŒã£ã¦ã€zookeeperã®ãƒ‘ス㯠`'/clickhouse/tables/{shard}/{database}/{table}'` ã¨æŒ‡å®šã§ãã¾ã™ã€‚ +ã“れらã®çµ„ã¿è¾¼ã¿ã®ç½®æ›ã‚’使用ã™ã‚‹éš›ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®åå‰å¤‰æ›´ã«æ³¨æ„ã—ã¦ãã ã•ã„。ClickHouse Keeper内ã®ãƒ‘スã¯å¤‰æ›´ã§ããšã€ãƒ†ãƒ¼ãƒ–ルãŒåå‰ã‚’変更ã™ã‚‹ã¨ã€ãƒžã‚¯ãƒ­ã¯ç•°ãªã‚‹ãƒ‘スã«å±•é–‹ã•ã‚Œã€ãƒ†ãƒ¼ãƒ–ルã¯ClickHouse Keeperã«å­˜åœ¨ã—ãªã„パスを示ã—ã€èª­ã¿å–り専用モードã«ãªã‚Šã¾ã™ã€‚ + +レプリカåã¯åŒã˜ãƒ†ãƒ¼ãƒ–ルã®ç•°ãªã‚‹ãƒ¬ãƒ—リカを識別ã—ã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã‚µãƒ¼ãƒåを使用ã—ã¦ã„ã¾ã™ã€‚ã“ã®åå‰ã¯å„シャード内ã§ãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +å°è¦æ¨¡ãªã‚¯ãƒ©ã‚¹ã‚¿ã®æ§‹æˆã‚„テストã«ã¯ã€ç½®æ›ã‚’使用ã›ãšã«ãƒ‘ラメータを明示的ã«å®šç¾©ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã§ã™ãŒã€ã“ã®å ´åˆã€åˆ†æ•£DDLクエリ(`ON CLUSTER`)を使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +大è¦æ¨¡ã‚¯ãƒ©ã‚¹ã‚¿ã§ä½œæ¥­ã™ã‚‹å ´åˆã€èª¤ã‚Šã®å¯èƒ½æ€§ã‚’減らã™ãŸã‚ã«ç½®æ›ã®ä½¿ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +サーãƒè¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§ `Replicated` テーブルエンジンã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå¼•æ•°ã‚’指定ã§ãã¾ã™ã€‚例ãˆã°ï¼š + +```xml +/clickhouse/tables/{shard}/{database}/{table} +{replica} +``` + +ã“ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã®ä½œæˆæ™‚ã«å¼•æ•°ã‚’çœç•¥ã§ãã¾ã™ï¼š + +``` sql +CREATE TABLE table_name ( + x UInt32 +) ENGINE = ReplicatedMergeTree +ORDER BY x; +``` + +ã“ã‚Œã¯æ¬¡ã¨åŒç­‰ã§ã™ï¼š + +``` sql +CREATE TABLE table_name ( + x UInt32 +) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/{database}/table_name', '{replica}') +ORDER BY x; +``` + +`CREATE TABLE` クエリをå„レプリカã§å®Ÿè¡Œã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯æ–°ã—ã„レプリケートテーブルを作æˆã™ã‚‹ã‹ã€æ—¢å­˜ã®ãƒ†ãƒ¼ãƒ–ルã«æ–°ã—ã„レプリカを追加ã—ã¾ã™ã€‚ + +ä»–ã®ãƒ¬ãƒ—リカ上ã«æ—¢ã«ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„るテーブルã«æ–°ã—ã„レプリカを追加ã™ã‚‹å ´åˆã¯ã€ã‚¯ã‚¨ãƒªã‚’実行ã—ãŸå¾Œã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ãŒæ–°ã—ã„レプリカã«ã‚³ãƒ”ーã•ã‚Œã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€æ–°ã—ã„レプリカã¯ä»–ã®ãƒ¬ãƒ—リカã¨åŒæœŸã•ã‚Œã¾ã™ã€‚ + +レプリカを削除ã™ã‚‹ã«ã¯ã€`DROP TABLE` を実行ã—ã¾ã™ã€‚ãŸã ã—ã€å‰Šé™¤ã•ã‚Œã‚‹ã®ã¯ã‚¯ã‚¨ãƒªã‚’実行ã—ãŸã‚µãƒ¼ãƒä¸Šã®ãƒ¬ãƒ—リカã ã‘ã§ã™ã€‚ + +## 障害後ã®ãƒªã‚«ãƒãƒª {#recovery-after-failures} + +ClickHouse KeeperãŒåˆ©ç”¨ã§ããªã„å ´åˆã€ãƒ¬ãƒ—リケートテーブルã¯èª­ã¿å–り専用モードã«åˆ‡ã‚Šæ›¿ã‚ã‚Šã¾ã™ã€‚システムã¯å®šæœŸçš„ã«ClickHouse Keeperã¸ã®æŽ¥ç¶šã‚’試ã¿ã¾ã™ã€‚ + +`INSERT` 中ã«ClickHouse KeeperãŒåˆ©ç”¨ã§ããªã„å ´åˆã€ã¾ãŸã¯ClickHouse Keeperã¨ã®ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ã‚·ãƒ§ãƒ³ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +ClickHouse Keeperã¨ã®æŽ¥ç¶šå¾Œã€ã‚·ã‚¹ãƒ†ãƒ ã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ å†…ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒæœŸå¾…ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆï¼ˆClickHouse KeeperãŒã“ã®æƒ…報をä¿å­˜ã—ã¦ã„ã¾ã™ï¼‰ã¨ä¸€è‡´ã™ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚å°ã•ãªä¸ä¸€è‡´ãŒã‚ã‚‹å ´åˆã€ã‚·ã‚¹ãƒ†ãƒ ã¯ãれらをレプリカã¨åŒæœŸã•ã›ã¦è§£æ±ºã—ã¾ã™ã€‚ + +システムãŒç ´æã—ãŸãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ï¼ˆãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚µã‚¤ã‚ºãŒé–“é•ã£ã¦ã„ã‚‹ã‚‚ã®ï¼‰ã‚„未確èªã®éƒ¨åˆ†ï¼ˆãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«æ›¸ãè¾¼ã¾ã‚ŒãŸãŒClickHouse Keeperã«ã¯è¨˜éŒ²ã•ã‚Œã¦ã„ãªã„部分)を検出ã—ãŸå ´åˆã€ãれらを `detached` サブディレクトリã«ç§»å‹•ã—ã¾ã™ï¼ˆå‰Šé™¤ã¯ã•ã‚Œã¾ã›ã‚“)。ä¸æ˜Žãªéƒ¨åˆ†ã¯ãƒ¬ãƒ—リカã‹ã‚‰ã‚³ãƒ”ーã•ã‚Œã¾ã™ã€‚ + +ClickHouseã¯å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿å‰Šé™¤ã‚’自動ã§è¡Œã†ã‚ˆã†ãªç ´å£Šçš„ãªæ“作を行ã„ã¾ã›ã‚“。 + +サーãƒãŒèµ·å‹•ã™ã‚‹éš›ï¼ˆã¾ãŸã¯ClickHouse Keeperã¨ã®æ–°ã—ã„セッションを確立ã™ã‚‹éš›ï¼‰ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®é‡ã¨ã‚µã‚¤ã‚ºã®ã¿ãŒãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ファイルサイズãŒä¸€è‡´ã—ã¦ã„ã¦ã‚‚中間ã®ãƒã‚¤ãƒˆãŒå¤‰æ›´ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã‚Œã¯ã™ãã«ã¯æ¤œå‡ºã•ã‚Œãšã€`SELECT` クエリã§ãƒ‡ãƒ¼ã‚¿ã‚’読む際ã«éžä¸€è‡´ã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚„圧縮ブロックã®ã‚µã‚¤ã‚ºã«ã¤ã„ã¦ã®ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã¯æ¤œè¨¼ã‚­ãƒ¥ãƒ¼ã«è¿½åŠ ã•ã‚Œã€å¿…è¦ã§ã‚ã‚Œã°ãƒ¬ãƒ—リカã‹ã‚‰ã‚³ãƒ”ーã•ã‚Œã¾ã™ã€‚ + +ローカルã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒæœŸå¾…値ã¨å¤§ããç•°ãªã‚‹å ´åˆã€å®‰å…¨æ©Ÿæ§‹ãŒä½œå‹•ã—ã¾ã™ã€‚サーãƒã¯ã“れをログã«è¨˜éŒ²ã—ã€èµ·å‹•ã‚’æ‹’å¦ã—ã¾ã™ã€‚ã“ã®ç†ç”±ã¯ã€ã“ã®å ´åˆãŒè¨­å®šã‚¨ãƒ©ãƒ¼ã‚’示ã™å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ãŸã¨ãˆã°ã€ã‚るシャードã®ãƒ¬ãƒ—リカãŒèª¤ã£ã¦ç•°ãªã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã¨ã—ã¦è¨­å®šã•ã‚ŒãŸå ´åˆã§ã™ã€‚ã—ã‹ã—ã€ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã®ã—ãã„値ã¯ã‹ãªã‚Šä½Žã設定ã•ã‚Œã¦ãŠã‚Šã€é€šå¸¸ã®éšœå®³å¾©æ—§ä¸­ã«ã“ã®çŠ¶æ³ãŒç™ºç”Ÿã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯åŠè‡ªå‹•çš„ã«ã€ã™ãªã‚ã¡ã€Œãƒœã‚¿ãƒ³ã‚’押ã™ã€ã¨ã„ã†æ‰‹æ®µã§å¾©æ—§ã•ã‚Œã¾ã™ã€‚ + +復旧を開始ã™ã‚‹ã«ã¯ã€ClickHouse Keeperã«ä»¥ä¸‹ã®ãƒŽãƒ¼ãƒ‰ã‚’ä»»æ„ã®å†…容ã§ä½œæˆã™ã‚‹ã‹ã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リケートテーブルを復元ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¦ãã ã•ã„: + +``` bash +sudo -u clickhouse touch /var/lib/clickhouse/flags/force_restore_data +``` + +ãã®å¾Œã€ã‚µãƒ¼ãƒã‚’å†èµ·å‹•ã—ã¾ã™ã€‚起動後ã€ã‚µãƒ¼ãƒã¯ã“れらã®ãƒ•ãƒ©ã‚°ã‚’削除ã—ã€å¾©æ—§ã‚’開始ã—ã¾ã™ã€‚ + +## データã®å®Œå…¨æ¶ˆå¤±å¾Œã®å¾©æ—§ {#recovery-after-complete-data-loss} + +ã‚るサーãƒã‹ã‚‰ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã¨ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒæ¶ˆå¤±ã—ãŸå ´åˆã€æ¬¡ã®ã‚¹ãƒ†ãƒƒãƒ—ã§å¾©æ—§ã‚’è¡Œã„ã¾ã™ï¼š + +1. ClickHouseをサーãƒã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¾ã™ã€‚シャード識別å­ã¨ãƒ¬ãƒ—リカãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãれらãŒç½®æ›ã•ã‚Œã‚‹ã‚ˆã†ã«è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’æ­£ã—ã定義ã—ã¾ã™ã€‚ +2. サーãƒã«æ‰‹å‹•ã§è¤‡è£½ã•ã‚ŒãŸéžãƒ¬ãƒ—リケートテーブルãŒã‚ã£ãŸå ´åˆã€ãれらã®ãƒ‡ãƒ¼ã‚¿ã‚’コピーã—ã¾ã™ï¼ˆã“ã“ã§ã€ãƒ¬ãƒ—リカã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¯ `/var/lib/clickhouse/data/db_name/table_name/` ã§ã™ï¼‰ã€‚ +3. メタデータディレクトリ内㮠`/var/lib/clickhouse/metadata/` ファイルã‹ã‚‰ãƒ†ãƒ¼ãƒ–ル定義をコピーã—ã¾ã™ã€‚シャードã¾ãŸã¯ãƒ¬ãƒ—リカ識別å­ãŒãƒ†ãƒ¼ãƒ–ル定義内ã§æ˜Žç¤ºçš„ã«å®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ã“れをã“ã®ãƒ¬ãƒ—リカã«å¯¾å¿œã™ã‚‹ã‚ˆã†ã«ä¿®æ­£ã—ã¾ã™ã€‚(ã‚ã‚‹ã„ã¯ã€ã‚µãƒ¼ãƒã‚’開始ã—ã¦ã€/var/lib/clickhouse/metadata/ 内ã®.sqlファイルã«å«ã¾ã‚Œã‚‹ã¹ã`ATTACH TABLE` クエリをã™ã¹ã¦å®Ÿè¡Œã—ã¾ã™ã€‚) +4. 復旧を開始ã™ã‚‹ã«ã¯ã€ClickHouse Keeperã«ä»¥ä¸‹ã®ãƒŽãƒ¼ãƒ‰ã‚’ä»»æ„ã®å†…容ã§ä½œæˆã™ã‚‹ã‹ã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リケートテーブルを復元ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¦ãã ã•ã„: `sudo -u clickhouse touch /var/lib/clickhouse/flags/force_restore_data` + +ãã®å¾Œã€ã‚µãƒ¼ãƒã‚’開始(既ã«å®Ÿè¡Œä¸­ã®å ´åˆã¯å†èµ·å‹•ï¼‰ã—ã¾ã™ã€‚データã¯ãƒ¬ãƒ—リカã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +別ã®å¾©æ—§ã‚ªãƒ—ションã¨ã—ã¦ã€å¤±ã‚ã‚ŒãŸãƒ¬ãƒ—リカã«ã¤ã„ã¦ã®æƒ…報をClickHouse Keeperã‹ã‚‰å‰Šé™¤ï¼ˆ`/path_to_table/replica_name`)ã€æ¬¡ã« "[レプリケートテーブルã®ä½œæˆ](#creating-replicated-tables)"ã§è¨˜è¿°ã•ã‚Œã¦ã„るよã†ã«ãƒ¬ãƒ—リカをå†ä½œæˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +復旧中ã«ã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å¸¯åŸŸå¹…ã®åˆ¶é™ã¯ã‚ã‚Šã¾ã›ã‚“。多ãã®ãƒ¬ãƒ—リカを一度ã«å¾©æ—§ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã“ã‚Œã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +## MergeTreeã‹ã‚‰ReplicatedMergeTreeã¸ã®å¤‰æ› {#converting-from-mergetree-to-replicatedmergetree} + +`MergeTree` ã¯ã€ã™ã¹ã¦ã® `MergeTree ファミリー` テーブルエンジンを指ã™ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ReplicatedMergeTreeã«ã¤ã„ã¦ã‚‚åŒæ§˜ã§ã™ã€‚ + +手動ã§ãƒ¬ãƒ—リケートã•ã‚ŒãŸ`MergeTree` テーブルãŒã‚ã£ãŸå ´åˆã€ãƒ¬ãƒ—リケートテーブルã«å¤‰æ›ã§ãã¾ã™ã€‚ã“ã‚Œã¯å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ãŒæ—¢ã« `MergeTree` テーブルã«é›†ã‚られã¦ã„ã¦ãƒ¬ãƒ—リケーションを有効ã«ã—ãŸã„å ´åˆã«å¿…è¦ãªã“ã¨ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +`MergeTree` テーブルã¯ã€ãƒ†ãƒ¼ãƒ–ルデータディレクトリ㮠`convert_to_replicated` フラグãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚µãƒ¼ãƒã®å†èµ·å‹•æ™‚ã«è‡ªå‹•çš„ã«å¤‰æ›ã•ã‚Œã¾ã™ï¼ˆ`Atomic` データベースã®å ´åˆã¯ `/store/xxx/xxxyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/`)。 +空㮠`convert_to_replicated` ファイルを作æˆã™ã‚‹ã¨ã€æ¬¡å›žã‚µãƒ¼ãƒã®å†èµ·å‹•æ™‚ã«ãƒ†ãƒ¼ãƒ–ルã¯ãƒ¬ãƒ—リケートã•ã‚ŒãŸã‚‚ã®ã¨ã—ã¦èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ + +ã“ã®ã‚¯ã‚¨ãƒªã¯ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãƒ‘スをå–å¾—ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚テーブルã«å¤šãã®ãƒ‡ãƒ¼ã‚¿ãƒ‘スãŒã‚ã‚‹å ´åˆã€æœ€åˆã®ã‚‚ã®ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +SELECT data_paths FROM system.tables WHERE table = 'table_name' AND database = 'database_name'; +``` + +`ReplicatedMergeTree` テーブル㯠`default_replica_path` 㨠`default_replica_name` ã®è¨­å®šå€¤ã§ä½œæˆã•ã‚Œã¾ã™ã€‚ä»–ã®ãƒ¬ãƒ—リカã§å¤‰æ›ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã«ã¯ã€ãã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ‘スを `ReplicatedMergeTree` エンジンã®æœ€åˆã®å¼•æ•°ã«æ˜Žç¤ºçš„ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚次ã®ã‚¯ã‚¨ãƒªã‚’使ã£ã¦ãã®ãƒ‘スをå–å¾—ã§ãã¾ã™ã€‚ + +```sql +SELECT zookeeper_path FROM system.replicas WHERE table = 'table_name'; +``` + +サーãƒå†èµ·å‹•ãªã—ã«æ‰‹å‹•ã§è¡Œã†æ–¹æ³•ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +データãŒæ§˜ã€…ãªãƒ¬ãƒ—リカã§ç•°ãªã‚‹å ´åˆã€ã¾ãšãれをåŒæœŸã™ã‚‹ã‹ã€ã‚るレプリカã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚ + +既存㮠MergeTree テーブルã®åå‰ã‚’変更ã—ã€ãã®å¤ã„åå‰ã§ `ReplicatedMergeTree` テーブルを作æˆã—ã¾ã™ã€‚ +å¤ã„テーブルã‹ã‚‰æ–°ã—ã„テーブルã®ãƒ‡ãƒ¼ã‚¿ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã® `detached` サブディレクトリã«ãƒ‡ãƒ¼ã‚¿ã‚’移動ã—ã¾ã™ï¼ˆã“ã“ã§ã€ãƒ‘ス㯠`/var/lib/clickhouse/data/db_name/table_name/` ã§ã™ï¼‰ã€‚ +ãã®å¾Œã€1ã¤ã®ãƒ¬ãƒ—リカ㧠`ALTER TABLE ATTACH PARTITION` を実行ã—ã¦ã€ã“れらã®ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã‚’作業セットã«è¿½åŠ ã—ã¾ã™ã€‚ + +## ReplicatedMergeTreeã‹ã‚‰MergeTreeã¸ã®å¤‰æ› {#converting-from-replicatedmergetree-to-mergetree} + +ç•°ãªã‚‹åå‰ã§MergeTreeテーブルを作æˆã—ã¾ã™ã€‚`ReplicatedMergeTree` テーブルデータã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’æ–°ã—ã„テーブルã®ãƒ‡ãƒ¼ã‚¿ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ç§»å‹•ã—ã¾ã™ã€‚ãã®å¾Œã€`ReplicatedMergeTree` テーブルを削除ã—ã€ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã—ã¾ã™ã€‚ + +`ReplicatedMergeTree` テーブルをサーãƒãƒ¼ã®èµ·å‹•ãªã—ã«å‰Šé™¤ã—ãŸã„å ´åˆï¼š + +- メタデータディレクトリã®å¯¾å¿œã™ã‚‹ `.sql` ファイルを削除ã—ã¾ã™ï¼ˆ `/var/lib/clickhouse/metadata/`)。 +- ClickHouse Keeperã§å¯¾å¿œã™ã‚‹ãƒ‘スを削除ã—ã¾ã™ï¼ˆ `/path_to_table/replica_name`)。 + +ãã®å¾Œã€ã‚µãƒ¼ãƒãƒ¼ã‚’èµ·å‹•ã—ã€`MergeTree` テーブルを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’ãã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ç§»å‹•ã—ã€ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã—ã¾ã™ã€‚ + +## ClickHouse Keeper クラスタ内ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒç ´æ・消失ã—ãŸå ´åˆã®ãƒªã‚«ãƒãƒª {#recovery-when-metadata-in-the-zookeeper-cluster-is-lost-or-damaged} + +ClickHouse Keeper内ã®ãƒ‡ãƒ¼ã‚¿ãŒå¤±ã‚ã‚ŒãŸã‹ç ´æã—ãŸå ´åˆã€ä¸Šè¿°ã®æ–¹æ³•ã«å¾“ã„ã€ãƒ‡ãƒ¼ã‚¿ã‚’éžãƒ¬ãƒ—リケートテーブルã«ç§»å‹•ã™ã‚‹ã“ã¨ã§ãƒ‡ãƒ¼ã‚¿ã‚’ä¿ç®¡ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**関連項目** + +- [background_schedule_pool_size](/docs/ja/operations/server-configuration-parameters/settings.md/#background_schedule_pool_size) +- [background_fetches_pool_size](/docs/ja/operations/server-configuration-parameters/settings.md/#background_fetches_pool_size) +- [execute_merges_on_single_replica_time_threshold](/docs/ja/operations/settings/settings.md/#execute-merges-on-single-replica-time-threshold) +- [max_replicated_fetches_network_bandwidth](/docs/ja/operations/settings/merge-tree-settings.md/#max_replicated_fetches_network_bandwidth) +- [max_replicated_sends_network_bandwidth](/docs/ja/operations/settings/merge-tree-settings.md/#max_replicated_sends_network_bandwidth) + diff --git a/docs/ja/engines/table-engines/mergetree-family/summingmergetree.md b/docs/ja/engines/table-engines/mergetree-family/summingmergetree.md new file mode 100644 index 00000000000..db4b640cdf6 --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/summingmergetree.md @@ -0,0 +1,192 @@ +--- +slug: /ja/engines/table-engines/mergetree-family/summingmergetree +sidebar_position: 50 +sidebar_label: SummingMergeTree +--- + +# SummingMergeTree + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€[MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md#table_engines-mergetree)ã‹ã‚‰ç¶™æ‰¿ã•ã‚Œã¦ã„ã¾ã™ã€‚é•ã„ã¯ã€`SummingMergeTree`テーブルã«ãŠã„ã¦ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツをマージã™ã‚‹éš›ã€ClickHouseã¯ã™ã¹ã¦ã®ä¸»ã‚­ãƒ¼ï¼ˆã‚ˆã‚Šæ­£ç¢ºã«ã¯[ソートキー](../../../engines/table-engines/mergetree-family/mergetree.md))ãŒåŒã˜è¡Œã‚’数値データ型ã®ã‚«ãƒ©ãƒ ã«ãŠã‘ã‚‹è¦ç´„値をå«ã‚€ä¸€ã¤ã®è¡Œã§ç½®ãæ›ãˆã‚‹ã“ã¨ã§ã™ã€‚å˜ä¸€ã®ã‚­ãƒ¼ã®å€¤ãŒå¤šãã®è¡Œã«å¯¾å¿œã™ã‚‹ã‚ˆã†ãªã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã«ã‚ˆã£ã¦æ§‹æˆã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã‚Œã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®å®¹é‡ã‚’大幅ã«å‰Šæ¸›ã—ã€ãƒ‡ãƒ¼ã‚¿é¸æŠžã‚’高速化ã—ã¾ã™ã€‚ + +エンジンを`MergeTree`ã¨å…±ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚完全ãªãƒ‡ãƒ¼ã‚¿ã¯`MergeTree`テーブルã«ä¿å­˜ã—ã€é›†ç´„データã®ä¿å­˜ã«ã¯`SummingMergeTree`を使用ã—ã¾ã™ã€‚例ãˆã°ã€ãƒ¬ãƒãƒ¼ãƒˆã‚’作æˆã™ã‚‹éš›ã«ã“ã®ã‚ˆã†ãªã‚¢ãƒ—ローãƒã‚’採用ã™ã‚‹ã“ã¨ã§ã€èª¤ã£ãŸä¸»ã‚­ãƒ¼ã®è¨­å®šã«ã‚ˆã‚‹è²´é‡ãªãƒ‡ãƒ¼ã‚¿ã®æ失を防ãŽã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE = SummingMergeTree([columns]) +[PARTITION BY expr] +[ORDER BY expr] +[SAMPLE BY expr] +[SETTINGS name=value, ...] +``` + +リクエストパラメータã®è©³ç´°ã«ã¤ã„ã¦ã¯[リクエストã®èª¬æ˜Ž](../../../sql-reference/statements/create/table.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### SummingMergeTreeã®ãƒ‘ラメータ + +#### columns + +`columns` - è¦ç´„ã•ã‚Œã‚‹å€¤ã®ã‚«ãƒ©ãƒ åã®ã‚¿ãƒ—ル。オプションã®ãƒ‘ラメータ。 +カラムã¯æ•°å€¤åž‹ã§ã‚ã‚Šã€ä¸»ã‚­ãƒ¼ã«å«ã¾ã‚Œã¦ã¯ãªã‚Šã¾ã›ã‚“。 + +`columns`ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯ä¸»ã‚­ãƒ¼ã«å«ã¾ã‚Œã¦ã„ãªã„ã™ã¹ã¦ã®æ•°å€¤ãƒ‡ãƒ¼ã‚¿åž‹ã®ã‚«ãƒ©ãƒ ã®å€¤ã‚’è¦ç´„ã—ã¾ã™ã€‚ + +### ã‚¯ã‚¨ãƒªå¥ + +`SummingMergeTree` テーブルを作æˆã™ã‚‹éš›ã«ã¯ã€`MergeTree` テーブルを作æˆã™ã‚‹å ´åˆã¨åŒã˜[å¥](../../../engines/table-engines/mergetree-family/mergetree.md)ãŒå¿…è¦ã§ã™ã€‚ + +
+ +éžæŽ¨å¥¨ã®ãƒ†ãƒ¼ãƒ–ル作æˆæ–¹æ³• + +:::note +æ–°ã—ã„プロジェクトã§ã¯ã“ã®æ–¹æ³•ã‚’使用ã›ãšã€å¯èƒ½ãªã‚‰æ—¢å­˜ã®ãƒ—ロジェクトを上記ã®æ–¹æ³•ã«å¤‰æ›´ã—ã¦ãã ã•ã„。 +::: + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE [=] SummingMergeTree(date-column [, sampling_expression], (primary, key), index_granularity, [columns]) +``` + +`columns`を除ãã™ã¹ã¦ã®ãƒ‘ラメータã¯ã€`MergeTree`ã«ãŠã‘ã‚‹æ„味ã¨åŒã˜ã§ã™ã€‚ + +- `columns` — è¦ç´„ã•ã‚Œã‚‹å€¤ã®ã‚«ãƒ©ãƒ åã®ã‚¿ãƒ—ル。オプションã®ãƒ‘ラメータ。説明ã«ã¤ã„ã¦ã¯ä¸Šè¨˜ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +
+ +## 使用例 {#usage-example} + +次ã®ãƒ†ãƒ¼ãƒ–ルを考ãˆã¾ã™: + +``` sql +CREATE TABLE summtt +( + key UInt32, + value UInt32 +) +ENGINE = SummingMergeTree() +ORDER BY key +``` + +データを挿入ã—ã¾ã™: + +``` sql +INSERT INTO summtt Values(1,1),(1,2),(2,1) +``` + +ClickHouseã¯ã™ã¹ã¦ã®è¡Œã‚’完全ã«ã¯åˆè¨ˆã—ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆ[以下をå‚ç…§](#data-processing))ã€ãã®ãŸã‚クエリ内ã§é›†è¨ˆé–¢æ•°`sum`ã¨`GROUP BY`å¥ã‚’使用ã—ã¾ã™ã€‚ + +``` sql +SELECT key, sum(value) FROM summtt GROUP BY key +``` + +``` text +┌─key─┬─sum(value)─┠+│ 2 │ 1 │ +│ 1 │ 3 │ +└─────┴────────────┘ +``` + +## ãƒ‡ãƒ¼ã‚¿å‡¦ç† {#data-processing} + +データãŒãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€ãã®ã¾ã¾ä¿å­˜ã•ã‚Œã¾ã™ã€‚ClickHouseã¯å®šæœŸçš„ã«ãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥éƒ¨åˆ†ã‚’マージã—ã€ã“ã®ã¨ãåŒã˜ä¸»ã‚­ãƒ¼ã‚’æŒã¤è¡ŒãŒåˆè¨ˆã•ã‚Œã€ãã‚Œãžã‚Œã®æœ€çµ‚çš„ãªãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã«å¯¾ã—ã¦ä¸€ã¤ã®è¡Œã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +ClickHouseã¯ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã‚’マージã—ã¦ç•°ãªã‚‹çµæžœãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã«åŒã˜ä¸»ã‚­ãƒ¼ã‚’æŒã¤è¡Œã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã€ã¤ã¾ã‚Šåˆè¨ˆãŒä¸å®Œå…¨ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ã‚¯ã‚¨ãƒªå†…ã§ã¯é›†è¨ˆé–¢æ•°[sum()](../../../sql-reference/aggregate-functions/reference/sum.md#agg_function-sum)ãŠã‚ˆã³`GROUP BY`å¥ã‚’使用ã™ã‚‹ã¹ãã§ã™ã€‚ + +### è¦ç´„ã®å…±é€šãƒ«ãƒ¼ãƒ« {#common-rules-for-summation} + +数値データ型ã®ã‚«ãƒ©ãƒ ã§ã¯å€¤ãŒè¦ç´„ã•ã‚Œã¾ã™ã€‚カラムã®é›†åˆã¯`columns`パラメータã«ã‚ˆã£ã¦å®šç¾©ã•ã‚Œã¾ã™ã€‚ + +è¦ç´„ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã§å€¤ãŒ0ã ã£ãŸå ´åˆã€è¡Œã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +主キーã«å«ã¾ã‚Œã¦ãŠã‚‰ãšã€è¦ç´„ã‚‚ã•ã‚Œã¦ã„ãªã„カラムã«ã¤ã„ã¦ã¯ã€æ—¢å­˜ã®å€¤ã‹ã‚‰ä»»æ„ã®ã‚‚ã®ãŒé¸ã°ã‚Œã¾ã™ã€‚ + +主キー内ã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦ã¯å€¤ã¯è¦ç´„ã•ã‚Œã¾ã›ã‚“。 + +### 集約関数カラム内ã®è¦ç´„ {#the-summation-in-the-aggregatefunction-columns} + +[AggregateFunctionåž‹](../../../sql-reference/data-types/aggregatefunction.md)ã®ã‚«ãƒ©ãƒ ã«ã¤ã„ã¦ã€ClickHouseã¯[AggregatingMergeTree](../../../engines/table-engines/mergetree-family/aggregatingmergetree.md)エンジンã®ã‚ˆã†ã«é–¢æ•°ã«å¾“ã£ã¦é›†ç´„ã—ã¾ã™ã€‚ + +### ãƒã‚¹ãƒˆã—ãŸæ§‹é€  {#nested-structures} + +テーブルã¯ç‰¹åˆ¥ãªæ–¹æ³•ã§å‡¦ç†ã•ã‚Œã‚‹ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãƒã‚¹ãƒˆã—ãŸãƒ†ãƒ¼ãƒ–ルã®åå‰ãŒ`Map`ã§çµ‚ã‚ã‚Šã€ä»¥ä¸‹ã®åŸºæº–を満ãŸã™å°‘ãªãã¨ã‚‚2ã¤ã®ã‚«ãƒ©ãƒ ã‚’å«ã‚“ã§ã„ã‚‹å ´åˆï¼š + +- 最åˆã®ã‚«ãƒ©ãƒ ãŒæ•°å€¤åž‹`(*Int*, Date, DateTime)`ã¾ãŸã¯æ–‡å­—列型`(String, FixedString)`ã€ã“れを`key`ã¨å‘¼ã³ã¾ã™ã€ +- ä»–ã®ã‚«ãƒ©ãƒ ãŒç®—è¡“åž‹`(*Int*, Float32/64)`ã€ã“れを`(values...)`ã¨å‘¼ã³ã¾ã™ã€ + +ãƒã‚¹ãƒˆã—ãŸãƒ†ãƒ¼ãƒ–ルã¯`key => (values...)`ã®ãƒžãƒƒãƒ”ングã¨ã—ã¦è§£é‡ˆã•ã‚Œã€ãã®è¡Œã‚’マージã™ã‚‹éš›ã«2ã¤ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®è¦ç´ ãŒ`key`ã«ã‚ˆã£ã¦ãƒžãƒ¼ã‚¸ã•ã‚Œã€å¯¾å¿œã™ã‚‹`(values...)`ãŒåˆè¨ˆã•ã‚Œã¾ã™ã€‚ + +例: + +``` text +DROP TABLE IF EXISTS nested_sum; +CREATE TABLE nested_sum +( + date Date, + site UInt32, + hitsMap Nested( + browser String, + imps UInt32, + clicks UInt32 + ) +) ENGINE = SummingMergeTree +PRIMARY KEY (date, site); + +INSERT INTO nested_sum VALUES ('2020-01-01', 12, ['Firefox', 'Opera'], [10, 5], [2, 1]); +INSERT INTO nested_sum VALUES ('2020-01-01', 12, ['Chrome', 'Firefox'], [20, 1], [1, 1]); +INSERT INTO nested_sum VALUES ('2020-01-01', 12, ['IE'], [22], [0]); +INSERT INTO nested_sum VALUES ('2020-01-01', 10, ['Chrome'], [4], [3]); + +OPTIMIZE TABLE nested_sum FINAL; -- マージをエミュレート + +SELECT * FROM nested_sum; +┌───────date─┬─site─┬─hitsMap.browser───────────────────┬─hitsMap.imps─┬─hitsMap.clicks─┠+│ 2020-01-01 │ 10 │ ['Chrome'] │ [4] │ [3] │ +│ 2020-01-01 │ 12 │ ['Chrome','Firefox','IE','Opera'] │ [20,11,22,5] │ [1,3,0,1] │ +└────────────┴──────┴───────────────────────────────────┴──────────────┴────────────────┘ + +SELECT + site, + browser, + impressions, + clicks +FROM +( + SELECT + site, + sumMap(hitsMap.browser, hitsMap.imps, hitsMap.clicks) AS imps_map + FROM nested_sum + GROUP BY site +) +ARRAY JOIN + imps_map.1 AS browser, + imps_map.2 AS impressions, + imps_map.3 AS clicks; + +┌─site─┬─browser─┬─impressions─┬─clicks─┠+│ 12 │ Chrome │ 20 │ 1 │ +│ 12 │ Firefox │ 11 │ 3 │ +│ 12 │ IE │ 22 │ 0 │ +│ 12 │ Opera │ 5 │ 1 │ +│ 10 │ Chrome │ 4 │ 3 │ +└──────┴─────────┴─────────────┴────────┘ +``` + +データã®è¦æ±‚時ã«ã€`Map`ã®é›†è¨ˆã«ã¯[sumMap(key, value)](../../../sql-reference/aggregate-functions/reference/summap.md)関数を使用ã—ã¦ãã ã•ã„。 + +ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®å ´åˆã€ãã®ã‚«ãƒ©ãƒ ã‚’è¦ç´„ã®ãŸã‚ã®ã‚¿ãƒ—ル内ã«æŒ‡å®šã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## 関連コンテンツ + +- ブログ: [Using Aggregate Combinators in ClickHouse](https://clickhouse.com/blog/aggregate-functions-combinators-in-clickhouse-for-arrays-maps-and-states) diff --git a/docs/ja/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md b/docs/ja/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md new file mode 100644 index 00000000000..d284fc79806 --- /dev/null +++ b/docs/ja/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md @@ -0,0 +1,240 @@ +--- +slug: /ja/engines/table-engines/mergetree-family/versionedcollapsingmergetree +sidebar_position: 80 +sidebar_label: VersionedCollapsingMergeTree +--- + +# VersionedCollapsingMergeTree + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ä»¥ä¸‹ã‚’æä¾›ã—ã¾ã™: + +- 常ã«å¤‰åŒ–ã™ã‚‹ã‚ªãƒ–ジェクト状態を迅速ã«è¨˜éŒ²ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- å¤ã„オブジェクト状態をãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§å‰Šé™¤ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å®¹é‡ã‚’大幅ã«å‰Šæ¸›ã—ã¾ã™ã€‚ + +詳細ã«ã¤ã„ã¦ã¯[Collapsing](#table_engines_versionedcollapsingmergetree)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯[MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md#table_engines-mergetree)ã‹ã‚‰ç¶™æ‰¿ã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã«è¡Œã‚’折りãŸãŸã‚€ãƒ­ã‚¸ãƒƒã‚¯ã‚’追加ã—ã¾ã™ã€‚`VersionedCollapsingMergeTree`ã¯[CollapsingMergeTree](../../../engines/table-engines/mergetree-family/collapsingmergetree.md)ã¨åŒã˜ç›®çš„ã‚’æžœãŸã—ã¾ã™ãŒã€ç•°ãªã‚‹æŠ˜ã‚ŠãŸãŸã¿ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¦ã€è¤‡æ•°ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§ä»»æ„ã®é †åºã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚特ã«ã€`Version`カラムを使用ã™ã‚‹ã“ã¨ã§ã€èª¤ã£ãŸé †åºã§æŒ¿å…¥ã•ã‚ŒãŸã¨ã—ã¦ã‚‚行をé©åˆ‡ã«æŠ˜ã‚ŠãŸãŸã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«å¯¾ã—ã€`CollapsingMergeTree`ã¯ã€åŽ³å¯†ã«é€£ç¶šã—ãŸæŒ¿å…¥ã®ã¿ã‚’許容ã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE = VersionedCollapsingMergeTree(sign, version) +[PARTITION BY expr] +[ORDER BY expr] +[SAMPLE BY expr] +[SETTINGS name=value, ...] +``` + +クエリパラメータã®èª¬æ˜Žã«ã¤ã„ã¦ã¯ã€[クエリã®èª¬æ˜Ž](../../../sql-reference/statements/create/table.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### エンジンã®ãƒ‘ラメータ + +``` sql +VersionedCollapsingMergeTree(sign, version) +``` + +#### sign + +`sign` — è¡Œã®ã‚¿ã‚¤ãƒ—を示ã™ã‚«ãƒ©ãƒ ã®åå‰: `1` ã¯ã€ŒçŠ¶æ…‹ã€è¡Œã€ `-1` ã¯ã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€è¡Œã‚’示ã—ã¾ã™ã€‚ + +カラムã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯`Int8`ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +#### version + +`version` — オブジェクト状態ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’示ã™ã‚«ãƒ©ãƒ ã®åå‰ã€‚ + +カラムã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯`UInt*`ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### クエリ節 + +`VersionedCollapsingMergeTree`テーブルを作æˆã™ã‚‹éš›ã«ã¯ã€`MergeTree`テーブルを作æˆã™ã‚‹éš›ã¨åŒã˜[節](../../../engines/table-engines/mergetree-family/mergetree.md)ãŒå¿…è¦ã§ã™ã€‚ + +
+ +éžæŽ¨å¥¨ã®ãƒ†ãƒ¼ãƒ–ル作æˆæ–¹æ³• + +:::note +æ–°ã—ã„プロジェクトã§ã¯ã“ã®æ–¹æ³•ã‚’使用ã—ãªã„ã§ãã ã•ã„。å¯èƒ½ã§ã‚ã‚Œã°ã€å¤ã„プロジェクトを上記ã®æ–¹æ³•ã«åˆ‡ã‚Šæ›¿ãˆã¦ãã ã•ã„。 +::: + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE [=] VersionedCollapsingMergeTree(date-column [, samp#table_engines_versionedcollapsingmergetreeling_expression], (primary, key), index_granularity, sign, version) +``` + +`sign`ãŠã‚ˆã³`version`以外ã®ã™ã¹ã¦ã®ãƒ‘ラメータã¯`MergeTree`ã¨åŒã˜æ„味をæŒã¡ã¾ã™ã€‚ + +- `sign` — è¡Œã®ã‚¿ã‚¤ãƒ—を示ã™ã‚«ãƒ©ãƒ ã®åå‰: `1` ã¯ã€ŒçŠ¶æ…‹ã€è¡Œã€ `-1` ã¯ã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€è¡Œã‚’示ã—ã¾ã™ã€‚ + + カラムã®ãƒ‡ãƒ¼ã‚¿åž‹ — `Int8`。 + +- `version` — オブジェクト状態ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’示ã™ã‚«ãƒ©ãƒ ã®åå‰ã€‚ + + カラムã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯`UInt*`ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +
+ +## Collapsing {#table_engines_versionedcollapsingmergetree} + +### データ {#data} + +ã‚るオブジェクトã®ç¶™ç¶šçš„ã«å¤‰ã‚るデータをä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚る状æ³ã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚オブジェクトã«ã¤ã1行をæŒã¡ã€å¤‰æ›´ãŒã‚ã‚‹ãŸã³ã«è¡Œã‚’æ›´æ–°ã™ã‚‹ã®ãŒç†ã«ã‹ãªã£ã¦ã„ã¾ã™ã€‚ã—ã‹ã—ã€æ›´æ–°æ“作ã¯DBMSã«ã¨ã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ストレージã«æ›¸ãæ›ãˆã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚高価ã§é…ã„ã§ã™ã€‚データを迅速ã«æ›¸ã込む必è¦ãŒã‚ã‚‹å ´åˆã«ã¯æ›´æ–°ã¯å—ã‘入れられã¾ã›ã‚“ãŒã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚ªãƒ–ジェクトã¸ã®å¤‰æ›´ã‚’順次書ã込むã“ã¨ãŒã§ãã¾ã™ã€‚ + +行を書ã込む際ã«ã¯`Sign`カラムを使用ã—ã¾ã™ã€‚`Sign = 1`ã§ã‚ã‚Œã°ã€è¡Œã¯ã‚ªãƒ–ジェクトã®çŠ¶æ…‹ã‚’示ã—ã¾ã™ï¼ˆã“れを「状態ã€è¡Œã¨å‘¼ã³ã¾ã™ï¼‰ã€‚`Sign = -1`を指定ã™ã‚‹ã¨ã€åŒã˜å±žæ€§ã‚’æŒã¤ã‚ªãƒ–ジェクトã®çŠ¶æ…‹ãŒã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚ŒãŸã“ã¨ã‚’示ã—ã¾ã™ï¼ˆã“れを「キャンセルã€è¡Œã¨å‘¼ã³ã¾ã™ï¼‰ã€‚ã¾ãŸã€å„オブジェクトã®çŠ¶æ…‹ã‚’別々ã®ç•ªå·ã§è­˜åˆ¥ã™ã‚‹ãŸã‚ã«`Version`カラムを使用ã—ã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ã‚るサイトã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¨ªã‚ŒãŸãƒšãƒ¼ã‚¸æ•°ã¨æ»žåœ¨æ™‚間を計算ã—ãŸã„ã¨ã—ã¾ã™ã€‚ã‚る時点ã§ã€ä»¥ä¸‹ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼æ´»å‹•çŠ¶æ…‹ã®è¡Œã‚’記録ã—ã¾ã™ã€‚ + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┬─Version─┠+│ 4324182021466249494 │ 5 │ 146 │ 1 │ 1 | +└─────────────────────┴───────────┴──────────┴──────┴─────────┘ +``` + +ã—ã°ã‚‰ãã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼æ´»å‹•ã®å¤‰æ›´ã‚’記録ã—ã€ä»¥ä¸‹ã®2行を書ãè¾¼ã¿ã¾ã™ã€‚ + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┬─Version─┠+│ 4324182021466249494 │ 5 │ 146 │ -1 │ 1 | +│ 4324182021466249494 │ 6 │ 185 │ 1 │ 2 | +└─────────────────────┴───────────┴──────────┴──────┴─────────┘ +``` + +最åˆã®è¡Œã¯ã‚ªãƒ–ジェクト(ユーザー)ã®ä»¥å‰ã®çŠ¶æ…‹ã‚’キャンセルã—ã¾ã™ã€‚キャンセルã•ã‚ŒãŸçŠ¶æ…‹ã®ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’`Sign`を除ã„ã¦ã‚³ãƒ”ーã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +2行目ã«ã¯ç¾åœ¨ã®çŠ¶æ…‹ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +ユーザー活動ã®æœ€å¾Œã®çŠ¶æ…‹ã ã‘ã‚’å¿…è¦ã¨ã™ã‚‹ãŸã‚〠+ +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┬─Version─┠+│ 4324182021466249494 │ 5 │ 146 │ 1 │ 1 | +│ 4324182021466249494 │ 5 │ 146 │ -1 │ 1 | +└─────────────────────┴───────────┴──────────┴──────┴─────────┘ +``` + +ã¨ã„ã†è¡Œã¯ã€ã‚ªãƒ–ジェクトã®ç„¡åŠ¹ãªï¼ˆå¤ã„)状態を折りãŸãŸã‚€ã“ã¨ãŒã§ãã€`VersionedCollapsingMergeTree`ã¯ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ä¸­ã«ã“れを行ã„ã¾ã™ã€‚ + +ãªãœå„変更ã«2行必è¦ã‹ã«ã¤ã„ã¦ã¯ã€[アルゴリズム](#table_engines-versionedcollapsingmergetree-algorithm)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**使用上ã®æ³¨æ„** + +1. データを書ã込むプログラムã¯ã€ã‚ªãƒ–ジェクトã®çŠ¶æ…‹ã‚’覚ãˆã¦ãŠãã€ãれをキャンセルã§ãるよã†ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚「キャンセルã€æ–‡å­—列ã¯ã€ä¸»ã‚­ãƒ¼ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¨ã€ŒçŠ¶æ…‹ã€æ–‡å­—列ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŠã‚ˆã³å対ã®`Sign`ã‚’å«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚ŠåˆæœŸã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚µã‚¤ã‚ºãŒå¢—加ã—ã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã‚’迅速ã«æ›¸ã込むã“ã¨ãŒã§ãã¾ã™ã€‚ +2. カラム内ã®é•·ã„é…列ã®æˆé•·ã¯ã€æ›¸ãè¾¼ã¿æ™‚ã®è² è·ã®ãŸã‚ã«ã‚¨ãƒ³ã‚¸ãƒ³ã®åŠ¹çŽ‡æ€§ã‚’低下ã•ã›ã¾ã™ã€‚データãŒã‚·ãƒ³ãƒ—ルã§ã‚ã‚‹ã»ã©åŠ¹çŽ‡æ€§ã¯é«˜ã¾ã‚Šã¾ã™ã€‚ +3. `SELECT`ã®çµæžœã¯ã€ã‚ªãƒ–ジェクト変更ã®å±¥æ­´ã®ä¸€è²«æ€§ã«å¼·ãä¾å­˜ã—ã¾ã™ã€‚データを挿入ã™ã‚‹æº–備をã™ã‚‹éš›ã«æ³¨æ„ã—ã¦ãã ã•ã„。ä¸æ•´åˆãªãƒ‡ãƒ¼ã‚¿ã§ã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æ·±ã•ã®ã‚ˆã†ãªéžè² ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã«è² ã®å€¤ãŒç™ºç”Ÿã™ã‚‹ãªã©ã€äºˆæ¸¬ä¸å¯èƒ½ãªçµæžœã‚’å¾—ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +### アルゴリズム {#table_engines-versionedcollapsingmergetree-algorithm} + +ClickHouseãŒãƒ‡ãƒ¼ã‚¿ãƒ‘ーツをマージã™ã‚‹ã¨ãã€åŒã˜ä¸»ã‚­ãƒ¼ã¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ã‚‚ã¡ã€`Sign`ãŒç•°ãªã‚‹è¡Œã®ãƒšã‚¢ã‚’削除ã—ã¾ã™ã€‚è¡Œã®é †åºã¯é–¢ä¿‚ã‚ã‚Šã¾ã›ã‚“。 + +ClickHouseãŒãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ãã€è¡Œã‚’主キーã§é †åºä»˜ã‘ã¾ã™ã€‚ã‚‚ã—`Version`カラムãŒä¸»ã‚­ãƒ¼ã«å«ã¾ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯ã“ã®ã‚«ãƒ©ãƒ ã‚’最後ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¨ã—ã¦ä¸»ã‚­ãƒ¼ã«æš—黙的ã«è¿½åŠ ã—ã€é †åºä»˜ã‘ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +## データã®é¸æŠž {#selecting-data} + +ClickHouseã¯ã€åŒã˜ä¸»ã‚­ãƒ¼ã‚’æŒã¤ã™ã¹ã¦ã®è¡ŒãŒåŒã˜çµæžœãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã¾ãŸã¯åŒã˜ç‰©ç†ã‚µãƒ¼ãƒãƒ¼ã«å­˜åœ¨ã™ã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã›ã‚“。ã“ã‚Œã¯ãƒ‡ãƒ¼ã‚¿ã‚’書ã込む際ã¨å¾Œç¶šã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ã®ä¸¡æ–¹ã§å½“ã¦ã¯ã¾ã‚Šã¾ã™ã€‚ã•ã‚‰ã«ã€ClickHouseã¯`SELECT`クエリを複数ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§å‡¦ç†ã—ã€çµæžœã®è¡Œã®é †åºã‚’予測ã§ãã¾ã›ã‚“。ã“ã®ãŸã‚ã€`VersionedCollapsingMergeTree`テーブルã‹ã‚‰å®Œå…¨ã«ã€ŒæŠ˜ã‚ŠãŸãŸã¾ã‚ŒãŸã€ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«ã¯é›†è¨ˆãŒå¿…è¦ã§ã™ã€‚ + +折りãŸãŸã¿ã‚’完了ã™ã‚‹ã«ã¯ã€`GROUP BY`å¥ã¨`Sign`を考慮ã—ãŸé›†è¨ˆé–¢æ•°ã‚’使用ã—ãŸã‚¯ã‚¨ãƒªã‚’記述ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€æ•°é‡ã‚’計算ã™ã‚‹ã«ã¯`count()`ã®ä»£ã‚ã‚Šã«`sum(Sign)`を使用ã—ã¾ã™ã€‚何ã‹ã®åˆè¨ˆã‚’計算ã™ã‚‹ã«ã¯ã€`sum(x)`ã®ä»£ã‚ã‚Šã«`sum(Sign * x)`を使用ã—ã€`HAVING sum(Sign) > 0`を追加ã—ã¾ã™ã€‚ + +`count`ã€`sum`ã€`avg`ã¨ã„ã£ãŸé›†è¨ˆã¯ã“ã®æ–¹æ³•ã§è¨ˆç®—ã§ãã¾ã™ã€‚オブジェクトãŒå°‘ãªãã¨ã‚‚1ã¤ã®éžæŠ˜ã‚ŠãŸãŸã¾ã‚ŒãŸçŠ¶æ…‹ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€`uniq`も計算ã§ãã¾ã™ã€‚`min`ãŠã‚ˆã³`max`ã¯è¨ˆç®—ã§ãã¾ã›ã‚“。ãªãœãªã‚‰`VersionedCollapsingMergeTree`ã¯æŠ˜ã‚ŠãŸãŸã¾ã‚ŒãŸçŠ¶æ…‹ã®å€¤ã®å±¥æ­´ã‚’ä¿å­˜ã—ãªã„ã‹ã‚‰ã§ã™ã€‚ + +折りãŸãŸã¿ã‚’æ–½ã™ãŒé›†è¨ˆã‚’è¡Œã‚ãªã„データを抽出ã—ãŸã„å ´åˆï¼ˆãŸã¨ãˆã°æœ€æ–°ã®å€¤ãŒç‰¹å®šã®æ¡ä»¶ã«ä¸€è‡´ã™ã‚‹è¡ŒãŒå­˜åœ¨ã™ã‚‹ã‹ã‚’確èªã™ã‚‹ãŸã‚ã«ï¼‰ã€`FROM`å¥ã«`FINAL`修飾å­ã‚’使用ã§ãã¾ã™ã€‚ã“ã®æ–¹æ³•ã¯åŠ¹çŽ‡ãŒæ‚ªãã€å¤§ããªãƒ†ãƒ¼ãƒ–ルã«ã¯ä½¿ç”¨ã™ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## 使用例 {#example-of-use} + +サンプルデータ: + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┬─Version─┠+│ 4324182021466249494 │ 5 │ 146 │ 1 │ 1 | +│ 4324182021466249494 │ 5 │ 146 │ -1 │ 1 | +│ 4324182021466249494 │ 6 │ 185 │ 1 │ 2 | +└─────────────────────┴───────────┴──────────┴──────┴─────────┘ +``` + +テーブルã®ä½œæˆ: + +``` sql +CREATE TABLE UAct +( + UserID UInt64, + PageViews UInt8, + Duration UInt8, + Sign Int8, + Version UInt8 +) +ENGINE = VersionedCollapsingMergeTree(Sign, Version) +ORDER BY UserID +``` + +データã®æŒ¿å…¥: + +``` sql +INSERT INTO UAct VALUES (4324182021466249494, 5, 146, 1, 1) +``` + +``` sql +INSERT INTO UAct VALUES (4324182021466249494, 5, 146, -1, 1),(4324182021466249494, 6, 185, 1, 2) +``` + +ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを作æˆã™ã‚‹ãŸã‚ã«2ã¤ã®`INSERT`クエリを使用ã—ã¾ã™ã€‚1ã¤ã®ã‚¯ã‚¨ãƒªã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ã€ClickHouseã¯1ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを作æˆã—ã€ä¸€åº¦ã‚‚マージを行ã„ã¾ã›ã‚“。 + +データã®å–å¾—: + +``` sql +SELECT * FROM UAct +``` + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┬─Version─┠+│ 4324182021466249494 │ 5 │ 146 │ 1 │ 1 │ +└─────────────────────┴───────────┴──────────┴──────┴─────────┘ +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┬─Version─┠+│ 4324182021466249494 │ 5 │ 146 │ -1 │ 1 │ +│ 4324182021466249494 │ 6 │ 185 │ 1 │ 2 │ +└─────────────────────┴───────────┴──────────┴──────┴─────────┘ +``` + +ã“ã“ã§ç§ãŸã¡ãŒè¦‹ã¦ã„ã‚‹ã‚‚ã®ã¨æŠ˜ã‚ŠãŸãŸã¾ã‚ŒãŸéƒ¨åˆ†ã¯ã©ã“ã«ã‚ã‚‹ã®ã§ã—ょã†ã‹ï¼Ÿ +2ã¤ã®`INSERT`クエリを使用ã—ã¦2ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを作æˆã—ã¾ã—ãŸã€‚`SELECT`クエリã¯2ã¤ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§å®Ÿè¡Œã•ã‚Œã€çµæžœã¯è¡Œã®ãƒ©ãƒ³ãƒ€ãƒ ãªé †åºã«ãªã£ã¦ã„ã¾ã™ã€‚ +折りãŸãŸã¿ãŒç™ºç”Ÿã—ãªã‹ã£ãŸã®ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツãŒã¾ã ãƒžãƒ¼ã‚¸ã•ã‚Œã¦ã„ãªã„ãŸã‚ã§ã™ã€‚ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを予測ã§ããªã„時点ã§ãƒžãƒ¼ã‚¸ã—ã¾ã™ã€‚ + +ã“ã®ãŸã‚ã€é›†è¨ˆãŒå¿…è¦ã§ã™: + +``` sql +SELECT + UserID, + sum(PageViews * Sign) AS PageViews, + sum(Duration * Sign) AS Duration, + Version +FROM UAct +GROUP BY UserID, Version +HAVING sum(Sign) > 0 +``` + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Version─┠+│ 4324182021466249494 │ 6 │ 185 │ 2 │ +└─────────────────────┴───────────┴──────────┴─────────┘ +``` + +集計ãŒä¸è¦ã§æŠ˜ã‚ŠãŸãŸã¿ã‚’強制ã—ãŸã„å ´åˆã¯ã€`FROM`å¥ã«`FINAL`修飾å­ã‚’使用ã§ãã¾ã™ã€‚ + +``` sql +SELECT * FROM UAct FINAL +``` + +``` text +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┬─Version─┠+│ 4324182021466249494 │ 6 │ 185 │ 1 │ 2 │ +└─────────────────────┴───────────┴──────────┴──────┴─────────┘ +``` + +ã“ã‚Œã¯ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹éš›ã®éžå¸¸ã«éžåŠ¹çŽ‡çš„ãªæ–¹æ³•ã§ã™ã€‚大ããªãƒ†ãƒ¼ãƒ–ルã§ã¯ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 diff --git a/docs/ja/engines/table-engines/special/buffer.md b/docs/ja/engines/table-engines/special/buffer.md new file mode 100644 index 00000000000..62bb5d39871 --- /dev/null +++ b/docs/ja/engines/table-engines/special/buffer.md @@ -0,0 +1,106 @@ +--- +slug: /ja/engines/table-engines/special/buffer +sidebar_position: 120 +sidebar_label: Buffer +--- + +# Buffer テーブルエンジン + +データをRAMã«ãƒãƒƒãƒ•ã‚¡ã—ã€å®šæœŸçš„ã«åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¦æ›¸ãè¾¼ã¿ã¾ã™ã€‚読ã¿å–ã‚Šæ“作中ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒãƒƒãƒ•ã‚¡ã¨ã‚‚ã†ä¸€æ–¹ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰åŒæ™‚ã«èª­ã¿å–られã¾ã™ã€‚ + +:::note +Buffer テーブルエンジンã®æŽ¨å¥¨ã•ã‚Œã‚‹ä»£æ›¿æ‰‹æ®µã¯ã€[éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆ](/docs/ja/guides/best-practices/asyncinserts.md)を有効ã«ã™ã‚‹ã“ã¨ã§ã™ã€‚ +::: + +``` sql +Buffer(database, table, num_layers, min_time, max_time, min_rows, max_rows, min_bytes, max_bytes [,flush_time [,flush_rows [,flush_bytes]]]) +``` + +### エンジンパラメータ: + +#### database + +`database` - データベースå。`currentDatabase()` ã¾ãŸã¯æ–‡å­—列を返ã™ä»–ã®å®šæ•°å¼ã‚’使用ã§ãã¾ã™ã€‚ + +#### table + +`table` - データを書ã込むテーブル。 + +#### num_layers + +`num_layers` - パラレル層。物ç†çš„ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルã¯ç‹¬ç«‹ã—ãŸãƒãƒƒãƒ•ã‚¡ã® `num_layers` ã«ã‚ˆã£ã¦è¡¨ã•ã‚Œã¾ã™ã€‚ + +#### min_time, max_time, min_rows, max_rows, min_bytes, and max_bytes + +ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹æ¡ä»¶ã€‚ + +### オプションã®ã‚¨ãƒ³ã‚¸ãƒ³ãƒ‘ラメータ: + +#### flush_time, flush_rows, and flush_bytes + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹æ¡ä»¶ï¼ˆçœç•¥ã¾ãŸã¯ã‚¼ãƒ­ã¯ `flush*` パラメータãŒãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ï¼‰ã€‚ + +ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ãŒãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã€ã™ã¹ã¦ã® `min*` æ¡ä»¶ã¾ãŸã¯å°‘ãªãã¨ã‚‚1ã¤ã® `max*` æ¡ä»¶ãŒæº€ãŸã•ã‚Œã‚‹ã¨ã€å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +ã¾ãŸã€å°‘ãªãã¨ã‚‚1ã¤ã® `flush*` æ¡ä»¶ãŒæº€ãŸã•ã‚Œã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ãŒé–‹å§‹ã•ã‚Œã¾ã™ã€‚ã“れ㯠`max*` ã¨ã¯ç•°ãªã‚Šã€`flush*` ã«ã‚ˆã‚Šã€`INSERT` クエリã¸ã®é…延をé¿ã‘ã¦ãƒãƒƒãƒ•ã‚¡ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã‚’個別ã«è¨­å®šã§ãã¾ã™ã€‚ + +#### min_time, max_time, and flush_time + +ãƒãƒƒãƒ•ã‚¡ã¸ã®æœ€åˆã®æ›¸ãè¾¼ã¿ã‹ã‚‰ã®ç§’æ•°æ¡ä»¶ã€‚ + +#### min_rows, max_rows, and flush_rows + +ãƒãƒƒãƒ•ã‚¡å†…ã®è¡Œæ•°æ¡ä»¶ã€‚ + +#### min_bytes, max_bytes, and flush_bytes + +ãƒãƒƒãƒ•ã‚¡å†…ã®ãƒã‚¤ãƒˆæ•°æ¡ä»¶ã€‚ + +書ãè¾¼ã¿æ“作中ã€ãƒ‡ãƒ¼ã‚¿ã¯1ã¤ä»¥ä¸Šã®ãƒ©ãƒ³ãƒ€ãƒ ãªãƒãƒƒãƒ•ã‚¡ã«æŒ¿å…¥ã•ã‚Œã¾ã™ï¼ˆ`num_layers` ã§è¨­å®šï¼‰ã€‚ã¾ãŸã¯ã€æŒ¿å…¥ã™ã‚‹ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ãŒå¤§ãã™ãŽã‚‹å ´åˆï¼ˆ`max_rows` ã¾ãŸã¯ `max_bytes` より大ãã„å ´åˆï¼‰ã€ãƒãƒƒãƒ•ã‚¡ã‚’çœç•¥ã—ã¦å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«ç›´æŽ¥æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +データをフラッシュã™ã‚‹æ¡ä»¶ã¯ã€ãã‚Œãžã‚Œã® `num_layers` ãƒãƒƒãƒ•ã‚¡ã«å¯¾ã—ã¦å€‹åˆ¥ã«è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€`num_layers = 16` ãŠã‚ˆã³ `max_bytes = 100000000` ã®å ´åˆã€æœ€å¤§RAM消費é‡ã¯1.6 GBã§ã™ã€‚ + +例: + +``` sql +CREATE TABLE merge.hits_buffer AS merge.hits ENGINE = Buffer(merge, hits, 1, 10, 100, 10000, 1000000, 10000000, 100000000) +``` + +`merge.hits_buffer` テーブルを作æˆã—ã€ãã®æ§‹é€ ã¯ `merge.hits` ã¨åŒã˜ã§ã€Buffer エンジンを使用ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã«æ›¸ã込むã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯RAMã«ãƒãƒƒãƒ•ã‚¡ã•ã‚Œã€ãã®å¾Œ `merge.hits` テーブルã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚å˜ä¸€ã®ãƒãƒƒãƒ•ã‚¡ãŒä½œæˆã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿ã¯ä»¥ä¸‹ã®å ´åˆã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™: +- 最後ã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã‹ã‚‰100秒ãŒçµŒéŽã—ãŸå ´åˆï¼ˆ`max_time`)ã¾ãŸã¯ +- 100万行ãŒæ›¸ãè¾¼ã¾ã‚ŒãŸå ´åˆï¼ˆ`max_rows`)ã¾ãŸã¯ +- 100 MBã®ãƒ‡ãƒ¼ã‚¿ãŒæ›¸ãè¾¼ã¾ã‚ŒãŸå ´åˆï¼ˆ`max_bytes`)ã¾ãŸã¯ +- 10秒ãŒçµŒéŽã—ãŸå ´åˆï¼ˆ`min_time`)ã‹ã¤10,000行(`min_rows`)ã¨10 MB(`min_bytes`)ã®ãƒ‡ãƒ¼ã‚¿ãŒæ›¸ãè¾¼ã¾ã‚ŒãŸå ´åˆ + +ãŸã¨ãˆã°ã€1è¡Œã ã‘ãŒæ›¸ãè¾¼ã¾ã‚ŒãŸå ´åˆã§ã‚ã£ã¦ã‚‚ã€100秒後ã«ã¯å¿…ãšãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ã—ã‹ã—ã€å¤šãã®è¡ŒãŒæ›¸ãè¾¼ã¾ã‚ŒãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯ã‚ˆã‚Šæ—©ãフラッシュã•ã‚Œã¾ã™ã€‚ + +サーãƒãŒåœæ­¢ã•ã‚ŒãŸå ´åˆã€`DROP TABLE` ã¾ãŸã¯ `DETACH TABLE` ã«ã‚ˆã‚Šã€ãƒãƒƒãƒ•ã‚¡ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚‚宛先テーブルã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ + +データベースåã¨ãƒ†ãƒ¼ãƒ–ルåã«ã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚©ãƒ¼ãƒˆã§ç©ºæ–‡å­—列を設定ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€å®›å…ˆãƒ†ãƒ¼ãƒ–ルãŒãªã„ã“ã¨ã‚’示ã—ã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ•ãƒ©ãƒƒã‚·ãƒ¥æ¡ä»¶ãŒæº€ãŸã•ã‚Œã‚‹ã¨ã€ãƒãƒƒãƒ•ã‚¡ã¯å˜ã«ã‚¯ãƒªã‚¢ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ¡ãƒ¢ãƒªå†…ã«ãƒ‡ãƒ¼ã‚¿ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’ä¿æŒã™ã‚‹ã®ã«å½¹ç«‹ã¤å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +Buffer テーブルã‹ã‚‰èª­ã¿å–ã‚‹ã¨ãã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ã¨ã€ã‚‚ã—ã‚ã‚Œã°å®›å…ˆãƒ†ãƒ¼ãƒ–ルã‹ã‚‰å‡¦ç†ã•ã‚Œã¾ã™ã€‚ +Buffer テーブルã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã¤ã¾ã‚Šã€ãƒãƒƒãƒ•ã‚¡å†…ã®ãƒ‡ãƒ¼ã‚¿ã¯å®Œå…¨ã«ã‚¹ã‚­ãƒ£ãƒ³ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å¤§è¦æ¨¡ãªãƒãƒƒãƒ•ã‚¡ã«ã¯æ™‚é–“ãŒã‹ã‹ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚(サブテーブル内ã®ãƒ‡ãƒ¼ã‚¿ã«ã¤ã„ã¦ã¯ã€ã‚µãƒãƒ¼ãƒˆã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚) + +Buffer テーブルã®ã‚«ãƒ©ãƒ ã‚»ãƒƒãƒˆãŒã‚µãƒ–テーブルã®ã‚«ãƒ©ãƒ ã‚»ãƒƒãƒˆã¨ä¸€è‡´ã—ãªã„å ´åˆã€ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ルã«å­˜åœ¨ã™ã‚‹ã‚«ãƒ©ãƒ ã®ã‚µãƒ–セットãŒæŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +Buffer テーブルã®ã‚«ãƒ©ãƒ ã¨ã‚µãƒ–テーブルã¨ã®é–“ã§åž‹ãŒä¸€è‡´ã—ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã«è¨˜éŒ²ã•ã‚Œã€ãƒãƒƒãƒ•ã‚¡ãŒã‚¯ãƒªã‚¢ã•ã‚Œã¾ã™ã€‚ãƒãƒƒãƒ•ã‚¡ãŒãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ã¨ãã«ã‚µãƒ–テーブルãŒå­˜åœ¨ã—ãªã„å ´åˆã‚‚åŒæ§˜ã§ã™ã€‚ + +:::note +2021å¹´10月26日以å‰ã®ãƒªãƒªãƒ¼ã‚¹ã§ Buffer テーブルã«ALTERを実行ã™ã‚‹ã¨ `Block structure mismatch` エラーãŒç™ºç”Ÿã—ã¾ã™ï¼ˆ[#15117](https://github.com/ClickHouse/ClickHouse/issues/15117) ãŠã‚ˆã³ [#30565](https://github.com/ClickHouse/ClickHouse/pull/30565)ã‚’å‚照)。Buffer テーブルを削除ã—ã€å†ä½œæˆã™ã‚‹ã“ã¨ãŒå”¯ä¸€ã®é¸æŠžã§ã™ã€‚ALTERã‚’Bufferテーブルã«å®Ÿè¡Œã™ã‚‹å‰ã«ã€ãƒªãƒªãƒ¼ã‚¹ã§ã“ã®ã‚¨ãƒ©ãƒ¼ãŒä¿®æ­£ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +::: + +サーãƒãŒç•°å¸¸çµ‚了ã™ã‚‹ã¨ã€ãƒãƒƒãƒ•ã‚¡å†…ã®ãƒ‡ãƒ¼ã‚¿ã¯å¤±ã‚ã‚Œã¾ã™ã€‚ + +`FINAL` ãŠã‚ˆã³ `SAMPLE` 㯠Buffer テーブルã§ã¯æ­£ã—ã動作ã—ã¾ã›ã‚“。ã“れらã®æ¡ä»¶ã¯å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«ã¯æ¸¡ã•ã‚Œã¾ã™ãŒã€ãƒãƒƒãƒ•ã‚¡å†…ã®ãƒ‡ãƒ¼ã‚¿å‡¦ç†ã«ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。ã“れらã®æ©Ÿèƒ½ãŒå¿…è¦ãªå ´åˆã¯ã€Buffer テーブルã¯æ›¸ãè¾¼ã¿å°‚用ã«ã—ã€èª­ã¿å–ã‚Šã¯å®›å…ˆãƒ†ãƒ¼ãƒ–ルã‹ã‚‰è¡Œã†ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +Buffer テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ã¨ã€ä¸€éƒ¨ã®ãƒãƒƒãƒ•ã‚¡ã¯ãƒ­ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€åŒæ™‚ã«ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–ã‚Šæ“作ãŒè¡Œã‚ã‚Œã¦ã„ã‚‹å ´åˆã«é…延ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +Buffer テーブルã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯ã€ã‚µãƒ–テーブルã«ç•°ãªã‚‹é †ç•ªã§ç•°ãªã‚‹ãƒ–ロックã«åŽã¾ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãŸã‚ã€Buffer テーブルã¯æ­£ã—ã CollapsingMergeTree ã«æ›¸ã込むã«ã¯å›°é›£ã§ã™ã€‚å•é¡Œã‚’é¿ã‘ã‚‹ã«ã¯ã€`num_layers` ã‚’1ã«è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +宛先テーブルãŒãƒ¬ãƒ—リケートã•ã‚Œã¦ã„ã‚‹å ´åˆã€Buffer テーブルã«æ›¸ã込むã¨ãƒ¬ãƒ—リケートテーブルã®äºˆæœŸã—ãŸç‰¹å¾´ãŒå¤±ã‚ã‚Œã¾ã™ã€‚è¡Œã®é †ç•ªã‚„データ部分ã®ã‚µã‚¤ã‚ºãŒãƒ©ãƒ³ãƒ€ãƒ ã«å¤‰ã‚ã‚‹ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ã®é‡è¤‡é™¤åŽ»ãŒå‹•ä½œã—ãªããªã‚Šã€ãƒ¬ãƒ—リケートテーブルã¸ã®ç¢ºå®Ÿãªã€Œæ­£ç¢ºã«ä¸€åº¦ã€æ›¸ãè¾¼ã¿ãŒã§ããªããªã‚Šã¾ã™ã€‚ + +ã“れらã®æ¬ ç‚¹ã‹ã‚‰ã€Buffer テーブルを使用ã™ã‚‹ã®ã¯ç¨€ãªã‚±ãƒ¼ã‚¹ã«é™å®šã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +Buffer テーブルã¯ã€çŸ­æ™‚é–“ã«å¤šãã®ã‚µãƒ¼ãƒã‹ã‚‰éžå¸¸ã«å¤šãã®INSERTã‚’å—ä¿¡ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入å‰ã«ãƒãƒƒãƒ•ã‚¡ã§ããšã€INSERTãŒå分高速ã«å®Ÿè¡Œã§ããªã„å ´åˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +Buffer テーブルã§ã‚‚ã€1è¡Œãšã¤ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã“ã¨ã¯æ„味ãŒã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã«ã‚ˆã‚Šã€1秒ã‚ãŸã‚Šæ•°åƒè¡Œã®é€Ÿåº¦ã—ã‹å‡ºã›ã¾ã›ã‚“ãŒã€ã‚ˆã‚Šå¤§ããªãƒ‡ãƒ¼ã‚¿ãƒ–ロックを挿入ã™ã‚‹ã“ã¨ã§ã€1秒ã‚ãŸã‚Š100万行以上ã®é€Ÿåº¦ãŒæœŸå¾…ã§ãã¾ã™ã€‚ diff --git a/docs/ja/engines/table-engines/special/dictionary.md b/docs/ja/engines/table-engines/special/dictionary.md new file mode 100644 index 00000000000..1f9dc03f399 --- /dev/null +++ b/docs/ja/engines/table-engines/special/dictionary.md @@ -0,0 +1,100 @@ +--- +slug: /ja/engines/table-engines/special/dictionary +sidebar_position: 20 +sidebar_label: Dictionary +--- + +# Dictionary テーブルエンジン + +`Dictionary`エンジンã¯ã€[Dictionary](../../../sql-reference/dictionaries/index.md) データを ClickHouse テーブルã¨ã—ã¦è¡¨ç¤ºã—ã¾ã™ã€‚ + +## 例 {#example} + +以下ã¯ã€`products` ã¨ã„ã†åå‰ã® dictionary ã®è¨­å®šä¾‹ã§ã™: + +``` xml + + + products + + +
products
+ DSN=some-db-server + + + + 300 + 360 + + + + + + + product_id + + + title + String + + + + + +``` + +Dictionary データをクエリã—ã¾ã™: + +``` sql +SELECT + name, + type, + key, + attribute.names, + attribute.types, + bytes_allocated, + element_count, + source +FROM system.dictionaries +WHERE name = 'products' +``` + +``` text +┌─name─────┬─type─┬─key────┬─attribute.names─┬─attribute.types─┬─bytes_allocated─┬─element_count─┬─source──────────┠+│ products │ Flat │ UInt64 │ ['title'] │ ['String'] │ 23065376 │ 175032 │ ODBC: .products │ +└──────────┴──────┴────────┴─────────────────┴─────────────────┴─────────────────┴───────────────┴─────────────────┘ +``` + +ã“ã®å½¢å¼ã§ dictionary データをå–å¾—ã™ã‚‹ã«ã¯ã€[dictGet\*](../../../sql-reference/functions/ext-dict-functions.md#ext_dict_functions) 関数を使用ã§ãã¾ã™ã€‚ + +ã“ã®ãƒ“ューã¯ã€å…ƒã®ãƒ‡ãƒ¼ã‚¿ãŒå¿…è¦ãªå ´åˆã‚„`JOIN`æ“作を行ã†éš›ã«ã¯å½¹ã«ç«‹ã¡ã¾ã›ã‚“。ã“ã†ã—ãŸå ´åˆã«ã¯ã€dictionary データをテーブルã¨ã—ã¦è¡¨ç¤ºã™ã‚‹ `Dictionary` エンジンを使用ã§ãã¾ã™ã€‚ + +構文: + +``` sql +CREATE TABLE %table_name% (%fields%) engine = Dictionary(%dictionary_name%) +``` + +使用例: + +``` sql +create table products (product_id UInt64, title String) Engine = Dictionary(products); +``` + + Ok + +テーブルã®å†…容を確èªã—ã¾ã™ã€‚ + +``` sql +select * from products limit 1; +``` + +``` text +┌────product_id─┬─title───────────┠+│ 152689 │ Some item │ +└───────────────┴─────────────────┘ +``` + +**関連項目** + +- [Dictionary 関数](../../../sql-reference/table-functions/dictionary.md#dictionary-function) diff --git a/docs/ja/engines/table-engines/special/distributed.md b/docs/ja/engines/table-engines/special/distributed.md new file mode 100644 index 00000000000..7aa42bcef7c --- /dev/null +++ b/docs/ja/engines/table-engines/special/distributed.md @@ -0,0 +1,271 @@ +--- +sidebar_label: "Distributed" +sidebar_position: 10 +slug: /ja/engines/table-engines/special/distributed +--- + +# Distributed テーブルエンジン + +:::warning +クラウドã§Distributedテーブルエンジンを作æˆã™ã‚‹ã«ã¯ã€[remoteã¨remoteSecure](../../../sql-reference/table-functions/remote)テーブル関数を使用ã§ãã¾ã™ã€‚ClickHouse Cloudã§ã¯ã€`Distributed(...)`ã®æ§‹æ–‡ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +::: + +Distributedエンジンを使用ã—ãŸãƒ†ãƒ¼ãƒ–ルã¯ç‹¬è‡ªã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã›ãšã€è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼ã§ã®åˆ†æ•£åž‹ã‚¯ã‚¨ãƒªå‡¦ç†ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚読ã¿è¾¼ã¿ã¯è‡ªå‹•çš„ã«ä¸¦åˆ—化ã•ã‚Œã¾ã™ã€‚読ã¿è¾¼ã¿æ™‚ã«ã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ä¸Šã®ãƒ†ãƒ¼ãƒ–ルインデックスãŒåˆ©ç”¨ã•ã‚Œã¾ã™ï¼ˆå­˜åœ¨ã™ã‚‹å ´åˆï¼‰ã€‚ + +## テーブルã®ä½œæˆ {#distributed-creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE = Distributed(cluster, database, table[, sharding_key[, policy_name]]) +[SETTINGS name=value, ...] +``` + +### テーブルã‹ã‚‰ {#distributed-from-a-table} + +`Distributed`テーブルãŒç¾åœ¨ã®ã‚µãƒ¼ãƒãƒ¼ä¸Šã®ãƒ†ãƒ¼ãƒ–ルを指ã—ã¦ã„ã‚‹å ´åˆã€ãã®ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ã‚­ãƒ¼ãƒžã‚’採用ã§ãã¾ã™: + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] AS [db2.]name2 ENGINE = Distributed(cluster, database, table[, sharding_key[, policy_name]]) [SETTINGS name=value, ...] +``` + +### Distributedパラメータ + +#### cluster + +`cluster` - サーãƒãƒ¼ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ã‚¯ãƒ©ã‚¹ã‚¿å + +#### database + +`database` - リモートデータベースã®åå‰ + +#### table + +`table` - リモートテーブルã®åå‰ + +#### sharding_key + +`sharding_key` - (çœç•¥å¯èƒ½ï¼‰ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚­ãƒ¼ + +`sharding_key`を指定ã™ã‚‹ã“ã¨ãŒå¿…è¦ãªå ´åˆ: + +- Distributed テーブルã¸ã®`INSERT`(テーブルエンジンãŒãƒ‡ãƒ¼ã‚¿ã‚’ã©ã®ã‚ˆã†ã«åˆ†å‰²ã™ã‚‹ã‹ã‚’決定ã™ã‚‹ãŸã‚ã«`sharding_key`ãŒå¿…è¦ï¼‰ã€‚ãŸã ã—ã€`insert_distributed_one_random_shard`設定ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€`INSERT`ã«ã¯ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚­ãƒ¼ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 +- `optimize_skip_unused_shards`を使用ã™ã‚‹ãŸã‚ã«ã€ã‚¯ã‚¨ãƒªã™ã¹ãシャードを決定ã™ã‚‹ãŸã‚ã«`sharding_key`ãŒå¿…è¦ã§ã™ + +#### policy_name + +`policy_name` - (çœç•¥å¯èƒ½ï¼‰ãƒãƒªã‚·ãƒ¼åã€ä¸€æ™‚ファイルをãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰é€ä¿¡ç”¨ã«ä¿å­˜ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ + +**関連リンク** + + - [distributed_foreground_insert](../../../operations/settings/settings.md#distributed_foreground_insert) 設定 + - [MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-multiple-volumes) ã®ä¾‹ + +### Distributed設定 + +#### fsync_after_insert + +`fsync_after_insert` - ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã®Distributedã¸ã®æŒ¿å…¥å¾Œã«ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦`fsync`を実行ã—ã¾ã™ã€‚**イニシエーターノード**ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿å…¨ä½“ãŒOSã«ã‚ˆã‚Šãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ + +#### fsync_directories + +`fsync_directories` - ディレクトリã«å¯¾ã—ã¦`fsync`を実行ã—ã¾ã™ã€‚Distributedテーブルã«é–¢é€£ã™ã‚‹ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æŒ¿å…¥æ“作後(挿入後ã€ã‚·ãƒ£ãƒ¼ãƒ‰ã¸ã®ãƒ‡ãƒ¼ã‚¿é€ä¿¡å¾Œãªã©ï¼‰ã«ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒOSã«ã‚ˆã‚Šæ›´æ–°ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ + +#### skip_unavailable_shards + +`skip_unavailable_shards` - trueã®å ´åˆã€ClickHouseã¯ä½¿ç”¨ä¸å¯ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’é»™ã£ã¦ã‚¹ã‚­ãƒƒãƒ—ã—ã¾ã™ã€‚シャードã¯æ¬¡ã®ã„ãšã‚Œã‹ã®ç†ç”±ã§ä½¿ç”¨ä¸å¯ã¨ãƒžãƒ¼ã‚¯ã•ã‚Œã¾ã™: 1) 接続失敗ã«ã‚ˆã‚Šã‚·ãƒ£ãƒ¼ãƒ‰ã«åˆ°é”ã§ãã¾ã›ã‚“。2) シャードãŒDNS経由ã§è§£æ±ºä¸å¯èƒ½ã§ã™ã€‚3) シャードã«ãƒ†ãƒ¼ãƒ–ルãŒå­˜åœ¨ã—ã¾ã›ã‚“。デフォルトã¯falseã§ã™ã€‚ + +#### bytes_to_throw_insert + +`bytes_to_throw_insert` - ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰INSERTã®ãŸã‚ã«ä¿ç•™ã•ã‚Œã‚‹åœ§ç¸®ãƒã‚¤ãƒˆæ•°ãŒã“ã®æ•°ã‚’超ãˆã‚‹ã¨ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚0 - 例外をスローã—ã¾ã›ã‚“。デフォルトã¯0ã§ã™ã€‚ + +#### bytes_to_delay_insert + +`bytes_to_delay_insert` - ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰INSERTã®ãŸã‚ã«ä¿ç•™ã•ã‚Œã‚‹åœ§ç¸®ãƒã‚¤ãƒˆæ•°ãŒã“ã®æ•°ã‚’超ãˆã‚‹ã¨ã‚¯ã‚¨ãƒªãŒé…延ã—ã¾ã™ã€‚0 - é…延ã—ã¾ã›ã‚“。デフォルトã¯0ã§ã™ã€‚ + +#### max_delay_to_insert + +`max_delay_to_insert` - ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰é€ä¿¡ã®ãŸã‚ã«å¤šãã®ä¿ç•™ãƒã‚¤ãƒˆãŒã‚ã‚‹å ´åˆã€Distributedテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹æœ€å¤§é…延時間(秒å˜ä½ï¼‰ã€‚デフォルトã¯60ã§ã™ã€‚ + +#### background_insert_batch + +`background_insert_batch` - [distributed_background_insert_batch](../../../operations/settings/settings.md#distributed_background_insert_batch) ã¨åŒã˜ + +#### background_insert_split_batch_on_failure + +`background_insert_split_batch_on_failure` - [distributed_background_insert_split_batch_on_failure](../../../operations/settings/settings.md#distributed_background_insert_split_batch_on_failure) ã¨åŒã˜ + +#### background_insert_sleep_time_ms + +`background_insert_sleep_time_ms` - [distributed_background_insert_sleep_time_ms](../../../operations/settings/settings.md#distributed_background_insert_sleep_time_ms) ã¨åŒã˜ + +#### background_insert_max_sleep_time_ms + +`background_insert_max_sleep_time_ms` - [distributed_background_insert_max_sleep_time_ms](../../../operations/settings/settings.md#distributed_background_insert_max_sleep_time_ms) ã¨åŒã˜ + +#### flush_on_detach + +`flush_on_detach` - DETACH/DROP/サーãƒãƒ¼ã‚·ãƒ£ãƒƒãƒˆãƒ€ã‚¦ãƒ³æ™‚ã«ãƒªãƒ¢ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã—ã¾ã™ã€‚デフォルトã¯trueã§ã™ã€‚ + +:::note +**è€ä¹…性ã®è¨­å®š** (`fsync_...`): + +- ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰INSERT(ã¤ã¾ã‚Šã€`distributed_foreground_insert=false`)ã«ã®ã¿å½±éŸ¿ã‚’与ãˆã€ãƒ‡ãƒ¼ã‚¿ãŒæœ€åˆã«ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ãƒŽãƒ¼ãƒ‰ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•ã‚Œã€å¾Œã§ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã‚·ãƒ£ãƒ¼ãƒ‰ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ +- 挿入æ“作ã®ãƒ‘フォーマンスを大幅ã«ä½Žä¸‹ã•ã›ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ +- Distributedテーブルフォルダ内ã«ä¿å­˜ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’ã€æŒ¿å…¥ã‚’å—ã‘入れãŸ**ノード**ã§æ›¸ã出ã™ã“ã¨ã«å½±éŸ¿ã‚’与ãˆã¾ã™ã€‚基盤ã¨ãªã‚‹MergeTreeテーブルã¸ã®ãƒ‡ãƒ¼ã‚¿æ›¸ãè¾¼ã¿ã®ä¿è¨¼ãŒå¿…è¦ãªå ´åˆ – `system.merge_tree_settings`内ã®è€ä¹…性ã®è¨­å®šï¼ˆ`...fsync...`)をå‚ç…§ã—ã¦ãã ã•ã„。 + +**挿入制é™ã®è¨­å®š** (`..._insert`) ã«ã¤ã„ã¦ã¯ã€æ¬¡ã‚‚å‚ç…§ã—ã¦ãã ã•ã„: + +- [distributed_foreground_insert](../../../operations/settings/settings.md#distributed_foreground_insert) 設定 +- [prefer_localhost_replica](../../../operations/settings/settings.md#prefer-localhost-replica) 設定 +- `bytes_to_throw_insert`ã¯`bytes_to_delay_insert`よりもå‰ã«å‡¦ç†ã•ã‚Œã‚‹ãŸã‚ã€`bytes_to_delay_insert`未満ã®å€¤ã«è¨­å®šã—ãªã„よã†ã«ã—ã¦ãã ã•ã„。 +::: + +**例** + +``` sql +CREATE TABLE hits_all AS hits +ENGINE = Distributed(logs, default, hits[, sharding_key[, policy_name]]) +SETTINGS + fsync_after_insert=0, + fsync_directories=0; +``` + +データã¯`logs`クラスタ内ã«ã‚ã‚‹ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ãƒªãƒ¢ãƒ¼ãƒˆã«ã‚ã‚‹`default.hits`テーブルã‹ã‚‰èª­ã¿å–られã¾ã™ã€‚データã¯èª­ã‚€ã ã‘ã§ãªãå¯èƒ½ãªé™ã‚Šãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã§éƒ¨åˆ†çš„ã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€`GROUP BY`を使ã£ãŸã‚¯ã‚¨ãƒªã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã§é›†ç´„ã•ã‚Œã€é›†è¨ˆé–¢æ•°ã®ä¸­é–“状態ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆå´ã®ã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ãã®å¾Œãƒ‡ãƒ¼ã‚¿ã¯ã•ã‚‰ã«é›†ç´„ã•ã‚Œã¾ã™ã€‚ + +データベースåã®ä»£ã‚ã‚Šã«ã€æ–‡å­—列を返ã™å®šæ•°å¼ã‚’使用ã§ãã¾ã™ã€‚例ãˆã°ï¼š`currentDatabase()`。 + +## クラスター {#distributed-clusters} + +クラスターã¯[サーãƒãƒ¼æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«](../../../operations/configuration-files.md) ã§è¨­å®šã•ã‚Œã¾ã™: + +``` xml + + + + + + + + + + + 1 + + false + + + 1 + example01-01-1 + 9000 + + + example01-01-2 + 9000 + + + + 2 + false + + example01-02-1 + 9000 + + + example01-02-2 + 1 + 9440 + + + + +``` + +ã“ã“ã§ã¯ã€`logs`ã¨ã„ã†åå‰ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãŒå®šç¾©ã•ã‚Œã¦ãŠã‚Šã€2ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã§æ§‹æˆã•ã‚Œã€ãã‚Œãžã‚ŒãŒ2ã¤ã®ãƒ¬ãƒ—リカをæŒã£ã¦ã„ã¾ã™ã€‚シャードã¯ãƒ‡ãƒ¼ã‚¿ã®ç•°ãªã‚‹éƒ¨åˆ†ã‚’å«ã‚€ã‚µãƒ¼ãƒãƒ¼ã‚’指ã—ã¾ã™ï¼ˆã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’読むã«ã¯ã™ã¹ã¦ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚レプリカã¯ã‚µãƒ¼ãƒãƒ¼ã‚’複製ã—ã¦ã„ã¾ã™ï¼ˆã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’読むã«ã¯ã€ä»»æ„ã®ãƒ¬ãƒ—リカã®ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼‰ã€‚ + +クラスターåã«ã¯ãƒ‰ãƒƒãƒˆã‚’å«ã‚ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +å„サーãƒãƒ¼ã«ã¯ã€`host`ã€`port`ã€ãŠã‚ˆã³ã‚ªãƒ—ションã§`user`ã€`password`ã€`secure`ã€`compression`ã®ãƒ‘ラメーターを指定ã—ã¾ã™: + +- `host` – リモートサーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ドメインã‹IPv4ã¾ãŸã¯IPv6ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’使用ã§ãã¾ã™ã€‚ドメインを指定ã—ãŸå ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯èµ·å‹•æ™‚ã«DNSリクエストを行ã„ã€ãã®çµæžœã‚’サーãƒãƒ¼ãŒç¨¼åƒã—ã¦ã„ã‚‹é–“ã¯ä¿æŒã—ã¾ã™ã€‚DNSリクエストãŒå¤±æ•—ã—ãŸå ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯èµ·å‹•ã—ã¾ã›ã‚“。DNSレコードを変更ã—ãŸå ´åˆã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã—ã¦ãã ã•ã„。 +- `port` – メッセンジャー活動用ã®TCPãƒãƒ¼ãƒˆï¼ˆè¨­å®šã®`tcp_port`ã€é€šå¸¸ã¯9000ã«è¨­å®šï¼‰ã€‚`http_port`ã¨æ··åŒã—ãªã„ã§ãã ã•ã„。 +- `user` – リモートサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å。デフォルト値ã¯`default`ユーザー。ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æŒ‡å®šã•ã‚ŒãŸã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚アクセスã¯`users.xml`ファイルã§è¨­å®šã•ã‚Œã¾ã™ã€‚詳細ã¯[アクセス権](../../../guides/sre/user-management/index.md)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 +- `password` – リモートサーãƒãƒ¼ã¸ã®æŽ¥ç¶šã®ãŸã‚ã®ãƒ‘スワード(マスクã•ã‚Œã¦ã„ãªã„)。デフォルト値: 空文字列。 +- `secure` - セキュアãªSSL/TLS接続を使用ã™ã‚‹ã‹ã©ã†ã‹ã€‚通常ã€ãƒãƒ¼ãƒˆã‚’指定ã™ã‚‹å¿…è¦ã‚‚ã‚ã‚Šã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚»ã‚­ãƒ¥ã‚¢ãƒãƒ¼ãƒˆã¯`9440`)。サーãƒãƒ¼ã¯`9440`をリッスンã—ã€æ­£ã—ã„証明書ã§æ§‹æˆã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- `compression` - データ圧縮を使用ã™ã‚‹ã‹ã©ã†ã‹ã€‚デフォルト値: `true`。 + +レプリカを指定ã™ã‚‹å ´åˆã€èª­ã¿è¾¼ã¿æ™‚ã«ã¯ä½¿ç”¨å¯èƒ½ãªãƒ¬ãƒ—リカã®ä¸­ã‹ã‚‰å„シャードã«å¯¾ã—ã¦1ã¤ã®ãƒ¬ãƒ—リカãŒé¸æŠžã•ã‚Œã¾ã™ã€‚è² è·åˆ†æ•£ï¼ˆã©ã®ãƒ¬ãƒ—リカã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã‹ã®å„ªå…ˆé †ä½ï¼‰ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’設定ã§ãã¾ã™ – [load_balancing](../../../operations/settings/settings.md#load_balancing)設定をå‚ç…§ã—ã¦ãã ã•ã„。サーãƒãƒ¼ã¨ã®æŽ¥ç¶šãŒç¢ºç«‹ã•ã‚Œãªã‹ã£ãŸå ´åˆã€çŸ­ã„タイムアウトã§æŽ¥ç¶šã®è©¦è¡ŒãŒè¡Œã‚ã‚Œã¾ã™ã€‚接続ãŒå¤±æ•—ã—ãŸå ´åˆã€æ¬¡ã®ãƒ¬ãƒ—リカãŒé¸æŠžã•ã‚Œã€ãれをã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«å¯¾ã—ã¦ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§æŽ¥ç¶šè©¦è¡ŒãŒå¤±æ•—ã—ãŸå ´åˆã€åŒã˜æ–¹æ³•ã§è¤‡æ•°å›žè©¦è¡Œã—ã¾ã™ã€‚ã“ã‚Œã¯å›žå¾©æ€§ã«å¯„与ã—ã¾ã™ãŒã€å®Œå…¨ãªãƒ•ã‚©ãƒ¼ãƒ«ãƒˆãƒˆãƒ¬ãƒ©ãƒ³ã‚¹ã‚’æä¾›ã™ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“:リモートサーãƒãƒ¼ã¯æŽ¥ç¶šã‚’å—ã‘入れるãŒã€æ©Ÿèƒ½ã—ãªã„ã‹ã€ã¾ãŸã¯æ­£å¸¸ã«æ©Ÿèƒ½ã—ã¾ã›ã‚“。 + +1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®ã¿ã‚’指定ã™ã‚‹ã“ã¨ã‚‚(ã“ã®å ´åˆã€ã‚¯ã‚¨ãƒªå‡¦ç†ã¯ãƒªãƒ¢ãƒ¼ãƒˆã¨å‘¼ã°ã‚Œã‚‹ã¹ãã§ã€åˆ†æ•£ã§ã¯ãªã„)や任æ„æ•°ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã¾ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚å„シャードã«ã¯1ã¤ã‹ã‚‰ä»»æ„æ•°ã®ãƒ¬ãƒ—リカを指定ã§ãã¾ã™ã€‚å„シャードã«ç•°ãªã‚‹æ•°ã®ãƒ¬ãƒ—リカを指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +ä»»æ„ã®æ•°ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’構æˆã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã‚ãªãŸã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’表示ã™ã‚‹ã«ã¯ã€`system.clusters`テーブルを使用ã—ã¦ãã ã•ã„。 + +`Distributed`エンジンã¯ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’ローカルサーãƒãƒ¼ã®ã‚ˆã†ã«æ“作ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ãŸã ã—ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®æ§‹æˆã¯ã‚µãƒ¼ãƒãƒ¼æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã§å‹•çš„ã«æŒ‡å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。通常ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å†…ã®ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã¯åŒã˜ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼æ§‹æˆã‚’æŒã£ã¦ã„ã‚‹ãŒï¼ˆå¿…é ˆã§ã¯ãªã„)ã€æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã¯ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã›ãšã«å‹•çš„ã«æ›´æ–°ã•ã‚Œã¾ã™ã€‚ + +未知ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚„レプリカã®ã‚»ãƒƒãƒˆã«æ¯Žå›žã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€`Distributed`テーブルを作æˆã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“ - `remote`テーブル関数を使用ã—ã¾ã™ã€‚セクション[テーブル関数](../../../sql-reference/table-functions/index.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## データã®æ›¸ã込㿠{#distributed-writing-data} + +クラスターã«ãƒ‡ãƒ¼ã‚¿ã‚’記録ã™ã‚‹æ–¹æ³•ã«ã¯äºŒã¤ã‚ã‚Šã¾ã™: + +ã¾ãšã€ã©ã®ã‚µãƒ¼ãƒãƒ¼ã«ã©ã®ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むã‹ã‚’定義ã—ã€å„シャードã«ç›´æŽ¥æ›¸ãè¾¼ã¿ã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€DistributedテーブルãŒæŒ‡ã™ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å†…ã®ãƒªãƒ¢ãƒ¼ãƒˆãƒ†ãƒ¼ãƒ–ルã«ç›´æŽ¥`INSERT`ステートメントを実行ã—ã¾ã™ã€‚ã“ã‚Œã¯æœ€ã‚‚柔軟ãªè§£æ±ºç­–ã§ã‚ã‚Šã€éžè‡ªæ˜Žãªã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚¹ã‚­ãƒ¼ãƒ ã§ã‚‚使用å¯èƒ½ã§ã™ã€‚ã¾ãŸã€ã“ã®è§£æ±ºç­–ã¯æœ€ã‚‚最é©ã§ã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã¯å®Œå…¨ã«ç‹¬ç«‹ã—ã¦ç•°ãªã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã«æ›¸ã込むã“ã¨ãŒã§ãã¾ã™ã€‚ + +第二ã«ã€`Distributed`テーブルã«`INSERT`ステートメントを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã¯æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’サーãƒãƒ¼ã«è‡ªåˆ†ã§åˆ†é…ã—ã¾ã™ã€‚`Distributed`テーブルã«æ›¸ã込むãŸã‚ã«ã¯ã€`sharding_key`パラメータãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆã‚·ãƒ£ãƒ¼ãƒ‰ãŒä¸€ã¤ã—ã‹ãªã„å ´åˆã¯é™¤ã)。 + +å„シャードã«ã¯æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã§``を定義ã§ãã¾ã™ã€‚デフォルトã§ã¯é‡ã•ã¯`1`ã§ã™ã€‚データã¯ã‚·ãƒ£ãƒ¼ãƒ‰ã®é‡ã•ã«æ¯”例ã—ã¦åˆ†é…ã•ã‚Œã¾ã™ã€‚ã™ã¹ã¦ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®é‡ã¿ã‚’足ã—ã€ãã®å¾Œå„シャードã®é‡ã¿ã‚’åˆè¨ˆã§å‰²ã‚Šã€ãã‚Œãžã‚Œã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®å‰²åˆã‚’決ã‚ã¾ã™ã€‚例ãˆã°ã€äºŒã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ãŒã‚ã‚Šã€æœ€åˆã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®é‡ã¿ãŒ1ã§ã€äºŒç•ªç›®ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®é‡ã¿ãŒ2ã®å ´åˆã€æœ€åˆã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«ã¯æŒ¿å…¥è¡Œã®ä¸‰åˆ†ã®ä¸€ï¼ˆ1 / 3)ãŒé€ä¿¡ã•ã‚Œã€äºŒç•ªç›®ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«ã¯ä¸‰åˆ†ã®äºŒï¼ˆ2 / 3)ãŒé€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +å„シャードã«ã¯æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã§`internal_replication`パラメータãŒå®šç¾©ã§ãã¾ã™ã€‚ã“ã®ãƒ‘ラメータãŒ`true`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€æ›¸ãè¾¼ã¿æ“作ã¯æœ€åˆã®å¥å…¨ãªãƒ¬ãƒ—リカをé¸æŠžã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’書ãè¾¼ã¿ã¾ã™ã€‚`Distributed`テーブルを基ã«ã—ã¦ã„るテーブルãŒãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル(例:`Replicated*MergeTree`テーブルエンジン)ã§ã‚ã‚‹å ´åˆã«ä½¿ç”¨ã—ã¾ã™ã€‚テーブルレプリカã®ä¸€ã¤ãŒæ›¸ãè¾¼ã¿ã‚’å—ã‘å–ã‚Šã€è‡ªå‹•çš„ã«ä»–ã®ãƒ¬ãƒ—リカã«ãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚ + +`internal_replication`ãŒ`false`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ã€ãƒ‡ãƒ¼ã‚¿ã¯ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ã“ã®å ´åˆã€`Distributed`テーブル自身ãŒãƒ‡ãƒ¼ã‚¿ã‚’レプリケートã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを使用ã™ã‚‹ã“ã¨ã‚ˆã‚Šã‚‚劣りã¾ã™ã€‚ãªãœãªã‚‰ã€ãƒ¬ãƒ—リカã®æ•´åˆæ€§ãŒç¢ºèªã•ã‚Œãšã€æ™‚é–“ã¨å…±ã«ã‚ãšã‹ã«ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ã“ã¨ã«ãªã‚‹ã‹ã‚‰ã§ã™ã€‚ + +データã®è¡Œã‚’é€ä¿¡ã™ã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’é¸æŠžã™ã‚‹ãŸã‚ã«ã€ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°å¼ãŒåˆ†æžã•ã‚Œã€ãã®ä½™ã‚Šã¯ã‚·ãƒ£ãƒ¼ãƒ‰ã®ç·é‡ã¿ã§å‰²ã‚Šã¾ã™ã€‚è¡Œã¯ã€`prev_weights`ã‹ã‚‰`prev_weights + weight`ã¾ã§ã®ä½™ã‚Šã®åŠé–‹åŒºé–“ã«å¯¾å¿œã™ã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã«é€ã‚‰ã‚Œã¾ã™ã€‚ã“ã“ã§ã€`prev_weights`ã¯æœ€å°æ•°ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®ç·é‡ã¿ã§ã€`weight`ã¯ã“ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®é‡ã¿ã§ã™ã€‚例ãˆã°ã€äºŒã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ãŒã‚ã‚Šã€æœ€åˆã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®é‡ã¿ãŒ9ã§ã€äºŒç•ªç›®ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®é‡ã¿ãŒ10ã®å ´åˆã€è¡Œã¯ä½™ã‚ŠãŒç¯„囲\[0, 9)ã®ã¨ã最åˆã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«é€ä¿¡ã•ã‚Œã€\[9, 19)ã®ã¨ã二番目ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +シャーディングå¼ã¯ã€æ•´æ•°ã‚’è¿”ã™å®šæ•°ãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル列ã‹ã‚‰æ§‹æˆã•ã‚Œã‚‹ä»»æ„ã®å¼ã§ã‚ã‚Šå¾—ã¾ã™ã€‚例ãˆã°ã€ãƒ‡ãƒ¼ã‚¿ã®ãƒ©ãƒ³ãƒ€ãƒ ãªåˆ†é…ã«ã¯`rand()`ã‚’ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®IDã§ã®åˆ†é…ã«ã¯`UserID`を使ã†ã“ã¨ãŒã§ãã¾ã™ï¼ˆã“ã®å ´åˆã€å˜ä¸€ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ‡ãƒ¼ã‚¿ãŒå˜ä¸€ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«å­˜åœ¨ã™ã‚‹ã®ã§ã€`IN`ã‚„`JOIN`をユーザーã§å®Ÿè¡Œã™ã‚‹ã®ãŒç°¡å˜ã§ã™ï¼‰ã€‚ã„ãšã‚Œã‹ã®åˆ—ãŒå分ã«å‡ç­‰ã«åˆ†æ•£ã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã§ãƒ©ãƒƒãƒ—ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼ˆä¾‹: `intHash64(UserID)`)。 + +å˜ç´”ãªé™¤ç®—ã®ä½™ã‚Šã¯ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã«ã¨ã£ã¦åˆ¶é™ã•ã‚ŒãŸè§£æ±ºç­–ã§ã‚ã‚Šã€å¸¸ã«é©åˆ‡ã§ã‚ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。中è¦æ¨¡ãŠã‚ˆã³å¤§è¦æ¨¡ã®ãƒ‡ãƒ¼ã‚¿ï¼ˆæ•°åå°ã®ã‚µãƒ¼ãƒãƒ¼ï¼‰ã«ã¯æ©Ÿèƒ½ã—ã¾ã™ãŒã€éžå¸¸ã«å¤§ããªãƒ‡ãƒ¼ã‚¿é‡ï¼ˆæ•°ç™¾å°ä»¥ä¸Šã®ã‚µãƒ¼ãƒãƒ¼ï¼‰ã«ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。後者ã®å ´åˆã€`Distributed`テーブル内ã®ã‚¨ãƒ³ãƒˆãƒªã‚’使用ã™ã‚‹ã®ã§ã¯ãªãã€å¯¾è±¡é ˜åŸŸãŒæ±‚ã‚るシャーディングスキームを使用ã—ã¾ã™ã€‚ + +次ã®å ´åˆã«ã¯ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚¹ã‚­ãƒ¼ãƒ ã‚’検討ã™ã¹ãã§ã™: + +- 特定ã®ã‚­ãƒ¼ã§ã®ãƒ‡ãƒ¼ã‚¿ã®çµåˆï¼ˆ`IN`ã¾ãŸã¯`JOIN`)をè¦æ±‚ã™ã‚‹ã‚¯ã‚¨ãƒªãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€‚ã“ã®ã‚­ãƒ¼ã§ãƒ‡ãƒ¼ã‚¿ãŒã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã•ã‚Œã¦ã„ã‚‹å ´åˆã€`GLOBAL IN`ã¾ãŸã¯`GLOBAL JOIN`を使用ã™ã‚‹ã“ã¨ãªãã€ãƒ­ãƒ¼ã‚«ãƒ«`IN`ã¾ãŸã¯`JOIN`を使用ã™ã‚‹ã“ã¨ãŒã§ãã€ã¯ã‚‹ã‹ã«åŠ¹çŽ‡çš„ã§ã™ã€‚ +- 大é‡ã®ã‚µãƒ¼ãƒãƒ¼ãŒä½¿ç”¨ã•ã‚Œï¼ˆæ•°ç™¾å°ä»¥ä¸Šï¼‰ã€å°‘é‡ã®ã‚¯ã‚¨ãƒªãŒå­˜åœ¨ã™ã‚‹å ´åˆï¼ˆä¾‹ãˆã°å€‹ã€…ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¯ã‚¨ãƒªï¼‰ã€‚å°ã•ãªã‚¯ã‚¨ãƒªãŒã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å…¨ä½“ã«å½±éŸ¿ã‚’与ãˆãªã„よã†ã«ã™ã‚‹ãŸã‚ã€ä¸€ã¤ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ãƒ‡ãƒ¼ã‚¿ã‚’一ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«é…ç½®ã™ã‚‹ã“ã¨ã«æ„味ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã¯ã€éšŽå±¤ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’設定ã—ã¾ã™ã€‚クラスター全体を「レイヤーã€ã«åˆ†å‰²ã—ã€ãƒ¬ã‚¤ãƒ¤ãƒ¼ã¯è¤‡æ•°ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã§æ§‹æˆã•ã‚Œã€å˜ä¸€ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãŒä¸€ã¤ã®ãƒ¬ã‚¤ãƒ¤ãƒ¼ã«é…ç½®ã•ã‚Œã¾ã™ãŒã€å¿…è¦ã«å¿œã˜ã¦ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’レイヤーã«è¿½åŠ ã—ã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ©ãƒ³ãƒ€ãƒ ã«åˆ†é…ã•ã‚Œã¾ã™ã€‚å„レイヤーã®ãŸã‚ã«`Distributed`テーブルを作æˆã—ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚¯ã‚¨ãƒªç”¨ã®å˜ä¸€ã®å…±æœ‰Distributed テーブルを作æˆã—ã¾ã™ã€‚ + +データã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚テーブルã«æŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ãŸã æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚データã¯å¯èƒ½ãªé™ã‚Šã™ãã«ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§é€ä¿¡ã•ã‚Œã¾ã™ã€‚データをé€ä¿¡ã™ã‚‹å‘¨æœŸæ€§ã¯ã€[distributed_background_insert_sleep_time_ms](../../../operations/settings/settings.md#distributed_background_insert_sleep_time_ms) ãŠã‚ˆã³ [distributed_background_insert_max_sleep_time_ms](../../../operations/settings/settings.md#distributed_background_insert_max_sleep_time_ms) 設定ã«ã‚ˆã£ã¦ç®¡ç†ã•ã‚Œã¾ã™ã€‚`Distributed`エンジンã¯ã€æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’分離ã—ã¦å„ファイルをé€ä¿¡ã—ã¾ã™ãŒã€[distributed_background_insert_batch](../../../operations/settings/settings.md#distributed_background_insert_batch)設定を有効ã«ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ãƒãƒƒãƒã§é€ä¿¡ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®è¨­å®šã«ã‚ˆã‚Šã€ãƒ­ãƒ¼ã‚«ãƒ«ã‚µãƒ¼ãƒãƒ¼ã‚„ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒªã‚½ãƒ¼ã‚¹ã®åˆ©ç”¨ã‚’最é©åŒ–ã—ã€ã‚¯ãƒ©ã‚¹ã‚¿ã®ãƒ‘フォーマンスをå‘上ã•ã›ã¾ã™ã€‚データãŒæ­£å¸¸ã«é€ä¿¡ã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’確èªã™ã‚‹ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルディレクトリã«ã‚るファイル(é€ä¿¡å¾…ã¡ã®ãƒ‡ãƒ¼ã‚¿ï¼‰ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š`/var/lib/clickhouse/data/database/table/`。ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¿ã‚¹ã‚¯ã‚’実行ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã¯ã€[background_distributed_schedule_pool_size](../../../operations/settings/settings.md#background_distributed_schedule_pool_size)設定ã§è¨­å®šã§ãã¾ã™ã€‚ + +サーãƒãƒ¼ãŒæ¶ˆå¤±ã—ãŸã‚Šã€`Distributed`テーブルã¸ã®`INSERT`ã®å¾Œã§ãƒ©ãƒ•ãªå†èµ·å‹•ã‚’ã—ãŸå ´åˆï¼ˆä¾‹ãˆã°ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®æå‚·ã«ã‚ˆã‚‹ï¼‰ã€æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯å¤±ã‚れるå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚テーブルディレクトリã§æå‚·ã—ãŸãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ãŒæ¤œå‡ºã•ã‚ŒãŸå ´åˆã€ãã®ãƒ‡ãƒ¼ã‚¿ã¯`broken`サブディレクトリã«è»¢é€ã•ã‚Œã€ã‚‚ã†ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。 + +## データã®èª­ã¿å–ã‚Š {#distributed-reading-data} + +`Distributed`テーブルã«ã‚¯ã‚¨ãƒªã‚’投ã’ã‚‹ã¨ã€`SELECT`クエリãŒã™ã¹ã¦ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«é€ä¿¡ã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿ãŒã‚·ãƒ£ãƒ¼ãƒ‰é–“ã§å®Œå…¨ã«ãƒ©ãƒ³ãƒ€ãƒ ã«åˆ†æ•£ã—ã¦ã„ã‚‹å ´åˆã‚‚機能ã—ã¾ã™ã€‚æ–°ã—ã„シャードを追加ã™ã‚‹éš›ã«ã¯ã€å¤ã„データをãã“ã«ç§»å‹•ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。代ã‚ã‚Šã«ã€ã‚ˆã‚Šé«˜ã„é‡ã¿ã§æ–°ã—ã„データを書ã込むã“ã¨ãŒã§ãã¾ã™ã€‚データãŒã‚ãšã‹ã«ä¸å‡ç­‰ã«åˆ†å¸ƒã•ã‚Œã¾ã™ãŒã€ã‚¯ã‚¨ãƒªã¯æ­£ã—ã効率的ã«å‹•ä½œã—ã¾ã™ã€‚ + +`max_parallel_replicas`オプションãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªå‡¦ç†ã¯åŒä¸€ã‚·ãƒ£ãƒ¼ãƒ‰å†…ã®ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«ã¾ãŸãŒã£ã¦ä¸¦è¡ŒåŒ–ã•ã‚Œã¾ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](../../../operations/settings/settings.md#max_parallel_replicas)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +Distributed `in`クエリãŠã‚ˆã³`global in`クエリã®å‡¦ç†æ–¹æ³•ã«ã¤ã„ã¦å­¦ã¶ã«ã¯ã€[ã“ã¡ã‚‰](../../../sql-reference/operators/in.md#select-distributed-subqueries)ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 仮想カラム {#virtual-columns} + +#### _shard_num + +`_shard_num` — テーブル`system.clusters`ã®`shard_num`値ãŒæ ¼ç´ã•ã‚Œã‚‹ã€‚タイプ: [UInt32](../../../sql-reference/data-types/int-uint.md)。 + +:::note +[remote](../../../sql-reference/table-functions/remote.md)ãŠã‚ˆã³[cluster](../../../sql-reference/table-functions/cluster.md)テーブル関数ã¯å†…部的ã«ä¸€æ™‚çš„ã«Distributedテーブルを作æˆã™ã‚‹ãŸã‚ã€`_shard_num`ã¯ãã“ã§ã‚‚利用å¯èƒ½ã§ã™ã€‚ +::: + +**関連リンク** + +- [仮想カラム](../../../engines/table-engines/index.md#table_engines-virtual_columns) ã®èª¬æ˜Ž +- [background_distributed_schedule_pool_size](../../../operations/settings/settings.md#background_distributed_schedule_pool_size) 設定 +- [shardNum()](../../../sql-reference/functions/other-functions.md#shardnum)ãŠã‚ˆã³[shardCount()](../../../sql-reference/functions/other-functions.md#shardcount)関数 diff --git a/docs/ja/engines/table-engines/special/executable.md b/docs/ja/engines/table-engines/special/executable.md new file mode 100644 index 00000000000..215f6ac2885 --- /dev/null +++ b/docs/ja/engines/table-engines/special/executable.md @@ -0,0 +1,224 @@ +--- +slug: /ja/engines/table-engines/special/executable +sidebar_position: 40 +sidebar_label: Executable +--- + +# Executable ãŠã‚ˆã³ ExecutablePool テーブルエンジン + +`Executable` ãŠã‚ˆã³ `ExecutablePool` テーブルエンジンを使用ã™ã‚‹ã¨ã€**stdout** ã«è¡Œã‚’書ã込むã“ã¨ã«ã‚ˆã£ã¦å®šç¾©ã—ãŸã‚¹ã‚¯ãƒªãƒ—トã‹ã‚‰è¡Œã‚’生æˆã™ã‚‹ãƒ†ãƒ¼ãƒ–ルを定義ã§ãã¾ã™ã€‚実行スクリプト㯠`users_scripts` ディレクトリã«ä¿å­˜ã•ã‚Œã€ä»»æ„ã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- `Executable` テーブル: スクリプトã¯å„クエリã§å®Ÿè¡Œã•ã‚Œã¾ã™ +- `ExecutablePool` テーブル: プール内ã§æ°¸ç¶šçš„ãªãƒ—ロセスを維æŒã—ã€èª­ã¿å–ã‚Šã®ãŸã‚ã«ãƒ—ールã‹ã‚‰ãƒ—ロセスをå–å¾—ã—ã¾ã™ + +ä»»æ„㧠1 ã¤ä»¥ä¸Šã®å…¥åŠ›ã‚¯ã‚¨ãƒªã‚’å«ã‚ã€ãれらã®çµæžœã‚’ **stdin** ã«ã‚¹ãƒˆãƒªãƒ¼ãƒ ã—ã¦ã‚¹ã‚¯ãƒªãƒ—トãŒèª­ã¿å–れるよã†ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## Executable テーブルã®ä½œæˆ + +`Executable` テーブルエンジンã¯ã€ã‚¹ã‚¯ãƒªãƒ—トã®åå‰ã¨å—信データã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã® 2 ã¤ã®ãƒ‘ラメータを必è¦ã¨ã—ã¾ã™ã€‚ä»»æ„㧠1 ã¤ä»¥ä¸Šã®å…¥åŠ›ã‚¯ã‚¨ãƒªã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +```sql +Executable(script_name, format, [input_query...]) +``` + +以下ã¯ã€`Executable` テーブルã«é–¢ã™ã‚‹è¨­å®šã§ã™ï¼š + +- `send_chunk_header` + - 説明: ãƒãƒ£ãƒ³ã‚¯å‡¦ç†ã®å‰ã«å„ãƒãƒ£ãƒ³ã‚¯ã®è¡Œæ•°ã‚’é€ä¿¡ã—ã¾ã™ã€‚ã“ã®è¨­å®šã«ã‚ˆã£ã¦ãƒªã‚½ãƒ¼ã‚¹ã®ä¸€éƒ¨ã‚’事å‰ã«å‰²ã‚Šå½“ã¦ã‚‹è„šæœ¬ã‚’書ãã®ã«å½¹ç«‹ã¡ã¾ã™ + - デフォルト値: false +- `command_termination_timeout` + - 説明: コマンド終了タイムアウト(秒å˜ä½ï¼‰ + - デフォルト値: 10 +- `command_read_timeout` + - 説明: コマンド stdout ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆãƒŸãƒªç§’å˜ä½ï¼‰ + - デフォルト値: 10000 +- `command_write_timeout` + - 説明: コマンド stdin ã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むãŸã‚ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆãƒŸãƒªç§’å˜ä½ï¼‰ + - デフォルト値: 10000 + +例を見ã¦ã¿ã¾ã—ょã†ã€‚ã“ã® Python スクリプト㯠`my_script.py` ã¨å付ã‘られã€`user_scripts` フォルダã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ãã‚Œã¯æ•°å€¤ `i` を読ã¿å–ã‚Šã€å„文字列ãŒã‚¿ãƒ–ã§åŒºåˆ‡ã‚‰ã‚ŒãŸç•ªå·ã¨ã¨ã‚‚ã«ã€`i` 個ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæ–‡å­—列を出力ã—ã¾ã™ï¼š + +```python +#!/usr/bin/python3 + +import sys +import string +import random + +def main(): + + # 入力値を読ã¿å–ã‚‹ + for number in sys.stdin: + i = int(number) + + # ランダムãªè¡Œã‚’生æˆã™ã‚‹ + for id in range(0, i): + letters = string.ascii_letters + random_string = ''.join(random.choices(letters ,k=10)) + print(str(id) + '\t' + random_string + '\n', end='') + + # çµæžœã‚’ stdout ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹ + sys.stdout.flush() + +if __name__ == "__main__": + main() +``` + +次㮠`my_executable_table` 㯠`my_script.py` ã®å‡ºåŠ›ã‹ã‚‰æ§‹ç¯‰ã•ã‚Œã¦ãŠã‚Šã€`my_executable_table` ã‹ã‚‰ `SELECT` を実行ã™ã‚‹ãŸã³ã« 10 個ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæ–‡å­—列を生æˆã—ã¾ã™ï¼š + +```sql +CREATE TABLE my_executable_table ( + x UInt32, + y String +) +ENGINE = Executable('my_script.py', TabSeparated, (SELECT 10)) +``` + +テーブルを作æˆã—ã¦ã‚‚å³åº§ã«ã‚¹ã‚¯ãƒªãƒ—トを実行ã™ã‚‹ã“ã¨ã¯ãªãã€`my_executable_table` をクエリã™ã‚‹ã¨ã‚¹ã‚¯ãƒªãƒ—トãŒå®Ÿè¡Œã•ã‚Œã¾ã™ï¼š + +```sql +SELECT * FROM my_executable_table +``` + +```response +┌─x─┬─y──────────┠+│ 0 │ BsnKBsNGNH │ +│ 1 │ mgHfBCUrWM │ +│ 2 │ iDQAVhlygr │ +│ 3 │ uNGwDuXyCk │ +│ 4 │ GcFdQWvoLB │ +│ 5 │ UkciuuOTVO │ +│ 6 │ HoKeCdHkbs │ +│ 7 │ xRvySxqAcR │ +│ 8 │ LKbXPHpyDI │ +│ 9 │ zxogHTzEVV │ +└───┴────────────┘ +``` + +## クエリçµæžœã‚’スクリプトã«æ¸¡ã™ + +Hacker News ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚³ãƒ¡ãƒ³ãƒˆã‚’残ã—ã¾ã™ã€‚Python ã«ã¯è‡ªç„¶è¨€èªžå‡¦ç†ã®ãƒ„ールキット(`nltk`)ãŒã‚ã‚Šã€ã‚³ãƒ¡ãƒ³ãƒˆãŒãƒã‚¸ãƒ†ã‚£ãƒ–ã€ãƒã‚¬ãƒ†ã‚£ãƒ–ã€ã‚ã‚‹ã„ã¯ä¸­ç«‹ã§ã‚ã‚‹ã‹ã‚’判定ã™ã‚‹ `SentimentIntensityAnalyzer` ãŒå­˜åœ¨ã—ã¾ã™ã€‚Hacker News ã®ã‚³ãƒ¡ãƒ³ãƒˆã®æ„Ÿæƒ…ã‚’ `nltk` を使用ã—ã¦è¨ˆç®—ã™ã‚‹ `Executable` テーブルを作æˆã—ã¦ã¿ã¾ã—ょã†ã€‚ + +ã“ã®ä¾‹ã§ã¯ã€[ã“ã®ãƒšãƒ¼ã‚¸](https://clickhouse.com/docs/ja/engines/table-engines/mergetree-family/invertedindexes/#full-text-search-of-the-hacker-news-dataset)ã§èª¬æ˜Žã•ã‚Œã¦ã„ã‚‹ `hackernews` テーブルを使用ã—ã¾ã™ã€‚`hackernews` テーブルã«ã¯ `UInt64` タイプ㮠`id` カラム㨠`comment` ã¨ã„ã†åå‰ã® `String` カラムãŒã‚ã‚Šã¾ã™ã€‚ã¾ãšã¯ `Executable` テーブルを定義ã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +CREATE TABLE sentiment ( + id UInt64, + sentiment Float32 +) +ENGINE = Executable( + 'sentiment.py', + TabSeparated, + (SELECT id, comment FROM hackernews WHERE id > 0 AND comment != '' LIMIT 20) +); +``` + +`sentiment` テーブルã«ã¤ã„ã¦ã„ãã¤ã‹ã®ã‚³ãƒ¡ãƒ³ãƒˆï¼š + +- ファイル `sentiment.py` 㯠`user_scripts` フォルダã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ï¼ˆ`user_scripts_path` 設定ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ•ã‚©ãƒ«ãƒ€ï¼‰ +- `TabSeparated` フォーマットã¯ã€Python スクリプトãŒã‚¿ãƒ–区切りã®å€¤ã‚’å«ã‚€ç”Ÿãƒ‡ãƒ¼ã‚¿è¡Œã‚’生æˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ +- クエリ㯠`hackernews` ã‹ã‚‰ 2 ã¤ã®ã‚«ãƒ©ãƒ ã‚’é¸æŠžã—ã¦ã„ã¾ã™ã€‚Python スクリプトã¯ãれらã®ã‚«ãƒ©ãƒ å€¤ã‚’入力行ã‹ã‚‰è§£æžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ + +`sentiment.py` ã®å®šç¾©ã¯ã“ã¡ã‚‰ã§ã™ï¼š + +```python +#!/usr/local/bin/python3.9 + +import sys +import nltk +from nltk.sentiment import SentimentIntensityAnalyzer + +def main(): + sentiment_analyzer = SentimentIntensityAnalyzer() + + while True: + try: + row = sys.stdin.readline() + if row == '': + break + + split_line = row.split("\t") + + id = str(split_line[0]) + comment = split_line[1] + + score = sentiment_analyzer.polarity_scores(comment)['compound'] + print(id + '\t' + str(score) + '\n', end='') + sys.stdout.flush() + except BaseException as x: + break + +if __name__ == "__main__": + main() +``` + +Python スクリプトã«é–¢ã™ã‚‹ã‚³ãƒ¡ãƒ³ãƒˆï¼š + +- 機能ã•ã›ã‚‹ãŸã‚ã«ã¯ `nltk.downloader.download('vader_lexicon')` を実行ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã‚¹ã‚¯ãƒªãƒ—ト内ã«é…ç½®ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ãŒã€ãã†ã™ã‚‹ã¨ `sentiment` テーブルã®å„クエリ実行ã”ã¨ã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ãŸã‚éžåŠ¹çŽ‡ã§ã™ +- `row` ã®å„値㯠`SELECT id, comment FROM hackernews WHERE id > 0 AND comment != '' LIMIT 20` ã®çµæžœã‚»ãƒƒãƒˆå†…ã®è¡Œã§ã™ +- 入力行ã¯ã‚¿ãƒ–区切りãªã®ã§ã€Python ã® `split` 関数を使ã£ã¦ `id` 㨠`comment` を解æžã—ã¾ã™ +- `polarity_scores` ã®çµæžœã¯ JSON オブジェクトã§ã€ã„ãã¤ã‹ã®å€¤ã‚’æŒã¡ã¾ã™ã€‚ã“ã“ã§ã¯ãã® JSON オブジェクト㮠`compound` 値ã ã‘ã‚’å–å¾—ã™ã‚‹ã“ã¨ã«ã—ã¾ã—㟠+- ClickHouse ã® `sentiment` テーブル㯠`TabSeparated` フォーマットを使用ã—ã€2 ã¤ã®ã‚«ãƒ©ãƒ ã‚’å«ã‚€ã®ã§ã€`print` 関数ã§ãれらã®ã‚«ãƒ©ãƒ ã‚’タブã§åŒºåˆ‡ã£ã¦ã„ã¾ã™ + +`sentiment` テーブルã‹ã‚‰è¡Œã‚’é¸æŠžã™ã‚‹ã‚¯ã‚¨ãƒªã‚’書ããŸã³ã«ã€`SELECT id, comment FROM hackernews WHERE id > 0 AND comment != '' LIMIT 20` クエリãŒå®Ÿè¡Œã•ã‚Œã€ãã®çµæžœãŒ `sentiment.py` ã«æ¸¡ã•ã‚Œã¾ã™ã€‚試ã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT * +FROM sentiment +``` + +レスãƒãƒ³ã‚¹ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```response +┌───────id─┬─sentiment─┠+│ 7398199 │ 0.4404 │ +│ 21640317 │ 0.1779 │ +│ 21462000 │ 0 │ +│ 25168863 │ 0 │ +│ 25168978 │ -0.1531 │ +│ 25169359 │ 0 │ +│ 25169394 │ -0.9231 │ +│ 25169766 │ 0.4137 │ +│ 25172570 │ 0.7469 │ +│ 25173687 │ 0.6249 │ +│ 28291534 │ 0 │ +│ 28291669 │ -0.4767 │ +│ 28291731 │ 0 │ +│ 28291949 │ -0.4767 │ +│ 28292004 │ 0.3612 │ +│ 28292050 │ -0.296 │ +│ 28292322 │ 0 │ +│ 28295172 │ 0.7717 │ +│ 28295288 │ 0.4404 │ +│ 21465723 │ -0.6956 │ +└──────────┴───────────┘ +``` + +## ExecutablePool テーブルã®ä½œæˆ + +`ExecutablePool` ã®æ–‡æ³•ã¯ `Executable` ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€`ExecutablePool` テーブルã«ã¯ã„ãã¤ã‹ã®ç‰¹æœ‰ã®è¨­å®šãŒã‚ã‚Šã¾ã™ï¼š + +- `pool_size` + - 説明: プロセスプールã®ã‚µã‚¤ã‚ºã€‚サイズãŒ0ã®å ´åˆã€ã‚µã‚¤ã‚ºåˆ¶é™ã¯ã‚ã‚Šã¾ã›ã‚“ + - デフォルト値: 16 +- `max_command_execution_time` + - 説明: コマンドã®æœ€å¤§å®Ÿè¡Œæ™‚間(秒å˜ä½ï¼‰ + - デフォルト値: 10 + +上記㮠`sentiment` テーブルを `Executable` ã§ã¯ãªã `ExecutablePool` を使用ã™ã‚‹ã‚ˆã†ã«ç°¡å˜ã«å¤‰æ›ã§ãã¾ã™ï¼š + +```sql +CREATE TABLE sentiment_pooled ( + id UInt64, + sentiment Float32 +) +ENGINE = ExecutablePool( + 'sentiment.py', + TabSeparated, + (SELECT id, comment FROM hackernews WHERE id > 0 AND comment != '' LIMIT 20000) +) +SETTINGS + pool_size = 4; +``` + +クライアント㌠`sentiment_pooled` テーブルをクエリã™ã‚‹ã¨ã€ClickHouse ã¯ã‚ªãƒ³ãƒ‡ãƒžãƒ³ãƒ‰ã§ 4 ã¤ã®ãƒ—ロセスを維æŒã—ã¾ã™ã€‚ diff --git a/docs/ja/engines/table-engines/special/external-data.md b/docs/ja/engines/table-engines/special/external-data.md new file mode 100644 index 00000000000..7b8ff5adc16 --- /dev/null +++ b/docs/ja/engines/table-engines/special/external-data.md @@ -0,0 +1,64 @@ +--- +slug: /ja/engines/table-engines/special/external-data +sidebar_position: 130 +sidebar_label: 外部データ +--- + +# クエリ処ç†ç”¨ã®å¤–部データ + +ClickHouseã§ã¯ã€`SELECT`クエリã¨ä¸€ç·’ã«ã€ã‚¯ã‚¨ãƒªã®å‡¦ç†ã«å¿…è¦ãªãƒ‡ãƒ¼ã‚¿ã‚’サーãƒã«é€ä¿¡ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ä¸€æ™‚テーブル(「一時テーブルã€ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚照)ã«ç½®ã‹ã‚Œã€ã‚¯ã‚¨ãƒªã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆä¾‹ãˆã°ã€`IN`演算å­å†…ã§ï¼‰ã€‚ + +例ãˆã°ã€é‡è¦ãªãƒ¦ãƒ¼ã‚¶ãƒ¼è­˜åˆ¥å­ã‚’æŒã¤ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚‹å ´åˆã€ã“ã®ãƒªã‚¹ãƒˆã«ã‚ˆã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã†ã‚¯ã‚¨ãƒªã¨ä¸€ç·’ã«ã€ã‚µãƒ¼ãƒã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +大é‡ã®å¤–部データã§è¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ã“ã®æ©Ÿèƒ½ã¯ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’事å‰ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹æ–¹ãŒè‰¯ã„ã§ã™ã€‚ + +外部データã¯ã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆï¼ˆéžå¯¾è©±ãƒ¢ãƒ¼ãƒ‰ï¼‰ã‚„HTTPインターフェースを使用ã—ã¦ã‚¢ãƒƒãƒ—ロードã§ãã¾ã™ã€‚ + +コマンドラインクライアントã§ã¯ã€æ¬¡ã®å½¢å¼ã§ãƒ‘ラメータセクションを指定ã§ãã¾ã™ã€‚ + +``` bash +--external --file=... [--name=...] [--format=...] [--types=...|--structure=...] +``` + +ã“ã®ã‚ˆã†ãªã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’複数æŒã¤ã“ã¨ãŒã§ãã€é€ä¿¡ã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã®æ•°ã«å¿œã˜ã¾ã™ã€‚ + +**–external** – 節ã®é–‹å§‹ã‚’示ã—ã¾ã™ã€‚ +**–file** – テーブルダンプã®ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘スã€ã¾ãŸã¯stdinを指ã™-ã§ã™ã€‚stdinã‹ã‚‰ã¯1ã¤ã®ãƒ†ãƒ¼ãƒ–ルã—ã‹å–å¾—ã§ãã¾ã›ã‚“。 + +以下ã®ãƒ‘ラメータã¯ä»»æ„ã§ã™:**–name**– テーブルã®åå‰ã€‚çœç•¥ã—ãŸå ´åˆã€_dataãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +**–format** – ファイル内ã®ãƒ‡ãƒ¼ã‚¿å½¢å¼ã€‚çœç•¥ã—ãŸå ´åˆã€TabSeparatedãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +次ã®ã„ãšã‚Œã‹ã®ãƒ‘ラメータã¯å¿…é ˆã§ã™:**–types** – カンマã§åŒºåˆ‡ã‚‰ã‚ŒãŸã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã®ãƒªã‚¹ãƒˆã€‚例: `UInt64,String`。カラムã¯_1, _2, ...ã¨å‘½åã•ã‚Œã¾ã™ã€‚ +**–structure**– テーブル構造ã§`UserID UInt64`, `URL String`ã®å½¢å¼ã§å®šç¾©ã€‚カラムåã¨ã‚¿ã‚¤ãƒ—を定義ã—ã¾ã™ã€‚ + +‘file’ã§æŒ‡å®šã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€â€˜format’ã§æŒ‡å®šã•ã‚ŒãŸå½¢å¼ã§è§£æžã•ã‚Œã€â€˜types’や‘structure’ã§æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ã‚’使用ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã‚µãƒ¼ãƒã«ã‚¢ãƒƒãƒ—ロードã•ã‚Œã€â€˜name’ã§æŒ‡å®šã•ã‚ŒãŸåå‰ã§ä¸€æ™‚テーブルã¨ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +例: + +``` bash +$ echo -ne "1\n2\n3\n" | clickhouse-client --query="SELECT count() FROM test.visits WHERE TraficSourceID IN _data" --external --file=- --types=Int8 +849897 +$ cat /etc/passwd | sed 's/:/\t/g' | clickhouse-client --query="SELECT shell, count() AS c FROM passwd GROUP BY shell ORDER BY c DESC" --external --file=- --name=passwd --structure='login String, unused String, uid UInt16, gid UInt16, comment String, home String, shell String' +/bin/sh 20 +/bin/false 5 +/bin/bash 4 +/usr/sbin/nologin 1 +/bin/sync 1 +``` + +HTTPインターフェースを使用ã™ã‚‹å ´åˆã€å¤–部データã¯multipart/form-dataå½¢å¼ã§æ¸¡ã•ã‚Œã¾ã™ã€‚å„テーブルã¯å€‹åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¨ã—ã¦é€ä¿¡ã•ã‚Œã¾ã™ã€‚テーブルåã¯ãƒ•ã‚¡ã‚¤ãƒ«åã‹ã‚‰å–å¾—ã•ã‚Œã¾ã™ã€‚`query_string`ã«ã¯`name_format`ã€`name_types`ã€`name_structure`ã®ãƒ‘ラメータãŒæ¸¡ã•ã‚Œã¾ã™ã€‚`name`ã¯ã“れらã®ãƒ‘ラメータã«å¯¾å¿œã™ã‚‹ãƒ†ãƒ¼ãƒ–ルåã§ã™ã€‚パラメータã®æ„味ã¯ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã™ã‚‹ã¨ãã¨åŒã˜ã§ã™ã€‚ + +例: + +``` bash +$ cat /etc/passwd | sed 's/:/\t/g' > passwd.tsv + +$ curl -F 'passwd=@passwd.tsv;' 'http://localhost:8123/?query=SELECT+shell,+count()+AS+c+FROM+passwd+GROUP+BY+shell+ORDER+BY+c+DESC&passwd_structure=login+String,+unused+String,+uid+UInt16,+gid+UInt16,+comment+String,+home+String,+shell+String' +/bin/sh 20 +/bin/false 5 +/bin/bash 4 +/usr/sbin/nologin 1 +/bin/sync 1 +``` + +分散クエリ処ç†ã®å ´åˆã€ä¸€æ™‚テーブルã¯ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/engines/table-engines/special/file.md b/docs/ja/engines/table-engines/special/file.md new file mode 100644 index 00000000000..ab5fd499125 --- /dev/null +++ b/docs/ja/engines/table-engines/special/file.md @@ -0,0 +1,110 @@ +--- +slug: /ja/engines/table-engines/special/file +sidebar_position: 40 +sidebar_label: File +--- + +# Fileテーブルエンジン + +Fileテーブルエンジンã¯ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹[ファイルフォーマット](../../../interfaces/formats.md#formats)(`TabSeparated`ã€`Native`ãªã©ï¼‰ã®ä¸€ã¤ã§ãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿æŒã—ã¾ã™ã€‚ + +使用シナリオ: + +- ClickHouseã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã€‚ +- データをã‚るフォーマットã‹ã‚‰åˆ¥ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¤‰æ›ã€‚ +- ディスク上ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’編集ã—ã¦ClickHouse内ã®ãƒ‡ãƒ¼ã‚¿ã‚’更新。 + +:::note +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ç¾åœ¨ClickHouse Cloudã§ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“ã®ã§ã€[代ã‚ã‚Šã«S3テーブル関数を使用ã—ã¦ãã ã•ã„](/docs/ja/sql-reference/table-functions/s3.md)。 +::: + +## ClickHouseサーãƒãƒ¼ã§ã®ä½¿ç”¨ {#usage-in-clickhouse-server} + +``` sql +File(Format) +``` + +`Format`パラメータã¯åˆ©ç”¨å¯èƒ½ãªãƒ•ã‚¡ã‚¤ãƒ«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ä¸€ã¤ã‚’指定ã—ã¾ã™ã€‚`SELECT`クエリを実行ã™ã‚‹ã«ã¯å…¥åŠ›ç”¨ã€`INSERT`クエリを実行ã™ã‚‹ã«ã¯å‡ºåŠ›ç”¨ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚利用å¯èƒ½ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯[Formats](../../../interfaces/formats.md#formats)セクションã«ä¸€è¦§ã§è¼‰ã£ã¦ã„ã¾ã™ã€‚ + +ClickHouseã¯ã€`File`ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ãƒ‘スã®æŒ‡å®šã‚’許å¯ã—ã¦ã„ã¾ã›ã‚“。ã“ã‚Œã¯ã‚µãƒ¼ãƒãƒ¼è¨­å®šã§[パス](../../../operations/server-configuration-parameters/settings.md)ã¨ã—ã¦å®šç¾©ã•ã‚ŒãŸãƒ•ã‚©ãƒ«ãƒ€ã‚’使用ã—ã¾ã™ã€‚ + +`File(Format)`を使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã¨ã€ãã®ãƒ•ã‚©ãƒ«ãƒ€å†…ã«ç©ºã®ã‚µãƒ–ディレクトリãŒä½œæˆã•ã‚Œã¾ã™ã€‚テーブルã«ãƒ‡ãƒ¼ã‚¿ãŒæ›¸ãè¾¼ã¾ã‚Œã‚‹ã¨ã€ãã®ã‚µãƒ–ディレクトリ内ã®`data.Format`ファイルã«ãƒ‡ãƒ¼ã‚¿ãŒä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +サーãƒãƒ¼ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ å†…ã«ã“ã®ã‚µãƒ–フォルダã¨ãƒ•ã‚¡ã‚¤ãƒ«ã‚’手動ã§ä½œæˆã—ã€ãƒžãƒƒãƒãƒ³ã‚°ã™ã‚‹åå‰ã§[ATTACH](../../../sql-reference/statements/attach.md)ã™ã‚‹ã“ã¨ã§ã€ãã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +ã“ã®æ©Ÿèƒ½ã‚’使用ã™ã‚‹éš›ã¯æ³¨æ„ã—ã¦ãã ã•ã„。ClickHouseã¯ãã®ã‚ˆã†ãªãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®å¤–部変更を追跡ã—ã¾ã›ã‚“。ClickHouseã¨ClickHouse外ã§åŒæ™‚ã«æ›¸ãè¾¼ã¿ãŒè¡Œã‚ã‚ŒãŸå ´åˆã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ +::: + +## 例 {#example} + +**1.** `file_engine_table`テーブルを設定ã™ã‚‹: + +``` sql +CREATE TABLE file_engine_table (name String, value UInt32) ENGINE=File(TabSeparated) +``` + +デフォルトã§ã¯ã€ClickHouseã¯`/var/lib/clickhouse/data/default/file_engine_table`フォルダを作æˆã—ã¾ã™ã€‚ + +**2.** `/var/lib/clickhouse/data/default/file_engine_table/data.TabSeparated`を手動ã§ä½œæˆã—ã€ä»¥ä¸‹ã®å†…容をå«ã‚る: + +``` bash +$ cat data.TabSeparated +one 1 +two 2 +``` + +**3.** データをクエリã™ã‚‹ï¼š + +``` sql +SELECT * FROM file_engine_table +``` + +``` text +┌─name─┬─value─┠+│ one │ 1 │ +│ two │ 2 │ +└──────┴───────┘ +``` + +## ClickHouse-localã§ã®ä½¿ç”¨ {#usage-in-clickhouse-local} + +[clickhouse-local](../../../operations/utilities/clickhouse-local.md)ã§ã¯ã€Fileエンジンã¯`Format`ã«åŠ ãˆã¦ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘スをå—ã‘入れã¾ã™ã€‚デフォルトã®å…¥åŠ›/出力ストリームã¯ã€æ•°å€¤ã¾ãŸã¯äººé–“ã«èª­ã¿ã‚„ã™ã„åå‰ï¼ˆ`0`ã‚„`stdin`ã€`1`ã‚„`stdout`ãªã©ï¼‰ã§æŒ‡å®šã§ãã¾ã™ã€‚圧縮ファイルã®èª­ã¿æ›¸ããŒã€è¿½åŠ ã®ã‚¨ãƒ³ã‚¸ãƒ³ãƒ‘ラメータã¾ãŸã¯ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ï¼ˆ`gz`ã€`br`ã€ã¾ãŸã¯`xz`)ã«åŸºã¥ã„ã¦å¯èƒ½ã§ã™ã€‚ + +**例:** + +``` bash +$ echo -e "1,2\n3,4" | clickhouse-local -q "CREATE TABLE table (a Int64, b Int64) ENGINE = File(CSV, stdin); SELECT a, b FROM table; DROP TABLE table" +``` + +## 実装ã®è©³ç´° {#details-of-implementation} + +- 複数ã®`SELECT`クエリをåŒæ™‚ã«å®Ÿè¡Œã§ãã¾ã™ãŒã€`INSERT`クエリã¯äº’ã„ã«å¾…ã¡ã¾ã™ã€‚ +- `INSERT`クエリã«ã‚ˆã‚‹æ–°ã—ã„ファイルã®ä½œæˆãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +- ファイルãŒå­˜åœ¨ã™ã‚‹å ´åˆã€`INSERT`ã¯æ–°ã—ã„値を追加ã—ã¾ã™ã€‚ +- サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„機能: + - `ALTER` + - `SELECT ... SAMPLE` + - インデックス + - レプリケーション + +## PARTITION BY {#partition-by} + +`PARTITION BY` — オプションã§ã™ã€‚データをパーティションキーã§ãƒ‘ーティショニングã™ã‚‹ã“ã¨ã§ã€åˆ¥ã€…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã§ãã¾ã™ã€‚ã»ã¨ã‚“ã©ã®å ´åˆã€ãƒ‘ーティションキーã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“ã—ã€å¿…è¦ã§ã‚ã£ã¦ã‚‚月ã”ã¨ã‚ˆã‚Šã‚‚詳細ã«ã™ã‚‹å¿…è¦ã¯é€šå¸¸ã‚ã‚Šã¾ã›ã‚“。パーティショニングã¯ã‚¯ã‚¨ãƒªã‚’高速化ã—ã¾ã›ã‚“(ORDER BYå¼ã¨ã¯å¯¾ç…§çš„ã«ï¼‰ã€‚éŽåº¦ã«è©³ç´°ãªãƒ‘ーティショニングを使用ã—ãªã„ã§ãã ã•ã„。クライアント識別å­ã‚„åå‰ãªã©ã§ãƒ‡ãƒ¼ã‚¿ã‚’パーティショニングã—ãªã„ã§ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè­˜åˆ¥å­ã‚„åå‰ã‚’ORDER BYå¼ã®æœ€åˆã®ã‚«ãƒ©ãƒ ã«ã—ã¦ãã ã•ã„。 + +月ã”ã¨ã«ãƒ‘ーティショニングã™ã‚‹ã«ã¯ã€`date_column`ãŒ[Date](/docs/ja/sql-reference/data-types/date.md)åž‹ã®æ—¥ä»˜ã‚’æŒã¤ã‚«ãƒ©ãƒ ã§ã‚ã‚‹å ´åˆã€`toYYYYMM(date_column)`å¼ã‚’使用ã—ã¾ã™ã€‚ã“ã“ã§ã®ãƒ‘ーティションåã¯`"YYYYMM"`フォーマットã«ãªã‚Šã¾ã™ã€‚ + +## 仮想カラム {#virtual-columns} + +- `_path` — ファイルã¸ã®ãƒ‘ス。型: `LowCardinalty(String)`。 +- `_file` — ファイルã®åå‰ã€‚åž‹: `LowCardinalty(String)`。 +- `_size` — ファイルサイズ(ãƒã‚¤ãƒˆï¼‰ã€‚åž‹: `Nullable(UInt64)`。サイズãŒä¸æ˜Žãªå ´åˆã¯å€¤ã¯`NULL`。 +- `_time` — ファイルã®æœ€çµ‚更新時刻。型: `Nullable(DateTime)`。時刻ãŒä¸æ˜Žãªå ´åˆã¯å€¤ã¯`NULL`。 + +## 設定 {#settings} + +- [engine_file_empty_if_not_exists](/docs/ja/operations/settings/settings.md#engine-file-empty_if-not-exists) - 存在ã—ãªã„ファイルã‹ã‚‰ç©ºã®ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ç„¡åŠ¹ã§ã™ã€‚ +- [engine_file_truncate_on_insert](/docs/ja/operations/settings/settings.md#engine-file-truncate-on-insert) - 挿入å‰ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’切り詰ã‚ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ç„¡åŠ¹ã§ã™ã€‚ +- [engine_file_allow_create_multiple_files](/docs/ja/operations/settings/settings.md#engine_file_allow_create_multiple_files) - フォーマットã«ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ãŒã‚ã‚‹å ´åˆã¯ã€å„挿入ã§æ–°ã—ã„ファイルを作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ç„¡åŠ¹ã§ã™ã€‚ +- [engine_file_skip_empty_files](/docs/ja/operations/settings/settings.md#engine-file-skip-empty-files) - 読ã¿è¾¼ã¿ä¸­ã«ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ç„¡åŠ¹ã§ã™ã€‚ +- [storage_file_read_method](/docs/ja/operations/settings/settings.md#engine-file-empty_if-not-exists) - ストレージファイルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–る方法ã€`read`ã€`pread`ã€`mmap`ã®ã„ãšã‚Œã‹ã€‚mmapメソッドã¯clickhouse-serverã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“(clickhouse-local用)。デフォルト値: clickhouse-serverã§ã¯`pread`ã€clickhouse-localã§ã¯`mmap`。 diff --git a/docs/ja/engines/table-engines/special/filelog.md b/docs/ja/engines/table-engines/special/filelog.md new file mode 100644 index 00000000000..e339ad5938a --- /dev/null +++ b/docs/ja/engines/table-engines/special/filelog.md @@ -0,0 +1,104 @@ +--- +slug: /ja/engines/table-engines/special/filelog +sidebar_position: 160 +sidebar_label: FileLog +--- + +# FileLog エンジン {#filelog-engine} + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€ã‚¢ãƒ—リケーションログファイルをレコードã®ã‚¹ãƒˆãƒªãƒ¼ãƒ ã¨ã—ã¦å‡¦ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`FileLog`を使用ã™ã‚‹ã¨æ¬¡ã®ã“ã¨ãŒã§ãã¾ã™: + +- ログファイルを購読ã™ã‚‹ã€‚ +- 購読ã—ãŸãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã«æ–°ã—ã„レコードãŒè¿½åŠ ã•ã‚Œã‚‹ã¨ã€ãれを処ç†ã™ã‚‹ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE = FileLog('path_to_logs', 'format_name') SETTINGS + [poll_timeout_ms = 0,] + [poll_max_batch_size = 0,] + [max_block_size = 0,] + [max_threads = 0,] + [poll_directory_watch_events_backoff_init = 500,] + [poll_directory_watch_events_backoff_max = 32000,] + [poll_directory_watch_events_backoff_factor = 2,] + [handle_error_mode = 'default'] +``` + +エンジン引数: + +- `path_to_logs` – 購読ã™ã‚‹ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。ログファイルãŒã‚るディレクトリã¾ãŸã¯å˜ä¸€ã®ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘スã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouseã¯`user_files`ディレクトリ内ã®ãƒ‘スã®ã¿ã‚’許å¯ã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 +- `format_name` - レコードフォーマット。FileLog ã¯ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®å„行を個別ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã¨ã—ã¦å‡¦ç†ã—ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒé©ã—ã¦ã„ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +オプションã®ãƒ‘ラメータ: + +- `poll_timeout_ms` - ログファイルã‹ã‚‰ã®å˜ä¸€ãƒãƒ¼ãƒ«ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚デフォルト: [stream_poll_timeout_ms](../../../operations/settings/settings.md#stream_poll_timeout_ms)。 +- `poll_max_batch_size` — å˜ä¸€ãƒãƒ¼ãƒ«ã§ãƒãƒ¼ãƒ«ã•ã‚Œã‚‹ãƒ¬ã‚³ãƒ¼ãƒ‰ã®æœ€å¤§æ•°ã€‚デフォルト: [max_block_size](../../../operations/settings/settings.md#setting-max_block_size)。 +- `max_block_size` — ãƒãƒ¼ãƒ«ã®æœ€å¤§ãƒãƒƒãƒã‚µã‚¤ã‚ºï¼ˆãƒ¬ã‚³ãƒ¼ãƒ‰æ•°ï¼‰ã€‚デフォルト: [max_insert_block_size](../../../operations/settings/settings.md#max_insert_block_size)。 +- `max_threads` - ファイルを解æžã™ã‚‹ãŸã‚ã®æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯0ã§ã€ã“れ㯠max(1, physical_cpu_cores / 4) ã¨ãªã‚Šã¾ã™ã€‚ +- `poll_directory_watch_events_backoff_init` - ディレクトリを監視ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®åˆæœŸã‚¹ãƒªãƒ¼ãƒ—値。デフォルト: `500`。 +- `poll_directory_watch_events_backoff_max` - ディレクトリ監視スレッドã®æœ€å¤§ã‚¹ãƒªãƒ¼ãƒ—値。デフォルト: `32000`。 +- `poll_directory_watch_events_backoff_factor` - ãƒãƒƒã‚¯ã‚ªãƒ•ã®é€Ÿåº¦ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æŒ‡æ•°çš„。デフォルト: `2`。 +- `handle_error_mode` — FileLog エンジンã§ã®ã‚¨ãƒ©ãƒ¼ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°æ–¹æ³•ã€‚å¯èƒ½ãªå€¤: デフォルト(メッセージã®è§£æžã«å¤±æ•—ã—ãŸã¨ãã«ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã‚‹ï¼‰ã€ã‚¹ãƒˆãƒªãƒ¼ãƒ ï¼ˆä¾‹å¤–メッセージã¨ç”Ÿãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒä»®æƒ³ã‚«ãƒ©ãƒ `_error`ã¨`_raw_message`ã«ä¿å­˜ã•ã‚Œã‚‹ï¼‰ã€‚ + +## 説明 {#description} + +é…ä¿¡ã•ã‚ŒãŸãƒ¬ã‚³ãƒ¼ãƒ‰ã¯è‡ªå‹•çš„ã«è¿½è·¡ã•ã‚Œã‚‹ãŸã‚ã€ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®å„レコードã¯ä¸€åº¦ã ã‘カウントã•ã‚Œã¾ã™ã€‚ + +`SELECT`ã¯ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’読ã¿å–ã‚‹ãŸã‚ã«ã¯ç‰¹ã«æœ‰ç”¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“(デãƒãƒƒã‚°ä»¥å¤–ã§ã¯ï¼‰ã€ã¨ã„ã†ã®ã‚‚å„レコードã¯ä¸€åº¦ã ã‘ã—ã‹èª­ã‚ãªã„ã‹ã‚‰ã§ã™ã€‚より実用的ãªã®ã¯ã€[materialized views](../../../sql-reference/statements/create/view.md) を用ã„ã¦ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’作æˆã™ã‚‹ã“ã¨ã§ã™ã€‚手順ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +1. エンジンを用ã„㦠FileLog テーブルを作æˆã—ã€ãれをデータストリームã¨è¦‹ãªã™ã€‚ +2. 目的ã®æ§‹é€ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã€‚ +3. エンジンã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã—ã€äº‹å‰ã«ä½œæˆã—ãŸãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã™ã‚‹ materialized view を作æˆã™ã‚‹ã€‚ + +`MATERIALIZED VIEW`ãŒã‚¨ãƒ³ã‚¸ãƒ³ã«çµåˆã•ã‚Œã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ãƒ¼ã‚¿ã‚’åŽé›†ã—始ã‚ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’継続的ã«å—ã‘å–ã‚Šã€`SELECT`を使ã£ã¦å¿…è¦ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¤‰æ›ã§ãã¾ã™ã€‚一ã¤ã® FileLog テーブルã¯ã€å¥½ããªã ã‘ materialized views ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ç›´æŽ¥ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã“ã¨ã¯ã›ãšã€æ–°ã—ã„レコード(ブロックå˜ä½ï¼‰ã‚’å—ã‘å–ã‚‹ã“ã¨ã§ã€ç•°ãªã‚‹è©³ç´°ãƒ¬ãƒ™ãƒ«ï¼ˆé›†è¨ˆ - グループ化ã‚ã‚Šã¨ãªã—)ã®è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルã«æ›¸ã込むã“ã¨ãŒã§ãã¾ã™ã€‚ + +例: + +``` sql + CREATE TABLE logs ( + timestamp UInt64, + level String, + message String + ) ENGINE = FileLog('user_files/my_app/app.log', 'JSONEachRow'); + + CREATE TABLE daily ( + day Date, + level String, + total UInt64 + ) ENGINE = SummingMergeTree(day, (day, level), 8192); + + CREATE MATERIALIZED VIEW consumer TO daily + AS SELECT toDate(toDateTime(timestamp)) AS day, level, count() as total + FROM queue GROUP BY day, level; + + SELECT level, sum(total) FROM daily GROUP BY level; +``` + +ストリームデータã®å—ä¿¡ã‚’åœæ­¢ã—ãŸã„å ´åˆã‚„変æ›ãƒ­ã‚¸ãƒƒã‚¯ã‚’変更ã—ãŸã„å ´åˆã€materialized viewをデタッãƒã—ã¾ã™ï¼š + +``` sql + DETACH TABLE consumer; + ATTACH TABLE consumer; +``` + +`ALTER`を使ã£ã¦ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルを変更ã—ãŸã„å ´åˆã¯ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã¨ãƒ“ューã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®é–“ã«ä¸æ•´åˆãŒç”Ÿã˜ã‚‹ã®ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€material viewを無効化ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## 仮想カラム {#virtual-columns} + +- `_filename` - ログファイルã®åå‰ã€‚データ型: `LowCardinality(String)`。 +- `_offset` - ログファイル内ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã€‚データ型: `UInt64`。 + +`handle_error_mode='stream'`ã®éš›ã®è¿½åŠ ã®ä»®æƒ³ã‚«ãƒ©ãƒ : + +- `_raw_record` - æ­£ã—ã解æžã§ããªã‹ã£ãŸç”Ÿãƒ¬ã‚³ãƒ¼ãƒ‰ã€‚データ型: `Nullable(String)`。 +- `_error` - 解æžå¤±æ•—時ã®ä¾‹å¤–メッセージ。データ型: `Nullable(String)`。 + +注æ„: `_raw_record`ãŠã‚ˆã³`_error`ã®ä»®æƒ³ã‚«ãƒ©ãƒ ã¯ã€è§£æžä¸­ã«ä¾‹å¤–ãŒç™ºç”Ÿã—ãŸå ´åˆã®ã¿åŸ‹ã‚られã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒæ­£å¸¸ã«è§£æžã•ã‚ŒãŸå ´åˆã¯å¸¸ã«`NULL`ã§ã™ã€‚ diff --git a/docs/ja/engines/table-engines/special/generate.md b/docs/ja/engines/table-engines/special/generate.md new file mode 100644 index 00000000000..66931f0cf05 --- /dev/null +++ b/docs/ja/engines/table-engines/special/generate.md @@ -0,0 +1,56 @@ +--- +slug: /ja/engines/table-engines/special/generate +sidebar_position: 140 +sidebar_label: GenerateRandom +title: "GenerateRandom テーブルエンジン" +--- + +GenerateRandomテーブルエンジンã¯ã€æŒ‡å®šã—ãŸãƒ†ãƒ¼ãƒ–ルスキーマã«å¯¾ã—ã¦ãƒ©ãƒ³ãƒ€ãƒ ãªãƒ‡ãƒ¼ã‚¿ã‚’生æˆã—ã¾ã™ã€‚ + +使用例: + +- テストã§å†ç¾å¯èƒ½ãªå¤§è¦æ¨¡ãƒ†ãƒ¼ãƒ–ルを生æˆã™ã‚‹ã€‚ +- ファジングテストã®ãŸã‚ã«ãƒ©ãƒ³ãƒ€ãƒ ãªå…¥åŠ›ã‚’生æˆã™ã‚‹ã€‚ + +## ClickHouseサーãƒãƒ¼ã§ã®ä½¿ç”¨ä¾‹ {#usage-in-clickhouse-server} + +``` sql +ENGINE = GenerateRandom([random_seed [,max_string_length [,max_array_length]]]) +``` + +`max_array_length`ã¨`max_string_length`パラメータã¯ã€ç”Ÿæˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿å†…ã®ã™ã¹ã¦ã®é…列ã¾ãŸã¯ãƒžãƒƒãƒ—カラムã¨æ–‡å­—列ã®æœ€å¤§é•·ã‚’ãã‚Œãžã‚ŒæŒ‡å®šã—ã¾ã™ã€‚ + +Generateテーブルエンジンã¯`SELECT`クエリã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +表ã«æ ¼ç´ã§ãã‚‹ã™ã¹ã¦ã®[データ型](../../../sql-reference/data-types/index.md)をサãƒãƒ¼ãƒˆã—ã€`AggregateFunction`を除ãã¾ã™ã€‚ + +## 例 {#example} + +**1.** `generate_engine_table` テーブルをセットアップã™ã‚‹: + +``` sql +CREATE TABLE generate_engine_table (name String, value UInt32) ENGINE = GenerateRandom(1, 5, 3) +``` + +**2.** データをクエリã™ã‚‹: + +``` sql +SELECT * FROM generate_engine_table LIMIT 3 +``` + +``` text +┌─name─┬──────value─┠+│ c4xJ │ 1412771199 │ +│ r │ 1791099446 │ +│ 7#$ │ 124312908 │ +└──────┴────────────┘ +``` + +## 実装ã®è©³ç´° {#details-of-implementation} + +- サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„機能: + - `ALTER` + - `SELECT ... SAMPLE` + - `INSERT` + - インデックス + - レプリケーション diff --git a/docs/ja/engines/table-engines/special/index.md b/docs/ja/engines/table-engines/special/index.md new file mode 100644 index 00000000000..a67534760f7 --- /dev/null +++ b/docs/ja/engines/table-engines/special/index.md @@ -0,0 +1,15 @@ +--- +slug: /ja/engines/table-engines/special/ +sidebar_position: 50 +sidebar_label: Special +--- + +# 特殊テーブルエンジン + +テーブルエンジンã«ã¯ä¸‰ã¤ã®ä¸»è¦ãªã‚«ãƒ†ã‚´ãƒªãƒ¼ãŒã‚ã‚Šã¾ã™ã€‚ + +- 本番環境å‘ã‘ã®[MergeTreeエンジンファミリー](../../../engines/table-engines/mergetree-family/index.md)。 +- å°è¦æ¨¡ã¾ãŸã¯ä¸€æ™‚çš„ãªãƒ‡ãƒ¼ã‚¿ç”¨ã®[Logエンジンファミリー](../../../engines/table-engines/log-family/index.md)。 +- çµ±åˆã®ãŸã‚ã®[テーブルエンジン](../../../engines/table-engines/integrations/index.md)。 + +残りã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ãã®ç›®çš„ãŒç‹¬ç‰¹ã§ã€ã¾ã ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã«ã¯åˆ†é¡žã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ã“ã®ã€Œç‰¹æ®Šã€ã‚«ãƒ†ã‚´ãƒªãƒ¼ã«é…ç½®ã•ã‚Œã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/engines/table-engines/special/join.md b/docs/ja/engines/table-engines/special/join.md new file mode 100644 index 00000000000..5c20290edfa --- /dev/null +++ b/docs/ja/engines/table-engines/special/join.md @@ -0,0 +1,163 @@ +--- +slug: /ja/engines/table-engines/special/join +sidebar_position: 70 +sidebar_label: Join +--- + +# Join テーブルエンジン + +[JOIN](/docs/ja/sql-reference/statements/select/join.md/#select-join) æ“作ã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã®ã‚ªãƒ—ションã®æº–備済ã¿ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã§ã™ã€‚ + +:::note +ã“れ㯠[JOINå¥](/docs/ja/sql-reference/statements/select/join.md/#select-join) ãã®ã‚‚ã®ã«é–¢ã™ã‚‹è¨˜äº‹ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1] [TTL expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2] [TTL expr2], +) ENGINE = Join(join_strictness, join_type, k1[, k2, ...]) +``` + +[CREATE TABLE](/docs/ja/sql-reference/statements/create/table.md/#create-table-query) クエリã®è©³ç´°ãªèª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## エンジンパラメータ + +### join_strictness + +`join_strictness` – [JOIN厳密性](/docs/ja/sql-reference/statements/select/join.md/#select-join-types)。 + +### join_type + +`join_type` – [JOINåž‹](/docs/ja/sql-reference/statements/select/join.md/#select-join-types)。 + +### キーカラム + +`k1[, k2, ...]` – `JOIN` æ“作㧠`USING` å¥ã‹ã‚‰ä½¿ã‚れるキーカラムã§ã™ã€‚ + +`join_strictness` 㨠`join_type` パラメータã¯ã€ä¾‹ã¨ã—㦠`Join(ANY, LEFT, col1)` ã®ã‚ˆã†ã«å¼•ç”¨ç¬¦ãªã—ã§å…¥åŠ›ã—ã¾ã™ã€‚ã“れらã¯ãƒ†ãƒ¼ãƒ–ルãŒä½¿ç”¨ã•ã‚Œã‚‹ `JOIN` æ“作ã«ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚パラメータãŒä¸€è‡´ã—ãªã„å ´åˆã€ClickHouse ã¯ä¾‹å¤–をスローã›ãšã€ä¸æ­£ç¢ºãªãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## 特長ã¨æŽ¨å¥¨äº‹é … {#specifics-and-recommendations} + +### データストレージ {#data-storage} + +`Join` テーブルã®ãƒ‡ãƒ¼ã‚¿ã¯å¸¸ã« RAM ã«ç½®ã‹ã‚Œã¾ã™ã€‚テーブルã«è¡Œã‚’挿入ã™ã‚‹éš›ã€ClickHouse ã¯ãƒ‡ãƒ¼ã‚¿ãƒ–ロックをディスク上ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«æ›¸ãè¾¼ã¿ã€ã‚µãƒ¼ãƒãƒ¼ãŒå†èµ·å‹•ã—ãŸéš›ã«å¾©å…ƒã§ãるよã†ã«ã—ã¾ã™ã€‚ + +サーãƒãƒ¼ãŒä¸æ­£ã«å†èµ·å‹•ã™ã‚‹ã¨ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックãŒå¤±ã‚ã‚ŒãŸã‚Šç ´æã—ãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ç ´æã—ãŸãƒ‡ãƒ¼ã‚¿ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’手動ã§å‰Šé™¤ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +### データã®é¸æŠžã¨æŒ¿å…¥ {#selecting-and-inserting-data} + +`Join` エンジンã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ãŸã‚ã« `INSERT` クエリを使用ã§ãã¾ã™ã€‚テーブル㌠`ANY` 厳密性ã§ä½œæˆã•ã‚ŒãŸå ´åˆã€é‡è¤‡ã—ãŸã‚­ãƒ¼ã®ãƒ‡ãƒ¼ã‚¿ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚`ALL` 厳密性ã®å ´åˆã€ã™ã¹ã¦ã®è¡ŒãŒè¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +`Join` エンジンã®ãƒ†ãƒ¼ãƒ–ルã®ä¸»ãªä½¿ç”¨ã‚±ãƒ¼ã‚¹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +- `JOIN` å¥ã§ãƒ†ãƒ¼ãƒ–ルをå³å´ã«é…ç½®ã™ã‚‹ã€‚ +- åŒã˜æ–¹æ³•ã§ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’抽出ã§ãã‚‹ [joinGet](/docs/ja/sql-reference/functions/other-functions.md/#joinget) 関数を呼ã³å‡ºã™ã€‚ + +### データã®å‰Šé™¤ {#deleting-data} + +`Join` エンジンã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹ `ALTER DELETE` クエリã¯ã€[変異](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚`DELETE` 変異ã¯ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã€ãƒ¡ãƒ¢ãƒªã¨ãƒ‡ã‚£ã‚¹ã‚¯ã®ãƒ‡ãƒ¼ã‚¿ã‚’上書ãã—ã¾ã™ã€‚ + +### 制é™ã¨è¨­å®š {#join-limitations-and-settings} + +テーブルを作æˆã™ã‚‹éš›ã€ä»¥ä¸‹ã®è¨­å®šãŒé©ç”¨ã•ã‚Œã¾ã™: + +#### join_use_nulls + +[join_use_nulls](/docs/ja/operations/settings/settings.md/#join_use_nulls) + +#### max_rows_in_join + +[max_rows_in_join](/docs/ja/operations/settings/query-complexity.md/#settings-max_rows_in_join) + +#### max_bytes_in_join + +[max_bytes_in_join](/docs/ja/operations/settings/query-complexity.md/#settings-max_bytes_in_join) + +#### join_overflow_mode + +[join_overflow_mode](/docs/ja/operations/settings/query-complexity.md/#settings-join_overflow_mode) + +#### join_any_take_last_row + +[join_any_take_last_row](/docs/ja/operations/settings/settings.md/#join_any_take_last_row) + +### persistent + +Join 㨠[Set](/docs/ja/engines/table-engines/special/set.md) テーブルエンジンã«å¯¾ã™ã‚‹æ°¸ç¶šæ€§ã‚’無効ã«ã—ã¾ã™ã€‚ + +I/O ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’削減ã—ã¾ã™ã€‚パフォーマンスを追求ã—永続性ãŒå¿…è¦ãªã„シナリオã«é©ã—ã¦ã„ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — 有効。 +- 0 — 無効。 + +デフォルト値: `1`。 + +`Join` エンジンã®ãƒ†ãƒ¼ãƒ–ル㯠`GLOBAL JOIN` æ“作ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +`Join` エンジンã§ã¯ [join_use_nulls](/docs/ja/operations/settings/settings.md/#join_use_nulls) 設定を `CREATE TABLE` ステートメントã§æŒ‡å®šã§ãã¾ã™ã€‚[SELECT](/docs/ja/sql-reference/statements/select/index.md) クエリã¯åŒã˜ `join_use_nulls` 値をæŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## 使用例 {#example} + +å·¦å´ã®ãƒ†ãƒ¼ãƒ–ルを作æˆ: + +``` sql +CREATE TABLE id_val(`id` UInt32, `val` UInt32) ENGINE = TinyLog; +``` + +``` sql +INSERT INTO id_val VALUES (1,11)(2,12)(3,13); +``` + +å³å´ã® `Join` テーブルを作æˆ: + +``` sql +CREATE TABLE id_val_join(`id` UInt32, `val` UInt8) ENGINE = Join(ANY, LEFT, id); +``` + +``` sql +INSERT INTO id_val_join VALUES (1,21)(1,22)(3,23); +``` + +テーブルをçµåˆ: + +``` sql +SELECT * FROM id_val ANY LEFT JOIN id_val_join USING (id); +``` + +``` text +┌─id─┬─val─┬─id_val_join.val─┠+│ 1 │ 11 │ 21 │ +│ 2 │ 12 │ 0 │ +│ 3 │ 13 │ 23 │ +└────┴─────┴─────────────────┘ +``` + +代替ã¨ã—ã¦ã€çµåˆã‚­ãƒ¼ã®å€¤ã‚’指定ã—㦠`Join` テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +``` sql +SELECT joinGet('id_val_join', 'val', toUInt32(1)); +``` + +``` text +┌─joinGet('id_val_join', 'val', toUInt32(1))─┠+│ 21 │ +└────────────────────────────────────────────┘ +``` + +`Join` テーブルã‹ã‚‰è¡Œã‚’削除: + +```sql +ALTER TABLE id_val_join DELETE WHERE id = 3; +``` + +```text +┌─id─┬─val─┠+│ 1 │ 21 │ +└────┴─────┘ +``` diff --git a/docs/ja/engines/table-engines/special/keepermap.md b/docs/ja/engines/table-engines/special/keepermap.md new file mode 100644 index 00000000000..3e0e697390c --- /dev/null +++ b/docs/ja/engines/table-engines/special/keepermap.md @@ -0,0 +1,117 @@ +--- +slug: /ja/engines/table-engines/special/keeper-map +sidebar_position: 150 +sidebar_label: KeeperMap +--- + +# KeeperMap {#keepermap} + +ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã™ã‚‹ã¨ã€Keeper/ZooKeeper クラスターを一貫ã—ãŸã‚­ãƒ¼ãƒ»ãƒãƒªãƒ¥ãƒ¼ ストアã¨ã—ã¦åˆ©ç”¨ã§ãã€ç·šå½¢åŒ–ã•ã‚ŒãŸæ›¸ãè¾¼ã¿ã¨ã€é †æ¬¡æ•´åˆæ€§ã®ã‚る読ã¿å–ã‚ŠãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +KeeperMap ストレージエンジンを有効ã«ã™ã‚‹ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルをä¿å­˜ã™ã‚‹ ZooKeeper パスを `` 設定ã§å®šç¾©ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +例: + +```xml + + /keeper_map_tables + +``` + +ã“ã“ã§ã€ãƒ‘スã¯ä»–ã®ä»»æ„ã®æœ‰åŠ¹ãª ZooKeeper パスã§ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) ENGINE = KeeperMap(root_path, [keys_limit]) PRIMARY KEY(primary_key_name) +``` + +エンジンパラメータ: + +- `root_path` - `table_name` ãŒä¿å­˜ã•ã‚Œã‚‹ ZooKeeper パス。 +ã“ã®ãƒ‘スã«ã¯ `` 設定ã§å®šç¾©ã•ã‚ŒãŸãƒ—レフィックスをå«ã‚ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。プレフィックスã¯è‡ªå‹•çš„ã« `root_path` ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ +ã•ã‚‰ã«ã€`auxiliary_zookeeper_cluster_name:/some/path` ã®å½¢å¼ã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€`auxiliary_zookeeper_cluster` 㯠`` 設定内ã§å®šç¾©ã•ã‚ŒãŸ ZooKeeper クラスターã§ã™ã€‚ +デフォルトã§ã¯ã€`` 設定内ã§å®šç¾©ã•ã‚ŒãŸ ZooKeeper クラスターãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- `keys_limit` - テーブル内ã«è¨±å¯ã•ã‚Œã‚‹ã‚­ãƒ¼ã®æ•°ã€‚ +ã“ã®åˆ¶é™ã¯ã‚½ãƒ•ãƒˆãƒªãƒŸãƒƒãƒˆã§ã‚ã‚Šã€ã‚¨ãƒƒã‚¸ã‚±ãƒ¼ã‚¹ã§ãƒ†ãƒ¼ãƒ–ルã«ã‚ˆã‚Šå¤šãã®ã‚­ãƒ¼ãŒå…¥ã‚Šè¾¼ã‚€å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- `primary_key_name` – カラムリスト内ã®ä»»æ„ã®ã‚«ãƒ©ãƒ å。 +- `主キー` ã¯æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ä¸»ã‚­ãƒ¼ã«ã¯1ã¤ã®ã‚«ãƒ©ãƒ ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚主キー㯠ZooKeeper 内㧠`ノードå` ã¨ã—ã¦ãƒã‚¤ãƒŠãƒªã§ã‚·ãƒªã‚¢ãƒ«åŒ–ã•ã‚Œã¾ã™ã€‚ +- 主キー以外ã®ã‚«ãƒ©ãƒ ã¯å¯¾å¿œã™ã‚‹é †åºã§ãƒã‚¤ãƒŠãƒªã«ã‚·ãƒªã‚¢ãƒ«åŒ–ã•ã‚Œã€ã‚·ãƒªã‚¢ãƒ«åŒ–ã•ã‚ŒãŸã‚­ãƒ¼ã«ã‚ˆã£ã¦å®šç¾©ã•ã‚ŒãŸçµæžœãƒŽãƒ¼ãƒ‰ã®å€¤ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚ +- キーã«å¯¾ã™ã‚‹ `equals` ã¾ãŸã¯ `in` フィルタリングを使用ã—ãŸã‚¯ã‚¨ãƒªã¯ `Keeper` ã‹ã‚‰ã®ãƒžãƒ«ãƒã‚­ãƒ¼æ¤œç´¢ã«æœ€é©åŒ–ã•ã‚Œã€ãれ以外ã®å ´åˆã¯ã™ã¹ã¦ã®å€¤ãŒãƒ•ã‚§ãƒƒãƒã•ã‚Œã¾ã™ã€‚ + +例: + +``` sql +CREATE TABLE keeper_map_table +( + `key` String, + `v1` UInt32, + `v2` String, + `v3` Float32 +) +ENGINE = KeeperMap('/keeper_map_table', 4) +PRIMARY KEY key +``` + +以下ã®è¨­å®šã§ + +```xml + + /keeper_map_tables + +``` + +å„値ã€ã™ãªã‚ã¡ `(v1, v2, v3)` ã®ãƒã‚¤ãƒŠãƒªã‚·ãƒªã‚¢ãƒ«åŒ–ã•ã‚ŒãŸã‚‚ã®ã¯ã€`Keeper` 内㮠`/keeper_map_tables/keeper_map_table/data/serialized_key` 内ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ +ã¾ãŸã€ã‚­ãƒ¼æ•°ã«ã¯ã‚½ãƒ•ãƒˆãƒªãƒŸãƒƒãƒˆã¨ã—ã¦4ã®åˆ¶é™ãŒã‚ã‚Šã¾ã™ã€‚ + +åŒã˜ ZooKeeper パスã«å¯¾ã—ã¦è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ãŸå ´åˆã€å€¤ã¯å°‘ãªãã¨ã‚‚1ã¤ã®ãƒ†ãƒ¼ãƒ–ルãŒãれを使用ã—ã¦ã„ã‚‹é™ã‚Šã€æ°¸ç¶šåŒ–ã•ã‚Œã¾ã™ã€‚ +ã—ãŸãŒã£ã¦ã€ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹éš›ã« `ON CLUSTER` å¥ã‚’使用ã—ã¦ã€è¤‡æ•°ã® ClickHouse インスタンスã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’共有ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ +ã‚‚ã¡ã‚ã‚“ã€ç„¡é–¢é€£ãª ClickHouse インスタンスã§åŒã˜ãƒ‘スをæŒã¤ `CREATE TABLE` を手動ã§å®Ÿè¡Œã—ã¦ã€åŒã˜ãƒ‡ãƒ¼ã‚¿å…±æœ‰åŠ¹æžœã‚’å¾—ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## 対応ã™ã‚‹æ“作 {#supported-operations} + +### 挿入 + +`KeeperMap` ã«æ–°ã—ã„行を挿入ã™ã‚‹å ´åˆã€ã‚­ãƒ¼ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã€ãã®ã‚­ãƒ¼ã®ãŸã‚ã®æ–°ã—ã„エントリãŒä½œæˆã•ã‚Œã¾ã™ã€‚ +キーãŒå­˜åœ¨ã™ã‚‹å ´åˆã§ã€`keeper_map_strict_mode` 設定㌠`true` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã€ãã†ã§ãªã„å ´åˆã¯ã‚­ãƒ¼ã®å€¤ãŒä¸Šæ›¸ãã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +INSERT INTO keeper_map_table VALUES ('some key', 1, 'value', 3.2); +``` + +### 削除 + +行㯠`DELETE` クエリã¾ãŸã¯ `TRUNCATE` を使用ã—ã¦å‰Šé™¤ã§ãã¾ã™ã€‚ +キーãŒå­˜åœ¨ã—ã€ã‹ã¤ `keeper_map_strict_mode` 設定㌠`true` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã®å–å¾—ã¨å‰Šé™¤ã¯ã€ã‚¢ãƒˆãƒŸãƒƒã‚¯ã«å®Ÿè¡Œã•ã‚Œã‚‹å ´åˆã«ã®ã¿æˆåŠŸã—ã¾ã™ã€‚ + +```sql +DELETE FROM keeper_map_table WHERE key LIKE 'some%' AND v1 > 1; +``` + +```sql +ALTER TABLE keeper_map_table DELETE WHERE key LIKE 'some%' AND v1 > 1; +``` + +```sql +TRUNCATE TABLE keeper_map_table; +``` + +### æ›´æ–° + +値㯠`ALTER TABLE` クエリを使用ã—ã¦æ›´æ–°ã§ãã¾ã™ã€‚主キーã¯æ›´æ–°ã§ãã¾ã›ã‚“。 +`keeper_map_strict_mode` 設定㌠`true` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã®å–å¾—ã¨æ›´æ–°ã¯ã‚¢ãƒˆãƒŸãƒƒã‚¯ã«å®Ÿè¡Œã•ã‚ŒãŸå ´åˆã«ã®ã¿æˆåŠŸã—ã¾ã™ã€‚ + +```sql +ALTER TABLE keeper_map_table UPDATE v1 = v1 * 10 + 2 WHERE key LIKE 'some%' AND v3 > 3.1; +``` + +## 関連コンテンツ + +- ブログ: [リアルタイム分æžã‚¢ãƒ—リケーションを ClickHouse 㨠Hex ã§æ§‹ç¯‰ã™ã‚‹](https://clickhouse.com/blog/building-real-time-applications-with-clickhouse-and-hex-notebook-keeper-engine) diff --git a/docs/ja/engines/table-engines/special/memory.md b/docs/ja/engines/table-engines/special/memory.md new file mode 100644 index 00000000000..399b6886885 --- /dev/null +++ b/docs/ja/engines/table-engines/special/memory.md @@ -0,0 +1,99 @@ +--- +slug: /ja/engines/table-engines/special/memory +sidebar_position: 110 +sidebar_label: Memory +--- + +# Memory テーブルエンジン + +:::note +ClickHouse Cloudã§Memoryテーブルエンジンを使用ã™ã‚‹éš›ã€ãƒ‡ãƒ¼ã‚¿ã¯å…¨ãƒŽãƒ¼ãƒ‰é–“ã§ãƒ¬ãƒ—リケーションã•ã‚Œã¾ã›ã‚“(設計ã«ã‚ˆã‚‹ã‚‚ã®ï¼‰ã€‚全クエリをåŒä¸€ãƒŽãƒ¼ãƒ‰ã«ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã—ã€MemoryテーブルエンジンãŒæœŸå¾…通りã«å‹•ä½œã™ã‚‹ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ï¼š +- åŒã˜ã‚»ãƒƒã‚·ãƒ§ãƒ³å†…ã§å…¨ã¦ã®æ“作を実行ã™ã‚‹ +- [clickhouse-client](/ja/interfaces/cli)ã®ã‚ˆã†ãªTCPã¾ãŸã¯ãƒã‚¤ãƒ†ã‚£ãƒ–インターフェイスを使用ã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã™ã‚‹ï¼ˆã“ã‚Œã«ã‚ˆã‚Šã‚¹ãƒ†ã‚£ãƒƒã‚­ãƒ¼æŽ¥ç¶šã®ã‚µãƒãƒ¼ãƒˆãŒæœ‰åŠ¹ã«ãªã‚‹ï¼‰ +::: + +Memoryエンジンã¯ãƒ‡ãƒ¼ã‚¿ã‚’RAMã«éžåœ§ç¸®å½¢å¼ã§ä¿å­˜ã—ã¾ã™ã€‚データã¯èª­ã¿è¾¼ã¾ã‚Œã‚‹æ™‚ã«å—ã‘å–ã£ãŸå½¢å¼ã¨å…¨ãåŒã˜å½¢ã§ä¿å­˜ã•ã‚Œã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®èª­ã¿å–ã‚Šã¯å®Œå…¨ã«ç„¡æ–™ã§ã™ã€‚並行データアクセスã¯åŒæœŸã•ã‚Œã¦ã„ã¾ã™ã€‚ロックã¯çŸ­ãã€èª­ã¿å–ã‚Šã¨æ›¸ãè¾¼ã¿æ“作ãŒäº’ã„をブロックã™ã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。インデックスã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。読ã¿å–ã‚Šã¯ä¸¦åˆ—化ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +シンプルãªã‚¯ã‚¨ãƒªã§æœ€å¤§ã®ç”Ÿç”£æ€§ï¼ˆ10 GB/秒以上)ãŒå¾—られã¾ã™ã€‚ãªãœãªã‚‰ã€ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ã®èª­ã¿å–りやデータã®è§£å‡ã€é€†ã‚·ãƒªã‚¢ãƒ«åŒ–ãŒãªã„ãŸã‚ã§ã™ã€‚(多ãã®å ´åˆã€MergeTreeエンジンã®ç”Ÿç”£æ€§ã¯ã»ã¼åŒç­‰ã§ã‚ã‚‹ã“ã¨ã‚’記ã—ã¦ãŠãã¹ãã§ã™ã€‚)サーãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰æ¶ˆãˆã€ãƒ†ãƒ¼ãƒ–ルã¯ç©ºã«ãªã‚Šã¾ã™ã€‚通常ã€ã“ã®ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã™ã‚‹ç†ç”±ã¯ã‚ã‚Šã¾ã›ã‚“。ã—ã‹ã—ã€ãƒ†ã‚¹ãƒˆã‚„比較的å°ã•ã„行数(ãŠãŠã‚ˆã1å„„è¡Œã¾ã§ï¼‰ã§æœ€å¤§ã®é€Ÿåº¦ãŒå¿…è¦ãªã‚¿ã‚¹ã‚¯ã«ã¯ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +Memoryエンジンã¯ã€å¤–部クエリデータをå«ã‚€ä¸€æ™‚テーブルやã€`GLOBAL IN`ã®å®Ÿè£…(「INオペレーターã€ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚照)ã«ã‚·ã‚¹ãƒ†ãƒ ã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +Memoryエンジンテーブルサイズを制é™ã™ã‚‹ãŸã‚ã«ä¸Šä¸‹é™ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã€ã“ã‚Œã«ã‚ˆã‚Šå¾ªç’°ãƒãƒƒãƒ•ã‚¡ã¨ã—ã¦æ©Ÿèƒ½ã•ã›ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ï¼ˆ[エンジンパラメーター](#engine-parameters)å‚照)。 + +## エンジンパラメーター {#engine-parameters} + +- `min_bytes_to_keep` — サイズ制é™ãŒã‚ã‚‹å ´åˆã«ãƒ¡ãƒ¢ãƒªãƒ†ãƒ¼ãƒ–ルã«ä¿æŒã™ã‚‹æœ€å°ãƒã‚¤ãƒˆæ•°ã€‚ + - デフォルト値: `0` + - `max_bytes_to_keep`ãŒå¿…è¦ +- `max_bytes_to_keep` — メモリテーブル内ã§ä¿æŒã™ã‚‹æœ€å¤§ãƒã‚¤ãƒˆæ•°ã€‚ã“ã®å€¤ã‚’超ãˆã‚‹ã¨å„挿入ã§æœ€å¤ã®è¡ŒãŒå‰Šé™¤ã•ã‚Œã¾ã™ï¼ˆã¤ã¾ã‚Šå¾ªç’°ãƒãƒƒãƒ•ã‚¡ï¼‰ã€‚大ããªãƒ–ロックを追加ã™ã‚‹éš›ã«ã€å‰Šé™¤ã™ã‚‹æœ€å¤ã®è¡Œã®ãƒãƒƒãƒãŒ`min_bytes_to_keep`ã®åˆ¶é™ä¸‹ã«ã‚ã‚‹ã¨ã€ã“ã®æœ€å¤§ãƒã‚¤ãƒˆæ•°ã®åˆ¶é™ã‚’超ãˆã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + - デフォルト値: `0` +- `min_rows_to_keep` — サイズ制é™ãŒã‚ã‚‹å ´åˆã«ãƒ¡ãƒ¢ãƒªãƒ†ãƒ¼ãƒ–ルã«ä¿æŒã™ã‚‹æœ€å°è¡Œæ•°ã€‚ + - デフォルト値: `0` + - `max_rows_to_keep`ãŒå¿…è¦ +- `max_rows_to_keep` — メモリテーブル内ã§ä¿æŒã™ã‚‹æœ€å¤§è¡Œæ•°ã€‚ã“ã®å€¤ã‚’超ãˆã‚‹ã¨å„挿入ã§æœ€å¤ã®è¡ŒãŒå‰Šé™¤ã•ã‚Œã¾ã™ï¼ˆã¤ã¾ã‚Šå¾ªç’°ãƒãƒƒãƒ•ã‚¡ï¼‰ã€‚大ããªãƒ–ロックを追加ã™ã‚‹éš›ã«ã€å‰Šé™¤ã™ã‚‹æœ€å¤ã®è¡Œã®ãƒãƒƒãƒãŒ`min_rows_to_keep`ã®åˆ¶é™ä¸‹ã«ã‚ã‚‹ã¨ã€ã“ã®æœ€å¤§è¡Œæ•°ã®åˆ¶é™ã‚’超ãˆã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + - デフォルト値: `0` + +## 使用法 {#usage} + +**設定ã®åˆæœŸåŒ–** +``` sql +CREATE TABLE memory (i UInt32) ENGINE = Memory SETTINGS min_rows_to_keep = 100, max_rows_to_keep = 1000; +``` + +**設定ã®å¤‰æ›´** +```sql +ALTER TABLE memory MODIFY SETTING min_rows_to_keep = 100, max_rows_to_keep = 1000; +``` + +**注:** `bytes`ã¨`rows`ã®ä¸¡æ–¹ã®åˆ¶é™ãƒ‘ラメーターã¯åŒæ™‚ã«è¨­å®šå¯èƒ½ã§ã™ãŒã€`max`ãŠã‚ˆã³`min`ã®ä¸‹é™ãŒéµå®ˆã•ã‚Œã¾ã™ã€‚ + +## 例 {#examples} +``` sql +CREATE TABLE memory (i UInt32) ENGINE = Memory SETTINGS min_bytes_to_keep = 4096, max_bytes_to_keep = 16384; + +/* 1. 最å¤ã®ãƒ–ロックãŒä¿æŒã•ã‚Œã¦ã„る(3000行) */ +INSERT INTO memory SELECT * FROM numbers(0, 1600); -- 8'192 bytes + +/* 2. 削除ã•ã‚Œãªã„ブロックを追加 */ +INSERT INTO memory SELECT * FROM numbers(1000, 100); -- 1'024 bytes + +/* 3. å¤ã„ブロックãŒå‰Šé™¤ã•ã‚Œã‚‹ï¼ˆ9216 bytes - 1100) */ +INSERT INTO memory SELECT * FROM numbers(9000, 1000); -- 8'192 bytes + +/* 4. å…¨ã¦ã‚’上書ãã™ã‚‹éžå¸¸ã«å¤§ããªãƒ–ロックをãƒã‚§ãƒƒã‚¯ */ +INSERT INTO memory SELECT * FROM numbers(9000, 10000); -- 65'536 bytes + +SELECT total_bytes, total_rows FROM system.tables WHERE name = 'memory' and database = currentDatabase(); +``` + +``` text +┌─total_bytes─┬─total_rows─┠+│ 65536 │ 10000 │ +└─────────────┴────────────┘ +``` + +ã¾ãŸã€è¡Œæ•°ã«ã¤ã„ã¦ã‚‚: + +``` sql +CREATE TABLE memory (i UInt32) ENGINE = Memory SETTINGS min_rows_to_keep = 4000, max_rows_to_keep = 10000; + +/* 1. 最å¤ã®ãƒ–ロックãŒä¿æŒã•ã‚Œã¦ã„る(3000行) */ +INSERT INTO memory SELECT * FROM numbers(0, 1600); -- 1'600 rows + +/* 2. 削除ã•ã‚Œãªã„ブロックを追加 */ +INSERT INTO memory SELECT * FROM numbers(1000, 100); -- 100 rows + +/* 3. å¤ã„ブロックãŒå‰Šé™¤ã•ã‚Œã‚‹ï¼ˆ9216 bytes - 1100) */ +INSERT INTO memory SELECT * FROM numbers(9000, 1000); -- 1'000 rows + +/* 4. å…¨ã¦ã‚’上書ãã™ã‚‹éžå¸¸ã«å¤§ããªãƒ–ロックをãƒã‚§ãƒƒã‚¯ */ +INSERT INTO memory SELECT * FROM numbers(9000, 10000); -- 10'000 rows + +SELECT total_bytes, total_rows FROM system.tables WHERE name = 'memory' and database = currentDatabase(); +``` + +``` text +┌─total_bytes─┬─total_rows─┠+│ 65536 │ 10000 │ +└─────────────┴────────────┘ +``` diff --git a/docs/ja/engines/table-engines/special/merge.md b/docs/ja/engines/table-engines/special/merge.md new file mode 100644 index 00000000000..0d809461c81 --- /dev/null +++ b/docs/ja/engines/table-engines/special/merge.md @@ -0,0 +1,86 @@ +--- +slug: /ja/engines/table-engines/special/merge +sidebar_position: 30 +sidebar_label: Merge +--- + +# Merge テーブルエンジン + +`Merge` エンジン(`MergeTree`ã¨æ··åŒã—ãªã„ã§ãã ã•ã„)ã¯ã€ãƒ‡ãƒ¼ã‚¿è‡ªä½“ã‚’ä¿å­˜ã™ã‚‹ã®ã§ã¯ãªãã€ä»–ã®ä»»æ„ã®æ•°ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰åŒæ™‚ã«èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +読ã¿å–ã‚Šã¯è‡ªå‹•çš„ã«ä¸¦åˆ—化ã•ã‚Œã¾ã™ã€‚テーブルã¸ã®æ›¸ãè¾¼ã¿ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。読ã¿å–ã‚Šã®éš›ã«ã€å®Ÿéš›ã«èª­ã¿å–られるテーブルã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒå­˜åœ¨ã™ã‚Œã°ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#creating-a-table} + +``` sql +CREATE TABLE ... Engine=Merge(db_name, tables_regexp) +``` + +## エンジンパラメータ + +### db_name + +`db_name` — 使用å¯èƒ½ãªå€¤: + - データベースå + - データベースåを文字列ã§è¿”ã™å®šæ•°å¼ã€ä¾‹ï¼š`currentDatabase()` + - DBåã«ãƒžãƒƒãƒã™ã‚‹æ­£è¦è¡¨ç¾ã® `REGEXP(expression)` + +### tables_regexp + +`tables_regexp` — 指定ã•ã‚ŒãŸDBã¾ãŸã¯è¤‡æ•°ã®DBã§ã€ãƒ†ãƒ¼ãƒ–ルåã«ãƒžãƒƒãƒã™ã‚‹æ­£è¦è¡¨ç¾ã€‚ + +æ­£è¦è¡¨ç¾ã¯ã€[re2](https://github.com/google/re2)(PCREã®ã‚µãƒ–セットをサãƒãƒ¼ãƒˆï¼‰ã€å¤§æ–‡å­—ã¨å°æ–‡å­—を区別ã—ã¾ã™ã€‚æ­£è¦è¡¨ç¾ã«ãŠã‘る記å·ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã«ã¤ã„ã¦ã¯ã€"match"セクションã®ãƒŽãƒ¼ãƒˆã‚’ã”å‚ç…§ãã ã•ã„。 + +## 使用方法 {#usage} + +読ã¿å–り用ã®ãƒ†ãƒ¼ãƒ–ルをé¸æŠžã™ã‚‹éš›ã€ãŸã¨ãˆæ­£è¦è¡¨ç¾ã«ä¸€è‡´ã—ãŸã¨ã—ã¦ã‚‚ã€`Merge` テーブル自体ã¯é¸æŠžã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ãƒ«ãƒ¼ãƒ—ã‚’é¿ã‘ã‚‹ãŸã‚ã§ã™ã€‚2ã¤ã® `Merge` テーブルãŒäº’ã„ã®ãƒ‡ãƒ¼ã‚¿ã‚’ç„¡é™ã«èª­ã¿å–ã‚ã†ã¨ã™ã‚‹ã‚·ãƒŠãƒªã‚ªã‚’作るã“ã¨ã¯å¯èƒ½ã§ã™ãŒã€ã“ã‚Œã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + +`Merge` エンジンã®å…¸åž‹çš„ãªä½¿ç”¨æ–¹æ³•ã¯ã€å¤šæ•°ã® `TinyLog` テーブルをå˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚ˆã†ã«æ‰±ã†å ´åˆã§ã™ã€‚ + +## 例 {#examples} + +**例 1** + +2ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ `ABC_corporate_site` 㨠`ABC_store` を考ãˆã¾ã™ã€‚`all_visitors` テーブルã«ã¯ã€ä¸¡æ–¹ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã‚ã‚‹ `visitors` テーブルã®IDãŒå«ã¾ã‚Œã¾ã™ã€‚ + +``` sql +CREATE TABLE all_visitors (id UInt32) ENGINE=Merge(REGEXP('ABC_*'), 'visitors'); +``` + +**例 2** + +å¤ã„テーブル `WatchLog_old` ãŒã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’æ–°ã—ã„テーブル `WatchLog_new` ã«ç§»ã•ãšã«ãƒ‘ーティショニングを変更ã™ã‚‹ã“ã¨ã‚’決ã‚ãŸã¨ã—ã¾ã™ã€‚ãã—ã¦ã€ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’表示ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` sql +CREATE TABLE WatchLog_old(date Date, UserId Int64, EventType String, Cnt UInt64) + ENGINE=MergeTree(date, (UserId, EventType), 8192); +INSERT INTO WatchLog_old VALUES ('2018-01-01', 1, 'hit', 3); + +CREATE TABLE WatchLog_new(date Date, UserId Int64, EventType String, Cnt UInt64) + ENGINE=MergeTree PARTITION BY date ORDER BY (UserId, EventType) SETTINGS index_granularity=8192; +INSERT INTO WatchLog_new VALUES ('2018-01-02', 2, 'hit', 3); + +CREATE TABLE WatchLog as WatchLog_old ENGINE=Merge(currentDatabase(), '^WatchLog'); + +SELECT * FROM WatchLog; +``` + +``` text +┌───────date─┬─UserId─┬─EventType─┬─Cnt─┠+│ 2018-01-01 │ 1 │ hit │ 3 │ +└────────────┴────────┴───────────┴─────┘ +┌───────date─┬─UserId─┬─EventType─┬─Cnt─┠+│ 2018-01-02 │ 2 │ hit │ 3 │ +└────────────┴────────┴───────────┴─────┘ +``` + +## 仮想カラム {#virtual-columns} + +- `_table` — データãŒèª­ã¿å–られãŸãƒ†ãƒ¼ãƒ–ルã®åå‰ã‚’å«ã‚€ã€‚タイプ: [String](../../../sql-reference/data-types/string.md)。 + + `WHERE/PREWHERE` å¥ã§ `_table` ã«å®šæ•°æ¡ä»¶ã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆä¾‹ï¼š`WHERE _table='xyz'`)。ã“ã®å ´åˆã€èª­ã¿å–ã‚Šæ“作㯠`_table` ã®æ¡ä»¶ã‚’満ãŸã™ãƒ†ãƒ¼ãƒ–ルã®ã¿ã«å¯¾ã—ã¦è¡Œã‚れるãŸã‚ã€ã‚«ãƒ©ãƒ  `_table` ã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ã—ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +**関連項目** + +- [仮想カラム](../../../engines/table-engines/index.md#table_engines-virtual_columns) +- [merge](../../../sql-reference/table-functions/merge.md) テーブル関数 diff --git a/docs/ja/engines/table-engines/special/null.md b/docs/ja/engines/table-engines/special/null.md new file mode 100644 index 00000000000..320072334a9 --- /dev/null +++ b/docs/ja/engines/table-engines/special/null.md @@ -0,0 +1,13 @@ +--- +slug: /ja/engines/table-engines/special/null +sidebar_position: 50 +sidebar_label: 'Null' +--- + +# Null テーブルエンジン + +`Null` テーブルã«æ›¸ã込むã¨ãƒ‡ãƒ¼ã‚¿ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚`Null` テーブルã‹ã‚‰èª­ã¿å–ã‚‹ã¨ã€å¿œç­”ã¯ç©ºã«ãªã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚ŒãŒãªãœæœ‰ç”¨ãªã®ã‹ç–‘å•ã«æ€ã†å ´åˆã¯ã€`Null` テーブルã«å¯¾ã—㦠Materialized View を作æˆã§ãã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。従ã£ã¦ã€ãƒ†ãƒ¼ãƒ–ルã«æ›¸ãè¾¼ã¾ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯ãƒ“ューã«å½±éŸ¿ã‚’与ãˆã¾ã™ãŒã€å…ƒã®ç”Ÿãƒ‡ãƒ¼ã‚¿ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +::: diff --git a/docs/ja/engines/table-engines/special/set.md b/docs/ja/engines/table-engines/special/set.md new file mode 100644 index 00000000000..4d1c8601a0d --- /dev/null +++ b/docs/ja/engines/table-engines/special/set.md @@ -0,0 +1,32 @@ +--- +slug: /ja/engines/table-engines/special/set +sidebar_position: 60 +sidebar_label: Set +--- + +# Set テーブルエンジン + +常ã«RAM上ã«å­˜åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã™ã€‚「IN演算å­ã€ã®å³å´ã§ã®ä½¿ç”¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ï¼ˆã€ŒIN演算å­ã€ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +`INSERT`を使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã§ãã¾ã™ã€‚æ–°ã—ã„è¦ç´ ãŒãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«è¿½åŠ ã•ã‚Œã€é‡è¤‡ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ãŸã ã—ã€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰`SELECT`を実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。データをå–å¾—ã™ã‚‹å”¯ä¸€ã®æ–¹æ³•ã¯ã€IN演算å­ã®å³åŠåˆ†ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +データã¯å¸¸ã«RAMã«é…ç½®ã•ã‚Œã¾ã™ã€‚`INSERT`ã®å ´åˆã€æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ãƒ–ロックもディスク上ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚サーãƒãƒ¼ã®èµ·å‹•æ™‚ã«ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ãŒRAMã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€å†èµ·å‹•å¾Œã‚‚データã¯ãã®ã¾ã¾æ®‹ã‚Šã¾ã™ã€‚ + +粗雑ã«ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹ã¨ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックãŒå¤±ã‚ã‚ŒãŸã‚Šã€æå‚·ã—ãŸã‚Šã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ãã®å ´åˆã€æå‚·ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’手動ã§å‰Šé™¤ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +### 制é™äº‹é …ã¨è¨­å®š {#join-limitations-and-settings} + +テーブルを作æˆã™ã‚‹éš›ã€ä»¥ä¸‹ã®è¨­å®šãŒé©ç”¨ã•ã‚Œã¾ã™ï¼š + +#### persistent + +SetãŠã‚ˆã³[Join](/docs/ja/engines/table-engines/special/join.md/#join)テーブルエンジンã«å¯¾ã™ã‚‹æ°¸ç¶šæ€§ã‚’無効ã«ã—ã¾ã™ã€‚ + +I/Oオーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’削減ã—ã¾ã™ã€‚永続性を必è¦ã¨ã›ãšã€ãƒ‘フォーマンスを求ã‚るシナリオã«é©ã—ã¦ã„ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 1 — 有効。 +- 0 — 無効。 + +デフォルト値: `1`。 diff --git a/docs/ja/engines/table-engines/special/url.md b/docs/ja/engines/table-engines/special/url.md new file mode 100644 index 00000000000..389d638fd65 --- /dev/null +++ b/docs/ja/engines/table-engines/special/url.md @@ -0,0 +1,114 @@ +--- +slug: /ja/engines/table-engines/special/url +sidebar_position: 80 +sidebar_label: URL +--- + +# URLテーブルエンジン + +リモートHTTP/HTTPSサーãƒãƒ¼ã¨ã®é–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’クエリã—ã¾ã™ã€‚ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€[File](../../../engines/table-engines/special/file.md)エンジンã¨ä¼¼ã¦ã„ã¾ã™ã€‚ + +構文: `URL(URL [,Format] [,CompressionMethod])` + +- `URL`パラメータã¯ã€Uniform Resource Locatorã®æ§‹é€ ã«å¾“ã†å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚指定ã•ã‚ŒãŸURLã¯HTTPã¾ãŸã¯HTTPSを使用ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã‚’指ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚サーãƒãƒ¼ã‹ã‚‰å¿œç­”ã‚’å¾—ã‚‹ãŸã‚ã«è¿½åŠ ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 + +- `Format`ã¯ã€ClickHouseãŒ`SELECT`クエリã§ä½¿ç”¨ã§ãã€å¿…è¦ã«å¿œã˜ã¦`INSERT`ã§ã‚‚使用ã§ãã‚‹å½¢å¼ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹å½¢å¼ã®å…¨ãƒªã‚¹ãƒˆã«ã¤ã„ã¦ã¯ã€[Formats](../../../interfaces/formats.md#formats)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + ã“ã®å¼•æ•°ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯`URL`パラメータã®ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ã‹ã‚‰è‡ªå‹•çš„ã«å½¢å¼ã‚’検出ã—ã¾ã™ã€‚`URL`パラメータã®ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹å½¢å¼ã¨ä¸€è‡´ã—ãªã„å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã®ä½œæˆã«å¤±æ•—ã—ã¾ã™ã€‚例ãˆã°ã€ã‚¨ãƒ³ã‚¸ãƒ³ã®å¼`URL('http://localhost/test.json')`ã§ã¯ã€`JSON`å½¢å¼ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ + +- `CompressionMethod`ã¯ã€HTTPボディを圧縮ã™ã‚‹ã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚圧縮ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€URLエンジンã«ã‚ˆã£ã¦é€ä¿¡ã•ã‚Œã‚‹HTTPパケットã«ã¯ã€ä½¿ç”¨ã•ã‚Œã‚‹åœ§ç¸®æ–¹å¼ã‚’示ã™'Content-Encoding'ヘッダーãŒå«ã¾ã‚Œã¾ã™ã€‚ + +圧縮を有効ã«ã™ã‚‹ã«ã¯ã€ã¾ãš`URL`パラメータã§ç¤ºã•ã‚Œã‚‹ãƒªãƒ¢ãƒ¼ãƒˆHTTPエンドãƒã‚¤ãƒ³ãƒˆãŒå¯¾å¿œã™ã‚‹åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹`CompressionMethod`ã¯ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã§ã™: +- gzip ã¾ãŸã¯ gz +- deflate +- brotli ã¾ãŸã¯ br +- lzma ã¾ãŸã¯ xz +- zstd ã¾ãŸã¯ zst +- lz4 +- bz2 +- snappy +- none +- auto + +`CompressionMethod`ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯`auto`ã«ãªã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€ClickHouseãŒ`URL`パラメータã®ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ã‹ã‚‰è‡ªå‹•çš„ã«åœ§ç¸®æ–¹å¼ã‚’検出ã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚サフィックスãŒä¸Šè¨˜ã®åœ§ç¸®æ–¹å¼ã®ã„ãšã‚Œã‹ã¨ä¸€è‡´ã™ã‚‹å ´åˆã€å¯¾å¿œã™ã‚‹åœ§ç¸®ãŒé©ç”¨ã•ã‚Œã€ãã†ã§ãªã„å ´åˆã¯åœ§ç¸®ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。 + +例ãˆã°ã€ã‚¨ãƒ³ã‚¸ãƒ³ã®å¼`URL('http://localhost/test.gzip')`ã§ã¯ã€`gzip`圧縮方å¼ãŒé©ç”¨ã•ã‚Œã¾ã™ãŒã€`URL('http://localhost/test.fr')`ã§ã¯ã€ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹`fr`ãŒä¸Šè¨˜ã®åœ§ç¸®æ–¹å¼ã«ä¸€è‡´ã—ãªã„ãŸã‚ã€åœ§ç¸®ã¯æœ‰åŠ¹åŒ–ã•ã‚Œã¾ã›ã‚“。 + +## 使用例 {#using-the-engine-in-the-clickhouse-server} + +`INSERT`ãŠã‚ˆã³`SELECT`クエリã¯ãã‚Œãžã‚Œ`POST`ãŠã‚ˆã³`GET`リクエストã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚`POST`リクエストを処ç†ã™ã‚‹ã«ã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ãŒ[ãƒãƒ£ãƒ³ã‚¯è»¢é€ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°](https://en.wikipedia.org/wiki/Chunked_transfer_encoding)をサãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +HTTP GETリダイレクトホップã®æœ€å¤§æ•°ã‚’制é™ã™ã‚‹ã«ã¯ã€[max_http_get_redirects](../../../operations/settings/settings.md#setting-max_http_get_redirects)設定を使用ã§ãã¾ã™ã€‚ + +## 例 {#example} + +**1.** サーãƒãƒ¼ä¸Šã§`url_engine_table`テーブルを作æˆã—ã¾ã™: + +``` sql +CREATE TABLE url_engine_table (word String, value UInt64) +ENGINE=URL('http://127.0.0.1:12345/', CSV) +``` + +**2.** 標準ã®Python 3ツールを使用ã—ã¦åŸºæœ¬çš„ãªHTTPサーãƒãƒ¼ã‚’作æˆã—ã€èµ·å‹•ã—ã¾ã™: + +``` python3 +from http.server import BaseHTTPRequestHandler, HTTPServer + +class CSVHTTPServer(BaseHTTPRequestHandler): + def do_GET(self): + self.send_response(200) + self.send_header('Content-type', 'text/csv') + self.end_headers() + + self.wfile.write(bytes('Hello,1\nWorld,2\n', "utf-8")) + +if __name__ == "__main__": + server_address = ('127.0.0.1', 12345) + HTTPServer(server_address, CSVHTTPServer).serve_forever() +``` + +``` bash +$ python3 server.py +``` + +**3.** データをリクエストã—ã¾ã™: + +``` sql +SELECT * FROM url_engine_table +``` + +``` text +┌─word──┬─value─┠+│ Hello │ 1 │ +│ World │ 2 │ +└───────┴───────┘ +``` + +## 実装ã®è©³ç´° {#details-of-implementation} + +- 読ã¿å–ã‚Šã¨æ›¸ãè¾¼ã¿ã¯ä¸¦è¡Œã—ã¦è¡Œã†ã“ã¨ãŒã§ãã¾ã™ +- サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„機能: + - `ALTER`ãŠã‚ˆã³`SELECT...SAMPLE`æ“作。 + - インデックス。 + - レプリケーション。 + +## PARTITION BY + +`PARTITION BY` — ä»»æ„ã§ã™ã€‚パーティションキーã«åŸºã¥ã„ã¦ãƒ‡ãƒ¼ã‚¿ã‚’分割ã—ã¦ã€åˆ¥ã€…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã»ã¨ã‚“ã©ã®å ´åˆã€ãƒ‘ーティションキーã¯ä¸è¦ã§ã‚ã‚Šã€å¿…è¦ãªå ´åˆã§ã‚‚一般的ã«æœˆã”ã¨ä»¥ä¸Šã«ç´°ã‹ã„パーティションキーã¯ä¸è¦ã§ã™ã€‚パーティション分割ã¯ã‚¯ã‚¨ãƒªã‚’高速化ã—ã¾ã›ã‚“(ORDER BYå¼ã¨ã¯å¯¾ç…§çš„ã§ã™ï¼‰ã€‚éŽåº¦ã«ç´°ã‹ã„パーティション分割ã¯é¿ã‘ã¦ãã ã•ã„。クライアントã®è­˜åˆ¥å­ã‚„åå‰ã§ãƒ‡ãƒ¼ã‚¿ã‚’パーティション分割ã—ãªã„ã§ãã ã•ã„(代ã‚ã‚Šã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè­˜åˆ¥å­ã‚„åå‰ã‚’ORDER BYå¼ã®æœ€åˆã®ã‚«ãƒ©ãƒ ã«ã—ã¦ãã ã•ã„)。 + +月ã”ã¨ã«ãƒ‘ーティション分割ã™ã‚‹ã«ã¯ã€`toYYYYMM(date_column)`å¼ã‚’使用ã—ã¾ã™ã€‚ã“ã“ã§`date_column`ã¯[Date](/docs/ja/sql-reference/data-types/date.md)åž‹ã®æ—¥ä»˜ã‚’æŒã¤ã‚«ãƒ©ãƒ ã§ã™ã€‚パーティションåã¯`"YYYYMM"`å½¢å¼ã«ãªã‚Šã¾ã™ã€‚ + +## 仮想カラム {#virtual-columns} + +- `_path` — `URL`ã¸ã®ãƒ‘スã§ã™ã€‚åž‹: `LowCardinalty(String)`。 +- `_file` — `URL`ã®ãƒªã‚½ãƒ¼ã‚¹åã§ã™ã€‚åž‹: `LowCardinalty(String)`。 +- `_size` — リソースã®ãƒã‚¤ãƒˆå˜ä½ã®ã‚µã‚¤ã‚ºã§ã™ã€‚åž‹: `Nullable(UInt64)`。サイズãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯`NULL`ã§ã™ã€‚ +- `_time` — ファイルã®æœ€çµ‚更新時間ã§ã™ã€‚åž‹: `Nullable(DateTime)`。時間ãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯`NULL`ã§ã™ã€‚ +- `_headers` - HTTP応答ヘッダーã§ã™ã€‚åž‹: `Map(LowCardinality(String), LowCardinality(String))`。 + +## ストレージ設定 {#storage-settings} + +- [engine_url_skip_empty_files](/docs/ja/operations/settings/settings.md#engine_url_skip_empty_files) - 読ã¿è¾¼ã¿æ™‚ã«ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [enable_url_encoding](/docs/ja/operations/settings/settings.md#enable_url_encoding) - URIã®ãƒ‘スã®ãƒ‡ã‚³ãƒ¼ãƒ‰/エンコードを有効/無効ã«ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§æœ‰åŠ¹ã§ã™ã€‚ diff --git a/docs/ja/engines/table-engines/special/view.md b/docs/ja/engines/table-engines/special/view.md new file mode 100644 index 00000000000..1fde2d8dd32 --- /dev/null +++ b/docs/ja/engines/table-engines/special/view.md @@ -0,0 +1,9 @@ +--- +slug: /ja/engines/table-engines/special/view +sidebar_position: 90 +sidebar_label: View +--- + +# View テーブルエンジン + +ビューを実装ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ï¼ˆè©³ç´°ã«ã¤ã„ã¦ã¯ã€`CREATE VIEW クエリ`ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。データをä¿å­˜ã™ã‚‹ã“ã¨ã¯ãªãã€æŒ‡å®šã•ã‚ŒãŸ`SELECT`クエリã®ã¿ã‚’ä¿å­˜ã—ã¾ã™ã€‚テーブルã‹ã‚‰èª­ã¿è¾¼ã‚€éš›ã«ã¯ã€ã“ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã€ã‚¯ã‚¨ãƒªã‹ã‚‰ä¸è¦ãªã‚«ãƒ©ãƒ ã‚’ã™ã¹ã¦å‰Šé™¤ã—ã¾ã™ã€‚ diff --git a/docs/ja/faq/_category_.yml b/docs/ja/faq/_category_.yml new file mode 100644 index 00000000000..d3b55f0a328 --- /dev/null +++ b/docs/ja/faq/_category_.yml @@ -0,0 +1,7 @@ +position: 1 +label: 'FAQ' +collapsible: true +collapsed: true +link: + type: doc + id: en/faq/index diff --git a/docs/ja/faq/general/_category_.yml b/docs/ja/faq/general/_category_.yml new file mode 100644 index 00000000000..52163f94150 --- /dev/null +++ b/docs/ja/faq/general/_category_.yml @@ -0,0 +1,4 @@ +position: 10 +label: 'General' +collapsible: true +collapsed: true diff --git a/docs/ja/faq/general/columnar-database.md b/docs/ja/faq/general/columnar-database.md new file mode 100644 index 00000000000..247a308b66b --- /dev/null +++ b/docs/ja/faq/general/columnar-database.md @@ -0,0 +1,26 @@ +--- +slug: /ja/faq/general/columnar-database +title: 列指å‘データベースã¨ã¯ï¼Ÿ +toc_hidden: true +toc_priority: 101 +--- + +# 列指å‘データベースã¨ã¯ï¼Ÿ {#what-is-a-columnar-database} + +列指å‘データベースã¯ã€å„カラムã®ãƒ‡ãƒ¼ã‚¿ã‚’独立ã—ã¦ä¿å­˜ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã ã‘ã®ãƒ‡ãƒ¼ã‚¿ã‚’ディスクã‹ã‚‰èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã®ä»£ã‚ã‚Šã«ã€è¡Œå…¨ä½“ã«å½±éŸ¿ã‚’与ãˆã‚‹æ“作ã®ã‚³ã‚¹ãƒˆãŒç›¸å¯¾çš„ã«é«˜ããªã‚Šã¾ã™ã€‚列指å‘データベースã®åŒç¾©èªžã¯ã€åˆ—指å‘データベース管ç†ã‚·ã‚¹ãƒ†ãƒ ã§ã™ã€‚ClickHouseã¯ãã®ã‚ˆã†ãªã‚·ã‚¹ãƒ†ãƒ ã®å…¸åž‹ä¾‹ã§ã™ã€‚ + +列指å‘データベースã®ä¸»è¦ãªåˆ©ç‚¹ã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +- 多ãã®ã‚«ãƒ©ãƒ ã®ä¸­ã‹ã‚‰ã»ã‚“ã®æ•°ã‚«ãƒ©ãƒ ã ã‘を使用ã™ã‚‹ã‚¯ã‚¨ãƒªã€‚ +- 大é‡ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã™ã‚‹é›†ç´„クエリ。 +- カラムå˜ä½ã§ã®ãƒ‡ãƒ¼ã‚¿åœ§ç¸®ã€‚ + +レãƒãƒ¼ãƒˆä½œæˆæ™‚ã®å¾“æ¥ã®è¡ŒæŒ‡å‘システムã¨åˆ—指å‘データベースã®é•ã„を以下ã«ç¤ºã—ã¾ã™ï¼š + +**従æ¥ã®è¡ŒæŒ‡å‘** +![従æ¥ã®è¡ŒæŒ‡å‘](@site/docs/ja/images/row-oriented.gif#) + +**列指å‘データベース** +![列指å‘データベース](@site/docs/ja/images/column-oriented.gif#) + +列指å‘データベースã¯åˆ†æžã‚¢ãƒ—リケーションã«æœ€é©ã§ã™ã€‚ãªãœãªã‚‰ã€ãƒ†ãƒ¼ãƒ–ルã«å¤šãã®ã‚«ãƒ©ãƒ ã‚’用æ„ã—ã¦ãŠãã“ã¨ãŒã§ãã€æœªä½¿ç”¨ã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªå®Ÿè¡Œæ™‚間中ã«ã‚³ã‚¹ãƒˆã‚’払ã†å¿…è¦ãŒãªã„ã‹ã‚‰ã§ã™ï¼ˆå¾“æ¥ã®OLTPデータベースã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒè¡Œã§ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªæ™‚ã«ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚列指å‘データベースã¯ãƒ“ッグデータ処ç†ã¨ãƒ‡ãƒ¼ã‚¿ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¸ãƒ³ã‚°ã®ãŸã‚ã«è¨­è¨ˆã•ã‚Œã¦ãŠã‚Šã€ã—ã°ã—ã°å®‰ä¾¡ãªãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®åˆ†æ•£ã‚¯ãƒ©ã‚¹ã‚¿ã‚’使ã£ã¦ã‚¹ã‚±ãƒ¼ãƒ«ã—ã¾ã™ã€‚ClickHouseã¯ã€[分散テーブル](../../engines/table-engines/special/distributed.md)ã¨[レプリケーションテーブル](../../engines/table-engines/mergetree-family/replication.md)ã®çµ„ã¿åˆã‚ã›ã§ã“れを実ç¾ã—ã¾ã™ã€‚ diff --git a/docs/ja/faq/general/dbms-naming.md b/docs/ja/faq/general/dbms-naming.md new file mode 100644 index 00000000000..fb391198d24 --- /dev/null +++ b/docs/ja/faq/general/dbms-naming.md @@ -0,0 +1,19 @@ +--- +slug: /ja/faq/general/dbms-naming +title: "「ClickHouseã€ã¨ã¯ã©ã†ã„ã†æ„味ã§ã™ã‹ï¼Ÿ" +toc_hidden: true +toc_priority: 10 +--- + +# 「ClickHouseã€ã¨ã¯ã©ã†ã„ã†æ„味ã§ã™ã‹ï¼Ÿ {#what-does-clickhouse-mean} + +「**Click**streamã€ã¨ã€ŒData ware**House**ã€ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ã“ã‚Œã¯ã€ClickHouseãŒå…ƒã€…Yandex.Metricaã§ã®åˆæœŸã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã‹ã‚‰å付ã‘られãŸã‚‚ã®ã§ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆä¸Šã®ã™ã¹ã¦ã®ã‚¯ãƒªãƒƒã‚¯ã‚’記録ã™ã‚‹ã“ã¨ãŒç›®çš„ã§ã—ãŸã€‚ãã—ã¦ç¾åœ¨ã§ã‚‚ãã®å½¹å‰²ã‚’æžœãŸã—ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«ã¤ã„ã¦è©³ã—ãã¯[ClickHouseã®æ­´å²](../../about-us/history.md)ページをã”覧ãã ã•ã„。 + +ã“ã®äºŒé‡ã®æ„味ã«ã¯ã€æ¬¡ã®2ã¤ã®çµæžœãŒã‚ã‚Šã¾ã™ï¼š + +- Click**H**ouseを書ãæ­£ã—ã„方法ã¯ã€Hを大文字ã«ã™ã‚‹ã“ã¨ã§ã™ã€‚ +- ç•¥ã™å¿…è¦ãŒã‚ã‚‹å ´åˆã«ã¯ã€**CH**を使用ã—ã¦ãã ã•ã„。歴å²çš„ãªç†ç”±ã‹ã‚‰ã€ä¸­å›½ã§ã¯CKã¨ç•¥ã™ã“ã¨ãŒäººæ°—ãŒã‚ã‚Šã¾ã™ãŒã€ã“ã‚Œã¯ä¸»ã«ä¸­å›½èªžã§ã®ClickHouseã«é–¢ã™ã‚‹æœ€åˆã®è¬›æ¼”ã®ä¸€ã¤ã§ã“ã®å½¢ãŒä½¿ã‚ã‚ŒãŸã‹ã‚‰ã§ã™ã€‚ + +:::info +ClickHouseãŒãã®åã‚’å–å¾—ã—ã¦ã‹ã‚‰ä½•å¹´ã‚‚経ã£ãŸå¾Œã€ç‹¬ç«‹ã—ã¦æ„味をæŒã¤2ã¤ã®è¨€è‘‰ã‚’組ã¿åˆã‚ã›ã‚‹ã“ã®æ‰‹æ³•ã¯ã€[Andy Pavloã«ã‚ˆã‚‹ç ”究](https://www.cs.cmu.edu/~pavlo/blog/2020/03/on-naming-a-database-management-system.html)ã§ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«åå‰ã‚’付ã‘る最良ã®æ–¹æ³•ã¨ã—ã¦å–り上ã’られã¾ã—ãŸã€‚å½¼ã¯ã‚«ãƒ¼ãƒã‚®ãƒ¼ãƒ¡ãƒ­ãƒ³å¤§å­¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å‡†æ•™æŽˆã§ã™ã€‚ClickHouseã¯ã€Postgresã¨å…±ã«ã€Œä»Šã¾ã§ã§æœ€é«˜ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã€è³žã‚’å—賞ã—ã¾ã—ãŸã€‚ +::: diff --git a/docs/ja/faq/general/index.md b/docs/ja/faq/general/index.md new file mode 100644 index 00000000000..78fe2ad0f44 --- /dev/null +++ b/docs/ja/faq/general/index.md @@ -0,0 +1,23 @@ +--- +slug: /ja/faq/general/ +sidebar_position: 1 +sidebar_label: ClickHouseã«é–¢ã™ã‚‹ä¸€èˆ¬çš„ãªè³ªå• +keywords: [clickhouse, faq, 質å•, ã¨ã¯] +--- + +# ClickHouseã«é–¢ã™ã‚‹ä¸€èˆ¬çš„ãªè³ªå• + +- [ClickHouseã¨ã¯ä½•ã§ã™ã‹ï¼Ÿ](../../intro.md) +- [ãªãœClickHouseã¯ã“ã‚“ãªã«é€Ÿã„ã®ã§ã™ã‹ï¼Ÿ](../../concepts/why-clickhouse-is-so-fast.md) +- [誰ãŒClickHouseを使用ã—ã¦ã„ã¾ã™ã‹ï¼Ÿ](../../faq/general/who-is-using-clickhouse.md) +- [「ClickHouseã€ã¨ã¯ã©ã†ã„ã†æ„味ã§ã™ã‹ï¼Ÿ](../../faq/general/dbms-naming.md) +- [「Ðе тормозитã€ã¨ã¯ã©ã†ã„ã†æ„味ã§ã™ã‹ï¼Ÿ](../../faq/general/ne-tormozit.md) +- [OLAPã¨ã¯ä½•ã§ã™ã‹ï¼Ÿ](../../faq/general/olap.md) +- [カラム型データベースã¨ã¯ä½•ã§ã™ã‹ï¼Ÿ](../../faq/general/columnar-database.md) +- [ã©ã®ã‚ˆã†ã«ä¸»ã‚­ãƒ¼ã‚’é¸æŠžã™ã‚Œã°ã„ã„ã§ã™ã‹ï¼Ÿ](../../guides/best-practices/sparse-primary-indexes.md) +- [ãªãœMapReduceã®ã‚ˆã†ãªã‚‚ã®ã‚’使ã‚ãªã„ã®ã§ã™ã‹ï¼Ÿ](../../faq/general/mapreduce.md) +- [ClickHouseã«ã‚³ãƒ¼ãƒ‰ã‚’貢献ã™ã‚‹ã«ã¯ã©ã†ã™ã‚Œã°ã‚ˆã„ã§ã™ã‹ï¼Ÿ](/knowledgebase/how-do-i-contribute-code-to-clickhouse) + +:::info ãŠæŽ¢ã—ã®æƒ…å ±ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆ +[Knowledge Base](/knowledgebase/)ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆå†…ã®å¤šæ•°ã®æœ‰ç”¨ãªè¨˜äº‹ã‚‚ã”å‚ç…§ãã ã•ã„。 +::: diff --git a/docs/ja/faq/general/mapreduce.md b/docs/ja/faq/general/mapreduce.md new file mode 100644 index 00000000000..35d3ebd81ef --- /dev/null +++ b/docs/ja/faq/general/mapreduce.md @@ -0,0 +1,14 @@ +--- +slug: /ja/faq/general/mapreduce +title: MapReduceã®ã‚ˆã†ãªã‚‚ã®ã‚’使ã‚ãªã„ç†ç”± +toc_hidden: true +toc_priority: 110 +--- + +# MapReduceã®ã‚ˆã†ãªã‚‚ã®ã‚’使ã‚ãªã„ç†ç”± {#why-not-use-something-like-mapreduce} + +MapReduceã®ã‚ˆã†ãªã‚·ã‚¹ãƒ†ãƒ ã¯ã€åˆ†æ•£ã‚½ãƒ¼ãƒˆã«åŸºã¥ãreduceæ“作を行ã†åˆ†æ•£ã‚³ãƒ³ãƒ”ューティングシステムã¨ã—ã¦å‚ç…§ã§ãã¾ã™ã€‚ã“ã®ã‚¯ãƒ©ã‚¹ã§æœ€ã‚‚一般的ãªã‚ªãƒ¼ãƒ—ンソースソリューションã¯ã€[Apache Hadoop](http://hadoop.apache.org)ã§ã™ã€‚ + +ã“れらã®ã‚·ã‚¹ãƒ†ãƒ ã¯é«˜ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã®ãŸã‚ã€ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ã‚¯ã‚¨ãƒªã«ã¯é©ã—ã¦ã„ã¾ã›ã‚“。言ã„æ›ãˆã‚Œã°ã€ã‚¦ã‚§ãƒ–インターフェースã®ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。リアルタイムデータã®æ›´æ–°ã«ã‚‚ä¸å‘ãã§ã™ã€‚分散ソートã¯ã€æ“作çµæžœã‚„ã™ã¹ã¦ã®ä¸­é–“çµæžœï¼ˆå­˜åœ¨ã™ã‚‹å ´åˆï¼‰ãŒå˜ä¸€ã‚µãƒ¼ãƒãƒ¼ã®RAMã«ã‚ã‚‹ã®ãŒé€šå¸¸ã®ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ã‚¯ã‚¨ãƒªã§ã¯ã€reduceæ“作を実行ã™ã‚‹æœ€å–„ã®æ–¹æ³•ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®ã‚ˆã†ãªå ´åˆã€ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルãŒreduceæ“作を行ã†ãŸã‚ã®æœ€é©ãªæ–¹æ³•ã§ã™ã€‚map-reduceタスクを最é©åŒ–ã™ã‚‹ä¸€èˆ¬çš„ãªã‚¢ãƒ—ローãƒã¯ã€RAM内ã§ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルを使用ã—ãŸäº‹å‰é›†è¨ˆï¼ˆéƒ¨åˆ†çš„ãªreduce)ã§ã™ã€‚ã“ã®æœ€é©åŒ–ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ‰‹å‹•ã§è¡Œã„ã¾ã™ã€‚分散ソートã¯ã€ç°¡å˜ãªmap-reduceタスクを実行ã™ã‚‹éš›ã®ãƒ‘フォーマンス低下ã®ä¸»ãªåŽŸå› ã®ä¸€ã¤ã§ã™ã€‚ + +ã»ã¨ã‚“ã©ã®MapReduceã®å®Ÿè£…ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ä¸Šã§ä»»æ„ã®ã‚³ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ãŒã€å®Ÿé¨“を迅速ã«å®Ÿè¡Œã™ã‚‹ãŸã‚ã«ã¯OLAPã«é©ã—ãŸå®£è¨€åž‹ã‚¯ã‚¨ãƒªè¨€èªžã®æ–¹ãŒå„ªã‚Œã¦ã„ã¾ã™ã€‚例ãˆã°ã€Hadoopã«ã¯Hiveã‚„PigãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€Cloudera Impalaã‚„Shark(廃止ã•ã‚ŒãŸï¼‰ã‚’Spark用ã¨ã—ã¦è€ƒæ…®ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã—ã€Spark SQLã€Prestoã€Apache Drillã‚‚åŒæ§˜ã§ã™ã€‚ã“ã®ã‚ˆã†ãªã‚¿ã‚¹ã‚¯ã‚’実行ã™ã‚‹éš›ã®ãƒ‘フォーマンスã¯ã€å°‚門システムã¨æ¯”較ã—ã¦éžå¸¸ã«éžåŠ¹çŽ‡çš„ã§ã™ãŒã€æ¯”較的高ã„レイテンシーã«ã‚ˆã‚Šã€ã“れらã®ã‚·ã‚¹ãƒ†ãƒ ã‚’ウェブインターフェースã®ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ç¾å®Ÿçš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 diff --git a/docs/ja/faq/general/ne-tormozit.md b/docs/ja/faq/general/ne-tormozit.md new file mode 100644 index 00000000000..7152a6ab3ef --- /dev/null +++ b/docs/ja/faq/general/ne-tormozit.md @@ -0,0 +1,26 @@ +--- +slug: /ja/faq/general/ne-tormozit +title: 「“не тормозитâ€ã¨ã¯ä½•ã‚’æ„味ã—ã¾ã™ã‹ï¼Ÿã€ +toc_hidden: true +toc_priority: 11 +--- + +# 「не тормозитã€ã¨ã¯ä½•ã‚’æ„味ã—ã¾ã™ã‹ï¼Ÿ {#what-does-ne-tormozit-mean} + +ã“ã®è³ªå•ã¯ã€å…¬å¼ã®ClickHouse Tシャツを見ãŸã¨ãã«ã‚ˆã出ã¦ãã¾ã™ã€‚Tシャツã®å‰é¢ã«ã¯å¤§ãã「**ClickHouse не тормозит**ã€ã¨æ›¸ã‹ã‚Œã¦ã„ã¾ã™ã€‚ + +ClickHouseãŒã‚ªãƒ¼ãƒ—ンソースã«ãªã‚‹å‰ã¯ã€ãƒ­ã‚·ã‚¢æœ€å¤§ã®ITä¼æ¥­ã§ã‚ã‚‹[Yandex](https://yandex.com/company/)ã«ã‚ˆã£ã¦ç¤¾å†…ストレージシステムã¨ã—ã¦é–‹ç™ºã•ã‚Œã¦ã„ã¾ã—ãŸã€‚ãã®ãŸã‚ã€æœ€åˆã¯ãƒ­ã‚·ã‚¢èªžã§ã€ŒÐ½Ðµ тормозитã€ï¼ˆç™ºéŸ³ã¯ã€Œãƒãƒ»ãƒˆãƒ«ãƒ¢ã‚¸ãƒƒãƒˆã€ï¼‰ã¨ã„ã†ã‚¹ãƒ­ãƒ¼ã‚¬ãƒ³ãŒä»˜ã‘られã¾ã—ãŸã€‚オープンソースã¨ã—ã¦ãƒªãƒªãƒ¼ã‚¹ã•ã‚ŒãŸå¾Œã€ãƒ­ã‚·ã‚¢ã§ã®ã‚¤ãƒ™ãƒ³ãƒˆç”¨ã«ãã®ã‚¹ãƒ­ãƒ¼ã‚¬ãƒ³ã‚’ãã®ã¾ã¾ä½¿ã£ãŸTシャツを最åˆã«è£½ä½œã—ã¾ã—ãŸã€‚ + +ãã®å¾Œã€ãƒ­ã‚·ã‚¢å›½å¤–ã®ã‚¤ãƒ™ãƒ³ãƒˆã§ã‚‚é…布を予定ã—ã¦ã„ãŸæ¬¡ã®ãƒãƒƒãƒã«å¯¾ã—ã¦ã€ã‚¹ãƒ­ãƒ¼ã‚¬ãƒ³ã®è‹±èªžç‰ˆã‚’作ã‚ã†ã¨ã—ã¾ã—ãŸã€‚ã—ã‹ã—ã€ãƒ­ã‚·ã‚¢èªžã¯ç‰©äº‹ã‚’表ç¾ã™ã‚‹ã®ã«å„ªé›…ãªè¨€èªžã§ã‚ã‚‹ãŸã‚ã€ã‚¹ãƒšãƒ¼ã‚¹ã®åˆ¶é™ãŒã‚ã‚‹Tシャツã«ã†ã¾ã翻訳ã™ã‚‹ã“ã¨ãŒã§ããšï¼ˆå¤šãã®é¸æŠžè‚¢ãŒé•·ã™ãŽãŸã‚Šä¸æ­£ç¢ºã ã£ãŸã‚Šã—ã¾ã—ãŸï¼‰ã€å›½éš›çš„ãªã‚¤ãƒ™ãƒ³ãƒˆç”¨ã«è£½ä½œã—ãŸTシャツã§ã‚‚ロシア語ã®ã¾ã¾ã‚¹ãƒ­ãƒ¼ã‚¬ãƒ³ã‚’維æŒã™ã‚‹ã“ã¨ã«ã—ã¾ã—ãŸã€‚ã“ã®é¸æŠžã¯ç´ æ™´ã‚‰ã—ã„決断ã¨ãªã‚Šã€ä¸–界中ã®äººã€…ãŒãれを見ã¦å¥½å¥‡å¿ƒã‚’ãã™ãられãŸã‚Šã€é©šã„ãŸã‚Šã—ã¦ã„ã¾ã™ã€‚ + +ã§ã¯ã€ãã‚Œã¯ä½•ã‚’æ„味ã™ã‚‹ã®ã§ã—ょã†ã‹ï¼Ÿã€ŒÐ½Ðµ тормозитã€ã‚’翻訳ã™ã‚‹ã¨ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + +- 文字通りã«ç¿»è¨³ã™ã‚‹ã¨ã€ã€ŒClickHouseã¯ãƒ–レーキペダルをè¸ã¾ãªã„ã€ã¨ã„ã†æ„Ÿã˜ã§ã™ã€‚ +- IT背景をæŒã¤ãƒ­ã‚·ã‚¢ã®äººã«ã¯ã€ã€Œå¤§è¦æ¨¡ãªã‚·ã‚¹ãƒ†ãƒ ãŒé…れるã®ã¯ã€ClickHouseã®ã›ã„ã§ã¯ãªã„ã€ã¨èžã“ãˆã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +- より短ãã€ã—ã‹ã—ãã‚Œã»ã©æ­£ç¢ºã§ã¯ãªã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨ã—ã¦ã¯ã€ã€ŒClickHouseã¯é…ããªã„ã€ã€ŒClickHouseã¯é…ã‚Œãªã„ã€ã‚ã‚‹ã„ã¯å˜ã«ã€ŒClickHouseã¯é«˜é€Ÿã€ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + +ã“れらã®Tシャツを直接見ãŸã“ã¨ãŒãªã„å ´åˆã¯ã€ClickHouse関連ã®å¤šãã®ãƒ“デオã§ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ã§è¦‹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€ã“ã®ãƒ“デオã§ã™ï¼š + + + +P.S. ã“れらã®Tシャツã¯è²©å£²ã•ã‚Œã¦ãŠã‚‰ãšã€ã»ã¨ã‚“ã©ã®[ClickHouse Meetup](https://www.meetup.com/pro/clickhouse/)ã§ã€ç‰¹ã«å„ªã‚ŒãŸè³ªå•ã‚’ã—ãŸã‚Šã€ãã®ä»–ã®å½¢ã§ç©æ¥µçš„ã«å‚加ã—ãŸæ–¹ã«ç„¡æ–™ã§é…布ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/faq/general/olap.md b/docs/ja/faq/general/olap.md new file mode 100644 index 00000000000..7e7e35109ca --- /dev/null +++ b/docs/ja/faq/general/olap.md @@ -0,0 +1,40 @@ +--- +slug: /ja/faq/general/olap +title: OLAPã¨ã¯ä½•ã§ã™ã‹ï¼Ÿ +toc_hidden: true +toc_priority: 100 +--- + +# OLAPã¨ã¯ä½•ã§ã™ã‹ï¼Ÿ {#what-is-olap} + +[OLAP](https://en.wikipedia.org/wiki/Online_analytical_processing)ã¯ã€ã‚ªãƒ³ãƒ©ã‚¤ãƒ³åˆ†æžå‡¦ç†ï¼ˆOnline Analytical Processing)ã®ç•¥ã§ã™ã€‚技術的視点ã¨ãƒ“ジãƒã‚¹çš„視点ã®2ã¤ã®è¦–点ã‹ã‚‰è¦‹ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€éžå¸¸ã«é«˜ã„レベルã§ã¯ã“れらã®å˜èªžã‚’逆ã‹ã‚‰èª­ã‚€ã ã‘ã§ç†è§£ã§ãã¾ã™ã€‚ + +å‡¦ç† +: ã„ãã¤ã‹ã®ã‚½ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ãŒå‡¦ç†ã•ã‚Œâ€¦ + +åˆ†æž +: …分æžãƒ¬ãƒãƒ¼ãƒˆã‚„洞察を生æˆã—… + +オンライン +: …リアルタイムã§è¡Œã‚ã‚Œã¾ã™ã€‚ + +## ビジãƒã‚¹ã®è¦–点ã‹ã‚‰è¦‹ãŸOLAP {#olap-from-the-business-perspective} + +è¿‘å¹´ã€ãƒ“ジãƒã‚¹é–¢ä¿‚者ã¯ãƒ‡ãƒ¼ã‚¿ã®ä¾¡å€¤ã«æ°—ã¥ã始ã‚ã¾ã—ãŸã€‚盲目的ã«æ„æ€æ±ºå®šã‚’è¡Œã†ä¼æ¥­ã¯å¤šãã®å ´åˆã€ç«¶äº‰ã«è¿½ã„ã¤ã‘ãªããªã‚Šã¾ã™ã€‚æˆåŠŸã—ã¦ã„ã‚‹ä¼æ¥­ã®ãƒ‡ãƒ¼ã‚¿é§†å‹•ã‚¢ãƒ—ローãƒã¯ã€ãƒ“ジãƒã‚¹æ±ºå®šã‚’è¡Œã†ä¸Šã§é ãã‹ã‚‰ã§ã‚‚役立ã¤å¯èƒ½æ€§ã®ã‚ã‚‹ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’åŽé›†ã—ã€ãれらをタイムリーã«åˆ†æžã™ã‚‹ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ãã“ã§OLAPデータベース管ç†ã‚·ã‚¹ãƒ†ãƒ ï¼ˆDBMS)ãŒç™»å ´ã—ã¾ã™ã€‚ + +ビジãƒã‚¹ã®è¦³ç‚¹ã‹ã‚‰ã€OLAPã¯ä¼æ¥­ãŒç¶™ç¶šçš„ã«è¨ˆç”»ã—ã€åˆ†æžã—ã€é‹ç”¨æ´»å‹•ã‚’報告ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã€ãã®çµæžœã€åŠ¹çŽ‡ã‚’最大化ã—ã€çµŒè²»ã‚’削減ã—ã€æœ€çµ‚çš„ã«ã¯å¸‚場シェアをç²å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ç¤¾å†…ã®ã‚·ã‚¹ãƒ†ãƒ ã§è¡Œã†ã“ã¨ã‚‚ã€ã‚¦ã‚§ãƒ–やモãƒã‚¤ãƒ«ã®åˆ†æžã‚µãƒ¼ãƒ“スã€CRMサービスãªã©ã€SaaSプロãƒã‚¤ãƒ€ãƒ¼ã«ã‚¢ã‚¦ãƒˆã‚½ãƒ¼ã‚¹ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚OLAPã¯ã€å¤šãã®BIアプリケーション(ビジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ï¼‰ã®èƒŒå¾Œã«ã‚る技術ã§ã™ã€‚ + +ClickHouseã¯ã€ç‰¹å®šã®ãƒ‰ãƒ¡ã‚¤ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚’分æžã™ã‚‹ãŸã‚ã®SaaSソリューションã®ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã¨ã—ã¦ã‚ˆã使用ã•ã‚Œã‚‹OLAPデータベース管ç†ã‚·ã‚¹ãƒ†ãƒ ã§ã™ã€‚ã—ã‹ã—ã€ã„ã¾ã ã«ç¬¬ä¸‰è€…プロãƒã‚¤ãƒ€ãƒ¼ã¨ãƒ‡ãƒ¼ã‚¿ã‚’共有ã™ã‚‹ã“ã¨ã‚’躊躇ã™ã‚‹ãƒ“ジãƒã‚¹ã‚‚ã‚ã‚Šã€ç¤¾å†…データウェアãƒã‚¦ã‚¹ã¨ã„ã†ã‚·ãƒŠãƒªã‚ªã‚‚ç¾å®Ÿçš„ã§ã™ã€‚ + +## 技術的視点ã‹ã‚‰è¦‹ãŸOLAP {#olap-from-the-technical-perspective} + +ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã¯ã€OLAP(オンライン**分æž**処ç†ï¼‰ã¨OLTP(オンライン**å–引**処ç†ï¼‰ã®2ã¤ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«åˆ†é¡žã§ãã¾ã™ã€‚å‰è€…ã¯ã€å¤§é‡ã®å±¥æ­´ãƒ‡ãƒ¼ã‚¿ã«åŸºã¥ãレãƒãƒ¼ãƒˆã‚’作æˆã™ã‚‹ã“ã¨ã«é‡ç‚¹ã‚’ç½®ã„ã¦ã„ã¾ã™ãŒã€ãã‚Œã»ã©é »ç¹ã«ã¯è¡Œã£ã¦ã„ã¾ã›ã‚“。一方ã€å¾Œè€…ã¯é€šå¸¸ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®é€£ç¶šã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’処ç†ã—ã€ãƒ‡ãƒ¼ã‚¿ã®ç¾åœ¨ã®çŠ¶æ…‹ã‚’常ã«å¤‰æ›´ã—ã¾ã™ã€‚ + +実際ã«ã¯ã€OLAPã¨OLTPã¯ã‚«ãƒ†ã‚´ãƒªã§ã¯ãªãã€ã‚¹ãƒšã‚¯ãƒˆãƒ©ãƒ ã§ã™ã€‚ã»ã¨ã‚“ã©ã®å®Ÿéš›ã®ã‚·ã‚¹ãƒ†ãƒ ã¯ãã®ã©ã¡ã‚‰ã‹ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ãŒã€å対ã®ç¨®é¡žã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ãŒæœ›ã¾ã—ã„å ´åˆã«å‚™ãˆã¦ã€ã„ãã¤ã‹ã®ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã‚„回é¿ç­–ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ã“ã®çŠ¶æ³ã¯ã€å¤šãã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚·ã‚¹ãƒ†ãƒ ã‚’çµ±åˆã—ã¦æ“作ã™ã‚‹ã“ã¨ã‚’ä¼æ¥­ã«å¼·åˆ¶ã—ã€ãã‚Œã¯å¤§ã—ãŸã“ã¨ã§ã¯ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ã‚·ã‚¹ãƒ†ãƒ ã‚’増やã™ã“ã¨ã§ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ãŒã‚ˆã‚Šé«˜ä¾¡ã«ãªã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€æœ€è¿‘ã®ãƒˆãƒ¬ãƒ³ãƒ‰ã¯ã€HTAP(**ãƒã‚¤ãƒ–リッドå–引/分æžå‡¦ç†**)ã«ç§»è¡Œã—ã¦ãŠã‚Šã€ä¸¡æ–¹ã®ç¨®é¡žã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ãŒå˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã§åŒç­‰ã«ã†ã¾ã処ç†ã•ã‚Œã¾ã™ã€‚ + +ã‚‚ã—DBMSãŒç´”粋ãªOLAPã¾ãŸã¯ç´”粋ãªOLTPã¨ã—ã¦å§‹ã¾ã£ãŸã¨ã—ã¦ã‚‚ã€ãれらã¯ç«¶äº‰ã«è¿½ã„ã¤ããŸã‚ã«HTAPã®æ–¹å‘ã«é€²ã‚€ã“ã¨ã‚’å¼·ã„られã¾ã™ã€‚ClickHouseも例外ã§ã¯ã‚ã‚Šã¾ã›ã‚“。最åˆã¯[ã§ãã‚‹ã ã‘速ã„OLAPシステム](/ja/concepts/why-clickhouse-is-so-fast)ã¨ã—ã¦è¨­è¨ˆã•ã‚Œã¦ãŠã‚Šã€å®Œå…¨ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚µãƒãƒ¼ãƒˆã¯ã¾ã ã‚ã‚Šã¾ã›ã‚“ãŒã€ä¸€è²«ã—ãŸèª­ã¿æ›¸ãやデータã®æ›´æ–°/削除ã®ãŸã‚ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ã‚ˆã†ãªæ©Ÿèƒ½ã¯è¿½åŠ ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã—ãŸã€‚ + +OLAPã¨OLTPシステム間ã®åŸºæœ¬çš„ãªãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ã¯å¤‰ã‚ã‚Šã¾ã›ã‚“: + +- 分æžãƒ¬ãƒãƒ¼ãƒˆã‚’効率的ã«æ§‹ç¯‰ã™ã‚‹ã«ã¯ã€ã‚«ãƒ©ãƒ ã‚’別々ã«èª­ã¿å–ã‚‹ã“ã¨ãŒé‡è¦ã§ã‚ã‚‹ãŸã‚ã€ã»ã¨ã‚“ã©ã®OLAPデータベースã¯[列指å‘](/ja/faq/general/columnar-database)ã§ã™ã€‚ +- カラムを別々ã«ä¿å­˜ã™ã‚‹ã¨ã€è¡Œã®è¿½åŠ ã‚„インプレースã®ä¿®æ­£ãªã©ã®æ“作ã®ã‚³ã‚¹ãƒˆãŒã€ã‚«ãƒ©ãƒ ã®æ•°ï¼ˆã‚·ã‚¹ãƒ†ãƒ ãŒã‚¤ãƒ™ãƒ³ãƒˆã®ã™ã¹ã¦ã®è©³ç´°ã‚’万ãŒä¸€ã«å‚™ãˆã¦åŽé›†ã—よã†ã¨ã™ã‚‹å ´åˆã¯è†¨å¤§ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚る)ã«æ¯”例ã—ã¦å¢—加ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ã»ã¨ã‚“ã©ã®OLTPシステムã¯ãƒ‡ãƒ¼ã‚¿ã‚’è¡Œã”ã¨ã«é…ç½®ã—ã¦ä¿å­˜ã—ã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/faq/general/who-is-using-clickhouse.md b/docs/ja/faq/general/who-is-using-clickhouse.md new file mode 100644 index 00000000000..a3531418850 --- /dev/null +++ b/docs/ja/faq/general/who-is-using-clickhouse.md @@ -0,0 +1,20 @@ +--- +slug: /ja/faq/general/who-is-using-clickhouse +title: ClickHouseを使用ã—ã¦ã„ã‚‹ã®ã¯èª°ã§ã™ã‹ï¼Ÿ +toc_hidden: true +toc_priority: 9 +--- + +# ClickHouseを使用ã—ã¦ã„ã‚‹ã®ã¯èª°ã§ã™ã‹ï¼Ÿ {#who-is-using-clickhouse} + +オープンソース製å“ã§ã‚ã‚‹ãŸã‚ã€ã“ã®è³ªå•ã«ç­”ãˆã‚‹ã®ã¯ãã‚Œã»ã©ç°¡å˜ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ClickHouseを使ã„ãŸã„å ´åˆã€èª°ã«ã‚‚言ã†å¿…è¦ã¯ãªãã€ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚„事å‰ã‚³ãƒ³ãƒ‘イルパッケージをå–å¾—ã™ã‚‹ã ã‘ã§ã™ã€‚契約をçµã¶å¿…è¦ã¯ãªãã€[Apache 2.0 ライセンス](https://github.com/ClickHouse/ClickHouse/blob/master/LICENSE)ã«ã‚ˆã£ã¦åˆ¶ç´„ã®ãªã„ソフトウェアé…布ãŒè¨±å¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ã¾ãŸã€æŠ€è¡“スタックã¯ã—ã°ã—ã°NDAã§ã‚«ãƒãƒ¼ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã®ã‚°ãƒ¬ãƒ¼ã‚¾ãƒ¼ãƒ³ã«ã‚ã‚Šã¾ã™ã€‚ã„ãã¤ã‹ã®ä¼æ¥­ã¯ã€ã‚ªãƒ¼ãƒ—ンソースã§ã‚ã£ã¦ã‚‚競争上ã®å„ªä½æ€§ã¨ã—ã¦æŠ€è¡“を使用ã™ã‚‹ã¨è€ƒãˆã¦ãŠã‚Šã€å¾“業員ãŒå…¬ã«è©³ç´°ã‚’共有ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã›ã‚“。一部ã®ä¼æ¥­ã¯PRリスクãŒã‚ã‚‹ã¨è€ƒãˆã¦ãŠã‚Šã€å®Ÿè£…ã®è©³ç´°ã®å…¬é–‹ã¯PR部門ã®æ‰¿èªãŒå¿…è¦ã§ã™ã€‚ + +ã§ã¯ã€ClickHouseを使用ã—ã¦ã„ã‚‹ã®ã¯èª°ãªã®ã‹ã€ã©ã†ã‚„ã£ã¦çŸ¥ã‚‹ã®ã§ã—ょã†ã‹ï¼Ÿ + +一ã¤ã®æ–¹æ³•ã¯ã€**周りã«èžã**ã“ã¨ã§ã™ã€‚書é¢ã§ãªã„å ´åˆã€äººã€…ã¯è‡ªåˆ†ã®ä¼šç¤¾ã§ä½¿ç”¨ã•ã‚Œã¦ã„る技術やã€ä½¿ç”¨ä¾‹ã€ä½¿ç”¨ã—ã¦ã„ã‚‹ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®ç¨®é¡žã€ãƒ‡ãƒ¼ã‚¿ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ãªã©ã‚’より自由ã«å…±æœ‰ã—ã¾ã™ã€‚ç§ãŸã¡ã¯ä¸–界中ã®[ClickHouse Meetup](https://www.youtube.com/channel/UChtmrD-dsdpspr42P_PyRAw/playlists)ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨å®šæœŸçš„ã«ä¼šè©±ã—ã¦ãŠã‚Šã€1000社以上ã®ä¼æ¥­ãŒClickHouseを使用ã—ã¦ã„ã‚‹ã¨ã„ã†è©±ã‚’耳ã«ã—ã¦ã„ã¾ã™ã€‚残念ãªãŒã‚‰ã€ãれらã¯å†ç¾å¯èƒ½ã§ã¯ãªãã€æ½œåœ¨çš„ãªãƒˆãƒ©ãƒ–ルをé¿ã‘ã‚‹ãŸã‚ã€ãã®ã‚ˆã†ãªè©±ã¯NDAã®ä¸‹ã§èªžã‚‰ã‚ŒãŸã‚‚ã®ã¨è€ƒãˆã¦ã„ã¾ã™ã€‚ã—ã‹ã—ã€ä»Šå¾Œã®ãƒŸãƒ¼ãƒˆã‚¢ãƒƒãƒ—ã«å‚加ã—ã€ç›´æŽ¥ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨è©±ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ミートアップã®ç™ºè¡¨æ–¹æ³•ã¯ã„ãã¤ã‹ã‚ã‚Šã€ä¾‹ãˆã°[Twitter](http://twitter.com/ClickHouseDB/)ã«ç™»éŒ²ã§ãã¾ã™ã€‚ + +二ã¤ç›®ã®æ–¹æ³•ã¯ã€ClickHouseを使用ã—ã¦ã„ã‚‹ã“ã¨ã‚’**å…¬ã«ç™ºè¡¨ã—ã¦ã„ã‚‹**ä¼æ¥­ã‚’探ã™ã“ã¨ã§ã™ã€‚ã“ã‚Œã«ã¯é€šå¸¸ã€ãƒ–ログ投稿ã€è¬›æ¼”ビデオã€ã‚¹ãƒ©ã‚¤ãƒ‰ãƒ‡ãƒƒã‚­ãªã©ã®å…·ä½“çš„ãªè¨¼æ‹ ãŒã‚ã‚Šã¾ã™ã€‚ç§ãŸã¡ã®**[Adopters](../../about-us/adopters.md)**ページã«ã¯ã€ãã®ã‚ˆã†ãªè¨¼æ‹ ã¸ã®ãƒªãƒ³ã‚¯é›†ã‚’åŽé›†ã—ã¦ãŠã‚Šã€ã‚ãªãŸã®é›‡ç”¨ä¸»ã®ã‚¹ãƒˆãƒ¼ãƒªãƒ¼ã‚„見ã¤ã‘ãŸãƒªãƒ³ã‚¯ã‚’自由ã«æä¾›ã—ã¦ãã ã•ã„(プロセスã§NDAã‚’é•åã—ãªã„よã†ã«æ³¨æ„ã—ã¦ãã ã•ã„)。 + +採用者リストã«ã¯ã€Bloombergã€Ciscoã€ä¸­å›½é›»ä¿¡ã€Tencentã€Lyftãªã©ã®éžå¸¸ã«å¤§ããªä¼šç¤¾ã®åå‰ãŒè¦‹ã¤ã‹ã‚Šã¾ã™ãŒã€æœ€åˆã®æ–¹æ³•ã§ã¯ãれ以上ã®ä¼æ¥­ãŒã„ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã—ãŸã€‚例ãˆã°ã€[Forbesã«ã‚ˆã‚‹æœ€å¤§ã®ITä¼æ¥­ã®ãƒªã‚¹ãƒˆï¼ˆ2020年)](https://www.forbes.com/sites/hanktucker/2020/05/13/worlds-largest-technology-companies-2020-apple-stays-on-top-zoom-and-uber-debut/)を見ã¦ã‚‚ã€ãã®åŠåˆ†ä»¥ä¸ŠãŒä½•ã‚‰ã‹ã®å½¢ã§ClickHouseを使用ã—ã¦ã„ã¾ã™ã€‚ã¾ãŸã€ã‚‚ã¨ã‚‚ã¨ClickHouseã‚’2016å¹´ã«ã‚ªãƒ¼ãƒ—ンソース化ã—ã€ãƒ¨ãƒ¼ãƒ­ãƒƒãƒ‘ã§æœ€å¤§ã®ITä¼æ¥­ã®ä¸€ã¤ã§ã‚ã‚‹[Yandex](../../about-us/history.md)も忘れã¦ã¯ãªã‚Šã¾ã›ã‚“。 diff --git a/docs/ja/faq/integration/_category_.yml b/docs/ja/faq/integration/_category_.yml new file mode 100644 index 00000000000..28e8a6f6134 --- /dev/null +++ b/docs/ja/faq/integration/_category_.yml @@ -0,0 +1,4 @@ +position: 20 +label: 'Integration' +collapsible: true +collapsed: true diff --git a/docs/ja/faq/integration/index.md b/docs/ja/faq/integration/index.md new file mode 100644 index 00000000000..5ff92ea6fcf --- /dev/null +++ b/docs/ja/faq/integration/index.md @@ -0,0 +1,20 @@ +--- +slug: /ja/faq/integration/ +sidebar_position: 1 +sidebar_label: ClickHouseã¨ä»–ã®ã‚·ã‚¹ãƒ†ãƒ ã®çµ±åˆ +keywords: [clickhouse, faq, questions, integrations] +--- + +# ClickHouseã¨ä»–ã®ã‚·ã‚¹ãƒ†ãƒ ã®çµ±åˆã«é–¢ã™ã‚‹è³ªå• + +- [ClickHouseã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã©ã†ã™ã‚Œã°ã‚ˆã„ã§ã™ã‹ï¼Ÿ](https://clickhouse.com/docs/knowledgebase/file-export) +- [JSONã‚’ClickHouseã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹æ–¹æ³•ã¯ï¼Ÿ](/docs/ja/integrations/data-ingestion/data-formats/json/intro.md) +- [Kafkaã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã©ã†ã™ã‚Œã°ã‚ˆã„ã§ã™ã‹ï¼Ÿ](/docs/ja/integrations/data-ingestion/kafka/index.md) +- [JavaアプリケーションをClickHouseã«æŽ¥ç¶šã§ãã¾ã™ã‹ï¼Ÿ](/docs/ja/integrations/data-ingestion/dbms/jdbc-with-clickhouse.md) +- [ClickHouseã¯MySQLã®ãƒ†ãƒ¼ãƒ–ルを読ã¿å–ã‚Œã¾ã™ã‹ï¼Ÿ](/docs/ja/integrations/data-ingestion/dbms/mysql/index.md) +- [ClickHouseã¯PostgreSQLã®ãƒ†ãƒ¼ãƒ–ルを読ã¿å–ã‚Œã¾ã™ã‹ï¼Ÿ](/docs/ja/integrations/data-ingestion/dbms/postgresql/index.md) +- [ODBCを介ã—ã¦Oracleã«æŽ¥ç¶šã™ã‚‹ã¨ãã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã©ã†ã™ã‚Œã°ã‚ˆã„ã§ã™ã‹ï¼Ÿ](/docs/ja/faq/integration/oracle-odbc.md) + +:::info ãŠæŽ¢ã—ã®æƒ…å ±ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã‹ï¼Ÿ +[ナレッジベース](/knowledgebase/)ã‚’ã”覧ã„ãŸã ãã€ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ã‚る多ãã®æœ‰ç›Šãªè¨˜äº‹ã‚‚ã”å‚ç…§ãã ã•ã„。 +::: diff --git a/docs/ja/faq/integration/json-import.md b/docs/ja/faq/integration/json-import.md new file mode 100644 index 00000000000..625c18d13a5 --- /dev/null +++ b/docs/ja/faq/integration/json-import.md @@ -0,0 +1,35 @@ +--- +slug: /ja/faq/integration/json-import +title: ClickHouseã«JSONをインãƒãƒ¼ãƒˆã™ã‚‹æ–¹æ³• +toc_hidden: true +toc_priority: 11 +--- + +# ClickHouseã«JSONをインãƒãƒ¼ãƒˆã™ã‚‹æ–¹æ³• {#how-to-import-json-into-clickhouse} + +ClickHouseã¯ã€[入力ãŠã‚ˆã³å‡ºåŠ›ã®ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿å½¢å¼](../../interfaces/formats.md)を幅広ãサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚データå–ã‚Šè¾¼ã¿ã«æœ€ã‚‚一般的ã«ä½¿ç”¨ã•ã‚Œã‚‹JSONã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã®1ã¤ã¯ã€[JSONEachRow](../../interfaces/formats.md#jsoneachrow)ã§ã™ã€‚ã“ã®å½¢å¼ã§ã¯ã€1ã¤ã®JSONオブジェクトãŒ1è¡Œã«å¯¾å¿œã—ã€å„オブジェクトãŒæ”¹è¡Œã§åŒºåˆ‡ã‚‰ã‚Œã¾ã™ã€‚ + +## 例 {#examples} + +[HTTPインターフェース](../../interfaces/http.md)を使用ã™ã‚‹å ´åˆ: + +``` bash +$ echo '{"foo":"bar"}' | curl 'http://localhost:8123/?query=INSERT%20INTO%20test%20FORMAT%20JSONEachRow' --data-binary @- +``` + +[CLIインターフェース](../../interfaces/cli.md)を使用ã™ã‚‹å ´åˆ: + +``` bash +$ echo '{"foo":"bar"}' | clickhouse-client --query="INSERT INTO test FORMAT JSONEachRow" +``` + +データを手動ã§æŒ¿å…¥ã™ã‚‹ä»£ã‚ã‚Šã«ã€[インテグレーションツール](../../integrations/index.mdx)を使用ã™ã‚‹ã“ã¨ã‚‚検討ã—ã¦ãã ã•ã„。 + +## 便利ãªè¨­å®š {#useful-settings} + +- `input_format_skip_unknown_fields` ã¯ã€ãƒ†ãƒ¼ãƒ–ルスキーマã«å­˜åœ¨ã—ãªã„追加ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒã‚ã£ã¦ã‚‚ã€ãれらを無視ã—ã¦JSONを挿入ã§ãるよã†ã«ã—ã¾ã™ã€‚ +- `input_format_import_nested_json` ã¯ã€[Nested](../../sql-reference/data-types/nested-data-structures/index.md)åž‹ã®ã‚«ãƒ©ãƒ ã«ãƒã‚¹ãƒˆã•ã‚ŒãŸJSONオブジェクトを挿入ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +:::note +設定ã¯ã€HTTPインターフェースã§ã¯ `GET` パラメータã¨ã—ã¦ã€`CLI` インターフェースã§ã¯ `--` ã§å§‹ã¾ã‚‹è¿½åŠ ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³å¼•æ•°ã¨ã—ã¦æŒ‡å®šã•ã‚Œã¾ã™ã€‚ +::: diff --git a/docs/ja/faq/integration/oracle-odbc.md b/docs/ja/faq/integration/oracle-odbc.md new file mode 100644 index 00000000000..56ed5b90b77 --- /dev/null +++ b/docs/ja/faq/integration/oracle-odbc.md @@ -0,0 +1,16 @@ +--- +slug: /ja/faq/integration/oracle-odbc +title: ODBC経由ã§Oracleを使用ã™ã‚‹éš›ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã©ã†ã™ã‚Œã°ã‚ˆã„ã§ã™ã‹ï¼Ÿ +toc_hidden: true +toc_priority: 20 +--- + +# ODBC経由ã§Oracleを使用ã™ã‚‹éš›ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã©ã†ã™ã‚Œã°ã‚ˆã„ã§ã™ã‹ï¼Ÿ {#oracle-odbc-encodings} + +Oracleã‚’Oracle ODBCドライãƒãƒ¼ã‚’通ã˜ã¦ClickHouse外部Dictionaryã®ã‚½ãƒ¼ã‚¹ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å ´åˆã€`/etc/default/clickhouse`ã§`NLS_LANG`環境変数ã«æ­£ã—ã„値を設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[Oracle NLS_LANG FAQ](https://www.oracle.com/technetwork/products/globalization/nls-lang-099431.html)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**例** + +``` sql +NLS_LANG=RUSSIAN_RUSSIA.UTF8 +``` diff --git a/docs/ja/faq/operations/_category_.yml b/docs/ja/faq/operations/_category_.yml new file mode 100644 index 00000000000..b1843465799 --- /dev/null +++ b/docs/ja/faq/operations/_category_.yml @@ -0,0 +1,4 @@ +position: 30 +label: 'Operations' +collapsible: true +collapsed: true diff --git a/docs/ja/faq/operations/delete-old-data.md b/docs/ja/faq/operations/delete-old-data.md new file mode 100644 index 00000000000..01f0c27e594 --- /dev/null +++ b/docs/ja/faq/operations/delete-old-data.md @@ -0,0 +1,55 @@ +--- +slug: /ja/faq/operations/delete-old-data +title: ClickHouseテーブルã‹ã‚‰å¤ã„レコードを削除ã§ãã¾ã™ã‹ï¼Ÿ +toc_hidden: true +toc_priority: 20 +--- + +# ClickHouseテーブルã‹ã‚‰å¤ã„レコードを削除ã§ãã¾ã™ã‹ï¼Ÿ {#is-it-possible-to-delete-old-records-from-a-clickhouse-table} + +短ã„ç­”ãˆã¯ã€Œã¯ã„ã€ã§ã™ã€‚ClickHouseã¯ã€å¤ã„データを削除ã—ã¦ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’解放ã™ã‚‹ãŸã‚ã®è¤‡æ•°ã®ä»•çµ„ã¿ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚å„仕組ã¿ã¯ç•°ãªã‚‹ã‚·ãƒŠãƒªã‚ªã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ + +## æœ‰åŠ¹æœŸé™ (TTL) {#ttl} + +ClickHouseã¯ã€æ¡ä»¶ãŒç™ºç”Ÿã—ãŸã¨ãã«è‡ªå‹•çš„ã«å€¤ã‚’削除ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã®æ¡ä»¶ã¯ã€é€šå¸¸ã¯ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—カラムã«å¯¾ã™ã‚‹å›ºå®šã‚ªãƒ•ã‚»ãƒƒãƒˆã¨ã—ã¦ã€ä»»æ„ã®ã‚«ãƒ©ãƒ ã«åŸºã¥ãå¼ã¨ã—ã¦è¨­å®šã•ã‚Œã¾ã™ã€‚ + +ã“ã®ã‚¢ãƒ—ローãƒã®ä¸»è¦ãªåˆ©ç‚¹ã¯ã€TTLãŒè¨­å®šã•ã‚Œã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã®å‰Šé™¤ãŒãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§è‡ªå‹•çš„ã«è¡Œã‚ã‚Œã€å¤–部システムãŒãƒˆãƒªã‚¬ãƒ¼ã‚’å¿…è¦ã¨ã—ãªã„ã“ã¨ã§ã™ã€‚ + +:::note +TTLã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’[/dev/null](https://en.wikipedia.org/wiki/Null_device)ã«ç§»å‹•ã™ã‚‹ã ã‘ã§ãªãã€SSDã‹ã‚‰HDDã¸ã®ã‚ˆã†ã«ã€ç•°ãªã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚·ã‚¹ãƒ†ãƒ é–“ã§ã®ãƒ‡ãƒ¼ã‚¿ã®ç§»å‹•ã«ã‚‚使用ã§ãã¾ã™ã€‚ +::: + +[æœ‰åŠ¹æœŸé™ (TTL) ã®è¨­å®š](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-ttl)ã«é–¢ã™ã‚‹è©³ç´°æƒ…報。 + +## DELETE FROM + +[DELETE FROM](/docs/ja/sql-reference/statements/delete.md)ã¯ã€ClickHouseã§ã®æ¨™æº–çš„ãªDELETEクエリã®å®Ÿè¡Œã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚フィルタå¥ã§å¯¾è±¡ã¨ã•ã‚ŒãŸè¡Œã¯å‰Šé™¤ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã€å°†æ¥ã®çµæžœã‚»ãƒƒãƒˆã‹ã‚‰é™¤å¤–ã•ã‚Œã¾ã™ã€‚è¡Œã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ã¯éžåŒæœŸã§è¡Œã‚ã‚Œã¾ã™ã€‚ + +:::note +DELETE FROMã¯ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³23.3以é™ã§ä¸€èˆ¬ã«ä½¿ç”¨å¯èƒ½ã§ã™ã€‚å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã§ã‚ã‚Šã€ä»¥ä¸‹ã®è¨­å®šã§æœ‰åŠ¹åŒ–ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: +``` +SET allow_experimental_lightweight_delete = true; +``` +::: + +## ALTER DELETE {#alter-delete} + +ALTER DELETEã¯éžåŒæœŸãƒãƒƒãƒæ“作を使用ã—ã¦è¡Œã‚’削除ã—ã¾ã™ã€‚DELETE FROMã¨ã¯ç•°ãªã‚Šã€ALTER DELETE後ã«å®Ÿè¡Œã•ã‚Œã€ãƒãƒƒãƒæ“作ãŒå®Œäº†ã™ã‚‹å‰ã®ã‚¯ã‚¨ãƒªã¯ã€å‰Šé™¤å¯¾è±¡ã®è¡Œã‚’å«ã‚ã¾ã™ã€‚詳細ã¯[ALTER DELETE](/docs/ja/sql-reference/statements/alter/delete.md)ドキュメントをå‚ç…§ã—ã¦ãã ã•ã„。 + +`ALTER DELETE`ã¯æŸ”軟ã«å¤ã„データを削除ã™ã‚‹ãŸã‚ã«ç™ºè¡Œã§ãã¾ã™ã€‚定期的ã«è¡Œã†å¿…è¦ãŒã‚ã‚‹å ´åˆã®ä¸»ãªæ¬ ç‚¹ã¯ã€ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã™ã‚‹å¤–部システムãŒå¿…è¦ã«ãªã‚‹ã“ã¨ã§ã™ã€‚ã¾ãŸã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯å‰Šé™¤ã™ã‚‹è¡ŒãŒ1ã¤ã—ã‹ãªã„å ´åˆã§ã‚‚完全ãªãƒ‘ーツをリライトã™ã‚‹ãŸã‚ã€ä¸€éƒ¨ã®ãƒ‘フォーマンス上ã®è€ƒæ…®äº‹é …ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“ã‚Œã¯ã€ClickHouseを基ã«ã—ãŸã‚·ã‚¹ãƒ†ãƒ ã‚’[GDPR](https://gdpr-info.eu)準拠ã«ã™ã‚‹ãŸã‚ã®æœ€ã‚‚一般的ãªã‚¢ãƒ—ローãƒã§ã™ã€‚ + +[ミューテーション](../../sql-reference/statements/alter/index.md#alter-mutations)ã«é–¢ã™ã‚‹è©³ç´°æƒ…報。 + +## パーティションã®å‰Šé™¤ {#drop-partition} + +`ALTER TABLE ... DROP PARTITION`ã¯ã€ãƒ‘ーティション全体を削除ã™ã‚‹ãŸã‚ã®ã‚³ã‚¹ãƒˆåŠ¹çŽ‡ã®è‰¯ã„方法ã§ã™ã€‚柔軟性ã«ã¯æ¬ ã‘ã€ãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã«é©åˆ‡ãªãƒ‘ーティションスキームã®è¨­å®šãŒå¿…è¦ã§ã™ãŒã€ãã‚Œã§ã‚‚一般的ãªã‚±ãƒ¼ã‚¹ã®å¤šãã‚’ã‚«ãƒãƒ¼ã—ã¾ã™ã€‚ミューテーションã¨åŒæ§˜ã«ã€å®šæœŸçš„ã«ä½¿ç”¨ã™ã‚‹ã«ã¯å¤–部システムã‹ã‚‰å®Ÿè¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +[パーティションæ“作](../../sql-reference/statements/alter/partition.md#alter_drop-partition)ã«é–¢ã™ã‚‹è©³ç´°æƒ…報。 + +## TRUNCATE {#truncate} + +テーブルã‹ã‚‰ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹ã“ã¨ã¯æ¥µç«¯ã§ã™ãŒã€å ´åˆã«ã‚ˆã£ã¦ã¯ãã‚ŒãŒå¿…è¦ãªã“ã¨ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +[テーブルトランケーション](/docs/ja/sql-reference/statements/truncate.md)ã«é–¢ã™ã‚‹è©³ç´°æƒ…報。 diff --git a/docs/ja/faq/operations/index.md b/docs/ja/faq/operations/index.md new file mode 100644 index 00000000000..70a9258a10d --- /dev/null +++ b/docs/ja/faq/operations/index.md @@ -0,0 +1,20 @@ +--- +slug: /ja/faq/operations/ +sidebar_position: 3 +sidebar_label: ClickHouseサーãƒãƒ¼ã¨ã‚¯ãƒ©ã‚¹ã‚¿ã®é‹ç”¨ã«é–¢ã™ã‚‹è³ªå• +--- + +# ClickHouseサーãƒãƒ¼ã¨ã‚¯ãƒ©ã‚¹ã‚¿ã®é‹ç”¨ã«é–¢ã™ã‚‹è³ªå• + +- [本番環境ã§ä½¿ç”¨ã™ã¹ãClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã©ã‚Œã§ã™ã‹ï¼Ÿ](/docs/ja/faq/operations/production.md) +- [ストレージã¨ã‚³ãƒ³ãƒ”ュートを分離ã—ã¦ClickHouseをデプロイã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã‹ï¼Ÿ](/docs/ja/faq/operations/separate_storage.md) +- [ClickHouseã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰å¤ã„レコードを削除ã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã‹ï¼Ÿ](/docs/ja/faq/operations/delete-old-data.md) +- [ClickHouse Keeperã‚’ã©ã®ã‚ˆã†ã«æ§‹æˆã—ã¾ã™ã‹ï¼Ÿ](/docs/ja/guides/sre/keeper/index.md) +- [ClickHouseã¯LDAPã¨çµ±åˆã§ãã¾ã™ã‹ï¼Ÿ](/docs/ja/guides/sre/user-management/configuring-ldap.md) +- [ClickHouseã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ãƒ­ãƒ¼ãƒ«ã€æ¨©é™ã‚’ã©ã®ã‚ˆã†ã«æ§‹æˆã—ã¾ã™ã‹ï¼Ÿ](/docs/ja/guides/sre/user-management/index.md) +- [ClickHouseã§è¡Œã‚’æ›´æ–°ã¾ãŸã¯å‰Šé™¤ã§ãã¾ã™ã‹ï¼Ÿ](/docs/ja/guides/developer/mutations.md) +- [ClickHouseã¯ãƒžãƒ«ãƒãƒªãƒ¼ã‚¸ãƒ§ãƒ³ãƒ¬ãƒ—リケーションをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã‹ï¼Ÿ](/docs/ja/faq/operations/multi-region-replication.md) + +:::info ãŠæŽ¢ã—ã®ã‚‚ã®ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã‹ï¼Ÿ +[ナレッジベース](/knowledgebase/)ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ã‚る多ãã®è¨˜äº‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: diff --git a/docs/ja/faq/operations/multi-region-replication.md b/docs/ja/faq/operations/multi-region-replication.md new file mode 100644 index 00000000000..b2243cea273 --- /dev/null +++ b/docs/ja/faq/operations/multi-region-replication.md @@ -0,0 +1,14 @@ +--- +slug: /ja/faq/operations/multi-region-replication +title: ClickHouseã¯ãƒžãƒ«ãƒãƒªãƒ¼ã‚¸ãƒ§ãƒ³ãƒ¬ãƒ—リケーションをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã‹ï¼Ÿ +toc_hidden: true +toc_priority: 30 +--- + +# ClickHouseã¯ãƒžãƒ«ãƒãƒªãƒ¼ã‚¸ãƒ§ãƒ³ãƒ¬ãƒ—リケーションをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã‹ï¼Ÿ {#does-clickhouse-support-multi-region-replication} + +短ã言ãˆã°ã€Œã¯ã„ã€ã§ã™ã€‚ãŸã ã—ã€ã™ã¹ã¦ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³/データセンター間ã®é…延ã¯ã§ãã‚‹ã ã‘二æ¡ç¨‹åº¦ã«ä¿ã¤ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã•ã‚‚ãªã‘ã‚Œã°ã€åˆ†æ•£åˆæ„プロトコルを経由ã™ã‚‹ãŸã‚ã€æ›¸ãè¾¼ã¿ãƒ‘フォーマンスãŒä½Žä¸‹ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€ç±³å›½ã®æ±è¥¿é–“ã®ãƒ¬ãƒ—リケーションã¯å•é¡Œãªã動作ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ç±³å›½ã¨ãƒ¨ãƒ¼ãƒ­ãƒƒãƒ‘é–“ã§ã¯ãã†ã§ã¯ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +設定ã«é–¢ã—ã¦ã¯ã€ã‚·ãƒ³ã‚°ãƒ«ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ¬ãƒ—リケーションã¨æ¯”ã¹ã¦é•ã„ã¯ã‚ã‚Šã¾ã›ã‚“。å˜ã«ç•°ãªã‚‹å ´æ‰€ã«ã‚るホストをレプリカã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +詳細ã«ã¤ã„ã¦ã¯ã€[データレプリケーションã«é–¢ã™ã‚‹å®Œå…¨ãªè¨˜äº‹](../../engines/table-engines/mergetree-family/replication.md)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/faq/operations/production.md b/docs/ja/faq/operations/production.md new file mode 100644 index 00000000000..29f3f39e416 --- /dev/null +++ b/docs/ja/faq/operations/production.md @@ -0,0 +1,67 @@ +--- +slug: /ja/faq/operations/production +title: 本番環境ã§ä½¿ç”¨ã™ã‚‹ã¹ã ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ï¼Ÿ +toc_hidden: true +toc_priority: 10 +--- + +# 本番環境ã§ä½¿ç”¨ã™ã‚‹ã¹ã ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ï¼Ÿ {#which-clickhouse-version-to-use-in-production} + +ã¾ãšæœ€åˆã«ã€ãªãœã“ã®è³ªå•ãŒã‚ˆãã‚ã‚‹ã®ã‹ã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚主ãªç†ç”±ã¯2ã¤ã‚ã‚Šã¾ã™ã€‚ + +1. ClickHouseã¯éžå¸¸ã«é«˜ã„速度ã§é–‹ç™ºã•ã‚Œã¦ãŠã‚Šã€é€šå¸¸1å¹´ã«10以上ã®å®‰å®šç‰ˆãƒªãƒªãƒ¼ã‚¹ãŒã‚ã‚Šã¾ã™ã€‚ãã®ãŸã‚ã€é¸æŠžè‚¢ãŒå¤šãã€å˜ç´”ã§ã¯ãªã„é¸æŠžè‚¢ã¨ãªã‚Šã¾ã™ã€‚ +2. 一部ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€è‡ªåˆ†ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«æœ€é©ãªãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’見ã¤ã‘ã‚‹ãŸã‚ã®æ™‚間を節約ã—ã€ä»–ã®äººã®ã‚¢ãƒ‰ãƒã‚¤ã‚¹ã«å¾“ã„ãŸã„ã¨è€ƒãˆã¦ã„ã¾ã™ã€‚ + +2番目ã®ç†ç”±ã¯ã‚ˆã‚Šæ ¹æœ¬çš„ãªã‚‚ã®ãªã®ã§ã€ã¾ãšãã‚Œã«ã¤ã„ã¦è©±ã—ã€ãã®å¾Œã§ã•ã¾ã–ã¾ãªClickHouseリリースをã©ã†ãƒŠãƒ“ゲートã™ã‚‹ã‹ã‚’解説ã—ã¾ã™ã€‚ + +## 推奨ã™ã‚‹ ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ï¼Ÿ {#which-clickhouse-version-do-you-recommend} + +コンサルタントを雇ã£ãŸã‚Šã€çŸ¥ã‚‰ã‚ŒãŸå°‚門家を信頼ã—ã¦æœ¬ç•ªç’°å¢ƒã®è²¬ä»»ã‚’ãªãã™ã“ã¨ã¯ã€é­…力的ãªæ–¹æ³•ã§ã™ã€‚誰ã‹ãŒæŽ¨å¥¨ã—ãŸç‰¹å®šã®ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’インストールã—ã€ãã‚Œã«å•é¡ŒãŒã‚ã‚Œã°ã€ãã‚Œã¯ã‚ãªãŸã®è²¬ä»»ã§ã¯ãªãã€ä»–ã®äººã®è²¬ä»»ã§ã™ã€‚ã“ã®è€ƒãˆæ–¹ã¯å¤§ããªç½ ã§ã™ã€‚外部ã®äººç‰©ãŒã‚ãªãŸã®ä¼šç¤¾ã®æœ¬ç•ªç’°å¢ƒã§ä½•ãŒèµ·ã“ã£ã¦ã„ã‚‹ã‹ã‚’ã‚ãªãŸã‚ˆã‚Šã‚‚知ã£ã¦ã„ã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。 + +ã§ã¯ã€ã©ã†ã‚„ã£ã¦é©åˆ‡ã«ã‚¯ãƒªãƒƒã‚¯ãƒã‚¦ã‚¹ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’é¸ã‚“ã§ã‚¢ãƒƒãƒ—グレードã™ã‚Œã°è‰¯ã„ã®ã§ã—ょã†ã‹ï¼Ÿã¾ãŸã¯åˆã‚ã¦ã®ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ã©ã†ã‚„ã£ã¦é¸ã¶ã¹ããªã®ã§ã—ょã†ã‹ï¼Ÿã¾ãšç¬¬ä¸€ã«ã€**ç¾å®Ÿçš„ãªãƒ—レプロダクション環境**を設定ã™ã‚‹ãŸã‚ã«æŠ•è³‡ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ç†æƒ³çš„ãªä¸–ç•Œã§ã¯ã€ãã‚Œã¯å®Œå…¨ã«åŒä¸€ã®ã‚·ãƒ£ãƒ‰ã‚¦ã‚³ãƒ”ーã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ãã‚Œã¯é€šå¸¸é«˜ä¾¡ã§ã™ã€‚ + +以下ã¯ã€ãã‚Œã»ã©é«˜ããªã„コストã§ãƒ—レプロダクション環境ã«åˆç†çš„ãªå¿ å®Ÿåº¦ã‚’æŒãŸã›ã‚‹ãŸã‚ã®é‡è¦ãªãƒã‚¤ãƒ³ãƒˆã§ã™ï¼š + +- プレプロダクション環境ã¯ã€æœ¬ç•ªã§å®Ÿè¡Œã™ã‚‹äºˆå®šã®ã‚¯ã‚¨ãƒªã‚»ãƒƒãƒˆã«ã§ãã‚‹ã ã‘è¿‘ã„ã‚‚ã®ã‚’実行ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + - 固定データã§èª­ã¿å–り専用ã«ã—ãªã„ã§ãã ã•ã„。 + - å˜ã«ãƒ‡ãƒ¼ã‚¿ã‚’コピーã—ã¦å…¸åž‹çš„ãªãƒ¬ãƒãƒ¼ãƒˆã‚’作æˆã›ãšã«æ›¸ãè¾¼ã¿å°‚用ã«ã—ãªã„ã§ãã ã•ã„。 + - スキーママイグレーションをé©ç”¨ã™ã‚‹ä»£ã‚ã‚Šã«ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ãªã„ã§ãã ã•ã„。 +- 実際ã®æœ¬ç•ªãƒ‡ãƒ¼ã‚¿ã¨ã‚¯ã‚¨ãƒªã®ã‚µãƒ³ãƒ—ルを使用ã—ã¦ãã ã•ã„。代表的ã§ã‚ã‚Šã€`SELECT`クエリãŒåˆç†çš„ãªçµæžœã‚’è¿”ã™ã‚ˆã†ãªã‚µãƒ³ãƒ—ルをé¸ã‚“ã§ãã ã•ã„。ã‚ãªãŸã®ãƒ‡ãƒ¼ã‚¿ãŒæ©Ÿå¯†ã§ã‚ã‚Šã€å†…部ãƒãƒªã‚·ãƒ¼ãŒæœ¬ç•ªç’°å¢ƒã‹ã‚‰é›¢ã‚Œã‚‹ã“ã¨ã‚’ç¦ã˜ã¦ã„ã‚‹å ´åˆã¯ã€é›£èª­åŒ–を使用ã—ã¦ãã ã•ã„。 +- プレプロダクションãŒã€æœ¬ç•ªç’°å¢ƒã¨åŒæ§˜ã«ç›£è¦–ãŠã‚ˆã³ã‚¢ãƒ©ãƒ¼ãƒˆã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã§ã‚«ãƒãƒ¼ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +- 本番ãŒè¤‡æ•°ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼ã‚„地域ã«ã¾ãŸãŒã£ã¦ã„ã‚‹å ´åˆã¯ã€ãƒ—レプロダクションã§ã‚‚åŒæ§˜ã«ã—ã¦ãã ã•ã„。 +- 本番ãŒãƒ¬ãƒ—リケーションや分散テーブルã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®é€£éŽ–ãªã©ã®è¤‡é›‘ãªæ©Ÿèƒ½ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€ãƒ—レプロダクションã§ã‚‚åŒæ§˜ã«è¨­å®šã—ã¦ãã ã•ã„。 +- プレプロダクションã§æœ¬ç•ªã¨ã»ã¼åŒã˜æ•°ã®ã‚µãƒ¼ãƒãƒ¼ã‚„VMを使用ã™ã‚‹ã‹ã€ã‚ˆã‚Šå°ã•ã„ãŒåŒã˜ã‚µã‚¤ã‚ºã®ã‚‚ã®ã‚’使用ã™ã‚‹ã‹ã«ã¤ã„ã¦ã®ãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ãŒã‚ã‚Šã¾ã™ã€‚å‰è€…ã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯é–¢é€£ã®å•é¡Œã‚’ã•ã‚‰ã«æ¤œå‡ºã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€å¾Œè€…ã®æ–¹ãŒç®¡ç†ãŒå®¹æ˜“ã§ã™ã€‚ + +次ã«æŠ•è³‡ã™ã‚‹ã¹ã分野ã¯ã€**自動テストインフラストラクãƒãƒ£**ã§ã™ã€‚ã‚る種類ã®ã‚¯ã‚¨ãƒªãŒ1回実行ã«æˆåŠŸã—ãŸã‹ã‚‰ã¨ã„ã£ã¦ã€ãã‚ŒãŒæ°¸é ã«æˆåŠŸã—続ã‘ã‚‹ã¨ã¯æ€ã‚ãªã„ã§ãã ã•ã„。ClickHouseãŒãƒ¢ãƒƒã‚¯ã•ã‚ŒãŸãƒ¦ãƒ‹ãƒƒãƒˆãƒ†ã‚¹ãƒˆã‚’ã„ãã¤ã‹æŒã¤ã“ã¨ã¯å•é¡Œã‚ã‚Šã¾ã›ã‚“ãŒã€è£½å“ãŒå®Ÿéš›ã®ClickHouseã«å¯¾ã—ã¦å®Ÿè¡Œã•ã‚Œã€ã™ã¹ã¦ã®é‡è¦ãªãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ãŒæœŸå¾…通りã«å‹•ä½œã—ã¦ã„ã‚‹ã‹ã‚’確èªã™ã‚‹åˆç†çš„ãªè‡ªå‹•ãƒ†ã‚¹ãƒˆã‚»ãƒƒãƒˆã‚’æŒã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +ã•ã‚‰ã«ä¸€æ­©é€²ã‚ã¦ã€ãã®è‡ªå‹•ãƒ†ã‚¹ãƒˆã‚’[ClickHouseã®ã‚ªãƒ¼ãƒ—ンソーステストインフラストラクãƒãƒ£](https://github.com/ClickHouse/ClickHouse/tree/master/tests)ã«è²¢çŒ®ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“れらã¯æ—¥å¸¸çš„ãªé–‹ç™ºã§ç¶™ç¶šçš„ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚[実行方法](../../development/tests.md)ã‚’å­¦ã³ã€ãã®ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã«ãƒ†ã‚¹ãƒˆã‚’é©ç”¨ã™ã‚‹ã®ã«è¿½åŠ ã®æ™‚é–“ã¨åŠ´åŠ›ãŒå¿…è¦ã«ãªã‚Šã¾ã™ãŒã€ãƒªãƒªãƒ¼ã‚¹ãŒå®‰å®šç‰ˆã¨ã—ã¦ç™ºè¡¨ã•ã‚Œã‚‹å‰ã‹ã‚‰æ—¢ã«ãれらã«å¯¾ã—ã¦ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã€å•é¡Œå ±å‘Šã¨ãã®å¾Œã®ãƒã‚°ãƒ•ã‚£ãƒƒã‚¯ã‚¹ã®å ±å‘Šã«æ™‚間を無駄ã«ã™ã‚‹ã“ã¨ã‚’é¿ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã„ãã¤ã‹ã®ä¼æ¥­ã§ã¯ã€ï¼ˆGoogleã§ã¯[Beyonce’s Rule](https://www.oreilly.com/library/view/software-engineering-at/9781492082781/ch01.html#policies_that_scale_well)ã¨å‘¼ã°ã‚Œã‚‹ï¼‰ãã†ã„ã£ãŸãƒ†ã‚¹ãƒˆè²¢çŒ®ã‚’内部ãƒãƒªã‚·ãƒ¼ã¨ã—ã¦ã„ã‚‹ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +プレプロダクション環境ã¨ãƒ†ã‚¹ãƒˆã‚¤ãƒ³ãƒ•ãƒ©ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ã‚’æ•´ãˆãŸã‚‰ã€æœ€é©ãªãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®é¸æŠžã¯ç°¡å˜ã§ã™ï¼š + +1. æ–°ã—ã„ClickHouseリリースã«å¯¾ã—ã¦è‡ªå‹•ãƒ†ã‚¹ãƒˆã‚’定期的ã«å®Ÿè¡Œã—ã¾ã™ã€‚ãれを`testing`ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚ŒãŸClickHouseリリースã«å¯¾ã—ã¦è¡Œã†ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€ãã‚Œã§ä»Šå¾Œã®ã‚¹ãƒ†ãƒƒãƒ—ã«é€²ã‚€ã“ã¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 +2. テストã«åˆæ ¼ã—ãŸClickHouseリリースをプレプロダクションã«ãƒ‡ãƒ—ロイã—ã€ã™ã¹ã¦ã®ãƒ—ロセスãŒæœŸå¾…通りã«å‹•ä½œã—ã¦ã„ã‚‹ã‹ã‚’確èªã—ã¾ã™ã€‚ +3. 発見ã—ãŸå•é¡Œã‚’[ClickHouse GitHub Issues](https://github.com/ClickHouse/ClickHouse/issues)ã«å ±å‘Šã—ã¦ãã ã•ã„。 +4. é‡å¤§ãªå•é¡ŒãŒãªã‘ã‚Œã°ã€ãã®ClickHouseリリースを本番環境ã«ãƒ‡ãƒ—ロイã—始ã‚ã‚‹ã®ãŒå®‰å…¨ã§ã™ã€‚[カナリアリリース](https://martinfowler.com/bliki/CanaryRelease.html)ã‚„[ブルーグリーンデプロイメント](https://martinfowler.com/bliki/BlueGreenDeployment.html)ã®ã‚ˆã†ãªã‚¢ãƒ—ローãƒã‚’実装ã™ã‚‹ãŸã‚ã®æ¼¸é€²çš„ãªãƒªãƒªãƒ¼ã‚¹è‡ªå‹•åŒ–ã«æŠ•è³‡ã™ã‚‹ã¨ã€æœ¬ç•ªç’°å¢ƒã§ã®å•é¡Œã®ãƒªã‚¹ã‚¯ã‚’ã•ã‚‰ã«è»½æ¸›ã§ãã¾ã™ã€‚ + +ãŠæ°—ã¥ãã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ä¸Šè¨˜ã®ã‚¢ãƒ—ローãƒã«ã¯ClickHouseã«ç‰¹æœ‰ã®ã‚‚ã®ã¯ã‚ã‚Šã¾ã›ã‚“。人々ã¯æœ¬ç•ªç’°å¢ƒã‚’真剣ã«è€ƒãˆã‚‹å ´åˆã€ä¾å­˜ã™ã‚‹ã‚¤ãƒ³ãƒ•ãƒ©ã®ä»»æ„ã®éƒ¨åˆ†ã«å¯¾ã—ã¦ã“れを行ã„ã¾ã™ã€‚ + +## クリックãƒã‚¦ã‚¹ã®ãƒªãƒªãƒ¼ã‚¹ã‚’é¸æŠžã™ã‚‹æ–¹æ³•ã¯ï¼Ÿ {#how-to-choose-between-clickhouse-releases} + +ClickHouseã®ãƒ‘ッケージリãƒã‚¸ãƒˆãƒªã®å†…容を見ã¦ã¿ã‚‹ã¨ã€2種類ã®ãƒ‘ッケージãŒã‚ã‚Šã¾ã™ï¼š + +1. `stable` +2. `lts` (長期サãƒãƒ¼ãƒˆ) + +ã©ã¡ã‚‰ã‚’é¸ã¶ã‹ã®ã‚¬ã‚¤ãƒ‰ãƒ©ã‚¤ãƒ³ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +- `stable`ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æŽ¨å¥¨ã™ã‚‹ãƒ‘ッケージã§ã™ã€‚ãŠãŠã‚ˆã毎月リリースã•ã‚Œã€æ–°æ©Ÿèƒ½ã‚’åˆç†çš„ãªé…延ã§æä¾›ã—ã€æœ€æ–°ã®å®‰å®šç‰ˆãƒªãƒªãƒ¼ã‚¹ã®ã†ã¡3ã¤ãŒè¨ºæ–­ã¨ãƒã‚°ãƒ•ã‚£ãƒƒã‚¯ã‚¹ã®ãƒãƒƒã‚¯ãƒãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã®ã‚µãƒãƒ¼ãƒˆã‚’å—ã‘ã¾ã™ã€‚ +- `lts`ã¯åŠå¹´ã«ä¸€åº¦ãƒªãƒªãƒ¼ã‚¹ã•ã‚Œã€åˆæœŸãƒªãƒªãƒ¼ã‚¹ã‹ã‚‰1年間サãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚以下ã®ã‚ˆã†ãªå ´åˆã«ã¯ã€`stable`よりも`lts`を優先ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“: + - 会社ã®å†…部ãƒãƒªã‚·ãƒ¼ãŒé »ç¹ãªã‚¢ãƒƒãƒ—グレードやéžLTSソフトウェアã®ä½¿ç”¨ã‚’èªã‚ã¦ã„ãªã„。 + - ClickHouseを使用ã™ã‚‹è£½å“ãŒç‰¹ã«è¤‡é›‘ãªæ©Ÿèƒ½ã‚’å¿…è¦ã¨ã—ã¦ã„ãªã‹ã£ãŸã‚Šã€æ›´æ–°ã‚’続ã‘ã‚‹ãŸã‚ã®ãƒªã‚½ãƒ¼ã‚¹ãŒä¸è¶³ã—ã¦ã„る。 + +多ãã®ãƒãƒ¼ãƒ ã¯æœ€åˆã¯`lts`ãŒé©ã—ã¦ã„ã‚‹ã¨è€ƒãˆã¦ã„ã¦ã‚‚ã€è£½å“ã«ã¨ã£ã¦é‡è¦ãªæœ€è¿‘ã®æ©Ÿèƒ½ã®ãŸã‚ã«`stable`ã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ãŒã‚ˆãã‚ã‚Šã¾ã™ã€‚ + +:::tip +ClickHouseをアップグレードã™ã‚‹éš›ã«è¦šãˆã¦ãŠãã¹ãã“ã¨ãŒã‚ã‚Šã¾ã™ï¼šãƒªãƒªãƒ¼ã‚¹é–“ã®äº’æ›æ€§ã¯å¸¸ã«æ³¨æ„ã—ã¦ã„ã¾ã™ãŒã€æ™‚ã«ã¯äº’æ›æ€§ã‚’ä¿ã¤ã“ã¨ãŒåˆç†çš„ã§ãªã„å ´åˆãŒã‚ã‚Šã€ã„ãã¤ã‹ã®å°ã•ãªè©³ç´°ãŒå¤‰æ›´ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚アップグレードå‰ã«[Changelog](/docs/ja/whats-new/changelog/index.md)を確èªã—ã¦ã€å¾Œæ–¹äº’æ›æ€§ã®ãªã„変更ã«ã¤ã„ã¦ã®æ³¨æ„点ãŒã‚ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¦ãã ã•ã„。 +::: + diff --git a/docs/ja/faq/operations/separate_storage.md b/docs/ja/faq/operations/separate_storage.md new file mode 100644 index 00000000000..b98590f8a1e --- /dev/null +++ b/docs/ja/faq/operations/separate_storage.md @@ -0,0 +1,11 @@ +--- +slug: /ja/faq/operations/deploy-separate-storage-and-compute +title: ClickHouseをストレージã¨ã‚³ãƒ³ãƒ”ュートを分離ã—ã¦ãƒ‡ãƒ—ロイã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã‹ï¼Ÿ +sidebar_label: ClickHouseをストレージã¨ã‚³ãƒ³ãƒ”ュートを分離ã—ã¦ãƒ‡ãƒ—ロイã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã‹ï¼Ÿ +toc_hidden: true +toc_priority: 20 +--- + +ç°¡æ½”ã«è¨€ã†ã¨ã€ã€Œã¯ã„ã€ã§ã™ã€‚ + +オブジェクトストレージ (S3, GCS) ã¯ã€ClickHouseテーブルã®ãƒ‡ãƒ¼ã‚¿ã®å¼¾æ€§ä¸»è¨˜æ†¶ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚[S3サãƒãƒ¼ãƒˆã®MergeTree](/docs/ja/integrations/data-ingestion/s3/index.md) 㨠[GCSサãƒãƒ¼ãƒˆã®MergeTree](/docs/ja/integrations/data-ingestion/gcs/index.md) ã®ã‚¬ã‚¤ãƒ‰ãŒå…¬é–‹ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®æ§‹æˆã§ã¯ã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ã¿ãŒã‚³ãƒ³ãƒ”ュートノードã«ãƒ­ãƒ¼ã‚«ãƒ«ã§ä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“ã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã§ã¯ã€è¿½åŠ ã®ãƒŽãƒ¼ãƒ‰ãŒãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’レプリケーションã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€ã‚³ãƒ³ãƒ”ュートリソースを簡å˜ã«ã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—ãŠã‚ˆã³ã‚¹ã‚±ãƒ¼ãƒ«ãƒ€ã‚¦ãƒ³ã§ãã¾ã™ã€‚ diff --git a/docs/ja/faq/troubleshooting.md b/docs/ja/faq/troubleshooting.md new file mode 100644 index 00000000000..d4397ae3c83 --- /dev/null +++ b/docs/ja/faq/troubleshooting.md @@ -0,0 +1,24 @@ +--- +title: "トラブルシューティング" +slug: /ja/faq/troubleshooting +--- + +## ClickHouse Cloud トラブルシューティング + +### ClickHouse Cloud サービスã«ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã„ + +以下ã®ã‚ˆã†ãªã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚Œã‚‹å ´åˆã€IPアクセスリストãŒã‚¢ã‚¯ã‚»ã‚¹ã‚’æ‹’å¦ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +```response +curl: (35) error:02FFF036:system library:func(4095):Connection reset by peer +``` +ã¾ãŸã¯ +```response +curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to HOSTNAME.clickhouse.cloud:8443 +``` +ã¾ãŸã¯ +```response +Code: 210. DB::NetException: SSL connection unexpectedly closed (e46453teek.us-east-2.aws.clickhouse-staging.com:9440). (NETWORK_ERROR) +``` + +[IPアクセスリスト](/docs/ja/cloud/security/setting-ip-filters)を確èªã—ã€è¨±å¯ã•ã‚ŒãŸãƒªã‚¹ãƒˆã®å¤–部ã‹ã‚‰æŽ¥ç¶šã‚’試ã¿ã¦ã„ã‚‹å ´åˆã€æŽ¥ç¶šã¯å¤±æ•—ã—ã¾ã™ã€‚ diff --git a/docs/ja/faq/use-cases/_category_.yml b/docs/ja/faq/use-cases/_category_.yml new file mode 100644 index 00000000000..4c0bfa72940 --- /dev/null +++ b/docs/ja/faq/use-cases/_category_.yml @@ -0,0 +1,4 @@ +position: 40 +label: 'Use Cases' +collapsible: true +collapsed: true diff --git a/docs/ja/faq/use-cases/index.md b/docs/ja/faq/use-cases/index.md new file mode 100644 index 00000000000..1285ce5830a --- /dev/null +++ b/docs/ja/faq/use-cases/index.md @@ -0,0 +1,16 @@ +--- +slug: /ja/faq/use-cases/ +sidebar_position: 2 +sidebar_label: ClickHouseã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«é–¢ã™ã‚‹è³ªå• +--- + +# ClickHouseã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«é–¢ã™ã‚‹è³ªå• + +- [ClickHouseを時系列データベースã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã‹ï¼Ÿ](/knowledgebase/time-series) +- [ClickHouseをキー・ãƒãƒªãƒ¥ãƒ¼åž‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã‹ï¼Ÿ](/knowledgebase/key-value) + +:::info ãŠæŽ¢ã—ã®å†…容ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã‹ï¼Ÿ +[Knowledge Base](/knowledgebase/)ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€ã“ã“ã§ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆå†…ã«ã‚る多ãã®æœ‰ç›Šãªè¨˜äº‹ã‚‚ã”覧ãã ã•ã„。 +::: + + diff --git a/docs/ja/faq/use-cases/key-value.md b/docs/ja/faq/use-cases/key-value.md new file mode 100644 index 00000000000..a65aba07ad2 --- /dev/null +++ b/docs/ja/faq/use-cases/key-value.md @@ -0,0 +1,18 @@ +--- +slug: /ja/faq/use-cases/key-value +title: ClickHouseをキー・ãƒãƒªãƒ¥ãƒ¼ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã‹ï¼Ÿ +toc_hidden: true +toc_priority: 101 +--- + +# ClickHouseをキー・ãƒãƒªãƒ¥ãƒ¼ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã‹ï¼Ÿ {#can-i-use-clickhouse-as-a-key-value-storage} + +短ã„ç­”ãˆã¯**「ã„ã„ãˆã€**ã§ã™ã€‚キー・ãƒãƒªãƒ¥ãƒ¼ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¯ã€ClickHouseを使用**ã—ãªã„**ã»ã†ãŒè‰¯ã„ケースã®ä¸Šä½ã«ä½ç½®ã—ã¦ã„ã¾ã™ã€‚çµå±€ã®ã¨ã“ã‚ã€ClickHouseã¯[OLAP](../../faq/general/olap.md)システムã§ã‚ã‚Šã€å„ªã‚ŒãŸã‚­ãƒ¼ãƒ»ãƒãƒªãƒ¥ãƒ¼ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚·ã‚¹ãƒ†ãƒ ãŒä»–ã«ã‚‚多ã存在ã—ã¦ã„ã¾ã™ã€‚ + +ã—ã‹ã—ã€ã‚­ãƒ¼ãƒ»ãƒãƒªãƒ¥ãƒ¼ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã«ClickHouseを使用ã—ã¦ã‚‚æ„味ãŒã‚る状æ³ã‚‚ã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。通常ã€ä½Žäºˆç®—ã®ãƒ—ロダクトã§ã€ä¸»ãªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¯åˆ†æžçš„ã§ã‚ã‚ŠClickHouseã«é©ã—ã¦ã„ã‚‹ãŒã€ã‚­ãƒ¼ãƒ»ãƒãƒªãƒ¥ãƒ¼ãƒ‘ターンを必è¦ã¨ã™ã‚‹é«˜ã„リクエストスループットãŒæ±‚ã‚られãšã€åŽ³ã—ã„é…延è¦ä»¶ã‚‚ãªã„二次プロセスãŒå­˜åœ¨ã™ã‚‹å ´åˆã§ã™ã€‚予算ãŒç„¡åˆ¶é™ã§ã‚ã‚Œã°ã€ã“ã®äºŒæ¬¡ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ç”¨ã«åˆ¥ã®ã‚­ãƒ¼ãƒ»ãƒãƒªãƒ¥ãƒ¼ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’インストールã™ã‚‹ã§ã—ょã†ãŒã€ç¾å®Ÿã«ã¯ã€ã‚‚ã†ä¸€ã¤ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚·ã‚¹ãƒ†ãƒ ã‚’維æŒã™ã‚‹è¿½åŠ ã®ã‚³ã‚¹ãƒˆï¼ˆç›£è¦–ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãªã©ï¼‰ãŒã‚ã‚‹ãŸã‚ã€ã“れをé¿ã‘ã‚‹ã“ã¨ãŒæœ›ã¾ã—ã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +推奨ã«é€†ã‚‰ã£ã¦ClickHouseã§ã‚­ãƒ¼ãƒ»ãƒãƒªãƒ¥ãƒ¼ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã‚’決ã‚ãŸå ´åˆã€ä»¥ä¸‹ã®ã‚ˆã†ãªãƒ’ントãŒã‚ã‚Šã¾ã™ï¼š + +- ClickHouseã§ãƒã‚¤ãƒ³ãƒˆã‚¯ã‚¨ãƒªãŒé«˜ã‚³ã‚¹ãƒˆã¨ãªã‚‹ä¸»ãªç†ç”±ã¯ã€ãƒ¡ã‚¤ãƒ³ã®[MergeTreeテーブルエンジンファミリー](../..//engines/table-engines/mergetree-family/mergetree.md)ã®ã‚¹ãƒ‘ースãªä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã§ã™ã€‚ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ç‰¹å®šã®è¡Œã«ç›´æŽ¥ãƒã‚¤ãƒ³ãƒˆã§ããšã€N番目ã”ã¨ã«ãƒã‚¤ãƒ³ãƒˆã™ã‚‹ãŸã‚ã€éš£æŽ¥ã™ã‚‹N番目ã®è¡Œã‹ã‚‰ç›®çš„ã®è¡Œã¾ã§ã‚¹ã‚­ãƒ£ãƒ³ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ãã®éŽç¨‹ã§ä½™åˆ†ãªãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚キー・ãƒãƒªãƒ¥ãƒ¼ã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€`index_granularity`設定ã§Nã®å€¤ã‚’減らã™ã“ã¨ãŒæœ‰åŠ¹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +- ClickHouseã¯å„カラムを別々ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚»ãƒƒãƒˆã«ä¿æŒã—ã¦ã„ã‚‹ãŸã‚ã€1ã¤ã®å®Œå…¨ãªè¡Œã‚’組ã¿ç«‹ã¦ã‚‹ãŸã‚ã«ã¯å„ファイルを通éŽã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚カラム数ãŒå¤šã„ã»ã©ãƒ•ã‚¡ã‚¤ãƒ«æ•°ã¯ç·šå½¢ã«å¢—加ã™ã‚‹ãŸã‚ã€ã‚­ãƒ¼ãƒ»ãƒãƒªãƒ¥ãƒ¼ã‚·ãƒŠãƒªã‚ªã§ã¯å¤šãã®ã‚«ãƒ©ãƒ ã®ä½¿ç”¨ã‚’é¿ã‘ã€ã™ã¹ã¦ã®ãƒšã‚¤ãƒ­ãƒ¼ãƒ‰ã‚’å˜ä¸€ã®`String`カラムã«JSONã€Protobufã€ã¾ãŸã¯é©åˆ‡ãªã‚·ãƒªã‚¢ãƒ«åŒ–å½¢å¼ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã—ã¦æ ¼ç´ã™ã‚‹ã“ã¨ãŒä¾¡å€¤ã‚’æŒã¤ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +- 通常ã®`MergeTree`テーブルã®ä»£ã‚ã‚Šã«[Join](../../engines/table-engines/special/join.md)テーブルエンジンã¨[joinGet](../../sql-reference/functions/other-functions.md#joinget)関数を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ä»£æ›¿ã‚¢ãƒ—ローãƒãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã£ã¦ã‚¯ã‚¨ãƒªæ€§èƒ½ãŒå‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ä½¿ã„å‹æ‰‹ã‚„信頼性ã®å•é¡ŒãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚[ã“ã®ä½¿ç”¨ä¾‹](https://github.com/ClickHouse/ClickHouse/blob/master/tests/queries/0_stateless/00800_versatile_storage_join.sql#L49-L51)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/faq/use-cases/time-series.md b/docs/ja/faq/use-cases/time-series.md new file mode 100644 index 00000000000..7c64c8ed33d --- /dev/null +++ b/docs/ja/faq/use-cases/time-series.md @@ -0,0 +1,22 @@ +--- +slug: /ja/faq/use-cases/time-series +title: ClickHouseを時系列データベースã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã‹ï¼Ÿ +toc_hidden: true +toc_priority: 101 +--- + +# ClickHouseを時系列データベースã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã‹ï¼Ÿ {#can-i-use-clickhouse-as-a-time-series-database} + +_注: ClickHouseを使用ã—ãŸæ™‚系列データ分æžã®è¿½åŠ ä¾‹ã«ã¤ã„ã¦ã¯ã€ãƒ–ログ [Working with Time series data in ClickHouse](https://clickhouse.com/blog/working-with-time-series-data-and-functions-ClickHouse) ã‚’ã”覧ãã ã•ã„。_ + +ClickHouseã¯ã€[OLAP](../../faq/general/olap.md) ワークロードå‘ã‘ã®æ±Žç”¨ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã§ã‚ã‚Šã€å¤šãã®ç‰¹åŒ–ã•ã‚ŒãŸæ™‚系列データベース管ç†ã‚·ã‚¹ãƒ†ãƒ ãŒå­˜åœ¨ã—ã¾ã™ã€‚ãã‚Œã«ã‚‚ã‹ã‹ã‚らãšã€ClickHouseã®[クエリ実行速度ã¸ã®æ³¨åŠ›](../../concepts/why-clickhouse-is-so-fast.md)ã¯ã€å¤šãã®å ´åˆã€ç‰¹åŒ–ã•ã‚ŒãŸã‚·ã‚¹ãƒ†ãƒ ã‚’上回るã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒžã«é–¢ã™ã‚‹ç‹¬ç«‹ã—ãŸãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ã¯ãŸãã•ã‚“ã‚ã‚‹ã®ã§ã€ã“ã“ã§è¡Œã†ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。ãã®ä»£ã‚ã‚Šã€ã‚ãªãŸã®ç”¨é€”ã¨ã—ã¦ãれを使用ã™ã‚‹å ´åˆã«é‡è¦ãªClickHouseã®æ©Ÿèƒ½ã«ç„¦ç‚¹ã‚’当ã¦ã¾ã™ã€‚ + +ã¾ãšã€å…¸åž‹çš„ãªæ™‚系列ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹**[特化ã•ã‚ŒãŸã‚³ãƒ¼ãƒ‡ãƒƒã‚¯](../../sql-reference/statements/create/table.md#specialized-codecs)**ãŒã‚ã‚Šã¾ã™ã€‚`DoubleDelta`ã‚„`Gorilla`ãªã©ã®ä¸€èˆ¬çš„ãªã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚„ClickHouse特有ã®`T64`ãŒã‚ã‚Šã¾ã™ã€‚ + +次ã«ã€æ™‚系列クエリã¯ã—ã°ã—ã°æœ€æ–°ã®ãƒ‡ãƒ¼ã‚¿ã€ä¾‹ãˆã°1日や1週間å‰ã®ãƒ‡ãƒ¼ã‚¿ã«ã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚高速ãªnVME/SSDドライブã¨å¤§å®¹é‡ã®HDDドライブを備ãˆãŸã‚µãƒ¼ãƒãƒ¼ã‚’利用ã™ã‚‹ã“ã¨ãŒç†ã«ã‹ãªã£ã¦ã„ã¾ã™ã€‚ClickHouseã®[æœ‰åŠ¹æœŸé™ (TTL)](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/##table_engine-mergetree-multiple-volumes) 機能を使用ã™ã‚‹ã¨ã€æ–°ã—ã„ホットデータを高速ドライブã«ä¿æŒã—ã€ãã‚ŒãŒå¤ããªã‚‹ã«ã¤ã‚Œã¦å¾ã€…ã«é…ã„ドライブã«ç§»å‹•ã™ã‚‹ã‚ˆã†ã«è¨­å®šã§ãã¾ã™ã€‚è¦ä»¶ãŒå¿…è¦ã¨ã™ã‚‹å ´åˆã«ã¯ã€ã•ã‚‰ã«å¤ã„データã®ãƒ­ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—や削除もå¯èƒ½ã§ã™ã€‚ + +生データã®ä¿å­˜ã¨å‡¦ç†ã‚’推奨ã™ã‚‹ClickHouseã®å“²å­¦ã«ã¯åã™ã‚‹ã‚‚ã®ã®ã€[Materialized View](../../sql-reference/statements/create/view.md) を使用ã™ã‚‹ã¨ã€ã•ã‚‰ã«åŽ³å¯†ãªãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã‚„コストè¦ä»¶ã«é©åˆã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 関連コンテンツ + +- ブログ: [Working with time series data in ClickHouse](https://clickhouse.com/blog/working-with-time-series-data-and-functions-ClickHouse) diff --git a/docs/ja/fast-release-24-2.md b/docs/ja/fast-release-24-2.md new file mode 100644 index 00000000000..300d7e6c7e5 --- /dev/null +++ b/docs/ja/fast-release-24-2.md @@ -0,0 +1,240 @@ +--- +slug: /ja/whats-new/changelog/24.2-fast-release +title: v24.2 Changelog (Fast Release) +description: Fast release changelog for v24.2 +keywords: [chaneglog, fast release] +--- + +### ClickHouse release tag: 24.2.2.15987 + +#### Backward Incompatible Change +* Validate suspicious/experimental types in nested types. Previously we didn't validate such types (except JSON) in nested types like Array/Tuple/Map. [#59385](https://github.com/ClickHouse/ClickHouse/pull/59385) ([Kruglov Pavel](https://github.com/Avogar)). +* The sort clause `ORDER BY ALL` (introduced with v23.12) is replaced by `ORDER BY *`. The previous syntax was too error-prone for tables with a column `all`. [#59450](https://github.com/ClickHouse/ClickHouse/pull/59450) ([Robert Schulze](https://github.com/rschu1ze)). +* Add sanity check for number of threads and block sizes. [#60138](https://github.com/ClickHouse/ClickHouse/pull/60138) ([Raúl Marín](https://github.com/Algunenano)). +* Reject incoming INSERT queries in case when query-level settings `async_insert` and `deduplicate_blocks_in_dependent_materialized_views` are enabled together. This behaviour is controlled by a setting `throw_if_deduplication_in_dependent_materialized_views_enabled_with_async_insert` and enabled by default. This is a continuation of https://github.com/ClickHouse/ClickHouse/pull/59699 needed to unblock https://github.com/ClickHouse/ClickHouse/pull/59915. [#60888](https://github.com/ClickHouse/ClickHouse/pull/60888) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Utility `clickhouse-copier` is moved to a separate repository on GitHub: https://github.com/ClickHouse/copier. It is no longer included in the bundle but is still available as a separate download. This closes: [#60734](https://github.com/ClickHouse/ClickHouse/issues/60734) This closes: [#60540](https://github.com/ClickHouse/ClickHouse/issues/60540) This closes: [#60250](https://github.com/ClickHouse/ClickHouse/issues/60250) This closes: [#52917](https://github.com/ClickHouse/ClickHouse/issues/52917) This closes: [#51140](https://github.com/ClickHouse/ClickHouse/issues/51140) This closes: [#47517](https://github.com/ClickHouse/ClickHouse/issues/47517) This closes: [#47189](https://github.com/ClickHouse/ClickHouse/issues/47189) This closes: [#46598](https://github.com/ClickHouse/ClickHouse/issues/46598) This closes: [#40257](https://github.com/ClickHouse/ClickHouse/issues/40257) This closes: [#36504](https://github.com/ClickHouse/ClickHouse/issues/36504) This closes: [#35485](https://github.com/ClickHouse/ClickHouse/issues/35485) This closes: [#33702](https://github.com/ClickHouse/ClickHouse/issues/33702) This closes: [#26702](https://github.com/ClickHouse/ClickHouse/issues/26702) ### Documentation entry for user-facing changes. [#61058](https://github.com/ClickHouse/ClickHouse/pull/61058) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* To increase compatibility with MySQL, function `locate` now accepts arguments `(needle, haystack[, start_pos])` by default. The previous behavior `(haystack, needle, [, start_pos])` can be restored by setting `function_locate_has_mysql_compatible_argument_order = 0`. [#61092](https://github.com/ClickHouse/ClickHouse/pull/61092) ([Robert Schulze](https://github.com/rschu1ze)). +* The obsolete in-memory data parts have been deprecated since version 23.5 and have not been supported since version 23.10. Now the remaining code is removed. Continuation of [#55186](https://github.com/ClickHouse/ClickHouse/issues/55186) and [#45409](https://github.com/ClickHouse/ClickHouse/issues/45409). It is unlikely that you have used in-memory data parts because they were available only before version 23.5 and only when you enabled them manually by specifying the corresponding SETTINGS for a MergeTree table. To check if you have in-memory data parts, run the following query: `SELECT part_type, count() FROM system.parts GROUP BY part_type ORDER BY part_type`. To disable the usage of in-memory data parts, do `ALTER TABLE ... MODIFY SETTING min_bytes_for_compact_part = DEFAULT, min_rows_for_compact_part = DEFAULT`. Before upgrading from old ClickHouse releases, first check that you don't have in-memory data parts. If there are in-memory data parts, disable them first, then wait while there are no in-memory data parts and continue the upgrade. [#61127](https://github.com/ClickHouse/ClickHouse/pull/61127) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Forbid `SimpleAggregateFunction` in `ORDER BY` of `MergeTree` tables (like `AggregateFunction` is forbidden, but they are forbidden because they are not comparable) by default (use `allow_suspicious_primary_key` to allow them). [#61399](https://github.com/ClickHouse/ClickHouse/pull/61399) ([Azat Khuzhin](https://github.com/azat)). +* ClickHouse allows arbitrary binary data in the String data type, which is typically UTF-8. Parquet/ORC/Arrow Strings only support UTF-8. That's why you can choose which Arrow's data type to use for the ClickHouse String data type - String or Binary. This is controlled by the settings, `output_format_parquet_string_as_string`, `output_format_orc_string_as_string`, `output_format_arrow_string_as_string`. While Binary would be more correct and compatible, using String by default will correspond to user expectations in most cases. Parquet/ORC/Arrow supports many compression methods, including lz4 and zstd. ClickHouse supports each and every compression method. Some inferior tools lack support for the faster `lz4` compression method, that's why we set `zstd` by default. This is controlled by the settings `output_format_parquet_compression_method`, `output_format_orc_compression_method`, and `output_format_arrow_compression_method`. We changed the default to `zstd` for Parquet and ORC, but not Arrow (it is emphasized for low-level usages). [#61817](https://github.com/ClickHouse/ClickHouse/pull/61817) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix for the materialized view security issue, which allowed a user to insert into a table without required grants for that. Fix validates that the user has permission to insert not only into a materialized view but also into all underlying tables. This means that some queries, which worked before, now can fail with Not enough privileges. To address this problem, the release introduces a new feature of SQL security for views [https://clickhouse.com/docs/ja/sql-reference/statements/create/view#sql_security](https://clickhouse.com/docs/ja/sql-reference/statements/create/view#sql_security). [#54901](https://github.com/ClickHouse/ClickHouse/pull/54901) ([pufit](https://github.com/pufit)) + +#### New Feature +* Topk/topkweighed support mode, which return count of values and it's error. [#54508](https://github.com/ClickHouse/ClickHouse/pull/54508) ([UnamedRus](https://github.com/UnamedRus)). +* Added new syntax which allows to specify definer user in View/Materialized View. This allows to execute selects/inserts from views without explicit grants for underlying tables. [#54901](https://github.com/ClickHouse/ClickHouse/pull/54901) ([pufit](https://github.com/pufit)). +* Implemented automatic conversion of merge tree tables of different kinds to replicated engine. Create empty `convert_to_replicated` file in table's data directory (`/clickhouse/store/xxx/xxxyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/`) and that table will be converted automatically on next server start. [#57798](https://github.com/ClickHouse/ClickHouse/pull/57798) ([Kirill](https://github.com/kirillgarbar)). +* Added table function `mergeTreeIndex`. It represents the contents of index and marks files of `MergeTree` tables. It can be used for introspection. Syntax: `mergeTreeIndex(database, table, [with_marks = true])` where `database.table` is an existing table with `MergeTree` engine. [#58140](https://github.com/ClickHouse/ClickHouse/pull/58140) ([Anton Popov](https://github.com/CurtizJ)). +* Try to detect file format automatically during schema inference if it's unknown in `file/s3/hdfs/url/azureBlobStorage` engines. Closes [#50576](https://github.com/ClickHouse/ClickHouse/issues/50576). [#59092](https://github.com/ClickHouse/ClickHouse/pull/59092) ([Kruglov Pavel](https://github.com/Avogar)). +* Add generate_series as a table function. This function generates table with an arithmetic progression with natural numbers. [#59390](https://github.com/ClickHouse/ClickHouse/pull/59390) ([divanik](https://github.com/divanik)). +* Added query `ALTER TABLE table FORGET PARTITION partition` that removes ZooKeeper nodes, related to an empty partition. [#59507](https://github.com/ClickHouse/ClickHouse/pull/59507) ([Sergei Trifonov](https://github.com/serxa)). +* Support reading and writing backups as tar archives. [#59535](https://github.com/ClickHouse/ClickHouse/pull/59535) ([josh-hildred](https://github.com/josh-hildred)). +* Provides new aggregate function ‘groupArrayIntersect’. Follows up: [#49862](https://github.com/ClickHouse/ClickHouse/issues/49862). [#59598](https://github.com/ClickHouse/ClickHouse/pull/59598) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Implemented system.dns_cache table, which can be useful for debugging DNS issues. [#59856](https://github.com/ClickHouse/ClickHouse/pull/59856) ([Kirill Nikiforov](https://github.com/allmazz)). +* Implemented support for S3Express buckets. [#59965](https://github.com/ClickHouse/ClickHouse/pull/59965) ([Nikita Taranov](https://github.com/nickitat)). +* The codec `LZ4HC` will accept a new level 2, which is faster than the previous minimum level 3, at the expense of less compression. In previous versions, `LZ4HC(2)` and less was the same as `LZ4HC(3)`. Author: [Cyan4973](https://github.com/Cyan4973). [#60090](https://github.com/ClickHouse/ClickHouse/pull/60090) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Implemented system.dns_cache table, which can be useful for debugging DNS issues. New server setting dns_cache_max_size. [#60257](https://github.com/ClickHouse/ClickHouse/pull/60257) ([Kirill Nikiforov](https://github.com/allmazz)). +* Added function `toMillisecond` which returns the millisecond component for values of type`DateTime` or `DateTime64`. [#60281](https://github.com/ClickHouse/ClickHouse/pull/60281) ([Shaun Struwig](https://github.com/Blargian)). +* Support single-argument version for the merge table function, as `merge(['db_name', ] 'tables_regexp')`. [#60372](https://github.com/ClickHouse/ClickHouse/pull/60372) ([豪肥肥](https://github.com/HowePa)). +* Make all format names case insensitive, like Tsv, or TSV, or tsv, or even rowbinary. [#60420](https://github.com/ClickHouse/ClickHouse/pull/60420) ([豪肥肥](https://github.com/HowePa)). +* Added new syntax which allows to specify definer user in View/Materialized View. This allows to execute selects/inserts from views without explicit grants for underlying tables. [#60439](https://github.com/ClickHouse/ClickHouse/pull/60439) ([pufit](https://github.com/pufit)). +* Add four properties to the `StorageMemory` (memory-engine) `min_bytes_to_keep, max_bytes_to_keep, min_rows_to_keep` and `max_rows_to_keep` - Add tests to reflect new changes - Update `memory.md` documentation - Add table `context` property to `MemorySink` to enable access to table parameter bounds. [#60612](https://github.com/ClickHouse/ClickHouse/pull/60612) ([Jake Bamrah](https://github.com/JakeBamrah)). +* Added function `toMillisecond` which returns the millisecond component for values of type`DateTime` or `DateTime64`. [#60649](https://github.com/ClickHouse/ClickHouse/pull/60649) ([Robert Schulze](https://github.com/rschu1ze)). +* Separate limits on number of waiting and executing queries. Added new server setting `max_waiting_queries` that limits the number of queries waiting due to `async_load_databases`. Existing limits on number of executing queries no longer count waiting queries. [#61053](https://github.com/ClickHouse/ClickHouse/pull/61053) ([Sergei Trifonov](https://github.com/serxa)). +* Add support for `ATTACH PARTITION ALL`. [#61107](https://github.com/ClickHouse/ClickHouse/pull/61107) ([Kirill Nikiforov](https://github.com/allmazz)). + +#### Performance Improvement +* Eliminates min/max/any/anyLast aggregators of GROUP BY keys in SELECT section. [#52230](https://github.com/ClickHouse/ClickHouse/pull/52230) ([JackyWoo](https://github.com/JackyWoo)). +* Improve the performance of serialized aggregation method when involving multiple [nullable] columns. This is a general version of [#51399](https://github.com/ClickHouse/ClickHouse/issues/51399) that doesn't compromise on abstraction integrity. [#55809](https://github.com/ClickHouse/ClickHouse/pull/55809) ([Amos Bird](https://github.com/amosbird)). +* Lazy build join output to improve performance of ALL join. [#58278](https://github.com/ClickHouse/ClickHouse/pull/58278) ([LiuNeng](https://github.com/liuneng1994)). +* Improvements to aggregate functions ArgMin / ArgMax / any / anyLast / anyHeavy, as well as `ORDER BY {u8/u16/u32/u64/i8/i16/u32/i64) LIMIT 1` queries. [#58640](https://github.com/ClickHouse/ClickHouse/pull/58640) ([Raúl Marín](https://github.com/Algunenano)). +* Optimize performance of sum/avg conditionally for bigint and big decimal types by reducing branch miss. [#59504](https://github.com/ClickHouse/ClickHouse/pull/59504) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Improve performance of SELECTs with active mutations. [#59531](https://github.com/ClickHouse/ClickHouse/pull/59531) ([Azat Khuzhin](https://github.com/azat)). +* Trivial optimize on column filter. Avoid those filter columns whoes underlying data type is not number being filtered with `result_size_hint = -1`. Peak memory can be reduced to 44% of the original in some cases. [#59698](https://github.com/ClickHouse/ClickHouse/pull/59698) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Primary key will use less amount of memory. [#60049](https://github.com/ClickHouse/ClickHouse/pull/60049) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Improve memory usage for primary key and some other operations. [#60050](https://github.com/ClickHouse/ClickHouse/pull/60050) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The tables' primary keys will be loaded in memory lazily on first access. This is controlled by the new MergeTree setting `primary_key_lazy_load`, which is on by default. This provides several advantages: - it will not be loaded for tables that are not used; - if there is not enough memory, an exception will be thrown on first use instead of at server startup. This provides several disadvantages: - the latency of loading the primary key will be paid on the first query rather than before accepting connections; this theoretically may introduce a thundering-herd problem. This closes [#11188](https://github.com/ClickHouse/ClickHouse/issues/11188). [#60093](https://github.com/ClickHouse/ClickHouse/pull/60093) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Vectorized function `dotProduct` which is useful for vector search. [#60202](https://github.com/ClickHouse/ClickHouse/pull/60202) ([Robert Schulze](https://github.com/rschu1ze)). +* If the table's primary key contains mostly useless columns, don't keep them in memory. This is controlled by a new setting `primary_key_ratio_of_unique_prefix_values_to_skip_suffix_columns` with the value `0.9` by default, which means: for a composite primary key, if a column changes its value for at least 0.9 of all the times, the next columns after it will be not loaded. [#60255](https://github.com/ClickHouse/ClickHouse/pull/60255) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Execute multiIf function columnarly when result_type's underlying type is number. [#60384](https://github.com/ClickHouse/ClickHouse/pull/60384) ([æŽæ‰¬](https://github.com/taiyang-li)). +* As is shown in Fig 1, the replacement of "&&" with "&" could generate the SIMD code. ![image](https://github.com/ClickHouse/ClickHouse/assets/26588299/a5a72ac4-6dc6-4d52-835a-4f512e55f0b9) Fig 1. Code compiled from '&&' (left) and '&' (right). [#60498](https://github.com/ClickHouse/ClickHouse/pull/60498) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Faster (almost 2x) mutexes (was slower due to ThreadFuzzer). [#60823](https://github.com/ClickHouse/ClickHouse/pull/60823) ([Azat Khuzhin](https://github.com/azat)). +* Move connection drain from prepare to work, and drain multiple connections in parallel. [#60845](https://github.com/ClickHouse/ClickHouse/pull/60845) ([lizhuoyu5](https://github.com/lzydmxy)). +* Optimize insertManyFrom of nullable number or nullable string. [#60846](https://github.com/ClickHouse/ClickHouse/pull/60846) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Optimized function `dotProduct` to omit unnecessary and expensive memory copies. [#60928](https://github.com/ClickHouse/ClickHouse/pull/60928) ([Robert Schulze](https://github.com/rschu1ze)). +* Operations with the filesystem cache will suffer less from the lock contention. [#61066](https://github.com/ClickHouse/ClickHouse/pull/61066) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Optimize ColumnString::replicate and prevent memcpySmallAllowReadWriteOverflow15Impl from being optimized to built-in memcpy. Close [#61074](https://github.com/ClickHouse/ClickHouse/issues/61074). ColumnString::replicate speeds up by 2.46x on x86-64. [#61075](https://github.com/ClickHouse/ClickHouse/pull/61075) ([æŽæ‰¬](https://github.com/taiyang-li)). +* 30x faster printing for 256-bit integers. [#61100](https://github.com/ClickHouse/ClickHouse/pull/61100) ([Raúl Marín](https://github.com/Algunenano)). +* If a query with a syntax error contained COLUMNS matcher with a regular expression, the regular expression was compiled each time during the parser's backtracking, instead of being compiled once. This was a fundamental error. The compiled regexp was put to AST. But the letter A in AST means "abstract" which means it should not contain heavyweight objects. Parts of AST can be created and discarded during parsing, including a large number of backtracking. This leads to slowness on the parsing side and consequently allows DoS by a readonly user. But the main problem is that it prevents progress in fuzzers. [#61543](https://github.com/ClickHouse/ClickHouse/pull/61543) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### Improvement +* While running the MODIFY COLUMN query for materialized views, check the inner table's structure to ensure every column exists. [#47427](https://github.com/ClickHouse/ClickHouse/pull/47427) ([sunny](https://github.com/sunny19930321)). +* Added table `system.keywords` which contains all the keywords from parser. Mostly needed and will be used for better fuzzing and syntax highlighting. [#51808](https://github.com/ClickHouse/ClickHouse/pull/51808) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Added support for parameterized view with analyzer to not analyze create parameterized view. Refactor existing parameterized view logic to not analyze create parameterized view. [#54211](https://github.com/ClickHouse/ClickHouse/pull/54211) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Ordinary database engine is deprecated. You will receive a warning in clickhouse-client if your server is using it. This closes [#52229](https://github.com/ClickHouse/ClickHouse/issues/52229). [#56942](https://github.com/ClickHouse/ClickHouse/pull/56942) ([shabroo](https://github.com/shabroo)). +* All zero copy locks related to a table have to be dropped when the table is dropped. The directory which contains these locks has to be removed also. [#57575](https://github.com/ClickHouse/ClickHouse/pull/57575) ([Sema Checherinda](https://github.com/CheSema)). +* Add short-circuit ability for `dictGetOrDefault` function. Closes [#52098](https://github.com/ClickHouse/ClickHouse/issues/52098). [#57767](https://github.com/ClickHouse/ClickHouse/pull/57767) ([jsc0218](https://github.com/jsc0218)). +* Allow declaring enum in external table structure. [#57857](https://github.com/ClickHouse/ClickHouse/pull/57857) ([Duc Canh Le](https://github.com/canhld94)). +* Running `ALTER COLUMN MATERIALIZE` on a column with `DEFAULT` or `MATERIALIZED` expression now writes the correct values: The default value for existing parts with default value or the non-default value for existing parts with non-default value. Previously, the default value was written for all existing parts. [#58023](https://github.com/ClickHouse/ClickHouse/pull/58023) ([Duc Canh Le](https://github.com/canhld94)). +* Enabled a backoff logic (e.g. exponential). Will provide an ability for reduced CPU usage, memory usage and log file sizes. [#58036](https://github.com/ClickHouse/ClickHouse/pull/58036) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* Consider lightweight deleted rows when selecting parts to merge. [#58223](https://github.com/ClickHouse/ClickHouse/pull/58223) ([Zhuo Qiu](https://github.com/jewelzqiu)). +* Allow to define `volume_priority` in `storage_configuration`. [#58533](https://github.com/ClickHouse/ClickHouse/pull/58533) ([Andrey Zvonov](https://github.com/zvonand)). +* Add support for Date32 type in T64 codec. [#58738](https://github.com/ClickHouse/ClickHouse/pull/58738) ([Hongbin Ma](https://github.com/binmahone)). +* This PR makes http/https connections reusable for all uses cases. Even when response is 3xx or 4xx. [#58845](https://github.com/ClickHouse/ClickHouse/pull/58845) ([Sema Checherinda](https://github.com/CheSema)). +* Added comments for columns for more system tables. Continuation of https://github.com/ClickHouse/ClickHouse/pull/58356. [#59016](https://github.com/ClickHouse/ClickHouse/pull/59016) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Now we can use virtual columns in PREWHERE. It's worthwhile for non-const virtual columns like `_part_offset`. [#59033](https://github.com/ClickHouse/ClickHouse/pull/59033) ([Amos Bird](https://github.com/amosbird)). +* Settings for the Distributed table engine can now be specified in the server configuration file (similar to MergeTree settings), e.g. ``` false ```. [#59291](https://github.com/ClickHouse/ClickHouse/pull/59291) ([Azat Khuzhin](https://github.com/azat)). +* Keeper improvement: cache only a certain amount of logs in-memory controlled by `latest_logs_cache_size_threshold` and `commit_logs_cache_size_threshold`. [#59460](https://github.com/ClickHouse/ClickHouse/pull/59460) ([Antonio Andelic](https://github.com/antonio2368)). +* Instead using a constant key, now object storage generates key for determining remove objects capability. [#59495](https://github.com/ClickHouse/ClickHouse/pull/59495) ([Sema Checherinda](https://github.com/CheSema)). +* Don't infer floats in exponential notation by default. Add a setting `input_format_try_infer_exponent_floats` that will restore previous behaviour (disabled by default). Closes [#59476](https://github.com/ClickHouse/ClickHouse/issues/59476). [#59500](https://github.com/ClickHouse/ClickHouse/pull/59500) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow alter operations to be surrounded by parenthesis. The emission of parentheses can be controlled by the `format_alter_operations_with_parentheses` config. By default in formatted queries the parentheses are emitted as we store the formatted alter operations in some places as metadata (e.g.: mutations). The new syntax clarifies some of the queries where alter operations end in a list. E.g.: `ALTER TABLE x MODIFY TTL date GROUP BY a, b, DROP COLUMN c` cannot be parsed properly with the old syntax. In the new syntax the query `ALTER TABLE x (MODIFY TTL date GROUP BY a, b), (DROP COLUMN c)` is obvious. Older versions are not able to read the new syntax, therefore using the new syntax might cause issues if newer and older version of ClickHouse are mixed in a single cluster. [#59532](https://github.com/ClickHouse/ClickHouse/pull/59532) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)). +* Bumped Intel QPL (used by codec `DEFLATE_QPL`) from v1.3.1 to v1.4.0 . Also fixed a bug for polling timeout mechanism, as we observed in same cases timeout won't work properly, if timeout happen, IAA and CPU may process buffer concurrently. So far, we'd better make sure IAA codec status is not QPL_STS_BEING_PROCESSED, then fallback to SW codec. [#59551](https://github.com/ClickHouse/ClickHouse/pull/59551) ([jasperzhu](https://github.com/jinjunzh)). +* Add positional pread in libhdfs3. If you want to call positional read in libhdfs3, use the hdfsPread function in hdfs.h as follows. `tSize hdfsPread(hdfsFS fs, hdfsFile file, void * buffer, tSize length, tOffset position);`. [#59624](https://github.com/ClickHouse/ClickHouse/pull/59624) ([M1eyu](https://github.com/M1eyu2018)). +* Check for stack overflow in parsers even if the user misconfigured the `max_parser_depth` setting to a very high value. This closes [#59622](https://github.com/ClickHouse/ClickHouse/issues/59622). [#59697](https://github.com/ClickHouse/ClickHouse/pull/59697) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Unify xml and sql created named collection behaviour in kafka storage. [#59710](https://github.com/ClickHouse/ClickHouse/pull/59710) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)). +* Allow uuid in replica_path if CREATE TABLE explicitly has it. [#59908](https://github.com/ClickHouse/ClickHouse/pull/59908) ([Azat Khuzhin](https://github.com/azat)). +* Add column `metadata_version` of ReplicatedMergeTree table in `system.tables` system table. [#59942](https://github.com/ClickHouse/ClickHouse/pull/59942) ([Maksim Kita](https://github.com/kitaisreal)). +* Keeper improvement: add retries on failures for Disk related operations. [#59980](https://github.com/ClickHouse/ClickHouse/pull/59980) ([Antonio Andelic](https://github.com/antonio2368)). +* Add new config setting `backups.remove_backup_files_after_failure`: ``` true ```. [#60002](https://github.com/ClickHouse/ClickHouse/pull/60002) ([Vitaly Baranov](https://github.com/vitlibar)). +* Use multiple threads while reading the metadata of tables from a backup while executing the RESTORE command. [#60040](https://github.com/ClickHouse/ClickHouse/pull/60040) ([Vitaly Baranov](https://github.com/vitlibar)). +* Now if `StorageBuffer` has more than 1 shard (`num_layers` > 1) background flush will happen simultaneously for all shards in multiple threads. [#60111](https://github.com/ClickHouse/ClickHouse/pull/60111) ([alesapin](https://github.com/alesapin)). +* Support specifying users for specific S3 settings in config using `user` key. [#60144](https://github.com/ClickHouse/ClickHouse/pull/60144) ([Antonio Andelic](https://github.com/antonio2368)). +* Copy S3 file GCP fallback to buffer copy in case GCP returned `Internal Error` with `GATEWAY_TIMEOUT` HTTP error code. [#60164](https://github.com/ClickHouse/ClickHouse/pull/60164) ([Maksim Kita](https://github.com/kitaisreal)). +* Allow "local" as object storage type instead of "local_blob_storage". [#60165](https://github.com/ClickHouse/ClickHouse/pull/60165) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Implement comparison operator for Variant values and proper Field inserting into Variant column. Don't allow creating `Variant` type with similar variant types by default (allow uder a setting `allow_suspicious_variant_types`) Closes [#59996](https://github.com/ClickHouse/ClickHouse/issues/59996). Closes [#59850](https://github.com/ClickHouse/ClickHouse/issues/59850). [#60198](https://github.com/ClickHouse/ClickHouse/pull/60198) ([Kruglov Pavel](https://github.com/Avogar)). +* Improved overall usability of virtual columns. Now it is allowed to use virtual columns in `PREWHERE` (it's worthwhile for non-const virtual columns like `_part_offset`). Now a builtin documentation is available for virtual columns as a comment of column in `DESCRIBE` query with enabled setting `describe_include_virtual_columns`. [#60205](https://github.com/ClickHouse/ClickHouse/pull/60205) ([Anton Popov](https://github.com/CurtizJ)). +* Short circuit execution for `ULIDStringToDateTime`. [#60211](https://github.com/ClickHouse/ClickHouse/pull/60211) ([Juan Madurga](https://github.com/jlmadurga)). +* Added `query_id` column for tables `system.backups` and `system.backup_log`. Added error stacktrace to `error` column. [#60220](https://github.com/ClickHouse/ClickHouse/pull/60220) ([Maksim Kita](https://github.com/kitaisreal)). +* Parallel flush of pending INSERT blocks of Distributed engine on `DETACH`/server shutdown and `SYSTEM FLUSH DISTRIBUTED` (Parallelism will work only if you have multi disk policy for table (like everything in Distributed engine right now)). [#60225](https://github.com/ClickHouse/ClickHouse/pull/60225) ([Azat Khuzhin](https://github.com/azat)). +* Filter setting is improper in `joinRightColumnsSwitchNullability`, resolve [#59625](https://github.com/ClickHouse/ClickHouse/issues/59625). [#60259](https://github.com/ClickHouse/ClickHouse/pull/60259) ([lgbo](https://github.com/lgbo-ustc)). +* Add a setting to force read-through cache for merges. [#60308](https://github.com/ClickHouse/ClickHouse/pull/60308) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Issue [#57598](https://github.com/ClickHouse/ClickHouse/issues/57598) mentions a variant behaviour regarding transaction handling. An issued COMMIT/ROLLBACK when no transaction is active is reported as an error contrary to MySQL behaviour. [#60338](https://github.com/ClickHouse/ClickHouse/pull/60338) ([PapaToemmsn](https://github.com/PapaToemmsn)). +* Added `none_only_active` mode for `distributed_ddl_output_mode` setting. [#60340](https://github.com/ClickHouse/ClickHouse/pull/60340) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Connections through the MySQL port now automatically run with setting `prefer_column_name_to_alias = 1` to support QuickSight out-of-the-box. Also, settings `mysql_map_string_to_text_in_show_columns` and `mysql_map_fixed_string_to_text_in_show_columns` are now enabled by default, affecting also only MySQL connections. This increases compatibility with more BI tools. [#60365](https://github.com/ClickHouse/ClickHouse/pull/60365) ([Robert Schulze](https://github.com/rschu1ze)). +* When output format is Pretty format and a block consists of a single numeric value which exceeds one million, A readable number will be printed on table right. e.g. ``` ┌──────count()─┠│ 233765663884 │ -- 233.77 billion └──────────────┘ ```. [#60379](https://github.com/ClickHouse/ClickHouse/pull/60379) ([rogeryk](https://github.com/rogeryk)). +* Allow configuring HTTP redirect handlers for clickhouse-server. For example, you can make `/` redirect to the Play UI. [#60390](https://github.com/ClickHouse/ClickHouse/pull/60390) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The advanced dashboard has slightly better colors for multi-line graphs. [#60391](https://github.com/ClickHouse/ClickHouse/pull/60391) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix a race condition in JavaScript code leading to duplicate charts on top of each other. [#60392](https://github.com/ClickHouse/ClickHouse/pull/60392) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Check for stack overflow in parsers even if the user misconfigured the `max_parser_depth` setting to a very high value. This closes [#59622](https://github.com/ClickHouse/ClickHouse/issues/59622). [#60434](https://github.com/ClickHouse/ClickHouse/pull/60434) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Function `substring` now has a new alias `byteSlice`. [#60494](https://github.com/ClickHouse/ClickHouse/pull/60494) ([Robert Schulze](https://github.com/rschu1ze)). +* Renamed server setting `dns_cache_max_size` to `dns_cache_max_entries` to reduce ambiguity. [#60500](https://github.com/ClickHouse/ClickHouse/pull/60500) ([Kirill Nikiforov](https://github.com/allmazz)). +* `SHOW INDEX | INDEXES | INDICES | KEYS` no longer sorts by the primary key columns (which was unintuitive). [#60514](https://github.com/ClickHouse/ClickHouse/pull/60514) ([Robert Schulze](https://github.com/rschu1ze)). +* Keeper improvement: abort during startup if an invalid snapshot is detected to avoid data loss. [#60537](https://github.com/ClickHouse/ClickHouse/pull/60537) ([Antonio Andelic](https://github.com/antonio2368)). +* Added MergeTree read split ranges into intersecting and non intersecting fault injection using `merge_tree_read_split_ranges_into_intersecting_and_non_intersecting_fault_probability` setting. [#60548](https://github.com/ClickHouse/ClickHouse/pull/60548) ([Maksim Kita](https://github.com/kitaisreal)). +* The Advanced dashboard now has controls always visible on scrolling. This allows you to add a new chart without scrolling up. [#60692](https://github.com/ClickHouse/ClickHouse/pull/60692) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* String types and Enums can be used in the same context, such as: arrays, UNION queries, conditional expressions. This closes [#60726](https://github.com/ClickHouse/ClickHouse/issues/60726). [#60727](https://github.com/ClickHouse/ClickHouse/pull/60727) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Update tzdata to 2024a. [#60768](https://github.com/ClickHouse/ClickHouse/pull/60768) ([Raúl Marín](https://github.com/Algunenano)). +* Support files without format extension in Filesystem database. [#60795](https://github.com/ClickHouse/ClickHouse/pull/60795) ([Kruglov Pavel](https://github.com/Avogar)). +* Keeper improvement: support `leadership_expiry_ms` in Keeper's settings. [#60806](https://github.com/ClickHouse/ClickHouse/pull/60806) ([Brokenice0415](https://github.com/Brokenice0415)). +* Always infer exponential numbers in JSON formats regardless of the setting `input_format_try_infer_exponent_floats`. Add setting `input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects` that allows to use String type for ambiguous paths instead of an exception during named Tuples inference from JSON objects. [#60808](https://github.com/ClickHouse/ClickHouse/pull/60808) ([Kruglov Pavel](https://github.com/Avogar)). +* Add a flag for SMJ to treat null as biggest/smallest. So the behavior can be compitable with other SQL systems, like Apache Spark. [#60896](https://github.com/ClickHouse/ClickHouse/pull/60896) ([loudongfeng](https://github.com/loudongfeng)). +* Clickhouse version has been added to docker labels. Closes [#54224](https://github.com/ClickHouse/ClickHouse/issues/54224). [#60949](https://github.com/ClickHouse/ClickHouse/pull/60949) ([Nikolay Monkov](https://github.com/nikmonkov)). +* Add a setting `parallel_replicas_allow_in_with_subquery = 1` which allows subqueries for IN work with parallel replicas. [#60950](https://github.com/ClickHouse/ClickHouse/pull/60950) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* DNSResolver shuffles set of resolved IPs. [#60965](https://github.com/ClickHouse/ClickHouse/pull/60965) ([Sema Checherinda](https://github.com/CheSema)). +* Support detect output format by file exctension in `clickhouse-client` and `clickhouse-local`. [#61036](https://github.com/ClickHouse/ClickHouse/pull/61036) ([豪肥肥](https://github.com/HowePa)). +* Check memory limit update periodically. [#61049](https://github.com/ClickHouse/ClickHouse/pull/61049) ([Han Fei](https://github.com/hanfei1991)). +* Enable processors profiling (time spent/in and out bytes for sorting, aggregation, ...) by default. [#61096](https://github.com/ClickHouse/ClickHouse/pull/61096) ([Azat Khuzhin](https://github.com/azat)). +* Add the function `toUInt128OrZero`, which was missed by mistake (the mistake is related to https://github.com/ClickHouse/ClickHouse/pull/945). The compatibility aliases `FROM_UNIXTIME` and `DATE_FORMAT` (they are not ClickHouse-native and only exist for MySQL compatibility) have been made case insensitive, as expected for SQL-compatibility aliases. [#61114](https://github.com/ClickHouse/ClickHouse/pull/61114) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Improvements for the access checks, allowing to revoke of unpossessed rights in case the target user doesn't have the revoking grants either. Example: ```sql GRANT SELECT ON *.* TO user1; REVOKE SELECT ON system.* FROM user1;. [#61115](https://github.com/ClickHouse/ClickHouse/pull/61115) ([pufit](https://github.com/pufit)). +* Fix an error in previeous opt: https://github.com/ClickHouse/ClickHouse/pull/59698: remove break to make sure the first filtered column has minimum size cc @jsc0218. [#61145](https://github.com/ClickHouse/ClickHouse/pull/61145) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Fix `has()` function with `Nullable` column (fixes [#60214](https://github.com/ClickHouse/ClickHouse/issues/60214)). [#61249](https://github.com/ClickHouse/ClickHouse/pull/61249) ([Mikhail Koviazin](https://github.com/mkmkme)). +* Now it's possible to specify attribute `merge="true"` in config substitutions for subtrees ``. In case this attribute specified, clickhouse will merge subtree with existing configuration, otherwise default behavior is append new content to configuration. [#61299](https://github.com/ClickHouse/ClickHouse/pull/61299) ([alesapin](https://github.com/alesapin)). +* Add async metrics for virtual memory mappings: VMMaxMapCount & VMNumMaps. Closes [#60662](https://github.com/ClickHouse/ClickHouse/issues/60662). [#61354](https://github.com/ClickHouse/ClickHouse/pull/61354) ([Tuan Pham Anh](https://github.com/tuanpavn)). +* Use `temporary_files_codec` setting in all places where we create temporary data, for example external memory sorting and external memory GROUP BY. Before it worked only in `partial_merge` JOIN algorithm. [#61456](https://github.com/ClickHouse/ClickHouse/pull/61456) ([Maksim Kita](https://github.com/kitaisreal)). +* Remove duplicated check `containing_part.empty()`, It's already being checked here: https://github.com/ClickHouse/ClickHouse/blob/1296dac3c7e47670872c15e3f5e58f869e0bd2f2/src/Storages/MergeTree/MergeTreeData.cpp#L6141. [#61467](https://github.com/ClickHouse/ClickHouse/pull/61467) ([William Schoeffel](https://github.com/wiledusc)). +* Add a new setting `max_parser_backtracks` which allows to limit the complexity of query parsing. [#61502](https://github.com/ClickHouse/ClickHouse/pull/61502) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Less contention during dynamic resize of filesystem cache. [#61524](https://github.com/ClickHouse/ClickHouse/pull/61524) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Disallow sharded mode of StorageS3 queue, because it will be rewritten. [#61537](https://github.com/ClickHouse/ClickHouse/pull/61537) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fixed typo: from `use_leagcy_max_level` to `use_legacy_max_level`. [#61545](https://github.com/ClickHouse/ClickHouse/pull/61545) ([William Schoeffel](https://github.com/wiledusc)). +* Remove some duplicate entries in blob_storage_log. [#61622](https://github.com/ClickHouse/ClickHouse/pull/61622) ([YenchangChan](https://github.com/YenchangChan)). +* Added `current_user` function as a compatibility alias for MySQL. [#61770](https://github.com/ClickHouse/ClickHouse/pull/61770) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Use managed identity for backups IO when using Azure Blob Storage. Add a setting to prevent ClickHouse from attempting to create a non-existent container, which requires permissions at the storage account level. [#61785](https://github.com/ClickHouse/ClickHouse/pull/61785) ([Daniel Pozo Escalona](https://github.com/danipozo)). +* In the previous version, some numbers in Pretty formats were not pretty enough. [#61794](https://github.com/ClickHouse/ClickHouse/pull/61794) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* A long value in Pretty formats won't be cut if it is the single value in the resultset, such as in the result of the `SHOW CREATE TABLE` query. [#61795](https://github.com/ClickHouse/ClickHouse/pull/61795) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Similarly to `clickhouse-local`, `clickhouse-client` will accept the `--output-format` option as a synonym to the `--format` option. This closes [#59848](https://github.com/ClickHouse/ClickHouse/issues/59848). [#61797](https://github.com/ClickHouse/ClickHouse/pull/61797) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* If stdout is a terminal and the output format is not specified, `clickhouse-client` and similar tools will use `PrettyCompact` by default, similarly to the interactive mode. `clickhouse-client` and `clickhouse-local` will handle command line arguments for input and output formats in a unified fashion. This closes [#61272](https://github.com/ClickHouse/ClickHouse/issues/61272). [#61800](https://github.com/ClickHouse/ClickHouse/pull/61800) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Underscore digit groups in Pretty formats for better readability. This is controlled by a new setting, `output_format_pretty_highlight_digit_groups`. [#61802](https://github.com/ClickHouse/ClickHouse/pull/61802) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### Bug Fix (user-visible misbehavior in an official stable release) + +* Fix bug with `intDiv` for decimal arguments [#59243](https://github.com/ClickHouse/ClickHouse/pull/59243) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Fix_kql_issue_found_by_wingfuzz [#59626](https://github.com/ClickHouse/ClickHouse/pull/59626) ([Yong Wang](https://github.com/kashwy)). +* Fix error "Read beyond last offset" for AsynchronousBoundedReadBuffer [#59630](https://github.com/ClickHouse/ClickHouse/pull/59630) ([Vitaly Baranov](https://github.com/vitlibar)). +* rabbitmq: fix having neither acked nor nacked messages [#59775](https://github.com/ClickHouse/ClickHouse/pull/59775) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix function execution over const and LowCardinality with GROUP BY const for analyzer [#59986](https://github.com/ClickHouse/ClickHouse/pull/59986) ([Azat Khuzhin](https://github.com/azat)). +* Fix scale conversion for DateTime64 [#60004](https://github.com/ClickHouse/ClickHouse/pull/60004) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Fix INSERT into SQLite with single quote (by escaping single quotes with a quote instead of backslash) [#60015](https://github.com/ClickHouse/ClickHouse/pull/60015) ([Azat Khuzhin](https://github.com/azat)). +* Fix optimize_uniq_to_count removing the column alias [#60026](https://github.com/ClickHouse/ClickHouse/pull/60026) ([Raúl Marín](https://github.com/Algunenano)). +* Fix finished_mutations_to_keep=0 for MergeTree (as docs says 0 is to keep everything) [#60031](https://github.com/ClickHouse/ClickHouse/pull/60031) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible exception from s3queue table on drop [#60036](https://github.com/ClickHouse/ClickHouse/pull/60036) ([Kseniia Sumarokova](https://github.com/kssenii)). +* PartsSplitter invalid ranges for the same part [#60041](https://github.com/ClickHouse/ClickHouse/pull/60041) ([Maksim Kita](https://github.com/kitaisreal)). +* Use max_query_size from context in DDLLogEntry instead of hardcoded 4096 [#60083](https://github.com/ClickHouse/ClickHouse/pull/60083) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix inconsistent formatting of queries [#60095](https://github.com/ClickHouse/ClickHouse/pull/60095) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix inconsistent formatting of explain in subqueries [#60102](https://github.com/ClickHouse/ClickHouse/pull/60102) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix cosineDistance crash with Nullable [#60150](https://github.com/ClickHouse/ClickHouse/pull/60150) ([Raúl Marín](https://github.com/Algunenano)). +* Allow casting of bools in string representation to to true bools [#60160](https://github.com/ClickHouse/ClickHouse/pull/60160) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix system.s3queue_log [#60166](https://github.com/ClickHouse/ClickHouse/pull/60166) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix arrayReduce with nullable aggregate function name [#60188](https://github.com/ClickHouse/ClickHouse/pull/60188) ([Raúl Marín](https://github.com/Algunenano)). +* Fix actions execution during preliminary filtering (PK, partition pruning) [#60196](https://github.com/ClickHouse/ClickHouse/pull/60196) ([Azat Khuzhin](https://github.com/azat)). +* Hide sensitive info for s3queue [#60233](https://github.com/ClickHouse/ClickHouse/pull/60233) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Revert "Replace `ORDER BY ALL` by `ORDER BY *`" [#60248](https://github.com/ClickHouse/ClickHouse/pull/60248) ([Robert Schulze](https://github.com/rschu1ze)). +* Azure Blob Storage : Fix issues endpoint and prefix [#60251](https://github.com/ClickHouse/ClickHouse/pull/60251) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fix http exception codes. [#60252](https://github.com/ClickHouse/ClickHouse/pull/60252) ([Austin Kothig](https://github.com/kothiga)). +* fix LRUResource Cache bug (Hive cache) [#60262](https://github.com/ClickHouse/ClickHouse/pull/60262) ([shanfengp](https://github.com/Aed-p)). +* s3queue: fix bug (also fixes flaky test_storage_s3_queue/test.py::test_shards_distributed) [#60282](https://github.com/ClickHouse/ClickHouse/pull/60282) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix use-of-uninitialized-value and invalid result in hashing functions with IPv6 [#60359](https://github.com/ClickHouse/ClickHouse/pull/60359) ([Kruglov Pavel](https://github.com/Avogar)). +* Force reanalysis if parallel replicas changed [#60362](https://github.com/ClickHouse/ClickHouse/pull/60362) ([Raúl Marín](https://github.com/Algunenano)). +* Fix usage of plain metadata type with new disks configuration option [#60396](https://github.com/ClickHouse/ClickHouse/pull/60396) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Don't allow to set max_parallel_replicas to 0 as it doesn't make sense [#60430](https://github.com/ClickHouse/ClickHouse/pull/60430) ([Kruglov Pavel](https://github.com/Avogar)). +* Try to fix logical error 'Cannot capture column because it has incompatible type' in mapContainsKeyLike [#60451](https://github.com/ClickHouse/ClickHouse/pull/60451) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix OptimizeDateOrDateTimeConverterWithPreimageVisitor with null arguments [#60453](https://github.com/ClickHouse/ClickHouse/pull/60453) ([Raúl Marín](https://github.com/Algunenano)). +* Try to avoid calculation of scalar subqueries for CREATE TABLE. [#60464](https://github.com/ClickHouse/ClickHouse/pull/60464) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Merging [#59674](https://github.com/ClickHouse/ClickHouse/issues/59674). [#60470](https://github.com/ClickHouse/ClickHouse/pull/60470) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Correctly check keys in s3Cluster [#60477](https://github.com/ClickHouse/ClickHouse/pull/60477) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix deadlock in parallel parsing when lots of rows are skipped due to errors [#60516](https://github.com/ClickHouse/ClickHouse/pull/60516) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix_max_query_size_for_kql_compound_operator: [#60534](https://github.com/ClickHouse/ClickHouse/pull/60534) ([Yong Wang](https://github.com/kashwy)). +* Keeper fix: add timeouts when waiting for commit logs [#60544](https://github.com/ClickHouse/ClickHouse/pull/60544) ([Antonio Andelic](https://github.com/antonio2368)). +* Reduce the number of read rows from `system.numbers` [#60546](https://github.com/ClickHouse/ClickHouse/pull/60546) ([JackyWoo](https://github.com/JackyWoo)). +* Don't output number tips for date types [#60577](https://github.com/ClickHouse/ClickHouse/pull/60577) ([Raúl Marín](https://github.com/Algunenano)). +* Fix reading from MergeTree with non-deterministic functions in filter [#60586](https://github.com/ClickHouse/ClickHouse/pull/60586) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix logical error on bad compatibility setting value type [#60596](https://github.com/ClickHouse/ClickHouse/pull/60596) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix inconsistent aggregate function states in mixed x86-64 / ARM clusters [#60610](https://github.com/ClickHouse/ClickHouse/pull/60610) ([Harry Lee](https://github.com/HarryLeeIBM)). +* fix(prql): Robust panic handler [#60615](https://github.com/ClickHouse/ClickHouse/pull/60615) ([Maximilian Roos](https://github.com/max-sixty)). +* Fix `intDiv` for decimal and date arguments [#60672](https://github.com/ClickHouse/ClickHouse/pull/60672) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Fix: expand CTE in alter modify query [#60682](https://github.com/ClickHouse/ClickHouse/pull/60682) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix system.parts for non-Atomic/Ordinary database engine (i.e. Memory) [#60689](https://github.com/ClickHouse/ClickHouse/pull/60689) ([Azat Khuzhin](https://github.com/azat)). +* Fix "Invalid storage definition in metadata file" for parameterized views [#60708](https://github.com/ClickHouse/ClickHouse/pull/60708) ([Azat Khuzhin](https://github.com/azat)). +* Fix buffer overflow in CompressionCodecMultiple [#60731](https://github.com/ClickHouse/ClickHouse/pull/60731) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Remove nonsense from SQL/JSON [#60738](https://github.com/ClickHouse/ClickHouse/pull/60738) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Remove wrong sanitize checking in aggregate function quantileGK [#60740](https://github.com/ClickHouse/ClickHouse/pull/60740) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Fix insert-select + insert_deduplication_token bug by setting streams to 1 [#60745](https://github.com/ClickHouse/ClickHouse/pull/60745) ([Jordi Villar](https://github.com/jrdi)). +* Prevent setting custom metadata headers on unsupported multipart upload operations [#60748](https://github.com/ClickHouse/ClickHouse/pull/60748) ([Francisco J. Jurado Moreno](https://github.com/Beetelbrox)). +* Fix toStartOfInterval [#60763](https://github.com/ClickHouse/ClickHouse/pull/60763) ([Andrey Zvonov](https://github.com/zvonand)). +* Fix crash in arrayEnumerateRanked [#60764](https://github.com/ClickHouse/ClickHouse/pull/60764) ([Raúl Marín](https://github.com/Algunenano)). +* Fix crash when using input() in INSERT SELECT JOIN [#60765](https://github.com/ClickHouse/ClickHouse/pull/60765) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix crash with different allow_experimental_analyzer value in subqueries [#60770](https://github.com/ClickHouse/ClickHouse/pull/60770) ([Dmitry Novik](https://github.com/novikd)). +* Remove recursion when reading from S3 [#60849](https://github.com/ClickHouse/ClickHouse/pull/60849) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix possible stuck on error in HashedDictionaryParallelLoader [#60926](https://github.com/ClickHouse/ClickHouse/pull/60926) ([vdimir](https://github.com/vdimir)). +* Fix async RESTORE with Replicated database [#60934](https://github.com/ClickHouse/ClickHouse/pull/60934) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix deadlock in async inserts to `Log` tables via native protocol [#61055](https://github.com/ClickHouse/ClickHouse/pull/61055) ([Anton Popov](https://github.com/CurtizJ)). +* Fix lazy execution of default argument in dictGetOrDefault for RangeHashedDictionary [#61196](https://github.com/ClickHouse/ClickHouse/pull/61196) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix multiple bugs in groupArraySorted [#61203](https://github.com/ClickHouse/ClickHouse/pull/61203) ([Raúl Marín](https://github.com/Algunenano)). +* Fix Keeper reconfig for standalone binary [#61233](https://github.com/ClickHouse/ClickHouse/pull/61233) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix usage of session_token in S3 engine [#61234](https://github.com/ClickHouse/ClickHouse/pull/61234) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix possible incorrect result of aggregate function `uniqExact` [#61257](https://github.com/ClickHouse/ClickHouse/pull/61257) ([Anton Popov](https://github.com/CurtizJ)). +* Fix bugs in show database [#61269](https://github.com/ClickHouse/ClickHouse/pull/61269) ([Raúl Marín](https://github.com/Algunenano)). +* Fix logical error in RabbitMQ storage with MATERIALIZED columns [#61320](https://github.com/ClickHouse/ClickHouse/pull/61320) ([vdimir](https://github.com/vdimir)). +* Fix CREATE OR REPLACE DICTIONARY [#61356](https://github.com/ClickHouse/ClickHouse/pull/61356) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix ATTACH query with external ON CLUSTER [#61365](https://github.com/ClickHouse/ClickHouse/pull/61365) ([Nikolay Degterinsky](https://github.com/evillique)). +* fix issue of actions dag split [#61458](https://github.com/ClickHouse/ClickHouse/pull/61458) ([Raúl Marín](https://github.com/Algunenano)). +* Fix finishing a failed RESTORE [#61466](https://github.com/ClickHouse/ClickHouse/pull/61466) ([Vitaly Baranov](https://github.com/vitlibar)). +* Disable async_insert_use_adaptive_busy_timeout correctly with compatibility settings [#61468](https://github.com/ClickHouse/ClickHouse/pull/61468) ([Raúl Marín](https://github.com/Algunenano)). +* Allow queuing in restore pool [#61475](https://github.com/ClickHouse/ClickHouse/pull/61475) ([Nikita Taranov](https://github.com/nickitat)). +* Fix bug when reading system.parts using UUID (issue 61220). [#61479](https://github.com/ClickHouse/ClickHouse/pull/61479) ([Dan Wu](https://github.com/wudanzy)). +* Fix crash in window view [#61526](https://github.com/ClickHouse/ClickHouse/pull/61526) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix `repeat` with non native integers [#61527](https://github.com/ClickHouse/ClickHouse/pull/61527) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix client `-s` argument [#61530](https://github.com/ClickHouse/ClickHouse/pull/61530) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Fix crash in arrayPartialReverseSort [#61539](https://github.com/ClickHouse/ClickHouse/pull/61539) ([Raúl Marín](https://github.com/Algunenano)). +* Fix string search with const position [#61547](https://github.com/ClickHouse/ClickHouse/pull/61547) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix addDays cause an error when used datetime64 [#61561](https://github.com/ClickHouse/ClickHouse/pull/61561) ([Shuai li](https://github.com/loneylee)). +* Fix `system.part_log` for async insert with deduplication [#61620](https://github.com/ClickHouse/ClickHouse/pull/61620) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix Non-ready set for system.parts. [#61666](https://github.com/ClickHouse/ClickHouse/pull/61666) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). diff --git a/docs/ja/get-started/cloud-quick-start.md b/docs/ja/get-started/cloud-quick-start.md new file mode 100644 index 00000000000..b6801aa1387 --- /dev/null +++ b/docs/ja/get-started/cloud-quick-start.md @@ -0,0 +1,251 @@ +--- +sidebar_position: 1 +slug: /ja/cloud-quick-start +sidebar_label: Cloudクイックスタート +keywords: [clickhouse, install, getting started, quick start] +pagination_next: en/get-started/sql-console +--- +import SignUp from '@site/docs/ja/_snippets/_sign_in_or_trial.md'; +import SQLConsoleDetail from '@site/docs/ja/_snippets/_launch_sql_console.md'; +import CheckIPAccess from '@site/docs/ja/_snippets/_check_ip_access_list_detail.md'; + +# ClickHouse Cloud クイックスタート + +ClickHouse ã‚’ã™ãã«ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã—ã¦åˆ©ç”¨ã‚’開始ã™ã‚‹æœ€é€Ÿã‹ã¤æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯ã€[ClickHouse Cloud](https://clickhouse.cloud)ã§æ–°ã—ã„サービスを作æˆã™ã‚‹ã“ã¨ã§ã™ã€‚ + +## 1: ClickHouse を入手ã™ã‚‹ + +[ClickHouse Cloud](https://clickhouse.cloud)ã§ç„¡æ–™ã® ClickHouse サービスを作æˆã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚¹ãƒ†ãƒƒãƒ—を完了ã™ã‚‹ã ã‘ã§ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã§ãã¾ã™ï¼š + + - [サインアップページ](https://clickhouse.cloud/signUp)ã§ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’ä½œæˆ + - å—ä¿¡ã—ãŸãƒ¡ãƒ¼ãƒ«å†…ã®ãƒªãƒ³ã‚¯ã‚’クリックã—ã¦ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’ç¢ºèª + - 作æˆã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードã§ãƒ­ã‚°ã‚¤ãƒ³ + +ログインã™ã‚‹ã¨ã€ClickHouse Cloud ã®ã‚ªãƒ³ãƒœãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚¦ã‚£ã‚¶ãƒ¼ãƒ‰ãŒé–‹å§‹ã•ã‚Œã€æ–°ã—ã„ ClickHouse サービスã®ä½œæˆã‚’ガイドã—ã¦ãã‚Œã¾ã™ã€‚サービスã®å±•é–‹å…ˆã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã‚’é¸æŠžã—ã€æ–°ã—ã„サービスã«åå‰ã‚’付ã‘ã¾ã™ï¼š + +
+ +![New ClickHouse Service](@site/docs/ja/_snippets/images/createservice1.png) +
+ +
+ +ClickHouse Cloud 㯠IP フィルタリングを使用ã—ã¦ã‚µãƒ¼ãƒ“スã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’制é™ã—ã¾ã™ã€‚ローカル IP アドレスãŒæ—¢ã«è¿½åŠ ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。サービスãŒèµ·å‹•ã—ã¦ã‹ã‚‰è¿½åŠ ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +
+ +![IP Filtering](@site/docs/ja/_snippets/images/createservice2.png) +
+ +
+ +ClickHouse Cloud 㯠`default` ユーザーã®ãŸã‚ã«ãƒ‘スワードを生æˆã—ã¾ã™ã€‚資格情報を必ãšä¿å­˜ã—ã¦ãã ã•ã„。(後ã§å¤‰æ›´å¯èƒ½ã§ã™ã€‚) + +
+ +![Download Credentials](@site/docs/ja/_snippets/images/createservice3.png) +
+ +æ–°ã—ã„サービスãŒãƒ—ロビジョニングã•ã‚Œã€ClickHouse Cloud ダッシュボードã«è¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ï¼š + +
+ +![Download Credentials](@site/docs/ja/_snippets/images/createservice4.png) +
+ +
+ +ãŠã‚ã§ã¨ã†ã”ã–ã„ã¾ã™ï¼ClickHouse Cloud サービスãŒèµ·å‹•ã—ã¾ã—ãŸã€‚接続方法やデータã®ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆã‚’開始ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã€å¼•ã続ããŠèª­ã¿ãã ã•ã„。 + +## 2: ClickHouse ã«æŽ¥ç¶š + +ç´ æ—©ã始ã‚ã‚‹ãŸã‚ã«ã€ClickHouse ã§ã¯ã‚¦ã‚§ãƒ–ベース㮠SQL コンソールãŒæä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ + + + +:::note +ClickHouse ã¯ãƒ‡ãƒ¼ã‚¿ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’éžå¸¸ã«é‡è¦–ã—ã¦ã„ã‚‹ãŸã‚ã€ã‚µãƒ¼ãƒ“ス作æˆæ™‚ã« IP アクセスリストã®è¨­å®šãŒæ±‚ã‚られã¾ã—ãŸã€‚ã“れをスキップã—ãŸã‚Šèª¤ã£ã¦é–‰ã˜ãŸã‚Šã—ãŸå ´åˆã€ã‚µãƒ¼ãƒ“スã«æŽ¥ç¶šã§ãã¾ã›ã‚“。 + +ローカル IP アドレスã®è¿½åŠ æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[IP アクセスリスト](/docs/ja/cloud/security/setting-ip-filters)ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒšãƒ¼ã‚¸ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +1. 接続ãŒæ­£å¸¸ã«å‹•ä½œã™ã‚‹ã‹ç¢ºèªã™ã‚‹ãŸã‚ã«ã€ç°¡å˜ãªã‚¯ã‚¨ãƒªã‚’入力ã—ã¾ã—ょã†ï¼š + + ```sql + SHOW databases + ``` + + リストã«ã¯ 4 ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒè¡¨ç¤ºã•ã‚Œã€è¿½åŠ ã—ãŸã‚‚ã®ãŒã‚ã‚Œã°ãれもå«ã¾ã‚Œã¾ã™ã€‚ + + ã“ã‚Œã§ã€æ–°ã—ã„ ClickHouse サービスを使用ã™ã‚‹æº–å‚™ãŒæ•´ã„ã¾ã—ãŸï¼ + +## 3: データベースã¨ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ + +1. ã»ã¨ã‚“ã©ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã¨åŒæ§˜ã«ã€ClickHouse ã¯ãƒ†ãƒ¼ãƒ–ルを論ç†çš„ã«**データベース**ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã¾ã™ã€‚æ–°ã—ã„データベースを ClickHouse ã«ä½œæˆã™ã‚‹ã«ã¯ `CREATE DATABASE` コマンドを使用ã—ã¾ã™ï¼š + ```sql + CREATE DATABASE IF NOT EXISTS helloworld + ``` + +1. `helloworld` データベース㫠`my_first_table` ã¨ã„ã†åå‰ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã«ã¯æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + ```sql + CREATE TABLE helloworld.my_first_table + ( + user_id UInt32, + message String, + timestamp DateTime, + metric Float32 + ) + ENGINE = MergeTree() + PRIMARY KEY (user_id, timestamp) + ``` + + 上記ã®ä¾‹ã§ã¯ã€`my_first_table` ã¯4ã¤ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ MergeTree テーブルã§ã™ï¼š + + - `user_id`: 32ビットã®ç¬¦å·ãªã—æ•´æ•° + - `message`: ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚·ã‚¹ãƒ†ãƒ ã§ã® VARCHAR, BLOB, CLOB ãªã©ã«ç½®ãæ›ã‚ã‚‹ String データ型 + - `timestamp`: 時間を表㙠DateTime 値 + - `metric`: 32ビットã®æµ®å‹•å°æ•°ç‚¹æ•° + + :::note テーブルエンジン + テーブルエンジンã¯ä»¥ä¸‹ã‚’決定ã—ã¾ã™ï¼š + - データãŒã©ã®ã‚ˆã†ã«ã€ã©ã“ã«ä¿å­˜ã•ã‚Œã‚‹ã‹ + - ã©ã®ã‚¯ã‚¨ãƒªãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ã‹ + - データãŒãƒ¬ãƒ—リケーションã•ã‚Œã‚‹ã‹ã©ã†ã‹ + + é¸æŠžå¯èƒ½ãªã‚¨ãƒ³ã‚¸ãƒ³ã¯å¤šæ•°ã‚ã‚Šã¾ã™ãŒã€å˜ä¸€ãƒŽãƒ¼ãƒ‰ã® ClickHouse サーãƒãƒ¼ä¸Šã®ã‚·ãƒ³ãƒ—ルãªãƒ†ãƒ¼ãƒ–ルã«ã¯ [MergeTree](/ja/engines/table-engines/mergetree-family/mergetree.md) ãŒä¸€èˆ¬çš„ãªé¸æŠžã§ã™ã€‚ + ::: + + ### 主キーã®ç°¡å˜ãªç´¹ä»‹ + + å…ˆã«é€²ã‚€å‰ã«ã€ClickHouse ã«ãŠã‘る主キーã®åƒãã«ã¤ã„ã¦ç†è§£ã™ã‚‹ã“ã¨ãŒé‡è¦ã§ã™ï¼ˆä¸»ã‚­ãƒ¼ã®å®Ÿè£…ãŒäºˆæƒ³å¤–ã«æ€ãˆã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ï¼ï¼‰ï¼š + + - ClickHouse ã®ä¸»ã‚­ãƒ¼ã¯ãƒ†ãƒ¼ãƒ–ルã®å„è¡Œã«å¯¾ã—ã¦**一æ„ã§ã¯ã‚ã‚Šã¾ã›ã‚“** + + ClickHouse テーブルã®ä¸»ã‚­ãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿ãŒãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹éš›ã®ä¸¦ã³é †ã‚’決定ã—ã¾ã™ã€‚8,192 è¡Œã¾ãŸã¯ 10MB ã®ãƒ‡ãƒ¼ã‚¿ã”ã¨ã«ï¼ˆ**インデックス粒度**ã¨ã—ã¦å‚ç…§ã•ã‚Œã‚‹ï¼‰ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚¨ãƒ³ãƒˆãƒªãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã®ç²’度ã®æ¦‚念ã«ã‚ˆã‚Šã€**スパースインデックス**ãŒãƒ¡ãƒ¢ãƒªã«ç°¡å˜ã«é©åˆã—ã€ç²’度㯠`SELECT` クエリ処ç†æ™‚ã«å‡¦ç†ã•ã‚Œã‚‹æœ€å°ã®ã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ã®ã‚¹ãƒˆãƒ©ã‚¤ãƒ—を表ã—ã¾ã™ã€‚ + + 主キー㯠`PRIMARY KEY` パラメータを使用ã—ã¦å®šç¾©ã§ãã¾ã™ã€‚`PRIMARY KEY`を指定ã—ãªã„ã§ãƒ†ãƒ¼ãƒ–ルを定義ã™ã‚‹ã¨ã€ã‚­ãƒ¼ã¯ `ORDER BY` å¥ã«æŒ‡å®šã•ã‚ŒãŸã‚¿ãƒ—ルã«ãªã‚Šã¾ã™ã€‚`PRIMARY KEY` 㨠`ORDER BY` ã®ä¸¡æ–¹ã‚’指定ã—ãŸå ´åˆã€ä¸»ã‚­ãƒ¼ã¯ã‚½ãƒ¼ãƒˆé †ã®ã‚µãƒ–セットã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + + 主キーã¯ã¾ãŸã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã§ã‚ã‚Š `(user_id, timestamp)` ã®ã‚¿ãƒ—ルã§ã™ã€‚ã—ãŸãŒã£ã¦ã€å„カラムファイルã«æ ¼ç´ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ `user_id`ã€æ¬¡ã« `timestamp` ã®é †ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +## 4: データを挿入 + +ClickHouse ã§ã¯ãŠãªã˜ã¿ã® `INSERT INTO TABLE` コマンドを使用ã§ãã¾ã™ãŒã€`MergeTree` テーブルã¸ã®å„挿入ãŒã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«**パート**を作æˆã™ã‚‹ã“ã¨ã‚’ç†è§£ã™ã‚‹ã“ã¨ãŒé‡è¦ã§ã™ã€‚ + +:::tip ClickHouse ベストプラクティス +ãƒãƒƒãƒã”ã¨ã«å¤§é‡ï¼ˆæ•°ä¸‡ã¾ãŸã¯æ•°ç™¾ä¸‡ï¼‰ã®è¡Œã‚’挿入ã—ã¦ãã ã•ã„。心é…ã„ã‚Šã¾ã›ã‚“ - ClickHouse ã¯ãã†ã—ãŸãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’容易ã«å‡¦ç†ã§ãã€ãれ㌠[コスト削減](/docs/ja/cloud/bestpractices/bulkinserts.md) ã«ã‚‚繋ãŒã‚Šã¾ã™ã€‚ +::: + +1. ç°¡å˜ãªä¾‹ã§ã‚ã£ã¦ã‚‚ã€è¤‡æ•°ã®è¡Œã‚’åŒæ™‚ã«æŒ¿å…¥ã—ã¾ã—ょã†ï¼š + ```sql + INSERT INTO helloworld.my_first_table (user_id, message, timestamp, metric) VALUES + (101, 'Hello, ClickHouse!', now(), -1.0 ), + (102, 'Insert a lot of rows per batch', yesterday(), 1.41421 ), + (102, 'Sort your data based on your commonly-used queries', today(), 2.718 ), + (101, 'Granules are the smallest chunks of data read', now() + 5, 3.14159 ) + ``` + + :::note + `timestamp` カラムãŒã•ã¾ã–ã¾ãª **Date** ãŠã‚ˆã³ **DateTime** 関数を使用ã—ã¦åŸ‹ã‚られã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ClickHouse ã«ã¯å¤šãã®ä¾¿åˆ©ãªé–¢æ•°ãŒã‚ã‚Šã¾ã™ã€‚詳細ã¯[**関数**セクション](/docs/ja/sql-reference/functions/index.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + ::: + +1. 挿入ãŒæˆåŠŸã—ãŸã‹ç¢ºèªã—ã¾ã—ょã†ï¼š + ```sql + SELECT * FROM helloworld.my_first_table + ``` + 挿入ã•ã‚ŒãŸ4ã¤ã®è¡ŒãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ï¼š + +## 5: ClickHouse クライアントを使用ã™ã‚‹ + +コマンドラインツール **clickhouse client** を使用ã—㦠ClickHouse Cloud サービスã«æŽ¥ç¶šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚接続詳細ã¯ã‚µãƒ¼ãƒ“ス㮠**Native** タブã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ï¼š + + ![clickhouse client connection details](@site/docs/ja/images/quickstart/CloudClickhouseClientDetails.png) + +1. [ClickHouse](/docs/ja/integrations/clickhouse-client-local.md) をインストールã—ã¾ã™ã€‚ + +2. ホストåã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã€ãƒ‘スワードを差ã—替ãˆã¦ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + ```bash + ./clickhouse client --host HOSTNAME.REGION.CSP.clickhouse.cloud \ + --secure --port 9440 \ + --user default \ + --password + ``` + スマイリーフェイスã®ãƒ—ロンプトãŒè¡¨ç¤ºã•ã‚ŒãŸã‚‰ã€ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹æº–å‚™ãŒæ•´ã„ã¾ã—ãŸï¼ + ```response + :) + ``` + +3. 次ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¦ã¿ã¾ã—ょã†ï¼š + ```sql + SELECT * + FROM helloworld.my_first_table + ORDER BY timestamp + ``` + 応答ãŒæ•´ã£ãŸãƒ†ãƒ¼ãƒ–ル形å¼ã§è¿”ã£ã¦ãã‚‹ã“ã¨ã«æ³¨ç›®ã—ã¦ãã ã•ã„: + ```response + ┌─user_id─┬─message────────────────────────────────────────────┬───────────timestamp─┬──metric─┠+ │ 102 │ Insert a lot of rows per batch │ 2022-03-21 00:00:00 │ 1.41421 │ + │ 102 │ Sort your data based on your commonly-used queries │ 2022-03-22 00:00:00 │ 2.718 │ + │ 101 │ Hello, ClickHouse! │ 2022-03-22 14:04:09 │ -1 │ + │ 101 │ Granules are the smallest chunks of data read │ 2022-03-22 14:04:14 │ 3.14159 │ + └─────────┴────────────────────────────────────────────────────┴─────────────────────┴─────────┘ + + 4 rows in set. Elapsed: 0.008 sec. + ``` + +5. `FORMAT`å¥ã‚’追加ã—ã¦ãã®ä¸€ã¤ã‚’指定ã™ã¹ã [ClickHouse ã®å¤šãã®ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る出力形å¼](/ja/interfaces/formats/) ã®ã„ãšã‚Œã‹ã‚’指定ã—ã¦ãã ã•ã„: + ```sql + SELECT * + FROM helloworld.my_first_table + ORDER BY timestamp + FORMAT TabSeparated + ``` + 上記ã®ã‚¯ã‚¨ãƒªã§ã¯ã€å‡ºåŠ›ã¯ã‚¿ãƒ–区切りã§è¿”ã•ã‚Œã¾ã™ï¼š + ```response + Query id: 3604df1c-acfd-4117-9c56-f86c69721121 + + 102 Insert a lot of rows per batch 2022-03-21 00:00:00 1.41421 + 102 Sort your data based on your commonly-used queries 2022-03-22 00:00:00 2.718 + 101 Hello, ClickHouse! 2022-03-22 14:04:09 -1 + 101 Granules are the smallest chunks of data read 2022-03-22 14:04:14 3.14159 + + 4 rows in set. Elapsed: 0.005 sec. + ``` + +6. `clickhouse client` を終了ã™ã‚‹ã«ã¯ã€**exit** コマンドを入力ã—ã¾ã™ï¼š + ```bash + exit + ``` + +## 6: CSV ファイルを挿入ã™ã‚‹ + +データベースを始ã‚ã‚‹éš›ã«ä¸€èˆ¬çš„ãªã‚¿ã‚¹ã‚¯ã¯ã€æ—¢ã«ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚るデータを挿入ã™ã‚‹ã“ã¨ã§ã™ã€‚ユーザーIDã€è¨ªå•ã—㟠URLã€ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã‚’å«ã‚€ã‚¯ãƒªãƒƒã‚¯ã‚¹ãƒˆãƒªãƒ¼ãƒ ãƒ‡ãƒ¼ã‚¿ã‚’表ã™ã‚µãƒ³ãƒ—ルデータをオンラインã§æä¾›ã—ã¦ã„ã¾ã™ã€‚ + +`data.csv` ã¨ã„ã†åå‰ã® CSV ファイルã«æ¬¡ã®ãƒ†ã‚­ã‚¹ãƒˆãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š + + ```bash + 102,This is data in a file,2022-02-22 10:43:28,123.45 + 101,It is comma-separated,2022-02-23 00:00:00,456.78 + 103,Use FORMAT to specify the format,2022-02-21 10:43:30,678.90 + ``` + +1. 次ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ `my_first_table` ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ï¼š + ```bash + ./clickhouse client --host HOSTNAME.REGION.CSP.clickhouse.cloud \ + --secure --port 9440 \ + --user default \ + --password \ + --query='INSERT INTO helloworld.my_first_table FORMAT CSV' < data.csv + ``` + +2. テーブルã«æ–°ã—ã„è¡ŒãŒè¡¨ç¤ºã•ã‚Œã‚‹ã“ã¨ã«æ³¨ç›®ã—ã¦ãã ã•ã„: + + ![New rows from CSV file](@site/docs/ja/images/quickstart_04.png) + +## 次ã¯ä½•ã‚’ã™ã¹ãã‹ï¼Ÿ + +- [ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«](/docs/ja/tutorial.md) ã§ã¯200万行ã®ãƒ‡ãƒ¼ã‚¿ã‚’テーブルã«æŒ¿å…¥ã—ã€åˆ†æžã‚¯ã‚¨ãƒªã‚’書ã体験をæä¾›ã—ã¾ã™ +- [例データセット](/docs/ja/getting-started/index.md) ã®ãƒªã‚¹ãƒˆã¨ã€ãれらを挿入ã™ã‚‹æ‰‹é †ãŒã‚ã‚Šã¾ã™ +- [ClickHouse ã®å§‹ã‚æ–¹](https://clickhouse.com/company/events/getting-started-with-clickhouse/)ã«é–¢ã™ã‚‹25分ã®ãƒ“デオをã”覧ãã ã•ã„ +- 外部ソースã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹å ´åˆã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚­ãƒ¥ãƒ¼ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãƒ‘イプラインãªã©ã¨ã®æŽ¥ç¶šæ–¹æ³•ã«ã¤ã„ã¦ã®[çµ±åˆã‚¬ã‚¤ãƒ‰ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](/docs/ja/integrations/index.mdx)ã‚’å‚ç…§ã—ã¦ãã ã•ã„ +- UI/BI å¯è¦–化ツールを使用ã—ã¦ã„ã‚‹å ´åˆã€[UI ã‚’ ClickHouse ã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¬ã‚¤ãƒ‰](/docs/ja/integrations/data-visualization.md) ã‚’å‚ç…§ã—ã¦ãã ã•ã„ +- 主キーã«é–¢ã™ã‚‹ã™ã¹ã¦ã®ã“ã¨ã‚’知るãŸã‚ã«ã¯ã€[主キーã«é–¢ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¬ã‚¤ãƒ‰](/docs/ja/guides/best-practices/sparse-primary-indexes.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„ diff --git a/docs/ja/get-started/query-endpoints.md b/docs/ja/get-started/query-endpoints.md new file mode 100644 index 00000000000..effcdf170f9 --- /dev/null +++ b/docs/ja/get-started/query-endpoints.md @@ -0,0 +1,500 @@ +--- +sidebar_title: クエリ API エンドãƒã‚¤ãƒ³ãƒˆ +slug: /ja/get-started/query-endpoints +description: ä¿å­˜ã—ãŸã‚¯ã‚¨ãƒªã‹ã‚‰ç°¡å˜ã«REST APIエンドãƒã‚¤ãƒ³ãƒˆã‚’ä½œæˆ +keywords: [api, query api endpoints, query endpoints, query rest api] +--- + +import BetaBadge from '@theme/badges/BetaBadge'; + +# クエリ API エンドãƒã‚¤ãƒ³ãƒˆ + + + +**クエリ API エンドãƒã‚¤ãƒ³ãƒˆ** 機能を使用ã™ã‚‹ã¨ã€ClickHouse Cloud コンソール内ã®ä»»æ„ã®ä¿å­˜ã—㟠SQL クエリã‹ã‚‰ç›´æŽ¥ API エンドãƒã‚¤ãƒ³ãƒˆã‚’作æˆã§ãã¾ã™ã€‚ãƒã‚¤ãƒ†ã‚£ãƒ–ドライãƒã‚’使ã£ã¦ClickHouse Cloudサービスã«æŽ¥ç¶šã›ãšã«ã€HTTP経由ã§APIエンドãƒã‚¤ãƒ³ãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦ä¿å­˜ã—ãŸã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +## クイックスタートガイド + +始ã‚ã‚‹å‰ã«ã€APIキーã¨ç®¡ç†ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã®ãƒ­ãƒ¼ãƒ«ã‚’確èªã—ã¦ãã ã•ã„。[APIキーを作æˆã™ã‚‹](/docs/ja/cloud/manage/openapi)方法ã«ã¤ã„ã¦ã¯ã“ã¡ã‚‰ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### ä¿å­˜ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’ä½œæˆ + +ã™ã§ã«ä¿å­˜ã•ã‚ŒãŸã‚¯ã‚¨ãƒªãŒã‚ã‚‹å ´åˆã€ã“ã®ã‚¹ãƒ†ãƒƒãƒ—をスキップã§ãã¾ã™ã€‚ + +æ–°ã—ã„クエリタブを開ãã¾ã™ã€‚デモンストレーションã®ãŸã‚ã«ã€ç´„45億レコードをå«ã‚€ [youtube データセット](/docs/ja/getting-started/example-datasets/youtube-dislikes) を使用ã—ã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå…¥åŠ›ã™ã‚‹ `year` パラメーターã«åŸºã¥ã„ã¦ã€ãƒ“デオã‚ãŸã‚Šã®å¹³å‡è¦–è´æ•°ã«ã‚ˆã‚‹ãƒˆãƒƒãƒ—10ã®ã‚¢ãƒƒãƒ—ローダーを返ã—ã¾ã™ï¼š + +```sql +with sum(view_count) as view_sum, + round(view_sum / num_uploads, 2) as per_upload +select + uploader, + count() as num_uploads, + formatReadableQuantity(view_sum) as total_views, + formatReadableQuantity(per_upload) as views_per_video +from + youtube +where + toYear(upload_date) = {year: UInt16} +group by uploader +order by per_upload desc +limit 10 +``` + +注æ„ã™ã¹ãã¯ã€ã“ã®ã‚¯ã‚¨ãƒªã¯ãƒ‘ラメーター(`year`)をå«ã‚“ã§ã„ã‚‹ã“ã¨ã§ã™ã€‚SQLコンソールã®ã‚¯ã‚¨ãƒªã‚¨ãƒ‡ã‚£ã‚¿ã¯ClickHouseã®ã‚¯ã‚¨ãƒªãƒ‘ラメーターå¼ã‚’自動的ã«æ¤œå‡ºã—ã€å„パラメーターã®å…¥åŠ›ã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªãŒæ©Ÿèƒ½ã™ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ãŸã‚ã«ã€é€Ÿã‚„ã‹ã«å®Ÿè¡Œã—ã¦ã¿ã¾ã—ょã†ï¼š + +![例クエリã®ãƒ†ã‚¹ãƒˆ](@site/docs/ja/cloud/images/sqlconsole/endpoints-testquery.png) + +次ã«ã€ã‚¯ã‚¨ãƒªã‚’ä¿å­˜ã—ã¾ã™ï¼š + +![例クエリã®ä¿å­˜](@site/docs/ja/cloud/images/sqlconsole/endpoints-savequery.png) + +ä¿å­˜ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã«é–¢ã™ã‚‹ã•ã‚‰ã«è©³ã—ã„ドキュメントã¯[ã“ã¡ã‚‰](/docs/ja/get-started/sql-console#saving-a-query)ã‹ã‚‰ç¢ºèªã§ãã¾ã™ã€‚ + +### クエリ API エンドãƒã‚¤ãƒ³ãƒˆã®è¨­å®š + +クエリ API エンドãƒã‚¤ãƒ³ãƒˆã¯ã€ã‚¯ã‚¨ãƒªãƒ“ューã‹ã‚‰ç›´æŽ¥ã€**共有** ボタンをクリックã—ã€`API Endpoint` ã‚’é¸æŠžã™ã‚‹ã“ã¨ã§è¨­å®šã§ãã¾ã™ã€‚ã©ã®APIキーãŒã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã‚ã‚‹ã‹ã‚’指定ã™ã‚‹ã‚ˆã†ãƒ—ロンプトãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + +![クエリエンドãƒã‚¤ãƒ³ãƒˆã®è¨­å®š](@site/docs/ja/cloud/images/sqlconsole/endpoints-configure.png) + +APIキーをé¸æŠžã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªAPIエンドãƒã‚¤ãƒ³ãƒˆãŒè‡ªå‹•çš„ã«è¨­å®šã•ã‚Œã¾ã™ã€‚テストリクエストをé€ä¿¡ã§ãるよã†ã«ä¾‹ã¨ã—㦠`curl` コマンドãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + +![エンドãƒã‚¤ãƒ³ãƒˆcurlコマンド](@site/docs/ja/cloud/images/sqlconsole/endpoints-completed.png) + +### クエリ API パラメーター + +クエリ内ã®ãƒ‘ラメーター㯠`{parameter_name: type}` ã®æ§‹æ–‡ã§æŒ‡å®šã§ãã¾ã™ã€‚ã“れらã®ãƒ‘ラメーターã¯è‡ªå‹•çš„ã«æ¤œå‡ºã•ã‚Œã€ä¾‹ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒšã‚¤ãƒ­ãƒ¼ãƒ‰ã«ã¯ã“れらã®ãƒ‘ラメーターを渡ã›ã‚‹ `queryVariables` オブジェクトãŒå«ã¾ã‚Œã¾ã™ã€‚ + +### テストã¨ç›£è¦– + +クエリ API エンドãƒã‚¤ãƒ³ãƒˆãŒä½œæˆã•ã‚ŒãŸã‚‰ã€`curl`ã‚„ä»–ã®HTTPクライアントを使ã£ã¦æ©Ÿèƒ½ã™ã‚‹ã“ã¨ã‚’確èªã§ãã¾ã™ï¼š +エンドãƒã‚¤ãƒ³ãƒˆcurlテスト + +最åˆã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã™ã‚‹ã¨ã€**共有** ボタンã®å³å´ã«æ–°ã—ã„ボタンãŒç›´ã¡ã«è¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ã€‚ã“れをクリックã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªã«é–¢ã™ã‚‹ç›£è¦–データをå«ã‚€ãƒ•ãƒ©ã‚¤ã‚¢ã‚¦ãƒˆãŒé–‹ãã¾ã™ï¼š + +![エンドãƒã‚¤ãƒ³ãƒˆç›£è¦–](@site/docs/ja/cloud/images/sqlconsole/endpoints-monitoring.png) + +## 実装ã®è©³ç´° + +### 説明 + +ã“ã®ãƒ«ãƒ¼ãƒˆã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã§ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ç•°ãªã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€ã‚¯ã‚¨ãƒªå¤‰æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚応答ã¯ã‚¹ãƒˆãƒªãƒ¼ãƒ ã¨ã—ã¦é€ä¿¡ (_ãƒãƒ¼ã‚¸ãƒ§ãƒ³2ã®ã¿_) ã§ãã‚‹ã‹ã€å˜ä¸€ã®ãƒšã‚¤ãƒ­ãƒ¼ãƒ‰ã¨ã—ã¦è¿”ã•ã‚Œã¾ã™ã€‚ + +### èªè¨¼ + +- **å¿…é ˆ**: ã¯ã„ +- **メソッド**: OpenAPIキー/シークレット経由ã®åŸºæœ¬èªè¨¼ +- **権é™**: クエリエンドãƒã‚¤ãƒ³ãƒˆã«å¯¾ã™ã‚‹é©åˆ‡ãªæ¨©é™ã‚’æŒã¤ + +### URL パラメーター + +- `queryEndpointId` (必須):実行ã™ã‚‹ã‚¯ã‚¨ãƒªã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã®ä¸€æ„ã®è­˜åˆ¥å­ã€‚ + +### クエリパラメーター + +#### V1 + +ãªã— + +#### V2 + +- `format` (任æ„):応答ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚ClickHouseãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’サãƒãƒ¼ãƒˆã€‚ +- `param_:name` クエリ内ã§ä½¿ç”¨ã™ã‚‹ã‚¯ã‚¨ãƒªå¤‰æ•°ã€‚`name`ã¯ã‚¯ã‚¨ãƒªå†…ã®å¤‰æ•°åã«ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚リクエストã®æœ¬æ–‡ãŒã‚¹ãƒˆãƒªãƒ¼ãƒ ã®å ´åˆã«ã®ã¿ä½¿ç”¨ã—ã¾ã™ã€‚ +- `:clickhouse_setting` ã©ã®[ClickHouse設定](https://clickhouse.com/docs/ja/operations/settings/settings)ã§ã‚‚クエリパラメーターã¨ã—ã¦æ¸¡ã™ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +### ヘッダー + +- `x-clickhouse-endpoint-version` (任æ„):クエリエンドãƒã‚¤ãƒ³ãƒˆã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯`1`ã¨`2`ã§ã™ã€‚æä¾›ã•ã‚Œãªã„å ´åˆã€ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã«å¯¾ã—ã¦æœ€å¾Œã«ä¿å­˜ã•ã‚ŒãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- `x-clickhouse-endpoint-upgrade` (任æ„):ã“ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’設定ã—ã¦ã€ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’アップグレードã—ã¾ã™ã€‚ã“ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã¯ `x-clickhouse-endpoint-version` ヘッダーã¨é€£æºã—ã¾ã™ã€‚ + +### リクエストボディ + +- `queryVariables` (任æ„):クエリ内ã§ä½¿ç”¨ã™ã‚‹å¤‰æ•°ã‚’å«ã‚€ã‚ªãƒ–ジェクト。 +- `format` (任æ„):応答ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚Query API エンドãƒã‚¤ãƒ³ãƒˆãŒãƒãƒ¼ã‚¸ãƒ§ãƒ³2ã®å ´åˆã€ClickHouseãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ä»»æ„ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒå¯èƒ½ã€‚v1ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ï¼š + - TabSeparated + - TabSeparatedWithNames + - TabSeparatedWithNamesAndTypes + - JSON + - JSONEachRow + - CSV + - CSVWithNames + - CSVWithNamesAndTypes + +### 応答 + +- **200 OK**: クエリãŒæ­£å¸¸ã«å®Ÿè¡Œã•ã‚ŒãŸã€‚ +- **400 Bad Request**: リクエストãŒä¸æ­£ã§ã‚ã£ãŸã€‚ +- **401 Unauthorized**: èªè¨¼ãªã—ã¾ãŸã¯æ¨©é™ãŒä¸å分ã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒè¡Œã‚ã‚ŒãŸã€‚ +- **404 Not Found**: 指定ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸã€‚ + +### エラーãƒãƒ³ãƒ‰ãƒªãƒ³ã‚° + +- リクエストã«æœ‰åŠ¹ãªèªè¨¼è³‡æ ¼æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +- `queryEndpointId` ãŠã‚ˆã³ `queryVariables` ãŒæ­£ã—ã„ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +- サーãƒãƒ¼ã‚¨ãƒ©ãƒ¼ã‚’é©åˆ‡ã«å‡¦ç†ã—ã€é©åˆ‡ãªã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’è¿”ã—ã¾ã™ã€‚ + +### エンドãƒã‚¤ãƒ³ãƒˆãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¢ãƒƒãƒ—グレード + +エンドãƒã‚¤ãƒ³ãƒˆãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’`v1`ã‹ã‚‰`v2`ã«ã‚¢ãƒƒãƒ—グレードã™ã‚‹ã«ã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã« `x-clickhouse-endpoint-upgrade` ヘッダーをå«ã‚ã€ãれを`1`ã«è¨­å®šã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã‚¢ãƒƒãƒ—グレードプロセスãŒãƒˆãƒªã‚¬ã•ã‚Œã€`v2`ã§åˆ©ç”¨å¯èƒ½ãªæ©Ÿèƒ½ã‚„改善点を使用ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +## 例 + +### 基本的ãªãƒªã‚¯ã‚¨ã‚¹ãƒˆ + +**クエリ API エンドãƒã‚¤ãƒ³ãƒˆ SQL:** + +```sql +SELECT database, name as num_tables FROM system.tables limit 3; +``` + +#### ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1 + +**cURL:** + +```bash +curl -X POST 'https://console-api.clickhouse.cloud/.api/query-endpoints//run' \ +--user '' \ +-H 'Content-Type: application/json' \ +-d '{ "format": "JSONEachRow" }' +``` + +**JavaScript:** + +```javascript +fetch( + "https://console-api.clickhouse.cloud/.api/query-endpoints//run", + { + method: "POST", + headers: { + Authorization: "Basic ", + "Content-Type": "application/json", + }, + body: JSON.stringify({ + format: "JSONEachRow", + }), + } +) + .then((response) => response.json()) + .then((data) => console.log(data)) + .catch((error) => console.error("Error:", error)); +``` + +**応答:** + +```json +{ + "data": { + "columns": [ + { + "name": "database", + "type": "String" + }, + { + "name": "num_tables", + "type": "String" + } + ], + "rows": [ + ["INFORMATION_SCHEMA", "COLUMNS"], + ["INFORMATION_SCHEMA", "KEY_COLUMN_USAGE"], + ["INFORMATION_SCHEMA", "REFERENTIAL_CONSTRAINTS"] + ] + } +} +``` + +#### ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 2 + +**cURL:** + +```bash +curl -X POST 'https://console-api.clickhouse.cloud/.api/query-endpoints//run?format=JSONEachRow' \ +--user '' \ +-H 'Content-Type: application/json' \ +-H 'x-clickhouse-endpoint-version: 2' +``` + +**JavaScript:** + +```javascript +fetch( + "https://console-api.clickhouse.cloud/.api/query-endpoints//run?format=JSONEachRow", + { + method: "POST", + headers: { + Authorization: "Basic ", + "Content-Type": "application/json", + "x-clickhouse-endpoint-version": "2", + }, + } +) + .then((response) => response.json()) + .then((data) => console.log(data)) + .catch((error) => console.error("Error:", error)); +``` + +**応答:** + +```application/x-ndjson +{"database":"INFORMATION_SCHEMA","num_tables":"COLUMNS"} +{"database":"INFORMATION_SCHEMA","num_tables":"KEY_COLUMN_USAGE"} +{"database":"INFORMATION_SCHEMA","num_tables":"REFERENTIAL_CONSTRAINTS"} +``` + +### クエリ変数を使用ã—ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆãŠã‚ˆã³JSONCompactEachRowフォーマットã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³2 + +**クエリ API エンドãƒã‚¤ãƒ³ãƒˆ SQL:** + +```sql +SELECT name, database FROM system.tables WHERE match(name, {tableNameRegex: String}) AND database = {database: String}; +``` + +**cURL:** + +```bash +curl -X POST 'https://console-api.clickhouse.cloud/.api/query-endpoints//run?format=JSONCompactEachRow' \ +--user '' \ +-H 'Content-Type: application/json' \ +-H 'x-clickhouse-endpoint-version: 2' \ +-d '{ "queryVariables": { "tableNameRegex": "query.*", "database": "system" } }' +``` + +**JavaScript:** + +```javascript +fetch( + "https://console-api.clickhouse.cloud/.api/query-endpoints//run?format=JSONCompactEachRow", + { + method: "POST", + headers: { + Authorization: "Basic ", + "Content-Type": "application/json", + "x-clickhouse-endpoint-version": "2", + }, + body: JSON.stringify({ + queryVariables: { + tableNameRegex: "query.*", + database: "system", + }, + }), + } +) + .then((response) => response.json()) + .then((data) => console.log(data)) + .catch((error) => console.error("Error:", error)); +``` + +**応答:** + +```application/x-ndjson +["query_cache", "system"] +["query_log", "system"] +["query_views_log", "system"] +``` + +### テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã‚¯ã‚¨ãƒªå¤‰æ•°å†…ã§é…列を使用ã—ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆ + +**テーブル SQL:** + +```SQL +CREATE TABLE default.t_arr +( + `arr` Array(Array(Array(UInt32))) +) +ENGINE = MergeTree +ORDER BY tuple() +``` + +**クエリ API エンドãƒã‚¤ãƒ³ãƒˆ SQL:** + +```sql + INSERT INTO default.t_arr VALUES ({arr: Array(Array(Array(UInt32)))}); +``` + +**cURL:** + +```bash +curl -X POST 'https://console-api.clickhouse.cloud/.api/query-endpoints//run' \ +--user '' \ +-H 'Content-Type: application/json' \ +-H 'x-clickhouse-endpoint-version: 2' \ +-d '{ + "queryVariables": { + "arr": [[[12, 13, 0, 1], [12]]] + } +}' +``` + +**JavaScript:** + +```javascript +fetch( + "https://console-api.clickhouse.cloud/.api/query-endpoints//run", + { + method: "POST", + headers: { + Authorization: "Basic ", + "Content-Type": "application/json", + "x-clickhouse-endpoint-version": "2", + }, + body: JSON.stringify({ + queryVariables: { + arr: [[[12, 13, 0, 1], [12]]], + }, + }), + } +) + .then((response) => response.json()) + .then((data) => console.log(data)) + .catch((error) => console.error("Error:", error)); +``` + +**応答:** + +```text +OK +``` + +### max_threads ã‚’8ã«ã‚»ãƒƒãƒˆã—ãŸClickHouse設定を使ã£ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆ + +**クエリ API エンドãƒã‚¤ãƒ³ãƒˆ SQL:** + +```sql +SELECT * from system.tables; +``` + +**cURL:** + +```bash +curl -X POST 'https://console-api.clickhouse.cloud/.api/query-endpoints//run?max_threads=8,' \ +--user '' \ +-H 'Content-Type: application/json' \ +-H 'x-clickhouse-endpoint-version: 2' \ +``` + +**JavaScript:** + +```javascript +fetch( + "https://console-api.clickhouse.cloud/.api/query-endpoints//run?max_threads=8", + { + method: "POST", + headers: { + Authorization: "Basic ", + "Content-Type": "application/json", + "x-clickhouse-endpoint-version": "2", + }, + } +) + .then((response) => response.json()) + .then((data) => console.log(data)) + .catch((error) => console.error("Error:", error)); +``` + +### ストリームã¨ã—ã¦ã®å¿œç­”をリクエストãŠã‚ˆã³è§£æž + +**クエリ API エンドãƒã‚¤ãƒ³ãƒˆ SQL:** + +```sql +SELECT name, database from system.tables; +``` + +**Typescript:** + +```typescript +async function fetchAndLogChunks( + url: string, + openApiKeyId: string, + openApiKeySecret: string +) { + const auth = Buffer.from(`${openApiKeyId}:${openApiKeySecret}`).toString( + "base64" + ); + + const headers = { + Authorization: `Basic ${auth}`, + "x-clickhouse-endpoint-version": "2", + }; + + const response = await fetch(url, { + headers, + method: "POST", + body: JSON.stringify({ format: "JSONEachRow" }), + }); + + if (!response.ok) { + console.error(`HTTP error! Status: ${response.status}`); + return; + } + + const reader = response.body as unknown as Readable; + reader.on("data", (chunk) => { + console.log(chunk.toString()); + }); + + reader.on("end", () => { + console.log("Stream ended."); + }); + + reader.on("error", (err) => { + console.error("Stream error:", err); + }); +} + +const endpointUrl = + "https://console-api.clickhouse.cloud/.api/query-endpoints//run?format=JSONEachRow"; +const openApiKeyId = ""; +const openApiKeySecret = ""; +// Usage example +fetchAndLogChunks(endpointUrl, openApiKeyId, openApiKeySecret).catch((err) => + console.error(err) +); +``` + +**出力** + +```shell +> npx tsx index.ts +> {"name":"COLUMNS","database":"INFORMATION_SCHEMA"} +> {"name":"KEY_COLUMN_USAGE","database":"INFORMATION_SCHEMA"} +... +> Stream ended. +``` + +### ファイルã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’挿入 + +以下ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã§ã€ãƒ•ã‚¡ã‚¤ãƒ« ./samples/my_first_table_2024-07-11.csv を作æˆã—ã¾ã™ï¼š + +```csv +"user_id","json","name" +"1","{""name"":""John"",""age"":30}","John" +"2","{""name"":""Jane"",""age"":25}","Jane" +``` + +**ãƒ†ãƒ¼ãƒ–ãƒ«ä½œæˆ SQL:** + +```sql +create table default.my_first_table +( + user_id String, + json String, + name String, +) ENGINE = MergeTree() +ORDER BY user_id; +``` + +**クエリ API エンドãƒã‚¤ãƒ³ãƒˆ SQL:** + +```sql +INSERT INTO default.my_first_table +``` + +**cURL:** + +```bash +cat ./samples/my_first_table_2024-07-11.csv | curl --user '' \ + -X POST \ + -H 'Content-Type: application/octet-stream' \ + -H 'x-clickhouse-endpoint-version: 2' \ + "https://console-api.clickhouse.cloud/.api/query-endpoints//run?format=CSV" \ + --data-binary @- +``` diff --git a/docs/ja/get-started/query-insights.md b/docs/ja/get-started/query-insights.md new file mode 100644 index 00000000000..bda1f39bba8 --- /dev/null +++ b/docs/ja/get-started/query-insights.md @@ -0,0 +1,47 @@ +--- +sidebar_title: クエリインサイト +slug: /ja/get-started/query-insights +description: system.query_logデータを視覚化ã—ã¦ã‚¯ã‚¨ãƒªã®ãƒ‡ãƒãƒƒã‚°ã¨ãƒ‘フォーマンス最é©åŒ–を簡素化 +keywords: [クエリインサイト, クエリログ, クエリログUI, system.query_logインサイト] +--- + +# クエリインサイト + +**クエリインサイト**機能ã¯ã€ã•ã¾ã–ã¾ãªè¦–覚化ã¨ãƒ†ãƒ¼ãƒ–ルを通ã˜ã¦ClickHouseã®çµ„ã¿è¾¼ã¿ã‚¯ã‚¨ãƒªãƒ­ã‚°ã‚’より使ã„ã‚„ã™ãã—ã¾ã™ã€‚ClickHouseã®`system.query_log`テーブルã¯ã€ã‚¯ã‚¨ãƒªã®æœ€é©åŒ–ã€ãƒ‡ãƒãƒƒã‚°ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å…¨ä½“ã®å¥åº·çŠ¶æ…‹ã¨ãƒ‘フォーマンスを監視ã™ã‚‹ãŸã‚ã®é‡è¦ãªæƒ…å ±æºã§ã™ã€‚ + +## ã‚¯ã‚¨ãƒªæ¦‚è¦ + +サービスをé¸æŠžã™ã‚‹ã¨ã€å·¦ã‚µã‚¤ãƒ‰ãƒãƒ¼ã®**モニタリング**ナビゲーション項目ãŒå±•é–‹ã•ã‚Œã€æ–°ãŸã«**クエリインサイト**ã®ã‚µãƒ–é …ç›®ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションをクリックã™ã‚‹ã¨ã€æ–°ã—ã„クエリインサイトページãŒé–‹ãã¾ã™ï¼š + +![クエリインサイトUI概è¦](@site/docs/ja/cloud/images/sqlconsole/insights_overview.png) + +## トップレベルメトリクス + +上部ã®çµ±è¨ˆãƒœãƒƒã‚¯ã‚¹ã¯ã€é¸æŠžã•ã‚ŒãŸæœŸé–“内ã®åŸºæœ¬çš„ãªãƒˆãƒƒãƒ—レベルクエリメトリクスを表ã—ã¦ã„ã¾ã™ã€‚ãã®ä¸‹ã«ã¯ã€ã‚¯ã‚¨ãƒªã®ç¨®é¡žï¼ˆselectã€insertã€ãã®ä»–)ã”ã¨ã«åˆ†è§£ã•ã‚ŒãŸã‚¯ã‚¨ãƒªãƒœãƒªãƒ¥ãƒ¼ãƒ ã€ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ã€ã‚¨ãƒ©ãƒ¼çŽ‡ã‚’示ã™3ã¤ã®æ™‚系列ãƒãƒ£ãƒ¼ãƒˆãŒã‚ã‚Šã¾ã™ã€‚レイテンシãƒãƒ£ãƒ¼ãƒˆã¯ã€p50ã€p90ã€ãŠã‚ˆã³p99レイテンシを表示ã™ã‚‹ã‚ˆã†ã«ã•ã‚‰ã«èª¿æ•´ã§ãã¾ã™ï¼š + +![クエリインサイトUIレイテンシãƒãƒ£ãƒ¼ãƒˆ](@site/docs/ja/cloud/images/sqlconsole/insights_latency.png) + +## 最近ã®ã‚¯ã‚¨ãƒª + +トップレベルメトリクスã®ä¸‹ã«ã¯ã€æŒ‡å®šã•ã‚ŒãŸæœŸé–“内ã«ãƒŽãƒ¼ãƒžãƒ©ã‚¤ã‚ºã•ã‚ŒãŸã‚¯ã‚¨ãƒªãƒãƒƒã‚·ãƒ¥ã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚ŒãŸã‚¯ã‚¨ãƒªãƒ­ã‚°ã‚¨ãƒ³ãƒˆãƒªãŒè¡¨ç¤ºã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚Šã¾ã™ï¼š + +![クエリインサイトUI最近ã®ã‚¯ã‚¨ãƒªãƒ†ãƒ¼ãƒ–ル](@site/docs/ja/cloud/images/sqlconsole/insights_recent.png) + +最近ã®ã‚¯ã‚¨ãƒªã¯ã€åˆ©ç”¨å¯èƒ½ãªãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ãŠã‚ˆã³ã‚½ãƒ¼ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã¾ãŸã€ãƒ†ãƒ¼ãƒ–ルã¯ã€ãƒ†ãƒ¼ãƒ–ルã€p90ã€ãŠã‚ˆã³p99レイテンシãªã©ã®è¿½åŠ ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’表示ã¾ãŸã¯éžè¡¨ç¤ºã«ã™ã‚‹ã‚ˆã†ã«æ§‹æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## クエリ詳細表示 + +最近ã®ã‚¯ã‚¨ãƒªãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã‚¯ã‚¨ãƒªã‚’é¸æŠžã™ã‚‹ã¨ã€é¸æŠžã•ã‚ŒãŸã‚¯ã‚¨ãƒªã«ç‰¹æœ‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¨æƒ…報をå«ã‚€ãƒ•ãƒ©ã‚¤ã‚¢ã‚¦ãƒˆãŒé–‹ãã¾ã™ï¼š + +![クエリインサイトUIクエリ詳細表示](@site/docs/ja/cloud/images/sqlconsole/insights_drilldown.png) + +ã“ã®ãƒ•ãƒ©ã‚¤ã‚¢ã‚¦ãƒˆã‹ã‚‰ã‚ã‹ã‚‹ã‚ˆã†ã«ã€ã“ã®ç‰¹å®šã®ã‚¯ã‚¨ãƒªã¯éŽåŽ»24時間ã§3000回以上実行ã•ã‚Œã¦ã„ã¾ã™ã€‚**クエリ情報**タブã®ã™ã¹ã¦ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯é›†è¨ˆã•ã‚ŒãŸãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã™ãŒã€**クエリ履歴**タブをé¸æŠžã™ã‚‹ã“ã¨ã§å€‹ã€…ã®å®Ÿè¡Œã‹ã‚‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚‚表示ã§ãã¾ã™ï¼š + +クエリインサイトUIクエリ情報 + +
+ +ã“ã®ãƒšã‚¤ãƒ³ã‹ã‚‰ã€å„クエリ実行ã®`設定`ãŠã‚ˆã³`プロファイルイベント`項目を展開ã—ã¦ã€è¿½åŠ æƒ…報を表示ã§ãã¾ã™ã€‚ diff --git a/docs/ja/get-started/sql-console.md b/docs/ja/get-started/sql-console.md new file mode 100644 index 00000000000..bd87dfdb487 --- /dev/null +++ b/docs/ja/get-started/sql-console.md @@ -0,0 +1,290 @@ +--- +sidebar_title: SQLコンソール +slug: /ja/get-started/sql-console +description: SQLコンソールを使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã—ã€ãƒ“ジュアライゼーションを作æˆã—ã¾ã™ã€‚ +keywords: [sqlコンソール, sqlクライアント, クラウドコンソール, コンソール] +--- +# SQLコンソール + +SQLコンソールã¯ã€ClickHouse Cloudã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’探索ã—クエリを実行ã™ã‚‹ãŸã‚ã®æœ€é€Ÿã‹ã¤æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã§ã™ã€‚SQLコンソールを使用ã—ã¦ä»¥ä¸‹ã®ã“ã¨ãŒå¯èƒ½ã§ã™ï¼š +- ClickHouse Cloudサービスã«æŽ¥ç¶š +- テーブルデータã®è¡¨ç¤ºã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã€ä¸¦ã¹æ›¿ãˆ +- クエリを実行ã—ã€æ•°ã‚¯ãƒªãƒƒã‚¯ã§çµæžœãƒ‡ãƒ¼ã‚¿ã‚’å¯è¦–化 +- ãƒãƒ¼ãƒ ãƒ¡ãƒ³ãƒãƒ¼ã¨ã‚¯ã‚¨ãƒªã‚’共有ã—ã€ã‚ˆã‚ŠåŠ¹æžœçš„ã«ã‚³ãƒ©ãƒœãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ + +## コントロールプレーンã‹ã‚‰SQLコンソールを開ã + +SQLコンソールã¯ã‚µãƒ¼ãƒ“ス概è¦ç”»é¢ã‹ã‚‰ç›´æŽ¥é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚「接続ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã€ã€ŒSQLコンソールを開ãã€ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![サービスã‹ã‚‰SQLコンソールを開ã](@site/docs/ja/cloud/images/sqlconsole/open-sql-console-from-service.png) + +SQLコンソールã¯æ–°ã—ã„タブã§é–‹ãã€ã‚µãƒ¼ãƒ“スèªè¨¼æƒ…å ±ã®å…¥åŠ›ã‚’求ã‚られã¾ã™ï¼š + + ![èªè¨¼æƒ…報を入力](@site/docs/ja/cloud/images/sqlconsole/enter-credentials.png) + +èªè¨¼æƒ…報を入力後ã€ã€ŒæŽ¥ç¶šã€ã‚’クリックã™ã‚‹ã¨ã€SQLコンソールãŒæŽ¥ç¶šã¨èªè¨¼ã‚’試ã¿ã¾ã™ã€‚æˆåŠŸã™ã‚‹ã¨ã€SQLコンソールã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + + ![èªè¨¼æˆåŠŸ](@site/docs/ja/cloud/images/sqlconsole/authentication-success.png) + +## 直接SQLコンソールを読ã¿è¾¼ã‚€ + +SQLコンソール㯠https://console.clickhouse.cloud ã‹ã‚‰ç›´æŽ¥é–‹ãã“ã¨ã‚‚ã§ãã¾ã™ã€‚ClickHouse Cloudアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒ“ス一覧ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚1ã¤é¸æŠžã—ã€ã‚µãƒ¼ãƒ“スèªè¨¼ç”»é¢ã§ã‚µãƒ¼ãƒ“スèªè¨¼æƒ…報を入力ã—ã¾ã™ï¼š + + ![サービスをé¸æŠž](@site/docs/ja/cloud/images/sqlconsole/select-a-service.png) + +:::note +組織内ã«1ã¤ã®ã‚µãƒ¼ãƒ“スã—ã‹å­˜åœ¨ã—ãªã„å ´åˆã€SQLコンソールã¯ç›´ã¡ã«ã‚µãƒ¼ãƒ“スèªè¨¼ç”»é¢ã¸ç§»å‹•ã—ã¾ã™ã€‚ +::: + +## サービススイッãƒãƒ£ãƒ¼ã‚’使用ã™ã‚‹ + +SQLコンソールã‹ã‚‰ç›´æŽ¥ä»–ã®ã‚µãƒ¼ãƒ“スã«ç°¡å˜ã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚コンソールã®å³ä¸Šéš…ã«ã‚るサービススイッãƒãƒ£ãƒ¼ã‚’é–‹ãã€åˆ¥ã®ã‚µãƒ¼ãƒ“スをé¸æŠžã—ã¾ã™ï¼š + + ![サービスを切り替ãˆã‚‹](@site/docs/ja/cloud/images/sqlconsole/switch-services.png) + +### テーブルを探索ã™ã‚‹ + +### テーブルリストã¨ã‚¹ã‚­ãƒ¼ãƒžæƒ…å ±ã®è¡¨ç¤º + +ClickHouseインスタンスã«å«ã¾ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã®æ¦‚è¦ã¯å·¦ã®ã‚µã‚¤ãƒ‰ãƒãƒ¼ã«ã‚ã‚Šã¾ã™ã€‚å·¦ãƒãƒ¼ã®ä¸Šéƒ¨ã«ã‚るデータベースセレクターを使用ã—ã¦ã€ç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ãƒ†ãƒ¼ãƒ–ルを表示ã—ã¾ã™ + + ![テーブルリストã¨ã‚¹ã‚­ãƒ¼ãƒž](@site/docs/ja/cloud/images/sqlconsole/table-list-and-schema.png) + +リストã®ãƒ†ãƒ¼ãƒ–ルã¯å±•é–‹ã—ã¦ã‚«ãƒ©ãƒ ã¨ã‚¿ã‚¤ãƒ—を表示ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ + + ![カラムを表示](@site/docs/ja/cloud/images/sqlconsole/view-columns.png) + +### テーブルデータを探索ã™ã‚‹ + +リストã®ãƒ†ãƒ¼ãƒ–ルをクリックã™ã‚‹ã¨ã€æ–°ã—ã„タブã§é–‹ãã¾ã™ã€‚テーブルビューã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’ç°¡å˜ã«è¡¨ç¤ºã€é¸æŠžã€ã‚³ãƒ”ーã§ãã¾ã™ã€‚Microsoft Excelã‚„Google Sheetsãªã©ã®ã‚¹ãƒ—レッドシートアプリケーションã«ã‚³ãƒ”ー貼り付ã‘ã™ã‚‹éš›ã«ã€æ§‹é€ ã‚„フォーマットãŒä¿æŒã•ã‚Œã¾ã™ã€‚フッターã®ãƒŠãƒ“ゲーションを使用ã—ã¦ã€ãƒ†ãƒ¼ãƒ–ルデータã®ãƒšãƒ¼ã‚¸ã‚’(30è¡Œã”ã¨ã®ãƒšãƒ¼ã‚¸ãƒãƒ¼ã‚·ãƒ§ãƒ³ã§ï¼‰åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + ![abc](@site/docs/ja/cloud/images/sqlconsole/abc.png) + +### セルデータã®æ¤œæŸ» + +セルインスペクターツールを使用ã—ã¦ã€å˜ä¸€ã®ã‚»ãƒ«ã«å«ã¾ã‚Œã‚‹å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’表示ã§ãã¾ã™ã€‚セルをå³ã‚¯ãƒªãƒƒã‚¯ã—ã€ã€Œã‚»ãƒ«ã‚’検査ã€ã‚’é¸æŠžã—ã¦é–‹ãã¾ã™ã€‚インスペクターã®å†…容ã¯ã€å³ä¸Šéš…ã®ã‚³ãƒ”ーアイコンをクリックã—ã¦ã‚³ãƒ”ーã§ãã¾ã™ã€‚ + + ![セル内容ã®æ¤œæŸ»](@site/docs/ja/cloud/images/sqlconsole/inspecting-cell-content.png) + +## テーブルã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¨ä¸¦ã¹æ›¿ãˆ + +### テーブルã®ä¸¦ã¹æ›¿ãˆ + +SQLコンソールã§ãƒ†ãƒ¼ãƒ–ルを並ã¹æ›¿ãˆã‚‹ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルを開ã„ã¦ãƒ„ールãƒãƒ¼ã®ã€Œä¸¦ã¹æ›¿ãˆã€ãƒœã‚¿ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚ã“ã®ãƒœã‚¿ãƒ³ã¯ã€ä¸¦ã¹æ›¿ãˆã‚’設定ã™ã‚‹ãŸã‚ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’é–‹ãã¾ã™ã€‚ã©ã®ã‚«ãƒ©ãƒ ã§ä¸¦ã¹æ›¿ãˆã‚‹ã‹ã‚’é¸æŠžã—ã€ä¸¦ã¹æ›¿ãˆã®é †åºï¼ˆæ˜‡é †ã¾ãŸã¯é™é †ï¼‰ã‚’設定ã§ãã¾ã™ã€‚「é©ç”¨ã€ã‚’é¸æŠžã™ã‚‹ã‹ã€Enterキーを押ã—ã¦ãƒ†ãƒ¼ãƒ–ルを並ã¹æ›¿ãˆã¾ã™ã€‚ + + ![カラムã§é™é †ã«ä¸¦ã¹æ›¿ãˆã‚‹](@site/docs/ja/cloud/images/sqlconsole/sort-descending-on-column.png) + +SQLコンソールã§ã¯ã€è¤‡æ•°ã®ä¸¦ã¹æ›¿ãˆã‚’テーブルã«è¿½åŠ ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚「並ã¹æ›¿ãˆã€ãƒœã‚¿ãƒ³ã‚’å†åº¦ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã€åˆ¥ã®ä¸¦ã¹æ›¿ãˆã‚’追加ã—ã¾ã™ã€‚注æ„:並ã¹æ›¿ãˆã¯ã€ä¸¦ã¹æ›¿ãˆãƒšã‚¤ãƒ³ã§è¡¨ç¤ºã•ã‚Œã‚‹é †åºï¼ˆä¸Šã‹ã‚‰ä¸‹ï¼‰ã§é©ç”¨ã•ã‚Œã¾ã™ã€‚並ã¹æ›¿ãˆã‚’削除ã™ã‚‹ã«ã¯ã€ä¸¦ã¹æ›¿ãˆã®éš£ã«ã‚る「xã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚ + +### テーブルã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚° + +SQLコンソールã§ãƒ†ãƒ¼ãƒ–ルをフィルタリングã™ã‚‹ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルを開ã„ã¦ã€Œãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã€ãƒœã‚¿ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚並ã¹æ›¿ãˆã¨åŒæ§˜ã«ã€ã“ã®ãƒœã‚¿ãƒ³ã¯ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’設定ã™ã‚‹ãŸã‚ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’é–‹ãã¾ã™ã€‚ã©ã®ã‚«ãƒ©ãƒ ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‹ã‚’é¸æŠžã—ã€å¿…è¦ãªæ¡ä»¶ã‚’設定ã—ã¾ã™ã€‚SQLコンソールã¯ã€ã‚«ãƒ©ãƒ ã«å«ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®ã‚¿ã‚¤ãƒ—ã«å¯¾å¿œã™ã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚ªãƒ—ションをインテリジェントã«è¡¨ç¤ºã—ã¾ã™ã€‚ + + ![GSMã«ç­‰ã—ã„ラジオカラムã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°](@site/docs/ja/cloud/images/sqlconsole/filter-on-radio-column-equal-gsm.png) + +フィルターã«æº€è¶³ã—ãŸã‚‰ã€ã€Œé©ç”¨ã€ã‚’é¸æŠžã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’フィルタリングã—ã¾ã™ã€‚以下ã®ã‚ˆã†ã«è¿½åŠ ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚‚追加ã§ãã¾ã™ã€‚ + + ![2000より大ãã„範囲ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’追加](@site/docs/ja/cloud/images/sqlconsole/add-more-filters.png) + +並ã¹æ›¿ãˆæ©Ÿèƒ½ã¨åŒæ§˜ã«ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã®éš£ã«ã‚る「xã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’削除ã—ã¾ã™ã€‚ + +### フィルタリングã¨ä¸¦ã¹æ›¿ãˆã‚’åŒæ™‚ã«è¡Œã† + +SQLコンソールã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルをフィルタリングã¨ä¸¦ã¹æ›¿ãˆã‚’åŒæ™‚ã«è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚上記ã®æ‰‹é †ã‚’使用ã—ã¦ã€ã™ã¹ã¦ã®å¿…è¦ãªãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¨ä¸¦ã¹æ›¿ãˆã‚’追加ã—ã€ã€Œé©ç”¨ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚ + + ![フィルタリングã¨ä¸¦ã¹æ›¿ãˆã‚’åŒæ™‚ã«è¡Œã†](@site/docs/ja/cloud/images/sqlconsole/filtering-and-sorting-together.png) + +### フィルターã¨ä¸¦ã¹æ›¿ãˆã‹ã‚‰ã‚¯ã‚¨ãƒªã‚’作æˆã™ã‚‹ + +SQLコンソールã¯ã€ä¸¦ã¹æ›¿ãˆã¨ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’クリック1ã¤ã§ç›´æŽ¥ã‚¯ã‚¨ãƒªã«å¤‰æ›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ツールãƒãƒ¼ã‹ã‚‰ä¸¦ã¹æ›¿ãˆã¨ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ãƒ‘ラメータをé¸ã‚“ã§ã€Œã‚¯ã‚¨ãƒªã‚’作æˆã€ãƒœã‚¿ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚「クエリを作æˆã€ã‚’クリックã™ã‚‹ã¨ã€æ–°ã—ã„クエリタブãŒé–‹ãã€ãƒ†ãƒ¼ãƒ–ルビューã«å«ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã«å¯¾å¿œã™ã‚‹SQLコマンドãŒäº‹å‰å…¥åŠ›ã•ã‚Œã¾ã™ã€‚ + + ![並ã¹æ›¿ãˆã¨ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‹ã‚‰ã‚¯ã‚¨ãƒªã‚’作æˆã™ã‚‹](@site/docs/ja/cloud/images/sqlconsole/create-a-query-from-sorts-and-filters.png) + +:::note +「クエリを作æˆã€æ©Ÿèƒ½ã‚’使用ã™ã‚‹éš›ã«ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¨ä¸¦ã¹æ›¿ãˆã¯å¿…é ˆã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +クエリã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€(link) クエリドキュメンテーションをå‚ç…§ã—ã¦ãã ã•ã„。 + +## クエリã®ä½œæˆã¨å®Ÿè¡Œ + +### クエリã®ä½œæˆ + +SQLコンソールã§æ–°ã—ã„クエリを作æˆã™ã‚‹æ–¹æ³•ã¯2ã¤ã‚ã‚Šã¾ã™ã€‚ +* タブãƒãƒ¼ã®ã€Œ+ã€ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ +* 左サイドãƒãƒ¼ã®ã‚¯ã‚¨ãƒªãƒªã‚¹ãƒˆã‹ã‚‰ã€Œæ–°ã—ã„クエリã€ãƒœã‚¿ãƒ³ã‚’é¸æŠžã™ã‚‹ + + ![クエリã®ä½œæˆ](@site/docs/ja/cloud/images/sqlconsole/creating-a-query.png) + +### クエリã®å®Ÿè¡Œ + +クエリを実行ã™ã‚‹ã«ã¯ã€SQLエディタã«SQLコマンドを入力ã—ã¦ã€Œå®Ÿè¡Œã€ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã‹ã€ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆ `cmd / ctrl + enter` を使用ã—ã¾ã™ã€‚複数ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’順次書ãã€å®Ÿè¡Œã™ã‚‹ã«ã¯ã€å„コマンドã®å¾Œã«ã‚»ãƒŸã‚³ãƒ­ãƒ³ã‚’追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +クエリ実行オプション +デフォルトã§ã¯ã€ã€Œå®Ÿè¡Œã€ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨SQLエディタã«å«ã¾ã‚Œã‚‹ã™ã¹ã¦ã®ã‚³ãƒžãƒ³ãƒ‰ãŒå®Ÿè¡Œã•ã‚Œã¾ã™ã€‚SQLコンソールã¯ä»–ã«2ã¤ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚ªãƒ—ションをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š +* é¸æŠžã—ãŸã‚³ãƒžãƒ³ãƒ‰ã‚’実行 +* カーソルä½ç½®ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行 + +é¸æŠžã—ãŸã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã«ã¯ã€ç›®çš„ã®ã‚³ãƒžãƒ³ãƒ‰ã¾ãŸã¯ã‚³ãƒžãƒ³ãƒ‰ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’ãƒã‚¤ãƒ©ã‚¤ãƒˆã—ã€ã€Œå®Ÿè¡Œã€ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ï¼ˆã¾ãŸã¯ `cmd / ctrl + enter` ショートカットを使用ã™ã‚‹ï¼‰ã€‚é¸æŠžãŒå­˜åœ¨ã™ã‚‹å ´åˆã€SQLエディタã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ï¼ˆã‚¨ãƒ‡ã‚£ã‚¿å†…ã®ä»»æ„ã®å ´æ‰€ã‚’å³ã‚¯ãƒªãƒƒã‚¯ã—ã¦é–‹ã)ã‹ã‚‰ã€Œé¸æŠžã—ãŸã‚‚ã®ã‚’実行ã€ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + ![é¸æŠžã—ãŸã‚¯ã‚¨ãƒªã‚’実行](@site/docs/ja/cloud/images/sqlconsole/run-selected-query.png) + +ç¾åœ¨ã®ã‚«ãƒ¼ã‚½ãƒ«ä½ç½®ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®2ã¤ã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™ï¼š +* 拡張実行オプションメニューã‹ã‚‰ã€Œã‚«ãƒ¼ã‚½ãƒ«ã§ã€ã‚’é¸æŠžã™ã‚‹ï¼ˆã¾ãŸã¯å¯¾å¿œã™ã‚‹ `cmd / ctrl + shift + enter` キーボードショートカットを使用ã™ã‚‹ + + ![カーソルã§ã®å®Ÿè¡Œ](@site/docs/ja/cloud/images/sqlconsole/run-at-cursor-2.png) + + * SQLエディタã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ã€Œã‚«ãƒ¼ã‚½ãƒ«ã§å®Ÿè¡Œã€ã‚’é¸æŠžã™ã‚‹ + + ![カーソルã§ã®å®Ÿè¡Œ](@site/docs/ja/cloud/images/sqlconsole/run-at-cursor.png) + +:::note +カーソルä½ç½®ã«ã‚るコマンドã¯ã€å®Ÿè¡Œæ™‚ã«é»„色ã§ç‚¹æ»…ã—ã¾ã™ã€‚ +::: + +### クエリã®ã‚­ãƒ£ãƒ³ã‚»ãƒ« + +クエリを実行中ã«ã€ã‚¯ã‚¨ãƒªã‚¨ãƒ‡ã‚£ã‚¿ã®ãƒ„ールãƒãƒ¼ã®ã€Œå®Ÿè¡Œã€ãƒœã‚¿ãƒ³ãŒã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€ãƒœã‚¿ãƒ³ã«ç½®ãæ›ã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã‹ã€`Esc` を押ã—ã¦ã‚¯ã‚¨ãƒªã‚’キャンセルã—ã¾ã™ã€‚注æ„:キャンセル後もã™ã§ã«è¿”ã•ã‚ŒãŸçµæžœã¯ä¿æŒã•ã‚Œã¾ã™ã€‚ + + ![クエリをキャンセル](@site/docs/ja/cloud/images/sqlconsole/cancel-a-query.png) + +### クエリã®ä¿å­˜ + +クエリをä¿å­˜ã™ã‚‹ã“ã¨ã§ã€å¾Œã‹ã‚‰ç°¡å˜ã«è¦‹ã¤ã‘ãŸã‚Šã€ãƒãƒ¼ãƒ ãƒ¡ãƒ³ãƒãƒ¼ã¨å…±æœ‰ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚SQLコンソールã§ã¯ã‚¯ã‚¨ãƒªã‚’フォルダã«æ•´ç†ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +クエリをä¿å­˜ã™ã‚‹ã«ã¯ã€ãƒ„ールãƒãƒ¼ã®ã€Œå®Ÿè¡Œã€ãƒœã‚¿ãƒ³ã®å³ã«ã‚る「ä¿å­˜ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã€ç›®çš„ã®åå‰ã‚’入力ã—ã¦ã€Œã‚¯ã‚¨ãƒªã‚’ä¿å­˜ã€ã‚’クリックã—ã¾ã™ã€‚ + +:::note +ショートカット `cmd / ctrl + s` を使用ã™ã‚‹ã“ã¨ã§ã‚‚ã€ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã‚¿ãƒ–ã§ã®ä½œæ¥­ã¯ä¿å­˜ã•ã‚Œã¾ã™ã€‚ +::: + +![クエリをä¿å­˜](../images/sql-console-save-query.png) + +ã¾ãŸã€ã€Œç„¡é¡Œã®ã‚¯ã‚¨ãƒªã€ã‚’クリックã—ã¦åå‰ã‚’設定ã—ã€Enterキーを押ã™ã“ã¨ã§ã€ã‚¯ã‚¨ãƒªã®åŒæ™‚命åã¨ä¿å­˜ã‚’è¡Œã†ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +![クエリをリãƒãƒ¼ãƒ ](../images/sql-console-rename.png) + +### クエリã®å…±æœ‰ + +SQLコンソールã¯ã€ã‚¯ã‚¨ãƒªã‚’ãƒãƒ¼ãƒ ãƒ¡ãƒ³ãƒãƒ¼ã¨ç°¡å˜ã«å…±æœ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚SQLコンソールã¯4ã¤ã®ã‚¢ã‚¯ã‚»ã‚¹ãƒ¬ãƒ™ãƒ«ã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ã“れらã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã«ã‚‚個別ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã”ã¨ã«ã‚‚調整å¯èƒ½ã§ã™ï¼š + +- 所有者(共有オプションを調整å¯èƒ½ï¼‰ +- 書ãè¾¼ã¿ã‚¢ã‚¯ã‚»ã‚¹ +- 読ã¿å–り専用アクセス +- アクセスãªã— + +クエリをä¿å­˜ã—ãŸå¾Œã€ãƒ„ールãƒãƒ¼ã®ã€Œå…±æœ‰ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚共有オプションãŒè¡¨ç¤ºã•ã‚Œã‚‹ãƒ¢ãƒ¼ãƒ€ãƒ«ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + +![クエリを共有](../images/sql-console-share.png) + +サービスã«ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãªã™ã¹ã¦ã®çµ„織メンãƒãƒ¼ã®ã‚¯ã‚¨ãƒªã‚¢ã‚¯ã‚»ã‚¹ã‚’調整ã™ã‚‹ã«ã¯ã€ãƒˆãƒƒãƒ—ラインã®ã‚¢ã‚¯ã‚»ã‚¹ãƒ¬ãƒ™ãƒ«ã‚»ãƒ¬ã‚¯ã‚¿ã‚’調整ã—ã¾ã™ï¼š + +![アクセスを編集](../images/sql-console-edit-access.png) + +上記をé©ç”¨ã™ã‚‹ã¨ã€SQLコンソールã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æŒã¤ã™ã¹ã¦ã®ãƒãƒ¼ãƒ ãƒ¡ãƒ³ãƒãƒ¼ã¯ã‚¯ã‚¨ãƒªã‚’表示(ãŠã‚ˆã³å®Ÿè¡Œï¼‰ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +特定ã®ãƒ¡ãƒ³ãƒãƒ¼ã®ã‚¯ã‚¨ãƒªã‚¢ã‚¯ã‚»ã‚¹ã‚’調整ã™ã‚‹ã«ã¯ã€ã€Œãƒãƒ¼ãƒ ãƒ¡ãƒ³ãƒãƒ¼ã‚’追加ã€ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã‹ã‚‰ç›®çš„ã®ãƒãƒ¼ãƒ ãƒ¡ãƒ³ãƒãƒ¼ã‚’é¸æŠžã—ã¾ã™ï¼š + +![ãƒãƒ¼ãƒ ãƒ¡ãƒ³ãƒãƒ¼ã‚’追加](../images/sql-console-add-team.png) + +ãƒãƒ¼ãƒ ãƒ¡ãƒ³ãƒãƒ¼ã‚’é¸æŠžã™ã‚‹ã¨ã€ã‚¢ã‚¯ã‚»ã‚¹ãƒ¬ãƒ™ãƒ«ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ãŒè¡¨ç¤ºã•ã‚ŒãŸæ–°ã—ã„ラインアイテムãŒå‡ºç¾ã—ã¾ã™ï¼š + +![ãƒãƒ¼ãƒ ãƒ¡ãƒ³ãƒãƒ¼ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’編集](../images/sql-console-edit-member.png) + +### 共有ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ + +クエリãŒå…±æœ‰ã•ã‚ŒãŸå ´åˆã€ãã‚Œã¯SQLコンソール左サイドãƒãƒ¼ã®ã€Œã‚¯ã‚¨ãƒªã€ã‚¿ãƒ–ã«è¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + +![クエリã«ã‚¢ã‚¯ã‚»ã‚¹](../images/sql-console-access-queries.png) + +### クエリã¸ã®ãƒªãƒ³ã‚¯ï¼ˆãƒ‘ーマリンク) + +ä¿å­˜ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã¯ãƒ‘ーマリンクã•ã‚Œã¦ãŠã‚Šã€å…±æœ‰ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã¸ã®ãƒªãƒ³ã‚¯ã‚’é€ä¿¡ãŠã‚ˆã³å—ä¿¡ã—ã€ç›´æŽ¥é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +クエリã«ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ä»»æ„ã®ãƒ‘ラメーターã®å€¤ã¯ã€ä¿å­˜ã•ã‚ŒãŸã‚¯ã‚¨ãƒªURLã«ã‚¯ã‚¨ãƒªãƒ‘ラメータã¨ã—ã¦è‡ªå‹•çš„ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€ã‚¯ã‚¨ãƒªã« `{start_date: Date}` 㨠`{end_date: Date}` パラメーターãŒå«ã¾ã‚Œã‚‹å ´åˆã€ãƒ‘ーマリンクã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š`https://console.clickhouse.cloud/services/:serviceId/console/query/:queryId?param_start_date=2015-01-01¶m_end_date=2016-01-01`。 + +## 高度ãªã‚¯ã‚¨ãƒªæ©Ÿèƒ½ + +### クエリçµæžœã‚’検索ã™ã‚‹ + +クエリãŒå®Ÿè¡Œã•ã‚ŒãŸå¾Œã€çµæžœãƒšã‚¤ãƒ³ã®æ¤œç´¢å…¥åŠ›ã‚’使用ã—ã¦è¿”ã•ã‚ŒãŸçµæžœã‚»ãƒƒãƒˆã‚’ç´ æ—©ã検索ã§ãã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã€è¿½åŠ ã® `WHERE` å¥ã®çµæžœã‚’プレビューã—ãŸã‚Šã€ç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿ãŒçµæžœã‚»ãƒƒãƒˆã«å«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ãŸã‚Šã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚検索入力ã«å€¤ã‚’入力ã—ãŸå¾Œã€çµæžœãƒšã‚¤ãƒ³ãŒæ›´æ–°ã•ã‚Œã€å…¥åŠ›ã—ãŸå€¤ã«ä¸€è‡´ã™ã‚‹ã‚¨ãƒ³ãƒˆãƒªã‚’å«ã‚€ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¿”ã•ã‚Œã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€ClickHouseリãƒã‚¸ãƒˆãƒªã® `github_events` テーブル㧠`alexey-milovidov` ã®ã™ã¹ã¦ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’探ã—ã¾ã™ï¼š + + ![GitHubデータを検索](@site/docs/ja/cloud/images/sqlconsole/search-github.png) + +注æ„:入力ã—ãŸå€¤ã«ä¸€è‡´ã™ã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯ã™ã¹ã¦è¿”ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€ä¸Šè¨˜ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã®3番目ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯ã€`actor_login` フィールドã§ã€Œalexey-milovidovã€ã¨ä¸€è‡´ã—ã¾ã›ã‚“ãŒã€`body` フィールドã§ä¸€è‡´ã—ã¾ã™ï¼š + + ![ボディã§ã®ä¸€è‡´](@site/docs/ja/cloud/images/sqlconsole/match-in-body.png) + +### ページãƒãƒ¼ã‚·ãƒ§ãƒ³è¨­å®šã®èª¿æ•´ + +デフォルトã§ã¯ã€ã‚¯ã‚¨ãƒªçµæžœãƒšã‚¤ãƒ³ã¯ã™ã¹ã¦ã®çµæžœãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’å˜ä¸€ã®ãƒšãƒ¼ã‚¸ã«è¡¨ç¤ºã—ã¾ã™ã€‚より大ããªçµæžœã‚»ãƒƒãƒˆã®ãŸã‚ã«ã¯ã€çµæžœã‚’ページãƒãƒ¼ã‚·ãƒ§ãƒ³ã§è¡¨ç¤ºã™ã‚‹æ–¹ãŒè¦‹ã‚„ã™ã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€çµæžœãƒšã‚¤ãƒ³ã®å³ä¸‹éš…ã«ã‚るページãƒãƒ¼ã‚·ãƒ§ãƒ³ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã§å¯èƒ½ã§ã™ï¼š + ![ページãƒãƒ¼ã‚·ãƒ§ãƒ³ã‚ªãƒ—ション](@site/docs/ja/cloud/images/sqlconsole/pagination.png) + +ページサイズをé¸æŠžã™ã‚‹ã¨ã€ã™ãã«çµæžœã‚»ãƒƒãƒˆã«ãƒšãƒ¼ã‚¸ãƒãƒ¼ã‚·ãƒ§ãƒ³ãŒé©ç”¨ã•ã‚Œã€ãƒŠãƒ“ゲーションオプションãŒçµæžœãƒšã‚¤ãƒ³ãƒ•ãƒƒã‚¿ãƒ¼ã®ä¸­å¤®ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + + ![ページãƒãƒ¼ã‚·ãƒ§ãƒ³ãƒŠãƒ“ゲーション](@site/docs/ja/cloud/images/sqlconsole/pagination-nav.png) + +### クエリçµæžœãƒ‡ãƒ¼ã‚¿ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +クエリçµæžœã‚»ãƒƒãƒˆã¯ã€SQLコンソールã‹ã‚‰ç›´æŽ¥CSVå½¢å¼ã§ç°¡å˜ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã§ãã¾ã™ã€‚ãã®ãŸã‚ã«ã¯ã€çµæžœãƒšã‚¤ãƒ³ãƒ„ールãƒãƒ¼ã®å³å´ã«ã‚ã‚‹ `•••` メニューを開ãã€ã€ŒCSVã¨ã—ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã€ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![CSVã¨ã—ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰](@site/docs/ja/cloud/images/sqlconsole/download-as-csv.png) + +## クエリデータã®ãƒ“ジュアライゼーション + +データã¯ã€ãƒãƒ£ãƒ¼ãƒˆå½¢å¼ã§è¡¨ç¤ºã™ã‚‹ã¨ã‚ˆã‚Šå®¹æ˜“ã«è§£é‡ˆã§ãã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚SQLコンソールã‹ã‚‰ã‚¯ã‚¨ãƒªçµæžœãƒ‡ãƒ¼ã‚¿ã‚’使用ã—ã¦ãƒ“ジュアライゼーションを数クリックã§è¿…速ã«ä½œæˆã§ãã¾ã™ã€‚例ã¨ã—ã¦ã€NYCタクシーã®é€±ã”ã¨ã®çµ±è¨ˆã‚’計算ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’使用ã—ã¾ã™ï¼š + +```sql +select + toStartOfWeek(pickup_datetime) as week, + sum(total_amount) as fare_total, + sum(trip_distance) as distance_total, + count(*) as trip_total +from + nyc_taxi +group by + 1 +order by + 1 asc +``` + + ![タブ形å¼ã®ã‚¯ã‚¨ãƒªçµæžœ](@site/docs/ja/cloud/images/sqlconsole/tabular-query-results.png) + +ビジュアライゼーションãŒãªã„ã¨ã€ã“れらã®çµæžœã¯è§£é‡ˆãŒé›£ã—ã„ã§ã™ã€‚ãれらをãƒãƒ£ãƒ¼ãƒˆã«å¤‰æ›ã—ã¾ã—ょã†ã€‚ + +### ãƒãƒ£ãƒ¼ãƒˆã®ä½œæˆ + +ビジュアライゼーションã®ä½œæˆã‚’開始ã™ã‚‹ã«ã¯ã€ã‚¯ã‚¨ãƒªçµæžœãƒšã‚¤ãƒ³ãƒ„ールãƒãƒ¼ã‹ã‚‰ã€Œãƒãƒ£ãƒ¼ãƒˆã€ã‚ªãƒ—ションをé¸æŠžã—ã¾ã™ã€‚ãƒãƒ£ãƒ¼ãƒˆè¨­å®šãƒšã‚¤ãƒ³ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + + ![クエリã‹ã‚‰ãƒãƒ£ãƒ¼ãƒˆã«åˆ‡ã‚Šæ›¿ãˆã‚‹](@site/docs/ja/cloud/images/sqlconsole/switch-from-query-to-chart.png) + +ã¾ãšã€`week` 㧠`trip_total` を追跡ã™ã‚‹å˜ç´”ãªæ£’グラフを作æˆã—ã¾ã™ã€‚ã“れをé”æˆã™ã‚‹ãŸã‚ã«ã€`week` フィールドをx軸ã«ã€`trip_total` フィールドをy軸ã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã¾ã™ï¼š + + ![週ã”ã¨ã®ãƒˆãƒªãƒƒãƒ—ç·æ•°](@site/docs/ja/cloud/images/sqlconsole/trip-total-by-week.png) + +ã»ã¨ã‚“ã©ã®ãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒ—ã¯ã€æ•°å€¤è»¸ã«è¤‡æ•°ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚実演ã®ãŸã‚ã«ã€`fare_total` フィールドをy軸ã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã¾ã™ï¼š + + ![棒グラフ](@site/docs/ja/cloud/images/sqlconsole/bar-chart.png) + +### ãƒãƒ£ãƒ¼ãƒˆã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º + +SQLコンソールã¯10種類ã®ãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒ—をサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ãƒãƒ£ãƒ¼ãƒˆè¨­å®šãƒšã‚¤ãƒ³ã®ãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒ—セレクターã‹ã‚‰é¸æŠžã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€å‰è¿°ã®æ£’グラフã‹ã‚‰ã‚¨ãƒªã‚¢ãƒãƒ£ãƒ¼ãƒˆã«ç°¡å˜ã«ã‚¿ã‚¤ãƒ—を変更ã§ãã¾ã™ï¼š + + ![棒グラフã‹ã‚‰ã‚¨ãƒªã‚¢ã«å¤‰æ›´](@site/docs/ja/cloud/images/sqlconsole/change-from-bar-to-area.png) + +ãƒãƒ£ãƒ¼ãƒˆã®ã‚¿ã‚¤ãƒˆãƒ«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’供給ã™ã‚‹ã‚¯ã‚¨ãƒªã®åå‰ã«ä¸€è‡´ã—ã¾ã™ã€‚クエリã®åå‰ã‚’æ›´æ–°ã™ã‚‹ã¨ã€ãƒãƒ£ãƒ¼ãƒˆã®ã‚¿ã‚¤ãƒˆãƒ«ã‚‚æ›´æ–°ã•ã‚Œã¾ã™ï¼š + + ![クエリåã®æ›´æ–°](@site/docs/ja/cloud/images/sqlconsole/update-query-name.png) + +より高度ãªãƒãƒ£ãƒ¼ãƒˆã®ç‰¹æ€§ã‚’ã€ãƒãƒ£ãƒ¼ãƒˆè¨­å®šãƒšã‚¤ãƒ³ã®ã€Œé«˜åº¦ãªè¨­å®šã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§èª¿æ•´ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã¾ãšã€æ¬¡ã®è¨­å®šã‚’調整ã—ã¾ã™ï¼š +- サブタイトル +- 軸タイトル +- x軸ã®ãƒ©ãƒ™ãƒ«ã®å‘ã + +ã“ã‚Œã«ã‚ˆã‚Šã€ãƒãƒ£ãƒ¼ãƒˆãŒä»¥ä¸‹ã®ã‚ˆã†ã«æ›´æ–°ã•ã‚Œã¾ã™ï¼š + + ![サブタイトルãªã©ã®æ›´æ–°](@site/docs/ja/cloud/images/sqlconsole/update-subtitle-etc.png) + +ã„ãã¤ã‹ã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€å„フィールドã®è»¸ã‚¹ã‚±ãƒ¼ãƒ«ã‚’独立ã—ã¦èª¿æ•´ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ã€ãƒãƒ£ãƒ¼ãƒˆè¨­å®šãƒšã‚¤ãƒ³ã®ã€Œé«˜åº¦ãªè¨­å®šã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§è»¸ç¯„囲ã®æœ€å°å€¤ã¨æœ€å¤§å€¤ã‚’指定ã™ã‚‹ã“ã¨ã§ã‚‚å¯èƒ½ã§ã™ã€‚ãŸã¨ãˆã°ã€ä¸Šè¨˜ã®ãƒãƒ£ãƒ¼ãƒˆã¯è¦‹æ „ãˆãŒè‰¯ã„ã§ã™ãŒã€`trip_total` 㨠`fare_total` フィールドã®ç›¸é–¢é–¢ä¿‚を示ã™ãŸã‚ã«ã€è»¸ç¯„囲ã®èª¿æ•´ãŒå¿…è¦ã§ã™ï¼š + + ![軸スケールを調整](@site/docs/ja/cloud/images/sqlconsole/adjust-axis-scale.png) diff --git a/docs/ja/getting-started/_category_.yml b/docs/ja/getting-started/_category_.yml new file mode 100644 index 00000000000..f50d681b7ed --- /dev/null +++ b/docs/ja/getting-started/_category_.yml @@ -0,0 +1,8 @@ +position: 1 +label: 'Getting Started' +collapsible: true +collapsed: true +link: + type: generated-index + title: Getting Started + slug: /ja/getting-started diff --git a/docs/ja/getting-started/example-datasets/amazon-reviews.md b/docs/ja/getting-started/example-datasets/amazon-reviews.md new file mode 100644 index 00000000000..b08d44e49c1 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/amazon-reviews.md @@ -0,0 +1,434 @@ +--- +slug: /ja/getting-started/example-datasets/amazon-reviews +sidebar_label: Amazonカスタマーレビュー +--- + +# Amazonカスタマーレビューã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€Amazon製å“ã®150M以上ã®ã‚«ã‚¹ã‚¿ãƒžãƒ¼ãƒ¬ãƒ“ューãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚データã¯AWS S3ã®snappy圧縮Parquetファイル形å¼ã§ã€åˆè¨ˆ49GBã®ã‚µã‚¤ã‚ºï¼ˆåœ§ç¸®æ¸ˆã¿ï¼‰ã§ã™ã€‚ã“れをClickHouseã«æŒ¿å…¥ã™ã‚‹æ‰‹é †ã‚’見ã¦ã„ãã¾ã—ょã†ã€‚ + +:::note +以下ã®ã‚¯ã‚¨ãƒªã¯ã€[ClickHouse Cloud](https://clickhouse.cloud) ã®**本番**インスタンスã§å®Ÿè¡Œã•ã‚Œã¾ã—ãŸã€‚ +::: + +1. ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã“ã¨ãªãã€ãã®å ´ã§ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ã€‚例ã¨ã—ã¦ã€ä¸€éƒ¨ã®è¡Œã‚’å–å¾—ã—ã¦ã€ãã®å†…容を確èªã—ã¾ã—ょã†ï¼š + +```sql +SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/amazon_reviews/amazon_reviews_2015.snappy.parquet') +LIMIT 10 +``` + +è¡Œã®å†…容ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```response +┌─review_date─┬─marketplace─┬─customer_id─┬─review_id──────┬─product_id─┬─product_parent─┬─product_title────────────────────────────────────────────────┬─product_category───────┬─star_rating─┬─helpful_votes─┬─total_votes─┬─vine──┬─verified_purchase─┬─review_headline─────────────────────────────────────────────────────────────┬─review_body────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ 16452 │ US │ 21080196 │ R17NMVYCQXEEFW │ B00RSI5DJA │ 904397429 │ Pilot │ Digital_Video_Download │ 5 │ 0 │ 0 │ false │ false │ yes indeed │ OMG- i totally see myself get hook on that show if it happen- love it │ +│ 16452 │ US │ 44158214 │ R3MAPJVO9D0ERG │ B00RSI61PU │ 475013967 │ Salem Rogers: Model of the Year 1998 │ Digital_Video_Download │ 5 │ 0 │ 0 │ false │ false │ Halarious show!! │ Loved this pilot episode!! Please pick this up Amazon!!! │ +│ 16452 │ US │ 1944630 │ R1Q5YPRE84OVB6 │ B009IU6BIS │ 101502671 │ National Lampoon's Christmas Vacation │ Digital_Video_Download │ 5 │ 0 │ 0 │ false │ false │ Classic! │ This is a holiday classic. How can you not love it! │ +│ 16452 │ US │ 49029010 │ RGDK35TBJJ2ZI │ B00RSI68V2 │ 639602030 │ Table 58 │ Digital_Video_Download │ 5 │ 2 │ 3 │ false │ false │ Fun for the whole family!! │ This show is fun! Our family really enjoyed watching the show. I can see this being one of the shows that we watch on Friday nights with our pizza and ice cream. I hope to see more of the show and the great cast of characters. │ +│ 16452 │ US │ 52257958 │ R1R2SEOJT8M14Y │ B00RSGIMUE │ 196368495 │ Niko and the Sword of Light │ Digital_Video_Download │ 5 │ 1 │ 2 │ false │ false │ it's a new kind of avatar. great show. make more. │ My 7 year old son and my husband both loved it! It's like avatar the last air bender but with different magical powers. The characters are adorably well developed. The story is interesting. We hope amazon makes the whole season. We can't wait to see more! │ +│ 16452 │ US │ 26927978 │ RN0JCPQ6Z4FUB │ B009ITL7UG │ 497741324 │ Lord of the Rings: The Return of the King (Extended Edition) │ Digital_Video_Download │ 5 │ 0 │ 0 │ false │ true │ Definite must-own for any Tolkien buff who has not yet upgraded to Blu-Ray! │ If you liked the theatrical release and are a fan of Middle-Earth then you should get this. │ +│ 16452 │ US │ 19626887 │ R15LDVOU1S1DFB │ B00RSGHGB0 │ 576999592 │ Just Add Magic - Season 1 │ Digital_Video_Download │ 5 │ 1 │ 1 │ false │ false │ Great story! So good even my teenage boys said ... │ Great story! So good even my teenage boys said this is actually pretty good!!! Can't wait for the next episode. │ +│ 16452 │ US │ 1439383 │ R2DJVLZM1MVFQH │ B002WEQJ3E │ 733651019 │ Six: The Mark Unleashed │ Digital_Video_Download │ 1 │ 0 │ 4 │ false │ false │ I am now less intelligent for having watched an entire 10 minutes of it │ I am now less intelligent for having watched an entire 10 minutes of it. God save my sole as I now must kick out the chair from which I am standing on so that the noose may do its job. Watch the movie at your own risk. The screen will suck your brain cells out of your body. │ +│ 16452 │ US │ 46233181 │ R33W2NB9MCRUFV │ B00RSGFYQE │ 464741068 │ Point of Honor │ Digital_Video_Download │ 4 │ 0 │ 0 │ false │ false │ Give it a chance. │ Pilots are just what they are...pilots. A chance to see what works and what doesn't and a chance to smooth out the wrinkles. Point of Honor at least stands a fair chance. │ +│ 16452 │ US │ 19537300 │ R2WGJYESHID0ZF │ B00RSGHQJM │ 374287214 │ Down Dog │ Digital_Video_Download │ 5 │ 1 │ 1 │ false │ false │ Five Stars │ great fun │ +└─────────────┴─────────────┴─────────────┴────────────────┴────────────┴────────────────┴──────────────────────────────────────────────────────────────┴────────────────────────┴─────────────┴───────────────┴─────────────┴───────┴───────────────────┴─────────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +2. ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«ä¿å­˜ã™ã‚‹ãŸã‚ã«ã€æ–°ã—ã„`MergeTree`テーブル`amazon_reviews`を定義ã—ã¾ã™ï¼š + +```sql +CREATE TABLE amazon_reviews +( + review_date Date, + marketplace LowCardinality(String), + customer_id UInt64, + review_id String, + product_id String, + product_parent UInt64, + product_title String, + product_category LowCardinality(String), + star_rating UInt8, + helpful_votes UInt32, + total_votes UInt32, + vine Bool, + verified_purchase Bool, + review_headline String, + review_body String +) +ENGINE = MergeTree +ORDER BY (review_date, product_category); +``` + +3. 次ã®`INSERT`コマンドã¯`s3Cluster`テーブル関数を使用ã—ã¦ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã‚’用ã„ã¦è¤‡æ•°ã®S3ファイルを並行処ç†ã—ã¾ã™ã€‚ã¾ãŸã€`https://datasets-documentation.s3.eu-west-3.amazonaws.com/amazon_reviews/amazon_reviews_*.snappy.parquet`ã¨ã„ã†åå‰ã§å§‹ã¾ã‚‹ä»»æ„ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’挿入ã™ã‚‹ãŸã‚ã«ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’使用ã—ã¾ã™ï¼š + +```sql +INSERT INTO amazon_reviews +SELECT + * +FROM s3Cluster( + 'default', + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/amazon_reviews/amazon_reviews_*.snappy.parquet' + ); +``` + +:::tip +ClickHouse Cloudã§ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®åå‰ã¯`default`ã§ã™ã€‚クラスターã®åå‰ã‚’変更ã™ã‚‹ã‹ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’æŒã£ã¦ã„ãªã„å ´åˆã¯`s3Cluster`ã®ä»£ã‚ã‚Šã«`s3`テーブル関数を使用ã—ã¦ãã ã•ã„。 +::: + +5. ã“ã®ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œæ™‚é–“ã¯çŸ­ãã€å¹³å‡ã§ç´„300,000è¡Œ/秒ã§ã™ã€‚ç´„5分以内ã«ã™ã¹ã¦ã®è¡ŒãŒæŒ¿å…¥ã•ã‚Œã‚‹ã®ã‚’確èªã§ãã¾ã™ï¼š + +```sql +SELECT formatReadableQuantity(count()) +FROM amazon_reviews; +``` + +```response +┌─formatReadableQuantity(count())─┠+│ 150.96 million │ +└─────────────────────────────────┘ + +1 row in set. Elapsed: 0.005 sec. +``` + +6. データ使用é‡ã‚’確èªã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT + disk_name, + formatReadableSize(sum(data_compressed_bytes) AS size) AS compressed, + formatReadableSize(sum(data_uncompressed_bytes) AS usize) AS uncompressed, + round(usize / size, 2) AS compr_rate, + sum(rows) AS rows, + count() AS part_count +FROM system.parts +WHERE (active = 1) AND (table = 'amazon_reviews') +GROUP BY disk_name +ORDER BY size DESC; +``` +å…ƒã®ãƒ‡ãƒ¼ã‚¿ã¯ç´„70Gã§ã™ãŒã€ClickHouseã§åœ§ç¸®ã•ã‚Œã‚‹ã¨ç´„30Gã«åœ§ç¸®ã•ã‚Œã¾ã™ï¼š + +```response +┌─disk_name─┬─compressed─┬─uncompressed─┬─compr_rate─┬──────rows─┬─part_count─┠+│ s3disk │ 30.05 GiB │ 70.47 GiB │ 2.35 │ 150957260 │ 14 │ +└───────────┴────────────┴──────────────┴────────────┴───────────┴────────────┘ +``` + +7. ã„ãã¤ã‹ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¦ã¿ã¾ã—ょã†...以下ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆå†…ã§æœ€ã‚‚役立ã¤ãƒ¬ãƒ“ューTOP10ã§ã™ï¼š + +```sql +SELECT + product_title, + review_headline +FROM amazon_reviews +ORDER BY helpful_votes DESC +LIMIT 10; +``` + +クエリã¯151Mã®è¡Œã™ã¹ã¦ã‚’処ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒã€1秒未満ã§çµ‚了ã—ã¾ã™ï¼ + +```response +┌─product_title────────────────────────────────────────────────────────────────────────────┬─review_headline───────────────────────────────────────────────────────┠+│ Kindle: Amazon's Original Wireless Reading Device (1st generation) │ Why and how the Kindle changes everything │ +│ BIC Cristal For Her Ball Pen, 1.0mm, Black, 16ct (MSLP16-Blk) │ FINALLY! │ +│ The Mountain Kids 100% Cotton Three Wolf Moon T-Shirt │ Dual Function Design │ +│ Kindle Keyboard 3G, Free 3G + Wi-Fi, 6" E Ink Display │ Kindle vs. Nook (updated) │ +│ Kindle Fire HD 7", Dolby Audio, Dual-Band Wi-Fi │ You Get What You Pay For │ +│ Kindle Fire (Previous Generation - 1st) │ A great device WHEN you consider price and function, with a few flaws │ +│ Fifty Shades of Grey: Book One of the Fifty Shades Trilogy (Fifty Shades of Grey Series) │ Did a teenager write this??? │ +│ Wheelmate Laptop Steering Wheel Desk │ Perfect for an Starfleet Helmsman │ +│ Kindle Wireless Reading Device (6" Display, U.S. Wireless) │ BEWARE of the SIGNIFICANT DIFFERENCES between Kindle 1 and Kindle 2! │ +│ Tuscan Dairy Whole Vitamin D Milk, Gallon, 128 oz │ Make this your only stock and store │ +└──────────────────────────────────────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────────────────────┘ + +10 rows in set. Elapsed: 0.897 sec. Processed 150.96 million rows, 15.36 GB (168.36 million rows/s., 17.13 GB/s.) +``` + +8. Amazonã§ãƒ¬ãƒ“ュー数ãŒæœ€ã‚‚多ã„商å“TOP10ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +```sql +SELECT + any(product_title), + count() +FROM amazon_reviews +GROUP BY product_id +ORDER BY 2 DESC +LIMIT 10; +``` + +```response +┌─any(product_title)────────────────────────────┬─count()─┠+│ Candy Crush Saga │ 50051 │ +│ The Secret Society® - Hidden Mystery │ 41255 │ +│ Google Chromecast HDMI Streaming Media Player │ 35977 │ +│ Minecraft │ 35129 │ +│ Bosch Season 1 │ 33610 │ +│ Gone Girl: A Novel │ 33240 │ +│ Subway Surfers │ 32328 │ +│ The Fault in Our Stars │ 30149 │ +│ Amazon.com eGift Cards │ 28879 │ +│ Crossy Road │ 28111 │ +└───────────────────────────────────────────────┴─────────┘ + +10 rows in set. Elapsed: 20.059 sec. Processed 150.96 million rows, 12.78 GB (7.53 million rows/s., 637.25 MB/s.) +``` + +9. å„商å“ã®æœˆã”ã¨ã®å¹³å‡ãƒ¬ãƒ“ュー評価ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼ˆå®Ÿéš›ã®[Amazonã®å°±è·é¢æŽ¥](https://datalemur.com/questions/sql-avg-review-ratings)å•é¡Œï¼‰ï¼š + +```sql +SELECT + toStartOfMonth(review_date) AS month, + any(product_title), + avg(star_rating) AS avg_stars +FROM amazon_reviews +GROUP BY + month, + product_id +ORDER BY + month DESC, + product_id ASC +LIMIT 20; +``` + +å„商å“ã®æœˆåˆ¥å¹³å‡ã‚’計算ã—ã€çµæžœã¨ã—ã¦20è¡Œã ã‘ã‚’å–得: + +```response +┌──────month─┬─any(product_title)──────────────────────────────────────────────────────────────────────┬─avg_stars─┠+│ 2015-08-01 │ Mystiqueshapes Girls Ballet Tutu Neon Lime Green │ 4 │ +│ 2015-08-01 │ Adult Ballet Tutu Yellow │ 5 │ +│ 2015-08-01 │ The Way Things Work: An Illustrated Encyclopedia of Technology │ 5 │ +│ 2015-08-01 │ Hilda Boswell's Treasury of Poetry │ 5 │ +│ 2015-08-01 │ Treasury of Poetry │ 5 │ +│ 2015-08-01 │ Uncle Remus Stories │ 5 │ +│ 2015-08-01 │ The Book of Daniel │ 5 │ +│ 2015-08-01 │ Berenstains' B Book │ 5 │ +│ 2015-08-01 │ The High Hills (Brambly Hedge) │ 4.5 │ +│ 2015-08-01 │ Fuzzypeg Goes to School (The Little Grey Rabbit library) │ 5 │ +│ 2015-08-01 │ Dictionary in French: The Cat in the Hat (Beginner Series) │ 5 │ +│ 2015-08-01 │ Windfallen │ 5 │ +│ 2015-08-01 │ The Monk Who Sold His Ferrari: A Remarkable Story About Living Your Dreams │ 5 │ +│ 2015-08-01 │ Illustrissimi: The Letters of Pope John Paul I │ 5 │ +│ 2015-08-01 │ Social Contract: A Personal Inquiry into the Evolutionary Sources of Order and Disorder │ 5 │ +│ 2015-08-01 │ Mexico The Beautiful Cookbook: Authentic Recipes from the Regions of Mexico │ 4.5 │ +│ 2015-08-01 │ Alanbrooke │ 5 │ +│ 2015-08-01 │ Back to Cape Horn │ 4 │ +│ 2015-08-01 │ Ovett: An Autobiography (Willow books) │ 5 │ +│ 2015-08-01 │ The Birds of West Africa (Collins Field Guides) │ 4 │ +└────────────┴─────────────────────────────────────────────────────────────────────────────────────────┴───────────┘ + +20 rows in set. Elapsed: 43.055 sec. Processed 150.96 million rows, 13.24 GB (3.51 million rows/s., 307.41 MB/s.) +Peak memory usage: 41.73 GiB. +``` + +10. å„商å“カテゴリ別ã®æŠ•ç¥¨ç·æ•°ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯é€Ÿãã€`product_category`ãŒä¸»ã‚­ãƒ¼ã«å«ã¾ã‚Œã¦ã„ã‚‹ãŸã‚ã§ã™ï¼š + +```sql +SELECT + sum(total_votes), + product_category +FROM amazon_reviews +GROUP BY product_category +ORDER BY 1 DESC +FORMAT PrettyCompactMonoBlock; +``` + +```response +┌─sum(total_votes)─┬─product_category─────────┠+│ 103877874 │ Books │ +│ 25330411 │ Digital_Ebook_Purchase │ +│ 23065953 │ Video DVD │ +│ 18048069 │ Music │ +│ 17292294 │ Mobile_Apps │ +│ 15977124 │ Health & Personal Care │ +│ 13554090 │ PC │ +│ 13065746 │ Kitchen │ +│ 12537926 │ Home │ +│ 11067538 │ Beauty │ +│ 10418643 │ Wireless │ +│ 9089085 │ Toys │ +│ 9071484 │ Sports │ +│ 7335647 │ Electronics │ +│ 6885504 │ Apparel │ +│ 6710085 │ Video Games │ +│ 6556319 │ Camera │ +│ 6305478 │ Lawn and Garden │ +│ 5954422 │ Office Products │ +│ 5339437 │ Home Improvement │ +│ 5284343 │ Outdoors │ +│ 5125199 │ Pet Products │ +│ 4733251 │ Grocery │ +│ 4697750 │ Shoes │ +│ 4666487 │ Automotive │ +│ 4361518 │ Digital_Video_Download │ +│ 4033550 │ Tools │ +│ 3559010 │ Baby │ +│ 3317662 │ Home Entertainment │ +│ 2559501 │ Video │ +│ 2204328 │ Furniture │ +│ 2157587 │ Musical Instruments │ +│ 1881662 │ Software │ +│ 1676081 │ Jewelry │ +│ 1499945 │ Watches │ +│ 1224071 │ Digital_Music_Purchase │ +│ 847918 │ Luggage │ +│ 503939 │ Major Appliances │ +│ 392001 │ Digital_Video_Games │ +│ 348990 │ Personal_Care_Appliances │ +│ 321372 │ Digital_Software │ +│ 169585 │ Mobile_Electronics │ +│ 72970 │ Gift Card │ +└──────────────────┴──────────────────────────┘ + +43 rows in set. Elapsed: 0.201 sec. Processed 150.96 million rows, 754.79 MB (750.85 million rows/s., 3.75 GB/s.) +``` + +11. レビューã§æœ€ã‚‚é »ç¹ã«ã€Œawfulã€ã¨ã„ã†å˜èªžãŒç¾ã‚Œã‚‹è£½å“を見ã¤ã‘ã¾ã™ã€‚ã“ã‚Œã¯å¤§è¦æ¨¡ãªã‚¿ã‚¹ã‚¯ã§ã€151M以上ã®æ–‡å­—列を解æžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +SELECT + product_id, + any(product_title), + avg(star_rating), + count() AS count +FROM amazon_reviews +WHERE position(review_body, 'awful') > 0 +GROUP BY product_id +ORDER BY count DESC +LIMIT 50; +``` + +クエリã¯ãŸã£ãŸ4秒ã§å®Œäº†ã—ã€çµæžœã¯é¢ç™½ã„内容ã§ã™ï¼š + +```response + +┌─product_id─┬─any(product_title)───────────────────────────────────────────────────────────────────────┬───avg(star_rating)─┬─count─┠+│ 0345803485 │ Fifty Shades of Grey: Book One of the Fifty Shades Trilogy (Fifty Shades of Grey Series) │ 1.3870967741935485 │ 248 │ +│ B007J4T2G8 │ Fifty Shades of Grey (Fifty Shades, Book 1) │ 1.4439834024896265 │ 241 │ +│ B006LSZECO │ Gone Girl: A Novel │ 2.2986425339366514 │ 221 │ +│ B00008OWZG │ St. Anger │ 1.6565656565656566 │ 198 │ +│ B00BD99JMW │ Allegiant (Divergent Trilogy, Book 3) │ 1.8342541436464088 │ 181 │ +│ B0000YUXI0 │ Mavala Switzerland Mavala Stop Nail Biting │ 4.473684210526316 │ 171 │ +│ B004S8F7QM │ Cards Against Humanity │ 4.753012048192771 │ 166 │ +│ 031606792X │ Breaking Dawn (The Twilight Saga, Book 4) │ 1.796875 │ 128 │ +│ 006202406X │ Allegiant (Divergent Series) │ 1.4242424242424243 │ 99 │ +│ B0051VVOB2 │ Kindle Fire (Previous Generation - 1st) │ 2.7448979591836733 │ 98 │ +│ B00I3MP3SG │ Pilot │ 1.8762886597938144 │ 97 │ +│ 030758836X │ Gone Girl │ 2.15625 │ 96 │ +│ B0009X29WK │ Precious Cat Ultra Premium Clumping Cat Litter │ 3.0759493670886076 │ 79 │ +│ B00JB3MVCW │ Noah │ 1.2027027027027026 │ 74 │ +│ B00BAXFECK │ The Goldfinch: A Novel (Pulitzer Prize for Fiction) │ 2.643835616438356 │ 73 │ +│ B00N28818A │ Amazon Prime Video │ 1.4305555555555556 │ 72 │ +│ B007FTE2VW │ SimCity - Limited Edition │ 1.2794117647058822 │ 68 │ +│ 0439023513 │ Mockingjay (The Hunger Games) │ 2.6417910447761193 │ 67 │ +│ B000OCEWGW │ Liquid Ass │ 4.8125 │ 64 │ +│ B00178630A │ Diablo III - PC/Mac │ 1.671875 │ 64 │ +│ B005ZOBNOI │ The Fault in Our Stars │ 4.316666666666666 │ 60 │ +│ B00L9B7IKE │ The Girl on the Train: A Novel │ 2.0677966101694913 │ 59 │ +│ B003WUYPPG │ Unbroken: A World War II Story of Survival, Resilience, and Redemption │ 4.620689655172414 │ 58 │ +│ B0064X7B4A │ Words With Friends │ 2.2413793103448274 │ 58 │ +│ B007S6Y6VS │ Garden of Life Raw Organic Meal │ 2.8793103448275863 │ 58 │ +│ B000XUBFE2 │ The Book Thief │ 4.526315789473684 │ 57 │ +│ B00006HBUJ │ Star Wars: Episode II - Attack of the Clones (Widescreen Edition) │ 2.2982456140350878 │ 57 │ +│ B0006399FS │ How to Dismantle an Atomic Bomb │ 1.9821428571428572 │ 56 │ +│ B003ZSJ212 │ Star Wars: The Complete Saga (Episodes I-VI) (Packaging May Vary) [Blu-ray] │ 2.309090909090909 │ 55 │ +│ 193700788X │ Dead Ever After (Sookie Stackhouse/True Blood) │ 1.5185185185185186 │ 54 │ +│ B004FYEZMQ │ Mass Effect 3 │ 2.056603773584906 │ 53 │ +│ B000CFYAMC │ The Room │ 3.9615384615384617 │ 52 │ +│ B0012JY4G4 │ Color Oops Hair Color Remover Extra Strength 1 Each │ 3.9019607843137254 │ 51 │ +│ B0031JK95S │ Garden of Life Raw Organic Meal │ 3.3137254901960786 │ 51 │ +│ B00CE18P0K │ Pilot │ 1.7142857142857142 │ 49 │ +│ B007VTVRFA │ SimCity - Limited Edition │ 1.2040816326530612 │ 49 │ +│ 0316015849 │ Twilight (The Twilight Saga, Book 1) │ 1.8979591836734695 │ 49 │ +│ B00DR0PDNE │ Google Chromecast HDMI Streaming Media Player │ 2.5416666666666665 │ 48 │ +│ B000056OWC │ The First Years: 4-Stage Bath System │ 1.2127659574468086 │ 47 │ +│ B007IXWKUK │ Fifty Shades Darker (Fifty Shades, Book 2) │ 1.6304347826086956 │ 46 │ +│ 1892112000 │ To Train Up a Child │ 1.4130434782608696 │ 46 │ +│ 043935806X │ Harry Potter and the Order of the Phoenix (Book 5) │ 3.977272727272727 │ 44 │ +│ B003XF1XOQ │ Mockingjay (Hunger Games Trilogy, Book 3) │ 2.772727272727273 │ 44 │ +│ B00BGO0Q9O │ Fitbit Flex Wireless Wristband with Sleep Function, Black │ 1.9318181818181819 │ 44 │ +│ B0064X7FVE │ The Weather Channel: Forecast, Radar & Alerts │ 1.5116279069767442 │ 43 │ +│ B0083PWAPW │ Kindle Fire HD 7", Dolby Audio, Dual-Band Wi-Fi │ 2.627906976744186 │ 43 │ +│ B00DD2B52Y │ Spring Breakers │ 1.2093023255813953 │ 43 │ +│ B00192KCQ0 │ Death Magnetic │ 3.5714285714285716 │ 42 │ +│ B004CFA9RS │ Divergent (Divergent Trilogy, Book 1) │ 3.1219512195121952 │ 41 │ +│ B0052QYLUM │ Infant Optics DXR-5 Portable Video Baby Monitor │ 2.1463414634146343 │ 41 │ +└────────────┴──────────────────────────────────────────────────────────────────────────────────────────┴────────────────────┴───────┘ + +50 rows in set. Elapsed: 4.072 sec. Processed 150.96 million rows, 68.93 GB (37.07 million rows/s., 16.93 GB/s.) +Peak memory usage: 1.82 GiB. +``` + +12. åŒã˜ã‚¯ã‚¨ãƒªã‚’å†åº¦å®Ÿè¡Œã—ã€ä»Šåº¦ã¯ãƒ¬ãƒ“ューã§**"awesome"**ã¨ã„ã†å˜èªžã‚’検索ã—ã¾ã™ï¼š + +```sql +SELECT + product_id, + any(product_title), + avg(star_rating), + count() AS count +FROM amazon_reviews +WHERE position(review_body, 'awesome') > 0 +GROUP BY product_id +ORDER BY count DESC +LIMIT 50; +``` + +```response + +┌─product_id─┬─any(product_title)────────────────────────────────────────────────────┬───avg(star_rating)─┬─count─┠+│ B00992CF6W │ Minecraft │ 4.848130353039482 │ 4787 │ +│ B009UX2YAC │ Subway Surfers │ 4.866720955483171 │ 3684 │ +│ B00QW8TYWO │ Crossy Road │ 4.935217903415784 │ 2547 │ +│ B00DJFIMW6 │ Minion Rush: Despicable Me Official Game │ 4.850450450450451 │ 2220 │ +│ B00AREIAI8 │ My Horse │ 4.865313653136531 │ 2168 │ +│ B00I8Q77Y0 │ Flappy Wings (not Flappy Bird) │ 4.8246561886051085 │ 2036 │ +│ B0054JZC6E │ 101-in-1 Games │ 4.792542016806722 │ 1904 │ +│ B00G5LQ5MU │ Escape The Titanic │ 4.724673710379117 │ 1609 │ +│ B0086700CM │ Temple Run │ 4.87636130685458 │ 1561 │ +│ B009HKL4B8 │ The Sims Freeplay │ 4.763942931258106 │ 1542 │ +│ B00I6IKSZ0 │ Pixel Gun 3D (Pocket Edition) - multiplayer shooter with skin creator │ 4.849894291754757 │ 1419 │ +│ B006OC2ANS │ BLOOD & GLORY │ 4.8561538461538465 │ 1300 │ +│ B00FATEJYE │ Injustice: Gods Among Us (Kindle Tablet Edition) │ 4.789265982636149 │ 1267 │ +│ B00B2V66VS │ Temple Run 2 │ 4.764705882352941 │ 1173 │ +│ B00JOT3HQ2 │ Geometry Dash Lite │ 4.909747292418772 │ 1108 │ +│ B00DUGCLY4 │ Guess The Emoji │ 4.813606710158434 │ 1073 │ +│ B00DR0PDNE │ Google Chromecast HDMI Streaming Media Player │ 4.607276119402985 │ 1072 │ +│ B00FAPF5U0 │ Candy Crush Saga │ 4.825757575757576 │ 1056 │ +│ B0051VVOB2 │ Kindle Fire (Previous Generation - 1st) │ 4.600407747196738 │ 981 │ +│ B007JPG04E │ FRONTLINE COMMANDO │ 4.8125 │ 912 │ +│ B00PTB7B34 │ Call of Duty®: Heroes │ 4.876404494382022 │ 890 │ +│ B00846GKTW │ Style Me Girl - Free 3D Fashion Dressup │ 4.785714285714286 │ 882 │ +│ B004S8F7QM │ Cards Against Humanity │ 4.931034482758621 │ 754 │ +│ B00FAX6XQC │ DEER HUNTER CLASSIC │ 4.700272479564033 │ 734 │ +│ B00PSGW79I │ Buddyman: Kick │ 4.888736263736264 │ 728 │ +│ B00CTQ6SIG │ The Simpsons: Tapped Out │ 4.793948126801153 │ 694 │ +│ B008JK6W5K │ Logo Quiz │ 4.782106782106782 │ 693 │ +│ B00EDTSKLU │ Geometry Dash │ 4.942028985507246 │ 690 │ +│ B00CSR2J9I │ Hill Climb Racing │ 4.880059970014993 │ 667 │ +│ B00CRFAAYC │ Fab Tattoo Artist FREE │ 4.907435508345979 │ 659 │ +│ B005ZXWMUS │ Netflix │ 4.722306525037936 │ 659 │ +│ B00DHQHQCE │ Battle Beach │ 4.863287250384024 │ 651 │ +│ B00BGA9WK2 │ PlayStation 4 500GB Console [Old Model] │ 4.688751926040061 │ 649 │ +│ B008Y7SMQU │ Logo Quiz - Fun Plus Free │ 4.7888 │ 625 │ +│ B0083PWAPW │ Kindle Fire HD 7", Dolby Audio, Dual-Band Wi-Fi │ 4.593900481540931 │ 623 │ +│ B008XG1X18 │ Pinterest │ 4.8148760330578515 │ 605 │ +│ B007SYWFRM │ Ice Age Village │ 4.8566666666666665 │ 600 │ +│ B00K7WGUKA │ Don't Tap The White Tile (Piano Tiles) │ 4.922689075630252 │ 595 │ +│ B00BWYQ9YE │ Kindle Fire HDX 7", HDX Display (Previous Generation - 3rd) │ 4.649913344887349 │ 577 │ +│ B00IZLM8MY │ High School Story │ 4.840425531914893 │ 564 │ +│ B004MC8CA2 │ Bible │ 4.884476534296029 │ 554 │ +│ B00KNWYDU8 │ Dragon City │ 4.861111111111111 │ 540 │ +│ B009ZKSPDK │ Survivalcraft │ 4.738317757009346 │ 535 │ +│ B00A4O6NMG │ My Singing Monsters │ 4.845559845559846 │ 518 │ +│ B002MQYOFW │ The Hunger Games (Hunger Games Trilogy, Book 1) │ 4.846899224806202 │ 516 │ +│ B005ZFOOE8 │ iHeartRadio – Free Music & Internet Radio │ 4.837301587301587 │ 504 │ +│ B00AIUUXHC │ Hungry Shark Evolution │ 4.846311475409836 │ 488 │ +│ B00E8KLWB4 │ The Secret Society® - Hidden Mystery │ 4.669438669438669 │ 481 │ +│ B006D1ONE4 │ Where's My Water? │ 4.916317991631799 │ 478 │ +│ B00G6ZTM3Y │ Terraria │ 4.728421052631579 │ 475 │ +└────────────┴───────────────────────────────────────────────────────────────────────┴────────────────────┴───────┘ + +50 rows in set. Elapsed: 4.079 sec. Processed 150.96 million rows, 68.95 GB (37.01 million rows/s., 16.90 GB/s.) +Peak memory usage: 2.18 GiB. +``` diff --git a/docs/ja/getting-started/example-datasets/amplab-benchmark.md b/docs/ja/getting-started/example-datasets/amplab-benchmark.md new file mode 100644 index 00000000000..82e4047f330 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/amplab-benchmark.md @@ -0,0 +1,126 @@ +--- +slug: /ja/getting-started/example-datasets/amplab-benchmark +sidebar_label: AMPLab ビッグデータベンãƒãƒžãƒ¼ã‚¯ +description: データウェアãƒã‚¦ã‚¹ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã®ãƒ‘フォーマンスを比較ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã€‚ +--- + +# AMPLab ビッグデータベンãƒãƒžãƒ¼ã‚¯ + +詳細㯠https://amplab.cs.berkeley.edu/benchmark/ ã‚’ã”覧ãã ã•ã„。 + +https://aws.amazon.com ã§ç„¡æ–™ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«ç™»éŒ²ã—ã¦ãã ã•ã„。クレジットカードã€ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã€é›»è©±ç•ªå·ãŒå¿…è¦ã§ã™ã€‚https://console.aws.amazon.com/iam/home?nc2=h_m_sc#security_credential ã‹ã‚‰æ–°ã—ã„アクセスキーをå–å¾—ã—ã¦ãã ã•ã„。 + +コンソールã§ä»¥ä¸‹ã‚’実行ã—ã¾ã™: + +``` bash +$ sudo apt-get install s3cmd +$ mkdir tiny; cd tiny; +$ s3cmd sync s3://big-data-benchmark/pavlo/text-deflate/tiny/ . +$ cd .. +$ mkdir 1node; cd 1node; +$ s3cmd sync s3://big-data-benchmark/pavlo/text-deflate/1node/ . +$ cd .. +$ mkdir 5nodes; cd 5nodes; +$ s3cmd sync s3://big-data-benchmark/pavlo/text-deflate/5nodes/ . +$ cd .. +``` + +以下㮠ClickHouse クエリを実行ã—ã¾ã™: + +``` sql +CREATE TABLE rankings_tiny +( + pageURL String, + pageRank UInt32, + avgDuration UInt32 +) ENGINE = Log; + +CREATE TABLE uservisits_tiny +( + sourceIP String, + destinationURL String, + visitDate Date, + adRevenue Float32, + UserAgent String, + cCode FixedString(3), + lCode FixedString(6), + searchWord String, + duration UInt32 +) ENGINE = MergeTree(visitDate, visitDate, 8192); + +CREATE TABLE rankings_1node +( + pageURL String, + pageRank UInt32, + avgDuration UInt32 +) ENGINE = Log; + +CREATE TABLE uservisits_1node +( + sourceIP String, + destinationURL String, + visitDate Date, + adRevenue Float32, + UserAgent String, + cCode FixedString(3), + lCode FixedString(6), + searchWord String, + duration UInt32 +) ENGINE = MergeTree(visitDate, visitDate, 8192); + +CREATE TABLE rankings_5nodes_on_single +( + pageURL String, + pageRank UInt32, + avgDuration UInt32 +) ENGINE = Log; + +CREATE TABLE uservisits_5nodes_on_single +( + sourceIP String, + destinationURL String, + visitDate Date, + adRevenue Float32, + UserAgent String, + cCode FixedString(3), + lCode FixedString(6), + searchWord String, + duration UInt32 +) ENGINE = MergeTree(visitDate, visitDate, 8192); +``` + +コンソールã«æˆ»ã‚Šã¾ã™: + +``` bash +$ for i in tiny/rankings/*.deflate; do echo $i; zlib-flate -uncompress < $i | clickhouse-client --host=example-perftest01j --query="INSERT INTO rankings_tiny FORMAT CSV"; done +$ for i in tiny/uservisits/*.deflate; do echo $i; zlib-flate -uncompress < $i | clickhouse-client --host=example-perftest01j --query="INSERT INTO uservisits_tiny FORMAT CSV"; done +$ for i in 1node/rankings/*.deflate; do echo $i; zlib-flate -uncompress < $i | clickhouse-client --host=example-perftest01j --query="INSERT INTO rankings_1node FORMAT CSV"; done +$ for i in 1node/uservisits/*.deflate; do echo $i; zlib-flate -uncompress < $i | clickhouse-client --host=example-perftest01j --query="INSERT INTO uservisits_1node FORMAT CSV"; done +$ for i in 5nodes/rankings/*.deflate; do echo $i; zlib-flate -uncompress < $i | clickhouse-client --host=example-perftest01j --query="INSERT INTO rankings_5nodes_on_single FORMAT CSV"; done +$ for i in 5nodes/uservisits/*.deflate; do echo $i; zlib-flate -uncompress < $i | clickhouse-client --host=example-perftest01j --query="INSERT INTO uservisits_5nodes_on_single FORMAT CSV"; done +``` + +データサンプルをå–å¾—ã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒª: + +``` sql +SELECT pageURL, pageRank FROM rankings_1node WHERE pageRank > 1000 + +SELECT substring(sourceIP, 1, 8), sum(adRevenue) FROM uservisits_1node GROUP BY substring(sourceIP, 1, 8) + +SELECT + sourceIP, + sum(adRevenue) AS totalRevenue, + avg(pageRank) AS pageRank +FROM rankings_1node ALL INNER JOIN +( + SELECT + sourceIP, + destinationURL AS pageURL, + adRevenue + FROM uservisits_1node + WHERE (visitDate > '1980-01-01') AND (visitDate < '1980-04-01') +) USING pageURL +GROUP BY sourceIP +ORDER BY totalRevenue DESC +LIMIT 1 +``` diff --git a/docs/ja/getting-started/example-datasets/brown-benchmark.md b/docs/ja/getting-started/example-datasets/brown-benchmark.md new file mode 100644 index 00000000000..38282c8e18e --- /dev/null +++ b/docs/ja/getting-started/example-datasets/brown-benchmark.md @@ -0,0 +1,456 @@ +--- +slug: /ja/getting-started/example-datasets/brown-benchmark +sidebar_label: ブラウン大学ベンãƒãƒžãƒ¼ã‚¯ +description: 機械生æˆãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã®æ–°ã—ã„分æžãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ +title: "ブラウン大学ベンãƒãƒžãƒ¼ã‚¯" +--- + +`MgBench`ã¯ã€æ©Ÿæ¢°ç”Ÿæˆãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã®æ–°ã—ã„分æžãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ã§ã™ã€‚[Andrew Crotty](http://cs.brown.edu/people/acrotty/)。 + +データをダウンロードã—ã¾ã™: +``` +wget https://datasets.clickhouse.com/mgbench{1..3}.csv.xz +``` + +データを展開ã—ã¾ã™: +``` +xz -v -d mgbench{1..3}.csv.xz +``` + +データベースã¨ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™: +```sql +CREATE DATABASE mgbench; +``` + +```sql +USE mgbench; +``` + +```sql +CREATE TABLE mgbench.logs1 ( + log_time DateTime, + machine_name LowCardinality(String), + machine_group LowCardinality(String), + cpu_idle Nullable(Float32), + cpu_nice Nullable(Float32), + cpu_system Nullable(Float32), + cpu_user Nullable(Float32), + cpu_wio Nullable(Float32), + disk_free Nullable(Float32), + disk_total Nullable(Float32), + part_max_used Nullable(Float32), + load_fifteen Nullable(Float32), + load_five Nullable(Float32), + load_one Nullable(Float32), + mem_buffers Nullable(Float32), + mem_cached Nullable(Float32), + mem_free Nullable(Float32), + mem_shared Nullable(Float32), + swap_free Nullable(Float32), + bytes_in Nullable(Float32), + bytes_out Nullable(Float32) +) +ENGINE = MergeTree() +ORDER BY (machine_group, machine_name, log_time); +``` + + +```sql +CREATE TABLE mgbench.logs2 ( + log_time DateTime, + client_ip IPv4, + request String, + status_code UInt16, + object_size UInt64 +) +ENGINE = MergeTree() +ORDER BY log_time; +``` + + +```sql +CREATE TABLE mgbench.logs3 ( + log_time DateTime64, + device_id FixedString(15), + device_name LowCardinality(String), + device_type LowCardinality(String), + device_floor UInt8, + event_type LowCardinality(String), + event_unit FixedString(1), + event_value Nullable(Float32) +) +ENGINE = MergeTree() +ORDER BY (event_type, log_time); +``` + +データを挿入ã—ã¾ã™: + +``` +clickhouse-client --query "INSERT INTO mgbench.logs1 FORMAT CSVWithNames" < mgbench1.csv +clickhouse-client --query "INSERT INTO mgbench.logs2 FORMAT CSVWithNames" < mgbench2.csv +clickhouse-client --query "INSERT INTO mgbench.logs3 FORMAT CSVWithNames" < mgbench3.csv +``` + +## ベンãƒãƒžãƒ¼ã‚¯ã‚¯ã‚¨ãƒªã‚’実行: + +```sql +USE mgbench; +``` + +```sql +-- Q1.1: å„ウェブサーãƒã®CPU/ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä½¿ç”¨çŽ‡ã¯ã€ä»Šæ—¥ã®åˆå‰0時以é™ã©ã®ãらã„ã§ã™ã‹ï¼Ÿ + +SELECT machine_name, + MIN(cpu) AS cpu_min, + MAX(cpu) AS cpu_max, + AVG(cpu) AS cpu_avg, + MIN(net_in) AS net_in_min, + MAX(net_in) AS net_in_max, + AVG(net_in) AS net_in_avg, + MIN(net_out) AS net_out_min, + MAX(net_out) AS net_out_max, + AVG(net_out) AS net_out_avg +FROM ( + SELECT machine_name, + COALESCE(cpu_user, 0.0) AS cpu, + COALESCE(bytes_in, 0.0) AS net_in, + COALESCE(bytes_out, 0.0) AS net_out + FROM logs1 + WHERE machine_name IN ('anansi','aragog','urd') + AND log_time >= TIMESTAMP '2017-01-11 00:00:00' +) AS r +GROUP BY machine_name; +``` + + +```sql +-- Q1.2: コンピューターラボã®ãƒžã‚·ãƒ³ã®ã†ã¡ã€éŽåŽ»1日間ã«ã‚ªãƒ•ãƒ©ã‚¤ãƒ³ã«ãªã£ã¦ã„ãŸã‚‚ã®ã¯ã©ã‚Œã§ã™ã‹ï¼Ÿ + +SELECT machine_name, + log_time +FROM logs1 +WHERE (machine_name LIKE 'cslab%' OR + machine_name LIKE 'mslab%') + AND load_one IS NULL + AND log_time >= TIMESTAMP '2017-01-10 00:00:00' +ORDER BY machine_name, + log_time; +``` + +```sql +-- Q1.3: 特定ã®ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®éŽåŽ»10日間ã®æ¯Žæ™‚å¹³å‡ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯ã©ã®ãらã„ã§ã™ã‹ï¼Ÿ + +SELECT dt, + hr, + AVG(load_fifteen) AS load_fifteen_avg, + AVG(load_five) AS load_five_avg, + AVG(load_one) AS load_one_avg, + AVG(mem_free) AS mem_free_avg, + AVG(swap_free) AS swap_free_avg +FROM ( + SELECT CAST(log_time AS DATE) AS dt, + EXTRACT(HOUR FROM log_time) AS hr, + load_fifteen, + load_five, + load_one, + mem_free, + swap_free + FROM logs1 + WHERE machine_name = 'babbage' + AND load_fifteen IS NOT NULL + AND load_five IS NOT NULL + AND load_one IS NOT NULL + AND mem_free IS NOT NULL + AND swap_free IS NOT NULL + AND log_time >= TIMESTAMP '2017-01-01 00:00:00' +) AS r +GROUP BY dt, + hr +ORDER BY dt, + hr; +``` + +```sql +-- Q1.4: 1ã‹æœˆé–“ã§ã€å„サーãƒãƒ¼ãŒãƒ‡ã‚£ã‚¹ã‚¯I/Oã§ãƒ–ロックã•ã‚ŒãŸé »åº¦ã¯ã©ã®ãらã„ã§ã™ã‹ï¼Ÿ + +SELECT machine_name, + COUNT(*) AS spikes +FROM logs1 +WHERE machine_group = 'Servers' + AND cpu_wio > 0.99 + AND log_time >= TIMESTAMP '2016-12-01 00:00:00' + AND log_time < TIMESTAMP '2017-01-01 00:00:00' +GROUP BY machine_name +ORDER BY spikes DESC +LIMIT 10; +``` + +```sql +-- Q1.5: メモリä¸è¶³ã«ãªã£ãŸå¤–部アクセスå¯èƒ½ãªVMã¯ã©ã‚Œã§ã™ã‹ï¼Ÿ + +SELECT machine_name, + dt, + MIN(mem_free) AS mem_free_min +FROM ( + SELECT machine_name, + CAST(log_time AS DATE) AS dt, + mem_free + FROM logs1 + WHERE machine_group = 'DMZ' + AND mem_free IS NOT NULL +) AS r +GROUP BY machine_name, + dt +HAVING MIN(mem_free) < 10000 +ORDER BY machine_name, + dt; +``` + +```sql +-- Q1.6: ファイルサーãƒãƒ¼å…¨ä½“ã®æ¯Žæ™‚ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®åˆè¨ˆã¯ã©ã®ãらã„ã§ã™ã‹ï¼Ÿ + +SELECT dt, + hr, + SUM(net_in) AS net_in_sum, + SUM(net_out) AS net_out_sum, + SUM(net_in) + SUM(net_out) AS both_sum +FROM ( + SELECT CAST(log_time AS DATE) AS dt, + EXTRACT(HOUR FROM log_time) AS hr, + COALESCE(bytes_in, 0.0) / 1000000000.0 AS net_in, + COALESCE(bytes_out, 0.0) / 1000000000.0 AS net_out + FROM logs1 + WHERE machine_name IN ('allsorts','andes','bigred','blackjack','bonbon', + 'cadbury','chiclets','cotton','crows','dove','fireball','hearts','huey', + 'lindt','milkduds','milkyway','mnm','necco','nerds','orbit','peeps', + 'poprocks','razzles','runts','smarties','smuggler','spree','stride', + 'tootsie','trident','wrigley','york') +) AS r +GROUP BY dt, + hr +ORDER BY both_sum DESC +LIMIT 10; +``` + +```sql +-- Q2.1: éŽåŽ»2週間ã«ã‚µãƒ¼ãƒãƒ¼ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã©ã‚Œã§ã™ã‹ï¼Ÿ + +SELECT * +FROM logs2 +WHERE status_code >= 500 + AND log_time >= TIMESTAMP '2012-12-18 00:00:00' +ORDER BY log_time; +``` + +```sql +-- Q2.2: 特定ã®2週間ã®æœŸé–“中ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ‘スワードファイルãŒæ¼æ´©ã—ã¾ã—ãŸã‹ï¼Ÿ + +SELECT * +FROM logs2 +WHERE status_code >= 200 + AND status_code < 300 + AND request LIKE '%/etc/passwd%' + AND log_time >= TIMESTAMP '2012-05-06 00:00:00' + AND log_time < TIMESTAMP '2012-05-20 00:00:00'; +``` + + +```sql +-- Q2.3: éŽåŽ»1ã‹æœˆã®ãƒˆãƒƒãƒ—レベルリクエストã®å¹³å‡ãƒ‘ス深ã•ã¯ã©ã®ãらã„ã§ã™ã‹ï¼Ÿ + +SELECT top_level, + AVG(LENGTH(request) - LENGTH(REPLACE(request, '/', ''))) AS depth_avg +FROM ( + SELECT SUBSTRING(request FROM 1 FOR len) AS top_level, + request + FROM ( + SELECT POSITION(SUBSTRING(request FROM 2), '/') AS len, + request + FROM logs2 + WHERE status_code >= 200 + AND status_code < 300 + AND log_time >= TIMESTAMP '2012-12-01 00:00:00' + ) AS r + WHERE len > 0 +) AS s +WHERE top_level IN ('/about','/courses','/degrees','/events', + '/grad','/industry','/news','/people', + '/publications','/research','/teaching','/ugrad') +GROUP BY top_level +ORDER BY top_level; +``` + + +```sql +-- Q2.4: éŽåŽ»3ã‹æœˆé–“ã§éŽå‰°ãªãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’è¡Œã£ãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ã©ã‚Œã§ã™ã‹ï¼Ÿ + +SELECT client_ip, + COUNT(*) AS num_requests +FROM logs2 +WHERE log_time >= TIMESTAMP '2012-10-01 00:00:00' +GROUP BY client_ip +HAVING COUNT(*) >= 100000 +ORDER BY num_requests DESC; +``` + + +```sql +-- Q2.5: 日別ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãƒ“ジター数ã¯ã©ã‚Œã ã‘ã§ã™ã‹ï¼Ÿ + +SELECT dt, + COUNT(DISTINCT client_ip) +FROM ( + SELECT CAST(log_time AS DATE) AS dt, + client_ip + FROM logs2 +) AS r +GROUP BY dt +ORDER BY dt; +``` + + +```sql +-- Q2.6: å¹³å‡ãŠã‚ˆã³æœ€å¤§ãƒ‡ãƒ¼ã‚¿è»¢é€é€Ÿåº¦ (Gbps) ã¯ã©ã‚Œã ã‘ã§ã™ã‹ï¼Ÿ + +SELECT AVG(transfer) / 125000000.0 AS transfer_avg, + MAX(transfer) / 125000000.0 AS transfer_max +FROM ( + SELECT log_time, + SUM(object_size) AS transfer + FROM logs2 + GROUP BY log_time +) AS r; +``` + + +```sql +-- Q3.1: 室内温度ãŒé€±æœ«ã«æ°·ç‚¹ä¸‹ã«ãªã£ãŸã“ã¨ãŒã‚ã‚Šã¾ã™ã‹ï¼Ÿ + +SELECT * +FROM logs3 +WHERE event_type = 'temperature' + AND event_value <= 32.0 + AND log_time >= '2019-11-29 17:00:00.000'; +``` + + +```sql +-- Q3.4: éŽåŽ»6ヶ月間ã§å„ドアãŒé–‹ã‹ã‚ŒãŸé »åº¦ã¯ã©ã®ãらã„ã§ã™ã‹ï¼Ÿ + +SELECT device_name, + device_floor, + COUNT(*) AS ct +FROM logs3 +WHERE event_type = 'door_open' + AND log_time >= '2019-06-01 00:00:00.000' +GROUP BY device_name, + device_floor +ORDER BY ct DESC; +``` + +以下ã®ã‚¯ã‚¨ãƒª3.5ã§ã¯UNIONを使用ã—ã¦ã„ã¾ã™ã€‚SELECTクエリçµæžœã‚’çµåˆã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã‚’設定ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€æ˜Žç¤ºçš„ã«UNION ALLã¾ãŸã¯UNION DISTINCTを指定ã—ã¦ã„ãªã„å ´åˆã«ã€UNIONã¨å…±æœ‰ã•ã‚Œã¦ã„ã‚‹ã¨ãã«ã®ã¿ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +```sql +SET union_default_mode = 'DISTINCT' +``` + +```sql +-- Q3.5: 冬ã¨å¤ã§å¤§ããªæ¸©åº¦å¤‰å‹•ãŒç™ºç”Ÿã™ã‚‹ã®ã¯å»ºç‰©ã®ã©ã“ã§ã™ã‹ï¼Ÿ + +WITH temperature AS ( + SELECT dt, + device_name, + device_type, + device_floor + FROM ( + SELECT dt, + hr, + device_name, + device_type, + device_floor, + AVG(event_value) AS temperature_hourly_avg + FROM ( + SELECT CAST(log_time AS DATE) AS dt, + EXTRACT(HOUR FROM log_time) AS hr, + device_name, + device_type, + device_floor, + event_value + FROM logs3 + WHERE event_type = 'temperature' + ) AS r + GROUP BY dt, + hr, + device_name, + device_type, + device_floor + ) AS s + GROUP BY dt, + device_name, + device_type, + device_floor + HAVING MAX(temperature_hourly_avg) - MIN(temperature_hourly_avg) >= 25.0 +) +SELECT DISTINCT device_name, + device_type, + device_floor, + 'WINTER' +FROM temperature +WHERE dt >= DATE '2018-12-01' + AND dt < DATE '2019-03-01' +UNION +SELECT DISTINCT device_name, + device_type, + device_floor, + 'SUMMER' +FROM temperature +WHERE dt >= DATE '2019-06-01' + AND dt < DATE '2019-09-01'; +``` + + +```sql +-- Q3.6: å„デãƒã‚¤ã‚¹ã‚«ãƒ†ã‚´ãƒªã«ã¤ã„ã¦ã€æœˆåˆ¥ã®é›»åŠ›æ¶ˆè²»ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯ã©ã®ãらã„ã§ã™ã‹ï¼Ÿ + +SELECT yr, + mo, + SUM(coffee_hourly_avg) AS coffee_monthly_sum, + AVG(coffee_hourly_avg) AS coffee_monthly_avg, + SUM(printer_hourly_avg) AS printer_monthly_sum, + AVG(printer_hourly_avg) AS printer_monthly_avg, + SUM(projector_hourly_avg) AS projector_monthly_sum, + AVG(projector_hourly_avg) AS projector_monthly_avg, + SUM(vending_hourly_avg) AS vending_monthly_sum, + AVG(vending_hourly_avg) AS vending_monthly_avg +FROM ( + SELECT dt, + yr, + mo, + hr, + AVG(coffee) AS coffee_hourly_avg, + AVG(printer) AS printer_hourly_avg, + AVG(projector) AS projector_hourly_avg, + AVG(vending) AS vending_hourly_avg + FROM ( + SELECT CAST(log_time AS DATE) AS dt, + EXTRACT(YEAR FROM log_time) AS yr, + EXTRACT(MONTH FROM log_time) AS mo, + EXTRACT(HOUR FROM log_time) AS hr, + CASE WHEN device_name LIKE 'coffee%' THEN event_value END AS coffee, + CASE WHEN device_name LIKE 'printer%' THEN event_value END AS printer, + CASE WHEN device_name LIKE 'projector%' THEN event_value END AS projector, + CASE WHEN device_name LIKE 'vending%' THEN event_value END AS vending + FROM logs3 + WHERE device_type = 'meter' + ) AS r + GROUP BY dt, + yr, + mo, + hr +) AS s +GROUP BY yr, + mo +ORDER BY yr, + mo; +``` + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ã€[Playground](https://sql.clickhouse.com)ã€[例](https://sql.clickhouse.com?query_id=1MXMHASDLEQIP4P1D1STND)ã§ã‚‚インタラクティブãªã‚¯ã‚¨ãƒªã«åˆ©ç”¨ã§ãã¾ã™ã€‚ diff --git a/docs/ja/getting-started/example-datasets/cell-towers.md b/docs/ja/getting-started/example-datasets/cell-towers.md new file mode 100644 index 00000000000..55bddb7cd48 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/cell-towers.md @@ -0,0 +1,368 @@ +--- +slug: /ja/getting-started/example-datasets/cell-towers +sidebar_label: 地ç†ãƒ‡ãƒ¼ã‚¿ +sidebar_position: 3 +title: "æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’使用ã—ãŸåœ°ç†ãƒ‡ãƒ¼ã‚¿" +--- + +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; +import ActionsMenu from '@site/docs/ja/_snippets/_service_actions_menu.md'; +import SQLConsoleDetail from '@site/docs/ja/_snippets/_launch_sql_console.md'; +import SupersetDocker from '@site/docs/ja/_snippets/_add_superset_detail.md'; + +## 目的 + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ä»¥ä¸‹ã®ã“ã¨ã‚’å­¦ã³ã¾ã™: +- OpenCelliDデータをClickHouseã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ +- Apache Supersetã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ +- データセットã«åŸºã¥ã„ãŸãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã™ã‚‹ + +以下ã¯ã“ã®ã‚¬ã‚¤ãƒ‰ã§ä½œæˆã™ã‚‹ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã®ãƒ—レビューã§ã™: + +![mcc 204ã®ãƒ©ã‚¸ã‚ªã‚¿ã‚¤ãƒ—別æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰](@site/docs/ja/getting-started/example-datasets/images/superset-cell-tower-dashboard.png) + +## データセットã®å–å¾— {#get-the-dataset} + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ã€ä¸–界最大ã®æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ã®ã‚ªãƒ¼ãƒ—ンデータベースã§ã‚ã‚‹[OpenCelliD](https://www.opencellid.org/)ã‹ã‚‰ã®ã‚‚ã®ã§ã™ã€‚ + +2021å¹´ç¾åœ¨ã€ä¸–界中ã®æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ï¼ˆGSMã€LTEã€UMTSãªã©ï¼‰ã«é–¢ã™ã‚‹4000万件以上ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒã€åœ°ç†çš„座標ã¨ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ï¼ˆå›½ã‚³ãƒ¼ãƒ‰ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãªã©ï¼‰ã¨å…±ã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +OpenCelliDプロジェクトã¯ã€Creative Commons Attribution-ShareAlike 4.0 International Licenseã®ä¸‹ã§ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã•ã‚Œã¦ãŠã‚Šã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ã‚¹ãƒŠãƒƒãƒ—ショットもåŒã˜ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã®æ¡ä»¶ã§å†é…布ã—ã¦ã„ã¾ã™ã€‚データセットã®æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã—ãŸå¾Œã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ + + + + +### サンプルデータをロードã™ã‚‹ + +ClickHouse Cloudã¯ã€S3ã‹ã‚‰ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’アップロードã™ã‚‹ãŸã‚ã®ç°¡å˜ãªæ–¹æ³•ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ [ClickHouse.cloud](https://clickhouse.cloud)ã§ç„¡æ–™ãƒˆãƒ©ã‚¤ã‚¢ãƒ«ã‚’作æˆã™ã‚‹ã‹ã€ã”所属ã®ClickHouse Cloud組織ã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ãã ã•ã„。 + + +**サンプルデータ**タブã‹ã‚‰**Cell Towers**データセットをé¸ã³ã€**データをロード**ã—ã¾ã™: + +![æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’ロード](@site/docs/ja/_snippets/images/cloud-load-data-sample.png) + +### cell_towersテーブルã®ã‚¹ã‚­ãƒ¼ãƒžã‚’確èªã™ã‚‹ +```sql +DESCRIBE TABLE cell_towers +``` + + + +以下ã¯`DESCRIBE`コマンドã®å‡ºåŠ›çµæžœã§ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã®å¾ŒåŠã§ã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚¿ã‚¤ãƒ—ã®é¸æŠžã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ +```response +┌─name──────────┬─type──────────────────────────────────────────────────────────────────┬ +│ radio │ Enum8('' = 0, 'CDMA' = 1, 'GSM' = 2, 'LTE' = 3, 'NR' = 4, 'UMTS' = 5) │ +│ mcc │ UInt16 │ +│ net │ UInt16 │ +│ area │ UInt16 │ +│ cell │ UInt64 │ +│ unit │ Int16 │ +│ lon │ Float64 │ +│ lat │ Float64 │ +│ range │ UInt32 │ +│ samples │ UInt32 │ +│ changeable │ UInt8 │ +│ created │ DateTime │ +│ updated │ DateTime │ +│ averageSignal │ UInt8 │ +└───────────────┴───────────────────────────────────────────────────────────────────────┴ +``` + + + + +1. 2021å¹´2月ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ã‚¹ãƒŠãƒƒãƒ—ショットをダウンロードã—ã¾ã™: [cell_towers.csv.xz](https://datasets.clickhouse.com/cell_towers.csv.xz) (686 MB). + +2. æ•´åˆæ€§ã‚’検証ã—ã¾ã™ï¼ˆã‚ªãƒ—ションã®æ‰‹é †ï¼‰: +```bash +md5sum cell_towers.csv.xz +``` +```response +8a797f7bdb55faba93f6cbc37d47b037 cell_towers.csv.xz +``` + +3. 次ã®ã‚³ãƒžãƒ³ãƒ‰ã§è§£å‡ã—ã¾ã™: +```bash +xz -d cell_towers.csv.xz +``` + +4. テーブルを作æˆã—ã¾ã™: + +```sql +CREATE TABLE cell_towers +( + radio Enum8('' = 0, 'CDMA' = 1, 'GSM' = 2, 'LTE' = 3, 'NR' = 4, 'UMTS' = 5), + mcc UInt16, + net UInt16, + area UInt16, + cell UInt64, + unit Int16, + lon Float64, + lat Float64, + range UInt32, + samples UInt32, + changeable UInt8, + created DateTime, + updated DateTime, + averageSignal UInt8 +) +ENGINE = MergeTree ORDER BY (radio, mcc, net, created); +``` + +5. データセットを挿入ã—ã¾ã™: +```bash +clickhouse-client --query "INSERT INTO cell_towers FORMAT CSVWithNames" < cell_towers.csv +``` + + + + +## ã„ãã¤ã‹ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ {#examples} + +1. 種類別ã®æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼æ•°: + +```sql +SELECT radio, count() AS c FROM cell_towers GROUP BY radio ORDER BY c DESC +``` +```response +┌─radio─┬────────c─┠+│ UMTS │ 20686487 │ +│ LTE │ 12101148 │ +│ GSM │ 9931304 │ +│ CDMA │ 556344 │ +│ NR │ 867 │ +└───────┴──────────┘ + +5 rows in set. Elapsed: 0.011 sec. Processed 43.28 million rows, 43.28 MB (3.83 billion rows/s., 3.83 GB/s.) +``` + +2. [æºå¸¯å›½ã‚³ãƒ¼ãƒ‰ (MCC)](https://en.wikipedia.org/wiki/Mobile_country_code)別ã®æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼: + +```sql +SELECT mcc, count() FROM cell_towers GROUP BY mcc ORDER BY count() DESC LIMIT 10 +``` +```response +┌─mcc─┬─count()─┠+│ 310 │ 5024650 │ +│ 262 │ 2622423 │ +│ 250 │ 1953176 │ +│ 208 │ 1891187 │ +│ 724 │ 1836150 │ +│ 404 │ 1729151 │ +│ 234 │ 1618924 │ +│ 510 │ 1353998 │ +│ 440 │ 1343355 │ +│ 311 │ 1332798 │ +└─────┴─────────┘ + +10 rows in set. Elapsed: 0.019 sec. Processed 43.28 million rows, 86.55 MB (2.33 billion rows/s., 4.65 GB/s.) +``` + +上記ã®ã‚¯ã‚¨ãƒªã¨[MCCリスト](https://en.wikipedia.org/wiki/Mobile_country_code)ã«åŸºã¥ã„ã¦ã€æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ãŒæœ€ã‚‚多ã„国ã¯ã‚¢ãƒ¡ãƒªã‚«ã€ãƒ‰ã‚¤ãƒ„ã€ãƒ­ã‚·ã‚¢ã§ã™ã€‚ + +ã“れらã®å€¤ã‚’デコードã™ã‚‹ãŸã‚ã«ã€ClickHouseã§[Dictionary](../../sql-reference/dictionaries/index.md)を作æˆã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## ユースケース: 地ç†ãƒ‡ãƒ¼ã‚¿ã®çµ„ã¿è¾¼ã¿ {#use-case} + +[`pointInPolygon`](/docs/ja/sql-reference/functions/geo/coordinates.md/#pointinpolygon)関数を使用ã—ã¾ã™ã€‚ + +1. 多角形を格ç´ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™: + + + + +```sql +CREATE TABLE moscow (polygon Array(Tuple(Float64, Float64))) +ORDER BY polygon; +``` + + + + +```sql +CREATE TEMPORARY TABLE +moscow (polygon Array(Tuple(Float64, Float64))); +``` + + + + +2. ã“ã‚Œã¯ãƒ¢ã‚¹ã‚¯ãƒ¯ã®å¤§ã¾ã‹ãªå½¢ã§ã™ï¼ˆ"æ–°ã—ã„モスクワ"ã‚’å«ã¾ãªã„): + +```sql +INSERT INTO moscow VALUES ([(37.84172564285271, 55.78000432402266), +(37.8381207618713, 55.775874525970494), (37.83979446823122, 55.775626746008065), (37.84243326983639, 55.77446586811748), (37.84262672750849, 55.771974101091104), (37.84153238623039, 55.77114545193181), (37.841124690460184, 55.76722010265554), +(37.84239076983644, 55.76654891107098), (37.842283558197025, 55.76258709833121), (37.8421759312134, 55.758073999993734), (37.84198330422974, 55.75381499999371), (37.8416827275085, 55.749277102484484), (37.84157576190186, 55.74794544108413), +(37.83897929098507, 55.74525257875241), (37.83739676451868, 55.74404373042019), (37.838732481460525, 55.74298009816793), (37.841183997352545, 55.743060321833575), (37.84097476190185, 55.73938799999373), (37.84048155819702, 55.73570799999372), +(37.840095812164286, 55.73228210777237), (37.83983814285274, 55.73080491981639), (37.83846476321406, 55.729799917464675), (37.83835745269769, 55.72919751082619), (37.838636380279524, 55.72859509486539), (37.8395161005249, 55.727705075632784), +(37.83897964285276, 55.722727886185154), (37.83862557539366, 55.72034817326636), (37.83559735744853, 55.71944437307499), (37.835370708803126, 55.71831419154461), (37.83738169402022, 55.71765218986692), (37.83823396494291, 55.71691750159089), +(37.838056931213345, 55.71547311301385), (37.836812846557606, 55.71221445615604), (37.83522525396725, 55.709331054395555), (37.83269301586908, 55.70953687463627), (37.829667367706236, 55.70903403789297), (37.83311126588435, 55.70552351822608), +(37.83058993121339, 55.70041317726053), (37.82983872750851, 55.69883771404813), (37.82934501586913, 55.69718947487017), (37.828926414016685, 55.69504441658371), (37.82876530422971, 55.69287499999378), (37.82894754100031, 55.690759754047335), +(37.827697554878185, 55.68951421135665), (37.82447346292115, 55.68965045405069), (37.83136543914793, 55.68322046195302), (37.833554015869154, 55.67814012759211), (37.83544184655761, 55.67295011628339), (37.837480388885474, 55.6672498719639), +(37.838960677246064, 55.66316274139358), (37.83926093121332, 55.66046999999383), (37.839025050262435, 55.65869897264431), (37.83670784390257, 55.65794084879904), (37.835656529083245, 55.65694309303843), (37.83704060449217, 55.65689306460552), +(37.83696819873806, 55.65550363526252), (37.83760389616388, 55.65487847246661), (37.83687972750851, 55.65356745541324), (37.83515216004943, 55.65155951234079), (37.83312418518067, 55.64979413590619), (37.82801726983639, 55.64640836412121), +(37.820614174591, 55.64164525405531), (37.818908190475426, 55.6421883258084), (37.81717543386075, 55.64112490388471), (37.81690987037274, 55.63916106913107), (37.815099354492155, 55.637925371757085), (37.808769150787356, 55.633798276884455), +(37.80100123544311, 55.62873670012244), (37.79598013491824, 55.62554336109055), (37.78634567724606, 55.62033499605651), (37.78334147619623, 55.618768681480326), (37.77746201055901, 55.619855533402706), (37.77527329626457, 55.61909966711279), +(37.77801986242668, 55.618770300976294), (37.778212973541216, 55.617257701952106), (37.77784818518065, 55.61574504433011), (37.77016867724609, 55.61148576294007), (37.760191219573976, 55.60599579539028), (37.75338926983641, 55.60227892751446), +(37.746329965606634, 55.59920577639331), (37.73939925396728, 55.59631430313617), (37.73273665739439, 55.5935318803559), (37.7299954450912, 55.59350760316188), (37.7268679946899, 55.59469840523759), (37.72626726983634, 55.59229549697373), +(37.7262673598022, 55.59081598950582), (37.71897193121335, 55.5877595845419), (37.70871550793456, 55.58393177431724), (37.700497489410374, 55.580917323756644), (37.69204305026244, 55.57778089778455), (37.68544477378839, 55.57815154690915), +(37.68391050793454, 55.57472945079756), (37.678803592590306, 55.57328235936491), (37.6743402539673, 55.57255251445782), (37.66813862698363, 55.57216388774464), (37.617927457672096, 55.57505691895805), (37.60443099999999, 55.5757737568051), +(37.599683515869145, 55.57749105910326), (37.59754177842709, 55.57796291823627), (37.59625834786988, 55.57906686095235), (37.59501783265684, 55.57746616444403), (37.593090671936025, 55.57671634534502), (37.587018007904, 55.577944600233785), +(37.578692203704804, 55.57982895000019), (37.57327546607398, 55.58116294118248), (37.57385012109279, 55.581550362779), (37.57399562266922, 55.5820107079112), (37.5735356072979, 55.58226289171689), (37.57290393054962, 55.582393529795155), +(37.57037722355653, 55.581919415056234), (37.5592298306885, 55.584471614867844), (37.54189249206543, 55.58867650795186), (37.5297256269836, 55.59158133551745), (37.517837865081766, 55.59443656218868), (37.51200186508174, 55.59635625174229), +(37.506808949737554, 55.59907823904434), (37.49820432275389, 55.6062944994944), (37.494406071441674, 55.60967103463367), (37.494760001358024, 55.61066689753365), (37.49397137107085, 55.61220931698269), (37.49016528606031, 55.613417718449064), +(37.48773249206542, 55.61530616333343), (37.47921386508177, 55.622640129112334), (37.470652153442394, 55.62993723476164), (37.46273446298218, 55.6368075123157), (37.46350692265317, 55.64068225239439), (37.46050283203121, 55.640794546982576), +(37.457627470916734, 55.64118904154646), (37.450718034393326, 55.64690488145138), (37.44239252645875, 55.65397824729769), (37.434587576721185, 55.66053543155961), (37.43582144975277, 55.661693766520735), (37.43576786245721, 55.662755031737014), +(37.430982915344174, 55.664610641628116), (37.428547447097685, 55.66778515273695), (37.42945134592044, 55.668633314343566), (37.42859571562949, 55.66948145750025), (37.4262836402282, 55.670813882451405), (37.418709037048295, 55.6811141674414), +(37.41922139651101, 55.68235377885389), (37.419218771842885, 55.68359335082235), (37.417196501327446, 55.684375235224735), (37.41607020370478, 55.68540557585352), (37.415640857147146, 55.68686637150793), (37.414632153442334, 55.68903015131686), +(37.413344899475064, 55.690896881757396), (37.41171432275391, 55.69264232162232), (37.40948282275393, 55.69455101638112), (37.40703674603271, 55.69638690385348), (37.39607169577025, 55.70451821283731), (37.38952706878662, 55.70942491932811), +(37.387778313491815, 55.71149057784176), (37.39049275399779, 55.71419814298992), (37.385557272491454, 55.7155489617061), (37.38388335714726, 55.71849856042102), (37.378368238098155, 55.7292763261685), (37.37763597123337, 55.730845879211614), +(37.37890062088197, 55.73167906388319), (37.37750451918789, 55.734703664681774), (37.375610832015965, 55.734851959522246), (37.3723813571472, 55.74105626086403), (37.37014935714723, 55.746115620904355), (37.36944173016362, 55.750883999993725), +(37.36975304365541, 55.76335905525834), (37.37244070571134, 55.76432079697595), (37.3724259757175, 55.76636979670426), (37.369922155757884, 55.76735417953104), (37.369892695770275, 55.76823419316575), (37.370214730163575, 55.782312184391266), +(37.370493611114505, 55.78436801120489), (37.37120164550783, 55.78596427165359), (37.37284851456452, 55.7874378183096), (37.37608325135799, 55.7886695054807), (37.3764587460632, 55.78947647305964), (37.37530000265506, 55.79146512926804), +(37.38235915344241, 55.79899647809345), (37.384344043655396, 55.80113596939471), (37.38594269577028, 55.80322699999366), (37.38711208598329, 55.804919036911976), (37.3880239841309, 55.806610999993666), (37.38928977249147, 55.81001864976979), +(37.39038389947512, 55.81348641242801), (37.39235781481933, 55.81983538336746), (37.393709457672124, 55.82417822811877), (37.394685720901464, 55.82792275755836), (37.39557615344238, 55.830447148154136), (37.39844478226658, 55.83167107969975), +(37.40019761214057, 55.83151823557964), (37.400398790382326, 55.83264967594742), (37.39659544313046, 55.83322180909622), (37.39667059524539, 55.83402792148566), (37.39682089947515, 55.83638877400216), (37.39643489154053, 55.83861656112751), +(37.3955338994751, 55.84072348043264), (37.392680272491454, 55.84502158126453), (37.39241188227847, 55.84659117913199), (37.392529730163616, 55.84816071336481), (37.39486835714723, 55.85288092980303), (37.39873052645878, 55.859893456073635), +(37.40272161111449, 55.86441833633205), (37.40697072750854, 55.867579567544375), (37.410007082016016, 55.868369880337), (37.4120992989502, 55.86920843741314), (37.412668021163924, 55.87055369615854), (37.41482461111453, 55.87170587948249), +(37.41862266137694, 55.873183961039565), (37.42413732540892, 55.874879126654704), (37.4312182698669, 55.875614937236705), (37.43111093783558, 55.8762723478417), (37.43332105622856, 55.87706546369396), (37.43385747619623, 55.87790681284802), +(37.441303050262405, 55.88027084462084), (37.44747234260555, 55.87942070143253), (37.44716141796871, 55.88072960917233), (37.44769797085568, 55.88121221323979), (37.45204320500181, 55.882080694420715), (37.45673176190186, 55.882346110794586), +(37.463383999999984, 55.88252729504517), (37.46682797486874, 55.88294937719063), (37.470014457672086, 55.88361266759345), (37.47751410450743, 55.88546991372396), (37.47860317658232, 55.88534929207307), (37.48165826025772, 55.882563306475106), +(37.48316434442331, 55.8815803226785), (37.483831555817645, 55.882427612793315), (37.483182967125686, 55.88372791409729), (37.483092277908824, 55.88495581062434), (37.4855716508179, 55.8875561994203), (37.486440636245746, 55.887827444039566), +(37.49014203439328, 55.88897899871799), (37.493210285705544, 55.890208937135604), (37.497512451065035, 55.891342397444696), (37.49780744510645, 55.89174030252967), (37.49940333499519, 55.89239745507079), (37.50018383334346, 55.89339220941865), +(37.52421672750851, 55.903869074155224), (37.52977457672118, 55.90564076517974), (37.53503220370484, 55.90661661218259), (37.54042858064267, 55.90714113744566), (37.54320461007303, 55.905645048442985), (37.545686966066306, 55.906608607018505), +(37.54743976120755, 55.90788552162358), (37.55796999999999, 55.90901557907218), (37.572711542327866, 55.91059395704873), (37.57942799999998, 55.91073854155573), (37.58502865872187, 55.91009969268444), (37.58739968913264, 55.90794809960554), +(37.59131567193598, 55.908713267595054), (37.612687423278814, 55.902866854295375), (37.62348079629517, 55.90041967242986), (37.635797880950896, 55.898141151686396), (37.649487626983664, 55.89639275532968), (37.65619302513125, 55.89572360207488), +(37.66294133862307, 55.895295577183965), (37.66874564418033, 55.89505457604897), (37.67375601586915, 55.89254677027454), (37.67744661901856, 55.8947775867987), (37.688347, 55.89450045676125), (37.69480554232789, 55.89422926332761), +(37.70107096560668, 55.89322256101114), (37.705962965606716, 55.891763491662616), (37.711885134918205, 55.889110234998974), (37.71682005026245, 55.886577568759876), (37.7199315476074, 55.88458159806678), (37.72234560316464, 55.882281005794134), +(37.72364385977171, 55.8809452036196), (37.725371142837474, 55.8809722706006), (37.727870902099546, 55.88037213862385), (37.73394330422971, 55.877941504088696), (37.745339592590376, 55.87208120378722), (37.75525267724611, 55.86703807949492), +(37.76919976190188, 55.859821640197474), (37.827835219574, 55.82962968399116), (37.83341438888553, 55.82575289922351), (37.83652584655761, 55.82188784027888), (37.83809213491821, 55.81612575504693), (37.83605359521481, 55.81460347077685), +(37.83632178569025, 55.81276696067908), (37.838623105812026, 55.811486181656385), (37.83912198147584, 55.807329380532785), (37.839079078033414, 55.80510270463816), (37.83965844708251, 55.79940712529036), (37.840581150787344, 55.79131399999368), +(37.84172564285271, 55.78000432402266)]); +``` + +3. モスクワã«ã©ã®ãらã„ã®æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ãŒã‚ã‚‹ã®ã‹ã‚’確èªã—ã¾ã™: + +```sql +SELECT count() FROM cell_towers +WHERE pointInPolygon((lon, lat), (SELECT * FROM moscow)) +``` +```response +┌─count()─┠+│ 310463 │ +└─────────┘ + +1 rows in set. Elapsed: 0.067 sec. Processed 43.28 million rows, 692.42 MB (645.83 million rows/s., 10.33 GB/s.) +``` + +## スキーマã®å¾©ç¿’ + +Supersetã§ã®è¦–覚化を構築ã™ã‚‹å‰ã«ã€ä½¿ç”¨ã™ã‚‹ã‚«ãƒ©ãƒ ã‚’確èªã—ã¦ãŠãã¾ã—ょã†ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ä¸»ã«ã€ä¸–界中ã®æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ã®ä½ç½®ï¼ˆçµŒåº¦ã¨ç·¯åº¦ï¼‰ã¨ãƒ©ã‚¸ã‚ªã®ç¨®é¡žã‚’æä¾›ã—ã¾ã™ã€‚カラムã®èª¬æ˜Žã¯[コミュニティフォーラム](https://community.opencellid.org/t/documenting-the-columns-in-the-downloadable-cells-database-csv/186)ã«ã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§æ§‹ç¯‰ã™ã‚‹è¦–覚化ã§ä½¿ç”¨ã™ã‚‹ã‚«ãƒ©ãƒ ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +OpenCelliDフォーラムã‹ã‚‰å¼•ç”¨ã—ãŸã‚«ãƒ©ãƒ ã®èª¬æ˜Ž: + +| カラム | 説明 | +|--------------|---------------------------------------------------------------| +| radio | 技術世代: CDMAã€GSMã€UMTSã€5G NR | +| mcc | æºå¸¯å›½ã‚³ãƒ¼ãƒ‰: `204` ã¯ã‚ªãƒ©ãƒ³ãƒ€ | +| lon | 経度: 緯度ã¨åˆã‚ã›ã¦ã€ã‚¿ãƒ¯ãƒ¼ã®ä½ç½®ã‚’大ã¾ã‹ã«ç¤ºã™ | +| lat | 緯度: 経度ã¨åˆã‚ã›ã¦ã€ã‚¿ãƒ¯ãƒ¼ã®ä½ç½®ã‚’大ã¾ã‹ã«ç¤ºã™ | + +:::tip mcc +ã‚ãªãŸã®MCCを見ã¤ã‘ã‚‹ã«ã¯ã€[æºå¸¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚³ãƒ¼ãƒ‰](https://en.wikipedia.org/wiki/Mobile_country_code)を確èªã—ã€**æºå¸¯å›½ã‚³ãƒ¼ãƒ‰**カラムã®3æ¡ã‚’使用ã—ã¦ãã ã•ã„。 +::: + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ã‚­ãƒ¼ãƒžã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ã‚³ãƒ³ãƒ‘クトãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã‚¯ã‚¨ãƒªé€Ÿåº¦ã‚’考慮ã—ã¦è¨­è¨ˆã•ã‚Œã¾ã—ãŸã€‚ +- `radio`データã¯æ–‡å­—列ã§ã¯ãªã`Enum8`(`UInt8`)ã¨ã—ã¦æ ¼ç´ã•ã‚Œã¦ã„ã¾ã™ã€‚ +- `mcc`ã¾ãŸã¯æºå¸¯å›½ã‚³ãƒ¼ãƒ‰ã¯ã€ç¯„囲ãŒ1ã‹ã‚‰999ã§ã‚ã‚‹ãŸã‚ã€`UInt16`ã¨ã—ã¦æ ¼ç´ã•ã‚Œã¦ã„ã¾ã™ã€‚ +- `lon`ã¨`lat`ã¯`Float64`ã§ã™ã€‚ + +ãã®ä»–ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã®ã‚¯ã‚¨ãƒªã‚„視覚化ã«ã¯ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€èˆˆå‘³ãŒã‚ã‚Œã°ä¸Šè¿°ã®ãƒ•ã‚©ãƒ¼ãƒ©ãƒ ã§è©³ã—ã説明ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## Apache Supersetã§ã®è¦–覚化を作æˆã™ã‚‹ + +Supersetã¯Dockerã‹ã‚‰ç°¡å˜ã«å®Ÿè¡Œã§ãã¾ã™ã€‚ã™ã§ã«SupersetãŒå‹•ä½œã—ã¦ã„ã‚‹å ´åˆã¯ã€`pip install clickhouse-connect`ã§ClickHouse Connectを追加ã™ã‚‹ã ã‘ã§ã™ã€‚Supersetをインストールã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ä»¥ä¸‹ã®**Dockerã§Apache Supersetã‚’èµ·å‹•**を直接å‚ç…§ã—ã¦ãã ã•ã„。 + + + +OpenCelliDデータセットを使用ã—ã¦Supersetダッシュボードを構築ã™ã‚‹ã«ã¯: +- ClickHouseサービスをSupersetã®**データベース**ã¨ã—ã¦è¿½åŠ ã™ã‚‹ +- テーブル**cell_towers**ã‚’Supersetã®**データセット**ã¨ã—ã¦è¿½åŠ ã™ã‚‹ +- **ãƒãƒ£ãƒ¼ãƒˆ**を作æˆã™ã‚‹ +- ãƒãƒ£ãƒ¼ãƒˆã‚’**ダッシュボード**ã«è¿½åŠ ã™ã‚‹ + +### ClickHouseサービスをSupersetデータベースã¨ã—ã¦è¿½åŠ ã™ã‚‹ + + + + Supersetã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ç¨®é¡žã‚’é¸æŠžã—ã€æŽ¥ç¶šæƒ…報をæä¾›ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’追加ã§ãã¾ã™ã€‚Supersetã‚’é–‹ãã€**+**を探ã—ã€ãã‚Œã«ã¯**データ**ã€ãã®å¾Œ**データベース接続**オプションãŒã‚ã‚Šã¾ã™ã€‚ + + ![データベースを追加](@site/docs/ja/getting-started/example-datasets/images/superset-add.png) + + リストã‹ã‚‰**ClickHouse Connect**ã‚’é¸æŠžã—ã¾ã™: + + ![データベースタイプã¨ã—ã¦ClickHouse Connectã‚’é¸æŠž](@site/docs/ja/getting-started/example-datasets/images/superset-choose-a-database.png) + +:::note + **ClickHouse Connect**ãŒã‚ªãƒ—ションã«ãªã„å ´åˆã¯ã€ãれをインストールã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚コマンドã¯`pip install clickhouse-connect`ã§ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](https://pypi.org/project/clickhouse-connect/)ã§ç¢ºèªã§ãã¾ã™ã€‚ +::: + +#### 接続情報を追加ã™ã‚‹: + +:::tip + ClickHouse Cloudã‚„SSLã®ä½¿ç”¨ãŒå¿…é ˆã®ä»–ã®ClickHouseシステムã«æŽ¥ç¶šã™ã‚‹ã¨ãã¯ã€**SSL**をオンã«ã™ã‚‹ã“ã¨ã‚’忘れãªã„ã§ãã ã•ã„。 +::: + + ![Supersetデータソースã¨ã—ã¦ClickHouseを追加](@site/docs/ja/getting-started/example-datasets/images/superset-connect-a-database.png) + +### テーブル**cell_towers**ã‚’Superset**データセット**ã¨ã—ã¦è¿½åŠ ã™ã‚‹ + + Supersetã§ã¯ã€**データセット**ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚データセットを追加ã—ã¦ã€ClickHouseサービスã€ãƒ†ãƒ¼ãƒ–ルãŒå«ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ï¼ˆ`default`)ã€`cell_towers`テーブルをé¸æŠžã—ã¾ã™: + +![データセットã¨ã—ã¦cell_towersテーブルを追加](@site/docs/ja/getting-started/example-datasets/images/superset-add-dataset.png) + +### **ãƒãƒ£ãƒ¼ãƒˆ**を作æˆã™ã‚‹ + +Supersetã§ãƒãƒ£ãƒ¼ãƒˆã‚’追加ã™ã‚‹ã¨ãã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆï¼ˆ`cell_towers`)ã¨ãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒ—を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚OpenCelliDデータセットã§ã¯ã€æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ã®ç·¯åº¦ã¨çµŒåº¦ã®åº§æ¨™ãŒæä¾›ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€**マップ**ãƒãƒ£ãƒ¼ãƒˆã‚’作æˆã—ã¾ã™ã€‚**deck.gL Scatterplot**タイプã¯ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«é©ã—ã¦ãŠã‚Šã€åœ°å›³ä¸Šã®å¯†é›†ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒã‚¤ãƒ³ãƒˆã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ + +![Supersetã§ã®åœ°å›³ä½œæˆ](@site/docs/ja/getting-started/example-datasets/images/superset-create-map.png) + +#### 地図ã§ä½¿ç”¨ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’指定ã™ã‚‹ + +deck.gl Scatterplotã¯çµŒåº¦ã¨ç·¯åº¦ã‚’å¿…è¦ã¨ã—ã€ã‚¯ã‚¨ãƒªã«ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’é©ç”¨ã§ãã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€UMTSラジオをæŒã¤æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ã¨ã€ã‚ªãƒ©ãƒ³ãƒ€ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¢ãƒã‚¤ãƒ«å›½ã‚³ãƒ¼ãƒ‰ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ãŒé©ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +`lon`ãŠã‚ˆã³`lat`フィールドã«ã¯ã€çµŒåº¦ã¨ç·¯åº¦ãŒå«ã¾ã‚Œã¦ã„ã¾ã™: + +![経度ã¨ç·¯åº¦ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’指定](@site/docs/ja/getting-started/example-datasets/images/superset-lon-lat.png) + +`mcc` = `204` ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’追加ã—ã¾ã™ï¼ˆã¾ãŸã¯ã€ä»»æ„ã®`mcc`値ã«ç½®ãæ›ãˆã‚‹ï¼‰: + +![MCC 204ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°](@site/docs/ja/getting-started/example-datasets/images/superset-mcc-204.png) + +`radio` = `'UMTS'` ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’追加ã—ã¾ã™ï¼ˆã¾ãŸã¯ã€ä»»æ„ã®`radio`値ã«ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`DESCRIBE TABLE cell_towers`ã®å‡ºåŠ›ã§é¸æŠžè‚¢ã‚’確èªã§ãã¾ã™ï¼‰: + +![radio = UMTSã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°](@site/docs/ja/getting-started/example-datasets/images/superset-radio-umts.png) + +ã“れ㯠`radio = 'UMTS'` 㨠`mcc = 204`ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ãƒãƒ£ãƒ¼ãƒˆã®å®Œå…¨ãªè¨­å®šã§ã™: + +![MCC 204ã®UMTSラジオã®ãƒãƒ£ãƒ¼ãƒˆ](@site/docs/ja/getting-started/example-datasets/images/superset-umts-netherlands.png) + +**UPDATE CHART**をクリックã—ã¦ã€è¦–覚化をレンダリングã—ã¾ã™ã€‚ + +### ãƒãƒ£ãƒ¼ãƒˆã‚’**ダッシュボード**ã«è¿½åŠ ã™ã‚‹ + +ã“ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã§ã¯ã€LTEã€UMTSã€ãŠã‚ˆã³GSMラジオをæ­è¼‰ã—ãŸæºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ã®ä½ç½®ãŒç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒãƒ£ãƒ¼ãƒˆã¯åŒã˜æ–¹æ³•ã§ä½œæˆã•ã‚Œã€ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + + ![mcc 204ã®ãƒ©ã‚¸ã‚ªã‚¿ã‚¤ãƒ—別æºå¸¯é›»è©±ã‚¿ãƒ¯ãƒ¼ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰](@site/docs/ja/getting-started/example-datasets/images/superset-cell-tower-dashboard.png) + +:::tip +ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯[Playground](https://sql.clickhouse.com)ã§ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªã‚¯ã‚¨ãƒªã«åˆ©ç”¨ã§ãã¾ã™ã€‚ + +ã“ã®[例](https://sql.clickhouse.com?query_id=UV8M4MAGS2PWAUOAYAAARM)ã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ã‚¯ã‚¨ãƒªã‚‚自動的ã«å…¥åŠ›ã•ã‚Œã¾ã™ã€‚ + +Playgroundã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã€Supersetを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼ˆãƒ›ã‚¹ãƒˆåã¨ãƒãƒ¼ãƒˆç•ªå·ã‚’調整ã—ã¦ãã ã•ã„)。 +::: diff --git a/docs/ja/getting-started/example-datasets/covid19.md b/docs/ja/getting-started/example-datasets/covid19.md new file mode 100644 index 00000000000..74c79a271a9 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/covid19.md @@ -0,0 +1,265 @@ +--- +slug: /ja/getting-started/example-datasets/covid19 +sidebar_label: COVID-19 オープンデータ +--- + +# COVID-19 オープンデータ + +COVID-19 オープンデータã¯ã€æœ€å¤§ã®Covid-19疫学データベースを構築ã—ã€åºƒç¯„ãªå…±å¤‰é‡ã®å¼·åŠ›ãªã‚»ãƒƒãƒˆã‚’æä¾›ã™ã‚‹ã“ã¨ã‚’試ã¿ã¦ã„ã¾ã™ã€‚人å£çµ±è¨ˆã€çµŒæ¸ˆã€ç–«å­¦ã€åœ°ç†ã€å¥åº·ã€å…¥é™¢ã€ç§»å‹•ã€æ”¿åºœã®å¯¾å¿œã€å¤©å€™ãªã©ã«é–¢ã™ã‚‹ã‚ªãƒ¼ãƒ—ンã§å…¬é–‹ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +詳細ã¯GitHubã®[ã“ã¡ã‚‰](https://github.com/GoogleCloudPlatform/covid-19-open-data)ã«ã‚ã‚Šã¾ã™ã€‚ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«æŒ¿å…¥ã™ã‚‹ã®ã¯ç°¡å˜ã§ã™... + +:::note +以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ [ClickHouse Cloud](https://clickhouse.cloud) ã®**本番環境**ã§å®Ÿè¡Œã•ã‚Œã¾ã—ãŸã€‚ローカルインストールã§ã‚‚ç°¡å˜ã«å®Ÿè¡Œã§ãã¾ã™ã€‚ +::: + +1. データã®å½¢ã‚’見ã¦ã¿ã¾ã—ょã†: + +```sql +DESCRIBE url( + 'https://storage.googleapis.com/covid19-open-data/v3/epidemiology.csv', + 'CSVWithNames' +); +``` + +ã“ã®CSVファイルã«ã¯10ã®ã‚«ãƒ©ãƒ ãŒã‚ã‚Šã¾ã™: + +```response +┌─name─────────────────┬─type─────────────┠+│ date │ Nullable(Date) │ +│ location_key │ Nullable(String) │ +│ new_confirmed │ Nullable(Int64) │ +│ new_deceased │ Nullable(Int64) │ +│ new_recovered │ Nullable(Int64) │ +│ new_tested │ Nullable(Int64) │ +│ cumulative_confirmed │ Nullable(Int64) │ +│ cumulative_deceased │ Nullable(Int64) │ +│ cumulative_recovered │ Nullable(Int64) │ +│ cumulative_tested │ Nullable(Int64) │ +└──────────────────────┴──────────────────┘ + +10 rows in set. Elapsed: 0.745 sec. +``` + +2. 次ã«ã„ãã¤ã‹ã®è¡Œã‚’見ã¦ã¿ã¾ã—ょã†: + +```sql +SELECT * +FROM url('https://storage.googleapis.com/covid19-open-data/v3/epidemiology.csv') +LIMIT 100; +``` + +`url`関数ã¯CSVファイルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ç°¡å˜ã«èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```response +┌─c1─────────┬─c2───────────┬─c3────────────┬─c4───────────┬─c5────────────┬─c6─────────┬─c7───────────────────┬─c8──────────────────┬─c9───────────────────┬─c10───────────────┠+│ date │ location_key │ new_confirmed │ new_deceased │ new_recovered │ new_tested │ cumulative_confirmed │ cumulative_deceased │ cumulative_recovered │ cumulative_tested │ +│ 2020-04-03 │ AD │ 24 │ 1 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 466 │ 17 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +│ 2020-04-04 │ AD │ 57 │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 523 │ 17 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +│ 2020-04-05 │ AD │ 17 │ 4 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 540 │ 21 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +│ 2020-04-06 │ AD │ 11 │ 1 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 551 │ 22 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +│ 2020-04-07 │ AD │ 15 │ 2 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 566 │ 24 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +│ 2020-04-08 │ AD │ 23 │ 2 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 589 │ 26 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +└────────────┴──────────────┴───────────────┴──────────────┴───────────────┴────────────┴──────────────────────┴─────────────────────┴──────────────────────┴───────────────────┘ +``` + +3. データã®å½¢ãŒã‚ã‹ã£ãŸã®ã§ã€ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™: + +```sql +CREATE TABLE covid19 ( + date Date, + location_key LowCardinality(String), + new_confirmed Int32, + new_deceased Int32, + new_recovered Int32, + new_tested Int32, + cumulative_confirmed Int32, + cumulative_deceased Int32, + cumulative_recovered Int32, + cumulative_tested Int32 +) +ENGINE = MergeTree +ORDER BY (location_key, date); +``` + +4. 以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€`covid19`テーブルã«å…¨ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’挿入ã—ã¾ã™: + +```sql +INSERT INTO covid19 + SELECT * + FROM + url( + 'https://storage.googleapis.com/covid19-open-data/v3/epidemiology.csv', + CSVWithNames, + 'date Date, + location_key LowCardinality(String), + new_confirmed Int32, + new_deceased Int32, + new_recovered Int32, + new_tested Int32, + cumulative_confirmed Int32, + cumulative_deceased Int32, + cumulative_recovered Int32, + cumulative_tested Int32' + ); +``` + +5. 処ç†ã¯éžå¸¸ã«é€Ÿã進行ã—ã¾ã™ - 挿入ã•ã‚ŒãŸè¡Œæ•°ã‚’確èªã—ã¦ã¿ã¾ã—ょã†: + +```sql +SELECT formatReadableQuantity(count()) +FROM covid19; +``` + +```response +┌─formatReadableQuantity(count())─┠+│ 12.53 million │ +└─────────────────────────────────┘ +``` + +6. Covid-19ã«é–¢ã—ã¦è¨˜éŒ²ã•ã‚ŒãŸç·ç—‡ä¾‹æ•°ã‚’見ã¦ã¿ã¾ã—ょã†: + +```sql +SELECT formatReadableQuantity(sum(new_confirmed)) +FROM covid19; +``` + +```response +┌─formatReadableQuantity(sum(new_confirmed))─┠+│ 1.39 billion │ +└────────────────────────────────────────────┘ +``` + +7. データã«ã¯0ãŒå¤šãå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã«æ°—ã¥ãã§ã—ょㆠ- 週末や日々ã®å ±å‘ŠãŒã•ã‚Œãªã‹ã£ãŸæ—¥ã§ã™ã€‚ウィンドウ関数を使用ã—ã¦æ–°ã—ã„症例ã®æ¯Žæ—¥ã®å¹³å‡ã‚’スムーズã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```sql +SELECT + AVG(new_confirmed) OVER (PARTITION BY location_key ORDER BY date ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING) AS cases_smoothed, + new_confirmed, + location_key, + date +FROM covid19; +``` + +8. ã“ã®ã‚¯ã‚¨ãƒªã¯ã€å„場所ã®æœ€æ–°å€¤ã‚’決定ã—ã¾ã™ã€‚ã™ã¹ã¦ã®å›½ãŒæ¯Žæ—¥å ±å‘Šã—ãŸã‚ã‘ã§ã¯ãªã„ãŸã‚ã€`max(date)`を使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ãã®ãŸã‚ã€`ROW_NUMBER`を使用ã—ã¦æœ€å¾Œã®è¡Œã‚’å–å¾—ã—ã¾ã™: + +```sql +WITH latest_deaths_data AS + ( SELECT location_key, + date, + new_deceased, + new_confirmed, + ROW_NUMBER() OVER (PARTITION BY location_key ORDER BY date DESC) as rn + FROM covid19) +SELECT location_key, + date, + new_deceased, + new_confirmed, + rn +FROM latest_deaths_data +WHERE rn=1; +``` + +9. `lagInFrame`を使用ã—ã¦ã€å„æ—¥ã®æ–°ã—ã„症例ã®é…延を決定ã§ãã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã§ã¯`US_DC`ã®å ´æ‰€ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¾ã™: + +```sql +SELECT + new_confirmed - lagInFrame(new_confirmed,1) OVER (PARTITION BY location_key ORDER BY date) AS confirmed_cases_delta, + new_confirmed, + location_key, + date +FROM covid19 +WHERE location_key = 'US_DC'; +``` + +出力ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +```response +┌─confirmed_cases_delta─┬─new_confirmed─┬─location_key─┬───────date─┠+│ 0 │ 0 │ US_DC │ 2020-03-08 │ +│ 2 │ 2 │ US_DC │ 2020-03-09 │ +│ -2 │ 0 │ US_DC │ 2020-03-10 │ +│ 6 │ 6 │ US_DC │ 2020-03-11 │ +│ -6 │ 0 │ US_DC │ 2020-03-12 │ +│ 0 │ 0 │ US_DC │ 2020-03-13 │ +│ 6 │ 6 │ US_DC │ 2020-03-14 │ +│ -5 │ 1 │ US_DC │ 2020-03-15 │ +│ 4 │ 5 │ US_DC │ 2020-03-16 │ +│ 4 │ 9 │ US_DC │ 2020-03-17 │ +│ -1 │ 8 │ US_DC │ 2020-03-18 │ +│ 24 │ 32 │ US_DC │ 2020-03-19 │ +│ -26 │ 6 │ US_DC │ 2020-03-20 │ +│ 15 │ 21 │ US_DC │ 2020-03-21 │ +│ -3 │ 18 │ US_DC │ 2020-03-22 │ +│ 3 │ 21 │ US_DC │ 2020-03-23 │ +``` + +10. ã“ã®ã‚¯ã‚¨ãƒªã¯ã€å„æ—¥ã®æ–°ã—ã„症例ã®å¤‰åŒ–率を計算ã—ã€çµæžœã‚»ãƒƒãƒˆã«å˜ç´”ãª`増加`ã¾ãŸã¯`減少`ã®åˆ—ã‚’å«ã‚ã¾ã™: + +```sql +WITH confirmed_lag AS ( + SELECT + *, + lagInFrame(new_confirmed) OVER( + PARTITION BY location_key + ORDER BY date + ) AS confirmed_previous_day + FROM covid19 +), +confirmed_percent_change AS ( + SELECT + *, + COALESCE(ROUND((new_confirmed - confirmed_previous_day) / confirmed_previous_day * 100), 0) AS percent_change + FROM confirmed_lag +) +SELECT + date, + new_confirmed, + percent_change, + CASE + WHEN percent_change > 0 THEN 'increase' + WHEN percent_change = 0 THEN 'no change' + ELSE 'decrease' + END AS trend +FROM confirmed_percent_change +WHERE location_key = 'US_DC'; +``` + +çµæžœã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ + +```response +┌───────date─┬─new_confirmed─┬─percent_change─┬─trend─────┠+│ 2020-03-08 │ 0 │ nan │ decrease │ +│ 2020-03-09 │ 2 │ inf │ increase │ +│ 2020-03-10 │ 0 │ -100 │ decrease │ +│ 2020-03-11 │ 6 │ inf │ increase │ +│ 2020-03-12 │ 0 │ -100 │ decrease │ +│ 2020-03-13 │ 0 │ nan │ decrease │ +│ 2020-03-14 │ 6 │ inf │ increase │ +│ 2020-03-15 │ 1 │ -83 │ decrease │ +│ 2020-03-16 │ 5 │ 400 │ increase │ +│ 2020-03-17 │ 9 │ 80 │ increase │ +│ 2020-03-18 │ 8 │ -11 │ decrease │ +│ 2020-03-19 │ 32 │ 300 │ increase │ +│ 2020-03-20 │ 6 │ -81 │ decrease │ +│ 2020-03-21 │ 21 │ 250 │ increase │ +│ 2020-03-22 │ 18 │ -14 │ decrease │ +│ 2020-03-23 │ 21 │ 17 │ increase │ +│ 2020-03-24 │ 46 │ 119 │ increase │ +│ 2020-03-25 │ 48 │ 4 │ increase │ +│ 2020-03-26 │ 36 │ -25 │ decrease │ +│ 2020-03-27 │ 37 │ 3 │ increase │ +│ 2020-03-28 │ 38 │ 3 │ increase │ +│ 2020-03-29 │ 59 │ 55 │ increase │ +│ 2020-03-30 │ 94 │ 59 │ increase │ +│ 2020-03-31 │ 91 │ -3 │ decrease │ +│ 2020-04-01 │ 67 │ -26 │ decrease │ +│ 2020-04-02 │ 104 │ 55 │ increase │ +│ 2020-04-03 │ 145 │ 39 │ increase │ +``` + +:::note +[GitHubリãƒã‚¸ãƒˆãƒª](https://github.com/GoogleCloudPlatform/covid-19-open-data)ã«è¨˜è¼‰ã•ã‚Œã¦ã„るよã†ã«ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯2022å¹´9月15日をもã£ã¦æ›´æ–°ãŒçµ‚了ã—ã¦ã„ã¾ã™ã€‚ +::: diff --git a/docs/ja/getting-started/example-datasets/criteo.md b/docs/ja/getting-started/example-datasets/criteo.md new file mode 100644 index 00000000000..8f2e2e975ce --- /dev/null +++ b/docs/ja/getting-started/example-datasets/criteo.md @@ -0,0 +1,166 @@ +--- +slug: /ja/getting-started/example-datasets/criteo +sidebar_label: Criteoã®ãƒ†ãƒ©ãƒã‚¤ãƒˆã‚¯ãƒªãƒƒã‚¯ãƒ­ã‚° +--- + +# Criteoã®ãƒ†ãƒ©ãƒã‚¤ãƒˆã‚¯ãƒªãƒƒã‚¯ãƒ­ã‚° + +データを以下ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ï¼šhttp://labs.criteo.com/downloads/download-terabyte-click-logs/ + +ログをインãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +``` sql +CREATE TABLE criteo_log ( + date Date, + clicked UInt8, + int1 Int32, + int2 Int32, + int3 Int32, + int4 Int32, + int5 Int32, + int6 Int32, + int7 Int32, + int8 Int32, + int9 Int32, + int10 Int32, + int11 Int32, + int12 Int32, + int13 Int32, + cat1 String, + cat2 String, + cat3 String, + cat4 String, + cat5 String, + cat6 String, + cat7 String, + cat8 String, + cat9 String, + cat10 String, + cat11 String, + cat12 String, + cat13 String, + cat14 String, + cat15 String, + cat16 String, + cat17 String, + cat18 String, + cat19 String, + cat20 String, + cat21 String, + cat22 String, + cat23 String, + cat24 String, + cat25 String, + cat26 String +) ENGINE = Log; +``` + +データを挿入ã—ã¾ã™ï¼š + +``` bash +$ for i in {00..23}; do echo $i; zcat datasets/criteo/day_${i#0}.gz | sed -r 's/^/2000-01-'${i/00/24}'\t/' | clickhouse-client --host=example-perftest01j --query="INSERT INTO criteo_log FORMAT TabSeparated"; done +``` + +変æ›ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +``` sql +CREATE TABLE criteo +( + date Date, + clicked UInt8, + int1 Int32, + int2 Int32, + int3 Int32, + int4 Int32, + int5 Int32, + int6 Int32, + int7 Int32, + int8 Int32, + int9 Int32, + int10 Int32, + int11 Int32, + int12 Int32, + int13 Int32, + icat1 UInt32, + icat2 UInt32, + icat3 UInt32, + icat4 UInt32, + icat5 UInt32, + icat6 UInt32, + icat7 UInt32, + icat8 UInt32, + icat9 UInt32, + icat10 UInt32, + icat11 UInt32, + icat12 UInt32, + icat13 UInt32, + icat14 UInt32, + icat15 UInt32, + icat16 UInt32, + icat17 UInt32, + icat18 UInt32, + icat19 UInt32, + icat20 UInt32, + icat21 UInt32, + icat22 UInt32, + icat23 UInt32, + icat24 UInt32, + icat25 UInt32, + icat26 UInt32 +) ENGINE = MergeTree() +PARTITION BY toYYYYMM(date) +ORDER BY (date, icat1) +``` + +生ログã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã—ã¦ã€2番目ã®ãƒ†ãƒ¼ãƒ–ルã«å…¥ã‚Œã¾ã™ï¼š + +``` sql +INSERT INTO + criteo +SELECT + date, + clicked, + int1, + int2, + int3, + int4, + int5, + int6, + int7, + int8, + int9, + int10, + int11, + int12, + int13, + reinterpretAsUInt32(unhex(cat1)) AS icat1, + reinterpretAsUInt32(unhex(cat2)) AS icat2, + reinterpretAsUInt32(unhex(cat3)) AS icat3, + reinterpretAsUInt32(unhex(cat4)) AS icat4, + reinterpretAsUInt32(unhex(cat5)) AS icat5, + reinterpretAsUInt32(unhex(cat6)) AS icat6, + reinterpretAsUInt32(unhex(cat7)) AS icat7, + reinterpretAsUInt32(unhex(cat8)) AS icat8, + reinterpretAsUInt32(unhex(cat9)) AS icat9, + reinterpretAsUInt32(unhex(cat10)) AS icat10, + reinterpretAsUInt32(unhex(cat11)) AS icat11, + reinterpretAsUInt32(unhex(cat12)) AS icat12, + reinterpretAsUInt32(unhex(cat13)) AS icat13, + reinterpretAsUInt32(unhex(cat14)) AS icat14, + reinterpretAsUInt32(unhex(cat15)) AS icat15, + reinterpretAsUInt32(unhex(cat16)) AS icat16, + reinterpretAsUInt32(unhex(cat17)) AS icat17, + reinterpretAsUInt32(unhex(cat18)) AS icat18, + reinterpretAsUInt32(unhex(cat19)) AS icat19, + reinterpretAsUInt32(unhex(cat20)) AS icat20, + reinterpretAsUInt32(unhex(cat21)) AS icat21, + reinterpretAsUInt32(unhex(cat22)) AS icat22, + reinterpretAsUInt32(unhex(cat23)) AS icat23, + reinterpretAsUInt32(unhex(cat24)) AS icat24, + reinterpretAsUInt32(unhex(cat25)) AS icat25, + reinterpretAsUInt32(unhex(cat26)) AS icat26 +FROM + criteo_log; + +DROP TABLE criteo_log; +``` diff --git a/docs/ja/getting-started/example-datasets/environmental-sensors.md b/docs/ja/getting-started/example-datasets/environmental-sensors.md new file mode 100644 index 00000000000..8bc08f4ecaa --- /dev/null +++ b/docs/ja/getting-started/example-datasets/environmental-sensors.md @@ -0,0 +1,173 @@ +--- +slug: /ja/getting-started/example-datasets/environmental-sensors +sidebar_label: 環境センサーã®ãƒ‡ãƒ¼ã‚¿ +--- + +# 環境センサーã®ãƒ‡ãƒ¼ã‚¿ + +[Sensor.Community](https://sensor.community/en/) ã¯ã€ã‚ªãƒ¼ãƒ—ン環境データを生æˆã™ã‚‹å…±åŒä½œæ¥­åž‹ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚»ãƒ³ã‚µãƒ¼ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã§ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ã€ä¸–界中ã®ã‚»ãƒ³ã‚µãƒ¼ã‹ã‚‰åŽé›†ã•ã‚Œã¦ã„ã¾ã™ã€‚誰ã§ã‚‚センサーを購入ã—ã¦ã€å¥½ããªå ´æ‰€ã«è¨­ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚データをダウンロードã™ã‚‹ãŸã‚ã®API㯠[GitHub](https://github.com/opendata-stuttgart/meta/wiki/APIs) ã«ã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã¯ [Database Contents License (DbCL)](https://opendatacommons.org/licenses/dbcl/1-0/) ã®ä¸‹ã§è‡ªç”±ã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +:::important +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯200億以上ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒã‚ã‚‹ãŸã‚ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’å˜ç´”ã«ã‚³ãƒ”ー&ペーストã™ã‚‹å ´åˆã¯ã€ãƒªã‚½ãƒ¼ã‚¹ãŒã“ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«è€ãˆã‚‰ã‚Œã‚‹ã‹æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€[ClickHouse Cloud](https://clickhouse.cloud) ã®**本番**インスタンスã§å®Ÿè¡Œã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +1. データã¯S3ã«ã‚ã‚‹ã®ã§ã€`s3`テーブル関数を使用ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルを作æˆã§ãã¾ã™ã€‚ã¾ãŸã€ãƒ‡ãƒ¼ã‚¿ã‚’ãã®ã¾ã¾ã‚¯ã‚¨ãƒªã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ClickHouseã«æŒ¿å…¥ã™ã‚‹å‰ã«ã„ãã¤ã‹ã®è¡Œã‚’見ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT * +FROM s3( + 'https://clickhouse-public-datasets.s3.eu-central-1.amazonaws.com/sensors/monthly/2019-06_bmp180.csv.zst', + 'CSVWithNames' + ) +LIMIT 10 +SETTINGS format_csv_delimiter = ';'; +``` + +データã¯CSVファイルã«ã‚ã‚Šã€ãƒ‡ãƒªãƒŸã‚¿ã¨ã—ã¦ã‚»ãƒŸã‚³ãƒ­ãƒ³ã‚’使用ã—ã¦ã„ã¾ã™ã€‚è¡Œã®å½¢å¼ã¯æ¬¡ã®ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™ï¼š + +```response +┌─sensor_id─┬─sensor_type─┬─location─┬────lat─┬────lon─┬─timestamp───────────┬──pressure─┬─altitude─┬─pressure_sealevel─┬─temperature─┠+│ 9119 │ BMP180 │ 4594 │ 50.994 │ 7.126 │ 2019-06-01T00:00:00 │ 101471 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 19.9 │ +│ 21210 │ BMP180 │ 10762 │ 42.206 │ 25.326 │ 2019-06-01T00:00:00 │ 99525 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 19.3 │ +│ 19660 │ BMP180 │ 9978 │ 52.434 │ 17.056 │ 2019-06-01T00:00:04 │ 101570 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 15.3 │ +│ 12126 │ BMP180 │ 6126 │ 57.908 │ 16.49 │ 2019-06-01T00:00:05 │ 101802.56 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 8.07 │ +│ 15845 │ BMP180 │ 8022 │ 52.498 │ 13.466 │ 2019-06-01T00:00:05 │ 101878 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 23 │ +│ 16415 │ BMP180 │ 8316 │ 49.312 │ 6.744 │ 2019-06-01T00:00:06 │ 100176 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 14.7 │ +│ 7389 │ BMP180 │ 3735 │ 50.136 │ 11.062 │ 2019-06-01T00:00:06 │ 98905 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 12.1 │ +│ 13199 │ BMP180 │ 6664 │ 52.514 │ 13.44 │ 2019-06-01T00:00:07 │ 101855.54 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 19.74 │ +│ 12753 │ BMP180 │ 6440 │ 44.616 │ 2.032 │ 2019-06-01T00:00:07 │ 99475 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 17 │ +│ 16956 │ BMP180 │ 8594 │ 52.052 │ 8.354 │ 2019-06-01T00:00:08 │ 101322 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 17.2 │ +└───────────┴─────────────┴──────────┴────────┴────────┴─────────────────────┴───────────┴──────────┴───────────────────┴─────────────┘ +``` + +2. データをClickHouseã«ä¿å­˜ã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®`MergeTree`テーブルを使用ã—ã¾ã™ï¼š + +```sql +CREATE TABLE sensors +( + sensor_id UInt16, + sensor_type Enum('BME280', 'BMP180', 'BMP280', 'DHT22', 'DS18B20', 'HPM', 'HTU21D', 'PMS1003', 'PMS3003', 'PMS5003', 'PMS6003', 'PMS7003', 'PPD42NS', 'SDS011'), + location UInt32, + lat Float32, + lon Float32, + timestamp DateTime, + P1 Float32, + P2 Float32, + P0 Float32, + durP1 Float32, + ratioP1 Float32, + durP2 Float32, + ratioP2 Float32, + pressure Float32, + altitude Float32, + pressure_sealevel Float32, + temperature Float32, + humidity Float32, + date Date MATERIALIZED toDate(timestamp) +) +ENGINE = MergeTree +ORDER BY (timestamp, sensor_id); +``` + +3. ClickHouse Cloud サービスã«ã¯ `default` ã¨ã„ã†åå‰ã®ã‚¯ãƒ©ã‚¹ã‚¿ãŒã‚ã‚Šã¾ã™ã€‚`s3Cluster` テーブル関数を使用ã—ã¦ã€ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰S3ファイルを並行ã—ã¦èª­ã¿è¾¼ã¿ã¾ã™ã€‚(クラスタãŒãªã„å ´åˆã¯ã€å˜ã« `s3` 関数を使用ã—ã€ã‚¯ãƒ©ã‚¹ã‚¿åを削除ã—ã¦ãã ã•ã„。) + +ã“ã®ã‚¯ã‚¨ãƒªã«ã¯æ™‚é–“ãŒã‹ã‹ã‚Šã¾ã™ - 圧縮ã•ã‚Œã¦ã„ãªã„データãŒç´„1.67Tã‚ã‚Šã¾ã™ï¼š + +```sql +INSERT INTO sensors + SELECT * + FROM s3Cluster( + 'default', + 'https://clickhouse-public-datasets.s3.amazonaws.com/sensors/monthly/*.csv.zst', + 'CSVWithNames', + $$ sensor_id UInt16, + sensor_type String, + location UInt32, + lat Float32, + lon Float32, + timestamp DateTime, + P1 Float32, + P2 Float32, + P0 Float32, + durP1 Float32, + ratioP1 Float32, + durP2 Float32, + ratioP2 Float32, + pressure Float32, + altitude Float32, + pressure_sealevel Float32, + temperature Float32, + humidity Float32 $$ + ) +SETTINGS + format_csv_delimiter = ';', + input_format_allow_errors_ratio = '0.5', + input_format_allow_errors_num = 10000, + input_format_parallel_parsing = 0, + date_time_input_format = 'best_effort', + max_insert_threads = 32, + parallel_distributed_insert_select = 1; +``` + +以下ã¯ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã§ã™ - 行数ã¨å‡¦ç†é€Ÿåº¦ã‚’示ã—ã¦ã„ã¾ã™ã€‚6Mè¡Œ/秒以上ã®é€Ÿåº¦ã§å…¥åŠ›ã•ã‚Œã¦ã„ã¾ã™ï¼ + +```response +0 rows in set. Elapsed: 3419.330 sec. Processed 20.69 billion rows, 1.67 TB (6.05 million rows/s., 488.52 MB/s.) +``` + +4. `sensors` テーブルã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ‡ã‚£ã‚¹ã‚¯ãŒã©ã‚Œãらã„å¿…è¦ã‹è¦‹ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT + disk_name, + formatReadableSize(sum(data_compressed_bytes) AS size) AS compressed, + formatReadableSize(sum(data_uncompressed_bytes) AS usize) AS uncompressed, + round(usize / size, 2) AS compr_rate, + sum(rows) AS rows, + count() AS part_count +FROM system.parts +WHERE (active = 1) AND (table = 'sensors') +GROUP BY + disk_name +ORDER BY size DESC; +``` + +1.67Tã¯310 GiBã«åœ§ç¸®ã•ã‚Œã¦ãŠã‚Šã€20.69å„„è¡ŒãŒã‚ã‚Šã¾ã™ï¼š + +```response +┌─disk_name─┬─compressed─┬─uncompressed─┬─compr_rate─┬────────rows─┬─part_count─┠+│ s3disk │ 310.21 GiB │ 1.30 TiB │ 4.29 │ 20693971809 │ 472 │ +└───────────┴────────────┴──────────────┴────────────┴─────────────┴────────────┘ +``` + +5. ãã‚Œã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ãŸã®ã§ã€åˆ†æžã‚’è¡Œã„ã¾ã—ょã†ã€‚センサーãŒå¢—ãˆãŸã“ã¨ã§ã€ãƒ‡ãƒ¼ã‚¿ã®é‡ãŒæ™‚é–“ã¨ã¨ã‚‚ã«å¢—加ã—ã¦ã„ã‚‹ã“ã¨ã«æ³¨ç›®ã—ã¦ãã ã•ã„: + +```sql +SELECT + date, + count() +FROM sensors +GROUP BY date +ORDER BY date ASC; +``` + +SQLコンソールã§çµæžœã‚’å¯è¦–化ã™ã‚‹ãŸã‚ã«ãƒãƒ£ãƒ¼ãƒˆã‚’作æˆã§ãã¾ã™ï¼š + +![Number of events per day](./images/sensors_01.png) + +6. 次ã®ã‚¯ã‚¨ãƒªã¯ã€éžå¸¸ã«æš‘ã湿度ã®é«˜ã„日数をカウントã—ã¾ã™ï¼š + +```sql +WITH + toYYYYMMDD(timestamp) AS day +SELECT day, count() FROM sensors +WHERE temperature >= 40 AND temperature <= 50 AND humidity >= 90 +GROUP BY day +ORDER BY day asc; +``` + +ã“ã¡ã‚‰ãŒãã®çµæžœã®è¦–覚化ã§ã™ï¼š + +![Hot and humid days](./images/sensors_02.png) + + diff --git a/docs/ja/getting-started/example-datasets/github-events.md b/docs/ja/getting-started/example-datasets/github-events.md new file mode 100644 index 00000000000..ddcf81f6a6c --- /dev/null +++ b/docs/ja/getting-started/example-datasets/github-events.md @@ -0,0 +1,9 @@ +--- +slug: /ja/getting-started/example-datasets/github-events +sidebar_label: GitHub Events +title: "GitHub Events データセット" +--- + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€2011å¹´ã‹ã‚‰2020å¹´12月6æ—¥ã¾ã§ã®GitHub上ã®ã™ã¹ã¦ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒå«ã¾ã‚Œã¦ãŠã‚Šã€ã‚µã‚¤ã‚ºã¯31億件ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã§ã™ã€‚ダウンロードサイズã¯75 GBã§ã€lz4圧縮を使用ã—ãŸãƒ†ãƒ¼ãƒ–ルã«æ ¼ç´ã™ã‚‹å ´åˆã€æœ€å¤§200 GBã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ãŒå¿…è¦ã§ã™ã€‚ + +データセットã®è©³ç´°ãªèª¬æ˜Žã€æ´žå¯Ÿã€ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰æ‰‹é †ã€ãŠã‚ˆã³ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªã‚¯ã‚¨ãƒªã¯[ã“ã¡ã‚‰](https://ghe.clickhouse.tech/)ã«æŽ²è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/getting-started/example-datasets/github.md b/docs/ja/getting-started/example-datasets/github.md new file mode 100644 index 00000000000..252737caaf9 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/github.md @@ -0,0 +1,2491 @@ +--- +slug: /ja/getting-started/example-datasets/github +sidebar_label: Githubリãƒã‚¸ãƒˆãƒª +sidebar_position: 1 +description: ClickHouseã®GitHubリãƒã‚¸ãƒˆãƒªã¾ãŸã¯ãŠå¥½ã¿ã®ãƒªãƒã‚¸ãƒˆãƒªã‚’分æžã—ã¾ã™ +--- + +# GitHubデータを使用ã—ãŸClickHouseã§ã®ã‚¯ã‚¨ãƒªè¨˜è¿° + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€ClickHouseリãƒã‚¸ãƒˆãƒªã®ã™ã¹ã¦ã®ã‚³ãƒŸãƒƒãƒˆã¨å¤‰æ›´ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ClickHouseã«ä»˜å±žã—ã¦ã„ã‚‹ãƒã‚¤ãƒ†ã‚£ãƒ–ã®`git-import`ツールを使用ã—ã¦ç”Ÿæˆã§ãã¾ã™ã€‚ + +生æˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯ã€ä»¥ä¸‹ã®å„テーブルã«å¯¾ã—ã¦`tsv`ファイルをæä¾›ã—ã¾ã™ï¼š + +- `commits` - 統計を伴ã†ã‚³ãƒŸãƒƒãƒˆã€‚ +- `file_changes` - å„コミットã§å¤‰æ›´ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã¨ã€ãã®å¤‰æ›´ã«é–¢ã™ã‚‹æƒ…å ±ãŠã‚ˆã³çµ±è¨ˆã€‚ +- `line_changes` - å„コミットã§å¤‰æ›´ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«å†…ã®å¤‰æ›´è¡Œã€ãŠã‚ˆã³ãã®è¡Œã«é–¢ã™ã‚‹å®Œå…¨ãªæƒ…å ±ãŠã‚ˆã³å‰å›žã®å¤‰æ›´ã«é–¢ã™ã‚‹æƒ…報。 + +2022å¹´11月8日時点ã§ã€å„TSVファイルã®ã‚µã‚¤ã‚ºã¨è¡Œæ•°ã¯ãŠãŠã‚ˆã以下ã®é€šã‚Šã§ã™ï¼š + +- `commits` - 7.8M - 266,051è¡Œ +- `file_changes` - 53M - 266,051è¡Œ +- `line_changes` - 2.7G - 7,535,157è¡Œ + +# 目次 + +- [GitHubデータを使用ã—ãŸClickHouseã§ã®ã‚¯ã‚¨ãƒªè¨˜è¿°](#githubデータを使用ã—ãŸclickhouseã§ã®ã‚¯ã‚¨ãƒªè¨˜è¿°) +- [目次](#目次) +- [データã®ç”Ÿæˆ](#データã®ç”Ÿæˆ) +- [データã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¨æŒ¿å…¥](#データã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¨æŒ¿å…¥) +- [クエリ](#クエリ) + - [å˜ä¸€ãƒ•ã‚¡ã‚¤ãƒ«ã®å±¥æ­´](#å˜ä¸€ãƒ•ã‚¡ã‚¤ãƒ«ã®å±¥æ­´) + - [ç¾åœ¨ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ファイルを見ã¤ã‘ã‚‹](#ç¾åœ¨ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ファイルを見ã¤ã‘ã‚‹) + - [最も多ã変更ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚’リストã™ã‚‹](#最も多ã変更ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚’リストã™ã‚‹) + - [コミットã¯é€šå¸¸ã€é€±ã®ã©ã®æ—¥ã«ç™ºç”Ÿã™ã‚‹ã‹ï¼Ÿ](#コミットã¯é€šå¸¸é€±ã®ã©ã®æ—¥ã«ç™ºç”Ÿã™ã‚‹ã‹) + - [サブディレクトリ/ファイルã®å±¥æ­´ - 行数ã€ã‚³ãƒŸãƒƒãƒˆæ•°ã€å¯„稿者数ã®æŽ¨ç§»](#サブディレクトリファイルã®å±¥æ­´---行数コミット数寄稿者数ã®æŽ¨ç§») + - [最大著者数ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒªã‚¹ãƒˆ](#最大著者数ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒªã‚¹ãƒˆ) + - [リãƒã‚¸ãƒˆãƒªå†…ã®æœ€å¤ã®ã‚³ãƒ¼ãƒ‰è¡Œ](#リãƒã‚¸ãƒˆãƒªå†…ã®æœ€å¤ã®ã‚³ãƒ¼ãƒ‰è¡Œ) + - [最もå¤ã„履歴をæŒã¤ãƒ•ã‚¡ã‚¤ãƒ«](#最もå¤ã„履歴をæŒã¤ãƒ•ã‚¡ã‚¤ãƒ«) + - [ドキュメントã¨ã‚³ãƒ¼ãƒ‰ã«é–¢ã™ã‚‹å¯„稿者ã®åˆ†å¸ƒ](#ドキュメントã¨ã‚³ãƒ¼ãƒ‰ã«é–¢ã™ã‚‹å¯„稿者ã®åˆ†å¸ƒ) + - [最も多様ãªå½±éŸ¿ã‚’æŒã¤è‘—者](#最も多様ãªå½±éŸ¿ã‚’æŒã¤è‘—者) + - [著者ã®ãŠæ°—ã«å…¥ã‚Šãƒ•ã‚¡ã‚¤ãƒ«](#著者ã®ãŠæ°—ã«å…¥ã‚Šãƒ•ã‚¡ã‚¤ãƒ«) + - [著者数ãŒæœ€ã‚‚å°‘ãªã„最大ファイル](#著者数ãŒæœ€ã‚‚å°‘ãªã„最大ファイル) + - [コミットã¨ã‚³ãƒ¼ãƒ‰è¡Œã®æ™‚間別分布; 曜日別ã€è‘—者別; 特定ã®ã‚µãƒ–ディレクトリ用](#コミットã¨ã‚³ãƒ¼ãƒ‰è¡Œã®æ™‚間別分布-曜日別著者別-特定ã®ã‚µãƒ–ディレクトリ用) + - [著者ã®è¡Œåˆ—:他ã®è‘—者ã®ã‚³ãƒ¼ãƒ‰ã‚’書ãç›´ã™å‚¾å‘を示ã™](#著者ã®è¡Œåˆ—ä»–ã®è‘—者ã®ã‚³ãƒ¼ãƒ‰ã‚’書ãç›´ã™å‚¾å‘を示ã™) + - [曜日ã”ã¨ã®æœ€é«˜è²¢çŒ®è€…ã¯èª°ã§ã™ã‹ï¼Ÿ](#曜日ã”ã¨ã®æœ€é«˜è²¢çŒ®è€…ã¯èª°ã§ã™ã‹) + - [リãƒã‚¸ãƒˆãƒªå…¨ä½“ã®ã‚³ãƒ¼ãƒ‰å¹´é½¢ã®åˆ†å¸ƒ](#リãƒã‚¸ãƒˆãƒªå…¨ä½“ã®ã‚³ãƒ¼ãƒ‰å¹´é½¢ã®åˆ†å¸ƒ) + - [å„著者ã®ã‚³ãƒ¼ãƒ‰ã®ä½•ãƒ‘ーセントãŒä»–ã®è‘—者ã«ã‚ˆã£ã¦å‰Šé™¤ã•ã‚ŒãŸã‹ï¼Ÿ](#å„著者ã®ã‚³ãƒ¼ãƒ‰ã®ä½•ãƒ‘ーセントãŒä»–ã®è‘—者ã«ã‚ˆã£ã¦å‰Šé™¤ã•ã‚ŒãŸã‹) + - [最も多ã書ãç›´ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒªã‚¹ãƒˆï¼Ÿ](#最も多ã書ãç›´ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒªã‚¹ãƒˆ) + - [コードãŒãƒªãƒã‚¸ãƒˆãƒªã«ç•™ã¾ã‚‹å¯èƒ½æ€§ãŒæœ€ã‚‚高ã„曜日ã¯ï¼Ÿ](#コードãŒãƒªãƒã‚¸ãƒˆãƒªã«ç•™ã¾ã‚‹å¯èƒ½æ€§ãŒæœ€ã‚‚高ã„曜日ã¯) + - [å¹³å‡ã‚³ãƒ¼ãƒ‰å¹´é½¢ã§ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«](#å¹³å‡ã‚³ãƒ¼ãƒ‰å¹´é½¢ã§ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«) + - [誰ãŒã‚ˆã‚Šå¤šãã®ãƒ†ã‚¹ãƒˆ/CPPコード/コメントを書ã傾å‘ãŒã‚ã‚‹ã®ã‹ï¼Ÿ](#誰ãŒã‚ˆã‚Šå¤šãã®ãƒ†ã‚¹ãƒˆcppコードコメントを書ã傾å‘ãŒã‚ã‚‹ã®ã‹) + - [著者ã®ã‚³ãƒŸãƒƒãƒˆãŒæ™‚間経éŽã¨ã¨ã‚‚ã«ã‚³ãƒ¼ãƒ‰/コメントã®å‰²åˆã«é–¢ã—ã¦ã©ã®ã‚ˆã†ã«å¤‰åŒ–ã™ã‚‹ã®ã‹ï¼Ÿ](#著者ã®ã‚³ãƒŸãƒƒãƒˆãŒæ™‚間経éŽã¨ã¨ã‚‚ã«ã‚³ãƒ¼ãƒ‰ã‚³ãƒ¡ãƒ³ãƒˆã®å‰²åˆã«é–¢ã—ã¦ã©ã®ã‚ˆã†ã«å¤‰åŒ–ã™ã‚‹ã®ã‹) + - [コードãŒæ›¸ãæ›ãˆã‚‰ã‚Œã‚‹ã¾ã§ã®å¹³å‡æ™‚é–“ã¨ä¸­å¤®å€¤ï¼ˆã‚³ãƒ¼ãƒ‰ã® decay ã®åŠæ¸›æœŸï¼‰ã¯ï¼Ÿ](#コードãŒæ›¸ãæ›ãˆã‚‰ã‚Œã‚‹ã¾ã§ã®å¹³å‡æ™‚é–“ã¨ä¸­å¤®å€¤ã‚³ãƒ¼ãƒ‰ã®-decay-ã®åŠæ¸›æœŸã¯) + - [ã©ã®ã‚ˆã†ãªæ™‚ãŒã‚³ãƒ¼ãƒ‰ãŒæ›¸ãæ›ãˆã‚‰ã‚Œã‚‹å¯èƒ½æ€§ãŒæœ€ã‚‚高ã„ã®ã‹ï¼Ÿ](#ã©ã®ã‚ˆã†ãªæ™‚ãŒã‚³ãƒ¼ãƒ‰ãŒæ›¸ãæ›ãˆã‚‰ã‚Œã‚‹å¯èƒ½æ€§ãŒæœ€ã‚‚高ã„ã®ã‹) + - [ã©ã®è‘—者ã®ã‚³ãƒ¼ãƒ‰ãŒæœ€ã‚‚安定ã—ã¦ã„ã‚‹ã‹ï¼Ÿ](#ã©ã®è‘—者ã®ã‚³ãƒ¼ãƒ‰ãŒæœ€ã‚‚安定ã—ã¦ã„ã‚‹ã‹) + - [ã‚る著者ã«ã‚ˆã‚‹æœ€ã‚‚連続ã—ãŸã‚³ãƒŸãƒƒãƒˆã®æ—¥æ•°](#ã‚る著者ã«ã‚ˆã‚‹æœ€ã‚‚連続ã—ãŸã‚³ãƒŸãƒƒãƒˆã®æ—¥æ•°) + - [ファイルã®è¡Œã”ã¨ã®ã‚³ãƒŸãƒƒãƒˆå±¥æ­´](#ファイルã®è¡Œã”ã¨ã®ã‚³ãƒŸãƒƒãƒˆå±¥æ­´) +- [未解決ã®è³ªå•](#未解決ã®è³ªå•) + - [Git blame](#git-blame) + - [関連コンテンツ](#関連コンテンツ) + +# データã®ç”Ÿæˆ + +ã“ã‚Œã¯ä»»æ„ã§ã™ã€‚データã¯è‡ªç”±ã«é…布ã—ã¦ã„ã¾ã™ - [データã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¨æŒ¿å…¥](#データã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¨æŒ¿å…¥)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +```bash +git clone git@github.com:ClickHouse/ClickHouse.git +cd ClickHouse +clickhouse git-import --skip-paths 'generated\.cpp|^(contrib|docs?|website|libs/(libcityhash|liblz4|libdivide|libvectorclass|libdouble-conversion|libcpuid|libzstd|libfarmhash|libmetrohash|libpoco|libwidechar_width))/' --skip-commits-with-messages '^Merge branch ' +``` + +ã“ã®æ“作ã¯ã€ClickHouseリãƒã‚¸ãƒˆãƒªã«å¯¾ã—ã¦ç´„3分(2022å¹´11月8日時点ã®MacBook Pro 2021ã§ï¼‰ã‹ã‹ã‚Šã¾ã™ã€‚ + +利用å¯èƒ½ãªã‚ªãƒ—ションã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯ã€ãƒ„ールã®ãƒã‚¤ãƒ†ã‚£ãƒ–ヘルプã‹ã‚‰å–å¾—ã§ãã¾ã™ã€‚ + +```bash +clickhouse git-import -h +``` + +ã“ã®ãƒ˜ãƒ«ãƒ—ã§ã¯ã€ä¸Šè¨˜ã®å„テーブルã®DDLã‚‚æä¾›ã•ã‚Œã¾ã™ã€‚例ãˆã°ï¼š + +``` +CREATE TABLE git.commits +( + hash String, + author LowCardinality(String), + time DateTime, + message String, + files_added UInt32, + files_deleted UInt32, + files_renamed UInt32, + files_modified UInt32, + lines_added UInt32, + lines_deleted UInt32, + hunks_added UInt32, + hunks_removed UInt32, + hunks_changed UInt32 +) ENGINE = MergeTree ORDER BY time; +``` + +**ã“れらã®ã‚¯ã‚¨ãƒªã¯ã€ã©ã®ãƒªãƒã‚¸ãƒˆãƒªã§ã‚‚機能ã™ã‚‹ã¯ãšã§ã™ã€‚自由ã«æŽ¢ç´¢ã—ã¦ã€çµæžœã‚’報告ã—ã¦ãã ã•ã„** 実行時間ã«é–¢ã™ã‚‹ã„ãã¤ã‹ã®ã‚¬ã‚¤ãƒ‰ãƒ©ã‚¤ãƒ³ï¼ˆ2022å¹´11月時点): + +- Linux - `~/clickhouse git-import` - 160分 + +# データã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¨æŒ¿å…¥ + +以下ã®ãƒ‡ãƒ¼ã‚¿ã‚’使用ã—ã¦ã€ä½œæ¥­ç’°å¢ƒã‚’å†ç¾ã§ãã¾ã™ã€‚ã‚ã‚‹ã„ã¯ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯play.clickhouse.comã§å…¥æ‰‹å¯èƒ½ã§ã™ - 詳細ã¯[クエリ](#クエリ)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +以下ã®ãƒªãƒã‚¸ãƒˆãƒªã®ãŸã‚ã«ç”Ÿæˆã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ãŒè¦‹ã¤ã‹ã‚Šã¾ã™ï¼š + +- ClickHouse(2022å¹´11月8日) + - https://datasets-documentation.s3.amazonaws.com/github/commits/clickhouse/commits.tsv.xz - 2.5 MB + - https://datasets-documentation.s3.amazonaws.com/github/commits/clickhouse/file_changes.tsv.xz - 4.5MB + - https://datasets-documentation.s3.amazonaws.com/github/commits/clickhouse/line_changes.tsv.xz - 127.4 MB +- Linux(2022å¹´11月8日) + - https://datasets-documentation.s3.amazonaws.com/github/commits/linux/commits.tsv.xz - 44 MB + - https://datasets-documentation.s3.amazonaws.com/github/commits/linux/file_changes.tsv.xz - 467MB + - https://datasets-documentation.s3.amazonaws.com/github/commits/linux/line_changes.tsv.xz - 1.1G + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’準備ã—ã¾ã™ï¼š + +```sql +DROP DATABASE IF EXISTS git; +CREATE DATABASE git; + +CREATE TABLE git.commits +( + hash String, + author LowCardinality(String), + time DateTime, + message String, + files_added UInt32, + files_deleted UInt32, + files_renamed UInt32, + files_modified UInt32, + lines_added UInt32, + lines_deleted UInt32, + hunks_added UInt32, + hunks_removed UInt32, + hunks_changed UInt32 +) ENGINE = MergeTree ORDER BY time; + +CREATE TABLE git.file_changes +( + change_type Enum('Add' = 1, 'Delete' = 2, 'Modify' = 3, 'Rename' = 4, 'Copy' = 5, 'Type' = 6), + path LowCardinality(String), + old_path LowCardinality(String), + file_extension LowCardinality(String), + lines_added UInt32, + lines_deleted UInt32, + hunks_added UInt32, + hunks_removed UInt32, + hunks_changed UInt32, + + commit_hash String, + author LowCardinality(String), + time DateTime, + commit_message String, + commit_files_added UInt32, + commit_files_deleted UInt32, + commit_files_renamed UInt32, + commit_files_modified UInt32, + commit_lines_added UInt32, + commit_lines_deleted UInt32, + commit_hunks_added UInt32, + commit_hunks_removed UInt32, + commit_hunks_changed UInt32 +) ENGINE = MergeTree ORDER BY time; + +CREATE TABLE git.line_changes +( + sign Int8, + line_number_old UInt32, + line_number_new UInt32, + hunk_num UInt32, + hunk_start_line_number_old UInt32, + hunk_start_line_number_new UInt32, + hunk_lines_added UInt32, + hunk_lines_deleted UInt32, + hunk_context LowCardinality(String), + line LowCardinality(String), + indent UInt8, + line_type Enum('Empty' = 0, 'Comment' = 1, 'Punct' = 2, 'Code' = 3), + + prev_commit_hash String, + prev_author LowCardinality(String), + prev_time DateTime, + + file_change_type Enum('Add' = 1, 'Delete' = 2, 'Modify' = 3, 'Rename' = 4, 'Copy' = 5, 'Type' = 6), + path LowCardinality(String), + old_path LowCardinality(String), + file_extension LowCardinality(String), + file_lines_added UInt32, + file_lines_deleted UInt32, + file_hunks_added UInt32, + file_hunks_removed UInt32, + file_hunks_changed UInt32, + + commit_hash String, + author LowCardinality(String), + time DateTime, + commit_message String, + commit_files_added UInt32, + commit_files_deleted UInt32, + commit_files_renamed UInt32, + commit_files_modified UInt32, + commit_lines_added UInt32, + commit_lines_deleted UInt32, + commit_hunks_added UInt32, + commit_hunks_removed UInt32, + commit_hunks_changed UInt32 +) ENGINE = MergeTree ORDER BY time; +``` + +データを挿入ã™ã‚‹ã«ã¯ã€`INSERT INTO SELECT`ã¨[s3機能](https://clickhouse.com/docs/ja/integrations/s3/s3-table-functions/)を使用ã—ã¾ã™ã€‚例ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ClickHouseファイルをãã‚Œãžã‚Œã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã—ã¾ã™ï¼š + +*commits* + +```sql +INSERT INTO git.commits SELECT * +FROM s3('https://datasets-documentation.s3.amazonaws.com/github/commits/clickhouse/commits.tsv.xz', 'TSV', 'hash String,author LowCardinality(String), time DateTime, message String, files_added UInt32, files_deleted UInt32, files_renamed UInt32, files_modified UInt32, lines_added UInt32, lines_deleted UInt32, hunks_added UInt32, hunks_removed UInt32, hunks_changed UInt32') + +0 rows in set. Elapsed: 1.826 sec. Processed 62.78 thousand rows, 8.50 MB (34.39 thousand rows/s., 4.66 MB/s.) +``` + +*file_changes* + +```sql +INSERT INTO git.file_changes SELECT * +FROM s3('https://datasets-documentation.s3.amazonaws.com/github/commits/clickhouse/file_changes.tsv.xz', 'TSV', 'change_type Enum(\'Add\' = 1, \'Delete\' = 2, \'Modify\' = 3, \'Rename\' = 4, \'Copy\' = 5, \'Type\' = 6), path LowCardinality(String), old_path LowCardinality(String), file_extension LowCardinality(String), lines_added UInt32, lines_deleted UInt32, hunks_added UInt32, hunks_removed UInt32, hunks_changed UInt32, commit_hash String, author LowCardinality(String), time DateTime, commit_message String, commit_files_added UInt32, commit_files_deleted UInt32, commit_files_renamed UInt32, commit_files_modified UInt32, commit_lines_added UInt32, commit_lines_deleted UInt32, commit_hunks_added UInt32, commit_hunks_removed UInt32, commit_hunks_changed UInt32') + +0 rows in set. Elapsed: 2.688 sec. Processed 266.05 thousand rows, 48.30 MB (98.97 thousand rows/s., 17.97 MB/s.) +``` + +*line_changes* + +```sql +INSERT INTO git.line_changes SELECT * +FROM s3('https://datasets-documentation.s3.amazonaws.com/github/commits/clickhouse/line_changes.tsv.xz', 'TSV', ' sign Int8, line_number_old UInt32, line_number_new UInt32, hunk_num UInt32, hunk_start_line_number_old UInt32, hunk_start_line_number_new UInt32, hunk_lines_added UInt32,\n hunk_lines_deleted UInt32, hunk_context LowCardinality(String), line LowCardinality(String), indent UInt8, line_type Enum(\'Empty\' = 0, \'Comment\' = 1, \'Punct\' = 2, \'Code\' = 3), prev_commit_hash String, prev_author LowCardinality(String), prev_time DateTime, file_change_type Enum(\'Add\' = 1, \'Delete\' = 2, \'Modify\' = 3, \'Rename\' = 4, \'Copy\' = 5, \'Type\' = 6),\n path LowCardinality(String), old_path LowCardinality(String), file_extension LowCardinality(String), file_lines_added UInt32, file_lines_deleted UInt32, file_hunks_added UInt32, file_hunks_removed UInt32, file_hunks_changed UInt32, commit_hash String,\n author LowCardinality(String), time DateTime, commit_message String, commit_files_added UInt32, commit_files_deleted UInt32, commit_files_renamed UInt32, commit_files_modified UInt32, commit_lines_added UInt32, commit_lines_deleted UInt32, commit_hunks_added UInt32, commit_hunks_removed UInt32, commit_hunks_changed UInt32') + +0 rows in set. Elapsed: 50.535 sec. Processed 7.54 million rows, 2.09 GB (149.11 thousand rows/s., 41.40 MB/s.) +``` + +# クエリ + +ツールã¯ãƒ˜ãƒ«ãƒ—出力ã«åŸºã¥ã„ã¦ã€ã„ãã¤ã‹ã®ã‚¯ã‚¨ãƒªã‚’æ案ã—ã¦ã„ã¾ã™ã€‚ç§ãŸã¡ã¯ã€ã“れらã«åŠ ãˆã¦ã€èˆˆå‘³æ·±ã„追加ã®ã‚¯ã‚¨ãƒªã«ã‚‚回答ã—ã¦ã„ã¾ã™ã€‚ã“れらã®ã‚¯ã‚¨ãƒªã¯ã€ãƒ„ールã®ä»»æ„ã®é †åºã«å¯¾ã—ã¦ãŠãŠã‚ˆã増加ã™ã‚‹è¤‡é›‘ã•ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ã€`git_clickhouse`データベースã§[play.clickhouse.com](https://sql.clickhouse.com?query_id=DCQPNPAIMAQXRLHYURLKVJ)ã§å…¥æ‰‹å¯èƒ½ã§ã™ã€‚ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã®ãŸã‚ã«ã€ã“ã®ç’°å¢ƒã¸ã®ãƒªãƒ³ã‚¯ã‚’æä¾›ã—ã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã¯å¿…è¦ã«å¿œã˜ã¦èª¿æ•´ã—ã¾ã™ã€‚データåŽé›†ã®æ™‚期ã«ã‚ˆã£ã¦ã€playã®çµæžœã¯ã“ã“ã«è¡¨ç¤ºã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +## å˜ä¸€ãƒ•ã‚¡ã‚¤ãƒ«ã®å±¥æ­´ + +最もシンプルãªã‚¯ã‚¨ãƒªã§ã™ã€‚ã“ã“ã§ã¯ã€`StorageReplicatedMergeTree.cpp`ã®ã™ã¹ã¦ã®ã‚³ãƒŸãƒƒãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã—ã¾ã™ã€‚ã“れらã¯ã‚ˆã‚Šèˆˆå‘³æ·±ã„ã‚‚ã®ãŒå¤šã„ã®ã§ã€æœ€æ–°ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’最åˆã«è¡¨ç¤ºã™ã‚‹ã‚ˆã†ã«ã‚½ãƒ¼ãƒˆã—ã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=COAZRFX2YFULDBXRQTCQ1S) + +```sql +SELECT + time, + substring(commit_hash, 1, 11) AS commit, + change_type, + author, + path, + old_path, + lines_added, + lines_deleted, + commit_message +FROM git.file_changes +WHERE path = 'src/Storages/StorageReplicatedMergeTree.cpp' +ORDER BY time DESC +LIMIT 10 + +┌────────────────time─┬─commit──────┬─change_type─┬─author─────────────┬─path────────────────────────────────────────┬─old_path─┬─lines_added─┬─lines_deleted─┬─commit_message───────────────────────────────────┠+│ 2022-10-30 16:30:51 │ c68ab231f91 │ Modify │ Alexander Tokmakov │ src/Storages/StorageReplicatedMergeTree.cpp │ │ 13 │ 10 │ partを削除状態ã§ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ä¿®æ­£ │ +│ 2022-10-23 16:24:20 │ b40d9200d20 │ Modify │ Anton Popov │ src/Storages/StorageReplicatedMergeTree.cpp │ │ 28 │ 30 │ DataPartStorageã®å®šæ•°æ€§ã®ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹å‘上 │ +│ 2022-10-23 01:23:15 │ 56e5daba0c9 │ Modify │ Anton Popov │ src/Storages/StorageReplicatedMergeTree.cpp │ │ 28 │ 44 │ DataPartStorageBuilderを削除 │ +│ 2022-10-21 13:35:37 │ 851f556d65a │ Modify │ Igor Nikonov │ src/Storages/StorageReplicatedMergeTree.cpp │ │ 3 │ 2 │ 使用ã•ã‚Œã¦ã„ãªã„パラメータを削除 │ +│ 2022-10-21 13:02:52 │ 13d31eefbc3 │ Modify │ Igor Nikonov │ src/Storages/StorageReplicatedMergeTree.cpp │ │ 4 │ 4 │ Replicated merge treeã®æ”¹è‰¯ │ +│ 2022-10-21 12:25:19 │ 4e76629aafc │ Modify │ Azat Khuzhin │ src/Storages/StorageReplicatedMergeTree.cpp │ │ 3 │ 2 │ -Wshorten-64-to-32ã¸ã®ä¿®æ­£ │ +│ 2022-10-19 13:59:28 │ 05e6b94b541 │ Modify │ Antonio Andelic │ src/Storages/StorageReplicatedMergeTree.cpp │ │ 4 │ 0 │ 改良 │ +│ 2022-10-19 13:34:20 │ e5408aac991 │ Modify │ Antonio Andelic │ src/Storages/StorageReplicatedMergeTree.cpp │ │ 3 │ 53 │ è«–ç†ã‚’簡素化 │ +│ 2022-10-18 15:36:11 │ 7befe2825c9 │ Modify │ Alexey Milovidov │ src/Storages/StorageReplicatedMergeTree.cpp │ │ 2 │ 2 │ StorageReplicatedMergeTree.cppã®æ›´æ–° │ +│ 2022-10-18 15:35:44 │ 0623ad4e374 │ Modify │ Alexey Milovidov │ src/Storages/StorageReplicatedMergeTree.cpp │ │ 1 │ 1 │ StorageReplicatedMergeTree.cppã®æ›´æ–° │ +└─────────────────────┴─────────────┴─────────────┴────────────────────┴─────────────────────────────────────────────┴──────────┴─────────────┴───────────────┴──────────────────────────────────────────────────┘ + +10 rows in set. Elapsed: 0.006 sec. Processed 12.10 thousand rows, 1.60 MB (1.93 million rows/s., 255.40 MB/s.) +``` + +リãƒãƒ¼ãƒ ã‚¤ãƒ™ãƒ³ãƒˆã®å‰ã«å­˜åœ¨ã—ã¦ã„ãŸå¤‰æ›´ã¯è¡¨ç¤ºã—ãªã„ãŸã‚ã€ãƒªãƒãƒ¼ãƒ ã‚’除外ã—ã€è¡Œå¤‰æ›´ã‚’確èªã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +[play](https://sql.clickhouse.com?query_id=AKS9SYLARFMZCHGAAQNEBN) + +```sql +SELECT + time, + substring(commit_hash, 1, 11) AS commit, + sign, + line_number_old, + line_number_new, + author, + line +FROM git.line_changes +WHERE path = 'src/Storages/StorageReplicatedMergeTree.cpp' +ORDER BY line_number_new ASC +LIMIT 10 + +┌────────────────time─┬─commit──────┬─sign─┬─line_number_old─┬─line_number_new─┬─author───────────┬─line──────────────────────────────────────────────────┠+│ 2020-04-16 02:06:10 │ cdeda4ab915 │ -1 │ 1 │ 1 │ Alexey Milovidov │ #include │ +│ 2020-04-16 02:06:10 │ cdeda4ab915 │ 1 │ 2 │ 1 │ Alexey Milovidov │ #include │ +│ 2020-04-16 02:06:10 │ cdeda4ab915 │ 1 │ 2 │ 2 │ Alexey Milovidov │ │ +│ 2021-05-03 23:46:51 │ 02ce9cc7254 │ -1 │ 3 │ 2 │ Alexey Milovidov │ #include │ +│ 2021-05-27 22:21:02 │ e2f29b9df02 │ -1 │ 3 │ 2 │ s-kat │ #include │ +│ 2022-10-03 22:30:50 │ 210882b9c4d │ 1 │ 2 │ 3 │ alesapin │ #include │ +│ 2022-10-23 16:24:20 │ b40d9200d20 │ 1 │ 2 │ 3 │ Anton Popov │ #include │ +│ 2021-06-20 09:24:43 │ 4c391f8e994 │ 1 │ 2 │ 3 │ Mike Kot │ #include "Common/hex.h" │ +│ 2021-12-29 09:18:56 │ 8112a712336 │ -1 │ 6 │ 5 │ avogar │ #include │ +│ 2022-04-21 20:19:13 │ 9133e398b8c │ 1 │ 11 │ 12 │ Nikolai Kochetov │ #include │ +└─────────────────────┴─────────────┴──────┴─────────────────┴─────────────────┴──────────────────┴───────────────────────────────────────────────────────┘ + +10 rows in set. Elapsed: 0.258 sec. Processed 7.54 million rows, 654.92 MB (29.24 million rows/s., 2.54 GB/s.) +``` + +リãƒãƒ¼ãƒ ã‚’考慮ã—ãŸãƒ•ã‚¡ã‚¤ãƒ«ã®[è¡Œã”ã¨ã®ã‚³ãƒŸãƒƒãƒˆå±¥æ­´](#è¡Œã”ã¨ã®ã‚³ãƒŸãƒƒãƒˆå±¥æ­´)を見ã¤ã‘るよりも複雑ãªã‚¯ã‚¨ãƒªã‚‚ã‚ã‚Šã¾ã™ã€‚ + +## ç¾åœ¨ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ファイルを見ã¤ã‘ã‚‹ + +ã“ã‚Œã¯ã€ãƒªãƒã‚¸ãƒˆãƒªå†…ã®ç¾åœ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ã¿ã‚’考慮ã—ãŸã„後ã®åˆ†æžã«ã¨ã£ã¦é‡è¦ã§ã™ã€‚ã“ã®ã‚»ãƒƒãƒˆã¯ã€ãƒªãƒãƒ¼ãƒ ã¾ãŸã¯å‰Šé™¤ï¼ˆãŠã‚ˆã³å†è¿½åŠ /リãƒãƒ¼ãƒ ï¼‰ã•ã‚Œã¦ã„ãªã„ファイルã¨ã—ã¦æŽ¨å®šã—ã¾ã™ã€‚ + +**dbmsã€libsã€tests/testflows/ディレクトリ内ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«é–¢ã—ã¦å£Šã‚ŒãŸã‚³ãƒŸãƒƒãƒˆå±¥æ­´ãŒã‚ã£ãŸã‚ˆã†ã§ã™ã€‚ã—ãŸãŒã£ã¦ã€ã“れらも除外ã—ã¾ã™ã€‚** + +[play](https://sql.clickhouse.com?query_id=2HNFWPCFWEEY92WTAPMA7W) + +```sql +SELECT path +FROM +( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path +) +GROUP BY path +HAVING (argMax(change_type, last_time) != 2) AND NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)') ORDER BY path +LIMIT 10 + +┌─path────────────────────────────────────────────────────────────┠+│ tests/queries/0_stateless/01054_random_printable_ascii_ubsan.sh │ +│ tests/queries/0_stateless/02247_read_bools_as_numbers_json.sh │ +│ tests/performance/file_table_function.xml │ +│ tests/queries/0_stateless/01902_self_aliases_in_columns.sql │ +│ tests/queries/0_stateless/01070_h3_get_base_cell.reference │ +│ src/Functions/ztest.cpp │ +│ src/Interpreters/InterpreterShowTablesQuery.h │ +│ src/Parsers/Kusto/ParserKQLStatement.h │ +│ tests/queries/0_stateless/00938_dataset_test.sql │ +│ src/Dictionaries/Embedded/GeodataProviders/Types.h │ +└─────────────────────────────────────────────────────────────────┘ + +10 rows in set. Elapsed: 0.085 sec. Processed 532.10 thousand rows, 8.68 MB (6.30 million rows/s., 102.64 MB/s.) +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒãƒªãƒãƒ¼ãƒ ã•ã‚ŒãŸå¾Œã«å…ƒã®åå‰ã«å†ãƒªãƒãƒ¼ãƒ ã•ã‚Œã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ã¾ãšã€ãƒªãƒãƒ¼ãƒ ã®çµæžœã¨ã—ã¦å‰Šé™¤ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®`old_path`ã®ãƒªã‚¹ãƒˆã‚’集約ã—ã¾ã™ã€‚ã“れを最後ã®æ“作ã¨çµ±åˆã—ã¾ã™ã€‚最後ã«ã€æœ€çµ‚イベントãŒ`Delete`ã§ã¯ãªã„ã‚‚ã®ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=1OXCKMOH2JVMSHD3NS2WW6) + +```sql +SELECT uniq(path) +FROM +( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)') ORDER BY path +) + +┌─uniq(path)─┠+│ 18559 │ +└────────────┘ +1 row in set. Elapsed: 0.089 sec. Processed 532.10 thousand rows, 8.68 MB (6.01 million rows/s., 97.99 MB/s.) +``` + +ã“ã®ãƒ‘ターンを`git list-files`ã«é©ç”¨ã™ã‚‹ã¨ã€18155件ãŒå ±å‘Šã•ã‚Œã¾ã™ã€‚ + +```bash +git ls-files | grep -v -E 'generated\.cpp|^(contrib|docs?|website|libs/(libcityhash|liblz4|libdivide|libvectorclass|libdouble-conversion|libcpuid|libzstd|libfarmhash|libmetrohash|libpoco|libwidechar_width))/' | wc -l + 18155 +``` + +**ã—ãŸãŒã£ã¦ã€ç¾è¡Œã®ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã¯ç¾åœ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®æŽ¨å®šå€¤ã§ã™** + +ã“ã“ã§ã®é•ã„ã¯ã€ã„ãã¤ã‹ã®è¦å› ã«èµ·å› ã—ã¦ã„ã¾ã™ï¼š + +- リãƒãƒ¼ãƒ ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®ä»–ã®å¤‰æ›´ã¨åŒæ™‚ã«ç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã¯`file_changes`内ã§åˆ¥ã®ã‚¤ãƒ™ãƒ³ãƒˆã¨ã—ã¦ãƒªã‚¹ãƒˆã•ã‚Œã¾ã™ãŒã€åŒã˜æ™‚é–“ã§ç™ºç”Ÿã—ã¾ã™ã€‚`argMax`関数ã¯ã“れを区別ã™ã‚‹æ–¹æ³•ãŒãªãã€æœ€åˆã®å€¤ã‚’é¸æŠžã—ã¾ã™ã€‚挿入ã®è‡ªç„¶ãªé †åºï¼ˆæ­£ã—ã„é †åºã‚’知る唯一ã®æ‰‹æ®µï¼‰ã¯ã€ãƒ¦ãƒ‹ã‚ªãƒ³å…¨ä½“ã§ç¶­æŒã•ã‚Œãªã„ãŸã‚ã€å¤‰æ›´ã•ã‚ŒãŸã‚¤ãƒ™ãƒ³ãƒˆãŒé¸æŠžã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€`src/Functions/geometryFromColumn.h`ファイルã¯ã€`src/Functions/geometryConverters.h`ã«ãƒªãƒãƒ¼ãƒ ã•ã‚Œã‚‹å‰ã«è¤‡æ•°ã®å¤‰æ›´ãŒã‚ã‚Šã¾ã™ã€‚ç¾åœ¨ã®ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã§ã¯ã€æœ€å¾Œã®å¤‰æ›´ã‚¤ãƒ™ãƒ³ãƒˆãŒ`Modify`ã¨ã—ã¦é¸ã°ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€`src/Functions/geometryFromColumn.h`ãŒä¿æŒã•ã‚Œã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=SCXWMR9GBMJ9UNZYQXQBFA) + +```sql +SELECT + change_type, + path, + old_path, + time, + commit_hash +FROM git.file_changes +WHERE (path = 'src/Functions/geometryFromColumn.h') OR (old_path = 'src/Functions/geometryFromColumn.h') + +┌─change_type─┬─path───────────────────────────────┬─old_path───────────────────────────┬────────────────time─┬─commit_hash──────────────────────────────┠+│ Add │ src/Functions/geometryFromColumn.h │ │ 2021-03-11 12:08:16 │ 9376b676e9a9bb8911b872e1887da85a45f7479d │ +│ Modify │ src/Functions/geometryFromColumn.h │ │ 2021-03-11 12:08:16 │ 6d59be5ea4768034f6526f7f9813062e0c369f7b │ +│ Modify │ src/Functions/geometryFromColumn.h │ │ 2021-03-11 12:08:16 │ 33acc2aa5dc091a7cb948f78c558529789b2bad8 │ +│ Modify │ src/Functions/geometryFromColumn.h │ │ 2021-03-11 12:08:16 │ 78e0db268ceadc42f82bc63a77ee1a4da6002463 │ +│ Modify │ src/Functions/geometryFromColumn.h │ │ 2021-03-11 12:08:16 │ 14a891057d292a164c4179bfddaef45a74eaf83a │ +│ Modify │ src/Functions/geometryFromColumn.h │ │ 2021-03-11 12:08:16 │ d0d6e6953c2a2af9fb2300921ff96b9362f22edb │ +│ Modify │ src/Functions/geometryFromColumn.h │ │ 2021-03-11 12:08:16 │ fe8382521139a58c0ba277eb848e88894658db66 │ +│ Modify │ src/Functions/geometryFromColumn.h │ │ 2021-03-11 12:08:16 │ 3be3d5cde8788165bc0558f1e2a22568311c3103 │ +│ Modify │ src/Functions/geometryFromColumn.h │ │ 2021-03-11 12:08:16 │ afad9bf4d0a55ed52a3f55483bc0973456e10a56 │ +│ Modify │ src/Functions/geometryFromColumn.h │ │ 2021-03-11 12:08:16 │ e3290ecc78ca3ea82b49ebcda22b5d3a4df154e6 │ +│ Rename │ src/Functions/geometryConverters.h │ src/Functions/geometryFromColumn.h │ 2021-03-11 12:08:16 │ 125945769586baf6ffd15919b29565b1b2a63218 │ +└─────────────┴────────────────────────────────────┴────────────────────────────────────┴─────────────────────┴──────────────────────────────────────────┘ + 11 rows in set. Elapsed: 0.030 sec. Processed 266.05 thousand rows, 6.61 MB (8.89 million rows/s., 220.82 MB/s.) +``` + +- 壊れãŸã‚³ãƒŸãƒƒãƒˆå±¥æ­´ - 削除イベントã®æ¬ è½ã€‚ソースã¨åŽŸå› ã¯æœªå®šã§ã™ã€‚ + +ã“れらã®é•ã„ã¯ã€ç§ãŸã¡ã®åˆ†æžã«æœ‰æ„ã«å½±éŸ¿ã‚’åŠã¼ã™ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。**ã“ã®ã‚¯ã‚¨ãƒªã®æ”¹å–„版を歓迎ã—ã¾ã™**。 + +## 最も多ã変更ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚’リストã™ã‚‹ + +ç¾åœ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ¶é™ã—ã€å¤‰æ›´æ•°ã‚’削除ã¨è¿½åŠ ã®åˆè¨ˆã¨ã—ã¦è€ƒãˆã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=MHXPSBNPTDMJYR3OYSXVR7) + +```sql +WITH current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ) +SELECT + path, + sum(lines_added) + sum(lines_deleted) AS modifications +FROM git.file_changes +WHERE (path IN (current_files)) AND (file_extension IN ('h', 'cpp', 'sql')) +GROUP BY path +ORDER BY modifications DESC +LIMIT 10 + +┌─path───────────────────────────────────────────────────┬─modifications─┠+│ src/Storages/StorageReplicatedMergeTree.cpp │ 21871 │ +│ src/Storages/MergeTree/MergeTreeData.cpp │ 17709 │ +│ programs/client/Client.cpp │ 15882 │ +│ src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp │ 14249 │ +│ src/Interpreters/InterpreterSelectQuery.cpp │ 12636 │ +│ src/Parsers/ExpressionListParsers.cpp │ 11794 │ +│ src/Analyzer/QueryAnalysisPass.cpp │ 11760 │ +│ src/Coordination/KeeperStorage.cpp │ 10225 │ +│ src/Functions/FunctionsConversion.h │ 9247 │ +│ src/Parsers/ExpressionElementParsers.cpp │ 8197 │ +└────────────────────────────────────────────────────────┴───────────────┘ + +10 rows in set. Elapsed: 0.134 sec. Processed 798.15 thousand rows, 16.46 MB (5.95 million rows/s., 122.62 MB/s.) +``` + +## コミットã¯é€šå¸¸ã€é€±ã®ã©ã®æ—¥ã«ç™ºç”Ÿã™ã‚‹ã‹ï¼Ÿ + +[play](https://sql.clickhouse.com?query_id=GED2STFSYJDRAA59H8RLIV) + +```sql +SELECT + day_of_week, + count() AS c +FROM git.commits +GROUP BY dayOfWeek(time) AS day_of_week + +┌─day_of_week─┬─────c─┠+│ 1 │ 10575 │ +│ 2 │ 10645 │ +│ 3 │ 10748 │ +│ 4 │ 10944 │ +│ 5 │ 10090 │ +│ 6 │ 4617 │ +│ 7 │ 5166 │ +└─────────────┴───────┘ +7 rows in set. Elapsed: 0.262 sec. Processed 62.78 thousand rows, 251.14 KB (239.73 thousand rows/s., 958.93 KB/s.) +``` + +金曜日ã«ç”Ÿç”£æ€§ã®ä½Žä¸‹ãŒè¦‹ã‚‰ã‚Œã‚‹ã®ã¯ç†ã«ã‹ãªã£ã¦ã„ã¾ã™ã€‚週末ã«ã‚³ãƒ¼ãƒ‰ã‚’コミットã—ã¦ã„る人々を見るã®ã¯ç´ æ™´ã‚‰ã—ã„ã§ã™ï¼è²¢çŒ®è€…ã®çš†ã•ã‚“ã«å¤§æ„Ÿè¬ï¼ + +## サブディレクトリ/ファイルã®å±¥æ­´ - 行数ã€ã‚³ãƒŸãƒƒãƒˆæ•°ã€å¯„稿者数ã®æŽ¨ç§» + +フィルタリングã•ã‚Œãªã„å ´åˆã€ã“ã‚Œã¯éžå¸¸ã«å¤§ããªã‚¯ã‚¨ãƒªçµæžœã‚’生æˆã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ä»¥ä¸‹ã®ä¾‹ã§ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ã‚µãƒ–ディレクトリã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã§ãるよã†ã«ã—ã¾ã™ã€‚ã“ã“ã§ã¯ã€`toStartOfWeek`関数を使用ã—ã¦é€±ã”ã¨ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã¾ã™ - å¿…è¦ã«å¿œã˜ã¦é©å¿œã—ã¦ãã ã•ã„。 + +[play](https://sql.clickhouse.com?query_id=REZRXDVU7CAWT5WKNJSTNY) + +```sql +SELECT + week, + sum(lines_added) AS lines_added, + sum(lines_deleted) AS lines_deleted, + uniq(commit_hash) AS num_commits, + uniq(author) AS authors +FROM git.file_changes +WHERE path LIKE 'src/Storages%' +GROUP BY toStartOfWeek(time) AS week +ORDER BY week ASC +LIMIT 10 + +┌───────week─┬─lines_added─┬─lines_deleted─┬─num_commits─┬─authors─┠+│ 2020-03-29 │ 49 │ 35 │ 4 │ 3 │ +│ 2020-04-05 │ 940 │ 601 │ 55 │ 14 │ +│ 2020-04-12 │ 1472 │ 607 │ 32 │ 11 │ +│ 2020-04-19 │ 917 │ 841 │ 39 │ 12 │ +│ 2020-04-26 │ 1067 │ 626 │ 36 │ 10 │ +│ 2020-05-03 │ 514 │ 435 │ 27 │ 10 │ +│ 2020-05-10 │ 2552 │ 537 │ 48 │ 12 │ +│ 2020-05-17 │ 3585 │ 1913 │ 83 │ 9 │ +│ 2020-05-24 │ 2851 │ 1812 │ 74 │ 18 │ +│ 2020-05-31 │ 2771 │ 2077 │ 77 │ 16 │ +└────────────┴─────────────┴───────────────┴─────────────┴─────────┘ +10 rows in set. Elapsed: 0.043 sec. Processed 266.05 thousand rows, 15.85 MB (6.12 million rows/s., 364.61 MB/s.) +``` + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯è¦–覚化ã«é©ã—ã¦ã„ã¾ã™ã€‚以下ã§ã¯ Superset を使用ã—ã¾ã™ã€‚ + +**追加ã•ã‚ŒãŸè¡Œã¨å‰Šé™¤ã•ã‚ŒãŸè¡Œã«é–¢ã—ã¦:** + +![](./images/superset-github-lines-added-deleted.png) + +**コミットã¨è‘—者ã«é–¢ã—ã¦:** + +![](./images/superset-commits-authors.png) + +## 最大著者数ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒªã‚¹ãƒˆ + +ç¾åœ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ã¿ã«åˆ¶é™ã—ã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=CYQFNQNK9TAMPU2OZ8KG5Y) + +```sql +WITH current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ) +SELECT + path, + uniq(author) AS num_authors +FROM git.file_changes +WHERE path IN (current_files) +GROUP BY path +ORDER BY num_authors DESC +LIMIT 10 + +┌─path────────────────────────────────────────┬─num_authors─┠+│ src/Core/Settings.h │ 127 │ +│ CMakeLists.txt │ 96 │ +│ .gitmodules │ 85 │ +│ src/Storages/MergeTree/MergeTreeData.cpp │ 72 │ +│ src/CMakeLists.txt │ 71 │ +│ programs/server/Server.cpp │ 70 │ +│ src/Interpreters/Context.cpp │ 64 │ +│ src/Storages/StorageReplicatedMergeTree.cpp │ 63 │ +│ src/Common/ErrorCodes.cpp │ 61 │ +│ src/Interpreters/InterpreterSelectQuery.cpp │ 59 │ +└─────────────────────────────────────────────┴─────────────┘ + +10 rows in set. Elapsed: 0.239 sec. Processed 798.15 thousand rows, 14.13 MB (3.35 million rows/s., 59.22 MB/s.) +``` + +## リãƒã‚¸ãƒˆãƒªå†…ã®æœ€å¤ã®ã‚³ãƒ¼ãƒ‰è¡Œ + +ç¾åœ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ã¿ã«åˆ¶é™ã—ã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=VWPBPGRZVGTHOCQYWNQZNT) + +```sql +WITH current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ) +SELECT + any(path) AS file_path, + line, + max(time) AS latest_change, + any(file_change_type) +FROM git.line_changes +WHERE path IN (current_files) +GROUP BY line +ORDER BY latest_change ASC +LIMIT 10 + +┌─file_path───────────────────────────────────┬─line────────────────────────────────────────────────────────┬───────latest_change─┬─any(file_change_type)─┠+│ utils/compressor/test.sh │ ./compressor -d < compressor.snp > compressor2 │ 2011-06-17 22:19:39 │ Modify │ +│ utils/compressor/test.sh │ ./compressor < compressor > compressor.snp │ 2011-06-17 22:19:39 │ Modify │ +│ utils/compressor/test.sh │ ./compressor -d < compressor.qlz > compressor2 │ 2014-02-24 03:14:30 │ Add │ +│ utils/compressor/test.sh │ ./compressor < compressor > compressor.qlz │ 2014-02-24 03:14:30 │ Add │ +│ utils/config-processor/config-processor.cpp │ if (argc != 2) │ 2014-02-26 19:10:00 │ Add │ +│ utils/config-processor/config-processor.cpp │ std::cerr << "std::exception: " << e.what() << std::endl; │ 2014-02-26 19:10:00 │ Add │ +│ utils/config-processor/config-processor.cpp │ std::cerr << "Exception: " << e.displayText() << std::endl; │ 2014-02-26 19:10:00 │ Add │ +│ utils/config-processor/config-processor.cpp │ Poco::XML::DOMWriter().writeNode(std::cout, document); │ 2014-02-26 19:10:00 │ Add │ +│ utils/config-processor/config-processor.cpp │ std::cerr << "Some exception" << std::endl; │ 2014-02-26 19:10:00 │ Add │ +│ utils/config-processor/config-processor.cpp │ std::cerr << "usage: " << argv[0] << " path" << std::endl; │ 2014-02-26 19:10:00 │ Add │ +└─────────────────────────────────────────────┴─────────────────────────────────────────────────────────────┴─────────────────────┴───────────────────────┘ + +10 rows in set. Elapsed: 1.101 sec. Processed 8.07 million rows, 905.86 MB (7.33 million rows/s., 823.13 MB/s.) +``` + +## 最もå¤ã„履歴をæŒã¤ãƒ•ã‚¡ã‚¤ãƒ« + +ç¾åœ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ã¿ã«åˆ¶é™ã—ã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=VWPBPGRZVGTHOCQYWNQZNT) + +```sql +WITH current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ) +SELECT + count() AS c, + path, + max(time) AS latest_change +FROM git.file_changes +WHERE path IN (current_files) +GROUP BY path +ORDER BY c DESC +LIMIT 10 + +┌───c─┬─path────────────────────────────────────────┬───────latest_change─┠+│ 790 │ src/Storages/StorageReplicatedMergeTree.cpp │ 2022-10-30 16:30:51 │ +│ 788 │ src/Storages/MergeTree/MergeTreeData.cpp │ 2022-11-04 09:26:44 │ +│ 752 │ src/Core/Settings.h │ 2022-10-25 11:35:25 │ +│ 749 │ CMakeLists.txt │ 2022-10-05 21:00:49 │ +│ 575 │ src/Interpreters/InterpreterSelectQuery.cpp │ 2022-11-01 10:20:10 │ +│ 563 │ CHANGELOG.md │ 2022-10-27 08:19:50 │ +│ 491 │ src/Interpreters/Context.cpp │ 2022-10-25 12:26:29 │ +│ 437 │ programs/server/Server.cpp │ 2022-10-21 12:25:19 │ +│ 375 │ programs/client/Client.cpp │ 2022-11-03 03:16:55 │ +│ 350 │ src/CMakeLists.txt │ 2022-10-24 09:22:37 │ +└─────┴─────────────────────────────────────────────┴─────────────────────┘ + +10 rows in set. Elapsed: 0.124 sec. Processed 798.15 thousand rows, 14.71 MB (6.44 million rows/s., 118.61 MB/s.) +``` + +ç§ãŸã¡ã®ã‚³ã‚¢ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã§ã‚ã‚‹ Merge Tree ã¯ã€å½“然ã®ã“ã¨ãªãŒã‚‰å¸¸ã«é€²åŒ–ã—ã¦ãŠã‚Šã€é•·ã„編集ã®æ­´å²ãŒã‚ã‚Šã¾ã™ï¼ + +## ドキュメントã¨ã‚³ãƒ¼ãƒ‰ã«é–¢ã™ã‚‹å¯„稿者ã®åˆ†å¸ƒ + +**データåŽé›†ä¸­ã«ã€`docs/` フォルダ内ã®å¤‰æ›´ã¯éžå¸¸ã«æ±šã‚ŒãŸã‚³ãƒŸãƒƒãƒˆå±¥æ­´ã®ãŸã‚ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã¾ã—ãŸã€‚ãã®ãŸã‚ã€ã“ã®ã‚¯ã‚¨ãƒªã®çµæžœã¯æ­£ç¢ºã§ã¯ã‚ã‚Šã¾ã›ã‚“。** + +特定ã®æ™‚期ã€ä¾‹ãˆã°ãƒªãƒªãƒ¼ã‚¹æ—¥å‘¨è¾ºã«ã€ç§ãŸã¡ã¯ã‚ˆã‚Šå¤šãã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’記述ã—ã¦ã„ã¾ã™ã‹ï¼Ÿ`countIf` 関数を使用ã—ã¦å˜ç´”ãªæ¯”率を計算ã—ã€`bar` 関数を使用ã—ã¦çµæžœã‚’視覚化ã§ãã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=BA4RZUXUHNQBH9YK7F2T9J) + +```sql +SELECT + day, + bar(docs_ratio * 1000, 0, 100, 100) AS bar +FROM +( + SELECT + day, + countIf(file_extension IN ('h', 'cpp', 'sql')) AS code, + countIf(file_extension = 'md') AS docs, + docs / (code + docs) AS docs_ratio + FROM git.line_changes + WHERE (sign = 1) AND (file_extension IN ('h', 'cpp', 'sql', 'md')) + GROUP BY dayOfMonth(time) AS day +) + +┌─day─┬─bar─────────────────────────────────────────────────────────────┠+│ 1 │ ███████████████████████████████████■│ +│ 2 │ ███████████████████████▋ │ +│ 3 │ ████████████████████████████████▋ │ +│ 4 │ █████████████ │ +│ 5 │ █████████████████████▎ │ +│ 6 │ ████████ │ +│ 7 │ ███▋ │ +│ 8 │ ████████▌ │ +│ 9 │ ██████████████▎ │ +│ 10 │ █████████████████■│ +│ 11 │ █████████████▎ │ +│ 12 │ ███████████████████████████████████▋ │ +│ 13 │ █████████████████████████████▎ │ +│ 14 │ ██████▋ │ +│ 15 │ █████████████████████████████████████████▊ │ +│ 16 │ ██████████▎ │ +│ 17 │ ██████████████████████████████████████▋ │ +│ 18 │ █████████████████████████████████▌ │ +│ 19 │ ███████████ │ +│ 20 │ █████████████████████████████████▊ │ +│ 21 │ █████ │ +│ 22 │ ███████████████████████▋ │ +│ 23 │ ███████████████████████████▌ │ +│ 24 │ ███████▌ │ +│ 25 │ ██████████████████████████████████▎ │ +│ 26 │ ███████████■│ +│ 27 │ ███████████████████████████████████████████████████████████████ │ +│ 28 │ ████████████████████████████████████████████████████■│ +│ 29 │ ███▌ │ +│ 30 │ ████████████████████████████████████████▎ │ +│ 31 │ █████████████████████████████████■│ +└─────┴─────────────────────────────────────────────────────────────────┘ + +31 rows in set. Elapsed: 0.043 sec. Processed 7.54 million rows, 40.53 MB (176.71 million rows/s., 950.40 MB/s.) +``` + +月末近ãã«å°‘ã—多ã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€å…¨ä½“çš„ã«ã¯è‰¯å¥½ãªå‡ç­‰åˆ†å¸ƒã‚’維æŒã—ã¦ã„ã¾ã™ã€‚å†åº¦ã€ã“ã‚Œã¯ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ä¸­ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã«ã‚ˆã‚‹ä¿¡é ¼æ€§ãŒä½Žã„ã§ã™ã€‚ + +## 最も多様ãªå½±éŸ¿ã‚’æŒã¤è‘—者 + +ã“ã“ã§ã®å¤šæ§˜æ€§ã¯ã€è‘—者ãŒè²¢çŒ®ã—ãŸãƒ¦ãƒ‹ãƒ¼ã‚¯ãªãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã¨ã—ã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=MT8WBABUKYBYSBA78W5TML) + +```sql +SELECT + author, + uniq(path) AS num_files +FROM git.file_changes +WHERE (change_type IN ('Add', 'Modify')) AND (file_extension IN ('h', 'cpp', 'sql')) +GROUP BY author +ORDER BY num_files DESC +LIMIT 10 + +┌─author─────────────┬─num_files─┠+│ Alexey Milovidov │ 8433 │ +│ Nikolai Kochetov │ 3257 │ +│ Vitaly Baranov │ 2316 │ +│ Maksim Kita │ 2172 │ +│ Azat Khuzhin │ 1988 │ +│ alesapin │ 1818 │ +│ Alexander Tokmakov │ 1751 │ +│ Amos Bird │ 1641 │ +│ Ivan │ 1629 │ +│ alexey-milovidov │ 1581 │ +└────────────────────┴───────────┘ + +10 rows in set. Elapsed: 0.041 sec. Processed 266.05 thousand rows, 4.92 MB (6.56 million rows/s., 121.21 MB/s.) +``` + +最近ã®ä½œæ¥­ã«ãŠã„ã¦ã€æœ€ã‚‚多様ãªã‚³ãƒŸãƒƒãƒˆã‚’æŒã¤äººç‰©ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚日付ã§åˆ¶é™ã™ã‚‹ã®ã§ã¯ãªãã€è‘—者ã®æœ€å¾Œã® N 回ã®ã‚³ãƒŸãƒƒãƒˆã«åˆ¶é™ã—ã¾ã™ï¼ˆã“ã®å ´åˆã€ç§ãŸã¡ã¯ 3 を使用ã—ã¾ã—ãŸãŒã€è‡ªç”±ã«å¤‰æ›´ã—ã¦ãã ã•ã„): + +[play](https://sql.clickhouse.com?query_id=4Q3D67FWRIVWTY8EIDDE5U) + +```sql +SELECT + author, + sum(num_files_commit) AS num_files +FROM +( + SELECT + author, + commit_hash, + uniq(path) AS num_files_commit, + max(time) AS commit_time + FROM git.file_changes + WHERE (change_type IN ('Add', 'Modify')) AND (file_extension IN ('h', 'cpp', 'sql')) + GROUP BY + author, + commit_hash + ORDER BY + author ASC, + commit_time DESC + LIMIT 3 BY author +) +GROUP BY author +ORDER BY num_files DESC +LIMIT 10 + +┌─author───────────────┬─num_files─┠+│ Mikhail │ 782 │ +│ Li Yin │ 553 │ +│ Roman Peshkurov │ 119 │ +│ Vladimir Smirnov │ 88 │ +│ f1yegor │ 65 │ +│ maiha │ 54 │ +│ Vitaliy Lyudvichenko │ 53 │ +│ Pradeep Chhetri │ 40 │ +│ Orivej Desh │ 38 │ +│ liyang │ 36 │ +└──────────────────────┴───────────┘ + +10 rows in set. Elapsed: 0.106 sec. Processed 266.05 thousand rows, 21.04 MB (2.52 million rows/s., 198.93 MB/s.) +``` + +## 著者ã®ãŠæ°—ã«å…¥ã‚Šãƒ•ã‚¡ã‚¤ãƒ« + +ã“ã“ã§ã¯ã€å‰µè¨­è€…ã§ã‚ã‚‹ [Alexey Milovidov](https://github.com/alexey-milovidov) ã‚’é¸æŠžã—ã€åˆ†æžã‚’ç¾åœ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ¶é™ã—ã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=OKGZBACRHVGCRAGCZAJKMF) + +```sql +WITH current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ) +SELECT + path, + count() AS c +FROM git.file_changes +WHERE (author = 'Alexey Milovidov') AND (path IN (current_files)) +GROUP BY path +ORDER BY c DESC +LIMIT 10 + +┌─path────────────────────────────────────────┬───c─┠+│ CMakeLists.txt │ 165 │ +│ CHANGELOG.md │ 126 │ +│ programs/server/Server.cpp │ 73 │ +│ src/Storages/MergeTree/MergeTreeData.cpp │ 71 │ +│ src/Storages/StorageReplicatedMergeTree.cpp │ 68 │ +│ src/Core/Settings.h │ 65 │ +│ programs/client/Client.cpp │ 57 │ +│ programs/server/play.html │ 48 │ +│ .gitmodules │ 47 │ +│ programs/install/Install.cpp │ 37 │ +└─────────────────────────────────────────────┴─────┘ + +10 rows in set. Elapsed: 0.106 sec. Processed 798.15 thousand rows, 13.97 MB (7.51 million rows/s., 131.41 MB/s.) +``` + +ã“ã‚Œã¯ç†ã«ã‹ãªã£ã¦ã„ã¾ã™ã€‚ãªãœãªã‚‰ã€Alexey ã¯å¤‰æ›´ãƒ­ã‚°ã®ç¶­æŒã‚’担当ã—ã¦ã„ã‚‹ã‹ã‚‰ã§ã™ã€‚ã—ã‹ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®åŸºæœ¬åを使用ã—ã¦ãŠæ°—ã«å…¥ã‚Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’特定ã™ã‚‹ã¨ã€ãƒªãƒãƒ¼ãƒ ã‚’考慮ã«å…¥ã‚Œã€ã‚³ãƒ¼ãƒ‰ã®è²¢çŒ®ã«ç„¦ç‚¹ã‚’当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=P9PBDZGOSVTKXEXU73ZNAJ) + +```sql +SELECT + base, + count() AS c +FROM git.file_changes +WHERE (author = 'Alexey Milovidov') AND (file_extension IN ('h', 'cpp', 'sql')) +GROUP BY basename(path) AS base +ORDER BY c DESC +LIMIT 10 + +┌─base───────────────────────────┬───c─┠+│ StorageReplicatedMergeTree.cpp │ 393 │ +│ InterpreterSelectQuery.cpp │ 299 │ +│ Aggregator.cpp │ 297 │ +│ Client.cpp │ 280 │ +│ MergeTreeData.cpp │ 274 │ +│ Server.cpp │ 264 │ +│ ExpressionAnalyzer.cpp │ 259 │ +│ StorageMergeTree.cpp │ 239 │ +│ Settings.h │ 225 │ +│ TCPHandler.cpp │ 205 │ +└────────────────────────────────┴─────┘ +10 rows in set. Elapsed: 0.032 sec. Processed 266.05 thousand rows, 5.68 MB (8.22 million rows/s., 175.50 MB/s.) +``` + +ã“ã‚Œã¯å½¼ã®èˆˆå‘³åˆ†é‡Žã‚’よりå映ã—ã¦ã„ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +## 著者数ãŒæœ€ã‚‚å°‘ãªã„最大ファイル + +ã“れを行ã†ã«ã¯ã€ã¾ãšæœ€å¤§ãƒ•ã‚¡ã‚¤ãƒ«ã‚’特定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ã€å±¥æ­´ã‹ã‚‰ã®ã‚³ãƒŸãƒƒãƒˆã«ã‚ˆã‚‹å®Œå…¨ãªãƒ•ã‚¡ã‚¤ãƒ«å†æ§‹æˆã«ã‚ˆã‚ŠæŽ¨å®šã™ã‚‹ã“ã¨ã¯éžå¸¸ã«è² æ‹…ãŒã‹ã‹ã‚Šã¾ã™ï¼ + +推定ã¨ã—ã¦ã€ç¾åœ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ¶é™ã—ã€è¡Œã®è¿½åŠ ã‚’åˆè¨ˆã—ã€å‰Šé™¤ã‚’å·®ã—引ãã¾ã™ã€‚次ã«ã€è‘—者数ã«å¯¾ã™ã‚‹é•·ã•ã®æ¯”率を計算ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=PVSDOHZYUMRDDUZFEYJC7J) + +```sql +WITH current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ) +SELECT + path, + sum(lines_added) - sum(lines_deleted) AS num_lines, + uniqExact(author) AS num_authors, + num_lines / num_authors AS lines_author_ratio +FROM git.file_changes +WHERE path IN (current_files) +GROUP BY path +ORDER BY lines_author_ratio DESC +LIMIT 10 + +┌─path──────────────────────────────────────────────────────────────────┬─num_lines─┬─num_authors─┬─lines_author_ratio─┠+│ src/Common/ClassificationDictionaries/emotional_dictionary_rus.txt │ 148590 │ 1 │ 148590 │ +│ src/Functions/ClassificationDictionaries/emotional_dictionary_rus.txt │ 55533 │ 1 │ 55533 │ +│ src/Functions/ClassificationDictionaries/charset_freq.txt │ 35722 │ 1 │ 35722 │ +│ src/Common/ClassificationDictionaries/charset_freq.txt │ 35722 │ 1 │ 35722 │ +│ tests/integration/test_storage_meilisearch/movies.json │ 19549 │ 1 │ 19549 │ +│ tests/queries/0_stateless/02364_multiSearch_function_family.reference │ 12874 │ 1 │ 12874 │ +│ src/Functions/ClassificationDictionaries/programming_freq.txt │ 9434 │ 1 │ 9434 │ +│ src/Common/ClassificationDictionaries/programming_freq.txt │ 9434 │ 1 │ 9434 │ +│ tests/performance/explain_ast.xml │ 5911 │ 1 │ 5911 │ +│ src/Analyzer/QueryAnalysisPass.cpp │ 5686 │ 1 │ 5686 │ +└───────────────────────────────────────────────────────────────────────┴───────────┴─────────────┴────────────────────┘ + +10 rows in set. Elapsed: 0.138 sec. Processed 798.15 thousand rows, 16.57 MB (5.79 million rows/s., 120.11 MB/s.) +``` + +テキスト辞書ã¯ã‚ã¾ã‚Šç¾å®Ÿçš„ã§ã¯ãªã„ã‹ã‚‚ã—ã‚Œãªã„ã®ã§ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’介ã—ã¦ã‚³ãƒ¼ãƒ‰ã®ã¿ã«åˆ¶é™ã—ã¾ã—ょã†ï¼ + +[play](https://sql.clickhouse.com?query_id=BZHGWUIZMPZZUHS5XRBK2M) + +```sql +WITH current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ) +SELECT + path, + sum(lines_added) - sum(lines_deleted) AS num_lines, + uniqExact(author) AS num_authors, + num_lines / num_authors AS lines_author_ratio +FROM git.file_changes +WHERE (path IN (current_files)) AND (file_extension IN ('h', 'cpp', 'sql')) +GROUP BY path +ORDER BY lines_author_ratio DESC +LIMIT 10 + +┌─path──────────────────────────────────┬─num_lines─┬─num_authors─┬─lines_author_ratio─┠+│ src/Analyzer/QueryAnalysisPass.cpp │ 5686 │ 1 │ 5686 │ +│ src/Analyzer/QueryTreeBuilder.cpp │ 880 │ 1 │ 880 │ +│ src/Planner/Planner.cpp │ 873 │ 1 │ 873 │ +│ src/Backups/RestorerFromBackup.cpp │ 869 │ 1 │ 869 │ +│ utils/memcpy-bench/FastMemcpy.h │ 770 │ 1 │ 770 │ +│ src/Planner/PlannerActionsVisitor.cpp │ 765 │ 1 │ 765 │ +│ src/Functions/sphinxstemen.cpp │ 728 │ 1 │ 728 │ +│ src/Planner/PlannerJoinTree.cpp │ 708 │ 1 │ 708 │ +│ src/Planner/PlannerJoins.cpp │ 695 │ 1 │ 695 │ +│ src/Analyzer/QueryNode.h │ 607 │ 1 │ 607 │ +└───────────────────────────────────────┴───────────┴─────────────┴────────────────────┘ +10 rows in set. Elapsed: 0.140 sec. Processed 798.15 thousand rows, 16.84 MB (5.70 million rows/s., 120.32 MB/s.) +``` + +若干ã®æ–°ã—ã„ãƒã‚¤ã‚¢ã‚¹ãŒã‚ã‚‹ãŸã‚ã€ã“ã‚Œã¯ã€æœ€è¿‘ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯ã‚³ãƒŸãƒƒãƒˆã®æ©Ÿä¼šãŒå°‘ãªã„ã§ã™ã€‚1 年以上経éŽã—ãŸãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ¶é™ã—ãŸã‚‰ã©ã†ãªã‚‹ã®ã§ã—ょã†ã‹ï¼Ÿ + +[play](https://sql.clickhouse.com?query_id=RMHHZEDHFUCBGRQVQA2732) + +```sql +WITH current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ) +SELECT + min(time) AS min_date, + path, + sum(lines_added) - sum(lines_deleted) AS num_lines, + uniqExact(author) AS num_authors, + num_lines / num_authors AS lines_author_ratio +FROM git.file_changes +WHERE (path IN (current_files)) AND (file_extension IN ('h', 'cpp', 'sql')) +GROUP BY path +HAVING min_date <= (now() - toIntervalYear(1)) +ORDER BY lines_author_ratio DESC +LIMIT 10 + +┌────────────min_date─┬─path───────────────────────────────────────────────────────────┬─num_lines─┬─num_authors─┬─lines_author_ratio─┠+│ 2021-03-08 07:00:54 │ utils/memcpy-bench/FastMemcpy.h │ 770 │ 1 │ 770 │ +│ 2021-05-04 13:47:34 │ src/Functions/sphinxstemen.cpp │ 728 │ 1 │ 728 │ +│ 2021-03-14 16:52:51 │ utils/memcpy-bench/glibc/dwarf2.h │ 592 │ 1 │ 592 │ +│ 2021-03-08 09:04:52 │ utils/memcpy-bench/FastMemcpy_Avx.h │ 496 │ 1 │ 496 │ +│ 2020-10-19 01:10:50 │ tests/queries/0_stateless/01518_nullable_aggregate_states2.sql │ 411 │ 1 │ 411 │ +│ 2020-11-24 14:53:34 │ programs/server/GRPCHandler.cpp │ 399 │ 1 │ 399 │ +│ 2021-03-09 14:10:28 │ src/DataTypes/Serializations/SerializationSparse.cpp │ 363 │ 1 │ 363 │ +│ 2021-08-20 15:06:57 │ src/Functions/vectorFunctions.cpp │ 1327 │ 4 │ 331.75 │ +│ 2020-08-04 03:26:23 │ src/Interpreters/MySQL/CreateQueryConvertVisitor.cpp │ 311 │ 1 │ 311 │ +│ 2020-11-06 15:45:13 │ src/Storages/Rocksdb/StorageEmbeddedRocksdb.cpp │ 611 │ 2 │ 305.5 │ +└─────────────────────┴────────────────────────────────────────────────────────────────┴───────────┴─────────────┴────────────────────┘ + +10 rows in set. Elapsed: 0.143 sec. Processed 798.15 thousand rows, 18.00 MB (5.58 million rows/s., 125.87 MB/s.) +``` + +## コミットã¨ã‚³ãƒ¼ãƒ‰è¡Œã®æ™‚間別分布; 曜日別ã€è‘—者別; 特定ã®ã‚µãƒ–ディレクトリ用 + +ã“ã‚Œã¯ã€é€±ã®æ›œæ—¥ã”ã¨ã®è¿½åŠ ã•ã‚ŒãŸè¡Œã¨å‰Šé™¤ã•ã‚ŒãŸè¡Œã®æ•°ã¨ã—ã¦è§£é‡ˆã—ã¾ã™ã€‚ã“ã®å ´åˆã€[Functions ディレクトリ](https://github.com/ClickHouse/ClickHouse/tree/master/src/Functions) ã«æ³¨ç›®ã—ã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=PF3KEMYG5CVLJGCFYQEGB1) + +```sql +SELECT + dayOfWeek, + uniq(commit_hash) AS commits, + sum(lines_added) AS lines_added, + sum(lines_deleted) AS lines_deleted +FROM git.file_changes +WHERE path LIKE 'src/Functions%' +GROUP BY toDayOfWeek(time) AS dayOfWeek + +┌─dayOfWeek─┬─commits─┬─lines_added─┬─lines_deleted─┠+│ 1 │ 476 │ 24619 │ 15782 │ +│ 2 │ 434 │ 18098 │ 9938 │ +│ 3 │ 496 │ 26562 │ 20883 │ +│ 4 │ 587 │ 65674 │ 18862 │ +│ 5 │ 504 │ 85917 │ 14518 │ +│ 6 │ 314 │ 13604 │ 10144 │ +│ 7 │ 294 │ 11938 │ 6451 │ +└───────────┴─────────┴─────────────┴───────────────┘ + +7 rows in set. Elapsed: 0.034 sec. Processed 266.05 thousand rows, 14.66 MB (7.73 million rows/s., 425.56 MB/s.) +``` + +ãŠã‚ˆã³ã€æ™‚間帯別ã«ã€‚ + +[play](https://sql.clickhouse.com?query_id=Q4VDVKEGHHRBCUJHNCVTF1) + +```sql +SELECT + hourOfDay, + uniq(commit_hash) AS commits, + sum(lines_added) AS lines_added, + sum(lines_deleted) AS lines_deleted +FROM git.file_changes +WHERE path LIKE 'src/Functions%' +GROUP BY toHour(time) AS hourOfDay + +┌─hourOfDay─┬─commits─┬─lines_added─┬─lines_deleted─┠+│ 0 │ 71 │ 4169 │ 3404 │ +│ 1 │ 90 │ 2174 │ 1927 │ +│ 2 │ 65 │ 2343 │ 1515 │ +│ 3 │ 76 │ 2552 │ 493 │ +│ 4 │ 62 │ 1480 │ 1304 │ +│ 5 │ 38 │ 1644 │ 253 │ +│ 6 │ 104 │ 4434 │ 2979 │ +│ 7 │ 117 │ 4171 │ 1678 │ +│ 8 │ 106 │ 4604 │ 4673 │ +│ 9 │ 135 │ 60550 │ 2678 │ +│ 10 │ 149 │ 6133 │ 3482 │ +│ 11 │ 182 │ 8040 │ 3833 │ +│ 12 │ 209 │ 29428 │ 15040 │ +│ 13 │ 187 │ 10204 │ 5491 │ +│ 14 │ 204 │ 9028 │ 6060 │ +│ 15 │ 231 │ 15179 │ 10077 │ +│ 16 │ 196 │ 9568 │ 5925 │ +│ 17 │ 138 │ 4941 │ 3849 │ +│ 18 │ 123 │ 4193 │ 3036 │ +│ 19 │ 165 │ 8817 │ 6646 │ +│ 20 │ 140 │ 3749 │ 2379 │ +│ 21 │ 132 │ 41585 │ 4182 │ +│ 22 │ 85 │ 4094 │ 3955 │ +│ 23 │ 100 │ 3332 │ 1719 │ +└───────────┴─────────┴─────────────┴───────────────┘ + +24 rows in set. Elapsed: 0.039 sec. Processed 266.05 thousand rows, 14.66 MB (6.77 million rows/s., 372.89 MB/s.) +``` + +ã“ã®åˆ†å¸ƒã¯ã€ç§ãŸã¡ã®é–‹ç™ºãƒãƒ¼ãƒ ã®å¤§éƒ¨åˆ†ãŒã‚¢ãƒ ã‚¹ãƒ†ãƒ«ãƒ€ãƒ ã«ã„ã‚‹ã“ã¨ã‚’考慮ã™ã‚‹ã¨ç†ã«ã‹ãªã£ã¦ã„ã¾ã™ã€‚`bar` 関数ã¯ã€ã“れらã®åˆ†å¸ƒã‚’視覚化ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +[play](https://sql.clickhouse.com?query_id=9AZ8CENV8N91YGW7T6IB68) + +```sql +SELECT + hourOfDay, + bar(commits, 0, 400, 50) AS commits, + bar(lines_added, 0, 30000, 50) AS lines_added, + bar(lines_deleted, 0, 15000, 50) AS lines_deleted +FROM +( + SELECT + hourOfDay, + uniq(commit_hash) AS commits, + sum(lines_added) AS lines_added, + sum(lines_deleted) AS lines_deleted + FROM git.file_changes + WHERE path LIKE 'src/Functions%' + GROUP BY toHour(time) AS hourOfDay +) + +┌─hourOfDay─┬─commits───────────────────────┬─lines_added────────────────────────────────────────┬─lines_deleted──────────────────────────────────────┠+│ 0 │ ████████▊ │ ██████▊ │ ███████████▎ │ +│ 1 │ ███████████▎ │ ███▌ │ ██████■│ +│ 2 │ ████████ │ ███▊ │ █████ │ +│ 3 │ █████████▌ │ ████▎ │ █▋ │ +│ 4 │ ███████▋ │ ██■│ ████▎ │ +│ 5 │ ████▋ │ ██▋ │ â–‹ │ +│ 6 │ █████████████ │ ███████■│ █████████▊ │ +│ 7 │ ██████████████▋ │ ██████▊ │ █████▌ │ +│ 8 │ █████████████▎ │ ███████▋ │ ███████████████▌ │ +│ 9 │ ████████████████▊ │ ██████████████████████████████████████████████████ │ ████████▊ │ +│ 10 │ ██████████████████▋ │ ██████████■│ ███████████▌ │ +│ 11 │ ██████████████████████▋ │ █████████████■│ ████████████▋ │ +│ 12 │ ██████████████████████████ │ █████████████████████████████████████████████████ │ ██████████████████████████████████████████████████ │ +│ 13 │ ███████████████████████■│ █████████████████ │ ██████████████████▎ │ +│ 14 │ █████████████████████████▌ │ ███████████████ │ ████████████████████■│ +│ 15 │ ████████████████████████████▊ │ █████████████████████████▎ │ █████████████████████████████████▌ │ +│ 16 │ ████████████████████████▌ │ ███████████████▊ │ ███████████████████▋ │ +│ 17 │ █████████████████▎ │ ████████■│ ████████████▋ │ +│ 18 │ ███████████████■│ ██████▊ │ ██████████ │ +│ 19 │ ████████████████████▋ │ ██████████████▋ │ ██████████████████████■│ +│ 20 │ █████████████████▌ │ ██████■│ ███████▊ │ +│ 21 │ ████████████████▌ │ ██████████████████████████████████████████████████ │ █████████████▊ │ +│ 22 │ ██████████▋ │ ██████▋ │ █████████████■│ +│ 23 │ ████████████▌ │ █████▌ │ █████▋ │ +└───────────┴───────────────────────────────┴────────────────────────────────────────────────────┴────────────────────────────────────────────────────┘ + +24 rows in set. Elapsed: 0.038 sec. Processed 266.05 thousand rows, 14.66 MB (7.09 million rows/s., 390.69 MB/s.) +``` + +## 著者ã®è¡Œåˆ—:他ã®è‘—者ã®ã‚³ãƒ¼ãƒ‰ã‚’書ãç›´ã™å‚¾å‘を示㙠+ +`sign = -1` ã¯ã‚³ãƒ¼ãƒ‰å‰Šé™¤ã‚’示ã—ã¦ã„ã¾ã™ã€‚å¥èª­ç‚¹ã‚„空行ã®æŒ¿å…¥ã¯é™¤å¤–ã—ã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=448O8GWAHY3EM6ZZ7AGLAM) + +```sql +SELECT + prev_author || '(a)' as add_author, + author || '(d)' as delete_author, + count() AS c +FROM git.line_changes +WHERE (sign = -1) AND (file_extension IN ('h', 'cpp')) AND (line_type NOT IN ('Punct', 'Empty')) AND (author != prev_author) AND (prev_author != '') +GROUP BY + prev_author, + author +ORDER BY c DESC +LIMIT 1 BY prev_author +LIMIT 100 + +┌─prev_author──────────┬─author───────────┬─────c─┠+│ Ivan │ Alexey Milovidov │ 18554 │ +│ Alexey Arno │ Alexey Milovidov │ 18475 │ +│ Michael Kolupaev │ Alexey Milovidov │ 14135 │ +│ Alexey Milovidov │ Nikolai Kochetov │ 13435 │ +│ Andrey Mironov │ Alexey Milovidov │ 10418 │ +│ proller │ Alexey Milovidov │ 7280 │ +│ Nikolai Kochetov │ Alexey Milovidov │ 6806 │ +│ alexey-milovidov │ Alexey Milovidov │ 5027 │ +│ Vitaliy Lyudvichenko │ Alexey Milovidov │ 4390 │ +│ Amos Bird │ Ivan Lezhankin │ 3125 │ +│ f1yegor │ Alexey Milovidov │ 3119 │ +│ Pavel Kartavyy │ Alexey Milovidov │ 3087 │ +│ Alexey Zatelepin │ Alexey Milovidov │ 2978 │ +│ alesapin │ Alexey Milovidov │ 2949 │ +│ Sergey Fedorov │ Alexey Milovidov │ 2727 │ +│ Ivan Lezhankin │ Alexey Milovidov │ 2618 │ +│ Vasily Nemkov │ Alexey Milovidov │ 2547 │ +│ Alexander Tokmakov │ Alexey Milovidov │ 2493 │ +│ Nikita Vasilev │ Maksim Kita │ 2420 │ +│ Anton Popov │ Amos Bird │ 2127 │ +└──────────────────────┴──────────────────┴───────┘ + +20 rows in set. Elapsed: 0.098 sec. Processed 7.54 million rows, 42.16 MB (76.67 million rows/s., 428.99 MB/s.) +``` + +Sankeyãƒãƒ£ãƒ¼ãƒˆï¼ˆSuperSet)ã¯ã€ã“れをã†ã¾ã視覚化ã§ãã¾ã™ã€‚視覚的多様性を高ã‚ã‚‹ãŸã‚ã«ã€å„著者ã®ä¸Šä½3ã¤ã®ã‚³ãƒ¼ãƒ‰å‰Šé™¤è€…ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«`LIMIT BY`ã‚’3ã«å¢—ã‚„ã—ã¾ã™ã€‚ + +![](./images/superset-authors-matrix.png) + +Alexeyã¯æ˜Žã‚‰ã‹ã«ä»–ã®äººã®ã‚³ãƒ¼ãƒ‰ã‚’削除ã™ã‚‹ã®ãŒå¥½ãã§ã™ã€‚よりãƒãƒ©ãƒ³ã‚¹ã®å–ã‚ŒãŸã‚³ãƒ¼ãƒ‰å‰Šé™¤ã®ãƒ“ューを得るãŸã‚ã«ã€å½¼ã‚’除外ã—ã¾ã—ょã†ã€‚ + +![](./images/superset-authors-matrix_v2.png) + +## 曜日ã”ã¨ã®æœ€é«˜è²¢çŒ®è€…ã¯èª°ã§ã™ã‹ï¼Ÿ + +コミット数をå˜ç´”ã«è€ƒãˆã‚‹ã¨ï¼š + +[プレイ](https://sql.clickhouse.com?query_id=WXPKFJCAHOKYKEVTWNFVCY) + +```sql +SELECT + day_of_week, + author, + count() AS c +FROM git.commits +GROUP BY + dayOfWeek(time) AS day_of_week, + author +ORDER BY + day_of_week ASC, + c DESC +LIMIT 1 BY day_of_week + +┌─day_of_week─┬─author───────────┬────c─┠+│ 1 │ Alexey Milovidov │ 2204 │ +│ 2 │ Alexey Milovidov │ 1588 │ +│ 3 │ Alexey Milovidov │ 1725 │ +│ 4 │ Alexey Milovidov │ 1915 │ +│ 5 │ Alexey Milovidov │ 1940 │ +│ 6 │ Alexey Milovidov │ 1851 │ +│ 7 │ Alexey Milovidov │ 2400 │ +└─────────────┴──────────────────┴──────┘ + +7 rows in set. Elapsed: 0.012 sec. Processed 62.78 thousand rows, 395.47 KB (5.44 million rows/s., 34.27 MB/s.) +``` + +ã“ã“ã§ã¯ã€æœ€ã‚‚é•·ã„貢献者ã§ã‚る創業者ã®Alexeyã«ã„ãã¤ã‹ã®åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ã€‚éŽåŽ»1å¹´ã«åˆ†æžã‚’制é™ã—ã¾ã—ょã†ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=8YRJGHFTNJAWJ96XCJKKEH) + +```sql +SELECT + day_of_week, + author, + count() AS c +FROM git.commits +WHERE time > (now() - toIntervalYear(1)) +GROUP BY + dayOfWeek(time) AS day_of_week, + author +ORDER BY + day_of_week ASC, + c DESC +LIMIT 1 BY day_of_week + +┌─day_of_week─┬─author───────────┬───c─┠+│ 1 │ Alexey Milovidov │ 198 │ +│ 2 │ alesapin │ 162 │ +│ 3 │ alesapin │ 163 │ +│ 4 │ Azat Khuzhin │ 166 │ +│ 5 │ alesapin │ 191 │ +│ 6 │ Alexey Milovidov │ 179 │ +│ 7 │ Alexey Milovidov │ 243 │ +└─────────────┴──────────────────┴─────┘ + +7 rows in set. Elapsed: 0.004 sec. Processed 21.82 thousand rows, 140.02 KB (4.88 million rows/s., 31.29 MB/s.) +``` + +ã“ã‚Œã¯ã¾ã å°‘ã—å˜ç´”ã§ã€äººã€…ã®ä½œæ¥­ã‚’å映ã—ã¦ã„ã¾ã›ã‚“。 + +より良ã„指標ã¯ã€éŽåŽ»1å¹´ã®ç·ä½œæ¥­ã«å¯¾ã™ã‚‹å„æ—¥ã®æœ€é«˜è²¢çŒ®è€…ã®å‰²åˆã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。削除ã¨è¿½åŠ ã®ã‚³ãƒ¼ãƒ‰ã‚’åŒç­‰ã«æ‰±ã„ã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=VQF4KMRDSUEXGS1JFVDJHV) + +```sql +SELECT + top_author.day_of_week, + top_author.author, + top_author.author_work / all_work.total_work AS top_author_percent +FROM +( + SELECT + day_of_week, + author, + sum(lines_added) + sum(lines_deleted) AS author_work + FROM git.file_changes + WHERE time > (now() - toIntervalYear(1)) + GROUP BY + author, + dayOfWeek(time) AS day_of_week + ORDER BY + day_of_week ASC, + author_work DESC + LIMIT 1 BY day_of_week +) AS top_author +INNER JOIN +( + SELECT + day_of_week, + sum(lines_added) + sum(lines_deleted) AS total_work + FROM git.file_changes + WHERE time > (now() - toIntervalYear(1)) + GROUP BY dayOfWeek(time) AS day_of_week +) AS all_work USING (day_of_week) + +┌─day_of_week─┬─author──────────────┬──top_author_percent─┠+│ 1 │ Alexey Milovidov │ 0.3168282877768332 │ +│ 2 │ Mikhail f. Shiryaev │ 0.3523434231193969 │ +│ 3 │ vdimir │ 0.11859742484577324 │ +│ 4 │ Nikolay Degterinsky │ 0.34577318920318467 │ +│ 5 │ Alexey Milovidov │ 0.13208704423684223 │ +│ 6 │ Alexey Milovidov │ 0.18895257783624633 │ +│ 7 │ Robert Schulze │ 0.3617405888930302 │ +└─────────────┴─────────────────────┴─────────────────────┘ + +7 rows in set. Elapsed: 0.014 sec. Processed 106.12 thousand rows, 1.38 MB (7.61 million rows/s., 98.65 MB/s.) +``` + +## リãƒã‚¸ãƒˆãƒªå…¨ä½“ã®ã‚³ãƒ¼ãƒ‰å¹´é½¢ã®åˆ†å¸ƒ + +分æžã‚’ç¾åœ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ¶é™ã—ã¾ã™ã€‚ç°¡æ½”ã•ã®ãŸã‚ã«ã€çµæžœã‚’æ·±ã•2ã®ãƒ«ãƒ¼ãƒˆãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã”ã¨ã«5ファイルã«åˆ¶é™ã—ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦èª¿æ•´ã—ã¦ãã ã•ã„。 + +[プレイ](https://sql.clickhouse.com?query_id=6YWAUQYPZINZDJGBEZBNWG) + +```sql +WITH current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ) +SELECT + concat(root, '/', sub_folder) AS folder, + round(avg(days_present)) AS avg_age_of_files, + min(days_present) AS min_age_files, + max(days_present) AS max_age_files, + count() AS c +FROM +( + SELECT + path, + dateDiff('day', min(time), toDate('2022-11-03')) AS days_present + FROM git.file_changes + WHERE (path IN (current_files)) AND (file_extension IN ('h', 'cpp', 'sql')) + GROUP BY path +) +GROUP BY + splitByChar('/', path)[1] AS root, + splitByChar('/', path)[2] AS sub_folder +ORDER BY + root ASC, + c DESC +LIMIT 5 BY root + +┌─folder───────────────────────────┬─avg_age_of_files─┬─min_age_files─┬─max_age_files─┬────c─┠+│ base/base │ 387 │ 201 │ 397 │ 84 │ +│ base/glibc-compatibility │ 887 │ 59 │ 993 │ 19 │ +│ base/consistent-hashing │ 993 │ 993 │ 993 │ 5 │ +│ base/widechar_width │ 993 │ 993 │ 993 │ 2 │ +│ base/consistent-hashing-sumbur │ 993 │ 993 │ 993 │ 2 │ +│ docker/test │ 1043 │ 1043 │ 1043 │ 1 │ +│ programs/odbc-bridge │ 835 │ 91 │ 945 │ 25 │ +│ programs/copier │ 587 │ 14 │ 945 │ 22 │ +│ programs/library-bridge │ 155 │ 47 │ 608 │ 21 │ +│ programs/disks │ 144 │ 62 │ 150 │ 14 │ +│ programs/server │ 874 │ 709 │ 945 │ 10 │ +│ rust/BLAKE3 │ 52 │ 52 │ 52 │ 1 │ +│ src/Functions │ 752 │ 0 │ 944 │ 809 │ +│ src/Storages │ 700 │ 8 │ 944 │ 736 │ +│ src/Interpreters │ 684 │ 3 │ 944 │ 490 │ +│ src/Processors │ 703 │ 44 │ 944 │ 482 │ +│ src/Common │ 673 │ 7 │ 944 │ 473 │ +│ tests/queries │ 674 │ -5 │ 945 │ 3777 │ +│ tests/integration │ 656 │ 132 │ 945 │ 4 │ +│ utils/memcpy-bench │ 601 │ 599 │ 605 │ 10 │ +│ utils/keeper-bench │ 570 │ 569 │ 570 │ 7 │ +│ utils/durability-test │ 793 │ 793 │ 793 │ 4 │ +│ utils/self-extracting-executable │ 143 │ 143 │ 143 │ 3 │ +│ utils/self-extr-exec │ 224 │ 224 │ 224 │ 2 │ +└──────────────────────────────────┴──────────────────┴───────────────┴───────────────┴──────┘ + +24 rows in set. Elapsed: 0.129 sec. Processed 798.15 thousand rows, 15.11 MB (6.19 million rows/s., 117.08 MB/s.) +``` + +## å„著者ã®ã‚³ãƒ¼ãƒ‰ã®ä½•ãƒ‘ーセントãŒä»–ã®è‘—者ã«ã‚ˆã£ã¦å‰Šé™¤ã•ã‚ŒãŸã‹ï¼Ÿ + +ã“ã®è³ªå•ã‚’解決ã™ã‚‹ã«ã¯ã€è‘—者ã«ã‚ˆã£ã¦æ›¸ã‹ã‚ŒãŸè¡Œæ•°ã‚’ä»–ã®è²¢çŒ®è€…ã«ã‚ˆã£ã¦å‰Šé™¤ã•ã‚ŒãŸç·è¡Œæ•°ã§å‰²ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=T4DTWTB36WFSEYAZLMGRNF) + +```sql +SELECT + k, + written_code.c, + removed_code.c, + removed_code.c / written_code.c AS remove_ratio +FROM +( + SELECT + author AS k, + count() AS c + FROM git.line_changes + WHERE (sign = 1) AND (file_extension IN ('h', 'cpp')) AND (line_type NOT IN ('Punct', 'Empty')) + GROUP BY k +) AS written_code +INNER JOIN +( + SELECT + prev_author AS k, + count() AS c + FROM git.line_changes + WHERE (sign = -1) AND (file_extension IN ('h', 'cpp')) AND (line_type NOT IN ('Punct', 'Empty')) AND (author != prev_author) + GROUP BY k +) AS removed_code USING (k) +WHERE written_code.c > 1000 +ORDER BY remove_ratio DESC +LIMIT 10 + +┌─k──────────────────┬─────c─┬─removed_code.c─┬───────remove_ratio─┠+│ Marek VavrusÌŒa │ 1458 │ 1318 │ 0.9039780521262003 │ +│ Ivan │ 32715 │ 27500 │ 0.8405930001528351 │ +│ artpaul │ 3450 │ 2840 │ 0.8231884057971014 │ +│ Silviu Caragea │ 1542 │ 1209 │ 0.7840466926070039 │ +│ Ruslan │ 1027 │ 802 │ 0.7809152872444012 │ +│ Tsarkova Anastasia │ 1755 │ 1364 │ 0.7772079772079772 │ +│ Vyacheslav Alipov │ 3526 │ 2727 │ 0.7733976176971072 │ +│ Marek VavruÅ¡a │ 1467 │ 1124 │ 0.7661895023858214 │ +│ f1yegor │ 7194 │ 5213 │ 0.7246316374756742 │ +│ kreuzerkrieg │ 3406 │ 2468 │ 0.724603640634175 │ +└────────────────────┴───────┴────────────────┴────────────────────┘ + +10 rows in set. Elapsed: 0.126 sec. Processed 15.07 million rows, 73.51 MB (119.97 million rows/s., 585.16 MB/s.) +``` + +## 最も多ã書ãç›´ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒªã‚¹ãƒˆï¼Ÿ + +ã“ã®è³ªå•ã«å¯¾ã™ã‚‹æœ€ã‚‚å˜ç´”ãªã‚¢ãƒ—ローãƒã¯ã€ãƒ‘スã”ã¨ã®è¡Œä¿®æ­£æ•°ã‚’å˜ç´”ã«ã‚«ã‚¦ãƒ³ãƒˆã™ã‚‹ã“ã¨ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“(ç¾è¡Œãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ¶é™ï¼‰ï¼š + +```sql +WITH current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ) +SELECT + path, + count() AS c +FROM git.line_changes +WHERE (file_extension IN ('h', 'cpp', 'sql')) AND (path IN (current_files)) +GROUP BY path +ORDER BY c DESC +LIMIT 10 + +┌─path───────────────────────────────────────────────────┬─────c─┠+│ src/Storages/StorageReplicatedMergeTree.cpp │ 21871 │ +│ src/Storages/MergeTree/MergeTreeData.cpp │ 17709 │ +│ programs/client/Client.cpp │ 15882 │ +│ src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp │ 14249 │ +│ src/Interpreters/InterpreterSelectQuery.cpp │ 12636 │ +│ src/Parsers/ExpressionListParsers.cpp │ 11794 │ +│ src/Analyzer/QueryAnalysisPass.cpp │ 11760 │ +│ src/Coordination/KeeperStorage.cpp │ 10225 │ +│ src/Functions/FunctionsConversion.h │ 9247 │ +│ src/Parsers/ExpressionElementParsers.cpp │ 8197 │ +└────────────────────────────────────────────────────────┴───────┘ + +10 rows in set. Elapsed: 0.160 sec. Processed 8.07 million rows, 98.99 MB (50.49 million rows/s., 619.49 MB/s.) +``` + +ã“ã‚Œã¯ã€Œæ›¸ãç›´ã—ã€ã¨ã„ã†æ¦‚念をæ‰ãˆã¦ã„ã¾ã›ã‚“ãŒã€ã‚³ãƒŸãƒƒãƒˆå†…ã®å¤§éƒ¨åˆ†ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã«æ±‚ã‚ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚ˆã‚Šè¤‡é›‘ãªã‚¯ã‚¨ãƒªã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚50%以上ãŒå‰Šé™¤ã•ã‚Œã€50%以上ãŒè¿½åŠ ã•ã‚ŒãŸå ´åˆã‚’書ãç›´ã—ã¨è¦‹ãªã™ã¨ã—ã¾ã—ょã†ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯ç¾åœ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ã¿ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚我々ã¯ã€`path`ã¨`commit_hash`をグループ化ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«å¤‰æ›´ã‚’リストã—ã€è¿½åŠ ã•ã‚ŒãŸè¡Œã¨å‰Šé™¤ã•ã‚ŒãŸè¡Œã®æ•°ã‚’è¿”ã—ã¾ã™ã€‚ウィンドウ関数を使用ã—ã¦ã€ã‚る瞬間ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ç´¯ç©ã‚µã‚¤ã‚ºã‚’推定ã—ã€å¤‰æ›´ãŒãƒ•ã‚¡ã‚¤ãƒ«ã‚µã‚¤ã‚ºã«ä¸Žãˆã‚‹å½±éŸ¿ã‚’`追加行 - 削除行`ã¨ã—ã¦æŽ¨å®šã—ã¾ã™ã€‚ã“ã®çµ±è¨ˆã‚’使用ã—ã¦ã€å„変更ã®è¿½åŠ ã•ã‚ŒãŸã¾ãŸã¯å‰Šé™¤ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®å‰²åˆã‚’計算ã§ãã¾ã™ã€‚最後ã«ã€æ›¸ãç›´ã—を構æˆã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«å¤‰æ›´ã®æ•°ã‚’カウントã—ã¾ã™ã€‚ã™ãªã‚ã¡ã€`(percent_add >= 0.5) AND (percent_delete >= 0.5) AND current_size > 50`。ファイルãŒ90行未満ã®å ´åˆã¯ãれを除外ã—ã€æ—©æœŸã®å¯„稿ãŒæ›¸ãç›´ã—ã¨ã—ã¦ã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã‚‹ã®ã‚’é¿ã‘ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šéžå¸¸ã«å°ã•ãªãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒã‚¤ã‚¢ã‚¹ã‚’é¿ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=5PL1QLNSH6QQTR8H9HINNP) + +```sql +WITH + current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ), + changes AS + ( + SELECT + path, + max(time) AS max_time, + commit_hash, + any(lines_added) AS num_added, + any(lines_deleted) AS num_deleted, + any(change_type) AS type + FROM git.file_changes + WHERE (change_type IN ('Add', 'Modify')) AND (path IN (current_files)) AND (file_extension IN ('h', 'cpp', 'sql')) + GROUP BY + path, + commit_hash + ORDER BY + path ASC, + max_time ASC + ), + rewrites AS + ( + SELECT + path, + commit_hash, + max_time, + type, + num_added, + num_deleted, + sum(num_added - num_deleted) OVER (PARTITION BY path ORDER BY max_time ASC) AS current_size, + if(current_size > 0, num_added / current_size, 0) AS percent_add, + if(current_size > 0, num_deleted / current_size, 0) AS percent_delete + FROM changes + ) +SELECT + path, + count() AS num_rewrites +FROM rewrites +WHERE (type = 'Modify') AND (percent_add >= 0.5) AND (percent_delete >= 0.5) AND (current_size > 50) +GROUP BY path +ORDER BY num_rewrites DESC +LIMIT 10 + +┌─path──────────────────────────────────────────────────┬─num_rewrites─┠+│ src/Storages/WindowView/StorageWindowView.cpp │ 8 │ +│ src/Functions/array/arrayIndex.h │ 7 │ +│ src/Dictionaries/CacheDictionary.cpp │ 6 │ +│ src/Dictionaries/RangeHashedDictionary.cpp │ 5 │ +│ programs/client/Client.cpp │ 4 │ +│ src/Functions/polygonPerimeter.cpp │ 4 │ +│ src/Functions/polygonsEquals.cpp │ 4 │ +│ src/Functions/polygonsWithin.cpp │ 4 │ +│ src/Processors/Formats/Impl/ArrowColumnToCHColumn.cpp │ 4 │ +│ src/Functions/polygonsSymDifference.cpp │ 4 │ +└───────────────────────────────────────────────────────┴──────────────┘ + +10 rows in set. Elapsed: 0.299 sec. Processed 798.15 thousand rows, 31.52 MB (2.67 million rows/s., 105.29 MB/s.) +``` + +## コードãŒãƒªãƒã‚¸ãƒˆãƒªã«ç•™ã¾ã‚‹å¯èƒ½æ€§ãŒæœ€ã‚‚高ã„曜日ã¯ï¼Ÿ + +ã“ã®ãŸã‚ã«ã¯ã€ã‚³ãƒ¼ãƒ‰ã®è¡Œã‚’一æ„ã«ç‰¹å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚åŒã˜è¡ŒãŒãƒ•ã‚¡ã‚¤ãƒ«å†…ã«è¤‡æ•°å›žè¡¨ç¤ºã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ãƒ‘スã¨è¡Œã®å†…容を使用ã—ã¦æŽ¨å®šã—ã¾ã™ã€‚ + +追加ã•ã‚ŒãŸè¡Œã«é–¢ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’作æˆã—ã€å‰Šé™¤ã•ã‚ŒãŸè¡Œã¨çµåˆã—ã€å¾Œè€…ãŒå‰è€…よりも最近発生ã—ãŸã‚±ãƒ¼ã‚¹ã‚’フィルタリングã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å‰Šé™¤ã•ã‚ŒãŸè¡Œã‚’å–å¾—ã—ã€ã“れらã®äºŒã¤ã®ã‚¤ãƒ™ãƒ³ãƒˆé–“ã®æ™‚間を計算ã§ãã¾ã™ã€‚ + +最後ã«ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’集約ã—ã¦ã€æ›œæ—¥ã”ã¨ã®ãƒªãƒã‚¸ãƒˆãƒªã®å¹³å‡ä¿æŒæ—¥æ•°ã‚’計算ã—ã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=GVF23LEZTNZI22BT8LZBBE) + +```sql +SELECT + day_of_week_added, + count() AS num, + avg(days_present) AS avg_days_present +FROM +( + SELECT + added_code.line, + added_code.time AS added_day, + dateDiff('day', added_code.time, removed_code.time) AS days_present + FROM + ( + SELECT + path, + line, + max(time) AS time + FROM git.line_changes + WHERE (sign = 1) AND (line_type NOT IN ('Punct', 'Empty')) + GROUP BY + path, + line + ) AS added_code + INNER JOIN + ( + SELECT + path, + line, + max(time) AS time + FROM git.line_changes + WHERE (sign = -1) AND (line_type NOT IN ('Punct', 'Empty')) + GROUP BY + path, + line + ) AS removed_code USING (path, line) + WHERE removed_code.time > added_code.time +) +GROUP BY dayOfWeek(added_day) AS day_of_week_added + +┌─day_of_week_added─┬────num─┬───avg_days_present─┠+│ 1 │ 171879 │ 193.81759260875384 │ +│ 2 │ 141448 │ 153.0931013517335 │ +│ 3 │ 161230 │ 137.61553681076722 │ +│ 4 │ 255728 │ 121.14149799787273 │ +│ 5 │ 203907 │ 141.60181847606998 │ +│ 6 │ 62305 │ 202.43449161383518 │ +│ 7 │ 70904 │ 220.0266134491707 │ +└───────────────────┴────────┴────────────────────┘ + +7 rows in set. Elapsed: 3.965 sec. Processed 15.07 million rows, 1.92 GB (3.80 million rows/s., 483.50 MB/s.) +``` + +## å¹³å‡ã‚³ãƒ¼ãƒ‰å¹´é½¢ã§ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ« + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€[コードãŒãƒªãƒã‚¸ãƒˆãƒªã«ç•™ã¾ã‚‹å¯èƒ½æ€§ãŒæœ€ã‚‚高ã„曜日ã¯ï¼Ÿ](#コードãŒãƒªãƒã‚¸ãƒˆãƒªã«ç•™ã¾ã‚‹å¯èƒ½æ€§ãŒæœ€ã‚‚高ã„曜日ã¯) ã¨åŒã˜åŽŸå‰‡ã‚’使用ã—ã¾ã™ - パスã¨è¡Œã®å†…容を使用ã—ã¦ã€è¡Œã®ã‚³ãƒ¼ãƒ‰ã‚’一æ„ã«ç‰¹å®šã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ©ã‚¤ãƒ³ãŒè¿½åŠ ã•ã‚Œã¦ã‹ã‚‰å‰Šé™¤ã•ã‚Œã‚‹ã¾ã§ã®æ™‚間を特定ã§ãã¾ã™ã€‚ãŸã ã—ã€ç¾åœ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¨ã‚³ãƒ¼ãƒ‰ã®ã¿ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã€å„ファイルã®è¡Œã«ã‚ãŸã£ã¦å¹³å‡åŒ–ã—ã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=3CYYT7HEHWRFHVCM9JCKSU) + +```sql +WITH + current_files AS + ( + SELECT path + FROM + ( + SELECT + old_path AS path, + max(time) AS last_time, + 2 AS change_type + FROM git.file_changes + GROUP BY old_path + UNION ALL + SELECT + path, + max(time) AS last_time, + argMax(change_type, time) AS change_type + FROM git.file_changes + GROUP BY path + ) + GROUP BY path + HAVING (argMax(change_type, last_time) != 2) AND (NOT match(path, '(^dbms/)|(^libs/)|(^tests/testflows/)|(^programs/server/store/)')) + ORDER BY path ASC + ), + lines_removed AS + ( + SELECT + added_code.path AS path, + added_code.line, + added_code.time AS added_day, + dateDiff('day', added_code.time, removed_code.time) AS days_present + FROM + ( + SELECT + path, + line, + max(time) AS time, + any(file_extension) AS file_extension + FROM git.line_changes + WHERE (sign = 1) AND (line_type NOT IN ('Punct', 'Empty')) + GROUP BY + path, + line + ) AS added_code + INNER JOIN + ( + SELECT + path, + line, + max(time) AS time + FROM git.line_changes + WHERE (sign = -1) AND (line_type NOT IN ('Punct', 'Empty')) + GROUP BY + path, + line + ) AS removed_code USING (path, line) + WHERE (removed_code.time > added_code.time) AND (path IN (current_files)) AND (file_extension IN ('h', 'cpp', 'sql')) + ) +SELECT + path, + avg(days_present) AS avg_code_age +FROM lines_removed +GROUP BY path +ORDER BY avg_code_age DESC +LIMIT 10 + +┌─path────────────────────────────────────────────────────────────┬──────avg_code_age─┠+│ utils/corrector_utf8/corrector_utf8.cpp │ 1353.888888888889 │ +│ tests/queries/0_stateless/01288_shard_max_network_bandwidth.sql │ 881 │ +│ src/Functions/replaceRegexpOne.cpp │ 861 │ +│ src/Functions/replaceRegexpAll.cpp │ 861 │ +│ src/Functions/replaceOne.cpp │ 861 │ +│ utils/zookeeper-remove-by-list/main.cpp │ 838.25 │ +│ tests/queries/0_stateless/01356_state_resample.sql │ 819 │ +│ tests/queries/0_stateless/01293_create_role.sql │ 819 │ +│ src/Functions/ReplaceStringImpl.h │ 810 │ +│ src/Interpreters/createBlockSelector.cpp │ 795 │ +└─────────────────────────────────────────────────────────────────┴───────────────────┘ + +10 rows in set. Elapsed: 3.134 sec. Processed 16.13 million rows, 1.83 GB (5.15 million rows/s., 582.99 MB/s.) +``` + +## 誰ãŒã‚ˆã‚Šå¤šãã®ãƒ†ã‚¹ãƒˆ/CPPコード/コメントを書ã傾å‘ãŒã‚ã‚‹ã®ã‹ï¼Ÿ + +ã“ã®è³ªå•ã«ã‚¢ãƒ—ローãƒã™ã‚‹æ–¹æ³•ã¯ã„ãã¤ã‹ã‚ã‚Šã¾ã™ã€‚テスト対コードã®æ¯”率ã«ç„¦ç‚¹ã‚’当ã¦ã€ã“ã®ã‚¯ã‚¨ãƒªã¯æ¯”較的簡å˜ã§ã™ - `tests`ã‚’å«ã‚€ãƒ•ã‚©ãƒ«ãƒ€ã¸ã®å¯„与をカウントã—ã€ç·å¯„与ã«å¯¾ã™ã‚‹æ¯”率を計算ã—ã¾ã™ã€‚ + +ãŸã ã—ã€20回以上ã®å¤‰æ›´ã‚’è¡Œã£ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«åˆ¶é™ã—ã¦ã€å®šæœŸçš„ãªã‚³ãƒŸãƒƒã‚¿ãƒ¼ã«ç„¦ç‚¹ã‚’当ã¦ã€ä¸€å›žé™ã‚Šã®å¯„与ã¸ã®ãƒã‚¤ã‚¢ã‚¹ã‚’é¿ã‘ã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=JGKZSEQDPDTDKZXD3ZCGLE) + +```sql +SELECT + author, + countIf((file_extension IN ('h', 'cpp', 'sql', 'sh', 'py', 'expect')) AND (path LIKE '%tests%')) AS test, + countIf((file_extension IN ('h', 'cpp', 'sql')) AND (NOT (path LIKE '%tests%'))) AS code, + code / (code + test) AS ratio_code +FROM git.file_changes +GROUP BY author +HAVING code > 20 +ORDER BY code DESC +LIMIT 20 + +┌─author───────────────┬─test─┬──code─┬─────────ratio_code─┠+│ Alexey Milovidov │ 6617 │ 41799 │ 0.8633303040317251 │ +│ Nikolai Kochetov │ 916 │ 13361 │ 0.9358408629263851 │ +│ alesapin │ 2408 │ 8796 │ 0.785076758300607 │ +│ kssenii │ 869 │ 6769 │ 0.8862267609321812 │ +│ Maksim Kita │ 799 │ 5862 │ 0.8800480408347096 │ +│ Alexander Tokmakov │ 1472 │ 5727 │ 0.7955271565495208 │ +│ Vitaly Baranov │ 1764 │ 5521 │ 0.7578586135895676 │ +│ Ivan Lezhankin │ 843 │ 4698 │ 0.8478613968597726 │ +│ Anton Popov │ 599 │ 4346 │ 0.8788675429726996 │ +│ Ivan │ 2630 │ 4269 │ 0.6187853312074214 │ +│ Azat Khuzhin │ 1664 │ 3697 │ 0.689610147360567 │ +│ Amos Bird │ 400 │ 2901 │ 0.8788245986064829 │ +│ proller │ 1207 │ 2377 │ 0.6632254464285714 │ +│ chertus │ 453 │ 2359 │ 0.8389046941678521 │ +│ alexey-milovidov │ 303 │ 2321 │ 0.8845274390243902 │ +│ Alexey Arno │ 169 │ 2310 │ 0.9318273497377975 │ +│ Vitaliy Lyudvichenko │ 334 │ 2283 │ 0.8723729461215132 │ +│ Robert Schulze │ 182 │ 2196 │ 0.9234650967199327 │ +│ CurtizJ │ 460 │ 2158 │ 0.8242933537051184 │ +│ Alexander Kuzmenkov │ 298 │ 2092 │ 0.8753138075313808 │ +└──────────────────────┴──────┴───────┴────────────────────┘ + +20 rows in set. Elapsed: 0.034 sec. Processed 266.05 thousand rows, 4.65 MB (7.93 million rows/s., 138.76 MB/s.) +``` + +ã“ã®åˆ†å¸ƒã‚’ヒストグラムã¨ã—ã¦ãƒ—ロットã§ãã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=S5AJIIRGSUAY1JXEVHQDAK) + +```sql +WITH ( + SELECT histogram(10)(ratio_code) AS hist + FROM + ( + SELECT + author, + countIf((file_extension IN ('h', 'cpp', 'sql', 'sh', 'py', 'expect')) AND (path LIKE '%tests%')) AS test, + countIf((file_extension IN ('h', 'cpp', 'sql')) AND (NOT (path LIKE '%tests%'))) AS code, + code / (code + test) AS ratio_code + FROM git.file_changes + GROUP BY author + HAVING code > 20 + ORDER BY code DESC + LIMIT 20 + ) + ) AS hist +SELECT + arrayJoin(hist).1 AS lower, + arrayJoin(hist).2 AS upper, + bar(arrayJoin(hist).3, 0, 100, 500) AS bar + +┌──────────────lower─┬──────────────upper─┬─bar───────────────────────────┠+│ 0.6187853312074214 │ 0.6410053888179964 │ █████ │ +│ 0.6410053888179964 │ 0.6764177968945693 │ █████ │ +│ 0.6764177968945693 │ 0.7237343804750673 │ █████ │ +│ 0.7237343804750673 │ 0.7740802855073157 │ █████▋ │ +│ 0.7740802855073157 │ 0.807297655565091 │ ████████▋ │ +│ 0.807297655565091 │ 0.8338381996094653 │ ██████▎ │ +│ 0.8338381996094653 │ 0.8533566747727687 │ ████████▋ │ +│ 0.8533566747727687 │ 0.871392376017531 │ █████████■│ +│ 0.871392376017531 │ 0.904916108899021 │ ████████████████████████████▋ │ +│ 0.904916108899021 │ 0.9358408629263851 │ █████████████████▌ │ +└────────────────────┴────────────────────┴───────────────────────────────┘ +10 rows in set. Elapsed: 0.051 sec. Processed 266.05 thousand rows, 4.65 MB (5.24 million rows/s., 91.64 MB/s.) +``` + +ã»ã¨ã‚“ã©ã®å¯„稿者ã¯ã€äºˆæƒ³é€šã‚Šã€ãƒ†ã‚¹ãƒˆã‚ˆã‚Šã‚‚コードを多ã書ãã¾ã™ã€‚ + +コードを寄稿ã™ã‚‹éš›ã«ã€èª°ãŒæœ€ã‚‚多ãã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’追加ã™ã‚‹ã®ã§ã—ょã†ã‹ï¼Ÿ + +[プレイ](https://sql.clickhouse.com?query_id=EXPHDIURBTOXXOK1TGNNYD) + +```sql +SELECT + author, + avg(ratio_comments) AS avg_ratio_comments, + sum(code) AS code +FROM +( + SELECT + author, + commit_hash, + countIf(line_type = 'Comment') AS comments, + countIf(line_type = 'Code') AS code, + if(comments > 0, comments / (comments + code), 0) AS ratio_comments + FROM git.line_changes + GROUP BY + author, + commit_hash +) +GROUP BY author +ORDER BY code DESC +LIMIT 10 +┌─author─────────────┬──avg_ratio_comments─┬────code─┠+│ Alexey Milovidov │ 0.1034915408309902 │ 1147196 │ +│ s-kat │ 0.1361718900215362 │ 614224 │ +│ Nikolai Kochetov │ 0.08722993407690126 │ 218328 │ +│ alesapin │ 0.1040477684726504 │ 198082 │ +│ Vitaly Baranov │ 0.06446875712939285 │ 161801 │ +│ Maksim Kita │ 0.06863376297549255 │ 156381 │ +│ Alexey Arno │ 0.11252677608033655 │ 146642 │ +│ Vitaliy Zakaznikov │ 0.06199215397180561 │ 138530 │ +│ kssenii │ 0.07455322590796751 │ 131143 │ +│ Artur │ 0.12383737231074826 │ 121484 │ +└────────────────────┴─────────────────────┴─────────┘ +10 rows in set. Elapsed: 0.290 sec. Processed 7.54 million rows, 394.57 MB (26.00 million rows/s., 1.36 GB/s.) +``` + +コードã®å¯„与ã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆã—ã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã™ã¹ã¦ã®å¤§ããªå¯„稿者ã«å¯¾ã—ã¦é©šãã»ã©é«˜ã„%ã§ã‚ã‚Šã€ã“ã‚ŒãŒã‚³ãƒ¼ãƒ‰ã‚’éžå¸¸ã«èª­ã¿ã‚„ã™ãã™ã‚‹ä¸€å› ã§ã™ã€‚ + +## 著者ã®ã‚³ãƒŸãƒƒãƒˆãŒæ™‚間経éŽã¨ã¨ã‚‚ã«ã‚³ãƒ¼ãƒ‰/コメントã®å‰²åˆã«é–¢ã—ã¦ã©ã®ã‚ˆã†ã«å¤‰åŒ–ã™ã‚‹ã®ã‹ï¼Ÿ + +著者ã”ã¨ã®è¨ˆç®—ã¯ç°¡å˜ã§ã™ã€‚ + +[プレイ](#U0VMRUNUCiAgICBhdXRob3IsCiAgICBjb3VudElmKGxpbmVfdHlwZSA9ICdDb2RlJykgQVMgY29kZV9saW5lcywKICAgIGNvdW50SWYoKGxpbmVfdHlwZSA9ICdDb21tZW50JykgT1IgKGxpbmVfdHlwZSA9ICdQdW5jdCcpKSBBUyBjb21tZW50cywKICAgIGNvZGVfbGluZXMgLyAoY29tbWVudHMgKyBjb2RlX2xpbmVzKSBBUyByYXRpb19jb2RlLAogICAgdG9TdGFydE9mV2Vlayh0aW1lKSBBUyB3ZWVrCkZST00gZ2l0X2NsaWNraG91c2UubGluZV9jaGFuZ2VzCkdST1VQIEJZCiAgICB0aW1lLAogICAgYXV0aG9yCk9SREVSIEJZCiAgICBhdXRob3IgQVNDLAogICAgdGltZSBBU0MKTElNSVQgMTA=) + +```sql +SELECT + author, + countIf(line_type = 'Code') AS code_lines, + countIf((line_type = 'Comment') OR (line_type = 'Punct')) AS comments, + code_lines / (comments + code_lines) AS ratio_code, + toStartOfWeek(time) AS week +FROM git.line_changes +GROUP BY + time, + author +ORDER BY + author ASC, + time ASC +LIMIT 10 + +┌─author──────────────────────┬─code_lines─┬─comments─┬─────────ratio_code─┬───────week─┠+│ 1lann │ 8 │ 0 │ 1 │ 2022-03-06 │ +│ 20018712 │ 2 │ 0 │ 1 │ 2020-09-13 │ +│ 243f6a8885a308d313198a2e037 │ 0 │ 2 │ 0 │ 2020-12-06 │ +│ 243f6a8885a308d313198a2e037 │ 0 │ 112 │ 0 │ 2020-12-06 │ +│ 243f6a8885a308d313198a2e037 │ 0 │ 14 │ 0 │ 2020-12-06 │ +│ 3ldar-nasyrov │ 2 │ 0 │ 1 │ 2021-03-14 │ +│ 821008736@qq.com │ 27 │ 2 │ 0.9310344827586207 │ 2019-04-21 │ +│ ANDREI STAROVEROV │ 182 │ 60 │ 0.7520661157024794 │ 2021-05-09 │ +│ ANDREI STAROVEROV │ 7 │ 0 │ 1 │ 2021-05-09 │ +│ ANDREI STAROVEROV │ 32 │ 12 │ 0.7272727272727273 │ 2021-05-09 │ +└─────────────────────────────┴────────────┴──────────┴────────────────────┴────────────┘ + +10 rows in set. Elapsed: 0.145 sec. Processed 7.54 million rows, 51.09 MB (51.83 million rows/s., 351.44 MB/s.) +``` + +ç†æƒ³çš„ã«ã¯ã€ã™ã¹ã¦ã®è‘—者ã®æœ€åˆã®ã‚³ãƒŸãƒƒãƒˆã‹ã‚‰ã®é›†ç´„ã§ã“ã®å¤‰åŒ–を見ãŸã„ã¨æ€ã„ã¾ã™ã€‚著者ã¯å¾ã€…ã«æ›¸ãコメントã®æ•°ã‚’減らã—ã¦ã„ã‚‹ã®ã§ã—ょã†ã‹ï¼Ÿ + +ã“れを計算ã™ã‚‹ãŸã‚ã«ã€ã¾ãšå„著者ã®æ™‚é–“ã«ä¼´ã†ã‚³ãƒ¡ãƒ³ãƒˆæ¯”率を計算ã—ã¾ã™ - [誰ãŒã‚ˆã‚Šå¤šãã®ãƒ†ã‚¹ãƒˆ/ CPP コード/ コメントを書ããŒã¡ã‹ï¼Ÿ](#who-tends-to-write-more-tests--cpp-code--comments)ã¨åŒæ§˜ã§ã™ã€‚ã“ã‚Œã¯å„著者ã®é–‹å§‹æ—¥ã¨çµåˆã•ã‚Œã€ã‚³ãƒ¡ãƒ³ãƒˆæ¯”率を週オフセットã§è¨ˆç®—ã§ãã¾ã™ã€‚ + +ã™ã¹ã¦ã®è‘—者ã®å¹³å‡ã‚’計算ã—ãŸå¾Œã€æ¯Ž10週目をé¸æŠžã—ã¦ã“れらã®çµæžœã‚’サンプリングã—ã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=SBHEWR8XC4PRHY13HPPKCN) + +```sql +WITH author_ratios_by_offset AS + ( + SELECT + author, + dateDiff('week', start_dates.start_date, contributions.week) AS week_offset, + ratio_code + FROM + ( + SELECT + author, + toStartOfWeek(min(time)) AS start_date + FROM git.line_changes + WHERE file_extension IN ('h', 'cpp', 'sql') + GROUP BY author AS start_dates + ) AS start_dates + INNER JOIN + ( + SELECT + author, + countIf(line_type = 'Code') AS code, + countIf((line_type = 'Comment') OR (line_type = 'Punct')) AS comments, + comments / (comments + code) AS ratio_code, + toStartOfWeek(time) AS week + FROM git.line_changes + WHERE (file_extension IN ('h', 'cpp', 'sql')) AND (sign = 1) + GROUP BY + time, + author + HAVING code > 20 + ORDER BY + author ASC, + time ASC + ) AS contributions USING (author) + ) +SELECT + week_offset, + avg(ratio_code) AS avg_code_ratio +FROM author_ratios_by_offset +GROUP BY week_offset +HAVING (week_offset % 10) = 0 +ORDER BY week_offset ASC +LIMIT 20 + +┌─week_offset─┬──────avg_code_ratio─┠+│ 0 │ 0.21626798253005078 │ +│ 10 │ 0.18299433892099454 │ +│ 20 │ 0.22847255749045017 │ +│ 30 │ 0.2037816688365288 │ +│ 40 │ 0.1987063517030308 │ +│ 50 │ 0.17341406302829748 │ +│ 60 │ 0.1808884776496144 │ +│ 70 │ 0.18711773536450496 │ +│ 80 │ 0.18905573684766458 │ +│ 90 │ 0.2505147771581594 │ +│ 100 │ 0.2427673990917429 │ +│ 110 │ 0.19088569009169926 │ +│ 120 │ 0.14218574654598348 │ +│ 130 │ 0.20894252550489317 │ +│ 140 │ 0.22316626978848397 │ +│ 150 │ 0.1859507592277053 │ +│ 160 │ 0.22007759757363546 │ +│ 170 │ 0.20406936638195144 │ +│ 180 │ 0.1412102467834332 │ +│ 190 │ 0.20677550885049117 │ +└─────────────┴─────────────────────┘ + +20 rows in set. Elapsed: 0.167 sec. Processed 15.07 million rows, 101.74 MB (90.51 million rows/s., 610.98 MB/s.) +``` + +励ã¿ã«ãªã‚‹ã“ã¨ã«ã€æˆ‘々ã®ã‚³ãƒ¡ãƒ³ãƒˆ % ã¯ã‹ãªã‚Šå®‰å®šã—ã¦ã„ã¦ã€è‘—者ãŒå¯„与ã™ã‚‹æœŸé–“ãŒé•·ããªã‚‹ã»ã©åŠ£åŒ–ã—ã¾ã›ã‚“。 + +## コードãŒæ›¸ãæ›ãˆã‚‰ã‚Œã‚‹ã¾ã§ã®å¹³å‡æ™‚é–“ã¨ä¸­å¤®å€¤ï¼ˆã‚³ãƒ¼ãƒ‰ã® decay ã®åŠæ¸›æœŸï¼‰ã¯ï¼Ÿ + +ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’考慮ã—ã¦æ›¸ãæ›ãˆã‚’特定ã™ã‚‹ãŸã‚ã«ã€[最も多ãå†æ›¸ãæ›ãˆã‚‰ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚„作者をリストã™ã‚‹](#list-files-that-were-rewritten-most-number-of-time-or-by-most-of-authors)ã¨åŒã˜åŽŸå‰‡ã‚’用ã„ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ウィンドウ関数を使用ã—ã¦ã€å„ファイルã®æ›¸ãæ›ãˆé–“éš”ã®æ™‚間を計算ã—ã¾ã™ã€‚ã“ã‚Œã‹ã‚‰ã€ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚ãŸã£ã¦å¹³å‡ã¨ä¸­å¤®å€¤ã‚’計算ã§ãã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=WSHUEPJP9TNJUH7QITWWOR) + +```sql +WITH + changes AS + ( + SELECT + path, + commit_hash, + max_time, + type, + num_added, + num_deleted, + sum(num_added - num_deleted) OVER (PARTITION BY path ORDER BY max_time ASC) AS current_size, + if(current_size > 0, num_added / current_size, 0) AS percent_add, + if(current_size > 0, num_deleted / current_size, 0) AS percent_delete + FROM + ( + SELECT + path, + max(time) AS max_time, + commit_hash, + any(lines_added) AS num_added, + any(lines_deleted) AS num_deleted, + any(change_type) AS type + FROM git.file_changes + WHERE (change_type IN ('Add', 'Modify')) AND (file_extension IN ('h', 'cpp', 'sql')) + GROUP BY + path, + commit_hash + ORDER BY + path ASC, + max_time ASC + ) + ), + rewrites AS + ( + SELECT + *, + any(max_time) OVER (PARTITION BY path ORDER BY max_time ASC ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS previous_rewrite, + dateDiff('day', previous_rewrite, max_time) AS rewrite_days + FROM changes + WHERE (type = 'Modify') AND (percent_add >= 0.5) AND (percent_delete >= 0.5) AND (current_size > 50) + ) +SELECT + avgIf(rewrite_days, rewrite_days > 0) AS avg_rewrite_time, + quantilesTimingIf(0.5)(rewrite_days, rewrite_days > 0) AS half_life +FROM rewrites + +┌─avg_rewrite_time─┬─half_life─┠+│ 122.2890625 │ [23] │ +└──────────────────┴───────────┘ + +1 row in set. Elapsed: 0.388 sec. Processed 266.05 thousand rows, 22.85 MB (685.82 thousand rows/s., 58.89 MB/s.) +``` + +## ã©ã®ã‚ˆã†ãªæ™‚ãŒã‚³ãƒ¼ãƒ‰ãŒæ›¸ãæ›ãˆã‚‰ã‚Œã‚‹å¯èƒ½æ€§ãŒæœ€ã‚‚高ã„ã®ã‹ï¼Ÿ + +[コードãŒæ›¸ãæ›ãˆã‚‰ã‚Œã‚‹ã¾ã§ã®å¹³å‡æ™‚é–“ã¨ä¸­å¤®å€¤ï¼ˆã‚³ãƒ¼ãƒ‰ã® decay ã®åŠæ¸›æœŸï¼‰](#what-is-the-average-time-before-code-will-be-rewritten-and-the-median-half-life-of-code-decay)ã¨[最も多ãå†æ›¸ãæ›ãˆã‚‰ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚„作者をリストã™ã‚‹](#list-files-that-were-rewritten-most-number-of-time-or-by-most-of-authors)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€ã“ã¡ã‚‰ã¯æ›œæ—¥ã«ã‚ˆã£ã¦é›†è¨ˆã—ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦æœˆã”ã¨ãªã©ã«èª¿æ•´ã§ãã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=8PQNWEWHAJTGN6FTX59KH2) + +```sql +WITH + changes AS + ( + SELECT + path, + commit_hash, + max_time, + type, + num_added, + num_deleted, + sum(num_added - num_deleted) OVER (PARTITION BY path ORDER BY max_time ASC) AS current_size, + if(current_size > 0, num_added / current_size, 0) AS percent_add, + if(current_size > 0, num_deleted / current_size, 0) AS percent_delete + FROM + ( + SELECT + path, + max(time) AS max_time, + commit_hash, + any(file_lines_added) AS num_added, + any(file_lines_deleted) AS num_deleted, + any(file_change_type) AS type + FROM git.line_changes + WHERE (file_change_type IN ('Add', 'Modify')) AND (file_extension IN ('h', 'cpp', 'sql')) + GROUP BY + path, + commit_hash + ORDER BY + path ASC, + max_time ASC + ) + ), + rewrites AS + ( + SELECT any(max_time) OVER (PARTITION BY path ORDER BY max_time ASC ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS previous_rewrite + FROM changes + WHERE (type = 'Modify') AND (percent_add >= 0.5) AND (percent_delete >= 0.5) AND (current_size > 50) + ) +SELECT + dayOfWeek(previous_rewrite) AS dayOfWeek, + count() AS num_re_writes +FROM rewrites +GROUP BY dayOfWeek + +┌─dayOfWeek─┬─num_re_writes─┠+│ 1 │ 111 │ +│ 2 │ 121 │ +│ 3 │ 91 │ +│ 4 │ 111 │ +│ 5 │ 90 │ +│ 6 │ 64 │ +│ 7 │ 46 │ +└───────────┴───────────────┘ + +7 rows in set. Elapsed: 0.466 sec. Processed 7.54 million rows, 701.52 MB (16.15 million rows/s., 1.50 GB/s.) +``` + +## ã©ã®è‘—者ã®ã‚³ãƒ¼ãƒ‰ãŒæœ€ã‚‚安定ã—ã¦ã„ã‚‹ã‹ï¼Ÿ + +「安定ã—ã¦ã„ã‚‹ã€ã¨ã¯ã€è‘—者ã®ã‚³ãƒ¼ãƒ‰ãŒæ›¸ãæ›ãˆã‚‰ã‚Œã‚‹ã¾ã§ã®æ™‚間を定義ã—ã¾ã™ã€‚以å‰ã®è³ªå•[コードãŒæ›¸ãæ›ãˆã‚‰ã‚Œã‚‹ã¾ã§ã®å¹³å‡æ™‚é–“ã¨ä¸­å¤®å€¤ï¼ˆã‚³ãƒ¼ãƒ‰ã® decay ã®åŠæ¸›æœŸï¼‰](#what-is-the-average-time-before-code-will-be-rewritten-and-the-median-half-life-of-code-decay)ã¨åŒã˜æŒ‡æ¨™ã‚’使用ã—ãŸé‡ã¿ã‚’付ã‘ã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ã®è¿½åŠ ãŠã‚ˆã³å‰Šé™¤ã®æ¯”率ãŒ50%ã§ã‚ã‚‹ã“ã¨ã§ã™ã€‚å„著者ã”ã¨ã®å¹³å‡æ›¸ãæ›ãˆæ™‚間を計算ã—ã€2ファイル以上ã®å¯„稿者ã®ã¿ã‚’考慮ã—ã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=BKHLVVWN5SET1VTIFQ8JVK) + +```sql +WITH + changes AS + ( + SELECT + path, + author, + commit_hash, + max_time, + type, + num_added, + num_deleted, + sum(num_added - num_deleted) OVER (PARTITION BY path ORDER BY max_time ASC) AS current_size, + if(current_size > 0, num_added / current_size, 0) AS percent_add, + if(current_size > 0, num_deleted / current_size, 0) AS percent_delete + FROM + ( + SELECT + path, + any(author) AS author, + max(time) AS max_time, + commit_hash, + any(file_lines_added) AS num_added, + any(file_lines_deleted) AS num_deleted, + any(file_change_type) AS type + FROM git.line_changes + WHERE (file_change_type IN ('Add', 'Modify')) AND (file_extension IN ('h', 'cpp', 'sql')) + GROUP BY + path, + commit_hash + ORDER BY + path ASC, + max_time ASC + ) + ), + rewrites AS + ( + SELECT + *, + any(max_time) OVER (PARTITION BY path ORDER BY max_time ASC ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS previous_rewrite, + dateDiff('day', previous_rewrite, max_time) AS rewrite_days, + any(author) OVER (PARTITION BY path ORDER BY max_time ASC ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS prev_author + FROM changes + WHERE (type = 'Modify') AND (percent_add >= 0.5) AND (percent_delete >= 0.5) AND (current_size > 50) + ) +SELECT + prev_author, + avg(rewrite_days) AS c, + uniq(path) AS num_files +FROM rewrites +GROUP BY prev_author +HAVING num_files > 2 +ORDER BY c DESC +LIMIT 10 + +┌─prev_author─────────┬──────────────────c─┬─num_files─┠+│ Michael Kolupaev │ 304.6 │ 4 │ +│ alexey-milovidov │ 81.83333333333333 │ 4 │ +│ Alexander Kuzmenkov │ 64.5 │ 5 │ +│ Pavel Kruglov │ 55.8 │ 6 │ +│ Alexey Milovidov │ 48.416666666666664 │ 90 │ +│ Amos Bird │ 42.8 │ 4 │ +│ alesapin │ 38.083333333333336 │ 12 │ +│ Nikolai Kochetov │ 33.18421052631579 │ 26 │ +│ Alexander Tokmakov │ 31.866666666666667 │ 12 │ +│ Alexey Zatelepin │ 22.5 │ 4 │ +└─────────────────────┴────────────────────┴───────────┘ + +10 rows in set. Elapsed: 0.555 sec. Processed 7.54 million rows, 720.60 MB (13.58 million rows/s., 1.30 GB/s.) +``` + +## ã‚る著者ã«ã‚ˆã‚‹æœ€ã‚‚連続ã—ãŸã‚³ãƒŸãƒƒãƒˆã®æ—¥æ•° + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€ã¾ãšè‘—者ãŒã‚³ãƒŸãƒƒãƒˆã—ãŸæ—¥ã‚’計算ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ウィンドウ関数を使用ã—ã¦è‘—者ã”ã¨ã«åˆ†å‰²ã—ã€ã‚³ãƒŸãƒƒãƒˆé–“ã®æ—¥æ•°ã‚’計算ã§ãã¾ã™ã€‚å„コミットã«ã¤ã„ã¦ã€å‰å›žã®ã‚³ãƒŸãƒƒãƒˆã‹ã‚‰ã®æ™‚é–“ãŒ1æ—¥ã§ã‚ã‚Œã°ãれを連続(1)ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã—ã€ãã†ã§ãªã„å ´åˆã¯0ã¨ã—㦠`consecutive_day` ã«çµæžœã‚’ä¿å­˜ã—ã¾ã™ã€‚ + +ãã®å¾Œã€é…列関数を使ã£ã¦å„著者ã®æœ€é•·ã®é€£ç¶š1ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’計算ã—ã¾ã™ã€‚ã¾ãšã€`groupArray` 関数を使ã£ã¦è‘—者ã”ã¨ã®ã™ã¹ã¦ã® `consecutive_day` 値をã¾ã¨ã‚ã¾ã™ã€‚ã“ã®1ã¨0ã®é…列ã¯ã€0ã®å€¤ã§åˆ†å‰²ã•ã‚Œã€ã‚µãƒ–é…列ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚最後ã«ã€æœ€ã‚‚é•·ã„サブé…列を計算ã—ã¾ã™ã€‚ + +[プレイ](https://sql.clickhouse.com?query_id=S3E64UYCAMDAYJRSXINVFR) + +```sql +WITH commit_days AS + ( + SELECT + author, + day, + any(day) OVER (PARTITION BY author ORDER BY day ASC ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS previous_commit, + dateDiff('day', previous_commit, day) AS days_since_last, + if(days_since_last = 1, 1, 0) AS consecutive_day + FROM + ( + SELECT + author, + toStartOfDay(time) AS day + FROM git.commits + GROUP BY + author, + day + ORDER BY + author ASC, + day ASC + ) + ) +SELECT + author, + arrayMax(arrayMap(x -> length(x), arraySplit(x -> (x = 0), groupArray(consecutive_day)))) - 1 AS max_consecutive_days +FROM commit_days +GROUP BY author +ORDER BY max_consecutive_days DESC +LIMIT 10 + +┌─author───────────┬─max_consecutive_days─┠+│ kssenii │ 32 │ +│ Alexey Milovidov │ 30 │ +│ alesapin │ 26 │ +│ Azat Khuzhin │ 23 │ +│ Nikolai Kochetov │ 15 │ +│ feng lv │ 11 │ +│ alexey-milovidov │ 11 │ +│ Igor Nikonov │ 11 │ +│ Maksim Kita │ 11 │ +│ Nikita Vasilev │ 11 │ +└──────────────────┴──────────────────────┘ + +10 rows in set. Elapsed: 0.025 sec. Processed 62.78 thousand rows, 395.47 KB (2.54 million rows/s., 16.02 MB/s.) +``` + +## ファイルã®è¡Œã”ã¨ã®ã‚³ãƒŸãƒƒãƒˆå±¥æ­´ + +ファイルã¯åå‰ãŒå¤‰æ›´ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€`path` カラムã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æ–°ã—ã„パスã«è¨­å®šã•ã‚Œã€`old_path` ã¯å‰ã®å ´æ‰€ã‚’示ã—ã¾ã™ã€‚例ãˆã°ï¼š + +[プレイ](https://sql.clickhouse.com?query_id=AKTW3Z8JZAPQ4H9BH2ZFRX) + +```sql +SELECT + time, + path, + old_path, + commit_hash, + commit_message +FROM git.file_changes +WHERE (path = 'src/Storages/StorageReplicatedMergeTree.cpp') AND (change_type = 'Rename') + +┌────────────────time─┬─path────────────────────────────────────────┬─old_path─────────────────────────────────────┬─commit_hash──────────────────────────────┬─commit_message─┠+│ 2020-04-03 16:14:31 │ src/Storages/StorageReplicatedMergeTree.cpp │ dbms/Storages/StorageReplicatedMergeTree.cpp │ 06446b4f08a142d6f1bc30664c47ded88ab51782 │ dbms/ → src/ │ +└─────────────────────┴─────────────────────────────────────────────┴──────────────────────────────────────────────┴──────────────────────────────────────────┴────────────────┘ + +1 row in set. Elapsed: 0.135 sec. Processed 266.05 thousand rows, 20.73 MB (1.98 million rows/s., 154.04 MB/s.) +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ã®å®Œå…¨ãªå±¥æ­´ã‚’表示ã™ã‚‹ã®ã¯é›£ã—ã„ã§ã™ã€‚ã™ã¹ã¦ã®è¡Œã¾ãŸã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®å¤‰æ›´ã‚’接続ã™ã‚‹å˜ä¸€ã®å€¤ãŒå­˜åœ¨ã—ãªã„ã‹ã‚‰ã§ã™ã€‚ + +ã“ã‚Œã«å¯¾å‡¦ã™ã‚‹ãŸã‚ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°ï¼ˆUDF)を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã¯ç¾åœ¨å†å¸°çš„ã§ã¯ãªã„ãŸã‚ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®å±¥æ­´ã‚’特定ã™ã‚‹ãŸã‚ã«ã¯ã€äº’ã„ã«æ˜Žç¤ºçš„ã«å‘¼ã³å‡ºã™ä¸€é€£ã® UDF を定義ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“ã‚Œã«ã‚ˆã‚Šã€åå‰å¤‰æ›´ã‚’最大深度ã¾ã§è¿½è·¡ã§ãるよã†ã«ãªã‚Šã¾ã™ - 次ã®ä¾‹ã¯5æ·±ã§ã™ã€‚ファイルãŒã“ã®å›žæ•°ä»¥ä¸Šã«åå‰ãŒå¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ã¯ä½Žã„ãŸã‚ã€ç¾æ®µéšŽã§ã¯ã“ã‚Œã§å分ã§ã™ã€‚ + +```sql +CREATE FUNCTION file_path_history AS (n) -> if(empty(n), [], arrayConcat([n], file_path_history_01((SELECT if(empty(old_path), Null, old_path) FROM git.file_changes WHERE path = n AND (change_type = 'Rename' OR change_type = 'Add') LIMIT 1)))); +CREATE FUNCTION file_path_history_01 AS (n) -> if(isNull(n), [], arrayConcat([n], file_path_history_02((SELECT if(empty(old_path), Null, old_path) FROM git.file_changes WHERE path = n AND (change_type = 'Rename' OR change_type = 'Add') LIMIT 1)))); +CREATE FUNCTION file_path_history_02 AS (n) -> if(isNull(n), [], arrayConcat([n], file_path_history_03((SELECT if(empty(old_path), Null, old_path) FROM git.file_changes WHERE path = n AND (change_type = 'Rename' OR change_type = 'Add') LIMIT 1)))); +CREATE FUNCTION file_path_history_03 AS (n) -> if(isNull(n), [], arrayConcat([n], file_path_history_04((SELECT if(empty(old_path), Null, old_path) FROM git.file_changes WHERE path = n AND (change_type = 'Rename' OR change_type = 'Add') LIMIT 1)))); +CREATE FUNCTION file_path_history_04 AS (n) -> if(isNull(n), [], arrayConcat([n], file_path_history_05((SELECT if(empty(old_path), Null, old_path) FROM git.file_changes WHERE path = n AND (change_type = 'Rename' OR change_type = 'Add') LIMIT 1)))); +CREATE FUNCTION file_path_history_05 AS (n) -> if(isNull(n), [], [n]); +``` + +`file_path_history('src/Storages/StorageReplicatedMergeTree.cpp')`を呼ã³å‡ºã™ã“ã¨ã«ã‚ˆã£ã¦ã€åå‰å¤‰æ›´ã®å±¥æ­´ã‚’å†å¸°çš„ã«ãŸã©ã‚Šã¾ã™ã€‚å„関数㯠`old_path` ã§æ¬¡ã®ãƒ¬ãƒ™ãƒ«ã‚’呼ã³å‡ºã—ã¾ã™ã€‚çµæžœã¯ `arrayConcat` を使用ã—ã¦çµ„ã¿åˆã‚ã•ã‚Œã¾ã™ã€‚ + +例ãˆã°ã€ + +```sql +SELECT file_path_history('src/Storages/StorageReplicatedMergeTree.cpp') AS paths + +┌─paths─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ ['src/Storages/StorageReplicatedMergeTree.cpp','dbms/Storages/StorageReplicatedMergeTree.cpp','dbms/src/Storages/StorageReplicatedMergeTree.cpp'] │ +└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ + +1 row in set. Elapsed: 0.074 sec. Processed 344.06 thousand rows, 6.27 MB (4.65 million rows/s., 84.71 MB/s.) +``` + +ã“ã®æ©Ÿèƒ½ã‚’使用ã—ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®å®Œå…¨ãªå±¥æ­´ã®ãŸã‚ã®ã‚³ãƒŸãƒƒãƒˆã‚’組ã¿ç«‹ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€å„ `path` 値ã®ãŸã‚ã«1ã¤ã®ã‚³ãƒŸãƒƒãƒˆã‚’示ã—ã¾ã™ã€‚ + +```sql +SELECT + time, + substring(commit_hash, 1, 11) AS commit, + change_type, + author, + path, + commit_message +FROM git.file_changes +WHERE path IN file_path_history('src/Storages/StorageReplicatedMergeTree.cpp') +ORDER BY time DESC +LIMIT 1 BY path +FORMAT PrettyCompactMonoBlock + +┌────────────────time─┬─commit──────┬─change_type─┬─author─────────────┬─path─────────────────────────────────────────────┬─commit_message──────────────────────────────────────────────────────────────────┠+│ 2022-10-30 16:30:51 │ c68ab231f91 │ Modify │ Alexander Tokmakov │ src/Storages/StorageReplicatedMergeTree.cpp │ fix accessing part in Deleting state │ +│ 2020-04-03 15:21:24 │ 38a50f44d34 │ Modify │ alesapin │ dbms/Storages/StorageReplicatedMergeTree.cpp │ Remove empty line │ +│ 2020-04-01 19:21:27 │ 1d5a77c1132 │ Modify │ alesapin │ dbms/src/Storages/StorageReplicatedMergeTree.cpp │ Tried to add ability to rename primary key columns but just banned this ability │ +└─────────────────────┴─────────────┴─────────────┴────────────────────┴──────────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────┘ + +3 rows in set. Elapsed: 0.170 sec. Processed 611.53 thousand rows, 41.76 MB (3.60 million rows/s., 246.07 MB/s.) +``` + +# 未解決ã®è³ªå• + +## Git blame + +ã“ã‚Œã¯ã€çŠ¶æ…‹ã‚’é…列関数ã§ä¿æŒã§ããªã„ã“ã¨ã«èµ·å› ã—ã¦ç‰¹ã«å›°é›£ã§ã™ã€‚ã“ã‚Œã¯ã€å„å復ã§çŠ¶æ…‹ã‚’ä¿æŒã§ãã‚‹ `arrayFold` ã¾ãŸã¯ `arrayReduce` ã§å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +高レベルã®åˆ†æžã«å分ãªè¿‘似的ãªè§£æ±ºç­–ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“: + +```sql +SELECT + line_number_new, + argMax(author, time), + argMax(line, time) +FROM git.line_changes +WHERE path IN file_path_history('src/Storages/StorageReplicatedMergeTree.cpp') +GROUP BY line_number_new +ORDER BY line_number_new ASC +LIMIT 20 + +┌─line_number_new─┬─argMax(author, time)─┬─argMax(line, time)────────────────────────────────────────────┠+│ 1 │ Alexey Milovidov │ #include │ +│ 2 │ s-kat │ #include │ +│ 3 │ Anton Popov │ #include │ +│ 4 │ Alexander Burmak │ #include │ +│ 5 │ avogar │ #include │ +│ 6 │ Alexander Burmak │ #include │ +│ 7 │ Alexander Burmak │ #include │ +│ 8 │ Alexander Burmak │ #include │ +│ 9 │ Alexander Burmak │ #include │ +│ 10 │ Alexander Burmak │ #include │ +│ 11 │ Alexander Burmak │ #include │ +│ 12 │ Nikolai Kochetov │ #include │ +│ 13 │ alesapin │ #include │ +│ 14 │ alesapin │ │ +│ 15 │ Alexey Milovidov │ #include │ +│ 16 │ Alexey Zatelepin │ #include │ +│ 17 │ CurtizJ │ #include │ +│ 18 │ Kirill Shvakov │ #include │ +│ 19 │ s-kat │ #include │ +│ 20 │ Nikita Mikhaylov │ #include │ +└─────────────────┴──────────────────────┴───────────────────────────────────────────────────────────────┘ +20 rows in set. Elapsed: 0.547 sec. Processed 7.88 million rows, 679.20 MB (14.42 million rows/s., 1.24 GB/s.) +``` + +ã“ã“ã§ã®æ­£ç¢ºã§æ”¹å–„ã•ã‚ŒãŸè§£æ±ºç­–ã‚’æ­“è¿Žã—ã¾ã™ã€‚ + +## 関連コンテンツ + +- Blog: [Gitコミットã¨ç§ãŸã¡ã®ã‚³ãƒŸãƒ¥ãƒ‹ãƒ†ã‚£](https://clickhouse.com/blog/clickhouse-git-community-commits) +- Blog: [Gitコミットシーケンスã®ãŸã‚ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¨é…列関数](https://clickhouse.com/blog/clickhouse-window-array-functions-git-commits) +- Blog: [ClickHouseã¨Hexã§ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ åˆ†æžã‚¢ãƒ—リを構築ã™ã‚‹](https://clickhouse.com/blog/building-real-time-applications-with-clickhouse-and-hex-notebook-keeper-engine) +- Blog: [ClickHouse + Grafanaを使用ã—ãŸã‚ªãƒ¼ãƒ—ンソースGitHubアクティビティã®ç‰©èªž](https://clickhouse.com/blog/introduction-to-clickhouse-and-grafana-webinar) +``` diff --git a/docs/ja/getting-started/example-datasets/images/sensors_01.png b/docs/ja/getting-started/example-datasets/images/sensors_01.png new file mode 100644 index 00000000000..1804bda6d1b Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/sensors_01.png differ diff --git a/docs/ja/getting-started/example-datasets/images/sensors_02.png b/docs/ja/getting-started/example-datasets/images/sensors_02.png new file mode 100644 index 00000000000..8226f4578d0 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/sensors_02.png differ diff --git a/docs/ja/getting-started/example-datasets/images/stackoverflow.png b/docs/ja/getting-started/example-datasets/images/stackoverflow.png new file mode 100644 index 00000000000..f31acdc8cc3 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/stackoverflow.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-add-dataset.png b/docs/ja/getting-started/example-datasets/images/superset-add-dataset.png new file mode 100644 index 00000000000..aaa976d76ce Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-add-dataset.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-add.png b/docs/ja/getting-started/example-datasets/images/superset-add.png new file mode 100644 index 00000000000..54bbf11a014 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-add.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-authors-matrix.png b/docs/ja/getting-started/example-datasets/images/superset-authors-matrix.png new file mode 100644 index 00000000000..bdfc6b6f304 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-authors-matrix.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-authors-matrix_v2.png b/docs/ja/getting-started/example-datasets/images/superset-authors-matrix_v2.png new file mode 100644 index 00000000000..aad98b5b077 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-authors-matrix_v2.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-cell-tower-dashboard.png b/docs/ja/getting-started/example-datasets/images/superset-cell-tower-dashboard.png new file mode 100644 index 00000000000..8197ea223c2 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-cell-tower-dashboard.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-choose-a-database.png b/docs/ja/getting-started/example-datasets/images/superset-choose-a-database.png new file mode 100644 index 00000000000..40c71e0a053 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-choose-a-database.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-commits-authors.png b/docs/ja/getting-started/example-datasets/images/superset-commits-authors.png new file mode 100644 index 00000000000..7be831467cf Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-commits-authors.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-connect-a-database.png b/docs/ja/getting-started/example-datasets/images/superset-connect-a-database.png new file mode 100644 index 00000000000..f67d0663063 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-connect-a-database.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-create-map.png b/docs/ja/getting-started/example-datasets/images/superset-create-map.png new file mode 100644 index 00000000000..5ad4395eb13 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-create-map.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-github-lines-added-deleted.png b/docs/ja/getting-started/example-datasets/images/superset-github-lines-added-deleted.png new file mode 100644 index 00000000000..48dbad1934d Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-github-lines-added-deleted.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-lon-lat.png b/docs/ja/getting-started/example-datasets/images/superset-lon-lat.png new file mode 100644 index 00000000000..f07fb899e72 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-lon-lat.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-mcc-204.png b/docs/ja/getting-started/example-datasets/images/superset-mcc-204.png new file mode 100644 index 00000000000..a561c539b58 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-mcc-204.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-radio-umts.png b/docs/ja/getting-started/example-datasets/images/superset-radio-umts.png new file mode 100644 index 00000000000..b0b31b6dbc0 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-radio-umts.png differ diff --git a/docs/ja/getting-started/example-datasets/images/superset-umts-netherlands.png b/docs/ja/getting-started/example-datasets/images/superset-umts-netherlands.png new file mode 100644 index 00000000000..5cb887cb5c1 Binary files /dev/null and b/docs/ja/getting-started/example-datasets/images/superset-umts-netherlands.png differ diff --git a/docs/ja/getting-started/example-datasets/laion.md b/docs/ja/getting-started/example-datasets/laion.md new file mode 100644 index 00000000000..b11cf16fa25 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/laion.md @@ -0,0 +1,276 @@ +# Laion-400M データセット + +[Laion-400M データセット](https://laion.ai/blog/laion-400-open-dataset/) ã¯ã€400百万枚ã®ç”»åƒã¨è‹±èªžã®ç”»åƒã‚­ãƒ£ãƒ—ションをå«ã‚“ã§ã„ã¾ã™ã€‚Laion ã¯ç¾åœ¨ã€[ã•ã‚‰ã«å¤§ããªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ](https://laion.ai/blog/laion-5b/) ã‚’æä¾›ã—ã¦ã„ã¾ã™ãŒã€ãã®æ“作ã¯åŒæ§˜ã§ã™ã€‚ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€ç”»åƒã®URLã€ç”»åƒã¨ãã®ã‚­ãƒ£ãƒ—ションã®åŸ‹ã‚è¾¼ã¿ã€ç”»åƒã¨ã‚­ãƒ£ãƒ—ション間ã®é¡žä¼¼åº¦ã‚¹ã‚³ã‚¢ã€ãŠã‚ˆã³ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ï¼ˆä¾‹ãˆã°ã€ç”»åƒã®å¹…/高ã•ã€ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã€NSFWフラグ)ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ClickHouse ã§[近似最近å‚探索](../../engines/table-engines/mergetree-family/annindexes.md)を実演ã™ã‚‹ãŸã‚ã«ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## データã®æº–å‚™ + +埋ã‚è¾¼ã¿ã¨ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯ç”Ÿãƒ‡ãƒ¼ã‚¿ã®åˆ¥ã€…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚データ準備ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’ダウンロードã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‚’マージã—ã€ãれらを CSV ã«å¤‰æ›ã—㦠ClickHouse ã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ã¾ã™ã€‚以下㮠`download.sh` スクリプトを使用ã§ãã¾ã™: + +```bash +number=${1} +if [[ $number == '' ]]; then + number=1 +fi; +wget --tries=100 https://deploy.laion.ai/8f83b608504d46bb81708ec86e912220/embeddings/img_emb/img_emb_${number}.npy # ç”»åƒåŸ‹ã‚è¾¼ã¿ã‚’ダウンロード +wget --tries=100 https://deploy.laion.ai/8f83b608504d46bb81708ec86e912220/embeddings/text_emb/text_emb_${number}.npy # テキスト埋ã‚è¾¼ã¿ã‚’ダウンロード +wget --tries=100 https://deploy.laion.ai/8f83b608504d46bb81708ec86e912220/embeddings/metadata/metadata_${number}.parquet # メタデータをダウンロード +python3 process.py $number # ファイルをマージã—ã€CSV ã«å¤‰æ› +``` + +`process.py` ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«å®šç¾©ã•ã‚Œã¾ã™: + +```python +import pandas as pd +import numpy as np +import os +import sys + +str_i = str(sys.argv[1]) +npy_file = "img_emb_" + str_i + '.npy' +metadata_file = "metadata_" + str_i + '.parquet' +text_npy = "text_emb_" + str_i + '.npy' + +# ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿è¾¼ã‚€ +im_emb = np.load(npy_file) +text_emb = np.load(text_npy) +data = pd.read_parquet(metadata_file) + +# ファイルをçµåˆ +data = pd.concat([data, pd.DataFrame({"image_embedding" : [*im_emb]}), pd.DataFrame({"text_embedding" : [*text_emb]})], axis=1, copy=False) + +# ClickHouse ã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹ã‚«ãƒ©ãƒ  +data = data[['url', 'caption', 'NSFW', 'similarity', "image_embedding", "text_embedding"]] + +# np.array をリストã«å¤‰æ› +data['image_embedding'] = data['image_embedding'].apply(lambda x: list(x)) +data['text_embedding'] = data['text_embedding'].apply(lambda x: list(x)) + +# キャプションã«æ§˜ã€…ãªå¼•ç”¨ç¬¦ãŒå«ã¾ã‚Œã‚‹ãŸã‚ã®å°ã•ãªãƒãƒƒã‚¯ +data['caption'] = data['caption'].apply(lambda x: x.replace("'", " ").replace('"', " ")) + +# データを CSV ファイルã¨ã—ã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ +data.to_csv(str_i + '.csv', header=False) + +# 生データファイルを削除 +os.system(f"rm {npy_file} {metadata_file} {text_npy}") +``` + +データ準備パイプラインを開始ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã‚’実行ã—ã¾ã™: + +```bash +seq 0 409 | xargs -P1 -I{} bash -c './download.sh {}' +``` + +データセットã¯410個ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ†å‰²ã•ã‚Œã¦ãŠã‚Šã€å„ファイルã«ã¯ç´„100万行ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚データã®å°ã•ãªã‚µãƒ–セットã§ä½œæ¥­ã—ãŸã„å ´åˆã¯ã€ä¾‹ãˆã° `seq 0 9 | ...` ã¨ã—ã¦åˆ¶é™ã‚’調整ã—ã¦ãã ã•ã„。 + +(上記ã®Pythonスクリプトã¯éžå¸¸ã«é…ã(ファイルã‚ãŸã‚Šç´„2-10分)ã€å¤§é‡ã®ãƒ¡ãƒ¢ãƒªï¼ˆãƒ•ã‚¡ã‚¤ãƒ«ã‚ãŸã‚Š41 GB)を消費ã—ã€ç”Ÿæˆã•ã‚Œã‚‹csvファイルも大ãã„(å„10GB)ãŸã‚注æ„ãŒå¿…è¦ã§ã™ã€‚å分ãªRAMãŒã‚ã‚‹å ´åˆã¯ã€ã‚ˆã‚Šå¤šãã®ä¸¦åˆ—処ç†ã‚’実行ã™ã‚‹ãŸã‚ã« `-P1` ã®æ•°ã‚’増やã—ã¦ãã ã•ã„。ãã‚Œã§ã‚‚é…ã™ãŽã‚‹å ´åˆã¯ã€ã‚ˆã‚Šè‰¯ã„インジェスション手順ã€ä¾‹ãˆã° .npy ファイルを parquet ã«å¤‰æ›ã—ã¦ã‹ã‚‰ ClickHouse ã§å‡¦ç†ã™ã‚‹æ–¹æ³•ã‚’検討ã—ã¦ãã ã•ã„。) + +## テーブルã®ä½œæˆ + +インデックスãªã—ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã«ã¯ã€æ¬¡ã‚’実行ã—ã¾ã™: + +```sql +CREATE TABLE laion +( + `id` Int64, + `url` String, + `caption` String, + `NSFW` String, + `similarity` Float32, + `image_embedding` Array(Float32), + `text_embedding` Array(Float32) +) +ENGINE = MergeTree +ORDER BY id +SETTINGS index_granularity = 8192 +``` + +CSVファイルをClickHouseã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ï¼š + +```sql +INSERT INTO laion FROM INFILE '{path_to_csv_files}/*.csv' +``` + +## ブルートフォースã®ANN検索を実行ã™ã‚‹ï¼ˆANNインデックスãªã—) + +ブルートフォースã®è¿‘似最近å‚探索を実行ã™ã‚‹ã«ã¯ã€æ¬¡ã‚’実行ã—ã¾ã™ï¼š + +```sql +SELECT url, caption FROM laion ORDER BY L2Distance(image_embedding, {target:Array(Float32)}) LIMIT 30 +``` + +`target` 㯠512 è¦ç´ ã®é…列ã§ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ‘ラメータã§ã™ã€‚ã“ã®ã‚ˆã†ãªé…列をå–å¾—ã™ã‚‹ä¾¿åˆ©ãªæ–¹æ³•ã¯è¨˜äº‹ã®æœ€å¾Œã§ç´¹ä»‹ã•ã‚Œã¾ã™ã€‚今ã®ã¨ã“ã‚ã€ãƒ©ãƒ³ãƒ€ãƒ ãªçŒ«ã®ç”»åƒã®åŸ‹ã‚è¾¼ã¿ã‚’ `target` ã¨ã—ã¦å®Ÿè¡Œã§ãã¾ã™ã€‚ + +**çµæžœ** + +``` +┌─url───────────────────────────────────────────────────────────────────────────────────────────────────────────┬─caption────────────────────────────────────────────────────────────────┠+│ https://s3.amazonaws.com/filestore.rescuegroups.org/6685/pictures/animals/13884/13884995/63318230_463x463.jpg │ Adoptable Female Domestic Short Hair │ +│ https://s3.amazonaws.com/pet-uploads.adoptapet.com/8/b/6/239905226.jpg │ Adopt A Pet :: Marzipan - New York, NY │ +│ http://d1n3ar4lqtlydb.cloudfront.net/9/2/4/248407625.jpg │ Adopt A Pet :: Butterscotch - New Castle, DE │ +│ https://s3.amazonaws.com/pet-uploads.adoptapet.com/e/e/c/245615237.jpg │ Adopt A Pet :: Tiggy - Chicago, IL │ +│ http://pawsofcoronado.org/wp-content/uploads/2012/12/rsz_pumpkin.jpg │ Pumpkin an orange tabby kitten for adoption │ +│ https://s3.amazonaws.com/pet-uploads.adoptapet.com/7/8/3/188700997.jpg │ Adopt A Pet :: Brian the Brad Pitt of cats - Frankfort, IL │ +│ https://s3.amazonaws.com/pet-uploads.adoptapet.com/8/b/d/191533561.jpg │ Domestic Shorthair Cat for adoption in Mesa, Arizona - Charlie │ +│ https://s3.amazonaws.com/pet-uploads.adoptapet.com/0/1/2/221698235.jpg │ Domestic Shorthair Cat for adoption in Marietta, Ohio - Daisy (Spayed) │ +└───────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────┘ + +8 rows in set. Elapsed: 6.432 sec. Processed 19.65 million rows, 43.96 GB (3.06 million rows/s., 6.84 GB/s.) +``` + +## ANNインデックスã§ANNを実行ã™ã‚‹ + +ANNインデックスをæŒã¤æ–°ã—ã„テーブルを作æˆã—ã€æ—¢å­˜ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ï¼š + +```sql +CREATE TABLE laion_annoy +( + `id` Int64, + `url` String, + `caption` String, + `NSFW` String, + `similarity` Float32, + `image_embedding` Array(Float32), + `text_embedding` Array(Float32), + INDEX annoy_image image_embedding TYPE annoy(), + INDEX annoy_text text_embedding TYPE annoy() +) +ENGINE = MergeTree +ORDER BY id +SETTINGS index_granularity = 8192; + +INSERT INTO laion_annoy SELECT * FROM laion; +``` + +デフォルトã§ã¯ã€Annoy インデックス㯠L2 è·é›¢ã‚’メトリックã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚インデックス作æˆã¨æ¤œç´¢ã®ãŸã‚ã®è©³ç´°ãªèª¿æ•´ã¯ã€Annoy インデックスã®[ドキュメント](../../engines/table-engines/mergetree-family/annindexes.md)ã§èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™ã€‚åŒã˜ã‚¯ã‚¨ãƒªã§å†åº¦ç¢ºèªã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT url, caption FROM laion_annoy ORDER BY l2Distance(image_embedding, {target:Array(Float32)}) LIMIT 8 +``` + +**çµæžœ** + +``` +┌─url──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─caption──────────────────────────────────────────────────────────────┠+│ http://tse1.mm.bing.net/th?id=OIP.R1CUoYp_4hbeFSHBaaB5-gHaFj │ bed bugs and pets can cats carry bed bugs pets adviser │ +│ http://pet-uploads.adoptapet.com/1/9/c/1963194.jpg?336w │ Domestic Longhair Cat for adoption in Quincy, Massachusetts - Ashley │ +│ https://thumbs.dreamstime.com/t/cat-bed-12591021.jpg │ Cat on bed Stock Image │ +│ https://us.123rf.com/450wm/penta/penta1105/penta110500004/9658511-portrait-of-british-short-hair-kitten-lieing-at-sofa-on-sun.jpg │ Portrait of british short hair kitten lieing at sofa on sun. │ +│ https://www.easypetmd.com/sites/default/files/Wirehaired%20Vizsla%20(2).jpg │ Vizsla (Wirehaired) image 3 │ +│ https://images.ctfassets.net/yixw23k2v6vo/0000000200009b8800000000/7950f4e1c1db335ef91bb2bc34428de9/dog-cat-flickr-Impatience_1.jpg?w=600&h=400&fm=jpg&fit=thumb&q=65&fl=progressive │ dog and cat image │ +│ https://i1.wallbox.ru/wallpapers/small/201523/eaa582ee76a31fd.jpg │ cats, kittens, faces, tonkinese │ +│ https://www.baxterboo.com/images/breeds/medium/cairn-terrier.jpg │ Cairn Terrier Photo │ +└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────┘ + +8 rows in set. Elapsed: 0.641 sec. Processed 22.06 thousand rows, 49.36 MB (91.53 thousand rows/s., 204.81 MB/s.) +``` + +速度ã¯å¤§å¹…ã«å‘上ã—ã¾ã—ãŸãŒã€ã‚ˆã‚Šæ­£ç¢ºã§ã¯ãªã„çµæžœã«ãªã£ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ANN インデックスãŒè¿‘似的ãªæ¤œç´¢çµæžœã®ã¿ã‚’æä¾›ã™ã‚‹ãŸã‚ã§ã™ã€‚例ã§ã¯é¡žä¼¼ã—ãŸç”»åƒåŸ‹ã‚è¾¼ã¿ã‚’検索ã—ã¾ã—ãŸãŒã€ç”»åƒã‚­ãƒ£ãƒ—ションã®åŸ‹ã‚è¾¼ã¿ã‚’検索ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +## UDFを使用ã—ãŸåŸ‹ã‚è¾¼ã¿ã®ä½œæˆ + +通常ã€æ–°ã—ã„ç”»åƒã‚„ç”»åƒã‚­ãƒ£ãƒ—ションã®åŸ‹ã‚è¾¼ã¿ã‚’作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ä¸­ã®é¡žä¼¼ç”»åƒ/ç”»åƒã‚­ãƒ£ãƒ—ションã®ãƒšã‚¢ã‚’検索ã—ãŸããªã‚Šã¾ã™ã€‚クライアントを離れるã“ã¨ãªã `target` ベクトルを作æˆã™ã‚‹ãŸã‚ã«[UDF](../../sql-reference/functions/index.md#sql-user-defined-functions) を使用ã§ãã¾ã™ã€‚データã®ä½œæˆã¨æ¤œç´¢ç”¨ã«æ–°ã—ã„埋ã‚è¾¼ã¿ã‚’作æˆã™ã‚‹éš›ã«ã¯åŒã˜ãƒ¢ãƒ‡ãƒ«ã‚’使用ã™ã‚‹ã“ã¨ãŒé‡è¦ã§ã™ã€‚以下ã®ã‚¹ã‚¯ãƒªãƒ—トã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®åŸºç¤Žã¨ãªã‚‹ `ViT-B/32` モデルを利用ã—ã¦ã„ã¾ã™ã€‚ + +### テキスト埋ã‚込㿠+ +ã¾ãšã€æ¬¡ã®Pythonスクリプトを ClickHouse ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘スã«ã‚ã‚‹ `user_scripts/` ディレクトリã«ä¿å­˜ã—ã€å®Ÿè¡Œå¯èƒ½ã«ã—ã¾ã™ (`chmod +x encode_text.py`)。 + +`encode_text.py`: + +```python +#!/usr/bin/python3 +import clip +import torch +import numpy as np +import sys + +if __name__ == '__main__': + device = "cuda" if torch.cuda.is_available() else "cpu" + model, preprocess = clip.load("ViT-B/32", device=device) + for text in sys.stdin: + inputs = clip.tokenize(text) + with torch.no_grad(): + text_features = model.encode_text(inputs)[0].tolist() + print(text_features) + sys.stdout.flush() +``` + +次ã«ã€ClickHouse サーãƒãƒ¼ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§ `/path/to/*_function.xml` ã«å‚ç…§ã•ã‚Œã¦ã„る場所㫠`encode_text_function.xml` を作æˆã—ã¾ã™ã€‚ + +```xml + + + executable + encode_text + Array(Float32) + + String + text + + TabSeparated + encode_text.py + 1000000 + + +``` + +今ã™ã次ã®ã‚ˆã†ã«ä½¿ãˆã¾ã™ï¼š + +```sql +SELECT encode_text('cat'); +``` + +åˆå›žã®å®Ÿè¡Œã¯ãƒ¢ãƒ‡ãƒ«ãŒèª­ã¿è¾¼ã¾ã‚Œã‚‹ãŸã‚é…ããªã‚Šã¾ã™ãŒã€ç¹°ã‚Šè¿”ã™ã¨é€Ÿããªã‚Šã¾ã™ã€‚出力çµæžœã‚’コピーã—㦠`SET param_target=...` ã«ç°¡å˜ã«æ›¸ã込むã“ã¨ãŒã§ãã¾ã™ã€‚ + +### ç”»åƒåŸ‹ã‚込㿠+ +ç”»åƒåŸ‹ã‚è¾¼ã¿ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«ç”»åƒã¸ã®ãƒ‘スを画åƒã‚­ãƒ£ãƒ—ションテキストã®ä»£ã‚ã‚Šã«Pythonスクリプトã«æä¾›ã™ã‚‹ã“ã¨ã§åŒæ§˜ã«ä½œæˆã§ãã¾ã™ã€‚ + +`encode_image.py` + +```python +#!/usr/bin/python3 +import clip +import torch +import numpy as np +from PIL import Image +import sys + +if __name__ == '__main__': + device = "cuda" if torch.cuda.is_available() else "cpu" + model, preprocess = clip.load("ViT-B/32", device=device) + for text in sys.stdin: + image = preprocess(Image.open(text.strip())).unsqueeze(0).to(device) + with torch.no_grad(): + image_features = model.encode_image(image)[0].tolist() + print(image_features) + sys.stdout.flush() +``` + +`encode_image_function.xml` + +```xml + + + executable_pool + encode_image + Array(Float32) + + String + path + + TabSeparated + encode_image.py + 1000000 + + +``` + +次ã«ã“ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ï¼š + +```sql +SELECT encode_image('/path/to/your/image'); +``` + diff --git a/docs/ja/getting-started/example-datasets/menus.md b/docs/ja/getting-started/example-datasets/menus.md new file mode 100644 index 00000000000..8d453498cea --- /dev/null +++ b/docs/ja/getting-started/example-datasets/menus.md @@ -0,0 +1,354 @@ +--- +slug: /ja/getting-started/example-datasets/menus +sidebar_label: ニューヨーク公共図書館「What's on the Menu?ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ +title: "ニューヨーク公共図書館「What's on the Menu?ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ" +--- + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ãƒ‹ãƒ¥ãƒ¼ãƒ¨ãƒ¼ã‚¯å…¬å…±å›³æ›¸é¤¨ã«ã‚ˆã£ã¦ä½œæˆã•ã‚Œã¾ã—ãŸã€‚ホテルã€ãƒ¬ã‚¹ãƒˆãƒ©ãƒ³ã€ã‚«ãƒ•ã‚§ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«é–¢ã™ã‚‹æ­´å²çš„データã§ã€æ–™ç†åã¨ãã‚Œã«å¯¾å¿œã™ã‚‹ä¾¡æ ¼ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +出典: http://menus.nypl.org/data +ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ãƒ‘ブリックドメインã«ã‚ã‚Šã¾ã™ã€‚ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯å›³æ›¸é¤¨ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã‹ã‚‰ã®ã‚‚ã®ã§ã‚ã‚Šã€çµ±è¨ˆåˆ†æžã«ã¯ä¸å®Œå…¨ã§å›°é›£ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã—ã‹ã—ã€ãã‚Œã§ã‚‚ã¨ã¦ã‚‚魅力的ãªãƒ‡ãƒ¼ã‚¿ã§ã™ã€‚メニューã«è¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹æ–™ç†ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯ç´„130万件ã‚ã‚Šã€ClickHouseã«é©ã—ã¦ã„ã‚‹ã»ã©å°ã•ãªãƒ‡ãƒ¼ã‚¿é‡ã§ã™ãŒã€è‰¯ã„例ã§ã™ã€‚ + +## データセットをダウンロードã™ã‚‹ {#download-dataset} + +以下ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™: + +```bash +wget https://s3.amazonaws.com/menusdata.nypl.org/gzips/2021_08_01_07_01_17_data.tgz +# オプション: ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’検証ã™ã‚‹ +md5sum 2021_08_01_07_01_17_data.tgz +# ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã¯æ¬¡ã¨ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: db6126724de939a5481e3160a2d67d15 +``` + +å¿…è¦ã«å¿œã˜ã¦ã€æœ€æ–°ã®ãƒªãƒ³ã‚¯ã‚’ http://menus.nypl.org/data ã‹ã‚‰å–å¾—ã—ã¦ãƒªãƒ³ã‚¯ã‚’ç½®ãæ›ãˆã¦ãã ã•ã„。ダウンロードサイズã¯ç´„35MBã§ã™ã€‚ + +## データセットを解å‡ã™ã‚‹ {#unpack-dataset} + +```bash +tar xvf 2021_08_01_07_01_17_data.tgz +``` + +解å‡å¾Œã®ã‚µã‚¤ã‚ºã¯ç´„150MBã§ã™ã€‚ + +データã¯æ­£è¦åŒ–ã•ã‚Œã¦ãŠã‚Šã€4ã¤ã®ãƒ†ãƒ¼ãƒ–ルã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™: +- `Menu` — メニューã«é–¢ã™ã‚‹æƒ…å ±: レストランåã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãŒè¡¨ç¤ºã•ã‚ŒãŸæ—¥ä»˜ãªã©ã€‚ +- `Dish` — æ–™ç†ã«é–¢ã™ã‚‹æƒ…å ±: æ–™ç†åã¨ã„ãã¤ã‹ã®ç‰¹å¾´ã€‚ +- `MenuPage` — メニューã®ãƒšãƒ¼ã‚¸æƒ…報。ã™ã¹ã¦ã®ãƒšãƒ¼ã‚¸ã¯ç‰¹å®šã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«å±žã—ã¾ã™ã€‚ +- `MenuItem` — メニュー項目。ã‚るメニューページ上ã®æ–™ç†ã¨ãã®ä¾¡æ ¼: æ–™ç†ã¨ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒšãƒ¼ã‚¸ã¸ã®ãƒªãƒ³ã‚¯ã€‚ + +## テーブルを作æˆã™ã‚‹ {#create-tables} + +価格をä¿å­˜ã™ã‚‹ãŸã‚ã«[Decimal](../../sql-reference/data-types/decimal.md)データ型を使用ã—ã¾ã™ã€‚ + +```sql +CREATE TABLE dish +( + id UInt32, + name String, + description String, + menus_appeared UInt32, + times_appeared Int32, + first_appeared UInt16, + last_appeared UInt16, + lowest_price Decimal64(3), + highest_price Decimal64(3) +) ENGINE = MergeTree ORDER BY id; + +CREATE TABLE menu +( + id UInt32, + name String, + sponsor String, + event String, + venue String, + place String, + physical_description String, + occasion String, + notes String, + call_number String, + keywords String, + language String, + date String, + location String, + location_type String, + currency String, + currency_symbol String, + status String, + page_count UInt16, + dish_count UInt16 +) ENGINE = MergeTree ORDER BY id; + +CREATE TABLE menu_page +( + id UInt32, + menu_id UInt32, + page_number UInt16, + image_id String, + full_height UInt16, + full_width UInt16, + uuid UUID +) ENGINE = MergeTree ORDER BY id; + +CREATE TABLE menu_item +( + id UInt32, + menu_page_id UInt32, + price Decimal64(3), + high_price Decimal64(3), + dish_id UInt32, + created_at DateTime, + updated_at DateTime, + xpos Float64, + ypos Float64 +) ENGINE = MergeTree ORDER BY id; +``` + +## データをインãƒãƒ¼ãƒˆã™ã‚‹ {#import-data} + +ClickHouse ã«ãƒ‡ãƒ¼ã‚¿ã‚’アップロードã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã‚’実行ã—ã¾ã™: + +```bash +clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --query "INSERT INTO dish FORMAT CSVWithNames" < Dish.csv +clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --query "INSERT INTO menu FORMAT CSVWithNames" < Menu.csv +clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --query "INSERT INTO menu_page FORMAT CSVWithNames" < MenuPage.csv +clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --date_time_input_format best_effort --query "INSERT INTO menu_item FORMAT CSVWithNames" < MenuItem.csv +``` + +データã¯ãƒ˜ãƒƒãƒ€ä»˜ãã®CSVã§è¡¨ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€[CSVWithNames](../../interfaces/formats.md#csvwithnames)å½¢å¼ã‚’使用ã—ã¾ã™ã€‚ + +データフィールドã«ã¯äºŒé‡å¼•ç”¨ç¬¦ã—ã‹ä½¿ç”¨ã•ã‚Œãšã€ä¸€é‡å¼•ç”¨ç¬¦ã¯å€¤ã®ä¸­ã«å«ã¾ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€CSVパーサを混乱ã•ã›ãªã„よã†ã«`format_csv_allow_single_quotes`を無効ã«ã—ã¾ã™ã€‚ + +[NULL](../../sql-reference/syntax.md#null-literal)ã‚’æŒãŸãªã„ãŸã‚ã€[input_format_null_as_default](../../operations/settings/settings-formats.md#settings-input-format-null-as-default)を無効ã«ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ClickHouseã¯`\N` シーケンスを解æžã—よã†ã¨ã—ã€ãƒ‡ãƒ¼ã‚¿å†…ã®`\`ã§æ··ä¹±ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +設定[date_time_input_format best_effort](../../operations/settings/settings-formats.md#settings-date_time_input_format)ã¯ã€å¹…広ã„å½¢å¼ã§[DateTime](../../sql-reference/data-types/datetime.md)フィールドを解æžã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚例ãˆã°ã€'2000-01-01 01:02'ã®ã‚ˆã†ãªç§’ãªã—ã®ISO-8601å½¢å¼ã‚‚èªè­˜ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šãŒãªã„ã¨ã€å›ºå®šã•ã‚ŒãŸDateTimeå½¢å¼ã®ã¿ãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ + +## データをéžæ­£è¦åŒ–ã™ã‚‹ {#denormalize-data} + +データã¯è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルã«åˆ†ã‘ã¦[æ­£è¦åŒ–](https://en.wikipedia.org/wiki/Database_normalization#Normal_forms)ã•ã‚Œã¦ã„ã¾ã™ã€‚ã¤ã¾ã‚Šã€ä¾‹ãˆã°ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã‹ã‚‰æ–™ç†åをクエリã™ã‚‹ã«ã¯ã€[JOIN](../../sql-reference/statements/select/join.md#select-join)を実行ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚典型的ãªåˆ†æžã‚¿ã‚¹ã‚¯ã§ã¯ã€æ¯Žå›ž`JOIN`ã‚’ã™ã‚‹ä»£ã‚ã‚Šã«ã€äº‹å‰ã«JOINã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’扱ã†æ–¹ãŒã¯ã‚‹ã‹ã«åŠ¹çŽ‡çš„ã§ã™ã€‚ã“れを「éžæ­£è¦åŒ–ã€ãƒ‡ãƒ¼ã‚¿ã¨å‘¼ã³ã¾ã™ã€‚ + +ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’JOINã—ã¦å«ã‚€`menu_item_denorm`ã¨ã„ã†ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™: + +```sql +CREATE TABLE menu_item_denorm +ENGINE = MergeTree ORDER BY (dish_name, created_at) +AS SELECT + price, + high_price, + created_at, + updated_at, + xpos, + ypos, + dish.id AS dish_id, + dish.name AS dish_name, + dish.description AS dish_description, + dish.menus_appeared AS dish_menus_appeared, + dish.times_appeared AS dish_times_appeared, + dish.first_appeared AS dish_first_appeared, + dish.last_appeared AS dish_last_appeared, + dish.lowest_price AS dish_lowest_price, + dish.highest_price AS dish_highest_price, + menu.id AS menu_id, + menu.name AS menu_name, + menu.sponsor AS menu_sponsor, + menu.event AS menu_event, + menu.venue AS menu_venue, + menu.place AS menu_place, + menu.physical_description AS menu_physical_description, + menu.occasion AS menu_occasion, + menu.notes AS menu_notes, + menu.call_number AS menu_call_number, + menu.keywords AS menu_keywords, + menu.language AS menu_language, + menu.date AS menu_date, + menu.location AS menu_location, + menu.location_type AS menu_location_type, + menu.currency AS menu_currency, + menu.currency_symbol AS menu_currency_symbol, + menu.status AS menu_status, + menu.page_count AS menu_page_count, + menu.dish_count AS menu_dish_count +FROM menu_item + JOIN dish ON menu_item.dish_id = dish.id + JOIN menu_page ON menu_item.menu_page_id = menu_page.id + JOIN menu ON menu_page.menu_id = menu.id; +``` + +## データを検証ã™ã‚‹ {#validate-data} + +クエリ: + +```sql +SELECT count() FROM menu_item_denorm; +``` + +çµæžœ: + +```text +┌─count()─┠+│ 1329175 │ +└─────────┘ +``` + +## クエリを実行ã™ã‚‹ {#run-queries} + +### æ–™ç†ã®å¹³å‡æ­´å²ä¾¡æ ¼ {#query-averaged-historical-prices} + +クエリ: + +```sql +SELECT + round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, + count(), + round(avg(price), 2), + bar(avg(price), 0, 100, 100) +FROM menu_item_denorm +WHERE (menu_currency = 'Dollars') AND (d > 0) AND (d < 2022) +GROUP BY d +ORDER BY d ASC; +``` + +çµæžœ: + +```text +┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 100, 100)─┠+│ 1850 │ 618 │ 1.5 │ █■│ +│ 1860 │ 1634 │ 1.29 │ █▎ │ +│ 1870 │ 2215 │ 1.36 │ █▎ │ +│ 1880 │ 3909 │ 1.01 │ â–ˆ │ +│ 1890 │ 8837 │ 1.4 │ █■│ +│ 1900 │ 176292 │ 0.68 │ â–‹ │ +│ 1910 │ 212196 │ 0.88 │ â–Š │ +│ 1920 │ 179590 │ 0.74 │ â–‹ │ +│ 1930 │ 73707 │ 0.6 │ â–Œ │ +│ 1940 │ 58795 │ 0.57 │ â–Œ │ +│ 1950 │ 41407 │ 0.95 │ â–Š │ +│ 1960 │ 51179 │ 1.32 │ █▎ │ +│ 1970 │ 12914 │ 1.86 │ █▋ │ +│ 1980 │ 7268 │ 4.35 │ ████▎ │ +│ 1990 │ 11055 │ 6.03 │ ██████ │ +│ 2000 │ 2467 │ 11.85 │ ███████████▋ │ +│ 2010 │ 597 │ 25.66 │ █████████████████████████▋ │ +└──────┴─────────┴──────────────────────┴──────────────────────────────┘ +``` + +çµæžœã‚’æ…Žé‡ã«è§£é‡ˆã—ã¦ãã ã•ã„。 + +### ãƒãƒ¼ã‚¬ãƒ¼ã®ä¾¡æ ¼ {#query-burger-prices} + +クエリ: + +```sql +SELECT + round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, + count(), + round(avg(price), 2), + bar(avg(price), 0, 50, 100) +FROM menu_item_denorm +WHERE (menu_currency = 'Dollars') AND (d > 0) AND (d < 2022) AND (dish_name ILIKE '%burger%') +GROUP BY d +ORDER BY d ASC; +``` + +çµæžœ: + +```text +┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 50, 100)───────────┠+│ 1880 │ 2 │ 0.42 │ â–‹ │ +│ 1890 │ 7 │ 0.85 │ █▋ │ +│ 1900 │ 399 │ 0.49 │ â–Š │ +│ 1910 │ 589 │ 0.68 │ █▎ │ +│ 1920 │ 280 │ 0.56 │ â–ˆ │ +│ 1930 │ 74 │ 0.42 │ â–‹ │ +│ 1940 │ 119 │ 0.59 │ █■│ +│ 1950 │ 134 │ 1.09 │ ██■│ +│ 1960 │ 272 │ 0.92 │ █▋ │ +│ 1970 │ 108 │ 1.18 │ ██▎ │ +│ 1980 │ 88 │ 2.82 │ █████▋ │ +│ 1990 │ 184 │ 3.68 │ ███████▎ │ +│ 2000 │ 21 │ 7.14 │ ██████████████▎ │ +│ 2010 │ 6 │ 18.42 │ ████████████████████████████████████▋ │ +└──────┴─────────┴──────────────────────┴───────────────────────────────────────┘ +``` + +### ウォッカ {#query-vodka} + +クエリ: + +```sql +SELECT + round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, + count(), + round(avg(price), 2), + bar(avg(price), 0, 50, 100) +FROM menu_item_denorm +WHERE (menu_currency IN ('Dollars', '')) AND (d > 0) AND (d < 2022) AND (dish_name ILIKE '%vodka%') +GROUP BY d +ORDER BY d ASC; +``` + +çµæžœ: + +```text +┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 50, 100)─┠+│ 1910 │ 2 │ 0 │ │ +│ 1920 │ 1 │ 0.3 │ â–Œ │ +│ 1940 │ 21 │ 0.42 │ â–‹ │ +│ 1950 │ 14 │ 0.59 │ █■│ +│ 1960 │ 113 │ 2.17 │ ████▎ │ +│ 1970 │ 37 │ 0.68 │ █▎ │ +│ 1980 │ 19 │ 2.55 │ █████ │ +│ 1990 │ 86 │ 3.6 │ ███████■│ +│ 2000 │ 2 │ 3.98 │ ███████▊ │ +└──────┴─────────┴──────────────────────┴─────────────────────────────┘ +``` + +ウォッカを手ã«å…¥ã‚Œã‚‹ã«ã¯`ILIKE '%vodka%'`ã¨è¨˜è¿°ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ã“ã‚Œã¯ç¢ºã‹ã«ä¸»å¼µã—ã¦ã„ã¾ã™ã€‚ + +### キャビア {#query-caviar} + +キャビアã®ä¾¡æ ¼ã‚’表示ã—ã¾ã—ょã†ã€‚ã¾ãŸã€ã‚­ãƒ£ãƒ“アをå«ã‚€ä»»æ„ã®æ–™ç†åを表示ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT + round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, + count(), + round(avg(price), 2), + bar(avg(price), 0, 50, 100), + any(dish_name) +FROM menu_item_denorm +WHERE (menu_currency IN ('Dollars', '')) AND (d > 0) AND (d < 2022) AND (dish_name ILIKE '%caviar%') +GROUP BY d +ORDER BY d ASC; +``` + +çµæžœ: + +```text +┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 50, 100)──────┬─any(dish_name)──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ 1090 │ 1 │ 0 │ │ Caviar │ +│ 1880 │ 3 │ 0 │ │ Caviar │ +│ 1890 │ 39 │ 0.59 │ █■│ Butter and caviar │ +│ 1900 │ 1014 │ 0.34 │ â–‹ │ Anchovy Caviar on Toast │ +│ 1910 │ 1588 │ 1.35 │ ██▋ │ 1/1 Brötchen Caviar │ +│ 1920 │ 927 │ 1.37 │ ██▋ │ ASTRAKAN CAVIAR │ +│ 1930 │ 289 │ 1.91 │ ███▋ │ Astrachan caviar │ +│ 1940 │ 201 │ 0.83 │ █▋ │ (SPECIAL) Domestic Caviar Sandwich │ +│ 1950 │ 81 │ 2.27 │ ████▌ │ Beluga Caviar │ +│ 1960 │ 126 │ 2.21 │ ████■│ Beluga Caviar │ +│ 1970 │ 105 │ 0.95 │ █▊ │ BELUGA MALOSSOL CAVIAR AMERICAN DRESSING │ +│ 1980 │ 12 │ 7.22 │ ██████████████■│ Authentic Iranian Beluga Caviar the world's finest black caviar presented in ice garni and a sampling of chilled 100° Russian vodka │ +│ 1990 │ 74 │ 14.42 │ ████████████████████████████▋ │ Avocado Salad, Fresh cut avocado with caviare │ +│ 2000 │ 3 │ 7.82 │ ███████████████▋ │ Aufgeschlagenes Kartoffelsueppchen mit Forellencaviar │ +│ 2010 │ 6 │ 15.58 │ ███████████████████████████████■│ "OYSTERS AND PEARLS" "Sabayon" of Pearl Tapioca with Island Creek Oysters and Russian Sevruga Caviar │ +└──────┴─────────┴──────────────────────┴──────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +å°‘ãªãã¨ã‚‚ウォッカã¨ä¸€ç·’ã«ã‚­ãƒ£ãƒ“ã‚¢ãŒã‚ã‚Šã¾ã™ã€‚ã¨ã¦ã‚‚素晴らã—ã„ã§ã™ã€‚ + +## オンラインプレイグラウンド {#playground} + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ClickHouseプレイグラウンドã«ã‚¢ãƒƒãƒ—ロードã•ã‚Œã¦ã„ã¾ã™ã€‚[例](https://sql.clickhouse.com?query_id=KB5KQJJFNBKHE5GBUJCP1B)。 diff --git a/docs/ja/getting-started/example-datasets/metrica.md b/docs/ja/getting-started/example-datasets/metrica.md new file mode 100644 index 00000000000..44bdd953dbb --- /dev/null +++ b/docs/ja/getting-started/example-datasets/metrica.md @@ -0,0 +1,137 @@ +--- +slug: /ja/getting-started/example-datasets/metrica +sidebar_label: ウェブ分æžãƒ‡ãƒ¼ã‚¿ +description: ヒットãŠã‚ˆã³è¨ªå•ã‚’å«ã‚€åŒ¿å化ã•ã‚ŒãŸã‚¦ã‚§ãƒ–分æžãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€2ã¤ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰æˆã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ +--- + +# 匿å化ã•ã‚ŒãŸã‚¦ã‚§ãƒ–分æžãƒ‡ãƒ¼ã‚¿ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ã€ãƒ’ット (`hits_v1`) ãŠã‚ˆã³è¨ªå• (`visits_v1`) ã‚’å«ã‚€åŒ¿å化ã•ã‚ŒãŸã‚¦ã‚§ãƒ–分æžãƒ‡ãƒ¼ã‚¿ã®2ã¤ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰æˆã£ã¦ã„ã¾ã™ã€‚ + +テーブルã¯åœ§ç¸®ã•ã‚ŒãŸ `tsv.xz` ファイルã¨ã—ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§æ‰±ã†ã‚µãƒ³ãƒ—ルã«åŠ ãˆã€100百万行をå«ã‚€ `hits` テーブルã®æ‹¡å¼µç‰ˆï¼ˆ7.5GB)㌠TSV å½¢å¼ã§ [https://datasets.clickhouse.com/hits/tsv/hits_100m_obfuscated_v1.tsv.xz](https://datasets.clickhouse.com/hits/tsv/hits_100m_obfuscated_v1.tsv.xz) ã‹ã‚‰åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +## データã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¨ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +### ヒットã®åœ§ç¸®ã•ã‚ŒãŸ TSV ファイルをダウンロード: + +``` bash +curl https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv +# ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’ç¢ºèª +md5sum hits_v1.tsv +# ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã¯æ¬¡ã®å€¤ã¨ä¸€è‡´ã™ã‚‹ã¯ãšã§ã™: f3631b6295bf06989c1437491f7592cb +``` + +### データベースã¨ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ + +```bash +clickhouse-client --query "CREATE DATABASE IF NOT EXISTS datasets" +``` + +ヒットテーブル hits_v1 ã®ä½œæˆ: + +```bash +clickhouse-client --query "CREATE TABLE datasets.hits_v1 ( WatchID UInt64, JavaEnable UInt8, Title String, GoodEvent Int16, EventTime DateTime, EventDate Date, CounterID UInt32, ClientIP UInt32, ClientIP6 FixedString(16), RegionID UInt32, UserID UInt64, CounterClass Int8, OS UInt8, UserAgent UInt8, URL String, Referer String, URLDomain String, RefererDomain String, Refresh UInt8, IsRobot UInt8, RefererCategories Array(UInt16), URLCategories Array(UInt16), URLRegions Array(UInt32), RefererRegions Array(UInt32), ResolutionWidth UInt16, ResolutionHeight UInt16, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, FlashMinor2 String, NetMajor UInt8, NetMinor UInt8, UserAgentMajor UInt16, UserAgentMinor FixedString(2), CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, MobilePhone UInt8, MobilePhoneModel String, Params String, IPNetworkID UInt32, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, IsArtifical UInt8, WindowClientWidth UInt16, WindowClientHeight UInt16, ClientTimeZone Int16, ClientEventTime DateTime, SilverlightVersion1 UInt8, SilverlightVersion2 UInt8, SilverlightVersion3 UInt32, SilverlightVersion4 UInt16, PageCharset String, CodeVersion UInt32, IsLink UInt8, IsDownload UInt8, IsNotBounce UInt8, FUniqID UInt64, HID UInt32, IsOldCounter UInt8, IsEvent UInt8, IsParameter UInt8, DontCountHits UInt8, WithHash UInt8, HitColor FixedString(1), UTCEventTime DateTime, Age UInt8, Sex UInt8, Income UInt8, Interests UInt16, Robotness UInt8, GeneralInterests Array(UInt16), RemoteIP UInt32, RemoteIP6 FixedString(16), WindowName Int32, OpenerName Int32, HistoryLength Int16, BrowserLanguage FixedString(2), BrowserCountry FixedString(2), SocialNetwork String, SocialAction String, HTTPError UInt16, SendTiming Int32, DNSTiming Int32, ConnectTiming Int32, ResponseStartTiming Int32, ResponseEndTiming Int32, FetchTiming Int32, RedirectTiming Int32, DOMInteractiveTiming Int32, DOMContentLoadedTiming Int32, DOMCompleteTiming Int32, LoadEventStartTiming Int32, LoadEventEndTiming Int32, NSToDOMContentLoadedTiming Int32, FirstPaintTiming Int32, RedirectCount Int8, SocialSourceNetworkID UInt8, SocialSourcePage String, ParamPrice Int64, ParamOrderID String, ParamCurrency FixedString(3), ParamCurrencyID UInt16, GoalsReached Array(UInt32), OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, RefererHash UInt64, URLHash UInt64, CLID UInt32, YCLID UInt64, ShareService String, ShareURL String, ShareTitle String, ParsedParams Nested(Key1 String, Key2 String, Key3 String, Key4 String, Key5 String, ValueDouble Float64), IslandID FixedString(16), RequestNum UInt32, RequestTry UInt8) ENGINE = MergeTree() PARTITION BY toYYYYMM(EventDate) ORDER BY (CounterID, EventDate, intHash32(UserID)) SAMPLE BY intHash32(UserID) SETTINGS index_granularity = 8192" +``` + +ã¾ãŸã¯ã€ãƒ’ットテーブル hits_100m_obfuscated ã®å ´åˆ + +```bash +clickhouse-client --query="CREATE TABLE default.hits_100m_obfuscated (WatchID UInt64, JavaEnable UInt8, Title String, GoodEvent Int16, EventTime DateTime, EventDate Date, CounterID UInt32, ClientIP UInt32, RegionID UInt32, UserID UInt64, CounterClass Int8, OS UInt8, UserAgent UInt8, URL String, Referer String, Refresh UInt8, RefererCategoryID UInt16, RefererRegionID UInt32, URLCategoryID UInt16, URLRegionID UInt32, ResolutionWidth UInt16, ResolutionHeight UInt16, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, FlashMinor2 String, NetMajor UInt8, NetMinor UInt8, UserAgentMajor UInt16, UserAgentMinor FixedString(2), CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, MobilePhone UInt8, MobilePhoneModel String, Params String, IPNetworkID UInt32, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, IsArtifical UInt8, WindowClientWidth UInt16, WindowClientHeight UInt16, ClientTimeZone Int16, ClientEventTime DateTime, SilverlightVersion1 UInt8, SilverlightVersion2 UInt8, SilverlightVersion3 UInt32, SilverlightVersion4 UInt16, PageCharset String, CodeVersion UInt32, IsLink UInt8, IsDownload UInt8, IsNotBounce UInt8, FUniqID UInt64, OriginalURL String, HID UInt32, IsOldCounter UInt8, IsEvent UInt8, IsParameter UInt8, DontCountHits UInt8, WithHash UInt8, HitColor FixedString(1), LocalEventTime DateTime, Age UInt8, Sex UInt8, Income UInt8, Interests UInt16, Robotness UInt8, RemoteIP UInt32, WindowName Int32, OpenerName Int32, HistoryLength Int16, BrowserLanguage FixedString(2), BrowserCountry FixedString(2), SocialNetwork String, SocialAction String, HTTPError UInt16, SendTiming UInt32, DNSTiming UInt32, ConnectTiming UInt32, ResponseStartTiming UInt32, ResponseEndTiming UInt32, FetchTiming UInt32, SocialSourceNetworkID UInt8, SocialSourcePage String, ParamPrice Int64, ParamOrderID String, ParamCurrency FixedString(3), ParamCurrencyID UInt16, OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, RefererHash UInt64, URLHash UInt64, CLID UInt32) ENGINE = MergeTree() PARTITION BY toYYYYMM(EventDate) ORDER BY (CounterID, EventDate, intHash32(UserID)) SAMPLE BY intHash32(UserID) SETTINGS index_granularity = 8192" +``` + +### ヒットデータをインãƒãƒ¼ãƒˆã™ã‚‹: + +```bash +cat hits_v1.tsv | clickhouse-client --query "INSERT INTO datasets.hits_v1 FORMAT TSV" --max_insert_block_size=100000 +``` + +è¡Œæ•°ã‚’ç¢ºèª + +```bash +clickhouse-client --query "SELECT COUNT(*) FROM datasets.hits_v1" +``` + +```response +8873898 +``` + +### 訪å•ã®åœ§ç¸®ã•ã‚ŒãŸ TSV ファイルをダウンロード: + +``` bash +curl https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv +# ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’ç¢ºèª +md5sum visits_v1.tsv +# ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã¯æ¬¡ã®å€¤ã¨ä¸€è‡´ã™ã‚‹ã¯ãšã§ã™: 6dafe1a0f24e59e3fc2d0fed85601de6 +``` + +### 訪å•ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ + +```bash +clickhouse-client --query "CREATE TABLE datasets.visits_v1 ( CounterID UInt32, StartDate Date, Sign Int8, IsNew UInt8, VisitID UInt64, UserID UInt64, StartTime DateTime, Duration UInt32, UTCStartTime DateTime, PageViews Int32, Hits Int32, IsBounce UInt8, Referer String, StartURL String, RefererDomain String, StartURLDomain String, EndURL String, LinkURL String, IsDownload UInt8, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, PlaceID Int32, RefererCategories Array(UInt16), URLCategories Array(UInt16), URLRegions Array(UInt32), RefererRegions Array(UInt32), IsYandex UInt8, GoalReachesDepth Int32, GoalReachesURL Int32, GoalReachesAny Int32, SocialSourceNetworkID UInt8, SocialSourcePage String, MobilePhoneModel String, ClientEventTime DateTime, RegionID UInt32, ClientIP UInt32, ClientIP6 FixedString(16), RemoteIP UInt32, RemoteIP6 FixedString(16), IPNetworkID UInt32, SilverlightVersion3 UInt32, CodeVersion UInt32, ResolutionWidth UInt16, ResolutionHeight UInt16, UserAgentMajor UInt16, UserAgentMinor UInt16, WindowClientWidth UInt16, WindowClientHeight UInt16, SilverlightVersion2 UInt8, SilverlightVersion4 UInt16, FlashVersion3 UInt16, FlashVersion4 UInt16, ClientTimeZone Int16, OS UInt8, UserAgent UInt8, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, NetMajor UInt8, NetMinor UInt8, MobilePhone UInt8, SilverlightVersion1 UInt8, Age UInt8, Sex UInt8, Income UInt8, JavaEnable UInt8, CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, BrowserLanguage UInt16, BrowserCountry UInt16, Interests UInt16, Robotness UInt8, GeneralInterests Array(UInt16), Params Array(String), Goals Nested(ID UInt32, Serial UInt32, EventTime DateTime, Price Int64, OrderID String, CurrencyID UInt32), WatchIDs Array(UInt64), ParamSumPrice Int64, ParamCurrency FixedString(3), ParamCurrencyID UInt16, ClickLogID UInt64, ClickEventID Int32, ClickGoodEvent Int32, ClickEventTime DateTime, ClickPriorityID Int32, ClickPhraseID Int32, ClickPageID Int32, ClickPlaceID Int32, ClickTypeID Int32, ClickResourceID Int32, ClickCost UInt32, ClickClientIP UInt32, ClickDomainID UInt32, ClickURL String, ClickAttempt UInt8, ClickOrderID UInt32, ClickBannerID UInt32, ClickMarketCategoryID UInt32, ClickMarketPP UInt32, ClickMarketCategoryName String, ClickMarketPPName String, ClickAWAPSCampaignName String, ClickPageName String, ClickTargetType UInt16, ClickTargetPhraseID UInt64, ClickContextType UInt8, ClickSelectType Int8, ClickOptions String, ClickGroupBannerID Int32, OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, FirstVisit DateTime, PredLastVisit Date, LastVisit Date, TotalVisits UInt32, TraficSource Nested(ID Int8, SearchEngineID UInt16, AdvEngineID UInt8, PlaceID UInt16, SocialSourceNetworkID UInt8, Domain String, SearchPhrase String, SocialSourcePage String), Attendance FixedString(16), CLID UInt32, YCLID UInt64, NormalizedRefererHash UInt64, SearchPhraseHash UInt64, RefererDomainHash UInt64, NormalizedStartURLHash UInt64, StartURLDomainHash UInt64, NormalizedEndURLHash UInt64, TopLevelDomain UInt64, URLScheme UInt64, OpenstatServiceNameHash UInt64, OpenstatCampaignIDHash UInt64, OpenstatAdIDHash UInt64, OpenstatSourceIDHash UInt64, UTMSourceHash UInt64, UTMMediumHash UInt64, UTMCampaignHash UInt64, UTMContentHash UInt64, UTMTermHash UInt64, FromHash UInt64, WebVisorEnabled UInt8, WebVisorActivity UInt32, ParsedParams Nested(Key1 String, Key2 String, Key3 String, Key4 String, Key5 String, ValueDouble Float64), Market Nested(Type UInt8, GoalID UInt32, OrderID String, OrderPrice Int64, PP UInt32, DirectPlaceID UInt32, DirectOrderID UInt32, DirectBannerID UInt32, GoodID String, GoodName String, GoodQuantity Int32, GoodPrice Int64), IslandID FixedString(16)) ENGINE = CollapsingMergeTree(Sign) PARTITION BY toYYYYMM(StartDate) ORDER BY (CounterID, StartDate, intHash32(UserID), VisitID) SAMPLE BY intHash32(UserID) SETTINGS index_granularity = 8192" +``` + +### 訪å•ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆ +```bash +cat visits_v1.tsv | clickhouse-client --query "INSERT INTO datasets.visits_v1 FORMAT TSV" --max_insert_block_size=100000 +``` + +è¡Œæ•°ã‚’ç¢ºèª +```bash +clickhouse-client --query "SELECT COUNT(*) FROM datasets.visits_v1" +``` + +```response +1680609 +``` + +## 例ã¨ã—ã¦ã®JOIN + +ヒットã¨è¨ªå•ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ ClickHouse ã®ãƒ†ã‚¹ãƒˆãƒ«ãƒ¼ãƒãƒ³ã§ä½¿ç”¨ã•ã‚Œã€ã“ã®ã‚¯ã‚¨ãƒªã¯ãƒ†ã‚¹ãƒˆã‚¹ã‚¤ãƒ¼ãƒˆã®ä¸€ã¤ã§ã™ã€‚ä»–ã®ãƒ†ã‚¹ãƒˆã¯ã€ã“ã®ãƒšãƒ¼ã‚¸ã®æœ€å¾Œã«ã‚ã‚‹ *次ã®ã‚¹ãƒ†ãƒƒãƒ—* セクションã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```sql +clickhouse-client --query "SELECT + EventDate, + hits, + visits +FROM +( + SELECT + EventDate, + count() AS hits + FROM datasets.hits_v1 + GROUP BY EventDate +) ANY LEFT JOIN +( + SELECT + StartDate AS EventDate, + sum(Sign) AS visits + FROM datasets.visits_v1 + GROUP BY EventDate +) USING EventDate +ORDER BY hits DESC +LIMIT 10 +SETTINGS joined_subquery_requires_alias = 0 +FORMAT PrettyCompact" +``` + +```response +┌──EventDate─┬────hits─┬─visits─┠+│ 2014-03-17 │ 1406958 │ 265108 │ +│ 2014-03-19 │ 1405797 │ 261624 │ +│ 2014-03-18 │ 1383658 │ 258723 │ +│ 2014-03-20 │ 1353623 │ 255328 │ +│ 2014-03-21 │ 1245779 │ 236232 │ +│ 2014-03-23 │ 1046491 │ 202212 │ +│ 2014-03-22 │ 1031592 │ 197354 │ +└────────────┴─────────┴────────┘ +``` + +## 次ã®ã‚¹ãƒ†ãƒƒãƒ— + +[ClickHouseã«ãŠã‘るスパース主インデックスã¸ã®å®Ÿè·µçš„ãªå…¥é–€](/docs/ja/guides/best-practices/sparse-primary-indexes.md)ã¯ã€ãƒ’ットデータセットを使用ã—ã¦ã€ClickHouseãŒä¼çµ±çš„ãªãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨æ¯”較ã—ã¦ã©ã®ã‚ˆã†ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä½œæˆã‚’è¡Œã„ã€ã‚¹ãƒ‘ース主インデックスを構築・使用ã™ã‚‹ã‹ã€ã¾ãŸã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä½œæˆã®ãƒ™ã‚¹ãƒˆãƒ—ラクティスã«ã¤ã„ã¦è­°è«–ã—ã¾ã™ã€‚ + +ã“れらã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ã‚¯ã‚¨ãƒªã®è¿½åŠ ä¾‹ã¯ã€ClickHouseã®[statefulテスト](https://github.com/ClickHouse/ClickHouse/blob/d7129855757f38ceec3e4ecc6dafacdabe9b178f/tests/queries/1_stateful/00172_parallel_join.sql)ã®ä¸­ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +テストスイートã§ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã« `test` を使用ã—ã€ãƒ†ãƒ¼ãƒ–ルå㯠`hits` 㨠`visits` ã§ã™ã€‚データベースã¨ãƒ†ãƒ¼ãƒ–ルã®åå‰ã‚’変更ã™ã‚‹ã‹ã€ãƒ†ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã®SQLを編集ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: diff --git a/docs/ja/getting-started/example-datasets/noaa.md b/docs/ja/getting-started/example-datasets/noaa.md new file mode 100644 index 00000000000..e1667af8a69 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/noaa.md @@ -0,0 +1,338 @@ +--- +slug: /ja/getting-started/example-datasets/noaa +sidebar_label: NOAA グローãƒãƒ«æ°—象データãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ +sidebar_position: 1 +description: éŽåŽ»120å¹´é–“ã®æ°—候データ25å„„è¡Œ +--- + +# NOAA グローãƒãƒ«æ°—象データãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€éŽåŽ»120å¹´é–“ã®æ°—象観測データãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚å„è¡Œã¯æ™‚é–“ã¨è¦³æ¸¬æ‰€åœ°ç‚¹ã®æ¸¬å®šå€¤ã§ã™ã€‚ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã®[ç”±æ¥](https://github.com/awslabs/open-data-docs/tree/main/docs/noaa/noaa-ghcn)ã«ã‚ˆã‚‹ã¨ã€ã‚ˆã‚Šæ­£ç¢ºã«ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ã€‚ + +> GHCN-Daily ã¯ã€ä¸–ç•Œã®é™¸åŸŸã«ãŠã‘る日別観測をå«ã‚€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã™ã€‚ ãã‚Œã¯ä¸–界中ã®é™¸åœ°ã«åŸºã¥ã観測所ã‹ã‚‰ã®æ¸¬å®šã‚’å«ã¿ã€ãã®ç´„3分ã®2ãŒé™æ°´é‡æ¸¬å®šã®ã¿ã®ãŸã‚ã®ã‚‚ã®ã§ã™ (Menne et al., 2012)。 GHCN-Daily ã¯ã€æ§˜ã€…ãªã‚½ãƒ¼ã‚¹ã‹ã‚‰ã®æ°—候記録ã®åˆæˆã§ã‚ã‚Šã€ãれらã¯çµåˆã•ã‚Œã€å…±é€šã®å“質ä¿è¨¼ãƒ¬ãƒ“ューをå—ã‘ã¦ã„ã¾ã™ (Durre et al., 2010)。アーカイブã«ã¯ã€ä»¥ä¸‹ã®æ°—象è¦ç´ ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + + - 日最高気温 + - 日最低気温 + - 観測時ã®æ°—温 + - é™æ°´é‡ (例:雨ã€æº¶ã‘ãŸé›ª) + - é™é›ªé‡ + - ç©é›ªæ·± + - 利用å¯èƒ½ãªå ´åˆã€ä»–ã®è¦ç´  + +## データã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ + +- ClickHouse 用ã«[準備ã•ã‚ŒãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³](#pre-prepared-data)ã®ãƒ‡ãƒ¼ã‚¿ã§ã€ãƒ‡ãƒ¼ã‚¿ã®ã‚¯ãƒ¬ãƒ³ã‚¸ãƒ³ã‚°ã€å†æ§‹ç¯‰ã€ãŠã‚ˆã³æ‹¡å¼µã‚’è¡Œã£ã¦ã„ã¾ã™ã€‚ ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯1900å¹´ã‹ã‚‰2022å¹´ã®ã‚‚ã®ã‚’対象ã¨ã—ã¦ã„ã¾ã™ã€‚ +- [オリジナルデータをダウンロード](#original-data)ã—ã€ClickHouse ãŒå¿…è¦ã¨ã™ã‚‹å½¢å¼ã«å¤‰æ›ã—ã¾ã™ã€‚独自ã®ã‚«ãƒ©ãƒ ã‚’追加ã—ãŸã„ユーザーã¯ã“ã®æ–¹æ³•ã‚’試ã™ã¨è‰¯ã„ã§ã—ょã†ã€‚ + +### 準備ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ + +より具体的ã«ã¯ã€Noaa ã«ã‚ˆã‚‹å“質ä¿è¨¼ãƒã‚§ãƒƒã‚¯ã«ä¸åˆæ ¼ã¨ãªã£ãŸè¡Œã‚’削除ã—ã¾ã—ãŸã€‚データã¯ã¾ãŸã€1è¡Œã”ã¨ã®æ¸¬å®šã‚’観測所IDã¨æ—¥ä»˜ã”ã¨ã®è¡Œã«å†æ§‹ç¯‰ã—ã¦ã„ã¾ã™ã€‚ã¤ã¾ã‚Šã€ + +```csv +"station_id","date","tempAvg","tempMax","tempMin","precipitation","snowfall","snowDepth","percentDailySun","averageWindSpeed","maxWindSpeed","weatherType" +"AEM00041194","2022-07-30",347,0,308,0,0,0,0,0,0,0 +"AEM00041194","2022-07-31",371,413,329,0,0,0,0,0,0,0 +"AEM00041194","2022-08-01",384,427,357,0,0,0,0,0,0,0 +"AEM00041194","2022-08-02",381,424,352,0,0,0,0,0,0,0 +``` + +ã“ã‚Œã¯ã‚¯ã‚¨ãƒªãŒç°¡å˜ã§ã‚ã‚Šã€çµæžœã®ãƒ†ãƒ¼ãƒ–ルãŒã‚¹ãƒ‘ースã«ãªã‚‰ãªã„ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚最後ã«ã€ãƒ‡ãƒ¼ã‚¿ã«ã¯ç·¯åº¦ã¨çµŒåº¦ãŒè¿½åŠ ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ä»¥ä¸‹ã® S3 ロケーションã«ã‚ã‚Šã¾ã™ã€‚データをローカルファイルシステムã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—㦠(ClickHouse クライアントを使用ã—ã¦æŒ¿å…¥ã™ã‚‹)ã€ã¾ãŸã¯ClickHouseã«ç›´æŽ¥æŒ¿å…¥ã—ã¦ãã ã•ã„ ([S3ã‹ã‚‰ã®æŒ¿å…¥](#inserting-from-s3)ã‚’å‚ç…§)。 + +ダウンロード方法: + +```bash +wget https://datasets-documentation.s3.eu-west-3.amazonaws.com/noaa/noaa_enriched.parquet +``` + +### オリジナルデータ + +以下ã«ã€ClickHouseã¸ã®ãƒ­ãƒ¼ãƒ‰æº–å‚™ã®ãŸã‚ã«ã‚ªãƒªã‚¸ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ã‚’ダウンロードã—ã¦å¤‰æ›ã™ã‚‹æ‰‹é †ã‚’示ã—ã¾ã™ã€‚ + +#### ダウンロード + +オリジナルデータをダウンロードã™ã‚‹ã«ã¯: + +```bash +for i in {1900..2023}; do wget https://noaa-ghcn-pds.s3.amazonaws.com/csv.gz/${i}.csv.gz; done +``` + +#### サンプリングデータ + +```bash +$ clickhouse-local --query "SELECT * FROM '2021.csv.gz' LIMIT 10" --format PrettyCompact +┌─c1──────────┬───────c2─┬─c3───┬──c4─┬─c5───┬─c6───┬─c7─┬───c8─┠+│ AE000041196 │ 20210101 │ TMAX │ 278 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ S │ á´ºáµá´¸á´¸ │ +│ AE000041196 │ 20210101 │ PRCP │ 0 │ D │ á´ºáµá´¸á´¸ │ S │ á´ºáµá´¸á´¸ │ +│ AE000041196 │ 20210101 │ TAVG │ 214 │ H │ á´ºáµá´¸á´¸ │ S │ á´ºáµá´¸á´¸ │ +│ AEM00041194 │ 20210101 │ TMAX │ 266 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ S │ á´ºáµá´¸á´¸ │ +│ AEM00041194 │ 20210101 │ TMIN │ 178 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ S │ á´ºáµá´¸á´¸ │ +│ AEM00041194 │ 20210101 │ PRCP │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ S │ á´ºáµá´¸á´¸ │ +│ AEM00041194 │ 20210101 │ TAVG │ 217 │ H │ á´ºáµá´¸á´¸ │ S │ á´ºáµá´¸á´¸ │ +│ AEM00041217 │ 20210101 │ TMAX │ 262 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ S │ á´ºáµá´¸á´¸ │ +│ AEM00041217 │ 20210101 │ TMIN │ 155 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ S │ á´ºáµá´¸á´¸ │ +│ AEM00041217 │ 20210101 │ TAVG │ 202 │ H │ á´ºáµá´¸á´¸ │ S │ á´ºáµá´¸á´¸ │ +└─────────────┴──────────┴──────┴─────┴──────┴──────┴────┴──────┘ +``` + +[フォーマットドキュメンテーション](https://github.com/awslabs/open-data-docs/tree/main/docs/noaa/noaa-ghcn)ã®è¦ç´„ã¨ã‚«ãƒ©ãƒ ã®é †åº: + + - 11文字ã®è¦³æ¸¬æ‰€è­˜åˆ¥ã‚³ãƒ¼ãƒ‰ã€‚ã“ã‚Œã¯å®Ÿéš›ã«ã¯ã„ãã¤ã‹ã®æœ‰ç”¨ãªæƒ…報をエンコードã—ã¦ã„ã¾ã™ã€‚ + - YEAR/MONTH/DAY = YYYYMMDDフォーマットã®8文字ã®æ—¥ä»˜ï¼ˆä¾‹ï¼š19860529 = 1986å¹´5月29日) + - ELEMENT = è¦ç´ ã‚¿ã‚¤ãƒ—ã®4文字ã®ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ã€‚実際ã«ã¯æ¸¬å®šã‚¿ã‚¤ãƒ—。利用å¯èƒ½ãªå¤šãã®æ¸¬å®šãŒã‚ã‚‹ãŒã€ã“ã“ã§ã¯ä»¥ä¸‹ã®ã‚‚ã®ã‚’é¸æŠžï¼š + - PRCP - é™æ°´é‡ï¼ˆ10分ã®1mm) + - SNOW - é™é›ªé‡ï¼ˆmm) + - SNWD - ç©é›ªæ·±ï¼ˆmm) + - TMAX - 最高気温(摂æ°10分ã®1度) + - TAVG - å¹³å‡æ°—温(摂æ°10分ã®1度) + - TMIN - 最低気温(摂æ°10分ã®1度) + - PSUN - 1æ—¥ã®å¯èƒ½ãªæ—¥ç…§ã®å‰²åˆï¼ˆï¼…) + - AWND - 日平å‡é¢¨é€Ÿï¼ˆ10分ã®1メートル毎秒) + - WSFG - çªé¢¨æœ€å¤§é¢¨é€Ÿï¼ˆ10分ã®1メートル毎秒) + - WT** = 天候タイプ(**ã¯å…·ä½“çš„ãªå¤©å€™ã‚¿ã‚¤ãƒ—明義)。天候タイプã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯ã“ã¡ã‚‰ã€‚ +- DATA VALUE = ELEMENTã®5文字データ値ã€ã™ãªã‚ã¡æ¸¬å®šã®å€¤ã€‚ +- M-FLAG = 測定旗ã®1文字。10ã®å¯èƒ½æ€§ã®ã‚る値ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®å€¤ã®ã„ãã¤ã‹ã¯ç–‘ã‚ã—ã„データã®æ­£ç¢ºæ€§ã‚’示ã—ã¾ã™ã€‚PRCPã€SNOWã€ãŠã‚ˆã³SNWD測定ã®ã¿ã«é–¢é€£ã™ã‚‹ãŸã‚ã€"P"ã«è¨­å®šã•ã‚Œã¦ã„るデータをå—ã‘入れã¾ã™ã€‚ +- Q-FLAGã¯å“質ãƒã‚§ãƒƒã‚¯ã‚’通éŽã—ãŸå ´åˆã®ç©ºã®å€¤ã€‚å•é¡Œãªã通éŽã—ãŸã‚‚ã®ã®ã¿ã«èˆˆå‘³ãŒã‚ã‚Šã¾ã™ã€‚ +- S-FLAG ã¯è¦³å¯Ÿã®ã‚½ãƒ¼ã‚¹æ——。ä¸å¿…è¦ã¨ã•ã‚Œã‚‹ãŸã‚ã€ç„¡è¦–ã—ã¾ã™ã€‚ +- OBS-TIME = 4文字ã§æ™‚間を表ã—ã€æ™‚分フォーマットã§ã™ï¼ˆä¾‹ï¼š0700 = åˆå‰7時)。å¤ã„データã«ã¯é€šå¸¸å­˜åœ¨ã—ã¾ã›ã‚“。当é¢ã¯ç„¡è¦–ã—ã¾ã™ã€‚ + +1è¡Œã”ã¨ã®æ¸¬å®šã¯ClickHouseã«ãŠã„ã¦ã‚¹ãƒ‘ースãªãƒ†ãƒ¼ãƒ–ル構造をもãŸã‚‰ã—ã¾ã™ã€‚時間ã¨è¦³æ¸¬æ‰€ã”ã¨ã®è¡Œã«å¤‰æ›ã—ã€æ¸¬å®šå€¤ãŒã‚«ãƒ©ãƒ ã«ãªã‚‹ã‚ˆã†ã«å¤‰æ›ã—ã¾ã™ã€‚ã¾ãšã€`qFlag` ãŒç©ºæ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã‚’æ¡ä»¶ã«ã€å•é¡Œã®ãªã„è¡Œã«ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’制é™ã—ã¾ã™ã€‚ + +#### データã®ã‚¯ãƒ¬ãƒ³ã‚¸ãƒ³ã‚° + +[ClickHouse local](https://clickhouse.com/blog/extracting-converting-querying-local-files-with-sql-clickhouse-local)を使用ã—ã€é–¢å¿ƒã®ã‚る測定を表ã—ã€å“質è¦ä»¶ã‚’満ãŸã™è¡Œã‚’フィルタリングã§ãã¾ã™ã€‚ + +```bash +clickhouse local --query "SELECT count() +FROM file('*.csv.gz', CSV, 'station_id String, date String, measurement String, value Int64, mFlag String, qFlag String, sFlag String, obsTime String') WHERE qFlag = '' AND (measurement IN ('PRCP', 'SNOW', 'SNWD', 'TMAX', 'TAVG', 'TMIN', 'PSUN', 'AWND', 'WSFG') OR startsWith(measurement, 'WT'))" + +2679264563 +``` + +26億行以上を超ãˆã‚‹ãŸã‚ã€ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’解æžã™ã‚‹ã®ã§é«˜é€Ÿã§ã¯ã‚ã‚Šã¾ã›ã‚“。ç§ãŸã¡ã®8コアマシンã§ç´„160秒ã‹ã‹ã‚Šã¾ã™ã€‚ + +### データã®ãƒ”ボット + +1行当ãŸã‚Šã®æ¸¬å®šæ§‹é€ ã¯ClickHouseã§ä½¿ç”¨å¯èƒ½ã§ã™ãŒã€ä»Šå¾Œã®ã‚¯ã‚¨ãƒªã‚’ä¸å¿…è¦ã«è¤‡é›‘化ã—ã¾ã™ã€‚観測所IDã¨æ—¥ä»˜ã”ã¨ã®è¡Œã§ã€å„測定タイプã¨ãã®é–¢é€£ã™ã‚‹å€¤ãŒã‚«ãƒ©ãƒ ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```csv +"station_id","date","tempAvg","tempMax","tempMin","precipitation","snowfall","snowDepth","percentDailySun","averageWindSpeed","maxWindSpeed","weatherType" +"AEM00041194","2022-07-30",347,0,308,0,0,0,0,0,0,0 +"AEM00041194","2022-07-31",371,413,329,0,0,0,0,0,0,0 +"AEM00041194","2022-08-01",384,427,357,0,0,0,0,0,0,0 +"AEM00041194","2022-08-02",381,424,352,0,0,0,0,0,0,0 +``` + +ClickHouse local ã¨ã‚·ãƒ³ãƒ—ル㪠`GROUP BY` を使ã£ã¦ã€ã“ã®æ§‹é€ ã«ãƒ‡ãƒ¼ã‚¿ã‚’å†ãƒ”ボットã§ãã¾ã™ã€‚メモリã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’制é™ã™ã‚‹ãŸã‚ã€1ファイルãšã¤ã“れを行ã„ã¾ã™ã€‚ + +```bash +for i in {1900..2022} +do +clickhouse-local --query "SELECT station_id, + toDate32(date) as date, + anyIf(value, measurement = 'TAVG') as tempAvg, + anyIf(value, measurement = 'TMAX') as tempMax, + anyIf(value, measurement = 'TMIN') as tempMin, + anyIf(value, measurement = 'PRCP') as precipitation, + anyIf(value, measurement = 'SNOW') as snowfall, + anyIf(value, measurement = 'SNWD') as snowDepth, + anyIf(value, measurement = 'PSUN') as percentDailySun, + anyIf(value, measurement = 'AWND') as averageWindSpeed, + anyIf(value, measurement = 'WSFG') as maxWindSpeed, + toUInt8OrZero(replaceOne(anyIf(measurement, startsWith(measurement, 'WT') AND value = 1), 'WT', '')) as weatherType +FROM file('$i.csv.gz', CSV, 'station_id String, date String, measurement String, value Int64, mFlag String, qFlag String, sFlag String, obsTime String') + WHERE qFlag = '' AND (measurement IN ('PRCP', 'SNOW', 'SNWD', 'TMAX', 'TAVG', 'TMIN', 'PSUN', 'AWND', 'WSFG') OR startsWith(measurement, 'WT')) +GROUP BY station_id, date +ORDER BY station_id, date FORMAT CSV" >> "noaa.csv"; +done +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯1ã¤ã®50GBファイル `noaa.csv` を生æˆã—ã¾ã™ã€‚ + +### データã®æ‹¡å¼µ + +データã«ã¯å ´æ‰€ã‚’示ã™ã‚‚ã®ãŒè¦³æ¸¬æ‰€IDã—ã‹ãªã„ãŒã€ã“ã®IDã«ã¯å›½ã‚³ãƒ¼ãƒ‰ã®ãƒ—レフィックスãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ç†æƒ³çš„ã«ã¯ã€å„観測所ã«ç·¯åº¦ã¨çµŒåº¦ã‚’関連付ã‘ã‚‹ã¹ãã§ã™ã€‚ã“れを実ç¾ã™ã‚‹ãŸã‚ã«ã€NOAAã¯ä¾¿åˆ©ã«å„観測所ã®è©³ç´°ã‚’別ã®[ghcnd-stations.txt](https://github.com/awslabs/open-data-docs/tree/main/docs/noaa/noaa-ghcn#format-of-ghcnd-stationstxt-file)ã¨ã—ã¦æä¾›ã—ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯ã„ãã¤ã‹ã®ã‚«ãƒ©ãƒ ãŒã‚ã‚Šã¾ã™ãŒã€ç§ãŸã¡ã®åˆ†æžã«å½¹ç«‹ã¤ã®ã¯5ã¤ã€idã€ç·¯åº¦ã€çµŒåº¦ã€é«˜åº¦ã€ãŠã‚ˆã³åå‰ã§ã™ã€‚ + +```bash +wget http://noaa-ghcn-pds.s3.amazonaws.com/ghcnd-stations.txt +``` + +```bash +clickhouse local --query "WITH stations AS (SELECT id, lat, lon, elevation, splitByString(' GSN ',name)[1] as name FROM file('ghcnd-stations.txt', Regexp, 'id String, lat Float64, lon Float64, elevation Float32, name String')) +SELECT station_id, + date, + tempAvg, + tempMax, + tempMin, + precipitation, + snowfall, + snowDepth, + percentDailySun, + averageWindSpeed, + maxWindSpeed, + weatherType, + tuple(lon, lat) as location, + elevation, + name +FROM file('noaa.csv', CSV, + 'station_id String, date Date32, tempAvg Int32, tempMax Int32, tempMin Int32, precipitation Int32, snowfall Int32, snowDepth Int32, percentDailySun Int8, averageWindSpeed Int32, maxWindSpeed Int32, weatherType UInt8') as noaa LEFT OUTER + JOIN stations ON noaa.station_id = stations.id INTO OUTFILE 'noaa_enriched.parquet' FORMAT Parquet SETTINGS format_regexp='^(.{11})\s+(\-?\d{1,2}\.\d{4})\s+(\-?\d{1,3}\.\d{1,4})\s+(\-?\d*\.\d*)\s+(.*)\s+(?:[\d]*)'" +``` +ã“ã®ã‚¯ã‚¨ãƒªã¯æ•°åˆ†ã‹ã‹ã‚Šã€6.4GBã®ãƒ•ã‚¡ã‚¤ãƒ« `noaa_enriched.parquet` を生æˆã—ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ + +ClickHouseã§MergeTreeテーブルを作æˆã—ã¾ã™ (ClickHouseクライアントã‹ã‚‰)。 + +```sql +CREATE TABLE noaa +( + `station_id` LowCardinality(String), + `date` Date32, + `tempAvg` Int32 COMMENT 'å¹³å‡æ°—温(摂æ°10分ã®1度)', + `tempMax` Int32 COMMENT '最高気温(摂æ°10分ã®1度)', + `tempMin` Int32 COMMENT '最低気温(摂æ°10分ã®1度)', + `precipitation` UInt32 COMMENT 'é™æ°´é‡ï¼ˆ10分ã®1mm)', + `snowfall` UInt32 COMMENT 'é™é›ªé‡ï¼ˆmm)', + `snowDepth` UInt32 COMMENT 'ç©é›ªæ·±ï¼ˆmm)', + `percentDailySun` UInt8 COMMENT '1æ—¥ã®å¯èƒ½ãªæ—¥ç…§ã®å‰²åˆï¼ˆï¼…)', + `averageWindSpeed` UInt32 COMMENT '日平å‡é¢¨é€Ÿï¼ˆ10分ã®1メートル毎秒)', + `maxWindSpeed` UInt32 COMMENT 'çªé¢¨æœ€å¤§é¢¨é€Ÿï¼ˆ10分ã®1メートル毎秒)', + `weatherType` Enum8('Normal' = 0, 'Fog' = 1, 'Heavy Fog' = 2, 'Thunder' = 3, 'Small Hail' = 4, 'Hail' = 5, 'Glaze' = 6, 'Dust/Ash' = 7, 'Smoke/Haze' = 8, 'Blowing/Drifting Snow' = 9, 'Tornado' = 10, 'High Winds' = 11, 'Blowing Spray' = 12, 'Mist' = 13, 'Drizzle' = 14, 'Freezing Drizzle' = 15, 'Rain' = 16, 'Freezing Rain' = 17, 'Snow' = 18, 'Unknown Precipitation' = 19, 'Ground Fog' = 21, 'Freezing Fog' = 22), + `location` Point, + `elevation` Float32, + `name` LowCardinality(String) +) ENGINE = MergeTree() ORDER BY (station_id, date); + +``` + +## ClickHouseã¸ã®æŒ¿å…¥ + +### ローカルファイルã‹ã‚‰ã®æŒ¿å…¥ + +ローカルファイルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ã—ã¾ã™ï¼ˆClickHouseクライアントã‹ã‚‰ï¼‰ï¼š + +```sql +INSERT INTO noaa FROM INFILE '/noaa_enriched.parquet' +``` + +ã“ã“㧠`` ã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ•ãƒ«ãƒ‘スã§ã™ã€‚ + +ã“ã®ãƒ­ãƒ¼ãƒ‰ã®é€Ÿåº¦ã‚’å‘上ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](https://clickhouse.com/blog/real-world-data-noaa-climate-data#load-the-data)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### S3ã‹ã‚‰ã®æŒ¿å…¥ + +```sql +INSERT INTO noaa SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/noaa/noaa_enriched.parquet') +``` + +ã“れを高速化ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€å¤§é‡ãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ã®ãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚°ã«é–¢ã™ã‚‹[ブログ投稿](https://clickhouse.com/blog/supercharge-your-clickhouse-data-loads-part2)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## サンプルクエリ + +### ã“ã‚Œã¾ã§ã®æœ€é«˜æ°—温 + +```sql +SELECT + tempMax / 10 AS maxTemp, + location, + name, + date +FROM blogs.noaa +WHERE tempMax > 500 +ORDER BY + tempMax DESC, + date ASC +LIMIT 5 + +┌─maxTemp─┬─location──────────┬─name───────────────────────────────────────────┬───────date─┠+│ 56.7 │ (-116.8667,36.45) │ CA GREENLAND RCH │ 1913-07-10 │ +│ 56.7 │ (-115.4667,32.55) │ MEXICALI (SMN) │ 1949-08-20 │ +│ 56.7 │ (-115.4667,32.55) │ MEXICALI (SMN) │ 1949-09-18 │ +│ 56.7 │ (-115.4667,32.55) │ MEXICALI (SMN) │ 1952-07-17 │ +│ 56.7 │ (-115.4667,32.55) │ MEXICALI (SMN) │ 1952-09-04 │ +└─────────┴───────────────────┴────────────────────────────────────────────────┴────────────┘ + +5 rows in set. Elapsed: 0.514 sec. Processed 1.06 billion rows, 4.27 GB (2.06 billion rows/s., 8.29 GB/s.) +``` + +[記録ã®æ–‡æ›¸](https://en.wikipedia.org/wiki/List_of_weather_records#Highest_temperatures_ever_recorded)ã•ã‚Œã¦ã„ã‚‹[Furnace Creek](https://www.google.com/maps/place/36%C2%B027'00.0%22N+116%C2%B052'00.1%22W/@36.1329666,-116.1104099,8.95z/data=!4m5!3m4!1s0x0:0xf2ed901b860f4446!8m2!3d36.45!4d-116.8667)ã¨2023å¹´ã®çŠ¶æ…‹ã¨ã—ã¦çŸ›ç›¾ãªã一致ã—ã¦ã„ã¾ã™ã€‚ + +### ベストスキーリゾート + +屋内雪ã®å°‘ãªã„[スキーリゾートã®ãƒªã‚¹ãƒˆ](https://gist.githubusercontent.com/gingerwizard/dd022f754fd128fdaf270e58fa052e35/raw/622e03c37460f17ef72907afe554cb1c07f91f23/ski_resort_stats.csv)を利用ã—ã€ãã‚Œã¨éŽåŽ»5å¹´é–“ã®é›ªã®å¤šã„上ä½1000気象å°ã‚’çµã³ã¤ã‘ã¾ã™ã€‚ã“ã®çµã³ã¤ã‘ã‚’[geoDistance](https://clickhouse.com/docs/ja/sql-reference/functions/geo/coordinates/#geodistance)ã§ã‚½ãƒ¼ãƒˆã—ã€çµæžœã‚’è·é›¢ãŒ20km未満ã®ã‚‚ã®ã«çµžã‚Šè¾¼ã¿ã€å„リゾートã®ä¸Šä½çµæžœã‚’é¸ã³ã€ç·é›ªé‡ã§ã‚½ãƒ¼ãƒˆã—ã¾ã™ã€‚ã¾ãŸã€é«˜åº¦ãŒ1800m以上ã®ãƒªã‚¾ãƒ¼ãƒˆã«åˆ¶é™ã‚’設ã‘ã¦ã€å„ªã‚ŒãŸã‚¹ã‚­ãƒ¼æ¡ä»¶ã®åºƒç¯„ãªæŒ‡æ¨™ã‚’示ã—ã¾ã™ã€‚ + +```sql +SELECT + resort_name, + total_snow / 1000 AS total_snow_m, + resort_location, + month_year +FROM +( + WITH resorts AS + ( + SELECT + resort_name, + state, + (lon, lat) AS resort_location, + 'US' AS code + FROM url('https://gist.githubusercontent.com/gingerwizard/dd022f754fd128fdaf270e58fa052e35/raw/622e03c37460f17ef72907afe554cb1c07f91f23/ski_resort_stats.csv', CSVWithNames) + ) + SELECT + resort_name, + highest_snow.station_id, + geoDistance(resort_location.1, resort_location.2, station_location.1, station_location.2) / 1000 AS distance_km, + highest_snow.total_snow, + resort_location, + station_location, + month_year + FROM + ( + SELECT + sum(snowfall) AS total_snow, + station_id, + any(location) AS station_location, + month_year, + substring(station_id, 1, 2) AS code + FROM noaa + WHERE (date > '2017-01-01') AND (code = 'US') AND (elevation > 1800) + GROUP BY + station_id, + toYYYYMM(date) AS month_year + ORDER BY total_snow DESC + LIMIT 1000 + ) AS highest_snow + INNER JOIN resorts ON highest_snow.code = resorts.code + WHERE distance_km < 20 + ORDER BY + resort_name ASC, + total_snow DESC + LIMIT 1 BY + resort_name, + station_id +) +ORDER BY total_snow DESC +LIMIT 5 + +┌─resort_name──────────┬─total_snow_m─┬─resort_location─┬─month_year─┠+│ Sugar Bowl, CA │ 7.799 │ (-120.3,39.27) │ 201902 │ +│ Donner Ski Ranch, CA │ 7.799 │ (-120.34,39.31) │ 201902 │ +│ Boreal, CA │ 7.799 │ (-120.35,39.33) │ 201902 │ +│ Homewood, CA │ 4.926 │ (-120.17,39.08) │ 201902 │ +│ Alpine Meadows, CA │ 4.926 │ (-120.22,39.17) │ 201902 │ +└──────────────────────┴──────────────┴─────────────────┴────────────┘ + +5 rows in set. Elapsed: 0.750 sec. Processed 689.10 million rows, 3.20 GB (918.20 million rows/s., 4.26 GB/s.) +Peak memory usage: 67.66 MiB. +``` + +## è¬è¾ž + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’準備ã—ã€ã‚¯ãƒ¬ãƒ³ã‚¸ãƒ³ã‚°ã—ã€é…布ã™ã‚‹åŠªåŠ›ã‚’ã—ã¦ããŸã‚°ãƒ­ãƒ¼ãƒãƒ«æ°—象データãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®æ–¹ã€…ã«æ„Ÿè¬ã„ãŸã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã€æ„Ÿè¬ã—ã¦ãŠã‚Šã¾ã™ã€‚ + +Menne, M.J., I. Durre, B. Korzeniewski, S. McNeal, K. Thomas, X. Yin, S. Anthony, R. Ray, R.S. Vose, B.E.Gleason, and T.G. Houston, 2012: Global Historical Climatology Network - Daily (GHCN-Daily), Version 3. [使用ã—ãŸã‚µãƒ–セットã®æŒ‡ç¤ºã€ä¾‹ï¼šVersion 3.25]。NOAA National Centers for Environmental Information http://doi.org/10.7289/V5D21VHZ [17/08/2020] diff --git a/docs/ja/getting-started/example-datasets/nyc-taxi.md b/docs/ja/getting-started/example-datasets/nyc-taxi.md new file mode 100644 index 00000000000..a85e0677265 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/nyc-taxi.md @@ -0,0 +1,356 @@ +--- +slug: /ja/getting-started/example-datasets/nyc-taxi +sidebar_label: New York Taxi Data +sidebar_position: 2 +description: 2009年以é™ã«ãƒ‹ãƒ¥ãƒ¼ãƒ¨ãƒ¼ã‚¯å¸‚ã‹ã‚‰å‡ºç™ºã™ã‚‹æ•°å億回ã®ã‚¿ã‚¯ã‚·ãƒ¼ã¨ãƒã‚¤ãƒ¤ãƒ¼è»Šä¸¡ (Uber, Lyftãªã©) ã®ãƒ‡ãƒ¼ã‚¿ +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# New York Taxi Data + +ニューヨークã®ã‚¿ã‚¯ã‚·ãƒ¼ãƒ‡ãƒ¼ã‚¿ã¯ã€2009年以é™ã«ãƒ‹ãƒ¥ãƒ¼ãƒ¨ãƒ¼ã‚¯å¸‚ã‹ã‚‰å‡ºç™ºã™ã‚‹3億回以上ã®ã‚¿ã‚¯ã‚·ãƒ¼ã¨ãƒã‚¤ãƒ¤ãƒ¼è»Šä¸¡ (Uber, Lyftãªã©) ã®ãƒ‡ãƒ¼ã‚¿ã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ä»¥ä¸‹ã®æ–¹æ³•ã§å…¥æ‰‹å¯èƒ½ã§ã™ï¼š + +- データをS3ã¾ãŸã¯GCSã‹ã‚‰ç›´æŽ¥ClickHouse Cloudã«æŒ¿å…¥ +- 準備済ã¿ã®ãƒ‘ーティションをダウンロード + +## テーブルtripsを作æˆã™ã‚‹ + +ã¾ãšã€ã‚¿ã‚¯ã‚·ãƒ¼ä¹—車用ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +```sql +CREATE TABLE trips ( + trip_id UInt32, + pickup_datetime DateTime, + dropoff_datetime DateTime, + pickup_longitude Nullable(Float64), + pickup_latitude Nullable(Float64), + dropoff_longitude Nullable(Float64), + dropoff_latitude Nullable(Float64), + passenger_count UInt8, + trip_distance Float32, + fare_amount Float32, + extra Float32, + tip_amount Float32, + tolls_amount Float32, + total_amount Float32, + payment_type Enum('CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4, 'UNK' = 5), + pickup_ntaname LowCardinality(String), + dropoff_ntaname LowCardinality(String) +) +ENGINE = MergeTree +PRIMARY KEY (pickup_datetime, dropoff_datetime); +``` + +## オブジェクトストレージã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’直接ロード + +データã«æ…£ã‚Œã‚‹ãŸã‚ã«ã€å°ã•ãªã‚µãƒ–セットをå–ã‚Šè¾¼ã¿ã¾ã—ょã†ã€‚データã¯ã‚ªãƒ–ジェクトストレージã®TSVファイルã«ã‚ã‚Šã€`s3`テーブル関数を使用ã—ã¦ClickHouse Cloudã«ç°¡å˜ã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã§ãã¾ã™ã€‚ + +åŒã˜ãƒ‡ãƒ¼ã‚¿ãŒS3ã¨GCSã®ä¸¡æ–¹ã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã®ã§ã€ã„ãšã‚Œã‹ã®ã‚¿ãƒ–ã‚’é¸æŠžã—ã¦ãã ã•ã„。 + + + + +以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€GCSãƒã‚±ãƒƒãƒˆã‹ã‚‰3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’`trips`テーブルã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã—ã¾ã™ï¼ˆ`{0..2}`構文ã¯0ã€1ã€ãŠã‚ˆã³2ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã§ã™ï¼‰ï¼š + +```sql +INSERT INTO trips +SELECT + trip_id, + pickup_datetime, + dropoff_datetime, + pickup_longitude, + pickup_latitude, + dropoff_longitude, + dropoff_latitude, + passenger_count, + trip_distance, + fare_amount, + extra, + tip_amount, + tolls_amount, + total_amount, + payment_type, + pickup_ntaname, + dropoff_ntaname +FROM gcs( + 'https://storage.googleapis.com/clickhouse-public-datasets/nyc-taxi/trips_{0..2}.gz', + 'TabSeparatedWithNames' +); +``` + + + + +以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€S3ãƒã‚±ãƒƒãƒˆã‹ã‚‰3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’`trips`テーブルã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã—ã¾ã™ï¼ˆ`{0..2}`構文ã¯0ã€1ã€ãŠã‚ˆã³2ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã§ã™ï¼‰ï¼š + +```sql +INSERT INTO trips +SELECT + trip_id, + pickup_datetime, + dropoff_datetime, + pickup_longitude, + pickup_latitude, + dropoff_longitude, + dropoff_latitude, + passenger_count, + trip_distance, + fare_amount, + extra, + tip_amount, + tolls_amount, + total_amount, + payment_type, + pickup_ntaname, + dropoff_ntaname +FROM s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_{0..2}.gz', + 'TabSeparatedWithNames' +); +``` + + + + +## サンプルクエリ + +挿入ã•ã‚ŒãŸè¡Œæ•°ã‚’確èªã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT count() +FROM trips; +``` + +å„TSVファイルã«ã¯ç´„100万行ã‚ã‚Šã€3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã§3,000,317è¡Œã«ãªã‚Šã¾ã™ã€‚ã„ãã¤ã‹ã®è¡Œã‚’見ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT * +FROM trips +LIMIT 10; +``` + +ピックアップãŠã‚ˆã³ãƒ‰ãƒ­ãƒƒãƒ—オフã®æ—¥ä»˜ã€åœ°ç†åº§æ¨™ã€æ–™é‡‘ã®è©³ç´°ã€ãƒ‹ãƒ¥ãƒ¼ãƒ¨ãƒ¼ã‚¯ã®åœ°åŒºãªã©ã®ã‚«ãƒ©ãƒ ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„: + +```response +┌────trip_id─┬─────pickup_datetime─┬────dropoff_datetime─┬───pickup_longitude─┬────pickup_latitude─┬──dropoff_longitude─┬───dropoff_latitude─┬─passenger_count─┬─trip_distance─┬─fare_amount─┬─extra─┬─tip_amount─┬─tolls_amount─┬─total_amount─┬─payment_type─┬─pickup_ntaname─────────────────────────────┬─dropoff_ntaname────────────────────────────┠+│ 1200864931 │ 2015-07-01 00:00:13 │ 2015-07-01 00:14:41 │ -73.99046325683594 │ 40.746116638183594 │ -73.97918701171875 │ 40.78467559814453 │ 5 │ 3.54 │ 13.5 │ 0.5 │ 1 │ 0 │ 15.8 │ CSH │ Midtown-Midtown South │ Upper West Side │ +│ 1200018648 │ 2015-07-01 00:00:16 │ 2015-07-01 00:02:57 │ -73.78358459472656 │ 40.648677825927734 │ -73.80242919921875 │ 40.64767837524414 │ 1 │ 1.45 │ 6 │ 0.5 │ 0 │ 0 │ 7.3 │ CRE │ Airport │ Airport │ +│ 1201452450 │ 2015-07-01 00:00:20 │ 2015-07-01 00:11:07 │ -73.98579406738281 │ 40.72777557373047 │ -74.00482177734375 │ 40.73748779296875 │ 5 │ 1.56 │ 8.5 │ 0.5 │ 1.96 │ 0 │ 11.76 │ CSH │ East Village │ West Village │ +│ 1202368372 │ 2015-07-01 00:00:40 │ 2015-07-01 00:05:46 │ -74.00206756591797 │ 40.73833084106445 │ -74.00658416748047 │ 40.74875259399414 │ 2 │ 1 │ 6 │ 0.5 │ 0 │ 0 │ 7.3 │ CRE │ West Village │ Hudson Yards-Chelsea-Flatiron-Union Square │ +│ 1200831168 │ 2015-07-01 00:01:06 │ 2015-07-01 00:09:23 │ -73.98748016357422 │ 40.74344253540039 │ -74.00575256347656 │ 40.716793060302734 │ 1 │ 2.3 │ 9 │ 0.5 │ 2 │ 0 │ 12.3 │ CSH │ Hudson Yards-Chelsea-Flatiron-Union Square │ SoHo-TriBeCa-Civic Center-Little Italy │ +│ 1201362116 │ 2015-07-01 00:01:07 │ 2015-07-01 00:03:31 │ -73.9926986694336 │ 40.75826644897461 │ -73.98628997802734 │ 40.76075744628906 │ 1 │ 0.6 │ 4 │ 0.5 │ 0 │ 0 │ 5.3 │ CRE │ Clinton │ Midtown-Midtown South │ +│ 1200639419 │ 2015-07-01 00:01:13 │ 2015-07-01 00:03:56 │ -74.00382995605469 │ 40.741981506347656 │ -73.99711608886719 │ 40.742271423339844 │ 1 │ 0.49 │ 4 │ 0.5 │ 0 │ 0 │ 5.3 │ CRE │ Hudson Yards-Chelsea-Flatiron-Union Square │ Hudson Yards-Chelsea-Flatiron-Union Square │ +│ 1201181622 │ 2015-07-01 00:01:17 │ 2015-07-01 00:05:12 │ -73.9512710571289 │ 40.78261947631836 │ -73.95230865478516 │ 40.77476119995117 │ 4 │ 0.97 │ 5 │ 0.5 │ 1 │ 0 │ 7.3 │ CSH │ Upper East Side-Carnegie Hill │ Yorkville │ +│ 1200978273 │ 2015-07-01 00:01:28 │ 2015-07-01 00:09:46 │ -74.00822448730469 │ 40.72113037109375 │ -74.00422668457031 │ 40.70782470703125 │ 1 │ 1.71 │ 8.5 │ 0.5 │ 1.96 │ 0 │ 11.76 │ CSH │ SoHo-TriBeCa-Civic Center-Little Italy │ Battery Park City-Lower Manhattan │ +│ 1203283366 │ 2015-07-01 00:01:47 │ 2015-07-01 00:24:26 │ -73.98199462890625 │ 40.77289962768555 │ -73.91968536376953 │ 40.766082763671875 │ 3 │ 5.26 │ 19.5 │ 0.5 │ 5.2 │ 0 │ 26 │ CSH │ Lincoln Square │ Astoria │ +└────────────┴─────────────────────┴─────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴─────────────────┴───────────────┴─────────────┴───────┴────────────┴──────────────┴──────────────┴──────────────┴────────────────────────────────────────────┴────────────────────────────────────────────┘ +``` + +ã„ãã¤ã‹ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¦ã¿ã¾ã—ょã†ã€‚ã¾ãšã€ãƒ”ックアップãŒæœ€ã‚‚é »ç¹ã«è¡Œã‚れる上ä½10ã®åœ°åŒºã‚’表示ã—ã¾ã™ï¼š + +``` sql +SELECT + pickup_ntaname, + count(*) AS count +FROM trips +GROUP BY pickup_ntaname +ORDER BY count DESC +LIMIT 10; +``` + +çµæžœã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +```response +┌─pickup_ntaname─────────────────────────────┬──count─┠+│ Midtown-Midtown South │ 526864 │ +│ Hudson Yards-Chelsea-Flatiron-Union Square │ 288797 │ +│ West Village │ 210436 │ +│ Turtle Bay-East Midtown │ 197111 │ +│ Upper East Side-Carnegie Hill │ 184327 │ +│ Airport │ 151343 │ +│ SoHo-TriBeCa-Civic Center-Little Italy │ 144967 │ +│ Murray Hill-Kips Bay │ 138599 │ +│ Upper West Side │ 135469 │ +│ Clinton │ 130002 │ +└────────────────────────────────────────────┴────────┘ +``` + +次ã®ã‚¯ã‚¨ãƒªã¯ã€ä¹—客数ã«åŸºã¥ãå¹³å‡é‹è³ƒã‚’示ã—ã¾ã™ï¼š + +``` sql +SELECT + passenger_count, + avg(total_amount) +FROM trips +GROUP BY passenger_count; +``` + +```response +┌─passenger_count─┬──avg(total_amount)─┠+│ 0 │ 25.226335263065018 │ +│ 1 │ 15.961279340656672 │ +│ 2 │ 17.146174183960667 │ +│ 3 │ 17.65380033178517 │ +│ 4 │ 17.248804201047456 │ +│ 5 │ 16.353501285179135 │ +│ 6 │ 15.995094439202836 │ +│ 7 │ 62.077143805367605 │ +│ 8 │ 26.120000791549682 │ +│ 9 │ 10.300000190734863 │ +└─────────────────┴────────────────────┘ +``` + +次ã¯ã€ä¹—客数ã¨æ—…è¡Œè·é›¢ã®ç›¸é–¢é–¢ä¿‚ã§ã™ï¼š + +``` sql +SELECT + passenger_count, + toYear(pickup_datetime) AS year, + round(trip_distance) AS distance, + count(*) +FROM trips +GROUP BY passenger_count, year, distance +ORDER BY year, count(*) DESC; +``` + +çµæžœã®æœ€åˆã®éƒ¨åˆ†ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +```response +┌─passenger_count─┬─year─┬─distance─┬─count()─┠+│ 1 │ 2015 │ 1 │ 748644 │ +│ 1 │ 2015 │ 2 │ 521602 │ +│ 1 │ 2015 │ 3 │ 225077 │ +│ 2 │ 2015 │ 1 │ 144990 │ +│ 1 │ 2015 │ 4 │ 134782 │ +│ 1 │ 2015 │ 0 │ 127284 │ +│ 2 │ 2015 │ 2 │ 106411 │ +│ 1 │ 2015 │ 5 │ 72725 │ +│ 5 │ 2015 │ 1 │ 59343 │ +│ 1 │ 2015 │ 6 │ 53447 │ +│ 2 │ 2015 │ 3 │ 48019 │ +│ 3 │ 2015 │ 1 │ 44865 │ +│ 6 │ 2015 │ 1 │ 39409 │ +``` + +## 準備済ã¿ãƒ‘ーティションã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ {#download-of-prepared-partitions} + +:::note +以下ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ã€å…ƒã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«é–¢ã™ã‚‹æƒ…å ±ã¨ã€æº–備済ã¿ãƒ‘ーティションをセルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseサーãƒãƒ¼ç’°å¢ƒã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ +::: + +データセットã®èª¬æ˜Žã¨ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰æ‰‹é †ã«ã¤ã„ã¦ã¯ã€https://github.com/toddwschneider/nyc-taxi-data ãŠã‚ˆã³ http://tech.marksblogg.com/billion-nyc-taxi-rides-redshift.html ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ダウンロードã™ã‚‹ã¨ã€CSVファイルã§ç´„227GBã®æœªåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã«ãªã‚Šã¾ã™ã€‚1 Gbit接続ã§ç´„1時間ã‹ã‹ã‚Šã¾ã™ï¼ˆs3.amazonaws.comã‹ã‚‰ã®ä¸¦åˆ—ダウンロードã«ã‚ˆã‚Šã€å°‘ãªãã¨ã‚‚1 Gbitãƒãƒ£ãƒ³ãƒãƒ«ã®åŠåˆ†ãŒå›žå¾©ã•ã‚Œã¾ã™ï¼‰ã€‚ +一部ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯å®Œå…¨ã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œãªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ファイルサイズを確èªã—ã€å•é¡ŒãŒã‚ã‚‹ã¨æ€ã‚れるもã®ã‚’å†ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ãã ã•ã„。 + +``` bash +$ curl -O https://datasets.clickhouse.com/trips_mergetree/partitions/trips_mergetree.tar +# Checksumã‚’ç¢ºèª +$ md5sum trips_mergetree.tar +# Checksumã¯æ¬¡ã¨ç­‰ã—ã„ã¯ãšã§ã™: f3b8d469b41d9a82da064ded7245d12c +$ tar xvf trips_mergetree.tar -C /var/lib/clickhouse # ClickHouseã®ãƒ‡ãƒ¼ã‚¿ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¸ã®ãƒ‘ス +$ # 解å‡ã—ãŸãƒ‡ãƒ¼ã‚¿ã®æ¨©é™ã‚’確èªã—ã€å¿…è¦ã«å¿œã˜ã¦ä¿®æ­£ +$ sudo service clickhouse-server restart +$ clickhouse-client --query "select count(*) from datasets.trips_mergetree" +``` + +:::info +以下ã«è¨˜è¼‰ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹å ´åˆã€ãƒ•ãƒ«ãƒ†ãƒ¼ãƒ–ルå`datasets.trips_mergetree`を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## シングルサーãƒãƒ¼ã§ã®çµæžœ {#results-on-single-server} + +Q1: + +``` sql +SELECT cab_type, count(*) FROM trips_mergetree GROUP BY cab_type; +``` + +0.490秒。 + +Q2: + +``` sql +SELECT passenger_count, avg(total_amount) FROM trips_mergetree GROUP BY passenger_count; +``` + +1.224秒。 + +Q3: + +``` sql +SELECT passenger_count, toYear(pickup_date) AS year, count(*) FROM trips_mergetree GROUP BY passenger_count, year; +``` + +2.104秒。 + +Q4: + +``` sql +SELECT passenger_count, toYear(pickup_date) AS year, round(trip_distance) AS distance, count(*) +FROM trips_mergetree +GROUP BY passenger_count, year, distance +ORDER BY year, count(*) DESC; +``` + +3.593秒。 + +使用ã—ãŸã‚µãƒ¼ãƒãƒ¼ï¼š + +2ã¤ã®Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHzã€åˆè¨ˆ16物ç†ã‚³ã‚¢ã€128 GiB RAMã€8x6 TB HD on hardware RAID-5 + +実行時間ã¯3回ã®ãƒ©ãƒ³ã®ä¸­ã§æœ€ã‚‚短ã„ã‚‚ã®ã§ã™ã€‚ã—ã‹ã—ã€2回目以é™ã®ãƒ©ãƒ³ã‹ã‚‰ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ã“れ以上ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ç™ºç”Ÿã—ã¾ã›ã‚“:データã¯å„ランã§èª­ã¿è¾¼ã¾ã‚Œå‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +3å°ã®ã‚µãƒ¼ãƒãƒ¼ã§ãƒ†ãƒ¼ãƒ–ルを作æˆï¼š + +å„サーãƒãƒ¼ã§ï¼š + +``` sql +CREATE TABLE default.trips_mergetree_third ( trip_id UInt32, vendor_id Enum8('1' = 1, '2' = 2, 'CMT' = 3, 'VTS' = 4, 'DDS' = 5, 'B02512' = 10, 'B02598' = 11, 'B02617' = 12, 'B02682' = 13, 'B02764' = 14), pickup_date Date, pickup_datetime DateTime, dropoff_date Date, dropoff_datetime DateTime, store_and_fwd_flag UInt8, rate_code_id UInt8, pickup_longitude Float64, pickup_latitude Float64, dropoff_longitude Float64, dropoff_latitude Float64, passenger_count UInt8, trip_distance Float64, fare_amount Float32, extra Float32, mta_tax Float32, tip_amount Float32, tolls_amount Float32, ehail_fee Float32, improvement_surcharge Float32, total_amount Float32, payment_type_ Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4), trip_type UInt8, pickup FixedString(25), dropoff FixedString(25), cab_type Enum8('yellow' = 1, 'green' = 2, 'uber' = 3), pickup_nyct2010_gid UInt8, pickup_ctlabel Float32, pickup_borocode UInt8, pickup_boroname Enum8('' = 0, 'Manhattan' = 1, 'Bronx' = 2, 'Brooklyn' = 3, 'Queens' = 4, 'Staten Island' = 5), pickup_ct2010 FixedString(6), pickup_boroct2010 FixedString(7), pickup_cdeligibil Enum8(' ' = 0, 'E' = 1, 'I' = 2), pickup_ntacode FixedString(4), pickup_ntaname Enum16('' = 0, 'Airport' = 1, 'Allerton-Pelham Gardens' = 2, 'Annadale-Huguenot-Prince\'s Bay-Eltingville' = 3, 'Arden Heights' = 4, 'Astoria' = 5, 'Auburndale' = 6, 'Baisley Park' = 7, 'Bath Beach' = 8, 'Battery Park City-Lower Manhattan' = 9, 'Bay Ridge' = 10, 'Bayside-Bayside Hills' = 11, 'Bedford' = 12, 'Bedford Park-Fordham North' = 13, 'Bellerose' = 14, 'Belmont' = 15, 'Bensonhurst East' = 16, 'Bensonhurst West' = 17, 'Borough Park' = 18, 'Breezy Point-Belle Harbor-Rockaway Park-Broad Channel' = 19, 'Briarwood-Jamaica Hills' = 20, 'Brighton Beach' = 21, 'Bronxdale' = 22, 'Brooklyn Heights-Cobble Hill' = 23, 'Brownsville' = 24, 'Bushwick North' = 25, 'Bushwick South' = 26, 'Cambria Heights' = 27, 'Canarsie' = 28, 'Carroll Gardens-Columbia Street-Red Hook' = 29, 'Central Harlem North-Polo Grounds' = 30, 'Central Harlem South' = 31, 'Charleston-Richmond Valley-Tottenville' = 32, 'Chinatown' = 33, 'Claremont-Bathgate' = 34, 'Clinton' = 35, 'Clinton Hill' = 36, 'Co-op City' = 37, 'College Point' = 38, 'Corona' = 39, 'Crotona Park East' = 40, 'Crown Heights North' = 41, 'Crown Heights South' = 42, 'Cypress Hills-City Line' = 43, 'DUMBO-Vinegar Hill-Downtown Brooklyn-Boerum Hill' = 44, 'Douglas Manor-Douglaston-Little Neck' = 45, 'Dyker Heights' = 46, 'East Concourse-Concourse Village' = 47, 'East Elmhurst' = 48, 'East Flatbush-Farragut' = 49, 'East Flushing' = 50, 'East Harlem North' = 51, 'East Harlem South' = 52, 'East New York' = 53, 'East New York (Pennsylvania Ave)' = 54, 'East Tremont' = 55, 'East Village' = 56, 'East Williamsburg' = 57, 'Eastchester-Edenwald-Baychester' = 58, 'Elmhurst' = 59, 'Elmhurst-Maspeth' = 60, 'Erasmus' = 61, 'Far Rockaway-Bayswater' = 62, 'Flatbush' = 63, 'Flatlands' = 64, 'Flushing' = 65, 'Fordham South' = 66, 'Forest Hills' = 67, 'Fort Greene' = 68, 'Fresh Meadows-Utopia' = 69, 'Ft. Totten-Bay Terrace-Clearview' = 70, 'Georgetown-Marine Park-Bergen Beach-Mill Basin' = 71, 'Glen Oaks-Floral Park-New Hyde Park' = 72, 'Glendale' = 73, 'Gramercy' = 74, 'Grasmere-Arrochar-Ft. Wadsworth' = 75, 'Gravesend' = 76, 'Great Kills' = 77, 'Greenpoint' = 78, 'Grymes Hill-Clifton-Fox Hills' = 79, 'Hamilton Heights' = 80, 'Hammels-Arverne-Edgemere' = 81, 'Highbridge' = 82, 'Hollis' = 83, 'Homecrest' = 84, 'Hudson Yards-Chelsea-Flatiron-Union Square' = 85, 'Hunters Point-Sunnyside-West Maspeth' = 86, 'Hunts Point' = 87, 'Jackson Heights' = 88, 'Jamaica' = 89, 'Jamaica Estates-Holliswood' = 90, 'Kensington-Ocean Parkway' = 91, 'Kew Gardens' = 92, 'Kew Gardens Hills' = 93, 'Kingsbridge Heights' = 94, 'Laurelton' = 95, 'Lenox Hill-Roosevelt Island' = 96, 'Lincoln Square' = 97, 'Lindenwood-Howard Beach' = 98, 'Longwood' = 99, 'Lower East Side' = 100, 'Madison' = 101, 'Manhattanville' = 102, 'Marble Hill-Inwood' = 103, 'Mariner\'s Harbor-Arlington-Port Ivory-Graniteville' = 104, 'Maspeth' = 105, 'Melrose South-Mott Haven North' = 106, 'Middle Village' = 107, 'Midtown-Midtown South' = 108, 'Midwood' = 109, 'Morningside Heights' = 110, 'Morrisania-Melrose' = 111, 'Mott Haven-Port Morris' = 112, 'Mount Hope' = 113, 'Murray Hill' = 114, 'Murray Hill-Kips Bay' = 115, 'New Brighton-Silver Lake' = 116, 'New Dorp-Midland Beach' = 117, 'New Springville-Bloomfield-Travis' = 118, 'North Corona' = 119, 'North Riverdale-Fieldston-Riverdale' = 120, 'North Side-South Side' = 121, 'Norwood' = 122, 'Oakland Gardens' = 123, 'Oakwood-Oakwood Beach' = 124, 'Ocean Hill' = 125, 'Ocean Parkway South' = 126, 'Old Astoria' = 127, 'Old Town-Dongan Hills-South Beach' = 128, 'Ozone Park' = 129, 'Park Slope-Gowanus' = 130, 'Parkchester' = 131, 'Pelham Bay-Country Club-City Island' = 132, 'Pelham Parkway' = 133, 'Pomonok-Flushing Heights-Hillcrest' = 134, 'Port Richmond' = 135, 'Prospect Heights' = 136, 'Prospect Lefferts Gardens-Wingate' = 137, 'Queens Village' = 138, 'Queensboro Hill' = 139, 'Queensbridge-Ravenswood-Long Island City' = 140, 'Rego Park' = 141, 'Richmond Hill' = 142, 'Ridgewood' = 143, 'Rikers Island' = 144, 'Rosedale' = 145, 'Rossville-Woodrow' = 146, 'Rugby-Remsen Village' = 147, 'Schuylerville-Throgs Neck-Edgewater Park' = 148, 'Seagate-Coney Island' = 149, 'Sheepshead Bay-Gerritsen Beach-Manhattan Beach' = 150, 'SoHo-TriBeCa-Civic Center-Little Italy' = 151, 'Soundview-Bruckner' = 152, 'Soundview-Castle Hill-Clason Point-Harding Park' = 153, 'South Jamaica' = 154, 'South Ozone Park' = 155, 'Springfield Gardens North' = 156, 'Springfield Gardens South-Brookville' = 157, 'Spuyten Duyvil-Kingsbridge' = 158, 'St. Albans' = 159, 'Stapleton-Rosebank' = 160, 'Starrett City' = 161, 'Steinway' = 162, 'Stuyvesant Heights' = 163, 'Stuyvesant Town-Cooper Village' = 164, 'Sunset Park East' = 165, 'Sunset Park West' = 166, 'Todt Hill-Emerson Hill-Heartland Village-Lighthouse Hill' = 167, 'Turtle Bay-East Midtown' = 168, 'University Heights-Morris Heights' = 169, 'Upper East Side-Carnegie Hill' = 170, 'Upper West Side' = 171, 'Van Cortlandt Village' = 172, 'Van Nest-Morris Park-Westchester Square' = 173, 'Washington Heights North' = 174, 'Washington Heights South' = 175, 'West Brighton' = 176, 'West Concourse' = 177, 'West Farms-Bronx River' = 178, 'West New Brighton-New Brighton-St. George' = 179, 'West Village' = 180, 'Westchester-Unionport' = 181, 'Westerleigh' = 182, 'Whitestone' = 183, 'Williamsbridge-Olinville' = 184, 'Williamsburg' = 185, 'Windsor Terrace' = 186, 'Woodhaven' = 187, 'Woodlawn-Wakefield' = 188, 'Woodside' = 189, 'Yorkville' = 190, 'park-cemetery-etc-Bronx' = 191, 'park-cemetery-etc-Brooklyn' = 192, 'park-cemetery-etc-Manhattan' = 193, 'park-cemetery-etc-Queens' = 194, 'park-cemetery-etc-Staten Island' = 195), pickup_puma UInt16, dropoff_nyct2010_gid UInt8, dropoff_ctlabel Float32, dropoff_borocode UInt8, dropoff_boroname Enum8('' = 0, 'Manhattan' = 1, 'Bronx' = 2, 'Brooklyn' = 3, 'Queens' = 4, 'Staten Island' = 5), dropoff_ct2010 FixedString(6), dropoff_boroct2010 FixedString(7), dropoff_cdeligibil Enum8(' ' = 0, 'E' = 1, 'I' = 2), dropoff_ntacode FixedString(4), dropoff_ntaname Enum16('' = 0, 'Airport' = 1, 'Allerton-Pelham Gardens' = 2, 'Annadale-Huguenot-Prince\'s Bay-Eltingville' = 3, 'Arden Heights' = 4, 'Astoria' = 5, 'Auburndale' = 6, 'Baisley Park' = 7, 'Bath Beach' = 8, 'Battery Park City-Lower Manhattan' = 9, 'Bay Ridge' = 10, 'Bayside-Bayside Hills' = 11, 'Bedford' = 12, 'Bedford Park-Fordham North' = 13, 'Bellerose' = 14, 'Belmont' = 15, 'Bensonhurst East' = 16, 'Bensonhurst West' = 17, 'Borough Park' = 18, 'Breezy Point-Belle Harbor-Rockaway Park-Broad Channel' = 19, 'Briarwood-Jamaica Hills' = 20, 'Brighton Beach' = 21, 'Bronxdale' = 22, 'Brooklyn Heights-Cobble Hill' = 23, 'Brownsville' = 24, 'Bushwick North' = 25, 'Bushwick South' = 26, 'Cambria Heights' = 27, 'Canarsie' = 28, 'Carroll Gardens-Columbia Street-Red Hook' = 29, 'Central Harlem North-Polo Grounds' = 30, 'Central Harlem South' = 31, 'Charleston-Richmond Valley-Tottenville' = 32, 'Chinatown' = 33, 'Claremont-Bathgate' = 34, 'Clinton' = 35, 'Clinton Hill' = 36, 'Co-op City' = 37, 'College Point' = 38, 'Corona' = 39, 'Crotona Park East' = 40, 'Crown Heights North' = 41, 'Crown Heights South' = 42, 'Cypress Hills-City Line' = 43, 'DUMBO-Vinegar Hill-Downtown Brooklyn-Boerum Hill' = 44, 'Douglas Manor-Douglaston-Little Neck' = 45, 'Dyker Heights' = 46, 'East Concourse-Concourse Village' = 47, 'East Elmhurst' = 48, 'East Flatbush-Farragut' = 49, 'East Flushing' = 50, 'East Harlem North' = 51, 'East Harlem South' = 52, 'East New York' = 53, 'East New York (Pennsylvania Ave)' = 54, 'East Tremont' = 55, 'East Village' = 56, 'East Williamsburg' = 57, 'Eastchester-Edenwald-Baychester' = 58, 'Elmhurst' = 59, 'Elmhurst-Maspeth' = 60, 'Erasmus' = 61, 'Far Rockaway-Bayswater' = 62, 'Flatbush' = 63, 'Flatlands' = 64, 'Flushing' = 65, 'Fordham South' = 66, 'Forest Hills' = 67, 'Fort Greene' = 68, 'Fresh Meadows-Utopia' = 69, 'Ft. Totten-Bay Terrace-Clearview' = 70, 'Georgetown-Marine Park-Bergen Beach-Mill Basin' = 71, 'Glen Oaks-Floral Park-New Hyde Park' = 72, 'Glendale' = 73, 'Gramercy' = 74, 'Grasmere-Arrochar-Ft. Wadsworth' = 75, 'Gravesend' = 76, 'Great Kills' = 77, 'Greenpoint' = 78, 'Grymes Hill-Clifton-Fox Hills' = 79, 'Hamilton Heights' = 80, 'Hammels-Arverne-Edgemere' = 81, 'Highbridge' = 82, 'Hollis' = 83, 'Homecrest' = 84, 'Hudson Yards-Chelsea-Flatiron-Union Square' = 85, 'Hunters Point-Sunnyside-West Maspeth' = 86, 'Hunts Point' = 87, 'Jackson Heights' = 88, 'Jamaica' = 89, 'Jamaica Estates-Holliswood' = 90, 'Kensington-Ocean Parkway' = 91, 'Kew Gardens' = 92, 'Kew Gardens Hills' = 93, 'Kingsbridge Heights' = 94, 'Laurelton' = 95, 'Lenox Hill-Roosevelt Island' = 96, 'Lincoln Square' = 97, 'Lindenwood-Howard Beach' = 98, 'Longwood' = 99, 'Lower East Side' = 100, 'Madison' = 101, 'Manhattanville' = 102, 'Marble Hill-Inwood' = 103, 'Mariner\'s Harbor-Arlington-Port Ivory-Graniteville' = 104, 'Maspeth' = 105, 'Melrose South-Mott Haven North' = 106, 'Middle Village' = 107, 'Midtown-Midtown South' = 108, 'Midwood' = 109, 'Morningside Heights' = 110, 'Morrisania-Melrose' = 111, 'Mott Haven-Port Morris' = 112, 'Mount Hope' = 113, 'Murray Hill' = 114, 'Murray Hill-Kips Bay' = 115, 'New Brighton-Silver Lake' = 116, 'New Dorp-Midland Beach' = 117, 'New Springville-Bloomfield-Travis' = 118, 'North Corona' = 119, 'North Riverdale-Fieldston-Riverdale' = 120, 'North Side-South Side' = 121, 'Norwood' = 122, 'Oakland Gardens' = 123, 'Oakwood-Oakwood Beach' = 124, 'Ocean Hill' = 125, 'Ocean Parkway South' = 126, 'Old Astoria' = 127, 'Old Town-Dongan Hills-South Beach' = 128, 'Ozone Park' = 129, 'Park Slope-Gowanus' = 130, 'Parkchester' = 131, 'Pelham Bay-Country Club-City Island' = 132, 'Pelham Parkway' = 133, 'Pomonok-Flushing Heights-Hillcrest' = 134, 'Port Richmond' = 135, 'Prospect Heights' = 136, 'Prospect Lefferts Gardens-Wingate' = 137, 'Queens Village' = 138, 'Queensboro Hill' = 139, 'Queensbridge-Ravenswood-Long Island City' = 140, 'Rego Park' = 141, 'Richmond Hill' = 142, 'Ridgewood' = 143, 'Rikers Island' = 144, 'Rosedale' = 145, 'Rossville-Woodrow' = 146, 'Rugby-Remsen Village' = 147, 'Schuylerville-Throgs Neck-Edgewater Park' = 148, 'Seagate-Coney Island' = 149, 'Sheepshead Bay-Gerritsen Beach-Manhattan Beach' = 150, 'SoHo-TriBeCa-Civic Center-Little Italy' = 151, 'Soundview-Bruckner' = 152, 'Soundview-Castle Hill-Clason Point-Harding Park' = 153, 'South Jamaica' = 154, 'South Ozone Park' = 155, 'Springfield Gardens North' = 156, 'Springfield Gardens South-Brookville' = 157, 'Spuyten Duyvil-Kingsbridge' = 158, 'St. Albans' = 159, 'Stapleton-Rosebank' = 160, 'Starrett City' = 161, 'Steinway' = 162, 'Stuyvesant Heights' = 163, 'Stuyvesant Town-Cooper Village' = 164, 'Sunset Park East' = 165, 'Sunset Park West' = 166, 'Todt Hill-Emerson Hill-Heartland Village-Lighthouse Hill' = 167, 'Turtle Bay-East Midtown' = 168, 'University Heights-Morris Heights' = 169, 'Upper East Side-Carnegie Hill' = 170, 'Upper West Side' = 171, 'Van Cortlandt Village' = 172, 'Van Nest-Morris Park-Westchester Square' = 173, 'Washington Heights North' = 174, 'Washington Heights South' = 175, 'West Brighton' = 176, 'West Concourse' = 177, 'West Farms-Bronx River' = 178, 'West New Brighton-New Brighton-St. George' = 179, 'West Village' = 180, 'Westchester-Unionport' = 181, 'Westerleigh' = 182, 'Whitestone' = 183, 'Williamsbridge-Olinville' = 184, 'Williamsburg' = 185, 'Windsor Terrace' = 186, 'Woodhaven' = 187, 'Woodlawn-Wakefield' = 188, 'Woodside' = 189, 'Yorkville' = 190, 'park-cemetery-etc-Bronx' = 191, 'park-cemetery-etc-Brooklyn' = 192, 'park-cemetery-etc-Manhattan' = 193, 'park-cemetery-etc-Queens' = 194, 'park-cemetery-etc-Staten Island' = 195), dropoff_puma UInt16) ENGINE = MergeTree(pickup_date, pickup_datetime, 8192); +``` + +ソースサーãƒãƒ¼ã§ï¼š + +``` sql +CREATE TABLE trips_mergetree_x3 AS trips_mergetree_third ENGINE = Distributed(perftest, default, trips_mergetree_third, rand()); +``` + +以下ã®ã‚¯ã‚¨ãƒªãƒ‡ãƒ¼ã‚¿ã‚’å†åˆ†é…ã—ã¾ã™ï¼š + +``` sql +INSERT INTO trips_mergetree_x3 SELECT * FROM trips_mergetree; +``` + +ã“ã®å‡¦ç†ã«ã¯2454秒ã‹ã‹ã‚Šã¾ã™ã€‚ + +3サーãƒãƒ¼ã®å ´åˆï¼š + +Q1: 0.212秒。 +Q2: 0.438秒。 +Q3: 0.733秒。 +Q4: 1.241秒。 + +ã“ã“ã«é©šãã¯ã‚ã‚Šã¾ã›ã‚“ã€ã‚¯ã‚¨ãƒªã¯ç·šå½¢ã«ã‚¹ã‚±ãƒ¼ãƒ«ã—ã¦ã„ã¾ã™ã€‚ + +ã¾ãŸã€140å°ã®ã‚µãƒ¼ãƒãƒ¼ã‚¯ãƒ©ã‚¹ã‚¿ã‹ã‚‰ã®çµæžœã‚‚ã‚ã‚Šã¾ã™ï¼š + +Q1: 0.028秒。 +Q2: 0.043秒。 +Q3: 0.051秒。 +Q4: 0.072秒。 + +ã“ã®å ´åˆã€ã‚¯ã‚¨ãƒªå‡¦ç†æ™‚é–“ã¯ä¸»ã«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯é…延ã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã¾ã™ã€‚ +クエリã¯ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãŒä½ç½®ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼ã¨ã¯ç•°ãªã‚‹å ´æ‰€ã«ã‚るクライアントを使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã—ãŸã€‚ã“ã®ãŸã‚ã€ç´„20 msã®é…延ãŒè¿½åŠ ã•ã‚Œã¾ã—ãŸã€‚ + +## ã¾ã¨ã‚ {#summary} + +| サーãƒãƒ¼æ•° | Q1 | Q2 | Q3 | Q4 | +|------------|-------|-------|-------|-------| +| 1, E5-2650v2 | 0.490 | 1.224 | 2.104 | 3.593 | +| 3, E5-2650v2 | 0.212 | 0.438 | 0.733 | 1.241 | +| 1, AWS c5n.4xlarge | 0.249 | 1.279 | 1.738 | 3.527 | +| 1, AWS c5n.9xlarge | 0.130 | 0.584 | 0.777 | 1.811 | +| 3, AWS c5n.9xlarge | 0.057 | 0.231 | 0.285 | 0.641 | +| 140, E5-2650v2 | 0.028 | 0.043 | 0.051 | 0.072 | diff --git a/docs/ja/getting-started/example-datasets/nypd_complaint_data.md b/docs/ja/getting-started/example-datasets/nypd_complaint_data.md new file mode 100644 index 00000000000..2446e7f910c --- /dev/null +++ b/docs/ja/getting-started/example-datasets/nypd_complaint_data.md @@ -0,0 +1,642 @@ +--- +slug: /ja/getting-started/example-datasets/nypd_complaint_data +sidebar_label: NYPD Complaint Data +description: "5ã¤ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã‚¿ãƒ–区切りデータをå–ã‚Šè¾¼ã¿ã€ã‚¯ã‚¨ãƒªã™ã‚‹" +title: NYPD Complaint Data +--- + +タブ区切り値ファイル (TSV) ã¯ä¸€èˆ¬çš„ã§ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€åˆã®è¡Œã«ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰è¦‹å‡ºã—ãŒå«ã¾ã‚Œã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã¯TSVã‚’å–り込むã“ã¨ãŒã§ãã€ã¾ãŸã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å–ã‚Šè¾¼ã¾ãšã«TSVã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã“れらã®ã‚±ãƒ¼ã‚¹ã‚’扱ã„ã¾ã™ã€‚CSVファイルã«ã‚¯ã‚¨ãƒªã‚’実行ã¾ãŸã¯å–り込む必è¦ãŒã‚ã‚‹å ´åˆã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆå¼•æ•°ã®`TSV`ã‚’`CSV`ã«ç½®ãæ›ãˆã‚‹ã ã‘ã§åŒæ§˜ã®æ–¹æ³•ãŒé©ç”¨ã§ãã¾ã™ã€‚ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã‚’通ã˜ã¦ã€ä»¥ä¸‹ã®ã“ã¨ã‚’è¡Œã„ã¾ã™: +- **調査**: TSVファイルã®æ§‹é€ ã¨å†…容をクエリã—ã¾ã™ã€‚ +- **ターゲットã¨ã™ã‚‹ClickHouseスキーマを決定**: é©åˆ‡ãªãƒ‡ãƒ¼ã‚¿åž‹ã‚’é¸ã³ã€æ—¢å­˜ã®ãƒ‡ãƒ¼ã‚¿ã‚’ãれらã®åž‹ã«ãƒžãƒƒãƒ”ングã—ã¾ã™ã€‚ +- **ClickHouseテーブルを作æˆ**ã—ã¾ã™ã€‚ +- データを**å‰å‡¦ç†ã—ã¦ClickHouseã«ã‚¹ãƒˆãƒªãƒ¼ãƒ **ã—ã¾ã™ã€‚ +- ClickHouseã«å¯¾ã—ã¦**ã„ãã¤ã‹ã®ã‚¯ã‚¨ãƒªã‚’実行**ã—ã¾ã™ã€‚ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ä½¿ç”¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ãƒ‹ãƒ¥ãƒ¼ãƒ¨ãƒ¼ã‚¯å¸‚ã®ã‚ªãƒ¼ãƒ—ンデータãƒãƒ¼ãƒ ã‹ã‚‰æä¾›ã•ã‚Œã€"ニューヨーク市警察 (NYPD) ã«å ±å‘Šã•ã‚ŒãŸã™ã¹ã¦ã®æœ‰åŠ¹ãªé‡ç½ªã€è»½çŠ¯ç½ªã€é•åã«é–¢ã™ã‚‹ãƒ‡ãƒ¼ã‚¿"ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚執筆時点ã§ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚µã‚¤ã‚ºã¯166MBã§ã™ãŒã€å®šæœŸçš„ã«æ›´æ–°ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**ソース**: [data.cityofnewyork.us](https://data.cityofnewyork.us/Public-Safety/NYPD-Complaint-Data-Current-Year-To-Date-/5uac-w243) +**利用è¦ç´„**: https://www1.nyc.gov/home/terms-of-use.page + +## å‰ææ¡ä»¶ +- データセットã¯[NYPD Complaint Data Current (Year To Date)](https://data.cityofnewyork.us/Public-Safety/NYPD-Complaint-Data-Current-Year-To-Date-/5uac-w243)ページã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ãã ã•ã„。エクスãƒãƒ¼ãƒˆãƒœã‚¿ãƒ³ã‚’クリックã—ã¦**TSV for Excel**ã‚’é¸ã³ã¾ã™ã€‚ +- [ClickHouseサーãƒãƒ¼ã¨ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ](../../getting-started/install.md)をインストールã—ã¾ã™ã€‚ +- [èµ·å‹•](../../getting-started/install.md#launch)ã—ã€`clickhouse-client`ã§æŽ¥ç¶šã—ã¾ã™ + +### ã“ã®ã‚¬ã‚¤ãƒ‰ã§èª¬æ˜Žã•ã‚Œã‚‹ã‚³ãƒžãƒ³ãƒ‰ã«ã¤ã„ã¦ã®æ³¨æ„ +ã“ã®ã‚¬ã‚¤ãƒ‰ã«ã¯2種類ã®ã‚³ãƒžãƒ³ãƒ‰ãŒã‚ã‚Šã¾ã™: +- 一部ã®ã‚³ãƒžãƒ³ãƒ‰ã¯TSVファイルã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã‚‚ã®ã§ã€ã“れらã¯ã‚³ãƒžãƒ³ãƒ‰ãƒ—ロンプトã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +- ãã®ä»–ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ClickHouseã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã‚‚ã®ã§ã€ã“れらã¯`clickhouse-client`ã¾ãŸã¯Play UIã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +:::note +ã“ã®ã‚¬ã‚¤ãƒ‰ã®ä¾‹ã¯ã€TSVファイルを`${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv`ã«ä¿å­˜ã—ãŸã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã‚³ãƒžãƒ³ãƒ‰ã‚’調整ã—ã¦ãã ã•ã„。 +::: + +## TSVファイルã«æ…£ã‚Œè¦ªã—ã‚€ +ClickHouseデータベースを使用ã™ã‚‹å‰ã«ã€ãƒ‡ãƒ¼ã‚¿ã«æ…£ã‚Œè¦ªã—ã‚“ã§ãã ã•ã„。 + +### ソースTSVファイルã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’確èªã™ã‚‹ +ã“ã‚ŒãŒTSVファイルã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã®ä¾‹ã§ã™ã€‚ãŸã ã—ã€ã¾ã å®Ÿè¡Œã—ãªã„ã§ãã ã•ã„。 +```sh +clickhouse-local --query \ +"describe file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames')" +``` + +サンプルレスãƒãƒ³ã‚¹ +```response +CMPLNT_NUM Nullable(Float64) +ADDR_PCT_CD Nullable(Float64) +BORO_NM Nullable(String) +CMPLNT_FR_DT Nullable(String) +CMPLNT_FR_TM Nullable(String) +``` + +:::tip +多ãã®å ´åˆã€ä¸Šè¨˜ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã®ä¸­ã§æ•°å€¤ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¨æ–‡å­—列フィールドã€ãŠã‚ˆã³ã‚¿ãƒ—ルã§ã‚るフィールドを教ãˆã¦ãã‚Œã¾ã™ã€‚ã“ã‚Œã¯å¸¸ã«ãã†ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ClickHouseã¯ä½•å„„ã‚‚ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’å«ã‚€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ãƒ«ãƒ¼ãƒãƒ³ã«ä½¿ç”¨ã•ã‚Œã‚‹ãŸã‚ã€ã‚¹ã‚­ãƒ¼ãƒžã‚’推測ã™ã‚‹ãŸã‚ã«æ—¢å®šã®è¡Œæ•°ï¼ˆ100)ãŒèª¿ã¹ã‚‰ã‚Œã¾ã™ãŒã€ã“ã‚Œã¯ã‚¹ã‚­ãƒ¼ãƒžã‚’推測ã™ã‚‹ãŸã‚ã«ä½•åå„„ã‚‚ã®è¡Œã‚’解æžã™ã‚‹ã“ã¨ã‚’é¿ã‘ã‚‹ãŸã‚ã§ã™ã€‚以下ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒæ¯Žå¹´æ•°å›žæ›´æ–°ã•ã‚Œã‚‹ãŸã‚ã€ãŠå®¢æ§˜ãŒè¦‹ã‚‹å†…容ã¨ã¯ä¸€è‡´ã—ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。データディクショナリーを見るã¨ã€CMPLNT_NUMãŒãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦æŒ‡å®šã•ã‚Œã¦ãŠã‚Šã€æ•°å€¤ã§ã¯ã‚ã‚Šã¾ã›ã‚“。スキーマ推測ã®ãŸã‚ã®å…¥åŠ›è¡Œæ•°ã‚’100ã‹ã‚‰è¨­å®š`SETTINGS input_format_max_rows_to_read_for_schema_inference=2000`ã«ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ã¨ã€ã‚ˆã‚Šè‰¯ã„コンテンツã®ç†è§£ãŒã§ãã¾ã™ã€‚ + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³22.5以é™ã€æŽ¨æ¸¬ã®ãŸã‚ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¡Œæ•°ãŒ25,000è¡Œã«å¤‰æ›´ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®å ´åˆã‚„25,000行以上ã®ã‚µãƒ³ãƒ—ルãŒå¿…è¦ãªå ´åˆã«ã®ã¿è¨­å®šã‚’変更ã—ã¦ãã ã•ã„。 +::: + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’コマンドプロンプトã§å®Ÿè¡Œã—ã¦ãã ã•ã„。`clickhouse-local`を使用ã—ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ãŸTSVファイル内ã®ãƒ‡ãƒ¼ã‚¿ã«ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ +```sh +clickhouse-local --input_format_max_rows_to_read_for_schema_inference=2000 \ +--query \ +"describe file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames')" +``` + +çµæžœ: +```response +CMPLNT_NUM Nullable(String) +ADDR_PCT_CD Nullable(Float64) +BORO_NM Nullable(String) +CMPLNT_FR_DT Nullable(String) +CMPLNT_FR_TM Nullable(String) +CMPLNT_TO_DT Nullable(String) +CMPLNT_TO_TM Nullable(String) +CRM_ATPT_CPTD_CD Nullable(String) +HADEVELOPT Nullable(String) +HOUSING_PSA Nullable(Float64) +JURISDICTION_CODE Nullable(Float64) +JURIS_DESC Nullable(String) +KY_CD Nullable(Float64) +LAW_CAT_CD Nullable(String) +LOC_OF_OCCUR_DESC Nullable(String) +OFNS_DESC Nullable(String) +PARKS_NM Nullable(String) +PATROL_BORO Nullable(String) +PD_CD Nullable(Float64) +PD_DESC Nullable(String) +PREM_TYP_DESC Nullable(String) +RPT_DT Nullable(String) +STATION_NAME Nullable(String) +SUSP_AGE_GROUP Nullable(String) +SUSP_RACE Nullable(String) +SUSP_SEX Nullable(String) +TRANSIT_DISTRICT Nullable(Float64) +VIC_AGE_GROUP Nullable(String) +VIC_RACE Nullable(String) +VIC_SEX Nullable(String) +X_COORD_CD Nullable(Float64) +Y_COORD_CD Nullable(Float64) +Latitude Nullable(Float64) +Longitude Nullable(Float64) +Lat_Lon Tuple(Nullable(Float64), Nullable(Float64)) +New Georeferenced Column Nullable(String) +``` + +ã“ã®æ™‚点ã§ã€TSVファイルã®ã‚«ãƒ©ãƒ ãŒ[データセットã®ã‚¦ã‚§ãƒ–ページ](https://data.cityofnewyork.us/Public-Safety/NYPD-Complaint-Data-Current-Year-To-Date-/5uac-w243)ã®**ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ã‚«ãƒ©ãƒ **セクションã§æŒ‡å®šã•ã‚Œã¦ã„ã‚‹åå‰ã¨åž‹ã«ä¸€è‡´ã™ã‚‹ã‹ç¢ºèªã—ã¦ãã ã•ã„。データ型ã¯éžå¸¸ã«å…·ä½“çš„ã§ã¯ãªãã€ã™ã¹ã¦ã®æ•°å€¤ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯`Nullable(Float64)`ã«è¨­å®šã•ã‚Œã€ãã®ä»–ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯ã™ã¹ã¦`Nullable(String)`ã¨ãªã£ã¦ã„ã¾ã™ã€‚データをä¿å­˜ã™ã‚‹ClickHouseテーブルを作æˆã™ã‚‹éš›ã«ã€ã‚ˆã‚Šé©åˆ‡ã§ãƒ‘フォーマンスã«å„ªã‚ŒãŸåž‹ã‚’指定ã§ãã¾ã™ã€‚ + +### é©åˆ‡ãªã‚¹ã‚­ãƒ¼ãƒžã‚’決定ã™ã‚‹ + +フィールドã«ä½¿ç”¨ã™ã¹ã型を判断ã™ã‚‹ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒã©ã®ã‚ˆã†ã«è¦‹ãˆã‚‹ã‹ã‚’知る必è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€`JURISDICTION_CODE`フィールドã¯æ•°å€¤ã§ã™ãŒã€`UInt8`ã«ã™ã¹ãã‹ã€`Enum`ã«ã™ã¹ãã‹ã€ãã‚Œã¨ã‚‚`Float64`ãŒé©åˆ‡ã‹ã‚’判断ã—ã¾ã™ã€‚ + +```sql +clickhouse-local --input_format_max_rows_to_read_for_schema_inference=2000 \ +--query \ +"select JURISDICTION_CODE, count() FROM + file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames') + GROUP BY JURISDICTION_CODE + ORDER BY JURISDICTION_CODE + FORMAT PrettyCompact" +``` + +çµæžœ: +```response +┌─JURISDICTION_CODE─┬─count()─┠+│ 0 │ 188875 │ +│ 1 │ 4799 │ +│ 2 │ 13833 │ +│ 3 │ 656 │ +│ 4 │ 51 │ +│ 6 │ 5 │ +│ 7 │ 2 │ +│ 9 │ 13 │ +│ 11 │ 14 │ +│ 12 │ 5 │ +│ 13 │ 2 │ +│ 14 │ 70 │ +│ 15 │ 20 │ +│ 72 │ 159 │ +│ 87 │ 9 │ +│ 88 │ 75 │ +│ 97 │ 405 │ +└───────────────────┴─────────┘ +``` + +ã“ã®ã‚¯ã‚¨ãƒªã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã¯ã€`JURISDICTION_CODE`ãŒ`UInt8`ã«é©ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +åŒæ§˜ã«ã€ä¸€éƒ¨ã®`String`フィールドを確èªã—ã¦ã€ãれらãŒ`DateTime`ã¾ãŸã¯[`LowCardinality(String)`](../../sql-reference/data-types/lowcardinality.md)フィールドã«é©ã—ã¦ã„ã‚‹ã‹ã‚’確èªã—ã¾ã™ã€‚ + +例ãˆã°ã€`PARKS_NM`フィールドã¯"発生場所ã®é©ç”¨ãŒã‚ã‚‹å ´åˆã¯NYCã®å…¬åœ’ã€éŠã³å ´ã€ã¾ãŸã¯ã‚°ãƒªãƒ¼ãƒ³ã‚¹ãƒšãƒ¼ã‚¹ã®åå‰ï¼ˆå·žç«‹å…¬åœ’ã¯å«ã¾ã‚Œã¾ã›ã‚“)"ã¨èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™ã€‚ニューヨーク市ã®å…¬åœ’ã®åå‰ã¯ã€`LowCardinality(String)`ã«é©ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +```sh +clickhouse-local --input_format_max_rows_to_read_for_schema_inference=2000 \ +--query \ +"select count(distinct PARKS_NM) FROM + file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames') + FORMAT PrettyCompact" +``` + +çµæžœ: +```response +┌─uniqExact(PARKS_NM)─┠+│ 319 │ +└─────────────────────┘ +``` + +ã„ãã¤ã‹ã®å…¬åœ’åを見ã¦ã¿ã¾ã—ょã†: +```sql +clickhouse-local --input_format_max_rows_to_read_for_schema_inference=2000 \ +--query \ +"select distinct PARKS_NM FROM + file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames') + LIMIT 10 + FORMAT PrettyCompact" +``` + +çµæžœ: +```response +┌─PARKS_NM───────────────────┠+│ (null) │ +│ ASSER LEVY PARK │ +│ JAMES J WALKER PARK │ +│ BELT PARKWAY/SHORE PARKWAY │ +│ PROSPECT PARK │ +│ MONTEFIORE SQUARE │ +│ SUTTON PLACE PARK │ +│ JOYCE KILMER PARK │ +│ ALLEY ATHLETIC PLAYGROUND │ +│ ASTORIA PARK │ +└────────────────────────────┘ +``` + +執筆時ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€`PARK_NM`カラムã«æ•°ç™¾ã®ç•°ãªã‚‹å…¬åœ’ã‚„éŠã³å ´ã—ã‹å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。ã“ã‚Œã¯ã€`LowCardinality`推奨ã®[`LowCardinality`](../../sql-reference/data-types/lowcardinality.md#lowcardinality-dscr)フィールドã«ãŠã‘ã‚‹ 10,000未満ã®ç•°ãªã‚‹æ–‡å­—列をä¿ã¤ãŸã‚ã®å°ã•ãªæ•°å€¤ã§ã™ã€‚ + +### DateTimeフィールド +[データセットã®ã‚¦ã‚§ãƒ–ページ](https://data.cityofnewyork.us/Public-Safety/NYPD-Complaint-Data-Current-Year-To-Date-/5uac-w243)ã®**ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ã‚«ãƒ©ãƒ **セクションã«åŸºã¥ãã€å ±å‘Šã•ã‚ŒãŸã‚¤ãƒ™ãƒ³ãƒˆã®é–‹å§‹ã¨çµ‚了ã®æ—¥ä»˜ã¨æ™‚間フィールドãŒã‚ã‚Šã¾ã™ã€‚CMPLNT_FR_DTã¨CMPLT_TO_DTã®æœ€å°å€¤ã¨æœ€å¤§å€¤ã‚’確èªã™ã‚‹ã¨ã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒå¸¸ã«å…¥åŠ›ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹åˆ†ã‹ã‚Šã¾ã™ã€‚ + +```sh title="CMPLNT_FR_DT" +clickhouse-local --input_format_max_rows_to_read_for_schema_inference=2000 \ +--query \ +"select min(CMPLNT_FR_DT), max(CMPLNT_FR_DT) FROM +file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames') +FORMAT PrettyCompact" +``` + +çµæžœ: +```response +┌─min(CMPLNT_FR_DT)─┬─max(CMPLNT_FR_DT)─┠+│ 01/01/1973 │ 12/31/2021 │ +└───────────────────┴───────────────────┘ +``` + +```sh title="CMPLNT_TO_DT" +clickhouse-local --input_format_max_rows_to_read_for_schema_inference=2000 \ +--query \ +"select min(CMPLNT_TO_DT), max(CMPLNT_TO_DT) FROM +file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames') +FORMAT PrettyCompact" +``` + +çµæžœ: +```response +┌─min(CMPLNT_TO_DT)─┬─max(CMPLNT_TO_DT)─┠+│ │ 12/31/2021 │ +└───────────────────┴───────────────────┘ +``` + +```sh title="CMPLNT_FR_TM" +clickhouse-local --input_format_max_rows_to_read_for_schema_inference=2000 \ +--query \ +"select min(CMPLNT_FR_TM), max(CMPLNT_FR_TM) FROM +file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames') +FORMAT PrettyCompact" +``` + +çµæžœ: +```response +┌─min(CMPLNT_FR_TM)─┬─max(CMPLNT_FR_TM)─┠+│ 00:00:00 │ 23:59:00 │ +└───────────────────┴───────────────────┘ +``` + +```sh title="CMPLNT_TO_TM" +clickhouse-local --input_format_max_rows_to_read_for_schema_inference=2000 \ +--query \ +"select min(CMPLNT_TO_TM), max(CMPLNT_TO_TM) FROM +file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames') +FORMAT PrettyCompact" +``` + +çµæžœ: +```response +┌─min(CMPLNT_TO_TM)─┬─max(CMPLNT_TO_TM)─┠+│ (null) │ 23:59:00 │ +└───────────────────┴───────────────────┘ +``` + +## プランを立ã¦ã‚‹ + +上記ã®èª¿æŸ»çµæžœã«åŸºã¥ã: +- `JURISDICTION_CODE`ã¯`UInt8`ã¨ã—ã¦ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- `PARKS_NM`ã¯`LowCardinality(String)`ã«ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹ã¹ãã§ã™ã€‚ +- `CMPLNT_FR_DT`ã¨`CMPLNT_FR_TM`ã¯å¸¸ã«å…¥åŠ›ã•ã‚Œã¦ã„ã¾ã™ï¼ˆãŠãらãデフォルトã®æ™‚é–“`00:00:00`ã§ï¼‰ +- `CMPLNT_TO_DT`ã¨`CMPLNT_TO_TM`ã¯ç©ºæ¬„ã®å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ +- ソースã§ã¯ã€æ—¥ä»˜ã¨æ™‚刻ãŒåˆ†å‰²ã•ã‚ŒãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ +- 日付ã¯`mm/dd/yyyy`å½¢å¼ã§ã™ +- 時間ã¯`hh:mm:ss`å½¢å¼ã§ã™ +- 日付ã¨æ™‚é–“ã¯`DateTime`åž‹ã«é€£çµã§ãã¾ã™ +- 1970å¹´1月1日以å‰ã®ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã‚‹ãŸã‚ã€64ビットã®DateTimeãŒå¿…è¦ã§ã™ + +:::note +åž‹ã«åŠ ãˆã‚‹ã¹ã変更ã¯å¤šæ•°ã‚ã‚Šã¾ã™ãŒã€ã™ã¹ã¦åŒã˜èª¿æŸ»æ‰‹é †ã«å¾“ã£ã¦æ±ºå®šã§ãã¾ã™ã€‚フィールドã®ä½Žä½æ•°æ–‡å­—列ã®æ•°ã‚„ã€æœ€å°å€¤ã¨æœ€å¤§å€¤ã‚’確èªã—ã¦æ±ºå®šã—ã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã®å¾Œã®ãƒ†ãƒ¼ãƒ–ルスキーマã¯ã€`LowCardinality`ã®æ–‡å­—列ã¨ç¬¦å·ãªã—整数フィールドãŒå¤šãã€æµ®å‹•å°æ•°ç‚¹æ•°å€¤ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯éžå¸¸ã«å°‘æ•°ã§ã™ã€‚ +::: + +## 日付ã¨æ™‚é–“ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’連çµã™ã‚‹ + +日時フィールド`CMPLNT_FR_DT`ã¨`CMPLNT_FR_TM`ã‚’1ã¤ã®`String`ã«é€£çµã—ã¦`DateTime`åž‹ã«ã‚­ãƒ£ã‚¹ãƒˆã§ãるよã†ã«ã—ã¾ã™ã€‚ã¾ãš2ã¤ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’連çµæ¼”ç®—å­ã§çµåˆã—ã¾ã™: `CMPLNT_FR_DT || ' ' || CMPLNT_FR_TM`。`CMPLNT_TO_DT`ã¨`CMPLNT_TO_TM`フィールドもåŒæ§˜ã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +```sh +clickhouse-local --input_format_max_rows_to_read_for_schema_inference=2000 \ +--query \ +"select CMPLNT_FR_DT || ' ' || CMPLNT_FR_TM AS complaint_begin FROM +file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames') +LIMIT 10 +FORMAT PrettyCompact" +``` + +çµæžœ: +```response +┌─complaint_begin─────┠+│ 07/29/2010 00:01:00 │ +│ 12/01/2011 12:00:00 │ +│ 04/01/2017 15:00:00 │ +│ 03/26/2018 17:20:00 │ +│ 01/01/2019 00:00:00 │ +│ 06/14/2019 00:00:00 │ +│ 11/29/2021 20:00:00 │ +│ 12/04/2021 00:35:00 │ +│ 12/05/2021 12:50:00 │ +│ 12/07/2021 20:30:00 │ +└─────────────────────┘ +``` + +## 日時文字列をDateTime64åž‹ã«å¤‰æ›ã™ã‚‹ + +ガイドã®æ—©ã„段階ã§ã€TSVファイル内ã«1970å¹´1月1日以å‰ã®æ—¥ä»˜ãŒå­˜åœ¨ã™ã‚‹ã“ã¨ãŒåˆ¤æ˜Žã—ãŸãŸã‚ã€æ—¥ä»˜ã«ã¯64ビットDateTimeåž‹ãŒå¿…è¦ã§ã™ã€‚ã¾ãŸã€æ—¥ä»˜ã¯`MM/DD/YYYY`ã‹ã‚‰`YYYY/MM/DD`å½¢å¼ã«å¤‰æ›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã¯ã™ã¹ã¦[`parseDateTime64BestEffort()`](../../sql-reference/functions/type-conversion-functions.md#parsedatetime64besteffort)ã§å‡¦ç†ã§ãã¾ã™ã€‚ + +```sh +clickhouse-local --input_format_max_rows_to_read_for_schema_inference=2000 \ +--query \ +"WITH (CMPLNT_FR_DT || ' ' || CMPLNT_FR_TM) AS CMPLNT_START, + (CMPLNT_TO_DT || ' ' || CMPLNT_TO_TM) AS CMPLNT_END +select parseDateTime64BestEffort(CMPLNT_START) AS complaint_begin, + parseDateTime64BestEffortOrNull(CMPLNT_END) AS complaint_end +FROM file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames') +ORDER BY complaint_begin ASC +LIMIT 25 +FORMAT PrettyCompact" +``` + +上記ã®2行目ã¨3行目ã«ã¯ã€å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã®é€£çµãŒã‚ã‚Šã¾ã™ã€‚4行目ã¨5行目ã§`String`ã‚’`DateTime64`ã«è§£æžã—ã¾ã™ã€‚苦情ã®çµ‚了時間ãŒå­˜åœ¨ã™ã‚‹ã¨ã¯é™ã‚‰ãªã„ãŸã‚ã€`parseDateTime64BestEffortOrNull`を使用ã—ã¦ã„ã¾ã™ã€‚ + +çµæžœ: +```response +┌─────────complaint_begin─┬───────────complaint_end─┠+│ 1925-01-01 10:00:00.000 │ 2021-02-12 09:30:00.000 │ +│ 1925-01-01 11:37:00.000 │ 2022-01-16 11:49:00.000 │ +│ 1925-01-01 15:00:00.000 │ 2021-12-31 00:00:00.000 │ +│ 1925-01-01 15:00:00.000 │ 2022-02-02 22:00:00.000 │ +│ 1925-01-01 19:00:00.000 │ 2022-04-14 05:00:00.000 │ +│ 1955-09-01 19:55:00.000 │ 2022-08-01 00:45:00.000 │ +│ 1972-03-17 11:40:00.000 │ 2022-03-17 11:43:00.000 │ +│ 1972-05-23 22:00:00.000 │ 2022-05-24 09:00:00.000 │ +│ 1972-05-30 23:37:00.000 │ 2022-05-30 23:50:00.000 │ +│ 1972-07-04 02:17:00.000 │ á´ºáµá´¸á´¸ │ +│ 1973-01-01 00:00:00.000 │ á´ºáµá´¸á´¸ │ +│ 1975-01-01 00:00:00.000 │ á´ºáµá´¸á´¸ │ +│ 1976-11-05 00:01:00.000 │ 1988-10-05 23:59:00.000 │ +│ 1977-01-01 00:00:00.000 │ 1977-01-01 23:59:00.000 │ +│ 1977-12-20 00:01:00.000 │ á´ºáµá´¸á´¸ │ +│ 1981-01-01 00:01:00.000 │ á´ºáµá´¸á´¸ │ +│ 1981-08-14 00:00:00.000 │ 1987-08-13 23:59:00.000 │ +│ 1983-01-07 00:00:00.000 │ 1990-01-06 00:00:00.000 │ +│ 1984-01-01 00:01:00.000 │ 1984-12-31 23:59:00.000 │ +│ 1985-01-01 12:00:00.000 │ 1987-12-31 15:00:00.000 │ +│ 1985-01-11 09:00:00.000 │ 1985-12-31 12:00:00.000 │ +│ 1986-03-16 00:05:00.000 │ 2022-03-16 00:45:00.000 │ +│ 1987-01-07 00:00:00.000 │ 1987-01-09 00:00:00.000 │ +│ 1988-04-03 18:30:00.000 │ 2022-08-03 09:45:00.000 │ +│ 1988-07-29 12:00:00.000 │ 1990-07-27 22:00:00.000 │ +└─────────────────────────┴─────────────────────────┘ +``` +:::note +上記ã®`1925`å¹´ã¯ãƒ‡ãƒ¼ã‚¿ä¸­ã®ã‚¨ãƒ©ãƒ¼ã«ç”±æ¥ã—ã¾ã™ã€‚オリジナルデータã«ã¯ã€`1019`å¹´ã‹ã‚‰`1022`å¹´ã®æ—¥ä»˜ã®ã¾ã¾å…¥åŠ›ã•ã‚ŒãŸæ•°ä»¶ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå«ã¾ã‚Œã¦ãŠã‚Šã€ã“れらã¯`2019`å¹´ã‹ã‚‰`2022`å¹´ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ã“れらã¯64ビットDateTimeåž‹ã®æœ€åˆã®æ—¥ã§ã‚ã‚‹1925å¹´1月1æ—¥ã¨ã—ã¦æ ¼ç´ã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +## テーブルを作æˆã™ã‚‹ + +フィールドã«å¯¾ã™ã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã®å¤‰æ›´ã«é–¢ã™ã‚‹å‰ã®æ±ºå®šã‚’以下ã®ãƒ†ãƒ¼ãƒ–ルスキーマã«å映ã—ã¾ã™ã€‚ã¾ãŸã€ãƒ†ãƒ¼ãƒ–ルã®`ORDER BY`ã¨`PRIMARY KEY`を決定ã—ã¾ã™ã€‚å°‘ãªãã¨ã‚‚1ã¤ã®`ORDER BY`ã¾ãŸã¯`PRIMARY KEY`を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®æœ€å¾Œã«ã‚ã‚‹*次ã®ã‚¹ãƒ†ãƒƒãƒ—*セクションã§ã€ã‚³ãƒ©ãƒ ã‚’`ORDER BY`ã«å«ã‚ã‚‹ãŸã‚ã®ã‚¬ã‚¤ãƒ‰ãƒ©ã‚¤ãƒ³ã¨ã€ã‚ˆã‚Šè©³ã—ã„情報ãŒæä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### Order Byã¨Primary Keyã®å¥ + +- `ORDER BY`タプルã«ã¯ã‚¯ã‚¨ãƒªãƒ•ã‚£ãƒ«ã‚¿ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’å«ã‚ã‚‹ã¹ãã§ã™ +- ディスクã§ã®åœ§ç¸®ã‚’最大化ã™ã‚‹ãŸã‚ã€`ORDER BY`タプルã¯ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã®æ˜‡é †ã«ã™ã‚‹ã¹ãã§ã™ +- `PRIMARY KEY`タプルãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ã€`ORDER BY`タプルã®éƒ¨åˆ†é›†åˆã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“ +- `ORDER BY`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€åŒã˜ã‚¿ãƒ—ルãŒ`PRIMARY KEY`ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ +- `PRIMARY KEY`インデックスã¯æŒ‡å®šã•ã‚Œã¦ã„ã‚‹`PRIMARY KEY`タプルを用ã„ã¦ä½œæˆã•ã‚Œã‚‹ã‹ã€`ORDER BY`タプルを用ã„ã¦ä½œæˆã•ã‚Œã¾ã™ +- `PRIMARY KEY`インデックスã¯ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã«ä¿æŒã•ã‚Œã¾ã™ + +データセットを見ã¦ã€ãƒ‹ãƒ¥ãƒ¼ãƒ¨ãƒ¼ã‚¯å¸‚ã®5区ã«ãŠã‘る時間経éŽã«å¿œã˜ãŸå ±å‘Šã•ã‚ŒãŸçŠ¯ç½ªã®ç¨®é¡žã‚’調ã¹ã‚‹ã“ã¨ã«æ±ºã‚ãŸã¨ä»®å®šã—ã¾ã™ã€‚ã“れらã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’`ORDER BY`ã«å«ã‚ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ + +| カラム | データ辞書ã®èª¬æ˜Ž | +| ----------- | ----------------------------- | +| OFNS_DESC | キーコードã«å¯¾å¿œã™ã‚‹çŠ¯ç½ªã®èª¬æ˜Ž | +| RPT_DT | 警察ã«å ±å‘Šã•ã‚ŒãŸæ—¥ | +| BORO_NM | 発生場所ã®åœ°åŒºå | + +TSVファイルをクエリã—ã¦3ã¤ã®å€™è£œã‚«ãƒ©ãƒ ã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã‚’確èªã—ã¾ã™ï¼š + +```bash +clickhouse-local --input_format_max_rows_to_read_for_schema_inference=2000 \ +--query \ +"select formatReadableQuantity(uniq(OFNS_DESC)) as cardinality_OFNS_DESC, + formatReadableQuantity(uniq(RPT_DT)) as cardinality_RPT_DT, + formatReadableQuantity(uniq(BORO_NM)) as cardinality_BORO_NM + FROM + file('${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv', 'TSVWithNames') + FORMAT PrettyCompact" +``` + +çµæžœ: +```response +┌─cardinality_OFNS_DESC─┬─cardinality_RPT_DT─┬─cardinality_BORO_NM─┠+│ 60.00 │ 306.00 │ 6.00 │ +└───────────────────────┴────────────────────┴─────────────────────┘ +``` +カードリナリティを考慮ã™ã‚‹ã¨ã€`ORDER BY`ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +``` +ORDER BY ( BORO_NM, OFNS_DESC, RPT_DT ) +``` +:::note +ã“ã“ã§ã¯èª­ã¿ã‚„ã™ã„カラムåを使用ã—ã¦ãŠã‚Šã€ä¸Šè¨˜ã®åå‰ã¯æ¬¡ã®ã‚ˆã†ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚ +``` +ORDER BY ( borough, offense_description, date_reported ) +``` +::: + +データ型ã®å¤‰æ›´ã¨`ORDER BY`タプルをåˆã‚ã›ãŸãƒ†ãƒ¼ãƒ–ル構造ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +```sql +CREATE TABLE NYPD_Complaint ( + complaint_number String, + precinct UInt8, + borough LowCardinality(String), + complaint_begin DateTime64(0,'America/New_York'), + complaint_end DateTime64(0,'America/New_York'), + was_crime_completed String, + housing_authority String, + housing_level_code UInt32, + jurisdiction_code UInt8, + jurisdiction LowCardinality(String), + offense_code UInt8, + offense_level LowCardinality(String), + location_descriptor LowCardinality(String), + offense_description LowCardinality(String), + park_name LowCardinality(String), + patrol_borough LowCardinality(String), + PD_CD UInt16, + PD_DESC String, + location_type LowCardinality(String), + date_reported Date, + transit_station LowCardinality(String), + suspect_age_group LowCardinality(String), + suspect_race LowCardinality(String), + suspect_sex LowCardinality(String), + transit_district UInt8, + victim_age_group LowCardinality(String), + victim_race LowCardinality(String), + victim_sex LowCardinality(String), + NY_x_coordinate UInt32, + NY_y_coordinate UInt32, + Latitude Float64, + Longitude Float64 +) ENGINE = MergeTree + ORDER BY ( borough, offense_description, date_reported ) +``` + +### テーブルã®ä¸»ã‚­ãƒ¼ã‚’見ã¤ã‘ã‚‹ + +ClickHouseã®`system`データベースã€ç‰¹ã«`system.table`ã«ã¯ã€ä»Šä½œæˆã—ãŸãƒ†ãƒ¼ãƒ–ルã«é–¢ã™ã‚‹ã™ã¹ã¦ã®æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯`ORDER BY`(ソートキー)ã¨`PRIMARY KEY`を表示ã—ã¾ã™ã€‚ +```sql +SELECT + partition_key, + sorting_key, + primary_key, + table +FROM system.tables +WHERE table = 'NYPD_Complaint' +FORMAT Vertical +``` + +レスãƒãƒ³ã‚¹: +```response +Query id: 6a5b10bf-9333-4090-b36e-c7f08b1d9e01 + +Row 1: +────── +partition_key: +sorting_key: borough, offense_description, date_reported +primary_key: borough, offense_description, date_reported +table: NYPD_Complaint + +1 row in set. Elapsed: 0.001 sec. +``` + +## データã®å‰å‡¦ç†ã¨ã‚¤ãƒ³ãƒãƒ¼ãƒˆ {#preprocess-import-data} + +データå‰å‡¦ç†ã«`clickhouse-local`ツールを使用ã—ã€ã‚¢ãƒƒãƒ—ロードã«ã¯`clickhouse-client`を使ã„ã¾ã™ã€‚ + +### 使用ã™ã‚‹`clickhouse-local`引数 + +:::tip +`clickhouse-local`ã®å¼•æ•°ã«`table='input'`ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚clickhouse-localã¯æä¾›ã•ã‚ŒãŸå…¥åŠ›ï¼ˆ`cat ${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv`)をå—ã‘å–ã‚Šã€ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã—ã¾ã™ã€‚デフォルトã§ã¯ãã®ãƒ†ãƒ¼ãƒ–ルåã¯`table`ã§ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ãƒ­ãƒ¼ã‚’明確ã«ã™ã‚‹ãŸã‚ã«ãƒ†ãƒ¼ãƒ–ルåã‚’`input`ã«è¨­å®šã—ã¦ã„ã¾ã™ã€‚clickhouse-localã¸ã®æœ€çµ‚引数ã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰é¸æŠžã™ã‚‹ã‚¯ã‚¨ãƒªï¼ˆ`FROM input`)ã§ã€ã“れを`clickhouse-client`ã«ãƒ‘イプã—ã¦ãƒ†ãƒ¼ãƒ–ル`NYPD_Complaint`を入力ã—ã¾ã™ã€‚ +::: + +```sql +cat ${HOME}/NYPD_Complaint_Data_Current__Year_To_Date_.tsv \ + | clickhouse-local --table='input' --input-format='TSVWithNames' \ + --input_format_max_rows_to_read_for_schema_inference=2000 \ + --query " + WITH (CMPLNT_FR_DT || ' ' || CMPLNT_FR_TM) AS CMPLNT_START, + (CMPLNT_TO_DT || ' ' || CMPLNT_TO_TM) AS CMPLNT_END + SELECT + CMPLNT_NUM AS complaint_number, + ADDR_PCT_CD AS precinct, + BORO_NM AS borough, + parseDateTime64BestEffort(CMPLNT_START) AS complaint_begin, + parseDateTime64BestEffortOrNull(CMPLNT_END) AS complaint_end, + CRM_ATPT_CPTD_CD AS was_crime_completed, + HADEVELOPT AS housing_authority_development, + HOUSING_PSA AS housing_level_code, + JURISDICTION_CODE AS jurisdiction_code, + JURIS_DESC AS jurisdiction, + KY_CD AS offense_code, + LAW_CAT_CD AS offense_level, + LOC_OF_OCCUR_DESC AS location_descriptor, + OFNS_DESC AS offense_description, + PARKS_NM AS park_name, + PATROL_BORO AS patrol_borough, + PD_CD, + PD_DESC, + PREM_TYP_DESC AS location_type, + toDate(parseDateTimeBestEffort(RPT_DT)) AS date_reported, + STATION_NAME AS transit_station, + SUSP_AGE_GROUP AS suspect_age_group, + SUSP_RACE AS suspect_race, + SUSP_SEX AS suspect_sex, + TRANSIT_DISTRICT AS transit_district, + VIC_AGE_GROUP AS victim_age_group, + VIC_RACE AS victim_race, + VIC_SEX AS victim_sex, + X_COORD_CD AS NY_x_coordinate, + Y_COORD_CD AS NY_y_coordinate, + Latitude, + Longitude + FROM input" \ + | clickhouse-client --query='INSERT INTO NYPD_Complaint FORMAT TSV' +``` + +## データã®æ¤œè¨¼ {#validate-data} + +:::note +データセットã¯å¹´ã«ä¸€åº¦ä»¥ä¸Šå¤‰ã‚ã‚Šã¾ã™ã®ã§ã€ã‚«ã‚¦ãƒ³ãƒˆãŒã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¨ä¸€è‡´ã—ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +::: + +クエリ: + +```sql +SELECT count() +FROM NYPD_Complaint +``` + +çµæžœ: + +```text +┌─count()─┠+│ 208993 │ +└─────────┘ + +1 row in set. Elapsed: 0.001 sec. +``` + +ClickHouse内ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ã‚µã‚¤ã‚ºã¯ã€å…ƒã®TSVファイルã®ã‚ãšã‹12%ã§ã™ã€‚å…ƒã®TSVファイルã®ã‚µã‚¤ã‚ºã¨ãƒ†ãƒ¼ãƒ–ルã®ã‚µã‚¤ã‚ºã‚’比較ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT formatReadableSize(total_bytes) +FROM system.tables +WHERE name = 'NYPD_Complaint' +``` + +çµæžœ: +```text +┌─formatReadableSize(total_bytes)─┠+│ 8.63 MiB │ +└─────────────────────────────────┘ +``` + +## クエリを実行ã™ã‚‹ {#run-queries} + +### クエリ1. 月ã”ã¨ã®è‹¦æƒ…数を比較ã™ã‚‹ + +クエリ: + +```sql +SELECT + dateName('month', date_reported) AS month, + count() AS complaints, + bar(complaints, 0, 50000, 80) +FROM NYPD_Complaint +GROUP BY month +ORDER BY complaints DESC +``` + +çµæžœ: +```response +Query id: 7fbd4244-b32a-4acf-b1f3-c3aa198e74d9 + +┌─month─────┬─complaints─┬─bar(count(), 0, 50000, 80)───────────────────────────────┠+│ March │ 34536 │ ███████████████████████████████████████████████████████▎ │ +│ May │ 34250 │ ██████████████████████████████████████████████████████▋ │ +│ April │ 32541 │ ████████████████████████████████████████████████████ │ +│ January │ 30806 │ █████████████████████████████████████████████████▎ │ +│ February │ 28118 │ ████████████████████████████████████████████▊ │ +│ November │ 7474 │ ███████████▊ │ +│ December │ 7223 │ ███████████▌ │ +│ October │ 7070 │ ███████████▎ │ +│ September │ 6910 │ ███████████ │ +│ August │ 6801 │ ██████████▊ │ +│ June │ 6779 │ ██████████▋ │ +│ July │ 6485 │ ██████████■│ +└───────────┴────────────┴──────────────────────────────────────────────────────────┘ + +12 rows in set. Elapsed: 0.006 sec. Processed 208.99 thousand rows, 417.99 KB (37.48 million rows/s., 74.96 MB/s.) +``` + +### クエリ2. 地区ã”ã¨ã®ç·è‹¦æƒ…数を比較ã™ã‚‹ + +クエリ: + +```sql +SELECT + borough, + count() AS complaints, + bar(complaints, 0, 125000, 60) +FROM NYPD_Complaint +GROUP BY borough +ORDER BY complaints DESC +``` + +çµæžœ: +```response +Query id: 8cdcdfd4-908f-4be0-99e3-265722a2ab8d + +┌─borough───────┬─complaints─┬─bar(count(), 0, 125000, 60)──┠+│ BROOKLYN │ 57947 │ ███████████████████████████▋ │ +│ MANHATTAN │ 53025 │ █████████████████████████■│ +│ QUEENS │ 44875 │ █████████████████████▌ │ +│ BRONX │ 44260 │ █████████████████████■│ +│ STATEN ISLAND │ 8503 │ ████ │ +│ (null) │ 383 │ ■│ +└───────────────┴────────────┴──────────────────────────────┘ + +6 rows in set. Elapsed: 0.008 sec. Processed 208.99 thousand rows, 209.43 KB (27.14 million rows/s., 27.20 MB/s.) +``` + +## 次ã®ã‚¹ãƒ†ãƒƒãƒ— + +[A Practical Introduction to Sparse Primary Indexes in ClickHouse](/docs/ja/guides/best-practices/sparse-primary-indexes.md)ã¯ã€ClickHouseã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒå¾“æ¥ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã©ã®ã‚ˆã†ã«ç•°ãªã‚‹ã‹ã€ClickHouseãŒã‚¹ãƒ‘ースãªãƒ—ライマリインデックスをã©ã®ã‚ˆã†ã«ä½œæˆã—使用ã™ã‚‹ã‹ã€ãã—ã¦ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒ™ã‚¹ãƒˆãƒ—ラクティスã«ã¤ã„ã¦è§£èª¬ã—ã¾ã™ã€‚ diff --git a/docs/ja/getting-started/example-datasets/ontime.md b/docs/ja/getting-started/example-datasets/ontime.md new file mode 100644 index 00000000000..166af81fc0d --- /dev/null +++ b/docs/ja/getting-started/example-datasets/ontime.md @@ -0,0 +1,398 @@ +--- +slug: /ja/getting-started/example-datasets/ontime +sidebar_label: OnTime 航空便データ +description: 航空便ã®ã‚ªãƒ³ã‚¿ã‚¤ãƒ ãƒ‘フォーマンスをå«ã‚€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ +--- + +# OnTime + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€äº¤é€šçµ±è¨ˆå±€ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ + +``` sql +CREATE TABLE `ontime` +( + `Year` UInt16, + `Quarter` UInt8, + `Month` UInt8, + `DayofMonth` UInt8, + `DayOfWeek` UInt8, + `FlightDate` Date, + `Reporting_Airline` LowCardinality(String), + `DOT_ID_Reporting_Airline` Int32, + `IATA_CODE_Reporting_Airline` LowCardinality(String), + `Tail_Number` LowCardinality(String), + `Flight_Number_Reporting_Airline` LowCardinality(String), + `OriginAirportID` Int32, + `OriginAirportSeqID` Int32, + `OriginCityMarketID` Int32, + `Origin` FixedString(5), + `OriginCityName` LowCardinality(String), + `OriginState` FixedString(2), + `OriginStateFips` FixedString(2), + `OriginStateName` LowCardinality(String), + `OriginWac` Int32, + `DestAirportID` Int32, + `DestAirportSeqID` Int32, + `DestCityMarketID` Int32, + `Dest` FixedString(5), + `DestCityName` LowCardinality(String), + `DestState` FixedString(2), + `DestStateFips` FixedString(2), + `DestStateName` LowCardinality(String), + `DestWac` Int32, + `CRSDepTime` Int32, + `DepTime` Int32, + `DepDelay` Int32, + `DepDelayMinutes` Int32, + `DepDel15` Int32, + `DepartureDelayGroups` LowCardinality(String), + `DepTimeBlk` LowCardinality(String), + `TaxiOut` Int32, + `WheelsOff` LowCardinality(String), + `WheelsOn` LowCardinality(String), + `TaxiIn` Int32, + `CRSArrTime` Int32, + `ArrTime` Int32, + `ArrDelay` Int32, + `ArrDelayMinutes` Int32, + `ArrDel15` Int32, + `ArrivalDelayGroups` LowCardinality(String), + `ArrTimeBlk` LowCardinality(String), + `Cancelled` Int8, + `CancellationCode` FixedString(1), + `Diverted` Int8, + `CRSElapsedTime` Int32, + `ActualElapsedTime` Int32, + `AirTime` Int32, + `Flights` Int32, + `Distance` Int32, + `DistanceGroup` Int8, + `CarrierDelay` Int32, + `WeatherDelay` Int32, + `NASDelay` Int32, + `SecurityDelay` Int32, + `LateAircraftDelay` Int32, + `FirstDepTime` Int16, + `TotalAddGTime` Int16, + `LongestAddGTime` Int16, + `DivAirportLandings` Int8, + `DivReachedDest` Int8, + `DivActualElapsedTime` Int16, + `DivArrDelay` Int16, + `DivDistance` Int16, + `Div1Airport` LowCardinality(String), + `Div1AirportID` Int32, + `Div1AirportSeqID` Int32, + `Div1WheelsOn` Int16, + `Div1TotalGTime` Int16, + `Div1LongestGTime` Int16, + `Div1WheelsOff` Int16, + `Div1TailNum` LowCardinality(String), + `Div2Airport` LowCardinality(String), + `Div2AirportID` Int32, + `Div2AirportSeqID` Int32, + `Div2WheelsOn` Int16, + `Div2TotalGTime` Int16, + `Div2LongestGTime` Int16, + `Div2WheelsOff` Int16, + `Div2TailNum` LowCardinality(String), + `Div3Airport` LowCardinality(String), + `Div3AirportID` Int32, + `Div3AirportSeqID` Int32, + `Div3WheelsOn` Int16, + `Div3TotalGTime` Int16, + `Div3LongestGTime` Int16, + `Div3WheelsOff` Int16, + `Div3TailNum` LowCardinality(String), + `Div4Airport` LowCardinality(String), + `Div4AirportID` Int32, + `Div4AirportSeqID` Int32, + `Div4WheelsOn` Int16, + `Div4TotalGTime` Int16, + `Div4LongestGTime` Int16, + `Div4WheelsOff` Int16, + `Div4TailNum` LowCardinality(String), + `Div5Airport` LowCardinality(String), + `Div5AirportID` Int32, + `Div5AirportSeqID` Int32, + `Div5WheelsOn` Int16, + `Div5TotalGTime` Int16, + `Div5LongestGTime` Int16, + `Div5WheelsOff` Int16, + `Div5TailNum` LowCardinality(String) +) ENGINE = MergeTree + ORDER BY (Year, Quarter, Month, DayofMonth, FlightDate, IATA_CODE_Reporting_Airline); +``` + +## 生データã‹ã‚‰ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ {#import-from-raw-data} + +データã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰: + +``` bash +wget --no-check-certificate --continue https://transtats.bts.gov/PREZIP/On_Time_Reporting_Carrier_On_Time_Performance_1987_present_{1987..2022}_{1..12}.zip +``` + +マルãƒã‚¹ãƒ¬ãƒƒãƒ‰ã§ã®ãƒ‡ãƒ¼ã‚¿èª­ã¿è¾¼ã¿: + +``` bash +ls -1 *.zip | xargs -I{} -P $(nproc) bash -c "echo {}; unzip -cq {} '*.csv' | sed 's/\.00//g' | clickhouse-client --input_format_csv_empty_as_default 1 --query='INSERT INTO ontime FORMAT CSVWithNames'" +``` + +(サーãƒã§ãƒ¡ãƒ¢ãƒªä¸è¶³ã¾ãŸã¯ä»–ã®å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã€`-P $(nproc)` 部分を削除ã—ã¦ãã ã•ã„) + +## ä¿å­˜æ¸ˆã¿ã®ã‚³ãƒ”ーã‹ã‚‰ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +代替ã¨ã—ã¦ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¦ä¿å­˜æ¸ˆã¿ã®ã‚³ãƒ”ーã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã§ãã¾ã™: + +``` +INSERT INTO ontime SELECT * FROM s3('https://clickhouse-public-datasets.s3.amazonaws.com/ontime/csv_by_year/*.csv.gz', CSVWithNames) SETTINGS max_insert_threads = 40; +``` + +ã“ã®ã‚¹ãƒŠãƒƒãƒ—ショットã¯2022-05-29ã«ä½œæˆã•ã‚Œã¾ã—ãŸã€‚ + +## クエリ {#queries} + +Q0. + +``` sql +SELECT avg(c1) +FROM +( + SELECT Year, Month, count(*) AS c1 + FROM ontime + GROUP BY Year, Month +); +``` + +Q1. 2000å¹´ã‹ã‚‰2008å¹´ã®1æ—¥ã‚ãŸã‚Šã®ä¾¿æ•° + +``` sql +SELECT DayOfWeek, count(*) AS c +FROM ontime +WHERE Year>=2000 AND Year<=2008 +GROUP BY DayOfWeek +ORDER BY c DESC; +``` + +Q2. 10分以上é…延ã—ãŸä¾¿ã®æ•°ã€2000-2008å¹´ã®æ›œæ—¥ã”ã¨ã®ã‚°ãƒ«ãƒ¼ãƒ— + +``` sql +SELECT DayOfWeek, count(*) AS c +FROM ontime +WHERE DepDelay>10 AND Year>=2000 AND Year<=2008 +GROUP BY DayOfWeek +ORDER BY c DESC; +``` + +Q3. 2000-2008å¹´ã®ç©ºæ¸¯åˆ¥ã®é…延数 + +``` sql +SELECT Origin, count(*) AS c +FROM ontime +WHERE DepDelay>10 AND Year>=2000 AND Year<=2008 +GROUP BY Origin +ORDER BY c DESC +LIMIT 10; +``` + +Q4. 2007å¹´ã®ç©ºæ¸¯ã”ã¨ã®é…延数 + +``` sql +SELECT IATA_CODE_Reporting_Airline AS Carrier, count(*) +FROM ontime +WHERE DepDelay>10 AND Year=2007 +GROUP BY Carrier +ORDER BY count(*) DESC; +``` + +Q5. 2007å¹´ã®èˆªç©ºä¼šç¤¾ã”ã¨ã®é…å»¶å‰²åˆ + +``` sql +SELECT Carrier, c, c2, c*100/c2 as c3 +FROM +( + SELECT + IATA_CODE_Reporting_Airline AS Carrier, + count(*) AS c + FROM ontime + WHERE DepDelay>10 + AND Year=2007 + GROUP BY Carrier +) q +JOIN +( + SELECT + IATA_CODE_Reporting_Airline AS Carrier, + count(*) AS c2 + FROM ontime + WHERE Year=2007 + GROUP BY Carrier +) qq USING Carrier +ORDER BY c3 DESC; +``` + +åŒã˜ã‚¯ã‚¨ãƒªã®æ”¹è‰¯ç‰ˆ: + +``` sql +SELECT IATA_CODE_Reporting_Airline AS Carrier, avg(DepDelay>10)*100 AS c3 +FROM ontime +WHERE Year=2007 +GROUP BY Carrier +ORDER BY c3 DESC +``` + +Q6. 2000-2008å¹´ã®åºƒç¯„ãªå¹´ç¯„囲ã®ãŸã‚ + +``` sql +SELECT Carrier, c, c2, c*100/c2 as c3 +FROM +( + SELECT + IATA_CODE_Reporting_Airline AS Carrier, + count(*) AS c + FROM ontime + WHERE DepDelay>10 + AND Year>=2000 AND Year<=2008 + GROUP BY Carrier +) q +JOIN +( + SELECT + IATA_CODE_Reporting_Airline AS Carrier, + count(*) AS c2 + FROM ontime + WHERE Year>=2000 AND Year<=2008 + GROUP BY Carrier +) qq USING Carrier +ORDER BY c3 DESC; +``` + +åŒã˜ã‚¯ã‚¨ãƒªã®æ”¹è‰¯ç‰ˆ: + +``` sql +SELECT IATA_CODE_Reporting_Airline AS Carrier, avg(DepDelay>10)*100 AS c3 +FROM ontime +WHERE Year>=2000 AND Year<=2008 +GROUP BY Carrier +ORDER BY c3 DESC; +``` + +Q7. å¹´ã”ã¨ã®10分以上ã®é…延便ã®å‰²åˆ + +``` sql +SELECT Year, c1/c2 +FROM +( + select + Year, + count(*)*100 as c1 + from ontime + WHERE DepDelay>10 + GROUP BY Year +) q +JOIN +( + select + Year, + count(*) as c2 + from ontime + GROUP BY Year +) qq USING (Year) +ORDER BY Year; +``` + +åŒã˜ã‚¯ã‚¨ãƒªã®æ”¹è‰¯ç‰ˆ: + +``` sql +SELECT Year, avg(DepDelay>10)*100 +FROM ontime +GROUP BY Year +ORDER BY Year; +``` + +Q8. 直接接続ã•ã‚ŒãŸéƒ½å¸‚æ•°ã«ã‚ˆã‚‹æœ€ã‚‚人気ã®ã‚る目的地ã€ã•ã¾ã–ã¾ãªå¹´ã®ç¯„囲 + +``` sql +SELECT DestCityName, uniqExact(OriginCityName) AS u +FROM ontime +WHERE Year >= 2000 and Year <= 2010 +GROUP BY DestCityName +ORDER BY u DESC LIMIT 10; +``` + +Q9. + +``` sql +SELECT Year, count(*) AS c1 +FROM ontime +GROUP BY Year; +``` + +Q10. + +``` sql +SELECT + min(Year), max(Year), IATA_CODE_Reporting_Airline AS Carrier, count(*) AS cnt, + sum(ArrDelayMinutes>30) AS flights_delayed, + round(sum(ArrDelayMinutes>30)/count(*),2) AS rate +FROM ontime +WHERE + DayOfWeek NOT IN (6,7) AND OriginState NOT IN ('AK', 'HI', 'PR', 'VI') + AND DestState NOT IN ('AK', 'HI', 'PR', 'VI') + AND FlightDate < '2010-01-01' +GROUP by Carrier +HAVING cnt>100000 and max(Year)>1990 +ORDER by rate DESC +LIMIT 1000; +``` + +ボーナス: + +``` sql +SELECT avg(cnt) +FROM +( + SELECT Year,Month,count(*) AS cnt + FROM ontime + WHERE DepDel15=1 + GROUP BY Year,Month +); + +SELECT avg(c1) FROM +( + SELECT Year,Month,count(*) AS c1 + FROM ontime + GROUP BY Year,Month +); + +SELECT DestCityName, uniqExact(OriginCityName) AS u +FROM ontime +GROUP BY DestCityName +ORDER BY u DESC +LIMIT 10; + +SELECT OriginCityName, DestCityName, count() AS c +FROM ontime +GROUP BY OriginCityName, DestCityName +ORDER BY c DESC +LIMIT 10; + +SELECT OriginCityName, count() AS c +FROM ontime +GROUP BY OriginCityName +ORDER BY c DESC +LIMIT 10; +``` + +ã¾ãŸã€Playgroundã§ãƒ‡ãƒ¼ã‚¿ã‚’æ“作ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚[例](https://sql.clickhouse.com?query_id=M4FSVBVMSHY98NKCQP8N4K)。 + +ã“ã®æ€§èƒ½ãƒ†ã‚¹ãƒˆã¯Vadim Tkachenkoã«ã‚ˆã£ã¦ä½œæˆã•ã‚Œã¾ã—ãŸã€‚次をå‚ç…§ã—ã¦ãã ã•ã„: + +- https://www.percona.com/blog/2009/10/02/analyzing-air-traffic-performance-with-infobright-and-monetdb/ +- https://www.percona.com/blog/2009/10/26/air-traffic-queries-in-luciddb/ +- https://www.percona.com/blog/2009/11/02/air-traffic-queries-in-infinidb-early-alpha/ +- https://www.percona.com/blog/2014/04/21/using-apache-hadoop-and-impala-together-with-mysql-for-data-analysis/ +- https://www.percona.com/blog/2016/01/07/apache-spark-with-air-ontime-performance-data/ +- http://nickmakos.blogspot.ru/2012/08/analyzing-air-traffic-performance-with.html diff --git a/docs/ja/getting-started/example-datasets/opensky.md b/docs/ja/getting-started/example-datasets/opensky.md new file mode 100644 index 00000000000..153d3228143 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/opensky.md @@ -0,0 +1,420 @@ +--- +slug: /ja/getting-started/example-datasets/opensky +sidebar_label: 航空交通データ +description: ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ãƒ‡ãƒ¼ã‚¿ã¯ã€COVID-19パンデミックã®é–“ã«ãŠã‘る航空交通ã®ç™ºå±•ã‚’示ã™ãŸã‚ã«ã€å®Œå…¨ãªOpenSkyデータセットã‹ã‚‰æ´¾ç”ŸãŠã‚ˆã³ã‚¯ãƒªãƒ¼ãƒ‹ãƒ³ã‚°ã•ã‚ŒãŸã‚‚ã®ã§ã™ã€‚ +title: "The OpenSky Network 2020ã«ã‚ˆã‚‹ã‚¯ãƒ©ã‚¦ãƒ‰ã‚½ãƒ¼ã‚¹ã®èˆªç©ºäº¤é€šãƒ‡ãƒ¼ã‚¿" +--- + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ãƒ‡ãƒ¼ã‚¿ã¯ã€COVID-19パンデミックã®é–“ã®èˆªç©ºäº¤é€šã®ç™ºå±•ã‚’示ã™ãŸã‚ã«ã€å®Œå…¨ãªOpenSkyデータセットã‹ã‚‰æ´¾ç”ŸãŠã‚ˆã³ã‚¯ãƒªãƒ¼ãƒ‹ãƒ³ã‚°ã•ã‚ŒãŸã‚‚ã®ã§ã™ã€‚ã“ã‚Œã¯ã€2019å¹´1月1日以é™ã«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®2500人以上ã®ãƒ¡ãƒ³ãƒãƒ¼ã«ã‚ˆã£ã¦è¦‹ã‚‰ã‚ŒãŸã™ã¹ã¦ã®ãƒ•ãƒ©ã‚¤ãƒˆã‚’網羅ã—ã¦ã„ã¾ã™ã€‚COVID-19パンデミックãŒçµ‚了ã™ã‚‹ã¾ã§ã€å®šæœŸçš„ã«ãƒ‡ãƒ¼ã‚¿ãŒãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +出典: https://zenodo.org/records/5092942 + +Martin Strohmeier, Xavier Olive, Jannis Luebbe, Matthias Schaefer, and Vincent Lenders +"OpenSky Networkã‹ã‚‰ã®ã‚¯ãƒ©ã‚¦ãƒ‰ã‚½ãƒ¼ã‚¹ã•ã‚ŒãŸèˆªç©ºäº¤é€šãƒ‡ãƒ¼ã‚¿ 2019–2020" +地çƒã‚·ã‚¹ãƒ†ãƒ ç§‘学データ 13(2), 2021 +https://doi.org/10.5194/essd-13-357-2021 + +## データセットã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ {#download-dataset} + +以下ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™: + +```bash +wget -O- https://zenodo.org/records/5092942 | grep -oE 'https://zenodo.org/records/5092942/files/flightlist_[0-9]+_[0-9]+\.csv\.gz' | xargs wget +``` + +ダウンロードã«ã¯è‰¯å¥½ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆæŽ¥ç¶šã§ç´„2分ã‹ã‹ã‚Šã¾ã™ã€‚åˆè¨ˆã‚µã‚¤ã‚º4.3 GBã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒ30個ã‚ã‚Šã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#create-table} + +```sql +CREATE TABLE opensky +( + callsign String, + number String, + icao24 String, + registration String, + typecode String, + origin String, + destination String, + firstseen DateTime, + lastseen DateTime, + day DateTime, + latitude_1 Float64, + longitude_1 Float64, + altitude_1 Float64, + latitude_2 Float64, + longitude_2 Float64, + altitude_2 Float64 +) ENGINE = MergeTree ORDER BY (origin, destination, callsign); +``` + +## データã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ {#import-data} + +ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’並列ã§ã‚¢ãƒƒãƒ—ロードã—ã¾ã™: + +```bash +ls -1 flightlist_*.csv.gz | xargs -P100 -I{} bash -c 'gzip -c -d "{}" | clickhouse-client --date_time_input_format best_effort --query "INSERT INTO opensky FORMAT CSVWithNames"' +``` + +- ã“ã“ã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒªã‚¹ãƒˆ (`ls -1 flightlist_*.csv.gz`) ã‚’ `xargs` ã«æ¸¡ã—ã¦ä¸¦åˆ—処ç†ã‚’è¡Œã„ã¾ã™ã€‚ +`xargs -P100` ã¯æœ€å¤§100ã®ä¸¦åˆ—ワーカーを使用ã™ã‚‹ã“ã¨ã‚’指定ã—ã¾ã™ãŒã€ãƒ•ã‚¡ã‚¤ãƒ«ã¯30個ã—ã‹ãªã„ãŸã‚ã€ãƒ¯ãƒ¼ã‚«ãƒ¼ã®æ•°ã¯30個ã ã‘ã«ãªã‚Šã¾ã™ã€‚ +- å„ファイルã«ã¤ã„ã¦ã€`xargs` 㯠`bash -c` を使ã£ã¦ã‚¹ã‚¯ãƒªãƒ—トを実行ã—ã¾ã™ã€‚スクリプト内ã«ã¯ `{}` å½¢å¼ã®ç½®æ›ãŒã‚ã‚Šã¾ã™ã€‚`xargs` コマンドã¯ãã®ãƒ•ã‚¡ã‚¤ãƒ«åを代入ã—ã¾ã™ (`-I{}` を指定ã—ã¦ã„ã¾ã™)。 +- スクリプトã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚’解å‡ã— (`gzip -c -d "{}"`)ã€æ¨™æº–出力ã«å‡ºåŠ›ã—ã¾ã™ (`-c` パラメータ) ãã®å‡ºåŠ›ã¯ `clickhouse-client` ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•ã‚Œã¾ã™ã€‚ +- ã¾ãŸã€ISO-8601å½¢å¼ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’èªè­˜ã™ã‚‹ãŸã‚ã«ã€[DateTime](../../sql-reference/data-types/datetime.md)フィールドã®è§£æžã‚‚è¦æ±‚ã—ã¦ã„ã¾ã™ ([--date_time_input_format best_effort](../../operations/settings/settings-formats.md#settings-date_time_input_format))。 + +最終的ã«ã€`clickhouse-client` ãŒæŒ¿å…¥ã‚’è¡Œã„ã¾ã™ã€‚入力データ㯠[CSVWithNames](../../interfaces/formats.md#csvwithnames) å½¢å¼ã§èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ + +並列アップロードã«ã¯24秒ã‹ã‹ã‚Šã¾ã™ã€‚ + +並列アップロードãŒå¥½ã¾ã—ããªã„å ´åˆã€ã“ã¡ã‚‰ã¯é€æ¬¡åž‹ã®ä»£æ›¿æ–¹æ³•ã§ã™: + +```bash +for file in flightlist_*.csv.gz; do gzip -c -d "$file" | clickhouse-client --date_time_input_format best_effort --query "INSERT INTO opensky FORMAT CSVWithNames"; done +``` + +## データã®æ¤œè¨¼ {#validate-data} + +クエリ: + +```sql +SELECT count() FROM opensky; +``` + +çµæžœ: + +```text +┌──count()─┠+│ 66010819 │ +└──────────┘ +``` + +ClickHouseã«ãŠã‘るデータセットã®ã‚µã‚¤ã‚ºã¯ã‚ãšã‹2.66 GiBã§ã™ã€‚確èªã—ã¦ãã ã•ã„。 + +クエリ: + +```sql +SELECT formatReadableSize(total_bytes) FROM system.tables WHERE name = 'opensky'; +``` + +çµæžœ: + +```text +┌─formatReadableSize(total_bytes)─┠+│ 2.66 GiB │ +└─────────────────────────────────┘ +``` + +## 一部ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ {#run-queries} + +移動ã—ãŸåˆè¨ˆè·é›¢ã¯680億キロメートルã§ã™ã€‚ + +クエリ: + +```sql +SELECT formatReadableQuantity(sum(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)) / 1000) FROM opensky; +``` + +çµæžœ: + +```text +┌─formatReadableQuantity(divide(sum(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)), 1000))─┠+│ 68.72 billion │ +└──────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +å¹³å‡çš„ãªãƒ•ãƒ©ã‚¤ãƒˆè·é›¢ã¯ç´„1000kmã§ã™ã€‚ + +クエリ: + +```sql +SELECT round(avg(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)), 2) FROM opensky; +``` + +çµæžœ: + +```text + ┌─round(avg(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)), 2)─┠+1. │ 1041090.67 │ -- 1.04 million + └──────────────────────────────────────────────────────────────────────────────┘ +``` + +### 最も混雑ã—ãŸç™ºç€ç©ºæ¸¯ã¨è¦‹ã‚‰ã‚Œã‚‹å¹³å‡è·é›¢ {#busy-airports-average-distance} + +クエリ: + +```sql +SELECT + origin, + count(), + round(avg(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2))) AS distance, + bar(distance, 0, 10000000, 100) AS bar +FROM opensky +WHERE origin != '' +GROUP BY origin +ORDER BY count() DESC +LIMIT 100; +``` + +çµæžœ: + +```text + ┌─origin─┬─count()─┬─distance─┬─bar────────────────────────────────────┠+ 1. │ KORD │ 745007 │ 1546108 │ ███████████████■│ + 2. │ KDFW │ 696702 │ 1358721 │ █████████████▌ │ + 3. │ KATL │ 667286 │ 1169661 │ ███████████▋ │ + 4. │ KDEN │ 582709 │ 1287742 │ ████████████▊ │ + 5. │ KLAX │ 581952 │ 2628393 │ ██████████████████████████▎ │ + 6. │ KLAS │ 447789 │ 1336967 │ █████████████▎ │ + 7. │ KPHX │ 428558 │ 1345635 │ █████████████■│ + 8. │ KSEA │ 412592 │ 1757317 │ █████████████████▌ │ + 9. │ KCLT │ 404612 │ 880355 │ ████████▋ │ + 10. │ VIDP │ 363074 │ 1445052 │ ██████████████■│ + 11. │ EDDF │ 362643 │ 2263960 │ ██████████████████████▋ │ + 12. │ KSFO │ 361869 │ 2445732 │ ████████████████████████■│ + 13. │ KJFK │ 349232 │ 2996550 │ █████████████████████████████▊ │ + 14. │ KMSP │ 346010 │ 1287328 │ ████████████▋ │ + 15. │ LFPG │ 344748 │ 2206203 │ ██████████████████████ │ + 16. │ EGLL │ 341370 │ 3216593 │ ████████████████████████████████■│ + 17. │ EHAM │ 340272 │ 2116425 │ █████████████████████■│ + 18. │ KEWR │ 337696 │ 1826545 │ ██████████████████▎ │ + 19. │ KPHL │ 320762 │ 1291761 │ ████████████▊ │ + 20. │ OMDB │ 308855 │ 2855706 │ ████████████████████████████▌ │ + 21. │ UUEE │ 307098 │ 1555122 │ ███████████████▌ │ + 22. │ KBOS │ 304416 │ 1621675 │ ████████████████■│ + 23. │ LEMD │ 291787 │ 1695097 │ ████████████████▊ │ + 24. │ YSSY │ 272979 │ 1875298 │ ██████████████████▋ │ + 25. │ KMIA │ 265121 │ 1923542 │ ███████████████████■│ + 26. │ ZGSZ │ 263497 │ 745086 │ ███████■│ + 27. │ EDDM │ 256691 │ 1361453 │ █████████████▌ │ + 28. │ WMKK │ 254264 │ 1626688 │ ████████████████▎ │ + 29. │ CYYZ │ 251192 │ 2175026 │ █████████████████████▋ │ + 30. │ KLGA │ 248699 │ 1106935 │ ███████████ │ + 31. │ VHHH │ 248473 │ 3457658 │ ██████████████████████████████████▌ │ + 32. │ RJTT │ 243477 │ 1272744 │ ████████████▋ │ + 33. │ KBWI │ 241440 │ 1187060 │ ███████████▋ │ + 34. │ KIAD │ 239558 │ 1683485 │ ████████████████▋ │ + 35. │ KIAH │ 234202 │ 1538335 │ ███████████████■│ + 36. │ KFLL │ 223447 │ 1464410 │ ██████████████▋ │ + 37. │ KDAL │ 212055 │ 1082339 │ ██████████▋ │ + 38. │ KDCA │ 207883 │ 1013359 │ ██████████■│ + 39. │ LIRF │ 207047 │ 1427965 │ ██████████████▎ │ + 40. │ PANC │ 206007 │ 2525359 │ █████████████████████████▎ │ + 41. │ LTFJ │ 205415 │ 860470 │ ████████▌ │ + 42. │ KDTW │ 204020 │ 1106716 │ ███████████ │ + 43. │ VABB │ 201679 │ 1300865 │ █████████████ │ + 44. │ OTHH │ 200797 │ 3759544 │ █████████████████████████████████████▌ │ + 45. │ KMDW │ 200796 │ 1232551 │ ████████████▎ │ + 46. │ KSAN │ 198003 │ 1495195 │ ██████████████▊ │ + 47. │ KPDX │ 197760 │ 1269230 │ ████████████▋ │ + 48. │ SBGR │ 197624 │ 2041697 │ ████████████████████■│ + 49. │ VOBL │ 189011 │ 1040180 │ ██████████■│ + 50. │ LEBL │ 188956 │ 1283190 │ ████████████▋ │ + 51. │ YBBN │ 188011 │ 1253405 │ ████████████▌ │ + 52. │ LSZH │ 187934 │ 1572029 │ ███████████████▋ │ + 53. │ YMML │ 187643 │ 1870076 │ ██████████████████▋ │ + 54. │ RCTP │ 184466 │ 2773976 │ ███████████████████████████▋ │ + 55. │ KSNA │ 180045 │ 778484 │ ███████▋ │ + 56. │ EGKK │ 176420 │ 1694770 │ ████████████████▊ │ + 57. │ LOWW │ 176191 │ 1274833 │ ████████████▋ │ + 58. │ UUDD │ 176099 │ 1368226 │ █████████████▋ │ + 59. │ RKSI │ 173466 │ 3079026 │ ██████████████████████████████▋ │ + 60. │ EKCH │ 172128 │ 1229895 │ ████████████▎ │ + 61. │ KOAK │ 171119 │ 1114447 │ ███████████■│ + 62. │ RPLL │ 170122 │ 1440735 │ ██████████████■│ + 63. │ KRDU │ 167001 │ 830521 │ ████████▎ │ + 64. │ KAUS │ 164524 │ 1256198 │ ████████████▌ │ + 65. │ KBNA │ 163242 │ 1022726 │ ██████████■│ + 66. │ KSDF │ 162655 │ 1380867 │ █████████████▋ │ + 67. │ ENGM │ 160732 │ 910108 │ █████████ │ + 68. │ LIMC │ 160696 │ 1564620 │ ███████████████▋ │ + 69. │ KSJC │ 159278 │ 1081125 │ ██████████▋ │ + 70. │ KSTL │ 157984 │ 1026699 │ ██████████▎ │ + 71. │ UUWW │ 156811 │ 1261155 │ ████████████▌ │ + 72. │ KIND │ 153929 │ 987944 │ █████████▊ │ + 73. │ ESSA │ 153390 │ 1203439 │ ████████████ │ + 74. │ KMCO │ 153351 │ 1508657 │ ███████████████ │ + 75. │ KDVT │ 152895 │ 74048 │ â–‹ │ + 76. │ VTBS │ 152645 │ 2255591 │ ██████████████████████▌ │ + 77. │ CYVR │ 149574 │ 2027413 │ ████████████████████▎ │ + 78. │ EIDW │ 148723 │ 1503985 │ ███████████████ │ + 79. │ LFPO │ 143277 │ 1152964 │ ███████████▌ │ + 80. │ EGSS │ 140830 │ 1348183 │ █████████████■│ + 81. │ KAPA │ 140776 │ 420441 │ ████■│ + 82. │ KHOU │ 138985 │ 1068806 │ ██████████▋ │ + 83. │ KTPA │ 138033 │ 1338223 │ █████████████■│ + 84. │ KFFZ │ 137333 │ 55397 │ â–Œ │ + 85. │ NZAA │ 136092 │ 1581264 │ ███████████████▋ │ + 86. │ YPPH │ 133916 │ 1271550 │ ████████████▋ │ + 87. │ RJBB │ 133522 │ 1805623 │ ██████████████████ │ + 88. │ EDDL │ 133018 │ 1265919 │ ████████████▋ │ + 89. │ ULLI │ 130501 │ 1197108 │ ███████████▊ │ + 90. │ KIWA │ 127195 │ 250876 │ ██▌ │ + 91. │ KTEB │ 126969 │ 1189414 │ ███████████▊ │ + 92. │ VOMM │ 125616 │ 1127757 │ ███████████▎ │ + 93. │ LSGG │ 123998 │ 1049101 │ ██████████■│ + 94. │ LPPT │ 122733 │ 1779187 │ █████████████████▋ │ + 95. │ WSSS │ 120493 │ 3264122 │ ████████████████████████████████▋ │ + 96. │ EBBR │ 118539 │ 1579939 │ ███████████████▋ │ + 97. │ VTBD │ 118107 │ 661627 │ ██████▌ │ + 98. │ KVNY │ 116326 │ 692960 │ ██████▊ │ + 99. │ EDDT │ 115122 │ 941740 │ █████████■│ +100. │ EFHK │ 114860 │ 1629143 │ ████████████████▎ │ + └────────┴─────────┴──────────┴────────────────────────────────────────┘ +``` + +### モスクワã®ä¸»è¦3空港ã‹ã‚‰ã®ãƒ•ãƒ©ã‚¤ãƒˆæ•°ã€é€±é–“ {#flights-from-moscow} + +クエリ: + +```sql +SELECT + toMonday(day) AS k, + count() AS c, + bar(c, 0, 10000, 100) AS bar +FROM opensky +WHERE origin IN ('UUEE', 'UUDD', 'UUWW') +GROUP BY k +ORDER BY k ASC; +``` + +çµæžœ: + +```text + ┌──────────k─┬────c─┬─bar──────────────────────────────────────────────────────────────────────────┠+ 1. │ 2018-12-31 │ 5248 │ ████████████████████████████████████████████████████■│ + 2. │ 2019-01-07 │ 6302 │ ███████████████████████████████████████████████████████████████ │ + 3. │ 2019-01-14 │ 5701 │ █████████████████████████████████████████████████████████ │ + 4. │ 2019-01-21 │ 5638 │ ████████████████████████████████████████████████████████■│ + 5. │ 2019-01-28 │ 5731 │ █████████████████████████████████████████████████████████▎ │ + 6. │ 2019-02-04 │ 5683 │ ████████████████████████████████████████████████████████▋ │ + 7. │ 2019-02-11 │ 5759 │ █████████████████████████████████████████████████████████▌ │ + 8. │ 2019-02-18 │ 5736 │ █████████████████████████████████████████████████████████▎ │ + 9. │ 2019-02-25 │ 5873 │ ██████████████████████████████████████████████████████████▋ │ + 10. │ 2019-03-04 │ 5965 │ ███████████████████████████████████████████████████████████▋ │ + 11. │ 2019-03-11 │ 5900 │ ███████████████████████████████████████████████████████████ │ + 12. │ 2019-03-18 │ 5823 │ ██████████████████████████████████████████████████████████■│ + 13. │ 2019-03-25 │ 5899 │ ██████████████████████████████████████████████████████████▊ │ + 14. │ 2019-04-01 │ 6043 │ ████████████████████████████████████████████████████████████■│ + 15. │ 2019-04-08 │ 6098 │ ████████████████████████████████████████████████████████████▊ │ + 16. │ 2019-04-15 │ 6196 │ █████████████████████████████████████████████████████████████▊ │ + 17. │ 2019-04-22 │ 6486 │ ████████████████████████████████████████████████████████████████▋ │ + 18. │ 2019-04-29 │ 6682 │ ██████████████████████████████████████████████████████████████████▋ │ + 19. │ 2019-05-06 │ 6739 │ ███████████████████████████████████████████████████████████████████■│ + 20. │ 2019-05-13 │ 6600 │ ██████████████████████████████████████████████████████████████████ │ + 21. │ 2019-05-20 │ 6575 │ █████████████████████████████████████████████████████████████████▋ │ + 22. │ 2019-05-27 │ 6786 │ ███████████████████████████████████████████████████████████████████▋ │ + 23. │ 2019-06-03 │ 6872 │ ████████████████████████████████████████████████████████████████████▋ │ + 24. │ 2019-06-10 │ 7045 │ ██████████████████████████████████████████████████████████████████████■│ + 25. │ 2019-06-17 │ 7045 │ ██████████████████████████████████████████████████████████████████████■│ + 26. │ 2019-06-24 │ 6852 │ ████████████████████████████████████████████████████████████████████▌ │ + 27. │ 2019-07-01 │ 7248 │ ████████████████████████████████████████████████████████████████████████■│ + 28. │ 2019-07-08 │ 7284 │ ████████████████████████████████████████████████████████████████████████▋ │ + 29. │ 2019-07-15 │ 7142 │ ███████████████████████████████████████████████████████████████████████■│ + 30. │ 2019-07-22 │ 7108 │ ███████████████████████████████████████████████████████████████████████ │ + 31. │ 2019-07-29 │ 7251 │ ████████████████████████████████████████████████████████████████████████▌ │ + 32. │ 2019-08-05 │ 7403 │ ██████████████████████████████████████████████████████████████████████████ │ + 33. │ 2019-08-12 │ 7457 │ ██████████████████████████████████████████████████████████████████████████▌ │ + 34. │ 2019-08-19 │ 7502 │ ███████████████████████████████████████████████████████████████████████████ │ + 35. │ 2019-08-26 │ 7540 │ ███████████████████████████████████████████████████████████████████████████■│ + 36. │ 2019-09-02 │ 7237 │ ████████████████████████████████████████████████████████████████████████▎ │ + 37. │ 2019-09-09 │ 7328 │ █████████████████████████████████████████████████████████████████████████▎ │ + 38. │ 2019-09-16 │ 5566 │ ███████████████████████████████████████████████████████▋ │ + 39. │ 2019-09-23 │ 7049 │ ██████████████████████████████████████████████████████████████████████■│ + 40. │ 2019-09-30 │ 6880 │ ████████████████████████████████████████████████████████████████████▋ │ + 41. │ 2019-10-07 │ 6518 │ █████████████████████████████████████████████████████████████████■│ + 42. │ 2019-10-14 │ 6688 │ ██████████████████████████████████████████████████████████████████▊ │ + 43. │ 2019-10-21 │ 6667 │ ██████████████████████████████████████████████████████████████████▋ │ + 44. │ 2019-10-28 │ 6303 │ ███████████████████████████████████████████████████████████████ │ + 45. │ 2019-11-04 │ 6298 │ ██████████████████████████████████████████████████████████████▊ │ + 46. │ 2019-11-11 │ 6137 │ █████████████████████████████████████████████████████████████▎ │ + 47. │ 2019-11-18 │ 6051 │ ████████████████████████████████████████████████████████████▌ │ + 48. │ 2019-11-25 │ 5820 │ ██████████████████████████████████████████████████████████■│ + 49. │ 2019-12-02 │ 5942 │ ███████████████████████████████████████████████████████████■│ + 50. │ 2019-12-09 │ 4891 │ ████████████████████████████████████████████████▊ │ + 51. │ 2019-12-16 │ 5682 │ ████████████████████████████████████████████████████████▋ │ + 52. │ 2019-12-23 │ 6111 │ █████████████████████████████████████████████████████████████ │ + 53. │ 2019-12-30 │ 5870 │ ██████████████████████████████████████████████████████████▋ │ + 54. │ 2020-01-06 │ 5953 │ ███████████████████████████████████████████████████████████▌ │ + 55. │ 2020-01-13 │ 5698 │ ████████████████████████████████████████████████████████▊ │ + 56. │ 2020-01-20 │ 5339 │ █████████████████████████████████████████████████████■│ + 57. │ 2020-01-27 │ 5566 │ ███████████████████████████████████████████████████████▋ │ + 58. │ 2020-02-03 │ 5801 │ ██████████████████████████████████████████████████████████ │ + 59. │ 2020-02-10 │ 5692 │ ████████████████████████████████████████████████████████▊ │ + 60. │ 2020-02-17 │ 5912 │ ███████████████████████████████████████████████████████████ │ + 61. │ 2020-02-24 │ 6031 │ ████████████████████████████████████████████████████████████▎ │ + 62. │ 2020-03-02 │ 6105 │ █████████████████████████████████████████████████████████████ │ + 63. │ 2020-03-09 │ 5823 │ ██████████████████████████████████████████████████████████■│ + 64. │ 2020-03-16 │ 4659 │ ██████████████████████████████████████████████▌ │ + 65. │ 2020-03-23 │ 3720 │ █████████████████████████████████████■│ + 66. │ 2020-03-30 │ 1720 │ █████████████████■│ + 67. │ 2020-04-06 │ 849 │ ████████■│ + 68. │ 2020-04-13 │ 710 │ ███████ │ + 69. │ 2020-04-20 │ 725 │ ███████■│ + 70. │ 2020-04-27 │ 920 │ █████████■│ + 71. │ 2020-05-04 │ 859 │ ████████▌ │ + 72. │ 2020-05-11 │ 1047 │ ██████████■│ + 73. │ 2020-05-18 │ 1135 │ ███████████▎ │ + 74. │ 2020-05-25 │ 1266 │ ████████████▋ │ + 75. │ 2020-06-01 │ 1793 │ █████████████████▊ │ + 76. │ 2020-06-08 │ 1979 │ ███████████████████▋ │ + 77. │ 2020-06-15 │ 2297 │ ██████████████████████▊ │ + 78. │ 2020-06-22 │ 2788 │ ███████████████████████████▊ │ + 79. │ 2020-06-29 │ 3389 │ █████████████████████████████████▊ │ + 80. │ 2020-07-06 │ 3545 │ ███████████████████████████████████■│ + 81. │ 2020-07-13 │ 3569 │ ███████████████████████████████████▋ │ + 82. │ 2020-07-20 │ 3784 │ █████████████████████████████████████▋ │ + 83. │ 2020-07-27 │ 3960 │ ███████████████████████████████████████▌ │ + 84. │ 2020-08-03 │ 4323 │ ███████████████████████████████████████████■│ + 85. │ 2020-08-10 │ 4581 │ █████████████████████████████████████████████▋ │ + 86. │ 2020-08-17 │ 4791 │ ███████████████████████████████████████████████▊ │ + 87. │ 2020-08-24 │ 4928 │ █████████████████████████████████████████████████▎ │ + 88. │ 2020-08-31 │ 4687 │ ██████████████████████████████████████████████▋ │ + 89. │ 2020-09-07 │ 4643 │ ██████████████████████████████████████████████■│ + 90. │ 2020-09-14 │ 4594 │ █████████████████████████████████████████████▊ │ + 91. │ 2020-09-21 │ 4478 │ ████████████████████████████████████████████▋ │ + 92. │ 2020-09-28 │ 4382 │ ███████████████████████████████████████████▋ │ + 93. │ 2020-10-05 │ 4261 │ ██████████████████████████████████████████▌ │ + 94. │ 2020-10-12 │ 4243 │ ██████████████████████████████████████████■│ + 95. │ 2020-10-19 │ 3941 │ ███████████████████████████████████████■│ + 96. │ 2020-10-26 │ 3616 │ ████████████████████████████████████■│ + 97. │ 2020-11-02 │ 3586 │ ███████████████████████████████████▋ │ + 98. │ 2020-11-09 │ 3403 │ ██████████████████████████████████ │ + 99. │ 2020-11-16 │ 3336 │ █████████████████████████████████▎ │ +100. │ 2020-11-23 │ 3230 │ ████████████████████████████████▎ │ +101. │ 2020-11-30 │ 3183 │ ███████████████████████████████▋ │ +102. │ 2020-12-07 │ 3285 │ ████████████████████████████████▋ │ +103. │ 2020-12-14 │ 3367 │ █████████████████████████████████▋ │ +104. │ 2020-12-21 │ 3748 │ █████████████████████████████████████■│ +105. │ 2020-12-28 │ 3986 │ ███████████████████████████████████████▋ │ +106. │ 2021-01-04 │ 3906 │ ███████████████████████████████████████ │ +107. │ 2021-01-11 │ 3425 │ ██████████████████████████████████▎ │ +108. │ 2021-01-18 │ 3144 │ ███████████████████████████████■│ +109. │ 2021-01-25 │ 3115 │ ███████████████████████████████■│ +110. │ 2021-02-01 │ 3285 │ ████████████████████████████████▋ │ +111. │ 2021-02-08 │ 3321 │ █████████████████████████████████■│ +112. │ 2021-02-15 │ 3475 │ ██████████████████████████████████▋ │ +113. │ 2021-02-22 │ 3549 │ ███████████████████████████████████■│ +114. │ 2021-03-01 │ 3755 │ █████████████████████████████████████▌ │ +115. │ 2021-03-08 │ 3080 │ ██████████████████████████████▋ │ +116. │ 2021-03-15 │ 3789 │ █████████████████████████████████████▊ │ +117. │ 2021-03-22 │ 3804 │ ██████████████████████████████████████ │ +118. │ 2021-03-29 │ 4238 │ ██████████████████████████████████████████■│ +119. │ 2021-04-05 │ 4307 │ ███████████████████████████████████████████ │ +120. │ 2021-04-12 │ 4225 │ ██████████████████████████████████████████▎ │ +121. │ 2021-04-19 │ 4391 │ ███████████████████████████████████████████▊ │ +122. │ 2021-04-26 │ 4868 │ ████████████████████████████████████████████████▋ │ +123. │ 2021-05-03 │ 4977 │ █████████████████████████████████████████████████▋ │ +124. │ 2021-05-10 │ 5164 │ ███████████████████████████████████████████████████▋ │ +125. │ 2021-05-17 │ 4986 │ █████████████████████████████████████████████████▋ │ +126. │ 2021-05-24 │ 5024 │ ██████████████████████████████████████████████████■│ +127. │ 2021-05-31 │ 4824 │ ████████████████████████████████████████████████■│ +128. │ 2021-06-07 │ 5652 │ ████████████████████████████████████████████████████████▌ │ +129. │ 2021-06-14 │ 5613 │ ████████████████████████████████████████████████████████■│ +130. │ 2021-06-21 │ 6061 │ ████████████████████████████████████████████████████████████▌ │ +131. │ 2021-06-28 │ 2554 │ █████████████████████████▌ │ + └────────────┴──────┴──────────────────────────────────────────────────────────────────────────────┘ +``` + +### オンラインプレイグラウンド {#playground} + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«å¯¾ã—ã¦ä»–ã®ã‚¯ã‚¨ãƒªã‚’テストã™ã‚‹ã«ã¯ã€ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–リソース [Online Playground](https://sql.clickhouse.com) を使用ã§ãã¾ã™ã€‚例ãˆã°ã€[ã“ã®ã‚ˆã†ã«](https://sql.clickhouse.com?query_id=BIPDVQNIGVEZFQYFEFQB7O)ã§ã™ã€‚ã—ã‹ã—ã€ã“ã“ã§ã¯ä¸€æ™‚テーブルを作æˆã§ããªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/getting-started/example-datasets/recipes.md b/docs/ja/getting-started/example-datasets/recipes.md new file mode 100644 index 00000000000..82485ef1095 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/recipes.md @@ -0,0 +1,338 @@ +--- +slug: /ja/getting-started/example-datasets/recipes +sidebar_label: レシピデータセット +title: "レシピデータセット" +--- + +RecipeNLGデータセットã¯[ã“ã¡ã‚‰](https://recipenlg.cs.put.poznan.pl/dataset)ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚2.2百万件ã®ãƒ¬ã‚·ãƒ”ãŒå«ã¾ã‚Œã¦ãŠã‚Šã€ã‚µã‚¤ã‚ºã¯ç´„1GBã§ã™ã€‚ + +## データセットã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¨è§£å‡ + +1. ダウンロードページã«ç§»å‹•ã—ã¾ã™ï¼š[https://recipenlg.cs.put.poznan.pl/dataset](https://recipenlg.cs.put.poznan.pl/dataset)。 +1. è¦ç´„ã«åŒæ„ã—ã¦zipファイルをダウンロードã—ã¾ã™ã€‚ +1. オプション: `md5sum dataset.zip`を使用ã—ã¦zipファイルを検証ã—ã€`3a168dfd0912bb034225619b3586ce76`ã¨ä¸€è‡´ã™ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +1. `unzip dataset.zip`ã§zipファイルを解å‡ã—ã¾ã™ã€‚`dataset`ディレクトリã«`full_dataset.csv`ファイルãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +## テーブルã®ä½œæˆ + +clickhouse-clientを実行ã—ã€æ¬¡ã®CREATEクエリを実行ã—ã¾ã™: + +``` sql +CREATE TABLE recipes +( + title String, + ingredients Array(String), + directions Array(String), + link String, + source LowCardinality(String), + NER Array(String) +) ENGINE = MergeTree ORDER BY title; +``` + +## データã®æŒ¿å…¥ + +次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™: + +``` bash +clickhouse-client --query " + INSERT INTO recipes + SELECT + title, + JSONExtract(ingredients, 'Array(String)'), + JSONExtract(directions, 'Array(String)'), + link, + source, + JSONExtract(NER, 'Array(String)') + FROM input('num UInt32, title String, ingredients String, directions String, link String, source LowCardinality(String), NER String') + FORMAT CSVWithNames +" --input_format_with_names_use_header 0 --format_csv_allow_single_quote 0 --input_format_allow_errors_num 10 < full_dataset.csv +``` + +ã“ã®ä¾‹ã§ã¯ã€ã‚«ã‚¹ã‚¿ãƒ CSVã®è§£æžæ–¹æ³•ã‚’紹介ã—ã¾ã™ã€‚挿入時ã«ã„ãã¤ã‹ã®èª¿æ•´ãŒå¿…è¦ã§ã™ã€‚ + +説明: +- データセットã¯CSVå½¢å¼ã§ã™ãŒã€æŒ¿å…¥æ™‚ã«å‰å‡¦ç†ãŒå¿…è¦ã§ã™ã€‚テーブル関数[input](../../sql-reference/table-functions/input.md)を使用ã—ã¦å‰å‡¦ç†ã‚’è¡Œã„ã¾ã™ã€‚ +- CSVファイルã®æ§‹é€ ã¯ãƒ†ãƒ¼ãƒ–ル関数`input`ã®å¼•æ•°ã§æŒ‡å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ +- フィールド`num`(行番å·ï¼‰ã¯ä¸è¦ã§ã™ã€‚ファイルã‹ã‚‰è§£æžã—ã¦ç„¡è¦–ã—ã¾ã™ã€‚ +- `FORMAT CSVWithNames`を使用ã—ã¾ã™ãŒã€CSVã®ãƒ˜ãƒƒãƒ€ãƒ¼ã¯æœ€åˆã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰åã‚’å«ã‚“ã§ã„ãªã„ãŸã‚ã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ‘ラメータ`--input_format_with_names_use_header 0`ã§ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +- ファイルã¯CSV文字列をダブルクォートã§å›²ã‚“ã§ã„ã¾ã™ã€‚ã„ãã¤ã‹ã®æ–‡å­—列ã¯ãƒ€ãƒ–ルクォートã§å›²ã¾ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€ã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚©ãƒ¼ãƒˆã¯æ–‡å­—列ã®å›²ã¿ã¨ã—ã¦è§£æžã•ã‚Œã¦ã¯ã„ã‘ã¾ã›ã‚“。ãã®ãŸã‚ã€`--format_csv_allow_single_quote 0`パラメータを追加ã—ã¾ã™ã€‚ +- CSVã‹ã‚‰ã„ãã¤ã‹ã®æ–‡å­—列ã¯è§£æžã§ãã¾ã›ã‚“。ãªãœãªã‚‰ã€ãれらã¯å€¤ã®å…ˆé ­ã«`\M/`シーケンスをå«ã‚“ã§ã„ã‚‹ãŸã‚ã§ã™ã€‚CSVã§ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã§å§‹ã¾ã‚‹å”¯ä¸€ã®å€¤ã¯`\N`ã§ã‚ã‚Šã€ã“ã‚Œã¯SQL NULLã¨ã—ã¦è§£æžã•ã‚Œã¾ã™ã€‚`--input_format_allow_errors_num 10`パラメータを追加ã—ã€æœ€å¤§10件ã®ä¸æ­£ãªãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’スキップã§ãã¾ã™ã€‚ +- ingredientsã€directionsã€NERフィールドã®å„é…列ã¯ã€é€šå¸¸ã§ãªã„å½¢å¼ã§è¡¨ç¾ã•ã‚Œã¦ã„ã¾ã™ã€‚ãれらã¯æ–‡å­—列ã¨ã—ã¦JSONã«ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚ŒãŸå¾Œã€CSVã«é…ç½®ã•ã‚Œã¦ã„ã¾ã™ã€‚ãれをStringã¨ã—ã¦è§£æžã—ã€[JSONExtract](../../sql-reference/functions/json-functions.md)関数を使用ã—ã¦Arrayã«å¤‰æ›ã—ã¾ã™ã€‚ + +## 挿入ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®æ¤œè¨¼ + +行数を確èªã—ã¾ã™: + +クエリ: + +``` sql +SELECT count() FROM recipes; +``` + +çµæžœ: + +``` text +┌─count()─┠+│ 2231142 │ +└─────────┘ +``` + +## クエリã®ä¾‹ + +### レシピ数ã«ã‚ˆã‚‹ä¸»è¦ãªæˆåˆ† + +ã“ã®ä¾‹ã§ã¯ã€[arrayJoin](../../sql-reference/functions/array-join.md)関数を使ã£ã¦é…列を行ã®ã‚»ãƒƒãƒˆã«å±•é–‹ã™ã‚‹æ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT + arrayJoin(NER) AS k, + count() AS c +FROM recipes +GROUP BY k +ORDER BY c DESC +LIMIT 50 +``` + +çµæžœ: + +``` text +┌─k────────────────────┬──────c─┠+│ salt │ 890741 │ +│ sugar │ 620027 │ +│ butter │ 493823 │ +│ flour │ 466110 │ +│ eggs │ 401276 │ +│ onion │ 372469 │ +│ garlic │ 358364 │ +│ milk │ 346769 │ +│ water │ 326092 │ +│ vanilla │ 270381 │ +│ olive oil │ 197877 │ +│ pepper │ 179305 │ +│ brown sugar │ 174447 │ +│ tomatoes │ 163933 │ +│ egg │ 160507 │ +│ baking powder │ 148277 │ +│ lemon juice │ 146414 │ +│ Salt │ 122558 │ +│ cinnamon │ 117927 │ +│ sour cream │ 116682 │ +│ cream cheese │ 114423 │ +│ margarine │ 112742 │ +│ celery │ 112676 │ +│ baking soda │ 110690 │ +│ parsley │ 102151 │ +│ chicken │ 101505 │ +│ onions │ 98903 │ +│ vegetable oil │ 91395 │ +│ oil │ 85600 │ +│ mayonnaise │ 84822 │ +│ pecans │ 79741 │ +│ nuts │ 78471 │ +│ potatoes │ 75820 │ +│ carrots │ 75458 │ +│ pineapple │ 74345 │ +│ soy sauce │ 70355 │ +│ black pepper │ 69064 │ +│ thyme │ 68429 │ +│ mustard │ 65948 │ +│ chicken broth │ 65112 │ +│ bacon │ 64956 │ +│ honey │ 64626 │ +│ oregano │ 64077 │ +│ ground beef │ 64068 │ +│ unsalted butter │ 63848 │ +│ mushrooms │ 61465 │ +│ Worcestershire sauce │ 59328 │ +│ cornstarch │ 58476 │ +│ green pepper │ 58388 │ +│ Cheddar cheese │ 58354 │ +└──────────────────────┴────────┘ + +50 rows in set. Elapsed: 0.112 sec. Processed 2.23 million rows, 361.57 MB (19.99 million rows/s., 3.24 GB/s.) +``` + +### ストロベリーを使ã£ãŸæœ€ã‚‚複雑ãªãƒ¬ã‚·ãƒ” + +``` sql +SELECT + title, + length(NER), + length(directions) +FROM recipes +WHERE has(NER, 'strawberry') +ORDER BY length(directions) DESC +LIMIT 10 +``` + +çµæžœ: + +``` text +┌─title────────────────────────────────────────────────────────────┬─length(NER)─┬─length(directions)─┠+│ Chocolate-Strawberry-Orange Wedding Cake │ 24 │ 126 │ +│ Strawberry Cream Cheese Crumble Tart │ 19 │ 47 │ +│ Charlotte-Style Ice Cream │ 11 │ 45 │ +│ Sinfully Good a Million Layers Chocolate Layer Cake, With Strawb │ 31 │ 45 │ +│ Sweetened Berries With Elderflower Sherbet │ 24 │ 44 │ +│ Chocolate-Strawberry Mousse Cake │ 15 │ 42 │ +│ Rhubarb Charlotte with Strawberries and Rum │ 20 │ 42 │ +│ Chef Joey's Strawberry Vanilla Tart │ 7 │ 37 │ +│ Old-Fashioned Ice Cream Sundae Cake │ 17 │ 37 │ +│ Watermelon Cake │ 16 │ 36 │ +└──────────────────────────────────────────────────────────────────┴─────────────┴────────────────────┘ + +10 rows in set. Elapsed: 0.215 sec. Processed 2.23 million rows, 1.48 GB (10.35 million rows/s., 6.86 GB/s.) +``` + +ã“ã®ä¾‹ã§ã¯ã€[has](../../sql-reference/functions/array-functions.md#hasarr-elem)関数を用ã„ã¦é…列è¦ç´ ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã„ã€æ‰‹é †ã®æ•°ã§ã‚½ãƒ¼ãƒˆã—ã¾ã™ã€‚ + +çµå©šå¼ç”¨ã‚±ãƒ¼ã‚­ã‚’作るã®ã«ã¯126ステップも必è¦ã§ã™ï¼ãã®æ‰‹é †ã‚’表示ã—ã¾ã™ï¼š + +クエリ: + +``` sql +SELECT arrayJoin(directions) +FROM recipes +WHERE title = 'Chocolate-Strawberry-Orange Wedding Cake' +``` + +çµæžœ: + +``` text +┌─arrayJoin(directions)───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ Position 1 rack in center and 1 rack in bottom third of oven and preheat to 350F. │ +│ Butter one 5-inch-diameter cake pan with 2-inch-high sides, one 8-inch-diameter cake pan with 2-inch-high sides and one 12-inch-diameter cake pan with 2-inch-high sides. │ +│ Dust pans with flour; line bottoms with parchment. │ +│ Combine 1/3 cup orange juice and 2 ounces unsweetened chocolate in heavy small saucepan. │ +│ Stir mixture over medium-low heat until chocolate melts. │ +│ Remove from heat. │ +│ Gradually mix in 1 2/3 cups orange juice. │ +│ Sift 3 cups flour, 2/3 cup cocoa, 2 teaspoons baking soda, 1 teaspoon salt and 1/2 teaspoon baking powder into medium bowl. │ +│ using electric mixer, beat 1 cup (2 sticks) butter and 3 cups sugar in large bowl until blended (mixture will look grainy). │ +│ Add 4 eggs, 1 at a time, beating to blend after each. │ +│ Beat in 1 tablespoon orange peel and 1 tablespoon vanilla extract. │ +│ Add dry ingredients alternately with orange juice mixture in 3 additions each, beating well after each addition. │ +│ Mix in 1 cup chocolate chips. │ +│ Transfer 1 cup plus 2 tablespoons batter to prepared 5-inch pan, 3 cups batter to prepared 8-inch pan and remaining batter (about 6 cups) to 12-inch pan. │ +│ Place 5-inch and 8-inch pans on center rack of oven. │ +│ Place 12-inch pan on lower rack of oven. │ +│ Bake cakes until tester inserted into center comes out clean, about 35 minutes. │ +│ Transfer cakes in pans to racks and cool completely. │ +│ Mark 4-inch diameter circle on one 6-inch-diameter cardboard cake round. │ +│ Cut out marked circle. │ +│ Mark 7-inch-diameter circle on one 8-inch-diameter cardboard cake round. │ +│ Cut out marked circle. │ +│ Mark 11-inch-diameter circle on one 12-inch-diameter cardboard cake round. │ +│ Cut out marked circle. │ +│ Cut around sides of 5-inch-cake to loosen. │ +│ Place 4-inch cardboard over pan. │ +│ Hold cardboard and pan together; turn cake out onto cardboard. │ +│ Peel off parchment.Wrap cakes on its cardboard in foil. │ +│ Repeat turning out, peeling off parchment and wrapping cakes in foil, using 7-inch cardboard for 8-inch cake and 11-inch cardboard for 12-inch cake. │ +│ Using remaining ingredients, make 1 more batch of cake batter and bake 3 more cake layers as described above. │ +│ Cool cakes in pans. │ +│ Cover cakes in pans tightly with foil. │ +│ (Can be prepared ahead. │ +│ Let stand at room temperature up to 1 day or double-wrap all cake layers and freeze up to 1 week. │ +│ Bring cake layers to room temperature before using.) │ +│ Place first 12-inch cake on its cardboard on work surface. │ +│ Spread 2 3/4 cups ganache over top of cake and all the way to edge. │ +│ Spread 2/3 cup jam over ganache, leaving 1/2-inch chocolate border at edge. │ +│ Drop 1 3/4 cups white chocolate frosting by spoonfuls over jam. │ +│ Gently spread frosting over jam, leaving 1/2-inch chocolate border at edge. │ +│ Rub some cocoa powder over second 12-inch cardboard. │ +│ Cut around sides of second 12-inch cake to loosen. │ +│ Place cardboard, cocoa side down, over pan. │ +│ Turn cake out onto cardboard. │ +│ Peel off parchment. │ +│ Carefully slide cake off cardboard and onto filling on first 12-inch cake. │ +│ Refrigerate. │ +│ Place first 8-inch cake on its cardboard on work surface. │ +│ Spread 1 cup ganache over top all the way to edge. │ +│ Spread 1/4 cup jam over, leaving 1/2-inch chocolate border at edge. │ +│ Drop 1 cup white chocolate frosting by spoonfuls over jam. │ +│ Gently spread frosting over jam, leaving 1/2-inch chocolate border at edge. │ +│ Rub some cocoa over second 8-inch cardboard. │ +│ Cut around sides of second 8-inch cake to loosen. │ +│ Place cardboard, cocoa side down, over pan. │ +│ Turn cake out onto cardboard. │ +│ Peel off parchment. │ +│ Slide cake off cardboard and onto filling on first 8-inch cake. │ +│ Refrigerate. │ +│ Place first 5-inch cake on its cardboard on work surface. │ +│ Spread 1/2 cup ganache over top of cake and all the way to edge. │ +│ Spread 2 tablespoons jam over, leaving 1/2-inch chocolate border at edge. │ +│ Drop 1/3 cup white chocolate frosting by spoonfuls over jam. │ +│ Gently spread frosting over jam, leaving 1/2-inch chocolate border at edge. │ +│ Rub cocoa over second 6-inch cardboard. │ +│ Cut around sides of second 5-inch cake to loosen. │ +│ Place cardboard, cocoa side down, over pan. │ +│ Turn cake out onto cardboard. │ +│ Peel off parchment. │ +│ Slide cake off cardboard and onto filling on first 5-inch cake. │ +│ Chill all cakes 1 hour to set filling. │ +│ Place 12-inch tiered cake on its cardboard on revolving cake stand. │ +│ Spread 2 2/3 cups frosting over top and sides of cake as a first coat. │ +│ Refrigerate cake. │ +│ Place 8-inch tiered cake on its cardboard on cake stand. │ +│ Spread 1 1/4 cups frosting over top and sides of cake as a first coat. │ +│ Refrigerate cake. │ +│ Place 5-inch tiered cake on its cardboard on cake stand. │ +│ Spread 3/4 cup frosting over top and sides of cake as a first coat. │ +│ Refrigerate all cakes until first coats of frosting set, about 1 hour. │ +│ (Cakes can be made to this point up to 1 day ahead; cover and keep refrigerate.) │ +│ Prepare second batch of frosting, using remaining frosting ingredients and following directions for first batch. │ +│ Spoon 2 cups frosting into pastry bag fitted with small star tip. │ +│ Place 12-inch cake on its cardboard on large flat platter. │ +│ Place platter on cake stand. │ +│ Using icing spatula, spread 2 1/2 cups frosting over top and sides of cake; smooth top. │ +│ Using filled pastry bag, pipe decorative border around top edge of cake. │ +│ Refrigerate cake on platter. │ +│ Place 8-inch cake on its cardboard on cake stand. │ +│ Using icing spatula, spread 1 1/2 cups frosting over top and sides of cake; smooth top. │ +│ Using pastry bag, pipe decorative border around top edge of cake. │ +│ Refrigerate cake on its cardboard. │ +│ Place 5-inch cake on its cardboard on cake stand. │ +│ Using icing spatula, spread 3/4 cup frosting over top and sides of cake; smooth top. │ +│ Using pastry bag, pipe decorative border around top edge of cake, spooning more frosting into bag if necessary. │ +│ Refrigerate cake on its cardboard. │ +│ Keep all cakes refrigerated until frosting sets, about 2 hours. │ +│ (Can be prepared 2 days ahead. │ +│ Cover loosely; keep refrigerated.) │ +│ Place 12-inch cake on platter on work surface. │ +│ Press 1 wooden dowel straight down into and completely through center of cake. │ +│ Mark dowel 1/4 inch above top of frosting. │ +│ Remove dowel and cut with serrated knife at marked point. │ +│ Cut 4 more dowels to same length. │ +│ Press 1 cut dowel back into center of cake. │ +│ Press remaining 4 cut dowels into cake, positioning 3 1/2 inches inward from cake edges and spacing evenly. │ +│ Place 8-inch cake on its cardboard on work surface. │ +│ Press 1 dowel straight down into and completely through center of cake. │ +│ Mark dowel 1/4 inch above top of frosting. │ +│ Remove dowel and cut with serrated knife at marked point. │ +│ Cut 3 more dowels to same length. │ +│ Press 1 cut dowel back into center of cake. │ +│ Press remaining 3 cut dowels into cake, positioning 2 1/2 inches inward from edges and spacing evenly. │ +│ Using large metal spatula as aid, place 8-inch cake on its cardboard atop dowels in 12-inch cake, centering carefully. │ +│ Gently place 5-inch cake on its cardboard atop dowels in 8-inch cake, centering carefully. │ +│ Using citrus stripper, cut long strips of orange peel from oranges. │ +│ Cut strips into long segments. │ +│ To make orange peel coils, wrap peel segment around handle of wooden spoon; gently slide peel off handle so that peel keeps coiled shape. │ +│ Garnish cake with orange peel coils, ivy or mint sprigs, and some berries. │ +│ (Assembled cake can be made up to 8 hours ahead. │ +│ Let stand at cool room temperature.) │ +│ Remove top and middle cake tiers. │ +│ Remove dowels from cakes. │ +│ Cut top and middle cakes into slices. │ +│ To cut 12-inch cake: Starting 3 inches inward from edge and inserting knife straight down, cut through from top to bottom to make 6-inch-diameter circle in center of cake. │ +│ Cut outer portion of cake into slices; cut inner portion into slices and serve with strawberries. │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ + +126 rows in set. Elapsed: 0.011 sec. Processed 8.19 thousand rows, 5.34 MB (737.75 thousand rows/s., 480.59 MB/s.) +``` + +### オンラインプレイグラウンド + +データセットã¯[オンラインプレイグラウンド](https://sql.clickhouse.com?query_id=HQXNQZE26Z1QWYP9KC76ML)ã§ã‚‚利用å¯èƒ½ã§ã™ã€‚ diff --git a/docs/ja/getting-started/example-datasets/reddit-comments.md b/docs/ja/getting-started/example-datasets/reddit-comments.md new file mode 100644 index 00000000000..b91d6bb8de7 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/reddit-comments.md @@ -0,0 +1,716 @@ +--- +slug: /ja/getting-started/example-datasets/reddit-comments +sidebar_label: Redditã®ã‚³ãƒ¡ãƒ³ãƒˆ +--- + +# Reddit comments dataset + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€2005å¹´12月ã‹ã‚‰2023å¹´3月ã«ã‹ã‘ã¦ã®Redditã§å…¬é–‹ã•ã‚ŒãŸã‚³ãƒ¡ãƒ³ãƒˆãŒå«ã¾ã‚Œã¦ãŠã‚Šã€14B以上ã®è¡Œã®ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚生データã¯JSONå½¢å¼ã®åœ§ç¸®ãƒ•ã‚¡ã‚¤ãƒ«ã«å…¥ã£ã¦ãŠã‚Šã€ãã®è¡Œã¯ä»¥ä¸‹ã®ã‚ˆã†ãªå½¢å¼ã§ã™ï¼š + +```json +{"controversiality":0,"body":"A look at Vietnam and Mexico exposes the myth of market liberalisation.","subreddit_id":"t5_6","link_id":"t3_17863","stickied":false,"subreddit":"reddit.com","score":2,"ups":2,"author_flair_css_class":null,"created_utc":1134365188,"author_flair_text":null,"author":"frjo","id":"c13","edited":false,"parent_id":"t3_17863","gilded":0,"distinguished":null,"retrieved_on":1473738411} +{"created_utc":1134365725,"author_flair_css_class":null,"score":1,"ups":1,"subreddit":"reddit.com","stickied":false,"link_id":"t3_17866","subreddit_id":"t5_6","controversiality":0,"body":"The site states \"What can I use it for? Meeting notes, Reports, technical specs Sign-up sheets, proposals and much more...\", just like any other new breeed of sites that want us to store everything we have on the web. And they even guarantee multiple levels of security and encryption etc. But what prevents these web site operators fom accessing and/or stealing Meeting notes, Reports, technical specs Sign-up sheets, proposals and much more, for competitive or personal gains...? I am pretty sure that most of them are honest, but what's there to prevent me from setting up a good useful site and stealing all your data? Call me paranoid - I am.","retrieved_on":1473738411,"distinguished":null,"gilded":0,"id":"c14","edited":false,"parent_id":"t3_17866","author":"zse7zse","author_flair_text":null} +{"gilded":0,"distinguished":null,"retrieved_on":1473738411,"author":"[deleted]","author_flair_text":null,"edited":false,"id":"c15","parent_id":"t3_17869","subreddit":"reddit.com","score":0,"ups":0,"created_utc":1134366848,"author_flair_css_class":null,"body":"Jython related topics by Frank Wierzbicki","controversiality":0,"subreddit_id":"t5_6","stickied":false,"link_id":"t3_17869"} +{"gilded":0,"retrieved_on":1473738411,"distinguished":null,"author_flair_text":null,"author":"[deleted]","edited":false,"parent_id":"t3_17870","id":"c16","subreddit":"reddit.com","created_utc":1134367660,"author_flair_css_class":null,"score":1,"ups":1,"body":"[deleted]","controversiality":0,"stickied":false,"link_id":"t3_17870","subreddit_id":"t5_6"} +{"gilded":0,"retrieved_on":1473738411,"distinguished":null,"author_flair_text":null,"author":"rjoseph","edited":false,"id":"c17","parent_id":"t3_17817","subreddit":"reddit.com","author_flair_css_class":null,"created_utc":1134367754,"score":1,"ups":1,"body":"Saft is by far the best extension you could tak onto your Safari","controversiality":0,"link_id":"t3_17817","stickied":false,"subreddit_id":"t5_6"} +``` + +Perconaã«[ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®å–ã‚Šè¾¼ã¿ã®å‹•æ©Ÿ](https://www.percona.com/blog/big-data-set-reddit-comments-analyzing-clickhouse/)ã«æ„Ÿè¬ã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã€S3ãƒã‚±ãƒƒãƒˆã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +:::note +以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€æœ€ä½Žãƒ¡ãƒ¢ãƒªã‚’720GBã«è¨­å®šã—ãŸClickHouse Cloudã®Productionインスタンスã§å®Ÿè¡Œã•ã‚Œã¾ã—ãŸã€‚自分ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã§ã“れを実行ã—ãŸã„å ´åˆã¯ã€`s3Cluster`関数呼ã³å‡ºã—ã®`default`を自分ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼åã«ç½®ãæ›ãˆã¦ãã ã•ã„。クラスターをæŒã£ã¦ã„ãªã„å ´åˆã¯ã€`s3Cluster`関数を`s3`関数ã«ç½®ãæ›ãˆã¦ãã ã•ã„。 +::: + +1. Redditデータ用ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã—ょã†ï¼š + +```sql +CREATE TABLE reddit +( + subreddit LowCardinality(String), + subreddit_id LowCardinality(String), + subreddit_type Enum('public' = 1, 'restricted' = 2, 'user' = 3, 'archived' = 4, 'gold_restricted' = 5, 'private' = 6), + author LowCardinality(String), + body String CODEC(ZSTD(6)), + created_date Date DEFAULT toDate(created_utc), + created_utc DateTime, + retrieved_on DateTime, + id String, + parent_id String, + link_id String, + score Int32, + total_awards_received UInt16, + controversiality UInt8, + gilded UInt8, + collapsed_because_crowd_control UInt8, + collapsed_reason Enum('' = 0, 'comment score below threshold' = 1, 'may be sensitive content' = 2, 'potentially toxic' = 3, 'potentially toxic content' = 4), + distinguished Enum('' = 0, 'moderator' = 1, 'admin' = 2, 'special' = 3), + removal_reason Enum('' = 0, 'legal' = 1), + author_created_utc DateTime, + author_fullname LowCardinality(String), + author_patreon_flair UInt8, + author_premium UInt8, + can_gild UInt8, + can_mod_post UInt8, + collapsed UInt8, + is_submitter UInt8, + _edited String, + locked UInt8, + quarantined UInt8, + no_follow UInt8, + send_replies UInt8, + stickied UInt8, + author_flair_text LowCardinality(String) +) +ENGINE = MergeTree +ORDER BY (subreddit, created_date, author); +``` + +:::note +S3内ã®ãƒ•ã‚¡ã‚¤ãƒ«åã¯`RC_YYYY-MM`ã§å§‹ã¾ã‚Šã€`YYYY-MM`ã¯`2005-12`ã‹ã‚‰`2023-02`ã¾ã§ç¶šãã¾ã™ã€‚ã—ã‹ã—ã€åœ§ç¸®å½¢å¼ãŒæ•°å›žå¤‰ã‚ã‚‹ãŸã‚ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã¯ä¸€è²«ã—ã¦ã„ã¾ã›ã‚“。例ãˆã°ï¼š + +- åˆæœŸã®ãƒ•ã‚¡ã‚¤ãƒ«åã¯`RC_2005-12.bz2`ã‹ã‚‰`RC_2017-11.bz2`ã§ã™ +- 次ã«`RC_2017-12.xz`ã‹ã‚‰`RC_2018-09.xz`ã«å¤‰ã‚ã‚Šã¾ã™ +- ãã—ã¦æœ€çµ‚çš„ã«`RC_2018-10.zst`ã‹ã‚‰`RC_2023-02.zst`ã«ãªã‚Šã¾ã™ +::: + +2. 最åˆã«ã€1ã‹æœˆåˆ†ã®ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰å§‹ã‚ã¾ã™ãŒã€ã™ã¹ã¦ã®è¡Œã‚’挿入ã™ã‚‹å ´åˆã¯ã€ä¸‹è¨˜ã®ã‚¹ãƒ†ãƒƒãƒ—8ã«é€²ã‚“ã§ãã ã•ã„。次ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯2017å¹´12月ã®8600万件ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ï¼š + +```sql +INSERT INTO reddit + SELECT * + FROM s3( + 'https://clickhouse-public-datasets.s3.eu-central-1.amazonaws.com/reddit/original/RC_2017-12.xz', + 'JSONEachRow' + ); +``` + +3. リソースã«å¿œã˜ã¦æ™‚é–“ãŒã‹ã‹ã‚Šã¾ã™ãŒã€å®Œäº†ã—ãŸã‚‰å‹•ä½œã‚’確èªã—ã¾ã™ï¼š + +```sql +SELECT formatReadableQuantity(count()) +FROM reddit; +``` + +```response +┌─formatReadableQuantity(count())─┠+│ 85.97 million │ +└─────────────────────────────────┘ +``` + +4. 2017å¹´12月ã«ã©ã‚Œã ã‘ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªã‚µãƒ–レディットãŒã‚ã£ãŸã‹è¦‹ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT uniqExact(subreddit) +FROM reddit; +``` + +```response +┌─uniqExact(subreddit)─┠+│ 91613 │ +└──────────────────────┘ + +1 row in set. Elapsed: 1.572 sec. Processed 85.97 million rows, 367.43 MB (54.71 million rows/s., 233.80 MB/s.) +``` + +5. 次ã®ã‚¯ã‚¨ãƒªã¯ã€ã‚³ãƒ¡ãƒ³ãƒˆæ•°ã§ä¸Šä½10ã®ã‚µãƒ–レディットを返ã—ã¾ã™ï¼š + +```sql +SELECT + subreddit, + count() AS c +FROM reddit +GROUP BY subreddit +ORDER BY c DESC +LIMIT 20; +``` + +```response +┌─subreddit───────┬───────c─┠+│ AskReddit │ 5245881 │ +│ politics │ 1753120 │ +│ nfl │ 1220266 │ +│ nba │ 960388 │ +│ The_Donald │ 931857 │ +│ news │ 796617 │ +│ worldnews │ 765709 │ +│ CFB │ 710360 │ +│ gaming │ 602761 │ +│ movies │ 601966 │ +│ soccer │ 590628 │ +│ Bitcoin │ 583783 │ +│ pics │ 563408 │ +│ StarWars │ 562514 │ +│ funny │ 547563 │ +│ leagueoflegends │ 517213 │ +│ teenagers │ 492020 │ +│ DestinyTheGame │ 477377 │ +│ todayilearned │ 472650 │ +│ videos │ 450581 │ +└─────────────────┴─────────┘ + +20 rows in set. Elapsed: 0.368 sec. Processed 85.97 million rows, 367.43 MB (233.34 million rows/s., 997.25 MB/s.) +``` + +6. 2017å¹´12月ã«ã‚³ãƒ¡ãƒ³ãƒˆæ•°ã§ä¸Šä½10ã®è‘—者ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +```sql +SELECT + author, + count() AS c +FROM reddit +GROUP BY author +ORDER BY c DESC +LIMIT 10; +``` + +```response +┌─author──────────┬───────c─┠+│ [deleted] │ 5913324 │ +│ AutoModerator │ 784886 │ +│ ImagesOfNetwork │ 83241 │ +│ BitcoinAllBot │ 54484 │ +│ imguralbumbot │ 45822 │ +│ RPBot │ 29337 │ +│ WikiTextBot │ 25982 │ +│ Concise_AMA_Bot │ 19974 │ +│ MTGCardFetcher │ 19103 │ +│ TotesMessenger │ 19057 │ +└─────────────────┴─────────┘ + +10 rows in set. Elapsed: 8.143 sec. Processed 85.97 million rows, 711.05 MB (10.56 million rows/s., 87.32 MB/s.) +``` + +7. データをã™ã§ã«æŒ¿å…¥ã—ã¦ã„ã¾ã™ãŒã€æœ€åˆã‹ã‚‰ã‚„ã‚Šç›´ã—ã¾ã™ï¼š + +```sql +TRUNCATE TABLE reddit; +``` + +8. ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯é¢ç™½ã„データセットãªã®ã§ã€2005å¹´ã‹ã‚‰2023å¹´ã¾ã§ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¦ã¿ã¾ã—ょã†ã€‚実用的ãªç†ç”±ã‹ã‚‰ã€å¹´ã”ã¨ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ã†ã¾ã機能ã—ã¾ã™... + +```sql +INSERT INTO reddit + SELECT * + FROM s3Cluster( + 'default', + 'https://clickhouse-public-datasets.s3.eu-central-1.amazonaws.com/reddit/original/RC_2005*', + 'JSONEachRow' + ) + SETTINGS zstd_window_log_max = 31; +``` + +...ãã—ã¦ã€ä»¥ä¸‹ã®ã‚ˆã†ã«çµ‚了ã—ã¾ã™ï¼š + +```sql +INSERT INTO reddit +SELECT * +FROM s3Cluster( + 'default', + 'https://clickhouse-public-datasets.s3.amazonaws.com/reddit/original/RC_2023*', + 'JSONEachRow' + ) +SETTINGS zstd_window_log_max = 31; +``` + +クラスターをæŒã£ã¦ã„ãªã„å ´åˆã¯ã€`s3Cluster`ã®ä»£ã‚ã‚Šã«`s3`を使用ã—ã¦ãã ã•ã„: + +```sql +INSERT INTO reddit +SELECT * +FROM s3( + 'https://clickhouse-public-datasets.s3.amazonaws.com/reddit/original/RC_2005*', + 'JSONEachRow' + ) +SETTINGS zstd_window_log_max = 31; +``` + +9. æ­£ã—ã動作ã—ãŸã‹ç¢ºèªã™ã‚‹ãŸã‚ã«ã€1å¹´ã”ã¨ã®è¡Œæ•°ã‚’示ã—ã¾ã™ï¼ˆ2023å¹´2月ç¾åœ¨ï¼‰ï¼š + +```sql +SELECT + toYear(created_utc) AS year, + formatReadableQuantity(count()) +FROM reddit +GROUP BY year; +``` + +```response + +┌─year─┬─formatReadableQuantity(count())─┠+│ 2005 │ 1.07 thousand │ +│ 2006 │ 417.18 thousand │ +│ 2007 │ 2.46 million │ +│ 2008 │ 7.24 million │ +│ 2009 │ 18.86 million │ +│ 2010 │ 42.93 million │ +│ 2011 │ 28.91 million │ +│ 2012 │ 260.31 million │ +│ 2013 │ 402.21 million │ +│ 2014 │ 531.80 million │ +│ 2015 │ 667.76 million │ +│ 2016 │ 799.90 million │ +│ 2017 │ 972.86 million │ +│ 2018 │ 1.24 billion │ +│ 2019 │ 1.66 billion │ +│ 2020 │ 2.16 billion │ +│ 2021 │ 2.59 billion │ +│ 2022 │ 2.82 billion │ +│ 2023 │ 474.86 million │ +└──────┴─────────────────────────────────┘ +``` + +10. 挿入ã•ã‚ŒãŸè¡Œæ•°ã¨ãƒ†ãƒ¼ãƒ–ルãŒä½¿ç”¨ã—ã¦ã„るディスクスペースを確èªã—ã¾ã—ょã†ï¼š + +```sql +SELECT + sum(rows) AS count, + formatReadableQuantity(count), + formatReadableSize(sum(bytes)) AS disk_size, + formatReadableSize(sum(data_uncompressed_bytes)) AS uncompressed_size +FROM system.parts +WHERE (table = 'reddit') AND active; +``` + +ディスクストレージã®åœ§ç¸®ãŒéžåœ§ç¸®ã‚µã‚¤ã‚ºã®ç´„1/3ã§ã‚ã‚‹ã“ã¨ã«æ³¨ç›®ã—ã¦ãã ã•ã„: + +```response +┌───────count─┬─formatReadableQuantity(sum(rows))─┬─disk_size─┬─uncompressed_size─┠+│ 14688534662 │ 14.69 billion │ 1.03 TiB │ 3.26 TiB │ +└─────────────┴───────────────────────────────────┴───────────┴───────────────────┘ + +1 row in set. Elapsed: 0.005 sec. +``` + +11. 次ã®ã‚¯ã‚¨ãƒªã¯ã€æœˆã”ã¨ã«ã‚³ãƒ¡ãƒ³ãƒˆã€è‘—者ã€ã‚µãƒ–レディットã®æ•°ã‚’示ã—ã¾ã™ï¼š + +```sql +SELECT + toStartOfMonth(created_utc) AS firstOfMonth, + count() AS c, + bar(c, 0, 50000000, 25) AS bar_count, + uniq(author) AS authors, + bar(authors, 0, 5000000, 25) AS bar_authors, + uniq(subreddit) AS subreddits, + bar(subreddits, 0, 100000, 25) AS bar_subreddits +FROM reddit +GROUP BY firstOfMonth +ORDER BY firstOfMonth ASC; +``` + +ã“ã‚Œã¯14.69Bè¡Œã®ã™ã¹ã¦ã‚’処ç†ã™ã‚‹ãŸã‚ã®å¤§ããªã‚¯ã‚¨ãƒªã§ã™ãŒã€ã¾ã å°è±¡çš„ãªå¿œç­”時間(約48秒)を示ã—ã¾ã™ï¼š + +```response +┌─firstOfMonth─┬─────────c─┬─bar_count─────────────────┬──authors─┬─bar_authors───────────────┬─subreddits─┬─bar_subreddits────────────┠+│ 2005-12-01 │ 1075 │ │ 394 │ │ 1 │ │ +│ 2006-01-01 │ 3666 │ │ 791 │ │ 2 │ │ +│ 2006-02-01 │ 9095 │ │ 1464 │ │ 18 │ │ +│ 2006-03-01 │ 13859 │ │ 1958 │ │ 15 │ │ +│ 2006-04-01 │ 19090 │ │ 2334 │ │ 21 │ │ +│ 2006-05-01 │ 26859 │ │ 2698 │ │ 21 │ │ +│ 2006-06-01 │ 29163 │ │ 3043 │ │ 19 │ │ +│ 2006-07-01 │ 37031 │ │ 3532 │ │ 22 │ │ +│ 2006-08-01 │ 50559 │ │ 4750 │ │ 24 │ │ +│ 2006-09-01 │ 50675 │ │ 4908 │ │ 21 │ │ +│ 2006-10-01 │ 54148 │ │ 5654 │ │ 31 │ │ +│ 2006-11-01 │ 62021 │ │ 6490 │ │ 23 │ │ +│ 2006-12-01 │ 61018 │ │ 6707 │ │ 24 │ │ +│ 2007-01-01 │ 81341 │ │ 7931 │ │ 23 │ │ +│ 2007-02-01 │ 95634 │ │ 9020 │ │ 21 │ │ +│ 2007-03-01 │ 112444 │ │ 10842 │ │ 23 │ │ +│ 2007-04-01 │ 126773 │ │ 10701 │ │ 26 │ │ +│ 2007-05-01 │ 170097 │ │ 11365 │ │ 25 │ │ +│ 2007-06-01 │ 178800 │ │ 11267 │ │ 22 │ │ +│ 2007-07-01 │ 203319 │ │ 12482 │ │ 25 │ │ +│ 2007-08-01 │ 225111 │ │ 14124 │ │ 30 │ │ +│ 2007-09-01 │ 259497 │ ■│ 15416 │ │ 33 │ │ +│ 2007-10-01 │ 274170 │ ■│ 15302 │ │ 36 │ │ +│ 2007-11-01 │ 372983 │ ■│ 15134 │ │ 43 │ │ +│ 2007-12-01 │ 363390 │ ■│ 15915 │ │ 31 │ │ +│ 2008-01-01 │ 452990 │ ■│ 18857 │ │ 126 │ │ +│ 2008-02-01 │ 441768 │ ■│ 18266 │ │ 173 │ │ +│ 2008-03-01 │ 463728 │ ■│ 18947 │ │ 292 │ │ +│ 2008-04-01 │ 468317 │ ■│ 18590 │ │ 323 │ │ +│ 2008-05-01 │ 536380 │ â–Ž │ 20861 │ │ 375 │ │ +│ 2008-06-01 │ 577684 │ â–Ž │ 22557 │ │ 575 │ ■│ +│ 2008-07-01 │ 592610 │ â–Ž │ 23123 │ │ 657 │ ■│ +│ 2008-08-01 │ 595959 │ â–Ž │ 23729 │ │ 707 │ ■│ +│ 2008-09-01 │ 680892 │ â–Ž │ 26374 │ ■│ 801 │ ■│ +│ 2008-10-01 │ 789874 │ ■│ 28970 │ ■│ 893 │ ■│ +│ 2008-11-01 │ 792310 │ ■│ 30272 │ ■│ 1024 │ â–Ž │ +│ 2008-12-01 │ 850359 │ ■│ 34073 │ ■│ 1103 │ â–Ž │ +│ 2009-01-01 │ 1051649 │ â–Œ │ 38978 │ ■│ 1316 │ â–Ž │ +│ 2009-02-01 │ 944711 │ ■│ 43390 │ ■│ 1132 │ â–Ž │ +│ 2009-03-01 │ 1048643 │ â–Œ │ 46516 │ ■│ 1203 │ â–Ž │ +│ 2009-04-01 │ 1094599 │ â–Œ │ 48284 │ ■│ 1334 │ â–Ž │ +│ 2009-05-01 │ 1201257 │ â–Œ │ 52512 │ â–Ž │ 1395 │ â–Ž │ +│ 2009-06-01 │ 1258750 │ â–‹ │ 57728 │ â–Ž │ 1473 │ â–Ž │ +│ 2009-07-01 │ 1470290 │ â–‹ │ 60098 │ â–Ž │ 1686 │ ■│ +│ 2009-08-01 │ 1750688 │ â–‰ │ 67347 │ â–Ž │ 1777 │ ■│ +│ 2009-09-01 │ 2032276 │ â–ˆ │ 78051 │ ■│ 1784 │ ■│ +│ 2009-10-01 │ 2242017 │ â–ˆ │ 93409 │ ■│ 2071 │ â–Œ │ +│ 2009-11-01 │ 2207444 │ â–ˆ │ 95940 │ ■│ 2141 │ â–Œ │ +│ 2009-12-01 │ 2560510 │ █▎ │ 104239 │ â–Œ │ 2141 │ â–Œ │ +│ 2010-01-01 │ 2884096 │ █■│ 114314 │ â–Œ │ 2313 │ â–Œ │ +│ 2010-02-01 │ 2687779 │ █▎ │ 115683 │ â–Œ │ 2522 │ â–‹ │ +│ 2010-03-01 │ 3228254 │ █▌ │ 125775 │ â–‹ │ 2890 │ â–‹ │ +│ 2010-04-01 │ 3209898 │ █▌ │ 128936 │ â–‹ │ 3170 │ â–Š │ +│ 2010-05-01 │ 3267363 │ █▋ │ 131851 │ â–‹ │ 3166 │ â–Š │ +│ 2010-06-01 │ 3532867 │ █▊ │ 139522 │ â–‹ │ 3301 │ â–Š │ +│ 2010-07-01 │ 806612 │ ■│ 76486 │ ■│ 1955 │ ■│ +│ 2010-08-01 │ 4247982 │ ██ │ 164071 │ â–Š │ 3653 │ â–‰ │ +│ 2010-09-01 │ 4704069 │ ██▎ │ 186613 │ â–‰ │ 4009 │ â–ˆ │ +│ 2010-10-01 │ 5032368 │ ██▌ │ 203800 │ â–ˆ │ 4154 │ â–ˆ │ +│ 2010-11-01 │ 5689002 │ ██▊ │ 226134 │ █■│ 4383 │ â–ˆ │ +│ 2010-12-01 │ 3642690 │ █▊ │ 196847 │ â–‰ │ 3914 │ â–‰ │ +│ 2011-01-01 │ 3924540 │ █▉ │ 215057 │ â–ˆ │ 4240 │ â–ˆ │ +│ 2011-02-01 │ 3859131 │ █▉ │ 223485 │ â–ˆ │ 4371 │ â–ˆ │ +│ 2011-03-01 │ 2877996 │ █■│ 208607 │ â–ˆ │ 3870 │ â–‰ │ +│ 2011-04-01 │ 3859131 │ █▉ │ 248931 │ █■│ 4881 │ █■│ +│ 2011-06-01 │ 3859131 │ █▉ │ 267197 │ █▎ │ 5255 │ █▎ │ +│ 2011-08-01 │ 2943405 │ █■│ 259428 │ █▎ │ 5806 │ █■│ +│ 2011-10-01 │ 3859131 │ █▉ │ 327342 │ █▋ │ 6958 │ █▋ │ +│ 2011-12-01 │ 3728313 │ █▊ │ 354817 │ █▊ │ 7713 │ █▉ │ +│ 2012-01-01 │ 16350205 │ ████████■│ 696110 │ ███■│ 14281 │ ███▌ │ +│ 2012-02-01 │ 16015695 │ ████████ │ 722892 │ ███▌ │ 14949 │ ███▋ │ +│ 2012-03-01 │ 17881943 │ ████████▉ │ 789664 │ ███▉ │ 15795 │ ███▉ │ +│ 2012-04-01 │ 19044534 │ █████████▌ │ 842491 │ ████■│ 16440 │ ████ │ +│ 2012-05-01 │ 20388260 │ ██████████■│ 886176 │ ████■│ 16974 │ ████■│ +│ 2012-06-01 │ 21897913 │ ██████████▉ │ 946798 │ ████▋ │ 17952 │ ████■│ +│ 2012-07-01 │ 24087517 │ ████████████ │ 1018636 │ █████ │ 19069 │ ████▊ │ +│ 2012-08-01 │ 25703326 │ ████████████▊ │ 1094445 │ █████■│ 20553 │ █████■│ +│ 2012-09-01 │ 23419524 │ ███████████▋ │ 1088491 │ █████■│ 20831 │ █████■│ +│ 2012-10-01 │ 24788236 │ ████████████■│ 1131885 │ █████▋ │ 21868 │ █████■│ +│ 2012-11-01 │ 24648302 │ ████████████▎ │ 1167608 │ █████▊ │ 21791 │ █████■│ +│ 2012-12-01 │ 26080276 │ █████████████ │ 1218402 │ ██████ │ 22622 │ █████▋ │ +│ 2013-01-01 │ 30365867 │ ███████████████■│ 1341703 │ ██████▋ │ 24696 │ ██████■│ +│ 2013-02-01 │ 27213960 │ █████████████▌ │ 1304756 │ ██████▌ │ 24514 │ ██████■│ +│ 2013-03-01 │ 30771274 │ ███████████████■│ 1391703 │ ██████▉ │ 25730 │ ██████■│ +│ 2013-04-01 │ 33259557 │ ████████████████▋ │ 1485971 │ ███████■│ 27294 │ ██████▊ │ +│ 2013-05-01 │ 33126225 │ ████████████████▌ │ 1506473 │ ███████▌ │ 27299 │ ██████▊ │ +│ 2013-06-01 │ 32648247 │ ████████████████▎ │ 1506650 │ ███████▌ │ 27450 │ ██████▊ │ +│ 2013-07-01 │ 34922133 │ █████████████████■│ 1561771 │ ███████▊ │ 28294 │ ███████ │ +│ 2013-08-01 │ 34766579 │ █████████████████■│ 1589781 │ ███████▉ │ 28943 │ ███████■│ +│ 2013-09-01 │ 31990369 │ ███████████████▉ │ 1570342 │ ███████▊ │ 29408 │ ███████▎ │ +│ 2013-10-01 │ 35940040 │ █████████████████▉ │ 1683770 │ ████████■│ 30273 │ ███████▌ │ +│ 2013-11-01 │ 37396497 │ ██████████████████▋ │ 1757467 │ ████████▊ │ 31173 │ ███████▊ │ +│ 2013-12-01 │ 39810216 │ ███████████████████▉ │ 1846204 │ █████████■│ 32326 │ ████████ │ +│ 2014-01-01 │ 42420655 │ █████████████████████■│ 1927229 │ █████████▋ │ 35603 │ ████████▉ │ +│ 2014-02-01 │ 38703362 │ ███████████████████▎ │ 1874067 │ █████████▎ │ 37007 │ █████████▎ │ +│ 2014-03-01 │ 42459956 │ █████████████████████■│ 1959888 │ █████████▊ │ 37948 │ █████████■│ +│ 2014-04-01 │ 42440735 │ █████████████████████■│ 1951369 │ █████████▊ │ 38362 │ █████████▌ │ +│ 2014-05-01 │ 42514094 │ █████████████████████▎ │ 1970197 │ █████████▊ │ 39078 │ █████████▊ │ +│ 2014-06-01 │ 41990650 │ ████████████████████▉ │ 1943850 │ █████████▋ │ 38268 │ █████████▌ │ +│ 2014-07-01 │ 46868899 │ ███████████████████████■│ 2059346 │ ██████████▎ │ 40634 │ ██████████■│ +│ 2014-08-01 │ 46990813 │ ███████████████████████■│ 2117335 │ ██████████▌ │ 41764 │ ██████████■│ +│ 2014-09-01 │ 44992201 │ ██████████████████████■│ 2124708 │ ██████████▌ │ 41890 │ ██████████■│ +│ 2014-10-01 │ 47497520 │ ███████████████████████▋ │ 2206535 │ ███████████ │ 43109 │ ██████████▊ │ +│ 2014-11-01 │ 46118074 │ ███████████████████████ │ 2239747 │ ███████████■│ 43718 │ ██████████▉ │ +│ 2014-12-01 │ 48807699 │ ████████████████████████■│ 2372945 │ ███████████▊ │ 43823 │ ██████████▉ │ +│ 2015-01-01 │ 53851542 │ █████████████████████████ │ 2499536 │ ████████████■│ 47172 │ ███████████▊ │ +│ 2015-02-01 │ 48342747 │ ████████████████████████■│ 2448496 │ ████████████■│ 47229 │ ███████████▊ │ +│ 2015-03-01 │ 54564441 │ █████████████████████████ │ 2550534 │ ████████████▊ │ 48156 │ ████████████ │ +│ 2015-04-01 │ 55005780 │ █████████████████████████ │ 2609443 │ █████████████ │ 49865 │ ████████████■│ +│ 2015-05-01 │ 54504410 │ █████████████████████████ │ 2585535 │ ████████████▉ │ 50137 │ ████████████▌ │ +│ 2015-06-01 │ 54258492 │ █████████████████████████ │ 2595129 │ ████████████▉ │ 49598 │ ████████████■│ +│ 2015-07-01 │ 58451788 │ █████████████████████████ │ 2720026 │ █████████████▌ │ 55022 │ █████████████▊ │ +│ 2015-08-01 │ 58075327 │ █████████████████████████ │ 2743994 │ █████████████▋ │ 55302 │ █████████████▊ │ +│ 2015-09-01 │ 55574825 │ █████████████████████████ │ 2672793 │ █████████████▎ │ 53960 │ █████████████■│ +│ 2015-10-01 │ 59494045 │ █████████████████████████ │ 2816426 │ ██████████████ │ 70210 │ █████████████████▌ │ +│ 2015-11-01 │ 57117500 │ █████████████████████████ │ 2847146 │ ██████████████■│ 71363 │ █████████████████▊ │ +│ 2015-12-01 │ 58523312 │ █████████████████████████ │ 2854840 │ ██████████████▎ │ 94559 │ ███████████████████████▋ │ +│ 2016-01-01 │ 61991732 │ █████████████████████████ │ 2920366 │ ██████████████▌ │ 108438 │ █████████████████████████ │ +│ 2016-02-01 │ 59189875 │ █████████████████████████ │ 2854683 │ ██████████████▎ │ 109916 │ █████████████████████████ │ +│ 2016-03-01 │ 63918864 │ █████████████████████████ │ 2969542 │ ██████████████▊ │ 84787 │ █████████████████████■│ +│ 2016-04-01 │ 64271256 │ █████████████████████████ │ 2999086 │ ██████████████▉ │ 61647 │ ███████████████■│ +│ 2016-05-01 │ 65212004 │ █████████████████████████ │ 3034674 │ ███████████████■│ 67465 │ ████████████████▊ │ +│ 2016-06-01 │ 65867743 │ █████████████████████████ │ 3057604 │ ███████████████▎ │ 75170 │ ██████████████████▊ │ +│ 2016-07-01 │ 66974735 │ █████████████████████████ │ 3199374 │ ███████████████▉ │ 77732 │ ███████████████████■│ +│ 2016-08-01 │ 69654819 │ █████████████████████████ │ 3239957 │ ████████████████■│ 63080 │ ███████████████▊ │ +│ 2016-09-01 │ 67024973 │ █████████████████████████ │ 3190864 │ ███████████████▉ │ 62324 │ ███████████████▌ │ +│ 2016-10-01 │ 71826553 │ █████████████████████████ │ 3284340 │ ████████████████■│ 62549 │ ███████████████▋ │ +│ 2016-11-01 │ 71022319 │ █████████████████████████ │ 3300822 │ ████████████████▌ │ 69718 │ █████████████████■│ +│ 2016-12-01 │ 72942967 │ █████████████████████████ │ 3430324 │ █████████████████■│ 71705 │ █████████████████▉ │ +│ 2017-01-01 │ 78946585 │ █████████████████████████ │ 3572093 │ █████████████████▊ │ 78198 │ ███████████████████▌ │ +│ 2017-02-01 │ 70609487 │ █████████████████████████ │ 3421115 │ █████████████████ │ 69823 │ █████████████████■│ +│ 2017-03-01 │ 79723106 │ █████████████████████████ │ 3638122 │ ██████████████████■│ 73865 │ ██████████████████■│ +│ 2017-04-01 │ 77478009 │ █████████████████████████ │ 3620591 │ ██████████████████ │ 74387 │ ██████████████████▌ │ +│ 2017-05-01 │ 79810360 │ █████████████████████████ │ 3650820 │ ██████████████████▎ │ 74356 │ ██████████████████▌ │ +│ 2017-06-01 │ 79901711 │ █████████████████████████ │ 3737614 │ ██████████████████▋ │ 72114 │ ██████████████████ │ +│ 2017-07-01 │ 81798725 │ █████████████████████████ │ 3872330 │ ███████████████████▎ │ 76052 │ ███████████████████ │ +│ 2017-08-01 │ 84658503 │ █████████████████████████ │ 3960093 │ ███████████████████▊ │ 77798 │ ███████████████████■│ +│ 2017-09-01 │ 83165192 │ █████████████████████████ │ 3880501 │ ███████████████████■│ 78402 │ ███████████████████▌ │ +│ 2017-10-01 │ 85828912 │ █████████████████████████ │ 3980335 │ ███████████████████▉ │ 80685 │ ████████████████████■│ +│ 2017-11-01 │ 84965681 │ █████████████████████████ │ 4026749 │ ████████████████████■│ 82659 │ ████████████████████▋ │ +│ 2017-12-01 │ 85973810 │ █████████████████████████ │ 4196354 │ ████████████████████▉ │ 91984 │ ██████████████████████▉ │ +│ 2018-01-01 │ 91558594 │ █████████████████████████ │ 4364443 │ █████████████████████▊ │ 102577 │ █████████████████████████ │ +│ 2018-02-01 │ 86467179 │ █████████████████████████ │ 4277899 │ █████████████████████■│ 104610 │ █████████████████████████ │ +│ 2018-03-01 │ 96490262 │ █████████████████████████ │ 4422470 │ ██████████████████████ │ 112559 │ █████████████████████████ │ +│ 2018-04-01 │ 98101232 │ █████████████████████████ │ 4572434 │ ██████████████████████▊ │ 105284 │ █████████████████████████ │ +│ 2018-05-01 │ 100109100 │ █████████████████████████ │ 4698908 │ ███████████████████████■│ 103910 │ █████████████████████████ │ +│ 2018-06-01 │ 100009462 │ █████████████████████████ │ 4697426 │ ███████████████████████■│ 101107 │ █████████████████████████ │ +│ 2018-07-01 │ 108151359 │ █████████████████████████ │ 5099492 │ █████████████████████████ │ 106184 │ █████████████████████████ │ +│ 2018-08-01 │ 107330940 │ █████████████████████████ │ 5084082 │ █████████████████████████ │ 109985 │ █████████████████████████ │ +│ 2018-09-01 │ 104473929 │ █████████████████████████ │ 5011953 │ █████████████████████████ │ 109710 │ █████████████████████████ │ +│ 2018-10-01 │ 112346556 │ █████████████████████████ │ 5320405 │ █████████████████████████ │ 112533 │ █████████████████████████ │ +│ 2018-11-01 │ 112573001 │ █████████████████████████ │ 5353282 │ █████████████████████████ │ 112211 │ █████████████████████████ │ +│ 2018-12-01 │ 121953600 │ █████████████████████████ │ 5611543 │ █████████████████████████ │ 118291 │ █████████████████████████ │ +│ 2019-01-01 │ 129386587 │ █████████████████████████ │ 6016687 │ █████████████████████████ │ 125725 │ █████████████████████████ │ +│ 2019-02-01 │ 120645639 │ █████████████████████████ │ 5974488 │ █████████████████████████ │ 125420 │ █████████████████████████ │ +│ 2019-03-01 │ 137650471 │ █████████████████████████ │ 6410197 │ █████████████████████████ │ 135924 │ █████████████████████████ │ +│ 2019-04-01 │ 138473643 │ █████████████████████████ │ 6416384 │ █████████████████████████ │ 139844 │ █████████████████████████ │ +│ 2019-05-01 │ 142463421 │ █████████████████████████ │ 6574836 │ █████████████████████████ │ 142012 │ █████████████████████████ │ +│ 2019-06-01 │ 134172939 │ █████████████████████████ │ 6601267 │ █████████████████████████ │ 140997 │ █████████████████████████ │ +│ 2019-07-01 │ 145965083 │ █████████████████████████ │ 6901822 │ █████████████████████████ │ 147802 │ █████████████████████████ │ +│ 2019-08-01 │ 146854393 │ █████████████████████████ │ 6993882 │ █████████████████████████ │ 151888 │ █████████████████████████ │ +│ 2019-09-01 │ 137540219 │ █████████████████████████ │ 7001362 │ █████████████████████████ │ 148839 │ █████████████████████████ │ +│ 2019-10-01 │ 145909884 │ █████████████████████████ │ 7160126 │ █████████████████████████ │ 152075 │ █████████████████████████ │ +│ 2019-11-01 │ 138512489 │ █████████████████████████ │ 7098723 │ █████████████████████████ │ 164597 │ █████████████████████████ │ +│ 2019-12-01 │ 146012313 │ █████████████████████████ │ 7438261 │ █████████████████████████ │ 166966 │ █████████████████████████ │ +│ 2020-01-01 │ 153498208 │ █████████████████████████ │ 7703548 │ █████████████████████████ │ 174390 │ █████████████████████████ │ +│ 2020-02-01 │ 148386817 │ █████████████████████████ │ 7582031 │ █████████████████████████ │ 170257 │ █████████████████████████ │ +│ 2020-03-01 │ 166266315 │ █████████████████████████ │ 8339049 │ █████████████████████████ │ 192460 │ █████████████████████████ │ +│ 2020-04-01 │ 178511581 │ █████████████████████████ │ 8991649 │ █████████████████████████ │ 202334 │ █████████████████████████ │ +│ 2020-05-01 │ 189993779 │ █████████████████████████ │ 9331358 │ █████████████████████████ │ 217357 │ █████████████████████████ │ +│ 2020-06-01 │ 187914434 │ █████████████████████████ │ 9085003 │ █████████████████████████ │ 223362 │ █████████████████████████ │ +│ 2020-07-01 │ 194244994 │ █████████████████████████ │ 9321706 │ █████████████████████████ │ 228222 │ █████████████████████████ │ +│ 2020-08-01 │ 196099301 │ █████████████████████████ │ 9368408 │ █████████████████████████ │ 230251 │ █████████████████████████ │ +│ 2020-09-01 │ 182549761 │ █████████████████████████ │ 9271571 │ █████████████████████████ │ 227889 │ █████████████████████████ │ +│ 2020-10-01 │ 186583890 │ █████████████████████████ │ 9396112 │ █████████████████████████ │ 233715 │ █████████████████████████ │ +│ 2020-11-01 │ 186083723 │ █████████████████████████ │ 9623053 │ █████████████████████████ │ 234963 │ █████████████████████████ │ +│ 2020-12-01 │ 191317162 │ █████████████████████████ │ 9898168 │ █████████████████████████ │ 249115 │ █████████████████████████ │ +│ 2021-01-01 │ 210496207 │ █████████████████████████ │ 10503943 │ █████████████████████████ │ 259805 │ █████████████████████████ │ +│ 2021-02-01 │ 193510365 │ █████████████████████████ │ 10215033 │ █████████████████████████ │ 253656 │ █████████████████████████ │ +│ 2021-03-01 │ 207454415 │ █████████████████████████ │ 10365629 │ █████████████████████████ │ 267263 │ █████████████████████████ │ +│ 2021-04-01 │ 204573086 │ █████████████████████████ │ 10391984 │ █████████████████████████ │ 270543 │ █████████████████████████ │ +│ 2021-05-01 │ 217655366 │ █████████████████████████ │ 10648130 │ █████████████████████████ │ 288555 │ █████████████████████████ │ +│ 2021-06-01 │ 208027069 │ █████████████████████████ │ 10397311 │ █████████████████████████ │ 291520 │ █████████████████████████ │ +│ 2021-07-01 │ 210955954 │ █████████████████████████ │ 10063967 │ █████████████████████████ │ 252061 │ █████████████████████████ │ +│ 2021-08-01 │ 225681244 │ █████████████████████████ │ 10383556 │ █████████████████████████ │ 254569 │ █████████████████████████ │ +│ 2021-09-01 │ 220086513 │ █████████████████████████ │ 10298344 │ █████████████████████████ │ 256826 │ █████████████████████████ │ +│ 2021-10-01 │ 227527379 │ █████████████████████████ │ 10729882 │ █████████████████████████ │ 283328 │ █████████████████████████ │ +│ 2021-11-01 │ 228289963 │ █████████████████████████ │ 10995197 │ █████████████████████████ │ 302386 │ █████████████████████████ │ +│ 2021-12-01 │ 235807471 │ █████████████████████████ │ 11312798 │ █████████████████████████ │ 313876 │ █████████████████████████ │ +│ 2022-01-01 │ 256766679 │ █████████████████████████ │ 12074520 │ █████████████████████████ │ 340407 │ █████████████████████████ │ +│ 2022-02-01 │ 219927645 │ █████████████████████████ │ 10846045 │ █████████████████████████ │ 293236 │ █████████████████████████ │ +│ 2022-03-01 │ 236554668 │ █████████████████████████ │ 11330285 │ █████████████████████████ │ 302387 │ █████████████████████████ │ +│ 2022-04-01 │ 231188077 │ █████████████████████████ │ 11697995 │ █████████████████████████ │ 316303 │ █████████████████████████ │ +│ 2022-05-01 │ 230492108 │ █████████████████████████ │ 11448584 │ █████████████████████████ │ 323725 │ █████████████████████████ │ +│ 2022-06-01 │ 218842949 │ █████████████████████████ │ 11400399 │ █████████████████████████ │ 324846 │ █████████████████████████ │ +│ 2022-07-01 │ 242504279 │ █████████████████████████ │ 12049204 │ █████████████████████████ │ 335621 │ █████████████████████████ │ +│ 2022-08-01 │ 247215325 │ █████████████████████████ │ 12189276 │ █████████████████████████ │ 337873 │ █████████████████████████ │ +│ 2022-09-01 │ 234131223 │ █████████████████████████ │ 11674079 │ █████████████████████████ │ 326325 │ █████████████████████████ │ +│ 2022-10-01 │ 237365072 │ █████████████████████████ │ 11804508 │ █████████████████████████ │ 336063 │ █████████████████████████ │ +│ 2022-11-01 │ 229478878 │ █████████████████████████ │ 11543020 │ █████████████████████████ │ 323122 │ █████████████████████████ │ +│ 2022-12-01 │ 238862690 │ █████████████████████████ │ 11967451 │ █████████████████████████ │ 331668 │ █████████████████████████ │ +│ 2023-01-01 │ 253577512 │ █████████████████████████ │ 12264087 │ █████████████████████████ │ 332711 │ █████████████████████████ │ +│ 2023-02-01 │ 221285501 │ █████████████████████████ │ 11537091 │ █████████████████████████ │ 317879 │ █████████████████████████ │ +└──────────────┴───────────┴───────────────────────────┴──────────┴───────────────────────────┴────────────┴───────────────────────────┘ + +203 rows in set. Elapsed: 48.492 sec. Processed 14.69 billion rows, 213.35 GB (302.91 million rows/s., 4.40 GB/s.) +``` + +```sql +SELECT + subreddit, + count() AS count +FROM reddit +WHERE toYear(created_utc) = 2022 +GROUP BY subreddit +ORDER BY count DESC +LIMIT 10; +``` + +```response +┌─subreddit──────┬────count─┠+│ AskReddit │ 72312060 │ +│ AmItheAsshole │ 25323210 │ +│ teenagers │ 22355960 │ +│ worldnews │ 17797707 │ +│ FreeKarma4U │ 15652274 │ +│ FreeKarma4You │ 14929055 │ +│ wallstreetbets │ 14235271 │ +│ politics │ 12511136 │ +│ memes │ 11610792 │ +│ nba │ 11586571 │ +└────────────────┴──────────┘ + +10 rows in set. Elapsed: 5.956 sec. Processed 14.69 billion rows, 126.19 GB (2.47 billion rows/s., 21.19 GB/s.) +``` + +11. 次ã«ã€2018å¹´ã‹ã‚‰2019å¹´ã«ã‹ã‘ã¦ã‚³ãƒ¡ãƒ³ãƒˆæ•°ãŒæœ€ã‚‚増加ã—ãŸã‚µãƒ–レディットを見ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT + subreddit, + newcount - oldcount AS diff +FROM +( + SELECT + subreddit, + count(*) AS newcount + FROM reddit + WHERE toYear(created_utc) = 2019 + GROUP BY subreddit +) +ALL INNER JOIN +( + SELECT + subreddit, + count(*) AS oldcount + FROM reddit + WHERE toYear(created_utc) = 2018 + GROUP BY subreddit +) USING (subreddit) +ORDER BY diff DESC +LIMIT 50 +SETTINGS joined_subquery_requires_alias = 0; +``` + +2019å¹´ã¯ã€Œmemesã€ã¨ã€Œteenagersã€ãŒRedditã§ç››ã‚Šä¸ŠãŒã£ã¦ã„ãŸã‚ˆã†ã§ã™ï¼š + +```response +┌─subreddit────────────┬─────diff─┠+│ AskReddit │ 18765909 │ +│ memes │ 16496996 │ +│ teenagers │ 13071715 │ +│ AmItheAsshole │ 12312663 │ +│ dankmemes │ 12016716 │ +│ unpopularopinion │ 6809935 │ +│ PewdiepieSubmissions │ 6330844 │ +│ Market76 │ 5213690 │ +│ relationship_advice │ 4060717 │ +│ Minecraft │ 3328659 │ +│ freefolk │ 3227970 │ +│ classicwow │ 3063133 │ +│ Animemes │ 2866876 │ +│ gonewild │ 2457680 │ +│ PublicFreakout │ 2452288 │ +│ gameofthrones │ 2411661 │ +│ RoastMe │ 2378781 │ +│ ShitPostCrusaders │ 2345414 │ +│ AnthemTheGame │ 1813152 │ +│ nfl │ 1804407 │ +│ Showerthoughts │ 1797968 │ +│ Cringetopia │ 1764034 │ +│ pokemon │ 1763269 │ +│ entitledparents │ 1744852 │ +│ HistoryMemes │ 1721645 │ +│ MortalKombat │ 1718184 │ +│ trashy │ 1684357 │ +│ ChapoTrapHouse │ 1675363 │ +│ Brawlstars │ 1663763 │ +│ iamatotalpieceofshit │ 1647381 │ +│ ukpolitics │ 1599204 │ +│ cursedcomments │ 1590781 │ +│ Pikabu │ 1578597 │ +│ wallstreetbets │ 1535225 │ +│ AskOuija │ 1533214 │ +│ interestingasfuck │ 1528910 │ +│ aww │ 1439008 │ +│ wholesomememes │ 1436566 │ +│ SquaredCircle │ 1432172 │ +│ insanepeoplefacebook │ 1290686 │ +│ borderlands3 │ 1274462 │ +│ FreeKarma4U │ 1217769 │ +│ YangForPresidentHQ │ 1186918 │ +│ FortniteCompetitive │ 1184508 │ +│ AskMen │ 1180820 │ +│ EpicSeven │ 1172061 │ +│ MurderedByWords │ 1112476 │ +│ politics │ 1084087 │ +│ barstoolsports │ 1068020 │ +│ BattlefieldV │ 1053878 │ +└──────────────────────┴──────────┘ + +50 rows in set. Elapsed: 10.680 sec. Processed 29.38 billion rows, 198.67 GB (2.75 billion rows/s., 18.60 GB/s.) +``` + +12. ã‚‚ã†ä¸€ã¤ã‚¯ã‚¨ãƒª: ClickHouseã«é–¢ã™ã‚‹è¨€åŠã‚’ã€Snowflakeã‚„Postgresã¨ã„ã£ãŸä»–ã®æŠ€è¡“ã¨æ¯”較ã—ã¦ã¿ã¾ã—ょã†ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯ã€14.69億件ã®ã‚³ãƒ¡ãƒ³ãƒˆå…¨ä½“ã§ãã‚Œãžã‚Œéƒ¨åˆ†æ–‡å­—列を3回検索ã™ã‚‹ãŸã‚大ããªã‚¯ã‚¨ãƒªã§ã™ãŒã€ãƒ‘フォーマンスã¯éžå¸¸ã«å°è±¡çš„ã§ã™ã€‚(残念ãªãŒã‚‰ClickHouseユーザーã¯ã¾ã Redditã§ã¯ã‚ã¾ã‚Šæ´»ç™ºã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒï¼‰ï¼š + +```sql +SELECT + toStartOfQuarter(created_utc) AS quarter, + sum(if(positionCaseInsensitive(body, 'clickhouse') > 0, 1, 0)) AS clickhouse, + sum(if(positionCaseInsensitive(body, 'snowflake') > 0, 1, 0)) AS snowflake, + sum(if(positionCaseInsensitive(body, 'postgres') > 0, 1, 0)) AS postgres +FROM reddit +GROUP BY quarter +ORDER BY quarter ASC; +``` + +```response +┌────quarter─┬─clickhouse─┬─snowflake─┬─postgres─┠+│ 2005-10-01 │ 0 │ 0 │ 0 │ +│ 2006-01-01 │ 0 │ 2 │ 23 │ +│ 2006-04-01 │ 0 │ 2 │ 24 │ +│ 2006-07-01 │ 0 │ 4 │ 13 │ +│ 2006-10-01 │ 0 │ 23 │ 73 │ +│ 2007-01-01 │ 0 │ 14 │ 91 │ +│ 2007-04-01 │ 0 │ 10 │ 59 │ +│ 2007-07-01 │ 0 │ 39 │ 116 │ +│ 2007-10-01 │ 0 │ 45 │ 125 │ +│ 2008-01-01 │ 0 │ 53 │ 234 │ +│ 2008-04-01 │ 0 │ 79 │ 303 │ +│ 2008-07-01 │ 0 │ 102 │ 174 │ +│ 2008-10-01 │ 0 │ 156 │ 323 │ +│ 2009-01-01 │ 0 │ 206 │ 208 │ +│ 2009-04-01 │ 0 │ 178 │ 417 │ +│ 2009-07-01 │ 0 │ 300 │ 295 │ +│ 2009-10-01 │ 0 │ 633 │ 589 │ +│ 2010-01-01 │ 0 │ 555 │ 501 │ +│ 2010-04-01 │ 0 │ 587 │ 469 │ +│ 2010-07-01 │ 0 │ 601 │ 696 │ +│ 2010-10-01 │ 0 │ 1246 │ 505 │ +│ 2011-01-01 │ 0 │ 758 │ 247 │ +│ 2011-04-01 │ 0 │ 537 │ 113 │ +│ 2011-07-01 │ 0 │ 173 │ 64 │ +│ 2011-10-01 │ 0 │ 649 │ 96 │ +│ 2012-01-01 │ 0 │ 4621 │ 662 │ +│ 2012-04-01 │ 0 │ 5737 │ 785 │ +│ 2012-07-01 │ 0 │ 6097 │ 1127 │ +│ 2012-10-01 │ 0 │ 7986 │ 600 │ +│ 2013-01-01 │ 0 │ 9704 │ 839 │ +│ 2013-04-01 │ 0 │ 8161 │ 853 │ +│ 2013-07-01 │ 0 │ 9704 │ 1028 │ +│ 2013-10-01 │ 0 │ 12879 │ 1404 │ +│ 2014-01-01 │ 0 │ 12317 │ 1548 │ +│ 2014-04-01 │ 0 │ 13181 │ 1577 │ +│ 2014-07-01 │ 0 │ 15640 │ 1710 │ +│ 2014-10-01 │ 0 │ 19479 │ 1959 │ +│ 2015-01-01 │ 0 │ 20411 │ 2104 │ +│ 2015-04-01 │ 1 │ 20309 │ 9112 │ +│ 2015-07-01 │ 0 │ 20325 │ 4771 │ +│ 2015-10-01 │ 0 │ 25087 │ 3030 │ +│ 2016-01-01 │ 0 │ 23462 │ 3126 │ +│ 2016-04-01 │ 3 │ 25496 │ 2757 │ +│ 2016-07-01 │ 4 │ 28233 │ 2928 │ +│ 2016-10-01 │ 2 │ 45445 │ 2449 │ +│ 2017-01-01 │ 9 │ 76019 │ 2808 │ +│ 2017-04-01 │ 9 │ 67919 │ 2803 │ +│ 2017-07-01 │ 13 │ 68974 │ 2771 │ +│ 2017-10-01 │ 12 │ 69730 │ 2906 │ +│ 2018-01-01 │ 17 │ 67476 │ 3152 │ +│ 2018-04-01 │ 3 │ 67139 │ 3986 │ +│ 2018-07-01 │ 14 │ 67979 │ 3609 │ +│ 2018-10-01 │ 28 │ 74147 │ 3850 │ +│ 2019-01-01 │ 14 │ 80250 │ 4305 │ +│ 2019-04-01 │ 30 │ 70307 │ 3872 │ +│ 2019-07-01 │ 33 │ 77149 │ 4164 │ +│ 2019-10-01 │ 22 │ 113011 │ 4369 │ +│ 2020-01-01 │ 34 │ 238273 │ 5133 │ +│ 2020-04-01 │ 52 │ 454467 │ 6100 │ +│ 2020-07-01 │ 37 │ 406623 │ 5507 │ +│ 2020-10-01 │ 49 │ 212143 │ 5385 │ +│ 2021-01-01 │ 56 │ 151262 │ 5749 │ +│ 2021-04-01 │ 71 │ 119928 │ 6039 │ +│ 2021-07-01 │ 53 │ 110342 │ 5765 │ +│ 2021-10-01 │ 92 │ 121144 │ 6401 │ +│ 2022-01-01 │ 93 │ 107512 │ 6772 │ +│ 2022-04-01 │ 120 │ 91560 │ 6687 │ +│ 2022-07-01 │ 183 │ 99764 │ 7377 │ +│ 2022-10-01 │ 123 │ 99447 │ 7052 │ +│ 2023-01-01 │ 126 │ 58733 │ 4891 │ +└────────────┴────────────┴───────────┴──────────┘ + +70 rows in set. Elapsed: 325.835 sec. Processed 14.69 billion rows, 2.57 TB (45.08 million rows/s., 7.87 GB/s.) +``` \ No newline at end of file diff --git a/docs/ja/getting-started/example-datasets/stackoverflow.md b/docs/ja/getting-started/example-datasets/stackoverflow.md new file mode 100644 index 00000000000..ac63a65ee49 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/stackoverflow.md @@ -0,0 +1,392 @@ +--- +slug: /ja/getting-started/example-datasets/stackoverflow +sidebar_label: Stack Overflow +sidebar_position: 1 +description: Stack Overflowデータã®ClickHouseã«ã‚ˆã‚‹åˆ†æž +--- + +# Stack Overflowデータã®ClickHouseã«ã‚ˆã‚‹åˆ†æž + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€Stack Overflowã§è¡Œã‚ã‚ŒãŸã™ã¹ã¦ã®`Posts`ã€`Users`ã€`Votes`ã€`Comments`ã€`Badges`ã€`PostHistory`ã€`PostLinks`ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +ユーザーã¯ã€2024å¹´4月ã¾ã§ã®ã™ã¹ã¦ã®æŠ•ç¨¿ã‚’å«ã‚€ã€äº‹å‰æº–å‚™ã•ã‚ŒãŸParquetå½¢å¼ã®ãƒ‡ãƒ¼ã‚¿ã‚’ダウンロードã™ã‚‹ã‹ã€æœ€æ–°ã®ãƒ‡ãƒ¼ã‚¿ã‚’XMLå½¢å¼ã§ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦èª­ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚Stack Overflowã¯ã€éŽåŽ»ã«ã¯3ヶ月ã”ã¨ã«ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’定期的ã«æ›´æ–°ã—ã¦ã„ã¾ã™ã€‚ + +次ã®å›³ã¯ã€Parquetå½¢å¼ã‚’å‰æã¨ã—ãŸåˆ©ç”¨å¯èƒ½ãªãƒ†ãƒ¼ãƒ–ルã®ã‚¹ã‚­ãƒ¼ãƒžã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +![Stack Overflow schema](./images/stackoverflow.png) + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¹ã‚­ãƒ¼ãƒžã®èª¬æ˜Žã¯[ã“ã¡ã‚‰](https://meta.stackexchange.com/questions/2677/database-schema-documentation-for-the-public-data-dump-and-sede)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +## 事å‰æº–å‚™ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ + +Parquetå½¢å¼ã§2024å¹´4月ã¾ã§æœ€æ–°ã®çŠ¶æ…‹ã«æ›´æ–°ã—ãŸã“ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚³ãƒ”ーをæä¾›ã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ã€ClickHouseã«ã¨ã£ã¦è¡Œæ•°ï¼ˆ6000万件ã®æŠ•ç¨¿ï¼‰ã«é–¢ã—ã¦ã¯å°ã•ã„ã§ã™ãŒã€è†¨å¤§ãªãƒ†ã‚­ã‚¹ãƒˆã¨å¤§ããªStringカラムãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +```sql +CREATE DATABASE stackoverflow +``` + +以下ã®ã‚¿ã‚¤ãƒŸãƒ³ã‚°ã¯ã€`eu-west-2`ã«ã‚ã‚‹96 GiBã€24 vCPUã®ClickHouse Cloudクラスターを対象ã«ã—ã¦ã„ã¾ã™ã€‚データセットã¯`eu-west-3`ã«ã‚ã‚Šã¾ã™ã€‚ + +### Posts + +```sql +CREATE TABLE stackoverflow.posts +( + `Id` Int32 CODEC(Delta(4), ZSTD(1)), + `PostTypeId` Enum8('Question' = 1, 'Answer' = 2, 'Wiki' = 3, 'TagWikiExcerpt' = 4, 'TagWiki' = 5, 'ModeratorNomination' = 6, 'WikiPlaceholder' = 7, 'PrivilegeWiki' = 8), + `AcceptedAnswerId` UInt32, + `CreationDate` DateTime64(3, 'UTC'), + `Score` Int32, + `ViewCount` UInt32 CODEC(Delta(4), ZSTD(1)), + `Body` String, + `OwnerUserId` Int32, + `OwnerDisplayName` String, + `LastEditorUserId` Int32, + `LastEditorDisplayName` String, + `LastEditDate` DateTime64(3, 'UTC') CODEC(Delta(8), ZSTD(1)), + `LastActivityDate` DateTime64(3, 'UTC'), + `Title` String, + `Tags` String, + `AnswerCount` UInt16 CODEC(Delta(2), ZSTD(1)), + `CommentCount` UInt8, + `FavoriteCount` UInt8, + `ContentLicense` LowCardinality(String), + `ParentId` String, + `CommunityOwnedDate` DateTime64(3, 'UTC'), + `ClosedDate` DateTime64(3, 'UTC') +) +ENGINE = MergeTree +PARTITION BY toYear(CreationDate) +ORDER BY (PostTypeId, toDate(CreationDate), CreationDate) + +INSERT INTO stackoverflow.posts SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/*.parquet') + +0 rows in set. Elapsed: 265.466 sec. Processed 59.82 million rows, 38.07 GB (225.34 thousand rows/s., 143.42 MB/s.) +``` + +投稿ã¯ã€å¹´ã”ã¨ã«ã‚‚利用å¯èƒ½ã§ã™ã€‚例:[https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/2020.parquet](https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/2020.parquet) + +### Votes + +```sql +CREATE TABLE stackoverflow.votes +( + `Id` UInt32, + `PostId` Int32, + `VoteTypeId` UInt8, + `CreationDate` DateTime64(3, 'UTC'), + `UserId` Int32, + `BountyAmount` UInt8 +) +ENGINE = MergeTree +ORDER BY (VoteTypeId, CreationDate, PostId, UserId) + +INSERT INTO stackoverflow.votes SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/votes/*.parquet') + +0 rows in set. Elapsed: 21.605 sec. Processed 238.98 million rows, 2.13 GB (11.06 million rows/s., 98.46 MB/s.) +``` + +投票ã¯ã€å¹´ã”ã¨ã«ã‚‚利用å¯èƒ½ã§ã™ã€‚例:[https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/2020.parquet](https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/votes/2020.parquet) + +### Comments + +```sql +CREATE TABLE stackoverflow.comments +( + `Id` UInt32, + `PostId` UInt32, + `Score` UInt16, + `Text` String, + `CreationDate` DateTime64(3, 'UTC'), + `UserId` Int32, + `UserDisplayName` LowCardinality(String) +) +ENGINE = MergeTree +ORDER BY CreationDate + +INSERT INTO stackoverflow.comments SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/comments/*.parquet') + +0 rows in set. Elapsed: 56.593 sec. Processed 90.38 million rows, 11.14 GB (1.60 million rows/s., 196.78 MB/s.) +``` + +コメントも年ã”ã¨ã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚例:[https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/2020.parquet](https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/comments/2020.parquet) + +### Users + +```sql +CREATE TABLE stackoverflow.users +( + `Id` Int32, + `Reputation` LowCardinality(String), + `CreationDate` DateTime64(3, 'UTC') CODEC(Delta(8), ZSTD(1)), + `DisplayName` String, + `LastAccessDate` DateTime64(3, 'UTC'), + `AboutMe` String, + `Views` UInt32, + `UpVotes` UInt32, + `DownVotes` UInt32, + `WebsiteUrl` String, + `Location` LowCardinality(String), + `AccountId` Int32 +) +ENGINE = MergeTree +ORDER BY (Id, CreationDate) + +INSERT INTO stackoverflow.users SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/users.parquet') + +0 rows in set. Elapsed: 10.988 sec. Processed 22.48 million rows, 1.36 GB (2.05 million rows/s., 124.10 MB/s.) +``` + +### Badges + +```sql +CREATE TABLE stackoverflow.badges +( + `Id` UInt32, + `UserId` Int32, + `Name` LowCardinality(String), + `Date` DateTime64(3, 'UTC'), + `Class` Enum8('Gold' = 1, 'Silver' = 2, 'Bronze' = 3), + `TagBased` Bool +) +ENGINE = MergeTree +ORDER BY UserId + +INSERT INTO stackoverflow.badges SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/badges.parquet') + +0 rows in set. Elapsed: 6.635 sec. Processed 51.29 million rows, 797.05 MB (7.73 million rows/s., 120.13 MB/s.) +``` + +### PostLinks + +```sql +CREATE TABLE stackoverflow.postlinks +( + `Id` UInt64, + `CreationDate` DateTime64(3, 'UTC'), + `PostId` Int32, + `RelatedPostId` Int32, + `LinkTypeId` Enum8('Linked' = 1, 'Duplicate' = 3) +) +ENGINE = MergeTree +ORDER BY (PostId, RelatedPostId) + +INSERT INTO stackoverflow.postlinks SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/postlinks.parquet') + +0 rows in set. Elapsed: 1.534 sec. Processed 6.55 million rows, 129.70 MB (4.27 million rows/s., 84.57 MB/s.) +``` + +### PostHistory + +```sql +CREATE TABLE stackoverflow.posthistory +( + `Id` UInt64, + `PostHistoryTypeId` UInt8, + `PostId` Int32, + `RevisionGUID` String, + `CreationDate` DateTime64(3, 'UTC'), + `UserId` Int32, + `Text` String, + `ContentLicense` LowCardinality(String), + `Comment` String, + `UserDisplayName` String +) +ENGINE = MergeTree +ORDER BY (CreationDate, PostId) + +INSERT INTO stackoverflow.posthistory SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posthistory/*.parquet') + +0 rows in set. Elapsed: 422.795 sec. Processed 160.79 million rows, 67.08 GB (380.30 thousand rows/s., 158.67 MB/s.) +``` + +## オリジナルデータセット + +オリジナルã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ã€åœ§ç¸®æ¸ˆã¿ï¼ˆ7zip)XMLå½¢å¼ã§[https://archive.org/download/stackexchange](https://archive.org/download/stackexchange)ã‹ã‚‰åˆ©ç”¨ã§ãã¾ã™ã€‚`stackoverflow.com*`プレフィックスãŒä»˜ã„ãŸãƒ•ã‚¡ã‚¤ãƒ«ã§ã™ã€‚ + +### ダウンロード + +```bash +wget https://archive.org/download/stackexchange/stackoverflow.com-Badges.7z +wget https://archive.org/download/stackexchange/stackoverflow.com-Comments.7z +wget https://archive.org/download/stackexchange/stackoverflow.com-PostHistory.7z +wget https://archive.org/download/stackexchange/stackoverflow.com-PostLinks.7z +wget https://archive.org/download/stackexchange/stackoverflow.com-Posts.7z +wget https://archive.org/download/stackexchange/stackoverflow.com-Users.7z +wget https://archive.org/download/stackexchange/stackoverflow.com-Votes.7z +``` + +ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯æœ€å¤§35GBã¾ã§ã‚ã‚Šã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆæŽ¥ç¶šã«ã‚ˆã£ã¦ã¯ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã«ç´„30分ã‹ã‹ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ダウンロードサーãƒãƒ¼ã¯ç´„20MB/secã§åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### JSONã¸ã®å¤‰æ› + +執筆時点ã§ã€ClickHouseã¯å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ã—ã¦XMLã‚’ãƒã‚¤ãƒ†ã‚£ãƒ–ã«ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ã«ã¯ã€ã¾ãšNDJSONã«å¤‰æ›ã—ã¾ã™ã€‚ + +XMLã‚’JSONã«å¤‰æ›ã™ã‚‹ã«ã¯ã€XMLドキュメント用ã®ã‚·ãƒ³ãƒ—ルãª`jq`ラッパーツールã§ã‚ã‚‹[`xq`](https://github.com/kislyuk/yq)ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +xqã¨jqã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ï¼š + +```bash +sudo apt install jq +pip install yq +``` + +以下ã®æ‰‹é †ã¯ä¸Šè¨˜ã®ä»»æ„ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã“ã§ã¯`stackoverflow.com-Posts.7z`ファイルを例ã«ä½¿ç”¨ã—ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ä¿®æ­£ã—ã¦ãã ã•ã„。 + +[p7zip](https://p7zip.sourceforge.net/)を使用ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‚’抽出ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šå˜ä¸€ã®xmlファイルãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚今回ã®å ´åˆã¯`Posts.xml`ã§ã™ã€‚ + +> ファイルã¯ç´„4.5å€åœ§ç¸®ã•ã‚Œã¦ã„ã¾ã™ã€‚22GB圧縮時ã€æŠ•ç¨¿ãƒ•ã‚¡ã‚¤ãƒ«ã¯ç´„97Géžåœ§ç¸®ã§å¿…è¦ã§ã™ã€‚ + +```bash +p7zip -d stackoverflow.com-Posts.7z +``` + +以下ã¯xmlファイルを10000è¡Œãšã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ†å‰²ã—ã¾ã™ã€‚ + +```bash +mkdir posts +cd posts +# 以下ã¯å…¥åŠ›xmlファイルを10000è¡Œã®ã‚µãƒ–ファイルã«åˆ†å‰²ã—ã¾ã™ã€‚ +tail +3 ../Posts.xml | head -n -1 | split -l 10000 --filter='{ printf "\n"; cat - ; printf "\n"; } > $FILE' - +``` + +上記を実行ã™ã‚‹ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãã‚Œãžã‚Œ10000è¡Œã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’セットã§å–å¾—ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã®ãƒ¡ãƒ¢ãƒªã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒéŽåº¦ã«ãªã‚‰ãªã„ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¾ã™ï¼ˆXMLã‹ã‚‰JSONã¸ã®å¤‰æ›ã¯ãƒ¡ãƒ¢ãƒªå†…ã§è¡Œã‚ã‚Œã¾ã™ï¼‰ã€‚ + +```bash +find . -maxdepth 1 -type f -exec xq -c '.rows.row[]' {} \; | sed -e 's:"@:":g' > posts_v2.json +``` + +上記ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å˜ä¸€ã®`posts.json`ファイルを生æˆã—ã¾ã™ã€‚ + +次ã®ã‚³ãƒžãƒ³ãƒ‰ã§ClickHouseã«ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚`posts.json`ファイルã®ã‚¹ã‚­ãƒ¼ãƒžãŒæŒ‡å®šã•ã‚Œã¦ã„る点ã«æ³¨æ„ã—ã¦ãã ã•ã„。データタイプã«å¿œã˜ã¦ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹é©ç”¨ãŒå¿…è¦ã§ã™ã€‚ + +```bash +clickhouse local --query "SELECT * FROM file('posts.json', JSONEachRow, 'Id Int32, PostTypeId UInt8, AcceptedAnswerId UInt32, CreationDate DateTime64(3, \'UTC\'), Score Int32, ViewCount UInt32, Body String, OwnerUserId Int32, OwnerDisplayName String, LastEditorUserId Int32, LastEditorDisplayName String, LastEditDate DateTime64(3, \'UTC\'), LastActivityDate DateTime64(3, \'UTC\'), Title String, Tags String, AnswerCount UInt16, CommentCount UInt8, FavoriteCount UInt8, ContentLicense String, ParentId String, CommunityOwnedDate DateTime64(3, \'UTC\'), ClosedDate DateTime64(3, \'UTC\')') FORMAT Native" | clickhouse client --host --secure --password --query "INSERT INTO stackoverflow.posts_v2 FORMAT Native" +``` + +## クエリ例 + +ã„ãã¤ã‹ã®ç°¡å˜ãªè³ªå•ã‚’ã—ã¦ã€å§‹ã‚る手助ã‘ã‚’ã—ã¾ã™ã€‚ + +### Stack Overflowã®æœ€ã‚‚人気ã®ã‚ã‚‹ã‚¿ã‚° + +```sql + +SELECT + arrayJoin(arrayFilter(t -> (t != ''), splitByChar('|', Tags))) AS Tags, + count() AS c +FROM stackoverflow.posts +GROUP BY Tags +ORDER BY c DESC +LIMIT 10 + +┌─Tags───────┬───────c─┠+│ javascript │ 2527130 │ +│ python │ 2189638 │ +│ java │ 1916156 │ +│ c# │ 1614236 │ +│ php │ 1463901 │ +│ android │ 1416442 │ +│ html │ 1186567 │ +│ jquery │ 1034621 │ +│ c++ │ 806202 │ +│ css │ 803755 │ +└────────────┴─────────┘ + +10 rows in set. Elapsed: 1.013 sec. Processed 59.82 million rows, 1.21 GB (59.07 million rows/s., 1.19 GB/s.) +Peak memory usage: 224.03 MiB. +``` + +### 最も回答ã®å¤šã„ユーザー(アクティブアカウント) + +アカウントã«ã¯`UserId`ãŒå¿…è¦ã§ã™ã€‚ + +```sql +SELECT + any(OwnerUserId) UserId, + OwnerDisplayName, + count() AS c +FROM stackoverflow.posts WHERE OwnerDisplayName != '' AND PostTypeId='Answer' AND OwnerUserId != 0 +GROUP BY OwnerDisplayName +ORDER BY c DESC +LIMIT 5 + +┌─UserId─┬─OwnerDisplayName─┬────c─┠+│ 22656 │ Jon Skeet │ 2727 │ +│ 23354 │ Marc Gravell │ 2150 │ +│ 12950 │ tvanfosson │ 1530 │ +│ 3043 │ Joel Coehoorn │ 1438 │ +│ 10661 │ S.Lott │ 1087 │ +└────────┴──────────────────┴──────┘ + +5 rows in set. Elapsed: 0.154 sec. Processed 35.83 million rows, 193.39 MB (232.33 million rows/s., 1.25 GB/s.) +Peak memory usage: 206.45 MiB. +``` + +### ClickHouse関連ã®æŠ•ç¨¿ã§æœ€ã‚‚多ãã®é–²è¦§æ•° + +```sql +SELECT + Id, + Title, + ViewCount, + AnswerCount +FROM stackoverflow.posts +WHERE Title ILIKE '%ClickHouse%' +ORDER BY ViewCount DESC +LIMIT 10 + +┌───────Id─┬─Title────────────────────────────────────────────────────────────────────────────┬─ViewCount─┬─AnswerCount─┠+│ 52355143 │ Is it possible to delete old records from clickhouse table? │ 41462 │ 3 │ +│ 37954203 │ Clickhouse Data Import │ 38735 │ 3 │ +│ 37901642 │ Updating data in Clickhouse │ 36236 │ 6 │ +│ 58422110 │ Pandas: How to insert dataframe into Clickhouse │ 29731 │ 4 │ +│ 63621318 │ DBeaver - Clickhouse - SQL Error [159] .. Read timed out │ 27350 │ 1 │ +│ 47591813 │ How to filter clickhouse table by array column contents? │ 27078 │ 2 │ +│ 58728436 │ How to search the string in query with case insensitive on Clickhouse database? │ 26567 │ 3 │ +│ 65316905 │ Clickhouse: DB::Exception: Memory limit (for query) exceeded │ 24899 │ 2 │ +│ 49944865 │ How to add a column in clickhouse │ 24424 │ 1 │ +│ 59712399 │ How to cast date Strings to DateTime format with extended parsing in ClickHouse? │ 22620 │ 1 │ +└──────────┴──────────────────────────────────────────────────────────────────────────────────┴───────────┴─────────────┘ + +10 rows in set. Elapsed: 0.472 sec. Processed 59.82 million rows, 1.91 GB (126.63 million rows/s., 4.03 GB/s.) +Peak memory usage: 240.01 MiB. +``` + +### 最も議論を呼ã¶æŠ•ç¨¿ + +```sql +SELECT + Id, + Title, + UpVotes, + DownVotes, + abs(UpVotes - DownVotes) AS Controversial_ratio +FROM stackoverflow.posts +INNER JOIN +( + SELECT + PostId, + countIf(VoteTypeId = 2) AS UpVotes, + countIf(VoteTypeId = 3) AS DownVotes + FROM stackoverflow.votes + GROUP BY PostId + HAVING (UpVotes > 10) AND (DownVotes > 10) +) AS votes ON posts.Id = votes.PostId +WHERE Title != '' +ORDER BY Controversial_ratio ASC +LIMIT 3 + +┌───────Id─┬─Title─────────────────────────────────────────────┬─UpVotes─┬─DownVotes─┬─Controversial_ratio─┠+│ 583177 │ VB.NET Infinite For Loop │ 12 │ 12 │ 0 │ +│ 9756797 │ Read console input as enumerable - one statement? │ 16 │ 16 │ 0 │ +│ 13329132 │ What's the point of ARGV in Ruby? │ 22 │ 22 │ 0 │ +└──────────┴───────────────────────────────────────────────────┴─────────┴───────────┴─────────────────────┘ + +3 rows in set. Elapsed: 4.779 sec. Processed 298.80 million rows, 3.16 GB (62.52 million rows/s., 661.05 MB/s.) +Peak memory usage: 6.05 GiB. +``` + +## 帰属 + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’æä¾›ã—ã¦ãã‚ŒãŸStack Overflowã«æ„Ÿè¬ã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯`cc-by-sa 4.0`ライセンスã®ä¸‹ã§æä¾›ã•ã‚Œã¦ãŠã‚Šã€[https://archive.org/details/stackexchange](https://archive.org/details/stackexchange)ã§å…ƒã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã«æ„Ÿè¬ã—ã¾ã™ã€‚ diff --git a/docs/ja/getting-started/example-datasets/star-schema.md b/docs/ja/getting-started/example-datasets/star-schema.md new file mode 100644 index 00000000000..e399d367a2f --- /dev/null +++ b/docs/ja/getting-started/example-datasets/star-schema.md @@ -0,0 +1,772 @@ +--- +slug: /ja/getting-started/example-datasets/star-schema +sidebar_label: スタースキーマベンãƒãƒžãƒ¼ã‚¯ +description: "スター スキーマ ベンãƒãƒžãƒ¼ã‚¯ (SSB) データ セットã¨ã‚¯ã‚¨ãƒª" +--- + +# スター スキーマ ベンãƒãƒžãƒ¼ã‚¯ (SSB, 2009) + +スター スキーマ ベンãƒãƒžãƒ¼ã‚¯ã¯ã€[TPC-H](tpch.md) ã®ãƒ†ãƒ¼ãƒ–ルã¨ã‚¯ã‚¨ãƒªã‚’ã ã„ãŸã„基ã«ã—ã¦ã„ã¾ã™ãŒã€TPC-Hã¨ã¯ç•°ãªã‚Šã€ã‚¹ã‚¿ãƒ¼ スキーマ レイアウトを使用ã—ã¦ã„ã¾ã™ã€‚ +データã®å¤§éƒ¨åˆ†ã¯å·¨å¤§ãªãƒ•ã‚¡ã‚¯ãƒˆãƒ†ãƒ¼ãƒ–ルã«ã‚ã‚Šã€è¤‡æ•°ã®å°ã•ãªãƒ‡ã‚£ãƒ¡ãƒ³ã‚·ãƒ§ãƒ³ãƒ†ãƒ¼ãƒ–ルã«å›²ã¾ã‚Œã¦ã„ã¾ã™ã€‚ +クエリã§ã¯ã€ãƒ•ã‚¡ã‚¯ãƒˆãƒ†ãƒ¼ãƒ–ルを1ã¤ä»¥ä¸Šã®ãƒ‡ã‚£ãƒ¡ãƒ³ã‚·ãƒ§ãƒ³ãƒ†ãƒ¼ãƒ–ルã¨çµåˆã—ã€ãŸã¨ãˆã° `MONTH = 'JANUARY'` ã®ã‚ˆã†ãªãƒ•ã‚£ãƒ«ã‚¿ãƒ¼æ¡ä»¶ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +å‚考文献: +- [スター スキーマ ベンãƒãƒžãƒ¼ã‚¯](https://cs.umb.edu/~poneil/StarSchemaB.pdf) (O'Neil et. al), 2009 +- [クエリ パフォーマンスã«ãŠã‘るデータ スキューã®å½±éŸ¿ã‚’テストã™ã‚‹ãŸã‚ã®ã‚¹ã‚¿ãƒ¼ スキーマ ベンãƒãƒžãƒ¼ã‚¯ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³](https://doi.org/10.1145/2479871.2479927) (Rabl. et. al.), 2013 + +ã¾ãšã€ã‚¹ã‚¿ãƒ¼ スキーマ ベンãƒãƒžãƒ¼ã‚¯ リãƒã‚¸ãƒˆãƒªã‚’ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã—ã€ãƒ‡ãƒ¼ã‚¿ ジェãƒãƒ¬ãƒ¼ã‚¿ãƒ¼ã‚’コンパイルã—ã¾ã™: + +``` bash +git clone https://github.com/vadimtk/ssb-dbgen.git +cd ssb-dbgen +make +``` + +次ã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’生æˆã—ã¾ã™ã€‚パラメーター `-s` ã¯ã‚¹ã‚±ãƒ¼ãƒ«ãƒ•ã‚¡ã‚¯ã‚¿ãƒ¼ã‚’指定ã—ã¾ã™ã€‚ãŸã¨ãˆã° `-s 100` ã§ã¯ã€6å„„è¡ŒãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +``` bash +./dbgen -s 1000 -T c +./dbgen -s 1000 -T l +./dbgen -s 1000 -T p +./dbgen -s 1000 -T s +./dbgen -s 1000 -T d +``` + +次ã«ã€ClickHouseã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™: + +``` sql +CREATE TABLE customer +( + C_CUSTKEY UInt32, + C_NAME String, + C_ADDRESS String, + C_CITY LowCardinality(String), + C_NATION LowCardinality(String), + C_REGION LowCardinality(String), + C_PHONE String, + C_MKTSEGMENT LowCardinality(String) +) +ENGINE = MergeTree ORDER BY (C_CUSTKEY); + +CREATE TABLE lineorder +( + LO_ORDERKEY UInt32, + LO_LINENUMBER UInt8, + LO_CUSTKEY UInt32, + LO_PARTKEY UInt32, + LO_SUPPKEY UInt32, + LO_ORDERDATE Date, + LO_ORDERPRIORITY LowCardinality(String), + LO_SHIPPRIORITY UInt8, + LO_QUANTITY UInt8, + LO_EXTENDEDPRICE UInt32, + LO_ORDTOTALPRICE UInt32, + LO_DISCOUNT UInt8, + LO_REVENUE UInt32, + LO_SUPPLYCOST UInt32, + LO_TAX UInt8, + LO_COMMITDATE Date, + LO_SHIPMODE LowCardinality(String) +) +ENGINE = MergeTree PARTITION BY toYear(LO_ORDERDATE) ORDER BY (LO_ORDERDATE, LO_ORDERKEY); + +CREATE TABLE part +( + P_PARTKEY UInt32, + P_NAME String, + P_MFGR LowCardinality(String), + P_CATEGORY LowCardinality(String), + P_BRAND LowCardinality(String), + P_COLOR LowCardinality(String), + P_TYPE LowCardinality(String), + P_SIZE UInt8, + P_CONTAINER LowCardinality(String) +) +ENGINE = MergeTree ORDER BY P_PARTKEY; + +CREATE TABLE supplier +( + S_SUPPKEY UInt32, + S_NAME String, + S_ADDRESS String, + S_CITY LowCardinality(String), + S_NATION LowCardinality(String), + S_REGION LowCardinality(String), + S_PHONE String +) +ENGINE = MergeTree ORDER BY S_SUPPKEY; + +CREATE TABLE date +( + D_DATEKEY Date, + D_DATE FixedString(18), + D_DAYOFWEEK LowCardinality(String), + D_MONTH LowCardinality(String), + D_YEAR UInt16, + D_YEARMONTHNUM UInt32, + D_YEARMONTH LowCardinality(FixedString(7)), + D_DAYNUMINWEEK UInt8, + D_DAYNUMINMONTH UInt8, + D_DAYNUMINYEAR UInt16, + D_MONTHNUMINYEAR UInt8, + D_WEEKNUMINYEAR UInt8, + D_SELLINGSEASON String, + D_LASTDAYINWEEKFL UInt8, + D_LASTDAYINMONTHFL UInt8, + D_HOLIDAYFL UInt8, + D_WEEKDAYFL UInt8 +) +ENGINE = MergeTree ORDER BY D_DATEKEY; +``` + +データã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã•ã‚Œã¾ã™: + +``` bash +clickhouse-client --query "INSERT INTO customer FORMAT CSV" < customer.tbl +clickhouse-client --query "INSERT INTO part FORMAT CSV" < part.tbl +clickhouse-client --query "INSERT INTO supplier FORMAT CSV" < supplier.tbl +clickhouse-client --query "INSERT INTO lineorder FORMAT CSV" < lineorder.tbl +clickhouse-client --query "INSERT INTO date FORMAT CSV" < date.tbl +``` + +ClickHouseã®å¤šãã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§ã¯ã€è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルãŒå˜ä¸€ã®éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ•ãƒ©ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ +ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ã‚ªãƒ—ションã§ã™ãŒã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã¯å…ƒã®å½¢ã¨éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル用ã«æ›¸ãç›´ã•ã‚ŒãŸå½¢å¼ã§ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ + +``` sql +SET max_memory_usage = 20000000000; + +CREATE TABLE lineorder_flat +ENGINE = MergeTree ORDER BY (LO_ORDERDATE, LO_ORDERKEY) +AS SELECT + l.LO_ORDERKEY AS LO_ORDERKEY, + l.LO_LINENUMBER AS LO_LINENUMBER, + l.LO_CUSTKEY AS LO_CUSTKEY, + l.LO_PARTKEY AS LO_PARTKEY, + l.LO_SUPPKEY AS LO_SUPPKEY, + l.LO_ORDERDATE AS LO_ORDERDATE, + l.LO_ORDERPRIORITY AS LO_ORDERPRIORITY, + l.LO_SHIPPRIORITY AS LO_SHIPPRIORITY, + l.LO_QUANTITY AS LO_QUANTITY, + l.LO_EXTENDEDPRICE AS LO_EXTENDEDPRICE, + l.LO_ORDTOTALPRICE AS LO_ORDTOTALPRICE, + l.LO_DISCOUNT AS LO_DISCOUNT, + l.LO_REVENUE AS LO_REVENUE, + l.LO_SUPPLYCOST AS LO_SUPPLYCOST, + l.LO_TAX AS LO_TAX, + l.LO_COMMITDATE AS LO_COMMITDATE, + l.LO_SHIPMODE AS LO_SHIPMODE, + c.C_NAME AS C_NAME, + c.C_ADDRESS AS C_ADDRESS, + c.C_CITY AS C_CITY, + c.C_NATION AS C_NATION, + c.C_REGION AS C_REGION, + c.C_PHONE AS C_PHONE, + c.C_MKTSEGMENT AS C_MKTSEGMENT, + s.S_NAME AS S_NAME, + s.S_ADDRESS AS S_ADDRESS, + s.S_CITY AS S_CITY, + s.S_NATION AS S_NATION, + s.S_REGION AS S_REGION, + s.S_PHONE AS S_PHONE, + p.P_NAME AS P_NAME, + p.P_MFGR AS P_MFGR, + p.P_CATEGORY AS P_CATEGORY, + p.P_BRAND AS P_BRAND, + p.P_COLOR AS P_COLOR, + p.P_TYPE AS P_TYPE, + p.P_SIZE AS P_SIZE, + p.P_CONTAINER AS P_CONTAINER +FROM lineorder AS l +INNER JOIN customer AS c ON c.C_CUSTKEY = l.LO_CUSTKEY +INNER JOIN supplier AS s ON s.S_SUPPKEY = l.LO_SUPPKEY +INNER JOIN part AS p ON p.P_PARTKEY = l.LO_PARTKEY; +``` + +クエリ㯠`./qgen -s ` ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã¾ã™ã€‚`s = 100` ã®å ´åˆã®ã‚µãƒ³ãƒ—ルクエリ: + +Q1.1 + +```sql +SELECT + sum(LO_EXTENDEDPRICE * LO_DISCOUNT) AS REVENUE +FROM + lineorder, + date +WHERE + LO_ORDERDATE = D_DATEKEY + AND D_YEAR = 1993 + AND LO_DISCOUNT BETWEEN 1 AND 3 + AND LO_QUANTITY < 25; +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +``` sql +SELECT + sum(LO_EXTENDEDPRICE * LO_DISCOUNT) AS revenue +FROM + lineorder_flat +WHERE + toYear(LO_ORDERDATE) = 1993 + AND LO_DISCOUNT BETWEEN 1 AND 3 + AND LO_QUANTITY < 25; +``` + +Q1.2 + +```sql +SELECT + sum(LO_EXTENDEDPRICE * LO_DISCOUNT) AS REVENUE +FROM + lineorder, + date +WHERE + LO_ORDERDATE = D_DATEKEY + AND D_YEARMONTHNUM = 199401 + AND LO_DISCOUNT BETWEEN 4 AND 6 + AND LO_QUANTITY BETWEEN 26 AND 35; +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + sum(LO_EXTENDEDPRICE * LO_DISCOUNT) AS revenue +FROM + lineorder_flat +WHERE + toYYYYMM(LO_ORDERDATE) = 199401 + AND LO_DISCOUNT BETWEEN 4 AND 6 + AND LO_QUANTITY BETWEEN 26 AND 35; +``` + +Q1.3 + +```sql +SELECT + sum(LO_EXTENDEDPRICE*LO_DISCOUNT) AS REVENUE +FROM + lineorder, + date +WHERE + LO_ORDERDATE = D_DATEKEY + AND D_WEEKNUMINYEAR = 6 + AND D_YEAR = 1994 + AND LO_DISCOUNT BETWEEN 5 AND 7 + AND LO_QUANTITY BETWEEN 26 AND 35; +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + sum(LO_EXTENDEDPRICE * LO_DISCOUNT) AS revenue +FROM + lineorder_flat +WHERE + toISOWeek(LO_ORDERDATE) = 6 + AND toYear(LO_ORDERDATE) = 1994 + AND LO_DISCOUNT BETWEEN 5 AND 7 + AND LO_QUANTITY BETWEEN 26 AND 35; +``` + +Q2.1 + +```sql +SELECT + sum(LO_REVENUE), + D_YEAR, + P_BRAND +FROM + lineorder, + date, + part, + supplier +WHERE + LO_ORDERDATE = D_DATEKEY + AND LO_PARTKEY = P_PARTKEY + AND LO_SUPPKEY = S_SUPPKEY + AND P_CATEGORY = 'MFGR#12' + AND S_REGION = 'AMERICA' +GROUP BY + D_YEAR, + P_BRAND +ORDER BY + D_YEAR, + P_BRAND; +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + sum(LO_REVENUE), + toYear(LO_ORDERDATE) AS year, + P_BRAND +FROM lineorder_flat +WHERE + P_CATEGORY = 'MFGR#12' + AND S_REGION = 'AMERICA' +GROUP BY + year, + P_BRAND +ORDER BY + year, + P_BRAND; +``` + +Q2.2 + +```sql +SELECT + sum(LO_REVENUE), + D_YEAR, + P_BRAND +FROM + lineorder, + date, + part, + supplier +WHERE + LO_ORDERDATE = D_DATEKEY + AND LO_PARTKEY = P_PARTKEY + AND LO_SUPPKEY = S_SUPPKEY + AND P_BRAND BETWEEN + 'MFGR#2221' AND 'MFGR#2228' + AND S_REGION = 'ASIA' +GROUP BY + D_YEAR, + P_BRAND +ORDER BY + D_YEAR, + P_BRAND; +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + sum(LO_REVENUE), + toYear(LO_ORDERDATE) AS year, + P_BRAND +FROM lineorder_flat +WHERE P_BRAND >= 'MFGR#2221' AND P_BRAND <= 'MFGR#2228' AND S_REGION = 'ASIA' +GROUP BY + year, + P_BRAND +ORDER BY + year, + P_BRAND; +``` + +Q2.3 + +```sql +SELECT + sum(LO_REVENUE), + D_YEAR, + P_BRAND +FROM + lineorder, + date, + part, + supplier +WHERE + LO_ORDERDATE = D_DATEKEY + AND LO_PARTKEY = P_PARTKEY + AND LO_SUPPKEY = S_SUPPKEY + AND P_BRAND = 'MFGR#2221' + AND S_REGION = 'EUROPE' +GROUP BY + D_YEAR, + P_BRAND +ORDER BY + D_YEAR, + P_BRAND; +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + sum(LO_REVENUE), + toYear(LO_ORDERDATE) AS year, + P_BRAND +FROM lineorder_flat +WHERE P_BRAND = 'MFGR#2239' AND S_REGION = 'EUROPE' +GROUP BY + year, + P_BRAND +ORDER BY + year, + P_BRAND; +``` + +Q3.1 + +```sql +SELECT + C_NATION, + S_NATION, + D_YEAR, + sum(LO_REVENUE) AS REVENUE +FROM + customer, + lineorder, + supplier, + date +WHERE + LO_CUSTKEY = C_CUSTKEY + AND LO_SUPPKEY = S_SUPPKEY + AND LO_ORDERDATE = D_DATEKEY + AND C_REGION = 'ASIA' AND S_REGION = 'ASIA' + AND D_YEAR >= 1992 AND D_YEAR <= 1997 +GROUP BY + C_NATION, + S_NATION, + D_YEAR +ORDER BY + D_YEAR ASC, + REVENUE DESC; +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + C_NATION, + S_NATION, + toYear(LO_ORDERDATE) AS year, + sum(LO_REVENUE) AS revenue +FROM lineorder_flat +WHERE + C_REGION = 'ASIA' + AND S_REGION = 'ASIA' + AND year >= 1992 + AND year <= 1997 +GROUP BY + C_NATION, + S_NATION, + year +ORDER BY + year ASC, + revenue DESC; +``` + +Q3.2 + +```sql +SELECT + C_CITY, + S_CITY, + D_YEAR, + sum(LO_REVENUE) AS REVENUE +FROM + customer, + lineorder, + supplier, + date +WHERE + LO_CUSTKEY = C_CUSTKEY + AND LO_SUPPKEY = S_SUPPKEY + AND LO_ORDERDATE = D_DATEKEY + AND C_NATION = 'UNITED STATES' + AND S_NATION = 'UNITED STATES' + AND D_YEAR >= 1992 AND D_YEAR <= 1997 +GROUP BY + C_CITY, + S_CITY, + D_YEAR +ORDER BY + D_YEAR ASC, + REVENUE DESC; +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + C_CITY, + S_CITY, + toYear(LO_ORDERDATE) AS year, + sum(LO_REVENUE) AS revenue +FROM lineorder_flat +WHERE + C_NATION = 'UNITED STATES' + AND S_NATION = 'UNITED STATES' + AND year >= 1992 + AND year <= 1997 +GROUP BY + C_CITY, + S_CITY, + year +ORDER BY + year ASC, + revenue DESC; +``` + +Q3.3 + +```sql +SELECT + C_CITY, + S_CITY, + D_YEAR, + sum(LO_REVENUE) AS revenue +FROM + customer, + lineorder, + supplier, + date +WHERE + LO_CUSTKEY = C_CUSTKEY + AND LO_SUPPKEY = S_SUPPKEY + AND LO_ORDERDATE = D_DATEKEY + AND (C_CITY = 'UNITED KI1' OR C_CITY = 'UNITED KI5') + AND (S_CITY = 'UNITED KI1' OR S_CITY = 'UNITED KI5') + AND D_YEAR >= 1992 + AND D_YEAR <= 1997 +GROUP BY + C_CITY, + S_CITY, + D_YEAR +ORDER BY + D_YEAR ASC, + revenue DESC; +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + C_CITY, + S_CITY, + toYear(LO_ORDERDATE) AS year, + sum(LO_REVENUE) AS revenue +FROM lineorder_flat +WHERE + (C_CITY = 'UNITED KI1' OR C_CITY = 'UNITED KI5') + AND (S_CITY = 'UNITED KI1' OR S_CITY = 'UNITED KI5') + AND year >= 1992 + AND year <= 1997 +GROUP BY + C_CITY, + S_CITY, + year +ORDER BY + year ASC, + revenue DESC; +``` + +Q3.4 + +```sql +SELECT + C_CITY, + S_CITY, + D_YEAR, + sum(LO_REVENUE) AS revenue +FROM + customer, + lineorder, + supplier, + date +WHERE + LO_CUSTKEY = C_CUSTKEY + AND LO_SUPPKEY = S_SUPPKEY + AND LO_ORDERDATE = D_DATEKEY + AND (C_CITY='UNITED KI1' OR C_CITY='UNITED KI5') + AND (S_CITY='UNITED KI1' OR S_CITY='UNITED KI5') + AND D_YEARMONTH = 'Dec1997' +GROUP BY + C_CITY, + S_CITY, + D_YEAR +ORDER BY + D_YEAR ASC, + revenue DESC; +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + C_CITY, + S_CITY, + toYear(LO_ORDERDATE) AS year, + sum(LO_REVENUE) AS revenue +FROM lineorder_flat +WHERE + (C_CITY = 'UNITED KI1' OR C_CITY = 'UNITED KI5') + AND (S_CITY = 'UNITED KI1' OR S_CITY = 'UNITED KI5') + AND toYYYYMM(LO_ORDERDATE) = 199712 +GROUP BY + C_CITY, + S_CITY, + year +ORDER BY + year ASC, + revenue DESC; +``` + +Q4.1 + +```sql +SELECT + D_YEAR, + C_NATION, + sum(LO_REVENUE - LO_SUPPLYCOST) AS PROFIT +FROM + date, + customer, + supplier, + part, + lineorder +WHERE + LO_CUSTKEY = C_CUSTKEY + AND LO_SUPPKEY = S_SUPPKEY + AND LO_PARTKEY = P_PARTKEY + AND LO_ORDERDATE = D_DATEKEY + AND C_REGION = 'AMERICA' + AND S_REGION = 'AMERICA' + AND (P_MFGR = 'MFGR#1' OR P_MFGR = 'MFGR#2') +GROUP BY + D_YEAR, + C_NATION +ORDER BY + D_YEAR, + C_NATION +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + toYear(LO_ORDERDATE) AS year, + C_NATION, + sum(LO_REVENUE - LO_SUPPLYCOST) AS profit +FROM lineorder_flat +WHERE C_REGION = 'AMERICA' AND S_REGION = 'AMERICA' AND (P_MFGR = 'MFGR#1' OR P_MFGR = 'MFGR#2') +GROUP BY + year, + C_NATION +ORDER BY + year ASC, + C_NATION ASC; +``` + +Q4.2 + +```sql +SELECT + D_YEAR, + S_NATION, + P_CATEGORY, + sum(LO_REVENUE - LO_SUPPLYCOST) AS profit +FROM + date, + customer, + supplier, + part, + lineorder +WHERE + LO_CUSTKEY = C_CUSTKEY + AND LO_SUPPKEY = S_SUPPKEY + AND LO_PARTKEY = P_PARTKEY + AND LO_ORDERDATE = D_DATEKEY + AND C_REGION = 'AMERICA' + AND S_REGION = 'AMERICA' + AND (D_YEAR = 1997 OR D_YEAR = 1998) + AND (P_MFGR = 'MFGR#1' OR P_MFGR = 'MFGR#2') +GROUP BY + D_YEAR, + S_NATION, + P_CATEGORY +ORDER BY + D_YEAR, + S_NATION, + P_CATEGORY +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + toYear(LO_ORDERDATE) AS year, + S_NATION, + P_CATEGORY, + sum(LO_REVENUE - LO_SUPPLYCOST) AS profit +FROM lineorder_flat +WHERE + C_REGION = 'AMERICA' + AND S_REGION = 'AMERICA' + AND (year = 1997 OR year = 1998) + AND (P_MFGR = 'MFGR#1' OR P_MFGR = 'MFGR#2') +GROUP BY + year, + S_NATION, + P_CATEGORY +ORDER BY + year ASC, + S_NATION ASC, + P_CATEGORY ASC; +``` + +Q4.3 + +```sql +SELECT + D_YEAR, + S_CITY, + P_BRAND, + sum(LO_REVENUE - LO_SUPPLYCOST) AS profit +FROM + date, + customer, + supplier, + part, + lineorder +WHERE + LO_CUSTKEY = C_CUSTKEY + AND LO_SUPPKEY = S_SUPPKEY + AND LO_PARTKEY = P_PARTKEY + AND LO_ORDERDATE = D_DATEKEY + AND C_REGION = 'AMERICA' + AND S_NATION = 'UNITED STATES' + AND (D_YEAR = 1997 OR D_YEAR = 1998) + AND P_CATEGORY = 'MFGR#14' +GROUP BY + D_YEAR, + S_CITY, + P_BRAND +ORDER BY + D_YEAR, + S_CITY, + P_BRAND +``` + +éžæ­£è¦åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル: + +```sql +SELECT + toYear(LO_ORDERDATE) AS year, + S_CITY, + P_BRAND, + sum(LO_REVENUE - LO_SUPPLYCOST) AS profit +FROM + lineorder_flat +WHERE + S_NATION = 'UNITED STATES' + AND (year = 1997 OR year = 1998) + AND P_CATEGORY = 'MFGR#14' +GROUP BY + year, + S_CITY, + P_BRAND +ORDER BY + year ASC, + S_CITY ASC, + P_BRAND ASC; +``` + + diff --git a/docs/ja/getting-started/example-datasets/tpcds.md b/docs/ja/getting-started/example-datasets/tpcds.md new file mode 100644 index 00000000000..f47b9f24df1 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/tpcds.md @@ -0,0 +1,596 @@ +--- +slug: /ja/getting-started/example-datasets/tpcds +sidebar_label: TPC-DS +description: "TPC-DSベンãƒãƒžãƒ¼ã‚¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¨ã‚¯ã‚¨ãƒªã€‚" +--- + +# TPC-DS (2012) + +[Star Schema Benchmark (SSB)](star-schema.md) ã¨åŒæ§˜ã«ã€TPC-DS㯠[TPC-H](tpch.md) ã«åŸºã¥ã„ã¦ã„ã¾ã™ãŒã€é€†ã®ã‚¢ãƒ—ローãƒã‚’å–ã‚Šã¾ã—ãŸã€‚ã™ãªã‚ã¡ã€ãƒ‡ãƒ¼ã‚¿ã‚’複雑ãªã‚¹ãƒŽãƒ¼ãƒ•ãƒ¬ãƒ¼ã‚¯ã‚¹ã‚­ãƒ¼ãƒžã«ä¿å­˜ã™ã‚‹ã“ã¨ã§å¿…è¦ãªçµåˆæ•°ã‚’増やã—ã¾ã—ãŸï¼ˆ24テーブル対ã—ã¦8テーブル)。 +データ分布ã¯åã£ã¦ãŠã‚Šï¼ˆä¾‹ãˆã°ã€æ­£è¦åˆ†å¸ƒã‚„ãƒã‚¢ã‚½ãƒ³åˆ†å¸ƒï¼‰ã§ã™ã€‚ +99ã®ãƒ¬ãƒãƒ¼ãƒˆãŠã‚ˆã³ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ã‚¯ã‚¨ãƒªãŒãƒ©ãƒ³ãƒ€ãƒ ã«ç½®æ›ã•ã‚Œã¾ã™ã€‚ + +å‚考文献 +- [The Making of TPC-DS](https://dl.acm.org/doi/10.5555/1182635.1164217) (Nambiar), 2006 + +ã¾ãšã€TPC-DSリãƒã‚¸ãƒˆãƒªã‚’ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã—データジェãƒãƒ¬ãƒ¼ã‚¿ã‚’コンパイルã—ã¾ã™ã€‚ + +``` bash +git clone https://github.com/gregrahn/tpcds-kit.git +cd tpcds-kit/tools +make +``` + +次ã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’生æˆã—ã¾ã™ã€‚パラメータ `-scale` ã¯ã‚¹ã‚±ãƒ¼ãƒ«ãƒ•ã‚¡ã‚¯ã‚¿ãƒ¼ã‚’指定ã—ã¾ã™ã€‚ + +``` bash +./dsdgen -scale 1 +``` + +次ã«ã€ã‚¯ã‚¨ãƒªã‚’生æˆã—ã¾ã™ï¼ˆåŒã˜ã‚¹ã‚±ãƒ¼ãƒ«ãƒ•ã‚¡ã‚¯ã‚¿ãƒ¼ã‚’使用ã—ã¦ãã ã•ã„)。 + +```bash +./dsqgen -DIRECTORY ../query_templates/ -INPUT ../query_templates/templates.lst -SCALE 1 # generates 99 queries in out/query_0.sql +``` + +次ã«ClickHouseã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ +å…ƒã®ãƒ†ãƒ¼ãƒ–ル定義を tools/tpcds.sql ã§ä½¿ç”¨ã™ã‚‹ã‹ã€ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨LowCardinalityåž‹ã®ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã‚’é©åˆ‡ã«å®šç¾©ã—ãŸã€Œãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚°æ¸ˆã¿ã€ãƒ†ãƒ¼ãƒ–ル定義を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE call_center( + cc_call_center_sk Int64, + cc_call_center_id LowCardinality(String), + cc_rec_start_date Nullable(Date), + cc_rec_end_date Nullable(Date), + cc_closed_date_sk Nullable(UInt32), + cc_open_date_sk Nullable(UInt32), + cc_name LowCardinality(String), + cc_class LowCardinality(String), + cc_employees Int32, + cc_sq_ft Int32, + cc_hours LowCardinality(String), + cc_manager LowCardinality(String), + cc_mkt_id Int32, + cc_mkt_class LowCardinality(String), + cc_mkt_desc LowCardinality(String), + cc_market_manager LowCardinality(String), + cc_division Int32, + cc_division_name LowCardinality(String), + cc_company Int32, + cc_company_name LowCardinality(String), + cc_street_number LowCardinality(String), + cc_street_name LowCardinality(String), + cc_street_type LowCardinality(String), + cc_suite_number LowCardinality(String), + cc_city LowCardinality(String), + cc_county LowCardinality(String), + cc_state LowCardinality(String), + cc_zip LowCardinality(String), + cc_country LowCardinality(String), + cc_gmt_offset Decimal(7,2), + cc_tax_percentage Decimal(7,2), + PRIMARY KEY (cc_call_center_sk) +); + +CREATE TABLE catalog_page( + cp_catalog_page_sk Int64, + cp_catalog_page_id LowCardinality(String), + cp_start_date_sk Nullable(UInt32), + cp_end_date_sk Nullable(UInt32), + cp_department LowCardinality(Nullable(String)), + cp_catalog_number Nullable(Int32), + cp_catalog_page_number Nullable(Int32), + cp_description LowCardinality(Nullable(String)), + cp_type LowCardinality(Nullable(String)), + PRIMARY KEY (cp_catalog_page_sk) +); + +CREATE TABLE catalog_returns( + cr_returned_date_sk Int32, + cr_returned_time_sk Int64, + cr_item_sk Int64, + cr_refunded_customer_sk Nullable(Int64), + cr_refunded_cdemo_sk Nullable(Int64), + cr_refunded_hdemo_sk Nullable(Int64), + cr_refunded_addr_sk Nullable(Int64), + cr_returning_customer_sk Nullable(Int64), + cr_returning_cdemo_sk Nullable(Int64), + cr_returning_hdemo_sk Nullable(Int64), + cr_returning_addr_sk Nullable(Int64), + cr_call_center_sk Nullable(Int64), + cr_catalog_page_sk Nullable(Int64), + cr_ship_mode_sk Nullable(Int64), + cr_warehouse_sk Nullable(Int64), + cr_reason_sk Nullable(Int64), + cr_order_number Int64, + cr_return_quantity Nullable(Int32), + cr_return_amount Nullable(Decimal(7,2)), + cr_return_tax Nullable(Decimal(7,2)), + cr_return_amt_inc_tax Nullable(Decimal(7,2)), + cr_fee Nullable(Decimal(7,2)), + cr_return_ship_cost Nullable(Decimal(7,2)), + cr_refunded_cash Nullable(Decimal(7,2)), + cr_reversed_charge Nullable(Decimal(7,2)), + cr_store_credit Nullable(Decimal(7,2)), + cr_net_loss Nullable(Decimal(7,2)), + PRIMARY KEY (cr_item_sk, cr_order_number) +); + +CREATE TABLE catalog_sales ( + cs_sold_date_sk Nullable(UInt32), + cs_sold_time_sk Nullable(Int64), + cs_ship_date_sk Nullable(UInt32), + cs_bill_customer_sk Nullable(Int64), + cs_bill_cdemo_sk Nullable(Int64), + cs_bill_hdemo_sk Nullable(Int64), + cs_bill_addr_sk Nullable(Int64), + cs_ship_customer_sk Nullable(Int64), + cs_ship_cdemo_sk Nullable(Int64), + cs_ship_hdemo_sk Nullable(Int64), + cs_ship_addr_sk Nullable(Int64), + cs_call_center_sk Nullable(Int64), + cs_catalog_page_sk Nullable(Int64), + cs_ship_mode_sk Nullable(Int64), + cs_warehouse_sk Nullable(Int64), + cs_item_sk Int64, + cs_promo_sk Nullable(Int64), + cs_order_number Int64, + cs_quantity Nullable(Int32), + cs_wholesale_cost Nullable(Decimal(7,2)), + cs_list_price Nullable(Decimal(7,2)), + cs_sales_price Nullable(Decimal(7,2)), + cs_ext_discount_amt Nullable(Decimal(7,2)), + cs_ext_sales_price Nullable(Decimal(7,2)), + cs_ext_wholesale_cost Nullable(Decimal(7,2)), + cs_ext_list_price Nullable(Decimal(7,2)), + cs_ext_tax Nullable(Decimal(7,2)), + cs_coupon_amt Nullable(Decimal(7,2)), + cs_ext_ship_cost Nullable(Decimal(7,2)), + cs_net_paid Nullable(Decimal(7,2)), + cs_net_paid_inc_tax Nullable(Decimal(7,2)), + cs_net_paid_inc_ship Nullable(Decimal(7,2)), + cs_net_paid_inc_ship_tax Nullable(Decimal(7,2)), + cs_net_profit Decimal(7,2), + PRIMARY KEY (cs_item_sk, cs_order_number) +); + +CREATE TABLE customer_address ( + ca_address_sk Int64, + ca_address_id LowCardinality(String), + ca_street_number LowCardinality(Nullable(String)), + ca_street_name LowCardinality(Nullable(String)), + ca_street_type LowCardinality(Nullable(String)), + ca_suite_number LowCardinality(Nullable(String)), + ca_city LowCardinality(Nullable(String)), + ca_county LowCardinality(Nullable(String)), + ca_state LowCardinality(Nullable(String)), + ca_zip LowCardinality(Nullable(String)), + ca_country LowCardinality(Nullable(String)), + ca_gmt_offset Nullable(Decimal(7,2)), + ca_location_type LowCardinality(Nullable(String)), + PRIMARY KEY (ca_address_sk) +); + +CREATE TABLE customer_demographics ( + cd_demo_sk Int64, + cd_gender LowCardinality(String), + cd_marital_status LowCardinality(String), + cd_education_status LowCardinality(String), + cd_purchase_estimate Int32, + cd_credit_rating LowCardinality(String), + cd_dep_count Int32, + cd_dep_employed_count Int32, + cd_dep_college_count Int32, + PRIMARY KEY (cd_demo_sk) +); + +CREATE TABLE customer ( + c_customer_sk Int64, + c_customer_id LowCardinality(String), + c_current_cdemo_sk Nullable(Int64), + c_current_hdemo_sk Nullable(Int64), + c_current_addr_sk Nullable(Int64), + c_first_shipto_date_sk Nullable(UInt32), + c_first_sales_date_sk Nullable(UInt32), + c_salutation LowCardinality(Nullable(String)), + c_first_name LowCardinality(Nullable(String)), + c_last_name LowCardinality(Nullable(String)), + c_preferred_cust_flag LowCardinality(Nullable(String)), + c_birth_day Nullable(Int32), + c_birth_month Nullable(Int32), + c_birth_year Nullable(Int32), + c_birth_country LowCardinality(Nullable(String)), + c_login LowCardinality(Nullable(String)), + c_email_address LowCardinality(Nullable(String)), + c_last_review_date LowCardinality(Nullable(String)), + PRIMARY KEY (c_customer_sk) +); + +CREATE TABLE date_dim ( + d_date_sk UInt32, + d_date_id LowCardinality(String), + d_date Date, + d_month_seq UInt16, + d_week_seq UInt16, + d_quarter_seq UInt16, + d_year UInt16, + d_dow UInt16, + d_moy UInt16, + d_dom UInt16, + d_qoy UInt16, + d_fy_year UInt16, + d_fy_quarter_seq UInt16, + d_fy_week_seq UInt16, + d_day_name LowCardinality(String), + d_quarter_name LowCardinality(String), + d_holiday LowCardinality(String), + d_weekend LowCardinality(String), + d_following_holiday LowCardinality(String), + d_first_dom Int32, + d_last_dom Int32, + d_same_day_ly Int32, + d_same_day_lq Int32, + d_current_day LowCardinality(String), + d_current_week LowCardinality(String), + d_current_month LowCardinality(String), + d_current_quarter LowCardinality(String), + d_current_year LowCardinality(String), + PRIMARY KEY (d_date_sk) +); + +CREATE TABLE household_demographics ( + hd_demo_sk Int64, + hd_income_band_sk Int64, + hd_buy_potential LowCardinality(String), + hd_dep_count Int32, + hd_vehicle_count Int32, + PRIMARY KEY (hd_demo_sk) +); + +CREATE TABLE income_band( + ib_income_band_sk Int64, + ib_lower_bound Int32, + ib_upper_bound Int32, + PRIMARY KEY (ib_income_band_sk), +); + +CREATE TABLE inventory ( + inv_date_sk UInt32, + inv_item_sk Int64, + inv_warehouse_sk Int64, + inv_quantity_on_hand Nullable(Int32) + PRIMARY KEY (inv_date_sk, inv_item_sk, inv_warehouse_sk), +); + +CREATE TABLE item ( + i_item_sk Int64, + i_item_id LowCardinality(String), + i_rec_start_date LowCardinality(Nullable(String)), + i_rec_end_date LowCardinality(Nullable(String)), + i_item_desc LowCardinality(Nullable(String)), + i_current_price Nullable(Decimal(7,2)), + i_wholesale_cost Nullable(Decimal(7,2)), + i_brand_id Nullable(Int32), + i_brand LowCardinality(Nullable(String)), + i_class_id Nullable(Int32), + i_class LowCardinality(Nullable(String)), + i_category_id Nullable(Int32), + i_category LowCardinality(Nullable(String)), + i_manufact_id Nullable(Int32), + i_manufact LowCardinality(Nullable(String)), + i_size LowCardinality(Nullable(String)), + i_formulation LowCardinality(Nullable(String)), + i_color LowCardinality(Nullable(String)), + i_units LowCardinality(Nullable(String)), + i_container LowCardinality(Nullable(String)), + i_manager_id Nullable(Int32), + i_product_name LowCardinality(Nullable(String)), + PRIMARY KEY (i_item_sk) +); + +CREATE TABLE promotion ( + p_promo_sk Int64, + p_promo_id LowCardinality(String), + p_start_date_sk Nullable(UInt32), + p_end_date_sk Nullable(UInt32), + p_item_sk Nullable(Int64), + p_cost Nullable(Decimal(15,2)), + p_response_target Nullable(Int32), + p_promo_name LowCardinality(Nullable(String)), + p_channel_dmail LowCardinality(Nullable(String)), + p_channel_email LowCardinality(Nullable(String)), + p_channel_catalog LowCardinality(Nullable(String)), + p_channel_tv LowCardinality(Nullable(String)), + p_channel_radio LowCardinality(Nullable(String)), + p_channel_press LowCardinality(Nullable(String)), + p_channel_event LowCardinality(Nullable(String)), + p_channel_demo LowCardinality(Nullable(String)), + p_channel_details LowCardinality(Nullable(String)), + p_purpose LowCardinality(Nullable(String)), + p_discount_active LowCardinality(Nullable(String)), + PRIMARY KEY (p_promo_sk) +); + +CREATE TABLE reason( + r_reason_sk Int64, + r_reason_id LowCardinality(String), + r_reason_desc LowCardinality(String), + PRIMARY KEY (r_reason_sk) +); + +CREATE TABLE ship_mode( + sm_ship_mode_sk Int64, + sm_ship_mode_id LowCardinality(String), + sm_type LowCardinality(String), + sm_code LowCardinality(String), + sm_carrier LowCardinality(String), + sm_contract LowCardinality(String), + PRIMARY KEY (sm_ship_mode_sk) +); + +CREATE TABLE store_returns ( + sr_returned_date_sk Nullable(UInt32), + sr_return_time_sk Nullable(Int64), + sr_item_sk Int64, + sr_customer_sk Nullable(Int64), + sr_cdemo_sk Nullable(Int64), + sr_hdemo_sk Nullable(Int64), + sr_addr_sk Nullable(Int64), + sr_store_sk Nullable(Int64), + sr_reason_sk Nullable(Int64), + sr_ticket_number Int64, + sr_return_quantity Nullable(Int32), + sr_return_amt Nullable(Decimal(7,2)), + sr_return_tax Nullable(Decimal(7,2)), + sr_return_amt_inc_tax Nullable(Decimal(7,2)), + sr_fee Nullable(Decimal(7,2)), + sr_return_ship_cost Nullable(Decimal(7,2)), + sr_refunded_cash Nullable(Decimal(7,2)), + sr_reversed_charge Nullable(Decimal(7,2)), + sr_store_credit Nullable(Decimal(7,2)), + sr_net_loss Nullable(Decimal(7,2)), + PRIMARY KEY (sr_item_sk, sr_ticket_number) +); + +CREATE TABLE store_sales ( + ss_sold_date_sk Nullable(UInt32), + ss_sold_time_sk Nullable(Int64), + ss_item_sk Int64, + ss_customer_sk Nullable(Int64), + ss_cdemo_sk Nullable(Int64), + ss_hdemo_sk Nullable(Int64), + ss_addr_sk Nullable(Int64), + ss_store_sk Nullable(Int64), + ss_promo_sk Nullable(Int64), + ss_ticket_number Int64, + ss_quantity Nullable(Int32), + ss_wholesale_cost Nullable(Decimal(7,2)), + ss_list_price Nullable(Decimal(7,2)), + ss_sales_price Nullable(Decimal(7,2)), + ss_ext_discount_amt Nullable(Decimal(7,2)), + ss_ext_sales_price Nullable(Decimal(7,2)), + ss_ext_wholesale_cost Nullable(Decimal(7,2)), + ss_ext_list_price Nullable(Decimal(7,2)), + ss_ext_tax Nullable(Decimal(7,2)), + ss_coupon_amt Nullable(Decimal(7,2)), + ss_net_paid Nullable(Decimal(7,2)), + ss_net_paid_inc_tax Nullable(Decimal(7,2)), + ss_net_profit Nullable(Decimal(7,2)), + PRIMARY KEY (ss_item_sk, ss_ticket_number) +); + +CREATE TABLE store ( + s_store_sk Int64, + s_store_id LowCardinality(String), + s_rec_start_date LowCardinality(Nullable(String)), + s_rec_end_date LowCardinality(Nullable(String)), + s_closed_date_sk Nullable(UInt32), + s_store_name LowCardinality(Nullable(String)), + s_number_employees Nullable(Int32), + s_floor_space Nullable(Int32), + s_hours LowCardinality(Nullable(String)), + s_manager LowCardinality(Nullable(String)), + s_market_id Nullable(Int32), + s_geography_class LowCardinality(Nullable(String)), + s_market_desc LowCardinality(Nullable(String)), + s_market_manager LowCardinality(Nullable(String)), + s_division_id Nullable(Int32), + s_division_name LowCardinality(Nullable(String)), + s_company_id Nullable(Int32), + s_company_name LowCardinality(Nullable(String)), + s_street_number LowCardinality(Nullable(String)), + s_street_name LowCardinality(Nullable(String)), + s_street_type LowCardinality(Nullable(String)), + s_suite_number LowCardinality(Nullable(String)), + s_city LowCardinality(Nullable(String)), + s_county LowCardinality(Nullable(String)), + s_state LowCardinality(Nullable(String)), + s_zip LowCardinality(Nullable(String)), + s_country LowCardinality(Nullable(String)), + s_gmt_offset Nullable(Decimal(7,2)), + s_tax_precentage Nullable(Decimal(7,2)), + PRIMARY KEY (s_store_sk) +); + +CREATE TABLE time_dim ( + t_time_sk UInt32, + t_time_id LowCardinality(String), + t_time UInt32, + t_hour UInt8, + t_minute UInt8, + t_second UInt8, + t_am_pm LowCardinality(String), + t_shift LowCardinality(String), + t_sub_shift LowCardinality(String), + t_meal_time LowCardinality(Nullable(String)), + PRIMARY KEY (t_time_sk) +); + +CREATE TABLE warehouse( + w_warehouse_sk Int64, + w_warehouse_id LowCardinality(String), + w_warehouse_name LowCardinality(Nullable(String)), + w_warehouse_sq_ft Nullable(Int32), + w_street_number LowCardinality(Nullable(String)), + w_street_name LowCardinality(Nullable(String)), + w_street_type LowCardinality(Nullable(String)), + w_suite_number LowCardinality(Nullable(String)), + w_city LowCardinality(Nullable(String)), + w_county LowCardinality(Nullable(String)), + w_state LowCardinality(Nullable(String)), + w_zip LowCardinality(Nullable(String)), + w_country LowCardinality(Nullable(String)), + w_gmt_offset Decimal(7,2), + PRIMARY KEY (w_warehouse_sk) +); + +CREATE TABLE web_page( + wp_web_page_sk Int64, + wp_web_page_id LowCardinality(String), + wp_rec_start_date LowCardinality(Nullable(String)), + wp_rec_end_date LowCardinality(Nullable(String)), + wp_creation_date_sk Nullable(UInt32), + wp_access_date_sk Nullable(UInt32), + wp_autogen_flag LowCardinality(Nullable(String)), + wp_customer_sk Nullable(Int64), + wp_url LowCardinality(Nullable(String)), + wp_type LowCardinality(Nullable(String)), + wp_char_count Nullable(Int32), + wp_link_count Nullable(Int32), + wp_image_count Nullable(Int32), + wp_max_ad_count Nullable(Int32), + PRIMARY KEY (wp_web_page_sk) +); + +CREATE TABLE web_returns ( + wr_returned_date_sk Nullable(UInt32), + wr_returned_time_sk Nullable(Int64), + wr_item_sk Int64, + wr_refunded_customer_sk Nullable(Int64), + wr_refunded_cdemo_sk Nullable(Int64), + wr_refunded_hdemo_sk Nullable(Int64), + wr_refunded_addr_sk Nullable(Int64), + wr_returning_customer_sk Nullable(Int64), + wr_returning_cdemo_sk Nullable(Int64), + wr_returning_hdemo_sk Nullable(Int64), + wr_returning_addr_sk Nullable(Int64), + wr_web_page_sk Nullable(Int64), + wr_reason_sk Nullable(Int64), + wr_order_number Int64, + wr_return_quantity Nullable(Int32), + wr_return_amt Nullable(Decimal(7,2)), + wr_return_tax Nullable(Decimal(7,2)), + wr_return_amt_inc_tax Nullable(Decimal(7,2)), + wr_fee Nullable(Decimal(7,2)), + wr_return_ship_cost Nullable(Decimal(7,2)), + wr_refunded_cash Nullable(Decimal(7,2)), + wr_reversed_charge Nullable(Decimal(7,2)), + wr_account_credit Nullable(Decimal(7,2)), + wr_net_loss Nullable(Decimal(7,2)), + PRIMARY KEY (wr_item_sk, wr_order_number) +); + +CREATE TABLE web_sales ( + ws_sold_date_sk Nullable(UInt32), + ws_sold_time_sk Nullable(Int64), + ws_ship_date_sk Nullable(UInt32), + ws_item_sk Int64, + ws_bill_customer_sk Nullable(Int64), + ws_bill_cdemo_sk Nullable(Int64), + ws_bill_hdemo_sk Nullable(Int64), + ws_bill_addr_sk Nullable(Int64), + ws_ship_customer_sk Nullable(Int64), + ws_ship_cdemo_sk Nullable(Int64), + ws_ship_hdemo_sk Nullable(Int64), + ws_ship_addr_sk Nullable(Int64), + ws_web_page_sk Nullable(Int64), + ws_web_site_sk Nullable(Int64), + ws_ship_mode_sk Nullable(Int64), + ws_warehouse_sk Nullable(Int64), + ws_promo_sk Nullable(Int64), + ws_order_number Int64, + ws_quantity Nullable(Int32), + ws_wholesale_cost Nullable(Decimal(7,2)), + ws_list_price Nullable(Decimal(7,2)), + ws_sales_price Nullable(Decimal(7,2)), + ws_ext_discount_amt Nullable(Decimal(7,2)), + ws_ext_sales_price Nullable(Decimal(7,2)), + ws_ext_wholesale_cost Nullable(Decimal(7,2)), + ws_ext_list_price Nullable(Decimal(7,2)), + ws_ext_tax Nullable(Decimal(7,2)), + ws_coupon_amt Nullable(Decimal(7,2)), + ws_ext_ship_cost Nullable(Decimal(7,2)), + ws_net_paid Nullable(Decimal(7,2)), + ws_net_paid_inc_tax Nullable(Decimal(7,2)), + ws_net_paid_inc_ship Decimal(7,2), + ws_net_paid_inc_ship_tax Decimal(7,2), + ws_net_profit Decimal(7,2), + PRIMARY KEY (ws_item_sk, ws_order_number) +); + +CREATE TABLE web_site ( + web_site_sk Int64, + web_site_id LowCardinality(String), + web_rec_start_date LowCardinality(String), + web_rec_end_date LowCardinality(Nullable(String)), + web_name LowCardinality(String), + web_open_date_sk UInt32, + web_close_date_sk Nullable(UInt32), + web_class LowCardinality(String), + web_manager LowCardinality(String), + web_mkt_id Int32, + web_mkt_class LowCardinality(String), + web_mkt_desc LowCardinality(String), + web_market_manager LowCardinality(String), + web_company_id Int32, + web_company_name LowCardinality(String), + web_street_number LowCardinality(String), + web_street_name LowCardinality(String), + web_street_type LowCardinality(String), + web_suite_number LowCardinality(String), + web_city LowCardinality(String), + web_county LowCardinality(String), + web_state LowCardinality(String), + web_zip LowCardinality(String), + web_country LowCardinality(String), + web_gmt_offset Decimal(7,2), + web_tax_percentage Decimal(7,2), + PRIMARY KEY (web_site_sk) +); +``` + +データã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆã¯ä»¥ä¸‹ã®ã‚ˆã†ã«è¡Œã‚ã‚Œã¾ã™ã€‚ + +``` bash +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO call_center FORMAT CSV" < call_center.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO catalog_page FORMAT CSV" < catalog_page.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO catalog_returns FORMAT CSV" < catalog_returns.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO catalog_sales FORMAT CSV" < catalog_sales.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO customer FORMAT CSV" < customer.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO customer_address FORMAT CSV" < customer_address.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO customer_demographics FORMAT CSV" < customer_demographics.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO date_dim FORMAT CSV" < date_dim.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO household_demographics FORMAT CSV" < household_demographics.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO income_band FORMAT CSV" < income_band.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO inventory FORMAT CSV" < inventory.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO item FORMAT CSV" < item.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO promotion FORMAT CSV" < promotion.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO reason FORMAT CSV" < reason.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO ship_mode FORMAT CSV" < ship_mode.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO store FORMAT CSV" < store.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO store_returns FORMAT CSV" < store_returns.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO store_sales FORMAT CSV" < store_sales.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO time_dim FORMAT CSV" < time_dim.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO warehouse FORMAT CSV" < warehouse.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO web_page FORMAT CSV" < web_page.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO web_returns FORMAT CSV" < web_returns.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO web_sales FORMAT CSV" < web_sales.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO web_site FORMAT CSV" < web_site.tbl +``` + +ãã®å¾Œã€ç”Ÿæˆã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ + +::::warning +TPC-DSã¯é–¢é€£ã‚µãƒ–クエリを多用ã—ã¦ã„ã¾ã™ãŒã€ã“ã‚Œã¯åŸ·ç­†æ™‚点(2024å¹´9月)ã§ã¯ClickHouseã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã¾ã›ã‚“([issue #6697](https://github.com/ClickHouse/ClickHouse/issues/6697))。 +ãã®çµæžœã€å¤šãã®ãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ã‚¯ã‚¨ãƒªãŒã‚¨ãƒ©ãƒ¼ã§å¤±æ•—ã—ã¾ã™ã€‚ +:::: diff --git a/docs/ja/getting-started/example-datasets/tpch.md b/docs/ja/getting-started/example-datasets/tpch.md new file mode 100644 index 00000000000..67523dadab7 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/tpch.md @@ -0,0 +1,1126 @@ +--- +slug: /ja/getting-started/example-datasets/tpch +sidebar_label: TPC-H +description: "TPC-H ベンãƒãƒžãƒ¼ã‚¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¨ã‚¯ã‚¨ãƒªã€‚" +--- + +# TPC-H (1999) + +å¸å£²æ¥­è€…ã®å†…部データウェアãƒã‚¦ã‚¹ã‚’モデル化ã—ãŸäººæ°—ã®ãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ã§ã™ã€‚ +データã¯ç¬¬3æ­£è¦å½¢ã§ä¿å­˜ã•ã‚Œã¦ãŠã‚Šã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œæ™‚ã«å¤šãã®çµåˆã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ +ãã®å¤ã•ã‚„ã€ãƒ‡ãƒ¼ã‚¿ãŒå‡ä¸€ã‹ã¤ç‹¬ç«‹ã—ã¦åˆ†å¸ƒã—ã¦ã„ã‚‹ã¨ã„ã†éžç¾å®Ÿçš„ãªä»®å®šã«ã‚‚ã‹ã‹ã‚らãšã€TPC-H ã¯ç¾åœ¨ã‚‚最も人気ã®ã‚ã‚‹ OLAP ベンãƒãƒžãƒ¼ã‚¯ã§ã™ã€‚ + +**å‚考文献** + +- [TPC-H](https://www.tpc.org/tpc_documents_current_versions/current_specifications5.asp) +- [New TPC Benchmarks for Decision Support and Web Commerce](https://doi.org/10.1145/369275.369291) (Poess et. al., 2000) +- [TPC-H Analyzed: Hidden Messages and Lessons Learned from an Influential Benchmark](https://doi.org/10.1007/978-3-319-04936-6_5) (Boncz et. al.), 2013 +- [Quantifying TPC-H Choke Points and Their Optimizations](https://doi.org/10.14778/3389133.3389138) (Dresseler et. al.), 2020 + +## データ生æˆã¨ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +ã¾ãšã€TPC-H リãƒã‚¸ãƒˆãƒªã‚’ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚¸ã‚§ãƒãƒ¬ãƒ¼ã‚¿ã‚’コンパイルã—ã¾ã™ã€‚ + +```bash +git clone https://github.com/gregrahn/tpch-kit.git +cd tpch-kit/dbgen +make +``` + +次ã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’生æˆã—ã¾ã™ã€‚パラメータ `-s` ã¯ã‚¹ã‚±ãƒ¼ãƒ«ãƒ•ã‚¡ã‚¯ã‚¿ã‚’指定ã—ã¾ã™ã€‚例ãˆã°ã€`-s 100` を指定ã™ã‚‹ã¨ã€ãƒ†ãƒ¼ãƒ–ル 'lineitem' ã«å¯¾ã—㦠6 å„„è¡ŒãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +```bash +./dbgen -s 100 +``` + +次ã«ã€ClickHouse ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ + +TPC-H 仕様ã®ãƒ«ãƒ¼ãƒ«ã«ã§ãã‚‹ã ã‘忠実ã«å¾“ã„ã¾ã™: +- 主キーã¯ã€ä»•æ§˜ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ 1.4.2.2 ã§è¨€åŠã•ã‚Œã¦ã„るカラムã®ã¿ã«ä½œæˆã•ã‚Œã¾ã™ã€‚ +- 代用パラメータã¯ã€ä»•æ§˜ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ 2.1.x.4 ã«ãŠã‘るクエリ検証用ã®å€¤ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã—ãŸã€‚ +- セクション 1.4.2.1 ã«å¾“ã„ã€`dbgen` ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç”Ÿæˆã™ã‚‹å ´åˆã§ã‚ã£ã¦ã‚‚ã€è¡¨å®šç¾©ã§ã¯ã‚ªãƒ—ション㮠`NOT NULL` 制約を使用ã—ã¾ã›ã‚“。 + ClickHouse ã«ãŠã‘ã‚‹ `SELECT` クエリã®ãƒ‘フォーマンスã¯ã€`NOT NULL` 制約ã®æœ‰ç„¡ã«å½±éŸ¿ã•ã‚Œã¾ã›ã‚“。 +- セクション 1.3.1 ã«å¾“ã„ã€ä»•æ§˜ã«è¨˜è¼‰ã•ã‚Œã¦ã„る抽象データ型(例:`Identifier`ã€`Variable text, size N`)を実装ã™ã‚‹ãŸã‚ã«ã€ClickHouse ã®ãƒã‚¤ãƒ†ã‚£ãƒ–データ型(例:`Int32`ã€`String`)を使用ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€èª­ã¿ã‚„ã™ã•ãŒå‘上ã—ã¾ã™ãŒã€`dbgen` ãŒç”Ÿæˆã™ã‚‹ SQL-92 データ型(例:`INTEGER`ã€`VARCHAR(40)`)も ClickHouse ã§æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +```sql +CREATE TABLE nation ( + n_nationkey Int32, + n_name String, + n_regionkey Int32, + n_comment String) +ORDER BY (n_nationkey); + +CREATE TABLE region ( + r_regionkey Int32, + r_name String, + r_comment String) +ORDER BY (r_regionkey); + +CREATE TABLE part ( + p_partkey Int32, + p_name String, + p_mfgr String, + p_brand String, + p_type String, + p_size Int32, + p_container String, + p_retailprice Decimal(15,2), + p_comment String) +ORDER BY (p_partkey); + +CREATE TABLE supplier ( + s_suppkey Int32, + s_name String, + s_address String, + s_nationkey Int32, + s_phone String, + s_acctbal Decimal(15,2), + s_comment String) +ORDER BY (s_suppkey); + +CREATE TABLE partsupp ( + ps_partkey Int32, + ps_suppkey Int32, + ps_availqty Int32, + ps_supplycost Decimal(15,2), + ps_comment String) +ORDER BY (ps_partkey, ps_suppkey); + +CREATE TABLE customer ( + c_custkey Int32, + c_name String, + c_address String, + c_nationkey Int32, + c_phone String, + c_acctbal Decimal(15,2), + c_mktsegment String, + c_comment String) +ORDER BY (c_custkey); + +CREATE TABLE orders ( + o_orderkey Int32, + o_custkey Int32, + o_orderstatus String, + o_totalprice Decimal(15,2), + o_orderdate Date, + o_orderpriority String, + o_clerk String, + o_shippriority Int32, + o_comment String) +ORDER BY (o_orderkey); +-- 以下ã®ä»£æ›¿é †åºã‚­ãƒ¼ã¯ã€å…¬å¼ã® TPC-H è¦å‰‡ã«ã¯æº–æ‹ ã—ã¦ã„ã¾ã›ã‚“ãŒã€ã€ŒQuantifying TPC-H Choke Points and Their Optimizationsã€ã® sec. 4.5 ã«æŽ¨å¥¨ã•ã‚Œã¦ã„ã¾ã™ï¼š +-- ORDER BY (o_orderdate, o_orderkey); + +CREATE TABLE lineitem ( + l_orderkey Int32, + l_partkey Int32, + l_suppkey Int32, + l_linenumber Int32, + l_quantity Decimal(15,2), + l_extendedprice Decimal(15,2), + l_discount Decimal(15,2), + l_tax Decimal(15,2), + l_returnflag String, + l_linestatus String, + l_shipdate Date, + l_commitdate Date, + l_receiptdate Date, + l_shipinstruct String, + l_shipmode String, + l_comment String) +ORDER BY (l_orderkey, l_linenumber); +-- 以下ã®ä»£æ›¿é †åºã‚­ãƒ¼ã¯ã€å…¬å¼ã® TPC-H è¦å‰‡ã«ã¯æº–æ‹ ã—ã¦ã„ã¾ã›ã‚“ãŒã€ã€ŒQuantifying TPC-H Choke Points and Their Optimizationsã€ã® sec. 4.5 ã«æŽ¨å¥¨ã•ã‚Œã¦ã„ã¾ã™ï¼š +-- ORDER BY (l_shipdate, l_orderkey, l_linenumber); +``` + +データã¯æ¬¡ã®ã‚ˆã†ã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã§ãã¾ã™ã€‚ + +```bash +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO nation FORMAT CSV" < nation.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO region FORMAT CSV" < region.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO part FORMAT CSV" < part.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO supplier FORMAT CSV" < supplier.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO partsupp FORMAT CSV" < partsupp.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO customer FORMAT CSV" < customer.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO orders FORMAT CSV" < orders.tbl +clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO lineitem FORMAT CSV" < lineitem.tbl +``` + +クエリ㯠`./qgen -s ` ã§ç”Ÿæˆã•ã‚Œã¾ã™ã€‚`s = 100` ã®å ´åˆã®ã‚¯ã‚¨ãƒªä¾‹ï¼š + +## クエリ + +**正確性** + +クエリã®çµæžœã¯ç‰¹ã«è¨˜è¼‰ãŒãªã„é™ã‚Šã€å…¬å¼ã®çµæžœã¨ä¸€è‡´ã—ã¾ã™ã€‚検証ã™ã‚‹ã«ã¯ã€ã‚¹ã‚±ãƒ¼ãƒ«ãƒ•ã‚¡ã‚¯ã‚¿ = 1 ã® TPC-H データベースを生æˆã—(上記㮠`dbgen` å‚照)ã€[tpch-kit ã®æœŸå¾…ã•ã‚Œã‚‹çµæžœ](https://github.com/gregrahn/tpch-kit/tree/master/dbgen/answers) ã¨æ¯”較ã—ã¦ãã ã•ã„。 + +**Q1** + +```sql +SELECT + l_returnflag, + l_linestatus, + sum(l_quantity) AS sum_qty, + sum(l_extendedprice) AS sum_base_price, + sum(l_extendedprice * (1 - l_discount)) AS sum_disc_price, + sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) AS sum_charge, + avg(l_quantity) AS avg_qty, + avg(l_extendedprice) AS avg_price, + avg(l_discount) AS avg_disc, + count(*) AS count_order +FROM + lineitem +WHERE + l_shipdate <= DATE '1998-12-01' - INTERVAL '90' DAY +GROUP BY + l_returnflag, + l_linestatus +ORDER BY + l_returnflag, + l_linestatus; +``` + +**Q2** + +```sql +SELECT + s_acctbal, + s_name, + n_name, + p_partkey, + p_mfgr, + s_address, + s_phone, + s_comment +FROM + part, + supplier, + partsupp, + nation, + region +WHERE + p_partkey = ps_partkey + AND s_suppkey = ps_suppkey + AND p_size = 15 + AND p_type LIKE '%BRASS' + AND s_nationkey = n_nationkey + AND n_regionkey = r_regionkey + AND r_name = 'EUROPE' + AND ps_supplycost = ( + SELECT + min(ps_supplycost) + FROM + partsupp, + supplier, + nation, + region + WHERE + p_partkey = ps_partkey + AND s_suppkey = ps_suppkey + AND s_nationkey = n_nationkey + AND n_regionkey = r_regionkey + AND r_name = 'EUROPE' + ) +ORDER BY + s_acctbal DESC, + n_name, + s_name, + p_partkey; +``` + +::::note +2024å¹´10月時点ã§ã¯ã€ç›¸é–¢ã‚µãƒ–クエリã®ãŸã‚クエリã¯ãã®ã¾ã¾ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。対応ã™ã‚‹å•é¡Œ: https://github.com/ClickHouse/ClickHouse/issues/6697 + +ã“ã®ä»£æ›¿ã®ãƒ•ã‚©ãƒ¼ãƒ ã¯å‹•ä½œã—ã€å‚ç…§çµæžœã‚’è¿”ã™ã“ã¨ãŒç¢ºèªã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```sql +WITH MinSupplyCost AS ( + SELECT + ps_partkey, + MIN(ps_supplycost) AS min_supplycost + FROM + partsupp ps + JOIN + supplier s ON ps.ps_suppkey = s.s_suppkey + JOIN + nation n ON s.s_nationkey = n.n_nationkey + JOIN + region r ON n.n_regionkey = r.r_regionkey + WHERE + r.r_name = 'EUROPE' + GROUP BY + ps_partkey +) +SELECT + s.s_acctbal, + s.s_name, + n.n_name, + p.p_partkey, + p.p_mfgr, + s.s_address, + s.s_phone, + s.s_comment +FROM + part p +JOIN + partsupp ps ON p.p_partkey = ps.ps_partkey +JOIN + supplier s ON s.s_suppkey = ps.ps_suppkey +JOIN + nation n ON s.s_nationkey = n.n_nationkey +JOIN + region r ON n.n_regionkey = r.r_regionkey +JOIN + MinSupplyCost msc ON ps.ps_partkey = msc.ps_partkey AND ps.ps_supplycost = msc.min_supplycost +WHERE + p.p_size = 15 + AND p.p_type LIKE '%BRASS' + AND r.r_name = 'EUROPE' +ORDER BY + s.s_acctbal DESC, + n.n_name, + s.s_name, + p.p_partkey; +``` +:::: + +**Q3** + +```sql +SELECT + l_orderkey, + sum(l_extendedprice * (1 - l_discount)) AS revenue, + o_orderdate, + o_shippriority +FROM + customer, + orders, + lineitem +WHERE + c_mktsegment = 'BUILDING' + AND c_custkey = o_custkey + AND l_orderkey = o_orderkey + AND o_orderdate < DATE '1995-03-15' + AND l_shipdate > DATE '1995-03-15' +GROUP BY + l_orderkey, + o_orderdate, + o_shippriority +ORDER BY + revenue DESC, + o_orderdate; +``` + +**Q4** + +```sql +SELECT + o_orderpriority, + count(*) AS order_count +FROM + orders +WHERE + o_orderdate >= DATE '1993-07-01' + AND o_orderdate < DATE '1993-07-01' + INTERVAL '3' MONTH + AND EXISTS ( + SELECT + * + FROM + lineitem + WHERE + l_orderkey = o_orderkey + AND l_commitdate < l_receiptdate + ) +GROUP BY + o_orderpriority +ORDER BY + o_orderpriority; +``` + +::::note +2024å¹´10月時点ã§ã¯ã€ç›¸é–¢ã‚µãƒ–クエリã®ãŸã‚クエリã¯ãã®ã¾ã¾ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。対応ã™ã‚‹å•é¡Œ: https://github.com/ClickHouse/ClickHouse/issues/6697 + +ã“ã®ä»£æ›¿ã®ãƒ•ã‚©ãƒ¼ãƒ ã¯å‹•ä½œã—ã€å‚ç…§çµæžœã‚’è¿”ã™ã“ã¨ãŒç¢ºèªã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```sql +WITH ValidLineItems AS ( + SELECT + l_orderkey + FROM + lineitem + WHERE + l_commitdate < l_receiptdate + GROUP BY + l_orderkey +) +SELECT + o.o_orderpriority, + COUNT(*) AS order_count +FROM + orders o +JOIN + ValidLineItems vli ON o.o_orderkey = vli.l_orderkey +WHERE + o.o_orderdate >= DATE '1993-07-01' + AND o.o_orderdate < DATE '1993-07-01' + INTERVAL '3' MONTH +GROUP BY + o.o_orderpriority +ORDER BY + o.o_orderpriority; +``` +:::: + +**Q5** + +```sql +SELECT + n_name, + sum(l_extendedprice * (1 - l_discount)) AS revenue +FROM + customer, + orders, + lineitem, + supplier, + nation, + region +WHERE + c_custkey = o_custkey + AND l_orderkey = o_orderkey + AND l_suppkey = s_suppkey + AND c_nationkey = s_nationkey + AND s_nationkey = n_nationkey + AND n_regionkey = r_regionkey + AND r_name = 'ASIA' + AND o_orderdate >= DATE '1994-01-01' + AND o_orderdate < DATE '1994-01-01' + INTERVAL '1' year +GROUP BY + n_name +ORDER BY + revenue DESC; +``` + +**Q6** + +```sql +SELECT + sum(l_extendedprice * l_discount) AS revenue +FROM + lineitem +WHERE + l_shipdate >= DATE '1994-01-01' + AND l_shipdate < DATE '1994-01-01' + INTERVAL '1' year + AND l_discount BETWEEN 0.06 - 0.01 AND 0.06 + 0.01 + AND l_quantity < 24; +``` + +::::note +2024å¹´10月時点ã§ã¯ã€å°æ•°ã®åŠ ç®—ã«é–¢ã™ã‚‹ãƒã‚°ã®ãŸã‚ã€ã‚¯ã‚¨ãƒªã¯ãã®ã¾ã¾ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。対応ã™ã‚‹å•é¡Œ: https://github.com/ClickHouse/ClickHouse/issues/70136 + +ã“ã®ä»£æ›¿ã®ãƒ•ã‚©ãƒ¼ãƒ ã¯å‹•ä½œã—ã€å‚ç…§çµæžœã‚’è¿”ã™ã“ã¨ãŒç¢ºèªã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```sql +SELECT + sum(l_extendedprice * l_discount) AS revenue +FROM + lineitem +WHERE + l_shipdate >= DATE '1994-01-01' + AND l_shipdate < DATE '1994-01-01' + INTERVAL '1' year + AND l_discount BETWEEN 0.05 AND 0.07 + AND l_quantity < 24; +``` +:::: + +**Q7** + +```sql +SELECT + supp_nation, + cust_nation, + l_year, + sum(volume) AS revenue +FROM ( + SELECT + n1.n_name AS supp_nation, + n2.n_name AS cust_nation, + extract(year FROM l_shipdate) AS l_year, + l_extendedprice * (1 - l_discount) AS volume + FROM + supplier, + lineitem, + orders, + customer, + nation n1, + nation n2 + WHERE + s_suppkey = l_suppkey + AND o_orderkey = l_orderkey + AND c_custkey = o_custkey + AND s_nationkey = n1.n_nationkey + AND c_nationkey = n2.n_nationkey + AND ( + (n1.n_name = 'FRANCE' AND n2.n_name = 'GERMANY') + OR (n1.n_name = 'GERMANY' AND n2.n_name = 'FRANCE') + ) + AND l_shipdate BETWEEN DATE '1995-01-01' AND DATE '1996-12-31' + ) AS shipping +GROUP BY + supp_nation, + cust_nation, + l_year +ORDER BY + supp_nation, + cust_nation, + l_year; +``` + +**Q8** + +```sql +SELECT + o_year, + sum(CASE + WHEN nation = 'BRAZIL' + THEN volume + ELSE 0 + END) / sum(volume) AS mkt_share +FROM ( + SELECT + extract(year FROM o_orderdate) AS o_year, + l_extendedprice * (1 - l_discount) AS volume, + n2.n_name AS nation + FROM + part, + supplier, + lineitem, + orders, + customer, + nation n1, + nation n2, + region + WHERE + p_partkey = l_partkey + AND s_suppkey = l_suppkey + AND l_orderkey = o_orderkey + AND o_custkey = c_custkey + AND c_nationkey = n1.n_nationkey + AND n1.n_regionkey = r_regionkey + AND r_name = 'AMERICA' + AND s_nationkey = n2.n_nationkey + AND o_orderdate BETWEEN DATE '1995-01-01' AND DATE '1996-12-31' + AND p_type = 'ECONOMY ANODIZED STEEL' + ) AS all_nations +GROUP BY + o_year +ORDER BY + o_year; +``` + +**Q9** + +```sql +SELECT + nation, + o_year, + sum(amount) AS sum_profit +FROM ( + SELECT + n_name AS nation, + extract(year FROM o_orderdate) AS o_year, + l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity AS amount + FROM + part, + supplier, + lineitem, + partsupp, + orders, + nation + WHERE + s_suppkey = l_suppkey + AND ps_suppkey = l_suppkey + AND ps_partkey = l_partkey + AND p_partkey = l_partkey + AND o_orderkey = l_orderkey + AND s_nationkey = n_nationkey + AND p_name LIKE '%green%' + ) AS profit +GROUP BY + nation, + o_year +ORDER BY + nation, + o_year DESC; +``` + +**Q10** + +```sql +SELECT + c_custkey, + c_name, + sum(l_extendedprice * (1 - l_discount)) AS revenue, + c_acctbal, + n_name, + c_address, + c_phone, + c_comment +FROM + customer, + orders, + lineitem, + nation +WHERE + c_custkey = o_custkey + AND l_orderkey = o_orderkey + AND o_orderdate >= DATE '1993-10-01' + AND o_orderdate < DATE '1993-10-01' + INTERVAL '3' MONTH + AND l_returnflag = 'R' + AND c_nationkey = n_nationkey +GROUP BY + c_custkey, + c_name, + c_acctbal, + c_phone, + n_name, + c_address, + c_comment +ORDER BY + revenue DESC; +``` + +**Q11** + +```sql +SELECT + ps_partkey, + sum(ps_supplycost * ps_availqty) AS value +FROM + partsupp, + supplier, + nation +WHERE + ps_suppkey = s_suppkey + AND s_nationkey = n_nationkey + AND n_name = 'GERMANY' +GROUP BY + ps_partkey HAVING + sum(ps_supplycost * ps_availqty) > ( + SELECT + sum(ps_supplycost * ps_availqty) * 0.0001 + FROM + partsupp, + supplier, + nation + WHERE + ps_suppkey = s_suppkey + AND s_nationkey = n_nationkey + AND n_name = 'GERMANY' + ) +ORDER BY + value DESC; +``` + +**Q12** + +```sql +SELECT + l_shipmode, + sum(CASE + WHEN o_orderpriority = '1-URGENT' + OR o_orderpriority = '2-HIGH' + THEN 1 + ELSE 0 + END) AS high_line_count, + sum(CASE + WHEN o_orderpriority <> '1-URGENT' + AND o_orderpriority <> '2-HIGH' + THEN 1 + ELSE 0 + END) AS low_line_count +FROM + orders, + lineitem +WHERE + o_orderkey = l_orderkey + AND l_shipmode in ('MAIL', 'SHIP') + AND l_commitdate < l_receiptdate + AND l_shipdate < l_commitdate + AND l_receiptdate >= DATE '1994-01-01' + AND l_receiptdate < DATE '1994-01-01' + INTERVAL '1' year +GROUP BY + l_shipmode +ORDER BY + l_shipmode; +``` + +**Q13** + +```sql +SELECT + c_count, + count(*) AS custdist +FROM ( + SELECT + c_custkey, + count(o_orderkey) + FROM + customer LEFT OUTER JOIN orders ON + c_custkey = o_custkey + AND o_comment NOT LIKE '%special%requests%' + GROUP BY + c_custkey + ) AS c_orders +GROUP BY + c_count +ORDER BY + custdist DESC, + c_count DESC; +``` + +::::note +2024å¹´10月時点ã§ã¯ã€ç›¸é–¢ã‚µãƒ–クエリã®ãŸã‚クエリã¯ãã®ã¾ã¾ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。対応ã™ã‚‹å•é¡Œ: https://github.com/ClickHouse/ClickHouse/issues/6697 + +ã“ã®ä»£æ›¿ã®ãƒ•ã‚©ãƒ¼ãƒ ã¯å‹•ä½œã—ã€å‚ç…§çµæžœã‚’è¿”ã™ã“ã¨ãŒç¢ºèªã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```sql +WITH CustomerOrderCounts AS ( + SELECT + c.c_custkey, + count(o.o_orderkey) AS order_count + FROM + customer c + LEFT OUTER JOIN + orders o ON c.c_custkey = o.o_custkey + AND o.o_comment NOT LIKE '%special%requests%' + GROUP BY + c.c_custkey +) +SELECT + order_count AS c_count, + count(*) AS custdist +FROM + CustomerOrderCounts +GROUP BY + order_count +ORDER BY + custdist DESC, + c_count DESC; +``` +:::: + +**Q14** + +```sql +SELECT + 100.00 * sum(CASE + WHEN p_type LIKE 'PROMO%' + THEN l_extendedprice * (1 - l_discount) + ELSE 0 + END) / sum(l_extendedprice * (1 - l_discount)) AS promo_revenue +FROM + lineitem, + part +WHERE + l_partkey = p_partkey + AND l_shipdate >= DATE '1995-09-01' + AND l_shipdate < DATE '1995-09-01' + INTERVAL '1' MONTH; +``` + +**Q15** + +```sql +CREATE VIEW revenue0 (supplier_no, total_revenue) AS + SELECT + l_suppkey, + sum(l_extendedprice * (1 - l_discount)) + FROM + lineitem + WHERE + l_shipdate >= DATE '1996-01-01' + AND l_shipdate < DATE '1996-01-01' + INTERVAL '3' MONTH + GROUP BY + l_suppkey; + +SELECT + s_suppkey, + s_name, + s_address, + s_phone, + total_revenue +FROM + supplier, + revenue0 +WHERE + s_suppkey = supplier_no + AND total_revenue = ( + SELECT + max(total_revenue) + FROM + revenue0 + ) +ORDER BY + s_suppkey; + +DROP VIEW revenue0; +``` + +::::note +2024å¹´10月時点ã§ã¯ã€ãƒ“ューã®å®šç¾©ã¯ãã®ã¾ã¾ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。対応ã™ã‚‹å•é¡Œ: https://github.com/ClickHouse/ClickHouse/issues/70139 + +ã“ã®ä»£æ›¿ãƒ“ュー定義ã¯å‹•ä½œã—ã¾ã™ï¼š + +```sql +CREATE VIEW revenue0 AS + SELECT + l_suppkey AS supplier_no, + sum(l_extendedprice * (1 - l_discount)) AS total_revenue + FROM + lineitem + WHERE + l_shipdate >= DATE '1996-01-01' + AND l_shipdate < DATE '1996-01-01' + INTERVAL '3' MONTH + GROUP BY + l_suppkey; +``` +:::: + +**Q16** + +```sql +SELECT + p_brand, + p_type, + p_size, + count(distinct ps_suppkey) AS supplier_cnt +FROM + partsupp, + part +WHERE + p_partkey = ps_partkey + AND p_brand <> 'Brand#45' + AND p_type NOT LIKE 'MEDIUM POLISHED%' + AND p_size in (49, 14, 23, 45, 19, 3, 36, 9) + AND ps_suppkey NOT in ( + SELECT + s_suppkey + FROM + supplier + WHERE + s_comment LIKE '%Customer%Complaints%' + ) +GROUP BY + p_brand, + p_type, + p_size +ORDER BY + supplier_cnt DESC, + p_brand, + p_type, + p_size; +``` + +**Q17** + +```sql +SELECT + sum(l_extendedprice) / 7.0 AS avg_yearly +FROM + lineitem, + part +WHERE + p_partkey = l_partkey + AND p_brand = 'Brand#23' + AND p_container = 'MED BOX' + AND l_quantity < ( + SELECT + 0.2 * avg(l_quantity) + FROM + lineitem + WHERE + l_partkey = p_partkey + ); +``` + +::::note +2024å¹´10月時点ã§ã¯ã€ç›¸é–¢ã‚µãƒ–クエリã®ãŸã‚クエリã¯ãã®ã¾ã¾ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。対応ã™ã‚‹å•é¡Œ: https://github.com/ClickHouse/ClickHouse/issues/6697 + +ã“ã®ä»£æ›¿ã®ãƒ•ã‚©ãƒ¼ãƒ ã¯å‹•ä½œã—ã€å‚ç…§çµæžœã‚’è¿”ã™ã“ã¨ãŒç¢ºèªã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```sql +WITH AvgQuantity AS ( + SELECT + l_partkey, + AVG(l_quantity) * 0.2 AS avg_quantity + FROM + lineitem + GROUP BY + l_partkey +) +SELECT + SUM(l.l_extendedprice) / 7.0 AS avg_yearly +FROM + lineitem l +JOIN + part p ON p.p_partkey = l.l_partkey +JOIN + AvgQuantity aq ON l.l_partkey = aq.l_partkey +WHERE + p.p_brand = 'Brand#23' + AND p.p_container = 'MED BOX' + AND l.l_quantity < aq.avg_quantity; + +``` +:::: + +**Q18** + +```sql +SELECT + c_name, + c_custkey, + o_orderkey, + o_orderdate, + o_totalprice, + sum(l_quantity) +FROM + customer, + orders, + lineitem +WHERE + o_orderkey in ( + SELECT + l_orderkey + FROM + lineitem + GROUP BY + l_orderkey + HAVING + sum(l_quantity) > 300 + ) + AND c_custkey = o_custkey + AND o_orderkey = l_orderkey +GROUP BY + c_name, + c_custkey, + o_orderkey, + o_orderdate, + o_totalprice +ORDER BY + o_totalprice DESC, + o_orderdate; +``` + +**Q19** + +```sql +SELECT + sum(l_extendedprice * (1 - l_discount)) AS revenue +FROM + lineitem, + part +WHERE + ( + p_partkey = l_partkey + AND p_brand = 'Brand#12' + AND p_container in ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG') + AND l_quantity >= 1 AND l_quantity <= 1 + 10 + AND p_size BETWEEN 1 AND 5 + AND l_shipmode in ('AIR', 'AIR REG') + AND l_shipinstruct = 'DELIVER IN PERSON' + ) + OR + ( + p_partkey = l_partkey + AND p_brand = 'Brand#23' + AND p_container in ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK') + AND l_quantity >= 10 AND l_quantity <= 10 + 10 + AND p_size BETWEEN 1 AND 10 + AND l_shipmode in ('AIR', 'AIR REG') + AND l_shipinstruct = 'DELIVER IN PERSON' + ) + OR + ( + p_partkey = l_partkey + AND p_brand = 'Brand#34' + AND p_container in ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG') + AND l_quantity >= 20 AND l_quantity <= 20 + 10 + AND p_size BETWEEN 1 AND 15 + AND l_shipmode in ('AIR', 'AIR REG') + AND l_shipinstruct = 'DELIVER IN PERSON' + ); +``` + +::::note +2024å¹´10月時点ã§ã¯ã€çµåˆè¿°èªžã®ãƒ—ッシュダウンãŒæ¬ å¦‚ã—ã¦ã„ã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªã¯éžå¸¸ã«é…ã„ã§ã™ã€‚対応ã™ã‚‹å•é¡Œ: https://github.com/ClickHouse/ClickHouse/issues/70802 + +ã“ã®ä»£æ›¿ã®ãƒ•ã‚©ãƒ¼ãƒ ã¯å‹•ä½œã—ã€å‚ç…§çµæžœã‚’è¿”ã™ã“ã¨ãŒç¢ºèªã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```sql +SELECT + sum(l_extendedprice * (1 - l_discount)) AS revenue +FROM + lineitem, + part +WHERE + p_partkey = l_partkey + AND l_shipinstruct = 'DELIVER IN PERSON' + AND l_shipmode IN ('AIR', 'AIR REG') + AND ( + ( + p_brand = 'Brand#12' + AND p_container IN ('SM CASE', 'SM BOX', 'SM PACK', 'SM PKG') + AND l_quantity >= 1 AND l_quantity <= 1 + 10 + AND p_size BETWEEN 1 AND 5 + ) + OR + ( + p_brand = 'Brand#23' + AND p_container IN ('MED BAG', 'MED BOX', 'MED PKG', 'MED PACK') + AND l_quantity >= 10 AND l_quantity <= 10 + 10 + AND p_size BETWEEN 1 AND 10 + ) + OR + ( + p_brand = 'Brand#34' + AND p_container IN ('LG CASE', 'LG BOX', 'LG PACK', 'LG PKG') + AND l_quantity >= 20 AND l_quantity <= 20 + 10 + AND p_size BETWEEN 1 AND 15 + ) + ) +``` +:::: + +**Q20** + +```sql +SELECT + s_name, + s_address +FROM + supplier, + nation +WHERE + s_suppkey in ( + SELECT + ps_suppkey + FROM + partsupp + WHERE + ps_partkey in ( + SELECT + p_partkey + FROM + part + WHERE + p_name LIKE 'forest%' + ) + AND ps_availqty > ( + SELECT + 0.5 * sum(l_quantity) + FROM + lineitem + WHERE + l_partkey = ps_partkey + AND l_suppkey = ps_suppkey + AND l_shipdate >= DATE '1994-01-01' + AND l_shipdate < DATE '1994-01-01' + INTERVAL '1' year + ) + ) + AND s_nationkey = n_nationkey + AND n_name = 'CANADA' +ORDER BY + s_name; +``` + +::::note +2024å¹´10月時点ã§ã¯ã€ç›¸é–¢ã‚µãƒ–クエリã®ãŸã‚クエリã¯ãã®ã¾ã¾ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。対応ã™ã‚‹å•é¡Œ: https://github.com/ClickHouse/ClickHouse/issues/6697 +:::: + +**Q21** + +```sql +SELECT + s_name, + count(*) AS numwait +FROM + supplier, + lineitem l1, + orders, + nation +WHERE + s_suppkey = l1.l_suppkey + AND o_orderkey = l1.l_orderkey + AND o_orderstatus = 'F' + AND l1.l_receiptdate > l1.l_commitdate + AND EXISTS ( + SELECT + * + FROM + lineitem l2 + WHERE + l2.l_orderkey = l1.l_orderkey + AND l2.l_suppkey <> l1.l_suppkey + ) + AND NOT EXISTS ( + SELECT + * + FROM + lineitem l3 + WHERE + l3.l_orderkey = l1.l_orderkey + AND l3.l_suppkey <> l1.l_suppkey + AND l3.l_receiptdate > l3.l_commitdate + ) + AND s_nationkey = n_nationkey + AND n_name = 'SAUDI ARABIA' +GROUP BY + s_name +ORDER BY + numwait DESC, + s_name; +``` +::::note +2024å¹´10月時点ã§ã¯ã€ç›¸é–¢ã‚µãƒ–クエリã®ãŸã‚クエリã¯ãã®ã¾ã¾ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。対応ã™ã‚‹å•é¡Œ: https://github.com/ClickHouse/ClickHouse/issues/6697 +:::: + +**Q22** + +```sql +SELECT + cntrycode, + count(*) AS numcust, + sum(c_acctbal) AS totacctbal +FROM ( + SELECT + substring(c_phone FROM 1 for 2) AS cntrycode, + c_acctbal + FROM + customer + WHERE + substring(c_phone FROM 1 for 2) in + ('13', '31', '23', '29', '30', '18', '17') + AND c_acctbal > ( + SELECT + avg(c_acctbal) + FROM + customer + WHERE + c_acctbal > 0.00 + AND substring(c_phone FROM 1 for 2) in + ('13', '31', '23', '29', '30', '18', '17') + ) + AND NOT EXISTS ( + SELECT + * + FROM + orders + WHERE + o_custkey = c_custkey + ) + ) AS custsale +GROUP BY + cntrycode +ORDER BY + cntrycode; +``` + diff --git a/docs/ja/getting-started/example-datasets/tw-weather.md b/docs/ja/getting-started/example-datasets/tw-weather.md new file mode 100644 index 00000000000..6af4aeeea4a --- /dev/null +++ b/docs/ja/getting-started/example-datasets/tw-weather.md @@ -0,0 +1,293 @@ +--- +slug: /ja/getting-started/example-datasets/tw-weather +sidebar_label: å°æ¹¾ã®æ­´å²çš„気象データセット +sidebar_position: 1 +description: éŽåŽ»128å¹´é–“ã®æ°—象観測データ1å„„3100万行 +--- + +# å°æ¹¾ã®æ­´å²çš„気象データセット + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€éŽåŽ»128å¹´é–“ã®æ­´å²çš„ãªæ°—象観測ã®æ¸¬å®šå€¤ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ãã‚Œãžã‚Œã®è¡Œã¯ã€ç‰¹å®šã®æ—¥æ™‚ã¨æ°—象観測所ã®è¦³æ¸¬å€¤ã§ã™ã€‚ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®å‡ºå…¸ã¯[ã“ã¡ã‚‰](https://github.com/Raingel/historical_weather)ã§ã€æ°—象観測所番å·ã®ãƒªã‚¹ãƒˆã¯[ã“ã¡ã‚‰](https://github.com/Raingel/weather_station_list)ã‹ã‚‰å‚ç…§ã§ãã¾ã™ã€‚ + +> 気象データã®å‡ºå…¸ã«ã¯ã€ä¸­å¤®æ°—象局ãŒè¨­ç½®ã—ãŸæ°—象観測所(観測所コードãŒC0ã€C1ã€4ã§å§‹ã¾ã‚‹ï¼‰ã‚„ã€è¾²æ¥­å§”員会所属ã®è¾²æ¥­æ°—象観測所(上記以外ã®è¦³æ¸¬æ‰€ã‚³ãƒ¼ãƒ‰ï¼‰ã‚’å«ã¿ã¾ã™ï¼š + +- StationId +- MeasuredDate(観測時刻) +- StnPres(観測所気圧) +- SeaPres(海é¢æ°—圧) +- Td(露点温度) +- RH(相対湿度) +- ä»–ã®åˆ©ç”¨å¯èƒ½ãªè¦ç´  + +## データã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ + +- ClickHouse用ã«ã‚¯ãƒªãƒ¼ãƒ‹ãƒ³ã‚°ã€å†æ§‹é€ åŒ–ã€ãŠã‚ˆã³ã‚¨ãƒ³ãƒªãƒƒãƒãƒ¡ãƒ³ãƒˆã•ã‚ŒãŸ[事å‰å‡¦ç†æ¸ˆã¿ãƒãƒ¼ã‚¸ãƒ§ãƒ³](#pre-processed-data)ã®ãƒ‡ãƒ¼ã‚¿ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯1896å¹´ã‹ã‚‰2023å¹´ã¾ã§ã®æƒ…報をカãƒãƒ¼ã—ã¦ã„ã¾ã™ã€‚ +- [オリジナルã®ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚’ダウンロード](#original-raw-data)ã—ã€ClickHouseãŒå¿…è¦ã¨ã™ã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¤‰æ›ã—ã¾ã™ã€‚独自ã«ã‚«ãƒ©ãƒ ã‚’追加ã—ãŸã„ユーザーã¯ã€ç‹¬è‡ªã®ã‚¢ãƒ—ローãƒã‚’検討ã—ãŸã‚Šã€å®Œæˆã•ã›ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### 事å‰å‡¦ç†æ¸ˆã¿ãƒ‡ãƒ¼ã‚¿ + +データセットã¯1è¡Œã”ã¨ã®æ¸¬å®šå€¤ã‹ã‚‰ã€è¦³æ¸¬æ‰€IDã¨æ¸¬å®šæ—¥ã®è¡Œã”ã¨ã«å†æ§‹é€ åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚例: + +```csv +StationId,MeasuredDate,StnPres,Tx,RH,WS,WD,WSGust,WDGust,Precp,GloblRad,TxSoil0cm,TxSoil5cm,TxSoil20cm,TxSoil50cm,TxSoil100cm,SeaPres,Td,PrecpHour,SunShine,TxSoil10cm,EvapA,Visb,UVI,Cloud Amount,TxSoil30cm,TxSoil200cm,TxSoil300cm,TxSoil500cm,VaporPressure +C0X100,2016-01-01 01:00:00,1022.1,16.1,72,1.1,8.0,,,,,,,,,,,,,,,,,,,,,,, +C0X100,2016-01-01 02:00:00,1021.6,16.0,73,1.2,358.0,,,,,,,,,,,,,,,,,,,,,,, +C0X100,2016-01-01 03:00:00,1021.3,15.8,74,1.5,353.0,,,,,,,,,,,,,,,,,,,,,,, +C0X100,2016-01-01 04:00:00,1021.2,15.8,74,1.7,8.0,,,,,,,,,,,,,,,,,,,,,,, +``` + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹ã®ãŒå®¹æ˜“ã§ã€çµæžœã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ã€ä¸è¶³ã—ã¦ã„ã‚‹è¦ç´ ã‚’nullã¨ã—ã¦ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã€å„気象観測所ã§åˆ©ç”¨å¯èƒ½ãªæ¸¬å®šé …ç›®ãŒç•°ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ã€ä»¥ä¸‹ã®Google CloudStorageã®å ´æ‰€ã«ã‚ã‚Šã¾ã™ã€‚データセットをローカルã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ï¼ˆãã—ã¦ClickHouseクライアントを使用ã—ã¦æŒ¿å…¥ã™ã‚‹ï¼‰ã‚‚ã€ç›´æŽ¥ClickHouseã«æŒ¿å…¥ã—ã¦ã‚‚構ã„ã¾ã›ã‚“([URLã‹ã‚‰æŒ¿å…¥](#inserting-from-url)ã‚’å‚照)。 + +ダウンロードã™ã‚‹ã«ã¯ï¼š + +```bash +wget https://storage.googleapis.com/taiwan-weather-observaiton-datasets/preprocessed_weather_daily_1896_2023.tar.gz + +# オプション: ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’検証 +md5sum preprocessed_weather_daily_1896_2023.tar.gz +# ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: 11b484f5bd9ddafec5cfb131eb2dd008 + +tar -xzvf preprocessed_weather_daily_1896_2023.tar.gz +daily_weather_preprocessed_1896_2023.csv + +# オプション: ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’検証 +md5sum daily_weather_preprocessed_1896_2023.csv +# ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: 1132248c78195c43d93f843753881754 +``` + +### オリジナルã®ç”Ÿãƒ‡ãƒ¼ã‚¿ + +以下ã¯ã€å¤‰æ›ãŠã‚ˆã³ç‹¬è‡ªã®ç›®çš„ã«åˆã‚ã›ã¦å¤‰æ›´ã™ã‚‹ãŸã‚ã®ã‚ªãƒªã‚¸ãƒŠãƒ«ã®ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚’ダウンロードã™ã‚‹æ‰‹é †ã«é–¢ã™ã‚‹è©³ç´°ã§ã™ã€‚ + +#### ダウンロード + +オリジナルã®ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚’ダウンロードã™ã‚‹ã«ã¯ï¼š + +```bash +mkdir tw_raw_weather_data && cd tw_raw_weather_data + +wget https://storage.googleapis.com/taiwan-weather-observaiton-datasets/raw_data_weather_daily_1896_2023.tar.gz + +# オプション: ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’検証 +md5sum raw_data_weather_daily_1896_2023.tar.gz +# ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: b66b9f137217454d655e3004d7d1b51a + +tar -xzvf raw_data_weather_daily_1896_2023.tar.gz +466920_1928.csv +466920_1929.csv +466920_1930.csv +466920_1931.csv +... + +# オプション: ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’検証 +cat *.csv | md5sum +# ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: b26db404bf84d4063fac42e576464ce1 +``` + +#### å°æ¹¾ã®æ°—象観測所をå–å¾— + +```bash +wget -O weather_sta_list.csv https://github.com/Raingel/weather_station_list/raw/main/data/weather_sta_list.csv + +# オプション: UTF-8-BOMã‹ã‚‰UTF-8エンコーディングã«å¤‰æ› +sed -i '1s/^\xEF\xBB\xBF//' weather_sta_list.csv +``` + +## テーブルスキーマã®ä½œæˆ + +ClickHouseã«MergeTreeテーブルを作æˆã—ã¾ã™ï¼ˆClickHouseクライアントã‹ã‚‰ï¼‰ã€‚ + +```bash +CREATE TABLE tw_weather_data ( + StationId String null, + MeasuredDate DateTime64, + StnPres Float64 null, + SeaPres Float64 null, + Tx Float64 null, + Td Float64 null, + RH Float64 null, + WS Float64 null, + WD Float64 null, + WSGust Float64 null, + WDGust Float64 null, + Precp Float64 null, + PrecpHour Float64 null, + SunShine Float64 null, + GloblRad Float64 null, + TxSoil0cm Float64 null, + TxSoil5cm Float64 null, + TxSoil10cm Float64 null, + TxSoil20cm Float64 null, + TxSoil50cm Float64 null, + TxSoil100cm Float64 null, + TxSoil30cm Float64 null, + TxSoil200cm Float64 null, + TxSoil300cm Float64 null, + TxSoil500cm Float64 null, + VaporPressure Float64 null, + UVI Float64 null, + "Cloud Amount" Float64 null, + EvapA Float64 null, + Visb Float64 null +) +ENGINE = MergeTree +ORDER BY (MeasuredDate); +``` + +## データã®ClickHouseã¸ã®æŒ¿å…¥ + +### ローカルファイルã‹ã‚‰ã®æŒ¿å…¥ + +データã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰æ¬¡ã®ã‚ˆã†ã«æŒ¿å…¥ã§ãã¾ã™ï¼ˆClickHouseクライアントã‹ã‚‰ï¼‰ï¼š + +```sql +INSERT INTO tw_weather_data FROM INFILE '/path/to/daily_weather_preprocessed_1896_2023.csv' +``` + +ã“ã“㧠`/path/to` ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘スを表ã—ã¾ã™ã€‚ + +ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥å¾Œã®ã‚µãƒ³ãƒ—ル応答出力ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +```response +Query id: 90e4b524-6e14-4855-817c-7e6f98fbeabb + +Ok. +131985329 è¡ŒãŒã‚»ãƒƒãƒˆå†…ã«ã‚ã‚Šã¾ã™ã€‚Elapsed: 71.770 秒。処ç†ã•ã‚ŒãŸ1å„„3198.5万行ã€10.06 GB(1.84百万行ï¼ç§’ã€140.14 MBï¼ç§’)。 +ピークメモリ使用é‡: 583.23 MiB。 +``` + +### URLã‹ã‚‰ã®æŒ¿å…¥ + +```sql +INSERT INTO tw_weather_data SELECT * +FROM url('https://storage.googleapis.com/taiwan-weather-observaiton-datasets/daily_weather_preprocessed_1896_2023.csv', 'CSVWithNames') +``` + +データã®ãƒ­ãƒ¼ãƒ‰ã‚’高速化ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[大è¦æ¨¡ãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ã®èª¿æ•´ã«é–¢ã™ã‚‹ãƒ–ログ投稿](https://clickhouse.com/blog/supercharge-your-clickhouse-data-loads-part2)ã‚’ã”覧ãã ã•ã„。 + +## データ行ã¨ã‚µã‚¤ã‚ºã‚’ç¢ºèª + +1. 挿入ã•ã‚ŒãŸè¡Œæ•°ã‚’確èªï¼š + +```sql +SELECT formatReadableQuantity(count()) +FROM tw_weather_data; +``` + +```response +┌─formatReadableQuantity(count())─┠+│ 1å„„3199万 │ +└─────────────────────────────────┘ +``` + +2. ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ä½¿ç”¨ã•ã‚Œã¦ã„るディスク容é‡ã‚’確èªï¼š + +```sql +SELECT + formatReadableSize(sum(bytes)) AS disk_size, + formatReadableSize(sum(data_uncompressed_bytes)) AS uncompressed_size +FROM system.parts +WHERE (`table` = 'tw_weather_data') AND active +``` + +```response +┌─disk_size─┬─uncompressed_size─┠+│ 2.13 GiB │ 32.94 GiB │ +└───────────┴───────────────────┘ +``` + +## サンプルクエリ + +### Q1: 特定ã®å¹´ã«ãŠã‘ã‚‹å„気象観測所ã®æœ€é«˜éœ²ç‚¹æ¸©åº¦ã‚’å–å¾— + +```sql +SELECT + StationId, + max(Td) AS max_td +FROM tw_weather_data +WHERE (year(MeasuredDate) = 2023) AND (Td IS NOT NULL) +GROUP BY StationId + +┌─StationId─┬─max_td─┠+│ 466940 │ 1 │ +│ 467300 │ 1 │ +│ 467540 │ 1 │ +│ 467490 │ 1 │ +│ 467080 │ 1 │ +│ 466910 │ 1 │ +│ 467660 │ 1 │ +│ 467270 │ 1 │ +│ 467350 │ 1 │ +│ 467571 │ 1 │ +│ 466920 │ 1 │ +│ 467650 │ 1 │ +│ 467550 │ 1 │ +│ 467480 │ 1 │ +│ 467610 │ 1 │ +│ 467050 │ 1 │ +│ 467590 │ 1 │ +│ 466990 │ 1 │ +│ 467060 │ 1 │ +│ 466950 │ 1 │ +│ 467620 │ 1 │ +│ 467990 │ 1 │ +│ 466930 │ 1 │ +│ 467110 │ 1 │ +│ 466881 │ 1 │ +│ 467410 │ 1 │ +│ 467441 │ 1 │ +│ 467420 │ 1 │ +│ 467530 │ 1 │ +│ 466900 │ 1 │ +└───────────┴────────┘ + +30 è¡ŒãŒã‚»ãƒƒãƒˆå†…ã«ã‚ã‚Šã¾ã™ã€‚Elapsed: 0.045 秒。処ç†ã•ã‚ŒãŸ641万行ã€187.33 MB(143.92百万行ï¼ç§’ã€4.21 GBï¼ç§’)。 +``` + +### Q2: 特定ã®æœŸé–“ã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã€ãŠã‚ˆã³æ°—象観測所ã§ã®ç”Ÿãƒ‡ãƒ¼ã‚¿å–å¾— + +```sql +SELECT + StnPres, + SeaPres, + Tx, + Td, + RH, + WS, + WD, + WSGust, + WDGust, + Precp, + PrecpHour +FROM tw_weather_data +WHERE (StationId = 'C0UB10') AND (MeasuredDate >= '2023-12-23') AND (MeasuredDate < '2023-12-24') +ORDER BY MeasuredDate ASC +LIMIT 10 +``` + +```response +┌─StnPres─┬─SeaPres─┬───Tx─┬───Td─┬─RH─┬──WS─┬──WD─┬─WSGust─┬─WDGust─┬─Precp─┬─PrecpHour─┠+│ 1029.5 │ á´ºáµá´¸á´¸ │ 11.8 │ á´ºáµá´¸á´¸ │ 78 │ 2.7 │ 271 │ 5.5 │ 275 │ -99.8 │ -99.8 │ +│ 1029.8 │ á´ºáµá´¸á´¸ │ 12.3 │ á´ºáµá´¸á´¸ │ 78 │ 2.7 │ 289 │ 5.5 │ 308 │ -99.8 │ -99.8 │ +│ 1028.6 │ á´ºáµá´¸á´¸ │ 12.3 │ á´ºáµá´¸á´¸ │ 79 │ 2.3 │ 251 │ 6.1 │ 289 │ -99.8 │ -99.8 │ +│ 1028.2 │ á´ºáµá´¸á´¸ │ 13 │ á´ºáµá´¸á´¸ │ 75 │ 4.3 │ 312 │ 7.5 │ 316 │ -99.8 │ -99.8 │ +│ 1027.8 │ á´ºáµá´¸á´¸ │ 11.1 │ á´ºáµá´¸á´¸ │ 89 │ 7.1 │ 310 │ 11.6 │ 322 │ -99.8 │ -99.8 │ +│ 1027.8 │ á´ºáµá´¸á´¸ │ 11.6 │ á´ºáµá´¸á´¸ │ 90 │ 3.1 │ 269 │ 10.7 │ 295 │ -99.8 │ -99.8 │ +│ 1027.9 │ á´ºáµá´¸á´¸ │ 12.3 │ á´ºáµá´¸á´¸ │ 89 │ 4.7 │ 296 │ 8.1 │ 310 │ -99.8 │ -99.8 │ +│ 1028.2 │ á´ºáµá´¸á´¸ │ 12.2 │ á´ºáµá´¸á´¸ │ 94 │ 2.5 │ 246 │ 7.1 │ 283 │ -99.8 │ -99.8 │ +│ 1028.4 │ á´ºáµá´¸á´¸ │ 12.5 │ á´ºáµá´¸á´¸ │ 94 │ 3.1 │ 265 │ 4.8 │ 297 │ -99.8 │ -99.8 │ +│ 1028.3 │ á´ºáµá´¸á´¸ │ 13.6 │ á´ºáµá´¸á´¸ │ 91 │ 1.2 │ 273 │ 4.4 │ 256 │ -99.8 │ -99.8 │ +└─────────┴─────────┴──────┴──────┴────┴─────┴─────┴────────┴────────┴───────┴───────────┘ + +10 è¡ŒãŒã‚»ãƒƒãƒˆå†…ã«ã‚ã‚Šã¾ã™ã€‚Elapsed: 0.009 秒。処ç†ã•ã‚ŒãŸ9万1700è¡Œã€2.33 MB(967万行ï¼ç§’ã€245.31 MBï¼ç§’)。 +``` + +## クレジット + +データセットã®æº–å‚™ã€ã‚¯ãƒªãƒ¼ãƒ‹ãƒ³ã‚°ã€ãŠã‚ˆã³é…ä¿¡ã«å¯¾ã™ã‚‹ä¸­å¤®æ°—象局ã¨è¾²æ¥­å§”員会ã®è¾²æ¥­æ°—象観測ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ï¼ˆè¦³æ¸¬æ‰€ï¼‰ã®åŠªåŠ›ã‚’èªã‚ãŸã„ã¨æ€ã„ã¾ã™ã€‚æ„Ÿè¬ã„ãŸã—ã¾ã™ã€‚ + +Ou, J.-H., Kuo, C.-H., Wu, Y.-F., Lin, G.-C., Lee, M.-H., Chen, R.-K., Chou, H.-P., Wu, H.-Y., Chu, S.-C., Lai, Q.-J., Tsai, Y.-C., Lin, C.-C., Kuo, C.-C., Liao, C.-T., Chen, Y.-N., Chu, Y.-W., Chen, C.-Y., 2023. å°æ¹¾ã«ãŠã‘るイãƒã„ã‚‚ã¡ç—…ã®æ—©æœŸè­¦å ±ã®ãŸã‚ã®ã‚¢ãƒ—リケーション指å‘ã®æ·±å±¤å­¦ç¿’モデル。Ecological Informatics 73, 101950. https://doi.org/10.1016/j.ecoinf.2022.101950 [13/12/2022] diff --git a/docs/ja/getting-started/example-datasets/uk-price-paid.md b/docs/ja/getting-started/example-datasets/uk-price-paid.md new file mode 100644 index 00000000000..b6ff53048bd --- /dev/null +++ b/docs/ja/getting-started/example-datasets/uk-price-paid.md @@ -0,0 +1,448 @@ +--- +slug: /ja/getting-started/example-datasets/uk-price-paid +sidebar_label: イギリスã®ä¸å‹•ç”£ä¾¡æ ¼ +sidebar_position: 1 +--- + +# イギリスã®ä¸å‹•ç”£ä¾¡æ ¼ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ + +プロジェクションã¯ã€é »ç¹ã«å®Ÿè¡Œã™ã‚‹ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスを改善ã™ã‚‹ãŸã‚ã®ç´ æ™´ã‚‰ã—ã„方法ã§ã™ã€‚今回ã¯ã€ã‚¤ã‚®ãƒªã‚¹ã®ä¸å‹•ç”£ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’使用ã—ã¦ãƒ—ロジェクションã®åŠ›ã‚’示ã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€ã‚¤ãƒ³ã‚°ãƒ©ãƒ³ãƒ‰ãŠã‚ˆã³ã‚¦ã‚§ãƒ¼ãƒ«ã‚ºã«ãŠã‘ã‚‹ä¸å‹•ç”£ã«å¯¾ã—ã¦æ”¯æ‰•ã‚ã‚ŒãŸä¾¡æ ¼ã«é–¢ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚データã¯1995年以é™åˆ©ç”¨å¯èƒ½ã§ã€éžåœ§ç¸®å½¢å¼ã§ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ã‚µã‚¤ã‚ºã¯ç´„4 GiB(ClickHouseã§ã¯ç´„278 MiBã—ã‹ä½¿ç”¨ã—ã¾ã›ã‚“)。 + +- ソース: https://www.gov.uk/government/statistical-data-sets/price-paid-data-downloads +- フィールドã®èª¬æ˜Ž: https://www.gov.uk/guidance/about-the-price-paid-data +- HM土地登記データをå«ã‚€ © Crown copyright and database right 2021。ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ã€ã‚ªãƒ¼ãƒ—ンガãƒãƒ¡ãƒ³ãƒˆãƒ©ã‚¤ã‚»ãƒ³ã‚¹v3.0ã®ä¸‹ã§ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## テーブルã®ä½œæˆ {#create-table} + +```sql +CREATE TABLE uk_price_paid +( + price UInt32, + date Date, + postcode1 LowCardinality(String), + postcode2 LowCardinality(String), + type Enum8('terraced' = 1, 'semi-detached' = 2, 'detached' = 3, 'flat' = 4, 'other' = 0), + is_new UInt8, + duration Enum8('freehold' = 1, 'leasehold' = 2, 'unknown' = 0), + addr1 String, + addr2 String, + street LowCardinality(String), + locality LowCardinality(String), + town LowCardinality(String), + district LowCardinality(String), + county LowCardinality(String) +) +ENGINE = MergeTree +ORDER BY (postcode1, postcode2, addr1, addr2); +``` + +## データã®å‰å‡¦ç†ã¨æŒ¿å…¥ {#preprocess-import-data} + +`url`関数を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«ã‚¹ãƒˆãƒªãƒ¼ãƒ ã—ã¾ã™ã€‚ã¾ãšã€ã„ãã¤ã‹ã®å—信データをå‰å‡¦ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã¯ä»¥ä¸‹ãŒå«ã¾ã‚Œã¾ã™ï¼š +- `postcode`を二ã¤ã®ç•°ãªã‚‹ã‚«ãƒ©ãƒ ã€`postcode1`ã¨`postcode2`ã«åˆ†å‰²ã—ã¾ã™ã€‚ã“ã‚Œã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã‚¯ã‚¨ãƒªã«ã¨ã£ã¦ã‚ˆã‚Šè‰¯ã„ã§ã™ +- `time`フィールドを日付ã«å¤‰æ›ã—ã¾ã™ï¼ˆæ™‚é–“ã¯00:00ã®ã¿ã§ã‚ã‚‹ãŸã‚) +- 分æžã«å¿…è¦ãªã„ãŸã‚ã€[UUid](../../sql-reference/data-types/uuid.md)フィールドを無視ã—ã¾ã™ +- [transform](../../sql-reference/functions/other-functions.md#transform)関数を使用ã—ã¦ã€`type`ã¨`duration`をより読ã¿ã‚„ã™ã„`Enum`フィールドã«å¤‰æ›ã—ã¾ã™ +- `is_new`フィールドをå˜ä¸€æ–‡å­—ã®æ–‡å­—列(`Y`/`N`)ã‹ã‚‰[UInt8](../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-uint256-int8-int16-int32-int64-int128-int256)フィールド(0ã¾ãŸã¯1)ã«å¤‰æ›ã—ã¾ã™ +- 最後ã®äºŒã¤ã®ã‚«ãƒ©ãƒ ã¯åŒã˜å€¤ï¼ˆ0)ã—ã‹æŒãŸãªã„ã®ã§å‰Šé™¤ã—ã¾ã™ + +`url`関数ã¯ã€Webサーãƒãƒ¼ã‹ã‚‰ClickHouseテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’ストリームã—ã¾ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€`uk_price_paid`テーブルã«500万行を挿入ã—ã¾ã™ï¼š + +```sql +INSERT INTO uk_price_paid +WITH + splitByChar(' ', postcode) AS p +SELECT + toUInt32(price_string) AS price, + parseDateTimeBestEffortUS(time) AS date, + p[1] AS postcode1, + p[2] AS postcode2, + transform(a, ['T', 'S', 'D', 'F', 'O'], ['terraced', 'semi-detached', 'detached', 'flat', 'other']) AS type, + b = 'Y' AS is_new, + transform(c, ['F', 'L', 'U'], ['freehold', 'leasehold', 'unknown']) AS duration, + addr1, + addr2, + street, + locality, + town, + district, + county +FROM url( + 'http://prod.publicdata.landregistry.gov.uk.s3-website-eu-west-1.amazonaws.com/pp-complete.csv', + 'CSV', + 'uuid_string String, + price_string String, + time String, + postcode String, + a String, + b String, + c String, + addr1 String, + addr2 String, + street String, + locality String, + town String, + district String, + county String, + d String, + e String' +) SETTINGS max_http_get_redirects=10; +``` + +データãŒæŒ¿å…¥ã•ã‚Œã‚‹ã®ã‚’å¾…ã¡ã¾ã™ã€‚ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®é€Ÿåº¦ã«ã‚ˆã£ã¦ã€1ã€2分ã‹ã‹ã‚Šã¾ã™ã€‚ + +## データã®æ¤œè¨¼ {#validate-data} + +ã©ã†ãªã£ãŸã‹ç¢ºèªã™ã‚‹ãŸã‚ã«ã€æŒ¿å…¥ã•ã‚ŒãŸè¡Œæ•°ã‚’見ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT count() +FROM uk_price_paid +``` + +ã“ã®ã‚¯ã‚¨ãƒªãŒå®Ÿè¡Œã•ã‚ŒãŸæ™‚点ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯27,450,499è¡ŒãŒã‚ã‚Šã¾ã—ãŸã€‚ClickHouseã§ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚µã‚¤ã‚ºã‚’見ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT formatReadableSize(total_bytes) +FROM system.tables +WHERE name = 'uk_price_paid' +``` + +テーブルã®ã‚µã‚¤ã‚ºã¯ã‚ãšã‹221.43 MiBã§ã™ï¼ + +## クエリを実行ã™ã‚‹ {#run-queries} + +データを分æžã™ã‚‹ãŸã‚ã«ã‚¯ã‚¨ãƒªã‚’実行ã—ã¦ã¿ã¾ã—ょã†ï¼š + +### クエリ1. å¹´ã”ã¨ã®å¹³å‡ä¾¡æ ¼ {#average-price} + +```sql +SELECT + toYear(date) AS year, + round(avg(price)) AS price, + bar(price, 0, 1000000, 80 +) +FROM uk_price_paid +GROUP BY year +ORDER BY year +``` + +çµæžœã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```response +┌─year─┬──price─┬─bar(round(avg(price)), 0, 1000000, 80)─┠+│ 1995 │ 67934 │ █████■│ +│ 1996 │ 71508 │ █████▋ │ +│ 1997 │ 78536 │ ██████▎ │ +│ 1998 │ 85441 │ ██████▋ │ +│ 1999 │ 96038 │ ███████▋ │ +│ 2000 │ 107487 │ ████████▌ │ +│ 2001 │ 118888 │ █████████▌ │ +│ 2002 │ 137948 │ ███████████ │ +│ 2003 │ 155893 │ ████████████■│ +│ 2004 │ 178888 │ ██████████████▎ │ +│ 2005 │ 189359 │ ███████████████■│ +│ 2006 │ 203532 │ ████████████████▎ │ +│ 2007 │ 219375 │ █████████████████▌ │ +│ 2008 │ 217056 │ █████████████████▎ │ +│ 2009 │ 213419 │ █████████████████ │ +│ 2010 │ 236110 │ ██████████████████▊ │ +│ 2011 │ 232805 │ ██████████████████▌ │ +│ 2012 │ 238381 │ ███████████████████ │ +│ 2013 │ 256927 │ ████████████████████▌ │ +│ 2014 │ 280008 │ ██████████████████████■│ +│ 2015 │ 297263 │ ███████████████████████▋ │ +│ 2016 │ 313518 │ █████████████████████████ │ +│ 2017 │ 346371 │ ███████████████████████████▋ │ +│ 2018 │ 350556 │ ████████████████████████████ │ +│ 2019 │ 352184 │ ████████████████████████████■│ +│ 2020 │ 375808 │ ██████████████████████████████ │ +│ 2021 │ 381105 │ ██████████████████████████████■│ +│ 2022 │ 362572 │ █████████████████████████████ │ +└──────┴────────┴────────────────────────────────────────┘ +``` + +### クエリ2. ロンドンã®å¹´ã”ã¨ã®å¹³å‡ä¾¡æ ¼ {#average-price-london} + +```sql +SELECT + toYear(date) AS year, + round(avg(price)) AS price, + bar(price, 0, 2000000, 100 +) +FROM uk_price_paid +WHERE town = 'LONDON' +GROUP BY year +ORDER BY year +``` + +çµæžœã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```response +┌─year─┬───price─┬─bar(round(avg(price)), 0, 2000000, 100)───────────────┠+│ 1995 │ 109110 │ █████■│ +│ 1996 │ 118659 │ █████▊ │ +│ 1997 │ 136526 │ ██████▋ │ +│ 1998 │ 153002 │ ███████▋ │ +│ 1999 │ 180633 │ █████████ │ +│ 2000 │ 215849 │ ██████████▋ │ +│ 2001 │ 232987 │ ███████████▋ │ +│ 2002 │ 263668 │ █████████████■│ +│ 2003 │ 278424 │ █████████████▊ │ +│ 2004 │ 304664 │ ███████████████■│ +│ 2005 │ 322887 │ ████████████████■│ +│ 2006 │ 356195 │ █████████████████▋ │ +│ 2007 │ 404062 │ ████████████████████■│ +│ 2008 │ 420741 │ █████████████████████ │ +│ 2009 │ 427754 │ █████████████████████■│ +│ 2010 │ 480322 │ ████████████████████████ │ +│ 2011 │ 496278 │ ████████████████████████▋ │ +│ 2012 │ 519482 │ █████████████████████████▊ │ +│ 2013 │ 616195 │ ██████████████████████████████▋ │ +│ 2014 │ 724121 │ ████████████████████████████████████■│ +│ 2015 │ 792101 │ ███████████████████████████████████████▌ │ +│ 2016 │ 843589 │ ██████████████████████████████████████████■│ +│ 2017 │ 983523 │ █████████████████████████████████████████████████■│ +│ 2018 │ 1016753 │ ██████████████████████████████████████████████████▋ │ +│ 2019 │ 1041673 │ ████████████████████████████████████████████████████ │ +│ 2020 │ 1060027 │ █████████████████████████████████████████████████████ │ +│ 2021 │ 958249 │ ███████████████████████████████████████████████▊ │ +│ 2022 │ 902596 │ █████████████████████████████████████████████■│ +└──────┴─────────┴───────────────────────────────────────────────────────┘ +``` + +2020å¹´ã«å®¶ã®ä¾¡æ ¼ã«ä½•ã‹ãŒèµ·ã“ã‚Šã¾ã—ãŸï¼ã§ã™ãŒã€ãã‚Œã¯ãŠãらãé©šãã¹ãã“ã¨ã§ã¯ãªã„ã§ã—ょã†... + +### クエリ3. 最も高価ãªåœ°åŸŸ {#most-expensive-neighborhoods} + +```sql +SELECT + town, + district, + count() AS c, + round(avg(price)) AS price, + bar(price, 0, 5000000, 100) +FROM uk_price_paid +WHERE date >= '2020-01-01' +GROUP BY + town, + district +HAVING c >= 100 +ORDER BY price DESC +LIMIT 100 +``` + +çµæžœã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```response +┌─town─────────────────┬─district───────────────┬─────c─┬───price─┬─bar(round(avg(price)), 0, 5000000, 100)─────────────────────────┠+│ LONDON │ CITY OF LONDON │ 578 │ 3149590 │ ██████████████████████████████████████████████████████████████▊ │ +│ LONDON │ CITY OF WESTMINSTER │ 7083 │ 2903794 │ ██████████████████████████████████████████████████████████ │ +│ LONDON │ KENSINGTON AND CHELSEA │ 4986 │ 2333782 │ ██████████████████████████████████████████████▋ │ +│ LEATHERHEAD │ ELMBRIDGE │ 203 │ 2071595 │ █████████████████████████████████████████■│ +│ VIRGINIA WATER │ RUNNYMEDE │ 308 │ 1939465 │ ██████████████████████████████████████▋ │ +│ LONDON │ CAMDEN │ 5750 │ 1673687 │ █████████████████████████████████■│ +│ WINDLESHAM │ SURREY HEATH │ 182 │ 1428358 │ ████████████████████████████▌ │ +│ NORTHWOOD │ THREE RIVERS │ 112 │ 1404170 │ ████████████████████████████ │ +│ BARNET │ ENFIELD │ 259 │ 1338299 │ ██████████████████████████▋ │ +│ LONDON │ ISLINGTON │ 5504 │ 1275520 │ █████████████████████████▌ │ +│ LONDON │ RICHMOND UPON THAMES │ 1345 │ 1261935 │ █████████████████████████■│ +│ COBHAM │ ELMBRIDGE │ 727 │ 1251403 │ █████████████████████████ │ +│ BEACONSFIELD │ BUCKINGHAMSHIRE │ 680 │ 1199970 │ ███████████████████████▊ │ +│ LONDON │ TOWER HAMLETS │ 10012 │ 1157827 │ ███████████████████████■│ +│ LONDON │ HOUNSLOW │ 1278 │ 1144389 │ ██████████████████████▊ │ +│ BURFORD │ WEST OXFORDSHIRE │ 182 │ 1139393 │ ██████████████████████▋ │ +│ RICHMOND │ RICHMOND UPON THAMES │ 1649 │ 1130076 │ ██████████████████████▌ │ +│ KINGSTON UPON THAMES │ RICHMOND UPON THAMES │ 147 │ 1126111 │ ██████████████████████▌ │ +│ ASCOT │ WINDSOR AND MAIDENHEAD │ 773 │ 1106109 │ ██████████████████████ │ +│ LONDON │ HAMMERSMITH AND FULHAM │ 6162 │ 1056198 │ █████████████████████ │ +│ RADLETT │ HERTSMERE │ 513 │ 1045758 │ ████████████████████▊ │ +│ LEATHERHEAD │ GUILDFORD │ 354 │ 1045175 │ ████████████████████▊ │ +│ WEYBRIDGE │ ELMBRIDGE │ 1275 │ 1036702 │ ████████████████████▋ │ +│ FARNHAM │ EAST HAMPSHIRE │ 107 │ 1033682 │ ████████████████████▋ │ +│ ESHER │ ELMBRIDGE │ 915 │ 1032753 │ ████████████████████▋ │ +│ FARNHAM │ HART │ 102 │ 1002692 │ ████████████████████ │ +│ GERRARDS CROSS │ BUCKINGHAMSHIRE │ 845 │ 983639 │ ███████████████████▋ │ +│ CHALFONT ST GILES │ BUCKINGHAMSHIRE │ 286 │ 973993 │ ███████████████████■│ +│ SALCOMBE │ SOUTH HAMS │ 215 │ 965724 │ ███████████████████▎ │ +│ SURBITON │ ELMBRIDGE │ 181 │ 960346 │ ███████████████████■│ +│ BROCKENHURST │ NEW FOREST │ 226 │ 951278 │ ███████████████████ │ +│ SUTTON COLDFIELD │ LICHFIELD │ 110 │ 930757 │ ██████████████████▌ │ +│ EAST MOLESEY │ ELMBRIDGE │ 372 │ 927026 │ ██████████████████▌ │ +│ LLANGOLLEN │ WREXHAM │ 127 │ 925681 │ ██████████████████▌ │ +│ OXFORD │ SOUTH OXFORDSHIRE │ 638 │ 923830 │ ██████████████████■│ +│ LONDON │ MERTON │ 4383 │ 923194 │ ██████████████████■│ +│ GUILDFORD │ WAVERLEY │ 261 │ 905733 │ ██████████████████ │ +│ TEDDINGTON │ RICHMOND UPON THAMES │ 1147 │ 894856 │ █████████████████▊ │ +│ HARPENDEN │ ST ALBANS │ 1271 │ 893079 │ █████████████████▋ │ +│ HENLEY-ON-THAMES │ SOUTH OXFORDSHIRE │ 1042 │ 887557 │ █████████████████▋ │ +│ POTTERS BAR │ WELWYN HATFIELD │ 314 │ 863037 │ █████████████████▎ │ +│ LONDON │ WANDSWORTH │ 13210 │ 857318 │ █████████████████■│ +│ BILLINGSHURST │ CHICHESTER │ 255 │ 856508 │ █████████████████■│ +│ LONDON │ SOUTHWARK │ 7742 │ 843145 │ ████████████████▋ │ +│ LONDON │ HACKNEY │ 6656 │ 839716 │ ████████████████▋ │ +│ LUTTERWORTH │ HARBOROUGH │ 1096 │ 836546 │ ████████████████▋ │ +│ KINGSTON UPON THAMES │ KINGSTON UPON THAMES │ 1846 │ 828990 │ ████████████████▌ │ +│ LONDON │ EALING │ 5583 │ 820135 │ ████████████████■│ +│ INGATESTONE │ CHELMSFORD │ 120 │ 815379 │ ████████████████▎ │ +│ MARLOW │ BUCKINGHAMSHIRE │ 718 │ 809943 │ ████████████████■│ +│ EAST GRINSTEAD │ TANDRIDGE │ 105 │ 809461 │ ████████████████■│ +│ CHIGWELL │ EPPING FOREST │ 484 │ 809338 │ ████████████████■│ +│ EGHAM │ RUNNYMEDE │ 989 │ 807858 │ ████████████████■│ +│ HASLEMERE │ CHICHESTER │ 223 │ 804173 │ ████████████████ │ +│ PETWORTH │ CHICHESTER │ 288 │ 803206 │ ████████████████ │ +│ TWICKENHAM │ RICHMOND UPON THAMES │ 2194 │ 802616 │ ████████████████ │ +│ WEMBLEY │ BRENT │ 1698 │ 801733 │ ████████████████ │ +│ HINDHEAD │ WAVERLEY │ 233 │ 801482 │ ████████████████ │ +│ LONDON │ BARNET │ 8083 │ 792066 │ ███████████████▋ │ +│ WOKING │ GUILDFORD │ 343 │ 789360 │ ███████████████▋ │ +│ STOCKBRIDGE │ TEST VALLEY │ 318 │ 777909 │ ███████████████▌ │ +│ BERKHAMSTED │ DACORUM │ 1049 │ 776138 │ ███████████████▌ │ +│ MAIDENHEAD │ BUCKINGHAMSHIRE │ 236 │ 775572 │ ███████████████▌ │ +│ SOLIHULL │ STRATFORD-ON-AVON │ 142 │ 770727 │ ███████████████■│ +│ GREAT MISSENDEN │ BUCKINGHAMSHIRE │ 431 │ 764493 │ ███████████████▎ │ +│ TADWORTH │ REIGATE AND BANSTEAD │ 920 │ 757511 │ ███████████████■│ +│ LONDON │ BRENT │ 4124 │ 757194 │ ███████████████■│ +│ THAMES DITTON │ ELMBRIDGE │ 470 │ 750828 │ ███████████████ │ +│ LONDON │ LAMBETH │ 10431 │ 750532 │ ███████████████ │ +│ RICKMANSWORTH │ THREE RIVERS │ 1500 │ 747029 │ ██████████████▊ │ +│ KINGS LANGLEY │ DACORUM │ 281 │ 746536 │ ██████████████▊ │ +│ HARLOW │ EPPING FOREST │ 172 │ 739423 │ ██████████████▋ │ +│ TONBRIDGE │ SEVENOAKS │ 103 │ 738740 │ ██████████████▋ │ +│ BELVEDERE │ BEXLEY │ 686 │ 736385 │ ██████████████▋ │ +│ CRANBROOK │ TUNBRIDGE WELLS │ 769 │ 734328 │ ██████████████▋ │ +│ SOLIHULL │ WARWICK │ 116 │ 733286 │ ██████████████▋ │ +│ ALDERLEY EDGE │ CHESHIRE EAST │ 357 │ 732882 │ ██████████████▋ │ +│ WELWYN │ WELWYN HATFIELD │ 404 │ 730281 │ ██████████████▌ │ +│ CHISLEHURST │ BROMLEY │ 870 │ 730279 │ ██████████████▌ │ +│ LONDON │ HARINGEY │ 6488 │ 726715 │ ██████████████▌ │ +│ AMERSHAM │ BUCKINGHAMSHIRE │ 965 │ 725426 │ ██████████████▌ │ +│ SEVENOAKS │ SEVENOAKS │ 2183 │ 725102 │ ██████████████▌ │ +│ BOURNE END │ BUCKINGHAMSHIRE │ 269 │ 724595 │ ██████████████■│ +│ NORTHWOOD │ HILLINGDON │ 568 │ 722436 │ ██████████████■│ +│ PURFLEET │ THURROCK │ 143 │ 722205 │ ██████████████■│ +│ SLOUGH │ BUCKINGHAMSHIRE │ 832 │ 721529 │ ██████████████■│ +│ INGATESTONE │ BRENTWOOD │ 301 │ 718292 │ ██████████████▎ │ +│ EPSOM │ REIGATE AND BANSTEAD │ 315 │ 709264 │ ██████████████■│ +│ ASHTEAD │ MOLE VALLEY │ 524 │ 708646 │ ██████████████■│ +│ BETCHWORTH │ MOLE VALLEY │ 155 │ 708525 │ ██████████████■│ +│ OXTED │ TANDRIDGE │ 645 │ 706946 │ ██████████████■│ +│ READING │ SOUTH OXFORDSHIRE │ 593 │ 705466 │ ██████████████ │ +│ FELTHAM │ HOUNSLOW │ 1536 │ 703815 │ ██████████████ │ +│ TUNBRIDGE WELLS │ WEALDEN │ 207 │ 703296 │ ██████████████ │ +│ LEWES │ WEALDEN │ 116 │ 701349 │ ██████████████ │ +│ OXFORD │ OXFORD │ 3656 │ 700813 │ ██████████████ │ +│ MAYFIELD │ WEALDEN │ 177 │ 698158 │ █████████████▊ │ +│ PINNER │ HARROW │ 997 │ 697876 │ █████████████▊ │ +│ LECHLADE │ COTSWOLD │ 155 │ 696262 │ █████████████▊ │ +│ WALTON-ON-THAMES │ ELMBRIDGE │ 1850 │ 690102 │ █████████████▋ │ +└──────────────────────┴────────────────────────┴───────┴─────────┴─────────────────────────────────────────────────────────────────┘ +``` + +## プロジェクションを使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’高速化ã—よㆠ{#speedup-with-projections} + +[プロジェクション](../../sql-reference/statements/alter/projection.md)を使用ã™ã‚‹ã¨ã€äº‹å‰é›†ç´„ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’ä»»æ„ã®å½¢å¼ã§ä¿å­˜ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ã‚¯ã‚¨ãƒªé€Ÿåº¦ã‚’å‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€å¹´ã€åœ°åŒºã€ç”ºã”ã¨ã«ç‰©ä»¶ã®å¹³å‡ä¾¡æ ¼ã€ç·ä¾¡æ ¼ã€ã‚«ã‚¦ãƒ³ãƒˆã‚’追跡ã™ã‚‹ãƒ—ロジェクションを作æˆã—ã¾ã™ã€‚クエリ時ã«ã€ClickHouseã¯ãƒ—ロジェクションãŒã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ã¨åˆ¤æ–­ã—ãŸå ´åˆã«ã€ãã®ãƒ—ロジェクションを使用ã—ã¾ã™ï¼ˆãƒ—ロジェクションを使用ã™ã‚‹ãŸã‚ã«ç‰¹åˆ¥ãªæ“作ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“ - ClickHouseãŒæœ‰ç”¨ãªã‚¿ã‚¤ãƒŸãƒ³ã‚°ã‚’判断ã—ã¾ã™ï¼‰ã€‚ + +### プロジェクションã®ä½œæˆ {#build-projection} + +`toYear(date)`, `district`, `town`ã«ã‚ˆã£ã¦é›†ç´„プロジェクションを作æˆã—ã¾ã—ょã†ï¼š + +```sql +ALTER TABLE uk_price_paid + ADD PROJECTION projection_by_year_district_town + ( + SELECT + toYear(date), + district, + town, + avg(price), + sum(price), + count() + GROUP BY + toYear(date), + district, + town + ) +``` + +既存ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ãƒ—ロジェクションを人å£ã—ã¾ã™ã€‚(物質化ã›ãšã«ã€ãƒ—ロジェクションã¯æ–°ã—ã挿入ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«ã®ã¿ä½œæˆã•ã‚Œã¾ã™ï¼‰ï¼š + +```sql +ALTER TABLE uk_price_paid + MATERIALIZE PROJECTION projection_by_year_district_town +SETTINGS mutations_sync = 1 +``` + +## パフォーマンステスト {#test-performance} + +åŒã˜3ã¤ã®ã‚¯ã‚¨ãƒªã‚’å†åº¦å®Ÿè¡Œã—ã¦ã¿ã¾ã—ょã†ï¼š + +### クエリ1. å¹´ã”ã¨ã®å¹³å‡ä¾¡æ ¼ {#average-price-projections} + +```sql +SELECT + toYear(date) AS year, + round(avg(price)) AS price, + bar(price, 0, 1000000, 80) +FROM uk_price_paid +GROUP BY year +ORDER BY year ASC +``` + +çµæžœã¯åŒã˜ã§ã™ãŒã€ãƒ‘フォーマンスãŒå‘上ã—ã¦ã„ã¾ã™ï¼ +```response +No projection: 28 rows in set. Elapsed: 1.775 sec. Processed 27.45 million rows, 164.70 MB (15.47 million rows/s., 92.79 MB/s.) +With projection: 28 rows in set. Elapsed: 0.665 sec. Processed 87.51 thousand rows, 3.21 MB (131.51 thousand rows/s., 4.82 MB/s.) +``` + +### クエリ2. ロンドンã®å¹´ã”ã¨ã®å¹³å‡ä¾¡æ ¼ {#average-price-london-projections} + +```sql +SELECT + toYear(date) AS year, + round(avg(price)) AS price, + bar(price, 0, 2000000, 100) +FROM uk_price_paid +WHERE town = 'LONDON' +GROUP BY year +ORDER BY year ASC +``` + +çµæžœã¯åŒã˜ã§ã™ãŒã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã®æ”¹å–„ã«æ³¨ç›®ã—ã¦ãã ã•ã„: + +```response +No projection: 28 rows in set. Elapsed: 0.720 sec. Processed 27.45 million rows, 46.61 MB (38.13 million rows/s., 64.74 MB/s.) +With projection: 28 rows in set. Elapsed: 0.015 sec. Processed 87.51 thousand rows, 3.51 MB (5.74 million rows/s., 230.24 MB/s.) +``` + +### クエリ3. 最も高価ãªåœ°åŸŸ {#most-expensive-neighborhoods-projections} + +æ¡ä»¶ï¼ˆdate >= '2020-01-01')ã¯ã€ãƒ—ロジェクションã®æ¬¡å…ƒã«ä¸€è‡´ã™ã‚‹ã‚ˆã†ã«ä¿®æ­£ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆ`toYear(date) >= 2020`)。 + +```sql +SELECT + town, + district, + count() AS c, + round(avg(price)) AS price, + bar(price, 0, 5000000, 100) +FROM uk_price_paid +WHERE toYear(date) >= 2020 +GROUP BY + town, + district +HAVING c >= 100 +ORDER BY price DESC +LIMIT 100 +``` + +çµæžœã¯åŒã˜ã§ã™ãŒã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã®æ”¹å–„ã«æ³¨ç›®ã—ã¦ãã ã•ã„: + +```response +No projection: 100 rows in set. Elapsed: 0.928 sec. Processed 27.45 million rows, 103.80 MB (29.56 million rows/s., 111.80 MB/s.) +With projection: 100 rows in set. Elapsed: 0.336 sec. Processed 17.32 thousand rows, 1.23 MB (51.61 thousand rows/s., 3.65 MB/s.) +``` + +### Playgroundã§è©¦ã™ {#playground} + +データセットã¯[オンラインプレイグラウンド](https://sql.clickhouse.com?query_id=TRCWH5ZETY4SEEK8ISCCAX)ã§ã‚‚利用å¯èƒ½ã§ã™ã€‚ diff --git a/docs/ja/getting-started/example-datasets/wikistat.md b/docs/ja/getting-started/example-datasets/wikistat.md new file mode 100644 index 00000000000..1c00e521672 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/wikistat.md @@ -0,0 +1,83 @@ +--- +sidebar_label: WikiStat +--- + +# WikiStat + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯0.5兆件ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +FOSDEM 2023ã®ãƒ“デオをã”覧ãã ã•ã„: https://www.youtube.com/watch?v=JlcI2Vfz_uk + +ãŠã‚ˆã³ãƒ—レゼンテーション: https://presentations.clickhouse.com/fosdem2023/ + +データソース: https://dumps.wikimedia.org/other/pageviews/ + +リンクã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã—ã¾ã™: +``` shell +for i in {2015..2023}; do + for j in {01..12}; do + echo "${i}-${j}" >&2 + curl -sSL "https://dumps.wikimedia.org/other/pageviews/$i/$i-$j/" \ + | grep -oE 'pageviews-[0-9]+-[0-9]+\.gz' + done +done | sort | uniq | tee links.txt +``` + +データをダウンロードã—ã¾ã™: +``` shell +sed -r 's!pageviews-([0-9]{4})([0-9]{2})[0-9]{2}-[0-9]+\.gz!https://dumps.wikimedia.org/other/pageviews/\1/\1-\2/\0!' \ + links.txt | xargs -P3 wget --continue +``` + +(ã“ã‚Œã«ã¯ç´„3æ—¥ã‹ã‹ã‚Šã¾ã™) + +テーブルを作æˆã—ã¾ã™: + +``` sql +CREATE TABLE wikistat +( + time DateTime CODEC(Delta, ZSTD(3)), + project LowCardinality(String), + subproject LowCardinality(String), + path String CODEC(ZSTD(3)), + hits UInt64 CODEC(ZSTD(3)) +) +ENGINE = MergeTree +ORDER BY (path, time); +``` + +データをロードã—ã¾ã™: + +``` shell +clickhouse-local --query " + WITH replaceRegexpOne(_path, '^.+pageviews-(\\d{4})(\\d{2})(\\d{2})-(\\d{2})(\\d{2})(\\d{2}).gz$', '\1-\2-\3 \4-\5-\6')::DateTime AS time, + extractGroups(line, '^([^ \\.]+)(\\.[^ ]+)? +([^ ]+) +(\\d+) +(\\d+)$') AS values + SELECT + time, + values[1] AS project, + values[2] AS subproject, + values[3] AS path, + (values[4])::UInt64 AS hits + FROM file('pageviews*.gz', LineAsString) + WHERE length(values) = 5 FORMAT Native +" | clickhouse-client --query "INSERT INTO wikistat FORMAT Native" +``` + +ã¾ãŸã¯ã‚¯ãƒªãƒ¼ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚’ロードã—ã¾ã™: + +``` sql +INSERT INTO wikistat WITH + parseDateTimeBestEffort(extract(_file, '^pageviews-([\\d\\-]+)\\.gz$')) AS time, + splitByChar(' ', line) AS values, + splitByChar('.', values[1]) AS projects +SELECT + time, + projects[1] AS project, + projects[2] AS subproject, + decodeURLComponent(values[2]) AS path, + CAST(values[3], 'UInt64') AS hits +FROM s3( + 'https://clickhouse-public-datasets.s3.amazonaws.com/wikistat/original/pageviews*.gz', + LineAsString) +WHERE length(values) >= 3 +``` diff --git a/docs/ja/getting-started/example-datasets/youtube-dislikes.md b/docs/ja/getting-started/example-datasets/youtube-dislikes.md new file mode 100644 index 00000000000..7ee76573aa8 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/youtube-dislikes.md @@ -0,0 +1,482 @@ +--- +slug: /ja/getting-started/example-datasets/youtube-dislikes +sidebar_label: YouTube Dislikes +description: YouTubeå‹•ç”»ã®å«Œã„ã®æ•°ã«é–¢ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ã€‚ +--- + +# YouTubeã®å«Œã„数データセット + +2021å¹´11月ã€YouTubeã¯ã™ã¹ã¦ã®å‹•ç”»ã‹ã‚‰å…¬ã«è¡¨ç¤ºã•ã‚Œã‚‹***å«Œã„***ã®æ•°ã‚’éžè¡¨ç¤ºã«ã—ã¾ã—ãŸã€‚クリエイターã¯å«Œã„ã®æ•°ã‚’見るã“ã¨ãŒã§ãã¾ã™ãŒã€è¦–è´è€…ã¯å‹•ç”»ãŒå—ã‘å–ã£ãŸ***ã„ã„ã­***ã®æ•°ã ã‘を見るã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::important +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ã€45.5億以上ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒã‚ã‚‹ãŸã‚ã€ä¸‹è¨˜ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’リソースã®è¨±å®¹ç¯„囲を超ãˆã¦ã‚³ãƒ”ー&ペーストã—ãªã„よã†ã«æ³¨æ„ã—ã¦ãã ã•ã„。下記ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€[ClickHouse Cloud](https://clickhouse.cloud) ã®**Production**インスタンスã§å®Ÿè¡Œã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +データã¯JSONå½¢å¼ã§ã‚ã‚Šã€[archive.org](https://archive.org/download/dislikes_youtube_2021_12_video_json_files) ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’S3ã«æä¾›ã—ã¦ãŠã‚Šã€ClickHouse Cloudインスタンスã«åŠ¹çŽ‡çš„ã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ + +ClickHouse Cloudã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹æ‰‹é †ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ã€‚ + +:::note +以下ã®æ‰‹é †ã¯ã€ClickHouseã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ã‚‚ç°¡å˜ã«å‹•ä½œã—ã¾ã™ã€‚唯一ã®å¤‰æ›´ã¯ã€`s3cluster` ã®ä»£ã‚ã‚Šã« `s3` 関数を使用ã™ã‚‹ç‚¹ã§ã™ï¼ˆã‚¯ãƒ©ã‚¹ã‚¿ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€`default` をクラスタã®åå‰ã«å¤‰æ›´ã—ã¦ãã ã•ã„)。 +::: + +## 手順 + +1. データã®å†…容を確èªã—ã¾ã—ょã†ã€‚`s3cluster` テーブル関数ã¯ãƒ†ãƒ¼ãƒ–ルを返ã™ãŸã‚ã€çµæžœã‚’ `DESCRIBE` ã§ãã¾ã™ã€‚ + +```sql +DESCRIBE s3( + 'https://clickhouse-public-datasets.s3.amazonaws.com/youtube/original/files/*.zst', + 'JSONLines' +); +``` + +ClickHouseã¯JSONファイルã‹ã‚‰æ¬¡ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’推測ã—ã¾ã™ã€‚ + +```response +┌─name────────────────┬─type───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ id │ Nullable(String) │ │ │ │ │ │ +│ fetch_date │ Nullable(String) │ │ │ │ │ │ +│ upload_date │ Nullable(String) │ │ │ │ │ │ +│ title │ Nullable(String) │ │ │ │ │ │ +│ uploader_id │ Nullable(String) │ │ │ │ │ │ +│ uploader │ Nullable(String) │ │ │ │ │ │ +│ uploader_sub_count │ Nullable(Int64) │ │ │ │ │ │ +│ is_age_limit │ Nullable(Bool) │ │ │ │ │ │ +│ view_count │ Nullable(Int64) │ │ │ │ │ │ +│ like_count │ Nullable(Int64) │ │ │ │ │ │ +│ dislike_count │ Nullable(Int64) │ │ │ │ │ │ +│ is_crawlable │ Nullable(Bool) │ │ │ │ │ │ +│ is_live_content │ Nullable(Bool) │ │ │ │ │ │ +│ has_subtitles │ Nullable(Bool) │ │ │ │ │ │ +│ is_ads_enabled │ Nullable(Bool) │ │ │ │ │ │ +│ is_comments_enabled │ Nullable(Bool) │ │ │ │ │ │ +│ description │ Nullable(String) │ │ │ │ │ │ +│ rich_metadata │ Array(Tuple(call Nullable(String), content Nullable(String), subtitle Nullable(String), title Nullable(String), url Nullable(String))) │ │ │ │ │ │ +│ super_titles │ Array(Tuple(text Nullable(String), url Nullable(String))) │ │ │ │ │ │ +│ uploader_badges │ Nullable(String) │ │ │ │ │ │ +│ video_badges │ Nullable(String) │ │ │ │ │ │ +└─────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +2. 推測ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã«åŸºã¥ã„ã¦ãƒ‡ãƒ¼ã‚¿åž‹ã‚’æ•´ç†ã—ã€ä¸»ã‚­ãƒ¼ã‚’追加ã—ã¾ã—ãŸã€‚次ã®ãƒ†ãƒ¼ãƒ–ルを定義ã—ã¾ã™ã€‚ + +```sql +CREATE TABLE youtube +( + `id` String, + `fetch_date` DateTime, + `upload_date_str` String, + `upload_date` Date, + `title` String, + `uploader_id` String, + `uploader` String, + `uploader_sub_count` Int64, + `is_age_limit` Bool, + `view_count` Int64, + `like_count` Int64, + `dislike_count` Int64, + `is_crawlable` Bool, + `has_subtitles` Bool, + `is_ads_enabled` Bool, + `is_comments_enabled` Bool, + `description` String, + `rich_metadata` Array(Tuple(call String, content String, subtitle String, title String, url String)), + `super_titles` Array(Tuple(text String, url String)), + `uploader_badges` String, + `video_badges` String +) +ENGINE = MergeTree +ORDER BY (uploader, upload_date) +``` + +3. 次ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€S3ファイルã‹ã‚‰ `youtube` テーブルã«ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’ストリームã—ã¾ã™ã€‚ + +:::important +ã“ã‚Œã¯å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ - 46.5å„„è¡Œã§ã™ã€‚ã‚‚ã—ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’å¿…è¦ã¨ã—ãªã„å ´åˆã¯ã€`LIMIT`クローズを使用ã—ã¦å¸Œæœ›ã®è¡Œæ•°ã‚’指定ã—ã¦ãã ã•ã„。 +::: + +```sql +INSERT INTO youtube +SETTINGS input_format_null_as_default = 1 +SELECT + id, + parseDateTimeBestEffortUSOrZero(toString(fetch_date)) AS fetch_date, + upload_date AS upload_date_str, + toDate(parseDateTimeBestEffortUSOrZero(upload_date::String)) AS upload_date, + ifNull(title, '') AS title, + uploader_id, + ifNull(uploader, '') AS uploader, + uploader_sub_count, + is_age_limit, + view_count, + like_count, + dislike_count, + is_crawlable, + has_subtitles, + is_ads_enabled, + is_comments_enabled, + ifNull(description, '') AS description, + rich_metadata, + super_titles, + ifNull(uploader_badges, '') AS uploader_badges, + ifNull(video_badges, '') AS video_badges +FROM s3( + 'https://clickhouse-public-datasets.s3.amazonaws.com/youtube/original/files/*.zst', + 'JSONLines' +) +``` + +ã“ã® `INSERT` コマンドã«é–¢ã™ã‚‹ã„ãã¤ã‹ã®ã‚³ãƒ¡ãƒ³ãƒˆï¼š + +- `parseDateTimeBestEffortUSOrZero` 関数ã¯ã€æ—¥ä»˜ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒé©åˆ‡ãªå½¢å¼ã§ãªã„å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚`fetch_date` ãŒé©åˆ‡ã«è§£æžã•ã‚Œãªã„å ´åˆã¯ã€`0` ã«è¨­å®šã•ã‚Œã¾ã™ +- `upload_date` カラムã«ã¯æœ‰åŠ¹ãªæ—¥ä»˜ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€"4 hours ago" ã®ã‚ˆã†ãªæ–‡å­—列もå«ã¾ã‚Œã¦ãŠã‚Šã€æœ‰åŠ¹ãªæ—¥ä»˜ã¨ã¯è¨€ãˆã¾ã›ã‚“。ã“ã®ãŸã‚ã€å…ƒã®å€¤ã‚’ `upload_date_str` ã«ä¿å­˜ã—ã€`toDate(parseDateTimeBestEffortUSOrZero(upload_date::String))` ã§è§£æžã‚’試ã¿ã¾ã™ã€‚解æžã«å¤±æ•—ã—ãŸå ´åˆã¯ã€å˜ã« `0` ã‚’å–å¾—ã—ã¾ã™ +- `ifNull` 関数を使用ã—ã¦ã€ãƒ†ãƒ¼ãƒ–ル㫠`NULL` 値ãŒå…¥ã‚‰ãªã„よã†ã«ã—ã¦ã„ã¾ã™ã€‚入力値㌠`NULL` ã®å ´åˆã€`ifNull` 関数ã¯ç©ºã®æ–‡å­—列ã«è¨­å®šã—ã¾ã™ + +4. ClickHouse Cloudã®SQLコンソールã«æ–°ã—ã„タブを開ãã‹ã€æ–°ã—ã„ `clickhouse-client` ウィンドウを開ãã€ã‚«ã‚¦ãƒ³ãƒˆãŒå¢—ãˆã‚‹æ§˜å­ã‚’観察ã—ã¾ã™ã€‚4.56B行を挿入ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®ãƒªã‚½ãƒ¼ã‚¹ã«å¿œã˜ã¦æ™‚é–“ãŒã‹ã‹ã‚‹ã§ã—ょã†ã€‚(設定を調整ã›ãšã«ã€ç´„4.5時間ã‹ã‹ã‚Šã¾ã™ã€‚) + +```sql +SELECT formatReadableQuantity(count()) +FROM youtube +``` + +```response +┌─formatReadableQuantity(count())─┠+│ 4.56 billion │ +└─────────────────────────────────┘ +``` + +5. データãŒæŒ¿å…¥ã•ã‚ŒãŸã‚‰ã€ãŠæ°—ã«å…¥ã‚Šã®å‹•ç”»ã‚„ãƒãƒ£ãƒ³ãƒãƒ«ã®å«Œã„ã®æ•°ã‚’確èªã—ã¦ã¿ã¾ã—ょã†ã€‚ClickHouseã«ã‚ˆã£ã¦ã‚¢ãƒƒãƒ—ロードã•ã‚ŒãŸå‹•ç”»ã®æ•°ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +SELECT count() +FROM youtube +WHERE uploader = 'ClickHouse'; +``` + +```response +┌─count()─┠+│ 84 │ +└─────────┘ + +1 row in set. Elapsed: 0.570 sec. Processed 237.57 thousand rows, 5.77 MB (416.54 thousand rows/s., 10.12 MB/s.) +``` + +:::note +上記ã®ã‚¯ã‚¨ãƒªã¯ã€`uploader` を主キーã®æœ€åˆã®ã‚«ãƒ©ãƒ ã¨ã—ã¦é¸ã‚“ã ãŸã‚éžå¸¸ã«è¿…速ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ãã®ãŸã‚ã€237kè¡Œã ã‘を処ç†ã—ã¾ã—ãŸã€‚ +::: + +6. ClickHouseå‹•ç”»ã®ã„ã„ã­ã¨å«Œã„を見ã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +SELECT + title, + like_count, + dislike_count +FROM youtube +WHERE uploader = 'ClickHouse' +ORDER BY dislike_count DESC; +``` + +レスãƒãƒ³ã‚¹ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + +```response +┌─title────────────────────────────────────────────────────────────────────────────────────────────────┬─like_count─┬─dislike_count─┠+│ ClickHouse v21.11 Release Webinar │ 52 │ 3 │ +│ ClickHouse Introduction │ 97 │ 3 │ +│ Casa Modelo Algarve │ 180 │ 3 │ +│ Профайлер запроÑов: трудный путь │ 33 │ 3 │ +│ ClickHouse в КурÑометре │ 4 │ 2 │ +│ 10 Good Reasons to Use ClickHouse │ 27 │ 2 │ +... + +84 rows in set. Elapsed: 0.013 sec. Processed 155.65 thousand rows, 16.94 MB (11.96 million rows/s., 1.30 GB/s.) +``` + +7. `title` ã¾ãŸã¯ `description` フィールド㫠**ClickHouse** ãŒå«ã¾ã‚Œã‚‹å‹•ç”»ã‚’検索ã—ã¾ã™ã€‚ + +```sql +SELECT + view_count, + like_count, + dislike_count, + concat('https://youtu.be/', id) AS url, + title +FROM youtube +WHERE (title ILIKE '%ClickHouse%') OR (description ILIKE '%ClickHouse%') +ORDER BY + like_count DESC, + view_count DESC; +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã™ã¹ã¦ã®è¡Œã‚’処ç†ã—ã€ã‹ã¤2ã¤ã®æ–‡å­—列カラムを解æžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã‚Œã§ã‚‚ã€1秒ã‚ãŸã‚Š4.15Mè¡Œã®å‡¦ç†é€Ÿåº¦ã§ãã“ãã“ã®ãƒ‘フォーマンスを得るã“ã¨ãŒã§ãã¾ã™ã€‚ + +```response +1174 rows in set. Elapsed: 1099.368 sec. Processed 4.56 billion rows, 1.98 TB (4.15 million rows/s., 1.80 GB/s.) +``` + +çµæžœã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + +```response +┌─view_count─┬─like_count─┬─dislike_count─┬─url──────────────────────────┬─title──────────────────────────────────────────────────────────────────────────────────────────────────┠+│ 1919 │ 63 │ 1 │ https://youtu.be/b9MeoOtAivQ │ ClickHouse v21.10 Release Webinar │ +│ 8710 │ 62 │ 4 │ https://youtu.be/PeV1mC2z--M │ What is JDBC DriverManager? | JDBC │ +│ 3534 │ 62 │ 1 │ https://youtu.be/8nWRhK9gw10 │ CLICKHOUSE - Arquitetura Modular │ +``` + +## è³ªå• + +### コメントを無効ã«ã™ã‚‹ã¨ã€å®Ÿéš›ã«ã„ã„ã­ã‚„å«Œã„をクリックã™ã‚‹å¯èƒ½æ€§ã¯ä½Žããªã‚‹ã§ã—ょã†ã‹ï¼Ÿ + +コメントãŒç„¡åŠ¹ã«ãªã£ãŸå ´åˆã€å‹•ç”»ã«å¯¾ã™ã‚‹æ„Ÿæƒ…を表ç¾ã™ã‚‹ãŸã‚ã«ã„ã„ã­ã‚„å«Œã„をクリックã™ã‚‹å¯èƒ½æ€§ã¯é«˜ããªã‚‹ã§ã—ょã†ã‹ï¼Ÿ + +```sql +SELECT + concat('< ', formatReadableQuantity(view_range)) AS views, + is_comments_enabled, + total_clicks / num_views AS prob_like_dislike +FROM +( + SELECT + is_comments_enabled, + power(10, CEILING(log10(view_count + 1))) AS view_range, + sum(like_count + dislike_count) AS total_clicks, + sum(view_count) AS num_views + FROM youtube + GROUP BY + view_range, + is_comments_enabled +) WHERE view_range > 1 +ORDER BY + is_comments_enabled ASC, + num_views ASC; +``` + +```response +┌─views─────────────┬─is_comments_enabled─┬────prob_like_dislike─┠+│ < 10.00 │ false │ 0.08224180712685371 │ +│ < 100.00 │ false │ 0.06346337759167248 │ +│ < 1.00 thousand │ false │ 0.03201883652987105 │ +│ < 10.00 thousand │ false │ 0.01716073540410903 │ +│ < 10.00 billion │ false │ 0.004555639481829971 │ +│ < 100.00 thousand │ false │ 0.01293351460515323 │ +│ < 1.00 billion │ false │ 0.004761811192464957 │ +│ < 1.00 million │ false │ 0.010472604018980551 │ +│ < 10.00 million │ false │ 0.00788902538420125 │ +│ < 100.00 million │ false │ 0.00579152804250582 │ +│ < 10.00 │ true │ 0.09819517478134059 │ +│ < 100.00 │ true │ 0.07403784478585775 │ +│ < 1.00 thousand │ true │ 0.03846294910067627 │ +│ < 10.00 billion │ true │ 0.005615217329358215 │ +│ < 10.00 thousand │ true │ 0.02505881391701455 │ +│ < 1.00 billion │ true │ 0.007434998802482997 │ +│ < 100.00 thousand │ true │ 0.022694648130822004 │ +│ < 100.00 million │ true │ 0.011761563746575625 │ +│ < 1.00 million │ true │ 0.020776022304589435 │ +│ < 10.00 million │ true │ 0.016917095718089584 │ +└───────────────────┴─────────────────────┴──────────────────────┘ + +22 rows in set. Elapsed: 8.460 sec. Processed 4.56 billion rows, 77.48 GB (538.73 million rows/s., 9.16 GB/s.) +``` + +コメントãŒæœ‰åŠ¹ãªæ–¹ãŒã€ã‚¨ãƒ³ã‚²ãƒ¼ã‚¸ãƒ¡ãƒ³ãƒˆçŽ‡ãŒé«˜ã„ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ + +### 時間ã®çµŒéŽã«ä¼´ã†å‹•ç”»æ•°ã®å¤‰åŒ– - 特ã«æ³¨ç›®ã™ã¹ãイベント + +```sql +SELECT + toStartOfMonth(toDateTime(upload_date)) AS month, + uniq(uploader_id) AS uploaders, + count() as num_videos, + sum(view_count) as view_count +FROM youtube +GROUP BY month +ORDER BY month ASC; +``` + +```response +┌──────month─┬─uploaders─┬─num_videos─┬───view_count─┠+│ 2005-04-01 │ 5 │ 6 │ 213597737 │ +│ 2005-05-01 │ 6 │ 9 │ 2944005 │ +│ 2005-06-01 │ 165 │ 351 │ 18624981 │ +│ 2005-07-01 │ 395 │ 1168 │ 94164872 │ +│ 2005-08-01 │ 1171 │ 3128 │ 124540774 │ +│ 2005-09-01 │ 2418 │ 5206 │ 475536249 │ +│ 2005-10-01 │ 6750 │ 13747 │ 737593613 │ +│ 2005-11-01 │ 13706 │ 28078 │ 1896116976 │ +│ 2005-12-01 │ 24756 │ 49885 │ 2478418930 │ +│ 2006-01-01 │ 49992 │ 100447 │ 4532656581 │ +│ 2006-02-01 │ 67882 │ 138485 │ 5677516317 │ +│ 2006-03-01 │ 103358 │ 212237 │ 8430301366 │ +│ 2006-04-01 │ 114615 │ 234174 │ 9980760440 │ +│ 2006-05-01 │ 152682 │ 332076 │ 14129117212 │ +│ 2006-06-01 │ 193962 │ 429538 │ 17014143263 │ +│ 2006-07-01 │ 234401 │ 530311 │ 18721143410 │ +│ 2006-08-01 │ 281280 │ 614128 │ 20473502342 │ +│ 2006-09-01 │ 312434 │ 679906 │ 23158422265 │ +│ 2006-10-01 │ 404873 │ 897590 │ 27357846117 │ +``` + +[covidã®å‘¨ã‚Šã§ã®ã‚¢ãƒƒãƒ—ローダーã®ã‚¹ãƒ‘イクãŒé¡•è‘—ã§ã™](https://www.theverge.com/2020/3/27/21197642/youtube-with-me-style-videos-views-coronavirus-cook-workout-study-home-beauty)。 + +### 時間ã®çµŒéŽã«ä¼´ã†å­—幕ã®å¢—加 + +音声èªè­˜ã®é€²æ­©ã«ã‚ˆã‚Šã€å‹•ç”»ã«å­—幕を追加ã™ã‚‹ã“ã¨ãŒã“ã‚Œã¾ã§ä»¥ä¸Šã«ç°¡å˜ã«ãªã‚Šã¾ã—ãŸã€‚YouTubeãŒè‡ªå‹•å­—幕機能をæä¾›ã—始ã‚ãŸã®ã¯2009å¹´ã®å¾ŒåŠã§ã™ã€‚ãã“ã‹ã‚‰ã‚¸ãƒ£ãƒ³ãƒ—ãŒã‚ã£ãŸã®ã§ã—ょã†ã‹ï¼Ÿ + +```sql +SELECT + toStartOfMonth(upload_date) AS month, + countIf(has_subtitles) / count() AS percent_subtitles, + percent_subtitles - any(percent_subtitles) OVER ( + ORDER BY month ASC ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING + ) AS previous +FROM youtube +GROUP BY month +ORDER BY month ASC; +``` + +```response +┌──────month─┬───percent_subtitles─┬────────────────previous─┠+│ 2015-01-01 │ 0.2652653881082824 │ 0.2652653881082824 │ +│ 2015-02-01 │ 0.3147556050309162 │ 0.049490216922633834 │ +│ 2015-03-01 │ 0.32460464492371877 │ 0.009849039892802558 │ +│ 2015-04-01 │ 0.33471963051468445 │ 0.010114985590965686 │ +│ 2015-05-01 │ 0.3168087575501062 │ -0.017910872964578273 │ +│ 2015-06-01 │ 0.3162609788438222 │ -0.0005477787062839745 │ +│ 2015-07-01 │ 0.31828767677518033 │ 0.0020266979313581235 │ +│ 2015-08-01 │ 0.3045551564286859 │ -0.013732520346494415 │ +│ 2015-09-01 │ 0.311221133995152 │ 0.006665977566466086 │ +│ 2015-10-01 │ 0.30574870926812175 │ -0.005472424727030245 │ +│ 2015-11-01 │ 0.31125409712077234 │ 0.0055053878526505895 │ +│ 2015-12-01 │ 0.3190967954651779 │ 0.007842698344405541 │ +│ 2016-01-01 │ 0.32636021432496176 │ 0.007263418859783877 │ +``` + +データã®çµæžœã¯2009å¹´ã«ã‚¹ãƒ‘イクを示ã—ã¦ã„ã¾ã™ã€‚ã©ã†ã‚„らãã®æ™‚点ã§ã€YouTubeã¯ä»–ã®äººã®å‹•ç”»ã«å­—幕をアップロードã§ãるコミュニティ字幕機能を削除ã—ã¦ã„ã¾ã—ãŸã€‚ +ã“ã‚Œã«ã‚ˆã‚Šã€ãƒãƒ¼ãƒ‰ã‚ªãƒ–ヒアリングやè´è¦šéšœå®³ã®ã‚る視è´è€…ã®ãŸã‚ã«ã€ã‚¯ãƒªã‚¨ã‚¤ã‚¿ãƒ¼ãŒå‹•ç”»ã«ã‚­ãƒ£ãƒ—ションを追加ã™ã‚‹ã“ã¨ã‚’求ã‚ã‚‹éžå¸¸ã«åŠ¹æžœçš„ãªã‚­ãƒ£ãƒ³ãƒšãƒ¼ãƒ³ãŒä¿ƒã•ã‚Œã¾ã—ãŸã€‚ + +### 時間ã®çµŒéŽã«ä¼´ã†ãƒˆãƒƒãƒ—ã®ã‚¢ãƒƒãƒ—ローダー + +```sql +WITH uploaders AS + ( + SELECT uploader + FROM youtube + GROUP BY uploader + ORDER BY sum(view_count) DESC + LIMIT 10 + ) +SELECT + month, + uploader, + sum(view_count) AS total_views, + avg(dislike_count / like_count) AS like_to_dislike_ratio +FROM youtube +WHERE uploader IN (uploaders) +GROUP BY + toStartOfMonth(upload_date) AS month, + uploader +ORDER BY + month ASC, + total_views DESC; +``` + +```response +┌──────month─┬─uploader───────────────────┬─total_views─┬─like_to_dislike_ratio─┠+│ 1970-01-01 │ T-Series │ 10957099 │ 0.022784656361208206 │ +│ 1970-01-01 │ Ryan's World │ 0 │ 0.003035559410234172 │ +│ 1970-01-01 │ SET India │ 0 │ nan │ +│ 2006-09-01 │ Cocomelon - Nursery Rhymes │ 256406497 │ 0.7005566715978622 │ +│ 2007-06-01 │ Cocomelon - Nursery Rhymes │ 33641320 │ 0.7088650914344298 │ +│ 2008-02-01 │ WWE │ 43733469 │ 0.07198856488734842 │ +│ 2008-03-01 │ WWE │ 16514541 │ 0.1230603715431997 │ +│ 2008-04-01 │ WWE │ 5907295 │ 0.2089399470159618 │ +│ 2008-05-01 │ WWE │ 7779627 │ 0.09101676560436774 │ +│ 2008-06-01 │ WWE │ 7018780 │ 0.0974184753155297 │ +│ 2008-07-01 │ WWE │ 4686447 │ 0.1263845422065158 │ +│ 2008-08-01 │ WWE │ 4514312 │ 0.08384574274791441 │ +│ 2008-09-01 │ WWE │ 3717092 │ 0.07872802579349912 │ +``` + +### 視è´æ•°ãŒä¸ŠãŒã‚‹ã«ã¤ã‚Œã¦å¥½æ„Ÿåº¦ãŒã©ã†å¤‰åŒ–ã™ã‚‹ã‹ï¼Ÿ + +```sql +SELECT + concat('< ', formatReadableQuantity(view_range)) AS view_range, + is_comments_enabled, + round(like_ratio, 2) AS like_ratio +FROM +( +SELECT + power(10, CEILING(log10(view_count + 1))) as view_range, + is_comments_enabled, + avg(like_count / dislike_count) as like_ratio +FROM youtube WHERE dislike_count > 0 +GROUP BY + view_range, + is_comments_enabled HAVING view_range > 1 +ORDER BY + view_range ASC, + is_comments_enabled ASC +); +``` + +```response +┌─view_range────────┬─is_comments_enabled─┬─like_ratio─┠+│ < 10.00 │ false │ 0.66 │ +│ < 10.00 │ true │ 0.66 │ +│ < 100.00 │ false │ 3 │ +│ < 100.00 │ true │ 3.95 │ +│ < 1.00 thousand │ false │ 8.45 │ +│ < 1.00 thousand │ true │ 13.07 │ +│ < 10.00 thousand │ false │ 18.57 │ +│ < 10.00 thousand │ true │ 30.92 │ +│ < 100.00 thousand │ false │ 23.55 │ +│ < 100.00 thousand │ true │ 42.13 │ +│ < 1.00 million │ false │ 19.23 │ +│ < 1.00 million │ true │ 37.86 │ +│ < 10.00 million │ false │ 12.13 │ +│ < 10.00 million │ true │ 30.72 │ +│ < 100.00 million │ false │ 6.67 │ +│ < 100.00 million │ true │ 23.32 │ +│ < 1.00 billion │ false │ 3.08 │ +│ < 1.00 billion │ true │ 20.69 │ +│ < 10.00 billion │ false │ 1.77 │ +│ < 10.00 billion │ true │ 19.5 │ +└───────────────────┴─────────────────────┴────────────┘ +``` + +### 視è´æ•°ã®åˆ†å¸ƒã¯ã©ã†ãªã£ã¦ã„ã¾ã™ã‹ï¼Ÿ + +```sql +SELECT + labels AS percentile, + round(quantiles) AS views +FROM +( + SELECT + quantiles(0.999, 0.99, 0.95, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1)(view_count) AS quantiles, + ['99.9th', '99th', '95th', '90th', '80th', '70th','60th', '50th', '40th', '30th', '20th', '10th'] AS labels + FROM youtube +) +ARRAY JOIN + quantiles, + labels; +``` + +```response +┌─percentile─┬───views─┠+│ 99.9th │ 1216624 │ +│ 99th │ 143519 │ +│ 95th │ 13542 │ +│ 90th │ 4054 │ +│ 80th │ 950 │ +│ 70th │ 363 │ +│ 60th │ 177 │ +│ 50th │ 97 │ +│ 40th │ 57 │ +│ 30th │ 32 │ +│ 20th │ 16 │ +│ 10th │ 6 │ +└────────────┴─────────┘ +``` diff --git a/docs/ja/getting-started/index.md b/docs/ja/getting-started/index.md new file mode 100644 index 00000000000..ee5df3882bd --- /dev/null +++ b/docs/ja/getting-started/index.md @@ -0,0 +1,29 @@ +--- +slug: /ja/getting-started/example-datasets/ +sidebar_position: 0 +sidebar_label: æ¦‚è¦ +keywords: [clickhouse, インストール, ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«, サンプル, データセット] +pagination_next: 'en/tutorial' +--- + +# ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã¨ã‚µãƒ³ãƒ—ルデータセット + +ClickHouseã®å§‹ã‚方や動作を学ã¶ãŸã‚ã®ãƒªã‚½ãƒ¼ã‚¹ãŒè±Šå¯Œã«ã‚ã‚Šã¾ã™ã€‚ + +- ClickHouseã‚’ã™ãã«ä½¿ç”¨é–‹å§‹ã™ã‚‹å ´åˆã¯ã€[クイックスタート](../quick-start.mdx)ã‚’ã”覧ãã ã•ã„。 +- [ClickHouseãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«](../tutorial.md)ã§ã¯ã€ãƒ‹ãƒ¥ãƒ¼ãƒ¨ãƒ¼ã‚¯å¸‚ã®ã‚¿ã‚¯ã‚·ãƒ¼ä¹—車データセットを分æžã—ã¦ã„ã¾ã™ã€‚ + +ã•ã‚‰ã«ã€ã‚µãƒ³ãƒ—ルデータセットを使用ã™ã‚‹ã¨ã€ClickHouseã§ã®ä½œæ¥­ä½“験を深ã‚ã€é‡è¦ãªæŠ€è¡“やコツを学ã³ã€å¤šãã®å¼·åŠ›ãªæ©Ÿèƒ½ã‚’活用ã™ã‚‹æ–¹æ³•ã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚サンプルデータセットã«ã¯ä»¥ä¸‹ãŒã‚ã‚Šã¾ã™ï¼š + +- [英国ã®ä¸å‹•ç”£ä¾¡æ ¼æ”¯æ‰•ã„データセット](../getting-started/example-datasets/uk-price-paid.md)ã¯ã€èˆˆå‘³æ·±ã„SQLクエリをå«ã‚€è‰¯ã„出発点ã§ã™ã€‚ +- [ニューヨークタクシーデータ](../getting-started/example-datasets/nyc-taxi.md)ã§ã¯ã€S3ã‹ã‚‰ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ä¾‹ãŒã‚ã‚Šã¾ã™ã€‚ +- [æºå¸¯åŸºåœ°å±€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ](../getting-started/example-datasets/cell-towers.md)ã¯ã€CSVã‚’ClickHouseã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +- [NYPD苦情データ](../getting-started/example-datasets/nypd_complaint_data.md)ã¯ã€ãƒ‡ãƒ¼ã‚¿æŽ¨è«–を使用ã—ã¦ãƒ†ãƒ¼ãƒ–ル作æˆã‚’簡素化ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ +- [「What's on the Menu?ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ](../getting-started/example-datasets/menus.md)ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®éžæ­£è¦åŒ–ã®ä¾‹ãŒã‚ã‚Šã¾ã™ã€‚ +- [Laionデータセット](../getting-started/example-datasets/laion.md)ã«ã¯ã€[近似最近å‚検索インデックス](../engines/table-engines/mergetree-family/annindexes.md)ã®ä½¿ç”¨ä¾‹ãŒã‚ã‚Šã¾ã™ã€‚ +- 分æžç”¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®æ¥­ç•ŒåŸºæº–ã§ã‚ã‚‹[TPC-H](../getting-started/example-datasets/tpch.md)ã€[TPC-DS](../getting-started/example-datasets/tpcds.md)ã€[スター・スキーマ (SSB)](../getting-started/example-datasets/star-schema.md) +- [ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿æŠ•å…¥ - パート1](https://clickhouse.com/blog/getting-data-into-clickhouse-part-1)ã§ã¯ã€ã‚¹ã‚­ãƒ¼ãƒžã®å®šç¾©ã¨å°è¦æ¨¡ãªHacker Newsデータセットã®ãƒ­ãƒ¼ãƒ‰ä¾‹ã‚’紹介ã—ã¦ã„ã¾ã™ã€‚ +- [ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿æŠ•å…¥ - パート3 - S3ã®ä½¿ç”¨](https://clickhouse.com/blog/getting-data-into-clickhouse-part-3-s3)ã«ã¯ã€S3ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ä¾‹ãŒã‚ã‚Šã¾ã™ã€‚ +- [ClickHouseã§ã®ãƒ©ãƒ³ãƒ€ãƒ ãƒ‡ãƒ¼ã‚¿ç”Ÿæˆ](https://clickhouse.com/blog/generating-random-test-distribution-data-for-clickhouse)ã§ã¯ã€ä¸Šè¨˜ã®ã„ãšã‚Œã‚‚é©åˆã—ãªã„å ´åˆã«ãƒ©ãƒ³ãƒ€ãƒ ãƒ‡ãƒ¼ã‚¿ã‚’生æˆã™ã‚‹æ–¹æ³•ã‚’紹介ã—ã¦ã„ã¾ã™ã€‚ + +**ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã¨ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ**メニューã§ã€ã‚µãƒ³ãƒ—ルデータセットã®å®Œå…¨ãªãƒªã‚¹ãƒˆã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/getting-started/install.md b/docs/ja/getting-started/install.md new file mode 100644 index 00000000000..0f48b9835f1 --- /dev/null +++ b/docs/ja/getting-started/install.md @@ -0,0 +1,426 @@ +--- +sidebar_label: インストール +keywords: [clickhouse, install, getting started, quick start] +description: ClickHouseã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« +slug: /ja/install +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + +# ClickHouseをインストール + +ClickHouseã‚’ã™ãã«åˆ©ç”¨ã—始ã‚ã‚‹ãŸã‚ã«ã¯ã€ä»¥ä¸‹ã®4ã¤ã®ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ï¼š + +- **[ClickHouse Cloud](https://clickhouse.com/cloud/):** ClickHouseã®é–‹ç™ºè€…ã«ã‚ˆã£ã¦æ§‹ç¯‰ã€ç¶­æŒã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹å…¬å¼ã®ClickHouse as a Service +- **[クイックインストール](#quick-install):** ClickHouseã®ãƒ†ã‚¹ãƒˆã‚„開発ã®ãŸã‚ã®ç°¡å˜ã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰å¯èƒ½ãªãƒã‚¤ãƒŠãƒª +- **[プロダクションå‘ã‘デプロイメント](#available-installation-options):** ClickHouseã¯ã€x86-64ã€æœ€æ–°ã®ARM (ARMv8.2-A以é™)ã€ã¾ãŸã¯PowerPC64LE CPUアーキテクãƒãƒ£ã‚’æŒã¤ä»»æ„ã®Linuxã€FreeBSDã€ã¾ãŸã¯macOSã§å‹•ä½œå¯èƒ½ +- **[Dockerイメージ](https://hub.docker.com/r/clickhouse/clickhouse-server/):** Docker Hubã«ã‚ã‚‹å…¬å¼ã®Dockerイメージを使用 + +## ClickHouse Cloud + +ClickHouseを迅速ã‹ã¤ç°¡å˜ã«åˆ©ç”¨ã—始ã‚る方法ã¯ã€[ClickHouse Cloud](https://clickhouse.cloud/)ã§æ–°ã—ã„サービスを作æˆã™ã‚‹ã“ã¨ã§ã™ã€‚ + +## クイックインストール + +:::tip +特定ã®ãƒªãƒªãƒ¼ã‚¹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ—ロダクションインストールã«ã¤ã„ã¦ã¯ã€ä»¥ä¸‹ã®[インストールオプション](#available-installation-options)ã‚’ã”覧ãã ã•ã„。 +::: + +Linuxã€macOSã€FreeBSDã§ã¯ï¼š + +1. 始ã‚ãŸã°ã‹ã‚Šã§ClickHouseã®æ©Ÿèƒ½ã‚’確èªã—ãŸã„å ´åˆã€æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¦ClickHouseをローカルã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ã§ã™ã€‚ã”利用ã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ç”¨ã®å˜ä¸€ãƒã‚¤ãƒŠãƒªãŒãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã€ãれを使ã£ã¦ClickHouseサーãƒãƒ¼ã‚„`clickhouse-client`ã€`clickhouse-local`ã€ClickHouse Keeperã€ãã®ä»–ã®ãƒ„ールを実行ã§ãã¾ã™ï¼š + + ```bash + curl https://clickhouse.com/ | sh + ``` + +2. [clickhouse-local](../operations/utilities/clickhouse-local.md)ã‚’èµ·å‹•ã™ã‚‹ãŸã‚ã«æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + + ```bash + ./clickhouse + ``` + + `clickhouse-local`ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«ãŠã‚ˆã³ãƒªãƒ¢ãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’ClickHouseã®å¼·åŠ›ãªSQLを使ã£ã¦å‡¦ç†ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã€è¨­å®šãŒä¸è¦ã§ã™ã€‚テーブルデータã¯ä¸€æ™‚çš„ãªå ´æ‰€ã«ä¿å­˜ã•ã‚Œã€`clickhouse-local`ã‚’å†èµ·å‹•ã™ã‚‹ã¨å‰ã«ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯åˆ©ç”¨ã§ããªããªã‚Šã¾ã™ã€‚ + + 代ã‚ã‚Šã«æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã§ClickHouseサーãƒãƒ¼ã‚’開始ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™... + + ```bash + ./clickhouse server + ``` + + ...ãã—ã¦ã€`clickhouse-client`ã§ã‚µãƒ¼ãƒã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«æ–°ã—ã„ターミナルを開ãã¾ã™ï¼š + + ```bash + ./clickhouse client + ``` + + ```response + ./clickhouse client + ClickHouse client version 24.5.1.117 (official build). + Connecting to localhost:9000 as user default. + Connected to ClickHouse server version 24.5.1. + + local-host :) + ``` + + テーブルデータã¯ç¾åœ¨ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ä¿å­˜ã•ã‚Œã€ClickHouseサーãƒãƒ¼ã‚’å†èµ·å‹•ã—ãŸå¾Œã‚‚利用å¯èƒ½ã§ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã€`./clickhouse server`ã«è¿½åŠ ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³å¼•æ•°ã¨ã—ã¦`-C config.xml`を渡ã—ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§è¿½åŠ ã®è¨­å®šã‚’æä¾›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚利用å¯èƒ½ãªã™ã¹ã¦ã®è¨­å®šã¯[ã“ã“](../operations/settings/settings.md)ãŠã‚ˆã³[設定ファイルテンプレートã®ä¾‹](https://github.com/ClickHouse/ClickHouse/blob/master/programs/server/config.xml)ã«æ–‡æ›¸åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ + + ClickHouseã«SQLコマンドをé€ä¿¡ã™ã‚‹æº–å‚™ãŒæ•´ã„ã¾ã—ãŸï¼ + +:::tip +[Quick Start](/docs/ja/quick-start.mdx)ã§ã€ãƒ†ãƒ¼ãƒ–ルã®ä½œæˆã¨ãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥ã®æ‰‹é †ã‚’詳ã—ã説明ã—ã¦ã„ã¾ã™ã€‚ +::: + +## プロダクションå‘ã‘デプロイメント {#available-installation-options} + +ClickHouseã®ãƒ—ロダクションå‘ã‘デプロイメントã«ã¯ã€ä»¥ä¸‹ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚ªãƒ—ションã‹ã‚‰é¸æŠžã—ã¦ãã ã•ã„。 + +### DEBパッケージã‹ã‚‰ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« {#install-from-deb-packages} + +Debianã¾ãŸã¯Ubuntuã§ã¯å…¬å¼ã®äº‹å‰ã‚³ãƒ³ãƒ‘イル済ã¿ã®`deb`パッケージを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚パッケージをインストールã™ã‚‹ãŸã‚ã«æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¦ãã ã•ã„: + +#### Debianリãƒã‚¸ãƒˆãƒªã®è¨­å®š +```bash +sudo apt-get install -y apt-transport-https ca-certificates curl gnupg +curl -fsSL 'https://packages.clickhouse.com/rpm/lts/repodata/repomd.xml.key' | sudo gpg --dearmor -o /usr/share/keyrings/clickhouse-keyring.gpg + +echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb stable main" | sudo tee \ + /etc/apt/sources.list.d/clickhouse.list +sudo apt-get update +``` + +#### ClickHouseサーãƒãƒ¼ã¨ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« +```bash +sudo apt-get install -y clickhouse-server clickhouse-client +``` + +#### ClickHouseサーãƒãƒ¼ã®èµ·å‹• + +```bash +sudo service clickhouse-server start +clickhouse-client # ã¾ãŸã¯ã€ãƒ‘スワードを設定ã—ã¦ã„ã‚‹å ´åˆã¯ "clickhouse-client --password" +``` + +
+å¤ã„ディストリビューションã®debパッケージインストール法 + +```bash +sudo apt-get install apt-transport-https ca-certificates dirmngr +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754 +echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee \ + /etc/apt/sources.list.d/clickhouse.list +sudo apt-get update + +sudo apt-get install -y clickhouse-server clickhouse-client + +sudo service clickhouse-server start +clickhouse-client # ã¾ãŸã¯ã€ãƒ‘スワードを設定ã—ã¦ã„ã‚‹å ´åˆã¯ "clickhouse-client --password" +``` + +
+ +å¿…è¦ã«å¿œã˜ã¦ã€`stable`ã‚’`lts`ã«ç½®ãæ›ãˆã¦ã€ãƒ‹ãƒ¼ã‚ºã«åŸºã¥ã„ãŸç•°ãªã‚‹[リリース種別](/knowledgebase/production)を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã¾ãŸã€[ã“ã¡ã‚‰](https://packages.clickhouse.com/deb/pool/main/c/)ã‹ã‚‰ãƒ‘ッケージを手動ã§ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +#### スタンドアロンClickHouse Keeperã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +:::tip +プロダクション環境ã§ã¯ã€ClickHouse Keeperを専用ã®ãƒŽãƒ¼ãƒ‰ä¸Šã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚’[å¼·ã推奨ã—ã¾ã™](/docs/ja/operations/tips.md#L143-L144)。テスト環境ã§ClickHouse Serverã¨ClickHouse Keeperã‚’åŒã˜ã‚µãƒ¼ãƒãƒ¼ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚’決定ã—ãŸå ´åˆã¯ã€ClickHouse Serverã«ClickHouse KeeperãŒå«ã¾ã‚Œã¦ã„ã‚‹ã®ã§ã€ClickHouse Keeperをインストールã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã®ClickHouse Keeperサーãƒãƒ¼ã«ã®ã¿å¿…è¦ã§ã™ã€‚ +::: + +```bash +sudo apt-get install -y clickhouse-keeper +``` + +#### ClickHouse Keeperã®æœ‰åŠ¹åŒ–ã¨é–‹å§‹ + +```bash +sudo systemctl enable clickhouse-keeper +sudo systemctl start clickhouse-keeper +sudo systemctl status clickhouse-keeper +``` + +#### パッケージ {#packages} + +- `clickhouse-common-static` — ClickHouseã®ã‚³ãƒ³ãƒ‘イル済ã¿ãƒã‚¤ãƒŠãƒªãƒ•ã‚¡ã‚¤ãƒ«ã‚’インストールã—ã¾ã™ã€‚ +- `clickhouse-server` — `clickhouse-server`ã®ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ãƒªãƒ³ã‚¯ã‚’作æˆã—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚µãƒ¼ãƒãƒ¼è¨­å®šã‚’インストールã—ã¾ã™ã€‚ +- `clickhouse-client` — `clickhouse-client`ãŠã‚ˆã³ä»–ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆé–¢é€£ãƒ„ールã®ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ãƒªãƒ³ã‚¯ã‚’作æˆã—ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’インストールã—ã¾ã™ã€‚ +- `clickhouse-common-static-dbg` — デãƒãƒƒã‚°æƒ…報付ãã®ClickHouseコンパイル済ã¿ãƒã‚¤ãƒŠãƒªãƒ•ã‚¡ã‚¤ãƒ«ã‚’インストールã—ã¾ã™ã€‚ +- `clickhouse-keeper` - 専用ã®ClickHouse Keeperノードã«ClickHouse Keeperをインストールã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ClickHouseサーãƒãƒ¼ã¨åŒã˜ã‚µãƒ¼ãƒãƒ¼ã§ClickHouse Keeperを実行ã—ã¦ã„ã‚‹å ´åˆã€ã“ã®ãƒ‘ッケージをインストールã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。ClickHouse Keeperã¨ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ClickHouse Keeper設定ファイルをインストールã—ã¾ã™ã€‚ + +:::info +特定ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ClickHouseをインストールã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ã™ã¹ã¦ã®ãƒ‘ッケージをåŒã˜ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š `sudo apt-get install clickhouse-server=21.8.5.7 clickhouse-client=21.8.5.7 clickhouse-common-static=21.8.5.7` +::: + +### RPMパッケージã‹ã‚‰ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« {#from-rpm-packages} + +CentOSã€RedHatã€ãŠã‚ˆã³ã™ã¹ã¦ã®rpmベースã®Linuxディストリービューションã§ã¯ã€å…¬å¼ã®äº‹å‰ã‚³ãƒ³ãƒ‘イル済ã¿`rpm`パッケージを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +#### RPMリãƒã‚¸ãƒˆãƒªã®è¨­å®š +ã¾ãšã€å…¬å¼ãƒªãƒã‚¸ãƒˆãƒªã‚’追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```bash +sudo yum install -y yum-utils +sudo yum-config-manager --add-repo https://packages.clickhouse.com/rpm/clickhouse.repo +``` + +`zypper`パッケージマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã‚’使用ã™ã‚‹ã‚·ã‚¹ãƒ†ãƒ ï¼ˆopenSUSE, SLES)ã®å ´åˆï¼š + +```bash +sudo zypper addrepo -r https://packages.clickhouse.com/rpm/clickhouse.repo -g +sudo zypper --gpg-auto-import-keys refresh clickhouse-stable +``` + +ãã®å¾Œã€ä»»æ„ã®`yum install`ã‚’`zypper install`ã«ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚特定ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’指定ã™ã‚‹ã«ã¯ã€ãƒ‘ッケージåã®æœ«å°¾ã«`-$VERSION`を追加ã—ã¾ã™ã€‚例:`clickhouse-client-22.2.2.22`。 + +#### ClickHouseサーãƒãƒ¼ã¨ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +```bash +sudo yum install -y clickhouse-server clickhouse-client +``` + +#### ClickHouseサーãƒãƒ¼ã®èµ·å‹• + +```bash +sudo systemctl enable clickhouse-server +sudo systemctl start clickhouse-server +sudo systemctl status clickhouse-server +clickhouse-client # ã¾ãŸã¯ "clickhouse-client --password"ã€ãƒ‘スワードを設定ã—ã¦ã„ã‚‹å ´åˆ +``` + +#### スタンドアロンClickHouse Keeperã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +:::tip +プロダクション環境ã§ã¯ã€ClickHouse Keeperを専用ã®ãƒŽãƒ¼ãƒ‰ä¸Šã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚’[å¼·ã推奨ã—ã¾ã™](/docs/ja/operations/tips.md#L143-L144)。テスト環境ã§ClickHouse Serverã¨ClickHouse Keeperã‚’åŒã˜ã‚µãƒ¼ãƒãƒ¼ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚’決定ã—ãŸå ´åˆã¯ã€ClickHouse Serverã«ClickHouse KeeperãŒå«ã¾ã‚Œã¦ã„ã‚‹ã®ã§ã€ClickHouse Keeperをインストールã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã®ClickHouse Keeperサーãƒãƒ¼ã«ã®ã¿å¿…è¦ã§ã™ã€‚ +::: + +```bash +sudo yum install -y clickhouse-keeper +``` + +#### ClickHouse Keeperã®æœ‰åŠ¹åŒ–ã¨é–‹å§‹ + +```bash +sudo systemctl enable clickhouse-keeper +sudo systemctl start clickhouse-keeper +sudo systemctl status clickhouse-keeper +``` + +å¿…è¦ã«å¿œã˜ã¦ã€`stable`ã‚’`lts`ã«ç½®ãæ›ãˆã¦ã€ãƒ‹ãƒ¼ã‚ºã«åŸºã¥ã„ã¦ç•°ãªã‚‹[リリース種別](/knowledgebase/production)を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãã®å¾Œã€ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¦ãƒ‘ッケージをインストールã—ã¾ã™ï¼š + +```bash +sudo yum install clickhouse-server clickhouse-client +``` + +ã¾ãŸã€[ã“ã¡ã‚‰](https://packages.clickhouse.com/rpm/stable)ã‹ã‚‰ãƒ‘ッケージを手動ã§ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +### Tgzアーカイブã‹ã‚‰ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« {#from-tgz-archives} + +`deb`ã‚„`rpm`パッケージã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãŒä¸å¯èƒ½ãªã™ã¹ã¦ã®Linuxディストリービューションã§ã¯ã€å…¬å¼ã®äº‹å‰ã‚³ãƒ³ãƒ‘イル済ã¿ã®`tgz`アーカイブを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +å¿…è¦ãªãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ãƒªãƒã‚¸ãƒˆãƒªhttps://packages.clickhouse.com/tgz/ ã‹ã‚‰`curl`ã¾ãŸã¯`wget`を使用ã—ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ãã®å¾Œã€ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸã‚¢ãƒ¼ã‚«ã‚¤ãƒ–を解å‡ã—ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚¹ã‚¯ãƒªãƒ—トã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¾ã™ã€‚最新ã®å®‰å®šç‰ˆã®ä¾‹ï¼š + +```bash +LATEST_VERSION=$(curl -s https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/utils/list-versions/version_date.tsv | \ + grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | sort -V -r | head -n 1) +export LATEST_VERSION + +case $(uname -m) in + x86_64) ARCH=amd64 ;; + aarch64) ARCH=arm64 ;; + *) echo "Unknown architecture $(uname -m)"; exit 1 ;; +esac + +for PKG in clickhouse-common-static clickhouse-common-static-dbg clickhouse-server clickhouse-client clickhouse-keeper +do + curl -fO "https://packages.clickhouse.com/tgz/stable/$PKG-$LATEST_VERSION-${ARCH}.tgz" \ + || curl -fO "https://packages.clickhouse.com/tgz/stable/$PKG-$LATEST_VERSION.tgz" +done + +tar -xzvf "clickhouse-common-static-$LATEST_VERSION-${ARCH}.tgz" \ + || tar -xzvf "clickhouse-common-static-$LATEST_VERSION.tgz" +sudo "clickhouse-common-static-$LATEST_VERSION/install/doinst.sh" + +tar -xzvf "clickhouse-common-static-dbg-$LATEST_VERSION-${ARCH}.tgz" \ + || tar -xzvf "clickhouse-common-static-dbg-$LATEST_VERSION.tgz" +sudo "clickhouse-common-static-dbg-$LATEST_VERSION/install/doinst.sh" + +tar -xzvf "clickhouse-server-$LATEST_VERSION-${ARCH}.tgz" \ + || tar -xzvf "clickhouse-server-$LATEST_VERSION.tgz" +sudo "clickhouse-server-$LATEST_VERSION/install/doinst.sh" configure +sudo /etc/init.d/clickhouse-server start + +tar -xzvf "clickhouse-client-$LATEST_VERSION-${ARCH}.tgz" \ + || tar -xzvf "clickhouse-client-$LATEST_VERSION.tgz" +sudo "clickhouse-client-$LATEST_VERSION/install/doinst.sh" +``` + +プロダクション環境ã§ã¯ã€æœ€æ–°ã®`stable`-ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã¯GitHubã®ãƒšãƒ¼ã‚¸https://github.com/ClickHouse/ClickHouse/tags ã®`-stable`ã®æŽ¥å°¾è¾žã§ç¢ºèªã§ãã¾ã™ã€‚ + +### Dockerイメージã‹ã‚‰ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« {#from-docker-image} + +Docker内ã§ClickHouseを実行ã™ã‚‹ã«ã¯ã€[Docker Hub](https://hub.docker.com/r/clickhouse/clickhouse-server/)ã®ã‚¬ã‚¤ãƒ‰ã«å¾“ã£ã¦ãã ã•ã„。ã“れらã®ã‚¤ãƒ¡ãƒ¼ã‚¸ã¯å†…部ã§å…¬å¼ã®`deb`パッケージを使用ã—ã¾ã™ã€‚ + +## éžãƒ—ロダクションデプロイメント(上級) + +### ソースã‹ã‚‰ã®ã‚³ãƒ³ãƒ‘イル {#from-sources} + +ClickHouseを手動ã§ã‚³ãƒ³ãƒ‘イルã™ã‚‹ã«ã¯ã€[Linux](/docs/ja/development/build.md)ã¾ãŸã¯[macOS](/docs/ja/development/build-osx.md)ã®æŒ‡ç¤ºã«å¾“ã£ã¦ãã ã•ã„。 + +パッケージをコンパイルã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã‹ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã›ãšã«ãƒ—ログラムを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + クライアント: /programs/clickhouse-client + サーãƒãƒ¼: /programs/clickhouse-server + +データãŠã‚ˆã³ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ«ãƒ€ã‚’手動ã§ä½œæˆã—ã€å¸Œæœ›ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦`chown`ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®ãƒ‘スã¯ã‚µãƒ¼ãƒãƒ¼ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆsrc/programs/server/config.xml)ã§å¤‰æ›´ã§ãã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™ï¼š + + /var/lib/clickhouse/data/default/ + /var/lib/clickhouse/metadata/default/ + +Gentooã§ã¯ã€å˜ã«`emerge clickhouse`コマンドを使用ã—ã¦ã‚½ãƒ¼ã‚¹ã‹ã‚‰ClickHouseをインストールã§ãã¾ã™ã€‚ + +### CIã§ç”Ÿæˆã•ã‚ŒãŸãƒã‚¤ãƒŠãƒªã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +ClickHouseã®ç¶™ç¶šçš„インテグレーション(CI)インフラストラクãƒãƒ£ã¯ã€[ClickHouseã®ãƒªãƒã‚¸ãƒˆãƒª](https://github.com/clickhouse/clickhouse/)ã®å„コミットã®ãŸã‚ã«ç‰¹åˆ¥ã«ãƒ“ルドã•ã‚ŒãŸãƒ“ルドを生æˆã—ã¾ã™ã€‚例ãˆã°ã€[サニタイズ](https://github.com/google/sanitizers)ã•ã‚ŒãŸãƒ“ルドã€æœ€é©åŒ–ã•ã‚Œã¦ã„ãªã„(デãƒãƒƒã‚°ï¼‰ãƒ“ルドã€ã‚¯ãƒ­ã‚¹ã‚³ãƒ³ãƒ‘イルã•ã‚ŒãŸãƒ“ルドãªã©ã§ã™ã€‚ã“れらã®ãƒ“ルドã¯é€šå¸¸ã€é–‹ç™ºä¸­ã®ã¿å½¹ç«‹ã¡ã¾ã™ãŒã€ç‰¹å®šã®çŠ¶æ³ã§ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¨ã£ã¦ã‚‚興味深ã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ClickHouseã®CIã¯æ™‚é–“ã¨ã¨ã‚‚ã«é€²åŒ–ã™ã‚‹ãŸã‚ã€CIã§ç”Ÿæˆã•ã‚ŒãŸãƒ“ルドをダウンロードã™ã‚‹ãŸã‚ã®æ­£ç¢ºãªæ‰‹é †ã¯å¤‰ã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +ã¾ãŸã€CIã¯å¤ã„ビルドアーティファクトを削除ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã€ãã‚Œã«ã‚ˆã‚Šãれらã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ãŒã§ããªããªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +例ãˆã°ã€ClickHouse v23.4ã®aarch64ãƒã‚¤ãƒŠãƒªã‚’ダウンロードã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®æ‰‹é †ã«å¾“ã„ã¾ã™ï¼š + +- リリースv23.4ã®GitHubプルリクエストを見ã¤ã‘ã¾ã™ï¼š[Release pull request for branch 23.4](https://github.com/ClickHouse/ClickHouse/pull/49238) +- "Commits"をクリックã—ã€ç‰¹å®šã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãŸã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«å¯¾å¿œã™ã‚‹"Update autogenerated version to 23.4.2.1 and contributors"ã®ã‚ˆã†ãªã‚³ãƒŸãƒƒãƒˆã‚’クリックã—ã¾ã™ã€‚ +- CIãƒã‚§ãƒƒã‚¯ã®ãƒªã‚¹ãƒˆã‚’é–‹ããŸã‚ã€ç·‘ã®ãƒã‚§ãƒƒã‚¯ / 黄色ã®ãƒ‰ãƒƒãƒˆ / 赤ã„ãƒãƒ„をクリックã—ã¾ã™ã€‚ +- リスト内ã®"Builds"ã®æ¨ªã«ã‚ã‚‹"Details"をクリックã—ã€[ã“ã®ãƒšãƒ¼ã‚¸](https://s3.amazonaws.com/clickhouse-test-reports/46793/b460eb70bf29b19eadd19a1f959b15d186705394/clickhouse_build_check/report.html)ã®ã‚ˆã†ãªãƒšãƒ¼ã‚¸ã‚’é–‹ãã¾ã™ã€‚ +- コンパイラï¼"clang-*-aarch64"ã®è¡Œã‚’見ã¤ã‘ã¾ã™ - 複数ã®è¡ŒãŒã‚ã‚Šã¾ã™ã€‚ +- ã“れらã®ãƒ“ルドã®ã‚¢ãƒ¼ãƒ†ã‚£ãƒ•ã‚¡ã‚¯ãƒˆã‚’ダウンロードã—ã¾ã™ã€‚ + +[SSE3](https://ja.wikipedia.org/wiki/SSE3)サãƒãƒ¼ãƒˆãªã—ã®éžå¸¸ã«å¤ã„x86-64システムã¾ãŸã¯[ARMv8.1-A](https://ja.wikipedia.org/wiki/AArch64#ARMv8.1-A)サãƒãƒ¼ãƒˆãªã—ã®å¤ã„ARMシステムã®ãŸã‚ã®ãƒã‚¤ãƒŠãƒªã‚’ダウンロードã™ã‚‹ã«ã¯ã€ãƒ—ルリクエストを開ã„ã¦CIãƒã‚§ãƒƒã‚¯"BuilderBinAmd64Compat"ã€ãã‚Œãžã‚Œ"BuilderBinAarch64V80Compat"を見ã¤ã‘ã¾ã™ã€‚ãã®å¾Œã€"Details"をクリックã—ã¦ãƒ“ルドフォルダを開ãã€æœ€å¾Œã¾ã§ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸"Notice: Build URLs https://s3.amazonaws.com/clickhouse/builds/PRs/.../.../binary_aarch64_v80compat/clickhouse" を見ã¤ã‘ã¾ã™ã€‚ãã®ãƒªãƒ³ã‚¯ã‚’クリックã—ã¦ãƒ“ルドをダウンロードã§ãã¾ã™ã€‚ + +### macOSã®ã¿ï¼šHomebrewã§ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +macOSã§[homebrew](https://brew.sh/)を使用ã—ã¦ClickHouseをインストールã™ã‚‹ã«ã¯ã€ClickHouse [community homebrew formula](https://formulae.brew.sh/cask/clickhouse)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## èµ·å‹• {#launch} + +サーãƒãƒ¼ã‚’デーモンã¨ã—ã¦é–‹å§‹ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + +```bash +$ clickhouse start +``` + +ClickHouseを実行ã™ã‚‹ä»–ã®æ–¹æ³•ã‚‚ã‚ã‚Šã¾ã™ï¼š + +```bash +$ sudo service clickhouse-server start +``` + +`service`コマンドãŒãªã„å ´åˆã¯ã€ã“ã®ã‚ˆã†ã«å®Ÿè¡Œã—ã¾ã™ï¼š + +```bash +$ sudo /etc/init.d/clickhouse-server start +``` + +`systemctl`コマンドãŒã‚ã‚‹å ´åˆã¯ã€ã“ã®ã‚ˆã†ã«å®Ÿè¡Œã—ã¾ã™ï¼š + +```bash +$ sudo systemctl start clickhouse-server.service +``` + +`/var/log/clickhouse-server/`ディレクトリã§ãƒ­ã‚°ã‚’å‚ç…§ã—ã¾ã™ã€‚ + +サーãƒãƒ¼ãŒèµ·å‹•ã—ãªã„å ´åˆã¯ã€`/etc/clickhouse-server/config.xml`ファイル内ã®è¨­å®šã‚’確èªã—ã¦ãã ã•ã„。 + +サーãƒãƒ¼ã‚’コンソールã‹ã‚‰æ‰‹å‹•ã§èµ·å‹•ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```bash +$ clickhouse-server --config-file=/etc/clickhouse-server/config.xml +``` + +ã“ã®å ´åˆã€ãƒ­ã‚°ã¯ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«å‡ºåŠ›ã•ã‚Œã‚‹ãŸã‚ã€é–‹ç™ºä¸­ã«ã¯ä¾¿åˆ©ã§ã™ã€‚設定ファイルãŒç¾åœ¨ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚ã‚‹å ´åˆã€`--config-file`パラメータを指定ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。デフォルトã§`./config.xml`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +ClickHouseã¯ã‚¢ã‚¯ã‚»ã‚¹åˆ¶é™ã®è¨­å®šã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“れらã¯`users.xml`ファイル(`config.xml`ã®æ¨ªï¼‰ã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ +デフォルトã§ã¯ã€ãƒ‘スワードãªã—ã§`default`ユーザーã«å¯¾ã™ã‚‹ã©ã“ã‹ã‚‰ã§ã‚‚ã®ã‚¢ã‚¯ã‚»ã‚¹ãŒè¨±å¯ã•ã‚Œã¦ã„ã¾ã™ã€‚`user/default/networks`ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +詳細ã«ã¤ã„ã¦ã¯ã€[「設定ファイルã€](/docs/ja/operations/configuration-files.md)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +サーãƒãƒ¼ã‚’èµ·å‹•ã—ãŸå¾Œã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã—ã¦æŽ¥ç¶šã§ãã¾ã™ï¼š + +```bash +$ clickhouse-client +``` + +デフォルトã§ã¯ã€`localhost:9000`ã«`default`ユーザーã§ã€ãƒ‘スワードãªã—ã§æŽ¥ç¶šã—ã¾ã™ã€‚`--host`引数を使用ã—ã¦ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +ターミナルã¯UTF-8エンコーディングを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +詳細ã«ã¤ã„ã¦ã¯ã€[「コマンドラインクライアントã€](/docs/ja/interfaces/cli.md)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +例: + +``` +$ ./clickhouse-client +ClickHouse client version 0.0.18749. +Connecting to localhost:9000. +Connected to ClickHouse server version 0.0.18749. + +:) SELECT 1 + +SELECT 1 + +┌─1─┠+│ 1 │ +└───┘ + +1 rows in set. Elapsed: 0.003 sec. + +:) +``` + +**ãŠã‚ã§ã¨ã†ã”ã–ã„ã¾ã™ã€ã‚·ã‚¹ãƒ†ãƒ ã¯æ­£å¸¸ã«å‹•ä½œã—ã¦ã„ã¾ã™ï¼** + +実験を続ã‘ã‚‹ã«ã¯ã€ãƒ†ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ä¸€ã¤ã‚’ダウンロードã™ã‚‹ã‹ã€[ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«](/docs/ja/tutorial.md)を進ã‚ã¦ãã ã•ã„。 + +## セルフマãƒãƒ¼ã‚¸ãƒ‰ClickHouseã«å¯¾ã™ã‚‹æŽ¨å¥¨äº‹é … + +ClickHouseã¯ã€x86-64ã€ARMã€ã¾ãŸã¯PowerPC64LE CPUアーキテクãƒãƒ£ã‚’æŒã¤ä»»æ„ã®Linuxã€FreeBSDã€ã¾ãŸã¯macOSã§å®Ÿè¡Œå¯èƒ½ã§ã™ã€‚ + +ClickHouseã¯åˆ©ç”¨å¯èƒ½ãªãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ãƒªã‚½ãƒ¼ã‚¹ã‚’å…¨ã¦ä½¿ç”¨ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã—ã¾ã™ã€‚ + +ClickHouseã¯ã€å°‘ãªã„コア数ã§é«˜ã„クロックレートよりもã€ä½Žã„クロックレートã§å¤šãã®ã‚³ã‚¢æ•°ã‚’æŒã¤æ–¹ãŒã‚ˆã‚ŠåŠ¹çŽ‡çš„ã«å‹•ä½œã™ã‚‹å‚¾å‘ãŒã‚ã‚Šã¾ã™ã€‚ + +éžãƒˆãƒªãƒ“アルãªã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã«ã¯ã€æœ€ä½Žã§ã‚‚4GBã®RAMを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ClickHouseサーãƒãƒ¼ã¯ã¯ã‚‹ã‹ã«å°‘ãªã„RAMã§ã‚‚実行å¯èƒ½ã§ã™ãŒã€ãã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯ã‚ˆã中断ã•ã‚Œã¾ã™ã€‚ + +å¿…è¦ãªRAMã®å®¹é‡ã¯é€šå¸¸æ¬¡ã®è¦å› ã«ä¾å­˜ã—ã¾ã™ï¼š + +- クエリã®è¤‡é›‘ã• +- クエリã§å‡¦ç†ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿é‡ + +å¿…è¦ãªRAMã®å®¹é‡ã‚’計算ã™ã‚‹ã«ã¯ã€[GROUP BY](/docs/ja/sql-reference/statements/select/group-by.md#select-group-by-clause)ã€[DISTINCT](/docs/ja/sql-reference/statements/select/distinct.md#select-distinct)ã€[JOIN](/docs/ja/sql-reference/statements/select/join.md#select-join)ãªã©ã€ä½¿ç”¨ã—ã¦ã„ã‚‹æ“作ã®ä¸€æ™‚データã®ã‚µã‚¤ã‚ºã‚’見ç©ã‚‚ã‚Šã¾ã™ã€‚ + +メモリ消費を削減ã™ã‚‹ãŸã‚ã«ã€ClickHouseã¯ä¸€æ™‚データを外部ストレージã«ã‚¹ãƒ¯ãƒƒãƒ—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[外部メモリã®GROUP BY](/docs/ja/sql-reference/statements/select/group-by.md#select-group-by-in-external-memory)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +プロダクション環境ã§ã¯ã€ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã®ã‚¹ãƒ¯ãƒƒãƒ—ファイルを無効ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +ClickHouseãƒã‚¤ãƒŠãƒªã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«ã¯å°‘ãªãã¨ã‚‚2.5GBã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ãŒå¿…è¦ã§ã™ã€‚ + +データã®ä¿å­˜ã«å¿…è¦ãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å®¹é‡ã¯ä»¥ä¸‹ã«åŸºã¥ã„ã¦åˆ¥é€”計算ã§ãã¾ã™ + +- データ容é‡ã®è¦‹ç©ã‚‚ã‚Š + + データã®ã‚µãƒ³ãƒ—ルをå–å¾—ã—ã€ãã®å¹³å‡è¡Œã‚µã‚¤ã‚ºã‚’計算ã—ã¾ã™ã€‚ãã—ã¦ã€ä¿å­˜ã™ã‚‹äºˆå®šã®è¡Œæ•°ã‚’ã‹ã‘ã¾ã™ã€‚ + +- データ圧縮係数 + + データ圧縮係数を見ç©ã‚‚ã‚‹ã«ã¯ã€ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã®ã‚µãƒ³ãƒ—ルをロードã—ã€å®Ÿéš›ã®ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã‚’ä¿å­˜ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルサイズã¨æ¯”較ã—ã¾ã™ã€‚例ãˆã°ã€ã‚¯ãƒªãƒƒã‚¯ã‚¹ãƒˆãƒªãƒ¼ãƒ ãƒ‡ãƒ¼ã‚¿ã¯é€šå¸¸6-10å€ã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ + +データをä¿å­˜ã™ã‚‹ãŸã‚ã«å¿…è¦ãªæœ€çµ‚ボリュームを計算ã™ã‚‹ã«ã¯ã€åœ§ç¸®ä¿‚数をデータ容é‡ã®è¦‹ç©ã‚‚ã‚Šã«é©ç”¨ã—ã¾ã™ã€‚複数ã®ãƒ¬ãƒ—リカã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹è¨ˆç”»ãŒã‚ã‚‹å ´åˆã¯ã€ãã®è¦‹ç©ã‚‚り体ç©ã‚’レプリカ数ã§æŽ›ã‘ã¾ã™ã€‚ + +分散ClickHouseデプロイメント(クラスタリング)ã§ã¯ã€å°‘ãªãã¨ã‚‚10Gクラスã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶šã‚’推奨ã—ã¾ã™ã€‚ + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å¸¯åŸŸå¹…ã¯ã€å¤§é‡ã®ä¸­é–“データをæŒã¤åˆ†æ•£ã‚¯ã‚¨ãƒªã®å‡¦ç†ã«ã¨ã£ã¦é‡è¦ã§ã™ã€‚ã¾ãŸã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯é€Ÿåº¦ã¯ãƒ¬ãƒ—リケーションプロセスã«ã‚‚影響を与ãˆã¾ã™ã€‚ diff --git a/docs/ja/getting-started/playground.md b/docs/ja/getting-started/playground.md new file mode 100644 index 00000000000..9b49eb56cdf --- /dev/null +++ b/docs/ja/getting-started/playground.md @@ -0,0 +1,46 @@ +--- +sidebar_label: ClickHouse Playground +sidebar_position: 2 +keywords: [clickhouse, playground, getting, started, docs] +description: ClickHouse Playgroundを使用ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã‚„クラスタを設定ã›ãšã«ã‚¯ã‚¨ãƒªã‚’å³åº§ã«å®Ÿè¡Œã—ã¦ã€ClickHouseを試ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +slug: /ja/getting-started/playground +--- + +# ClickHouse Playground + +[ClickHouse Playground](https://sql.clickhouse.com)を使用ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã‚„クラスタを設定ã›ãšã«ã‚¯ã‚¨ãƒªã‚’å³åº§ã«å®Ÿè¡Œã—ã¦ã€ClickHouseを試ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +Playgroundã«ã¯ã„ãã¤ã‹ã®ã‚µãƒ³ãƒ—ルデータセットãŒç”¨æ„ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +Playgroundã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªã‚’è¡Œã†ã«ã¯ã€ä»»æ„ã®HTTPクライアントを使用ã§ãã¾ã™ã€‚例ãˆã°ã€[curl](https://curl.haxx.se)ã‚„[wget](https://www.gnu.org/software/wget/)を使用ã™ã‚‹æ–¹æ³•ã‚„ã€[JDBC](../interfaces/jdbc.md)ã‚„[ODBC](../interfaces/odbc.md)ドライãƒã‚’使用ã—ã¦æŽ¥ç¶šã‚’設定ã™ã‚‹æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚ClickHouseをサãƒãƒ¼ãƒˆã™ã‚‹ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢è£½å“ã«é–¢ã™ã‚‹è©³ç´°æƒ…å ±ã¯[ã“ã¡ã‚‰](../integrations/index.mdx)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +## èªè¨¼æƒ…å ± {#credentials} + +| パラメータ | 値 | +|:-------------------|:-----------------------------------| +| HTTPSエンドãƒã‚¤ãƒ³ãƒˆ | `https://play.clickhouse.com:443/` | +| ãƒã‚¤ãƒ†ã‚£ãƒ–TCPエンドãƒã‚¤ãƒ³ãƒˆ | `play.clickhouse.com:9440` | +| ユーザー | `explorer` ã¾ãŸã¯ `play` | +| パスワード | (空) | + +## 制é™äº‹é … {#limitations} + +クエリã¯èª­ã¿å–り専用ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ãã‚Œã¯ã„ãã¤ã‹ã®åˆ¶é™ã‚’æ„味ã—ã¾ã™ï¼š + +- DDLクエリã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“ +- INSERTクエリã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“ + +サービスã®ä½¿ç”¨ã«ã¯ã‚¯ã‚©ãƒ¼ã‚¿ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +## 例 {#examples} + +`curl`を使用ã—ãŸHTTPSエンドãƒã‚¤ãƒ³ãƒˆã®ä¾‹ï¼š + +``` bash +curl "https://play.clickhouse.com/?user=explorer" --data-binary "SELECT 'Play ClickHouse'" +``` + +[CLI](../interfaces/cli.md)を使用ã—ãŸTCPエンドãƒã‚¤ãƒ³ãƒˆã®ä¾‹ï¼š + +``` bash +clickhouse client --secure --host play.clickhouse.com --user explorer +``` diff --git a/docs/ja/guides/_category_.yml b/docs/ja/guides/_category_.yml new file mode 100644 index 00000000000..5c42e1659b1 --- /dev/null +++ b/docs/ja/guides/_category_.yml @@ -0,0 +1,7 @@ +position: 10 +label: 'User Guides' +collapsible: true +collapsed: true +link: + type: generated-index + title: User Guides \ No newline at end of file diff --git a/docs/ja/guides/best-practices/_category_.yml b/docs/ja/guides/best-practices/_category_.yml new file mode 100644 index 00000000000..92e91f1a2b1 --- /dev/null +++ b/docs/ja/guides/best-practices/_category_.yml @@ -0,0 +1,7 @@ +label: 'Best Practices' +collapsible: true +collapsed: true +link: + type: generated-index + title: Best Practices + slug: /ja/optimize diff --git a/docs/ja/guides/best-practices/asyncinserts.md b/docs/ja/guides/best-practices/asyncinserts.md new file mode 100644 index 00000000000..c496e0a2d37 --- /dev/null +++ b/docs/ja/guides/best-practices/asyncinserts.md @@ -0,0 +1,10 @@ +--- +slug: /ja/optimize/asynchronous-inserts +sidebar_label: éžåŒæœŸæŒ¿å…¥ +title: éžåŒæœŸæŒ¿å…¥ (async_insert) +description: データã®ãƒãƒƒãƒå‡¦ç†ã®ä»£æ›¿ã¨ã—ã¦éžåŒæœŸæŒ¿å…¥ã‚’使用ã—ã¾ã™ã€‚ +--- + +import Content from '@site/docs/ja/cloud/bestpractices/asyncinserts.md'; + + diff --git a/docs/ja/guides/best-practices/avoidmutations.md b/docs/ja/guides/best-practices/avoidmutations.md new file mode 100644 index 00000000000..75bcc5f7c6d --- /dev/null +++ b/docs/ja/guides/best-practices/avoidmutations.md @@ -0,0 +1,10 @@ +--- +slug: /ja/optimize/avoid-mutations +sidebar_label: 変更をé¿ã‘ã‚‹ +title: 変更をé¿ã‘ã‚‹ +description: 変更ã¨ã¯ã€ãƒ†ãƒ¼ãƒ–ルデータをæ“作ã™ã‚‹ALTERクエリを指ã—ã¾ã™ +--- + +import Content from '@site/docs/ja/cloud/bestpractices/avoidmutations.md'; + + diff --git a/docs/ja/guides/best-practices/avoidnullablecolumns.md b/docs/ja/guides/best-practices/avoidnullablecolumns.md new file mode 100644 index 00000000000..a41db85a1f3 --- /dev/null +++ b/docs/ja/guides/best-practices/avoidnullablecolumns.md @@ -0,0 +1,10 @@ +--- +slug: /ja/optimize/avoid-nullable-columns +sidebar_label: Nullableカラムをé¿ã‘ã‚‹ +title: Nullableカラムをé¿ã‘ã‚‹ +description: Nullableカラム (例. Nullable(String)) ã¯ã€åˆ¥ã®UInt8åž‹ã®ã‚«ãƒ©ãƒ ã‚’作æˆã—ã¾ã™ã€‚ +--- + +import Content from '@site/docs/ja/cloud/bestpractices/avoidnullablecolumns.md'; + + diff --git a/docs/ja/guides/best-practices/avoidoptimizefinal.md b/docs/ja/guides/best-practices/avoidoptimizefinal.md new file mode 100644 index 00000000000..a1c4b62fe74 --- /dev/null +++ b/docs/ja/guides/best-practices/avoidoptimizefinal.md @@ -0,0 +1,10 @@ +--- +slug: /ja/optimize/avoidoptimizefinal +sidebar_label: Optimize Final ã‚’é¿ã‘ã‚‹ +title: Optimize Final ã‚’é¿ã‘ã‚‹ +description: OPTIMIZE TABLE ... FINAL クエリを使用ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®äºˆå®šå¤–ã®ãƒžãƒ¼ã‚¸ãŒé–‹å§‹ã•ã‚Œã¾ã™ã€‚ +--- + +import Content from '@site/docs/ja/cloud/bestpractices/avoidoptimizefinal.md'; + + diff --git a/docs/ja/guides/best-practices/bulkinserts.md b/docs/ja/guides/best-practices/bulkinserts.md new file mode 100644 index 00000000000..9bf909f236c --- /dev/null +++ b/docs/ja/guides/best-practices/bulkinserts.md @@ -0,0 +1,10 @@ +--- +slug: /ja/optimize/bulk-inserts +sidebar_label: ãƒãƒ«ã‚¯ã‚¤ãƒ³ã‚µãƒ¼ãƒˆ +title: ãƒãƒ«ã‚¯ã‚¤ãƒ³ã‚µãƒ¼ãƒˆ +description: å„インサートã«å¤šãã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€å°ã•ãªé‡ã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’é€ä¿¡ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€å¿…è¦ãªæ›¸ãè¾¼ã¿ã®æ•°ã‚’減らã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +--- + +import Content from '@site/docs/ja/cloud/bestpractices/bulkinserts.md'; + + diff --git a/docs/ja/guides/best-practices/images/02-ClickHouse_Index_Design.excalidraw b/docs/ja/guides/best-practices/images/02-ClickHouse_Index_Design.excalidraw new file mode 100644 index 00000000000..1821354d0db --- /dev/null +++ b/docs/ja/guides/best-practices/images/02-ClickHouse_Index_Design.excalidraw @@ -0,0 +1,19542 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://app.excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 3688, + "versionNonce": 1885549462, + "isDeleted": false, + "id": "JujSi_9FMwHGpiseeR6Pq", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1203.8431808894738, + "y": 2259.9076998425608, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 307.5088975694446, + "height": 197.04303257761387, + "seed": 510203220, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700831, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2750, + "versionNonce": 558627018, + "isDeleted": false, + "id": "4v4G5fa8LsgmBY1fV3eB8", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1367.3214111138498, + "y": 2312.4838749918317, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 131.88867535650718, + "seed": 238006100, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700831, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4194, + "versionNonce": 1680101590, + "isDeleted": false, + "id": "eBqrP7alszLkhR7-HE38l", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1672.3728413331926, + "y": 2262.570754923138, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 307.5088975694446, + "height": 197.04303257761387, + "seed": 1875763948, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700831, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4458, + "versionNonce": 463884170, + "isDeleted": false, + "id": "IJJBrumtrc4gF7aKrwG5x", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1538.6583488423046, + "y": 2550.4398955481392, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 307.5088975694446, + "height": 197.04303257761387, + "seed": 2097591020, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700831, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3255, + "versionNonce": 340772374, + "isDeleted": false, + "id": "IJ67qOmNDRUeCm_VNfIk9", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1835.8510715575694, + "y": 2315.1469300724093, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 131.88867535650718, + "seed": 936967636, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700831, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3518, + "versionNonce": 1846005322, + "isDeleted": false, + "id": "MikIyU8HjODp4w-mQISZD", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1702.1365790666812, + "y": 2603.01607069741, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 131.88867535650718, + "seed": 36964076, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700832, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1863, + "versionNonce": 1525433290, + "isDeleted": false, + "id": "KrOLtjXovP7Is50-wbg18", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -557.3339866730645, + "y": 236.12036171209593, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 127.02013262761585, + "height": 593.2427235943161, + "seed": 188284116, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700832, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1445, + "versionNonce": 1271018966, + "isDeleted": false, + "id": "UeB9NWeMGCQXeUe2lCAWU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -542.7033598073182, + "y": 241.54356773500197, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 102, + "height": 25, + "seed": 1527334740, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700832, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "rectangle", + "version": 2238, + "versionNonce": 154150614, + "isDeleted": false, + "id": "8mYC83f5VvbPLI-yIYBU3", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -126.84302469271188, + "y": 233.46108768035958, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 187.54419978513067, + "height": 596.0708074323217, + "seed": 207581676, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2177, + "versionNonce": 2120931722, + "isDeleted": false, + "id": "Bht8HpauLhirSeUtcRjy0", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -406.64541368082337, + "y": 235.03246827065914, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 258.90957266803287, + "height": 594.0956012893664, + "seed": 1305925588, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2386, + "versionNonce": 359717910, + "isDeleted": false, + "id": "Yv3nLcJhPtttBvVPPlFyy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -564.264061029748, + "y": 278.51971904240395, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.3968293978423, + "height": 20.04948308198391, + "seed": 825754604, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1327, + "versionNonce": 1537939530, + "isDeleted": false, + "id": "SRVgvQb-at-BnHwkjToPM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -501.3967708021288, + "y": 278.5444605833959, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 556499156, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "240.923", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 1393, + "versionNonce": 1516824918, + "isDeleted": false, + "id": "GBWMlsbQ1sujbbrh-8JYd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -400.4191550403508, + "y": 278.5444605833959, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 2045290092, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 1152, + "versionNonce": 200638218, + "isDeleted": false, + "id": "H1xyPIEbOagl1G_DSe72g", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -123.17546551877626, + "y": 279.88635938517615, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1932281428, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-23 04:39:21", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-23 04:39:21" + }, + { + "type": "text", + "version": 1247, + "versionNonce": 2076511690, + "isDeleted": false, + "id": "b1vRTMQiTxXSto2OcOcPK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -313.8086570057543, + "y": 242.05538220263549, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70, + "height": 25, + "seed": 603478996, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "text", + "version": 1374, + "versionNonce": 1496517590, + "isDeleted": false, + "id": "V9QJgTEebJECbyDcq-jTB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -109.27665599496709, + "y": 242.19861136930336, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 130, + "height": 25, + "seed": 2066414444, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "EventTime.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "EventTime.bin" + }, + { + "type": "text", + "version": 1519, + "versionNonce": 1345635466, + "isDeleted": false, + "id": "KhmuFmBQHujMa8ZL0LLr4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -617.2890876251264, + "y": 280.8859916716468, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 1571144020, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 0", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 1607, + "versionNonce": 231678230, + "isDeleted": false, + "id": "-o7rDZdth2Kl2tp81M-t0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -500.3967708021288, + "y": 352.0904546111291, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 160476652, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1739, + "versionNonce": 1392485194, + "isDeleted": false, + "id": "URpkC6epTPHue-Gy4AMzq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -500.3967708021288, + "y": 365.87028415658494, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 394950356, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1748, + "versionNonce": 414617174, + "isDeleted": false, + "id": "yukRr3dksYWcx0rCE0cGY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -500.3967708021288, + "y": 379.0397553104307, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1436291180, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1605, + "versionNonce": 1585490442, + "isDeleted": false, + "id": "EULzLCZ_8TlBk-8gEuLA-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -283.25817566351316, + "y": 350.8605638678378, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1849457748, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1721, + "versionNonce": 1186878358, + "isDeleted": false, + "id": "iMYzXSO9YDT88kwz4NF45", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -282.971243845333, + "y": 364.64039341329186, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 2132222700, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1730, + "versionNonce": 1236457674, + "isDeleted": false, + "id": "ilT3qpQslCI41RVgsuW0j", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -282.94630394148544, + "y": 377.8098645671376, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 2073154004, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1651, + "versionNonce": 35352790, + "isDeleted": false, + "id": "Tvi68Js3tnAwYJ22qRX9s", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -45.55856101636357, + "y": 350.9095695496558, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 478930284, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1767, + "versionNonce": 1412509578, + "isDeleted": false, + "id": "FRBfSbIIMAV6kMeyQUJRU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -45.271629198181586, + "y": 364.6893990951099, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 782268244, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1776, + "versionNonce": 644015638, + "isDeleted": false, + "id": "5_zWdXezblXxt56bdia25", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -45.24668929433403, + "y": 377.8588702489556, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1665423340, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2321, + "versionNonce": 1596086358, + "isDeleted": false, + "id": "LA3nFky31RVfhRBcslVH4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -505.3967708021288, + "y": 575.1456375869698, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 292807788, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 2496, + "versionNonce": 1561231370, + "isDeleted": false, + "id": "j28_69JFnGAJAoQGcK6b-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -564.0912377566881, + "y": 310.7438026230182, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.3340592712975, + "height": 19.900607638888914, + "seed": 1534847060, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1478, + "versionNonce": 555802006, + "isDeleted": false, + "id": "ySEupHwfgAbGF3hAZ7Cai", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -501.3967708021288, + "y": 310.69410644246267, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 416577260, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "258.382", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 1541, + "versionNonce": 605417162, + "isDeleted": false, + "id": "ji68W23umOuZksmvJ0KmV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -400.0954782201794, + "y": 310.69410644246267, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1711521236, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 1305, + "versionNonce": 1134344918, + "isDeleted": false, + "id": "123Pg3w3GTv_keglZ0AT4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -122.85178869860488, + "y": 310.78079495324994, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 998160748, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 01:03:28", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:03:28" + }, + { + "type": "text", + "version": 1665, + "versionNonce": 1572963722, + "isDeleted": false, + "id": "drH7Kr3YWRju0ofIRqQ98", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -616.965410804955, + "y": 312.9795218393964, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 39, + "height": 20, + "seed": 1274340180, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "rectangle", + "version": 3273, + "versionNonce": 2099965974, + "isDeleted": false, + "id": "sChxNs_gAXJI6YFism3yU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -563.9875910027811, + "y": 343.24660435953115, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.7544755146852, + "height": 20.142795138888914, + "seed": 1153215468, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2297, + "versionNonce": 1934378058, + "isDeleted": false, + "id": "tfCJnX3i0ttIwwjeH5kvA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -501.3967708021288, + "y": 343.3180019289756, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 1940216020, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "258.382", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 2365, + "versionNonce": 1774222678, + "isDeleted": false, + "id": "OsaSuhVYPHcwx0Hcpk8Du", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -399.9088502858591, + "y": 343.3180019289756, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 110644844, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 2108, + "versionNonce": 1855007498, + "isDeleted": false, + "id": "JCZ6eR_oN-M_nMan445MD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -122.66516076428456, + "y": 343.4046904397629, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 145432148, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 01:04:08", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:04:08" + }, + { + "type": "text", + "version": 2487, + "versionNonce": 1588748950, + "isDeleted": false, + "id": "SFaRmSxjQRRA6otLU6Ibq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -617.7787828706347, + "y": 345.6749390456788, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 31170796, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 2", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "rectangle", + "version": 3018, + "versionNonce": 1789579082, + "isDeleted": false, + "id": "izleLozEH60YtPZ0_4lRz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -564.4999757505483, + "y": 406.8097365897543, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.5134081994029, + "height": 19.900607638888914, + "seed": 1381519060, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2114, + "versionNonce": 94642774, + "isDeleted": false, + "id": "JsOCpO-jnibFs1OcqeVh4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -519.3967708021288, + "y": 406.85181624738294, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 1496823916, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2182, + "versionNonce": 803624458, + "isDeleted": false, + "id": "ijXUuHYP037tzyeFDiwST", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -400.1971214931342, + "y": 406.85181624738294, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 1099912276, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 1930, + "versionNonce": 1759078294, + "isDeleted": false, + "id": "A-8nDx9IIO_12ny9wwj4F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -122.95343197155967, + "y": 406.9385047581702, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1627245292, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 00:26:41", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:26:41" + }, + { + "type": "text", + "version": 2293, + "versionNonce": 964887754, + "isDeleted": false, + "id": "zq8k4l8VeCN8x0fpZneZx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -645.0670540779098, + "y": 408.9974807923321, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70, + "height": 20, + "seed": 248097236, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.191", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.191" + }, + { + "type": "rectangle", + "version": 3129, + "versionNonce": 1471415510, + "isDeleted": false, + "id": "zYq9Uzws3j3rR4Dlaa-Wq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -563.9383902085276, + "y": 438.4908009328081, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.2954661285185, + "height": 20.297183880733197, + "seed": 1532857708, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2216, + "versionNonce": 823909258, + "isDeleted": false, + "id": "RB7PbAouTLqMord5vTy4o", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -519.3967708021288, + "y": 438.6393928731747, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 1025331028, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2283, + "versionNonce": 1674115606, + "isDeleted": false, + "id": "9Sx86LDkpEBi9-tAE1OYH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -400.46343458466583, + "y": 438.6393928731747, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 698417132, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 2032, + "versionNonce": 1424742986, + "isDeleted": false, + "id": "Q1hVICdpxjpA-TpY3mT7q", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -123.2197450630913, + "y": 438.72608138396197, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 2095072468, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 00:27:07", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:27:07" + }, + { + "type": "text", + "version": 2383, + "versionNonce": 604850006, + "isDeleted": false, + "id": "Y6sQUv6HzTPY_Znc-pe_C", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -646.3333671694432, + "y": 441.1230963910306, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 77, + "height": 20, + "seed": 1943151212, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.192", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.192" + }, + { + "type": "rectangle", + "version": 3343, + "versionNonce": 1674445066, + "isDeleted": false, + "id": "pSdVkx-JCZCbW2AaCn6b2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -563.5041391910064, + "y": 472.0585767803765, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.5856676424751, + "height": 18.42915085614445, + "seed": 61377108, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2360, + "versionNonce": 148237462, + "isDeleted": false, + "id": "TzpGxKfIKXri2vQMeRpjG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -519.3967708021288, + "y": 471.2731522084487, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 1354429676, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2431, + "versionNonce": 155013066, + "isDeleted": false, + "id": "x4cGtDtaJvmdED8em0Pw5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -400.13975776449445, + "y": 471.2731522084487, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 1682710484, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4200, + "versionNonce": 1230292618, + "isDeleted": false, + "id": "zozpqYhRkzeeMU0ikG6eP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -563.1173989820096, + "y": 504.35506380067744, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 632.438455857557, + "height": 19.331987292126826, + "seed": 1726022996, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3188, + "versionNonce": 942161686, + "isDeleted": false, + "id": "JbuAVVyndg8-5g8_NCWpn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -519.3967708021288, + "y": 504.0210574467409, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 932948460, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 3255, + "versionNonce": 1825531210, + "isDeleted": false, + "id": "pT7Typ6370QAD38T3X6eS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -399.95312983017504, + "y": 504.0210574467409, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 1623014100, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 3000, + "versionNonce": 373025878, + "isDeleted": false, + "id": "vQ3inejchrSeZ2AWeZWIu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -122.7094403086005, + "y": 504.10774595752815, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 15174764, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 12:25:12", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:25:12" + }, + { + "type": "text", + "version": 1973, + "versionNonce": 1829252106, + "isDeleted": false, + "id": "fZv6GHb4VbpNcPwdkTyMp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -501.3967708021288, + "y": 512.7602890221027, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 209109076, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2093, + "versionNonce": 1743253910, + "isDeleted": false, + "id": "hx-SuBqjgW3C9Or-bL6AX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -501.3967708021288, + "y": 526.5401185675586, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 731061996, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2102, + "versionNonce": 1610226378, + "isDeleted": false, + "id": "DpMdJ4dmyx09dYrnJvqA1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -501.3967708021288, + "y": 539.7095897214043, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1642304980, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700845, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1976, + "versionNonce": 1214336726, + "isDeleted": false, + "id": "DeROn1uuPG85tiF18TBW1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -283.29863196989163, + "y": 511.53039827881145, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1344823660, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2092, + "versionNonce": 1681928586, + "isDeleted": false, + "id": "9KMNsFmrs22g01qbUz1ta", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -283.01170015171147, + "y": 525.3102278242654, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1847180116, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2101, + "versionNonce": 607978518, + "isDeleted": false, + "id": "6hcOgqYZE3lUomd17T6nW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -282.9867602478639, + "y": 538.4796989781113, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1710314476, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2022, + "versionNonce": 219508810, + "isDeleted": false, + "id": "YCNqiMxfjALt9EreZ-yKK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -45.59901732274204, + "y": 511.57940396062946, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 728707284, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2138, + "versionNonce": 225448278, + "isDeleted": false, + "id": "OXfozcWoiqhSGKCU1Hmg0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -45.31208550456006, + "y": 525.3592335060835, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1794635372, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2147, + "versionNonce": 1314182922, + "isDeleted": false, + "id": "l6-hMAr309y50JC_EkVt-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -45.287145600712506, + "y": 538.5287046599293, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1501165140, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3442, + "versionNonce": 1908999754, + "isDeleted": false, + "id": "fbKOtlBZosE_Epj0LGU1J", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -564.3536609985991, + "y": 566.8484278789748, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 633.4556360399567, + "height": 20.593894652071985, + "seed": 1800543444, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2486, + "versionNonce": 803789654, + "isDeleted": false, + "id": "VPqBPUxprXiingIFf8JDQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -529.3967708021288, + "y": 567.1453752050109, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 96, + "height": 20, + "seed": 1074383468, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "10.487.847", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "10.487.847" + }, + { + "type": "text", + "version": 2556, + "versionNonce": 1143319818, + "isDeleted": false, + "id": "dTHxGLWOgqk17Hx3UwT3y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -400.2375777995136, + "y": 567.1453752050109, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1981768276, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http://doc/1437831&is_mo...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http://doc/1437831&is_mo..." + }, + { + "type": "text", + "version": 2301, + "versionNonce": 1008664726, + "isDeleted": false, + "id": "uC0mwB22cKgjWOSevLyo-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -122.99388827793905, + "y": 567.2320637157982, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 129866988, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-17 05:50:01", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-17 05:50:01" + }, + { + "type": "text", + "version": 2643, + "versionNonce": 1505721290, + "isDeleted": false, + "id": "_mqoVPE9JSTzREp5T8dG9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -657.1075103842874, + "y": 569.6673152033059, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 304609236, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 16.383", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 16.383" + }, + { + "type": "text", + "version": 2500, + "versionNonce": 1088323030, + "isDeleted": false, + "id": "8EtD87pVLZb0pKqInpBFc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -505.3967708021288, + "y": 593.9195813138276, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 2119376748, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2684, + "versionNonce": 548500106, + "isDeleted": false, + "id": "fIMxIOQ3E11BdKz_KPav9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -505.3967708021288, + "y": 612.6940606892772, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 461495636, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2565, + "versionNonce": 322720534, + "isDeleted": false, + "id": "cwja6HbJzF6dcjGqa-A_C", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -285.50335408198544, + "y": 575.2323587542312, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 1007964652, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2742, + "versionNonce": 196514122, + "isDeleted": false, + "id": "a7Al4JRo8KwkgN0MT2RC6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -285.14285216735834, + "y": 594.0063024810895, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 2072187604, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2926, + "versionNonce": 497909846, + "isDeleted": false, + "id": "t1ep_LukFQOJz9MXnq8NV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -285.22308047687284, + "y": 612.7807818565386, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 1074476140, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2628, + "versionNonce": 2116671498, + "isDeleted": false, + "id": "6dpUWsXiT3CRU9-ItI3D-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -47.032550987864056, + "y": 575.2076191708977, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 12687444, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2805, + "versionNonce": 872875414, + "isDeleted": false, + "id": "HFN_vKhbDdt1tBcH00Zoo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -46.67204907323696, + "y": 593.981562897756, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 402769644, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2989, + "versionNonce": 939935434, + "isDeleted": false, + "id": "F3Qobhx90sdkVSapPLJMG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -46.75227738275146, + "y": 612.7560422732051, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 924020180, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3812, + "versionNonce": 1736303318, + "isDeleted": false, + "id": "NYj9aBqmdnd0QkM5t1PRh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -562.3729087027565, + "y": 662.9696997320676, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 629.5127418132788, + "height": 19.4734285591735, + "seed": 142739820, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2747, + "versionNonce": 1105649034, + "isDeleted": false, + "id": "haU1kCbuW9_yKTt7njxao", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -557.3967708021288, + "y": 662.7064140116544, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 1066308436, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 2815, + "versionNonce": 1520900118, + "isDeleted": false, + "id": "iOO-ri_0EZbneLndaR4kx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -400.58428023053386, + "y": 662.7064140116544, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 886438892, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 2560, + "versionNonce": 1493605450, + "isDeleted": false, + "id": "3coSLb6snj1VyI5z2Ia0s", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -123.34059070895933, + "y": 662.7931025224416, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 680069332, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-22 16:22:00", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 16:22:00" + }, + { + "type": "text", + "version": 2872, + "versionNonce": 360162646, + "isDeleted": false, + "id": "Isl5zcmy3QLTxg7Jallf0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -688.4542128153113, + "y": 664.4630077725648, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 119, + "height": 20, + "seed": 1191681644, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.863.744", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.863.744" + }, + { + "type": "rectangle", + "version": 3821, + "versionNonce": 1530954506, + "isDeleted": false, + "id": "FgGIPYssRtFfTkRMcC8jg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -563.5398085980914, + "y": 695.1366236269752, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.3754464133191, + "height": 19.329071290348566, + "seed": 1167642196, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2891, + "versionNonce": 1497664150, + "isDeleted": false, + "id": "El7_MD7l_3Rz2hy94pvfT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -557.3967708021288, + "y": 694.8011592721494, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 400617708, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 2968, + "versionNonce": 856658378, + "isDeleted": false, + "id": "izUvnLeMtdeHiI-B7FdlQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -400.2606034103625, + "y": 694.8011592721494, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 127132628, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 2706, + "versionNonce": 1958922198, + "isDeleted": false, + "id": "qWWGTTonKNG0ixxengBjq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -123.01691388878794, + "y": 694.8878477829367, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1458303852, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-22 18:02:12", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 18:02:12" + }, + { + "type": "rectangle", + "version": 4632, + "versionNonce": 1133430922, + "isDeleted": false, + "id": "5L9of5WhUYZ_2lFeHj6JD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -564.5456420361772, + "y": 727.2901364314722, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.8702765794457, + "height": 19.900607638888914, + "seed": 1418742100, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3714, + "versionNonce": 403135766, + "isDeleted": false, + "id": "gIRP2yDZc1Vh8WnVtQXMA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -557.3967708021288, + "y": 727.2404402509167, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 846374380, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3787, + "versionNonce": 1417226058, + "isDeleted": false, + "id": "QbzfI5ZJV6Pyr7GHKnT7Z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -400.1726927735215, + "y": 727.2404402509167, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1608777428, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​sozcu​.​com​.​tr​/​oaut...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sozcu​.​com​.​tr​/​oaut..." + }, + { + "type": "text", + "version": 3529, + "versionNonce": 679955030, + "isDeleted": false, + "id": "TSWOv_g9-_zzQjxGLRo_d", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -122.83028595446854, + "y": 727.327128761704, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 2139031660, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-19 00:09:42", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-19 00:09:42" + }, + { + "type": "text", + "version": 2505, + "versionNonce": 2116660746, + "isDeleted": false, + "id": "IHUs8beuhrshsf6LM0eoq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -501.3967708021288, + "y": 736.2343500529055, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 35980372, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2621, + "versionNonce": 353865622, + "isDeleted": false, + "id": "G5QE9Mv_aOMeSkAveeLtY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -501.3967708021288, + "y": 750.0141795983614, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1641749228, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2630, + "versionNonce": 362503370, + "isDeleted": false, + "id": "Al--4u4IeZdZp8gRnyuyd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -501.3967708021288, + "y": 763.1836507522071, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 287922644, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2506, + "versionNonce": 703409366, + "isDeleted": false, + "id": "5Qw4nqbMq5pB0ZW7MsKlv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -283.41947761575875, + "y": 735.0044593096143, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1947262316, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2621, + "versionNonce": 409547658, + "isDeleted": false, + "id": "y7DjbHb9TFInBC5YRRJJx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -283.2192343083659, + "y": 748.697600344281, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 939982676, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2630, + "versionNonce": 1688019478, + "isDeleted": false, + "id": "jhWOMEZvMo-zetSTiA70d", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -283.19429440451836, + "y": 761.8670714981267, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1869238252, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2552, + "versionNonce": 416166474, + "isDeleted": false, + "id": "kp5LK0_W1jhR0HgWCPYm_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -45.71986296861098, + "y": 735.0534649914323, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1326707924, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2667, + "versionNonce": 1209823062, + "isDeleted": false, + "id": "W4fLIuwBgqmfKLS5I2C4A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -45.519619661214506, + "y": 748.746606026099, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1408332396, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2676, + "versionNonce": 698702090, + "isDeleted": false, + "id": "e45V1H8SOju3H8_-NF20T", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -45.49467975736695, + "y": 761.9160771799448, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 870726228, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3965, + "versionNonce": 119523402, + "isDeleted": false, + "id": "ZnC7tHpssZlkQgmqBbV0J", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -563.5309018875965, + "y": 790.8637445869201, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.0506824293966, + "height": 19.840790040348676, + "seed": 1257431252, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2643, + "versionNonce": 1373059414, + "isDeleted": false, + "id": "dRsyzG0tTDBmsOlm-CVSh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -557.3967708021288, + "y": 790.7841396070945, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 986138220, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.294.961.484", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.294.961.484" + }, + { + "type": "text", + "version": 2803, + "versionNonce": 1163144970, + "isDeleted": false, + "id": "hQEVfBC20A6tLeLrtnrz-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -399.4173630996046, + "y": 790.7841396070945, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 755476052, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "https​:​/​/​m​.​sport​.​airway​/​?...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​m​.​sport​.​airway​/​?..." + }, + { + "type": "text", + "version": 2524, + "versionNonce": 210869910, + "isDeleted": false, + "id": "nxWW7ddUB-VhTZ6k3Y-ha", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -121.9637281246728, + "y": 790.7841396070945, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1164679404, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 12:05:41", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:05:41" + }, + { + "type": "text", + "version": 2763, + "versionNonce": 1976417738, + "isDeleted": false, + "id": "73I2nurlCUI2VwgThPYvr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -687.4423437187958, + "y": 792.6451422112608, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 121, + "height": 20, + "seed": 1265089492, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700846, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.867.680", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.867.680" + }, + { + "type": "rectangle", + "version": 2763, + "versionNonce": 878635722, + "isDeleted": false, + "id": "fdKBZ7au4Vj_VTNmlJ4Gr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1226.25436119329, + "y": 2312.7902346924393, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 132.17360182709456, + "seed": 677157356, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700853, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4081, + "versionNonce": 533148694, + "isDeleted": false, + "id": "0Ts5CSD3IRrXDLrhNs1q4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1218.1612083608773, + "y": 2322.6710607030027, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 279.3320451760253, + "height": 20.93344520573327, + "seed": 1832570964, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700853, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1731, + "versionNonce": 176570442, + "isDeleted": false, + "id": "fxzfvu7a_64f2hx0KYuJG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1234.893413221989, + "y": 2325.6982559087382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 102, + "height": 20, + "seed": 886574828, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700853, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "block_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "text", + "version": 1964, + "versionNonce": 1913497238, + "isDeleted": false, + "id": "sVCTgV1Z59OdhAzemKrPm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1284.6998679744986, + "y": 2366.1726333954784, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1494862676, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700853, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2080, + "versionNonce": 1005991370, + "isDeleted": false, + "id": "5roG5Q9aoFAAG4mcy70-q", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1284.9867997926806, + "y": 2379.9524629409343, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 918176748, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700853, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2089, + "versionNonce": 1309172694, + "isDeleted": false, + "id": "8RlyVhOIyCfaOI3NrZA-8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1285.0117396965281, + "y": 2393.12193409478, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1542275284, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700853, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2177, + "versionNonce": 1073802378, + "isDeleted": false, + "id": "g-m-TZYzjeOuydK8GIFFo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1427.1452214491503, + "y": 2364.8560541414, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 354608748, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700853, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2293, + "versionNonce": 1849260310, + "isDeleted": false, + "id": "dwI2bk25tX3miPELYgnXl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1427.4321532673305, + "y": 2378.635883686854, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1874200148, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700853, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2302, + "versionNonce": 1191627594, + "isDeleted": false, + "id": "GcxWQOfFzJPaZMSpY8jYa", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1427.457093171178, + "y": 2391.8053548406997, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 324221164, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700853, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3329, + "versionNonce": 706078294, + "isDeleted": false, + "id": "yR8U23V91OOx3k7ZBaUn0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1218.6059789310486, + "y": 2354.7248390325167, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 278.4357801359186, + "height": 20.77857388220443, + "seed": 1766464468, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700853, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3259, + "versionNonce": 1947205834, + "isDeleted": false, + "id": "Y1uKvcu_fQ1ipQYHr-DKd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1219.5715563357744, + "y": 2414.47266065032, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 279.40791415998257, + "height": 21.73758959076075, + "seed": 468905452, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700853, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2085, + "versionNonce": 853622294, + "isDeleted": false, + "id": "ANkNzPYuy9_BsBmF5gR3K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1304.1605892330197, + "y": 2272.1357878225444, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 109, + "height": 25, + "seed": 2011577428, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700854, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID.mrk", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.mrk" + }, + { + "type": "text", + "version": 1397, + "versionNonce": 1432999498, + "isDeleted": false, + "id": "NNvdCe6tZ_vz6Z_tnQi20", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1111.9723597745635, + "y": 2417.483954693459, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 84, + "height": 20, + "seed": 233399020, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "KuL0PHE0rSQ-wquK_N1zX", + "type": "arrow" + } + ], + "updated": 1672163700854, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1082", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1082" + }, + { + "type": "text", + "version": 1507, + "versionNonce": 1870465878, + "isDeleted": false, + "id": "b4uVaa_f56sO1ESMw0Fqe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1140.9489222745635, + "y": 2325.0280395148866, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56, + "height": 20, + "seed": 704877012, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "VAVd-jpfcqV8eCE3akPbS", + "type": "arrow" + } + ], + "updated": 1672163700854, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 0", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 0" + }, + { + "type": "text", + "version": 1514, + "versionNonce": 455900426, + "isDeleted": false, + "id": "sAsS8YABjrT8epHSPTWeZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1143.3942347745635, + "y": 2358.2233520148866, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49, + "height": 20, + "seed": 387327340, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6gkr09UfyYbzjuh6y6WGW", + "type": "arrow" + } + ], + "updated": 1672163700854, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1" + }, + { + "type": "text", + "version": 2402, + "versionNonce": 578245386, + "isDeleted": false, + "id": "KDUCZDbXse_FRGUztJgjm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1378.4478062031349, + "y": 2487.5513452564546, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 112, + "height": 80, + "seed": 1198692204, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "9Yi3inzhOmDgl8CzNHG8c", + "type": "arrow" + } + ], + "updated": 1672163700854, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "locations of \ngranules in \ndecompressed \nblock data", + "baseline": 74, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "locations of \ngranules in \ndecompressed \nblock data" + }, + { + "type": "text", + "version": 1895, + "versionNonce": 183263690, + "isDeleted": false, + "id": "f1apoAydNSroVvnSulrwE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1370.5369059055165, + "y": 2322.8962733318504, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 120, + "height": 20, + "seed": 1790515820, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700854, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule_offset" + }, + { + "type": "text", + "version": 1991, + "versionNonce": 836433878, + "isDeleted": false, + "id": "zT-D3QT33UpfTco9LOGnC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1370.9805333564964, + "y": 2355.417974720738, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 120, + "height": 20, + "seed": 2088036052, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule_offset" + }, + { + "type": "text", + "version": 1992, + "versionNonce": 659658890, + "isDeleted": false, + "id": "EPKgp0Rg9M8BZANi_0hg5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1370.8725370329673, + "y": 2414.622937956032, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 120, + "height": 20, + "seed": 60912724, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "9Yi3inzhOmDgl8CzNHG8c", + "type": "arrow" + } + ], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule_offset" + }, + { + "type": "text", + "version": 1833, + "versionNonce": 1654230294, + "isDeleted": false, + "id": "qPOOlO6NgpPAbUkodneif", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1234.975937768261, + "y": 2358.382129132503, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 102, + "height": 20, + "seed": 1740502868, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "block_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "text", + "version": 1846, + "versionNonce": 1466038090, + "isDeleted": false, + "id": "gE8lHM6phGgTWynmC_Kii", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1236.8095774741437, + "y": 2417.4538203089733, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 102, + "height": 20, + "seed": 80754004, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ywAsFjf4WphpubAH3rMk8", + "type": "arrow" + } + ], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "block_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "text", + "version": 2379, + "versionNonce": 1095989846, + "isDeleted": false, + "id": "jLKzuR8Qsnbedkqd6ubFX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1240.5627665338557, + "y": 2488.401778753716, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 102, + "height": 80, + "seed": 1693051092, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ywAsFjf4WphpubAH3rMk8", + "type": "arrow" + } + ], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "locations of \nblocks in \ncompressed \ncolumn file", + "baseline": 74, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "locations of \nblocks in \ncompressed \ncolumn file" + }, + { + "type": "arrow", + "version": 605, + "versionNonce": 1097686230, + "isDeleted": false, + "id": "ywAsFjf4WphpubAH3rMk8", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1285.2502665338557, + "y": 2479.960372503716, + "strokeColor": "#000000", + "backgroundColor": "#15223c", + "width": 1.15625, + "height": 36.359375, + "seed": 800950252, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "startBinding": { + "elementId": "jLKzuR8Qsnbedkqd6ubFX", + "focus": -0.09129231596882527, + "gap": 8.44140625 + }, + "endBinding": { + "elementId": "gE8lHM6phGgTWynmC_Kii", + "focus": 0.08240871417353615, + "gap": 6.147177194742653 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1.15625, + -36.359375 + ] + ] + }, + { + "type": "arrow", + "version": 642, + "versionNonce": 2090291734, + "isDeleted": false, + "id": "9Yi3inzhOmDgl8CzNHG8c", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1429.144797783857, + "y": 2482.054122503716, + "strokeColor": "#000000", + "backgroundColor": "#15223c", + "width": 1.8125, + "height": 37.75, + "seed": 2088078292, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "startBinding": { + "elementId": "KDUCZDbXse_FRGUztJgjm", + "focus": -0.053841688355087666, + "gap": 5.497222752738708 + }, + "endBinding": { + "elementId": "EPKgp0Rg9M8BZANi_0hg5", + "focus": 0.07415983734863017, + "gap": 9.681184547684097 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1.8125, + -37.75 + ] + ] + }, + { + "type": "text", + "version": 2044, + "versionNonce": 953090634, + "isDeleted": false, + "id": "BDZXPQPNfobP6Y1LAJpE-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 961.8791727838568, + "y": 2290.826583441216, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 94, + "height": 40, + "seed": 1778324948, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "VAVd-jpfcqV8eCE3akPbS", + "type": "arrow" + } + ], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "location of \ngranule 0", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "location of \ngranule 0" + }, + { + "type": "text", + "version": 2104, + "versionNonce": 1095802710, + "isDeleted": false, + "id": "ZL-_7v_-1qmBR8x-OIALx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 962.5735087213568, + "y": 2357.472091253716, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 86, + "height": 40, + "seed": 1716250836, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6gkr09UfyYbzjuh6y6WGW", + "type": "arrow" + } + ], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "location of\ngranule 1", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "location of\ngranule 1" + }, + { + "type": "text", + "version": 2119, + "versionNonce": 822880522, + "isDeleted": false, + "id": "kdg1HDiQaDiOfK4DmsKb4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 957.4231180963568, + "y": 2429.444747503716, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 103, + "height": 40, + "seed": 753034860, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "KuL0PHE0rSQ-wquK_N1zX", + "type": "arrow" + } + ], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "location of \ngranule 1082", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "location of \ngranule 1082" + }, + { + "type": "arrow", + "version": 574, + "versionNonce": 1408124054, + "isDeleted": false, + "id": "VAVd-jpfcqV8eCE3akPbS", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1063.2444071588568, + "y": 2309.8069950027675, + "strokeColor": "#000000", + "backgroundColor": "#15223c", + "width": 76.0693359375, + "height": 21.84099656669332, + "seed": 1565253844, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "startBinding": { + "elementId": "BDZXPQPNfobP6Y1LAJpE-", + "focus": -0.49646516033010085, + "gap": 7.365234375 + }, + "endBinding": { + "elementId": "b4uVaa_f56sO1ESMw0Fqe", + "focus": -0.28431140681285944, + "gap": 1.6351791782067266 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 76.0693359375, + 21.84099656669332 + ] + ] + }, + { + "type": "arrow", + "version": 496, + "versionNonce": 1551267786, + "isDeleted": false, + "id": "6gkr09UfyYbzjuh6y6WGW", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1057.0920634088568, + "y": 2374.6900936406937, + "strokeColor": "#000000", + "backgroundColor": "#15223c", + "width": 79.6728515625, + "height": 7.038138873516118, + "seed": 1989969132, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "startBinding": { + "elementId": "ZL-_7v_-1qmBR8x-OIALx", + "focus": 0.07433430851635363, + "gap": 8.5185546875 + }, + "endBinding": { + "elementId": "sAsS8YABjrT8epHSPTWeZ", + "focus": 0.2730369878904534, + "gap": 6.629319803206727 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 79.6728515625, + -7.038138873516118 + ] + ] + }, + { + "type": "arrow", + "version": 520, + "versionNonce": 639975894, + "isDeleted": false, + "id": "KuL0PHE0rSQ-wquK_N1zX", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1062.0822977838568, + "y": 2448.316108846946, + "strokeColor": "#000000", + "backgroundColor": "#15223c", + "width": 45.2099609375, + "height": 17.944919312151114, + "seed": 623537260, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "startBinding": { + "elementId": "kdg1HDiQaDiOfK4DmsKb4", + "focus": 0.4938361234900873, + "gap": 1.6591796875 + }, + "endBinding": { + "elementId": "NNvdCe6tZ_vz6Z_tnQi20", + "focus": 0.5864545974028658, + "gap": 4.680101053206727 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 45.2099609375, + -17.944919312151114 + ] + ] + }, + { + "type": "rectangle", + "version": 3269, + "versionNonce": 724102794, + "isDeleted": false, + "id": "moibOvP6fFX4zdVL20rM-", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1694.7840216370093, + "y": 2315.453289773017, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 132.17360182709456, + "seed": 648483284, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4586, + "versionNonce": 722114326, + "isDeleted": false, + "id": "g92zEEZnwdPvo_P_-md5F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1686.6908688045967, + "y": 2325.3341157835803, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 279.3320451760253, + "height": 20.93344520573327, + "seed": 1214948716, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2236, + "versionNonce": 1373539658, + "isDeleted": false, + "id": "cKaF5cHMfO-LulnkBmt2Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1703.423073665708, + "y": 2328.361310989316, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 102, + "height": 20, + "seed": 1158526804, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "block_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "text", + "version": 2469, + "versionNonce": 722682966, + "isDeleted": false, + "id": "AjuUpQuP3SqjoJPuKbYAw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1753.229528418218, + "y": 2368.835688476056, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 625678316, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2585, + "versionNonce": 905073674, + "isDeleted": false, + "id": "Somfi5AGJX6HJu3bfi9Pt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1753.5164602364, + "y": 2382.615518021512, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 2055449812, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2594, + "versionNonce": 403982742, + "isDeleted": false, + "id": "SvxSIHuh65r3mvLJkaD6J", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1753.5414001402476, + "y": 2395.7849891753576, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 578370156, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2682, + "versionNonce": 1499415242, + "isDeleted": false, + "id": "cjQ4gA8-X4lRtYOwtv4cG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1895.67488189287, + "y": 2367.5191092219775, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1218376276, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2798, + "versionNonce": 1631758038, + "isDeleted": false, + "id": "PHG97rTLYCp7k2dLcA6rQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1895.9618137110501, + "y": 2381.2989387674315, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1254034668, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2807, + "versionNonce": 1187010954, + "isDeleted": false, + "id": "5nujjwIfxJVHvTBivkCnt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1895.9867536148977, + "y": 2394.4684099212773, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 238389204, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3834, + "versionNonce": 1194548246, + "isDeleted": false, + "id": "1Q_axHfCOBS1GjaHQCs2i", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1687.135639374768, + "y": 2357.3878941130943, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 278.4357801359186, + "height": 20.77857388220443, + "seed": 1067880300, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3765, + "versionNonce": 2102433866, + "isDeleted": false, + "id": "cBo0Wx5inLHFRPfMjwfzb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1688.1012167794931, + "y": 2417.1357157308976, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 279.40791415998257, + "height": 21.73758959076075, + "seed": 1599958356, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2613, + "versionNonce": 802908502, + "isDeleted": false, + "id": "JIY9Hq_-m2I6qkbYp1Wy9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1786.6902496767389, + "y": 2274.798842903122, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 78, + "height": 25, + "seed": 1635369452, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "ULR.mrk", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ULR.mrk" + }, + { + "type": "text", + "version": 1903, + "versionNonce": 1558904586, + "isDeleted": false, + "id": "692pq1q3--XyG8ad3v2EM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1580.5020202182827, + "y": 2420.1470097740366, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 84, + "height": 20, + "seed": 1567400660, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1082", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1082" + }, + { + "type": "text", + "version": 2013, + "versionNonce": 2056244886, + "isDeleted": false, + "id": "7_0oMsXxAqKxXzPyrseDf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1609.4785827182827, + "y": 2327.691094595464, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56, + "height": 20, + "seed": 2000856172, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 0", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 0" + }, + { + "type": "text", + "version": 2020, + "versionNonce": 302681546, + "isDeleted": false, + "id": "3jcOzdCSifcUTDoTcHBp9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1611.9238952182827, + "y": 2360.886407095464, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49, + "height": 20, + "seed": 251209812, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1" + }, + { + "type": "text", + "version": 2400, + "versionNonce": 30033034, + "isDeleted": false, + "id": "onyXlikavkJekRt1K3Uz2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1839.0665663492355, + "y": 2325.559328412428, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 120, + "height": 20, + "seed": 211646828, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule_offset" + }, + { + "type": "text", + "version": 2496, + "versionNonce": 173121814, + "isDeleted": false, + "id": "J12iAWfevSlm-X53PwCsU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1839.5101938002153, + "y": 2358.0810298013157, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 120, + "height": 20, + "seed": 824320852, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule_offset" + }, + { + "type": "text", + "version": 2498, + "versionNonce": 904209226, + "isDeleted": false, + "id": "H0Aojn7Cbid8n-zJl7wuz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1839.4021974766865, + "y": 2417.2859930366094, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 120, + "height": 20, + "seed": 67333100, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule_offset" + }, + { + "type": "text", + "version": 2338, + "versionNonce": 1625886294, + "isDeleted": false, + "id": "FTl5JDMlzhHwP6SFf5gFL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1703.50559821198, + "y": 2361.0451842130806, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 102, + "height": 20, + "seed": 1093310676, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "block_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "text", + "version": 2352, + "versionNonce": 1219897866, + "isDeleted": false, + "id": "cciu-Eq8n1zaIXfNLDuy_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1705.3392379178629, + "y": 2420.116875389551, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 102, + "height": 20, + "seed": 788991596, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "block_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "rectangle", + "version": 3533, + "versionNonce": 1165743574, + "isDeleted": false, + "id": "kDp1vUzo53V2bnJFP5m6f", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1561.0695291461213, + "y": 2603.322430398018, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 132.17360182709456, + "seed": 1109606868, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4849, + "versionNonce": 1094032010, + "isDeleted": false, + "id": "EfmM2TO1h8pHboiroHkzx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1552.9763763137087, + "y": 2613.203256408581, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 279.3320451760253, + "height": 20.93344520573327, + "seed": 1443460460, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2499, + "versionNonce": 1248766742, + "isDeleted": false, + "id": "7sTy4KJa5r6AG57VMjMJH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1569.70858117482, + "y": 2616.2304516143167, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 102, + "height": 20, + "seed": 25421652, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "block_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "text", + "version": 2732, + "versionNonce": 1500887370, + "isDeleted": false, + "id": "5BVCBYipLqCGV4KwURJLl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1619.51503592733, + "y": 2656.704829101057, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 915400684, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2848, + "versionNonce": 1825888342, + "isDeleted": false, + "id": "DCe58NiaSdoX4SxL1P4w9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1619.801967745512, + "y": 2670.484658646513, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 682876116, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2857, + "versionNonce": 432275466, + "isDeleted": false, + "id": "wOx6B4E19tLezqgf4ifcZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1619.8269076493596, + "y": 2683.6541298003585, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1386482284, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2945, + "versionNonce": 1417895318, + "isDeleted": false, + "id": "nq3gFFNtxlsTWAA1crsjv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1761.9603894019817, + "y": 2655.3882498469784, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 558441044, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3061, + "versionNonce": 773549770, + "isDeleted": false, + "id": "Xruoa6-io7ONSRS7gAn6u", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1762.247321220162, + "y": 2669.1680793924324, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1292885228, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3070, + "versionNonce": 1722759894, + "isDeleted": false, + "id": "1jCJgvbE4dpIUWUmvcyJO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1762.2722611240094, + "y": 2682.337550546278, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 840546260, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4097, + "versionNonce": 186058122, + "isDeleted": false, + "id": "lp3VUJp0FzXRqPPVLe9oK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1553.42114688388, + "y": 2645.257034738095, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 278.4357801359186, + "height": 20.77857388220443, + "seed": 1599954796, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4029, + "versionNonce": 434991126, + "isDeleted": false, + "id": "Y3Hv1leLPB9ftKYg2JQoC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1554.3867242886051, + "y": 2705.0048563558994, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 279.40791415998257, + "height": 21.73758959076075, + "seed": 1463524692, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2925, + "versionNonce": 1509016650, + "isDeleted": false, + "id": "U_YNezHPtlhhytJHsUkRS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1622.9757571858506, + "y": 2562.667983528123, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 137, + "height": 25, + "seed": 30839276, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "EventTime.mrk", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "EventTime.mrk" + }, + { + "type": "text", + "version": 2167, + "versionNonce": 1244855638, + "isDeleted": false, + "id": "q2y_BWoYnHnQT1YoF6rRc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1446.7875277273945, + "y": 2708.0161503990385, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 84, + "height": 20, + "seed": 436523732, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1082", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1082" + }, + { + "type": "text", + "version": 2277, + "versionNonce": 1686547210, + "isDeleted": false, + "id": "kxJbHQHgV7VjPN4DOvHgb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1475.7640902273945, + "y": 2615.560235220465, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56, + "height": 20, + "seed": 327513196, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 0", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 0" + }, + { + "type": "text", + "version": 2284, + "versionNonce": 215278230, + "isDeleted": false, + "id": "2s7GiUTdLZp2rzJT-zg4h", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1478.2094027273945, + "y": 2648.755547720465, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49, + "height": 20, + "seed": 1762351188, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1" + }, + { + "type": "text", + "version": 2663, + "versionNonce": 22067658, + "isDeleted": false, + "id": "ArTZN_DLN8dAr1tYATOc6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1705.3520738583472, + "y": 2613.428469037429, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 120, + "height": 20, + "seed": 1881484756, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule_offset" + }, + { + "type": "text", + "version": 2759, + "versionNonce": 76029910, + "isDeleted": false, + "id": "NPxsQofyq94BAoH3DuXlu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1705.7957013093271, + "y": 2645.9501704263166, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 120, + "height": 20, + "seed": 1919699308, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule_offset" + }, + { + "type": "text", + "version": 2762, + "versionNonce": 2137714826, + "isDeleted": false, + "id": "KUsQT8a6jgoQDMhQnyg9K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1705.6877049857983, + "y": 2705.155133661611, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 120, + "height": 20, + "seed": 1885885268, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule_offset" + }, + { + "type": "text", + "version": 2601, + "versionNonce": 895595798, + "isDeleted": false, + "id": "xucS1SX2Yzdks84pgrya7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1569.791105721092, + "y": 2648.9143248380815, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 102, + "height": 20, + "seed": 1735932908, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "block_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "text", + "version": 2616, + "versionNonce": 311447370, + "isDeleted": false, + "id": "Ioj3J7QMkVeqdmcKHNf1J", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1571.6247454269749, + "y": 2707.9860160145527, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 102, + "height": 20, + "seed": 405457108, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "block_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "rectangle", + "version": 3652, + "versionNonce": 1058788874, + "isDeleted": false, + "id": "1nLDuL3RqTev92zDCVP8m", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1008.8597484916295, + "y": 1416.3311926854121, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 451.64952256944457, + "height": 327.69087921627045, + "seed": 1306112748, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2637, + "versionNonce": 834398102, + "isDeleted": false, + "id": "zq4wPnaPzVb_m1wUKkCjm", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1031.1284655601517, + "y": 1469.262670549996, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 256.8020156926412, + "seed": 1543520724, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1916, + "versionNonce": 1174963402, + "isDeleted": false, + "id": "nWaENb6CnQyiTWDg9a9hD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1059.6608301829942, + "y": 1474.491105171026, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 72, + "height": 25, + "seed": 343700844, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "rectangle", + "version": 2864, + "versionNonce": 1615234262, + "isDeleted": false, + "id": "g-v0LTRlAltrmO3R1gQxs", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1179.8936026582955, + "y": 1468.0006805326339, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 256.999591503268, + "height": 257.10693993506436, + "seed": 1472259924, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3628, + "versionNonce": 284253066, + "isDeleted": false, + "id": "4RNpuOxj3Y_EsXnqZTd00", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1023.035312727739, + "y": 1555.069967148795, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 422.551254734849, + "height": 21.39989741161571, + "seed": 782428140, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1804, + "versionNonce": 906721814, + "isDeleted": false, + "id": "bnCToVqZE3jDASSnyxV_5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1044.6637849499616, + "y": 1557.5388286291002, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 105, + "height": 20, + "seed": 793828564, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "737.456.303", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "737.456.303" + }, + { + "type": "text", + "version": 1907, + "versionNonce": 504453706, + "isDeleted": false, + "id": "Z3gSU-HYdw_t21YATxu0B", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1182.9450349499616, + "y": 1557.1716411291002, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1347881580, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http://e.mail.yandsearch...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http://e.mail.yandsearch..." + }, + { + "type": "text", + "version": 1712, + "versionNonce": 167757654, + "isDeleted": false, + "id": "Pr8x5pVhR1yUB9GUd2kDh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1281.4688444737708, + "y": 1474.9162311278724, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 41, + "height": 25, + "seed": 1279664724, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "text", + "version": 2183, + "versionNonce": 1816363274, + "isDeleted": false, + "id": "dHaFoPNhZPZw_Gjd-48Ow", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1089.5739723413603, + "y": 1666.0379920471532, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 476241132, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2299, + "versionNonce": 209218710, + "isDeleted": false, + "id": "-C1-I0-w82I75mQBRCwZx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1089.8609041595423, + "y": 1679.817821592609, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1970714580, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2308, + "versionNonce": 1728237514, + "isDeleted": false, + "id": "U6zYV0O2mB5wGgJsBfewu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1089.8858440633899, + "y": 1692.9872927464548, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1280335724, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2272, + "versionNonce": 455764438, + "isDeleted": false, + "id": "rIuVZJ0YUkG1z2etFf2dh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1302.019325816012, + "y": 1664.7214127930747, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 653827412, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2388, + "versionNonce": 1382696586, + "isDeleted": false, + "id": "gRqDM_KFA3VHJE--9uJxO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1302.3062576341922, + "y": 1678.5012423385288, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1483313644, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2397, + "versionNonce": 355122966, + "isDeleted": false, + "id": "JFhKt6LgsMy3pFeENoH23", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1302.3311975380398, + "y": 1691.6707134923745, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1780601556, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3274, + "versionNonce": 926213450, + "isDeleted": false, + "id": "I6vQn5c2MwYmaX-VftQl9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1023.4800832979104, + "y": 1587.7924035665446, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 422.8751183712125, + "height": 20.649897411616156, + "seed": 532182124, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1967, + "versionNonce": 787377238, + "isDeleted": false, + "id": "7hIRlRKfFo3ty2ih84Qgi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1046.229649270133, + "y": 1588.5151712968495, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 105, + "height": 20, + "seed": 763910228, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "742.414.531", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "742.414.531" + }, + { + "type": "text", + "version": 2061, + "versionNonce": 1321053194, + "isDeleted": false, + "id": "1hPKYuTkUId6YkuSpyfxg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1185.4065095122896, + "y": 1589.2651712968493, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 268895980, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http://rabota.ru/yandex ...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http://rabota.ru/yandex ..." + }, + { + "type": "text", + "version": 1982, + "versionNonce": 1989521802, + "isDeleted": false, + "id": "nJ-9UjLwPoInnMqmksQ-Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1182.168884776353, + "y": 1424.8306501506904, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 101, + "height": 25, + "seed": 1552628716, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "text", + "version": 1593, + "versionNonce": 951775306, + "isDeleted": false, + "id": "Vw9m1zH2jyO1i8swYgB9Q", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 933.7019328914253, + "y": 1557.8933981665618, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 1175772780, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 174", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 174" + }, + { + "type": "text", + "version": 1598, + "versionNonce": 2028114262, + "isDeleted": false, + "id": "Rgf2QWPlwJTU_8iG8htEh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 929.2683391414253, + "y": 1591.0887106665618, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 2030014036, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 175", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 175" + }, + { + "type": "rectangle", + "version": 3525, + "versionNonce": 1375995786, + "isDeleted": false, + "id": "dC8hsfcGRr0jcIjv3ibmH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1021.8892189983467, + "y": 1620.9376351795495, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 422.8751183712125, + "height": 20.649897411616156, + "seed": 408662484, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "BltJEdlS1EvGPQMbe6C4b", + "type": "arrow" + } + ], + "updated": 1672163700855, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2210, + "versionNonce": 1170837014, + "isDeleted": false, + "id": "vVOWnf9vIGOpZx4RJKQPP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1044.7598787205693, + "y": 1621.6604029098542, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 105, + "height": 20, + "seed": 1909458284, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "747.148.242", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "747.148.242" + }, + { + "type": "text", + "version": 2300, + "versionNonce": 2146338378, + "isDeleted": false, + "id": "dvJr3RpPSD41jrVF33-mb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1183.6778474705693, + "y": 1622.4104029098542, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1462654804, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700855, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http://fanati-avtomobile...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http://fanati-avtomobile..." + }, + { + "type": "text", + "version": 1852, + "versionNonce": 551246678, + "isDeleted": false, + "id": "lxMcju7oD2UblqnUiAf9g", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 927.6774748418616, + "y": 1624.2339422795671, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 990148588, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700856, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 176", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 176" + }, + { + "type": "rectangle", + "version": 3633, + "versionNonce": 1905995018, + "isDeleted": false, + "id": "xq1Hmll1rth4pLVjjbbdW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1022.9749704864412, + "y": 1654.2083755069298, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 422.8751183712125, + "height": 20.649897411616156, + "seed": 1167634284, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700856, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2316, + "versionNonce": 1791066262, + "isDeleted": false, + "id": "QjtKD_-C8GCB2RWZJmP16", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1044.703656777351, + "y": 1654.0731166685464, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 105, + "height": 20, + "seed": 18697556, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700856, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "751.802.947", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "751.802.947" + }, + { + "type": "text", + "version": 2412, + "versionNonce": 1015348170, + "isDeleted": false, + "id": "E92tV1UsZ7nLG7fSb64ls", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1184.7635989586638, + "y": 1655.6811432372335, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 606593516, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700856, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http://image&img_url=htt...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http://image&img_url=htt..." + }, + { + "type": "text", + "version": 1959, + "versionNonce": 1999699414, + "isDeleted": false, + "id": "qxI9BByIy3N9yQghVQ32o", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 930.7632263299561, + "y": 1657.5046826069474, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 66, + "height": 20, + "seed": 2083554004, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700856, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 177", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 177" + }, + { + "type": "text", + "version": 2130, + "versionNonce": 960257418, + "isDeleted": false, + "id": "zkF-yXsWdsHC_jlId5-Qq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1496.4859621281198, + "y": 1620.3001948044835, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 112, + "height": 20, + "seed": 1553655788, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "BltJEdlS1EvGPQMbe6C4b", + "type": "arrow" + } + ], + "updated": 1672163700856, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "select granule", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "select granule" + }, + { + "type": "arrow", + "version": 818, + "versionNonce": 1298765846, + "isDeleted": false, + "id": "BltJEdlS1EvGPQMbe6C4b", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1448.435180878119, + "y": 1628.874413554484, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 43.55859375, + "height": 1.9140625, + "seed": 1635879020, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700856, + "link": null, + "locked": false, + "startBinding": { + "elementId": "dC8hsfcGRr0jcIjv3ibmH", + "focus": -0.6036155620159408, + "gap": 3.6708435085597557 + }, + "endBinding": { + "elementId": "zkF-yXsWdsHC_jlId5-Qq", + "focus": -0.25250806832497674, + "gap": 4.4921875000009095 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 43.55859375, + 1.9140625 + ] + ] + }, + { + "type": "rectangle", + "version": 4392, + "versionNonce": 2097838934, + "isDeleted": false, + "id": "aEhttCUFLsQDizHodrGDT", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1008.2711033584119, + "y": 1001.4133599014169, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 451.64952256944457, + "height": 253.11610243055577, + "seed": 2101334498, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3341, + "versionNonce": 191761674, + "isDeleted": false, + "id": "QzdbT54E-9in4lHVmuDIN", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1030.539820426934, + "y": 1054.4659315160006, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 182.95714962121258, + "seed": 1422406974, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2804, + "versionNonce": 873242774, + "isDeleted": false, + "id": "T_Hmeit4TgUlSfzg9HsX-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1059.0721850497766, + "y": 1059.6943661370306, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 72, + "height": 25, + "seed": 1659848098, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "rectangle", + "version": 3615, + "versionNonce": 1492900810, + "isDeleted": false, + "id": "UJcRC5CuQD3LDBq0mi8sv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1179.304957525078, + "y": 1053.0867539986384, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 256.999591503268, + "height": 183.92223011363598, + "seed": 2060115326, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4470, + "versionNonce": 706223574, + "isDeleted": false, + "id": "7OXC2HtxOCeebeqv5O7_8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1022.4466675945214, + "y": 1094.2732281148, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 422.551254734849, + "height": 21.39989741161571, + "seed": 301613410, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2639, + "versionNonce": 962712202, + "isDeleted": false, + "id": "D0tiBmfqizIVi8Hymauea", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1083.313421066744, + "y": 1097.7668755264176, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 1389264318, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "240.923", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 2741, + "versionNonce": 1682043670, + "isDeleted": false, + "id": "i7IvaB8aEXlUaOKzYFRgr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1182.356389816744, + "y": 1096.5168755264176, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1706018082, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "3mRchANiENPPmEHMVvXfw", + "type": "arrow" + } + ], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 2600, + "versionNonce": 1868230986, + "isDeleted": false, + "id": "Lvfk1WNKvo2jjpdLWCPpz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1280.8801993405532, + "y": 1060.119492093877, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 41, + "height": 25, + "seed": 1643386366, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "text", + "version": 2890, + "versionNonce": 2097094742, + "isDeleted": false, + "id": "Nwb7n8BjXHjw-llru2plk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1088.9853272081427, + "y": 1138.2412530131578, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 2004799714, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3006, + "versionNonce": 776091658, + "isDeleted": false, + "id": "EwOEIL9JGNJuxmfcdtBt2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1089.2722590263247, + "y": 1152.0210825586137, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1631364670, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3015, + "versionNonce": 2015667606, + "isDeleted": false, + "id": "6YDMWeCVkevT5FVObPUtl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1089.2971989301723, + "y": 1165.1905537124594, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1526097058, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2977, + "versionNonce": 101885642, + "isDeleted": false, + "id": "kmpxdL5vWaF6VRXljdMS9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1301.4306806827944, + "y": 1136.9246737590793, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1099509374, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3093, + "versionNonce": 384271062, + "isDeleted": false, + "id": "kI0xfD-QXOFG94k__NFL_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1301.7176125009746, + "y": 1150.7045033045333, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1506115682, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3102, + "versionNonce": 1332166026, + "isDeleted": false, + "id": "m281l4J2WMbgJgpW9-2zx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1301.7425524048222, + "y": 1163.873974458379, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 798666430, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4111, + "versionNonce": 735885334, + "isDeleted": false, + "id": "9DUadkYR7DysB7iitCu6y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1022.8914381646928, + "y": 1126.9956645325492, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 422.8751183712125, + "height": 20.649897411616156, + "seed": 800793634, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "8oR4MyfX4jHtsAYeNAcq2", + "type": "arrow" + } + ], + "updated": 1672163700868, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2791, + "versionNonce": 393935946, + "isDeleted": false, + "id": "pNEG1HCjjczUaiuTbH1Iw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1064.7620978869154, + "y": 1127.8604056941667, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 403842814, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2886, + "versionNonce": 1861829974, + "isDeleted": false, + "id": "7vMo12OgAaj9IsJoQNwhU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1184.6800666369154, + "y": 1127.4748320639576, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 1187401698, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "8oR4MyfX4jHtsAYeNAcq2", + "type": "arrow" + } + ], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4008, + "versionNonce": 204006154, + "isDeleted": false, + "id": "nfVvmk0hO2Y8W4qCPTrUL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1023.9282471870656, + "y": 1187.1611102312345, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 423.6151751893943, + "height": 21.2642440025254, + "seed": 728799038, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "xJKd2nkOCNIe1_O4_jlZ-", + "type": "arrow" + } + ], + "updated": 1672163700868, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2950, + "versionNonce": 1368533654, + "isDeleted": false, + "id": "s4SUiIM79KoA37W4gFdAj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1030.7989069092882, + "y": 1188.7938859778333, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 1928725410, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3056, + "versionNonce": 1743516106, + "isDeleted": false, + "id": "p4x0HvPYaGEL35sA2ubUl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1182.5813020290789, + "y": 1188.068327794209, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1645674366, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 2870, + "versionNonce": 1381787606, + "isDeleted": false, + "id": "dcKDiAd1lj1N_tz6EK3JX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1181.5802396431345, + "y": 1010.0339111166952, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 101, + "height": 25, + "seed": 779698018, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "text", + "version": 2286, + "versionNonce": 1574905994, + "isDeleted": false, + "id": "zhDloC-xc295ZOpxr-Uv2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 916.2578190082077, + "y": 1189.5525743111384, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 84, + "height": 20, + "seed": 4612030, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1082", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1082" + }, + { + "type": "text", + "version": 2435, + "versionNonce": 1366097174, + "isDeleted": false, + "id": "SR2C7tH2X59CODMwzflzZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 945.2343815082077, + "y": 1096.9452919450669, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56, + "height": 20, + "seed": 1436484386, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 0", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 0" + }, + { + "type": "text", + "version": 2441, + "versionNonce": 96307018, + "isDeleted": false, + "id": "Sx8RA8l1PC2zPej-2K5Vv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 947.6796940082077, + "y": 1130.2919716325669, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49, + "height": 20, + "seed": 438286334, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1" + }, + { + "type": "text", + "version": 2228, + "versionNonce": 1681451606, + "isDeleted": false, + "id": "pBvIHclZrN_kpqVXAZHRZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1503.8530413987787, + "y": 1049.2275185075669, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 203, + "height": 40, + "seed": 1658212066, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "3mRchANiENPPmEHMVvXfw", + "type": "arrow" + } + ], + "updated": 1672163700868, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "key column values \nof first row of granule 0", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "key column values \nof first row of granule 0" + }, + { + "type": "arrow", + "version": 890, + "versionNonce": 1424134730, + "isDeleted": false, + "id": "3mRchANiENPPmEHMVvXfw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1497.150753452354, + "y": 1078.2110954643786, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 48.41553489057196, + "height": 23.729966514004445, + "seed": 878495998, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "startBinding": { + "elementId": "pBvIHclZrN_kpqVXAZHRZ", + "focus": 0.5990815490550125, + "gap": 6.7022879464248035 + }, + "endBinding": { + "elementId": "i7IvaB8aEXlUaOKzYFRgr", + "focus": 0.8758659295786526, + "gap": 11.378828745037936 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -48.41553489057196, + 23.729966514004445 + ] + ] + }, + { + "type": "arrow", + "version": 832, + "versionNonce": 1308495702, + "isDeleted": false, + "id": "8oR4MyfX4jHtsAYeNAcq2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1520.9051019937037, + "y": 1134.6878109209931, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 72.49159598081201, + "height": 0.9767917052906796, + "seed": 1668206050, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "startBinding": { + "elementId": "R9dwa1OWCNQUNiEB4_L_8", + "focus": -0.002655559170003563, + "gap": 1 + }, + "endBinding": { + "elementId": "9DUadkYR7DysB7iitCu6y", + "focus": 0.09326585366049274, + "gap": 2.6469494769864923 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -72.49159598081201, + 0.9767917052906796 + ] + ] + }, + { + "type": "arrow", + "version": 634, + "versionNonce": 606976266, + "isDeleted": false, + "id": "xJKd2nkOCNIe1_O4_jlZ-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1522.555531061782, + "y": 1215.9612037134202, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 74.6171875, + "height": 14.890625, + "seed": 1779890494, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700868, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "nfVvmk0hO2Y8W4qCPTrUL", + "focus": -0.7385533528788956, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -74.6171875, + -14.890625 + ] + ] + }, + { + "type": "rectangle", + "version": 4889, + "versionNonce": 274487882, + "isDeleted": false, + "id": "Z6DmDcFKnMIP5y9F7Bmy8", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1276.1228956907623, + "y": 3151.816427080022, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 192.7960069444445, + "height": 503.416079452614, + "seed": 1515981819, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "uoInldJRljDzt8fpfGqE5", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4002, + "versionNonce": 1977927510, + "isDeleted": false, + "id": "bDoO6UgGKpeo5RBnu_qJF", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 1308.9060833147685, + "y": 3267.59872895081, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 133.82812500000003, + "height": 104.02223463959439, + "seed": 305595701, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3945, + "versionNonce": 1563328778, + "isDeleted": false, + "id": "qVZmaAyCxLCoGghvfIa9g", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 809.2047906232171, + "y": 3217.163106767522, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 307.40147569444457, + "height": 197.04303257761387, + "seed": 344904859, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Jkh8lBk0cbSC0J-UQsI7B", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2872, + "versionNonce": 868052118, + "isDeleted": false, + "id": "HqTFfxWLU4Zfk0gYeQEI8", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 972.4242317850938, + "y": 3269.739281916792, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 131.88867535650718, + "seed": 1609209493, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5866, + "versionNonce": 42848202, + "isDeleted": false, + "id": "p2YUn-HGVRGSyM_BFKymH", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1788.7049269407626, + "y": 3363.573558448194, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 82.14952256944427, + "height": 119.4682229662705, + "seed": 1520404795, + "groupIds": [ + "6O3pvmyR2AcHszmmlSSaY" + ], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 2527, + "versionNonce": 298805718, + "isDeleted": false, + "id": "HOwjurdjaB4sRHwxFSc2x", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1799.2323104408306, + "y": 3421.351413681329, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 63.328459017776375, + "height": 56.28633437499965, + "seed": 1206189045, + "groupIds": [ + "6O3pvmyR2AcHszmmlSSaY" + ], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 3856, + "versionNonce": 1150633610, + "isDeleted": false, + "id": "Ss3212zGYasKcx7Tvk1_v", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1790.3929694754834, + "y": 3370.829154306329, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 78, + "height": 40, + "seed": 1374726619, + "groupIds": [ + "6O3pvmyR2AcHszmmlSSaY" + ], + "roundness": null, + "boundElements": [ + { + "id": "BltJEdlS1EvGPQMbe6C4b", + "type": "arrow" + }, + { + "id": "Ll35jXXZFdsir3OFSS6WG", + "type": "arrow" + }, + { + "id": "63L6OMYVfF9heOL7sMe5S", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse\nEngine", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse\nEngine" + }, + { + "type": "rectangle", + "version": 2885, + "versionNonce": 1865400086, + "isDeleted": false, + "id": "MViU46vTgBdwBBFbXzMZv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 831.5085490520339, + "y": 3270.0456416173997, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 132.17360182709456, + "seed": 36418901, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2094, + "versionNonce": 738190666, + "isDeleted": false, + "id": "IvHLEtNaAArrWlCbYJ6hn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 889.9540558332426, + "y": 3333.428040320439, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1335146107, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2210, + "versionNonce": 5467222, + "isDeleted": false, + "id": "832vCIG0NLyR1SJrHZ4dx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 890.2409876514246, + "y": 3347.2078698658947, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 705970869, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2219, + "versionNonce": 1915268106, + "isDeleted": false, + "id": "HdLbqBj_BXJzh1Gu9ivFV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 890.2659275552721, + "y": 3360.3773410197405, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1649291035, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2307, + "versionNonce": 588214678, + "isDeleted": false, + "id": "-v2IQwGSmYPUDLn4v9N_v", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1032.3994093078943, + "y": 3332.1114610663603, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1413751829, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2423, + "versionNonce": 1829411530, + "isDeleted": false, + "id": "DarNTWkKsw6ndqO-BFqak", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1032.6863411260745, + "y": 3345.8912906118144, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 479171515, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2432, + "versionNonce": 848875222, + "isDeleted": false, + "id": "OPUapY0nDSvbgwW-DhSwX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1032.711281029922, + "y": 3359.06076176566, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1689311605, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3459, + "versionNonce": 2067837322, + "isDeleted": false, + "id": "C-nMXaKIR9NB3q1TAJ-P-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 823.8601667897926, + "y": 3321.980245957478, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 278.4357801359186, + "height": 20.77857388220443, + "seed": 511403099, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2204, + "versionNonce": 1535411222, + "isDeleted": false, + "id": "Ta3Y_e3w0vmX0CQusRUPQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 909.4147770917632, + "y": 3229.391194747506, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 109, + "height": 25, + "seed": 614458069, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID.mrk", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.mrk" + }, + { + "type": "text", + "version": 1606, + "versionNonce": 1879437386, + "isDeleted": false, + "id": "cR2GrgOl-IFb6qLrCBks2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 729.7997898208068, + "y": 3325.478758939848, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 1608786171, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6gkr09UfyYbzjuh6y6WGW", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 176", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 176" + }, + { + "type": "text", + "version": 2121, + "versionNonce": 1875349846, + "isDeleted": false, + "id": "RUUUoExQzH8Aia3Fpamuf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 976.2347212152397, + "y": 3322.6733816456995, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 120, + "height": 20, + "seed": 413581365, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule_offset" + }, + { + "type": "text", + "version": 1965, + "versionNonce": 2134202122, + "isDeleted": false, + "id": "OCDZBy_rQCw0eKLQxElg9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 840.2301256270046, + "y": 3325.6375360574634, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 102, + "height": 20, + "seed": 978078107, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "block_offset", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "text", + "version": 2270, + "versionNonce": 985069206, + "isDeleted": false, + "id": "mk2hgDdfaJdv6YweUrVYD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 890.0358412521443, + "y": 3271.5713873337177, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 380301717, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2386, + "versionNonce": 692708810, + "isDeleted": false, + "id": "3bwech_pfXMW4ybZgy6wl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 890.3227730703263, + "y": 3285.3512168791735, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 853958203, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2395, + "versionNonce": 1426568150, + "isDeleted": false, + "id": "kETD1_cmk8lD2ieaJp8ok", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 890.3477129741739, + "y": 3298.5206880330193, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 467793653, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2483, + "versionNonce": 660511882, + "isDeleted": false, + "id": "4Efi-P_u4VTlPcVDhpQZ8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1032.481194726796, + "y": 3270.254808079639, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 76865243, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2599, + "versionNonce": 2026817814, + "isDeleted": false, + "id": "fv2_6p8n9c4tZSF-NzQz7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1032.7681265449762, + "y": 3284.034637625093, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1657884757, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2608, + "versionNonce": 1462664010, + "isDeleted": false, + "id": "7US_mRzDjZMfar7tDDVaB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1032.7930664488238, + "y": 3297.204108778939, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1776962427, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4625, + "versionNonce": 1434531414, + "isDeleted": false, + "id": "KVecjoEAN3h1OjND-NAT0", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 970.3894972532623, + "y": 3472.2793177050216, + "strokeColor": "#495057", + "backgroundColor": "#ced4da", + "width": 185.44835069444457, + "height": 255.49811070261416, + "seed": 961445301, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3453, + "versionNonce": 655655434, + "isDeleted": false, + "id": "AQNVgLvtYccz4tnzxt14P", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 20, + "angle": 0, + "x": 982.1844666195782, + "y": 3559.0378291173997, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 161.66015625000003, + "height": 31.67067213959449, + "seed": 657007643, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2410, + "versionNonce": 1676934038, + "isDeleted": false, + "id": "MFZp-TyP7EqUDqY-OgFIu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1015.1785852843075, + "y": 3484.3257650600053, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 102, + "height": 25, + "seed": 377421589, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "text", + "version": 2389, + "versionNonce": 34320586, + "isDeleted": false, + "id": "RCJdhNGWbIn2Z82Cpd6hc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 997.920313225484, + "y": 3565.746146493829, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 132, + "height": 20, + "seed": 1413736635, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6gkr09UfyYbzjuh6y6WGW", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "compressed block", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "compressed block" + }, + { + "type": "rectangle", + "version": 3606, + "versionNonce": 979114198, + "isDeleted": false, + "id": "x1xbsGQUTLpRRPF8cmV7q", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 20, + "angle": 0, + "x": 982.346094475485, + "y": 3601.7613963615313, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 161.66015625000003, + "height": 31.67067213959449, + "seed": 1893225589, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "uoInldJRljDzt8fpfGqE5", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2544, + "versionNonce": 1001326474, + "isDeleted": false, + "id": "ZC4pVrvW8a6_YpDh3WsNe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 998.0819410813908, + "y": 3608.469713737961, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 132, + "height": 20, + "seed": 1725765979, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6gkr09UfyYbzjuh6y6WGW", + "type": "arrow" + }, + { + "id": "6SAFrhAZi-gFmpbfKrgf0", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "compressed block", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "compressed block" + }, + { + "type": "rectangle", + "version": 3721, + "versionNonce": 1615760918, + "isDeleted": false, + "id": "QhBVWepQpphyAMj-tC5zu", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 20, + "angle": 0, + "x": 985.192774162984, + "y": 3644.5983104240313, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 161.66015625000003, + "height": 31.67067213959449, + "seed": 1411382741, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2658, + "versionNonce": 2084144714, + "isDeleted": false, + "id": "5Ubt_S_uMp85pn12q4XRz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1000.9286207688899, + "y": 3651.306627800461, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 132, + "height": 20, + "seed": 2085041659, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6gkr09UfyYbzjuh6y6WGW", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "compressed block", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "compressed block" + }, + { + "type": "text", + "version": 2701, + "versionNonce": 583031638, + "isDeleted": false, + "id": "kSlJMf5FUexzKinlFu-XA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1063.4216039269702, + "y": 3670.431652394179, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 929790773, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2817, + "versionNonce": 746990858, + "isDeleted": false, + "id": "tZgUcMZJaeYvqtnrrev8z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1063.7085357451504, + "y": 3684.211481939633, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1669643931, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2826, + "versionNonce": 1745256598, + "isDeleted": false, + "id": "nnh5bib1AhQI433fhM_gT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1063.733475648998, + "y": 3697.3809530934786, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 320883861, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "line", + "version": 812, + "versionNonce": 1645214666, + "isDeleted": false, + "id": "T82Du1jWAmtKTC18fZGaa", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 862.9787691065137, + "y": 3347.622206224925, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 1.4532116264103934, + "height": 272.0675993272662, + "seed": 1732784955, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -1.4532116264103934, + 272.0675993272662 + ] + ] + }, + { + "type": "text", + "version": 2752, + "versionNonce": 64355798, + "isDeleted": false, + "id": "iC1nzwsGcHjR1mz5GvlrK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1311.932031975485, + "y": 3163.575248056329, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 130, + "height": 50, + "seed": 921956853, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "decompressed\nblock data", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "decompressed\nblock data" + }, + { + "type": "rectangle", + "version": 2797, + "versionNonce": 1257370250, + "isDeleted": false, + "id": "0nYg04T2hDy1xJllAs1z0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1317.5841897135751, + "y": 3276.5611886565307, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 116.38248697916723, + "height": 21.19259982638885, + "seed": 1475613659, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2538, + "versionNonce": 188994326, + "isDeleted": false, + "id": "dbwr9kM-1MzDGcG6KgP-h", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1324.13627304691, + "y": 3276.2766989491843, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 105, + "height": 20, + "seed": 1609296725, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "742.414.531", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "742.414.531" + }, + { + "type": "text", + "version": 2544, + "versionNonce": 434573642, + "isDeleted": false, + "id": "amafakoO8IEfWubKbLi0P", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1373.7716318287548, + "y": 3287.7836334209564, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1436213371, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2660, + "versionNonce": 683999318, + "isDeleted": false, + "id": "huO253QyknBNJqbui9ajf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1374.058563646935, + "y": 3301.5634629664105, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 241023157, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2669, + "versionNonce": 1917474826, + "isDeleted": false, + "id": "agtqV0dx2GEO63HbUTdW9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1374.0835035507826, + "y": 3314.7329341202562, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1509890331, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3057, + "versionNonce": 1882097046, + "isDeleted": false, + "id": "ZfzG27phIqOQfWAhN2Wgn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1316.9316367001857, + "y": 3341.3469903656674, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 116.38248697916723, + "height": 21.19259982638885, + "seed": 468638229, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2790, + "versionNonce": 1410778826, + "isDeleted": false, + "id": "AQE8pL3-yttNZLiPJ1F1M", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1324.6411987451356, + "y": 3342.062500658321, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 105, + "height": 20, + "seed": 43204027, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "747.148.242", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "747.148.242" + }, + { + "type": "text", + "version": 3149, + "versionNonce": 850748118, + "isDeleted": false, + "id": "OoIznPgkv0BOUiNU2wUvS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1063.1544443287546, + "y": 3507.771914670956, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 294965109, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3274, + "versionNonce": 132603274, + "isDeleted": false, + "id": "n-UNPVs4Z9U3JSOiub8EN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1063.4413761469348, + "y": 3521.55174421641, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 444190299, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3283, + "versionNonce": 1391368214, + "isDeleted": false, + "id": "mGcJNxM3llQkuP06NvsQp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1063.4663160507823, + "y": 3534.721215370256, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1033181397, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "arrow", + "version": 658, + "versionNonce": 183966794, + "isDeleted": false, + "id": "6SAFrhAZi-gFmpbfKrgf0", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 865.2947551897685, + "y": 3619.262190020606, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 117.00390625, + "height": 2.0703125, + "seed": 1686457083, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "ZC4pVrvW8a6_YpDh3WsNe", + "focus": 0.24399918217240393, + "gap": 15.783279641622357 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 117.00390625, + -2.0703125 + ] + ] + }, + { + "type": "text", + "version": 3101, + "versionNonce": 416228694, + "isDeleted": false, + "id": "3nwYU4swX2Anvc1UVX4Yg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1373.2677255787548, + "y": 3210.4984771709564, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 159725109, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3218, + "versionNonce": 2065761034, + "isDeleted": false, + "id": "aXJpJZpcitfVUcqR7_shF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1373.554657396935, + "y": 3224.2783067164105, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 624440219, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3227, + "versionNonce": 95160982, + "isDeleted": false, + "id": "J_64UiuYtjZngok7be4KJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1373.5795973007826, + "y": 3237.4477778702562, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 273328021, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4266, + "versionNonce": 48239050, + "isDeleted": false, + "id": "B9hasLRMPT-RrBJsAAA-s", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 1309.2400676897685, + "y": 3382.90341645081, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 133.82812500000003, + "height": 104.02223463959439, + "seed": 1824852027, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Jkh8lBk0cbSC0J-UQsI7B", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3058, + "versionNonce": 674908118, + "isDeleted": false, + "id": "gYgE5GLkRlj_bZK1rgmQ1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1317.9181740885751, + "y": 3391.8658761565307, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 116.38248697916723, + "height": 21.19259982638885, + "seed": 1947921653, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2789, + "versionNonce": 1162823818, + "isDeleted": false, + "id": "0nSqhgjX_T6PkNH4H-AwN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1325.470257421911, + "y": 3391.5813864491843, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 105, + "height": 20, + "seed": 554584283, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "747.148.242", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "747.148.242" + }, + { + "type": "text", + "version": 2805, + "versionNonce": 1888410902, + "isDeleted": false, + "id": "4I2U1Qo-zPPF7Sc0NRNJ6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1374.1056162037548, + "y": 3403.088320920956, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1954252373, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2921, + "versionNonce": 1244243786, + "isDeleted": false, + "id": "Wy6ubQFbs-5drcBfpWlHe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1374.392548021935, + "y": 3416.86815046641, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1202091387, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2930, + "versionNonce": 69126742, + "isDeleted": false, + "id": "sgaW75e5nkX16Qs7-_n_u", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1374.4174879257826, + "y": 3430.037621620256, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1145172917, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3321, + "versionNonce": 1774857738, + "isDeleted": false, + "id": "Yu5fhbBJs74fITyO54Qk6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1317.2656210751857, + "y": 3456.651677865667, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 116.38248697916723, + "height": 21.19259982638885, + "seed": 265293339, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Jkh8lBk0cbSC0J-UQsI7B", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3051, + "versionNonce": 297734038, + "isDeleted": false, + "id": "1xKjC3poeJiw_9g4CBieY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1324.8850600907363, + "y": 3457.3671881583205, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 105, + "height": 20, + "seed": 529773845, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "751.802.947", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "751.802.947" + }, + { + "type": "rectangle", + "version": 4460, + "versionNonce": 959175882, + "isDeleted": false, + "id": "6TsF2ajztP-JcpDvfTdoI", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 1308.4353801897685, + "y": 3501.0245102008093, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 133.82812500000003, + "height": 104.02223463959439, + "seed": 477991611, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3253, + "versionNonce": 631549142, + "isDeleted": false, + "id": "bUfnRGrGRdxe7fSNLzmvn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1317.1134865885751, + "y": 3509.9869699065302, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 116.38248697916723, + "height": 21.19259982638885, + "seed": 568740469, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2983, + "versionNonce": 1978250122, + "isDeleted": false, + "id": "IHtbRE1MXMH91eRGl52tt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1324.665569921911, + "y": 3510.702480199184, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 105, + "height": 20, + "seed": 240223067, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "751.802.947", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "751.802.947" + }, + { + "type": "text", + "version": 3000, + "versionNonce": 2103747094, + "isDeleted": false, + "id": "CIaVliMv2mnoOe3SaTNJL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1373.3009287037548, + "y": 3521.209414670956, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1543451605, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3116, + "versionNonce": 1916711498, + "isDeleted": false, + "id": "HTp6raiHFIHsd52BifYvW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1373.587860521935, + "y": 3534.98924421641, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1302224891, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3125, + "versionNonce": 1542713174, + "isDeleted": false, + "id": "26WkaQ26WL0iPA7asA_UJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1373.6128004257826, + "y": 3548.1587153702562, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 703852853, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3513, + "versionNonce": 17160458, + "isDeleted": false, + "id": "XsLP2OdIryofvPn9pdkp1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1316.4609335751857, + "y": 3574.7727716156674, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 116.38248697916723, + "height": 21.19259982638885, + "seed": 342272155, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3247, + "versionNonce": 1571263638, + "isDeleted": false, + "id": "jOvjTXVPUltjmhIKQvN3o", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1324.0130169085205, + "y": 3575.488281908321, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 105, + "height": 20, + "seed": 1227489941, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "752.832.461", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "752.832.461" + }, + { + "type": "line", + "version": 449, + "versionNonce": 1639589834, + "isDeleted": false, + "id": "YNoMgSRtknqq7BZNwV4c4", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1008.7752239397685, + "y": 3343.6918775206063, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 1.96875, + "height": 93.48828125, + "seed": 945610043, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -1.96875, + 93.48828125 + ] + ] + }, + { + "type": "text", + "version": 3590, + "versionNonce": 1278513622, + "isDeleted": false, + "id": "B6luJz0jJP3NC7Zbv9WMg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1373.1349130787548, + "y": 3598.990664670956, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 777447413, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3707, + "versionNonce": 745971338, + "isDeleted": false, + "id": "ODOiZE9_IEFZ4lSWjecPI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1373.421844896935, + "y": 3612.77049421641, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 887324123, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3716, + "versionNonce": 1924130582, + "isDeleted": false, + "id": "dU31U7UQHz90x3i1gCIPd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1373.4467848007826, + "y": 3625.939965370256, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 461381973, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "arrow", + "version": 972, + "versionNonce": 1039547722, + "isDeleted": false, + "id": "uoInldJRljDzt8fpfGqE5", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1147.2910355023866, + "y": 3616.675221493787, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 120.93780388257687, + "height": 1.9492749591704523, + "seed": 1963788923, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "startBinding": { + "elementId": "Iz4RhtaLO452plU5Wtr5J", + "focus": 2.114843304963227, + "gap": 13.730282187381817 + }, + "endBinding": { + "elementId": "Z6DmDcFKnMIP5y9F7Bmy8", + "focus": -0.8272882662943504, + "gap": 7.894056305798927 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 120.93780388257687, + -1.9492749591704523 + ] + ] + }, + { + "type": "text", + "version": 2073, + "versionNonce": 1905169494, + "isDeleted": false, + "id": "Iz4RhtaLO452plU5Wtr5J", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1161.0213176897685, + "y": 3583.1215650206072, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 87, + "height": 20, + "seed": 1979395765, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "6gkr09UfyYbzjuh6y6WGW", + "type": "arrow" + }, + { + "id": "uoInldJRljDzt8fpfGqE5", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "decompress", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "decompress" + }, + { + "type": "arrow", + "version": 959, + "versionNonce": 596902922, + "isDeleted": false, + "id": "Jkh8lBk0cbSC0J-UQsI7B", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1013.1736614397685, + "y": 3437.809065020606, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 293.70297228147615, + "height": 1.886237626986258, + "seed": 1570505499, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "startBinding": { + "elementId": "qVZmaAyCxLCoGghvfIa9g", + "focus": 1.2240306758329034, + "gap": 23.60292567547026 + }, + "endBinding": { + "elementId": "B9hasLRMPT-RrBJsAAA-s", + "focus": -0.0996491562710595, + "gap": 2.36343396852385 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 293.70297228147615, + 1.886237626986258 + ] + ] + }, + { + "type": "text", + "version": 2819, + "versionNonce": 312842646, + "isDeleted": false, + "id": "luhOhH2JDwa6eOsUwL0mV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1217.1489218564363, + "y": 3272.0052455761593, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 87, + "height": 20, + "seed": 1550684181, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 175", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 175" + }, + { + "type": "text", + "version": 2912, + "versionNonce": 122352330, + "isDeleted": false, + "id": "zwTzFuVNTQAvQjK7ktj0F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1216.0512656064363, + "y": 3386.0482143261593, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 386066363, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 176", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 176" + }, + { + "type": "text", + "version": 3084, + "versionNonce": 489289430, + "isDeleted": false, + "id": "5zaozhWnau3QPikbOvc_E", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1217.4653281064363, + "y": 3503.950558076159, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 2093794677, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 177", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 177" + }, + { + "type": "text", + "version": 3010, + "versionNonce": 464914826, + "isDeleted": false, + "id": "wDUa-cmfDR7oEoBuYX0BQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1449.6918906064366, + "y": 3274.4974330761593, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 112, + "height": 20, + "seed": 392443995, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1.433.600", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1.433.600" + }, + { + "type": "text", + "version": 3132, + "versionNonce": 699444246, + "isDeleted": false, + "id": "2EDet1OaDkn7DbT-9i-9s", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1452.3207968564366, + "y": 3341.7943080761593, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 95, + "height": 20, + "seed": 710823637, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1.441.791", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1.441.791" + }, + { + "type": "text", + "version": 3230, + "versionNonce": 135284810, + "isDeleted": false, + "id": "wIt7_Ju6OG6_LFIqsmqKR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1452.0434531064366, + "y": 3390.3021205761593, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 102, + "height": 20, + "seed": 1821537531, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Ll35jXXZFdsir3OFSS6WG", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1.441.792", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1.441.792" + }, + { + "type": "text", + "version": 3272, + "versionNonce": 1982773590, + "isDeleted": false, + "id": "NtYNSFy-whbZIid7xeJmD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1450.7700156064366, + "y": 3456.6906510323734, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 111, + "height": 20, + "seed": 867675189, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "63L6OMYVfF9heOL7sMe5S", + "type": "arrow" + } + ], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1.449.983", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1.449.983" + }, + { + "type": "text", + "version": 3400, + "versionNonce": 1412738826, + "isDeleted": false, + "id": "s8aMbA9Mmgn4vXWLwvBMl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1449.6254843564366, + "y": 3508.001339326159, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 110, + "height": 20, + "seed": 1175461275, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1.449.984", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1.449.984" + }, + { + "type": "text", + "version": 3490, + "versionNonce": 972627606, + "isDeleted": false, + "id": "Lo23rQFd0Avk_iVT6aWrg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1451.1254843564366, + "y": 3573.7825893261593, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 103, + "height": 20, + "seed": 2025741717, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700876, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1.458.175", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1.458.175" + }, + { + "type": "text", + "version": 4076, + "versionNonce": 375911562, + "isDeleted": false, + "id": "Bp_OjPrmGcEi6dRrneEhC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1627.5043906064357, + "y": 3334.2630580761593, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 116, + "height": 80, + "seed": 1752412891, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700877, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "all 8192 rows \nof granule 176\nare streamed\ninto ClickHouse", + "baseline": 74, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "all 8192 rows \nof granule 176\nare streamed\ninto ClickHouse" + }, + { + "type": "arrow", + "version": 1223, + "versionNonce": 1263326026, + "isDeleted": false, + "id": "Ll35jXXZFdsir3OFSS6WG", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 80, + "angle": 0, + "x": 1551.3202837280069, + "y": 3387.079154306329, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 234.4677734375, + "height": 39.3115234375, + "seed": 1946044853, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700877, + "link": null, + "locked": false, + "startBinding": { + "elementId": "wIt7_Ju6OG6_LFIqsmqKR", + "focus": -0.45215935910385624, + "gap": 3.222966269830067 + }, + "endBinding": { + "elementId": "Ss3212zGYasKcx7Tvk1_v", + "focus": -1.2887866917668438, + "gap": 7.9443359375 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 34.1064453125, + -4.16015625 + ], + [ + 46.455078125, + 0.4248046875 + ], + [ + 49.0576171875, + 13.0078125 + ], + [ + 50.9375, + 25.673828125 + ], + [ + 56.26953125, + 35.1513671875 + ], + [ + 96.455078125, + 34.8828125 + ], + [ + 234.4677734375, + 31.6943359375 + ] + ] + }, + { + "type": "arrow", + "version": 1077, + "versionNonce": 343148746, + "isDeleted": false, + "id": "63L6OMYVfF9heOL7sMe5S", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 80, + "angle": 0, + "x": 1542.7810271344842, + "y": 3479.2215910125433, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 244.39863159352217, + "height": 61.611328125, + "seed": 1695447835, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700877, + "link": null, + "locked": false, + "startBinding": { + "elementId": "NtYNSFy-whbZIid7xeJmD", + "focus": 1.1689823066050393, + "gap": 2.530939980169933 + }, + "endBinding": { + "elementId": "Ss3212zGYasKcx7Tvk1_v", + "focus": -1.2184134905993005, + "gap": 7.163085937499545 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 46.04413940602217, + 0.3819773562854607 + ], + [ + 59.90644409352217, + -15.79478045621454 + ], + [ + 61.93769409352217, + -41.69321795621454 + ], + [ + 67.60663940602217, + -52.29868670621454 + ], + [ + 97.03535034352217, + -56.63950701871454 + ], + [ + 244.39863159352217, + -61.22935076871454 + ] + ] + }, + { + "type": "text", + "version": 2230, + "versionNonce": 527905686, + "isDeleted": false, + "id": "R9dwa1OWCNQUNiEB4_L_8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1521.9051019937037, + "y": 1113.2972125092788, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 196, + "height": 40, + "seed": 1498844490, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "8oR4MyfX4jHtsAYeNAcq2", + "type": "arrow" + } + ], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "key column values \nof first row of granule 1", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "key column values \nof first row of granule 1" + }, + { + "type": "rectangle", + "version": 1953, + "versionNonce": 1224542998, + "isDeleted": false, + "id": "Wiarv-8t9VQnxkUlojxsC", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1036.3692977255103, + "y": 234.94051825362084, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 127.02013262761585, + "height": 593.2427235943161, + "seed": 2135112598, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1535, + "versionNonce": 427645258, + "isDeleted": false, + "id": "jQVofhsMHssMFAvmpT9Ao", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1050.9999245912566, + "y": 240.3637242765269, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 102, + "height": 25, + "seed": 1984983242, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "rectangle", + "version": 2328, + "versionNonce": 1251424342, + "isDeleted": false, + "id": "JWcu2wIZgbUlnKpPKVlUy", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1466.860259705863, + "y": 232.2812442218845, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 187.54419978513067, + "height": 596.0708074323217, + "seed": 700668118, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2267, + "versionNonce": 936878090, + "isDeleted": false, + "id": "nPYoRwi-k7atwl3DVWImu", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1187.0578707177515, + "y": 233.85262481218405, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 258.90957266803287, + "height": 594.0956012893664, + "seed": 1230751626, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1337, + "versionNonce": 184139158, + "isDeleted": false, + "id": "VyF77oCL1iZbYtoUI3ZNj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1279.8946273928204, + "y": 240.8755387441604, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70, + "height": 25, + "seed": 1102430358, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "text", + "version": 1464, + "versionNonce": 146476746, + "isDeleted": false, + "id": "2Y-_8zgs2gstfoyrz7Prq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1484.4266284036078, + "y": 241.01876791082827, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 130, + "height": 25, + "seed": 771013578, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "EventTime.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "EventTime.bin" + }, + { + "type": "text", + "version": 2411, + "versionNonce": 1062836950, + "isDeleted": false, + "id": "qNgMkIDpGu8IAvTPpYZdz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1088.306513596446, + "y": 573.9657941284946, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 1882052630, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2590, + "versionNonce": 818062730, + "isDeleted": false, + "id": "7EtQCslXAd6YyoT7bOe_A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1088.306513596446, + "y": 592.7397378553525, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 843816534, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2774, + "versionNonce": 776720406, + "isDeleted": false, + "id": "WcpC8JNUEow5syDT-lSBh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1088.306513596446, + "y": 611.514217230802, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 545561098, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2655, + "versionNonce": 153707594, + "isDeleted": false, + "id": "h-3pnyDUkn79NnzL1kaZ1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1308.1999303165894, + "y": 574.052515295756, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 187786134, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2832, + "versionNonce": 63266134, + "isDeleted": false, + "id": "sFKI3WDdokcox4fW4b1u4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1308.5604322312165, + "y": 592.8264590226144, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 95996106, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3016, + "versionNonce": 197806858, + "isDeleted": false, + "id": "8NCgSdfWzTqvl20WiPH6A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1308.480203921702, + "y": 611.6009383980635, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 1705803990, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2718, + "versionNonce": 622543510, + "isDeleted": false, + "id": "vKyMaKKYSiRNZCY1C7SVb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1546.6707334107107, + "y": 574.0277757124226, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 2046369674, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2895, + "versionNonce": 1059084746, + "isDeleted": false, + "id": "iubGWa41U1NhCKpnd7tZ6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1547.0312353253378, + "y": 592.8017194392809, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 357692950, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3079, + "versionNonce": 84049878, + "isDeleted": false, + "id": "TIcN1Q-CbLToEmt4zu6-f", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1546.9510070158233, + "y": 611.57619881473, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 427859530, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4704, + "versionNonce": 575049866, + "isDeleted": false, + "id": "P1FXiVWkjFCTe_XCb5L8B", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 894.7115608355889, + "y": 274.5175730727937, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 773.2456351692409, + "height": 151.18724556550592, + "seed": 1629141846, + "groupIds": [ + "a7f9zaB8n_8P-t8iMsIJW" + ], + "roundness": null, + "boundElements": [], + "updated": 1672163700912, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5382, + "versionNonce": 2005931286, + "isDeleted": false, + "id": "jKrOvtSdbVSH_uP-cvpmx", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 892.7676852736147, + "y": 273.51839931494743, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 776.7457386363642, + "height": 154.2443443800131, + "seed": 1311319626, + "groupIds": [ + "a7f9zaB8n_8P-t8iMsIJW" + ], + "roundness": null, + "boundElements": [ + { + "id": "GkiYx80xAbmpjHnxJ7KXx", + "type": "arrow" + } + ], + "updated": 1672163700912, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2480, + "versionNonce": 1153454282, + "isDeleted": false, + "id": "sN7LqVozphO5hoJhmZq93", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1029.4392233688268, + "y": 277.33987558392886, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.3968293978423, + "height": 20.04948308198391, + "seed": 1624100374, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1422, + "versionNonce": 583104726, + "isDeleted": false, + "id": "KhJ3mbvURq3KzNIaRQQxg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1092.306513596446, + "y": 277.3646171249208, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 911099466, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "240.923", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 1488, + "versionNonce": 2127538058, + "isDeleted": false, + "id": "AMDb-U0BCJy0MkDYPiz09", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1193.284129358224, + "y": 277.3646171249208, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1364695894, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 1246, + "versionNonce": 1426583062, + "isDeleted": false, + "id": "t7Vrh9UgW0xxmfbLk6xFK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1470.5278188797986, + "y": 278.70651592670106, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1174596874, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-23 04:39:21", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-23 04:39:21" + }, + { + "type": "text", + "version": 1613, + "versionNonce": 1380329034, + "isDeleted": false, + "id": "xkJUUPxw00NjP0bKmNIiu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 976.4141967734483, + "y": 279.70614821317173, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 1704803798, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 0", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 1701, + "versionNonce": 2035137366, + "isDeleted": false, + "id": "9LJB99J5_K09L5mrhTbJV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1093.306513596446, + "y": 350.91061115265404, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1010741898, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1833, + "versionNonce": 1476316426, + "isDeleted": false, + "id": "5JsPwnpfh0zYOCl36AiiO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1093.306513596446, + "y": 364.6904406981099, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 841159446, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1842, + "versionNonce": 1172824214, + "isDeleted": false, + "id": "fSpj0tMfZCpda3liRX31-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1093.306513596446, + "y": 377.85991185195564, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1134285130, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1699, + "versionNonce": 1433705418, + "isDeleted": false, + "id": "NtISqBYOhvjQmFihnC7ie", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1310.4451087350617, + "y": 349.6807204093627, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 834420822, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1815, + "versionNonce": 1586191830, + "isDeleted": false, + "id": "ExIN_KifsomgpIySVBtGC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1310.7320405532419, + "y": 363.46054995481677, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 124196874, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1824, + "versionNonce": 683840138, + "isDeleted": false, + "id": "auSGetdr07XJzyWwj5s6g", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1310.7569804570894, + "y": 376.6300211086625, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1480443286, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1745, + "versionNonce": 676147990, + "isDeleted": false, + "id": "Jcxi9IuR5w1v52AKJfNP8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1548.1447233822112, + "y": 349.72972609118074, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 664504010, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1861, + "versionNonce": 883142986, + "isDeleted": false, + "id": "8O8jEFQjaXPL-B6x81yAk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1548.4316552003932, + "y": 363.5095556366348, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1457300182, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1870, + "versionNonce": 497180758, + "isDeleted": false, + "id": "FHDp9nYzRfva5YRKCGirr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1548.4565951042407, + "y": 376.6790267904805, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 215227786, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 2590, + "versionNonce": 1282603018, + "isDeleted": false, + "id": "f2C59pIQsZ8QGjB08SM8f", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1029.6120466418868, + "y": 309.5639591645431, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.3340592712975, + "height": 19.900607638888914, + "seed": 1414257738, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1572, + "versionNonce": 576710038, + "isDeleted": false, + "id": "S-IG85sraUiYKpdAE93nK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1092.306513596446, + "y": 309.5142629839876, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 1277584726, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "258.382", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 1635, + "versionNonce": 539715274, + "isDeleted": false, + "id": "UVHDZeKonXESdYoOfkTyZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1193.6078061783953, + "y": 309.5142629839876, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1004389130, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 1399, + "versionNonce": 1471857366, + "isDeleted": false, + "id": "pKFawK3dgoH0dx2ktI1Mq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1470.85149569997, + "y": 309.60095149477485, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1276856982, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 01:03:28", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:03:28" + }, + { + "type": "text", + "version": 1759, + "versionNonce": 677903754, + "isDeleted": false, + "id": "z3pgb_xK_Z9u7up197veV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 976.7378735936197, + "y": 311.7996783809213, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 39, + "height": 20, + "seed": 235196874, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "rectangle", + "version": 3367, + "versionNonce": 1883764758, + "isDeleted": false, + "id": "w2jEoeeD---7EjJ8-O-2u", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1029.7156933957938, + "y": 342.066760901056, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.7544755146852, + "height": 20.142795138888914, + "seed": 1589741526, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2391, + "versionNonce": 308526154, + "isDeleted": false, + "id": "B1NsNgleD3yeRYodD7Egd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1092.306513596446, + "y": 342.13815847050057, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 232523914, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "258.382", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 2459, + "versionNonce": 66880854, + "isDeleted": false, + "id": "CSrZOJdlTdTo6w0M2J-fw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1193.7944341127156, + "y": 342.13815847050057, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1412308246, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 2202, + "versionNonce": 737780490, + "isDeleted": false, + "id": "lIJYYt-AeK-j0SZqdpqQR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1471.0381236342903, + "y": 342.2248469812878, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1662936906, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 01:04:08", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:04:08" + }, + { + "type": "text", + "version": 2581, + "versionNonce": 1680698006, + "isDeleted": false, + "id": "97AsS_UGQVpLg2ATac8EI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 975.92450152794, + "y": 344.49509558720376, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 836110934, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 2", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "rectangle", + "version": 3112, + "versionNonce": 1336193482, + "isDeleted": false, + "id": "2SMO7jRL-DGEddiExwUNC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1029.2033086480265, + "y": 405.62989313127923, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.5134081994029, + "height": 19.900607638888914, + "seed": 103214602, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2208, + "versionNonce": 1871685590, + "isDeleted": false, + "id": "shwrqvH-X7JWDj_sz2LyP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1074.306513596446, + "y": 405.67197278890785, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 109989782, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2276, + "versionNonce": 1350559882, + "isDeleted": false, + "id": "-ifH1k-FmymKu2xkG7dcW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1193.5061629054405, + "y": 405.67197278890785, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 737189066, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 2024, + "versionNonce": 1714961686, + "isDeleted": false, + "id": "cBJM8NbVjeG9nn-sWgnR_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1470.7498524270152, + "y": 405.75866129969506, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1049357526, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 00:26:41", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:26:41" + }, + { + "type": "text", + "version": 2387, + "versionNonce": 1715881802, + "isDeleted": false, + "id": "d00kK9Qnv7E-Kv8QqWkgo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 948.636230320665, + "y": 407.8176373338571, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70, + "height": 20, + "seed": 840332170, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.191", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.191" + }, + { + "type": "rectangle", + "version": 5252, + "versionNonce": 1033644630, + "isDeleted": false, + "id": "xOV8xa8SN2JbzNrsymR1m", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 894.4183834872588, + "y": 434.93176308508674, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 773.2456351692409, + "height": 151.18724556550592, + "seed": 643828810, + "groupIds": [ + "HrR_ARvvEjdPll0Lk4N2Q" + ], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5930, + "versionNonce": 424857098, + "isDeleted": false, + "id": "chehznvRTylGXnyCR9RaI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 892.4745079252843, + "y": 433.93258932724035, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 776.7457386363642, + "height": 154.2443443800131, + "seed": 2024617302, + "groupIds": [ + "HrR_ARvvEjdPll0Lk4N2Q" + ], + "roundness": null, + "boundElements": [ + { + "id": "3WI04rxxvXSjHIfous1og", + "type": "arrow" + } + ], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3224, + "versionNonce": 1955622806, + "isDeleted": false, + "id": "O7nOLj3p7plkP96NpwQ1I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1029.7648941900472, + "y": 437.19145782877354, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.2954661285185, + "height": 20.297183880733197, + "seed": 2003034646, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2312, + "versionNonce": 782269642, + "isDeleted": false, + "id": "kerXQoUlsPMLNF2wHsMAh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1074.306513596446, + "y": 437.34004976914014, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 181629514, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2379, + "versionNonce": 1732906198, + "isDeleted": false, + "id": "_dLZhGSEbNBZITX5N1Rr-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1193.239849813909, + "y": 437.34004976914014, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 1410019158, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 2127, + "versionNonce": 332026762, + "isDeleted": false, + "id": "LXDpFrfd5JPY4vBM5txib", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1470.4835393354836, + "y": 437.42673827992746, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 688036106, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 00:27:07", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:27:07" + }, + { + "type": "text", + "version": 2478, + "versionNonce": 593363478, + "isDeleted": false, + "id": "0XIN9-RWyD5sgHGLRv4HZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 947.3699172291316, + "y": 439.82375328699607, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 77, + "height": 20, + "seed": 1356256406, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.192", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.192" + }, + { + "type": "rectangle", + "version": 3438, + "versionNonce": 1259033162, + "isDeleted": false, + "id": "p6ySQJ_foDdWAhHI5G_Hv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1030.1991452075683, + "y": 470.759233676342, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.5856676424751, + "height": 18.42915085614445, + "seed": 1813964746, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2455, + "versionNonce": 1002524502, + "isDeleted": false, + "id": "_ep0Vqmc7fkgZRRcVSs_E", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1074.306513596446, + "y": 469.97380910441416, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 393990614, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2526, + "versionNonce": 1463712010, + "isDeleted": false, + "id": "-P2USAO2VxJ8IQ_85gsyF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1193.5635266340803, + "y": 469.97380910441416, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 205741706, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4299, + "versionNonce": 482931862, + "isDeleted": false, + "id": "tol1691g-FTuKcuji6cA_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1030.5858854165651, + "y": 501.0557206966429, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 632.438455857557, + "height": 19.331987292126826, + "seed": 1393501974, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3287, + "versionNonce": 668911562, + "isDeleted": false, + "id": "bo1X2KQrQ3NbZfjp3QHWF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1074.306513596446, + "y": 500.7217143427064, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 103480650, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 3354, + "versionNonce": 1613361622, + "isDeleted": false, + "id": "aOYGlP1e05XHLxTJocUZ0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1193.7501545683997, + "y": 500.7217143427064, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 67490902, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 3099, + "versionNonce": 84360842, + "isDeleted": false, + "id": "9LQrHaz85QHSicWMy1nUE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1470.9938440899743, + "y": 500.8084028534936, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 120636426, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 12:25:12", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:25:12" + }, + { + "type": "text", + "version": 2072, + "versionNonce": 553207574, + "isDeleted": false, + "id": "vTJDvgFMWV4A56kE_RqQK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1092.306513596446, + "y": 509.4609459180682, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1412749718, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2192, + "versionNonce": 2071125322, + "isDeleted": false, + "id": "bd1dfwX19t8A-t00pyE8k", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1092.306513596446, + "y": 523.2407754635241, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1498395338, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2201, + "versionNonce": 1336669270, + "isDeleted": false, + "id": "tD3P6Ai3HuprA_ORZwVTr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1092.306513596446, + "y": 536.4102466173698, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1792095958, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2075, + "versionNonce": 1216128010, + "isDeleted": false, + "id": "sFbPRpuIN5z-8W2wnOj1t", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1310.4046524286832, + "y": 508.2310551747769, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1327679882, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2191, + "versionNonce": 102168982, + "isDeleted": false, + "id": "CD-HstjW1h3S9QujY9LRk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1310.6915842468634, + "y": 522.0108847202308, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1081076758, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2200, + "versionNonce": 1176474314, + "isDeleted": false, + "id": "gq1xWaZE-XhBqMf-8PdhZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1310.716524150711, + "y": 535.1803558740768, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 803539018, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2121, + "versionNonce": 1534023382, + "isDeleted": false, + "id": "nnS6YuBTRzIv8NM-F5hLj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1548.1042670758327, + "y": 508.2800608565949, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1929771350, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2237, + "versionNonce": 1459005834, + "isDeleted": false, + "id": "rOFNKc2TWjTz009v3DvLa", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1548.3911988940147, + "y": 522.0598904020488, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 594636554, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2246, + "versionNonce": 944376854, + "isDeleted": false, + "id": "gQNmVdGM-aUXmIvDvBc_g", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1548.4161387978622, + "y": 535.2293615558948, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 434658966, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3541, + "versionNonce": 1379723338, + "isDeleted": false, + "id": "GlYjoKrN39RMxb4VCGoBe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1029.3496233999756, + "y": 563.5490847749403, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 633.4556360399567, + "height": 20.593894652071985, + "seed": 507706826, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2585, + "versionNonce": 714873174, + "isDeleted": false, + "id": "PFOE-trbLGwmt4FzZotc0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1064.306513596446, + "y": 563.8460321009762, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 96, + "height": 20, + "seed": 432806870, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "10.487.847", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "10.487.847" + }, + { + "type": "text", + "version": 2655, + "versionNonce": 1875726090, + "isDeleted": false, + "id": "g0zIwtHgYJ5YJUAaMg1Cw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1193.4657065990611, + "y": 563.8460321009762, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1299494026, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http://doc/1437831&is_mo...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http://doc/1437831&is_mo..." + }, + { + "type": "text", + "version": 2400, + "versionNonce": 968523414, + "isDeleted": false, + "id": "7ZOLRyjOVxrznqzpWsAh1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1470.7093961206358, + "y": 563.9327206117636, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 2026254614, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-17 05:50:01", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-17 05:50:01" + }, + { + "type": "text", + "version": 2742, + "versionNonce": 874700234, + "isDeleted": false, + "id": "pkkc_YhVwYsIk7vb1ML_X", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 936.5957740142875, + "y": 566.3679720992712, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 46240586, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 16.383", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 16.383" + }, + { + "type": "rectangle", + "version": 4880, + "versionNonce": 978992086, + "isDeleted": false, + "id": "LuX7Fpej4nAk8sD572q7G", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 894.372576942194, + "y": 658.7441360943783, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 773.2456351692409, + "height": 151.18724556550592, + "seed": 2021674838, + "groupIds": [ + "P6tHtuIUAYxSvJEzJ24r8" + ], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5558, + "versionNonce": 1549309066, + "isDeleted": false, + "id": "MQERmG_TTHLhJwKfqehAr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 892.42870138022, + "y": 657.744962336532, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 776.7457386363642, + "height": 154.2443443800131, + "seed": 166689034, + "groupIds": [ + "P6tHtuIUAYxSvJEzJ24r8" + ], + "roundness": null, + "boundElements": [ + { + "id": "3kgcfqKSC119Vts5h_nWg", + "type": "arrow" + } + ], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3906, + "versionNonce": 579883286, + "isDeleted": false, + "id": "__SVNO9hLIe1Mqz7onLdF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1031.2108760502588, + "y": 661.7898562735926, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 629.5127418132788, + "height": 19.4734285591735, + "seed": 857129814, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2842, + "versionNonce": 1244230474, + "isDeleted": false, + "id": "tn6VoybdvXfsMUUO_KPIZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1036.1870139508865, + "y": 661.5265705531793, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 1093289226, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 2910, + "versionNonce": 1574026838, + "isDeleted": false, + "id": "A4fOWu39OwVcywFuPt6Ng", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1192.9995045224814, + "y": 661.5265705531793, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1901062294, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 2654, + "versionNonce": 1878030858, + "isDeleted": false, + "id": "4K3M0bCq4xlLFKiMZVXWJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1470.243194044056, + "y": 661.6132590639664, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 2054230986, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-22 16:22:00", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 16:22:00" + }, + { + "type": "text", + "version": 2966, + "versionNonce": 552829846, + "isDeleted": false, + "id": "19VqruzPfWRjVW6K2x3lm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 905.1295719377041, + "y": 663.2831643140897, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 119, + "height": 20, + "seed": 1873962454, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.863.744", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.863.744" + }, + { + "type": "rectangle", + "version": 3915, + "versionNonce": 1017686218, + "isDeleted": false, + "id": "o6RiAfEK6_hC_jOr7fVDs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1030.043976154924, + "y": 693.9567801685001, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.3754464133191, + "height": 19.329071290348566, + "seed": 1735395978, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2985, + "versionNonce": 1042981078, + "isDeleted": false, + "id": "4L8mA8Ckfe23nWBJT34eX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1036.1870139508865, + "y": 693.6213158136744, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 257112854, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3062, + "versionNonce": 132972426, + "isDeleted": false, + "id": "GA4Bu9iq1wG963-RtmhFY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1193.3231813426528, + "y": 693.6213158136744, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 786573642, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 2800, + "versionNonce": 2030835222, + "isDeleted": false, + "id": "4DzDdL3kkJRx5x-kBPbMs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1470.5668708642274, + "y": 693.7080043244615, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1185376342, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-22 18:02:12", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 18:02:12" + }, + { + "type": "rectangle", + "version": 4726, + "versionNonce": 2113437258, + "isDeleted": false, + "id": "hLsQVwev3SN3adAAmfj3M", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1029.0381427168381, + "y": 726.1102929729972, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.8702765794457, + "height": 19.900607638888914, + "seed": 1747087370, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3808, + "versionNonce": 1519182678, + "isDeleted": false, + "id": "WrS7VAFY1bfp7wfKxtVl8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1036.1870139508865, + "y": 726.0605967924415, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 1971580310, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3881, + "versionNonce": 195437834, + "isDeleted": false, + "id": "eon42bZOpPXz6rEO9tLkM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1193.411091979494, + "y": 726.0605967924415, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 120315594, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​sozcu​.​com​.​tr​/​oaut...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sozcu​.​com​.​tr​/​oaut..." + }, + { + "type": "text", + "version": 3623, + "versionNonce": 84019350, + "isDeleted": false, + "id": "9kXMTTpRhLdeNrZy7it-E", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1470.7534987985468, + "y": 726.1472853032288, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 958253782, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-19 00:09:42", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-19 00:09:42" + }, + { + "type": "text", + "version": 2599, + "versionNonce": 1248916426, + "isDeleted": false, + "id": "yTa0PqJZh3PTcNlYBNMMw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1092.1870139508865, + "y": 735.0545065944303, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1218016650, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2715, + "versionNonce": 136349142, + "isDeleted": false, + "id": "oM4FQNn-Mvi72e6XCVcLS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1092.1870139508865, + "y": 748.8343361398862, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1074397206, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2724, + "versionNonce": 1819536010, + "isDeleted": false, + "id": "Ye-d6hQnU2M48gLxGunW1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1092.1870139508865, + "y": 762.0038072937319, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 497431626, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2600, + "versionNonce": 889019158, + "isDeleted": false, + "id": "BbTuAf2VuGHXFMirGRPV_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1310.1643071372566, + "y": 733.8246158511391, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 507350358, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700913, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2715, + "versionNonce": 678037834, + "isDeleted": false, + "id": "EUH07YvDkOYB433W6z0Fr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1310.3645504446495, + "y": 747.5177568858059, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 405609226, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2724, + "versionNonce": 1913489494, + "isDeleted": false, + "id": "RtlASmtbxNdARl2D54g1c", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1310.389490348497, + "y": 760.6872280396516, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 554529430, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2646, + "versionNonce": 632180746, + "isDeleted": false, + "id": "ipHD6wPu79s8Qu-bHHYA7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1547.8639217844043, + "y": 733.8736215329571, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1453926858, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2761, + "versionNonce": 254152086, + "isDeleted": false, + "id": "LCAKPpe09w2Je8IhcONMo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1548.0641650918008, + "y": 747.5667625676239, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 590262230, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2770, + "versionNonce": 1748745930, + "isDeleted": false, + "id": "_vIqxjHjb_YOjdlDiMJ23", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1548.0891049956483, + "y": 760.7362337214696, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1882546314, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4059, + "versionNonce": 427551446, + "isDeleted": false, + "id": "e-FHjlOvv0hJppkmVyfZK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1030.0528828654187, + "y": 789.683901128445, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.0506824293966, + "height": 19.840790040348676, + "seed": 1622557974, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2737, + "versionNonce": 1017992586, + "isDeleted": false, + "id": "WDUAmEYWfFdwFzbHkQ2tz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1036.1870139508865, + "y": 789.6042961486195, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 1619836746, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.294.961.484", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.294.961.484" + }, + { + "type": "text", + "version": 2897, + "versionNonce": 799285270, + "isDeleted": false, + "id": "gX3fHoVZ1AnvTdybGAyDl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1194.1664216534107, + "y": 789.6042961486195, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1259942486, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "https​:​/​/​m​.​sport​.​airway​/​?...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​m​.​sport​.​airway​/​?..." + }, + { + "type": "text", + "version": 2618, + "versionNonce": 608048202, + "isDeleted": false, + "id": "rkSx4vh5rlOYbuMCnocyh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1471.6200566283426, + "y": 789.6042961486195, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1946830346, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 12:05:41", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:05:41" + }, + { + "type": "text", + "version": 2857, + "versionNonce": 1435741526, + "isDeleted": false, + "id": "ZVHJt1y6EbxU9i66uwLd_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 906.1414410342196, + "y": 791.4652987527858, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 121, + "height": 20, + "seed": 1563195286, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.867.680", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.867.680" + }, + { + "type": "text", + "version": 1777, + "versionNonce": 1218417302, + "isDeleted": false, + "id": "IhL2-OJrSbi3EJ_cNKNTp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 717.989017400923, + "y": 284.8446568103518, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 119, + "height": 40, + "seed": 606921546, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "GkiYx80xAbmpjHnxJ7KXx", + "type": "arrow" + } + ], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 0\nwith 8192 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 0\nwith 8192 rows" + }, + { + "type": "arrow", + "version": 1733, + "versionNonce": 1086917066, + "isDeleted": false, + "id": "GkiYx80xAbmpjHnxJ7KXx", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "angle": 0, + "x": 847.4688284044247, + "y": 305.78029017015615, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 36.73828125, + "height": 0.9079272975623098, + "seed": 738020950, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "startBinding": { + "elementId": "IhL2-OJrSbi3EJ_cNKNTp", + "focus": 0.12412743246042555, + "gap": 10.479811003501709 + }, + "endBinding": { + "elementId": "jKrOvtSdbVSH_uP-cvpmx", + "focus": 0.6408863246638227, + "gap": 8.560575619190104 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 36.73828125, + -0.9079272975623098 + ] + ] + }, + { + "type": "text", + "version": 2491, + "versionNonce": 1400688598, + "isDeleted": false, + "id": "SpWNTXzUj6aN5NPSUhRAY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 721.2735133993058, + "y": 437.9595550258464, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 119, + "height": 40, + "seed": 943125206, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "3WI04rxxvXSjHIfous1og", + "type": "arrow" + } + ], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 1\nwith 8192 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 1\nwith 8192 rows" + }, + { + "type": "arrow", + "version": 1679, + "versionNonce": 1264140426, + "isDeleted": false, + "id": "3WI04rxxvXSjHIfous1og", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "angle": 0, + "x": 848.9141383993067, + "y": 460.4928562436967, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 39.8359375, + "height": 1.008672810209191, + "seed": 1090964874, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "startBinding": { + "elementId": "SpWNTXzUj6aN5NPSUhRAY", + "focus": 0.037566857262255365, + "gap": 8.64062500000091 + }, + "endBinding": { + "elementId": "chehznvRTylGXnyCR9RaI", + "focus": 0.4556907888569733, + "gap": 3.724432025977535 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 39.8359375, + 1.008672810209191 + ] + ] + }, + { + "type": "text", + "version": 2770, + "versionNonce": 574645526, + "isDeleted": false, + "id": "VlXyMPCdRQCg7m9ThEtTy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 715.8710167352311, + "y": 669.2559365499744, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 123, + "height": 40, + "seed": 2058369354, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "3kgcfqKSC119Vts5h_nWg", + "type": "arrow" + } + ], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 1082\nwith 3937 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 1082\nwith 3937 rows" + }, + { + "type": "arrow", + "version": 1417, + "versionNonce": 1815387978, + "isDeleted": false, + "id": "3kgcfqKSC119Vts5h_nWg", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "angle": 0, + "x": 847.316329235232, + "y": 685.8621354970959, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 37.82667994643066, + "height": 2.2924149685511566, + "seed": 1921144918, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "startBinding": { + "elementId": "VlXyMPCdRQCg7m9ThEtTy", + "focus": 0.03561765500796156, + "gap": 8.44531250000091 + }, + "endBinding": { + "elementId": "MQERmG_TTHLhJwKfqehAr", + "focus": 0.7478290302818336, + "gap": 7.285692198557172 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 37.82667994643066, + -2.2924149685511566 + ] + ] + }, + { + "type": "text", + "version": 2314, + "versionNonce": 375345750, + "isDeleted": false, + "id": "e_TJfU5-f0tr0032g1I2m", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1500.8747505666038, + "y": 1200.0338608147845, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 231, + "height": 40, + "seed": 865405462, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "key column values \nof first row of granule 1082", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "key column values \nof first row of granule 1082" + }, + { + "type": "rectangle", + "version": 1997, + "versionNonce": 447649686, + "isDeleted": false, + "id": "pWOj9caE7KB3XHDbMSg0S", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2507.3467238219796, + "y": 243.6977036981849, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 127.02013262761585, + "height": 593.2427235943161, + "seed": 1065365142, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1579, + "versionNonce": 517526730, + "isDeleted": false, + "id": "66Cg7L-YsfE3ZFXe-2LQL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2521.977350687726, + "y": 249.12090972109104, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 102, + "height": 25, + "seed": 449850826, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "rectangle", + "version": 2372, + "versionNonce": 2002990294, + "isDeleted": false, + "id": "Wj8PWU5wnkz7U8lvblU3U", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2937.8376858023325, + "y": 241.03842966644868, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 187.54419978513067, + "height": 596.0708074323217, + "seed": 1542056918, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2311, + "versionNonce": 188197770, + "isDeleted": false, + "id": "pRV42FOTjYkKJYnUgKb6l", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2658.035296814221, + "y": 242.60981025674812, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 258.90957266803287, + "height": 594.0956012893664, + "seed": 551281802, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1381, + "versionNonce": 638724630, + "isDeleted": false, + "id": "AERP1ARLHUZdaIQPJRCGu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2750.87205348929, + "y": 249.63272418872452, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70, + "height": 25, + "seed": 1453981974, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "text", + "version": 1508, + "versionNonce": 453880394, + "isDeleted": false, + "id": "MLAorr83tAGsrUS9fcYKo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2955.4040545000776, + "y": 249.7759533553924, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 130, + "height": 25, + "seed": 1103283018, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "EventTime.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "EventTime.bin" + }, + { + "type": "text", + "version": 2455, + "versionNonce": 632321878, + "isDeleted": false, + "id": "dtTYmwaotDlgQQlg7Xbns", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2559.2839396929153, + "y": 582.7229795730589, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 1127575126, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2634, + "versionNonce": 624283914, + "isDeleted": false, + "id": "jJiUXlgovk-ViFbfXi1cC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2559.2839396929153, + "y": 601.4969232999167, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 1205848586, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2818, + "versionNonce": 1318263958, + "isDeleted": false, + "id": "cMfpU_9RWO_ldt64kULAL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2559.2839396929153, + "y": 620.2714026753663, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 2120299414, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2699, + "versionNonce": 1831542730, + "isDeleted": false, + "id": "_hICWBWri3Vb4bKy89BKH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2779.177356413059, + "y": 582.8097007403203, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 2049833162, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2876, + "versionNonce": 644815318, + "isDeleted": false, + "id": "k3ijfVNOzI51IpN-U0f7n", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2779.537858327686, + "y": 601.5836444671786, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 39997654, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3060, + "versionNonce": 252221066, + "isDeleted": false, + "id": "mczF970BUWR9dCA0Rfwlg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2779.4576300181716, + "y": 620.3581238426277, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 138956682, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2762, + "versionNonce": 878276374, + "isDeleted": false, + "id": "d6j-29IKQf4PU1W1Ckrs4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3017.6481595071805, + "y": 582.7849611569868, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 986564118, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2939, + "versionNonce": 1804154186, + "isDeleted": false, + "id": "gLPBiGV-Fpz3ohYs6CWCQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3018.0086614218076, + "y": 601.5589048838451, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 1986645578, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3123, + "versionNonce": 1422335062, + "isDeleted": false, + "id": "ypRIUdLWGuoNWXQbMNQas", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3017.928433112293, + "y": 620.3333842592942, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 1486394198, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4748, + "versionNonce": 336067594, + "isDeleted": false, + "id": "PaA6_N4i8mBfh6IWtJgsV", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 2365.6889869320585, + "y": 283.2747585173578, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 773.2456351692409, + "height": 151.18724556550592, + "seed": 158168330, + "groupIds": [ + "LqyJbO82T9Tz_zh9FaXqX" + ], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5427, + "versionNonce": 227352982, + "isDeleted": false, + "id": "Gw2eBgsuxsg2VlKRwbtKO", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2363.745111370084, + "y": 282.2755847595116, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 776.7457386363642, + "height": 154.2443443800131, + "seed": 639088790, + "groupIds": [ + "LqyJbO82T9Tz_zh9FaXqX" + ], + "roundness": null, + "boundElements": [ + { + "id": "_YjTxlDG87CIdOOLU9b08", + "type": "arrow" + } + ], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2524, + "versionNonce": 914352842, + "isDeleted": false, + "id": "p0DVISkFBiGtIIbd6AsVu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2500.4166494652964, + "y": 286.09706102849293, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.3968293978423, + "height": 20.04948308198391, + "seed": 852378570, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1466, + "versionNonce": 1642102486, + "isDeleted": false, + "id": "lWLTYQPIBBONW7KEC20Zq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2563.2839396929153, + "y": 286.1218025694849, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 1526740438, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "240.923", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 1532, + "versionNonce": 160170378, + "isDeleted": false, + "id": "9dQM9xr4iE3Q8KkNb6ZjL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2664.2615554546933, + "y": 286.1218025694849, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 2091334282, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 1290, + "versionNonce": 643183638, + "isDeleted": false, + "id": "vTCSThHVsBtVi_-9zwayc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2941.5052449762684, + "y": 287.4637013712652, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1885801238, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-23 04:39:21", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-23 04:39:21" + }, + { + "type": "text", + "version": 1657, + "versionNonce": 946290762, + "isDeleted": false, + "id": "4RSGzIhqjwypztdfOZ-aM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2447.3916228699177, + "y": 288.4633336577359, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 1974688074, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 0", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 1745, + "versionNonce": 1424179542, + "isDeleted": false, + "id": "DBDnsNNIqoGgZc53sz0pb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2564.2839396929153, + "y": 359.66779659721817, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1958819926, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1877, + "versionNonce": 1324132106, + "isDeleted": false, + "id": "NjY_7TWm_jNBkBoDggCU9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2564.2839396929153, + "y": 373.44762614267404, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 491626506, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1886, + "versionNonce": 1625073302, + "isDeleted": false, + "id": "hsPFUyCfIdD25xowKMR3k", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2564.2839396929153, + "y": 386.6170972965198, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1608760726, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1743, + "versionNonce": 630666698, + "isDeleted": false, + "id": "Ot7FznlQfCbvOnn6seKd5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2781.4225348315313, + "y": 358.43790585392685, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1332809418, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1859, + "versionNonce": 183985110, + "isDeleted": false, + "id": "YXQ2Fs-Sn2aRlbFc2Xwfy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2781.7094666497114, + "y": 372.2177353993809, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1728289494, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1868, + "versionNonce": 1300360330, + "isDeleted": false, + "id": "fGKh6RPdkCWqrk6wlkhIY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2781.734406553559, + "y": 385.38720655322663, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 817407370, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1789, + "versionNonce": 893942038, + "isDeleted": false, + "id": "OdvaidDYe_wDJ5HegSRka", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3019.122149478681, + "y": 358.48691153574487, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1354092566, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1905, + "versionNonce": 2087177034, + "isDeleted": false, + "id": "6nkhaaiDymQFURub_drPm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3019.409081296863, + "y": 372.2667410811989, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 442459210, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1914, + "versionNonce": 927262294, + "isDeleted": false, + "id": "OupMWQIO8HkIzJP3F3gX1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3019.4340212007105, + "y": 385.43621223504465, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1223646550, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 2634, + "versionNonce": 2024002058, + "isDeleted": false, + "id": "L5M1FEAdApBDgAPURIhNP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2500.589472738356, + "y": 318.32114460910725, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.3340592712975, + "height": 19.900607638888914, + "seed": 104876810, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1616, + "versionNonce": 834775958, + "isDeleted": false, + "id": "wHvXC7k1v1lDEBUBOwnD2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2563.2839396929153, + "y": 318.2714484285517, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 889537174, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "258.382", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 1679, + "versionNonce": 87097546, + "isDeleted": false, + "id": "9stpsGPgDZRK48xEqx5go", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2664.5852322748647, + "y": 318.2714484285517, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 2060868042, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 1443, + "versionNonce": 1660143830, + "isDeleted": false, + "id": "Kfl__Y3G27Rg_DhKu9xyi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2941.8289217964398, + "y": 318.35813693933903, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 128745430, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 01:03:28", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:03:28" + }, + { + "type": "text", + "version": 1803, + "versionNonce": 1303009162, + "isDeleted": false, + "id": "WOjhBbun-WrZaKsluuPm-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2447.715299690089, + "y": 320.5568638254855, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 39, + "height": 20, + "seed": 2000457866, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "rectangle", + "version": 3412, + "versionNonce": 2054176278, + "isDeleted": false, + "id": "6TycpKEFxVMASLkw0QA3d", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2500.693119492263, + "y": 350.82394634562013, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.7544755146852, + "height": 20.142795138888914, + "seed": 351933718, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "OlRGFFrc3VVyCZZcg8VsU", + "type": "arrow" + } + ], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2435, + "versionNonce": 1380636234, + "isDeleted": false, + "id": "GEzNqcYGjHLXojcholYji", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2563.2839396929153, + "y": 350.8953439150647, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 1596845898, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "258.382", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 2503, + "versionNonce": 1831603030, + "isDeleted": false, + "id": "t6rKejep6V0ALzUNP2_ss", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2664.771860209185, + "y": 350.8953439150647, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1717764694, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 2246, + "versionNonce": 1408072970, + "isDeleted": false, + "id": "k1LLV6XmP8aiHepeNbCPH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2942.01554973076, + "y": 350.9820324258519, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1728411146, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 01:04:08", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:04:08" + }, + { + "type": "text", + "version": 2625, + "versionNonce": 1232875670, + "isDeleted": false, + "id": "_g_bU1RV-5EVKLLHtitbT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2446.9019276244094, + "y": 353.2522810317679, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 247220118, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 2", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "rectangle", + "version": 3156, + "versionNonce": 1074613194, + "isDeleted": false, + "id": "Xh7_8qca1VJs2lw9dACUZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2500.180734744496, + "y": 414.38707857584336, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.5134081994029, + "height": 19.900607638888914, + "seed": 2143167690, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2252, + "versionNonce": 185970134, + "isDeleted": false, + "id": "YacFD9jL89-waL0-M4IVW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2545.2839396929153, + "y": 414.429158233472, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 2117788886, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2320, + "versionNonce": 482689674, + "isDeleted": false, + "id": "tH5ZVq3Qskxyz0i_VyHVg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2664.48358900191, + "y": 414.429158233472, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 1123220362, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 2068, + "versionNonce": 1863156502, + "isDeleted": false, + "id": "xfKKb37kmK-4DBrH_xGST", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2941.727278523485, + "y": 414.5158467442592, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1450433046, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 00:26:41", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:26:41" + }, + { + "type": "text", + "version": 2431, + "versionNonce": 1959813450, + "isDeleted": false, + "id": "5Ld0zQneqRNaceeYMBS3x", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2419.6136564171347, + "y": 416.5748227784212, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70, + "height": 20, + "seed": 1591671370, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.191", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.191" + }, + { + "type": "rectangle", + "version": 5296, + "versionNonce": 1205383254, + "isDeleted": false, + "id": "qCOACf_-BqBXPXxg1DVFo", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 2365.3958095837284, + "y": 443.68894852965093, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 773.2456351692409, + "height": 151.18724556550592, + "seed": 1046226774, + "groupIds": [ + "WbhmfdmEQzI5ceP26x_NP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5975, + "versionNonce": 1133094922, + "isDeleted": false, + "id": "E45ogxhmy1byRnHG7lRjI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2363.451934021754, + "y": 442.68977477180454, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 776.7457386363642, + "height": 154.2443443800131, + "seed": 39657738, + "groupIds": [ + "WbhmfdmEQzI5ceP26x_NP" + ], + "roundness": null, + "boundElements": [ + { + "id": "-04dLzEB2MhYPnVa6qYiw", + "type": "arrow" + } + ], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3268, + "versionNonce": 1363948950, + "isDeleted": false, + "id": "ojui0YA6_zg1L0giHfrSb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2500.742320286517, + "y": 445.94864327333767, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.2954661285185, + "height": 20.297183880733197, + "seed": 910740630, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2356, + "versionNonce": 1626085066, + "isDeleted": false, + "id": "BwFh7s9wPF9O5-JfnrbQm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2545.2839396929153, + "y": 446.09723521370427, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 1223192522, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2423, + "versionNonce": 77402838, + "isDeleted": false, + "id": "cpneQfHnsrxTTw7d_G6NA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2664.2172759103782, + "y": 446.09723521370427, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 1810811350, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 2171, + "versionNonce": 1838329226, + "isDeleted": false, + "id": "Wb6shCrHs1dxXj_6khnIa", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2941.4609654319534, + "y": 446.1839237244916, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 647751306, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 00:27:07", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:27:07" + }, + { + "type": "text", + "version": 2522, + "versionNonce": 1818249238, + "isDeleted": false, + "id": "iXlbtlfx_VRhIhWjZGeRk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2418.3473433256013, + "y": 448.5809387315602, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 77, + "height": 20, + "seed": 241377046, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.192", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.192" + }, + { + "type": "rectangle", + "version": 3482, + "versionNonce": 1052273738, + "isDeleted": false, + "id": "p7gwyelhvWMyE3SgyViDY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2501.176571304038, + "y": 479.51641912090616, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.5856676424751, + "height": 18.42915085614445, + "seed": 1412597066, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2499, + "versionNonce": 2022364502, + "isDeleted": false, + "id": "lS25rbCjdQfw2YvfibjSg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2545.2839396929153, + "y": 478.73099454897823, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 572181590, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2570, + "versionNonce": 1245205258, + "isDeleted": false, + "id": "NF1KXJK-5z5yDHE3wK9lz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2664.5409527305496, + "y": 478.73099454897823, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 990333962, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4344, + "versionNonce": 1383185046, + "isDeleted": false, + "id": "kt_dGcsR7ef7M6F49EQSp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2501.5633115130345, + "y": 509.8129061412071, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 632.438455857557, + "height": 19.331987292126826, + "seed": 1424675222, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "hicqNte9JKDbcQ-UbMc4P", + "type": "arrow" + } + ], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3331, + "versionNonce": 311255498, + "isDeleted": false, + "id": "KjHJ8T8_-vsz0O8LndffR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2545.2839396929153, + "y": 509.4788997872706, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 1628781258, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 3398, + "versionNonce": 818542550, + "isDeleted": false, + "id": "OXvqeLygwrPzAmx4GimdM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2664.727580664869, + "y": 509.4788997872706, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 1376267990, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 3143, + "versionNonce": 315791498, + "isDeleted": false, + "id": "uXZFdanVAFIwAdvPMCerI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2941.971270186444, + "y": 509.5655882980577, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1425494410, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 12:25:12", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:25:12" + }, + { + "type": "text", + "version": 2116, + "versionNonce": 732466454, + "isDeleted": false, + "id": "4ICG-etq8I2892YZ3mTVu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2563.2839396929153, + "y": 518.2181313626324, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 369615894, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2236, + "versionNonce": 717420362, + "isDeleted": false, + "id": "q3VH05johldBe24_VZdbv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2563.2839396929153, + "y": 531.9979609080883, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 434671690, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2245, + "versionNonce": 276986454, + "isDeleted": false, + "id": "dTA_h83l8unSmBf8DARz3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2563.2839396929153, + "y": 545.167432061934, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1121907030, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2119, + "versionNonce": 179928586, + "isDeleted": false, + "id": "UUx9UnBRuuZIaSELgYEP8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2781.382078525153, + "y": 516.988240619341, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 331609866, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2235, + "versionNonce": 908902294, + "isDeleted": false, + "id": "yCoN-rptdoaSKEIVeenX1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2781.669010343333, + "y": 530.7680701647951, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1944213142, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2244, + "versionNonce": 531705034, + "isDeleted": false, + "id": "ML-Xvh5mc0M9Uefhf1gHg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2781.6939502471805, + "y": 543.937541318641, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1929676234, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2165, + "versionNonce": 1356618966, + "isDeleted": false, + "id": "szLD0TowT11CnzigHzKga", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3019.0816931723025, + "y": 517.037246301159, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 298259414, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2281, + "versionNonce": 2135229322, + "isDeleted": false, + "id": "OCMFfxPQQH7Iac3HyDTWi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3019.3686249904845, + "y": 530.8170758466131, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 549797002, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2290, + "versionNonce": 1176916502, + "isDeleted": false, + "id": "gX2_CEHworkrbQ7D6F8GN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3019.393564894332, + "y": 543.986547000459, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 648161558, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3585, + "versionNonce": 1404043850, + "isDeleted": false, + "id": "6dTmfGDapN_vOOxpfuX2v", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2500.327049496445, + "y": 572.3062702195045, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 633.4556360399567, + "height": 20.593894652071985, + "seed": 717298506, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2629, + "versionNonce": 16752470, + "isDeleted": false, + "id": "wb--3FvQNraygmIX9r1qu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2535.2839396929153, + "y": 572.6032175455405, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 96, + "height": 20, + "seed": 837326422, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "10.487.847", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "10.487.847" + }, + { + "type": "text", + "version": 2699, + "versionNonce": 1204627722, + "isDeleted": false, + "id": "ypnwujl6UjVWz_dFoP_ER", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2664.4431326955305, + "y": 572.6032175455405, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 793977354, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http://doc/1437831&is_mo...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http://doc/1437831&is_mo..." + }, + { + "type": "text", + "version": 2444, + "versionNonce": 1170031766, + "isDeleted": false, + "id": "WZxkIggKKWAfSvLfzzLBI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2941.6868222171056, + "y": 572.6899060563278, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 2087672726, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-17 05:50:01", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-17 05:50:01" + }, + { + "type": "text", + "version": 2786, + "versionNonce": 1930917834, + "isDeleted": false, + "id": "wc744o3Sxw3002itW9wKH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2407.573200110757, + "y": 575.1251575438355, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 1232490698, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 16.383", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 16.383" + }, + { + "type": "rectangle", + "version": 4924, + "versionNonce": 101990870, + "isDeleted": false, + "id": "nal558VBswtmh0fsQQ-SM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 2365.3500030386635, + "y": 667.5013215389424, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 773.2456351692409, + "height": 151.18724556550592, + "seed": 1818982614, + "groupIds": [ + "7h8JcUbe6uzMUGYZd-4cZ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5603, + "versionNonce": 1168764554, + "isDeleted": false, + "id": "tDMAG6WJUKTBF5siocecU", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2363.4061274766896, + "y": 666.5021477810963, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 776.7457386363642, + "height": 154.2443443800131, + "seed": 2093328266, + "groupIds": [ + "7h8JcUbe6uzMUGYZd-4cZ" + ], + "roundness": null, + "boundElements": [ + { + "id": "PM05sS8aLlBRdIXcZwKbQ", + "type": "arrow" + } + ], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3950, + "versionNonce": 890869526, + "isDeleted": false, + "id": "L4Z2jH_7U6_rfqD8KxdCM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2502.1883021467283, + "y": 670.5470417181568, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 629.5127418132788, + "height": 19.4734285591735, + "seed": 1500638742, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2886, + "versionNonce": 1950321994, + "isDeleted": false, + "id": "bmxIrKK4vj6-mniHV4rC5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2507.164440047356, + "y": 670.2837559977436, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 561784394, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 2954, + "versionNonce": 457327702, + "isDeleted": false, + "id": "ZrToI0TrtVt9kMn7qGNSd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2663.976930618951, + "y": 670.2837559977436, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1618459478, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 2698, + "versionNonce": 1681085450, + "isDeleted": false, + "id": "AjUPqk8Da_o_UtGlGtKms", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2941.2206201405256, + "y": 670.3704445085307, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1349831946, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-22 16:22:00", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 16:22:00" + }, + { + "type": "text", + "version": 3010, + "versionNonce": 711149974, + "isDeleted": false, + "id": "4DQWOr6aIXh9VrCb9F4B5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2376.1069980341736, + "y": 672.040349758654, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 119, + "height": 20, + "seed": 936501398, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.863.744", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.863.744" + }, + { + "type": "rectangle", + "version": 3959, + "versionNonce": 394281674, + "isDeleted": false, + "id": "4NDRPe58KxcR9OwKtyg84", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2501.0214022513933, + "y": 702.7139656130644, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.3754464133191, + "height": 19.329071290348566, + "seed": 1328192458, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3029, + "versionNonce": 1370597078, + "isDeleted": false, + "id": "ye3n9ViOVdNowHg4ToOSK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2507.164440047356, + "y": 702.3785012582387, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 53829078, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3106, + "versionNonce": 415324554, + "isDeleted": false, + "id": "YzkJwHQaKNS4uRpRIxoAQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2664.3006074391224, + "y": 702.3785012582387, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 2075693706, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 2844, + "versionNonce": 1371692054, + "isDeleted": false, + "id": "WlXMnS8hjom5YoP3nAvsj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2941.544296960697, + "y": 702.4651897690258, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 666317590, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-22 18:02:12", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 18:02:12" + }, + { + "type": "rectangle", + "version": 4771, + "versionNonce": 1731303498, + "isDeleted": false, + "id": "b9Ma96rWblzVxxpmCWx2x", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2500.0155688133077, + "y": 734.8674784175614, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.8702765794457, + "height": 19.900607638888914, + "seed": 953790794, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "vU55N_-jUk6NTTBoCvPcl", + "type": "arrow" + } + ], + "updated": 1672163700914, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3852, + "versionNonce": 277506390, + "isDeleted": false, + "id": "-G4rQ16FDCrEv9jGWTjFu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2507.164440047356, + "y": 734.8177822370058, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 533487702, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3925, + "versionNonce": 1655439114, + "isDeleted": false, + "id": "389SeaHiJkWVwkR0pDakl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2664.3885180759635, + "y": 734.8177822370058, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1508440074, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700914, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​sozcu​.​com​.​tr​/​oaut...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sozcu​.​com​.​tr​/​oaut..." + }, + { + "type": "text", + "version": 3667, + "versionNonce": 1834929814, + "isDeleted": false, + "id": "c-m83xxuyfBPwUzmghk5b", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2941.7309248950164, + "y": 734.9044707477931, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1330242966, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-19 00:09:42", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-19 00:09:42" + }, + { + "type": "text", + "version": 2643, + "versionNonce": 933989834, + "isDeleted": false, + "id": "32FplZcKqnjFXju2EZ1FX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2563.164440047356, + "y": 743.8116920389946, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 249652938, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2759, + "versionNonce": 351570902, + "isDeleted": false, + "id": "ffZHT1qmW18EDOK8nGatL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2563.164440047356, + "y": 757.5915215844504, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1466221270, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2768, + "versionNonce": 1263223946, + "isDeleted": false, + "id": "rXzbuozFp3A41bgX8AecV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2563.164440047356, + "y": 770.7609927382962, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1348337034, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2644, + "versionNonce": 1432396054, + "isDeleted": false, + "id": "790kshXeZMzXamnCCVUaW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2781.1417332337264, + "y": 742.5818012957034, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1790048278, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2759, + "versionNonce": 658907978, + "isDeleted": false, + "id": "m30ibOMGuMJB5yyLKvDaB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2781.341976541119, + "y": 756.2749423303701, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1268366410, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2768, + "versionNonce": 1914179158, + "isDeleted": false, + "id": "Ff9R2zjUljTPPVPwPkEO5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2781.3669164449666, + "y": 769.4444134842158, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 556172630, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2690, + "versionNonce": 1710696970, + "isDeleted": false, + "id": "AMFQ4PliEitPXY1sQqHj1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3018.841347880874, + "y": 742.6308069775214, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1315939082, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2805, + "versionNonce": 2012205974, + "isDeleted": false, + "id": "DEUAbTbsTJo9tVddYMGun", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3019.0415911882706, + "y": 756.3239480121881, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1276603030, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2814, + "versionNonce": 509171914, + "isDeleted": false, + "id": "UkDmB1iNHNOJj5MNm4fYC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3019.066531092118, + "y": 769.4934191660338, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 861581770, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4103, + "versionNonce": 287109334, + "isDeleted": false, + "id": "0sIwnhyibrNzAZCYtvjv1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2501.0303089618883, + "y": 798.4410865730092, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.0506824293966, + "height": 19.840790040348676, + "seed": 1245292502, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2781, + "versionNonce": 1342680970, + "isDeleted": false, + "id": "axgtTftR1DFWrwfGTsNS1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2507.164440047356, + "y": 798.3614815931837, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 1299572874, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.294.961.484", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.294.961.484" + }, + { + "type": "text", + "version": 2941, + "versionNonce": 1496606230, + "isDeleted": false, + "id": "Y0qQiaxjpb74usFWOHNvs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2665.14384774988, + "y": 798.3614815931837, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1537359126, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "https​:​/​/​m​.​sport​.​airway​/​?...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​m​.​sport​.​airway​/​?..." + }, + { + "type": "text", + "version": 2662, + "versionNonce": 1329409610, + "isDeleted": false, + "id": "RlUnl-FH8d0tPyRufc7gd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2942.5974827248124, + "y": 798.3614815931837, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1417430858, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 12:05:41", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:05:41" + }, + { + "type": "text", + "version": 2901, + "versionNonce": 824914774, + "isDeleted": false, + "id": "SXOVtYO90RmHS4Mvd_twC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2377.118867130689, + "y": 800.22248419735, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 121, + "height": 20, + "seed": 1975921238, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.867.680", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.867.680" + }, + { + "type": "text", + "version": 1822, + "versionNonce": 819254538, + "isDeleted": false, + "id": "-40-8yAvmOGaO7N9VpPFw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2188.9664434973924, + "y": 293.60184225491594, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 119, + "height": 40, + "seed": 1355337226, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "_YjTxlDG87CIdOOLU9b08", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 0\nwith 8192 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 0\nwith 8192 rows" + }, + { + "type": "arrow", + "version": 1780, + "versionNonce": 324425878, + "isDeleted": false, + "id": "_YjTxlDG87CIdOOLU9b08", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "angle": 0, + "x": 2318.446254500894, + "y": 314.5374756147203, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 36.73828125, + "height": 0.9079272975623098, + "seed": 393899926, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "startBinding": { + "elementId": "-40-8yAvmOGaO7N9VpPFw", + "focus": 0.12412743246042555, + "gap": 10.479811003501709 + }, + "endBinding": { + "elementId": "Gw2eBgsuxsg2VlKRwbtKO", + "focus": 0.6408863246638227, + "gap": 8.560575619190104 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 36.73828125, + -0.9079272975623098 + ] + ] + }, + { + "type": "text", + "version": 2536, + "versionNonce": 910795722, + "isDeleted": false, + "id": "YEOH1zgGsxDb7E2LcL8IA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2192.2509394957756, + "y": 446.7167404704105, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 119, + "height": 40, + "seed": 123108554, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "-04dLzEB2MhYPnVa6qYiw", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 1\nwith 8192 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 1\nwith 8192 rows" + }, + { + "type": "arrow", + "version": 1726, + "versionNonce": 1735054806, + "isDeleted": false, + "id": "-04dLzEB2MhYPnVa6qYiw", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "angle": 0, + "x": 2319.8915644957765, + "y": 469.25004168826075, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 39.8359375, + "height": 1.008672810209191, + "seed": 485756118, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "startBinding": { + "elementId": "YEOH1zgGsxDb7E2LcL8IA", + "focus": 0.037566857262252715, + "gap": 8.64062500000091 + }, + "endBinding": { + "elementId": "E45ogxhmy1byRnHG7lRjI", + "focus": 0.45569078885697434, + "gap": 3.7244320259774213 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 39.8359375, + 1.008672810209191 + ] + ] + }, + { + "type": "text", + "version": 2815, + "versionNonce": 968268426, + "isDeleted": false, + "id": "Y9KxOYR3E59kj1hukW9io", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2186.8484428317006, + "y": 678.0131219945386, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 123, + "height": 40, + "seed": 1707103114, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "PM05sS8aLlBRdIXcZwKbQ", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 1082\nwith 3937 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 1082\nwith 3937 rows" + }, + { + "type": "arrow", + "version": 1464, + "versionNonce": 1451076374, + "isDeleted": false, + "id": "PM05sS8aLlBRdIXcZwKbQ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "angle": 0, + "x": 2318.2937553317015, + "y": 694.6193209416601, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 37.82667994643066, + "height": 2.2924149685511566, + "seed": 331874838, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "startBinding": { + "elementId": "Y9KxOYR3E59kj1hukW9io", + "focus": 0.03561765500796531, + "gap": 8.44531250000091 + }, + "endBinding": { + "elementId": "tDMAG6WJUKTBF5siocecU", + "focus": 0.7478290302818332, + "gap": 7.285692198557399 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 37.82667994643066, + -2.2924149685511566 + ] + ] + }, + { + "type": "rectangle", + "version": 4498, + "versionNonce": 433502538, + "isDeleted": false, + "id": "fdy-50lmxNxu7hkQfN3YW", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 3281.83941706825, + "y": 373.16261314321514, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 451.64952256944457, + "height": 253.11610243055577, + "seed": 1412657738, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "vU55N_-jUk6NTTBoCvPcl", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3446, + "versionNonce": 520345686, + "isDeleted": false, + "id": "lsLjZQxTVRzodEv9JkDKL", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 3304.108134136772, + "y": 426.21518475779885, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 182.95714962121258, + "seed": 1353396054, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2909, + "versionNonce": 637861898, + "isDeleted": false, + "id": "Bi2qF4khGXVkg9kju39Yh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3332.6404987596147, + "y": 431.44361937882877, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 72, + "height": 25, + "seed": 1180866826, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "rectangle", + "version": 3720, + "versionNonce": 1758616982, + "isDeleted": false, + "id": "GlbybtP_On5KGAdjGjONf", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 3452.873271234916, + "y": 424.83600724043663, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 256.999591503268, + "height": 183.92223011363598, + "seed": 964088982, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4575, + "versionNonce": 171732682, + "isDeleted": false, + "id": "yI6YLYqWrB2TXXIey4Lb9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 3296.0149813043595, + "y": 466.0224813565983, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 422.551254734849, + "height": 21.39989741161571, + "seed": 1568597962, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2744, + "versionNonce": 421411542, + "isDeleted": false, + "id": "DdS2U6EZQGpfv306_ABg6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3356.881734776582, + "y": 469.5161287682158, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 68, + "height": 20, + "seed": 1813762518, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "240.923", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 2847, + "versionNonce": 991430026, + "isDeleted": false, + "id": "sCFGX-236ejMqZ1datnXG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3455.924703526582, + "y": 468.2661287682158, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1369661066, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "hkhoeNjFEoC21b0x7dDgo", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 2705, + "versionNonce": 645689366, + "isDeleted": false, + "id": "O_JJJ2ygDlQH8PLhQARRq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3554.4485130503913, + "y": 431.86874533567516, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 41, + "height": 25, + "seed": 330245910, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "text", + "version": 2995, + "versionNonce": 1641202762, + "isDeleted": false, + "id": "UaXlA7ebrV89Unxrv6qop", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3362.553640917981, + "y": 509.990506254956, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 529202506, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3111, + "versionNonce": 1826749782, + "isDeleted": false, + "id": "aWfqLTqx9KVfE2ieqoLDV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3362.840572736163, + "y": 523.7703358004119, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 816174166, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3120, + "versionNonce": 1212656394, + "isDeleted": false, + "id": "6uaGFybhLsxSmBGrUpIvl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3362.8655126400104, + "y": 536.9398069542576, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1955644426, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3082, + "versionNonce": 27517590, + "isDeleted": false, + "id": "LZFFvqJC5gQ7815X-mBfs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3574.9989943926325, + "y": 508.6739270008775, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1825888662, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3198, + "versionNonce": 1156692426, + "isDeleted": false, + "id": "EL7VNVMBK49T6e_eOH3Gq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3575.2859262108127, + "y": 522.4537565463315, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 447722186, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3207, + "versionNonce": 125247446, + "isDeleted": false, + "id": "LRyXlsOoALxApYV4hDiVl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3575.3108661146603, + "y": 535.6232277001773, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1869690582, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4217, + "versionNonce": 652996746, + "isDeleted": false, + "id": "vUt5x25ixJXerhfpTOVmS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 3296.459751874531, + "y": 498.7449177743474, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 422.8751183712125, + "height": 20.649897411616156, + "seed": 1686292874, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "8AhUM4jsXM6vQonhRP5Vn", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2896, + "versionNonce": 40940822, + "isDeleted": false, + "id": "WWKZt1ntiYKr5KTkj4nFO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3338.3304115967535, + "y": 499.60965893596494, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 86, + "height": 20, + "seed": 823127062, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2991, + "versionNonce": 569462602, + "isDeleted": false, + "id": "PjRm6Dkk6a3-XSs_XAyU8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3458.2483803467535, + "y": 499.2240853057558, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 190, + "height": 20, + "seed": 423954506, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4113, + "versionNonce": 738566742, + "isDeleted": false, + "id": "Qfx40EWL_yJoAjymWKvzJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 3297.4965608969037, + "y": 558.9103634730327, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 423.6151751893943, + "height": 21.2642440025254, + "seed": 1336277334, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3055, + "versionNonce": 979162634, + "isDeleted": false, + "id": "hXAIL6pFcCr0G_vfdQ5qV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3304.3672206191263, + "y": 560.5431392196315, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 1624338186, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3162, + "versionNonce": 1191896982, + "isDeleted": false, + "id": "faWWPxWLgAgH2Fnzjlan9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3456.149615738917, + "y": 559.8175810360071, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1653104278, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "TyOVJdp7tv778ruJgy3Iv", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 2975, + "versionNonce": 824804554, + "isDeleted": false, + "id": "6tN6iOxfRSwixeOm4WMUW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3455.1485533529726, + "y": 381.7831643584934, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 101, + "height": 25, + "seed": 799210954, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "text", + "version": 2392, + "versionNonce": 1941275862, + "isDeleted": false, + "id": "guRf-DGiVFYAHaPXQuYGg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3189.8261327180458, + "y": 561.3018275529366, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 84, + "height": 20, + "seed": 1315707862, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "vU55N_-jUk6NTTBoCvPcl", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1082", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1082" + }, + { + "type": "text", + "version": 2541, + "versionNonce": 1878154122, + "isDeleted": false, + "id": "otbmwMA9DieAcgaKiiwQ8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3218.8026952180458, + "y": 468.69454518686507, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56, + "height": 20, + "seed": 852800650, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "OlRGFFrc3VVyCZZcg8VsU", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 0", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 0" + }, + { + "type": "text", + "version": 2547, + "versionNonce": 60455446, + "isDeleted": false, + "id": "UnKL1QNuvNo22NWVnKgcF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3221.2480077180458, + "y": 502.04122487436507, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49, + "height": 20, + "seed": 426127638, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "OlRGFFrc3VVyCZZcg8VsU", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1" + }, + { + "type": "text", + "version": 2334, + "versionNonce": 1962039882, + "isDeleted": false, + "id": "DJTD1dOn11IaXToM1h-sW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 3777.4213551086164, + "y": 420.97677174936507, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 203, + "height": 40, + "seed": 1008833354, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "hkhoeNjFEoC21b0x7dDgo", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "key column values \nof first row of granule 0", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "key column values \nof first row of granule 0" + }, + { + "type": "arrow", + "version": 1114, + "versionNonce": 1303299926, + "isDeleted": false, + "id": "hkhoeNjFEoC21b0x7dDgo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 3770.7190671621925, + "y": 449.9603487061768, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 48.41553489057196, + "height": 23.729966514004445, + "seed": 1055628886, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "startBinding": { + "elementId": "DJTD1dOn11IaXToM1h-sW", + "focus": 0.6315527656085902, + "gap": 6.702287946423894 + }, + "endBinding": { + "elementId": "sCFGX-236ejMqZ1datnXG", + "focus": 0.875865929578657, + "gap": 11.37882874503839 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -48.41553489057196, + 23.729966514004445 + ] + ] + }, + { + "type": "arrow", + "version": 1056, + "versionNonce": 1057259786, + "isDeleted": false, + "id": "8AhUM4jsXM6vQonhRP5Vn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 3794.4734157035423, + "y": 506.43706416279133, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 72.49159598081201, + "height": 0.9767917052906796, + "seed": 769956362, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "startBinding": { + "elementId": "Fob6PQcyHTpjDCWe_cAzs", + "focus": -0.0026555591700033686, + "gap": 1 + }, + "endBinding": { + "elementId": "vUt5x25ixJXerhfpTOVmS", + "focus": 0.09326585366049385, + "gap": 2.646949476986947 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -72.49159598081201, + 0.9767917052906796 + ] + ] + }, + { + "type": "arrow", + "version": 799, + "versionNonce": 38235286, + "isDeleted": false, + "id": "TyOVJdp7tv778ruJgy3Iv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 3796.12384477162, + "y": 587.7104569552184, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 74.6171875, + "height": 14.890625, + "seed": 64054166, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "faWWPxWLgAgH2Fnzjlan9", + "focus": -0.6914733701556606, + "gap": 10.357041532703079 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -74.6171875, + -14.890625 + ] + ] + }, + { + "type": "text", + "version": 2336, + "versionNonce": 967036874, + "isDeleted": false, + "id": "Fob6PQcyHTpjDCWe_cAzs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 3795.4734157035423, + "y": 485.046465751077, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 196, + "height": 40, + "seed": 1729677514, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "8AhUM4jsXM6vQonhRP5Vn", + "type": "arrow" + } + ], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "key column values \nof first row of granule 1", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "key column values \nof first row of granule 1" + }, + { + "type": "text", + "version": 2419, + "versionNonce": 2132371926, + "isDeleted": false, + "id": "QkSUhuBq3IJkHub-09Ab4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 3774.4430642764423, + "y": 571.7831140565827, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 231, + "height": 40, + "seed": 1246527702, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "key column values \nof first row of granule 1082", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "key column values \nof first row of granule 1082" + }, + { + "type": "arrow", + "version": 529, + "versionNonce": 686507658, + "isDeleted": false, + "id": "vU55N_-jUk6NTTBoCvPcl", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3141.122983196827, + "y": 754.1871684878633, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 87.80580015746273, + "height": 164.10832427172465, + "seed": 531785238, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "startBinding": { + "elementId": "b9Ma96rWblzVxxpmCWx2x", + "focus": 1.027785426680333, + "gap": 9.23713780407411 + }, + "endBinding": { + "elementId": "guRf-DGiVFYAHaPXQuYGg", + "focus": -0.15098585348692564, + "gap": 8.777016663202062 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 87.80580015746273, + -164.10832427172465 + ] + ] + }, + { + "type": "arrow", + "version": 453, + "versionNonce": 590987030, + "isDeleted": false, + "id": "hicqNte9JKDbcQ-UbMc4P", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3142.362019983864, + "y": 512.8125568107583, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 62.86609707639809, + "height": 0.7083324747919733, + "seed": 929881354, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "startBinding": { + "elementId": "kt_dGcsR7ef7M6F49EQSp", + "focus": -0.7803713931671208, + "gap": 8.360252613271996 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 62.86609707639809, + 0.7083324747919733 + ] + ] + }, + { + "type": "arrow", + "version": 546, + "versionNonce": 362145098, + "isDeleted": false, + "id": "OlRGFFrc3VVyCZZcg8VsU", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3145.092160585339, + "y": 368.04004887401055, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 65.59221172581238, + "height": 88.44427935692812, + "seed": 274717514, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "startBinding": { + "elementId": "6TycpKEFxVMASLkw0QA3d", + "focus": -1.002715617808851, + "gap": 13.644565578390711 + }, + "endBinding": { + "elementId": "otbmwMA9DieAcgaKiiwQ8", + "focus": -0.554738507787712, + "gap": 12.210216955926398 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 65.59221172581238, + 88.44427935692812 + ] + ] + }, + { + "type": "text", + "version": 2349, + "versionNonce": 589130838, + "isDeleted": false, + "id": "yXMjDxyl8sGOd0hgO2xLT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1299.0006501169164, + "y": 1499.6077771985297, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 24904022, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2465, + "versionNonce": 956214282, + "isDeleted": false, + "id": "-QrwXjYMBBNdBaYqONhY7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1299.2875819350966, + "y": 1513.3876067439837, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1698686730, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2474, + "versionNonce": 1553559958, + "isDeleted": false, + "id": "SWRxX7CnLCkFGI79Kr-y6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1299.3125218389441, + "y": 1526.5570778978295, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 2086495894, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2419, + "versionNonce": 1763744458, + "isDeleted": false, + "id": "TGznz2D1iTZwx2y2kIton", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1087.365732888588, + "y": 1499.23864214908, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 717583562, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2535, + "versionNonce": 719507158, + "isDeleted": false, + "id": "7N5H1VeOX4Hyzu6S278Fk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1087.652664706768, + "y": 1513.0184716945341, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1712362710, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2544, + "versionNonce": 76984714, + "isDeleted": false, + "id": "t6iQ_8U3tMlfedALMboAJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1087.6776046106156, + "y": 1526.1879428483799, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 814762890, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672163700915, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": { + "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947": { + "mimeType": "image/svg+xml", + "id": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "dataURL": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjIyMiIgdmlld0JveD0iMCAwIDkgOCIgd2lkdGg9IjI1MDAiPjxwYXRoIGQ9Im0wIDdoMXYxaC0xeiIgZmlsbD0iI2YwMCIvPjxwYXRoIGQ9Im0wIDBoMXY3aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDMuMjVoMXYxLjVoLTF6IiBmaWxsPSIjZmMwIi8+PC9zdmc+", + "created": 1648232988228 + } + } +} \ No newline at end of file diff --git a/docs/ja/guides/best-practices/images/03-Using_multiple-primary_indexes.excalidraw b/docs/ja/guides/best-practices/images/03-Using_multiple-primary_indexes.excalidraw new file mode 100644 index 00000000000..70fd87be90b --- /dev/null +++ b/docs/ja/guides/best-practices/images/03-Using_multiple-primary_indexes.excalidraw @@ -0,0 +1,45782 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://app.excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 6824, + "versionNonce": 2097790282, + "isDeleted": false, + "id": "5ZxJvUdKKFbADItwC72g7", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 4764.519916255, + "y": 2712.2757953292135, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 286.53253069673764, + "height": 190.76982807013113, + "seed": 1249442682, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728655, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6986, + "versionNonce": 1609638934, + "isDeleted": false, + "id": "ehdSrK7xnucULy6jgHhg_", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 2112.814558997129, + "y": 2966.2789366615452, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 310.9393660873455, + "height": 58.71926364969739, + "seed": 987625854, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728702, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7609, + "versionNonce": 775114826, + "isDeleted": false, + "id": "Nx7TcWB4qb3vzLoXkaJIV", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2110.00161863388, + "y": 2966.3646123525123, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 316.37334280303065, + "height": 58.68447577621506, + "seed": 1698096482, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728702, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7123, + "versionNonce": 2107650390, + "isDeleted": false, + "id": "l_xBG63oCgTdNAh8m2ts9", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 2111.3718506638024, + "y": 2899.0445616615452, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 310.9393660873455, + "height": 58.71926364969739, + "seed": 1511922110, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728702, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7517, + "versionNonce": 1354151690, + "isDeleted": false, + "id": "S1Ur7AwT0czeXk2vw9QFT", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2109.638337383888, + "y": 2834.48440401918, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 316.37334280303065, + "height": 58.68447577621506, + "seed": 1907878178, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728702, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6892, + "versionNonce": 1148950166, + "isDeleted": false, + "id": "FLB4RIJPYcbcCcuBHA7KY", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 2112.532006913805, + "y": 2834.398728328213, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 310.9393660873455, + "height": 58.71926364969739, + "seed": 351285758, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728702, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4595, + "versionNonce": 60769738, + "isDeleted": false, + "id": "BhAK0DZ0qMav-BiUxZCEg", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2173.2729479298796, + "y": 2798.1717317770435, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 123.92578124999996, + "height": 340.8218005952383, + "seed": 383939810, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728702, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3902, + "versionNonce": 2100843478, + "isDeleted": false, + "id": "a-RfaFs7S4ftHvSUUMcfu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2185.1369076771116, + "y": 2803.193553674859, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 103, + "height": 25, + "seed": 374686270, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728702, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "rectangle", + "version": 5355, + "versionNonce": 1342700682, + "isDeleted": false, + "id": "hV4wi4lbEh7VbpXIyXxYH", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2321.8033549143875, + "y": 2797.1666862041257, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 87.64195261437878, + "height": 342.412946428571, + "seed": 373655714, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5291, + "versionNonce": 300640534, + "isDeleted": false, + "id": "XbPu9E6KM5z6iMuB7z3st", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2165.187252483831, + "y": 2839.858526481903, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.0572916666672, + "height": 19.56467013888845, + "seed": 19810942, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4085, + "versionNonce": 1672207178, + "isDeleted": false, + "id": "s3wneKc5lBoFqCiGKBtEc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2226.2818705393865, + "y": 2840.5221549541257, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 663757922, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 4134, + "versionNonce": 1644811862, + "isDeleted": false, + "id": "IWl8vz-ByuNiJugOk_tAC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2358.6881205393875, + "y": 2840.3528841207935, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1950108350, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W1" + }, + { + "type": "text", + "version": 3973, + "versionNonce": 2095440394, + "isDeleted": false, + "id": "AyAQhUVmdz9DpqLMYHooy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2331.2809404798627, + "y": 2804.494563188253, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 71, + "height": 25, + "seed": 881936418, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "rectangle", + "version": 5205, + "versionNonce": 375954326, + "isDeleted": false, + "id": "odFU6CJ50br3KdGRwLkZT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2165.5109293040023, + "y": 2871.983306649652, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.02213541666703, + "height": 19.412326388888925, + "seed": 236995326, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "2R8FpSvMDNmt2sCccOp2b", + "type": "arrow" + } + ], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6026, + "versionNonce": 1454444746, + "isDeleted": false, + "id": "ABodgSp0HUfSFjyEvOP_J", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2165.6975572383226, + "y": 2906.5732551059336, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 253.45182291666657, + "height": 17.51779513888891, + "seed": 355988450, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4225, + "versionNonce": 1966913750, + "isDeleted": false, + "id": "9cN--cIWvFhTn4sKacIpc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2225.5769447229814, + "y": 2873.1093131572507, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1901802302, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 4338, + "versionNonce": 346580874, + "isDeleted": false, + "id": "cuZ53R8xr2P8AilW8Tg9g", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2225.5014238896492, + "y": 2907.6613964905846, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1267935138, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 4255, + "versionNonce": 907750934, + "isDeleted": false, + "id": "SVZu2mftv_h3-eDreIuUI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2353.0248613896492, + "y": 2873.1119173239185, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 1213078398, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W2" + }, + { + "type": "text", + "version": 4347, + "versionNonce": 788981322, + "isDeleted": false, + "id": "9zkrAsa-3t8WTEqcSk7hU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2352.6732988896492, + "y": 2906.5832714905846, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 1070719842, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W2" + }, + { + "type": "rectangle", + "version": 5616, + "versionNonce": 1442380630, + "isDeleted": false, + "id": "smUZOSK4GQVuuHOVXv9sU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2165.27036005407, + "y": 2936.530794819577, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.0572916666672, + "height": 19.56467013888845, + "seed": 1228536766, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4414, + "versionNonce": 1588038922, + "isDeleted": false, + "id": "j6t0W0M3uUCFSWQ8V8wRS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2226.2438843596246, + "y": 2937.1944232918013, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 2084775714, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 4460, + "versionNonce": 1797988502, + "isDeleted": false, + "id": "_sqoNYY4EYi2EdLRH1i0g", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2355.1579468596265, + "y": 2937.0251524584673, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 977261566, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W3", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W3" + }, + { + "type": "rectangle", + "version": 5527, + "versionNonce": 151346122, + "isDeleted": false, + "id": "da1BMP8F8XNbA8-zPi1K0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2165.665268491888, + "y": 2968.534481237326, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.02213541666703, + "height": 19.412326388888925, + "seed": 1767240418, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6353, + "versionNonce": 2036768214, + "isDeleted": false, + "id": "eNE335b2gsPO3ERqZ1R8r", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2165.7806648085607, + "y": 3003.2455234436093, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.45182291666657, + "height": 17.51779513888891, + "seed": 1969267774, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "1aFeMp86G_Vn7zhrHjFLZ", + "type": "arrow" + } + ], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4551, + "versionNonce": 742085258, + "isDeleted": false, + "id": "H-Q3l6mXJIhLSKYFLzx-w", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2225.6600522932204, + "y": 2969.7815814949263, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 161040034, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 4666, + "versionNonce": 1170240278, + "isDeleted": false, + "id": "KU0Q20pmKb2nr5rc1DtfT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2225.5845314598864, + "y": 3004.3336648282584, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1820159102, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 4579, + "versionNonce": 1258582346, + "isDeleted": false, + "id": "tod1UqsN3yE_bNx1kBEC4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2353.7251564598864, + "y": 2969.7841856615923, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 901522018, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W4", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W4" + }, + { + "type": "text", + "version": 4675, + "versionNonce": 716021846, + "isDeleted": false, + "id": "-MPdOPJHcTgdNM_HP3P1W", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2353.2564064598882, + "y": 3003.2555398282584, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 760687806, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W4", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W4" + }, + { + "type": "text", + "version": 4558, + "versionNonce": 1488697354, + "isDeleted": false, + "id": "BeJZDUFl4HlhFc7BnWZJW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2113.9636089770765, + "y": 2840.8657606825946, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 47, + "height": 20, + "seed": 1485669922, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 0", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 4631, + "versionNonce": 1812145558, + "isDeleted": false, + "id": "rZIZ7LvjJ1G4VU14lV5-H", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2115.2292339770765, + "y": 2873.20083012704, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 40, + "height": 20, + "seed": 1703863550, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "EIOF3EPTwu2X2yK4S4cFx", + "type": "arrow" + } + ], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "text", + "version": 4666, + "versionNonce": 626796234, + "isDeleted": false, + "id": "NKK6RmioR78Y_pA9JZVr2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2112.396768699299, + "y": 2904.845795404817, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 47, + "height": 20, + "seed": 721187298, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 2", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "text", + "version": 4641, + "versionNonce": 183894742, + "isDeleted": false, + "id": "oWpXpnS_RUsFqvqPy71os", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2112.0712478659652, + "y": 2937.0636773492624, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 1722127678, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "gSdOMX7r_67h9iMy6uc_l", + "type": "arrow" + } + ], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 3", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 3" + }, + { + "type": "text", + "version": 4617, + "versionNonce": 1233173898, + "isDeleted": false, + "id": "xzgXiU63XHs6Jl3c_zOtL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2112.4792339770765, + "y": 2970.765934293706, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 1880614306, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 4", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 4" + }, + { + "type": "text", + "version": 4621, + "versionNonce": 437991446, + "isDeleted": false, + "id": "orm-PSE4OCLXN_JmgLFI7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2112.3681228659652, + "y": 3003.986420404817, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45, + "height": 20, + "seed": 704396670, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "1dOOjUMqDLdFcktB-gRg8", + "type": "arrow" + } + ], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 5", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 5" + }, + { + "type": "rectangle", + "version": 7749, + "versionNonce": 308575306, + "isDeleted": false, + "id": "_Au7e5I2HkB5LrDuzf-J0", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2108.4156811338853, + "y": 2899.130237352514, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 317, + "height": 58.68447577621506, + "seed": 823058786, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ZoOy6zcVf_A308U8XrjDJ", + "type": "arrow" + } + ], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7162, + "versionNonce": 292013398, + "isDeleted": false, + "id": "AiKDcbGLX147-LvpMse_b", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 2111.7258179313367, + "y": 3034.7298177808043, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 310.9393660873455, + "height": 58.71926364969739, + "seed": 1423171006, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7787, + "versionNonce": 1843553034, + "isDeleted": false, + "id": "aCiNrtIVoeEA8BwTfTrgF", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2108.9128775680883, + "y": 3034.8154934717713, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 316.37334280303065, + "height": 58.68447577621506, + "seed": 2033214754, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5703, + "versionNonce": 573614742, + "isDeleted": false, + "id": "IcOul4HQsS7ySIU51-tw8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2164.5765274260966, + "y": 3036.985362356585, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.02213541666703, + "height": 19.412326388888925, + "seed": 1011709438, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6536, + "versionNonce": 1450537418, + "isDeleted": false, + "id": "1xl2TUVEwjnnkCca2vEMW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2164.691923742769, + "y": 3071.6964045628683, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.45182291666657, + "height": 17.51779513888891, + "seed": 300642530, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "c0fzQD_BcJb-2-zqdD-e3", + "type": "arrow" + } + ], + "updated": 1672253728703, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4726, + "versionNonce": 187361238, + "isDeleted": false, + "id": "BNt06YCT3AmmKRfScPR2M", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2224.571311227429, + "y": 3038.2324626141854, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1768556094, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 4846, + "versionNonce": 1060677770, + "isDeleted": false, + "id": "k4-OgUdfCRm-xRNHIkE3f", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2224.495790394095, + "y": 3072.7845459475175, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1053754530, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 4757, + "versionNonce": 1818983702, + "isDeleted": false, + "id": "Q9zZqktZSMyORp-hAjiqd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2352.636415394095, + "y": 3038.2350667808514, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 487231102, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W5", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W5" + }, + { + "type": "text", + "version": 4857, + "versionNonce": 2145847114, + "isDeleted": false, + "id": "MR1kuaRKWUKXjkH0JeXfN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2352.1676653940967, + "y": 3071.7064209475175, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 2039095394, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W6", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W6" + }, + { + "type": "text", + "version": 4795, + "versionNonce": 459762262, + "isDeleted": false, + "id": "mTUKZSRYWfRt2Vh-1vclf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2111.390492911284, + "y": 3039.216815412965, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 1408241342, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 6", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 6" + }, + { + "type": "text", + "version": 4802, + "versionNonce": 1088130570, + "isDeleted": false, + "id": "5dmJNYXmkNOBvwYrSi_Sp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2111.279381800173, + "y": 3072.4373015240762, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 44, + "height": 20, + "seed": 770425890, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "OlCfen_-Yp9OwbDRJvDOx", + "type": "arrow" + } + ], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 7", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 7" + }, + { + "type": "text", + "version": 4924, + "versionNonce": 1995681686, + "isDeleted": false, + "id": "C3hyejITH6H86llsqbar-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2231.807843647889, + "y": 3084.5170900781086, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1253803774, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 5042, + "versionNonce": 1729182922, + "isDeleted": false, + "id": "ahOGTNm7nz8kLX7e-Shdy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2232.094775466071, + "y": 3098.2969196235645, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1977806818, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 5051, + "versionNonce": 994397398, + "isDeleted": false, + "id": "OFin0H5KyTNA5E37MVH96", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2232.1197153699186, + "y": 3111.46639077741, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 32372542, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 5100, + "versionNonce": 2298762, + "isDeleted": false, + "id": "ILPEs9gDdQgBJGDqDSuPu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2364.2531971225408, + "y": 3083.20051082403, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1434362786, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 5226, + "versionNonce": 1441874454, + "isDeleted": false, + "id": "W4Z9FVp6utADZ7oekh4TU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2364.540128940721, + "y": 3096.980340369484, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1105747838, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 5235, + "versionNonce": 776737354, + "isDeleted": false, + "id": "AoQCz2UJrbKjv5sBo7miK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2364.5650688445685, + "y": 3110.14981152333, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1995300706, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728703, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 6215, + "versionNonce": 61641226, + "isDeleted": false, + "id": "ynToXztLDxXyPLG-ujgbg", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2558.0833403183005, + "y": 2810.5035653893992, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 251.25889756944446, + "height": 263.3309461805559, + "seed": 1261123618, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5052, + "versionNonce": 1218767766, + "isDeleted": false, + "id": "eybtNOoKuhzwIYXCBKtSH", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2580.6645573868227, + "y": 2863.556137003983, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 197.2833214962126, + "seed": 979194622, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4415, + "versionNonce": 824295626, + "isDeleted": false, + "id": "Fl7yaLppSn2pwkhsSzomu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2609.1969220096653, + "y": 2868.633204437512, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 73, + "height": 25, + "seed": 588506082, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "rectangle", + "version": 5430, + "versionNonce": 997132502, + "isDeleted": false, + "id": "ER0hvl2LPDsBr8aEuGxbn", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2729.4296944849666, + "y": 2862.05195948662, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 60.780841503267865, + "height": 199.05406605113606, + "seed": 863388478, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6282, + "versionNonce": 1032001418, + "isDeleted": false, + "id": "C3nI6jj5qV1pqyxs8KhRW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2572.57140455441, + "y": 2905.5323789152826, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 224.41844223484904, + "height": 19.07958491161571, + "seed": 410064802, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4343, + "versionNonce": 562265622, + "isDeleted": false, + "id": "PgPBBpU2WTlPXasE7yZjs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2740.0049363004423, + "y": 2869.0583303943586, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 42, + "height": 25, + "seed": 881273726, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "rectangle", + "version": 5936, + "versionNonce": 1225496138, + "isDeleted": false, + "id": "_3ThBkVr5tP4Xuezzfc_U", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2573.0161751245814, + "y": 2936.4930965830317, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 223.03527462121252, + "height": 20.091303661616152, + "seed": 460444514, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "-HRw9-i3s1WFaEyOW7EY_", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5818, + "versionNonce": 1339509590, + "isDeleted": false, + "id": "7ieK5Yf5SDD18kN8divCI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2574.0529841469543, + "y": 2965.232761031717, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 222.6308001893943, + "height": 21.131431502525395, + "seed": 1808862142, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "RmF54tXFilnBgKFYfzosl", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4578, + "versionNonce": 882261258, + "isDeleted": false, + "id": "MFRW6jrz-foZfaIBVrUat", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2633.704976603023, + "y": 2818.9727494171766, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 101, + "height": 25, + "seed": 1046812450, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "text", + "version": 4044, + "versionNonce": 884961430, + "isDeleted": false, + "id": "Phqzht_TtG0nTrcWog7XI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2495.3591184680954, + "y": 2906.0354974330494, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56, + "height": 20, + "seed": 393536510, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "2R8FpSvMDNmt2sCccOp2b", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 0", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 0" + }, + { + "type": "text", + "version": 4056, + "versionNonce": 228461514, + "isDeleted": false, + "id": "2hcFSCkVOGBNEpQpcLXFC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2494.8044309680954, + "y": 2937.2308099330494, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 50, + "height": 20, + "seed": 1908007650, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ZoOy6zcVf_A308U8XrjDJ", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1" + }, + { + "type": "text", + "version": 3880, + "versionNonce": 737209814, + "isDeleted": false, + "id": "sbGTFiedpGLLthzwL7fES", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2636.508393021666, + "y": 2906.0353656746174, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 158577726, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 4038, + "versionNonce": 2050884234, + "isDeleted": false, + "id": "mq_M393rAjSAZFpPXuvTb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2636.770111771666, + "y": 2937.2580219246174, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1073690274, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 4108, + "versionNonce": 1384170262, + "isDeleted": false, + "id": "g5nEAL53sxWgR2axnh8dF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2637.172455521666, + "y": 2967.3752094246174, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 732855422, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 3827, + "versionNonce": 623976778, + "isDeleted": false, + "id": "xMfa9QXvx72Y5GMARK1nv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2750.406830521667, + "y": 2906.3283344246174, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 165941858, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W1" + }, + { + "type": "text", + "version": 3967, + "versionNonce": 1524887638, + "isDeleted": false, + "id": "YnLYRGy_a4KeqkMWodF9D", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2746.8130805216665, + "y": 2937.1877094246174, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 65420478, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W2" + }, + { + "type": "text", + "version": 4009, + "versionNonce": 701655050, + "isDeleted": false, + "id": "t1mZGeZaLC3ANp7QShc3F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2747.5787055216665, + "y": 2965.9338031746174, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 1110930978, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W4", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W4" + }, + { + "type": "text", + "version": 4134, + "versionNonce": 1626305942, + "isDeleted": false, + "id": "Y9lJE5Z43I5bRw5IDybo-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2490.649018021666, + "y": 2967.0822406746174, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 57, + "height": 20, + "seed": 935064830, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "1aFeMp86G_Vn7zhrHjFLZ", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 2", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 2" + }, + { + "type": "text", + "version": 4763, + "versionNonce": 1889994, + "isDeleted": false, + "id": "3k_ag_aV8iba0OEmS0hLj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2842.0396430216715, + "y": 2904.2580219246174, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 122, + "height": 20, + "seed": 703095266, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "exclude granule", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "exclude granule" + }, + { + "type": "arrow", + "version": 8218, + "versionNonce": 1037587158, + "isDeleted": false, + "id": "FbY8kaSjKSSR9_mpWstIe", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2796.9035753133326, + "y": 2913.09300149931, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 42.593750000000455, + "height": 1.1352127296454455, + "seed": 280012094, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": { + "elementId": "ER0hvl2LPDsBr8aEuGxbn", + "focus": -0.49308173705066843, + "gap": 6.693039325098198 + }, + "endBinding": { + "elementId": "3k_ag_aV8iba0OEmS0hLj", + "focus": -0.1421234942671109, + "gap": 2.542317708338487 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 42.593750000000455, + 1.1352127296454455 + ] + ] + }, + { + "type": "text", + "version": 4942, + "versionNonce": 1756065162, + "isDeleted": false, + "id": "JQiWAHQtr0Z586-dYZN76", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2639.0624075731903, + "y": 3009.311607958487, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 201708962, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 5062, + "versionNonce": 1546881046, + "isDeleted": false, + "id": "IQZZAJVTw4HRhoiZHolI0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2639.3493393913723, + "y": 3023.091437503943, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 2444670, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 5071, + "versionNonce": 1488530506, + "isDeleted": false, + "id": "wub8r77wGyriwF_VS-avO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2639.37427929522, + "y": 3036.2609086577886, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 2042548578, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 5126, + "versionNonce": 200676694, + "isDeleted": false, + "id": "9ZJFeTmsZkMdRZu_gENRT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2758.5077610478425, + "y": 3007.9950287044085, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 593161662, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 5246, + "versionNonce": 1713443594, + "isDeleted": false, + "id": "EcPy_OO5GQvhC4pGietJT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2758.7946928660226, + "y": 3021.7748582498625, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 107107618, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 5255, + "versionNonce": 1450506902, + "isDeleted": false, + "id": "Up3XH3RweoEltwU3Xe6FC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2758.81963276987, + "y": 3034.9443294037083, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1198687742, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5996, + "versionNonce": 861807050, + "isDeleted": false, + "id": "sCtxWGvWZnlQf-_rLbkNR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2574.005327552113, + "y": 2997.3642776765646, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 222.6308001893943, + "height": 21.131431502525395, + "seed": 56582370, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "HbVWCD9Ywn6x7Uz6fTxNQ", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4284, + "versionNonce": 1382365142, + "isDeleted": false, + "id": "lzz19Fp4n5X9u9cBZjB5A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2637.124798926825, + "y": 2999.648327631965, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1835865662, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 4183, + "versionNonce": 1535858826, + "isDeleted": false, + "id": "8fpx0fBmfwjqP2nLqEzbB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2747.5310489268254, + "y": 2998.065319819465, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 1011152034, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W5", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W5" + }, + { + "type": "text", + "version": 4309, + "versionNonce": 2010893590, + "isDeleted": false, + "id": "tWAtGodo4lkywsUJOvNib", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2491.601361426825, + "y": 2999.213757319465, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56, + "height": 20, + "seed": 1311481470, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "c0fzQD_BcJb-2-zqdD-e3", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 3", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 3" + }, + { + "type": "text", + "version": 4884, + "versionNonce": 1583593290, + "isDeleted": false, + "id": "MSBvbyhLtOMrK4nXtfV0-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2841.7629503133358, + "y": 2935.9532181671766, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 113, + "height": 20, + "seed": 851578978, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + }, + { + "id": "-HRw9-i3s1WFaEyOW7EY_", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "select granule", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "select granule" + }, + { + "type": "text", + "version": 4999, + "versionNonce": 1951251030, + "isDeleted": false, + "id": "U_kdR9a7Y4JT-7LY639rf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2842.1991482300036, + "y": 2965.4519160838445, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 122, + "height": 20, + "seed": 1584340670, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + }, + { + "id": "RmF54tXFilnBgKFYfzosl", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "exclude granule", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "exclude granule" + }, + { + "type": "arrow", + "version": 7173, + "versionNonce": 2123366294, + "isDeleted": false, + "id": "-HRw9-i3s1WFaEyOW7EY_", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2797.1379503133307, + "y": 2945.2891556671766, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 39.407552083333485, + "height": 2.12239583333303, + "seed": 1389926142, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": { + "elementId": "_3ThBkVr5tP4Xuezzfc_U", + "focus": -0.45566325229548293, + "gap": 1.0865005675370867 + }, + "endBinding": { + "elementId": "MSBvbyhLtOMrK4nXtfV0-", + "focus": -0.365346377370317, + "gap": 5.217447916671517 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 39.407552083333485, + 2.12239583333303 + ] + ] + }, + { + "type": "arrow", + "version": 7205, + "versionNonce": 1914825930, + "isDeleted": false, + "id": "RmF54tXFilnBgKFYfzosl", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2797.553576003016, + "y": 2973.161248532484, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 43.51536389365083, + "height": 2.7579643258513897, + "seed": 1440669666, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": { + "elementId": "7ieK5Yf5SDD18kN8divCI", + "focus": -0.5531776293254858, + "gap": 1 + }, + "endBinding": { + "elementId": "U_kdR9a7Y4JT-7LY639rf", + "focus": -0.3161215814063423, + "gap": 1.1302083333366681 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 43.51536389365083, + 2.7579643258513897 + ] + ] + }, + { + "type": "text", + "version": 4195, + "versionNonce": 86695766, + "isDeleted": false, + "id": "O90FfPdBOVpaNffUrmvFm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1983.77558034926, + "y": 2846.4430553853235, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 94, + "height": 40, + "seed": 694341566, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 0\nwith 2 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 0\nwith 2 rows" + }, + { + "type": "text", + "version": 4286, + "versionNonce": 1593174282, + "isDeleted": false, + "id": "B_YGDnWOZFi_gF09kFHcp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1984.36151784926, + "y": 2912.7399303853235, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 94, + "height": 40, + "seed": 784438050, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 1\nwith 2 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 1\nwith 2 rows" + }, + { + "type": "text", + "version": 4379, + "versionNonce": 578847894, + "isDeleted": false, + "id": "wPS1XXANdi_yeJFyUFhho", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1985.13886159926, + "y": 2975.4860241353235, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 94, + "height": 40, + "seed": 1177430014, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 2\nwith 2 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 2\nwith 2 rows" + }, + { + "type": "text", + "version": 4558, + "versionNonce": 656947146, + "isDeleted": false, + "id": "j2JRx4fO2D9-W3WRiWxfp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1983.87712946204, + "y": 3043.9369052545826, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 94, + "height": 40, + "seed": 421977826, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 3\nwith 2 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 3\nwith 2 rows" + }, + { + "type": "arrow", + "version": 632, + "versionNonce": 705484566, + "isDeleted": false, + "id": "gSdOMX7r_67h9iMy6uc_l", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2072.079439125594, + "y": 2930.562724925605, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 36.35850694444434, + "height": 0.5598958333334849, + "seed": 1815812926, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "oWpXpnS_RUsFqvqPy71os", + "focus": 1.499965817649534, + "gap": 5.941056590324024 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 36.35850694444434, + 0.5598958333334849 + ] + ] + }, + { + "type": "arrow", + "version": 627, + "versionNonce": 1797279050, + "isDeleted": false, + "id": "1dOOjUMqDLdFcktB-gRg8", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2072.4396821811492, + "y": 2996.7389402033823, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 35.64670138888914, + "height": 0, + "seed": 1781906110, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "orm-PSE4OCLXN_JmgLFI7", + "focus": 1.7247480201434882, + "gap": 7.2474802014348825 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 35.64670138888914, + 0 + ] + ] + }, + { + "type": "arrow", + "version": 626, + "versionNonce": 265126998, + "isDeleted": false, + "id": "OlCfen_-Yp9OwbDRJvDOx", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2069.813814125594, + "y": 3063.4490096478276, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 35.824652777777374, + "height": 0, + "seed": 1702784354, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "5dmJNYXmkNOBvwYrSi_Sp", + "focus": 1.89882918762487, + "gap": 8.988291876248695 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 35.824652777777374, + 0 + ] + ] + }, + { + "type": "text", + "version": 3376, + "versionNonce": 1803979158, + "isDeleted": false, + "id": "ycDjYz4VHBIH9n0EvKAsN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1981.069890514476, + "y": 2717.519322147822, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 340, + "height": 50, + "seed": 1048957694, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Searching for rows with URL = W3\nwhen UserID has low cardinality", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Searching for rows with URL = W3\nwhen UserID has low cardinality" + }, + { + "type": "rectangle", + "version": 6029, + "versionNonce": 320183318, + "isDeleted": false, + "id": "7UjVIYTTPuZqNHA_5jK1A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1966.4026813130877, + "y": 2705.095385515877, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 1009.0225694444454, + "height": 452.9728732638886, + "seed": 394755198, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false + }, + { + "type": "arrow", + "version": 397, + "versionNonce": 129128522, + "isDeleted": false, + "id": "EIOF3EPTwu2X2yK4S4cFx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2072.3928071811433, + "y": 2863.305780481156, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 33.916015625, + "height": 2.05078125, + "seed": 986478114, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "rZIZ7LvjJ1G4VU14lV5-H", + "focus": 1.4424947274438729, + "gap": 8.920411170933221 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 33.916015625, + 2.05078125 + ] + ] + }, + { + "type": "arrow", + "version": 354, + "versionNonce": 2014301142, + "isDeleted": false, + "id": "2R8FpSvMDNmt2sCccOp2b", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2430.544592895429, + "y": 2867.911528249, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 62.75111607142867, + "height": 45.6640625, + "seed": 2086203070, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": { + "elementId": "odFU6CJ50br3KdGRwLkZT", + "focus": -1.125899389945349, + "gap": 12.01152817475986 + }, + "endBinding": { + "elementId": "Phqzht_TtG0nTrcWog7XI", + "focus": -0.6392384352629061, + "gap": 2.063409501237402 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 62.75111607142867, + 45.6640625 + ] + ] + }, + { + "type": "arrow", + "version": 348, + "versionNonce": 713294986, + "isDeleted": false, + "id": "ZoOy6zcVf_A308U8XrjDJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2428.0111107525718, + "y": 2932.1414389632864, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 62.24330357142867, + "height": 15.452008928570649, + "seed": 318118434, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": { + "elementId": "_Au7e5I2HkB5LrDuzf-J0", + "focus": -0.5287987231200575, + "gap": 2.5954296186864667 + }, + "endBinding": { + "elementId": "2hcFSCkVOGBNEpQpcLXFC", + "focus": -0.48641496639845494, + "gap": 5.550016644095194 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 62.24330357142867, + 15.452008928570649 + ] + ] + }, + { + "type": "arrow", + "version": 343, + "versionNonce": 856940822, + "isDeleted": false, + "id": "1aFeMp86G_Vn7zhrHjFLZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2429.428521466858, + "y": 2997.3758139632864, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 57.08147321428555, + "height": 15.965401785714675, + "seed": 985315902, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": { + "elementId": "eNE335b2gsPO3ERqZ1R8r", + "focus": 0.5354276161442509, + "gap": 10.196033741631027 + }, + "endBinding": { + "elementId": "Y9lJE5Z43I5bRw5IDybo-", + "focus": 0.27707474574018387, + "gap": 5.139023340522726 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 57.08147321428555, + -15.965401785714675 + ] + ] + }, + { + "type": "arrow", + "version": 308, + "versionNonce": 560390986, + "isDeleted": false, + "id": "c0fzQD_BcJb-2-zqdD-e3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2429.155083966858, + "y": 3061.728492534715, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 59.17410714285711, + "height": 45.25111607142844, + "seed": 908542718, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": { + "elementId": "1xl2TUVEwjnnkCca2vEMW", + "focus": 0.8195738091729939, + "gap": 11.011337307422536 + }, + "endBinding": { + "elementId": "tWAtGodo4lkywsUJOvNib", + "focus": 0.5300716069445183, + "gap": 3.272170317110067 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 59.17410714285711, + -45.25111607142844 + ] + ] + }, + { + "type": "text", + "version": 5055, + "versionNonce": 390731978, + "isDeleted": false, + "id": "YELLDPCdrutYZQMCgdceW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2840.2808280144764, + "y": 2998.6400748759925, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 122, + "height": 20, + "seed": 1538706402, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + }, + { + "id": "RmF54tXFilnBgKFYfzosl", + "type": "arrow" + }, + { + "id": "HbVWCD9Ywn6x7Uz6fTxNQ", + "type": "arrow" + } + ], + "updated": 1672253728704, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "exclude granule", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "exclude granule" + }, + { + "type": "arrow", + "version": 343, + "versionNonce": 1821913302, + "isDeleted": false, + "id": "HbVWCD9Ywn6x7Uz6fTxNQ", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2798.133258570032, + "y": 3005.818894320435, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 40.90711805555543, + "height": 2.6866319444443434, + "seed": 1675981374, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728704, + "link": null, + "locked": false, + "startBinding": { + "elementId": "sCtxWGvWZnlQf-_rLbkNR", + "focus": -0.5325546962262563, + "gap": 1.4971308285246323 + }, + "endBinding": { + "elementId": "YELLDPCdrutYZQMCgdceW", + "focus": -0.2805570161616386, + "gap": 1.2404513888886868 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 40.90711805555543, + 2.6866319444443434 + ] + ] + }, + { + "type": "text", + "version": 5198, + "versionNonce": 1363374986, + "isDeleted": false, + "id": "tBDjrw4HxMxjd_bx2aUzi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8119.168947300781, + "y": 5254.717566659101, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 426, + "height": 36, + "seed": 408330453, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + } + ], + "updated": 1672253728725, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "rows are ordered by URL first", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "rows are ordered by URL first" + }, + { + "type": "text", + "version": 5119, + "versionNonce": 1837556246, + "isDeleted": false, + "id": "2v9cs9kzw6sMzKOlb6z0_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8100.538087925781, + "y": 3918.526160409101, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 470, + "height": 36, + "seed": 914375419, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + } + ], + "updated": 1672253728725, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "rows are ordered by UserID first", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "rows are ordered by UserID first" + }, + { + "type": "rectangle", + "version": 6807, + "versionNonce": 1097315658, + "isDeleted": false, + "id": "-e444xpyLXFfuz2oDiix-", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8063.220538541571, + "y": 3965.532050786069, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 528.790329916914, + "height": 595.9835614109332, + "seed": 167233109, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "2swlMAJG8K9dg3yX2zAP0", + "type": "arrow" + }, + { + "id": "8Soo57-vZQs3nl-5U7MtZ", + "type": "arrow" + } + ], + "updated": 1672253728730, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6565, + "versionNonce": 848983702, + "isDeleted": false, + "id": "dsGztSKtIczoHTUBcsYuL", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8061.954080323045, + "y": 4648.26724958645, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 528.790329916914, + "height": 595.9835614109332, + "seed": 1404440731, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "C9Z-DlShPPwOi7jVOPEmD", + "type": "arrow" + }, + { + "id": "AS1siV7Lg1QtQEyT8lHwM", + "type": "arrow" + } + ], + "updated": 1672253728731, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4598, + "versionNonce": 2080005654, + "isDeleted": false, + "id": "ruMl8gNZmzBzapKmiFkbL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8197.972278373225, + "y": 3983.5373747200465, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 295, + "height": 31, + "seed": 1269254235, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728732, + "link": null, + "locked": false, + "fontSize": 24.27686099119399, + "fontFamily": 1, + "text": "hits_UserID_URL table", + "baseline": 22, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "hits_UserID_URL table" + }, + { + "type": "rectangle", + "version": 6470, + "versionNonce": 657404938, + "isDeleted": false, + "id": "0eKc-t9Ey7YPF7RyPIXpE", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 7627.9938401421405, + "y": 4213.769183770271, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 277.02836153542506, + "height": 92.61439970619708, + "seed": 1271189429, + "groupIds": [ + "pEEv72I7N_kh4iw8Mz-St" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728733, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3618, + "versionNonce": 227895702, + "isDeleted": false, + "id": "d7y1jhu63tRE5TlDGF-QL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 7635.194789028617, + "y": 4221.5917658713315, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 264, + "height": 71, + "seed": 1534652955, + "groupIds": [ + "pEEv72I7N_kh4iw8Mz-St" + ], + "roundness": null, + "boundElements": [ + { + "id": "2swlMAJG8K9dg3yX2zAP0", + "type": "arrow" + } + ], + "updated": 1672253728733, + "link": null, + "locked": false, + "fontSize": 28.28265871540131, + "fontFamily": 1, + "text": "Query \nfiltering on UserID", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query \nfiltering on UserID" + }, + { + "type": "rectangle", + "version": 6946, + "versionNonce": 1342186186, + "isDeleted": false, + "id": "98JkcLTIw6ZS5ERD7JCaD", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 7637.457660826665, + "y": 4892.013417401224, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 271.3671624420534, + "height": 93.76674345619676, + "seed": 1784353045, + "groupIds": [ + "DuTRDuPWR27yAXYXzrhOU" + ], + "roundness": null, + "boundElements": [ + { + "id": "C9Z-DlShPPwOi7jVOPEmD", + "type": "arrow" + } + ], + "updated": 1672253728733, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4042, + "versionNonce": 1235207894, + "isDeleted": false, + "id": "IaWdj7iRnoGUh073NKLgx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 7661.755581446041, + "y": 4899.013822138759, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 223, + "height": 72, + "seed": 1231681211, + "groupIds": [ + "DuTRDuPWR27yAXYXzrhOU" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728733, + "link": null, + "locked": false, + "fontSize": 28.63456236221491, + "fontFamily": 1, + "text": "Query\nfiltering on URL", + "baseline": 62, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query\nfiltering on URL" + }, + { + "type": "text", + "version": 3906, + "versionNonce": 1984248202, + "isDeleted": false, + "id": "PfwPRNgIoR94-ZLMxZXeu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7643.363432156031, + "y": 4557.073779456701, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 253, + "height": 101, + "seed": 1398941301, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "8Soo57-vZQs3nl-5U7MtZ", + "type": "arrow" + }, + { + "id": "AS1siV7Lg1QtQEyT8lHwM", + "type": "arrow" + } + ], + "updated": 1672253728733, + "link": null, + "locked": false, + "fontSize": 26.6729166666667, + "fontFamily": 1, + "text": "Insert statements\n(need to be routed\nto both tables) ", + "baseline": 91, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Insert statements\n(need to be routed\nto both tables) " + }, + { + "type": "arrow", + "version": 261, + "versionNonce": 1726774294, + "isDeleted": false, + "id": "2swlMAJG8K9dg3yX2zAP0", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7912.146939767312, + "y": 4261.1586473882635, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 148.69140625, + "height": 0.322265625, + "seed": 1182208539, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728733, + "link": null, + "locked": false, + "startBinding": { + "elementId": "d7y1jhu63tRE5TlDGF-QL", + "focus": 0.127040771514781, + "gap": 12.730721244193319 + }, + "endBinding": { + "elementId": "-e444xpyLXFfuz2oDiix-", + "focus": 0.010937820565666832, + "gap": 2.382192524260063 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 148.69140625, + -0.322265625 + ] + ] + }, + { + "type": "arrow", + "version": 286, + "versionNonce": 691632202, + "isDeleted": false, + "id": "C9Z-DlShPPwOi7jVOPEmD", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7914.077278308978, + "y": 4942.411902596597, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 145.8203125, + "height": 1.6003988816937635, + "seed": 225160347, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728733, + "link": null, + "locked": false, + "startBinding": { + "elementId": "98JkcLTIw6ZS5ERD7JCaD", + "focus": 0.10349399757588981, + "gap": 5.25245504025952 + }, + "endBinding": { + "elementId": "dsGztSKtIczoHTUBcsYuL", + "focus": 0.027823366811839147, + "gap": 2.0564895140660155 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 145.8203125, + -1.6003988816937635 + ] + ] + }, + { + "type": "arrow", + "version": 276, + "versionNonce": 997230934, + "isDeleted": false, + "id": "8Soo57-vZQs3nl-5U7MtZ", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7904.480924142314, + "y": 4592.001746346599, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 157.87109375, + "height": 103.26822916666606, + "seed": 1619676539, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728733, + "link": null, + "locked": false, + "startBinding": { + "elementId": "PfwPRNgIoR94-ZLMxZXeu", + "focus": 0.5509461109856089, + "gap": 8.587960736282184 + }, + "endBinding": { + "elementId": "-e444xpyLXFfuz2oDiix-", + "focus": -0.10976486703900913, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 157.87109375, + -103.26822916666606 + ] + ] + }, + { + "type": "arrow", + "version": 319, + "versionNonce": 1488445194, + "isDeleted": false, + "id": "AS1siV7Lg1QtQEyT8lHwM", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7905.075090808979, + "y": 4614.045281583165, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 149.54906250000022, + "height": 83.82777694818833, + "seed": 408084027, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728733, + "link": null, + "locked": false, + "startBinding": { + "elementId": "PfwPRNgIoR94-ZLMxZXeu", + "focus": -0.5710586997878563, + "gap": 8.711658652948245 + }, + "endBinding": { + "elementId": "dsGztSKtIczoHTUBcsYuL", + "focus": 0.21531842663100562, + "gap": 7.3299270140641966 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 149.54906250000022, + 83.82777694818833 + ] + ] + }, + { + "type": "text", + "version": 4970, + "versionNonce": 377548438, + "isDeleted": false, + "id": "1-_wN65ZhuvlbKg54HIXZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8206.74838744564, + "y": 4665.791008768891, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 295, + "height": 31, + "seed": 1441203413, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728733, + "link": null, + "locked": false, + "fontSize": 24.27686099119399, + "fontFamily": 1, + "text": "hits_URL_UserID table", + "baseline": 22, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "hits_URL_UserID table" + }, + { + "type": "rectangle", + "version": 6863, + "versionNonce": 1094413770, + "isDeleted": false, + "id": "twURJO4mwDfz2qy3VlyHF", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8052.859210416578, + "y": 5685.880413714487, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 528.790329916914, + "height": 595.9835614109332, + "seed": 350696411, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "TF119TH8IEW69RTU435SM", + "type": "arrow" + }, + { + "id": "WYIytTWhG_OaRo1gwIGj9", + "type": "arrow" + } + ], + "updated": 1672253728733, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6601, + "versionNonce": 1866874762, + "isDeleted": false, + "id": "pfTG3rJoJFk5gHtQIZ_7I", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8051.350564698052, + "y": 6368.793163401104, + "strokeColor": "#15223c", + "backgroundColor": "#ffc029", + "width": 528.790329916914, + "height": 595.9835614109332, + "seed": 21041915, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Ft4zSnsjdQySQToTkIjRp", + "type": "arrow" + }, + { + "id": "WYIytTWhG_OaRo1gwIGj9", + "type": "arrow" + } + ], + "updated": 1672253728734, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4652, + "versionNonce": 1466431818, + "isDeleted": false, + "id": "LTxujyBlZJbGLB-rrnT5h", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8187.610950248232, + "y": 5703.885737648467, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 295, + "height": 31, + "seed": 499285531, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728735, + "link": null, + "locked": false, + "fontSize": 24.27686099119399, + "fontFamily": 1, + "text": "hits_UserID_URL table", + "baseline": 22, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "hits_UserID_URL table" + }, + { + "type": "rectangle", + "version": 6524, + "versionNonce": 726963978, + "isDeleted": false, + "id": "xJXztDrR-t32vxmsyHoH3", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 7617.632512017148, + "y": 5934.11754669869, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 277.02836153542506, + "height": 92.61439970619708, + "seed": 1304456693, + "groupIds": [ + "80CS_RqfnJ7t1mKpb64vf" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728736, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3673, + "versionNonce": 1395373718, + "isDeleted": false, + "id": "N1fWlp7o53vHgHG55h-7u", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 7624.833460903625, + "y": 5941.94012879975, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 264, + "height": 71, + "seed": 1060984795, + "groupIds": [ + "80CS_RqfnJ7t1mKpb64vf" + ], + "roundness": null, + "boundElements": [ + { + "id": "TF119TH8IEW69RTU435SM", + "type": "arrow" + } + ], + "updated": 1672253728736, + "link": null, + "locked": false, + "fontSize": 28.28265871540131, + "fontFamily": 1, + "text": "Query \nfiltering on UserID", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query \nfiltering on UserID" + }, + { + "type": "rectangle", + "version": 7003, + "versionNonce": 260122058, + "isDeleted": false, + "id": "kzcOys8pqIg83tQrhVcJg", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 7627.0963327016725, + "y": 6612.361780329644, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 271.3671624420534, + "height": 93.76674345619676, + "seed": 1607001941, + "groupIds": [ + "p-nQh4MCR8GmpIVoByvsA" + ], + "roundness": null, + "boundElements": [ + { + "id": "0oOhZTED1gVD6uv24_6pR", + "type": "arrow" + } + ], + "updated": 1672253728736, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4097, + "versionNonce": 14971862, + "isDeleted": false, + "id": "nJsp_t_x3SjjBMI2Qr3rW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 7651.394253321048, + "y": 6619.362185067177, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 223, + "height": 72, + "seed": 186360955, + "groupIds": [ + "p-nQh4MCR8GmpIVoByvsA" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728736, + "link": null, + "locked": false, + "fontSize": 28.63456236221491, + "fontFamily": 1, + "text": "Query\nfiltering on URL", + "baseline": 62, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query\nfiltering on URL" + }, + { + "type": "text", + "version": 4062, + "versionNonce": 1152244874, + "isDeleted": false, + "id": "sw11QL3zMuxfZle_deumV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7627.3067915310385, + "y": 6160.8596423851195, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 248, + "height": 34, + "seed": 20657333, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "rFhMfoT4Bkp7RpKR4TzNy", + "type": "arrow" + } + ], + "updated": 1672253728736, + "link": null, + "locked": false, + "fontSize": 26.6729166666667, + "fontFamily": 1, + "text": "Insert statements", + "baseline": 24, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Insert statements" + }, + { + "type": "arrow", + "version": 428, + "versionNonce": 185829654, + "isDeleted": false, + "id": "TF119TH8IEW69RTU435SM", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7901.785611642319, + "y": 5981.507010316684, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 148.69140625, + "height": 0.322265625, + "seed": 717708571, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728736, + "link": null, + "locked": false, + "startBinding": { + "elementId": "N1fWlp7o53vHgHG55h-7u", + "focus": 0.12704077151483206, + "gap": 12.730721244193319 + }, + "endBinding": { + "elementId": "twURJO4mwDfz2qy3VlyHF", + "focus": 0.010937820565660738, + "gap": 2.382192524260063 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 148.69140625, + -0.322265625 + ] + ] + }, + { + "type": "text", + "version": 5175, + "versionNonce": 1007205270, + "isDeleted": false, + "id": "3LIoa5FynBn0QKdFaxDmI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8250.644871820647, + "y": 6386.139371697311, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 181, + "height": 31, + "seed": 1090589275, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728736, + "link": null, + "locked": false, + "fontSize": 24.27686099119399, + "fontFamily": 1, + "text": "implicit table 2", + "baseline": 22, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "implicit table 2" + }, + { + "type": "rectangle", + "version": 6417, + "versionNonce": 1923281098, + "isDeleted": false, + "id": "x-p6jLxQf_c32SmEv6Evw", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 7938.09578253202, + "y": 6370.817825837577, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 74.33017905392987, + "height": 599.9941431013729, + "seed": 973173755, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Ft4zSnsjdQySQToTkIjRp", + "type": "arrow" + } + ], + "updated": 1672253728736, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 5055, + "versionNonce": 836294870, + "isDeleted": false, + "id": "rBpFzVKDKjaoecF8v8FSc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 1.562374043350375, + "x": 7732.59687836195, + "y": 6641.939436788496, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 483, + "height": 31, + "seed": 2013011253, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728736, + "link": null, + "locked": false, + "fontSize": 24.27686099119398, + "fontFamily": 1, + "text": "mv_hits_URL_UserID materialized view", + "baseline": 22, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "mv_hits_URL_UserID materialized view" + }, + { + "type": "arrow", + "version": 223, + "versionNonce": 536921674, + "isDeleted": false, + "id": "0oOhZTED1gVD6uv24_6pR", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7903.181630987556, + "y": 6656.916180870407, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 36.261160714285325, + "height": 0.6305803571422075, + "seed": 186603291, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728736, + "link": null, + "locked": false, + "startBinding": { + "elementId": "kzcOys8pqIg83tQrhVcJg", + "focus": 0.0022868252753708296, + "gap": 4.718135843830169 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 36.261160714285325, + -0.6305803571422075 + ] + ] + }, + { + "type": "arrow", + "version": 302, + "versionNonce": 1913461590, + "isDeleted": false, + "id": "Ft4zSnsjdQySQToTkIjRp", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8016.04435420184, + "y": 6655.9731005132635, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 31.431919642857792, + "height": 0.7038480707151393, + "seed": 1806251547, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728736, + "link": null, + "locked": false, + "startBinding": { + "elementId": "x-p6jLxQf_c32SmEv6Evw", + "focus": -0.05237206736672402, + "gap": 3.618392615890116 + }, + "endBinding": { + "elementId": "pfTG3rJoJFk5gHtQIZ_7I", + "focus": 0.01349302486895752, + "gap": 3.874290853353159 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 31.431919642857792, + 0.7038480707151393 + ] + ] + }, + { + "type": "text", + "version": 5323, + "versionNonce": 1432710410, + "isDeleted": false, + "id": "L8UMcztoxcfdVF0DZCX10", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8085.0278921482695, + "y": 5643.515790245401, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 470, + "height": 36, + "seed": 1009489429, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + } + ], + "updated": 1672253728736, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "rows are ordered by UserID first", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "rows are ordered by UserID first" + }, + { + "type": "text", + "version": 5374, + "versionNonce": 800800918, + "isDeleted": false, + "id": "allbUluIr3lSel0nIGzUc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8098.3169546482695, + "y": 6971.965008995401, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 426, + "height": 36, + "seed": 1371527701, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + } + ], + "updated": 1672253728736, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "rows are ordered by URL first", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "rows are ordered by URL first" + }, + { + "type": "arrow", + "version": 244, + "versionNonce": 755448778, + "isDeleted": false, + "id": "rFhMfoT4Bkp7RpKR4TzNy", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7886.8716421482695, + "y": 6179.181805870401, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 166.884765625, + "height": 1.85546875, + "seed": 767279483, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728736, + "link": null, + "locked": false, + "startBinding": { + "elementId": "sw11QL3zMuxfZle_deumV", + "focus": 0.1539507484478187, + "gap": 11.564850617231059 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 166.884765625, + -1.85546875 + ] + ] + }, + { + "type": "arrow", + "version": 293, + "versionNonce": 1995619798, + "isDeleted": false, + "id": "WYIytTWhG_OaRo1gwIGj9", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8434.220631429085, + "y": 6280.814266224911, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 1.3696070222940762, + "height": 85.03746152049098, + "seed": 1836056571, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728736, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "pfTG3rJoJFk5gHtQIZ_7I", + "focus": 0.46320140713743546, + "gap": 2.941435655701298 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1.3696070222940762, + 85.03746152049098 + ] + ] + }, + { + "type": "rectangle", + "version": 6948, + "versionNonce": 503029642, + "isDeleted": false, + "id": "Z_7e2g7YscsvJVGgJ3AqQ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8041.347443111283, + "y": 7232.943437226015, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 528.790329916914, + "height": 595.9835614109332, + "seed": 2143156469, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "v1AE_CoFKHPMf9WRkFt_J", + "type": "arrow" + }, + { + "id": "Bev9_Lln4zav5DCs11J-V", + "type": "arrow" + }, + { + "id": "KK3gr8mnCDr1zS5NiHoM2", + "type": "arrow" + } + ], + "updated": 1672253728736, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6682, + "versionNonce": 230775114, + "isDeleted": false, + "id": "hCNlVRkD-sfGtxuksHy9H", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8039.811223180199, + "y": 7916.134123222537, + "strokeColor": "#15223c", + "backgroundColor": "#ffc029", + "width": 528.790329916914, + "height": 595.9835614109332, + "seed": 2006947797, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Ewgb1B7fEL3BdjpW_cOHv", + "type": "arrow" + }, + { + "id": "KK3gr8mnCDr1zS5NiHoM2", + "type": "arrow" + } + ], + "updated": 1672253728738, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4731, + "versionNonce": 1787624202, + "isDeleted": false, + "id": "h-QfKMvHXxy7q2kvC9Va8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8175.829421230379, + "y": 7251.2266974699, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 295, + "height": 31, + "seed": 58387125, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728739, + "link": null, + "locked": false, + "fontSize": 24.27686099119399, + "fontFamily": 1, + "text": "hits_UserID_URL table", + "baseline": 22, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "hits_UserID_URL table" + }, + { + "type": "rectangle", + "version": 6794, + "versionNonce": 1643104470, + "isDeleted": false, + "id": "eetdhKawBsuVyikGZtLQC", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 7605.8509829992945, + "y": 7368.4585065201245, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 277.02836153542506, + "height": 92.61439970619708, + "seed": 300277819, + "groupIds": [ + "YUkymRHYRKke4_IGeCvYh" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3946, + "versionNonce": 1282299786, + "isDeleted": false, + "id": "oTTY226Oi7p3vALeQ9CbC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 7613.051931885771, + "y": 7376.281088621185, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 264, + "height": 71, + "seed": 1343460597, + "groupIds": [ + "YUkymRHYRKke4_IGeCvYh" + ], + "roundness": null, + "boundElements": [ + { + "id": "v1AE_CoFKHPMf9WRkFt_J", + "type": "arrow" + } + ], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 28.28265871540131, + "fontFamily": 1, + "text": "Query \nfiltering on UserID", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query \nfiltering on UserID" + }, + { + "type": "rectangle", + "version": 7267, + "versionNonce": 971783702, + "isDeleted": false, + "id": "JCTMLk-mYcKjStD_24zPy", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 7611.135116183819, + "y": 7668.666281817743, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 271.3671624420534, + "height": 93.76674345619676, + "seed": 475275483, + "groupIds": [ + "cHnyxUd3QHtwzViQE-LtO" + ], + "roundness": null, + "boundElements": [ + { + "id": "Ewgb1B7fEL3BdjpW_cOHv", + "type": "arrow" + } + ], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4360, + "versionNonce": 1485755978, + "isDeleted": false, + "id": "zJmWF62PQIyStRG7mvDe2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 7635.433036803195, + "y": 7675.666686555276, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 223, + "height": 72, + "seed": 455028309, + "groupIds": [ + "cHnyxUd3QHtwzViQE-LtO" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 28.63456236221491, + "fontFamily": 1, + "text": "Query\nfiltering on URL", + "baseline": 62, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query\nfiltering on URL" + }, + { + "type": "text", + "version": 4416, + "versionNonce": 1562905430, + "isDeleted": false, + "id": "X9VJ8NC7FRPpuEFFes6ix", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7615.115106263185, + "y": 7550.14461262322, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 248, + "height": 34, + "seed": 208751995, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Bev9_Lln4zav5DCs11J-V", + "type": "arrow" + } + ], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 26.6729166666667, + "fontFamily": 1, + "text": "Insert statements", + "baseline": 24, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Insert statements" + }, + { + "type": "text", + "version": 5244, + "versionNonce": 1509437590, + "isDeleted": false, + "id": "Ve6s-AV1UA3cwzjqTfw-c", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8238.863342802793, + "y": 7933.480331518744, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 146, + "height": 31, + "seed": 629138971, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 24.27686099119399, + "fontFamily": 1, + "text": "hidden table", + "baseline": 22, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "hidden table" + }, + { + "type": "text", + "version": 5403, + "versionNonce": 957636938, + "isDeleted": false, + "id": "LYNjmWQV_sVLjKZufR3Z5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8073.246363130416, + "y": 7190.856750066836, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 470, + "height": 36, + "seed": 1603197909, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + } + ], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "rows are ordered by UserID first", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "rows are ordered by UserID first" + }, + { + "type": "text", + "version": 5454, + "versionNonce": 1507110998, + "isDeleted": false, + "id": "PMsztz095pgjXHe-PuC4p", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8086.535425630416, + "y": 8519.305968816834, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 426, + "height": 36, + "seed": 1245526011, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "FbY8kaSjKSSR9_mpWstIe", + "type": "arrow" + } + ], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "rows are ordered by URL first", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "rows are ordered by URL first" + }, + { + "type": "text", + "version": 7407, + "versionNonce": 1680873162, + "isDeleted": false, + "id": "TYSZDzLSRzTAgt1ZTo-Dj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8448.771056210771, + "y": 7844.469194263265, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 337, + "height": 60, + "seed": 451914389, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 23.740985576923116, + "fontFamily": 1, + "text": "Data is automatically kept \nin sync with the hidden table", + "baseline": 51, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Data is automatically kept \nin sync with the hidden table" + }, + { + "type": "arrow", + "version": 733, + "versionNonce": 1876707350, + "isDeleted": false, + "id": "Ewgb1B7fEL3BdjpW_cOHv", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7882.891452416132, + "y": 7716.0175573585, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 232.09635416666697, + "height": 197.2460937500009, + "seed": 256393269, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "startBinding": { + "elementId": "JCTMLk-mYcKjStD_24zPy", + "focus": 0.018315066168853755, + "gap": 1 + }, + "endBinding": { + "elementId": "hCNlVRkD-sfGtxuksHy9H", + "focus": -0.6433915395529685, + "gap": 3.332711697369632 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 158.02083333333303, + -0.46223958333393966 + ], + [ + 226.27604166666697, + 46.60807291666697 + ], + [ + 232.09635416666697, + 196.78385416666697 + ] + ] + }, + { + "type": "arrow", + "version": 275, + "versionNonce": 1090284618, + "isDeleted": false, + "id": "v1AE_CoFKHPMf9WRkFt_J", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7886.628356254965, + "y": 7415.233589064104, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 151.90395162372624, + "height": 0.44369186711264774, + "seed": 280695387, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "startBinding": { + "elementId": "oTTY226Oi7p3vALeQ9CbC", + "focus": 0.10567869992573134, + "gap": 9.576424369193319 + }, + "endBinding": { + "elementId": "Z_7e2g7YscsvJVGgJ3AqQ", + "focus": 0.39136505740374905, + "gap": 2.8151352325921835 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 151.90395162372624, + -0.44369186711264774 + ] + ] + }, + { + "type": "arrow", + "version": 261, + "versionNonce": 747033942, + "isDeleted": false, + "id": "Bev9_Lln4zav5DCs11J-V", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 7869.134941999466, + "y": 7565.809224025168, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 171.2125011118178, + "height": 0.7914602852943062, + "seed": 1921260315, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "startBinding": { + "elementId": "X9VJ8NC7FRPpuEFFes6ix", + "focus": -0.04638153040439678, + "gap": 6.019835736280584 + }, + "endBinding": { + "elementId": "Z_7e2g7YscsvJVGgJ3AqQ", + "focus": -0.10980672692889652, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 171.2125011118178, + -0.7914602852943062 + ] + ] + }, + { + "type": "text", + "version": 6790, + "versionNonce": 1677480714, + "isDeleted": false, + "id": "qTEEGX0PbmViwqq-MG-4e", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 7690.224785749468, + "y": 7841.466776108502, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 402, + "height": 63, + "seed": 417310907, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 24.760416666666444, + "fontFamily": 1, + "text": "ClickHouse automatically choses \nthe most effective table version", + "baseline": 54, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse automatically choses \nthe most effective table version" + }, + { + "type": "arrow", + "version": 246, + "versionNonce": 653114006, + "isDeleted": false, + "id": "KK3gr8mnCDr1zS5NiHoM2", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8423.15707741613, + "y": 7835.245421941838, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 4.3359375, + "height": 74.65625, + "seed": 35349051, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "startBinding": { + "elementId": "Z_7e2g7YscsvJVGgJ3AqQ", + "focus": -0.35406380187828085, + "gap": 6.318423304890075 + }, + "endBinding": { + "elementId": "hCNlVRkD-sfGtxuksHy9H", + "focus": 0.5003709721725933, + "gap": 6.232451280699024 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 4.3359375, + 74.65625 + ] + ] + }, + { + "type": "text", + "version": 7435, + "versionNonce": 1406230986, + "isDeleted": false, + "id": "XRp-HuyTTq1kecRKcMBuY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8461.93832741613, + "y": 6295.018859441838, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 337, + "height": 60, + "seed": 46765717, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 23.740985576923116, + "fontFamily": 1, + "text": "Data is automatically kept \nin sync with the hidden table", + "baseline": 51, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Data is automatically kept \nin sync with the hidden table" + }, + { + "type": "image", + "version": 162, + "versionNonce": 365295574, + "isDeleted": false, + "id": "Pch4taxj4RvusHnRQcTSx", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 9324.274292970846, + "y": 7284.873973078202, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 479.3451143451143, + "height": 809, + "seed": 819925371, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "status": "saved", + "fileId": "76f7965db97d0c2ccdf9386a266c1e3488b8ba3e5f45567dec96fcf5f9f279525ad39fee2918979a507aabbd12a9ed8d", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 436, + "versionNonce": 194418826, + "isDeleted": false, + "id": "ZtrzPPqnOPKIalBxb4FSg", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 20, + "angle": 0, + "x": 9381.965316052494, + "y": 7551.057211714564, + "strokeColor": "transparent", + "backgroundColor": "#ffc029", + "width": 419.8828124999997, + "height": 406.3906249999999, + "seed": 2012955605, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1452, + "versionNonce": 1822998422, + "isDeleted": false, + "id": "N6dIDN7vX4unxZ-bloMhX", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 40, + "angle": 0, + "x": 9412.884073943902, + "y": 8029.262270111027, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 358.5199652777785, + "height": 56.38549558080553, + "seed": 30151797, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1574, + "versionNonce": 1473797334, + "isDeleted": false, + "id": "Y5G1bq9UYKIrmMOVblHdx", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 40, + "angle": 0, + "x": 9413.288903489356, + "y": 7961.527974025164, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 358.5199652777785, + "height": 56.38549558080553, + "seed": 2005816277, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1569, + "versionNonce": 1980302218, + "isDeleted": false, + "id": "O-dA70_HJPyOEmmVviw7o", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 40, + "angle": 0, + "x": 9413.097142125722, + "y": 7457.387349025161, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 358.5199652777785, + "height": 56.38549558080553, + "seed": 875206171, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1740, + "versionNonce": 228741654, + "isDeleted": false, + "id": "6Avt6AQUL25R0hZhfX7NX", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 40, + "angle": 0, + "x": 9413.651119398452, + "y": 7524.230388797885, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 358.5199652777785, + "height": 26.712200126260473, + "seed": 538183221, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1750, + "versionNonce": 1374945866, + "isDeleted": false, + "id": "HFj52AfmdNVkOp4c60LxV", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9437.514755762086, + "y": 7894.372434252431, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 358.5199652777785, + "height": 56.38549558080553, + "seed": 1523192475, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1882, + "versionNonce": 2029756246, + "isDeleted": false, + "id": "NxVkmmvhixkKmzHRNHOru", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9437.60353417118, + "y": 7827.486780843337, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 358.5199652777785, + "height": 56.38549558080553, + "seed": 1672588085, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1842, + "versionNonce": 1569794314, + "isDeleted": false, + "id": "RuT_pknQ-MsLu5IYEFWrd", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9437.237767125724, + "y": 7727.243172888795, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 358.5199652777785, + "height": 56.38549558080553, + "seed": 1030288213, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1887, + "versionNonce": 1580811414, + "isDeleted": false, + "id": "ZU2o3HvOBt_cifAgzMOgc", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9437.62484098936, + "y": 7792.238201297887, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 358.5199652777785, + "height": 26.712200126260473, + "seed": 368888283, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 445, + "versionNonce": 811300810, + "isDeleted": false, + "id": "Z7_nJRqDhZYSyLmTkdj6U", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9571.990455843254, + "y": 6562.79834236295, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 695.9854910714289, + "height": 94.3947933234529, + "seed": 935460955, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "status": "saved", + "fileId": "272da4c5523dd5f697196765350e6241b6e449522d5b653f0076f658fa6591ad739c21d038062715cb4daf0dd29467e5", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 903, + "versionNonce": 789594582, + "isDeleted": false, + "id": "jpqj16ml3jClhCgI_xRrt", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 0, + "opacity": 20, + "angle": 0, + "x": 9607.611549593254, + "y": 6566.722153543549, + "strokeColor": "transparent", + "backgroundColor": "#ffc029", + "width": 659.828125000001, + "height": 30.473772321428363, + "seed": 59080283, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "e1a0kx3SZ5TALwhYSdmUF", + "type": "arrow" + } + ], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 768, + "versionNonce": 1586861846, + "isDeleted": false, + "id": "qFOLMNR2ZjoMXwRMK7yvs", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9825.342500785104, + "y": 6688.433091043546, + "strokeColor": "transparent", + "backgroundColor": "#ffc029", + "width": 433.9677868150695, + "height": 413.4375000000009, + "seed": 1135176411, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "status": "saved", + "fileId": "a39443537553a91afe6fdab1761775c30499581821e6b7c09836e0f5357eb9cde4f4f95904222e161a4e277879f13708", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 1974, + "versionNonce": 813927754, + "isDeleted": false, + "id": "yHDvEdfIrFFus9PHnxZ-y", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 20, + "angle": 0, + "x": 9827.465716259927, + "y": 6686.352315373901, + "strokeColor": "transparent", + "backgroundColor": "#ffc029", + "width": 433.71961805555475, + "height": 416.74707031249994, + "seed": 488733051, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "e1a0kx3SZ5TALwhYSdmUF", + "type": "arrow" + } + ], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 735, + "versionNonce": 893273174, + "isDeleted": false, + "id": "4JIRWad-5pcIerpc52Xci", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9324.470637824888, + "y": 8088.936129237984, + "strokeColor": "transparent", + "backgroundColor": "#ffffff", + "width": 479.7645399305556, + "height": 8.712022569443418, + "seed": 1986378907, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1004, + "versionNonce": 2012697610, + "isDeleted": false, + "id": "VUE4b6afgqa4Z1O91JHuQ", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9572.159352267992, + "y": 6652.239155747069, + "strokeColor": "transparent", + "backgroundColor": "#ffffff", + "width": 695.4787493322644, + "height": 6.232855902777367, + "seed": 1226314235, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "arrow", + "version": 746, + "versionNonce": 314852042, + "isDeleted": false, + "id": "e1a0kx3SZ5TALwhYSdmUF", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 10037.178754742521, + "y": 6598.057036976088, + "strokeColor": "#ffc029", + "backgroundColor": "#ffffff", + "width": 2.066973597152355, + "height": 86.82061826485824, + "seed": 1696479157, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "startBinding": { + "elementId": "jpqj16ml3jClhCgI_xRrt", + "focus": -0.3028865187706572, + "gap": 1 + }, + "endBinding": { + "elementId": "yHDvEdfIrFFus9PHnxZ-y", + "focus": -0.06405934507366456, + "gap": 1.474660132954341 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -2.066973597152355, + 86.82061826485824 + ] + ] + }, + { + "type": "rectangle", + "version": 2033, + "versionNonce": 481142486, + "isDeleted": false, + "id": "DtCxBD6yVKGI9wfd1jVZk", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9910.215828994393, + "y": 7040.61881547536, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 341.9476996527785, + "height": 56.38549558080553, + "seed": 1247446651, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2142, + "versionNonce": 193288586, + "isDeleted": false, + "id": "FfFPhiiOOrjCyEyFJrKtY", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9910.044930556893, + "y": 6972.75260453786, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 341.9476996527785, + "height": 56.38549558080553, + "seed": 1152923317, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2241, + "versionNonce": 1564367894, + "isDeleted": false, + "id": "CbW4WoxH_JrwIql0BfjXm", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9909.385750869393, + "y": 6871.05338578786, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 341.9476996527785, + "height": 56.38549558080553, + "seed": 973968763, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2449, + "versionNonce": 1635096650, + "isDeleted": false, + "id": "T7jj_g3DXoJJMiMkGPHpw", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 9909.083993056893, + "y": 6934.91373735036, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 341.9476996527785, + "height": 28.924558080805543, + "seed": 1605045365, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5363, + "versionNonce": 1310374218, + "isDeleted": false, + "id": "EZjfEEEoSVPCynr5giBbv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 4626.687090016218, + "y": 2475.873001833646, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 574.1115434808286, + "height": 209.4985212519491, + "seed": 1876311162, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4029, + "versionNonce": 1090508886, + "isDeleted": false, + "id": "Fw_XtYwjmSw6yYPdJokly", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4643.883552788515, + "y": 2519.889788848918, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 120.04052217913272, + "height": 151.42952949282065, + "seed": 1293246502, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3471, + "versionNonce": 835256330, + "isDeleted": false, + "id": "JH_cQIIkgQLjRR-d8U1t-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4670.240790878718, + "y": 2524.2172469246884, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 68, + "height": 21, + "seed": 1099734330, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 16.553551452494137, + "fontFamily": 1, + "text": "granules", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "granules" + }, + { + "type": "rectangle", + "version": 4322, + "versionNonce": 1800297878, + "isDeleted": false, + "id": "Cm8vPeB7qvZsMiF3PPP0_", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4784.483052721605, + "y": 2518.7482745491307, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 188.1717824359662, + "height": 152.22830497217703, + "seed": 1627548518, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5504, + "versionNonce": 2105568970, + "isDeleted": false, + "id": "NUwdBWkmkrTKkGQRDCMv3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 4636.543717970744, + "y": 2551.727618325574, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 551.9063917871771, + "height": 18.57679310887235, + "seed": 2000217594, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3324, + "versionNonce": 1813658326, + "isDeleted": false, + "id": "D2hDI5vsA7GuLHay0K3lv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4672.714650940634, + "y": 2554.366537412698, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 70, + "height": 17, + "seed": 1638665894, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 13.242841161995324, + "fontFamily": 1, + "text": "0, 1, 2, 3 ", + "baseline": 12, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "0, 1, 2, 3 " + }, + { + "type": "text", + "version": 3384, + "versionNonce": 635176330, + "isDeleted": false, + "id": "VRI2yPOORBOAFH6C3apmp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4786.9096492260105, + "y": 2554.6944121140314, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 180, + "height": 17, + "seed": 1776162490, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 13.242841161995322, + "fontFamily": 1, + "text": "goal://22013/10/stremena...", + "baseline": 12, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal://22013/10/stremena..." + }, + { + "type": "text", + "version": 3241, + "versionNonce": 972582934, + "isDeleted": false, + "id": "OZzl2hgo_VwNTPDKx76ZK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4868.554602306207, + "y": 2524.5691141447096, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 24, + "height": 21, + "seed": 1002392038, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 16.55355145249415, + "fontFamily": 1, + "text": "min", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "min" + }, + { + "type": "text", + "version": 3537, + "versionNonce": 1410778186, + "isDeleted": false, + "id": "U5GL3hBTRIJjvkpHpmCiy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4699.908658626797, + "y": 2589.228743591547, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 21, + "seed": 1511993210, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 16.553551452494144, + "fontFamily": 1, + "text": ".", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3653, + "versionNonce": 819854678, + "isDeleted": false, + "id": "UMpaAcbyriMuz62v8I2oS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4700.146145657573, + "y": 2600.633999460905, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 21, + "seed": 1044978982, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 16.553551452494144, + "fontFamily": 1, + "text": ".", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3662, + "versionNonce": 1376496394, + "isDeleted": false, + "id": "TAJKuXkpFbA42F9gf3cyg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4700.166787856646, + "y": 2611.5340753782766, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 21, + "seed": 2084515898, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 16.553551452494144, + "fontFamily": 1, + "text": ".", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3616, + "versionNonce": 1713365654, + "isDeleted": false, + "id": "seW36Qa3GkXfD8L03Ynqg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4885.563774819813, + "y": 2588.139040470358, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 21, + "seed": 1320585318, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 16.553551452494144, + "fontFamily": 1, + "text": ".", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3732, + "versionNonce": 1983232458, + "isDeleted": false, + "id": "QHv5Q10bv9KgugcvuCKf4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4885.801261850598, + "y": 2599.5442963397254, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 21, + "seed": 69277946, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 16.553551452494144, + "fontFamily": 1, + "text": ".", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3741, + "versionNonce": 2087919574, + "isDeleted": false, + "id": "z1ZRxA6X0zalljDL0QG9U", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4885.821904049675, + "y": 2610.4443722570813, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 21, + "seed": 483691430, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 16.553551452494144, + "fontFamily": 1, + "text": ".", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5055, + "versionNonce": 263188618, + "isDeleted": false, + "id": "t_5zaGsqy3Ck4s3T3R4q9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 4637.077409689986, + "y": 2576.860386561766, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 552.7450513303977, + "height": 20.1520926180047, + "seed": 826796474, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3528, + "versionNonce": 2012001558, + "isDeleted": false, + "id": "hraNZIjPgMoKUKjDL5N0l", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4788.931909983894, + "y": 2581.257507260244, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 171, + "height": 17, + "seed": 1456482022, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 13.242841161995312, + "fontFamily": 1, + "text": "goal://auto.rg.ru/moskva...", + "baseline": 12, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal://auto.rg.ru/moskva..." + }, + { + "type": "rectangle", + "version": 5026, + "versionNonce": 1379225418, + "isDeleted": false, + "id": "ratmuhEBZpvTrZkzw88v7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 4639.510318120584, + "y": 2628.474379072063, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 551.5885871464857, + "height": 20.07152876880092, + "seed": 1524015738, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3594, + "versionNonce": 302096982, + "isDeleted": false, + "id": "-IrSQgI079EJPFmDWa3nZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4648.544457945982, + "y": 2632.5589369072954, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 113, + "height": 17, + "seed": 1563843110, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 13.242841161995322, + "fontFamily": 1, + "text": "1080, 1081, 1082", + "baseline": 12, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "1080, 1081, 1082" + }, + { + "type": "text", + "version": 3753, + "versionNonce": 226944918, + "isDeleted": false, + "id": "Khb_NYwOQQNpH4rWYq2cH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4800.394466498392, + "y": 2483.114402058014, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 260, + "height": 21, + "seed": 1995711846, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 16.55355145249416, + "fontFamily": 1, + "text": "skp_idx_url_skipping_index.idx2", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "skp_idx_url_skipping_index.idx2" + }, + { + "type": "text", + "version": 3427, + "versionNonce": 544048330, + "isDeleted": false, + "id": "t878vW0fE0tkKb14cBunt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4672.029837040707, + "y": 2579.5428632483063, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 71, + "height": 17, + "seed": 1037552634, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 13.242841161995324, + "fontFamily": 1, + "text": "4, 5, 6, 7 ", + "baseline": 12, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "4, 5, 6, 7 " + }, + { + "type": "text", + "version": 3152, + "versionNonce": 179406038, + "isDeleted": false, + "id": "0jNnTUlpDHqjSZ3LQRIIp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4559.45471458458, + "y": 2552.9531908607014, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 60, + "height": 22, + "seed": 713078650, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 17.0059628180379, + "fontFamily": 1, + "text": "mark 0", + "baseline": 15, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 0" + }, + { + "type": "text", + "version": 3222, + "versionNonce": 1528199702, + "isDeleted": false, + "id": "LmfYXbu3WBr17MbXpQ2hW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4563.023373228718, + "y": 2579.224229558663, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 53, + "height": 22, + "seed": 426580966, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 17.0059628180379, + "fontFamily": 1, + "text": "mark 1", + "baseline": 15, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1" + }, + { + "type": "text", + "version": 3267, + "versionNonce": 1664506442, + "isDeleted": false, + "id": "njooOnI2x3ijCXskfLXE2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4544.603266701602, + "y": 2631.456941169645, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 74, + "height": 22, + "seed": 1948092538, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728740, + "link": null, + "locked": false, + "fontSize": 17.0059628180379, + "fontFamily": 1, + "text": "mark 271", + "baseline": 15, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 271" + }, + { + "type": "rectangle", + "version": 5127, + "versionNonce": 1153990922, + "isDeleted": false, + "id": "glPTz_hjWNG0A9lDMTuz_", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4911.131900857454, + "y": 2761.2230577975415, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.73313247461166, + "height": 122.34873768360643, + "seed": 585824698, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5076, + "versionNonce": 717450390, + "isDeleted": false, + "id": "Dn2cs5H_l-GYQug1e1mtu", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4780.378775578767, + "y": 2761.5072575026747, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 114.96182565642971, + "height": 122.61305449408903, + "seed": 279320294, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6471, + "versionNonce": 1726468042, + "isDeleted": false, + "id": "t6o77gSFrXrKijoStYMia", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 4772.871026863802, + "y": 2771.855899578434, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 268.9033265008711, + "height": 18.236732489293967, + "seed": 1167569530, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4041, + "versionNonce": 940927446, + "isDeleted": false, + "id": "9Q-xZLkgEDmiw5T2L0yj1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4787.703940629022, + "y": 2773.4815994811547, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 96, + "height": 19, + "seed": 1187924518, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 14.842667860953062, + "fontFamily": 1, + "text": "block_offset", + "baseline": 13, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "text", + "version": 4276, + "versionNonce": 229590666, + "isDeleted": false, + "id": "qtkr-R2fkuTnNOmpWbgGa", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4834.596728398677, + "y": 2811.02833335081, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 24, + "seed": 196039482, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 18.553334826191342, + "fontFamily": 1, + "text": ".", + "baseline": 17, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4392, + "versionNonce": 1555414806, + "isDeleted": false, + "id": "6xOANJvYvP6UMKdO9h7T3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4834.862905503429, + "y": 2823.8114229210482, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 24, + "seed": 1208882534, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 18.553334826191342, + "fontFamily": 1, + "text": ".", + "baseline": 17, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4401, + "versionNonce": 1104799050, + "isDeleted": false, + "id": "KriGiFDI74REXgQrFkqat", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4834.88604142276, + "y": 2836.0283033111045, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 24, + "seed": 395631610, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 18.553334826191342, + "fontFamily": 1, + "text": ".", + "baseline": 17, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4496, + "versionNonce": 1293511766, + "isDeleted": false, + "id": "pFsANL14D6q1Jax6WykUE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4971.738545271197, + "y": 2809.806986564504, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 24, + "seed": 2108848294, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 18.553334826191342, + "fontFamily": 1, + "text": ".", + "baseline": 17, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4612, + "versionNonce": 1019390986, + "isDeleted": false, + "id": "Ks8JUS5QTEeiLsMlB-Xm6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4972.004722375945, + "y": 2822.5900761347375, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 24, + "seed": 1196117178, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 18.553334826191342, + "fontFamily": 1, + "text": ".", + "baseline": 17, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4621, + "versionNonce": 1729458582, + "isDeleted": false, + "id": "dZIZMeUmHaTFExco9wgpD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4972.027858295278, + "y": 2834.806956524795, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 24, + "seed": 526939110, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 18.553334826191342, + "fontFamily": 1, + "text": ".", + "baseline": 17, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5716, + "versionNonce": 1415879370, + "isDeleted": false, + "id": "EfuQ6jNHf3XBRzQlhzoQn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 4773.283625729264, + "y": 2801.4085952589403, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 269.3964650954019, + "height": 19.27559192236466, + "seed": 1081451898, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5655, + "versionNonce": 98488022, + "isDeleted": false, + "id": "_h2AEPhHPqFjBl0AwYWlY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 4774.179359773789, + "y": 2854.5242929212927, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 269.74075308853065, + "height": 21.365522990494803, + "seed": 1732052774, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4216, + "versionNonce": 697143638, + "isDeleted": false, + "id": "DNYqQ1E15zTpJZrZTggZ5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4914.3848981383835, + "y": 2770.882293434845, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 121, + "height": 19, + "seed": 191504314, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 14.84266786095307, + "fontFamily": 1, + "text": "granules_offset", + "baseline": 13, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granules_offset" + }, + { + "type": "text", + "version": 4305, + "versionNonce": 751785738, + "isDeleted": false, + "id": "zVYJtDTsANgFAVTj5Wy8T", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4911.79643657019, + "y": 2801.051594184121, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 121, + "height": 19, + "seed": 1335120102, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 14.84266786095307, + "fontFamily": 1, + "text": "granules_offset", + "baseline": 13, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granules_offset" + }, + { + "type": "text", + "version": 4311, + "versionNonce": 1270675094, + "isDeleted": false, + "id": "5DrenLaY0MaBmvesQoSIH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4912.696251972668, + "y": 2855.974069497955, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 121, + "height": 19, + "seed": 1598167162, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 14.84266786095307, + "fontFamily": 1, + "text": "granules_offset", + "baseline": 13, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granules_offset" + }, + { + "type": "text", + "version": 4143, + "versionNonce": 329508298, + "isDeleted": false, + "id": "Rbg0ECJPtFhK1kNUYQLnN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4787.7804959059395, + "y": 2803.801341648017, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 96, + "height": 19, + "seed": 1071989798, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 14.842667860953062, + "fontFamily": 1, + "text": "block_offset", + "baseline": 13, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "text", + "version": 4158, + "versionNonce": 1431155670, + "isDeleted": false, + "id": "JZa5GvhMelVXlu2C0BS4X", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4789.481502476632, + "y": 2858.6001849053396, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 96, + "height": 19, + "seed": 253557050, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 14.842667860953062, + "fontFamily": 1, + "text": "block_offset", + "baseline": 13, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "block_offset" + }, + { + "type": "text", + "version": 4442, + "versionNonce": 1222924298, + "isDeleted": false, + "id": "h3EwxBTH1L5Z65GOxt9Oz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4694.396915823361, + "y": 2772.175586628996, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 60, + "height": 22, + "seed": 965343654, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 17.0059628180379, + "fontFamily": 1, + "text": "mark 0", + "baseline": 15, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 0" + }, + { + "type": "text", + "version": 4535, + "versionNonce": 1748272534, + "isDeleted": false, + "id": "whUyRrP8BzVeEw5Jvpl55", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4698.068557422044, + "y": 2801.4721935087755, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 53, + "height": 22, + "seed": 2003327930, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 17.0059628180379, + "fontFamily": 1, + "text": "mark 1", + "baseline": 15, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1" + }, + { + "type": "text", + "version": 4598, + "versionNonce": 1198573258, + "isDeleted": false, + "id": "UchKoSskYpqh4HsL9b0WD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4678.430411122202, + "y": 2855.658030119758, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 74, + "height": 22, + "seed": 1453839590, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 17.0059628180379, + "fontFamily": 1, + "text": "mark 271", + "baseline": 15, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 271" + }, + { + "type": "text", + "version": 4627, + "versionNonce": 972776150, + "isDeleted": false, + "id": "6y5kKJs6Dqk6tP3muFBIn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4775.373071088217, + "y": 2728.292917085145, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 270, + "height": 23, + "seed": 2086069818, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 17.819931517158327, + "fontFamily": 1, + "text": "skp_idx_url_skipping_index.mrk", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "skp_idx_url_skipping_index.mrk" + }, + { + "type": "rectangle", + "version": 4468, + "versionNonce": 89482, + "isDeleted": false, + "id": "AQEIO92grlV-EwQyoWn_o", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4985.584145928198, + "y": 2517.8373949463735, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 196.54580587346618, + "height": 152.22830497217703, + "seed": 1763633062, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3546, + "versionNonce": 24418326, + "isDeleted": false, + "id": "hN_wI4OLb-eE3h1CCJ5WL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4988.010742432603, + "y": 2553.783532511274, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 190, + "height": 17, + "seed": 1784761786, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 13.242841161995322, + "fontFamily": 1, + "text": "https://wwwww.hurriyet.com/...", + "baseline": 12, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https://wwwww.hurriyet.com/..." + }, + { + "type": "text", + "version": 3405, + "versionNonce": 1875975242, + "isDeleted": false, + "id": "Jo4fWyt7nkDV4BukNFPbw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5069.655695512798, + "y": 2523.6582345419524, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 33, + "height": 21, + "seed": 1634665190, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 16.55355145249415, + "fontFamily": 1, + "text": "max", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "max" + }, + { + "type": "text", + "version": 3777, + "versionNonce": 110437718, + "isDeleted": false, + "id": "P4pxFD9XZU2D7av8jfGjJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5086.664868026406, + "y": 2587.2281608676008, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 21, + "seed": 1931708026, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 16.553551452494144, + "fontFamily": 1, + "text": ".", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3893, + "versionNonce": 884671242, + "isDeleted": false, + "id": "Y9jeGZId6Gpy-B4hliG_t", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5086.902355057189, + "y": 2598.6334167369682, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 21, + "seed": 1738126886, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 16.553551452494144, + "fontFamily": 1, + "text": ".", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3902, + "versionNonce": 1253182102, + "isDeleted": false, + "id": "pQr7826QaOMf8ZrbYnSq4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5086.922997256266, + "y": 2609.533492654324, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 21, + "seed": 1084270394, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 16.553551452494144, + "fontFamily": 1, + "text": ".", + "baseline": 15, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3691, + "versionNonce": 2033848778, + "isDeleted": false, + "id": "7Ih08DGaAYAdc1tFLBrow", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4990.033003190487, + "y": 2580.346627657487, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 185, + "height": 17, + "seed": 344719718, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 13.242841161995312, + "fontFamily": 1, + "text": "https://yandex.ru/yandex.k...", + "baseline": 12, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https://yandex.ru/yandex.k..." + }, + { + "type": "text", + "version": 3848, + "versionNonce": 1551910870, + "isDeleted": false, + "id": "UFSmjp1fK0uPU2YLfgvS0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4988.40811404751, + "y": 2630.498505120336, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 185, + "height": 17, + "seed": 1262202874, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 13.24284116199533, + "fontFamily": 1, + "text": "https://yandsearch?lr=65&...", + "baseline": 12, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https://yandsearch?lr=65&..." + }, + { + "type": "text", + "version": 3551, + "versionNonce": 1617512586, + "isDeleted": false, + "id": "XoRvQeHSWUywtc-7D6Okf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4786.503493945569, + "y": 2631.4737773880333, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 166, + "height": 17, + "seed": 744537530, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 13.242841161995322, + "fontFamily": 1, + "text": "goal://cars.auto.yandex...", + "baseline": 12, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal://cars.auto.yandex..." + }, + { + "type": "rectangle", + "version": 6347, + "versionNonce": 739564822, + "isDeleted": false, + "id": "LAlitqCgryfRePyezvtKD", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 4717.123839431744, + "y": 6886.177132753239, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 189.53819444444457, + "height": 65.4920038728636, + "seed": 1388526246, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ZA4thJKPNw7H3CWK6qmss", + "type": "arrow" + } + ], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6381, + "versionNonce": 1912842058, + "isDeleted": false, + "id": "YffaJtBF5K1T4WsmiFJAY", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 4712.015580503174, + "y": 6736.7139631103855, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 196.21788194444466, + "height": 65.4920038728636, + "seed": 438282938, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6017, + "versionNonce": 1592052310, + "isDeleted": false, + "id": "1r43Bj6XLcqQ-XFO_f5xe", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 4718.6372322888865, + "y": 5321.225123824679, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 189.53819444444457, + "height": 65.4920038728636, + "seed": 1494283750, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "5YGvoDE58PCeFAbhdoGmz", + "type": "arrow" + } + ], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5815, + "versionNonce": 107228682, + "isDeleted": false, + "id": "eHphIrShW_-UDRvoO7Ypy", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 4710.64476577103, + "y": 5013.312921443729, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 195.89980158730228, + "height": 65.4920038728636, + "seed": 890127226, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5353, + "versionNonce": 600117142, + "isDeleted": false, + "id": "MdWZDPkelSEbwlzRyht_i", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 5207.872836636801, + "y": 4977.569825347107, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.9249131944446, + "height": 135.7498163728636, + "seed": 478497062, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3591, + "versionNonce": 847633610, + "isDeleted": false, + "id": "k_J7rP92x8a_hsyU2aUg3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5223.709316671524, + "y": 4988.133285216232, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 126, + "height": 25, + "seed": 1345045562, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary index", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary index" + }, + { + "type": "rectangle", + "version": 5052, + "versionNonce": 116042966, + "isDeleted": false, + "id": "1d4R5EECHyhXWI4vOv-AU", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 5024.772400939687, + "y": 4927.355507438453, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.4799011752141, + "height": 226.56336805555574, + "seed": 1821193318, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3497, + "versionNonce": 872657802, + "isDeleted": false, + "id": "6pyBo-W6p4RmEWZNawpMt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5071.325828089794, + "y": 4939.793180334134, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 68, + "height": 25, + "seed": 1432038650, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table 1", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "table 1" + }, + { + "type": "rectangle", + "version": 5190, + "versionNonce": 1173004822, + "isDeleted": false, + "id": "GMq1kJ27BEai-yd8UBgYB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5212.839789063715, + "y": 5025.636912231577, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 586528678, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5262, + "versionNonce": 1561899594, + "isDeleted": false, + "id": "G1Saap_NERPjsf1dx46JD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5212.91190444833, + "y": 5040.6055119911925, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 2048884154, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5315, + "versionNonce": 599387990, + "isDeleted": false, + "id": "dMwDWrG3XlDqIIbI78TzS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5213.329572717562, + "y": 5057.453468721962, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1475072742, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3530, + "versionNonce": 10475786, + "isDeleted": false, + "id": "Krd-uMV_0QWt3BNWjxdbV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5286.534600762431, + "y": 5056.386084596796, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1268495994, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3646, + "versionNonce": 1018008726, + "isDeleted": false, + "id": "ptnDERRJKvVZ7vQejeXFR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5286.821532580611, + "y": 5070.16591414225, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 368870950, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3655, + "versionNonce": 1578379210, + "isDeleted": false, + "id": "lr4AWmdoMY855SdgrpmTi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5286.846472484459, + "y": 5083.335385296095, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 982701882, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5212, + "versionNonce": 1517982166, + "isDeleted": false, + "id": "Rf7e032SPaYOjtuHI1wAR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5030.809140025255, + "y": 5060.520527049357, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 236245350, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5284, + "versionNonce": 227581578, + "isDeleted": false, + "id": "B6GHi4N8cq2f15EqpHMI4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5030.8812554098695, + "y": 5075.489126808972, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 661118970, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5340, + "versionNonce": 1211492118, + "isDeleted": false, + "id": "wXR4Uczr_MUPJkpgpORoN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5031.298923679102, + "y": 5092.337083539742, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1266791590, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3544, + "versionNonce": 1808809290, + "isDeleted": false, + "id": "1sMq6z7ZkoSEJRCz80iZ8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5098.503951723971, + "y": 5091.269699414574, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1847447738, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3660, + "versionNonce": 643077206, + "isDeleted": false, + "id": "ybCDCiRsLret0sjmXwlWv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5098.790883542151, + "y": 5105.049528960029, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1743794150, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3669, + "versionNonce": 103678986, + "isDeleted": false, + "id": "qoiubAVC7eR9b42UZSg-W", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5098.815823445999, + "y": 5118.219000113873, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1918347642, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5336, + "versionNonce": 1051433366, + "isDeleted": false, + "id": "Cm4qHccRS_vB5vAbeOYlN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5030.289308294485, + "y": 5011.233759129776, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1064125222, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5408, + "versionNonce": 111473354, + "isDeleted": false, + "id": "Pp234yKhjNOpz_PIuQVmW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5030.3614236791, + "y": 5026.202358889392, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 727214650, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5467, + "versionNonce": 1483732694, + "isDeleted": false, + "id": "-WrAzdrn4asKMJg4ntry_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5030.779091948332, + "y": 5043.050315620161, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 610659942, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ivpUh5nfWVWUrUgAB2g2v", + "type": "arrow" + } + ], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5457, + "versionNonce": 533727626, + "isDeleted": false, + "id": "BC0vsLPFazAhCKSOhFqmA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5030.597301082948, + "y": 4979.179805861384, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 805507834, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5529, + "versionNonce": 204909590, + "isDeleted": false, + "id": "3VXf8qlOgPVs6WkHIgr5I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5030.669416467564, + "y": 4994.148405620999, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 329724326, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5647, + "versionNonce": 2028619850, + "isDeleted": false, + "id": "bZpJSz7lgKHUHpYh6nGWp", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 5209.0146760799125, + "y": 5292.019645058646, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.9249131944446, + "height": 135.7498163728636, + "seed": 1121625018, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3883, + "versionNonce": 401914198, + "isDeleted": false, + "id": "X1WR5AL4cr4r34tpg3Q0y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5225.867897186064, + "y": 5302.583104927771, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 126, + "height": 25, + "seed": 1750994150, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary index", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary index" + }, + { + "type": "rectangle", + "version": 5350, + "versionNonce": 432975626, + "isDeleted": false, + "id": "0zIxRwoKAIBDyo5qs7IP0", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 5025.914240382797, + "y": 5241.805327149992, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.4799011752141, + "height": 226.56336805555574, + "seed": 1577196666, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "YPRe37mSkziXzuMT2QDAL", + "type": "arrow" + } + ], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3789, + "versionNonce": 855580310, + "isDeleted": false, + "id": "Cvs3bojJManol8p-wTlCP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5069.467667532905, + "y": 5254.024436057578, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 77, + "height": 25, + "seed": 269975590, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table 2", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "table 2" + }, + { + "type": "rectangle", + "version": 5484, + "versionNonce": 1459109322, + "isDeleted": false, + "id": "VN8VJ9grJJsp7yZGfuHPy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5213.981628506826, + "y": 5340.086731943116, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1060928826, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5556, + "versionNonce": 1644878806, + "isDeleted": false, + "id": "v82tcY7elmSAM5_ZYqLPo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5214.053743891441, + "y": 5355.055331702732, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1052805990, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5609, + "versionNonce": 1031926922, + "isDeleted": false, + "id": "Pg5dyBUXpmy3HU0ilPgxe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5214.471412160672, + "y": 5371.903288433501, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1944897018, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3824, + "versionNonce": 1261236502, + "isDeleted": false, + "id": "98nt9qVI2nY-Dg5jsi5iS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5287.676440205541, + "y": 5370.835904308335, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 581316262, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3940, + "versionNonce": 2133250890, + "isDeleted": false, + "id": "OQJ5OY5e230uv8orsxkjL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5287.963372023722, + "y": 5384.615733853789, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1695938234, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3949, + "versionNonce": 165305942, + "isDeleted": false, + "id": "g6C4lauzU6usffrhgkuNM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5287.988311927569, + "y": 5397.785205007634, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 410348006, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5506, + "versionNonce": 1581373962, + "isDeleted": false, + "id": "EStQ4RG89UnKVpJfoZwwR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5031.950979468365, + "y": 5374.970346760896, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1666912122, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5578, + "versionNonce": 48767894, + "isDeleted": false, + "id": "psXaM7_bfMep8A3LN_IPE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5032.023094852981, + "y": 5389.938946520511, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1597717798, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5631, + "versionNonce": 432933066, + "isDeleted": false, + "id": "BAv03uyO1eK-S8dKdz0wC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5032.440763122213, + "y": 5406.786903251281, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 855576634, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3838, + "versionNonce": 948650198, + "isDeleted": false, + "id": "ZMdl_Q6iIkPYxYYTowK6M", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5099.645791167082, + "y": 5405.719519126113, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1281665126, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3954, + "versionNonce": 1499881354, + "isDeleted": false, + "id": "7nAmA1UmaJv-_a4AIKheu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5099.932722985262, + "y": 5419.499348671568, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 400881914, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3963, + "versionNonce": 509130262, + "isDeleted": false, + "id": "BjpnokBLmhOHrWfgUjTNJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5099.95766288911, + "y": 5432.668819825412, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 2143202214, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5630, + "versionNonce": 424009290, + "isDeleted": false, + "id": "SL38jWA2VOo8lHqmH289E", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5031.431147737596, + "y": 5325.6835788413155, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1636813242, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5702, + "versionNonce": 1833272150, + "isDeleted": false, + "id": "PRejrF9jNuuRo6zxQr95u", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5031.503263122211, + "y": 5340.652178600931, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 393627366, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5761, + "versionNonce": 373785866, + "isDeleted": false, + "id": "Wmqus0uLs61cm6k19ksMF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5031.920931391443, + "y": 5357.5001353317, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1998750330, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "5YGvoDE58PCeFAbhdoGmz", + "type": "arrow" + } + ], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5751, + "versionNonce": 2007410838, + "isDeleted": false, + "id": "xnvdUC0l4PylvfPzxruWO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5031.739140526059, + "y": 5293.629625572923, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1679325734, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5823, + "versionNonce": 971396042, + "isDeleted": false, + "id": "rUSEXSklj4q3yXijW3bfv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5031.811255910674, + "y": 5308.598225332538, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1667244858, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2807, + "versionNonce": 2100372950, + "isDeleted": false, + "id": "WnLuqtvs94DN9SJdfunTP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5036.662591911906, + "y": 4868.960600587494, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 334, + "height": 50, + "seed": 479348070, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table with primary index \noptimized for filtering on UserID ", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "table with primary index \noptimized for filtering on UserID " + }, + { + "type": "text", + "version": 2905, + "versionNonce": 104680074, + "isDeleted": false, + "id": "YAaev0dZzgo9PGOVvqh1V", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5046.175938266072, + "y": 5475.21320475416, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 303, + "height": 50, + "seed": 1621863418, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table with primary index \noptimized for filtering on URL ", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "table with primary index \noptimized for filtering on URL " + }, + { + "type": "text", + "version": 3836, + "versionNonce": 2130311958, + "isDeleted": false, + "id": "z4roqsMad3AywYxe7c-kd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5057.330343648019, + "y": 7264.175498590968, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 303, + "height": 50, + "seed": 305178790, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "hidden table with primary index\noptimized for filtering on URL ", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "hidden table with primary index\noptimized for filtering on URL " + }, + { + "type": "text", + "version": 6447, + "versionNonce": 34040138, + "isDeleted": false, + "id": "jgLZ4IFyCCw9GbBpfpJUt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4821.35477321151, + "y": 6961.354845069147, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 261, + "height": 40, + "seed": 1695030458, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse automatically choses \nthe most effective table version", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse automatically choses \nthe most effective table version" + }, + { + "type": "rectangle", + "version": 5695, + "versionNonce": 326510678, + "isDeleted": false, + "id": "H9-92dARAD-yU-G-kzREU", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 5211.823034632166, + "y": 6762.724974776669, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.9249131944446, + "height": 135.7498163728636, + "seed": 1688249318, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728741, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3931, + "versionNonce": 614445066, + "isDeleted": false, + "id": "xjX0TvMQuASlXBesKaGE0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5228.659514666889, + "y": 6773.288434645794, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 126, + "height": 25, + "seed": 773354874, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary index", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary index" + }, + { + "type": "rectangle", + "version": 5423, + "versionNonce": 981118358, + "isDeleted": false, + "id": "8cgc9w6f-UhmPaby7LiOV", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 5028.722598935053, + "y": 6712.510656868017, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.4799011752141, + "height": 226.56336805555574, + "seed": 904869670, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "a1HyqPD6QQTt6pbXbIYXq", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3847, + "versionNonce": 1107369674, + "isDeleted": false, + "id": "XTY7e8Y9Pgq9nEXrZqnc7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5080.27602608516, + "y": 6724.729765775603, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 53, + "height": 25, + "seed": 1293923898, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "table" + }, + { + "type": "rectangle", + "version": 5532, + "versionNonce": 826051286, + "isDeleted": false, + "id": "9O_m7kapNjWzk495xF7sF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5216.78998705908, + "y": 6810.792061661141, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1586061926, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5604, + "versionNonce": 1992734090, + "isDeleted": false, + "id": "qdCJEat5zfPIJ_YaygBV6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5216.862102443695, + "y": 6825.760661420754, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 855695098, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5657, + "versionNonce": 1179697174, + "isDeleted": false, + "id": "v9kThuT_1RwLZWYdJh5R_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5217.2797707129275, + "y": 6842.608618151524, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 557589926, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3872, + "versionNonce": 338392138, + "isDeleted": false, + "id": "InrkM6S2fYIeevqqsyPx8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5290.484798757797, + "y": 6841.541234026357, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1010757562, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3988, + "versionNonce": 766266710, + "isDeleted": false, + "id": "mR67NC7dvys-Ocx9pVKHD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5290.771730575977, + "y": 6855.321063571813, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1597276390, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3997, + "versionNonce": 202005258, + "isDeleted": false, + "id": "j_521rMuc7ss2mjRBoPS6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5290.796670479825, + "y": 6868.490534725657, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1023207546, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5554, + "versionNonce": 1420046998, + "isDeleted": false, + "id": "OGZ0rmTBhLuxJ2XhSmX_W", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5034.759338020621, + "y": 6845.675676478921, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1275032614, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5626, + "versionNonce": 1558079946, + "isDeleted": false, + "id": "PcyLwOcAd82NSRaC2rPwQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5034.831453405235, + "y": 6860.644276238534, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 217958714, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5679, + "versionNonce": 904753110, + "isDeleted": false, + "id": "Sn6OR2U2VX1sEh7j4jtex", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5035.2491216744675, + "y": 6877.492232969304, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 562691942, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3886, + "versionNonce": 2109907082, + "isDeleted": false, + "id": "ObTDWxkhGxQnvtAcCTo5H", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5102.454149719337, + "y": 6876.424848844137, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 329552378, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4002, + "versionNonce": 765265174, + "isDeleted": false, + "id": "Gcr4Wd7aDS9IfjpPI6_sg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5102.741081537517, + "y": 6890.204678389591, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1411457702, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4011, + "versionNonce": 1248984906, + "isDeleted": false, + "id": "Mh34Wvp_lWv2QF-NEzyzx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5102.7660214413645, + "y": 6903.374149543437, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1408516794, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5678, + "versionNonce": 1294463574, + "isDeleted": false, + "id": "vbMOrTfCcCzxN79jFsoby", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5034.23950628985, + "y": 6796.38890855934, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1181867494, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5750, + "versionNonce": 1866958346, + "isDeleted": false, + "id": "ezF4F0qJ54blYFHpcOkhb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5034.311621674466, + "y": 6811.3575083189535, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 2022693754, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5808, + "versionNonce": 795031446, + "isDeleted": false, + "id": "AwO5g4fd338CZBjv2PilL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5034.729289943698, + "y": 6828.205465049723, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 2106143014, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "BrO3BBILYAphiNG5IB4dO", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5799, + "versionNonce": 1430140106, + "isDeleted": false, + "id": "2Yjdgjaw1sn_iuEnaAGL6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5034.547499078314, + "y": 6764.334955290946, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1606048826, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5876, + "versionNonce": 1283708118, + "isDeleted": false, + "id": "jcChYC29vf5fyXnUh2EUd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5034.619614462929, + "y": 6779.303555050563, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1423187046, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "rtZMNuAtAXbzldr7ItEr4", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5983, + "versionNonce": 233900938, + "isDeleted": false, + "id": "HwXdDaFmCWId70Jeh6GTC", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 5212.964874075277, + "y": 7080.174794488208, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.9249131944446, + "height": 135.7498163728636, + "seed": 659997946, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4218, + "versionNonce": 1310640662, + "isDeleted": false, + "id": "YoF5qPVhSTDsgzP1TK8pH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5229.622782681429, + "y": 7090.738254357333, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 126, + "height": 25, + "seed": 840933286, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary index", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary index" + }, + { + "type": "rectangle", + "version": 5683, + "versionNonce": 1067125322, + "isDeleted": false, + "id": "l7M0RdL4_C1h4nJItQSqS", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 5029.864438378163, + "y": 7029.960476579556, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.4799011752141, + "height": 226.56336805555574, + "seed": 954734010, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "a1HyqPD6QQTt6pbXbIYXq", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4194, + "versionNonce": 1663637334, + "isDeleted": false, + "id": "iW5b2kmSijlyaaSk1nIuc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5049.41786552827, + "y": 7042.374897987142, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 120, + "height": 25, + "seed": 966310630, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ZA4thJKPNw7H3CWK6qmss", + "type": "arrow" + }, + { + "id": "a1HyqPD6QQTt6pbXbIYXq", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "hidden table", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "hidden table" + }, + { + "type": "rectangle", + "version": 5820, + "versionNonce": 286732554, + "isDeleted": false, + "id": "Gi029rIZB4NPSknEpVB2I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5217.931826502191, + "y": 7128.24188137268, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1435586170, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5892, + "versionNonce": 335002774, + "isDeleted": false, + "id": "Sqeq26qPt7ATXx7h2s1MG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5218.003941886806, + "y": 7143.210481132293, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 30174758, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5945, + "versionNonce": 367034314, + "isDeleted": false, + "id": "M5wMZO35nQ_DrutzLhizo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5218.421610156037, + "y": 7160.058437863063, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 571830074, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4160, + "versionNonce": 373275094, + "isDeleted": false, + "id": "6nGEbve45UR3dcCOUb5ys", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5291.626638200906, + "y": 7158.991053737896, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1202174310, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4276, + "versionNonce": 974255754, + "isDeleted": false, + "id": "L12TUJzaKTdrJPSKJcCrB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5291.913570019086, + "y": 7172.770883283352, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 852981754, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4285, + "versionNonce": 555093782, + "isDeleted": false, + "id": "JsLbKQV-DNd3ibR-8ZH81", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5291.938509922934, + "y": 7185.940354437196, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 578264230, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5842, + "versionNonce": 778474826, + "isDeleted": false, + "id": "uhM58HqEFaqnYdzqia8gG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5035.901177463731, + "y": 7163.12549619046, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 400189626, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5914, + "versionNonce": 1089453142, + "isDeleted": false, + "id": "QZ-WA8n8i4X_YHr5IcB1K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5035.973292848346, + "y": 7178.094095950073, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 938022886, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5967, + "versionNonce": 1413045258, + "isDeleted": false, + "id": "xHkflXD8fa8_fa_IjepEc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5036.390961117579, + "y": 7194.942052680843, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1757495674, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4174, + "versionNonce": 732021142, + "isDeleted": false, + "id": "poJmGPIPSS1GZ8BzyvcFB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5103.595989162448, + "y": 7193.874668555676, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1879649062, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4290, + "versionNonce": 696601290, + "isDeleted": false, + "id": "3VwxZauqDL2wukPV3uJlj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5103.882920980628, + "y": 7207.65449810113, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1355743802, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4299, + "versionNonce": 341909206, + "isDeleted": false, + "id": "HbpOrR7LKW-D0XjUmFV7F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5103.907860884476, + "y": 7220.823969254976, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 692377190, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5966, + "versionNonce": 887447946, + "isDeleted": false, + "id": "XEJfSsiwXvfT6BISvXBK-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5035.381345732962, + "y": 7113.838728270879, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 451324666, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6038, + "versionNonce": 2143474710, + "isDeleted": false, + "id": "ci-QNFS2Oubbcw5fe1EgU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5035.453461117577, + "y": 7128.8073280304925, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1818827174, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6094, + "versionNonce": 1905565770, + "isDeleted": false, + "id": "Q8BXvttUcHsJNorvW3Fos", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5035.871129386809, + "y": 7145.655284761262, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1032534970, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6087, + "versionNonce": 398188886, + "isDeleted": false, + "id": "4cBNxbPV_Q7om5qvgFwod", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5035.689338521424, + "y": 7081.784775002485, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 547550438, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6159, + "versionNonce": 997066506, + "isDeleted": false, + "id": "h-9lPf5v9yxY-55UzfDKR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5035.76145390604, + "y": 7096.753374762102, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1725936762, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2727, + "versionNonce": 2141275798, + "isDeleted": false, + "id": "QnhXGIS1o6o8kW46TO5Iu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5037.854977407272, + "y": 6655.30455210039, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 334, + "height": 50, + "seed": 1065314342, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table with primary index \noptimized for filtering on UserID ", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "table with primary index \noptimized for filtering on UserID " + }, + { + "type": "text", + "version": 2953, + "versionNonce": 988583370, + "isDeleted": false, + "id": "knCJW9EkedIpL2EGasu9E", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4715.080312646039, + "y": 5018.844637665867, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 188, + "height": 50, + "seed": 145167674, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ivpUh5nfWVWUrUgAB2g2v", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Query \nfiltering on UserID", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query \nfiltering on UserID" + }, + { + "type": "text", + "version": 3113, + "versionNonce": 673711062, + "isDeleted": false, + "id": "a8yNE7MnBj2vetggnDZDs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4735.486190622229, + "y": 5326.114602943644, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 156, + "height": 50, + "seed": 149648230, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Query\nfiltering on URL", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query\nfiltering on URL" + }, + { + "type": "text", + "version": 3408, + "versionNonce": 1361792138, + "isDeleted": false, + "id": "GgUuZsspv3Y7w-9kvFsnp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4715.031701534932, + "y": 6740.879793915876, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 188, + "height": 50, + "seed": 1682202106, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "rtZMNuAtAXbzldr7ItEr4", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Query \nfiltering on UserID", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query \nfiltering on UserID" + }, + { + "type": "text", + "version": 3527, + "versionNonce": 593828118, + "isDeleted": false, + "id": "nnZpsoyE7Rt169VhAEYFj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4734.924930701598, + "y": 6889.905835582542, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 156, + "height": 50, + "seed": 926160550, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Query\nfiltering on URL", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query\nfiltering on URL" + }, + { + "type": "text", + "version": 3381, + "versionNonce": 65350474, + "isDeleted": false, + "id": "GxqNrQTVg8Rn5sTTShN3R", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4713.37545153492, + "y": 5159.043298380158, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 190, + "height": 75, + "seed": 381324986, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "q9WkxkAiDiOyfybt6ABuP", + "type": "arrow" + }, + { + "id": "YPRe37mSkziXzuMT2QDAL", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Insert statements\n(need to be routed\nto both tables) ", + "baseline": 68, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Insert statements\n(need to be routed\nto both tables) " + }, + { + "type": "text", + "version": 3847, + "versionNonce": 2026735190, + "isDeleted": false, + "id": "ir1pOdj2fKMP6hx9mMZKm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4720.86373278492, + "y": 6833.533067725393, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 187, + "height": 25, + "seed": 856052198, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "BrO3BBILYAphiNG5IB4dO", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Insert statements", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Insert statements" + }, + { + "type": "arrow", + "version": 722, + "versionNonce": 1769288202, + "isDeleted": false, + "id": "ivpUh5nfWVWUrUgAB2g2v", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4907.654097368249, + "y": 5045.85294209377, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 118.87834821428578, + "height": 0.11806745524609141, + "seed": 615294842, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "knCJW9EkedIpL2EGasu9E", + "focus": 0.07613332501017665, + "gap": 5.0737847222098935 + }, + "endBinding": { + "elementId": "-WrAzdrn4asKMJg4ntry_", + "focus": 0.32933805427905405, + "gap": 4.246646365797915 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 118.87834821428578, + 0.11806745524609141 + ] + ] + }, + { + "type": "arrow", + "version": 892, + "versionNonce": 2033601430, + "isDeleted": false, + "id": "5YGvoDE58PCeFAbhdoGmz", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4909.254543796819, + "y": 5354.3346794008285, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 117.09484857946109, + "height": 0.18038529274963366, + "seed": 1198466342, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "1r43Bj6XLcqQ-XFO_f5xe", + "focus": 0.015542030223939405, + "gap": 1.0791170634888658 + }, + "endBinding": { + "elementId": "Wmqus0uLs61cm6k19ksMF", + "focus": 1.7254661610668003, + "gap": 5.571539015163125 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 117.09484857946109, + -0.18038529274963366 + ] + ] + }, + { + "type": "arrow", + "version": 1439, + "versionNonce": 349593802, + "isDeleted": false, + "id": "rtZMNuAtAXbzldr7ItEr4", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4909.716597368252, + "y": 6769.83586134637, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 116.33534957931579, + "height": 0.04513131541943949, + "seed": 106801210, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "GgUuZsspv3Y7w-9kvFsnp", + "focus": 0.1595735658798593, + "gap": 7.184895833320297 + }, + "endBinding": { + "elementId": "jcChYC29vf5fyXnUh2EUd", + "focus": 3.097189479823459, + "gap": 9.512825019611682 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 116.33534957931579, + -0.04513131541943949 + ] + ] + }, + { + "type": "arrow", + "version": 1851, + "versionNonce": 315910358, + "isDeleted": false, + "id": "ZA4thJKPNw7H3CWK6qmss", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4909.934231296824, + "y": 6919.788238970294, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 185.43578360246693, + "height": 112.20982142857156, + "seed": 1440452710, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "LAlitqCgryfRePyezvtKD", + "focus": 0.08732103170904873, + "gap": 3.2721974206347113 + }, + "endBinding": { + "elementId": "iW5b2kmSijlyaaSk1nIuc", + "focus": -0.21080484532050084, + "gap": 13.412700797473008 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 136.64732142857156, + -3.035863209197032 + ], + [ + 181.11160714285734, + 20.970833219374526 + ], + [ + 185.43578360246693, + 109.17395821937453 + ] + ] + }, + { + "type": "arrow", + "version": 1460, + "versionNonce": 27506570, + "isDeleted": false, + "id": "BrO3BBILYAphiNG5IB4dO", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4917.263472368252, + "y": 6847.113728601762, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 114.3568193558458, + "height": 2.513077009440167, + "seed": 867209466, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "ir1pOdj2fKMP6hx9mMZKm", + "focus": 0.22978675597423878, + "gap": 9.89973958333212 + }, + "endBinding": { + "elementId": "AwO5g4fd338CZBjv2PilL", + "focus": -1.6534824753822683, + "gap": 7.378101630983565 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 114.3568193558458, + -2.513077009440167 + ] + ] + }, + { + "type": "arrow", + "version": 1357, + "versionNonce": 624746006, + "isDeleted": false, + "id": "a1HyqPD6QQTt6pbXbIYXq", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 5153.7392713591935, + "y": 6940.865098975384, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 1.803003594184247, + "height": 80.65830920237954, + "seed": 169382822, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "fQQTRB6f9JAFiiAR4CF41", + "focus": 1.108065294804133, + "gap": 13.813449520963331 + }, + "endBinding": { + "focus": 0.581822592016921, + "gap": 8.437068401791521, + "elementId": "l7M0RdL4_C1h4nJItQSqS" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1.803003594184247, + 80.65830920237954 + ] + ] + }, + { + "type": "rectangle", + "version": 5999, + "versionNonce": 1586762, + "isDeleted": false, + "id": "dhsCL-WWAogv32Mqm6WBU", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 4716.861177804092, + "y": 6233.620972659004, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 189.53819444444457, + "height": 65.4920038728636, + "seed": 807952826, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "gw5xntt9h-7rsAez4s0Ml", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5838, + "versionNonce": 1432660822, + "isDeleted": false, + "id": "7iiH088Pasev93wHj4vXa", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 40, + "angle": 0, + "x": 4709.868711286235, + "y": 5894.708770278052, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 195.89980158730228, + "height": 65.4920038728636, + "seed": 240332518, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5356, + "versionNonce": 554622218, + "isDeleted": false, + "id": "lFYRZqqGriUI3TzI2RxBj", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 5205.096782152008, + "y": 5882.965674181432, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.9249131944446, + "height": 135.7498163728636, + "seed": 384309882, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3594, + "versionNonce": 1637929110, + "isDeleted": false, + "id": "x_1It5ZQiKdqe0t1v7HJP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5222.933262186731, + "y": 5893.5291340505555, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 126, + "height": 25, + "seed": 1058562598, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary index", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary index" + }, + { + "type": "rectangle", + "version": 5059, + "versionNonce": 570600394, + "isDeleted": false, + "id": "j4GphQ4O53Yv2OLWnzcwu", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 5021.996346454893, + "y": 5832.985731272778, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.4799011752141, + "height": 226.56336805555574, + "seed": 649247546, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3510, + "versionNonce": 1973833174, + "isDeleted": false, + "id": "9d6pZ7VekDL_1Umh9ZhD2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5075.549773605, + "y": 5845.36760059703, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 53, + "height": 25, + "seed": 1599417702, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "table" + }, + { + "type": "rectangle", + "version": 5193, + "versionNonce": 1494131338, + "isDeleted": false, + "id": "Ug5-6jMlziPE7KlLZt7P5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5210.063734578922, + "y": 5931.032761065902, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1307263994, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5265, + "versionNonce": 2122982166, + "isDeleted": false, + "id": "9YWnbuASwPAi_zkmDMmAW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5210.135849963535, + "y": 5946.001360825518, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1280741542, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5318, + "versionNonce": 552452426, + "isDeleted": false, + "id": "qnE4bQlYfawMEGgh2OY18", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5210.553518232768, + "y": 5962.849317556287, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 915715258, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3533, + "versionNonce": 2126598230, + "isDeleted": false, + "id": "jDNpI0bUih9426fVx07o7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5283.758546277637, + "y": 5961.781933431119, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 835292134, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3649, + "versionNonce": 1157302282, + "isDeleted": false, + "id": "cGcqOwjor5ufmvAraQ7sQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5284.045478095817, + "y": 5975.561762976573, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1381109114, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3658, + "versionNonce": 1646318998, + "isDeleted": false, + "id": "JepxNViHCjsekmVEMp5Q2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5284.070417999665, + "y": 5988.731234130419, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1035673382, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5215, + "versionNonce": 1831958218, + "isDeleted": false, + "id": "QIWTwDFrgSwSHMMfez5CL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5028.033085540461, + "y": 5965.91637588368, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1717980730, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5287, + "versionNonce": 1373483734, + "isDeleted": false, + "id": "qwBKiClh-AlsLUCbcQuHM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5028.105200925076, + "y": 5980.884975643297, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1419266662, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5346, + "versionNonce": 170659210, + "isDeleted": false, + "id": "amuG-2Bi4eUTXQaPeeaqi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5028.522869194308, + "y": 5997.732932374067, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 397702906, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "_1LCD99pxoxMTc9Gv9tPw", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3547, + "versionNonce": 143452182, + "isDeleted": false, + "id": "r2ilPv2y3GVkc6nPKYViK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5095.727897239178, + "y": 5996.665548248899, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1160646054, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3663, + "versionNonce": 1092996170, + "isDeleted": false, + "id": "apxGn4YL5D_6BLm8vavQv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5096.014829057358, + "y": 6010.445377794353, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1992263610, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3672, + "versionNonce": 639858006, + "isDeleted": false, + "id": "bY8n13qkDp7fFAeYjsjW7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5096.0397689612055, + "y": 6023.614848948198, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 2091477222, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5339, + "versionNonce": 1475982090, + "isDeleted": false, + "id": "dN9FJXVy7W-pqH3-1Vrql", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5027.513253809691, + "y": 5916.6296079641, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 195723386, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5414, + "versionNonce": 66476694, + "isDeleted": false, + "id": "bd-leMKBGUVF9w9vSg7kO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5027.585369194307, + "y": 5931.598207723717, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 982998054, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ip87GtGCCgviSwQ-vUlo9", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5470, + "versionNonce": 555925962, + "isDeleted": false, + "id": "B9DSJ_woMyRj5DDF275W9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5028.003037463539, + "y": 5948.4461644544845, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1647862074, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5460, + "versionNonce": 146446294, + "isDeleted": false, + "id": "BXCgf1G14uSA0AxcNqwLD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5027.821246598154, + "y": 5884.575654695709, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1155852134, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5532, + "versionNonce": 1740372106, + "isDeleted": false, + "id": "-DMZZU1w-QHjPpCiENkB6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5027.893361982769, + "y": 5899.544254455324, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 365701626, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5849, + "versionNonce": 2089102614, + "isDeleted": false, + "id": "uqcmhOPyyQ5qJ1PXWPfh1", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 5208.238621595119, + "y": 6201.415493892971, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.9249131944446, + "height": 135.7498163728636, + "seed": 467602086, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4083, + "versionNonce": 1535137610, + "isDeleted": false, + "id": "vpB42ooStFglhTsSSNgnp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5227.075101629842, + "y": 6211.9789537620945, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 126, + "height": 25, + "seed": 1567152826, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary index", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary index" + }, + { + "type": "rectangle", + "version": 5551, + "versionNonce": 1556814422, + "isDeleted": false, + "id": "90jMqh8wwpPQdUx4XqPSt", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 5025.138185898004, + "y": 6151.201175984317, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 160.4799011752141, + "height": 226.56336805555574, + "seed": 775079398, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "jIZfRkvBm-8h6YG1lOMd7", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4060, + "versionNonce": 2093669898, + "isDeleted": false, + "id": "PfztNZLH6JXrlH0SXGzSv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5031.691613048111, + "y": 6163.420284891903, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 150, + "height": 25, + "seed": 397505402, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "implicit table 2", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "implicit table 2" + }, + { + "type": "rectangle", + "version": 5686, + "versionNonce": 811687830, + "isDeleted": false, + "id": "yeornJi9LN5bM4-uKWVj1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5213.205574022033, + "y": 6249.482580777441, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 216865062, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5759, + "versionNonce": 144084170, + "isDeleted": false, + "id": "nxk7EvK1h3kQ3BjzKFgJ1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5213.5589394066465, + "y": 6265.302743037057, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1458107450, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5811, + "versionNonce": 1534917846, + "isDeleted": false, + "id": "1T-TD8047KdDHWcyMbBGP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5213.695357675879, + "y": 6281.299137267826, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 528155750, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4026, + "versionNonce": 1686004618, + "isDeleted": false, + "id": "-5QQ-Qz6Z3_KDrdT2j0Sb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5286.900385720748, + "y": 6280.231753142658, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1827822842, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4142, + "versionNonce": 1941107222, + "isDeleted": false, + "id": "MaU_kjWk8T7JULQy2mUMu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5287.187317538928, + "y": 6294.011582688112, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1470728102, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4151, + "versionNonce": 180183626, + "isDeleted": false, + "id": "u6E86cflJSTgLupHLb5EM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5287.212257442776, + "y": 6307.181053841958, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 2001776058, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5708, + "versionNonce": 335036246, + "isDeleted": false, + "id": "KBaBMm86mJ7A-qq0YhMsB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5031.174924983572, + "y": 6284.366195595219, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1705353958, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5780, + "versionNonce": 1982761226, + "isDeleted": false, + "id": "IB6DxVd2Yzsi-oOs3fid7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5031.247040368187, + "y": 6299.334795354836, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1797711482, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5833, + "versionNonce": 815916182, + "isDeleted": false, + "id": "XCU17JiK2OeNwhGfV8QGW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5031.66470863742, + "y": 6316.182752085606, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1811699238, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4040, + "versionNonce": 239917002, + "isDeleted": false, + "id": "sjJcIPPkr0b9MSWJwew5H", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5098.869736682289, + "y": 6315.115367960438, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 557319994, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4156, + "versionNonce": 1801773526, + "isDeleted": false, + "id": "5h-dG2Jx_c5dAtdr4M_m-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5099.156668500469, + "y": 6328.895197505892, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 865771878, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4165, + "versionNonce": 322129546, + "isDeleted": false, + "id": "rOYRrV6ng7KV7c9pWWCOe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5099.181608404317, + "y": 6342.064668659737, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1642532858, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5832, + "versionNonce": 1733703446, + "isDeleted": false, + "id": "fr65sy7nU8d9ngUOtXrTG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5030.6550932528025, + "y": 6235.079427675639, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1607304358, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5904, + "versionNonce": 161279306, + "isDeleted": false, + "id": "0nLNN0XFcmW_9ZA1qf5dm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5030.727208637418, + "y": 6250.048027435256, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1899430074, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5965, + "versionNonce": 485155926, + "isDeleted": false, + "id": "LsWUbnyYTmZ6nClojEWer", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5031.14487690665, + "y": 6266.8959841660235, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 574750694, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Urj7GRImtQ-_jf8kXKei0", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5955, + "versionNonce": 652522506, + "isDeleted": false, + "id": "sOemb4C3A2lmqcofw2qk3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5030.963086041265, + "y": 6203.025474407248, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 449501562, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6025, + "versionNonce": 771221910, + "isDeleted": false, + "id": "bcQ286_2M0pyhNne5ZOYE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "angle": 0, + "x": 5031.035201425881, + "y": 6217.994074166863, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 149.660629734849, + "height": 9.017084911615706, + "seed": 1862603558, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2820, + "versionNonce": 1023779530, + "isDeleted": false, + "id": "PYv0E33Pd-h7JoEbtQ67u", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5030.886537427112, + "y": 5776.356449421819, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 334, + "height": 50, + "seed": 1038457402, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "table with primary index \noptimized for filtering on UserID ", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "table with primary index \noptimized for filtering on UserID " + }, + { + "type": "text", + "version": 2978, + "versionNonce": 967984854, + "isDeleted": false, + "id": "KfzwR1lDMYxxfF7eN-N9i", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4714.304258161244, + "y": 5900.240486500192, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 188, + "height": 50, + "seed": 813940326, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ip87GtGCCgviSwQ-vUlo9", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Query \nfiltering on UserID", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query \nfiltering on UserID" + }, + { + "type": "text", + "version": 3091, + "versionNonce": 647674250, + "isDeleted": false, + "id": "yVw-kXVIuCTqAxMdBUYVP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4733.710136137435, + "y": 6238.510451777969, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 156, + "height": 50, + "seed": 1500136186, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Query\nfiltering on URL", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Query\nfiltering on URL" + }, + { + "type": "rectangle", + "version": 5544, + "versionNonce": 816774166, + "isDeleted": false, + "id": "tu8pRySDLpojlW2kZi8Wb", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 4944.616155709221, + "y": 6150.51421851904, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 49.38615117521417, + "height": 226.56336805555574, + "seed": 2072707494, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Urj7GRImtQ-_jf8kXKei0", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4161, + "versionNonce": 853473354, + "isDeleted": false, + "id": "h9obGfxVtHD68frZ1DS5F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 1.5685749593264884, + "x": 4881.286904479649, + "y": 6250.4677763132, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 170, + "height": 25, + "seed": 400282554, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "gw5xntt9h-7rsAez4s0Ml", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Materialized View", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Materialized View" + }, + { + "type": "arrow", + "version": 756, + "versionNonce": 685967702, + "isDeleted": false, + "id": "Urj7GRImtQ-_jf8kXKei0", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4997.106106296828, + "y": 6266.246491021739, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 29.717785951007045, + "height": 0.013766459125690744, + "seed": 1128783078, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "tu8pRySDLpojlW2kZi8Wb", + "focus": 0.021744171490670924, + "gap": 3.1037994123939825 + }, + "endBinding": { + "elementId": "LsWUbnyYTmZ6nClojEWer", + "focus": 1.14642988531582, + "gap": 4.320984658813813 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 29.717785951007045, + -0.013766459125690744 + ] + ] + }, + { + "type": "text", + "version": 3895, + "versionNonce": 296574730, + "isDeleted": false, + "id": "WK28zDzxGiAzic6FUQG5A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4711.996731296828, + "y": 6006.436527546819, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 187, + "height": 25, + "seed": 1532841082, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "BrO3BBILYAphiNG5IB4dO", + "type": "arrow" + }, + { + "id": "_1LCD99pxoxMTc9Gv9tPw", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Insert statements", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Insert statements" + }, + { + "type": "arrow", + "version": 396, + "versionNonce": 832794262, + "isDeleted": false, + "id": "ip87GtGCCgviSwQ-vUlo9", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4910.246731296828, + "y": 5927.818459313345, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 111.43377177709408, + "height": 1.5849349128602626, + "seed": 222777382, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "KfzwR1lDMYxxfF7eN-N9i", + "focus": 0.04284237201216683, + "gap": 8.442473135583896 + }, + "endBinding": { + "elementId": "bd-leMKBGUVF9w9vSg7kO", + "focus": 0.99680382763453, + "gap": 5.904866120383758 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 111.43377177709408, + 1.5849349128602626 + ] + ] + }, + { + "type": "arrow", + "version": 362, + "versionNonce": 1065414090, + "isDeleted": false, + "id": "_1LCD99pxoxMTc9Gv9tPw", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4912.324856296828, + "y": 6016.470300982066, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 107.91939955055614, + "height": 0.01622560595296818, + "seed": 1236380986, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "WK28zDzxGiAzic6FUQG5A", + "focus": -0.19836116131514064, + "gap": 13.828125 + }, + "endBinding": { + "elementId": "amuG-2Bi4eUTXQaPeeaqi", + "focus": -3.1544689506849837, + "gap": 9.736509302336799 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 107.91939955055614, + 0.01622560595296818 + ] + ] + }, + { + "type": "arrow", + "version": 303, + "versionNonce": 665136086, + "isDeleted": false, + "id": "gw5xntt9h-7rsAez4s0Ml", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4908.542629734328, + "y": 6264.010680652937, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 35.72613987564637, + "height": 0.9014403207347641, + "seed": 628513638, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "dhsCL-WWAogv32Mqm6WBU", + "focus": -0.13665233604385063, + "gap": 2.1432574857913096 + }, + "endBinding": { + "elementId": "h9obGfxVtHD68frZ1DS5F", + "focus": -0.029294096529644393, + "gap": 9.522399646169106 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 35.72613987564637, + 0.9014403207347641 + ] + ] + }, + { + "type": "arrow", + "version": 305, + "versionNonce": 1903469706, + "isDeleted": false, + "id": "q9WkxkAiDiOyfybt6ABuP", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4915.871731296832, + "y": 5180.761193047398, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 109.34244791666697, + "height": 60.05643633391992, + "seed": 1480324602, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "GxqNrQTVg8Rn5sTTShN3R", + "focus": 0.4838734344756022, + "gap": 12.996279761911865 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 109.34244791666697, + -60.05643633391992 + ] + ] + }, + { + "type": "arrow", + "version": 456, + "versionNonce": 150814998, + "isDeleted": false, + "id": "YPRe37mSkziXzuMT2QDAL", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 4917.2844917135, + "y": 5201.932352818856, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 107.62974866929744, + "height": 69.77915843737992, + "seed": 1377959590, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728742, + "link": null, + "locked": false, + "startBinding": { + "elementId": "GxqNrQTVg8Rn5sTTShN3R", + "focus": -0.6603382992041156, + "gap": 14.409040178579744 + }, + "endBinding": { + "elementId": "0zIxRwoKAIBDyo5qs7IP0", + "focus": 0.1857526586548959, + "gap": 1.0000000000004547 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 107.62974866929744, + 69.77915843737992 + ] + ] + }, + { + "type": "text", + "version": 6809, + "versionNonce": 21201738, + "isDeleted": false, + "id": "Hyfv6DYXvvdbsJVck3aJD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 5165.848293796832, + "y": 6067.931319213483, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 222, + "height": 75, + "seed": 1476339386, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "a1HyqPD6QQTt6pbXbIYXq", + "type": "arrow" + }, + { + "id": "jIZfRkvBm-8h6YG1lOMd7", + "type": "arrow" + } + ], + "updated": 1672253728742, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Data is automatically\nkept in sync with \nthe hidden table", + "baseline": 68, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Data is automatically\nkept in sync with \nthe hidden table" + }, + { + "type": "text", + "version": 4019, + "versionNonce": 1226878550, + "isDeleted": false, + "id": "zaNdvwOkdl1eewqZe110O", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4999.969387546829, + "y": 6385.462569213481, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 407, + "height": 50, + "seed": 133642726, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728743, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "implicitly created table with primary index\noptimized for filtering on URL ", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "implicitly created table with primary index\noptimized for filtering on URL " + }, + { + "type": "arrow", + "version": 1289, + "versionNonce": 1497926154, + "isDeleted": false, + "id": "jIZfRkvBm-8h6YG1lOMd7", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 5151.0337561920705, + "y": 6062.734077944899, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 0.09692072858069878, + "height": 85.45114751858819, + "seed": 27148154, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728743, + "link": null, + "locked": false, + "startBinding": { + "elementId": "Hyfv6DYXvvdbsJVck3aJD", + "focus": 1.1385931004955787, + "gap": 15.314537604761426 + }, + "endBinding": { + "elementId": "90jMqh8wwpPQdUx4XqPSt", + "focus": 0.565231736644087, + "gap": 3.015950520829847 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.09692072858069878, + 85.45114751858819 + ] + ] + }, + { + "type": "text", + "version": 6863, + "versionNonce": 618951574, + "isDeleted": false, + "id": "fQQTRB6f9JAFiiAR4CF41", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 5167.052720880157, + "y": 6945.5680379634905, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 222, + "height": 75, + "seed": 503516454, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "a1HyqPD6QQTt6pbXbIYXq", + "type": "arrow" + }, + { + "id": "jIZfRkvBm-8h6YG1lOMd7", + "type": "arrow" + } + ], + "updated": 1672253728743, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Data is automatically\nkept in sync with \nthe hidden table", + "baseline": 68, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Data is automatically\nkept in sync with \nthe hidden table" + }, + { + "type": "text", + "version": 7965, + "versionNonce": 1618917578, + "isDeleted": false, + "id": "wVaNwoEEGopLJzxF5O1HI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 0, + "angle": 0, + "x": 5167.400377130155, + "y": 5164.168298380157, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 222, + "height": 75, + "seed": 22822970, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "a1HyqPD6QQTt6pbXbIYXq", + "type": "arrow" + }, + { + "id": "jIZfRkvBm-8h6YG1lOMd7", + "type": "arrow" + } + ], + "updated": 1672253728743, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Data is automatically\nkept in sync with \nthe hidden table", + "baseline": 68, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Data is automatically\nkept in sync with \nthe hidden table" + }, + { + "type": "rectangle", + "version": 4725, + "versionNonce": 1211883402, + "isDeleted": false, + "id": "_hoczvIT2eHHRo0cEV_k6", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2622.0821419549434, + "y": 4982.051370566501, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 451.64952256944457, + "height": 253.11610243055577, + "seed": 589074940, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3801, + "versionNonce": 1369126422, + "isDeleted": false, + "id": "yWnPMFqnMTso7m7rj39JB", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2919.3833463045835, + "y": 5032.053124782894, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 182.95714962121258, + "seed": 405445572, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4037, + "versionNonce": 292249162, + "isDeleted": false, + "id": "SWwd1_7R7OeffeEFoKfjX", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2645.6463524832657, + "y": 5032.128641654072, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 256.999591503268, + "height": 183.92223011363598, + "seed": 1244721788, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2571, + "versionNonce": 339215190, + "isDeleted": false, + "id": "zgEovkLdgMWixy32BlE2O", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1674.7851890289728, + "y": 4752.093604114574, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 258.90957266803287, + "height": 594.0956012893664, + "seed": 1667924804, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2317, + "versionNonce": 1841104138, + "isDeleted": false, + "id": "G8rlFdVFM8gO1PqduYjG0", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1955.6255205762143, + "y": 4753.090988462556, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 127.02013262761585, + "height": 593.2427235943161, + "seed": 1088766716, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4868, + "versionNonce": 474556566, + "isDeleted": false, + "id": "ui4j85f9Hl6BoX2JI_nrN", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 1528.376997588213, + "y": 4792.816670116261, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 773.2456351692409, + "height": 151.18724556550592, + "seed": 490830532, + "groupIds": [ + "-iggjnNeu56DFGUdItm7I" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5549, + "versionNonce": 111924170, + "isDeleted": false, + "id": "lsI78-QqmdT4q25J4qArV", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1526.433122026239, + "y": 4791.817496358415, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 776.7457386363642, + "height": 154.2443443800131, + "seed": 1841005436, + "groupIds": [ + "-iggjnNeu56DFGUdItm7I" + ], + "roundness": null, + "boundElements": [ + { + "id": "pKrz8kJm0Y7ZGuVeaDwrd", + "type": "arrow" + } + ], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2490, + "versionNonce": 1770235350, + "isDeleted": false, + "id": "TtvBkIM1Pr41kiJC4gPdB", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2100.5256964584873, + "y": 4750.580341265352, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 187.54419978513067, + "height": 596.0708074323217, + "seed": 5079620, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1626, + "versionNonce": 508742282, + "isDeleted": false, + "id": "JObfCT0z6vgeOcvEkHxdg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2118.0920651562315, + "y": 4759.317864954296, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 130, + "height": 25, + "seed": 385201148, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "EventTime.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "EventTime.bin" + }, + { + "type": "text", + "version": 2880, + "versionNonce": 1023179542, + "isDeleted": false, + "id": "OY2lgtj8re-NrT349DVvg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2180.3361701633344, + "y": 5092.32687275589, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 1131190724, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3057, + "versionNonce": 2070735178, + "isDeleted": false, + "id": "XjpWwfRTLR6MlR0s3rfqP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2180.6966720779615, + "y": 5111.100816482749, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 1788204156, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3241, + "versionNonce": 1831381078, + "isDeleted": false, + "id": "C2ZwoBjZwridBaFRivJJL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2180.616443768447, + "y": 5129.875295858197, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 297582916, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 2642, + "versionNonce": 1431646218, + "isDeleted": false, + "id": "l2DVPrwRdU1TUH6rake5X", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1663.104660121451, + "y": 4795.6389726273965, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.3968293978423, + "height": 20.04948308198391, + "seed": 106816764, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1409, + "versionNonce": 970796438, + "isDeleted": false, + "id": "CMfkPVYojz8KbO-evCgPR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2104.1932556324223, + "y": 4797.005612970169, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 43776196, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-18 09:59:01", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-18 09:59:01" + }, + { + "type": "text", + "version": 1775, + "versionNonce": 1074175690, + "isDeleted": false, + "id": "blR0d3xGDcs5iJZPmOzb6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1610.0796335260727, + "y": 4798.00524525664, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 2144331132, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 0", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 1907, + "versionNonce": 542051030, + "isDeleted": false, + "id": "MjzYuYgtw9d1OY-Elg_Fx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2181.810160134835, + "y": 4868.0288231346485, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 296239172, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2023, + "versionNonce": 404501898, + "isDeleted": false, + "id": "5awb-lAQptaSdw4qDzz7e", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2182.097091953017, + "y": 4881.808652680103, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1814943228, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2032, + "versionNonce": 789790742, + "isDeleted": false, + "id": "HUNG6XSM3vC5K_RBAYZAZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2182.1220318568644, + "y": 4894.978123833948, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 381654980, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 2752, + "versionNonce": 1859187786, + "isDeleted": false, + "id": "1KE4ph3pUHqgG0LyGLus4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1663.2774833945111, + "y": 4827.863056208011, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.3340592712975, + "height": 19.900607638888914, + "seed": 1752807036, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1562, + "versionNonce": 1511968086, + "isDeleted": false, + "id": "RWyALgDzDUsAPOjNxPhRn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2104.5169324525937, + "y": 4827.900048538242, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1040187204, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-22 05:55:22", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 05:55:22" + }, + { + "type": "text", + "version": 1921, + "versionNonce": 1979702026, + "isDeleted": false, + "id": "rWsrT2JYBJ-eEwWlY_Wsn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1610.403310346244, + "y": 4830.098775424389, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 39, + "height": 20, + "seed": 561350396, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "rectangle", + "version": 3533, + "versionNonce": 1321644694, + "isDeleted": false, + "id": "B1pa7K8ZW30IK2C2WZowd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1663.3811301484182, + "y": 4860.365857944524, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.7544755146852, + "height": 20.142795138888914, + "seed": 2143778500, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2365, + "versionNonce": 1814292938, + "isDeleted": false, + "id": "aX2Zg4WJogrivysSTPufg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2104.703560386915, + "y": 4860.523944024755, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1537427324, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 05:23:19", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 05:23:19" + }, + { + "type": "text", + "version": 2743, + "versionNonce": 1203761110, + "isDeleted": false, + "id": "E-AzA2HRZfPOUDvDxzioQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1609.5899382805635, + "y": 4862.794192630671, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 414449220, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 2", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "rectangle", + "version": 3274, + "versionNonce": 139993226, + "isDeleted": false, + "id": "F2gzo8nVGkaw5pJdKG36X", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1662.8687454006501, + "y": 4923.928990174747, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.5134081994029, + "height": 19.900607638888914, + "seed": 2068117500, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2187, + "versionNonce": 1629455638, + "isDeleted": false, + "id": "2mISM_Ffr52gsY4oAoONw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2104.41528917964, + "y": 4924.057758343162, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 27497924, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 08:24:50", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:24:50" + }, + { + "type": "text", + "version": 2549, + "versionNonce": 1717010250, + "isDeleted": false, + "id": "WeeRrOhcCJ-8tC0Rw_v9c", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1582.3016670732893, + "y": 4926.116734377325, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70, + "height": 20, + "seed": 207394940, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.191", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.191" + }, + { + "type": "rectangle", + "version": 5414, + "versionNonce": 1817866838, + "isDeleted": false, + "id": "amPLPi4_peJhoBoto913J", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 1528.0838202398825, + "y": 4953.230860128555, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 773.2456351692409, + "height": 151.18724556550592, + "seed": 1739865412, + "groupIds": [ + "VyNj7DH9GhyYMDDthJdvy" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 6095, + "versionNonce": 1920796170, + "isDeleted": false, + "id": "W_a57TQXOeR2j7OO8yq5v", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1526.1399446779085, + "y": 4952.231686370707, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 776.7457386363642, + "height": 154.2443443800131, + "seed": 1252796668, + "groupIds": [ + "VyNj7DH9GhyYMDDthJdvy" + ], + "roundness": null, + "boundElements": [ + { + "id": "z8HDYmz-gMP_Hi5lLEI8J", + "type": "arrow" + } + ], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3386, + "versionNonce": 1145419670, + "isDeleted": false, + "id": "mj_JIVL1-qH926Fy_7fpQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1663.430330942672, + "y": 4955.490554872242, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.2954661285185, + "height": 20.297183880733197, + "seed": 608433348, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2291, + "versionNonce": 1438889162, + "isDeleted": false, + "id": "Yp4joyQdFDuxeqNQpmnGr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2104.0477786230513, + "y": 4955.624637858338, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 699771260, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 08:25:15", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:25:15" + }, + { + "type": "text", + "version": 2640, + "versionNonce": 555111638, + "isDeleted": false, + "id": "pY4HRRtbmMowePTOF_50c", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1581.0353539817559, + "y": 4958.122850330464, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 77, + "height": 20, + "seed": 888192068, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.192", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.192" + }, + { + "type": "rectangle", + "version": 3600, + "versionNonce": 1640401802, + "isDeleted": false, + "id": "hYBbXIb2vkm9aT52unEuU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1663.8645819601932, + "y": 4989.05833071981, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.5856676424751, + "height": 18.42915085614445, + "seed": 1555765756, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4465, + "versionNonce": 1818315286, + "isDeleted": false, + "id": "wtycwVZqCb1sbtbRnZq4v", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1664.2513221691895, + "y": 5019.354817740111, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 632.438455857557, + "height": 19.331987292126826, + "seed": 865637316, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3262, + "versionNonce": 2092993098, + "isDeleted": false, + "id": "WGw_W4jrf0UQuBHD_Q9-N", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2104.659280842599, + "y": 5019.107499896962, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1589541500, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 08:33:02", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:33:02" + }, + { + "type": "text", + "version": 2283, + "versionNonce": 354129750, + "isDeleted": false, + "id": "CiywWZUY80skHxz0Fdb2w", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2181.7697038284564, + "y": 5026.5791579000625, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1314487108, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2399, + "versionNonce": 227324170, + "isDeleted": false, + "id": "P_y-c3pHmoDVk51h4Sk8c", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2182.0566356466384, + "y": 5040.3589874455165, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 2055326460, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2408, + "versionNonce": 1671052438, + "isDeleted": false, + "id": "IxatrIlYNAlfLN73EN7-L", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2182.081575550486, + "y": 5053.528458599363, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1066496708, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3703, + "versionNonce": 1738932170, + "isDeleted": false, + "id": "7DxcqFL4KQliqcxQY0xeQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1663.0150601526, + "y": 5081.848181818408, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 633.4556360399567, + "height": 20.593894652071985, + "seed": 1384582012, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2563, + "versionNonce": 1301428694, + "isDeleted": false, + "id": "lCwrE5NTjgZyQ38CAbo15", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2104.3748328732595, + "y": 5082.231817655231, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1172208196, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-20 05:29:42", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 05:29:42" + }, + { + "type": "text", + "version": 2904, + "versionNonce": 925333130, + "isDeleted": false, + "id": "kNAh9Xbnrtv2a5lTqGnVE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1570.2612107669117, + "y": 5084.667069142739, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 1762671612, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 16.383", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 16.383" + }, + { + "type": "rectangle", + "version": 5043, + "versionNonce": 1243123478, + "isDeleted": false, + "id": "nN2EO8u7z6ZajekWuGx0R", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 1528.0380136948186, + "y": 5177.948057531298, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 773.2456351692409, + "height": 151.18724556550592, + "seed": 471765444, + "groupIds": [ + "ED-wfCihYd9BhWaVE4s2Z" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5724, + "versionNonce": 1825314122, + "isDeleted": false, + "id": "_8qZd05P7LkoyeqB71OhG", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1526.0941381328446, + "y": 5176.948883773452, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 776.7457386363642, + "height": 154.2443443800131, + "seed": 673143932, + "groupIds": [ + "ED-wfCihYd9BhWaVE4s2Z" + ], + "roundness": null, + "boundElements": [ + { + "id": "K9W0uLYUq-eU7Uxvhgrvr", + "type": "arrow" + } + ], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4068, + "versionNonce": 631389270, + "isDeleted": false, + "id": "h7CTynhkj6c_J5l5fChs4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1664.876312802883, + "y": 5180.08895331706, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 629.5127418132788, + "height": 19.4734285591735, + "seed": 1903147332, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2818, + "versionNonce": 703519754, + "isDeleted": false, + "id": "nbP7lNunZlZgeKxG--_Uc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2103.807433331623, + "y": 5179.8111586423765, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1769368828, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-17 03:55:28", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-17 03:55:28" + }, + { + "type": "text", + "version": 3128, + "versionNonce": 1443119510, + "isDeleted": false, + "id": "yNdLP1hptivXsOTDT3QTp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1538.7950086903281, + "y": 5181.582261357557, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 119, + "height": 20, + "seed": 1630531780, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.863.744", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.863.744" + }, + { + "type": "rectangle", + "version": 4077, + "versionNonce": 747293386, + "isDeleted": false, + "id": "dgG9GfgfAZPFyHE7HFbQ_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1663.7094129075483, + "y": 5212.255877211968, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.3754464133191, + "height": 19.329071290348566, + "seed": 2123853180, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2964, + "versionNonce": 1316200150, + "isDeleted": false, + "id": "ewKSQp2o0MkZWmEUIgLUf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2104.232307616852, + "y": 5211.9059039028725, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1794979908, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-20 07:31:39", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 07:31:39" + }, + { + "type": "rectangle", + "version": 4892, + "versionNonce": 993714570, + "isDeleted": false, + "id": "4znaigKepBh3LnMY49gIN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1662.7035794694618, + "y": 5244.409390016464, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 631.8702765794457, + "height": 19.900607638888914, + "seed": 952393212, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3787, + "versionNonce": 1401246742, + "isDeleted": false, + "id": "Ql9oniAxV-s0HZoANIc2M", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2104.5171566201975, + "y": 5244.446382346697, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1790283716, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-20 07:31:54", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 07:31:54" + }, + { + "type": "text", + "version": 2808, + "versionNonce": 289022026, + "isDeleted": false, + "id": "fN5gRHCo64YXqRP2NOaea", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2181.5293585370287, + "y": 5252.172718576425, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1895775868, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2923, + "versionNonce": 1328439638, + "isDeleted": false, + "id": "60PnmQOXePmyyyLGM-swh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2181.7296018444245, + "y": 5265.865859611092, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 276232004, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2932, + "versionNonce": 1248036618, + "isDeleted": false, + "id": "roYpBiHIahgImXpPplakp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2181.754541748272, + "y": 5279.035330764937, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 269094652, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4221, + "versionNonce": 616810134, + "isDeleted": false, + "id": "OqZJYd1DfAjMAMvBxh86m", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1663.7183196180429, + "y": 5307.982998171912, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 630.0506824293966, + "height": 19.840790040348676, + "seed": 1486843588, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1640, + "versionNonce": 1328682442, + "isDeleted": false, + "id": "-cg_BvDIy8tGEal9F2u04", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1767.6219457040413, + "y": 4759.1165180465505, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70, + "height": 25, + "seed": 375836540, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "text", + "version": 2958, + "versionNonce": 83526614, + "isDeleted": false, + "id": "ifvstiWrGeSLp3d1p3Oxt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1795.9272486278103, + "y": 5092.293494598144, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 63764036, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3135, + "versionNonce": 1086377098, + "isDeleted": false, + "id": "ck--u3j1MSoE8QxNGfGjw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1796.2877505424374, + "y": 5111.0674383250025, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 609714172, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3319, + "versionNonce": 1105697046, + "isDeleted": false, + "id": "i5OddiBqILZZLXT3VKQhS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1796.2075222329229, + "y": 5129.841917700452, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 249400772, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1796, + "versionNonce": 1691003722, + "isDeleted": false, + "id": "fYLQmxF8aDee1Hl871KOT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1681.011447669445, + "y": 4795.504398962254, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 31334524, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "​/​clck​.​yandex​.​ru​/​file​.​com​...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "​/​clck​.​yandex​.​ru​/​file​.​com​..." + }, + { + "type": "text", + "version": 2002, + "versionNonce": 587204182, + "isDeleted": false, + "id": "_HtjIYpX11lEiUUmiAmew", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1798.1724270462826, + "y": 4867.921699711752, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 720319812, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2118, + "versionNonce": 296399370, + "isDeleted": false, + "id": "l2XzYXJrX6Gv8jQLOKidH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1798.4593588644627, + "y": 4881.701529257206, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 649900284, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2127, + "versionNonce": 957926294, + "isDeleted": false, + "id": "-lTAm4tV_OTStewxzcnhQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1798.4842987683103, + "y": 4894.871000411051, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 895478980, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1950, + "versionNonce": 442228938, + "isDeleted": false, + "id": "XrGYWIUWHn3bYQOHvtdEM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1681.3351244896164, + "y": 4827.755242286376, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1114976636, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "/clck/jsredircnt=1395412...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "/clck/jsredircnt=1395412..." + }, + { + "type": "text", + "version": 2771, + "versionNonce": 845605078, + "isDeleted": false, + "id": "K2SxX6hQIrIhKF5gVPnv8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1681.5217524239358, + "y": 4860.37913777289, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 802010180, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "goal://200906&uinfo=ww-1...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal://200906&uinfo=ww-1..." + }, + { + "type": "text", + "version": 2595, + "versionNonce": 981022602, + "isDeleted": false, + "id": "CO8mrPdHBO85E0yskTA8R", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1681.2334812166607, + "y": 4923.811754626239, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1145676284, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 2683, + "versionNonce": 780099094, + "isDeleted": false, + "id": "pulK1b7vfIo758tkAmfW1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1680.967168125129, + "y": 4955.581029071529, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 941001668, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 2830, + "versionNonce": 37598794, + "isDeleted": false, + "id": "LpqcPl60xIK1zdsMHANFY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1681.2908449453005, + "y": 4988.214788406803, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1664877180, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 3659, + "versionNonce": 307702614, + "isDeleted": false, + "id": "0rvn4-IYUTTFX5MsN303n", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1681.4774728796199, + "y": 5019.060914714121, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 5796676, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 2378, + "versionNonce": 1115970826, + "isDeleted": false, + "id": "5XyV6uEzAyXxqoyV-VYkt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1798.131970739904, + "y": 5026.472034477165, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 638472956, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2494, + "versionNonce": 1547915414, + "isDeleted": false, + "id": "yj9DvpoWnTvUXzIlLhK1r", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1798.4189025580843, + "y": 5040.251864022619, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1190226628, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2503, + "versionNonce": 2026384330, + "isDeleted": false, + "id": "6PCIVWHlWKYM_uKzwOXs8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1798.4438424619318, + "y": 5053.421335176466, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1799525244, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2962, + "versionNonce": 2012794326, + "isDeleted": false, + "id": "UbDDBxqT6sFoM0sckEvLx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1681.1930249102822, + "y": 5082.087011403364, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1316975172, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "goal​:​/​/​r52-echo/#compose...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​r52-echo/#compose..." + }, + { + "type": "text", + "version": 3218, + "versionNonce": 992223882, + "isDeleted": false, + "id": "dX-qrhOZHXOx4_u1hirNU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1680.7268228337023, + "y": 5179.767549855567, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1897579516, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​php?show​/​7...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​php?show​/​7..." + }, + { + "type": "text", + "version": 3368, + "versionNonce": 311206678, + "isDeleted": false, + "id": "JMFHvzji21XGd3s7iXCr0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1680.9493021888165, + "y": 5211.761097651005, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1440778692, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​rt​.​com​.​tr​/...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​rt​.​com​.​tr​/..." + }, + { + "type": "text", + "version": 4187, + "versionNonce": 609435978, + "isDeleted": false, + "id": "6KbMH8u1bdkhjArx4Chwu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1681.1384102907148, + "y": 5244.081322788528, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1570301052, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​rt​.​com​.​tr​/​...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​rt​.​com​.​tr​/​..." + }, + { + "type": "text", + "version": 2903, + "versionNonce": 1853083734, + "isDeleted": false, + "id": "jGB8Ske5iiDPmH9-Qks9D", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1797.8916254484773, + "y": 5252.065595153526, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 271757636, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3018, + "versionNonce": 1068533770, + "isDeleted": false, + "id": "TLki30n8DRh3tehb1UwDp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1798.0918687558703, + "y": 5265.758736188194, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1182725372, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3027, + "versionNonce": 931354006, + "isDeleted": false, + "id": "DKXyKgxu6Hf00ltsiDFEY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1798.116808659718, + "y": 5278.92820734204, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 483649732, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3209, + "versionNonce": 1966536394, + "isDeleted": false, + "id": "1UeDp6TUllfeYkYEhDHBw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1681.8937399646309, + "y": 5307.642880520893, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 961475964, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "res​:​/​/​m​.​me​/​politic/stati...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "res​:​/​/​m​.​me​/​politic/stati..." + }, + { + "type": "text", + "version": 2782, + "versionNonce": 1458582230, + "isDeleted": false, + "id": "qvZFWhAOpqcdyDE27-dlu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2105.2854933809663, + "y": 5307.802195727031, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 2137141316, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-19 10:48:46", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-19 10:48:46" + }, + { + "type": "text", + "version": 3019, + "versionNonce": 1971424650, + "isDeleted": false, + "id": "5ZgVZObzZp0x9YRkSQkvx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1539.8068777868436, + "y": 5309.764395796254, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 121, + "height": 20, + "seed": 1128982012, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 8.867.680", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.867.680" + }, + { + "type": "text", + "version": 1942, + "versionNonce": 1196386326, + "isDeleted": false, + "id": "PWUw0SmCb-IzFBCwDlyng", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1351.6544541535475, + "y": 4803.143753853819, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 119, + "height": 40, + "seed": 398165956, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "pKrz8kJm0Y7ZGuVeaDwrd", + "type": "arrow" + } + ], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 0\nwith 8192 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 0\nwith 8192 rows" + }, + { + "type": "arrow", + "version": 1904, + "versionNonce": 634080330, + "isDeleted": false, + "id": "pKrz8kJm0Y7ZGuVeaDwrd", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "angle": 0, + "x": 1481.1342651570483, + "y": 4824.079387213624, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 36.73828125, + "height": 0.9079272975623098, + "seed": 2037696124, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "startBinding": { + "elementId": "PWUw0SmCb-IzFBCwDlyng", + "focus": 0.1241274324604245, + "gap": 10.4798110035008 + }, + "endBinding": { + "elementId": "lsI78-QqmdT4q25J4qArV", + "focus": 0.6408863246638249, + "gap": 8.5605756191909 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 36.73828125, + -0.9079272975623098 + ] + ] + }, + { + "type": "text", + "version": 2656, + "versionNonce": 1754658134, + "isDeleted": false, + "id": "icuTSnemB_UwMZkwKTD0s", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1354.9389501519306, + "y": 4956.258652069314, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 119, + "height": 40, + "seed": 436072260, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "z8HDYmz-gMP_Hi5lLEI8J", + "type": "arrow" + } + ], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 1\nwith 8192 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 1\nwith 8192 rows" + }, + { + "type": "arrow", + "version": 1850, + "versionNonce": 200225546, + "isDeleted": false, + "id": "z8HDYmz-gMP_Hi5lLEI8J", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "angle": 0, + "x": 1482.5795751519306, + "y": 4978.791953287164, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 39.8359375, + "height": 1.008672810209191, + "seed": 9344764, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "startBinding": { + "elementId": "icuTSnemB_UwMZkwKTD0s", + "focus": 0.03756685726227266, + "gap": 8.640625 + }, + "endBinding": { + "elementId": "W_a57TQXOeR2j7OO8yq5v", + "focus": 0.4556907888570512, + "gap": 3.7244320259779897 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 39.8359375, + 1.008672810209191 + ] + ] + }, + { + "type": "text", + "version": 2935, + "versionNonce": 1410914966, + "isDeleted": false, + "id": "Tr4CsJduoGQhH0NewfphC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1349.5364534878552, + "y": 5187.555033593442, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 123, + "height": 40, + "seed": 109536964, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "K9W0uLYUq-eU7Uxvhgrvr", + "type": "arrow" + } + ], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 1082\nwith 3937 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 1082\nwith 3937 rows" + }, + { + "type": "arrow", + "version": 1590, + "versionNonce": 979911114, + "isDeleted": false, + "id": "K9W0uLYUq-eU7Uxvhgrvr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "angle": 0, + "x": 1480.981765987856, + "y": 5204.161232540564, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 37.82667994643066, + "height": 2.0531503382990195, + "seed": 354047868, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "startBinding": { + "elementId": "Tr4CsJduoGQhH0NewfphC", + "focus": 0.03561765500799312, + "gap": 8.44531250000091 + }, + "endBinding": { + "elementId": "_8qZd05P7LkoyeqB71OhG", + "focus": 0.7478290302818356, + "gap": 7.2856921985579675 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 37.82667994643066, + -2.0531503382990195 + ] + ] + }, + { + "type": "rectangle", + "version": 4801, + "versionNonce": 814553046, + "isDeleted": false, + "id": "jTNf1d9BeoxNPcAOr7xVG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2636.257706191053, + "y": 5074.911238779883, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 422.551254734849, + "height": 21.39989741161571, + "seed": 569765444, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4445, + "versionNonce": 1011972234, + "isDeleted": false, + "id": "t_412R9R_LVx_WKZyzlPM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2636.7024767612243, + "y": 5107.633675197632, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 422.8751183712125, + "height": 20.649897411616156, + "seed": 324667388, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4339, + "versionNonce": 101166358, + "isDeleted": false, + "id": "ogj6vCBmJtNFl8bYoP8xV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2637.739285783597, + "y": 5167.799120896318, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 423.6151751893943, + "height": 21.2642440025254, + "seed": 1831306692, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3263, + "versionNonce": 23451466, + "isDeleted": false, + "id": "WeQ8f5HiU5mDMFUXfsRzb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2947.9157109274256, + "y": 5037.281559403923, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 72, + "height": 25, + "seed": 2135926908, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "text", + "version": 3100, + "versionNonce": 301832790, + "isDeleted": false, + "id": "-cj4w3sINXo5SRQyLfFxh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2915.95913992634, + "y": 5075.35406879331, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 490351940, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "1.644.125.792", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.644.125.792" + }, + { + "type": "text", + "version": 3349, + "versionNonce": 1241538058, + "isDeleted": false, + "id": "X2IbyhcNAZHJ2Rwke-6Fy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2977.8288530857917, + "y": 5115.82844628005, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 213727484, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3465, + "versionNonce": 457432982, + "isDeleted": false, + "id": "0RxMsL13oCPOtTi2WJVYb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2978.1157849039737, + "y": 5129.608275825506, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 327935172, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3474, + "versionNonce": 320605386, + "isDeleted": false, + "id": "bf_23DxfB0ZpeM6R4xUVE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2978.1407248078212, + "y": 5142.777746979352, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 656718204, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3251, + "versionNonce": 1175420118, + "isDeleted": false, + "id": "6KHbxVrtlTUcyrX-EMs6H", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2906.6056237645644, + "y": 5105.447598961059, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 133, + "height": 20, + "seed": 1438297156, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 3410, + "versionNonce": 39052170, + "isDeleted": false, + "id": "CKYVvRY9IGyoE9IbFgqh9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2919.6424327869377, + "y": 5166.381079244727, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 2043161084, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "1.878.658.680", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.878.658.680" + }, + { + "type": "text", + "version": 3165, + "versionNonce": 1744138774, + "isDeleted": false, + "id": "WykKOVwDzK101j6AawBgH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2648.6977847749317, + "y": 5075.6568973271105, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 94667716, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "​/​clck​.​yandex​.​ru​/​file​.​com​...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "​/​clck​.​yandex​.​ru​/​file​.​com​..." + }, + { + "type": "text", + "version": 3020, + "versionNonce": 1373823562, + "isDeleted": false, + "id": "YFIlXJdx1Vs4lNyE6G-PQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2747.221594298741, + "y": 5039.25951389457, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 41, + "height": 25, + "seed": 2007599740, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "text", + "version": 3397, + "versionNonce": 1542111062, + "isDeleted": false, + "id": "NOPCqCqmPZEYOnC3JBuGx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2767.772075640982, + "y": 5116.064695559772, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1499949892, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3513, + "versionNonce": 1017383178, + "isDeleted": false, + "id": "wtbGwMY3jw1jCMRM1XpYx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2768.0590074591623, + "y": 5129.844525105226, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1670044412, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3522, + "versionNonce": 1447322774, + "isDeleted": false, + "id": "dwpjsXZD1K7OsIO9ULT0I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2768.08394736301, + "y": 5143.013996259072, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 325149380, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3307, + "versionNonce": 1779587018, + "isDeleted": false, + "id": "-orJOZIa9E9puaPUL6nnF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2651.021461595103, + "y": 5106.61485386465, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 1475222396, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 3480, + "versionNonce": 951542230, + "isDeleted": false, + "id": "WKZKxhAzpCDf36B5oJmhR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2648.9226969872675, + "y": 5167.208349594902, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 255, + "height": 20, + "seed": 2049993284, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​php?show​/​7...", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​php?show​/​7..." + }, + { + "type": "text", + "version": 3201, + "versionNonce": 1514720906, + "isDeleted": false, + "id": "F435cbi9gZlbEyBrNb21P", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2795.391278239666, + "y": 4990.671921781778, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 101, + "height": 25, + "seed": 1326795772, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "text", + "version": 2621, + "versionNonce": 1717090070, + "isDeleted": false, + "id": "UYBGI7mES40seRbbHJYxq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2530.06885760474, + "y": 5170.1905849762215, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 84, + "height": 20, + "seed": 1353875908, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1082", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1082" + }, + { + "type": "text", + "version": 2770, + "versionNonce": 1375890762, + "isDeleted": false, + "id": "rnVCrDuqyUsQ7C61nuHs5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2559.04542010474, + "y": 5077.58330261015, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56, + "height": 20, + "seed": 721579132, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 0", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 0" + }, + { + "type": "text", + "version": 2773, + "versionNonce": 396190806, + "isDeleted": false, + "id": "yN8klqLg-MzW7tvUcU-2z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2561.49073260474, + "y": 5110.92998229765, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49, + "height": 20, + "seed": 1308993860, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1" + }, + { + "type": "text", + "version": 1897, + "versionNonce": 163890902, + "isDeleted": false, + "id": "ZBfnLP9rXKnm_EO9sY61v", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1970.2561474419606, + "y": 4758.609031195423, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 102, + "height": 25, + "seed": 785852484, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "text", + "version": 2773, + "versionNonce": 1995454858, + "isDeleted": false, + "id": "EBHHaH5bgK9igknIOTg8D", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2007.56273644715, + "y": 5092.211101047391, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 734096892, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2952, + "versionNonce": 1517386774, + "isDeleted": false, + "id": "17ol-fPelwunEq9ZbF3df", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2007.56273644715, + "y": 5110.985044774248, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 2110881732, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3136, + "versionNonce": 1552185418, + "isDeleted": false, + "id": "S6JKotvLCSQLe1cFgZl4z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2007.56273644715, + "y": 5129.759524149698, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 23, + "height": 44, + "seed": 567955068, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": ".", + "baseline": 35, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1788, + "versionNonce": 1985317206, + "isDeleted": false, + "id": "t1UVmW6Mo0TrF5xX675Zp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1955.56273644715, + "y": 4795.609924043816, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 982837060, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "1.644.125.792", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.644.125.792" + }, + { + "type": "text", + "version": 2063, + "versionNonce": 1789058826, + "isDeleted": false, + "id": "8HTUpVQrctmAmVWhkgZDk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2012.56273644715, + "y": 4869.15591807155, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 318971644, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2195, + "versionNonce": 751169174, + "isDeleted": false, + "id": "WihaOPWsBIwiPu6IcPW7I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2012.56273644715, + "y": 4882.935747617006, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1769955012, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2204, + "versionNonce": 1573285322, + "isDeleted": false, + "id": "isvSLGD_25dcFqidATgBu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2012.56273644715, + "y": 4896.105218770852, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 2008932220, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1938, + "versionNonce": 444050390, + "isDeleted": false, + "id": "4FQpR4KgPATdPcLMnyWcI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1955.56273644715, + "y": 4827.759569902883, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 1395582532, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "1.550.392.492", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.550.392.492" + }, + { + "type": "text", + "version": 2757, + "versionNonce": 722085002, + "isDeleted": false, + "id": "8Kr7mI1WZKdH-tz566dtv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1955.56273644715, + "y": 4860.383465389396, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 1749848060, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2.479.498.648", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "2.479.498.648" + }, + { + "type": "text", + "version": 2573, + "versionNonce": 2105524502, + "isDeleted": false, + "id": "7xpjJ0Nhe5fZ7Yr4z57LU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1946.56273644715, + "y": 4923.714884777691, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 133, + "height": 20, + "seed": 2088861124, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 2676, + "versionNonce": 1814627146, + "isDeleted": false, + "id": "VPJfrL15NXQsfbvhHTBkM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1946.56273644715, + "y": 4955.4841592229795, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 133, + "height": 20, + "seed": 615592060, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 2818, + "versionNonce": 156446294, + "isDeleted": false, + "id": "EfpbB3lhGZkVWv95p42hK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1946.56273644715, + "y": 4988.219116023311, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 133, + "height": 20, + "seed": 513090884, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 3650, + "versionNonce": 1266551306, + "isDeleted": false, + "id": "hlJqZmQZveu1R6W31BPPQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1946.56273644715, + "y": 5018.967021261602, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 133, + "height": 20, + "seed": 481149180, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 2434, + "versionNonce": 986117014, + "isDeleted": false, + "id": "vqon-t3vLiOxXJULnKuy2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2011.56273644715, + "y": 5027.706252836964, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 516414660, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2554, + "versionNonce": 1879324874, + "isDeleted": false, + "id": "-45lrmve_35eU2ZHjJxPU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2011.56273644715, + "y": 5041.48608238242, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 2009350524, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2563, + "versionNonce": 739250390, + "isDeleted": false, + "id": "FRnbi3I1yQTgI5ScXCVvd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2011.56273644715, + "y": 5054.655553536266, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 112698436, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2948, + "versionNonce": 1767280522, + "isDeleted": false, + "id": "mo7eWjSL5hmUjGKV959m5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1955.56273644715, + "y": 5082.091339019873, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 490123772, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "1.524.699.296", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.524.699.296" + }, + { + "type": "text", + "version": 3206, + "versionNonce": 1757644310, + "isDeleted": false, + "id": "gpQHRZuU6UACW2WIUx-XK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1955.3420393365332, + "y": 5179.771877472076, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 2084731844, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "1.878.658.680", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.878.658.680" + }, + { + "type": "text", + "version": 3348, + "versionNonce": 464522826, + "isDeleted": false, + "id": "ukMbo6F6R4A8AsbuZeakf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1955.4432368015903, + "y": 5211.86662273257, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 1007096444, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "3.849.470.917", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.849.470.917" + }, + { + "type": "text", + "version": 4172, + "versionNonce": 1104565078, + "isDeleted": false, + "id": "5JQv78s7-nBO-QDV33E5K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1955.4432368015903, + "y": 5244.204706246281, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 965108548, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "3.849.470.917", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.849.470.917" + }, + { + "type": "text", + "version": 2961, + "versionNonce": 736867594, + "isDeleted": false, + "id": "-PX1IhDrrE1KaD7QOWMhW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2011.4432368015903, + "y": 5253.299813513327, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 1391944444, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3077, + "versionNonce": 563968150, + "isDeleted": false, + "id": "lfMpeAM37i4jf-9rk56N4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2011.4432368015903, + "y": 5267.0796430587825, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 81877700, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3086, + "versionNonce": 1803846602, + "isDeleted": false, + "id": "DSkuj9larYJfUI0MUzQdb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2011.4432368015903, + "y": 5280.249114212627, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14, + "height": 24, + "seed": 948544380, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ".", + "baseline": 20, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3101, + "versionNonce": 1607333334, + "isDeleted": false, + "id": "3JNZef4SmD6kkXulXVYNq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1955.4432368015903, + "y": 5307.748405602459, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 124, + "height": 20, + "seed": 686907972, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "3.560.941.935", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.560.941.935" + }, + { + "type": "text", + "version": 2350, + "versionNonce": 1856757770, + "isDeleted": false, + "id": "C4cW6hZgTLX-7HTW8isMd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2106.4839639890974, + "y": 4988.554559242124, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 180, + "height": 20, + "seed": 1743470276, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2014-03-21 08:32:43", + "baseline": 16, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:32:43" + }, + { + "type": "rectangle", + "version": 5084, + "versionNonce": 2018497814, + "isDeleted": false, + "id": "XTM9mkzsOyCIjx3xmbOBv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8634.11398619021, + "y": 4862.221437039244, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 313.880479020459, + "height": 175.9067584677423, + "seed": 199933636, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4160, + "versionNonce": 1427386186, + "isDeleted": false, + "id": "Pe8R70Ta_Frbd-3-vGfCq", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8840.727831155089, + "y": 4896.970891607506, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 86.12404450345402, + "height": 127.14876224516367, + "seed": 205029244, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4396, + "versionNonce": 1493221974, + "isDeleted": false, + "id": "elCJvh4cao0pnDYwjY8Wj", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8650.490280902735, + "y": 4897.02337316791, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 178.6056463210472, + "height": 127.81945912873799, + "seed": 1361987140, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5160, + "versionNonce": 1176745482, + "isDeleted": false, + "id": "WTPfAN6DuKgMmyiISCDj_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8643.965503064406, + "y": 4926.755768329523, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.65820978251435, + "height": 14.872173477198414, + "seed": 635417852, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4804, + "versionNonce": 1738672022, + "isDeleted": false, + "id": "_XNMnDs_nn96hcDYMX75H", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8644.274602914275, + "y": 4949.496706832209, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.88328358031396, + "height": 14.35094994545205, + "seed": 1893673156, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4698, + "versionNonce": 1628726474, + "isDeleted": false, + "id": "uM5bZCn4Dfm0bRKYP4G7l", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8644.995148594791, + "y": 4991.309568293785, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 294.3975969516018, + "height": 14.777899145225708, + "seed": 1855436156, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3622, + "versionNonce": 879273174, + "isDeleted": false, + "id": "xzuILWPcKfXZHvZE-kcJj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8860.556817632158, + "y": 4900.604469152412, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 50.037459047680535, + "height": 17.374117724889075, + "seed": 805662788, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 13.899294179911259, + "fontFamily": 1, + "text": "UserID", + "baseline": 12.374117724889075, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "text", + "version": 3459, + "versionNonce": 528563082, + "isDeleted": false, + "id": "xhm5FvpaX0F2KD2w4qZoH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8838.348128565893, + "y": 4927.063519560939, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 86.1756239154498, + "height": 13.899294179911259, + "seed": 1367057916, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 11.119435343929007, + "fontFamily": 3, + "text": "1.644.125.792", + "baseline": 11.899294179911259, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.644.125.792" + }, + { + "type": "text", + "version": 3708, + "versionNonce": 15309334, + "isDeleted": false, + "id": "lrp9KF2mcwrtk_J9okur7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8881.345395767388, + "y": 4955.191783532787, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.72950592593788, + "height": 16.67915301589351, + "seed": 1375127492, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 13.899294179911259, + "fontFamily": 3, + "text": ".", + "baseline": 13.679153015893512, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3824, + "versionNonce": 262486602, + "isDeleted": false, + "id": "Jb5ag2wZhXsZAAtHzvOR6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8881.544803254914, + "y": 4964.768278762853, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.72950592593788, + "height": 16.67915301589351, + "seed": 59606652, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 13.899294179911259, + "fontFamily": 3, + "text": ".", + "baseline": 13.679153015893512, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3833, + "versionNonce": 337241942, + "isDeleted": false, + "id": "XVCawdy4sMnW7Gszil-4L", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8881.562135607934, + "y": 4973.920596450912, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.72950592593788, + "height": 16.67915301589351, + "seed": 1792094020, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 13.899294179911259, + "fontFamily": 3, + "text": ".", + "baseline": 13.679153015893512, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3610, + "versionNonce": 1079730442, + "isDeleted": false, + "id": "yUNf24O1Ta1or1w6wOTaV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8831.847764928438, + "y": 4947.977460996618, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 92.43030629640987, + "height": 13.899294179911259, + "seed": 1234130684, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 11.119435343929007, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 11.899294179911259, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 3769, + "versionNonce": 240028822, + "isDeleted": false, + "id": "bxphi2BYF4xtX7vb_RgnI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8840.907887116902, + "y": 4990.324079390044, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 86.1756239154498, + "height": 13.899294179911259, + "seed": 1525851844, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 11.119435343929007, + "fontFamily": 3, + "text": "1.878.658.680", + "baseline": 11.899294179911259, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.878.658.680" + }, + { + "type": "text", + "version": 3524, + "versionNonce": 756985802, + "isDeleted": false, + "id": "NuAet_so5dyzwsFpfRKVk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8652.610918657334, + "y": 4927.273974704807, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 177.21600079386855, + "height": 13.899294179911259, + "seed": 202620, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 11.119435343929007, + "fontFamily": 3, + "text": "​/​clck​.​yandex​.​ru​/​file​.​com​...", + "baseline": 11.899294179911259, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "​/​clck​.​yandex​.​ru​/​file​.​com​..." + }, + { + "type": "text", + "version": 3379, + "versionNonce": 1027377622, + "isDeleted": false, + "id": "LRtU2yUj9hop5RqgEjjOn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8721.081489272181, + "y": 4901.979077719412, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 28.49355306881808, + "height": 17.374117724889075, + "seed": 1190735428, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 13.899294179911259, + "fontFamily": 1, + "text": "URL", + "baseline": 12.374117724889075, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "text", + "version": 3756, + "versionNonce": 705308298, + "isDeleted": false, + "id": "YWT5iDae4RPllOhxtBb3J", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8735.36334855791, + "y": 4955.355968444719, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.86475296296894, + "height": 17.374117724889075, + "seed": 590006268, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 13.899294179911259, + "fontFamily": 1, + "text": ".", + "baseline": 12.374117724889075, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3872, + "versionNonce": 1878581014, + "isDeleted": false, + "id": "pFMe5wu1Cxf6deiVQbGlD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8735.562756045434, + "y": 4964.932463674785, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.86475296296894, + "height": 17.374117724889075, + "seed": 264422852, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 13.899294179911259, + "fontFamily": 1, + "text": ".", + "baseline": 12.374117724889075, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3881, + "versionNonce": 1339606346, + "isDeleted": false, + "id": "G5WqpvTCLp9AIONu6m6nE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8735.580088398454, + "y": 4974.0847813628425, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.86475296296894, + "height": 17.374117724889075, + "seed": 1460168828, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 13.899294179911259, + "fontFamily": 1, + "text": ".", + "baseline": 12.374117724889075, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3666, + "versionNonce": 1257802838, + "isDeleted": false, + "id": "HyDPJY1chK535z3jwJIpp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8654.225792042464, + "y": 4948.788661961015, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 177.21600079386855, + "height": 13.899294179911259, + "seed": 1248685380, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 11.119435343929007, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 11.899294179911259, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 3839, + "versionNonce": 1743096842, + "isDeleted": false, + "id": "hvBg-yPegJjxU-fMsJ27K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8652.767224707528, + "y": 4990.899003088214, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 177.21600079386855, + "height": 13.899294179911259, + "seed": 1868429564, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 11.119435343929007, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​php?show​/​7...", + "baseline": 11.899294179911259, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​php?show​/​7..." + }, + { + "type": "text", + "version": 3560, + "versionNonce": 470847894, + "isDeleted": false, + "id": "nYLi9j2JjaE_RoqNhRgvE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8754.557719654595, + "y": 4868.21241590595, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70.19143560855186, + "height": 17.374117724889075, + "seed": 945235140, + "groupIds": [ + "AXIEJxQQW3FkJiTpTio0F" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 13.899294179911259, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 12.374117724889075, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "rectangle", + "version": 2887, + "versionNonce": 515744790, + "isDeleted": false, + "id": "iLFOasAmnQV_C5OeipR8t", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8168.818334460782, + "y": 4757.624383752309, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 166.77029716022477, + "height": 382.67221620130925, + "seed": 1416835068, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2633, + "versionNonce": 1886310474, + "isDeleted": false, + "id": "cACU6T60lJ-AgeVpl7rsZ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8349.714795970767, + "y": 4758.2668245951945, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 81.81692567543335, + "height": 382.1228558003817, + "seed": 1133829572, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2806, + "versionNonce": 786215254, + "isDeleted": false, + "id": "ihJs0TRsXfGZJ8oyeqPOP", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8443.048716155477, + "y": 4756.649652333746, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 120.8020298613876, + "height": 383.94449714487905, + "seed": 1739350268, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1942, + "versionNonce": 1065498378, + "isDeleted": false, + "id": "Vq2kTt4KEuwHGh_CmGDTr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8454.36366483644, + "y": 4762.277715471905, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 83.73633468789095, + "height": 16.10314128613287, + "seed": 8600772, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 1, + "text": "EventTime.bin", + "baseline": 11.103141286132871, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "EventTime.bin" + }, + { + "type": "text", + "version": 3196, + "versionNonce": 438834838, + "isDeleted": false, + "id": "5CQSd27jXzdplfcusLZag", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.45668952277, + "y": 4976.777359559265, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 703521148, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3373, + "versionNonce": 217761226, + "isDeleted": false, + "id": "r6tDvC6X2UUrTVWm6ftDz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.688898053379, + "y": 4988.870138292526, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1510409284, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3557, + "versionNonce": 1767166934, + "isDeleted": false, + "id": "EcSZYcCYSkVjoXXCCPilT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.637220941248, + "y": 5000.963262050783, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1896698364, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 2958, + "versionNonce": 569605258, + "isDeleted": false, + "id": "i1sSKHMwppd_RcZHt1O1P", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8161.294606168998, + "y": 4785.673072613057, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.69889405639157, + "height": 12.914386351324707, + "seed": 1856363460, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1725, + "versionNonce": 1182263574, + "isDeleted": false, + "id": "UgT6sAyqPB8SQ1SshHN67", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8445.411085097603, + "y": 4786.553360714136, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 470397564, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-18 09:59:01", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-18 09:59:01" + }, + { + "type": "text", + "version": 2092, + "versionNonce": 1814518602, + "isDeleted": false, + "id": "9RPJtAyKmyL-NVj0h2_iw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8127.139826370346, + "y": 4787.197249511865, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.629779966484488, + "height": 12.882513028906299, + "seed": 1216201540, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 0", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 2223, + "versionNonce": 1359369814, + "isDeleted": false, + "id": "HqjjiCp9eIFg8dJVaxWvA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8495.406124273388, + "y": 4832.301232229069, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1504051964, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2339, + "versionNonce": 1777426954, + "isDeleted": false, + "id": "Om2QENqWej6DlO8V5BaPh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8495.590944417694, + "y": 4841.177173911841, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 2112666308, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2348, + "versionNonce": 1909791638, + "isDeleted": false, + "id": "FtfbssK2Pj7epC2AiR9eD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8495.607008849507, + "y": 4849.659968098001, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 811877244, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3068, + "versionNonce": 374116554, + "isDeleted": false, + "id": "rMUHazSS00pDKuHKKM7Z8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8161.405926072343, + "y": 4806.429431441648, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.01433655629427, + "height": 12.818491859556932, + "seed": 697352772, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1878, + "versionNonce": 790182102, + "isDeleted": false, + "id": "-b_N5kHA8_RwpZ1cEZcXU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8445.619573640253, + "y": 4806.453259150458, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 109474812, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-22 05:55:22", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 05:55:22" + }, + { + "type": "text", + "version": 2238, + "versionNonce": 1423173514, + "isDeleted": false, + "id": "AytQc2_VbqAnZWTzrLXIU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8127.348314912997, + "y": 4807.869515538347, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 25.120900406367284, + "height": 12.882513028906299, + "seed": 1648875972, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 1", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "rectangle", + "version": 3849, + "versionNonce": 6794774, + "isDeleted": false, + "id": "nN_u9Lgpe6mLHah-RPdE3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8161.472687605225, + "y": 4827.365319783978, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.2851374429445, + "height": 12.974491040766345, + "seed": 705598588, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2681, + "versionNonce": 1573021258, + "isDeleted": false, + "id": "SiCCOcqkCDgCGtra2BZQN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8445.739785480026, + "y": 4827.467147083391, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 858784068, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 05:23:19", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 05:23:19" + }, + { + "type": "text", + "version": 3060, + "versionNonce": 582318934, + "isDeleted": false, + "id": "HpSgbcAYHggf_UqgfVCSo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8126.824401101322, + "y": 4828.92947244562, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.629779966484488, + "height": 12.882513028906299, + "seed": 1488889084, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 2", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "rectangle", + "version": 3590, + "versionNonce": 703794442, + "isDeleted": false, + "id": "isnAUSieV-Q9ZSSa8_SIL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8161.142647445778, + "y": 4868.307963739675, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.1298598014461, + "height": 12.818491859556932, + "seed": 329726148, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2503, + "versionNonce": 1817682070, + "isDeleted": false, + "id": "6n0lfcOWQo2FzpVlCreJk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8445.554102600845, + "y": 4868.390906620041, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1209574780, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:24:50", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:24:50" + }, + { + "type": "text", + "version": 2866, + "versionNonce": 1591794634, + "isDeleted": false, + "id": "_cGE6bpieOIkQbXwCQCmM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8109.2473256331195, + "y": 4869.717145899356, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.088795601172045, + "height": 12.882513028906299, + "seed": 1598783556, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.191", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.191" + }, + { + "type": "rectangle", + "version": 3702, + "versionNonce": 553852374, + "isDeleted": false, + "id": "vWfxC8FMWs2OWSpTO4ofs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8161.504379098875, + "y": 4888.637577161083, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.6336033745057, + "height": 13.073936789682616, + "seed": 1167226492, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2607, + "versionNonce": 984011402, + "isDeleted": false, + "id": "WwSuRi2q_JWDq7_TR1Y79", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8445.317379624172, + "y": 4888.72394345185, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1809006404, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:25:15", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:25:15" + }, + { + "type": "text", + "version": 2957, + "versionNonce": 1171059478, + "isDeleted": false, + "id": "DjWDlp6HwcsaYuxGHGgOn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8108.431660888102, + "y": 4890.333106187907, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49.59767516128925, + "height": 12.882513028906299, + "seed": 1568032508, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.192", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.192" + }, + { + "type": "rectangle", + "version": 3917, + "versionNonce": 2147479882, + "isDeleted": false, + "id": "h2PTfuR76zvjHX8I_Fkez", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8161.669726238164, + "y": 4910.2594426464675, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.8205296137334, + "height": 11.870688800798026, + "seed": 288536260, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728754, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4781, + "versionNonce": 1965695062, + "isDeleted": false, + "id": "CONbQpIwQfa-tQWdM5PXk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8162.033200607487, + "y": 4929.774187084923, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.36983237831794, + "height": 12.45222890827374, + "seed": 1502349180, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3578, + "versionNonce": 1648834570, + "isDeleted": false, + "id": "36YEancDo9Tvd1No0tZFO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8445.711263889696, + "y": 4929.614883318091, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1521958468, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:33:02", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:33:02" + }, + { + "type": "text", + "version": 2599, + "versionNonce": 854566294, + "isDeleted": false, + "id": "I2laWgChnv-u7EphwoV4D", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8495.380065328687, + "y": 4934.427569896716, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1041610748, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2715, + "versionNonce": 1903666890, + "isDeleted": false, + "id": "mfB7-YvYZkcAx8L8Jf1Kl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8495.564885472993, + "y": 4943.3035115794855, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 557766084, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2724, + "versionNonce": 1079149270, + "isDeleted": false, + "id": "ipgOl46q_S60cOiq2H15i", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8495.580949904806, + "y": 4951.786305765647, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 924145788, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4019, + "versionNonce": 103562634, + "isDeleted": false, + "id": "3t4HcTrLkqCuSBstREFzS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8161.236892530694, + "y": 4970.027765932866, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 408.0250242259434, + "height": 13.265055808562055, + "seed": 1910996292, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2879, + "versionNonce": 1877456918, + "isDeleted": false, + "id": "_0ne7vL5ae6DvyWyP6pAN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8445.528043656144, + "y": 4970.274875616177, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 541911292, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-20 05:29:42", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 05:29:42" + }, + { + "type": "text", + "version": 3221, + "versionNonce": 765459530, + "isDeleted": false, + "id": "PIGzltRmJ5XYDkegZe-Hr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8101.491758871077, + "y": 4971.843483567001, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56.68305732718771, + "height": 12.882513028906299, + "seed": 101659844, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 16.383", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 16.383" + }, + { + "type": "rectangle", + "version": 4384, + "versionNonce": 2040808790, + "isDeleted": false, + "id": "MUbrBIAMLgydeK2Ws6d3i", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8162.435773106561, + "y": 5033.307166872926, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.4853049136045, + "height": 12.54333485655143, + "seed": 1361828348, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3134, + "versionNonce": 363717386, + "isDeleted": false, + "id": "dd7u2PZ1zVqdyOkDPBNNl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8445.162567056757, + "y": 5033.128232197127, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 194237380, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-17 03:55:28", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-17 03:55:28" + }, + { + "type": "text", + "version": 3445, + "versionNonce": 1323117206, + "isDeleted": false, + "id": "G1A2w4NSJWDgeDxUmeQ1a", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8081.223570959986, + "y": 5034.269044887318, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 76.65095252199248, + "height": 12.882513028906299, + "seed": 118962812, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.863.744", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.863.744" + }, + { + "type": "rectangle", + "version": 4393, + "versionNonce": 2026959306, + "isDeleted": false, + "id": "f78JVgELD-T4kp8_Jj0vs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8161.684142951307, + "y": 5054.0267076817245, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.04099507611033, + "height": 12.450350636728704, + "seed": 82623300, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3280, + "versionNonce": 1850173398, + "isDeleted": false, + "id": "0JT-g6JZWPFxNuxfkUu6r", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8445.436239482513, + "y": 5053.801280896015, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 432179964, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-20 07:31:39", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 07:31:39" + }, + { + "type": "rectangle", + "version": 5208, + "versionNonce": 170141834, + "isDeleted": false, + "id": "NBUIuWNc4XNG2JvboYDXY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8161.036259832755, + "y": 5074.737610063176, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.00385353066673, + "height": 12.818491859556932, + "seed": 1102885572, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4103, + "versionNonce": 938999062, + "isDeleted": false, + "id": "NZHUam7V_zPHM7v7CgVb5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8445.619718032356, + "y": 5074.761437771985, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1269812092, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-20 07:31:54", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 07:31:54" + }, + { + "type": "text", + "version": 3124, + "versionNonce": 1633847114, + "isDeleted": false, + "id": "I8NljSc1Ej5eZmuPd1Qrd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8495.225252761273, + "y": 5079.738169129245, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1621211716, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3239, + "versionNonce": 1097067094, + "isDeleted": false, + "id": "fxiYQHuHqHK2Y0jIYFTaw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8495.354234612098, + "y": 5088.558272518532, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1059126268, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3248, + "versionNonce": 1726418442, + "isDeleted": false, + "id": "lVLMbT4bwM9GJgo-CG7Mt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8495.37029904391, + "y": 5097.041066704693, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 2088358340, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4537, + "versionNonce": 694169494, + "isDeleted": false, + "id": "nA69uKhm3de-edu_ff_Og", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8161.689879992006, + "y": 5115.687001831034, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.8318062634003, + "height": 12.779961809929308, + "seed": 2115509372, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1956, + "versionNonce": 1068285130, + "isDeleted": false, + "id": "TqFtnQQLXmpMMb6AFVW4P", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8228.616870832182, + "y": 4762.148022763788, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.088795601172045, + "height": 16.10314128613287, + "seed": 610466116, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 11.103141286132871, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "text", + "version": 3274, + "versionNonce": 1814154454, + "isDeleted": false, + "id": "VTGah6UmKF3WyxnNTkjSk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8246.84904251731, + "y": 4976.755859831664, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 39267580, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3451, + "versionNonce": 961450890, + "isDeleted": false, + "id": "vaQIhw_7918UcsJ953lZs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8247.081251047915, + "y": 4988.848638564923, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1404776644, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3635, + "versionNonce": 926794262, + "isDeleted": false, + "id": "voJjo1Jea8ORPwIAzcH23", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8247.029573935786, + "y": 5000.941762323182, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1029713276, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2114, + "versionNonce": 906465866, + "isDeleted": false, + "id": "G0yG8l61FHIB4slmJTASi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8172.828827363644, + "y": 4785.472025183069, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1780512836, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "​/​clck​.​yandex​.​ru​/​file​.​com​...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "​/​clck​.​yandex​.​ru​/​file​.​com​..." + }, + { + "type": "text", + "version": 2318, + "versionNonce": 1034489686, + "isDeleted": false, + "id": "xkkOvyQRGzKGQcPP9BiS1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.295219528718, + "y": 4832.232231284512, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 544546300, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2434, + "versionNonce": 414365962, + "isDeleted": false, + "id": "QrDUq2t360awQYNrHdvVM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.480039673024, + "y": 4841.1081729672815, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 594595780, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2443, + "versionNonce": 196654230, + "isDeleted": false, + "id": "q9SAAymlcDFjYc0Pc7lYc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.496104104837, + "y": 4849.590967153443, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 613940860, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2266, + "versionNonce": 818612170, + "isDeleted": false, + "id": "PrKooB1iFm1o801REWaIA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8173.037315906295, + "y": 4806.35998572914, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 264910660, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "/clck/jsredircnt=1395412...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "/clck/jsredircnt=1395412..." + }, + { + "type": "text", + "version": 3087, + "versionNonce": 1528934870, + "isDeleted": false, + "id": "yvMEmi5k435cXP1laZZ9K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8173.157527746065, + "y": 4827.373873662075, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1384828668, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal://200906&uinfo=ww-1...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal://200906&uinfo=ww-1..." + }, + { + "type": "text", + "version": 2911, + "versionNonce": 644578954, + "isDeleted": false, + "id": "63EgSRoT_HDMuUHpI2wwW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8172.971844866887, + "y": 4868.232449315619, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 193638084, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 3000, + "versionNonce": 1727596310, + "isDeleted": false, + "id": "tsAGTFbP0w-XzJ-kLhOR4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8172.800305773316, + "y": 4888.695853913638, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1255116668, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 3146, + "versionNonce": 1716460874, + "isDeleted": false, + "id": "pHwG-tUQQ9tOcn4L-VeSz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8173.008794315966, + "y": 4909.716095404579, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 928003652, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 3975, + "versionNonce": 1068741718, + "isDeleted": false, + "id": "qGgn-knVOrfekdGlJBnYg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8173.1290061557365, + "y": 4929.584876606845, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1302872060, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 2694, + "versionNonce": 231793674, + "isDeleted": false, + "id": "tVWzSiFrFBOLZFZnED4Ho", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.26916058402, + "y": 4934.358568952156, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1878576580, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2810, + "versionNonce": 522631574, + "isDeleted": false, + "id": "oqMf6HiKkCCIp8PMPkAEM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.453980728324, + "y": 4943.234510634927, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1125572732, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2819, + "versionNonce": 1458295498, + "isDeleted": false, + "id": "7c1B6_sMO2CvD0KlIyQCU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.470045160137, + "y": 4951.717304821088, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1185051972, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3278, + "versionNonce": 1015486166, + "isDeleted": false, + "id": "FNRZxLXaWjv0s9Mlb8SeX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8172.945785922185, + "y": 4970.18160219486, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1121808636, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​r52-echo/#compose...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​r52-echo/#compose..." + }, + { + "type": "text", + "version": 3536, + "versionNonce": 70969738, + "isDeleted": false, + "id": "6c-jIZNsr2ZM9AJBBht9l", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8172.645493205902, + "y": 5033.211144060343, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 2024484036, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​php?show​/​7...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​php?show​/​7..." + }, + { + "type": "text", + "version": 3684, + "versionNonce": 543804438, + "isDeleted": false, + "id": "pFCsIHHitRi2ZhUtZJA6p", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8172.788797865448, + "y": 5053.708007474698, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 478015868, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​rt​.​com​.​tr​/...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​rt​.​com​.​tr​/..." + }, + { + "type": "text", + "version": 4503, + "versionNonce": 1291397194, + "isDeleted": false, + "id": "iIOgPUeacSb3Alv-V-Vhv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8172.910607244777, + "y": 5074.526293546263, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1739650116, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​rt​.​com​.​tr​/​...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​rt​.​com​.​tr​/​..." + }, + { + "type": "text", + "version": 3219, + "versionNonce": 2026101078, + "isDeleted": false, + "id": "osP2WP8UVaQebr0aNoplx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.114348016607, + "y": 5079.669168184685, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1597661692, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3334, + "versionNonce": 1224838922, + "isDeleted": false, + "id": "Rw7Rk-JjGrXWypyGNqBMs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.243329867428, + "y": 5088.489271573973, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 294767556, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3343, + "versionNonce": 1827290774, + "isDeleted": false, + "id": "V9ZxMTjYixskOBg0dbC48", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.259394299243, + "y": 5096.972065760135, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1645527676, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3525, + "versionNonce": 1557077450, + "isDeleted": false, + "id": "ZE-bxacxCg_SbcKwzaApA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8173.397134463045, + "y": 5115.467923327504, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 141275972, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "res​:​/​/​m​.​me​/​politic/stati...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "res​:​/​/​m​.​me​/​politic/stati..." + }, + { + "type": "text", + "version": 3098, + "versionNonce": 1905392598, + "isDeleted": false, + "id": "NqMAtiDmnyzgkNVxZQd1-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8446.114623448917, + "y": 5115.570542338441, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1271862012, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-19 10:48:46", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-19 10:48:46" + }, + { + "type": "text", + "version": 3336, + "versionNonce": 628937866, + "isDeleted": false, + "id": "9JZrYFWd3UUnq7UP1SuKg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8081.875341800956, + "y": 5116.834445736295, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 77.93920382488311, + "height": 12.882513028906299, + "seed": 1788652228, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.867.680", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.867.680" + }, + { + "type": "text", + "version": 2213, + "versionNonce": 483397910, + "isDeleted": false, + "id": "5584mfvXR9yFZO8g1jmNn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8359.138758031719, + "y": 4761.8211374652055, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 65.70081644742213, + "height": 16.10314128613287, + "seed": 1621083076, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.8825130289063, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 11.103141286132871, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "text", + "version": 3089, + "versionNonce": 1690678090, + "isDeleted": false, + "id": "O9Kvj6eLM6H6hmPPvWNo9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8383.168888977889, + "y": 4976.702788032109, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1291995772, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3268, + "versionNonce": 2048491094, + "isDeleted": false, + "id": "xve1-V0HBTOqzzQos71oI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8383.168888977889, + "y": 4988.79556676537, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 855288644, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3452, + "versionNonce": 1829026314, + "isDeleted": false, + "id": "R6_Ze1cuukQW2r5fD3SST", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8383.168888977889, + "y": 5000.888690523628, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 265001724, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2105, + "versionNonce": 1581466518, + "isDeleted": false, + "id": "CMYpBijGLpfUgY23dKLjA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8349.674355102732, + "y": 4785.654361675235, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1485611716, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.644.125.792", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.644.125.792" + }, + { + "type": "text", + "version": 2379, + "versionNonce": 221571274, + "isDeleted": false, + "id": "QbmJIOUGJnQOJUlO78ZxI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8386.389517235117, + "y": 4833.027222989542, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1041685372, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2511, + "versionNonce": 998400214, + "isDeleted": false, + "id": "cV8PN7qA8BJw_lONOJwOq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8386.389517235117, + "y": 4841.903164672314, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 2012457540, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2520, + "versionNonce": 2096185226, + "isDeleted": false, + "id": "Q8qmim-K5AsAoL15OvtG8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8386.389517235117, + "y": 4850.3859588584755, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1915096060, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2254, + "versionNonce": 1970001430, + "isDeleted": false, + "id": "sqcEz8otkdaSy92f5nfaL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8349.674355102732, + "y": 4806.3627732579425, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 873316804, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.550.392.492", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.550.392.492" + }, + { + "type": "text", + "version": 3073, + "versionNonce": 1215610442, + "isDeleted": false, + "id": "d97TU4XaCU4To7bOVfpfI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8349.674355102732, + "y": 4827.376661190876, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 771435644, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2.479.498.648", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "2.479.498.648" + }, + { + "type": "text", + "version": 2889, + "versionNonce": 888447830, + "isDeleted": false, + "id": "Zc6JvrIVPgzc5jZnoFfil", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8343.877224239724, + "y": 4868.170052961317, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 603515204, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 2994, + "versionNonce": 1016751370, + "isDeleted": false, + "id": "SMKGMZrd45opis06sl9wx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8343.877224239724, + "y": 4888.744458960766, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 1666727164, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 3134, + "versionNonce": 1014089878, + "isDeleted": false, + "id": "Yrk7GMG7j8BZKuvoSTm0d", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8343.877224239724, + "y": 4909.718882933382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 1259544772, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 3966, + "versionNonce": 1390228426, + "isDeleted": false, + "id": "II9RfHWQ2KMFRkc67os3I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8343.877224239724, + "y": 4929.524397425575, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 2076130684, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 2750, + "versionNonce": 999835094, + "isDeleted": false, + "id": "cnt3z3GTBhQ09J3B0WNhJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8385.74539158367, + "y": 4935.153560657187, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 284846148, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2870, + "versionNonce": 492317322, + "isDeleted": false, + "id": "IC0t4QlFORaU1qJEw5tKY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8385.74539158367, + "y": 4944.029502339959, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1618095612, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2879, + "versionNonce": 595401494, + "isDeleted": false, + "id": "cVweW6Adrgs2fPfcLmsPy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8385.74539158367, + "y": 4952.512296526121, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 965525444, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3264, + "versionNonce": 851855690, + "isDeleted": false, + "id": "NImXcG7vkVN2hWfxkLr-1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8349.674355102732, + "y": 4970.184389723663, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 41094780, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.524.699.296", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.524.699.296" + }, + { + "type": "text", + "version": 3523, + "versionNonce": 2056603734, + "isDeleted": false, + "id": "ScGYzx9UzD1vz14-Pv7Sp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8349.532198432586, + "y": 5033.102930187718, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1558718276, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.878.658.680", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.878.658.680" + }, + { + "type": "text", + "version": 3664, + "versionNonce": 444764170, + "isDeleted": false, + "id": "3LuSvU6DtPYErlO3xi9Os", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8349.59738231569, + "y": 5053.775978886604, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1652809468, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "3.849.470.917", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.849.470.917" + }, + { + "type": "text", + "version": 4488, + "versionNonce": 817221014, + "isDeleted": false, + "id": "_elyFz5agi2d_FEa7otku", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8349.59738231569, + "y": 5074.605767996367, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1600822980, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "3.849.470.917", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.849.470.917" + }, + { + "type": "text", + "version": 3277, + "versionNonce": 948436682, + "isDeleted": false, + "id": "1FnWGMB9u8Yn0ymZOeQc7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8385.668418796628, + "y": 5080.464159889717, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 421961596, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3393, + "versionNonce": 1930668758, + "isDeleted": false, + "id": "cTGrtsFamyu4xzfDALDIN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8385.668418796628, + "y": 5089.3401015724885, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1773282884, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3402, + "versionNonce": 963745162, + "isDeleted": false, + "id": "ARbFnzkoEspeQP1sNUI41", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8385.668418796628, + "y": 5097.82289575865, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1587367932, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3417, + "versionNonce": 4448278, + "isDeleted": false, + "id": "OD9F4CaDCaf5P6aTtaULQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8349.59738231569, + "y": 5115.53589473941, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1620884932, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "3.560.941.935", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.560.941.935" + }, + { + "type": "text", + "version": 2666, + "versionNonce": 2121946186, + "isDeleted": false, + "id": "n3pvWNSkHIM7joRjUTmx2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8446.886589110118, + "y": 4909.934950515223, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 317321340, + "groupIds": [ + "KqZQ05ORsE1ZUyjHC_Ufe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:32:43", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:32:43" + }, + { + "type": "rectangle", + "version": 2138, + "versionNonce": 2084269398, + "isDeleted": false, + "id": "5-H16PQoIjD4ZQIblkmti", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8164.543208936322, + "y": 4090.473777544993, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 81.82694091047381, + "height": 382.16963157670887, + "seed": 1291159108, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1720, + "versionNonce": 159202058, + "isDeleted": false, + "id": "HnNLeCfvm6fBi4fEXF4Au", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8173.968324587369, + "y": 4093.967431264302, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 65.70885890457433, + "height": 16.105112476611357, + "seed": 1270870012, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 11.105112476611357, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "rectangle", + "version": 2513, + "versionNonce": 1146049174, + "isDeleted": false, + "id": "nfjCIlO8AyrqyBB_r2DOo", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8441.86742345065, + "y": 4088.760661249503, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 120.81681727502402, + "height": 383.9914959088835, + "seed": 1148460484, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2452, + "versionNonce": 1760905674, + "isDeleted": false, + "id": "VIndRubLnsp77kVrLqxW3", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8261.617465615525, + "y": 4089.772951695516, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 166.790711563602, + "height": 382.719059225012, + "seed": 45650044, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2661, + "versionNonce": 1127518166, + "isDeleted": false, + "id": "ra_mwfEPuhceTu0DMEKdR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8160.078823856897, + "y": 4117.787634294618, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.7486781931217, + "height": 12.915967205330695, + "seed": 255051076, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1602, + "versionNonce": 603816074, + "isDeleted": false, + "id": "SicCtOVCveHa_fR5EUR1B", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8200.57821506552, + "y": 4117.803572906639, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 43.805905936382885, + "height": 12.884089981289083, + "seed": 46735612, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "240.923", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 1668, + "versionNonce": 1157637398, + "isDeleted": false, + "id": "5etj8mlI95-RFAaS7iCdY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8265.628449444059, + "y": 4117.803572906639, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 1116896452, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 1427, + "versionNonce": 642834250, + "isDeleted": false, + "id": "YPcWUleALYB0NWSJIaK3z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8444.230081571084, + "y": 4118.6680301520355, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1131651452, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-23 04:39:21", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-23 04:39:21" + }, + { + "type": "text", + "version": 1522, + "versionNonce": 1260851798, + "isDeleted": false, + "id": "UhralLSWCEfXttinDw2hv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8321.423321944158, + "y": 4094.2971444470377, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.09431493451179, + "height": 16.105112476611357, + "seed": 405685316, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 11.105112476611357, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "text", + "version": 1649, + "versionNonce": 743073290, + "isDeleted": false, + "id": "jDAufKiD0BGFnHDHS-DKu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8453.183757197963, + "y": 4094.389413320603, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 83.74658487837905, + "height": 16.105112476611357, + "seed": 2079986172, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 1, + "text": "EventTime.bin", + "baseline": 11.105112476611357, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "EventTime.bin" + }, + { + "type": "text", + "version": 1794, + "versionNonce": 1618892694, + "isDeleted": false, + "id": "gL-15ZB9q_ehT-G6sSrYF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8125.919863161142, + "y": 4119.311997768389, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.633406956964894, + "height": 12.884089981289083, + "seed": 1709513668, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 0", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 1882, + "versionNonce": 786765002, + "isDeleted": false, + "id": "I2JiSUqH_-g3_t0Wrn0JC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8201.222419564583, + "y": 4165.182233147472, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 727609980, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2014, + "versionNonce": 1832580310, + "isDeleted": false, + "id": "LiRFN3GfCwsONuiUEAsRm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8201.222419564583, + "y": 4174.059261336996, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 366281540, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2023, + "versionNonce": 1337715594, + "isDeleted": false, + "id": "OXU8eEFbGyi3-SNmIsR4j", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8201.222419564583, + "y": 4182.543093904603, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 543343356, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1880, + "versionNonce": 183626262, + "isDeleted": false, + "id": "QbPomE02QBrH75jySEDS6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8341.104079473414, + "y": 4164.389931997287, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 509344452, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1996, + "versionNonce": 1158277706, + "isDeleted": false, + "id": "z6aYCXY6zg7TIuLXq5RsY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8341.28892224161, + "y": 4173.266960186809, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 25756540, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2005, + "versionNonce": 1486370646, + "isDeleted": false, + "id": "7POB5mehMLTlo6AuMsMbt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8341.304988639875, + "y": 4181.750792754417, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 2048393796, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1926, + "versionNonce": 1168773386, + "isDeleted": false, + "id": "DIqWkKTZTNTD5Z3mltXKs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.231240654995, + "y": 4164.421501677994, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1427321852, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2042, + "versionNonce": 1317198998, + "isDeleted": false, + "id": "DgKPLNlnKK1Um294lbiC2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.416083423193, + "y": 4173.298529867517, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 535239108, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2051, + "versionNonce": 1964466122, + "isDeleted": false, + "id": "8rLzyg5GPxf2d-k99g2-Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.432149821458, + "y": 4181.782362435123, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 151213180, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2596, + "versionNonce": 308730326, + "isDeleted": false, + "id": "_rYCxJorKZ5maZK7omNpT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8198.001397069262, + "y": 4308.875385560154, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 2061975876, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 2771, + "versionNonce": 1332532874, + "isDeleted": false, + "id": "ZMCK_glr_Mxp8iLUTlUJG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8160.190157386944, + "y": 4138.546533915479, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.06403689613023, + "height": 12.820060975088683, + "seed": 2065392892, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1753, + "versionNonce": 1264135958, + "isDeleted": false, + "id": "k8-9t15onY56r1Ei5OcsA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8200.57821506552, + "y": 4138.514519412379, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 43.805905936382885, + "height": 12.884089981289083, + "seed": 1651931332, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "258.382", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 1816, + "versionNonce": 358970698, + "isDeleted": false, + "id": "DJjZ811bNOg2-sqablL7b", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8265.836963507856, + "y": 4138.514519412379, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 14509436, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 1580, + "versionNonce": 1976491094, + "isDeleted": false, + "id": "fHvdpBpz9rouiOt1Ymnxc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8444.438595634881, + "y": 4138.570364541045, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 305315908, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 01:03:28", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:03:28" + }, + { + "type": "text", + "version": 1940, + "versionNonce": 945568778, + "isDeleted": false, + "id": "m-atRuda2BodxLUtBrBGC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8126.128377224939, + "y": 4139.986794293315, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 25.123975463513712, + "height": 12.884089981289083, + "seed": 1871402492, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 1", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "rectangle", + "version": 3548, + "versionNonce": 933028246, + "isDeleted": false, + "id": "EGbWldjPMGXB_pqwy-H-R", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8160.256927092125, + "y": 4159.484985026341, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.3348709316003, + "height": 12.976079252205857, + "seed": 570038212, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728755, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2572, + "versionNonce": 1179396810, + "isDeleted": false, + "id": "2oG4TBuSQavzr0N7ScGLp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8200.57821506552, + "y": 4159.530979661799, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 43.805905936382885, + "height": 12.884089981289083, + "seed": 606549628, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "258.382", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 2640, + "versionNonce": 871907030, + "isDeleted": false, + "id": "aMHVg-PTa9_NSpeJuBa8R", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8265.957190062794, + "y": 4159.530979661799, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 2112520004, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 2383, + "versionNonce": 1439711626, + "isDeleted": false, + "id": "LsSqilbUJJsE6lpwRIfBM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8444.558822189822, + "y": 4159.5868247904655, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 192087804, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 01:04:08", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:04:08" + }, + { + "type": "text", + "version": 2762, + "versionNonce": 1601565718, + "isDeleted": false, + "id": "39z68M3DBH2LW0lHSl4gJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8125.604399280814, + "y": 4161.049329156392, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.633406956964894, + "height": 12.884089981289083, + "seed": 1583478468, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 2", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "rectangle", + "version": 3293, + "versionNonce": 1914929226, + "isDeleted": false, + "id": "oiLAUvleaLAUW14fxl_m8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8159.92684653236, + "y": 4200.43264078368, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.17957428251805, + "height": 12.820060975088683, + "seed": 703645564, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2389, + "versionNonce": 1410007382, + "isDeleted": false, + "id": "3i9LtVbVWN0B3OAXyjvLF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8188.982534082359, + "y": 4200.459748688442, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 1073643076, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2457, + "versionNonce": 119596810, + "isDeleted": false, + "id": "4mRMuYBVgyrkkqOqJ7VPx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8265.771484454117, + "y": 4200.459748688442, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 602044412, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 2205, + "versionNonce": 621569686, + "isDeleted": false, + "id": "2P7AUnzIXk5JdD5RWTUpt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8444.373116581144, + "y": 4200.515593817109, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1537086916, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 00:26:41", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:26:41" + }, + { + "type": "text", + "version": 2568, + "versionNonce": 1296266698, + "isDeleted": false, + "id": "_eqCnGsttVViwydviHEDH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8108.025172197396, + "y": 4201.841995441781, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.09431493451179, + "height": 12.884089981289083, + "seed": 1162483836, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.191", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.191" + }, + { + "type": "rectangle", + "version": 3404, + "versionNonce": 858727382, + "isDeleted": false, + "id": "OdhN-IRm8XPo4dn_69uvh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8160.288622465139, + "y": 4220.841724968625, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.6833795189834, + "height": 13.075537174306843, + "seed": 509525316, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2491, + "versionNonce": 900082826, + "isDeleted": false, + "id": "223sA0kmQvs5PxqC1ju_u", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8188.982534082359, + "y": 4220.937448565134, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 166308092, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2558, + "versionNonce": 8927510, + "isDeleted": false, + "id": "md2vH6dKKcdsdbGvXjo2F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8265.599924362394, + "y": 4220.937448565134, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 564032708, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 2307, + "versionNonce": 1443105610, + "isDeleted": false, + "id": "hvH6KQeT0QqZyFXN0aE8k", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8444.20155648942, + "y": 4220.9932936938, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 625158524, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 00:27:07", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:27:07" + }, + { + "type": "text", + "version": 2658, + "versionNonce": 76326486, + "isDeleted": false, + "id": "8N0q7emNnWmuhq2yg91pP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8107.209407606606, + "y": 4222.5374615456785, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49.603746427962975, + "height": 12.884089981289083, + "seed": 586890308, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.192", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.192" + }, + { + "type": "rectangle", + "version": 3618, + "versionNonce": 1421349386, + "isDeleted": false, + "id": "UijtMLcj2YGnWZ-0DM7BZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8160.568368924351, + "y": 4242.466237193215, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.87032863990953, + "height": 11.872141895465793, + "seed": 177773052, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2635, + "versionNonce": 1141654, + "isDeleted": false, + "id": "OFA7GNpthSbpEzV3bjppf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8188.982534082359, + "y": 4241.960263150304, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 2085819332, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2706, + "versionNonce": 1421689034, + "isDeleted": false, + "id": "CCkv3Akfm9D7Wfv8scNK2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8265.808438426191, + "y": 4241.960263150304, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 1961622140, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4475, + "versionNonce": 1363904726, + "isDeleted": false, + "id": "RtmmAgRfBCrHxo8PiUyan", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8160.817508706956, + "y": 4263.27177943567, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.4196986448144, + "height": 12.453753189444956, + "seed": 465828676, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3463, + "versionNonce": 1638832010, + "isDeleted": false, + "id": "gXJy-C-R10lkpMWD_0YTB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8188.982534082359, + "y": 4263.0566110397485, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 1862224636, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 3530, + "versionNonce": 1204813334, + "isDeleted": false, + "id": "7Rt67uyoLzvrWDqxSy7rr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8265.928664981131, + "y": 4263.0566110397485, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 2074866372, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 3275, + "versionNonce": 1539774026, + "isDeleted": false, + "id": "ouNV5B-xDgmg-wJ5WqRvq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8444.530297108156, + "y": 4263.112456168415, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1532267388, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 12:25:12", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:25:12" + }, + { + "type": "text", + "version": 2248, + "versionNonce": 2022951766, + "isDeleted": false, + "id": "_coMNt7V4NVIkO6UQcb6o", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8200.57821506552, + "y": 4268.686463338962, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 447281732, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2368, + "versionNonce": 1675738378, + "isDeleted": false, + "id": "FXYLBDI6jkoZxLePhdMy6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8200.57821506552, + "y": 4277.563491528486, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 2083372028, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2377, + "versionNonce": 300675222, + "isDeleted": false, + "id": "FKPP6B-ub-5ZwQ1JITe8z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8200.57821506552, + "y": 4286.047324096093, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1939411396, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2251, + "versionNonce": 1199147978, + "isDeleted": false, + "id": "pXE_Vb1LThYWfpg-sseTU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8341.07801733883, + "y": 4267.894162188777, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 2072829052, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2367, + "versionNonce": 797797846, + "isDeleted": false, + "id": "UpbmEzy2iNh8CL64Ap0n4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8341.262860107026, + "y": 4276.771190378299, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1973041476, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2376, + "versionNonce": 1823048330, + "isDeleted": false, + "id": "X0xjqF5lL0dXgMfocKLKy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8341.27892650529, + "y": 4285.255022945907, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1932782844, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2297, + "versionNonce": 781009686, + "isDeleted": false, + "id": "0fswizsqIMXnlSH0jg1__", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.205178520411, + "y": 4267.925731869484, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 2081059012, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2413, + "versionNonce": 1043112266, + "isDeleted": false, + "id": "77IZEo25LdPIVbiqZzbhN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.39002128861, + "y": 4276.802760059006, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1956965756, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2422, + "versionNonce": 23097430, + "isDeleted": false, + "id": "SRRxPQdorEpl4EAeFMdF2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.406087686873, + "y": 4285.286592626613, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1183299652, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3717, + "versionNonce": 392030218, + "isDeleted": false, + "id": "tUYk9IUYIjII8pdITVhw-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8160.021103153846, + "y": 4303.530285736582, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 408.0749706946756, + "height": 13.266679588124175, + "seed": 287432188, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2761, + "versionNonce": 64746902, + "isDeleted": false, + "id": "du5MaoTWL5p-RgRACoBhT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8182.540489091714, + "y": 4303.72158054, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 61.843631910187604, + "height": 12.884089981289083, + "seed": 1894780868, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "10.487.847", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "10.487.847" + }, + { + "type": "text", + "version": 2831, + "versionNonce": 808998602, + "isDeleted": false, + "id": "HnPioX-NmSD9mPg6Y03CL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8265.745422319533, + "y": 4303.72158054, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 1638710908, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http://doc/1437831&is_mo...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http://doc/1437831&is_mo..." + }, + { + "type": "text", + "version": 2576, + "versionNonce": 1328861910, + "isDeleted": false, + "id": "zhTWjAXWx0AfDBCK67uVj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8444.34705444656, + "y": 4303.777425668666, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1801549636, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-17 05:50:01", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-17 05:50:01" + }, + { + "type": "text", + "version": 2918, + "versionNonce": 156691850, + "isDeleted": false, + "id": "zaFVWh9X8Iu4JTtIpWxLT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8100.2686560740385, + "y": 4305.346225633272, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56.68999591767197, + "height": 12.884089981289083, + "seed": 252153596, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 16.383", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 16.383" + }, + { + "type": "text", + "version": 2775, + "versionNonce": 234883094, + "isDeleted": false, + "id": "DwtKLXA8mAgAtk8R4DXK9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8198.001397069262, + "y": 4320.969644574178, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1916399300, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2959, + "versionNonce": 1475652682, + "isDeleted": false, + "id": "hzYdOLT7hR0JmFlA15GE_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8198.001397069262, + "y": 4333.064248655436, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1504989052, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2840, + "versionNonce": 1345492310, + "isDeleted": false, + "id": "qfCsU-Jmig9Y32VjsFl0S", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8339.657725435032, + "y": 4308.931251726268, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 102200900, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3017, + "versionNonce": 1911329546, + "isDeleted": false, + "id": "w8atK3lzklq62XGgZBSxu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8339.889962390356, + "y": 4321.025510740293, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 569704444, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3201, + "versionNonce": 1596029590, + "isDeleted": false, + "id": "dIbHx1-Z6uXRZdjNp8D9u", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8339.838278952415, + "y": 4333.1201148215505, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1675103684, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2903, + "versionNonce": 968466890, + "isDeleted": false, + "id": "9s1rO8PxQNmwy-hYMhFwh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8493.28168968378, + "y": 4308.915314375379, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1875615868, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3080, + "versionNonce": 293713878, + "isDeleted": false, + "id": "bx1wVaoiWTaf-q9YqVw12", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8493.513926639103, + "y": 4321.009573389404, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 2090448196, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3264, + "versionNonce": 175560842, + "isDeleted": false, + "id": "f3TQcnoMBR_Z2oNqVxJ9P", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8493.462243201162, + "y": 4333.104177470662, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 2063216892, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4087, + "versionNonce": 526929174, + "isDeleted": false, + "id": "exAsU_Q8cO859ieYnteEU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8161.297112694359, + "y": 4365.452041520142, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.5349404945144, + "height": 12.5448702900298, + "seed": 1840934084, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3022, + "versionNonce": 601831242, + "isDeleted": false, + "id": "dSI8PDxoRgJe-ZqN1j3On", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8164.502763117909, + "y": 4365.282431674513, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 855814524, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3090, + "versionNonce": 1984576086, + "isDeleted": false, + "id": "_IL1NZ-X8U3RnmwgE1vXF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8265.522075053634, + "y": 4365.282431674513, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 2027435076, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 2835, + "versionNonce": 374193674, + "isDeleted": false, + "id": "_wiKXkinUtPkIw0RVqaet", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8444.123707180659, + "y": 4365.338276803179, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1193746940, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-22 16:22:00", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 16:22:00" + }, + { + "type": "text", + "version": 3147, + "versionNonce": 217874326, + "isDeleted": false, + "id": "XOHaqa42PkHAC_HEl-8Zu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8080.074969337138, + "y": 4366.4140372783195, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 76.66033538867005, + "height": 12.884089981289083, + "seed": 2077297604, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.863.744", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.863.744" + }, + { + "type": "rectangle", + "version": 4096, + "versionNonce": 784166090, + "isDeleted": false, + "id": "Ctm0h5VnfpqJcZO29PVyv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8160.545390531826, + "y": 4386.174118614305, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.0906986792239, + "height": 12.451874687980121, + "seed": 778666620, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3166, + "versionNonce": 934550742, + "isDeleted": false, + "id": "bMknO3jgMotthVkocvvTB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8164.502763117909, + "y": 4385.958010967651, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 1757606724, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3243, + "versionNonce": 1657357194, + "isDeleted": false, + "id": "MzBfcD3cZHYD8WfcNEz9M", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8265.730589117431, + "y": 4385.958010967651, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 797692668, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 2981, + "versionNonce": 2080772630, + "isDeleted": false, + "id": "U8WZgRjUXECE7emqki-S0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8444.332221244456, + "y": 4386.013856096318, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1040968388, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-22 18:02:12", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 18:02:12" + }, + { + "type": "rectangle", + "version": 4907, + "versionNonce": 1017922122, + "isDeleted": false, + "id": "q9Yg7QYhvg2dfGMNn0Tgv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8159.8974281057035, + "y": 4406.887556223689, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.05367499757995, + "height": 12.820060975088683, + "seed": 1762661244, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3989, + "versionNonce": 1692884822, + "isDeleted": false, + "id": "qy7h07retrv7hCuomrChz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8164.502763117909, + "y": 4406.855541720589, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 2118775364, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 4062, + "versionNonce": 1195469066, + "isDeleted": false, + "id": "mfzYWRJrS_kOhJE7AzuRE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8265.787221545199, + "y": 4406.855541720589, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 1496859644, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​sozcu​.​com​.​tr​/​oaut...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sozcu​.​com​.​tr​/​oaut..." + }, + { + "type": "text", + "version": 3804, + "versionNonce": 1454179478, + "isDeleted": false, + "id": "xX7l4AMXxcwjCCKt1Ju1e", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8444.452447799396, + "y": 4406.911386849255, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 677054916, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-19 00:09:42", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-19 00:09:42" + }, + { + "type": "text", + "version": 2780, + "versionNonce": 2047064010, + "isDeleted": false, + "id": "o5wl0ubOB494-FQTl1e1w", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8200.57821506552, + "y": 4412.649458879209, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1711694972, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2896, + "versionNonce": 1661731286, + "isDeleted": false, + "id": "HUj9ygNCZk9YBSOFL3Oyx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8200.57821506552, + "y": 4421.526487068733, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 794636612, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2905, + "versionNonce": 621686410, + "isDeleted": false, + "id": "SgdnWHdrjzaLglwZbP-z_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8200.57821506552, + "y": 4430.010319636341, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1698460924, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2781, + "versionNonce": 488199958, + "isDeleted": false, + "id": "tgwqzJs6reSQ8BwnH6rks", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8341.00016803007, + "y": 4411.857157729024, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1924032708, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2896, + "versionNonce": 1562103114, + "isDeleted": false, + "id": "-8gQ287vjpgaJF1FS6S2L", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8341.1291656696, + "y": 4420.67834078988, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 610039164, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2905, + "versionNonce": 1833567318, + "isDeleted": false, + "id": "EPZ1FPo1way9vjvQt57v6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8341.145232067865, + "y": 4429.1621733574875, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 904704068, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2827, + "versionNonce": 1736938506, + "isDeleted": false, + "id": "GYHImLEs5SAWd3ZMZTkKc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.12732921165, + "y": 4411.8887274097315, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1890084348, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2942, + "versionNonce": 1702037910, + "isDeleted": false, + "id": "ghoL38oTRlwZJRUWVypuy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.256326851182, + "y": 4420.709910470587, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 418777028, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2951, + "versionNonce": 642548426, + "isDeleted": false, + "id": "HwJMFBWnRzTv-8ezhhzEu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8494.272393249446, + "y": 4429.193743038194, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 522339964, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4240, + "versionNonce": 348743382, + "isDeleted": false, + "id": "uSconJ3cXahhwx9h4herL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8160.551128274799, + "y": 4447.841960619189, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.881484259647, + "height": 12.78152620898583, + "seed": 266891076, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2918, + "versionNonce": 67475850, + "isDeleted": false, + "id": "WWqexOkF8TOjOhoPnyVNB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8164.502763117909, + "y": 4447.790678733038, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 344725244, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.294.961.484", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.294.961.484" + }, + { + "type": "text", + "version": 3078, + "versionNonce": 1541544982, + "isDeleted": false, + "id": "fJd-8RUnGnuVrAjT4cZse", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8266.273808319413, + "y": 4447.790678733038, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 1528948420, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "https​:​/​/​m​.​sport​.​airway​/​?...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​m​.​sport​.​airway​/​?..." + }, + { + "type": "text", + "version": 2799, + "versionNonce": 1609422922, + "isDeleted": false, + "id": "HBLDeQoWpyHplcLXKzTEN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8445.01068825205, + "y": 4447.790678733038, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1298651004, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 12:05:41", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:05:41" + }, + { + "type": "text", + "version": 3038, + "versionNonce": 1085417814, + "isDeleted": false, + "id": "xWXRy-GEKUQe5h6-ngIiw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8080.726819961577, + "y": 4448.989544983412, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 77.94874438679896, + "height": 12.884089981289083, + "seed": 2134928964, + "groupIds": [ + "SFjs2eP4Qk18T47rjVn5-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.867.680", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.867.680" + }, + { + "type": "rectangle", + "version": 4594, + "versionNonce": 2044739338, + "isDeleted": false, + "id": "tLLMWNqbQJQBg289zzcvL", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8628.889204560171, + "y": 4208.455819988283, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 313.4067189003712, + "height": 175.64125101319777, + "seed": 240255044, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3543, + "versionNonce": 1116638870, + "isDeleted": false, + "id": "WoZuW6EiWStyGlbffEhtN", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8644.341818150597, + "y": 4245.269835210445, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 85.99405190947766, + "height": 126.9568483897424, + "seed": 939529724, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3006, + "versionNonce": 1582812618, + "isDeleted": false, + "id": "ZZmzvsAD55e4l0vCrUmSy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8664.140875455123, + "y": 4248.897928361612, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49.96193427251357, + "height": 17.347893844622767, + "seed": 1479628740, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "UserID", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "rectangle", + "version": 3817, + "versionNonce": 774654934, + "isDeleted": false, + "id": "TwARQcO_ozN7_xXiWlyZL", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8747.57229039697, + "y": 4244.312802203882, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 178.33606526040433, + "height": 127.6265329471055, + "seed": 259708, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4672, + "versionNonce": 1383040138, + "isDeleted": false, + "id": "QZ7vKFM6_GLD0TlYFTakW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8638.725851902398, + "y": 4272.892745435941, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.2149724420926, + "height": 14.849725943301076, + "seed": 1798946628, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2841, + "versionNonce": 1906336022, + "isDeleted": false, + "id": "tvMygkREm3tH0LeW6EnH7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8680.962251018516, + "y": 4275.317042413032, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 47.186271257373924, + "height": 13.878315075698213, + "seed": 1303889660, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "240.923", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 2945, + "versionNonce": 1071801162, + "isDeleted": false, + "id": "KOSGU46wM-Yy34eNia9Ct", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8749.689727335766, + "y": 4274.4496477208, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 176.9485172151522, + "height": 13.878315075698213, + "seed": 1607022276, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 2802, + "versionNonce": 1885326934, + "isDeleted": false, + "id": "tMfnXCr5mOiOA5Mgypdhy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8818.056950887241, + "y": 4249.192929960411, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 28.450545905181336, + "height": 17.347893844622767, + "seed": 1167951740, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "URL", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "text", + "version": 3092, + "versionNonce": 554396170, + "isDeleted": false, + "id": "vGCIGLDFnE7HQsE6VVnAq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8684.89807604402, + "y": 4303.402850575718, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 310230596, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3208, + "versionNonce": 1463784342, + "isDeleted": false, + "id": "99TdHICzQ0lqFqOKuC8Pw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8685.09718255292, + "y": 4312.964891381781, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 737622012, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3217, + "versionNonce": 1826986186, + "isDeleted": false, + "id": "HSz2waOXLDV6epfNcgTPW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8685.114488745097, + "y": 4322.103394884451, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 473257412, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3179, + "versionNonce": 1886695638, + "isDeleted": false, + "id": "qGfv5ZeYCiqJsAJ41Np0F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8832.317253638486, + "y": 4302.489255490206, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 1824970876, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3295, + "versionNonce": 51113866, + "isDeleted": false, + "id": "V2gu_TxL3PSdpAZ4_w7z-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8832.516360147383, + "y": 4312.0512962962675, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 1242430788, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3304, + "versionNonce": 2006197782, + "isDeleted": false, + "id": "ydD1HKsXFz6YEomSK6Bsl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8832.533666339561, + "y": 4321.189799798937, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 600729852, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4315, + "versionNonce": 398028362, + "isDeleted": false, + "id": "qf0yhexwBjimhSLkqph-5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8639.03448520786, + "y": 4295.599359568441, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.43970652144327, + "height": 14.3292891279627, + "seed": 358986948, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2993, + "versionNonce": 1838347094, + "isDeleted": false, + "id": "UqpW8hB8t97_OtXbc7WPg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8668.089195610477, + "y": 4296.199417083434, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 59.676754825502314, + "height": 13.878315075698213, + "seed": 613411196, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 3088, + "versionNonce": 533271818, + "isDeleted": false, + "id": "FDV27XyimCkqP5y0RbpaT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8751.302163287988, + "y": 4295.931861467188, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 131.843993219133, + "height": 13.878315075698213, + "seed": 467303492, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 11.102652060558569, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4210, + "versionNonce": 1824921750, + "isDeleted": false, + "id": "m3dAQmkvd0DAYuhgjbXAk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8639.75394332215, + "y": 4337.34911017225, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.9532436062755, + "height": 14.755593905678678, + "seed": 38623740, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3152, + "versionNonce": 1018553290, + "isDeleted": false, + "id": "yTgOQagoQjaZuexlO2k0G", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8644.521602342294, + "y": 4338.482118985213, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 86.04555346932892, + "height": 13.878315075698213, + "seed": 390747076, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3260, + "versionNonce": 2095224278, + "isDeleted": false, + "id": "jdjij0FkzNjIAx7aUirKV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8749.845797463124, + "y": 4337.978642731308, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 176.9485172151522, + "height": 13.878315075698213, + "seed": 403225212, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 3072, + "versionNonce": 681237130, + "isDeleted": false, + "id": "n5yXnT6yEzdfdGOIRUMZV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8749.151144502997, + "y": 4214.437756282874, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70.08549113227598, + "height": 17.347893844622767, + "seed": 1439906628, + "groupIds": [ + "7EauSx6LMJIRyWpUtln5B" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728756, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "rectangle", + "version": 2235, + "versionNonce": 974062666, + "isDeleted": false, + "id": "tMJHH9xDGv7l-YOVB9Olh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8154.5483900876625, + "y": 5801.4695152643535, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 81.82694091047381, + "height": 382.16963157670887, + "seed": 962946684, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1817, + "versionNonce": 1971961174, + "isDeleted": false, + "id": "QTDJG-6VzZ9ZwERAzL994", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8163.97350573871, + "y": 5804.963168983663, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 65.70885890457433, + "height": 16.105112476611357, + "seed": 115822404, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 11.105112476611357, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "rectangle", + "version": 2610, + "versionNonce": 1325132554, + "isDeleted": false, + "id": "z6GNnLrwh40CDh9qaXalO", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8431.872604601991, + "y": 5799.756398968863, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 120.81681727502402, + "height": 383.9914959088835, + "seed": 963327740, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2549, + "versionNonce": 525574806, + "isDeleted": false, + "id": "CvO-ZTWVJmnoVB20GDlf0", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8251.622646766866, + "y": 5800.7686894148765, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 166.790711563602, + "height": 382.719059225012, + "seed": 1329907396, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2758, + "versionNonce": 1797126602, + "isDeleted": false, + "id": "N3e0tK-nGSqKjveCswdfw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8150.084005008237, + "y": 5828.783372013978, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.7486781931217, + "height": 12.915967205330695, + "seed": 1231222652, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1699, + "versionNonce": 1496244182, + "isDeleted": false, + "id": "0CqvMrOtiLf5KThIAD4eO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8190.58339621686, + "y": 5828.799310625999, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 43.805905936382885, + "height": 12.884089981289083, + "seed": 738676292, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "240.923", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 1765, + "versionNonce": 1032859786, + "isDeleted": false, + "id": "51qBjF1iCt5vwPO94Hpti", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8255.6336305954, + "y": 5828.799310625999, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 1972283388, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 1524, + "versionNonce": 1194358038, + "isDeleted": false, + "id": "3PJqxIpSSrF87oji1ekoj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8434.235262722425, + "y": 5829.663767871395, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1846339012, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-23 04:39:21", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-23 04:39:21" + }, + { + "type": "text", + "version": 1619, + "versionNonce": 1510838090, + "isDeleted": false, + "id": "nyTumWhlHJmboxX9angpn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8311.428503095498, + "y": 5805.292882166398, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.09431493451179, + "height": 16.105112476611357, + "seed": 1911572604, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 11.105112476611357, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "text", + "version": 1746, + "versionNonce": 1120756310, + "isDeleted": false, + "id": "cCDYA7WGkGb-EkALX5mt7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8443.188938349303, + "y": 5805.3851510399645, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 83.74658487837905, + "height": 16.105112476611357, + "seed": 443780420, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 1, + "text": "EventTime.bin", + "baseline": 11.105112476611357, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "EventTime.bin" + }, + { + "type": "text", + "version": 1891, + "versionNonce": 619779594, + "isDeleted": false, + "id": "OUhG7K13uhTVIfbOW1sG6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8115.925044312482, + "y": 5830.307735487749, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.633406956964894, + "height": 12.884089981289083, + "seed": 575265020, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 0", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 1979, + "versionNonce": 786081686, + "isDeleted": false, + "id": "cJnH18CbtyfkxB4Lp1gGb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8191.2276007159235, + "y": 5876.177970866832, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1654211780, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2111, + "versionNonce": 1060488394, + "isDeleted": false, + "id": "ndcf2a1JEpeOAJwB0u1u5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8191.2276007159235, + "y": 5885.054999056357, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 572348796, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2120, + "versionNonce": 1267549398, + "isDeleted": false, + "id": "XoQ3Vtdh3dC4snmoTvvQE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8191.2276007159235, + "y": 5893.538831623963, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 471600196, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 1977, + "versionNonce": 1920375690, + "isDeleted": false, + "id": "8gA_vCpXXRPyOAnTxv2Tm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8331.109260624755, + "y": 5875.3856697166475, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1286392316, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2093, + "versionNonce": 175782422, + "isDeleted": false, + "id": "BiWnIZACXW76-aOb-dhil", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8331.294103392951, + "y": 5884.262697906171, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 953803716, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2102, + "versionNonce": 485399114, + "isDeleted": false, + "id": "Ipu3HaB5ay0a2NMS5Y8aZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8331.310169791215, + "y": 5892.746530473777, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1157245564, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2023, + "versionNonce": 1654032214, + "isDeleted": false, + "id": "iASlv7vBVXBhTpV0YTOrv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8484.236421806334, + "y": 5875.417239397354, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1055968068, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2139, + "versionNonce": 494453002, + "isDeleted": false, + "id": "0U_Ze_8tB-rEjM3hBY9a9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8484.421264574532, + "y": 5884.294267586877, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 2110225148, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2148, + "versionNonce": 607595670, + "isDeleted": false, + "id": "kBDSNyhwbxmpSQd8l44is", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8484.437330972796, + "y": 5892.778100154484, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1086243524, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2693, + "versionNonce": 1066405834, + "isDeleted": false, + "id": "ogmq7lj04ospfMJIeK7Nl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8188.006578220602, + "y": 6019.871123279515, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1100397436, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 2868, + "versionNonce": 1292970454, + "isDeleted": false, + "id": "d0MB-1vFF33ax25FBTt5f", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8150.195338538284, + "y": 5849.542271634839, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.06403689613023, + "height": 12.820060975088683, + "seed": 1424083524, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1850, + "versionNonce": 659523210, + "isDeleted": false, + "id": "IAd5vDK8YJBDJKLnC5apo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8190.58339621686, + "y": 5849.510257131739, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 43.805905936382885, + "height": 12.884089981289083, + "seed": 984214524, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "258.382", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 1913, + "versionNonce": 1547271958, + "isDeleted": false, + "id": "oCRaWV1sykBJ-qn0ZU2PU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8255.842144659196, + "y": 5849.510257131739, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 238543300, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 1677, + "versionNonce": 1030890826, + "isDeleted": false, + "id": "rLYn8sqzOYTBp_xVhw6ZU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8434.443776786222, + "y": 5849.566102260406, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 2063797372, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 01:03:28", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:03:28" + }, + { + "type": "text", + "version": 2037, + "versionNonce": 639970390, + "isDeleted": false, + "id": "2hCCp_dGiQMqdxmfuJTfx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8116.133558376279, + "y": 5850.982532012676, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 25.123975463513712, + "height": 12.884089981289083, + "seed": 1943996740, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 1", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "rectangle", + "version": 3645, + "versionNonce": 458419210, + "isDeleted": false, + "id": "WXaUqvGsC_h79XNjh1JM0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8150.262108243465, + "y": 5870.480722745701, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.3348709316003, + "height": 12.976079252205857, + "seed": 73669884, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2669, + "versionNonce": 682176918, + "isDeleted": false, + "id": "fopC9hjwrPetggXkDEnMf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8190.58339621686, + "y": 5870.52671738116, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 43.805905936382885, + "height": 12.884089981289083, + "seed": 2033533124, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "258.382", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 2737, + "versionNonce": 1995233994, + "isDeleted": false, + "id": "Dx0rUTmWINJVGC8MNQRhZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8255.962371214135, + "y": 5870.52671738116, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 1347362172, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 2480, + "versionNonce": 1593478870, + "isDeleted": false, + "id": "yRs66yiyIr3DRjvEk1zxy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8434.564003341162, + "y": 5870.582562509825, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1977124932, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 01:04:08", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:04:08" + }, + { + "type": "text", + "version": 2859, + "versionNonce": 249229706, + "isDeleted": false, + "id": "-SexBZ9sV47LV5PLt84hL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8115.609580432154, + "y": 5872.045066875752, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.633406956964894, + "height": 12.884089981289083, + "seed": 1476791804, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 2", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "rectangle", + "version": 3390, + "versionNonce": 363742230, + "isDeleted": false, + "id": "q75lZrJdEYqPLFYTh1Dmd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8149.932027683701, + "y": 5911.428378503041, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.17957428251805, + "height": 12.820060975088683, + "seed": 497475524, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2486, + "versionNonce": 374878282, + "isDeleted": false, + "id": "S6mpwe2w0tQWBVBnxDBCc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8178.987715233699, + "y": 5911.455486407803, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 478867068, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2554, + "versionNonce": 1052332374, + "isDeleted": false, + "id": "uBpkoLV1aOVVECSeuoyxp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8255.776665605457, + "y": 5911.455486407803, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 2025736004, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 2302, + "versionNonce": 557815562, + "isDeleted": false, + "id": "T2ZjKX96-gH8eMP3VH1an", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8434.378297732484, + "y": 5911.51133153647, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 782221052, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 00:26:41", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:26:41" + }, + { + "type": "text", + "version": 2665, + "versionNonce": 1165014678, + "isDeleted": false, + "id": "FWpJ9rCnqP4LQrLlLP_ep", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8098.030353348737, + "y": 5912.837733161142, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.09431493451179, + "height": 12.884089981289083, + "seed": 1534901956, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.191", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.191" + }, + { + "type": "rectangle", + "version": 3501, + "versionNonce": 269231562, + "isDeleted": false, + "id": "8ImvMmUsEfkbYihIfTof5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8150.29380361648, + "y": 5931.837462687986, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.6833795189834, + "height": 13.075537174306843, + "seed": 918978428, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2588, + "versionNonce": 1653175254, + "isDeleted": false, + "id": "D_8yt1Ad_T7Bd8LpD2gU2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8178.987715233699, + "y": 5931.933186284495, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 1585464900, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2655, + "versionNonce": 2077809802, + "isDeleted": false, + "id": "b6D4lojDl9I0D_vWxUhgR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8255.605105513734, + "y": 5931.933186284495, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 2101424124, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 2404, + "versionNonce": 1880656150, + "isDeleted": false, + "id": "xKmKcev8RE1QkRiHAs57k", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8434.206737640761, + "y": 5931.989031413162, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1453776324, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 00:27:07", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:27:07" + }, + { + "type": "text", + "version": 2755, + "versionNonce": 576764746, + "isDeleted": false, + "id": "xE91qIgI91dMfzE3jUX-v", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8097.214588757946, + "y": 5933.533199265038, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49.603746427962975, + "height": 12.884089981289083, + "seed": 1913770108, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.192", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.192" + }, + { + "type": "rectangle", + "version": 3715, + "versionNonce": 1033041494, + "isDeleted": false, + "id": "rak3HO3nctRMWnMverxdw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8150.573550075691, + "y": 5953.461974912577, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.87032863990953, + "height": 11.872141895465793, + "seed": 1292797252, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2732, + "versionNonce": 1375650314, + "isDeleted": false, + "id": "dW-wqHtGuhYbr0d5RtkEb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8178.987715233699, + "y": 5952.9560008696635, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 888824060, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2803, + "versionNonce": 1674427286, + "isDeleted": false, + "id": "K7hfLwAQDs190trTgMSFu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8255.813619577531, + "y": 5952.9560008696635, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 1997880516, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4572, + "versionNonce": 1437462730, + "isDeleted": false, + "id": "0zm4BAn5EMMbXhdqQID3S", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8150.822689858296, + "y": 5974.267517155032, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.4196986448144, + "height": 12.453753189444956, + "seed": 494723452, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3560, + "versionNonce": 419289302, + "isDeleted": false, + "id": "cg2Z3Pt6rOZka0FyhAwLX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8178.987715233699, + "y": 5974.052348759108, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 777585732, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 3627, + "versionNonce": 1627998090, + "isDeleted": false, + "id": "qa5r1KIySBrmFxx7ARGEb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8255.933846132471, + "y": 5974.052348759108, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 1121669628, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 3372, + "versionNonce": 79187478, + "isDeleted": false, + "id": "FXSp61p59sxx_i16YN2uy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8434.535478259495, + "y": 5974.108193887775, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1756879812, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 12:25:12", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:25:12" + }, + { + "type": "text", + "version": 2345, + "versionNonce": 2085340746, + "isDeleted": false, + "id": "qLBQ2sgwPimN1SMdRaFOr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8190.58339621686, + "y": 5979.682201058323, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 68661884, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2465, + "versionNonce": 334633814, + "isDeleted": false, + "id": "ekMNO9cK1ERQyQQ3SlIAu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8190.58339621686, + "y": 5988.559229247846, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 810533700, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2474, + "versionNonce": 1884318986, + "isDeleted": false, + "id": "Oo5tzz9_znerLf2dZBtMu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8190.58339621686, + "y": 5997.043061815452, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 267649788, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2348, + "versionNonce": 1291862166, + "isDeleted": false, + "id": "eC9ZWLDkPsYvQPwFxLMKu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8331.08319849017, + "y": 5978.889899908138, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 461290180, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2464, + "versionNonce": 848444362, + "isDeleted": false, + "id": "qshrm1GEylcXM2OiBY-pZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8331.268041258367, + "y": 5987.76692809766, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1827816316, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2473, + "versionNonce": 597147094, + "isDeleted": false, + "id": "nFAkRhkZM6XzhErRfMCU_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8331.284107656631, + "y": 5996.250760665268, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1155711556, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2394, + "versionNonce": 1361851018, + "isDeleted": false, + "id": "o9z3mEt-upAy8W9nhSVgB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8484.21035967175, + "y": 5978.921469588843, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 22311932, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2510, + "versionNonce": 1288540950, + "isDeleted": false, + "id": "nQ7RHr2DHXd91NDT6PeZq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8484.395202439948, + "y": 5987.798497778366, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1129961924, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2519, + "versionNonce": 1591300426, + "isDeleted": false, + "id": "JShrwIiZ7Q8cNSCKRakVL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8484.411268838212, + "y": 5996.282330345973, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 454857852, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3814, + "versionNonce": 320258134, + "isDeleted": false, + "id": "p055Rix90urW7eyLOQnqj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8150.026284305186, + "y": 6014.526023455942, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 408.0749706946756, + "height": 13.266679588124175, + "seed": 570556740, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2858, + "versionNonce": 1593088010, + "isDeleted": false, + "id": "YS54xQkRA5ufn92rNEhxT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8172.545670243055, + "y": 6014.717318259361, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 61.843631910187604, + "height": 12.884089981289083, + "seed": 2014094588, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "10.487.847", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "10.487.847" + }, + { + "type": "text", + "version": 2928, + "versionNonce": 709379478, + "isDeleted": false, + "id": "6IhtpNjUBKJv3X9XT8nFk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8255.750603470873, + "y": 6014.717318259361, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 1480145092, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http://doc/1437831&is_mo...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http://doc/1437831&is_mo..." + }, + { + "type": "text", + "version": 2673, + "versionNonce": 830015178, + "isDeleted": false, + "id": "L7QmQmYHFpoIJ-EQloHmQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8434.3522355979, + "y": 6014.773163388028, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1302766972, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-17 05:50:01", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-17 05:50:01" + }, + { + "type": "text", + "version": 3015, + "versionNonce": 60236502, + "isDeleted": false, + "id": "jvw-B8H_zFLe4jMAykvdl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8090.273837225379, + "y": 6016.341963352633, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56.68999591767197, + "height": 12.884089981289083, + "seed": 1100841028, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 16.383", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 16.383" + }, + { + "type": "text", + "version": 2872, + "versionNonce": 2130812298, + "isDeleted": false, + "id": "berO2PFT-n6YVo9ZAYorw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8188.006578220602, + "y": 6031.965382293539, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1361876476, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3056, + "versionNonce": 563632150, + "isDeleted": false, + "id": "Q1m0-cIfEV4oe_QTnAYBT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8188.006578220602, + "y": 6044.059986374797, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 369940420, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2937, + "versionNonce": 617176138, + "isDeleted": false, + "id": "iuvrlmHdzMu2Z5Mi9xkJB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8329.662906586373, + "y": 6019.926989445629, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1067480700, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3114, + "versionNonce": 1816192342, + "isDeleted": false, + "id": "_ruJpQLkJgfq01_UeZ-0b", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8329.895143541697, + "y": 6032.021248459653, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1638219588, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3298, + "versionNonce": 548094730, + "isDeleted": false, + "id": "6xnsQD0Bz4-7EGcvSQC-N", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8329.843460103755, + "y": 6044.115852540911, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1707362044, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3000, + "versionNonce": 82168470, + "isDeleted": false, + "id": "AuRxkkcQawO4ed-ASofTe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8483.28687083512, + "y": 6019.911052094739, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 2093266628, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3177, + "versionNonce": 2099401162, + "isDeleted": false, + "id": "4kmqaGsX4VQ6kSipSP3Ov", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8483.519107790442, + "y": 6032.0053111087645, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 672794492, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3361, + "versionNonce": 440141782, + "isDeleted": false, + "id": "58p5amzcrtOaNqx63Ay7A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8483.4674243525, + "y": 6044.099915190022, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 67714628, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4184, + "versionNonce": 1028229258, + "isDeleted": false, + "id": "Lrw2NpyOkeBePipt1F6Nl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8151.3022938457, + "y": 6076.447779239504, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.5349404945144, + "height": 12.5448702900298, + "seed": 182695932, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3119, + "versionNonce": 1012440342, + "isDeleted": false, + "id": "gDIBbtTCsImhGjuE7r3u7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8154.5079442692495, + "y": 6076.278169393873, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 1347474884, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3187, + "versionNonce": 1222371146, + "isDeleted": false, + "id": "uBFs-oxX-H1FqLjHXe2ps", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8255.527256204974, + "y": 6076.278169393873, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 975394940, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 2932, + "versionNonce": 816876118, + "isDeleted": false, + "id": "Qms17krviGXmkqgDRtTgZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8434.128888331998, + "y": 6076.33401452254, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1857649988, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-22 16:22:00", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 16:22:00" + }, + { + "type": "text", + "version": 3244, + "versionNonce": 1479831050, + "isDeleted": false, + "id": "BxjSc-Xi8vm75CYuDzzVD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8070.0801504884785, + "y": 6077.40977499768, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 76.66033538867005, + "height": 12.884089981289083, + "seed": 295364860, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.863.744", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.863.744" + }, + { + "type": "rectangle", + "version": 4193, + "versionNonce": 1176031126, + "isDeleted": false, + "id": "8ltjUjES_FLmy8yVKGVs3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8150.550571683167, + "y": 6097.169856333666, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.0906986792239, + "height": 12.451874687980121, + "seed": 413217988, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3263, + "versionNonce": 1615731914, + "isDeleted": false, + "id": "86vQD_jDUskxxVmyb4UrV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8154.5079442692495, + "y": 6096.953748687011, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 617376124, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3340, + "versionNonce": 684092630, + "isDeleted": false, + "id": "pa2ZFWImeEXpGKnQAIlZJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8255.735770268771, + "y": 6096.953748687011, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 732298308, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 3078, + "versionNonce": 2126771082, + "isDeleted": false, + "id": "GU80FgsMvQG3VbbEDSmPV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8434.337402395795, + "y": 6097.009593815678, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1190779388, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-22 18:02:12", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 18:02:12" + }, + { + "type": "rectangle", + "version": 5004, + "versionNonce": 911106582, + "isDeleted": false, + "id": "ENU1NKg_hZzGpCmpZrKDZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8149.902609257044, + "y": 6117.8832939430495, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.05367499757995, + "height": 12.820060975088683, + "seed": 564515780, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4086, + "versionNonce": 1708192330, + "isDeleted": false, + "id": "FIuoWoP8J91DnI1FvEFel", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8154.5079442692495, + "y": 6117.851279439949, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 321206908, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 4159, + "versionNonce": 1369812822, + "isDeleted": false, + "id": "n_oRf4kzwvXqopjmcv5p6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8255.79240269654, + "y": 6117.851279439949, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 146717508, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​sozcu​.​com​.​tr​/​oaut...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sozcu​.​com​.​tr​/​oaut..." + }, + { + "type": "text", + "version": 3901, + "versionNonce": 1213208842, + "isDeleted": false, + "id": "qxjoUaGmAAEvkdhOwiqQf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8434.457628950735, + "y": 6117.907124568616, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1947241212, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-19 00:09:42", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-19 00:09:42" + }, + { + "type": "text", + "version": 2877, + "versionNonce": 924931222, + "isDeleted": false, + "id": "PRpV1-U849EATpBN-XCY6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8190.58339621686, + "y": 6123.64519659857, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 2068755140, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2993, + "versionNonce": 1169975242, + "isDeleted": false, + "id": "iCzaafzSmvjsbrnKvm85i", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8190.58339621686, + "y": 6132.522224788095, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 742247292, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3002, + "versionNonce": 1349931478, + "isDeleted": false, + "id": "C0hbAL-l7u-CN0sEeTNfe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8190.58339621686, + "y": 6141.006057355701, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 401848900, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2878, + "versionNonce": 1446043274, + "isDeleted": false, + "id": "p0hOvnbpzHghUTnydKq_z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8331.00534918141, + "y": 6122.852895448384, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1575943164, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2993, + "versionNonce": 146384662, + "isDeleted": false, + "id": "xd9UovGwM5ja-X-Ihx2Uh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8331.13434682094, + "y": 6131.67407850924, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 2039206340, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3002, + "versionNonce": 912817482, + "isDeleted": false, + "id": "xCMqWDrtYfMFXgwNd5zCN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8331.150413219206, + "y": 6140.157911076848, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 321264764, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2924, + "versionNonce": 543183958, + "isDeleted": false, + "id": "Km2baSQl7-neDygPWwAW4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8484.13251036299, + "y": 6122.884465129092, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 792000836, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3039, + "versionNonce": 1404978186, + "isDeleted": false, + "id": "DmsIX2cxtbu2MUZcSL-E8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8484.26150800252, + "y": 6131.705648189948, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1168452860, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3048, + "versionNonce": 20928918, + "isDeleted": false, + "id": "OcBmqiynEaRvFGdw3MK9Q", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8484.277574400785, + "y": 6140.1894807575545, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 877473988, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4337, + "versionNonce": 942486218, + "isDeleted": false, + "id": "EdAY3WKef5kosG2jI83eK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8150.55630942614, + "y": 6158.837698338549, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.881484259647, + "height": 12.78152620898583, + "seed": 1726885244, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3015, + "versionNonce": 311146198, + "isDeleted": false, + "id": "6ESrC-t-GesFM98Fq4wSd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8154.5079442692495, + "y": 6158.786416452399, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 1752332356, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.294.961.484", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.294.961.484" + }, + { + "type": "text", + "version": 3175, + "versionNonce": 1984973194, + "isDeleted": false, + "id": "23k3oBSHlIy8mzl6pHyrz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8256.278989470753, + "y": 6158.786416452399, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 1749229052, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "https​:​/​/​m​.​sport​.​airway​/​?...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​m​.​sport​.​airway​/​?..." + }, + { + "type": "text", + "version": 2896, + "versionNonce": 215641110, + "isDeleted": false, + "id": "EJ_csQZuIW0tzc0YBgWH5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8435.015869403389, + "y": 6158.786416452399, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 126013380, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 12:05:41", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:05:41" + }, + { + "type": "text", + "version": 3135, + "versionNonce": 358778954, + "isDeleted": false, + "id": "QKCExuEMOgIcGDSyf7Rfm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8070.732001112918, + "y": 6159.985282702773, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 77.94874438679896, + "height": 12.884089981289083, + "seed": 1118174844, + "groupIds": [ + "cndet3BLl6yk4VOot-dtS" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.867.680", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.867.680" + }, + { + "type": "rectangle", + "version": 4697, + "versionNonce": 1310751062, + "isDeleted": false, + "id": "6G9GZJboiPdWQcM5AXaBc", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8618.787942548099, + "y": 5885.393575219705, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 313.4067189003712, + "height": 175.64125101319777, + "seed": 727060220, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3646, + "versionNonce": 2101276426, + "isDeleted": false, + "id": "LTGeVFxytyC4lxJ5xaEro", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8634.240556138522, + "y": 5922.207590441869, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 85.99405190947766, + "height": 126.9568483897424, + "seed": 1746104004, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3109, + "versionNonce": 766697110, + "isDeleted": false, + "id": "vfvZe_Pmz9_w0nqstGOIG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8654.03961344305, + "y": 5925.8356835930335, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49.96193427251357, + "height": 17.347893844622767, + "seed": 1748160380, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "UserID", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "rectangle", + "version": 3920, + "versionNonce": 1650490826, + "isDeleted": false, + "id": "YZuTg-jZyuVrdIMmEyFPd", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8737.471028384896, + "y": 5921.250557435304, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 178.33606526040433, + "height": 127.6265329471055, + "seed": 79754820, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4775, + "versionNonce": 1346804694, + "isDeleted": false, + "id": "nD13jZZFVl2BdfitZcOkx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8628.624589890327, + "y": 5949.830500667364, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.2149724420926, + "height": 14.849725943301076, + "seed": 1554219004, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2944, + "versionNonce": 836908170, + "isDeleted": false, + "id": "YRtRTdTfny4XKdWgfq7ne", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8670.860989006445, + "y": 5952.254797644455, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 47.186271257373924, + "height": 13.878315075698213, + "seed": 1364299204, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "240.923", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 3048, + "versionNonce": 2079371542, + "isDeleted": false, + "id": "2xZBgll2tHrYmN7-YTsKf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8739.588465323692, + "y": 5951.387402952223, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 176.9485172151522, + "height": 13.878315075698213, + "seed": 1353326716, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 2905, + "versionNonce": 2105480010, + "isDeleted": false, + "id": "xpaC_W4PkdkvQ859b83rX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8807.955688875167, + "y": 5926.1306851918325, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 28.450545905181336, + "height": 17.347893844622767, + "seed": 2128819524, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "URL", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "text", + "version": 3195, + "versionNonce": 1814437462, + "isDeleted": false, + "id": "JHflMnctSg3CAcVVutW1Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8674.796814031948, + "y": 5980.34060580714, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 1007202556, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3311, + "versionNonce": 1737628170, + "isDeleted": false, + "id": "FoMpoWNyhe94ptoGcEzYM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8674.995920540847, + "y": 5989.902646613204, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 1792273604, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3320, + "versionNonce": 633070486, + "isDeleted": false, + "id": "Uc1QKKXk0paZ-WMurpdct", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8675.013226733025, + "y": 5999.041150115872, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 1312895356, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3282, + "versionNonce": 253118666, + "isDeleted": false, + "id": "iTOLyxLb4uUK5pzQNTypj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8822.215991626412, + "y": 5979.427010721629, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 381793348, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3398, + "versionNonce": 1256653014, + "isDeleted": false, + "id": "1h-WByntj_P_RgnMNXVac", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8822.41509813531, + "y": 5988.989051527691, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 1989517820, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3407, + "versionNonce": 2074517386, + "isDeleted": false, + "id": "HbwfSZuNkkNY4GHKCcjwb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8822.432404327488, + "y": 5998.12755503036, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 545950660, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4418, + "versionNonce": 1866233366, + "isDeleted": false, + "id": "Cx5P4hvhO7uDtqk3CJntU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8628.933223195787, + "y": 5972.537114799865, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.43970652144327, + "height": 14.3292891279627, + "seed": 1812464252, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3096, + "versionNonce": 159260234, + "isDeleted": false, + "id": "ak64gVj6ZmRIswCx0XiLo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8657.987933598406, + "y": 5973.137172314857, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 59.676754825502314, + "height": 13.878315075698213, + "seed": 978088772, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 3191, + "versionNonce": 1806779222, + "isDeleted": false, + "id": "phAoR5SUrinGPf18YCFjr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8741.200901275914, + "y": 5972.86961669861, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 131.843993219133, + "height": 13.878315075698213, + "seed": 895111932, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false, + "fontSize": 11.102652060558569, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4313, + "versionNonce": 1433912586, + "isDeleted": false, + "id": "bRykkPcQs5bjuQxZmMcHM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8629.652681310077, + "y": 6014.286865403674, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.9532436062755, + "height": 14.755593905678678, + "seed": 577071812, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728757, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3255, + "versionNonce": 848980118, + "isDeleted": false, + "id": "s53ECfHbDAdJ3a0LUOAjI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8634.420340330222, + "y": 6015.419874216635, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 86.04555346932892, + "height": 13.878315075698213, + "seed": 823038844, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3363, + "versionNonce": 688821194, + "isDeleted": false, + "id": "KCL6Bnmq1utxXOEQnquGe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8739.744535451051, + "y": 6014.916397962732, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 176.9485172151522, + "height": 13.878315075698213, + "seed": 460550724, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 3175, + "versionNonce": 598533590, + "isDeleted": false, + "id": "gCge3TBZE4ByhNj1bSaZZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8739.049882490925, + "y": 5891.375511514298, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70.08549113227598, + "height": 17.347893844622767, + "seed": 493274108, + "groupIds": [ + "ddpyzw9s3m8abLBF74cW-" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "rectangle", + "version": 2988, + "versionNonce": 1717406346, + "isDeleted": false, + "id": "U-rhe64emYO9ah81j5ioy", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8151.643151635286, + "y": 6479.877389517542, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 166.77029716022477, + "height": 382.67221620130925, + "seed": 890332228, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2734, + "versionNonce": 1610464022, + "isDeleted": false, + "id": "iB73ZHL8LoJfjEQfHOWEn", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8332.539613145269, + "y": 6480.519830360428, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 81.81692567543335, + "height": 382.1228558003817, + "seed": 1784214012, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2907, + "versionNonce": 1948232010, + "isDeleted": false, + "id": "yO2enWkKCNJcuh9oYm6kO", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8425.873533329981, + "y": 6478.902658098979, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 120.8020298613876, + "height": 383.94449714487905, + "seed": 962870212, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2043, + "versionNonce": 503441494, + "isDeleted": false, + "id": "Iu6C492xeLdmCd6Yxzwch", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8437.188482010944, + "y": 6484.530721237139, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 83.73633468789095, + "height": 16.10314128613287, + "seed": 719409788, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 1, + "text": "EventTime.bin", + "baseline": 11.103141286132871, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "EventTime.bin" + }, + { + "type": "text", + "version": 3297, + "versionNonce": 699396106, + "isDeleted": false, + "id": "sXadieokQNE1PW7FmvWaI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8477.281506697273, + "y": 6699.030365324497, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1819288388, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3474, + "versionNonce": 2106486166, + "isDeleted": false, + "id": "qPgqr23dxcPSBGfy4bwlO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8477.51371522788, + "y": 6711.123144057759, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1820959484, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3658, + "versionNonce": 990469834, + "isDeleted": false, + "id": "3eWQmkUFUc0-WnLxHGhYW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8477.462038115751, + "y": 6723.216267816015, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 882055876, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3059, + "versionNonce": 1540901590, + "isDeleted": false, + "id": "3L0iHLMxJAmmc7T0h-TqG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8144.119423343502, + "y": 6507.92607837829, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.69889405639157, + "height": 12.914386351324707, + "seed": 1708385148, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1826, + "versionNonce": 617018762, + "isDeleted": false, + "id": "A26QnHxe-ynY0HF3BTYBM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8428.235902272107, + "y": 6508.806366479368, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 2087395908, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-18 09:59:01", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-18 09:59:01" + }, + { + "type": "text", + "version": 2193, + "versionNonce": 661946390, + "isDeleted": false, + "id": "22TlvAepiVAHk_qIiDd52", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8109.9646435448485, + "y": 6509.450255277099, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.629779966484488, + "height": 12.882513028906299, + "seed": 755110908, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 0", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 2324, + "versionNonce": 404993098, + "isDeleted": false, + "id": "rQLV6lbwIDs5n2eagRs0w", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8478.230941447891, + "y": 6554.554237994302, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 718682564, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2440, + "versionNonce": 878185814, + "isDeleted": false, + "id": "SXyS4EoClOnSka5rbYGRZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8478.415761592198, + "y": 6563.430179677074, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1075197052, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2449, + "versionNonce": 1727699722, + "isDeleted": false, + "id": "_ifsyt_Qt17AM9UP23rfK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8478.43182602401, + "y": 6571.912973863235, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 452092228, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3169, + "versionNonce": 265810582, + "isDeleted": false, + "id": "bHqD6-2iMVoO8T-owHOeI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8144.230743246848, + "y": 6528.682437206882, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.01433655629427, + "height": 12.818491859556932, + "seed": 215106812, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1979, + "versionNonce": 1875290570, + "isDeleted": false, + "id": "A97TEs2k8fYY4ZMznbpW9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8428.444390814755, + "y": 6528.706264915691, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 337483972, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-22 05:55:22", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 05:55:22" + }, + { + "type": "text", + "version": 2339, + "versionNonce": 1420373974, + "isDeleted": false, + "id": "8vBIDFo9StKuKj597vG3Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8110.173132087501, + "y": 6530.12252130358, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 25.120900406367284, + "height": 12.882513028906299, + "seed": 2025342332, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 1", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "rectangle", + "version": 3950, + "versionNonce": 161669258, + "isDeleted": false, + "id": "RuVEhqXNviy-R-7ZIzfNb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8144.297504779726, + "y": 6549.618325549211, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.2851374429445, + "height": 12.974491040766345, + "seed": 1106632772, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2782, + "versionNonce": 2128659734, + "isDeleted": false, + "id": "907W7vqRh631fzzLCY4CU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8428.56460265453, + "y": 6549.720152848624, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1762276860, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 05:23:19", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 05:23:19" + }, + { + "type": "text", + "version": 3161, + "versionNonce": 1883914058, + "isDeleted": false, + "id": "HnhUpMuQBF-M0ZCgxj3su", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8109.649218275827, + "y": 6551.182478210854, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.629779966484488, + "height": 12.882513028906299, + "seed": 744044484, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 2", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "rectangle", + "version": 3691, + "versionNonce": 1072935510, + "isDeleted": false, + "id": "ifi4UaQzOsOjfBUoEdThH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8143.96746462028, + "y": 6590.560969504908, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.1298598014461, + "height": 12.818491859556932, + "seed": 1254758012, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2604, + "versionNonce": 806864394, + "isDeleted": false, + "id": "5p8AgpB9PvlacO3SuVonM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8428.378919775347, + "y": 6590.643912385274, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 795189060, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:24:50", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:24:50" + }, + { + "type": "text", + "version": 2967, + "versionNonce": 1387722646, + "isDeleted": false, + "id": "xSzP0PVPsnffhdg0CPC3v", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8092.072142807625, + "y": 6591.970151664589, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.088795601172045, + "height": 12.882513028906299, + "seed": 448390908, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.191", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.191" + }, + { + "type": "rectangle", + "version": 3803, + "versionNonce": 302413002, + "isDeleted": false, + "id": "tLb-sbCXiuNHOfLZapN7d", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8144.329196273378, + "y": 6610.890582926315, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.6336033745057, + "height": 13.073936789682616, + "seed": 1937315524, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2708, + "versionNonce": 1331664086, + "isDeleted": false, + "id": "IRHmj09ifo3Z7th-jFe-S", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8428.142196798675, + "y": 6610.9769492170835, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1834723196, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:25:15", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:25:15" + }, + { + "type": "text", + "version": 3058, + "versionNonce": 129059722, + "isDeleted": false, + "id": "7u4O_-yrb2RMJGBAm61aC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8091.256478062605, + "y": 6612.58611195314, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49.59767516128925, + "height": 12.882513028906299, + "seed": 1697750596, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.192", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.192" + }, + { + "type": "rectangle", + "version": 4018, + "versionNonce": 2139261462, + "isDeleted": false, + "id": "g4xgf4dCX5O7rDsu9joAe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8144.494543412668, + "y": 6632.5124484117005, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.8205296137334, + "height": 11.870688800798026, + "seed": 1995528188, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4882, + "versionNonce": 391334474, + "isDeleted": false, + "id": "jQ7QXvYwGMAiTJpX8d0B6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8144.8580177819895, + "y": 6652.027192850155, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.36983237831794, + "height": 12.45222890827374, + "seed": 762131908, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3679, + "versionNonce": 840226646, + "isDeleted": false, + "id": "_nBRg6I0GkQ8PG9vfSL2F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8428.536081064198, + "y": 6651.8678890833235, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 326957180, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:33:02", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:33:02" + }, + { + "type": "text", + "version": 2700, + "versionNonce": 1204252938, + "isDeleted": false, + "id": "RmRKSh2WoYXegIKG-8Bvd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8478.204882503192, + "y": 6656.680575661949, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 692706628, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2816, + "versionNonce": 258702486, + "isDeleted": false, + "id": "0ewci9XAfX1aEKa5OfILl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8478.389702647499, + "y": 6665.556517344719, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1321240828, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2825, + "versionNonce": 210288586, + "isDeleted": false, + "id": "xCfixMQ05d4jZLnyu3680", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8478.405767079308, + "y": 6674.03931153088, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1646630084, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4120, + "versionNonce": 1832614358, + "isDeleted": false, + "id": "H9cGUA_ArQ5PO5utPakP8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8144.061709705198, + "y": 6692.280771698099, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 408.0250242259434, + "height": 13.265055808562055, + "seed": 1816004988, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2980, + "versionNonce": 833762954, + "isDeleted": false, + "id": "MDF7O9yYDzjoGmvt8S9jR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8428.352860830648, + "y": 6692.527881381409, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 94264388, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-20 05:29:42", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 05:29:42" + }, + { + "type": "text", + "version": 3322, + "versionNonce": 580505366, + "isDeleted": false, + "id": "O12kqrws0NvQBq74gMuYN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8084.316576045581, + "y": 6694.096489332234, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56.68305732718771, + "height": 12.882513028906299, + "seed": 1865906684, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 16.383", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 16.383" + }, + { + "type": "rectangle", + "version": 4485, + "versionNonce": 1207883082, + "isDeleted": false, + "id": "l0DuARsinPaOCpgdlKDjf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8145.260590281065, + "y": 6755.560172638159, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.4853049136045, + "height": 12.54333485655143, + "seed": 1569862596, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3235, + "versionNonce": 1543208022, + "isDeleted": false, + "id": "rwbIyE79EMs_nOPn3Z-ym", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8427.987384231263, + "y": 6755.38123796236, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 581884540, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-17 03:55:28", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-17 03:55:28" + }, + { + "type": "text", + "version": 3546, + "versionNonce": 281648138, + "isDeleted": false, + "id": "6fmUU_DnF4X0gCQlDxKVf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8064.048388134488, + "y": 6756.522050652551, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 76.65095252199248, + "height": 12.882513028906299, + "seed": 1209998148, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.863.744", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.863.744" + }, + { + "type": "rectangle", + "version": 4494, + "versionNonce": 1865777558, + "isDeleted": false, + "id": "RMX3f4-R2op9FLLKvsQwX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8144.508960125811, + "y": 6776.2797134469565, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.04099507611033, + "height": 12.450350636728704, + "seed": 560343804, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3381, + "versionNonce": 1779272394, + "isDeleted": false, + "id": "tshzLSz9nGrsGYoXTeeS5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8428.261056657018, + "y": 6776.054286661247, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 799216324, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-20 07:31:39", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 07:31:39" + }, + { + "type": "rectangle", + "version": 5309, + "versionNonce": 796712662, + "isDeleted": false, + "id": "Au4o2ImDqaVjjkcVjuXY8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8143.861077007259, + "y": 6796.990615828408, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.00385353066673, + "height": 12.818491859556932, + "seed": 1574923132, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4204, + "versionNonce": 979739018, + "isDeleted": false, + "id": "K6mCs-FEeg0FvF3o-p7zN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8428.444535206861, + "y": 6797.0144435372185, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 45881924, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-20 07:31:54", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 07:31:54" + }, + { + "type": "text", + "version": 3225, + "versionNonce": 1097241622, + "isDeleted": false, + "id": "fODbegb0OJbn1h81zxZF1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8478.050069935776, + "y": 6801.991174894478, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 710712316, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3340, + "versionNonce": 1561124938, + "isDeleted": false, + "id": "9zFSdECLGb7AC7R_foKPm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8478.1790517866, + "y": 6810.811278283765, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 742928836, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728758, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3349, + "versionNonce": 1860673878, + "isDeleted": false, + "id": "EjsO4sSVP3r0jqZkAn6FQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8478.195116218416, + "y": 6819.294072469926, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1088404604, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4638, + "versionNonce": 232670986, + "isDeleted": false, + "id": "_xcmOsR3UTz6SSF3ERfts", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8144.514697166509, + "y": 6837.940007596268, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.8318062634003, + "height": 12.779961809929308, + "seed": 191191364, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2057, + "versionNonce": 2069169814, + "isDeleted": false, + "id": "PghpiMCAcDLqXO0B2U_t-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8211.441688006686, + "y": 6484.401028529021, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.088795601172045, + "height": 16.10314128613287, + "seed": 1261096188, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 11.103141286132871, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "text", + "version": 3375, + "versionNonce": 1431623114, + "isDeleted": false, + "id": "GrYRhPI7PW9INAknGmE0F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8229.673859691811, + "y": 6699.008865596896, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1802604740, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3552, + "versionNonce": 2003026902, + "isDeleted": false, + "id": "LsoxXD1QFuk49rtvo5CFJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8229.906068222419, + "y": 6711.101644330156, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1790954876, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3736, + "versionNonce": 1955302538, + "isDeleted": false, + "id": "NTeDSI0nfhliKEBTiEHUg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8229.85439111029, + "y": 6723.194768088415, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 2081085508, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2215, + "versionNonce": 354998550, + "isDeleted": false, + "id": "d4Rk65_l6fSGbuLXx5xAa", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8155.653644538146, + "y": 6507.725030948301, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1088470524, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "​/​clck​.​yandex​.​ru​/​file​.​com​...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "​/​clck​.​yandex​.​ru​/​file​.​com​..." + }, + { + "type": "text", + "version": 2419, + "versionNonce": 1362979658, + "isDeleted": false, + "id": "jV4GUqwiiHdD2MPA1I4-t", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8231.120036703222, + "y": 6554.485237049745, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1225732036, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2535, + "versionNonce": 2082031190, + "isDeleted": false, + "id": "klUU8rnJxzVpQpfijP9g8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8231.304856847528, + "y": 6563.361178732515, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1989123708, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2544, + "versionNonce": 1640329738, + "isDeleted": false, + "id": "b-KMzZSObvC77q-8JdF2Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8231.32092127934, + "y": 6571.843972918676, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 849123140, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2367, + "versionNonce": 487197590, + "isDeleted": false, + "id": "g7iSpjygYya3TR5NqBZKI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8155.862133080798, + "y": 6528.612991494372, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1150185212, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "/clck/jsredircnt=1395412...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "/clck/jsredircnt=1395412..." + }, + { + "type": "text", + "version": 3188, + "versionNonce": 421437642, + "isDeleted": false, + "id": "ALYfggJ6txNrDg91Q6aT5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8155.982344920569, + "y": 6549.626879427307, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1695616708, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal://200906&uinfo=ww-1...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal://200906&uinfo=ww-1..." + }, + { + "type": "text", + "version": 3012, + "versionNonce": 103819478, + "isDeleted": false, + "id": "5mYBBcI__-b2kFBzS8AZS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8155.79666204139, + "y": 6590.485455080852, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 2069835644, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 3101, + "versionNonce": 1390671754, + "isDeleted": false, + "id": "H9EJzTYZWfMgkVwgcHFlA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8155.625122947818, + "y": 6610.948859678871, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1359648324, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 3247, + "versionNonce": 924884502, + "isDeleted": false, + "id": "wYO0QXh2-QEgVwGsUx6dN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8155.8336114904705, + "y": 6631.969101169812, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 188997628, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 4076, + "versionNonce": 1062237770, + "isDeleted": false, + "id": "F4PRb7TNAXs2r0P3mcz0P", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8155.953823330241, + "y": 6651.837882372078, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 593964484, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 2795, + "versionNonce": 1959816022, + "isDeleted": false, + "id": "jclGTyFX3aikuZpd5IBuU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8231.093977758523, + "y": 6656.611574717388, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 205422716, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2911, + "versionNonce": 1329536266, + "isDeleted": false, + "id": "TJCB3bYHOgKOBi1lAvkbw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8231.278797902825, + "y": 6665.487516400159, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1027921220, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2920, + "versionNonce": 496275606, + "isDeleted": false, + "id": "nW65yW034rk27h7hiLLKt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8231.294862334642, + "y": 6673.970310586321, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1175523580, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3379, + "versionNonce": 539683786, + "isDeleted": false, + "id": "GCuql9eRu2_DMNU3hbPba", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8155.770603096687, + "y": 6692.434607960093, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 738299076, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​r52-echo/#compose...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​r52-echo/#compose..." + }, + { + "type": "text", + "version": 3637, + "versionNonce": 2099383766, + "isDeleted": false, + "id": "3WdX3wXvPs-6r0fDOnKxv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8155.470310380406, + "y": 6755.464149825575, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 943559036, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​php?show​/​7...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​php?show​/​7..." + }, + { + "type": "text", + "version": 3785, + "versionNonce": 1747903114, + "isDeleted": false, + "id": "VG0-YBxg96wuwapnmPemi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8155.613615039951, + "y": 6775.96101323993, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 557536324, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​rt​.​com​.​tr​/...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​rt​.​com​.​tr​/..." + }, + { + "type": "text", + "version": 4604, + "versionNonce": 546169622, + "isDeleted": false, + "id": "PLKSYJV41j661JMIXrYKY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8155.735424419279, + "y": 6796.779299311496, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 570819068, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​rt​.​com​.​tr​/​...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​rt​.​com​.​tr​/​..." + }, + { + "type": "text", + "version": 3320, + "versionNonce": 1644560714, + "isDeleted": false, + "id": "btgYFIdbjUROSJpADxkw4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8230.93916519111, + "y": 6801.922173949917, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1792027588, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3435, + "versionNonce": 709693526, + "isDeleted": false, + "id": "1yzzdMRuHlSvN0ZIhUXu1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8231.068147041933, + "y": 6810.742277339206, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 174875260, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3444, + "versionNonce": 957040650, + "isDeleted": false, + "id": "Mi0XGD7uNc0-xjrqL1cBu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8231.084211473746, + "y": 6819.225071525367, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1792938820, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3626, + "versionNonce": 640980374, + "isDeleted": false, + "id": "c58ddDlxotM6mrvBMuc1a", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8156.221951637548, + "y": 6837.720929092737, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1211282172, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "res​:​/​/​m​.​me​/​politic/stati...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "res​:​/​/​m​.​me​/​politic/stati..." + }, + { + "type": "text", + "version": 3199, + "versionNonce": 1966716618, + "isDeleted": false, + "id": "25vIXtUYoBgX-GvoAnUZ4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8428.93944062342, + "y": 6837.823548103674, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 264440516, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-19 10:48:46", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-19 10:48:46" + }, + { + "type": "text", + "version": 3437, + "versionNonce": 1568240342, + "isDeleted": false, + "id": "piLdDoWuUVBKPp4_DkBX9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8064.700158975462, + "y": 6839.0874515015275, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 77.93920382488311, + "height": 12.882513028906299, + "seed": 165344124, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.867.680", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.867.680" + }, + { + "type": "text", + "version": 2314, + "versionNonce": 1730956682, + "isDeleted": false, + "id": "DQpjL4x4rBlNhY75HICo9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8341.96357520622, + "y": 6484.0741432304385, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 65.70081644742213, + "height": 16.10314128613287, + "seed": 1276973636, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.8825130289063, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 11.103141286132871, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "text", + "version": 3190, + "versionNonce": 716220438, + "isDeleted": false, + "id": "OvsClU3i7v6vuyuuUXgqw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8365.993706152392, + "y": 6698.955793797342, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1571234812, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3369, + "versionNonce": 337513546, + "isDeleted": false, + "id": "d8451jVpQUAE9SdREMreR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8365.993706152392, + "y": 6711.0485725306025, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 248129988, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3553, + "versionNonce": 1305425238, + "isDeleted": false, + "id": "HwpG1dgmOSYxUvqKkXK_I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8365.993706152392, + "y": 6723.14169628886, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 966345852, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2206, + "versionNonce": 568980234, + "isDeleted": false, + "id": "3svV0XoRwjKCbmfE-TG_K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8332.499172277236, + "y": 6507.907367440468, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 988303684, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.644.125.792", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.644.125.792" + }, + { + "type": "text", + "version": 2480, + "versionNonce": 1076501142, + "isDeleted": false, + "id": "ne_joCkbQpmVgc1b7t6Kb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8369.214334409622, + "y": 6555.280228754775, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 57890044, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2612, + "versionNonce": 1124794826, + "isDeleted": false, + "id": "SK5vfbOzbl6dvsse-TJZ5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8369.214334409622, + "y": 6564.156170437547, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 534087876, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2621, + "versionNonce": 141973462, + "isDeleted": false, + "id": "EmqIY3ALYVRy1JEtuUZ1D", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8369.214334409622, + "y": 6572.638964623709, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 414668156, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2355, + "versionNonce": 580663434, + "isDeleted": false, + "id": "ah_2sI5FJIdW62Ud3iD8p", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8332.499172277236, + "y": 6528.6157790231755, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1898958916, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.550.392.492", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.550.392.492" + }, + { + "type": "text", + "version": 3174, + "versionNonce": 248048918, + "isDeleted": false, + "id": "j6zTCtxb656kYoKuy2sbm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8332.499172277236, + "y": 6549.629666956109, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1453803004, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2.479.498.648", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "2.479.498.648" + }, + { + "type": "text", + "version": 2990, + "versionNonce": 1347983178, + "isDeleted": false, + "id": "Fsof2oDYOseTuSswATF1_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.702041414228, + "y": 6590.42305872655, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 1054156740, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 3095, + "versionNonce": 1888934486, + "isDeleted": false, + "id": "LA_W2-in3gE7zcNeKa-rx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.702041414228, + "y": 6610.997464725999, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 574957180, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 3235, + "versionNonce": 748363274, + "isDeleted": false, + "id": "N9rWUoJ7OUn-1zZcEMB9S", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.702041414228, + "y": 6631.971888698614, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 1826852676, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 4067, + "versionNonce": 1421156246, + "isDeleted": false, + "id": "NTurjweg3zgjYauWJM5VL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.702041414228, + "y": 6651.777403190808, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 1884485372, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 2851, + "versionNonce": 1415498954, + "isDeleted": false, + "id": "hpHyX_LSFTkfv0PxjGGqe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8368.570208758174, + "y": 6657.40656642242, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 733546180, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2971, + "versionNonce": 1062780118, + "isDeleted": false, + "id": "o4TY4rY3eaYjQunrxXBRu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8368.570208758174, + "y": 6666.282508105192, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1297266556, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2980, + "versionNonce": 222208906, + "isDeleted": false, + "id": "sPFCAGhzM2tORTL4D_ndu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8368.570208758174, + "y": 6674.765302291353, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1878232644, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3365, + "versionNonce": 1712763414, + "isDeleted": false, + "id": "hvmJFpm7YcIIvItJmRwQu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8332.499172277236, + "y": 6692.437395488896, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1703307260, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.524.699.296", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.524.699.296" + }, + { + "type": "text", + "version": 3624, + "versionNonce": 829792842, + "isDeleted": false, + "id": "1uUmrrgfFRh0-fR9RfUMd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8332.35701560709, + "y": 6755.355935952952, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1785800132, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.878.658.680", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.878.658.680" + }, + { + "type": "text", + "version": 3765, + "versionNonce": 65273686, + "isDeleted": false, + "id": "ba7A_kMuZwnd4AHXGPC4Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8332.422199490193, + "y": 6776.028984651837, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 217057404, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "3.849.470.917", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.849.470.917" + }, + { + "type": "text", + "version": 4589, + "versionNonce": 467585290, + "isDeleted": false, + "id": "DJwoK4w58jpqZidahlh-k", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8332.422199490193, + "y": 6796.8587737616, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 5229892, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "3.849.470.917", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.849.470.917" + }, + { + "type": "text", + "version": 3378, + "versionNonce": 756393110, + "isDeleted": false, + "id": "p2CplEbSL_IDSJitVDvSO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8368.493235971131, + "y": 6802.717165654949, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1196529916, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3494, + "versionNonce": 334829514, + "isDeleted": false, + "id": "ijkfn8RuHNDSBj_jbuRST", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8368.493235971131, + "y": 6811.593107337721, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1122862276, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3503, + "versionNonce": 593535446, + "isDeleted": false, + "id": "L-wAbMC5SsyPvCx_Tr9B1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8368.493235971131, + "y": 6820.075901523882, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1345132924, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3518, + "versionNonce": 970165898, + "isDeleted": false, + "id": "faCN2184JPv5kY4DsJZwR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8332.422199490193, + "y": 6837.788900504644, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1743277124, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "3.560.941.935", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.560.941.935" + }, + { + "type": "text", + "version": 2767, + "versionNonce": 702150422, + "isDeleted": false, + "id": "jhtx131CpvoMsw1u57dUd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8429.71140628462, + "y": 6632.187956280455, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 583305724, + "groupIds": [ + "j-Q-ESJBqXzIcHdEYkywe" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:32:43", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:32:43" + }, + { + "type": "rectangle", + "version": 4742, + "versionNonce": 1916087626, + "isDeleted": false, + "id": "EIceUFcedivv316Pf7-On", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8620.75415075364, + "y": 6574.202156464479, + "strokeColor": "#15223c", + "backgroundColor": "#ffc029", + "width": 304.57312989326493, + "height": 170.69067870387278, + "seed": 1950369045, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4789, + "versionNonce": 1492558934, + "isDeleted": false, + "id": "qo2gdV30XDiIoZ4TReXA1", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8619.520378568464, + "y": 6571.201115006993, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 313.4067189003712, + "height": 175.64125101319777, + "seed": 804833092, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3738, + "versionNonce": 1383396362, + "isDeleted": false, + "id": "tTTATkL0Url2kbTlsMaTe", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8634.972992158888, + "y": 6608.015130229157, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 85.99405190947766, + "height": 126.9568483897424, + "seed": 2118991612, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3201, + "versionNonce": 1921755542, + "isDeleted": false, + "id": "IHLb1b240GILNvNCTB6Zt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8654.77204946342, + "y": 6611.643223380322, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49.96193427251357, + "height": 17.347893844622767, + "seed": 1197948612, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "UserID", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "rectangle", + "version": 4012, + "versionNonce": 210625226, + "isDeleted": false, + "id": "EuTtXZ1tgiA_568zQyDUK", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8738.203464405262, + "y": 6607.058097222592, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 178.33606526040433, + "height": 127.6265329471055, + "seed": 885260156, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4867, + "versionNonce": 902694614, + "isDeleted": false, + "id": "XfsHEp-q-6LT5b29b3X-u", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8629.357025910693, + "y": 6635.638040454652, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.2149724420926, + "height": 14.849725943301076, + "seed": 1763362372, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3036, + "versionNonce": 1528494474, + "isDeleted": false, + "id": "d36VR8Wtml61O61ZXBgAr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8671.593425026811, + "y": 6638.062337431741, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 47.186271257373924, + "height": 13.878315075698213, + "seed": 1603186684, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "240.923", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 3140, + "versionNonce": 861060118, + "isDeleted": false, + "id": "Y40urMPAw71F1wVGjXlqD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8740.320901344057, + "y": 6637.194942739509, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 176.9485172151522, + "height": 13.878315075698213, + "seed": 703684036, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 2997, + "versionNonce": 1834432586, + "isDeleted": false, + "id": "0v1o__GIj5GLKN96UPihK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8808.688124895532, + "y": 6611.938224979121, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 28.450545905181336, + "height": 17.347893844622767, + "seed": 783241340, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "URL", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "text", + "version": 3287, + "versionNonce": 554617174, + "isDeleted": false, + "id": "xKv_QkPhpcj5hWksUwSp3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8675.529250052314, + "y": 6666.148145594428, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 1393100100, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3403, + "versionNonce": 1394450186, + "isDeleted": false, + "id": "-270a4ZrAcxZoIef-oIPo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8675.728356561216, + "y": 6675.710186400492, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 31973628, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3412, + "versionNonce": 777465494, + "isDeleted": false, + "id": "myyr6yJurixURFNyW6mhl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8675.74566275339, + "y": 6684.84868990316, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 1505737924, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3374, + "versionNonce": 1760112074, + "isDeleted": false, + "id": "BLNzHlH5Df9llXYfA_Nc0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8822.948427646777, + "y": 6665.234550508915, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 1891262844, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3490, + "versionNonce": 1474358230, + "isDeleted": false, + "id": "hRl2eh58iD4R4BtDhLdxx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8823.14753415568, + "y": 6674.796591314979, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 1471382596, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3499, + "versionNonce": 1138025610, + "isDeleted": false, + "id": "HGEHaAZiWp43VHMeL1hRZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8823.164840347854, + "y": 6683.935094817648, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 1382601212, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4510, + "versionNonce": 1002504470, + "isDeleted": false, + "id": "z05mzTYJd1ASOMKb2JAre", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8629.665659216153, + "y": 6658.344654587153, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.43970652144327, + "height": 14.3292891279627, + "seed": 46291908, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3188, + "versionNonce": 496747338, + "isDeleted": false, + "id": "JmE-iAJ_kglcvtJWD5dk_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8658.720369618772, + "y": 6658.944712102145, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 59.676754825502314, + "height": 13.878315075698213, + "seed": 1173697148, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 3283, + "versionNonce": 1835822678, + "isDeleted": false, + "id": "3CLKh8J2BJudjOm2b3uMC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8741.93333729628, + "y": 6658.677156485898, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 131.843993219133, + "height": 13.878315075698213, + "seed": 621429572, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 11.102652060558569, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4405, + "versionNonce": 1083755018, + "isDeleted": false, + "id": "aaqUwFVB7_rDoHLQi5qjF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8630.385117330443, + "y": 6700.094405190962, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.9532436062755, + "height": 14.755593905678678, + "seed": 975274748, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3347, + "versionNonce": 1236808598, + "isDeleted": false, + "id": "FLYgVWMlfL5O-gEMO13Fg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8635.152776350587, + "y": 6701.2274140039235, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 86.04555346932892, + "height": 13.878315075698213, + "seed": 350829252, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728759, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3455, + "versionNonce": 1942419658, + "isDeleted": false, + "id": "MY6nDho_VGOWw1RI40xT3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8740.47697147142, + "y": 6700.72393775002, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 176.9485172151522, + "height": 13.878315075698213, + "seed": 1970258812, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 3267, + "versionNonce": 1255755990, + "isDeleted": false, + "id": "vuFTqhpkMLvwzswj_Ws9s", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8739.782318511294, + "y": 6577.183051301586, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70.08549113227598, + "height": 17.347893844622767, + "seed": 754795076, + "groupIds": [ + "0KcuMn6GYu5UEI1PRZWxj" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "rectangle", + "version": 2386, + "versionNonce": 1723944842, + "isDeleted": false, + "id": "eyWQLirkWgBeWCOfQnogf", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8146.6859553354625, + "y": 7346.249436011928, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 81.82694091047381, + "height": 382.16963157670887, + "seed": 341736444, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1968, + "versionNonce": 1550108182, + "isDeleted": false, + "id": "pusmS4Ljf3rv3o6ChNDqf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8156.11107098651, + "y": 7349.743089731238, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 65.70885890457433, + "height": 16.105112476611357, + "seed": 1137988036, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 11.105112476611357, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "rectangle", + "version": 2761, + "versionNonce": 499306058, + "isDeleted": false, + "id": "ng4GoKh69PcFNOWusIjq2", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8424.01016984979, + "y": 7344.536319716438, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 120.81681727502402, + "height": 383.9914959088835, + "seed": 1336253564, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2700, + "versionNonce": 793744214, + "isDeleted": false, + "id": "MEKkSaqZkqGGhUGTaHVwh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8243.760212014666, + "y": 7345.548610162453, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 166.790711563602, + "height": 382.719059225012, + "seed": 476936516, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2909, + "versionNonce": 1571190026, + "isDeleted": false, + "id": "fpGp_XFjZxtG6Qsqy0C2y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8142.221570256035, + "y": 7373.5632927615525, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.7486781931217, + "height": 12.915967205330695, + "seed": 1177857276, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1850, + "versionNonce": 233748630, + "isDeleted": false, + "id": "tUlfkLfGgu6bxGotf6I_u", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8182.72096146466, + "y": 7373.579231373574, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 43.805905936382885, + "height": 12.884089981289083, + "seed": 1718988996, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "240.923", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 1916, + "versionNonce": 401032138, + "isDeleted": false, + "id": "Va-OsOBHAswqLfC-MMWrX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8247.771195843197, + "y": 7373.579231373574, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 697150844, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 1675, + "versionNonce": 804730326, + "isDeleted": false, + "id": "WbeN7ETZ9pPRKwX94CLSD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8426.372827970226, + "y": 7374.44368861897, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1099626564, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-23 04:39:21", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-23 04:39:21" + }, + { + "type": "text", + "version": 1770, + "versionNonce": 1453341322, + "isDeleted": false, + "id": "KL8SCNVpDcWYVbikJrTUM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8303.566068343298, + "y": 7350.072802913973, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.09431493451179, + "height": 16.105112476611357, + "seed": 720543228, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 11.105112476611357, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "text", + "version": 1897, + "versionNonce": 243141398, + "isDeleted": false, + "id": "tzvLZjZQnxlpRpELVRxb5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8435.326503597105, + "y": 7350.165071787539, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 83.74658487837905, + "height": 16.105112476611357, + "seed": 696995780, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 1, + "text": "EventTime.bin", + "baseline": 11.105112476611357, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "EventTime.bin" + }, + { + "type": "text", + "version": 2042, + "versionNonce": 680286538, + "isDeleted": false, + "id": "zuPRjxPY0E9b--V67WQj0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8108.062609560282, + "y": 7375.087656235323, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.633406956964894, + "height": 12.884089981289083, + "seed": 56983164, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 0", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 2130, + "versionNonce": 939014230, + "isDeleted": false, + "id": "V7SmIzKjKLzHwyyeX7ICq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8183.365165963725, + "y": 7420.957891614406, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1855240004, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2262, + "versionNonce": 218537994, + "isDeleted": false, + "id": "JlIsJsLpfs7P3ba8BAIvr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8183.365165963725, + "y": 7429.834919803933, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 2074627836, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2271, + "versionNonce": 607829398, + "isDeleted": false, + "id": "fCJNcsMHfcWbclsY1Y6yE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8183.365165963725, + "y": 7438.31875237154, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 755314372, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2128, + "versionNonce": 1611271882, + "isDeleted": false, + "id": "b3Ge1YFCwB9yrKz-FDyQI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8323.246825872557, + "y": 7420.165590464222, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1950158716, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2244, + "versionNonce": 142252758, + "isDeleted": false, + "id": "WRa6ZxuguE8HP24yP7CP5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8323.431668640751, + "y": 7429.042618653745, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1165669956, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2253, + "versionNonce": 1177658762, + "isDeleted": false, + "id": "Il3SrWQwkzSbt4oMOfOeb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8323.447735039015, + "y": 7437.526451221352, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1835384828, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2174, + "versionNonce": 726454294, + "isDeleted": false, + "id": "rxjHpaESbzq_zY3oiOrHb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8476.373987054132, + "y": 7420.19716014493, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1423134148, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2290, + "versionNonce": 414737482, + "isDeleted": false, + "id": "eMNiRyUxWXXlxjUK6raRx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8476.55882982233, + "y": 7429.0741883344535, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 254042236, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2299, + "versionNonce": 950426966, + "isDeleted": false, + "id": "smfY8k4tMAxHnJtwSJ7tO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8476.574896220598, + "y": 7437.55802090206, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 741143876, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2844, + "versionNonce": 1366903562, + "isDeleted": false, + "id": "QGy2MOBwSQYKpyZuYcyiH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8180.144143468402, + "y": 7564.651044027091, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 825946364, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3019, + "versionNonce": 366756502, + "isDeleted": false, + "id": "dZ88qHjfn7Uw7Zm2FCCAQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8142.332903786082, + "y": 7394.322192382414, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.06403689613023, + "height": 12.820060975088683, + "seed": 1223011524, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2001, + "versionNonce": 1995397578, + "isDeleted": false, + "id": "_J5jVf8txcgcOO5ntxOYr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8182.72096146466, + "y": 7394.290177879314, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 43.805905936382885, + "height": 12.884089981289083, + "seed": 1663791484, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "258.382", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 2064, + "versionNonce": 899907542, + "isDeleted": false, + "id": "KNmAbPFRbdGp-vyKGjuKe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8247.979709906998, + "y": 7394.290177879314, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 1285256260, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 1828, + "versionNonce": 137728138, + "isDeleted": false, + "id": "uOgzgMKQLos69DzNUURPG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8426.58134203402, + "y": 7394.346023007981, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1949819388, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 01:03:28", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:03:28" + }, + { + "type": "text", + "version": 2188, + "versionNonce": 1813058838, + "isDeleted": false, + "id": "UQdyNToBv3Xou0tapjPXp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8108.271123624079, + "y": 7395.76245276025, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 25.123975463513712, + "height": 12.884089981289083, + "seed": 1965837252, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 1", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "rectangle", + "version": 3796, + "versionNonce": 1762062154, + "isDeleted": false, + "id": "YsrvFR5baUk_Xxyib_rRu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8142.399673491265, + "y": 7415.260643493276, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.3348709316003, + "height": 12.976079252205857, + "seed": 2070037116, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2820, + "versionNonce": 1117389398, + "isDeleted": false, + "id": "Bu_0ggY_S9Tge8XF1Fp0Z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8182.72096146466, + "y": 7415.306638128736, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 43.805905936382885, + "height": 12.884089981289083, + "seed": 347484996, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "258.382", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "258.382" + }, + { + "type": "text", + "version": 2888, + "versionNonce": 1304327690, + "isDeleted": false, + "id": "V78XIuG54iSbnDyvYzuAh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.099936461935, + "y": 7415.306638128736, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 1600951036, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​gruzochno​.​ru​/​ekat...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​gruzochno​.​ru​/​ekat..." + }, + { + "type": "text", + "version": 2631, + "versionNonce": 1276331926, + "isDeleted": false, + "id": "54Np45AE5uTDPoThaRwS_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8426.701568588964, + "y": 7415.3624832574, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 160901828, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 01:04:08", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 01:04:08" + }, + { + "type": "text", + "version": 3010, + "versionNonce": 660022474, + "isDeleted": false, + "id": "vPa80CNvOv6wgyfz9rhfL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8107.747145679954, + "y": 7416.8249876233285, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.633406956964894, + "height": 12.884089981289083, + "seed": 1591268220, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 2", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "rectangle", + "version": 3541, + "versionNonce": 2024924374, + "isDeleted": false, + "id": "QqTUoBRIdTsdL9coBOmgT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8142.069592931501, + "y": 7456.208299250616, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.17957428251805, + "height": 12.820060975088683, + "seed": 913125956, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2637, + "versionNonce": 258734986, + "isDeleted": false, + "id": "nzG3bYM28gIh8xtHz64v_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8171.125280481501, + "y": 7456.235407155379, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 401146876, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2705, + "versionNonce": 1779096086, + "isDeleted": false, + "id": "BTLpD34QjYtoPSWczR4t3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8247.914230853257, + "y": 7456.235407155379, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 2048281028, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 2453, + "versionNonce": 876083786, + "isDeleted": false, + "id": "ajs3bWqKHWc52NX73FbyW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8426.515862980283, + "y": 7456.291252284046, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 278865020, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 00:26:41", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:26:41" + }, + { + "type": "text", + "version": 2816, + "versionNonce": 1192437590, + "isDeleted": false, + "id": "r21v1jglDJ4RWw417dL8e", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8090.167918596537, + "y": 7457.617653908718, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.09431493451179, + "height": 12.884089981289083, + "seed": 665874756, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.191", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.191" + }, + { + "type": "rectangle", + "version": 3652, + "versionNonce": 1150689546, + "isDeleted": false, + "id": "UFAt8q8kr0_8Srg_Qw8O5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8142.43136886428, + "y": 7476.617383435562, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.6833795189834, + "height": 13.075537174306843, + "seed": 1052587260, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2739, + "versionNonce": 270519446, + "isDeleted": false, + "id": "M11cAoGIT7-czsRrZLigW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8171.125280481501, + "y": 7476.713107032069, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 2123999428, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2806, + "versionNonce": 1543598026, + "isDeleted": false, + "id": "2Ri6lo1tUkBrjGQhmS9hV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8247.742670761534, + "y": 7476.713107032069, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 264582524, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 2555, + "versionNonce": 1927662038, + "isDeleted": false, + "id": "0Bi8S_vMo5TF6Kyu7E8oP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8426.34430288856, + "y": 7476.768952160736, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 577761348, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 00:27:07", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 00:27:07" + }, + { + "type": "text", + "version": 2906, + "versionNonce": 1855252106, + "isDeleted": false, + "id": "Zw_-yf_ZdvJk4yog3fBs0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8089.352154005748, + "y": 7478.313120012613, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49.603746427962975, + "height": 12.884089981289083, + "seed": 1895376380, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.192", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.192" + }, + { + "type": "rectangle", + "version": 3866, + "versionNonce": 511319830, + "isDeleted": false, + "id": "jfAVVRU9ZK3PGJWFuzebv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8142.711115323491, + "y": 7498.241895660151, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.87032863990953, + "height": 11.872141895465793, + "seed": 319899588, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2883, + "versionNonce": 889947466, + "isDeleted": false, + "id": "hAAzjxYUHXrDH8L09QaVR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8171.125280481501, + "y": 7497.735921617238, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 1465583228, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 2954, + "versionNonce": 391236694, + "isDeleted": false, + "id": "Gt4AFPkDfGx9LeNIZBMdg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8247.951184825331, + "y": 7497.735921617238, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 614182724, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4723, + "versionNonce": 415255562, + "isDeleted": false, + "id": "Cpd5KzWYjFxnUSdgjtgW2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8142.960255106096, + "y": 7519.047437902606, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.4196986448144, + "height": 12.453753189444956, + "seed": 1202509564, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3711, + "versionNonce": 188862870, + "isDeleted": false, + "id": "hzmUC0_V0DfzCi8IhyTpl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8171.125280481501, + "y": 7518.832269506683, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 55.401586919543064, + "height": 12.884089981289083, + "seed": 2003642052, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 3778, + "versionNonce": 531512010, + "isDeleted": false, + "id": "WoJxNwThuryhSZLhUOGIU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.071411380271, + "y": 7518.832269506683, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 122.39885482224629, + "height": 12.884089981289083, + "seed": 1584437116, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "text", + "version": 3523, + "versionNonce": 629092054, + "isDeleted": false, + "id": "YrMdFf4ficdmk1pS9eMTy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8426.673043507297, + "y": 7518.88811463535, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1881386564, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 12:25:12", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:25:12" + }, + { + "type": "text", + "version": 2496, + "versionNonce": 1483755914, + "isDeleted": false, + "id": "cHjk1qQTD6V6YwGbeBTlh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8182.72096146466, + "y": 7524.462121805897, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1474840572, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2616, + "versionNonce": 1654580246, + "isDeleted": false, + "id": "Zh2GpaVPjmS9rOJ53F-Ch", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8182.72096146466, + "y": 7533.3391499954205, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 798836164, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2625, + "versionNonce": 1178701898, + "isDeleted": false, + "id": "cAzonjakSb1GH47ELfWrs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8182.72096146466, + "y": 7541.822982563027, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 404088956, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2499, + "versionNonce": 1687548246, + "isDeleted": false, + "id": "9zyI0wCHNBsveZW1Rxozd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8323.220763737969, + "y": 7523.669820655713, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 184020292, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2615, + "versionNonce": 1291646730, + "isDeleted": false, + "id": "sbmYpg9fPU7d_hSmWw_aV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8323.405606506167, + "y": 7532.546848845236, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 851147004, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2624, + "versionNonce": 1186551446, + "isDeleted": false, + "id": "vp9ZeymaOkcd_45kcxTEi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8323.421672904431, + "y": 7541.030681412843, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 59876548, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2545, + "versionNonce": 488474058, + "isDeleted": false, + "id": "yptsoLQvdlhujEhAPvGXu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8476.347924919552, + "y": 7523.701390336418, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1935341948, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2661, + "versionNonce": 1908282326, + "isDeleted": false, + "id": "coRo4THkUXGSiikDQvW2A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8476.53276768775, + "y": 7532.578418525941, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1057516612, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2670, + "versionNonce": 532561034, + "isDeleted": false, + "id": "-c2T5uxn3Sy4Ykhap2DOe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8476.54883408601, + "y": 7541.062251093547, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1698064892, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3965, + "versionNonce": 1874405654, + "isDeleted": false, + "id": "thnI8Q-fNbpd1wfUNd2zy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8142.163849552984, + "y": 7559.305944203516, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 408.0749706946756, + "height": 13.266679588124175, + "seed": 2134524868, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3009, + "versionNonce": 1654266698, + "isDeleted": false, + "id": "TPCjDTmriAO_W98JC9JS7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8164.683235490855, + "y": 7559.497239006935, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 61.843631910187604, + "height": 12.884089981289083, + "seed": 1531955836, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "10.487.847", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "10.487.847" + }, + { + "type": "text", + "version": 3079, + "versionNonce": 1075811926, + "isDeleted": false, + "id": "nnrOgIjKhiJdq3Tg40SFC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8247.888168718673, + "y": 7559.497239006935, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 440740676, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http://doc/1437831&is_mo...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http://doc/1437831&is_mo..." + }, + { + "type": "text", + "version": 2824, + "versionNonce": 67904010, + "isDeleted": false, + "id": "6-aR8x_3e64tQX8K0Jj77", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8426.489800845702, + "y": 7559.553084135602, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 2020154108, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-17 05:50:01", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-17 05:50:01" + }, + { + "type": "text", + "version": 3166, + "versionNonce": 734419862, + "isDeleted": false, + "id": "I7ji7fXd3wikuwLAzDBld", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8082.411402473179, + "y": 7561.121884100209, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56.68999591767197, + "height": 12.884089981289083, + "seed": 1921458884, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 16.383", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 16.383" + }, + { + "type": "text", + "version": 3023, + "versionNonce": 521097418, + "isDeleted": false, + "id": "0940Kad3RPAD5L4-gGvQy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8180.144143468402, + "y": 7576.745303041113, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 923032444, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3207, + "versionNonce": 417495254, + "isDeleted": false, + "id": "ZKEujwwWYvwJ1MmtG7hZh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8180.144143468402, + "y": 7588.839907122373, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1855859268, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3088, + "versionNonce": 926853002, + "isDeleted": false, + "id": "dWbwBWV6pLyeaLFMVaIiw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8321.800471834173, + "y": 7564.706910193204, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1902349308, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3265, + "versionNonce": 1594420758, + "isDeleted": false, + "id": "Zfd4-5KLBkvpWaUZcRph7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8322.032708789498, + "y": 7576.80116920723, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1902657988, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3449, + "versionNonce": 617948746, + "isDeleted": false, + "id": "VvHJoZGDtfb4b84rRU0Ye", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8321.981025351553, + "y": 7588.8957732884855, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1770564732, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3151, + "versionNonce": 456047446, + "isDeleted": false, + "id": "SIlz3HEvAz4cFS7DjtL6K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8475.424436082918, + "y": 7564.690972842313, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1375955268, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3328, + "versionNonce": 11390218, + "isDeleted": false, + "id": "liSDDdw78J3nmDpQYb4ME", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8475.65667303824, + "y": 7576.785231856339, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1362476284, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3512, + "versionNonce": 61399190, + "isDeleted": false, + "id": "M8HnbNsOlbROyg4oTB-BG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8475.604989600302, + "y": 7588.879835937599, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.816703478482447, + "height": 28.344997958835986, + "seed": 1405984964, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 23.19136196632035, + "fontFamily": 3, + "text": ".", + "baseline": 23.344997958835986, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4335, + "versionNonce": 272866250, + "isDeleted": false, + "id": "uBjx41ruBNauavGJObspT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8143.439859093502, + "y": 7621.227699987078, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.5349404945144, + "height": 12.5448702900298, + "seed": 1374469500, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3270, + "versionNonce": 1009540566, + "isDeleted": false, + "id": "JlB64R0v9REeNPNzQaLSZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8146.6455095170495, + "y": 7621.058090141448, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 509929540, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3338, + "versionNonce": 833720970, + "isDeleted": false, + "id": "r8VMfI4bt7ic83NP6VuW-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8247.664821452774, + "y": 7621.058090141448, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 351251964, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 3083, + "versionNonce": 701379350, + "isDeleted": false, + "id": "ZnM2JB-lQvi_w-_k59ymj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8426.266453579796, + "y": 7621.113935270115, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 900153284, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-22 16:22:00", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 16:22:00" + }, + { + "type": "text", + "version": 3395, + "versionNonce": 1202893130, + "isDeleted": false, + "id": "DXhM3_3k8HpCbiXcD_i9o", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8062.2177157362785, + "y": 7622.189695745256, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 76.66033538867005, + "height": 12.884089981289083, + "seed": 1262521980, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.863.744", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.863.744" + }, + { + "type": "rectangle", + "version": 4344, + "versionNonce": 1191403606, + "isDeleted": false, + "id": "H1NDxJDukTHqqjRXLDoEY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8142.688136930967, + "y": 7641.949777081242, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.0906986792239, + "height": 12.451874687980121, + "seed": 1907533636, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3414, + "versionNonce": 631371786, + "isDeleted": false, + "id": "xF7gYZaXCP1oHM2_V-5u-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8146.6455095170495, + "y": 7641.733669434588, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 899768060, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3491, + "versionNonce": 2007033238, + "isDeleted": false, + "id": "rgsmyACQ-NYgZFLgujAD7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8247.873335516571, + "y": 7641.733669434588, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 1994727108, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 3229, + "versionNonce": 2071619274, + "isDeleted": false, + "id": "6gpA-61VSGEjIxSbYW4XZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8426.474967643597, + "y": 7641.789514563255, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 747904892, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-22 18:02:12", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 18:02:12" + }, + { + "type": "rectangle", + "version": 5155, + "versionNonce": 1557906134, + "isDeleted": false, + "id": "9Eaw4gcysIO1ZZaE43eeP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8142.040174504844, + "y": 7662.663214690624, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.05367499757995, + "height": 12.820060975088683, + "seed": 769435204, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4237, + "versionNonce": 1104608650, + "isDeleted": false, + "id": "YZn_gbCOWmPo7yz5QKKJQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8146.6455095170495, + "y": 7662.631200187524, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 677040124, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 4310, + "versionNonce": 692647958, + "isDeleted": false, + "id": "k2yuj_u3AVjQfa_pHtYVm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8247.92996794434, + "y": 7662.631200187524, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 997670340, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "http​:​/​/​sozcu​.​com​.​tr​/​oaut...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sozcu​.​com​.​tr​/​oaut..." + }, + { + "type": "text", + "version": 4052, + "versionNonce": 636664906, + "isDeleted": false, + "id": "3ovu2yMS_lB79F5PSF9LJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8426.595194198533, + "y": 7662.687045316191, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 1224175740, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-19 00:09:42", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-19 00:09:42" + }, + { + "type": "text", + "version": 3028, + "versionNonce": 1960674646, + "isDeleted": false, + "id": "nhitQKzr6FC_fbgyg0zWn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8182.72096146466, + "y": 7668.425117346146, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 2027087172, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3144, + "versionNonce": 1973986058, + "isDeleted": false, + "id": "Pu7A0iOqTj2m9i_1NfMP-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8182.72096146466, + "y": 7677.302145535669, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1579942140, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3153, + "versionNonce": 284060310, + "isDeleted": false, + "id": "ZBLCh-GyiK_Qw6Io38BDV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8182.72096146466, + "y": 7685.785978103276, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1800248516, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3029, + "versionNonce": 192131530, + "isDeleted": false, + "id": "musZGaxV6ZvYKV7ezd0gF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8323.142914429212, + "y": 7667.632816195958, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1870299516, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3144, + "versionNonce": 1546692566, + "isDeleted": false, + "id": "XW592hY2pY89GusqIU75q", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8323.27191206874, + "y": 7676.453999256814, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1015374916, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3153, + "versionNonce": 980347018, + "isDeleted": false, + "id": "EA2zz9adx5T5pBmNmbZOS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8323.287978467008, + "y": 7684.937831824424, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1143271932, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3075, + "versionNonce": 381238550, + "isDeleted": false, + "id": "nDQ83b0Gf5ma04vBkORUL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8476.270075610788, + "y": 7667.6643858766665, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 844643268, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3190, + "versionNonce": 978667338, + "isDeleted": false, + "id": "2jol4ntdHr4A0NW_b1G3W", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8476.399073250323, + "y": 7676.485568937523, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 1798132348, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3199, + "versionNonce": 905783894, + "isDeleted": false, + "id": "JGUSqJpJnk9YK-wdbUUit", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8476.415139648583, + "y": 7684.969401505129, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.01886298690236, + "height": 15.460907977546901, + "seed": 652485444, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 12.884089981289083, + "fontFamily": 3, + "text": ".", + "baseline": 12.460907977546901, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4488, + "versionNonce": 327273994, + "isDeleted": false, + "id": "cYN493zc-2IKzMjTvtHr5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8142.69387467394, + "y": 7703.617619086123, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.881484259647, + "height": 12.78152620898583, + "seed": 1129685756, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3166, + "versionNonce": 953249686, + "isDeleted": false, + "id": "I5UQC6eXb4ETJvt_MV6BS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8146.6455095170495, + "y": 7703.5663371999735, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.88135788399232, + "height": 12.884089981289083, + "seed": 8854212, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "4.294.961.484", + "baseline": 9.884089981289083, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.294.961.484" + }, + { + "type": "text", + "version": 3326, + "versionNonce": 183467210, + "isDeleted": false, + "id": "L5LGZDfS0Ktf6DqvulprB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8248.416554718555, + "y": 7703.5663371999735, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.27214726143583, + "height": 12.884089981289083, + "seed": 52421500, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "https​:​/​/​m​.​sport​.​airway​/​?...", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​m​.​sport​.​airway​/​?..." + }, + { + "type": "text", + "version": 3047, + "versionNonce": 2070613206, + "isDeleted": false, + "id": "9JFHwZXHfSJmpknoIbyuZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8427.15343465119, + "y": 7703.5663371999735, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.95680983160176, + "height": 12.884089981289083, + "seed": 702489156, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 3, + "text": "2014-03-21 12:05:41", + "baseline": 9.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 12:05:41" + }, + { + "type": "text", + "version": 3286, + "versionNonce": 238637962, + "isDeleted": false, + "id": "BcBe4B6Cpkz6sfJLPeYDB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8062.869566360718, + "y": 7704.765203450349, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 77.94874438679896, + "height": 12.884089981289083, + "seed": 1087247356, + "groupIds": [ + "TqoJdP4TMAuLs4Zn1jCsF" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 10.307271985031267, + "fontFamily": 1, + "text": "row 8.867.680", + "baseline": 8.884089981289083, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.867.680" + }, + { + "type": "rectangle", + "version": 4745, + "versionNonce": 530207306, + "isDeleted": false, + "id": "ZpLhNpS92lB0t_LVrZQMv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8604.160310147388, + "y": 7442.278034049657, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 313.4067189003712, + "height": 175.64125101319777, + "seed": 1932035396, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3694, + "versionNonce": 2074234710, + "isDeleted": false, + "id": "OYb5oPNw0Oc0Hu5ec3oKg", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8619.612923737812, + "y": 7479.092049271821, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 85.99405190947766, + "height": 126.9568483897424, + "seed": 360734972, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3157, + "versionNonce": 1106082058, + "isDeleted": false, + "id": "V6euQ-CSVo59DCPiu09DD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8639.411981042344, + "y": 7482.720142422986, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49.96193427251357, + "height": 17.347893844622767, + "seed": 1240415428, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "UserID", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "rectangle", + "version": 3968, + "versionNonce": 948565142, + "isDeleted": false, + "id": "icu7xzANGPdRcnYFaDfpS", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8722.843395984186, + "y": 7478.135016265256, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 178.33606526040433, + "height": 127.6265329471055, + "seed": 2101535100, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4823, + "versionNonce": 1689110474, + "isDeleted": false, + "id": "cjDNDKbfk7nZ8y_qnwUfI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8613.996957489617, + "y": 7506.714959497316, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.2149724420926, + "height": 14.849725943301076, + "seed": 368247876, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2992, + "versionNonce": 1540026838, + "isDeleted": false, + "id": "RaDlEETS9wxXSFnxpPFNt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8656.233356605735, + "y": 7509.139256474406, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 47.186271257373924, + "height": 13.878315075698213, + "seed": 971067900, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "240.923", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 3096, + "versionNonce": 1341537930, + "isDeleted": false, + "id": "KN5g13QkRxreCij8b4l3s", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8724.960832922981, + "y": 7508.271861782174, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 176.9485172151522, + "height": 13.878315075698213, + "seed": 1293016004, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 2953, + "versionNonce": 8013590, + "isDeleted": false, + "id": "Qrog8vp-UMxEKMiWSywLu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8793.328056474456, + "y": 7483.015144021785, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 28.450545905181336, + "height": 17.347893844622767, + "seed": 710783612, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728760, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "URL", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "text", + "version": 3243, + "versionNonce": 276946250, + "isDeleted": false, + "id": "flH3d03MxteX9Rn49h-jo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8660.169181631238, + "y": 7537.225064637092, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 2036974404, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3359, + "versionNonce": 386724950, + "isDeleted": false, + "id": "fdk1WhYizrIKJJYCcRS89", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8660.36828814014, + "y": 7546.787105443156, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 2105148156, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3368, + "versionNonce": 1672193034, + "isDeleted": false, + "id": "iQiUT-U8ZZX8JGVD4McYC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8660.385594332314, + "y": 7555.925608945825, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 827898564, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3330, + "versionNonce": 962066838, + "isDeleted": false, + "id": "Mt0HtWMNRYEZS_J4bWpC6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8807.588359225701, + "y": 7536.31146955158, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 968377212, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3446, + "versionNonce": 594449098, + "isDeleted": false, + "id": "S8CMnpUeeyZ6XauAHHkwF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8807.787465734604, + "y": 7545.873510357644, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 259834436, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3455, + "versionNonce": 2123388630, + "isDeleted": false, + "id": "T9iwyHOHOb3M2dAY2pUSF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8807.804771926778, + "y": 7555.012013860312, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 1163555836, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4466, + "versionNonce": 845523338, + "isDeleted": false, + "id": "StEESHST8sKYxSFrkKGdn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8614.305590795077, + "y": 7529.421573629817, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.43970652144327, + "height": 14.3292891279627, + "seed": 716429764, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3144, + "versionNonce": 1330318358, + "isDeleted": false, + "id": "CKwKxu_-RTpMzWKNsfL_O", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8643.360301197696, + "y": 7530.021631144809, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 59.676754825502314, + "height": 13.878315075698213, + "seed": 1851954300, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 3239, + "versionNonce": 1741416522, + "isDeleted": false, + "id": "-IgqprAYjIywkZbv-mP90", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8726.573268875203, + "y": 7529.754075528563, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 131.843993219133, + "height": 13.878315075698213, + "seed": 236716356, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 11.102652060558569, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4361, + "versionNonce": 964499798, + "isDeleted": false, + "id": "y_lIhIr-drTf14pvjZxdq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8615.025048909367, + "y": 7571.171324233626, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.9532436062755, + "height": 14.755593905678678, + "seed": 1922213116, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3303, + "versionNonce": 2071744266, + "isDeleted": false, + "id": "_dCwdtkTvRQ5LAatWiAyY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8619.792707929511, + "y": 7572.304333046588, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 86.04555346932892, + "height": 13.878315075698213, + "seed": 823343300, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3411, + "versionNonce": 1148944022, + "isDeleted": false, + "id": "kwLnWCV83ZCmpm-AQb1wN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8725.116903050344, + "y": 7571.8008567926845, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 176.9485172151522, + "height": 13.878315075698213, + "seed": 124560764, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 3223, + "versionNonce": 1911676362, + "isDeleted": false, + "id": "yAnvLI224dqTejnO4d2-4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8724.422250090218, + "y": 7448.25997034425, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70.08549113227598, + "height": 17.347893844622767, + "seed": 1865908292, + "groupIds": [ + "zeZm_vKZAKSbojGC86XLJ" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "rectangle", + "version": 4837, + "versionNonce": 1157315542, + "isDeleted": false, + "id": "KjiX31M6SpynnehLETfvy", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8609.636698357337, + "y": 8142.220721795301, + "strokeColor": "#15223c", + "backgroundColor": "#ffc029", + "width": 304.57312989326493, + "height": 170.69067870387278, + "seed": 1629703548, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4884, + "versionNonce": 138908810, + "isDeleted": false, + "id": "tJJ6DNAVHvwIXLOGvY7f-", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8608.40292617216, + "y": 8139.219680337815, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 313.4067189003712, + "height": 175.64125101319777, + "seed": 798971972, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3833, + "versionNonce": 823218454, + "isDeleted": false, + "id": "om1XGvHKuJZ6gywUGj3ZR", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8623.855539762584, + "y": 8176.033695559978, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 85.99405190947766, + "height": 126.9568483897424, + "seed": 517225980, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3296, + "versionNonce": 540570442, + "isDeleted": false, + "id": "bS4hWc_GgvVX6nCHRvkQr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8643.654597067116, + "y": 8179.661788711142, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49.96193427251357, + "height": 17.347893844622767, + "seed": 370388932, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "UserID", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "rectangle", + "version": 4107, + "versionNonce": 1949482582, + "isDeleted": false, + "id": "Wz7bTSdxYi3DXKEeBNkaW", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 8727.086012008958, + "y": 8175.0766625534125, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 178.33606526040433, + "height": 127.6265329471055, + "seed": 1242766972, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4962, + "versionNonce": 740260362, + "isDeleted": false, + "id": "7qBUzqCrHcPwwzVaSbT2h", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8618.23957351439, + "y": 8203.656605785472, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.2149724420926, + "height": 14.849725943301076, + "seed": 1796282180, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3131, + "versionNonce": 1127515030, + "isDeleted": false, + "id": "Qkm-1jBDFeLQk8X1XEZcC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8660.475972630507, + "y": 8206.080902762562, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 47.186271257373924, + "height": 13.878315075698213, + "seed": 1537339132, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "240.923", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "240.923" + }, + { + "type": "text", + "version": 3235, + "versionNonce": 452438218, + "isDeleted": false, + "id": "lm1H3Daz5d1urnn5oTKto", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8729.203448947754, + "y": 8205.21350807033, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 176.9485172151522, + "height": 13.878315075698213, + "seed": 452300484, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "http​:​/​/​showtopics​.​html%3...", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​showtopics​.​html%3..." + }, + { + "type": "text", + "version": 3092, + "versionNonce": 1884004566, + "isDeleted": false, + "id": "0CcrtQpzSpkyhMSWnJ3f-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8797.570672499229, + "y": 8179.956790309941, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 28.450545905181336, + "height": 17.347893844622767, + "seed": 1677897596, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "URL", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "text", + "version": 3382, + "versionNonce": 1146879882, + "isDeleted": false, + "id": "H4ropKYW02ljfa1GGUMwP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8664.41179765601, + "y": 8234.166710925248, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 1449072196, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3498, + "versionNonce": 1057822230, + "isDeleted": false, + "id": "pmHwx1GLsZpxQiqGxRAbA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8664.610904164912, + "y": 8243.728751731313, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 326590460, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3507, + "versionNonce": 1418165834, + "isDeleted": false, + "id": "OVCTfdJW28j89ckwXdaN3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8664.628210357087, + "y": 8252.867255233981, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.71482055298875, + "height": 16.653978090837857, + "seed": 170634692, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 3, + "text": ".", + "baseline": 13.653978090837857, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3469, + "versionNonce": 946725718, + "isDeleted": false, + "id": "DsjLrXhzLMMfzG-RsocMW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8811.830975250474, + "y": 8233.253115839736, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 1107427452, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3585, + "versionNonce": 945104138, + "isDeleted": false, + "id": "oSjxQPJEThNTKOB4suHQq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8812.030081759376, + "y": 8242.8151566458, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 1467569476, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3594, + "versionNonce": 2126710934, + "isDeleted": false, + "id": "X2WqYF5erRzKAT3WIycAT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8812.04738795155, + "y": 8251.953660148469, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 4.857410276494375, + "height": 17.347893844622767, + "seed": 2003079420, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": ".", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4605, + "versionNonce": 155186122, + "isDeleted": false, + "id": "aqsXeVll8YI44xSF_sPKw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8618.548206819849, + "y": 8226.363219917974, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.43970652144327, + "height": 14.3292891279627, + "seed": 195431620, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3283, + "versionNonce": 566330838, + "isDeleted": false, + "id": "876hU6te76N_4vNSYPbeK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8647.602917222468, + "y": 8226.963277432966, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 59.676754825502314, + "height": 13.878315075698213, + "seed": 1931547004, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "4.073.710", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.073.710" + }, + { + "type": "text", + "version": 3378, + "versionNonce": 2036525706, + "isDeleted": false, + "id": "a-JeeNkdRGCq8A51_Qz7P", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8730.815884899976, + "y": 8226.695721816719, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 131.843993219133, + "height": 13.878315075698213, + "seed": 407884868, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 11.102652060558569, + "fontFamily": 3, + "text": "http​:​/​/​mk​.​ru&pos=3_0", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​mk​.​ru&pos=3_0" + }, + { + "type": "rectangle", + "version": 4500, + "versionNonce": 1920883478, + "isDeleted": false, + "id": "oG_ZUxIgYFHzUzOYREXpi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8619.26766493414, + "y": 8268.112970521783, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 293.9532436062755, + "height": 14.755593905678678, + "seed": 880378364, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3442, + "versionNonce": 1064896842, + "isDeleted": false, + "id": "mbtqxQjCU4n0-e-VRlSIs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8624.035323954284, + "y": 8269.245979334744, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 86.04555346932892, + "height": 13.878315075698213, + "seed": 190098372, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "4.292.714.039", + "baseline": 11.878315075698213, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "4.292.714.039" + }, + { + "type": "text", + "version": 3550, + "versionNonce": 1466861654, + "isDeleted": false, + "id": "o1owyyFfRs227nqeo3E8J", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8729.359519075117, + "y": 8268.74250308084, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 176.9485172151522, + "height": 13.878315075698213, + "seed": 40886908, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 11.10265206055857, + "fontFamily": 3, + "text": "http​:​/​/​sosyal-mansetleri...", + "baseline": 11.878315075698213, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "http​:​/​/​sosyal-mansetleri..." + }, + { + "type": "text", + "version": 3362, + "versionNonce": 48058378, + "isDeleted": false, + "id": "uezVAywY70rzFqPo411oz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8728.66486611499, + "y": 8145.201616632407, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 70.08549113227598, + "height": 17.347893844622767, + "seed": 114463556, + "groupIds": [ + "bkQmwua_qQ4S8m_Ab4QsP" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 13.878315075698213, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 12.347893844622767, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "rectangle", + "version": 3092, + "versionNonce": 543624598, + "isDeleted": false, + "id": "vE52bshJZTZBbsVv0Xpxh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8145.806489127222, + "y": 8036.034614093186, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 166.77029716022477, + "height": 382.67221620130925, + "seed": 180803396, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2838, + "versionNonce": 1200275146, + "isDeleted": false, + "id": "eLtBmTHE_EUVRSTXc-7UE", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8326.702950637206, + "y": 8036.677054936073, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 81.81692567543335, + "height": 382.1228558003817, + "seed": 187182844, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3011, + "versionNonce": 1520233174, + "isDeleted": false, + "id": "Hv8dKzK6DhqZGdrHKhAnr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 8420.036870821918, + "y": 8035.059882674624, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 120.8020298613876, + "height": 383.94449714487905, + "seed": 1039355588, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2147, + "versionNonce": 1511806346, + "isDeleted": false, + "id": "sPLtd0u-5eAtZaiGoIVIY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8431.351819502881, + "y": 8040.687945812783, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 83.73633468789095, + "height": 16.10314128613287, + "seed": 1220603772, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 1, + "text": "EventTime.bin", + "baseline": 11.103141286132871, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "EventTime.bin" + }, + { + "type": "text", + "version": 3401, + "versionNonce": 614801430, + "isDeleted": false, + "id": "8KEXqpW4sFrW8rsCNs9-P", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8471.44484418921, + "y": 8255.187589900144, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1403311684, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3578, + "versionNonce": 1003295818, + "isDeleted": false, + "id": "waAkMp3axyzBuYLSjwi6Q", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8471.677052719817, + "y": 8267.280368633406, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1181589500, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3762, + "versionNonce": 41200982, + "isDeleted": false, + "id": "HwbPjhFgvEM-YIYu2fRbe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8471.625375607688, + "y": 8279.373492391662, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1488547268, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3163, + "versionNonce": 242744074, + "isDeleted": false, + "id": "XNRh5wP8_JmG207BUAV4I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8138.282760835438, + "y": 8064.083302953934, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.69889405639157, + "height": 12.914386351324707, + "seed": 1009795196, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1930, + "versionNonce": 828412566, + "isDeleted": false, + "id": "e6O7cFxkmc1xwBGZm0xDu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8422.399239764043, + "y": 8064.963591055012, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 240063812, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-18 09:59:01", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-18 09:59:01" + }, + { + "type": "text", + "version": 2297, + "versionNonce": 9963978, + "isDeleted": false, + "id": "Hp8OPDJ6jyXr811RZQSHW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8104.127981036785, + "y": 8065.607479852743, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.629779966484488, + "height": 12.882513028906299, + "seed": 298504444, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 0", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 2428, + "versionNonce": 2082328534, + "isDeleted": false, + "id": "xm7KiTahX4I3n_sZjO-bX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8472.394278939828, + "y": 8110.711462569946, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1640221892, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2544, + "versionNonce": 961036426, + "isDeleted": false, + "id": "VMlOleZl92KeJkxIvnhin", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8472.579099084134, + "y": 8119.587404252718, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1723814268, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2553, + "versionNonce": 247555350, + "isDeleted": false, + "id": "sDkzwi3g0f8u7evr3HnoE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8472.595163515947, + "y": 8128.070198438879, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1689621572, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 3273, + "versionNonce": 1145282378, + "isDeleted": false, + "id": "jNkbFZy6pnl_TUOEo2BAk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8138.394080738784, + "y": 8084.8396617825265, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.01433655629427, + "height": 12.818491859556932, + "seed": 441434620, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2083, + "versionNonce": 1254117974, + "isDeleted": false, + "id": "H5RJoeJjfmHhDgGptJFI6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8422.607728306692, + "y": 8084.863489491335, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1157786564, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-22 05:55:22", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-22 05:55:22" + }, + { + "type": "text", + "version": 2443, + "versionNonce": 2112169482, + "isDeleted": false, + "id": "U0LpI7sUhmKzAQAHVrbRT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8104.336469579437, + "y": 8086.279745879224, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 25.120900406367284, + "height": 12.882513028906299, + "seed": 1400775292, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 1", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "rectangle", + "version": 4054, + "versionNonce": 451909526, + "isDeleted": false, + "id": "jjO5H9UO2bK4tAJ6nlsoP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8138.460842271663, + "y": 8105.775550124855, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.2851374429445, + "height": 12.974491040766345, + "seed": 1153979204, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2886, + "versionNonce": 2133316810, + "isDeleted": false, + "id": "dKeQxvGIQ7qJuIhM1maWN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8422.727940146466, + "y": 8105.877377424268, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 151810812, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 05:23:19", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 05:23:19" + }, + { + "type": "text", + "version": 3265, + "versionNonce": 1199846614, + "isDeleted": false, + "id": "kFOxhiyOxIOWPwQc45wut", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8103.812555767763, + "y": 8107.3397027864985, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 29.629779966484488, + "height": 12.882513028906299, + "seed": 845499076, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 2", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "rectangle", + "version": 3795, + "versionNonce": 161917834, + "isDeleted": false, + "id": "l3bYGW2GEx-WP8biA5Bs5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8138.130802112217, + "y": 8146.718194080552, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.1298598014461, + "height": 12.818491859556932, + "seed": 159167356, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2708, + "versionNonce": 1242769942, + "isDeleted": false, + "id": "l9ZCHX_-mRZTLGgOLjvK1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8422.542257267283, + "y": 8146.8011369609185, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1618432580, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:24:50", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:24:50" + }, + { + "type": "text", + "version": 3071, + "versionNonce": 1939647050, + "isDeleted": false, + "id": "HU43L2-0QiwSupT85WXNk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8086.2354802995615, + "y": 8148.127376240233, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.088795601172045, + "height": 12.882513028906299, + "seed": 51438588, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.191", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.191" + }, + { + "type": "rectangle", + "version": 3907, + "versionNonce": 563181398, + "isDeleted": false, + "id": "IV23blO3YUrVV8mAVex7Q", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8138.492533765315, + "y": 8167.047807501959, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.6336033745057, + "height": 13.073936789682616, + "seed": 500984260, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2812, + "versionNonce": 333762826, + "isDeleted": false, + "id": "_51jMTzl6O3yDDnta8kVP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8422.305534290612, + "y": 8167.134173792728, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 197854332, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:25:15", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:25:15" + }, + { + "type": "text", + "version": 3162, + "versionNonce": 643046550, + "isDeleted": false, + "id": "FIVViUHpYRs7_a0-0f2Dz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8085.419815554542, + "y": 8168.743336528784, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 49.59767516128925, + "height": 12.882513028906299, + "seed": 766677316, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.192", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.192" + }, + { + "type": "rectangle", + "version": 4122, + "versionNonce": 771366858, + "isDeleted": false, + "id": "S1nlyP7B3SKuMAUbmLmgc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8138.657880904604, + "y": 8188.669672987344, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.8205296137334, + "height": 11.870688800798026, + "seed": 695014652, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4986, + "versionNonce": 1578113494, + "isDeleted": false, + "id": "314M9tHwDbncP4oYqtUO9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8139.021355273926, + "y": 8208.1844174258, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.36983237831794, + "height": 12.45222890827374, + "seed": 1062717636, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3783, + "versionNonce": 1576507018, + "isDeleted": false, + "id": "jyCsOfmk95zBd3c1XzVc0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8422.699418556134, + "y": 8208.025113658969, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1501107580, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:33:02", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:33:02" + }, + { + "type": "text", + "version": 2804, + "versionNonce": 1339715350, + "isDeleted": false, + "id": "JRuYYt13S2a6d0hrKtrcf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8472.368219995129, + "y": 8212.837800237594, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1718227012, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2920, + "versionNonce": 77083978, + "isDeleted": false, + "id": "alGYHOaxJ37pT6n4iMHQo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8472.553040139435, + "y": 8221.713741920365, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 422643196, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2929, + "versionNonce": 1479023702, + "isDeleted": false, + "id": "cNLf6A6QC9R6LIlleR1Oe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8472.569104571245, + "y": 8230.196536106525, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 315058116, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4224, + "versionNonce": 859241482, + "isDeleted": false, + "id": "Pmp4mJ8zkSd5jK1PqXMrL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8138.225047197135, + "y": 8248.437996273746, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 408.0250242259434, + "height": 13.265055808562055, + "seed": 1838605948, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3084, + "versionNonce": 2093883798, + "isDeleted": false, + "id": "63T6023XE1sJ8IRw005zT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8422.516198322584, + "y": 8248.685105957056, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 143511364, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-20 05:29:42", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 05:29:42" + }, + { + "type": "text", + "version": 3426, + "versionNonce": 399436490, + "isDeleted": false, + "id": "EACSr0-Xo0wZh3JtR4FHv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8078.479913537518, + "y": 8250.25371390788, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56.68305732718771, + "height": 12.882513028906299, + "seed": 1802286844, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 16.383", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 16.383" + }, + { + "type": "rectangle", + "version": 4589, + "versionNonce": 1090617046, + "isDeleted": false, + "id": "SNJY6dRh1UIrruLdVW0Rz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8139.423927773001, + "y": 8311.717397213806, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.4853049136045, + "height": 12.54333485655143, + "seed": 1478182596, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3339, + "versionNonce": 1761280394, + "isDeleted": false, + "id": "omOfLNLofV4DH0Pappnq6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8422.1507217232, + "y": 8311.538462538008, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1060403068, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-17 03:55:28", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-17 03:55:28" + }, + { + "type": "text", + "version": 3650, + "versionNonce": 2035758102, + "isDeleted": false, + "id": "rtgERUhZQuNWLHSH9bdGq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8058.211725626425, + "y": 8312.6792752282, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 76.65095252199248, + "height": 12.882513028906299, + "seed": 1443745348, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.863.744", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.863.744" + }, + { + "type": "rectangle", + "version": 4598, + "versionNonce": 1375092810, + "isDeleted": false, + "id": "OU2yTaSKQxjJB--RYIyLv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8138.672297617748, + "y": 8332.436938022607, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 406.04099507611033, + "height": 12.450350636728704, + "seed": 892348412, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3485, + "versionNonce": 532955478, + "isDeleted": false, + "id": "yaaV7M1HnqNynFHGUX5hz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8422.424394148955, + "y": 8332.211511236897, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 323184068, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-20 07:31:39", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 07:31:39" + }, + { + "type": "rectangle", + "version": 5413, + "versionNonce": 1587259146, + "isDeleted": false, + "id": "JcHBQk8Inna4xmYx7SFHh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8138.024414499196, + "y": 8353.147840404055, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 407.00385353066673, + "height": 12.818491859556932, + "seed": 1096927356, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 4308, + "versionNonce": 664643222, + "isDeleted": false, + "id": "D68gajzwJaZpXOvFZoo7s", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8422.607872698798, + "y": 8353.171668112866, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 1423576388, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-20 07:31:54", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-20 07:31:54" + }, + { + "type": "text", + "version": 3329, + "versionNonce": 1734751690, + "isDeleted": false, + "id": "_1u0nYKW2uaTor8eIv5Ki", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8472.213407427713, + "y": 8358.148399470125, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 126572796, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3444, + "versionNonce": 1368941526, + "isDeleted": false, + "id": "knzN8z5igWBTSVcciIHSa", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8472.342389278536, + "y": 8366.968502859416, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 204457156, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3453, + "versionNonce": 2104552586, + "isDeleted": false, + "id": "nH1cTfst6XwC99sgPojTH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8472.358453710352, + "y": 8375.451297045574, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1664014716, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4742, + "versionNonce": 2143910166, + "isDeleted": false, + "id": "RZxPjX_XWU50IpQwTmEJD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 8138.6780346584455, + "y": 8394.097232171918, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 405.8318062634003, + "height": 12.779961809929308, + "seed": 1323469892, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2161, + "versionNonce": 1450625866, + "isDeleted": false, + "id": "vRE06jwRcEyJU5zPthrXT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8205.605025498622, + "y": 8040.558253104665, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45.088795601172045, + "height": 16.10314128613287, + "seed": 1871596028, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 11.103141286132871, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "text", + "version": 3479, + "versionNonce": 161867350, + "isDeleted": false, + "id": "QmPSQHbJ93D3a8tfaNh82", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8223.837197183748, + "y": 8255.166090172543, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1322279876, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3656, + "versionNonce": 953340426, + "isDeleted": false, + "id": "yXDkJf8ey9PNTt4A30ysn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8224.069405714356, + "y": 8267.258868905801, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 262908540, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3840, + "versionNonce": 268610454, + "isDeleted": false, + "id": "AhXxnfA3zRwp0mDQ0eqjA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8224.017728602226, + "y": 8279.35199266406, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1377258308, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2319, + "versionNonce": 1736442058, + "isDeleted": false, + "id": "eoKtzyNgaDs4x5i9cIU6F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8149.816982030083, + "y": 8063.882255523945, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1984494332, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "​/​clck​.​yandex​.​ru​/​file​.​com​...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "​/​clck​.​yandex​.​ru​/​file​.​com​..." + }, + { + "type": "text", + "version": 2523, + "versionNonce": 1360316630, + "isDeleted": false, + "id": "oqZVa6lVC6TPFdPsACXGw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8225.283374195158, + "y": 8110.642461625389, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 722813636, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2639, + "versionNonce": 236541834, + "isDeleted": false, + "id": "_z6oskwSOQ5JEnR4LtO3Z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8225.468194339464, + "y": 8119.51840330816, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 770194300, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2648, + "versionNonce": 2087796246, + "isDeleted": false, + "id": "3giiwJKr20_NDmLOknFX-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8225.484258771277, + "y": 8128.00119749432, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 812141124, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2471, + "versionNonce": 752473674, + "isDeleted": false, + "id": "VNOgEdDXfQmOBNuRlS8PR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8150.025470572735, + "y": 8084.770216070016, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 550202364, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "/clck/jsredircnt=1395412...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "/clck/jsredircnt=1395412..." + }, + { + "type": "text", + "version": 3292, + "versionNonce": 118295382, + "isDeleted": false, + "id": "fngnUsqe7JvhhzyZz1hld", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8150.145682412505, + "y": 8105.784104002952, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 888037828, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal://200906&uinfo=ww-1...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal://200906&uinfo=ww-1..." + }, + { + "type": "text", + "version": 3116, + "versionNonce": 77364490, + "isDeleted": false, + "id": "eSazmN22o1Hk35UGsNbSp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8149.9599995333265, + "y": 8146.6426796564965, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 552897660, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 3205, + "versionNonce": 2134716566, + "isDeleted": false, + "id": "Ut_QtoFawTC_Bk5HkY2y7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8149.788460439755, + "y": 8167.106084254515, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 2143652164, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 3351, + "versionNonce": 47991754, + "isDeleted": false, + "id": "lR124Cl3uWkN3D94M20xF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8149.996948982407, + "y": 8188.126325745456, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1881513212, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 4180, + "versionNonce": 1622584790, + "isDeleted": false, + "id": "a6n3vbAP7b8ZXXVcAeIdE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8150.1171608221775, + "y": 8207.995106947721, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1145815236, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​mail​.​yandex​.​ru​/​Ma..." + }, + { + "type": "text", + "version": 2899, + "versionNonce": 766788234, + "isDeleted": false, + "id": "uGERFW6M8MXHM34UctpIA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8225.25731525046, + "y": 8212.768799293033, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1205902716, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3015, + "versionNonce": 1754170134, + "isDeleted": false, + "id": "JXQDI2BrzKs1FYdTibdFF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8225.442135394762, + "y": 8221.644740975804, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 438241348, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3024, + "versionNonce": 266297674, + "isDeleted": false, + "id": "LH6-m5sELFToNd2CGXgfE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8225.458199826578, + "y": 8230.127535161964, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1634176508, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3483, + "versionNonce": 1765388374, + "isDeleted": false, + "id": "wCWNZkVC3Yo5pwDb1l6Ng", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8149.933940588624, + "y": 8248.59183253574, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1964859332, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "goal​:​/​/​r52-echo/#compose...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "goal​:​/​/​r52-echo/#compose..." + }, + { + "type": "text", + "version": 3741, + "versionNonce": 616081418, + "isDeleted": false, + "id": "T1q_10VRsZ_ONDc3AJ8K7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8149.633647872342, + "y": 8311.621374401222, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 2109501052, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​php?show​/​7...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​php?show​/​7..." + }, + { + "type": "text", + "version": 3889, + "versionNonce": 512570774, + "isDeleted": false, + "id": "kgm7PW3qc2KcNzh70vSF7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8149.776952531887, + "y": 8332.11823781558, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 493143876, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​rt​.​com​.​tr​/...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​rt​.​com​.​tr​/..." + }, + { + "type": "text", + "version": 4708, + "versionNonce": 1144723146, + "isDeleted": false, + "id": "ExJihQDKFRan2InMpI3pE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8149.898761911216, + "y": 8352.936523887145, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 1839283964, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "https​:​/​/​wroad​.​rt​.​com​.​tr​/​...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "https​:​/​/​wroad​.​rt​.​com​.​tr​/​..." + }, + { + "type": "text", + "version": 3424, + "versionNonce": 29233878, + "isDeleted": false, + "id": "f1cr6Z96I4fUIWHbxohMq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8225.102502683047, + "y": 8358.079398525564, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 659766980, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3539, + "versionNonce": 251768202, + "isDeleted": false, + "id": "Jo388ybktmvar-Djik82v", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8225.23148453387, + "y": 8366.899501914855, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 429391740, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3548, + "versionNonce": 492914710, + "isDeleted": false, + "id": "ZgOT41oqq9gEjuLcRgIad", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8225.247548965683, + "y": 8375.382296101017, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1803994692, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3730, + "versionNonce": 1514630218, + "isDeleted": false, + "id": "ZzurVdTmCPiHrQE0eD5Os", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8150.385289129485, + "y": 8393.878153668387, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 164.2520411185553, + "height": 12.882513028906299, + "seed": 165851132, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "res​:​/​/​m​.​me​/​politic/stati...", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "res​:​/​/​m​.​me​/​politic/stati..." + }, + { + "type": "text", + "version": 3303, + "versionNonce": 1634456918, + "isDeleted": false, + "id": "gHxvKEeyY_WrbgLr8XS2t", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8423.102778115357, + "y": 8393.980772679324, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 2128436676, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-19 10:48:46", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-19 10:48:46" + }, + { + "type": "text", + "version": 3541, + "versionNonce": 468144906, + "isDeleted": false, + "id": "EkO3y19k4g3Vvj6pYh9tL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8058.863496467398, + "y": 8395.244676077176, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 77.93920382488311, + "height": 12.882513028906299, + "seed": 1854099580, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 1, + "text": "row 8.867.680", + "baseline": 8.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 8.867.680" + }, + { + "type": "text", + "version": 2418, + "versionNonce": 1999813270, + "isDeleted": false, + "id": "ESFBHfshBNzlaUHb3xzq6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8336.126912698157, + "y": 8040.231367806083, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 65.70081644742213, + "height": 16.10314128613287, + "seed": 712312132, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.8825130289063, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 11.103141286132871, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "text", + "version": 3294, + "versionNonce": 1448894922, + "isDeleted": false, + "id": "9IxSXS-ZYt0wfpnhEF97O", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8360.157043644329, + "y": 8255.11301837299, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 658235644, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3473, + "versionNonce": 359331798, + "isDeleted": false, + "id": "EdUPsCpXHB_sjnER9SXR-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8360.157043644329, + "y": 8267.205797106248, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1672199364, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3657, + "versionNonce": 79796362, + "isDeleted": false, + "id": "dsjrKKCeUVOJ_8DZKOno_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8360.157043644329, + "y": 8279.298920864507, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 14.814889983242244, + "height": 28.341528663593856, + "seed": 1267622268, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 23.18852345203134, + "fontFamily": 3, + "text": ".", + "baseline": 23.341528663593856, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2310, + "versionNonce": 1412009238, + "isDeleted": false, + "id": "YBDq5bV5pxsGsbMxMc5fE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.662509769172, + "y": 8064.064592016112, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1142916164, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.644.125.792", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.644.125.792" + }, + { + "type": "text", + "version": 2584, + "versionNonce": 114423626, + "isDeleted": false, + "id": "fwqD6w0t95-gpv6vJVESs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8363.377671901559, + "y": 8111.437453330419, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 851235324, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2716, + "versionNonce": 14907990, + "isDeleted": false, + "id": "TrtYHXPqAr_csZhhDb4A8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8363.377671901559, + "y": 8120.313395013191, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 28203972, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2725, + "versionNonce": 216563210, + "isDeleted": false, + "id": "bdTV_MqMUm3WJ8J-wZM0A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8363.377671901559, + "y": 8128.796189199354, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 2076783228, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2459, + "versionNonce": 1919795094, + "isDeleted": false, + "id": "Dsh9QnKpPNjl3qIyyD4rK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.662509769172, + "y": 8084.77300359882, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1719026500, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.550.392.492", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.550.392.492" + }, + { + "type": "text", + "version": 3278, + "versionNonce": 67120330, + "isDeleted": false, + "id": "Zi1iWUv0-p2j6EQzO6KVv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.662509769172, + "y": 8105.786891531753, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 360022780, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2.479.498.648", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "2.479.498.648" + }, + { + "type": "text", + "version": 3094, + "versionNonce": 1560108246, + "isDeleted": false, + "id": "B8slU_xUMwWVQiRlT5-Ah", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8320.865378906165, + "y": 8146.580283302194, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 1221933764, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 3199, + "versionNonce": 28574602, + "isDeleted": false, + "id": "IyW8tbPtBTQLPqM56vdxm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8320.865378906165, + "y": 8167.154689301643, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 1178846076, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 3339, + "versionNonce": 640111126, + "isDeleted": false, + "id": "2sGSxPNRBg1QT5039zFmy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8320.865378906165, + "y": 8188.129113274259, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 57229892, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 4171, + "versionNonce": 809435722, + "isDeleted": false, + "id": "1Yl2bWBWmjchcus8HlIY7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8320.865378906165, + "y": 8207.934627766452, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 85.66871164222688, + "height": 12.882513028906299, + "seed": 880145404, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 10.306010423125038, + "fontFamily": 3, + "text": " 2.137.667.438", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": " 2.137.667.438" + }, + { + "type": "text", + "version": 2955, + "versionNonce": 954244950, + "isDeleted": false, + "id": "-n1Q8Sn-frVKJ6uP6ujDC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8362.73354625011, + "y": 8213.563790998065, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1829788100, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728761, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3075, + "versionNonce": 981215498, + "isDeleted": false, + "id": "ni5zpiRcjO4SXQKlFWGAp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8362.73354625011, + "y": 8222.439732680836, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1846416508, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728762, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3084, + "versionNonce": 1501447318, + "isDeleted": false, + "id": "8-Uw67hABtc-8GNJosbwa", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8362.73354625011, + "y": 8230.922526866996, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1357414724, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728762, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3469, + "versionNonce": 937850826, + "isDeleted": false, + "id": "0TO5teHby6Az8lLWIbTyM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.662509769172, + "y": 8248.594620064543, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1892558076, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728762, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.524.699.296", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.524.699.296" + }, + { + "type": "text", + "version": 3728, + "versionNonce": 2041922006, + "isDeleted": false, + "id": "HtIZa5f_x8LZd-9ppt7Zx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.520353099026, + "y": 8311.513160528599, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1716500676, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728762, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "1.878.658.680", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "1.878.658.680" + }, + { + "type": "text", + "version": 3869, + "versionNonce": 412675722, + "isDeleted": false, + "id": "DFOHAWAXqcRnxnwg8KBCD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.58553698213, + "y": 8332.186209227488, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 842540412, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728762, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "3.849.470.917", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.849.470.917" + }, + { + "type": "text", + "version": 4693, + "versionNonce": 211457814, + "isDeleted": false, + "id": "mhU5NYCqRYT9fiBTUAS61", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.58553698213, + "y": 8353.015998337249, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 1222901828, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728762, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "3.849.470.917", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.849.470.917" + }, + { + "type": "text", + "version": 3482, + "versionNonce": 290360650, + "isDeleted": false, + "id": "hqezwyPHAQvXGlGQoZ7pG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8362.656573463068, + "y": 8358.874390230596, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 663623164, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728762, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3598, + "versionNonce": 1520649302, + "isDeleted": false, + "id": "lIHeclXKtsr3TRGpYa8vb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8362.656573463068, + "y": 8367.75033191337, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1887655876, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728762, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3607, + "versionNonce": 123884554, + "isDeleted": false, + "id": "2xvULGhgUbs93lVLE3Pf7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8362.656573463068, + "y": 8376.233126099532, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 9.017759120234409, + "height": 15.459015634687558, + "seed": 1305605756, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728762, + "link": null, + "locked": false, + "fontSize": 12.882513028906299, + "fontFamily": 3, + "text": ".", + "baseline": 12.459015634687558, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3622, + "versionNonce": 1436830102, + "isDeleted": false, + "id": "FiiGVOu--JKhCuXN1N9hC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8326.58553698213, + "y": 8393.946125080294, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 79.87158077921906, + "height": 12.882513028906299, + "seed": 692830020, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728762, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "3.560.941.935", + "baseline": 9.882513028906299, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3.560.941.935" + }, + { + "type": "text", + "version": 2871, + "versionNonce": 2093957834, + "isDeleted": false, + "id": "Tj1_DY_Tyzq7tsyTcZlpg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 8423.874743776556, + "y": 8188.3451808561, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 115.9426172601567, + "height": 12.882513028906299, + "seed": 835045116, + "groupIds": [ + "0tRD0ANS8vIzg6_NmFXS4" + ], + "roundness": null, + "boundElements": [], + "updated": 1672253728762, + "link": null, + "locked": false, + "fontSize": 10.30601042312504, + "fontFamily": 3, + "text": "2014-03-21 08:32:43", + "baseline": 9.882513028906299, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2014-03-21 08:32:43" + }, + { + "type": "rectangle", + "version": 5710, + "versionNonce": 641225738, + "isDeleted": false, + "id": "MBAoilmli5tnopdFFP_Ed", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1964.4943391092702, + "y": 3215.232654807995, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 1009.3106553819443, + "height": 464.17078993055617, + "seed": 655234902, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4715, + "versionNonce": 925780374, + "isDeleted": false, + "id": "YyzVKd1wCSXmgp6RcfkLh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 2114.5138887979588, + "y": 3478.3817123710746, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 310.9393660873455, + "height": 58.71926364969739, + "seed": 704786698, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5339, + "versionNonce": 1357202122, + "isDeleted": false, + "id": "XkHNscGBF72a9jfUaowHG", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2111.7009484347104, + "y": 3478.4673880620435, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 316.37334280303065, + "height": 58.68447577621506, + "seed": 322747542, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4852, + "versionNonce": 219981526, + "isDeleted": false, + "id": "I9CITwXNg2dVrpxHgEqmT", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 2113.071180464632, + "y": 3411.1473373710764, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 310.9393660873455, + "height": 58.71926364969739, + "seed": 1500217290, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5247, + "versionNonce": 1569085834, + "isDeleted": false, + "id": "4uzj8xICbwmCmQKKqWtZ3", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2111.3376671847177, + "y": 3346.5871797287114, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 316.37334280303065, + "height": 58.68447577621506, + "seed": 1692711382, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4621, + "versionNonce": 1741511702, + "isDeleted": false, + "id": "m1hTR4pUFI9wZ_eZwSvi-", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 2114.2313367146357, + "y": 3346.5015040377425, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 310.9393660873455, + "height": 58.71926364969739, + "seed": 1413281418, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2323, + "versionNonce": 1263966282, + "isDeleted": false, + "id": "lGXYEpyOd7HlHt52rlLvV", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2174.97227773071, + "y": 3310.274507486573, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 123.92578124999996, + "height": 340.8218005952383, + "seed": 1394282262, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1630, + "versionNonce": 758475094, + "isDeleted": false, + "id": "V-WDNavdcuK5eK-eg9a_d", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2186.836237477942, + "y": 3315.29632938439, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 103, + "height": 25, + "seed": 1261540682, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID.bin" + }, + { + "type": "rectangle", + "version": 3083, + "versionNonce": 2050031370, + "isDeleted": false, + "id": "YpRIBr8Op06sCSJ3Kp7pn", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2323.5026847152185, + "y": 3309.269461913655, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 87.64195261437878, + "height": 342.412946428571, + "seed": 1783938134, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3019, + "versionNonce": 1017761430, + "isDeleted": false, + "id": "6wIpicwR9gXvELcwQy4Rm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2166.8865822846615, + "y": 3351.9613021914324, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.0572916666672, + "height": 19.56467013888845, + "seed": 530865162, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1814, + "versionNonce": 378572234, + "isDeleted": false, + "id": "Kul3-vbfqfbba4qIiX_T2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2227.981200340216, + "y": 3352.624930663657, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1617346966, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 1863, + "versionNonce": 1121946582, + "isDeleted": false, + "id": "uC72G_cuPa16MqjEBsy9f", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2360.3874503402185, + "y": 3352.455659830323, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1334856394, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W1" + }, + { + "type": "text", + "version": 1701, + "versionNonce": 93340810, + "isDeleted": false, + "id": "pf2YMa5R3Tl3-Qs26E8Fy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2332.9802702806937, + "y": 3316.5973388977823, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 71, + "height": 25, + "seed": 1753620182, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL.bin", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL.bin" + }, + { + "type": "rectangle", + "version": 2934, + "versionNonce": 914134166, + "isDeleted": false, + "id": "QtYlOzalTt6ga6i4-dkbj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2167.210259104833, + "y": 3384.0860823591834, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.02213541666703, + "height": 19.412326388888925, + "seed": 1636852106, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "-RM7a2Tnsb21UOJBgN549", + "type": "arrow" + } + ], + "updated": 1672253748107, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3754, + "versionNonce": 1357587274, + "isDeleted": false, + "id": "dk3Bq89x8j5gCm_4MDI_6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2167.3968870391523, + "y": 3418.676030815465, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 253.45182291666657, + "height": 17.51779513888891, + "seed": 122147862, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1954, + "versionNonce": 506930070, + "isDeleted": false, + "id": "j1e1EhbG4bZ3h3qVJ3wtT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2223.6536680314844, + "y": 3385.212088866782, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 1356832842, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253754304, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U2" + }, + { + "type": "text", + "version": 2067, + "versionNonce": 1911010838, + "isDeleted": false, + "id": "epTZ2a_3a-EaiD6gvYt9w", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2223.70075369048, + "y": 3419.764172200116, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 1721819478, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253758691, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U2" + }, + { + "type": "text", + "version": 1999, + "versionNonce": 1286748054, + "isDeleted": false, + "id": "a8HMkb_iTbC7vkR4GWads", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2354.7241911904803, + "y": 3385.214693033448, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 2035877642, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253783795, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W2" + }, + { + "type": "text", + "version": 2084, + "versionNonce": 1319914634, + "isDeleted": false, + "id": "2JT-nd63hJakj8PaVaGYA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2354.3714290369417, + "y": 3418.645258979808, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 702957206, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253815409, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W2" + }, + { + "type": "rectangle", + "version": 3344, + "versionNonce": 1904734422, + "isDeleted": false, + "id": "MBTEMlrDKA5Shqj3epxWn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2166.9696898549005, + "y": 3448.633570529108, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.0572916666672, + "height": 19.56467013888845, + "seed": 58168778, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2145, + "versionNonce": 371334858, + "isDeleted": false, + "id": "M-M6cGr3mxj402as5gN1W", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2224.9024259401476, + "y": 3449.256410781023, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 1103954902, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253770428, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U3", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U3" + }, + { + "type": "text", + "version": 2191, + "versionNonce": 2121287318, + "isDeleted": false, + "id": "AoPN1VmxKDmRHKbiZn14N", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2360.3572766604575, + "y": 3449.215502876306, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1347832970, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253812300, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W1" + }, + { + "type": "rectangle", + "version": 3255, + "versionNonce": 2120363594, + "isDeleted": false, + "id": "WVYVS6hyE55aBzf24Vrmr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2167.3645982927187, + "y": 3480.637256946857, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.02213541666703, + "height": 19.412326388888925, + "seed": 1080695062, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4082, + "versionNonce": 1492818326, + "isDeleted": false, + "id": "pU_CI0NHbneRQ2VjLRdgs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2167.4799946093913, + "y": 3515.3482991531405, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.45182291666657, + "height": 17.51779513888891, + "seed": 1706044234, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "zja_33DOJDMG2acFn04Rm", + "type": "arrow" + } + ], + "updated": 1672253748108, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2281, + "versionNonce": 336360522, + "isDeleted": false, + "id": "EW8PuY0acw9kW-Qx_uQ2p", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2224.359382094051, + "y": 3481.923945771225, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 758285910, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253773488, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U3", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U3" + }, + { + "type": "text", + "version": 2394, + "versionNonce": 411003338, + "isDeleted": false, + "id": "JRPw4Sv65RCLq82Hgo3Hw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2224.283861260717, + "y": 3516.476029104559, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 1507865098, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253776753, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U4", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U4" + }, + { + "type": "text", + "version": 2312, + "versionNonce": 985018890, + "isDeleted": false, + "id": "ZyAxzo7Pj9lRkizeFfP33", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2354.9244862607175, + "y": 3481.9265499378926, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 1492863894, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253823047, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W2" + }, + { + "type": "text", + "version": 2404, + "versionNonce": 74113366, + "isDeleted": false, + "id": "fBicEIQGc1-xP2qBKa-9r", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2357.9557362607193, + "y": 3515.3583155377896, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1071734986, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253809500, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W1" + }, + { + "type": "text", + "version": 2287, + "versionNonce": 519805578, + "isDeleted": false, + "id": "WGh5jnVjDBunJ1rNuAnvp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2115.662938777906, + "y": 3352.9685363921258, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 47, + "height": 20, + "seed": 838428886, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 0", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 0" + }, + { + "type": "text", + "version": 2361, + "versionNonce": 393847318, + "isDeleted": false, + "id": "McmBj7OV8kHbC0pR8INiD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2116.928563777906, + "y": 3385.303605836571, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 40, + "height": 20, + "seed": 323925898, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "tCLdnNvIf4VsYmhf6WCEv", + "type": "arrow" + } + ], + "updated": 1672253748106, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 1", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 1" + }, + { + "type": "text", + "version": 2395, + "versionNonce": 242989386, + "isDeleted": false, + "id": "Ic8k_bcYS0I0jwbkjpjbN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2114.096098500129, + "y": 3416.9485711143484, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 47, + "height": 20, + "seed": 398581270, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 2", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 2" + }, + { + "type": "text", + "version": 2371, + "versionNonce": 1024724886, + "isDeleted": false, + "id": "ixwBsfHzwzNHktPcTalk8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2113.770577666795, + "y": 3449.166453058792, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 610481738, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "ki86qmcsAtMTZrgcgWzAT", + "type": "arrow" + } + ], + "updated": 1672253748105, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 3", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 3" + }, + { + "type": "text", + "version": 2346, + "versionNonce": 1040842762, + "isDeleted": false, + "id": "iisCSuXxWKRnLr2NCAuUf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2114.178563777906, + "y": 3482.868710003237, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 793357142, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 4", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 4" + }, + { + "type": "text", + "version": 2352, + "versionNonce": 1802039126, + "isDeleted": false, + "id": "vgtMTyIZGfll-h3GajFbQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2114.067452666795, + "y": 3516.0891961143484, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45, + "height": 20, + "seed": 66706698, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "bC8jtDTgkwE6zHu9X1f-6", + "type": "arrow" + } + ], + "updated": 1672253748107, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 5", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 5" + }, + { + "type": "rectangle", + "version": 5480, + "versionNonce": 1514465046, + "isDeleted": false, + "id": "8eZNABrVLwkJeBUlkccQJ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2110.115010934716, + "y": 3411.2330130620435, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 317, + "height": 58.68447577621506, + "seed": 921030806, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Ahs63f6BAd7RZnQxB8dqN", + "type": "arrow" + } + ], + "updated": 1672253748107, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2486, + "versionNonce": 512309974, + "isDeleted": false, + "id": "52RV0b6O9d69QVVN904O-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1985.7723854612245, + "y": 3359.466657896334, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 94, + "height": 40, + "seed": 1871555530, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 0\nwith 2 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 0\nwith 2 rows" + }, + { + "type": "text", + "version": 2578, + "versionNonce": 1440548234, + "isDeleted": false, + "id": "TIivEtu9MJez2TVfP9-KS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1986.3583229612245, + "y": 3425.763532896334, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 94, + "height": 40, + "seed": 1514884566, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 1\nwith 2 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 1\nwith 2 rows" + }, + { + "type": "text", + "version": 2671, + "versionNonce": 1183281174, + "isDeleted": false, + "id": "ltsIA0A2gw-bkGb6i2A5q", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1987.1356667112245, + "y": 3488.509626646334, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 94, + "height": 40, + "seed": 1027187338, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 2\nwith 2 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 2\nwith 2 rows" + }, + { + "type": "rectangle", + "version": 4891, + "versionNonce": 1542964298, + "isDeleted": false, + "id": "oGwv0Gdb8xw3JeseX0TAL", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 30, + "angle": 0, + "x": 2113.4251477321664, + "y": 3546.8325934903337, + "strokeColor": "#ffc029", + "backgroundColor": "#ffc029", + "width": 310.9393660873455, + "height": 58.71926364969739, + "seed": 110043926, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5516, + "versionNonce": 1401748822, + "isDeleted": false, + "id": "nL5D0bpeLnQ5noEp3pgXM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2110.612207368918, + "y": 3546.9182691813025, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 316.37334280303065, + "height": 58.68447577621506, + "seed": 1203290442, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3433, + "versionNonce": 902605578, + "isDeleted": false, + "id": "eh4QmQEnObGMEhqug5JzH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2166.2758572269263, + "y": 3549.0881380661162, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.02213541666703, + "height": 19.412326388888925, + "seed": 1042698326, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4269, + "versionNonce": 516271126, + "isDeleted": false, + "id": "gat2m4EG_lZAaSKNQ2Fa4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2166.391253543599, + "y": 3583.7991802723977, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 253.45182291666657, + "height": 17.51779513888891, + "seed": 1516636170, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "r0V3y2HfMunry04qr3-WA", + "type": "arrow" + } + ], + "updated": 1672253748108, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2455, + "versionNonce": 44827926, + "isDeleted": false, + "id": "rVEJWEEv_cbSFPxdvCnZj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2223.2706410282585, + "y": 3550.3352383237147, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 1827001750, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253778843, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U4", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U4" + }, + { + "type": "text", + "version": 2574, + "versionNonce": 2137137110, + "isDeleted": false, + "id": "WHAD-C06aXkTq6CHpnevN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2223.1951201949246, + "y": 3584.8873216570487, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 490501834, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U4", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U4" + }, + { + "type": "text", + "version": 2495, + "versionNonce": 273461974, + "isDeleted": false, + "id": "q_8L_3dYbq92ozIIK5rSr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2357.3345455413864, + "y": 3550.377431057152, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1006809814, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253857327, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W1" + }, + { + "type": "text", + "version": 2587, + "versionNonce": 374461462, + "isDeleted": false, + "id": "VLsty7uozuV1BDW_fMIgD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2353.4065837616963, + "y": 3583.848785223818, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 14093706, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253803589, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W2" + }, + { + "type": "text", + "version": 2524, + "versionNonce": 1637240650, + "isDeleted": false, + "id": "8lZVXh63-e86ZqKIPQ2th", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2113.089822712114, + "y": 3551.319591122496, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 46, + "height": 20, + "seed": 1712449558, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 6", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 6" + }, + { + "type": "text", + "version": 2531, + "versionNonce": 509193430, + "isDeleted": false, + "id": "OziR1Af9DXZ1NB0FHyU1l", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2112.9787116010025, + "y": 3584.5400772336075, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 44, + "height": 20, + "seed": 712035402, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "YeF1EvrR3elZJ4Y9KX_C5", + "type": "arrow" + } + ], + "updated": 1672253748105, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "row 7", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "row 7" + }, + { + "type": "text", + "version": 2850, + "versionNonce": 1029821962, + "isDeleted": false, + "id": "HFrhERx2Se2gFkmfXEk6I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1985.8739345740046, + "y": 3556.960507765593, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 94, + "height": 40, + "seed": 185103702, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "granule 3\nwith 2 rows", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "granule 3\nwith 2 rows" + }, + { + "type": "text", + "version": 2652, + "versionNonce": 584443798, + "isDeleted": false, + "id": "pgSnAvFhdzrOpumJzFvwF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2233.5071734487187, + "y": 3596.61986578764, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1608823562, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2770, + "versionNonce": 193889482, + "isDeleted": false, + "id": "kAX8rM9mLb8oQyvqUt5XL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2233.7941052669007, + "y": 3610.3996953330957, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 70998678, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2779, + "versionNonce": 505447638, + "isDeleted": false, + "id": "7H6nrZRmXOfoiUgsJTGOr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2233.8190451707483, + "y": 3623.5691664869414, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1940767178, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2827, + "versionNonce": 901208970, + "isDeleted": false, + "id": "FnAmFlmXmuQRRX-8dmA6r", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2365.952526923371, + "y": 3595.3032865335613, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 945788886, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2954, + "versionNonce": 681933334, + "isDeleted": false, + "id": "N5wVDJirGnrXg7odzEfbh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2366.239458741551, + "y": 3609.0831160790153, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 820443274, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2963, + "versionNonce": 974608970, + "isDeleted": false, + "id": "iLAZdHXSIzE4IHlG93hYY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2366.2643986453986, + "y": 3622.252587232861, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1871326486, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 5028, + "versionNonce": 721017814, + "isDeleted": false, + "id": "dJlcyPulTIDc8OW31V6Ve", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2561.237944370635, + "y": 3325.2660516954015, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 251.25889756944446, + "height": 263.3309461805559, + "seed": 1196119882, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "PEKPTd-LhAGxWQY97JD3i", + "type": "arrow" + } + ], + "updated": 1672253748108, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3864, + "versionNonce": 394887434, + "isDeleted": false, + "id": "KBzXO0i7G--GT-h8VT8fh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2583.819161439157, + "y": 3378.3186233099855, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 123.92578124999996, + "height": 197.2833214962126, + "seed": 657463894, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3227, + "versionNonce": 546466966, + "isDeleted": false, + "id": "MXhV1sD4oh6AW50btk_2-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2612.3515260619997, + "y": 3383.3956907435145, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 73, + "height": 25, + "seed": 926277130, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "UserID", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "UserID" + }, + { + "type": "rectangle", + "version": 4259, + "versionNonce": 302225430, + "isDeleted": false, + "id": "2Xp3FaqTyhKkyNfMAD81N", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2732.584298537301, + "y": 3376.8144457926223, + "strokeColor": "#15223c", + "backgroundColor": "#15223c", + "width": 60.780841503267865, + "height": 199.05406605113606, + "seed": 1713790870, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "d2WKSFZDAQkBOakKFezKv", + "type": "arrow" + } + ], + "updated": 1672253748103, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 5093, + "versionNonce": 470051286, + "isDeleted": false, + "id": "DI2DA9IKEcrtFUd_4uBQe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2575.7260086067445, + "y": 3420.294865221285, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 224.41844223484904, + "height": 19.07958491161571, + "seed": 1033997514, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3155, + "versionNonce": 1680885386, + "isDeleted": false, + "id": "ALoE0geVJqF180sjdpcUm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2743.1595403527763, + "y": 3383.820816700361, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 42, + "height": 25, + "seed": 279051478, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "URL", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "URL" + }, + { + "type": "rectangle", + "version": 4745, + "versionNonce": 1132530326, + "isDeleted": false, + "id": "MfVMPD_2cTT2vB3-dbSQq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2576.170779176916, + "y": 3451.255582889034, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 223.03527462121252, + "height": 20.091303661616152, + "seed": 1076454282, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "sdkAUpLy8SdwX0_3UU5Sj", + "type": "arrow" + } + ], + "updated": 1672253748103, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4630, + "versionNonce": 2099502358, + "isDeleted": false, + "id": "kTNr71hKZIAYg7teJhilD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2577.2075881992887, + "y": 3479.9952473377193, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 222.6308001893943, + "height": 21.131431502525395, + "seed": 1010299414, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "aYYMc2myv4sefG8YIl23J", + "type": "arrow" + } + ], + "updated": 1672253748103, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3390, + "versionNonce": 1095265366, + "isDeleted": false, + "id": "Jtg7K8_AzeNxeFSUcLAqV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2636.8595806553576, + "y": 3333.735235723179, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 101, + "height": 25, + "seed": 956850762, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "primary.idx", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "primary.idx" + }, + { + "type": "text", + "version": 2856, + "versionNonce": 1114214870, + "isDeleted": false, + "id": "oeEvMJgISdMZ4tlvuKO68", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2498.51372252043, + "y": 3420.7979837390517, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56, + "height": 20, + "seed": 64831318, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "-RM7a2Tnsb21UOJBgN549", + "type": "arrow" + } + ], + "updated": 1672253748107, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 0", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 0" + }, + { + "type": "text", + "version": 2868, + "versionNonce": 511939670, + "isDeleted": false, + "id": "p_AnsPaLV3dXq4uQMPn5y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2497.95903502043, + "y": 3451.9932962390517, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 50, + "height": 20, + "seed": 588876042, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "Ahs63f6BAd7RZnQxB8dqN", + "type": "arrow" + } + ], + "updated": 1672253748107, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 1", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 1" + }, + { + "type": "text", + "version": 2692, + "versionNonce": 1317378762, + "isDeleted": false, + "id": "0U6pkwBhZjXk23DZtXTQb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2639.6629970740005, + "y": 3420.7978519806197, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1541858454, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U1" + }, + { + "type": "text", + "version": 2852, + "versionNonce": 1238359306, + "isDeleted": false, + "id": "XwOQFIAx4beCfbY-qoG8K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2636.3540677078913, + "y": 3451.9498601145106, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 1708644298, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253832635, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U2" + }, + { + "type": "text", + "version": 2920, + "versionNonce": 596987350, + "isDeleted": false, + "id": "iU8YIh60OAoEJ0KeCz2HB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2637.3270595740005, + "y": 3482.1376957306197, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 1711923670, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253836000, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U3", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U3" + }, + { + "type": "text", + "version": 2639, + "versionNonce": 1687782422, + "isDeleted": false, + "id": "pqzLAxYiXpn3maCQT_qd9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2753.5614345740005, + "y": 3421.0908207306197, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 1096699530, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W1" + }, + { + "type": "text", + "version": 2779, + "versionNonce": 1858138186, + "isDeleted": false, + "id": "FzG6say1zA6ok7kViI9NC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2749.9676845740005, + "y": 3451.9501957306197, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 1163605782, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W2" + }, + { + "type": "text", + "version": 2821, + "versionNonce": 87820298, + "isDeleted": false, + "id": "bXHUnpH_a-UA0OEvpH4pw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2750.2333095740005, + "y": 3480.6962894806197, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 25, + "height": 20, + "seed": 979889482, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253847922, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W2", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W2" + }, + { + "type": "text", + "version": 2946, + "versionNonce": 1356789462, + "isDeleted": false, + "id": "vFHrT8I4LSZajCvaenmuH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2493.8036220740005, + "y": 3481.8447269806197, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 57, + "height": 20, + "seed": 1917838422, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "zja_33DOJDMG2acFn04Rm", + "type": "arrow" + } + ], + "updated": 1672253748108, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 2", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 2" + }, + { + "type": "text", + "version": 3563, + "versionNonce": 759440726, + "isDeleted": false, + "id": "zfCGlhx93zYFnGewlD2EG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2845.194247074007, + "y": 3419.0205082306197, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 113, + "height": 20, + "seed": 105886730, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "d2WKSFZDAQkBOakKFezKv", + "type": "arrow" + } + ], + "updated": 1672253748103, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "select granule", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "select granule" + }, + { + "type": "arrow", + "version": 4495, + "versionNonce": 867310666, + "isDeleted": false, + "id": "d2WKSFZDAQkBOakKFezKv", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2800.0581793656675, + "y": 3427.8525394806197, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 42.59375, + "height": 1.18359375, + "seed": 247261590, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748103, + "link": null, + "locked": false, + "startBinding": { + "elementId": "2Xp3FaqTyhKkyNfMAD81N", + "focus": -0.4933611925763207, + "gap": 6.693039325098653 + }, + "endBinding": { + "elementId": "zfCGlhx93zYFnGewlD2EG", + "focus": -0.1431536845471553, + "gap": 2.5423177083393966 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 42.59375, + 1.18359375 + ] + ] + }, + { + "type": "text", + "version": 3754, + "versionNonce": 440185814, + "isDeleted": false, + "id": "0GO2M_YqAp9L2fTeOE4I9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2642.2170116255247, + "y": 3524.0740942644893, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1997578954, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3874, + "versionNonce": 1006214282, + "isDeleted": false, + "id": "TTiwLjVCn4IQ9JZmmuRwD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2642.5039434437067, + "y": 3537.853923809945, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 970409686, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3883, + "versionNonce": 1331939606, + "isDeleted": false, + "id": "UjnGA44oIUC-MVMAgF85N", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2642.5288833475543, + "y": 3551.023394963791, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1732622730, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3938, + "versionNonce": 543783754, + "isDeleted": false, + "id": "pZ96NjNhpMplig5CbbV59", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2761.6623651001764, + "y": 3522.7575150104108, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1681128470, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4058, + "versionNonce": 292959830, + "isDeleted": false, + "id": "f0frKnRvSL4CBr08rpFbj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2761.9492969183566, + "y": 3536.537344555865, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 640284746, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4067, + "versionNonce": 284131850, + "isDeleted": false, + "id": "YDKlLiwZT5HG3XkhcqWD2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2761.974236822204, + "y": 3549.7068157097106, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 600312150, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "rectangle", + "version": 4808, + "versionNonce": 768482966, + "isDeleted": false, + "id": "WiTP9xXzdUsQm4LL2hUjr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2577.1599316044476, + "y": 3512.126763982567, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 222.6308001893943, + "height": 21.131431502525395, + "seed": 1670930186, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "PEKPTd-LhAGxWQY97JD3i", + "type": "arrow" + } + ], + "updated": 1672253748108, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3095, + "versionNonce": 396990422, + "isDeleted": false, + "id": "n4MA25q3Bl2J1DsmCJWqw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2637.2794029791594, + "y": 3514.4108139379673, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 24, + "height": 20, + "seed": 132673174, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253877492, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "U4", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "U4" + }, + { + "type": "text", + "version": 2994, + "versionNonce": 1423078742, + "isDeleted": false, + "id": "p_c2dV3iKDn6djGoJgNmH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2753.6856529791594, + "y": 3512.8278061254673, + "strokeColor": "#ffc029", + "backgroundColor": "#000000", + "width": 18, + "height": 20, + "seed": 470543818, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253862922, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "W1", + "baseline": 14, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "W1" + }, + { + "type": "text", + "version": 3121, + "versionNonce": 10729814, + "isDeleted": false, + "id": "KwIm32XKO1fKHCCypCjMB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2494.7559654791594, + "y": 3513.9762436254673, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 56, + "height": 20, + "seed": 1833577430, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "r0V3y2HfMunry04qr3-WA", + "type": "arrow" + } + ], + "updated": 1672253748108, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "mark 3", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "mark 3" + }, + { + "type": "text", + "version": 3696, + "versionNonce": 1668237270, + "isDeleted": false, + "id": "NaksSlA21Y52KW_zkMc4n", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2844.917554365673, + "y": 3450.715704473179, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 113, + "height": 20, + "seed": 77571210, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "sdkAUpLy8SdwX0_3UU5Sj", + "type": "arrow" + } + ], + "updated": 1672253748103, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "select granule", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "select granule" + }, + { + "type": "text", + "version": 3799, + "versionNonce": 907266646, + "isDeleted": false, + "id": "t8M-kjtp4oQh61IYl_SBv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2845.353752282339, + "y": 3480.214402389846, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 113, + "height": 20, + "seed": 1375879446, + "groupIds": [], + "roundness": null, + "boundElements": [ + { + "id": "aYYMc2myv4sefG8YIl23J", + "type": "arrow" + } + ], + "updated": 1672253748103, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "select granule", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "select granule" + }, + { + "type": "arrow", + "version": 3431, + "versionNonce": 2027622858, + "isDeleted": false, + "id": "sdkAUpLy8SdwX0_3UU5Sj", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2800.2925543656656, + "y": 3460.051641973179, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 39.407552083333485, + "height": 2.12239583333303, + "seed": 1997439818, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748103, + "link": null, + "locked": false, + "startBinding": { + "elementId": "MfVMPD_2cTT2vB3-dbSQq", + "focus": -0.4556632522954561, + "gap": 1.0865005675375414 + }, + "endBinding": { + "elementId": "NaksSlA21Y52KW_zkMc4n", + "focus": -0.3666566984698796, + "gap": 5.217447916673791 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 39.407552083333485, + 2.12239583333303 + ] + ] + }, + { + "type": "arrow", + "version": 3446, + "versionNonce": 1030006602, + "isDeleted": false, + "id": "aYYMc2myv4sefG8YIl23J", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2800.3771897823317, + "y": 3487.873907598179, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 44.212239583333485, + "height": 2.916666666666515, + "seed": 696626774, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748103, + "link": null, + "locked": false, + "startBinding": { + "elementId": "kTNr71hKZIAYg7teJhilD", + "focus": -0.5620611078781369, + "gap": 1 + }, + "endBinding": { + "elementId": "t8M-kjtp4oQh61IYl_SBv", + "focus": -0.31716976539648145, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 44.212239583333485, + 2.916666666666515 + ] + ] + }, + { + "type": "arrow", + "version": 553, + "versionNonce": 1034235402, + "isDeleted": false, + "id": "ki86qmcsAtMTZrgcgWzAT", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2076.8579840531816, + "y": 3446.380960549572, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 33.8720703125, + "height": 0.9912109375, + "seed": 1572047370, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748105, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "ixwBsfHzwzNHktPcTalk8", + "focus": 1.3621904407139551, + "gap": 3.7767034467196936 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 33.8720703125, + -0.9912109375 + ] + ] + }, + { + "type": "arrow", + "version": 438, + "versionNonce": 1504107722, + "isDeleted": false, + "id": "YeF1EvrR3elZJ4Y9KX_C5", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2074.1236090531816, + "y": 3575.052835549572, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 36.30859375, + "height": 0, + "seed": 816411542, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748105, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "OziR1Af9DXZ1NB0FHyU1l", + "focus": 1.9487241684035328, + "gap": 9.487241684035325 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 36.30859375, + 0 + ] + ] + }, + { + "type": "arrow", + "version": 460, + "versionNonce": 1325708170, + "isDeleted": false, + "id": "tCLdnNvIf4VsYmhf6WCEv", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2070.6195251211825, + "y": 3377.3068735580023, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 40.95052083333303, + "height": 0.1649305555556566, + "seed": 529119434, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748106, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "McmBj7OV8kHbC0pR8INiD", + "focus": 1.758799553983158, + "gap": 7.831801723013086 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 40.95052083333303, + 0.1649305555556566 + ] + ] + }, + { + "type": "text", + "version": 2962, + "versionNonce": 1418523274, + "isDeleted": false, + "id": "VhxN827jn2HhKhohxtFtG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1979.5679843225648, + "y": 3230.075862273274, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 340, + "height": 50, + "seed": 1101172950, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Searching for rows with URL = W3\nwhen UserID has high cardinality", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Searching for rows with URL = W3\nwhen UserID has high cardinality" + }, + { + "type": "arrow", + "version": 434, + "versionNonce": 1878635082, + "isDeleted": false, + "id": "bC8jtDTgkwE6zHu9X1f-6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2076.695914010065, + "y": 3505.748713835774, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 31.640625, + "height": 0, + "seed": 204214154, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748107, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "vgtMTyIZGfll-h3GajFbQ", + "focus": 2.0340482278574195, + "gap": 10.3404822785742 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 31.640625, + 0 + ] + ] + }, + { + "type": "arrow", + "version": 398, + "versionNonce": 1823811530, + "isDeleted": false, + "id": "-RM7a2Tnsb21UOJBgN549", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2427.0686818672075, + "y": 3377.7183008893467, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 68.51004464285734, + "height": 51.21651785714221, + "seed": 671483414, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748107, + "link": null, + "locked": false, + "startBinding": { + "elementId": "QtYlOzalTt6ga6i4-dkbj", + "focus": -1.1100701193001765, + "gap": 6.83628734570766 + }, + "endBinding": { + "elementId": "oeEvMJgISdMZ4tlvuKO68", + "focus": -0.6874116316600608, + "gap": 2.934996010365012 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 68.51004464285734, + 51.21651785714221 + ] + ] + }, + { + "type": "arrow", + "version": 417, + "versionNonce": 103890250, + "isDeleted": false, + "id": "Ahs63f6BAd7RZnQxB8dqN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2429.3622086529213, + "y": 3441.127899103632, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 64.67075892857156, + "height": 21.294642857143117, + "seed": 1205177930, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748107, + "link": null, + "locked": false, + "startBinding": { + "elementId": "8eZNABrVLwkJeBUlkccQJ", + "focus": -0.6424145019487615, + "gap": 2.2471977182053706 + }, + "endBinding": { + "elementId": "p_AnsPaLV3dXq4uQMPn5y", + "focus": -0.5459624308582374, + "gap": 3.926067438937025 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 64.67075892857156, + 21.294642857143117 + ] + ] + }, + { + "type": "arrow", + "version": 370, + "versionNonce": 1019605706, + "isDeleted": false, + "id": "zja_33DOJDMG2acFn04Rm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2429.4961372243506, + "y": 3506.1781223179173, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 61.69642857142867, + "height": 12.834821428570649, + "seed": 1959318358, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748108, + "link": null, + "locked": false, + "startBinding": { + "elementId": "pU_CI0NHbneRQ2VjLRdgs", + "focus": 0.29086110609133803, + "gap": 9.170176835223174 + }, + "endBinding": { + "elementId": "vFHrT8I4LSZajCvaenmuH", + "focus": 0.31223210666640894, + "gap": 2.61105627822144 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 61.69642857142867, + -12.834821428570649 + ] + ] + }, + { + "type": "arrow", + "version": 372, + "versionNonce": 1523271754, + "isDeleted": false, + "id": "r0V3y2HfMunry04qr3-WA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2427.476047938635, + "y": 3574.8109348179173, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 65.30691964285711, + "height": 45.675223214286234, + "seed": 929117450, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748108, + "link": null, + "locked": false, + "startBinding": { + "elementId": "gat2m4EG_lZAaSKNQ2Fa4", + "focus": 0.7826516271118303, + "gap": 8.98824545448042 + }, + "endBinding": { + "elementId": "KwIm32XKO1fKHCCypCjMB", + "focus": 0.5342067936915732, + "gap": 1.972997897667483 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 65.30691964285711, + -45.675223214286234 + ] + ] + }, + { + "type": "text", + "version": 3934, + "versionNonce": 1603389130, + "isDeleted": false, + "id": "BpkQGbBTw3AgIsXrDWsau", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2843.150775121174, + "y": 3513.093424897265, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 113, + "height": 20, + "seed": 1379924118, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1672253747864, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "select granule", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "select granule" + }, + { + "type": "arrow", + "version": 376, + "versionNonce": 1956199882, + "isDeleted": false, + "id": "PEKPTd-LhAGxWQY97JD3i", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2800.574386232285, + "y": 3523.345161008377, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 43.61545138888914, + "height": 0.542534722221717, + "seed": 1816789962, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1672253748108, + "link": null, + "locked": false, + "startBinding": { + "elementId": "WiTP9xXzdUsQm4LL2hUjr", + "focus": -0.06206704117319776, + "gap": 1 + }, + "endBinding": { + "elementId": "dJlcyPulTIDc8OW31V6Ve", + "focus": -0.4878789719383463, + "gap": 31.692995681095 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 43.61545138888914, + 0.542534722221717 + ] + ] + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": { + "76f7965db97d0c2ccdf9386a266c1e3488b8ba3e5f45567dec96fcf5f9f279525ad39fee2918979a507aabbd12a9ed8d": { + "mimeType": "image/png", + "id": "76f7965db97d0c2ccdf9386a266c1e3488b8ba3e5f45567dec96fcf5f9f279525ad39fee2918979a507aabbd12a9ed8d", + "dataURL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjoAAAPCCAYAAABx/nIAAAAAAXNSR0IArs4c6QAAIABJREFUeF7snQmcTtX/x7+z2JWyl8jWokX0i4rKvktEIYoSkmRpEwoVSVlDthalQpGyR0rZVahsyZIoW0XZzfJ/vc/Mef53nnn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GJwROY3Ziu0OJyXL18+ueiii9KYsLL4uvQ7/QcffFBWrVolJUqUkM8//9zv+e4nhNve1wWj2XfQE9UGioAioAhkcQSU6ARBdG699daA8uhY8gO5QXODb44lQNYHx6m1wZencOHCLq2O+un4/1aGSybCba9Ex/890jMUAUVAETgXEFCiEwTRqVKlitfQck9ZkgPR/NCOEPTLL7/cZFC25qtwFgdaIhIcHjx4UIoVKyb58+cPqDtnu7x588oll1xitEwZKZijIIjggdbLm4RLVMJtr0QnI1eFXksRUAQUgdARUKITJNFxkpdgyY17W9v+559/lrJlyxrzFVmTMW2FIhCECRMmyAcffGBMZlYgLDfddJM8++yzHkkPGqc33nhDpk+fnqYdZrbatWtLjx49pGTJkumG9Mgjj8jXX38tN9xwg3z44Yceh9yhQwdjYiI0f8qUKa5zXnzxRdOGxIuLFy+W/v37yzfffCN//vmnOQcM6tSpI88995zxw7HCeH7//Xdj8rNiNWClS5eWuXPn+oQukPaMoW7dusZ/imvTJ+ZFpzDWzp07m4+aNWsmgwYNMliFM7ZQ7rm2UQQUAUVAEfCNgBKdIIgO+XCCJTf+kgpyfMuWLXLllVfKxRdfHBbRef7552XGjBleZwThGTdunJQrVy7NOX379pWZM2d6bXfppZcaUlKkSJE05zz88MOyfPlyue666+Tjjz/22L5du3ayZs0aufHGGw0BswKxgVhB7ohmW7Rokcf2xYsXl3nz5hlNF1KtWjU5cOCAx3PRAnnrxzYItD1jfeGFF0yz5s2bGyJjBQLUuHFjkyHbEiHuXaB960NJEVAEFAFFIOMQUKITBNG57bbbvIaX0423jMn+yM5PP/1kykuEQ3QgMKNHjzazgTTdd999Qt4ftEVffPGFzJkzxxwrU6aMIQ5WRo0aZbQ5CISlZcuW8r///U/27NkjS5YscREYyli8//77gknLSiSIju2rQYMG0qJFCzO+X+/O6BYAACAASURBVH75RYYMGWJ+I0899ZSgGUIoqUG02tNPPy0bN2405Ovdd981x9CGUVfMlwTT3s6P/t555x0h6g559dVX5c033zR/jx07VmrVqhWRsWXc116vp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y/zp06yZdffmk+T5g4Uc4777yIx9MO/49A3Tp1jBaza7du0q9fP4VGEVAEFIFCR0CJjgfILdGxpCbUv8E+O0Rr/fPPP/LNN99IkyZNhN8Liux0aN/ePMeLVK9eXebNn++lacK1YS9mzphh5tW8RQv53//+F5jjlClT5KnRoyOe8xFHHCFvvf226delc2f54osvzOeJkybJueeeG/F42kGJjr4DioAikDgIKNHxsBdOohMJ2YH47Nq1S7Zs2SIXXnihFClSJBfZwTmZb7vFihePOfTcEp0SJUrI6aefnu+qjjvuOHlo4EAPK0+8Jps2bZLrunc3E3vk0Ufl8ssvD0xy1apVMnvWrDyT3rxli+zYvt1cP+eccyQ5OTlXm1JHHCEjRoww17777juZNXOmIVDt1HQV8wugGp2YIdQBFAFFIEYElOh4ABCiU7FChYDpyivZQYMDkdmxY4f8/fffhuRwyKampkpKSor5KV68uHDQQlC4Hq1YonNWrVqCZuNQlfyITqg1Q2KmT5tmbq/fsEGKFi16qMKTcOtSopNwW6ITUgQOOwSU6HjYckt0nATHK9mxpiq0N1asRiEpKclc8vl84hcxSQWjlQNNdPbs2WN8hNBiHXvssRGv5b89ewTNC32PPvrokDAkGtHZuXOn/Pnnn1KtWjWjsQsW3h3un3DCCa733RYaK5b5vUM4w+MzBsb4agXLvn375Mcff5TSpUtLxYoVI3odiU5kvZhG7busRCciCLWxIqAIFAACSnQ8gMr/vCtVrBjIdOzskl8uHS95dixh2vPffyapYLQSDdHBTEM/5IYbbgjpoDxz5kx5fPhw0+65556TOnXrBqb5+eefy5hnn5V169blmjpOvLfedlueSBtyEl3WqJFp279/f6lQsaKMe+45+eqrr4z/ElKufHm58847pWnTpoExF736qgwaNMhoxZxiyeJjw4YZPyg3iUSj88zTTxuNGJq2d959NzBc8LzRwk2aONGYuhDIa9t27aRv375SrFgxWbhggYwZO1Z27thh7qOtq3nKKTJk8GCpVr266zwjxTLcuzJs2DBjyitTtqwsmD9fBg4aJOvWrhWIFFKlShV58KGHjB/S1q1bZeTIkbL6jTcCm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2htUTVXERO74QOnoqEBPIYKzzrBiniC0pCBTEeLiLTUGpAiS9Q8yP/uJHH9iOwqkpbF25KjOA3Duff/65hIeHq/gRbRAXiAlCxmXn+5DwTgsf1MqCJ8iV4ci2Pqmlt8x0O+M153tRfwrbb8gzg+01JAp0VzwV2z4oY4HSE8hibNwCgoDURT1dJRg0bult3bo1RjVzbBXWq1dPDQ/B28ieDLM6f7RFaQ14xXDKrWfPntGmijXD5zpYHAkc4aGikQAJkEByJ0ChY+EN0ELHKGA8iRlPda/045zboAq2tx4d41Twxffzzz8roYJTU0jiFxgYqLajUIXcqt2+fVsFu0LkIAmeq4SBzn3h2WCGbSNsoSGnTGLxLsCjBQ8WBBKNBEiABEgg8ROg0LGwhvjShlfAWZz4Uuz4WuhYmBabkAAJkAAJkECSJ0ChY2GJkUkXp67gzYgPsYM+sXUFjwuNBEiABEiABEjAdwQodCywRBwFtjKw5YNtDW/FjtEThCDfhw8fqj5xkolGAiRAAiRAAiTgOwIUOhZYwtsSFRWlAmxRk8o5R46FLlw2gYcIJ5GQ9wYBsAgUppEACZAACZAACfiOAIWOBZbwuiAhG/7hZJEvhQ48RQgUxj94i2gkQAIkQAIkQAK+I0Ch4zuW7IkESIAESIAESMBmBCh0bLYgHA4JkAAiYxVkAAAAf0lEQVQJkAAJkIDvCFDo+I4leyIBEiABEiABErAZAQodmy0Ih0MCJEACJEACJOA7Ailu37nzt++6Y08kQAIkQAIkQAIkYB8CFDr2WQuOhARIgARIgARIwMcEKHR8DJTdkQAJkAAJkAAJ2IcAhY591oIjIQESIAESIAES8DGB/wPw8fW0N3onVAAAAABJRU5ErkJggg==", + "created": 1648744551489 + }, + "272da4c5523dd5f697196765350e6241b6e449522d5b653f0076f658fa6591ad739c21d038062715cb4daf0dd29467e5": { + "mimeType": "image/png", + "id": "272da4c5523dd5f697196765350e6241b6e449522d5b653f0076f658fa6591ad739c21d038062715cb4daf0dd29467e5", + "dataURL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg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B5nuL7/8cqXTaZcQjUzj9crsINzHHXec/nrbba6JvzjzTH25tyxZvW224wwBQ8AQMAQMAUPAEDAEDAFDoDoCiQg31tqrXg909R4bacutthG1izHeOuO1UvrPY4/o0PteV8fw+dXR1u4IdMEFc0fOcl2sx41LuZTutYjjZu4s3sWLKBcGCqNQhXxB07rz+m7b/xIlTesvC7evk9zIgDvv3HN19dVXu1PqsUjXunbcRXiFFVbQtdddVzVO/PjjjtNtvYSLEljr9dYb5z61CDd1zLfbdltNmzbNxTQT/4ubfFxmNeFu5fNXwxpL99ZbbeXKvS233HK64cYb3eFxzK759a81fvz4Wl3W9/2sJtyUNrvsssvc/YcMGaK77r67IQVB3Q9mBxoChoAhYAgYAoaAIWAIGALzMAKJCDfloK78aH6tmv5IR31jE6259nrq6e4uxmhHKT315H90xL1vqm34fL0JpFKirjZcOuytx+2rcTvC/f+e1kVreCB1wczDUPkcSdNy+k5mziHcuAbvsfvubvjE43H9eCLx1n8ee8zV5D7t9NNdfe64/OmPfxREHSmt59zsmNx/v/30n//8x51OfPiPTzyxLOm+9tprdeYvfuGOI0P17bff7kpVealFuDnusksv1cUXX1zx+Wc14aYhrXj+1157ra+++le33LJsAjMIN2XR4jXU33vvPX1tyy0dHssuu6zIVF6aYA3X9F/04n74hAl9bv+zinBjqb/uuuv6+p62nnjiidp+hx2aHXJ2niFgCBgChoAhYAgYAoaAIWAIVECgacL96aef6plnntbdqWV14kaL6eenn6Frr73OWacp+YW88PyzOvyeN9U5bISynZ1KqZgkDcbdQ3Y1V3c7pVRQrNfdW1HM/c6SrTyQphekKB+qEIaa3pPTvunntNRSSzWdpbyVFu6pU6dq8944aZKK7bf//lprrbU0eoklNGjwYMVdtldeZRUdduihIu4X0kOs7xmnn+4yRFN66u933ulckZMKSoCDvvc9EWOPbLzxxs5VePyqqzri/+STT+qfjzyim2++2X3PPU897TRt2UsUGyHclEzDys0zEItOHWcSrHnxhHuxxRabKT683DOOGTOmatxzvbi04vmJ3ea5fGK4iUcc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8tiW7mlVT4jP1nZ+75iXX3juB8BAgQIECBAgAABAgQIEKgVqA7cubdxVq/OkcGs4j2dTktBrG1g3o1Ud2H6vhCeYXoXwLug/Xco34bwPCdDdxYFy2cI27Xd7ToCBAgQIECAAAECBAgQeCiB6sD9UA30HAIECBAgQIAAAQIECBAgMEQBgXuIvabNBAgQIECAAAECBAgQIHDwAgL3wXeRBhIgQIAAAQIECBAgQIDAEAUE7iH2mjYTIECAAAECBAgQIECAwMELND9Xq03pcAcBAgQIECBAgAABAgQIECDQm4DA3RulGxEgQIAAAQIECBAgQIAAgT8CAre3gQABAgQIECBAgAABAgQI7EFA4N4DqlsSIECAAAECBAgQIECAAAGB2ztAgAABAgQIECBAgAABAgT2INBb4F6v13ea1zRNtG0b+Z0fBwECBAgQIECAAAECBAgQOCaB32kC1o1La609AAAAAElFTkSuQmCC", + "created": 1648745237223 + }, + "a39443537553a91afe6fdab1761775c30499581821e6b7c09836e0f5357eb9cde4f4f95904222e161a4e277879f13708": { + "mimeType": "image/png", + "id": "a39443537553a91afe6fdab1761775c30499581821e6b7c09836e0f5357eb9cde4f4f95904222e161a4e277879f13708", + "dataURL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABMoAAASQCAYAAAAN5qOoAAAAAXNSR0IArs4c6QAAIABJREFUeF7svQmUZGV5///U0nv3dM/GNsDMALLKMoCAIKKoiBJFMSpJJJsn8RzRaOISo/5PzPkZk2hyThKNGjBiMBg1iCgiIiqgyCrrsG+yw7DMdPf03lV1/+fzvPetul3TM9Pd03t/r6lUd/Wtu3zuW6X3M9/neXNJkiSmRQREQAREQAREQAREQAREQAREQAREQAREQASWOIGcRNkSHwE6fREQAREQAREQAREQAREQAREQAREQAREQAScgUaaBIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAISZRoDIiACIiACIiACIiACIiACIiACIiACIiACIhAIKFGmkSACIiACIiACIiACIiACIiACIiACIiACIiACEmUaAyIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgA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UVRJlk2EVpaRwREQAREQAREQAREQAREQAREQAREQAR2TECibE5GSGKWCjLCZImF3+MSxZe/kgmb1cJlpMwSs1zOE2Vh/VzYpvH7nJyUdioCIiACIiACIiACIiACIiACIiACIiACC5qARNlcXL6kbFapBEGG8qKEMkmsYmZ5y1mSiq7gzsaWZfJKlGO5XN5lmfHs26mqNsmyubiu2qcIiIAIiIAIiIAIiIAIiIAIiIAIiMCCJiBRNsOXL5ZWVioVK5UrNloq20ipbKVyOQ2F5VyFefklj2wczBNinhUL/8/TZ1GUmeXTNFkxn7NisWCNxYIVCgXL50mVBXmmRQREQAREQAREQAREQAREQAREQAREQAREYGIEJMomxmnSa2X7jiHJtg4O2Za+QdvcN2w9w2XrG8aL5a1QQGjlPE1WW2pJM0+YufhK/4pLSyou1gpWsYKVraWY2J6drbbHinbraG32hBklmFW7lsq1SZ+E3iACIiACIiACIiACIiACIiACIiACIiACS4iARNkMXeyYJCMvViqVbVP3VnvkhW578PkBe6IvsceH8zaSFKy1ULR8LKE0s1CQWQlps8RCOqyQs1w+mLJcharNso2WStaUlKy5Mmy7NyV29JoOO2zNCtt9eYflCwXL5QtjZsSs9TKboRPWZkVABERABERABERABERABERABERABERggROQKJuhC4goI0lmlbINj4zY4y9stdue2mI3Pjdgjw8X7Ilyg21N8taVzxv/iekvRFnFKkGSWWLFXN5yhbzlC7mwVmJWrlRsqFy2lqRszTZqezeYHb2iwQ5Z1WJrV7baymWttqy9xYqFgiVenplPE2kT6/I/1Vk4syiz29CsnDM0yLRZERABERABERABERABERABERABERCBaSUgUTatOMdurFQqWaU8aoODQ/bQc1vt2t/22E82DVul0GjNDU2WJDnLexP/nLcnC834Ky7IYkMyT5Ll85ZzoRZ0Go3/y7wrl3hqrDWfs67ciC1PhuyI1Y121D7Lbe3uy62pqdEsR8+y9J1ev5lkJ9j0A86KrCi4xhNd1dk4MzN0bg9f9v1h/1pEQAREQAREQAREQAREQAREQAREQAREYH4TkCibgesTyy4RZaWRIesfGLD7n+6z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v44Ydt48aN9trXvtbOPvtsO/HEE2316tUzMMJndpN8bhCAnA9JuTg2kEgIoYMOOshe9rKXuTBbDAvni+gkWfjss89WJSHfIVGSIc3ggCCiHJdnzh8pymO33XbzUtuFLg+5xvHaI5HjtScpiRDkuvMZQZZpEQEREAEREAEREAEREAEREIGZICBRNgNUoyijb1RWlP3k6bz91wtpyovkValiNhqTYWl4C6tUTXOloixNiGWb77so87RYGhXDUlGfySPTR4xUGA7MU2dpai3ItlSL5c1Gi+YN/uMbSbYx8ybPLPkk7+8f9RLQxBos77JutBJFX+K7jaKNclHW9/5pubyNMC2nmQ0Oo+7K9rcva7Y3H9RuL1vTbs3NLVZsaKreEC81WYYcu/TSS+3cc8+tjkQEF6WTp556qp100kn+c/2COHjooYc8jcbjrrvusuuuu85Xo2zzS1/6kr9/jz32mIERPr2bjMkpJAmPzZs32/3332833XSTPyNISEpt2rTJBeJZZ53lXDjPhbjESRji+SKEuJa33Xab3XrrrS49b7/99u2e2r777utyjLThhg0bXByRPkSWwSTyWghsxrv2Dz74oF97JHA8l+eff96TlVz7V73qVV6SrEUEREAEREAEREAEREAEREAEZoKARNkMUB0jyvp7rZtE2bMjdsVTOfuvZxBhyLGK2UjZrMQjtVYIMhJayLL0JU+Ueff92Hw/bfZfFWXpCbgki8mwVJZFkVYtu8wFCVebYDG8h+iXC7a0RJOd+/Yzx5FJtfkefeZNn1WgJut4PU2UVVNwSL74QAwWE/vUy5rs9ANb7MA1bdbS0moNjbWysaUoyn7wgx/Y+9///upIPOWUU2y//faz17zmNZ4K254oI3GFJPvNb35j99xzj1199dW+jX322cf+6Z/+yZNlC0GUUW5HfzVkCAm73/72t56uQpggjejbxrj45S9/6ZLkL/7iL+x1r3vdgpUlnC8SPZbOIslIB3LeyCGet2zZssNvJqTY/vvv7wkrpBljhOu+9957++8LRSTxXcm1R4Jy7bne8drDIXvtTzjhBPvwhz/s157yZC0iIAIiIAIiIAIiIAIiIAIiMBMEJMpmgGpWlNHMP/You+Jxs689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zLYo1SLHtOEmSzMPC0CxEQAREQAREQAREQAREQAREQAREQgUkRkCibFK6pr1wvu3aU9BrToyxNjo33Gkezve2MJ9KmfvQ7fmeUeTvqMTZe0mymjkfbFQEREAEREAEREAEREAEREAEREAEREIGpEJAomwo1vUcEREAEREAEREAEREAEREAEREAEREAERGDREZAoW3SXVCckAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIwFQISZVOhpveIgAiIgAiIgAiIgAiIgAiIgAiIgAiIgAgsOgISZYvukuqEREAEREAEREAEREAEREAEREAEREAEREAEpkJAomwq1PQeERABERABERABERABERABERABERABERCBRUdAomzRXVKdkAiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIwFQISJRNhZreIwIiIAIiIAIiIAIiIAIiIAIiIAIiIAIisOgIzJooS0CXJGa5XHjWIgIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIALziMAMi7LEnViUZEmShJ9TaVbzZeFV6bN5NDJ0KCIgAiIgAiIgAiIgAiIgAiIgAiIgAiKwxAjMmChDimHJkF/8XOHn9IESc0nmq4QfwrNk2RIbfzpdERABERABERABERABERABERABERABEZg3BKZVlFVlV0aKZSWZizCXZ2nMzJ+qkTMlyubNsNCBiIAIiIAIiIAIiIAIiIAIiIAIiIAIiMDSIzBtoiymxVyMVRJLKpWQIsukxSLeKNSWHm6dsQiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIwHwlsMuiLCvIgiRLBRmyrE6U5Wjkr0UEREAEREAEREAEREAEREAEREAEREAEREAE5iGBXRZlnh5LKkGQRUmWdvDPtO6fh6euQxIBERABERABERABERABERABERABERABERCBGoFdEmUxQVYul8dKMhEWAREQAREQAREQAREQAREQAREQAREQAREQgQVGYEqiLJRb0pi/YuUySbLy2FktczlTkeUCGwnz8HB3VKo7m2W8O+qpp35783Dg6JBEQAREQAREQAREQAREQAREQAREYIoEpiTKKLFMKomVEWTZcsspHoTeJgL1BFy0jtPTbjYF2Zhj8n572y4SZRq7IiACIiACIiACIiACIiACIiACIrB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oEdgkF+/HlC28sorx255C7pzCvUFxPR7WR6zIiwrOtDy/GIsKFmE6hV5f7pDxYpQLN+5UjnH8l0tFZ752sKFUQdOMvIHAcuUpyx3ltGHVs9Tlrcv15FdC5bmvoZqB+BALrxaUHSQ33q9zqv+QCvmLnP6ueeeS7///e/TWWeeGVBqxdGj04yZM0Py97///ekDRx+dttlmm6UKyrjHyJ129113pYsvvjideuqpadmhQ3ueJ+uss0468UtfSrvuumvk82ofULZMWn5YF/C7//770xWXX55OOumkxab3aaedlvbYc8/YudegbLDf/e6/FbACVsAKWAErYAWsQC0FDMo8PwZUgaqgbN111okk4BzfW/LvvpxidLQMmpUBN+0YpzxFetf3eT05HFNdPdAGZ1h36GS+iQAhX+RLAqJpB8Bll1s2Fu5Dh76e2L9dQFnex3wc+gNd6pmYRY1zrQ3LypXUvC3O//6MWZejbLn0wgvPpz/+4Q/pggsuSDfecEMaN358evjhh+NSxxzblzSuAAAgAElEQVRzTDryfe9b6o6yYcsPS7Nmz4q8aZdffnk675xz0rDhw9O8uXPTU08/nbbeeqv0qeP/Je3S1o6yB9LVV1+dzj7rrAB97OqJW27y6qunL3zxi+ld73qXHWX1PFh8rBWwAlbAClgBK2AFrMCgVMCgbFAOe+t0ugooG7fyygm3R9FRVragrwLLcmDWWx36PgdjfO4NtpWBIkGu/BqAMep5ZdasNHPGzMT2loSfActw4uAqez0EcwjWqJZylBXdbT0Ouddei37xN8cUNybQjGsWtCrqrWvLCah25KGxaF8sjUChMsDUMy8adNEVQV89ekV7uibbG7qnsclhaw4QBX+lgZyPjegkTRR6yY6XhF5eeMEF6abf/jYgN/mzCAck9PLII49MW2+99eKOskUp4UNsZFzKnmqhzDIpgLRylN1z990Bys4/77yekMUnnngiHG7HH3982nmXXcJRhpM0z1GW66lr9TZufT1jaj2B66lTuuOWw1H2wAMPpKuvuiqdc845aQE7jS5aFDni1lpzzfQfX/hCgDIcZfQrDyst61vr/FfCLbECVsAKWAErYAWsgBWwAktXAYOypau3r1ZQo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VwxK7wZMxcPPD///PMwadIkW2BzWQNx4Kj/gAEDwve//30jI6sxSS3G4oZ64bKL7eA+TF2JtwfZw9+xg6222ioMGjTI7MpPCfO3OH0N7NiYffbZZ2Y/YAqOkIxbbrll2GijjSyWoSdHwBFwBByBxkWATfyECRPCa6+9Ft555x0bn4nfusUWW4Tvfe979jMHm5BlnhwBRyAbAqwbp0yZEiZPnhyI0cy/Weew59h4443DZpttZgesnhwBR6DpEHCirOmw9ielIFAOoqzcZJmILm7f5HRHRNl6661nCiAWf7rtMibJYuIsLcA/hFgywH/shhkry1qq+yUEx7vvvhveeustIz0gk3iB3a677hp23333sMEGG1RlX4EYhRCjXl988YURO7zYVLCRwJbkyottHX744WHo0KG2sUClKIl9VVa+EQsNriwcP/jgg/Dhhx8aycoLuwG7fffdN2y99dYtQonYiDB61o6AI+AINAgBxmLmM+Y3CLIXXnghjBkzxjbzhKVg7h44cKAdePEzKjNPjoAjkA0B9au3337b1o6QZayZUc7vueeeYeedd67ag+RsCPinHIHKQ8CJssprk1ZVoixEWffu3W1yiF0vs8YgKxTEPxnAX8CLKMNNLkmUrb322kaUxeqxuA7xzyLTUMRAjEhZFqvK4gD/rcEFk8n/1VdfDaNGjTLig9OzV155xaD/3e9+Fw499FA7OavGhK1AAL788stGBkLqcOqO3dK2IlL5DOmcc84JBx54oNWX2BOklupy25D2pB9iK6gX3nzzzfD++++H+++/37KEXP31r38dhgwZEvr27duQx/h3HQFHwBFwBAoggPobRS/jMWPxk08+GR599NGwyiqrGFHGHDh48OBw2GGHhR122CGwdvPkCDgC2RDAlfmll14Ko0ePNrfmTz/91PoZ6dJLLw0HHHCAeSB4cgQcgaZDwImypsPan5SCQFaiLM31srHIMvLl5DRWlPG7ddddN4goU1XyKcpEiiSD14sMiQP88zNKM7lfKq5HS1SVcWLGKfSIESNsAcCiQGnYsGHhZz/7Wdh0002rqq8oACsqJ0i/Bx54IDz22GN2ElgonX/++bbwgSjjxNAVZeloQZS99957RkCC7xtvvGE/k+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BxfiLHwPfxZibJ2N611QiIgAiIgAiIgAiIgAiIgAiIgAm2EgERZG7lQHWWYSKkgx0iV8XXgwIFkygxhhkxrjrzKxjKIqiDbUqVbttdn+veQikOMlZeXJ78QZHzRky1dcq6p76fXiYAIiIAIiIAIiIAIiIAIiIAIiIAI5EZAoiw3Xtq7hQmE/l0IMZJkIV0W/twaoizfpxjEG9+jfdeigixIMv5dmwiIgAiIgAiIgAiIgAiIgAiIgAiIwJEhIFF2ZLjrXRshEJVlofwSQRa+QvllW4MYRBmll9Hyy/D3aHlmWzs3jVcEREAEREAEREAEREAEREAEREAE2gMBibL2cBXb4TlEV4YMK0SGn0XLLsOfGyuXjJZONqWMMl0JZnQMvHfqe0QvSTRRFl2cgPRY+JIka4eTWKckAiIgAiIgAiIgAiIgAiIgAiLQ5ghIlLW5S9ZxBhxkVKbvbY1EtEl/VJ5xHmrg39aupsYrAiIgAiIgAiIgAiIgAiIgAiLQHglIlLXHq6pzEgEREAEREAEREAEREAEREAEREAEREAERyJmARFnOyPQCERABERABERABERABERABERABERABERCB9khAoqw9XlWdkwiIgAiIgAiIgAiIgAiIgAiIgAiIgAiIQM4EJMpyRqYXiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAItEcCEmXt8arqnERABERABERABERABERABERABERABERABHImIFGWMzK9QAREQAREQAREQAREQAREQAREQAREQAREoD0SkChrj1dV5yQCIiACIiACIiACIiACIiACIiACIiACIpAzgVYTZfX19TkPTi8QAREQAREQAREQAREQAREQAREQAREQAREQgdYi0MKirN7wY0GS8d11WUKaferO2E8irbUuut5HBERABERABERABERABERABERABERABETgcAItJspciiXkV13iz+FnUXHm5swFWoMoky7TNBUBERABERABERABERABERABERABERABETgSBPIqylyA+f/XW31dvbkg4/+CKHMTFkmPJfZNxMwkyY7EDNB7ioAIiIAIiIAIiIAIiIAIiIAIiIAIiIAIOIG8ibKkDEsIsrq6uoggOzQnpjJLzT4REAEREAEREAEREAEREAEREAEREAEREIFCI9BsURYtp+TPCLK6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UaNaXJQFSV11sMr27N1jmzdtshWffGILFy605cuWuTDnPiT9yM+4f9JtA486yhNk3DPDhg9PfkaOO+EE/x8V+Jzw8vPIogBH9kro3UVABERABERABERABEQgMwGJMs2OgiCQTZSFsp1cxVj05HKVZSEthghLFWVIkiDKouV30URZEB2pDf7Dw2khyrIgykh3IXN+/etf2+OPP+7ljjwM8xB966232vU33GCTJk3yxAjpruYkn0JvI0TknDlzXHTNnz/f1q9bZx988IFfQiTZl7/yFTvttNNcIqUmykh2wXv58uU2bdo0++63v207d+/2EllKMPn31NUmM038MNe47nyRBoNHdLv22mvtsssvd7mFOI2mZqJzNMhRStZI6TC++R9+aG+++aY999xzfkikyGWXXeZpuREjR/rxkHISZQXx0ZTXQSBU+UKY/uXFF+2uu+7y43MfnXrqqTb06KN9Ppx++ukuYlu69DJ87iLENm3caMuWLfMk6bPPPmvvv/++3zPIYMbBPcSiAyFByQqtIXHL/cgX9xo/417m8+GWW26xiaef7uWYlGXyOcLW0qWkeb1oOpgIiIAIiIAIiIAIiECHIyBR1uEueWGecDZRFhUxrSnLECWhv1QovUxNlAWiQbCkJsuiDf7Z1xNLJSX+EFposiwqyihhfPCXv7Q//elPfoqkykiX8PB744032qTJk/MmykpLSm3T5k0uyl5++WUXZOvWrvUUC9sNN9xgX/3qVz3NlkmUsR8rCb4wbZr9/Te/6a+jITrljZQywpqH+0wP6WGFQdIzNRmSM+FaH3vssZ6qo28aJXLIBMpQQ7LM34v+dEXFVlJa4j2eEGWICEpL33j9dRd6bMi/K664wvtSIUco9ZQoK8zPqeaOqlBEWZif1VXVtv/Afl9cAInL3ETkPv7EE4ecKqWVx4wY4b0CSYdRyswiHwi2tevW2Zy5c21bopdh9IVf+epXbcLJJ1tIllG2jjzOlExrLl+9XgREQAREQAREQAREQATyQUCiLB8UdYxmE8hFlPFmrSXLoqJs27Zt/mDI6nQklXhgTN3SJcqCOIsKM6RMaSdWwPt0VbhmQ8zDAZKll9u328xZs+yh3/zGHnvsMevfr583ml+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URBVD+PLlTQ3PfT60VABERABERABERABERABERABERABHInkLMoi66ASaqsLcmK3PHoFUeKQJBlnmJMzLPw3eec/3/bKf0NqctQfpkqzpQkO1IzTe8rAiIgAiIgAiIgAiIgAiIgAiIgAp8SyEmU8bIgyoLA8O+JcjmVYGpq5ZNAVMJm+nM+36+lj5V6fyTlWWLFz5Z+fx1fBERABERABERABERABERABERABESgcQI5i7LGZJlgi0C+CWSSS/l+n9Y6XroEplKZrUVf7yMCIiACIiACIiACIiACIiACIiACLSTKOGxdXX1Dg/+62obviWQZ/6Z0maZeSxBgXiGWss2v6D5x9o81Vko+ixrW1wzHTHfsjD+zojZVLhqLiXYSAREQAREQAREQAREQAREQAREQgXZEoEmJsnD+eINDRFlClrUjPjoVERABERABERABERABERABERABERABERCBDkKgWaIMRtGeZeHPDb3W65ON/kNpWbYUUAdhrtMUAREQAREQAREQAREQAREQAREQAREQAREoQALNFmVBlh26SmGDJKurb1gVk/8romG5NhEQAREQAREQAREQAREQAREQAREQAREQAREoUAJ5EWVBlpnLsQZJVk//svBnq/fTP6RpeSJ1lo0L6bTURQEjraIafXnipYfsE14b/bfGjtfoe6V7g3Qj8nNNtrfKdsoJVoefd8M/NPw87ub8Ut473Tkd9rPU90n8PXW/JM9P23cdMsbDhtsYi5jnFuf6R/eJs38snpHxpT3vxEGy8fXDJK7LYdcyGx+/mJ+ONu31CNOk6PDp0lQWydclxl1flGYaxrx+sVhHdorDk/si0T7usMOnuwfCTtmO3dhYG5sDuZxjY+Nr+Nw89Nyy3qtZ2OUytkM/PA//7GnyJY/5wkY/m3P7KPSbobHPYX+vRu6vWEMOO2W6vzNcm6bel8nDNeV3TDp+sU6y4V0P+UzI4XdSnHsquk8UZbZ7JXlfR35Xphtaumudy+/W1P9+SP0de8j4I/dv6mdGcrqk+fyKcymS+8TZOfX3U+rv9ByOke5zIfy3mrNIOVa263bYXIreR3mYW5n+eyDbuLJ9/h1y/6X8Tjzknm7C/RmZwocOo5HfdalzOOPvjhjXOjpXm7Qwd6b/hox87iTfI3Gyyd/hjfBq7L+f0v4+D++X5jM57eduDDb5/B2a67GyXZdcf5c4ljCn0px7rv/9FOd8Uj8/M/63W66/49P8fs31v5+y8mNupvvv35T3Tv2dkHUcjT3eHQIsPpTGOGea5hmnf+SezMoozSSIdVtF2UZ+BzT2323p/hu50TmYYSCpv4MO+Z2R8vkU61yy3AhNYZj13sp0/ybma67vedhHeOJzItPnZrrrlO09m/LvzbqXovdp9HdDI/+dkTdR1jBZG34TNXxLCLOoPPN0WcMOvm/iF1fD6xKvzToTtIMIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAI5J9AXkVZ6vBCOWZD+WWDSGsQZEGYBbn2aT+z/J+ijigCIiACIiACIiACIiACIiACIiACIiACIiAC2Qm0qCjj7ZMps4a/hBBZiJ35CEMCLftwtYcIiIAIiIAIiIAIiIAIiIAIiIAIiIAIiIAItAyBFhdlLTNsHVUEREAEREAEREAEREAEREAEREAEREAEREAE8ktAoiy/PHU0ERABERABERABERABERABERABERABERCBNkpAoqyNXjgNWwREQAREQAREQAREQAREQAREQAREQAREIL8EJMryy1NHEwEREAEREAEREAEREAEREAEREAEREAERaKMEJMra6IXTsEVABERABERABERABERABERABERABERABPJLQKIsvzx1NBEQAREQAREQAREQAREQAREQAREQAREQgTZKQKKsjV44DVsEREAEREAEREAEREAEREAEREAEREAERCC/BCTK8stTRxMBERABERABERABERABERABERABERABEWijBCTK2uiF07BFQAREQAREQAREQAREQAREQAREQAREQATyS0CiLL88dTQREAEREAEREAEREAEREAEREAEREAEREIE2SkCirI1eOA1bBERABERABERABERABERABERABERABEQgvwQkyvLLU0cTAREQAREQAREQAREQAREQAREQAREQARFoowQkytrohdOwm0+gvr7eDxK+pztiUVHRIT9O/XvzR6EjiIAIiIAIiIAIiIAIiIAIiIAIiIAIFAoBibJCuRIaxyEEkFfpvsJOjcmtVJRhXyQXf+Z7TU2N7dy103bs2GFVVdVWUlxiaLO62lqrr69LyLMi69y5s1V27WKVlV2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5myQdvy5tYU1nzWc58yZM+29995zZnPnznUszOdvfetbds4557iMau0NYffrX//afvSjHx321nfeeaede+65fl0HDx7s/wOBNhEQAREQAREQAREQARHoCAQkyjrCVW5D59iYKOM0cln5Mp0s42cIKxprk4ZZMH++7di9xyp79rIevftY/wGDvGRr7epVNu/9WdaraxebNGmyP3TTywdRxoM4yZmQsGDMqZIsNPcPgg9BhyALK2IWerIMUTZr1ix79NFH7bHHHvPzhQvniji88sor/3/23gNMruJK368Z5YyEJEQWQgSDBAKLnEQONllksImLWWQbvNi/Xdvr3WfXeNf248V/bGwDJpgMDoDJQZgschICkZGEhFBCEQml+T/vmTk9NVe3u2/3dI96NN+1m55wQ9VX596eevWdU2H06NH2s0ptpKK98cYbBk0ALziWnn32WXOVfetb3zLnDdcs5jqqVHt0njUVIJ5Z0AInGPX9AC24kYBm1LQ67rjjbIxwIeE8THMhEUM4BnGi4Wgizu66664c2PJ7JunM5J6JQZlDb+AXL+4tL0SP25MXAI0YJVUauM0iHECztnSZAcoAwABfABl9fvzxx03c/fffP3z3u9+1NMe1AaIYv+uuuy5cccUVqaBsv/32C9tvv71AmR4GUkAKSAEpIAWkgBSQAh1KAYGyDjXctd/ZUkFZGjwr9LM49RJHGWlGi79cHtZbf1BYb+DgMHCDIeacmj51Snj9xQmhd7fOYfToXRtB2dx5YdbsWQbKcMw4BCCVzCf3cQpm/DX7uAOGCT1fl1KTqa1Hjsk9wOqqq64Kf/7zn+3y1CrC5XXmmWeG0047Leyxxx4GHSq1URONifsjjzxiaWrUTyL1k+30008POFx22203gbJKCV7GeYhpIJenLQO5rr766tyZcP4xRhSBB0qlpROS4kc6L6mHgNGnn346F2Mc426xQveIg2juK9IFAbukc6Y50YC8J5xwgsUrKYUAKQAacK0tgDX3EiARNxlxDWAkxtlw4F144YVhr732WiugDGj3wAMPhDvvvNPSyNESmAccQ7Ndd93VoCcuWmrPaZMCUkAKSAEpIAWkgBSQAh1BAYGyjjDK7aiPxUBZqWAsreu4Tpi8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wBU8AUMAVMgWqsQEqgLATLQnAsnKtMc5Z539d7+Go5marxSrOhmwKmgClgCpgCpoApYAqYAqaAKWAKmAKmgClQyRVIGZT5YdkJaBYCZ+FKhZa9rJIvA+ueKWAKmAKmgClgCpgCpoApYAqYAqaAKWAKmAKmQFpAmcKyMtBMkv2XOvmfl7csnLTcq5Ip8ksFgFAZACsGYAvSFDAFTAFTwBQwBUwBU8AUMAVMAVPAFDAFTAFT4KdS4P8DFtGV2hHiLSMAAAAASUVORK5CYII=", + "created": 1648745429881 + } + } +} \ No newline at end of file diff --git a/docs/ja/guides/best-practices/images/04-Ordering_key_columns_efficiently.excalidraw b/docs/ja/guides/best-practices/images/04-Ordering_key_columns_efficiently.excalidraw new file mode 100644 index 00000000000..0423333e644 --- /dev/null +++ b/docs/ja/guides/best-practices/images/04-Ordering_key_columns_efficiently.excalidraw @@ -0,0 +1,2499 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://app.excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 2838, + "versionNonce": 52205387, + "isDeleted": false, + "id": "qtX6x84ifEWpmMlvjuwhm", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 385.26381756295194, + "y": -4873.5835302275245, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 316.050372753268, + "height": 299.2631095638441, + "seed": 1499470394, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Mo-vgOTPvg0K-O6wFpWvS", + "type": "arrow" + } + ], + "updated": 1655216756421, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2575, + "versionNonce": 1007916773, + "isDeleted": false, + "id": "Lrjtc8i7RDtRgEMzCyc2O", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 14.532151266623146, + "y": -4876.301753193795, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 324.710529003268, + "height": 301.1095767910746, + "seed": 2146516582, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756421, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2687, + "versionNonce": 1908504043, + "isDeleted": false, + "id": "YaUuLC54Jft-Q1TmGCg0n", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 6.0590924196161495, + "y": -4832.473690197763, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 701.55115327381, + "height": 21.57025049603125, + "seed": 563397370, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Mo-vgOTPvg0K-O6wFpWvS", + "type": "arrow" + } + ], + "updated": 1655216756421, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1828, + "versionNonce": 497644101, + "isDeleted": false, + "id": "ZG7xIJmYU_01zBa6E4IOM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 128.4332335151239, + "y": -4830.028272260108, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 21528998, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756421, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "same value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "same value" + }, + { + "type": "rectangle", + "version": 2692, + "versionNonce": 26312843, + "isDeleted": false, + "id": "uP1orLYT3sg-lBzvmtKp1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5.863796025501756, + "y": -4799.272459137157, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 701.9936755952385, + "height": 18.283420138888914, + "seed": 1991660474, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756421, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3491, + "versionNonce": 984408485, + "isDeleted": false, + "id": "KJNPSV2FX9EbB9AUWVVXe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 3.647522174107735, + "y": -4768.285747288017, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 705.7503720238094, + "height": 18.68855406746024, + "seed": 894786790, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756421, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1959, + "versionNonce": 1011300139, + "isDeleted": false, + "id": "eSid1nhor4D8oJbUtO7uA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 52.61542690531667, + "y": -4865.53779188645, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 235, + "height": 25, + "seed": 2062011514, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756421, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "low cardinality column cl", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "low cardinality column cl" + }, + { + "type": "rectangle", + "version": 3901, + "versionNonce": 973241445, + "isDeleted": false, + "id": "Y3XoRfqQf-NLr3lE7JnMN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 5.451470492958094, + "y": -4704.339245230425, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 704.6454613095239, + "height": 19.74100942460325, + "seed": 304339814, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756421, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3527, + "versionNonce": 1113749413, + "isDeleted": false, + "id": "ONKeuz9pVhxRHOaFetGq5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 174.7365697763001, + "y": -4757.2240361838685, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 730583270, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756422, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3631, + "versionNonce": 1692270891, + "isDeleted": false, + "id": "-HvFH8HPNIoXqNg7o4GK1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 175.02350159448025, + "y": -4743.4442066384145, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 8558714, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756422, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3634, + "versionNonce": 1625176837, + "isDeleted": false, + "id": "wj08ZywhI7w7csrHoqqy0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 175.0484414983278, + "y": -4730.274735484569, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 820823078, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756422, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2075, + "versionNonce": 474211563, + "isDeleted": false, + "id": "kZsLE3jpmPz1Q9HP50zTT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 423.5356465388398, + "y": -4864.597721248145, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 246, + "height": 25, + "seed": 818562598, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756422, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "high cardinality column ch", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "high cardinality column ch" + }, + { + "type": "text", + "version": 1827, + "versionNonce": 804130699, + "isDeleted": false, + "id": "sovQZLFZhWlrgZZEN7Onl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 534.942638101621, + "y": -4828.874510744283, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 14, + "height": 20, + "seed": 1586818554, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756422, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "v1", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "v1" + }, + { + "type": "text", + "version": 1898, + "versionNonce": 426033829, + "isDeleted": false, + "id": "TKuOOFwXXx8if2hOOwVvm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 532.4485832537756, + "y": -4797.424552349724, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 21, + "height": 20, + "seed": 1152533114, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756422, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "v2", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "v2" + }, + { + "type": "text", + "version": 1999, + "versionNonce": 775546411, + "isDeleted": false, + "id": "e-xdBVQQ-6WHMcQ9W56bZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 534.4252205718773, + "y": -4767.596246790877, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 20, + "height": 20, + "seed": 143083450, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756422, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "v3", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "v3" + }, + { + "type": "text", + "version": 2105, + "versionNonce": 1465853445, + "isDeleted": false, + "id": "yrHiTgCA5gWUbt6nLBOJu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 538.2390809430202, + "y": -4703.998054559754, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 17, + "height": 20, + "seed": 2086876454, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756422, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "vn", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "vn" + }, + { + "type": "rectangle", + "version": 3015, + "versionNonce": 1758873957, + "isDeleted": false, + "id": "FCCUs0_i4qLdB0Ej94E4Y", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 390.83654539798164, + "y": -4312.63594729479, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 316.050372753268, + "height": 241.50809398580586, + "seed": 1914513466, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "1sq5PdmMU7wreMSi402mr", + "type": "arrow" + } + ], + "updated": 1655216756422, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2736, + "versionNonce": 1838754667, + "isDeleted": false, + "id": "jgFXbXeH8YIKeQ2gURwgW", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 19.861398564808013, + "y": -4315.35417026106, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 324.710529003268, + "height": 239.25119804797578, + "seed": 668209254, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756422, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2823, + "versionNonce": 879875269, + "isDeleted": false, + "id": "o6Ok6BRVTyY0YZICjpu1r", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11.457897918761972, + "y": -4271.526107265028, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 701.55115327381, + "height": 21.57025049603125, + "seed": 2071990522, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "anUfuQZGoFRmo_9HIl_zk", + "type": "arrow" + } + ], + "updated": 1655216756422, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2826, + "versionNonce": 1329919013, + "isDeleted": false, + "id": "e1w5nDBdprtkB0GjJBMVk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 11.436523860531423, + "y": -4238.324876204422, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 701.9936755952385, + "height": 18.283420138888914, + "seed": 1376248250, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756422, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3625, + "versionNonce": 1791986859, + "isDeleted": false, + "id": "9mEd9Pc5kSLTLJP76KICb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 9.220250009137402, + "y": -4207.338164355282, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 705.7503720238094, + "height": 18.68855406746024, + "seed": 472624870, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756422, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2173, + "versionNonce": 356329349, + "isDeleted": false, + "id": "9K9GA5Xsx7Linr6bzdWXg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 430.99068170730413, + "y": -4301.428285389093, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 235, + "height": 25, + "seed": 1356307066, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "low cardinality column cl", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "low cardinality column cl" + }, + { + "type": "text", + "version": 3665, + "versionNonce": 1949935755, + "isDeleted": false, + "id": "ZVy4SXPgb8AN-xRWRSzZd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 180.30929761132978, + "y": -4192.276453251134, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1392447654, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3769, + "versionNonce": 1140537765, + "isDeleted": false, + "id": "zs9dJsuDRPlb1lxvSFJT-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 180.59622942950995, + "y": -4178.49662370568, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 750007482, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3772, + "versionNonce": 2007654187, + "isDeleted": false, + "id": "HIw5GXLWPA088s4648m9j", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 180.6211693333575, + "y": -4165.327152551834, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1331825638, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2149, + "versionNonce": 91672683, + "isDeleted": false, + "id": "o5Iyk91ZX6NHnkpCdNoMq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 126.61669812534177, + "y": -4239.368643462498, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 96, + "height": 20, + "seed": 1175505510, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "larger value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "larger value" + }, + { + "type": "text", + "version": 2288, + "versionNonce": 1151963781, + "isDeleted": false, + "id": "GahQ9RQkP70w-ToYDmci_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 53.666320191733945, + "y": -4304.755056684555, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 246, + "height": 25, + "seed": 1041891450, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "high cardinality column ch", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "high cardinality column ch" + }, + { + "type": "text", + "version": 2043, + "versionNonce": 88013285, + "isDeleted": false, + "id": "S9EAguDXECpjTanurYF92", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 505.2946637966753, + "y": -4269.467830075513, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 87, + "height": 20, + "seed": 448258362, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "some value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "some value" + }, + { + "type": "text", + "version": 1923, + "versionNonce": 849643211, + "isDeleted": false, + "id": "gxjeT_-XlqLq3Soh1LyCn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 130.16653022905263, + "y": -4799.959769238338, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 2098985658, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "same value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "same value" + }, + { + "type": "text", + "version": 1978, + "versionNonce": 484728677, + "isDeleted": false, + "id": "EANFDhLMVVj_cUw-jXS5K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 128.82537610354728, + "y": -4769.680317299848, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 446104038, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "same value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "same value" + }, + { + "type": "text", + "version": 2107, + "versionNonce": 1503622507, + "isDeleted": false, + "id": "QqhxE25m1vjZKIcjFyv_-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 129.9347258122986, + "y": -4703.98032260843, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 14130298, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "same value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "same value" + }, + { + "type": "rectangle", + "version": 3995, + "versionNonce": 709700293, + "isDeleted": false, + "id": "5aWnqxdg_GK3aF9xgcy-z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 6.716100664771005, + "y": -4662.45154636205, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 704.6454613095239, + "height": 19.74100942460325, + "seed": 1188888890, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "rh-38xKn85IlMvAGLOUuV", + "type": "arrow" + } + ], + "updated": 1655216756423, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2202, + "versionNonce": 1283690507, + "isDeleted": false, + "id": "G4cSyyf6j_eXEv-ZUcXR-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 542.5037111148331, + "y": -4662.251094087263, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 14, + "height": 20, + "seed": 1650083686, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "...", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "..." + }, + { + "type": "text", + "version": 2248, + "versionNonce": 1531284005, + "isDeleted": false, + "id": "0-Zu47vlyIleKnDquRUwp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 113.06450111395831, + "y": -4662.374100531826, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 119, + "height": 20, + "seed": 1021102586, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "different value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "different value" + }, + { + "type": "arrow", + "version": 1942, + "versionNonce": 1725230565, + "isDeleted": false, + "id": "Mo-vgOTPvg0K-O6wFpWvS", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 700.1163393610292, + "y": -4837.17969566948, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 102.01905034388096, + "height": 78.0457406876982, + "seed": 624469542, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655293780194, + "link": null, + "locked": false, + "startBinding": { + "elementId": "YaUuLC54Jft-Q1TmGCg0n", + "focus": 0.8787880374605471, + "gap": 4.706005471717162 + }, + "endBinding": { + "elementId": "3p2klKHZ3xRJgdfEZWb2u", + "focus": 0.507689627061049, + "gap": 3.1361614618572844 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 11.585310767826627, + -8.259218862988307 + ], + [ + 15.779906463149969, + 0.8433709402347214 + ], + [ + 16.66393948236995, + 25.82459982511837 + ], + [ + 17.30249991839189, + 50.97062533050765 + ], + [ + 19.11368951874503, + 69.7865218247099 + ], + [ + 32.76395546279845, + 69.2533562877799 + ], + [ + 102.01905034388096, + 61.64491894859428 + ] + ] + }, + { + "type": "arrow", + "version": 1246, + "versionNonce": 1336217323, + "isDeleted": false, + "id": "rh-38xKn85IlMvAGLOUuV", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 708.787358024008, + "y": -4676.67684185521, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 92.75934039482536, + "height": 97.14706067288162, + "seed": 1705315578, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655293780194, + "link": null, + "locked": false, + "startBinding": { + "elementId": "5aWnqxdg_GK3aF9xgcy-z", + "focus": -1.623767504357262, + "gap": 14.225295493160502 + }, + "endBinding": { + "elementId": "3p2klKHZ3xRJgdfEZWb2u", + "focus": 0.5002702869307034, + "gap": 3.724852747934108 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 9.390209912397566, + 0.3407545017945566 + ], + [ + 13.652890747270717, + -24.746349152546944 + ], + [ + 14.277503366963296, + -64.90994643073208 + ], + [ + 16.020713106057247, + -81.35703038401603 + ], + [ + 25.070088728382185, + -88.08882487502407 + ], + [ + 92.75934039482536, + -96.80630617108707 + ] + ] + }, + { + "type": "text", + "version": 313, + "versionNonce": 939577253, + "isDeleted": false, + "id": "3p2klKHZ3xRJgdfEZWb2u", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 805.2715511667674, + "y": -4797.3005241711, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 337, + "height": 50, + "seed": 1917678758, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Mo-vgOTPvg0K-O6wFpWvS", + "type": "arrow" + }, + { + "id": "rh-38xKn85IlMvAGLOUuV", + "type": "arrow" + }, + { + "id": "kx0Y5XeLPP8gELJRVQBS8", + "type": "arrow" + } + ], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Rows with the same cl value \nare ordered ascending by ch value", + "baseline": 43, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Rows with the same cl value \nare ordered ascending by ch value" + }, + { + "type": "text", + "version": 610, + "versionNonce": 1626417451, + "isDeleted": false, + "id": "lGplLR8Z6jWDoJktrIipg", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 736.8301707406551, + "y": -4688.162934495756, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 511, + "height": 75, + "seed": 84608038, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Mo-vgOTPvg0K-O6wFpWvS", + "type": "arrow" + }, + { + "id": "rh-38xKn85IlMvAGLOUuV", + "type": "arrow" + }, + { + "id": "kx0Y5XeLPP8gELJRVQBS8", + "type": "arrow" + } + ], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Good data locality:\nSimilar ch data is placed close to each other,\nand therefore that data will be compressed better", + "baseline": 68, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Good data locality:\nSimilar ch data is placed close to each other,\nand therefore that data will be compressed better" + }, + { + "type": "arrow", + "version": 487, + "versionNonce": 875030853, + "isDeleted": false, + "id": "kx0Y5XeLPP8gELJRVQBS8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 956.9471743771608, + "y": -4744.119863639449, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 1.8971719581269326, + "height": 40.45578583351107, + "seed": 998502630, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655293780194, + "link": null, + "locked": false, + "startBinding": { + "elementId": "3p2klKHZ3xRJgdfEZWb2u", + "focus": 0.10694674091478802, + "gap": 3.180660531650574 + }, + "endBinding": { + "elementId": "lGplLR8Z6jWDoJktrIipg", + "focus": -0.12050265110988508, + "gap": 15.50114331018176 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1.8971719581269326, + 40.45578583351107 + ] + ] + }, + { + "type": "text", + "version": 3651, + "versionNonce": 1580897547, + "isDeleted": false, + "id": "PIsgcoP-1CloIIpQqrMNU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 543.3773587517943, + "y": -4756.378846180702, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 92313594, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3755, + "versionNonce": 674059557, + "isDeleted": false, + "id": "Atwr3a8M6kiymsFpsJ9OJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 543.6642905699745, + "y": -4742.599016635248, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 40926374, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3758, + "versionNonce": 1004125099, + "isDeleted": false, + "id": "xrULyUeXjGsYNLsPYaT6K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 543.689230473822, + "y": -4729.429545481402, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 2019526842, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3619, + "versionNonce": 1416718469, + "isDeleted": false, + "id": "BKVYbxey2QmitkdhvVkVj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 545.6784348211513, + "y": -4648.858702720743, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1231286182, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3723, + "versionNonce": 1947930187, + "isDeleted": false, + "id": "jaRokGmuyH-UX_Q_RqO9Z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 545.9653666393315, + "y": -4635.078873175289, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1657849274, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3726, + "versionNonce": 966528997, + "isDeleted": false, + "id": "IUw1dFIp5HXlIvaVZ0QLh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 545.990306543179, + "y": -4621.909402021443, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 64162534, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3676, + "versionNonce": 1238961387, + "isDeleted": false, + "id": "Ayu8jCN0JwCyp99wqkWQJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 175.9159546240246, + "y": -4649.51435179256, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1098385062, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3780, + "versionNonce": 632998725, + "isDeleted": false, + "id": "KK8FVzfNzvvlmQnJfDRBX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 176.20288644220477, + "y": -4635.734522247106, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 921542330, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3783, + "versionNonce": 1084110731, + "isDeleted": false, + "id": "Yvddr7Umq1L32GhZFH1TO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 176.22782634605232, + "y": -4622.56505109326, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 793526758, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 314, + "versionNonce": 1227561637, + "isDeleted": false, + "id": "ie9gUcV3zGfunavl0g5D9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -32.300865930757936, + "y": -5105.988560748006, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 1079, + "height": 50, + "seed": 292855782, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Compression algorithm benefits from run length of data (the more data it sees the better for compression) \nand locality (the more similar the data is the better the compression is)", + "baseline": 43, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Compression algorithm benefits from run length of data (the more data it sees the better for compression) \nand locality (the more similar the data is the better the compression is)" + }, + { + "type": "text", + "version": 2154, + "versionNonce": 111480363, + "isDeleted": false, + "id": "mAHet1TZcuvaagMWEtn2g", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 156.5164996874937, + "y": -4270.257376751229, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 42, + "height": 20, + "seed": 981121530, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "value" + }, + { + "type": "text", + "version": 2249, + "versionNonce": 1822064133, + "isDeleted": false, + "id": "gUZl0f0606C_BG_20WgYa", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 110.94695212633592, + "y": -4206.953486095181, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 137, + "height": 20, + "seed": 1035169914, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "even larger value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "even larger value" + }, + { + "type": "text", + "version": 2133, + "versionNonce": 517476555, + "isDeleted": false, + "id": "aHnVfkGnkWjtPsMVsmOAr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 492.92585411281516, + "y": -4238.310847166858, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 110, + "height": 20, + "seed": 1800397306, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "another value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "another value" + }, + { + "type": "text", + "version": 2233, + "versionNonce": 1728476517, + "isDeleted": false, + "id": "FaGIyLxwcwM-r2j9pMHp2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 478.6214149762976, + "y": -4208.14541931701, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 145, + "height": 20, + "seed": 2107456314, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "and another value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "and another value" + }, + { + "type": "text", + "version": 3792, + "versionNonce": 1255260011, + "isDeleted": false, + "id": "3VIQjVNOQ5DFdQPt_HlPx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 546.4837160786736, + "y": -4196.306783802103, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1471763834, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3896, + "versionNonce": 1404862661, + "isDeleted": false, + "id": "R1FNA6QYXJAE2Wg6BBkmf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 546.7706478968538, + "y": -4182.526954256649, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 457987878, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3899, + "versionNonce": 886872587, + "isDeleted": false, + "id": "p7mZuEE_jy1w1NZuZEL71", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 546.7955878007014, + "y": -4169.357483102804, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1336186426, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "arrow", + "version": 2404, + "versionNonce": 1718288459, + "isDeleted": false, + "id": "anUfuQZGoFRmo_9HIl_zk", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 717.3925645716687, + "y": -4279.243374226462, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 79.49015283162282, + "height": 78.0457406876982, + "seed": 94378982, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655293778168, + "link": null, + "locked": false, + "startBinding": { + "elementId": "o6Ok6BRVTyY0YZICjpu1r", + "focus": 0.8997046848840218, + "gap": 7.717266961434234 + }, + "endBinding": { + "elementId": "r9AtQIG-zS2yFMMLF7FLH", + "focus": 0.5076896270609952, + "gap": 3.136161461857398 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 11.585310767826627, + -8.259218862988307 + ], + [ + 15.779906463149969, + 0.8433709402347214 + ], + [ + 16.66393948236995, + 25.82459982511837 + ], + [ + 17.30249991839189, + 50.97062533050765 + ], + [ + 19.11368951874503, + 69.7865218247099 + ], + [ + 32.76395546279845, + 69.2533562877799 + ], + [ + 79.49015283162282, + 64.28916667596013 + ] + ] + }, + { + "type": "arrow", + "version": 1830, + "versionNonce": 1241267685, + "isDeleted": false, + "id": "1sq5PdmMU7wreMSi402mr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 721.1531457114645, + "y": -4124.7073773528955, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 75.28175621842279, + "height": 98.60285158357827, + "seed": 955022714, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655293778168, + "link": null, + "locked": false, + "startBinding": { + "elementId": "FCCUs0_i4qLdB0Ej94E4Y", + "focus": -0.04370403929404864, + "gap": 14.266227560214958 + }, + "endBinding": { + "elementId": "r9AtQIG-zS2yFMMLF7FLH", + "focus": 0.5952944648084507, + "gap": 3.58397693526166 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 14.327458611046485, + 6.27657903854597 + ], + [ + 18.59813121582617, + -20.04021531495019 + ], + [ + 19.223914873307095, + -62.172505460118806 + ], + [ + 20.97039282122862, + -79.42577359648875 + ], + [ + 30.03673441651118, + -86.48753942210244 + ], + [ + 75.28175621842279, + -92.32627254503231 + ] + ] + }, + { + "type": "text", + "version": 514, + "versionNonce": 1254937477, + "isDeleted": false, + "id": "r9AtQIG-zS2yFMMLF7FLH", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 800.0188788651488, + "y": -4240.252487562602, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 484, + "height": 50, + "seed": 2017439526, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "anUfuQZGoFRmo_9HIl_zk", + "type": "arrow" + }, + { + "id": "1sq5PdmMU7wreMSi402mr", + "type": "arrow" + }, + { + "id": "MIYL2D5DHwTmp1HX6Oaiw", + "type": "arrow" + } + ], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Can't locally order rows with the same ch value \nby cl value, because of high cardinality of ch ", + "baseline": 43, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Can't locally order rows with the same ch value \nby cl value, because of high cardinality of ch " + }, + { + "type": "text", + "version": 1003, + "versionNonce": 868209483, + "isDeleted": false, + "id": "S9aThX9aR8pW8qWeVFqKt", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 798.7303720319195, + "y": -4132.157828770881, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 501, + "height": 75, + "seed": 1882373690, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "anUfuQZGoFRmo_9HIl_zk", + "type": "arrow" + }, + { + "id": "1sq5PdmMU7wreMSi402mr", + "type": "arrow" + }, + { + "id": "MIYL2D5DHwTmp1HX6Oaiw", + "type": "arrow" + } + ], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Bad data locality:\ncl data is in random order, \nand therefore that data will be compressed worse", + "baseline": 68, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Bad data locality:\ncl data is in random order, \nand therefore that data will be compressed worse" + }, + { + "type": "arrow", + "version": 1477, + "versionNonce": 291159787, + "isDeleted": false, + "id": "MIYL2D5DHwTmp1HX6Oaiw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1016.7432970066836, + "y": -4187.071827030952, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 0.9356510596478529, + "height": 39.412854949889606, + "seed": 1879759462, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655293778168, + "link": null, + "locked": false, + "startBinding": { + "elementId": "r9AtQIG-zS2yFMMLF7FLH", + "focus": 0.10694674091478941, + "gap": 3.180660531650574 + }, + "endBinding": { + "elementId": "S9aThX9aR8pW8qWeVFqKt", + "focus": -0.12050265110988774, + "gap": 15.50114331018176 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 0.9356510596478529, + 39.412854949889606 + ] + ] + }, + { + "type": "text", + "version": 3205, + "versionNonce": 1182234181, + "isDeleted": false, + "id": "Kc78Sf6teXO2KTKiRinns", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 4.718370583150467, + "x": -175.50485157304524, + "y": -4727.141252753443, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 214, + "height": 25, + "seed": 832145254, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "mDtk36bAZb0ES18oRT-RM", + "type": "arrow" + } + ], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "On-disk order of rows", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "On-disk order of rows" + }, + { + "type": "arrow", + "version": 1127, + "versionNonce": 588932517, + "isDeleted": false, + "id": "00AAAOP2mz9j-ETnOx4Ap", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 6.280591703300703, + "x": -23.997585556718356, + "y": -4829.970267373838, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 2.6743717068054025, + "height": 233.1456198332944, + "seed": 1254353658, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -2.6743717068054025, + 233.1456198332944 + ] + ] + }, + { + "type": "text", + "version": 3376, + "versionNonce": 6842629, + "isDeleted": false, + "id": "SNY-PfJ7f0iQJTZZjEcNx", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 4.718370583150467, + "x": -172.48684407606407, + "y": -4199.1940317516355, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 214, + "height": 25, + "seed": 779573562, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "mDtk36bAZb0ES18oRT-RM", + "type": "arrow" + } + ], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "On-disk order of rows", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "On-disk order of rows" + }, + { + "type": "arrow", + "version": 1297, + "versionNonce": 1735546315, + "isDeleted": false, + "id": "02UXtFhzFeL1YkGEvp_26", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 6.280591703300703, + "x": -20.979578059737296, + "y": -4302.02304637203, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 2.6743717068054025, + "height": 233.1456198332944, + "seed": 439447398, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -2.6743717068054025, + 233.1456198332944 + ] + ] + }, + { + "type": "text", + "version": 805, + "versionNonce": 1910203499, + "isDeleted": false, + "id": "nIC2GVfSBcWRYJ8P0ua7n", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": -67.2283376687189, + "y": -4924.215103331335, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 222, + "height": 25, + "seed": 1587856523, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Mo-vgOTPvg0K-O6wFpWvS", + "type": "arrow" + }, + { + "id": "rh-38xKn85IlMvAGLOUuV", + "type": "arrow" + }, + { + "id": "kx0Y5XeLPP8gELJRVQBS8", + "type": "arrow" + } + ], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "PRIMARY KEY (cl, ch) ", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "PRIMARY KEY (cl, ch) " + }, + { + "type": "text", + "version": 840, + "versionNonce": 927706053, + "isDeleted": false, + "id": "bLvEuzx5XMyTsh0bQ0P2-", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": -51.80236372990356, + "y": -4366.349603590697, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 222, + "height": 25, + "seed": 1104014027, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Mo-vgOTPvg0K-O6wFpWvS", + "type": "arrow" + }, + { + "id": "rh-38xKn85IlMvAGLOUuV", + "type": "arrow" + }, + { + "id": "kx0Y5XeLPP8gELJRVQBS8", + "type": "arrow" + } + ], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "PRIMARY KEY (ch, cl) ", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "PRIMARY KEY (ch, cl) " + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file diff --git a/docs/ja/guides/best-practices/images/05-Identifying_single_rows_efficiently.excalidraw b/docs/ja/guides/best-practices/images/05-Identifying_single_rows_efficiently.excalidraw new file mode 100644 index 00000000000..f2656285cc6 --- /dev/null +++ b/docs/ja/guides/best-practices/images/05-Identifying_single_rows_efficiently.excalidraw @@ -0,0 +1,9556 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://app.excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 3183, + "versionNonce": 359071435, + "isDeleted": false, + "id": "p1WxM-Qoc3hiBO5eo-2jf", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 3166.7053500934853, + "y": -4253.225960235581, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 316.050372753268, + "height": 241.50809398580586, + "seed": 784694661, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216762462, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3061, + "versionNonce": 1987930693, + "isDeleted": false, + "id": "paClRYMk-CVd1O4Ii1CMo", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 3546.8696000569953, + "y": -3810.749117838364, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 324.710529003268, + "height": 296.11179326251374, + "seed": 1786671685, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756416, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2964, + "versionNonce": 1243154571, + "isDeleted": false, + "id": "tWiuLgmsLkU6DIrA3FRP0", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 3167.133003467527, + "y": -3807.996383637967, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 324.710529003268, + "height": 296.11179326251374, + "seed": 759477547, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756416, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3039, + "versionNonce": 410871755, + "isDeleted": false, + "id": "MQsW9s8xL8qvXI6gwA3_M", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -154.50900556125794, + "y": -3118.005636936821, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 701.55115327381, + "height": 21.57025049603125, + "seed": 1484196441, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756419, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1995, + "versionNonce": 1178996325, + "isDeleted": false, + "id": "m8AOUclFzCqKasrwXU2vt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -135.91401548189265, + "y": -3116.7830426907876, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1444422583, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756419, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "6ABA4490395106E2CA07B41C80F7B8AC", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "6ABA4490395106E2CA07B41C80F7B8AC" + }, + { + "type": "rectangle", + "version": 3045, + "versionNonce": 867448427, + "isDeleted": false, + "id": "8CysppYmg170rFx8o8zB4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -154.70430195537233, + "y": -3084.804405876214, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 701.9936755952385, + "height": 18.283420138888914, + "seed": 1370904377, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756419, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3844, + "versionNonce": 1750610187, + "isDeleted": false, + "id": "btWfoMtAtMD25RyXu595z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -156.92057580676624, + "y": -3053.8176940270746, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 705.7503720238094, + "height": 18.68855406746024, + "seed": 54069273, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756419, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2107, + "versionNonce": 830288869, + "isDeleted": false, + "id": "Ioel2cvvh0rZRzBFg9NAJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -18.22496457700231, + "y": -3151.5404211630103, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45, + "height": 25, + "seed": 593039415, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "hash", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "hash" + }, + { + "type": "text", + "version": 2240, + "versionNonce": 386672875, + "isDeleted": false, + "id": "R2ojjX132toy3HDwE3xSl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 341.2359729229977, + "y": -3153.3333899130103, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 74, + "height": 25, + "seed": 648573625, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "content", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "content" + }, + { + "type": "text", + "version": 2011, + "versionNonce": 1305964357, + "isDeleted": false, + "id": "asWw-4_Ug2fhxH2_d9ZWJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 236.5094104229977, + "y": -3117.0443274130103, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 249, + "height": 20, + "seed": 1280831831, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast data", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast data" + }, + { + "type": "rectangle", + "version": 3915, + "versionNonce": 822989707, + "isDeleted": false, + "id": "92HFEivuWOU0GiX05Fm8V", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -155.38307469604956, + "y": -3021.1098301644874, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 704.6454613095239, + "height": 19.74100942460325, + "seed": 979088281, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 4041, + "versionNonce": 2126588459, + "isDeleted": false, + "id": "NzWOZMBc9drJAPtdtLohV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -154.80104344604956, + "y": -2990.0294730216306, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 706.3368675595235, + "height": 21.891121031746003, + "seed": 2075383929, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2162, + "versionNonce": 1964027083, + "isDeleted": false, + "id": "mY_9QXPQ9QndDCNHPvLCe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -136.31329429425955, + "y": -3083.9708472525467, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 745824601, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "5C61797014DF8C368A0DDE864B47ED29", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "5C61797014DF8C368A0DDE864B47ED29" + }, + { + "type": "text", + "version": 2099, + "versionNonce": 590715237, + "isDeleted": false, + "id": "R8gG4MutRqLZO1di-iUsD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -135.56062027526036, + "y": -3053.819488194116, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1283439799, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "8505ABB11F7C82F9C9F19F84E54F15FC", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "8505ABB11F7C82F9C9F19F84E54F15FC" + }, + { + "type": "text", + "version": 2135, + "versionNonce": 127327083, + "isDeleted": false, + "id": "te8Gg4XypgtupMvEYrFIo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -135.67946207947375, + "y": -3020.3579924975697, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 166776377, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "AB99DD11D859EA9FB2ECFC55B91E8274", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "AB99DD11D859EA9FB2ECFC55B91E8274" + }, + { + "type": "text", + "version": 2093, + "versionNonce": 107422917, + "isDeleted": false, + "id": "nhl58uPXqosWvIUlY5YMe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -136.95475069446115, + "y": -2987.9037024130103, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1693781463, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "3C59CCDC5962FCA4BAE40163DCFC3DAF", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3C59CCDC5962FCA4BAE40163DCFC3DAF" + }, + { + "type": "text", + "version": 2088, + "versionNonce": 1386100235, + "isDeleted": false, + "id": "is9q-tkXUtwVs8symlqe7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 236.6969104229977, + "y": -3085.4857336630103, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 257, + "height": 20, + "seed": 1527553817, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast datab", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast datab" + }, + { + "type": "text", + "version": 2176, + "versionNonce": 1443906597, + "isDeleted": false, + "id": "n6wbRr3VpcSBsxdNQ18jh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 237.6265979229977, + "y": -3052.0951086630103, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 268, + "height": 20, + "seed": 551762679, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast databa", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast databa" + }, + { + "type": "text", + "version": 2262, + "versionNonce": 86064299, + "isDeleted": false, + "id": "2uj8BxFz9WKkik2M7JHv9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 237.3805041729977, + "y": -3019.0990149130103, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 277, + "height": 20, + "seed": 1044075513, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast databas", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast databas" + }, + { + "type": "text", + "version": 2327, + "versionNonce": 1176401797, + "isDeleted": false, + "id": "W5lD4wo_aYF8FD9jzk73z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 237.6656604229977, + "y": -2987.1497961630103, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 285, + "height": 20, + "seed": 1422836759, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast database", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast database" + }, + { + "type": "rectangle", + "version": 3103, + "versionNonce": 818888421, + "isDeleted": false, + "id": "oyuMeMC0-SbmyDATSoeAz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -151.82252782105002, + "y": -2953.61538396063, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 702.7844122023815, + "height": 24.466455853174235, + "seed": 1353460023, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2142, + "versionNonce": 1978945003, + "isDeleted": false, + "id": "Trh2swDxyux7JKMxSJbiG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -135.9328879125385, + "y": -2949.4965843574537, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 2121230777, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "890D028AC1FE90659804F7D02909EB20", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "890D028AC1FE90659804F7D02909EB20" + }, + { + "type": "text", + "version": 2139, + "versionNonce": 1286609477, + "isDeleted": false, + "id": "ix8YUQUncLk7LzGleGz89", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 240.42524084177717, + "y": -2949.7578690796763, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 230, + "height": 20, + "seed": 1910499927, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on ", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on " + }, + { + "type": "rectangle", + "version": 3197, + "versionNonce": 580815269, + "isDeleted": false, + "id": "XFd01VPlmqh22umst9R6L", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -153.53402335676424, + "y": -2917.214714317773, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 704.6482514880958, + "height": 22.71422371031703, + "seed": 1967032183, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2238, + "versionNonce": 1134825259, + "isDeleted": false, + "id": "aiklupzf6rT4vtAyTULJ2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -136.14618540467586, + "y": -2914.185824000065, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1768492921, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "80F16EDFC256F2FE7AD3E80C1576F312", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "80F16EDFC256F2FE7AD3E80C1576F312" + }, + { + "type": "text", + "version": 2220, + "versionNonce": 1137184005, + "isDeleted": false, + "id": "0FPc8nd3wOlKGKC7U-8KZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 240.58149084177717, + "y": -2915.1094315796763, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 241, + "height": 20, + "seed": 151814295, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on E", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on E" + }, + { + "type": "rectangle", + "version": 3336, + "versionNonce": 1068115045, + "isDeleted": false, + "id": "XcY81vPHo7RVfA8-5Ow0E", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -151.87777335676424, + "y": -2884.2197366392015, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 704.2185639880958, + "height": 22.691902281745577, + "seed": 519984567, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2361, + "versionNonce": 46432363, + "isDeleted": false, + "id": "WaFkuRAsw-2s5YRmm8Hg1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -135.59575919400163, + "y": -2881.7631144368543, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 386155833, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "192AB9EA5BB13665876599744F2AA82B", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "192AB9EA5BB13665876599744F2AA82B" + }, + { + "type": "text", + "version": 2339, + "versionNonce": 1511149509, + "isDeleted": false, + "id": "-uehDvVOHOQc7dzrKX9D8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 241.80805334177717, + "y": -2882.0039628296763, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 251, + "height": 20, + "seed": 2117633751, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Ea", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Ea" + }, + { + "type": "rectangle", + "version": 3278, + "versionNonce": 18747173, + "isDeleted": false, + "id": "gtQWuXsry8ykoQmiIG3fO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -156.4313447853358, + "y": -2851.48257146063, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 709.2799479166672, + "height": 23.09926835317424, + "seed": 357536759, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2323, + "versionNonce": 854172075, + "isDeleted": false, + "id": "wVsdzAYGZSQbP-Sqk11-N", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -135.6933751924455, + "y": -2848.4610711891128, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1478298361, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "9D4106CE2FC6462EA4E1E57D351B6823", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "9D4106CE2FC6462EA4E1E57D351B6823" + }, + { + "type": "text", + "version": 2313, + "versionNonce": 54190725, + "isDeleted": false, + "id": "GWmICSsRM6kPtWsAAJD4P", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 242.17914709177717, + "y": -2848.9922440796763, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 258, + "height": 20, + "seed": 206044439, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Ear", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Ear" + }, + { + "type": "rectangle", + "version": 3360, + "versionNonce": 86395365, + "isDeleted": false, + "id": "C1XpWR8XvAHh39Pd5jNql", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -156.85042960676424, + "y": -2816.5517678892015, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 709.4920014880959, + "height": 21.129402281745573, + "seed": 378946103, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2426, + "versionNonce": 2124903147, + "isDeleted": false, + "id": "2U6j89Q16gt9GNxsIPpFQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -135.0701783205966, + "y": -2816.3996180055224, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1989107897, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "6A0CB5788F85BD22EF38D6981030E3E2", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "6A0CB5788F85BD22EF38D6981030E3E2" + }, + { + "type": "text", + "version": 2397, + "versionNonce": 938329413, + "isDeleted": false, + "id": "oetWI8rNlG3IK069wp6ym", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 242.10883459177717, + "y": -2816.0313065796763, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 267, + "height": 20, + "seed": 85910359, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Eart", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Eart" + }, + { + "type": "rectangle", + "version": 3431, + "versionNonce": 1324274853, + "isDeleted": false, + "id": "tX6O1DV2RYCpJQ_l_Li_N", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -153.19864389247846, + "y": -2783.894401817773, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 706.8301711309529, + "height": 23.143911210317018, + "seed": 406216823, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2473, + "versionNonce": 2073162795, + "isDeleted": false, + "id": "mp-99dhXTz2daYf4NIXpO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -133.13490381311317, + "y": -2781.0981468574537, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1966556793, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "B15A703B4C1C6664787AD94EEE4506BA", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "B15A703B4C1C6664787AD94EEE4506BA" + }, + { + "type": "text", + "version": 2498, + "versionNonce": 903280645, + "isDeleted": false, + "id": "3agSWLK-3AhTag5Z0UFwW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 243.28852209177717, + "y": -2781.2266190796763, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 275, + "height": 20, + "seed": 295778711, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Earth", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Earth" + }, + { + "type": "text", + "version": 3773, + "versionNonce": 111390565, + "isDeleted": false, + "id": "34A88GFXY9CCcG0HvZ4br", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1.2764656334127267, + "y": -2748.9709866912317, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 110358199, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3877, + "versionNonce": 1782392171, + "isDeleted": false, + "id": "LckWBoWXvnktFo_NPBTLF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1.5633974515928912, + "y": -2735.1911571457777, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1341176889, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3840, + "versionNonce": 1067612869, + "isDeleted": false, + "id": "2I5ASjeqj09-q-kv4mqOH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1.5883373554404443, + "y": -2722.021685991932, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1907556311, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3846, + "versionNonce": 1575698443, + "isDeleted": false, + "id": "aeB7to-DurtYDCmuZ8zP4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 384.9036977762696, + "y": -2749.936388476946, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1994312985, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3950, + "versionNonce": 963697189, + "isDeleted": false, + "id": "aCcNhGCLNWN8wUQkhPpj2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 385.1906295944498, + "y": -2736.156558931492, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 85126391, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3913, + "versionNonce": 1983710891, + "isDeleted": false, + "id": "WYGJ20KtITKclfAUqUDPW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 385.2155694982973, + "y": -2722.987087777646, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 999801337, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2112, + "versionNonce": 1663187557, + "isDeleted": false, + "id": "lcdSSOpTllpVoxBgKbdsU", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 6.280512587460733, + "x": 689.2592409459633, + "y": -2394.0151226080548, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 183, + "height": 50, + "seed": 962965465, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "61YnaJnTFnqbuwlctLUN-", + "type": "arrow" + } + ], + "updated": 1655216756420, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "content is stored \nin random order", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "content is stored \nin random order" + }, + { + "type": "arrow", + "version": 1226, + "versionNonce": 966654859, + "isDeleted": false, + "id": "2h_lJWmyLHbhscIs1Dbae", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 0.011736636076980389, + "x": -203.07057824917115, + "y": -3138.4867331694013, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 1.1709792313908167, + "height": 403.0957201897115, + "seed": 1911728439, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756421, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1.1709792313908167, + 403.0957201897115 + ] + ] + }, + { + "type": "text", + "version": 2984, + "versionNonce": 1723392517, + "isDeleted": false, + "id": "zBJ5VXkEChEe5uqTioovL", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 4.718370583150467, + "x": -336.8684118034191, + "y": -2988.841254411818, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 207, + "height": 25, + "seed": 737539479, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655220777443, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Insert order of rows", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Insert order of rows" + }, + { + "type": "text", + "version": 917, + "versionNonce": 1969856267, + "isDeleted": false, + "id": "22IBNBUs5wrbD6iTKNaq0", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": -211.49094710820214, + "y": -2629.8118066134275, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 216, + "height": 25, + "seed": 1521703915, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Mo-vgOTPvg0K-O6wFpWvS", + "type": "arrow" + }, + { + "id": "rh-38xKn85IlMvAGLOUuV", + "type": "arrow" + }, + { + "id": "kx0Y5XeLPP8gELJRVQBS8", + "type": "arrow" + } + ], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "PRIMARY KEY (hash) ", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "PRIMARY KEY (hash) " + }, + { + "type": "rectangle", + "version": 2832, + "versionNonce": 650898213, + "isDeleted": false, + "id": "w42EK7f0BeOrMB-8LYcH4", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 217.32240737455027, + "y": -2553.662165313527, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 316.050372753268, + "height": 480.7338169642854, + "seed": 1589199179, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2591, + "versionNonce": 1821869483, + "isDeleted": false, + "id": "KdShR-ekfP_RKuNWHL6cu", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -153.56085819537225, + "y": -2556.3803882797993, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 324.710529003268, + "height": 482.7204241071425, + "seed": 1970179301, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2763, + "versionNonce": 1858944645, + "isDeleted": false, + "id": "JLlj8GrRbNXoqYzDSwPPk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -161.8823177687857, + "y": -2512.5523252837675, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 701.55115327381, + "height": 21.57025049603125, + "seed": 1211686891, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1804, + "versionNonce": 512727115, + "isDeleted": false, + "id": "QpCrZyxXhgHrTt-OKQsKJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -143.7327535167076, + "y": -2512.0620212682898, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 473278533, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "192AB9EA5BB13665876599744F2AA82B", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "192AB9EA5BB13665876599744F2AA82B" + }, + { + "type": "rectangle", + "version": 2769, + "versionNonce": 101524965, + "isDeleted": false, + "id": "ZSgSwaSZH2wcoqQkP37MX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -162.0776141629001, + "y": -2479.3510942231596, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 701.9936755952385, + "height": 18.283420138888914, + "seed": 697019019, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3568, + "versionNonce": 153900779, + "isDeleted": false, + "id": "6pvwYbiy9U4AokPXfrn9A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -164.293888014294, + "y": -2448.3643823740213, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 705.7503720238094, + "height": 18.68855406746024, + "seed": 1178752933, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1831, + "versionNonce": 798564677, + "isDeleted": false, + "id": "iiaBqurYVCMqCB7tIyx4Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -25.598276784529617, + "y": -2546.0871095099565, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45, + "height": 25, + "seed": 2003575083, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "hash", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "hash" + }, + { + "type": "text", + "version": 1964, + "versionNonce": 184041867, + "isDeleted": false, + "id": "38r6PanY1AHwj6Z166EEh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 333.8626607154704, + "y": -2547.8800782599565, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 74, + "height": 25, + "seed": 499260165, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "content", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "content" + }, + { + "type": "text", + "version": 1736, + "versionNonce": 1892593829, + "isDeleted": false, + "id": "9BirB5svUi8JJ5rycoDzi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 229.13609821547038, + "y": -2511.5910157599565, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 251, + "height": 20, + "seed": 725926859, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Ea", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Ea" + }, + { + "type": "rectangle", + "version": 3639, + "versionNonce": 1294850091, + "isDeleted": false, + "id": "r71wIOY50jXdDxnsQORjH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -162.75638690357732, + "y": -2415.656518511433, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 704.6454613095239, + "height": 19.74100942460325, + "seed": 724726373, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3765, + "versionNonce": 1197167621, + "isDeleted": false, + "id": "ZUInZa9S8V0WFZNQPjFn2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -162.17435565357732, + "y": -2384.5761613685763, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 706.3368675595235, + "height": 21.891121031746003, + "seed": 758125163, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1925, + "versionNonce": 1840749259, + "isDeleted": false, + "id": "xhMVaw6ZOBfVDiom5rccM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -143.348727144162, + "y": -2480.08952227984, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 190897605, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "3C59CCDC5962FCA4BAE40163DCFC3DAF", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3C59CCDC5962FCA4BAE40163DCFC3DAF" + }, + { + "type": "text", + "version": 1925, + "versionNonce": 524061541, + "isDeleted": false, + "id": "HSCzbBIs7164AoqYH2Dz-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -144.80877707766308, + "y": -2448.5113654941238, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 2113441035, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "5C61797014DF8C368A0DDE864B47ED29", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "5C61797014DF8C368A0DDE864B47ED29" + }, + { + "type": "text", + "version": 1962, + "versionNonce": 1764755819, + "isDeleted": false, + "id": "78h747g3TB4TleOJFomO8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -144.39684581956158, + "y": -2416.020958625834, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1701502245, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "6A0CB5788F85BD22EF38D6981030E3E2", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "6A0CB5788F85BD22EF38D6981030E3E2" + }, + { + "type": "text", + "version": 1916, + "versionNonce": 146790085, + "isDeleted": false, + "id": "f_pWRGs7e50aY2uAs-I7m", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -145.14761881539948, + "y": -2383.3072633693705, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 555266987, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756423, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "6ABA4490395106E2CA07B41C80F7B8AC", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "6ABA4490395106E2CA07B41C80F7B8AC" + }, + { + "type": "text", + "version": 1813, + "versionNonce": 1155638283, + "isDeleted": false, + "id": "8anq89LRUwYoPz0uKhUut", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 229.32359821547038, + "y": -2480.0324220099565, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 285, + "height": 20, + "seed": 549318789, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast database", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast database" + }, + { + "type": "text", + "version": 1901, + "versionNonce": 780318245, + "isDeleted": false, + "id": "TouOAxRYQ9kokyaCXPt7l", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 230.25328571547038, + "y": -2446.6417970099565, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 257, + "height": 20, + "seed": 1186661963, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast datab", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast datab" + }, + { + "type": "text", + "version": 1987, + "versionNonce": 2026302123, + "isDeleted": false, + "id": "0E15VDn4DihFizfdk-V9L", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 230.00719196547038, + "y": -2413.6457032599565, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 267, + "height": 20, + "seed": 1528272869, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Eart", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Eart" + }, + { + "type": "text", + "version": 2052, + "versionNonce": 192063877, + "isDeleted": false, + "id": "YLFNOShw3WTpc0nClQmWV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 230.29234821547038, + "y": -2381.6964845099565, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 249, + "height": 20, + "seed": 901383403, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast data", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast data" + }, + { + "type": "rectangle", + "version": 2827, + "versionNonce": 428498251, + "isDeleted": false, + "id": "TiuOOY-2cJlom3zpPjiUR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -159.19584002857778, + "y": -2348.1620723075766, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 702.7844122023815, + "height": 24.466455853174235, + "seed": 512054085, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1913, + "versionNonce": 1624060133, + "isDeleted": false, + "id": "vZfpS0_o7sYPoXWCGNikx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -144.40247366566723, + "y": -2344.3081407419286, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1973432203, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "80F16EDFC256F2FE7AD3E80C1576F312", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "80F16EDFC256F2FE7AD3E80C1576F312" + }, + { + "type": "text", + "version": 1864, + "versionNonce": 1116109803, + "isDeleted": false, + "id": "Zd2vL-NuwafiOojeEKDo9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 233.0519286342494, + "y": -2344.3045574266225, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 241, + "height": 20, + "seed": 1466213029, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on E", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on E" + }, + { + "type": "rectangle", + "version": 2921, + "versionNonce": 1814023237, + "isDeleted": false, + "id": "wF-tQxSnYyfZxlKLK68mo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -160.907335564292, + "y": -2311.7614026647198, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 704.6482514880958, + "height": 22.71422371031703, + "seed": 950535723, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1972, + "versionNonce": 1069926027, + "isDeleted": false, + "id": "JzHFWdUOsyBawviDaMywm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -145.97871713481277, + "y": -2310.454216584111, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 174261765, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "8505ABB11F7C82F9C9F19F84E54F15FC", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "8505ABB11F7C82F9C9F19F84E54F15FC" + }, + { + "type": "text", + "version": 1945, + "versionNonce": 1564998565, + "isDeleted": false, + "id": "VvlOUahL3uHlGfxLiBkK6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 233.20817863424986, + "y": -2309.6561199266225, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 268, + "height": 20, + "seed": 96209099, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast databa", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast databa" + }, + { + "type": "rectangle", + "version": 3060, + "versionNonce": 2013445419, + "isDeleted": false, + "id": "68GMsyRvCBV5Z3QjLnBFd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -159.251085564292, + "y": -2278.7664249861473, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 704.2185639880958, + "height": 22.691902281745577, + "seed": 1249770853, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2171, + "versionNonce": 208879365, + "isDeleted": false, + "id": "in5XmgU2egtNJGkJwtuiD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -145.06702064164188, + "y": -2277.068448827981, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 578205547, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "890D028AC1FE90659804F7D02909EB20", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "890D028AC1FE90659804F7D02909EB20" + }, + { + "type": "text", + "version": 2065, + "versionNonce": 380100555, + "isDeleted": false, + "id": "DnM9L-_1Yzqr9ZgVyZ3tR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 234.43474113424986, + "y": -2276.5506511766225, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 230, + "height": 20, + "seed": 1862469829, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": " fastest OLAP database on", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": " fastest OLAP database on" + }, + { + "type": "rectangle", + "version": 3043, + "versionNonce": 1881085541, + "isDeleted": false, + "id": "3ggjxkgo6tOdCbJZbL1hs", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -163.80465699286356, + "y": -2246.0292598075766, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 709.2799479166672, + "height": 23.09926835317424, + "seed": 1025675787, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2065, + "versionNonce": 1976544875, + "isDeleted": false, + "id": "3n8kjeJRvi1yQXGvo--SL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -146.2018862598486, + "y": -2243.9840229847455, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 160409637, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "9D4106CE2FC6462EA4E1E57D351B6823", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "9D4106CE2FC6462EA4E1E57D351B6823" + }, + { + "type": "text", + "version": 2037, + "versionNonce": 1394147781, + "isDeleted": false, + "id": "cdTNNF8xl_lsLzo4nKuIv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 234.8058348842494, + "y": -2243.5389324266225, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 258, + "height": 20, + "seed": 1455036587, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Ear", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Ear" + }, + { + "type": "rectangle", + "version": 3084, + "versionNonce": 1212459275, + "isDeleted": false, + "id": "VwI7AvGDfn80xchs0bPY6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -164.223741814292, + "y": -2211.0984562361473, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 709.4920014880959, + "height": 21.129402281745573, + "seed": 470899589, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2143, + "versionNonce": 1249804581, + "isDeleted": false, + "id": "Rah-cHPbSp1Jaz1OnZBKf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -147.32005542095817, + "y": -2211.459328044157, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1827130187, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "AB99DD11D859EA9FB2ECFC55B91E8274", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "AB99DD11D859EA9FB2ECFC55B91E8274" + }, + { + "type": "text", + "version": 2122, + "versionNonce": 58806187, + "isDeleted": false, + "id": "LvJ9C8wx2igOGDZ0UP9SH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 234.7355223842494, + "y": -2210.5779949266225, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 277, + "height": 20, + "seed": 247833317, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast databas", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast databas" + }, + { + "type": "rectangle", + "version": 3155, + "versionNonce": 1807553669, + "isDeleted": false, + "id": "sd1yueVIRTgDd2dvDHr9D", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": -160.57195610000622, + "y": -2178.4410901647198, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 706.8301711309529, + "height": 23.143911210317018, + "seed": 1678125547, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2238, + "versionNonce": 162538059, + "isDeleted": false, + "id": "S8l-U7J9vHo9hbrENOhK8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -146.4391665536143, + "y": -2175.6448352044, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1715076677, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "B15A703B4C1C6664787AD94EEE4506BA", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "B15A703B4C1C6664787AD94EEE4506BA" + }, + { + "type": "text", + "version": 2222, + "versionNonce": 1116879845, + "isDeleted": false, + "id": "6QJzqJa_GR5uuzQzxIxRt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 235.91520988424986, + "y": -2175.7733074266225, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 275, + "height": 20, + "seed": 824161419, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Earth", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Earth" + }, + { + "type": "text", + "version": 3497, + "versionNonce": 330014955, + "isDeleted": false, + "id": "0im-lLcMmx5LAgSJehgT8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -6.096846574115034, + "y": -2143.517675038178, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 961277349, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3601, + "versionNonce": 118191941, + "isDeleted": false, + "id": "mLBxENMtRCpw-TytnR2Hy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -5.809914755934869, + "y": -2129.737845492724, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1139731243, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3604, + "versionNonce": 1526614923, + "isDeleted": false, + "id": "tCBhDXJrqPA7zeO1GPMWK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -5.784974852087316, + "y": -2116.568374338878, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1730736389, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3570, + "versionNonce": 327567013, + "isDeleted": false, + "id": "zMPuZKFglQxl2KHVnWK4k", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 377.53038556874185, + "y": -2144.4830768238926, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 819875275, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3674, + "versionNonce": 65184299, + "isDeleted": false, + "id": "ez4OYglVPqqXDzwuRoD-c", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 377.817317386922, + "y": -2130.7032472784385, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 223250533, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3677, + "versionNonce": 447752709, + "isDeleted": false, + "id": "89ZKbCIYnxnJVokM5EQa1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 377.84225729076957, + "y": -2117.533776124593, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 453532779, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "arrow", + "version": 964, + "versionNonce": 1195582667, + "isDeleted": false, + "id": "ajtEYVqmW42eOK1TXI_ln", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 0.011736636076980389, + "x": -196.4438904566989, + "y": -2533.0334215163475, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 1.1709792313908167, + "height": 403.0957201897115, + "seed": 1032467397, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1.1709792313908167, + 403.0957201897115 + ] + ] + }, + { + "type": "text", + "version": 3513, + "versionNonce": 613592587, + "isDeleted": false, + "id": "o4-zFy4E_jqeHJurXghwB", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 4.718370583150467, + "x": -343.0858863818887, + "y": -2383.0821152253084, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 214, + "height": 25, + "seed": 1451070981, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "mDtk36bAZb0ES18oRT-RM", + "type": "arrow" + } + ], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "On-disk order of rows", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "On-disk order of rows" + }, + { + "type": "arrow", + "version": 2683, + "versionNonce": 298235051, + "isDeleted": false, + "id": "CzddlABOhDB8TViZGAlMw", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 579.299911798428, + "y": -2506.307896419628, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 79.49015283162282, + "height": 173.95942343925103, + "seed": 934518027, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 11.585310767826627, + -18.40931918646651 + ], + [ + 15.779906463149969, + 1.8798248465053824 + ], + [ + 16.66393948236995, + 57.56153323092345 + ], + [ + 17.30249991839189, + 113.6105637117851 + ], + [ + 19.11368951874503, + 155.55010425278454 + ], + [ + 32.76395546279845, + 154.36170923487882 + ], + [ + 79.49015283162282, + 143.29681888844888 + ] + ] + }, + { + "type": "arrow", + "version": 2138, + "versionNonce": 1521254277, + "isDeleted": false, + "id": "_YN16cB6fgb-cF-eD3Lar", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 583.2725607153009, + "y": -2167.3375430023743, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 75.28175621842279, + "height": 209.8449522449944, + "seed": 78171429, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 14.327458611046485, + 13.357711338492038 + ], + [ + 18.59813121582617, + -42.64925362914658 + ], + [ + 19.223914873307095, + -132.31449425346148 + ], + [ + 20.97039282122862, + -169.03261315165378 + ], + [ + 30.03673441651118, + -184.06134597876843 + ], + [ + 75.28175621842279, + -196.48724090650234 + ] + ] + }, + { + "type": "text", + "version": 2173, + "versionNonce": 375146213, + "isDeleted": false, + "id": "qbSD73tBoatVqg-d8s6QJ", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 6.280512587460733, + "x": 680.7185861111018, + "y": -2296.3092691734532, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 204, + "height": 50, + "seed": 703995147, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "61YnaJnTFnqbuwlctLUN-", + "type": "arrow" + } + ], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "bad for compression \nof content column", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "bad for compression \nof content column" + }, + { + "type": "arrow", + "version": 129, + "versionNonce": 190587461, + "isDeleted": false, + "id": "61YnaJnTFnqbuwlctLUN-", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 776.9484906060243, + "y": -2342.9330075232388, + "strokeColor": "#15223c", + "backgroundColor": "#868e96", + "width": 1.1809934673997304, + "height": 45.030042439117096, + "seed": 529179109, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "startBinding": { + "elementId": "lcdSSOpTllpVoxBgKbdsU", + "focus": 0.048806163122091475, + "gap": 1.0718368715292854 + }, + "endBinding": { + "elementId": "qbSD73tBoatVqg-d8s6QJ", + "focus": -0.03793177709135398, + "gap": 1.6058662945174547 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "triangle", + "points": [ + [ + 0, + 0 + ], + [ + 1.1809934673997304, + 45.030042439117096 + ] + ] + }, + { + "type": "text", + "version": 2214, + "versionNonce": 1024595205, + "isDeleted": false, + "id": "zE9hHQl7luEGPddf-BMZK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1080.4105365929627, + "y": -3154.2848675407477, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 97, + "height": 25, + "seed": 1500041259, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "fingerprint", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fingerprint" + }, + { + "type": "rectangle", + "version": 3190, + "versionNonce": 309537893, + "isDeleted": false, + "id": "CFvNSB8Tii-R3R8jj0sQu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1059.1326753877074, + "y": -3119.206715790251, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 668177099, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2270, + "versionNonce": 1659893867, + "isDeleted": false, + "id": "TQz86ODTHbzzK9irhJ80f", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1228.2043151184653, + "y": -3117.3117205837234, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 519836517, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "6ABA4490395106E2CA07B41C80F7B8AC", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "6ABA4490395106E2CA07B41C80F7B8AC" + }, + { + "type": "rectangle", + "version": 3240, + "versionNonce": 2121947077, + "isDeleted": false, + "id": "rOmlZtGeNq9_e91gxLbjD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1059.4563522078788, + "y": -3085.374904372502, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.1354166666671, + "height": 18.283420138888914, + "seed": 1829568875, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2179, + "versionNonce": 2127278859, + "isDeleted": false, + "id": "658KXSO-GZ82wqvWZiHLd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1103.206304832458, + "y": -3085.0189716659743, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 2001624773, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2bb6f701", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "2bb6f701" + }, + { + "type": "rectangle", + "version": 4028, + "versionNonce": 1799690021, + "isDeleted": false, + "id": "5GygS-naBD3Kkw026f4W5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1059.3773551421991, + "y": -3054.5388621662196, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 851.5651041666665, + "height": 19.252170138888914, + "seed": 845126667, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3006, + "versionNonce": 680991147, + "isDeleted": false, + "id": "XEiLYrFiyJHQvcJpmPC44", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1103.206304832458, + "y": -3052.3235910486846, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 1509965349, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "57f2ca5b", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "57f2ca5b" + }, + { + "type": "text", + "version": 3961, + "versionNonce": 591456901, + "isDeleted": false, + "id": "GMmTa1WkiHTvF2tT8fdRx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1130.0109364425653, + "y": -2743.690899866534, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1942348459, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4065, + "versionNonce": 1568451659, + "isDeleted": false, + "id": "IgxCLZ71St0f63RD0sfwC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1130.2978682607454, + "y": -2729.91107032108, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 2113876357, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4068, + "versionNonce": 1194021349, + "isDeleted": false, + "id": "mWPorCoPHenCwnd7k_HtN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1130.322808164593, + "y": -2716.741599167234, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1240094027, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2380, + "versionNonce": 290908907, + "isDeleted": false, + "id": "e0TJ4uY5yTqmVJW_s52_A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1343.8876985148208, + "y": -3151.926767873584, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45, + "height": 25, + "seed": 1619572965, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "hash", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "hash" + }, + { + "type": "text", + "version": 2513, + "versionNonce": 68275525, + "isDeleted": false, + "id": "CayKn3uSd3hTG7GbZWdtM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1703.348636014819, + "y": -3153.719736623584, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 74, + "height": 25, + "seed": 1411871723, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "content", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "content" + }, + { + "type": "text", + "version": 2284, + "versionNonce": 1487951243, + "isDeleted": false, + "id": "Vn88uwgCgfODTdX-a3iNu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1598.6220735148208, + "y": -3117.430674123584, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 249, + "height": 20, + "seed": 2066371653, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast data", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast data" + }, + { + "type": "rectangle", + "version": 4151, + "versionNonce": 156359845, + "isDeleted": false, + "id": "piIVTIbzK0-yiVZMvCe5X", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1058.3590526814878, + "y": -3021.038587589347, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 853.2057291666666, + "height": 19.28342013888891, + "seed": 1653063307, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3113, + "versionNonce": 1388538923, + "isDeleted": false, + "id": "ZPmnXm8bnZvKDHBw-BIY9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1103.206304832458, + "y": -3018.6809487004566, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 968983461, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "57f2ca5b", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "57f2ca5b" + }, + { + "type": "rectangle", + "version": 4249, + "versionNonce": 1050214405, + "isDeleted": false, + "id": "u3p4aNoYk_I3dfTyOtO_g", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1058.3942089314878, + "y": -2988.663587589347, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 855.4440104166664, + "height": 20.138888888888903, + "seed": 1606792491, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3264, + "versionNonce": 1400549067, + "isDeleted": false, + "id": "_yKtUHTFLGEaMjJ-ynMmq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1103.206304832458, + "y": -2986.1677886632838, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 813418245, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "118785d9", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "118785d9" + }, + { + "type": "text", + "version": 2391, + "versionNonce": 971290469, + "isDeleted": false, + "id": "Z4-_m3bfavABdB1A1pJ_L", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1228.2043151184653, + "y": -3084.516611623584, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 2068568011, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "5C61797014DF8C368A0DDE864B47ED29", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "5C61797014DF8C368A0DDE864B47ED29" + }, + { + "type": "text", + "version": 2336, + "versionNonce": 1299225963, + "isDeleted": false, + "id": "ICNQU7nKoJYX5y6bTGjKw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1228.2043151184653, + "y": -3051.536142873584, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 299277925, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "8505ABB11F7C82F9C9F19F84E54F15FC", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "8505ABB11F7C82F9C9F19F84E54F15FC" + }, + { + "type": "text", + "version": 2365, + "versionNonce": 1971487429, + "isDeleted": false, + "id": "2iZcjardkjL5vVwc7FE26", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1228.2043151184653, + "y": -3019.3699168949397, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 322217579, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "AB99DD11D859EA9FB2ECFC55B91E8274", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "AB99DD11D859EA9FB2ECFC55B91E8274" + }, + { + "type": "text", + "version": 2344, + "versionNonce": 2079307787, + "isDeleted": false, + "id": "a_8AyM_XsI_Tty3ELgVDV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1228.2043151184653, + "y": -2988.290049123584, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1688177093, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "3C59CCDC5962FCA4BAE40163DCFC3DAF", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3C59CCDC5962FCA4BAE40163DCFC3DAF" + }, + { + "type": "text", + "version": 2361, + "versionNonce": 1175446053, + "isDeleted": false, + "id": "5DVVoEwHwkEdaoG1ffVxQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1598.8095735148208, + "y": -3085.872080373584, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 257, + "height": 20, + "seed": 1581949195, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast datab", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast datab" + }, + { + "type": "text", + "version": 2449, + "versionNonce": 1290960555, + "isDeleted": false, + "id": "Ak6Ggynr85K6-hvM1w7Xi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1599.7392610148208, + "y": -3052.481455373584, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 268, + "height": 20, + "seed": 2046036261, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast databa", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast databa" + }, + { + "type": "text", + "version": 2535, + "versionNonce": 276452741, + "isDeleted": false, + "id": "hLUIbvfih0EMeb7Oekwb7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1599.4931672648208, + "y": -3019.485361623584, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 277, + "height": 20, + "seed": 1443383211, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast databas", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast databas" + }, + { + "type": "text", + "version": 2600, + "versionNonce": 186872139, + "isDeleted": false, + "id": "wLPBYz_8gigbPnAaF5vDU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1599.7783235148208, + "y": -2987.536142873584, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 285, + "height": 20, + "seed": 591502469, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast database", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast database" + }, + { + "type": "text", + "version": 2238, + "versionNonce": 1073700069, + "isDeleted": false, + "id": "Ob9EgrpXMX2gErpCayDQm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1103.206304832458, + "y": -3115.512705373584, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 1620580939, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "3328afab", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3328afab" + }, + { + "type": "rectangle", + "version": 3310, + "versionNonce": 1205669867, + "isDeleted": false, + "id": "rvdnIF3hq3J9C5zBW0ukD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1063.052412056487, + "y": -2951.920257456918, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 675660773, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2390, + "versionNonce": 2083289157, + "isDeleted": false, + "id": "Dqwji45nAMFLWhhOXblw2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1228.2043151184653, + "y": -2949.8829310680276, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 987011307, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "890D028AC1FE90659804F7D02909EB20", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "890D028AC1FE90659804F7D02909EB20" + }, + { + "type": "text", + "version": 2412, + "versionNonce": 86629003, + "isDeleted": false, + "id": "Qd8EGd1UM59L_lqaJj8Cy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1602.5379039335994, + "y": -2950.14421579025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 230, + "height": 20, + "seed": 2098069317, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on ", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on " + }, + { + "type": "text", + "version": 2359, + "versionNonce": 517941157, + "isDeleted": false, + "id": "_PU8Ew-5xYuMG7kqKLtag", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1103.206304832458, + "y": -2948.35515329025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 575161227, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "cd47a305", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "cd47a305" + }, + { + "type": "rectangle", + "version": 3390, + "versionNonce": 532959531, + "isDeleted": false, + "id": "vDC-QJAOJElC2mAflUJf7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1063.204755806487, + "y": -2917.271819956918, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 938987173, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2471, + "versionNonce": 1782901509, + "isDeleted": false, + "id": "mLy-tmwHAgYi6owwC1OHp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1228.2043151184653, + "y": -2915.0963335308547, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1059953195, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "80F16EDFC256F2FE7AD3E80C1576F312", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "80F16EDFC256F2FE7AD3E80C1576F312" + }, + { + "type": "text", + "version": 2493, + "versionNonce": 2031547339, + "isDeleted": false, + "id": "VFRJLeLe8zcBrkA1VXcmQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1602.6941539335994, + "y": -2915.49577829025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 241, + "height": 20, + "seed": 1202762245, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on E", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on E" + }, + { + "type": "text", + "version": 2441, + "versionNonce": 2128298597, + "isDeleted": false, + "id": "vhXbl1FtNgG06YbGwsvMR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1103.206304832458, + "y": -2913.70671579025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 1315904715, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "cd47a305", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "cd47a305" + }, + { + "type": "rectangle", + "version": 3511, + "versionNonce": 1631339115, + "isDeleted": false, + "id": "KYpD4NpQcFprhg3QF09TO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1064.431318306487, + "y": -2884.299163706918, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 1765157221, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2590, + "versionNonce": 292531653, + "isDeleted": false, + "id": "MHvzV7Cp8XAuRHc5eaPYc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1228.2043151184653, + "y": -2882.1290248180276, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 195513195, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "192AB9EA5BB13665876599744F2AA82B", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "192AB9EA5BB13665876599744F2AA82B" + }, + { + "type": "text", + "version": 2612, + "versionNonce": 1090436363, + "isDeleted": false, + "id": "9pglgCozY6d4DaVc9RpNz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1603.9207164335994, + "y": -2882.39030954025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 251, + "height": 20, + "seed": 1574286533, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Ea", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Ea" + }, + { + "type": "text", + "version": 2559, + "versionNonce": 1629465893, + "isDeleted": false, + "id": "zlW_Fl_Bb-NnXHV4pCWF1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1103.206304832458, + "y": -2880.60124704025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 1528866315, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "cd47a305", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "cd47a305" + }, + { + "type": "rectangle", + "version": 3480, + "versionNonce": 64545707, + "isDeleted": false, + "id": "yMZnOQpPHokpJpg86BqYd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1064.939130806487, + "y": -2851.154632456918, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 1630327845, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2561, + "versionNonce": 1834532997, + "isDeleted": false, + "id": "AcpToHr0wiN-SUz7ioGhX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1228.2043151184653, + "y": -2849.1173060680276, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 869641387, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "9D4106CE2FC6462EA4E1E57D351B6823", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "9D4106CE2FC6462EA4E1E57D351B6823" + }, + { + "type": "text", + "version": 2586, + "versionNonce": 1106589259, + "isDeleted": false, + "id": "GhhxmWQDd825JG1fttqTL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1604.2918101835994, + "y": -2849.37859079025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 258, + "height": 20, + "seed": 1596524421, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Ear", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Ear" + }, + { + "type": "text", + "version": 2530, + "versionNonce": 1809344485, + "isDeleted": false, + "id": "FaObkie0n6My9wYsBY-_i", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1103.206304832458, + "y": -2847.58952829025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 1232133963, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "cd47a305", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "cd47a305" + }, + { + "type": "rectangle", + "version": 3566, + "versionNonce": 707671275, + "isDeleted": false, + "id": "aGHbDOOfxADePM3X9f9_X", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1064.732099556487, + "y": -2818.193694956918, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 1778896613, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2646, + "versionNonce": 2125210437, + "isDeleted": false, + "id": "BYP1T8CHQCLxfRPp-2XhV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1228.2043151184653, + "y": -2816.1563685680276, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1984740843, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "6A0CB5788F85BD22EF38D6981030E3E2", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "6A0CB5788F85BD22EF38D6981030E3E2" + }, + { + "type": "text", + "version": 2670, + "versionNonce": 739139467, + "isDeleted": false, + "id": "ktPKuhPR8o2SrsGoHAQod", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1604.2214976835994, + "y": -2816.41765329025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 267, + "height": 20, + "seed": 1884727877, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Eart", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Eart" + }, + { + "type": "text", + "version": 2617, + "versionNonce": 707883685, + "isDeleted": false, + "id": "m14jWpBDhHMI41l861_06", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1103.206304832458, + "y": -2814.62859079025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 1702086795, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756424, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "18dd7c7d", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "18dd7c7d" + }, + { + "type": "rectangle", + "version": 3678, + "versionNonce": 1641035307, + "isDeleted": false, + "id": "Jaz9akBQ5drADFj_h5k3U", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1065.911787056487, + "y": -2783.521819956918, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 854792613, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2748, + "versionNonce": 185980421, + "isDeleted": false, + "id": "d25jgMfaMO9yM2ysSd-3l", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1228.2043151184653, + "y": -2781.3463335308547, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 2090893099, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "B15A703B4C1C6664787AD94EEE4506BA", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "B15A703B4C1C6664787AD94EEE4506BA" + }, + { + "type": "text", + "version": 2771, + "versionNonce": 979253451, + "isDeleted": false, + "id": "5GMFJXb8da4Ea4qUByEcR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1605.4011851835994, + "y": -2781.61296579025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 275, + "height": 20, + "seed": 2064293125, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Earth", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Earth" + }, + { + "type": "text", + "version": 2717, + "versionNonce": 1280757093, + "isDeleted": false, + "id": "LI93PM8ubJnA1v8jp9LSS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1103.206304832458, + "y": -2779.82390329025, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 104686027, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "863461a7", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "863461a7" + }, + { + "type": "text", + "version": 4046, + "versionNonce": 1666377579, + "isDeleted": false, + "id": "UJEWdghA0qA2_86ZnIMPQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1363.3891287252354, + "y": -2749.3573334018056, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 270185573, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4150, + "versionNonce": 1564596421, + "isDeleted": false, + "id": "dRbJGcMj4YIPXgdj_uRo0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1363.6760605434156, + "y": -2735.5775038563515, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 459599979, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4153, + "versionNonce": 1928905227, + "isDeleted": false, + "id": "Jj9zqbedemJypWYiDMevx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1363.7010004472631, + "y": -2722.408032702506, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1844502469, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4119, + "versionNonce": 1735686181, + "isDeleted": false, + "id": "naWsTnXqPGvf7IIiVnVR4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1747.0163608680896, + "y": -2750.3227351875194, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1306635019, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4223, + "versionNonce": 1380599979, + "isDeleted": false, + "id": "VOnuKyleBI4xXqwYvq-qk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1747.3032926862697, + "y": -2736.5429056420653, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 984260389, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4226, + "versionNonce": 81537925, + "isDeleted": false, + "id": "cxpIRZSCs2xEWHQWjtfGj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1747.3282325901173, + "y": -2723.3734344882196, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 305009067, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "arrow", + "version": 1394, + "versionNonce": 1727134539, + "isDeleted": false, + "id": "FggqNXx6tTOZHDsxNo4p9", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 0.011736636076980389, + "x": 1017.1145488201892, + "y": -3121.117948431154, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 1.1709792313908167, + "height": 403.0957201897115, + "seed": 2092266117, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1.1709792313908167, + 403.0957201897115 + ] + ] + }, + { + "type": "text", + "version": 3148, + "versionNonce": 920609797, + "isDeleted": false, + "id": "2SXnjF-uLZt9FtMrYnMdh", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 4.718370583150467, + "x": 877.2096688972838, + "y": -2982.014312787203, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 207, + "height": 25, + "seed": 56518469, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655220782246, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Insert order of rows", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Insert order of rows" + }, + { + "type": "rectangle", + "version": 3171, + "versionNonce": 2102024683, + "isDeleted": false, + "id": "cs-7A9DnBR90lUlF_z21A", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1600.3603849388564, + "y": -2556.777389227287, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 316.050372753268, + "height": 480.7338169642854, + "seed": 211623333, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2319, + "versionNonce": 378588741, + "isDeleted": false, + "id": "ZMNIRHHI2PhPIJpCIrWnc", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1080.1079847058572, + "y": -2557.53886771191, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 123.92578124999996, + "height": 480.4825148809527, + "seed": 1837677355, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2004, + "versionNonce": 1918755979, + "isDeleted": false, + "id": "XIiuUmm-61NzditdX3YI1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1093.9625388579207, + "y": -2551.56043309088, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 97, + "height": 25, + "seed": 416555269, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "fingerprint", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fingerprint" + }, + { + "type": "rectangle", + "version": 2912, + "versionNonce": 1447607717, + "isDeleted": false, + "id": "XcOAsEwJjgTAGEzhnEQxX", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1229.4771193689367, + "y": -2559.6926252875837, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 324.710529003268, + "height": 482.7204241071425, + "seed": 649993675, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2980, + "versionNonce": 501685035, + "isDeleted": false, + "id": "SBR25gx8jWVi0yq3Xh6O5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1072.6846776526654, + "y": -2516.4822813403835, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 1108588645, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2061, + "versionNonce": 1812709637, + "isDeleted": false, + "id": "I7040dqTZ0Vndh5VnamBS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1241.8986851547788, + "y": -2514.444954951493, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1684941931, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "3C59CCDC5962FCA4BAE40163DCFC3DAF", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3C59CCDC5962FCA4BAE40163DCFC3DAF" + }, + { + "type": "rectangle", + "version": 3030, + "versionNonce": 2085649867, + "isDeleted": false, + "id": "r6WlOIc2znxgBiy86jVyA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1073.0083544728368, + "y": -2482.6504699226343, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.1354166666671, + "height": 18.283420138888914, + "seed": 36266949, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1992, + "versionNonce": 223828069, + "isDeleted": false, + "id": "N_SEJs8MeFCsyR0gPl1z1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1106.5056730020015, + "y": -2482.152206033744, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 442722059, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "18dd7c7d", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "18dd7c7d" + }, + { + "type": "rectangle", + "version": 3818, + "versionNonce": 414485611, + "isDeleted": false, + "id": "yx4cpT8hVGr2KdPtb10o2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1072.929357407157, + "y": -2451.814427716352, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 851.5651041666665, + "height": 19.252170138888914, + "seed": 1026728741, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2819, + "versionNonce": 1677263813, + "isDeleted": false, + "id": "QfD2vFCeYTKY3vH70DABZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1106.5056730020015, + "y": -2449.4567888274614, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 1595428267, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "2bb6f701", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "2bb6f701" + }, + { + "type": "text", + "version": 3751, + "versionNonce": 920504075, + "isDeleted": false, + "id": "uHUECWkNLl5cB8LZPB2dy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1143.5629387075232, + "y": -2140.966465416666, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 2006775429, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3855, + "versionNonce": 68043557, + "isDeleted": false, + "id": "tg__PH_vVPuJ5HB-2_B1X", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1143.8498705257034, + "y": -2127.186635871212, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 364339275, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3858, + "versionNonce": 1028042155, + "isDeleted": false, + "id": "foHDXehdypmmzTKYti--r", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1143.874810429551, + "y": -2114.017164717366, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1277550053, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2170, + "versionNonce": 570726021, + "isDeleted": false, + "id": "SSvLfCiy8xV4IENLMPHeB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1357.4397007797788, + "y": -2549.2023334237165, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 45, + "height": 25, + "seed": 1478172395, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "hash", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "hash" + }, + { + "type": "text", + "version": 2303, + "versionNonce": 1595523147, + "isDeleted": false, + "id": "GURelP14oOUMYX3lOXa3_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1716.900638279776, + "y": -2550.9953021737165, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 74, + "height": 25, + "seed": 567990597, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "content", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "content" + }, + { + "type": "text", + "version": 2075, + "versionNonce": 144276965, + "isDeleted": false, + "id": "4e7TW-vPLWZFiXFj8eotN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1612.174075779776, + "y": -2514.7062396737165, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 285, + "height": 20, + "seed": 550373771, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast database", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast database" + }, + { + "type": "rectangle", + "version": 3941, + "versionNonce": 103907051, + "isDeleted": false, + "id": "UIGEcB_CIuX4WhiVXVDbc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1071.9110549464458, + "y": -2418.3141531394795, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 853.2057291666666, + "height": 19.28342013888891, + "seed": 572090533, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2926, + "versionNonce": 1322940741, + "isDeleted": false, + "id": "TYeoeoxYERLcL2TgxgzVb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1106.5056730020015, + "y": -2415.956514250589, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 889888811, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "3328afab", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "3328afab" + }, + { + "type": "rectangle", + "version": 4039, + "versionNonce": 2098751883, + "isDeleted": false, + "id": "AaYO3_wRGBCBy05XW_WcT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1071.9462111964458, + "y": -2385.9391531394795, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 855.4440104166664, + "height": 20.138888888888903, + "seed": 1854868485, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3077, + "versionNonce": 1311049893, + "isDeleted": false, + "id": "-gPTxkSoRh-xP1h-kZTq3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1106.5056730020015, + "y": -2383.581514250589, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 1320903371, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "57f2ca5b", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "57f2ca5b" + }, + { + "type": "text", + "version": 2181, + "versionNonce": 1493762091, + "isDeleted": false, + "id": "vaSMbBP2UqbNGMkvGUP9i", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1241.8986851547788, + "y": -2481.7921771737165, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 389628773, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "6A0CB5788F85BD22EF38D6981030E3E2", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "6A0CB5788F85BD22EF38D6981030E3E2" + }, + { + "type": "text", + "version": 2125, + "versionNonce": 1478929413, + "isDeleted": false, + "id": "mzLMk3hrw02k_22zqPwzh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1241.8986851547788, + "y": -2448.8117084237165, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 108712299, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "5C61797014DF8C368A0DDE864B47ED29", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "5C61797014DF8C368A0DDE864B47ED29" + }, + { + "type": "text", + "version": 2153, + "versionNonce": 602784459, + "isDeleted": false, + "id": "ThnFZelW7BdLRSn7A8SNF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1241.8986851547788, + "y": -2416.5031146737165, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1348832965, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "6ABA4490395106E2CA07B41C80F7B8AC", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "6ABA4490395106E2CA07B41C80F7B8AC" + }, + { + "type": "text", + "version": 2133, + "versionNonce": 752673637, + "isDeleted": false, + "id": "SX64nWN7D66InkhVzej8m", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1241.8986851547788, + "y": -2385.5656146737165, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 2106813451, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "8505ABB11F7C82F9C9F19F84E54F15FC", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "8505ABB11F7C82F9C9F19F84E54F15FC" + }, + { + "type": "text", + "version": 2152, + "versionNonce": 1180774763, + "isDeleted": false, + "id": "qv3HxGA6VQtsykg4_HuLP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1612.361575779776, + "y": -2483.1476459237165, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 267, + "height": 20, + "seed": 1756458533, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Eart", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Eart" + }, + { + "type": "text", + "version": 2240, + "versionNonce": 815083205, + "isDeleted": false, + "id": "ZTRSyV96X4d_zq4l6em6c", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1613.291263279776, + "y": -2449.7570209237165, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 265, + "height": 20, + "seed": 1207939755, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast datab ", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast datab " + }, + { + "type": "text", + "version": 2326, + "versionNonce": 833473547, + "isDeleted": false, + "id": "n26vDr6kFrObRcl3y62Qf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1613.045169529776, + "y": -2416.7609271737165, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 249, + "height": 20, + "seed": 2131386757, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast data", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast data" + }, + { + "type": "text", + "version": 2391, + "versionNonce": 1642925605, + "isDeleted": false, + "id": "W5n5NwSo3qMHtNjCFcCPG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1613.330325779776, + "y": -2384.8117084237165, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 268, + "height": 20, + "seed": 376055115, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast databa", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast databa" + }, + { + "type": "text", + "version": 2053, + "versionNonce": 1238241963, + "isDeleted": false, + "id": "l4GMlq1nUD6JdgRADh8bQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1106.5056730020015, + "y": -2512.9852840177414, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 2024663269, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "118785d9", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "118785d9" + }, + { + "type": "rectangle", + "version": 3100, + "versionNonce": 265421189, + "isDeleted": false, + "id": "7ESgbFufVAwPyTdg3ck3b", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1076.604414321445, + "y": -2349.19582300705, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 539837419, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2180, + "versionNonce": 258770251, + "isDeleted": false, + "id": "Azc3Mjcjeo6ak6O1nCLmH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1241.898685154778, + "y": -2347.1584966181595, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 925467717, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "AB99DD11D859EA9FB2ECFC55B91E8274", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "AB99DD11D859EA9FB2ECFC55B91E8274" + }, + { + "type": "text", + "version": 2204, + "versionNonce": 1333889253, + "isDeleted": false, + "id": "CeribvcC7eozU7TRuIIgD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1615.8911695720117, + "y": -2347.419781340382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 277, + "height": 20, + "seed": 1297321611, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "ClickHouse is a very fast databas", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse is a very fast databas" + }, + { + "type": "text", + "version": 2173, + "versionNonce": 165913579, + "isDeleted": false, + "id": "yIW3bhE3CZjiX1KhTbvAW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1106.5056730020015, + "y": -2345.630718840382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 240825253, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "57f2ca5b", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "57f2ca5b" + }, + { + "type": "rectangle", + "version": 3180, + "versionNonce": 847848517, + "isDeleted": false, + "id": "Rz2QFLoi_SQ5TYU5Vcj_v", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1076.756758071445, + "y": -2314.54738550705, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 546800939, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2260, + "versionNonce": 1899884171, + "isDeleted": false, + "id": "TPxPr0hYyp0t1yVUisQTW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1241.898685154778, + "y": -2312.5100591181595, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 2054092549, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756425, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "B15A703B4C1C6664787AD94EEE4506BA", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "B15A703B4C1C6664787AD94EEE4506BA" + }, + { + "type": "text", + "version": 2284, + "versionNonce": 1019630501, + "isDeleted": false, + "id": "L-BNuWh_TloUbzraY-NC3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1616.2461561985547, + "y": -2312.771343840382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 275, + "height": 20, + "seed": 1633920971, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Earth", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Earth" + }, + { + "type": "text", + "version": 2255, + "versionNonce": 406185259, + "isDeleted": false, + "id": "1HnQEmDnaHkljgWE0JSuv", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1106.5056730020015, + "y": -2310.982281340382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 367251045, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "863461a7", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "863461a7" + }, + { + "type": "rectangle", + "version": 3301, + "versionNonce": 442930949, + "isDeleted": false, + "id": "buFcLgpz7ewIeLbBb1Lr3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1077.983320571445, + "y": -2281.57472925705, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 97678955, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2380, + "versionNonce": 372639691, + "isDeleted": false, + "id": "0RE1Jbpg_vMl6EibPBkAX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1241.898685154778, + "y": -2279.4045903681595, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1334229445, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "192AB9EA5BB13665876599744F2AA82B", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "192AB9EA5BB13665876599744F2AA82B" + }, + { + "type": "text", + "version": 2402, + "versionNonce": 367488613, + "isDeleted": false, + "id": "tsllb0cWUKQQGbQPMqwF0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1617.4727186985547, + "y": -2279.665875090382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 251, + "height": 20, + "seed": 1554936075, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Ea", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Ea" + }, + { + "type": "text", + "version": 2372, + "versionNonce": 827905643, + "isDeleted": false, + "id": "4jfvtxNQGA09cy6dFaXUe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1106.5056730020015, + "y": -2277.876812590382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 1618295077, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "cd47a305", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "cd47a305" + }, + { + "type": "rectangle", + "version": 3270, + "versionNonce": 1310087621, + "isDeleted": false, + "id": "3v0Rr2tn8Sn7dFDPdLp0B", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1078.491133071445, + "y": -2248.43019800705, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 2003965867, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2351, + "versionNonce": 141086987, + "isDeleted": false, + "id": "xlCFLqVWt6eKKnphi6qDw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1241.898685154778, + "y": -2246.3928716181595, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 35441797, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "80F16EDFC256F2FE7AD3E80C1576F312", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "80F16EDFC256F2FE7AD3E80C1576F312" + }, + { + "type": "text", + "version": 2377, + "versionNonce": 739301669, + "isDeleted": false, + "id": "PpP6W-DDGzjwlHI4z_XV-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1617.8438124485547, + "y": -2246.654156340382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 241, + "height": 20, + "seed": 1413999179, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on E", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on E" + }, + { + "type": "text", + "version": 2343, + "versionNonce": 2095085483, + "isDeleted": false, + "id": "mBWyoxQkH5NKPtXvREJxK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1106.5056730020015, + "y": -2244.865093840382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 1681585125, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "cd47a305", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "cd47a305" + }, + { + "type": "rectangle", + "version": 3356, + "versionNonce": 423914629, + "isDeleted": false, + "id": "DyC6DbR7jBZipIzPpkjm4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1078.284101821445, + "y": -2215.46926050705, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 1208641771, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2436, + "versionNonce": 1558858315, + "isDeleted": false, + "id": "HhwfOxhsnyrbUoMifhQLj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1241.898685154778, + "y": -2213.4319341181595, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 1658662725, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "890D028AC1FE90659804F7D02909EB20", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "890D028AC1FE90659804F7D02909EB20" + }, + { + "type": "text", + "version": 2461, + "versionNonce": 1970181093, + "isDeleted": false, + "id": "GZ1PxH32TYCHCyWHRaE8l", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1617.7734999485547, + "y": -2213.693218840382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 222, + "height": 20, + "seed": 675550091, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on" + }, + { + "type": "text", + "version": 2430, + "versionNonce": 1298188523, + "isDeleted": false, + "id": "z4lyJRB_LYgIr3YOBTYD3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1106.5056730020015, + "y": -2211.904156340382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 2086731429, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "cd47a305", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "cd47a305" + }, + { + "type": "rectangle", + "version": 3457, + "versionNonce": 1285345093, + "isDeleted": false, + "id": "EJE8q-EeutM9aRtA4aBRV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1079.463789321445, + "y": -2180.79738550705, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 850.0221354166672, + "height": 22.384982638888463, + "seed": 892299819, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2537, + "versionNonce": 1942909835, + "isDeleted": false, + "id": "I5rfO39QfMpVSmJAozcRO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1241.898685154778, + "y": -2178.7600591181595, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 301, + "height": 20, + "seed": 125035013, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "9D4106CE2FC6462EA4E1E57D351B6823", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "9D4106CE2FC6462EA4E1E57D351B6823" + }, + { + "type": "text", + "version": 2562, + "versionNonce": 1294769829, + "isDeleted": false, + "id": "8HzZOdUgoT2PLGxvdByTC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1618.9531874485547, + "y": -2178.888531340382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 266, + "height": 20, + "seed": 1136061643, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "fastest OLAP database on Ear ", + "baseline": 14, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "fastest OLAP database on Ear " + }, + { + "type": "text", + "version": 2531, + "versionNonce": 1617807915, + "isDeleted": false, + "id": "3Fygermvv_cPRNw6bHjBT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1106.5056730020015, + "y": -2177.099468840382, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 76, + "height": 20, + "seed": 689133925, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "cd47a305", + "baseline": 16, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "cd47a305" + }, + { + "type": "text", + "version": 3836, + "versionNonce": 2110489093, + "isDeleted": false, + "id": "MYHf44qUxLlQPvrtLnqsA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1376.9411309901934, + "y": -2146.6328989519375, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 661986155, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3940, + "versionNonce": 942230731, + "isDeleted": false, + "id": "9A6--91M-MxZbzevtkcsj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1377.2280628083736, + "y": -2132.8530694064834, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 177005765, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3943, + "versionNonce": 863435109, + "isDeleted": false, + "id": "fq-GUbC5lAvrZD5sRPzsk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1377.2530027122211, + "y": -2119.6835982526377, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1555330571, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3909, + "versionNonce": 513506155, + "isDeleted": false, + "id": "CG8JNZxXXpIPDFhE_fFNz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1760.5683631330467, + "y": -2147.5983007376517, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1333658661, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4013, + "versionNonce": 1199342789, + "isDeleted": false, + "id": "OfHlKzy5ypA4iKK5oAORu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1760.8552949512268, + "y": -2133.8184711921976, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1919909035, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4016, + "versionNonce": 1611585035, + "isDeleted": false, + "id": "1GwOVXkrbl34dhHvTwe3I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1760.8802348550744, + "y": -2120.649000038352, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1272199045, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "arrow", + "version": 1184, + "versionNonce": 747835211, + "isDeleted": false, + "id": "hLbMOnJ8wA8gbnwN6SyHZ", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 0.011736636076980389, + "x": 1030.6665510851471, + "y": -2518.3935139812866, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 1.1709792313908167, + "height": 403.0957201897115, + "seed": 804641349, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1.1709792313908167, + 403.0957201897115 + ] + ] + }, + { + "type": "text", + "version": 3626, + "versionNonce": 363392491, + "isDeleted": false, + "id": "UXXtOG9DpEI8-U9p6lBNf", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 4.718370583150467, + "x": 886.6210693069197, + "y": -2348.737919145162, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 214, + "height": 25, + "seed": 1145330187, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "mDtk36bAZb0ES18oRT-RM", + "type": "arrow" + } + ], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "On-disk order of rows", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "On-disk order of rows" + }, + { + "type": "text", + "version": 2245, + "versionNonce": 994405835, + "isDeleted": false, + "id": "nn-lgBCpaIsETWvX7_ubF", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 6.280512587460733, + "x": 2038.7288147339104, + "y": -2394.4160930605126, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 252, + "height": 50, + "seed": 2129653963, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "aPsf6_lhligZN5UjoNMUq", + "type": "arrow" + } + ], + "updated": 1655228267172, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "similar content is stored \nclose to each other", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "similar content is stored \nclose to each other" + }, + { + "type": "arrow", + "version": 2794, + "versionNonce": 917548843, + "isDeleted": false, + "id": "nwotZcDtqdhjFmyZiRrSd", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1963.7788323688446, + "y": -2506.2309720467974, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 79.49015283162282, + "height": 173.95942343925103, + "seed": 484218213, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 11.585310767826627, + -18.40931918646651 + ], + [ + 15.779906463149969, + 1.8798248465053824 + ], + [ + 16.66393948236995, + 57.56153323092345 + ], + [ + 17.30249991839189, + 113.6105637117851 + ], + [ + 19.11368951874503, + 155.55010425278454 + ], + [ + 32.76395546279845, + 154.36170923487882 + ], + [ + 79.49015283162282, + 143.29681888844888 + ] + ] + }, + { + "type": "arrow", + "version": 2249, + "versionNonce": 1297444101, + "isDeleted": false, + "id": "CYEG1rZpw33wJZ2cC3B6R", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 1967.751481285718, + "y": -2167.2606186295434, + "strokeColor": "#15223c", + "backgroundColor": "transparent", + "width": 75.28175621842279, + "height": 209.8449522449944, + "seed": 485334891, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 14.327458611046485, + 13.357711338492038 + ], + [ + 18.59813121582617, + -42.64925362914658 + ], + [ + 19.223914873307095, + -132.31449425346148 + ], + [ + 20.97039282122862, + -169.03261315165378 + ], + [ + 30.03673441651118, + -184.06134597876843 + ], + [ + 75.28175621842279, + -196.48724090650234 + ] + ] + }, + { + "type": "text", + "version": 2286, + "versionNonce": 1858572747, + "isDeleted": false, + "id": "rwFR0EjSH9E76bSP0Kfaq", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 6.280512587460733, + "x": 2036.1975066815185, + "y": -2296.232344800622, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 262, + "height": 50, + "seed": 701407429, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "aPsf6_lhligZN5UjoNMUq", + "type": "arrow" + } + ], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "very good for compression \nof content column!", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "very good for compression \nof content column!" + }, + { + "type": "arrow", + "version": 511, + "versionNonce": 193690731, + "isDeleted": false, + "id": "aPsf6_lhligZN5UjoNMUq", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2158.485991356077, + "y": -2343.3274777106535, + "strokeColor": "#15223c", + "backgroundColor": "#868e96", + "width": 2.3327224224058227, + "height": 45.50622035281913, + "seed": 410810891, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655228267173, + "link": null, + "locked": false, + "startBinding": { + "elementId": "nn-lgBCpaIsETWvX7_ubF", + "focus": 0.059865761350412605, + "gap": 1.071836871528376 + }, + "endBinding": { + "elementId": "rwFR0EjSH9E76bSP0Kfaq", + "focus": -0.03793177709135198, + "gap": 1.605866294518819 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "triangle", + "points": [ + [ + 0, + 0 + ], + [ + 2.3327224224058227, + 45.50622035281913 + ] + ] + }, + { + "type": "text", + "version": 1003, + "versionNonce": 1395204203, + "isDeleted": false, + "id": "MZk4m-pedbhAdY_Co7VYz", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 1016.0866577275192, + "y": -2618.8800827169925, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 328, + "height": 25, + "seed": 1760519915, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Mo-vgOTPvg0K-O6wFpWvS", + "type": "arrow" + }, + { + "id": "rh-38xKn85IlMvAGLOUuV", + "type": "arrow" + }, + { + "id": "kx0Y5XeLPP8gELJRVQBS8", + "type": "arrow" + } + ], + "updated": 1655216756426, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "PRIMARY KEY (fingerprint, hash) ", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "PRIMARY KEY (fingerprint, hash) " + }, + { + "type": "rectangle", + "version": 3047, + "versionNonce": 1473171493, + "isDeleted": false, + "id": "DIWj18WjJ-lmBFysLqRrO", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2803.980531649605, + "y": -4252.547768976054, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 316.050372753268, + "height": 241.50809398580586, + "seed": 915874117, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2765, + "versionNonce": 1835102379, + "isDeleted": false, + "id": "Fom-vC3182nzSwkFFkKNs", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2433.1580579336414, + "y": -4255.265991942324, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 324.710529003268, + "height": 239.25119804797578, + "seed": 2061123979, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3422, + "versionNonce": 673940357, + "isDeleted": false, + "id": "EQTUoYwNwHxClmXWg4Fjk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2424.754557287595, + "y": -4208.919428995535, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 1068.2330070953583, + "height": 19.051750545273826, + "seed": 1745662117, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2990, + "versionNonce": 1692672843, + "isDeleted": false, + "id": "ZG16-HFXnQejdegFgeVTJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2424.733183229365, + "y": -4179.906530684606, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 1070.7482094771276, + "height": 19.953252937808696, + "seed": 1892669483, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3767, + "versionNonce": 1700448997, + "isDeleted": false, + "id": "voXBNvXF_q7ST3xgEK9Al", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2422.516909377971, + "y": -4148.686376461232, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 1073.5800802604406, + "height": 20.124944492145907, + "seed": 651777029, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756426, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3694, + "versionNonce": 2146051653, + "isDeleted": false, + "id": "II3NrBBIAn0wXhM3pj1Os", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2593.6059569801632, + "y": -4132.188274932398, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1593477989, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3798, + "versionNonce": 1743129739, + "isDeleted": false, + "id": "CvXhSR11WT_xyM0CyOugX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2593.8928887983434, + "y": -4118.408445386944, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 206702955, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3801, + "versionNonce": 2058818981, + "isDeleted": false, + "id": "7AWIWUHWa5OKZdvLTZ5jp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2593.917828702191, + "y": -4105.238974233098, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 549312197, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2178, + "versionNonce": 2769707, + "isDeleted": false, + "id": "iMs1mGIDuEALlrFKV1neV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2539.913357494175, + "y": -4179.280465143762, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 96, + "height": 20, + "seed": 868459531, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "larger value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "larger value" + }, + { + "type": "text", + "version": 2373, + "versionNonce": 552540421, + "isDeleted": false, + "id": "20OE-TjWFLvbKWeXG9utN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2573.9514048565397, + "y": -4247.556757632726, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 39, + "height": 25, + "seed": 381728293, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "uuid", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "uuid" + }, + { + "type": "text", + "version": 2072, + "versionNonce": 2079237579, + "isDeleted": false, + "id": "IRtQZLg9YdVRQCN_qiMPG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2918.5913231655086, + "y": -4209.379651756777, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 87, + "height": 20, + "seed": 996731563, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "some value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "some value" + }, + { + "type": "text", + "version": 2183, + "versionNonce": 2081402981, + "isDeleted": false, + "id": "TF51Wp7Mi52qSpDrSwEI8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2569.813159056327, + "y": -4210.1691984324925, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 42, + "height": 20, + "seed": 1005627781, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "value" + }, + { + "type": "text", + "version": 2278, + "versionNonce": 1380824171, + "isDeleted": false, + "id": "SlC3bHAxWSaZUC3yJ9nY0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2524.2436114951693, + "y": -4146.865307776445, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 137, + "height": 20, + "seed": 938237259, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "even larger value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "even larger value" + }, + { + "type": "text", + "version": 2162, + "versionNonce": 166091717, + "isDeleted": false, + "id": "uK1AAnKdL7t4njBwjtyd0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2906.2225134816485, + "y": -4178.222668848122, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 110, + "height": 20, + "seed": 1368076517, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "another value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "another value" + }, + { + "type": "text", + "version": 2262, + "versionNonce": 856813323, + "isDeleted": false, + "id": "Zc3Ndh3N0TX3gHRx67nCk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2891.918074345131, + "y": -4148.057240998274, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 145, + "height": 20, + "seed": 1151892459, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "and another value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "and another value" + }, + { + "type": "text", + "version": 3821, + "versionNonce": 848337701, + "isDeleted": false, + "id": "Qnwq34wBA_Yn5GHGoCXNF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2959.780375447507, + "y": -4136.218605483367, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 354274373, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3925, + "versionNonce": 1890964907, + "isDeleted": false, + "id": "q8v2Oiu-YxvFgz8X4eoB5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2960.0673072656873, + "y": -4122.438775937913, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 765970059, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3928, + "versionNonce": 2122051205, + "isDeleted": false, + "id": "DT6wW4iW2ljcbSTKX1Nj_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2960.092247169535, + "y": -4109.269304784068, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 914750373, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3406, + "versionNonce": 1555783845, + "isDeleted": false, + "id": "ZFl1VMpSUuoQqj1fKGVJa", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 4.718370583150467, + "x": 2240.8098152927696, + "y": -4139.1058534328995, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 214, + "height": 25, + "seed": 219611589, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "mDtk36bAZb0ES18oRT-RM", + "type": "arrow" + } + ], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "On-disk order of rows", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "On-disk order of rows" + }, + { + "type": "arrow", + "version": 1326, + "versionNonce": 1738811435, + "isDeleted": false, + "id": "b29q_TTX5bQlG1lF04j0n", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 6.280591703300703, + "x": 2392.317081309096, + "y": -4241.934868053294, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 2.6743717068054025, + "height": 233.1456198332944, + "seed": 891726091, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -2.6743717068054025, + 233.1456198332944 + ] + ] + }, + { + "type": "text", + "version": 883, + "versionNonce": 1915880453, + "isDeleted": false, + "id": "kbEK8cwAkj88852ooyWMU", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2361.49429563893, + "y": -4306.261425271961, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 242, + "height": 25, + "seed": 347898149, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Mo-vgOTPvg0K-O6wFpWvS", + "type": "arrow" + }, + { + "id": "rh-38xKn85IlMvAGLOUuV", + "type": "arrow" + }, + { + "id": "kx0Y5XeLPP8gELJRVQBS8", + "type": "arrow" + } + ], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "PRIMARY KEY (uuid, ...) ", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "PRIMARY KEY (uuid, ...) " + }, + { + "type": "text", + "version": 2548, + "versionNonce": 2104580485, + "isDeleted": false, + "id": "unjQPjdlqcvQ-7t6JJehi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2909.5340805161545, + "y": -4249.466907755409, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 116, + "height": 25, + "seed": 157509989, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "some column", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "some column" + }, + { + "type": "rectangle", + "version": 3122, + "versionNonce": 1343139147, + "isDeleted": false, + "id": "7DGwFwHn--T_YN-lORdBr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2799.0735512437077, + "y": -3809.928161069573, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 316.050372753268, + "height": 299.2631095638441, + "seed": 2010639077, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "z0ua18VXNGMa8I6OgumX6", + "type": "arrow" + } + ], + "updated": 1655216756427, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 2858, + "versionNonce": 2138431717, + "isDeleted": false, + "id": "RE5dIgHaPRIU8XX9FeokO", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2428.341884947379, + "y": -3812.646384035845, + "strokeColor": "#15223c", + "backgroundColor": "#ced4da", + "width": 324.710529003268, + "height": 301.1095767910746, + "seed": 35414507, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3240, + "versionNonce": 1140902891, + "isDeleted": false, + "id": "lOB5i5mUyRYPhxT8uKZET", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2419.868826100372, + "y": -3765.2352775872528, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 1455.890015988075, + "height": 17.817000343718874, + "seed": 96683589, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2111, + "versionNonce": 305298501, + "isDeleted": false, + "id": "uK8PMuoQMKthsSwMSnZCT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2542.24296719588, + "y": -3766.372903102158, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 531557515, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "same value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "same value" + }, + { + "type": "rectangle", + "version": 2975, + "versionNonce": 1031149195, + "isDeleted": false, + "id": "3buiGxc5YZf7fV09TFBM5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2419.673529706258, + "y": -3735.6170899792055, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 701.9936755952385, + "height": 18.283420138888914, + "seed": 678180261, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 3774, + "versionNonce": 226798501, + "isDeleted": false, + "id": "h9rVcRYLvf_rLepdLs6L7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2417.457255854864, + "y": -3704.630378130067, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 705.7503720238094, + "height": 18.68855406746024, + "seed": 198648619, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2242, + "versionNonce": 2066287915, + "isDeleted": false, + "id": "ypBDlZ3OepnNUFAk_bOeX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2466.4251605860727, + "y": -3801.882422728499, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 235, + "height": 25, + "seed": 452999429, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "low cardinality column cl", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "low cardinality column cl" + }, + { + "type": "rectangle", + "version": 4184, + "versionNonce": 1905913605, + "isDeleted": false, + "id": "dkGxzdleJ9vItK83hAM7d", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2419.261204173714, + "y": -3640.6838760724754, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 704.6454613095239, + "height": 19.74100942460325, + "seed": 1056933323, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 3810, + "versionNonce": 8662987, + "isDeleted": false, + "id": "TRPj2IkRwz4EUs79oLwoO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2588.546303457056, + "y": -3693.568667025917, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1459408997, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3914, + "versionNonce": 1559217765, + "isDeleted": false, + "id": "QmGXJfO4WIm3YYDSYvIRH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2588.8332352752363, + "y": -3679.7888374804647, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1078105195, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3917, + "versionNonce": 2141322859, + "isDeleted": false, + "id": "0UW4F-8GOLDRMcxLamP3r", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2588.858175179084, + "y": -3666.619366326617, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1244625861, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2360, + "versionNonce": 1112781253, + "isDeleted": false, + "id": "OwjPgrxMGgD02xhpWTPbu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2837.345380219596, + "y": -3800.942352090195, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 265, + "height": 25, + "seed": 1332399883, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "higher cardinality column ch", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "higher cardinality column ch" + }, + { + "type": "text", + "version": 2110, + "versionNonce": 55376139, + "isDeleted": false, + "id": "dscmqZUjoNGyg68BzjNMw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2948.752371782377, + "y": -3765.2191415863313, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 14, + "height": 20, + "seed": 1286978341, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "v1", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "v1" + }, + { + "type": "text", + "version": 2184, + "versionNonce": 1258817547, + "isDeleted": false, + "id": "imRkuJ7JkPpzNm_-pcfe4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2947.2583169345316, + "y": -3733.769183191773, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 20, + "height": 40, + "seed": 1324529067, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216765915, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "v2\n", + "baseline": 34, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "v2\n" + }, + { + "type": "text", + "version": 2282, + "versionNonce": 1493147563, + "isDeleted": false, + "id": "r_M8Kjq5x_hKhQrI3MVi1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2948.234954252633, + "y": -3703.940877632926, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 20, + "height": 20, + "seed": 1459424901, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "v3", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "v3" + }, + { + "type": "text", + "version": 2388, + "versionNonce": 1879819397, + "isDeleted": false, + "id": "Sx_Zar6hDHyeNFMcDc-XN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2952.0488146237763, + "y": -3640.342685401804, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 17, + "height": 20, + "seed": 1845807179, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "vn", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "vn" + }, + { + "type": "text", + "version": 2206, + "versionNonce": 988049995, + "isDeleted": false, + "id": "5rbdwJGeoF5OKYM8Fqz69", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2543.9762639098085, + "y": -3736.304400080386, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 2009265637, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "same value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "same value" + }, + { + "type": "text", + "version": 2261, + "versionNonce": 696970213, + "isDeleted": false, + "id": "8Miy_qDZKNIHNsmwVOASx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2542.635109784303, + "y": -3706.024948141898, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 310085355, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "same value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "same value" + }, + { + "type": "text", + "version": 2390, + "versionNonce": 970322155, + "isDeleted": false, + "id": "oYQEsWzZQjDaoTI47e-8o", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2543.7444594930544, + "y": -3640.32495345048, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 88, + "height": 20, + "seed": 169144645, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "same value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "same value" + }, + { + "type": "rectangle", + "version": 4280, + "versionNonce": 1802381125, + "isDeleted": false, + "id": "TYeKcJqHSy_LK5_4B8yAd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 60, + "angle": 0, + "x": 2420.525834345527, + "y": -3598.7961772040985, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 704.6454613095239, + "height": 19.74100942460325, + "seed": 48329099, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 2485, + "versionNonce": 1734253451, + "isDeleted": false, + "id": "yiIidIA18sodqB3ycKIvz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2956.313444795589, + "y": -3598.595724929312, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 14, + "height": 20, + "seed": 726696101, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "...", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "..." + }, + { + "type": "text", + "version": 2531, + "versionNonce": 940766885, + "isDeleted": false, + "id": "SxBO8JsgEVrk5FQOSZvCM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2526.874234794714, + "y": -3598.7187313738764, + "strokeColor": "#ffffff", + "backgroundColor": "#000000", + "width": 119, + "height": 20, + "seed": 1349584939, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "different value", + "baseline": 14, + "textAlign": "right", + "verticalAlign": "top", + "containerId": null, + "originalText": "different value" + }, + { + "type": "text", + "version": 3934, + "versionNonce": 652336325, + "isDeleted": false, + "id": "c4Eqamnfr5_7DgFW6yExw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2957.1870924325503, + "y": -3692.723477022752, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 649253899, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4038, + "versionNonce": 374013451, + "isDeleted": false, + "id": "j6rxPUdJ063qDw5Oj1C8R", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2957.4740242507305, + "y": -3678.943647477296, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1906083365, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4041, + "versionNonce": 108264485, + "isDeleted": false, + "id": "LJmiu3ipTGlutYvYONPj5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2957.498964154578, + "y": -3665.774176323452, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1760697003, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3902, + "versionNonce": 1207239851, + "isDeleted": false, + "id": "5U7vbrPfRlK4XVK04hKqy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2959.4881685019072, + "y": -3585.2033335627934, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1792178565, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4006, + "versionNonce": 558575493, + "isDeleted": false, + "id": "UCSiraGu-W8DsLJhxS9sn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2959.7751003200874, + "y": -3571.4235040173376, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1020235083, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4009, + "versionNonce": 1340421963, + "isDeleted": false, + "id": "hi6xXhRlqbNmoBdau-cyt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2959.800040223935, + "y": -3558.2540328634936, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1672675557, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3959, + "versionNonce": 1973745381, + "isDeleted": false, + "id": "jGfRmsHgmqVkvGF6a6i37", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2589.7256883047808, + "y": -3585.858982634609, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 631614443, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4063, + "versionNonce": 1551242731, + "isDeleted": false, + "id": "QXMxd3prM0IVx2_3TK2Jl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2590.012620122961, + "y": -3572.079153089155, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 835427397, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4066, + "versionNonce": 1578029637, + "isDeleted": false, + "id": "faWn-R1-cQn_GApNkuCIR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2590.0375600268085, + "y": -3558.9096819353094, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1467938443, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 3489, + "versionNonce": 1823613067, + "isDeleted": false, + "id": "sK7VfQOROotGFdgDz4LV8", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 4.718370583150467, + "x": 2238.3048821077105, + "y": -3663.4858835954915, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 214, + "height": 25, + "seed": 486132645, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "mDtk36bAZb0ES18oRT-RM", + "type": "arrow" + } + ], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "On-disk order of rows", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "On-disk order of rows" + }, + { + "type": "arrow", + "version": 1410, + "versionNonce": 124141989, + "isDeleted": false, + "id": "W39ppyFfTgpN2nCjbvv_x", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 50, + "angle": 6.280591703300703, + "x": 2389.812148124038, + "y": -3766.3148982158878, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 2.6743717068054025, + "height": 233.1456198332944, + "seed": 555085099, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -2.6743717068054025, + 233.1456198332944 + ] + ] + }, + { + "type": "text", + "version": 1095, + "versionNonce": 2110689899, + "isDeleted": false, + "id": "GgNyTTqiK25-yc19gLLYR", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2346.581396012037, + "y": -3860.559734173385, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 276, + "height": 25, + "seed": 359337733, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "z0ua18VXNGMa8I6OgumX6", + "type": "arrow" + }, + { + "id": "rLvO1LgAa2qAv-FcJ26i-", + "type": "arrow" + }, + { + "id": "tHFRKN9bKZMgeFD1D9-g8", + "type": "arrow" + } + ], + "updated": 1655216859167, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "PRIMARY KEY (cl, ch, uuid) ", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "PRIMARY KEY (cl, ch, uuid) " + }, + { + "type": "text", + "version": 2494, + "versionNonce": 1247086533, + "isDeleted": false, + "id": "UpwfCJ_awvy0PjVOIUKi8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3307.9263503904244, + "y": -3800.287149328368, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 39, + "height": 25, + "seed": 1783663045, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "uuid", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "uuid" + }, + { + "type": "text", + "version": 2593, + "versionNonce": 259353003, + "isDeleted": false, + "id": "1sjN3ggO5riGkc0WWRABY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3687.6629469798927, + "y": -3803.0398835287647, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 17, + "height": 25, + "seed": 1485602955, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "...", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "..." + }, + { + "type": "text", + "version": 3954, + "versionNonce": 1919985035, + "isDeleted": false, + "id": "bpIW6QzwIVkTuGWwJSfVI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3322.837371680836, + "y": -4137.058374484362, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 265134149, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4058, + "versionNonce": 645827749, + "isDeleted": false, + "id": "dngJEt6HpbIjp_4TYxXoM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3323.124303499016, + "y": -4123.278544938906, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1435447947, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 4061, + "versionNonce": 1878637611, + "isDeleted": false, + "id": "688DEMzqBIvbHCbQNumKD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3323.1492434028637, + "y": -4110.109073785062, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 7, + "height": 25, + "seed": 1947946917, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": ".", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "." + }, + { + "type": "text", + "version": 2790, + "versionNonce": 1924116485, + "isDeleted": false, + "id": "AvhaUY7ellA7nGo1jpYqR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3311.9127990988645, + "y": -4248.143049199147, + "strokeColor": "#15223c", + "backgroundColor": "#000000", + "width": 17, + "height": 25, + "seed": 1774102827, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655216756427, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "...", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "..." + }, + { + "type": "text", + "version": 639, + "versionNonce": 231553547, + "isDeleted": false, + "id": "pEcCstdY6Meu0oOIM_LZO", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2840.1912257413414, + "y": -4432.777279282515, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 545, + "height": 100, + "seed": 1008153515, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "anUfuQZGoFRmo_9HIl_zk", + "type": "arrow" + }, + { + "id": "1sq5PdmMU7wreMSi402mr", + "type": "arrow" + }, + { + "id": "MIYL2D5DHwTmp1HX6Oaiw", + "type": "arrow" + } + ], + "updated": 1655217195078, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "uuid values are unique by definition\n\nClickHouse can't locally order rows that\nhave the same uuid value by values of other columns, ", + "baseline": 93, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "uuid values are unique by definition\n\nClickHouse can't locally order rows that\nhave the same uuid value by values of other columns, " + }, + { + "type": "text", + "version": 3, + "versionNonce": 140737253, + "isDeleted": false, + "id": "AGAbEuIffQj2v1jEk-6yq", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2867.8310707294304, + "y": -4681.581883296003, + "strokeColor": "#15223c", + "backgroundColor": "#868e96", + "width": 349, + "height": 25, + "seed": 713700229, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655217201182, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "uuid values are unique by definition", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "uuid values are unique by definition" + }, + { + "type": "text", + "version": 97, + "versionNonce": 1607587909, + "isDeleted": false, + "id": "_YZRdsVLRxyatgKZZKs2N", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": 2821.6809781577963, + "y": -4615.207979865381, + "strokeColor": "#15223c", + "backgroundColor": "#868e96", + "width": 436, + "height": 25, + "seed": 1037160939, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1655217248731, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "there are no rows with the same uuid value", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "there are no rows with the same uuid value" + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file diff --git a/docs/ja/guides/best-practices/images/bad_skip_1.svg b/docs/ja/guides/best-practices/images/bad_skip_1.svg new file mode 100755 index 00000000000..73373679e38 --- /dev/null +++ b/docs/ja/guides/best-practices/images/bad_skip_1.svg @@ -0,0 +1,16 @@ + + + + + + + timestamp columnvisitor_idcolumnurlcolumnGranule 4072 8192 rows Granule 4073 8192 rows Granule 4074 8192 rows Granule 4075 8192 rows 2022-02-07 15:00:002022-02-07 16:00:002022-02-07 17:00:002022-02-07 18:00:0010011001100110011001 \ No newline at end of file diff --git a/docs/ja/guides/best-practices/images/simple_skip.svg b/docs/ja/guides/best-practices/images/simple_skip.svg new file mode 100755 index 00000000000..05e5019ad69 --- /dev/null +++ b/docs/ja/guides/best-practices/images/simple_skip.svg @@ -0,0 +1,16 @@ + + + + + + + my_key columnmy_valuecolumnGranule 61 8192 rows Granule 62 8192 rows Granule 63 8192 rows Granule 64 8192 rows 507904 ...516095524288 ...532479516096...524287516096...524288125124126128130127129131Skip IndexBlock of Two GranulesSkip IndexBlock of Two Granulesindex calc is set of (124, 125,126, 127) so blocknot skippedset of (128, 129,130, 131) so blockskipped \ No newline at end of file diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-01.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-01.png new file mode 100644 index 00000000000..ce0eb5e61c1 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-01.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-02.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-02.png new file mode 100644 index 00000000000..c8d52bfd64c Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-02.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-03.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-03.png new file mode 100644 index 00000000000..30418ace1af Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-03.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-03a.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-03a.png new file mode 100644 index 00000000000..a65094ba3c4 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-03a.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-03b.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-03b.png new file mode 100644 index 00000000000..30418ace1af Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-03b.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-04.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-04.png new file mode 100644 index 00000000000..6cfa7562b8f Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-04.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-05.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-05.png new file mode 100644 index 00000000000..b642c107cb9 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-05.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-06.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-06.png new file mode 100644 index 00000000000..54db2c7ce2c Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-06.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-07.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-07.png new file mode 100644 index 00000000000..9f98588b105 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-07.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-08.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-08.png new file mode 100644 index 00000000000..cfad1bb9429 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-08.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-09a.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-09a.png new file mode 100644 index 00000000000..1e292904d91 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-09a.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-09b.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-09b.png new file mode 100644 index 00000000000..1c07ec5acca Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-09b.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-09c.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-09c.png new file mode 100644 index 00000000000..4bf5c5ea034 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-09c.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-10.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-10.png new file mode 100644 index 00000000000..aa40aae9560 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-10.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-11.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-11.png new file mode 100644 index 00000000000..2d5e3e91e61 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-11.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-12a.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-12a.png new file mode 100644 index 00000000000..93cf2e3cb92 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-12a.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-12b-1.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-12b-1.png new file mode 100644 index 00000000000..de082849c11 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-12b-1.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-12b-2.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-12b-2.png new file mode 100644 index 00000000000..1f34b9f6612 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-12b-2.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-12c-1.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-12c-1.png new file mode 100644 index 00000000000..71798945110 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-12c-1.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-12c-2.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-12c-2.png new file mode 100644 index 00000000000..4b439ed992b Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-12c-2.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-13a.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-13a.png new file mode 100644 index 00000000000..062c0c5c598 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-13a.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-13b.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-13b.png new file mode 100644 index 00000000000..0c49751debf Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-13b.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-14a.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-14a.png new file mode 100644 index 00000000000..6b36d6ab603 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-14a.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-14b.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-14b.png new file mode 100644 index 00000000000..97c9084ec7d Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-14b.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-15a.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-15a.png new file mode 100644 index 00000000000..3161c59835a Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-15a.png differ diff --git a/docs/ja/guides/best-practices/images/sparse-primary-indexes-15b.png b/docs/ja/guides/best-practices/images/sparse-primary-indexes-15b.png new file mode 100644 index 00000000000..d9b8acc07c1 Binary files /dev/null and b/docs/ja/guides/best-practices/images/sparse-primary-indexes-15b.png differ diff --git a/docs/ja/guides/best-practices/partitioningkey.md b/docs/ja/guides/best-practices/partitioningkey.md new file mode 100644 index 00000000000..5a16c1f8d26 --- /dev/null +++ b/docs/ja/guides/best-practices/partitioningkey.md @@ -0,0 +1,11 @@ +--- +slug: /ja/optimize/partitioning-key +sidebar_label: パーティショニングキー +title: 低カーディナリティã®ãƒ‘ーティショニングキーをé¸ã¶ +description: 低カーディナリティã®ãƒ‘ーティショニングキーを使用ã™ã‚‹ã‹ã€ãƒ‘ーティショニングキーを使用ã—ãªã„テーブルã«ã™ã‚‹ã€‚ + +--- + +import Content from '@site/docs/ja/cloud/bestpractices/partitioningkey.md'; + + diff --git a/docs/ja/guides/best-practices/skipping-indexes.md b/docs/ja/guides/best-practices/skipping-indexes.md new file mode 100644 index 00000000000..3c1eaea6f45 --- /dev/null +++ b/docs/ja/guides/best-practices/skipping-indexes.md @@ -0,0 +1,185 @@ +--- +slug: /ja/optimize/skipping-indexes +sidebar_label: データスキッピング インデックス +sidebar_position: 2 +description: スキップインデックスã«ã‚ˆã‚Šã€ClickHouseã¯ä¸€è‡´ã—ãªã„ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¦ã„るデータã®å¤§ããªãƒãƒ£ãƒ³ã‚¯ã‚’読ã¿é£›ã°ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +--- + +# ClickHouseデータスキッピングインデックスã®ç†è§£ + +## ã¯ã˜ã‚ã« + +ClickHouseã®ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹è¦å› ã¯å¤šãã‚ã‚Šã¾ã™ã€‚ã»ã¨ã‚“ã©ã®ã‚·ãƒŠãƒªã‚ªã§é‡è¦ãªã®ã¯ã€ClickHouseãŒã‚¯ã‚¨ãƒªWHEREå¥ã®æ¡ä»¶ã‚’評価ã™ã‚‹éš›ã«ä¸»ã‚­ãƒ¼ã‚’使用ã§ãã‚‹ã‹ã©ã†ã‹ã§ã™ã€‚ã—ãŸãŒã£ã¦ã€æœ€ã‚‚一般的ãªã‚¯ã‚¨ãƒªãƒ‘ターンã«é©ç”¨ã•ã‚Œã‚‹ä¸»ã‚­ãƒ¼ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã€åŠ¹æžœçš„ãªãƒ†ãƒ¼ãƒ–ル設計ã®ãŸã‚ã«ä¸å¯æ¬ ã§ã™ã€‚ + +ã—ã‹ã—ã€ã©ã‚“ãªã«æ…Žé‡ã«ä¸»ã‚­ãƒ¼ã‚’調整ã—ã¦ã‚‚ã€å¿…然的ã«ãれを効率的ã«ä½¿ç”¨ã§ããªã„クエリã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ãŒå­˜åœ¨ã—ã¾ã™ã€‚ユーザーã¯é€šå¸¸ã€ClickHouseを使用ã—ã¦æ™‚系列データを扱ã„ã¾ã™ãŒã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’顧客IDã€ã‚¦ã‚§ãƒ–サイトã®URLã€è£½å“番å·ãªã©ã®ä»–ã®æ¥­å‹™æ¬¡å…ƒã«åŸºã¥ã„ã¦åˆ†æžã—ãŸã„ã¨è€ƒãˆã‚‹ã“ã¨ãŒã‚ˆãã‚ã‚Šã¾ã™ã€‚ãã®å ´åˆã€WHEREå¥ã®æ¡ä»¶ã‚’é©ç”¨ã™ã‚‹ãŸã‚ã«å„カラム値ã®å…¨ã‚¹ã‚­ãƒ£ãƒ³ãŒå¿…è¦ã«ãªã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスãŒã‹ãªã‚Šæ‚ªåŒ–ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚ˆã†ãªå ´åˆã§ã‚‚ã€ClickHouseã¯ç›¸å¯¾çš„ã«é€Ÿã„ã§ã™ãŒã€æ•°ç™¾ä¸‡ã¾ãŸã¯æ•°åå„„ã®å€‹ã€…ã®å€¤ã‚’評価ã™ã‚‹ã“ã¨ã¯ã€ä¸»ã‚­ãƒ¼ã«åŸºã¥ãクエリよりもã¯ã‚‹ã‹ã«é…ããªã‚Šã¾ã™ã€‚ + +ä¼çµ±çš„ãªãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã¯ã€ã“ã®å•é¡Œã«å¯¾å‡¦ã™ã‚‹1ã¤ã®æ–¹æ³•ã¨ã—ã¦ã€ãƒ†ãƒ¼ãƒ–ルã«1ã¤ä»¥ä¸Šã®ã€ŒäºŒæ¬¡ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’付ã‘ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ä¸€è‡´ã™ã‚‹è¡Œã‚’O(log(n))時間ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã™ã‚‹b-tree構造ã§ã™ï¼ˆnã¯è¡Œæ•°ï¼‰ã€‚ã—ã‹ã—ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«è¿½åŠ ã™ã‚‹å€‹åˆ¥ã®è¡ŒãŒãªã„ãŸã‚ã€ã“ã®ã‚¿ã‚¤ãƒ—ã®äºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ClickHouse(ã¾ãŸã¯ä»–ã®åˆ—指å‘データベース)ã«ã¯é©ç”¨ã§ãã¾ã›ã‚“。 + +代ã‚ã‚Šã«ã€ClickHouseã¯ç•°ãªã‚‹ç¨®é¡žã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’æä¾›ã—ã¦ãŠã‚Šã€ç‰¹å®šã®çŠ¶æ³ã§ã‚¯ã‚¨ãƒªã®é€Ÿåº¦ã‚’大幅ã«å‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã®æ§‹é€ ã¯ã€Œã‚¹ã‚­ãƒƒãƒ—ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ãƒ©ãƒ™ãƒ«ä»˜ã‘ã•ã‚Œã¦ãŠã‚Šã€ä¸€è‡´ã—ãªã„ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¦ã„るデータã®å¤§ããªãƒãƒ£ãƒ³ã‚¯ã®èª­ã¿è¾¼ã¿ã‚’ClickHouseãŒã‚¹ã‚­ãƒƒãƒ—ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +## 基本æ“作 + +ユーザーã¯MergeTreeファミリーã®ãƒ†ãƒ¼ãƒ–ルã§ã®ã¿ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ”ングインデックスを使用ã§ãã¾ã™ã€‚å„データスキッピングã«ã¯4ã¤ã®ä¸»è¦ãªå¼•æ•°ãŒã‚ã‚Šã¾ã™ï¼š + +- インデックスå。インデックスåã¯å„パーティション内ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã®ä½œæˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã¾ãŸã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’ドロップã¾ãŸã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºã™ã‚‹éš›ã®ãƒ‘ラメータã¨ã—ã¦å¿…è¦ã§ã™ã€‚ +- インデックスå¼ã€‚インデックスå¼ã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«æ ¼ç´ã•ã‚Œã‚‹å€¤ã®é›†åˆã‚’計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚カラムã€å˜ç´”演算å­ã€ãŠã‚ˆã³/ã¾ãŸã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—ã«ã‚ˆã£ã¦æ±ºå®šã•ã‚ŒãŸé–¢æ•°ã®ã‚µãƒ–セットã®çµ„ã¿åˆã‚ã›ãŒå¯èƒ½ã§ã™ã€‚ +- TYPE。インデックスタイプã¯ã€å„インデックスブロックã®èª­ã¿å–ã‚Šã¨è©•ä¾¡ã‚’スキップã§ãã‚‹ã‹ã©ã†ã‹ã‚’決定ã™ã‚‹è¨ˆç®—を制御ã—ã¾ã™ã€‚ +- GRANULARITY。 å„インデックス付ãブロック㯠GRANULARITY グラニュールã‹ã‚‰æˆã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€ä¸»ãƒ†ãƒ¼ãƒ–ルインデックスã®ç²’度ãŒ8192è¡Œã§ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ç²’度ãŒ4ã§ã‚ã‚‹å ´åˆã€å„インデックス付ã「ブロックã€ã¯32768è¡Œã«ãªã‚Šã¾ã™ã€‚ + +ユーザーãŒãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ”ングインデックスを作æˆã™ã‚‹ã¨ã€ãƒ†ãƒ¼ãƒ–ルã®å„データパートディレクトリã«2ã¤ã®è¿½åŠ ãƒ•ã‚¡ã‚¤ãƒ«ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +- `skp_idx_{index_name}.idx`, ã«ã¯é †åºä»˜ã‘られãŸå¼ã®å€¤ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ +- `skp_idx_{index_name}.mrk2`, ã«ã¯é–¢é€£ä»˜ã‘られãŸãƒ‡ãƒ¼ã‚¿ã‚«ãƒ©ãƒ ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®å¯¾å¿œã™ã‚‹ã‚ªãƒ•ã‚»ãƒƒãƒˆãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +クエリを実行ã—ã¦é–¢é€£ã™ã‚‹ã‚«ãƒ©ãƒ ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿å–ã‚‹ã¨ãã«ã€WHEREå¥ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼æ¡ä»¶ã®ä¸€éƒ¨ãŒã‚¹ã‚­ãƒƒãƒ—インデックスã®å¼ã¨ä¸€è‡´ã™ã‚‹å ´åˆã€ClickHouseã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‡ãƒ¼ã‚¿ã‚’使用ã—ã¦ã€é–¢é€£ã™ã‚‹å„データブロックを処ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã€ï¼ˆä¸»ã‚­ãƒ¼ã‚’é©ç”¨ã™ã‚‹ã“ã¨ã§ãƒ–ロックãŒã™ã§ã«é™¤å¤–ã•ã‚Œã¦ã„ãªã„é™ã‚Šï¼‰ãƒã‚¤ãƒ‘スã§ãã‚‹ã‹ã‚’判断ã—ã¾ã™ã€‚éžå¸¸ã«ç°¡å˜ãªä¾‹ã‚’挙ã’ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚ˆã†ãªãƒ†ãƒ¼ãƒ–ルã«äºˆæ¸¬å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹ã¨ã—ã¾ã™ã€‚ + +``` +CREATE TABLE skip_table +( + my_key UInt64, + my_value UInt64 +) +ENGINE MergeTree primary key my_key +SETTINGS index_granularity=8192; + +INSERT INTO skip_table SELECT number, intDiv(number,4096) FROM numbers(100000000); +``` + +主キーを使用ã—ãªã„å˜ç´”ãªã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã¨ã€`my_value`カラムã®1億エントリã™ã¹ã¦ãŒã‚¹ã‚­ãƒ£ãƒ³ã•ã‚Œã¾ã™ï¼š + +``` +SELECT * FROM skip_table WHERE my_value IN (125, 700) + +┌─my_key─┬─my_value─┠+│ 512000 │ 125 │ +│ 512001 │ 125 │ +│ ... | ... | +└────────┴──────────┘ + +8192 rows in set. Elapsed: 0.079 sec. Processed 100.00 million rows, 800.10 MB (1.26 billion rows/s., 10.10 GB/s. +``` + +ã“ã“ã§éžå¸¸ã«åŸºæœ¬çš„ãªã‚¹ã‚­ãƒƒãƒ—インデックスを追加ã—ã¾ã™ï¼š + +``` +ALTER TABLE skip_table ADD INDEX vix my_value TYPE set(100) GRANULARITY 2; +``` + +通常ã€ã‚¹ã‚­ãƒƒãƒ—インデックスã¯æ–°ãŸã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«ã®ã¿é©ç”¨ã•ã‚Œã‚‹ãŸã‚ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’追加ã™ã‚‹ã ã‘ã§ã¯ä¸Šè¨˜ã®ã‚¯ã‚¨ãƒªã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 + +既存ã®ãƒ‡ãƒ¼ã‚¿ã‚’インデックス化ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’使用ã—ã¾ã™ï¼š + +``` +ALTER TABLE skip_table MATERIALIZE INDEX vix; +``` + +æ–°ã—ã作æˆã—ãŸã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã§ã‚¯ã‚¨ãƒªã‚’å†å®Ÿè¡Œã—ã¾ã™ï¼š + +``` +SELECT * FROM skip_table WHERE my_value IN (125, 700) + +┌─my_key─┬─my_value─┠+│ 512000 │ 125 │ +│ 512001 │ 125 │ +│ ... | ... | +└────────┴──────────┘ + +8192 rows in set. Elapsed: 0.051 sec. Processed 32.77 thousand rows, 360.45 KB (643.75 thousand rows/s., 7.08 MB/s.) +``` + +1å„„è¡Œã®800メガãƒã‚¤ãƒˆã‚’処ç†ã™ã‚‹ä»£ã‚ã‚Šã«ã€ClickHouseã¯32,768è¡Œã®360キロãƒã‚¤ãƒˆã®ã¿ã‚’読ã¿å–ã‚Šã€åˆ†æžã—ã¾ã—㟠+-- å„8192è¡Œã®4ã¤ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã§ã™ã€‚ + +より視覚的ãªå½¢å¼ã§ã¯ã€`my_value`ãŒ125ã§ã‚ã‚‹4096è¡ŒãŒã©ã®ã‚ˆã†ã«èª­ã¿å–られé¸æŠžã•ã‚ŒãŸã‹ã€ãã—ã¦æ¬¡ã®è¡ŒãŒãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ã®èª­ã¿å–ã‚Šãªã—ã«ã‚¹ã‚­ãƒƒãƒ—ã•ã‚ŒãŸã‹ã‚’示ã—ã¦ã„ã¾ã™ï¼š + +![Simple Skip](images/simple_skip.svg) + +クエリを実行ã™ã‚‹éš›ã«traceを有効ã«ã™ã‚‹ã“ã¨ã§ã‚¹ã‚­ãƒƒãƒ—インデックスã®ä½¿ç”¨ã«é–¢ã™ã‚‹è©³ç´°æƒ…å ±ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ +clickhouse-clientã‹ã‚‰ã€`send_logs_level`を設定ã—ã¾ã™ï¼š + +``` +SET send_logs_level='trace'; +``` +ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªSQLやテーブルインデックスã®èª¿æ•´ã‚’試ã¿ã‚‹éš›ã«æœ‰ç”¨ãªãƒ‡ãƒãƒƒã‚°æƒ…å ±ãŒæä¾›ã•ã‚Œã¾ã™ã€‚上記ã®ä¾‹ã§ã¯ã€ã‚¹ã‚­ãƒƒãƒ—インデックスãŒ6104ã®ã†ã¡6102ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã‚’削除ã—ãŸã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ï¼š + +``` + default.skip_table (933d4b2c-8cea-4bf9-8c93-c56e900eefd1) (SelectExecutor): Index `vix` has dropped 6102/6104 granules. +``` + +## スキップインデックスタイプ + +### minmax + +ã“ã®è»½é‡ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—ã¯ãƒ‘ラメータを必è¦ã¨ã—ã¾ã›ã‚“。å„ブロックã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹å¼ã®æœ€å°å€¤ã¨æœ€å¤§å€¤ã‚’記録ã—ã¾ã™ï¼ˆå¼ãŒã‚¿ãƒ—ルã§ã‚ã‚‹å ´åˆã€ã‚¿ãƒ—ルã®è¦ç´ ã®å„メンãƒãƒ¼ã®å€¤ã‚’個別ã«è¨˜éŒ²ã—ã¾ã™ï¼‰ã€‚ã“ã®ã‚¿ã‚¤ãƒ—ã¯ã€å€¤ã§ç·©ã‚„ã‹ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã‚‹å‚¾å‘ãŒã‚るカラムã«ç†æƒ³çš„ã§ã™ã€‚ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—ã¯é€šå¸¸ã€ã‚¯ã‚¨ãƒªå‡¦ç†ä¸­ã«é©ç”¨ã™ã‚‹ã®ã«æœ€ã‚‚費用ãŒã‹ã‹ã‚Šã¾ã›ã‚“。 + +ã“ã®ã‚¿ã‚¤ãƒ—ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€ã‚¹ã‚«ãƒ©ãƒ¼ã¾ãŸã¯ã‚¿ãƒ—ルã®å¼ã§ã®ã¿æ­£å¸¸ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ãŸã ã—ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒé…列ã¾ãŸã¯ãƒžãƒƒãƒ—データ型を返ã™å¼ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。 + +### set + +ã“ã®è»½é‡ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—ã¯ã€ãƒ–ロックã”ã¨ã«æ ¼ç´ã•ã‚Œã‚‹å€¤é›†åˆã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆ0ã¯ç„¡åˆ¶é™ã®å€‹åˆ¥å€¤ã‚’許å¯ï¼‰ã¨ã„ã†å˜ä¸€ã®ãƒ‘ラメータをå—ã‘å–ã‚Šã¾ã™ã€‚ã“ã®é›†åˆã«ã¯ãƒ–ロック内ã®ã™ã¹ã¦ã®å€¤ãŒå«ã¾ã‚Œã¾ã™ï¼ˆå€¤ã®æ•°ãŒmax_sizeを超ãˆã‚‹å ´åˆã¯ç©ºã§ã™ï¼‰ã€‚ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—ã¯ã€å„グラニュールセット内ã§ä½Žã„カーディナリティ(基本的ã«ã€Œã²ã¨ã¤ã«ã¾ã¨ã¾ã£ã¦ã„ã‚‹ã€ï¼‰ã ãŒã€å…¨ä½“ã§ã¯é«˜ã„カーディナリティã®ã‚«ãƒ©ãƒ ã«ã‚ˆãé©ã—ã¦ã„ã¾ã™ã€‚ + +ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã‚³ã‚¹ãƒˆã€ãƒ‘フォーマンスã€ãŠã‚ˆã³åŠ¹æžœã¯ã€ãƒ–ロック内ã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã«ä¾å­˜ã—ã¾ã™ã€‚å„ブロックãŒå¤§é‡ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå€¤ã‚’å«ã‚€å ´åˆã€ã‚¯ã‚¨ãƒªæ¡ä»¶ã‚’大ããªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆã«è©•ä¾¡ã™ã‚‹ã®ãŒéžå¸¸ã«é«˜ä¾¡ã«ãªã‚‹ã‹ã€max_sizeを超ãˆãŸãŸã‚インデックスãŒç©ºã«ãªã‚Šé©ç”¨ã•ã‚Œãªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +### Bloomフィルタタイプ + +*Bloomフィルタ*ã¯ã€é›†åˆã®ãƒ¡ãƒ³ãƒãƒ¼ã‚·ãƒƒãƒ—ã®ãƒ†ã‚¹ãƒˆã‚’効率的ã«è¡Œã†ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã§ã€ false positive(誤ã£ã¦ä¸€è‡´ã¨åˆ¤å®šã™ã‚‹ï¼‰å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚スキップインデックスã®å ´åˆã€false positiveã¯ã‚ãšã‹ã«ä½™åˆ†ãªãƒ–ロックを読ã¿è¾¼ã‚€ã ã‘ã®ãƒ‡ãƒ¡ãƒªãƒƒãƒˆã—ã‹ãªã„ãŸã‚ã€å¤§ããªå•é¡Œã«ã¯ãªã‚Šã¾ã›ã‚“。ãŸã ã—ã€false positivesã®å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã—ãŸå¼ãŒtrueã§ã‚ã‚‹ã¨äºˆæƒ³ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ã•ã‚‚ãªã„ã¨ã€æœ‰åŠ¹ãªãƒ‡ãƒ¼ã‚¿ãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +Bloomフィルタã¯ã€å¤šæ•°ã®å€‹åˆ¥å€¤ã®ãƒ†ã‚¹ãƒˆã‚’より効率的ã«å‡¦ç†ã§ãã‚‹ãŸã‚ã€å¤šãã®å€¤ã‚’テストã™ã‚‹æ¡ä»¶å¼ã«é©ã—ã¦ã„ã¾ã™ã€‚特ã«ã€Bloomフィルタインデックスã¯é…列ã«é©ç”¨ã§ãã€é…列ã®å„値ãŒãƒ†ã‚¹ãƒˆã•ã‚Œã€mapKeysã¾ãŸã¯mapValues関数を使用ã—ã¦ã‚­ãƒ¼ã¾ãŸã¯å€¤ã‚’é…列ã«å¤‰æ›ã™ã‚‹ã“ã¨ã§ãƒžãƒƒãƒ—ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +Bloomフィルタã«åŸºã¥ãデータスキッピングインデックスã«ã¯ã€ä»¥ä¸‹ã®3種類ãŒã‚ã‚Šã¾ã™ï¼š + +* 基本的ãª**bloom_filter**ã¯ã€false positive率を0ã‹ã‚‰1ã®ç¯„囲ã§è¨±å¯ã™ã‚‹å˜ä¸€ã®ã‚ªãƒ—ションパラメータをå—ã‘å–ã‚Šã¾ã™ï¼ˆæŒ‡å®šã—ãªã„å ´åˆã€.025ãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼‰ã€‚ + +* 専用ã®**tokenbf_v1**。ã“ã‚Œã¯Bloomフィルタã«é–¢é€£ã™ã‚‹3ã¤ã®ãƒ‘ラメータをå–ã‚Šã¾ã™ï¼šï¼ˆ1)フィルタã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ï¼ˆå¤§ããªãƒ•ã‚£ãƒ«ã‚¿ã¯false positiveãŒå°‘ãªã„ã§ã™ãŒã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ã‚³ã‚¹ãƒˆãŒã‹ã‹ã‚Šã¾ã™ï¼‰ã€ï¼ˆ2)é©ç”¨ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®æ•°ï¼ˆã‚ˆã‚Šå¤šãã®ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã¯false positiveを減少ã•ã›ã¾ã™ï¼‰ã€ï¼ˆ3)Bloomフィルタã®ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®ã‚·ãƒ¼ãƒ‰ã§ã™ã€‚ã“れらã®ãƒ‘ラメータãŒBloomフィルタã®æ©Ÿèƒ½ã«ã©ã®ã‚ˆã†ã«å½±éŸ¿ã™ã‚‹ã‹ã«ã¤ã„ã¦ã¯ã€è¨ˆç®—æ©Ÿã‚’å‚ç…§ã—ã¦ãã ã•ã„。[ã“ã“](https://hur.st/bloomfilter/)ã‚’ã”覧ãã ã•ã„。 +ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€Stringã€FixedStringã€Mapデータ型ã§ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚入力å¼ã¯ã€éžè‹±æ•°å­—ã§åŒºåˆ‡ã‚‰ã‚ŒãŸæ–‡å­—列ã«åˆ†å‰²ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€`This is a candidate for a "full text" search` ã¨ã„ã†åˆ—ã®å€¤ã¯ã€`This` `is` `a` `candidate` `for` `full` `text` `search` ã¨ã„ã†ãƒˆãƒ¼ã‚¯ãƒ³ãŒå«ã¾ã‚Œã¾ã™ã€‚LIKEã€EQUALSã€INã€hasToken()ãªã©ã®å˜èªžã‚„ä»–ã®å€¤ã‚’é•·ã„文字列内ã§æ¤œç´¢ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€ã‚¢ãƒ—リケーションログã®è¡Œã®ä¸­ã§å°‘æ•°ã®ã‚¯ãƒ©ã‚¹åや行番å·ã‚’検索ã™ã‚‹ã®ã«å½¹ç«‹ã¤ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +* 専用ã®**ngrambf_v1**。ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ãƒˆãƒ¼ã‚¯ãƒ³ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨åŒæ§˜ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚Bloomフィルタ設定ã®å‰ã«n-gramã®ã‚µã‚¤ã‚ºã‚’表ã™è¿½åŠ ãƒ‘ラメータをå–å¾—ã—ã¾ã™ã€‚n-gramã¯ä»»æ„ã®æ–‡å­—ã®é•·ã•`n`ã®æ–‡å­—列ã§ã™ã€‚`A short string`ã¨ã„ã†æ–‡å­—列ã§n-gramサイズãŒ4ã®å ´åˆã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã•ã‚Œã¾ã™ï¼š + ``` + 'A sh', ' sho', 'shor', 'hort', 'ort ', 'rt s', 't st', ' str', 'stri', 'trin', 'ring' + ``` +ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€ç‰¹ã«å˜èªžã®åˆ‡ã‚Œç›®ãŒãªã„言語(中国語ãªã©ï¼‰ã®ãƒ†ã‚­ã‚¹ãƒˆæ¤œç´¢ã«æœ‰ç”¨ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +## スキップインデックス関数 + +データスキッピングインデックスã®ä¸»ãªç›®çš„ã¯ã€äººæ°—ã®ã‚るクエリã«ã‚ˆã£ã¦åˆ†æžã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®é‡ã‚’制é™ã™ã‚‹ã“ã¨ã§ã™ã€‚ClickHouseデータã®åˆ†æžç‰¹æ€§ã«ã‚ˆã‚Šã€ã“れらã®ã‚¯ã‚¨ãƒªã®ãƒ‘ターンã«ã¯å¤šãã®å ´åˆã€æ©Ÿèƒ½çš„ãªè¡¨ç¾ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ãã®ãŸã‚ã€ã‚¹ã‚­ãƒƒãƒ—インデックスã¯ä¸€èˆ¬çš„ãªé–¢æ•°ã¨æ­£ã—ã連æºã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€æ¬¡ã®ã„ãšã‚Œã‹ã®å ´åˆã«ç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼š +* データãŒæŒ¿å…¥ã•ã‚Œã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒæ©Ÿèƒ½çš„ãªå¼ã¨ã—ã¦å®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆï¼ˆå¼ã®çµæžœãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã«æ ¼ç´ã•ã‚Œã‚‹ï¼‰ã€ +* クエリãŒå‡¦ç†ã•ã‚Œã€å¼ãŒæ ¼ç´ã•ã‚ŒãŸã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹å€¤ã«é©ç”¨ã•ã‚Œã€ãƒ–ロックを除外ã™ã‚‹ã‹ã©ã†ã‹ã‚’判断ã™ã‚‹å ´åˆã€‚ + +å„タイプã®ã‚¹ã‚­ãƒƒãƒ—インデックスã¯ã€å¯èƒ½ãªé–¢æ•°ã‚µãƒãƒ¼ãƒˆã®ã‚µãƒ–セットã§æ©Ÿèƒ½ã—ã¾ã™ã€‚[ã“ã¡ã‚‰](https://clickhouse.com/docs/ja/engines/table-engines/mergetree-family/mergetree/#functions-support)ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚一般的ã«ã€ã‚»ãƒƒãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚„Bloomフィルタベースã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ï¼ˆã‚‚ã†ä¸€ã¤ã®ã‚»ãƒƒãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—)ã¯ç„¡ç§©åºã§ç¯„囲ã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。対照的ã«ã€minmaxインデックスã¯ç¯„囲ã§ç‰¹ã«ã‚ˆã機能ã—ã¾ã™ã€‚部分一致関数LIKEã€startsWithã€endsWithã€ãŠã‚ˆã³hasTokenã®æœ‰åŠ¹æ€§ã¯ã€ä½¿ç”¨ã•ã‚Œã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹å¼ã€ãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ã®ç‰¹å®šã®å½¢çŠ¶ã«ä¾å­˜ã—ã¾ã™ã€‚ + +## スキップインデックス設定 + +スキップインデックスã«é©ç”¨ã•ã‚Œã‚‹è¨­å®šã¯2ã¤å­˜åœ¨ã—ã¾ã™ã€‚ + +* **use_skip_indexes**(0ã¾ãŸã¯1ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯1)。ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªãŒã‚¹ã‚­ãƒƒãƒ—インデックスを効率的ã«åˆ©ç”¨ã§ãã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。特定ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°æ¡ä»¶ãŒ +ã»ã¨ã‚“ã©ã®å ´åˆå…¨ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã‚’å«ã‚€å¯èƒ½æ€§ãŒã‚ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ”ングインデックスをé©ç”¨ã™ã‚‹ã“ã¨ã¯ä¸è¦ã§ã‚ã‚Šã€æ™‚ã«ã¯ã‹ãªã‚Šã®ã‚³ã‚¹ãƒˆãŒã‹ã‹ã‚Šã¾ã™ã€‚スキップインデックスを利用ã™ã‚‹å¯èƒ½æ€§ãŒä½Žã„クエリã®å ´åˆã¯ã€å€¤ã‚’ +0ã«è¨­å®šã—ã¦ãã ã•ã„。 +* **force_data_skipping_indices**(インデックスåã®ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šãƒªã‚¹ãƒˆï¼‰ã€‚ã“ã®è¨­å®šã¯ã€ä¸€éƒ¨ã®éžåŠ¹çŽ‡çš„㪠+クエリを防ããŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚テーブルをå•ã„åˆã‚ã›ã‚‹ã®ãŒã‚¹ã‚­ãƒƒãƒ—インデックスを使用ã—ãªã„é™ã‚Šé«˜ä¾¡ã™ãŽã‚‹å ´åˆã€ã“ã®è¨­å®šã‚’1ã¤ä»¥ä¸Šã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ +åã§ä½¿ç”¨ã™ã‚‹ã¨ã€æŒ‡å®šã•ã‚ŒãŸã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã—ãªã„クエリã«å¯¾ã—ã¦ã¯ä¾‹å¤–ã‚’è¿”ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ä»–ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’浪費ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’ +防ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +## スキップインデックスã®ãƒ™ã‚¹ãƒˆãƒ—ラクティス + +スキップインデックスã¯ç›´æ„Ÿçš„ã§ã¯ãªãã€RDMSã®é ˜åŸŸã®è¡Œãƒ™ãƒ¼ã‚¹ã®äºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚„文書ストアã®ã‚¤ãƒ³ãƒãƒ¼ãƒ†ãƒƒãƒ‰ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«æ…£ã‚Œã¦ã„るユーザーã«ã¯ç‰¹ã«ãã†ã§ã™ã€‚ClickHouseデータスキッピングインデックスをé©ç”¨ã—ã¦åˆ©ç›Šã‚’å¾—ã‚‹ãŸã‚ã«ã¯ã€è¨ˆç®—コストを相殺ã™ã‚‹ã ã‘ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã®èª­ã¿å–ã‚Šã‚’é¿ã‘ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚é‡è¦ãªã“ã¨ã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä»˜ãブロック内ã«1回ã§ã‚‚値ãŒç¾ã‚Œã‚‹å ´åˆã€ãã‚Œã¯ãƒ–ロック全体ãŒãƒ¡ãƒ¢ãƒªã«èª­ã¿è¾¼ã¾ã‚Œè©•ä¾¡ã•ã‚Œãªã‘ã‚Œã°ãªã‚‰ãšã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚³ã‚¹ãƒˆãŒä¸å¿…è¦ã«ã‹ã‹ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +以下ã®ãƒ‡ãƒ¼ã‚¿åˆ†å¸ƒã‚’考ãˆã¦ã¿ã¾ã—ょã†ï¼š + +![Bad Skip!](images/bad_skip_1.svg) + +主/ORDER BY キー㌠`timestamp` ã§ã€`visitor_id` ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚次ã®ã‚¯ã‚¨ãƒªã‚’考ãˆã¾ã™ï¼š + + `SELECT timestamp, url FROM table WHERE visitor_id = 1001` + +ã“ã®ç¨®ã®ãƒ‡ãƒ¼ã‚¿åˆ†å¸ƒã§ã¯ã€ä¼çµ±çš„ãªäºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒéžå¸¸ã«æœ‰åˆ©ã§ã™ã€‚ +è¦æ±‚ã•ã‚ŒãŸvisitor_idã‚’æŒã¤5ã¤ã®è¡Œã‚’見ã¤ã‘ã‚‹ãŸã‚ã«32768行全体を読む代ã‚ã‚Šã«ã€äºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ã¯ã¡ã‚‡ã†ã©5ã¤ã®è¡Œä½ç½®ãŒå«ã¾ã‚Œã€ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ãれらã®5ã¤ã®è¡Œã ã‘ãŒèª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ +ClickHouseã®ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ”ングインデックスã§ã¯é€†ãŒå½“ã¦ã¯ã¾ã‚Šã¾ã™ã€‚8192è¡Œã®ã‚¹ã‚­ãƒƒãƒ—・ブロックã®ä¸­ã§è¦æ±‚ã•ã‚ŒãŸvisitor_idãŒ1ã¤ã§ã‚‚見ã¤ã‹ã‚‹ãŸã‚ã€visitor_idã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒä»˜ã„ã¦ã„ã‚‹8192è¡Œã®ã™ã¹ã¦ã®å€¤ãŒãƒ†ã‚¹ãƒˆã•ã‚Œã¾ã™ã€‚ + +ã—ãŸãŒã£ã¦ã€ClickHouseã®ã‚¯ã‚¨ãƒªã‚’å˜ã«ã‚­ãƒ¼ã¨ãªã‚‹ã‚«ãƒ©ãƒ ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’追加ã™ã‚‹ã“ã¨ã§é«˜é€ŸåŒ–ã—よã†ã¨ã™ã‚‹è‡ªç„¶ãªè¡å‹•ã¯ã€ã—ã°ã—ã°é–“é•ã£ã¦ã„ã¾ã™ã€‚ã“ã®é«˜åº¦ãªæ©Ÿèƒ½ã¯ã€ä»–ã®ä»£æ›¿æ‰‹æ®µã€ä¾‹ãˆã°ä¸»ã‚­ãƒ¼ã®å¤‰æ›´ï¼ˆ[主キーã®é¸ã³æ–¹](../best-practices/sparse-primary-indexes.md)ã‚’å‚照)ã€ãƒ—ロジェクションã®åˆ©ç”¨ã€ã¾ãŸã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚ŒãŸãƒ“ューを使用ã™ã‚‹ã¾ã§ã¯åˆ©ç”¨ã™ã‚‹ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。データスキッピングインデックスãŒé©åˆ‡ã§ã‚ã‚‹å ´åˆã§ã‚‚ã€å¤šãã®å ´åˆã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルã®ä¸¡æ–¹ã®æ…Žé‡ãªèª¿æ•´ãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚ + +ã»ã¨ã‚“ã©ã®å ´åˆã€æœ‰ç”¨ãªã‚¹ã‚­ãƒƒãƒ—インデックスã¯ã€ä¸»ã‚­ãƒ¼ã¨ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã®éžä¸»ã‚«ãƒ©ãƒ /å¼ã®å¼·ã„相関関係を必è¦ã¨ã—ã¾ã™ã€‚ +(上記ã®å›³ã®ã‚ˆã†ã«ï¼‰ç›¸é–¢ãŒãªã‘ã‚Œã°ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°æ¡ä»¶ãŒæ•°åƒã®å€¤ãƒ–ロックã®å°‘ãªãã¨ã‚‚1è¡Œã«ä¸€è‡´ã™ã‚‹å¯èƒ½æ€§ãŒé«˜ãã€å¤šãã®ãƒ–ロックã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã›ã‚“。対照的ã«ã€ä¸»ã‚­ãƒ¼ï¼ˆæ™‚間帯ã®ã‚ˆã†ãªï¼‰ã®å€¤ã®ç¯„囲ãŒã€æ½œåœ¨çš„ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚«ãƒ©ãƒ ï¼ˆãƒ†ãƒ¬ãƒ“視è´è€…ã®å¹´é½¢ï¼‰ã®å€¤ã¨å¼·ã関連ã—ã¦ã„ã‚‹å ´åˆã€minmaxタイプã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒæœ‰ç›Šã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚データを挿入ã™ã‚‹éš›ã«ã“ã®ç›¸é–¢é–¢ä¿‚を高ã‚ã‚‹ã“ã¨ãŒå¯èƒ½ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã‚Œã«ã¯ã€ä¸¦ã¹æ›¿ãˆ/ORDER BYキーã«è¿½åŠ ã®ã‚«ãƒ©ãƒ ã‚’å«ã‚ã‚‹ã€ã¾ãŸã¯ä¸»ã‚­ãƒ¼ã¨é–¢é€£ã™ã‚‹å€¤ãŒæŒ¿å…¥æ™‚ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚Œã‚‹ã‚ˆã†ã«ãƒãƒƒãƒæŒ¿å…¥ã™ã‚‹ã“ã¨ãŒå«ã¾ã‚Œã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。例ãˆã°ã€ã‚µã‚¤ãƒˆIDã”ã¨ã®ã™ã¹ã¦ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’ã¾ã¨ã‚ã¦ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã¦æŒ¿å…¥ãƒ—ロセスã«ã‚ˆã£ã¦ä¸€ç·’ã«æŒ¿å…¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å¤šãã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ãŒå°‘æ•°ã®ã‚µã‚¤ãƒˆIDã®ã¿ã‚’å«ã‚€ã‚ˆã†ã«ãªã‚Šã€ç‰¹å®šã®ã‚µã‚¤ãƒˆID値を検索ã™ã‚‹éš›ã«å¤šãã®ãƒ–ロックをスキップã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +スキップインデックスã®è‰¯ã„候補ã®1ã¤ã¯ã€é«˜ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã®å¼ã§ã€1ã¤ã®å€¤ãŒãƒ‡ãƒ¼ã‚¿å†…ã§æ¯”較的スパースã§ã‚ã‚‹å ´åˆã§ã™ã€‚ 1ã¤ã®ä¾‹ã¨ã—ã¦ã€APIリクエストã«ãŠã‘るエラーコードを追跡ã™ã‚‹è¦³æ¸¬ãƒ—ラットフォームãŒè€ƒãˆã‚‰ã‚Œã¾ã™ã€‚データ内ã§ç¨€ã§ã‚るエラーコードãŒç‰¹ã«é‡è¦ã§ã‚ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚エラーコードカラムã«å¯¾ã™ã‚‹ã‚»ãƒƒãƒˆã‚¹ã‚­ãƒƒãƒ—インデックスを設定ã™ã‚‹ã“ã¨ã§ã€ã‚¨ãƒ©ãƒ¼ã‚’å«ã¾ãªã„ブロックã®å¤§éƒ¨åˆ†ã‚’ãƒã‚¤ãƒ‘スã—ã€ã‚¨ãƒ©ãƒ¼ä¸­å¿ƒã®ã‚¯ã‚¨ãƒªã‚’大幅ã«æ”¹å–„ã§ãã¾ã™ã€‚ + +最後ã«ã€ä¸»è¦ãªãƒ™ã‚¹ãƒˆãƒ—ラクティスã¯ãƒ†ã‚¹ãƒˆã€ãƒ†ã‚¹ãƒˆã€ãƒ†ã‚¹ãƒˆã§ã™ã€‚ b-treeã®äºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚„文書ã®æ¤œç´¢ç”¨ã‚¤ãƒ³ãƒãƒ¼ãƒ†ãƒƒãƒ‰ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ã¯ç•°ãªã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ”ングインデックスã®å‹•ä½œã¯å®¹æ˜“ã«äºˆæ¸¬ã§ãã¾ã›ã‚“。テーブルã«è¿½åŠ ã™ã‚‹ã“ã¨ã¯ã€ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥æ™‚ãŠã‚ˆã³ã€ã„ãã¤ã‹ã®ç†ç”±ã§åˆ©ç›Šã‚’å¾—ãªã„クエリã®ä¸Šã§ã®æœ‰æ„義ãªã‚³ã‚¹ãƒˆã‚’ä¼´ã„ã¾ã™ã€‚常ã«å®Ÿä¸–ç•Œã®ãƒ‡ãƒ¼ã‚¿ã§ãƒ†ã‚¹ãƒˆã—ã€ãƒ†ã‚¹ãƒˆã«ã¯åž‹ã€ç²’度サイズã€ãŠã‚ˆã³ä»–ã®ãƒ‘ラメータã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã‚’å«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚テストã¯æ€è€ƒå®Ÿé¨“ã ã‘ã§ã¯æ˜Žã‚‰ã‹ã«ãªã‚‰ãªã„パターンやè½ã¨ã—穴を明らã‹ã«ã™ã‚‹ã“ã¨ãŒã‚ˆãã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/guides/best-practices/sparse-primary-indexes.md b/docs/ja/guides/best-practices/sparse-primary-indexes.md new file mode 100644 index 00000000000..5a961934363 --- /dev/null +++ b/docs/ja/guides/best-practices/sparse-primary-indexes.md @@ -0,0 +1,1459 @@ +--- +slug: /ja/optimize/sparse-primary-indexes +sidebar_label: スパース主キーインデックス +sidebar_position: 1 +description: ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ClickHouseã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ã¤ã„ã¦æ·±ã掘り下ã’ã¦è§£èª¬ã—ã¾ã™ã€‚ +--- + +# ClickHouseã«ãŠã‘る主キーインデックスã®å®Ÿè·µçš„ãªç´¹ä»‹ + +## ã¯ã˜ã‚ã« + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ClickHouseã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ã¤ã„ã¦è©³ã—ã解説ã—ã¾ã™ã€‚以下ã®ç‚¹ã«ã¤ã„ã¦å…·ä½“çš„ã«èª¬æ˜Žã—ã¾ã™ï¼š +- [ClickHouseã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒå¾“æ¥ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã¨ã©ã®ã‚ˆã†ã«ç•°ãªã‚‹ã‹](#an-index-design-for-massive-data-scales) +- [ClickHouseãŒã©ã®ã‚ˆã†ã«ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ãƒ‘ース主キーインデックスを構築ã—利用ã—ã¦ã„ã‚‹ã‹](#a-table-with-a-primary-key) +- [ClickHouseã§ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä½œæˆã®ãƒ™ã‚¹ãƒˆãƒ—ラクティスã¯ä½•ã‹](#using-multiple-primary-indexes) + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§æ案ã•ã‚Œã¦ã„ã‚‹ClickHouseã®ã™ã¹ã¦ã®SQL文やクエリをã€è‡ªåˆ†ã®ãƒžã‚·ãƒ³ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ClickHouseã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã¨é–‹å§‹æ‰‹é †ã«ã¤ã„ã¦ã¯ã€[クイックスタート](/docs/ja/quick-start.mdx)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +:::note +ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ClickHouseã®ã‚¹ãƒ‘ース主キーインデックスã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚ + +ClickHouseã®[二次データスキッピングインデックス](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-data_skipping-indexes)ã«ã¤ã„ã¦ã¯ã€[ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«](/docs/ja/guides/best-practices/skipping-indexes.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + + +### データセット + +ã“ã®ã‚¬ã‚¤ãƒ‰ã‚’通ã˜ã¦ã€åŒ¿å化ã•ã‚ŒãŸã‚¦ã‚§ãƒ–トラフィックデータセットã®ã‚µãƒ³ãƒ—ルを使用ã—ã¾ã™ã€‚ + +- 8.87百万行(イベント)ã®ã‚µãƒ–セットを使用ã—ã¾ã™ã€‚ +- 圧縮ã•ã‚Œã¦ã„ãªã„データサイズã¯8.87百万イベントã§ç´„700 MBã§ã™ã€‚ClickHouseã«æ ¼ç´ã™ã‚‹ã¨200 MBã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ +- サブセットã§ã¯ã€å„è¡Œã¯ç‰¹å®šã®æ™‚é–“ã«URLをクリックã—ãŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼ˆ`UserID`カラム)ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“れらã®3ã¤ã®ã‚«ãƒ©ãƒ ã‚’用ã„ã¦ã€æ¬¡ã®ã‚ˆã†ãªä¸€èˆ¬çš„ãªã‚¦ã‚§ãƒ–分æžã‚¯ã‚¨ãƒªã‚’æ—¢ã«ç«‹ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +- 「特定ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæœ€ã‚‚クリックã—ãŸURLã®ãƒˆãƒƒãƒ—10ã¯ä½•ã§ã™ã‹ï¼Ÿã€ +- 「特定ã®URLを最も頻ç¹ã«ã‚¯ãƒªãƒƒã‚¯ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒˆãƒƒãƒ—10ã¯èª°ã§ã™ã‹ï¼Ÿã€ +- 「ã‚るユーザーãŒç‰¹å®šã®URLをクリックã™ã‚‹æœ€ã‚‚人気ã®ã‚る時間(例:週ã®æ—¥ï¼‰ã¯ã„ã¤ã§ã™ã‹ï¼Ÿã€ + +### テストマシン + +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ç¤ºã•ã‚Œã¦ã„ã‚‹å…¨ã¦ã®å®Ÿè¡Œæ™‚é–“ã¯ã€Apple M1 Proãƒãƒƒãƒ—ã¨16GBã®RAMã‚’æ­è¼‰ã—ãŸMacBook Proã§ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³22.2.1をローカルã§å®Ÿè¡Œã—ãŸã‚‚ã®ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ + + +### フルテーブルスキャン + +主キーãªã—ã§ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªãŒã©ã®ã‚ˆã†ã«å®Ÿè¡Œã•ã‚Œã‚‹ã‹ã‚’確èªã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®SQL DDL文を実行ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼ˆãƒ†ãƒ¼ãƒ–ルエンジンã¯MergeTree): + +```sql +CREATE TABLE hits_NoPrimaryKey +( + `UserID` UInt32, + `URL` String, + `EventTime` DateTime +) +ENGINE = MergeTree +PRIMARY KEY tuple(); +``` + +次ã«ã€ä»¥ä¸‹ã®SQL挿入文を使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ã‚µãƒ–セットをテーブルã«æŒ¿å…¥ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€é éš”地ã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„る完全ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ã‚µãƒ–セットをロードã™ã‚‹ã®ã«[URLテーブル関数](/docs/ja/sql-reference/table-functions/url.md)を使用ã—ã¾ã™ï¼š + +```sql +INSERT INTO hits_NoPrimaryKey SELECT + intHash32(UserID) AS UserID, + URL, + EventTime +FROM url('https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz', 'TSV_FORMAT') +WHERE URL != ''; +``` +応答ã¯ï¼š +```response +Ok. + +0 rows in set. Elapsed: 145.993 sec. Processed 8.87 million rows, 18.40 GB (60.78 thousand rows/s., 126.06 MB/s.) +``` + +ClickHouseクライアントã®çµæžœå‡ºåŠ›ã¯ã€ä¸Šè¨˜ã®æ–‡ãŒ8.87百万行をテーブルã«æŒ¿å…¥ã—ãŸã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +最後ã«ã€ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã®ãƒ‡ã‚£ã‚¹ã‚«ãƒƒã‚·ãƒ§ãƒ³ã‚’ç°¡æ½”ã«ã—ã€å›³ã‚„çµæžœã‚’å†ç¾å¯èƒ½ã«ã™ã‚‹ãŸã‚ã«ã€FINALキーワードを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを[最é©åŒ–](/docs/ja/sql-reference/statements/optimize.md)ã—ã¾ã™ï¼š + +```sql +OPTIMIZE TABLE hits_NoPrimaryKey FINAL; +``` + +:::note +一般的ã«ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ロードã—ãŸç›´å¾Œã«ãƒ†ãƒ¼ãƒ–ルを最é©åŒ–ã™ã‚‹ã“ã¨ã¯å¿…é ˆã§ã‚‚推奨ã•ã‚Œã‚‹ã“ã¨ã§ã‚‚ã‚ã‚Šã¾ã›ã‚“。ã“ã®ä¾‹ã§ãªãœã“ã‚ŒãŒå¿…è¦ã‹ã¯æ˜Žã‚‰ã‹ã«ãªã‚‹ã§ã—ょã†ã€‚ +::: + +今ã€ç§ãŸã¡ã¯æœ€åˆã®ã‚¦ã‚§ãƒ–分æžã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚次ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ID 749927693ã®ãƒˆãƒƒãƒ—10最もクリックã•ã‚ŒãŸURLを計算ã—ã¦ã„ã¾ã™ï¼š + +```sql +SELECT URL, count(URL) as Count +FROM hits_NoPrimaryKey +WHERE UserID = 749927693 +GROUP BY URL +ORDER BY Count DESC +LIMIT 10; +``` +応答ã¯ï¼š +```response +┌─URL────────────────────────────┬─Count─┠+│ http://auto.ru/chatay-barana.. │ 170 │ +│ http://auto.ru/chatay-id=371...│ 52 │ +│ http://public_search │ 45 │ +│ http://kovrik-medvedevushku-...│ 36 │ +│ http://forumal │ 33 │ +│ http://korablitz.ru/L_1OFFER...│ 14 │ +│ http://auto.ru/chatay-id=371...│ 14 │ +│ http://auto.ru/chatay-john-D...│ 13 │ +│ http://auto.ru/chatay-john-D...│ 10 │ +│ http://wot/html?page/23600_m...│ 9 │ +└────────────────────────────────┴───────┘ + +10 rows in set. Elapsed: 0.022 sec. +// highlight-next-line +Processed 8.87 million rows, +70.45 MB (398.53 million rows/s., 3.17 GB/s.) +``` + +ClickHouseクライアントã®çµæžœå‡ºåŠ›ã¯ã€ClickHouseãŒãƒ•ãƒ«ãƒ†ãƒ¼ãƒ–ルスキャンを実行ã—ãŸã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ï¼ãƒ†ãƒ¼ãƒ–ルã®8.87百万行ã®ãã‚Œãžã‚ŒãŒClickHouseã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œã¾ã—ãŸã€‚ã“ã‚Œã¯ã‚¹ã‚±ãƒ¼ãƒ«ã—ã¾ã›ã‚“。 + +ã“れをより効率的ã§é«˜é€Ÿã«ã™ã‚‹ãŸã‚ã«ã¯ã€é©åˆ‡ãªä¸»ã‚­ãƒ¼ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ClickHouseã¯ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã«åŸºã¥ã„ã¦è‡ªå‹•çš„ã«ã‚¹ãƒ‘ース主キーインデックスを作æˆã§ãã€ãã®å¾Œã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’大幅ã«é«˜é€ŸåŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### 関連コンテンツ +- ブログ: [ClickHouseクエリã®é«˜é€ŸåŒ–](https://clickhouse.com/blog/clickhouse-faster-queries-with-projections-and-primary-indexes) + +## ClickHouseインデックスデザイン + +### 大è¦æ¨¡ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚±ãƒ¼ãƒ«å‘ã‘ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹è¨­è¨ˆ + +従æ¥ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã§ã¯ã€ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ãƒ†ãƒ¼ãƒ–ル行ã”ã¨ã«1ã¤ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã‚’å«ã¿ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æˆ‘々ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã¯ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒ8.87百万ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã‚’å«ã‚€ã“ã¨ã«ãªã‚Šã€ç‰¹å®šã®è¡Œã‚’ã™ã°ã‚„ã見ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã€é«˜åŠ¹çŽ‡ãªãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—クエリã¨ãƒã‚¤ãƒ³ãƒˆã‚¢ãƒƒãƒ—デートãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚`B(+)-Tree`データ構造ã§ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼æ¤œç´¢ã¯å¹³å‡çš„ã«`O(log n)`ã®æ™‚間複雑度をæŒã¡ã¾ã™ã€‚ã•ã‚‰ã«æ­£ç¢ºã«ã¯ã€`b`ãŒé€šå¸¸æ•°ç™¾ã‹ã‚‰æ•°åƒã®ç¯„囲ã§ã‚ã‚‹ãŸã‚ã€`B(+)-Tree`ã¯éžå¸¸ã«æµ…ã„構造ã§ã‚ã‚Šã€å°‘æ•°ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¢ã‚¯ã‚»ã‚¹ã§ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’見ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚8.87百万ã®è¡Œã¨1000ã®ãƒ–ランãƒãƒ³ã‚°ãƒ•ã‚¡ã‚¯ã‚¿ãƒ¼ã§ã‚ã‚Œã°ã€å¹³å‡ã—ã¦2.3回ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¢ã‚¯ã‚»ã‚¹ãŒå¿…è¦ã§ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã‚³ã‚¹ãƒˆã¨ã¨ã‚‚ã«æ¥ã¾ã™ï¼šè¿½åŠ ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¨ãƒ¡ãƒ¢ãƒªã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã€æ–°ã—ã„行をテーブルã¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«è¿½åŠ ã™ã‚‹éš›ã®é«˜ã„挿入コストã€æ™‚ã«ã¯B-Treeã®å†ãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ã‚‚å¿…è¦ã§ã™ã€‚ + +B-Treeインデックスã«é–¢é€£ã™ã‚‹èª²é¡Œã‚’考慮ã—ã¦ã€ClickHouseã®ãƒ†ãƒ¼ãƒ–ルエンジンã¯ç•°ãªã‚‹ã‚¢ãƒ—ローãƒã‚’利用ã—ã¾ã™ã€‚ClickHouseã®[MergeTreeエンジンファミリー](/docs/ja/engines/table-engines/mergetree-family/index.md)ã¯ã€å·¨å¤§ãªãƒ‡ãƒ¼ã‚¿é‡ã‚’処ç†ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚Œæœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“れらã®ãƒ†ãƒ¼ãƒ–ルã¯ã€æ¯Žç§’数百万行ã®æŒ¿å…¥ã‚’å—ã‘å–ã‚Šã€éžå¸¸ã«å¤§ããªï¼ˆæ•°ç™¾ãƒšã‚¿ãƒã‚¤ãƒˆï¼‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚データã¯ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦[パートã”ã¨](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#mergetree-data-storage)ã«è¿…速ã«æ›¸ãè¾¼ã¾ã‚Œã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‘ートã®ãƒžãƒ¼ã‚¸ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ClickHouseã§ã¯ã€å„パートã«ã¯ç‹¬è‡ªã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒã‚ã‚Šã¾ã™ã€‚パートãŒãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹ã¨ã€ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒ‘ートã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚‚マージã•ã‚Œã¾ã™ã€‚ClickHouseãŒè¨­è¨ˆã•ã‚Œã¦ã„ã‚‹éžå¸¸ã«å¤§è¦æ¨¡ãªã‚¹ã‚±ãƒ¼ãƒ«ã§ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ã¨ãƒ¡ãƒ¢ãƒªã®åŠ¹çŽ‡ãŒéžå¸¸ã«é‡è¦ã§ã™ã€‚ãã®ãŸã‚ã€å…¨ã¦ã®è¡Œã‚’インデックス化ã™ã‚‹ã®ã§ã¯ãªãã€ãƒ‘ートã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ã¯è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—(「グラニュールã€ã¨å‘¼ã°ã‚Œã‚‹ï¼‰ã”ã¨ã«1ã¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¨ãƒ³ãƒˆãƒªï¼ˆã€Œãƒžãƒ¼ã‚¯ã€ã¨ã—ã¦çŸ¥ã‚‰ã‚Œã‚‹ï¼‰ãŒã‚ã‚Šã¾ã™ - ã“ã®ãƒ†ã‚¯ãƒ‹ãƒƒã‚¯ã¯**スパースインデックス**ã¨å‘¼ã°ã‚Œã¾ã™ã€‚ + +スパースインデックスã¯ã€ClickHouseãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§è¡Œã‚’主キーã®ã‚«ãƒ©ãƒ ã§é †åºä»˜ã‘ã¦ä¿å­˜ã™ã‚‹ãŸã‚ã«å¯èƒ½ã§ã™ã€‚`B-Tree`ベースã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã‚ˆã†ã«å˜ä¸€ã®è¡Œã‚’直接見ã¤ã‘出ã™ã®ã§ã¯ãªãã€ã‚¹ãƒ‘ース主キーインデックスを使ã†ã“ã¨ã§ã‚¯ã‚¨ãƒªã«ä¸€è‡´ã™ã‚‹å¯èƒ½æ€§ã®ã‚ã‚‹è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’ç´ æ—©ã(インデックスエントリã«å¯¾ã™ã‚‹ãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒã‚’介ã—ã¦ï¼‰ç‰¹å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚クエリã«ä¸€è‡´ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—(グラニュール)ã¯ã€ãã®å¾Œã€ä¸¦è¡Œã—ã¦ClickHouseエンジンã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œã€ãƒžãƒƒãƒã‚’見ã¤ã‘出ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ‡ã‚¶ã‚¤ãƒ³ã«ã‚ˆã‚Šã€ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯å°ã•ã(完全ã«ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã«åŽã¾ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œæ™‚間を大幅ã«çŸ­ç¸®ã—ã¾ã™ï¼šç‰¹ã«ãƒ‡ãƒ¼ã‚¿åˆ†æžãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§ä¸€èˆ¬çš„ãªç¯„囲クエリã®å ´åˆã§ã™ã€‚ + +以下ã§ã¯ã€ClickHouseãŒã©ã®ã‚ˆã†ã«ã‚¹ãƒ‘ース主キーインデックスを構築ã—使用ã—ã¦ã„ã‚‹ã‹ã‚’詳ã—ã説明ã—ã¾ã™ã€‚ãã®å¾Œã€ãƒ†ãƒ¼ãƒ–ルã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ï¼ˆä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ï¼‰ã‚’構築ã™ã‚‹éš›ã®é¸æŠžã€å‰Šé™¤ãŠã‚ˆã³é †åºä»˜ã‘ã®ãƒ™ã‚¹ãƒˆãƒ—ラクティスをã„ãã¤ã‹è­°è«–ã—ã¾ã™ã€‚ + +### 主キーをæŒã¤ãƒ†ãƒ¼ãƒ–ル + +UserIDã¨URLをキーã¨ã—ãŸè¤‡åˆä¸»ã‚­ãƒ¼ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +```sql +CREATE TABLE hits_UserID_URL +( + `UserID` UInt32, + `URL` String, + `EventTime` DateTime +) +ENGINE = MergeTree +// highlight-next-line +PRIMARY KEY (UserID, URL) +ORDER BY (UserID, URL, EventTime) +SETTINGS index_granularity = 8192, index_granularity_bytes = 0, compress_primary_key = 0; +``` + +[//]: # (
) +
+ + DDLæ–‡ã®è©³ç´° + +

+ +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã®ãƒ‡ã‚£ã‚¹ã‚«ãƒƒã‚·ãƒ§ãƒ³ã‚’ç°¡æ½”ã«ã—ã€çµæžœã‚’å†ç¾å¯èƒ½ã«ã™ã‚‹ãŸã‚ã€DDLæ–‡ã¯ä»¥ä¸‹ã«ç¤ºã™ã‚ˆã†ã« +

    +
  • `ORDER BY`å¥ã‚’使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルã®è¤‡åˆã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’指定ã—ã¾ã™
  • +
    +
  • 以下ã®è¨­å®šã‚’通ã˜ã¦ã€ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼æ•°ã‚’明示的ã«åˆ¶å¾¡ã—ã¾ã™ï¼š
  • +
    +
      +
    • `index_granularity`: デフォルト値ã®8192ã«æ˜Žç¤ºçš„ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€8192è¡Œã”ã¨ã«ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«1ã¤ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ãŒä½œæˆã•ã‚Œã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒ†ãƒ¼ãƒ–ルã«16384è¡ŒãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ã¯2ã¤ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ãŒå­˜åœ¨ã—ã¾ã™ã€‚ +
    • +
      +
    • `index_granularity_bytes`: é©å¿œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç²’度を無効ã«ã™ã‚‹ãŸã‚ã«0ã«è¨­å®šã•ã‚Œã¾ã™ã€‚é©å¿œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç²’度ã¨ã„ã†ã®ã¯ã€ClickHouseãŒnè¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å¯¾ã—ã¦ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã‚’自動的ã«ä½œæˆã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ã“れらã®æ¡ä»¶ãŒæˆã‚Šç«‹ã¤å ´åˆï¼š +
        +
      • nãŒ8192よりå°ã•ãã€ãã®nè¡Œã®åˆè¨ˆãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºãŒ10 MB以上(index_granularity_bytesã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼‰ã§ã‚ã‚‹å ´åˆã€ã‚ã‚‹ã„ã¯
      • +
      • nè¡Œã®åˆè¨ˆãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºãŒ10 MB未満ã§ã‚ã‚‹ãŒã€nãŒ8192ã§ã‚ã‚‹å ´åˆã€‚
      • +
      +
    • +
      +
    • `compress_primary_key`: 主キーã®åœ§ç¸®ã‚’無効化ã™ã‚‹ãŸã‚ã«0ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å¾Œã§ãã®å†…容を任æ„ã§ç¢ºèªã§ãã¾ã™ã€‚ +
    • +
    +
+

+
+ +上記ã®DDLæ–‡ã®ä¸»ã‚­ãƒ¼ã¯ã€æŒ‡å®šã•ã‚ŒãŸ2ã¤ã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã«åŸºã¥ã„ã¦ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’作æˆã•ã›ã¾ã™ã€‚ + +
+次ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ï¼š + +```sql +INSERT INTO hits_UserID_URL SELECT + intHash32(UserID) AS UserID, + URL, + EventTime +FROM url('https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz', 'TSV_FORMAT') +WHERE URL != ''; +``` +応答ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š +```response +0 rows in set. Elapsed: 149.432 sec. Processed 8.87 million rows, 18.40 GB (59.38 thousand rows/s., 123.16 MB/s.) +``` + +
+ãã—ã¦ãƒ†ãƒ¼ãƒ–ルを最é©åŒ–ã—ã¾ã™ï¼š + +```sql +OPTIMIZE TABLE hits_UserID_URL FINAL; +``` + +
+以下ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã§ãã¾ã™ï¼š + +```sql +SELECT + part_type, + path, + formatReadableQuantity(rows) AS rows, + formatReadableSize(data_uncompressed_bytes) AS data_uncompressed_bytes, + formatReadableSize(data_compressed_bytes) AS data_compressed_bytes, + formatReadableSize(primary_key_bytes_in_memory) AS primary_key_bytes_in_memory, + marks, + formatReadableSize(bytes_on_disk) AS bytes_on_disk +FROM system.parts +WHERE (table = 'hits_UserID_URL') AND (active = 1) +FORMAT Vertical; +``` + +応答ã¯ï¼š + +```response +part_type: Wide +path: ./store/d9f/d9f36a1a-d2e6-46d4-8fb5-ffe9ad0d5aed/all_1_9_2/ +rows: 8.87 million +data_uncompressed_bytes: 733.28 MiB +data_compressed_bytes: 206.94 MiB +primary_key_bytes_in_memory: 96.93 KiB +marks: 1083 +bytes_on_disk: 207.07 MiB + +1 rows in set. Elapsed: 0.003 sec. +``` + +ClickHouseクライアントã®å‡ºåŠ›ãŒç¤ºã—ã¦ã„ã‚‹ã®ã¯ï¼š + +- テーブルã®ãƒ‡ãƒ¼ã‚¿ãŒ[ワイドフォーマット](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#mergetree-data-storage)ã§ç‰¹å®šã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ä¿å­˜ã•ã‚Œã¦ãŠã‚Šã€ãã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…ã§ãƒ†ãƒ¼ãƒ–ルカラムã”ã¨ã«ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆãŠã‚ˆã³ãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ï¼‰ãŒ1ã¤ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +- テーブルã«ã¯8.87百万行ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ +- å…¨ã¦ã®è¡Œã®éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºãŒ733.28 MBã§ã™ã€‚ +- å…¨ã¦ã®è¡Œã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ã®åœ§ç¸®ã‚µã‚¤ã‚ºã¯206.94 MBã§ã™ã€‚ +- テーブルã¯ã€1083個ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ï¼ˆã€Œãƒžãƒ¼ã‚¯ã€ã¨å‘¼ã°ã‚Œã‚‹ï¼‰ã‚’æŒã¤ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’æŒã¡ã€ãã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã‚µã‚¤ã‚ºã¯96.93 KBã§ã™ã€‚ +- åˆè¨ˆã§ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãŠã‚ˆã³ãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã¨ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’åˆã‚ã›ã¦ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§207.07 MBを消費ã—ã¦ã„ã¾ã™ã€‚ + +### 主キーã®ã‚«ãƒ©ãƒ ã§é †åºä»˜ã‘ã•ã‚ŒãŸãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ + +上ã§ä½œæˆã—ãŸãƒ†ãƒ¼ãƒ–ルã«ã¯ +- 複åˆ[主キー](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#primary-keys-and-indexes-in-queries) `(UserID, URL)` 㨠+- 複åˆ[ソートキー](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#choosing-a-primary-key-that-differs-from-the-sorting-key) `(UserID, URL, EventTime)` ã‚’æŒã¡ã¾ã™ã€‚ + +:::note +- ソートキーã®ã¿ã‚’指定ã—ãŸå ´åˆã€ä¸»ã‚­ãƒ¼ã¯æš—黙的ã«ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã¨åŒã˜ã‚‚ã®ã¨ã—ã¦å®šç¾©ã•ã‚Œã¾ã™ã€‚ + +- メモリ効率を追求ã™ã‚‹ãŸã‚ã«ã€ã‚¯ã‚¨ãƒªãŒãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚«ãƒ©ãƒ ã ã‘ã‚’å«ã‚€ä¸»ã‚­ãƒ¼ã‚’明示的ã«æŒ‡å®šã—ã¾ã—ãŸã€‚主キーã«åŸºã¥ã主キーインデックスã¯å®Œå…¨ã«ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +- ガイド内ã®å›³ã«ä¸€è²«æ€§ã‚’æŒãŸã›ã€åœ§ç¸®çŽ‡ã‚’最大化ã™ã‚‹ãŸã‚ã€ãƒ†ãƒ¼ãƒ–ルã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’å«ã‚€ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’別途定義ã—ã¾ã—ãŸï¼ˆã‚«ãƒ©ãƒ å†…ã®é¡žä¼¼ãƒ‡ãƒ¼ã‚¿ã‚’è¿‘ãã«é…ç½®ã™ã‚‹ã¨ã€ã‚ˆã‚Šè‰¯ã„圧縮ãŒå¯èƒ½ã§ã™ï¼‰ã€‚ + +- 両方ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ä¸»ã‚­ãƒ¼ã¯ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã®æŽ¥é ­è¾žã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + + +挿入ã•ã‚ŒãŸè¡Œã¯ã€ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ï¼ˆãŠã‚ˆã³ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã®è¿½åŠ ã‚«ãƒ©ãƒ ï¼‰ã§è¾žæ›¸çš„é †åºï¼ˆæ˜‡é †ï¼‰ã§ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚ + +:::note +ClickHouseã¯ã€ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ å€¤ãŒåŒä¸€ã®è¤‡æ•°ã®è¡Œã‚’挿入ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¦ã„ã¾ã™ã€‚ã“ã®å ´åˆï¼ˆä¸‹å›³ã®è¡Œ1ã¨è¡Œ2ã‚’å‚照)ã€æœ€çµ‚çš„ãªé †åºã¯æŒ‡å®šã•ã‚ŒãŸã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã€ã—ãŸãŒã£ã¦`EventTime`カラムã®å€¤ã«ã‚ˆã£ã¦æœ€çµ‚çš„ãªé †åºãŒæ±ºå®šã•ã‚Œã¾ã™ã€‚ +::: + + + +ClickHouseã¯çœŸã®åˆ—指å‘データベース管ç†ã‚·ã‚¹ãƒ†ãƒ ã§ã™ã€‚図ã«ç¤ºã™ã‚ˆã†ã« +- ディスク上ã®è¡¨ç¾ã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®å„カラムã«å¯¾ã—ã¦å˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆ*.bin)ãŒå­˜åœ¨ã—ã€ãã®ã‚«ãƒ©ãƒ ã®å…¨ã¦ã®å€¤ãŒåœ§ç¸®ã•ã‚ŒãŸå½¢å¼ã§ä¿å­˜ã•ã‚Œã€ãã—㦠+- è¡Œã¯ã€ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ï¼ˆãŠã‚ˆã³ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã®è¿½åŠ ã‚«ãƒ©ãƒ ï¼‰ã§è¾žæ›¸çš„ã«æ˜‡é †ã§ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ã¤ã¾ã‚Šã“ã®å ´åˆã¯ + - 最åˆã« `UserID` ã§ã€ + - 次㫠`URL` ã§ã€ + - 最後㫠`EventTime` ã§ï¼š + + +UserID.bin, URL.bin, ãŠã‚ˆã³ EventTime.binã¯ã€`UserID`ã€`URL`ã€ãŠã‚ˆã³ `EventTime`カラムã®å€¤ãŒä¿å­˜ã•ã‚Œã¦ã„るディスク上ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã§ã™ã€‚ + +
+
+ + +:::note +- 主キーãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®è¡Œã®è¾žæ›¸çš„é †åºã‚’定義ã™ã‚‹ãŸã‚ã€ãƒ†ãƒ¼ãƒ–ルã«ã¯1ã¤ã®ä¸»ã‚­ãƒ¼ã—ã‹æŒã¦ã¾ã›ã‚“。 + +- 行を番å·ä»˜ã‘ã™ã‚‹ã¨ãã€ClickHouseã®å†…部行番å·ä»˜ã‘スキームã¨ä¸€è‡´ã™ã‚‹ã‚ˆã†ã«0ã‹ã‚‰å§‹ã‚ã¦ã„ã¾ã™ã€‚ã¾ãŸãƒ­ã‚°ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«ã‚‚使用ã•ã‚Œã¾ã™ã€‚ +::: + + + +### データã¯ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã«çµ„織化ã•ã‚Œã€ä¸¦è¡Œçš„ã«å‡¦ç†ã•ã‚Œã‚‹ + +データ処ç†ã®ç›®çš„上ã€ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã®å€¤ã¯è«–ç†çš„ã«ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã«åˆ†å‰²ã•ã‚Œã¾ã™ã€‚ +グラニュールã¯ClickHouseã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œã‚‹æœ€å°ã®åˆ†å‰²å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã™ã€‚ +ã“ã‚Œã¯ã€ClickHouseãŒå€‹ã€…ã®è¡Œã‚’読むã®ã§ã¯ãªãã€å¸¸ã«1ã¤ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ï¼ˆã¤ã¾ã‚Šã€è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—)を読ã¿å–ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +:::note +カラムã®å€¤ã¯ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«å†…ã«ç‰©ç†çš„ã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。グラニュールã¯ã‚¯ã‚¨ãƒªå‡¦ç†ã®ãŸã‚ã®ã‚«ãƒ©ãƒ å€¤ã®è«–ç†çš„ãªçµ„ç¹”ã§ã™ã€‚ +::: + +以下ã®å›³ã¯ã€æˆ‘々ã®ãƒ†ãƒ¼ãƒ–ルã®8.87百万行(ãã®ã‚«ãƒ©ãƒ ã®å€¤ï¼‰ãŒã€ãƒ†ãƒ¼ãƒ–ルã®DDLæ–‡ã«`index_granularity`(デフォルト値ã§ã‚ã‚‹8192ã«è¨­å®šï¼‰ã®è¨­å®šã‚’å«ã‚€çµæžœã¨ã—ã¦ã€1083個ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã«ã©ã®ã‚ˆã†ã«çµ„織化ã•ã‚Œã¦ã„ã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + + + +最åˆã®ï¼ˆãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ç‰©ç†çš„ãªé †åºã«åŸºã¥ã„ãŸï¼‰8192行(ãã®ã‚«ãƒ©ãƒ ã®å€¤ï¼‰ã¯è«–ç†çš„ã«ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«0ã«å±žã—ã€æ¬¡ã®8192行(ãã®ã‚«ãƒ©ãƒ ã®å€¤ï¼‰ã¯ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«1ã«å±žã™ã‚‹ã€ã¨ã„ã†å…·åˆã§ã™ã€‚ + +:::note +- 最後ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ï¼ˆã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«1082)ã¯8192行未満を「å«ã‚“ã§ã„ã¾ã™ã€ã€‚ + +- ã“ã®ã‚¬ã‚¤ãƒ‰ã®å†’é ­ã§è¿°ã¹ãŸã‚ˆã†ã«ã€ã€ŒDDLæ–‡ã®è©³ç´°ã€ã§é©å¿œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç²’度を無効化ã—ã¾ã—ãŸï¼ˆã“ã®ã‚¬ã‚¤ãƒ‰ã®ãƒ‡ã‚£ã‚¹ã‚«ãƒƒã‚·ãƒ§ãƒ³ã‚’ç°¡æ½”ã«ã—ã€å›³ã¨çµæžœã‚’å†ç¾å¯èƒ½ã«ã™ã‚‹ãŸã‚)。 + + ã—ãŸãŒã£ã¦ã€æˆ‘々ã®ä¾‹ã®ãƒ†ãƒ¼ãƒ–ルã®ã™ã¹ã¦ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ï¼ˆæœ€å¾Œã®1ã¤ã‚’除ã)ã¯åŒã˜ã‚µã‚¤ã‚ºã‚’æŒã£ã¦ã„ã¾ã™ã€‚ + +- é©å¿œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç²’度(index_granularity_bytesãŒ[デフォルトã§](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#index_granularity_bytes)é©å¿œçš„ã§ã‚る)をæŒã¤ãƒ†ãƒ¼ãƒ–ルã§ã¯ã€ä¸€éƒ¨ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã®ã‚µã‚¤ã‚ºãŒã€è¡Œãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã«ã‚ˆã£ã¦ã¯8192行未満ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + + + +- 主キーã®ã‚«ãƒ©ãƒ ï¼ˆ`UserID`ã€`URL`)ã®ä¸€éƒ¨ã®ã‚«ãƒ©ãƒ å€¤ã‚’オレンジ色ã§ãƒžãƒ¼ã‚¯ã—ã¾ã—ãŸã€‚ + ã“れらã®ã‚ªãƒ¬ãƒ³ã‚¸è‰²ã§ãƒžãƒ¼ã‚¯ã•ã‚ŒãŸã‚«ãƒ©ãƒ å€¤ã¯ã€å„グラニュールã®æœ€åˆã®è¡Œã®ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ å€¤ã§ã™ã€‚ + ã“れらã®ã‚ªãƒ¬ãƒ³ã‚¸è‰²ã§ãƒžãƒ¼ã‚¯ã•ã‚ŒãŸã‚«ãƒ©ãƒ å€¤ãŒã€ãƒ†ãƒ¼ãƒ–ルã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã«ãªã‚Šã¾ã™ã€‚ + +- グラニュールを番å·ä»˜ã‘ã™ã‚‹ã¨ãã€ClickHouseã®å†…部ã®ç•ªå·ä»˜ã‘スキームã¨ä¸€è‡´ã—ã€ã¾ãŸãƒ­ã‚°ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«ã‚‚使用ã•ã‚Œã‚‹ã‚ˆã†ã«0ã‹ã‚‰å§‹ã‚ã¦ã„ã¾ã™ã€‚ +::: + + + +### 主キーインデックスã¯ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã”ã¨ã«1エントリーをæŒã¤ + +主キーインデックスã¯ä¸Šå›³ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã«åŸºã¥ã„ã¦ä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯æœªåœ§ç¸®ã®ãƒ•ãƒ©ãƒƒãƒˆã‚¢ãƒ¬ã‚¤ãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆprimary.idx)ã§ã‚ã‚Šã€0ã‹ã‚‰å§‹ã¾ã‚‹æ•°å€¤ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã‚’å«ã¿ã¾ã™ã€‚ + +下記ã®å›³ã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒå„グラニュールã®æœ€åˆã®è¡Œã®ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ å€¤ï¼ˆä¸Šå›³ã§ã‚ªãƒ¬ãƒ³ã‚¸è‰²ã§ãƒžãƒ¼ã‚¯ã•ã‚Œã¦ã„る値)をã©ã®ã‚ˆã†ã«ä¿å­˜ã—ã¦ã„ã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ +ã‚ã‚‹ã„ã¯ã€è¨€ã„æ›ãˆã‚‹ã¨ï¼šä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ å€¤ã‚’テーブルã®æ¯Žã®8192行目ã‹ã‚‰ä¿å­˜ã—ã¦ã„ã¾ã™ï¼ˆç‰©ç†çš„ãªé †åºã«åŸºã¥ã)。 +例ãˆã° +- 最åˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¨ãƒ³ãƒˆãƒªãƒ¼ï¼ˆä¸‹å›³ã§ã€Œãƒžãƒ¼ã‚¯0ã€ï¼‰ã¯ã€ä¸Šå›³ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«0ã®æœ€åˆã®è¡Œã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ å€¤ã‚’ä¿å­˜ã—ã¦ã„ã¾ã™ã€‚ +- 2番目ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¨ãƒ³ãƒˆãƒªãƒ¼ï¼ˆä¸‹å›³ã§ã€Œãƒžãƒ¼ã‚¯1ã€ï¼‰ã¯ã€ä¸Šå›³ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«1ã®æœ€åˆã®è¡Œã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ å€¤ã‚’ä¿å­˜ã—ã¦ã„ã¾ã™ã€‚ + + + +åˆè¨ˆã§ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€æˆ‘々ã®ãƒ†ãƒ¼ãƒ–ルã®8.87百万行ã¨1083グラニュール用ã«1083個ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã‚’æŒã£ã¦ã„ã¾ã™ï¼š + + + +:::note +- é©å¿œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç²’度(index_granularity_bytes㌠[デフォルトã§](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#index_granularity_bytes)é©å¿œçš„ã§ã‚る)をæŒã¤ãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ル行ã®æœ€å¾Œã¾ã§ã®æœ«å°¾ã®ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ å€¤ã‚’記録ã™ã‚‹ã€Œæœ€çµ‚ã€è¿½åŠ ãƒžãƒ¼ã‚¯ã‚‚ストアã•ã‚Œã¾ã™ãŒã€æˆ‘々ã®ä¾‹ã®ãƒ†ãƒ¼ãƒ–ルã§ã¯ã“ã®é©å¿œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç²’度を無効化ã—ãŸãŸã‚(ã“ã®ã‚¬ã‚¤ãƒ‰ã®ãƒ‡ã‚£ã‚¹ã‚«ãƒƒã‚·ãƒ§ãƒ³ã‚’ç°¡æ½”ã«ã—ã€å›³ã¨çµæžœã‚’å†ç¾å¯èƒ½ã«ã™ã‚‹ãŸã‚)ã€å®Ÿä¾‹ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ã¯ã“ã®æœ€çµ‚çš„ãªãƒžãƒ¼ã‚¯ã¯å«ã¾ã‚Œã¾ã›ã‚“。 + +- 主キーインデックスファイルã¯å®Œå…¨ã«ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ã‚‚ã—ファイルãŒåˆ©ç”¨å¯èƒ½ãªç©ºãメモリ容é‡ã‚ˆã‚Šå¤§ãã„å ´åˆã€ClickHouseã¯ã‚¨ãƒ©ãƒ¼ã‚’スローã—ã¾ã™ã€‚ +::: + +
+ + 主キーインデックスã®å†…容を調ã¹ã‚‹ + +

+ +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseクラスタã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ãƒ†ãƒ¼ãƒ–ル関数を使用ã—ã¦ã€ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®å†…容を調ã¹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãã®ãŸã‚ã«ã¯ã¾ãšã€ç¨¼åƒä¸­ã®ã‚¯ãƒ©ã‚¹ã‚¿ã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰ã®user_files_pathã«ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’コピーã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š +

    +
  • ステップ1: 主キーインデックスファイルをå«ã‚€ãƒ‘ートパスをå–å¾— +
  • +` +SELECT path FROM system.parts WHERE table = 'hits_UserID_URL' AND active = 1 +` + + +テストマシンã§ã¯ã€`/Users/tomschreiber/Clickhouse/store/85f/85f4ee68-6e28-4f08-98b1-7d8affa1d88c/all_1_9_4` ã‚’è¿”ã—ã¾ã™ã€‚ + +
  • ステップ2: user_files_pathã‚’å–å¾— +
  • +Linuxã®å ´åˆã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®user_files_path㯠+`/var/lib/clickhouse/user_files/` + +Linuxã§ãƒ‘スãŒå¤‰æ›´ã•ã‚Œã¦ã„ãŸã‹ã©ã†ã‹ã‚’確èªã§ãã¾ã™ã€‚: `$ grep user_files_path /etc/clickhouse-server/config.xml` + +テストマシンã®ãƒ‘ス㯠`/Users/tomschreiber/Clickhouse/user_files/` ã§ã™ã€‚ + +
  • ステップ3: 主キーインデックスファイルをuser_files_pathã«ã‚³ãƒ”ー +
  • +` +cp /Users/tomschreiber/Clickhouse/store/85f/85f4ee68-6e28-4f08-98b1-7d8affa1d88c/all_1_9_4/primary.idx /Users/tomschreiber/Clickhouse/user_files/primary-hits_UserID_URL.idx +` + +
    + +
+ +上ã®SQLを使用ã—ã¦ã€ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®å†…容を調ã¹ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š +
    +
  • エントリー数をå–å¾— +
  • +` +SELECT count( )
    FROM file('primary-hits_UserID_URL.idx', 'RowBinary', 'UserID UInt32, URL String'); +` + +
    +
    +`1083`ã‚’è¿”ã—ã¾ã™ã€‚ +
    +
    +
  • 最åˆã®2ã¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã‚’å–å¾— +
  • +` +SELECT UserID, URL
    FROM file('primary-hits_UserID_URL.idx', 'RowBinary', 'UserID UInt32, URL String')
    LIMIT 0, 2; +` +
    +
    +次を返ã—ã¾ã™ +
    +` +240923, http://showtopics.html%3...
    +4073710, http://mk.ru&pos=3_0 +` +
    +
    +
  • 最後ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã‚’å–å¾— +
  • +` +SELECT UserID, URL
    FROM file('primary-hits_UserID_URL.idx', 'RowBinary', 'UserID UInt32, URL String')
    LIMIT 1082, 1; +` +
    +
    +次を返ã—ã¾ã™ +
    +` +4292714039 │ http://sosyal-mansetleri... +` + + +
+ +ã“ã‚Œã¯ã€æˆ‘々ã®ä¾‹ã®ãƒ†ãƒ¼ãƒ–ルã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®å†…容ã®å›³ã¨å®Œå…¨ã«ä¸€è‡´ã—ã¾ã™ï¼š + +

+
+ +主キーエントリーã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã¨å‘¼ã°ã‚Œã¾ã™ã€ãªãœãªã‚‰å„インデックスエントリーã¯ç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿ç¯„囲ã®é–‹å§‹ã‚’指ã—示ã—ã¦ã„ã‚‹ãŸã‚ã§ã™ã€‚具体的ã«ã„ã†ã¨ä¾‹ã®ãƒ†ãƒ¼ãƒ–ルã§ã¯ï¼š +- UserIDインデックスマーク:
+ 主キーインデックスã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹`UserID`値ã¯æ˜‡é †ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚
+ 上記ã®ãƒžãƒ¼ã‚¯176ã¯ã€ã™ã¹ã¦ã®è¡ŒãŒgranule 176ã«ã‚ã‚Šã€ãã®å¾Œã®ã™ã¹ã¦ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã«ã‚‚`UserID`ã®å€¤ã¯749.927.693以上ã«ãªã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¦ã„ã‚‹ã¨ã„ã†ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + + [後述ã™ã‚‹ã‚ˆã†ã«](#the-primary-index-is-used-for-selecting-granules)ã€ã“ã®å…¨ä½“çš„ãªé †åºä»˜ã‘ã«ã‚ˆã‚ŠClickHouseã¯ã‚¯ã‚¨ãƒªãŒä¸»ã‚­ãƒ¼ã®æœ€åˆã®ã‚«ãƒ©ãƒ ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¦ã„ã‚‹å ´åˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã«å¯¾ã—ã¦ãƒã‚¤ãƒŠãƒªæ¤œç´¢ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +- URLインデックスマーク:
+ 主キーã®ã‚«ãƒ©ãƒ `UserID`ã¨`URL`ã®ã‚«ãƒ¼ãƒ‰ã‚¤ãƒŠãƒªãƒ†ã‚£ãŒã»ã¨ã‚“ã©åŒã˜ã§ã‚ã‚‹ãŸã‚ã€æœ€åˆã®ã‚«ãƒ©ãƒ ä»¥é™ã®ã‚­ãƒ¼ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã¯ã€ä¸€èˆ¬ã«ã€å…ˆè¡Œã‚­ãƒ¼ã®å€¤ã«ä¾å­˜ã—ã¦ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«å…¨ä½“ã®å€¤ç¯„囲ã®ã¿ã‚’示ã—ã¾ã™ã€‚
+ ãŸã¨ãˆã°ã€ä¸Šè¨˜ã®ã‚°ãƒ©ãƒ•ã§ãƒžãƒ¼ã‚¯0ã¨ãƒžãƒ¼ã‚¯1ã®UserIDãŒç•°ãªã‚‹å ´åˆã€ClickHouseã¯ã™ã¹ã¦ã®ã‚°ãƒ©ãƒ•ãŒã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«0ã®URLãŒ`'http://showtopics.html%3...'`以上ã§ã‚ã‚‹ã¨ä»®å®šã§ãã¾ã›ã‚“。ã—ã‹ã—ã€ä¸Šè¨˜ã®ã‚°ãƒ©ãƒ•ã§ãƒžãƒ¼ã‚¯0ã¨ãƒžãƒ¼ã‚¯1ãŒåŒã˜ã§ã‚ã‚Œã°ï¼ˆã¤ã¾ã‚Šã€ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«0内ã®ã™ã¹ã¦ã®è¡ŒãŒåŒã˜UserIDã‚’æŒã¤å ´åˆï¼‰ã€ClickHouseã¯ã™ã¹ã¦ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«0ã¾ã§ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«å†…ã®è¡Œã®URLãŒ`'http://showtopics.html%3...'`以上ã§ã‚ã‚‹ã¨ä»®å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + ã“ã®ã“ã¨ã®ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œãƒ‘フォーマンスã«å¯¾ã™ã‚‹å½±éŸ¿ã¯å¾Œã§è©³ã—ãè­°è«–ã—ã¾ã™ã€‚ + +### 主キーインデックスã¯ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã®é¸æŠžã«ä½¿ç”¨ã•ã‚Œã‚‹ + +次ã«ã€ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ã‚ˆã‚‹ã‚µãƒãƒ¼ãƒˆã‚’å—ã‘ãŸã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ã€‚ + +以下ã¯UserID 749927693ã®ãƒˆãƒƒãƒ—10ã®ã‚¯ãƒªãƒƒã‚¯ã•ã‚ŒãŸURLを計算ã—ã¾ã™ã€‚ + +```sql +SELECT URL, count(URL) AS Count +FROM hits_UserID_URL +WHERE UserID = 749927693 +GROUP BY URL +ORDER BY Count DESC +LIMIT 10; +``` + +応答ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```response +┌─URL────────────────────────────┬─Count─┠+│ http://auto.ru/chatay-barana.. │ 170 │ +│ http://auto.ru/chatay-id=371...│ 52 │ +│ http://public_search │ 45 │ +│ http://kovrik-medvedevushku-...│ 36 │ +│ http://forumal │ 33 │ +│ http://korablitz.ru/L_1OFFER...│ 14 │ +│ http://auto.ru/chatay-id=371...│ 14 │ +│ http://auto.ru/chatay-john-D...│ 13 │ +│ http://auto.ru/chatay-john-D...│ 10 │ +│ http://wot/html?page/23600_m...│ 9 │ +└────────────────────────────────┴───────┘ + +10 rows in set. Elapsed: 0.005 sec. +// highlight-next-line +Processed 8.19 thousand rows, +740.18 KB (1.53 million rows/s., 138.59 MB/s.) +``` + +ClickHouseクライアントã®å‡ºåŠ›ã¯ã€ä»Šåº¦ã¯ãƒ•ãƒ«ã‚¹ã‚­ãƒ£ãƒ³ã‚’実行ã›ãšã«ã€ã‚ãšã‹8.19åƒè¡ŒãŒClickHouseã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚ŒãŸã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +トレースログãŒæœ‰åŠ¹åŒ–ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseサーãƒãƒ¼ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®1083 UserIDマークをãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒã‚’用ã„ã¦ã€ã‚¯ã‚¨ãƒªã«ä¸€è‡´ã™ã‚‹å¯èƒ½æ€§ã®ã‚る行をå«ã‚€ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã‚’特定ã™ã‚‹éŽç¨‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ã“ã®å‡¦ç†ã«ã¯19ステップãŒå¿…è¦ã§ã€å¹³å‡çš„ãªæ™‚間複雑度ã¯`O(log2 n)`ã§ã™ï¼š + +```response +...Executor): Key condition: (column 0 in [749927693, 749927693]) +// highlight-next-line +...Executor): Running binary search on index range for part all_1_9_2 (1083 marks) +...Executor): Found (LEFT) boundary mark: 176 +...Executor): Found (RIGHT) boundary mark: 177 +...Executor): Found continuous range in 19 steps +...Executor): Selected 1/1 parts by partition key, 1 parts by primary key, +// highlight-next-line + 1/1083 marks by primary key, 1 marks to read from 1 ranges +...Reading ...approx. 8192 rows starting from 1441792 +``` + +サンプルトレースログã§ã¯ã€1ã®ãƒžãƒ¼ã‚¯ãŒã‚¯ã‚¨ãƒªã«ä¸€è‡´ã™ã‚‹å¯èƒ½æ€§ã®ã‚ã‚‹ã‚‚ã®ã¨ã—ã¦é¸æŠžã•ã‚ŒãŸã“ã¨ãŒç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ + +
+ + トレースログã®è©³ç´° + +

+ +マーク176ãŒè­˜åˆ¥ã•ã‚Œã¾ã—ãŸï¼ˆâ€˜found left boundary mark’ã¯åŒ…å«çš„ã§ã€â€˜found right boundary mark’ã¯é™¤å¤–çš„ã§ã™ï¼‰ã€‚ã—ãŸãŒã£ã¦ã€ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«176ã‹ã‚‰å§‹ã¾ã‚‹8192行全ã¦ãŒClickHouseã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œã¦ã€å®Ÿéš›ã«`UserID`カラム値ãŒ`749927693`ã®è¡Œã‚’見ã¤ã‘ã¾ã™ã€‚ +

+
+ +ã“ã®ã“ã¨ã¯EXPLAINå¥ã‚’使用ã—ã¦ç°¡å˜ã«å†ç¾ã§ãã¾ã™ï¼š + +```sql +EXPLAIN indexes = 1 +SELECT URL, count(URL) AS Count +FROM hits_UserID_URL +WHERE UserID = 749927693 +GROUP BY URL +ORDER BY Count DESC +LIMIT 10; +``` + +応答ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```response +┌─explain───────────────────────────────────────────────────────────────────────────────┠+│ Expression (Projection) │ +│ Limit (preliminary LIMIT (without OFFSET)) │ +│ Sorting (Sorting for ORDER BY) │ +│ Expression (Before ORDER BY) │ +│ Aggregating │ +│ Expression (Before GROUP BY) │ +│ Filter (WHERE) │ +│ SettingQuotaAndLimits (Set limits and quota after reading from storage) │ +│ ReadFromMergeTree │ +│ Indexes: │ +│ PrimaryKey │ +│ Keys: │ +│ UserID │ +│ Condition: (UserID in [749927693, 749927693]) │ +│ Parts: 1/1 │ +// highlight-next-line +│ Granules: 1/1083 │ +└───────────────────────────────────────────────────────────────────────────────────────┘ + +16 rows in set. Elapsed: 0.003 sec. +``` +クライアントã®å‡ºåŠ›ã¯ã€1083個ã®granuleã®ã†ã¡1ã¤ãŒã€UserIDカラム値749927693ã®è¡Œã‚’å«ã‚€å¯èƒ½æ€§ãŒã‚ã‚‹ã¨é¸æŠžã•ã‚ŒãŸã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +:::note çµè«– +クエリãŒè¤‡åˆã‚­ãƒ¼ã®ä¸€éƒ¨ã§ã‚り最åˆã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ãƒ—ロミナリキーインデックスマークã«å¯¾ã—ã¦ãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’実行ã—ã¦ã„ã¾ã™ã€‚ +::: + +ClickHouseã¯ãã®ã‚¹ãƒ‘ース主キーインデックスを使用ã—ã¦ç°¡å˜ã«ï¼ˆãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒã‚’通ã˜ã¦ï¼‰ã‚¯ã‚¨ãƒªã«ãƒžãƒƒãƒã™ã‚‹å¯èƒ½æ€§ãŒã‚る行をå«ã‚€granuleã‚’é¸æŠžã—ã¦ã„ã¾ã™ã€‚ + +ã“ã‚Œã¯ClickHouseクエリ実行ã®**最åˆã®ã‚¹ãƒ†ãƒ¼ã‚¸ï¼ˆgranuleé¸æŠžï¼‰**ã§ã™ã€‚ + +クエリ実行ã®**第二ステージ(データ読ã¿å–り)**ã§ã¯ã€ClickHouseã¯é¸æŠžã•ã‚ŒãŸgranuleを特定ã—ã€ãã®å…¨ã¦ã®è¡Œã‚’ClickHouseエンジンã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã—ã¦ã€å®Ÿéš›ã«ã‚¯ã‚¨ãƒªã«ä¸€è‡´ã™ã‚‹è¡Œã‚’見ã¤ã‘るプロセスを並行ã—ã¦å®Ÿè¡Œã—ã¾ã™ã€‚ + +以下ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€ã“ã®ç¬¬äºŒæ®µéšŽã«ã¤ã„ã¦æ›´ã«è©³ã—ã説明ã—ã¾ã™ã€‚ + +### マークファイルã¯granuleã®ä½ç½®ã‚’特定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ + +以下ã®å›³ã¯æˆ‘々ã®ãƒ†ãƒ¼ãƒ–ルã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã®ä¸€éƒ¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + + + +上述ã—ãŸã‚ˆã†ã«ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹å†…ã®1083 UserIDマークã«å¯¾ã—ã¦ãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒã‚’è¡Œã„ã€ãƒžãƒ¼ã‚¯176ãŒç‰¹å®šã•ã‚Œã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ã‚¯ã‚¨ãƒªã«ä¸€è‡´ã™ã‚‹å¯èƒ½æ€§ãŒã‚る行をå«ã‚€å¯èƒ½æ€§ãŒã‚ã‚‹ã®ã¯ã€ãã®å¯¾å¿œã™ã‚‹granule176ã®ã¿ã§ã™ã€‚ + +
+ + Granuleé¸æŠžã®è©³ç´° + +

+ +上記ã®å›³ã¯ã€mark 176ãŒãã®é–¢é€£ã™ã‚‹granule 176ã®æœ€ä½ŽUserID値ãŒ749.927.693よりもå°ã•ã„最åˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã§ã‚ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ãã—ã¦ã€ãã®æ¬¡ã®ãƒžãƒ¼ã‚¯ï¼ˆãƒžãƒ¼ã‚¯177)ã®granule 177ãŒã€ã“ã®å€¤ã‚ˆã‚Šã‚‚大ãã„最å°UserID値ã§ã‚ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ã‚¯ã‚¨ãƒªã«ä¸€è‡´ã™ã‚‹å¯èƒ½æ€§ãŒã‚る行をå«ã‚€å¯èƒ½æ€§ãŒã‚ã‚‹ã®ã¯ã€ãã®å¯¾å¿œã™ã‚‹granule 176ã®ã¿ã§ã™ã€‚ +

+
+ +granule 176ã«UserIDカラム値`749.927.693`ã‚’å«ã‚€è¡ŒãŒã‚ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ãŸã‚ã«ï¼ˆã¾ãŸã¯ã—ãªã„ãŸã‚ã«ï¼‰ã€ãã®granule内ã®å…¨ã¦ã®8192行をClickHouseã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“れをé”æˆã™ã‚‹ãŸã‚ã€ClickHouseã¯granule 176ã®ç‰©ç†çš„ä½ç½®ã‚’知ã£ã¦ãŠãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®å…¨ã¦ã®granuleã®ç‰©ç†ä½ç½®ãŒãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚データファイルã¨åŒæ§˜ã«ã€å„テーブルカラムã«ã¤ã1ã¤ã®ãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚Šã¾ã™ã€‚ + +以下ã®å›³ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®UserIDã€URLã€ãŠã‚ˆã³EventTimeカラムã®granuleã®ç‰©ç†ä½ç½®ã‚’ä¿å­˜ã™ã‚‹3ã¤ã®ãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«UserID.mrk, URL.mrk, ãŠã‚ˆã³EventTime.mrkを示ã—ã¦ã„ã¾ã™ã€‚ + + + +我々ã¯ä»¥å‰ã«ã€ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯0ã‹ã‚‰å§‹ã¾ã‚‹æ•°å€¤ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã‚’å«ã‚€æœªåœ§ç¸®ã®ãƒ•ãƒ©ãƒƒãƒˆã‚¢ãƒ¬ã‚¤ãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆprimary.idx)ã§ã‚ã‚‹ã¨è¿°ã¹ã¾ã—ãŸã€‚ + +åŒæ§˜ã«ã€ãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚‚ã¾ãŸã€0ã‹ã‚‰å§‹ã¾ã‚‹æ•°å€¤ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã‚’å«ã‚€æœªåœ§ç¸®ã®ãƒ•ãƒ©ãƒƒãƒˆã‚¢ãƒ¬ã‚¤ãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆ*.mrk)ã§ã™ã€‚ + +インデックスã§é¸æŠžã•ã‚ŒãŸgranuleã«ä¸€è‡´ã™ã‚‹è¡ŒãŒå«ã¾ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹å ´åˆã€ClickHouseã¯ãã®mark番å·ã«åŸºã¥ã„ã¦array lookupã‚’è¡Œã„ã€granuleã®ç‰©ç†ä½ç½®ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã‚る特定ã®ã‚«ãƒ©ãƒ ã«å¯¾ã™ã‚‹å„マークファイルエントリーã¯ã€æ¬¡ã®å½¢ã§ã‚ªãƒ•ã‚»ãƒƒãƒˆã®ä½ç½®ã‚’æä¾›ã—ã¦ã„ã¾ã™ï¼š + +- 最åˆã®ã‚ªãƒ•ã‚»ãƒƒãƒˆï¼ˆä¸Šè¨˜ã®å›³ã§ã€Œãƒ–ロックオフセットã€ï¼‰ã¯ã€é¸æŠžã•ã‚ŒãŸgranuleã‚’å«ã‚€åœ§ç¸®column data fileã®ãƒ–ロックをä½ç½®ä»˜ã‘ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ã“ã®åœ§ç¸®ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ãƒ–ロックã¯ã€ãŠãらãã„ãã¤ã‹ã®åœ§ç¸®granuleã‚’å«ã‚“ã§ã„ã¾ã™ã€‚見ã¤ã‹ã£ãŸåœ§ç¸®ã•ã‚ŒãŸãƒ–ロックã¯ã€ãƒ¡ãƒ¢ãƒªã«èª­ã¿è¾¼ã¾ã‚Œã‚‹ã¨ãã«è§£å‡ã•ã‚Œã¾ã™ã€‚ + +- 第二ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆï¼ˆä¸Šè¨˜ã®å›³ã®ã€Œgranuleオフセットã€ï¼‰ã¯ã€è§£å‡ã•ã‚ŒãŸãƒ–ロックデータ内ã®granuleã®ä½ç½®ã‚’æä¾›ã—ã¾ã™ã€‚ + +ãã®å¾Œã€æŒ‡å®šã®è§£å‡ã•ã‚ŒãŸgranuleã®ã™ã¹ã¦ã®8192è¡ŒãŒã€ã•ã‚‰ã«å‡¦ç†ã®ãŸã‚ã«ClickHouseã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +:::note + +- wide formatを使ã„ã€é©å¿œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç²’度ãŒç„¡åŠ¹ãªãƒ†ãƒ¼ãƒ–ルã§ã¯ï¼ˆã“ã‚ŒãŒé–¢é€£ã™ã‚‹å ´åˆã¯ä¸Šè¨˜ã®å›³ã«ç¤ºã•ã‚Œã¦ã„るよã†ã«.mrkファイルを使用)ã€å„マークファイルエントリーã§ã¯2ã¤ã®8ãƒã‚¤ãƒˆã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’å«ã‚€ã‚¨ãƒ³ãƒˆãƒªãƒ¼ãŒã‚ã‚Šã€ãれらã¯granuleã®ç‰©ç†ä½ç½®ã§å…¨ã¦åŒã˜ã‚µã‚¤ã‚ºã‚’æŒã£ã¦ã„ã¾ã™ã€‚ + +インデックスã®ç²’度ã¯[デフォルトã§](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#index_granularity_bytes)é©å¿œçš„ã§ã™ãŒã€æˆ‘々ã®ä¾‹ã®ãƒ†ãƒ¼ãƒ–ルã§ã¯é©å¿œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç²’度を無効化ã—ã¾ã—ãŸï¼ˆã“ã®ã‚¬ã‚¤ãƒ‰ã®ãƒ‡ã‚£ã‚¹ã‚«ãƒƒã‚·ãƒ§ãƒ³ã‚’ç°¡æ½”ã«ã—ã€å›³ã¨çµæžœã‚’å†ç¾å¯èƒ½ã«ã™ã‚‹ãŸã‚)。ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºãŒ[min_bytes_for_wide_part](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#min_bytes_for_wide_part)よりも大ãã„ãŸã‚ã€ãƒ¯ã‚¤ãƒ‰ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’使用ã—ã¦ã„ã¾ã™ï¼ˆself-managed clustersã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯10 MBã§ã™ï¼‰ã€‚ + +- wide formatãŠã‚ˆã³é©å¿œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç²’度をæŒã¤ãƒ†ãƒ¼ãƒ–ルã§ã¯ã€.mrk2マークファイルを使用ã—ã¾ã™ã€‚ã“ã‚Œã¯.mrkファイルã¨åŒæ§˜ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã‚’æŒã¡ã¾ã™ãŒã€ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã”ã¨ã«ãªã‚“らã‹ã®è¿½åŠ ã®ç¬¬3値:granuleã«å¯¾å¿œã™ã‚‹è¡Œæ•°ãŒè¨˜éŒ²ã•ã‚Œã¦ã„るファイルã§ã™ã€‚ + +- compact formatã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€.mrk3マークファイルãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +::: + + +:::note マークファイルã®ç†ç”± + +ãªãœä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ç‰©ç†çš„ä½ç½®ã‚’直接ä¿å­˜ã—ã¦ã„ãªã„ã‹ï¼Ÿ + +ãªãœãªã‚‰ã€ClickHouseãŒè¨­è¨ˆã•ã‚ŒãŸéžå¸¸ã«å¤§è¦æ¨¡ãªã‚¹ã‚±ãƒ¼ãƒ«ã§ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ã¨ãƒ¡ãƒ¢ãƒªåŠ¹çŽ‡ãŒéžå¸¸ã«é‡è¦ã ã‹ã‚‰ã§ã™ã€‚ + +主キーインデックスファイルã¯ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã«å®Œå…¨ã«åŽã¾ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +我々ã®ã‚µãƒ³ãƒ—ルクエリã®ãŸã‚ã«ã€ClickHouseã¯ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¦ã‚ãã¾ã§ã‚¯ã‚¨ãƒªã«ä¸€è‡´ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹granuleã‚’é¸æŠžã—ã¾ã—ãŸã€‚クエリã®æ›´ãªã‚‹å‡¦ç†ã®ãŸã‚ã«ã€ãã®1ã¤ã®granuleã®ã¿ã«å¯¾ã—ã¦ç‰©ç†çš„ä½ç½®ãŒå¿…è¦ã§ã™ã€‚ + +ã•ã‚‰ã«ã€ã“ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆæƒ…å ±ã¯UserIDãŠã‚ˆã³URLカラムã«ã®ã¿å¿…è¦ã§ã™ã€‚ + +クエリã§ä½¿ç”¨ã—ã¦ã„ãªã„カラム(例:EventTimeカラム)ã«å¯¾ã—ã¦ã‚ªãƒ•ã‚»ãƒƒãƒˆæƒ…å ±ãŒä¸è¦ã§ã™ã€‚ + +我々ã®ã‚µãƒ³ãƒ—ルクエリã§ã¯ã€UserIDデータファイル(UserID.bin)ã¨URLデータファイル(URL.bin)ãã‚Œãžã‚Œã®granule 176ã®ãŸã‚ã«2ã¤ã®ç‰©ç†çš„ä½ç½®ã‚ªãƒ•ã‚»ãƒƒãƒˆãŒå¿…è¦ã§ã™ã€‚ + +マークファイルã«ã‚ˆã‚‹é–“接化ã®ãŠã‹ã’ã§ã€å…¨ + +1083個ã®granuleã®ç‰©ç†ä½ç½®ã‚’主キーインデックス内ã«ç›´æŽ¥ä¿å­˜ã™ã‚‹ã“ã¨ã‚’回é¿ã§ãã¾ã™ï¼šã—ãŸãŒã£ã¦ã€ãƒ¡ãƒ¢ãƒªå†…ã«ä¸è¦ãªï¼ˆä½¿ç”¨ã•ã‚Œãªã„å¯èƒ½æ€§ã®ã‚る)データをæŒãŸãšã«æ¸ˆã¿ã¾ã™ã€‚ + +::: + +下記ã®å›³ã¨ä»¥ä¸‹ã®ãƒ†ã‚­ã‚¹ãƒˆã¯ã€æˆ‘々ã®ã‚µãƒ³ãƒ—ルクエリã«å¯¾ã—ã¦ClickHouseãŒã©ã®ã‚ˆã†ã«UserID.binデータファイル内ã®granule 176を特定ã™ã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + + + +ã“ã®ã‚¬ã‚¤ãƒ‰ã®å†’é ­ã§è¿°ã¹ãŸã“ã¨ã‹ã‚‰ã€ClickHouseã¯ä»–ã«ã¯ãªã„granuleã‚’é¸æŠžã—ã€ã‚¯ã‚¨ãƒªã«ä¸€è‡´ã™ã‚‹è¡Œã‚’å«ã‚€å¯èƒ½æ€§ãŒã‚ã‚‹granule 176ã‚’é¸æŠžã—ã¾ã—ãŸã€‚ + +ClickHouseã¯ã€UserID.mrkマークファイル内ã§granule 176ã®2ã¤ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‹ã‚‰é¸æŠžã•ã‚ŒãŸãƒžãƒ¼ã‚¯ç•ªå·ï¼ˆ176)を使用ã—ã¦ä½ç½®å–å¾—ã‚’è¡Œã„ã¾ã™ã€‚ + +示ã•ã‚Œã¦ã„るよã†ã«ã€æœ€åˆã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã¯ã€UserID.binデータファイル内ã®granule 176ã®åœ§ç¸®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å«ã‚€åœ§ç¸®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ–ロックをä½ç½®ä»˜ã‘ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ + +見ã¤ã‹ã£ãŸãƒ•ã‚¡ã‚¤ãƒ«ãƒ–ロックãŒãƒ¡ãƒ¢ãƒªã«è§£å‡ã•ã‚Œã‚‹ã¨ã€ãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰2ã¤ç›®ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’使用ã—ã¦ã€è§£å‡ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿å†…ã®granule 176を特定ã§ãã¾ã™ã€‚ + +ClickHouseã¯æˆ‘々ã®ã‚µãƒ³ãƒ—ルクエリ(UserIDãŒ749.927.693ã§ã‚るインターãƒãƒƒãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãŸã‚ã®ãƒˆãƒƒãƒ—10ã®æœ€ã‚‚クリックã•ã‚ŒãŸURL)を実行ã™ã‚‹ãŸã‚ã«ã€è¦³å¿µçš„ã«UserID.binデータファイル内ã¨å¹³è¡Œã—ã¦URL.binデータファイル内ã®granule176を特定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚2ã¤ã®granuleã¯æ•´åˆ—ã—ã€ClickHouseエンジンã®ã•ã‚‰ãªã‚‹å‡¦ç†ã®ãŸã‚ã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€å…¨è¡Œã®ä¸­ã‹ã‚‰ã€ã¾ãšæœ€åˆã«UserIDã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã€æ¬¡ã«URL値ã”ã¨ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚Œã€æœ€å¾Œã«æœ€ã‚‚大ããª10ã®URLグループを逆順ã«å‡ºåŠ›ã—ã¾ã™ã€‚ + + +## 複数ã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹ + + + +### セカンダリキーカラムã¯åŠ¹çŽ‡çš„ã§ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ + +クエリãŒcompound keyã®ä¸€éƒ¨ã§ã‚ã‚Šã€æœ€åˆã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¦ã„ã‚‹å ´åˆã€[ClickHouseã¯ãã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã«å¯¾ã—ã¦ãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’走らã›ã¾ã™](#the-primary-index-is-used-for-selecting-granules)。 + +ã§ã™ãŒã€ã‚¯ã‚¨ãƒªãŒcompound keyã®ä¸€éƒ¨ã§ã‚ã£ã¦ã‚‚最åˆã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã§ã¯ãªã„カラムã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¦ã„ã‚‹å ´åˆã¯ã©ã†ãªã‚‹ã§ã—ょã†ï¼Ÿ + +:::note +クエリãŒæ˜Žç¤ºçš„ã«æœ€åˆã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¦ã„ãªã„ãŒã€ã‚»ã‚«ãƒ³ãƒ€ãƒªã‚­ãƒ¼ã‚«ãƒ©ãƒ ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¦ã„るシナリオã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +クエリãŒæœ€åˆã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã¨ä»»æ„ã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ (ã¾ãŸã¯è¤‡æ•°ã‚«ãƒ©ãƒ )ã®ä¸¡æ–¹ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¦ã„ã‚‹å ´åˆã€ClickHouseã¯æœ€åˆã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã«å¯¾ã—ã¦ãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒã‚’è¡Œã„ã¾ã™ã€‚ +::: + +
+
+ + +クエリを使ã£ã¦ã€"http://public_search"をクリックã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒˆãƒƒãƒ—10を計算ã—ã¾ã™ã€‚ + +```sql +SELECT UserID, count(UserID) AS Count +FROM hits_UserID_URL +WHERE URL = 'http://public_search' +GROUP BY UserID +ORDER BY Count DESC +LIMIT 10; +``` + +応答ã¯ã“ã†ãªã‚Šã¾ã™ï¼š +```response +┌─────UserID─┬─Count─┠+│ 2459550954 │ 3741 │ +│ 1084649151 │ 2484 │ +│ 723361875 │ 729 │ +│ 3087145896 │ 695 │ +│ 2754931092 │ 672 │ +│ 1509037307 │ 582 │ +│ 3085460200 │ 573 │ +│ 2454360090 │ 556 │ +│ 3884990840 │ 539 │ +│ 765730816 │ 536 │ +└────────────┴───────┘ + +10 rows in set. Elapsed: 0.086 sec. +// highlight-next-line +Processed 8.81 million rows, +799.69 MB (102.11 million rows/s., 9.27 GB/s.) +``` + +クライアントã®å‡ºåŠ›ã¯ã€[URLカラムãŒè¤‡åˆä¸»ã‚­ãƒ¼ã®ä¸€éƒ¨ã§ã‚ã‚‹ã«ã‚‚ã‹ã‹ã‚らãš](#a-table-with-a-primary-key)ã€ClickHouseãŒã»ã¼ãƒ•ãƒ«ãƒ†ãƒ¼ãƒ–ルスキャンを行ã£ãŸã“ã¨ã‚’示ã—ã¦ã„ã¾ã™! ClickHouseãŒãƒ†ãƒ¼ãƒ–ルã®8.87百万行中8.81百万行を読ã¿å–ã£ã¦ã„ã¾ã™ã€‚ + +[トレースログ](/docs/ja/operations/server-configuration-parameters/settings.md/#server_configuration_parameters-logger)ãŒæœ‰åŠ¹åŒ–ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseサーãƒãƒ¼ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ClickHouseãŒæ±Žç”¨æŽ’除検索を使用ã—ã¦ã€ +基準ã•ã‚ŒãŸ1083 URLインデックスマークã«ã€URLカラム値ãŒ"http://public_search"ã‚’å«ã‚€è¡ŒãŒå­˜åœ¨ã™ã‚‹å¯èƒ½æ€§ã®ã‚ã‚‹granuleを特定ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ï¼š + +```response +...Executor): Key condition: (column 1 in ['http://public_search', + 'http://public_search']) +// highlight-next-line +...Executor): Used generic exclusion search over index for part all_1_9_2 + with 1537 steps +...Executor): Selected 1/1 parts by partition key, 1 parts by primary key, +// highlight-next-line + 1076/1083 marks by primary key, 1076 marks to read from 5 ranges +...Executor): Reading approx. 8814592 rows with 10 streams +``` + +サンプルトレースログã§ã¯ã€10761083 granularãŒé¸æŠžã•ã‚Œã¦ã€URL値ã«ä¸€è‡´ã™ã‚‹è¡Œã‚’æŒã£ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ãŒç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®çµæžœã€8.81百万行ãŒClickHouseエンジンã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ï¼ˆä¸¦è¡Œã—ã¦10ストリームを使用)ã•ã‚Œã€å®Ÿéš›ã«"URL:"ãŒ"http://public_search"ã§ã‚る行を特定ã—ã¾ã™ã€‚ã—ã‹ã—ã€[後ã«ç¤ºã™ã‚ˆã†ã«](#query-on-url-fast)ã€é¸æŠžã•ã‚ŒãŸ1076-granuleã®ä¸­ã‹ã‚‰å®Ÿéš›ã«è©²å½“ã™ã‚‹è¡Œã‚’æŒã£ã¦ã„ã‚‹ã®ã¯39ã ã‘ã§ã™ã€‚ + +複åˆä¸»ã‚­ãƒ¼ï¼ˆUserID, URL)ã«åŸºã¥ã„ãŸä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€ç‰¹å®šã®UserID値をæŒã¤è¡Œã‚’フィルタリングã™ã‚‹ã‚¯ã‚¨ãƒªã‚’加速ã™ã‚‹ã®ã«ã¯éžå¸¸ã«å½¹ç«‹ã¡ã¾ã—ãŸãŒã€æŒ‡å®šã®URL値をæŒã¤è¡Œã‚’フィルタリングã™ã‚‹ã‚¯ã‚¨ãƒªã‚’加速ã™ã‚‹ã«ã¯ã‚ã¾ã‚Šå½¹ç«‹ã¡ã¾ã›ã‚“。 + +ãã®ãŸã‚ã€URLカラムãŒæœ€åˆã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã§ã¯ãªãã€ã—ãŸãŒã£ã¦ClickHouseã¯æ±Žç”¨æŽ’除検索アルゴリズム(ãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒã§ã¯ã‚ã‚Šã¾ã›ã‚“)をURLカラムã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã«å¯¾ã—ã¦ä½¿ç”¨ã—ã€ãã®**アルゴリズムã®åŠ¹æžœã¯UserIDカラムã¨ã®ã‚«ãƒ¼ãƒ‰ã‚¤ãƒŠãƒªãƒ†ã‚£ã®å·®ã«ä¾å­˜ã—ã¦ã„ã‚‹**ã‹ã‚‰ã§ã™ã€‚ + +ã“ã®ã“ã¨ã‚’示ã™ãŸã‚ã«ã€æ±Žç”¨æŽ’除検索ãŒã©ã®ã‚ˆã†ã«æ©Ÿèƒ½ã™ã‚‹ã®ã‹ã„ãã¤ã‹ã®è©³ç´°ã‚’示ã—ã¾ã™ã€‚ + + + +### 汎用排除検索アルゴリズム + +以下ã¯ã€ã‚¯ã‚¨ãƒªãŒã‚»ã‚«ãƒ³ãƒ€ãƒªã‚«ãƒ©ãƒ ã§granuleã‚’é¸æŠžã™ã‚‹ã¨ãã€å…ˆè¡Œã™ã‚‹ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã«ä½Žã„カードイナリティã¾ãŸã¯ã‚ˆã‚Šé«˜ã„カードイナリティをæŒã¤å ´åˆã«ClickHouse汎用排除検索アルゴリズムãŒã©ã®ã‚ˆã†ã«æ©Ÿèƒ½ã™ã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +両方ã®ã‚±ãƒ¼ã‚¹ã®ä¾‹ã¨ã—ã¦ã€è€ƒãˆã¦ã¿ã¾ã™ã€‚ +- URLã®å€¤ãŒ"W3"ã§ã‚る行を検索ã™ã‚‹ã‚¯ã‚¨ãƒªã€‚ +- 簡略化ã•ã‚ŒãŸå€¤ã‚’æŒã¤æˆ‘々ã®æ‰“ã¡è¾¼ã¿ãƒ†ãƒ¼ãƒ–ルã®æŠ½è±¡çš„ãªãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +- åŒã˜åˆæˆã‚­ãƒ¼ï¼ˆUserID, URL)をæŒã¤è¡¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚ã¤ã¾ã‚Šã€è¡Œã¯æœ€åˆã«UserID値ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚åŒã˜UserID値をæŒã¤è¡Œã¯URLã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ +- 2ã®granuleサイズã€ã¤ã¾ã‚Šå„granuleã«2行をå«ã¿ã¾ã™ã€‚ + +我々ã¯ã€ä»¥ä¸‹ã®å›³ã«ç¤ºã™ã‚ˆã†ã«ã€å„granuleã®æœ€åˆã® + +テーブル行ã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ å€¤ã‚’オレンジ色ã§ãƒžãƒ¼ã‚¯ã—ã¾ã—ãŸã€‚ + +**先行キーカラムãŒä½Žã„カードイナリティをæŒã¤å ´åˆ** + +UserIDã«ä½Žã„カードイナリティãŒã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ã“ã®å ´åˆã€å¤§ããªå¯èƒ½æ€§ãŒã‚ã‚‹UserID値ãŒè¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ル行やgranuleã€ã™ãªã‚ã¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã«åºƒãŒã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚åŒã˜UserIDã‚’æŒã¤ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã«ã¤ã„ã¦ã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯å†…ã®URL値ã¯æ˜‡é †ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ï¼ˆãƒ†ãƒ¼ãƒ–ル行ãŒæœ€åˆã«UserIDã§ãã®å¾ŒURLã§ã‚½ãƒ¼ãƒˆã•ã‚Œã‚‹ãŸã‚)。ã“ã‚Œã«ã‚ˆã‚Šä»¥ä¸‹ã§èª¬æ˜Žã•ã‚Œã‚‹ã‚ˆã†ãªåŠ¹çŽ‡çš„ãªãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ãŒå¯èƒ½ã§ã™ï¼š + + + +上記ã®å›³ã§ã¯æˆ‘々ã®æŠ½è±¡çš„ãªã‚µãƒ³ãƒ—ルデータã«å¯¾ã—ã¦granuleé¸æŠžãƒ—ロセスã«é–¢ã™ã‚‹3ã¤ã®ç•°ãªã‚‹ã‚·ãƒŠãƒªã‚ªãŒå­˜åœ¨ã—ã¾ã™ï¼š + +1.**URL値ãŒW3よりå°ã•ãã€æ¬¡ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã®ã‚‚URL値ãŒW3よりå°ã•ã„å ´åˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯0**:ã¯ã€ãƒžãƒ¼ã‚¯0ã¨1ã«åŒã˜UserID値ãŒã‚ã‚‹ãŸã‚除外ã•ã‚Œã¾ã™ã€‚ã“ã®æŽ’除æ¡ä»¶ã¯ã€granule0ãŒå®Œå…¨ã«U1 UserID値ã§æ§‹æˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ã€ClickHouseãŒgranule0ã®æœ€å¤§URL値ãŒW3よりå°ã•ã„ã¨ä»®å®šã—ã¦granuleを除外ã§ãã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ + +2. **URL値ãŒW3以下ã§ã€æ¬¡ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã®URL値ãŒW3以上ã®å ´åˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯1**:ã¯é¸æŠžã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯granule1ãŒURL W3ã‚’æŒã¤è¡Œã‚’æŒã¤å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +3. **URL値ãŒW3より大ãã„インデックスマーク2ãŠã‚ˆã³3**:ã¯ã€ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã¯ã€ãã‚Œãžã‚Œã®granuleã«å¯¾ã™ã‚‹ãƒ†ãƒ¼ãƒ–ル行ã®æœ€åˆã®ã‚­ãƒ¼ã‚«ãƒ©ãƒ å€¤ã‚’å«ã‚“ã§ãŠã‚Šã€ãƒ†ãƒ¼ãƒ–ル行ãŒã‚­ãƒ¼ã‚«ãƒ©ãƒ å€¤ã§ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€granule2ãŠã‚ˆã³3ãŒURL値W3ã‚’å«ã‚€ã“ã¨ãŒã§ããªã„ãŸã‚除外ã•ã‚Œã¾ã™ã€‚ + +**先行キーカラムãŒé«˜ã„カードイナリティをæŒã¤å ´åˆ** +ユーザーIDã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ãŒé«˜ã„å ´åˆã€åŒã˜ãƒ¦ãƒ¼ã‚¶ãƒ¼IDã®å€¤ãŒè¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ル行やグラニュールã«åˆ†æ•£ã—ã¦ã„ã‚‹å¯èƒ½æ€§ã¯ä½Žã„ã§ã™ã€‚ã“ã‚Œã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã®URL値ãŒå˜èª¿å¢—加ã—ã¦ã„ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™: + + + +上ã®å›³ã§ç¤ºã•ã‚Œã¦ã„るよã†ã«ã€URL値ãŒW3よりå°ã•ã„ã™ã¹ã¦ã®ãƒžãƒ¼ã‚¯ãŒé¸æŠžã•ã‚Œã€ãã®é–¢é€£ã™ã‚‹ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã®è¡ŒãŒClickHouseエンジンã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +ã“ã‚Œã¯ã€å›³ä¸­ã®ã™ã¹ã¦ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ãŒä¸Šè¿°ã®ã‚·ãƒŠãƒªã‚ª1ã«è©²å½“ã™ã‚‹ã«ã‚‚ã‹ã‹ã‚らãšã€ã€Œæ¬¡ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ãŒç¾åœ¨ã®ãƒžãƒ¼ã‚¯ã¨åŒã˜ãƒ¦ãƒ¼ã‚¶ãƒ¼ID値をæŒã¤ã€ã¨ã„ã†é™¤å¤–å‰ææ¡ä»¶ã‚’満ãŸã—ã¦ã„ãªã„ãŸã‚ã€é™¤å¤–ã§ããªã„ã‹ã‚‰ã§ã™ã€‚ + +例ãˆã°ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯0を考ãˆã¦ã¿ã¾ã™ã€‚ã“ã®ãƒžãƒ¼ã‚¯ã®**URL値ã¯W3よりå°ã•ãã€æ¬¡ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã®URL値もW3よりå°ã•ã„**ã§ã™ã€‚ã—ã‹ã—ã€æ¬¡ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯1ãŒç¾åœ¨ã®ãƒžãƒ¼ã‚¯0ã¨åŒã˜ãƒ¦ãƒ¼ã‚¶ãƒ¼ID値をæŒã£ã¦ã„ãªã„ãŸã‚ã€ã“れを除外ã™ã‚‹ã“ã¨ã¯*ã§ãã¾ã›ã‚“*。 + +ã“ã‚Œã¯æœ€çµ‚çš„ã«ã€ClickHouseãŒã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«0ã®URL値ã®æœ€å¤§å€¤ã«ã¤ã„ã¦ä»®å®šã‚’ã™ã‚‹ã“ã¨ã‚’妨ã’ã¾ã™ã€‚代ã‚ã‚Šã«ã€ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«0ãŒURL値W3ã‚’æŒã¤è¡Œã‚’å«ã‚€å¯èƒ½æ€§ãŒã‚ã‚‹ã¨è€ƒãˆã€ãƒžãƒ¼ã‚¯0ã‚’é¸æŠžã›ã–ã‚‹ã‚’å¾—ã¾ã›ã‚“。 + +åŒã˜çŠ¶æ³ã¯ãƒžãƒ¼ã‚¯1, 2, 3ã«ã¤ã„ã¦ã‚‚真ã§ã™ã€‚ + +:::note çµè«– +ClickHouseãŒä½¿ç”¨ã—ã¦ã„る一般的ãªé™¤å¤–検索アルゴリズムã¯ã€ã‚³ãƒ³ãƒ‘ウンドキーã®ä¸€éƒ¨ã§ã‚るカラムをフィルタリングã—ã¦ã„ã‚‹ã¨ãã«ã€äºŒåˆ†æŽ¢ç´¢ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã™ã‚‹ä»£ã‚ã‚Šã«æœ€ã‚‚効果的ã§ã™ã€‚ãŸã ã—ã€å‰ã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ãŒä½Žã„(ã¾ãŸã¯ä½Žã„å ´åˆ)ã§ã™ã€‚ +::: + +サンプルデータセットã§ã¯ã€ä¸¡æ–¹ã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ (UserID, URL)ãŒåŒæ§˜ã«é«˜ã„カーディナリティをæŒã¡ã€èª¬æ˜Žã•ã‚Œã¦ã„るよã†ã«ã€URLカラムã®å‰ã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ãŒé«˜ã„(ã¾ãŸã¯åŒæ§˜ã®)カーディナリティをæŒã¤ã¨ãã€ä¸€èˆ¬çš„ãªé™¤å¤–検索アルゴリズムã¯ã‚ã¾ã‚ŠåŠ¹æžœçš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### データスキップインデックスã«ã¤ã„ã¦ã®æ³¨æ„ + +ユーザーIDã¨URLã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ãŒåŒæ§˜ã«é«˜ã„ãŸã‚ã€[URLã§ã‚¯ã‚¨ãƒªã‚’フィルタリングã™ã‚‹](#query-on-url)ã“ã¨ã«ã‚ˆã£ã¦URLカラムã«[二次データスキップインデックス](./skipping-indexes.md)を作æˆã—ã¦ã‚‚大ããªæ©æµã¯ã‚ã‚Šã¾ã›ã‚“。 + +例ãˆã°ã€æ¬¡ã®2ã¤ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã€ãƒ†ãƒ¼ãƒ–ルã®URLカラムã«[minmax](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#primary-keys-and-indexes-in-queries)データスキップインデックスを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™: +```sql +ALTER TABLE hits_UserID_URL ADD INDEX url_skipping_index URL TYPE minmax GRANULARITY 4; +ALTER TABLE hits_UserID_URL MATERIALIZE INDEX url_skipping_index; +``` +ClickHouseã¯4ã¤ã®é€£ç¶šã™ã‚‹[グラニュール](#data-is-organized-into-granules-for-parallel-data-processing)ã®ã‚°ãƒ«ãƒ¼ãƒ—ã”ã¨ã«æœ€å°URL値ã¨æœ€å¤§URL値をä¿å­˜ã™ã‚‹è¿½åŠ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’作æˆã—ã¾ã—ãŸï¼ˆ`ALTER TABLE`ステートメントã®ä¸Šã®`GRANULARITY 4`å¥ã«æ³¨æ„ã—ã¦ãã ã•ã„)。 + + + +最åˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¨ãƒ³ãƒˆãƒªï¼ˆå›³ä¸­ã®ã€Œãƒžãƒ¼ã‚¯0ã€ï¼‰ã¯[テーブルã®æœ€åˆã®4ã¤ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã«å±žã™ã‚‹è¡Œ](#data-is-organized-into-granules-for-parallel-data-processing)ã®æœ€å°URL値ã¨æœ€å¤§URL値をä¿å­˜ã—ã¾ã™ã€‚ + +2番目ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¨ãƒ³ãƒˆãƒªï¼ˆâ€˜ãƒžãƒ¼ã‚¯1’)ã¯ãƒ†ãƒ¼ãƒ–ルã®æ¬¡ã®4ã¤ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã«å±žã™ã‚‹è¡Œã®æœ€å°URL値ã¨æœ€å¤§URL値をä¿å­˜ã—ã¾ã™ã€‚以é™åŒæ§˜ã§ã™ã€‚ + +(ClickHouseã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã«é–¢é€£ã™ã‚‹ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã®ã‚°ãƒ«ãƒ¼ãƒ—を特定ã™ã‚‹ãŸã‚ã®[マークファイル](#mark-files-are-used-for-locating-granules)を作æˆã—ã¾ã—ãŸã€‚) + +ユーザーIDã¨URLã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ãŒåŒæ§˜ã«é«˜ã„ãŸã‚ã€æˆ‘々ã®[URLã§ã‚¯ã‚¨ãƒªã‚’フィルタリングã™ã‚‹](#query-on-url)éš›ã«ã€ã“ã®äºŒæ¬¡ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ—インデックスã¯ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã‚’除外ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã›ã‚“。 + +クエリãŒæŽ¢ã—ã¦ã„る特定ã®URL値(ã™ãªã‚ã¡ 'http://public_search')ã¯ã€å„グラニュールã®ã‚°ãƒ«ãƒ¼ãƒ—ã§ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ã‚ˆã‚Šä¿å­˜ã•ã‚Œã¦ã„る最å°å€¤ã¨æœ€å¤§å€¤ã®é–“ã«ã‚ã‚‹å¯èƒ½æ€§ãŒé«˜ãã€ClickHouseã¯ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’é¸æŠžã›ã–ã‚‹ã‚’å¾—ã¾ã›ã‚“(クエリã¨ä¸€è‡´ã™ã‚‹è¡ŒãŒå«ã¾ã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚)。 + +### 複数ã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹å¿…è¦æ€§ + +ãã®çµæžœã€ç‰¹å®šã®URLã‚’æŒã¤è¡Œã‚’フィルタリングã™ã‚‹ã‚µãƒ³ãƒ—ルクエリã®å®Ÿè¡Œé€Ÿåº¦ã‚’大幅ã«ä¸Šã’ã‚‹ãŸã‚ã«ã¯ã€ãã®ã‚¯ã‚¨ãƒªã«æœ€é©åŒ–ã•ã‚ŒãŸä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ã•ã‚‰ã«ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¶ãƒ¼IDã‚’æŒã¤è¡Œã‚’フィルタリングã™ã‚‹ã‚µãƒ³ãƒ—ルクエリã®è‰¯å¥½ãªãƒ‘フォーマンスを維æŒã—ãŸã„å ´åˆã€è¤‡æ•°ã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +以下ã«ãã®æ–¹æ³•ã‚’示ã—ã¾ã™ã€‚ + + + +### 追加ã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’作æˆã™ã‚‹ãŸã‚ã®ã‚ªãƒ—ション + +以下ã®ä¸‰ã¤ã®é¸æŠžè‚¢ã®ã„ãšã‚Œã‹ã‚’使用ã—ã¦ã€ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¶ãƒ¼IDã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒªã¨ç‰¹å®šã®URLã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒªã®ä¸¡æ–¹ã‚’劇的ã«é«˜é€ŸåŒ–ã—ãŸã„å ´åˆã€è¤‡æ•°ã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +- ç•°ãªã‚‹ä¸»ã‚­ãƒ¼ã‚’æŒã¤**第2ã®ãƒ†ãƒ¼ãƒ–ル**を作æˆã—ã¾ã™ã€‚ +- 既存ã®ãƒ†ãƒ¼ãƒ–ルã«**マテリアライズドビュー**を作æˆã—ã¾ã™ã€‚ +- 既存ã®ãƒ†ãƒ¼ãƒ–ルã«**プロジェクション**を追加ã—ã¾ã™ã€‚ + +ã™ã¹ã¦ã®é¸æŠžè‚¢ã«ãŠã„ã¦ã€ã‚µãƒ³ãƒ—ルデータãŒæ–°ã—ã„テーブルã«è¤‡è£½ã•ã‚Œã€ãƒ†ãƒ¼ãƒ–ル主キーインデックスã¨è¡Œã‚½ãƒ¼ãƒˆé †ãŒå†ç·¨æˆã•ã‚Œã¾ã™ã€‚ + +ã—ã‹ã—ã€ã‚¯ã‚¨ãƒªã¨æŒ¿å…¥ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã«é–¢ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¨ã£ã¦ã®è¿½åŠ ãƒ†ãƒ¼ãƒ–ルã®é€æ˜Žæ€§ã¯å„é¸æŠžè‚¢ã§ç•°ãªã‚Šã¾ã™ã€‚ + +ç•°ãªã‚‹ä¸»ã‚­ãƒ¼ã‚’æŒã¤**第2ã®ãƒ†ãƒ¼ãƒ–ル**を作æˆã™ã‚‹ã¨ãã€ã‚¯ã‚¨ãƒªã¯ã‚¯ã‚¨ãƒªã«æœ€é©ãªãƒ†ãƒ¼ãƒ–ルãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«æ˜Žç¤ºçš„ã«é€ä¿¡ã•ã‚Œã€æ–°ã—ã„データã¯ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ルã«æ˜Žç¤ºçš„ã«æŒ¿å…¥ã•ã‚Œã¦ãƒ†ãƒ¼ãƒ–ルをåŒæœŸã—ãŸçŠ¶æ…‹ã«ä¿ã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + + +**マテリアライズドビュー**を使用ã™ã‚‹ã¨ã€è¿½åŠ ãƒ†ãƒ¼ãƒ–ルã¯æš—黙的ã«ä½œæˆã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿ã¯ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ル間ã§è‡ªå‹•çš„ã«åŒæœŸã•ã‚Œã¾ã™ï¼š + + +ãã—ã¦ã€**プロジェクション**ã¯æœ€ã‚‚é€æ˜Žæ€§ã®é«˜ã„オプションã§ã™ã€‚ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›´ã«ä¼´ã£ã¦æš—黙的ã«ï¼ˆéš ã•ã‚Œã¦ï¼‰æ–°ã—ã„テーブルを自動的ã«åŒæœŸã•ã›ã‚‹ã ã‘ã§ãªãã€ClickHouseãŒã‚¯ã‚¨ãƒªã«æœ€ã‚‚効果的ãªãƒ†ãƒ¼ãƒ–ルãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’自動的ã«é¸æŠžã™ã‚‹ã‹ã‚‰ã§ã™ï¼š + + +以下ã§ã¯ã€è¤‡æ•°ã®ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’作æˆã—使用ã™ã‚‹ãŸã‚ã®3ã¤ã®ã‚ªãƒ—ションã«ã¤ã„ã¦ã€è©³ç´°ã‹ã¤å®Ÿéš›ã®ä¾‹ã‚’交ãˆã¦èª¬æ˜Žã—ã¾ã™ã€‚ + + + +### オプション1: 第2ã®ãƒ†ãƒ¼ãƒ–ル + + +å…ƒã®ãƒ†ãƒ¼ãƒ–ルã¨æ¯”較ã—ã¦ä¸»ã‚­ãƒ¼ã®ã‚­ãƒ¼åˆ—ã®é †åºã‚’変更ã—ã¦æ–°ã—ã„追加テーブルを作æˆã—ã¾ã™ï¼š + +```sql +CREATE TABLE hits_URL_UserID +( + `UserID` UInt32, + `URL` String, + `EventTime` DateTime +) +ENGINE = MergeTree +// highlight-next-line +PRIMARY KEY (URL, UserID) +ORDER BY (URL, UserID, EventTime) +SETTINGS index_granularity = 8192, index_granularity_bytes = 0, compress_primary_key = 0; +``` + +ã™ã¹ã¦ã®å…ƒã®ãƒ†ãƒ¼ãƒ–ル[#やテーブル(#a-table-with-a-primary-key)]ã‹ã‚‰8.87百万行を追加ã™ã‚‹ï¼š + +```sql +INSERT INTO hits_URL_UserID +SELECT * from hits_UserID_URL; +``` + +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```response +Ok. + +0 rows in set. Elapsed: 2.898 sec. Processed 8.87 million rows, 838.84 MB (3.06 million rows/s., 289.46 MB/s.) +``` + +最後ã«ãƒ†ãƒ¼ãƒ–ルを最é©åŒ–ã—ã¾ã™ï¼š +```sql +OPTIMIZE TABLE hits_URL_UserID FINAL; +``` + +主キーã®åˆ—ã®é †åºã‚’変更ã—ãŸã“ã¨ã«ã‚ˆã‚Šã€æŒ¿å…¥ã•ã‚ŒãŸè¡Œã¯ã“ã‚Œã¾ã§ã®[#やテーブル(#a-table-with-a-primary-key)]ã¨æ¯”較ã—ã¦ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ç•°ãªã‚‹è¾žæ›¸é †ã«æ ¼ç´ã•ã‚Œã€ãã®ãŸã‚テーブルã®1083グラニュールも異ãªã‚‹å€¤ã‚’æŒã¤ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + + +ã“ã‚Œã¯ç”Ÿæˆã•ã‚ŒãŸä¸»ã‚­ãƒ¼ã§ã™ï¼š + + +ã“ã‚Œã¯ã€URLカラムã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã†ã‚µãƒ³ãƒ—ルクエリã®å®Ÿè¡Œã‚’大幅ã«é«˜é€ŸåŒ–ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€URL "http://public_search"を最も頻ç¹ã«ã‚¯ãƒªãƒƒã‚¯ã—ãŸãƒˆãƒƒãƒ—10ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’計算ã—ã¾ã™ï¼š +```sql +SELECT UserID, count(UserID) AS Count +// highlight-next-line +FROM hits_URL_UserID +WHERE URL = 'http://public_search' +GROUP BY UserID +ORDER BY Count DESC +LIMIT 10; +``` + +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™ï¼š + + +```response +┌─────UserID─┬─Count─┠+│ 2459550954 │ 3741 │ +│ 1084649151 │ 2484 │ +│ 723361875 │ 729 │ +│ 3087145896 │ 695 │ +│ 2754931092 │ 672 │ +│ 1509037307 │ 582 │ +│ 3085460200 │ 573 │ +│ 2454360090 │ 556 │ +│ 3884990840 │ 539 │ +│ 765730816 │ 536 │ +└────────────┴───────┘ + +10 rows in set. Elapsed: 0.017 sec. +// highlight-next-line +Processed 319.49 thousand rows, +11.38 MB (18.41 million rows/s., 655.75 MB/s.) +``` + +å‰è¿°ã®[#や主キー列使用時フィルタリング[#filtering-on-key-columns-after-the-first](#filtering-on-key-columns-after-the-first)ã‚’ã»ã¼è¡Œã£ãŸã¨ãã¨ç•°ãªã‚Šã€ClickHouseã¯ãã®ã‚¯ã‚¨ãƒªã‚’より効果的ã«å®Ÿè¡Œã—ã¾ã—ãŸã€‚ + +å…ƒã®ãƒ†ãƒ¼ãƒ–ルã§ã®ä¸»ã‚­ãƒ¼ã«ã‚ˆã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’æŒã¤çŠ¶æ³ã§ã¯ï¼Œãƒ¦ãƒ¼ã‚¶ãƒ¼IDã¯æœ€åˆã§URLã¯2番目ã®ã‚­ãƒ¼åˆ—ã§ã‚ã£ãŸãŸã‚,ClickHouseã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã«å¯¾ã—ã¦ä¸€èˆ¬çš„ãªé™¤å¤–検索を実行ã—ã¦ã„ãŸãŒï¼Œãƒ¦ãƒ¼ã‚¶ãƒ¼IDã¨URLã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ãŒåŒã˜ã‹ã£ãŸãŸã‚,ãã‚Œã¯ã‚ã¾ã‚ŠåŠ¹æžœçš„ã§ãªã‹ã£ãŸï¼Ž + +URLãŒä¸»ã‚­ãƒ¼ã®æœ€åˆã®åˆ—ã¨ã—ã¦è€ƒæ…®ã•ã‚Œã‚‹ã¨ï¼ŒClickHouseã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã«å¯¾ã™ã‚‹ãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒã‚’実行ã—ã¦ã„ã¾ã™ã€‚ + +ClickHouseサーãƒãƒ¼ãƒ­ã‚°ã®å¯¾å¿œã™ã‚‹ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ­ã‚°ã¯ãれを確èªã—ã¾ã™ï¼š +```response +...Executor): Key condition: (column 0 in ['http://public_search', + 'http://public_search']) +// highlight-next-line +...Executor): Running binary search on index range for part all_1_9_2 (1083 marks) +...Executor): Found (LEFT) boundary mark: 644 +...Executor): Found (RIGHT) boundary mark: 683 +...Executor): Found continuous range in 19 steps +...Executor): Selected 1/1 parts by partition key, 1 parts by primary key, +// highlight-next-line + 39/1083 marks by primary key, 39 marks to read from 1 ranges +...Executor): Reading approx. 319488 rows with 2 streams +``` + ClickHouseã¯1076ã®æ±Žç”¨çš„除外検索を使用ã—ã¦ã„ãŸã¨ã以下ã®39ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã ã‘ã‚’é¸æŠžã—ã¾ã—ãŸã€‚ + +追加ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€URLã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚µãƒ³ãƒ—ルクエリã®å®Ÿè¡Œé€Ÿåº¦ã‚’å‘上ã•ã›ã‚‹ãŸã‚ã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +å…ƒã®ãƒ†ãƒ¼ãƒ–ルã§ã®[#クエリã®ãƒãƒƒãƒ‰ãƒ‘フォーマンス](#query-on-url-slow)ã¨åŒæ§˜ã«ã€æ–°ã—ã„追加ã®ãƒ†ãƒ¼ãƒ–ルヒット_URL_ユーザーIDã«ãŠã‘るユーザーIDã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒªã®ä¾‹ã¯ã‚ã¾ã‚ŠåŠ¹æžœçš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ユーザーIDãŒãƒ†ãƒ¼ãƒ–ルã®ä¸»ã‚­ãƒ¼ã®2番目ã®ã‚­ãƒ¼åˆ—ã§ã‚ã‚‹ãŸã‚ã€ClickHouseã¯ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«é¸æŠžã®ãŸã‚ã®ä¸€èˆ¬çš„除外検索を使用ã—ã¦ã„ã¾ã™ã€‚ã“ã‚ŒãŒãƒ¦ãƒ¼ã‚¶ãƒ¼IDã¨URLã¨ã„ã†ã‚ˆã†ã«åŒæ§˜ã«é«˜ã„カーディナリティをæŒã¤å ´åˆã€ã‚ã¾ã‚ŠåŠ¹æžœçš„ã§ã‚ã‚Šã¾ã›ã‚“。ã“ã®è©³ç´°ã«ã¤ã„ã¦ã¯è©³ç´°ã‚’é–‹ã„ã¦ãã ã•ã„。 +
+ + ユーザーIDã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒªã¯ãƒ‘フォーマンスãŒæ‚ªããªã£ãŸ + +

+ +```sql +SELECT URL, count(URL) AS Count +FROM hits_URL_UserID +WHERE UserID = 749927693 +GROUP BY URL +ORDER BY Count DESC +LIMIT 10; +``` + +レスãƒãƒ³ã‚¹ã¯ï¼š + +```response +┌─URL────────────────────────────┬─Count─┠+│ http://auto.ru/chatay-barana.. │ 170 │ +│ http://auto.ru/chatay-id=371...│ 52 │ +│ http://public_search │ 45 │ +│ http://kovrik-medvedevushku-...│ 36 │ +│ http://forumal │ 33 │ +│ http://korablitz.ru/L_1OFFER...│ 14 │ +│ http://auto.ru/chatay-id=371...│ 14 │ +│ http://auto.ru/chatay-john-D...│ 13 │ +│ http://auto.ru/chatay-john-D...│ 10 │ +│ http://wot/html?page/23600_m...│ 9 │ +└────────────────────────────────┴───────┘ + +10 rows in set. Elapsed: 0.024 sec. +// highlight-next-line +Processed 8.02 million rows, +73.04 MB (340.26 million rows/s., 3.10 GB/s.) +``` + +サーãƒãƒ¼ãƒ­ã‚°: +```response +...Executor): Key condition: (column 1 in [749927693, 749927693]) +// highlight-next-line +...Executor): Used generic exclusion search over index for part all_1_9_2 + with 1453 steps +...Executor): Selected 1/1 parts by partition key, 1 parts by primary key, +// highlight-next-line + 980/1083 marks by primary key, 980 marks to read from 23 ranges +...Executor): Reading approx. 8028160 rows with 10 streams +``` +

+
+ +我々ã¯ä»Šã€äºŒã¤ã®ãƒ†ãƒ¼ãƒ–ルをæŒã£ã¦ã„ã¾ã™ã€‚ユーザーIDã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’加速ã™ã‚‹ãŸã‚ã«æœ€é©åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¨ã€URLã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’加速ã™ã‚‹ãŸã‚ã«æœ€é©åŒ–ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã§ã™ï¼š + + +### オプション2: マテリアライズドビュー + +既存ã®ãƒ†ãƒ¼ãƒ–ルã«[マテリアライズドビュー](/docs/ja/sql-reference/statements/create/view.md)を作æˆã—ã¾ã™ã€‚ +```sql +CREATE MATERIALIZED VIEW mv_hits_URL_UserID +ENGINE = MergeTree() +PRIMARY KEY (URL, UserID) +ORDER BY (URL, UserID, EventTime) +POPULATE +AS SELECT * FROM hits_UserID_URL; +``` + +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```response +Ok. + +0 rows in set. Elapsed: 2.935 sec. Processed 8.87 million rows, 838.84 MB (3.02 million rows/s., 285.84 MB/s.) +``` + +:::note +- ビューã®ä¸»ã‚­ãƒ¼ã«ãŠã„ã¦ã€å…ƒã®ãƒ†ãƒ¼ãƒ–ルã¨æ¯”較ã—ã¦ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã®é †åºã‚’入れ替ãˆã¦ã„ã¾ã™ã€‚ +- マテリアライズドビューã¯**暗黙的ã«ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル**ã«ã‚ˆã£ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•ã‚Œã€ãã®è¡Œã®é †åºã¨ä¸»ã‚­ãƒ¼ã¯ä¸Žãˆã‚‰ã‚ŒãŸãƒ—ライマリキー定義ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ +- 暗黙的ã«ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯`SHOW TABLES`クエリã«ã‚ˆã£ã¦è¡¨ç¤ºã•ã‚Œã€ãã®åå‰ã¯`.inner`ã§å§‹ã¾ã‚Šã¾ã™ã€‚ +- マテリアライズドビューã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—テーブルをã¾ãšæ˜Žç¤ºçš„ã«ä½œæˆã—ã¦ã‹ã‚‰ã€ãã®ãƒ“ューを`TO [db].[table]`[å¥](/docs/ja/sql-reference/statements/create/view.md)を使ã£ã¦ãã‚Œã«ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã•ã›ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ +- `POPULATE`キーワードを使用ã—ã¦ã€ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ル[ヒット_ユーザーID_URL](#a-table-with-a-primary-key)ã‹ã‚‰æš—黙的ã«ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«å³åº§ã«ã™ã¹ã¦ã®8.87百万行を挿入ã—ã¾ã™ã€‚ +- ソーステーブルヒット_ユーザーID_URLã«æ–°ã—ã„è¡ŒãŒæŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€ãã®è¡Œã¯æš—黙的ã«ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«ã‚‚自動的ã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ +- 暗黙的ã«ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯ã€ä»¥å‰ã«æ˜Žç¤ºçš„ã«ä½œæˆã—ãŸäºŒæ¬¡ãƒ†ãƒ¼ãƒ–ルã¨åŒã˜è¡Œé †ã¨ä¸»ã‚­ãƒ¼ã‚’æŒã¤ã“ã¨ã«ãªã‚Šã¾ã™ï¼š + + + +ClickHouseã¯[カラムデータファイル](#data-is-stored-on-disk-ordered-by-primary-key-columns) (*.bin)ã€[マークファイル](#mark-files-are-used-for-locating-granules) (*.mrk2)ã€ãŠã‚ˆã³ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹(`primary.idx`)ã‚’ã€ClickHouseサーãƒãƒ¼ã®ãƒ‡ãƒ¼ã‚¿ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…ã®ç‰¹åˆ¥ãªãƒ•ã‚©ãƒ«ãƒ€ã«æ ¼ç´ã—ã¦ã„ã¾ã™ï¼š + + + +::: + + +マテリアライズドビューã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ã—ã¦æš—黙的ã«ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル(ãŠã‚ˆã³ãã®ä¸»ã‚­ãƒ¼ï¼‰ã¯ã€URLカラムã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã†ã‚µãƒ³ãƒ—ルクエリã®å®Ÿè¡Œã‚’大幅ã«é«˜é€ŸåŒ–ã™ã‚‹ãŸã‚ã«ç¾æ™‚点ã§ä½¿ç”¨ã•ã‚Œã¾ã™ï¼š +```sql +SELECT UserID, count(UserID) AS Count +// highlight-next-line +FROM mv_hits_URL_UserID +WHERE URL = 'http://public_search' +GROUP BY UserID +ORDER BY Count DESC +LIMIT 10; +``` + +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```response +┌─────UserID─┬─Count─┠+│ 2459550954 │ 3741 │ +│ 1084649151 │ 2484 │ +│ 723361875 │ 729 │ +│ 3087145896 │ 695 │ +│ 2754931092 │ 672 │ +│ 1509037307 │ 582 │ +│ 3085460200 │ 573 │ +│ 2454360090 │ 556 │ +│ 3884990840 │ 539 │ +│ 765730816 │ 536 │ +└────────────┴───────┘ + +10 rows in set. Elapsed: 0.026 sec. +// highlight-next-line +Processed 335.87 thousand rows, +13.54 MB (12.91 million rows/s., 520.38 MB/s.) +``` + +効果的ã«è¨€ãˆã°ã€æš—黙的ã«ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル(ãŠã‚ˆã³ãã®ãƒ—ライマリインデックス)ã¯ã€ä»¥å‰ã«æ˜Žç¤ºçš„ã«ä½œæˆã—ãŸäºŒæ¬¡ãƒ†ãƒ¼ãƒ–ルã¨åŒä¸€ãªã®ã§ã€ã‚¯ã‚¨ãƒªã¯æ˜Žç¤ºçš„ã«ä½œæˆã—ãŸãƒ†ãƒ¼ãƒ–ルã¨åŒã˜åŠ¹æžœçš„ãªæ–¹æ³•ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +ClickHouseサーãƒãƒ¼ãƒ­ã‚°ã®å¯¾å¿œã™ã‚‹ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ­ã‚°ã¯ã€ClickHouseãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã«ãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒå®Ÿè¡Œã—ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ï¼š + +```response +...Executor): Key condition: (column 0 in ['http://public_search', + 'http://public_search']) +// highlight-next-line +...Executor): Running binary search on index range ... +... +...Executor): Selected 4/4 parts by partition key, 4 parts by primary key, +// highlight-next-line + 41/1083 marks by primary key, 41 marks to read from 4 ranges +...Executor): Reading approx. 335872 rows with 4 streams +``` + + + +### オプション3: プロジェクション + +既存ã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ—ロジェクションを追加: +```sql +ALTER TABLE hits_UserID_URL + ADD PROJECTION prj_url_userid + ( + SELECT * + ORDER BY (URL, UserID) + ); +``` + +ãã—ã¦ãƒ—ロジェクションをマテリアライズã—ã¾ã™ï¼š +```sql +ALTER TABLE hits_UserID_URL + MATERIALIZE PROJECTION prj_url_userid; +``` + +:::note +- プロジェクションã¯è¡Œé †ã¨ä¸»ã‚­ãƒ¼å®šç¾©ã«åŸºã¥ã„ã¦ã„ã‚‹**éš ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル**を作æˆã™ã‚‹ã€‚ +- éš ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯`SHOW TABLES`クエリã«ã¯è¡¨ç¤ºã•ã‚Œã¾ã›ã‚“。 +- `MATERIALIZE`キーワードを使用ã—ã¦ã€ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ル[#hitsUserID_URL](#a-table-with-a-primary-key)ã‹ã‚‰ã™ã¹ã¦ã®8.87百万行をå³åº§ã«æ ¼ç´ã™ã‚‹ã€‚ +- ソーステーブルã®[#hits_USERID_URL](#a-table-with-a-primary-key)ã«æ–°ã—ã„è¡ŒãŒæŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€ãã®è¡Œã¯éš ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«ã‚‚自動的ã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ +- 常ã«ã‚¯ã‚¨ãƒªã¯æ§‹æ–‡ä¸Šã§ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ル[#hits_USERID_URL](#a-table-with-a-primary-key)をターゲットã«ã—ã¦ãŠã‚Šã€è¡Œã®é †åºã¨ä¸»ã‚­ãƒ¼ã®ã‚ã‚‹éš ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルãŒã‚ˆã‚ŠåŠ¹æžœçš„ãªã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚’å¯èƒ½ã«ã™ã‚‹å ´åˆã€ãã®ã‚¯ã‚¨ãƒªã«å¯¾å¿œã™ã‚‹ã‚‚ã®ã§ã™ã€‚ +- ã—ã‹ã—ã€ORDER BYãŒãƒ—ロジェクションã®ORDER BYã¨ä¸€è‡´ã™ã‚‹å ´åˆã§ã‚‚ã€ãƒ—ロジェクションã¯ã‚¯ã‚¨ãƒªã®ORDER BYをより効率的ã«ã™ã‚‹ã“ã¨ã¯ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„ (詳細ã¯ã€https://github.com/ClickHouse/ClickHouse/issues/47333 ã‚’å‚ç…§)。 +- 事実上ã€æš—é»™ã«ä½œæˆã•ã‚ŒãŸéš ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯ä»¥å‰ã«æ˜Žç¤ºçš„ã«ä½œæˆã—ãŸäºŒæ¬¡ãƒ†ãƒ¼ãƒ–ルã¨åŒæ§˜ã®è¡Œé †ã¨ä¸»ã‚­ãƒ¼ã‚’æŒã¡ã¾ã™ï¼š + + + +ClickHouseã¯ã€ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã€ãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã€ãŠã‚ˆã³ä¸»ã‚­ãƒ¼ã¨ä¸€ç·’ã«ã€ç‰¹åˆ¥ãªãƒ•ã‚©ãƒ«ãƒ€ï¼ˆã‚ªãƒ¬ãƒ³ã‚¸è‰²ã§è¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼‰ã«éš ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®[カラムデータファイル](#data-is-stored-on-disk-ordered-by-primary-key-columns) (*.bin)ã€ãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ« (*.mrk2)ã€ãŠã‚ˆã³ä¸»ã‚­ãƒ¼ (primary.idx) ファイルを格ç´ã—ã¦ã„ã¾ã™ï¼š + + +::: + + +仮想的ãªéš ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¨ãã®ä¸»ã‚­ãƒ¼ã¯URLカラムã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã†ã‚µãƒ³ãƒ—ルクエリã®å®Ÿè¡Œã‚¹ãƒ”ードを劇的ã«ä¸Šã’ã‚‹ãŸã‚ã«æš—黙的ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚注æ„ã¨ã—ã¦ã€ã‚¯ã‚¨ãƒªã¯æ§‹æ–‡çš„ã«ãƒ—ロジェクションã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルをターゲットã«ã—ã¦ã„ã¾ã™ã€‚ +```sql +SELECT UserID, count(UserID) AS Count +// highlight-next-line +FROM hits_UserID_URL +WHERE URL = 'http://public_search' +GROUP BY UserID +ORDER BY Count DESC +LIMIT 10; +``` + +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```response +┌─────UserID─┬─Count─┠+│ 2459550954 │ 3741 │ +│ 1084649151 │ 2484 │ +│ 723361875 │ 729 │ +│ 3087145896 │ 695 │ +│ 2754931092 │ 672 │ +│ 1509037307 │ 582 │ +│ 3085460200 │ 573 │ +│ 2454360090 │ 556 │ +│ 3884990840 │ 539 │ +│ 765730816 │ 536 │ +└────────────┴───────┘ + +10 rows in set. Elapsed: 0.029 sec. +// highlight-next-line +Processed 319.49 thousand rows, 1 +1.38 MB (11.05 million rows/s., 393.58 MB/s.) +``` + +暗黙的ã«ä½œæˆã•ã‚ŒãŸéš ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¨ãã®ä¸»ã‚­ãƒ¼ã¯ã€ä»¥å‰ã«æ˜Žç¤ºçš„ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã—ãŸã‚‚ã®ã¨åŒä¸€ã§ã‚ã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªã¯æ˜Žç¤ºçš„ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã—ãŸã¨ãã¨åŒæ§˜ã«åŠ¹æžœçš„ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +ClickHouseサーãƒãƒ¼ãƒ­ã‚°ã®å¯¾å¿œã™ã‚‹ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ­ã‚°ãŒã€ClickHouseãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã«å¯¾ã—ã¦ãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒã‚’è¡Œã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã—ãŸï¼š + + +```response +...Executor): Key condition: (column 0 in ['http://public_search', + 'http://public_search']) +// highlight-next-line +...Executor): Running binary search on index range for part prj_url_userid (1083 marks) +...Executor): ... +// highlight-next-line +...Executor): Choose complete Normal projection prj_url_userid +...Executor): projection required columns: URL, UserID +...Executor): Selected 1/1 parts by partition key, 1 parts by primary key, +// highlight-next-line + 39/1083 marks by primary key, 39 marks to read from 1 ranges +...Executor): Reading approx. 319488 rows with 2 streams +``` + +### ã¾ã¨ã‚ + +コンパウンドプライマリキーをæŒã¤æˆ‘々ã®[#テーブル](#a-table-with-a-primary-key)ã®ãƒ—ライマリインデックスãŒ[ユーザーIDã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒª](#the-primary-index-is-used-for-selecting-granules)を加速ã™ã‚‹ã®ã«æœ‰ç”¨ã§ã‚ã£ãŸã€‚ ã—ã‹ã—ã€ãã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€URLカラムãŒã‚³ãƒ³ãƒ‘ウンドプライマリキーã«åŠ ã‚ã£ã¦ã„ã‚‹ã«ã‚‚ã‹ã‹ã‚らãš[URLã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒª](#guidelines-for-choosing-either-mergetree-or-replicatedmergetree)-ã®é«˜é€ŸåŒ–ã«ã¯è²¢çŒ®ã—ã¾ã›ã‚“ã§ã—ãŸã€‚ + +逆ã«:[URL, UserID](#secondary-table)ã®ã‚³ãƒ³ãƒ‘ウンドプライマリキーをæŒã¤æˆ‘々ã®[#テーブル](#a-table-with-a-primary-key)ã®ãƒ—ライマリインデックスã¯[URLã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒª](#query-on-url)を加速ã—ã¾ã—ãŸãŒã€[ユーザーIDã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒª](#the-primary-index-is-used-for-selecting-granules)-実行ã«ã‚ã¾ã‚Šè²¢çŒ®ã—ã¾ã›ã‚“ã§ã—ãŸã€‚ + +プライマリキーã®ã‚«ãƒ©ãƒ ãƒ¦ãƒ¼ã‚¶ãƒ¼IDã¨URLã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ãŒä¼¼ã¦ã„ã‚‹ãŸã‚ã€2ã¤ç›®ã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«å«ã¾ã‚Œã¦ã„ã¦ã‚‚ã€[2番目ã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã†ã‚¯ã‚¨ãƒª](#generic-exclusion-search-slow)ã¯ãã®æ©æµã‚’å—ã‘ã¾ã›ã‚“。 + +ã—ãŸãŒã£ã¦ã€ãƒ—ライマリインデックスã‹ã‚‰2番目ã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã‚’削除ã™ã‚‹ã“ã¨ï¼ˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ãŒå°‘ãªããªã‚‹çµæžœï¼‰ã‚„〠[複数ã®ãƒ—ライマリインデックス](#multiple-primary-indexes)を使用ã™ã‚‹ã“ã¨ã¯ç†ã«ã‹ãªã£ã¦ã„ã¾ã™ã€‚ + +ã—ã‹ã—ãªãŒã‚‰ã€ã‚³ãƒ³ãƒ‘ウンドプライマリキーã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ç¾¤ãŒã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã®å¤§ããªé•ã„ãŒã‚ã‚‹å ´åˆã€ [クエリã«ã¨ã£ã¦](#generic-exclusion-search-fast)カーディナリティã«ã—ãŸãŒã£ã¦ãƒ—ライマリキーã®ã‚«ãƒ©ãƒ ã‚’昇順ã«ä¸¦ã¹ã‚‹ã“ã¨ã¯åˆ©ç›Šã«ãªã‚Šã¾ã™ã€‚ + +キーã®ã‚«ãƒ©ãƒ é–“ã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£å·®ãŒé«˜ã‘ã‚Œã°é«˜ã„ã»ã©ã€ãれらã®ã‚«ãƒ©ãƒ ãŒã‚­ãƒ¼å†…ã§ä¸¦ã¹ã‚‰ã‚Œã‚‹é †åºã®å½±éŸ¿ãŒå¤§ãããªã‚Šã¾ã™ã€‚次ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ãれをデモンストレーションã—ã¾ã™ã€‚ + +## キーã®ã‚«ãƒ©ãƒ ã‚’効率的ã«ä¸¦ã¹æ›¿ãˆã‚‹ + + + +コンパウンドプライマリキーã§ã¯ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã®é †åºã¯ã€ä»¥ä¸‹ã®ä¸¡æ–¹ã«ãŠã„ã¦å¤§ãã影響を与ãˆã¾ã™ï¼š +- クエリ内ã®äºŒæ¬¡ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã«å¯¾ã™ã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã®åŠ¹çŽ‡ +- テーブルã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã®åœ§ç¸®çŽ‡ + +ãれを証明ã™ã‚‹ãŸã‚ã€æˆ‘々ã¯webトラフィックã®ã‚µãƒ³ãƒ—ルデータセットã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¾ã™ã€‚ +å„è¡ŒãŒã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼ˆ`UserID`カラム)ãŒURL(`URL`カラム)ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ãŒbotトラフィックã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’示ã™3ã¤ã®ã‚«ãƒ©ãƒ ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ + +1ã¤ã®ã‚³ãƒ³ãƒ‘ウンドプライマリキーを使用ã—ã€web分æžã‚¯ã‚¨ãƒªã‚’高速化ã™ã‚‹ãŸã‚ã®ã™ã¹ã¦ã®3ã¤ã®ã‚«ãƒ©ãƒ ã‚’キーã®ã‚«ãƒ©ãƒ ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚以下ãŒè€ƒãˆã‚‰ã‚Œã‚‹ã‚¯ã‚¨ãƒªï¼š +- 特定ã®URLã¸ã®ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®ä½•%ãŒbotã«ã‚ˆã‚‹ã‚‚ã®ã‹ +- 指定ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒbotã‹ã©ã†ã‹ï¼ˆãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰ã®ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®ä½•%ãŒbotã¨ä»®å®šã•ã‚Œã¦ã„ã‚‹ã‹ï¼‰ +ãªã© + +コンパウンドプライマリキーã«ä½¿ç”¨ã—よã†ã¨ã—ã¦ã„ã‚‹3ã¤ã®ã‚«ãƒ©ãƒ ã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã‚’計算ã™ã‚‹ãŸã‚ã«ã“ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¾ã™ï¼ˆTSVデータをアドホックã«ã‚¯ã‚¨ãƒªã™ã‚‹ãŸã‚ã«[URLテーブル関数](/docs/ja/sql-reference/table-functions/url.md)を使用ã—ã¦ã„ã¾ã™ï¼‰ã€‚ã“ã®ã‚¯ã‚¨ãƒªã‚’`clickhouse client`ã§å®Ÿè¡Œã—ã¾ã™ï¼š +```sql +SELECT + formatReadableQuantity(uniq(URL)) AS cardinality_URL, + formatReadableQuantity(uniq(UserID)) AS cardinality_UserID, + formatReadableQuantity(uniq(IsRobot)) AS cardinality_IsRobot +FROM +( + SELECT + c11::UInt64 AS UserID, + c15::String AS URL, + c20::UInt8 AS IsRobot + FROM url('https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz') + WHERE URL != '' +) +``` +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š +```response +┌─cardinality_URL─┬─cardinality_UserID─┬─cardinality_IsRobot─┠+│ 2.39 million │ 119.08 thousand │ 4.00 │ +└─────────────────┴────────────────────┴─────────────────────┘ + +1 row in set. Elapsed: 118.334 sec. Processed 8.87 million rows, 15.88 GB (74.99 thousand rows/s., 134.21 MB/s.) +``` + +特ã«`URL`ãŠã‚ˆã³`IsRobot`カラム間ã«éžå¸¸ã«å¤§ããªã‚«ãƒ¼ãƒ‰ãƒŠãƒªãƒ†ã‚£ã®é•ã„ãŒã‚ã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ã“ã®ã‚³ãƒ³ãƒ‘ウンドプライマリキーã®ã‚«ãƒ©ãƒ ã®é †ç•ªã¯ã€ãã®ã‚«ãƒ©ãƒ ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒªã®åŠ¹çŽ‡çš„ãªåŠ é€Ÿã¨ã€ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€é©ãªåœ§ç¸®æ¯”ã‚’é”æˆã™ã‚‹ãŸã‚ã«é‡è¦ã§ã™ã€‚ + +ãれを証明ã™ã‚‹ãŸã‚ã€æˆ‘々ã¯ãƒœãƒƒãƒˆãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯åˆ†æžãƒ‡ãƒ¼ã‚¿ã®ãŸã‚ã«2ã¤ã®ãƒ†ãƒ¼ãƒ–ルãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’作りã¾ã™ï¼š +- コンパウンドプライマリキーãŒ`(URL, UserID, IsRobot)`ã§ã€ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã‚’カードナリティã®é™é †ã«ä¸¦ã¹ãŸ`hits_URL_UserID_IsRobot`テーブル +- コンパウンドプライマリキーãŒ`(IsRobot, UserID, URL)`ã§ã€ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã‚’カードナリティã®æ˜‡é †ã«ä¸¦ã¹ãŸ`hits-IsRobot_UserID_URL`テーブル + +コンãƒã‚¦ãƒ³ãƒ‰ãƒ—ライマリキー`(URL, UserID, IsRobot)`ã‚’æŒã¤`hits_URL_UserID_IsRobot`テーブルを作æˆã™ã‚‹ï¼š +```sql +CREATE TABLE hits_URL_UserID_IsRobot +( + `UserID` UInt32, + `URL` String, + `IsRobot` UInt8 +) +ENGINE = MergeTree +// highlight-next-line +PRIMARY KEY (URL, UserID, IsRobot); +``` + +ãã—ã¦ã€887百万行を挿入ã—ã¾ã™ï¼š +```sql +INSERT INTO hits_URL_UserID_IsRobot SELECT + intHash32(c11::UInt64) AS UserID, + c15 AS URL, + c20 AS IsRobot +FROM url('https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz') +WHERE URL != ''; +``` +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š +```response +0 rows in set. Elapsed: 104.729 sec. Processed 8.87 million rows, 15.88 GB (84.73 thousand rows/s., 151.64 MB/s.) +``` + + +次ã«ã‚³ãƒ³ãƒ‘ウンドプライマリキー`(IsRobot, UserID, URL)`ã‚’æŒã¤`hits_IsRobot_UserID_URL`テーブルを作æˆã—ã¾ã™ï¼š +```sql +CREATE TABLE hits_IsRobot_UserID_URL +( + `UserID` UInt32, + `URL` String, + `IsRobot` UInt8 +) +ENGINE = MergeTree +// highlight-next-line +PRIMARY KEY (IsRobot, UserID, URL); +``` +ãã—ã¦ã€ä»¥å‰ã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã—ãŸè¡Œã¨åŒã˜8.87百万行を挿入ã—ã¾ã™ï¼š + +```sql +INSERT INTO hits_IsRobot_UserID_URL SELECT + intHash32(c11::UInt64) AS UserID, + c15 AS URL, + c20 AS IsRobot +FROM url('https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz') +WHERE URL != ''; +``` +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®é€šã‚Šï¼š +```response +0 rows in set. Elapsed: 95.959 sec. Processed 8.87 million rows, 15.88 GB (92.48 thousand rows/s., 165.50 MB/s.) +``` + + + +### 二次キーã®ã‚«ãƒ©ãƒ ã§ã®åŠ¹çŽ‡çš„ãªãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚° + +クエリãŒã‚³ãƒ³ãƒ‘ウンドキーã®ä¸€éƒ¨ã®ã‚«ãƒ©ãƒ ã€ã™ãªã‚ã¡æœ€åˆã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯[#ãƒã‚¤ãƒŠãƒªæ¤œç´¢ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ](#the-primary-index-is-used-for-selecting-granules)ã‚’ãã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã§å®Ÿè¡Œã—ã¾ã™ã€‚ + +クエリãŒã‚³ãƒ³ãƒ‘ウンドキーã®ä¸€éƒ¨ã®ã‚«ãƒ©ãƒ ï¼ˆæœ€åˆã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã§ãªã„)ã«ã®ã¿ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯[#一般的除外検索アルゴリズム](#secondary-key-columns-can-not-be-inefficient)ã‚’ãã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã§ä½¿ç”¨ã—ã¾ã™ã€‚ + +2番目ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ã‚³ãƒ³ãƒ‘ウンドプライマリキーã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã®é †åºãŒä¸€èˆ¬çš„除外検索アルゴリズムã®[#効率ã«ã¨ã£ã¦é‡è¦ã§ã™](https://github.com/ClickHouse/ClickHouse/blob/22.3/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp#L1444)。 + +以下ã¯ã‚«ãƒ¼ãƒ‰ãƒŠãƒªãƒ†ã‚£ãŒé™é †ã¨ãªã‚‹`(URL, UserID, IsRobot)`ã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã‚’並ã¹æ›¿ãˆãŸãƒ†ãƒ¼ãƒ–ルã§UserIDカラムをフィルタリングã—ã¦ã„るクエリã§ã™ï¼š +```sql +SELECT count(*) +FROM hits_URL_UserID_IsRobot +WHERE UserID = 112304 +``` +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™ï¼š +```response +┌─count()─┠+│ 73 │ +└─────────┘ + +1 row in set. Elapsed: 0.026 sec. +// highlight-next-line +Processed 7.92 million rows, +31.67 MB (306.90 million rows/s., 1.23 GB/s.) +``` + +ã“れもã€å…ˆã«ä½œæˆã—ãŸã€ã‚«ãƒ¼ãƒ‰ãƒŠãƒªãƒ†ã‚£ãŒæ˜‡é †ã«ãªã‚‹ã‚ˆã†ã«ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã‚’並ã¹ãŸ`(IsRobot, UserID, URL)`ã®ãƒ†ãƒ¼ãƒ–ルã§åŒã˜ã‚¯ã‚¨ãƒªï¼š +```sql +SELECT count(*) +FROM hits_IsRobot_UserID_URL +WHERE UserID = 112304 +``` +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™ï¼š +```response +┌─count()─┠+│ 73 │ +└─────────┘ + +1 row in set. Elapsed: 0.003 sec. +// highlight-next-line +Processed 20.32 thousand rows, +81.28 KB (6.61 million rows/s., 26.44 MB/s.) +``` + +カードナリティを昇順ã«ä¸¦ã¹ãŸãƒ†ãƒ¼ãƒ–ルã®æ–¹ãŒã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡ŒãŒå¤§å¹…ã«åŠ¹æžœçš„ã§é€Ÿã„ã“ã¨ãŒåˆ†ã‹ã‚Šã¾ã™ã€‚ + +ãã®ç†ç”±ã¯ã€æœ€ã‚‚効果的ã«[一般的除外検索アルゴリズム](https://github.com/ClickHouse/ClickHouse/blob/22.3/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp#L1444)ãŒ[グラニュール](#the-primary-index-is-used-for-selecting-granules)ãŒé¸æŠžã•ã‚Œã‚‹æ™‚ã®äºŒæ¬¡ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã«ãŠã‘ã‚‹ã€å…ˆè¡Œã™ã‚‹ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã®ã‚«ãƒ¼ãƒ‰ãƒŠãƒªãƒ†ã‚£ãŒä½Žã„å ´åˆã§ã™ã€‚ãれをå‰è¿°ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§è©³ã—ã説明ã—ã¾ã—ãŸã€‚ + +### データファイルã®æœ€é©ãªåœ§ç¸®æ¯” + +次ã®ã‚¯ã‚¨ãƒªã¯ã€ä¸Šã§ä½œæˆã—ãŸ2ã¤ã®ãƒ†ãƒ¼ãƒ–ル間ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼IDカラムã®åœ§ç¸®æ¯”を比較ã—ã¾ã™ï¼š + +```sql +SELECT + table AS Table, + name AS Column, + formatReadableSize(data_uncompressed_bytes) AS Uncompressed, + formatReadableSize(data_compressed_bytes) AS Compressed, + round(data_uncompressed_bytes / data_compressed_bytes, 0) AS Ratio +FROM system.columns +WHERE (table = 'hits_URL_UserID_IsRobot' OR table = 'hits_IsRobot_UserID_URL') AND (name = 'UserID') +ORDER BY Ratio ASC +``` +ã“ã‚ŒãŒãƒ¬ã‚¹ãƒãƒ³ã‚¹ã§ã™ï¼š +```response +┌─Table───────────────────┬─Column─┬─Uncompressed─┬─Compressed─┬─Ratio─┠+│ hits_URL_UserID_IsRobot │ UserID │ 33.83 MiB │ 11.24 MiB │ 3 │ +│ hits_IsRobot_UserID_URL │ UserID │ 33.83 MiB │ 877.47 KiB │ 39 │ +└─────────────────────────┴────────┴──────────────┴────────────┴───────┘ + +2 rows in set. Elapsed: 0.006 sec. +``` +カードナリティを昇順ã«ä¸¦ã¹ãŸãƒ†ãƒ¼ãƒ–ル`(IsRobot, UserID, URL)`ã§ã¯ã€`UserID`カラムã®åœ§ç¸®æ¯”ãŒå¤§å¹…ã«é«˜ã„ã“ã¨ãŒç¢ºèªã•ã‚Œã¾ã™ã€‚ + +ã©ã¡ã‚‰ã®ãƒ†ãƒ¼ãƒ–ルã«ã‚‚åŒã˜ãƒ‡ãƒ¼ã‚¿ãŒä¿å­˜ã•ã‚Œã¦ã„る(åŒã˜8.87百万行を両方ã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã—ã¾ã—ãŸï¼‰ã«ã‚‚ã‹ã‹ã‚らãšã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãƒ—ライマリキーã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã®é †åºãŒãƒ†ãƒ¼ãƒ–ルã®[カラムデータファイル](#data-is-stored-on-disk-ordered-by-primary-key-columns)ã«æ ¼ç´ã•ã‚Œã‚‹åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ãŒã©ã‚Œã ã‘ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’è¦ã™ã‚‹ã‹ã«å¤§ããªå½±éŸ¿ã‚’与ãˆã¾ã™ï¼š +- カードナリティをé™é †ã«ä¸¦ã¹ãŸã‚³ãƒ³ãƒ‘ウンドプライマリキー`(URL, UserID, IsRobot)`ã‚’æŒã¤`hits_URL_UserID_IsRobot`テーブルã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«`UserID.bin`ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã¯**11.24 MiB**ã§ã™ã€‚ +- カードナリティを昇順ã«ä¸¦ã¹ãŸã‚³ãƒ³ãƒ‘ウンドプライマリキー`(IsRobot, UserID, URL)`ã‚’æŒã¤`hits_IsRobot_UserID_URL`テーブルã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«`UserID.bin`ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã¯ã‚ãšã‹**877.47 KiB**ã§ã™ã€‚ + +ディスク上ã§ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã®è‰¯å¥½ãªåœ§ç¸®æ¯”ã‚’æŒã¤ã“ã¨ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’節約ã™ã‚‹ã ã‘ã§ãªãã€ãã‚Œã«ã‚ˆã£ã¦ãã®ã‚«ãƒ©ãƒ ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã¾ãªã‘ã‚Œã°ãªã‚‰ãªã„クエリ(特ã«åˆ†æžã‚¯ã‚¨ãƒªï¼‰ãŒé«˜é€ŸåŒ–ã•ã‚Œã€ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’移動ã™ã‚‹ãŸã‚ã®i/oãŒå°‘ãªãã¦æ¸ˆã‚€ã€‚ + +次ã«ä¾‹ã‚’示ã™ã“ã¨ã§ã€ãƒ—ライマリキーã®ã‚«ãƒ©ãƒ ã‚’カードナリティã«ã—ãŸãŒã£ã¦æ˜‡é †ã«ä¸¦ã¹ã‚‹ã“ã¨ãŒãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã®åœ§ç¸®æ¯”ã«ã¨ã£ã¦æœ‰åˆ©ãªç†ç”±ã‚’説明ã—ã¾ã™ã€‚ + +以下ã®å›³ã¯ã€ãƒ—ライマリキーã®ã‚«ãƒ©ãƒ ã‚’カードナリティã«ã—ãŸãŒã£ã¦æ˜‡é †ã«ä¸¦ã¹ãŸå ´åˆã®è¡Œã‚’ディスクã«ä¸¦ã¹ã‚‹é †åºã‚’概略ã—ã¾ã™ï¼š + + +テーブルã®è¡Œãƒ‡ãƒ¼ã‚¿ã¯ãƒ—ライマリキーã®ã‚«ãƒ©ãƒ ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«æ ¼ç´ã•ã‚Œã‚‹ã“ã¨ã‚’[è­°è«–ã—ã¾ã—ãŸ](#data-is-stored-on-disk-ordered-by-primary-key-columns)。 + +上記ã®æ–¹æ³•ã§ã¯ã€ãã®ãƒ†ãƒ¼ãƒ–ルã®è¡Œã¯ã¾ãš`cl`値ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã€åŒã˜`cl`値をæŒã¤è¡Œã¯`ch`値ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ãã—ã¦ã‚«ãƒ¼ãƒ‰ãƒŠãƒªãƒ†ã‚£ãŒä½Žã„最åˆã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ `cl`ãŒã‚ã‚‹ãŸã‚ã€åŒã˜`cl`値ã®è¡ŒãŒå­˜åœ¨ã™ã‚‹å¯èƒ½æ€§ãŒé«˜ã„。ã—ãŸãŒã£ã¦ã€`ch`値ã¯ï¼ˆåŒã˜`cl`値ã®è¡Œã§ï¼‰å±€æ‰€çš„ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +カラム内ã§ã€é¡žä¼¼ã—ãŸãƒ‡ãƒ¼ã‚¿ãŒè¿‘隣ã«é…ç½®ã•ã‚Œã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã®åœ§ç¸®ãŒå®¹æ˜“ã«ãªã‚Šã¾ã™ +一般的ã«ã€åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ãƒ‡ãƒ¼ã‚¿ã®é•·ã•ã«å¯¾ã™ã‚‹ï¼ˆã‚ˆã‚Šå¤šãã®ãƒ‡ãƒ¼ã‚¿ãŒä½¿ç”¨ã•ã‚Œã‚‹ã»ã©ã€åœ§ç¸®ã®ãŸã‚ã«ã‚ˆã‚Šè‰¯ããªã‚‹ï¼‰ãŠã‚ˆã³å±€æ‰€æ€§ï¼ˆã‚ˆã‚Šé¡žä¼¼ã—ãŸãƒ‡ãƒ¼ã‚¿ã§ã‚ã‚Œã°ã€ã‚ˆã‚Šè‰¯ã„圧縮比率ãŒå¾—られる)を考慮ã—ã¾ã™ã€‚ + +ã“ã‚Œã«å¯¾ã—ã¦ã€ä»¥ä¸‹ã®å›³ã¯ã€ãƒ—ライマリキーã®ã‚«ãƒ©ãƒ ã‚’カードナリティã«ã—ãŸãŒã£ã¦é™é †ã«ä¸¦ã¹ãŸå ´åˆã®è¡Œã‚’ディスクã«ä¸¦ã¹ã‚‹é †åºã‚’概略ã—ã¾ã™ï¼š + + +今度ã¯ãƒ†ãƒ¼ãƒ–ルã®è¡ŒãŒã¾ãš`ch`値を基ã«ä¸¦ã¹ã‚‰ã‚Œã€åŒã˜`ch`値をæŒã¤è¡Œã¯`cl`値ã§æœ€çµ‚çš„ãªé †åºãŒæ±ºå®šã•ã‚Œã‚‹ã€‚ +ãŸã ã—ã€æœ€åˆã®ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ `ch`ãŒéžå¸¸ã«é«˜ã„カードナリティをæŒã£ã¦ã„ã‚‹ãŸã‚ã€åŒã˜`ch`値をæŒã¤è¡ŒãŒã»ã¨ã‚“ã©ãªã„å¯èƒ½æ€§ãŒã‚る。ã—ãŸãŒã£ã¦ã€`cl`値ãŒï¼ˆåŒã˜`ch`値をæŒã¤è¡Œã§ï¼‰å±€æ‰€çš„ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã‚‹å¯èƒ½æ€§ã¯å°‘ãªã„。 + +ã—ãŸãŒã£ã¦ã€`cl`値ã¯ãŠãらãランダムãªé †åºã§ã‚ã‚Šã€å±€æ‰€æ€§ãŒæ‚ªã圧縮比も悪ã„。 + +### サマリー + +二次キーã®ã‚«ãƒ©ãƒ ã§ã®åŠ¹çŽ‡çš„ãªãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¨ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã®åœ§ç¸®æ¯”ã®ä¸¡æ–¹ã«ãŠã„ã¦ã€ãƒ—ライマリキー内ã®ã‚«ãƒ©ãƒ ã‚’ãã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã«å¾“ã£ã¦æ˜‡é †ã«ä¸¦ã¹ã‚‹ã“ã¨ãŒæœ‰ç›Šã§ã™ã€‚ + +### 関連コンテンツ +- Blog: [クリックãƒã‚¦ã‚¹ã®ã‚¯ã‚¨ãƒªã‚’スーパーãƒãƒ£ãƒ¼ã‚¸ã™ã‚‹ã«ã¯](https://clickhouse.com/blog/clickhouse-faster-queries-with-projections-and-primary-indexes) + +## シングル行を効率的ã«ç‰¹å®šã™ã‚‹ + +å ´åˆã«ã‚ˆã£ã¦ã¯ClickHouse上ã«æ§‹ç¯‰ã—ãŸã‚¢ãƒ—リケーションãŒClickHouseテーブルã®ç‰¹å®šã®è¡Œã‚’特定ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ãŒã€é€šå¸¸ã¯ClickHouseã®[^best-uses-for-clickhouse]最é©ãªä½¿ç”¨æ–¹æ³•ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +ãã®ãŸã‚ã®ç›´æ„Ÿçš„ãªè§£æ±ºç­–ã¯ã€å„è¡Œã«ä¸€æ„ã®å€¤ã‚’æŒã¤[UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier)カラムを使ã„ã€è¡Œã®é«˜é€Ÿãªæ¤œç´¢ã®ç›®çš„ã§ãã®ã‚«ãƒ©ãƒ ã‚’プライマリキーã®ã‚«ãƒ©ãƒ ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +最も高速ãªæ¤œç´¢ã®ãŸã‚ã«ã¯ã€UUIDカラムã¯ãƒ—ライマリキーã®ã‚«ãƒ©ãƒ ã®æœ€åˆã«[ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™](#the-primary-index-is-used-for-selecting-granules) 。 + +プライマリキーã¾ãŸã¯ã‚«ãƒ¼ãƒ‰ãƒŠãƒªãƒ†ã‚£ãŒéžå¸¸ã«é«˜ã„カラムをå«ã‚€ã‚³ãƒ³ãƒ‘ウンドプライマリキーã®ã‚«ãƒ©ãƒ ã‚’ã€ãã®ãƒ—ライマリキー列ã®å¾Œã®ä½Žã„カードナリティã®ã‚«ãƒ©ãƒ ã‚ˆã‚Šå‰ã«æŒã¤ã“ã¨ãŒã‚ã‚‹ã¨ã€[テーブル内ã®ä»–ã®ã‚«ãƒ©ãƒ ã®åœ§ç¸®æ¯”ã®åŠ£åŒ–](#optimal-compression-ratio-of-data-files)ã«ã¤ãªãŒã‚Šã¾ã™ã€‚ + +最速ã®æ¤œç´¢ã¨æœ€é©ãªãƒ‡ãƒ¼ã‚¿åœ§ç¸®ã®å¦¥å”ã¨ã—ã¦ã¯ã€UUIDを最後ã®ã‚­ãƒ¼åˆ—ã¨ã—ã¦æŒã¤ã‚³ãƒ³ãƒ‘ウンドプライマリキーを使用ã—ã€ã„ãã¤ã‹ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã§è‰¯å¥½ãªåœ§ç¸®æ¯”を確ä¿ã—ã¦ã„ã¾ã™ã€‚ + +### 具体的ãªä¾‹ + +具体的ãªä¾‹ã¨ã—ã¦ã€Alexey MilovidovãŒé–‹ç™ºã—[ブログã«æ›¸ã„ãŸä¾‹](https://clickhouse.com/blog/building-a-paste-service-with-clickhouse/) ã®https://pastila.nlãŒæŸ”軟ãªãƒšãƒ¼ã‚¹ãƒˆã‚µãƒ¼ãƒ“スãŒã‚ã‚Šã¾ã™ã€‚ + +テキストエリアã¸ã®å¤‰æ›´ãŒã‚ã‚‹ã¨ï¼ˆä¾‹ãˆã°ã€ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒªã‚¢ã§ã®ã‚¿ã‚¤ãƒ”ングã«ã‚ˆã‚‹ã‚­ãƒ¼å…¥åŠ›ã®ãŸã³ã«ï¼‰ã€ãƒ‡ãƒ¼ã‚¿ãŒè‡ªå‹•ã§ClickHouseテーブル行(変更1ã¤ã«ã¤ã1行)ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +特定ã®è¡Œã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’特定ã—å–å¾—ã™ã‚‹æ–¹æ³•ã®1ã¤ã¨ã—ã¦ã€è¡Œã«å«ã¾ã‚Œã‚‹å†…容ã®ãƒãƒƒã‚·ãƒ¥ã‚’ãã®ãƒ†ãƒ¼ãƒ–ル行ã®UUIDã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒè€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ + +以下ã®å›³ã¯ã€ä½•ã‚’示ã™ã‹ï¼š +- 内容変更時ã®è¡Œã®æŒ¿å…¥é †åºï¼ˆä¾‹ãˆã°ã€ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒªã‚¢ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’入力ã™ã‚‹ã‚­ãƒ¼å…¥åŠ›ã«ã‚ˆã‚‹å¤‰æ›´ï¼‰ +- `PRIMARY KEY (hash)`ãŒä½¿ç”¨ã•ã‚ŒãŸã¨ãã«æŒ¿å…¥ã•ã‚ŒãŸè¡Œã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ã®é †åºï¼š + + + +`hash`カラムãŒãƒ—ライマリキーã®ã‚«ãƒ©ãƒ ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ãŸã‚〠+- 特定ã®è¡Œã‚’éžå¸¸ã«ã™ã°ã‚„ã[検索ã§ãã¾ã™](#the-primary-index-is-used-for-selecting-granules)。 ã—ã‹ã— +- テーブルã®è¡Œï¼ˆã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ï¼‰ã¯ã€ï¼ˆä¸€æ„ã§ãƒ©ãƒ³ãƒ€ãƒ ãªï¼‰ãƒãƒƒã‚·ãƒ¥å€¤ã«ã‚ˆã£ã¦ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®é †åºã¥ã‘ãŒã•ã‚Œã‚‹ãŸã‚ã€contentカラムã®å€¤ã‚‚ランダム順ã§ä¿å­˜ã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿ã®å±€æ‰€æ€§ãŒãªã„ãŸã‚contentカラムã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã®åœ§ç¸®æ¯”ãŒæœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +データã®åœ§ç¸®æ¯”を大幅ã«æ”¹å–„ã—ã€ç‰¹å®šã®è¡Œã®é«˜é€Ÿæ¤œç´¢ã‚’実ç¾ã™ã‚‹ãŸã‚ã«ã€`pastila.nl`ã¯ç‰¹å®šã®è¡Œã‚’特定ã™ã‚‹ãŸã‚ã«ã€2ã¤ã®ãƒãƒƒã‚·ãƒ¥ï¼ˆãŠã‚ˆã³ã‚³ãƒ³ãƒ‘ウンドプライマリキー)を使用ã—ã¦ã„ã¾ã™ï¼š +- ãƒãƒƒã‚·ãƒ¥ãƒ‡ãƒ¼ã‚¿ã¨ã¯ç•°ãªã‚Šã€å„データã«å¯¾ã—ã¦å›ºæœ‰ã®ãƒãƒƒã‚·ãƒ¥ãŒè¨­å®šã•ã‚Œã¾ã™ã€‚ +- å°ã•ãªãƒ‡ãƒ¼ã‚¿å¤‰æ›´ã§å¤‰åŒ–ã—ãªã„[局所性ã«æ•æ„Ÿãªãƒãƒƒã‚·ãƒ¥ï¼ˆãƒ•ã‚£ãƒ³ã‚¬ãƒ¼ãƒ—リント)](https://en.wikipedia.org/wiki/Locality-sensitive_hashing) + +以下ã®å›³ã¯ã€ä½•ã‚’示ã™ã‹ï¼š +- 内容変更時ã®è¡Œã®æŒ¿å…¥é †åºï¼ˆä¾‹ãˆã°ã€ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒªã‚¢ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’入力ã™ã‚‹ã‚­ãƒ¼å…¥åŠ›ã«ã‚ˆã‚‹å¤‰æ›´ï¼‰ +- コンパウンド`PRIMARY KEY (fingerprint, hash)`ãŒä½¿ç”¨ã•ã‚ŒãŸã¨ãã«æŒ¿å…¥ã•ã‚ŒãŸè¡Œã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ã®é †åºï¼š + + + +è¡Œã¯`fingerprint`ã«ã‚ˆã£ã¦ã¾ãšé †åºã¥ã‘られã€åŒã˜fingerprintã‚’æŒã¤è¡Œã§ã¯`hash`ã«ã‚ˆã£ã¦æœ€çµ‚çš„ãªé †åºãŒæ±ºã¾ã‚Šã¾ã™ã€‚ + +僅ã‹ãªãƒ‡ãƒ¼ã‚¿å¤‰æ›´ã®ã¿ã§åŒã˜fingerprintãŒç”Ÿæˆã•ã‚Œã‚‹ãŸã‚ã€ä¼¼ãŸãƒ‡ãƒ¼ã‚¿ãŒcontentカラムã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§éš£ã‚Šåˆã£ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚圧縮アルゴリズムã¯ä¸€èˆ¬ã«ãƒ‡ãƒ¼ã‚¿ã®å±€æ‰€æ€§ã®æ©æµã‚’å—ã‘(データãŒä¼¼ã¦ã„ã‚Œã°ä¼¼ã¦ã„ã‚‹ã»ã©åœ§ç¸®æ¯”ãŒè‰¯ããªã‚‹ï¼‰ã€contentカラムã®åœ§ç¸®æ¯”ã«éžå¸¸ã«æœ‰åŠ¹ã§ã™ã€‚ + +妥å”ã¨ã—ã¦ã¯ã€2ã¤ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ï¼ˆ`fingerprint` ãŠã‚ˆã³ `hash`)を使用ã—ã¦ç‰¹å®šã®è¡Œã‚’検索ã—ã€ã‚³ãƒ³ãƒ‘ウンド`PRIMARY KEY (fingerprint, hash)`ã«ã‚ˆã£ã¦ãƒ—ライマリインデックスを最é©ã«åˆ©ç”¨ã™ã‚‹ã“ã¨ã§ã™ã€‚ diff --git a/docs/ja/guides/creating-tables.md b/docs/ja/guides/creating-tables.md new file mode 100644 index 00000000000..e6a8f646c76 --- /dev/null +++ b/docs/ja/guides/creating-tables.md @@ -0,0 +1,58 @@ +--- +sidebar_position: 1 +sidebar_label: テーブルã®ä½œæˆ +--- + +# ClickHouseã«ãŠã‘るテーブルã®ä½œæˆ + +ã»ã¨ã‚“ã©ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨åŒæ§˜ã«ã€ClickHouseã¯ãƒ†ãƒ¼ãƒ–ルを**データベース**ã«è«–ç†çš„ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã¾ã™ã€‚ClickHouseã§æ–°ã—ã„データベースを作æˆã™ã‚‹ã«ã¯ã€`CREATE DATABASE`コマンドを使用ã—ã¾ã™ã€‚ + +```sql +CREATE DATABASE IF NOT EXISTS helloworld +``` + +åŒæ§˜ã«ã€`CREATE TABLE`を使用ã—ã¦æ–°ã—ã„テーブルを定義ã—ã¾ã™ã€‚(データベースåを指定ã—ãªã„å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã¯`default`データベースã«ä½œæˆã•ã‚Œã¾ã™ã€‚)次ã®ãƒ†ãƒ¼ãƒ–ルã¯`helloworld`データベース内ã«`my_first_table`ã¨ã„ã†åå‰ã§ä½œæˆã•ã‚Œã¾ã™ã€‚ + +```sql +CREATE TABLE helloworld.my_first_table +( + user_id UInt32, + message String, + timestamp DateTime, + metric Float32 +) +ENGINE = MergeTree() +PRIMARY KEY (user_id, timestamp) +``` + +上記ã®ä¾‹ã§ã¯ã€`my_first_table`ã¯å››ã¤ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤`MergeTree`テーブルã§ã™ã€‚ + +- `user_id`: 32ビットã®ç¬¦å·ãªã—æ•´æ•° +- `message`: `String`データ型ã§ã€ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚·ã‚¹ãƒ†ãƒ ã®`VARCHAR`ã€`BLOB`ã€`CLOB`ãªã©ã®åž‹ã®ä»£æ›¿ +- `timestamp`: 時間ã®çž¬é–“を表ã™`DateTime`値 +- `metric`: 32ビットã®æµ®å‹•å°æ•°ç‚¹æ•° + +:::note +テーブルエンジンã¯ä»¥ä¸‹ã‚’決定ã—ã¾ã™ã€‚ +- データã®ä¿å­˜æ–¹æ³•ã¨ä¿å­˜å ´æ‰€ +- サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るクエリ +- データãŒãƒ¬ãƒ—リケートã•ã‚Œã‚‹ã‹ã©ã†ã‹ + +é¸æŠžã§ãるエンジンã¯å¤šãã‚ã‚Šã¾ã™ãŒã€å˜ä¸€ãƒŽãƒ¼ãƒ‰ã®ClickHouseサーãƒãƒ¼ã§ã®å˜ç´”ãªãƒ†ãƒ¼ãƒ–ルã«ã¯ã€[MergeTree](/ja/engines/table-engines/mergetree-family/mergetree.md)ãŒé©ã—ã¦ã„ã¾ã™ã€‚ +::: + +## 主キーã®ç°¡å˜ãªç´¹ä»‹ + +å…ˆã«é€²ã‚€å‰ã«ã€ClickHouseã«ãŠã‘る主キーã®åƒãã‚’ç†è§£ã™ã‚‹ã“ã¨ãŒé‡è¦ã§ã™ï¼ˆä¸»ã‚­ãƒ¼ã®å®Ÿè£…ã¯æ„外ã«æ„Ÿã˜ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ï¼ï¼‰ã€‚ + +- ClickHouseã§ã¯ã€ä¸»ã‚­ãƒ¼ã¯å„è¡Œã«å¯¾ã—ã¦**一æ„ã§ã¯ã‚ã‚Šã¾ã›ã‚“** + +ClickHouseテーブルã®ä¸»ã‚­ãƒ¼ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ã¨ãã®ã‚½ãƒ¼ãƒˆæ–¹æ³•ã‚’決定ã—ã¾ã™ã€‚8,192è¡Œã¾ãŸã¯10MBã®ãƒ‡ãƒ¼ã‚¿ã”ã¨ï¼ˆ**インデックスã®ç²’度**ã¨å‘¼ã°ã‚Œã‚‹ï¼‰ã«ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚¨ãƒ³ãƒˆãƒªãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã®ç²’度ã®æ¦‚念ã«ã‚ˆã‚Šã€ãƒ¡ãƒ¢ãƒªã«ç°¡å˜ã«åŽã¾ã‚‹**スパースインデックス**ãŒä½œæˆã•ã‚Œã€ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã¯`SELECT`クエリã®å‡¦ç†ä¸­ã«æœ€å°ã®ã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿é‡ã®ã‚¹ãƒˆãƒ©ã‚¤ãƒ—を表ã—ã¾ã™ã€‚ + +主キーã¯`PRIMARY KEY`パラメータを使用ã—ã¦å®šç¾©ã§ãã¾ã™ã€‚`PRIMARY KEY`を指定ã›ãšã«ãƒ†ãƒ¼ãƒ–ルを定義ã™ã‚‹ã¨ã€ã‚­ãƒ¼ã¯`ORDER BY`å¥ã§æŒ‡å®šã•ã‚ŒãŸã‚¿ãƒ—ルã«ãªã‚Šã¾ã™ã€‚`PRIMARY KEY`ã¨`ORDER BY`ã®ä¸¡æ–¹ã‚’指定ã—ãŸå ´åˆã€ä¸»ã‚­ãƒ¼ã¯ã‚½ãƒ¼ãƒˆé †åºã®æŽ¥é ­è¾žã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +主キーã¯ã¾ãŸã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã§ã‚‚ã‚ã‚Šã€`(user_id, timestamp)`ã®ã‚¿ãƒ—ルã§ã™ã€‚ ã—ãŸãŒã£ã¦ã€å„カラムファイルã«ä¿å­˜ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ã€`user_id`ã€æ¬¡ã«`timestamp`ã®é †ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +:::tip +詳細ã«ã¤ã„ã¦ã¯ã€ClickHouse Academyã®[データモデリングトレーニングモジュール](https://learn.clickhouse.com/visitor_catalog_class/show/1328860/?utm_source=clickhouse&utm_medium=docs)ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„。 +::: diff --git a/docs/ja/guides/developer/_category_.yml b/docs/ja/guides/developer/_category_.yml new file mode 100644 index 00000000000..8bfa1dade38 --- /dev/null +++ b/docs/ja/guides/developer/_category_.yml @@ -0,0 +1,8 @@ +position: 2 +label: 'Developer Guides' +collapsible: true +collapsed: true +link: + type: generated-index + title: Developer Guides + slug: /ja/guides/developer diff --git a/docs/ja/guides/developer/alternative-query-languages.md b/docs/ja/guides/developer/alternative-query-languages.md new file mode 100644 index 00000000000..88c249c0e69 --- /dev/null +++ b/docs/ja/guides/developer/alternative-query-languages.md @@ -0,0 +1,78 @@ +--- +slug: /ja/guides/developer/alternative-query-languages +sidebar_label: 代替クエリ言語 +title: 代替クエリ言語 +description: ClickHouseã§ä»£æ›¿ã‚¯ã‚¨ãƒªè¨€èªžã‚’使用ã™ã‚‹ +--- + +`dialect` 設定を使用ã—ã¦ã€ClickHouseã§ä»–ã®ã‚¯ã‚¨ãƒªè¨€èªžã‚’使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +`dialect` を変更ã—ãŸå¾Œã€æ–°ã—ã設定ã•ã‚ŒãŸæ–¹è¨€ã§ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ã€‚ + +ç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る方言ã¯æ¬¡ã®é€šã‚Šã§ã™: +- `clickhouse`: デフォルト㮠[ClickHouse SQL 方言](../../sql-reference/syntax.md) + +エクスペリメンタルãªæ–¹è¨€: +- `prql`: [Pipelined Relational Query Language](https://prql-lang.org/) +- `kusto`: [Kusto Query Language (KQL)](https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query) + +### ClickHouse SQL + +ClickHouseã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®SQL方言ã§ã™ã€‚ + +```sql +SET dialect = 'clickhouse' +``` + +## エクスペリメンタルãªæ–¹è¨€ + +ã“れらã®æ–¹è¨€ã¯å®Œå…¨ã«ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ã‹ã€ã¾ãŸã¯ãã®å…ƒã®ä»•æ§˜ã®ã™ã¹ã¦ã®æ©Ÿèƒ½ã‚’æŒã£ã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +### Pipelined Relational Query Language (PRQL) + +方言を `prql` ã«è¨­å®šã—ãŸå¾Œã€PRQL言語を使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +```sql +SET dialect = 'prql' +``` + +ãã®å¾Œã€çµ„ã¿è¾¼ã¾ã‚Œã¦ã„るコンパイラãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã™ã¹ã¦ã®PRQL機能を使用ã§ãã¾ã™: + +```prql +from trips +aggregate { + ct = count this + total_days = sum days +} +``` + +内部的ã«ã¯ClickHouseãŒPRQLクエリをSQLクエリã«å¤‰æ›ã—ã¦å®Ÿè¡Œã—ã¾ã™ã€‚ + +### Kusto Query Language (KQL) + +KustoãŒClickHouseã§å®šç¾©ã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®é–¢æ•°ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã‚ã‘ã§ã¯ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +Kustoを有効ã«ã™ã‚‹: +```sql +SET dialect = 'kusto' +``` + +`system.numbers(10)` ã‹ã‚‰é¸æŠžã™ã‚‹ã‚¯ã‚¨ãƒªã®ä¾‹: +```sql +numbers(10) | project number +``` + +```sql +┌─number─┠+│ 0 │ +│ 1 │ +│ 2 │ +│ 3 │ +│ 4 │ +│ 5 │ +│ 6 │ +│ 7 │ +│ 8 │ +│ 9 │ +└────────┘ +``` + + diff --git a/docs/ja/guides/developer/cascading-materialized-views.md b/docs/ja/guides/developer/cascading-materialized-views.md new file mode 100644 index 00000000000..a88debdba98 --- /dev/null +++ b/docs/ja/guides/developer/cascading-materialized-views.md @@ -0,0 +1,374 @@ +--- +slug: /ja/guides/developer/cascading-materialized-views +title: カスケードã•ã‚ŒãŸMaterialized View +description: ソーステーブルã‹ã‚‰è¤‡æ•°ã®Materialized Viewを使用ã™ã‚‹æ–¹æ³•ã€‚ +keywords: [materialized view, 集計] +--- + +# カスケードã•ã‚ŒãŸMaterialized View + +ã“ã®ä¾‹ã§ã¯ã€ã¾ãšMaterialized Viewを作æˆã—ã€æ¬¡ã«ãã®Materialized Viewã«ã•ã‚‰ã«ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã•ã›ãŸMaterialized Viewを作æˆã™ã‚‹æ–¹æ³•ã‚’示ã—ã¾ã™ã€‚ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€ãã®æ–¹æ³•ã€å¤šãã®å¯èƒ½æ€§ã€ãŠã‚ˆã³åˆ¶é™ã‚’確èªã§ãã¾ã™ã€‚ç•°ãªã‚‹ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã¯ã€2番目ã®Materialized Viewをソースã¨ã—ã¦ä½¿ç”¨ã—ã¦Materialized Viewを作æˆã™ã‚‹ã“ã¨ã§è§£æ±ºã§ãã¾ã™ã€‚ + +
+ +
+ +
+ +例: + +ドメインåã”ã¨ã®æ¯Žæ™‚ã®ãƒ“ュー数ã¨ã„ã†æž¶ç©ºã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’使用ã—ã¾ã™ã€‚ + +### 目的 + +1. å„ドメインåã”ã¨ã«æœˆã”ã¨ã«é›†è¨ˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’å¿…è¦ã¨ã™ã‚‹ã€‚ +2. å„ドメインåã”ã¨ã«å¹´ã”ã¨ã«é›†è¨ˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚‚å¿…è¦ã¨ã™ã‚‹ã€‚ + +以下ã®ã‚ªãƒ—ションã‹ã‚‰é¸æŠžã§ãã¾ã™ï¼š + +- SELECTリクエスト中ã«ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã€é›†è¨ˆã™ã‚‹ã‚¯ã‚¨ãƒªã‚’書ã +- データを新ã—ã„å½¢å¼ã§å–ã‚Šè¾¼ã¿æ™‚ã«æº–å‚™ã™ã‚‹ +- データを特定ã®é›†è¨ˆå½¢å¼ã§å–ã‚Šè¾¼ã¿æ™‚ã«æº–å‚™ã™ã‚‹ + +Materialized Viewを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’準備ã™ã‚‹ã¨ã€ClickHouseãŒå¿…è¦ã¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿é‡ã¨è¨ˆç®—を制é™ã§ãã‚‹ãŸã‚ã€SELECTリクエストãŒã‚ˆã‚Šé«˜é€Ÿã«ãªã‚Šã¾ã™ã€‚ + +## Materialized Viewã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ル + +ソーステーブルを作æˆã—ã¾ã™ã€‚目標ãŒå€‹ã€…ã®è¡Œã§ã¯ãªã集計データã®ãƒ¬ãƒãƒ¼ãƒˆã§ã‚ã‚‹ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ã‚’解æžã—ã€ãã®æƒ…報をMaterialized Viewã«æ¸¡ã—ã€å®Ÿéš›ã®å—信データを破棄ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šç›®çš„ãŒé”æˆã•ã‚Œã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒç¯€ç´„ã§ãã‚‹ãŸã‚ã€`Null`テーブルエンジンを使用ã—ã¾ã™ã€‚ + +```sql +CREATE DATABASE IF NOT EXISTS analytics; +``` + +```sql +CREATE TABLE analytics.hourly_data +( + `domain_name` String, + `event_time` DateTime, + `count_views` UInt64 +) +ENGINE = Null +``` + +:::note +Nullテーブルã«å¯¾ã—ã¦Materialized Viewを作æˆã§ãã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ãƒ†ãƒ¼ãƒ–ルã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ãƒ“ューã«å½±éŸ¿ã‚’与ãˆã¾ã™ãŒã€å…ƒã®ç”Ÿãƒ‡ãƒ¼ã‚¿ã¯ç ´æ£„ã•ã‚Œã¾ã™ã€‚ +::: + +## 月次集計テーブルã¨Materialized View + +最åˆã®Materialized Viewã«ã¤ã„ã¦ã¯ã€`Target`テーブルを作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€`analytics.monthly_aggregated_data`ã¨ã„ã†ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€æœˆåˆ¥ãŠã‚ˆã³ãƒ‰ãƒ¡ã‚¤ãƒ³å別ã«ãƒ“ューã®åˆè¨ˆã‚’ä¿å­˜ã—ã¾ã™ã€‚ + +```sql +CREATE TABLE analytics.monthly_aggregated_data +( + `domain_name` String, + `month` Date, + `sumCountViews` AggregateFunction(sum, UInt64) +) +ENGINE = AggregatingMergeTree +ORDER BY (domain_name, month) +``` + +ターゲットテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’転é€ã™ã‚‹Materialized Viewã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```sql +CREATE MATERIALIZED VIEW analytics.monthly_aggregated_data_mv +TO analytics.monthly_aggregated_data +AS +SELECT + toDate(toStartOfMonth(event_time)) AS month, + domain_name, + sumState(count_views) AS sumCountViews +FROM analytics.hourly_data +GROUP BY + domain_name, + month +``` + +## 年次集計テーブルã¨Materialized View + +次ã«ã€å‰ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ル`monthly_aggregated_data`ã«ãƒªãƒ³ã‚¯ã•ã‚Œã‚‹2番目ã®Materialized Viewを作æˆã—ã¾ã™ã€‚ + +ã¾ãšã€ãƒ‰ãƒ¡ã‚¤ãƒ³åã”ã¨ã«å¹´åˆ¥ã«é›†è¨ˆã•ã‚ŒãŸãƒ“ューã®åˆè¨ˆã‚’æ ¼ç´ã™ã‚‹æ–°ã—ã„ターゲットテーブルを作æˆã—ã¾ã™ã€‚ + +```sql +CREATE TABLE analytics.year_aggregated_data +( + `domain_name` String, + `year` UInt16, + `sumCountViews` UInt64 +) +ENGINE = SummingMergeTree() +ORDER BY (domain_name, year) +``` + +ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã‚’定義ã—ã¾ã™ã€‚`FROM`æ–‡ã¯`monthly_aggregated_data`テーブルを使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ãƒ­ãƒ¼ãŒæ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ï¼š + +1. データã¯`hourly_data`テーブルã«åˆ°ç€ã—ã¾ã™ã€‚ +2. ClickHouseã¯ã€å—ä¿¡ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’最åˆã®Materialized Viewã§ã‚ã‚‹`monthly_aggregated_data`テーブルã«è»¢é€ã—ã¾ã™ã€‚ +3. 最後ã«ã€ã‚¹ãƒ†ãƒƒãƒ—2ã§å—ä¿¡ã—ãŸãƒ‡ãƒ¼ã‚¿ãŒ`year_aggregated_data`ã«è»¢é€ã•ã‚Œã¾ã™ã€‚ + +```sql +CREATE MATERIALIZED VIEW analytics.year_aggregated_data_mv +TO analytics.year_aggregated_data +AS +SELECT + toYear(toStartOfYear(month)) AS year, + domain_name, + sumMerge(sumCountViews) as sumCountViews +FROM analytics.monthly_aggregated_data +GROUP BY + domain_name, + year +``` + +:::note +Materialized Viewを使用ã™ã‚‹éš›ã®ä¸€èˆ¬çš„ãªèª¤è§£ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–られるã¨ã„ã†ã“ã¨ã§ã™ã€‚ã“ã‚Œã¯`Materialized View`ã®å‹•ä½œã§ã¯ã‚ã‚Šã¾ã›ã‚“。転é€ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ãƒ†ãƒ¼ãƒ–ルã®æœ€çµ‚çµæžœã§ã¯ãªãã€æŒ¿å…¥ã•ã‚ŒãŸãƒ–ロックã§ã™ã€‚ + +ã“ã®ä¾‹ã§`monthly_aggregated_data`ã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚¨ãƒ³ã‚¸ãƒ³ãŒCollapsingMergeTreeã§ã‚ã‚‹ã¨ä»®å®šã—ãŸå ´åˆã€ç§ãŸã¡ã®2番目ã®Materialized View`year_aggregated_data_mv`ã«è»¢é€ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ã€åœ§ç¸®ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®æœ€çµ‚çµæžœã§ã¯ãªãã€`SELECT ... GROUP BY`ã§å®šç¾©ã•ã‚ŒãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’æŒã¤ãƒ‡ãƒ¼ã‚¿ãƒ–ロックãŒè»¢é€ã•ã‚Œã¾ã™ã€‚ + +CollapsingMergeTreeã€ReplacingMergeTreeã€ã¾ãŸã¯SummingMergeTreeを使用ã—ã¦ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰Materialized Viewを作æˆã™ã‚‹äºˆå®šãŒã‚ã‚‹å ´åˆã¯ã€ã“ã“ã§èª¬æ˜Žã•ã‚Œã¦ã„る制é™ã‚’ç†è§£ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## サンプルデータ + +カスケードMaterialized Viewをテストã™ã‚‹ãŸã‚ã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ï¼š + +```sql +INSERT INTO analytics.hourly_data (domain_name, event_time, count_views) +VALUES ('clickhouse.com', '2019-01-01 10:00:00', 1), + ('clickhouse.com', '2019-02-02 00:00:00', 2), + ('clickhouse.com', '2019-02-01 00:00:00', 3), + ('clickhouse.com', '2020-01-01 00:00:00', 6); +``` + +`analytics.hourly_data`ã®å†…容をSELECTã™ã‚‹ã¨ã€ãƒ†ãƒ¼ãƒ–ルエンジンãŒ`Null`ã§ã‚ã‚‹ãŸã‚ã€æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã¯å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +```sql +SELECT * FROM analytics.hourly_data +``` + +```response +Ok. + +0 rows in set. Elapsed: 0.002 sec. +``` + +å°‘é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’使用ã™ã‚‹ã“ã¨ã§ã€äºˆæƒ³ã•ã‚Œã‚‹çµæžœã‚’確èªã—ã€æ¯”較ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚å°‘é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ãƒ•ãƒ­ãƒ¼ãŒæ­£ã—ã„ã“ã¨ã‚’確èªã—ãŸã‚‰ã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã«ç§»è¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## çµæžœ + +ターゲットテーブルをクエリã—ã¦`sumCountViews`フィールドをé¸æŠžã—よã†ã¨ã™ã‚‹ã¨ã€ãƒã‚¤ãƒŠãƒªè¡¨ç¾ï¼ˆã„ãã¤ã‹ã®ã‚¿ãƒ¼ãƒŸãƒŠãƒ«ã§ï¼‰ã‚’ç›®ã«ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€å€¤ãŒæ•°å€¤ã¨ã—ã¦ã§ã¯ãªãã€`AggregateFunction`åž‹ã¨ã—ã¦æ ¼ç´ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã§ã™ã€‚集計ã®æœ€çµ‚çµæžœã‚’å¾—ã‚‹ã«ã¯ã€`-Merge`サフィックスを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +AggregateFunctionã«æ ¼ç´ã•ã‚ŒãŸç‰¹æ®Šæ–‡å­—を見るãŸã‚ã®ã‚¯ã‚¨ãƒªï¼š + +```sql +SELECT sumCountViews FROM analytics.monthly_aggregated_data +``` + +```response +┌─sumCountViews─┠+│ │ +│ │ +│ │ +└───────────────┘ + +3 rows in set. Elapsed: 0.003 sec. +``` + +代ã‚ã‚Šã«ã€`Merge`サフィックスを使用ã—ã¦`sumCountViews`ã®å€¤ã‚’å–å¾—ã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT + sumMerge(sumCountViews) as sumCountViews +FROM analytics.monthly_aggregated_data; +``` + +```response +┌─sumCountViews─┠+│ 12 │ +└───────────────┘ + +1 row in set. Elapsed: 0.003 sec. +``` + +`AggregatingMergeTree`ã§`AggregateFunction`ãŒ`sum`ã¨ã—ã¦å®šç¾©ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€`sumMerge`を使用ã§ãã¾ã™ã€‚`AggregateFunction`ã§`avg`を使用ã™ã‚‹ã¨ã€`avgMerge`を使用ã—ã¾ã™ã€‚ + +```sql +SELECT + month, + domain_name, + sumMerge(sumCountViews) as sumCountViews +FROM analytics.monthly_aggregated_data +GROUP BY + domain_name, + month +``` + +ã“ã‚Œã§ã€Materialized ViewãŒå®šç¾©ã—ãŸç›®æ¨™ã«ç­”ãˆã¦ã„ã‚‹ã“ã¨ã‚’確èªã§ãã¾ã™ã€‚ + +ターゲットテーブル`monthly_aggregated_data`ã«ãƒ‡ãƒ¼ã‚¿ãŒä¿å­˜ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€å„ドメインåã”ã¨ã«æœˆã”ã¨ã«é›†è¨ˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã§ãã¾ã™ï¼š + +```sql +SELECT + month, + domain_name, + sumMerge(sumCountViews) as sumCountViews +FROM analytics.monthly_aggregated_data +GROUP BY + domain_name, + month +``` + +```response +┌──────month─┬─domain_name────┬─sumCountViews─┠+│ 2020-01-01 │ clickhouse.com │ 6 │ +│ 2019-01-01 │ clickhouse.com │ 1 │ +│ 2019-02-01 │ clickhouse.com │ 5 │ +└────────────┴────────────────┴───────────────┘ + +3 rows in set. Elapsed: 0.004 sec. +``` + +å„ドメインåã”ã¨ã®å¹´ã”ã¨ã«é›†è¨ˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ï¼š + +```sql +SELECT + year, + domain_name, + sum(sumCountViews) +FROM analytics.year_aggregated_data +GROUP BY + domain_name, + year +``` + +```response +┌─year─┬─domain_name────┬─sum(sumCountViews)─┠+│ 2019 │ clickhouse.com │ 6 │ +│ 2020 │ clickhouse.com │ 6 │ +└──────┴────────────────┴────────────────────┘ + +2 rows in set. Elapsed: 0.004 sec. +``` + +## 複数ã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルをå˜ä¸€ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«çµåˆã™ã‚‹ + +Materialized Viewã¯ã€è¤‡æ•°ã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルをåŒã˜å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«çµåˆã™ã‚‹ãŸã‚ã«ã‚‚使用ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€`UNION ALL`ã¨åŒæ§˜ã®ãƒ­ã‚¸ãƒƒã‚¯ã‚’æŒã¤Materialized Viewを作æˆã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +ã¾ãšã€ç•°ãªã‚‹ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚»ãƒƒãƒˆã‚’表ã™2ã¤ã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +```sql +CREATE TABLE analytics.impressions +( + `event_time` DateTime, + `domain_name` String +) ENGINE = MergeTree ORDER BY (domain_name, event_time) +; + +CREATE TABLE analytics.clicks +( + `event_time` DateTime, + `domain_name` String +) ENGINE = MergeTree ORDER BY (domain_name, event_time) +; +``` + +次ã«ã€çµåˆã•ã‚ŒãŸãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚»ãƒƒãƒˆã‚’æŒã¤`Target`テーブルを作æˆã—ã¾ã™ï¼š + +```sql +CREATE TABLE analytics.daily_overview +( + `on_date` Date, + `domain_name` String, + `impressions` SimpleAggregateFunction(sum, UInt64), + `clicks` SimpleAggregateFunction(sum, UInt64) +) ENGINE = AggregatingMergeTree ORDER BY (on_date, domain_name) +``` + +åŒã˜`Target`テーブルを指ã™2ã¤ã®Materialized Viewを作æˆã—ã¾ã™ã€‚ä¸è¶³ã—ã¦ã„るカラムを明示的ã«å«ã‚ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“: + +```sql +CREATE MATERIALIZED VIEW analytics.daily_impressions_mv +TO analytics.daily_overview +AS +SELECT + toDate(event_time) AS on_date, + domain_name, + count() AS impressions, + 0 clicks ---<<<--- ã“れをçœç•¥ã™ã‚‹ã¨ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§0ã«ãªã‚Šã¾ã™ +FROM + analytics.impressions +GROUP BY + toDate(event_time) AS on_date, + domain_name +; + +CREATE MATERIALIZED VIEW analytics.daily_clicks_mv +TO analytics.daily_overview +AS +SELECT + toDate(event_time) AS on_date, + domain_name, + count() AS clicks, + 0 impressions ---<<<--- ã“れをçœç•¥ã™ã‚‹ã¨ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§0ã«ãªã‚Šã¾ã™ +FROM + analytics.clicks +GROUP BY + toDate(event_time) AS on_date, + domain_name +; +``` + +ã“ã‚Œã§ã€æŒ¿å…¥ã•ã‚ŒãŸå€¤ã¯`Target`テーブルã®ãã‚Œãžã‚Œã®ã‚«ãƒ©ãƒ ã«é›†è¨ˆã•ã‚Œã¾ã™ï¼š + +```sql +INSERT INTO analytics.impressions (domain_name, event_time) +VALUES ('clickhouse.com', '2019-01-01 00:00:00'), + ('clickhouse.com', '2019-01-01 12:00:00'), + ('clickhouse.com', '2019-02-01 00:00:00'), + ('clickhouse.com', '2019-03-01 00:00:00') +; + +INSERT INTO analytics.clicks (domain_name, event_time) +VALUES ('clickhouse.com', '2019-01-01 00:00:00'), + ('clickhouse.com', '2019-01-01 12:00:00'), + ('clickhouse.com', '2019-03-01 00:00:00') +; +``` + +`Target`テーブルã§çµ±åˆã•ã‚ŒãŸã‚¤ãƒ³ãƒ—レッションã¨ã‚¯ãƒªãƒƒã‚¯ï¼š + +```sql +SELECT + on_date, + domain_name, + sum(impressions) AS impressions, + sum(clicks) AS clicks +FROM + analytics.daily_overview +GROUP BY + on_date, + domain_name +; +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯æ¬¡ã®ã‚ˆã†ãªå‡ºåŠ›ã«ãªã‚Šã¾ã™ï¼š + +``` +┌────on_date─┬─domain_name────┬─impressions─┬─clicks─┠+│ 2019-01-01 │ clickhouse.com │ 2 │ 2 │ +│ 2019-03-01 │ clickhouse.com │ 1 │ 1 │ +│ 2019-02-01 │ clickhouse.com │ 1 │ 0 │ +└────────────┴────────────────┴─────────────┴────────┘ + +3 rows in set. Elapsed: 0.018 sec. +``` diff --git a/docs/ja/guides/developer/debugging-memory-issues.md b/docs/ja/guides/developer/debugging-memory-issues.md new file mode 100644 index 00000000000..50a68921f26 --- /dev/null +++ b/docs/ja/guides/developer/debugging-memory-issues.md @@ -0,0 +1,77 @@ +--- +slug: /ja/guides/developer/debugging-memory-issues +sidebar_label: メモリå•é¡Œã®ãƒ‡ãƒãƒƒã‚° +sidebar_position: 1 +description: メモリå•é¡Œã®ãƒ‡ãƒãƒƒã‚°ã«å½¹ç«‹ã¤ã‚¯ã‚¨ãƒªã€‚ +--- + +# メモリå•é¡Œã®ãƒ‡ãƒãƒƒã‚° + +メモリã®å•é¡Œã‚„メモリリークãŒç™ºç”Ÿã—ãŸå ´åˆã€ã©ã®ã‚¯ã‚¨ãƒªã‚„リソースãŒå¤§é‡ã®ãƒ¡ãƒ¢ãƒªã‚’消費ã—ã¦ã„ã‚‹ã®ã‹ã‚’知るã“ã¨ãŒå½¹ç«‹ã¡ã¾ã™ã€‚以下ã®ã‚¯ã‚¨ãƒªã¯ã€ãƒ‡ãƒãƒƒã‚°ã«å½¹ç«‹ã¡ã€æœ€é©åŒ–ã§ãるクエリã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãƒ†ãƒ¼ãƒ–ルを見ã¤ã‘ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +**ピークメモリ使用é‡ã§ç¾åœ¨å®Ÿè¡Œä¸­ã®ãƒ—ロセスを一覧表示** + +```sql +SELECT + initial_query_id, + query, + elapsed, + formatReadableSize(memory_usage), + formatReadableSize(peak_memory_usage), +FROM system.processes +ORDER BY peak_memory_usage DESC +LIMIT 100; +``` + +**メモリ使用é‡ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’一覧表示** + +```sql +SELECT + metric, description, formatReadableSize(value) size +FROM + system.asynchronous_metrics +WHERE + metric like '%Cach%' + or metric like '%Mem%' +order by + value desc; +``` + +**ç¾åœ¨ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡åˆ¥ã«ãƒ†ãƒ¼ãƒ–ルを一覧表示** + +```sql +SELECT + database, + name, + formatReadableSize(total_bytes) +FROM system.tables +WHERE engine IN ('Memory','Set','Join'); +``` + +**マージã«ã‚ˆã‚‹ç·ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’出力** + +```sql +SELECT formatReadableSize(sum(memory_usage)) FROM system.merges; +``` + +**ç¾åœ¨å®Ÿè¡Œä¸­ã®ãƒ—ロセスã«ã‚ˆã‚‹ç·ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’出力** + +```sql +SELECT formatReadableSize(sum(memory_usage)) FROM system.processes; +``` + +**Dictionary ã«ã‚ˆã‚‹ç·ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’出力** + +```sql +SELECT formatReadableSize(sum(bytes_allocated)) FROM system.dictionaries; +``` + +**主キーã«ã‚ˆã‚‹ç·ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’出力** + +```sql +SELECT + sumIf(data_uncompressed_bytes, part_type = 'InMemory') as memory_parts, + formatReadableSize(sum(primary_key_bytes_in_memory)) AS primary_key_bytes_in_memory, + formatReadableSize(sum(primary_key_bytes_in_memory_allocated)) AS primary_key_bytes_in_memory_allocated +FROM system.parts; +``` diff --git a/docs/ja/guides/developer/deduplicating-inserts-on-retries.md b/docs/ja/guides/developer/deduplicating-inserts-on-retries.md new file mode 100644 index 00000000000..6de685ffe7f --- /dev/null +++ b/docs/ja/guides/developer/deduplicating-inserts-on-retries.md @@ -0,0 +1,397 @@ +--- +slug: /ja/guides/developer/deduplicating-inserts-on-retries +title: 挿入æ“作ã®å†è©¦è¡Œæ™‚ã®ãƒ‡ãƒ¼ã‚¿é‡è¤‡é˜²æ­¢ +description: 挿入æ“作をå†è©¦è¡Œã™ã‚‹éš›ã®é‡è¤‡ãƒ‡ãƒ¼ã‚¿é˜²æ­¢ç­– +keywords: [é‡è¤‡æŽ’除, デデュプリケート, 挿入å†è©¦è¡Œ, 挿入] +--- + +挿入æ“作ã¯ã€ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãªã©ã®ã‚¨ãƒ©ãƒ¼ã«ã‚ˆã‚Šå¤±æ•—ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚挿入ãŒå¤±æ•—ã—ãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ãŒæˆåŠŸè£ã«æŒ¿å…¥ã•ã‚ŒãŸã‹ã©ã†ã‹ã¯ä¸æ˜Žã§ã™ã€‚本ガイドã§ã¯ã€æŒ¿å…¥å†è©¦è¡Œæ™‚ã«åŒã˜ãƒ‡ãƒ¼ã‚¿ãŒè¤‡æ•°å›žæŒ¿å…¥ã•ã‚Œãªã„よã†ã«ã€ãƒ‡ãƒ¼ã‚¿é‡è¤‡é˜²æ­¢æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚ + +挿入ãŒå†è©¦è¡Œã•ã‚Œã‚‹ã¨ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ãŒæ—¢ã«æˆåŠŸè£ã«æŒ¿å…¥ã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’判断ã—よã†ã¨ã—ã¾ã™ã€‚挿入ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒé‡è¤‡ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã‚‹å ´åˆã€ClickHouseã¯ãれを対象ã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã—ã¾ã›ã‚“。ã—ã‹ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚ãŸã‹ã‚‚データãŒæ­£å¸¸ã«æŒ¿å…¥ã•ã‚ŒãŸã‹ã®ã‚ˆã†ã«æˆåŠŸæ“作ステータスをå—ã‘å–ã‚Šã¾ã™ã€‚ + +## å†è©¦è¡Œæ™‚ã®æŒ¿å…¥é‡è¤‡é˜²æ­¢ã®æœ‰åŠ¹åŒ– + +### テーブルã«å¯¾ã™ã‚‹æŒ¿å…¥é‡è¤‡é˜²æ­¢ + +**`*MergeTree`エンジンã®ã¿ãŒæŒ¿å…¥æ™‚ã®é‡è¤‡é˜²æ­¢ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚** + +`*ReplicatedMergeTree`エンジンã«å¯¾ã—ã¦ã¯ã€æŒ¿å…¥é‡è¤‡é˜²æ­¢ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã«ãªã£ã¦ãŠã‚Šã€`replicated_deduplication_window`ãŠã‚ˆã³`replicated_deduplication_window_seconds`設定ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚éžãƒ¬ãƒ—リケートã•ã‚ŒãŸ`*MergeTree`エンジンã«å¯¾ã—ã¦ã¯ã€é‡è¤‡é˜²æ­¢ã¯`non_replicated_deduplication_window`設定ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ + +上記ã®è¨­å®šã¯ã€ãƒ†ãƒ¼ãƒ–ルã®é‡è¤‡é˜²æ­¢ãƒ­ã‚°ã®ãƒ‘ラメータを決定ã—ã¾ã™ã€‚ã“ã®é‡è¤‡é˜²æ­¢ãƒ­ã‚°ã¯æœ‰é™ã®æ•°ã®`block_id`ã‚’ä¿æŒã—ã€ã“ã‚Œã«ã‚ˆã‚Šé‡è¤‡é˜²æ­¢ã®ä»•çµ„ã¿ãŒæ±ºã¾ã‚Šã¾ã™ï¼ˆä»¥ä¸‹å‚照)。 + +### クエリレベルã§ã®æŒ¿å…¥é‡è¤‡é˜²æ­¢ + +設定`insert_deduplicate=1`を用ã„ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã§ã®é‡è¤‡é˜²æ­¢ãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚`insert_deduplicate=0`ã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ãŸå ´åˆã€ãã®ãƒ‡ãƒ¼ã‚¿ã¯`insert_deduplicate=1`ã§æŒ¿å…¥ã‚’å†è©¦è¡Œã—ã¦ã‚‚é‡è¤‡é˜²æ­¢ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ã€`block_id`ãŒ`insert_deduplicate=0`ã§ã®æŒ¿å…¥æ™‚ã«è¨˜éŒ²ã•ã‚Œãªã„ãŸã‚ã§ã™ã€‚ + +## 挿入é‡è¤‡é˜²æ­¢ã®ä»•çµ„ã¿ + +データãŒClickHouseã«æŒ¿å…¥ã•ã‚Œã‚‹ã¨ãã€è¡Œæ•°ã¨ãƒã‚¤ãƒˆæ•°ã«åŸºã¥ã„ã¦ãƒ‡ãƒ¼ã‚¿ãŒãƒ–ロックã«åˆ†å‰²ã•ã‚Œã¾ã™ã€‚ + +`*MergeTree`エンジンを使用ã—ãŸãƒ†ãƒ¼ãƒ–ルã§ã¯ã€å„ブロックã«ã¯ãã®ãƒ–ロック内ã®ãƒ‡ãƒ¼ã‚¿ã®ãƒãƒƒã‚·ãƒ¥ã§ã‚る一æ„ã®`block_id`ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ã“ã®`block_id`ã¯æŒ¿å…¥æ“作ã®ä¸€æ„キーã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚åŒã˜`block_id`ãŒé‡è¤‡é˜²æ­¢ãƒ­ã‚°ã§è¦‹ã¤ã‹ã£ãŸå ´åˆã€ãã®ãƒ–ロックã¯é‡è¤‡ã¨è¦‹ãªã•ã‚Œã€ãƒ†ãƒ¼ãƒ–ルã«ã¯æŒ¿å…¥ã•ã‚Œã¾ã›ã‚“。 + +ã“ã®ã‚¢ãƒ—ローãƒã¯ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€æŒ¿å…¥ã®å ´åˆã«ã†ã¾ã機能ã—ã¾ã™ã€‚ã—ã‹ã—ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’複数回æ„図的ã«æŒ¿å…¥ã™ã‚‹å ´åˆã¯ã€`insert_deduplication_token`設定を使用ã—ã¦é‡è¤‡é˜²æ­¢ãƒ—ロセスを制御ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã‚’用ã„ã‚‹ã¨ã€å„挿入ã«å¯¾ã—ã¦ä¸€æ„ã®ãƒˆãƒ¼ã‚¯ãƒ³ã‚’指定ã§ãã€ClickHouseã¯ã“ã®ãƒˆãƒ¼ã‚¯ãƒ³ã‚’利用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãŒé‡è¤‡ã‹ã©ã†ã‹ã‚’判断ã—ã¾ã™ã€‚ + +`INSERT ... VALUES` クエリã®å ´åˆã€æŒ¿å…¥ãƒ‡ãƒ¼ã‚¿ã®ãƒ–ロック分割ã¯æ±ºå®šçš„ã§ã‚ã‚Šã€è¨­å®šã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€åˆå›žæ“作ã¨åŒã˜è¨­å®šå€¤ã§æŒ¿å…¥ã‚’å†è©¦è¡Œã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +`INSERT ... SELECT` クエリã®å ´åˆã€ã‚¯ã‚¨ãƒªã®`SELECT`部分ãŒå„æ“作ã§åŒã˜é †åºã§åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã™ã“ã¨ãŒé‡è¦ã§ã™ã€‚実際ã®ä½¿ç”¨ã«ãŠã„ã¦ã“ã‚Œã¯é›£ã—ã„ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。å†è©¦è¡Œã§å®‰å®šã—ãŸãƒ‡ãƒ¼ã‚¿é †åºã‚’確ä¿ã™ã‚‹ãŸã‚ã«ã€ã‚¯ã‚¨ãƒªã®`SELECT`部分ã§æ­£ç¢ºãª`ORDER BY`セクションを定義ã—ã¦ãã ã•ã„。å†è©¦è¡Œé–“ã«é¸æŠžã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルãŒæ›´æ–°ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚る事ã«ã‚‚注æ„ãŒå¿…è¦ã§ã™ã€‚çµæžœãƒ‡ãƒ¼ã‚¿ãŒå¤‰æ›´ã•ã‚Œã€é‡è¤‡é˜²æ­¢ãŒè¡Œã‚ã‚Œãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹å ´åˆã€æŒ¿å…¥å¾Œã®ãƒ–ロック数ãŒé‡è¤‡é˜²æ­¢ãƒ­ã‚°ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’オーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã€ClickHouseãŒãƒ–ロックをé‡è¤‡é˜²æ­¢ã—ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## マテリアライズドビューを使用ã—ãŸæŒ¿å…¥é‡è¤‡é˜²æ­¢ + +テーブルã«ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューãŒã‚ã‚‹å ´åˆã€ãã®ãƒ“ューã®å¤‰æ›å®šç¾©ã«ã—ãŸãŒã£ã¦æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚‚ビューã®å¯¾è±¡ã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚変æ›ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚‚å†è©¦è¡Œæ™‚ã«é‡è¤‡ã‚’排除ã•ã‚Œã¾ã™ã€‚ClickHouseã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã«å¯¾ã—ã¦ã‚‚ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¨åŒæ§˜ã«é‡è¤‡ã‚’排除ã—ã¾ã™ã€‚ + +ã“ã®ãƒ—ロセスã¯ä»¥ä¸‹ã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ル用ã®è¨­å®šã‚’使用ã—ã¦åˆ¶å¾¡ã§ãã¾ã™ï¼š +- `replicated_deduplication_window` +- `replicated_deduplication_window_seconds` +- `non_replicated_deduplication_window` + +ã¾ãŸã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロファイル設定`deduplicate_blocks_in_dependent_materialized_views`を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +マテリアライズドビュー下ã®ãƒ†ãƒ¼ãƒ–ルã¸ãƒ–ロックを挿入ã™ã‚‹éš›ã€ClickHouseã¯ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã®`block_id`ã¨è¿½åŠ ã®è­˜åˆ¥å­ã‚’組ã¿åˆã‚ã›ãŸæ–‡å­—列をãƒãƒƒã‚·ãƒ¥ã—ã¦`block_id`を計算ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ュー内ã§ã®æ­£ç¢ºãªé‡è¤‡é˜²æ­¢ãŒä¿è¨¼ã•ã‚Œã€å…ƒã®æŒ¿å…¥ã«ã‚ˆã£ã¦ãƒ‡ãƒ¼ã‚¿ãŒåŒºåˆ¥ã•ã‚Œã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®å¯¾è±¡ãƒ†ãƒ¼ãƒ–ルã«åˆ°é”ã™ã‚‹å‰ã«åŠ ãˆã‚‰ã‚Œã‚‹å¤‰æ›ã«ã‹ã‹ã‚らãšãƒ‡ãƒ¼ã‚¿ãŒè­˜åˆ¥ã•ã‚Œã¾ã™ã€‚ + +## 例 + +### マテリアライズドビューã®å¤‰æ›å¾Œã®åŒä¸€ãƒ–ロック + +マテリアライズドビュー内ã§ã®å¤‰æ›ä¸­ã«ç”Ÿæˆã•ã‚ŒãŸåŒä¸€ãƒ–ロックã¯ç•°ãªã‚‹æŒ¿å…¥ãƒ‡ãƒ¼ã‚¿ã«åŸºã¥ã„ã¦ã„ã‚‹ãŸã‚ã€é‡è¤‡æŽ’除ã•ã‚Œã¾ã›ã‚“。 + +ã“ã¡ã‚‰ã¯ä¾‹ã§ã™ï¼š + +```sql +CREATE TABLE dst +( + `key` Int64, + `value` String +) +ENGINE = MergeTree +ORDER BY tuple() +SETTINGS non_replicated_deduplication_window=1000; + +CREATE MATERIALIZED VIEW mv_dst +( + `key` Int64, + `value` String +) +ENGINE = MergeTree +ORDER BY tuple() +SETTINGS non_replicated_deduplication_window=1000 +AS SELECT + 0 AS key, + value AS value +FROM dst; +``` + +```sql +SET max_block_size=1; +SET min_insert_block_size_rows=0; +SET min_insert_block_size_bytes=0; +``` + +上記ã®è¨­å®šã«ã‚ˆã‚Šã€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ä¸€è¡Œã®ã¿ã‚’æŒã¤ä¸€é€£ã®ãƒ–ロックをé¸æŠžã§ãã¾ã™ã€‚ã“れらã®å°ã•ã„ブロックã¯åœ§ç¸®ã•ã‚Œãšã€ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚Œã‚‹ã¾ã§ã¯åŒä¸€ã®ã¾ã¾ã§ã™ã€‚ + +```sql +SET deduplicate_blocks_in_dependent_materialized_views=1; +``` + +マテリアライズドビューã§ã®é‡è¤‡æŽ’除を有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +INSERT INTO dst SELECT + number + 1 AS key, + IF(key = 0, 'A', 'B') AS value +FROM numbers(2); + +SELECT + *, + _part +FROM dst +ORDER by all; +``` + +ã“ã“ã§ã¯ã€`dst`テーブルã«2ã¤ã®ãƒ‘ートãŒæŒ¿å…¥ã•ã‚ŒãŸã“ã¨ãŒåˆ†ã‹ã‚Šã¾ã™ã€‚é¸æŠžã‹ã‚‰ã®2ブロック — 挿入時ã®2パート。パートã¯ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ + +```sql +SELECT + *, + _part +FROM mv_dst +ORDER by all; +``` + +ã“ã“ã§ã¯ã€`mv_dst`テーブルã«2ã¤ã®ãƒ‘ートãŒæŒ¿å…¥ã•ã‚ŒãŸã“ã¨ãŒåˆ†ã‹ã‚Šã¾ã™ã€‚ãれらã®ãƒ‘ートã¯åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã¾ã™ãŒã€é‡è¤‡æŽ’除ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +```sql +INSERT INTO dst SELECT + number + 1 AS key, + IF(key = 0, 'A', 'B') AS value +FROM numbers(2); + +SELECT + *, + _part +FROM dst +ORDER by all; + +SELECT + *, + _part +FROM mv_dst +ORDER by all; +``` + +ã“ã“ã§ã¯ã€æŒ¿å…¥ã‚’å†è©¦è¡Œã—ãŸã¨ãã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒé‡è¤‡æŽ’除ã•ã‚Œã‚‹ã“ã¨ãŒç¢ºèªã§ãã¾ã™ã€‚é‡è¤‡æŽ’除ã¯`dst`テーブルã¨`mv_dst`テーブルã®ä¸¡æ–¹ã§æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +## 挿入時ã®åŒä¸€ãƒ–ロック + +```sql +CREATE TABLE dst +( + `key` Int64, + `value` String +) +ENGINE = MergeTree +ORDER BY tuple() +SETTINGS non_replicated_deduplication_window=1000; + + +SET max_block_size=1; +SET min_insert_block_size_rows=0; +SET min_insert_block_size_bytes=0; +``` + +挿入: + +```sql +INSERT INTO dst SELECT + 0 AS key, + 'A' AS value +FROM numbers(2); + +SELECT + 'from dst', + *, + _part +FROM dst +ORDER by all; +``` + +上記ã®è¨­å®šã§ã€é¸æŠžçµæžœã‹ã‚‰2ã¤ã®ãƒ–ロックãŒç”Ÿæˆã•ã‚Œã€ãã®çµæžœã€ãƒ†ãƒ¼ãƒ–ル`dst`ã¸ã®æŒ¿å…¥ã«ã¯2ã¤ã®ãƒ–ロックãŒã‚ã‚‹ã¯ãšã§ã™ã€‚ã—ã‹ã—ã€`dst`テーブルã«ã¯ä¸€ã¤ã®ãƒ–ロックã®ã¿ãŒæŒ¿å…¥ã•ã‚ŒãŸã“ã¨ãŒç¢ºèªã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€2番目ã®ãƒ–ロックãŒé‡è¤‡æŽ’除ã•ã‚ŒãŸãŸã‚ã§ã™ã€‚挿入ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¨ã€é‡è¤‡æŽ’除ã®ã‚­ãƒ¼ã§ã‚ã‚‹`block_id`ã¯æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ãƒãƒƒã‚·ãƒ¥ã¨ã—ã¦è¨ˆç®—ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®å‹•ä½œã¯æœŸå¾…ã•ã‚ŒãŸã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®ã‚ˆã†ãªã‚±ãƒ¼ã‚¹ã¯ç¨€ã§ã™ãŒã€ç†è«–çš„ã«ã¯å¯èƒ½ã§ã™ã€‚ã“ã®ã‚ˆã†ãªã‚±ãƒ¼ã‚¹ã‚’æ­£ã—ã処ç†ã™ã‚‹ãŸã‚ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯`insert_deduplication_token`ã‚’æä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã®ä¾‹ã§ãれを修正ã—ã¾ã—ょã†ï¼š + +## `insert_deduplication_token`を使用ã—ãŸæŒ¿å…¥æ™‚ã®åŒä¸€ãƒ–ロック + +```sql +CREATE TABLE dst +( + `key` Int64, + `value` String +) +ENGINE = MergeTree +ORDER BY tuple() +SETTINGS non_replicated_deduplication_window=1000; + +SET max_block_size=1; +SET min_insert_block_size_rows=0; +SET min_insert_block_size_bytes=0; +``` + +挿入: + +```sql +INSERT INTO dst SELECT + 0 AS key, + 'A' AS value +FROM numbers(2) +SETTINGS insert_deduplication_token='some_user_token'; + +SELECT + 'from dst', + *, + _part +FROM dst +ORDER by all; +``` + +2ã¤ã®åŒä¸€ãƒ–ロックãŒæœŸå¾…通りã«æŒ¿å…¥ã•ã‚Œã¾ã—ãŸã€‚ + +```sql +select 'second attempt'; + +INSERT INTO dst SELECT + 0 AS key, + 'A' AS value +FROM numbers(2) +SETTINGS insert_deduplication_token='some_user_token'; + +SELECT + 'from dst', + *, + _part +FROM dst +ORDER by all; +``` + +å†è©¦è¡ŒæŒ¿å…¥ã¯æœŸå¾…通りã«é‡è¤‡æŽ’除ã•ã‚Œã¾ã™ã€‚ + +```sql +select 'third attempt'; + +INSERT INTO dst SELECT + 1 AS key, + 'b' AS value +FROM numbers(2) +SETTINGS insert_deduplication_token='some_user_token'; + +SELECT + 'from dst', + *, + _part +FROM dst +ORDER by all; +``` + +ã“ã®æŒ¿å…¥ã‚‚ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã‚‹ã«ã‚‚ã‹ã‹ã‚らãšé‡è¤‡æŽ’除ã•ã‚Œã¦ã„ã¾ã™ã€‚`insert_deduplication_token`ã®å„ªå…ˆåº¦ãŒé«˜ã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„:`insert_deduplication_token`ãŒæä¾›ã•ã‚Œã‚‹ã¨ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã®ãƒãƒƒã‚·ãƒ¥ã‚µãƒ ã‚’使用ã—ã¾ã›ã‚“。 + +## ç•°ãªã‚‹æŒ¿å…¥æ“作ãŒãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®åŸºã«ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã§åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’生æˆã™ã‚‹å ´åˆ + +```sql +CREATE TABLE dst +( + `key` Int64, + `value` String +) +ENGINE = MergeTree +ORDER BY tuple() +SETTINGS non_replicated_deduplication_window=1000; + +CREATE MATERIALIZED VIEW mv_dst +( + `key` Int64, + `value` String +) +ENGINE = MergeTree +ORDER BY tuple() +SETTINGS non_replicated_deduplication_window=1000 +AS SELECT + 0 AS key, + value AS value +FROM dst; + +SET deduplicate_blocks_in_dependent_materialized_views=1; + +select 'first attempt'; + +INSERT INTO dst VALUES (1, 'A'); + +SELECT + 'from dst', + *, + _part +FROM dst +ORDER by all; + +SELECT + 'from mv_dst', + *, + _part +FROM mv_dst +ORDER by all; + +select 'second attempt'; + +INSERT INTO dst VALUES (2, 'A'); + +SELECT + 'from dst', + *, + _part +FROM dst +ORDER by all; + +SELECT + 'from mv_dst', + *, + _part +FROM mv_dst +ORDER by all; +``` + +毎回異ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¦ã„ã¾ã™ã€‚ã—ã‹ã—ã€`mv_dst`テーブルã«ã¯åŒã˜ãƒ‡ãƒ¼ã‚¿ãŒæŒ¿å…¥ã•ã‚Œã¦ã„ã¾ã™ã€‚データã¯å…ƒã®ãƒ‡ãƒ¼ã‚¿ãŒç•°ãªã£ã¦ã„ãŸãŸã‚ã€é‡è¤‡æŽ’除ã•ã‚Œã¾ã›ã‚“。 + +## ç•°ãªã‚‹ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューãŒåŒä¸€ã®ãƒ‡ãƒ¼ã‚¿ã‚’基ã«ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹å ´åˆ + +```sql +CREATE TABLE dst +( + `key` Int64, + `value` String +) +ENGINE = MergeTree +ORDER BY tuple() +SETTINGS non_replicated_deduplication_window=1000; + +CREATE TABLE mv_dst +( + `key` Int64, + `value` String +) +ENGINE = MergeTree +ORDER BY tuple() +SETTINGS non_replicated_deduplication_window=1000; + +CREATE MATERIALIZED VIEW mv_first +TO mv_dst +AS SELECT + 0 AS key, + value AS value +FROM dst; + +CREATE MATERIALIZED VIEW mv_second +TO mv_dst +AS SELECT + 0 AS key, + value AS value +FROM dst; + +SET deduplicate_blocks_in_dependent_materialized_views=1; + +select 'first attempt'; + +INSERT INTO dst VALUES (1, 'A'); + +SELECT + 'from dst', + *, + _part +FROM dst +ORDER by all; + +SELECT + 'from mv_dst', + *, + _part +FROM mv_dst +ORDER by all; +``` + +テーブル`mv_dst`ã«2ã¤ã®ç­‰ã—ã„ブロックãŒæŒ¿å…¥ã•ã‚Œã¾ã—ãŸï¼ˆæœŸå¾…通り)。 + +```sql +select 'second attempt'; + +INSERT INTO dst VALUES (1, 'A'); + +SELECT + 'from dst', + *, + _part +FROM dst +ORDER by all; + +SELECT + 'from mv_dst', + *, + _part +FROM mv_dst +ORDER by all; +``` + +ã“ã®å†è©¦è¡Œæ“作ã¯ã€`dst`テーブルã¨`mv_dst`テーブルã®ä¸¡æ–¹ã§é‡è¤‡æŽ’除ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/guides/developer/deduplication.md b/docs/ja/guides/developer/deduplication.md new file mode 100644 index 00000000000..babeedcaf46 --- /dev/null +++ b/docs/ja/guides/developer/deduplication.md @@ -0,0 +1,339 @@ +--- +slug: /ja/guides/developer/deduplication +sidebar_label: é‡è¤‡æŽ’除戦略 +sidebar_position: 3 +description: é »ç¹ã«upsertã€æ›´æ–°ã€ãŠã‚ˆã³å‰Šé™¤ã‚’実行ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€é‡è¤‡æŽ’除を使用ã—ã¾ã™ã€‚ +--- + +# é‡è¤‡æŽ’除戦略 + +**é‡è¤‡æŽ’除**ã¨ã¯ã€***データセットã®é‡è¤‡è¡Œã‚’削除ã™ã‚‹ãƒ—ロセス***を指ã—ã¾ã™ã€‚OLTPデータベースã§ã¯ã€å„è¡Œã«ä¸€æ„ã®ä¸»ã‚­ãƒ¼ãŒã‚ã‚‹ãŸã‚ã€ã“れを簡å˜ã«è¡Œã†ã“ã¨ãŒã§ãã¾ã™ãŒã€ãã®ä»£ã‚ã‚Šã«æŒ¿å…¥ãŒé…ããªã‚Šã¾ã™ã€‚挿入ã•ã‚ŒãŸå„è¡Œã¯æœ€åˆã«æ¤œç´¢ã•ã‚Œã€å­˜åœ¨ã™ã‚‹å ´åˆã¯ç½®ãæ›ãˆã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseã¯ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ã®ã‚¹ãƒ”ードを追求ã—ã¦è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ストレージファイルã¯ä¸å¤‰ã§ã‚ã‚Šã€ClickHouseã¯è¡Œã‚’挿入ã™ã‚‹å‰ã«æ—¢å­˜ã®ä¸»ã‚­ãƒ¼ã‚’確èªã—ãªã„ãŸã‚ã€é‡è¤‡æŽ’除ã¯ã‚‚ã†å°‘ã—手間ãŒã‹ã‹ã‚Šã¾ã™ã€‚ã¾ãŸã€é‡è¤‡æŽ’除ã¯å³æ™‚ã«ã¯è¡Œã‚ã‚Œãšã€**最終的**ã§ã‚ã‚‹ãŸã‚ã€ä»¥ä¸‹ã®ã‚ˆã†ãªå‰¯ä½œç”¨ãŒã‚ã‚Šã¾ã™ï¼š + +- ä»»æ„ã®æ™‚点ã§ã€ãƒ†ãƒ¼ãƒ–ルã«ã¯ã¾ã é‡è¤‡ï¼ˆåŒã˜ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’æŒã¤è¡Œï¼‰ãŒå­˜åœ¨ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ +- é‡è¤‡è¡Œã®å®Ÿéš›ã®å‰Šé™¤ã¯ã€ãƒ‘ーツã®ãƒžãƒ¼ã‚¸æ™‚ã«è¡Œã‚ã‚Œã¾ã™ +- クエリã§ã¯ã€é‡è¤‡ã®å¯èƒ½æ€§ã‚’考慮ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ + +
+ +||| +|------|----| +|Cassandra logo|ClickHouseã¯é‡è¤‡æŽ’除やãã®ä»–多ãã®ãƒˆãƒ”ックã«é–¢ã™ã‚‹ç„¡æ–™ãƒˆãƒ¬ãƒ¼ãƒ‹ãƒ³ã‚°ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚[データã®å‰Šé™¤ã¨æ›´æ–°ãƒˆãƒ¬ãƒ¼ãƒ‹ãƒ³ã‚°ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«](https://learn.clickhouse.com/visitor_catalog_class/show/1328954/?utm_source=clickhouse&utm_medium=docs)ã¯ç´ æ™´ã‚‰ã—ã„出発点ã§ã™ã€‚| + +
+ +## é‡è¤‡æŽ’除ã®ã‚ªãƒ—ション + +ClickHouseã«ãŠã‘ã‚‹é‡è¤‡æŽ’除ã¯ã€ä»¥ä¸‹ã®ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã—ã¦å®Ÿè£…ã•ã‚Œã¾ã™ï¼š + +1. `ReplacingMergeTree`テーブルエンジン:ã“ã®ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã™ã‚‹ã¨ã€åŒã˜ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’æŒã¤é‡è¤‡è¡ŒãŒãƒžãƒ¼ã‚¸æ™‚ã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚`ReplacingMergeTree`ã¯ã€ã‚¯ã‚¨ãƒªãŒæœ€å¾Œã«æŒ¿å…¥ã•ã‚ŒãŸè¡Œã‚’è¿”ã™ã‚ˆã†ãªupsert動作をエミュレートã™ã‚‹ã®ã«é©ã—ã¦ã„ã¾ã™ã€‚ + +2. è¡Œã®æŠ˜ã‚ŠãŸãŸã¿ï¼š`CollapsingMergeTree`ãŠã‚ˆã³`VersionedCollapsingMergeTree`テーブルエンジンã¯ã€æ—¢å­˜ã®è¡ŒãŒ"キャンセル"ã•ã‚Œã¦æ–°ã—ã„è¡ŒãŒæŒ¿å…¥ã•ã‚Œã‚‹ãƒ­ã‚¸ãƒƒã‚¯ã‚’利用ã—ã¾ã™ã€‚ã“れらã¯`ReplacingMergeTree`よりも複雑ã§ã™ãŒã€ã‚¯ã‚¨ãƒªã‚„集計を書ãéš›ã«ãƒ‡ãƒ¼ã‚¿ãŒã¾ã ãƒžãƒ¼ã‚¸ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’æ°—ã«ã›ãšã«æ¸ˆã‚€ãŸã‚ã€ã‚¯ã‚¨ãƒªãŒã‚·ãƒ³ãƒ—ルã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚データを頻ç¹ã«æ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ã“れらã®ãƒ†ãƒ¼ãƒ–ルエンジンãŒå½¹ç«‹ã¡ã¾ã™ã€‚ + +以下ã§ã“れらã®æŠ€è¡“を詳ã—ã説明ã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[データã®å‰Šé™¤ã¨æ›´æ–°ãƒˆãƒ¬ãƒ¼ãƒ‹ãƒ³ã‚°ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«](https://learn.clickhouse.com/visitor_catalog_class/show/1328954/?utm_source=clickhouse&utm_medium=docs)ã‚’ã”覧ãã ã•ã„。 + +## ReplacingMergeTreeを使用ã—ãŸUpserts + +ãƒãƒƒã‚«ãƒ¼ãƒ‹ãƒ¥ãƒ¼ã‚¹ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’å«ã‚€ãƒ†ãƒ¼ãƒ–ルを例ã«è¦‹ã¦ã¿ã¾ã—ょã†ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ã‚³ãƒ¡ãƒ³ãƒˆã®è¡¨ç¤ºå›žæ•°ã‚’表ã™`views`カラムをæŒã£ã¦ã„ã¾ã™ã€‚æ–°ã—ã„記事ãŒå…¬é–‹ã•ã‚Œã‚‹ã¨æ–°ã—ã„行を挿入ã—ã€è¡¨ç¤ºå›žæ•°ãŒå¢—ãˆãŸå ´åˆã¯1æ—¥ã”ã¨ã«æ–°ã—ã„行をupsertã™ã‚‹ã¨ã—ã¾ã™ï¼š + +```sql +CREATE TABLE hackernews_rmt ( + id UInt32, + author String, + comment String, + views UInt64 +) +ENGINE = ReplacingMergeTree +PRIMARY KEY (author, id) +``` + +2行を挿入ã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +INSERT INTO hackernews_rmt VALUES + (1, 'ricardo', 'This is post #1', 0), + (2, 'ch_fan', 'This is post #2', 0) +``` + +`views`カラムを更新ã™ã‚‹ãŸã‚ã«ã€åŒã˜ä¸»ã‚­ãƒ¼ã§æ–°ã—ã„行を挿入ã—ã¾ã™ï¼ˆ`views`カラムã®æ–°ã—ã„値ã«æ³¨ç›®ã—ã¦ãã ã•ã„): + +```sql +INSERT INTO hackernews_rmt VALUES + (1, 'ricardo', 'This is post #1', 100), + (2, 'ch_fan', 'This is post #2', 200) +``` + +ç¾åœ¨ã€ãƒ†ãƒ¼ãƒ–ルã«ã¯4è¡Œã‚ã‚Šã¾ã™ï¼š + +```sql +SELECT * +FROM hackernews_rmt +``` + +```response +┌─id─┬─author──┬─comment─────────┬─views─┠+│ 2 │ ch_fan │ This is post #2 │ 0 │ +│ 1 │ ricardo │ This is post #1 │ 0 │ +└────┴─────────┴─────────────────┴───────┘ +┌─id─┬─author──┬─comment─────────┬─views─┠+│ 2 │ ch_fan │ This is post #2 │ 200 │ +│ 1 │ ricardo │ This is post #1 │ 100 │ +└────┴─────────┴─────────────────┴───────┘ +``` + +上ã®å‡ºåŠ›ã®åˆ¥ã€…ã®ãƒœãƒƒã‚¯ã‚¹ã¯ã€å®Ÿéš›ã®ãƒžãƒ¼ã‚¸ãŒã¾ã è¡Œã‚ã‚Œã¦ãŠã‚‰ãšã€é‡è¤‡è¡ŒãŒã¾ã å‰Šé™¤ã•ã‚Œã¦ã„ãªã„ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚`SELECT`クエリã§`FINAL`キーワードを使用ã—ã¦ã€ã‚¯ã‚¨ãƒªçµæžœã®è«–ç†çš„ãªãƒžãƒ¼ã‚¸ã‚’è¡Œã„ã¾ã™ï¼š + +```sql +SELECT * +FROM hackernews_rmt +FINAL +``` + +```response +┌─id─┬─author──┬─comment─────────┬─views─┠+│ 2 │ ch_fan │ This is post #2 │ 200 │ +│ 1 │ ricardo │ This is post #1 │ 100 │ +└────┴─────────┴─────────────────┴───────┘ +``` + +çµæžœã«ã¯2è¡Œã ã‘ãŒå«ã¾ã‚Œã€æœ€å¾Œã«æŒ¿å…¥ã•ã‚ŒãŸè¡ŒãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +:::note +`FINAL`を使用ã™ã‚‹ã“ã¨ã¯ã€ãƒ‡ãƒ¼ã‚¿é‡ãŒå°‘ãªã„å ´åˆã«ã¯å•é¡Œã‚ã‚Šã¾ã›ã‚“。大é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’扱ã†å ´åˆã€`FINAL`ã®ä½¿ç”¨ã¯æœ€è‰¯ã®é¸æŠžè‚¢ã§ã¯ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。カラムã®æœ€æ–°å€¤ã‚’見ã¤ã‘ã‚‹ãŸã‚ã®ã‚ˆã‚Šè‰¯ã„é¸æŠžè‚¢ã«ã¤ã„ã¦è­°è«–ã—ã¾ã—ょã†â€¦ +::: + +### FINALã‚’é¿ã‘ã‚‹ + +2ã¤ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªè¡Œã®`views`カラムをå†åº¦æ›´æ–°ã—ã¾ã—ょã†ï¼š + +```sql +INSERT INTO hackernews_rmt VALUES + (1, 'ricardo', 'This is post #1', 150), + (2, 'ch_fan', 'This is post #2', 250) +``` + +テーブルã«ã¯ç¾åœ¨6è¡Œã‚ã‚Šã¾ã™ãŒã€å®Ÿéš›ã®ãƒžãƒ¼ã‚¸ã¯ã¾ã è¡Œã‚ã‚Œã¦ã„ã¾ã›ã‚“( `FINAL`を使用ã—ãŸã‚¯ã‚¨ãƒªæ™‚é–“ã®ãƒžãƒ¼ã‚¸ã®ã¿ï¼‰ã€‚ + +```sql +SELECT * +FROM hackernews_rmt +``` + +```response +┌─id─┬─author──┬─comment─────────┬─views─┠+│ 2 │ ch_fan │ This is post #2 │ 200 │ +│ 1 │ ricardo │ This is post #1 │ 100 │ +└────┴─────────┴─────────────────┴───────┘ +┌─id─┬─author──┬─comment─────────┬─views─┠+│ 2 │ ch_fan │ This is post #2 │ 0 │ +│ 1 │ ricardo │ This is post #1 │ 0 │ +└────┴─────────┴─────────────────┴───────┘ +┌─id─┬─author──┬─comment─────────┬─views─┠+│ 2 │ ch_fan │ This is post #2 │ 250 │ +│ 1 │ ricardo │ This is post #1 │ 150 │ +└────┴─────────┴─────────────────┴───────┘ +``` + +`FINAL`を使用ã™ã‚‹ä»£ã‚ã‚Šã«ã€ãƒ“ジãƒã‚¹ãƒ­ã‚¸ãƒƒã‚¯ã‚’使用ã—ã¾ã—ょㆠ- `views`カラムã¯å¸¸ã«å¢—加ã™ã‚‹ã¨åˆ†ã‹ã£ã¦ã„ã‚‹ã®ã§ã€æœ€å¤§å€¤ã‚’æŒã¤è¡Œã‚’é¸æŠžã™ã‚‹ãŸã‚ã«`max`関数を使用ã—ã¦ã€æœ›ã‚€ã‚«ãƒ©ãƒ ã§ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã¾ã™ï¼š + +```sql +SELECT + id, + author, + comment, + max(views) +FROM hackernews_rmt +GROUP BY (id, author, comment) +``` + +```response +┌─id─┬─author──┬─comment─────────┬─max(views)─┠+│ 2 │ ch_fan │ This is post #2 │ 250 │ +│ 1 │ ricardo │ This is post #1 │ 150 │ +└────┴─────────┴─────────────────┴────────────┘ +``` + +上記ã®ã‚¯ã‚¨ãƒªã«ç¤ºã•ã‚Œã¦ã„るよã†ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã™ã‚‹ã“ã¨ã§ã€`FINAL`キーワードを使用ã™ã‚‹ã‚ˆã‚Šã‚‚クエリパフォーマンスã®è¦³ç‚¹ã§åŠ¹çŽ‡çš„ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +ç§ãŸã¡ã®[データã®å‰Šé™¤ã¨æ›´æ–°ãƒˆãƒ¬ãƒ¼ãƒ‹ãƒ³ã‚°ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«](https://learn.clickhouse.com/visitor_catalog_class/show/1328954/?utm_source=clickhouse&utm_medium=docs)ã§ã¯ã€ã“ã®ä¾‹ã‚’ã•ã‚‰ã«å±•é–‹ã—ã€`ReplacingMergeTree`を使用ã—ãŸ`version`カラムã®ä½¿ç”¨æ–¹æ³•ã‚‚紹介ã—ã¦ã„ã¾ã™ã€‚ + +## カラムã®é »ç¹ãªæ›´æ–°ã«CollapsingMergeTreeを使用ã™ã‚‹ + +カラムã®æ›´æ–°ã¯ã€æ—¢å­˜ã®è¡Œã‚’削除ã—ã€æ–°ã—ã„値ã§ç½®ãæ›ãˆã‚‹ã“ã¨ã‚’ä¼´ã„ã¾ã™ã€‚ã“ã‚Œã¾ã§ã«è¦‹ãŸé€šã‚Šã€ClickHouseã«ãŠã‘ã‚‹ã“ã®ç¨®ã®å¤‰æ›´ã¯_最終的ã«_発生ã—ã¾ã™ - マージ中ã«ã€‚多ãã®è¡Œã‚’æ›´æ–°ã™ã‚‹å ´åˆã€`ALTER TABLE..UPDATE`を回é¿ã—ã€æ—¢å­˜ãƒ‡ãƒ¼ã‚¿ã¨å…±ã«æ–°ã—ã„データを挿入ã™ã‚‹æ–¹ãŒå®Ÿéš›ã«ã¯åŠ¹çŽ‡çš„ã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚データãŒå¤ã„ã‚‚ã®ã‹æ–°ã—ã„ã‚‚ã®ã‹ã‚’示ã™ã‚«ãƒ©ãƒ ã‚’追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™â€¦ãã—ã¦å®Ÿéš›ã€å¤ã„データを自動的ã«å‰Šé™¤ã™ã‚‹ã¨ã„ã†æŒ¯ã‚‹èˆžã„ã‚’éžå¸¸ã«ã†ã¾ã実装ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルエンジンãŒã‚ã‚Šã¾ã™ã€‚ãã‚ŒãŒã©ã®ã‚ˆã†ã«æ©Ÿèƒ½ã™ã‚‹ã‹ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ + +外部システムを使用ã—ã¦ã€ãƒãƒƒã‚«ãƒ¼ãƒ‹ãƒ¥ãƒ¼ã‚¹ã®ã‚³ãƒ¡ãƒ³ãƒˆã®è¡¨ç¤ºå›žæ•°ã‚’追跡ã—ã€æ•°æ™‚é–“ã”ã¨ã«ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«ãƒ—ッシュã™ã‚‹ã¨ã—ã¾ã™ã€‚å¤ã„行を削除ã—ã€æ–°ã—ã„è¡ŒãŒå„ãƒãƒƒã‚«ãƒ¼ãƒ‹ãƒ¥ãƒ¼ã‚¹ã‚³ãƒ¡ãƒ³ãƒˆã®æ–°ã—ã„状態を表ã™ã‚ˆã†ã«ã—ãŸã„ã§ã™ã€‚ã“ã®æŒ¯ã‚‹èˆžã„を実ç¾ã™ã‚‹ãŸã‚ã«ã€`CollapsingMergeTree`を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +表示回数を格ç´ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルを定義ã—ã¾ã—ょã†ï¼š + +```sql +CREATE TABLE hackernews_views ( + id UInt32, + author String, + views UInt64, + sign Int8 +) +ENGINE = CollapsingMergeTree(sign) +PRIMARY KEY (id, author) +``` + +`hackernews_views`テーブルã«ã¯ã€signã¨å‘¼ã°ã‚Œã‚‹`Int8`カラムãŒã‚ã‚Šã€**sign**カラムã¨ã—ã¦å‚ç…§ã•ã‚Œã¾ã™ã€‚signカラムã®åå‰ã¯ä»»æ„ã§ã™ãŒã€`Int8`データ型ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€`CollapsingMergeTree`テーブルã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã«ã‚«ãƒ©ãƒ åãŒæ¸¡ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +`CollapsingMergeTree`テーブルã®signカラムã¨ã¯ä½•ã§ã—ょã†ã‹ï¼Ÿã“ã‚Œã¯è¡Œã®_状態_を表ã—ã€signカラムã¯1ã¾ãŸã¯-1ã®ã¿ã§ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã®åƒã方を見ã¦ã¿ã¾ã—ょã†ï¼š + +- 二ã¤ã®è¡ŒãŒåŒã˜ä¸»ã‚­ãƒ¼ï¼ˆã¾ãŸã¯ã‚½ãƒ¼ãƒˆé †ãŒä¸»ã‚­ãƒ¼ã¨ã¯ç•°ãªã‚‹å ´åˆã€ãã®ã‚½ãƒ¼ãƒˆé †ï¼‰ã‚’æŒã¤ãŒã€signカラムã®å€¤ãŒç•°ãªã‚‹å ´åˆã€æœ€å¾Œã«æŒ¿å…¥ã•ã‚ŒãŸè¡Œã®+1ãŒçŠ¶æ…‹è¡Œã¨ãªã‚Šã€ä»–ã®è¡Œã¯ãŠäº’ã„をキャンセルã—ã¾ã™ +- ãŠäº’ã„をキャンセルã™ã‚‹è¡Œã¯ãƒžãƒ¼ã‚¸ä¸­ã«å‰Šé™¤ã•ã‚Œã¾ã™ +- マッãƒã™ã‚‹ãƒšã‚¢ã‚’æŒãŸãªã„è¡Œã¯æ®‹ã‚Šã¾ã™ + +`hackernews_views`テーブルã«è¡Œã‚’追加ã—ã¾ã—ょã†ã€‚ã“ã®ä¸»ã‚­ãƒ¼ã«å¯¾å¿œã™ã‚‹å”¯ä¸€ã®è¡Œã§ã‚ã‚‹ãŸã‚ã€ãã®çŠ¶æ…‹ã‚’1ã«è¨­å®šã—ã¾ã™ï¼š + +```sql +INSERT INTO hackernews_views VALUES + (123, 'ricardo', 0, 1) +``` + +次ã«ã€viewsカラムを変更ã—ãŸã„ã¨ã—ã¾ã™ã€‚既存ã®è¡Œã‚’キャンセルã™ã‚‹1è¡Œã¨ã€ãã®è¡Œã®æ–°ã—ã„状態をå«ã‚€1è¡Œã®è¨ˆ2行を挿入ã—ã¾ã™ï¼š + +```sql +INSERT INTO hackernews_views VALUES + (123, 'ricardo', 0, -1), + (123, 'ricardo', 150, 1) +``` + +テーブルã«ã¯ç¾åœ¨ã€ä¸»ã‚­ãƒ¼(123, 'ricardo')ã‚’æŒã¤3è¡ŒãŒã‚ã‚Šã¾ã™ï¼š + +```sql +SELECT * +FROM hackernews_views +``` + +```response +┌──id─┬─author──┬─views─┬─sign─┠+│ 123 │ ricardo │ 0 │ -1 │ +│ 123 │ ricardo │ 150 │ 1 │ +└─────┴─────────┴───────┴──────┘ +┌──id─┬─author──┬─views─┬─sign─┠+│ 123 │ ricardo │ 0 │ 1 │ +└─────┴─────────┴───────┴──────┘ +``` + +`FINAL`を追加ã™ã‚‹ã¨ã€ç¾åœ¨ã®çŠ¶æ…‹è¡ŒãŒè¿”ã•ã‚Œã‚‹ã“ã¨ã«æ³¨ç›®ã—ã¦ãã ã•ã„: + +```sql +SELECT * +FROM hackernews_views +FINAL +``` + +```response +┌──id─┬─author──┬─views─┬─sign─┠+│ 123 │ ricardo │ 150 │ 1 │ +└─────┴─────────┴───────┴──────┘ +``` + +ã—ã‹ã—ã€å½“然ã®ã“ã¨ãªãŒã‚‰ã€å¤§ããªãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦`FINAL`を使用ã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +:::note +ã“ã®ä¾‹ã§`views`カラムã«æ¸¡ã•ã‚ŒãŸå€¤ã¯æœ¬å½“ã«å¿…è¦ãªãã€å¤ã„è¡Œã®ç¾åœ¨ã®`views`ã®å€¤ã¨ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ã‚‚ã‚ã‚Šã¾ã›ã‚“。実際ã€ä¸»ã‚­ãƒ¼ã¨-1ã ã‘ã§è¡Œã‚’キャンセルã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +INSERT INTO hackernews_views(id, author, sign) VALUES + (123, 'ricardo', -1) +``` +::: + +## 複数スレッドã‹ã‚‰ã®ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ æ›´æ–° + +`CollapsingMergeTree`テーブルを使用ã™ã‚‹ã¨ã€è¡Œã¯signカラムを使ã£ã¦äº’ã„ã«ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚Œã€è¡Œã®çŠ¶æ…‹ã¯æœ€å¾Œã«æŒ¿å…¥ã•ã‚ŒãŸè¡Œã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã¾ã™ã€‚ã—ã‹ã—ã€è¡ŒãŒç•°ãªã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã‹ã‚‰é †ä¸åŒã§æŒ¿å…¥ã•ã‚Œã‚‹å ´åˆã€ã“ã‚Œã¯å•é¡Œã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€æœ€å¾Œã®è¡Œã‚’使用ã™ã‚‹ã“ã¨ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。 + +ã“ã“ã§`VersionedCollapsingMergeTree`ãŒå½¹ç«‹ã¡ã¾ã™ã€‚`VersionedCollapsingMergeTree`ã¯ã€`CollapsingMergeTree`ã¨åŒæ§˜ã«è¡Œã‚’折りãŸãŸã¿ã¾ã™ãŒã€æœ€å¾Œã«æŒ¿å…¥ã•ã‚ŒãŸè¡Œã§ã¯ãªãã€æŒ‡å®šã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚«ãƒ©ãƒ ã®æœ€å¤§å€¤ã‚’æŒã¤è¡Œã‚’ä¿æŒã—ã¾ã™ã€‚ + +例を見ã¦ã¿ã¾ã—ょã†ã€‚ãƒãƒƒã‚«ãƒ¼ãƒ‹ãƒ¥ãƒ¼ã‚¹ã®ã‚³ãƒ¡ãƒ³ãƒˆã®è¡¨ç¤ºå›žæ•°ã‚’追跡ã—ã€ãƒ‡ãƒ¼ã‚¿ã¯é »ç¹ã«æ›´æ–°ã•ã‚Œã¾ã™ã€‚レãƒãƒ¼ãƒˆã§ã¯ã€ãƒžãƒ¼ã‚¸ã‚’強制ã—ãŸã‚Šå¾…ã¤ã“ã¨ãªã最新ã®å€¤ã‚’使用ã—ãŸã„ã§ã™ã€‚`CollapsedMergeTree`ã«ä¼¼ãŸãƒ†ãƒ¼ãƒ–ルã‹ã‚‰å§‹ã‚ã¾ã™ãŒã€è¡Œã®çŠ¶æ…‹ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æ ¼ç´ã™ã‚‹ã‚«ãƒ©ãƒ ã‚’追加ã—ã¾ã™ï¼š + +```sql +CREATE TABLE hackernews_views_vcmt ( + id UInt32, + author String, + views UInt64, + sign Int8, + version UInt32 +) +ENGINE = VersionedCollapsingMergeTree(sign, version) +PRIMARY KEY (id, author) +``` + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯`VersionsedCollapsingMergeTree`をエンジンã¨ã—ã¦ä½¿ç”¨ã—ã€**signカラム**ã¨**versionカラム**を渡ã—ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã®åƒãæ–¹ã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +- åŒã˜ä¸»ã‚­ãƒ¼ã¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æŒã¡ã€ç•°ãªã‚‹signã‚’æŒã¤å„ペアã®è¡Œã‚’削除ã—ã¾ã™ +- è¡ŒãŒæŒ¿å…¥ã•ã‚ŒãŸé †åºã¯é–¢ä¿‚ã‚ã‚Šã¾ã›ã‚“ +- ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚«ãƒ©ãƒ ãŒä¸»ã‚­ãƒ¼ãƒ‘ートã§ãªã„å ´åˆã€ClickHouseã¯ãれを最後ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¨ã—ã¦ä¸»ã‚­ãƒ¼ã«æš—黙的ã«è¿½åŠ ã—ã¾ã™ + +クエリを記述ã™ã‚‹ã¨ãã«åŒæ§˜ã®ãƒ­ã‚¸ãƒƒã‚¯ã‚’使用ã—ã¾ã™ - 主キーã§ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã€ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚ŒãŸãŒã¾ã å‰Šé™¤ã•ã‚Œã¦ã„ãªã„行をé¿ã‘る巧妙ãªãƒ­ã‚¸ãƒƒã‚¯ã‚’使用ã—ã¾ã™ã€‚`hackernews_views_vcmt`テーブルã«ã„ãã¤ã‹ã®è¡Œã‚’追加ã—ã¾ã—ょã†ï¼š + +```sql +INSERT INTO hackernews_views_vcmt VALUES + (1, 'ricardo', 0, 1, 1), + (2, 'ch_fan', 0, 1, 1), + (3, 'kenny', 0, 1, 1) +``` + +次ã«ã€2ã¤ã®è¡Œã‚’æ›´æ–°ã—ã€1ã¤ã‚’削除ã—ã¾ã™ã€‚行をキャンセルã™ã‚‹ã«ã¯ã€å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’å«ã‚ã¦ãã ã•ã„(ã“ã‚Œã¯ä¸»ã‚­ãƒ¼ã®ä¸€éƒ¨ã§ã‚ã‚‹ãŸã‚): + +```sql +INSERT INTO hackernews_views_vcmt VALUES + (1, 'ricardo', 0, -1, 1), + (1, 'ricardo', 50, 1, 2), + (2, 'ch_fan', 0, -1, 1), + (3, 'kenny', 0, -1, 1), + (3, 'kenny', 1000, 1, 2) +``` + +signカラムã«åŸºã¥ã„ã¦å€¤ã‚’加減算ã™ã‚‹åŒã˜ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ï¼š + +```sql +SELECT + id, + author, + sum(views * sign) +FROM hackernews_views_vcmt +GROUP BY (id, author) +HAVING sum(sign) > 0 +ORDER BY id ASC +``` + +çµæžœã¯2è¡Œã§ã™ï¼š + +```response +┌─id─┬─author──┬─sum(multiply(views, sign))─┠+│ 1 │ ricardo │ 50 │ +│ 3 │ kenny │ 1000 │ +└────┴─────────┴────────────────────────────┘ +``` + +テーブルã®ãƒžãƒ¼ã‚¸ã‚’強制ã—ã¾ã™ï¼š + +```sql +OPTIMIZE TABLE hackernews_views_vcmt +``` + +çµæžœã«ã¯2è¡Œã ã‘ãŒå«ã¾ã‚Œã¾ã™ï¼š + +```sql +SELECT * +FROM hackernews_views_vcmt +``` + +```response +┌─id─┬─author──┬─views─┬─sign─┬─version─┠+│ 1 │ ricardo │ 50 │ 1 │ 2 │ +│ 3 │ kenny │ 1000 │ 1 │ 2 │ +└────┴─────────┴───────┴──────┴─────────┘ +``` + +`VersionedCollapsingMergeTree`テーブルã¯ã€è¤‡æ•°ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚„スレッドã‹ã‚‰ã®è¡Œã®æŒ¿å…¥ã‚’è¡Œã„ã¤ã¤ã€é‡è¤‡æŽ’除を実装ã—ãŸã„å ´åˆã«éžå¸¸ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +## ãªãœè¡ŒãŒé‡è¤‡æŽ’除ã•ã‚Œã¦ã„ãªã„ã®ã‹ï¼Ÿ + +挿入ã•ã‚ŒãŸè¡ŒãŒé‡è¤‡æŽ’除ã•ã‚Œãªã„ç†ç”±ã®ä¸€ã¤ã¯ã€`INSERT`ステートメントã§éžå†ªç­‰é–¢æ•°ã‚„å¼ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã§ã™ã€‚例ãˆã°ã€`createdAt DateTime64(3) DEFAULT now()`ã¨ã„ã†ã‚«ãƒ©ãƒ ã‚’使用ã—ã¦è¡Œã‚’挿入ã™ã‚‹ã¨ã€å„è¡Œã¯ä¸€æ„ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’æŒã¤ãŸã‚ã€å¿…ãšãƒ¦ãƒ‹ãƒ¼ã‚¯ã«ãªã‚Šã¾ã™ã€‚MergeTree / ReplicatedMergeTreeテーブルエンジンã¯ã€å„挿入行ãŒä¸€æ„ã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’生æˆã™ã‚‹ãŸã‚ã€é‡è¤‡æŽ’除をèªè­˜ã—ã¾ã›ã‚“。 + +ã“ã®å ´åˆã€ãƒãƒƒãƒã®è¡Œã”ã¨ã«ç‹¬è‡ªã®`insert_deduplication_token`を指定ã—ã¦ã€åŒã˜ãƒãƒƒãƒã®è¤‡æ•°ã®æŒ¿å…¥ãŒåŒã˜è¡Œã‚’å†æŒ¿å…¥ã™ã‚‹ã“ã¨ã«ãªã‚‰ãªã„よã†ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚[`insert_deduplication_token`ã«é–¢ã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](/docs/ja/operations/settings/settings#insert_deduplication_token)ã‚’ã”覧ãã ã•ã„。ã“ã®è¨­å®šã®ä½¿ç”¨æ–¹æ³•ã«ã¤ã„ã¦ã‚‚ã£ã¨è©³ã—ã知るã“ã¨ãŒã§ãã¾ã™ã€‚ diff --git a/docs/ja/guides/developer/images/Deduplication.png b/docs/ja/guides/developer/images/Deduplication.png new file mode 100644 index 00000000000..3e89a646b8e Binary files /dev/null and b/docs/ja/guides/developer/images/Deduplication.png differ diff --git a/docs/ja/guides/developer/images/analyzer1.png b/docs/ja/guides/developer/images/analyzer1.png new file mode 100644 index 00000000000..4938af2149b Binary files /dev/null and b/docs/ja/guides/developer/images/analyzer1.png differ diff --git a/docs/ja/guides/developer/images/analyzer2.png b/docs/ja/guides/developer/images/analyzer2.png new file mode 100644 index 00000000000..2943b8b8efd Binary files /dev/null and b/docs/ja/guides/developer/images/analyzer2.png differ diff --git a/docs/ja/guides/developer/images/analyzer3.png b/docs/ja/guides/developer/images/analyzer3.png new file mode 100644 index 00000000000..0530706badb Binary files /dev/null and b/docs/ja/guides/developer/images/analyzer3.png differ diff --git a/docs/ja/guides/developer/images/analyzer4.png b/docs/ja/guides/developer/images/analyzer4.png new file mode 100644 index 00000000000..e4b038f4391 Binary files /dev/null and b/docs/ja/guides/developer/images/analyzer4.png differ diff --git a/docs/ja/guides/developer/images/analyzer5.png b/docs/ja/guides/developer/images/analyzer5.png new file mode 100644 index 00000000000..54f8420696e Binary files /dev/null and b/docs/ja/guides/developer/images/analyzer5.png differ diff --git a/docs/ja/guides/developer/lightweight-delete.md b/docs/ja/guides/developer/lightweight-delete.md new file mode 100644 index 00000000000..5a98f5a7a7d --- /dev/null +++ b/docs/ja/guides/developer/lightweight-delete.md @@ -0,0 +1,8 @@ +--- +slug: /ja/guides/developer/lightweight-delete +title: è«–ç†å‰Šé™¤ +keywords: [è«–ç†å‰Šé™¤] +--- +import Content from '@site/docs/ja/sql-reference/statements/delete.md'; + + diff --git a/docs/ja/guides/developer/lightweight-update.md b/docs/ja/guides/developer/lightweight-update.md new file mode 100644 index 00000000000..dbf36ca02bd --- /dev/null +++ b/docs/ja/guides/developer/lightweight-update.md @@ -0,0 +1,95 @@ +--- +slug: /ja/guides/developer/lightweight-update +sidebar_label: è«–ç†æ›´æ–° +title: è«–ç†æ›´æ–° +keywords: [lightweight update] +--- + +## è«–ç†æ›´æ–° + +:::note +è«–ç†æ›´æ–°ã¯ClickHouse Cloudã§ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ +::: + +è«–ç†æ›´æ–°ãŒæœ‰åŠ¹ãªå ´åˆã€æ›´æ–°ã•ã‚ŒãŸè¡Œã¯å³åº§ã«æ›´æ–°æ¸ˆã¿ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã€å¾Œç¶šã®`SELECT`クエリã¯è‡ªå‹•çš„ã«å¤‰æ›´ã•ã‚ŒãŸå€¤ã‚’è¿”ã—ã¾ã™ã€‚è«–ç†æ›´æ–°ãŒæœ‰åŠ¹ã§ãªã„å ´åˆã¯ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰å‡¦ç†ã§ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãŒé©ç”¨ã•ã‚Œã‚‹ã®ã‚’å¾…ã¤å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +è«–ç†æ›´æ–°ã¯ã€`MergeTree`ファミリーã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã®è¨­å®š`apply_mutations_on_fly`を有効ã«ã™ã‚‹ã“ã¨ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +```sql +SET apply_mutations_on_fly = 1; +``` + +## 例 + +テーブルを作æˆã—ã€ã„ãã¤ã‹ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’実行ã—ã¦ã¿ã¾ã—ょã†ï¼š +```sql +CREATE TABLE test_on_fly_mutations (id UInt64, v String) +ENGINE = MergeTree ORDER BY id; + +-- è«–ç†æ›´æ–°ãŒæœ‰åŠ¹ã§ãªã„å ´åˆã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å‹•ä½œã‚’示ã™ãŸã‚ã« +-- ミューテーションã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã®å…·ä½“化を無効化 +SYSTEM STOP MERGES test_on_fly_mutations; +SET mutations_sync = 0; + +-- æ–°ã—ã„テーブルã«ã„ãã¤ã‹ã®è¡Œã‚’挿入 +INSERT INTO test_on_fly_mutations VALUES (1, 'a'), (2, 'b'), (3, 'c'); + +-- è¡Œã®å€¤ã‚’æ›´æ–° +ALTER TABLE test_on_fly_mutations UPDATE v = 'd' WHERE id = 1; +ALTER TABLE test_on_fly_mutations DELETE WHERE v = 'd'; +ALTER TABLE test_on_fly_mutations UPDATE v = 'e' WHERE id = 2; +ALTER TABLE test_on_fly_mutations DELETE WHERE v = 'e'; +``` + +`SELECT`クエリã§æ›´æ–°ã®çµæžœã‚’確èªã—ã¦ã¿ã¾ã—ょã†ï¼š +```sql +-- è«–ç†æ›´æ–°ã‚’明示的ã«ç„¡åŠ¹åŒ– +SET apply_mutations_on_fly = 0; + +SELECT id, v FROM test_on_fly_mutations ORDER BY id; +``` + +æ–°ã—ã„テーブルをクエリã—ãŸéš›ã«ã€è¡Œã®å€¤ãŒã¾ã æ›´æ–°ã•ã‚Œã¦ã„ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„: + +``` +┌─id─┬─v─┠+│ 1 │ a │ +│ 2 │ b │ +│ 3 │ c │ +└────┴───┘ +``` + +è«–ç†æ›´æ–°ã‚’有効ã«ã™ã‚‹ã¨ã©ã†ãªã‚‹ã‹ã‚’見ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +-- è«–ç†æ›´æ–°ã‚’有効化 +SET apply_mutations_on_fly = 1; + +SELECT id, v FROM test_on_fly_mutations ORDER BY id; +``` + +ã“ã®`SELECT`クエリã¯ã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãŒé©ç”¨ã•ã‚Œã‚‹ã®ã‚’å¾…ãŸãªãã¦ã‚‚ã€æ­£ã—ã„çµæžœã‚’å³åº§ã«è¿”ã™ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +``` +┌─id─┬─v─┠+│ 3 │ c │ +└────┴───┘ +``` + +## パフォーマンスã¸ã®å½±éŸ¿ + +è«–ç†æ›´æ–°ã‚’有効ã«ã™ã‚‹ã¨ã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯å³åº§ã«å…·ä½“化ã•ã‚Œãšã€`SELECT`クエリã®éš›ã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ãŸã ã—ã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§éžåŒæœŸã«å…·ä½“化ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã‚Œã¯é‡ã„プロセスã§ã™ã€‚ + +特定ã®æ™‚間間隔内ã§å‡¦ç†ã•ã‚Œã‚‹ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®æ•°ã‚’é€ä¿¡ã•ã‚ŒãŸãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®æ•°ãŒå¸¸ã«è¶…ãˆã‚‹å ´åˆã€é©ç”¨ã•ã‚Œã‚‹ã¹ã具体化ã•ã‚Œã¦ã„ãªã„ミューテーションã®ã‚­ãƒ¥ãƒ¼ãŒå¢—ãˆç¶šã‘ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æœ€çµ‚çš„ã«`SELECT`クエリã®ãƒ‘フォーマンスã®åŠ£åŒ–ã‚’æ‹›ãå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +具体化ã•ã‚Œã¦ã„ãªã„ミューテーションã®ç„¡é™æˆé•·ã‚’制é™ã™ã‚‹ãŸã‚ã«ã€`apply_mutations_on_fly`ã®è¨­å®šã‚’`number_of_mutations_to_throw`ã‚„`number_of_mutations_to_delay`ã¨ã„ã£ãŸä»–ã®`MergeTree`レベルã®è¨­å®šã¨ä½µã›ã¦æœ‰åŠ¹ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## サブクエリã¨éžæ±ºå®šçš„ãªé–¢æ•°ã®ã‚µãƒãƒ¼ãƒˆ + +è«–ç†æ›´æ–°ã¯ã€ã‚µãƒ–クエリã¨éžæ±ºå®šçš„ãªé–¢æ•°ã«å¯¾ã—ã¦é™å®šçš„ãªã‚µãƒãƒ¼ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚妥当ãªã‚µã‚¤ã‚ºï¼ˆè¨­å®š`mutations_max_literal_size_to_replace`ã§åˆ¶å¾¡ã•ã‚Œã‚‹ï¼‰ã®çµæžœã‚’æŒã¤ã‚¹ã‚«ãƒ©ãƒ¼ã‚µãƒ–クエリã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã¾ãŸã€å®šæ•°ã®éžæ±ºå®šçš„ãªé–¢æ•°ï¼ˆä¾‹:`now()`関数)ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“れらã®å‹•ä½œã¯æ¬¡ã®è¨­å®šã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ï¼š + +- `mutations_execute_nondeterministic_on_initiator` - trueã®å ´åˆã€éžæ±ºå®šçš„ãªé–¢æ•°ã¯ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ãƒ¬ãƒ—リカã§å®Ÿè¡Œã•ã‚Œã€`UPDATE`ã‚„`DELETE`クエリã§ãƒªãƒ†ãƒ©ãƒ«ã¨ã—ã¦ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚デフォルト値:`false`。 +- `mutations_execute_subqueries_on_initiator` - trueã®å ´åˆã€ã‚¹ã‚«ãƒ©ãƒ¼ã‚µãƒ–クエリã¯ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ãƒ¬ãƒ—リカã§å®Ÿè¡Œã•ã‚Œã€`UPDATE`ã‚„`DELETE`クエリã§ãƒªãƒ†ãƒ©ãƒ«ã¨ã—ã¦ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚デフォルト値:`false`。 +- `mutations_max_literal_size_to_replace` - `UPDATE`ã‚„`DELETE`クエリã§ç½®ãæ›ãˆã‚‹ãƒªãƒ†ãƒ©ãƒ«ã®ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚ŒãŸæœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚デフォルト値:`16384`(16 KiB)。 diff --git a/docs/ja/guides/developer/mutations.md b/docs/ja/guides/developer/mutations.md new file mode 100644 index 00000000000..e3487ea7263 --- /dev/null +++ b/docs/ja/guides/developer/mutations.md @@ -0,0 +1,100 @@ +--- +slug: /ja/guides/developer/mutations +sidebar_label: データã®æ›´æ–°ã¨å‰Šé™¤ +sidebar_position: 1 +keywords: [æ›´æ–°, 削除, ミューテーション] +--- + +# ClickHouse データã®æ›´æ–°ã¨å‰Šé™¤ + +ClickHouse ã¯é«˜ãƒœãƒªãƒ¥ãƒ¼ãƒ ã®åˆ†æžãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«é©ã—ã¦ã„ã‚‹ã‚‚ã®ã®ã€ç‰¹å®šã®çŠ¶æ³ã§ã¯æ—¢å­˜ã®ãƒ‡ãƒ¼ã‚¿ã‚’変更ã¾ãŸã¯å‰Šé™¤ã§ãã¾ã™ã€‚ã“れらã®æ“作ã¯ã€ŒãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã€ã¨å‘¼ã°ã‚Œã€`ALTER TABLE` コマンドを使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ã¾ãŸã€ClickHouse ã®è«–ç†å‰Šé™¤ã®æ©Ÿèƒ½ã‚’使用ã—ã¦ã€è¡Œã‚’ `DELETE` ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +:::tip +é »ç¹ãªæ›´æ–°ãŒå¿…è¦ãªå ´åˆã¯ã€ClickHouse ã® [é‡è¤‡æŽ’除](../developer/deduplication.md) を使用ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚¤ãƒ™ãƒ³ãƒˆã‚’生æˆã›ãšã«è¡Œã‚’æ›´æ–°ãŠã‚ˆã³/ã¾ãŸã¯å‰Šé™¤ã§ãã¾ã™ã€‚ +::: + +## データã®æ›´æ–° + +テーブルã®è¡Œã‚’æ›´æ–°ã™ã‚‹ã«ã¯ `ALTER TABLE...UPDATE` コマンドを使用ã—ã¾ã™: + +```sql +ALTER TABLE [.] UPDATE = WHERE +``` + +`` 㯠`` を満ãŸã™ã‚«ãƒ©ãƒ ã®æ–°ã—ã„値ã§ã™ã€‚`` ã¯ã‚«ãƒ©ãƒ ã¨åŒã˜ãƒ‡ãƒ¼ã‚¿åž‹ã§ã‚ã‚‹ã‹ã€`CAST` 演算å­ã‚’使用ã—ã¦åŒã˜ãƒ‡ãƒ¼ã‚¿åž‹ã«å¤‰æ›å¯èƒ½ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`` ã¯ãƒ‡ãƒ¼ã‚¿ã®å„è¡Œã«å¯¾ã—㦠`UInt8`(0 ã¾ãŸã¯ 0 以外)ã®å€¤ã‚’è¿”ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚複数㮠`UPDATE ` ステートメントをカンマã§åŒºåˆ‡ã£ã¦å˜ä¸€ã® `ALTER TABLE` コマンドã«çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**例**: + + 1. ã“ã®ã‚ˆã†ãªãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã€Dictionaryルックアップを使用ã—㦠`visitor_id` ã‚’æ–°ã—ã„ã‚‚ã®ã«æ›´æ–°ã§ãã¾ã™ã€‚ + + ```sql + ALTER TABLE website.clicks + UPDATE visitor_id = getDict('visitors', 'new_visitor_id', visitor_id) + WHERE visit_date < '2022-01-01' + ``` + +2. 一ã¤ã®ã‚³ãƒžãƒ³ãƒ‰ã§è¤‡æ•°ã®å€¤ã‚’変更ã™ã‚‹ã“ã¨ã§ã€è¤‡æ•°ã®ã‚³ãƒžãƒ³ãƒ‰ã‚ˆã‚Šã‚‚効率的ã«ãªã‚Šã¾ã™ã€‚ + + ```sql + ALTER TABLE website.clicks + UPDATE url = substring(url, position(url, '://') + 3), visitor_id = new_visit_id + WHERE visit_date < '2022-01-01' + ``` + +3. シャード化ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—㦠`ON CLUSTER` ã§ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’実行ã§ãã¾ã™ã€‚ + + ```sql + ALTER TABLE clicks ON CLUSTER main_cluster + UPDATE click_count = click_count / 2 + WHERE visitor_id ILIKE '%robot%' + ``` + +:::note +主キーã¾ãŸã¯ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã®ä¸€éƒ¨ã§ã‚るカラムを更新ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +::: + +## データã®å‰Šé™¤ + +行を削除ã™ã‚‹ã«ã¯ã€`ALTER TABLE` コマンドを使用ã—ã¾ã™: + +```sql +ALTER TABLE [.]
DELETE WHERE +``` + +`` ã¯ãƒ‡ãƒ¼ã‚¿ã®å„è¡Œã«å¯¾ã—㦠`UInt8` ã®å€¤ã‚’è¿”ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** + +1. カラムãŒå€¤ã®é…列ã«å«ã¾ã‚Œã‚‹ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’削除ã™ã‚‹: + ```sql + ALTER TABLE website.clicks DELETE WHERE visitor_id in (253, 1002, 4277) + ``` + +2. ã“ã®ã‚¯ã‚¨ãƒªã¯ä½•ã‚’変更ã™ã‚‹ã®ã‹ï¼Ÿ + ```sql + ALTER TABLE clicks ON CLUSTER main_cluster DELETE WHERE visit_date < '2022-01-02 15:00:00' AND page_id = '573' + ``` + +:::note +テーブル内ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹ã«ã¯ã€`TRUNCATE TABLE [` コマンドを使用ã™ã‚‹æ–¹ãŒåŠ¹çŽ‡çš„ã§ã™ã€‚ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ `ON CLUSTER` ã§ã‚‚実行ã§ãã¾ã™ã€‚ +::: + +詳細ã«ã¤ã„ã¦ã¯ã€[`DELETE` ステートメント](/docs/ja/sql-reference/statements/delete.md) ドキュメントページをå‚ç…§ã—ã¦ãã ã•ã„。 + +## è«–ç†å‰Šé™¤ + +行を削除ã™ã‚‹åˆ¥ã®ã‚ªãƒ—ションã¨ã—ã¦ã€`DELETE FROM` コマンドãŒã‚ã‚Šã¾ã™ã€‚ã“れ㯠**è«–ç†å‰Šé™¤** ã¨å‘¼ã°ã‚Œã¾ã™ã€‚削除ã•ã‚ŒãŸè¡Œã¯å³åº§ã«å‰Šé™¤ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã€å¾Œç¶šã®ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‹ã‚‰è‡ªå‹•çš„ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã‚‹ãŸã‚ã€ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ã‚’å¾…ã£ãŸã‚Š `FINAL` キーワードを使用ã—ãŸã‚Šã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。データã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§éžåŒæœŸã«è¡Œã‚ã‚Œã¾ã™ã€‚ + +``` sql +DELETE FROM [db.]table [ON CLUSTER cluster] [WHERE expr] +``` + +ãŸã¨ãˆã°ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã¯ã€`Title` カラム㫠`hello` ã¨ã„ã†ãƒ†ã‚­ã‚¹ãƒˆãŒå«ã¾ã‚Œã‚‹ `hits` テーブルã®ã™ã¹ã¦ã®è¡Œã‚’削除ã—ã¾ã™ã€‚ + +```sql +DELETE FROM hits WHERE Title LIKE '%hello%'; +``` + +è«–ç†å‰Šé™¤ã«é–¢ã™ã‚‹æ³¨æ„事項: +- ã“ã®æ©Ÿèƒ½ã¯ `MergeTree` テーブルエンジンファミリーã§ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ +- è«–ç†å‰Šé™¤ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§éžåŒæœŸã§ã™ã€‚`mutations_sync` ã‚’ 1 ã«è¨­å®šã™ã‚‹ã¨ 1 ã¤ã®ãƒ¬ãƒ—リカãŒã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’処ç†ã™ã‚‹ã®ã‚’å¾…ã¡ã€2 ã«è¨­å®šã™ã‚‹ã¨ã™ã¹ã¦ã®ãƒ¬ãƒ—リカを待ã¡ã¾ã™ã€‚ diff --git a/docs/ja/guides/developer/time-series-filling-gaps.md b/docs/ja/guides/developer/time-series-filling-gaps.md new file mode 100644 index 00000000000..5d985f6ca44 --- /dev/null +++ b/docs/ja/guides/developer/time-series-filling-gaps.md @@ -0,0 +1,337 @@ +--- +slug: /ja/guides/developer/time-series-filling-gaps +sidebar_label: タイムシリーズ - ギャップã®åŸ‹ã‚æ–¹ +sidebar_position: 10 +description: タイムシリーズデータã®ã‚®ãƒ£ãƒƒãƒ—を埋ã‚る。 +keywords: [time series, gap fill] +--- + +# タイムシリーズデータã®ã‚®ãƒ£ãƒƒãƒ—を埋ã‚ã‚‹ + +タイムシリーズデータを扱ã†éš›ã€ãƒ‡ãƒ¼ã‚¿ãŒæ¬ è½ã—ã¦ã„ã‚‹ã‹ã€éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®ãŸã‚ã«ã‚®ãƒ£ãƒƒãƒ—ãŒç™ºç”Ÿã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚通常ã€ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹éš›ã«ã€ãã®ã‚ˆã†ãªã‚®ãƒ£ãƒƒãƒ—を残ã—ãŸãã‚ã‚Šã¾ã›ã‚“。ã“ã®å ´åˆã€`WITH FILL`å¥ãŒä¾¿åˆ©ã§ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€`WITH FILL`を使用ã—ã¦ã‚¿ã‚¤ãƒ ã‚·ãƒªãƒ¼ã‚ºãƒ‡ãƒ¼ã‚¿ã®ã‚®ãƒ£ãƒƒãƒ—を埋ã‚る方法を説明ã—ã¾ã™ã€‚ + +## セットアップ + +GenAIイメージサービスã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸç”»åƒã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã™ã‚‹ä»¥ä¸‹ã®ã‚ˆã†ãªãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š + +```sql +CREATE TABLE images +( + `id` String, + `timestamp` DateTime64(3), + `height` Int64, + `width` Int64, + `size` Int64 +) +ENGINE = MergeTree +ORDER BY (size, height, width); +``` + +ã„ãã¤ã‹ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’インãƒãƒ¼ãƒˆã—ã¾ã™ï¼š + +```sql +INSERT INTO images VALUES (1088619203512250448, '2023-03-24 00:24:03.684', 1536, 1536, 2207289); +INSERT INTO images VALUES (1088619204040736859, '2023-03-24 00:24:03.810', 1024, 1024, 1928974); +INSERT INTO images VALUES (1088619204749561989, '2023-03-24 00:24:03.979', 1024, 1024, 1275619); +INSERT INTO images VALUES (1088619206431477862, '2023-03-24 00:24:04.380', 2048, 2048, 5985703); +INSERT INTO images VALUES (1088619206905434213, '2023-03-24 00:24:04.493', 1024, 1024, 1558455); +INSERT INTO images VALUES (1088619208524431510, '2023-03-24 00:24:04.879', 1024, 1024, 1494869); +INSERT INTO images VALUES (1088619208425437515, '2023-03-24 00:24:05.160', 1024, 1024, 1538451); +``` + +## ãƒã‚±ãƒƒãƒˆå˜ä½ã®ã‚¯ã‚¨ãƒª + +2023å¹´3月24æ—¥ã®`00:24:03`ã‹ã‚‰`00:24:04`ã®é–“ã«ä½œæˆã•ã‚ŒãŸç”»åƒã‚’調ã¹ã‚‹ãŸã‚ã«ã€ã“れらã®æ™‚点ã®ãƒ‘ラメータを作æˆã—ã¾ã™ï¼š + +```sql +SET param_start = '2023-03-24 00:24:03', + param_end = '2023-03-24 00:24:04'; +``` + +次ã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’100ミリ秒ã®ãƒã‚±ãƒƒãƒˆã«ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã€ãã®ãƒã‚±ãƒƒãƒˆã§ä½œæˆã•ã‚ŒãŸç”»åƒã®æ•°ã‚’è¿”ã™ã‚¯ã‚¨ãƒªã‚’書ãã¾ã™ï¼š + +```sql +SELECT + toStartOfInterval(timestamp, toIntervalMillisecond(100)) AS bucket, + count() AS count +FROM MidJourney.images +WHERE (timestamp >= {start:String}) AND (timestamp <= {end:String}) +GROUP BY ALL +ORDER BY bucket ASC +``` + +```response +┌──────────────────bucket─┬─count─┠+│ 2023-03-24 00:24:03.600 │ 1 │ +│ 2023-03-24 00:24:03.800 │ 1 │ +│ 2023-03-24 00:24:03.900 │ 1 │ +│ 2023-03-24 00:24:04.300 │ 1 │ +│ 2023-03-24 00:24:04.400 │ 1 │ +│ 2023-03-24 00:24:04.800 │ 1 │ +└─────────────────────────┴───────┘ +``` + +çµæžœã‚»ãƒƒãƒˆã¯ç”»åƒãŒä½œæˆã•ã‚ŒãŸãƒã‚±ãƒƒãƒˆã®ã¿ã‚’å«ã‚“ã§ã„ã¾ã™ãŒã€ã‚¿ã‚¤ãƒ ã‚·ãƒªãƒ¼ã‚ºåˆ†æžã§ã¯ã€ã‚¨ãƒ³ãƒˆãƒªãŒãªãã¦ã‚‚å„100msã®ãƒã‚±ãƒƒãƒˆã‚’è¿”ã—ãŸã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +## WITH FILL + +ã“れらã®ã‚®ãƒ£ãƒƒãƒ—を埋ã‚ã‚‹ãŸã‚ã«`WITH FILL`å¥ã‚’使用ã§ãã¾ã™ã€‚ã¾ãŸã€ã‚®ãƒ£ãƒƒãƒ—を埋ã‚るサイズã§ã‚ã‚‹`STEP`も指定ã—ã¾ã™ã€‚`DateTime`タイプã®å ´åˆã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯1秒ã§ã™ãŒã€100msã®ã‚®ãƒ£ãƒƒãƒ—を埋ã‚ãŸã„ã®ã§ã€ã‚¹ãƒ†ãƒƒãƒ—値ã¨ã—ã¦100msã®é–“隔を指定ã—ã¾ã™ï¼š + +```sql +SELECT + toStartOfInterval(timestamp, toIntervalMillisecond(100)) AS bucket, + count() AS count +FROM MidJourney.images +WHERE (timestamp >= {start:String}) AND (timestamp <= {end:String}) +GROUP BY ALL +ORDER BY bucket ASC +WITH FILL +STEP toIntervalMillisecond(100); +``` + +```response +┌──────────────────bucket─┬─count─┠+│ 2023-03-24 00:24:03.600 │ 1 │ +│ 2023-03-24 00:24:03.700 │ 0 │ +│ 2023-03-24 00:24:03.800 │ 1 │ +│ 2023-03-24 00:24:03.900 │ 1 │ +│ 2023-03-24 00:24:04.000 │ 0 │ +│ 2023-03-24 00:24:04.100 │ 0 │ +│ 2023-03-24 00:24:04.200 │ 0 │ +│ 2023-03-24 00:24:04.300 │ 1 │ +│ 2023-03-24 00:24:04.400 │ 1 │ +│ 2023-03-24 00:24:04.500 │ 0 │ +│ 2023-03-24 00:24:04.600 │ 0 │ +│ 2023-03-24 00:24:04.700 │ 0 │ +│ 2023-03-24 00:24:04.800 │ 1 │ +└─────────────────────────┴───────┘ +``` + +`count`カラムã«ã¯0ã®å€¤ã§ã‚®ãƒ£ãƒƒãƒ—ãŒåŸ‹ã‚られã¦ã„ã¾ã™ã€‚ + +## WITH FILL...FROM + +ã—ã‹ã—ã€æ™‚間範囲ã®æœ€åˆã«ã¾ã ã‚®ãƒ£ãƒƒãƒ—ãŒã‚ã‚Šã¾ã™ã€‚ã“れを修正ã™ã‚‹ã«ã¯`FROM`を指定ã—ã¾ã™ï¼š + +```sql +SELECT + toStartOfInterval(timestamp, toIntervalMillisecond(100)) AS bucket, + count() AS count +FROM MidJourney.images +WHERE (timestamp >= {start:String}) AND (timestamp <= {end:String}) +GROUP BY ALL +ORDER BY bucket ASC +WITH FILL +FROM toDateTime64({start:String}, 3) +STEP toIntervalMillisecond(100); +``` + +```response +┌──────────────────bucket─┬─count─┠+│ 2023-03-24 00:24:03.000 │ 0 │ +│ 2023-03-24 00:24:03.100 │ 0 │ +│ 2023-03-24 00:24:03.200 │ 0 │ +│ 2023-03-24 00:24:03.300 │ 0 │ +│ 2023-03-24 00:24:03.400 │ 0 │ +│ 2023-03-24 00:24:03.500 │ 0 │ +│ 2023-03-24 00:24:03.600 │ 1 │ +│ 2023-03-24 00:24:03.700 │ 0 │ +│ 2023-03-24 00:24:03.800 │ 1 │ +│ 2023-03-24 00:24:03.900 │ 1 │ +│ 2023-03-24 00:24:04.000 │ 0 │ +│ 2023-03-24 00:24:04.100 │ 0 │ +│ 2023-03-24 00:24:04.200 │ 0 │ +│ 2023-03-24 00:24:04.300 │ 1 │ +│ 2023-03-24 00:24:04.400 │ 1 │ +│ 2023-03-24 00:24:04.500 │ 0 │ +│ 2023-03-24 00:24:04.600 │ 0 │ +│ 2023-03-24 00:24:04.700 │ 0 │ +│ 2023-03-24 00:24:04.800 │ 1 │ +└─────────────────────────┴───────┘ +``` + +çµæžœã‹ã‚‰`00:24:03.000`ã‹ã‚‰`00:24:03.500`ã¾ã§ã®ãƒã‚±ãƒƒãƒˆãŒã™ã¹ã¦å‡ºç¾ã—ã¦ã„ã¾ã™ã€‚ + +## WITH FILL...TO + +ã—ã‹ã—ã¾ã ã€æ™‚間範囲ã®çµ‚ã‚ã‚Šã‹ã‚‰ã„ãã¤ã‹ã®ãƒã‚±ãƒƒãƒˆãŒæ¬ ã‘ã¦ã„ã¾ã™ã€‚ã“れを埋ã‚ã‚‹ãŸã‚ã«`TO`値を指定ã—ã¾ã™ã€‚`TO`ã¯å«ã¾ã‚Œãªã„ã®ã§ã€çµ‚ã‚ã‚Šã®æ™‚é–“ã«å°‘ã—ã ã‘追加ã—ã¾ã™ï¼š + +```sql +SELECT + toStartOfInterval(timestamp, toIntervalMillisecond(100)) AS bucket, + count() AS count +FROM MidJourney.images +WHERE (timestamp >= {start:String}) AND (timestamp <= {end:String}) +GROUP BY ALL +ORDER BY bucket ASC +WITH FILL +FROM toDateTime64({start:String}, 3) +TO toDateTime64({end:String}, 3) + INTERVAL 1 millisecond +STEP toIntervalMillisecond(100); +``` + +```response +┌──────────────────bucket─┬─count─┠+│ 2023-03-24 00:24:03.000 │ 0 │ +│ 2023-03-24 00:24:03.100 │ 0 │ +│ 2023-03-24 00:24:03.200 │ 0 │ +│ 2023-03-24 00:24:03.300 │ 0 │ +│ 2023-03-24 00:24:03.400 │ 0 │ +│ 2023-03-24 00:24:03.500 │ 0 │ +│ 2023-03-24 00:24:03.600 │ 1 │ +│ 2023-03-24 00:24:03.700 │ 0 │ +│ 2023-03-24 00:24:03.800 │ 1 │ +│ 2023-03-24 00:24:03.900 │ 1 │ +│ 2023-03-24 00:24:04.000 │ 0 │ +│ 2023-03-24 00:24:04.100 │ 0 │ +│ 2023-03-24 00:24:04.200 │ 0 │ +│ 2023-03-24 00:24:04.300 │ 1 │ +│ 2023-03-24 00:24:04.400 │ 1 │ +│ 2023-03-24 00:24:04.500 │ 0 │ +│ 2023-03-24 00:24:04.600 │ 0 │ +│ 2023-03-24 00:24:04.700 │ 0 │ +│ 2023-03-24 00:24:04.800 │ 1 │ +│ 2023-03-24 00:24:04.900 │ 0 │ +│ 2023-03-24 00:24:05.000 │ 0 │ +└─────────────────────────┴───────┘ +``` + +ギャップãŒã™ã¹ã¦åŸ‹ã‚られã€`00:24:03.000`ã‹ã‚‰`00:24:05.000`ã¾ã§ã®ã™ã¹ã¦ã®100msã®ã‚¨ãƒ³ãƒˆãƒªãŒã‚ã‚Šã¾ã™ã€‚ + +## ç´¯ç©ã‚«ã‚¦ãƒ³ãƒˆ + +次ã«ã€ãƒã‚±ãƒƒãƒˆå…¨ä½“ã§ä½œæˆã•ã‚ŒãŸç”»åƒã®ç´¯ç©ã‚«ã‚¦ãƒ³ãƒˆã‚’ä¿æŒã—ãŸã„ã¨ã—ã¾ã™ã€‚以下ã®ã‚ˆã†ã«`cumulative`カラムを追加ã§ãã¾ã™ï¼š + +```sql +SELECT + toStartOfInterval(timestamp, toIntervalMillisecond(100)) AS bucket, + count() AS count, + sum(count) OVER (ORDER BY bucket) AS cumulative +FROM MidJourney.images +WHERE (timestamp >= {start:String}) AND (timestamp <= {end:String}) +GROUP BY ALL +ORDER BY bucket ASC +WITH FILL +FROM toDateTime64({start:String}, 3) +TO toDateTime64({end:String}, 3) + INTERVAL 1 millisecond +STEP toIntervalMillisecond(100); +``` + +```response +┌──────────────────bucket─┬─count─┬─cumulative─┠+│ 2023-03-24 00:24:03.000 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.100 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.200 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.300 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.400 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.500 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.600 │ 1 │ 1 │ +│ 2023-03-24 00:24:03.700 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.800 │ 1 │ 2 │ +│ 2023-03-24 00:24:03.900 │ 1 │ 3 │ +│ 2023-03-24 00:24:04.000 │ 0 │ 0 │ +│ 2023-03-24 00:24:04.100 │ 0 │ 0 │ +│ 2023-03-24 00:24:04.200 │ 0 │ 0 │ +│ 2023-03-24 00:24:04.300 │ 1 │ 4 │ +│ 2023-03-24 00:24:04.400 │ 1 │ 5 │ +│ 2023-03-24 00:24:04.500 │ 0 │ 0 │ +│ 2023-03-24 00:24:04.600 │ 0 │ 0 │ +│ 2023-03-24 00:24:04.700 │ 0 │ 0 │ +│ 2023-03-24 00:24:04.800 │ 1 │ 6 │ +│ 2023-03-24 00:24:04.900 │ 0 │ 0 │ +│ 2023-03-24 00:24:05.000 │ 0 │ 0 │ +└─────────────────────────┴───────┴────────────┘ +``` + +`cumulative`カラムã®å€¤ã¯æ„図ã—ãŸé€šã‚Šã«ã¯æ©Ÿèƒ½ã—ã¦ã„ã¾ã›ã‚“。 + +## WITH FILL...INTERPOLATE + +`count`カラムãŒ0ã®è¡Œã¯`cumulative`カラムも0ã®ã¾ã¾ã§ã™ãŒã€`cumulative`カラムã®å‰ã®å€¤ã‚’使用ã•ã›ãŸã„ã§ã™ã€‚以下ã®ã‚ˆã†ã«`INTERPOLATE`å¥ã‚’使用ã—ã¦ã“れを実ç¾ã§ãã¾ã™ï¼š + +```sql +SELECT + toStartOfInterval(timestamp, toIntervalMillisecond(100)) AS bucket, + count() AS count, + sum(count) OVER (ORDER BY bucket) AS cumulative +FROM MidJourney.images +WHERE (timestamp >= {start:String}) AND (timestamp <= {end:String}) +GROUP BY ALL +ORDER BY bucket ASC +WITH FILL +FROM toDateTime64({start:String}, 3) +TO toDateTime64({end:String}, 3) + INTERVAL 100 millisecond +STEP toIntervalMillisecond(100) +INTERPOLATE (cumulative); +``` + +```response +┌──────────────────bucket─┬─count─┬─cumulative─┠+│ 2023-03-24 00:24:03.000 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.100 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.200 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.300 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.400 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.500 │ 0 │ 0 │ +│ 2023-03-24 00:24:03.600 │ 1 │ 1 │ +│ 2023-03-24 00:24:03.700 │ 0 │ 1 │ +│ 2023-03-24 00:24:03.800 │ 1 │ 2 │ +│ 2023-03-24 00:24:03.900 │ 1 │ 3 │ +│ 2023-03-24 00:24:04.000 │ 0 │ 3 │ +│ 2023-03-24 00:24:04.100 │ 0 │ 3 │ +│ 2023-03-24 00:24:04.200 │ 0 │ 3 │ +│ 2023-03-24 00:24:04.300 │ 1 │ 4 │ +│ 2023-03-24 00:24:04.400 │ 1 │ 5 │ +│ 2023-03-24 00:24:04.500 │ 0 │ 5 │ +│ 2023-03-24 00:24:04.600 │ 0 │ 5 │ +│ 2023-03-24 00:24:04.700 │ 0 │ 5 │ +│ 2023-03-24 00:24:04.800 │ 1 │ 6 │ +│ 2023-03-24 00:24:04.900 │ 0 │ 6 │ +│ 2023-03-24 00:24:05.000 │ 0 │ 6 │ +└─────────────────────────┴───────┴────────────┘ +``` + +ã“ã‚Œã§ã‹ãªã‚Šè‰¯ããªã‚Šã¾ã—ãŸã€‚ãã—ã¦æœ€å¾Œã«ã€`bar`関数を使用ã—ã¦æ£’グラフを追加ã—ã¾ã™ã€‚æ–°ã—ã„カラムを`INTERPPOLATE`å¥ã«è¿½åŠ ã™ã‚‹ã®ã‚‚忘れãªã„よã†ã«ã—ã¾ã™ã€‚ + +```sql +SELECT + toStartOfInterval(timestamp, toIntervalMillisecond(100)) AS bucket, + count() AS count, + sum(count) OVER (ORDER BY bucket) AS cumulative, + bar(cumulative, 0, 10, 10) AS barChart +FROM MidJourney.images +WHERE (timestamp >= {start:String}) AND (timestamp <= {end:String}) +GROUP BY ALL +ORDER BY bucket ASC +WITH FILL +FROM toDateTime64({start:String}, 3) +TO toDateTime64({end:String}, 3) + INTERVAL 100 millisecond +STEP toIntervalMillisecond(100) +INTERPOLATE (cumulative, barChart); +``` + +```response +┌──────────────────bucket─┬─count─┬─cumulative─┬─barChart─┠+│ 2023-03-24 00:24:03.000 │ 0 │ 0 │ │ +│ 2023-03-24 00:24:03.100 │ 0 │ 0 │ │ +│ 2023-03-24 00:24:03.200 │ 0 │ 0 │ │ +│ 2023-03-24 00:24:03.300 │ 0 │ 0 │ │ +│ 2023-03-24 00:24:03.400 │ 0 │ 0 │ │ +│ 2023-03-24 00:24:03.500 │ 0 │ 0 │ │ +│ 2023-03-24 00:24:03.600 │ 1 │ 1 │ â–ˆ │ +│ 2023-03-24 00:24:03.700 │ 0 │ 1 │ â–ˆ │ +│ 2023-03-24 00:24:03.800 │ 1 │ 2 │ ██ │ +│ 2023-03-24 00:24:03.900 │ 1 │ 3 │ ███ │ +│ 2023-03-24 00:24:04.000 │ 0 │ 3 │ ███ │ +│ 2023-03-24 00:24:04.100 │ 0 │ 3 │ ███ │ +│ 2023-03-24 00:24:04.200 │ 0 │ 3 │ ███ │ +│ 2023-03-24 00:24:04.300 │ 1 │ 4 │ ████ │ +│ 2023-03-24 00:24:04.400 │ 1 │ 5 │ █████ │ +│ 2023-03-24 00:24:04.500 │ 0 │ 5 │ █████ │ +│ 2023-03-24 00:24:04.600 │ 0 │ 5 │ █████ │ +│ 2023-03-24 00:24:04.700 │ 0 │ 5 │ █████ │ +│ 2023-03-24 00:24:04.800 │ 1 │ 6 │ ██████ │ +│ 2023-03-24 00:24:04.900 │ 0 │ 6 │ ██████ │ +│ 2023-03-24 00:24:05.000 │ 0 │ 6 │ ██████ │ +└─────────────────────────┴───────┴────────────┴──────────┘ +``` diff --git a/docs/ja/guides/developer/ttl.md b/docs/ja/guides/developer/ttl.md new file mode 100644 index 00000000000..01e5a2914db --- /dev/null +++ b/docs/ja/guides/developer/ttl.md @@ -0,0 +1,259 @@ +--- +slug: /ja/guides/developer/ttl +sidebar_label: æœ‰åŠ¹æœŸé™ (TTL) +sidebar_position: 2 +keywords: [ttl, time to live, clickhouse, å¤ã„, データ] +description: TTL (time-to-live) ã¯ã€ä¸€å®šæœŸé–“経éŽå¾Œã«è¡Œã‚„カラムを移動ã€å‰Šé™¤ã€ã¾ãŸã¯é›†ç´„ã™ã‚‹æ©Ÿèƒ½ã‚’指ã—ã¾ã™ã€‚ +--- + +# æœ‰åŠ¹æœŸé™ (TTL) を用ã„ãŸãƒ‡ãƒ¼ã‚¿ç®¡ç† + +## TTLã®æ¦‚è¦ + +TTL (time-to-live) ã¯ã€ä¸€å®šæœŸé–“経éŽå¾Œã«è¡Œã‚„カラムを移動ã€å‰Šé™¤ã€ã¾ãŸã¯é›†ç´„ã™ã‚‹æ©Ÿèƒ½ã‚’指ã—ã¾ã™ã€‚「time-to-liveã€ã¨ã„ã†è¡¨ç¾ã¯å¤ã„データを削除ã™ã‚‹ã“ã¨ã ã‘ã‚’æ„味ã—ã¦ã„るよã†ã«èžã“ãˆã¾ã™ãŒã€TTLã«ã¯ã„ãã¤ã‹ã®ç”¨é€”ãŒã‚ã‚Šã¾ã™ï¼š + +- å¤ã„データã®å‰Šé™¤: 予想ã©ãŠã‚Šã€æŒ‡å®šã•ã‚ŒãŸæ™‚間経éŽå¾Œã«è¡Œã‚„カラムを削除ã§ãã¾ã™ +- ディスク間ã®ãƒ‡ãƒ¼ã‚¿ç§»å‹•: 一定時間経éŽå¾Œã«ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒœãƒªãƒ¥ãƒ¼ãƒ é–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’移動ã§ãã¾ã™ - ホット/ウォーム/コールドアーキテクãƒãƒ£ã®å±•é–‹ã«å½¹ç«‹ã¡ã¾ã™ +- データã®ãƒ­ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—: å¤ã„データを削除ã™ã‚‹å‰ã«ã€æœ‰ç”¨ãªé›†è¨ˆã‚„計算ã«ã¾ã¨ã‚ã¾ã™ + +:::note +TTLã¯ã€ãƒ†ãƒ¼ãƒ–ル全体ã¾ãŸã¯ç‰¹å®šã®ã‚«ãƒ©ãƒ ã«é©ç”¨ã§ãã¾ã™ã€‚ +::: + +## TTLã®æ§‹æ–‡ + +`TTL`å¥ã¯ã€ã‚«ãƒ©ãƒ å®šç¾©ã®å¾ŒãŠã‚ˆã³/ã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ル定義ã®æœ€å¾Œã«è¨˜è¿°ã§ãã¾ã™ã€‚`INTERVAL`å¥ã‚’使用ã—ã¦ã€æ™‚é–“ã®é•·ã•ã‚’定義ã—ã¾ã™ï¼ˆã“ã‚Œã«ã¯`Date`ã¾ãŸã¯`DateTime`データ型ãŒå¿…è¦ã§ã™ï¼‰ã€‚ãŸã¨ãˆã°ã€æ¬¡ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯`TTL`å¥ã‚’æŒã¤äºŒã¤ã®ã‚«ãƒ©ãƒ ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +CREATE TABLE example1 ( + timestamp DateTime, + x UInt32 TTL timestamp + INTERVAL 1 MONTH, + y String TTL timestamp + INTERVAL 1 DAY, + z String +) +ENGINE = MergeTree +ORDER BY tuple() +``` + +- xカラムã¯ã€timestampカラムã‹ã‚‰1ã‹æœˆã®æœ‰åŠ¹æœŸé™ãŒã‚ã‚Šã¾ã™ +- yカラムã¯ã€timestampカラムã‹ã‚‰1æ—¥ã®æœ‰åŠ¹æœŸé™ãŒã‚ã‚Šã¾ã™ +- インターãƒãƒ«ãŒçµŒéŽã™ã‚‹ã¨ã€ã‚«ãƒ©ãƒ ã¯æœŸé™åˆ‡ã‚Œã«ãªã‚Šã¾ã™ã€‚ClickHouseã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«ç½®ãæ›ãˆã€ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã®å…¨ã‚«ãƒ©ãƒ å€¤ãŒæœŸé™åˆ‡ã‚Œã«ãªã‚‹ã¨ã€ãã®ã‚«ãƒ©ãƒ ã‚’ファイルシステムã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã€‚ + +:::note +TTLルールã¯å¤‰æ›´ã¾ãŸã¯å‰Šé™¤ã§ãã¾ã™ã€‚詳細ã¯[テーブルTTLã®æ“作](/docs/ja/sql-reference/statements/alter/ttl.md)ページをå‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## TTLイベントã®ãƒˆãƒªã‚¬ãƒ¼ + +期é™åˆ‡ã‚Œã®è¡Œã‚’削除ã¾ãŸã¯é›†ç´„ã™ã‚‹æ“作ã¯å³æ™‚ã«ã¯è¡Œã‚ã‚Œãšã€ãƒ†ãƒ¼ãƒ–ルマージ時ã«ã®ã¿å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚アクティブã«ãƒžãƒ¼ã‚¸ã•ã‚Œã¦ã„ãªã„テーブルãŒã‚ã‚‹å ´åˆã€TTLイベントをトリガーã™ã‚‹2ã¤ã®è¨­å®šãŒã‚ã‚Šã¾ã™ï¼š + +- `merge_with_ttl_timeout`: 削除TTLã§å†åº¦ãƒžãƒ¼ã‚¸ã™ã‚‹ã¾ã§ã®æœ€å°é…延時間(秒)。デフォルトã¯14400秒(4時間)ã§ã™ã€‚ +- `merge_with_recompression_ttl_timeout`: å†åœ§ç¸®TTL(削除å‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’ロールアップã™ã‚‹ãƒ«ãƒ¼ãƒ«ï¼‰ã§å†åº¦ãƒžãƒ¼ã‚¸ã™ã‚‹ã¾ã§ã®æœ€å°é…延時間(秒)。デフォルト値ã¯14400秒(4時間)ã§ã™ã€‚ + +ã—ãŸãŒã£ã¦ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ã€TTLルールã¯å°‘ãªãã¨ã‚‚4時間ã”ã¨ã«ãƒ†ãƒ¼ãƒ–ルã«é©ç”¨ã•ã‚Œã¾ã™ã€‚より頻ç¹ã«TTLルールをé©ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ä¸Šè¨˜ã®è¨­å®šã‚’変更ã—ã¦ãã ã•ã„。 + +:::note +推奨ã™ã‚‹é »ç¹ãªä½¿ç”¨æ³•ã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€`OPTIMIZE`を使用ã—ã¦ãƒžãƒ¼ã‚¸ã‚’強制ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```sql +OPTIMIZE TABLE example1 FINAL +``` + +`OPTIMIZE`ã¯ãƒ†ãƒ¼ãƒ–ルã®éƒ¨åˆ†ã®äºˆå®šå¤–ã®ãƒžãƒ¼ã‚¸ã‚’åˆæœŸåŒ–ã—ã€`FINAL`ã¯ãƒ†ãƒ¼ãƒ–ルãŒã™ã§ã«å˜ä¸€éƒ¨åˆ†ã«ãªã£ã¦ã„ã‚‹å ´åˆã«å†æœ€é©åŒ–を強制ã—ã¾ã™ã€‚ +::: + +## è¡Œã®å‰Šé™¤ + +一定時間経éŽå¾Œã«ãƒ†ãƒ¼ãƒ–ル全体ã®è¡Œã‚’削除ã™ã‚‹ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルレベルã§TTLルールを定義ã—ã¾ã™ï¼š + +```sql +CREATE TABLE customers ( +timestamp DateTime, +name String, +balance Int32, +address String +) +ENGINE = MergeTree +ORDER BY timestamp +TTL timestamp + INTERVAL 12 HOUR +``` + +ã•ã‚‰ã«ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®å€¤ã«åŸºã¥ãTTLルールを定義ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ +ã“ã‚Œã¯ã€æ¡ä»¶ã‚’指定ã™ã‚‹ã“ã¨ã§ç°¡å˜ã«å®Ÿè£…ã§ãã¾ã™ã€‚ +複数ã®æ¡ä»¶ã‚’許å¯ã—ã¦ã„ã¾ã™ï¼š + +```sql +CREATE TABLE events +( + `event` String, + `time` DateTime, + `value` UInt64 +) +ENGINE = MergeTree +ORDER BY (event, time) +TTL time + INTERVAL 1 MONTH DELETE WHERE event != 'error', + time + INTERVAL 6 MONTH DELETE WHERE event = 'error' +``` + +## カラムã®å‰Šé™¤ + +行全体を削除ã™ã‚‹ä»£ã‚ã‚Šã«ã€balanceã¨addressカラムã ã‘を期é™åˆ‡ã‚Œã«ã—ãŸã„ã¨ã—ã¾ã™ã€‚`customers`テーブルを変更ã—ã€ä¸¡æ–¹ã®ã‚«ãƒ©ãƒ ã«2時間ã®TTLを追加ã—ã¾ã™ï¼š + +```sql +ALTER TABLE customers +MODIFY COLUMN balance Int32 TTL timestamp + INTERVAL 2 HOUR, +MODIFY COLUMN address String TTL timestamp + INTERVAL 2 HOUR +``` + +## ロールアップã®å®Ÿè£… + +特定ã®æœŸé–“経éŽå¾Œã«è¡Œã‚’削除ã—ãŸã„ãŒã€å ±å‘Šç›®çš„ã®ãŸã‚ã«ä¸€éƒ¨ã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿æŒã—ãŸã„å ´åˆã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚ã™ã¹ã¦ã®è©³ç´°ãŒæ¬²ã—ã„ã‚ã‘ã§ã¯ãªãã€å±¥æ­´ãƒ‡ãƒ¼ã‚¿ã®é›†ç´„ã•ã‚ŒãŸçµæžœã‚’å°‘ã—欲ã—ã„ã ã‘ã§ã™ã€‚ã“ã‚Œã¯ã€`TTL`å¼ã«`GROUP BY`å¥ã‚’追加ã—ã€ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã‚’使用ã—ã¦é›†ç´„çµæžœã‚’ä¿å­˜ã™ã‚‹ã“ã¨ã§å®Ÿè£…ã§ãã¾ã™ã€‚ + +以下ã®`hits`テーブルã§ã¯ã€å¤ã„行を削除ã—ã¾ã™ãŒã€å‰Šé™¤ã™ã‚‹å‰ã«`hits`カラムã®åˆè¨ˆã¨æœ€å¤§ã‚’ä¿æŒã—ãŸã„ã¨ã—ã¾ã™ã€‚ãれらã®å€¤ã‚’ä¿å­˜ã™ã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒå¿…è¦ã§ã‚ã‚Šã€ãã‚Œã«åŠ ãˆã¦åˆè¨ˆã¨æœ€å¤§ã‚’ロールアップã™ã‚‹`TTL`å¥ã«`GROUP BY`å¥ã‚’追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +CREATE TABLE hits ( + timestamp DateTime, + id String, + hits Int32, + max_hits Int32 DEFAULT hits, + sum_hits Int64 DEFAULT hits +) +ENGINE = MergeTree +PRIMARY KEY (id, toStartOfDay(timestamp), timestamp) +TTL timestamp + INTERVAL 1 DAY + GROUP BY id, toStartOfDay(timestamp) + SET + max_hits = max(max_hits), + sum_hits = sum(sum_hits); +``` + +`hits`テーブルã«é–¢ã™ã‚‹ã„ãã¤ã‹ã®æ³¨æ„点: + +- `TTL`å¥ã®`GROUP BY`カラムã¯`PRIMARY KEY`ã®ãƒ—レフィックスã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã€çµæžœã‚’日付ã®é–‹å§‹æ™‚点ã§ã‚°ãƒ«ãƒ¼ãƒ—化ã—ãŸã„ã§ã™ã€‚ãã®ãŸã‚ã€`toStartOfDay(timestamp)`ãŒä¸»ã‚­ãƒ¼ã«è¿½åŠ ã•ã‚Œã¾ã—㟠+- 集約çµæžœã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰`max_hits`ã¨`sum_hits`を追加ã—ã¾ã—㟠+- `max_hits`ã¨`sum_hits`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’`hits`ã«è¨­å®šã™ã‚‹ã“ã¨ã¯ã€`SET`å¥ã«åŸºã¥ã„ã¦ã€ãƒ­ã‚¸ãƒƒã‚¯ãŒæ©Ÿèƒ½ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ + +## ホット/ウォーム/コールドアーキテクãƒãƒ£ã®å®Ÿè£… + +:::note +ClickHouse Cloudを使用ã—ã¦ã„ã‚‹å ´åˆã€ã“ã®ãƒ¬ãƒƒã‚¹ãƒ³ã®æ‰‹é †ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。ClickHouse Cloudã§ã¯ã€å¤ã„データを移動ã™ã‚‹ã¨ã„ã£ãŸã“ã¨ã‚’æ°—ã«ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +大é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’扱ã†éš›ã«ä¸€èˆ¬çš„ãªæ‰‹æ³•ã¨ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãŒå¤ããªã‚‹ã«ã¤ã‚Œã¦ãƒ‡ãƒ¼ã‚¿ã‚’移動ã™ã‚‹æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚以下ã¯`TTL`コマンドã®`TO DISK`ã¨`TO VOLUME`å¥ã‚’使用ã—ã¦ã€ClickHouseã§ãƒ›ãƒƒãƒˆ/ウォーム/コールドアーキテクãƒãƒ£ã‚’実装ã™ã‚‹æ‰‹é †ã§ã™ã€‚(ã¡ãªã¿ã«ã€ã“れをホットã¨ã‚³ãƒ¼ãƒ«ãƒ‰ã®ã‚‚ã®ã¨ã™ã‚‹å¿…è¦ã¯ãªãã€ã©ã®ã‚ˆã†ãªãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§ã‚‚データを移動ã™ã‚‹ãŸã‚ã«TTLを使用ã§ãã¾ã™ã€‚) + +1. `TO DISK`ã¨`TO VOLUME`オプションã¯ã€ClickHouseã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã«å®šç¾©ã•ã‚Œã¦ã„るディスクã¾ãŸã¯ãƒœãƒªãƒ¥ãƒ¼ãƒ ã®åå‰ã‚’指ã—ã¾ã™ã€‚ディスクを定義ã™ã‚‹æ–°ã—ã„ファイル`my_system.xml`(ã¾ãŸã¯ä»»æ„ã®ãƒ•ã‚¡ã‚¤ãƒ«å)を作æˆã—ã€ãã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã™ã‚‹ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’定義ã—ã¾ã™ã€‚ã“ã®XMLファイルを`/etc/clickhouse-server/config.d/`ã«é…ç½®ã—ã¦ã€ã‚·ã‚¹ãƒ†ãƒ ã«æ§‹æˆã‚’é©ç”¨ã—ã¾ã™ï¼š + +```xml + + + + + + + ./hot/ + + + ./warm/ + + + ./cold/ + + + + + + + default + + + hot_disk + + + warm_disk + + + cold_disk + + + + + + +``` + +2. 上記ã®è¨­å®šã¯ã€ClickHouseãŒèª­ã¿æ›¸ãã§ãるフォルダを指ã™ä¸‰ã¤ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’指ã—ã¦ã„ã¾ã™ã€‚ボリュームã¯ä¸€ã¤ä»¥ä¸Šã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’å«ã‚€ã“ã¨ãŒã§ãã€ç§ãŸã¡ã¯ä¸‰ã¤ã®ãƒ‡ã‚£ã‚¹ã‚¯ã®ãŸã‚ã«ãã‚Œãžã‚Œã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’定義ã—ã¾ã—ãŸã€‚ディスクを確èªã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT name, path, free_space, total_space +FROM system.disks +``` + +```response +┌─name────────┬─path───────────┬───free_space─┬──total_space─┠+│ cold_disk │ ./data/cold/ │ 179143311360 │ 494384795648 │ +│ default │ ./ │ 179143311360 │ 494384795648 │ +│ hot_disk │ ./data/hot/ │ 179143311360 │ 494384795648 │ +│ warm_disk │ ./data/warm/ │ 179143311360 │ 494384795648 │ +└─────────────┴────────────────┴──────────────┴──────────────┘ +``` + +3. ãã—ã¦â€¦ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’確èªã—ã¾ã—ょã†ï¼š + +```sql +SELECT + volume_name, + disks +FROM system.storage_policies +``` + +```response +┌─volume_name─┬─disks─────────┠+│ default │ ['default'] │ +│ hot_volume │ ['hot_disk'] │ +│ warm_volume │ ['warm_disk'] │ +│ cold_volume │ ['cold_disk'] │ +└─────────────┴───────────────┘ +``` + +4. ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’ホットã€ã‚¦ã‚©ãƒ¼ãƒ ã€ãã—ã¦ã‚³ãƒ¼ãƒ«ãƒ‰ãƒœãƒªãƒ¥ãƒ¼ãƒ é–“ã§ç§»å‹•ã™ã‚‹`TTL`ルールを追加ã—ã¾ã™ï¼š + +```sql +ALTER TABLE my_table + MODIFY TTL + trade_date TO VOLUME 'hot_volume', + trade_date + INTERVAL 2 YEAR TO VOLUME 'warm_volume', + trade_date + INTERVAL 4 YEAR TO VOLUME 'cold_volume'; +``` + +5. æ–°ã—ã„`TTL`ルールã¯æ料化ã•ã‚Œã‚‹ã¯ãšã§ã™ãŒã€ç¢ºèªã®ãŸã‚ã«å¼·åˆ¶ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```sql +ALTER TABLE my_table + MATERIALIZE TTL +``` + +6. `system.parts`テーブルを使ã£ã¦ã€ãƒ‡ãƒ¼ã‚¿ãŒæœŸå¾…通りã®ãƒ‡ã‚£ã‚¹ã‚¯ã«ç§»å‹•ã—ãŸã‹ã‚’確èªã—ã¦ãã ã•ã„: + +```sql +Using the system.parts table, view which disks the parts are on for the crypto_prices table: + +SELECT + name, + disk_name +FROM system.parts +WHERE (table = 'my_table') AND (active = 1) +``` + +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```response +┌─name────────┬─disk_name─┠+│ all_1_3_1_5 │ warm_disk │ +│ all_2_2_0 │ hot_disk │ +└─────────────┴───────────┘ +``` + +## 関連コンテンツ + +- ブログ&ウェビナー: [Using TTL to Manage Data Lifecycles in ClickHouse](https://clickhouse.com/blog/using-ttl-to-manage-data-lifecycles-in-clickhouse) diff --git a/docs/ja/guides/developer/understanding-query-execution-with-the-analyzer.md b/docs/ja/guides/developer/understanding-query-execution-with-the-analyzer.md new file mode 100644 index 00000000000..17f09ccff83 --- /dev/null +++ b/docs/ja/guides/developer/understanding-query-execution-with-the-analyzer.md @@ -0,0 +1,436 @@ +--- +slug: /ja/guides/developer/understanding-query-execution-with-the-analyzer +sidebar_label: アナライザーã§ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚’ç†è§£ã™ã‚‹ +title: アナライザーã§ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚’ç†è§£ã™ã‚‹ +--- + +# アナライザーã§ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚’ç†è§£ã™ã‚‹ + +ClickHouseã¯ã‚¯ã‚¨ãƒªã‚’éžå¸¸ã«è¿…速ã«å‡¦ç†ã—ã¾ã™ãŒã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã¯å˜ç´”ã§ã¯ã‚ã‚Šã¾ã›ã‚“。`SELECT`クエリãŒã©ã®ã‚ˆã†ã«å®Ÿè¡Œã•ã‚Œã‚‹ã‹ã‚’ç†è§£ã—ã¦ã¿ã¾ã—ょã†ã€‚ã“れを説明ã™ã‚‹ãŸã‚ã«ã€ClickHouseã«ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã—ã¾ã™ã€‚ + +```sql +CREATE TABLE session_events( + clientId UUID, + sessionId UUID, + pageId UUID, + timestamp DateTime, + type String +) ORDER BY (timestamp); + +INSERT INTO session_events SELECT * FROM generateRandom('clientId UUID, + sessionId UUID, + pageId UUID, + timestamp DateTime, + type Enum(\'type1\', \'type2\')', 1, 10, 2) LIMIT 1000; +``` + +ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã—ãŸã®ã§ã€ã‚¯ã‚¨ãƒªã‚’実行ã—ã¦ãã®å®Ÿè¡Œã‚’ç†è§£ã—ãŸã„ã¨æ€ã„ã¾ã™ã€‚クエリã®å®Ÿè¡Œã¯å¤šãã®ã‚¹ãƒ†ãƒƒãƒ—ã«åˆ†è§£ã•ã‚Œã¾ã™ã€‚クエリ実行ã®å„ステップã¯ã€å¯¾å¿œã™ã‚‹`EXPLAIN`クエリを使用ã—ã¦åˆ†æžãŠã‚ˆã³ãƒˆãƒ©ãƒ–ルシューティングを行ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ä»¥ä¸‹ã®ãƒãƒ£ãƒ¼ãƒˆã«ã¾ã¨ã‚られã¦ã„ã¾ã™ã€‚ + +![Explain query steps](./images/analyzer1.png) + +クエリ実行中ã®å„エンティティã®å‹•ä½œã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ã„ãã¤ã‹ã®ã‚¯ã‚¨ãƒªã‚’å–り上ã’ã€`EXPLAIN`ステートメントを使用ã—ã¦ãれらを調ã¹ã¾ã™ã€‚ + +## パーサー + +パーサーã®ç›®çš„ã¯ã‚¯ã‚¨ãƒªãƒ†ã‚­ã‚¹ãƒˆã‚’AST(抽象構文木)ã«å¤‰æ›ã™ã‚‹ã“ã¨ã§ã™ã€‚ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯`EXPLAIN AST`を使用ã—ã¦è¦–覚化ã§ãã¾ã™ã€‚ + +```sql +EXPLAIN AST SELECT min(timestamp), max(timestamp) FROM session_events; + +┌─explain────────────────────────────────────────────┠+│ SelectWithUnionQuery (children 1) │ +│ ExpressionList (children 1) │ +│ SelectQuery (children 2) │ +│ ExpressionList (children 2) │ +│ Function min (alias minimum_date) (children 1) │ +│ ExpressionList (children 1) │ +│ Identifier timestamp │ +│ Function max (alias maximum_date) (children 1) │ +│ ExpressionList (children 1) │ +│ Identifier timestamp │ +│ TablesInSelectQuery (children 1) │ +│ TablesInSelectQueryElement (children 1) │ +│ TableExpression (children 1) │ +│ TableIdentifier session_events │ +└────────────────────────────────────────────────────┘ +``` + +出力ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«è¦–覚化ã•ã‚Œã‚‹æŠ½è±¡æ§‹æ–‡æœ¨ã§ã™ã€‚ + +![AST output](./images/analyzer2.png) + +å„ノードã«ã¯å¯¾å¿œã™ã‚‹å­ãƒŽãƒ¼ãƒ‰ãŒã‚ã‚Šã€å…¨ä½“ã®æœ¨æ§‹é€ ã¯ã‚¯ã‚¨ãƒªã®å…¨ä½“構造を表ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¯ã‚¨ãƒªå‡¦ç†ã‚’助ã‘ã‚‹è«–ç†æ§‹é€ ã§ã™ã€‚エンドユーザーã®è¦³ç‚¹ã§ã¯ï¼ˆã‚¯ã‚¨ãƒªå®Ÿè¡Œã«èˆˆå‘³ãŒãªã„é™ã‚Šï¼‰ãã‚Œã»ã©å½¹ã«ç«‹ã¡ã¾ã›ã‚“ãŒã€ã“ã®ãƒ„ールã¯ä¸»ã«é–‹ç™ºè€…ã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## アナライザー + + + +ClickHouseã«ã¯ç¾åœ¨ã€ã‚¢ãƒŠãƒ©ã‚¤ã‚¶ãƒ¼ã®ãŸã‚ã®2ã¤ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãŒã‚ã‚Šã¾ã™ã€‚å¤ã„アーキテクãƒãƒ£ã‚’使用ã™ã‚‹ã«ã¯ã€`allow_experimental_analyzer=0`を設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚æ–°ã—ã„アーキテクãƒãƒ£ã‚’使用ã—ãŸã„å ´åˆã¯ã€`allow_experimental_analyzer=1`を設定ã—ã¦ãã ã•ã„。新ã—ã„アナライザーãŒä¸€èˆ¬çš„ã«åˆ©ç”¨å¯èƒ½ã«ãªã£ãŸã‚‰å¤ã„ã‚‚ã®ã¯å»ƒæ­¢ã•ã‚Œã‚‹ãŸã‚ã€ã“ã“ã§ã¯æ–°ã—ã„アーキテクãƒãƒ£ã®ã¿ã‚’説明ã—ã¾ã™ã€‚ + +:::note +æ–°ã—ã„アナライザーã¯ãƒ™ãƒ¼ã‚¿ç‰ˆã§ã™ã€‚æ–°ã—ã„アーキテクãƒãƒ£ã¯ClickHouseã®æ€§èƒ½å‘上ã«å½¹ç«‹ã¤ã¯ãšã§ã™ãŒã€ã‚¯ã‚¨ãƒªå‡¦ç†ã‚¹ãƒ†ãƒƒãƒ—ã®åŸºæœ¬è¦ç´ ã§ã‚ã‚‹ãŸã‚ã€ã„ãã¤ã‹ã®ã‚¯ã‚¨ãƒªã«æ‚ªå½±éŸ¿ã‚’åŠã¼ã™å¯èƒ½æ€§ã‚‚ã‚ã‚Šã¾ã™ã€‚æ–°ã—ã„アナライザーã«ç§»è¡Œã—ãŸå¾Œã€æ€§èƒ½ã®ä½Žä¸‹ã€ã‚¯ã‚¨ãƒªã®å¤±æ•—ã€ã¾ãŸã¯äºˆæœŸã—ãªã„çµæžœã‚’ã‚‚ãŸã‚‰ã™ã‚¯ã‚¨ãƒªãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚クエリã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ¬ãƒ™ãƒ«ã§`allow_experimental_analyzer`設定を変更ã™ã‚‹ã“ã¨ã§ã€å¤ã„アナライザーã«æˆ»ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã‚らゆるå•é¡Œã‚’GitHubã«ã¦å ±å‘Šã—ã¦ãã ã•ã„。 +::: + +アナライザーã¯ã‚¯ã‚¨ãƒªå®Ÿè¡Œã®é‡è¦ãªã‚¹ãƒ†ãƒƒãƒ—ã§ã™ã€‚ASTã‚’å–å¾—ã—ã¦ã‚¯ã‚¨ãƒªãƒ„リーã«å¤‰æ›ã—ã¾ã™ã€‚クエリツリーã®ä¸»ãªåˆ©ç‚¹ã¯ã€å¤šãã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒè§£æ±ºã•ã‚Œã‚‹ã“ã¨ã§ã™ã€‚例ãˆã°ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚„ã€ã©ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã‚€ã®ã‹ãŒã‚ã‹ã‚Šã¾ã™ã€‚別åも解決ã•ã‚Œã€ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ã“れらã™ã¹ã¦ã®åˆ©ç‚¹ã‹ã‚‰ã€ã‚¢ãƒŠãƒ©ã‚¤ã‚¶ãƒ¼ã¯æœ€é©åŒ–ã‚’é©ç”¨ã§ãã¾ã™ã€‚ã“れらã®æœ€é©åŒ–ã¯ã€Œãƒ‘スã€ã‚’通ã˜ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚å„パスã¯ç•°ãªã‚‹æœ€é©åŒ–を探ã—ã¾ã™ã€‚パスã®ä¸€è¦§ã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/ClickHouse/blob/76578ebf92af3be917cd2e0e17fea2965716d958/src/Analyzer/QueryTreePassManager.cpp#L249)ã«ã‚ã‚Šã¾ã™ã€‚以å‰ã®ã‚¯ã‚¨ãƒªã§å®Ÿéš›ã«ç¢ºèªã—ã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +EXPLAIN QUERY TREE passes=0 SELECT min(timestamp) AS minimum_date, max(timestamp) AS maximum_date FROM session_events SETTINGS allow_experimental_analyzer=1; + +┌─explain────────────────────────────────────────────────────────────────────────────────┠+│ QUERY id: 0 │ +│ PROJECTION │ +│ LIST id: 1, nodes: 2 │ +│ FUNCTION id: 2, alias: minimum_date, function_name: min, function_type: ordinary │ +│ ARGUMENTS │ +│ LIST id: 3, nodes: 1 │ +│ IDENTIFIER id: 4, identifier: timestamp │ +│ FUNCTION id: 5, alias: maximum_date, function_name: max, function_type: ordinary │ +│ ARGUMENTS │ +│ LIST id: 6, nodes: 1 │ +│ IDENTIFIER id: 7, identifier: timestamp │ +│ JOIN TREE │ +│ IDENTIFIER id: 8, identifier: session_events │ +│ SETTINGS allow_experimental_analyzer=1 │ +└────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +```sql +EXPLAIN QUERY TREE passes=20 SELECT min(timestamp) AS minimum_date, max(timestamp) AS maximum_date FROM session_events SETTINGS allow_experimental_analyzer=1; + +┌─explain───────────────────────────────────────────────────────────────────────────────────┠+│ QUERY id: 0 │ +│ PROJECTION COLUMNS │ +│ minimum_date DateTime │ +│ maximum_date DateTime │ +│ PROJECTION │ +│ LIST id: 1, nodes: 2 │ +│ FUNCTION id: 2, function_name: min, function_type: aggregate, result_type: DateTime │ +│ ARGUMENTS │ +│ LIST id: 3, nodes: 1 │ +│ COLUMN id: 4, column_name: timestamp, result_type: DateTime, source_id: 5 │ +│ FUNCTION id: 6, function_name: max, function_type: aggregate, result_type: DateTime │ +│ ARGUMENTS │ +│ LIST id: 7, nodes: 1 │ +│ COLUMN id: 4, column_name: timestamp, result_type: DateTime, source_id: 5 │ +│ JOIN TREE │ +│ TABLE id: 5, alias: __table1, table_name: default.session_events │ +│ SETTINGS allow_experimental_analyzer=1 │ +└───────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +2ã¤ã®å®Ÿè¡Œã®é–“ã«ã€åˆ¥åやプロジェクションã®è§£æ±ºã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚ + +## プランナー + +プランナーã¯ã‚¯ã‚¨ãƒªãƒ„リーをå–ã‚Šã€ãã‚Œã«åŸºã¥ã„ã¦ã‚¯ã‚¨ãƒªãƒ—ランを構築ã—ã¾ã™ã€‚クエリツリーã¯ç‰¹å®šã®ã‚¯ã‚¨ãƒªã§ä½•ã‚’ã—ãŸã„ã‹ã‚’示ã—ã€ã‚¯ã‚¨ãƒªãƒ—ランã¯ãれをã©ã®ã‚ˆã†ã«è¡Œã†ã‹ã‚’示ã—ã¾ã™ã€‚追加ã®æœ€é©åŒ–ãŒã‚¯ã‚¨ãƒªãƒ—ランã®ä¸€éƒ¨ã¨ã—ã¦è¡Œã‚ã‚Œã¾ã™ã€‚`EXPLAIN PLAN`ã¾ãŸã¯`EXPLAIN`を使用ã—ã¦ã‚¯ã‚¨ãƒªãƒ—ランを見るã“ã¨ãŒã§ãã¾ã™ï¼ˆ`EXPLAIN`ã¯`EXPLAIN PLAN`を実行ã—ã¾ã™ï¼‰ã€‚ + +```sql +EXPLAIN PLAN WITH + ( + SELECT count(*) + FROM session_events + ) AS total_rows +SELECT type, min(timestamp) AS minimum_date, max(timestamp) AS maximum_date, count(*) /total_rows * 100 AS percentage FROM session_events GROUP BY type + +┌─explain──────────────────────────────────────────┠+│ Expression ((Projection + Before ORDER BY)) │ +│ Aggregating │ +│ Expression (Before GROUP BY) │ +│ ReadFromMergeTree (default.session_events) │ +└──────────────────────────────────────────────────┘ +``` + +ã“ã‚ŒãŒç§ãŸã¡ã«ã„ãã¤ã‹ã®æƒ…報をæä¾›ã—ã¦ã„ã¾ã™ãŒã€ã•ã‚‰ã«å¤šãã®æƒ…報を得るã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ—ロジェクションを行ã†å¿…è¦ãŒã‚るカラムã®åå‰ã‚’知りãŸã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ãã®å ´åˆã€ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’クエリã«è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +``` +EXPLAIN header = 1 +WITH ( + SELECT count(*) + FROM session_events + ) AS total_rows +SELECT + type, + min(timestamp) AS minimum_date, + max(timestamp) AS maximum_date, + (count(*) / total_rows) * 100 AS percentage +FROM session_events +GROUP BY type + +┌─explain──────────────────────────────────────────┠+│ Expression ((Projection + Before ORDER BY)) │ +│ Header: type String │ +│ minimum_date DateTime │ +│ maximum_date DateTime │ +│ percentage Nullable(Float64) │ +│ Aggregating │ +│ Header: type String │ +│ min(timestamp) DateTime │ +│ max(timestamp) DateTime │ +│ count() UInt64 │ +│ Expression (Before GROUP BY) │ +│ Header: timestamp DateTime │ +│ type String │ +│ ReadFromMergeTree (default.session_events) │ +│ Header: timestamp DateTime │ +│ type String │ +└──────────────────────────────────────────────────┘ +``` + +ã“ã‚Œã§æœ€å¾Œã®ãƒ—ロジェクションã®ãŸã‚ã«ä½œæˆã™ã‚‹å¿…è¦ãŒã‚るカラムå(`minimum_date`ã€`maximum_date`ã€ãŠã‚ˆã³`percentage`)を知るã“ã¨ãŒã§ãã¾ã™ãŒã€å®Ÿè¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã™ã¹ã¦ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®è©³ç´°ã‚‚知りãŸã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯`actions=1`を設定ã™ã‚‹ã“ã¨ã§è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +EXPLAIN actions = 1 +WITH ( + SELECT count(*) + FROM session_events + ) AS total_rows +SELECT + type, + min(timestamp) AS minimum_date, + max(timestamp) AS maximum_date, + (count(*) / total_rows) * 100 AS percentage +FROM session_events +GROUP BY type + + +┌─explain────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ Expression ((Projection + Before ORDER BY)) │ +│ Actions: INPUT :: 0 -> type String : 0 │ +│ INPUT : 1 -> min(timestamp) DateTime : 1 │ +│ INPUT : 2 -> max(timestamp) DateTime : 2 │ +│ INPUT : 3 -> count() UInt64 : 3 │ +│ COLUMN Const(Nullable(UInt64)) -> total_rows Nullable(UInt64) : 4 │ +│ COLUMN Const(UInt8) -> 100 UInt8 : 5 │ +│ ALIAS min(timestamp) :: 1 -> minimum_date DateTime : 6 │ +│ ALIAS max(timestamp) :: 2 -> maximum_date DateTime : 1 │ +│ FUNCTION divide(count() :: 3, total_rows :: 4) -> divide(count(), total_rows) Nullable(Float64) : 2 │ +│ FUNCTION multiply(divide(count(), total_rows) :: 2, 100 :: 5) -> multiply(divide(count(), total_rows), 100) Nullable(Float64) : 4 │ +│ ALIAS multiply(divide(count(), total_rows), 100) :: 4 -> percentage Nullable(Float64) : 5 │ +│ Positions: 0 6 1 5 │ +│ Aggregating │ +│ Keys: type │ +│ Aggregates: │ +│ min(timestamp) │ +│ Function: min(DateTime) → DateTime │ +│ Arguments: timestamp │ +│ max(timestamp) │ +│ Function: max(DateTime) → DateTime │ +│ Arguments: timestamp │ +│ count() │ +│ Function: count() → UInt64 │ +│ Arguments: none │ +│ Skip merging: 0 │ +│ Expression (Before GROUP BY) │ +│ Actions: INPUT :: 0 -> timestamp DateTime : 0 │ +│ INPUT :: 1 -> type String : 1 │ +│ Positions: 0 1 │ +│ ReadFromMergeTree (default.session_events) │ +│ ReadType: Default │ +│ Parts: 1 │ +│ Granules: 1 │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +ã“ã‚Œã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®å…¥åŠ›ã€é–¢æ•°ã€ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€ãƒ‡ãƒ¼ã‚¿åž‹ã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚プランナーãŒé©ç”¨ã™ã‚‹ã„ãã¤ã‹ã®æœ€é©åŒ–ã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/ClickHouse/blob/master/src/Processors/QueryPlan/Optimizations/Optimizations.h)ã«è¦‹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## クエリパイプライン + +クエリパイプラインã¯ã‚¯ã‚¨ãƒªãƒ—ランã‹ã‚‰ç”Ÿæˆã•ã‚Œã¾ã™ã€‚クエリパイプラインã¯ã‚¯ã‚¨ãƒªãƒ—ランã«éžå¸¸ã«ä¼¼ã¦ã„ã¾ã™ãŒã€ãã‚ŒãŒæœ¨ã§ã¯ãªãグラフã§ã‚ã‚‹ã¨ã„ã†ç‚¹ãŒç•°ãªã‚Šã¾ã™ã€‚ClickHouseãŒã©ã®ã‚ˆã†ã«ã‚¯ã‚¨ãƒªã‚’実行ã—ã€ã©ã®ãƒªã‚½ãƒ¼ã‚¹ãŒä½¿ç”¨ã•ã‚Œã‚‹ã‹ã‚’強調表示ã—ã¾ã™ã€‚クエリパイプラインを分æžã™ã‚‹ã“ã¨ã¯ã€å…¥åŠ›/出力ã«é–¢ã™ã‚‹ãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã‚’確èªã™ã‚‹ã®ã«éžå¸¸ã«å½¹ç«‹ã¡ã¾ã™ã€‚以å‰ã®ã‚¯ã‚¨ãƒªã‚’å–り上ã’ã€ã‚¯ã‚¨ãƒªãƒ‘イプラインã®å®Ÿè¡Œã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +EXPLAIN PIPELINE +WITH ( + SELECT count(*) + FROM session_events + ) AS total_rows +SELECT + type, + min(timestamp) AS minimum_date, + max(timestamp) AS maximum_date, + (count(*) / total_rows) * 100 AS percentage +FROM session_events +GROUP BY type; + +┌─explain────────────────────────────────────────────────────────────────────┠+│ (Expression) │ +│ ExpressionTransform × 2 │ +│ (Aggregating) │ +│ Resize 1 → 2 │ +│ AggregatingTransform │ +│ (Expression) │ +│ ExpressionTransform │ +│ (ReadFromMergeTree) │ +│ MergeTreeSelect(pool: PrefetchedReadPool, algorithm: Thread) 0 → 1 │ +└────────────────────────────────────────────────────────────────────────────┘ +``` + +括弧内ã¯ã‚¯ã‚¨ãƒªãƒ—ランステップã§ã‚ã‚Šã€ãã‚Œã«ç¶šãã®ã¯ãƒ—ロセッサーã§ã™ã€‚ã“ã‚Œã¯ç´ æ™´ã‚‰ã—ã„情報ã§ã™ãŒã€ã“ã‚Œã¯ã‚°ãƒ©ãƒ•ã§ã‚ã‚‹ãŸã‚ã€ãã®ã‚ˆã†ã«è¦–覚化ã§ãã‚‹ã¨è‰¯ã„ã§ã—ょã†ã€‚設定`graph`ã‚’1ã«è¨­å®šã—ã€å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’TSVã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +EXPLAIN PIPELINE graph=1 WITH + ( + SELECT count(*) + FROM session_events + ) AS total_rows +SELECT type, min(timestamp) AS minimum_date, max(timestamp) AS maximum_date, count(*) /total_rows * 100 AS percentage FROM session_events GROUP BY type FORMAT TSV; +``` + +``` +digraph +{ + rankdir="LR"; + { node [shape = rect] + subgraph cluster_0 { + label ="Expression"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n5 [label="ExpressionTransform × 2"]; + } + } + subgraph cluster_1 { + label ="Aggregating"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n3 [label="AggregatingTransform"]; + n4 [label="Resize"]; + } + } + subgraph cluster_2 { + label ="Expression"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n2 [label="ExpressionTransform"]; + } + } + subgraph cluster_3 { + label ="ReadFromMergeTree"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n1 [label="MergeTreeSelect(pool: PrefetchedReadPool, algorithm: Thread)"]; + } + } + } + n3 -> n4 [label=""]; + n4 -> n5 [label="× 2"]; + n2 -> n3 [label=""]; + n1 -> n2 [label=""]; +} +``` + +ã“ã®å‡ºåŠ›ã‚’コピーã—ã€[ã“ã“](https://dreampuf.github.io/GraphvizOnline)ã«è²¼ã‚Šä»˜ã‘ã‚‹ã¨ã€æ¬¡ã®ã‚°ãƒ©ãƒ•ãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +![Graph output](./images/analyzer3.png) + +白ã„矩形ã¯ãƒ‘イプラインノードã«å¯¾å¿œã—ã€ç°è‰²ã®çŸ©å½¢ã¯ã‚¯ã‚¨ãƒªãƒ—ランステップã«å¯¾å¿œã—ã¾ã™ã€‚æ•°å­—ã®å¾Œã«`x`ãŒä»˜ãã®ã¯ã€ä½¿ç”¨ã•ã‚Œã¦ã„る入力/出力ã®æ•°ã‚’示ã—ã¦ã„ã¾ã™ã€‚コンパクト形å¼ã§è¦‹ãŸããªã„å ´åˆã¯ã€`compact=0`を追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +EXPLAIN PIPELINE graph = 1, compact = 0 +WITH ( + SELECT count(*) + FROM session_events + ) AS total_rows +SELECT + type, + min(timestamp) AS minimum_date, + max(timestamp) AS maximum_date, + (count(*) / total_rows) * 100 AS percentage +FROM session_events +GROUP BY type +FORMAT TSV +``` + +``` +digraph +{ + rankdir="LR"; + { node [shape = rect] + n0[label="MergeTreeSelect(pool: PrefetchedReadPool, algorithm: Thread)"]; + n1[label="ExpressionTransform"]; + n2[label="AggregatingTransform"]; + n3[label="Resize"]; + n4[label="ExpressionTransform"]; + n5[label="ExpressionTransform"]; + } + n0 -> n1; + n1 -> n2; + n2 -> n3; + n3 -> n4; + n3 -> n5; +} +``` + +![Compact graph output](./images/analyzer4.png) + +ãªãœClickHouseã¯è¤‡æ•°ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–ã‚Šã‚’è¡Œã‚ãªã„ã®ã§ã—ょã†ã‹ï¼Ÿãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã—ã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +INSERT INTO session_events SELECT * FROM generateRandom('clientId UUID, + sessionId UUID, + pageId UUID, + timestamp DateTime, + type Enum(\'type1\', \'type2\')', 1, 10, 2) LIMIT 1000000; +``` + +次ã«ã€å†åº¦`EXPLAIN`クエリを実行ã—ã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +EXPLAIN PIPELINE graph = 1, compact = 0 +WITH ( + SELECT count(*) + FROM session_events + ) AS total_rows +SELECT + type, + min(timestamp) AS minimum_date, + max(timestamp) AS maximum_date, + (count(*) / total_rows) * 100 AS percentage +FROM session_events +GROUP BY type +FORMAT TSV +``` + +``` +digraph +{ + rankdir="LR"; + { node [shape = rect] + n0[label="MergeTreeSelect(pool: PrefetchedReadPool, algorithm: Thread)"]; + n1[label="MergeTreeSelect(pool: PrefetchedReadPool, algorithm: Thread)"]; + n2[label="ExpressionTransform"]; + n3[label="ExpressionTransform"]; + n4[label="StrictResize"]; + n5[label="AggregatingTransform"]; + n6[label="AggregatingTransform"]; + n7[label="Resize"]; + n8[label="ExpressionTransform"]; + n9[label="ExpressionTransform"]; + } + n0 -> n2; + n1 -> n3; + n2 -> n4; + n3 -> n4; + n4 -> n5; + n4 -> n6; + n5 -> n7; + n6 -> n7; + n7 -> n8; + n7 -> n9; +} +``` + +![Parallel graph](./images/analyzer5.png) + +ã—ãŸãŒã£ã¦ã€ã‚¨ã‚°ã‚¼ã‚­ãƒ¥ãƒ¼ã‚¿ãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿é‡ãŒå分ã§ãªã„ãŸã‚ã€æ“作を並列化ã—ãªã„ã“ã¨ã‚’決定ã—ã¾ã—ãŸã€‚より多ãã®è¡Œã‚’追加ã™ã‚‹ã¨ã€ã‚¨ã‚°ã‚¼ã‚­ãƒ¥ãƒ¼ã‚¿ãƒ¼ã¯ã‚°ãƒ©ãƒ•ã«ç¤ºã•ã‚Œã‚‹ã‚ˆã†ã«è¤‡æ•°ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’使用ã™ã‚‹ã“ã¨ã‚’決定ã—ã¾ã—ãŸã€‚ + +## エグゼキューター + +クエリ実行ã®æœ€å¾Œã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ã‚¨ã‚°ã‚¼ã‚­ãƒ¥ãƒ¼ã‚¿ãƒ¼ã«ã‚ˆã£ã¦è¡Œã‚ã‚Œã¾ã™ã€‚クエリパイプラインをå–ã‚Šã€ãれを実行ã—ã¾ã™ã€‚`SELECT`ã€`INSERT`ã€ã¾ãŸã¯`INSERT SELECT`ã‚’è¡Œã†ã‹ã«å¿œã˜ã¦ã€ç•°ãªã‚‹ã‚¨ã‚°ã‚¼ã‚­ãƒ¥ãƒ¼ã‚¿ãƒ¼ãŒã‚ã‚Šã¾ã™ã€‚ +``` diff --git a/docs/ja/guides/images/joins-1.png b/docs/ja/guides/images/joins-1.png new file mode 100644 index 00000000000..2888262493f Binary files /dev/null and b/docs/ja/guides/images/joins-1.png differ diff --git a/docs/ja/guides/images/joins-2.png b/docs/ja/guides/images/joins-2.png new file mode 100644 index 00000000000..26bd293170c Binary files /dev/null and b/docs/ja/guides/images/joins-2.png differ diff --git a/docs/ja/guides/images/joins-3.png b/docs/ja/guides/images/joins-3.png new file mode 100644 index 00000000000..8b62fa42897 Binary files /dev/null and b/docs/ja/guides/images/joins-3.png differ diff --git a/docs/ja/guides/images/joins-4.png b/docs/ja/guides/images/joins-4.png new file mode 100644 index 00000000000..121f412384f Binary files /dev/null and b/docs/ja/guides/images/joins-4.png differ diff --git a/docs/ja/guides/images/joins-5.png b/docs/ja/guides/images/joins-5.png new file mode 100644 index 00000000000..8e2fe2df3ab Binary files /dev/null and b/docs/ja/guides/images/joins-5.png differ diff --git a/docs/ja/guides/images/postgres-inserts.png b/docs/ja/guides/images/postgres-inserts.png new file mode 100644 index 00000000000..0b4032adfb9 Binary files /dev/null and b/docs/ja/guides/images/postgres-inserts.png differ diff --git a/docs/ja/guides/images/s3_bucket_example.png b/docs/ja/guides/images/s3_bucket_example.png new file mode 100644 index 00000000000..9c6d5c4355c Binary files /dev/null and b/docs/ja/guides/images/s3_bucket_example.png differ diff --git a/docs/ja/guides/inserting-data.md b/docs/ja/guides/inserting-data.md new file mode 100644 index 00000000000..03bbcc997be --- /dev/null +++ b/docs/ja/guides/inserting-data.md @@ -0,0 +1,77 @@ +--- +title: データã®æŒ¿å…¥ +description: ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥æ–¹æ³• +keywords: [挿入, データ挿入, テーブルã¸ã®æŒ¿å…¥] +--- + +## 基本的ãªä¾‹ + +ClickHouseã§ãŠãªã˜ã¿ã® `INSERT INTO TABLE` コマンドを使用ã§ãã¾ã™: + +```sql +INSERT INTO helloworld.my_first_table (user_id, message, timestamp, metric) VALUES + (101, 'Hello, ClickHouse!', now(), -1.0 ), + (102, 'Insert a lot of rows per batch', yesterday(), 1.41421 ), + (102, 'Sort your data based on your commonly-used queries', today(), 2.718 ), + (101, 'Granules are the smallest chunks of data read', now() + 5, 3.14159 ) +``` + +動作を確èªã—ã¦ã¿ã¾ã—ょã†ã€‚挿入ã•ã‚ŒãŸ4è¡Œã®ãƒ‡ãƒ¼ã‚¿ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™: + +```sql +SELECT * FROM helloworld.my_first_table +``` + +## ClickHouseã¸ã®æŒ¿å…¥ã¨OLTPデータベースã¨ã®æ¯”較 + +OLAPデータベースã¨ã—ã¦ã€ClickHouseã¯é«˜æ€§èƒ½ã¨ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティã«æœ€é©åŒ–ã•ã‚Œã¦ãŠã‚Šã€æ¯Žç§’何百万行もã®æŒ¿å…¥ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€é«˜åº¦ã«ä¸¦åˆ—化ã•ã‚ŒãŸã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã€åˆ—指å‘ã«ã‚ˆã‚‹é«˜åœ§ç¸®ã‚’組ã¿åˆã‚ã›ã‚‹ã“ã¨ã§å®Ÿç¾ã•ã‚Œã¾ã™ãŒã€ä¸€è²«æ€§ã«ã¯å¦¥å”ãŒã‚ã‚Šã¾ã™ã€‚具体的ã«ã¯ã€ClickHouseã¯è¿½è¨˜å°‚用æ“作ã«æœ€é©åŒ–ã•ã‚Œã¦ãŠã‚Šã€æœ€çµ‚çš„ãªæ•´åˆæ€§ã®ä¿è¨¼ã®ã¿ã‚’æä¾›ã—ã¾ã™ã€‚ + +ã“ã‚Œã«å¯¾ã—ã€Postgresã®ã‚ˆã†ãªOLTPデータベースã¯ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³æŒ¿å…¥ã«æœ€é©åŒ–ã•ã‚Œã€å®Œå…¨ãªACID準拠をæŒã¡ã€å¼·ã„一貫性ã¨ä¿¡é ¼æ€§ã®ä¿è¨¼ã‚’æä¾›ã—ã¾ã™ã€‚PostgreSQLã¯MVCC(Multi-Version Concurrency Control)を使用ã—ã¦åŒæ™‚トランザクションを処ç†ã—ã€è¤‡æ•°ã®ãƒ‡ãƒ¼ã‚¿ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’維æŒã—ã¾ã™ã€‚ã“れらã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€æ™‚間内ã«å°‘æ•°ã®è¡Œã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€æŒ¿å…¥ãƒ‘フォーマンスを制é™ã™ã‚‹ä¿¡é ¼æ€§ä¿è¨¼ã«ã‚ˆã‚‹ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +ClickHouseã¸ã®é«˜ã„挿入パフォーマンスをé”æˆã™ã‚‹ãŸã‚ã«ã€å¼·ã„一貫性ã®ä¿è¨¼ã‚’å¾—ã‚‹å ´åˆã€ä»¥ä¸‹ã«èª¬æ˜Žã™ã‚‹ã‚·ãƒ³ãƒ—ルãªãƒ«ãƒ¼ãƒ«ã«å¾“ã†å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ClickHouseã‚’åˆã‚ã¦ä½¿ç”¨ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒOLTP挿入戦略をå†ç¾ã™ã‚‹éš›ã«ä¸€èˆ¬çš„ã«é­é‡ã™ã‚‹å•é¡Œã‚’回é¿ã§ãã¾ã™ã€‚ + +## 挿入時ã®ãƒ™ã‚¹ãƒˆãƒ—ラクティス + +- **大ããªãƒãƒƒãƒã‚µã‚¤ã‚º** - デフォルトã§ã¯ã€ClickHouseã«é€ä¿¡ã•ã‚Œã‚‹å„挿入ã¯ã€æŒ¿å…¥ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã¨å…±ã«ä¿å­˜ã™ã‚‹å¿…è¦ã®ã‚ã‚‹ä»–ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ãƒ‘ートをå³åº§ã«ä½œæˆã™ã‚‹ãŸã‚ã€ã‚ˆã‚Šå¤šãã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€å°ã•ãªæ•°ã®æŒ¿å…¥ã‚’é€ä¿¡ã™ã‚‹ã“ã¨ã¯ã€ã‚ˆã‚Šå°‘ãªã„データをå«ã‚€å¤šé‡ã®æŒ¿å…¥ã‚’é€ä¿¡ã™ã‚‹ã“ã¨ã«æ¯”ã¹ã¦å¿…è¦ãªæ›¸ãè¾¼ã¿ã®æ•°ã‚’減らã—ã¾ã™ã€‚基本的ã«ã¯ã€1,000行以上ã€ç†æƒ³çš„ã«ã¯10,000〜100,000è¡Œã®ã‹ãªã‚Šå¤§ããªãƒãƒƒãƒã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](https://clickhouse.com/blog/asynchronous-data-inserts-in-clickhouse#data-needs-to-be-batched-for-optimal-performance)。大ããªãƒãƒƒãƒãŒä¸å¯èƒ½ãªå ´åˆã¯ã€ä»¥ä¸‹ã§èª¬æ˜Žã™ã‚‹éžåŒæœŸæŒ¿å…¥ã‚’使用ã—ã¦ãã ã•ã„。 + +- **å†è©¦è¡Œã®ãŸã‚ã®ä¸€è²«ã—ãŸãƒãƒƒãƒã‚’確ä¿ã—ã¦å†ªç­‰æ€§ã‚’æ‹…ä¿ã™ã‚‹å†è©¦è¡Œ** - デフォルトã§ã¯ã€ClickHouseã¸ã®æŒ¿å…¥ã¯åŒæœŸçš„ã§ã‚ã‚Šã€åŒä¸€ã®å ´åˆã®ã¿å†ªç­‰æ€§ãŒã‚ã‚Šã¾ã™ã€‚MergeTreeエンジンファミリーã®ãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€ClickHouseã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§è‡ªå‹•çš„ã«[挿入時ã«é‡è¤‡ã‚’除去](https://clickhouse.com/blog/common-getting-started-issues-with-clickhouse#5-deduplication-at-insert-time)ã—ã¾ã™ã€‚例ãˆã°ä»¥ä¸‹ã®ã‚ˆã†ãªã‚±ãƒ¼ã‚¹ã«ãŠã„ã¦ã‚‚挿入ã¯è¨±å®¹ã•ã‚Œã¾ã™: + + 1. データをå—ä¿¡ã—ãŸãƒŽãƒ¼ãƒ‰ã«å•é¡ŒãŒã‚ã‚‹å ´åˆã€æŒ¿å…¥ã‚¯ã‚¨ãƒªã¯ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆã¾ãŸã¯ã‚ˆã‚Šå…·ä½“çš„ãªã‚¨ãƒ©ãƒ¼ï¼‰ã—ã€ç¢ºèªå¿œç­”ãŒå¾—られã¾ã›ã‚“。 + 2. データãŒãƒŽãƒ¼ãƒ‰ã«ã‚ˆã£ã¦æ›¸ãè¾¼ã¾ã‚ŒãŸãŒã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®ä¸­æ–­ã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªã®é€ä¿¡è€…ã«ç¢ºèªå¿œç­”ã‚’è¿”ã™ã“ã¨ãŒã§ããªã„å ´åˆã€é€ä¿¡è€…ã¯ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¾ãŸã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¨ãƒ©ãƒ¼ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ + + クライアントã®è¦³ç‚¹ã‹ã‚‰ã¯ã€(i) 㨠(ii) を区別ã™ã‚‹ã®ã¯é›£ã—ã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã—ã‹ã—ã€ã©ã¡ã‚‰ã®å ´åˆã§ã‚‚ã€ç¢ºèªã®ãªã„挿入ã¯ç›´ã¡ã«å†è©¦è¡Œã§ãã¾ã™ã€‚å†è©¦è¡Œã•ã‚ŒãŸæŒ¿å…¥ã‚¯ã‚¨ãƒªãŒåŒã˜é †åºã§åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€é™ã‚Šã€ClickHouseã¯ï¼ˆç¢ºèªã•ã‚Œã¦ã„ãªã„)元ã®æŒ¿å…¥ãŒæˆåŠŸã—ãŸå ´åˆã€å†è©¦è¡Œã•ã‚ŒãŸæŒ¿å…¥ã‚’自動的ã«ç„¡è¦–ã—ã¾ã™ã€‚ + +- **MergeTreeテーブルã¾ãŸã¯åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã¸ã®æŒ¿å…¥** - データãŒã‚·ãƒ£ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’一連ã®ãƒŽãƒ¼ãƒ‰ã«åˆ†æ•£ã•ã›ã¦MergeTree(ã¾ãŸã¯Replicatedテーブル)ã«ç›´æŽ¥æŒ¿å…¥ã—ã€`internal_replication=true` を使用ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’ä»»æ„ã®ãƒ¬ãƒ—リカシャードã«ãƒ¬ãƒ—リケートã—ã€ãƒ‡ãƒ¼ã‚¿ãŒæœ€çµ‚çš„ã«æ•´åˆæ€§ã‚’æŒã¤ã‚ˆã†ã«ã—ã¾ã™ã€‚ã“ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µã‚¤ãƒ‰ã®è² è·åˆ†æ•£ãŒä¸ä¾¿ãªå ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯[分散テーブル](/ja/engines/table-engines/special/distributed)を介ã—ã¦æŒ¿å…¥ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒŽãƒ¼ãƒ‰é–“ã§æ›¸ãè¾¼ã¿ãŒåˆ†æ•£ã•ã‚Œã¾ã™ï¼ˆã‚„ã¯ã‚Šã€`internal_replication=true` を設定ã—ã¾ã™ï¼‰ã€‚ã“ã®ã‚¢ãƒ—ローãƒã¯ã€ãƒŽãƒ¼ãƒ‰ã«åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚’ローカルã§æ›¸ã込んã§ã‹ã‚‰ã‚·ãƒ£ãƒ¼ãƒ‰ã«é€ä¿¡ã™ã‚‹ãŸã‚ã€ã‚„や性能ãŒåŠ£ã‚Šã¾ã™ã€‚ + +- **å°ã•ãªãƒãƒƒãƒã®éžåŒæœŸæŒ¿å…¥ã‚’使用ã™ã‚‹** - クライアントサイドã®ãƒãƒƒãƒå‡¦ç†ãŒç¾å®Ÿçš„ã§ãªã„シナリオã€ä¾‹ãˆã°æ•°ç™¾ã¾ãŸã¯æ•°åƒã®å˜æ©Ÿèƒ½ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆãŒãƒ­ã‚°ã€ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã€ãƒˆãƒ¬ãƒ¼ã‚¹ãªã©ã‚’é€ä¿¡ã™ã‚‹è¦³æ¸¬ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§ã¯ã€å•é¡Œã‚„異常を迅速ã«æ¤œå‡ºã™ã‚‹ãŸã‚ã«ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã®ãƒ‡ãƒ¼ã‚¿è»¢é€ãŒé‡è¦ãªå ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã•ã‚‰ã«ã€è¦³æ¸¬ã‚·ã‚¹ãƒ†ãƒ ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚¹ãƒ‘イクã«ã‚ˆã‚Šã€è¦³æ¸¬ãƒ‡ãƒ¼ã‚¿ã‚’クライアントサイドã§ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã—よã†ã¨ã™ã‚‹ã¨ãã«å¤§è¦æ¨¡ãªãƒ¡ãƒ¢ãƒªã‚¹ãƒ‘イクや関連ã™ã‚‹å•é¡ŒãŒç™ºç”Ÿã™ã‚‹ãƒªã‚¹ã‚¯ãŒã‚ã‚Šã¾ã™ã€‚大ããªãƒãƒƒãƒã‚’挿入ã§ããªã„å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ClickHouseã«[éžåŒæœŸæŒ¿å…¥](/ja/cloud/bestpractices/asynchronous-inserts)を使用ã—ã¦ãƒãƒƒãƒå‡¦ç†ã‚’委任ã§ãã¾ã™ã€‚éžåŒæœŸæŒ¿å…¥ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯ã¾ãšãƒãƒƒãƒ•ã‚¡ã«æŒ¿å…¥ã•ã‚Œã€ãã®å¾Œãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ã‹ã€éžåŒæœŸã§æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +
+ + NEEDS ALT + +
+ + éžåŒæœŸæŒ¿å…¥ãŒæœ‰åŠ¹åŒ–ã•ã‚Œã¦ã„ã‚‹ã¨ãã€ClickHouse㌠(1) 挿入クエリをå—ã‘å–ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªã®ãƒ‡ãƒ¼ã‚¿ã¯ (2) ã¾ãšãƒ¡ãƒ¢ãƒªå†…ãƒãƒƒãƒ•ã‚¡ã«ç›´ã¡ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ (1) ã«éžåŒæœŸã§ã€ (3) 次ã®ãƒãƒƒãƒ•ã‚¡ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ãŒè¡Œã‚ã‚ŒãŸã¨ãã®ã¿ã€ãƒãƒƒãƒ•ã‚¡ã®ãƒ‡ãƒ¼ã‚¿ã¯ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ä¸€éƒ¨ã¨ã—ã¦æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚注æ„点ã¨ã—ã¦ã€ãƒãƒƒãƒ•ã‚¡ãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹å‰ã¯ã€ã‚¯ã‚¨ãƒªã§ãƒ‡ãƒ¼ã‚¿ã‚’検索ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ãƒãƒƒãƒ•ã‚¡ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã¯è¨­å®šå¯èƒ½ã§ã™ã€‚ + + ãƒãƒƒãƒ•ã‚¡ãŒãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹å‰ã«ã€åŒã˜ã¾ãŸã¯ä»–ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ã®ä»–ã®éžåŒæœŸæŒ¿å…¥ã‚¯ã‚¨ãƒªã®ãƒ‡ãƒ¼ã‚¿ãŒãƒãƒƒãƒ•ã‚¡ã«åŽé›†ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãƒãƒƒãƒ•ã‚¡ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã‹ã‚‰ä½œæˆã•ã‚ŒãŸãƒ‘ートã«ã¯ã€è¤‡æ•°ã®éžåŒæœŸæŒ¿å…¥ã‚¯ã‚¨ãƒªã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚通常ã€ã“れらã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µã‚¤ãƒ‰ã‹ã‚‰ã‚µãƒ¼ãƒãƒ¼ã‚µã‚¤ãƒ‰ï¼ˆClickHouseインスタンス)ã¸ã®ãƒ‡ãƒ¼ã‚¿ãƒãƒƒãƒã‚·ãƒ•ãƒˆã¨ãªã‚Šã¾ã™ã€‚ + + éžåŒæœŸæŒ¿å…¥ã®è¨­å®šã«é–¢ã™ã‚‹å®Œå…¨ãªè©³ç´°ã¯[ã“ã¡ã‚‰](/ja/optimize/asynchronous-inserts#enabling-asynchronous-inserts)ã§ç¢ºèªã§ãã€ã‚ˆã‚Šæ·±ã„情報ã¯[ã“ã¡ã‚‰](https://clickhouse.com/blog/asynchronous-data-inserts-in-clickhouse)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +- **å…¬å¼ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã™ã‚‹** - ClickHouseã¯æœ€ã‚‚人気ã®ã‚るプログラミング言語ã§ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’æŒã£ã¦ã„ã¾ã™ã€‚ã“れらã¯ã€æŒ¿å…¥ãŒæ­£ã—ã実行ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ã‚ˆã†ã«æœ€é©åŒ–ã•ã‚Œã¦ãŠã‚Šã€ç›´æŽ¥ã¾ãŸã¯ã‚¯ã‚¨ãƒªã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€æŽ¥ç¶šãƒ¬ãƒ™ãƒ«è¨­å®šã§ã®æœ‰åŠ¹åŒ–ã«ã‚ˆã‚ŠéžåŒæœŸæŒ¿å…¥ã‚’ãƒã‚¤ãƒ†ã‚£ãƒ–ã«ã‚µãƒãƒ¼ãƒˆã—ã¾ã™ï¼ˆä¾‹: [Goクライアント](/ja/integrations/go#async-insert))。 +- **ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットã®æŽ¨å¥¨** - ClickHouseã¯æŒ¿å…¥ï¼ˆãŠã‚ˆã³ã‚¯ã‚¨ãƒªï¼‰æ™‚ã«å¤šãã®[入力フォーマット](/ja/interfaces/formats)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯OLTPデータベースã¨ã®å¤§ããªé•ã„ã§ã‚ã‚Šã€ãƒ†ãƒ¼ãƒ–ル関数ã¨é€£æºã—ãŸå¤–部ソースã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿èª­ã¿è¾¼ã¿ãŒã‚ˆã‚Šç°¡å˜ã«ãªã‚Šã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ã®èƒ½åŠ›ã‚‚å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“れらã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ãªãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ã¨ãƒ‡ãƒ¼ã‚¿ã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ãƒªãƒ³ã‚°ä½œæ¥­ã«ç†æƒ³çš„ã§ã™ã€‚最é©ãªæŒ¿å…¥ãƒ‘フォーマンスをé”æˆã—ãŸã„アプリケーションã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットã§æŒ¿å…¥ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã‚Œã¯ã»ã¨ã‚“ã©ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆï¼ˆGoã¨Python)ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€ã‚µãƒ¼ãƒãƒ¼ãŒæœ€å°é™ã®ä½œæ¥­ã‚’å¿…è¦ã¨ã™ã‚‹ãŸã‚ã€æœ€é©ãªé¸æŠžã§ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã™ã§ã«åˆ—指å‘ãªã®ã§ã€åˆ—指å‘データをクライアントãŒç”Ÿæˆã™ã‚‹å¿…è¦ã¯ãªãã€ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’スケールã•ã›ã‚‹å–り組ã¿ã«ãŠã„ã¦è€ƒæ…®ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚代替ã¨ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯[RowBinaryフォーマット](/ja/interfaces/formats#rowbinary)(Javaクライアントã§ä½¿ç”¨ï¼‰ã®åˆ©ç”¨ã‚’検討ã§ãã¾ã™ã€‚ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットã«æ¯”ã¹ã¦ã€æ›¸ãã®ãŒé€šå¸¸ã‚ˆã‚Šå®¹æ˜“ãªè¡Œãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã™ã€‚JSONã®ã‚ˆã†ãªä»–ã®è¡Œãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«æ¯”ã¹ã¦ã€åœ§ç¸®ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã€ã‚µãƒ¼ãƒãƒ¼ã§ã®å‡¦ç†ã«ãŠã„ã¦ã‚ˆã‚ŠåŠ¹çŽ‡çš„ã§ã™ã€‚低ã„書ãè¾¼ã¿ã‚¹ãƒ«ãƒ¼ãƒ—ットã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§è¿…速ã«çµ±åˆã—ãŸã„å ´åˆã¯ã€JSONEachRowフォーマットを利用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ã¯ã€ClickHouse内ã§ã®è§£æžã«CPUオーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒã‹ã‹ã‚‹ã“ã¨ã‚’ユーザーã¯èªè­˜ã—ã¦ãŠãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +- **HTTPã¾ãŸã¯ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコル** - 多ãã®ä¼çµ±çš„ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã¯ç•°ãªã‚Šã€ClickHouseã¯HTTPインターフェースをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ユーザーã¯ã“れを使用ã—ã¦ã€ä¸Šè¨˜ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ã„ãšã‚Œã‹ã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ãŠã‚ˆã³ã‚¯ã‚¨ãƒªã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’ロードãƒãƒ©ãƒ³ã‚µã§ç°¡å˜ã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ãŒã§ãã‚‹ãŸã‚ã€ClickHouseã®ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルよりも好ã¾ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルã§ã®æŒ¿å…¥ãƒ‘フォーマンスã«ã¯è‹¥å¹²ã®é•ã„ãŒäºˆæƒ³ã•ã‚Œã€å¤šå°‘ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒè»½æ¸›ã•ã‚Œã¾ã™ã€‚既存ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ã“れらã®ãƒ—ロトコルã®ã„ãšã‚Œã‹ï¼ˆã¾ãŸã¯ä¸¡æ–¹ã€ä¾‹: Goクライアント)を使用ã—ã¾ã™ã€‚ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルã¯ã‚¯ã‚¨ãƒªã®é€²è¡Œã‚’ç°¡å˜ã«è¿½è·¡ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +## 大é‡ãƒ‡ãƒ¼ã‚¿ã®ãƒ­ãƒ¼ãƒ‰ + +Postgresã‹ã‚‰å¤§é‡ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ãŸã‚ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä»¥ä¸‹ã‚’使用ã§ãã¾ã™: +- `PeerDB by ClickHouse`を使用ã™ã‚‹ã€‚ã“ã‚Œã¯PostgreSQLデータベースã®ãƒ¬ãƒ—リケーションを自社ホスト型ClickHouseãŠã‚ˆã³ClickHouse Cloudã«å¯¾ã—ã¦å®Ÿè¡Œã™ã‚‹ãŸã‚ã«ç‰¹åˆ¥ã«è¨­è¨ˆã•ã‚ŒãŸETLツールã§ã™ã€‚開始ã™ã‚‹ã«ã¯[PeerDB Cloud](https://www.peerdb.io/)ã§ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’作æˆã—ã€ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—手順ã«ã¤ã„ã¦ã¯[ドキュメント](https://docs.peerdb.io/connect/clickhouse/clickhouse-cloud)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- éŽåŽ»ã®ä¾‹ã§ç¤ºã—ãŸã‚ˆã†ã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’直接読ã¿å–ã‚‹Postgresテーブル関数を使用ã™ã‚‹ã€‚通常ã¯æ—¢çŸ¥ã®ã‚¦ã‚©ãƒ¼ã‚¿ãƒ¼ãƒžãƒ¼ã‚¯ã€ä¾‹: タイムスタンプã«åŸºã¥ããƒãƒƒãƒãƒ¬ãƒ—リケーションã«é©ã—ã¦ã„ã‚‹ã‹ã€ãƒ¯ãƒ³ã‚ªãƒ•ç§»è¡Œã®å ´åˆã§ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã¯æ•°åƒä¸‡è¡Œã«ã‚¹ã‚±ãƒ¼ãƒ«ã§ãã¾ã™ã€‚より大ããªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’移行ã—ãŸã„ユーザーã¯ã€ãƒ‡ãƒ¼ã‚¿ã®ãƒãƒ£ãƒ³ã‚¯ã‚’扱ã†è¤‡æ•°ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’検討ã™ã¹ãã§ã™ã€‚å„ãƒãƒ£ãƒ³ã‚¯ã«ã¯ãã®ãƒ‘ーティションãŒæœ€çµ‚テーブルã«ç§»å‹•ã™ã‚‹å‰ã«ã‚¹ãƒ†ãƒ¼ã‚¸ãƒ³ã‚°ãƒ†ãƒ¼ãƒ–ルを使用ã§ãã¾ã™ã€‚失敗ã—ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’å†è©¦è¡Œã™ã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ã“ã®å¤§é‡ãƒ­ãƒ¼ãƒ‰æˆ¦ç•¥ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€ã“ã¡ã‚‰ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- データをCSVフォーマットã§Postgresã‹ã‚‰ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã§ãã¾ã™ã€‚ãã®å¾Œã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ã‚ªãƒ–ジェクトストレージを介ã—ã¦ãƒ†ãƒ¼ãƒ–ル関数を使用ã—ã¦ClickHouseã«æŒ¿å…¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note 大é‡ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®æŒ¿å…¥ã«é–¢ã™ã‚‹ãŠæ‰‹ä¼ã„ãŒå¿…è¦ã§ã™ã‹ï¼Ÿ +大ããªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®æŒ¿å…¥æ™‚ã«åŠ©ã‘ãŒå¿…è¦ãªå ´åˆã‚„ã€ClickHouse Cloudã«ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã™ã‚‹éš›ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€support@clickhouse.com ã¾ã§ã”連絡ãã ã•ã„。サãƒãƒ¼ãƒˆã„ãŸã—ã¾ã™ã€‚ +::: diff --git a/docs/ja/guides/joining-tables.md b/docs/ja/guides/joining-tables.md new file mode 100644 index 00000000000..6a26b4800db --- /dev/null +++ b/docs/ja/guides/joining-tables.md @@ -0,0 +1,204 @@ +--- +title: ClickHouseã§ã®JOINã®ä½¿ç”¨ +description: ClickHouseã§ãƒ†ãƒ¼ãƒ–ルをçµåˆã™ã‚‹æ–¹æ³• +keywords: [joins, join tables] +--- + +ClickHouseã¯ã€å¤šæ§˜ãªçµåˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’å‚™ãˆãŸ[フルã®`JOIN`サãƒãƒ¼ãƒˆ](https://clickhouse.com/blog/clickhouse-fully-supports-joins-part1)ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚パフォーマンスを最大é™ã«å¼•ã出ã™ãŸã‚ã«ã€ã“ã®ã‚¬ã‚¤ãƒ‰ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹JOINã®æœ€é©åŒ–ã®æ案ã«å¾“ã†ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ + +- 最é©ãªãƒ‘フォーマンスを得るã«ã¯ã€ç‰¹ã«ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã®åˆ†æžãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«ãŠã„ã¦ã€ã‚¯ã‚¨ãƒªã§ã®`JOIN`ã®æ•°ã‚’削減ã™ã‚‹ã“ã¨ã‚’目指ã™ã¹ãã§ã™ã€‚クエリ内ã®JOINã¯æœ€å¤§3ã‹ã‚‰4ã¾ã§ã«åˆ¶é™ã—ã¦ãã ã•ã„。[データモデリングセクション](/ja/data-modeling/schema-design)ã§ã¯ã€æ­£è¦åŒ–解除ã€Dictionaryã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューãªã©ã€JOINを最å°åŒ–ã™ã‚‹ãŸã‚ã®ã„ãã¤ã‹ã®å¤‰æ›´ã«ã¤ã„ã¦è©³ã—ã説明ã—ã¦ã„ã¾ã™ã€‚ +- ç¾åœ¨ã€ClickHouseã¯JOINã®é †åºã‚’変更ã—ã¾ã›ã‚“。常ã«æœ€å°ã®ãƒ†ãƒ¼ãƒ–ルをJOINã®å³å´ã«é…ç½®ã™ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。ã»ã¨ã‚“ã©ã®çµåˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã§ã¯ã“ã‚ŒãŒãƒ¡ãƒ¢ãƒªã«ä¿æŒã•ã‚Œã€ã‚¯ã‚¨ãƒªã®ãƒ¡ãƒ¢ãƒªã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’最低é™ã«æŠ‘ãˆã¾ã™ã€‚ +- クエリãŒç›´æŽ¥ã®JOINã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã€ã¤ã¾ã‚Š`LEFT ANY JOIN`ã®ã‚ˆã†ãªå ´åˆã¯ã€å¯èƒ½ã§ã‚ã‚Œã°[Dictionary](/ja/dictionary)を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +
+ +NEEDS ALT + +
+ +- INNER JOINを実行ã™ã‚‹å ´åˆã€ã“れらを`IN`å¥ã‚’使用ã—ãŸã‚µãƒ–クエリã¨ã—ã¦æ›¸ãã“ã¨ãŒã—ã°ã—ã°ã‚ˆã‚Šæœ€é©ã§ã™ã€‚以下ã®ã‚¯ã‚¨ãƒªã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚ã“れらã¯æ©Ÿèƒ½çš„ã«ã¯åŒç­‰ã§ã€ä¸¡æ–¹ã¨ã‚‚質å•ã«ClickHouseãŒè¨€åŠã•ã‚Œã¦ã„ãªã„ãŒã€`comments`ã«ã¯è¨€åŠã•ã‚Œã¦ã„ã‚‹`posts`ã®æ•°ã‚’見ã¤ã‘ã¾ã™ã€‚ + +```sql +SELECT count() +FROM stackoverflow.posts AS p +ANY INNER `JOIN` stackoverflow.comments AS c ON p.Id = c.PostId +WHERE (p.Title != '') AND (p.Title NOT ILIKE '%clickhouse%') AND (p.Body NOT ILIKE '%clickhouse%') AND (c.Text ILIKE '%clickhouse%') + +┌─count()─┠+│ 86 │ +└─────────┘ + +1 row in set. Elapsed: 8.209 sec. Processed 150.20 million rows, 56.05 GB (18.30 million rows/s., 6.83 GB/s.) +Peak memory usage: 1.23 GiB. +``` + +注æ„ã™ã¹ãã¯ã€ç›´ç©ã‚’é¿ã‘ã‚‹ãŸã‚`ANY INNER JOIN`を使用ã—ã¦ã„ã‚‹ã“ã¨ã§ã‚ã‚Šã€ã¤ã¾ã‚Šå„ãƒã‚¹ãƒˆã«å¯¾ã—ã¦1ã¤ã®ä¸€è‡´ã®ã¿ã‚’望んã§ã„ã¾ã™ã€‚ + +ã“ã®JOINã¯ã‚µãƒ–クエリを使用ã—ã¦æ›¸ãç›´ã™ã“ã¨ã§ã€ãƒ‘フォーマンスãŒå¤§å¹…ã«å‘上ã—ã¾ã™ã€‚ + +```sql +SELECT count() +FROM stackoverflow.posts +WHERE (Title != '') AND (Title NOT ILIKE '%clickhouse%') AND (Body NOT ILIKE '%clickhouse%') AND (Id IN ( + SELECT PostId + FROM stackoverflow.comments + WHERE Text ILIKE '%clickhouse%' +)) +┌─count()─┠+│ 86 │ +└─────────┘ + +1 row in set. Elapsed: 2.284 sec. Processed 150.20 million rows, 16.61 GB (65.76 million rows/s., 7.27 GB/s.) +Peak memory usage: 323.52 MiB. +``` + +ClickHouseã¯ã™ã¹ã¦ã®JOINå¥ã‚„サブクエリã«æ¡ä»¶ã‚’é©ç”¨ã—よã†ã¨ã—ã¾ã™ãŒã€å¯èƒ½ã§ã‚ã‚Œã°å¸¸ã«æ¡ä»¶ã‚’手動ã§ã™ã¹ã¦ã®ã‚µãƒ–å¥ã«é©ç”¨ã—ã€`JOIN`ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºã‚’最å°åŒ–ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚以下ã®ä¾‹ã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚ã“ã“ã§ã¯ã€2020年以é™ã®Java関連ã®æŠ•ç¨¿ã«ã¤ã„ã¦ã®ã‚¢ãƒƒãƒ—ボート数を計算ã—ãŸã„ã¨è€ƒãˆã¦ã„ã¾ã™ã€‚ + +大ããªãƒ†ãƒ¼ãƒ–ルを左å´ã«é…ç½®ã—ãŸç´ æœ´ãªã‚¯ã‚¨ãƒªã¯56秒ã§å®Œäº†ã—ã¾ã™ã€‚ + +```sql +SELECT countIf(VoteTypeId = 2) AS upvotes +FROM stackoverflow.posts AS p +INNER JOIN stackoverflow.votes AS v ON p.Id = v.PostId +WHERE has(arrayFilter(t -> (t != ''), splitByChar('|', p.Tags)), 'java') AND (p.CreationDate >= '2020-01-01') + +┌─upvotes─┠+│ 261915 │ +└─────────┘ + +1 row in set. Elapsed: 56.642 sec. Processed 252.30 million rows, 1.62 GB (4.45 million rows/s., 28.60 MB/s.) +``` + +JOINã‚’å†é…ç½®ã™ã‚‹ã“ã¨ã§ãƒ‘フォーマンスãŒåŠ‡çš„ã«æ”¹å–„ã•ã‚Œã€1.5秒ã«ãªã‚Šã¾ã—ãŸã€‚ + +```sql +SELECT countIf(VoteTypeId = 2) AS upvotes +FROM stackoverflow.votes AS v +INNER JOIN stackoverflow.posts AS p ON v.PostId = p.Id +WHERE has(arrayFilter(t -> (t != ''), splitByChar('|', p.Tags)), 'java') AND (p.CreationDate >= '2020-01-01') + +┌─upvotes─┠+│ 261915 │ +└─────────┘ + +1 row in set. Elapsed: 1.519 sec. Processed 252.30 million rows, 1.62 GB (166.06 million rows/s., 1.07 GB/s.) +``` + +å³å´ã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ•ã‚£ãƒ«ã‚¿ã‚’追加ã™ã‚‹ã“ã¨ã§ã€ãƒ‘フォーマンスãŒã•ã‚‰ã«å‘上ã—ã€0.5秒ã«ãªã‚Šã¾ã—ãŸã€‚ + +```sql +SELECT countIf(VoteTypeId = 2) AS upvotes +FROM stackoverflow.votes AS v +INNER JOIN stackoverflow.posts AS p ON v.PostId = p.Id +WHERE has(arrayFilter(t -> (t != ''), splitByChar('|', p.Tags)), 'java') AND (p.CreationDate >= '2020-01-01') AND (v.CreationDate >= '2020-01-01') + +┌─upvotes─┠+│ 261915 │ +└─────────┘ + +1 row in set. Elapsed: 0.597 sec. Processed 81.14 million rows, 1.31 GB (135.82 million rows/s., 2.19 GB/s.) +Peak memory usage: 249.42 MiB. +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯å‰è¿°ã®ã‚ˆã†ã«`INNER JOIN`をサブクエリã«ç§»å‹•ã—ã€å¤–å´ãŠã‚ˆã³å†…å´ã®ã‚¯ã‚¨ãƒªã«ãƒ•ã‚£ãƒ«ã‚¿ã‚’維æŒã™ã‚‹ã“ã¨ã§ã•ã‚‰ã«æ”¹å–„ã§ãã¾ã™ã€‚ + +```sql +SELECT count() AS upvotes +FROM stackoverflow.votes +WHERE (VoteTypeId = 2) AND (PostId IN ( + SELECT Id + FROM stackoverflow.posts + WHERE (CreationDate >= '2020-01-01') AND has(arrayFilter(t -> (t != ''), splitByChar('|', Tags)), 'java') +)) + +┌─upvotes─┠+│ 261915 │ +└─────────┘ + +1 row in set. Elapsed: 0.383 sec. Processed 99.64 million rows, 804.55 MB (259.85 million rows/s., 2.10 GB/s.) +Peak memory usage: 250.66 MiB. +``` + +## JOINアルゴリズムã®é¸æŠž + +ClickHouseã¯ã€ã„ãã¤ã‹ã®[joinアルゴリズム](https://clickhouse.com/blog/clickhouse-fully-supports-joins-part1)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“れらã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯é€šå¸¸ã€ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã¨ãƒ‘フォーマンスをトレードオフã—ã¾ã™ã€‚以下ã¯ã€ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã¨å®Ÿè¡Œæ™‚é–“ã«åŸºã¥ãClickHouse joinアルゴリズムã®æ¦‚è¦ã§ã™ï¼š + +
+ +NEEDS ALT + +
+ +ã“れらã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ã€JOINクエリã®è¨ˆç”»ã¨å®Ÿè¡Œæ–¹æ³•ã‚’決定ã—ã¾ã™ã€‚デフォルトã§ã¯ã€ClickHouseã¯ä½¿ç”¨ã•ã‚ŒãŸJOINタイプãŠã‚ˆã³çµåˆãƒ†ãƒ¼ãƒ–ルã®ã‚¨ãƒ³ã‚¸ãƒ³ã«åŸºã¥ã„ã¦ç›´æŽ¥ã¾ãŸã¯ãƒãƒƒã‚·ãƒ¥JOINアルゴリズムを使用ã—ã¾ã™ã€‚代ã‚ã‚Šã«ã€ClickHouseを設定ã—ã¦ã€ãƒªã‚½ãƒ¼ã‚¹ã®å¯ç”¨æ€§ã¨ä½¿ç”¨é‡ã«å¿œã˜ã¦ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã§ä½¿ç”¨ã™ã‚‹JOINアルゴリズムを柔軟ã«é¸æŠžã—ã€å‹•çš„ã«å¤‰æ›´ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š`join_algorithm=auto`ã®å ´åˆã€ClickHouseã¯æœ€åˆã«ãƒãƒƒã‚·ãƒ¥JOINアルゴリズムを試ã—ã€ãã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®ãƒ¡ãƒ¢ãƒªåˆ¶é™ãŒè¶…ãˆãŸå ´åˆã€ãã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’部分マージJOINã«å³åº§ã«åˆ‡ã‚Šæ›¿ãˆã¾ã™ã€‚é¸æŠžã•ã‚ŒãŸã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’トレースログã§è¦³å¯Ÿã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouseã¯ã¾ãŸã€`join_algorithm`設定を介ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¸Œæœ›ã®JOINアルゴリズムを自分ã§æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚許å¯ã—ã¦ã„ã¾ã™ã€‚ + +å„JOINアルゴリズムã®ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹`JOIN`タイプã¯ä»¥ä¸‹ã«ç¤ºã•ã‚Œã¦ãŠã‚Šã€æœ€é©åŒ–を考慮ã™ã‚‹å‰ã«è€ƒæ…®ã™ã‚‹ã¹ãã§ã™ï¼š + +
+ +NEEDS ALT + +
+ +å„`JOIN`アルゴリズムã®è©³ç´°ãªèª¬æ˜Žã€åˆ©ç‚¹ã€æ¬ ç‚¹ã€ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ç‰¹æ€§ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](https://clickhouse.com/blog/clickhouse-fully-supports-joins-hash-joins-part2)ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +é©åˆ‡ãªJOINアルゴリズムã®é¸æŠžã¯ã€ãƒ¡ãƒ¢ãƒªã®æœ€é©åŒ–ã‚’è¡Œã†ã‹ãƒ‘フォーマンスを最é©åŒ–ã™ã‚‹ã‹ã«ã‚ˆã‚Šã¾ã™ã€‚ + +## JOINパフォーマンスã®æœ€é©åŒ– + +主è¦ãªæœ€é©åŒ–指標ãŒãƒ‘フォーマンスã§ã‚ã‚Šã€JOINã‚’å¯èƒ½ãªé™ã‚Šæ—©ã実行ã—ãŸã„å ´åˆã¯ã€ä»¥ä¸‹ã®æ„æ€æ±ºå®šãƒ„リーを使用ã—ã¦é©åˆ‡ãªJOINアルゴリズムをé¸æŠžã§ãã¾ã™ï¼š + +
+ +NEEDS ALT + +
+ +- **(1)** å³å´ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ãŒãƒ¡ãƒ¢ãƒªå†…ã®ä½Žãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ã®ã‚­ãƒ¼ãƒ»ãƒãƒªãƒ¥ãƒ¼ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã€ä¾‹ãˆã°Dictionaryã«äº‹å‰ãƒ­ãƒ¼ãƒ‰ã§ãã€JOINキーãŒåŸºç¤Žã¨ãªã‚‹ã‚­ãƒ¼ãƒ»ãƒãƒªãƒ¥ãƒ¼ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ã‚­ãƒ¼å±žæ€§ã«ä¸€è‡´ã—ã€`LEFT ANY JOIN`ã®ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã§å分ã§ã‚ã‚‹å ´åˆã€**直接JOIN**ãŒé©ç”¨å¯èƒ½ã§ã‚ã‚Šã€æœ€é€Ÿã®ã‚¢ãƒ—ローãƒã‚’æä¾›ã—ã¾ã™ã€‚ + +- **(2)** テーブルã®[物ç†çš„ãªè¡Œé †åº](/ja/optimize/sparse-primary-indexes#data-is-stored-on-disk-ordered-by-primary-key-columns)ãŒJOINキーã®ã‚½ãƒ¼ãƒˆé †ã«ä¸€è‡´ã™ã‚‹å ´åˆã€ã“ã®å ´åˆã€**フルソートマージJOIN**ã¯ã‚½ãƒ¼ãƒˆãƒ•ã‚§ãƒ¼ã‚ºã‚’[スキップ](https://clickhouse.com/blog/clickhouse-fully-supports-joins-full-sort-partial-merge-part3#utilizing-physical-row-order)ã—ã€ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚’大幅ã«å‰Šæ¸›ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã‚„JOINキー値ã®åˆ†å¸ƒã«å¿œã˜ã¦ã€ä¸€éƒ¨ã®ãƒãƒƒã‚·ãƒ¥JOINアルゴリズムよりも速ã„実行時間をæŒã¡ã¾ã™ã€‚ + +- **(3)** å³ãƒ†ãƒ¼ãƒ–ルãŒãƒ¡ãƒ¢ãƒªã«åŽã¾ã‚‹å ´åˆã€è¿½åŠ ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒã‚ã£ã¦ã‚‚ã€**並列ãƒãƒƒã‚·ãƒ¥JOIN**ã¯ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¾ãŸã¯ãƒãƒƒã‚·ãƒ¥JOINãŒã‚ˆã‚Šé€Ÿã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã€ãƒ‡ãƒ¼ã‚¿åž‹ã€ãŠã‚ˆã³JOINキーã®å€¤ã®åˆ†å¸ƒã«ä¾å­˜ã—ã¾ã™ã€‚ + +- **(4)** å³ãƒ†ãƒ¼ãƒ–ルãŒãƒ¡ãƒ¢ãƒªã«åŽã¾ã‚‰ãªã„å ´åˆã€ãã‚Œã¯å†ã³ä¾å­˜ã—ã¾ã™ã€‚ClickHouseã¯3ã¤ã®ãƒ¡ãƒ¢ãƒªéžä¾å­˜ã®JOINアルゴリズムをæä¾›ã—ã¦ã„ã¾ã™ã€‚ã™ã¹ã¦ãŒä¸€æ™‚çš„ã«ãƒ‡ãƒ¼ã‚¿ã‚’ディスクã«ã‚¹ãƒ”ルã—ã¾ã™ã€‚**フルソートマージJOIN**ãŠã‚ˆã³**部分マージJOIN**ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®äº‹å‰ã‚½ãƒ¼ãƒˆã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚**グレースãƒãƒƒã‚·ãƒ¥JOIN**ã¯ã€ä»£ã‚ã‚Šã«ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルを構築ã—ã¾ã™ã€‚データé‡ã€ãƒ‡ãƒ¼ã‚¿åž‹ã€JOINキーã®å€¤ã®åˆ†å¸ƒã«åŸºã¥ã„ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚’ソートã™ã‚‹ã‚ˆã‚Šã‚‚ã€ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルを構築ã™ã‚‹æ–¹ãŒé€Ÿã„シナリオã€ã¾ãŸãã®é€†ã®ã‚·ãƒŠãƒªã‚ªãŒã‚ã‚Šã¾ã™ã€‚ + +部分マージJOINã¯ã€å¤§ããªãƒ†ãƒ¼ãƒ–ルをçµåˆã™ã‚‹éš›ã«ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’最å°åŒ–ã™ã‚‹ã‚ˆã†æœ€é©åŒ–ã•ã‚Œã¦ãŠã‚Šã€JOIN速度ãŒéžå¸¸ã«é…ã„代償ã¨ã—ã¦ã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ç‰¹ã«ã€å·¦ãƒ†ãƒ¼ãƒ–ルã®ç‰©ç†çš„ãªè¡Œé †åºãŒJOINキーã®ã‚½ãƒ¼ãƒˆé †ã¨ä¸€è‡´ã—ãªã„å ´åˆã«é¡•è‘—ã§ã™ã€‚ + +グレースãƒãƒƒã‚·ãƒ¥JOINã¯ã€3ã¤ã®ãƒ¡ãƒ¢ãƒªéžä¾å­˜ã®JOINアルゴリズムã®ä¸­ã§æœ€ã‚‚柔軟ã§ã‚ã‚Šã€[grace_hash_join_initial_buckets](https://github.com/ClickHouse/ClickHouse/blob/23.5/src/Core/Settings.h#L759)設定を使用ã—ã¦ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã¨JOIN速度を良好ã«åˆ¶å¾¡ã§ãã¾ã™ã€‚データé‡ã«å¿œã˜ã¦ã€ã‚°ãƒ¬ãƒ¼ã‚¹ãƒãƒƒã‚·ãƒ¥ãŒéƒ¨åˆ†ãƒžãƒ¼ã‚¸ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚ˆã‚Šã‚‚速ã„ã¾ãŸã¯é…ã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚両方ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ãŒã»ã¼ä¸€è‡´ã™ã‚‹ã‚ˆã†ã«é¸æŠžã•ã‚ŒãŸãƒã‚±ãƒ„æ•°ã®å ´åˆã§ã™ã€‚メモリ使用é‡ãŒå®Œå…¨ã‚½ãƒ¼ãƒˆãƒžãƒ¼ã‚¸ã¨ã»ã¼ä¸€è‡´ã™ã‚‹ã‚ˆã†ã«ã‚°ãƒ¬ãƒ¼ã‚¹ãƒãƒƒã‚·ãƒ¥JOINã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’構æˆã™ã‚‹ã¨ã€å®Œå…¨ã‚½ãƒ¼ãƒˆãƒžãƒ¼ã‚¸ãŒãƒ†ã‚¹ãƒˆãƒ©ãƒ³ã§ã¯å¸¸ã«é€Ÿã‹ã£ãŸã§ã™ã€‚ + +メモリéžä¾å­˜ã®3ã¤ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®ã†ã¡ã€ã©ã‚ŒãŒæœ€é€Ÿã‹ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®é‡ã€ãƒ‡ãƒ¼ã‚¿åž‹ã€JOINキーã®å€¤ã®åˆ†å¸ƒã«ä¾å­˜ã—ã¾ã™ã€‚ç¾å®Ÿçš„ãªãƒ‡ãƒ¼ã‚¿é‡ã§ç¾å®Ÿçš„ãªãƒ‡ãƒ¼ã‚¿ã‚’使用ã—ã¦ãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ã‚’è¡Œã„ã€ã©ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ãŒæœ€é€Ÿã‹ã‚’判断ã™ã‚‹ã®ãŒæœ€è‰¯ã§ã™ã€‚ + +## メモリã®æœ€é©åŒ– + +JOINを最速ã§ã¯ãªã最も低ã„メモリ使用é‡ã§æœ€é©åŒ–ã—ãŸã„å ´åˆã¯ã€ä»£ã‚ã‚Šã«ä»¥ä¸‹ã®æ„æ€æ±ºå®šãƒ„リーを使用ã§ãã¾ã™ï¼š + +
+ +NEEDS ALT + +
+ +- **(1)** テーブルã®ç‰©ç†çš„ãªè¡Œé †åºãŒJOINキーã®ã‚½ãƒ¼ãƒˆé †ã«ä¸€è‡´ã™ã‚‹å ´åˆã€**フルソートマージJOIN**ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã¯ã€ã“れ以上低ãã¯ãªã‚Šã¾ã›ã‚“。加ãˆã¦ã€ã‚½ãƒ¼ãƒˆãƒ•ã‚§ãƒ¼ã‚ºãŒ[無効](https://clickhouse.com/blog/clickhouse-fully-supports-joins-full-sort-partial-merge-part3#utilizing-physical-row-order)ã«ãªã£ã¦ã„ã‚‹ãŸã‚ã€è‰¯å¥½ãªJOIN速度ã®åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ã€‚ +- **(2)** **グレースãƒãƒƒã‚·ãƒ¥JOIN**ã¯[JOIN速度](https://github.com/ClickHouse/ClickHouse/blob/23.5/src/Core/Settings.h#L759)ã®çŠ ç‰²ã«ã—ã¦ã€é«˜ã„[ãƒã‚±ãƒƒãƒˆæ•°](https://clickhouse.com/blog/clickhouse-fully-supports-joins-hash-joins-part2#description-2)を構æˆã™ã‚‹ã“ã¨ã§ã€éžå¸¸ã«ä½Žã„メモリ使用ã«èª¿æ•´ã§ãã¾ã™ã€‚**部分マージJOIN**ã¯ã€æ„図的ã«ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã®ä½¿ç”¨ã‚’低ãã—ã¾ã™ã€‚**フルソートマージJOIN**ã¯ã€å¤–部ソートãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã¯é€šå¸¸ã€éƒ¨åˆ†ãƒžãƒ¼ã‚¸JOINよりも多ãã®ãƒ¡ãƒ¢ãƒªã‚’使用ã—ã¾ã™ãŒã€ãã‚Œã«ã‚ˆã‚Šå¤§å¹…ã«è‰¯å¥½ãªJOIN実行時間ã®åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ã€‚ + +上記ã®è©³ç´°ã«ã¤ã„ã¦ã•ã‚‰ãªã‚‹æƒ…å ±ãŒå¿…è¦ãªãƒ¦ãƒ¼ã‚¶ã«ã¯ã€ã“ã®[ブログシリーズ](https://clickhouse.com/blog/clickhouse-fully-supports-joins-part1)ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + diff --git a/docs/ja/guides/separation-storage-compute.md b/docs/ja/guides/separation-storage-compute.md new file mode 100644 index 00000000000..085807ce952 --- /dev/null +++ b/docs/ja/guides/separation-storage-compute.md @@ -0,0 +1,171 @@ +--- +sidebar_position: 1 +sidebar_label: ストレージã¨ã‚³ãƒ³ãƒ”ュートã®åˆ†é›¢ +slug: /ja/guides/separation-storage-compute +--- +import BucketDetails from '@site/docs/ja/_snippets/_S3_authentication_and_bucket.md'; + +# ストレージã¨ã‚³ãƒ³ãƒ”ュートã®åˆ†é›¢ + +## æ¦‚è¦ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€ClickHouseã¨S3を使用ã—ã¦ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã‚³ãƒ³ãƒ”ュートを分離ã—ãŸã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã‚’実装ã™ã‚‹æ–¹æ³•ã‚’探りã¾ã™ã€‚ + +ストレージã¨ã‚³ãƒ³ãƒ”ュートã®åˆ†é›¢ã¨ã¯ã€ã‚³ãƒ³ãƒ”ューティングリソースã¨ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒªã‚½ãƒ¼ã‚¹ã‚’独立ã—ã¦ç®¡ç†ã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ClickHouseã§ã¯ã€ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティã€ã‚³ã‚¹ãƒˆåŠ¹çŽ‡ã€æŸ”軟性をå‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã‚³ãƒ³ãƒ”ュートリソースを別々ã«ã‚¹ã‚±ãƒ¼ãƒ«ã—ã€ãƒ‘フォーマンスã¨ã‚³ã‚¹ãƒˆã‚’最é©åŒ–ã§ãã¾ã™ã€‚ + +ClickHouseã«S3ã‚’ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã€ç‰¹ã«ã€Œã‚³ãƒ¼ãƒ«ãƒ‰ã€ãƒ‡ãƒ¼ã‚¿ã®ã‚¯ã‚¨ãƒªãƒ‘フォーマンスãŒã‚ã¾ã‚Šé‡è¦ã§ãªã„ユースケースã«ãŠã„ã¦æœ‰ç”¨ã§ã™ã€‚ClickHouseã¯`S3BackedMergeTree`を使用ã—ã¦ã€`MergeTree`エンジンã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã—ã¦S3をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルエンジンã¯ã€S3ã®ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティã¨ã‚³ã‚¹ãƒˆã®åˆ©ç‚¹ã‚’活用ã—ãªãŒã‚‰ã€`MergeTree`エンジンã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã¨ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスを維æŒã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ストレージã¨ã‚³ãƒ³ãƒ”ュートã®åˆ†é›¢ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã®å®Ÿè£…ã¨ç®¡ç†ã¯ã€æ¨™æº–ã®ClickHouseデプロイã¨æ¯”較ã—ã¦ã‚ˆã‚Šè¤‡é›‘ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã®ã‚¬ã‚¤ãƒ‰ã§èª¬æ˜Žã™ã‚‹ã‚ˆã†ã«ã€ã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰åž‹ã®ClickHouseã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã‚³ãƒ³ãƒ”ュートã®åˆ†é›¢ã‚’å¯èƒ½ã«ã—ã¾ã™ãŒã€è¨­å®šãªã—ã§ã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã‚’使用ã§ãã‚‹[ClickHouse Cloud](https://clickhouse.com/cloud)ã®åˆ©ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã«ã¯[`SharedMergeTree`テーブルエンジン](/ja/cloud/reference/shared-merge-tree)を使用ã—ã¦ãã ã•ã„。 + +*ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³22.8以上を使用ã—ã¦ã„ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚* + +:::warning +AWS/GCSライフサイクルãƒãƒªã‚·ãƒ¼ã‚’設定ã—ãªã„ã§ãã ã•ã„。ã“ã‚Œã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚‰ãšã€ãƒ†ãƒ¼ãƒ–ルãŒç ´æã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## 1. ClickHouseディスクã¨ã—ã¦S3を使用ã™ã‚‹ + +### ディスクã®ä½œæˆ + +ストレージ構æˆã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã«ClickHouseã®`config.d`ディレクトリã«æ–°ã—ã„ファイルを作æˆã—ã¾ã™: + +```bash +vim /etc/clickhouse-server/config.d/storage_config.xml +``` + +次ã®XMLã‚’æ–°ã—ã作æˆã—ãŸãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚³ãƒ”ーã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã—ãŸã„AWSã®ãƒã‚±ãƒƒãƒˆè©³ç´°ã«å¿œã˜ã¦`BUCKET`ã€`ACCESS_KEY_ID`ã€`SECRET_ACCESS_KEY`ã‚’ç½®ãæ›ãˆã¾ã™: + +```xml + + + + + s3 + $BUCKET + $ACCESS_KEY_ID + $SECRET_ACCESS_KEY + /var/lib/clickhouse/disks/s3_disk/ + + + cache + s3_disk + /var/lib/clickhouse/disks/s3_cache/ + 10Gi + + + + + +
+ s3_disk +
+
+
+
+
+
+``` + +S3ディスクã®è¨­å®šã‚’ã•ã‚‰ã«è©³ç´°ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ä¾‹ãˆã°`region`を指定ã—ãŸã‚Šã‚«ã‚¹ã‚¿ãƒ HTTP`header`ã‚’é€ä¿¡ã—ãŸã‚Šã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€é–¢é€£ã™ã‚‹è¨­å®šã®ä¸€è¦§ã‚’[ã“ã¡ã‚‰](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-s3)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +ã¾ãŸã€`access_key_id`ã¨`secret_access_key`を以下ã«ç½®ãæ›ãˆã‚‹ã“ã¨ã§ã€ç’°å¢ƒå¤‰æ•°ã‚„Amazon EC2メタデータã‹ã‚‰è³‡æ ¼æƒ…報をå–å¾—ã—よã†ã¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +```bash +true +``` + +設定ファイルを作æˆã—ãŸå¾Œã€ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‰€æœ‰è€…ã‚’clickhouseユーザーã¨ã‚°ãƒ«ãƒ¼ãƒ—ã«æ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: + +```bash +chown clickhouse:clickhouse /etc/clickhouse-server/config.d/storage_config.xml +``` + +クリックãƒã‚¦ã‚¹ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã—ã¦å¤‰æ›´ã‚’é©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```bash +service clickhouse-server restart +``` + +## 2. S3ã‚’ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã«ã—ãŸãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ + +S3ディスクãŒæ­£ã—ã設定ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’テストã™ã‚‹ãŸã‚ã«ã€ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¦ã‚¯ã‚¨ãƒªã‚’試ã¿ã¾ã™ã€‚ + +æ–°ã—ã„S3ストレージãƒãƒªã‚·ãƒ¼ã‚’指定ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™: + +```sql +CREATE TABLE my_s3_table + ( + `id` UInt64, + `column1` String + ) +ENGINE = MergeTree +ORDER BY id +SETTINGS storage_policy = 's3_main'; +``` + +エンジンを`S3BackedMergeTree`ã¨ã—ã¦æŒ‡å®šã™ã‚‹å¿…è¦ãŒãªã„ã“ã¨ã‚’注æ„ã—ã¦ãã ã•ã„。ClickHouseã¯ã€ãƒ†ãƒ¼ãƒ–ルãŒã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«S3を使用ã—ã¦ã„ã‚‹ã¨æ¤œå‡ºã™ã‚‹ã¨ã€ã‚¨ãƒ³ã‚¸ãƒ³ã‚¿ã‚¤ãƒ—を内部的ã«è‡ªå‹•ã§å¤‰æ›ã—ã¾ã™ã€‚ + +テーブルãŒæ­£ã—ã„ãƒãƒªã‚·ãƒ¼ã§ä½œæˆã•ã‚ŒãŸã“ã¨ã‚’確èªã—ã¾ã™: + +```sql +SHOW CREATE TABLE my_s3_table; +``` + +次ã®çµæžœãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™: + +```response +┌─statement──────────────────────────────────────────────────── +│ CREATE TABLE default.my_s3_table +( + `id` UInt64, + `column1` String +) +ENGINE = MergeTree +ORDER BY id +SETTINGS storage_policy = 's3_main', index_granularity = 8192 +└────────────────────────────────────────────────────────────── +``` + +æ–°ã—ã„テーブルã«è¡Œã‚’挿入ã—ã¾ã—ょã†: + +```sql +INSERT INTO my_s3_table (id, column1) + VALUES (1, 'abc'), (2, 'xyz'); +``` + +è¡ŒãŒæŒ¿å…¥ã•ã‚ŒãŸã“ã¨ã‚’確èªã—ã¾ã—ょã†: + +```sql +SELECT * FROM my_s3_table; +``` + +```response +┌─id─┬─column1─┠+│ 1 │ abc │ +│ 2 │ xyz │ +└────┴─────────┘ + +2 rows in set. Elapsed: 0.284 sec. +``` + +AWSコンソールã«ã¦ã€ãƒ‡ãƒ¼ã‚¿ãŒS3ã«æ­£å¸¸ã«æŒ¿å…¥ã•ã‚ŒãŸå ´åˆã€æŒ‡å®šã•ã‚ŒãŸãƒã‚±ãƒƒãƒˆã«ClickHouseãŒæ–°ã—ã„ファイルを作æˆã—ãŸã“ã¨ãŒç¢ºèªã§ãã‚‹ã¯ãšã§ã™ã€‚ + +ã™ã¹ã¦ãŒæ­£å¸¸ã«å‹•ä½œã—ãŸå ´åˆã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã‚³ãƒ³ãƒ”ュートãŒåˆ†é›¢ã•ã‚ŒãŸçŠ¶æ…‹ã§ClickHouseを使用ã—ã¦ã„ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ï¼ + +![コンピュートã¨ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®åˆ†é›¢ã‚’使ã£ãŸS3ãƒã‚±ãƒƒãƒˆã®ä¾‹](./images/s3_bucket_example.png) + +## 3. フォールトトレランスã®ãŸã‚ã®ãƒ¬ãƒ—リケーションã®å®Ÿè£… (オプション) + +:::warning +AWS/GCSライフサイクルãƒãƒªã‚·ãƒ¼ã‚’設定ã—ãªã„ã§ãã ã•ã„。ã“ã‚Œã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚‰ãšã€ãƒ†ãƒ¼ãƒ–ルãŒç ´æã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +フォールトトレランスを確ä¿ã™ã‚‹ãŸã‚ã«ã€è¤‡æ•°ã®AWSリージョンã«åˆ†æ•£ã•ã‚ŒãŸè¤‡æ•°ã®ClickHouseサーãƒãƒ¼ãƒŽãƒ¼ãƒ‰ã¨ã€ãã‚Œãžã‚Œã®ãƒŽãƒ¼ãƒ‰ã«å¯¾ã™ã‚‹S3ãƒã‚±ãƒƒãƒˆã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +S3ディスクを用ã„ãŸãƒ¬ãƒ—リケーションã¯ã€`ReplicatedMergeTree`テーブルエンジンを使用ã™ã‚‹ã“ã¨ã§å®Ÿç¾ã§ãã¾ã™ã€‚詳細ã¯æ¬¡ã®ã‚¬ã‚¤ãƒ‰ã‚’å‚ç…§ã—ã¦ãã ã•ã„: +- [S3オブジェクトストレージを使用ã—ãŸ2ã¤ã®AWSリージョン間ã§ã®å˜ä¸€ã‚·ãƒ£ãƒ¼ãƒ‰ã®ãƒ¬ãƒ—リケーション](/ja/integrations/s3#s3-multi-region). + +## å‚考文献 + +- [SharedMergeTreeテーブルエンジン](/ja/cloud/reference/shared-merge-tree) +- [SharedMergeTree発表ブログ](https://clickhouse.com/blog/clickhouse-cloud-boosts-performance-with-sharedmergetree-and-lightweight-updates) diff --git a/docs/ja/guides/sizing-and-hardware-recommendations.md b/docs/ja/guides/sizing-and-hardware-recommendations.md new file mode 100644 index 00000000000..c34fb069173 --- /dev/null +++ b/docs/ja/guides/sizing-and-hardware-recommendations.md @@ -0,0 +1,223 @@ +--- +slug: /ja/guides/sizing-and-hardware-recommendations +sidebar_label: サイズãŠã‚ˆã³ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®æŽ¨å¥¨äº‹é … +sidebar_position: 4 +--- + +# サイズãŠã‚ˆã³ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®æŽ¨å¥¨äº‹é … + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ã‚ªãƒ¼ãƒ—ンソースユーザーå‘ã‘ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã€ã‚³ãƒ³ãƒ”ュートã€ãƒ¡ãƒ¢ãƒªã€ãŠã‚ˆã³ãƒ‡ã‚£ã‚¹ã‚¯æ§‹æˆã«é–¢ã™ã‚‹ä¸€èˆ¬çš„ãªæŽ¨å¥¨äº‹é …ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚セットアップを簡略化ã—ãŸã„å ´åˆã¯ã€[ClickHouse Cloud](https://clickhouse.com/cloud) ã®ä½¿ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¤ãƒ³ãƒ•ãƒ©ç®¡ç†ã«é–¢é€£ã™ã‚‹ã‚³ã‚¹ãƒˆã‚’最å°é™ã«æŠ‘ãˆã¤ã¤ã€ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«è‡ªå‹•çš„ã«å¯¾å¿œã—ã€ã‚¹ã‚±ãƒ¼ãƒ«ã—ã¾ã™ã€‚ + +ClickHouse クラスターã®æ§‹æˆã¯ã€ãŠå®¢æ§˜ã®ã‚¢ãƒ—リケーションã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã‚„ワークロードパターンã«ã‚ˆã£ã¦å¤§ããç•°ãªã‚Šã¾ã™ã€‚アーキテクãƒãƒ£ã‚’計画ã™ã‚‹éš›ã«ã¯ã€ä»¥ä¸‹ã®è¦å› ã‚’考慮ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +- åŒæ™‚実行性(リクエスト数/秒) +- スループット(処ç†ã•ã‚Œã‚‹è¡Œæ•°/秒) +- ãƒ‡ãƒ¼ã‚¿é‡ +- データä¿æŒãƒãƒªã‚·ãƒ¼ +- ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‚³ã‚¹ãƒˆ +- メンテナンスコスト + +## ディスク + +ClickHouse ã§ä½¿ç”¨ã™ã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ã®ç¨®é¡žã¯ã€ãƒ‡ãƒ¼ã‚¿é‡ã€ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã€ã‚¹ãƒ«ãƒ¼ãƒ—ットã®è¦ä»¶ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ + +### パフォーマンスを最é©åŒ–ã™ã‚‹ + +パフォーマンスを最大化ã™ã‚‹ãŸã‚ã«ã€[AWS ã®ãƒ—ロビジョンドIOPS SSDボリューム](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/provisioned-iops.html) ã¾ãŸã¯ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã®åŒç­‰ã®æ供を直接接続ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã¯IOを最é©åŒ–ã—ã¾ã™ã€‚ + +### ストレージコストを最é©åŒ–ã™ã‚‹ + +コストを抑ãˆã‚‹ãŸã‚ã«ã€[汎用SSD EBSボリューム](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/general-purpose.html)を使用ã§ãã¾ã™ã€‚ã¾ãŸã€[ホット/ウォーム/コールドアーキテクãƒãƒ£](/ja/guides/developer/ttl#implementing-a-hotwarmcold-architecture)を使用ã—ã¦SSDã¨HDDを組ã¿åˆã‚ã›ãŸéšŽå±¤åž‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’実装ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã¾ãŸã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’分離ã™ã‚‹ãŸã‚ã«[AWS S3](https://aws.amazon.com/s3/)を使用ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚コンピュートã¨ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®åˆ†é›¢ã§ã‚ªãƒ¼ãƒ—ンソースã®ClickHouseを使用ã™ã‚‹ãŸã‚ã®ã‚¬ã‚¤ãƒ‰ã¯[ã“ã¡ã‚‰](/ja/guides/separation-storage-compute)ã‚’ã”覧ãã ã•ã„。ClickHouse Cloud ã§ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚³ãƒ³ãƒ”ュートã¨ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®åˆ†é›¢ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +## CPU + +### ã©ã® CPU を使用ã™ã¹ãã‹ï¼Ÿ + +使用ã™ã‚‹ CPU ã®ç¨®é¡žã¯ã€ä½¿ç”¨ãƒ‘ターンã«ä¾å­˜ã—ã¾ã™ã€‚ãŸã ã—ã€ä¸€èˆ¬çš„ã«ã€å¤šãã®é »ç¹ãªåŒæ™‚実行クエリを処ç†ã—ã€ã‚ˆã‚Šå¤šãã®ãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã™ã‚‹ã€ã¾ãŸã¯è¨ˆç®—集約的㪠UDF を使用ã™ã‚‹ã‚¢ãƒ—リケーションã¯ã€ã‚ˆã‚Šå¤šãã® CPU コアを必è¦ã¨ã—ã¾ã™ã€‚ + +**低レイテンシã¾ãŸã¯é¡§å®¢å‘ã‘アプリケーション** + +顧客å‘ã‘ワークロードã®ã‚ˆã†ã«10ミリ秒å˜ä½ã®ä½Žãƒ¬ã‚¤ãƒ†ãƒ³ã‚·è¦ä»¶ã«å¯¾ã—ã¦ã¯ã€AWS ã® [i3 ライン](https://aws.amazon.com/ec2/instance-types/i3/) ã¾ãŸã¯ [i4i ライン](https://aws.amazon.com/ec2/instance-types/i4i/) ã¾ãŸã¯ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã®åŒç­‰ã®IO最é©åŒ–ã•ã‚ŒãŸæ供をãŠå‹§ã‚ã—ã¾ã™ã€‚ + +**高åŒæ™‚実行性アプリケーション** + +åŒæ™‚実行性を最é©åŒ–ã™ã‚‹å¿…è¦ãŒã‚るワークロード(1秒ã‚ãŸã‚Š100以上ã®ã‚¯ã‚¨ãƒªï¼‰ã«å¯¾ã—ã¦ã¯ã€AWS ã®[計算最é©åŒ–ã•ã‚ŒãŸCシリーズ](https://aws.amazon.com/ec2/instance-types/#Compute_Optimized) ã¾ãŸã¯ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã®åŒç­‰ã®æ供をãŠå‹§ã‚ã—ã¾ã™ã€‚ + +**データウェアãƒã‚¦ã‚¸ãƒ³ã‚°ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹** + +データウェアãƒã‚¦ã‚¸ãƒ³ã‚°ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚„アドホック分æžã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ã¯ã€AWS ã® [Rタイプシリーズ](https://aws.amazon.com/ec2/instance-types/#Memory_Optimized) åˆã¯ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã®ãƒ¡ãƒ¢ãƒªæœ€é©åŒ–ã•ã‚ŒãŸæ供をãŠå‹§ã‚ã—ã¾ã™ã€‚ + +--- + +### CPU 利用率ã¯ã©ã®ç¨‹åº¦ã«ã™ã¹ãã‹ï¼Ÿ + +ClickHouse ã«æ¨™æº–的㪠CPU 利用率ã®ç›®æ¨™ã¯ã‚ã‚Šã¾ã›ã‚“。[iostat](https://linux.die.net/man/1/iostat) ãªã©ã®ãƒ„ールを利用ã—ã¦å¹³å‡ã® CPU 使用率を測定ã—ã€äºˆæœŸã—ãªã„トラフィックã®æ€¥å¢—を管ç†ã§ãるよã†ã«ã‚µãƒ¼ãƒãƒ¼ã®ã‚µã‚¤ã‚ºã‚’調整ã—ã¾ã™ã€‚ãŸã ã—ã€ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ã‚¯ã‚¨ãƒªã‚’ä¼´ã†åˆ†æžã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¸ãƒ³ã‚°ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã®å ´åˆã€10-20% ã® CPU 利用率を目標ã¨ã™ã¹ãã§ã™ã€‚ + +### 何 CPU コア使ã†ã¹ãã‹ï¼Ÿ + +使用ã™ã‚‹ CPU æ•°ã¯ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«ä¾å­˜ã—ã¾ã™ã€‚ã—ã‹ã—ã€ä¸€èˆ¬çš„ã«ã€CPU ã®ç¨®é¡žã«åŸºã¥ã„ã¦ä»¥ä¸‹ã®ãƒ¡ãƒ¢ãƒªå¯¾ CPU コア比を推奨ã—ã¾ã™ã€‚ + +- **[Mタイプ](https://aws.amazon.com/ec2/instance-types/)(一般的ãªåˆ©ç”¨ã‚±ãƒ¼ã‚¹ï¼‰ï¼š** メモリ対 CPU コア比 4:1 +- **[Rタイプ](https://aws.amazon.com/ec2/instance-types/#Memory_Optimized)(データウェアãƒã‚¦ã‚¸ãƒ³ã‚°ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ï¼‰ï¼š** メモリ対 CPU コア比 8:1 +- **[Cタイプ](https://aws.amazon.com/ec2/instance-types/#Compute_Optimized)(計算最é©åŒ–ユースケース):** メモリ対 CPU コア比 2:1 + +具体例ã¨ã—ã¦ã€Mタイプ㮠CPU を使用ã™ã‚‹å ´åˆã¯ã€25 CPU コアã‚ãŸã‚Š 100GB ã®ãƒ¡ãƒ¢ãƒªã‚’プロビジョニングã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚é©åˆ‡ãªãƒ¡ãƒ¢ãƒªé‡ã‚’決定ã™ã‚‹ã«ã¯ã€ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’プロファイリングã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚[メモリå•é¡Œã®ãƒ‡ãƒãƒƒã‚°ã«é–¢ã™ã‚‹ã‚¬ã‚¤ãƒ‰](https://clickhouse.com/docs/ja/guides/developer/debugging-memory-issues)を読むã‹ã€[組ã¿è¾¼ã¿ã®ã‚ªãƒ–ザーãƒãƒ“リティダッシュボード](https://clickhouse.com/docs/ja/operations/monitoring)を使用ã—㦠ClickHouse を監視ã§ãã¾ã™ã€‚ + +## メモリ + +CPU ã®é¸æŠžã¨åŒæ§˜ã«ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å¯¾ãƒ¡ãƒ¢ãƒªã®æ¯”率やメモリ対 CPU ã®æ¯”率ã®é¸æŠžã¯ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«ä¾å­˜ã—ã¾ã™ã€‚ãŸã ã—ã€ä¸€èˆ¬çš„ã«ã¯ãƒ¡ãƒ¢ãƒªãŒå¤šã„ã»ã©ã‚¯ã‚¨ãƒªã¯é«˜é€Ÿã«ãªã‚Šã¾ã™ã€‚価格ã«æ•æ„Ÿãªãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã®å ´åˆã€ä½Žãƒ¡ãƒ¢ãƒªé‡ã§ã‚‚動作ã—ã¾ã™ãŒã€è¨­å®šã‚’有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆ[max_bytes_before_external_group_by](/ja/operations/settings/query-complexity#settings-max_bytes_before_external_group_by) ã‚„ [max_bytes_before_external_sort](/ja/operations/settings/query-complexity#settings-max_bytes_before_external_sort))。ã“ã‚Œã«ã‚ˆã‚Šãƒ‡ãƒ¼ã‚¿ã‚’ディスクã«ã‚¹ãƒ”ルã™ã‚‹ã“ã¨ãŒè¨±å¯ã•ã‚Œã¾ã™ãŒã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã«å¤§ããªå½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +### メモリ対ストレージ比ã¯ã©ã®ç¨‹åº¦ã«ã™ã¹ãã‹ï¼Ÿ + +低データé‡ã®å ´åˆã€1:1 ã®ãƒ¡ãƒ¢ãƒªå¯¾ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸æ¯”ãŒè¨±å®¹ã•ã‚Œã¾ã™ãŒã€åˆè¨ˆãƒ¡ãƒ¢ãƒªã¯8GB未満ã«ã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 + +長期間ã®ãƒ‡ãƒ¼ã‚¿ä¿æŒã‚„高データé‡ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã®å ´åˆã€1:100 ã‹ã‚‰ 1:130 ã®ãƒ¡ãƒ¢ãƒªå¯¾ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸æ¯”を推奨ã—ã¾ã™ã€‚例ãˆã°ã€10TB ã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã—ã¦ã„ã‚‹å ´åˆã€ãƒ¬ãƒ—リカã‚ãŸã‚Š 100GB ã® RAM ãŒè‰¯ã„例ã§ã™ã€‚ + +顧客å‘ã‘ワークロードã®ã‚ˆã†ã«é »ç¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã‚‹ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«ã¯ã€ã‚ˆã‚Šå¤šãã®ãƒ¡ãƒ¢ãƒªã‚’使用ã—ã€1:30 ã‹ã‚‰ 1:50 ã®ãƒ¡ãƒ¢ãƒªå¯¾ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸æ¯”を推奨ã—ã¾ã™ã€‚ + +## レプリカ + +å„シャードã«å°‘ãªãã¨ã‚‚3ã¤ã®ãƒ¬ãƒ—リカをæŒã¤ã“ã¨ã‚’推奨ã—ã¾ã™ï¼ˆã¾ãŸã¯ [Amazon EBS](https://aws.amazon.com/ebs/) を使用ã—㟠2 ã¤ã®ãƒ¬ãƒ—リカ)。ã•ã‚‰ã«ã€è¿½åŠ ã®ãƒ¬ãƒ—リカを追加ã™ã‚‹å‰ã«ã™ã¹ã¦ã®ãƒ¬ãƒ—リカを垂直スケーリングã™ã‚‹ã“ã¨ã‚’æ案ã—ã¾ã™ï¼ˆæ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ï¼‰ã€‚ + +ClickHouse ã¯è‡ªå‹•çš„ã«ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’è¡Œã‚ãªã„ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®å†ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã«ã¯å¤šå¤§ãªã‚³ãƒ³ãƒ”ューティングリソースãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€å°†æ¥çš„ã«ãƒ‡ãƒ¼ã‚¿ã‚’å†ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã™ã‚‹å¿…è¦ã‚’é¿ã‘ã‚‹ãŸã‚ã€å¯èƒ½ãªé™ã‚Šå¤§ããªã‚µãƒ¼ãƒãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã‚’一般的ã«æŽ¨å¥¨ã—ã¾ã™ã€‚ + +[ClickHouse Cloud](https://clickhouse.com/cloud) を使用ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。ã“ã‚Œã¯è‡ªå‹•çš„ã«ã‚¹ã‚±ãƒ¼ãƒ«ã—ã€ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«åˆã‚ã›ã¦ãƒ¬ãƒ—リカã®æ•°ã‚’ç°¡å˜ã«åˆ¶å¾¡ã§ãã¾ã™ã€‚ + +## 大è¦æ¨¡ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®ä¾‹ç¤ºçš„ãªæ§‹æˆ + +ClickHouse ã®æ§‹æˆã¯ã€ç‰¹å®šã®ã‚¢ãƒ—リケーションã®è¦ä»¶ã«å¤§ããä¾å­˜ã—ã¾ã™ã€‚コストã¨ãƒ‘フォーマンスを最é©åŒ–ã™ã‚‹ãŸã‚ã®æ”¯æ´ã‚’希望ã•ã‚Œã‚‹å ´åˆã¯ã€[営業ã¾ã§ãŠå•ã„åˆã‚ã›ãã ã•ã„](https://clickhouse.com/company/contact?loc=docs-sizing-and-hardware-recommendations)。 + +ガイダンス(推奨ã§ã¯ã‚ã‚Šã¾ã›ã‚“)をæä¾›ã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã¯æœ¬ç•ªç’°å¢ƒã§ã® ClickHouse ユーザーã®ä¾‹ç¤ºçš„ãªæ§‹æˆã§ã™ã€‚ + +### Fortune 500 B2B SaaS + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ストレージ
月間新è¦ãƒ‡ãƒ¼ã‚¿é‡30TB
ç·ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ï¼ˆåœ§ç¸®ï¼‰540TB
データä¿æŒ18ヶ月
ノードã‚ãŸã‚Šã®ãƒ‡ã‚£ã‚¹ã‚¯25TB
CPU
åŒæ™‚実行性200以上ã®åŒæ™‚クエリ
レプリカ数(HAペアをå«ã‚€ï¼‰44
ノードã‚ãŸã‚Šã® vCPU62
ç· vCPU2700
メモリ
ç· RAM11TB
レプリカã‚ãŸã‚Šã® RAM256GB
RAM 対 vCPU 比率4:1
RAM 対ディスク比率1:50
+ +### Fortune 500 テレコムオペレーターã®ãƒ­ã‚°ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ストレージ
月間ログデータé‡4860TB
ç·ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ï¼ˆåœ§ç¸®ï¼‰608TB
データä¿æŒ30æ—¥
ノードã‚ãŸã‚Šã®ãƒ‡ã‚£ã‚¹ã‚¯13TB
CPU
レプリカ数(HAペアをå«ã‚€ï¼‰38
ノードã‚ãŸã‚Šã® vCPU42
ç· vCPU1600
メモリ
ç· RAM10TB
レプリカã‚ãŸã‚Šã® RAM256GB
RAM 対 vCPU 比率6:1
RAM 対ディスク比率1:60
+ +## ã•ã‚‰ãªã‚‹èª­ã¿ç‰© + +以下ã¯ã€ã‚ªãƒ¼ãƒ—ンソース㮠ClickHouse を使用ã™ã‚‹ä¼æ¥­ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã«é–¢ã™ã‚‹ãƒ–ログ記事ã§ã™ã€‚ + +- [Cloudflare](https://blog.cloudflare.com/http-analytics-for-6m-requests-per-second-using-clickhouse/?utm_source=linkedin&utm_medium=social&utm_campaign=blog) +- [eBay](https://innovation.ebayinc.com/tech/engineering/ou-online-analytical-processing/) +- [GitLab](https://handbook.gitlab.com/handbook/engineering/development/ops/monitor/observability/#clickhouse-datastore) +- [Lyft](https://eng.lyft.com/druid-deprecation-and-clickhouse-adoption-at-lyft-120af37651fd) +- [MessageBird](https://clickhouse.com/blog/how-messagebird-uses-clickhouse-to-monitor-the-delivery-of-billions-of-messages) +- [Microsoft](https://clickhouse.com/blog/self-service-data-analytics-for-microsofts-biggest-web-properties) +- [Uber](https://www.uber.com/en-ES/blog/logging/) +- [Zomato](https://blog.zomato.com/building-a-cost-effective-logging-platform-using-clickhouse-for-petabyte-scale) diff --git a/docs/ja/guides/sre/_category_.yml b/docs/ja/guides/sre/_category_.yml new file mode 100644 index 00000000000..6804e31fe37 --- /dev/null +++ b/docs/ja/guides/sre/_category_.yml @@ -0,0 +1,8 @@ +position: 5 +label: 'SRE Guides' +collapsible: true +collapsed: true +link: + type: generated-index + title: SRE Guides + slug: /ja/guides/sre diff --git a/docs/ja/guides/sre/configuring-ssl.md b/docs/ja/guides/sre/configuring-ssl.md new file mode 100644 index 00000000000..d0304f4d08e --- /dev/null +++ b/docs/ja/guides/sre/configuring-ssl.md @@ -0,0 +1,502 @@ +--- +slug: /ja/guides/sre/configuring-ssl +sidebar_label: SSL-TLSã®è¨­å®š +sidebar_position: 20 +--- +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_automated.md'; + +# SSL-TLSã®è¨­å®š + + + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ClickHouseã‚’OpenSSL証明書を使用ã—ã¦æŽ¥ç¶šã‚’検証ã™ã‚‹ãŸã‚ã®ç°¡å˜ã§æœ€å°é™ã®è¨­å®šã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¢ãƒ³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã§ã¯ã€è‡ªå·±ç½²åã®è¨¼æ˜Žå±€ (CA) 証明書ã¨ã‚­ãƒ¼ã‚’作æˆã—ã€é©åˆ‡ãªè¨­å®šã§ãƒŽãƒ¼ãƒ‰è¨¼æ˜Žæ›¸ã‚’使用ã—ã¦æŽ¥ç¶šã‚’è¡Œã„ã¾ã™ã€‚ + +:::note +TLSã®å®Ÿè£…ã¯è¤‡é›‘ã§ã‚ã‚Šã€å®Œå…¨ã«å®‰å…¨ã§å …牢ãªãƒ‡ãƒ—ロイメントを確ä¿ã™ã‚‹ãŸã‚ã«ã¯å¤šãã®ã‚ªãƒ—ションを考慮ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯åŸºæœ¬çš„ãªSSL/TLSã®è¨­å®šä¾‹ã‚’å«ã‚€ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ã™ã€‚組織内ã§æ­£ã—ã„証明書を生æˆã™ã‚‹ãŸã‚ã«PKI/セキュリティãƒãƒ¼ãƒ ã«ç›¸è«‡ã—ã¦ãã ã•ã„。 + +証明書ã®ä½¿ç”¨ã«ã¤ã„ã¦ã¯ã€ã“ã®[基本的ãªãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«](https://ubuntu.com/server/docs/security-certificates)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## 1. ClickHouse デプロイメントを作æˆã™ã‚‹ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€Ubuntu 20.04ãŠã‚ˆã³DEBパッケージ(aptを使用)を使用ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚ŒãŸClickHouseを以下ã®ãƒ›ã‚¹ãƒˆä¸Šã§ä½¿ç”¨ã™ã‚‹å½¢ã§æ›¸ã‹ã‚Œã¦ã„ã¾ã™ã€‚ドメイン㯠`marsnet.local` ã§ã™: + +|ホスト |IPアドレス| +|--------|-------------| +|chnode1 |192.168.1.221| +|chnode2 |192.168.1.222| +|chnode3 |192.168.1.223| + + +:::note +ClickHouseã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ–¹æ³•ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[クイックスタート](/docs/ja/getting-started/install.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + + +## 2. SSL 証明書を作æˆã™ã‚‹ +:::note +自己署å証明書ã¯ãƒ‡ãƒ¢ãƒ³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç›®çš„ã®ã¿ã§ä½¿ç”¨ã•ã‚Œã€å®Ÿé‹ç”¨ç’°å¢ƒã§ã¯ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。証明書è¦æ±‚ã¯ã€çµ„ç¹”ã«ã‚ˆã£ã¦ç½²åã•ã‚Œã€è¨­å®šã§æ§‹æˆã•ã‚Œã‚‹CAãƒã‚§ãƒ¼ãƒ³ã‚’使用ã—ã¦æ¤œè¨¼ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ãŸã ã—ã€ã“れらã®æ‰‹é †ã¯è¨­å®šã‚’構æˆãŠã‚ˆã³ãƒ†ã‚¹ãƒˆã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã‚ã‚Šã€ãã®å¾Œå®Ÿéš›ã«ä½¿ç”¨ã•ã‚Œã‚‹è¨¼æ˜Žæ›¸ã«ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +1. æ–°ã—ã„CAã«ä½¿ç”¨ã™ã‚‹ã‚­ãƒ¼ã‚’生æˆã—ã¾ã™: + ```bash + openssl genrsa -out marsnet_ca.key 2048 + ``` + +2. æ–°ã—ã„自己署åCA証明書を生æˆã—ã¾ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€CAキーを使用ã—ã¦ä»–ã®è¨¼æ˜Žæ›¸ã‚’ç½²åã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹æ–°ã—ã„証明書を生æˆã—ã¾ã™: + ```bash + openssl req -x509 -subj "/CN=marsnet.local CA" -nodes -key marsnet_ca.key -days 1095 -out marsnet_ca.crt + ``` + + :::note + キーã¨CA証明書ã¯ã‚¯ãƒ©ã‚¹ã‚¿å¤–ã®å®‰å…¨ãªå ´æ‰€ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã—ã¦ãã ã•ã„。ノード証明書ã®ç”Ÿæˆå¾Œã€ã‚­ãƒ¼ã¯ã‚¯ãƒ©ã‚¹ã‚¿ãƒŽãƒ¼ãƒ‰ã‹ã‚‰å‰Šé™¤ã—ã¦ãã ã•ã„。 + ::: + +3. æ–°ã—ã„CA証明書ã®å†…容を確èªã—ã¾ã™: + ```bash + openssl x509 -in marsnet_ca.crt -text + ``` + +4. å„ノードã«è¨¼æ˜Žæ›¸è¦æ±‚ (CSR) ã¨ã‚­ãƒ¼ã‚’生æˆã—ã¾ã™: + ```bash + openssl req -newkey rsa:2048 -nodes -subj "/CN=chnode1" -addext "subjectAltName = DNS:chnode1.marsnet.local,IP:192.168.1.221" -keyout chnode1.key -out chnode1.csr + openssl req -newkey rsa:2048 -nodes -subj "/CN=chnode2" -addext "subjectAltName = DNS:chnode2.marsnet.local,IP:192.168.1.222" -keyout chnode2.key -out chnode2.csr + openssl req -newkey rsa:2048 -nodes -subj "/CN=chnode3" -addext "subjectAltName = DNS:chnode3.marsnet.local,IP:192.168.1.223" -keyout chnode3.key -out chnode3.csr + ``` + +5. CSRã¨CAを使用ã—ã¦æ–°ã—ã„証明書ã¨ã‚­ãƒ¼ã®ãƒšã‚¢ã‚’作æˆã—ã¾ã™: + ```bash + openssl x509 -req -in chnode1.csr -out chnode1.crt -CA marsnet_ca.crt -CAkey marsnet_ca.key -days 365 -copy_extensions copy + openssl x509 -req -in chnode2.csr -out chnode2.crt -CA marsnet_ca.crt -CAkey marsnet_ca.key -days 365 -copy_extensions copy + openssl x509 -req -in chnode3.csr -out chnode3.crt -CA marsnet_ca.crt -CAkey marsnet_ca.key -days 365 -copy_extensions copy + ``` + +6. サブジェクトã¨ç™ºè¡Œè€…ãŒæ­£ã—ã„ã“ã¨ã‚’確èªã—ã¾ã™: + ```bash + openssl x509 -in chnode1.crt -text -noout + ``` + +7. æ–°ã—ã„証明書ãŒCA証明書ã¨æ¤œè¨¼ã•ã‚Œã‚‹ã“ã¨ã‚’確èªã—ã¾ã™: + ```bash + openssl verify -CAfile marsnet_ca.crt chnode1.crt + chnode1.crt: OK + ``` + +## 3. 証明書ãŠã‚ˆã³ã‚­ãƒ¼ã‚’ä¿å­˜ã™ã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’作æˆãŠã‚ˆã³æ§‹æˆã™ã‚‹ + +:::note +ã“ã‚Œã¯å„ノードã§è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚é©åˆ‡ãªè¨¼æ˜Žæ›¸ãŠã‚ˆã³ã‚­ãƒ¼ã‚’å„ホストã§ä½¿ç”¨ã—ã¦ãã ã•ã„。 +::: + +1. å„ノードã§ClickHouseãŒã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãªãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ãƒ•ã‚©ãƒ«ãƒ€ã‚’作æˆã—ã¾ã™ã€‚デフォルトã®æ§‹æˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªï¼ˆä¾‹: `/etc/clickhouse-server`)を推奨ã—ã¾ã™: + ```bash + mkdir /etc/clickhouse-server/certs + ``` + +2. å„ノードã«å¯¾å¿œã™ã‚‹CA証明書ã€ãƒŽãƒ¼ãƒ‰è¨¼æ˜Žæ›¸ã€ãŠã‚ˆã³ã‚­ãƒ¼ã‚’æ–°ã—ã„証明書ディレクトリã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ + +3. ClickHouseãŒè¨¼æ˜Žæ›¸ã‚’読ã¿å–れるよã†ã«æ‰€æœ‰è€…ã¨ãƒ‘ーミッションを更新ã—ã¾ã™: + ```bash + chown clickhouse:clickhouse -R /etc/clickhouse-server/certs + chmod 600 /etc/clickhouse-server/certs/* + chmod 755 /etc/clickhouse-server/certs + ll /etc/clickhouse-server/certs + ``` + + ```response + total 20 + drw-r--r-- 2 clickhouse clickhouse 4096 Apr 12 20:23 ./ + drwx------ 5 clickhouse clickhouse 4096 Apr 12 20:23 ../ + -rw------- 1 clickhouse clickhouse 997 Apr 12 20:22 chnode1.crt + -rw------- 1 clickhouse clickhouse 1708 Apr 12 20:22 chnode1.key + -rw------- 1 clickhouse clickhouse 1131 Apr 12 20:23 marsnet_ca.crt + ``` + +## 4. ClickHouse Keeperを使用ã—ã¦åŸºæœ¬çš„ãªã‚¯ãƒ©ã‚¹ã‚¿ã‚’æŒã¤ç’°å¢ƒã‚’構æˆã™ã‚‹ + +ã“ã®ãƒ‡ãƒ—ロイメント環境ã§ã¯ã€ä»¥ä¸‹ã®ClickHouse Keeper 設定をå„ノードã§ä½¿ç”¨ã—ã¾ã™ã€‚å„サーãƒãƒ¼ã«ã¯ç‹¬è‡ªã® `` ãŒè¨­å®šã•ã‚Œã¾ã™ã€‚(例: ノード `chnode1` ã«ã¯ `1` ãªã©ï¼‰ + +:::note +ClickHouse Keeper推奨ãƒãƒ¼ãƒˆã¯ `9281` ã§ã™ã€‚ãŸã ã—ã€ã“ã®ãƒãƒ¼ãƒˆãŒã™ã§ã«ç’°å¢ƒå†…ã®ä»–ã®ã‚¢ãƒ—リケーションã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ãƒãƒ¼ãƒˆã‚’変更ã§ãã¾ã™ã€‚ + +ã™ã¹ã¦ã®ã‚ªãƒ—ションã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€æ¬¡ã‚’å‚ç…§ã—ã¦ãã ã•ã„: https://clickhouse.com/docs/ja/operations/clickhouse-keeper/ +::: + + +1. 次ã®è¨­å®šã‚’ClickHouseサーãƒãƒ¼ã® `config.xml` ã® `` タグ内ã«è¿½åŠ ã—ã¾ã™ + + :::note + 本番環境ã«ã¯ã€`config.d` ディレクトリã«åˆ¥ã® `.xml` 設定ファイルを使用ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ + 詳細ã«ã¤ã„ã¦ã¯ã€https://clickhouse.com/docs/ja/operations/configuration-files/ ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + ::: + + ```xml + + 9281 + 1 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + + 10000 + 30000 + trace + + + + true + + 1 + chnode1.marsnet.local + 9444 + + + 2 + chnode2.marsnet.local + 9444 + + + 3 + chnode3.marsnet.local + 9444 + + + + ``` + +2. ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã§keeper設定をコメント解除ã—ã€`` フラグを1ã«è¨­å®šã—ã¾ã™: + ```xml + + + chnode1.marsnet.local + 9281 + 1 + + + chnode2.marsnet.local + 9281 + 1 + + + chnode3.marsnet.local + 9281 + 1 + + + ``` + +3. 以下ã®ã‚¯ãƒ©ã‚¹ã‚¿è¨­å®šã‚’ `chnode1` 㨠`chnode2` ã«æ›´æ–°ã—ã¦è¿½åŠ ã—ã¾ã™ã€‚ `chnode3` ã¯ClickHouse Keeperã®ã‚¯ã‚©ãƒ¼ãƒ©ãƒ ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + + :::note + ã“ã®æ§‹æˆã§ã¯ã€1ã¤ã®ã‚µãƒ³ãƒ—ルクラスタã®ã¿ãŒè¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚テストサンプルã®ã‚¯ãƒ©ã‚¹ã‚¿ã¯å‰Šé™¤ã™ã‚‹ã‹ã‚³ãƒ¡ãƒ³ãƒˆã‚¢ã‚¦ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€ã¾ãŸã¯ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ã„る既存ã®ã‚¯ãƒ©ã‚¹ã‚¿ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ãã‚Œã«å¯¾å¿œã™ã‚‹ãƒãƒ¼ãƒˆã‚’æ›´æ–°ã—ã€`` オプションを追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€`users.xml` ファイルやインストール時㫠`default` ユーザーã«ãƒ‘スワードãŒè¨­å®šã•ã‚Œã¦ã„ãŸå ´åˆã¯ã€`` を設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + ::: + + 以下ã®å†…容ã¯ã€2ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã«1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ãƒ¬ãƒ—リカをæŒã¤ã‚¯ãƒ©ã‚¹ã‚¿ã‚’作æˆã—ã¾ã™ã€‚ + ```xml + + + + + chnode1.marsnet.local + 9440 + default + ClickHouse123! + 1 + + + chnode2.marsnet.local + 9440 + default + ClickHouse123! + 1 + + + + + ``` + +4. ReplicatedMergeTreeテーブルをテストã™ã‚‹ãŸã‚ã«ãƒžã‚¯ãƒ­å€¤ã‚’定義ã—ã¾ã™ã€‚ `chnode1` ã§ã¯: + ```xml + + 1 + replica_1 + + ``` + + `chnode2` ã§ã¯: + ```xml + + 1 + replica_2 + + ``` + +## 5. ClickHouse ノード上ã§SSL-TLSインターフェースを設定ã™ã‚‹ +以下ã®è¨­å®šã¯ã€ClickHouseサーãƒãƒ¼ã® `config.xml` ã«æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ + +1. (オプション) デプロイメントã®è¡¨ç¤ºåを設定ã—ã¾ã™: + ```xml + clickhouse + ``` + +2. ClickHouseãŒå¤–部ãƒãƒ¼ãƒˆã§ãƒªãƒƒã‚¹ãƒ³ã™ã‚‹ã‚ˆã†ã«è¨­å®šã—ã¾ã™: + ```xml + 0.0.0.0 + ``` + +3. å„ノード㧠`https` ãƒãƒ¼ãƒˆã‚’構æˆã—ã€`http` ãƒãƒ¼ãƒˆã‚’無効ã«ã—ã¾ã™: + ```xml + 8443 + + ``` + +4. å„ノードã§ClickHouse Nativeã®ã‚»ã‚­ãƒ¥ã‚¢TCPãƒãƒ¼ãƒˆã‚’構æˆã—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®éžã‚»ã‚­ãƒ¥ã‚¢ãƒãƒ¼ãƒˆã‚’無効ã«ã—ã¾ã™: + ```xml + 9440 + + ``` + +5. å„ノード㧠`interserver https` ãƒãƒ¼ãƒˆã‚’構æˆã—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®éžã‚»ã‚­ãƒ¥ã‚¢ãƒãƒ¼ãƒˆã‚’無効ã«ã—ã¾ã™: + ```xml + 9010 + + ``` + +6. OpenSSLを証明書ã¨ãƒ‘スã§æ§‹æˆã™ã‚‹ + + :::note + å„ファイルåã¨ãƒ‘スã¯ã€è¨­å®šã•ã‚Œã‚‹ãƒŽãƒ¼ãƒ‰ã«åˆã‚ã›ã¦æ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + ãŸã¨ãˆã°ã€`chnode2` ホストを構æˆã™ã‚‹éš›ã«ã¯ã€`` エントリを `chnode2.crt` ã«æ›´æ–°ã—ã¾ã™ã€‚ + ::: + + ```xml + + + /etc/clickhouse-server/certs/chnode1.crt + /etc/clickhouse-server/certs/chnode1.key + relaxed + /etc/clickhouse-server/certs/marsnet_ca.crt + true + sslv2,sslv3 + true + + + false + /etc/clickhouse-server/certs/marsnet_ca.crt + true + sslv2,sslv3 + true + relaxed + + RejectCertificateHandler + + + + ``` + + 詳細ã«ã¤ã„ã¦ã¯ã€https://clickhouse.com/docs/ja/operations/server-configuration-parameters/settings/#server_configuration_parameters-openssl ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + + +7. å„ノードã§SSL用ã«gRPCを設定ã™ã‚‹: + ```xml + + 1 + /etc/clickhouse-server/certs/chnode1.crt + /etc/clickhouse-server/certs/chnode1.key + true + /etc/clickhouse-server/certs/marsnet_ca.crt + none + 0 + -1 + -1 + false + + ``` + + 詳細ã«ã¤ã„ã¦ã¯ã€https://clickhouse.com/docs/ja/interfaces/grpc/ ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +8. å°‘ãªãã¨ã‚‚1ã¤ã®ãƒŽãƒ¼ãƒ‰ã§ã€æŽ¥ç¶šã‚’SSLã§è¡Œã†ãŸã‚ã«ClickHouseクライアントを設定ã—ã€ãã®è‡ªèº«ã® `config.xml`ファイルを使用ã—ã¦ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯`/etc/clickhouse-client/`): + ```xml + + + false + /etc/clickhouse-server/certs/marsnet_ca.crt + true + sslv2,sslv3 + true + + RejectCertificateHandler + + + + ``` + +6. MySQLãŠã‚ˆã³PostgreSQLã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚¨ãƒŸãƒ¥ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒãƒ¼ãƒˆã‚’無効ã«ã™ã‚‹: + ```xml + + + ``` + +## 6. テスト +1. å„ノード別ã«ä¸€åº¦ã«èµ·å‹•ã—ã¾ã™: + ```bash + service clickhouse-server start + ``` + +2. セキュアãƒãƒ¼ãƒˆãŒèµ·å‹•ã—ã€ãƒªã‚¹ãƒ‹ãƒ³ã‚°ã—ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚å„ノードã§ã“ã®ä¾‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + ```bash + root@chnode1:/etc/clickhouse-server# netstat -ano | grep tcp + ``` + + ```response + tcp 0 0 0.0.0.0:9010 0.0.0.0:* LISTEN off (0.00/0/0) + tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN off (0.00/0/0) + tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN off (0.00/0/0) + tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN off (0.00/0/0) + tcp 0 0 0.0.0.0:9440 0.0.0.0:* LISTEN off (0.00/0/0) + tcp 0 0 0.0.0.0:9281 0.0.0.0:* LISTEN off (0.00/0/0) + tcp 0 0 192.168.1.221:33046 192.168.1.222:9444 ESTABLISHED off (0.00/0/0) + tcp 0 0 192.168.1.221:42730 192.168.1.223:9444 ESTABLISHED off (0.00/0/0) + tcp 0 0 192.168.1.221:51952 192.168.1.222:9281 ESTABLISHED off (0.00/0/0) + tcp 0 0 192.168.1.221:22 192.168.1.210:49801 ESTABLISHED keepalive (6618.05/0/0) + tcp 0 64 192.168.1.221:22 192.168.1.210:59195 ESTABLISHED on (0.24/0/0) + tcp6 0 0 :::22 :::* LISTEN off (0.00/0/0) + tcp6 0 0 :::9444 :::* LISTEN off (0.00/0/0) + tcp6 0 0 192.168.1.221:9444 192.168.1.222:59046 ESTABLISHED off (0.00/0/0) + tcp6 0 0 192.168.1.221:9444 192.168.1.223:41976 ESTABLISHED off (0.00/0/0) + ``` + + |ClickHouse ãƒãƒ¼ãƒˆ |説明| + |--------|-------------| + |8443 | https インターフェース| + |9010 | interserver https ãƒãƒ¼ãƒˆ| + |9281 | ClickHouse Keeper セキュアãƒãƒ¼ãƒˆ| + |9440 | セキュアNative TCPプロトコル| + |9444 | ClickHouse Keeper Raftãƒãƒ¼ãƒˆ | + +3. ClickHouse Keeperã®ãƒ˜ãƒ«ã‚¹ã‚’確èªã™ã‚‹ +典型的ãª[4文字å˜èªž (4lW)](/docs/ja/guides/sre/keeper/index.md#four-letter-word-commands) コマンドã¯TLSãªã—ã§ã¯ `echo` を使用ã—ã¦å‹•ä½œã—ã¾ã›ã‚“。ã“ã“ã§ã¯ã€`openssl` を使用ã—ã¦ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¾ã™ã€‚ + - `openssl` ã§ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–セッションを開始 + + ```bash + openssl s_client -connect chnode1.marsnet.local:9281 + ``` + ```response + CONNECTED(00000003) + depth=0 CN = chnode1 + verify error:num=20:unable to get local issuer certificate + verify return:1 + depth=0 CN = chnode1 + verify error:num=21:unable to verify the first certificate + verify return:1 + --- + Certificate chain + 0 s:CN = chnode1 + i:CN = marsnet.local CA + --- + Server certificate + -----BEGIN CERTIFICATE----- + MIICtDCCAZwCFD321grxU3G5pf6hjitf2u7vkusYMA0GCSqGSIb3DQEBCwUAMBsx + ... + ``` + + - opensslセッションã§4LWコマンドをé€ä¿¡ + + ```bash + mntr + ``` + ```response + --- + Post-Handshake New Session Ticket arrived: + SSL-Session: + Protocol : TLSv1.3 + ... + read R BLOCK + zk_version v22.7.3.5-stable-e140b8b5f3a5b660b6b576747063fd040f583cf3 + zk_avg_latency 0 + # highlight-next-line + zk_max_latency 4087 + zk_min_latency 0 + zk_packets_received 4565774 + zk_packets_sent 4565773 + zk_num_alive_connections 2 + zk_outstanding_requests 0 + # highlight-next-line + zk_server_state leader + zk_znode_count 1087 + zk_watch_count 26 + zk_ephemerals_count 12 + zk_approximate_data_size 426062 + zk_key_arena_size 258048 + zk_latest_snapshot_size 0 + zk_open_file_descriptor_count 187 + zk_max_file_descriptor_count 18446744073709551615 + # highlight-next-line + zk_followers 2 + zk_synced_followers 1 + closed + ``` + +4. `--secure` フラグã¨SSLãƒãƒ¼ãƒˆã‚’使用ã—ã¦ClickHouseクライアントを開始ã—ã¾ã™: + ```bash + root@chnode1:/etc/clickhouse-server# clickhouse-client --user default --password ClickHouse123! --port 9440 --secure --host chnode1.marsnet.local + ClickHouse client version 22.3.3.44 (official build). + Connecting to chnode1.marsnet.local:9440 as user default. + Connected to ClickHouse server version 22.3.3 revision 54455. + + clickhouse :) + ``` + +5. `https` インターフェースを使用ã—㦠`https://chnode1.marsnet.local:8443/play` ã§Play UIã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚ + + ![Play UI](images/configuring-ssl_01.png) + + :::note + ワークステーションã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦ãŠã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ã®ãƒ«ãƒ¼ãƒˆCAストアã«è¨¼æ˜Žæ›¸ãŒãªã„å ´åˆã€ãƒ–ラウザã¯ä¸ä¿¡å¬ã®è¨¼æ˜Žæ›¸ã‚’表示ã—ã¾ã™ã€‚ + 公共機関やä¼æ¥­CAã‹ã‚‰ç™ºè¡Œã•ã‚ŒãŸè¨¼æ˜Žæ›¸ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã€ä¿¡é ¼ã•ã‚ŒãŸçŠ¶æ…‹ã§è¡¨ç¤ºã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ + ::: + +6. レプリケートテーブルを作æˆã—ã¾ã™: + ```sql + clickhouse :) CREATE TABLE repl_table ON CLUSTER cluster_1S_2R + ( + id UInt64, + column1 Date, + column2 String + ) + ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/default/repl_table', '{replica}' ) + ORDER BY (id); + ``` + + ```response + ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+ │ chnode2.marsnet.local │ 9440 │ 0 │ │ 1 │ 0 │ + │ chnode1.marsnet.local │ 9440 │ 0 │ │ 0 │ 0 │ + └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘ + ``` + +7. `chnode1` ã«2行追加ã—ã¾ã™: + ```sql + INSERT INTO repl_table + (id, column1, column2) + VALUES + (1,'2022-04-01','abc'), + (2,'2022-04-02','def'); + ``` + +8. `chnode2` ã§è¡Œã‚’閲覧ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ãƒ¬ãƒ—リケーションを確èªã—ã¾ã™: + ```sql + SELECT * FROM repl_table + ``` + + ```response + ┌─id─┬────column1─┬─column2─┠+ │ 1 │ 2022-04-01 │ abc │ + │ 2 │ 2022-04-02 │ def │ + └────┴────────────┴─────────┘ + ``` + +## ã¾ã¨ã‚ + +ã“ã®è¨˜äº‹ã¯ã€ClickHouse環境ãŒSSL/TLSã§æ§‹æˆã•ã‚Œã‚‹ã‚ˆã†ã«ã™ã‚‹ã“ã¨ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚生産環境ã®ç•°ãªã‚‹è¦ä»¶ã«å¿œã˜ã¦è¨­å®šã¯ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆãŸã¨ãˆã°ã€è¨¼æ˜Žæ›¸ã®æ¤œè¨¼ãƒ¬ãƒ™ãƒ«ã€ãƒ—ロトコルã€æš—å·ãªã©ï¼‰ã€‚ã—ã‹ã—ã€ã‚»ã‚­ãƒ¥ã‚¢ãªæŽ¥ç¶šã‚’構æˆã—実施ã™ã‚‹ãŸã‚ã«å¿…è¦ãªæ‰‹é †ã‚’ç†è§£ã™ã‚‹ã“ã¨ãŒã§ããŸã¯ãšã§ã™ã€‚ diff --git a/docs/ja/guides/sre/images/configuring-ssl_01.png b/docs/ja/guides/sre/images/configuring-ssl_01.png new file mode 100644 index 00000000000..89872675f12 Binary files /dev/null and b/docs/ja/guides/sre/images/configuring-ssl_01.png differ diff --git a/docs/ja/guides/sre/keeper/_category_.yml b/docs/ja/guides/sre/keeper/_category_.yml new file mode 100644 index 00000000000..9349d42f22e --- /dev/null +++ b/docs/ja/guides/sre/keeper/_category_.yml @@ -0,0 +1,8 @@ +position: 5 +label: 'ClickHouse Keeper' +collapsible: true +collapsed: true +link: + type: generated-index + title: ClickHouse Keeper + slug: /ja/guides/sre/clickhouse-keeper diff --git a/docs/ja/guides/sre/keeper/index.md b/docs/ja/guides/sre/keeper/index.md new file mode 100644 index 00000000000..c64ba889be3 --- /dev/null +++ b/docs/ja/guides/sre/keeper/index.md @@ -0,0 +1,1295 @@ +--- +slug: /ja/guides/sre/keeper/clickhouse-keeper + +sidebar_label: ClickHouse Keeperã®è¨­å®š +sidebar_position: 10 +keywords: + - Keeper + - ZooKeeper + - clickhouse-keeper + - レプリケーション +description: ClickHouse Keeperã¾ãŸã¯clickhouse-keeperã¯ã€ZooKeeperã‚’ç½®ãæ›ãˆã‚‹ã‚‚ã®ã§ã€ãƒ¬ãƒ—リケーションã¨èª¿æ•´ã‚’æä¾›ã—ã¾ã™ã€‚ +--- + +# ClickHouse Keeper (clickhouse-keeper) + +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_automated.md'; + + + +ClickHouse Keeperã¯ã€ãƒ‡ãƒ¼ã‚¿ã®[レプリケーション](/docs/ja/engines/table-engines/mergetree-family/replication.md)ã¨[分散DDL](/docs/ja/sql-reference/distributed-ddl.md)クエリã®å®Ÿè¡Œã‚’調整ã™ã‚‹ã‚·ã‚¹ãƒ†ãƒ ã‚’æä¾›ã—ã¾ã™ã€‚ClickHouse Keeperã¯ZooKeeperã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +### 実装ã®è©³ç´° {#implementation-details} + +ZooKeeperã¯ã€æœ€åˆã«çŸ¥ã‚‰ã‚Œã‚‹ã‚ªãƒ¼ãƒ—ンソースã®èª¿æ•´ã‚·ã‚¹ãƒ†ãƒ ã®1ã¤ã§ã™ã€‚Javaã§å®Ÿè£…ã•ã‚Œã¦ãŠã‚Šã€éžå¸¸ã«ã‚·ãƒ³ãƒ—ルã§å¼·åŠ›ãªãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ZooKeeperã®èª¿æ•´ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã€ZooKeeper Atomic Broadcast (ZAB)ã¯ã€å„ZooKeeperノードãŒãƒ­ãƒ¼ã‚«ãƒ«ã«èª­ã¿å–ã‚Šã‚’è¡Œã†ãŸã‚ã€èª­ã¿å–ã‚Šã«å¯¾ã™ã‚‹ç·šå½¢åŒ–å¯èƒ½æ€§ä¿è¨¼ã‚’æä¾›ã—ã¾ã›ã‚“。ZooKeeperã¨ã¯ç•°ãªã‚Šã€ClickHouse Keeperã¯C++ã§æ›¸ã‹ã‚Œã¦ãŠã‚Šã€[RAFTアルゴリズム](https://raft.github.io/)ã®[実装](https://github.com/eBay/NuRaft)を使用ã—ã¦ã„ã¾ã™ã€‚ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯èª­ã¿æ›¸ãã«å¯¾ã™ã‚‹ç·šå½¢åŒ–å¯èƒ½æ€§ã‚’許å¯ã—ã€ã•ã¾ã–ã¾ãªè¨€èªžã§ã‚ªãƒ¼ãƒ—ンソースã®å®Ÿè£…ãŒã‚ã‚Šã¾ã™ã€‚ + +デフォルトã§ã¯ã€ClickHouse Keeperã¯ZooKeeperã¨åŒã˜ä¿è¨¼ã‚’æä¾›ã—ã¾ã™ï¼šç·šå½¢åŒ–å¯èƒ½ãªæ›¸ãè¾¼ã¿ã¨éžç·šå½¢åŒ–å¯èƒ½ãªèª­ã¿å–ã‚Šã§ã™ã€‚クライアントサーãƒãƒ¼ãƒ—ロトコルã¯äº’æ›æ€§ãŒã‚ã‚‹ãŸã‚ã€ä»»æ„ã®æ¨™æº–çš„ãªZooKeeperクライアントを使用ã—ã¦ClickHouse Keeperã¨å¯¾è©±ã§ãã¾ã™ã€‚スナップショットã¨ãƒ­ã‚°ã¯ZooKeeperã¨ã¯äº’æ›æ€§ã®ãªã„å½¢å¼ã§ã™ãŒã€`clickhouse-keeper-converter`ツールを使用ã—ã¦ZooKeeperデータをClickHouse Keeperスナップショットã«å¤‰æ›ã§ãã¾ã™ã€‚ClickHouse Keeperã®ã‚¤ãƒ³ã‚¿ãƒ¼ã‚µãƒ¼ãƒãƒ¼ãƒ—ロトコルもZooKeeperã¨äº’æ›æ€§ãŒãªã„ãŸã‚ã€ZooKeeper / ClickHouse Keeperã®æ··åˆã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã¯ä¸å¯èƒ½ã§ã™ã€‚ + +ClickHouse Keeperã¯ã€[ZooKeeper](https://zookeeper.apache.org/doc/r3.1.2/zookeeperProgrammers.html#sc_ZooKeeperAccessControl)ã¨åŒã˜æ–¹æ³•ã§ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ãƒªã‚¹ãƒˆï¼ˆACL)をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ClickHouse Keeperã¯ã€åŒã˜æ¨©é™ã‚»ãƒƒãƒˆã‚’サãƒãƒ¼ãƒˆã—ã€`world`ã€`auth`ã€ãŠã‚ˆã³`digest`ã®åŒä¸€ã®çµ„ã¿è¾¼ã¿ã‚¹ã‚­ãƒ¼ãƒ ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ダイジェストèªè¨¼ã‚¹ã‚­ãƒ¼ãƒ ã¯`username:password`ペアを使用ã—ã€ãƒ‘スワードã¯Base64ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +:::note +外部統åˆã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: + +### 設定 {#configuration} + +ClickHouse Keeperã¯ã€ZooKeeperã®ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã®ä»£æ›¿å“ã¨ã—ã¦ã€ã¾ãŸã¯ClickHouseサーãƒãƒ¼ã®å†…部ã®ä¸€éƒ¨ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ã„ãšã‚Œã®å ´åˆã‚‚ã€è¨­å®šã¯ã»ã¼åŒã˜`.xml`ファイルã§ã™ã€‚ + +#### Keeperã®è¨­å®šé …ç›® + +ClickHouse Keeperã®ä¸»ãªè¨­å®šã‚¿ã‚°ã¯``ã§ã€ä»¥ä¸‹ã®ãƒ‘ラメータãŒã‚ã‚Šã¾ã™ï¼š + +| パラメータ | 説明 | デフォルト | +|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------| +| `tcp_port` | クライアントãŒæŽ¥ç¶šã™ã‚‹ãŸã‚ã®ãƒãƒ¼ãƒˆã€‚ | `2181` | +| `tcp_port_secure` | クライアントã¨keeperサーãƒãƒ¼é–“ã®SSL接続ã®ãŸã‚ã®ã‚»ã‚­ãƒ¥ã‚¢ãƒãƒ¼ãƒˆã€‚ | - | +| `server_id` | ユニークãªã‚µãƒ¼ãƒãƒ¼ID。ClickHouse Keeperクラスターã®å„å‚加者ã¯ã€1, 2, 3ã¨ã„ã£ãŸãƒ¦ãƒ‹ãƒ¼ã‚¯ãªç•ªå·ã‚’æŒãŸãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 | - | +| `log_storage_path` | 調整ログã®ä¿å­˜ãƒ‘ス。ZooKeeperã¨åŒæ§˜ã«ã€ãƒ­ã‚°ã¯ãƒ“ジーã§ãªã„ノードã«ä¿å­˜ã™ã‚‹ã®ãŒæœ€é©ã§ã™ã€‚ | - | +| `snapshot_storage_path` | 調整スナップショットã®ä¿å­˜ãƒ‘ス。 | - | +| `enable_reconfiguration` | [`reconfig`](#reconfiguration)を介ã—ãŸå‹•çš„クラスターå†è¨­å®šã‚’有効ã«ã—ã¾ã™ã€‚ | `False` | +| `max_memory_usage_soft_limit` | Keeperã®æœ€å¤§ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã®ã‚½ãƒ•ãƒˆåˆ¶é™ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ | `max_memory_usage_soft_limit_ratio` * `physical_memory_amount` | +| `max_memory_usage_soft_limit_ratio` | `max_memory_usage_soft_limit`ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„ã‹0ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã®å€¤ã‚’使用ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚½ãƒ•ãƒˆåˆ¶é™ã‚’定義ã—ã¾ã™ã€‚ | `0.9` | +| `cgroups_memory_observer_wait_time` | `max_memory_usage_soft_limit`ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„ã‹0ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ç‰©ç†ãƒ¡ãƒ¢ãƒªé‡ã‚’監視ã™ã‚‹ãŸã‚ã®é–“隔。ã“ã®ãƒ¡ãƒ¢ãƒªé‡ãŒå¤‰åŒ–ã™ã‚‹ã¨ã€`max_memory_usage_soft_limit_ratio`ã«ã‚ˆã£ã¦Keeperã®ãƒ¡ãƒ¢ãƒªã‚½ãƒ•ãƒˆåˆ¶é™ã‚’å†è¨ˆç®—ã—ã¾ã™ã€‚ | `15` | +| `http_control` | [HTTP control](#http-control)インターフェイスã®è¨­å®šã€‚ | - | +| `digest_enabled` | リアルタイムデータ整åˆæ€§ãƒã‚§ãƒƒã‚¯ã‚’有効ã«ã—ã¾ã™ã€‚ | `True` | +| `create_snapshot_on_exit` | シャットダウン時ã«ã‚¹ãƒŠãƒƒãƒ—ショットを作æˆã—ã¾ã™ã€‚ | - | +| `hostname_checks_enabled` | クラスター設定ã®ãŸã‚ã®ãƒ›ã‚¹ãƒˆåãƒã‚§ãƒƒã‚¯ã‚’有効ã«ã—ã¾ã™ï¼ˆä¾‹ï¼šãƒªãƒ¢ãƒ¼ãƒˆã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã¨ä¸€ç·’ã«localhostãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆï¼‰ã€‚ | `True` | + +ä»–ã®ä¸€èˆ¬çš„ãªãƒ‘ラメータã¯ã€ClickHouseサーãƒãƒ¼ã®è¨­å®šï¼ˆ`listen_host`ã€`logger`ãªã©ï¼‰ã‹ã‚‰ç¶™æ‰¿ã•ã‚Œã¾ã™ã€‚ + +#### 内部調整設定 + +内部ã®èª¿æ•´è¨­å®šã¯ã€`.`セクションã«ã‚ã‚Šã€ä»¥ä¸‹ã®ãƒ‘ラメータãŒã‚ã‚Šã¾ã™ï¼š + +| パラメータ | 説明 | デフォルト | +|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------| +| `operation_timeout_ms` | å˜ä¸€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆæ“作ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆms)。 | `10000` | +| `min_session_timeout_ms` | クライアントセッションã®æœ€å°ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆms)。 | `10000` | +| `session_timeout_ms` | クライアントセッションã®æœ€å¤§ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆms)。 | `100000` | +| `dead_session_check_period_ms` | ClickHouse KeeperãŒãƒ‡ãƒƒãƒ‰ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’ãƒã‚§ãƒƒã‚¯ã—削除ã™ã‚‹é »åº¦ï¼ˆms)。 | `500` | +| `heart_beat_interval_ms` | ClickHouse KeeperリーダーãŒãƒ•ã‚©ãƒ­ãƒ¯ãƒ¼ã«ãƒãƒ¼ãƒˆãƒ“ートをé€ä¿¡ã™ã‚‹é »åº¦ï¼ˆms)。 | `500` | +| `election_timeout_lower_bound_ms` | フォロワーãŒã“ã®é–“隔内ã«ãƒªãƒ¼ãƒ€ãƒ¼ã‹ã‚‰ãƒãƒ¼ãƒˆãƒ“ートをå—ä¿¡ã—ãªã„å ´åˆã€ãƒ•ã‚©ãƒ­ãƒ¯ãƒ¼ã¯ãƒªãƒ¼ãƒ€ãƒ¼é¸æŒ™ã‚’開始ã§ãã¾ã™ã€‚`election_timeout_upper_bound_ms`よりå°ã•ãã¾ãŸã¯ç­‰ã—ããªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ç†æƒ³çš„ã«ã¯ç­‰ã—ããªã„æ–¹ãŒè‰¯ã„ã§ã™ã€‚ | `1000` | +| `election_timeout_upper_bound_ms` | フォロワーãŒã“ã®é–“隔内ã«ãƒªãƒ¼ãƒ€ãƒ¼ã‹ã‚‰ãƒãƒ¼ãƒˆãƒ“ートをå—ä¿¡ã—ãªã„å ´åˆã€ãƒªãƒ¼ãƒ€ãƒ¼é¸æŒ™ã‚’開始ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 | `2000` | +| `rotate_log_storage_interval` | å˜ä¸€ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã™ã‚‹ãƒ­ã‚°ãƒ¬ã‚³ãƒ¼ãƒ‰ã®æ•°ã€‚ | `100000` | +| `reserved_log_items` | コンパクションå‰ã«ä¿å­˜ã™ã‚‹èª¿æ•´ãƒ­ã‚°ãƒ¬ã‚³ãƒ¼ãƒ‰ã®æ•°ã€‚ | `100000` | +| `snapshot_distance` | ClickHouse KeeperãŒæ–°ã—ã„スナップショットを作æˆã™ã‚‹é »åº¦ï¼ˆãƒ­ã‚°å†…ã®ãƒ¬ã‚³ãƒ¼ãƒ‰æ•°ã§ï¼‰ã€‚ | `100000` | +| `snapshots_to_keep` | ä¿æŒã™ã‚‹ã‚¹ãƒŠãƒƒãƒ—ショットã®æ•°ã€‚ | `3` | +| `stale_log_gap` | リーダーãŒãƒ•ã‚©ãƒ­ãƒ¯ãƒ¼ã‚’å¤ããªã£ãŸã¨è¦‹ãªã—ã¦ã‚¹ãƒŠãƒƒãƒ—ショットをé€ä¿¡ã™ã‚‹ä»£ã‚ã‚Šã«ãƒ­ã‚°ã‚’é€ä¿¡ã™ã‚‹ã—ãã„値。 | `10000` | +| `fresh_log_gap` | ノードãŒæ–°ã—ããªã£ãŸã¨ã。 | `200` | +| `max_requests_batch_size` | RAFTã«é€ä¿¡ã™ã‚‹å‰ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ãƒãƒƒãƒã§ã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒªã‚¯ã‚¨ã‚¹ãƒˆæ•°ï¼‰ã€‚ | `100` | +| `force_sync` | 調整ログã¸ã®å„書ãè¾¼ã¿ã§`fsync`を呼ã³å‡ºã—ã¾ã™ã€‚ | `true` | +| `quorum_reads` | 全体的ãªRAFTコンセンサスã¨åŒã˜ã‚¹ãƒ”ードã§èª­ã¿å–ã‚Šè¦æ±‚を実行ã—ã¾ã™ã€‚ | `false` | +| `raft_logs_level` | 調整ã«é–¢ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆãƒ­ã‚°ãƒ¬ãƒ™ãƒ«ï¼ˆtraceã€debugãªã©ï¼‰ã€‚ | `system default` | +| `auto_forwarding` | フォロワーã‹ã‚‰ãƒªãƒ¼ãƒ€ãƒ¼ã«æ›¸ãè¾¼ã¿è¦æ±‚を転é€ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ | `true` | +| `shutdown_timeout` | 内部接続を終了ã—ã¦ã‚·ãƒ£ãƒƒãƒˆãƒ€ã‚¦ãƒ³ã™ã‚‹ã¾ã§ã®å¾…機時間(ms)。 | `5000` | +| `startup_timeout` | サーãƒãƒ¼ãŒæŒ‡å®šã•ã‚ŒãŸã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆå†…ã«ä»–ã®ã‚¯ã‚©ãƒ¼ãƒ©ãƒ å‚加者ã«æŽ¥ç¶šã—ãªã„å ´åˆã€çµ‚了ã—ã¾ã™ï¼ˆms)。 | `30000` | +| `four_letter_word_white_list` | 4lwコマンドã®ãƒ›ãƒ¯ã‚¤ãƒˆãƒªã‚¹ãƒˆã€‚ | `conf, cons, crst, envi, ruok, srst, srvr, stat, wchs, dirs, mntr, isro, rcvr, apiv, csnp, lgif, rqld, ydld` | +| `async_replication` | éžåŒæœŸãƒ¬ãƒ—リケーションを有効ã«ã—ã¾ã™ã€‚å…¨ã¦ã®æ›¸ãè¾¼ã¿ã¨èª­ã¿å–ã‚Šã®ä¿è¨¼ãŒç¶­æŒã•ã‚Œã€ã‚ˆã‚Šè‰¯ã„パフォーマンスãŒé”æˆã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€å¾Œæ–¹äº’æ›æ€§ã‚’破壊ã—ãªã„よã†ã«ã™ã‚‹ãŸã‚ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ | `false` | +| `latest_logs_cache_size_threshold` | 最新ã®ãƒ­ã‚°ã‚¨ãƒ³ãƒˆãƒªã®ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®æœ€å¤§åˆè¨ˆã‚µã‚¤ã‚º | `1GiB` | +| `commit_logs_cache_size_threshold` | 次ã«ã‚³ãƒŸãƒƒãƒˆã®ãŸã‚ã«å¿…è¦ãªãƒ­ã‚°ã‚¨ãƒ³ãƒˆãƒªã®ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®æœ€å¤§åˆè¨ˆã‚µã‚¤ã‚º | `500MiB` | +| `disk_move_retries_wait_ms` | ディスク間ã§ãƒ•ã‚¡ã‚¤ãƒ«ã‚’移動ã—ã¦ã„ã‚‹é–“ã«ç™ºç”Ÿã—ãŸå¤±æ•—後ã€å†è©¦è¡Œã¾ã§ã©ã‚Œãらã„å¾…æ©Ÿã™ã‚‹ã‹ | `1000` | +| `disk_move_retries_during_init` | åˆæœŸåŒ–中ã«ãƒ‡ã‚£ã‚¹ã‚¯é–“ã§ãƒ•ã‚¡ã‚¤ãƒ«ã‚’移動ã—ã¦ã„ã‚‹é–“ã«ç™ºç”Ÿã—ãŸå¤±æ•—後ã®å†è©¦è¡Œå›žæ•° | `100` | +| `experimental_use_rocksdb` | rocksdbã‚’ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã—ã¦ä½¿ç”¨ | `0` | + +クォーラム設定ã¯ã€`.`セクションã«ã‚ã‚Šã€ã‚µãƒ¼ãƒãƒ¼ã®èª¬æ˜Žã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ + +ã™ã¹ã¦ã®ã‚¯ã‚©ãƒ¼ãƒ©ãƒ ã«å¯¾ã™ã‚‹å”¯ä¸€ã®ãƒ‘ラメータã¯`secure`ã§ã€ã‚¯ã‚©ãƒ¼ãƒ©ãƒ å‚加者間ã®é€šä¿¡ã®æš—å·åŒ–接続を有効ã«ã—ã¾ã™ã€‚ã“ã®ãƒ‘ラメータã¯ã€ãƒŽãƒ¼ãƒ‰é–“ã®å†…部通信ã«SSL接続ãŒå¿…è¦ãªå ´åˆã¯ `true` ã«è¨­å®šã§ãã¾ã™ãŒã€ãれ以外ã®å ´åˆã¯æŒ‡å®šã—ãªãã¦ã‚‚構ã„ã¾ã›ã‚“。 + +å„``ã®ãƒ¡ã‚¤ãƒ³ãƒ‘ラメータã¯ä»¥ä¸‹ã§ã™ï¼š + +- `id` — クォーラム内ã®ã‚µãƒ¼ãƒãƒ¼è­˜åˆ¥å­ã€‚ +- `hostname` — ã“ã®ã‚µãƒ¼ãƒãƒ¼ãŒé…ç½®ã•ã‚Œã¦ã„るホストå。 +- `port` — サーãƒãƒ¼ãŒæŽ¥ç¶šã‚’å—ã‘付ã‘ã‚‹ãƒãƒ¼ãƒˆã€‚ +- `can_become_leader` — サーãƒãƒ¼ã‚’`learner`ã¨ã—ã¦è¨­å®šã™ã‚‹ã«ã¯`false`を設定ã—ã¾ã™ã€‚çœç•¥ã™ã‚‹ã¨å€¤ã¯`true`ã§ã™ã€‚ + +:::note +ClickHouse Keeperクラスターã®ãƒˆãƒãƒ­ã‚¸ãƒ¼ãŒå¤‰æ›´ã•ã‚Œã‚‹å ´åˆï¼ˆä¾‹ï¼šã‚µãƒ¼ãƒãƒ¼ã‚’ç½®ãæ›ãˆã‚‹å ´åˆï¼‰ã€`server_id`ã‹ã‚‰`hostname`ã¸ã®ãƒžãƒƒãƒ”ングを一貫ã—ã¦ä¿æŒã—ã€æ—¢å­˜ã®`server_id`ã‚’ä»–ã®ã‚µãƒ¼ãƒãƒ¼ã«å†åˆ©ç”¨ã—ãŸã‚Šã—ãªã„よã†ã«ã—ã¦ãã ã•ã„(例:ClickHouse Keeperã®ãƒ‡ãƒ—ロイã«è‡ªå‹•åŒ–スクリプトを使用ã™ã‚‹å ´åˆï¼‰ã€‚ + +Keeperインスタンスã®ãƒ›ã‚¹ãƒˆãŒå¤‰ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹å ´åˆã¯ã€ç”ŸIPアドレスã®ä»£ã‚ã‚Šã«ãƒ›ã‚¹ãƒˆåを定義ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ホストåを変更ã™ã‚‹ã“ã¨ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚’削除ã—ã¦å†è¿½åŠ ã™ã‚‹ã®ã¨åŒç­‰ã§ã€å ´åˆã«ã‚ˆã£ã¦ã¯ä¸å¯èƒ½ãªå ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆä¾‹ï¼šã‚¯ã‚©ãƒ¼ãƒ©ãƒ ç”¨ã®KeeperインスタンスãŒå分ã§ãªã„å ´åˆï¼‰ã€‚ +::: + +:::note +`async_replication`ã¯å¾Œæ–¹äº’æ›æ€§ã‚’破壊ã—ãªã„よã†ã«ã™ã‚‹ãŸã‚ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚クラスター内ã®å…¨ã¦ã®KeeperインスタンスãŒ`async_replication`をサãƒãƒ¼ãƒˆã™ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆv23.9+)を実行ã—ã¦ã„ã‚‹å ´åˆã€ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚パフォーマンスをå‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã€ãƒ‡ãƒ¡ãƒªãƒƒãƒˆã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +3ノードã®ã‚¯ã‚©ãƒ¼ãƒ©ãƒ ã®è¨­å®šä¾‹ã¯ã€[インテグレーションテスト](https://github.com/ClickHouse/ClickHouse/tree/master/tests/integration)ã§`test_keeper_`接頭辞付ãã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚サーãƒãƒ¼#1ã®è¨­å®šä¾‹ï¼š + +```xml + + 2181 + 1 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + + 10000 + 30000 + trace + + + + + 1 + zoo1 + 9234 + + + 2 + zoo2 + 9234 + + + 3 + zoo3 + 9234 + + + +``` + +### 実行方法 {#how-to-run} + +ClickHouse Keeperã¯ClickHouseサーãƒãƒ¼ãƒ‘ッケージã«ãƒãƒ³ãƒ‰ãƒ«ã•ã‚Œã¦ãŠã‚Šã€``ã®è¨­å®šã‚’ã‚ãªãŸã®`/etc/your_path_to_config/clickhouse-server/config.xml`ã«è¿½åŠ ã—ã€é€šå¸¸é€šã‚ŠClickHouseサーãƒãƒ¼ã‚’開始ã—ã¾ã™ã€‚スタンドアロンã®ClickHouse Keeperを実行ã—ãŸã„å ´åˆã¯ã€æ¬¡ã®ã‚ˆã†ã«ã—ã¦é–‹å§‹ã§ãã¾ã™ï¼š + +```bash +clickhouse-keeper --config /etc/your_path_to_config/config.xml +``` + +シンボリックリンク(`clickhouse-keeper`)をæŒãŸãªã„å ´åˆã¯ã€ãれを作æˆã™ã‚‹ã‹`clickhouse`ã¸ã®å¼•æ•°ã¨ã—ã¦`keeper`を指定ã§ãã¾ã™ï¼š + +```bash +clickhouse keeper --config /etc/your_path_to_config/config.xml +``` + +### 4文字コマンド {#four-letter-word-commands} + +ClickHouse Keeperã¯ã€ZooKeeperã¨ã»ã¼åŒã˜4文字コマンド(4lw)をæä¾›ã—ã¾ã™ã€‚å„コマンドã¯`mntr`ã€`stat`ãªã©ã®4文字ã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚興味深ã„コマンドã®ã„ãã¤ã‹ã‚’紹介ã™ã‚‹ã¨ã€`stat`ã¯ã‚µãƒ¼ãƒãƒ¼ã¨æŽ¥ç¶šã•ã‚ŒãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é–¢ã™ã‚‹ä¸€èˆ¬æƒ…報をæä¾›ã—ã€`srvr`ã¨`cons`ã¯ãã‚Œãžã‚Œã‚µãƒ¼ãƒãƒ¼ã¨æŽ¥ç¶šã«é–¢ã™ã‚‹è©³ç´°ã‚’æä¾›ã—ã¾ã™ã€‚ + +4lwコマンドã®ãƒ›ãƒ¯ã‚¤ãƒˆãƒªã‚¹ãƒˆè¨­å®š`four_letter_word_white_list`ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`conf,cons,crst,envi,ruok,srst,srvr,stat,wchs,dirs,mntr,isro,rcvr,apiv,csnp,lgif,rqld,ydld`ã§ã™ã€‚ + +ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ClickHouse Keeperã«å¯¾ã—ã¦telnetã‚„ncã§ç™ºè¡Œã§ãã¾ã™ã€‚ + +``` +echo mntr | nc localhost 9181 +``` + +以下ã«4lwコマンドã®è©³ç´°ã‚’示ã—ã¾ã™ï¼š + +- `ruok`: サーãƒãƒ¼ãŒã‚¨ãƒ©ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒˆãªã—ã§å®Ÿè¡Œä¸­ã§ã‚ã‚‹ã“ã¨ã‚’テストã—ã¾ã™ã€‚サーãƒãƒ¼ãŒå®Ÿè¡Œä¸­ã®å ´åˆ`imok`ã§å¿œç­”ã—ã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ã¾ã£ãŸã応答ã—ã¾ã›ã‚“。サーãƒãƒ¼ãŒå®Ÿè¡Œä¸­ã§ã‚ã‚‹ã“ã¨ã‚’示㙠`imok` ã®å¿œç­”ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãŒã‚¯ã‚©ãƒ¼ãƒ©ãƒ ã«å‚加ã—ã¦ã„ã‚‹ã“ã¨ã‚’å¿…ãšã—も示ã—ã¦ã„ã‚‹ã‚ã‘ã§ã¯ãªãã€å˜ã«ã‚µãƒ¼ãƒãƒ¼ãƒ—ロセスãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§æŒ‡å®šã•ã‚ŒãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒãƒ¼ãƒˆã«ãƒã‚¤ãƒ³ãƒ‰ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +``` +imok +``` + +- `mntr`: クラスターã®å¥å…¨æ€§ã‚’監視ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãる変数ã®ãƒªã‚¹ãƒˆã‚’出力ã—ã¾ã™ã€‚ + +``` +zk_version v21.11.1.1-prestable-7a4a0b0edef0ad6e0aa662cd3b90c3f4acf796e7 +zk_avg_latency 0 +zk_max_latency 0 +zk_min_latency 0 +zk_packets_received 68 +zk_packets_sent 68 +zk_num_alive_connections 1 +zk_outstanding_requests 0 +zk_server_state leader +zk_znode_count 4 +zk_watch_count 1 +zk_ephemerals_count 0 +zk_approximate_data_size 723 +zk_open_file_descriptor_count 310 +zk_max_file_descriptor_count 10240 +zk_followers 0 +zk_synced_followers 0 +``` + +- `srvr`: サーãƒãƒ¼ã®å®Œå…¨ãªè©³ç´°ã‚’リストã—ã¾ã™ã€‚ + +``` +ClickHouse Keeper version: v21.11.1.1-prestable-7a4a0b0edef0ad6e0aa662cd3b90c3f4acf796e7 +Latency min/avg/max: 0/0/0 +Received: 2 +Sent : 2 +Connections: 1 +Outstanding: 0 +Zxid: 34 +Mode: leader +Node count: 4 +``` + +- `stat`: サーãƒãƒ¼ã¨æŽ¥ç¶šã•ã‚ŒãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ç°¡å˜ãªè©³ç´°ã‚’リストã—ã¾ã™ã€‚ + +``` +ClickHouse Keeper version: v21.11.1.1-prestable-7a4a0b0edef0ad6e0aa662cd3b90c3f4acf796e7 +Clients: + 192.168.1.1:52852(recved=0,sent=0) + 192.168.1.1:52042(recved=24,sent=48) +Latency min/avg/max: 0/0/0 +Received: 4 +Sent : 4 +Connections: 1 +Outstanding: 0 +Zxid: 36 +Mode: leader +Node count: 4 +``` + +- `srst`: サーãƒãƒ¼ã®çµ±è¨ˆã‚’リセットã—ã¾ã™ã€‚ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯`srvr`ã€`mntr`ã€ãŠã‚ˆã³`stat`ã®çµæžœã«å½±éŸ¿ã‚’与ãˆã¾ã™ã€‚ + +``` +Server stats reset. +``` + +- `conf`: æ供中ã®è¨­å®šã®è©³ç´°ã‚’表示ã—ã¾ã™ã€‚ + +``` +server_id=1 +tcp_port=2181 +four_letter_word_white_list=* +log_storage_path=./coordination/logs +snapshot_storage_path=./coordination/snapshots +max_requests_batch_size=100 +session_timeout_ms=30000 +operation_timeout_ms=10000 +dead_session_check_period_ms=500 +heart_beat_interval_ms=500 +election_timeout_lower_bound_ms=1000 +election_timeout_upper_bound_ms=2000 +reserved_log_items=1000000000000000 +snapshot_distance=10000 +auto_forwarding=true +shutdown_timeout=5000 +startup_timeout=240000 +raft_logs_level=information +snapshots_to_keep=3 +rotate_log_storage_interval=100000 +stale_log_gap=10000 +fresh_log_gap=200 +max_requests_batch_size=100 +quorum_reads=false +force_sync=false +compress_logs=true +compress_snapshots_with_zstd_format=true +configuration_change_tries_count=20 +``` + +- `cons`: ã“ã®ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®å®Œå…¨ãªæŽ¥ç¶š/セッションã®è©³ç´°ã‚’リストã—ã¾ã™ã€‚å—ä¿¡/é€ä¿¡ã—ãŸãƒ‘ケット数ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³IDã€æ“作レイテンシーã€æœ€å¾Œã«å®Ÿè¡Œã•ã‚ŒãŸæ“作ãªã©ã®æƒ…報をå«ã¿ã¾ã™ã€‚ + +``` + 192.168.1.1:52163(recved=0,sent=0,sid=0xffffffffffffffff,lop=NA,est=1636454787393,to=30000,lzxid=0xffffffffffffffff,lresp=0,llat=0,minlat=0,avglat=0,maxlat=0) + 192.168.1.1:52042(recved=9,sent=18,sid=0x0000000000000001,lop=List,est=1636454739887,to=30000,lcxid=0x0000000000000005,lzxid=0x0000000000000005,lresp=1636454739892,llat=0,minlat=0,avglat=0,maxlat=0) +``` + +- `crst`: ã™ã¹ã¦ã®æŽ¥ç¶šã«å¯¾ã™ã‚‹æŽ¥ç¶š/セッション統計をリセットã—ã¾ã™ã€‚ + +``` +Connection stats reset. +``` + +- `envi`: サーãƒãƒ¼ç’°å¢ƒã®è©³ç´°ã‚’表示ã—ã¾ã™ã€‚ + +``` +Environment: +clickhouse.keeper.version=v21.11.1.1-prestable-7a4a0b0edef0ad6e0aa662cd3b90c3f4acf796e7 +host.name=ZBMAC-C02D4054M.local +os.name=Darwin +os.arch=x86_64 +os.version=19.6.0 +cpu.count=12 +user.name=root +user.home=/Users/JackyWoo/ +user.dir=/Users/JackyWoo/project/jd/clickhouse/cmake-build-debug/programs/ +user.tmp=/var/folders/b4/smbq5mfj7578f2jzwn602tt40000gn/T/ +``` + +- `dirs`: スナップショットã¨ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã®åˆè¨ˆã‚µã‚¤ã‚ºã‚’ãƒã‚¤ãƒˆå˜ä½ã§è¡¨ç¤ºã—ã¾ã™ã€‚ + +``` +snapshot_dir_size: 0 +log_dir_size: 3875 +``` + +- `isro`: サーãƒãƒ¼ãŒèª­ã¿å–り専用モードã§å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹ã‹ã‚’テストã—ã¾ã™ã€‚読ã¿å–り専用モードã§`ro`ã€ãã†ã§ãªã„å ´åˆã¯`rw`ã§å¿œç­”ã—ã¾ã™ã€‚ + +``` +rw +``` + +- `wchs`: サーãƒãƒ¼ã®ç›£è¦–ã«é–¢ã™ã‚‹ç°¡å˜ãªæƒ…報をリストã—ã¾ã™ã€‚ + +``` +1 connections watching 1 paths +Total watches:1 +``` + +- `wchc`: セッションã”ã¨ã«ã€ã‚µãƒ¼ãƒãƒ¼ã®ç›£è¦–ã«é–¢ã™ã‚‹è©³ç´°ãªæƒ…報をリストã—ã¾ã™ã€‚セッション(接続)ã®ãƒªã‚¹ãƒˆã¨é–¢é€£ã™ã‚‹ç›£è¦–(パス)を出力ã—ã¾ã™ã€‚注æ„ã¨ã—ã¦ã€ç›£è¦–æ•°ã«ã‚ˆã£ã¦ã¯ã€ã“ã®æ“作ã¯é«˜è² è·ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼ˆã‚µãƒ¼ãƒãƒ¼ã®ãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹ï¼‰ã€æ³¨æ„ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +``` +0x0000000000000001 + /clickhouse/task_queue/ddl +``` + +- `wchp`: サーãƒãƒ¼ã®ãƒ‘スã”ã¨ã«ã€ç›£è¦–ã«é–¢ã™ã‚‹è©³ç´°æƒ…報をリストã—ã¾ã™ã€‚パス(znodes)ã®ãƒªã‚¹ãƒˆã¨é–¢é€£ã™ã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’出力ã—ã¾ã™ã€‚注æ„ã¨ã—ã¦ã€ç›£è¦–æ•°ã«ã‚ˆã£ã¦ã¯ã€ã“ã®æ“作ã¯é«˜è² è·ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼ˆã¤ã¾ã‚Šã€ã‚µãƒ¼ãƒãƒ¼ã®ãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹ï¼‰ã€æ³¨æ„ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +``` +/clickhouse/task_queue/ddl + 0x0000000000000001 +``` + +- `dump`: 実行中ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¨ä¸€æ™‚ノードをリストã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒªãƒ¼ãƒ€ãƒ¼ã§ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +``` +Sessions dump (2): +0x0000000000000001 +0x0000000000000002 +Sessions with Ephemerals (1): +0x0000000000000001 + /clickhouse/task_queue/ddl +``` + +- `csnp`: スナップショット作æˆã‚¿ã‚¹ã‚¯ã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’設定ã—ã¾ã™ã€‚æˆåŠŸã—ãŸå ´åˆã¯ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚ŒãŸã‚¹ãƒŠãƒƒãƒ—ショットã®æœ€å¾Œã®ã‚³ãƒŸãƒƒãƒˆãƒ­ã‚°ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’è¿”ã—ã€å¤±æ•—ã—ãŸå ´åˆã¯`Failed to schedule snapshot creation task.`ã‚’è¿”ã—ã¾ã™ã€‚`lgif`コマンドã¯ã‚¹ãƒŠãƒƒãƒ—ショットãŒå®Œäº†ã—ãŸã‹ã©ã†ã‹ã‚’判断ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +``` +100 +``` + +- `lgif`: Keeperログã®æƒ…報。`first_log_idx` : ログストア内ã®æœ€åˆã®ãƒ­ã‚°ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹; `first_log_term` : 最åˆã®ãƒ­ã‚°ã‚¿ãƒ¼ãƒ ; `last_log_idx` : ログストア内ã®æœ€å¾Œã®ãƒ­ã‚°ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹; `last_log_term` : 最後ã®ãƒ­ã‚°ã‚¿ãƒ¼ãƒ ; `last_committed_log_idx` : 状態マシンã§æœ€å¾Œã«ã‚³ãƒŸãƒƒãƒˆã•ã‚ŒãŸãƒ­ã‚°ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹; `leader_committed_log_idx` : ç§ã®è¦–点ã‹ã‚‰ã®ãƒªãƒ¼ãƒ€ãƒ¼ã®ã‚³ãƒŸãƒƒãƒˆãƒ­ã‚°ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹; `target_committed_log_idx` : コミットã•ã‚Œã‚‹ã¹ãターゲットログインデックス; `last_snapshot_idx` : 最後ã®ã‚¹ãƒŠãƒƒãƒ—ショットã®æœ€å¤§ã‚³ãƒŸãƒƒãƒˆãƒ­ã‚°ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚ + +``` +first_log_idx 1 +first_log_term 1 +last_log_idx 101 +last_log_term 1 +last_committed_log_idx 100 +leader_committed_log_idx 101 +target_committed_log_idx 101 +last_snapshot_idx 50 +``` + +- `rqld`: æ–°ã—ã„リーダーã«ãªã‚‹ã‚ˆã†ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã—ã¾ã™ã€‚リーダーシップリクエストãŒé€ä¿¡ã•ã‚ŒãŸå ´åˆã¯`Sent leadership request to leader.`ã€é€ä¿¡ã•ã‚Œãªã‹ã£ãŸå ´åˆã¯`Failed to send leadership request to leader.`ã‚’è¿”ã—ã¾ã™ã€‚ノードãŒæ—¢ã«ãƒªãƒ¼ãƒ€ãƒ¼ã§ã‚ã‚Œã°ã€çµæžœã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒé€ä¿¡ã•ã‚ŒãŸã®ã¨åŒã˜ã§ã™ã€‚ + +``` +Sent leadership request to leader. +``` + +- `ftfl`: Keeperインスタンスã§æœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒãƒ£ãƒ¼ãƒ•ãƒ©ã‚°ã‚’リストã—ã¾ã™ã€‚ + +``` +filtered_list 1 +multi_read 1 +check_not_exists 0 +``` +- `ydld`: リーダーシップを放棄ã—ã€ãƒ•ã‚©ãƒ­ãƒ¯ãƒ¼ã«ãªã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã—ã¾ã™ã€‚リクエストをå—ã‘å–ã£ãŸã‚µãƒ¼ãƒãƒ¼ãŒãƒªãƒ¼ãƒ€ãƒ¼ã®å ´åˆã€ã¾ãšæ›¸ãè¾¼ã¿æ“作を一時åœæ­¢ã—ã€å¾Œç¶™è€…(ç¾åœ¨ã®ãƒªãƒ¼ãƒ€ãƒ¼ã¯å¾Œç¶™è€…ã«ã¯ãªã‚Œã¾ã›ã‚“)ãŒæœ€æ–°ã®ãƒ­ã‚°ã®ã‚­ãƒ£ãƒƒãƒã‚¢ãƒƒãƒ—を終了ã™ã‚‹ã®ã‚’å¾…ã£ã¦ã‹ã‚‰è¾žä»»ã—ã¾ã™ã€‚後継者ã¯è‡ªå‹•çš„ã«é¸ã°ã‚Œã¾ã™ã€‚リクエストãŒé€ä¿¡ã•ã‚ŒãŸå ´åˆã¯`リーダーã¸ã®ãƒªãƒ¼ãƒ€ãƒ¼ã‚·ãƒƒãƒ—放棄リクエストをé€ä¿¡ã—ã¾ã—ãŸã€‚`ã‚’è¿”ã—ã€é€ä¿¡ã•ã‚Œãªã‹ã£ãŸå ´åˆã¯`リーダーã¸ã®ãƒªãƒ¼ãƒ€ãƒ¼ã‚·ãƒƒãƒ—放棄リクエストã®é€ä¿¡ã«å¤±æ•—ã—ã¾ã—ãŸã€‚`ã‚’è¿”ã—ã¾ã™ã€‚ノードãŒã™ã§ã«ãƒ•ã‚©ãƒ­ãƒ¯ãƒ¼ã§ã‚ã‚‹å ´åˆã€çµæžœã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒé€ä¿¡ã•ã‚ŒãŸå ´åˆã¨åŒã˜ã§ã™ã€‚ + +``` +リーダーã¸ã®ãƒªãƒ¼ãƒ€ãƒ¼ã‚·ãƒƒãƒ—放棄リクエストをé€ä¿¡ã—ã¾ã—ãŸã€‚ +``` + +- `pfev`: åŽé›†ã•ã‚ŒãŸã™ã¹ã¦ã®ã‚¤ãƒ™ãƒ³ãƒˆã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚å„イベントã«ã¤ã„ã¦ã‚¤ãƒ™ãƒ³ãƒˆåã€ã‚¤ãƒ™ãƒ³ãƒˆå€¤ã€ãŠã‚ˆã³ã‚¤ãƒ™ãƒ³ãƒˆã®èª¬æ˜Žã‚’è¿”ã—ã¾ã™ã€‚ + +``` +FileOpen 62 ファイルãŒé–‹ã‹ã‚ŒãŸå›žæ•°ã€‚ +Seek 4 'lseek'関数ãŒå‘¼ã°ã‚ŒãŸå›žæ•°ã€‚ +ReadBufferFromFileDescriptorRead 126 ファイルディスクリプタã‹ã‚‰ã®èª­ã¿å–り(read/pread)ã®å›žæ•°ã€‚ソケットã¯å«ã¾ã‚Œã¾ã›ã‚“。 +ReadBufferFromFileDescriptorReadFailed 0 ファイルディスクリプタã‹ã‚‰ã®èª­ã¿å–り(read/pread)ãŒå¤±æ•—ã—ãŸå›žæ•°ã€‚ +ReadBufferFromFileDescriptorReadBytes 178846 ファイルディスクリプタã‹ã‚‰èª­ã¿å–られãŸãƒã‚¤ãƒˆæ•°ã€‚ファイルãŒåœ§ç¸®ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã‚Œã¯åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºã‚’示ã—ã¾ã™ã€‚ +WriteBufferFromFileDescriptorWrite 7 ファイルディスクリプタã¸ã®æ›¸ãè¾¼ã¿ï¼ˆwrite/pwrite)ã®å›žæ•°ã€‚ソケットã¯å«ã¾ã‚Œã¾ã›ã‚“。 +WriteBufferFromFileDescriptorWriteFailed 0 ファイルディスクリプタã¸ã®æ›¸ãè¾¼ã¿ï¼ˆwrite/pwrite)ãŒå¤±æ•—ã—ãŸå›žæ•°ã€‚ +WriteBufferFromFileDescriptorWriteBytes 153 ファイルディスクリプタã«æ›¸ãè¾¼ã¾ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚ファイルãŒåœ§ç¸®ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã‚Œã¯åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã‚’示ã—ã¾ã™ã€‚ +FileSync 2 ファイルã«å¯¾ã—ã¦F_FULLFSYNC/fsync/fdatasync関数ãŒå‘¼ã°ã‚ŒãŸå›žæ•°ã€‚ +DirectorySync 0 ディレクトリã«å¯¾ã—ã¦F_FULLFSYNC/fsync/fdatasync関数ãŒå‘¼ã°ã‚ŒãŸå›žæ•°ã€‚ +FileSyncElapsedMicroseconds 12756 ファイルã«å¯¾ã™ã‚‹F_FULLFSYNC/fsync/fdatasyncシステムコールを待ã£ã¦è²»ã‚„ã—ãŸåˆè¨ˆæ™‚間。 +DirectorySyncElapsedMicroseconds 0 ディレクトリã«å¯¾ã™ã‚‹F_FULLFSYNC/fsync/fdatasyncシステムコールを待ã£ã¦è²»ã‚„ã—ãŸåˆè¨ˆæ™‚間。 +ReadCompressedBytes 0 圧縮ソース(ファイルã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ï¼‰ã‹ã‚‰èª­ã¿å–ã£ãŸãƒã‚¤ãƒˆæ•°ï¼ˆè§£å‡å‰ã®ãƒã‚¤ãƒˆæ•°ï¼‰ã€‚ +CompressedReadBufferBlocks 0 圧縮ソース(ファイルã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ï¼‰ã‹ã‚‰èª­ã¿å–ã£ãŸåœ§ç¸®ãƒ–ロック(å„自ã§åœ§ç¸®ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ–ロック)。 +CompressedReadBufferBytes 0 圧縮ソース(ファイルã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ï¼‰ã‹ã‚‰èª­ã¿å–ã£ãŸéžåœ§ç¸®ãƒã‚¤ãƒˆæ•°ï¼ˆè§£å‡å¾Œã®ãƒã‚¤ãƒˆæ•°ï¼‰ã€‚ +AIOWrite 0 Linuxã¾ãŸã¯FreeBSDã®AIOインターフェースã«ã‚ˆã‚‹æ›¸ãè¾¼ã¿ã®å›žæ•°ã€‚ +AIOWriteBytes 0 Linuxã¾ãŸã¯FreeBSDã®AIOインターフェースã§æ›¸ãè¾¼ã¾ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚ +... +``` + +### HTTP制御 {#http-control} + +ClickHouse Keeperã¯ã€ãƒ¬ãƒ—リカãŒãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’å—ä¿¡ã™ã‚‹æº–å‚™ãŒã§ãã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ãŸã‚ã®HTTPインターフェイスをæä¾›ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€[Kubernetes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes)ã®ã‚ˆã†ãªã‚¯ãƒ©ã‚¦ãƒ‰ç’°å¢ƒã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +`/ready`エンドãƒã‚¤ãƒ³ãƒˆã‚’有効ã«ã™ã‚‹æ§‹æˆã®ä¾‹: + +```xml + + + + 9182 + + /ready + + + + +``` + +### フィーãƒãƒ£ãƒ¼ãƒ•ãƒ©ã‚° + +Keeperã¯ZooKeeperãŠã‚ˆã³ãã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¨å®Œå…¨ã«äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ClickHouseクライアントã§ä½¿ç”¨ã§ãã‚‹ã„ãã¤ã‹ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªæ©Ÿèƒ½ã‚„リクエストタイプも導入ã—ã¦ã„ã¾ã™ã€‚ã“れらã®æ©Ÿèƒ½ã¯å¾Œæ–¹äº’æ›æ€§ã®ãªã„変更を引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ãã®ã»ã¨ã‚“ã©ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ãªã£ã¦ãŠã‚Šã€`keeper_server.feature_flags`設定を使用ã—ã¦æœ‰åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã™ã¹ã¦ã®æ©Ÿèƒ½ã¯æ˜Žç¤ºçš„ã«ç„¡åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚Keeperクラスタã«æ–°ã—ã„機能を有効ã«ã—ãŸã„å ´åˆã€ã¾ãšã‚¯ãƒ©ã‚¹ã‚¿å†…ã®ã™ã¹ã¦ã®Keeperインスタンスを機能をサãƒãƒ¼ãƒˆã™ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«æ›´æ–°ã—ã€ãã‚Œã‹ã‚‰æ©Ÿèƒ½è‡ªä½“を有効ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +`multi_read`を無効ã«ã—ã€`check_not_exists`を有効ã«ã™ã‚‹ãƒ•ã‚£ãƒ¼ãƒãƒ£ãƒ¼ãƒ•ãƒ©ã‚°è¨­å®šã®ä¾‹: + +```xml + + + + 0 + 1 + + + +``` + +利用å¯èƒ½ãªæ©Ÿèƒ½ã¯æ¬¡ã®é€šã‚Šã§ã™: + +`multi_read` - マルãƒãƒªãƒ¼ãƒ‰ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ã‚µãƒãƒ¼ãƒˆã€‚デフォルト: `1` +`filtered_list` - ノードã®ã‚¿ã‚¤ãƒ—(永続的ã¾ãŸã¯ã‚¨ãƒ•ã‚§ãƒ¡ãƒ©ãƒ«ï¼‰ã§çµæžœã‚’フィルターã™ã‚‹ãƒªã‚¹ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ã‚µãƒãƒ¼ãƒˆã€‚デフォルト: `1` +`check_not_exists` - ノードãŒå­˜åœ¨ã—ãªã„ã“ã¨ã‚’確èªã™ã‚‹`CheckNotExists`リクエストã®ã‚µãƒãƒ¼ãƒˆã€‚デフォルト: `0` +`create_if_not_exists` - ノードãŒå­˜åœ¨ã—ãªã„å ´åˆã«ä½œæˆã—よã†ã¨ã™ã‚‹`CreateIfNotExists`リクエストã®ã‚µãƒãƒ¼ãƒˆã€‚存在ã™ã‚‹å ´åˆã€å¤‰æ›´ã¯é©ç”¨ã•ã‚Œãš`ZOK`ãŒè¿”ã•ã‚Œã¾ã™ã€‚デフォルト: `0` + +### ZooKeeperã‹ã‚‰ã®ç§»è¡Œ {#migration-from-zookeeper} + +ZooKeeperã‹ã‚‰ClickHouse Keeperã¸ã®ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ãªç§»è¡Œã¯ä¸å¯èƒ½ã§ã™ã€‚ZooKeeperクラスタをåœæ­¢ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã—ã¦ClickHouse Keeperを開始ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`clickhouse-keeper-converter`ツールã¯ZooKeeperログã¨ã‚¹ãƒŠãƒƒãƒ—ショットをClickHouse Keeperã®ã‚¹ãƒŠãƒƒãƒ—ショットã«å¤‰æ›ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã‚Œã¯ZooKeeper > 3.4ã§ã®ã¿å‹•ä½œã—ã¾ã™ã€‚移行ã®æ‰‹é †: + +1. ã™ã¹ã¦ã®ZooKeeperノードをåœæ­¢ã—ã¾ã™ã€‚ + +2. オプションã§ã™ãŒæŽ¨å¥¨: ZooKeeperã®ãƒªãƒ¼ãƒ€ãƒ¼ãƒŽãƒ¼ãƒ‰ã‚’見ã¤ã‘ã€ãれを開始ã—ã¦å†åº¦åœæ­¢ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ZooKeeperãŒä¸€è²«ã—ãŸã‚¹ãƒŠãƒƒãƒ—ショットを作æˆã™ã‚‹ã“ã¨ã‚’強制ã—ã¾ã™ã€‚ + +3. リーダーã§`clickhouse-keeper-converter`を実行ã—ã¾ã™ã€‚例: + +```bash +clickhouse-keeper-converter --zookeeper-logs-dir /var/lib/zookeeper/version-2 --zookeeper-snapshots-dir /var/lib/zookeeper/version-2 --output-dir /path/to/clickhouse/keeper/snapshots +``` + +4. KeeperãŒæ§‹æˆã•ã‚ŒãŸClickHouseサーãƒãƒ¼ãƒŽãƒ¼ãƒ‰ã«ã‚¹ãƒŠãƒƒãƒ—ショットをコピーã™ã‚‹ã‹ã€ZooKeeperã®ä»£ã‚ã‚Šã«ClickHouse Keeperを開始ã—ã¾ã™ã€‚スナップショットã¯ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã§æŒç¶šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã†ã—ãªã„ã¨ã€ç©ºã®ãƒŽãƒ¼ãƒ‰ãŒã‚ˆã‚Šé€Ÿããªã‚Šã€ãƒªãƒ¼ãƒ€ãƒ¼ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +`keeper-converter`ツールã¯Keeperå˜ç‹¬ã®ãƒã‚¤ãƒŠãƒªã‹ã‚‰ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 +ClickHouseãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒã‚¤ãƒŠãƒªã‚’直接使用ã§ãã¾ã™: + +```bash +clickhouse keeper-converter ... +``` + +ãれ以外ã®å ´åˆã¯ã€[ãƒã‚¤ãƒŠãƒªã‚’ダウンロード](/docs/ja/getting-started/quick-start#1-download-the-binary)ã—ã¦ä¸Šè¨˜ã®ã‚ˆã†ã«ãƒ„ールを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouseをインストールã›ãšã«ã€‚ +::: + + +### クォーラム喪失後ã®å¾©æ—§ + +ClickHouse Keeperã¯Raftを使用ã—ã¦ã„ã‚‹ãŸã‚ã€ã‚¯ãƒ©ã‚¹ã‚¿ã®ã‚µã‚¤ã‚ºã«å¿œã˜ã¦ä¸€å®šã®ãƒŽãƒ¼ãƒ‰ã®ã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã‚’許容ã§ãã¾ã™ã€‚ +ãŸã¨ãˆã°ã€3ノードã®ã‚¯ãƒ©ã‚¹ã‚¿ã®å ´åˆã€1ノードãŒã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã—ãŸå ´åˆã§ã‚‚æ­£ã—ã動作ã—続ã‘ã¾ã™ã€‚ + +クラスタã®æ§‹æˆã¯å‹•çš„ã«è¨­å®šã§ãã¾ã™ãŒã€åˆ¶é™ãŒã‚ã‚Šã¾ã™ã€‚å†æ§‹æˆã¯Raftã«ä¾å­˜ã—ã¦ã„ã‚‹ãŸã‚ã€ã‚¯ãƒ©ã‚¹ã‚¿ã‹ã‚‰ãƒŽãƒ¼ãƒ‰ã‚’追加ã¾ãŸã¯å‰Šé™¤ã™ã‚‹ã«ã¯ã‚¯ã‚©ãƒ¼ãƒ©ãƒ ãŒå¿…è¦ã§ã™ã€‚クラスタ内ã®å¤šãã®ãƒŽãƒ¼ãƒ‰ã‚’åŒæ™‚ã«å¤±ã„ã€ãれらをå†èµ·å‹•ã§ããªããªã‚‹ã¨ã€Raftã¯æ©Ÿèƒ½ã‚’åœæ­¢ã—ã€å¾“æ¥ã®æ–¹æ³•ã§ã‚¯ãƒ©ã‚¹ã‚¿ã‚’å†æ§‹æˆã§ããªããªã‚Šã¾ã™ã€‚ + +ãã‚Œã«ã‚‚ã‹ã‹ã‚らãšã€ClickHouse Keeperã«ã¯ãƒªã‚«ãƒãƒªãƒ¼ãƒ¢ãƒ¼ãƒ‰ãŒã‚ã‚Šã€1ã¤ã®ãƒŽãƒ¼ãƒ‰ã ã‘ã§å¼·åˆ¶çš„ã«ã‚¯ãƒ©ã‚¹ã‚¿ã‚’å†æ§‹æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒŽãƒ¼ãƒ‰ã‚’å†èµ·å‹•ã§ããªã„å ´åˆã€ã¾ãŸã¯åŒã˜ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã§æ–°ã—ã„インスタンスを開始ã™ã‚‹å ´åˆã ã‘を最後ã®æ‰‹æ®µã¨ã—ã¦è¡Œã†ã¹ãã§ã™ã€‚ + +続行ã™ã‚‹å‰ã«æ³¨æ„ã™ã¹ãé‡è¦ãªã“ã¨: +- 失敗ã—ãŸãƒŽãƒ¼ãƒ‰ãŒå†ã³ã‚¯ãƒ©ã‚¹ã‚¿ã«æŽ¥ç¶šã§ããªã„ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +- ステップã§æŒ‡å®šã•ã‚Œã¦ã„ãªã„é™ã‚Šã€æ–°ã—ã„ノードを起動ã—ãªã„ã§ãã ã•ã„。 + +上記ã®ã“ã¨ã‚’確èªã—ãŸå¾Œã€ä»¥ä¸‹ã®æ‰‹é †ã‚’実行ã—ã¾ã™: +1. Keeperノードã®1ã¤ã‚’æ–°ã—ã„リーダーã¨ã—ã¦é¸æŠžã—ã¾ã™ã€‚ãã®ãƒŽãƒ¼ãƒ‰ã®ãƒ‡ãƒ¼ã‚¿ãŒã‚¯ãƒ©ã‚¹ã‚¿å…¨ä½“ã«åˆ©ç”¨ã•ã‚Œã‚‹ã“ã¨ã«ãªã‚‹ã®ã§ã€æœ€æ–°ã®çŠ¶æ…‹ã‚’æŒã¤ãƒŽãƒ¼ãƒ‰ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ +2. ä»–ã®ä½•ã‹ã‚’è¡Œã†å‰ã«ã€é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã®`log_storage_path`ã¨`snapshot_storage_path`フォルダをãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã—ã¾ã™ã€‚ +3. 使用ã—ãŸã„ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã§ã‚¯ãƒ©ã‚¹ã‚¿ã‚’å†æ§‹æˆã—ã¾ã™ã€‚ +4. é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã«å››æ–‡å­—コマンド`rcvr`ã‚’é€ã‚Šã€ãƒŽãƒ¼ãƒ‰ã‚’リカãƒãƒªãƒ¢ãƒ¼ãƒ‰ã«ç§»è¡Œã™ã‚‹ã‹ã€é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã§Keeperインスタンスをåœæ­¢ã—ã€`--force-recovery`引数ã§å†èµ·å‹•ã—ã¾ã™ã€‚ +5. æ–°ã—ã„ノードã§Keeperインスタンスを1ã¤ãšã¤é–‹å§‹ã—ã€æ¬¡ã®ãƒŽãƒ¼ãƒ‰ã‚’開始ã™ã‚‹å‰ã«`mntr`ãŒ`zk_server_state`ã§`follower`ã‚’è¿”ã™ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +6. リカãƒãƒªãƒ¢ãƒ¼ãƒ‰ä¸­ã€ãƒªãƒ¼ãƒ€ãƒ¼ãƒŽãƒ¼ãƒ‰ã¯ã‚¯ã‚©ãƒ¼ãƒ©ãƒ ã‚’æ–°ã—ã„ノードã¨é”æˆã™ã‚‹ã¾ã§`mntr`コマンドã«å¯¾ã—ã¦ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’è¿”ã—ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¨ãƒ•ã‚©ãƒ­ãƒ¯ãƒ¼ã‹ã‚‰ã®ã™ã¹ã¦ã®è¦æ±‚ã‚’æ‹’å¦ã—ã¾ã™ã€‚ +7. クォーラムãŒé”æˆã•ã‚Œã‚‹ã¨ã€ãƒªãƒ¼ãƒ€ãƒ¼ãƒŽãƒ¼ãƒ‰ã¯é€šå¸¸ãƒ¢ãƒ¼ãƒ‰ã«æˆ»ã‚Šã€ã™ã¹ã¦ã®è¦æ±‚ã‚’å—ã‘入れã¦Raftã¨å…±ã«ç¢ºèªã•ã‚Œã¾ã™ã€‚`mntr`ã§ç¢ºèªã™ã‚‹ã¨`zk_server_state`ã¨ã—ã¦`leader`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +## Keeperã§ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã™ã‚‹ + +Keeperã¯ã‚¹ãƒŠãƒƒãƒ—ショットã€ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã€ãŠã‚ˆã³çŠ¶æ…‹ãƒ•ã‚¡ã‚¤ãƒ«ã®ä¿å­˜ã«[外部ディスク](/docs/ja/operations/storing-data.md)ã®ã‚µãƒ–セットをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るディスクã®ç¨®é¡žã¯: +- s3_plain +- s3 +- local + +以下ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯å®šç¾©ãŒå«ã¾ã‚Œã‚‹è¨­å®šã®ä¾‹ã§ã™ã€‚ + +```xml + + + + + local + /var/lib/clickhouse/coordination/logs/ + + + s3_plain + https://some_s3_endpoint/logs/ + ACCESS_KEY + SECRET_KEY + + + local + /var/lib/clickhouse/coordination/snapshots/ + + + s3_plain + https://some_s3_endpoint/snapshots/ + ACCESS_KEY + SECRET_KEY + + + s3_plain + https://some_s3_endpoint/state/ + ACCESS_KEY + SECRET_KEY + + + + +``` + +ログ用ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã™ã‚‹ã«ã¯ã€`keeper_server.log_storage_disk`設定をディスクåã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +スナップショット用ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã™ã‚‹ã«ã¯ã€`keeper_server.snapshot_storage_disk`設定をディスクåã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +ã¾ãŸã€æœ€æ–°ã®ãƒ­ã‚°ã¾ãŸã¯ã‚¹ãƒŠãƒƒãƒ—ショット用ã«ç•°ãªã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã¯ã€`keeper_server.latest_log_storage_disk`ã¨`keeper_server.latest_snapshot_storage_disk`ã‚’ãã‚Œãžã‚Œä½¿ç”¨ã—ã¾ã™ã€‚ +ã“ã®å ´åˆã€æ–°ã—ã„ログやスナップショットãŒä½œæˆã•ã‚Œã‚‹ãŸã³ã«Keeperã¯è‡ªå‹•çš„ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é©åˆ‡ãªãƒ‡ã‚£ã‚¹ã‚¯ã«ç§»å‹•ã—ã¾ã™ã€‚ +状態ファイル用ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã™ã‚‹ã«ã¯ã€`keeper_server.state_storage_disk`設定をディスクåã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ディスク間ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ç§»å‹•ã¯å®‰å…¨ã§ã€è»¢é€ã®é€”中ã§KeeperãŒåœæ­¢ã—ãŸå ´åˆã§ã‚‚データを失ã†ãƒªã‚¹ã‚¯ã¯ã‚ã‚Šã¾ã›ã‚“。 +ファイルãŒå®Œå…¨ã«æ–°ã—ã„ディスクã«ç§»å‹•ã•ã‚Œã‚‹ã¾ã§ã€å…ƒã®ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰å‰Šé™¤ã•ã‚Œã¾ã›ã‚“。 + +Keeperã§`keeper_server.coordination_settings.force_sync`ãŒ`true`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼ˆä¸€éƒ¨ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¿ã‚¤ãƒ—ã§ã¯ä¿è¨¼ã‚’満ãŸã™ã“ã¨ãŒã§ãã¾ã›ã‚“。デフォルトã§ã¯trueã§ã™ï¼‰ã€‚ +ç¾åœ¨ã€`local`タイプã®ãƒ‡ã‚£ã‚¹ã‚¯ã®ã¿ãŒæŒç¶šçš„ãªåŒæœŸã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +`force_sync`ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€`log_storage_disk`ã¯`local`ディスクã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。`latest_log_storage_disk`ãŒä½¿ç”¨ã•ã‚Œã¦ã„ãªã„å ´åˆã€‚ +`latest_log_storage_disk`ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãã‚Œã¯å¸¸ã«`local`ディスクã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +`force_sync`ãŒç„¡åŠ¹ã®å ´åˆã€ã™ã¹ã¦ã®ã‚¿ã‚¤ãƒ—ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’ä»»æ„ã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +Keeperインスタンスã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸è¨­å®šä¾‹ã¯æ¬¡ã®ã‚ˆã†ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```xml + + + log_s3_plain + log_local + + snapshot_s3_plain + snapshot_local + + +``` + +ã“ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã€æœ€æ–°ã§ãªã„ログをã™ã¹ã¦`log_s3_plain`ディスクã«ä¿å­˜ã—ã€æœ€æ–°ã®ãƒ­ã‚°ã¯`log_local`ディスクã«ä¿å­˜ã—ã¾ã™ã€‚ +スナップショットã«ã¤ã„ã¦ã‚‚åŒæ§˜ã§ã€æœ€æ–°ã§ãªã„スナップショットã¯`snapshot_s3_plain`ã«ä¿å­˜ã•ã‚Œã€æœ€æ–°ã®ã‚¹ãƒŠãƒƒãƒ—ショットã¯`snapshot_local`ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +### ディスク設定ã®å¤‰æ›´ + +:::important +æ–°ã—ã„ディスク設定をé©ç”¨ã™ã‚‹å‰ã«ã€ã™ã¹ã¦ã®Keeperログã¨ã‚¹ãƒŠãƒƒãƒ—ショットを手動ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã—ã¦ãã ã•ã„。 +::: + +階層化ディスク設定ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆï¼ˆæœ€æ–°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ¥ã€…ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã™ã‚‹ï¼‰ã€Keeperã¯èµ·å‹•æ™‚ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’æ­£ã—ã„ディスクã«è‡ªå‹•çš„ã«ç§»å‹•ã—よã†ã¨ã—ã¾ã™ã€‚ +以å‰ã¨åŒã˜ä¿è¨¼ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ファイルãŒå®Œå…¨ã«æ–°ã—ã„ディスクã«ç§»å‹•ã•ã‚Œã‚‹ã¾ã§ã€å…ƒã®ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰å‰Šé™¤ã•ã‚Œã¾ã›ã‚“。ãã®ãŸã‚ã€è¤‡æ•°ã®å†èµ·å‹•ã¯å®‰å…¨ã«è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ファイルを完全ã«æ–°ã—ã„ディスクã«ç§»å‹•ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆï¼ˆã¾ãŸã¯2ディスク設定ã‹ã‚‰1ディスク設定ã«ç§»è¡Œã™ã‚‹å ´åˆï¼‰ã€`keeper_server.old_snapshot_storage_disk`ã¨`keeper_server.old_log_storage_disk`ã®è¤‡æ•°ã®å®šç¾©ã‚’使用ã§ãã¾ã™ã€‚ + +次ã®è¨­å®šã¯ã€ä»¥å‰ã®2ディスク設定ã‹ã‚‰å®Œå…¨ã«æ–°ã—ã„1ディスク設定ã«ç§»è¡Œã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™: + +```xml + + + log_local + log_s3_plain + log_local2 + + snapshot_s3_plain + snapshot_local + snapshot_local2 + + +``` + +起動時ã«ã€ã™ã¹ã¦ã®ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã¯`log_local`ã¨`log_s3_plain`ã‹ã‚‰`log_local2`ã«ç§»å‹•ã•ã‚Œã¾ã™ã€‚ +ã¾ãŸã€ã™ã¹ã¦ã®ã‚¹ãƒŠãƒƒãƒ—ショットファイルã¯`snapshot_local`ã¨`snapshot_s3_plain`ã‹ã‚‰`snapshot_local2`ã«ç§»å‹•ã•ã‚Œã¾ã™ã€‚ + +## ログキャッシュã®è¨­å®š + +ディスクã‹ã‚‰èª­ã¿å–るデータé‡ã‚’最å°é™ã«æŠ‘ãˆã‚‹ãŸã‚ã«ã€Keeperã¯ãƒ­ã‚°ã‚¨ãƒ³ãƒˆãƒªã‚’メモリã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +リクエストãŒå¤§ãã„å ´åˆã€ãƒ­ã‚°ã‚¨ãƒ³ãƒˆãƒªã¯å¤šãã®ãƒ¡ãƒ¢ãƒªã‚’使用ã™ã‚‹ãŸã‚ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ãƒ­ã‚°ã®é‡ã«ä¸Šé™ãŒã‚ã‚Šã¾ã™ã€‚ +上é™ã¯æ¬¡ã®2ã¤ã®è¨­å®šã§åˆ¶å¾¡ã•ã‚Œã¾ã™: +- `latest_logs_cache_size_threshold` - キャッシュã«æ ¼ç´ã•ã‚ŒãŸæœ€æ–°ã®ãƒ­ã‚°ã®ç·ã‚µã‚¤ã‚º +- `commit_logs_cache_size_threshold` - 次ã«ã‚³ãƒŸãƒƒãƒˆã™ã‚‹å¿…è¦ãŒã‚る一連ã®ãƒ­ã‚°ã®ç·ã‚µã‚¤ã‚º + +デフォルト値ãŒå¤§ãã™ãŽã‚‹å ´åˆã€ã“れら2ã¤ã®è¨­å®šã‚’減らã—ã¦ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’減らã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +å„キャッシュãŠã‚ˆã³ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰èª­ã¿å–られãŸãƒ­ã‚°ã®é‡ã‚’確èªã™ã‚‹ãŸã‚ã«`pfev`コマンドを使用ã§ãã¾ã™ã€‚ +ã¾ãŸã€Prometheusエンドãƒã‚¤ãƒ³ãƒˆã‹ã‚‰ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’使用ã—ã¦ã€ä¸¡æ–¹ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ç¾åœ¨ã®ã‚µã‚¤ã‚ºã‚’追跡ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +::: + + +## Prometheus + +Keeperã¯Prometheusã‹ã‚‰ã®ã‚¹ã‚¯ãƒ¬ã‚¤ãƒ”ング用ã«ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãƒ»ãƒ‡ãƒ¼ã‚¿ã‚’公開ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +設定ã¯[ClickHouseã¨åŒã˜æ–¹æ³•ã§è¡Œã‚ã‚Œã¾ã™ã€‚](/docs/ja/operations/server-configuration-parameters/settings#prometheus) + +## ClickHouse Keeperユーザーガイド + +ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€ClickHouse Keeperを設定ã™ã‚‹ãŸã‚ã®ã‚·ãƒ³ãƒ—ルã§æœ€å°é™ã®è¨­å®šã‚’æä¾›ã—ã€åˆ†æ•£æ“作をテストã™ã‚‹æ–¹æ³•ã®ä¾‹ã‚’示ã—ã¾ã™ã€‚ã“ã®ä¾‹ã¯ã€Linux上ã§3ã¤ã®ãƒŽãƒ¼ãƒ‰ã‚’使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +### 1. ノードをKeeper設定ã§æ§‹æˆã™ã‚‹ + +1. 3ã¤ã®ClickHouseインスタンスを3ã¤ã®ãƒ›ã‚¹ãƒˆï¼ˆchnode1ã€chnode2ã€chnode3)ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¾ã™ã€‚(ClickHouseã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«é–¢ã™ã‚‹è©³ç´°ã¯[クイックスタート](/docs/ja/getting-started/install.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。) + +2. å„ノードã§ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ã‚’介ã—ãŸå¤–部通信を許å¯ã™ã‚‹ãŸã‚ã«ã€æ¬¡ã®ã‚¨ãƒ³ãƒˆãƒªã‚’追加ã—ã¾ã™ã€‚ + ```xml + 0.0.0.0 + ``` + +3. 次ã®ClickHouse Keeper設定を3ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã«è¿½åŠ ã—ã€å„サーãƒãƒ¼ã®``設定を更新ã—ã¾ã™ã€‚例ãˆã°ã€`chnode1`ã¯`1`ã€`chnode2`ã¯`2`ã®ã‚ˆã†ã«è¨­å®šã—ã¾ã™ã€‚ + ```xml + + 9181 + 1 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + + 10000 + 30000 + warning + + + + + 1 + chnode1.domain.com + 9234 + + + 2 + chnode2.domain.com + 9234 + + + 3 + chnode3.domain.com + 9234 + + + + ``` + + 以下ã¯ä¸Šè¨˜ã®åŸºæœ¬è¨­å®šã§ã™: + + |パラメータ |説明 |例 | + |----------|------------------------------|---------------------| + |tcp_port |keeperã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒä½¿ç”¨ã™ã‚‹ãƒãƒ¼ãƒˆ|9181 デフォルトã§ã¯zookeeperã®2181相当| + |server_id| å„ClickHouse Keeperサーãƒãƒ¼ã®è­˜åˆ¥å­ã§raftã®è¨­å®šã§ä½¿ç”¨ã•ã‚Œã¾ã™| 1| + |coordination_settings| パラメータ(タイムアウト等)を設定ã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³| タイムアウト: 10000, ログレベル: trace| + |server |å‚加ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã®å®šç¾©|å„サーãƒãƒ¼ã®å®šç¾©ãƒªã‚¹ãƒˆ| + |raft_configuration| keeperクラスタ内ã®å„サーãƒãƒ¼ã®è¨­å®š| å„サーãƒãƒ¼ã¨è¨­å®šã®ãƒªã‚¹ãƒˆ| + |id |keeperサービス用ã®ã‚µãƒ¼ãƒãƒ¼ã®æ•°å€¤ID|1| + |hostname |keeperクラスタ内ã®å„サーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆåã€IPã€ã¾ãŸã¯FQDN|chnode1.domain.com| + |port|インターサーãƒãƒ¼ã®keeper接続をリッスンã™ã‚‹ãƒãƒ¼ãƒˆ|9234| + + +4. 組ã¿è¾¼ã¿ã®ZooKeeperを有効ã«ã—ã¾ã™ã€‚ClickHouse Keeperエンジンを使用ã—ã¾ã™: + ```xml + + + chnode1.domain.com + 9181 + + + chnode2.domain.com + 9181 + + + chnode3.domain.com + 9181 + + + ``` + + 以下ã¯ä¸Šè¨˜ã®åŸºæœ¬è¨­å®šã§ã™: + + |パラメータ |説明 |例 | + |----------|------------------------------|---------------------| + |node |ClickHouse Keeper接続用ã®ãƒŽãƒ¼ãƒ‰ã®ãƒªã‚¹ãƒˆ|å„サーãƒãƒ¼ã®è¨­å®šã‚¨ãƒ³ãƒˆãƒª| + |host|å„ClickHouse Keeperノードã®ãƒ›ã‚¹ãƒˆåã€IPã€ã¾ãŸã¯FQDN|chnode1.domain.com| + |port|ClickHouse Keeperã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒãƒ¼ãƒˆ|9181| + +5. ClickHouseã‚’å†èµ·å‹•ã—ã€å„KeeperインスタンスãŒå®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚å„サーãƒãƒ¼ã§æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚`ruok`コマンドã¯KeeperãŒå®Ÿè¡Œä¸­ã§æ­£å¸¸ã§ã‚ã‚‹å ´åˆã«`imok`ã‚’è¿”ã—ã¾ã™ã€‚ + ```bash + # echo ruok | nc localhost 9181; echo + imok + ``` + +6. `system`データベースã«ã¯ã€ClickHouse Keeperインスタンスã®è©³ç´°ã‚’å«ã‚€`zookeeper`テーブルãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルを表示ã—ã¦ã¿ã¾ã—ょã†: + ```sql + SELECT * + FROM system.zookeeper + WHERE path IN ('/', '/clickhouse') + ``` + + テーブルã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + ```response + ┌─name───────┬─value─┬─czxid─┬─mzxid─┬───────────────ctime─┬───────────────mtime─┬─version─┬─cversion─┬─aversion─┬─ephemeralOwner─┬─dataLength─┬─numChildren─┬─pzxid─┬─path────────┠+ │ clickhouse │ │ 124 │ 124 │ 2022-03-07 00:49:34 │ 2022-03-07 00:49:34 │ 0 │ 2 │ 0 │ 0 │ 0 │ 2 │ 5693 │ / │ + │ task_queue │ │ 125 │ 125 │ 2022-03-07 00:49:34 │ 2022-03-07 00:49:34 │ 0 │ 1 │ 0 │ 0 │ 0 │ 1 │ 126 │ /clickhouse │ + │ tables │ │ 5693 │ 5693 │ 2022-03-07 00:49:34 │ 2022-03-07 00:49:34 │ 0 │ 3 │ 0 │ 0 │ 0 │ 3 │ 6461 │ /clickhouse │ + └────────────┴───────┴───────┴───────┴─────────────────────┴─────────────────────┴─────────┴──────────┴──────────┴────────────────┴────────────┴─────────────┴───────┴─────────────┘ + ``` + +### 2. ClickHouseã«ã‚¯ãƒ©ã‚¹ã‚¿ã‚’設定ã™ã‚‹ + +1. 2ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã¨1ã¤ã®ãƒ¬ãƒ—リカã§æ§‹æˆã•ã‚Œã‚‹ã‚·ãƒ³ãƒ—ルãªã‚¯ãƒ©ã‚¹ã‚¿ã‚’構æˆã—ã¾ã™ã€‚3番目ã®ãƒŽãƒ¼ãƒ‰ã¯ã€ClickHouse Keeperã®ã‚¯ã‚©ãƒ¼ãƒ©ãƒ æ¡ä»¶ã®ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚`chnode1`ã¨`chnode2`ã§è¨­å®šã‚’æ›´æ–°ã—ã¾ã™ã€‚ã“ã®ã‚¯ãƒ©ã‚¹ã‚¿ã¯ã€å„ノードã«1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’é…ç½®ã—ã€åˆè¨ˆ2ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’æŒã¡ã€ãƒ¬ãƒ—リケーションã¯è¡Œã‚ã‚Œã¾ã›ã‚“。ã“ã®ä¾‹ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®ä¸€éƒ¨ãŒç‰‡æ–¹ã®ãƒŽãƒ¼ãƒ‰ã«ã‚ã‚Šã€æ®‹ã‚ŠãŒã‚‚ã†ä¸€æ–¹ã®ãƒŽãƒ¼ãƒ‰ã«ã‚ã‚Šã¾ã™: + ```xml + + + + + chnode1.domain.com + 9000 + default + ClickHouse123! + + + + + chnode2.domain.com + 9000 + default + ClickHouse123! + + + + + ``` + + |パラメータ |説明 |例 | + |----------|------------------------------|---------------------| + |shard |クラスタ定義内ã®ãƒ¬ãƒ—リカã®ãƒªã‚¹ãƒˆ|å„シャードã®ãƒ¬ãƒ—リカリスト| + |replica|å„レプリカã®è¨­å®šã®ãƒªã‚¹ãƒˆ|å„レプリカã®è¨­å®šã‚¨ãƒ³ãƒˆãƒª| + |host|レプリカシャードをホストã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆåã€IPã¾ãŸã¯FQDN|chnode1.domain.com| + |port|ãƒã‚¤ãƒ†ã‚£ãƒ–TCPプロトコルを使ã£ãŸé€šä¿¡ã«ä½¿ç”¨ã™ã‚‹ãƒãƒ¼ãƒˆ|9000| + |user|クラスタインスタンスã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼å|default| + |password|クラスタインスタンスã¸ã®æŽ¥ç¶šã‚’許å¯ã™ã‚‹ãŸã‚ã®ãƒ¦ãƒ¼ã‚¶ã‚¤ãƒ³ã®ãƒ‘スワード|ClickHouse123!| + + +2. ClickHouseã‚’å†èµ·å‹•ã—ã€ã‚¯ãƒ©ã‚¹ã‚¿ãŒä½œæˆã•ã‚ŒãŸã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + ```bash + SHOW clusters; + ``` + + クラスタãŒè¡¨ç¤ºã•ã‚Œã¾ã™: + ```response + ┌─cluster───────┠+ │ cluster_2S_1R │ + └───────────────┘ + ``` + +### 3. 分散テーブルã®ä½œæˆã¨ãƒ†ã‚¹ãƒˆ + +1. æ–°ã—ã„クラスタã§æ–°ã—ã„データベースを作æˆã—ã¾ã™ã€‚`ON CLUSTER`å¥ã¯ã€ä¸¡æ–¹ã®ãƒŽãƒ¼ãƒ‰ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’自動的ã«ä½œæˆã—ã¾ã™ã€‚ + ```sql + CREATE DATABASE db1 ON CLUSTER 'cluster_2S_1R'; + ``` + +2. `db1`データベースã«æ–°ã—ã„テーブルを作æˆã—ã¾ã™ã€‚å†ã³ã€`ON CLUSTER`ã¯ä¸¡æ–¹ã®ãƒŽãƒ¼ãƒ‰ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ + ```sql + CREATE TABLE db1.table1 on cluster 'cluster_2S_1R' + ( + `id` UInt64, + `column1` String + ) + ENGINE = MergeTree + ORDER BY column1 + ``` + +3. `chnode1`ノードã«ã„ãã¤ã‹ã®è¡Œã‚’追加ã—ã¾ã™: + ```sql + INSERT INTO db1.table1 + (id, column1) + VALUES + (1, 'abc'), + (2, 'def') + ``` + +4. `chnode2`ノードã«ã„ãã¤ã‹ã®è¡Œã‚’追加ã—ã¾ã™: + ```sql + INSERT INTO db1.table1 + (id, column1) + VALUES + (3, 'ghi'), + (4, 'jkl') + ``` + +5. å„ノードã§ã®`SELECT`ステートメントã®å®Ÿè¡Œã¯ã€ãã®ãƒŽãƒ¼ãƒ‰ã«ã‚るデータã®ã¿ã‚’表示ã—ã¾ã™ã€‚例ãˆã°ã€`chnode1`ã§: + ```sql + SELECT * + FROM db1.table1 + ``` + + ```response + Query id: 7ef1edbc-df25-462b-a9d4-3fe6f9cb0b6d + + ┌─id─┬─column1─┠+ │ 1 │ abc │ + │ 2 │ def │ + └────┴─────────┘ + + 2 rows in set. Elapsed: 0.006 sec. + ``` + + `chnode2`ã§: + ```sql + SELECT * + FROM db1.table1 + ``` + + ```response + Query id: c43763cc-c69c-4bcc-afbe-50e764adfcbf + + ┌─id─┬─column1─┠+ │ 3 │ ghi │ + │ 4 │ jkl │ + └────┴─────────┘ + ``` + +6. 2ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ä¸Šã®ãƒ‡ãƒ¼ã‚¿ã‚’表ã™ãŸã‚ã«`分散テーブル`を作æˆã§ãã¾ã™ã€‚`分散テーブル`エンジンをæŒã¤ãƒ†ãƒ¼ãƒ–ルã¯ã€è‡ªèº«ã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã›ãšã€è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼ã§åˆ†æ•£ã‚¯ã‚¨ãƒªå‡¦ç†ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚読ã¿å–ã‚Šã¯ã™ã¹ã¦ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«å½“ãŸã‚Šã€æ›¸ãè¾¼ã¿ã¯ã‚·ãƒ£ãƒ¼ãƒ‰é–“ã§åˆ†æ•£ã§ãã¾ã™ã€‚`chnode1`ã§ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™: + ```sql + CREATE TABLE db1.dist_table ( + id UInt64, + column1 String + ) + ENGINE = Distributed(cluster_2S_1R,db1,table1) + ``` + +7. `dist_table`をクエリã™ã‚‹ã¨ã€2ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®ãƒ‡ãƒ¼ã‚¿ãŒã™ã¹ã¦4行返ã•ã‚Œã‚‹ã“ã¨ã‚’確èªã—ã¾ã™: + ```sql + SELECT * + FROM db1.dist_table + ``` + + ```response + Query id: 495bffa0-f849-4a0c-aeea-d7115a54747a + + ┌─id─┬─column1─┠+ │ 1 │ abc │ + │ 2 │ def │ + └────┴─────────┘ + ┌─id─┬─column1─┠+ │ 3 │ ghi │ + │ 4 │ jkl │ + └────┴─────────┘ + + 4 rows in set. Elapsed: 0.018 sec. + ``` + +### ã¾ã¨ã‚ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ClickHouse Keeperを使用ã—ã¦ã‚¯ãƒ©ã‚¹ã‚¿ã‚’設定ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¾ã—ãŸã€‚ClickHouse Keeperを使用ã™ã‚‹ã¨ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’構æˆã—ã€ã‚·ãƒ£ãƒ¼ãƒ‰é–“ã§ãƒ¬ãƒ—リケートå¯èƒ½ãªåˆ†æ•£ãƒ†ãƒ¼ãƒ–ルを定義ã§ãã¾ã™ã€‚ + + +## ユニークãªãƒ‘スã§ClickHouse Keeperを設定ã™ã‚‹ + + + +### 説明 + +ã“ã®è¨˜äº‹ã§ã¯ã€çµ„ã¿è¾¼ã¿ã®`{uuid}`マクロ設定を使用ã—ã¦ã€ClickHouse Keeperã¾ãŸã¯ZooKeeperã«ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªã‚¨ãƒ³ãƒˆãƒªã‚’作æˆã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚ユニークãªãƒ‘スã¯ãƒ†ãƒ¼ãƒ–ルを頻ç¹ã«ä½œæˆãŠã‚ˆã³å‰Šé™¤ã™ã‚‹å ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ‘スãŒä½œæˆã•ã‚Œã‚‹ãŸã³ã«æ–°ã—ã„`uuid`ãŒãƒ‘スã§ä½¿ç”¨ã•ã‚Œã€ãƒ‘スãŒå†åˆ©ç”¨ã•ã‚Œãªã„ãŸã‚ã€KeeperガベージコレクションãŒãƒ‘スエントリを削除ã™ã‚‹ã¾ã§æ•°åˆ†å¾…ã¤å¿…è¦ãŒãªã„ã‹ã‚‰ã§ã™ã€‚ + +### 環境例 +ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã«ClickHouse Keeperã‚’æŒã¡ã€ClickHouseã‚’2ノードã«æŒã¤ã‚ˆã†ã«æ§‹æˆã•ã‚Œã‚‹3ノードクラスタ例。ã“ã®è¨­å®šã«ã‚ˆã‚Šã€ClickHouse Keeperã«ã¯3ノード(タイブレーカーノードをå«ã‚€ï¼‰ãŒã‚ã‚Šã€1ã¤ã®ClickHouseシャードãŒ2ã¤ã®ãƒ¬ãƒ—リカã§æ§‹æˆã•ã‚Œã¾ã™ã€‚ + +|ノード|説明| +|-----|-----| +|chnode1.marsnet.local|データノード - cluster cluster_1S_2R| +|chnode2.marsnet.local|データノード - cluster cluster_1S_2R| +|chnode3.marsnet.local|ClickHouse Keeperタイブレーカーノード| + +クラスタã®ä¾‹è¨­å®š: +```xml + + + + + chnode1.marsnet.local + 9440 + default + ClickHouse123! + 1 + + + chnode2.marsnet.local + 9440 + default + ClickHouse123! + 1 + + + + +``` + +### {uuid}を使用ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ル設定手順 +1. å„サーãƒãƒ¼ã§ãƒžã‚¯ãƒ­ã‚’設定ã—ã¾ã™ã€‚サーãƒãƒ¼1ã®ä¾‹: +```xml + + 1 + replica_1 + +``` +:::note +`shard`ã¨`replica`ã®ãƒžã‚¯ãƒ­ã‚’定義ã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„ãŒã€`{uuid}`ã¯ã“ã“ã§å®šç¾©ã•ã‚Œã‚‹ã“ã¨ã¯ãªãã€ãれ自体ã§çµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ãŸã‚ã€å®šç¾©ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +2. データベースを作æˆã™ã‚‹ + +```sql +CREATE DATABASE db_uuid + ON CLUSTER 'cluster_1S_2R' + ENGINE Atomic; +``` + +```response +CREATE DATABASE db_uuid ON CLUSTER cluster_1S_2R +ENGINE = Atomic + +Query id: 07fb7e65-beb4-4c30-b3ef-bd303e5c42b5 + +┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+│ chnode2.marsnet.local │ 9440 │ 0 │ │ 1 │ 0 │ +│ chnode1.marsnet.local │ 9440 │ 0 │ │ 0 │ 0 │ +└───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘ +``` + +3. クラスタ上ã§ãƒžã‚¯ãƒ­ã¨`{uuid}`を使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ +```sql +CREATE TABLE db_uuid.uuid_table1 ON CLUSTER 'cluster_1S_2R' + ( + id UInt64, + column1 String + ) + ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/db_uuid/{uuid}', '{replica}' ) + ORDER BY (id); +``` + +```response +CREATE TABLE db_uuid.uuid_table1 ON CLUSTER cluster_1S_2R +( + `id` UInt64, + `column1` String +) +ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/db_uuid/{uuid}', '{replica}') +ORDER BY id + +Query id: 8f542664-4548-4a02-bd2a-6f2c973d0dc4 + +┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+│ chnode1.marsnet.local │ 9440 │ 0 │ │ 1 │ 0 │ +│ chnode2.marsnet.local │ 9440 │ 0 │ │ 0 │ 0 │ +└───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘ +``` + +4. 分散テーブルを作æˆã™ã‚‹ +```sql +create table db_uuid.dist_uuid_table1 on cluster 'cluster_1S_2R' + ( + id UInt64, + column1 String + ) + ENGINE = Distributed('cluster_1S_2R', 'db_uuid', 'uuid_table1' ); +``` + +```response +CREATE TABLE db_uuid.dist_uuid_table1 ON CLUSTER cluster_1S_2R +( + `id` UInt64, + `column1` String +) +ENGINE = Distributed('cluster_1S_2R', 'db_uuid', 'uuid_table1') + +Query id: 3bc7f339-ab74-4c7d-a752-1ffe54219c0e + +┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+│ chnode2.marsnet.local │ 9440 │ 0 │ │ 1 │ 0 │ +│ chnode1.marsnet.local │ 9440 │ 0 │ │ 0 │ 0 │ +└───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘ +``` + +### テスト +1. 最åˆã®ãƒŽãƒ¼ãƒ‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ï¼ˆä¾‹ï¼š`chnode1`) +```sql +INSERT INTO db_uuid.uuid_table1 + ( id, column1) + VALUES + ( 1, 'abc'); +``` + +```response +INSERT INTO db_uuid.uuid_table1 (id, column1) FORMAT Values + +Query id: 0f178db7-50a6-48e2-9a1b-52ed14e6e0f9 + +Ok. + +1 row in set. Elapsed: 0.033 sec. +``` + +2. 2番目ã®ãƒŽãƒ¼ãƒ‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ï¼ˆä¾‹ï¼š`chnode2`) +```sql +INSERT INTO db_uuid.uuid_table1 + ( id, column1) + VALUES + ( 2, 'def'); +``` + +```response +INSERT INTO db_uuid.uuid_table1 (id, column1) FORMAT Values + +Query id: edc6f999-3e7d-40a0-8a29-3137e97e3607 + +Ok. + +1 row in set. Elapsed: 0.529 sec. +``` + +3. 分散テーブルを使用ã—ã¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’表示ã™ã‚‹ +```sql +SELECT * FROM db_uuid.dist_uuid_table1; +``` + +```response +SELECT * +FROM db_uuid.dist_uuid_table1 + +Query id: 6cbab449-9e7f-40fe-b8c2-62d46ba9f5c8 + +┌─id─┬─column1─┠+│ 1 │ abc │ +└────┴─────────┘ +┌─id─┬─column1─┠+│ 2 │ def │ +└────┴─────────┘ + +2 rows in set. Elapsed: 0.007 sec. +``` + +### 代替案 +デフォルトã®ãƒ¬ãƒ—リケーションパスã¯ãƒžã‚¯ãƒ­ã«ã‚ˆã£ã¦äº‹å‰ã«å®šç¾©ã•ã‚Œã€`{uuid}`も使用ã•ã‚Œã¾ã™ã€‚ + +1. å„ノードã§ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚’設定ã™ã‚‹ +```xml +/clickhouse/tables/{shard}/db_uuid/{uuid} +``` +```default_replica_name +{replica} +``` +:::tip +ノードãŒç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€å„ノードã§ãƒžã‚¯ãƒ­ `{database}` を定義ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +::: + +2. パラメータを明示的ã«æŒ‡å®šã›ãšã«ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹: +```sql +CREATE TABLE db_uuid.uuid_table1 ON CLUSTER 'cluster_1S_2R' + ( + id UInt64, + column1 String + ) + ENGINE = ReplicatedMergeTree + ORDER BY (id); +``` + +```response +CREATE TABLE db_uuid.uuid_table1 ON CLUSTER cluster_1S_2R +( + `id` UInt64, + `column1` String +) +ENGINE = ReplicatedMergeTree +ORDER BY id + +Query id: ab68cda9-ae41-4d6d-8d3b-20d8255774ee + +┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+│ chnode2.marsnet.local │ 9440 │ 0 │ │ 1 │ 0 │ +│ chnode1.marsnet.local │ 9440 │ 0 │ │ 0 │ 0 │ +└───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘ + +2 rows in set. Elapsed: 1.175 sec. +``` + +3. デフォルトã®è¨­å®šãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã™ã‚‹: +```sql +SHOW CREATE TABLE db_uuid.uuid_table1; +``` + +```response +SHOW CREATE TABLE db_uuid.uuid_table1 + +Query id: 5925ecce-a54f-47d8-9c3a-ad3257840c9e + +┌─statement────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ CREATE TABLE db_uuid.uuid_table1 +( + `id` UInt64, + `column1` String +) +ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/db_uuid/{uuid}', '{replica}') +ORDER BY id +SETTINGS index_granularity = 8192 │ +└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ + +1 row in set. Elapsed: 0.003 sec. +``` + +### トラブルシューティング + +テーブル情報ã¨UUIDã‚’å–å¾—ã™ã‚‹ãŸã‚ã®ã‚³ãƒžãƒ³ãƒ‰ã®ä¾‹: +```sql +SELECT * FROM system.tables +WHERE database = 'db_uuid' AND name = 'uuid_table1'; +``` + +上記ã®ãƒ†ãƒ¼ãƒ–ルã®UUIDã«é–¢ã™ã‚‹æƒ…報をZooKeeperã‹ã‚‰å–å¾—ã™ã‚‹ãŸã‚ã®ã‚³ãƒžãƒ³ãƒ‰ã®ä¾‹: +```sql +SELECT * FROM system.zookeeper +WHERE path = '/clickhouse/tables/1/db_uuid/9e8a3cc2-0dec-4438-81a7-c3e63ce2a1cf/replicas'; +``` + +:::note +データベース㯠`Atomic` ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。以å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‹ã‚‰ã‚¢ãƒƒãƒ—グレードã™ã‚‹å ´åˆã€ +`default` データベースã¯ãŠãらã `Ordinary` タイプã§ã™ã€‚ +::: + +ãƒã‚§ãƒƒã‚¯æ–¹æ³•ã®ä¾‹: +``` +SELECT name, engine FROM system.databases WHERE name = 'db_uuid'; +``` + +```response +SELECT + name, + engine +FROM system.databases +WHERE name = 'db_uuid' + +Query id: b047d459-a1d2-4016-bcf9-3e97e30e49c2 + +┌─name────┬─engine─┠+│ db_uuid │ Atomic │ +└─────────┴────────┘ + +1 row in set. Elapsed: 0.004 sec. +``` + +## ClickHouse Keeperã®å‹•çš„å†æ§‹æˆ {#reconfiguration} + + + +### 説明 + +ClickHouse Keeperã¯ã€å‹•çš„クラスタå†æ§‹æˆã®ãŸã‚ã«ZooKeeperã®[`reconfig`](https://zookeeper.apache.org/doc/r3.5.3-beta/zookeeperReconfig.html#sc_reconfig_modifying) +コマンドを部分的ã«ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚`keeper_server.enable_reconfiguration` ãŒã‚ªãƒ³ã«ãªã£ã¦ã„ã‚‹å ´åˆã«ã®ã¿å‹•ä½œã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šãŒã‚ªãƒ•ã®å ´åˆã€ãƒ¬ãƒ—リカ㮠`raft_configuration` セクションを手動ã§å¤‰æ›´ã—ã¦ã‚¯ãƒ©ã‚¹ã‚¿ã‚’å†æ§‹æˆã§ãã¾ã™ã€‚ +リーダーã®ã¿ãŒå¤‰æ›´ã‚’é©ç”¨ã™ã‚‹ãŸã‚ã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’編集ã™ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +ã‚ã‚‹ã„ã¯ã€ZooKeeper互æ›ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã—㦠`reconfig` クエリをé€ä¿¡ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +::: + +仮想ノード `/keeper/config` ã«ã¯ã€æ¬¡ã®å½¢å¼ã§æœ€å¾Œã«ã‚³ãƒŸãƒƒãƒˆã•ã‚ŒãŸã‚¯ãƒ©ã‚¹ã‚¿ã®è¨­å®šãŒå«ã¾ã‚Œã¦ã„ã¾ã™: + +``` +server.id = server_host:server_port[;server_type][;server_priority] +server.id2 = ... +... +``` + +- å„サーãƒãƒ¼ã‚¨ãƒ³ãƒˆãƒªã¯æ”¹è¡Œã§åŒºåˆ‡ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ +- `server_type` 㯠`participant` ã¾ãŸã¯ `learner` ([learner](https://github.com/eBay/NuRaft/blob/master/docs/readonly_member.md) ã¯ãƒªãƒ¼ãƒ€ãƒ¼é¸å‡ºã«å‚加ã—ã¾ã›ã‚“) ã®ã„ãšã‚Œã‹ã§ã™ã€‚ +- `server_priority` ã¯ã€[リーダーé¸å‡ºæ™‚ã«å„ªå…ˆã•ã‚Œã‚‹ãƒŽãƒ¼ãƒ‰ã‚’評価ã™ã‚‹](https://github.com/eBay/NuRaft/blob/master/docs/leader_election_priority.md)éžè² ã®æ•´æ•°ã§ã™ã€‚ + 0 ã®å„ªå…ˆåº¦ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãŒãƒªãƒ¼ãƒ€ãƒ¼ã«ãªã‚‰ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +例: + +``` +:) get /keeper/config +server.1=zoo1:9234;participant;1 +server.2=zoo2:9234;participant;1 +server.3=zoo3:9234;participant;1 +``` + +`reconfig` コマンドを用ã„ã¦ã€æ–°ã—ã„サーãƒãƒ¼ã‚’追加ã—ã€æ—¢å­˜ã®ã‚µãƒ¼ãƒãƒ¼ã‚’削除ã—ãŸã‚Šã€ +既存ã®ã‚µãƒ¼ãƒãƒ¼ã®å„ªå…ˆåº¦ã‚’変更ã—ãŸã‚Šã§ãã¾ã™ã€‚以下ã«ä¾‹ã‚’示ã—ã¾ã™ï¼ˆ`clickhouse-keeper-client`を使用): + +```bash +# æ–°ã—ã„2ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã‚’追加 +reconfig add "server.5=localhost:123,server.6=localhost:234;learner" +# ä»–ã®2ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã‚’削除 +reconfig remove "3,4" +# 既存ã®ã‚µãƒ¼ãƒãƒ¼ã®å„ªå…ˆåº¦ã‚’8ã«å¤‰æ›´ +reconfig add "server.5=localhost:5123;participant;8" +``` + +ã“ã¡ã‚‰ã¯`kazoo`ã®ä¾‹ã§ã™: + +```python +# æ–°ã—ã„2ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã‚’追加ã—ã€ä»–ã®2ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã‚’削除 +reconfig(joining="server.5=localhost:123,server.6=localhost:234;learner", leaving="3,4") + +# 既存ã®ã‚µãƒ¼ãƒãƒ¼ã®å„ªå…ˆåº¦ã‚’8ã«å¤‰æ›´ +reconfig(joining="server.5=localhost:5123;participant;8", leaving=None) +``` + +å‚加ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã¯ä¸Šè¨˜ã®ã‚µãƒ¼ãƒãƒ¼ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚サーãƒãƒ¼ã‚¨ãƒ³ãƒˆãƒªã¯ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +æ–°ã—ã„サーãƒãƒ¼ã‚’追加ã™ã‚‹éš›ã€`server_priority`(デフォルト値ã¯1)や`server_type`(デフォルト値ã¯`participant`)ã¯çœç•¥ã§ãã¾ã™ã€‚ + +既存ã®ã‚µãƒ¼ãƒãƒ¼å„ªå…ˆåº¦ã‚’変更ã—ãŸã„å ´åˆã€`joining`ã«å¯¾è±¡ã®å„ªå…ˆåº¦ã§è¿½åŠ ã—ã¦ãã ã•ã„。 +サーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆã€ãƒãƒ¼ãƒˆã€ã‚¿ã‚¤ãƒ—ã¯æ—¢å­˜ã®ã‚µãƒ¼ãƒãƒ¼è¨­å®šã¨ç­‰ã—ããªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +サーãƒãƒ¼ã¯`joining`ãŠã‚ˆã³`leaving`ã«è¨˜è¼‰ã•ã‚ŒãŸé †ã«è¿½åŠ ãŠã‚ˆã³å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ +`joining`ã‹ã‚‰ã®ã™ã¹ã¦ã®ã‚¢ãƒƒãƒ—デートã¯`leaving`ã‹ã‚‰ã®ã‚¢ãƒƒãƒ—デートよりも先ã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +Keeperå†æ§‹æˆã®å®Ÿè£…ã«ã¯ã„ãã¤ã‹ã®æ³¨æ„点ãŒã‚ã‚Šã¾ã™: + +- 増分å†æ§‹æˆã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚`new_members`ãŒç©ºã§ãªã„リクエストã¯æ‹’å¦ã•ã‚Œã¾ã™ã€‚ + + ClickHouse Keeperã®å®Ÿè£…ã¯ã€ä¼šå“¡ã‚’å‹•çš„ã«å¤‰æ›´ã™ã‚‹ãŸã‚ã«NuRaft APIã«ä¾å­˜ã—ã¦ã„ã¾ã™ã€‚NuRaftã¯ã€ä¸€åº¦ã«1å°ã®ã‚µãƒ¼ãƒãƒ¼ã‚’追加ã¾ãŸã¯å‰Šé™¤ã™ã‚‹æ–¹æ³•ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ã¤ã¾ã‚Šã€æ§‹æˆã¸ã®å¤‰æ›´ï¼ˆ`joining`ã®å„部分ã€`leaving`ã®å„部分)ã¯å€‹åˆ¥ã«æ±ºå®šã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。従ã£ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¨ã£ã¦èª¤è§£ã‚’æ‹›ããŠãã‚ŒãŒã‚ã‚‹ãŸã‚ã€å¤§é‡ã®å†æ§‹æˆã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 + + サーãƒãƒ¼ã‚¿ã‚¤ãƒ—ã®å¤‰æ›´ï¼ˆparticipant/learner)ã¯NuRaftã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ãŸã‚ã§ãã¾ã›ã‚“。ã¾ãŸã€ã‚µãƒ¼ãƒãƒ¼ã‚’削除ã—追加ã™ã‚‹æ–¹æ³•ã—ã‹ãªã„ãŸã‚ã€ã“れも誤解を招ããŠãã‚ŒãŒã‚ã‚Šã¾ã™ã€‚ + +- è¿”ã•ã‚ŒãŸ `znodestat` 値ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `from_version` フィールドã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。`from_version` を設定ã—ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã™ã¹ã¦æ‹’å¦ã•ã‚Œã¾ã™ã€‚ + ã“れ㯠`/keeper/config` ãŒä»®æƒ³ãƒŽãƒ¼ãƒ‰ã§ã‚ã‚Šã€æ°¸ç¶šã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«ä¿å­˜ã•ã‚Œã‚‹ã®ã§ã¯ãªã〠+ 指定ã•ã‚ŒãŸãƒŽãƒ¼ãƒ‰è¨­å®šã«åŸºã¥ã„ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã”ã¨ã«ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§ç”Ÿæˆã•ã‚Œã‚‹ãŸã‚ã§ã™ã€‚ã“ã®æ±ºå®šã¯ã€NuRaftãŒã™ã§ã«ã“ã®æ§‹æˆã‚’ä¿å­˜ã—ã¦ã„ã‚‹ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ã®é‡è¤‡ã‚’防ããŸã‚ã«è¡Œã‚ã‚Œã¾ã—ãŸã€‚ +- ZooKeeperã¨ã¯ç•°ãªã‚Šã€`sync` コマンドをæ出ã™ã‚‹ã“ã¨ã§ã‚¯ãƒ©ã‚¹ã‚¿ã®å†æ§‹æˆã‚’å¾…ã¤ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + æ–°ã—ã„コンフィグã¯_最終的ã«_é©ç”¨ã•ã‚Œã¾ã™ãŒã€æ™‚é–“ä¿è¨¼ã¯ã‚ã‚Šã¾ã›ã‚“。 +- `reconfig` コマンドã¯ã•ã¾ã–ã¾ãªç†ç”±ã§å¤±æ•—ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚æ›´æ–°ãŒé©ç”¨ã•ã‚ŒãŸã‹ã©ã†ã‹ã€ã‚¯ãƒ©ã‚¹ã‚¿ã®çŠ¶æ…‹ã‚’確èªã§ãã¾ã™ã€‚ + +## シングルノードã®Keeperをクラスターã«å¤‰æ›ã™ã‚‹ + +時折ã€ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªKeeperノードをクラスタã«æ‹¡å¼µã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚3ノードクラスタã¸ã‚¹ãƒ†ãƒƒãƒ—ãƒã‚¤ã‚¹ãƒ†ãƒƒãƒ—ã§å¤‰æ›ã™ã‚‹æ–¹æ³•ã®æ¦‚è¦ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +- **é‡è¦**: æ–°ã—ã„ノードã¯ã€ç¾åœ¨ã®ã‚¯ã‚©ãƒ¼ãƒ©ãƒ ã‚ˆã‚Šå°‘ãªã„ãƒãƒƒãƒã§è¿½åŠ ã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“ã€ã•ã‚‚ãªã„ã¨å†…部ã§ãƒªãƒ¼ãƒ€ãƒ¼ã‚’é¸å‡ºã—ã¾ã™ã€‚ã“ã“ã§ã¯ä¸€ã¤ãšã¤ã€‚ +- 既存ã®Keeperノードã¯`keeper_server.enable_reconfiguration`設定パラメータをオンã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- 完全ãªæ–°ã—ã„Keeperクラスタ設定ã§2番目ã®ãƒŽãƒ¼ãƒ‰ã‚’èµ·å‹•ã™ã‚‹ã€‚ +- 起動後ã€[reconfig](#reconfiguration)を使用ã—ã¦ãƒŽãƒ¼ãƒ‰1ã«è¿½åŠ ã™ã‚‹ã€‚ +- 次ã«ã€3番目ã®ãƒŽãƒ¼ãƒ‰ã‚’èµ·å‹•ã—ã€[reconfig](#reconfiguration)を使用ã—ã¦è¿½åŠ ã™ã‚‹ã€‚ +- æ–°ã—ã„Keeperノードを追加ã—ã¦`clickhouse-server`設定を更新ã—ã€è¨­å®šã‚’é©ç”¨ã™ã‚‹ãŸã‚ã«å†èµ·å‹•ã™ã‚‹ã€‚ +- ノード1ã®Raft設定を更新ã—ã€å¿…è¦ã«å¿œã˜ã¦å†èµ·å‹•ã™ã‚‹ã€‚ + +ã“ã®ãƒ—ロセスã«è‡ªä¿¡ã‚’æŒã¤ãŸã‚ã«ã€[サンドボックスリãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/keeper-extend-cluster)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 未サãƒãƒ¼ãƒˆã®æ©Ÿèƒ½ + +ClickHouse Keeperã¯ZooKeeperã¨å®Œå…¨ã«äº’æ›æ€§ã‚’æŒã¤ã“ã¨ã‚’目指ã—ã¦ã„ã¾ã™ãŒã€ç¾åœ¨å®Ÿè£…ã•ã‚Œã¦ã„ãªã„機能ãŒã‚ã‚Šã¾ã™ï¼ˆé–‹ç™ºä¸­ã§ã™ï¼‰ï¼š + +- [`create`](https://zookeeper.apache.org/doc/r3.9.1/apidocs/zookeeper-server/org/apache/zookeeper/ZooKeeper.html#create(java.lang.String,byte%5B%5D,java.util.List,org.apache.zookeeper.CreateMode,org.apache.zookeeper.data.Stat)) 㯠`Stat` オブジェクトã®è¿”å´ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“ +- [`create`](https://zookeeper.apache.org/doc/r3.9.1/apidocs/zookeeper-server/org/apache/zookeeper/ZooKeeper.html#create(java.lang.String,byte%5B%5D,java.util.List,org.apache.zookeeper.CreateMode,org.apache.zookeeper.data.Stat)) 㯠[TTL](https://zookeeper.apache.org/doc/r3.9.1/apidocs/zookeeper-server/org/apache/zookeeper/CreateMode.html#PERSISTENT_WITH_TTL) をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“ +- [`addWatch`](https://zookeeper.apache.org/doc/r3.9.1/apidocs/zookeeper-server/org/apache/zookeeper/ZooKeeper.html#addWatch(java.lang.String,org.apache.zookeeper.Watcher,org.apache.zookeeper.AddWatchMode)) 㯠[`PERSISTENT`](https://zookeeper.apache.org/doc/r3.9.1/apidocs/zookeeper-server/org/apache/zookeeper/AddWatchMode.html#PERSISTENT) ウォッãƒã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“ +- [`removeWatch`](https://zookeeper.apache.org/doc/r3.9.1/apidocs/zookeeper-server/org/apache/zookeeper/ZooKeeper.html#removeWatches(java.lang.String,org.apache.zookeeper.Watcher,org.apache.zookeeper.Watcher.WatcherType,boolean)) ãŠã‚ˆã³ [`removeAllWatches`](https://zookeeper.apache.org/doc/r3.9.1/apidocs/zookeeper-server/org/apache/zookeeper/ZooKeeper.html#removeAllWatches(java.lang.String,org.apache.zookeeper.Watcher.WatcherType,boolean)) ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ +- `setWatches` ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ +- [`CONTAINER`](https://zookeeper.apache.org/doc/r3.5.1-alpha/api/org/apache/zookeeper/CreateMode.html) タイプã®znode作æˆã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ +- [`SASLèªè¨¼`](https://cwiki.apache.org/confluence/display/ZOOKEEPER/Zookeeper+and+SASL) ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ +``` diff --git a/docs/ja/guides/sre/network-ports.md b/docs/ja/guides/sre/network-ports.md new file mode 100644 index 00000000000..03c5c6b19e4 --- /dev/null +++ b/docs/ja/guides/sre/network-ports.md @@ -0,0 +1,30 @@ +--- +slug: /ja/guides/sre/network-ports +sidebar_label: ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒãƒ¼ãƒˆ +--- + +# ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒãƒ¼ãƒˆ + +:::note +**デフォルト**ã¨ã—ã¦è¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹ãƒãƒ¼ãƒˆã¯ã€ãƒãƒ¼ãƒˆç•ªå·ãŒ`/etc/clickhouse-server/config.xml`ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚設定をカスタマイズã™ã‚‹ã«ã¯ã€`/etc/clickhouse-server/config.d/`ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’追加ã—ã¦ãã ã•ã„。詳細ã¯[設定ファイル](../../operations/configuration-files.md#override)ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +|ãƒãƒ¼ãƒˆ|説明| +|----|-----------| +|2181|ZooKeeper デフォルトサービスãƒãƒ¼ãƒˆã€‚ **注: ClickHouse Keeper ã®å ´åˆã¯ `9181` ã‚’å‚ç…§**| +|8123|HTTP デフォルトãƒãƒ¼ãƒˆ| +|8443|HTTP SSL/TLS デフォルトãƒãƒ¼ãƒˆ| +|9000|ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルãƒãƒ¼ãƒˆï¼ˆClickHouse TCP プロトコルã¨ã‚‚呼ã°ã‚Œã¾ã™ï¼‰ã€‚`clickhouse-server`, `clickhouse-client` ãŠã‚ˆã³ãƒã‚¤ãƒ†ã‚£ãƒ– ClickHouse ツールã®ã‚ˆã†ãª ClickHouse アプリケーションã¨ãƒ—ロセスã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚分散クエリã®ãŸã‚ã®ã‚µãƒ¼ãƒé–“通信ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚| +|9004|MySQL エミュレーションãƒãƒ¼ãƒˆ| +|9005|PostgreSQL エミュレーションãƒãƒ¼ãƒˆï¼ˆClickHouse 㧠SSL ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ã‚»ã‚­ãƒ¥ã‚¢é€šä¿¡ã«ã‚‚使用ã•ã‚Œã¾ã™ï¼‰ã€‚| +|9009|低レベルデータアクセスã®ãŸã‚ã®ã‚µãƒ¼ãƒé–“通信ãƒãƒ¼ãƒˆã€‚データ交æ›ã€ãƒ¬ãƒ—リケーションã€ã‚µãƒ¼ãƒé–“通信ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚| +|9010|サーãƒé–“通信ã®ãŸã‚ã® SSL/TLS| +|9011|ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコル PROXYv1 プロトコルãƒãƒ¼ãƒˆ| +|9019|JDBC ブリッジ| +|9100|gRPC ãƒãƒ¼ãƒˆ| +|9181|推奨ã•ã‚Œã‚‹ ClickHouse Keeper ãƒãƒ¼ãƒˆ| +|9234|推奨ã•ã‚Œã‚‹ ClickHouse Keeper Raft ãƒãƒ¼ãƒˆï¼ˆ`1`ãŒæœ‰åŠ¹ãªå ´åˆã€ã‚»ã‚­ãƒ¥ã‚¢é€šä¿¡ã«ã‚‚使用)| +|9363|Prometheus デフォルトメトリックãƒãƒ¼ãƒˆ| +|9281|推奨ã•ã‚Œã‚‹ã‚»ã‚­ãƒ¥ã‚¢ SSL ClickHouse Keeper ãƒãƒ¼ãƒˆ| +|9440|ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコル SSL/TLS ãƒãƒ¼ãƒˆ| +|42000|Graphite デフォルトãƒãƒ¼ãƒˆ| diff --git a/docs/ja/guides/sre/scaling-clusters.md b/docs/ja/guides/sre/scaling-clusters.md new file mode 100644 index 00000000000..c308b7ac3a8 --- /dev/null +++ b/docs/ja/guides/sre/scaling-clusters.md @@ -0,0 +1,18 @@ +--- +slug: /ja/guides/sre/scaling-clusters +sidebar_label: シャードå†èª¿æ•´ +sidebar_position: 20 +description: ClickHouseã¯è‡ªå‹•ã‚·ãƒ£ãƒ¼ãƒ‰å†èª¿æ•´ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ãŸã‚ã€ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’å†èª¿æ•´ã™ã‚‹ãŸã‚ã®ãƒ™ã‚¹ãƒˆãƒ—ラクティスをæä¾›ã—ã¾ã™ã€‚ +--- + +# データã®å†èª¿æ•´ + +ClickHouseã¯è‡ªå‹•ã‚·ãƒ£ãƒ¼ãƒ‰å†èª¿æ•´ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“ãŒã€ä»¥ä¸‹ã®å„ªå…ˆé †ä½ã§ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’å†èª¿æ•´ã™ã‚‹æ–¹æ³•ãŒã‚ã‚Šã¾ã™: + +1. [分散テーブル](/docs/ja/engines/table-engines/special/distributed.md)ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’調整ã—ã€æ–°ã—ã„シャードã«æ›¸ãè¾¼ã¿ã‚’åらã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ãƒ©ã‚¹ã‚¿å†…ã§è² è·ã®ä¸å‡è¡¡ã‚„ホットスãƒãƒƒãƒˆãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€æ›¸ãè¾¼ã¿ã‚¹ãƒ«ãƒ¼ãƒ—ットãŒéžå¸¸ã«é«˜ããªã„ã»ã¨ã‚“ã©ã®ã‚·ãƒŠãƒªã‚ªã§ã¯å®Ÿè¡Œå¯èƒ½ã§ã™ã€‚ユーザーã¯æ›¸ãè¾¼ã¿ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã‚’変ãˆã‚‹å¿…è¦ãŒãªãã€åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã®ã¾ã¾ã§æ¸ˆã¿ã¾ã™ã€‚ãŸã ã—ã€æ—¢å­˜ã®ãƒ‡ãƒ¼ã‚¿ã®å†èª¿æ•´ã«ã¯å½¹ç«‹ã¡ã¾ã›ã‚“。 + +2. (1) ã®ä»£æ›¿ã¨ã—ã¦ã€æ—¢å­˜ã®ã‚¯ãƒ©ã‚¹ã‚¿ã‚’修正ã—ã€æ–°ã—ã„シャードã«ã®ã¿æ›¸ã込むã“ã¨ã§ã‚¯ãƒ©ã‚¹ã‚¿ãŒãƒãƒ©ãƒ³ã‚¹ã•ã‚Œã‚‹ã‚ˆã†ã«ã—ã¾ã™ã€‚ã“れも書ãè¾¼ã¿ã®é‡ã¿ä»˜ã‘を手動ã§è¡Œã†ã“ã¨ã«ãªã‚Šã¾ã™ã€‚(1)ã¨åŒã˜åˆ¶é™ãŒã‚ã‚Šã¾ã™ã€‚ + +3. 既存ã®ãƒ‡ãƒ¼ã‚¿ã®å†èª¿æ•´ãŒå¿…è¦ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚’パーティション化ã—ã¦ã„ã‚‹å ´åˆã¯ã€ãƒ‘ーティションを切り離ã—ã¦åˆ¥ã®ãƒŽãƒ¼ãƒ‰ã«æ‰‹å‹•ã§ç§»å‹•ã—ã€æ–°ã—ã„シャードã«å†ã‚¢ã‚¿ãƒƒãƒã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。ã“ã‚Œã¯å¾Œã®æŠ€è¡“より手動ãŒå¤šããªã‚Šã¾ã™ãŒã€ã‚ˆã‚Šè¿…速ã§ãƒªã‚½ãƒ¼ã‚¹ã‚’消費ã—ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯æ‰‹å‹•æ“作ã§ã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã®å†èª¿æ•´ã‚’考慮ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +4. ソースクラスタã‹ã‚‰æ–°ã—ã„クラスタã«ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ã€[INSERT FROM SELECT](/docs/ja/sql-reference/statements/insert-into.md/#inserting-the-results-of-select)を使用ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€éžå¸¸ã«å¤§ããªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã¯ãƒ‘フォーマンスãŒä½Žä¸‹ã—ã€ã‚½ãƒ¼ã‚¹ã‚¯ãƒ©ã‚¹ã‚¿ã«å¤§å¹…ãªIOを発生ã•ã›ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒªã‚½ãƒ¼ã‚¹ã‚’ã‹ãªã‚Šæ¶ˆè²»ã—ã¾ã™ã€‚ã“ã‚Œã¯æœ€çµ‚手段ã§ã™ã€‚ diff --git a/docs/ja/guides/sre/user-management/_category_.yml b/docs/ja/guides/sre/user-management/_category_.yml new file mode 100644 index 00000000000..6123b1742ed --- /dev/null +++ b/docs/ja/guides/sre/user-management/_category_.yml @@ -0,0 +1,7 @@ +position: 5 +label: 'User and role management' +collapsible: true +collapsed: true +link: + type: generated-index + slug: /ja/guides/sre/user-role diff --git a/docs/ja/guides/sre/user-management/configuring-ldap.md b/docs/ja/guides/sre/user-management/configuring-ldap.md new file mode 100644 index 00000000000..4e9477b2c37 --- /dev/null +++ b/docs/ja/guides/sre/user-management/configuring-ldap.md @@ -0,0 +1,167 @@ +--- +sidebar_label: LDAPã®è¨­å®š +sidebar_position: 2 +slug: /ja/guides/sre/configuring-ldap +--- +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; + +# ClickHouseã‚’LDAPã§èªè¨¼ã¨ãƒ­ãƒ¼ãƒ«ãƒžãƒƒãƒ”ングã«ä½¿ç”¨ã™ã‚‹è¨­å®š + + + +ClickHouseã¯LDAPを使用ã—ã¦ClickHouseデータベースユーザーをèªè¨¼ã™ã‚‹ã‚ˆã†ã«è¨­å®šã§ãã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€å…¬é–‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«èªè¨¼ã™ã‚‹LDAPシステムã¨ClickHouseã‚’çµ±åˆã™ã‚‹ç°¡å˜ãªä¾‹ã‚’示ã—ã¾ã™ã€‚ + +## 1. ClickHouseã§ã®LDAP接続設定ã®æ§‹æˆ + +1. ã“ã®å…¬é–‹LDAPサーãƒãƒ¼ã¸ã®æŽ¥ç¶šã‚’テストã—ã¾ã™ï¼š + ```bash + $ ldapsearch -x -b dc=example,dc=com -H ldap://ldap.forumsys.com + ``` + + 応答ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + ```response + # extended LDIF + # + # LDAPv3 + # base with scope subtree + # filter: (objectclass=*) + # requesting: ALL + # + + # example.com + dn: dc=example,dc=com + objectClass: top + objectClass: dcObject + objectClass: organization + o: example.com + dc: example + ... + ``` + +2. `config.xml`ファイルを編集ã—ã€LDAPを構æˆã™ã‚‹ãŸã‚ã«ä»¥ä¸‹ã‚’追加ã—ã¾ã™ï¼š + ```xml + + + ldap.forumsys.com + 389 + uid={user_name},dc=example,dc=com + no + never + + + ``` + + :::note + ``ã‚¿ã‚°ã¯ç‰¹å®šã®LDAPサーãƒãƒ¼ã‚’識別ã™ã‚‹ãŸã‚ã®ä»»æ„ã®ãƒ©ãƒ™ãƒ«ã§ã™ã€‚ + ::: + + 上記ã§ä½¿ç”¨ã•ã‚Œã‚‹åŸºæœ¬è¨­å®šã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + + |パラメータ |説明 |例 | + |----------|-----------------------|----------------| + |host |LDAPサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆåã¾ãŸã¯IP|ldap.forumsys.com| + |port |LDAPサーãƒãƒ¼ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãƒãƒ¼ãƒˆ|389| + |bind_dn |ユーザーã¸ã®ãƒ†ãƒ³ãƒ—レートパス|uid={user_name},dc=example,dc=com| + |enable_tls|安全ãªLDAPを使用ã™ã‚‹ã‹ã©ã†ã‹|no| + |tls_require_cert |接続ã«è¨¼æ˜Žæ›¸ã‚’å¿…è¦ã¨ã™ã‚‹ã‹ã©ã†ã‹|never| + + :::note + ã“ã®ä¾‹ã§ã¯ã€å…¬é–‹ã‚µãƒ¼ãƒãƒ¼ãŒ389を使用ã—ã€å®‰å…¨ãªãƒãƒ¼ãƒˆã‚’使用ã—ãªã„ãŸã‚ã€ãƒ‡ãƒ¢ç”¨ã«TLSを無効ã«ã—ã¦ã„ã¾ã™ã€‚ + ::: + + :::note + LDAP設定ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[LDAPドキュメントページ](../../../operations/external-authenticators/ldap.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + ::: + +3. `` セクション㫠`` セクションを追加ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ­ãƒ¼ãƒ«ãƒžãƒƒãƒ”ングを構æˆã—ã¾ã™ã€‚ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒèªè¨¼ã•ã‚ŒãŸã¨ãã«ã©ã®ãƒ­ãƒ¼ãƒ«ã‚’å—ã‘å–ã‚‹ã‹ãŒå®šç¾©ã•ã‚Œã¾ã™ã€‚ã“ã®åŸºæœ¬çš„ãªä¾‹ã§ã¯ã€LDAPã¸ã®èªè¨¼ã«æˆåŠŸã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ClickHouseã§å¾Œã»ã©å®šç¾©ã•ã‚Œã‚‹ `scientists_role` ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + ```xml + + + users.xml + + + /var/lib/clickhouse/access/ + + + test_ldap_server + + + + + dc=example,dc=com + (&(objectClass=groupOfUniqueNames)(uniqueMember={bind_dn})) + cn + + + + ``` + + 上記ã§ä½¿ç”¨ã•ã‚Œã¦ã„る基本設定ã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + + |パラメータ |説明 |例 | + |----------|-----------------------|----------------| + |server |å‰ã®ldap_serversセクションã§å®šç¾©ã•ã‚ŒãŸãƒ©ãƒ™ãƒ«|test_ldap_server| + |roles |ユーザーãŒãƒžãƒƒãƒ”ングã•ã‚Œã‚‹ClickHouseã§å®šç¾©ã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«å|scientists_role| + |base_dn |グループを検索ã™ã‚‹ãƒ™ãƒ¼ã‚¹ãƒ‘ス|dc=example,dc=com| + |search_filter|ユーザーをマッピングã™ã‚‹ãŸã‚ã«é¸æŠžã™ã¹ãグループを識別ã™ã‚‹ldap検索フィルター|(&(objectClass=groupOfUniqueNames)(uniqueMember={bind_dn}))| + |attribute |戻ã•ã‚Œã‚‹ã¹ã値ãŒã‚る属性å|cn| + +4. 設定をé©ç”¨ã™ã‚‹ãŸã‚ã«ClickHouseサーãƒãƒ¼ã‚’å†èµ·å‹•ã—ã¾ã™ã€‚ + +## 2. ClickHouseデータベースã®ãƒ­ãƒ¼ãƒ«ã¨æ¨©é™ã‚’æ§‹æˆ + +:::note +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®æ‰‹é †ã¯ã€ClickHouseã§SQLアクセス制御ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚有効化ã™ã‚‹ã«ã¯ã€[SQLユーザーã¨ãƒ­ãƒ¼ãƒ«ã‚¬ã‚¤ãƒ‰](index.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +1. `config.xml`ファイルã®ãƒ­ãƒ¼ãƒ«ãƒžãƒƒãƒ”ングセクションã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ã®ã¨åŒã˜åå‰ã§ClickHouseã«ãƒ­ãƒ¼ãƒ«ã‚’作æˆã—ã¾ã™ + ```sql + CREATE ROLE scientists_role; + ``` + +2. å¿…è¦ãªç‰¹æ¨©ã‚’ロールã«ä»˜ä¸Žã—ã¾ã™ã€‚次ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã€LDAPを通ã—ã¦èªè¨¼ã•ã‚ŒãŸä»»æ„ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ç®¡ç†è€…特権を付与ã—ã¾ã™ï¼š + ```sql + GRANT ALL ON *.* TO scientists_role; + ``` + +## 3. LDAP設定ã®ãƒ†ã‚¹ãƒˆ + +1. ClickHouseクライアントを使用ã—ã¦ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ + ```bash + $ clickhouse-client --user einstein --password password + ClickHouse client version 22.2.2.1. + Connecting to localhost:9000 as user einstein. + Connected to ClickHouse server version 22.2.2 revision 54455. + + chnode1 :) + ``` + + :::note + ステップ1ã®`ldapsearch`コマンドを使用ã—ã¦ã€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…ã®ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’表示ã—ã€ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ‘スワードã¯`password`ã§ã™ã€‚ + ::: + +2. ユーザーãŒ`scientists_role`ロールã«æ­£ã—ãマッピングã•ã‚Œã€ç®¡ç†è€…権é™ã‚’æŒã£ã¦ã„ã‚‹ã“ã¨ã‚’テストã—ã¾ã™ + ```sql + SHOW DATABASES + ``` + + ```response + Query id: 93b785ff-1482-4eda-95b0-b2d68b2c5e0f + + ┌─name───────────────┠+ │ INFORMATION_SCHEMA │ + │ db1_mysql │ + │ db2 │ + │ db3 │ + │ db4_mysql │ + │ db5_merge │ + │ default │ + │ information_schema │ + │ system │ + └────────────────────┘ + + 9 rows in set. Elapsed: 0.004 sec. + ``` + +## サマリー +ã“ã®è¨˜äº‹ã§ã¯ã€ClickHouseã‚’LDAPサーãƒãƒ¼ã«èªè¨¼ã•ã›ã€ãƒ­ãƒ¼ãƒ«ã«ãƒžãƒƒãƒ”ングã™ã‚‹åŸºæœ¬ã‚’示ã—ã¾ã—ãŸã€‚ClickHouse内ã§å€‹ã€…ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’構æˆã—ã€è‡ªå‹•ãƒ­ãƒ¼ãƒ«ãƒžãƒƒãƒ”ングを構æˆã›ãšã«LDAPã§èªè¨¼ã™ã‚‹ã‚ªãƒ—ションもã‚ã‚Šã¾ã™ã€‚LDAPモジュールã¯Active Directoryã¸ã®æŽ¥ç¶šã«ã‚‚使用ã§ãã¾ã™ã€‚ diff --git a/docs/ja/guides/sre/user-management/index.md b/docs/ja/guides/sre/user-management/index.md new file mode 100644 index 00000000000..60e84bd1f1e --- /dev/null +++ b/docs/ja/guides/sre/user-management/index.md @@ -0,0 +1,535 @@ +--- +slug: /ja/operations/access-rights +sidebar_position: 1 +sidebar_label: ユーザーã¨ãƒ­ãƒ¼ãƒ« +title: アクセス制御ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç† +--- + +# ClickHouseã§ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ãƒ­ãƒ¼ãƒ«ã®ä½œæˆ + +ClickHouseã¯[RBAC](https://en.wikipedia.org/wiki/Role-based_access_control)アプローãƒã«åŸºã¥ãアクセス制御管ç†ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +ClickHouseã®ã‚¢ã‚¯ã‚»ã‚¹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ï¼š +- [ユーザーアカウント](#user-account-management) +- [ロール](#role-management) +- [è¡Œãƒãƒªã‚·ãƒ¼](#row-policy-management) +- [設定プロファイル](#settings-profiles-management) +- [クォータ](#quotas-management) + +アクセスエンティティã¯ä»¥ä¸‹ã®æ–¹æ³•ã§è¨­å®šã§ãã¾ã™ï¼š + +- SQL駆動ã®ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã€‚ + + ã“ã®æ©Ÿèƒ½ã‚’[有効化](#enabling-access-control)ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +- サーãƒãƒ¼ã®[設定ファイル](/docs/ja/operations/configuration-files.md) `users.xml` 㨠`config.xml`。 + +SQL駆動ã®ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚両方ã®è¨­å®šæ–¹æ³•ã¯åŒæ™‚ã«å‹•ä½œã™ã‚‹ãŸã‚ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚„アクセス権をサーãƒãƒ¼è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§ç®¡ç†ã—ã¦ã„ã‚‹å ´åˆã‚‚ã€ã‚¹ãƒ ãƒ¼ã‚ºã«SQL駆動ã®ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã«ç§»è¡Œã§ãã¾ã™ã€‚ + +:::note +åŒã˜ã‚¢ã‚¯ã‚»ã‚¹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’両方ã®è¨­å®šæ–¹æ³•ã§åŒæ™‚ã«ç®¡ç†ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +::: + +:::note +ClickHouse Cloud Consoleユーザーã®ç®¡ç†ã«ã¤ã„ã¦ã¯ã€ã“ã®[ページ](https://clickhouse.com/docs/ja/security/cloud-access-management.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ãƒ­ãƒ¼ãƒ«ã€ãƒ—ロファイルãªã©ã¨ãã®ã™ã¹ã¦ã®ä»˜ä¸Žã‚’確èªã™ã‚‹ã«ã¯ã€[SHOW ACCESS](/docs/ja/sql-reference/statements/show.md#show-access-statement)ステートメントを使用ã—ã¾ã™ã€‚ + +## æ¦‚è¦ {#access-control-usage} + +デフォルトã§ã¯ã€ClickHouseサーãƒãƒ¼ã«ã¯SQL駆動ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†ã‚’使用ã§ããªã„ãŒã™ã¹ã¦ã®æ¨©é™ã‚’æŒã¤`default`ユーザーアカウントãŒç”¨æ„ã•ã‚Œã¦ã„ã¾ã™ã€‚`default`ユーザーアカウントã¯ã€ä¾‹ãˆã°ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ã¨ãや分散クエリã§ãƒ¦ãƒ¼ã‚¶ãƒ¼åãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚分散クエリ処ç†ã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚„クラスターã®è¨­å®šã§[user and password](/docs/ja/engines/table-engines/special/distributed.md)プロパティãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +ClickHouseを使ã„始ã‚ãŸã°ã‹ã‚Šã®å ´åˆã€ä»¥ä¸‹ã®ã‚·ãƒŠãƒªã‚ªã‚’検討ã—ã¦ãã ã•ã„: + +1. `default`ユーザーã«å¯¾ã—ã¦SQL駆動ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†ã‚’[有効化](#enabling-access-control)ã—ã¾ã™ã€‚ +2. `default`ユーザーアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã€å¿…è¦ãªã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã—ã¾ã™ã€‚管ç†è€…アカウントを作æˆã™ã‚‹ã“ã¨ã‚’忘れãšã«è¡Œã£ã¦ãã ã•ã„(`GRANT ALL ON *.* TO admin_user_account WITH GRANT OPTION`)。 +3. `default`ユーザーã®[権é™ã‚’制é™](/docs/ja/operations/settings/permissions-for-queries.md#permissions_for_queries)ã—ã€ãã®SQL駆動ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†ã‚’無効化ã—ã¾ã™ã€‚ + +### ç¾åœ¨ã®ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã®ç‰¹æ€§ {#access-control-properties} + +- データベースやテーブルãŒå­˜åœ¨ã—ãªãã¦ã‚‚権é™ã‚’付与ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ +- テーブルãŒå‰Šé™¤ã•ã‚Œã¦ã‚‚ã€ãã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾å¿œã™ã‚‹ã™ã¹ã¦ã®ç‰¹æ¨©ã¯å–り消ã•ã‚Œã¾ã›ã‚“。ã¤ã¾ã‚Šã€å¾Œã§åŒã˜åå‰ã®æ–°ã—ã„テーブルを作æˆã—ã¦ã‚‚ã€ç‰¹æ¨©ã¯æœ‰åŠ¹ãªã¾ã¾ã§ã™ã€‚削除ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«å¯¾å¿œã™ã‚‹ç‰¹æ¨©ã‚’å–り消ã™ã«ã¯ã€ä¾‹ãˆã°`REVOKE ALL PRIVILEGES ON db.table FROM ALL`クエリを実行ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- 特権ã«é–¢ã™ã‚‹æœ‰åŠ¹æœŸé™ã®è¨­å®šã¯å­˜åœ¨ã—ã¾ã›ã‚“。 + +### ユーザーアカウント {#user-account-management} + +ユーザーアカウントã¯ã€ClickHouseã§ã®èªè¨¼ã‚’å¯èƒ½ã«ã™ã‚‹ã‚¢ã‚¯ã‚»ã‚¹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã™ã€‚ユーザーアカウントã«ã¯ä»¥ä¸‹ãŒå«ã¾ã‚Œã¾ã™ï¼š + +- 識別情報。 +- ユーザーãŒå®Ÿè¡Œã§ãるクエリã®ç¯„囲を定義ã™ã‚‹[特権](/docs/ja/sql-reference/statements/grant.md#privileges)。 +- ClickHouseサーãƒãƒ¼ã¸ã®æŽ¥ç¶šãŒè¨±å¯ã•ã‚ŒãŸãƒ›ã‚¹ãƒˆã€‚ +- 割り当ã¦ã‚‰ã‚ŒãŸã€ã¾ãŸã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ­ãƒ¼ãƒ«ã€‚ +- ユーザーã®ãƒ­ã‚°ã‚¤ãƒ³æ™‚ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§é©ç”¨ã•ã‚Œã‚‹åˆ¶ç´„ã‚’æŒã¤è¨­å®šã€‚ +- 割り当ã¦ã‚‰ã‚ŒãŸè¨­å®šãƒ—ロファイル。 + +特権ã¯[GRANT](/docs/ja/sql-reference/statements/grant.md)クエリを用ã„ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«ä»˜ä¸Žã•ã‚Œã‚‹ã‹ã€[ロール](#role-management)を割り当ã¦ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ä»˜ä¸Žã•ã‚Œã¾ã™ã€‚ユーザーã‹ã‚‰ç‰¹æ¨©ã‚’å–り消ã™ã«ã¯ã€ClickHouseã¯[REVOKE](/docs/ja/sql-reference/statements/revoke.md)クエリをæä¾›ã—ã¾ã™ã€‚ユーザーã®ç‰¹æ¨©ã‚’一覧表示ã™ã‚‹ã«ã¯ã€[SHOW GRANTS](/docs/ja/sql-reference/statements/show.md#show-grants-statement)ステートメントを使用ã—ã¾ã™ã€‚ + +管ç†ã‚¯ã‚¨ãƒªï¼š + +- [CREATE USER](/docs/ja/sql-reference/statements/create/user.md) +- [ALTER USER](/docs/ja/sql-reference/statements/alter/user.md#alter-user-statement) +- [DROP USER](/docs/ja/sql-reference/statements/drop.md) +- [SHOW CREATE USER](/docs/ja/sql-reference/statements/show.md#show-create-user-statement) +- [SHOW USERS](/docs/ja/sql-reference/statements/show.md#show-users-statement) + +### 設定ã®é©ç”¨ {#access-control-settings-applying} + +設定ã¯ç•°ãªã‚‹æ–¹æ³•ã§æ§‹æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼šãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ­ãƒ¼ãƒ«ãŠã‚ˆã³è¨­å®šãƒ—ロファイルã«ãŠã„ã¦ã€ãƒ­ã‚°ã‚¤ãƒ³æ™‚ã«é©ç”¨ã•ã‚Œã‚‹è¨­å®šã®å€¤ã¨åˆ¶ç´„ã¯ä»¥ä¸‹ã®é€šã‚Šï¼ˆå„ªå…ˆé †ä½ãŒé«˜ã„順)ã§ã™ï¼š + +1. ユーザーアカウントã®è¨­å®šã€‚ +2. ユーザーアカウントã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ­ãƒ¼ãƒ«ã®è¨­å®šã€‚ã‚る設定ãŒè¤‡æ•°ã®ãƒ­ãƒ¼ãƒ«ã§æ§‹æˆã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãã®è¨­å®šã®é©ç”¨é †åºã¯æœªå®šç¾©ã§ã™ã€‚ +3. ユーザーã¾ãŸã¯ãã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ­ãƒ¼ãƒ«ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸè¨­å®šãƒ—ロファイルã®è¨­å®šã€‚ã‚る設定ãŒè¤‡æ•°ã®ãƒ—ロファイルã§æ§‹æˆã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãã®è¨­å®šã®é©ç”¨é †åºã¯æœªå®šç¾©ã§ã™ã€‚ +4. サーãƒãƒ¼å…¨ä½“ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§é©ç”¨ã•ã‚Œã‚‹è¨­å®šã¾ãŸã¯[デフォルトプロファイル](/docs/ja/operations/server-configuration-parameters/settings.md#default-profile)ã‹ã‚‰ã®è¨­å®šã€‚ + +### ロール {#role-management} + +ロールã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«ä»˜ä¸Žã•ã‚Œã‚‹ã‚¢ã‚¯ã‚»ã‚¹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã‚³ãƒ³ãƒ†ãƒŠã§ã™ã€‚ + +ロールã«ã¯ä»¥ä¸‹ãŒå«ã¾ã‚Œã¾ã™ï¼š + +- [特権](/docs/ja/sql-reference/statements/grant.md#grant-privileges) +- 設定ã¨åˆ¶ç´„ +- 割り当ã¦ã‚‰ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã®ãƒªã‚¹ãƒˆ + +管ç†ã‚¯ã‚¨ãƒªï¼š + +- [CREATE ROLE](/docs/ja/sql-reference/statements/create/role.md) +- [ALTER ROLE](/docs/ja/sql-reference/statements/alter/role.md#alter-role-statement) +- [DROP ROLE](/docs/ja/sql-reference/statements/drop.md) +- [SET ROLE](/docs/ja/sql-reference/statements/set-role.md) +- [SET DEFAULT ROLE](/docs/ja/sql-reference/statements/set-role.md#set-default-role-statement) +- [SHOW CREATE ROLE](/docs/ja/sql-reference/statements/show.md#show-create-role-statement) +- [SHOW ROLES](/docs/ja/sql-reference/statements/show.md#show-roles-statement) + +特権ã¯[GRANT](/docs/ja/sql-reference/statements/grant.md)クエリを使用ã—ã¦ãƒ­ãƒ¼ãƒ«ã«ä»˜ä¸Žã§ãã¾ã™ã€‚ロールã‹ã‚‰ç‰¹æ¨©ã‚’å–り消ã™ã«ã¯ã€ClickHouseã¯[REVOKE](/docs/ja/sql-reference/statements/revoke.md)クエリをæä¾›ã—ã¾ã™ã€‚ + +#### è¡Œãƒãƒªã‚·ãƒ¼ {#row-policy-management} + +è¡Œãƒãƒªã‚·ãƒ¼ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã«åˆ©ç”¨å¯èƒ½ãªè¡Œã‚’定義ã™ã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã§ã™ã€‚è¡Œãƒãƒªã‚·ãƒ¼ã«ã¯ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ル用ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¨ã€ãã®è¡Œãƒãƒªã‚·ãƒ¼ã‚’使用ã™ã‚‹ãƒ­ãƒ¼ãƒ«ã‚„ユーザーã®ãƒªã‚¹ãƒˆãŒå«ã¾ã‚Œã¾ã™ã€‚ + +:::note +è¡Œãƒãƒªã‚·ãƒ¼ã¯èª­ã¿å–り専用アクセスã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ã®ã¿æ„味をæŒã¡ã¾ã™ã€‚ユーザーãŒãƒ†ãƒ¼ãƒ–ルを変更ã—ãŸã‚Šã€ãƒ†ãƒ¼ãƒ–ル間ã§ãƒ‘ーティションをコピーã§ãã‚‹å ´åˆã€è¡Œãƒãƒªã‚·ãƒ¼ã®åˆ¶é™ã¯åŠ¹æžœãŒè–„ã‚Œã¾ã™ã€‚ +::: + +管ç†ã‚¯ã‚¨ãƒªï¼š + +- [CREATE ROW POLICY](/docs/ja/sql-reference/statements/create/row-policy.md) +- [ALTER ROW POLICY](/docs/ja/sql-reference/statements/alter/row-policy.md#alter-row-policy-statement) +- [DROP ROW POLICY](/docs/ja/sql-reference/statements/drop.md#drop-row-policy-statement) +- [SHOW CREATE ROW POLICY](/docs/ja/sql-reference/statements/show.md#show-create-row-policy-statement) +- [SHOW POLICIES](/docs/ja/sql-reference/statements/show.md#show-policies-statement) + +### 設定プロファイル {#settings-profiles-management} + +設定プロファイルã¯ã€[設定](/docs/ja/operations/settings/index.md)ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ã€‚設定プロファイルã«ã¯ã€è¨­å®šã¨åˆ¶ç´„ã€ãã—ã¦ã“ã®ãƒ—ロファイルãŒé©ç”¨ã•ã‚Œã‚‹ãƒ­ãƒ¼ãƒ«ã‚„ユーザーã®ãƒªã‚¹ãƒˆãŒå«ã¾ã‚Œã¾ã™ã€‚ + +管ç†ã‚¯ã‚¨ãƒªï¼š + +- [CREATE SETTINGS PROFILE](/docs/ja/sql-reference/statements/create/settings-profile.md#create-settings-profile-statement) +- [ALTER SETTINGS PROFILE](/docs/ja/sql-reference/statements/alter/settings-profile.md#alter-settings-profile-statement) +- [DROP SETTINGS PROFILE](/docs/ja/sql-reference/statements/drop.md#drop-settings-profile-statement) +- [SHOW CREATE SETTINGS PROFILE](/docs/ja/sql-reference/statements/show.md#show-create-settings-profile-statement) +- [SHOW PROFILES](/docs/ja/sql-reference/statements/show.md#show-profiles-statement) + +### クォータ {#quotas-management} + +クォータã¯ãƒªã‚½ãƒ¼ã‚¹ã®ä½¿ç”¨ã‚’制é™ã—ã¾ã™ã€‚詳ã—ãã¯[クォータ](/docs/ja/operations/quotas.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +クォータã¯ã€ä¸€å®šæœŸé–“ã«é–¢ã™ã‚‹åˆ¶é™ã®ã‚»ãƒƒãƒˆã¨ã€ã“ã®ã‚¯ã‚©ãƒ¼ã‚¿ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚るロールやユーザーã®ãƒªã‚¹ãƒˆã‚’å«ã¿ã¾ã™ã€‚ + +管ç†ã‚¯ã‚¨ãƒªï¼š + +- [CREATE QUOTA](/docs/ja/sql-reference/statements/create/quota.md) +- [ALTER QUOTA](/docs/ja/sql-reference/statements/alter/quota.md#alter-quota-statement) +- [DROP QUOTA](/docs/ja/sql-reference/statements/drop.md#drop-quota-statement) +- [SHOW CREATE QUOTA](/docs/ja/sql-reference/statements/show.md#show-create-quota-statement) +- [SHOW QUOTA](/docs/ja/sql-reference/statements/show.md#show-quota-statement) +- [SHOW QUOTAS](/docs/ja/sql-reference/statements/show.md#show-quotas-statement) + +### SQL駆動ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†ã®æœ‰åŠ¹åŒ– {#enabling-access-control} + +- 設定ã®ä¿å­˜ç”¨ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’設定ã—ã¾ã™ã€‚ + + ClickHouseã¯ã€ã‚¢ã‚¯ã‚»ã‚¹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®è¨­å®šã‚’[access_control_path](/docs/ja/operations/server-configuration-parameters/settings.md#access_control_path)サーãƒãƒ¼è¨­å®šãƒ‘ラメータã§è¨­å®šã•ã‚ŒãŸãƒ•ã‚©ãƒ«ãƒ€ã«ä¿å­˜ã—ã¾ã™ã€‚ + +- å°‘ãªãã¨ã‚‚1ã¤ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«å¯¾ã—ã¦SQL駆動ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†ã‚’有効化ã—ã¾ã™ã€‚ + + デフォルトã§ã¯ã€SQL駆動ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†ã¯ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚å°‘ãªãã¨ã‚‚1人ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’`users.xml`設定ファイルã«è¨­å®šã—ã€[`access_management`](/docs/ja/operations/settings/settings-users.md#access_management-user-setting)ã€`named_collection_control`ã€`show_named_collections`ã€`show_named_collections_secrets`設定ã®å€¤ã‚’1ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## SQLユーザーã¨ãƒ­ãƒ¼ãƒ«ã®å®šç¾© + +:::tip +ClickHouse Cloudã§ä½œæ¥­ã™ã‚‹å ´åˆã¯ã€[クラウドアクセス管ç†](/docs/ja/cloud/security/cloud-access-management)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +ã“ã®è¨˜äº‹ã§ã¯ã€SQLユーザーã¨ãƒ­ãƒ¼ãƒ«ã®åŸºæœ¬çš„ãªå®šç¾©æ–¹æ³•ã¨ã€ãれらã®ç‰¹æ¨©ã¨æ¨©é™ã‚’データベースã€ãƒ†ãƒ¼ãƒ–ルã€è¡Œã€ã‚«ãƒ©ãƒ ã«é©ç”¨ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¾ã™ã€‚ + +### SQLユーザーモードã®æœ‰åŠ¹åŒ– + +1. `users.xml`ファイルã®``ユーザーã®ä¸‹ã«SQLユーザーモードを有効ã«ã—ã¾ã™ï¼š + ```xml + 1 + 1 + 1 + 1 + ``` + + :::note + `default`ユーザーã¯ã€æ–°ã—ãインストールã—ãŸéš›ã«ä½œæˆã•ã‚Œã‚‹å”¯ä¸€ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã‚ã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ãƒŽãƒ¼ãƒ‰é–“ã®é€šä¿¡ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§ã‚‚ã‚ã‚Šã¾ã™ã€‚ + + 本番環境ã§ã¯ã€ãƒŽãƒ¼ãƒ‰é–“通信ãŒSQL管ç†è€…ユーザーã§è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã‚„ã€``ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®èªè¨¼æƒ…å ±ã€ãŠã‚ˆã³/ã¾ãŸã¯ãƒŽãƒ¼ãƒ‰é–“HTTPãŠã‚ˆã³ãƒˆãƒ©ãƒ³ã‚¹ãƒãƒ¼ãƒˆãƒ—ロトコルã®èªè¨¼æƒ…å ±ã§è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã¯ã€ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’無効ã«ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ + ::: + +2. ノードをå†èµ·å‹•ã—ã¦ã€å¤‰æ›´ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +3. ClickHouseクライアントを起動ã—ã¾ã™ï¼š + ```sql + clickhouse-client --user default --password + ``` +### ユーザーã®å®šç¾© + +1. SQL管ç†è€…アカウントを作æˆã—ã¾ã™ï¼š + ```sql + CREATE USER clickhouse_admin IDENTIFIED BY 'password'; + ``` +2. æ–°ã—ã„ユーザーã«å®Œå…¨ãªç®¡ç†æ¨©é™ã‚’付与ã—ã¾ã™ï¼š + ```sql + GRANT ALL ON *.* TO clickhouse_admin WITH GRANT OPTION; + ``` + + + +## ALTERæ¨©é™ + +ã“ã®è¨˜äº‹ã¯ã€ç‰¹æ¨©ã‚’ã©ã®ã‚ˆã†ã«å®šç¾©ã—ã€ç‰¹æ¨©ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦`ALTER`ステートメントを使用ã™ã‚‹å ´åˆã®æ¨©é™ãŒã©ã®ã‚ˆã†ã«æ©Ÿèƒ½ã™ã‚‹ã‹ã‚’よりよãç†è§£ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ + +`ALTER`ステートメントã¯ã€ã„ãã¤ã‹ã®ã‚«ãƒ†ã‚´ãƒªãƒ¼ã«åˆ†ã‹ã‚Œã¦ã„ã¾ã™ã€‚ãã®ä¸­ã«ã¯éšŽå±¤çš„ãªã‚‚ã®ã¨ã€æ˜Žç¤ºçš„ã«å®šç¾©ã•ã‚Œã‚‹ã¹ãã‚‚ã®ãŒå­˜åœ¨ã—ã¾ã™ã€‚ + +**DBã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®æ§‹æˆä¾‹** + +1. 管ç†è€…ユーザーã§ã‚µãƒ³ãƒ—ルユーザーを作æˆã—ã¾ã™ï¼š +```sql +CREATE USER my_user IDENTIFIED BY 'password'; +``` + +2. サンプルデータベースを作æˆã—ã¾ã™ï¼š +```sql +CREATE DATABASE my_db; +``` + +3. サンプルテーブルを作æˆã—ã¾ã™ï¼š +```sql +CREATE TABLE my_db.my_table (id UInt64, column1 String) ENGINE = MergeTree() ORDER BY id; +``` + +4. 権é™ã®ä»˜ä¸Ž/å–消ã—ã‚’è¡Œã†ã‚µãƒ³ãƒ—ル管ç†è€…ユーザーを作æˆã—ã¾ã™ï¼š +```sql +CREATE USER my_alter_admin IDENTIFIED BY 'password'; +``` + +:::note +権é™ã‚’付与ã¾ãŸã¯å–消ã™ã‚‹ã«ã¯ã€ç®¡ç†è€…ユーザーãŒ`WITH GRANT OPTION`特権をæŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +例ãˆã°ï¼š + ```sql + GRANT ALTER ON my_db.* WITH GRANT OPTION + ``` +ユーザーã«æ¨©é™ã‚’付与ã¾ãŸã¯å–り消ã™ãŸã‚ã«ã¯ã€ã¾ãšãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è‡ªèº«ãŒã“れらã®æ¨©é™ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**権é™ã®ä»˜ä¸Žã¾ãŸã¯å–消ã—** + +`ALTER`ã®éšŽå±¤ï¼š + +``` +. +├── ALTER (テーブルã¨ãƒ“ューã®ã¿)/ +│ ├── ALTER TABLE/ +│ │ ├── ALTER UPDATE +│ │ ├── ALTER DELETE +│ │ ├── ALTER COLUMN/ +│ │ │ ├── ALTER ADD COLUMN +│ │ │ ├── ALTER DROP COLUMN +│ │ │ ├── ALTER MODIFY COLUMN +│ │ │ ├── ALTER COMMENT COLUMN +│ │ │ ├── ALTER CLEAR COLUMN +│ │ │ └── ALTER RENAME COLUMN +│ │ ├── ALTER INDEX/ +│ │ │ ├── ALTER ORDER BY +│ │ │ ├── ALTER SAMPLE BY +│ │ │ ├── ALTER ADD INDEX +│ │ │ ├── ALTER DROP INDEX +│ │ │ ├── ALTER MATERIALIZE INDEX +│ │ │ └── ALTER CLEAR INDEX +│ │ ├── ALTER CONSTRAINT/ +│ │ │ ├── ALTER ADD CONSTRAINT +│ │ │ └── ALTER DROP CONSTRAINT +│ │ ├── ALTER TTL/ +│ │ │ └── ALTER MATERIALIZE TTL +│ │ ├── ALTER SETTINGS +│ │ ├── ALTER MOVE PARTITION +│ │ ├── ALTER FETCH PARTITION +│ │ └── ALTER FREEZE PARTITION +│ └── ALTER LIVE VIEW/ +│ ├── ALTER LIVE VIEW REFRESH +│ └── ALTER LIVE VIEW MODIFY QUERY +├── ALTER DATABASE +├── ALTER USER +├── ALTER ROLE +├── ALTER QUOTA +├── ALTER [ROW] POLICY +└── ALTER [SETTINGS] PROFILE +``` + +1. ユーザーã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã«`ALTER`権é™ã‚’付与ã™ã‚‹ + +`GRANT ALTER on *.* TO my_user`を使用ã™ã‚‹ã¨ã€ãƒˆãƒƒãƒ—レベルã®`ALTER TABLE`ã¨`ALTER VIEW`ã«ã®ã¿å½±éŸ¿ã—ã€ãã®ä»–ã®`ALTER`ステートメントã¯å€‹åˆ¥ã«ä»˜ä¸Žã¾ãŸã¯å–り消ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +例ãˆã°ã€åŸºæœ¬çš„ãª`ALTER`特権を付与ã™ã‚‹ï¼š +```sql +GRANT ALTER ON my_db.my_table TO my_user; +``` + +çµæžœã¨ã—ã¦ä»˜ä¸Žã•ã‚Œã‚‹ç‰¹æ¨©ã®ã‚»ãƒƒãƒˆï¼š +```sql +SHOW GRANTS FOR my_user; +``` + +```response +SHOW GRANTS FOR my_user + +Query id: 706befbc-525e-4ec1-a1a2-ba2508cc09e3 + +┌─GRANTS FOR my_user───────────────────────────────────────────┠+│ GRANT ALTER TABLE, ALTER VIEW ON my_db.my_table TO my_user │ +└──────────────────────────────────────────────────────────────┘ +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€ä¸Šè¨˜ã®ä¾‹ã‹ã‚‰`ALTER TABLE`ã¨`ALTER VIEW`ã®ä¸‹ã«ã‚ã‚‹ã™ã¹ã¦ã®æ¨©é™ãŒä»˜ä¸Žã•ã‚Œã¾ã™ãŒã€`ALTER ROW POLICY`ãªã©ã®ä»–ã®`ALTER`権é™ã¯ä»˜ä¸Žã•ã‚Œã¾ã›ã‚“(階層図ã«æˆ»ã‚‹ã¨ã€`ALTER ROW POLICY`ãŒ`ALTER TABLE`ã¾ãŸã¯`ALTER VIEW`ã®å­ã§ãªã„ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ï¼‰ã€‚ã“れらã¯æ˜Žç¤ºçš„ã«ä»˜ä¸Žã¾ãŸã¯å–り消ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +例ãˆã°ã€æ¬¡ã®ã‚ˆã†ã«ä¸€éƒ¨ã®`ALTER`特権ãŒå¿…è¦ãªå ´åˆã€ãã‚Œãžã‚Œã‚’別々ã«ä»˜ä¸Žã§ãã¾ã™ã€‚副権é™ãŒã‚ã‚‹å ´åˆã€ãれらも自動的ã«ä»˜ä¸Žã•ã‚Œã¾ã™ã€‚ + +例: +```sql +GRANT ALTER COLUMN ON my_db.my_table TO my_user; +``` + +付与ã•ã‚ŒãŸã‚‚ã®ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š +```sql +SHOW GRANTS FOR my_user; +``` + +```response +SHOW GRANTS FOR my_user + +Query id: 47b3d03f-46ac-4385-91ec-41119010e4e2 + +┌─GRANTS FOR my_user────────────────────────────────┠+│ GRANT ALTER COLUMN ON default.my_table TO my_user │ +└───────────────────────────────────────────────────┘ + +1 row in set. Elapsed: 0.004 sec. +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€æ¬¡ã®ã‚ˆã†ãªå‰¯æ¨©é™ã‚‚与ãˆã‚‰ã‚Œã¾ã™ï¼š +```sql +ALTER ADD COLUMN +ALTER DROP COLUMN +ALTER MODIFY COLUMN +ALTER COMMENT COLUMN +ALTER CLEAR COLUMN +ALTER RENAME COLUMN +``` + +2. ユーザーãŠã‚ˆã³ãƒ­ãƒ¼ãƒ«ã‹ã‚‰`ALTER`権é™ã‚’å–り消㙠+ +`REVOKE`ステートメントã¯ã€`GRANT`ステートメントã¨åŒæ§˜ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +ユーザーã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã«å‰¯æ¨©é™ãŒä»˜ä¸Žã•ã‚ŒãŸå ´åˆã€ãã®å‰¯æ¨©é™ã‚’直接å–り消ã™ã‹ã€æ¬¡ã®ä¸Šä½ãƒ¬ãƒ™ãƒ«ã®æ¨©é™ã‚’å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +例:ユーザーã«`ALTER ADD COLUMN`ãŒä»˜ä¸Žã•ã‚ŒãŸå ´åˆ +```sql +GRANT ALTER ADD COLUMN ON my_db.my_table TO my_user; +``` + +```response +GRANT ALTER ADD COLUMN ON my_db.my_table TO my_user + +Query id: 61fe0fdc-1442-4cd6-b2f3-e8f2a853c739 + +Ok. + +0 rows in set. Elapsed: 0.002 sec. +``` + +```sql +SHOW GRANTS FOR my_user; +``` + +```response +SHOW GRANTS FOR my_user + +Query id: 27791226-a18f-46c8-b2b4-a9e64baeb683 + +┌─GRANTS FOR my_user──────────────────────────────────┠+│ GRANT ALTER ADD COLUMN ON my_db.my_table TO my_user │ +└─────────────────────────────────────────────────────┘ +``` + +権é™ã‚’個別ã«å–り消ã™ã“ã¨ã‚‚ã§ãã¾ã™ï¼š +```sql +REVOKE ALTER ADD COLUMN ON my_db.my_table FROM my_user; +``` + +ã‚ã‚‹ã„ã¯ã€ã©ã®ä¸Šä½ãƒ¬ãƒ™ãƒ«ã‹ã‚‰ã§ã‚‚å–り消ã™ã“ã¨ãŒã§ãã¾ã™ï¼ˆã™ã¹ã¦ã®COLUMN副権é™ã‚’å–り消ã—ã¾ã™ï¼‰ï¼š +``` +REVOKE ALTER COLUMN ON my_db.my_table FROM my_user; +``` + +```response +REVOKE ALTER COLUMN ON my_db.my_table FROM my_user + +Query id: b882ba1b-90fb-45b9-b10f-3cda251e2ccc + +Ok. + +0 rows in set. Elapsed: 0.002 sec. +``` + +```sql +SHOW GRANTS FOR my_user; +``` + +```response +SHOW GRANTS FOR my_user + +Query id: e7d341de-de65-490b-852c-fa8bb8991174 + +Ok. + +0 rows in set. Elapsed: 0.003 sec. +``` + +**補足** + +権é™ã¯ã€`WITH GRANT OPTION`ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦ä»˜ä¸Žã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã€ã•ã‚‰ã«ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è‡ªèº«ãŒãã®æ¨©é™ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +1. 管ç†è€…ユーザーã«æ¨©é™ã‚’付与ã—ã€ç‰¹æ¨©ã®ã‚»ãƒƒãƒˆã‚’管ç†ã™ã‚‹ã“ã¨ã‚’許å¯ã™ã‚‹å ´åˆ +例: +```sql +GRANT SELECT, ALTER COLUMN ON my_db.my_table TO my_alter_admin WITH GRANT OPTION; +``` + +ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€`ALTER COLUMN`ãŠã‚ˆã³ã™ã¹ã¦ã®ã‚µãƒ–特権を付与ã¾ãŸã¯å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**テスト** + +1. `SELECT`権é™ã‚’追加ã—ã¾ã™ï¼š +```sql + GRANT SELECT ON my_db.my_table TO my_user; +``` + +2. ユーザーã«ã‚«ãƒ©ãƒ è¿½åŠ æ¨©é™ã‚’与ãˆã‚‹ï¼š +```sql +GRANT ADD COLUMN ON my_db.my_table TO my_user; +``` + +3. 制é™ä»˜ãユーザーã§ãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ï¼š +```bash +clickhouse-client --user my_user --password password --port 9000 --host +``` + +4. カラムを追加ã—ã¦ã¿ã‚‹ï¼š +```sql +ALTER TABLE my_db.my_table ADD COLUMN column2 String; +``` + +```response +ALTER TABLE my_db.my_table + ADD COLUMN `column2` String + +Query id: d5d6bfa1-b80c-4d9f-8dcd-d13e7bd401a5 + +Ok. + +0 rows in set. Elapsed: 0.010 sec. +``` + +```sql +DESCRIBE my_db.my_table; +``` + +```response +DESCRIBE TABLE my_db.my_table + +Query id: ab9cb2d0-5b1a-42e1-bc9c-c7ff351cb272 + +┌─name────┬─type───┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ id │ UInt64 │ │ │ │ │ │ +│ column1 │ String │ │ │ │ │ │ +│ column2 │ String │ │ │ │ │ │ +└─────────┴────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +4. カラムを削除ã—ã¦ã¿ã‚‹ï¼š +```sql +ALTER TABLE my_db.my_table DROP COLUMN column2; +``` + +```response +ALTER TABLE my_db.my_table + DROP COLUMN column2 + +Query id: 50ad5f6b-f64b-4c96-8f5f-ace87cea6c47 + + +0 rows in set. Elapsed: 0.004 sec. + +Received exception from server (version 22.5.1): +Code: 497. DB::Exception: Received from chnode1.marsnet.local:9440. DB::Exception: my_user: Not enough privileges. To execute this query it's necessary to have grant ALTER DROP COLUMN(column2) ON my_db.my_table. (ACCESS_DENIED) +``` + +5. alter管ç†è€…を利用ã—ã¦æ¨©é™ã‚’付与ã™ã‚‹ãƒ†ã‚¹ãƒˆ +```sql +GRANT SELECT, ALTER COLUMN ON my_db.my_table TO my_alter_admin WITH GRANT OPTION; +``` + +6. alter管ç†è€…ユーザーã§ãƒ­ã‚°ã‚¤ãƒ³ï¼š +```bash +clickhouse-client --user my_alter_admin --password password --port 9000 --host +``` + +7. サブ特権を付与ã™ã‚‹ï¼š +```sql +GRANT ALTER ADD COLUMN ON my_db.my_table TO my_user; +``` + +```response +GRANT ALTER ADD COLUMN ON my_db.my_table TO my_user + +Query id: 1c7622fa-9df1-4c54-9fc3-f984c716aeba + +Ok. +``` + +8. 権é™ã‚’æŒãŸãªã„alter管ç†è€…ユーザーãŒæŒã£ã¦ã„ãªã„サブ特権をæŒãŸãªã„特権を付与ã—よã†ã¨ã™ã‚‹ãƒ†ã‚¹ãƒˆã€‚ +```sql +GRANT ALTER UPDATE ON my_db.my_table TO my_user; +``` + +```response +GRANT ALTER UPDATE ON my_db.my_table TO my_user + +Query id: 191690dc-55a6-4625-8fee-abc3d14a5545 + + +0 rows in set. Elapsed: 0.004 sec. + +Received exception from server (version 22.5.1): +Code: 497. DB::Exception: Received from chnode1.marsnet.local:9440. DB::Exception: my_alter_admin: Not enough privileges. To execute this query it's necessary to have grant ALTER UPDATE ON my_db.my_table WITH GRANT OPTION. (ACCESS_DENIED) +``` + +**ã¾ã¨ã‚** + +`ALTER`特権ã¯ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ“ューã«å¯¾ã™ã‚‹`ALTER`ã«å¯¾ã—ã¦éšŽå±¤çš„ã§ã™ãŒã€ä»–ã®`ALTER`ステートメントã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。特権ã¯ç´°ã‹ã„レベルや特権ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«è¨­å®šã§ãã€åŒæ§˜ã«å–り消ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚権é™ã‚’設定ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€`WITH GRANT OPTION`ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã€è¨­å®šã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼è‡ªèº«ã‚’å«ã‚€ã€ãã®æ¨©é™ã‚’æ—¢ã«æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚æ“作を行ã†ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ã‚‚ã—付与オプション権é™ã‚’自分ã§ã‚‚æŒã£ã¦ã„ãªã„å ´åˆã€è‡ªåˆ†è‡ªèº«ã®ç‰¹æ¨©ã‚’å–り消ã™ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + diff --git a/docs/ja/guides/sre/user-management/ssl-user-auth.md b/docs/ja/guides/sre/user-management/ssl-user-auth.md new file mode 100644 index 00000000000..c96c6906d06 --- /dev/null +++ b/docs/ja/guides/sre/user-management/ssl-user-auth.md @@ -0,0 +1,134 @@ +--- +sidebar_label: SSLユーザー証明書èªè¨¼ +sidebar_position: 3 +slug: /ja/guides/sre/ssl-user-auth +--- + +# SSLユーザー証明書ã®èªè¨¼è¨­å®š +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; + + + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€SSLユーザー証明書を使用ã—ã¦èªè¨¼ã‚’設定ã™ã‚‹ãŸã‚ã®ã‚·ãƒ³ãƒ—ルã§æœ€å°é™ã®è¨­å®šã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã¯ã€[SSL-TLSã®è¨­å®šã‚¬ã‚¤ãƒ‰](../configuring-ssl.md)ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ + +:::note +SSLユーザーèªè¨¼ã¯ã€`https`ã¾ãŸã¯ãƒã‚¤ãƒ†ã‚£ãƒ–インターフェースを使用ã™ã‚‹å ´åˆã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ç¾åœ¨ã€gRPCã‚„PostgreSQL/MySQLエミュレーションãƒãƒ¼ãƒˆã§ã¯ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +ClickHouseノードã¯ã€å®‰å…¨ãªèªè¨¼ã®ãŸã‚ã«`strict`を設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆ`relaxed`ã¯ãƒ†ã‚¹ãƒˆç›®çš„ã§æ©Ÿèƒ½ã—ã¾ã™ï¼‰ã€‚ +::: + +## 1. SSLãƒ¦ãƒ¼ã‚¶ãƒ¼è¨¼æ˜Žæ›¸ã‚’ä½œæˆ + +:::note +ã“ã®ä¾‹ã§ã¯ã€è‡ªå·±ç½²åã•ã‚ŒãŸCAを使用ã—ãŸè‡ªå·±ç½²å証明書を使用ã—ã¦ã„ã¾ã™ã€‚プロダクション環境ã§ã¯ã€CSRを作æˆã—ã€PKIãƒãƒ¼ãƒ ã¾ãŸã¯è¨¼æ˜Žæ›¸ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã«æ出ã—ã¦é©åˆ‡ãªè¨¼æ˜Žæ›¸ã‚’å–å¾—ã—ã¦ãã ã•ã„。 +::: + +1. 証明書署åè¦æ±‚(CSR)ã¨ã‚­ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚基本的ãªå½¢å¼ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + ```bash + openssl req -newkey rsa:2048 -nodes -subj "/CN=:" -keyout .key -out .csr + ``` + ã“ã®ä¾‹ã§ã¯ã€ã‚µãƒ³ãƒ—ル環境ã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‰ãƒ¡ã‚¤ãƒ³ã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ã“れを使用ã—ã¾ã™ï¼š + ```bash + openssl req -newkey rsa:2048 -nodes -subj "/CN=chnode1.marsnet.local:cert_user" -keyout chnode1_cert_user.key -out chnode1_cert_user.csr + ``` + :::note + CNã¯ä»»æ„ã§ã‚ã‚Šã€è¨¼æ˜Žæ›¸ã®è­˜åˆ¥å­ã¨ã—ã¦ä»»æ„ã®æ–‡å­—列を使用ã§ãã¾ã™ã€‚次ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã™ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + ::: + +2. èªè¨¼ã«ä½¿ç”¨ã™ã‚‹æ–°ã—ã„ユーザー証明書を生æˆã—ã€ç½²åã—ã¾ã™ã€‚基本的ãªå½¢å¼ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + ```bash + openssl x509 -req -in .csr -out .crt -CA .crt -CAkey .key -days 365 + ``` + ã“ã®ä¾‹ã§ã¯ã€ã‚µãƒ³ãƒ—ル環境ã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‰ãƒ¡ã‚¤ãƒ³ã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ã“れを使用ã—ã¾ã™ï¼š + ```bash + openssl x509 -req -in chnode1_cert_user.csr -out chnode1_cert_user.crt -CA marsnet_ca.crt -CAkey marsnet_ca.key -days 365 + ``` + +## 2. SQLユーザーを作æˆã—ã€æ¨©é™ã‚’付与 + +:::note +SQLユーザーを有効ã«ã—ã¦ãƒ­ãƒ¼ãƒ«ã‚’設定ã™ã‚‹æ–¹æ³•ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[SQLユーザーã¨ãƒ­ãƒ¼ãƒ«ã®å®šç¾©](index.md)ユーザーガイドをå‚ç…§ã—ã¦ãã ã•ã„。 +::: + +1. 証明書èªè¨¼ã‚’使用ã™ã‚‹ã‚ˆã†ã«å®šç¾©ã•ã‚ŒãŸSQLユーザーを作æˆã—ã¾ã™ï¼š + ```sql + CREATE USER cert_user IDENTIFIED WITH ssl_certificate CN 'chnode1.marsnet.local:cert_user'; + ``` + +2. æ–°ã—ã„証明書ユーザーã«æ¨©é™ã‚’付与ã—ã¾ã™ï¼š + ```sql + GRANT ALL ON *.* TO cert_user WITH GRANT OPTION; + ``` + :::note + ã“ã®æ¼”ç¿’ã§ã¯ãƒ‡ãƒ¢ãƒ³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç›®çš„ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ãƒ•ãƒ«ç®¡ç†è€…権é™ã‚’付与ã—ã¦ã„ã¾ã™ã€‚権é™è¨­å®šã«ã¤ã„ã¦ã¯ClickHouseã®[RBACドキュメント](/docs/ja/guides/sre/user-management/index.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + ::: + + :::note + ユーザーã¨ãƒ­ãƒ¼ãƒ«ã‚’定義ã™ã‚‹ãŸã‚ã«SQLを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ãŒã€ç¾åœ¨è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ãƒ­ãƒ¼ãƒ«ã‚’定義ã—ã¦ã„ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + ```xml + + + + chnode1.marsnet.local:cert_user + + + ::/0 + + default + 1 + + + + ``` + ::: + +## 3. テスト + +1. ユーザー証明書ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚­ãƒ¼ã€CA証明書をリモートノードã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ + +2. 証明書ã¨ãƒ‘スを指定ã—ã¦ã€ClickHouseã®[クライアント設定](/docs/ja/interfaces/cli.md#configuration_files)ã§OpenSSLを構æˆã—ã¾ã™ã€‚ + + ```xml + + + my_cert_name.crt + my_cert_name.key + my_ca_cert.crt + + + ``` + +3. `clickhouse-client`を実行ã—ã¾ã™ã€‚ + ``` + clickhouse-client --user --query 'SHOW TABLES' + ``` + :::note + 設定ã§è¨¼æ˜Žæ›¸ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€clickhouse-clientã«æ¸¡ã•ã‚Œã‚‹ãƒ‘スワードã¯ç„¡è¦–ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + ::: + +## 4. HTTPã®ãƒ†ã‚¹ãƒˆ + +1. ユーザー証明書ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚­ãƒ¼ã€CA証明書をリモートノードã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ + +2. `curl`を使用ã—ã¦ã‚µãƒ³ãƒ—ルSQLコマンドをテストã—ã¾ã™ã€‚基本的ãªå½¢å¼ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + ```bash + echo 'SHOW TABLES' | curl 'https://:8443' --cert .crt --key .key --cacert .crt -H "X-ClickHouse-SSL-Certificate-Auth: on" -H "X-ClickHouse-User: " --data-binary @- + ``` + 例ãˆã°ï¼š + ```bash + echo 'SHOW TABLES' | curl 'https://chnode1:8443' --cert chnode1_cert_user.crt --key chnode1_cert_user.key --cacert marsnet_ca.crt -H "X-ClickHouse-SSL-Certificate-Auth: on" -H "X-ClickHouse-User: cert_user" --data-binary @- + ``` + 出力ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + ```response + INFORMATION_SCHEMA + default + information_schema + system + ``` + :::note + パスワードãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ClickHouseã¯ãƒ‘スワードã®ä»£ã‚ã‚Šã«è¨¼æ˜Žæ›¸ã‚’使用ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’èªè¨¼ã—ã¾ã™ã€‚ + ::: + +## ã¾ã¨ã‚ + +ã“ã®è¨˜äº‹ã§ã¯ã€SSL証明書èªè¨¼ã®ãŸã‚ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã—設定ã™ã‚‹åŸºæœ¬ã‚’紹介ã—ã¾ã—ãŸã€‚ã“ã®æ–¹æ³•ã¯ã€`clickhouse-client`ã¾ãŸã¯`https`インターフェースをサãƒãƒ¼ãƒˆã—ã€HTTPヘッダーを設定ã§ãるクライアントã§ä½¿ç”¨ã§ãã¾ã™ã€‚生æˆã•ã‚ŒãŸè¨¼æ˜Žæ›¸ã¨ã‚­ãƒ¼ã¯ãƒ—ライベートã«ä¿ã¡ã€é™ã‚‰ã‚ŒãŸã‚¢ã‚¯ã‚»ã‚¹ã®ã¿ã‚’許å¯ã—ã¦ãã ã•ã„。証明書ã¨ã‚­ãƒ¼ã¯ãƒ‘スワードã¨åŒæ§˜ã«æ‰±ã£ã¦ãã ã•ã„。 diff --git a/docs/ja/guides/troubleshooting.md b/docs/ja/guides/troubleshooting.md new file mode 100644 index 00000000000..0c202c5ac11 --- /dev/null +++ b/docs/ja/guides/troubleshooting.md @@ -0,0 +1,193 @@ +--- +title: "トラブルシューティング" +--- + +## インストール + +### apt-keyã§keyserver.ubuntu.comã‹ã‚‰GPGキーをインãƒãƒ¼ãƒˆã§ããªã„ + +[Advanced package tool (APT)ã®`apt-key`機能ã¯å»ƒæ­¢ã•ã‚Œã¦ã„ã¾ã™](https://manpages.debian.org/bookworm/apt/apt-key.8.en.html)。代ã‚ã‚Šã«`gpg`コマンドを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚[インストールガイド](../getting-started/install.md)ã®è¨˜äº‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### gpgã§keyserver.ubuntu.comã‹ã‚‰GPGキーをインãƒãƒ¼ãƒˆã§ããªã„ + +1. `gpg`ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹ã‹ç¢ºèªã—ã¾ã™: + +```shell +sudo apt-get install gnupg +``` + +### apt-getã§ClickHouseリãƒã‚¸ãƒˆãƒªã‹ã‚‰debパッケージをå–å¾—ã§ããªã„ + +1. ファイアウォールã®è¨­å®šã‚’確èªã—ã¾ã™ã€‚ +2. 何らã‹ã®ç†ç”±ã§ãƒªãƒã‚¸ãƒˆãƒªã«ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã„å ´åˆã¯ã€[インストールガイド](../getting-started/install.md)ã®è¨˜äº‹ã§èª¬æ˜Žã•ã‚Œã¦ã„るよã†ã«ãƒ‘ッケージをダウンロードã—ã€`sudo dpkg -i `コマンドを使ã£ã¦æ‰‹å‹•ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¾ã™ã€‚ã¾ãŸã€`tzdata`パッケージも必è¦ã§ã™ã€‚ + +### apt-getã§ClickHouseリãƒã‚¸ãƒˆãƒªã‹ã‚‰debパッケージを更新ã§ããªã„ + +ã“ã®å•é¡Œã¯GPGキーãŒå¤‰æ›´ã•ã‚ŒãŸã¨ãã«ç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +リãƒã‚¸ãƒˆãƒªè¨­å®šã‚’æ›´æ–°ã™ã‚‹ã«ã¯ã€[設定](../getting-started/install.md#setup-the-debian-repository)ページã®ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã‚’使用ã—ã¦ãã ã•ã„。 + +### `apt-get update`ã§ç•°ãªã‚‹è­¦å‘ŠãŒå‡ºã‚‹ + +警告メッセージã®ä¾‹ã¯æ¬¡ã®ã„ãšã‚Œã‹ã§ã™: + +```shell +N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://packages.clickhouse.com/deb stable InRelease' doesn't support architecture 'i386' +``` + +```shell +E: Failed to fetch https://packages.clickhouse.com/deb/dists/stable/main/binary-amd64/Packages.gz File has unexpected size (30451 != 28154). Mirror sync in progress? +``` + +```shell +E: Repository 'https://packages.clickhouse.com/deb stable InRelease' changed its 'Origin' value from 'Artifactory' to 'ClickHouse' +E: Repository 'https://packages.clickhouse.com/deb stable InRelease' changed its 'Label' value from 'Artifactory' to 'ClickHouse' +N: Repository 'https://packages.clickhouse.com/deb stable InRelease' changed its 'Suite' value from 'stable' to '' +N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details. +``` + +```shell +Err:11 https://packages.clickhouse.com/deb stable InRelease +400 Bad Request [IP: 172.66.40.249 443] +``` + +上記ã®å•é¡Œã‚’解決ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚¹ã‚¯ãƒªãƒ—トを使用ã—ã¦ãã ã•ã„: + +```shell +sudo rm /var/lib/apt/lists/packages.clickhouse.com_* /var/lib/dpkg/arch /var/lib/apt/lists/partial/packages.clickhouse.com_* +sudo apt-get clean +sudo apt-get autoclean +``` + +### ä¸æ­£ãªç½²åã®ãŸã‚ã«Yumã§ãƒ‘ッケージをå–å¾—ã§ããªã„ + +å¯èƒ½æ€§ã®ã‚ã‚‹å•é¡Œ: キャッシュãŒé–“é•ã£ã¦ã„ã‚‹ã€ã¾ãŸã¯2022-09ã«æ›´æ–°ã•ã‚ŒãŸGPGキー後ã«ç ´æã—ãŸå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +解決方法ã¯ã€Yumã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¨libディレクトリをクリアã™ã‚‹ã“ã¨ã§ã™: + +```shell +sudo find /var/lib/yum/repos/ /var/cache/yum/ -name 'clickhouse-*' -type d -exec rm -rf {} + +sudo rm -f /etc/yum.repos.d/clickhouse.repo +``` + +ãã®å¾Œã€[インストールガイド](../getting-started/install.md#from-rpm-packages)ã«å¾“ã£ã¦ãã ã•ã„。 + +## サーãƒãƒ¼ã¸ã®æŽ¥ç¶š + +å¯èƒ½æ€§ã®ã‚ã‚‹å•é¡Œ: + +- サーãƒãƒ¼ãŒç¨¼åƒã—ã¦ã„ãªã„。 +- 予期ã›ã¬ã€ã¾ãŸã¯é–“é•ã£ãŸæ§‹æˆãƒ‘ラメータ。 + +### サーãƒãƒ¼ãŒç¨¼åƒã—ã¦ã„ãªã„ + +#### サーãƒãƒ¼ãŒç¨¼åƒã—ã¦ã„ã‚‹ã‹ç¢ºèª + +```shell +sudo service clickhouse-server status +``` + +サーãƒãƒ¼ãŒç¨¼åƒã—ã¦ã„ãªã„å ´åˆã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã§é–‹å§‹ã—ã¦ãã ã•ã„: + +```shell +sudo service clickhouse-server start +``` + +#### ãƒ­ã‚°ã‚’ç¢ºèª + +`clickhouse-server`ã®ãƒ¡ã‚¤ãƒ³ãƒ­ã‚°ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`/var/log/clickhouse-server/clickhouse-server.log`ã«ã‚ã‚Šã¾ã™ã€‚ + +サーãƒãƒ¼ãŒæ­£å¸¸ã«é–‹å§‹ã—ãŸå ´åˆã€æ¬¡ã®æ–‡å­—列ãŒè¡¨ç¤ºã•ã‚Œã¾ã™: + +- ` Application: starting up.` — サーãƒãƒ¼ãŒé–‹å§‹ã•ã‚Œã¾ã—ãŸã€‚ +- ` Application: Ready for connections.` — サーãƒãƒ¼ãŒç¨¼åƒä¸­ã§æŽ¥ç¶šå¯èƒ½ã§ã™ã€‚ + +構æˆã‚¨ãƒ©ãƒ¼ã§`clickhouse-server`ã®é–‹å§‹ãŒå¤±æ•—ã—ãŸå ´åˆã€``文字列ã¨ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜ŽãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚例: + +```plaintext +2019.01.11 15:23:25.549505 [ 45 ] {} ExternalDictionaries: Failed reloading 'event2id' external dictionary: Poco::Exception. Code: 1000, e.code() = 111, e.displayText() = Connection refused, e.what() = Connection refused +``` + +ファイルã®æœ«å°¾ã«ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•ã‚Œãªã„å ´åˆã¯ã€æ¬¡ã®æ–‡å­—列ã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«å…¨ä½“を確èªã—ã¦ãã ã•ã„: + +```plaintext + Application: starting up. +``` + +サーãƒãƒ¼ã«`clickhouse-server`ã®2番目ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’開始ã—よã†ã¨ã™ã‚‹ã¨ã€æ¬¡ã®ãƒ­ã‚°ãŒè¡¨ç¤ºã•ã‚Œã¾ã™: + +```plaintext +2019.01.11 15:25:11.151730 [ 1 ] {} : Starting ClickHouse 19.1.0 with revision 54413 +2019.01.11 15:25:11.154578 [ 1 ] {} Application: starting up +2019.01.11 15:25:11.156361 [ 1 ] {} StatusFile: Status file ./status already exists - unclean restart. Contents: +PID: 8510 +Started at: 2019-01-11 15:24:23 +Revision: 54413 + +2019.01.11 15:25:11.156673 [ 1 ] {} Application: DB::Exception: Cannot lock file ./status. Another server instance in same directory is already running. +2019.01.11 15:25:11.156682 [ 1 ] {} Application: shutting down +2019.01.11 15:25:11.156686 [ 1 ] {} Application: Uninitializing subsystem: Logging Subsystem +2019.01.11 15:25:11.156716 [ 2 ] {} BaseDaemon: Stop SignalListener thread +``` + +#### system.dãƒ­ã‚°ã‚’ç¢ºèª + +`clickhouse-server`ログã«æœ‰ç”¨ãªæƒ…å ±ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ã¾ãŸã¯ãƒ­ã‚°ãŒãªã„å ´åˆã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦`system.d`ログを確èªã§ãã¾ã™: + +```shell +sudo journalctl -u clickhouse-server +``` + +#### インタラクティブモードã§clickhouse-serverã‚’èµ·å‹• + +```shell +sudo -u clickhouse /usr/bin/clickhouse-server --config-file /etc/clickhouse-server/config.xml +``` + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€autostartスクリプトã®æ¨™æº–パラメータを使用ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã‚’インタラクティブアプリã¨ã—ã¦èµ·å‹•ã—ã¾ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€`clickhouse-server`ã¯ã™ã¹ã¦ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’コンソールã«è¡¨ç¤ºã—ã¾ã™ã€‚ + +### 構æˆãƒ‘ラメータ + +確èªäº‹é …: + +1. Dockerã®è¨­å®š: + + - Dockerã§ClickHouseを実行ã™ã‚‹éš›ã«IPv6ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’使用ã™ã‚‹å ´åˆã€`network=host`ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +1. エンドãƒã‚¤ãƒ³ãƒˆã®è¨­å®šã€‚ + - [listen_host](../operations/server-configuration-parameters/settings.md#server_configuration_parameters-listen_host)ã¨[tcp_port](../operations/server-configuration-parameters/settings.md#server_configuration_parameters-tcp_port)ã®è¨­å®šã‚’確èªã—ã¦ãã ã•ã„。 + - ClickHouseサーãƒãƒ¼ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§localhost接続ã®ã¿å—ã‘入れã¾ã™ã€‚ + +1. HTTPプロトコルã®è¨­å®š: + + - HTTP APIã®ãƒ—ロトコル設定を確èªã—ã¾ã™ã€‚ + +1. セキュア接続ã®è¨­å®šã€‚ + + - 次を確èªã—ã¦ãã ã•ã„: + - [tcp_port_secure](../operations/server-configuration-parameters/settings.md#server_configuration_parameters-tcp_port_secure)ã®è¨­å®šã€‚ + - [SSL証明書](../operations/server-configuration-parameters/settings.md#server_configuration_parameters-openssl)ã®è¨­å®šã€‚ + - 接続ã™ã‚‹éš›ã«ã¯é©åˆ‡ãªãƒ‘ラメータを使用ã—ã¦ãã ã•ã„。例ãˆã°ã€`clickhouse_client`ã«ã¯`port_secure`パラメータを使用ã—ã¾ã™ã€‚ + +1. ユーザー設定: + + - é–“é•ã£ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼åã¾ãŸã¯ãƒ‘スワードを使用ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## ã‚¯ã‚¨ãƒªå‡¦ç† + +ClickHouseãŒã‚¯ã‚¨ãƒªã‚’処ç†ã§ããªã„å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜Žã‚’é€ä¿¡ã—ã¾ã™ã€‚`clickhouse-client`ã§ã¯ã€ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜ŽãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚HTTPインターフェースを使用ã—ã¦ã„ã‚‹å ´åˆã€ClickHouseã¯å¿œç­”ボディã«ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜Žã‚’é€ä¿¡ã—ã¾ã™ã€‚例ãˆã°: + +```shell +$ curl 'http://localhost:8123/' --data-binary "SELECT a" +Code: 47, e.displayText() = DB::Exception: Unknown identifier: a. Note that there are no tables (FROM clause) in your query, context: required_names: 'a' source_tables: table_aliases: private_aliases: column_aliases: public_columns: 'a' masked_columns: array_join_columns: source_columns: , e.what() = DB::Exception +``` + +`stack-trace`パラメータã§`clickhouse-client`ã‚’èµ·å‹•ã™ã‚‹ã¨ã€ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜Žã¨å…±ã«ã‚µãƒ¼ãƒãƒ¼ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +接続ãŒåˆ‡æ–­ã•ã‚ŒãŸã¨ã„ã†ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’見るã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ã‚¯ã‚¨ãƒªã‚’å†å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚クエリを実行ã™ã‚‹ãŸã³ã«æŽ¥ç¶šãŒåˆ‡æ–­ã•ã‚Œã‚‹å ´åˆã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã§ã‚¨ãƒ©ãƒ¼ã‚’確èªã—ã¦ãã ã•ã„。 + +## クエリ処ç†ã®åŠ¹çŽ‡ + +ClickHouseãŒéžå¸¸ã«é…ã動作ã—ã¦ã„ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã«å¯¾ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã®ãƒªã‚½ãƒ¼ã‚¹ã¨ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è² è·ã‚’プロファイルã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +clickhouse-benchmarkユーティリティを使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’プロファイルã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€1秒ã‚ãŸã‚Šã«å‡¦ç†ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã®æ•°ã€1秒ã‚ãŸã‚Šã«å‡¦ç†ã•ã‚Œã‚‹è¡Œã®æ•°ã€ãŠã‚ˆã³ã‚¯ã‚¨ãƒªå‡¦ç†æ™‚é–“ã®ãƒ‘ーセンタイルを表示ã—ã¾ã™ã€‚ diff --git a/docs/ja/guides/writing-queries.md b/docs/ja/guides/writing-queries.md new file mode 100644 index 00000000000..0830338a071 --- /dev/null +++ b/docs/ja/guides/writing-queries.md @@ -0,0 +1,57 @@ +--- +sidebar_position: 3 +sidebar_label: SELECT クエリ +--- + +# ClickHouse ã® SELECT クエリ + +ClickHouse 㯠SQL データベースã§ã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã®ã‚¯ã‚¨ãƒªã¯æ—¢ã«ãŠé¦´æŸ“ã¿ã® `SELECT` クエリを書ãã“ã¨ã§è¡Œãˆã¾ã™ã€‚例ãˆã°ä»¥ä¸‹ã®ã‚ˆã†ã«ä½¿ç”¨ã—ã¾ã™ï¼š + +```sql +SELECT * +FROM helloworld.my_first_table +ORDER BY timestamp +``` + +:::note +構文や利用å¯èƒ½ãªå¥ã€ã‚ªãƒ—ションã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[SQL リファレンス](../sql-reference/statements/select/index.md) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +応答ã¯ãã‚Œã„ãªãƒ†ãƒ¼ãƒ–ル形å¼ã§è¿”ã£ã¦ãã‚‹ã“ã¨ã«æ³¨ç›®ã—ã¦ãã ã•ã„: + +```response +┌─user_id─┬─message────────────────────────────────────────────┬───────────timestamp─┬──metric─┠+│ 102 │ Insert a lot of rows per batch │ 2022-03-21 00:00:00 │ 1.41421 │ +│ 102 │ Sort your data based on your commonly-used queries │ 2022-03-22 00:00:00 │ 2.718 │ +│ 101 │ Hello, ClickHouse! │ 2022-03-22 14:04:09 │ -1 │ +│ 101 │ Granules are the smallest chunks of data read │ 2022-03-22 14:04:14 │ 3.14159 │ +└─────────┴────────────────────────────────────────────────────┴─────────────────────┴─────────┘ + +4 rows in set. Elapsed: 0.008 sec. +``` + +`FORMAT` å¥ã‚’追加ã—ã¦ã€ClickHouseã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る多ãã®å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ä¸€ã¤ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM helloworld.my_first_table +ORDER BY timestamp +FORMAT TabSeparated +``` + +上記ã®ã‚¯ã‚¨ãƒªã§ã¯ã€å‡ºåŠ›ã¯ã‚¿ãƒ–区切りã§è¿”ã•ã‚Œã¾ã™ï¼š + +```response +Query id: 3604df1c-acfd-4117-9c56-f86c69721121 + +102 Insert a lot of rows per batch 2022-03-21 00:00:00 1.41421 +102 Sort your data based on your commonly-used queries 2022-03-22 00:00:00 2.718 +101 Hello, ClickHouse! 2022-03-22 14:04:09 -1 +101 Granules are the smallest chunks of data read 2022-03-22 14:04:14 3.14159 + +4 rows in set. Elapsed: 0.005 sec. +``` + +:::note +ClickHouse 㯠70 以上ã®å…¥åŠ›ãŠã‚ˆã³å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€æ•°åƒã®é–¢æ•°ã¨ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ã®çµ„ã¿åˆã‚ã›ã§ã€ClickHouse を使用ã—ã¦å°è±¡çš„ã§é«˜é€Ÿãª ETL ã®ã‚ˆã†ãªãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚’実行ã§ãã¾ã™ã€‚実際ã€ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã™ã‚‹ãŸã‚ã« ClickHouse サーãƒãƒ¼ã‚’èµ·å‹•ã™ã‚‹å¿…è¦ã™ã‚‰ã‚ã‚Šã¾ã›ã‚“。`clickhouse-local` ツールを使用ã§ãã¾ã™ã€‚詳細ã¯ã€[`clickhouse-local` ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒšãƒ¼ã‚¸](../operations/utilities/clickhouse-local.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: diff --git a/docs/ja/home_links/deployment_links.json b/docs/ja/home_links/deployment_links.json new file mode 100644 index 00000000000..7ba64e7041c --- /dev/null +++ b/docs/ja/home_links/deployment_links.json @@ -0,0 +1,14 @@ +[ + { + "title": "Quick Start", + "description": "Get up and running on ClickHouse in minutes, explore some sample data, and build your solution", + "url": "/docs/ja/quick-start/", + "background": "cloud" + }, + { + "title": "Tutorials and Sample Datasets", + "description": "From taxi rides to property prices, learn how to get data into ClickHouse and model it for query performance", + "url": "/docs/ja/getting-started/example-datasets/", + "background": "cloud" + } +] diff --git a/docs/ja/home_links/links_101.json b/docs/ja/home_links/links_101.json new file mode 100644 index 00000000000..4cb92c40b2c --- /dev/null +++ b/docs/ja/home_links/links_101.json @@ -0,0 +1,27 @@ +[ + { + "title": "SQL reference", + "description": "Learn the statements, functions, and data types that are available", + "url": "/docs/ja/sql-reference" + }, + { + "title": "Ingest data", + "description": "Explore the many ways to get data into ClickHouse", + "url": "/docs/ja/integrations/data-ingestion/" + }, + { + "title": "Visualize data", + "description": "Now that your data is in ClickHouse, it's time to analyze it", + "url": "/docs/ja/integrations/data-visualization/" + }, + { + "title": "Optimize data", + "description": "Ways to improve the performance of your ClickHouse service", + "url": "/docs/ja/optimize/" + }, + { + "title": "Migrate data", + "description": "Importing your data from an external source into ClickHouse", + "url": "/docs/ja/integrations/migration/" + } +] diff --git a/docs/ja/images/column-oriented.gif b/docs/ja/images/column-oriented.gif new file mode 100644 index 00000000000..22ce122042c Binary files /dev/null and b/docs/ja/images/column-oriented.gif differ diff --git a/docs/ja/images/logo.png b/docs/ja/images/logo.png new file mode 100644 index 00000000000..552637796d6 Binary files /dev/null and b/docs/ja/images/logo.png differ diff --git a/docs/ja/images/logo.svg b/docs/ja/images/logo.svg new file mode 100644 index 00000000000..b5ab923ff65 --- /dev/null +++ b/docs/ja/images/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/images/play.png b/docs/ja/images/play.png new file mode 100644 index 00000000000..ddd78c55e32 Binary files /dev/null and b/docs/ja/images/play.png differ diff --git a/docs/ja/images/quickstart/CloudClickhouseClientDetails.png b/docs/ja/images/quickstart/CloudClickhouseClientDetails.png new file mode 100644 index 00000000000..3fe04d9f843 Binary files /dev/null and b/docs/ja/images/quickstart/CloudClickhouseClientDetails.png differ diff --git a/docs/ja/images/quickstart/SQLConsole.png b/docs/ja/images/quickstart/SQLConsole.png new file mode 100644 index 00000000000..243b7683715 Binary files /dev/null and b/docs/ja/images/quickstart/SQLConsole.png differ diff --git a/docs/ja/images/quickstart/ServiceDetails.png b/docs/ja/images/quickstart/ServiceDetails.png new file mode 100644 index 00000000000..3555d1f8013 Binary files /dev/null and b/docs/ja/images/quickstart/ServiceDetails.png differ diff --git a/docs/ja/images/quickstart/Services.png b/docs/ja/images/quickstart/Services.png new file mode 100644 index 00000000000..35239b26862 Binary files /dev/null and b/docs/ja/images/quickstart/Services.png differ diff --git a/docs/ja/images/quickstart/ShowDatabases.png b/docs/ja/images/quickstart/ShowDatabases.png new file mode 100644 index 00000000000..e22ceaa15e6 Binary files /dev/null and b/docs/ja/images/quickstart/ShowDatabases.png differ diff --git a/docs/ja/images/quickstart_01.png b/docs/ja/images/quickstart_01.png new file mode 100644 index 00000000000..2ace0859bd1 Binary files /dev/null and b/docs/ja/images/quickstart_01.png differ diff --git a/docs/ja/images/quickstart_02.png b/docs/ja/images/quickstart_02.png new file mode 100644 index 00000000000..5fc561441e5 Binary files /dev/null and b/docs/ja/images/quickstart_02.png differ diff --git a/docs/ja/images/quickstart_03.png b/docs/ja/images/quickstart_03.png new file mode 100644 index 00000000000..51ef33fa610 Binary files /dev/null and b/docs/ja/images/quickstart_03.png differ diff --git a/docs/ja/images/quickstart_04.png b/docs/ja/images/quickstart_04.png new file mode 100644 index 00000000000..0a29219d3a8 Binary files /dev/null and b/docs/ja/images/quickstart_04.png differ diff --git a/docs/ja/images/row-oriented.gif b/docs/ja/images/row-oriented.gif new file mode 100644 index 00000000000..78ff99523a9 Binary files /dev/null and b/docs/ja/images/row-oriented.gif differ diff --git a/docs/ja/images/sql-console-access-queries.png b/docs/ja/images/sql-console-access-queries.png new file mode 100644 index 00000000000..55286fa01de Binary files /dev/null and b/docs/ja/images/sql-console-access-queries.png differ diff --git a/docs/ja/images/sql-console-add-team.png b/docs/ja/images/sql-console-add-team.png new file mode 100644 index 00000000000..c186cad24d2 Binary files /dev/null and b/docs/ja/images/sql-console-add-team.png differ diff --git a/docs/ja/images/sql-console-edit-access.png b/docs/ja/images/sql-console-edit-access.png new file mode 100644 index 00000000000..3093ba2f52a Binary files /dev/null and b/docs/ja/images/sql-console-edit-access.png differ diff --git a/docs/ja/images/sql-console-edit-member.png b/docs/ja/images/sql-console-edit-member.png new file mode 100644 index 00000000000..22af2ec301a Binary files /dev/null and b/docs/ja/images/sql-console-edit-member.png differ diff --git a/docs/ja/images/sql-console-rename.png b/docs/ja/images/sql-console-rename.png new file mode 100644 index 00000000000..0da0f86bff4 Binary files /dev/null and b/docs/ja/images/sql-console-rename.png differ diff --git a/docs/ja/images/sql-console-save-query.png b/docs/ja/images/sql-console-save-query.png new file mode 100644 index 00000000000..82689a9f1a4 Binary files /dev/null and b/docs/ja/images/sql-console-save-query.png differ diff --git a/docs/ja/images/sql-console-share.png b/docs/ja/images/sql-console-share.png new file mode 100644 index 00000000000..9502b824c5e Binary files /dev/null and b/docs/ja/images/sql-console-share.png differ diff --git a/docs/ja/integrations/cli.mdx b/docs/ja/integrations/cli.mdx new file mode 100644 index 00000000000..fd89f1852c8 --- /dev/null +++ b/docs/ja/integrations/cli.mdx @@ -0,0 +1,12 @@ +--- +sidebar_position: 30 +sidebar_label: clickhouse-client +title: clickhouse-client +slug: /ja/integrations/sql-clients/cli +--- + +import Content from '@site/docs/ja/interfaces/cli.md'; + + + + diff --git a/docs/ja/integrations/clickhouse-client-local.md b/docs/ja/integrations/clickhouse-client-local.md new file mode 100644 index 00000000000..3e7f99760d1 --- /dev/null +++ b/docs/ja/integrations/clickhouse-client-local.md @@ -0,0 +1,62 @@ +--- +sidebar_position: 20 +slug: /ja/integrations/sql-clients/clickhouse-client-local +sidebar_label: コマンドラインインターフェース (CLI) +--- + +# コマンドラインインターフェース (CLI) + +`clickhouse client` ã¯ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‹ã‚‰ClickHouseã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã§ã™ã€‚`clickhouse local` ã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸ŠãŠã‚ˆã³ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’クエリã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã§ã™ã€‚ClickHouseã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®å¤šãã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€`clickhouse local`を使用ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆCSVã€TSVã€Parquetãªã©ï¼‰ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’調ã¹ã€ãã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’クエリã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’æ“作ã—ã¦ClickHouseã¸ã®æŒ¿å…¥ã®æº–備をã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¦ã„ã¾ã™ã€‚`clickhouse local`ã§ãƒ•ã‚¡ã‚¤ãƒ«ã‚’クエリã—ã€ãã®å‡ºåŠ›ã‚’`clickhouse client`ã«ãƒ‘イプã§æ¸¡ã—ã¦ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’ストリームã™ã‚‹ã“ã¨ã‚‚よãã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®æœ€å¾Œã®ã€Œæ¬¡ã®ã‚¹ãƒ†ãƒƒãƒ—ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€`clickhouse client` 㨠`clickhouse local` ã®ä¸¡æ–¹ã‚’使用ã—ãŸä¾‹ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’紹介ã—ã¦ã„ã¾ã™ã€‚ + +:::tip +ã‚‚ã—æ—¢ã«ãƒ­ãƒ¼ã‚«ãƒ«ã«ClickHouseサーãƒãƒ¼ã‚’インストールã—ã¦ã„ã‚‹å ´åˆã¯ã€**clickhouse client** 㨠**clickhouse local** ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。コマンドライン㧠**clickhouse client** 㨠**clickhouse local** を実行ã—ã¦ç¢ºèªã—ã¦ãã ã•ã„。ãã†ã§ãªã„å ´åˆã¯ã€ã‚ãªãŸã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã«å¯¾ã™ã‚‹ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ‰‹é †ã‚’確èªã—ã¦ãã ã•ã„。 +::: + + +## Microsoft Windowsã®å‰ææ¡ä»¶ + +Windows 10ã¾ãŸã¯11ã§Windows Subsystem for Linux (WSL) Version 2 (WSL 2) を使用ã™ã‚‹ã¨ã€Ubuntu Linuxを実行ã§ãã€ãã®ä¸Šã§`clickhouse client` ãŠã‚ˆã³ `clickhouse local`を実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +Microsoftã®[WSLドキュメント](https://docs.microsoft.com/en-us/windows/wsl/install)ã«å¾“ã£ã¦WSLをインストールã—ã¦ãã ã•ã„。 + +#### WSL 2ã§ã‚·ã‚§ãƒ«ã‚’é–‹ã: + +ターミナルã‹ã‚‰ `bash` コマンドを実行ã™ã‚‹ã¨ã€WSLã«å…¥ã‚Šã¾ã™: + +```bash +bash +``` + +## ClickHouseã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ + +``` +curl https://clickhouse.com/ | sh +``` + +## `clickhouse client` ã®ç¢ºèª + +```bash +./clickhouse client +``` +:::note +`clickhouse client` ã¯ãƒ­ãƒ¼ã‚«ãƒ«ã®ClickHouseサーãƒãƒ¼ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«æŽ¥ç¶šã—よã†ã¨ã—ã¾ã™ãŒã€å®Ÿè¡Œä¸­ã§ãªã„å ´åˆã¯ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã—ã¾ã™ã€‚[`clickhouse-client`](/docs/ja/integrations/cli.mdx) ドキュメントをå‚ç…§ã—ã¦ä¾‹ã‚’見ã¦ãã ã•ã„。 +::: + +## `clickhouse local` ã®ç¢ºèª + +```bash +./clickhouse local +``` + +## 次ã®ã‚¹ãƒ†ãƒƒãƒ— +[`NYPD Complaint` データセット](/docs/ja/getting-started/example-datasets/nypd_complaint_data.md)㧠`clickhouse-client` 㨠`clickhouse-local` ã®ä½¿ç”¨ä¾‹ã‚’確èªã—ã¦ãã ã•ã„。 + +[`clickhouse-client`](/docs/ja/integrations/cli.mdx) ドキュメントをå‚ç…§ã—ã¦ãã ã•ã„。 + +[`clickhouse-local`](/docs/ja/operations/utilities/clickhouse-local.md) ドキュメントをå‚ç…§ã—ã¦ãã ã•ã„。 + +[ClickHouseã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«](/docs/ja/getting-started/install.md) ドキュメントをå‚ç…§ã—ã¦ãã ã•ã„。 + +## 関連コンテンツ + +- ブログ: [`clickhouse-local`を使ã£ãŸãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®æŠ½å‡ºã€å¤‰æ›ã€ãŠã‚ˆã³ã‚¯ã‚¨ãƒª](https://clickhouse.com/blog/extracting-converting-querying-local-files-with-sql-clickhouse-local) diff --git a/docs/ja/integrations/data-ingestion/_category_.yml b/docs/ja/integrations/data-ingestion/_category_.yml new file mode 100644 index 00000000000..430c6129eee --- /dev/null +++ b/docs/ja/integrations/data-ingestion/_category_.yml @@ -0,0 +1,8 @@ +position: 200 +label: 'Data ingestion' +collapsible: true +collapsed: true +link: + type: generated-index + title: Data ingestion + slug: /ja/integrations/data-ingestion diff --git a/docs/ja/integrations/data-ingestion/apache-spark/index.md b/docs/ja/integrations/data-ingestion/apache-spark/index.md new file mode 100644 index 00000000000..7d6d90790d4 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/apache-spark/index.md @@ -0,0 +1,484 @@ +--- +sidebar_label: Apache Spark +sidebar_position: 1 +slug: /ja/integrations/apache-spark/ +description: ClickHouseã¨Apache Sparkã®çµ±åˆã®ç´¹ä»‹ +keywords: [ clickhouse, apache, spark, migrating, data ] +--- + +# ClickHouseã¨Apache Sparkã®çµ±åˆ + +[Apache Spark](https://spark.apache.org/) Apache Sparkâ„¢ã¯ã€ã‚·ãƒ³ã‚°ãƒ«ãƒŽãƒ¼ãƒ‰ãƒžã‚·ãƒ³ã¾ãŸã¯ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã§ãƒ‡ãƒ¼ã‚¿ã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ãƒªãƒ³ã‚°ã€ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚¨ãƒ³ã‚¹ã€ãŠã‚ˆã³æ©Ÿæ¢°å­¦ç¿’を実行ã™ã‚‹ãŸã‚ã®å¤šè¨€èªžã‚¨ãƒ³ã‚¸ãƒ³ã§ã™ã€‚ + +Apache Sparkã¨ClickHouseを接続ã™ã‚‹ä¸»ãªæ–¹æ³•ã¯2ã¤ã‚ã‚Šã¾ã™ï¼š + +1. [Spark Connector](#spark-connector) - Sparkコãƒã‚¯ã‚¿ã¯`DataSourceV2`を実装ã—ã€ç‹¬è‡ªã®ã‚«ã‚¿ãƒ­ã‚°ç®¡ç†ã‚’å‚™ãˆã¦ã„ã¾ã™ã€‚ç¾åœ¨ã€ClickHouseã¨Sparkã‚’çµ±åˆã™ã‚‹æŽ¨å¥¨æ–¹æ³•ã§ã™ã€‚ +2. [Spark JDBC](#spark-jdbc) - [JDBCデータソース](https://spark.apache.org/docs/latest/sql-data-sources-jdbc.html)を使用ã—ã¦Sparkã¨ClickHouseã‚’çµ±åˆã—ã¾ã™ã€‚ + +## Spark Connector + +ã“ã®ã‚³ãƒã‚¯ã‚¿ã¯ã€é«˜åº¦ãªãƒ‘ーティショニングや述語プッシュダウンãªã©ã€ClickHouseã«ç‰¹åŒ–ã—ãŸæœ€é©åŒ–を活用ã—ã¦ã‚¯ã‚¨ãƒªæ€§èƒ½ã‚„データ処ç†ã‚’å‘上ã•ã›ã¾ã™ã€‚コãƒã‚¯ã‚¿ã¯[ClickHouseã®å…¬å¼JDBCコãƒã‚¯ã‚¿](https://github.com/ClickHouse/clickhouse-java)ã«åŸºã¥ã„ã¦ãŠã‚Šã€ç‹¬è‡ªã®ã‚«ã‚¿ãƒ­ã‚°ã‚’管ç†ã—ã¾ã™ã€‚ + +### è¦ä»¶ + +- Java 8ã¾ãŸã¯17 +- Scala 2.12ã¾ãŸã¯2.13 +- Apache Spark 3.3ã¾ãŸã¯3.4ã¾ãŸã¯3.5 + +### 互æ›æ€§ãƒžãƒˆãƒªãƒƒã‚¯ã‚¹ + +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 互æ›æ€§ã®ã‚ã‚‹Sparkãƒãƒ¼ã‚¸ãƒ§ãƒ³ | ClickHouse JDBCãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +|------------|-----------------------------|---------------------------| +| main | Spark 3.3, 3.4, 3.5 | 0.6.3 | +| 0.8.0 | Spark 3.3, 3.4, 3.5 | 0.6.3 | +| 0.7.3 | Spark 3.3, 3.4 | 0.4.6 | +| 0.6.0 | Spark 3.3 | 0.3.2-patch11 | +| 0.5.0 | Spark 3.2, 3.3 | 0.3.2-patch11 | +| 0.4.0 | Spark 3.2, 3.3 | ä¾å­˜ãªã— | +| 0.3.0 | Spark 3.2, 3.3 | ä¾å­˜ãªã— | +| 0.2.1 | Spark 3.2 | ä¾å­˜ãªã— | +| 0.1.2 | Spark 3.2 | ä¾å­˜ãªã— | + +### ライブラリã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ + +ãƒã‚¤ãƒŠãƒªJARã®åå‰ãƒ‘ターンã¯ï¼š + +``` +clickhouse-spark-runtime-${spark_binary_version}_${scala_binary_version}-${version}.jar +``` + +ã™ã¹ã¦ã®ãƒªãƒªãƒ¼ã‚¹ã•ã‚ŒãŸJARã¯[Maven Central Repository](https://repo1.maven.org/maven2/com/clickhouse/spark/)ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã€ã™ã¹ã¦ã®ãƒ‡ã‚¤ãƒªãƒ¼ãƒ“ルドã®SNAPSHOT JARã¯[Sonatype OSS Snapshots Repository](https://s01.oss.sonatype.org/content/repositories/snapshots/com/clickhouse/)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +### ä¾å­˜é–¢ä¿‚ã¨ã—ã¦ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +#### Gradle + +``` +dependencies { + implementation("com.clickhouse.spark:clickhouse-spark-runtime-{{ spark_binary_version }}_{{ scala_binary_version }}:{{ stable_version }}") + implementation("com.clickhouse:clickhouse-jdbc:{{ clickhouse_jdbc_version }}:all") { transitive = false } +} +``` + +SNAPSHOTãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ãŸã„å ´åˆã¯ã€æ¬¡ã®ãƒªãƒã‚¸ãƒˆãƒªã‚’追加ã—ã¾ã™ï¼š + +``` +repositories { + maven { url = "https://s01.oss.sonatype.org/content/repositories/snapshots" } +} +``` + +#### Maven + +``` + + com.clickhouse.spark + clickhouse-spark-runtime-{{ spark_binary_version }}_{{ scala_binary_version }} + {{ stable_version }} + + + com.clickhouse + clickhouse-jdbc + all + {{ clickhouse_jdbc_version }} + + + * + * + + + +``` + +SNAPSHOTãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ãŸã„å ´åˆã¯ã€æ¬¡ã®ãƒªãƒã‚¸ãƒˆãƒªã‚’追加ã—ã¾ã™ã€‚ + +``` + + + sonatype-oss-snapshots + Sonatype OSS Snapshots Repository + https://s01.oss.sonatype.org/content/repositories/snapshots + + +``` + +## Spark SQLã§éŠã¶ + +注æ„:SQLã®ã¿ã®ä½¿ç”¨ä¾‹ã«å¯¾ã—ã¦ã¯ã€[Apache Kyuubi](https://github.com/apache/kyuubi)を本番環境ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +### Spark SQL CLIã®èµ·å‹• + +```shell +$SPARK_HOME/bin/spark-sql \ + --conf spark.sql.catalog.clickhouse=com.clickhouse.spark.ClickHouseCatalog \ + --conf spark.sql.catalog.clickhouse.host=${CLICKHOUSE_HOST:-127.0.0.1} \ + --conf spark.sql.catalog.clickhouse.protocol=http \ + --conf spark.sql.catalog.clickhouse.http_port=${CLICKHOUSE_HTTP_PORT:-8123} \ + --conf spark.sql.catalog.clickhouse.user=${CLICKHOUSE_USER:-default} \ + --conf spark.sql.catalog.clickhouse.password=${CLICKHOUSE_PASSWORD:-} \ + --conf spark.sql.catalog.clickhouse.database=default \ + --jars /path/clickhouse-spark-runtime-{{ spark_binary_version }}_{{ scala_binary_version }}:{{ stable_version }}.jar,/path/clickhouse-jdbc-{{ clickhouse_jdbc_version }}-all.jar +``` + +次ã®å¼•æ•° + +``` + --jars /path/clickhouse-spark-runtime-{{ spark_binary_version }}_{{ scala_binary_version }}:{{ stable_version }}.jar,/path/clickhouse-jdbc-{{ clickhouse_jdbc_version }}-all.jar +``` + +ã¯æ¬¡ã®ã‚ˆã†ã«ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ + +``` + --repositories https://{maven-cental-mirror or private-nexus-repo} \ + --packages com.clickhouse.spark:clickhouse-spark-runtime-{{ spark_binary_version }}_{{ scala_binary_version }}:{{ stable_version }},com.clickhouse:clickhouse-jdbc:{{ clickhouse_jdbc_version }}:all +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€JARã‚’Sparkクライアントノードã«ã‚³ãƒ”ーã™ã‚‹å¿…è¦ãŒãªããªã‚Šã¾ã™ã€‚ + +## æ“作 + +基本的ãªæ“作ã€ä¾‹ãˆã°ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ä½œæˆã€ãƒ†ãƒ¼ãƒ–ルã®ä½œæˆã€ãƒ†ãƒ¼ãƒ–ルã¸ã®æ›¸ãè¾¼ã¿ã€ãƒ†ãƒ¼ãƒ–ルã®èª­ã¿è¾¼ã¿ãªã©ã€‚ + +``` +spark-sql> use clickhouse; +Time taken: 0.016 seconds + +spark-sql> create database if not exists test_db; +Time taken: 0.022 seconds + +spark-sql> show databases; +default +system +test_db +Time taken: 0.289 seconds, Fetched 3 row(s) + +spark-sql> CREATE TABLE test_db.tbl_sql ( + > create_time TIMESTAMP NOT NULL, + > m INT NOT NULL COMMENT 'part key', + > id BIGINT NOT NULL COMMENT 'sort key', + > value STRING + > ) USING ClickHouse + > PARTITIONED BY (m) + > TBLPROPERTIES ( + > engine = 'MergeTree()', + > order_by = 'id', + > settings.index_granularity = 8192 + > ); +Time taken: 0.242 seconds + +spark-sql> insert into test_db.tbl_sql values + > (timestamp'2021-01-01 10:10:10', 1, 1L, '1'), + > (timestamp'2022-02-02 10:10:10', 2, 2L, '2') + > as tabl(create_time, m, id, value); +Time taken: 0.276 seconds + +spark-sql> select * from test_db.tbl_sql; +2021-01-01 10:10:10 1 1 1 +2022-02-02 10:10:10 2 2 2 +Time taken: 0.116 seconds, Fetched 2 row(s) + +spark-sql> insert into test_db.tbl_sql select * from test_db.tbl_sql; +Time taken: 1.028 seconds + +spark-sql> insert into test_db.tbl_sql select * from test_db.tbl_sql; +Time taken: 0.462 seconds + +spark-sql> select count(*) from test_db.tbl_sql; +6 +Time taken: 1.421 seconds, Fetched 1 row(s) + +spark-sql> select * from test_db.tbl_sql; +2021-01-01 10:10:10 1 1 1 +2021-01-01 10:10:10 1 1 1 +2021-01-01 10:10:10 1 1 1 +2022-02-02 10:10:10 2 2 2 +2022-02-02 10:10:10 2 2 2 +2022-02-02 10:10:10 2 2 2 +Time taken: 0.123 seconds, Fetched 6 row(s) + +spark-sql> delete from test_db.tbl_sql where id = 1; +Time taken: 0.129 seconds + +spark-sql> select * from test_db.tbl_sql; +2022-02-02 10:10:10 2 2 2 +2022-02-02 10:10:10 2 2 2 +2022-02-02 10:10:10 2 2 2 +Time taken: 0.101 seconds, Fetched 3 row(s) +``` + +## Spark Shellã§éŠã¶ + +### Spark Shellã®èµ·å‹• + +```shell +$SPARK_HOME/bin/spark-shell \ + --conf spark.sql.catalog.clickhouse=com.clickhouse.spark.ClickHouseCatalog \ + --conf spark.sql.catalog.clickhouse.host=${CLICKHOUSE_HOST:-127.0.0.1} \ + --conf spark.sql.catalog.clickhouse.protocol=http \ + --conf spark.sql.catalog.clickhouse.http_port=${CLICKHOUSE_HTTP_PORT:-8123} \ + --conf spark.sql.catalog.clickhouse.user=${CLICKHOUSE_USER:-default} \ + --conf spark.sql.catalog.clickhouse.password=${CLICKHOUSE_PASSWORD:-} \ + --conf spark.sql.catalog.clickhouse.database=default \ + --jars /path/clickhouse-spark-runtime-{{ spark_binary_version }}_{{ scala_binary_version }}:{{ stable_version }}.jar,/path/clickhouse-jdbc-{{ clickhouse_jdbc_version }}-all.jar +``` + +次ã®å¼•æ•° + +``` + --jars /path/clickhouse-spark-runtime-{{ spark_binary_version }}_{{ scala_binary_version }}:{{ stable_version }}.jar,/path/clickhouse-jdbc-{{ clickhouse_jdbc_version }}-all.jar +``` + +ã¯æ¬¡ã®ã‚ˆã†ã«ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ + +``` + --repositories https://{maven-cental-mirror or private-nexus-repo} \ + --packages com.clickhouse.spark:clickhouse-spark-runtime-{{ spark_binary_version }}_{{ scala_binary_version }}:{{ stable_version }},com.clickhouse:clickhouse-jdbc:{{ clickhouse_jdbc_version }}:all +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€JARã‚’Sparkクライアントノードã«ã‚³ãƒ”ーã™ã‚‹å¿…è¦ãŒãªããªã‚Šã¾ã™ã€‚ + +### æ“作 + +基本的ãªæ“作ã€ä¾‹ãˆã°ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ä½œæˆã€ãƒ†ãƒ¼ãƒ–ルã®ä½œæˆã€ãƒ†ãƒ¼ãƒ–ルã¸ã®æ›¸ãè¾¼ã¿ã€ãƒ†ãƒ¼ãƒ–ルã®èª­ã¿è¾¼ã¿ãªã©ã€‚ + +``` +scala> spark.sql("use clickhouse") +res0: org.apache.spark.sql.DataFrame = [] + +scala> spark.sql("create database test_db") +res1: org.apache.spark.sql.DataFrame = [] + +scala> spark.sql("show databases").show ++---------+ +|namespace| ++---------+ +| default| +| system| +| test_db| ++---------+ + +scala> spark.sql(""" + | CREATE TABLE test_db.tbl ( + | create_time TIMESTAMP NOT NULL, + | m INT NOT NULL COMMENT 'part key', + | id BIGINT NOT NULL COMMENT 'sort key', + | value STRING + | ) USING ClickHouse + | PARTITIONED BY (m) + | TBLPROPERTIES ( + | engine = 'MergeTree()', + | order_by = 'id', + | settings.index_granularity = 8192 + | ) + | """) +res2: org.apache.spark.sql.DataFrame = [] + +scala> :paste +// Pasteモードã«å…¥ã‚Šã¾ã™ï¼ˆctrl-Dã§çµ‚了) + +spark.createDataFrame(Seq( + ("2021-01-01 10:10:10", 1L, "1"), + ("2022-02-02 10:10:10", 2L, "2") +)).toDF("create_time", "id", "value") + .withColumn("create_time", to_timestamp($"create_time")) + .withColumn("m", month($"create_time")) + .select($"create_time", $"m", $"id", $"value") + .writeTo("test_db.tbl") + .append + +// Pasteモードを終了ã—ã€ç¾åœ¨è§£é‡ˆä¸­ã§ã™ã€‚ + +scala> spark.table("test_db.tbl").show ++-------------------+---+---+-----+ +| create_time| m| id|value| ++-------------------+---+---+-----+ +|2021-01-01 10:10:10| 1| 1| 1| +|2022-02-02 10:10:10| 2| 2| 2| ++-------------------+---+---+-----+ + +scala> spark.sql("DELETE FROM test_db.tbl WHERE id=1") +res3: org.apache.spark.sql.DataFrame = [] + +scala> spark.table("test_db.tbl").show ++-------------------+---+---+-----+ +| create_time| m| id|value| ++-------------------+---+---+-----+ +|2022-02-02 10:10:10| 2| 2| 2| ++-------------------+---+---+-----+ +``` + +ClickHouseã®ãƒã‚¤ãƒ†ã‚£ãƒ–SQLを実行ã—ã¾ã™ã€‚ + +``` +scala> val options = Map( + | "host" -> "clickhouse", + | "protocol" -> "http", + | "http_port" -> "8123", + | "user" -> "default", + | "password" -> "" + | ) + +scala> val sql = """ + | |CREATE TABLE test_db.person ( + | | id Int64, + | | name String, + | | age Nullable(Int32) + | |) + | |ENGINE = MergeTree() + | |ORDER BY id + | """.stripMargin + +scala> spark.executeCommand("com.clickhouse.spark.ClickHouseCommandRunner", sql, options) + +scala> spark.sql("show tables in clickhouse_s1r1.test_db").show ++---------+---------+-----------+ +|namespace|tableName|isTemporary| ++---------+---------+-----------+ +| test_db| person| false| ++---------+---------+-----------+ + +scala> spark.table("clickhouse_s1r1.test_db.person").printSchema +root + |-- id: long (nullable = false) + |-- name: string (nullable = false) + |-- age: integer (nullable = true) +``` + +## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型 + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€Sparkã¨ClickHouseé–“ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒžãƒƒãƒ”ングã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚以下ã®è¡¨ã¯ã€ClickHouseã‹ã‚‰Sparkã«ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹éš›ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®å¤‰æ›ã‚„ã€Sparkã‹ã‚‰ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹éš›ã®å¤‰æ›ã®ã‚¯ã‚¤ãƒƒã‚¯ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ + +### ClickHouseã‹ã‚‰Sparkã¸ã®ãƒ‡ãƒ¼ã‚¿èª­ã¿è¾¼ã¿ + +| ClickHouse データ型 | Spark データ型 | サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ | プリミティブ㋠| メモ | +|-----------------------------------------------------------------|-------------------------------|-------------------|--------------|-------------------------------------------| +| `Nothing` | `NullType` | ✅ | Yes | | +| `Bool` | `BooleanType` | ✅ | Yes | | +| `UInt8`, `Int16` | `ShortType` | ✅ | Yes | | +| `Int8` | `ByteType` | ✅ | Yes | | +| `UInt16`,`Int32` | `IntegerType` | ✅ | Yes | | +| `UInt32`,`Int64`, `UInt64` | `LongType` | ✅ | Yes | | +| `Int128`,`UInt128`, `Int256`, `UInt256` | `DecimalType(38, 0)` | ✅ | Yes | | +| `Float32` | `FloatType` | ✅ | Yes | | +| `Float64` | `DoubleType` | ✅ | Yes | | +| `String`, `JSON`, `UUID`, `Enum8`, `Enum16`, `IPv4`, `IPv6` | `StringType` | ✅ | Yes | | +| `FixedString` | `BinaryType`, `StringType` | ✅ | Yes | 設定 `READ_FIXED_STRING_AS` ã§åˆ¶å¾¡ã•ã‚Œã¾ã™ | +| `Decimal` | `DecimalType` | ✅ | Yes | 精度ã¨ã‚¹ã‚±ãƒ¼ãƒ«ã¯ `Decimal128` ã¾ã§å¯èƒ½ | +| `Decimal32` | `DecimalType(9, scale)` | ✅ | Yes | | +| `Decimal64` | `DecimalType(18, scale)` | ✅ | Yes | | +| `Decimal128` | `DecimalType(38, scale)` | ✅ | Yes | | +| `Date`, `Date32` | `DateType` | ✅ | Yes | | +| `DateTime`, `DateTime32`, `DateTime64` | `TimestampType` | ✅ | Yes | | +| `Array` | `ArrayType` | ✅ | No | é…列è¦ç´ ã®åž‹ã‚‚変æ›ã•ã‚Œã¾ã™ | +| `Map` | `MapType` | ✅ | No | キー㯠`StringType` ã«åˆ¶é™ã•ã‚Œã¾ã™ | +| `IntervalYear` | `YearMonthIntervalType(Year)` | ✅ | Yes | | +| `IntervalMonth` | `YearMonthIntervalType(Month)`| ✅ | Yes | | +| `IntervalDay`, `IntervalHour`, `IntervalMinute`, `IntervalSecond`| `DayTimeIntervalType` | ✅ | No | 特定ã®é–“隔型ãŒä½¿ç”¨ã•ã‚Œã¾ã™ | +| `Object` | | ⌠| | | +| `Nested` | | ⌠| | | +| `Tuple` | | ⌠| | | +| `Point` | | ⌠| | | +| `Polygon` | | ⌠| | | +| `MultiPolygon` | | ⌠| | | +| `Ring` | | ⌠| | | +| `IntervalQuarter` | | ⌠| | | +| `IntervalWeek` | | ⌠| | | +| `Decimal256` | | ⌠| | | +| `AggregateFunction` | | ⌠| | | +| `SimpleAggregateFunction` | | ⌠| | | + +### Sparkã‹ã‚‰ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ + +| Spark データ型 | ClickHouse データ型 | サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ | プリミティブ㋠| メモ | +|--------------------------------------|--------------------|-------------------|--------------|--------------------------------------| +| `BooleanType` | `UInt8` | ✅ | Yes | | +| `ByteType` | `Int8` | ✅ | Yes | | +| `ShortType` | `Int16` | ✅ | Yes | | +| `IntegerType` | `Int32` | ✅ | Yes | | +| `LongType` | `Int64` | ✅ | Yes | | +| `FloatType` | `Float32` | ✅ | Yes | | +| `DoubleType` | `Float64` | ✅ | Yes | | +| `StringType` | `String` | ✅ | Yes | | +| `VarcharType` | `String` | ✅ | Yes | | +| `CharType` | `String` | ✅ | Yes | | +| `DecimalType` | `Decimal(p, s)` | ✅ | Yes | 精度ã¨ã‚¹ã‚±ãƒ¼ãƒ«ã¯ `Decimal128` ã¾ã§å¯èƒ½| +| `DateType` | `Date` | ✅ | Yes | | +| `TimestampType` | `DateTime` | ✅ | Yes | | +| `ArrayType` (リストã€ã‚¿ãƒ—ルã€é…列) | `Array` | ✅ | No | é…列è¦ç´ ã®åž‹ã‚‚変æ›ã•ã‚Œã¾ã™ | +| `MapType` | `Map` | ✅ | No | キー㯠`StringType` ã«åˆ¶é™ã•ã‚Œã¾ã™ | +| `Object` | | ⌠| | | +| `Nested` | | ⌠| | | + +## Spark JDBC + +Sparkã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータソースã®ä¸­ã§æœ€ã‚‚よã使ã‚れるã®ãŒJDBCã§ã™ã€‚ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€Sparkã§[ClickHouseå…¬å¼JDBCコãƒã‚¯ã‚¿](https://github.com/ClickHouse/clickhouse-java)を使用ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦è©³ã—ã説明ã—ã¾ã™ã€‚ + +### データã®èª­ã¿è¾¼ã¿ + +```java +public static void main(String[] args) { + // Sparkセッションã®åˆæœŸåŒ– + SparkSession spark = SparkSession.builder().appName("example").master("local").getOrCreate(); + + // JDBC接続ã®è©³ç´° + String jdbcUrl = "jdbc:ch://localhost:8123/default"; + Properties jdbcProperties = new Properties(); + jdbcProperties.put("user", "default"); + jdbcProperties.put("password", "123456"); + + // ClickHouseã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルを読ã¿è¾¼ã‚€ + Dataset df = spark.read().jdbc(jdbcUrl, "example_table", jdbcProperties); + + // DataFrameを表示ã™ã‚‹ + df.show(); + + // Sparkセッションをåœæ­¢ã™ã‚‹ + spark.stop(); + } +``` + +### データã®æ›¸ã込㿠+ +:::important +ç¾æ™‚点ã§ã¯ã€JDBCを使用ã—ã¦æ—¢å­˜ã®ãƒ†ãƒ¼ãƒ–ルã«ã®ã¿ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã§ãã¾ã™ã€‚ +::: + +```java + public static void main(String[] args) { + // Sparkセッションã®åˆæœŸåŒ– + SparkSession spark = SparkSession.builder().appName("example").master("local").getOrCreate(); + + // JDBC接続ã®è©³ç´° + String jdbcUrl = "jdbc:ch://localhost:8123/default"; + Properties jdbcProperties = new Properties(); + jdbcProperties.put("user", "default"); + jdbcProperties.put("password", "******"); + // サンプルDataFrameã®ä½œæˆ + StructType schema = new StructType(new StructField[]{ + DataTypes.createStructField("id", DataTypes.IntegerType, false), + DataTypes.createStructField("name", DataTypes.StringType, false) + }); + + List rows = new ArrayList(); + rows.add(RowFactory.create(1, "John")); + rows.add(RowFactory.create(2, "Doe")); + + Dataset df = spark.createDataFrame(rows, schema); + + df.write() + .mode(SaveMode.Append) + .jdbc(jdbcUrl, "my_table", jdbcProperties); + // DataFrameを表示ã™ã‚‹ + df.show(); + + // Sparkセッションをåœæ­¢ã™ã‚‹ + spark.stop(); + } +``` + + + +:::important +Spark JDBCを使用ã™ã‚‹å ´åˆã€Sparkã¯å˜ä¸€ãƒ‘ーティションã§ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚より高ã„並行性をé”æˆã™ã‚‹ã«ã¯ã€`partitionColumn`ã€`lowerBound`ã€`upperBound`ã€`numPartitions`を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã¯ã€è¤‡æ•°ã®ãƒ¯ãƒ¼ã‚«ãƒ¼ã‹ã‚‰ä¸¦è¡Œã—ã¦èª­ã¿å–ã‚‹éš›ã®ãƒ†ãƒ¼ãƒ–ル分割を説明ã—ã¾ã™ã€‚より詳細ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€Apache Sparkã®å…¬å¼ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§[JDBC構æˆ](https://spark.apache.org/docs/latest/sql-data-sources-jdbc.html#data-source-option)ã‚’ã”確èªãã ã•ã„。 +::: + diff --git a/docs/ja/integrations/data-ingestion/aws-glue/index.md b/docs/ja/integrations/data-ingestion/aws-glue/index.md new file mode 100644 index 00000000000..6d5b742f9a9 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/aws-glue/index.md @@ -0,0 +1,57 @@ +--- +sidebar_label: Amazon Glue +sidebar_position: 1 +slug: /ja/integrations/glue +description: ClickHouseã¨Amazon Glueã®çµ±åˆ +keywords: [ clickhouse, amazon, aws, glue, データ移行, data ] +--- + +# ClickHouseã¨Amazon Glueã®çµ±åˆ + +[Amazon Glue](https://aws.amazon.com/glue/)ã¯ã€Amazon Web Services (AWS)ãŒæä¾›ã™ã‚‹å®Œå…¨ã«ç®¡ç†ã•ã‚ŒãŸã‚µãƒ¼ãƒãƒ¼ãƒ¬ã‚¹ã®ãƒ‡ãƒ¼ã‚¿çµ±åˆã‚µãƒ¼ãƒ“スã§ã™ã€‚ã“ã‚Œã¯ã€åˆ†æžã€æ©Ÿæ¢°å­¦ç¿’ã€ã‚¢ãƒ—リケーション開発ã®ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ã®ç™ºè¦‹ã€æº–å‚™ã€ãŠã‚ˆã³å¤‰æ›ã®ãƒ—ロセスを簡素化ã—ã¾ã™ã€‚ + +ç¾åœ¨ã®ã¨ã“ã‚ã€Glue用ã®ClickHouseコãƒã‚¯ã‚¿ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“ãŒã€å…¬å¼ã®JDBCコãƒã‚¯ã‚¿ã‚’利用ã—ã¦ClickHouseã¨æŽ¥ç¶šãŠã‚ˆã³çµ±åˆã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™: + +```java +import com.amazonaws.services.glue.util.Job +import com.amazonaws.services.glue.util.GlueArgParser +import com.amazonaws.services.glue.GlueContext +import org.apache.spark.SparkContext +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.DataFrame +import scala.collection.JavaConverters._ +import com.amazonaws.services.glue.log.GlueLogger + + +// Glueジョブã®åˆæœŸåŒ– +object GlueJob { + def main(sysArgs: Array[String]) { + val sc: SparkContext = new SparkContext() + val glueContext: GlueContext = new GlueContext(sc) + val spark: SparkSession = glueContext.getSparkSession + val logger = new GlueLogger + import spark.implicits._ + // @params: [JOB_NAME] + val args = GlueArgParser.getResolvedOptions(sysArgs, Seq("JOB_NAME").toArray) + Job.init(args("JOB_NAME"), glueContext, args.asJava) + + // JDBC接続ã®è©³ç´° + val jdbcUrl = "jdbc:ch://{host}:{port}/{schema}" + val jdbcProperties = new java.util.Properties() + jdbcProperties.put("user", "default") + jdbcProperties.put("password", "*******") + jdbcProperties.put("driver", "com.clickhouse.jdbc.ClickHouseDriver") + + // ClickHouseã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルをロード + val df: DataFrame = spark.read.jdbc(jdbcUrl, "my_table", jdbcProperties) + + // Spark dfを表示ã€ã‚‚ã—ãã¯ä»–ã®ç”¨é€”ã«ä½¿ç”¨ + df.show() + + // ジョブをコミット + Job.commit() + } +} +``` + +詳細ã«ã¤ã„ã¦ã¯ã€[Spark & JDBC ドキュメント](/ja/integrations/apache-spark#read-data)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/integrations/data-ingestion/clickpipes/assets/static-ips.json b/docs/ja/integrations/data-ingestion/clickpipes/assets/static-ips.json new file mode 100644 index 00000000000..5d196b7a8fe --- /dev/null +++ b/docs/ja/integrations/data-ingestion/clickpipes/assets/static-ips.json @@ -0,0 +1 @@ +{"aws":[{"region":"eu-central-1","ips":["18.195.233.217","3.127.86.90","35.157.23.2","18.197.167.47","3.122.25.29","52.28.148.40"]},{"region":"us-east-1","ips":["54.82.38.199","3.90.133.29","52.5.177.8","3.227.227.145","3.216.6.184","54.84.202.92","3.131.130.196","3.23.172.68","3.20.208.150"]},{"region":"us-east-2","ips":["3.131.130.196","3.23.172.68","3.20.208.150","3.132.20.192","18.119.76.110","3.134.185.180"]}]} \ No newline at end of file diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/clickpipes_stack.png b/docs/ja/integrations/data-ingestion/clickpipes/images/clickpipes_stack.png new file mode 100644 index 00000000000..7f08f2c1d00 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/clickpipes_stack.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_custom_role.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_custom_role.png new file mode 100644 index 00000000000..507fdd441a3 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_custom_role.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_destination.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_destination.png new file mode 100644 index 00000000000..64b4a314e63 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_destination.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_final_table.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_final_table.png new file mode 100644 index 00000000000..7ca20e781fb Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_final_table.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_overview.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_overview.png new file mode 100644 index 00000000000..91cd2eb5e11 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_overview.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_remove.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_remove.png new file mode 100644 index 00000000000..52423d812c5 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_remove.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_service.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_service.png new file mode 100644 index 00000000000..fa1fc69e813 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_service.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step0.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step0.png new file mode 100644 index 00000000000..af048c35486 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step0.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step1.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step1.png new file mode 100644 index 00000000000..ca08187adf8 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step1.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step2.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step2.png new file mode 100644 index 00000000000..492a057d54f Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step2.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step2_kinesis.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step2_kinesis.png new file mode 100644 index 00000000000..59ab4ac7165 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step2_kinesis.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step2_object_storage.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step2_object_storage.png new file mode 100644 index 00000000000..4a9d370c3de Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step2_object_storage.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step3.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step3.png new file mode 100644 index 00000000000..85c2a7b78d8 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step3.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step3_kinesis.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step3_kinesis.png new file mode 100644 index 00000000000..53eb2b11b49 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step3_kinesis.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step3_object_storage.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step3_object_storage.png new file mode 100644 index 00000000000..ef1ad26498f Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step3_object_storage.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4a.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4a.png new file mode 100644 index 00000000000..c260d7980a1 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4a.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4a2.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4a2.png new file mode 100644 index 00000000000..e68b467da2a Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4a2.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4a3.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4a3.png new file mode 100644 index 00000000000..72c78dbc64c Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4a3.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4b.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4b.png new file mode 100644 index 00000000000..b6189385511 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step4b.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step5.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step5.png new file mode 100644 index 00000000000..893daa81325 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_step5.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_success.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_success.png new file mode 100644 index 00000000000..1736d54c4e4 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_success.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/cp_table.png b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_table.png new file mode 100644 index 00000000000..7dbd0f9f488 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/cp_table.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/schema_registry_setup.png b/docs/ja/integrations/data-ingestion/clickpipes/images/schema_registry_setup.png new file mode 100644 index 00000000000..8be306e2230 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/schema_registry_setup.png differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/images/securekinesis.jpg b/docs/ja/integrations/data-ingestion/clickpipes/images/securekinesis.jpg new file mode 100644 index 00000000000..ec3d716508d Binary files /dev/null and b/docs/ja/integrations/data-ingestion/clickpipes/images/securekinesis.jpg differ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/index.md b/docs/ja/integrations/data-ingestion/clickpipes/index.md new file mode 100644 index 00000000000..2bab15746f9 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/clickpipes/index.md @@ -0,0 +1,82 @@ +--- +sidebar_label: ã¯ã˜ã‚ã« +description: 外部データソースをClickHouse Cloudã«ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ã«æŽ¥ç¶šã—ã¾ã™ã€‚ +slug: /ja/integrations/clickpipes +--- + +import KafkaSVG from "../../images/logos/kafka.svg"; +import ConfluentSVG from "../../images/logos/confluent.svg"; +import MskSVG from "../../images/logos/msk.svg"; +import AzureEventHubsSVG from "../../images/logos/azure_event_hubs.svg"; +import WarpStreamSVG from "../../images/logos/warpstream.svg"; +import S3SVG from "../../images/logos/amazon_s3_logo.svg"; +import AmazonKinesis from "../../images/logos/amazon_kinesis_logo.svg"; +import GCSSVG from "../../images/logos/gcs.svg"; + +# ClickHouse Cloudã¨ã®çµ±åˆ + +## ã¯ã˜ã‚ã« + +[ClickPipes](https://clickhouse.com/cloud/clickpipes)ã¯ã€ã•ã¾ã–ã¾ãªã‚½ãƒ¼ã‚¹ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’ã‚ãšã‹æ•°ã‚¯ãƒªãƒƒã‚¯ã§å–り込むã“ã¨ã‚’å¯èƒ½ã«ã™ã‚‹ç®¡ç†ã•ã‚ŒãŸçµ±åˆãƒ—ラットフォームã§ã™ã€‚最もè¦æ±‚ã®åŽ³ã—ã„ワークロードå‘ã‘ã«è¨­è¨ˆã•ã‚ŒãŸClickPipesã®å …牢ã§ã‚¹ã‚±ãƒ¼ãƒ©ãƒ–ルãªã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã¯ã€ä¸€è²«ã—ãŸãƒ‘フォーマンスã¨ä¿¡é ¼æ€§ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ClickPipesã¯ã€é•·æœŸçš„ãªã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‹ãƒ¼ã‚ºã«ã‚‚ã€ä¸€åº¦ãã‚Šã®ãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚¸ãƒ§ãƒ–ã«ã‚‚使用ã§ãã¾ã™ã€‚ + +![ClickPipesスタック](./images/clickpipes_stack.png) + +## 対応データソース + +|åå‰|ロゴ|タイプ|ステータス|説明| +|----|----|----|------|-----------| +|Apache Kafka||ストリーミング|安定|ClickPipesを設定ã—ã€Apache Kafkaã‹ã‚‰ClickHouse Cloudã¸ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã®å–ã‚Šè¾¼ã¿ã‚’開始ã—ã¾ã™ã€‚| +|Confluent Cloud||ストリーミング|安定|Confluentã¨ClickHouse Cloudã®ç›´æŽ¥çµ±åˆã«ã‚ˆã‚Šã€ä¸¡è€…ã®çµ„ã¿åˆã‚ã›ã®åŠ›ã‚’引ã出ã—ã¾ã™ã€‚| +|Redpanda|Redpanda logo|ストリーミング|安定|ClickPipesを設定ã—ã€RedPandaã‹ã‚‰ClickHouse Cloudã¸ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã®å–ã‚Šè¾¼ã¿ã‚’開始ã—ã¾ã™ã€‚| +|AWS MSK||ストリーミング|安定|ClickPipesを設定ã—ã€AWS MSKã‹ã‚‰ClickHouse Cloudã¸ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã®å–ã‚Šè¾¼ã¿ã‚’開始ã—ã¾ã™ã€‚| +|Azure Event Hubs||ストリーミング|安定|ClickPipesを設定ã—ã€Azure Event Hubsã‹ã‚‰ClickHouse Cloudã¸ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã®å–ã‚Šè¾¼ã¿ã‚’開始ã—ã¾ã™ã€‚| +|WarpStream||ストリーミング|安定|ClickPipesを設定ã—ã€WarpStreamã‹ã‚‰ClickHouse Cloudã¸ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã®å–ã‚Šè¾¼ã¿ã‚’開始ã—ã¾ã™ã€‚| +|Amazon S3||オブジェクトストレージ|安定|ClickPipesを設定ã—ã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’オブジェクトストレージã‹ã‚‰å–ã‚Šè¾¼ã¿ã¾ã™ã€‚| +|Google Cloud Storage||オブジェクトストレージ|安定|ClickPipesを設定ã—ã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’オブジェクトストレージã‹ã‚‰å–ã‚Šè¾¼ã¿ã¾ã™ã€‚| +|Amazon Kinesis||ストリーミング|安定|ClickPipesを設定ã—ã€Amazon Kinesisã‹ã‚‰ClickHouse Cloudã¸ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã®å–ã‚Šè¾¼ã¿ã‚’開始ã—ã¾ã™ã€‚| + +ClickPipesã«ã¯ã•ã‚‰ã«å¤šãã®ã‚³ãƒã‚¯ã‚¿ãŒè¿½åŠ ã•ã‚Œã¾ã™ã®ã§ã€è©³ç´°ã¯[ãŠå•ã„åˆã‚ã›ãã ã•ã„](https://clickhouse.com/company/contact?loc=clickpipes)。 + +## 固定IPリスト + +以下ã¯ã€ClickPipesãŒå„地域ã®Kafkaブローカーã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹å›ºå®šNAT IPã§ã™ã€‚ +関連ã™ã‚‹ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®åœ°åŸŸIPã‚’IP許å¯ãƒªã‚¹ãƒˆã«è¿½åŠ ã—ã¦ã€ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’許å¯ã—ã¦ãã ã•ã„。 +インスタンス地域ãŒã“ã“ã«ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®åœ°åŸŸã«ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ã¾ã™ã€‚ + +- EU地域用㮠**eu-central-1** +- `us-east-1` インスタンス用㮠**us-east-1** +- ä»–ã®ã™ã¹ã¦ã®åœ°åŸŸç”¨ã® **us-east-2** + +| ClickHouse Cloud 地域 | IPアドレス | +|-----------------------|------------| +| **eu-central-1** | `18.195.233.217`, `3.127.86.90`, `35.157.23.2`, `18.197.167.47`, `3.122.25.29`, `52.28.148.40` | +| **us-east-2** | `3.131.130.196`, `3.23.172.68`, `3.20.208.150`, `3.132.20.192`, `18.119.76.110`, `3.134.185.180` | +| **us-east-1** | `54.82.38.199`, `3.90.133.29`, `52.5.177.8`, `3.227.227.145`, `3.216.6.184`, `54.84.202.92`, `3.131.130.196`, `3.23.172.68`, `3.20.208.150` | + +## ClickHouse設定ã®èª¿æ•´ +ClickHouse Cloudã¯ã€ã»ã¨ã‚“ã©ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«å¯¾å¿œã™ã‚‹ãŸã‚ã®é©åˆ‡ãªãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚ãŸã ã—ã€ClickPipesã®ãŸã‚ã«ç‰¹å®šã®ClickHouse設定を調整ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ClickPipes専用ã®ãƒ­ãƒ¼ãƒ«ã‚’作æˆã™ã‚‹ã“ã¨ãŒæœ€ã‚‚柔軟ãªè§£æ±ºç­–ã§ã™ã€‚ +ステップ: +1. カスタムロールを作æˆã—ã¾ã™ `CREATE ROLE my_clickpipes_role SETTINGS ...`。詳細ã«ã¤ã„ã¦ã¯[CREATE ROLE](/docs/ja/sql-reference/statements/create/role.md)文法をå‚ç…§ã—ã¦ãã ã•ã„。 +2. ClickPipes作æˆæ™‚ã®`Details and Settings`ステップã§ã€ClickPipesユーザーã«ã‚«ã‚¹ã‚¿ãƒ ãƒ­ãƒ¼ãƒ«ã‚’追加ã—ã¾ã™ã€‚ +![カスタムロールを割り当ã¦ã‚‹](./images/cp_custom_role.png) + +## エラーレãƒãƒ¼ãƒˆ +ClickPipesã¯ã€å®›å…ˆãƒ†ãƒ¼ãƒ–ルã®éš£ã«`_clickpipes_error`ã¨ã„ã†æŽ¥å°¾è¾žã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€ClickPipeã®æ“作(ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã€æŽ¥ç¶šæ€§ãªã©ï¼‰ã‹ã‚‰ã®ã‚¨ãƒ©ãƒ¼ã‚„ã€ã‚¹ã‚­ãƒ¼ãƒžã«é©åˆã—ãªã„データãŒå«ã¾ã‚Œã¾ã™ã€‚エラーテーブルã«ã¯7日間ã®[æœ‰åŠ¹æœŸé™ (TTL)](https://clickhouse.com/docs/ja/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-ttl)ãŒã‚ã‚Šã¾ã™ã€‚ +ClickPipesãŒ15分間ソースã¾ãŸã¯å®›å…ˆã«æŽ¥ç¶šã§ããªã„å ´åˆã€ClickPipesインスタンスã¯åœæ­¢ã—ã€ã‚¨ãƒ©ãƒ¼ãƒ†ãƒ¼ãƒ–ルã«é©åˆ‡ãªãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ä¿å­˜ã—ã¾ã™ï¼ˆClickHouseインスタンスãŒåˆ©ç”¨å¯èƒ½ãªå ´åˆï¼‰ã€‚ + +## よãã‚ã‚‹è³ªå• +- **ClickPipesã¨ã¯ä½•ã§ã™ã‹ï¼Ÿ** + + ClickPipesã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒClickHouseサービスを外部データソースã€ç‰¹ã«Kafkaã«ç°¡å˜ã«æŽ¥ç¶šã§ãるよã†ã«ã™ã‚‹ClickHouse Cloudã®æ©Ÿèƒ½ã§ã™ã€‚Kafkaå‘ã‘ã®ClickPipesを使用ã™ã‚‹ã“ã¨ã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’継続的ã«ãƒ­ãƒ¼ãƒ‰ã—ã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ åˆ†æžç”¨ã«åˆ©ç”¨å¯èƒ½ã«ã—ã¾ã™ã€‚ + +- **ClickPipesã¯ãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã‹ï¼Ÿ** + + ã¯ã„ã€ClickPipesã¯DDL作æˆã‚’公開ã™ã‚‹ã“ã¨ã§åŸºæœ¬çš„ãªãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ãã®å¾Œã€ClickHouse Cloudサービスã®å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹éš›ã«ã€ClickHouseã®[マテリアライズドビューã®æ©Ÿèƒ½](https://clickhouse.com/docs/ja/guides/developer/cascading-materialized-views)を活用ã—ã¦ã€ã‚ˆã‚Šé«˜åº¦ãªå¤‰æ›ã‚’é©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- **ClickPipesã®ä½¿ç”¨ã«ã¯è¿½åŠ ã®ã‚³ã‚¹ãƒˆãŒã‹ã‹ã‚Šã¾ã™ã‹ï¼Ÿ** + + ç¾åœ¨ã€ClickPipesã¯åˆ¥é€”請求ã•ã‚Œã¦ã„ã¾ã›ã‚“。ClickPipesを実行ã™ã‚‹ã¨ã€ä»–ã®å–ã‚Šè¾¼ã¿ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¨åŒæ§˜ã«ã€å®›å…ˆClickHouse Cloudサービスã§é–“接的ãªè¨ˆç®—ãŠã‚ˆã³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚³ã‚¹ãƒˆãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +- **Kafka用ã®ClickPipesを使用ã™ã‚‹éš›ã«ã‚¨ãƒ©ãƒ¼ã‚„障害を処ç†ã™ã‚‹æ–¹æ³•ã¯ã‚ã‚Šã¾ã™ã‹ï¼Ÿ** + + ã¯ã„ã€Kafka用ã®ClickPipesã¯ã€Kafkaã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’消費ã™ã‚‹éš›ã«éšœå®³ãŒç™ºç”Ÿã—ãŸå ´åˆã«è‡ªå‹•çš„ã«ãƒªãƒˆãƒ©ã‚¤ã—ã¾ã™ã€‚ClickPipesã¯ã€ã‚¨ãƒ©ãƒ¼ã‚„ä¸æ­£ãªãƒ‡ãƒ¼ã‚¿ã‚’7日間ä¿æŒã™ã‚‹å°‚用ã®ã‚¨ãƒ©ãƒ¼ãƒ†ãƒ¼ãƒ–ルã®æœ‰åŠ¹åŒ–もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/kafka.md b/docs/ja/integrations/data-ingestion/clickpipes/kafka.md new file mode 100644 index 00000000000..ccc4980b4e7 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/clickpipes/kafka.md @@ -0,0 +1,274 @@ +--- +sidebar_label: Kafka用ã®ClickPipes +description: Kafka データソースを ClickHouse Cloud ã¨ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ã«æŽ¥ç¶šã—ã¾ã™ã€‚ +slug: /ja/integrations/clickpipes/kafka +sidebar_position: 1 +--- + +import KafkaSVG from "../../images/logos/kafka.svg"; +import ConfluentSVG from "../../images/logos/confluent.svg"; +import MskSVG from "../../images/logos/msk.svg"; +import AzureEventHubsSVG from "../../images/logos/azure_event_hubs.svg"; +import WarpStreamSVG from "../../images/logos/warpstream.svg"; + +# Kafka 㨠ClickHouse Cloud ã®çµ±åˆ +## å‰ææ¡ä»¶ +[ClickPipes ã®ã‚¤ãƒ³ãƒˆãƒ­ãƒ€ã‚¯ã‚·ãƒ§ãƒ³](./index.md)を確èªã—ã¦ãã ã•ã„。 + +## åˆã‚ã¦ã® Kafka ClickPipe ã®ä½œæˆ + +1. ClickHouse Cloud サービス㮠SQL コンソールã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ + + ![ClickPipes サービス](./images/cp_service.png) + +2. å·¦å´ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã§ `Data Sources` ボタンをé¸æŠžã—ã€ã€ŒSet up a ClickPipeã€ã‚’クリックã—ã¾ã™ã€‚ + + ![インãƒãƒ¼ãƒˆã‚’é¸æŠž](./images/cp_step0.png) + +3. データソースをé¸æŠžã—ã¾ã™ã€‚ + + ![データソースタイプã®é¸æŠž](./images/cp_step1.png) + +4. フォームã«ã€ClickPipe ã®åå‰ã€èª¬æ˜Žï¼ˆã‚ªãƒ—ション)ã€ã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ã€ãŠã‚ˆã³ãã®ä»–ã®æŽ¥ç¶šè©³ç´°ã‚’入力ã—ã¾ã™ã€‚ + + ![接続詳細ã®å…¥åŠ›](./images/cp_step2.png) + +5. スキーマレジストリを設定ã—ã¾ã™ã€‚Avro ストリームã«ã¯æœ‰åŠ¹ãªã‚¹ã‚­ãƒ¼ãƒžãŒå¿…è¦ã§ã€JSON ã«ã¯ã‚ªãƒ—ションã§ã™ã€‚ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã¯ã€é¸æŠžã•ã‚ŒãŸãƒˆãƒ”ック上㧠[AvroConfluent](../../../interfaces/formats.md/#data-format-avro-confluent) を解æžã—ãŸã‚Šã€JSON メッセージを検証ã™ã‚‹ã®ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- パースã§ããªã„ Avro メッセージや検証ã«å¤±æ•—ã—㟠JSON メッセージã¯ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ +- スキーマレジストリã®ã€Œãƒ«ãƒ¼ãƒˆã€ãƒ‘ス。例ãˆã°ã€Confluent Cloud ã®ã‚¹ã‚­ãƒ¼ãƒžãƒ¬ã‚¸ã‚¹ãƒˆãƒªã® URL 㯠HTTPS ã® URL ã§ã‚ã‚Šã€ãƒ‘スãŒãªã„å½¢å¼ã§ã™ã€‚例:`https://test-kk999.us-east-2.aws.confluent.cloud`。ルートパスã®ã¿ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¹ã‚­ãƒ¼ãƒžã¯ã‚µãƒ³ãƒ—ルã•ã‚ŒãŸ Kafka メッセージã«åŸ‹ã‚è¾¼ã¾ã‚ŒãŸ ID ã«ã‚ˆã£ã¦ã‚«ãƒ©ãƒ åã¨ã‚¿ã‚¤ãƒ—を決定ã—ã¾ã™ã€‚ +- 数値スキーマ ID ã«ã‚ˆã‚‹ã‚¹ã‚­ãƒ¼ãƒžãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãƒ‘ス `/schemas/ids/[ID]`。スキーマ ID を使用ã—ãŸå®Œå…¨ãª URL ã¯ã€`https://registry.example.com/schemas/ids/1000` ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ +- サブジェクトåã«ã‚ˆã‚‹ã‚¹ã‚­ãƒ¼ãƒžãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãƒ‘ス `/subjects/[subject_name]`。オプションã§ã€ç‰¹å®šã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ URL ã« `/versions/[version]` を追加ã™ã‚‹ã“ã¨ã§å‚ç…§ã§ãã¾ã™ï¼ˆãã†ã§ãªã‘ã‚Œã°ã€ClickPipes ã¯æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ï¼‰ã€‚スキーマサブジェクトを使用ã—ãŸå®Œå…¨ãª URL ã¯ã€`https://registry.example.com/subjects/events` ã‚„ `https://registry/example.com/subjects/events/versions/4` ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + +ã™ã¹ã¦ã®ã‚±ãƒ¼ã‚¹ã§ã€ClickPipes ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«åŸ‹ã‚è¾¼ã¾ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒž ID ã«ã‚ˆã£ã¦ç¤ºã•ã‚ŒãŸå ´åˆã€ãƒ¬ã‚¸ã‚¹ãƒˆãƒªã‹ã‚‰è‡ªå‹•çš„ã«æ›´æ–°ã¾ãŸã¯ç•°ãªã‚‹ã‚¹ã‚­ãƒ¼ãƒžã‚’å–å¾—ã—ã¾ã™ã€‚メッセージãŒåŸ‹ã‚è¾¼ã¾ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒž ID ãªã—ã§æ›¸ãè¾¼ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ç‰¹å®šã®ã‚¹ã‚­ãƒ¼ãƒž ID ã¾ãŸã¯ã‚µãƒ–ジェクトを指定ã—ã¦ã€ã™ã¹ã¦ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’解æžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +6. トピックをé¸æŠžã—ã€UI ãŒãã®ãƒˆãƒ”ックã®ã‚µãƒ³ãƒ—ルドキュメントを表示ã—ã¾ã™ã€‚ + + ![データフォーマットã¨ãƒˆãƒ”ックã®è¨­å®š](./images/cp_step3.png) + +7. 次ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã€æ–°ã—ã„ ClickHouse テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’å–り込むã‹ã€æ—¢å­˜ã®ã‚‚ã®ã‚’å†åˆ©ç”¨ã™ã‚‹ã‹ã‚’é¸æŠžã§ãã¾ã™ã€‚ç”»é¢ã®æŒ‡ç¤ºã«å¾“ã„ã€ãƒ†ãƒ¼ãƒ–ルåã€ã‚¹ã‚­ãƒ¼ãƒžã€è¨­å®šã‚’変更ã—ã¾ã™ã€‚上部ã®ã‚µãƒ³ãƒ—ルテーブルã§å¤‰æ›´ã‚’リアルタイムã§ãƒ—レビューã§ãã¾ã™ã€‚ + + ![テーブルã€ã‚¹ã‚­ãƒ¼ãƒžã€ãŠã‚ˆã³è¨­å®šã®è¨­å®š](./images/cp_step4a.png) + + 指定ã•ã‚ŒãŸã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’使用ã—ã¦ã€é«˜åº¦ãªè¨­å®šã‚’カスタマイズã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + ![高度ãªã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã®è¨­å®š](./images/cp_step4a3.png) + +8. ã‚ã‚‹ã„ã¯ã€æ—¢å­˜ã® ClickHouse テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’å–ã‚Šè¾¼ã¿ãŸã„å ´åˆã€UI ã¯ã‚½ãƒ¼ã‚¹ã‹ã‚‰é¸æŠžã—ãŸå®›å…ˆãƒ†ãƒ¼ãƒ–ル㮠ClickHouse フィールドã«ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’マップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + + ![既存ã®ãƒ†ãƒ¼ãƒ–ルを使用](./images/cp_step4b.png) + +9. 最後ã«ã€å†…部クリックパイプスユーザーã®æ¨©é™ã‚’設定ã§ãã¾ã™ã€‚ + + **権é™:** ClickPipes ã¯ã€å®›å…ˆãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒ‡ãƒ¼ã‚¿æ›¸ãè¾¼ã¿ã®ãŸã‚ã«å°‚用ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã—ã¾ã™ã€‚ã“ã®å†…部ユーザーã«ã¯ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ­ãƒ¼ãƒ«ã¾ãŸã¯äº‹å‰å®šç¾©ã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã®ã„ãšã‚Œã‹ã‚’é¸æŠžã§ãã¾ã™ï¼š + - `Full access`: クラスターã¸ã®å®Œå…¨ãªã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ã¾ã™ã€‚Materialized View ã¾ãŸã¯ Dictionary を宛先テーブルã§ä½¿ç”¨ã™ã‚‹å ´åˆã«æœ‰ç”¨ã§ã™ã€‚ + - `Only destination table`: 宛先テーブルã®ã¿ã« `INSERT` 権é™ãŒã‚ã‚Šã¾ã™ã€‚ + + ![権é™](./images/cp_step5.png) + +10. 「Complete Setupã€ã‚’クリックã™ã‚‹ã¨ã€ã‚·ã‚¹ãƒ†ãƒ ã¯ ClickPipe を登録ã—ã€ãã‚ŒãŒã‚µãƒžãƒªãƒ¼ãƒ†ãƒ¼ãƒ–ルã«è¡¨ç¤ºã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + + ![æˆåŠŸé€šçŸ¥](./images/cp_success.png) + + ![削除通知](./images/cp_remove.png) + + サマリーテーブルã¯ã€ã‚½ãƒ¼ã‚¹ã¾ãŸã¯ ClickHouse ã®å®›å…ˆãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã‚µãƒ³ãƒ—ルデータを表示ã™ã‚‹ãŸã‚ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’æä¾›ã—ã¾ã™ã€‚ + + ![宛先を表示](./images/cp_destination.png) + + ãã—ã¦ã€ClickPipe を削除ã—ã€å–ã‚Šè¾¼ã¿ã‚¸ãƒ§ãƒ–ã®æ¦‚è¦ã‚’表示ã™ã‚‹ãŸã‚ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚‚æä¾›ã—ã¾ã™ã€‚ + + ![概è¦ã‚’表示](./images/cp_overview.png) + +11. **ãŠã‚ã§ã¨ã†ã”ã–ã„ã¾ã™ï¼** åˆã‚ã¦ã® ClickPipe を設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã—ãŸã€‚ã“ã‚ŒãŒã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚° ClickPipe ã§ã‚ã‚Œã°ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’リアルタイムã§ç¶™ç¶šçš„ã«å–ã‚Šè¾¼ã¿ã¾ã™ã€‚ + +## 対応データソース + +|åå‰|ロゴ|タイプ|ステータス|説明| +|----|----|----|------|-----------| +|Apache Kafka||ストリーミング|安定|ClickPipes を設定ã—ã¦ã€Apache Kafka ã‹ã‚‰ ClickHouse Cloud ã¸ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã‚’å–ã‚Šè¾¼ã¿å§‹ã‚ã¾ã™ã€‚| +|Confluent Cloud||ストリーミング|安定|Confluent 㨠ClickHouse Cloud ã®ãƒ‘ワーを直接統åˆã«ã‚ˆã‚Šè§£æ”¾ã—ã¾ã™ã€‚| +|Redpanda|Redpanda logo|ストリーミング|安定|ClickPipes を設定ã—ã¦ã€RedPanda ã‹ã‚‰ ClickHouse Cloud ã¸ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã‚’å–ã‚Šè¾¼ã¿å§‹ã‚ã¾ã™ã€‚| +|AWS MSK||ストリーミング|安定|ClickPipes を設定ã—ã¦ã€AWS MSK ã‹ã‚‰ ClickHouse Cloud ã¸ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã‚’å–ã‚Šè¾¼ã¿å§‹ã‚ã¾ã™ã€‚| +|Azure Event Hubs||ストリーミング|安定|ClickPipes を設定ã—ã¦ã€Azure Event Hubs ã‹ã‚‰ ClickHouse Cloud ã¸ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã‚’å–ã‚Šè¾¼ã¿å§‹ã‚ã¾ã™ã€‚| +|WarpStream||ストリーミング|安定|ClickPipes を設定ã—ã¦ã€WarpStream ã‹ã‚‰ ClickHouse Cloud ã¸ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã‚’å–ã‚Šè¾¼ã¿å§‹ã‚ã¾ã™ã€‚| + +ClickPipes ã«è¿½åŠ ã®ã‚³ãƒã‚¯ã‚¿ãŒè¿½åŠ ã•ã‚Œã‚‹äºˆå®šã§ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](https://clickhouse.com/company/contact?loc=clickpipes)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 対応ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ + +対応フォーマットã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š +- [JSON](../../../interfaces/formats.md/#json) +- [AvroConfluent](../../../interfaces/formats.md/#data-format-avro-confluent) + +### 対応データタイプ + +ç¾åœ¨ ClickPipes ã§å¯¾å¿œã—ã¦ã„ã‚‹ ClickHouse データタイプã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +- 基本数値型 - \[U\]Int8/16/32/64 ãŠã‚ˆã³ Float32/64 +- 大ããªæ•´æ•°åž‹ - \[U\]Int128/256 +- Decimal åž‹ +- Boolean +- String +- FixedString +- Date, Date32 +- DateTime, DateTime64 (UTC タイムゾーンã®ã¿) +- Enum8/Enum16 +- UUID +- IPv4 +- IPv6 +- ã™ã¹ã¦ã® ClickHouse LowCardinality åž‹ +- 上記ã®ä»»æ„ã®åž‹ï¼ˆNullable ã‚’å«ã‚€ï¼‰ã‚’キーã¨å€¤ã«ä½¿ç”¨ã—㟠Map +- 上記ã®ä»»æ„ã®åž‹ï¼ˆNullable ã‚’å«ã‚€ã€1 階層ã®ã¿ï¼‰ã‚’è¦ç´ ã«ä½¿ç”¨ã—㟠Tuple ãŠã‚ˆã³ Array + +### Avro +#### 対応ã™ã‚‹ Avro データタイプ + +ClickPipes ã¯ã™ã¹ã¦ã® Avro プリミティブãŠã‚ˆã³è¤‡åˆåž‹ã€`time-millis`ã€`time-micros`ã€`local-timestamp-millis`ã€`local_timestamp-micros`ã€ãŠã‚ˆã³ `duration` を除ãã™ã¹ã¦ã® Avro è«–ç†åž‹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚Avro `record` 型㯠Tuple ã«ã€`array` 型㯠Array ã«ã€`map` 㯠Map(文字列キーã®ã¿ï¼‰ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚一般的ãªå¤‰æ›ã¯[ã“ã¡ã‚‰](../../../../en/interfaces/formats.md#data-types-matching)ã§ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚Avro 数値型ã«ã¤ã„ã¦ã¯ã€åž‹å¤‰æ›ã«ãŠã‘るオーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚„精度æ失をãƒã‚§ãƒƒã‚¯ã—ãªã„ãŸã‚ã€æ­£ç¢ºãªåž‹ä¸€è‡´ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +#### Nullable 型㨠Avro ユニオン + +Avro ã«ãŠã‘ã‚‹ Nullable 型㯠`(T, null)` ã¾ãŸã¯ `(null, T)` ã®ãƒ¦ãƒ‹ã‚ªãƒ³ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¦å®šç¾©ã•ã‚Œã¾ã™ã€‚スキーマ推論中ã€ã“ã®ã‚ˆã†ãªãƒ¦ãƒ‹ã‚ªãƒ³ã¯ ClickHouse ã®ã€ŒNullableã€ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ãŸã ã—ã€ClickHouse 㯠`Nullable(Array)`ã€`Nullable(Map)`ã€ã¾ãŸã¯ `Nullable(Tuple)` 型をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。ã“れらã®åž‹ã«å¯¾ã™ã‚‹ Avro ã® null ユニオンã¯ã€éž Nullable ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ãƒžãƒƒãƒ—ã•ã‚Œã¾ã™ï¼ˆAvro Record 型㯠ClickHouse ãƒãƒ¼ãƒ ãƒ‰ Tuple ã«ãƒžãƒƒãƒ—ã•ã‚Œã¾ã™ï¼‰ã€‚ã“れらã®åž‹ã«å¯¾ã™ã‚‹ Avro ã® "null" ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«æŒ¿å…¥ã•ã‚Œã¾ã™ï¼š +- Null Avro é…列ã«ã¯ç©ºã® Array +- Null Avro Map ã«ã¯ç©ºã® Map +- Null Avro Record ã«ã¯ã™ã¹ã¦ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ/ゼロ値ã®ãƒãƒ¼ãƒ ãƒ‰ Tuple + +ClickPipes ã¯ç¾åœ¨ã€ä»–ã® Avro ユニオンをå«ã‚€ã‚¹ã‚­ãƒ¼ãƒžã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“(ã“ã‚Œã¯æ–°ã—ã„ ClickHouse Variant ã‚„ JSON データタイプã®æˆç†Ÿåº¦ã«ã‚ˆã£ã¦å¤‰ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚Avro スキーマãŒã€Œéž nullã€ãƒ¦ãƒ‹ã‚ªãƒ³ã‚’å«ã‚“ã§ã„ã‚‹å ´åˆã€ClickPipes 㯠Avro スキーマ㨠Clickhouse カラムタイプ間ã®ãƒžãƒƒãƒ”ングを計算ã—よã†ã¨ã™ã‚‹éš›ã«ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ + +#### Avro ã‚¹ã‚­ãƒ¼ãƒžç®¡ç† + +ClickPipes ã¯ã€å„メッセージ/イベントã«åŸ‹ã‚è¾¼ã¾ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒž ID を使用ã—ã¦ã€è¨­å®šæ¸ˆã¿ã®ã‚¹ã‚­ãƒ¼ãƒžãƒ¬ã‚¸ã‚¹ãƒˆãƒªã‹ã‚‰å‹•çš„ã« Avro スキーマをå–å¾—ã—é©ç”¨ã—ã¾ã™ã€‚スキーマã®æ›´æ–°ã¯è‡ªå‹•çš„ã«æ¤œå‡ºãŠã‚ˆã³å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +ç¾æ™‚点㧠ClickPipes ã¯ã€[Confluent Schema Registry API](https://docs.confluent.io/platform/current/schema-registry/develop/api.html) を使用ã™ã‚‹ã‚¹ã‚­ãƒ¼ãƒžãƒ¬ã‚¸ã‚¹ãƒˆãƒªã¨ã ã‘互æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã¯ Confluent Kafka 㨠Cloudã€RedPandaã€AWS MSKã€ãŠã‚ˆã³ Upstash スキーマレジストリãŒå«ã¾ã‚Œã¾ã™ã€‚ClickPipes ã¯ã€AWS Glue スキーマレジストリや Azure スキーマレジストリã¨ã¯ç¾åœ¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã›ã‚“(間もãªã対応予定)。 + +å–å¾—ã•ã‚ŒãŸ Avro スキーマ㨠ClickHouse 宛先テーブル間ã®ãƒžãƒƒãƒ”ングã«ã¯æ¬¡ã®ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•ã‚Œã¾ã™ï¼š +- Avro スキーマ㫠ClickHouse 宛先マッピングã«å«ã¾ã‚Œã¦ã„ãªã„フィールドãŒã‚ã‚‹å ´åˆã€ãã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +- Avro スキーマ㫠ClickHouse 宛先マッピングã«å®šç¾©ã•ã‚ŒãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒæ¬ ã‘ã¦ã„ã‚‹å ´åˆã€ClickHouse カラム㯠0 や空文字列ã®ã‚ˆã†ãª "ゼロ" 値ã§åŸ‹ã‚られã¾ã™ã€‚クリックãƒã‚¦ã‚¹ã®ã‚µãƒ¼ãƒãƒ¼ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå‡¦ç†ã®æ›´æ–°ã‚’å¾…ã£ã¦ã„る一時的ãªåˆ¶é™ã®ãŸã‚ã€ClickPipes 挿入ã®ãŸã‚ã® [デフォルト](https://clickhouse.com/docs/ja/sql-reference/statements/create/table#default) å¼ã¯ç¾åœ¨è©•ä¾¡ã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- Avro スキーマフィールド㨠ClickHouse カラムãŒäº’æ›æ€§ãŒãªã„å ´åˆã€ãã®è¡Œ/メッセージã®æŒ¿å…¥ã«å¤±æ•—ã—ã€å¤±æ•—㯠ClickPipes ã®ã‚¨ãƒ©ãƒ¼ãƒ†ãƒ¼ãƒ–ルã«è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚ã„ãã¤ã‹ã®æš—黙的ãªå¤‰æ›ï¼ˆæ•°å€¤åž‹é–“ã®å¤‰æ›ãªã©ï¼‰ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ãŒã€ã™ã¹ã¦ã§ã¯ã‚ã‚Šã¾ã›ã‚“(例ãˆã°ã€Avro `record` フィールド㯠`Int32` ClickHouse カラムã«æŒ¿å…¥ã§ãã¾ã›ã‚“)。 + +## Kafka 仮想カラム + +Kafka 互æ›ã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã«å¯¾ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る仮想カラムã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚æ–°ã—ã„宛先テーブルを作æˆã™ã‚‹éš›ã«ã¯ã€`Add Column` ボタンを使用ã—ã¦ä»®æƒ³ã‚«ãƒ©ãƒ ã‚’追加ã§ãã¾ã™ã€‚ + +| åå‰ | 説明 | 推奨データタイプ | +|----------------|------------------------------------------|------------------| +| _key | Kafka メッセージキー | String | +| _timestamp | Kafka タイムスタンプ (ミリ秒精度) | DateTime64(3) | +| _partition | Kafka パーティション | Int32 | +| _offset | Kafka オフセット | Int64 | +| _topic | Kafka トピック | String | +| _header_keys | レコードヘッダー内ã®ã‚­ãƒ¼ã®ä¸¦åˆ—é…列 | Array(String) | +| _header_values | レコードヘッダー内ã®å€¤ã®ä¸¦åˆ—é…列 | Array(String) | +| _raw_message | 完全㪠Kafka メッセージ | String | + +_note: `_raw_message` カラム㯠JSON データã«ã®ã¿æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚JSON 文字列ã ã‘ãŒå¿…è¦ãªãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ï¼ˆä¾‹ãˆã° ClickHouse [`JsonExtract*`](https://clickhouse.com/docs/ja/sql-reference/functions/json-functions#jsonextract-functions) 関数を使用ã—ã¦ãƒ€ã‚¦ãƒ³ã‚¹ãƒˆãƒªãƒ¼ãƒ ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューをãƒãƒ”ュレートã™ã‚‹ãªã©ï¼‰ã§ã¯ã€"éžä»®æƒ³" カラムを全削除ã™ã‚‹ã“ã¨ã§ ClickPipes ã®ãƒ‘フォーマンスãŒå‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚_ + +## åˆ¶é™ + +- [デフォルト](https://clickhouse.com/docs/ja/sql-reference/statements/create/table#default) ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +## é…信セマンティクス +ClickPipes for Kafka 㯠`å°‘ãªãã¨ã‚‚一度` ã®é…信セマンティクスをæä¾›ã—ã¾ã™ï¼ˆæœ€ã‚‚一般的ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¢ãƒ—ローãƒã®ä¸€ã¤ã¨ã—ã¦ï¼‰ã€‚é…信セマンティクスã«ã¤ã„ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ‰ãƒãƒƒã‚¯ã‚’ãŠå¾…ã¡ã—ã¦ãŠã‚Šã¾ã™ [ãŠå•ã„åˆã‚ã›ãƒ•ã‚©ãƒ¼ãƒ ](https://clickhouse.com/company/contact?loc=clickpipes)。`ã¡ã‚‡ã†ã©ä¸€åº¦` ã®ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ãŒå¿…è¦ãªå ´åˆã€å…¬å¼ã® [`clickhouse-kafka-connect`](https://clickhouse.com/blog/real-time-event-streaming-with-kafka-connect-confluent-cloud-clickhouse) シンクã®ä½¿ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## èªè¨¼ +Apache Kafka プロトコルã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã«å¯¾ã—ã¦ã€ClickPipes 㯠TLS æš—å·åŒ–を使用ã—㟠[SASL/PLAIN](https://docs.confluent.io/platform/current/kafka/authentication_sasl/authentication_sasl_plain.html) èªè¨¼ã€ãŠã‚ˆã³ `SASL/SCRAM-SHA-256` 㨠`SASL/SCRAM-SHA-512` をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ストリーミングソース(Redpandaã€MSK ãªã©ï¼‰ã«ã‚ˆã‚Šã€äº’æ›æ€§ã«åŸºã¥ã„ã¦ã“れらã®èªè¨¼ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã®ã™ã¹ã¦ã¾ãŸã¯ä¸€éƒ¨ãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ä»–ã®èªè¨¼ãƒ‹ãƒ¼ã‚ºãŒã‚ã‚‹å ´åˆã¯ã€[フィードãƒãƒƒã‚¯ã‚’ãŠå¯„ã›ãã ã•ã„](https://clickhouse.com/company/contact?loc=clickpipes)。 + +### IAM +AWS MSK ã®èªè¨¼ã¯ç¾åœ¨ã€[SASL/SCRAM-SHA-512](https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html) èªè¨¼ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### カスタム証明書 +ClickPipes for Kafka ã¯ã€Kafka ブローカーã®ã‚«ã‚¹ã‚¿ãƒ è¨¼æ˜Žæ›¸ã‚’ SASL & パブリック SSL/TLS 証明書ã§ã‚¢ãƒƒãƒ—ロードã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ClickPipe 設定㮠SSL 証明書セクションã§è¨¼æ˜Žæ›¸ã‚’アップロードã§ãã¾ã™ã€‚ +:::note +SASL ã¨å…±ã« SSL 証明書ã®å˜ä¸€ã‚¢ãƒƒãƒ—ロードをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ãŒã€ç¾æ™‚点ã§ã¯ SSL with マルãƒTLS (mTLS) ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: + +## パフォーマンス + +### ãƒãƒƒãƒå‡¦ç† +ClickPipes 㯠ClickHouse ã¸ã®ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ã‚’ãƒãƒƒãƒã§è¡Œã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã«ã‚ã¾ã‚Šå¤šãã®ãƒ‘ーツを作æˆã—ãªã„よã†ã«ã—ã¦ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å†…ã§ã®ãƒ‘フォーマンスå•é¡Œã‚’防ããŸã‚ã§ã™ã€‚ + +ãƒãƒƒãƒã¯ä»¥ä¸‹ã®åŸºæº–ã®ã„ãšã‚Œã‹ãŒæº€ãŸã•ã‚ŒãŸã¨ãã«æŒ¿å…¥ã•ã‚Œã¾ã™ï¼š +- ãƒãƒƒãƒã‚µã‚¤ã‚ºãŒæœ€å¤§ã‚µã‚¤ã‚ºï¼ˆ100,000 è¡Œã¾ãŸã¯ 20MB)ã«é”ã—ãŸã¨ã +- ãƒãƒƒãƒãŒæœ€å¤§æ™‚間(5 秒)開ã‹ã‚Œã¦ã„ãŸã¨ã + +### レイテンシー + +レイテンシー(Kafka メッセージãŒç”Ÿæˆã•ã‚Œã¦ã‹ã‚‰ ClickHouse ã§ä½¿ç”¨å¯èƒ½ã«ãªã‚‹ã¾ã§ã®æ™‚間)ã¯ã€ã•ã¾ã–ã¾ãªè¦å› ï¼ˆä¾‹ï¼šãƒ–ローカã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚µã‚¤ã‚º/フォーマット)ã«ä¾å­˜ã—ã¾ã™ã€‚上記ã§èª¬æ˜Žã—ãŸ[ãƒãƒƒãƒå‡¦ç†](#Batching)もレイテンシーã«å½±éŸ¿ã—ã¾ã™ã€‚特定ã®è² è·ã§ã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã‚’決定ã™ã‚‹ãŸã‚ã«ã€ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§ã®ãƒ†ã‚¹ãƒˆã‚’常ã«ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +ClickPipes ã¯ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã«é–¢ã™ã‚‹ä¿è¨¼ã‚’æä¾›ã—ã¦ã„ã¾ã›ã‚“。特定ã®ä½Žãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼è¦ä»¶ãŒã‚ã‚‹å ´åˆã¯ã€[ãŠå•ã„åˆã‚ã›ãã ã•ã„](https://clickhouse.com/company/contact?loc=clickpipes)。 + +### スケーリング +ClickPipes for Kafka ã¯æ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚’æ„図ã—ã¦ã„ã¾ã™ã€‚デフォルトã§ã¯ã€2 ã¤ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžãƒ¼ã‚’æŒã¤ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžãƒ¼ã‚°ãƒ«ãƒ¼ãƒ—を作æˆã—ã¾ã™ã€‚ã“れを増やã™ã«ã¯ã€[ãŠå•ã„åˆã‚ã›ãã ã•ã„](https://clickhouse.com/company/contact?loc=clickpipes)。 + +## よãã‚ã‚‹è³ªå• + +### 一般 + +- **ClickPipes for Kafka ã¯ã©ã®ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™ã‹ï¼Ÿ** + + ClickPipes ã¯å°‚用ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã‚’使用ã—㦠Kafka Consumer API を実行ã—ã€æŒ‡å®šã•ã‚ŒãŸãƒˆãƒ”ックã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã€ãã®ãƒ‡ãƒ¼ã‚¿ã‚’特定㮠ClickHouse Cloud サービス上㮠ClickHouse テーブルã«æŒ¿å…¥ã—ã¾ã™ã€‚ + +- **ClickPipes 㨠ClickHouse Kafka テーブルエンジンã®é•ã„ã¯ä½•ã§ã™ã‹ï¼Ÿ** + + Kafka テーブルエンジンã¯ã€ClickHouse サーãƒãƒ¼è‡ªèº«ãŒ Kafka ã«æŽ¥ç¶šã—ã€ã‚¤ãƒ™ãƒ³ãƒˆã‚’å–å¾—ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ã«æ›¸ã込む「プルモデルã€ã‚’実装ã™ã‚‹ ClickHouse ã®ã‚³ã‚¢æ©Ÿèƒ½ã§ã™ã€‚ + + ClickPipes 㯠ClickHouse サービスã¨ã¯ç‹¬ç«‹ã—ã¦å‹•ä½œã™ã‚‹åˆ¥ã®ã‚¯ãƒ©ã‚¦ãƒ‰ã‚µãƒ¼ãƒ“スã§ã‚ã‚Šã€Kafka(ã¾ãŸã¯ä»–ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ï¼‰ã«æŽ¥ç¶šã—ã€é–¢é€£ ClickHouse Cloud サービスã«ã‚¤ãƒ™ãƒ³ãƒˆã‚’プッシュã—ã¾ã™ã€‚ã“ã®åˆ†é›¢ã•ã‚ŒãŸã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã«ã‚ˆã‚Šã€å„ªã‚ŒãŸé‹ç”¨ã®æŸ”軟性ã€æ˜Žç¢ºãªé–¢å¿ƒã®åˆ†é›¢ã€ã‚¹ã‚±ãƒ¼ãƒ©ãƒ–ルãªå–ã‚Šè¾¼ã¿ã€ã‚¹ãƒ ãƒ¼ã‚ºãªéšœå®³ç®¡ç†ã€æ‹¡å¼µæ€§ãªã©ãŒå¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚ + +- **ClickPipes for Kafka を使用ã™ã‚‹éš›ã®è¦ä»¶ã¯ä½•ã§ã™ã‹ï¼Ÿ** + + ClickPipes for Kafka を使用ã™ã‚‹ã«ã¯ã€ç¨¼åƒä¸­ã® Kafka ブローカー㨠ClickPipes ãŒæœ‰åŠ¹ãª ClickHouse Cloud サービスãŒå¿…è¦ã§ã™ã€‚ã¾ãŸã€ClickHouse Cloud ãŒã‚ãªãŸã® Kafka ブローカーã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã“ã¨ã‚’確èªã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€Kafka サイドã§ã®ãƒªãƒ¢ãƒ¼ãƒˆæŽ¥ç¶šã‚’許å¯ã—ã€Kafka 設定㧠[ClickHouse Cloud Egress IP アドレス](https://clickhouse.com/docs/ja/manage/security/cloud-endpoints-api) をホワイトリストã«ç™»éŒ²ã™ã‚‹ã“ã¨ã§å®Ÿç¾ã§ãã¾ã™ã€‚ + +- **ClickPipes for Kafka 㯠AWS PrivateLink をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã‹ï¼Ÿ** + + AWS PrivateLink ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚詳細㯠[ãŠå•ã„åˆã‚ã›ãã ã•ã„](https://clickhouse.com/company/contact?loc=clickpipes)。 + +- **ClickPipes for Kafka を使用ã—㦠Kafka トピックã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むã“ã¨ã¯ã§ãã¾ã™ã‹ï¼Ÿ** + + ã„ã„ãˆã€ClickPipes for Kafka 㯠Kafka トピックã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚Œã¦ãŠã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むãŸã‚ã§ã¯ã‚ã‚Šã¾ã›ã‚“。Kafka トピックã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むã«ã¯ã€å°‚用㮠Kafka プロデューサーを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +- **ClickPipes ã¯è¤‡æ•°ã®ãƒ–ローカーをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã‹ï¼Ÿ** + + ã¯ã„ã€åŒã˜ã‚¯ã‚©ãƒ¼ãƒ©ãƒ ã®ä¸€éƒ¨ã§ã‚ã‚Œã°ã€`,`ã§åŒºåˆ‡ã£ã¦ä¸€ç·’ã«è¨­å®šã§ãã¾ã™ã€‚ + +### Upstash + +- **ClickPipes 㯠Upstash をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã‹ï¼Ÿ** + + ã¯ã„。Upstash ã® Kafka 製å“㯠2024 å¹´ 9 月 11æ—¥ã‹ã‚‰6 ヶ月間ã®å»ƒæ­¢æœŸé–“ã«å…¥ã‚Šã¾ã—ãŸã€‚既存ã®é¡§å®¢ã¯ã€ClickPipes ユーザーインターフェースã®ä¸€èˆ¬çš„㪠Kafka タイルを使用ã—ã¦ã€æ—¢å­˜ã® Upstash Kafka ブローカー㧠ClickPipes を引ã続ã使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚既存㮠Upstash Kafka ClickPipes ã¯ã€å»ƒæ­¢é€šçŸ¥ã®å‰ã«ã¯å½±éŸ¿ã•ã‚Œã¾ã›ã‚“。廃止期間ãŒçµ‚ã‚ã‚‹ã¨ã€ClickPipe ã¯æ©Ÿèƒ½ã—ãªããªã‚Šã¾ã™ã€‚ + +- **ClickPipes 㯠Upstash スキーマレジストリをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã‹ï¼Ÿ** + + ã„ã„ãˆã€‚ClickPipes 㯠Upstash Kafka スキーマレジストリã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã›ã‚“。 + +- **ClickPipes 㯠Upstash ã® QStash ワークフローをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã‹ï¼Ÿ** + + ã„ã„ãˆã€‚QStash ワークフロー㫠Kafka 互æ›ã®è¡¨é¢ãŒå°Žå…¥ã•ã‚Œãªã„é™ã‚Šã€Kafka ClickPipes ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。 + +### Azure EventHubs + +- **Azure Event Hubs ClickPipe 㯠Kafka サーフェスãªã—ã§å‹•ä½œã—ã¾ã™ã‹ï¼Ÿ** + + ã„ã„ãˆã€‚ClickPipes 㯠Azure Event Hubs 㧠Kafka サーフェスを有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚Kafka プロトコルã¯ã€Standardã€Premiumã€Dedicated SKU ã®ã¿ã®ãƒ—ライシングティアã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ + +- **Azure スキーマレジストリ㯠ClickPipes ã§å‹•ä½œã—ã¾ã™ã‹ï¼Ÿ** + + ã„ã„ãˆã€‚ClickPipes ã¯ç¾åœ¨ã€Event Hubs スキーマレジストリã¨ã¯äº’æ›æ€§ãŒã‚ã‚Šã¾ã›ã‚“。 + +- **Azure Event Hubs ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ãƒãƒªã‚·ãƒ¼ã«ã©ã®æ¨©é™ãŒå¿…è¦ã§ã™ã‹ï¼Ÿ** + + トピックをリストã—ã€ã‚¤ãƒ™ãƒ³ãƒˆã‚’å–å¾—ã™ã‚‹ã«ã¯ã€å…±æœ‰ã‚¢ã‚¯ã‚»ã‚¹ãƒãƒªã‚·ãƒ¼ã«å°‘ãªãã¨ã‚‚「Listenã€ã‚¯ãƒ¬ãƒ¼ãƒ ãŒå¿…è¦ã§ã™ã€‚ + +- **Event Hubs ãŒãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã•ãªã„ç†ç”±ã¯ä½•ã§ã™ã‹ï¼Ÿ** + + ã‚ãªãŸã® ClickHouse インスタンスãŒã‚ãªãŸã® Event Hubs é…ç½®ã¨ç•°ãªã‚‹åœ°åŸŸã¾ãŸã¯å¤§é™¸ã«ã‚ã‚‹å ´åˆã€ClickPipes ã®ã‚ªãƒ³ãƒœãƒ¼ãƒ‡ã‚£ãƒ³ã‚°æ™‚ã«ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãŒç™ºç”Ÿã—ã€Event Hub ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹éš›ã«ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ãŒé«˜ããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ClickHouse Cloud é…置㨠Azure Event Hubs é…置をクラウド地域ãŒäº’ã„ã«è¿‘ã„場所ã«é…ç½®ã™ã‚‹ã“ã¨ã¯ã€ãƒ‘フォーマンスã«æ‚ªå½±éŸ¿ã‚’åŠã¼ã•ãªã„最良ã®ãƒ—ラクティスã¨è€ƒãˆã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ + +- **Azure Event Hubs ã®ãŸã‚ã«ãƒãƒ¼ãƒˆç•ªå·ã‚’å«ã‚ã‚‹ã¹ãã§ã™ã‹ï¼Ÿ** + + ã¯ã„。ClickPipes 㯠Kafka サーフェス用ã®ãƒãƒ¼ãƒˆç•ªå·ã‚’å«ã‚ã‚‹ã“ã¨ã‚’期待ã—ã¦ãŠã‚Šã€ãれ㯠`:9093` ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ + +- **Event Hubs ã®ãŸã‚ã® ClickPipes IP ã¯ã¾ã  relevant ã§ã™ã‹ï¼Ÿ** + + ã¯ã„。Event Hubs インスタンスã¸ã®ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’制é™ã™ã‚‹å ´åˆã€[ドキュメント化ã•ã‚ŒãŸé™çš„ NAT IPs](./index.md) を追加ã—ã¦ãã ã•ã„。 + +- **イベントãƒãƒ–ã®æŽ¥ç¶šæ–‡å­—列ã‹ã€ã‚¤ãƒ™ãƒ³ãƒˆãƒãƒ–ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ã®æŽ¥ç¶šæ–‡å­—列ã§ã™ã‹ï¼Ÿ** + + 両方ã¨ã‚‚使用ã§ãã¾ã™ãŒã€è¤‡æ•°ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒãƒ–ã‹ã‚‰ã‚µãƒ³ãƒ—ルをå–å¾—ã™ã‚‹ãŸã‚ã«ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ãƒ¬ãƒ™ãƒ«ã§ã®å…±æœ‰ã‚¢ã‚¯ã‚»ã‚¹ãƒãƒªã‚·ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/kinesis.md b/docs/ja/integrations/data-ingestion/clickpipes/kinesis.md new file mode 100644 index 00000000000..609a4995292 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/clickpipes/kinesis.md @@ -0,0 +1,135 @@ +--- +sidebar_label: Amazon Kinesisã¨ClickPipesã®çµ±åˆ +description: Amazon KinesisデータソースをClickHouse Cloudã«ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ã«æŽ¥ç¶šã—ã¾ã™ã€‚ +slug: /ja/integrations/clickpipes/kinesis +--- + +# Amazon Kinesisã¨ClickHouse Cloudã®çµ±åˆ + +## å‰ææ¡ä»¶ + +[ClickPipesã®ç´¹ä»‹](./index.md)ã«æ…£ã‚Œã¦ãŠã‚Šã€[IAMèªè¨¼æƒ…å ±](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)ã¾ãŸã¯[IAMロール](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)を設定ã—ã¦ã„ã¾ã™ã€‚[Kinesis Role-Based Accessガイド](./secure-kinesis.md)ã«å¾“ã£ã¦ã€ClickHouse Cloudã¨é€£æºã™ã‚‹ãƒ­ãƒ¼ãƒ«ã®è¨­å®šæ–¹æ³•ã‚’確èªã—ã¦ãã ã•ã„。 + +## 最åˆã®ClickPipeを作æˆã™ã‚‹ + +1. ClickHouse Cloudサービスã®SQLコンソールã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ + + ![ClickPipes service](./images/cp_service.png) + +2. å·¦å´ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰`Data Sources`ボタンをé¸æŠžã—ã€ã€ŒSet up a ClickPipeã€ã‚’クリックã—ã¾ã™ã€‚ + + ![Select imports](./images/cp_step0.png) + +3. データソースをé¸æŠžã—ã¾ã™ã€‚ + + ![Select data source type](./images/cp_step1.png) + +4. åå‰ã€èª¬æ˜Žï¼ˆã‚ªãƒ—ション)ã€IAMロールã¾ãŸã¯èªè¨¼æƒ…å ±ã€ãã®ä»–ã®æŽ¥ç¶šè©³ç´°ã‚’入力ã—ã¦ClickPipeã®ãƒ•ã‚©ãƒ¼ãƒ ã‚’記入ã—ã¾ã™ã€‚ + + ![Fill out connection details](./images/cp_step2_kinesis.png) + +5. Kinesis Streamã¨é–‹å§‹ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’é¸æŠžã—ã¾ã™ã€‚UIã¯é¸æŠžã—ãŸã‚½ãƒ¼ã‚¹ï¼ˆKafkaトピックãªã©ï¼‰ã®ã‚µãƒ³ãƒ—ルドキュメントを表示ã—ã¾ã™ã€‚ã¾ãŸã€Kinesisストリームã®ãƒ‘フォーマンスã¨å®‰å®šæ€§ã‚’å‘上ã•ã›ã‚‹ãŸã‚ã«Enhanced Fan-outを有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆEnhanced Fan-outã®è©³ç´°ã¯ã“ã¡ã‚‰[ã“ã¡ã‚‰](https://aws.amazon.com/blogs/aws/kds-enhanced-fanout)ã§ç¢ºèªã§ãã¾ã™ï¼‰ã€‚ + + ![Set data format and topic](./images/cp_step3_kinesis.png) + +6. 次ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã¯ã€æ–°ã—ã„ClickHouseテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’å–り込むã‹ã€æ—¢å­˜ã®ãƒ†ãƒ¼ãƒ–ルをå†åˆ©ç”¨ã™ã‚‹ã‹ã‚’é¸æŠžã§ãã¾ã™ã€‚ç”»é¢ã®æŒ‡ç¤ºã«å¾“ã£ã¦ãƒ†ãƒ¼ãƒ–ルåã€ã‚¹ã‚­ãƒ¼ãƒžã€ãŠã‚ˆã³è¨­å®šã‚’変更ã—ã¾ã™ã€‚サンプルテーブルã®ä¸Šéƒ¨ã§å¤‰æ›´ã®ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ãƒ—レビューを確èªã§ãã¾ã™ã€‚ + + ![Set table, schema, and settings](./images/cp_step4a.png) + + æä¾›ã•ã‚Œã¦ã„るコントロールを使用ã—ã¦é«˜åº¦ãªè¨­å®šã‚’カスタマイズã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + ![Set advanced controls](./images/cp_step4a3.png) + +7. ã‚ã‚‹ã„ã¯ã€æ—¢å­˜ã®ClickHouseテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’å–り込むã“ã¨ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ãã®å ´åˆã€UIã¯ã‚½ãƒ¼ã‚¹ã‹ã‚‰é¸æŠžã—ãŸå®›å…ˆãƒ†ãƒ¼ãƒ–ルã®ClickHouseフィールドã¸ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãƒžãƒƒãƒ”ングを許å¯ã—ã¾ã™ã€‚ + + ![Use and existing table](./images/cp_step4b.png) + +8. 最後ã«ã€å†…部ClickPipesユーザーã®æ¨©é™ã‚’設定ã§ãã¾ã™ã€‚ + + **Permissions:** ClickPipesã¯å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込む専用ユーザーを作æˆã—ã¾ã™ã€‚ã“ã®å†…部ユーザーã®ãŸã‚ã«ã‚«ã‚¹ã‚¿ãƒ ãƒ­ãƒ¼ãƒ«ã¾ãŸã¯äº‹å‰å®šç¾©ã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã‚’é¸æŠžã§ãã¾ã™ï¼š + - `Full access`: クラスターã¸ã®å®Œå…¨ã‚¢ã‚¯ã‚»ã‚¹ã‚’æŒã¤ã€‚ã“ã‚Œã¯ã€Materialized Viewã¾ãŸã¯Dictionaryを宛先テーブルã§ä½¿ç”¨ã™ã‚‹å ´åˆã«æœ‰ç”¨ã§ã™ã€‚ + - `Only destination table`: 宛先テーブルã¸ã®`INSERT`権é™ã®ã¿ã‚’æŒã¤ã€‚ + + ![permissions](./images/cp_step5.png) + +9. 「Complete Setupã€ã‚’クリックã™ã‚‹ã¨ã€ã‚·ã‚¹ãƒ†ãƒ ã¯ã‚ãªãŸã®ClickPipeを登録ã—ã€è¦ç´„テーブルã«è¡¨ç¤ºã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + + ![Success notice](./images/cp_success.png) + + ![Remove notice](./images/cp_remove.png) + + è¦ç´„テーブルã«ã¯ã€ClickHouseã®ã‚½ãƒ¼ã‚¹ã¾ãŸã¯å®›å…ˆãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã‚µãƒ³ãƒ—ルデータを表示ã™ã‚‹ãŸã‚ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + + ![View destination](./images/cp_destination.png) + + ã•ã‚‰ã«ClickPipeを削除ã—ã€å–ã‚Šè¾¼ã¿ã‚¸ãƒ§ãƒ–ã®è¦ç´„を表示ã™ã‚‹ãŸã‚ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚‚ã‚ã‚Šã¾ã™ã€‚ + + ![View overview](./images/cp_overview.png) + +10. **ãŠã‚ã§ã¨ã†ã”ã–ã„ã¾ã™ï¼** åˆã‚ã¦ã®ClickPipeを正常ã«è¨­å®šã—ã¾ã—ãŸã€‚ã“ã‚ŒãŒã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ClickPipeã®å ´åˆã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‹ã‚‰ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§ãƒ‡ãƒ¼ã‚¿ã‚’連続ã—ã¦å–り込むã“ã¨ã«ãªã‚Šã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°ã€ãƒãƒƒãƒã‚’å–ã‚Šè¾¼ã¿å®Œäº†ã—ã¾ã™ã€‚ + +## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータフォーマット + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るフォーマットã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š +- [JSON](../../../interfaces/formats.md/#json) + +## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型 + +ClickPipesã§ã¯ã€ä»¥ä¸‹ã®ClickHouseデータ型ãŒç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼š + +- 基本数値型 - \[U\]Int8/16/32/64ãŠã‚ˆã³Float32/64 +- 大ããªæ•´æ•°åž‹ - \[U\]Int128/256 +- Decimalåž‹ +- ブール型 +- String +- FixedString +- Date, Date32 +- DateTime, DateTime64(UTCタイムゾーンã®ã¿ï¼‰ +- Enum8/Enum16 +- UUID +- IPv4 +- IPv6 +- ã™ã¹ã¦ã®ClickHouse LowCardinalityåž‹ +- Map(上記ã®åž‹ãŠã‚ˆã³Nullableを使用ã—ãŸã‚­ãƒ¼ãŠã‚ˆã³å€¤ï¼‰ +- TupleãŠã‚ˆã³Array(上記ã®åž‹ãŠã‚ˆã³Nullableを使用ã—ãŸè¦ç´ ã€ä¸€æ®µéšŽã®æ·±ã•ã®ã¿ï¼‰ + +## Kinesis仮想カラム + +Kinesisストリームã«å¯¾ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る仮想カラムã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ã€‚æ–°ã—ã„宛先テーブルを作æˆã™ã‚‹éš›ã€`Add Column`ボタンを使用ã—ã¦ä»®æƒ³ã‚«ãƒ©ãƒ ã‚’追加ã§ãã¾ã™ã€‚ + +| åå‰ | 説明 | 推奨データ型 | +|--------------|---------------------------------------------------------------|-----------------------| +| _key | Kinesis パーティションキー | String | +| _timestamp | Kinesis ãŠãŠã‚ˆãã®åˆ°ç€ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—(ミリ秒精度) | DateTime64(3) | +| _stream | Kafka ストリームå | String | +| _raw_message | 完全㪠Kinesis メッセージ | String | + +_raw_messageフィールドã¯ã€å®Œå…¨ãªKinesis JSONレコードãŒå¿…è¦ãªå ´åˆï¼ˆä¾‹ãˆã°ã€ClickHouseã®[`JsonExtract*`](https://clickhouse.com/docs/ja/sql-reference/functions/json-functions#jsonextract-functions)関数を使用ã—ã¦ä¸‹æµã®materialized viewを埋ã‚ã‚‹å ´åˆï¼‰ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ã“ã®ã‚ˆã†ãªãƒ‘イプã§ã¯ã€ã™ã¹ã¦ã®ã€Œéžä»®æƒ³ã€ã‚«ãƒ©ãƒ ã‚’削除ã™ã‚‹ã“ã¨ã§ClickPipesã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 制é™äº‹é … + +- [DEFAULT](https://clickhouse.com/docs/ja/sql-reference/statements/create/table#default)ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +## パフォーマンス + +### ãƒãƒƒãƒãƒ³ã‚° + +ClickPipesã¯ãƒ‡ãƒ¼ã‚¿ã‚’ãƒãƒƒãƒã§ClickHouseã«æŒ¿å…¥ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ãƒ‘ーツãŒå¤šããªã‚Šã™ãŽã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã‚¯ãƒ©ã‚¹ã‚¿ã®ãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹ã“ã¨ã‚’é¿ã‘ã‚‹ãŸã‚ã§ã™ã€‚ + +ãƒãƒƒãƒã¯ã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã®æ¡ä»¶ã‚’満ãŸã™ã¨æŒ¿å…¥ã•ã‚Œã¾ã™ï¼š +- ãƒãƒƒãƒã‚µã‚¤ã‚ºãŒæœ€å¤§ã‚µã‚¤ã‚ºã«é”ã—ãŸã¨ã(100,000è¡Œã¾ãŸã¯20MB) +- ãƒãƒƒãƒãŒæœ€å¤§æ™‚間(5秒)開ã‹ã‚Œã¦ã„ãŸã¨ã + +### レイテンシー + +レイテンシー(KinesisメッセージãŒã‚¹ãƒˆãƒªãƒ¼ãƒ ã«é€ä¿¡ã•ã‚Œã€ClickHouseã§åˆ©ç”¨å¯èƒ½ã«ãªã‚‹ã¾ã§ã®æ™‚間)ã¯ã€ã„ãã¤ã‹ã®è¦å› ï¼ˆä¾‹ï¼škinesisã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚µã‚¤ã‚º/フォーマット)ã«ä¾å­˜ã—ã¾ã™ã€‚上記ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹[ãƒãƒƒãƒãƒ³ã‚°](#Batching)もレイテンシーã«å½±éŸ¿ã—ã¾ã™ã€‚ãŠå®¢æ§˜ã®ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã‚’テストã—ã¦ã€æœŸå¾…ã•ã‚Œã‚‹ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã‚’ç†è§£ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +特定ã®ä½Žãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼è¦ä»¶ãŒã‚ã‚‹å ´åˆã¯ã€[ã“ã“ã‹ã‚‰ãŠå•ã„åˆã‚ã›ãã ã•ã„](https://clickhouse.com/company/contact?loc=clickpipes)。 + +### スケーリング + +Kinesiså‘ã‘ClickPipesã¯æ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚’å‰æã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚デフォルトã§ã¯ã€2ã¤ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžãƒ¼ã‚’作æˆã—ã¾ã™ã€‚ã“れを増やã™ã«ã¯ã€[ã“ã¡ã‚‰ã‹ã‚‰ãŠå•ã„åˆã‚ã›ãã ã•ã„](https://clickhouse.com/company/contact?loc=clickpipes)。 + +## èªè¨¼ + +Amazon Kinesisストリームã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€[IAMèªè¨¼æƒ…å ±](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)ã¾ãŸã¯[IAMロール](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)を使用ã§ãã¾ã™ã€‚IAMロールã®è¨­å®šæ–¹æ³•ã«é–¢ã™ã‚‹è©³ç´°ã¯ã€[ã“ã®ã‚¬ã‚¤ãƒ‰](./secure-kinesis.md)ã‚’å‚ç…§ã—ã¦ã€ClickHouse Cloudã¨é€£æºã™ã‚‹ãƒ­ãƒ¼ãƒ«ã®è¨­å®šæ–¹æ³•ã«ã¤ã„ã¦ç¢ºèªã§ãã¾ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/object-storage.md b/docs/ja/integrations/data-ingestion/clickpipes/object-storage.md new file mode 100644 index 00000000000..73497dd3df4 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/clickpipes/object-storage.md @@ -0,0 +1,146 @@ +--- +sidebar_label: オブジェクトストレージ用ã®ClickPipes +description: ã‚ãªãŸã®ã‚ªãƒ–ジェクトストレージをClickHouse Cloudã«ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ã«æŽ¥ç¶šã—ã¾ã™ã€‚ +slug: /ja/integrations/clickpipes/object-storage +--- +import S3SVG from "../../images/logos/amazon_s3_logo.svg"; +import GCSSVG from "../../images/logos/gcs.svg"; + +# オブジェクトストレージã¨ClickHouse Cloudã®çµ±åˆ +## å‰ææ¡ä»¶ +[ClickPipesã®ç´¹ä»‹](./index.md)を確èªã—ã¦ã„ã‚‹ã“ã¨ã€‚ + +## åˆã‚ã¦ã®ClickPipeã®ä½œæˆ + +1. ClickHouse Cloud Serviceã®SQLコンソールã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ + + ![ClickPipesサービス](./images/cp_service.png) + +2. å·¦å´ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰`Data Sources`ボタンをé¸æŠžã—ã€ã€ŒSet up a ClickPipeã€ã‚’クリックã—ã¾ã™ã€‚ + + ![インãƒãƒ¼ãƒˆã‚’é¸æŠž](./images/cp_step0.png) + +3. データソースをé¸æŠžã—ã¾ã™ã€‚ + + ![データソースタイプをé¸æŠž](./images/cp_step1.png) + +4. フォームã«ClickPipeã®åå‰ã€èª¬æ˜Žï¼ˆã‚ªãƒ—ション)ã€IAMロールã¾ãŸã¯è³‡æ ¼æƒ…å ±ã€ãƒã‚±ãƒƒãƒˆURLを入力ã—ã¦ãƒ•ã‚©ãƒ¼ãƒ ã‚’記入ã—ã¾ã™ã€‚bash風ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’使用ã—ã¦è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’指定ã§ãã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[パスã§ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã®ä½¿ç”¨ã«é–¢ã™ã‚‹æ–‡æ›¸](#limitations)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + ![接続詳細を記入](./images/cp_step2_object_storage.png) + +5. 指定ã•ã‚ŒãŸãƒã‚±ãƒƒãƒˆå†…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒªã‚¹ãƒˆãŒUIã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚データフォーマットをé¸æŠžã—(ç¾åœ¨ã€ClickHouseフォーマットã®ã‚µãƒ–セットをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼‰ã€ç¶™ç¶šçš„ãªå–ã‚Šè¾¼ã¿ã‚’有効ã«ã—ãŸã„å ´åˆã¯[以下ã®è©³ç´°](#continuous-ingest)ã‚’ã”覧ãã ã•ã„。 + + ![データフォーマットã¨ãƒˆãƒ”ックを設定](./images/cp_step3_object_storage.png) + +6. 次ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã¯ã€æ–°ã—ã„ClickHouseテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’å–り込むã‹ã€æ—¢å­˜ã®ãƒ†ãƒ¼ãƒ–ルをå†åˆ©ç”¨ã™ã‚‹ã‹ã‚’é¸æŠžã§ãã¾ã™ã€‚ç”»é¢ã®æŒ‡ç¤ºã«å¾“ã£ã¦ã€ãƒ†ãƒ¼ãƒ–ルåã€ã‚¹ã‚­ãƒ¼ãƒžã€è¨­å®šã‚’変更ã—ã¾ã™ã€‚サンプルテーブルã®ä¸Šéƒ¨ã§ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã®å¤‰æ›´ãƒ—レビューを見るã“ã¨ãŒã§ãã¾ã™ã€‚ + + ![テーブルã€ã‚¹ã‚­ãƒ¼ãƒžã€ãŠã‚ˆã³è¨­å®šã‚’設定](./images/cp_step4a.png) + + æä¾›ã•ã‚ŒãŸã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’使用ã—ã¦ã€é«˜åº¦ãªè¨­å®šã‚’カスタマイズã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + ![高度ãªã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’設定](./images/cp_step4a3.png) + +7. ã‚ã‚‹ã„ã¯ã€æ—¢å­˜ã®ClickHouseテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’å–り込むã“ã¨ã‚‚é¸æŠžã§ãã¾ã™ã€‚ãã®å ´åˆã€UIã¯ã‚½ãƒ¼ã‚¹ã‹ã‚‰é¸æŠžã•ã‚ŒãŸå®›å…ˆãƒ†ãƒ¼ãƒ–ルã®ClickHouseフィールドã¸ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’マッピングã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + + ![既存ã®ãƒ†ãƒ¼ãƒ–ルを使用](./images/cp_step4b.png) + +:::info +[_path]ã‚„[_size]ã®ã‚ˆã†ãª[仮想カラム](../../sql-reference/table-functions/s3#virtual-columns)をフィールドã«ãƒžãƒƒãƒ”ングã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +::: + +8. 最後ã«ã€å†…部clickpipesユーザーã®æ¨©é™ã‚’設定ã§ãã¾ã™ã€‚ + + **権é™:** ClickPipesã¯ã€å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むãŸã‚ã®å°‚用ユーザーを作æˆã—ã¾ã™ã€‚ã“ã®å†…部ユーザーã®ãƒ­ãƒ¼ãƒ«ã‚’カスタムロールã¾ãŸã¯ä»¥ä¸‹ã®äº‹å‰å®šç¾©ã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã§é¸æŠžã§ãã¾ã™: + - `Full access`: クラスターã¸ã®å®Œå…¨ãªã‚¢ã‚¯ã‚»ã‚¹æ¨©ãŒã‚ã‚Šã¾ã™ã€‚Materialized Viewã‚„Dictionaryを宛先テーブルã§ä½¿ç”¨ã™ã‚‹å ´åˆã«å¿…è¦ã§ã™ã€‚ + - `Only destination table`: 宛先テーブルã¸ã®`INSERT`権é™ã®ã¿ã€‚ + + ![権é™](./images/cp_step5.png) + +9. 「Complete Setupã€ã‚’クリックã™ã‚‹ã¨ã€ã‚·ã‚¹ãƒ†ãƒ ãŒã‚ãªãŸã®ClickPipeを登録ã—ã€ã‚µãƒžãƒªãƒ¼ãƒ†ãƒ¼ãƒ–ルã«ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„ã‚‹ã®ã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚ + + ![æˆåŠŸé€šçŸ¥](./images/cp_success.png) + + ![削除通知](./images/cp_remove.png) + + サマリーテーブルã¯ã€ClickHouseã®ã‚½ãƒ¼ã‚¹ã¾ãŸã¯å®›å…ˆãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã‚µãƒ³ãƒ—ルデータを表示ã™ã‚‹ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’æä¾›ã—ã¾ã™ã€‚ + + ![宛先を表示](./images/cp_destination.png) + + ã¾ãŸã€ClickPipeを削除ã—ã€å–ã‚Šè¾¼ã¿ã‚¸ãƒ§ãƒ–ã®ã‚µãƒžãƒªãƒ¼ã‚’表示ã™ã‚‹ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚‚ã‚ã‚Šã¾ã™ã€‚ + + ![概è¦ã‚’表示](./images/cp_overview.png) + +10. **ãŠã‚ã§ã¨ã†ã”ã–ã„ã¾ã™ï¼** ã‚ãªãŸã®åˆã‚ã¦ã®ClickPipeã‚’æˆåŠŸè£ã«è¨­å®šã—ã¾ã—ãŸã€‚ã“ã‚ŒãŒã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ClickPipeã§ã‚ã‚‹å ´åˆã€ãã‚Œã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‹ã‚‰ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§ãƒ‡ãƒ¼ã‚¿ã‚’継続的ã«å–ã‚Šè¾¼ã¿ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ã€ãƒãƒƒãƒã‚’å–り込んã§å®Œäº†ã—ã¾ã™ã€‚ + +## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータソース + +|åå‰|ロゴ|タイプ|ステータス|説明| +|----|----|----|------|-----------| +|Amazon S3||オブジェクトストレージ|Beta|オブジェクトストレージã‹ã‚‰å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’å–り込むãŸã‚ã«ClickPipesを設定ã—ã¾ã™ã€‚| +|Google Cloud Storage||オブジェクトストレージ|Beta|オブジェクトストレージã‹ã‚‰å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’å–り込むãŸã‚ã«ClickPipesを設定ã—ã¾ã™ã€‚| + +ClickPipesã«ã¯ä»Šå¾Œã‚ˆã‚Šå¤šãã®ã‚³ãƒã‚¯ã‚¿ãŒè¿½åŠ ã•ã‚Œã‚‹äºˆå®šã§ã™ã€‚[ã“ã¡ã‚‰ã‹ã‚‰ãŠå•ã„åˆã‚ã›ãã ã•ã„](https://clickhouse.com/company/contact?loc=clickpipes)ã§è©³ç´°ã‚’確èªã§ãã¾ã™ã€‚ + +## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータフォーマット + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るフォーマットã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: +- [JSON](../../../interfaces/formats.md/#json) +- [CSV](../../../interfaces/formats.md/#csv) +- [Parquet](../../../interfaces/formats.md/#parquet) + +## スケーリング + +オブジェクトストレージClickPipesã¯ã€[設定ã•ã‚ŒãŸç¸¦æ–¹å‘ã®è‡ªå‹•ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°è¨­å®š](/docs/ja/manage/scaling#configuring-vertical-auto-scaling)ã«ã‚ˆã‚Šæ±ºå®šã•ã‚ŒãŸæœ€å°ã®ClickHouseサービスサイズã«åŸºã¥ã„ã¦ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ClickPipeã®ã‚µã‚¤ã‚ºã¯ãƒ‘イプ作æˆæ™‚ã«æ±ºå®šã•ã‚Œã€å¾Œç¶šã®ClickHouseサービス設定ã®å¤‰æ›´ã¯ClickPipeã®ã‚µã‚¤ã‚ºã«å½±éŸ¿ã—ã¾ã›ã‚“。 + +大è¦æ¨¡ãªå–ã‚Šè¾¼ã¿ã‚¸ãƒ§ãƒ–ã®ã‚¹ãƒ«ãƒ¼ãƒ—ットを増加ã•ã›ã‚‹ãŸã‚ã€ClickPipeを作æˆã™ã‚‹å‰ã«ClickHouseサービスをスケーリングã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## Materialized Views + +オブジェクトストレージClickPipesã§Materialized Viewsを使用ã™ã‚‹å ´åˆã€ä½œæˆæ™‚ã«`Full access`権é™ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚ŒãŒä¸å¯èƒ½ãªå ´åˆã¯ã€ãƒ‘イプãŒå®›å…ˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³Materialized Viewsを作æˆã§ãã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +オブジェクトストレージClickPipeã®å®Ÿè¡Œä¸­ã«ä½œæˆã•ã‚Œã‚‹Materialized Viewsã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ã¾ã›ã‚“。パイプをåœæ­¢ã—å†èµ·å‹•ã™ã‚‹ã“ã¨ã§ã€ãƒ‘イプãŒMaterialized Viewsã‚’å–å¾—ã—始ã‚ã¾ã™ã€‚以下ã®[制é™](#limitations)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 制é™äº‹é … +- 宛先テーブルã€ãã®Materialized Views(カスケードMaterialized Viewsã‚’å«ã‚€ï¼‰ã€ã¾ãŸã¯Materialized Viewsã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã®å¤‰æ›´ã¯ã€ãƒ‘イプã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«å–å¾—ã•ã‚Œãšã€ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚パイプをåœæ­¢ã—ã€å¿…è¦ãªå¤‰æ›´ã‚’加ãˆã¦ã‹ã‚‰ãƒ‘イプをå†èµ·å‹•ã—ã€å¤‰æ›´ã‚’å–å¾—ã—ã€ã‚¨ãƒ©ãƒ¼ã‚„å†è©¦è¡Œã«ã‚ˆã‚‹é‡è¤‡ãƒ‡ãƒ¼ã‚¿ã‚’回é¿ã—ã¦ãã ã•ã„。 +- GCPã¾ãŸã¯Azureã«ãƒ‡ãƒ—ロイã•ã‚ŒãŸClickHouse Cloudインスタンス用ã«ã€S3 ClickPipesã®ãƒ­ãƒ¼ãƒ«èªè¨¼ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。AWS ClickHouse Cloudインスタンスã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +- ClickPipesã¯10GB以下ã®ã‚ªãƒ–ジェクトã®å–ã‚Šè¾¼ã¿ã®ã¿ã‚’試ã¿ã¾ã™ã€‚10GBを超ãˆã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ClickPipes専用ã®ã‚¨ãƒ©ãƒ¼ãƒ†ãƒ¼ãƒ–ルã«ã‚¨ãƒ©ãƒ¼ã‚’追加ã—ã¾ã™ã€‚ +- S3 / GCS ClickPipesã¯ã€[S3 Table Function](https://clickhouse.com/docs/ja/sql-reference/table-functions/file#globs_in_path)ã¨ãƒªã‚¹ãƒˆæ§‹æ–‡ã‚’共有ã—ã¦**ã„ã¾ã›ã‚“**。 + - `?` — ä»»æ„ã®1文字ã«ç½®ãæ›ãˆã¾ã™ã€‚ + - `*` — 空ã®æ–‡å­—列をå«ã‚€ä»»æ„ã®æ•°ã®ä»»æ„ã®æ–‡å­—ã«ç½®ãæ›ãˆã¾ã™ã€‚ + - `**` — 空ã®æ–‡å­—列をå«ã‚€ä»»æ„ã®æ•°ã®ä»»æ„ã®æ–‡å­—ã«ç½®ãæ›ãˆã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯æœ‰åŠ¹ãªãƒ‘スã§ã™: + +https://datasets-documentation.s3.eu-west-3.amazonaws.com/http/**.ndjson.gz + + +ã“ã‚Œã¯æœ‰åŠ¹ãªãƒ‘スã§ã¯ã‚ã‚Šã¾ã›ã‚“。ClickPipesã§ã¯`{N..M}`ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +https://datasets-documentation.s3.eu-west-3.amazonaws.com/http/{documents-01,documents-02}.ndjson.gz +::: + +## 継続的ãªå–り込㿠+ClickPipesã¯S3ãŠã‚ˆã³GCSã‹ã‚‰ã®ç¶™ç¶šçš„ãªå–ã‚Šè¾¼ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚有効ã«ã™ã‚‹ã¨ã€ClickPipesã¯æŒ‡å®šã•ã‚ŒãŸãƒ‘スã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’継続的ã«å–ã‚Šè¾¼ã¿ã€æ–°ã—ã„ファイルを30秒ã”ã¨ã«ãƒãƒ¼ãƒªãƒ³ã‚°ã—ã¾ã™ã€‚ãŸã ã—ã€æ–°ã—ã„ファイルã¯æœ€å¾Œã«å–ã‚Šè¾¼ã¾ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚ˆã‚Šã‚‚辞書順ã§å¤§ãããªã‘ã‚Œã°ãªã‚‰ãšã€å–ã‚Šè¾¼ã¿ã®é †åºã‚’定義ã™ã‚‹ã‚ˆã†ã«åå‰ãŒä»˜ã‘られã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€`file1`ã€`file2`ã€`file3`ãªã©ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯é †ç•ªã«å–ã‚Šè¾¼ã¾ã‚Œã¾ã™ã€‚`file0`ã®ã‚ˆã†ãªåå‰ã®æ–°ã—ã„ファイルãŒè¿½åŠ ã•ã‚Œã¦ã‚‚ã€è¾žæ›¸é †ã§æœ€å¾Œã«å–ã‚Šè¾¼ã¾ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚ˆã‚Šå¤§ãããªã„ãŸã‚ã€ClickPipesã¯ãれをå–ã‚Šè¾¼ã¿ã¾ã›ã‚“。 + +## アーカイブテーブル +ClickPipesã¯ã€å®›å…ˆãƒ†ãƒ¼ãƒ–ルã®éš£ã«`_archive`ã®æŽ¥å°¾è¾žã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€ClickPipeã«ã‚ˆã£ã¦å–ã‚Šè¾¼ã¾ã‚ŒãŸã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒªã‚¹ãƒˆãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯å–ã‚Šè¾¼ã¿ä¸­ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’追跡ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒå–ã‚Šè¾¼ã¾ã‚ŒãŸã“ã¨ã‚’確èªã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚アーカイブテーブルã«ã¯7æ—¥ã®[有効期é™](https://clickhouse.com/docs/ja/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-ttl)ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“れらã®ãƒ†ãƒ¼ãƒ–ルã¯ClickHouse Cloud SQLコンソールを使用ã—ã¦ã‚‚表示ã•ã‚Œã¾ã›ã‚“。HTTPSã¾ãŸã¯ãƒã‚¤ãƒ†ã‚£ãƒ–接続を介ã—ã¦å¤–部クライアントを使用ã—ã¦æŽ¥ç¶šã—ã€èª­ã¿å–ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## èªè¨¼ + +### S3 +公開ãƒã‚±ãƒƒãƒˆã«ã¯è¨­å®šãªã—ã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã€ä¿è­·ã•ã‚ŒãŸãƒã‚±ãƒƒãƒˆã«ã¯[IAM資格情報](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)ã¾ãŸã¯[IAMロール](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)を使用ã§ãã¾ã™ã€‚データã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã«å¿…è¦ãªæ¨©é™ã‚’ç†è§£ã™ã‚‹ã«ã¯ã€[ã“ã®ã‚¬ã‚¤ãƒ‰ã‚’å‚ç…§ã—ã¦ãã ã•ã„](/docs/ja/cloud/security/secure-s3)。 + +### GCS +S3ã¨åŒæ§˜ã«ã€å…¬é–‹ãƒã‚±ãƒƒãƒˆã«ã¯è¨­å®šãªã—ã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã€ä¿è­·ã•ã‚ŒãŸãƒã‚±ãƒƒãƒˆã«ã¯AWS IAM資格情報ã®ä»£ã‚ã‚Šã«[HMACキー](https://cloud.google.com/storage/docs/authentication/managing-hmackeys)を使用ã§ãã¾ã™ã€‚ã“ã®ã‚­ãƒ¼ã®è¨­å®šæ–¹æ³•ã«ã¤ã„ã¦ã¯ã€Google Cloudã®ã‚¬ã‚¤ãƒ‰ã‚’å‚ç…§ã—ã¦ãã ã•ã„。[ã“ã®ã‚­ãƒ¼ã®è¨­å®šæ–¹æ³•](https://cloud.google.com/storage/docs/authentication/hmackeys)。 + +GCSã®ã‚µãƒ¼ãƒ“スアカウントã¯ç›´æŽ¥ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。公開ã•ã‚Œã¦ã„ãªã„ãƒã‚±ãƒƒãƒˆã«å¯¾ã—ã¦èªè¨¼ã™ã‚‹éš›ã«ã¯HMAC(IAM)資格情報を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚HMAC資格情報ã«ä»˜éšã™ã‚‹ã‚µãƒ¼ãƒ“スアカウントã®æ¨©é™ã¯`storage.objects.list`ãŠã‚ˆã³`storage.objects.get`ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## よãã‚ã‚‹è³ªå• +- **ClickPipesã¯`gs://`ã§å§‹ã¾ã‚‹GCSãƒã‚±ãƒƒãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã‹ï¼Ÿ** + +ã„ã„ãˆã€‚相互é‹ç”¨æ€§ã®ãŸã‚ã«ã€`gs://`ãƒã‚±ãƒƒãƒˆãƒ—レフィックスを`https://storage.googleapis.com/`ã«ç½®ãæ›ãˆã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/postgres.md b/docs/ja/integrations/data-ingestion/clickpipes/postgres.md new file mode 100644 index 00000000000..a2aae58f65d --- /dev/null +++ b/docs/ja/integrations/data-ingestion/clickpipes/postgres.md @@ -0,0 +1,11 @@ +--- +sidebar_label: PostgreSQL 用 ClickPipes +description: PostgreSQL をシームレス㫠ClickHouse Cloud ã«æŽ¥ç¶šã—ã¾ã™ã€‚ +slug: /ja/integrations/clickpipes/postgres +--- + +# ClickHouse Cloud ã¨ã® PostgreSQL çµ±åˆ + +PeerDB 㯠ClickHouse ã¨ææºã—ã€æœ€é€Ÿã® Postgres CDC ã‚’æä¾›ã—ã¾ã™ï¼ã‚¹ã‚¿ãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€[PeerDB Cloud](https://www.peerdb.io/) ã§ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’作æˆã—ã€ClickHouse Cloud ã®è¨­å®šæ‰‹é †ã«ã¤ã„ã¦ã¯[ドキュメント](https://docs.peerdb.io/connect/clickhouse/clickhouse-cloud)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +今後数ヶ月ã§ã€PostgreSQL CDC ã‚’ ClickPipes ã«å®Œå…¨ã«çµ±åˆã•ã‚ŒãŸã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã¨ã—ã¦æä¾›ã™ã‚‹äºˆå®šã§ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/clickpipes/secure-kinesis.md b/docs/ja/integrations/data-ingestion/clickpipes/secure-kinesis.md new file mode 100644 index 00000000000..fdecd10918d --- /dev/null +++ b/docs/ja/integrations/data-ingestion/clickpipes/secure-kinesis.md @@ -0,0 +1,95 @@ +--- +slug: /ja/integrations/clickpipes/secure-kinesis +sidebar_label: Kinesis ロールベース アクセス +title: Kinesis ロールベース アクセス +--- + +ã“ã®è¨˜äº‹ã§ã¯ã€ClickPipes 顧客ãŒãƒ­ãƒ¼ãƒ«ãƒ™ãƒ¼ã‚¹ãƒ»ã‚¢ã‚¯ã‚»ã‚¹ã‚’活用ã—㦠Amazon Kinesis ã«èªè¨¼ã—ã€å®‰å…¨ã«ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒªãƒ¼ãƒ ã¸ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚ + +## ã¯ã˜ã‚ã« + +Kinesis ã¸ã®å®‰å…¨ãªã‚¢ã‚¯ã‚»ã‚¹ã‚’設定ã™ã‚‹å‰ã«ã€ãã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’ç†è§£ã™ã‚‹ã“ã¨ãŒé‡è¦ã§ã™ã€‚以下ã¯ã€ClickPipes ãŒé¡§å®¢ã® AWS アカウント内ã§ãƒ­ãƒ¼ãƒ«ã‚’引ãå—ã‘ã‚‹ã“ã¨ã§ Amazon Kinesis ストリームã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ–¹æ³•ã®æ¦‚è¦ã§ã™ã€‚ + +![securekinesis](@site/docs/ja/integrations/data-ingestion/clickpipes/images/securekinesis.jpg) + +ã“ã®æ–¹æ³•ã‚’使用ã™ã‚‹ã“ã¨ã§ã€é¡§å®¢ã¯ IAM ãƒãƒªã‚·ãƒ¼ï¼ˆå¼•ãå—ã‘られるロール㮠IAM ãƒãƒªã‚·ãƒ¼ï¼‰å†…㧠Kinesis データストリームã¸ã®ã™ã¹ã¦ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’一元管ç†ã§ãã€ãã‚Œãžã‚Œã®ã‚¹ãƒˆãƒªãƒ¼ãƒ ã®ã‚¢ã‚¯ã‚»ã‚¹ãƒãƒªã‚·ãƒ¼ã‚’個別ã«å¤‰æ›´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã›ã‚“。 + +## 設定 + +### ClickHouse サービス IAM ロール Arn ã®å–å¾— + +1 - ClickHouse クラウドアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚ + +2 - çµ±åˆã—ãŸã„ ClickHouse サービスをé¸æŠžã—ã¾ã™ã€‚ + +3 - **設定** タブをé¸æŠžã—ã¾ã™ã€‚ + +4 - ページ下部㮠**ã“ã®ã‚µãƒ¼ãƒ“スã«ã¤ã„ã¦** セクションã¾ã§ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ã¾ã™ã€‚ + +5 - 以下ã«ç¤ºã™ã‚ˆã†ã«ã€ã‚µãƒ¼ãƒ“スã«å±žã™ã‚‹ **IAM ロール** ã®å€¤ã‚’コピーã—ã¾ã™ã€‚ + +![s3info](@site/docs/ja/cloud/security/images/secures3_arn.jpg) + +### IAM ロールã®è¨­å®š + +#### IAM ロールを手動ã§ä½œæˆ + +1 - IAM ユーザーã¨ã—ã¦ã®è¨±å¯ãŒã‚ã‚‹ AWS アカウントã«ã‚¦ã‚§ãƒ–ブラウザã§ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ã€IAM ロールを作æˆãŠã‚ˆã³ç®¡ç†ã—ã¾ã™ã€‚ + +2 - IAM サービスコンソールã«ç§»å‹•ã—ã¾ã™ã€‚ + +3 - 以下㮠IAM ãŠã‚ˆã³ä¿¡é ¼ãƒãƒªã‚·ãƒ¼ã‚’æŒã¤æ–°ã—ã„ IAM ロールを作æˆã—ã¾ã™ã€‚IAM ロールã®åå‰ã¯ `ClickHouseAccessRole-` ã§å§‹ã‚ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +ä¿¡é ¼ãƒãƒªã‚·ãƒ¼ï¼ˆ{ClickHouse_IAM_ARN} ã‚’ ClickHouse インスタンスã«å±žã™ã‚‹ IAM ロール㮠arn ã§ç½®ãæ›ãˆã¦ãã ã•ã„): + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": "{ClickHouse_IAM_ARN}" + }, + "Action": "sts:AssumeRole" + } + ] +} +``` + +IAM ãƒãƒªã‚·ãƒ¼ï¼ˆ{STREAM_NAME} ã‚’ Kinesis ストリームåã§ç½®ãæ›ãˆã¦ãã ã•ã„): + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "kinesis:DescribeStream", + "kinesis:GetShardIterator", + "kinesis:GetRecords", + "kinesis:ListShards", + "kinesis:SubscribeToShard", + "kinesis:DescribeStreamConsumer", + "kinesis:RegisterStreamConsumer", + "kinesis:DeregisterStreamConsumer", + "kinesis:ListStreamConsumers" + ], + "Resource": [ + "arn:aws:kinesis:region:account-id:stream/{STREAM_NAME}" + ], + "Effect": "Allow" + }, + { + "Action": [ + "kinesis:ListStreams" + ], + "Resource": "*", + "Effect": "Allow" + } + ] + +} +``` + +4 - 作æˆå¾Œã€æ–°ã—ã„ **IAM ロール Arn** をコピーã—ã¾ã™ã€‚ã“れ㌠Kinesis ストリームã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/data-formats/_category_.yml b/docs/ja/integrations/data-ingestion/data-formats/_category_.yml new file mode 100644 index 00000000000..f8179149dd5 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/_category_.yml @@ -0,0 +1,7 @@ +position: 5 +label: 'Data Formats' +collapsible: true +collapsed: true +link: + type: doc + id: intro diff --git a/docs/ja/integrations/data-ingestion/data-formats/arrow-avro-orc.md b/docs/ja/integrations/data-ingestion/data-formats/arrow-avro-orc.md new file mode 100644 index 00000000000..606ee064533 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/arrow-avro-orc.md @@ -0,0 +1,165 @@ +--- +sidebar_label: Avroã€Arrowã€ãŠã‚ˆã³ ORC +sidebar_position: 5 +slug: /ja/integrations/data-formats/arrow-avro-orc +--- + +# ClickHouseã§ã®Avroã€Arrowã€ãŠã‚ˆã³ORCデータã®æ“作 + +Apacheã¯ã€åˆ†æžç’°å¢ƒã§åºƒã使用ã•ã‚Œã‚‹è¤‡æ•°ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’リリースã—ã¦ãŠã‚Šã€ãã®ä¸­ã«ã¯äººæ°—ã®ã‚ã‚‹[Avro](https://avro.apache.org/)ã€[Arrow](https://arrow.apache.org/)ã€ãã—ã¦[Orc](https://orc.apache.org/)ãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã¯ãƒªã‚¹ãƒˆã‹ã‚‰é¸æŠžã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆãŠã‚ˆã³ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +## Avroフォーマットã§ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆã¨ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +ClickHouseã¯ã€Hadoopシステムã§åºƒã使ã‚ã‚Œã¦ã„ã‚‹[Apache Avro](https://avro.apache.org/)データファイルã®èª­ã¿å–ã‚Šã¨æ›¸ãè¾¼ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +[Avroファイル](assets/data.avro)ã‹ã‚‰ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€`INSERT`æ–‡ã§[Avro](/docs/ja/interfaces/formats.md/#data-format-avro)フォーマットを使用ã—ã¾ã™ï¼š + +```sql +INSERT INTO sometable +FROM INFILE 'data.avro' +FORMAT Avro +``` + +[file()](/docs/ja/sql-reference/functions/files.md/#file)関数を使用ã—ã¦ã€å®Ÿéš›ã«ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã™ã‚‹å‰ã«Avroファイルを調査ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼š + +```sql +SELECT path, hits +FROM file('data.avro', Avro) +ORDER BY hits DESC +LIMIT 5; +``` +```response +┌─path────────────┬──hits─┠+│ Amy_Poehler │ 62732 │ +│ Adam_Goldberg │ 42338 │ +│ Aaron_Spelling │ 25128 │ +│ Absence_seizure │ 18152 │ +│ Ammon_Bundy │ 11890 │ +└─────────────────┴───────┘ +``` + +Avroファイルã¸ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆï¼š + +```sql +SELECT * FROM sometable +INTO OUTFILE 'export.avro' +FORMAT Avro; +``` + +### Avroã¨ClickHouseデータタイプ + +Avroファイルをインãƒãƒ¼ãƒˆã¾ãŸã¯ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹éš›ã¯ã€[データタイプã®ãƒžãƒƒãƒãƒ³ã‚°](/docs/ja/interfaces/formats.md/#data_types-matching)を考慮ã«å…¥ã‚Œã¦ãã ã•ã„。Avroファイルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹éš›ã«ã¯ã€æ˜Žç¤ºçš„ãªåž‹ã‚­ãƒ£ã‚¹ãƒˆã‚’使用ã—ã¦å¤‰æ›ã—ã¦ãã ã•ã„: + +```sql +SELECT + date, + toDate(date) +FROM file('data.avro', Avro) +LIMIT 3; +``` +```response +┌──date─┬─toDate(date)─┠+│ 16556 │ 2015-05-01 │ +│ 16556 │ 2015-05-01 │ +│ 16556 │ 2015-05-01 │ +└───────┴──────────────┘ +``` + +### Kafkaã«ãŠã‘ã‚‹Avroメッセージ + +KafkaメッセージãŒAvroフォーマットを使用ã—ã¦ã„ã‚‹å ´åˆã€ClickHouseã¯[AvroConfluent](/docs/ja/interfaces/formats.md/#data-format-avro-confluent)フォーマットã¨[Kafka](/docs/ja/engines/table-engines/integrations/kafka.md)エンジンを使用ã—ã¦ã“ã®ã‚ˆã†ãªã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +CREATE TABLE some_topic_stream +( + field1 UInt32, + field2 String +) +ENGINE = Kafka() SETTINGS +kafka_broker_list = 'localhost', +kafka_topic_list = 'some_topic', +kafka_group_name = 'some_group', +kafka_format = 'AvroConfluent'; +``` + +## Arrowフォーマットã®æ“作 + +ã‚‚ã†ä¸€ã¤ã®ã‚«ãƒ©ãƒ å½¢å¼ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯[Apache Arrow](https://arrow.apache.org/)ã§ã€ClickHouseã§ã‚‚インãƒãƒ¼ãƒˆã¨ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚[Arrowファイル](assets/data.arrow)ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€[Arrow](/docs/ja/interfaces/formats.md/#data-format-arrow)フォーマットを使用ã—ã¾ã™ï¼š + +```sql +INSERT INTO sometable +FROM INFILE 'data.arrow' +FORMAT Arrow +``` + +Arrowファイルã¸ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚‚åŒæ§˜ã®æ–¹æ³•ã§è¡Œã„ã¾ã™ï¼š + +```sql +SELECT * FROM sometable +INTO OUTFILE 'export.arrow' +FORMAT Arrow +``` + +ã¾ãŸã€[データタイプã®ãƒžãƒƒãƒãƒ³ã‚°](/docs/ja/interfaces/formats.md/#data-types-matching-arrow)を確èªã—ã€æ‰‹å‹•ã§å¤‰æ›ãŒå¿…è¦ãªå ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +### Arrowデータストリーミング + +[ArrowStream](/docs/ja/interfaces/formats.md/#data-format-arrow-stream)フォーマットã¯Arrowストリーミング(メモリ内処ç†ç”¨ï¼‰ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ClickHouseã¯Arrowストリームã®èª­ã¿æ›¸ããŒå¯èƒ½ã§ã™ã€‚ + +ClickHouseãŒArrowデータをストリームã™ã‚‹æ–¹æ³•ã‚’示ã™ãŸã‚ã«ã€æ¬¡ã®Pythonスクリプトã«ãƒ‘イプã§ãƒ‡ãƒ¼ã‚¿ã‚’渡ã—ã¾ã™ï¼ˆã“ã‚Œã¯Arrowストリーミングフォーマットã§å…¥åŠ›ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’読ã¿å–ã‚Šã€çµæžœã‚’Pandasテーブルã¨ã—ã¦å‡ºåŠ›ã—ã¾ã™ï¼‰ï¼š + +```python +import sys, pyarrow as pa + +with pa.ipc.open_stream(sys.stdin.buffer) as reader: + print(reader.read_pandas()) +``` + +次ã«ã€ãã®ã‚¹ã‚¯ãƒªãƒ—トã«å‡ºåŠ›ã‚’パイプã•ã›ã‚‹ã“ã¨ã§ClickHouseã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ストリームã—ã¾ã™ï¼š + +```bash +clickhouse-client -q "SELECT path, hits FROM some_data LIMIT 3 FORMAT ArrowStream" | python3 arrow.py +``` +```response + path hits +0 b'Akiba_Hebrew_Academy' 241 +1 b'Aegithina_tiphia' 34 +2 b'1971-72_Utah_Stars_season' 1 +``` + +ClickHouseã¯åŒã˜ArrowStreamフォーマットを使用ã—ã¦Arrowストリームを読ã¿å–ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```sql +arrow-stream | clickhouse-client -q "INSERT INTO sometable FORMAT ArrowStream" +``` + +`arrow-stream`ã‚’Arrowストリーミングデータã®å¯èƒ½ãªã‚½ãƒ¼ã‚¹ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã—ãŸã€‚ + +## ORCデータã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆã¨ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +[Apache ORC](https://orc.apache.org/)フォーマットã¯é€šå¸¸Hadoopã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ å½¢å¼ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã™ã€‚ClickHouseã¯[ORCフォーマット](/docs/ja/interfaces/formats.md/#data-format-orc)を使用ã—ãŸ[Orcデータ](assets/data.orc)ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆã¨ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +```sql +SELECT * +FROM sometable +INTO OUTFILE 'data.orc' +FORMAT ORC; + +INSERT INTO sometable +FROM INFILE 'data.orc' +FORMAT ORC; +``` + +エクスãƒãƒ¼ãƒˆã¨ã‚¤ãƒ³ãƒãƒ¼ãƒˆã‚’調整ã™ã‚‹ãŸã‚ã«ã€[データタイプã®ãƒžãƒƒãƒãƒ³ã‚°](/docs/ja/interfaces/formats.md/#data-types-matching-orc)ãŠã‚ˆã³[追加設定](/docs/ja/interfaces/formats.md/#parquet-format-settings)も確èªã—ã¦ãã ã•ã„。 + +## ã•ã‚‰ãªã‚‹å­¦ç¿’ + +ClickHouseã¯ã€ã•ã¾ã–ã¾ãªã‚·ãƒŠãƒªã‚ªã¨ãƒ—ラットフォームã«å¯¾å¿œã™ã‚‹ãŸã‚ã«å¤šãã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆï¼ˆãƒ†ã‚­ã‚¹ãƒˆãŠã‚ˆã³ãƒã‚¤ãƒŠãƒªï¼‰ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚以下ã®è¨˜äº‹ã§ä»–ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ãã®æ´»ç”¨æ–¹æ³•ã‚’ã•ã‚‰ã«æŽ¢ç´¢ã—ã¦ãã ã•ã„: + +- [CSVã¨TSVフォーマット](csv-tsv.md) +- [JSONフォーマット](/docs/ja/integrations/data-ingestion/data-formats/json/intro.md) +- [æ­£è¦è¡¨ç¾ã¨ãƒ†ãƒ³ãƒ—レート](templates-regex.md) +- [ãƒã‚¤ãƒ†ã‚£ãƒ–ã¨ãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ](binary.md) +- [SQLフォーマット](sql.md) + +ã¾ãŸã€[clickhouse-local](https://clickhouse.com/blog/extracting-converting-querying-local-files-with-sql-clickhouse-local)も確èªã—ã¦ãã ã•ã„ - Clickhouseサーãƒãƒ¼ã‚’å¿…è¦ã¨ã›ãšã«ãƒ­ãƒ¼ã‚«ãƒ«/リモートファイルã§ä½œæ¥­ã™ã‚‹ãŸã‚ã®ãƒãƒ¼ã‚¿ãƒ–ルã§ãƒ•ãƒ«æ©Ÿèƒ½ã®ãƒ„ールã§ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/arrays.json b/docs/ja/integrations/data-ingestion/data-formats/assets/arrays.json new file mode 100644 index 00000000000..8f17589ef18 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/arrays.json @@ -0,0 +1,3 @@ +["Akiba_Hebrew_Academy", "2017-08-01", 241], +["Aegithina_tiphia", "2018-02-01", 34], +["1971-72_Utah_Stars_season", "2016-10-01", 1] diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/columns-array.json b/docs/ja/integrations/data-ingestion/data-formats/assets/columns-array.json new file mode 100644 index 00000000000..e6d73ac80f5 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/columns-array.json @@ -0,0 +1,5 @@ +[ + ["Heidenrod", "Arthur_Henrique", "Alan_Ebnother"], + ["2017-01-01", "2016-11-01", "2015-11-01"], + [10, 12, 66] +] diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/columns.json b/docs/ja/integrations/data-ingestion/data-formats/assets/columns.json new file mode 100644 index 00000000000..6304484f563 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/columns.json @@ -0,0 +1,5 @@ +{ + "path": ["2007_Copa_America", "Car_dealerships_in_the_USA", "Dihydromyricetin_reductase"], + "month": ["2016-07-01", "2015-07-01", "2015-07-01"], + "hits": [178, 11, 1] +} diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/custom.json b/docs/ja/integrations/data-ingestion/data-formats/assets/custom.json new file mode 100644 index 00000000000..a02ac155e46 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/custom.json @@ -0,0 +1,5 @@ +[ + {"name": "Joe", "age": 99, "type": "person"}, + {"url": "/my.post.MD", "hits": 1263, "type": "post"}, + {"message": "Warning on disk usage", "type": "log"} +] diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data.arrow b/docs/ja/integrations/data-ingestion/data-formats/assets/data.arrow new file mode 100644 index 00000000000..615593bb3ea Binary files /dev/null and b/docs/ja/integrations/data-ingestion/data-formats/assets/data.arrow differ diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data.avro b/docs/ja/integrations/data-ingestion/data-formats/assets/data.avro new file mode 100644 index 00000000000..817200d6672 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/data-formats/assets/data.avro differ diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data.binary b/docs/ja/integrations/data-ingestion/data-formats/assets/data.binary new file mode 100644 index 00000000000..5a7cfee6736 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/data-formats/assets/data.binary differ diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data.bson b/docs/ja/integrations/data-ingestion/data-formats/assets/data.bson new file mode 100644 index 00000000000..3b37c10c0a1 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/data-formats/assets/data.bson differ diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data.clickhouse b/docs/ja/integrations/data-ingestion/data-formats/assets/data.clickhouse new file mode 100644 index 00000000000..56dffd70ae0 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/data.clickhouse @@ -0,0 +1,59 @@ +èpathStringBangor_City_Forest Alireza_AfzalAkhaura-Laksam-Chittagong_Line1973_National_500 +AttachmentKellett_Strait Ajarani_RiverAkbarabad,_KhomeynAdriaan_Theodoor_PeperzakAlucita_dryogramma +Brit_Med_J4th_Metro_Manila_Film_FestivalAlialujah_Choir1953-54_SM-sarja_seasonAir_Force_Song 4-6_duoprismAshley_Spurlin Asfaq_Kayani1607_in_architecture4-way_speakers Blue_Heeler5_Euro'2009_Spa-Francorchamps_GP2_Series_round"2015_Guru_Granth_Sahib_desecrationAgriculture_Marketing_Service2006_Football_League_Cup_Final2008_Uber_Cup_group_stage1923_PGA_Championship +Fannie_Bay +AlchemyAPICinema_of_ItalyArodes Damien_MarleyAl_Jumayl_Baladiyat(2015_Alabama_State_Hornets_football_team Aglossa_tanya73rd_Pennsylvania_Infantry72015_European_Junior_and_U23_Canoe_Slalom_ChampionshipsAfrican_LeopardFaverolles,_OrneAaron_FukuharaAnnular_ligaments_of_trachea2014_US_Open_SeriesA_Better_MousetrapDibakluAt_Samat_District Aaron_Peasley Apistomology Buyat_Bay#1942_Estonian_Football_ChampionshipAction_for_Autism100_Hz+2003_Arizona_State_Sun_Devils_football_teamAntona_obscuraAkiko_SugiyamaElysburg2017_New_South_Wales_Cup#2011-12_Gold_Coast_United_FC_seasonPAgency_for_the_Prohibition_of_Nuclear_Weapons_in_Latin_America_and_the_Caribbean Albert_DunnHahamakin_ang_Lahat2013_Spuyten_Duyvil_derailmentAylingAnti-Establishment"1951_Spanish_motorcycle_Grand_Prix2009-10_Brunei_Premier_League23_Ursae_Majoris&1927-28_Austrian_football_championshipAndrew_McKeever Clinocottus2006_State_of_Origin#2013-14_Los_Angeles_Clippers_seasonCor_JesuBesseringen_B-Werk +Amy_Hempel Franc-ComtoisAllium_giganteumAbishaiAbraham_Clark_High_SchoolBaku_chronology22nd_MEU2015_Open_Engie_de_TouraineChurchill_BowlAGMARKAmerican_standard_wire_gauge Araby,_LA217_BC#2008_Trinidad_and_Tobago_League_Cup +Alazan_BayAluminum_fencingAchilles_tendinitis"AFP_Peacekeeping_Operations_Center2013_Xinjiang_clashesArborea_Giudicato_of_Arborea1941_Cleveland_Rams_seasonJu_Posht,_Rasht Ascalenia AplectoidesEuropean_Cup_1969-70Armen_Mkertchian 2015_Aspria_Tennis_Cup_-_Singles14_August_1947Adobe_Creative_Suite_1IC_chips Austo_AE300 +Date_palms BCS_bowl_game AR_BorderAranda_de_Duero,1919_Wake_Forest_Demon_Deacons_football_team*All_The_Wrong_Clues_For_The_Right_SolutionAllan_Campbell_McLeanBradford_Council_election,_2011Astronomy_and_astrophysicsDutch_Antillean_people +Army_Radio BBVA_Bancomer +Lake_Aloha Andy_Bean1941_Pittsburgh_Steelers_seasonAniopi_MelidoniAglossosia_fusca Art_books1929_Washington_Senators_seasonAntaeotricha_congelataDouglas_C-54G-5-DO_Skymaster Chris_Jamison Ace_BlackwellAbdul_Qadir_FitratArnoldo_Vizcaino*2012_Open_EuroEnergie_de_Quimper_-_Doubles Dale_Rominski ADHD_coaching +Claire_Yiu ApplicantApache_OpenOfficeAbel_Kiprop_MutaiAirdrome_TaubeAndrey_ViktorovichAmerican_Idol_controversyAnthrenocerus_confertusAppraisal_SubcommitteeBabusa 500_homeruns"Argentina_national_volleyball_teamChief_prosecutor_of_RussiaAbsolution_DVD1,3-Beta-glucan_synthase Dave_SinardetAdeline_Whitney Allon_shvut-2012_Penn_State_Nittany_Lions_football_seasonColeman-Franklin-Cannon_MillAction_directorAD_547Acta_germanicaAbu_Dhabi_Global_Market_Square Kozo_ShioyaChina_Investment_CorpDmitri_Zakharovich_Protopopov Anatra_Anadis Archaikum2000_Webby_Awards2003_BCR_Open_Romania_-_SinglesAbacetus_bisignatusAmerican_school_of_kinshasaAnna,_7th_Duchess_of_BedfordBlack_majority_district Dagma_Lahlum Credit_SaisonAriyankuppam_firkaAnnette_FuentesAngerstein,_JohnAnnenkov_IslandAnne_Frank_museumAnnales_sancti_AmandiL-FABP +Alvord,_TX*2006_World_Team_Table_Tennis_Championships AngriffenAnthony_OppenheimerAbsamat_Masaliyevich_MasaliyevAirborne_Museum_at_AldershotAktiubinsk_Oblast100_East_Wisconsin#7th_Bangladesh_National_Film_AwardsAlejandro_ReyesApplied_philosophyAdhemar_PimentaBreak_the_fourth_wallAnnoushka_DucasATC_code_J01CA01Evelyn_County,_New_South_WalesElastic_scattering 1032_PafuriAndrew_Bromwich Ishita_Arun Aspergics 1857_in_ChileBreffni 845_in_poetry20321_LightdonovanArthur_Chandler CsISOLatin21900_Grand_National Aeritalia_AMXB_Sharps 544_area_code30th_Guldbagge_Awards AgrippinaArdmoreAmplypterus_panopusAlexander_BukharovAlaska_Raceway_Park)Albanian_National_Road_Race_Championships41968_Democratic_National_Convention_protest_activity2012_Birthday_Honours2000_NHL_expansion_draftA_Town_Where_You_Live Ahmed_ShahzadElisabeth_Svendsen)2002_FINA_Synchronised_Swimming_World_CupAkatekAnimation_with_DAZ_Studio Fergus_Craig Ancel_Nalau5171_Augustesen Anne_McGuireAustralian_Photoplay_Company1913_in_CanadaArhopala_allataIl_Paradiso_delle_Signore Geri_PalastAlan_Abela_Wadge"22nd_Tactical_Air_Support_Squadron Avant_StellarBlack_phantom_tetraBilly_McCaffreyAnnie_Furuhjelm 1992_PGA_Tour2008_Chilean_pork_crisis2012_Currie_Cup_First_DivisionAleksei_FomkinAlexander_Krausnick-GrohAdam_Richard_WilesATCvet_code_QA01AD01Abu_Bakr_Ibn_BajjaArchitecture-Studio950s_BC AbschwungesAdonis_Geroskipou2008-09_SV_Werder_Bremen_season Closed_loopsAFC_Youth_Championship_1982 Aquila_Shoes9842_FunakoshiEducational_quotientAntoni_Julian_NowowiejskiAdi_Oka_IdhileDEXIA-BIL_Luxembourg_OpenAndrew_James_SimpsonAlexander_Boksenberg1827_in_DenmarkAfternoon_tea_with_suggs Alpha,_MN +Ari_Onasis&1961-62_Football_League_First_Division Andi_LilaA_Gathering_Of_Old_MenAbul_Fazl_al-AbbasAsgill,_CharlesAlexander_Arkhangelsky1947-48_Portuguese_Liga3rd_MMC_-_VarnaAlberts,_WayneAlois_SchickelgruberHefner_Stadium410912_LisakarolineAcademy_at_Mountain_State 617_Squadron$Al_Silm_Haji_Hajjaj_Awwad_Al_HajjajiArturo_Merino_Benitez_AirportAEK_Athens_FutsalAggaeus6Association_for_Retarded_Citizens_of_the_United_States Kielce_pogrom1351_in_poetry#1923_Princeton_Tigers_football_teamAuzata_semipavonaria 892_in_poetry Anton_KrotiakArthur_Shelley2003_Kyoto_Purple_Sanga_season!Frederic_Bowker_Terrington_Carter 2-orthoplexAcacia_australiana2012_Newcastle_Knights_seasonAnn_Wrights_Corner,_Virginia 12557_Caracol#2001_African_Footballer_of_the_Year Bass_PyramidA_noodle +Aed_Bennan 1886_Yale_Bulldogs_football_team2002_Players_ChampionshipAfrican_Skimmer3rd_Guldbagge_Awards Arrows_A19B&Archduchess_Elisabetta_of_Austria-EsteAmerica_Islands1932_Olympic_Games#2011_Chinese_pro-democracy_protests Bank_walkaway594_in_Ireland%Association_of_Municipal_CorporationsAndreas_BrantelidAmarthal_urf_Unchagaon3-methoxymorphinan2382_BC1763_in_scienceArvert Ale_yeastA_Man_Without_a_SoulAir_Force_Base_Louis_TrichardtAthirson_Mazzoli_de_OliveiraAnthony_Chan_YauBasic_Enlisted_Submarine_School%Aboriginal_Lands_of_Hawaiian_AncestryFondren_Southwest,_Houston3_World_Financial_Center#1971_IIHF_European_U19_Championship1937-38_AllsvenskanChristopher_Ashton_Kutcher,Australian_rules_football_in_south_australia Amicable_pair +Alan_Tomes%Alexei_Petrovich,_Tsarevich_of_Russia Alexis_DamourBankruptcy_Act_of_1938 AmphiphyllumConway_High_School_West5447_Lallement Gabriel_Iddan1879-80_Scottish_Cup2011_Eneco_Tour1471_in_EnglandAshland_Town_Hall Archduke_John2000_Cameroonian_Premier_League +1997_floodAgile_managementAm_841Apprentice_MasonHales-Jewett_theoremAlien_Abductions Arjun_Menon AnthokyanAutomobili_Lamborghini Alain_Prost Fartein_ValenAntonio_Galli_da_BibienaAl_Jawf,_LibyaAD_695 +Amir_chandAlcis_obliquisignaChandra_Talpade_MohantyAlgerian_safe_house,_Jalalabad Jake_MilnerAlternate_Communications_CenterIn_the_BleachersAlex_PuodziukasAltarpiece_of_Pilgrim_IICybernetical_PhysicsChristopher_Unthank1982_Independence_BowlAscoli_Calcio_1898Briggs-Rauscher_reactionsAdjadja/Afghanistan_from_Ahmad_Shah_until_Dost_MohammedCatholic_social_doctrine2833_BCBethy_WoodwardBateman_polynomials1966_Buenos_Aires_Grand_PrixA_River_Somewhere&2016-17_BVIFA_National_Football_League!1909_Major_League_Baseball_season1988_Oklahoma_Sooners_football2010s_in_Chechen_fashionAccademia_Olimpica Air_cooling +Amir_Saoud Alex_AuburnApamea_impulsa!Australian_federal_election,_2007 +Ain_Sakhri Belosaepiidae(Acts_of_Parliament_in_the_United_Kingdom Equity_Office David_Bintley Aksel_SchiotzAppropriation_Act_2000Edward_Johnson_III&2006_Ohio_State_Buckeyes_football_teamBattle_of_Fort_Beausejour Abel_Foullon Apollo_VIIICarry_on_up_the_jungle Armour_villa +201_PoplarArta_prefecture2015-16_EkstraklasaAlport,_Ontario BongolandAlfred_Charles_PostAam_Aadmi_Party_crisis Andrea_ModaAbdul_Halim_ShararApostolic_Vicariate_of_YunnanCatherine_SteadmanAgastachys_odorata9783_Tensho-kan +AFL_CairnsAbomey"Anne_Crofton,_1st_Baroness_CroftonCash-flow_return_on_investment%Alberto_Arvelo_Torrealba_MunicipalityAbyssinian_Shorthorned_ZebuAlbanian_hip_hopAlphonso_IV_of_Portugal19th_The_Alberta_Mounted_RiflesChinese_shadow_theatre.American_Committee_of_the_Fourth_International2014_Bahrain_GP2_Series_roundAlexandrian_orthodox2010_Hurricane_Season21938_All-Ireland_Senior_Camogie_Championship_Final ATC_code_D01AlbedoChavigny,_Meurthe-et-Moselle Becky_Essex$Archaeological_Museum_Padre_Le_PaigeAbu_Bakar_Sillah Back_chatAnchylobela_dyseimataAnthony_Overton Bear_maulAmbarawa,_Central_Java Amber_lager2nd_LAAD Ashiya,_HyogoAngels_at_RiskAudrey_Marie_Munson&1984_Australian_Football_ChampionshipsAmmonia_fountainAllister_BentleyAlsager_Hay_Hill1753_English_cricket_season 2009-10_New_Jersey_Devils_seasonAn_Untamed_StateBeatrice_CarmichaelAbdul_Ghani_AhmadArteria_suralisBerzasca_River Angel_Attack&1969_San_Francisco_49ers_football_teamAnthony_BeilensonCrystalline_EntityGranice203rd_General_HospitalAcrocercops_rhombiferellumAmpliglossum_blanchetii 11553_Scheria Ashkenozi2010_Calder_Cup_Playoffs Alice_Caymmi Alfredo_Alvar2006_Legends_TourAlbano_Albanese#1943_Frankford_Junction_train_wreckEvans_Court_Apartment_Building$Abu_al-Rayhan_Muhammad_ibn_al-BiruniAbubakar_Muhammad_RimiDostpur%Accessories_Council_Excellence_Awards2006_North_American_heat_wave AmstelodamumA_Very_Peculiar_PracticeAllegorie_der_Liebe Alex_Mackie1812_Homestead_Farm_and_MuseumArgus_distributionAnthony_Thomas_StoverArthur_ShallcrossAntoine_Francois_Fourcroy Abbas_HalimAkiva_Baer_ben_Joseph BalatonfueredAntemnae Cling_Cling B_flat_major +AirExploreAuckland_Super_SprintAlfredo_De_GasperisGeoffrey_I_of_ViandenCopa_de_ZaachilaAlboacenBNH_Hospital_BangkokAgricultural_health_and_safetyChiasms +Al_KaraanaAlberta_Highway_872Among_the_mournersAchema_Power_Plant ATSE_Graz Arthroscopy.2010-2012_European_Nations_Cup_Second_Division1967_Cincinnati_Reds24th_Golden_Disc_Awards Johnny_Floyd Arthur_Rupin-Alpine_skiing_at_the_2011_Canada_Winter_GamesCollege_Press_ServiceAmerican_Psycho CBC_WinnipegBurning_the_process2011_Stanley_Cup_playoffsAndrew_Mumford%1925_in_fine_arts_of_the_Soviet_Union Aragvi_riverAndrew_AdamsonArcides_fulvohirtaAraya_Selassie_YohannesApartment_house Advanced_Art 1028_Lydina82005_July_6_United_Nations_assault_on_Cite_Soleil,_Haiti Adolph_WeissAdam_Jerzy_Czartoryski(1980_United_States_presidential_election 1956_OscarsBurundian_Senate_election,_2005Amarolea_floridana August_BierArbelodes_sebelensis Abiah_BrownA_Maceo_Smith_High_School1488_in_architecture2009_AMP_Energy_5001921_Baylor_Bears_football_team Dmitry_Akhba*2004_Big_12_Conference_Baseball_TournamentAbdisalam_OmerAlma,_son_of_Alma An_Phoblacht2009_Turner_Prize +Jack_Zajac1906_Wimbledon_ChampionshipsChuckwalla_ValleyAlien_QuadrologyChalcidoptera_contraria6Alaska_Republican_Gubernatorial_Primary_Election,_2006 333639_YaimaAquila_hastataAl-Fua AnihilationInternational_Toy_Fair38th_Regiment_Indiana_Infantry Andrea_StellaAnselmo_de_Moraes ApplemoreAkpinar,_KirsehirAnt_nestCatherine_of_SienaBarbosAmlaib_mac_IduilbAlice_JanowskiAcacia_leptocarpa Al-Hadi_Yahya)2015_British_Figure_Skating_ChampionshipsAvenues_TelevisionDendropsophus_sartori1952_in_GermanyArmuchee_High_School April_1_RFCCaroline_Bliss66th_Rice_Bowl Alec_Smight Alexei_PaninCodewordDormice2105_BC#5th_National_Congress_of_KuomintangCaminho_das_IndiasAgerbo Abe_Anellis +Aceh_Medal Alltech_ArenaAly_Oury757th_Troop_Carrier_Squadron Alec_PetersAgua_Buena_AirportAlessandro_LiviAndkaerCateran'57th_Venice_International_Film_Festival Brijal_PatelCnemaspis_jerdoniiAluminum_sodium_saltArnaldo_Antonio_Sanabria_AyalaAngels_of_IronBugs_Bunny_Rabbit_RampageAdmiralty_Class_Destroyer Atlas_MediaArcesilaus_i_of_cyrene.2011_Tajikistan_national_football_team_resultsArtur_Shakhnazarov747_Express_Bus101-in-1_Party_MegamixFastpoint_GamesAnalog_Anthology_1 Archival_bond1985_Air_Force_Falcons_footballDAmerican_Airlines_plane_diverted_to_Miami_after_landing_gear_problem&Adaptive_Evolution_in_the_Human_GenomeArthur_Strangways1583_in_poetryAndrew_igoudala Euonychophora Catechizing$1960-61_ice_hockey_Bundesliga_season Buk_Vlaka Arbor_Day +Guan_Sheng!2014_Barcelona_Open_Banc_Sabadell1976-77_Nationalliga_A AFL_records2005_Tour_Down_Under92_BCEBento_Box_AnimationAlabama_TerritoryAbdul-Wasa_Al-SaqqafArchbishops_of_SemarangAmbivinaAghjaghala_UliaBlechnum_novae-zelandiae +DictyosomeArts_Council_of_Great_Britain LBC_Radio Ageo,_Saitama Babla_Mehta2012-13_Russian_Cup Chandragupt407th_Air_Refueling_Squadron AftermarketA_Portrait_of_New_Orleans2000-01_Yemeni_LeagueActinidia_chinensisAmsterdam_Tournament_1999Arthur_IberallAuricula_MeretriculaArchbishop_of_LahoreChippewa_Indians_of_MontanaAbidjan-Niger_Railway29th_Annual_Grammy_AwardsAteles_geoffroyi_frontatusEnrico_Cernuschi +A4183_roadAhrayut Alison_CastleAutomobile_aftermarket$2008_GAINSCO_Auto_Insurance_Indy_3001937_Scottish_Cup_Final2005_Clipsal_500_Adelaide Farid_Farjad13_Tribes_of_Long_IslandAfroneta_bamilekeiFrederick_Stuart_GreeneAndre_Braugher(1906_International_Lawn_Tennis_Challenge2009-10_NFL_PlayoffsCricket_Wellington Craig_BlazerAeolidiella_orientalisAndre_Prokovsky Angela_McKeeAirbase_Golubovci%2011_ISAF_Sailing_World_ChampionshipsBartica_Airport +Agusan_DamBosque_Real_Country_ClubGeorges_Duhamel +Allrounder'2017_Missouri_State_Bears_football_teamAllons_a_LafayetteAgathla1086_in_poetryAbsolute_extremeAgathe_BonitzerChinese_Red_PineAngular_dispersionJean-Sebastian_Giguere Actinium-235Ago,_filo_e_nodoAranea_cruentata2009_Korea_National_League +Americom-82006_Junee_Bushfire)2013_Major_League_Baseball_Home_Run_Derby1928_US_Presidential_ElectionAfter-eighty_generation"1932_Hawthorn_Football_Club_seasonAmelia_Elizabeth_Mary_Rygate Aline_KhalafAkron_Junction,_New_York'Apollo_moon_landing_conspiracy_theories(1978_National_League_Championship_Series$1959-60_German_football_championshipAlmost_a_BrideAndrew_Lysaght,_junior1902_Otani_expedition1892_Currie_Cup1988_USC_Trojans_football_team1944_in_Northern_IrelandAlfred_AchermanArcadia,_Nebraska4_x_400_metre_relay +A4030_roadChi-liAircraft_fairingBuddhism_in_BelizeAlameda_County_Open3Area_of_countries_and_regions_of_the_United_Kingdom'2014_Weber_State_Wildcats_football_team#American_Journal_of_Comparative_LawA_Teaspoon_Every_Four_HoursAstasisAkhrakouaeronon +Annenkrone Ballotine2000_Kipawa_earthquakeArchdiocese_of_cashel_and_emlyChevrolet_SS396 AchyroserisDaniel_Pulteney 2006_Major_League_Baseball_draftAdetunji_Idowu_OlurinArdatov,_Nizhny_Novgorod_OblastAndrew_Hilditch"A_Very_Merry_Daughter_Of_the_Bride 1993_in_radioDeltanAdnan_Custovic +Di_Gennaro237_AD Aaron_Gombar +AcrolophusAlfred_Bergman Charles_BebbDirico 1982_Major_League_Baseball_Draft DDT_wrestling1988-89_Houston_Rockets_season Acacia_loderi%2015_Deauville_American_Film_FestivalAndropadus_importunusAntonio_Bacchetti Ann_Trindade5_x_Monk_5_x_LacyBarlochan,_OntarioAchaian +Flow_riderAntiblemma_discerpta+1997_Illinois_Fighting_Illini_football_teamAhrntalApollo_ConferenceAlgenib_in_Perseus Craig_Norgate Antwerp_ZooCold_ContagiousBolitoChinese_bridges14th_Indiana_Infantry_RegimentBindunuwewa_massacreEastshore_Highway Daemonologie Aero_PacificoBlue_Ribbon_Schools_ProgramAsh_Township,_MIAl-Hatab_Square Alje_Vennema31920_All-Ireland_Senior_Football_Championship_Final Criss_OlivaBethlehem,_Ohio1976_WHA_Amateur_DraftAngela_FimmanoAlexander_Bonini_of_Alexandria Anarchist_faqAleksander_Benedykt_SobieskiCape_Florida_LighthouseFernando_VI_of_SpainCrossing_number 1984_NSL_CupBarbara_Weldon Andreas_OlsenBattle_of_Baima Amory_HansenAkhmimicAl_AwdaAdelheid-Marie_of_Anhalt-Dessau#Americans_for_Technology_LeadershipBelizean_diplomatic_missionsAfrican_communistAndosolAlan_AttractionA_Yank_in_Rome 2004_in_the_United_Arab_Emirates AdditionalityAssassination_of_Trotsky Alice_SoteroAgyneta_platnicki Alexandra_Vasilyevna_Velyaminova 1881_in_ChileArterial_ischemic_stroke Astro_GlacierChester_Earl_MerrowAlejandro_de_la_Madrid 70936_KamenAK_Steel_Holding_Corp1124_Stroobantia Asian_Wedding23837_Matthewnanni3Acharya_Jagadish_Chandra_Bose_Indian_Botanic_Garden Betsy_HodgesArthur_and_the_Invisibles"Arkansas-Ole_Miss_football_rivalryAsia_CupArginine_racemase$585th_Field_Company,_Royal_Engineers1975_Stagg_Bowl7Dame_Commander_of_The_Most_Honourable_Order_of_the_BathAskajian'2006_Nebraska_Cornhuskers_football_teamCicero_Francis_Lowe_HouseConan_IV,_Duke_of_Brittany*2005_World_Modern_Pentathlon_Championships 1946_Aleutian_Islands_earthquakeANKRD17%1970_Maryland_Terrapins_football_team Ali_Dehkhoda 1244_in_art1520s_in_DenmarkAbdoulaye_GayeAn_Angel_Has_Arrived1453_BC2017_National_Games_of_ChinaA_Night_in_SickbayDateline_Diamonds419_guestbook_spammingFamiliar_bluetAbu_Bakr_Mirza7272_Darbydyar Ages_of_consent_in_Latin_America1982_Japan_Soccer_League_Cup2810_BCDruga_Liga_Republike_Srpske1998_Swedish_Rally1567_in_Norway+126_Army_Engineer_Regiment,_Royal_Engineers#2017_American_League_Wild_Card_Game August_Follen Ala_Gertner"Glenwood,_Harford_County,_MarylandApplied_ecologyAriarathes_V_Eusebes_Philopator2006_AFC_Champions_League 60_minutes_2Embryonic_shield-2001_Meath_Intermediate_Football_ChampionshipApparition_of_Christ_to_MadonnaHoosier_Road_ElementaryArua_UdaArray_comprehensionBaszkiAkron_NeighborhoodsCatholic_Church_in_Costa_RicaCanada-Sweden_relationsBarza_Radio_CommunityDalhousie_Middle_SchoolAlliphis_bakeriBartica_massacre 30th_January1920_revolution +AmyraldismAA_Jefferson_DistrictEunebristis_cinclidiasA_Scott_Connelly Antony_DuroseArval_BrethrenAnthidium_dissectum%Aru,_Democratic_Republic_of_the_Congo"1956-57_West_Indian_cricket_season2014_Moscow_Film_Festival +Anna_GurjiAllen_Memorial_Medical_LibraryAnton_Sistermans Clotheshorses 36_StratagemsAttack_of_the_crab_monsters30_rock_awards+Aeroflot,_Uralsk_Civil_Aviation_DirectorateAmblyseius_parabufortusIndian_coral_tree3285_Ruth_WolfeAnderson_da_Silva_Gibin5001st_Composite_GroupDanzik4810_RuslanovaArkendale,_VirginiaAl_Francis_BicharaCayenaA_Glass_of_DarknessGMC_CCKWAlabama_State_Route_1072011_in_motorsport$Adecco_General_Staffing,_New_ZealandAnbargah1995_Asian_Cup_Winners_Cup01986_Wales_rugby_union_tour_of_the_South_PacificAdya_Goud_Brahmin Akcakiraz24249_BobbiolsonAhmanson_TheatreAbdullah_ibn_Jahsh 1937_in_Chile2000_in_EnglandA_Deepness_In_The_Sky Area_code_678 Avalon_HillAnna,_Duchess_of_PrussiaAlexandr_Syman7400_series_logicGreenleaf_Township,_Minnesota AcetylsalEarth_and_Man_National_Museum Affetside1971_CFL_season +Beth_BaderEnrolled_NurseAl-Azraq4th_South_Carolina_RegimentAmanda_Overmyer Auto_wrapAnonymous_internet_banking CuratoriaA-rollAccra_hearts_of_oak_scApostasy_from_JudaismAcantharctia_tenebrosaAbigail_Keasey_Frankel 2008_Paraguayan_general_election Adams_motorDrummond_Community_High_SchoolAndrews_Nakahara10th_MaccabiahAckerman,_Rick Dumri,_BuxarAsking_Jesus_into_your_heartAdamowicz_brothers Alien_MusibatAhmad_Al_TayerAnalytical_phonics +Do_It_Good2004_Kumbakonam_School_fire#1977_Chattanooga_Mocs_football_team Globe_valvesAbelmoschus_crinitus 1874_Yale_Bulldogs_football_teamClimer Auchroisk2010_Albirex_Niigata_season AdhocracyChios_MassacreAfrican_Red_Slip1976_Portland_Timbers_seasonAlsace-Larraine 3750_IlizarovAleksandr_Shkaev 32_bar_formAequatorium_jamesonii Abade_neivaArakvaz207_Sqn Ducal_hat 2_DegreesAhmeddiyya_IslamAmidi-ye_Kohneh!Contributions_to_Indian_Sociology Clark_LeibleeAbraham_of_StrathearnmonthDateé@.C'A DDC|DJC›D'Aé@'A·D•B›DÝA¦C D9BEAé@iCüAdAWBdAÀAvBüAüACÒBé@A¦CÝAC›DvBCdACÒB›DÒBË@‡C‚Aé@‡C9BË@‡C•B‚AÒBD¦CüAãCC?DC³B|DãCvBãC D¦CdAé@C¦CÄCüAÄCvBüAË@EAEA¦CãC]D¬@ðBÀA‚AdA³BC¡A'A¦CCWB›DÒBB›D?D¬@CWBé@¦C¦CüA¡A DË@¦C'Aé@·DÒBC›DB9BDiCiCðBCÒBdA›D D]DCË@ÒBEA¦C'AiC9BÝA|D·Dé@9BvBé@Ë@‡CüA·DWB]DC¬@¡ADCCCüA D?DiCvB•B¡AvBÒBé@é@ÀA9B‚AÝA9B¦CC¦CB‚AJC•BÝAA¬@ãC]D·D9BüA DË@ÒBÒBé@ACWB·Dé@ãCEA]D¦C9BJCË@'AË@ãCÀAÝADCJC D D¦CÒB·DÒBvBiC›DÒBdAiC?D‚AiC¬@CCJC D¦CÒBC?D]D¡A›D¬@BãC'AJCüAÀAÄC¦CÝAüA‚AA]DüA|D?DÒBÝA]DJC?D¦CË@dAË@›DCãCé@Ë@WB‡C›DC›D·DBé@ DË@›DãCC¡A?DC¡A]D]D›DüAÝA'A9BÄCJC‡CC¬@›D D9BÄCðBEAãCdA¡AdAüAiCðB'A‡CiCWBWBiC]D·DD¦CÄC¦C'ACÄCD‚A¦CðB|DdA‚AEA¦C9BüAdACiC³BdAC¬@D?D'A]D|DC DÀA¡AÀAiCüABJC›DdAãCCË@C DCüA›DC¦CË@·D¦C›D9BCÒBüA¦CEAEAiCEA?D³BãCé@ÒB¬@ÒBé@ Dé@ DÒBC·D‡CÒBÝAé@‚AEAé@‡CAvB›D›D¦CÒB³Bé@ãCðBÒBEAÝA DË@‚ACAD¡AÀA³BüAãCÝAD¬@C|DACé@›DCC‚AJCüA¡AÒBD·D›DÝAC9B·D³B¬@³BBÒB]D.CC'A?DDüACÄC]D‡CJC.C|D¡AiCÄCEAvBüA?D¬@ÒBÝAË@DvB'A.CDÝA.CÒB|DÒBãCÒB?D¦CC]DdA]DCüAD¦C•B¦CBÒBÝAË@ D.C|DA‡CCÀA'ACA¦CüACC›D.C·D³BdA•B‚AË@iCË@'A‡CvBüAé@‚A·D›D³B]DüAJCé@WB›DA³B¡ACüA¦CÀAüAÀA›DdAÄCé@CCÄC'ABË@BÒBË@ãC·DJC¡AÄCÝAé@¬@üA?DÒB9B.CDüAé@?D9BC?D|Dé@³B9BÄC]DDvBiC¦CiC¦Cé@³BD›D¦C D‡CJCiC]D·D DÒBÄC'AD¦CãCdA'AË@ÒBüA·D¦C·DCvBüAdA³BAC·DWBC DãCÒBüAðBC9BðB|D¦C¡AWBvBJCdA·D.CÀA•BüA|D‡C¦CÒB.C³BÝA³BWBiC›DüA‚ACCiC D¡AÒBé@‡C¦C?D³B‡C¦C•Bé@CJCD?D¬@'AD]D¦CÀAC·D.CÝA?DvB·DDðBÀAÄC‡C]DÄC'AJCãCCEA›D•B³BðBÄC.C·DWBÒBÒBé@.C D³BüAJCÝAdAÝAðBdACCÝAÒBÄC¡AiCAiCãCÒB]DC?D·DiC¦C¦CCðBÒBÀAdA³BÀAiC'AB¦CJCC›D?DÝAEA¡AüA‚A¦CÒBÒBiCé@ÒBCé@¦C›D›D›DBÒBCA¦CD¬@BüAC¦C‡CË@CüABdA›DWBEA¦CB•BB‚A›D¦CË@›DüAé@9B|D'A¦CdAãCA D³BEAJCüAA¬@'AðB·DãCCÀAAé@ÒBWBJCD?DiCé@¡A]DÝAA‡CBCÀAC D?DJCüAé@CDEAÝA DCdAC]D·DD³BCdA¦CCðBdAË@¡A¦Cé@ÒBÒB?D¦CdA‡CãCBC¦CWB?D‡CiCiCãC¦CWB.C¦CãC³B'AãC¦CCÀAvBJCüAÝAüA•BCiCCdA]D]DEA9BðBJCA]DÀA³BA¡AãCé@C‚AiC?DCiCÒBEAAÒBüAðBé@.CÀAé@ÒBB D‚A|D?D¡A'AC DiCAÒB•BðB]DüA¡AüA]DvBCüAÀA¦C¦C³B¦Cé@.CWB'AÄC‡C¡A·D•BvB DÒBJCÝA?DÒBüADhitsUInt32"PLXPÝ^• ¥¯(aXÁ$¨  @## 6ZHR &WØ0ZžCO8X'ÃuÊ0ü@( + O  ƒ>9ÇÅ “$/ +; 2Ñý.$@¸ +]#ÐhOC w Ä)[#’B›^#ù& E %;±.ò +«h ' +NwI‰&MÍ:a37 e^ +Ñ Ó+='   é +O) g:6'ö üq§R’ +Mµˆ @ R/BL +^5hrVlbZX2*f[-&ajÚ4LDæÊ3 ë¬aR  > !b&Q&*‰8| P˼[ 3 WJ² H3Usbr´, y,5þ‰ D_Ì]¢x:7AÉ-G&Ù ?§U«5bÕ8 +-+%t5ÂK +K25f" 0'&Ö ?Ì­T?V!« + h‡´bS¦ ¼ wD% +‰?I9« Œ¢ +`å‹pg ?K73~x “IEYÆ*z?diå  Q¶*Ñ8E5î.”E(!/>/«>(‘‹)%ŽCU[/'Z +#~ 41%#KI*o¡µs4w-»(!/ ð )FZöF!s/9:^0L:2Ï +ü&ã* +$ û5VÁ "Y blÚ³$U5 +<-CQx$ Iï_w V!Ä9àp;+¹Ê*db†-%Ú#¡'B %%©VÝ)   + * \ No newline at end of file diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data.msgpk b/docs/ja/integrations/data-ingestion/data-formats/assets/data.msgpk new file mode 100644 index 00000000000..fb05c0c859a Binary files /dev/null and b/docs/ja/integrations/data-ingestion/data-formats/assets/data.msgpk differ diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data.orc b/docs/ja/integrations/data-ingestion/data-formats/assets/data.orc new file mode 100644 index 00000000000..1e360f94fe7 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/data-formats/assets/data.orc differ diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data.parquet b/docs/ja/integrations/data-ingestion/data-formats/assets/data.parquet new file mode 100644 index 00000000000..52a08e0cfff Binary files /dev/null and b/docs/ja/integrations/data-ingestion/data-formats/assets/data.parquet differ diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data_csv_types.csv b/docs/ja/integrations/data-ingestion/data-formats/assets/data_csv_types.csv new file mode 100644 index 00000000000..d2f59a757fa --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/data_csv_types.csv @@ -0,0 +1,102 @@ +"path","month","hits" +"String","Date","UInt32" +"Akiba_Hebrew_Academy","2017-08-01",241 +"Aegithina_tiphia","2018-02-01",34 +"1971-72_Utah_Stars_season","2016-10-01",1 +"2015_UEFA_European_Under-21_Championship_qualification_Group_8","2015-12-01",73 +"2016_Greater_Western_Sydney_Giants_season","2017-05-01",86 +"AAA_Americas_Trios_Championship","2015-10-01",104 +"1420_in_literature","2016-05-01",20 +"Adair,_Beegie","2017-08-01",2 +"1980_Rugby_League_State_of_Origin_match","2017-07-01",2 +"Column_of_Santa_Felicita,_Florence","2017-06-01",14 +"2007_Copa_America","2016-07-01",178 +"Car_dealerships_in_the_USA","2015-07-01",11 +"Dihydromyricetin_reductase","2015-07-01",1 +"ATCvet_code_QB05BB01","2017-04-01",1 +"City_CarShare","2017-01-01",125 +"Heidenrod","2017-01-01",10 +"Arthur_Henrique","2016-11-01",12 +"Alan_Ebnother","2015-11-01",66 +"2013_UConn_football_season","2017-05-01",2 +"2008_American_League_Division_Series","2016-12-01",376 +"Antilipaemic","2017-09-01",12 +"Aberzombie","2016-12-01",28 +"2008_Asian_Wrestling_Championships","2016-12-01",76 +"Federal_Correctional_Complex,_Pollock","2017-01-01",19 +"Central_body","2015-07-01",32 +"Binbrook,_Ontario","2015-07-01",446 +"Azerbaijan_at_the_2016_Judo_Grand_Prix_Samsun","2016-10-01",25 +"Ashford_Lake","2017-10-01",80 +"1942_Joint_Strike","2015-12-01",3 +"AFC_Youth_Championship_2012","2017-10-01",2 +"Akhira","2016-07-01",64 +"Arroniro_Arlieri","2016-10-01",1 +"Alesheim_Burgsalach","2015-05-01",2 +"2700_classic","2017-05-01",4 +"ARX-8_Laevatein","2015-06-01",14 +"1991_Newsweek_Champions_Cup_-_Singles","2017-06-01",3 +"Aphelandra_sinclairiana","2017-07-01",69 +"Asia_Kong","2015-10-01",2 +"2012_Internazionali_Tennis_Val_Gardena_Sudtirol","2016-02-01",1 +"24_Carat_Purple","2017-06-01",476 +"Acroliths","2017-12-01",9 +"Bundesautobahn_3","2016-04-01",264 +"ATC_code_S01AX21","2016-09-01",1 +"Allington,_Lincolnshire","2015-11-01",188 +"Acer_Aspire_One","2017-06-01",5169 +"ATC_code_L04AC","2015-06-01",1 +"1969_New_Year_Honours","2017-07-01",269 +"Antonio_Napolitano","2017-11-01",44 +"Amberfish","2017-10-01",11 +"1976_Cam_2_Motor_Oil_400","2018-03-01",45 +"April_25,_2017","2018-01-01",2 +"Akahori_Station","2016-06-01",11 +"Abducens_palsy","2016-05-01",28 +"Ancona_cathedral","2018-01-01",2 +"Ajou_Motor_College","2017-02-01",83 +"Brad_Skyes","2016-11-01",1 +"Alegro_PCS","2017-07-01",157 +"Franz_Dunshirn","2017-01-01",1 +"Arthur_Godfrey_Road","2016-11-01",3 +"Ab_Golman","2017-05-01",30 +"Art_in_early_modern_Scotland","2016-03-01",98 +"1968_World_Series","2016-02-01",1960 +"1828_in_the_UK","2017-08-01",3 +"Explorer-1_Prime_Unit_2","2016-11-01",11 +"2014_Desafio_Internacional_das_Estrelas","2017-12-01",31 +"Ambulyx_subocellata","2016-08-01",1 +"2008_Hamilton_Tiger-Cats_season","2015-11-01",153 +"Deuterogamist","2015-07-01",5 +"Art_Nouveau_furniture","2017-12-01",839 +"Allison,_Colorado","2015-10-01",85 +"2014_MLS_Re-Entry_Draft","2017-09-01",36 +"Amiot_353","2015-12-01",8 +"ACLU_of_Massachusetts","2015-11-01",106 +"Altable,_Spain","2016-10-01",1 +"Agnidra_scabiosa","2016-12-01",16 +"Dictyotremella_novoguineensis","2015-07-01",1 +"Compiler_Construction","2015-07-01",42 +"Aufheben","2016-11-01",1080 +"Avafauna","2017-06-01",17 +"Atheist_billboard","2017-01-01",19 +"2011_Indonesia_Super_League_All-Star_team","2015-11-01",15 +"BrahMos_II","2015-07-01",31 +"1707_in_art","2016-04-01",17 +"Aeromarine_Model_60","2016-06-01",34 +"Ayatollah-al-ozma","2015-06-01",12 +"Exanimus","2017-01-01",4 +"Anderby","2017-01-01",29 +"Ashgabat_indoor_tennis_arena","2017-07-01",27 +"1971_Rose_Bowl","2015-12-01",961 +"2004_HR56","2016-05-01",5 +"1886_in_South_Africa","2016-03-01",70 +"Bishop_of_Central_Newfoundland","2016-04-01",1 +"Alice_Rivlin","2016-09-01",1137 +"Arriba_en_la_Cordillera","2017-06-01",39 +"Adam_Lively","2016-06-01",77 +"Colasposoma_fairmairei_fairmairei","2017-06-01",5 +"Archie_Barton","2017-02-01",49 +"Aharon_wasserman","2016-01-01",7 +"Alabama_Educational_Television_Commission","2017-05-01",3 +"Advanced_Technology_Bomber","2016-02-01",67 diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data_small.csv b/docs/ja/integrations/data-ingestion/data-formats/assets/data_small.csv new file mode 100644 index 00000000000..14a0e1ac080 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/data_small.csv @@ -0,0 +1,1000 @@ +"Akiba_Hebrew_Academy","2017-08-01",241 +"Aegithina_tiphia","2018-02-01",34 +"1971-72_Utah_Stars_season","2016-10-01",1 +"2015_UEFA_European_Under-21_Championship_qualification_Group_8","2015-12-01",73 +"2016_Greater_Western_Sydney_Giants_season","2017-05-01",86 +"AAA_Americas_Trios_Championship","2015-10-01",104 +"1420_in_literature","2016-05-01",20 +"Adair,_Beegie","2017-08-01",2 +"1980_Rugby_League_State_of_Origin_match","2017-07-01",2 +"Column_of_Santa_Felicita,_Florence","2017-06-01",14 +"2007_Copa_America","2016-07-01",178 +"Car_dealerships_in_the_USA","2015-07-01",11 +"Dihydromyricetin_reductase","2015-07-01",1 +"ATCvet_code_QB05BB01","2017-04-01",1 +"City_CarShare","2017-01-01",125 +"Heidenrod","2017-01-01",10 +"Arthur_Henrique","2016-11-01",12 +"Alan_Ebnother","2015-11-01",66 +"2013_UConn_football_season","2017-05-01",2 +"2008_American_League_Division_Series","2016-12-01",376 +"Antilipaemic","2017-09-01",12 +"Aberzombie","2016-12-01",28 +"2008_Asian_Wrestling_Championships","2016-12-01",76 +"Federal_Correctional_Complex,_Pollock","2017-01-01",19 +"Central_body","2015-07-01",32 +"Binbrook,_Ontario","2015-07-01",446 +"Azerbaijan_at_the_2016_Judo_Grand_Prix_Samsun","2016-10-01",25 +"Ashford_Lake","2017-10-01",80 +"1942_Joint_Strike","2015-12-01",3 +"AFC_Youth_Championship_2012","2017-10-01",2 +"Akhira","2016-07-01",64 +"Arroniro_Arlieri","2016-10-01",1 +"Alesheim_Burgsalach","2015-05-01",2 +"2700_classic","2017-05-01",4 +"ARX-8_Laevatein","2015-06-01",14 +"1991_Newsweek_Champions_Cup_-_Singles","2017-06-01",3 +"Aphelandra_sinclairiana","2017-07-01",69 +"Asia_Kong","2015-10-01",2 +"2012_Internazionali_Tennis_Val_Gardena_Sudtirol","2016-02-01",1 +"24_Carat_Purple","2017-06-01",476 +"Acroliths","2017-12-01",9 +"Bundesautobahn_3","2016-04-01",264 +"ATC_code_S01AX21","2016-09-01",1 +"Allington,_Lincolnshire","2015-11-01",188 +"Acer_Aspire_One","2017-06-01",5169 +"ATC_code_L04AC","2015-06-01",1 +"1969_New_Year_Honours","2017-07-01",269 +"Antonio_Napolitano","2017-11-01",44 +"Amberfish","2017-10-01",11 +"1976_Cam_2_Motor_Oil_400","2018-03-01",45 +"April_25,_2017","2018-01-01",2 +"Akahori_Station","2016-06-01",11 +"Abducens_palsy","2016-05-01",28 +"Ancona_cathedral","2018-01-01",2 +"Ajou_Motor_College","2017-02-01",83 +"Brad_Skyes","2016-11-01",1 +"Alegro_PCS","2017-07-01",157 +"Franz_Dunshirn","2017-01-01",1 +"Arthur_Godfrey_Road","2016-11-01",3 +"Ab_Golman","2017-05-01",30 +"Art_in_early_modern_Scotland","2016-03-01",98 +"1968_World_Series","2016-02-01",1960 +"1828_in_the_UK","2017-08-01",3 +"Explorer-1_Prime_Unit_2","2016-11-01",11 +"2014_Desafio_Internacional_das_Estrelas","2017-12-01",31 +"Ambulyx_subocellata","2016-08-01",1 +"2008_Hamilton_Tiger-Cats_season","2015-11-01",153 +"Deuterogamist","2015-07-01",5 +"Art_Nouveau_furniture","2017-12-01",839 +"Allison,_Colorado","2015-10-01",85 +"2014_MLS_Re-Entry_Draft","2017-09-01",36 +"Amiot_353","2015-12-01",8 +"ACLU_of_Massachusetts","2015-11-01",106 +"Altable,_Spain","2016-10-01",1 +"Agnidra_scabiosa","2016-12-01",16 +"Dictyotremella_novoguineensis","2015-07-01",1 +"Compiler_Construction","2015-07-01",42 +"Aufheben","2016-11-01",1080 +"Avafauna","2017-06-01",17 +"Atheist_billboard","2017-01-01",19 +"2011_Indonesia_Super_League_All-Star_team","2015-11-01",15 +"BrahMos_II","2015-07-01",31 +"1707_in_art","2016-04-01",17 +"Aeromarine_Model_60","2016-06-01",34 +"Ayatollah-al-ozma","2015-06-01",12 +"Exanimus","2017-01-01",4 +"Anderby","2017-01-01",29 +"Ashgabat_indoor_tennis_arena","2017-07-01",27 +"1971_Rose_Bowl","2015-12-01",961 +"2004_HR56","2016-05-01",5 +"1886_in_South_Africa","2016-03-01",70 +"Bishop_of_Central_Newfoundland","2016-04-01",1 +"Alice_Rivlin","2016-09-01",1137 +"Arriba_en_la_Cordillera","2017-06-01",39 +"Adam_Lively","2016-06-01",77 +"Colasposoma_fairmairei_fairmairei","2017-06-01",5 +"Archie_Barton","2017-02-01",49 +"Aharon_wasserman","2016-01-01",7 +"Alabama_Educational_Television_Commission","2017-05-01",3 +"Advanced_Technology_Bomber","2016-02-01",67 +"1-krona","2017-01-01",4 +"Ahmadabad-e_Kalij-e_Sofla","2017-01-01",3 +"Bob_Dolman","2016-11-01",245 +"Bellevue,_French_Guiana","2017-01-01",5 +"Bison_Nickel","2017-01-01",2 +"Arthur_Drabble","2016-12-01",35 +"Edgewater_Borough,_New_Jersey","2016-11-01",3 +"Alberto_Cambrosio","2017-11-01",31 +"Amalia_Celia_Figueredo","2017-07-01",32 +"1989_-_1992_Rugby_League_World_Cup","2016-01-01",10 +"Admir_Seferagic","2016-06-01",7 +"Adriaan_Loosjes","2015-05-01",46 +"Alfred_Manuel_Martin","2015-06-01",3 +"Academy_of_the_Arabic_Language","2015-08-01",67 +"Ankita_Shrivastav","2018-01-01",7430 +"Anarchism_in_asia","2017-11-01",1 +"Batiquitos_Lagoon_State_Marine_Conservation_Area","2015-07-01",18 +"Alstonia_calophylla","2017-12-01",2 +"4-Hydroxycyclohexanecarboxylate_dehydrogenase","2016-11-01",4 +"832_symmetry","2017-09-01",6 +"1931_Fuyun_earthquake","2016-07-01",64 +"1998_Masters_of_Formula_3","2016-01-01",60 +"2011_LG_Hockey_Games","2016-04-01",7 +"Generalized_pustular_psoriasis","2017-01-01",159 +"2013_European_Cup_Winter_Throwing","2016-07-01",56 +"2008_in_Argentina","2017-06-01",48 +"Apostrophized","2017-10-01",5 +"Algebraically_compact_module","2017-01-01",5 +"Askett","2015-10-01",79 +"2009_swine_flu_outbreak_timeline","2015-08-01",65 +"72704-01-9","2017-12-01",4 +"Alexandre-Charles-Albert-Joseph_Renard","2017-11-01",4 +"Acyl-CoA_oxidase","2016-09-01",250 +"2011_Budweiser_Shootout","2015-08-01",109 +"Augusta_Davies_Webster","2015-07-01",2 +"Association_theory","2017-07-01",112 +"Abemama_Airfield","2015-05-01",8 +"Archaeological_Museum_of_Heraklion","2015-10-01",14 +"Authorized_marches_of_the_Canadian_Armed_Forces","2016-11-01",241 +"1986_in_Portugal","2017-01-01",7 +"Antiziganism_in_Bulgaria","2017-12-01",13 +"Adriana_Martin","2015-09-01",21 +"2004_Green_Bay_Packers_season","2015-05-01",970 +"Agrippa_the_Sceptic","2017-11-01",95 +"Admiral_Island","2016-04-01",1 +"Auxiliary_sign_language","2015-06-01",31 +"2013_Food_City_500","2015-06-01",90 +"Andy_Roesch","2015-08-01",15 +"Alsoszentivan","2017-05-01",4 +"Architecture_of_Belgium","2015-05-01",199 +"1_South_African_Infantry","2017-06-01",5 +"1930_Auburn_Tigers_football_team","2016-12-01",39 +"1860_in_Canada","2017-05-01",269 +"Aldeaseca_de_la_Frontera","2018-03-01",21 +"Elijah_Fox_Cook","2015-07-01",13 +"2010_BCS_Bowl_Games","2016-03-01",1 +"2017_NPSL_season","2017-06-01",2806 +"Bank_of_New_South_Wales_v_Commonwealth","2016-12-01",173 +"American_Enterprise_Association","2016-02-01",4 +"26th_Kentucky_Derby","2018-03-01",1 +"Chaldean_Diocese_of_Amid","2016-11-01",18 +"Ajaran_language","2016-03-01",1 +"1992_Texas_Rangers_season","2017-06-01",113 +"26_SAS","2017-12-01",3 +"2015_Terengganu_FA_season","2016-01-01",537 +"Aagard,_Oregon","2017-03-01",3 +"Auberry,_CA","2017-05-01",13 +"American_Eskimo_spitz","2015-09-01",3 +"Antidiabetic","2016-11-01",75 +"Asinius","2017-11-01",26 +"Andrey_Vasilievich_Abramov","2016-10-01",1 +"Alan_Carrington","2018-03-01",91 +"Colebrook,_Ontario","2017-06-01",2 +"Abbasabad-e_Kheyrabad","2015-08-01",24 +"Arandjelovac_Municipality","2016-02-01",1 +"Aloysius_Valente","2017-12-01",11 +"Almondo_Curry","2016-03-01",86 +"4th_century_AD","2017-03-01",13 +"Askhat_Dilmukhamedov","2016-02-01",77 +"1147_AD","2017-05-01",1 +"1953_Torneo_di_Viareggio","2017-03-01",20 +"ATP_Schenectady","2015-12-01",30 +"Lakarian_City","2017-01-01",3 +"Adam_Ferency","2017-12-01",176 +"AugustDvorak","2016-07-01",5 +"97th_Light_Infantry_Division","2017-07-01",1 +"16th_Connecticut_Infantry_Regiment","2016-05-01",146 +"2011_Somalian_drought","2017-05-01",2 +"Anbargah","2017-12-01",8 +"1921_in_Paraguayan_football","2016-03-01",2 +"Cosmetic_dermatitis","2017-01-01",5 +"Annunciation_Greek_Orthodox_Cathedral,_Atlanta,_Georgia","2015-09-01",9 +"1300_AM","2016-07-01",106 +"A_Promising_Africa","2016-03-01",41 +"2015-16_Odense_Bulldogs_season","2016-10-01",1 +"Aral_AG","2017-12-01",1446 +"Angel_Vivar_Dorado","2015-12-01",6 +"1951_Australian_Championships","2018-03-01",32 +"DJMax_Portable_Hot_Tunes","2017-01-01",27 +"Allinge","2017-03-01",32 +"1986_Buick_WCT_Finals","2016-11-01",14 +"Arimatsu,_Aichi","2015-06-01",112 +"Arthur_Berzinsh","2017-02-01",249 +"Apolima_Uta","2017-04-01",23 +"Capitol_Hill_Pride_Festival","2015-07-01",19 +"Kara-Murza","2017-01-01",5 +"Aigleville,_Alabama","2015-11-01",19 +"Abdullah_bin_al-Hussein","2017-02-01",1 +"2017-18_Inter_Milan_season","2018-03-01",26 +"African_Collared_Dove","2016-07-01",10 +"Achaea_dmoe","2016-11-01",3 +"Aurora,_Utah","2016-06-01",201 +"Architecture_in_Portland,_OR","2017-07-01",1 +"Charchala","2015-07-01",4 +"Around_the_Roses","2015-07-01",3 +"1965_in_music","2016-12-01",3394 +"Alojzije_Jankovic","2017-04-01",5 +"Arisu_Seno","2015-08-01",6 +"ALCO_T-6","2017-01-01",77 +"1998_Royal_Bank_Cup","2015-12-01",32 +"1956_Claxton_Shield","2016-11-01",9 +"Anita_Dube","2017-07-01",233 +"Anderson_Windows","2015-05-01",13 +"Annaquatucket_River","2018-03-01",38 +"Black_salve","2017-01-01",1496 +"Anna_Pendleton_Schenck","2017-02-01",11 +"Asghar_Nadeem_Syed","2017-07-01",146 +"Disarming","2016-11-01",5 +"Antarctic_ice_cap","2017-08-01",7 +"Antonio_Ottone","2017-05-01",11 +"Coralie_Larnack","2017-01-01",9 +"Budha_Subba_Gold_Cup","2016-11-01",24 +"Amphoe_Chaiya","2017-03-01",9 +"Anarcho-capitalism_in_Somalia","2016-10-01",7 +"Felix_Loch","2017-01-01",131 +"26508_Jimmylin","2017-12-01",3 +"Andrew_McMillen","2015-11-01",134 +"Dundee_Canal_Industrial_Historic_District","2017-01-01",2 +"Aula_Baratto","2015-12-01",140 +"Church_of_St_Mary,_Knowsley","2015-07-01",1 +"Aggelakis","2017-10-01",1 +"Al_Badiyah","2017-11-01",157 +"Assault_Gunboat","2016-03-01",21 +"Lachau","2017-01-01",4 +"2008_Pittsburgh_Steelers_season","2016-12-01",10018 +"Apolychrosis_candidus","2018-01-01",24 +"Andrei_Krylov","2017-02-01",192 +"Aldesh_Vadher","2018-02-01",7 +"Alwand","2017-02-01",7 +"Edward_Baker_Lincoln","2015-07-01",4347 +"Aermotor_Corporation","2017-11-01",4 +"Aischylos","2017-01-01",7 +"6th_Assault_Aviation_Corps","2017-07-01",100 +"Azygos_lobe","2016-10-01",1598 +"Demirciler,_Nazilli","2015-07-01",4 +"Akhlaq-e-Hindi","2016-11-01",13 +"Dragon_Crusaders","2016-04-01",122 +"25V_USB","2016-01-01",1 +"Calliophis_melanurus","2017-01-01",31 +"Antonionian","2016-10-01",15 +"Ashley_Richardson","2017-09-01",1216 +"1st_Observation_Group","2018-01-01",6 +"Andrzej_Bargiel","2015-05-01",97 +"2008_AFL_National_Under_16_Championships","2018-03-01",20 +"Ammon_Bundy","2016-09-01",11890 +"Benno_Wandolleck","2016-11-01",5 +"Aero-Kros_MP-02_Czajka","2016-03-01",136 +"A6005_road","2015-10-01",14 +"Eagle_Eye_Networks","2015-07-01",101 +"Aarberg","2017-12-01",277 +"Encyclopedia_of_anthropology","2015-07-01",1 +"Duncormick_railway_station","2016-11-01",7 +"Aiqing_huajiao_zhuanyi","2017-03-01",1 +"Crude_oil_washing","2016-04-01",466 +"2010_Indiana_Hoosiers_football_team","2017-06-01",90 +"Book_of_Bodley_Head_Verse","2015-07-01",18 +"Absence_seizure","2016-05-01",18152 +"Cayucupil","2016-04-01",3 +"Akanabee","2017-03-01",1 +"Grooved_consonant","2017-01-01",5 +"Dellamora_philippinensis","2015-07-01",7 +"Dejan_Blazevski","2017-01-01",1 +"Arabis_armena","2016-08-01",25 +"1988_Summer_Paralympics_medal_table","2016-12-01",90 +"2012-13_Basketball_Championship_of_Bosnia_and_Herzegovina","2017-04-01",2 +"1966_in_music","2017-10-01",3510 +"Antti_Tyrvainen","2015-12-01",2 +"African_desert","2016-06-01",262 +"Bruneau_mariposa_lily","2016-04-01",1 +"Bernie_Parmalee","2017-06-01",221 +"2015_South_American_Youth_Football_Championship_squads","2015-09-01",594 +"1985_IIHF_World_U20_Championship","2015-08-01",7 +"18th_British_Academy_Film_Awards","2018-02-01",270 +"523_Ada","2016-04-01",35 +"Active_Pharmaceutical_Ingredients","2016-02-01",5 +"Burley,_ID_mSA","2015-07-01",2 +"CFRN-TV-10","2017-06-01",2 +"1982_Super_Bowl_of_Poker","2017-08-01",38 +"Australian_Journal_of_Educational_Technology","2017-01-01",1 +"2013_Super_League_Grand_Final","2016-06-01",212 +"2006_BCR_Open_Romania","2015-06-01",25 +"Charlestown_Townies","2016-04-01",319 +"1943_Polish_underground_raid_on_East_Prussia","2017-08-01",8 +"Anthony_Celestino","2018-02-01",182 +"Andrew_Beerwinkel","2018-02-01",73 +"Greigia_atrobrunnea","2017-01-01",1 +"Adrian_Beecham","2017-11-01",1 +"Implementation_of_mathematics_in_set_theory","2017-01-01",12 +"Annastacia_Palaszczuk","2015-05-01",6247 +"Egon_Zimmermann_II","2016-11-01",3 +"Air_aide-de-camp","2018-03-01",137 +"Albert_Murphy","2016-09-01",1 +"1924_Arkansas_Razorbacks_football_team","2016-02-01",28 +"Avondale_Mill","2016-10-01",68 +"Alexander_Volzhin","2015-12-01",25 +"Arek_Monthly","2017-08-01",31 +"Dinka_Blanche","2015-07-01",1 +"1921_Mercer_Baptists_football_team","2016-11-01",10 +"Afro-Antiguan_and_Barbudan","2016-06-01",252 +"American_southern_literature","2016-10-01",3 +"1947_Swiss_Grand_Prix","2016-11-01",32 +"99p_Stores","2017-12-01",3028 +"Artem_Radkov","2018-03-01",21 +"Arctic_brome","2016-12-01",19 +"Battle_Of_Moskova","2015-06-01",6 +"Airdrieonians","2016-06-01",32 +"Advanced_transportation_controller","2018-03-01",79 +"BC_government","2016-12-01",18 +"Antonio_Maura","2017-03-01",457 +"Anjuman,_Afghanistan","2017-09-01",62 +"Deodato_Guinaccia","2015-07-01",13 +"Blowjob_Betty","2016-11-01",28 +"453d_Flying_Training_Squadron","2017-08-01",3 +"1990_Africa_Cup_of_Nations","2016-04-01",22 +"Agenville","2016-08-01",100 +"1202_in_Scotland","2018-01-01",82 +"Calytrix_desolata","2017-06-01",10 +"1957_in_Chile","2016-04-01",13 +"Anglican_Bishop_of_Torres_Strait_people","2017-08-01",1 +"2015_Mexican_Grand_Prix","2015-06-01",528 +"Catalan_parliament","2017-01-01",14 +"Cult_Shaker","2017-01-01",32 +"Ander_Gayoso","2016-11-01",34 +"Ageneiosus_ucayalensis","2017-12-01",20 +"Club_de_Berne","2015-07-01",194 +"Adecco","2016-03-01",9863 +"Anti-unionism","2018-01-01",11 +"Auchindoun_Castle","2017-01-01",102 +"557_in_poetry","2016-07-01",1 +"Abu_ol_Verdi_Rural_District","2017-01-01",1 +"Centro_73","2016-04-01",23 +"Dagger_compact_category","2016-04-01",97 +"Alan_Nunn_May","2017-11-01",770 +"Basal_clade","2015-07-01",44 +"Aizu_Line","2015-08-01",26 +"Edward_Kernan_Campbell","2016-04-01",5 +"865_area_code","2016-12-01",9 +"Bahamas_at_the_1984_Summer_Olympics","2017-06-01",35 +"Gardan_Kalat","2017-01-01",1 +"American_Samoa_national_under-19_football_team","2017-12-01",4 +"Kayah_National_United_League","2017-01-01",14 +"2007_Nordea_Nordic_Light_Open_-_Singles","2016-10-01",2 +"Avondale_Estate","2016-11-01",2 +"Acalolepta_variolaris","2017-02-01",3 +"Anantapur,_Andhra_Pradesh","2017-05-01",1032 +"Amenable_Banach_algebra","2015-08-01",59 +"300_metres","2017-01-01",61 +"Black_Bottom,_Kentucky","2016-04-01",8 +"100_Players_Who_Shook_The_Kop","2018-01-01",1133 +"Adventure_story","2015-07-01",29 +"Anacampsis_lignaria","2017-05-01",5 +"2007_American_Indoor_Football_Association_season","2015-09-01",89 +"Dmitry_Kardovsky","2016-04-01",33 +"A10_autoroute","2015-11-01",27 +"1995_Sydney_Bulldogs_season","2017-04-01",40 +"Ilex_jelskii","2017-01-01",2 +"Adrian_Jose_Hernandez","2016-10-01",2 +"CallAir_A-5","2016-11-01",4 +"22nd_meridian_west","2015-07-01",45 +"Anglican_Diocese_of_Antananarivo","2015-08-01",2 +"Andrew_Kelsey","2016-11-01",14 +"Brownhill_Creek","2017-06-01",4 +"Abunai_Deka","2015-06-01",269 +"Aisha_Jefferson","2017-04-01",115 +"Alonso_Lopez","2017-03-01",7 +"Aeroparque_Ciudad_de_Mendoza","2016-01-01",1 +"Arthur_Ashley_Sykes","2017-12-01",45 +"Holy_Face_Medal","2017-01-01",20 +"1Chronicles","2018-02-01",1 +"2014_CFU_Club_Championship","2017-12-01",108 +"Aetna_class_ironclad_floating_battery","2015-06-01",37 +"Antoine_Delrio","2015-07-01",2 +"Chislet_Windmill","2015-07-01",38 +"Aerojet_SD-2","2017-07-01",59 +"Age_role_play","2015-09-01",2 +"50687_Paultemple","2018-03-01",8 +"1997-98_Cuban_National_Series","2017-02-01",1 +"Aleksandr_Borisovich_Belyavskiy","2017-10-01",42 +"Carol_MacReady","2017-01-01",111 +"18th_Chess_Olympiad","2015-06-01",134 +"Clara_Schonfeld","2015-07-01",1 +"Apollonius_of_Athens","2017-02-01",35 +"ABC_80","2018-03-01",603 +"Apatelodes_damora","2015-08-01",22 +"Ernest_Walbourn","2016-04-01",30 +"428_BCE","2017-04-01",2 +"72nd_Seaforth_Highlanders","2017-12-01",29 +"Broughton_Hackett","2015-07-01",38 +"A_Fazenda_2","2016-12-01",56 +"ATCvet_code_QJ01MQ","2017-05-01",2 +"Abura,_Iran","2017-03-01",3 +"DeLeon_Independent_School_District","2015-07-01",1 +"Abby_aldrich","2016-09-01",1 +"Cinema_One_Originals","2016-11-01",359 +"2013_European_Short_Course_Swimming_Championships","2017-09-01",124 +"Ars_technica","2015-11-01",442 +"AMS_Production_Company","2016-02-01",1 +"Joao_Soares","2017-01-01",1 +"Cervical_vertebra_6","2017-06-01",45 +"Kevin_Pugh","2017-01-01",2 +"Alpha-1_antitrypsin","2015-11-01",11845 +"Assyrians_in_iran","2017-07-01",53 +"Boophis_ankarafensis","2016-11-01",2 +"A_View_To_a_Kill","2018-01-01",4 +"Charles_Edouard_Brown-Sequard","2015-07-01",7 +"1919_in_Ireland","2017-04-01",239 +"74th_Foot","2015-06-01",3 +"9275_Persson","2016-07-01",22 +"Dalcerides_mesoa","2015-07-01",11 +"A_Summer_Bird-Cage","2016-03-01",248 +"2011_NAB_Cup","2017-10-01",127 +"13th_Parliament_of_Lower_Canada","2015-08-01",41 +"2011_Players_Championship_Finals","2015-07-01",25 +"Flag_of_Tenerife","2017-01-01",128 +"Hypopta_corrientina","2017-01-01",1 +"Jalatarangam","2017-01-01",16 +"Adjoint_endomorphism","2018-01-01",330 +"Anime_conventions","2015-06-01",18 +"2004_Grammy_Award","2015-06-01",13 +"American_war","2015-07-01",80 +"Beynes,_Yvelines","2016-11-01",32 +"Agriculture_Department","2016-06-01",16 +"Andrey_Chisty","2015-10-01",58 +"Ait_Yahia_Moussa","2017-08-01",7 +"Alfred_Blau","2017-03-01",57 +"1869_in_sports","2017-08-01",73 +"Ambolodia_Sud","2016-04-01",6 +"Animal_slaughter","2017-06-01",6423 +"Adamowka_Commune","2018-01-01",2 +"Arsenic_pentachloride","2016-03-01",467 +"220_BCE","2016-01-01",3 +"863d_Engineer_Battalion","2015-11-01",160 +"Amer_Abu-Hudaib","2017-04-01",31 +"Aaina_tv","2017-08-01",3 +"Arnhem,_Netherlands","2015-08-01",67 +"Antoine_de_sartine","2015-08-01",4 +"ATC_code_A16","2016-01-01",155 +"Eastern_Front","2017-01-01",70 +"Ashy-headed_tyrannulet","2016-12-01",44 +"Aoheng_language","2015-08-01",64 +"1996_World_Junior_Canoe_Slalom_Championships","2017-11-01",15 +"Agriophara_nodigera","2017-11-01",12 +"Amsterdam_Island_cattle","2015-12-01",675 +"Aliyah_from_the_Soviet_Union_in_the_1990s","2017-08-01",54 +"Abandoned_and_Little_Known_Airfields","2018-01-01",2 +"Church_numerals","2015-07-01",57 +"Ankeny_Christian_Academy","2015-09-01",74 +"2010_FIFA_World_Cup_qualification_-_AFC_First_Round","2017-06-01",58 +"1ESS_switch","2015-07-01",514 +"Chelys_boulengerii","2016-04-01",1 +"Bivalent_logic","2016-11-01",25 +"Ivan_Skavinsky_Skavar","2017-01-01",1 +"Fergus_Sings_the_Blues","2016-04-01",62 +"2015-16_Libyan_Premier_League","2017-02-01",4 +"Dutch_Chess_Championship","2017-01-01",35 +"Every_Man_in_His_Humor","2016-11-01",1 +"2008_Allstate_BCS_National_Championship_Game","2015-08-01",11 +"Aq_Tappeh,_Hamadan","2015-09-01",25 +"Agrotractor","2016-02-01",1 +"Alexander_of_Pfalz-Zweibrucken","2017-12-01",2 +"2003_Mistral_World_Championships","2016-04-01",6 +"146th_Fighter-Interceptor_Wing","2015-11-01",49 +"Al-Qahir","2016-04-01",328 +"25604_Karlin","2015-05-01",20 +"Allen_taflove","2017-12-01",3 +"Aretha_Thurmond","2017-05-01",109 +"Atlanta_and_lagrange_rail_road","2015-07-01",1 +"ACSI_College_Iloilo","2015-10-01",1 +"Alan_Sacks","2015-07-01",150 +"African_Desert_Warbler","2017-02-01",11 +"A_Man_and_His_Soul","2018-02-01",89 +"ASCII_ART","2015-05-01",9 +"1992-93_VMI_Keydets_basketball_team","2016-10-01",1 +"George_and_the_Dragon","2017-01-01",18 +"2012_NAB_Cup","2016-12-01",99 +"1965_Indy_500","2016-05-01",51 +"Forest_Glen,_Nova_Scotia","2016-04-01",9 +"A_Critical_Dictionary_of_English_Literature","2016-08-01",4 +"Aquion_Energy","2015-08-01",1077 +"Alibeyce,_Emirdag","2017-09-01",1 +"Blauhu00F6hle","2015-07-01",1 +"Ian_Sommerville","2017-01-01",1 +"Air_propulsion","2017-07-01",474 +"2016_12_Hours_of_Sebring","2016-10-01",187 +"Asites","2017-07-01",4 +"Al-Kini","2017-03-01",1 +"Austin_Aztex_2009_season","2016-03-01",10 +"Alto_Vista_Chapel","2015-12-01",833 +"Abecedaria","2017-04-01",22 +"Farm_to_Market_Road_2503","2016-11-01",3 +"Anglican_Bishop_of_The_Leeward_Islands","2015-09-01",2 +"Basketball_at_the_2011_Pan_American_Games","2017-06-01",120 +"Angela_Peel","2016-08-01",7 +"Amber_Frey","2018-02-01",728 +"Afraid_to_Sleep","2017-06-01",51 +"ATC_code_A02BA","2018-02-01",7 +"Apateon_pedestris","2015-11-01",5 +"Alois_Estermann","2015-12-01",1155 +"1752_in_science","2016-01-01",78 +"Baldassin","2017-06-01",3 +"Camilla_Hildegarde_Wedgwood","2017-01-01",1 +"B-A-C-H_motive","2016-10-01",3 +"AI_Velorum_star","2016-09-01",1 +"Ali_Zayn_al-Abidin","2017-04-01",71 +"Ailurarctos_lufengensis","2015-07-01",1 +"Clearview,_Philadelphia","2017-06-01",67 +"Adam_Sender","2016-08-01",759 +"Apriona_paucigranula","2018-02-01",7 +"Dark_at_the_Top_of_the_Stairs","2015-07-01",10 +"Acanthio","2017-12-01",11 +"1980_Labatt_Brier","2018-01-01",111 +"2016-17_New_York_Knicks_season","2017-10-01",21 +"1995_CAF_Cup","2015-10-01",48 +"Boiled_linseed_oil","2016-04-01",79 +"2015_Kumanovo_clashes","2016-07-01",6 +"David_Jamieson","2017-01-01",3 +"1915_Florida_Gators_football_team","2015-08-01",32 +"2010-11_New_Zealand_Football_Championship","2017-03-01",1 +"Ashley_Church","2015-08-01",27 +"Acanthoxylini","2017-06-01",27 +"American_Hindu","2016-10-01",33 +"Amylosporomyces","2015-12-01",20 +"2007_Southeast_Asia_Basketball_Association_Championship","2018-01-01",1 +"Aethelred_I","2017-08-01",1 +"2-methyl-GPP_synthase","2018-02-01",1 +"Dave_Aspin","2016-11-01",6 +"Descent_of_the_Nine","2016-04-01",1 +"2010_Kleen_Energy_Systems_disaster","2017-08-01",3 +"1978_in_Japanese_television","2017-08-01",70 +"Alexandros_Falekas","2018-01-01",1 +"1910_in_Afghanistan","2016-02-01",32 +"Abd-ru-shin","2017-09-01",681 +"610_in_poetry","2017-05-01",3 +"2015_arrests_of_FIFA_officials","2017-12-01",46 +"ATmega328P","2017-09-01",26 +"A_G_Mathews","2017-12-01",3 +"Attack_on_Mers-el-Kebir","2016-12-01",511 +"2016_in_Estonia","2016-05-01",89 +"Adidas-Salomon","2015-09-01",574 +"Education_and_Skills_Act_2008","2016-11-01",141 +"1789_in_the_United_States","2015-07-01",845 +"Apple_Computer_advertising","2015-09-01",7 +"9th_US_Army","2016-12-01",17 +"Ad_Rotas","2016-02-01",16 +"Agios_Ioannis,_Paphos","2018-03-01",97 +"Arabian_toad","2017-12-01",100 +"Anterior_pituitary_acidophil","2016-06-01",47 +"Arguello,_Christine","2017-12-01",3 +"Amilkar_Ariza","2017-03-01",67 +"Charles_Grierson","2016-11-01",14 +"Achi,_Bolivar","2017-11-01",1 +"Exonym_and_endonym","2017-01-01",1712 +"Abdul_Maroof_Gullestani","2017-12-01",20 +"Fairlawne_Handicap_Chase","2016-04-01",11 +"1963_Virginia_Tech_Hokies_football_team","2016-07-01",6 +"AE_Clarke","2017-12-01",3 +"ALFA-PROJ_Model_3563_sport","2017-10-01",2 +"Aleks_Vanderpool-Wallace","2018-02-01",32 +"Antioxident","2017-05-01",16 +"Calliope_Project","2015-07-01",3 +"Anderson_World","2017-10-01",5 +"Amydria_selvae","2017-11-01",6 +"Antoni_Katski","2016-09-01",1 +"Bera_District","2017-06-01",85 +"80_South_Street_New_Design","2016-07-01",86 +"Askizsky","2015-08-01",2 +"Amausi_metro_station","2015-11-01",44 +"9486_Utemorrah","2017-04-01",5 +"Army_CIS","2018-01-01",2 +"1851_Chilean_Revolution","2017-06-01",255 +"Jens_Robert_Dahlqvist","2017-01-01",6 +"1966-67_Tercera_Division","2017-05-01",1 +"Chanel_Iman","2017-06-01",9434 +"Astydamia","2017-06-01",34 +"1944_in_Belgium","2016-09-01",27 +"Acton_Baronets,_of_Aldenham","2017-01-01",1 +"2014_FBS_season","2016-12-01",5 +"2016_Winter_Youth_Olympics","2017-09-01",2090 +"1903_Clemson_Tigers_football_team","2017-06-01",50 +"2014_Taca_da_Liga_Final","2017-04-01",2 +"10th_Alberta_general_election","2016-11-01",4 +"Edertalschule_Frankenberg","2016-04-01",16 +"4th_Punjab_Infantry_Regiment","2017-09-01",136 +"America_Air_Linhas_Aereas","2018-02-01",1 +"Australian_Liberal_Party","2015-06-01",146 +"American_licorice","2017-05-01",15 +"2013_NASCAR_Cup_Series","2015-10-01",49 +"Anja_Lundqvist","2016-03-01",93 +"Amauris_dannfelti","2016-01-01",12 +"Abandoned_shipwrecks_act","2015-06-01",3 +"11086_Nagatayuji","2017-02-01",3 +"Advertising_tissues","2017-06-01",1 +"Anti_corn-law_league","2016-10-01",1 +"Always_Guaranteed","2017-09-01",445 +"Alfredo_Palacio_Moreno","2018-01-01",48 +"Antonio_Puche_Vicente","2015-06-01",1 +"Elazig_Province","2017-01-01",1 +"ATC_code_C02AC01","2017-05-01",1 +"Alexander_Mattock_Thompson","2016-08-01",2 +"Cocos_Islands_Malay","2017-06-01",63 +"Aftonbladet_antisemitism_controversy","2016-10-01",1 +"Azad_Kashmir,_Pakistan","2015-07-01",14 +"1852_English_cricket_season","2016-10-01",24 +"Birmingham_Pride","2015-07-01",129 +"Air-pollution_controls","2015-08-01",4 +"James_Southerton","2017-01-01",20 +"Architecture_of_Chiswick_House","2015-06-01",240 +"Alexander,_Colin","2015-12-01",1 +"Al-Mansooreh","2016-10-01",1 +"Arielle_Gastineau_Ashton","2017-12-01",18 +"Blue_Ben","2017-06-01",240 +"1911_Michigan_State_Normal_Normalites_football_season","2017-11-01",1 +"Arctictis_binturong","2017-04-01",334 +"Fornaldarsaga","2016-04-01",18 +"Bibasis_gomata","2017-06-01",35 +"Anna_Schchian","2017-06-01",19 +"2005_in_Rwanda","2016-08-01",69 +"Archaeology_in_ethiopia","2016-01-01",1 +"23277_Benhughes","2016-12-01",2 +"Bahrain_-_USA_relations","2017-06-01",1 +"Dieter_Korn","2015-07-01",13 +"Antidynamo_theorem","2016-10-01",222 +"An_Jae-Won","2016-12-01",1 +"Bruray","2015-07-01",82 +"Gosport_Council_election,_2004","2017-01-01",2 +"1856_in_South_Africa","2017-03-01",60 +"Dialakoro,_Guinea","2017-01-01",1 +"05-CV-1678","2016-02-01",1 +"Allison,_Henry","2016-12-01",5 +"Animal_house","2016-06-01",1399 +"Alexander_Tabarrok","2017-03-01",5 +"Chung-Ho_Memorial_Hospital","2017-06-01",50 +"2013_Internazionali_Trofeo_Lame_Perrel-Faip_-_Doubles","2016-03-01",4 +"1965_Speedway_World_Team_Cup","2017-11-01",13 +"Alexander_Ollongren","2017-11-01",788 +"Amore_traditore,_BWV_203","2016-06-01",83 +"Arthur_William_Rogers","2015-10-01",31 +"Ashoka_pillar","2017-02-01",265 +"1_62_honeycomb","2018-02-01",10 +"1926_Australasian_Championships","2016-05-01",47 +"Export_award","2016-04-01",3 +"5000_Days_Project","2016-07-01",75 +"2012_UCI_Europe_Tour","2017-03-01",65 +"1985_Toronto_Indoor_-_Singles","2015-08-01",4 +"Cedar_Grove,_North_Carolina","2017-06-01",18 +"Battle_of_The_Afsluitdijk","2016-04-01",15 +"Arishtanemi","2017-03-01",7 +"Alfalfa_bill_murray","2016-12-01",7 +"Elisha_Jay_Edwards","2015-07-01",28 +"Arturas_Paulauskas","2016-01-01",10 +"Abdelrahman_Hamad","2015-09-01",2 +"1948_in_Northern_Ireland","2015-07-01",29 +"1988_in_philosophy","2015-05-01",70 +"5-Hydroxytryptaminen","2016-01-01",4 +"2017_FBS_season","2017-10-01",124 +"Areeiro","2016-04-01",2 +"Alemonides","2016-03-01",6 +"Abrochia_caurensis","2016-10-01",1 +"Anafylaxia","2018-01-01",2 +"1938_Grand_National","2018-02-01",80 +"China-Korea_Champions_League","2015-07-01",4 +"Acetyl_bromide","2017-11-01",448 +"24_hours_of_lemans","2015-05-01",37 +"Albright_hereditary_osteodystrophy","2017-02-01",153 +"Ashland_Bus_System","2015-08-01",115 +"1,8-Cineole_2-endo-monooxygenase","2016-10-01",8 +"2005-2006_NHL_Season","2015-11-01",6 +"Cammie_Dunaway","2015-07-01",344 +"D-Fish","2016-11-01",2 +"4_sister_vineyard","2015-09-01",1 +"Alessia_Cara_discography","2017-03-01",100 +"Alexander_Berg","2017-08-01",63 +"4822_Karge","2018-02-01",32 +"Emile_Francis_Trophy","2017-01-01",8 +"Amin_Ghaseminejad","2017-06-01",45 +"Artichia","2017-09-01",19 +"Cividale","2016-11-01",41 +"2007_Orissa_Violence","2016-05-01",1 +"Australian_Saltbush","2016-12-01",5 +"Asian_Food_Channel","2016-09-01",727 +"Camp_iawah","2015-07-01",1 +"ATC_code_J01MA04","2017-11-01",1 +"Arpad_Balazs","2017-10-01",2 +"Angel_of_Music,_or_The_Private_Life_of_Giselle","2018-02-01",56 +"1983_Torneo_di_Viareggio","2016-03-01",22 +"Arellano_University","2017-09-01",1699 +"ATC_code_B03AA","2017-11-01",1 +"FS5000","2016-11-01",1 +"Abd-Allah_ibn_Zubayr","2017-05-01",2 +"1889_SAFA_season","2016-04-01",28 +"Aloha_bowl_broadcasters","2015-05-01",2 +"1994_All_England_Open_Badminton_Championships","2016-07-01",75 +"Are_We_Not_Horses","2015-07-01",79 +"Angiolo_Torchi","2018-02-01",5 +"Chimanimani_National_Park","2017-06-01",37 +"Art_manifesto","2017-09-01",2619 +"Adrian_Apostol","2016-10-01",62 +"Adventure_book","2015-10-01",14 +"Albemarle_Bertie","2016-06-01",20 +"Adam_Deibert","2017-08-01",611 +"Alberta_association_of_architects","2017-10-01",2 +"Alloschmidia","2017-11-01",15 +"Administrative_department_of_security","2016-05-01",1 +"Archdeaconry_of_Dudley","2017-07-01",19 +"Ammayenna_Sthree","2015-12-01",38 +"Aaron_Spelling","2016-05-01",25128 +"Anatolian_hieroglyph","2016-07-01",308 +"Central_University_of_Rajasthan","2016-11-01",323 +"Annamanum_touzalini","2017-08-01",7 +"Acleris_hispidana","2016-11-01",2 +"Frisco_kid","2016-04-01",15 +"Allerheiligenberg_monastery","2017-12-01",2 +"Arctic_comb_jelly","2017-03-01",3 +"279377_Lechmankiewicz","2016-06-01",1 +"AEGON_Pro-Series_Loughborough","2018-02-01",7 +"Firefly_Space_Systems","2017-01-01",235 +"2000-01_Hong_Kong_League_Cup","2017-12-01",6 +"British_supermarkets","2017-01-01",2 +"A_description_of_New_England","2016-10-01",13 +"Artificial_Flavoring","2016-06-01",2 +"Anglican_bishop_of_the_Torres_people","2018-02-01",1 +"Antonio_Diaz_Cardoso","2018-02-01",1 +"Johan_Patriksson","2017-01-01",3 +"Ashutosh_Morya","2017-07-01",1 +"Iron_ore","2017-01-01",3682 +"AT-16_Scallion","2015-08-01",594 +"Data_analyst","2015-07-01",134 +"Cabbageball","2016-04-01",3 +"Acanthonyx_seriopuncta","2017-04-01",2 +"Aegeria_ruficauda","2017-10-01",1 +"Archibald_Douglas,_1st_Earl_of_Ormond","2016-06-01",100 +"2014_European_Championships_in_Athletics","2017-01-01",3 +"1Co-Co1","2017-08-01",77 +"Arthur_Abba_Goldberg","2015-10-01",2 +"Ameri-Cana_Ultralights","2015-05-01",33 +"1979_British_Formula_One_season","2015-12-01",218 +"American_colonial_history","2016-06-01",6 +"Arcadia_Martin_Wesay_Toe","2015-06-01",73 +"Adam_Ornstein","2017-08-01",2 +"Archive_of_Modern_Conflict","2016-12-01",307 +"Ciro_Urriola","2015-07-01",12 +"Acanthosyris","2015-12-01",53 +"Eriopyga_jamaicensis","2015-07-01",1 +"10th_parallel_north","2016-06-01",1412 +"Derek_Almond","2017-01-01",2 +"Jaimanglapur","2017-01-01",4 +"Aphroditeola_olida","2018-02-01",6 +"18th_dynasty_of_egypt","2017-06-01",2 +"Ali_ben_Ahmed","2016-08-01",62 +"Ashkur_Mahalleh","2018-02-01",8 +"Adolf_Mosengel","2017-02-01",54 +"1838_Safed_pogrom","2016-02-01",1 +"1829_in_architecture","2017-05-01",24 +"Arcones,_Segovia","2016-05-01",3 +"Albert_Smith_Medal","2018-02-01",30 +"Arqanqergen_mass_murder","2015-10-01",60 +"Jaan_Usin","2017-01-01",4 +"2009_Bangladesh_Rifles_revolt","2016-03-01",269 +"-coltore","2015-11-01",9 +"Ernest_Makins","2017-01-01",10 +"Amsterdam_Bijlmer_Arena","2016-07-01",87 +"Apostolic_assemblies_of_christ","2018-01-01",1 +"Abirabad,_Razavi_Khorasan","2015-08-01",26 +"2016_All-Ireland_Senior_Football_Championship","2015-10-01",883 +"Asylum_seeking","2016-06-01",36 +"56th_parallel","2015-07-01",12 +"Junior_roller_derby","2017-01-01",19 +"Ana_Goncalves","2016-03-01",2 +"Alekseevskiy_Raion","2017-11-01",1 +"2009_Vietnam_national_football_team_results","2017-07-01",15 +"Chicago,_Burlington_and_Quincy_Railroad_Depot","2017-01-01",2 +"Fox_Valley_Conference","2016-04-01",84 +"Brachioplasty","2017-06-01",304 +"Arnold_Doren","2017-06-01",11 +"All_Ireland_mandolin_Champion","2015-07-01",2 +"Deborah_Rennard","2016-04-01",814 +"Anthony_Macdonnell","2016-02-01",2 +"Azerbaijan_Pakistan_relations","2017-01-01",1 +"A_Girl_Named_Zippy","2018-03-01",346 +"Academic_OneFile","2018-02-01",109 +"East_Point_Academy","2017-01-01",48 +"2011_Italian_Figure_Skating_Championships","2017-03-01",47 +"Chen_Qiao_En","2016-04-01",52 +"Canobie_lake","2016-04-01",1 +"Andrei_Arlashin","2017-11-01",13 +"Again_Into_Eyes","2017-12-01",54 +"Andropogon_curtipendulus","2018-02-01",1 +"Abbath","2016-05-01",927 +"Alien_Opponent","2016-05-01",160 +"Art_of_Love","2016-02-01",3 +"Ariana_Huffington","2017-05-01",84 +"Amy_Poehler","2016-04-01",62732 +"Cherven,_Rousse_Province","2015-07-01",2 +"1_Month_2_Live","2018-03-01",306 +"Country_Day_School_of_the_Sacred_Heart","2017-06-01",132 +"Cooperative_institute_for_arctic_research","2015-07-01",2 +"Depression_symptoms","2017-01-01",7 +"Brent_Skoda","2016-04-01",31 +"American_Christians","2016-12-01",10 +"Counterbleed","2017-01-01",1 +"Abarka","2016-05-01",325 +"Aleksander_Povetkin","2017-02-01",89 +"Austin_TX","2016-03-01",119 +"Aleksandr_Tretyakov","2017-01-01",40 +"Connecticut_congressional_districts","2016-11-01",3 +"Alessio_de_Marchis","2015-10-01",66 +"Capel_Salem,_Pwllheli","2016-04-01",6 +"5-alpha_reductase_deficiency","2016-10-01",30 +"Annabelle_Croft","2016-01-01",32 +"Aeronca_Aircraft_Corporation","2017-05-01",9 +"1597_in_Scotland","2016-07-01",18 +"Alf_Somerfield","2017-11-01",10 +"Agapanthia_villosoviridescens","2018-02-01",53 +"Adam_Goldberg","2015-12-01",42338 +"1961_Paris_massacre","2017-01-01",52 +"2007_in_radio","2017-04-01",131 +"Arthur_French,_5th_Baron_de_Freyne","2015-12-01",44 +"AMD_Socket_G3","2017-04-01",121 +"Albert_geouffre_de_lapradelle","2016-02-01",1 +"Collaborations_between_ex-Beatles","2015-07-01",1279 +"Betty_Ireland","2016-04-01",40 +"Domingo_Tirado_Benedi","2015-07-01",1 +"Bac_Ly","2016-04-01",1 +"All_gas-phase_iodine_laser","2015-07-01",136 +"Andre_Salifou","2017-01-01",1 +"1,3-b-D-glucan","2017-05-01",2 +"Joseph_Johnston_Muir","2017-01-01",3 +"17th_of_Shahrivar_league","2016-05-01",63 +"2001_in_art","2018-03-01",131 +"Abiji_language","2017-10-01",6 +"Ahliah_school","2018-03-01",133 +"1605_in_India","2017-12-01",83 +"Dr_Jeom_Kee_Paik","2015-07-01",1 +"1954_Texas_Longhorns_football_team","2018-01-01",69 +"1985_Little_League_World_Series","2016-07-01",226 +"Eleanor_de_bohun","2015-07-01",1 +"Adrenaline_strength","2016-03-01",8 +"434_BC","2018-02-01",97 +"8x60mm_S","2015-06-01",61 +"2016-17_South_Pacific_cyclone_season","2017-09-01",101 +"Beth_Aala","2017-06-01",15 +"Al_Shaver","2017-07-01",138 +"Adelphoi_Zangaki","2018-01-01",89 +"Cyclopropyl_group","2016-11-01",167 +"216_Sqn","2017-08-01",11 +"20469_Dudleymoore","2017-05-01",5 +"Attila_Hildmann","2017-06-01",103 +"1970_Arkansas_Razorbacks_football_team","2016-11-01",66 +"Anthony_Fairfax","2017-08-01",24 +"Fort_Point,_Boston","2016-04-01",384 +"Epsilon_numbers","2016-04-01",3 +"2013_Recopa_Sudamericana","2016-05-01",202 +"Italo_Disco","2017-01-01",27 +"Andersen_Press","2015-09-01",228 +"Amasa_Walker","2017-09-01",146 +"2010_in_Israeli_film","2015-09-01",234 +"A-25_Shrike","2017-12-01",90 +"2009_Winnipeg_Blue_Bombers_season","2017-06-01",66 +"Ashland_County,_Ohio","2016-10-01",1298 +"Dusky_Turtle_Dove","2017-01-01",3 +"Antonov_148","2017-02-01",129 +"Abdul_Hamid_Lahori","2017-08-01",458 +"Amadeo_of_Spain","2015-11-01",1701 +"2015_Novak_Djokovic_tennis_season","2017-07-01",2484 +"Dhabawallah","2016-04-01",4 +"Afshar_Beylik","2017-06-01",4 +"1998_ATP_Tour_World_Championships_-_Singles","2017-03-01",20 +"Beach_Haven_Terrace,_New_Jersey","2016-11-01",4 +"Aix-la_Chapelle","2018-03-01",66 +"Ackerman,_Val","2017-05-01",2 +"47th_Ohio_Infantry","2016-12-01",59 +"100_People,_100_Songs","2017-11-01",517 +"2007_Masters_of_Formula_3","2016-01-01",63 +"1832_US_presidential_election","2016-05-01",6 +"Aaron_Baker","2016-05-01",113 +"2015-16_FIBA_Europe_Club_Competition","2017-11-01",2 +"Alebra","2018-02-01",27 +"Asilus_crabroniformis","2016-11-01",4 +"Earth_and_Air_and_Rain","2016-11-01",31 +"2014_Stade_Tata_Raphael_disaster","2018-02-01",1 +"Alexander_Izvolski","2017-01-01",7 +"Fabric_17","2017-01-01",13 +"1925_Campeonato_de_Portugal_Final","2018-01-01",37 +"1948_Ashes_series","2017-01-01",121 +"Abraham_ben_david","2016-09-01",4 +"2006_Acropolis_Rally","2017-01-01",12 +"Alottment","2017-03-01",6 +"Angolanness","2015-07-01",11 +"2002_in_NASCAR_Craftsman_Truck_Series","2016-01-01",12 +"Aces_of_ANSI_Art","2015-08-01",77 +"Alan_Tskhovrebov","2015-08-01",13 +"Aegis_Security","2015-10-01",1 +"Alec_the_Great","2015-05-01",69 +"Corel_SnapFire","2016-11-01",9 +"AbdulMagid_Breish","2016-03-01",276 +"A_Night_in_NYC","2015-10-01",232 +"79th_parallel_south","2016-11-01",17 +"Alphonse_Crespo","2016-06-01",50 +"Acacia_petite_feuille","2016-05-01",1 +"Amstrad_464","2017-12-01",18 +"Charles_County,_Maryland","2017-06-01",2079 +"1972_outbreak_of_smallpox_in_Yugoslavia","2018-03-01",375 +"Alungili","2017-09-01",37 +"Brontispalaelaps_froggatti","2016-04-01",1 +"Alison_Lacey","2016-12-01",94 +"Alessandro_Capra","2017-07-01",21 +"2012_UCF_Knights_baseball_team","2016-08-01",46 +"16_Candles_Down_the_Drain","2017-05-01",2 +"Anandra_strandi","2015-08-01",11 +"Brigitte_Rohde","2017-01-01",9 +"Agenda_VR3","2015-09-01",93 +"1641_in_architecture","2015-11-01",32 +"ALF_Tales","2016-04-01",280 +"A_Woman_Scorned","2015-07-01",164 +"Air-free_techniques","2016-04-01",5 +"1973_in_British_television","2016-04-01",96 +"All_Saints_Cemetery","2017-04-01",345 +"1981_in_Swedish_football","2016-06-01",21 +"Apple_Dictionary","2016-10-01",19 +"2015_PBZ_Zagreb_Indoors","2016-08-01",121 +"16th_IIFA_Awards","2017-02-01",1194 +"Duki,_Pakistan","2016-04-01",14 +"Administration_of_Borderchek_points,_Population_and_Immigration","2015-09-01",2 +"Alonia,_Zante","2017-10-01",1 +"African_United_Club","2017-10-01",50 +"Burjanadze-Democrats","2016-04-01",19 +"Application_software_development","2015-06-01",27 +"Almonacid_de_la_Sierra,_Zaragoza","2015-06-01",1 +"Baissour","2016-12-01",100 +"Coti_Sorokin","2016-04-01",46 +"Alberta_and_Great_Waterways_Railway_scandal","2017-05-01",70 +"1942_Alabama_Crimson_Tide_football_team","2015-09-01",144 +"Adam_Art_Gallery","2016-08-01",80 +"Akshinski_Raion","2016-09-01",1 +"Edwin_of_Deira","2015-07-01",34 +"Altaf_Mahmud","2015-10-01",245 +"Astana_cycling_team","2017-12-01",7 +"1982_CART_World_Series_season","2015-12-01",3 +"3_Rotaxane","2017-03-01",1 +"1924_Eastern_Suburbs_season","2015-08-01",32 +"Downtown_Science","2016-11-01",6 +"1993-94_Slovak_Cup","2017-04-01",1 +"Brandon_Wayne_Hedrick","2016-04-01",32 +"2015_Brasil_Open","2016-01-01",403 +"Aung_Pinle_Hsinbyushin","2016-02-01",69 +"An_Numaniyah","2016-06-01",185 +"24th_Arkansas_Infantry_Regiment","2016-03-01",64 +"Adimchinobe_Echemandu","2017-05-01",90 +"August_Belmont,_Jr","2017-06-01",8 +"Empacher","2016-11-01",102 +"Abdulkadir_Sheikh_Dini","2017-01-01",70 +"Alvaro_Quiros","2017-08-01",12 +"Algernon_May","2017-11-01",35 +"Athol_Shmith","2016-02-01",188 +"2004_Indesit_ATP_Milan_Indoor_-_Doubles","2015-09-01",1 +"Alfred_Dennis","2016-11-01",9 +"2nd_Medical_Battalion","2017-05-01",380 +"Atom_clocks","2016-03-01",12 +"368th_Expeditionary_Air_Support_Operations_Group","2015-06-01",48 +"1911_Washington_Senators_season","2017-06-01",46 +"1963_Night_Series_Cup","2015-07-01",26 +"Aromobates_capurinensis","2017-12-01",21 +"2013-14_Super_Lig","2017-05-01",14 +"Al_taglio","2016-09-01",2 +"2015_RBC_Tennis_Championships_of_Dallas","2016-04-01",18 +"2011_Mirabella_Cup","2017-11-01",15 +"1996_NHL_Western_Conference_Final","2015-06-01",1 +"2009_Formula_Nippon_Championship","2016-11-01",44 +"Information_security_awareness","2017-01-01",56 +"A_Noiseless_Patient_Spider","2018-03-01",757 +"Aggregate_field_theory","2017-06-01",3 +"Armenians_in_Central_Asia","2015-10-01",351 +"Acona,_Mississippi","2017-10-01",33 +"Apozomus","2017-12-01",19 +"Antwun_Echols","2016-11-01",87 +"1949_Albanian_Cup","2016-11-01",11 +"Aesychlus","2016-10-01",4 +"1961_Pulitzer_Prize","2015-09-01",879 +"East_Midlands_Conference_Centre","2016-04-01",13 +"Blumen","2016-11-01",11 diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data_small.tsv b/docs/ja/integrations/data-ingestion/data-formats/assets/data_small.tsv new file mode 100644 index 00000000000..407b9ddafba --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/data_small.tsv @@ -0,0 +1,1000 @@ +Akiba_Hebrew_Academy 2017-08-01 241 +Aegithina_tiphia 2018-02-01 34 +1971-72_Utah_Stars_season 2016-10-01 1 +2015_UEFA_European_Under-21_Championship_qualification_Group_8 2015-12-01 73 +2016_Greater_Western_Sydney_Giants_season 2017-05-01 86 +AAA_Americas_Trios_Championship 2015-10-01 104 +1420_in_literature 2016-05-01 20 +Adair,_Beegie 2017-08-01 2 +1980_Rugby_League_State_of_Origin_match 2017-07-01 2 +Column_of_Santa_Felicita,_Florence 2017-06-01 14 +2007_Copa_America 2016-07-01 178 +Car_dealerships_in_the_USA 2015-07-01 11 +Dihydromyricetin_reductase 2015-07-01 1 +ATCvet_code_QB05BB01 2017-04-01 1 +City_CarShare 2017-01-01 125 +Heidenrod 2017-01-01 10 +Arthur_Henrique 2016-11-01 12 +Alan_Ebnother 2015-11-01 66 +2013_UConn_football_season 2017-05-01 2 +2008_American_League_Division_Series 2016-12-01 376 +Antilipaemic 2017-09-01 12 +Aberzombie 2016-12-01 28 +2008_Asian_Wrestling_Championships 2016-12-01 76 +Federal_Correctional_Complex,_Pollock 2017-01-01 19 +Central_body 2015-07-01 32 +Binbrook,_Ontario 2015-07-01 446 +Azerbaijan_at_the_2016_Judo_Grand_Prix_Samsun 2016-10-01 25 +Ashford_Lake 2017-10-01 80 +1942_Joint_Strike 2015-12-01 3 +AFC_Youth_Championship_2012 2017-10-01 2 +Akhira 2016-07-01 64 +Arroniro_Arlieri 2016-10-01 1 +Alesheim_Burgsalach 2015-05-01 2 +2700_classic 2017-05-01 4 +ARX-8_Laevatein 2015-06-01 14 +1991_Newsweek_Champions_Cup_-_Singles 2017-06-01 3 +Aphelandra_sinclairiana 2017-07-01 69 +Asia_Kong 2015-10-01 2 +2012_Internazionali_Tennis_Val_Gardena_Sudtirol 2016-02-01 1 +24_Carat_Purple 2017-06-01 476 +Acroliths 2017-12-01 9 +Bundesautobahn_3 2016-04-01 264 +ATC_code_S01AX21 2016-09-01 1 +Allington,_Lincolnshire 2015-11-01 188 +Acer_Aspire_One 2017-06-01 5169 +ATC_code_L04AC 2015-06-01 1 +1969_New_Year_Honours 2017-07-01 269 +Antonio_Napolitano 2017-11-01 44 +Amberfish 2017-10-01 11 +1976_Cam_2_Motor_Oil_400 2018-03-01 45 +April_25,_2017 2018-01-01 2 +Akahori_Station 2016-06-01 11 +Abducens_palsy 2016-05-01 28 +Ancona_cathedral 2018-01-01 2 +Ajou_Motor_College 2017-02-01 83 +Brad_Skyes 2016-11-01 1 +Alegro_PCS 2017-07-01 157 +Franz_Dunshirn 2017-01-01 1 +Arthur_Godfrey_Road 2016-11-01 3 +Ab_Golman 2017-05-01 30 +Art_in_early_modern_Scotland 2016-03-01 98 +1968_World_Series 2016-02-01 1960 +1828_in_the_UK 2017-08-01 3 +Explorer-1_Prime_Unit_2 2016-11-01 11 +2014_Desafio_Internacional_das_Estrelas 2017-12-01 31 +Ambulyx_subocellata 2016-08-01 1 +2008_Hamilton_Tiger-Cats_season 2015-11-01 153 +Deuterogamist 2015-07-01 5 +Art_Nouveau_furniture 2017-12-01 839 +Allison,_Colorado 2015-10-01 85 +2014_MLS_Re-Entry_Draft 2017-09-01 36 +Amiot_353 2015-12-01 8 +ACLU_of_Massachusetts 2015-11-01 106 +Altable,_Spain 2016-10-01 1 +Agnidra_scabiosa 2016-12-01 16 +Dictyotremella_novoguineensis 2015-07-01 1 +Compiler_Construction 2015-07-01 42 +Aufheben 2016-11-01 1080 +Avafauna 2017-06-01 17 +Atheist_billboard 2017-01-01 19 +2011_Indonesia_Super_League_All-Star_team 2015-11-01 15 +BrahMos_II 2015-07-01 31 +1707_in_art 2016-04-01 17 +Aeromarine_Model_60 2016-06-01 34 +Ayatollah-al-ozma 2015-06-01 12 +Exanimus 2017-01-01 4 +Anderby 2017-01-01 29 +Ashgabat_indoor_tennis_arena 2017-07-01 27 +1971_Rose_Bowl 2015-12-01 961 +2004_HR56 2016-05-01 5 +1886_in_South_Africa 2016-03-01 70 +Bishop_of_Central_Newfoundland 2016-04-01 1 +Alice_Rivlin 2016-09-01 1137 +Arriba_en_la_Cordillera 2017-06-01 39 +Adam_Lively 2016-06-01 77 +Colasposoma_fairmairei_fairmairei 2017-06-01 5 +Archie_Barton 2017-02-01 49 +Aharon_wasserman 2016-01-01 7 +Alabama_Educational_Television_Commission 2017-05-01 3 +Advanced_Technology_Bomber 2016-02-01 67 +1-krona 2017-01-01 4 +Ahmadabad-e_Kalij-e_Sofla 2017-01-01 3 +Bob_Dolman 2016-11-01 245 +Bellevue,_French_Guiana 2017-01-01 5 +Bison_Nickel 2017-01-01 2 +Arthur_Drabble 2016-12-01 35 +Edgewater_Borough,_New_Jersey 2016-11-01 3 +Alberto_Cambrosio 2017-11-01 31 +Amalia_Celia_Figueredo 2017-07-01 32 +1989_-_1992_Rugby_League_World_Cup 2016-01-01 10 +Admir_Seferagic 2016-06-01 7 +Adriaan_Loosjes 2015-05-01 46 +Alfred_Manuel_Martin 2015-06-01 3 +Academy_of_the_Arabic_Language 2015-08-01 67 +Ankita_Shrivastav 2018-01-01 7430 +Anarchism_in_asia 2017-11-01 1 +Batiquitos_Lagoon_State_Marine_Conservation_Area 2015-07-01 18 +Alstonia_calophylla 2017-12-01 2 +4-Hydroxycyclohexanecarboxylate_dehydrogenase 2016-11-01 4 +832_symmetry 2017-09-01 6 +1931_Fuyun_earthquake 2016-07-01 64 +1998_Masters_of_Formula_3 2016-01-01 60 +2011_LG_Hockey_Games 2016-04-01 7 +Generalized_pustular_psoriasis 2017-01-01 159 +2013_European_Cup_Winter_Throwing 2016-07-01 56 +2008_in_Argentina 2017-06-01 48 +Apostrophized 2017-10-01 5 +Algebraically_compact_module 2017-01-01 5 +Askett 2015-10-01 79 +2009_swine_flu_outbreak_timeline 2015-08-01 65 +72704-01-9 2017-12-01 4 +Alexandre-Charles-Albert-Joseph_Renard 2017-11-01 4 +Acyl-CoA_oxidase 2016-09-01 250 +2011_Budweiser_Shootout 2015-08-01 109 +Augusta_Davies_Webster 2015-07-01 2 +Association_theory 2017-07-01 112 +Abemama_Airfield 2015-05-01 8 +Archaeological_Museum_of_Heraklion 2015-10-01 14 +Authorized_marches_of_the_Canadian_Armed_Forces 2016-11-01 241 +1986_in_Portugal 2017-01-01 7 +Antiziganism_in_Bulgaria 2017-12-01 13 +Adriana_Martin 2015-09-01 21 +2004_Green_Bay_Packers_season 2015-05-01 970 +Agrippa_the_Sceptic 2017-11-01 95 +Admiral_Island 2016-04-01 1 +Auxiliary_sign_language 2015-06-01 31 +2013_Food_City_500 2015-06-01 90 +Andy_Roesch 2015-08-01 15 +Alsoszentivan 2017-05-01 4 +Architecture_of_Belgium 2015-05-01 199 +1_South_African_Infantry 2017-06-01 5 +1930_Auburn_Tigers_football_team 2016-12-01 39 +1860_in_Canada 2017-05-01 269 +Aldeaseca_de_la_Frontera 2018-03-01 21 +Elijah_Fox_Cook 2015-07-01 13 +2010_BCS_Bowl_Games 2016-03-01 1 +2017_NPSL_season 2017-06-01 2806 +Bank_of_New_South_Wales_v_Commonwealth 2016-12-01 173 +American_Enterprise_Association 2016-02-01 4 +26th_Kentucky_Derby 2018-03-01 1 +Chaldean_Diocese_of_Amid 2016-11-01 18 +Ajaran_language 2016-03-01 1 +1992_Texas_Rangers_season 2017-06-01 113 +26_SAS 2017-12-01 3 +2015_Terengganu_FA_season 2016-01-01 537 +Aagard,_Oregon 2017-03-01 3 +Auberry,_CA 2017-05-01 13 +American_Eskimo_spitz 2015-09-01 3 +Antidiabetic 2016-11-01 75 +Asinius 2017-11-01 26 +Andrey_Vasilievich_Abramov 2016-10-01 1 +Alan_Carrington 2018-03-01 91 +Colebrook,_Ontario 2017-06-01 2 +Abbasabad-e_Kheyrabad 2015-08-01 24 +Arandjelovac_Municipality 2016-02-01 1 +Aloysius_Valente 2017-12-01 11 +Almondo_Curry 2016-03-01 86 +4th_century_AD 2017-03-01 13 +Askhat_Dilmukhamedov 2016-02-01 77 +1147_AD 2017-05-01 1 +1953_Torneo_di_Viareggio 2017-03-01 20 +ATP_Schenectady 2015-12-01 30 +Lakarian_City 2017-01-01 3 +Adam_Ferency 2017-12-01 176 +AugustDvorak 2016-07-01 5 +97th_Light_Infantry_Division 2017-07-01 1 +16th_Connecticut_Infantry_Regiment 2016-05-01 146 +2011_Somalian_drought 2017-05-01 2 +Anbargah 2017-12-01 8 +1921_in_Paraguayan_football 2016-03-01 2 +Cosmetic_dermatitis 2017-01-01 5 +Annunciation_Greek_Orthodox_Cathedral,_Atlanta,_Georgia 2015-09-01 9 +1300_AM 2016-07-01 106 +A_Promising_Africa 2016-03-01 41 +2015-16_Odense_Bulldogs_season 2016-10-01 1 +Aral_AG 2017-12-01 1446 +Angel_Vivar_Dorado 2015-12-01 6 +1951_Australian_Championships 2018-03-01 32 +DJMax_Portable_Hot_Tunes 2017-01-01 27 +Allinge 2017-03-01 32 +1986_Buick_WCT_Finals 2016-11-01 14 +Arimatsu,_Aichi 2015-06-01 112 +Arthur_Berzinsh 2017-02-01 249 +Apolima_Uta 2017-04-01 23 +Capitol_Hill_Pride_Festival 2015-07-01 19 +Kara-Murza 2017-01-01 5 +Aigleville,_Alabama 2015-11-01 19 +Abdullah_bin_al-Hussein 2017-02-01 1 +2017-18_Inter_Milan_season 2018-03-01 26 +African_Collared_Dove 2016-07-01 10 +Achaea_dmoe 2016-11-01 3 +Aurora,_Utah 2016-06-01 201 +Architecture_in_Portland,_OR 2017-07-01 1 +Charchala 2015-07-01 4 +Around_the_Roses 2015-07-01 3 +1965_in_music 2016-12-01 3394 +Alojzije_Jankovic 2017-04-01 5 +Arisu_Seno 2015-08-01 6 +ALCO_T-6 2017-01-01 77 +1998_Royal_Bank_Cup 2015-12-01 32 +1956_Claxton_Shield 2016-11-01 9 +Anita_Dube 2017-07-01 233 +Anderson_Windows 2015-05-01 13 +Annaquatucket_River 2018-03-01 38 +Black_salve 2017-01-01 1496 +Anna_Pendleton_Schenck 2017-02-01 11 +Asghar_Nadeem_Syed 2017-07-01 146 +Disarming 2016-11-01 5 +Antarctic_ice_cap 2017-08-01 7 +Antonio_Ottone 2017-05-01 11 +Coralie_Larnack 2017-01-01 9 +Budha_Subba_Gold_Cup 2016-11-01 24 +Amphoe_Chaiya 2017-03-01 9 +Anarcho-capitalism_in_Somalia 2016-10-01 7 +Felix_Loch 2017-01-01 131 +26508_Jimmylin 2017-12-01 3 +Andrew_McMillen 2015-11-01 134 +Dundee_Canal_Industrial_Historic_District 2017-01-01 2 +Aula_Baratto 2015-12-01 140 +Church_of_St_Mary,_Knowsley 2015-07-01 1 +Aggelakis 2017-10-01 1 +Al_Badiyah 2017-11-01 157 +Assault_Gunboat 2016-03-01 21 +Lachau 2017-01-01 4 +2008_Pittsburgh_Steelers_season 2016-12-01 10018 +Apolychrosis_candidus 2018-01-01 24 +Andrei_Krylov 2017-02-01 192 +Aldesh_Vadher 2018-02-01 7 +Alwand 2017-02-01 7 +Edward_Baker_Lincoln 2015-07-01 4347 +Aermotor_Corporation 2017-11-01 4 +Aischylos 2017-01-01 7 +6th_Assault_Aviation_Corps 2017-07-01 100 +Azygos_lobe 2016-10-01 1598 +Demirciler,_Nazilli 2015-07-01 4 +Akhlaq-e-Hindi 2016-11-01 13 +Dragon_Crusaders 2016-04-01 122 +25V_USB 2016-01-01 1 +Calliophis_melanurus 2017-01-01 31 +Antonionian 2016-10-01 15 +Ashley_Richardson 2017-09-01 1216 +1st_Observation_Group 2018-01-01 6 +Andrzej_Bargiel 2015-05-01 97 +2008_AFL_National_Under_16_Championships 2018-03-01 20 +Ammon_Bundy 2016-09-01 11890 +Benno_Wandolleck 2016-11-01 5 +Aero-Kros_MP-02_Czajka 2016-03-01 136 +A6005_road 2015-10-01 14 +Eagle_Eye_Networks 2015-07-01 101 +Aarberg 2017-12-01 277 +Encyclopedia_of_anthropology 2015-07-01 1 +Duncormick_railway_station 2016-11-01 7 +Aiqing_huajiao_zhuanyi 2017-03-01 1 +Crude_oil_washing 2016-04-01 466 +2010_Indiana_Hoosiers_football_team 2017-06-01 90 +Book_of_Bodley_Head_Verse 2015-07-01 18 +Absence_seizure 2016-05-01 18152 +Cayucupil 2016-04-01 3 +Akanabee 2017-03-01 1 +Grooved_consonant 2017-01-01 5 +Dellamora_philippinensis 2015-07-01 7 +Dejan_Blazevski 2017-01-01 1 +Arabis_armena 2016-08-01 25 +1988_Summer_Paralympics_medal_table 2016-12-01 90 +2012-13_Basketball_Championship_of_Bosnia_and_Herzegovina 2017-04-01 2 +1966_in_music 2017-10-01 3510 +Antti_Tyrvainen 2015-12-01 2 +African_desert 2016-06-01 262 +Bruneau_mariposa_lily 2016-04-01 1 +Bernie_Parmalee 2017-06-01 221 +2015_South_American_Youth_Football_Championship_squads 2015-09-01 594 +1985_IIHF_World_U20_Championship 2015-08-01 7 +18th_British_Academy_Film_Awards 2018-02-01 270 +523_Ada 2016-04-01 35 +Active_Pharmaceutical_Ingredients 2016-02-01 5 +Burley,_ID_mSA 2015-07-01 2 +CFRN-TV-10 2017-06-01 2 +1982_Super_Bowl_of_Poker 2017-08-01 38 +Australian_Journal_of_Educational_Technology 2017-01-01 1 +2013_Super_League_Grand_Final 2016-06-01 212 +2006_BCR_Open_Romania 2015-06-01 25 +Charlestown_Townies 2016-04-01 319 +1943_Polish_underground_raid_on_East_Prussia 2017-08-01 8 +Anthony_Celestino 2018-02-01 182 +Andrew_Beerwinkel 2018-02-01 73 +Greigia_atrobrunnea 2017-01-01 1 +Adrian_Beecham 2017-11-01 1 +Implementation_of_mathematics_in_set_theory 2017-01-01 12 +Annastacia_Palaszczuk 2015-05-01 6247 +Egon_Zimmermann_II 2016-11-01 3 +Air_aide-de-camp 2018-03-01 137 +Albert_Murphy 2016-09-01 1 +1924_Arkansas_Razorbacks_football_team 2016-02-01 28 +Avondale_Mill 2016-10-01 68 +Alexander_Volzhin 2015-12-01 25 +Arek_Monthly 2017-08-01 31 +Dinka_Blanche 2015-07-01 1 +1921_Mercer_Baptists_football_team 2016-11-01 10 +Afro-Antiguan_and_Barbudan 2016-06-01 252 +American_southern_literature 2016-10-01 3 +1947_Swiss_Grand_Prix 2016-11-01 32 +99p_Stores 2017-12-01 3028 +Artem_Radkov 2018-03-01 21 +Arctic_brome 2016-12-01 19 +Battle_Of_Moskova 2015-06-01 6 +Airdrieonians 2016-06-01 32 +Advanced_transportation_controller 2018-03-01 79 +BC_government 2016-12-01 18 +Antonio_Maura 2017-03-01 457 +Anjuman,_Afghanistan 2017-09-01 62 +Deodato_Guinaccia 2015-07-01 13 +Blowjob_Betty 2016-11-01 28 +453d_Flying_Training_Squadron 2017-08-01 3 +1990_Africa_Cup_of_Nations 2016-04-01 22 +Agenville 2016-08-01 100 +1202_in_Scotland 2018-01-01 82 +Calytrix_desolata 2017-06-01 10 +1957_in_Chile 2016-04-01 13 +Anglican_Bishop_of_Torres_Strait_people 2017-08-01 1 +2015_Mexican_Grand_Prix 2015-06-01 528 +Catalan_parliament 2017-01-01 14 +Cult_Shaker 2017-01-01 32 +Ander_Gayoso 2016-11-01 34 +Ageneiosus_ucayalensis 2017-12-01 20 +Club_de_Berne 2015-07-01 194 +Adecco 2016-03-01 9863 +Anti-unionism 2018-01-01 11 +Auchindoun_Castle 2017-01-01 102 +557_in_poetry 2016-07-01 1 +Abu_ol_Verdi_Rural_District 2017-01-01 1 +Centro_73 2016-04-01 23 +Dagger_compact_category 2016-04-01 97 +Alan_Nunn_May 2017-11-01 770 +Basal_clade 2015-07-01 44 +Aizu_Line 2015-08-01 26 +Edward_Kernan_Campbell 2016-04-01 5 +865_area_code 2016-12-01 9 +Bahamas_at_the_1984_Summer_Olympics 2017-06-01 35 +Gardan_Kalat 2017-01-01 1 +American_Samoa_national_under-19_football_team 2017-12-01 4 +Kayah_National_United_League 2017-01-01 14 +2007_Nordea_Nordic_Light_Open_-_Singles 2016-10-01 2 +Avondale_Estate 2016-11-01 2 +Acalolepta_variolaris 2017-02-01 3 +Anantapur,_Andhra_Pradesh 2017-05-01 1032 +Amenable_Banach_algebra 2015-08-01 59 +300_metres 2017-01-01 61 +Black_Bottom,_Kentucky 2016-04-01 8 +100_Players_Who_Shook_The_Kop 2018-01-01 1133 +Adventure_story 2015-07-01 29 +Anacampsis_lignaria 2017-05-01 5 +2007_American_Indoor_Football_Association_season 2015-09-01 89 +Dmitry_Kardovsky 2016-04-01 33 +A10_autoroute 2015-11-01 27 +1995_Sydney_Bulldogs_season 2017-04-01 40 +Ilex_jelskii 2017-01-01 2 +Adrian_Jose_Hernandez 2016-10-01 2 +CallAir_A-5 2016-11-01 4 +22nd_meridian_west 2015-07-01 45 +Anglican_Diocese_of_Antananarivo 2015-08-01 2 +Andrew_Kelsey 2016-11-01 14 +Brownhill_Creek 2017-06-01 4 +Abunai_Deka 2015-06-01 269 +Aisha_Jefferson 2017-04-01 115 +Alonso_Lopez 2017-03-01 7 +Aeroparque_Ciudad_de_Mendoza 2016-01-01 1 +Arthur_Ashley_Sykes 2017-12-01 45 +Holy_Face_Medal 2017-01-01 20 +1Chronicles 2018-02-01 1 +2014_CFU_Club_Championship 2017-12-01 108 +Aetna_class_ironclad_floating_battery 2015-06-01 37 +Antoine_Delrio 2015-07-01 2 +Chislet_Windmill 2015-07-01 38 +Aerojet_SD-2 2017-07-01 59 +Age_role_play 2015-09-01 2 +50687_Paultemple 2018-03-01 8 +1997-98_Cuban_National_Series 2017-02-01 1 +Aleksandr_Borisovich_Belyavskiy 2017-10-01 42 +Carol_MacReady 2017-01-01 111 +18th_Chess_Olympiad 2015-06-01 134 +Clara_Schonfeld 2015-07-01 1 +Apollonius_of_Athens 2017-02-01 35 +ABC_80 2018-03-01 603 +Apatelodes_damora 2015-08-01 22 +Ernest_Walbourn 2016-04-01 30 +428_BCE 2017-04-01 2 +72nd_Seaforth_Highlanders 2017-12-01 29 +Broughton_Hackett 2015-07-01 38 +A_Fazenda_2 2016-12-01 56 +ATCvet_code_QJ01MQ 2017-05-01 2 +Abura,_Iran 2017-03-01 3 +DeLeon_Independent_School_District 2015-07-01 1 +Abby_aldrich 2016-09-01 1 +Cinema_One_Originals 2016-11-01 359 +2013_European_Short_Course_Swimming_Championships 2017-09-01 124 +Ars_technica 2015-11-01 442 +AMS_Production_Company 2016-02-01 1 +Joao_Soares 2017-01-01 1 +Cervical_vertebra_6 2017-06-01 45 +Kevin_Pugh 2017-01-01 2 +Alpha-1_antitrypsin 2015-11-01 11845 +Assyrians_in_iran 2017-07-01 53 +Boophis_ankarafensis 2016-11-01 2 +A_View_To_a_Kill 2018-01-01 4 +Charles_Edouard_Brown-Sequard 2015-07-01 7 +1919_in_Ireland 2017-04-01 239 +74th_Foot 2015-06-01 3 +9275_Persson 2016-07-01 22 +Dalcerides_mesoa 2015-07-01 11 +A_Summer_Bird-Cage 2016-03-01 248 +2011_NAB_Cup 2017-10-01 127 +13th_Parliament_of_Lower_Canada 2015-08-01 41 +2011_Players_Championship_Finals 2015-07-01 25 +Flag_of_Tenerife 2017-01-01 128 +Hypopta_corrientina 2017-01-01 1 +Jalatarangam 2017-01-01 16 +Adjoint_endomorphism 2018-01-01 330 +Anime_conventions 2015-06-01 18 +2004_Grammy_Award 2015-06-01 13 +American_war 2015-07-01 80 +Beynes,_Yvelines 2016-11-01 32 +Agriculture_Department 2016-06-01 16 +Andrey_Chisty 2015-10-01 58 +Ait_Yahia_Moussa 2017-08-01 7 +Alfred_Blau 2017-03-01 57 +1869_in_sports 2017-08-01 73 +Ambolodia_Sud 2016-04-01 6 +Animal_slaughter 2017-06-01 6423 +Adamowka_Commune 2018-01-01 2 +Arsenic_pentachloride 2016-03-01 467 +220_BCE 2016-01-01 3 +863d_Engineer_Battalion 2015-11-01 160 +Amer_Abu-Hudaib 2017-04-01 31 +Aaina_tv 2017-08-01 3 +Arnhem,_Netherlands 2015-08-01 67 +Antoine_de_sartine 2015-08-01 4 +ATC_code_A16 2016-01-01 155 +Eastern_Front 2017-01-01 70 +Ashy-headed_tyrannulet 2016-12-01 44 +Aoheng_language 2015-08-01 64 +1996_World_Junior_Canoe_Slalom_Championships 2017-11-01 15 +Agriophara_nodigera 2017-11-01 12 +Amsterdam_Island_cattle 2015-12-01 675 +Aliyah_from_the_Soviet_Union_in_the_1990s 2017-08-01 54 +Abandoned_and_Little_Known_Airfields 2018-01-01 2 +Church_numerals 2015-07-01 57 +Ankeny_Christian_Academy 2015-09-01 74 +2010_FIFA_World_Cup_qualification_-_AFC_First_Round 2017-06-01 58 +1ESS_switch 2015-07-01 514 +Chelys_boulengerii 2016-04-01 1 +Bivalent_logic 2016-11-01 25 +Ivan_Skavinsky_Skavar 2017-01-01 1 +Fergus_Sings_the_Blues 2016-04-01 62 +2015-16_Libyan_Premier_League 2017-02-01 4 +Dutch_Chess_Championship 2017-01-01 35 +Every_Man_in_His_Humor 2016-11-01 1 +2008_Allstate_BCS_National_Championship_Game 2015-08-01 11 +Aq_Tappeh,_Hamadan 2015-09-01 25 +Agrotractor 2016-02-01 1 +Alexander_of_Pfalz-Zweibrucken 2017-12-01 2 +2003_Mistral_World_Championships 2016-04-01 6 +146th_Fighter-Interceptor_Wing 2015-11-01 49 +Al-Qahir 2016-04-01 328 +25604_Karlin 2015-05-01 20 +Allen_taflove 2017-12-01 3 +Aretha_Thurmond 2017-05-01 109 +Atlanta_and_lagrange_rail_road 2015-07-01 1 +ACSI_College_Iloilo 2015-10-01 1 +Alan_Sacks 2015-07-01 150 +African_Desert_Warbler 2017-02-01 11 +A_Man_and_His_Soul 2018-02-01 89 +ASCII_ART 2015-05-01 9 +1992-93_VMI_Keydets_basketball_team 2016-10-01 1 +George_and_the_Dragon 2017-01-01 18 +2012_NAB_Cup 2016-12-01 99 +1965_Indy_500 2016-05-01 51 +Forest_Glen,_Nova_Scotia 2016-04-01 9 +A_Critical_Dictionary_of_English_Literature 2016-08-01 4 +Aquion_Energy 2015-08-01 1077 +Alibeyce,_Emirdag 2017-09-01 1 +Blauhu00F6hle 2015-07-01 1 +Ian_Sommerville 2017-01-01 1 +Air_propulsion 2017-07-01 474 +2016_12_Hours_of_Sebring 2016-10-01 187 +Asites 2017-07-01 4 +Al-Kini 2017-03-01 1 +Austin_Aztex_2009_season 2016-03-01 10 +Alto_Vista_Chapel 2015-12-01 833 +Abecedaria 2017-04-01 22 +Farm_to_Market_Road_2503 2016-11-01 3 +Anglican_Bishop_of_The_Leeward_Islands 2015-09-01 2 +Basketball_at_the_2011_Pan_American_Games 2017-06-01 120 +Angela_Peel 2016-08-01 7 +Amber_Frey 2018-02-01 728 +Afraid_to_Sleep 2017-06-01 51 +ATC_code_A02BA 2018-02-01 7 +Apateon_pedestris 2015-11-01 5 +Alois_Estermann 2015-12-01 1155 +1752_in_science 2016-01-01 78 +Baldassin 2017-06-01 3 +Camilla_Hildegarde_Wedgwood 2017-01-01 1 +B-A-C-H_motive 2016-10-01 3 +AI_Velorum_star 2016-09-01 1 +Ali_Zayn_al-Abidin 2017-04-01 71 +Ailurarctos_lufengensis 2015-07-01 1 +Clearview,_Philadelphia 2017-06-01 67 +Adam_Sender 2016-08-01 759 +Apriona_paucigranula 2018-02-01 7 +Dark_at_the_Top_of_the_Stairs 2015-07-01 10 +Acanthio 2017-12-01 11 +1980_Labatt_Brier 2018-01-01 111 +2016-17_New_York_Knicks_season 2017-10-01 21 +1995_CAF_Cup 2015-10-01 48 +Boiled_linseed_oil 2016-04-01 79 +2015_Kumanovo_clashes 2016-07-01 6 +David_Jamieson 2017-01-01 3 +1915_Florida_Gators_football_team 2015-08-01 32 +2010-11_New_Zealand_Football_Championship 2017-03-01 1 +Ashley_Church 2015-08-01 27 +Acanthoxylini 2017-06-01 27 +American_Hindu 2016-10-01 33 +Amylosporomyces 2015-12-01 20 +2007_Southeast_Asia_Basketball_Association_Championship 2018-01-01 1 +Aethelred_I 2017-08-01 1 +2-methyl-GPP_synthase 2018-02-01 1 +Dave_Aspin 2016-11-01 6 +Descent_of_the_Nine 2016-04-01 1 +2010_Kleen_Energy_Systems_disaster 2017-08-01 3 +1978_in_Japanese_television 2017-08-01 70 +Alexandros_Falekas 2018-01-01 1 +1910_in_Afghanistan 2016-02-01 32 +Abd-ru-shin 2017-09-01 681 +610_in_poetry 2017-05-01 3 +2015_arrests_of_FIFA_officials 2017-12-01 46 +ATmega328P 2017-09-01 26 +A_G_Mathews 2017-12-01 3 +Attack_on_Mers-el-Kebir 2016-12-01 511 +2016_in_Estonia 2016-05-01 89 +Adidas-Salomon 2015-09-01 574 +Education_and_Skills_Act_2008 2016-11-01 141 +1789_in_the_United_States 2015-07-01 845 +Apple_Computer_advertising 2015-09-01 7 +9th_US_Army 2016-12-01 17 +Ad_Rotas 2016-02-01 16 +Agios_Ioannis,_Paphos 2018-03-01 97 +Arabian_toad 2017-12-01 100 +Anterior_pituitary_acidophil 2016-06-01 47 +Arguello,_Christine 2017-12-01 3 +Amilkar_Ariza 2017-03-01 67 +Charles_Grierson 2016-11-01 14 +Achi,_Bolivar 2017-11-01 1 +Exonym_and_endonym 2017-01-01 1712 +Abdul_Maroof_Gullestani 2017-12-01 20 +Fairlawne_Handicap_Chase 2016-04-01 11 +1963_Virginia_Tech_Hokies_football_team 2016-07-01 6 +AE_Clarke 2017-12-01 3 +ALFA-PROJ_Model_3563_sport 2017-10-01 2 +Aleks_Vanderpool-Wallace 2018-02-01 32 +Antioxident 2017-05-01 16 +Calliope_Project 2015-07-01 3 +Anderson_World 2017-10-01 5 +Amydria_selvae 2017-11-01 6 +Antoni_Katski 2016-09-01 1 +Bera_District 2017-06-01 85 +80_South_Street_New_Design 2016-07-01 86 +Askizsky 2015-08-01 2 +Amausi_metro_station 2015-11-01 44 +9486_Utemorrah 2017-04-01 5 +Army_CIS 2018-01-01 2 +1851_Chilean_Revolution 2017-06-01 255 +Jens_Robert_Dahlqvist 2017-01-01 6 +1966-67_Tercera_Division 2017-05-01 1 +Chanel_Iman 2017-06-01 9434 +Astydamia 2017-06-01 34 +1944_in_Belgium 2016-09-01 27 +Acton_Baronets,_of_Aldenham 2017-01-01 1 +2014_FBS_season 2016-12-01 5 +2016_Winter_Youth_Olympics 2017-09-01 2090 +1903_Clemson_Tigers_football_team 2017-06-01 50 +2014_Taca_da_Liga_Final 2017-04-01 2 +10th_Alberta_general_election 2016-11-01 4 +Edertalschule_Frankenberg 2016-04-01 16 +4th_Punjab_Infantry_Regiment 2017-09-01 136 +America_Air_Linhas_Aereas 2018-02-01 1 +Australian_Liberal_Party 2015-06-01 146 +American_licorice 2017-05-01 15 +2013_NASCAR_Cup_Series 2015-10-01 49 +Anja_Lundqvist 2016-03-01 93 +Amauris_dannfelti 2016-01-01 12 +Abandoned_shipwrecks_act 2015-06-01 3 +11086_Nagatayuji 2017-02-01 3 +Advertising_tissues 2017-06-01 1 +Anti_corn-law_league 2016-10-01 1 +Always_Guaranteed 2017-09-01 445 +Alfredo_Palacio_Moreno 2018-01-01 48 +Antonio_Puche_Vicente 2015-06-01 1 +Elazig_Province 2017-01-01 1 +ATC_code_C02AC01 2017-05-01 1 +Alexander_Mattock_Thompson 2016-08-01 2 +Cocos_Islands_Malay 2017-06-01 63 +Aftonbladet_antisemitism_controversy 2016-10-01 1 +Azad_Kashmir,_Pakistan 2015-07-01 14 +1852_English_cricket_season 2016-10-01 24 +Birmingham_Pride 2015-07-01 129 +Air-pollution_controls 2015-08-01 4 +James_Southerton 2017-01-01 20 +Architecture_of_Chiswick_House 2015-06-01 240 +Alexander,_Colin 2015-12-01 1 +Al-Mansooreh 2016-10-01 1 +Arielle_Gastineau_Ashton 2017-12-01 18 +Blue_Ben 2017-06-01 240 +1911_Michigan_State_Normal_Normalites_football_season 2017-11-01 1 +Arctictis_binturong 2017-04-01 334 +Fornaldarsaga 2016-04-01 18 +Bibasis_gomata 2017-06-01 35 +Anna_Schchian 2017-06-01 19 +2005_in_Rwanda 2016-08-01 69 +Archaeology_in_ethiopia 2016-01-01 1 +23277_Benhughes 2016-12-01 2 +Bahrain_-_USA_relations 2017-06-01 1 +Dieter_Korn 2015-07-01 13 +Antidynamo_theorem 2016-10-01 222 +An_Jae-Won 2016-12-01 1 +Bruray 2015-07-01 82 +Gosport_Council_election,_2004 2017-01-01 2 +1856_in_South_Africa 2017-03-01 60 +Dialakoro,_Guinea 2017-01-01 1 +05-CV-1678 2016-02-01 1 +Allison,_Henry 2016-12-01 5 +Animal_house 2016-06-01 1399 +Alexander_Tabarrok 2017-03-01 5 +Chung-Ho_Memorial_Hospital 2017-06-01 50 +2013_Internazionali_Trofeo_Lame_Perrel-Faip_-_Doubles 2016-03-01 4 +1965_Speedway_World_Team_Cup 2017-11-01 13 +Alexander_Ollongren 2017-11-01 788 +Amore_traditore,_BWV_203 2016-06-01 83 +Arthur_William_Rogers 2015-10-01 31 +Ashoka_pillar 2017-02-01 265 +1_62_honeycomb 2018-02-01 10 +1926_Australasian_Championships 2016-05-01 47 +Export_award 2016-04-01 3 +5000_Days_Project 2016-07-01 75 +2012_UCI_Europe_Tour 2017-03-01 65 +1985_Toronto_Indoor_-_Singles 2015-08-01 4 +Cedar_Grove,_North_Carolina 2017-06-01 18 +Battle_of_The_Afsluitdijk 2016-04-01 15 +Arishtanemi 2017-03-01 7 +Alfalfa_bill_murray 2016-12-01 7 +Elisha_Jay_Edwards 2015-07-01 28 +Arturas_Paulauskas 2016-01-01 10 +Abdelrahman_Hamad 2015-09-01 2 +1948_in_Northern_Ireland 2015-07-01 29 +1988_in_philosophy 2015-05-01 70 +5-Hydroxytryptaminen 2016-01-01 4 +2017_FBS_season 2017-10-01 124 +Areeiro 2016-04-01 2 +Alemonides 2016-03-01 6 +Abrochia_caurensis 2016-10-01 1 +Anafylaxia 2018-01-01 2 +1938_Grand_National 2018-02-01 80 +China-Korea_Champions_League 2015-07-01 4 +Acetyl_bromide 2017-11-01 448 +24_hours_of_lemans 2015-05-01 37 +Albright_hereditary_osteodystrophy 2017-02-01 153 +Ashland_Bus_System 2015-08-01 115 +1,8-Cineole_2-endo-monooxygenase 2016-10-01 8 +2005-2006_NHL_Season 2015-11-01 6 +Cammie_Dunaway 2015-07-01 344 +D-Fish 2016-11-01 2 +4_sister_vineyard 2015-09-01 1 +Alessia_Cara_discography 2017-03-01 100 +Alexander_Berg 2017-08-01 63 +4822_Karge 2018-02-01 32 +Emile_Francis_Trophy 2017-01-01 8 +Amin_Ghaseminejad 2017-06-01 45 +Artichia 2017-09-01 19 +Cividale 2016-11-01 41 +2007_Orissa_Violence 2016-05-01 1 +Australian_Saltbush 2016-12-01 5 +Asian_Food_Channel 2016-09-01 727 +Camp_iawah 2015-07-01 1 +ATC_code_J01MA04 2017-11-01 1 +Arpad_Balazs 2017-10-01 2 +Angel_of_Music,_or_The_Private_Life_of_Giselle 2018-02-01 56 +1983_Torneo_di_Viareggio 2016-03-01 22 +Arellano_University 2017-09-01 1699 +ATC_code_B03AA 2017-11-01 1 +FS5000 2016-11-01 1 +Abd-Allah_ibn_Zubayr 2017-05-01 2 +1889_SAFA_season 2016-04-01 28 +Aloha_bowl_broadcasters 2015-05-01 2 +1994_All_England_Open_Badminton_Championships 2016-07-01 75 +Are_We_Not_Horses 2015-07-01 79 +Angiolo_Torchi 2018-02-01 5 +Chimanimani_National_Park 2017-06-01 37 +Art_manifesto 2017-09-01 2619 +Adrian_Apostol 2016-10-01 62 +Adventure_book 2015-10-01 14 +Albemarle_Bertie 2016-06-01 20 +Adam_Deibert 2017-08-01 611 +Alberta_association_of_architects 2017-10-01 2 +Alloschmidia 2017-11-01 15 +Administrative_department_of_security 2016-05-01 1 +Archdeaconry_of_Dudley 2017-07-01 19 +Ammayenna_Sthree 2015-12-01 38 +Aaron_Spelling 2016-05-01 25128 +Anatolian_hieroglyph 2016-07-01 308 +Central_University_of_Rajasthan 2016-11-01 323 +Annamanum_touzalini 2017-08-01 7 +Acleris_hispidana 2016-11-01 2 +Frisco_kid 2016-04-01 15 +Allerheiligenberg_monastery 2017-12-01 2 +Arctic_comb_jelly 2017-03-01 3 +279377_Lechmankiewicz 2016-06-01 1 +AEGON_Pro-Series_Loughborough 2018-02-01 7 +Firefly_Space_Systems 2017-01-01 235 +2000-01_Hong_Kong_League_Cup 2017-12-01 6 +British_supermarkets 2017-01-01 2 +A_description_of_New_England 2016-10-01 13 +Artificial_Flavoring 2016-06-01 2 +Anglican_bishop_of_the_Torres_people 2018-02-01 1 +Antonio_Diaz_Cardoso 2018-02-01 1 +Johan_Patriksson 2017-01-01 3 +Ashutosh_Morya 2017-07-01 1 +Iron_ore 2017-01-01 3682 +AT-16_Scallion 2015-08-01 594 +Data_analyst 2015-07-01 134 +Cabbageball 2016-04-01 3 +Acanthonyx_seriopuncta 2017-04-01 2 +Aegeria_ruficauda 2017-10-01 1 +Archibald_Douglas,_1st_Earl_of_Ormond 2016-06-01 100 +2014_European_Championships_in_Athletics 2017-01-01 3 +1Co-Co1 2017-08-01 77 +Arthur_Abba_Goldberg 2015-10-01 2 +Ameri-Cana_Ultralights 2015-05-01 33 +1979_British_Formula_One_season 2015-12-01 218 +American_colonial_history 2016-06-01 6 +Arcadia_Martin_Wesay_Toe 2015-06-01 73 +Adam_Ornstein 2017-08-01 2 +Archive_of_Modern_Conflict 2016-12-01 307 +Ciro_Urriola 2015-07-01 12 +Acanthosyris 2015-12-01 53 +Eriopyga_jamaicensis 2015-07-01 1 +10th_parallel_north 2016-06-01 1412 +Derek_Almond 2017-01-01 2 +Jaimanglapur 2017-01-01 4 +Aphroditeola_olida 2018-02-01 6 +18th_dynasty_of_egypt 2017-06-01 2 +Ali_ben_Ahmed 2016-08-01 62 +Ashkur_Mahalleh 2018-02-01 8 +Adolf_Mosengel 2017-02-01 54 +1838_Safed_pogrom 2016-02-01 1 +1829_in_architecture 2017-05-01 24 +Arcones,_Segovia 2016-05-01 3 +Albert_Smith_Medal 2018-02-01 30 +Arqanqergen_mass_murder 2015-10-01 60 +Jaan_Usin 2017-01-01 4 +2009_Bangladesh_Rifles_revolt 2016-03-01 269 +-coltore 2015-11-01 9 +Ernest_Makins 2017-01-01 10 +Amsterdam_Bijlmer_Arena 2016-07-01 87 +Apostolic_assemblies_of_christ 2018-01-01 1 +Abirabad,_Razavi_Khorasan 2015-08-01 26 +2016_All-Ireland_Senior_Football_Championship 2015-10-01 883 +Asylum_seeking 2016-06-01 36 +56th_parallel 2015-07-01 12 +Junior_roller_derby 2017-01-01 19 +Ana_Goncalves 2016-03-01 2 +Alekseevskiy_Raion 2017-11-01 1 +2009_Vietnam_national_football_team_results 2017-07-01 15 +Chicago,_Burlington_and_Quincy_Railroad_Depot 2017-01-01 2 +Fox_Valley_Conference 2016-04-01 84 +Brachioplasty 2017-06-01 304 +Arnold_Doren 2017-06-01 11 +All_Ireland_mandolin_Champion 2015-07-01 2 +Deborah_Rennard 2016-04-01 814 +Anthony_Macdonnell 2016-02-01 2 +Azerbaijan_Pakistan_relations 2017-01-01 1 +A_Girl_Named_Zippy 2018-03-01 346 +Academic_OneFile 2018-02-01 109 +East_Point_Academy 2017-01-01 48 +2011_Italian_Figure_Skating_Championships 2017-03-01 47 +Chen_Qiao_En 2016-04-01 52 +Canobie_lake 2016-04-01 1 +Andrei_Arlashin 2017-11-01 13 +Again_Into_Eyes 2017-12-01 54 +Andropogon_curtipendulus 2018-02-01 1 +Abbath 2016-05-01 927 +Alien_Opponent 2016-05-01 160 +Art_of_Love 2016-02-01 3 +Ariana_Huffington 2017-05-01 84 +Amy_Poehler 2016-04-01 62732 +Cherven,_Rousse_Province 2015-07-01 2 +1_Month_2_Live 2018-03-01 306 +Country_Day_School_of_the_Sacred_Heart 2017-06-01 132 +Cooperative_institute_for_arctic_research 2015-07-01 2 +Depression_symptoms 2017-01-01 7 +Brent_Skoda 2016-04-01 31 +American_Christians 2016-12-01 10 +Counterbleed 2017-01-01 1 +Abarka 2016-05-01 325 +Aleksander_Povetkin 2017-02-01 89 +Austin_TX 2016-03-01 119 +Aleksandr_Tretyakov 2017-01-01 40 +Connecticut_congressional_districts 2016-11-01 3 +Alessio_de_Marchis 2015-10-01 66 +Capel_Salem,_Pwllheli 2016-04-01 6 +5-alpha_reductase_deficiency 2016-10-01 30 +Annabelle_Croft 2016-01-01 32 +Aeronca_Aircraft_Corporation 2017-05-01 9 +1597_in_Scotland 2016-07-01 18 +Alf_Somerfield 2017-11-01 10 +Agapanthia_villosoviridescens 2018-02-01 53 +Adam_Goldberg 2015-12-01 42338 +1961_Paris_massacre 2017-01-01 52 +2007_in_radio 2017-04-01 131 +Arthur_French,_5th_Baron_de_Freyne 2015-12-01 44 +AMD_Socket_G3 2017-04-01 121 +Albert_geouffre_de_lapradelle 2016-02-01 1 +Collaborations_between_ex-Beatles 2015-07-01 1279 +Betty_Ireland 2016-04-01 40 +Domingo_Tirado_Benedi 2015-07-01 1 +Bac_Ly 2016-04-01 1 +All_gas-phase_iodine_laser 2015-07-01 136 +Andre_Salifou 2017-01-01 1 +1,3-b-D-glucan 2017-05-01 2 +Joseph_Johnston_Muir 2017-01-01 3 +17th_of_Shahrivar_league 2016-05-01 63 +2001_in_art 2018-03-01 131 +Abiji_language 2017-10-01 6 +Ahliah_school 2018-03-01 133 +1605_in_India 2017-12-01 83 +Dr_Jeom_Kee_Paik 2015-07-01 1 +1954_Texas_Longhorns_football_team 2018-01-01 69 +1985_Little_League_World_Series 2016-07-01 226 +Eleanor_de_bohun 2015-07-01 1 +Adrenaline_strength 2016-03-01 8 +434_BC 2018-02-01 97 +8x60mm_S 2015-06-01 61 +2016-17_South_Pacific_cyclone_season 2017-09-01 101 +Beth_Aala 2017-06-01 15 +Al_Shaver 2017-07-01 138 +Adelphoi_Zangaki 2018-01-01 89 +Cyclopropyl_group 2016-11-01 167 +216_Sqn 2017-08-01 11 +20469_Dudleymoore 2017-05-01 5 +Attila_Hildmann 2017-06-01 103 +1970_Arkansas_Razorbacks_football_team 2016-11-01 66 +Anthony_Fairfax 2017-08-01 24 +Fort_Point,_Boston 2016-04-01 384 +Epsilon_numbers 2016-04-01 3 +2013_Recopa_Sudamericana 2016-05-01 202 +Italo_Disco 2017-01-01 27 +Andersen_Press 2015-09-01 228 +Amasa_Walker 2017-09-01 146 +2010_in_Israeli_film 2015-09-01 234 +A-25_Shrike 2017-12-01 90 +2009_Winnipeg_Blue_Bombers_season 2017-06-01 66 +Ashland_County,_Ohio 2016-10-01 1298 +Dusky_Turtle_Dove 2017-01-01 3 +Antonov_148 2017-02-01 129 +Abdul_Hamid_Lahori 2017-08-01 458 +Amadeo_of_Spain 2015-11-01 1701 +2015_Novak_Djokovic_tennis_season 2017-07-01 2484 +Dhabawallah 2016-04-01 4 +Afshar_Beylik 2017-06-01 4 +1998_ATP_Tour_World_Championships_-_Singles 2017-03-01 20 +Beach_Haven_Terrace,_New_Jersey 2016-11-01 4 +Aix-la_Chapelle 2018-03-01 66 +Ackerman,_Val 2017-05-01 2 +47th_Ohio_Infantry 2016-12-01 59 +100_People,_100_Songs 2017-11-01 517 +2007_Masters_of_Formula_3 2016-01-01 63 +1832_US_presidential_election 2016-05-01 6 +Aaron_Baker 2016-05-01 113 +2015-16_FIBA_Europe_Club_Competition 2017-11-01 2 +Alebra 2018-02-01 27 +Asilus_crabroniformis 2016-11-01 4 +Earth_and_Air_and_Rain 2016-11-01 31 +2014_Stade_Tata_Raphael_disaster 2018-02-01 1 +Alexander_Izvolski 2017-01-01 7 +Fabric_17 2017-01-01 13 +1925_Campeonato_de_Portugal_Final 2018-01-01 37 +1948_Ashes_series 2017-01-01 121 +Abraham_ben_david 2016-09-01 4 +2006_Acropolis_Rally 2017-01-01 12 +Alottment 2017-03-01 6 +Angolanness 2015-07-01 11 +2002_in_NASCAR_Craftsman_Truck_Series 2016-01-01 12 +Aces_of_ANSI_Art 2015-08-01 77 +Alan_Tskhovrebov 2015-08-01 13 +Aegis_Security 2015-10-01 1 +Alec_the_Great 2015-05-01 69 +Corel_SnapFire 2016-11-01 9 +AbdulMagid_Breish 2016-03-01 276 +A_Night_in_NYC 2015-10-01 232 +79th_parallel_south 2016-11-01 17 +Alphonse_Crespo 2016-06-01 50 +Acacia_petite_feuille 2016-05-01 1 +Amstrad_464 2017-12-01 18 +Charles_County,_Maryland 2017-06-01 2079 +1972_outbreak_of_smallpox_in_Yugoslavia 2018-03-01 375 +Alungili 2017-09-01 37 +Brontispalaelaps_froggatti 2016-04-01 1 +Alison_Lacey 2016-12-01 94 +Alessandro_Capra 2017-07-01 21 +2012_UCF_Knights_baseball_team 2016-08-01 46 +16_Candles_Down_the_Drain 2017-05-01 2 +Anandra_strandi 2015-08-01 11 +Brigitte_Rohde 2017-01-01 9 +Agenda_VR3 2015-09-01 93 +1641_in_architecture 2015-11-01 32 +ALF_Tales 2016-04-01 280 +A_Woman_Scorned 2015-07-01 164 +Air-free_techniques 2016-04-01 5 +1973_in_British_television 2016-04-01 96 +All_Saints_Cemetery 2017-04-01 345 +1981_in_Swedish_football 2016-06-01 21 +Apple_Dictionary 2016-10-01 19 +2015_PBZ_Zagreb_Indoors 2016-08-01 121 +16th_IIFA_Awards 2017-02-01 1194 +Duki,_Pakistan 2016-04-01 14 +Administration_of_Borderchek_points,_Population_and_Immigration 2015-09-01 2 +Alonia,_Zante 2017-10-01 1 +African_United_Club 2017-10-01 50 +Burjanadze-Democrats 2016-04-01 19 +Application_software_development 2015-06-01 27 +Almonacid_de_la_Sierra,_Zaragoza 2015-06-01 1 +Baissour 2016-12-01 100 +Coti_Sorokin 2016-04-01 46 +Alberta_and_Great_Waterways_Railway_scandal 2017-05-01 70 +1942_Alabama_Crimson_Tide_football_team 2015-09-01 144 +Adam_Art_Gallery 2016-08-01 80 +Akshinski_Raion 2016-09-01 1 +Edwin_of_Deira 2015-07-01 34 +Altaf_Mahmud 2015-10-01 245 +Astana_cycling_team 2017-12-01 7 +1982_CART_World_Series_season 2015-12-01 3 +3_Rotaxane 2017-03-01 1 +1924_Eastern_Suburbs_season 2015-08-01 32 +Downtown_Science 2016-11-01 6 +1993-94_Slovak_Cup 2017-04-01 1 +Brandon_Wayne_Hedrick 2016-04-01 32 +2015_Brasil_Open 2016-01-01 403 +Aung_Pinle_Hsinbyushin 2016-02-01 69 +An_Numaniyah 2016-06-01 185 +24th_Arkansas_Infantry_Regiment 2016-03-01 64 +Adimchinobe_Echemandu 2017-05-01 90 +August_Belmont,_Jr 2017-06-01 8 +Empacher 2016-11-01 102 +Abdulkadir_Sheikh_Dini 2017-01-01 70 +Alvaro_Quiros 2017-08-01 12 +Algernon_May 2017-11-01 35 +Athol_Shmith 2016-02-01 188 +2004_Indesit_ATP_Milan_Indoor_-_Doubles 2015-09-01 1 +Alfred_Dennis 2016-11-01 9 +2nd_Medical_Battalion 2017-05-01 380 +Atom_clocks 2016-03-01 12 +368th_Expeditionary_Air_Support_Operations_Group 2015-06-01 48 +1911_Washington_Senators_season 2017-06-01 46 +1963_Night_Series_Cup 2015-07-01 26 +Aromobates_capurinensis 2017-12-01 21 +2013-14_Super_Lig 2017-05-01 14 +Al_taglio 2016-09-01 2 +2015_RBC_Tennis_Championships_of_Dallas 2016-04-01 18 +2011_Mirabella_Cup 2017-11-01 15 +1996_NHL_Western_Conference_Final 2015-06-01 1 +2009_Formula_Nippon_Championship 2016-11-01 44 +Information_security_awareness 2017-01-01 56 +A_Noiseless_Patient_Spider 2018-03-01 757 +Aggregate_field_theory 2017-06-01 3 +Armenians_in_Central_Asia 2015-10-01 351 +Acona,_Mississippi 2017-10-01 33 +Apozomus 2017-12-01 19 +Antwun_Echols 2016-11-01 87 +1949_Albanian_Cup 2016-11-01 11 +Aesychlus 2016-10-01 4 +1961_Pulitzer_Prize 2015-09-01 879 +East_Midlands_Conference_Centre 2016-04-01 13 +Blumen 2016-11-01 11 diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data_small_custom.txt b/docs/ja/integrations/data-ingestion/data-formats/assets/data_small_custom.txt new file mode 100644 index 00000000000..2d4626327a6 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/data_small_custom.txt @@ -0,0 +1 @@ +row('Akiba_Hebrew_Academy';'2017-08-01';241),row('Aegithina_tiphia';'2018-02-01';34),row('1971-72_Utah_Stars_season';'2016-10-01';1),row('2015_UEFA_European_Under-21_Championship_qualification_Group_8';'2015-12-01';73),row('2016_Greater_Western_Sydney_Giants_season';'2017-05-01';86),row('AAA_Americas_Trios_Championship';'2015-10-01';104),row('1420_in_literature';'2016-05-01';20),row('Adair,_Beegie';'2017-08-01';2),row('1980_Rugby_League_State_of_Origin_match';'2017-07-01';2),row('Column_of_Santa_Felicita,_Florence';'2017-06-01';14) diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/data_small_headers.csv b/docs/ja/integrations/data-ingestion/data-formats/assets/data_small_headers.csv new file mode 100644 index 00000000000..f01c7b864df --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/data_small_headers.csv @@ -0,0 +1,1001 @@ +"path","month","hits" +"Akiba_Hebrew_Academy","2017-08-01",241 +"Aegithina_tiphia","2018-02-01",34 +"1971-72_Utah_Stars_season","2016-10-01",1 +"2015_UEFA_European_Under-21_Championship_qualification_Group_8","2015-12-01",73 +"2016_Greater_Western_Sydney_Giants_season","2017-05-01",86 +"AAA_Americas_Trios_Championship","2015-10-01",104 +"1420_in_literature","2016-05-01",20 +"Adair,_Beegie","2017-08-01",2 +"1980_Rugby_League_State_of_Origin_match","2017-07-01",2 +"Column_of_Santa_Felicita,_Florence","2017-06-01",14 +"2007_Copa_America","2016-07-01",178 +"Car_dealerships_in_the_USA","2015-07-01",11 +"Dihydromyricetin_reductase","2015-07-01",1 +"ATCvet_code_QB05BB01","2017-04-01",1 +"City_CarShare","2017-01-01",125 +"Heidenrod","2017-01-01",10 +"Arthur_Henrique","2016-11-01",12 +"Alan_Ebnother","2015-11-01",66 +"2013_UConn_football_season","2017-05-01",2 +"2008_American_League_Division_Series","2016-12-01",376 +"Antilipaemic","2017-09-01",12 +"Aberzombie","2016-12-01",28 +"2008_Asian_Wrestling_Championships","2016-12-01",76 +"Federal_Correctional_Complex,_Pollock","2017-01-01",19 +"Central_body","2015-07-01",32 +"Binbrook,_Ontario","2015-07-01",446 +"Azerbaijan_at_the_2016_Judo_Grand_Prix_Samsun","2016-10-01",25 +"Ashford_Lake","2017-10-01",80 +"1942_Joint_Strike","2015-12-01",3 +"AFC_Youth_Championship_2012","2017-10-01",2 +"Akhira","2016-07-01",64 +"Arroniro_Arlieri","2016-10-01",1 +"Alesheim_Burgsalach","2015-05-01",2 +"2700_classic","2017-05-01",4 +"ARX-8_Laevatein","2015-06-01",14 +"1991_Newsweek_Champions_Cup_-_Singles","2017-06-01",3 +"Aphelandra_sinclairiana","2017-07-01",69 +"Asia_Kong","2015-10-01",2 +"2012_Internazionali_Tennis_Val_Gardena_Sudtirol","2016-02-01",1 +"24_Carat_Purple","2017-06-01",476 +"Acroliths","2017-12-01",9 +"Bundesautobahn_3","2016-04-01",264 +"ATC_code_S01AX21","2016-09-01",1 +"Allington,_Lincolnshire","2015-11-01",188 +"Acer_Aspire_One","2017-06-01",5169 +"ATC_code_L04AC","2015-06-01",1 +"1969_New_Year_Honours","2017-07-01",269 +"Antonio_Napolitano","2017-11-01",44 +"Amberfish","2017-10-01",11 +"1976_Cam_2_Motor_Oil_400","2018-03-01",45 +"April_25,_2017","2018-01-01",2 +"Akahori_Station","2016-06-01",11 +"Abducens_palsy","2016-05-01",28 +"Ancona_cathedral","2018-01-01",2 +"Ajou_Motor_College","2017-02-01",83 +"Brad_Skyes","2016-11-01",1 +"Alegro_PCS","2017-07-01",157 +"Franz_Dunshirn","2017-01-01",1 +"Arthur_Godfrey_Road","2016-11-01",3 +"Ab_Golman","2017-05-01",30 +"Art_in_early_modern_Scotland","2016-03-01",98 +"1968_World_Series","2016-02-01",1960 +"1828_in_the_UK","2017-08-01",3 +"Explorer-1_Prime_Unit_2","2016-11-01",11 +"2014_Desafio_Internacional_das_Estrelas","2017-12-01",31 +"Ambulyx_subocellata","2016-08-01",1 +"2008_Hamilton_Tiger-Cats_season","2015-11-01",153 +"Deuterogamist","2015-07-01",5 +"Art_Nouveau_furniture","2017-12-01",839 +"Allison,_Colorado","2015-10-01",85 +"2014_MLS_Re-Entry_Draft","2017-09-01",36 +"Amiot_353","2015-12-01",8 +"ACLU_of_Massachusetts","2015-11-01",106 +"Altable,_Spain","2016-10-01",1 +"Agnidra_scabiosa","2016-12-01",16 +"Dictyotremella_novoguineensis","2015-07-01",1 +"Compiler_Construction","2015-07-01",42 +"Aufheben","2016-11-01",1080 +"Avafauna","2017-06-01",17 +"Atheist_billboard","2017-01-01",19 +"2011_Indonesia_Super_League_All-Star_team","2015-11-01",15 +"BrahMos_II","2015-07-01",31 +"1707_in_art","2016-04-01",17 +"Aeromarine_Model_60","2016-06-01",34 +"Ayatollah-al-ozma","2015-06-01",12 +"Exanimus","2017-01-01",4 +"Anderby","2017-01-01",29 +"Ashgabat_indoor_tennis_arena","2017-07-01",27 +"1971_Rose_Bowl","2015-12-01",961 +"2004_HR56","2016-05-01",5 +"1886_in_South_Africa","2016-03-01",70 +"Bishop_of_Central_Newfoundland","2016-04-01",1 +"Alice_Rivlin","2016-09-01",1137 +"Arriba_en_la_Cordillera","2017-06-01",39 +"Adam_Lively","2016-06-01",77 +"Colasposoma_fairmairei_fairmairei","2017-06-01",5 +"Archie_Barton","2017-02-01",49 +"Aharon_wasserman","2016-01-01",7 +"Alabama_Educational_Television_Commission","2017-05-01",3 +"Advanced_Technology_Bomber","2016-02-01",67 +"1-krona","2017-01-01",4 +"Ahmadabad-e_Kalij-e_Sofla","2017-01-01",3 +"Bob_Dolman","2016-11-01",245 +"Bellevue,_French_Guiana","2017-01-01",5 +"Bison_Nickel","2017-01-01",2 +"Arthur_Drabble","2016-12-01",35 +"Edgewater_Borough,_New_Jersey","2016-11-01",3 +"Alberto_Cambrosio","2017-11-01",31 +"Amalia_Celia_Figueredo","2017-07-01",32 +"1989_-_1992_Rugby_League_World_Cup","2016-01-01",10 +"Admir_Seferagic","2016-06-01",7 +"Adriaan_Loosjes","2015-05-01",46 +"Alfred_Manuel_Martin","2015-06-01",3 +"Academy_of_the_Arabic_Language","2015-08-01",67 +"Ankita_Shrivastav","2018-01-01",7430 +"Anarchism_in_asia","2017-11-01",1 +"Batiquitos_Lagoon_State_Marine_Conservation_Area","2015-07-01",18 +"Alstonia_calophylla","2017-12-01",2 +"4-Hydroxycyclohexanecarboxylate_dehydrogenase","2016-11-01",4 +"832_symmetry","2017-09-01",6 +"1931_Fuyun_earthquake","2016-07-01",64 +"1998_Masters_of_Formula_3","2016-01-01",60 +"2011_LG_Hockey_Games","2016-04-01",7 +"Generalized_pustular_psoriasis","2017-01-01",159 +"2013_European_Cup_Winter_Throwing","2016-07-01",56 +"2008_in_Argentina","2017-06-01",48 +"Apostrophized","2017-10-01",5 +"Algebraically_compact_module","2017-01-01",5 +"Askett","2015-10-01",79 +"2009_swine_flu_outbreak_timeline","2015-08-01",65 +"72704-01-9","2017-12-01",4 +"Alexandre-Charles-Albert-Joseph_Renard","2017-11-01",4 +"Acyl-CoA_oxidase","2016-09-01",250 +"2011_Budweiser_Shootout","2015-08-01",109 +"Augusta_Davies_Webster","2015-07-01",2 +"Association_theory","2017-07-01",112 +"Abemama_Airfield","2015-05-01",8 +"Archaeological_Museum_of_Heraklion","2015-10-01",14 +"Authorized_marches_of_the_Canadian_Armed_Forces","2016-11-01",241 +"1986_in_Portugal","2017-01-01",7 +"Antiziganism_in_Bulgaria","2017-12-01",13 +"Adriana_Martin","2015-09-01",21 +"2004_Green_Bay_Packers_season","2015-05-01",970 +"Agrippa_the_Sceptic","2017-11-01",95 +"Admiral_Island","2016-04-01",1 +"Auxiliary_sign_language","2015-06-01",31 +"2013_Food_City_500","2015-06-01",90 +"Andy_Roesch","2015-08-01",15 +"Alsoszentivan","2017-05-01",4 +"Architecture_of_Belgium","2015-05-01",199 +"1_South_African_Infantry","2017-06-01",5 +"1930_Auburn_Tigers_football_team","2016-12-01",39 +"1860_in_Canada","2017-05-01",269 +"Aldeaseca_de_la_Frontera","2018-03-01",21 +"Elijah_Fox_Cook","2015-07-01",13 +"2010_BCS_Bowl_Games","2016-03-01",1 +"2017_NPSL_season","2017-06-01",2806 +"Bank_of_New_South_Wales_v_Commonwealth","2016-12-01",173 +"American_Enterprise_Association","2016-02-01",4 +"26th_Kentucky_Derby","2018-03-01",1 +"Chaldean_Diocese_of_Amid","2016-11-01",18 +"Ajaran_language","2016-03-01",1 +"1992_Texas_Rangers_season","2017-06-01",113 +"26_SAS","2017-12-01",3 +"2015_Terengganu_FA_season","2016-01-01",537 +"Aagard,_Oregon","2017-03-01",3 +"Auberry,_CA","2017-05-01",13 +"American_Eskimo_spitz","2015-09-01",3 +"Antidiabetic","2016-11-01",75 +"Asinius","2017-11-01",26 +"Andrey_Vasilievich_Abramov","2016-10-01",1 +"Alan_Carrington","2018-03-01",91 +"Colebrook,_Ontario","2017-06-01",2 +"Abbasabad-e_Kheyrabad","2015-08-01",24 +"Arandjelovac_Municipality","2016-02-01",1 +"Aloysius_Valente","2017-12-01",11 +"Almondo_Curry","2016-03-01",86 +"4th_century_AD","2017-03-01",13 +"Askhat_Dilmukhamedov","2016-02-01",77 +"1147_AD","2017-05-01",1 +"1953_Torneo_di_Viareggio","2017-03-01",20 +"ATP_Schenectady","2015-12-01",30 +"Lakarian_City","2017-01-01",3 +"Adam_Ferency","2017-12-01",176 +"AugustDvorak","2016-07-01",5 +"97th_Light_Infantry_Division","2017-07-01",1 +"16th_Connecticut_Infantry_Regiment","2016-05-01",146 +"2011_Somalian_drought","2017-05-01",2 +"Anbargah","2017-12-01",8 +"1921_in_Paraguayan_football","2016-03-01",2 +"Cosmetic_dermatitis","2017-01-01",5 +"Annunciation_Greek_Orthodox_Cathedral,_Atlanta,_Georgia","2015-09-01",9 +"1300_AM","2016-07-01",106 +"A_Promising_Africa","2016-03-01",41 +"2015-16_Odense_Bulldogs_season","2016-10-01",1 +"Aral_AG","2017-12-01",1446 +"Angel_Vivar_Dorado","2015-12-01",6 +"1951_Australian_Championships","2018-03-01",32 +"DJMax_Portable_Hot_Tunes","2017-01-01",27 +"Allinge","2017-03-01",32 +"1986_Buick_WCT_Finals","2016-11-01",14 +"Arimatsu,_Aichi","2015-06-01",112 +"Arthur_Berzinsh","2017-02-01",249 +"Apolima_Uta","2017-04-01",23 +"Capitol_Hill_Pride_Festival","2015-07-01",19 +"Kara-Murza","2017-01-01",5 +"Aigleville,_Alabama","2015-11-01",19 +"Abdullah_bin_al-Hussein","2017-02-01",1 +"2017-18_Inter_Milan_season","2018-03-01",26 +"African_Collared_Dove","2016-07-01",10 +"Achaea_dmoe","2016-11-01",3 +"Aurora,_Utah","2016-06-01",201 +"Architecture_in_Portland,_OR","2017-07-01",1 +"Charchala","2015-07-01",4 +"Around_the_Roses","2015-07-01",3 +"1965_in_music","2016-12-01",3394 +"Alojzije_Jankovic","2017-04-01",5 +"Arisu_Seno","2015-08-01",6 +"ALCO_T-6","2017-01-01",77 +"1998_Royal_Bank_Cup","2015-12-01",32 +"1956_Claxton_Shield","2016-11-01",9 +"Anita_Dube","2017-07-01",233 +"Anderson_Windows","2015-05-01",13 +"Annaquatucket_River","2018-03-01",38 +"Black_salve","2017-01-01",1496 +"Anna_Pendleton_Schenck","2017-02-01",11 +"Asghar_Nadeem_Syed","2017-07-01",146 +"Disarming","2016-11-01",5 +"Antarctic_ice_cap","2017-08-01",7 +"Antonio_Ottone","2017-05-01",11 +"Coralie_Larnack","2017-01-01",9 +"Budha_Subba_Gold_Cup","2016-11-01",24 +"Amphoe_Chaiya","2017-03-01",9 +"Anarcho-capitalism_in_Somalia","2016-10-01",7 +"Felix_Loch","2017-01-01",131 +"26508_Jimmylin","2017-12-01",3 +"Andrew_McMillen","2015-11-01",134 +"Dundee_Canal_Industrial_Historic_District","2017-01-01",2 +"Aula_Baratto","2015-12-01",140 +"Church_of_St_Mary,_Knowsley","2015-07-01",1 +"Aggelakis","2017-10-01",1 +"Al_Badiyah","2017-11-01",157 +"Assault_Gunboat","2016-03-01",21 +"Lachau","2017-01-01",4 +"2008_Pittsburgh_Steelers_season","2016-12-01",10018 +"Apolychrosis_candidus","2018-01-01",24 +"Andrei_Krylov","2017-02-01",192 +"Aldesh_Vadher","2018-02-01",7 +"Alwand","2017-02-01",7 +"Edward_Baker_Lincoln","2015-07-01",4347 +"Aermotor_Corporation","2017-11-01",4 +"Aischylos","2017-01-01",7 +"6th_Assault_Aviation_Corps","2017-07-01",100 +"Azygos_lobe","2016-10-01",1598 +"Demirciler,_Nazilli","2015-07-01",4 +"Akhlaq-e-Hindi","2016-11-01",13 +"Dragon_Crusaders","2016-04-01",122 +"25V_USB","2016-01-01",1 +"Calliophis_melanurus","2017-01-01",31 +"Antonionian","2016-10-01",15 +"Ashley_Richardson","2017-09-01",1216 +"1st_Observation_Group","2018-01-01",6 +"Andrzej_Bargiel","2015-05-01",97 +"2008_AFL_National_Under_16_Championships","2018-03-01",20 +"Ammon_Bundy","2016-09-01",11890 +"Benno_Wandolleck","2016-11-01",5 +"Aero-Kros_MP-02_Czajka","2016-03-01",136 +"A6005_road","2015-10-01",14 +"Eagle_Eye_Networks","2015-07-01",101 +"Aarberg","2017-12-01",277 +"Encyclopedia_of_anthropology","2015-07-01",1 +"Duncormick_railway_station","2016-11-01",7 +"Aiqing_huajiao_zhuanyi","2017-03-01",1 +"Crude_oil_washing","2016-04-01",466 +"2010_Indiana_Hoosiers_football_team","2017-06-01",90 +"Book_of_Bodley_Head_Verse","2015-07-01",18 +"Absence_seizure","2016-05-01",18152 +"Cayucupil","2016-04-01",3 +"Akanabee","2017-03-01",1 +"Grooved_consonant","2017-01-01",5 +"Dellamora_philippinensis","2015-07-01",7 +"Dejan_Blazevski","2017-01-01",1 +"Arabis_armena","2016-08-01",25 +"1988_Summer_Paralympics_medal_table","2016-12-01",90 +"2012-13_Basketball_Championship_of_Bosnia_and_Herzegovina","2017-04-01",2 +"1966_in_music","2017-10-01",3510 +"Antti_Tyrvainen","2015-12-01",2 +"African_desert","2016-06-01",262 +"Bruneau_mariposa_lily","2016-04-01",1 +"Bernie_Parmalee","2017-06-01",221 +"2015_South_American_Youth_Football_Championship_squads","2015-09-01",594 +"1985_IIHF_World_U20_Championship","2015-08-01",7 +"18th_British_Academy_Film_Awards","2018-02-01",270 +"523_Ada","2016-04-01",35 +"Active_Pharmaceutical_Ingredients","2016-02-01",5 +"Burley,_ID_mSA","2015-07-01",2 +"CFRN-TV-10","2017-06-01",2 +"1982_Super_Bowl_of_Poker","2017-08-01",38 +"Australian_Journal_of_Educational_Technology","2017-01-01",1 +"2013_Super_League_Grand_Final","2016-06-01",212 +"2006_BCR_Open_Romania","2015-06-01",25 +"Charlestown_Townies","2016-04-01",319 +"1943_Polish_underground_raid_on_East_Prussia","2017-08-01",8 +"Anthony_Celestino","2018-02-01",182 +"Andrew_Beerwinkel","2018-02-01",73 +"Greigia_atrobrunnea","2017-01-01",1 +"Adrian_Beecham","2017-11-01",1 +"Implementation_of_mathematics_in_set_theory","2017-01-01",12 +"Annastacia_Palaszczuk","2015-05-01",6247 +"Egon_Zimmermann_II","2016-11-01",3 +"Air_aide-de-camp","2018-03-01",137 +"Albert_Murphy","2016-09-01",1 +"1924_Arkansas_Razorbacks_football_team","2016-02-01",28 +"Avondale_Mill","2016-10-01",68 +"Alexander_Volzhin","2015-12-01",25 +"Arek_Monthly","2017-08-01",31 +"Dinka_Blanche","2015-07-01",1 +"1921_Mercer_Baptists_football_team","2016-11-01",10 +"Afro-Antiguan_and_Barbudan","2016-06-01",252 +"American_southern_literature","2016-10-01",3 +"1947_Swiss_Grand_Prix","2016-11-01",32 +"99p_Stores","2017-12-01",3028 +"Artem_Radkov","2018-03-01",21 +"Arctic_brome","2016-12-01",19 +"Battle_Of_Moskova","2015-06-01",6 +"Airdrieonians","2016-06-01",32 +"Advanced_transportation_controller","2018-03-01",79 +"BC_government","2016-12-01",18 +"Antonio_Maura","2017-03-01",457 +"Anjuman,_Afghanistan","2017-09-01",62 +"Deodato_Guinaccia","2015-07-01",13 +"Blowjob_Betty","2016-11-01",28 +"453d_Flying_Training_Squadron","2017-08-01",3 +"1990_Africa_Cup_of_Nations","2016-04-01",22 +"Agenville","2016-08-01",100 +"1202_in_Scotland","2018-01-01",82 +"Calytrix_desolata","2017-06-01",10 +"1957_in_Chile","2016-04-01",13 +"Anglican_Bishop_of_Torres_Strait_people","2017-08-01",1 +"2015_Mexican_Grand_Prix","2015-06-01",528 +"Catalan_parliament","2017-01-01",14 +"Cult_Shaker","2017-01-01",32 +"Ander_Gayoso","2016-11-01",34 +"Ageneiosus_ucayalensis","2017-12-01",20 +"Club_de_Berne","2015-07-01",194 +"Adecco","2016-03-01",9863 +"Anti-unionism","2018-01-01",11 +"Auchindoun_Castle","2017-01-01",102 +"557_in_poetry","2016-07-01",1 +"Abu_ol_Verdi_Rural_District","2017-01-01",1 +"Centro_73","2016-04-01",23 +"Dagger_compact_category","2016-04-01",97 +"Alan_Nunn_May","2017-11-01",770 +"Basal_clade","2015-07-01",44 +"Aizu_Line","2015-08-01",26 +"Edward_Kernan_Campbell","2016-04-01",5 +"865_area_code","2016-12-01",9 +"Bahamas_at_the_1984_Summer_Olympics","2017-06-01",35 +"Gardan_Kalat","2017-01-01",1 +"American_Samoa_national_under-19_football_team","2017-12-01",4 +"Kayah_National_United_League","2017-01-01",14 +"2007_Nordea_Nordic_Light_Open_-_Singles","2016-10-01",2 +"Avondale_Estate","2016-11-01",2 +"Acalolepta_variolaris","2017-02-01",3 +"Anantapur,_Andhra_Pradesh","2017-05-01",1032 +"Amenable_Banach_algebra","2015-08-01",59 +"300_metres","2017-01-01",61 +"Black_Bottom,_Kentucky","2016-04-01",8 +"100_Players_Who_Shook_The_Kop","2018-01-01",1133 +"Adventure_story","2015-07-01",29 +"Anacampsis_lignaria","2017-05-01",5 +"2007_American_Indoor_Football_Association_season","2015-09-01",89 +"Dmitry_Kardovsky","2016-04-01",33 +"A10_autoroute","2015-11-01",27 +"1995_Sydney_Bulldogs_season","2017-04-01",40 +"Ilex_jelskii","2017-01-01",2 +"Adrian_Jose_Hernandez","2016-10-01",2 +"CallAir_A-5","2016-11-01",4 +"22nd_meridian_west","2015-07-01",45 +"Anglican_Diocese_of_Antananarivo","2015-08-01",2 +"Andrew_Kelsey","2016-11-01",14 +"Brownhill_Creek","2017-06-01",4 +"Abunai_Deka","2015-06-01",269 +"Aisha_Jefferson","2017-04-01",115 +"Alonso_Lopez","2017-03-01",7 +"Aeroparque_Ciudad_de_Mendoza","2016-01-01",1 +"Arthur_Ashley_Sykes","2017-12-01",45 +"Holy_Face_Medal","2017-01-01",20 +"1Chronicles","2018-02-01",1 +"2014_CFU_Club_Championship","2017-12-01",108 +"Aetna_class_ironclad_floating_battery","2015-06-01",37 +"Antoine_Delrio","2015-07-01",2 +"Chislet_Windmill","2015-07-01",38 +"Aerojet_SD-2","2017-07-01",59 +"Age_role_play","2015-09-01",2 +"50687_Paultemple","2018-03-01",8 +"1997-98_Cuban_National_Series","2017-02-01",1 +"Aleksandr_Borisovich_Belyavskiy","2017-10-01",42 +"Carol_MacReady","2017-01-01",111 +"18th_Chess_Olympiad","2015-06-01",134 +"Clara_Schonfeld","2015-07-01",1 +"Apollonius_of_Athens","2017-02-01",35 +"ABC_80","2018-03-01",603 +"Apatelodes_damora","2015-08-01",22 +"Ernest_Walbourn","2016-04-01",30 +"428_BCE","2017-04-01",2 +"72nd_Seaforth_Highlanders","2017-12-01",29 +"Broughton_Hackett","2015-07-01",38 +"A_Fazenda_2","2016-12-01",56 +"ATCvet_code_QJ01MQ","2017-05-01",2 +"Abura,_Iran","2017-03-01",3 +"DeLeon_Independent_School_District","2015-07-01",1 +"Abby_aldrich","2016-09-01",1 +"Cinema_One_Originals","2016-11-01",359 +"2013_European_Short_Course_Swimming_Championships","2017-09-01",124 +"Ars_technica","2015-11-01",442 +"AMS_Production_Company","2016-02-01",1 +"Joao_Soares","2017-01-01",1 +"Cervical_vertebra_6","2017-06-01",45 +"Kevin_Pugh","2017-01-01",2 +"Alpha-1_antitrypsin","2015-11-01",11845 +"Assyrians_in_iran","2017-07-01",53 +"Boophis_ankarafensis","2016-11-01",2 +"A_View_To_a_Kill","2018-01-01",4 +"Charles_Edouard_Brown-Sequard","2015-07-01",7 +"1919_in_Ireland","2017-04-01",239 +"74th_Foot","2015-06-01",3 +"9275_Persson","2016-07-01",22 +"Dalcerides_mesoa","2015-07-01",11 +"A_Summer_Bird-Cage","2016-03-01",248 +"2011_NAB_Cup","2017-10-01",127 +"13th_Parliament_of_Lower_Canada","2015-08-01",41 +"2011_Players_Championship_Finals","2015-07-01",25 +"Flag_of_Tenerife","2017-01-01",128 +"Hypopta_corrientina","2017-01-01",1 +"Jalatarangam","2017-01-01",16 +"Adjoint_endomorphism","2018-01-01",330 +"Anime_conventions","2015-06-01",18 +"2004_Grammy_Award","2015-06-01",13 +"American_war","2015-07-01",80 +"Beynes,_Yvelines","2016-11-01",32 +"Agriculture_Department","2016-06-01",16 +"Andrey_Chisty","2015-10-01",58 +"Ait_Yahia_Moussa","2017-08-01",7 +"Alfred_Blau","2017-03-01",57 +"1869_in_sports","2017-08-01",73 +"Ambolodia_Sud","2016-04-01",6 +"Animal_slaughter","2017-06-01",6423 +"Adamowka_Commune","2018-01-01",2 +"Arsenic_pentachloride","2016-03-01",467 +"220_BCE","2016-01-01",3 +"863d_Engineer_Battalion","2015-11-01",160 +"Amer_Abu-Hudaib","2017-04-01",31 +"Aaina_tv","2017-08-01",3 +"Arnhem,_Netherlands","2015-08-01",67 +"Antoine_de_sartine","2015-08-01",4 +"ATC_code_A16","2016-01-01",155 +"Eastern_Front","2017-01-01",70 +"Ashy-headed_tyrannulet","2016-12-01",44 +"Aoheng_language","2015-08-01",64 +"1996_World_Junior_Canoe_Slalom_Championships","2017-11-01",15 +"Agriophara_nodigera","2017-11-01",12 +"Amsterdam_Island_cattle","2015-12-01",675 +"Aliyah_from_the_Soviet_Union_in_the_1990s","2017-08-01",54 +"Abandoned_and_Little_Known_Airfields","2018-01-01",2 +"Church_numerals","2015-07-01",57 +"Ankeny_Christian_Academy","2015-09-01",74 +"2010_FIFA_World_Cup_qualification_-_AFC_First_Round","2017-06-01",58 +"1ESS_switch","2015-07-01",514 +"Chelys_boulengerii","2016-04-01",1 +"Bivalent_logic","2016-11-01",25 +"Ivan_Skavinsky_Skavar","2017-01-01",1 +"Fergus_Sings_the_Blues","2016-04-01",62 +"2015-16_Libyan_Premier_League","2017-02-01",4 +"Dutch_Chess_Championship","2017-01-01",35 +"Every_Man_in_His_Humor","2016-11-01",1 +"2008_Allstate_BCS_National_Championship_Game","2015-08-01",11 +"Aq_Tappeh,_Hamadan","2015-09-01",25 +"Agrotractor","2016-02-01",1 +"Alexander_of_Pfalz-Zweibrucken","2017-12-01",2 +"2003_Mistral_World_Championships","2016-04-01",6 +"146th_Fighter-Interceptor_Wing","2015-11-01",49 +"Al-Qahir","2016-04-01",328 +"25604_Karlin","2015-05-01",20 +"Allen_taflove","2017-12-01",3 +"Aretha_Thurmond","2017-05-01",109 +"Atlanta_and_lagrange_rail_road","2015-07-01",1 +"ACSI_College_Iloilo","2015-10-01",1 +"Alan_Sacks","2015-07-01",150 +"African_Desert_Warbler","2017-02-01",11 +"A_Man_and_His_Soul","2018-02-01",89 +"ASCII_ART","2015-05-01",9 +"1992-93_VMI_Keydets_basketball_team","2016-10-01",1 +"George_and_the_Dragon","2017-01-01",18 +"2012_NAB_Cup","2016-12-01",99 +"1965_Indy_500","2016-05-01",51 +"Forest_Glen,_Nova_Scotia","2016-04-01",9 +"A_Critical_Dictionary_of_English_Literature","2016-08-01",4 +"Aquion_Energy","2015-08-01",1077 +"Alibeyce,_Emirdag","2017-09-01",1 +"Blauhu00F6hle","2015-07-01",1 +"Ian_Sommerville","2017-01-01",1 +"Air_propulsion","2017-07-01",474 +"2016_12_Hours_of_Sebring","2016-10-01",187 +"Asites","2017-07-01",4 +"Al-Kini","2017-03-01",1 +"Austin_Aztex_2009_season","2016-03-01",10 +"Alto_Vista_Chapel","2015-12-01",833 +"Abecedaria","2017-04-01",22 +"Farm_to_Market_Road_2503","2016-11-01",3 +"Anglican_Bishop_of_The_Leeward_Islands","2015-09-01",2 +"Basketball_at_the_2011_Pan_American_Games","2017-06-01",120 +"Angela_Peel","2016-08-01",7 +"Amber_Frey","2018-02-01",728 +"Afraid_to_Sleep","2017-06-01",51 +"ATC_code_A02BA","2018-02-01",7 +"Apateon_pedestris","2015-11-01",5 +"Alois_Estermann","2015-12-01",1155 +"1752_in_science","2016-01-01",78 +"Baldassin","2017-06-01",3 +"Camilla_Hildegarde_Wedgwood","2017-01-01",1 +"B-A-C-H_motive","2016-10-01",3 +"AI_Velorum_star","2016-09-01",1 +"Ali_Zayn_al-Abidin","2017-04-01",71 +"Ailurarctos_lufengensis","2015-07-01",1 +"Clearview,_Philadelphia","2017-06-01",67 +"Adam_Sender","2016-08-01",759 +"Apriona_paucigranula","2018-02-01",7 +"Dark_at_the_Top_of_the_Stairs","2015-07-01",10 +"Acanthio","2017-12-01",11 +"1980_Labatt_Brier","2018-01-01",111 +"2016-17_New_York_Knicks_season","2017-10-01",21 +"1995_CAF_Cup","2015-10-01",48 +"Boiled_linseed_oil","2016-04-01",79 +"2015_Kumanovo_clashes","2016-07-01",6 +"David_Jamieson","2017-01-01",3 +"1915_Florida_Gators_football_team","2015-08-01",32 +"2010-11_New_Zealand_Football_Championship","2017-03-01",1 +"Ashley_Church","2015-08-01",27 +"Acanthoxylini","2017-06-01",27 +"American_Hindu","2016-10-01",33 +"Amylosporomyces","2015-12-01",20 +"2007_Southeast_Asia_Basketball_Association_Championship","2018-01-01",1 +"Aethelred_I","2017-08-01",1 +"2-methyl-GPP_synthase","2018-02-01",1 +"Dave_Aspin","2016-11-01",6 +"Descent_of_the_Nine","2016-04-01",1 +"2010_Kleen_Energy_Systems_disaster","2017-08-01",3 +"1978_in_Japanese_television","2017-08-01",70 +"Alexandros_Falekas","2018-01-01",1 +"1910_in_Afghanistan","2016-02-01",32 +"Abd-ru-shin","2017-09-01",681 +"610_in_poetry","2017-05-01",3 +"2015_arrests_of_FIFA_officials","2017-12-01",46 +"ATmega328P","2017-09-01",26 +"A_G_Mathews","2017-12-01",3 +"Attack_on_Mers-el-Kebir","2016-12-01",511 +"2016_in_Estonia","2016-05-01",89 +"Adidas-Salomon","2015-09-01",574 +"Education_and_Skills_Act_2008","2016-11-01",141 +"1789_in_the_United_States","2015-07-01",845 +"Apple_Computer_advertising","2015-09-01",7 +"9th_US_Army","2016-12-01",17 +"Ad_Rotas","2016-02-01",16 +"Agios_Ioannis,_Paphos","2018-03-01",97 +"Arabian_toad","2017-12-01",100 +"Anterior_pituitary_acidophil","2016-06-01",47 +"Arguello,_Christine","2017-12-01",3 +"Amilkar_Ariza","2017-03-01",67 +"Charles_Grierson","2016-11-01",14 +"Achi,_Bolivar","2017-11-01",1 +"Exonym_and_endonym","2017-01-01",1712 +"Abdul_Maroof_Gullestani","2017-12-01",20 +"Fairlawne_Handicap_Chase","2016-04-01",11 +"1963_Virginia_Tech_Hokies_football_team","2016-07-01",6 +"AE_Clarke","2017-12-01",3 +"ALFA-PROJ_Model_3563_sport","2017-10-01",2 +"Aleks_Vanderpool-Wallace","2018-02-01",32 +"Antioxident","2017-05-01",16 +"Calliope_Project","2015-07-01",3 +"Anderson_World","2017-10-01",5 +"Amydria_selvae","2017-11-01",6 +"Antoni_Katski","2016-09-01",1 +"Bera_District","2017-06-01",85 +"80_South_Street_New_Design","2016-07-01",86 +"Askizsky","2015-08-01",2 +"Amausi_metro_station","2015-11-01",44 +"9486_Utemorrah","2017-04-01",5 +"Army_CIS","2018-01-01",2 +"1851_Chilean_Revolution","2017-06-01",255 +"Jens_Robert_Dahlqvist","2017-01-01",6 +"1966-67_Tercera_Division","2017-05-01",1 +"Chanel_Iman","2017-06-01",9434 +"Astydamia","2017-06-01",34 +"1944_in_Belgium","2016-09-01",27 +"Acton_Baronets,_of_Aldenham","2017-01-01",1 +"2014_FBS_season","2016-12-01",5 +"2016_Winter_Youth_Olympics","2017-09-01",2090 +"1903_Clemson_Tigers_football_team","2017-06-01",50 +"2014_Taca_da_Liga_Final","2017-04-01",2 +"10th_Alberta_general_election","2016-11-01",4 +"Edertalschule_Frankenberg","2016-04-01",16 +"4th_Punjab_Infantry_Regiment","2017-09-01",136 +"America_Air_Linhas_Aereas","2018-02-01",1 +"Australian_Liberal_Party","2015-06-01",146 +"American_licorice","2017-05-01",15 +"2013_NASCAR_Cup_Series","2015-10-01",49 +"Anja_Lundqvist","2016-03-01",93 +"Amauris_dannfelti","2016-01-01",12 +"Abandoned_shipwrecks_act","2015-06-01",3 +"11086_Nagatayuji","2017-02-01",3 +"Advertising_tissues","2017-06-01",1 +"Anti_corn-law_league","2016-10-01",1 +"Always_Guaranteed","2017-09-01",445 +"Alfredo_Palacio_Moreno","2018-01-01",48 +"Antonio_Puche_Vicente","2015-06-01",1 +"Elazig_Province","2017-01-01",1 +"ATC_code_C02AC01","2017-05-01",1 +"Alexander_Mattock_Thompson","2016-08-01",2 +"Cocos_Islands_Malay","2017-06-01",63 +"Aftonbladet_antisemitism_controversy","2016-10-01",1 +"Azad_Kashmir,_Pakistan","2015-07-01",14 +"1852_English_cricket_season","2016-10-01",24 +"Birmingham_Pride","2015-07-01",129 +"Air-pollution_controls","2015-08-01",4 +"James_Southerton","2017-01-01",20 +"Architecture_of_Chiswick_House","2015-06-01",240 +"Alexander,_Colin","2015-12-01",1 +"Al-Mansooreh","2016-10-01",1 +"Arielle_Gastineau_Ashton","2017-12-01",18 +"Blue_Ben","2017-06-01",240 +"1911_Michigan_State_Normal_Normalites_football_season","2017-11-01",1 +"Arctictis_binturong","2017-04-01",334 +"Fornaldarsaga","2016-04-01",18 +"Bibasis_gomata","2017-06-01",35 +"Anna_Schchian","2017-06-01",19 +"2005_in_Rwanda","2016-08-01",69 +"Archaeology_in_ethiopia","2016-01-01",1 +"23277_Benhughes","2016-12-01",2 +"Bahrain_-_USA_relations","2017-06-01",1 +"Dieter_Korn","2015-07-01",13 +"Antidynamo_theorem","2016-10-01",222 +"An_Jae-Won","2016-12-01",1 +"Bruray","2015-07-01",82 +"Gosport_Council_election,_2004","2017-01-01",2 +"1856_in_South_Africa","2017-03-01",60 +"Dialakoro,_Guinea","2017-01-01",1 +"05-CV-1678","2016-02-01",1 +"Allison,_Henry","2016-12-01",5 +"Animal_house","2016-06-01",1399 +"Alexander_Tabarrok","2017-03-01",5 +"Chung-Ho_Memorial_Hospital","2017-06-01",50 +"2013_Internazionali_Trofeo_Lame_Perrel-Faip_-_Doubles","2016-03-01",4 +"1965_Speedway_World_Team_Cup","2017-11-01",13 +"Alexander_Ollongren","2017-11-01",788 +"Amore_traditore,_BWV_203","2016-06-01",83 +"Arthur_William_Rogers","2015-10-01",31 +"Ashoka_pillar","2017-02-01",265 +"1_62_honeycomb","2018-02-01",10 +"1926_Australasian_Championships","2016-05-01",47 +"Export_award","2016-04-01",3 +"5000_Days_Project","2016-07-01",75 +"2012_UCI_Europe_Tour","2017-03-01",65 +"1985_Toronto_Indoor_-_Singles","2015-08-01",4 +"Cedar_Grove,_North_Carolina","2017-06-01",18 +"Battle_of_The_Afsluitdijk","2016-04-01",15 +"Arishtanemi","2017-03-01",7 +"Alfalfa_bill_murray","2016-12-01",7 +"Elisha_Jay_Edwards","2015-07-01",28 +"Arturas_Paulauskas","2016-01-01",10 +"Abdelrahman_Hamad","2015-09-01",2 +"1948_in_Northern_Ireland","2015-07-01",29 +"1988_in_philosophy","2015-05-01",70 +"5-Hydroxytryptaminen","2016-01-01",4 +"2017_FBS_season","2017-10-01",124 +"Areeiro","2016-04-01",2 +"Alemonides","2016-03-01",6 +"Abrochia_caurensis","2016-10-01",1 +"Anafylaxia","2018-01-01",2 +"1938_Grand_National","2018-02-01",80 +"China-Korea_Champions_League","2015-07-01",4 +"Acetyl_bromide","2017-11-01",448 +"24_hours_of_lemans","2015-05-01",37 +"Albright_hereditary_osteodystrophy","2017-02-01",153 +"Ashland_Bus_System","2015-08-01",115 +"1,8-Cineole_2-endo-monooxygenase","2016-10-01",8 +"2005-2006_NHL_Season","2015-11-01",6 +"Cammie_Dunaway","2015-07-01",344 +"D-Fish","2016-11-01",2 +"4_sister_vineyard","2015-09-01",1 +"Alessia_Cara_discography","2017-03-01",100 +"Alexander_Berg","2017-08-01",63 +"4822_Karge","2018-02-01",32 +"Emile_Francis_Trophy","2017-01-01",8 +"Amin_Ghaseminejad","2017-06-01",45 +"Artichia","2017-09-01",19 +"Cividale","2016-11-01",41 +"2007_Orissa_Violence","2016-05-01",1 +"Australian_Saltbush","2016-12-01",5 +"Asian_Food_Channel","2016-09-01",727 +"Camp_iawah","2015-07-01",1 +"ATC_code_J01MA04","2017-11-01",1 +"Arpad_Balazs","2017-10-01",2 +"Angel_of_Music,_or_The_Private_Life_of_Giselle","2018-02-01",56 +"1983_Torneo_di_Viareggio","2016-03-01",22 +"Arellano_University","2017-09-01",1699 +"ATC_code_B03AA","2017-11-01",1 +"FS5000","2016-11-01",1 +"Abd-Allah_ibn_Zubayr","2017-05-01",2 +"1889_SAFA_season","2016-04-01",28 +"Aloha_bowl_broadcasters","2015-05-01",2 +"1994_All_England_Open_Badminton_Championships","2016-07-01",75 +"Are_We_Not_Horses","2015-07-01",79 +"Angiolo_Torchi","2018-02-01",5 +"Chimanimani_National_Park","2017-06-01",37 +"Art_manifesto","2017-09-01",2619 +"Adrian_Apostol","2016-10-01",62 +"Adventure_book","2015-10-01",14 +"Albemarle_Bertie","2016-06-01",20 +"Adam_Deibert","2017-08-01",611 +"Alberta_association_of_architects","2017-10-01",2 +"Alloschmidia","2017-11-01",15 +"Administrative_department_of_security","2016-05-01",1 +"Archdeaconry_of_Dudley","2017-07-01",19 +"Ammayenna_Sthree","2015-12-01",38 +"Aaron_Spelling","2016-05-01",25128 +"Anatolian_hieroglyph","2016-07-01",308 +"Central_University_of_Rajasthan","2016-11-01",323 +"Annamanum_touzalini","2017-08-01",7 +"Acleris_hispidana","2016-11-01",2 +"Frisco_kid","2016-04-01",15 +"Allerheiligenberg_monastery","2017-12-01",2 +"Arctic_comb_jelly","2017-03-01",3 +"279377_Lechmankiewicz","2016-06-01",1 +"AEGON_Pro-Series_Loughborough","2018-02-01",7 +"Firefly_Space_Systems","2017-01-01",235 +"2000-01_Hong_Kong_League_Cup","2017-12-01",6 +"British_supermarkets","2017-01-01",2 +"A_description_of_New_England","2016-10-01",13 +"Artificial_Flavoring","2016-06-01",2 +"Anglican_bishop_of_the_Torres_people","2018-02-01",1 +"Antonio_Diaz_Cardoso","2018-02-01",1 +"Johan_Patriksson","2017-01-01",3 +"Ashutosh_Morya","2017-07-01",1 +"Iron_ore","2017-01-01",3682 +"AT-16_Scallion","2015-08-01",594 +"Data_analyst","2015-07-01",134 +"Cabbageball","2016-04-01",3 +"Acanthonyx_seriopuncta","2017-04-01",2 +"Aegeria_ruficauda","2017-10-01",1 +"Archibald_Douglas,_1st_Earl_of_Ormond","2016-06-01",100 +"2014_European_Championships_in_Athletics","2017-01-01",3 +"1Co-Co1","2017-08-01",77 +"Arthur_Abba_Goldberg","2015-10-01",2 +"Ameri-Cana_Ultralights","2015-05-01",33 +"1979_British_Formula_One_season","2015-12-01",218 +"American_colonial_history","2016-06-01",6 +"Arcadia_Martin_Wesay_Toe","2015-06-01",73 +"Adam_Ornstein","2017-08-01",2 +"Archive_of_Modern_Conflict","2016-12-01",307 +"Ciro_Urriola","2015-07-01",12 +"Acanthosyris","2015-12-01",53 +"Eriopyga_jamaicensis","2015-07-01",1 +"10th_parallel_north","2016-06-01",1412 +"Derek_Almond","2017-01-01",2 +"Jaimanglapur","2017-01-01",4 +"Aphroditeola_olida","2018-02-01",6 +"18th_dynasty_of_egypt","2017-06-01",2 +"Ali_ben_Ahmed","2016-08-01",62 +"Ashkur_Mahalleh","2018-02-01",8 +"Adolf_Mosengel","2017-02-01",54 +"1838_Safed_pogrom","2016-02-01",1 +"1829_in_architecture","2017-05-01",24 +"Arcones,_Segovia","2016-05-01",3 +"Albert_Smith_Medal","2018-02-01",30 +"Arqanqergen_mass_murder","2015-10-01",60 +"Jaan_Usin","2017-01-01",4 +"2009_Bangladesh_Rifles_revolt","2016-03-01",269 +"-coltore","2015-11-01",9 +"Ernest_Makins","2017-01-01",10 +"Amsterdam_Bijlmer_Arena","2016-07-01",87 +"Apostolic_assemblies_of_christ","2018-01-01",1 +"Abirabad,_Razavi_Khorasan","2015-08-01",26 +"2016_All-Ireland_Senior_Football_Championship","2015-10-01",883 +"Asylum_seeking","2016-06-01",36 +"56th_parallel","2015-07-01",12 +"Junior_roller_derby","2017-01-01",19 +"Ana_Goncalves","2016-03-01",2 +"Alekseevskiy_Raion","2017-11-01",1 +"2009_Vietnam_national_football_team_results","2017-07-01",15 +"Chicago,_Burlington_and_Quincy_Railroad_Depot","2017-01-01",2 +"Fox_Valley_Conference","2016-04-01",84 +"Brachioplasty","2017-06-01",304 +"Arnold_Doren","2017-06-01",11 +"All_Ireland_mandolin_Champion","2015-07-01",2 +"Deborah_Rennard","2016-04-01",814 +"Anthony_Macdonnell","2016-02-01",2 +"Azerbaijan_Pakistan_relations","2017-01-01",1 +"A_Girl_Named_Zippy","2018-03-01",346 +"Academic_OneFile","2018-02-01",109 +"East_Point_Academy","2017-01-01",48 +"2011_Italian_Figure_Skating_Championships","2017-03-01",47 +"Chen_Qiao_En","2016-04-01",52 +"Canobie_lake","2016-04-01",1 +"Andrei_Arlashin","2017-11-01",13 +"Again_Into_Eyes","2017-12-01",54 +"Andropogon_curtipendulus","2018-02-01",1 +"Abbath","2016-05-01",927 +"Alien_Opponent","2016-05-01",160 +"Art_of_Love","2016-02-01",3 +"Ariana_Huffington","2017-05-01",84 +"Amy_Poehler","2016-04-01",62732 +"Cherven,_Rousse_Province","2015-07-01",2 +"1_Month_2_Live","2018-03-01",306 +"Country_Day_School_of_the_Sacred_Heart","2017-06-01",132 +"Cooperative_institute_for_arctic_research","2015-07-01",2 +"Depression_symptoms","2017-01-01",7 +"Brent_Skoda","2016-04-01",31 +"American_Christians","2016-12-01",10 +"Counterbleed","2017-01-01",1 +"Abarka","2016-05-01",325 +"Aleksander_Povetkin","2017-02-01",89 +"Austin_TX","2016-03-01",119 +"Aleksandr_Tretyakov","2017-01-01",40 +"Connecticut_congressional_districts","2016-11-01",3 +"Alessio_de_Marchis","2015-10-01",66 +"Capel_Salem,_Pwllheli","2016-04-01",6 +"5-alpha_reductase_deficiency","2016-10-01",30 +"Annabelle_Croft","2016-01-01",32 +"Aeronca_Aircraft_Corporation","2017-05-01",9 +"1597_in_Scotland","2016-07-01",18 +"Alf_Somerfield","2017-11-01",10 +"Agapanthia_villosoviridescens","2018-02-01",53 +"Adam_Goldberg","2015-12-01",42338 +"1961_Paris_massacre","2017-01-01",52 +"2007_in_radio","2017-04-01",131 +"Arthur_French,_5th_Baron_de_Freyne","2015-12-01",44 +"AMD_Socket_G3","2017-04-01",121 +"Albert_geouffre_de_lapradelle","2016-02-01",1 +"Collaborations_between_ex-Beatles","2015-07-01",1279 +"Betty_Ireland","2016-04-01",40 +"Domingo_Tirado_Benedi","2015-07-01",1 +"Bac_Ly","2016-04-01",1 +"All_gas-phase_iodine_laser","2015-07-01",136 +"Andre_Salifou","2017-01-01",1 +"1,3-b-D-glucan","2017-05-01",2 +"Joseph_Johnston_Muir","2017-01-01",3 +"17th_of_Shahrivar_league","2016-05-01",63 +"2001_in_art","2018-03-01",131 +"Abiji_language","2017-10-01",6 +"Ahliah_school","2018-03-01",133 +"1605_in_India","2017-12-01",83 +"Dr_Jeom_Kee_Paik","2015-07-01",1 +"1954_Texas_Longhorns_football_team","2018-01-01",69 +"1985_Little_League_World_Series","2016-07-01",226 +"Eleanor_de_bohun","2015-07-01",1 +"Adrenaline_strength","2016-03-01",8 +"434_BC","2018-02-01",97 +"8x60mm_S","2015-06-01",61 +"2016-17_South_Pacific_cyclone_season","2017-09-01",101 +"Beth_Aala","2017-06-01",15 +"Al_Shaver","2017-07-01",138 +"Adelphoi_Zangaki","2018-01-01",89 +"Cyclopropyl_group","2016-11-01",167 +"216_Sqn","2017-08-01",11 +"20469_Dudleymoore","2017-05-01",5 +"Attila_Hildmann","2017-06-01",103 +"1970_Arkansas_Razorbacks_football_team","2016-11-01",66 +"Anthony_Fairfax","2017-08-01",24 +"Fort_Point,_Boston","2016-04-01",384 +"Epsilon_numbers","2016-04-01",3 +"2013_Recopa_Sudamericana","2016-05-01",202 +"Italo_Disco","2017-01-01",27 +"Andersen_Press","2015-09-01",228 +"Amasa_Walker","2017-09-01",146 +"2010_in_Israeli_film","2015-09-01",234 +"A-25_Shrike","2017-12-01",90 +"2009_Winnipeg_Blue_Bombers_season","2017-06-01",66 +"Ashland_County,_Ohio","2016-10-01",1298 +"Dusky_Turtle_Dove","2017-01-01",3 +"Antonov_148","2017-02-01",129 +"Abdul_Hamid_Lahori","2017-08-01",458 +"Amadeo_of_Spain","2015-11-01",1701 +"2015_Novak_Djokovic_tennis_season","2017-07-01",2484 +"Dhabawallah","2016-04-01",4 +"Afshar_Beylik","2017-06-01",4 +"1998_ATP_Tour_World_Championships_-_Singles","2017-03-01",20 +"Beach_Haven_Terrace,_New_Jersey","2016-11-01",4 +"Aix-la_Chapelle","2018-03-01",66 +"Ackerman,_Val","2017-05-01",2 +"47th_Ohio_Infantry","2016-12-01",59 +"100_People,_100_Songs","2017-11-01",517 +"2007_Masters_of_Formula_3","2016-01-01",63 +"1832_US_presidential_election","2016-05-01",6 +"Aaron_Baker","2016-05-01",113 +"2015-16_FIBA_Europe_Club_Competition","2017-11-01",2 +"Alebra","2018-02-01",27 +"Asilus_crabroniformis","2016-11-01",4 +"Earth_and_Air_and_Rain","2016-11-01",31 +"2014_Stade_Tata_Raphael_disaster","2018-02-01",1 +"Alexander_Izvolski","2017-01-01",7 +"Fabric_17","2017-01-01",13 +"1925_Campeonato_de_Portugal_Final","2018-01-01",37 +"1948_Ashes_series","2017-01-01",121 +"Abraham_ben_david","2016-09-01",4 +"2006_Acropolis_Rally","2017-01-01",12 +"Alottment","2017-03-01",6 +"Angolanness","2015-07-01",11 +"2002_in_NASCAR_Craftsman_Truck_Series","2016-01-01",12 +"Aces_of_ANSI_Art","2015-08-01",77 +"Alan_Tskhovrebov","2015-08-01",13 +"Aegis_Security","2015-10-01",1 +"Alec_the_Great","2015-05-01",69 +"Corel_SnapFire","2016-11-01",9 +"AbdulMagid_Breish","2016-03-01",276 +"A_Night_in_NYC","2015-10-01",232 +"79th_parallel_south","2016-11-01",17 +"Alphonse_Crespo","2016-06-01",50 +"Acacia_petite_feuille","2016-05-01",1 +"Amstrad_464","2017-12-01",18 +"Charles_County,_Maryland","2017-06-01",2079 +"1972_outbreak_of_smallpox_in_Yugoslavia","2018-03-01",375 +"Alungili","2017-09-01",37 +"Brontispalaelaps_froggatti","2016-04-01",1 +"Alison_Lacey","2016-12-01",94 +"Alessandro_Capra","2017-07-01",21 +"2012_UCF_Knights_baseball_team","2016-08-01",46 +"16_Candles_Down_the_Drain","2017-05-01",2 +"Anandra_strandi","2015-08-01",11 +"Brigitte_Rohde","2017-01-01",9 +"Agenda_VR3","2015-09-01",93 +"1641_in_architecture","2015-11-01",32 +"ALF_Tales","2016-04-01",280 +"A_Woman_Scorned","2015-07-01",164 +"Air-free_techniques","2016-04-01",5 +"1973_in_British_television","2016-04-01",96 +"All_Saints_Cemetery","2017-04-01",345 +"1981_in_Swedish_football","2016-06-01",21 +"Apple_Dictionary","2016-10-01",19 +"2015_PBZ_Zagreb_Indoors","2016-08-01",121 +"16th_IIFA_Awards","2017-02-01",1194 +"Duki,_Pakistan","2016-04-01",14 +"Administration_of_Borderchek_points,_Population_and_Immigration","2015-09-01",2 +"Alonia,_Zante","2017-10-01",1 +"African_United_Club","2017-10-01",50 +"Burjanadze-Democrats","2016-04-01",19 +"Application_software_development","2015-06-01",27 +"Almonacid_de_la_Sierra,_Zaragoza","2015-06-01",1 +"Baissour","2016-12-01",100 +"Coti_Sorokin","2016-04-01",46 +"Alberta_and_Great_Waterways_Railway_scandal","2017-05-01",70 +"1942_Alabama_Crimson_Tide_football_team","2015-09-01",144 +"Adam_Art_Gallery","2016-08-01",80 +"Akshinski_Raion","2016-09-01",1 +"Edwin_of_Deira","2015-07-01",34 +"Altaf_Mahmud","2015-10-01",245 +"Astana_cycling_team","2017-12-01",7 +"1982_CART_World_Series_season","2015-12-01",3 +"3_Rotaxane","2017-03-01",1 +"1924_Eastern_Suburbs_season","2015-08-01",32 +"Downtown_Science","2016-11-01",6 +"1993-94_Slovak_Cup","2017-04-01",1 +"Brandon_Wayne_Hedrick","2016-04-01",32 +"2015_Brasil_Open","2016-01-01",403 +"Aung_Pinle_Hsinbyushin","2016-02-01",69 +"An_Numaniyah","2016-06-01",185 +"24th_Arkansas_Infantry_Regiment","2016-03-01",64 +"Adimchinobe_Echemandu","2017-05-01",90 +"August_Belmont,_Jr","2017-06-01",8 +"Empacher","2016-11-01",102 +"Abdulkadir_Sheikh_Dini","2017-01-01",70 +"Alvaro_Quiros","2017-08-01",12 +"Algernon_May","2017-11-01",35 +"Athol_Shmith","2016-02-01",188 +"2004_Indesit_ATP_Milan_Indoor_-_Doubles","2015-09-01",1 +"Alfred_Dennis","2016-11-01",9 +"2nd_Medical_Battalion","2017-05-01",380 +"Atom_clocks","2016-03-01",12 +"368th_Expeditionary_Air_Support_Operations_Group","2015-06-01",48 +"1911_Washington_Senators_season","2017-06-01",46 +"1963_Night_Series_Cup","2015-07-01",26 +"Aromobates_capurinensis","2017-12-01",21 +"2013-14_Super_Lig","2017-05-01",14 +"Al_taglio","2016-09-01",2 +"2015_RBC_Tennis_Championships_of_Dallas","2016-04-01",18 +"2011_Mirabella_Cup","2017-11-01",15 +"1996_NHL_Western_Conference_Final","2015-06-01",1 +"2009_Formula_Nippon_Championship","2016-11-01",44 +"Information_security_awareness","2017-01-01",56 +"A_Noiseless_Patient_Spider","2018-03-01",757 +"Aggregate_field_theory","2017-06-01",3 +"Armenians_in_Central_Asia","2015-10-01",351 +"Acona,_Mississippi","2017-10-01",33 +"Apozomus","2017-12-01",19 +"Antwun_Echols","2016-11-01",87 +"1949_Albanian_Cup","2016-11-01",11 +"Aesychlus","2016-10-01",4 +"1961_Pulitzer_Prize","2015-09-01",879 +"East_Midlands_Conference_Centre","2016-04-01",13 +"Blumen","2016-11-01",11 diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/dump.sql b/docs/ja/integrations/data-ingestion/data-formats/assets/dump.sql new file mode 100644 index 00000000000..fcbf558352a --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/dump.sql @@ -0,0 +1 @@ +INSERT INTO some_table (`path`, `month`, `hits`) VALUES ('Bangor_City_Forest', '2015-07-01', 34), ('Alireza_Afzal', '2017-02-01', 24), ('Akhaura-Laksam-Chittagong_Line', '2015-09-01', 30), ('1973_National_500', '2017-10-01', 80), ('Attachment', '2017-09-01', 1356), ('Kellett_Strait', '2017-01-01', 5), ('Ajarani_River', '2018-01-01', 30), ('Akbarabad,_Khomeyn', '2017-03-01', 8), ('Adriaan_Theodoor_Peperzak', '2018-02-01', 88), ('Alucita_dryogramma', '2015-09-01', 1), ('Brit_Med_J', '2015-07-01', 1), ('4th_Metro_Manila_Film_Festival', '2015-09-01', 80), ('Alialujah_Choir', '2018-03-01', 221), ('1953-54_SM-sarja_season', '2016-09-01', 1), ('Air_Force_Song', '2018-02-01', 19), ('4-6_duoprism', '2016-03-01', 30), ('Ashley_Spurlin', '2017-06-01', 94), ('Asfaq_Kayani', '2017-10-01', 1), ('1607_in_architecture', '2016-06-01', 7), ('4-way_speakers', '2015-10-01', 2), ('Blue_Heeler', '2015-07-01', 149), ('5_Euro', '2017-04-01', 16), ('2009_Spa-Francorchamps_GP2_Series_round', '2016-04-01', 12), ('2015_Guru_Granth_Sahib_desecration', '2015-11-01', 6821), ('Agriculture_Marketing_Service', '2016-07-01', 2), ('2006_Football_League_Cup_Final', '2015-11-01', 1711), ('2008_Uber_Cup_group_stage', '2016-02-01', 40), ('1923_PGA_Championship', '2016-08-01', 97), ('Fannie_Bay', '2016-04-01', 6), ('AlchemyAPI', '2016-04-01', 344), ('Cinema_of_Italy', '2017-01-01', 1217), ('Arodes', '2016-11-01', 36), ('Damien_Marley', '2015-07-01', 168), ('Al_Jumayl_Baladiyat', '2015-08-01', 5), ('2015_Alabama_State_Hornets_football_team', '2017-06-01', 32), ('Aglossa_tanya', '2016-03-01', 1), ('73rd_Pennsylvania_Infantry', '2017-01-01', 12), ('2015_European_Junior_and_U23_Canoe_Slalom_Championships', '2018-02-01', 31), ('African_Leopard', '2016-08-01', 64), ('Faverolles,_Orne', '2017-01-01', 5), ('Aaron_Fukuhara', '2015-11-01', 17), ('Annular_ligaments_of_trachea', '2017-01-01', 31), ('2014_US_Open_Series', '2016-11-01', 35), ('A_Better_Mousetrap', '2018-02-01', 4), ('Dibaklu', '2016-11-01', 1), ('At_Samat_District', '2015-06-01', 35), ('Aaron_Peasley', '2017-05-01', 32), ('Apistomology', '2015-12-01', 2), ('Buyat_Bay', '2015-07-01', 54), ('1942_Estonian_Football_Championship', '2017-05-01', 22), ('Action_for_Autism', '2016-06-01', 346), ('100_Hz', '2015-06-01', 72), ('2003_Arizona_State_Sun_Devils_football_team', '2017-05-01', 82), ('Antona_obscura', '2016-09-01', 1), ('Akiko_Sugiyama', '2015-12-01', 32), ('Elysburg', '2016-11-01', 8), ('2017_New_South_Wales_Cup', '2017-09-01', 38), ('2011-12_Gold_Coast_United_FC_season', '2017-06-01', 1), ('Agency_for_the_Prohibition_of_Nuclear_Weapons_in_Latin_America_and_the_Caribbean', '2016-04-01', 15), ('Albert_Dunn', '2017-08-01', 87), ('Hahamakin_ang_Lahat', '2017-01-01', 984), ('2013_Spuyten_Duyvil_derailment', '2017-11-01', 5), ('Ayling', '2017-01-01', 5), ('Anti-Establishment', '2016-10-01', 1), ('1951_Spanish_motorcycle_Grand_Prix', '2018-01-01', 48), ('2009-10_Brunei_Premier_League', '2017-08-01', 4), ('23_Ursae_Majoris', '2016-08-01', 90), ('1927-28_Austrian_football_championship', '2017-08-01', 4), ('Andrew_McKeever', '2017-10-01', 3), ('Clinocottus', '2017-06-01', 23), ('2006_State_of_Origin', '2015-11-01', 7), ('2013-14_Los_Angeles_Clippers_season', '2015-07-01', 8), ('Cor_Jesu', '2017-01-01', 1), ('Besseringen_B-Werk', '2017-06-01', 158), ('Amy_Hempel', '2017-07-01', 1091), ('Franc-Comtois', '2016-04-01', 2), ('Allium_giganteum', '2017-07-01', 1103), ('Abishai', '2016-08-01', 56), ('Abraham_Clark_High_School', '2016-04-01', 88), ('Baku_chronology', '2015-06-01', 1), ('22nd_MEU', '2015-10-01', 39), ('2015_Open_Engie_de_Touraine', '2015-10-01', 195), ('Churchill_Bowl', '2017-06-01', 30), ('AGMARK', '2017-08-01', 117), ('American_standard_wire_gauge', '2017-12-01', 3), ('Araby,_LA', '2015-05-01', 2), ('217_BC', '2016-12-01', 202), ('2008_Trinidad_and_Tobago_League_Cup', '2016-02-01', 6), ('Alazan_Bay', '2015-12-01', 22), ('Aluminum_fencing', '2015-11-01', 48), ('Achilles_tendinitis', '2016-10-01', 5884), ('AFP_Peacekeeping_Operations_Center', '2017-01-01', 64), ('2013_Xinjiang_clashes', '2016-01-01', 1), ('Arborea_Giudicato_of_Arborea', '2015-09-01', 3), ('1941_Cleveland_Rams_season', '2017-06-01', 40), ('Ju_Posht,_Rasht', '2017-01-01', 3), ('Ascalenia', '2016-07-01', 10), ('Aplectoides', '2018-02-01', 4), ('European_Cup_1969-70', '2016-11-01', 14), ('Armen_Mkertchian', '2016-05-01', 9), ('2015_Aspria_Tennis_Cup_-_Singles', '2018-02-01', 1), ('14_August_1947', '2017-11-01', 6), ('Adobe_Creative_Suite_1', '2015-05-01', 1), ('IC_chips', '2017-01-01', 2), ('Austo_AE300', '2016-07-01', 4), ('Date_palms', '2015-07-01', 79), ('BCS_bowl_game', '2017-06-01', 13), ('AR_Border', '2017-06-01', 1), ('Aranda_de_Duero', '2016-04-01', 256), ('1919_Wake_Forest_Demon_Deacons_football_team', '2016-01-01', 16), ('All_The_Wrong_Clues_For_The_Right_Solution', '2017-10-01', 9), ('Allan_Campbell_McLean', '2015-06-01', 131), ('Bradford_Council_election,_2011', '2017-06-01', 5), ('Astronomy_and_astrophysics', '2015-09-01', 62), ('Dutch_Antillean_people', '2015-07-01', 57), ('Army_Radio', '2018-03-01', 711), ('BBVA_Bancomer', '2016-11-01', 709), ('Lake_Aloha', '2017-01-01', 30), ('Andy_Bean', '2018-02-01', 3092), ('1941_Pittsburgh_Steelers_season', '2016-05-01', 147), ('Aniopi_Melidoni', '2016-06-01', 4), ('Aglossosia_fusca', '2017-09-01', 3), ('Art_books', '2017-04-01', 36), ('1929_Washington_Senators_season', '2017-04-01', 47), ('Antaeotricha_congelata', '2016-12-01', 10), ('Douglas_C-54G-5-DO_Skymaster', '2017-01-01', 1), ('Chris_Jamison', '2016-11-01', 827), ('Ace_Blackwell', '2015-11-01', 9), ('Abdul_Qadir_Fitrat', '2018-02-01', 32), ('Arnoldo_Vizcaino', '2017-10-01', 1), ('2012_Open_EuroEnergie_de_Quimper_-_Doubles', '2017-12-01', 3), ('Dale_Rominski', '2017-01-01', 7), ('ADHD_coaching', '2015-06-01', 50), ('Claire_Yiu', '2016-11-01', 209), ('Applicant', '2015-10-01', 253), ('Apache_OpenOffice', '2017-06-01', 6031), ('Abel_Kiprop_Mutai', '2015-09-01', 22), ('Airdrome_Taube', '2017-04-01', 46), ('Andrey_Viktorovich', '2016-06-01', 1), ('American_Idol_controversy', '2016-03-01', 36), ('Anthrenocerus_confertus', '2018-01-01', 17), ('Appraisal_Subcommittee', '2018-03-01', 17), ('Babusa', '2015-07-01', 3), ('500_homeruns', '2016-06-01', 1), ('Argentina_national_volleyball_team', '2016-08-01', 64), ('Chief_prosecutor_of_Russia', '2015-07-01', 1), ('Absolution_DVD', '2015-06-01', 1), ('1,3-Beta-glucan_synthase', '2017-05-01', 440), ('Dave_Sinardet', '2016-04-01', 26), ('Adeline_Whitney', '2018-03-01', 10), ('Allon_shvut', '2016-07-01', 3), ('2012_Penn_State_Nittany_Lions_football_season', '2017-12-01', 3), ('Coleman-Franklin-Cannon_Mill', '2017-01-01', 4), ('Action_director', '2015-05-01', 93), ('AD_547', '2016-01-01', 1), ('Acta_germanica', '2017-09-01', 1), ('Abu_Dhabi_Global_Market_Square', '2017-01-01', 35), ('Kozo_Shioya', '2017-01-01', 7), ('China_Investment_Corp', '2017-01-01', 2), ('Dmitri_Zakharovich_Protopopov', '2016-04-01', 129), ('Anatra_Anadis', '2017-10-01', 208), ('Archaikum', '2017-11-01', 5), ('2000_Webby_Awards', '2017-04-01', 360), ('2003_BCR_Open_Romania_-_Singles', '2016-08-01', 2), ('Abacetus_bisignatus', '2016-09-01', 79), ('American_school_of_kinshasa', '2016-01-01', 1), ('Anna,_7th_Duchess_of_Bedford', '2016-08-01', 8), ('Black_majority_district', '2016-11-01', 3), ('Dagma_Lahlum', '2015-07-01', 1), ('Credit_Saison', '2015-07-01', 517), ('Ariyankuppam_firka', '2016-02-01', 19), ('Annette_Fuentes', '2016-06-01', 17), ('Angerstein,_John', '2015-12-01', 2), ('Annenkov_Island', '2016-03-01', 280), ('Anne_Frank_museum', '2016-06-01', 67), ('Annales_sancti_Amandi', '2017-06-01', 22), ('L-FABP', '2017-01-01', 1), ('Alvord,_TX', '2017-06-01', 12), ('2006_World_Team_Table_Tennis_Championships', '2016-05-01', 119), ('Angriffen', '2015-12-01', 9), ('Anthony_Oppenheimer', '2017-03-01', 452), ('Absamat_Masaliyevich_Masaliyev', '2016-09-01', 1), ('Airborne_Museum_at_Aldershot', '2016-03-01', 41), ('Aktiubinsk_Oblast', '2015-08-01', 7), ('100_East_Wisconsin', '2015-05-01', 782), ('7th_Bangladesh_National_Film_Awards', '2017-08-01', 91), ('Alejandro_Reyes', '2017-12-01', 35), ('Applied_philosophy', '2018-03-01', 539), ('Adhemar_Pimenta', '2016-06-01', 146), ('Break_the_fourth_wall', '2016-04-01', 66), ('Annoushka_Ducas', '2017-10-01', 411), ('ATC_code_J01CA01', '2015-06-01', 1), ('Evelyn_County,_New_South_Wales', '2016-11-01', 7), ('Elastic_scattering', '2016-11-01', 1374), ('1032_Pafuri', '2015-07-01', 35), ('Andrew_Bromwich', '2015-08-01', 26), ('Ishita_Arun', '2017-01-01', 249), ('Aspergics', '2016-07-01', 1), ('1857_in_Chile', '2018-03-01', 22), ('Breffni', '2015-07-01', 38), ('845_in_poetry', '2017-08-01', 2), ('20321_Lightdonovan', '2015-10-01', 12), ('Arthur_Chandler', '2017-12-01', 27), ('CsISOLatin2', '2017-06-01', 1), ('1900_Grand_National', '2016-06-01', 69), ('Aeritalia_AMX', '2017-03-01', 3), ('B_Sharps', '2015-06-01', 11), ('544_area_code', '2015-09-01', 2), ('30th_Guldbagge_Awards', '2015-06-01', 37), ('Agrippina', '2017-08-01', 315), ('Ardmore', '2016-02-01', 433), ('Amplypterus_panopus', '2016-03-01', 23), ('Alexander_Bukharov', '2017-09-01', 5), ('Alaska_Raceway_Park', '2017-01-01', 46), ('Albanian_National_Road_Race_Championships', '2017-03-01', 31), ('1968_Democratic_National_Convention_protest_activity', '2017-10-01', 2802), ('2012_Birthday_Honours', '2017-10-01', 427), ('2000_NHL_expansion_draft', '2017-06-01', 1), ('A_Town_Where_You_Live', '2016-11-01', 2920), ('Ahmed_Shahzad', '2018-03-01', 25), ('Elisabeth_Svendsen', '2016-11-01', 39), ('2002_FINA_Synchronised_Swimming_World_Cup', '2016-08-01', 30), ('Akatek', '2017-04-01', 10), ('Animation_with_DAZ_Studio', '2018-02-01', 78), ('Fergus_Craig', '2016-11-01', 119), ('Ancel_Nalau', '2015-11-01', 5), ('5171_Augustesen', '2017-04-01', 20), ('Anne_McGuire', '2017-11-01', 329), ('Australian_Photoplay_Company', '2015-12-01', 6), ('1913_in_Canada', '2017-04-01', 137), ('Arhopala_allata', '2015-05-01', 26), ('Il_Paradiso_delle_Signore', '2017-01-01', 31), ('Geri_Palast', '2017-01-01', 38), ('Alan_Abela_Wadge', '2017-03-01', 77), ('22nd_Tactical_Air_Support_Squadron', '2017-10-01', 7), ('Avant_Stellar', '2017-06-01', 22), ('Black_phantom_tetra', '2016-11-01', 205), ('Billy_McCaffrey', '2017-01-01', 314), ('Annie_Furuhjelm', '2017-11-01', 97), ('1992_PGA_Tour', '2017-12-01', 307), ('2008_Chilean_pork_crisis', '2016-01-01', 55), ('2012_Currie_Cup_First_Division', '2018-02-01', 32), ('Aleksei_Fomkin', '2015-05-01', 144), ('Alexander_Krausnick-Groh', '2016-05-01', 101), ('Adam_Richard_Wiles', '2017-08-01', 5), ('ATCvet_code_QA01AD01', '2015-09-01', 2), ('Abu_Bakr_Ibn_Bajja', '2017-03-01', 5), ('Architecture-Studio', '2016-04-01', 94), ('950s_BC', '2016-02-01', 257), ('Abschwunges', '2017-07-01', 1), ('Adonis_Geroskipou', '2017-06-01', 15), ('2008-09_SV_Werder_Bremen_season', '2016-03-01', 3), ('Closed_loops', '2016-04-01', 1), ('AFC_Youth_Championship_1982', '2015-12-01', 10), ('Aquila_Shoes', '2015-08-01', 209), ('9842_Funakoshi', '2017-12-01', 11), ('Educational_quotient', '2016-04-01', 21), ('Antoni_Julian_Nowowiejski', '2018-01-01', 211), ('Adi_Oka_Idhile', '2017-11-01', 16), ('DEXIA-BIL_Luxembourg_Open', '2016-11-01', 3), ('Andrew_James_Simpson', '2016-03-01', 43), ('Alexander_Boksenberg', '2017-12-01', 61), ('1827_in_Denmark', '2017-03-01', 39), ('Afternoon_tea_with_suggs', '2017-11-01', 3), ('Alpha,_MN', '2017-06-01', 6), ('Ari_Onasis', '2015-06-01', 4), ('1961-62_Football_League_First_Division', '2015-11-01', 1), ('Andi_Lila', '2015-06-01', 2847), ('A_Gathering_Of_Old_Men', '2018-02-01', 1), ('Abul_Fazl_al-Abbas', '2017-01-01', 1), ('Asgill,_Charles', '2017-08-01', 1), ('Alexander_Arkhangelsky', '2015-07-01', 12), ('1947-48_Portuguese_Liga', '2015-06-01', 1), ('3rd_MMC_-_Varna', '2016-07-01', 3), ('Alberts,_Wayne', '2017-05-01', 3), ('Alois_Schickelgruber', '2018-02-01', 9), ('Hefner_Stadium', '2017-01-01', 2), ('410912_Lisakaroline', '2018-02-01', 26), ('Academy_at_Mountain_State', '2018-03-01', 1), ('617_Squadron', '2016-05-01', 489), ('Al_Silm_Haji_Hajjaj_Awwad_Al_Hajjaji', '2015-07-01', 5), ('Arturo_Merino_Benitez_Airport', '2017-10-01', 13), ('AEK_Athens_Futsal', '2015-06-01', 10), ('Aggaeus', '2018-02-01', 2), ('Association_for_Retarded_Citizens_of_the_United_States', '2017-08-01', 3), ('Kielce_pogrom', '2017-01-01', 335), ('1351_in_poetry', '2016-01-01', 17), ('1923_Princeton_Tigers_football_team', '2017-11-01', 41), ('Auzata_semipavonaria', '2017-01-01', 2), ('892_in_poetry', '2016-01-01', 6), ('Anton_Krotiak', '2017-12-01', 2), ('Arthur_Shelley', '2017-12-01', 23), ('2003_Kyoto_Purple_Sanga_season', '2018-02-01', 9), ('Frederic_Bowker_Terrington_Carter', '2016-04-01', 6), ('2-orthoplex', '2016-03-01', 1), ('Acacia_australiana', '2015-09-01', 4), ('2012_Newcastle_Knights_season', '2016-06-01', 103), ('Ann_Wrights_Corner,_Virginia', '2017-07-01', 19), ('12557_Caracol', '2017-03-01', 5), ('2001_African_Footballer_of_the_Year', '2017-05-01', 1), ('Bass_Pyramid', '2017-01-01', 22), ('A_noodle', '2015-05-01', 5), ('Aed_Bennan', '2018-02-01', 2), ('1886_Yale_Bulldogs_football_team', '2017-10-01', 58), ('2002_Players_Championship', '2016-06-01', 54), ('African_Skimmer', '2017-07-01', 2), ('3rd_Guldbagge_Awards', '2016-12-01', 39), ('Arrows_A19B', '2015-10-01', 1), ('Archduchess_Elisabetta_of_Austria-Este', '2017-08-01', 1526), ('America_Islands', '2015-11-01', 1), ('1932_Olympic_Games', '2016-01-01', 9), ('2011_Chinese_pro-democracy_protests', '2015-11-01', 2044), ('Bank_walkaway', '2016-04-01', 113), ('594_in_Ireland', '2017-04-01', 1), ('Association_of_Municipal_Corporations', '2016-12-01', 5), ('Andreas_Brantelid', '2015-09-01', 167), ('Amarthal_urf_Unchagaon', '2017-05-01', 82), ('3-methoxymorphinan', '2017-04-01', 146), ('2382_BC', '2016-07-01', 10), ('1763_in_science', '2016-07-01', 28), ('Arvert', '2017-04-01', 77), ('Ale_yeast', '2017-12-01', 19), ('A_Man_Without_a_Soul', '2018-03-01', 17), ('Air_Force_Base_Louis_Trichardt', '2017-09-01', 1), ('Athirson_Mazzoli_de_Oliveira', '2017-06-01', 3), ('Anthony_Chan_Yau', '2017-07-01', 181), ('Basic_Enlisted_Submarine_School', '2017-06-01', 392), ('Aboriginal_Lands_of_Hawaiian_Ancestry', '2015-09-01', 11), ('Fondren_Southwest,_Houston', '2017-01-01', 4), ('3_World_Financial_Center', '2017-07-01', 64), ('1971_IIHF_European_U19_Championship', '2017-09-01', 9), ('1937-38_Allsvenskan', '2015-12-01', 6), ('Christopher_Ashton_Kutcher', '2017-06-01', 2), ('Australian_rules_football_in_south_australia', '2016-12-01', 1), ('Amicable_pair', '2018-01-01', 7), ('Alan_Tomes', '2015-11-01', 82), ('Alexei_Petrovich,_Tsarevich_of_Russia', '2015-12-01', 3887), ('Alexis_Damour', '2015-10-01', 66), ('Bankruptcy_Act_of_1938', '2017-06-01', 76), ('Amphiphyllum', '2016-06-01', 14), ('Conway_High_School_West', '2016-04-01', 1), ('5447_Lallement', '2015-11-01', 10), ('Gabriel_Iddan', '2017-01-01', 1), ('1879-80_Scottish_Cup', '2017-04-01', 3), ('2011_Eneco_Tour', '2016-10-01', 31), ('1471_in_England', '2015-11-01', 94), ('Ashland_Town_Hall', '2017-01-01', 5), ('Archduke_John', '2015-05-01', 20), ('2000_Cameroonian_Premier_League', '2017-09-01', 18), ('1997_flood', '2017-11-01', 5), ('Agile_management', '2015-09-01', 26677), ('Am_841', '2017-12-01', 3), ('Apprentice_Mason', '2018-01-01', 4), ('Hales-Jewett_theorem', '2017-01-01', 2), ('Alien_Abductions', '2017-10-01', 14), ('Arjun_Menon', '2016-02-01', 370), ('Anthokyan', '2016-01-01', 4), ('Automobili_Lamborghini', '2016-02-01', 1110), ('Alain_Prost', '2017-04-01', 25196), ('Fartein_Valen', '2016-04-01', 90), ('Antonio_Galli_da_Bibiena', '2016-05-01', 5), ('Al_Jawf,_Libya', '2017-03-01', 600), ('AD_695', '2018-02-01', 1), ('Amir_chand', '2015-11-01', 1), ('Alcis_obliquisigna', '2017-08-01', 1), ('Chandra_Talpade_Mohanty', '2017-01-01', 306), ('Algerian_safe_house,_Jalalabad', '2015-06-01', 3), ('Jake_Milner', '2017-01-01', 1), ('Alternate_Communications_Center', '2017-10-01', 1), ('In_the_Bleachers', '2017-01-01', 42), ('Alex_Puodziukas', '2016-04-01', 7), ('Altarpiece_of_Pilgrim_II', '2018-02-01', 2), ('Cybernetical_Physics', '2017-01-01', 3), ('Christopher_Unthank', '2017-06-01', 2), ('1982_Independence_Bowl', '2015-06-01', 102), ('Ascoli_Calcio_1898', '2018-03-01', 1115), ('Briggs-Rauscher_reactions', '2017-06-01', 1), ('Adjadja', '2018-02-01', 45), ('Afghanistan_from_Ahmad_Shah_until_Dost_Mohammed', '2016-06-01', 3), ('Catholic_social_doctrine', '2017-01-01', 6), ('2833_BC', '2016-11-01', 1), ('Bethy_Woodward', '2016-04-01', 38), ('Bateman_polynomials', '2017-06-01', 22), ('1966_Buenos_Aires_Grand_Prix', '2015-10-01', 19), ('A_River_Somewhere', '2015-10-01', 353), ('2016-17_BVIFA_National_Football_League', '2017-04-01', 2), ('1909_Major_League_Baseball_season', '2015-10-01', 362), ('1988_Oklahoma_Sooners_football', '2017-11-01', 2), ('2010s_in_Chechen_fashion', '2016-10-01', 1), ('Accademia_Olimpica', '2017-08-01', 17), ('Air_cooling', '2015-07-01', 2010), ('Amir_Saoud', '2016-11-01', 22), ('Alex_Auburn', '2015-05-01', 52), ('Apamea_impulsa', '2016-11-01', 6), ('Australian_federal_election,_2007', '2015-07-01', 1794), ('Ain_Sakhri', '2017-10-01', 76), ('Belosaepiidae', '2015-07-01', 68), ('Acts_of_Parliament_in_the_United_Kingdom', '2017-10-01', 4070), ('Equity_Office', '2016-11-01', 202), ('David_Bintley', '2017-01-01', 51), ('Aksel_Schiotz', '2018-03-01', 3), ('Appropriation_Act_2000', '2017-05-01', 12), ('Edward_Johnson_III', '2016-11-01', 491), ('2006_Ohio_State_Buckeyes_football_team', '2016-03-01', 1452), ('Battle_of_Fort_Beausejour', '2015-07-01', 97), ('Abel_Foullon', '2015-12-01', 82), ('Apollo_VIII', '2015-10-01', 19), ('Carry_on_up_the_jungle', '2015-07-01', 8), ('Armour_villa', '2017-05-01', 4), ('201_Poplar', '2015-08-01', 265), ('Arta_prefecture', '2016-08-01', 1), ('2015-16_Ekstraklasa', '2018-02-01', 13), ('Alport,_Ontario', '2018-02-01', 2), ('Bongoland', '2017-06-01', 62), ('Alfred_Charles_Post', '2016-11-01', 11), ('Aam_Aadmi_Party_crisis', '2016-10-01', 1), ('Andrea_Moda', '2015-07-01', 143), ('Abdul_Halim_Sharar', '2017-08-01', 545), ('Apostolic_Vicariate_of_Yunnan', '2016-12-01', 1), ('Catherine_Steadman', '2016-11-01', 5218), ('Agastachys_odorata', '2015-10-01', 38), ('9783_Tensho-kan', '2016-03-01', 2), ('AFL_Cairns', '2017-10-01', 337), ('Abomey', '2015-06-01', 1062), ('Anne_Crofton,_1st_Baroness_Crofton', '2015-12-01', 42), ('Cash-flow_return_on_investment', '2017-01-01', 137), ('Alberto_Arvelo_Torrealba_Municipality', '2015-08-01', 56), ('Abyssinian_Shorthorned_Zebu', '2017-09-01', 124), ('Albanian_hip_hop', '2016-01-01', 1812), ('Alphonso_IV_of_Portugal', '2016-02-01', 12), ('19th_The_Alberta_Mounted_Rifles', '2016-10-01', 1), ('Chinese_shadow_theatre', '2016-04-01', 1), ('American_Committee_of_the_Fourth_International', '2017-08-01', 4), ('2014_Bahrain_GP2_Series_round', '2016-03-01', 80), ('Alexandrian_orthodox', '2017-09-01', 2), ('2010_Hurricane_Season', '2015-05-01', 18), ('1938_All-Ireland_Senior_Camogie_Championship_Final', '2017-01-01', 1), ('ATC_code_D01', '2018-01-01', 203), ('Albedo', '2015-08-01', 23484), ('Chavigny,_Meurthe-et-Moselle', '2017-01-01', 12), ('Becky_Essex', '2015-07-01', 51), ('Archaeological_Museum_Padre_Le_Paige', '2018-02-01', 2), ('Abu_Bakar_Sillah', '2017-01-01', 5), ('Back_chat', '2017-01-01', 2), ('Anchylobela_dyseimata', '2015-12-01', 11), ('Anthony_Overton', '2017-03-01', 261), ('Bear_maul', '2016-04-01', 3), ('Ambarawa,_Central_Java', '2016-01-01', 1), ('Amber_lager', '2016-11-01', 87), ('2nd_LAAD', '2017-09-01', 8), ('Ashiya,_Hyogo', '2018-03-01', 24), ('Angels_at_Risk', '2018-02-01', 74), ('Audrey_Marie_Munson', '2016-03-01', 17), ('1984_Australian_Football_Championships', '2017-01-01', 27), ('Ammonia_fountain', '2016-06-01', 434), ('Allister_Bentley', '2018-03-01', 11), ('Alsager_Hay_Hill', '2016-10-01', 72), ('1753_English_cricket_season', '2015-05-01', 51), ('2009-10_New_Jersey_Devils_season', '2016-10-01', 1), ('An_Untamed_State', '2016-05-01', 1109), ('Beatrice_Carmichael', '2016-11-01', 5), ('Abdul_Ghani_Ahmad', '2017-12-01', 115), ('Arteria_suralis', '2017-02-01', 3), ('Berzasca_River', '2017-01-01', 1), ('Angel_Attack', '2015-09-01', 98), ('1969_San_Francisco_49ers_football_team', '2017-11-01', 1), ('Anthony_Beilenson', '2017-09-01', 114), ('Crystalline_Entity', '2016-04-01', 180), ('Granice', '2017-01-01', 2), ('203rd_General_Hospital', '2017-07-01', 44), ('Acrocercops_rhombiferellum', '2017-12-01', 20), ('Ampliglossum_blanchetii', '2017-05-01', 1), ('11553_Scheria', '2017-03-01', 2), ('Ashkenozi', '2017-02-01', 1), ('2010_Calder_Cup_Playoffs', '2018-01-01', 9), ('Alice_Caymmi', '2016-01-01', 121), ('Alfredo_Alvar', '2017-04-01', 44), ('2006_Legends_Tour', '2017-07-01', 30), ('Albano_Albanese', '2015-10-01', 53), ('1943_Frankford_Junction_train_wreck', '2016-08-01', 510), ('Evans_Court_Apartment_Building', '2016-04-01', 4), ('Abu_al-Rayhan_Muhammad_ibn_al-Biruni', '2017-11-01', 1), ('Abubakar_Muhammad_Rimi', '2015-05-01', 4), ('Dostpur', '2016-11-01', 26), ('Accessories_Council_Excellence_Awards', '2016-03-01', 14), ('2006_North_American_heat_wave', '2015-06-01', 1161), ('Amstelodamum', '2017-09-01', 12), ('A_Very_Peculiar_Practice', '2016-08-01', 1860), ('Allegorie_der_Liebe', '2015-09-01', 1), ('Alex_Mackie', '2017-02-01', 95), ('1812_Homestead_Farm_and_Museum', '2017-09-01', 29), ('Argus_distribution', '2016-03-01', 8), ('Anthony_Thomas_Stover', '2017-02-01', 1), ('Arthur_Shallcross', '2016-11-01', 20), ('Antoine_Francois_Fourcroy', '2018-01-01', 1), ('Abbas_Halim', '2016-11-01', 21), ('Akiva_Baer_ben_Joseph', '2017-08-01', 1), ('Balatonfuered', '2016-11-01', 3), ('Antemnae', '2017-11-01', 204), ('Cling_Cling', '2017-06-01', 93), ('B_flat_major', '2017-01-01', 28), ('AirExplore', '2017-12-01', 930), ('Auckland_Super_Sprint', '2015-11-01', 120), ('Alfredo_De_Gasperis', '2017-12-01', 793), ('Geoffrey_I_of_Vianden', '2017-01-01', 5), ('Copa_de_Zaachila', '2016-04-01', 6), ('Alboacen', '2017-09-01', 1), ('BNH_Hospital_Bangkok', '2017-06-01', 2), ('Agricultural_health_and_safety', '2016-09-01', 1), ('Chiasms', '2017-06-01', 2), ('Al_Karaana', '2016-05-01', 58), ('Alberta_Highway_872', '2016-11-01', 1), ('Among_the_mourners', '2016-03-01', 1), ('Achema_Power_Plant', '2015-06-01', 55), ('ATSE_Graz', '2017-10-01', 65), ('Arthroscopy', '2017-02-01', 11721), ('2010-2012_European_Nations_Cup_Second_Division', '2018-01-01', 7), ('1967_Cincinnati_Reds', '2015-08-01', 4), ('24th_Golden_Disc_Awards', '2017-05-01', 71), ('Johnny_Floyd', '2017-01-01', 17), ('Arthur_Rupin', '2016-02-01', 5), ('Alpine_skiing_at_the_2011_Canada_Winter_Games', '2015-09-01', 38), ('College_Press_Service', '2017-01-01', 8), ('American_Psycho', '2015-08-01', 55567), ('CBC_Winnipeg', '2017-06-01', 17), ('Burning_the_process', '2016-04-01', 1), ('2011_Stanley_Cup_playoffs', '2017-01-01', 1036), ('Andrew_Mumford', '2017-01-01', 6), ('1925_in_fine_arts_of_the_Soviet_Union', '2018-02-01', 28), ('Aragvi_river', '2017-02-01', 2), ('Andrew_Adamson', '2018-03-01', 16269), ('Arcides_fulvohirta', '2016-10-01', 1), ('Araya_Selassie_Yohannes', '2015-11-01', 423), ('Apartment_house', '2016-09-01', 85), ('Advanced_Art', '2015-12-01', 171), ('1028_Lydina', '2015-06-01', 53), ('2005_July_6_United_Nations_assault_on_Cite_Soleil,_Haiti', '2017-04-01', 2), ('Adolph_Weiss', '2015-06-01', 98), ('Adam_Jerzy_Czartoryski', '2015-09-01', 1237), ('1980_United_States_presidential_election', '2017-05-01', 56), ('1956_Oscars', '2016-08-01', 10), ('Burundian_Senate_election,_2005', '2016-04-01', 1), ('Amarolea_floridana', '2015-07-01', 3), ('August_Bier', '2015-12-01', 514), ('Arbelodes_sebelensis', '2018-03-01', 6), ('Abiah_Brown', '2018-02-01', 1), ('A_Maceo_Smith_High_School', '2016-10-01', 2), ('1488_in_architecture', '2017-12-01', 6), ('2009_AMP_Energy_500', '2016-04-01', 45), ('1921_Baylor_Bears_football_team', '2017-03-01', 21), ('Dmitry_Akhba', '2015-07-01', 43), ('2004_Big_12_Conference_Baseball_Tournament', '2016-07-01', 37), ('Abdisalam_Omer', '2018-02-01', 116), ('Alma,_son_of_Alma', '2015-08-01', 53), ('An_Phoblacht', '2016-10-01', 962), ('2009_Turner_Prize', '2016-01-01', 75), ('Jack_Zajac', '2017-01-01', 24), ('1906_Wimbledon_Championships', '2016-04-01', 22), ('Chuckwalla_Valley', '2017-06-01', 22), ('Alien_Quadrology', '2016-02-01', 1), ('Chalcidoptera_contraria', '2016-04-01', 1), ('Alaska_Republican_Gubernatorial_Primary_Election,_2006', '2016-02-01', 1), ('333639_Yaima', '2018-02-01', 7), ('Aquila_hastata', '2015-11-01', 28), ('Al-Fua', '2017-07-01', 1), ('Anihilation', '2015-07-01', 28), ('International_Toy_Fair', '2017-01-01', 1), ('38th_Regiment_Indiana_Infantry', '2017-01-01', 10), ('Andrea_Stella', '2017-07-01', 75), ('Anselmo_de_Moraes', '2015-09-01', 562), ('Applemore', '2016-05-01', 3), ('Akpinar,_Kirsehir', '2015-06-01', 3), ('Ant_nest', '2016-05-01', 53), ('Catherine_of_Siena', '2016-11-01', 8806), ('Barbos', '2015-06-01', 12), ('Amlaib_mac_Iduilb', '2017-08-01', 2), ('Alice_Janowski', '2018-03-01', 17), ('Acacia_leptocarpa', '2017-03-01', 48), ('Al-Hadi_Yahya', '2016-01-01', 39), ('2015_British_Figure_Skating_Championships', '2017-07-01', 38), ('Avenues_Television', '2016-03-01', 214), ('Dendropsophus_sartori', '2015-07-01', 11), ('1952_in_Germany', '2015-05-01', 63), ('Armuchee_High_School', '2016-04-01', 27), ('April_1_RFC', '2017-11-01', 2), ('Caroline_Bliss', '2016-11-01', 972), ('66th_Rice_Bowl', '2016-06-01', 17), ('Alec_Smight', '2017-02-01', 173), ('Alexei_Panin', '2017-09-01', 3), ('Codeword', '2016-04-01', 84), ('Dormice', '2015-07-01', 63), ('2105_BC', '2017-11-01', 6), ('5th_National_Congress_of_Kuomintang', '2016-06-01', 5), ('Caminho_das_Indias', '2017-01-01', 5), ('Agerbo', '2017-11-01', 2), ('Abe_Anellis', '2018-01-01', 86), ('Aceh_Medal', '2015-07-01', 33), ('Alltech_Arena', '2016-10-01', 144), ('Aly_Oury', '2016-06-01', 260), ('757th_Troop_Carrier_Squadron', '2017-07-01', 2), ('Alec_Peters', '2017-12-01', 2731), ('Agua_Buena_Airport', '2017-09-01', 12), ('Alessandro_Livi', '2016-08-01', 104), ('Andkaer', '2017-04-01', 3), ('Cateran', '2017-06-01', 135), ('57th_Venice_International_Film_Festival', '2017-04-01', 180), ('Brijal_Patel', '2017-06-01', 98), ('Cnemaspis_jerdonii', '2015-07-01', 6), ('Aluminum_sodium_salt', '2016-10-01', 3), ('Arnaldo_Antonio_Sanabria_Ayala', '2017-09-01', 4), ('Angels_of_Iron', '2018-02-01', 83), ('Bugs_Bunny_Rabbit_Rampage', '2017-06-01', 422), ('Admiralty_Class_Destroyer', '2017-10-01', 2), ('Atlas_Media', '2017-05-01', 2), ('Arcesilaus_i_of_cyrene', '2017-03-01', 1), ('2011_Tajikistan_national_football_team_results', '2017-04-01', 13), ('Artur_Shakhnazarov', '2017-12-01', 22), ('747_Express_Bus', '2018-03-01', 20), ('101-in-1_Party_Megamix', '2017-10-01', 188), ('Fastpoint_Games', '2016-11-01', 32), ('Analog_Anthology_1', '2017-07-01', 1), ('Archival_bond', '2015-09-01', 119), ('1985_Air_Force_Falcons_football', '2017-09-01', 4), ('American_Airlines_plane_diverted_to_Miami_after_landing_gear_problem', '2017-06-01', 3), ('Adaptive_Evolution_in_the_Human_Genome', '2017-08-01', 2), ('Arthur_Strangways', '2015-11-01', 5), ('1583_in_poetry', '2015-09-01', 68), ('Andrew_igoudala', '2015-06-01', 2), ('Euonychophora', '2016-11-01', 37), ('Catechizing', '2016-04-01', 4), ('1960-61_ice_hockey_Bundesliga_season', '2018-03-01', 3), ('Buk_Vlaka', '2017-06-01', 10), ('Arbor_Day', '2018-03-01', 16265), ('Guan_Sheng', '2017-01-01', 73), ('2014_Barcelona_Open_Banc_Sabadell', '2016-08-01', 57), ('1976-77_Nationalliga_A', '2016-04-01', 1), ('AFL_records', '2015-11-01', 16), ('2005_Tour_Down_Under', '2016-10-01', 26), ('92_BCE', '2015-08-01', 4), ('Bento_Box_Animation', '2017-01-01', 1), ('Alabama_Territory', '2018-03-01', 1195), ('Abdul-Wasa_Al-Saqqaf', '2016-07-01', 21), ('Archbishops_of_Semarang', '2017-01-01', 6), ('Ambivina', '2017-10-01', 13), ('Aghjaghala_Ulia', '2017-08-01', 2), ('Blechnum_novae-zelandiae', '2016-11-01', 26), ('Dictyosome', '2016-04-01', 19), ('Arts_Council_of_Great_Britain', '2016-12-01', 785), ('LBC_Radio', '2017-01-01', 3), ('Ageo,_Saitama', '2016-06-01', 396), ('Babla_Mehta', '2016-12-01', 674), ('2012-13_Russian_Cup', '2018-01-01', 10), ('Chandragupt', '2017-06-01', 6), ('407th_Air_Refueling_Squadron', '2016-01-01', 96), ('Aftermarket', '2016-07-01', 1253), ('A_Portrait_of_New_Orleans', '2016-08-01', 18), ('2000-01_Yemeni_League', '2017-03-01', 1), ('Actinidia_chinensis', '2015-11-01', 907), ('Amsterdam_Tournament_1999', '2018-03-01', 1), ('Arthur_Iberall', '2017-02-01', 112), ('Auricula_Meretricula', '2016-02-01', 103), ('Archbishop_of_Lahore', '2016-09-01', 8), ('Chippewa_Indians_of_Montana', '2016-04-01', 9), ('Abidjan-Niger_Railway', '2018-01-01', 22), ('29th_Annual_Grammy_Awards', '2017-05-01', 1087), ('Ateles_geoffroyi_frontatus', '2017-06-01', 3), ('Enrico_Cernuschi', '2016-11-01', 3), ('A4183_road', '2017-02-01', 8), ('Ahrayut', '2016-10-01', 75), ('Alison_Castle', '2016-03-01', 55), ('Automobile_aftermarket', '2016-10-01', 5), ('2008_GAINSCO_Auto_Insurance_Indy_300', '2016-07-01', 51), ('1937_Scottish_Cup_Final', '2017-04-01', 126), ('2005_Clipsal_500_Adelaide', '2018-02-01', 22), ('Farid_Farjad', '2016-04-01', 120), ('13_Tribes_of_Long_Island', '2015-12-01', 11), ('Afroneta_bamilekei', '2017-01-01', 2), ('Frederick_Stuart_Greene', '2017-01-01', 1), ('Andre_Braugher', '2017-04-01', 37655), ('1906_International_Lawn_Tennis_Challenge', '2017-10-01', 73), ('2009-10_NFL_Playoffs', '2016-01-01', 69), ('Cricket_Wellington', '2016-11-01', 2), ('Craig_Blazer', '2015-07-01', 21), ('Aeolidiella_orientalis', '2017-05-01', 3), ('Andre_Prokovsky', '2017-06-01', 4), ('Angela_McKee', '2017-11-01', 14), ('Airbase_Golubovci', '2016-10-01', 1), ('2011_ISAF_Sailing_World_Championships', '2017-05-01', 89), ('Bartica_Airport', '2017-06-01', 27), ('Agusan_Dam', '2016-09-01', 454), ('Bosque_Real_Country_Club', '2015-07-01', 42), ('Georges_Duhamel', '2017-01-01', 122), ('Allrounder', '2017-03-01', 63), ('2017_Missouri_State_Bears_football_team', '2017-09-01', 868), ('Allons_a_Lafayette', '2017-11-01', 17), ('Agathla', '2015-05-01', 105), ('1086_in_poetry', '2015-09-01', 25), ('Absolute_extreme', '2017-09-01', 1), ('Agathe_Bonitzer', '2017-12-01', 229), ('Chinese_Red_Pine', '2017-06-01', 18), ('Angular_dispersion', '2016-02-01', 11), ('Jean-Sebastian_Giguere', '2017-01-01', 2), ('Actinium-235', '2018-03-01', 4), ('Ago,_filo_e_nodo', '2017-02-01', 11), ('Aranea_cruentata', '2016-03-01', 1), ('2009_Korea_National_League', '2017-11-01', 19), ('Americom-8', '2016-08-01', 28), ('2006_Junee_Bushfire', '2018-03-01', 81), ('2013_Major_League_Baseball_Home_Run_Derby', '2017-09-01', 182), ('1928_US_Presidential_Election', '2016-12-01', 42), ('After-eighty_generation', '2016-02-01', 127), ('1932_Hawthorn_Football_Club_season', '2017-07-01', 16), ('Amelia_Elizabeth_Mary_Rygate', '2017-05-01', 2), ('Aline_Khalaf', '2017-12-01', 465), ('Akron_Junction,_New_York', '2017-07-01', 56), ('Apollo_moon_landing_conspiracy_theories', '2015-09-01', 4), ('1978_National_League_Championship_Series', '2017-03-01', 325), ('1959-60_German_football_championship', '2017-08-01', 5), ('Almost_a_Bride', '2017-01-01', 1), ('Andrew_Lysaght,_junior', '2015-10-01', 20), ('1902_Otani_expedition', '2018-02-01', 1), ('1892_Currie_Cup', '2016-09-01', 53), ('1988_USC_Trojans_football_team', '2016-10-01', 494), ('1944_in_Northern_Ireland', '2016-12-01', 46), ('Alfred_Acherman', '2017-07-01', 1), ('Arcadia,_Nebraska', '2017-02-01', 148), ('4_x_400_metre_relay', '2018-03-01', 1), ('A4030_road', '2016-07-01', 1), ('Chi-li', '2016-11-01', 3), ('Aircraft_fairing', '2016-11-01', 1861), ('Buddhism_in_Belize', '2015-07-01', 40), ('Alameda_County_Open', '2017-02-01', 33), ('Area_of_countries_and_regions_of_the_United_Kingdom', '2017-10-01', 6), ('2014_Weber_State_Wildcats_football_team', '2016-10-01', 47), ('American_Journal_of_Comparative_Law', '2016-04-01', 62), ('A_Teaspoon_Every_Four_Hours', '2017-03-01', 47), ('Astasis', '2016-03-01', 1195), ('Akhrakouaeronon', '2015-11-01', 62), ('Annenkrone', '2016-03-01', 40), ('Ballotine', '2016-12-01', 4753), ('2000_Kipawa_earthquake', '2015-11-01', 139), ('Archdiocese_of_cashel_and_emly', '2017-01-01', 1), ('Chevrolet_SS396', '2017-01-01', 1), ('Achyroseris', '2016-03-01', 1), ('Daniel_Pulteney', '2016-11-01', 29), ('2006_Major_League_Baseball_draft', '2017-07-01', 10637), ('Adetunji_Idowu_Olurin', '2016-01-01', 37), ('Ardatov,_Nizhny_Novgorod_Oblast', '2017-04-01', 18), ('Andrew_Hilditch', '2015-08-01', 398), ('A_Very_Merry_Daughter_Of_the_Bride', '2017-04-01', 67), ('1993_in_radio', '2017-08-01', 85), ('Deltan', '2016-11-01', 91), ('Adnan_Custovic', '2017-12-01', 26), ('Di_Gennaro', '2017-01-01', 4), ('237_AD', '2017-11-01', 1), ('Aaron_Gombar', '2018-03-01', 2), ('Acrolophus', '2017-04-01', 47), ('Alfred_Bergman', '2017-06-01', 27), ('Charles_Bebb', '2017-06-01', 39), ('Dirico', '2017-01-01', 24), ('1982_Major_League_Baseball_Draft', '2016-12-01', 90), ('DDT_wrestling', '2016-11-01', 4), ('1988-89_Houston_Rockets_season', '2016-02-01', 10), ('Acacia_loderi', '2015-11-01', 35), ('2015_Deauville_American_Film_Festival', '2016-10-01', 126), ('Andropadus_importunus', '2016-02-01', 9), ('Antonio_Bacchetti', '2017-04-01', 52), ('Ann_Trindade', '2015-09-01', 49), ('5_x_Monk_5_x_Lacy', '2016-05-01', 37), ('Barlochan,_Ontario', '2017-06-01', 2), ('Achaian', '2017-03-01', 35), ('Flow_rider', '2017-01-01', 1), ('Antiblemma_discerpta', '2018-02-01', 1), ('1997_Illinois_Fighting_Illini_football_team', '2017-11-01', 331), ('Ahrntal', '2016-03-01', 540), ('Apollo_Conference', '2015-10-01', 329), ('Algenib_in_Perseus', '2016-01-01', 1), ('Craig_Norgate', '2016-04-01', 42), ('Antwerp_Zoo', '2015-12-01', 879), ('Cold_Contagious', '2017-06-01', 161), ('Bolito', '2016-11-01', 181), ('Chinese_bridges', '2016-11-01', 1), ('14th_Indiana_Infantry_Regiment', '2017-04-01', 115), ('Bindunuwewa_massacre', '2015-07-01', 52), ('Eastshore_Highway', '2016-11-01', 2), ('Daemonologie', '2017-01-01', 1655), ('Aero_Pacifico', '2015-07-01', 1), ('Blue_Ribbon_Schools_Program', '2017-06-01', 557), ('Ash_Township,_MI', '2018-02-01', 3), ('Al-Hatab_Square', '2018-02-01', 450), ('Alje_Vennema', '2018-02-01', 187), ('1920_All-Ireland_Senior_Football_Championship_Final', '2016-05-01', 40), ('Criss_Oliva', '2016-11-01', 801), ('Bethlehem,_Ohio', '2017-01-01', 16), ('1976_WHA_Amateur_Draft', '2015-08-01', 47), ('Angela_Fimmano', '2017-06-01', 17), ('Alexander_Bonini_of_Alexandria', '2017-09-01', 1), ('Anarchist_faq', '2015-05-01', 13), ('Aleksander_Benedykt_Sobieski', '2016-05-01', 240), ('Cape_Florida_Lighthouse', '2016-04-01', 6), ('Fernando_VI_of_Spain', '2017-01-01', 3), ('Crossing_number', '2017-06-01', 29), ('1984_NSL_Cup', '2017-05-01', 26), ('Barbara_Weldon', '2015-06-01', 29), ('Andreas_Olsen', '2017-01-01', 32), ('Battle_of_Baima', '2016-04-01', 2), ('Amory_Hansen', '2016-05-01', 26), ('Akhmimic', '2015-11-01', 41), ('Al_Awda', '2018-02-01', 18), ('Adelheid-Marie_of_Anhalt-Dessau', '2016-07-01', 70), ('Americans_for_Technology_Leadership', '2015-10-01', 90), ('Belizean_diplomatic_missions', '2017-06-01', 3), ('African_communist', '2016-05-01', 3), ('Andosol', '2016-09-01', 246), ('Alan_Attraction', '2016-05-01', 15), ('A_Yank_in_Rome', '2015-12-01', 70), ('2004_in_the_United_Arab_Emirates', '2018-02-01', 33), ('Additionality', '2017-06-01', 371), ('Assassination_of_Trotsky', '2015-06-01', 47), ('Alice_Sotero', '2018-02-01', 27), ('Agyneta_platnicki', '2016-04-01', 4), ('Alexandra_Vasilyevna_Velyaminova', '2015-07-01', 30), ('1881_in_Chile', '2016-06-01', 16), ('Arterial_ischemic_stroke', '2018-01-01', 57), ('Astro_Glacier', '2015-09-01', 27), ('Chester_Earl_Merrow', '2017-06-01', 58), ('Alejandro_de_la_Madrid', '2015-11-01', 1630), ('70936_Kamen', '2017-08-01', 1), ('AK_Steel_Holding_Corp', '2015-08-01', 8), ('1124_Stroobantia', '2017-10-01', 23), ('Asian_Wedding', '2016-10-01', 15), ('23837_Matthewnanni', '2015-10-01', 18), ('Acharya_Jagadish_Chandra_Bose_Indian_Botanic_Garden', '2017-03-01', 4893), ('Betsy_Hodges', '2016-04-01', 560), ('Arthur_and_the_Invisibles', '2015-08-01', 14924), ('Arkansas-Ole_Miss_football_rivalry', '2015-05-01', 7), ('Asia_Cup', '2015-09-01', 5938), ('Arginine_racemase', '2016-12-01', 15), ('585th_Field_Company,_Royal_Engineers', '2018-03-01', 1), ('1975_Stagg_Bowl', '2017-08-01', 6), ('Dame_Commander_of_The_Most_Honourable_Order_of_the_Bath', '2017-01-01', 1), ('Askajian', '2016-02-01', 26), ('2006_Nebraska_Cornhuskers_football_team', '2015-08-01', 975), ('Cicero_Francis_Lowe_House', '2015-07-01', 10), ('Conan_IV,_Duke_of_Brittany', '2016-11-01', 252), ('2005_World_Modern_Pentathlon_Championships', '2016-07-01', 38), ('1946_Aleutian_Islands_earthquake', '2017-03-01', 2019), ('ANKRD17', '2017-09-01', 19), ('1970_Maryland_Terrapins_football_team', '2017-11-01', 42), ('Ali_Dehkhoda', '2017-04-01', 1), ('1244_in_art', '2015-07-01', 22), ('1520s_in_Denmark', '2016-01-01', 20), ('Abdoulaye_Gaye', '2017-12-01', 10), ('An_Angel_Has_Arrived', '2016-03-01', 36), ('1453_BC', '2015-08-01', 26), ('2017_National_Games_of_China', '2017-05-01', 1293), ('A_Night_in_Sickbay', '2016-05-01', 251), ('Dateline_Diamonds', '2017-01-01', 53), ('419_guestbook_spamming', '2016-02-01', 5), ('Familiar_bluet', '2017-01-01', 4), ('Abu_Bakr_Mirza', '2017-10-01', 86), ('7272_Darbydyar', '2017-11-01', 4), ('Ages_of_consent_in_Latin_America', '2017-03-01', 961), ('1982_Japan_Soccer_League_Cup', '2016-04-01', 14), ('2810_BC', '2015-07-01', 9), ('Druga_Liga_Republike_Srpske', '2017-01-01', 1), ('1998_Swedish_Rally', '2017-09-01', 34), ('1567_in_Norway', '2015-10-01', 89), ('126_Army_Engineer_Regiment,_Royal_Engineers', '2016-03-01', 5), ('2017_American_League_Wild_Card_Game', '2017-10-01', 25120), ('August_Follen', '2017-01-01', 2), ('Ala_Gertner', '2015-11-01', 876), ('Glenwood,_Harford_County,_Maryland', '2017-01-01', 3), ('Applied_ecology', '2017-12-01', 730), ('Ariarathes_V_Eusebes_Philopator', '2018-03-01', 5), ('2006_AFC_Champions_League', '2017-09-01', 947), ('60_minutes_2', '2016-10-01', 2), ('Embryonic_shield', '2017-01-01', 2), ('2001_Meath_Intermediate_Football_Championship', '2015-11-01', 8), ('Apparition_of_Christ_to_Madonna', '2017-06-01', 5), ('Hoosier_Road_Elementary', '2017-01-01', 1), ('Arua_Uda', '2016-12-01', 29), ('Array_comprehension', '2015-11-01', 8), ('Baszki', '2015-06-01', 36), ('Akron_Neighborhoods', '2016-01-01', 4), ('Catholic_Church_in_Costa_Rica', '2017-06-01', 85), ('Canada-Sweden_relations', '2015-07-01', 1), ('Barza_Radio_Community', '2016-11-01', 6), ('Dalhousie_Middle_School', '2016-11-01', 5), ('Alliphis_bakeri', '2017-11-01', 2), ('Bartica_massacre', '2017-06-01', 53), ('30th_January', '2015-11-01', 10), ('1920_revolution', '2017-05-01', 5), ('Amyraldism', '2017-08-01', 828), ('AA_Jefferson_District', '2016-05-01', 45), ('Eunebristis_cinclidias', '2017-01-01', 1), ('A_Scott_Connelly', '2017-06-01', 5), ('Antony_Durose', '2016-07-01', 19), ('Arval_Brethren', '2017-11-01', 579), ('Anthidium_dissectum', '2017-05-01', 2), ('Aru,_Democratic_Republic_of_the_Congo', '2017-04-01', 81), ('1956-57_West_Indian_cricket_season', '2017-04-01', 2), ('2014_Moscow_Film_Festival', '2017-08-01', 2), ('Anna_Gurji', '2017-06-01', 27), ('Allen_Memorial_Medical_Library', '2016-07-01', 120), ('Anton_Sistermans', '2017-02-01', 36), ('Clotheshorses', '2017-06-01', 1), ('36_Stratagems', '2017-08-01', 25), ('Attack_of_the_crab_monsters', '2016-10-01', 16), ('30_rock_awards', '2015-09-01', 2), ('Aeroflot,_Uralsk_Civil_Aviation_Directorate', '2017-08-01', 2), ('Amblyseius_parabufortus', '2017-06-01', 3), ('Indian_coral_tree', '2017-01-01', 3), ('3285_Ruth_Wolfe', '2016-02-01', 9), ('Anderson_da_Silva_Gibin', '2016-08-01', 73), ('5001st_Composite_Group', '2017-03-01', 4), ('Danzik', '2016-04-01', 8), ('4810_Ruslanova', '2016-03-01', 2), ('Arkendale,_Virginia', '2016-04-01', 14), ('Al_Francis_Bichara', '2016-09-01', 239), ('Cayena', '2017-01-01', 1), ('A_Glass_of_Darkness', '2017-04-01', 95), ('GMC_CCKW', '2017-01-01', 887), ('Alabama_State_Route_107', '2015-11-01', 13), ('2011_in_motorsport', '2017-12-01', 26), ('Adecco_General_Staffing,_New_Zealand', '2017-12-01', 86), ('Anbargah', '2015-10-01', 6), ('1995_Asian_Cup_Winners_Cup', '2016-06-01', 7), ('1986_Wales_rugby_union_tour_of_the_South_Pacific', '2016-12-01', 30), ('Adya_Goud_Brahmin', '2017-03-01', 2), ('Akcakiraz', '2015-08-01', 5), ('24249_Bobbiolson', '2017-12-01', 4), ('Ahmanson_Theatre', '2016-02-01', 801), ('Abdullah_ibn_Jahsh', '2016-10-01', 196), ('1937_in_Chile', '2015-08-01', 24), ('2000_in_England', '2016-01-01', 57), ('A_Deepness_In_The_Sky', '2017-08-01', 2), ('Area_code_678', '2015-07-01', 480), ('Avalon_Hill', '2017-01-01', 880), ('Anna,_Duchess_of_Prussia', '2015-12-01', 315), ('Alexandr_Syman', '2017-04-01', 24), ('7400_series_logic', '2017-11-01', 2), ('Greenleaf_Township,_Minnesota', '2017-01-01', 1), ('Acetylsal', '2017-04-01', 6), ('Earth_and_Man_National_Museum', '2016-11-01', 43), ('Affetside', '2015-10-01', 185), ('1971_CFL_season', '2015-08-01', 202), ('Beth_Bader', '2016-11-01', 21), ('Enrolled_Nurse', '2016-04-01', 5), ('Al-Azraq', '2016-12-01', 22), ('4th_South_Carolina_Regiment', '2015-07-01', 42), ('Amanda_Overmyer', '2017-02-01', 356), ('Auto_wrap', '2016-02-01', 8), ('Anonymous_internet_banking', '2015-07-01', 98), ('Curatoria', '2016-11-01', 3), ('A-roll', '2016-05-01', 134), ('Accra_hearts_of_oak_sc', '2017-10-01', 4), ('Apostasy_from_Judaism', '2015-12-01', 45), ('Acantharctia_tenebrosa', '2018-01-01', 3), ('Abigail_Keasey_Frankel', '2017-11-01', 25), ('2008_Paraguayan_general_election', '2016-01-01', 1), ('Adams_motor', '2015-09-01', 37), ('Drummond_Community_High_School', '2017-01-01', 17), ('Andrews_Nakahara', '2017-10-01', 474), ('10th_Maccabiah', '2017-04-01', 30), ('Ackerman,_Rick', '2015-08-01', 4), ('Dumri,_Buxar', '2016-11-01', 35), ('Asking_Jesus_into_your_heart', '2016-09-01', 1), ('Adamowicz_brothers', '2016-12-01', 161), ('Alien_Musibat', '2017-12-01', 2), ('Ahmad_Al_Tayer', '2016-04-01', 39), ('Analytical_phonics', '2016-01-01', 520), ('Do_It_Good', '2016-04-01', 281), ('2004_Kumbakonam_School_fire', '2017-12-01', 2114), ('1977_Chattanooga_Mocs_football_team', '2016-08-01', 3), ('Globe_valves', '2017-01-01', 11), ('Abelmoschus_crinitus', '2016-04-01', 18), ('1874_Yale_Bulldogs_football_team', '2016-02-01', 37), ('Climer', '2017-06-01', 1), ('Auchroisk', '2017-06-01', 37), ('2010_Albirex_Niigata_season', '2016-10-01', 19), ('Adhocracy', '2017-06-01', 2217), ('Chios_Massacre', '2015-07-01', 1110), ('African_Red_Slip', '2017-02-01', 221), ('1976_Portland_Timbers_season', '2016-07-01', 41), ('Alsace-Larraine', '2015-09-01', 2), ('3750_Ilizarov', '2017-07-01', 12), ('Aleksandr_Shkaev', '2017-05-01', 1), ('32_bar_form', '2016-01-01', 12), ('Aequatorium_jamesonii', '2018-03-01', 14), ('Abade_neiva', '2016-09-01', 2), ('Arakvaz', '2016-08-01', 23), ('207_Sqn', '2017-10-01', 2), ('Ducal_hat', '2016-11-01', 10), ('2_Degrees', '2017-03-01', 19), ('Ahmeddiyya_Islam', '2016-03-01', 4), ('Amidi-ye_Kohneh', '2017-11-01', 13), ('Contributions_to_Indian_Sociology', '2016-11-01', 42), ('Clark_Leiblee', '2016-04-01', 5), ('Abraham_of_Strathearn', '2017-09-01', 14); diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/export.parquet b/docs/ja/integrations/data-ingestion/data-formats/assets/export.parquet new file mode 100644 index 00000000000..eb83250bfc9 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/data-formats/assets/export.parquet differ diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/html.results b/docs/ja/integrations/data-ingestion/data-formats/assets/html.results new file mode 100644 index 00000000000..fdc03901e52 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/html.results @@ -0,0 +1,14 @@ +

Top 10 IPs

+ + + +${data} +
IPRequests
+ +

Query information

+
+
Rows read
+
${rows_read:Escaped}
+
Time spent
+
${time:Escaped}
+
diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/html.row b/docs/ja/integrations/data-ingestion/data-formats/assets/html.row new file mode 100644 index 00000000000..449fba0b9bc --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/html.row @@ -0,0 +1,4 @@ + + ${ip:Escaped} + ${total:Escaped} + \ No newline at end of file diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/list-nested.json b/docs/ja/integrations/data-ingestion/data-formats/assets/list-nested.json new file mode 100644 index 00000000000..7bf195ba46c --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/list-nested.json @@ -0,0 +1,29 @@ +[ + { + "page": { + "path": "Akiba_Hebrew_Academy", + "title": "Akiba Hebrew Academy", + "owner_id": 12 + }, + "month": "2017-08-01", + "hits": 241 + }, + { + "page": { + "path": "Aegithina_tiphia", + "title": "Aegithina Tiphia", + "owner_id": 3 + }, + "month": "2018-02-01", + "hits": 34 + }, + { + "page": { + "path": "1971-72_Utah_Stars_season", + "title": "Utah Stars: 71/72 season", + "owner_id": 432 + }, + "month": "2016-10-01", + "hits": 1 + } +] diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/list.json b/docs/ja/integrations/data-ingestion/data-formats/assets/list.json new file mode 100644 index 00000000000..7c749a3a7b9 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/list.json @@ -0,0 +1,17 @@ +[ + { + "path": "Akiba_Hebrew_Academy", + "month": "2017-08-01", + "hits": 241 + }, + { + "path": "Aegithina_tiphia", + "month": "2018-02-01", + "hits": 34 + }, + { + "path": "1971-72_Utah_Stars_season", + "month": "2016-10-01", + "hits": 1 + } +] diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/mysql.sql b/docs/ja/integrations/data-ingestion/data-formats/assets/mysql.sql new file mode 100644 index 00000000000..527c20d94d0 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/mysql.sql @@ -0,0 +1,51 @@ +-- MySQL dump 10.13 Distrib 8.0.31, for Linux (x86_64) +-- +-- Host: localhost Database: test +-- ------------------------------------------------------ +-- Server version 8.0.31-0ubuntu0.22.04.1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8mb4 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `some_table` +-- + +DROP TABLE IF EXISTS `some_table`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `some_table` ( + `path` varchar(255) DEFAULT NULL, + `month` date DEFAULT NULL, + `hits` int unsigned DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `some_table` +-- + +LOCK TABLES `some_table` WRITE; +/*!40000 ALTER TABLE `some_table` DISABLE KEYS */; +INSERT INTO `some_table` VALUES ('Bangor_City_Forest','2015-07-01',34),('Alireza_Afzal','2017-02-01',24),('Akhaura-Laksam-Chittagong_Line','2015-09-01',30),('1973_National_500','2017-10-01',80),('Attachment','2017-09-01',1356),('Kellett_Strait','2017-01-01',5),('Ajarani_River','2018-01-01',30),('Akbarabad,_Khomeyn','2017-03-01',8),('Adriaan_Theodoor_Peperzak','2018-02-01',88),('Alucita_dryogramma','2015-09-01',1),('Brit_Med_J','2015-07-01',1),('4th_Metro_Manila_Film_Festival','2015-09-01',80),('Alialujah_Choir','2018-03-01',221),('1953-54_SM-sarja_season','2016-09-01',1),('Air_Force_Song','2018-02-01',19),('4-6_duoprism','2016-03-01',30),('Ashley_Spurlin','2017-06-01',94),('Asfaq_Kayani','2017-10-01',1),('1607_in_architecture','2016-06-01',7),('4-way_speakers','2015-10-01',2),('Blue_Heeler','2015-07-01',149),('5_Euro','2017-04-01',16),('2009_Spa-Francorchamps_GP2_Series_round','2016-04-01',12),('2015_Guru_Granth_Sahib_desecration','2015-11-01',6821),('Agriculture_Marketing_Service','2016-07-01',2),('2006_Football_League_Cup_Final','2015-11-01',1711),('2008_Uber_Cup_group_stage','2016-02-01',40),('1923_PGA_Championship','2016-08-01',97),('Fannie_Bay','2016-04-01',6),('AlchemyAPI','2016-04-01',344),('Cinema_of_Italy','2017-01-01',1217),('Arodes','2016-11-01',36),('Damien_Marley','2015-07-01',168),('Al_Jumayl_Baladiyat','2015-08-01',5),('2015_Alabama_State_Hornets_football_team','2017-06-01',32),('Aglossa_tanya','2016-03-01',1),('73rd_Pennsylvania_Infantry','2017-01-01',12),('2015_European_Junior_and_U23_Canoe_Slalom_Championships','2018-02-01',31),('African_Leopard','2016-08-01',64),('Faverolles,_Orne','2017-01-01',5),('Aaron_Fukuhara','2015-11-01',17),('Annular_ligaments_of_trachea','2017-01-01',31),('2014_US_Open_Series','2016-11-01',35),('A_Better_Mousetrap','2018-02-01',4),('Dibaklu','2016-11-01',1),('At_Samat_District','2015-06-01',35),('Aaron_Peasley','2017-05-01',32),('Apistomology','2015-12-01',2),('Buyat_Bay','2015-07-01',54),('1942_Estonian_Football_Championship','2017-05-01',22),('Action_for_Autism','2016-06-01',346),('100_Hz','2015-06-01',72),('2003_Arizona_State_Sun_Devils_football_team','2017-05-01',82),('Antona_obscura','2016-09-01',1),('Akiko_Sugiyama','2015-12-01',32),('Elysburg','2016-11-01',8),('2017_New_South_Wales_Cup','2017-09-01',38),('2011-12_Gold_Coast_United_FC_season','2017-06-01',1),('Agency_for_the_Prohibition_of_Nuclear_Weapons_in_Latin_America_and_the_Caribbean','2016-04-01',15),('Albert_Dunn','2017-08-01',87),('Hahamakin_ang_Lahat','2017-01-01',984),('2013_Spuyten_Duyvil_derailment','2017-11-01',5),('Ayling','2017-01-01',5),('Anti-Establishment','2016-10-01',1),('1951_Spanish_motorcycle_Grand_Prix','2018-01-01',48),('2009-10_Brunei_Premier_League','2017-08-01',4),('23_Ursae_Majoris','2016-08-01',90),('1927-28_Austrian_football_championship','2017-08-01',4),('Andrew_McKeever','2017-10-01',3),('Clinocottus','2017-06-01',23),('2006_State_of_Origin','2015-11-01',7),('2013-14_Los_Angeles_Clippers_season','2015-07-01',8),('Cor_Jesu','2017-01-01',1),('Besseringen_B-Werk','2017-06-01',158),('Amy_Hempel','2017-07-01',1091),('Franc-Comtois','2016-04-01',2),('Allium_giganteum','2017-07-01',1103),('Abishai','2016-08-01',56),('Abraham_Clark_High_School','2016-04-01',88),('Baku_chronology','2015-06-01',1),('22nd_MEU','2015-10-01',39),('2015_Open_Engie_de_Touraine','2015-10-01',195),('Churchill_Bowl','2017-06-01',30),('AGMARK','2017-08-01',117),('American_standard_wire_gauge','2017-12-01',3),('Araby,_LA','2015-05-01',2),('217_BC','2016-12-01',202),('2008_Trinidad_and_Tobago_League_Cup','2016-02-01',6),('Alazan_Bay','2015-12-01',22),('Aluminum_fencing','2015-11-01',48),('Achilles_tendinitis','2016-10-01',5884),('AFP_Peacekeeping_Operations_Center','2017-01-01',64),('2013_Xinjiang_clashes','2016-01-01',1),('Arborea_Giudicato_of_Arborea','2015-09-01',3),('1941_Cleveland_Rams_season','2017-06-01',40),('Ju_Posht,_Rasht','2017-01-01',3),('Ascalenia','2016-07-01',10),('Aplectoides','2018-02-01',4),('European_Cup_1969-70','2016-11-01',14),('Armen_Mkertchian','2016-05-01',9),('2015_Aspria_Tennis_Cup_-_Singles','2018-02-01',1),('14_August_1947','2017-11-01',6),('Adobe_Creative_Suite_1','2015-05-01',1),('IC_chips','2017-01-01',2),('Austo_AE300','2016-07-01',4),('Date_palms','2015-07-01',79),('BCS_bowl_game','2017-06-01',13),('AR_Border','2017-06-01',1),('Aranda_de_Duero','2016-04-01',256),('1919_Wake_Forest_Demon_Deacons_football_team','2016-01-01',16),('All_The_Wrong_Clues_For_The_Right_Solution','2017-10-01',9),('Allan_Campbell_McLean','2015-06-01',131),('Bradford_Council_election,_2011','2017-06-01',5),('Astronomy_and_astrophysics','2015-09-01',62),('Dutch_Antillean_people','2015-07-01',57),('Army_Radio','2018-03-01',711),('BBVA_Bancomer','2016-11-01',709),('Lake_Aloha','2017-01-01',30),('Andy_Bean','2018-02-01',3092),('1941_Pittsburgh_Steelers_season','2016-05-01',147),('Aniopi_Melidoni','2016-06-01',4),('Aglossosia_fusca','2017-09-01',3),('Art_books','2017-04-01',36),('1929_Washington_Senators_season','2017-04-01',47),('Antaeotricha_congelata','2016-12-01',10),('Douglas_C-54G-5-DO_Skymaster','2017-01-01',1),('Chris_Jamison','2016-11-01',827),('Ace_Blackwell','2015-11-01',9),('Abdul_Qadir_Fitrat','2018-02-01',32),('Arnoldo_Vizcaino','2017-10-01',1),('2012_Open_EuroEnergie_de_Quimper_-_Doubles','2017-12-01',3),('Dale_Rominski','2017-01-01',7),('ADHD_coaching','2015-06-01',50),('Claire_Yiu','2016-11-01',209),('Applicant','2015-10-01',253),('Apache_OpenOffice','2017-06-01',6031),('Abel_Kiprop_Mutai','2015-09-01',22),('Airdrome_Taube','2017-04-01',46),('Andrey_Viktorovich','2016-06-01',1),('American_Idol_controversy','2016-03-01',36),('Anthrenocerus_confertus','2018-01-01',17),('Appraisal_Subcommittee','2018-03-01',17),('Babusa','2015-07-01',3),('500_homeruns','2016-06-01',1),('Argentina_national_volleyball_team','2016-08-01',64),('Chief_prosecutor_of_Russia','2015-07-01',1),('Absolution_DVD','2015-06-01',1),('1,3-Beta-glucan_synthase','2017-05-01',440),('Dave_Sinardet','2016-04-01',26),('Adeline_Whitney','2018-03-01',10),('Allon_shvut','2016-07-01',3),('2012_Penn_State_Nittany_Lions_football_season','2017-12-01',3),('Coleman-Franklin-Cannon_Mill','2017-01-01',4),('Action_director','2015-05-01',93),('AD_547','2016-01-01',1),('Acta_germanica','2017-09-01',1),('Abu_Dhabi_Global_Market_Square','2017-01-01',35),('Kozo_Shioya','2017-01-01',7),('China_Investment_Corp','2017-01-01',2),('Dmitri_Zakharovich_Protopopov','2016-04-01',129),('Anatra_Anadis','2017-10-01',208),('Archaikum','2017-11-01',5),('2000_Webby_Awards','2017-04-01',360),('2003_BCR_Open_Romania_-_Singles','2016-08-01',2),('Abacetus_bisignatus','2016-09-01',79),('American_school_of_kinshasa','2016-01-01',1),('Anna,_7th_Duchess_of_Bedford','2016-08-01',8),('Black_majority_district','2016-11-01',3),('Dagma_Lahlum','2015-07-01',1),('Credit_Saison','2015-07-01',517),('Ariyankuppam_firka','2016-02-01',19),('Annette_Fuentes','2016-06-01',17),('Angerstein,_John','2015-12-01',2),('Annenkov_Island','2016-03-01',280),('Anne_Frank_museum','2016-06-01',67),('Annales_sancti_Amandi','2017-06-01',22),('L-FABP','2017-01-01',1),('Alvord,_TX','2017-06-01',12),('2006_World_Team_Table_Tennis_Championships','2016-05-01',119),('Angriffen','2015-12-01',9),('Anthony_Oppenheimer','2017-03-01',452),('Absamat_Masaliyevich_Masaliyev','2016-09-01',1),('Airborne_Museum_at_Aldershot','2016-03-01',41),('Aktiubinsk_Oblast','2015-08-01',7),('100_East_Wisconsin','2015-05-01',782),('7th_Bangladesh_National_Film_Awards','2017-08-01',91),('Alejandro_Reyes','2017-12-01',35),('Applied_philosophy','2018-03-01',539),('Adhemar_Pimenta','2016-06-01',146),('Break_the_fourth_wall','2016-04-01',66),('Annoushka_Ducas','2017-10-01',411),('ATC_code_J01CA01','2015-06-01',1),('Evelyn_County,_New_South_Wales','2016-11-01',7),('Elastic_scattering','2016-11-01',1374),('1032_Pafuri','2015-07-01',35),('Andrew_Bromwich','2015-08-01',26),('Ishita_Arun','2017-01-01',249),('Aspergics','2016-07-01',1),('1857_in_Chile','2018-03-01',22),('Breffni','2015-07-01',38),('845_in_poetry','2017-08-01',2),('20321_Lightdonovan','2015-10-01',12),('Arthur_Chandler','2017-12-01',27),('CsISOLatin2','2017-06-01',1),('1900_Grand_National','2016-06-01',69),('Aeritalia_AMX','2017-03-01',3),('B_Sharps','2015-06-01',11),('544_area_code','2015-09-01',2),('30th_Guldbagge_Awards','2015-06-01',37),('Agrippina','2017-08-01',315),('Ardmore','2016-02-01',433),('Amplypterus_panopus','2016-03-01',23),('Alexander_Bukharov','2017-09-01',5),('Alaska_Raceway_Park','2017-01-01',46),('Albanian_National_Road_Race_Championships','2017-03-01',31),('1968_Democratic_National_Convention_protest_activity','2017-10-01',2802),('2012_Birthday_Honours','2017-10-01',427),('2000_NHL_expansion_draft','2017-06-01',1),('A_Town_Where_You_Live','2016-11-01',2920),('Ahmed_Shahzad','2018-03-01',25),('Elisabeth_Svendsen','2016-11-01',39),('2002_FINA_Synchronised_Swimming_World_Cup','2016-08-01',30),('Akatek','2017-04-01',10),('Animation_with_DAZ_Studio','2018-02-01',78),('Fergus_Craig','2016-11-01',119),('Ancel_Nalau','2015-11-01',5),('5171_Augustesen','2017-04-01',20),('Anne_McGuire','2017-11-01',329),('Australian_Photoplay_Company','2015-12-01',6),('1913_in_Canada','2017-04-01',137),('Arhopala_allata','2015-05-01',26),('Il_Paradiso_delle_Signore','2017-01-01',31),('Geri_Palast','2017-01-01',38),('Alan_Abela_Wadge','2017-03-01',77),('22nd_Tactical_Air_Support_Squadron','2017-10-01',7),('Avant_Stellar','2017-06-01',22),('Black_phantom_tetra','2016-11-01',205),('Billy_McCaffrey','2017-01-01',314),('Annie_Furuhjelm','2017-11-01',97),('1992_PGA_Tour','2017-12-01',307),('2008_Chilean_pork_crisis','2016-01-01',55),('2012_Currie_Cup_First_Division','2018-02-01',32),('Aleksei_Fomkin','2015-05-01',144),('Alexander_Krausnick-Groh','2016-05-01',101),('Adam_Richard_Wiles','2017-08-01',5),('ATCvet_code_QA01AD01','2015-09-01',2),('Abu_Bakr_Ibn_Bajja','2017-03-01',5),('Architecture-Studio','2016-04-01',94),('950s_BC','2016-02-01',257),('Abschwunges','2017-07-01',1),('Adonis_Geroskipou','2017-06-01',15),('2008-09_SV_Werder_Bremen_season','2016-03-01',3),('Closed_loops','2016-04-01',1),('AFC_Youth_Championship_1982','2015-12-01',10),('Aquila_Shoes','2015-08-01',209),('9842_Funakoshi','2017-12-01',11),('Educational_quotient','2016-04-01',21),('Antoni_Julian_Nowowiejski','2018-01-01',211),('Adi_Oka_Idhile','2017-11-01',16),('DEXIA-BIL_Luxembourg_Open','2016-11-01',3),('Andrew_James_Simpson','2016-03-01',43),('Alexander_Boksenberg','2017-12-01',61),('1827_in_Denmark','2017-03-01',39),('Afternoon_tea_with_suggs','2017-11-01',3),('Alpha,_MN','2017-06-01',6),('Ari_Onasis','2015-06-01',4),('1961-62_Football_League_First_Division','2015-11-01',1),('Andi_Lila','2015-06-01',2847),('A_Gathering_Of_Old_Men','2018-02-01',1),('Abul_Fazl_al-Abbas','2017-01-01',1),('Asgill,_Charles','2017-08-01',1),('Alexander_Arkhangelsky','2015-07-01',12),('1947-48_Portuguese_Liga','2015-06-01',1),('3rd_MMC_-_Varna','2016-07-01',3),('Alberts,_Wayne','2017-05-01',3),('Alois_Schickelgruber','2018-02-01',9),('Hefner_Stadium','2017-01-01',2),('410912_Lisakaroline','2018-02-01',26),('Academy_at_Mountain_State','2018-03-01',1),('617_Squadron','2016-05-01',489),('Al_Silm_Haji_Hajjaj_Awwad_Al_Hajjaji','2015-07-01',5),('Arturo_Merino_Benitez_Airport','2017-10-01',13),('AEK_Athens_Futsal','2015-06-01',10),('Aggaeus','2018-02-01',2),('Association_for_Retarded_Citizens_of_the_United_States','2017-08-01',3),('Kielce_pogrom','2017-01-01',335),('1351_in_poetry','2016-01-01',17),('1923_Princeton_Tigers_football_team','2017-11-01',41),('Auzata_semipavonaria','2017-01-01',2),('892_in_poetry','2016-01-01',6),('Anton_Krotiak','2017-12-01',2),('Arthur_Shelley','2017-12-01',23),('2003_Kyoto_Purple_Sanga_season','2018-02-01',9),('Frederic_Bowker_Terrington_Carter','2016-04-01',6),('2-orthoplex','2016-03-01',1),('Acacia_australiana','2015-09-01',4),('2012_Newcastle_Knights_season','2016-06-01',103),('Ann_Wrights_Corner,_Virginia','2017-07-01',19),('12557_Caracol','2017-03-01',5),('2001_African_Footballer_of_the_Year','2017-05-01',1),('Bass_Pyramid','2017-01-01',22),('A_noodle','2015-05-01',5),('Aed_Bennan','2018-02-01',2),('1886_Yale_Bulldogs_football_team','2017-10-01',58),('2002_Players_Championship','2016-06-01',54),('African_Skimmer','2017-07-01',2),('3rd_Guldbagge_Awards','2016-12-01',39),('Arrows_A19B','2015-10-01',1),('Archduchess_Elisabetta_of_Austria-Este','2017-08-01',1526),('America_Islands','2015-11-01',1),('1932_Olympic_Games','2016-01-01',9),('2011_Chinese_pro-democracy_protests','2015-11-01',2044),('Bank_walkaway','2016-04-01',113),('594_in_Ireland','2017-04-01',1),('Association_of_Municipal_Corporations','2016-12-01',5),('Andreas_Brantelid','2015-09-01',167),('Amarthal_urf_Unchagaon','2017-05-01',82),('3-methoxymorphinan','2017-04-01',146),('2382_BC','2016-07-01',10),('1763_in_science','2016-07-01',28),('Arvert','2017-04-01',77),('Ale_yeast','2017-12-01',19),('A_Man_Without_a_Soul','2018-03-01',17),('Air_Force_Base_Louis_Trichardt','2017-09-01',1),('Athirson_Mazzoli_de_Oliveira','2017-06-01',3),('Anthony_Chan_Yau','2017-07-01',181),('Basic_Enlisted_Submarine_School','2017-06-01',392),('Aboriginal_Lands_of_Hawaiian_Ancestry','2015-09-01',11),('Fondren_Southwest,_Houston','2017-01-01',4),('3_World_Financial_Center','2017-07-01',64),('1971_IIHF_European_U19_Championship','2017-09-01',9),('1937-38_Allsvenskan','2015-12-01',6),('Christopher_Ashton_Kutcher','2017-06-01',2),('Australian_rules_football_in_south_australia','2016-12-01',1),('Amicable_pair','2018-01-01',7),('Alan_Tomes','2015-11-01',82),('Alexei_Petrovich,_Tsarevich_of_Russia','2015-12-01',3887),('Alexis_Damour','2015-10-01',66),('Bankruptcy_Act_of_1938','2017-06-01',76),('Amphiphyllum','2016-06-01',14),('Conway_High_School_West','2016-04-01',1),('5447_Lallement','2015-11-01',10),('Gabriel_Iddan','2017-01-01',1),('1879-80_Scottish_Cup','2017-04-01',3),('2011_Eneco_Tour','2016-10-01',31),('1471_in_England','2015-11-01',94),('Ashland_Town_Hall','2017-01-01',5),('Archduke_John','2015-05-01',20),('2000_Cameroonian_Premier_League','2017-09-01',18),('1997_flood','2017-11-01',5),('Agile_management','2015-09-01',26677),('Am_841','2017-12-01',3),('Apprentice_Mason','2018-01-01',4),('Hales-Jewett_theorem','2017-01-01',2),('Alien_Abductions','2017-10-01',14),('Arjun_Menon','2016-02-01',370),('Anthokyan','2016-01-01',4),('Automobili_Lamborghini','2016-02-01',1110),('Alain_Prost','2017-04-01',25196),('Fartein_Valen','2016-04-01',90),('Antonio_Galli_da_Bibiena','2016-05-01',5),('Al_Jawf,_Libya','2017-03-01',600),('AD_695','2018-02-01',1),('Amir_chand','2015-11-01',1),('Alcis_obliquisigna','2017-08-01',1),('Chandra_Talpade_Mohanty','2017-01-01',306),('Algerian_safe_house,_Jalalabad','2015-06-01',3),('Jake_Milner','2017-01-01',1),('Alternate_Communications_Center','2017-10-01',1),('In_the_Bleachers','2017-01-01',42),('Alex_Puodziukas','2016-04-01',7),('Altarpiece_of_Pilgrim_II','2018-02-01',2),('Cybernetical_Physics','2017-01-01',3),('Christopher_Unthank','2017-06-01',2),('1982_Independence_Bowl','2015-06-01',102),('Ascoli_Calcio_1898','2018-03-01',1115),('Briggs-Rauscher_reactions','2017-06-01',1),('Adjadja','2018-02-01',45),('Afghanistan_from_Ahmad_Shah_until_Dost_Mohammed','2016-06-01',3),('Catholic_social_doctrine','2017-01-01',6),('2833_BC','2016-11-01',1),('Bethy_Woodward','2016-04-01',38),('Bateman_polynomials','2017-06-01',22),('1966_Buenos_Aires_Grand_Prix','2015-10-01',19),('A_River_Somewhere','2015-10-01',353),('2016-17_BVIFA_National_Football_League','2017-04-01',2),('1909_Major_League_Baseball_season','2015-10-01',362),('1988_Oklahoma_Sooners_football','2017-11-01',2),('2010s_in_Chechen_fashion','2016-10-01',1),('Accademia_Olimpica','2017-08-01',17),('Air_cooling','2015-07-01',2010),('Amir_Saoud','2016-11-01',22),('Alex_Auburn','2015-05-01',52),('Apamea_impulsa','2016-11-01',6),('Australian_federal_election,_2007','2015-07-01',1794),('Ain_Sakhri','2017-10-01',76),('Belosaepiidae','2015-07-01',68),('Acts_of_Parliament_in_the_United_Kingdom','2017-10-01',4070),('Equity_Office','2016-11-01',202),('David_Bintley','2017-01-01',51),('Aksel_Schiotz','2018-03-01',3),('Appropriation_Act_2000','2017-05-01',12),('Edward_Johnson_III','2016-11-01',491),('2006_Ohio_State_Buckeyes_football_team','2016-03-01',1452),('Battle_of_Fort_Beausejour','2015-07-01',97),('Abel_Foullon','2015-12-01',82),('Apollo_VIII','2015-10-01',19),('Carry_on_up_the_jungle','2015-07-01',8),('Armour_villa','2017-05-01',4),('201_Poplar','2015-08-01',265),('Arta_prefecture','2016-08-01',1),('2015-16_Ekstraklasa','2018-02-01',13),('Alport,_Ontario','2018-02-01',2),('Bongoland','2017-06-01',62),('Alfred_Charles_Post','2016-11-01',11),('Aam_Aadmi_Party_crisis','2016-10-01',1),('Andrea_Moda','2015-07-01',143),('Abdul_Halim_Sharar','2017-08-01',545),('Apostolic_Vicariate_of_Yunnan','2016-12-01',1),('Catherine_Steadman','2016-11-01',5218),('Agastachys_odorata','2015-10-01',38),('9783_Tensho-kan','2016-03-01',2),('AFL_Cairns','2017-10-01',337),('Abomey','2015-06-01',1062),('Anne_Crofton,_1st_Baroness_Crofton','2015-12-01',42),('Cash-flow_return_on_investment','2017-01-01',137),('Alberto_Arvelo_Torrealba_Municipality','2015-08-01',56),('Abyssinian_Shorthorned_Zebu','2017-09-01',124),('Albanian_hip_hop','2016-01-01',1812),('Alphonso_IV_of_Portugal','2016-02-01',12),('19th_The_Alberta_Mounted_Rifles','2016-10-01',1),('Chinese_shadow_theatre','2016-04-01',1),('American_Committee_of_the_Fourth_International','2017-08-01',4),('2014_Bahrain_GP2_Series_round','2016-03-01',80),('Alexandrian_orthodox','2017-09-01',2),('2010_Hurricane_Season','2015-05-01',18),('1938_All-Ireland_Senior_Camogie_Championship_Final','2017-01-01',1),('ATC_code_D01','2018-01-01',203),('Albedo','2015-08-01',23484),('Chavigny,_Meurthe-et-Moselle','2017-01-01',12),('Becky_Essex','2015-07-01',51),('Archaeological_Museum_Padre_Le_Paige','2018-02-01',2),('Abu_Bakar_Sillah','2017-01-01',5),('Back_chat','2017-01-01',2),('Anchylobela_dyseimata','2015-12-01',11),('Anthony_Overton','2017-03-01',261),('Bear_maul','2016-04-01',3),('Ambarawa,_Central_Java','2016-01-01',1),('Amber_lager','2016-11-01',87),('2nd_LAAD','2017-09-01',8),('Ashiya,_Hyogo','2018-03-01',24),('Angels_at_Risk','2018-02-01',74),('Audrey_Marie_Munson','2016-03-01',17),('1984_Australian_Football_Championships','2017-01-01',27),('Ammonia_fountain','2016-06-01',434),('Allister_Bentley','2018-03-01',11),('Alsager_Hay_Hill','2016-10-01',72),('1753_English_cricket_season','2015-05-01',51),('2009-10_New_Jersey_Devils_season','2016-10-01',1),('An_Untamed_State','2016-05-01',1109),('Beatrice_Carmichael','2016-11-01',5),('Abdul_Ghani_Ahmad','2017-12-01',115),('Arteria_suralis','2017-02-01',3),('Berzasca_River','2017-01-01',1),('Angel_Attack','2015-09-01',98),('1969_San_Francisco_49ers_football_team','2017-11-01',1),('Anthony_Beilenson','2017-09-01',114),('Crystalline_Entity','2016-04-01',180),('Granice','2017-01-01',2),('203rd_General_Hospital','2017-07-01',44),('Acrocercops_rhombiferellum','2017-12-01',20),('Ampliglossum_blanchetii','2017-05-01',1),('11553_Scheria','2017-03-01',2),('Ashkenozi','2017-02-01',1),('2010_Calder_Cup_Playoffs','2018-01-01',9),('Alice_Caymmi','2016-01-01',121),('Alfredo_Alvar','2017-04-01',44),('2006_Legends_Tour','2017-07-01',30),('Albano_Albanese','2015-10-01',53),('1943_Frankford_Junction_train_wreck','2016-08-01',510),('Evans_Court_Apartment_Building','2016-04-01',4),('Abu_al-Rayhan_Muhammad_ibn_al-Biruni','2017-11-01',1),('Abubakar_Muhammad_Rimi','2015-05-01',4),('Dostpur','2016-11-01',26),('Accessories_Council_Excellence_Awards','2016-03-01',14),('2006_North_American_heat_wave','2015-06-01',1161),('Amstelodamum','2017-09-01',12),('A_Very_Peculiar_Practice','2016-08-01',1860),('Allegorie_der_Liebe','2015-09-01',1),('Alex_Mackie','2017-02-01',95),('1812_Homestead_Farm_and_Museum','2017-09-01',29),('Argus_distribution','2016-03-01',8),('Anthony_Thomas_Stover','2017-02-01',1),('Arthur_Shallcross','2016-11-01',20),('Antoine_Francois_Fourcroy','2018-01-01',1),('Abbas_Halim','2016-11-01',21),('Akiva_Baer_ben_Joseph','2017-08-01',1),('Balatonfuered','2016-11-01',3),('Antemnae','2017-11-01',204),('Cling_Cling','2017-06-01',93),('B_flat_major','2017-01-01',28),('AirExplore','2017-12-01',930),('Auckland_Super_Sprint','2015-11-01',120),('Alfredo_De_Gasperis','2017-12-01',793),('Geoffrey_I_of_Vianden','2017-01-01',5),('Copa_de_Zaachila','2016-04-01',6),('Alboacen','2017-09-01',1),('BNH_Hospital_Bangkok','2017-06-01',2),('Agricultural_health_and_safety','2016-09-01',1),('Chiasms','2017-06-01',2),('Al_Karaana','2016-05-01',58),('Alberta_Highway_872','2016-11-01',1),('Among_the_mourners','2016-03-01',1),('Achema_Power_Plant','2015-06-01',55),('ATSE_Graz','2017-10-01',65),('Arthroscopy','2017-02-01',11721),('2010-2012_European_Nations_Cup_Second_Division','2018-01-01',7),('1967_Cincinnati_Reds','2015-08-01',4),('24th_Golden_Disc_Awards','2017-05-01',71),('Johnny_Floyd','2017-01-01',17),('Arthur_Rupin','2016-02-01',5),('Alpine_skiing_at_the_2011_Canada_Winter_Games','2015-09-01',38),('College_Press_Service','2017-01-01',8),('American_Psycho','2015-08-01',55567),('CBC_Winnipeg','2017-06-01',17),('Burning_the_process','2016-04-01',1),('2011_Stanley_Cup_playoffs','2017-01-01',1036),('Andrew_Mumford','2017-01-01',6),('1925_in_fine_arts_of_the_Soviet_Union','2018-02-01',28),('Aragvi_river','2017-02-01',2),('Andrew_Adamson','2018-03-01',16269),('Arcides_fulvohirta','2016-10-01',1),('Araya_Selassie_Yohannes','2015-11-01',423),('Apartment_house','2016-09-01',85),('Advanced_Art','2015-12-01',171),('1028_Lydina','2015-06-01',53),('2005_July_6_United_Nations_assault_on_Cite_Soleil,_Haiti','2017-04-01',2),('Adolph_Weiss','2015-06-01',98),('Adam_Jerzy_Czartoryski','2015-09-01',1237),('1980_United_States_presidential_election','2017-05-01',56),('1956_Oscars','2016-08-01',10),('Burundian_Senate_election,_2005','2016-04-01',1),('Amarolea_floridana','2015-07-01',3),('August_Bier','2015-12-01',514),('Arbelodes_sebelensis','2018-03-01',6),('Abiah_Brown','2018-02-01',1),('A_Maceo_Smith_High_School','2016-10-01',2),('1488_in_architecture','2017-12-01',6),('2009_AMP_Energy_500','2016-04-01',45),('1921_Baylor_Bears_football_team','2017-03-01',21),('Dmitry_Akhba','2015-07-01',43),('2004_Big_12_Conference_Baseball_Tournament','2016-07-01',37),('Abdisalam_Omer','2018-02-01',116),('Alma,_son_of_Alma','2015-08-01',53),('An_Phoblacht','2016-10-01',962),('2009_Turner_Prize','2016-01-01',75),('Jack_Zajac','2017-01-01',24),('1906_Wimbledon_Championships','2016-04-01',22),('Chuckwalla_Valley','2017-06-01',22),('Alien_Quadrology','2016-02-01',1),('Chalcidoptera_contraria','2016-04-01',1),('Alaska_Republican_Gubernatorial_Primary_Election,_2006','2016-02-01',1),('333639_Yaima','2018-02-01',7),('Aquila_hastata','2015-11-01',28),('Al-Fua','2017-07-01',1),('Anihilation','2015-07-01',28),('International_Toy_Fair','2017-01-01',1),('38th_Regiment_Indiana_Infantry','2017-01-01',10),('Andrea_Stella','2017-07-01',75),('Anselmo_de_Moraes','2015-09-01',562),('Applemore','2016-05-01',3),('Akpinar,_Kirsehir','2015-06-01',3),('Ant_nest','2016-05-01',53),('Catherine_of_Siena','2016-11-01',8806),('Barbos','2015-06-01',12),('Amlaib_mac_Iduilb','2017-08-01',2),('Alice_Janowski','2018-03-01',17),('Acacia_leptocarpa','2017-03-01',48),('Al-Hadi_Yahya','2016-01-01',39),('2015_British_Figure_Skating_Championships','2017-07-01',38),('Avenues_Television','2016-03-01',214),('Dendropsophus_sartori','2015-07-01',11),('1952_in_Germany','2015-05-01',63),('Armuchee_High_School','2016-04-01',27),('April_1_RFC','2017-11-01',2),('Caroline_Bliss','2016-11-01',972),('66th_Rice_Bowl','2016-06-01',17),('Alec_Smight','2017-02-01',173),('Alexei_Panin','2017-09-01',3),('Codeword','2016-04-01',84),('Dormice','2015-07-01',63),('2105_BC','2017-11-01',6),('5th_National_Congress_of_Kuomintang','2016-06-01',5),('Caminho_das_Indias','2017-01-01',5),('Agerbo','2017-11-01',2),('Abe_Anellis','2018-01-01',86),('Aceh_Medal','2015-07-01',33),('Alltech_Arena','2016-10-01',144),('Aly_Oury','2016-06-01',260),('757th_Troop_Carrier_Squadron','2017-07-01',2),('Alec_Peters','2017-12-01',2731),('Agua_Buena_Airport','2017-09-01',12),('Alessandro_Livi','2016-08-01',104),('Andkaer','2017-04-01',3),('Cateran','2017-06-01',135),('57th_Venice_International_Film_Festival','2017-04-01',180),('Brijal_Patel','2017-06-01',98),('Cnemaspis_jerdonii','2015-07-01',6),('Aluminum_sodium_salt','2016-10-01',3),('Arnaldo_Antonio_Sanabria_Ayala','2017-09-01',4),('Angels_of_Iron','2018-02-01',83),('Bugs_Bunny_Rabbit_Rampage','2017-06-01',422),('Admiralty_Class_Destroyer','2017-10-01',2),('Atlas_Media','2017-05-01',2),('Arcesilaus_i_of_cyrene','2017-03-01',1),('2011_Tajikistan_national_football_team_results','2017-04-01',13),('Artur_Shakhnazarov','2017-12-01',22),('747_Express_Bus','2018-03-01',20),('101-in-1_Party_Megamix','2017-10-01',188),('Fastpoint_Games','2016-11-01',32),('Analog_Anthology_1','2017-07-01',1),('Archival_bond','2015-09-01',119),('1985_Air_Force_Falcons_football','2017-09-01',4),('American_Airlines_plane_diverted_to_Miami_after_landing_gear_problem','2017-06-01',3),('Adaptive_Evolution_in_the_Human_Genome','2017-08-01',2),('Arthur_Strangways','2015-11-01',5),('1583_in_poetry','2015-09-01',68),('Andrew_igoudala','2015-06-01',2),('Euonychophora','2016-11-01',37),('Catechizing','2016-04-01',4),('1960-61_ice_hockey_Bundesliga_season','2018-03-01',3),('Buk_Vlaka','2017-06-01',10),('Arbor_Day','2018-03-01',16265),('Guan_Sheng','2017-01-01',73),('2014_Barcelona_Open_Banc_Sabadell','2016-08-01',57),('1976-77_Nationalliga_A','2016-04-01',1),('AFL_records','2015-11-01',16),('2005_Tour_Down_Under','2016-10-01',26),('92_BCE','2015-08-01',4),('Bento_Box_Animation','2017-01-01',1),('Alabama_Territory','2018-03-01',1195),('Abdul-Wasa_Al-Saqqaf','2016-07-01',21),('Archbishops_of_Semarang','2017-01-01',6),('Ambivina','2017-10-01',13),('Aghjaghala_Ulia','2017-08-01',2),('Blechnum_novae-zelandiae','2016-11-01',26),('Dictyosome','2016-04-01',19),('Arts_Council_of_Great_Britain','2016-12-01',785),('LBC_Radio','2017-01-01',3),('Ageo,_Saitama','2016-06-01',396),('Babla_Mehta','2016-12-01',674),('2012-13_Russian_Cup','2018-01-01',10),('Chandragupt','2017-06-01',6),('407th_Air_Refueling_Squadron','2016-01-01',96),('Aftermarket','2016-07-01',1253),('A_Portrait_of_New_Orleans','2016-08-01',18),('2000-01_Yemeni_League','2017-03-01',1),('Actinidia_chinensis','2015-11-01',907),('Amsterdam_Tournament_1999','2018-03-01',1),('Arthur_Iberall','2017-02-01',112),('Auricula_Meretricula','2016-02-01',103),('Archbishop_of_Lahore','2016-09-01',8),('Chippewa_Indians_of_Montana','2016-04-01',9),('Abidjan-Niger_Railway','2018-01-01',22),('29th_Annual_Grammy_Awards','2017-05-01',1087),('Ateles_geoffroyi_frontatus','2017-06-01',3),('Enrico_Cernuschi','2016-11-01',3),('A4183_road','2017-02-01',8),('Ahrayut','2016-10-01',75),('Alison_Castle','2016-03-01',55),('Automobile_aftermarket','2016-10-01',5),('2008_GAINSCO_Auto_Insurance_Indy_300','2016-07-01',51),('1937_Scottish_Cup_Final','2017-04-01',126),('2005_Clipsal_500_Adelaide','2018-02-01',22),('Farid_Farjad','2016-04-01',120),('13_Tribes_of_Long_Island','2015-12-01',11),('Afroneta_bamilekei','2017-01-01',2),('Frederick_Stuart_Greene','2017-01-01',1),('Andre_Braugher','2017-04-01',37655),('1906_International_Lawn_Tennis_Challenge','2017-10-01',73),('2009-10_NFL_Playoffs','2016-01-01',69),('Cricket_Wellington','2016-11-01',2),('Craig_Blazer','2015-07-01',21),('Aeolidiella_orientalis','2017-05-01',3),('Andre_Prokovsky','2017-06-01',4),('Angela_McKee','2017-11-01',14),('Airbase_Golubovci','2016-10-01',1),('2011_ISAF_Sailing_World_Championships','2017-05-01',89),('Bartica_Airport','2017-06-01',27),('Agusan_Dam','2016-09-01',454),('Bosque_Real_Country_Club','2015-07-01',42),('Georges_Duhamel','2017-01-01',122),('Allrounder','2017-03-01',63),('2017_Missouri_State_Bears_football_team','2017-09-01',868),('Allons_a_Lafayette','2017-11-01',17),('Agathla','2015-05-01',105),('1086_in_poetry','2015-09-01',25),('Absolute_extreme','2017-09-01',1),('Agathe_Bonitzer','2017-12-01',229),('Chinese_Red_Pine','2017-06-01',18),('Angular_dispersion','2016-02-01',11),('Jean-Sebastian_Giguere','2017-01-01',2),('Actinium-235','2018-03-01',4),('Ago,_filo_e_nodo','2017-02-01',11),('Aranea_cruentata','2016-03-01',1),('2009_Korea_National_League','2017-11-01',19),('Americom-8','2016-08-01',28),('2006_Junee_Bushfire','2018-03-01',81),('2013_Major_League_Baseball_Home_Run_Derby','2017-09-01',182),('1928_US_Presidential_Election','2016-12-01',42),('After-eighty_generation','2016-02-01',127),('1932_Hawthorn_Football_Club_season','2017-07-01',16),('Amelia_Elizabeth_Mary_Rygate','2017-05-01',2),('Aline_Khalaf','2017-12-01',465),('Akron_Junction,_New_York','2017-07-01',56),('Apollo_moon_landing_conspiracy_theories','2015-09-01',4),('1978_National_League_Championship_Series','2017-03-01',325),('1959-60_German_football_championship','2017-08-01',5),('Almost_a_Bride','2017-01-01',1),('Andrew_Lysaght,_junior','2015-10-01',20),('1902_Otani_expedition','2018-02-01',1),('1892_Currie_Cup','2016-09-01',53),('1988_USC_Trojans_football_team','2016-10-01',494),('1944_in_Northern_Ireland','2016-12-01',46),('Alfred_Acherman','2017-07-01',1),('Arcadia,_Nebraska','2017-02-01',148),('4_x_400_metre_relay','2018-03-01',1),('A4030_road','2016-07-01',1),('Chi-li','2016-11-01',3),('Aircraft_fairing','2016-11-01',1861),('Buddhism_in_Belize','2015-07-01',40),('Alameda_County_Open','2017-02-01',33),('Area_of_countries_and_regions_of_the_United_Kingdom','2017-10-01',6),('2014_Weber_State_Wildcats_football_team','2016-10-01',47),('American_Journal_of_Comparative_Law','2016-04-01',62),('A_Teaspoon_Every_Four_Hours','2017-03-01',47),('Astasis','2016-03-01',1195),('Akhrakouaeronon','2015-11-01',62),('Annenkrone','2016-03-01',40),('Ballotine','2016-12-01',4753),('2000_Kipawa_earthquake','2015-11-01',139),('Archdiocese_of_cashel_and_emly','2017-01-01',1),('Chevrolet_SS396','2017-01-01',1),('Achyroseris','2016-03-01',1),('Daniel_Pulteney','2016-11-01',29),('2006_Major_League_Baseball_draft','2017-07-01',10637),('Adetunji_Idowu_Olurin','2016-01-01',37),('Ardatov,_Nizhny_Novgorod_Oblast','2017-04-01',18),('Andrew_Hilditch','2015-08-01',398),('A_Very_Merry_Daughter_Of_the_Bride','2017-04-01',67),('1993_in_radio','2017-08-01',85),('Deltan','2016-11-01',91),('Adnan_Custovic','2017-12-01',26),('Di_Gennaro','2017-01-01',4),('237_AD','2017-11-01',1),('Aaron_Gombar','2018-03-01',2),('Acrolophus','2017-04-01',47),('Alfred_Bergman','2017-06-01',27),('Charles_Bebb','2017-06-01',39),('Dirico','2017-01-01',24),('1982_Major_League_Baseball_Draft','2016-12-01',90),('DDT_wrestling','2016-11-01',4),('1988-89_Houston_Rockets_season','2016-02-01',10),('Acacia_loderi','2015-11-01',35),('2015_Deauville_American_Film_Festival','2016-10-01',126),('Andropadus_importunus','2016-02-01',9),('Antonio_Bacchetti','2017-04-01',52),('Ann_Trindade','2015-09-01',49),('5_x_Monk_5_x_Lacy','2016-05-01',37),('Barlochan,_Ontario','2017-06-01',2),('Achaian','2017-03-01',35),('Flow_rider','2017-01-01',1),('Antiblemma_discerpta','2018-02-01',1),('1997_Illinois_Fighting_Illini_football_team','2017-11-01',331),('Ahrntal','2016-03-01',540),('Apollo_Conference','2015-10-01',329),('Algenib_in_Perseus','2016-01-01',1),('Craig_Norgate','2016-04-01',42),('Antwerp_Zoo','2015-12-01',879),('Cold_Contagious','2017-06-01',161),('Bolito','2016-11-01',181),('Chinese_bridges','2016-11-01',1),('14th_Indiana_Infantry_Regiment','2017-04-01',115),('Bindunuwewa_massacre','2015-07-01',52),('Eastshore_Highway','2016-11-01',2),('Daemonologie','2017-01-01',1655),('Aero_Pacifico','2015-07-01',1),('Blue_Ribbon_Schools_Program','2017-06-01',557),('Ash_Township,_MI','2018-02-01',3),('Al-Hatab_Square','2018-02-01',450),('Alje_Vennema','2018-02-01',187),('1920_All-Ireland_Senior_Football_Championship_Final','2016-05-01',40),('Criss_Oliva','2016-11-01',801),('Bethlehem,_Ohio','2017-01-01',16),('1976_WHA_Amateur_Draft','2015-08-01',47),('Angela_Fimmano','2017-06-01',17),('Alexander_Bonini_of_Alexandria','2017-09-01',1),('Anarchist_faq','2015-05-01',13),('Aleksander_Benedykt_Sobieski','2016-05-01',240),('Cape_Florida_Lighthouse','2016-04-01',6),('Fernando_VI_of_Spain','2017-01-01',3),('Crossing_number','2017-06-01',29),('1984_NSL_Cup','2017-05-01',26),('Barbara_Weldon','2015-06-01',29),('Andreas_Olsen','2017-01-01',32),('Battle_of_Baima','2016-04-01',2),('Amory_Hansen','2016-05-01',26),('Akhmimic','2015-11-01',41),('Al_Awda','2018-02-01',18),('Adelheid-Marie_of_Anhalt-Dessau','2016-07-01',70),('Americans_for_Technology_Leadership','2015-10-01',90),('Belizean_diplomatic_missions','2017-06-01',3),('African_communist','2016-05-01',3),('Andosol','2016-09-01',246),('Alan_Attraction','2016-05-01',15),('A_Yank_in_Rome','2015-12-01',70),('2004_in_the_United_Arab_Emirates','2018-02-01',33),('Additionality','2017-06-01',371),('Assassination_of_Trotsky','2015-06-01',47),('Alice_Sotero','2018-02-01',27),('Agyneta_platnicki','2016-04-01',4),('Alexandra_Vasilyevna_Velyaminova','2015-07-01',30),('1881_in_Chile','2016-06-01',16),('Arterial_ischemic_stroke','2018-01-01',57),('Astro_Glacier','2015-09-01',27),('Chester_Earl_Merrow','2017-06-01',58),('Alejandro_de_la_Madrid','2015-11-01',1630),('70936_Kamen','2017-08-01',1),('AK_Steel_Holding_Corp','2015-08-01',8),('1124_Stroobantia','2017-10-01',23),('Asian_Wedding','2016-10-01',15),('23837_Matthewnanni','2015-10-01',18),('Acharya_Jagadish_Chandra_Bose_Indian_Botanic_Garden','2017-03-01',4893),('Betsy_Hodges','2016-04-01',560),('Arthur_and_the_Invisibles','2015-08-01',14924),('Arkansas-Ole_Miss_football_rivalry','2015-05-01',7),('Asia_Cup','2015-09-01',5938),('Arginine_racemase','2016-12-01',15),('585th_Field_Company,_Royal_Engineers','2018-03-01',1),('1975_Stagg_Bowl','2017-08-01',6),('Dame_Commander_of_The_Most_Honourable_Order_of_the_Bath','2017-01-01',1),('Askajian','2016-02-01',26),('2006_Nebraska_Cornhuskers_football_team','2015-08-01',975),('Cicero_Francis_Lowe_House','2015-07-01',10),('Conan_IV,_Duke_of_Brittany','2016-11-01',252),('2005_World_Modern_Pentathlon_Championships','2016-07-01',38),('1946_Aleutian_Islands_earthquake','2017-03-01',2019),('ANKRD17','2017-09-01',19),('1970_Maryland_Terrapins_football_team','2017-11-01',42),('Ali_Dehkhoda','2017-04-01',1),('1244_in_art','2015-07-01',22),('1520s_in_Denmark','2016-01-01',20),('Abdoulaye_Gaye','2017-12-01',10),('An_Angel_Has_Arrived','2016-03-01',36),('1453_BC','2015-08-01',26),('2017_National_Games_of_China','2017-05-01',1293),('A_Night_in_Sickbay','2016-05-01',251),('Dateline_Diamonds','2017-01-01',53),('419_guestbook_spamming','2016-02-01',5),('Familiar_bluet','2017-01-01',4),('Abu_Bakr_Mirza','2017-10-01',86),('7272_Darbydyar','2017-11-01',4),('Ages_of_consent_in_Latin_America','2017-03-01',961),('1982_Japan_Soccer_League_Cup','2016-04-01',14),('2810_BC','2015-07-01',9),('Druga_Liga_Republike_Srpske','2017-01-01',1),('1998_Swedish_Rally','2017-09-01',34),('1567_in_Norway','2015-10-01',89),('126_Army_Engineer_Regiment,_Royal_Engineers','2016-03-01',5),('2017_American_League_Wild_Card_Game','2017-10-01',25120),('August_Follen','2017-01-01',2),('Ala_Gertner','2015-11-01',876),('Glenwood,_Harford_County,_Maryland','2017-01-01',3),('Applied_ecology','2017-12-01',730),('Ariarathes_V_Eusebes_Philopator','2018-03-01',5),('2006_AFC_Champions_League','2017-09-01',947),('60_minutes_2','2016-10-01',2),('Embryonic_shield','2017-01-01',2),('2001_Meath_Intermediate_Football_Championship','2015-11-01',8),('Apparition_of_Christ_to_Madonna','2017-06-01',5),('Hoosier_Road_Elementary','2017-01-01',1),('Arua_Uda','2016-12-01',29),('Array_comprehension','2015-11-01',8),('Baszki','2015-06-01',36),('Akron_Neighborhoods','2016-01-01',4),('Catholic_Church_in_Costa_Rica','2017-06-01',85),('Canada-Sweden_relations','2015-07-01',1),('Barza_Radio_Community','2016-11-01',6),('Dalhousie_Middle_School','2016-11-01',5),('Alliphis_bakeri','2017-11-01',2),('Bartica_massacre','2017-06-01',53),('30th_January','2015-11-01',10),('1920_revolution','2017-05-01',5),('Amyraldism','2017-08-01',828),('AA_Jefferson_District','2016-05-01',45),('Eunebristis_cinclidias','2017-01-01',1),('A_Scott_Connelly','2017-06-01',5),('Antony_Durose','2016-07-01',19),('Arval_Brethren','2017-11-01',579),('Anthidium_dissectum','2017-05-01',2),('Aru,_Democratic_Republic_of_the_Congo','2017-04-01',81),('1956-57_West_Indian_cricket_season','2017-04-01',2),('2014_Moscow_Film_Festival','2017-08-01',2),('Anna_Gurji','2017-06-01',27),('Allen_Memorial_Medical_Library','2016-07-01',120),('Anton_Sistermans','2017-02-01',36),('Clotheshorses','2017-06-01',1),('36_Stratagems','2017-08-01',25),('Attack_of_the_crab_monsters','2016-10-01',16),('30_rock_awards','2015-09-01',2),('Aeroflot,_Uralsk_Civil_Aviation_Directorate','2017-08-01',2),('Amblyseius_parabufortus','2017-06-01',3),('Indian_coral_tree','2017-01-01',3),('3285_Ruth_Wolfe','2016-02-01',9),('Anderson_da_Silva_Gibin','2016-08-01',73),('5001st_Composite_Group','2017-03-01',4),('Danzik','2016-04-01',8),('4810_Ruslanova','2016-03-01',2),('Arkendale,_Virginia','2016-04-01',14),('Al_Francis_Bichara','2016-09-01',239),('Cayena','2017-01-01',1),('A_Glass_of_Darkness','2017-04-01',95),('GMC_CCKW','2017-01-01',887),('Alabama_State_Route_107','2015-11-01',13),('2011_in_motorsport','2017-12-01',26),('Adecco_General_Staffing,_New_Zealand','2017-12-01',86),('Anbargah','2015-10-01',6),('1995_Asian_Cup_Winners_Cup','2016-06-01',7),('1986_Wales_rugby_union_tour_of_the_South_Pacific','2016-12-01',30),('Adya_Goud_Brahmin','2017-03-01',2),('Akcakiraz','2015-08-01',5),('24249_Bobbiolson','2017-12-01',4),('Ahmanson_Theatre','2016-02-01',801),('Abdullah_ibn_Jahsh','2016-10-01',196),('1937_in_Chile','2015-08-01',24),('2000_in_England','2016-01-01',57),('A_Deepness_In_The_Sky','2017-08-01',2),('Area_code_678','2015-07-01',480),('Avalon_Hill','2017-01-01',880),('Anna,_Duchess_of_Prussia','2015-12-01',315),('Alexandr_Syman','2017-04-01',24),('7400_series_logic','2017-11-01',2),('Greenleaf_Township,_Minnesota','2017-01-01',1),('Acetylsal','2017-04-01',6),('Earth_and_Man_National_Museum','2016-11-01',43),('Affetside','2015-10-01',185),('1971_CFL_season','2015-08-01',202),('Beth_Bader','2016-11-01',21),('Enrolled_Nurse','2016-04-01',5),('Al-Azraq','2016-12-01',22),('4th_South_Carolina_Regiment','2015-07-01',42),('Amanda_Overmyer','2017-02-01',356),('Auto_wrap','2016-02-01',8),('Anonymous_internet_banking','2015-07-01',98),('Curatoria','2016-11-01',3),('A-roll','2016-05-01',134),('Accra_hearts_of_oak_sc','2017-10-01',4),('Apostasy_from_Judaism','2015-12-01',45),('Acantharctia_tenebrosa','2018-01-01',3),('Abigail_Keasey_Frankel','2017-11-01',25),('2008_Paraguayan_general_election','2016-01-01',1),('Adams_motor','2015-09-01',37),('Drummond_Community_High_School','2017-01-01',17),('Andrews_Nakahara','2017-10-01',474),('10th_Maccabiah','2017-04-01',30),('Ackerman,_Rick','2015-08-01',4),('Dumri,_Buxar','2016-11-01',35),('Asking_Jesus_into_your_heart','2016-09-01',1),('Adamowicz_brothers','2016-12-01',161),('Alien_Musibat','2017-12-01',2),('Ahmad_Al_Tayer','2016-04-01',39),('Analytical_phonics','2016-01-01',520),('Do_It_Good','2016-04-01',281),('2004_Kumbakonam_School_fire','2017-12-01',2114),('1977_Chattanooga_Mocs_football_team','2016-08-01',3),('Globe_valves','2017-01-01',11),('Abelmoschus_crinitus','2016-04-01',18),('1874_Yale_Bulldogs_football_team','2016-02-01',37),('Climer','2017-06-01',1),('Auchroisk','2017-06-01',37),('2010_Albirex_Niigata_season','2016-10-01',19),('Adhocracy','2017-06-01',2217),('Chios_Massacre','2015-07-01',1110),('African_Red_Slip','2017-02-01',221),('1976_Portland_Timbers_season','2016-07-01',41),('Alsace-Larraine','2015-09-01',2),('3750_Ilizarov','2017-07-01',12),('Aleksandr_Shkaev','2017-05-01',1),('32_bar_form','2016-01-01',12),('Aequatorium_jamesonii','2018-03-01',14),('Abade_neiva','2016-09-01',2),('Arakvaz','2016-08-01',23),('207_Sqn','2017-10-01',2),('Ducal_hat','2016-11-01',10),('2_Degrees','2017-03-01',19),('Ahmeddiyya_Islam','2016-03-01',4),('Amidi-ye_Kohneh','2017-11-01',13),('Contributions_to_Indian_Sociology','2016-11-01',42),('Clark_Leiblee','2016-04-01',5),('Abraham_of_Strathearn','2017-09-01',14); +/*!40000 ALTER TABLE `some_table` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2023-01-16 16:55:58 diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/object-per-line.json b/docs/ja/integrations/data-ingestion/data-formats/assets/object-per-line.json new file mode 100644 index 00000000000..cda20604d9a --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/object-per-line.json @@ -0,0 +1,3 @@ +{"path":"1-krona","month":"2017-01-01","hits":4} +{"path":"Ahmadabad-e_Kalij-e_Sofla","month":"2017-01-01","hits":3} +{"path":"Bob_Dolman","month":"2016-11-01","hits":245} diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/objects.json b/docs/ja/integrations/data-ingestion/data-formats/assets/objects.json new file mode 100644 index 00000000000..ff5b12ecdcb --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/objects.json @@ -0,0 +1,17 @@ +{ + "a": { + "path":"April_25,_2017", + "month":"2018-01-01", + "hits":2 + }, + "b": { + "path":"Akahori_Station", + "month":"2016-06-01", + "hits":11 + }, + "c": { + "path": "Abducens_palsy", + "month":"2016-05-01", + "hits":28 + } +} diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/out.html b/docs/ja/integrations/data-ingestion/data-formats/assets/out.html new file mode 100644 index 00000000000..a3fa7fdfcc9 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/out.html @@ -0,0 +1,53 @@ +

Top 10 IPs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IPRequests
9.8.4.63
9.5.1.13
2.4.8.93
4.8.8.23
4.5.4.43
3.3.6.42
8.9.5.92
2.5.1.82
6.8.3.62
6.6.3.52
+ +

Query information

+
+
Rows read
+
1000
+
Time spent
+
0.000211939
+
diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/output.results b/docs/ja/integrations/data-ingestion/data-formats/assets/output.results new file mode 100644 index 00000000000..11fb9a76417 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/output.results @@ -0,0 +1,5 @@ +== Top 10 IPs == + +${data} + +--- ${rows_read:XML} rows read in ${time:XML} --- \ No newline at end of file diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/output.rows b/docs/ja/integrations/data-ingestion/data-formats/assets/output.rows new file mode 100644 index 00000000000..50d989feba3 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/output.rows @@ -0,0 +1 @@ +${ip:Escaped} generated ${total:Escaped} requests \ No newline at end of file diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/row.template b/docs/ja/integrations/data-ingestion/data-formats/assets/row.template new file mode 100644 index 00000000000..b8855dcb77a --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/row.template @@ -0,0 +1 @@ +${time:Escaped} [error] client: ${ip:CSV}, server: ${host:CSV} ${request:JSON} \ No newline at end of file diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/schema.capnp b/docs/ja/integrations/data-ingestion/data-formats/assets/schema.capnp new file mode 100644 index 00000000000..12859fac734 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/schema.capnp @@ -0,0 +1,7 @@ +@0xec8ff1a10aa10dbe; + +struct PathStats { + path @0 :Text; + month @1 :UInt32; + hits @2 :UInt32; +} diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/schema.proto b/docs/ja/integrations/data-ingestion/data-formats/assets/schema.proto new file mode 100644 index 00000000000..b86c5cd42c1 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/schema.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +message MessageType { + string path = 1; + date month = 2; + uint32 hits = 3; +}; diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/some_data.sql b/docs/ja/integrations/data-ingestion/data-formats/assets/some_data.sql new file mode 100644 index 00000000000..d782a6c5520 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/some_data.sql @@ -0,0 +1,8 @@ +CREATE TABLE some_data +( + `path` String, + `month` Date, + `hits` UInt32 +) +ENGINE = MergeTree +ORDER BY tuple() diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/some_data.tsv b/docs/ja/integrations/data-ingestion/data-formats/assets/some_data.tsv new file mode 100644 index 00000000000..917a23a097f --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/assets/some_data.tsv @@ -0,0 +1,2000 @@ +Bangor_City_Forest 2015-07-01 34 +Alireza_Afzal 2017-02-01 24 +Akhaura-Laksam-Chittagong_Line 2015-09-01 30 +1973_National_500 2017-10-01 80 +Attachment 2017-09-01 1356 +Kellett_Strait 2017-01-01 5 +Ajarani_River 2018-01-01 30 +Akbarabad,_Khomeyn 2017-03-01 8 +Adriaan_Theodoor_Peperzak 2018-02-01 88 +Alucita_dryogramma 2015-09-01 1 +Brit_Med_J 2015-07-01 1 +4th_Metro_Manila_Film_Festival 2015-09-01 80 +Alialujah_Choir 2018-03-01 221 +1953-54_SM-sarja_season 2016-09-01 1 +Air_Force_Song 2018-02-01 19 +4-6_duoprism 2016-03-01 30 +Ashley_Spurlin 2017-06-01 94 +Asfaq_Kayani 2017-10-01 1 +1607_in_architecture 2016-06-01 7 +4-way_speakers 2015-10-01 2 +Blue_Heeler 2015-07-01 149 +5_Euro 2017-04-01 16 +2009_Spa-Francorchamps_GP2_Series_round 2016-04-01 12 +2015_Guru_Granth_Sahib_desecration 2015-11-01 6821 +Agriculture_Marketing_Service 2016-07-01 2 +2006_Football_League_Cup_Final 2015-11-01 1711 +2008_Uber_Cup_group_stage 2016-02-01 40 +1923_PGA_Championship 2016-08-01 97 +Fannie_Bay 2016-04-01 6 +AlchemyAPI 2016-04-01 344 +Cinema_of_Italy 2017-01-01 1217 +Arodes 2016-11-01 36 +Damien_Marley 2015-07-01 168 +Al_Jumayl_Baladiyat 2015-08-01 5 +2015_Alabama_State_Hornets_football_team 2017-06-01 32 +Aglossa_tanya 2016-03-01 1 +73rd_Pennsylvania_Infantry 2017-01-01 12 +2015_European_Junior_and_U23_Canoe_Slalom_Championships 2018-02-01 31 +African_Leopard 2016-08-01 64 +Faverolles,_Orne 2017-01-01 5 +Aaron_Fukuhara 2015-11-01 17 +Annular_ligaments_of_trachea 2017-01-01 31 +2014_US_Open_Series 2016-11-01 35 +A_Better_Mousetrap 2018-02-01 4 +Dibaklu 2016-11-01 1 +At_Samat_District 2015-06-01 35 +Aaron_Peasley 2017-05-01 32 +Apistomology 2015-12-01 2 +Buyat_Bay 2015-07-01 54 +1942_Estonian_Football_Championship 2017-05-01 22 +Action_for_Autism 2016-06-01 346 +100_Hz 2015-06-01 72 +2003_Arizona_State_Sun_Devils_football_team 2017-05-01 82 +Antona_obscura 2016-09-01 1 +Akiko_Sugiyama 2015-12-01 32 +Elysburg 2016-11-01 8 +2017_New_South_Wales_Cup 2017-09-01 38 +2011-12_Gold_Coast_United_FC_season 2017-06-01 1 +Agency_for_the_Prohibition_of_Nuclear_Weapons_in_Latin_America_and_the_Caribbean 2016-04-01 15 +Albert_Dunn 2017-08-01 87 +Hahamakin_ang_Lahat 2017-01-01 984 +2013_Spuyten_Duyvil_derailment 2017-11-01 5 +Ayling 2017-01-01 5 +Anti-Establishment 2016-10-01 1 +1951_Spanish_motorcycle_Grand_Prix 2018-01-01 48 +2009-10_Brunei_Premier_League 2017-08-01 4 +23_Ursae_Majoris 2016-08-01 90 +1927-28_Austrian_football_championship 2017-08-01 4 +Andrew_McKeever 2017-10-01 3 +Clinocottus 2017-06-01 23 +2006_State_of_Origin 2015-11-01 7 +2013-14_Los_Angeles_Clippers_season 2015-07-01 8 +Cor_Jesu 2017-01-01 1 +Besseringen_B-Werk 2017-06-01 158 +Amy_Hempel 2017-07-01 1091 +Franc-Comtois 2016-04-01 2 +Allium_giganteum 2017-07-01 1103 +Abishai 2016-08-01 56 +Abraham_Clark_High_School 2016-04-01 88 +Baku_chronology 2015-06-01 1 +22nd_MEU 2015-10-01 39 +2015_Open_Engie_de_Touraine 2015-10-01 195 +Churchill_Bowl 2017-06-01 30 +AGMARK 2017-08-01 117 +American_standard_wire_gauge 2017-12-01 3 +Araby,_LA 2015-05-01 2 +217_BC 2016-12-01 202 +2008_Trinidad_and_Tobago_League_Cup 2016-02-01 6 +Alazan_Bay 2015-12-01 22 +Aluminum_fencing 2015-11-01 48 +Achilles_tendinitis 2016-10-01 5884 +AFP_Peacekeeping_Operations_Center 2017-01-01 64 +2013_Xinjiang_clashes 2016-01-01 1 +Arborea_Giudicato_of_Arborea 2015-09-01 3 +1941_Cleveland_Rams_season 2017-06-01 40 +Ju_Posht,_Rasht 2017-01-01 3 +Ascalenia 2016-07-01 10 +Aplectoides 2018-02-01 4 +European_Cup_1969-70 2016-11-01 14 +Armen_Mkertchian 2016-05-01 9 +2015_Aspria_Tennis_Cup_-_Singles 2018-02-01 1 +14_August_1947 2017-11-01 6 +Adobe_Creative_Suite_1 2015-05-01 1 +IC_chips 2017-01-01 2 +Austo_AE300 2016-07-01 4 +Date_palms 2015-07-01 79 +BCS_bowl_game 2017-06-01 13 +AR_Border 2017-06-01 1 +Aranda_de_Duero 2016-04-01 256 +1919_Wake_Forest_Demon_Deacons_football_team 2016-01-01 16 +All_The_Wrong_Clues_For_The_Right_Solution 2017-10-01 9 +Allan_Campbell_McLean 2015-06-01 131 +Bradford_Council_election,_2011 2017-06-01 5 +Astronomy_and_astrophysics 2015-09-01 62 +Dutch_Antillean_people 2015-07-01 57 +Army_Radio 2018-03-01 711 +BBVA_Bancomer 2016-11-01 709 +Lake_Aloha 2017-01-01 30 +Andy_Bean 2018-02-01 3092 +1941_Pittsburgh_Steelers_season 2016-05-01 147 +Aniopi_Melidoni 2016-06-01 4 +Aglossosia_fusca 2017-09-01 3 +Art_books 2017-04-01 36 +1929_Washington_Senators_season 2017-04-01 47 +Antaeotricha_congelata 2016-12-01 10 +Douglas_C-54G-5-DO_Skymaster 2017-01-01 1 +Chris_Jamison 2016-11-01 827 +Ace_Blackwell 2015-11-01 9 +Abdul_Qadir_Fitrat 2018-02-01 32 +Arnoldo_Vizcaino 2017-10-01 1 +2012_Open_EuroEnergie_de_Quimper_-_Doubles 2017-12-01 3 +Dale_Rominski 2017-01-01 7 +ADHD_coaching 2015-06-01 50 +Claire_Yiu 2016-11-01 209 +Applicant 2015-10-01 253 +Apache_OpenOffice 2017-06-01 6031 +Abel_Kiprop_Mutai 2015-09-01 22 +Airdrome_Taube 2017-04-01 46 +Andrey_Viktorovich 2016-06-01 1 +American_Idol_controversy 2016-03-01 36 +Anthrenocerus_confertus 2018-01-01 17 +Appraisal_Subcommittee 2018-03-01 17 +Babusa 2015-07-01 3 +500_homeruns 2016-06-01 1 +Argentina_national_volleyball_team 2016-08-01 64 +Chief_prosecutor_of_Russia 2015-07-01 1 +Absolution_DVD 2015-06-01 1 +1,3-Beta-glucan_synthase 2017-05-01 440 +Dave_Sinardet 2016-04-01 26 +Adeline_Whitney 2018-03-01 10 +Allon_shvut 2016-07-01 3 +2012_Penn_State_Nittany_Lions_football_season 2017-12-01 3 +Coleman-Franklin-Cannon_Mill 2017-01-01 4 +Action_director 2015-05-01 93 +AD_547 2016-01-01 1 +Acta_germanica 2017-09-01 1 +Abu_Dhabi_Global_Market_Square 2017-01-01 35 +Kozo_Shioya 2017-01-01 7 +China_Investment_Corp 2017-01-01 2 +Dmitri_Zakharovich_Protopopov 2016-04-01 129 +Anatra_Anadis 2017-10-01 208 +Archaikum 2017-11-01 5 +2000_Webby_Awards 2017-04-01 360 +2003_BCR_Open_Romania_-_Singles 2016-08-01 2 +Abacetus_bisignatus 2016-09-01 79 +American_school_of_kinshasa 2016-01-01 1 +Anna,_7th_Duchess_of_Bedford 2016-08-01 8 +Black_majority_district 2016-11-01 3 +Dagma_Lahlum 2015-07-01 1 +Credit_Saison 2015-07-01 517 +Ariyankuppam_firka 2016-02-01 19 +Annette_Fuentes 2016-06-01 17 +Angerstein,_John 2015-12-01 2 +Annenkov_Island 2016-03-01 280 +Anne_Frank_museum 2016-06-01 67 +Annales_sancti_Amandi 2017-06-01 22 +L-FABP 2017-01-01 1 +Alvord,_TX 2017-06-01 12 +2006_World_Team_Table_Tennis_Championships 2016-05-01 119 +Angriffen 2015-12-01 9 +Anthony_Oppenheimer 2017-03-01 452 +Absamat_Masaliyevich_Masaliyev 2016-09-01 1 +Airborne_Museum_at_Aldershot 2016-03-01 41 +Aktiubinsk_Oblast 2015-08-01 7 +100_East_Wisconsin 2015-05-01 782 +7th_Bangladesh_National_Film_Awards 2017-08-01 91 +Alejandro_Reyes 2017-12-01 35 +Applied_philosophy 2018-03-01 539 +Adhemar_Pimenta 2016-06-01 146 +Break_the_fourth_wall 2016-04-01 66 +Annoushka_Ducas 2017-10-01 411 +ATC_code_J01CA01 2015-06-01 1 +Evelyn_County,_New_South_Wales 2016-11-01 7 +Elastic_scattering 2016-11-01 1374 +1032_Pafuri 2015-07-01 35 +Andrew_Bromwich 2015-08-01 26 +Ishita_Arun 2017-01-01 249 +Aspergics 2016-07-01 1 +1857_in_Chile 2018-03-01 22 +Breffni 2015-07-01 38 +845_in_poetry 2017-08-01 2 +20321_Lightdonovan 2015-10-01 12 +Arthur_Chandler 2017-12-01 27 +CsISOLatin2 2017-06-01 1 +1900_Grand_National 2016-06-01 69 +Aeritalia_AMX 2017-03-01 3 +B_Sharps 2015-06-01 11 +544_area_code 2015-09-01 2 +30th_Guldbagge_Awards 2015-06-01 37 +Agrippina 2017-08-01 315 +Ardmore 2016-02-01 433 +Amplypterus_panopus 2016-03-01 23 +Alexander_Bukharov 2017-09-01 5 +Alaska_Raceway_Park 2017-01-01 46 +Albanian_National_Road_Race_Championships 2017-03-01 31 +1968_Democratic_National_Convention_protest_activity 2017-10-01 2802 +2012_Birthday_Honours 2017-10-01 427 +2000_NHL_expansion_draft 2017-06-01 1 +A_Town_Where_You_Live 2016-11-01 2920 +Ahmed_Shahzad 2018-03-01 25 +Elisabeth_Svendsen 2016-11-01 39 +2002_FINA_Synchronised_Swimming_World_Cup 2016-08-01 30 +Akatek 2017-04-01 10 +Animation_with_DAZ_Studio 2018-02-01 78 +Fergus_Craig 2016-11-01 119 +Ancel_Nalau 2015-11-01 5 +5171_Augustesen 2017-04-01 20 +Anne_McGuire 2017-11-01 329 +Australian_Photoplay_Company 2015-12-01 6 +1913_in_Canada 2017-04-01 137 +Arhopala_allata 2015-05-01 26 +Il_Paradiso_delle_Signore 2017-01-01 31 +Geri_Palast 2017-01-01 38 +Alan_Abela_Wadge 2017-03-01 77 +22nd_Tactical_Air_Support_Squadron 2017-10-01 7 +Avant_Stellar 2017-06-01 22 +Black_phantom_tetra 2016-11-01 205 +Billy_McCaffrey 2017-01-01 314 +Annie_Furuhjelm 2017-11-01 97 +1992_PGA_Tour 2017-12-01 307 +2008_Chilean_pork_crisis 2016-01-01 55 +2012_Currie_Cup_First_Division 2018-02-01 32 +Aleksei_Fomkin 2015-05-01 144 +Alexander_Krausnick-Groh 2016-05-01 101 +Adam_Richard_Wiles 2017-08-01 5 +ATCvet_code_QA01AD01 2015-09-01 2 +Abu_Bakr_Ibn_Bajja 2017-03-01 5 +Architecture-Studio 2016-04-01 94 +950s_BC 2016-02-01 257 +Abschwunges 2017-07-01 1 +Adonis_Geroskipou 2017-06-01 15 +2008-09_SV_Werder_Bremen_season 2016-03-01 3 +Closed_loops 2016-04-01 1 +AFC_Youth_Championship_1982 2015-12-01 10 +Aquila_Shoes 2015-08-01 209 +9842_Funakoshi 2017-12-01 11 +Educational_quotient 2016-04-01 21 +Antoni_Julian_Nowowiejski 2018-01-01 211 +Adi_Oka_Idhile 2017-11-01 16 +DEXIA-BIL_Luxembourg_Open 2016-11-01 3 +Andrew_James_Simpson 2016-03-01 43 +Alexander_Boksenberg 2017-12-01 61 +1827_in_Denmark 2017-03-01 39 +Afternoon_tea_with_suggs 2017-11-01 3 +Alpha,_MN 2017-06-01 6 +Ari_Onasis 2015-06-01 4 +1961-62_Football_League_First_Division 2015-11-01 1 +Andi_Lila 2015-06-01 2847 +A_Gathering_Of_Old_Men 2018-02-01 1 +Abul_Fazl_al-Abbas 2017-01-01 1 +Asgill,_Charles 2017-08-01 1 +Alexander_Arkhangelsky 2015-07-01 12 +1947-48_Portuguese_Liga 2015-06-01 1 +3rd_MMC_-_Varna 2016-07-01 3 +Alberts,_Wayne 2017-05-01 3 +Alois_Schickelgruber 2018-02-01 9 +Hefner_Stadium 2017-01-01 2 +410912_Lisakaroline 2018-02-01 26 +Academy_at_Mountain_State 2018-03-01 1 +617_Squadron 2016-05-01 489 +Al_Silm_Haji_Hajjaj_Awwad_Al_Hajjaji 2015-07-01 5 +Arturo_Merino_Benitez_Airport 2017-10-01 13 +AEK_Athens_Futsal 2015-06-01 10 +Aggaeus 2018-02-01 2 +Association_for_Retarded_Citizens_of_the_United_States 2017-08-01 3 +Kielce_pogrom 2017-01-01 335 +1351_in_poetry 2016-01-01 17 +1923_Princeton_Tigers_football_team 2017-11-01 41 +Auzata_semipavonaria 2017-01-01 2 +892_in_poetry 2016-01-01 6 +Anton_Krotiak 2017-12-01 2 +Arthur_Shelley 2017-12-01 23 +2003_Kyoto_Purple_Sanga_season 2018-02-01 9 +Frederic_Bowker_Terrington_Carter 2016-04-01 6 +2-orthoplex 2016-03-01 1 +Acacia_australiana 2015-09-01 4 +2012_Newcastle_Knights_season 2016-06-01 103 +Ann_Wrights_Corner,_Virginia 2017-07-01 19 +12557_Caracol 2017-03-01 5 +2001_African_Footballer_of_the_Year 2017-05-01 1 +Bass_Pyramid 2017-01-01 22 +A_noodle 2015-05-01 5 +Aed_Bennan 2018-02-01 2 +1886_Yale_Bulldogs_football_team 2017-10-01 58 +2002_Players_Championship 2016-06-01 54 +African_Skimmer 2017-07-01 2 +3rd_Guldbagge_Awards 2016-12-01 39 +Arrows_A19B 2015-10-01 1 +Archduchess_Elisabetta_of_Austria-Este 2017-08-01 1526 +America_Islands 2015-11-01 1 +1932_Olympic_Games 2016-01-01 9 +2011_Chinese_pro-democracy_protests 2015-11-01 2044 +Bank_walkaway 2016-04-01 113 +594_in_Ireland 2017-04-01 1 +Association_of_Municipal_Corporations 2016-12-01 5 +Andreas_Brantelid 2015-09-01 167 +Amarthal_urf_Unchagaon 2017-05-01 82 +3-methoxymorphinan 2017-04-01 146 +2382_BC 2016-07-01 10 +1763_in_science 2016-07-01 28 +Arvert 2017-04-01 77 +Ale_yeast 2017-12-01 19 +A_Man_Without_a_Soul 2018-03-01 17 +Air_Force_Base_Louis_Trichardt 2017-09-01 1 +Athirson_Mazzoli_de_Oliveira 2017-06-01 3 +Anthony_Chan_Yau 2017-07-01 181 +Basic_Enlisted_Submarine_School 2017-06-01 392 +Aboriginal_Lands_of_Hawaiian_Ancestry 2015-09-01 11 +Fondren_Southwest,_Houston 2017-01-01 4 +3_World_Financial_Center 2017-07-01 64 +1971_IIHF_European_U19_Championship 2017-09-01 9 +1937-38_Allsvenskan 2015-12-01 6 +Christopher_Ashton_Kutcher 2017-06-01 2 +Australian_rules_football_in_south_australia 2016-12-01 1 +Amicable_pair 2018-01-01 7 +Alan_Tomes 2015-11-01 82 +Alexei_Petrovich,_Tsarevich_of_Russia 2015-12-01 3887 +Alexis_Damour 2015-10-01 66 +Bankruptcy_Act_of_1938 2017-06-01 76 +Amphiphyllum 2016-06-01 14 +Conway_High_School_West 2016-04-01 1 +5447_Lallement 2015-11-01 10 +Gabriel_Iddan 2017-01-01 1 +1879-80_Scottish_Cup 2017-04-01 3 +2011_Eneco_Tour 2016-10-01 31 +1471_in_England 2015-11-01 94 +Ashland_Town_Hall 2017-01-01 5 +Archduke_John 2015-05-01 20 +2000_Cameroonian_Premier_League 2017-09-01 18 +1997_flood 2017-11-01 5 +Agile_management 2015-09-01 26677 +Am_841 2017-12-01 3 +Apprentice_Mason 2018-01-01 4 +Hales-Jewett_theorem 2017-01-01 2 +Alien_Abductions 2017-10-01 14 +Arjun_Menon 2016-02-01 370 +Anthokyan 2016-01-01 4 +Automobili_Lamborghini 2016-02-01 1110 +Alain_Prost 2017-04-01 25196 +Fartein_Valen 2016-04-01 90 +Antonio_Galli_da_Bibiena 2016-05-01 5 +Al_Jawf,_Libya 2017-03-01 600 +AD_695 2018-02-01 1 +Amir_chand 2015-11-01 1 +Alcis_obliquisigna 2017-08-01 1 +Chandra_Talpade_Mohanty 2017-01-01 306 +Algerian_safe_house,_Jalalabad 2015-06-01 3 +Jake_Milner 2017-01-01 1 +Alternate_Communications_Center 2017-10-01 1 +In_the_Bleachers 2017-01-01 42 +Alex_Puodziukas 2016-04-01 7 +Altarpiece_of_Pilgrim_II 2018-02-01 2 +Cybernetical_Physics 2017-01-01 3 +Christopher_Unthank 2017-06-01 2 +1982_Independence_Bowl 2015-06-01 102 +Ascoli_Calcio_1898 2018-03-01 1115 +Briggs-Rauscher_reactions 2017-06-01 1 +Adjadja 2018-02-01 45 +Afghanistan_from_Ahmad_Shah_until_Dost_Mohammed 2016-06-01 3 +Catholic_social_doctrine 2017-01-01 6 +2833_BC 2016-11-01 1 +Bethy_Woodward 2016-04-01 38 +Bateman_polynomials 2017-06-01 22 +1966_Buenos_Aires_Grand_Prix 2015-10-01 19 +A_River_Somewhere 2015-10-01 353 +2016-17_BVIFA_National_Football_League 2017-04-01 2 +1909_Major_League_Baseball_season 2015-10-01 362 +1988_Oklahoma_Sooners_football 2017-11-01 2 +2010s_in_Chechen_fashion 2016-10-01 1 +Accademia_Olimpica 2017-08-01 17 +Air_cooling 2015-07-01 2010 +Amir_Saoud 2016-11-01 22 +Alex_Auburn 2015-05-01 52 +Apamea_impulsa 2016-11-01 6 +Australian_federal_election,_2007 2015-07-01 1794 +Ain_Sakhri 2017-10-01 76 +Belosaepiidae 2015-07-01 68 +Acts_of_Parliament_in_the_United_Kingdom 2017-10-01 4070 +Equity_Office 2016-11-01 202 +David_Bintley 2017-01-01 51 +Aksel_Schiotz 2018-03-01 3 +Appropriation_Act_2000 2017-05-01 12 +Edward_Johnson_III 2016-11-01 491 +2006_Ohio_State_Buckeyes_football_team 2016-03-01 1452 +Battle_of_Fort_Beausejour 2015-07-01 97 +Abel_Foullon 2015-12-01 82 +Apollo_VIII 2015-10-01 19 +Carry_on_up_the_jungle 2015-07-01 8 +Armour_villa 2017-05-01 4 +201_Poplar 2015-08-01 265 +Arta_prefecture 2016-08-01 1 +2015-16_Ekstraklasa 2018-02-01 13 +Alport,_Ontario 2018-02-01 2 +Bongoland 2017-06-01 62 +Alfred_Charles_Post 2016-11-01 11 +Aam_Aadmi_Party_crisis 2016-10-01 1 +Andrea_Moda 2015-07-01 143 +Abdul_Halim_Sharar 2017-08-01 545 +Apostolic_Vicariate_of_Yunnan 2016-12-01 1 +Catherine_Steadman 2016-11-01 5218 +Agastachys_odorata 2015-10-01 38 +9783_Tensho-kan 2016-03-01 2 +AFL_Cairns 2017-10-01 337 +Abomey 2015-06-01 1062 +Anne_Crofton,_1st_Baroness_Crofton 2015-12-01 42 +Cash-flow_return_on_investment 2017-01-01 137 +Alberto_Arvelo_Torrealba_Municipality 2015-08-01 56 +Abyssinian_Shorthorned_Zebu 2017-09-01 124 +Albanian_hip_hop 2016-01-01 1812 +Alphonso_IV_of_Portugal 2016-02-01 12 +19th_The_Alberta_Mounted_Rifles 2016-10-01 1 +Chinese_shadow_theatre 2016-04-01 1 +American_Committee_of_the_Fourth_International 2017-08-01 4 +2014_Bahrain_GP2_Series_round 2016-03-01 80 +Alexandrian_orthodox 2017-09-01 2 +2010_Hurricane_Season 2015-05-01 18 +1938_All-Ireland_Senior_Camogie_Championship_Final 2017-01-01 1 +ATC_code_D01 2018-01-01 203 +Albedo 2015-08-01 23484 +Chavigny,_Meurthe-et-Moselle 2017-01-01 12 +Becky_Essex 2015-07-01 51 +Archaeological_Museum_Padre_Le_Paige 2018-02-01 2 +Abu_Bakar_Sillah 2017-01-01 5 +Back_chat 2017-01-01 2 +Anchylobela_dyseimata 2015-12-01 11 +Anthony_Overton 2017-03-01 261 +Bear_maul 2016-04-01 3 +Ambarawa,_Central_Java 2016-01-01 1 +Amber_lager 2016-11-01 87 +2nd_LAAD 2017-09-01 8 +Ashiya,_Hyogo 2018-03-01 24 +Angels_at_Risk 2018-02-01 74 +Audrey_Marie_Munson 2016-03-01 17 +1984_Australian_Football_Championships 2017-01-01 27 +Ammonia_fountain 2016-06-01 434 +Allister_Bentley 2018-03-01 11 +Alsager_Hay_Hill 2016-10-01 72 +1753_English_cricket_season 2015-05-01 51 +2009-10_New_Jersey_Devils_season 2016-10-01 1 +An_Untamed_State 2016-05-01 1109 +Beatrice_Carmichael 2016-11-01 5 +Abdul_Ghani_Ahmad 2017-12-01 115 +Arteria_suralis 2017-02-01 3 +Berzasca_River 2017-01-01 1 +Angel_Attack 2015-09-01 98 +1969_San_Francisco_49ers_football_team 2017-11-01 1 +Anthony_Beilenson 2017-09-01 114 +Crystalline_Entity 2016-04-01 180 +Granice 2017-01-01 2 +203rd_General_Hospital 2017-07-01 44 +Acrocercops_rhombiferellum 2017-12-01 20 +Ampliglossum_blanchetii 2017-05-01 1 +11553_Scheria 2017-03-01 2 +Ashkenozi 2017-02-01 1 +2010_Calder_Cup_Playoffs 2018-01-01 9 +Alice_Caymmi 2016-01-01 121 +Alfredo_Alvar 2017-04-01 44 +2006_Legends_Tour 2017-07-01 30 +Albano_Albanese 2015-10-01 53 +1943_Frankford_Junction_train_wreck 2016-08-01 510 +Evans_Court_Apartment_Building 2016-04-01 4 +Abu_al-Rayhan_Muhammad_ibn_al-Biruni 2017-11-01 1 +Abubakar_Muhammad_Rimi 2015-05-01 4 +Dostpur 2016-11-01 26 +Accessories_Council_Excellence_Awards 2016-03-01 14 +2006_North_American_heat_wave 2015-06-01 1161 +Amstelodamum 2017-09-01 12 +A_Very_Peculiar_Practice 2016-08-01 1860 +Allegorie_der_Liebe 2015-09-01 1 +Alex_Mackie 2017-02-01 95 +1812_Homestead_Farm_and_Museum 2017-09-01 29 +Argus_distribution 2016-03-01 8 +Anthony_Thomas_Stover 2017-02-01 1 +Arthur_Shallcross 2016-11-01 20 +Antoine_Francois_Fourcroy 2018-01-01 1 +Abbas_Halim 2016-11-01 21 +Akiva_Baer_ben_Joseph 2017-08-01 1 +Balatonfuered 2016-11-01 3 +Antemnae 2017-11-01 204 +Cling_Cling 2017-06-01 93 +B_flat_major 2017-01-01 28 +AirExplore 2017-12-01 930 +Auckland_Super_Sprint 2015-11-01 120 +Alfredo_De_Gasperis 2017-12-01 793 +Geoffrey_I_of_Vianden 2017-01-01 5 +Copa_de_Zaachila 2016-04-01 6 +Alboacen 2017-09-01 1 +BNH_Hospital_Bangkok 2017-06-01 2 +Agricultural_health_and_safety 2016-09-01 1 +Chiasms 2017-06-01 2 +Al_Karaana 2016-05-01 58 +Alberta_Highway_872 2016-11-01 1 +Among_the_mourners 2016-03-01 1 +Achema_Power_Plant 2015-06-01 55 +ATSE_Graz 2017-10-01 65 +Arthroscopy 2017-02-01 11721 +2010-2012_European_Nations_Cup_Second_Division 2018-01-01 7 +1967_Cincinnati_Reds 2015-08-01 4 +24th_Golden_Disc_Awards 2017-05-01 71 +Johnny_Floyd 2017-01-01 17 +Arthur_Rupin 2016-02-01 5 +Alpine_skiing_at_the_2011_Canada_Winter_Games 2015-09-01 38 +College_Press_Service 2017-01-01 8 +American_Psycho 2015-08-01 55567 +CBC_Winnipeg 2017-06-01 17 +Burning_the_process 2016-04-01 1 +2011_Stanley_Cup_playoffs 2017-01-01 1036 +Andrew_Mumford 2017-01-01 6 +1925_in_fine_arts_of_the_Soviet_Union 2018-02-01 28 +Aragvi_river 2017-02-01 2 +Andrew_Adamson 2018-03-01 16269 +Arcides_fulvohirta 2016-10-01 1 +Araya_Selassie_Yohannes 2015-11-01 423 +Apartment_house 2016-09-01 85 +Advanced_Art 2015-12-01 171 +1028_Lydina 2015-06-01 53 +2005_July_6_United_Nations_assault_on_Cite_Soleil,_Haiti 2017-04-01 2 +Adolph_Weiss 2015-06-01 98 +Adam_Jerzy_Czartoryski 2015-09-01 1237 +1980_United_States_presidential_election 2017-05-01 56 +1956_Oscars 2016-08-01 10 +Burundian_Senate_election,_2005 2016-04-01 1 +Amarolea_floridana 2015-07-01 3 +August_Bier 2015-12-01 514 +Arbelodes_sebelensis 2018-03-01 6 +Abiah_Brown 2018-02-01 1 +A_Maceo_Smith_High_School 2016-10-01 2 +1488_in_architecture 2017-12-01 6 +2009_AMP_Energy_500 2016-04-01 45 +1921_Baylor_Bears_football_team 2017-03-01 21 +Dmitry_Akhba 2015-07-01 43 +2004_Big_12_Conference_Baseball_Tournament 2016-07-01 37 +Abdisalam_Omer 2018-02-01 116 +Alma,_son_of_Alma 2015-08-01 53 +An_Phoblacht 2016-10-01 962 +2009_Turner_Prize 2016-01-01 75 +Jack_Zajac 2017-01-01 24 +1906_Wimbledon_Championships 2016-04-01 22 +Chuckwalla_Valley 2017-06-01 22 +Alien_Quadrology 2016-02-01 1 +Chalcidoptera_contraria 2016-04-01 1 +Alaska_Republican_Gubernatorial_Primary_Election,_2006 2016-02-01 1 +333639_Yaima 2018-02-01 7 +Aquila_hastata 2015-11-01 28 +Al-Fua 2017-07-01 1 +Anihilation 2015-07-01 28 +International_Toy_Fair 2017-01-01 1 +38th_Regiment_Indiana_Infantry 2017-01-01 10 +Andrea_Stella 2017-07-01 75 +Anselmo_de_Moraes 2015-09-01 562 +Applemore 2016-05-01 3 +Akpinar,_Kirsehir 2015-06-01 3 +Ant_nest 2016-05-01 53 +Catherine_of_Siena 2016-11-01 8806 +Barbos 2015-06-01 12 +Amlaib_mac_Iduilb 2017-08-01 2 +Alice_Janowski 2018-03-01 17 +Acacia_leptocarpa 2017-03-01 48 +Al-Hadi_Yahya 2016-01-01 39 +2015_British_Figure_Skating_Championships 2017-07-01 38 +Avenues_Television 2016-03-01 214 +Dendropsophus_sartori 2015-07-01 11 +1952_in_Germany 2015-05-01 63 +Armuchee_High_School 2016-04-01 27 +April_1_RFC 2017-11-01 2 +Caroline_Bliss 2016-11-01 972 +66th_Rice_Bowl 2016-06-01 17 +Alec_Smight 2017-02-01 173 +Alexei_Panin 2017-09-01 3 +Codeword 2016-04-01 84 +Dormice 2015-07-01 63 +2105_BC 2017-11-01 6 +5th_National_Congress_of_Kuomintang 2016-06-01 5 +Caminho_das_Indias 2017-01-01 5 +Agerbo 2017-11-01 2 +Abe_Anellis 2018-01-01 86 +Aceh_Medal 2015-07-01 33 +Alltech_Arena 2016-10-01 144 +Aly_Oury 2016-06-01 260 +757th_Troop_Carrier_Squadron 2017-07-01 2 +Alec_Peters 2017-12-01 2731 +Agua_Buena_Airport 2017-09-01 12 +Alessandro_Livi 2016-08-01 104 +Andkaer 2017-04-01 3 +Cateran 2017-06-01 135 +57th_Venice_International_Film_Festival 2017-04-01 180 +Brijal_Patel 2017-06-01 98 +Cnemaspis_jerdonii 2015-07-01 6 +Aluminum_sodium_salt 2016-10-01 3 +Arnaldo_Antonio_Sanabria_Ayala 2017-09-01 4 +Angels_of_Iron 2018-02-01 83 +Bugs_Bunny_Rabbit_Rampage 2017-06-01 422 +Admiralty_Class_Destroyer 2017-10-01 2 +Atlas_Media 2017-05-01 2 +Arcesilaus_i_of_cyrene 2017-03-01 1 +2011_Tajikistan_national_football_team_results 2017-04-01 13 +Artur_Shakhnazarov 2017-12-01 22 +747_Express_Bus 2018-03-01 20 +101-in-1_Party_Megamix 2017-10-01 188 +Fastpoint_Games 2016-11-01 32 +Analog_Anthology_1 2017-07-01 1 +Archival_bond 2015-09-01 119 +1985_Air_Force_Falcons_football 2017-09-01 4 +American_Airlines_plane_diverted_to_Miami_after_landing_gear_problem 2017-06-01 3 +Adaptive_Evolution_in_the_Human_Genome 2017-08-01 2 +Arthur_Strangways 2015-11-01 5 +1583_in_poetry 2015-09-01 68 +Andrew_igoudala 2015-06-01 2 +Euonychophora 2016-11-01 37 +Catechizing 2016-04-01 4 +1960-61_ice_hockey_Bundesliga_season 2018-03-01 3 +Buk_Vlaka 2017-06-01 10 +Arbor_Day 2018-03-01 16265 +Guan_Sheng 2017-01-01 73 +2014_Barcelona_Open_Banc_Sabadell 2016-08-01 57 +1976-77_Nationalliga_A 2016-04-01 1 +AFL_records 2015-11-01 16 +2005_Tour_Down_Under 2016-10-01 26 +92_BCE 2015-08-01 4 +Bento_Box_Animation 2017-01-01 1 +Alabama_Territory 2018-03-01 1195 +Abdul-Wasa_Al-Saqqaf 2016-07-01 21 +Archbishops_of_Semarang 2017-01-01 6 +Ambivina 2017-10-01 13 +Aghjaghala_Ulia 2017-08-01 2 +Blechnum_novae-zelandiae 2016-11-01 26 +Dictyosome 2016-04-01 19 +Arts_Council_of_Great_Britain 2016-12-01 785 +LBC_Radio 2017-01-01 3 +Ageo,_Saitama 2016-06-01 396 +Babla_Mehta 2016-12-01 674 +2012-13_Russian_Cup 2018-01-01 10 +Chandragupt 2017-06-01 6 +407th_Air_Refueling_Squadron 2016-01-01 96 +Aftermarket 2016-07-01 1253 +A_Portrait_of_New_Orleans 2016-08-01 18 +2000-01_Yemeni_League 2017-03-01 1 +Actinidia_chinensis 2015-11-01 907 +Amsterdam_Tournament_1999 2018-03-01 1 +Arthur_Iberall 2017-02-01 112 +Auricula_Meretricula 2016-02-01 103 +Archbishop_of_Lahore 2016-09-01 8 +Chippewa_Indians_of_Montana 2016-04-01 9 +Abidjan-Niger_Railway 2018-01-01 22 +29th_Annual_Grammy_Awards 2017-05-01 1087 +Ateles_geoffroyi_frontatus 2017-06-01 3 +Enrico_Cernuschi 2016-11-01 3 +A4183_road 2017-02-01 8 +Ahrayut 2016-10-01 75 +Alison_Castle 2016-03-01 55 +Automobile_aftermarket 2016-10-01 5 +2008_GAINSCO_Auto_Insurance_Indy_300 2016-07-01 51 +1937_Scottish_Cup_Final 2017-04-01 126 +2005_Clipsal_500_Adelaide 2018-02-01 22 +Farid_Farjad 2016-04-01 120 +13_Tribes_of_Long_Island 2015-12-01 11 +Afroneta_bamilekei 2017-01-01 2 +Frederick_Stuart_Greene 2017-01-01 1 +Andre_Braugher 2017-04-01 37655 +1906_International_Lawn_Tennis_Challenge 2017-10-01 73 +2009-10_NFL_Playoffs 2016-01-01 69 +Cricket_Wellington 2016-11-01 2 +Craig_Blazer 2015-07-01 21 +Aeolidiella_orientalis 2017-05-01 3 +Andre_Prokovsky 2017-06-01 4 +Angela_McKee 2017-11-01 14 +Airbase_Golubovci 2016-10-01 1 +2011_ISAF_Sailing_World_Championships 2017-05-01 89 +Bartica_Airport 2017-06-01 27 +Agusan_Dam 2016-09-01 454 +Bosque_Real_Country_Club 2015-07-01 42 +Georges_Duhamel 2017-01-01 122 +Allrounder 2017-03-01 63 +2017_Missouri_State_Bears_football_team 2017-09-01 868 +Allons_a_Lafayette 2017-11-01 17 +Agathla 2015-05-01 105 +1086_in_poetry 2015-09-01 25 +Absolute_extreme 2017-09-01 1 +Agathe_Bonitzer 2017-12-01 229 +Chinese_Red_Pine 2017-06-01 18 +Angular_dispersion 2016-02-01 11 +Jean-Sebastian_Giguere 2017-01-01 2 +Actinium-235 2018-03-01 4 +Ago,_filo_e_nodo 2017-02-01 11 +Aranea_cruentata 2016-03-01 1 +2009_Korea_National_League 2017-11-01 19 +Americom-8 2016-08-01 28 +2006_Junee_Bushfire 2018-03-01 81 +2013_Major_League_Baseball_Home_Run_Derby 2017-09-01 182 +1928_US_Presidential_Election 2016-12-01 42 +After-eighty_generation 2016-02-01 127 +1932_Hawthorn_Football_Club_season 2017-07-01 16 +Amelia_Elizabeth_Mary_Rygate 2017-05-01 2 +Aline_Khalaf 2017-12-01 465 +Akron_Junction,_New_York 2017-07-01 56 +Apollo_moon_landing_conspiracy_theories 2015-09-01 4 +1978_National_League_Championship_Series 2017-03-01 325 +1959-60_German_football_championship 2017-08-01 5 +Almost_a_Bride 2017-01-01 1 +Andrew_Lysaght,_junior 2015-10-01 20 +1902_Otani_expedition 2018-02-01 1 +1892_Currie_Cup 2016-09-01 53 +1988_USC_Trojans_football_team 2016-10-01 494 +1944_in_Northern_Ireland 2016-12-01 46 +Alfred_Acherman 2017-07-01 1 +Arcadia,_Nebraska 2017-02-01 148 +4_x_400_metre_relay 2018-03-01 1 +A4030_road 2016-07-01 1 +Chi-li 2016-11-01 3 +Aircraft_fairing 2016-11-01 1861 +Buddhism_in_Belize 2015-07-01 40 +Alameda_County_Open 2017-02-01 33 +Area_of_countries_and_regions_of_the_United_Kingdom 2017-10-01 6 +2014_Weber_State_Wildcats_football_team 2016-10-01 47 +American_Journal_of_Comparative_Law 2016-04-01 62 +A_Teaspoon_Every_Four_Hours 2017-03-01 47 +Astasis 2016-03-01 1195 +Akhrakouaeronon 2015-11-01 62 +Annenkrone 2016-03-01 40 +Ballotine 2016-12-01 4753 +2000_Kipawa_earthquake 2015-11-01 139 +Archdiocese_of_cashel_and_emly 2017-01-01 1 +Chevrolet_SS396 2017-01-01 1 +Achyroseris 2016-03-01 1 +Daniel_Pulteney 2016-11-01 29 +2006_Major_League_Baseball_draft 2017-07-01 10637 +Adetunji_Idowu_Olurin 2016-01-01 37 +Ardatov,_Nizhny_Novgorod_Oblast 2017-04-01 18 +Andrew_Hilditch 2015-08-01 398 +A_Very_Merry_Daughter_Of_the_Bride 2017-04-01 67 +1993_in_radio 2017-08-01 85 +Deltan 2016-11-01 91 +Adnan_Custovic 2017-12-01 26 +Di_Gennaro 2017-01-01 4 +237_AD 2017-11-01 1 +Aaron_Gombar 2018-03-01 2 +Acrolophus 2017-04-01 47 +Alfred_Bergman 2017-06-01 27 +Charles_Bebb 2017-06-01 39 +Dirico 2017-01-01 24 +1982_Major_League_Baseball_Draft 2016-12-01 90 +DDT_wrestling 2016-11-01 4 +1988-89_Houston_Rockets_season 2016-02-01 10 +Acacia_loderi 2015-11-01 35 +2015_Deauville_American_Film_Festival 2016-10-01 126 +Andropadus_importunus 2016-02-01 9 +Antonio_Bacchetti 2017-04-01 52 +Ann_Trindade 2015-09-01 49 +5_x_Monk_5_x_Lacy 2016-05-01 37 +Barlochan,_Ontario 2017-06-01 2 +Achaian 2017-03-01 35 +Flow_rider 2017-01-01 1 +Antiblemma_discerpta 2018-02-01 1 +1997_Illinois_Fighting_Illini_football_team 2017-11-01 331 +Ahrntal 2016-03-01 540 +Apollo_Conference 2015-10-01 329 +Algenib_in_Perseus 2016-01-01 1 +Craig_Norgate 2016-04-01 42 +Antwerp_Zoo 2015-12-01 879 +Cold_Contagious 2017-06-01 161 +Bolito 2016-11-01 181 +Chinese_bridges 2016-11-01 1 +14th_Indiana_Infantry_Regiment 2017-04-01 115 +Bindunuwewa_massacre 2015-07-01 52 +Eastshore_Highway 2016-11-01 2 +Daemonologie 2017-01-01 1655 +Aero_Pacifico 2015-07-01 1 +Blue_Ribbon_Schools_Program 2017-06-01 557 +Ash_Township,_MI 2018-02-01 3 +Al-Hatab_Square 2018-02-01 450 +Alje_Vennema 2018-02-01 187 +1920_All-Ireland_Senior_Football_Championship_Final 2016-05-01 40 +Criss_Oliva 2016-11-01 801 +Bethlehem,_Ohio 2017-01-01 16 +1976_WHA_Amateur_Draft 2015-08-01 47 +Angela_Fimmano 2017-06-01 17 +Alexander_Bonini_of_Alexandria 2017-09-01 1 +Anarchist_faq 2015-05-01 13 +Aleksander_Benedykt_Sobieski 2016-05-01 240 +Cape_Florida_Lighthouse 2016-04-01 6 +Fernando_VI_of_Spain 2017-01-01 3 +Crossing_number 2017-06-01 29 +1984_NSL_Cup 2017-05-01 26 +Barbara_Weldon 2015-06-01 29 +Andreas_Olsen 2017-01-01 32 +Battle_of_Baima 2016-04-01 2 +Amory_Hansen 2016-05-01 26 +Akhmimic 2015-11-01 41 +Al_Awda 2018-02-01 18 +Adelheid-Marie_of_Anhalt-Dessau 2016-07-01 70 +Americans_for_Technology_Leadership 2015-10-01 90 +Belizean_diplomatic_missions 2017-06-01 3 +African_communist 2016-05-01 3 +Andosol 2016-09-01 246 +Alan_Attraction 2016-05-01 15 +A_Yank_in_Rome 2015-12-01 70 +2004_in_the_United_Arab_Emirates 2018-02-01 33 +Additionality 2017-06-01 371 +Assassination_of_Trotsky 2015-06-01 47 +Alice_Sotero 2018-02-01 27 +Agyneta_platnicki 2016-04-01 4 +Alexandra_Vasilyevna_Velyaminova 2015-07-01 30 +1881_in_Chile 2016-06-01 16 +Arterial_ischemic_stroke 2018-01-01 57 +Astro_Glacier 2015-09-01 27 +Chester_Earl_Merrow 2017-06-01 58 +Alejandro_de_la_Madrid 2015-11-01 1630 +70936_Kamen 2017-08-01 1 +AK_Steel_Holding_Corp 2015-08-01 8 +1124_Stroobantia 2017-10-01 23 +Asian_Wedding 2016-10-01 15 +23837_Matthewnanni 2015-10-01 18 +Acharya_Jagadish_Chandra_Bose_Indian_Botanic_Garden 2017-03-01 4893 +Betsy_Hodges 2016-04-01 560 +Arthur_and_the_Invisibles 2015-08-01 14924 +Arkansas-Ole_Miss_football_rivalry 2015-05-01 7 +Asia_Cup 2015-09-01 5938 +Arginine_racemase 2016-12-01 15 +585th_Field_Company,_Royal_Engineers 2018-03-01 1 +1975_Stagg_Bowl 2017-08-01 6 +Dame_Commander_of_The_Most_Honourable_Order_of_the_Bath 2017-01-01 1 +Askajian 2016-02-01 26 +2006_Nebraska_Cornhuskers_football_team 2015-08-01 975 +Cicero_Francis_Lowe_House 2015-07-01 10 +Conan_IV,_Duke_of_Brittany 2016-11-01 252 +2005_World_Modern_Pentathlon_Championships 2016-07-01 38 +1946_Aleutian_Islands_earthquake 2017-03-01 2019 +ANKRD17 2017-09-01 19 +1970_Maryland_Terrapins_football_team 2017-11-01 42 +Ali_Dehkhoda 2017-04-01 1 +1244_in_art 2015-07-01 22 +1520s_in_Denmark 2016-01-01 20 +Abdoulaye_Gaye 2017-12-01 10 +An_Angel_Has_Arrived 2016-03-01 36 +1453_BC 2015-08-01 26 +2017_National_Games_of_China 2017-05-01 1293 +A_Night_in_Sickbay 2016-05-01 251 +Dateline_Diamonds 2017-01-01 53 +419_guestbook_spamming 2016-02-01 5 +Familiar_bluet 2017-01-01 4 +Abu_Bakr_Mirza 2017-10-01 86 +7272_Darbydyar 2017-11-01 4 +Ages_of_consent_in_Latin_America 2017-03-01 961 +1982_Japan_Soccer_League_Cup 2016-04-01 14 +2810_BC 2015-07-01 9 +Druga_Liga_Republike_Srpske 2017-01-01 1 +1998_Swedish_Rally 2017-09-01 34 +1567_in_Norway 2015-10-01 89 +126_Army_Engineer_Regiment,_Royal_Engineers 2016-03-01 5 +2017_American_League_Wild_Card_Game 2017-10-01 25120 +August_Follen 2017-01-01 2 +Ala_Gertner 2015-11-01 876 +Glenwood,_Harford_County,_Maryland 2017-01-01 3 +Applied_ecology 2017-12-01 730 +Ariarathes_V_Eusebes_Philopator 2018-03-01 5 +2006_AFC_Champions_League 2017-09-01 947 +60_minutes_2 2016-10-01 2 +Embryonic_shield 2017-01-01 2 +2001_Meath_Intermediate_Football_Championship 2015-11-01 8 +Apparition_of_Christ_to_Madonna 2017-06-01 5 +Hoosier_Road_Elementary 2017-01-01 1 +Arua_Uda 2016-12-01 29 +Array_comprehension 2015-11-01 8 +Baszki 2015-06-01 36 +Akron_Neighborhoods 2016-01-01 4 +Catholic_Church_in_Costa_Rica 2017-06-01 85 +Canada-Sweden_relations 2015-07-01 1 +Barza_Radio_Community 2016-11-01 6 +Dalhousie_Middle_School 2016-11-01 5 +Alliphis_bakeri 2017-11-01 2 +Bartica_massacre 2017-06-01 53 +30th_January 2015-11-01 10 +1920_revolution 2017-05-01 5 +Amyraldism 2017-08-01 828 +AA_Jefferson_District 2016-05-01 45 +Eunebristis_cinclidias 2017-01-01 1 +A_Scott_Connelly 2017-06-01 5 +Antony_Durose 2016-07-01 19 +Arval_Brethren 2017-11-01 579 +Anthidium_dissectum 2017-05-01 2 +Aru,_Democratic_Republic_of_the_Congo 2017-04-01 81 +1956-57_West_Indian_cricket_season 2017-04-01 2 +2014_Moscow_Film_Festival 2017-08-01 2 +Anna_Gurji 2017-06-01 27 +Allen_Memorial_Medical_Library 2016-07-01 120 +Anton_Sistermans 2017-02-01 36 +Clotheshorses 2017-06-01 1 +36_Stratagems 2017-08-01 25 +Attack_of_the_crab_monsters 2016-10-01 16 +30_rock_awards 2015-09-01 2 +Aeroflot,_Uralsk_Civil_Aviation_Directorate 2017-08-01 2 +Amblyseius_parabufortus 2017-06-01 3 +Indian_coral_tree 2017-01-01 3 +3285_Ruth_Wolfe 2016-02-01 9 +Anderson_da_Silva_Gibin 2016-08-01 73 +5001st_Composite_Group 2017-03-01 4 +Danzik 2016-04-01 8 +4810_Ruslanova 2016-03-01 2 +Arkendale,_Virginia 2016-04-01 14 +Al_Francis_Bichara 2016-09-01 239 +Cayena 2017-01-01 1 +A_Glass_of_Darkness 2017-04-01 95 +GMC_CCKW 2017-01-01 887 +Alabama_State_Route_107 2015-11-01 13 +2011_in_motorsport 2017-12-01 26 +Adecco_General_Staffing,_New_Zealand 2017-12-01 86 +Anbargah 2015-10-01 6 +1995_Asian_Cup_Winners_Cup 2016-06-01 7 +1986_Wales_rugby_union_tour_of_the_South_Pacific 2016-12-01 30 +Adya_Goud_Brahmin 2017-03-01 2 +Akcakiraz 2015-08-01 5 +24249_Bobbiolson 2017-12-01 4 +Ahmanson_Theatre 2016-02-01 801 +Abdullah_ibn_Jahsh 2016-10-01 196 +1937_in_Chile 2015-08-01 24 +2000_in_England 2016-01-01 57 +A_Deepness_In_The_Sky 2017-08-01 2 +Area_code_678 2015-07-01 480 +Avalon_Hill 2017-01-01 880 +Anna,_Duchess_of_Prussia 2015-12-01 315 +Alexandr_Syman 2017-04-01 24 +7400_series_logic 2017-11-01 2 +Greenleaf_Township,_Minnesota 2017-01-01 1 +Acetylsal 2017-04-01 6 +Earth_and_Man_National_Museum 2016-11-01 43 +Affetside 2015-10-01 185 +1971_CFL_season 2015-08-01 202 +Beth_Bader 2016-11-01 21 +Enrolled_Nurse 2016-04-01 5 +Al-Azraq 2016-12-01 22 +4th_South_Carolina_Regiment 2015-07-01 42 +Amanda_Overmyer 2017-02-01 356 +Auto_wrap 2016-02-01 8 +Anonymous_internet_banking 2015-07-01 98 +Curatoria 2016-11-01 3 +A-roll 2016-05-01 134 +Accra_hearts_of_oak_sc 2017-10-01 4 +Apostasy_from_Judaism 2015-12-01 45 +Acantharctia_tenebrosa 2018-01-01 3 +Abigail_Keasey_Frankel 2017-11-01 25 +2008_Paraguayan_general_election 2016-01-01 1 +Adams_motor 2015-09-01 37 +Drummond_Community_High_School 2017-01-01 17 +Andrews_Nakahara 2017-10-01 474 +10th_Maccabiah 2017-04-01 30 +Ackerman,_Rick 2015-08-01 4 +Dumri,_Buxar 2016-11-01 35 +Asking_Jesus_into_your_heart 2016-09-01 1 +Adamowicz_brothers 2016-12-01 161 +Alien_Musibat 2017-12-01 2 +Ahmad_Al_Tayer 2016-04-01 39 +Analytical_phonics 2016-01-01 520 +Do_It_Good 2016-04-01 281 +2004_Kumbakonam_School_fire 2017-12-01 2114 +1977_Chattanooga_Mocs_football_team 2016-08-01 3 +Globe_valves 2017-01-01 11 +Abelmoschus_crinitus 2016-04-01 18 +1874_Yale_Bulldogs_football_team 2016-02-01 37 +Climer 2017-06-01 1 +Auchroisk 2017-06-01 37 +2010_Albirex_Niigata_season 2016-10-01 19 +Adhocracy 2017-06-01 2217 +Chios_Massacre 2015-07-01 1110 +African_Red_Slip 2017-02-01 221 +1976_Portland_Timbers_season 2016-07-01 41 +Alsace-Larraine 2015-09-01 2 +3750_Ilizarov 2017-07-01 12 +Aleksandr_Shkaev 2017-05-01 1 +32_bar_form 2016-01-01 12 +Aequatorium_jamesonii 2018-03-01 14 +Abade_neiva 2016-09-01 2 +Arakvaz 2016-08-01 23 +207_Sqn 2017-10-01 2 +Ducal_hat 2016-11-01 10 +2_Degrees 2017-03-01 19 +Ahmeddiyya_Islam 2016-03-01 4 +Amidi-ye_Kohneh 2017-11-01 13 +Contributions_to_Indian_Sociology 2016-11-01 42 +Clark_Leiblee 2016-04-01 5 +Abraham_of_Strathearn 2017-09-01 14 +Bangor_City_Forest 2015-07-01 34 +Alireza_Afzal 2017-02-01 24 +Akhaura-Laksam-Chittagong_Line 2015-09-01 30 +1973_National_500 2017-10-01 80 +Attachment 2017-09-01 1356 +Kellett_Strait 2017-01-01 5 +Ajarani_River 2018-01-01 30 +Akbarabad,_Khomeyn 2017-03-01 8 +Adriaan_Theodoor_Peperzak 2018-02-01 88 +Alucita_dryogramma 2015-09-01 1 +Brit_Med_J 2015-07-01 1 +4th_Metro_Manila_Film_Festival 2015-09-01 80 +Alialujah_Choir 2018-03-01 221 +1953-54_SM-sarja_season 2016-09-01 1 +Air_Force_Song 2018-02-01 19 +4-6_duoprism 2016-03-01 30 +Ashley_Spurlin 2017-06-01 94 +Asfaq_Kayani 2017-10-01 1 +1607_in_architecture 2016-06-01 7 +4-way_speakers 2015-10-01 2 +Blue_Heeler 2015-07-01 149 +5_Euro 2017-04-01 16 +2009_Spa-Francorchamps_GP2_Series_round 2016-04-01 12 +2015_Guru_Granth_Sahib_desecration 2015-11-01 6821 +Agriculture_Marketing_Service 2016-07-01 2 +2006_Football_League_Cup_Final 2015-11-01 1711 +2008_Uber_Cup_group_stage 2016-02-01 40 +1923_PGA_Championship 2016-08-01 97 +Fannie_Bay 2016-04-01 6 +AlchemyAPI 2016-04-01 344 +Cinema_of_Italy 2017-01-01 1217 +Arodes 2016-11-01 36 +Damien_Marley 2015-07-01 168 +Al_Jumayl_Baladiyat 2015-08-01 5 +2015_Alabama_State_Hornets_football_team 2017-06-01 32 +Aglossa_tanya 2016-03-01 1 +73rd_Pennsylvania_Infantry 2017-01-01 12 +2015_European_Junior_and_U23_Canoe_Slalom_Championships 2018-02-01 31 +African_Leopard 2016-08-01 64 +Faverolles,_Orne 2017-01-01 5 +Aaron_Fukuhara 2015-11-01 17 +Annular_ligaments_of_trachea 2017-01-01 31 +2014_US_Open_Series 2016-11-01 35 +A_Better_Mousetrap 2018-02-01 4 +Dibaklu 2016-11-01 1 +At_Samat_District 2015-06-01 35 +Aaron_Peasley 2017-05-01 32 +Apistomology 2015-12-01 2 +Buyat_Bay 2015-07-01 54 +1942_Estonian_Football_Championship 2017-05-01 22 +Action_for_Autism 2016-06-01 346 +100_Hz 2015-06-01 72 +2003_Arizona_State_Sun_Devils_football_team 2017-05-01 82 +Antona_obscura 2016-09-01 1 +Akiko_Sugiyama 2015-12-01 32 +Elysburg 2016-11-01 8 +2017_New_South_Wales_Cup 2017-09-01 38 +2011-12_Gold_Coast_United_FC_season 2017-06-01 1 +Agency_for_the_Prohibition_of_Nuclear_Weapons_in_Latin_America_and_the_Caribbean 2016-04-01 15 +Albert_Dunn 2017-08-01 87 +Hahamakin_ang_Lahat 2017-01-01 984 +2013_Spuyten_Duyvil_derailment 2017-11-01 5 +Ayling 2017-01-01 5 +Anti-Establishment 2016-10-01 1 +1951_Spanish_motorcycle_Grand_Prix 2018-01-01 48 +2009-10_Brunei_Premier_League 2017-08-01 4 +23_Ursae_Majoris 2016-08-01 90 +1927-28_Austrian_football_championship 2017-08-01 4 +Andrew_McKeever 2017-10-01 3 +Clinocottus 2017-06-01 23 +2006_State_of_Origin 2015-11-01 7 +2013-14_Los_Angeles_Clippers_season 2015-07-01 8 +Cor_Jesu 2017-01-01 1 +Besseringen_B-Werk 2017-06-01 158 +Amy_Hempel 2017-07-01 1091 +Franc-Comtois 2016-04-01 2 +Allium_giganteum 2017-07-01 1103 +Abishai 2016-08-01 56 +Abraham_Clark_High_School 2016-04-01 88 +Baku_chronology 2015-06-01 1 +22nd_MEU 2015-10-01 39 +2015_Open_Engie_de_Touraine 2015-10-01 195 +Churchill_Bowl 2017-06-01 30 +AGMARK 2017-08-01 117 +American_standard_wire_gauge 2017-12-01 3 +Araby,_LA 2015-05-01 2 +217_BC 2016-12-01 202 +2008_Trinidad_and_Tobago_League_Cup 2016-02-01 6 +Alazan_Bay 2015-12-01 22 +Aluminum_fencing 2015-11-01 48 +Achilles_tendinitis 2016-10-01 5884 +AFP_Peacekeeping_Operations_Center 2017-01-01 64 +2013_Xinjiang_clashes 2016-01-01 1 +Arborea_Giudicato_of_Arborea 2015-09-01 3 +1941_Cleveland_Rams_season 2017-06-01 40 +Ju_Posht,_Rasht 2017-01-01 3 +Ascalenia 2016-07-01 10 +Aplectoides 2018-02-01 4 +European_Cup_1969-70 2016-11-01 14 +Armen_Mkertchian 2016-05-01 9 +2015_Aspria_Tennis_Cup_-_Singles 2018-02-01 1 +14_August_1947 2017-11-01 6 +Adobe_Creative_Suite_1 2015-05-01 1 +IC_chips 2017-01-01 2 +Austo_AE300 2016-07-01 4 +Date_palms 2015-07-01 79 +BCS_bowl_game 2017-06-01 13 +AR_Border 2017-06-01 1 +Aranda_de_Duero 2016-04-01 256 +1919_Wake_Forest_Demon_Deacons_football_team 2016-01-01 16 +All_The_Wrong_Clues_For_The_Right_Solution 2017-10-01 9 +Allan_Campbell_McLean 2015-06-01 131 +Bradford_Council_election,_2011 2017-06-01 5 +Astronomy_and_astrophysics 2015-09-01 62 +Dutch_Antillean_people 2015-07-01 57 +Army_Radio 2018-03-01 711 +BBVA_Bancomer 2016-11-01 709 +Lake_Aloha 2017-01-01 30 +Andy_Bean 2018-02-01 3092 +1941_Pittsburgh_Steelers_season 2016-05-01 147 +Aniopi_Melidoni 2016-06-01 4 +Aglossosia_fusca 2017-09-01 3 +Art_books 2017-04-01 36 +1929_Washington_Senators_season 2017-04-01 47 +Antaeotricha_congelata 2016-12-01 10 +Douglas_C-54G-5-DO_Skymaster 2017-01-01 1 +Chris_Jamison 2016-11-01 827 +Ace_Blackwell 2015-11-01 9 +Abdul_Qadir_Fitrat 2018-02-01 32 +Arnoldo_Vizcaino 2017-10-01 1 +2012_Open_EuroEnergie_de_Quimper_-_Doubles 2017-12-01 3 +Dale_Rominski 2017-01-01 7 +ADHD_coaching 2015-06-01 50 +Claire_Yiu 2016-11-01 209 +Applicant 2015-10-01 253 +Apache_OpenOffice 2017-06-01 6031 +Abel_Kiprop_Mutai 2015-09-01 22 +Airdrome_Taube 2017-04-01 46 +Andrey_Viktorovich 2016-06-01 1 +American_Idol_controversy 2016-03-01 36 +Anthrenocerus_confertus 2018-01-01 17 +Appraisal_Subcommittee 2018-03-01 17 +Babusa 2015-07-01 3 +500_homeruns 2016-06-01 1 +Argentina_national_volleyball_team 2016-08-01 64 +Chief_prosecutor_of_Russia 2015-07-01 1 +Absolution_DVD 2015-06-01 1 +1,3-Beta-glucan_synthase 2017-05-01 440 +Dave_Sinardet 2016-04-01 26 +Adeline_Whitney 2018-03-01 10 +Allon_shvut 2016-07-01 3 +2012_Penn_State_Nittany_Lions_football_season 2017-12-01 3 +Coleman-Franklin-Cannon_Mill 2017-01-01 4 +Action_director 2015-05-01 93 +AD_547 2016-01-01 1 +Acta_germanica 2017-09-01 1 +Abu_Dhabi_Global_Market_Square 2017-01-01 35 +Kozo_Shioya 2017-01-01 7 +China_Investment_Corp 2017-01-01 2 +Dmitri_Zakharovich_Protopopov 2016-04-01 129 +Anatra_Anadis 2017-10-01 208 +Archaikum 2017-11-01 5 +2000_Webby_Awards 2017-04-01 360 +2003_BCR_Open_Romania_-_Singles 2016-08-01 2 +Abacetus_bisignatus 2016-09-01 79 +American_school_of_kinshasa 2016-01-01 1 +Anna,_7th_Duchess_of_Bedford 2016-08-01 8 +Black_majority_district 2016-11-01 3 +Dagma_Lahlum 2015-07-01 1 +Credit_Saison 2015-07-01 517 +Ariyankuppam_firka 2016-02-01 19 +Annette_Fuentes 2016-06-01 17 +Angerstein,_John 2015-12-01 2 +Annenkov_Island 2016-03-01 280 +Anne_Frank_museum 2016-06-01 67 +Annales_sancti_Amandi 2017-06-01 22 +L-FABP 2017-01-01 1 +Alvord,_TX 2017-06-01 12 +2006_World_Team_Table_Tennis_Championships 2016-05-01 119 +Angriffen 2015-12-01 9 +Anthony_Oppenheimer 2017-03-01 452 +Absamat_Masaliyevich_Masaliyev 2016-09-01 1 +Airborne_Museum_at_Aldershot 2016-03-01 41 +Aktiubinsk_Oblast 2015-08-01 7 +100_East_Wisconsin 2015-05-01 782 +7th_Bangladesh_National_Film_Awards 2017-08-01 91 +Alejandro_Reyes 2017-12-01 35 +Applied_philosophy 2018-03-01 539 +Adhemar_Pimenta 2016-06-01 146 +Break_the_fourth_wall 2016-04-01 66 +Annoushka_Ducas 2017-10-01 411 +ATC_code_J01CA01 2015-06-01 1 +Evelyn_County,_New_South_Wales 2016-11-01 7 +Elastic_scattering 2016-11-01 1374 +1032_Pafuri 2015-07-01 35 +Andrew_Bromwich 2015-08-01 26 +Ishita_Arun 2017-01-01 249 +Aspergics 2016-07-01 1 +1857_in_Chile 2018-03-01 22 +Breffni 2015-07-01 38 +845_in_poetry 2017-08-01 2 +20321_Lightdonovan 2015-10-01 12 +Arthur_Chandler 2017-12-01 27 +CsISOLatin2 2017-06-01 1 +1900_Grand_National 2016-06-01 69 +Aeritalia_AMX 2017-03-01 3 +B_Sharps 2015-06-01 11 +544_area_code 2015-09-01 2 +30th_Guldbagge_Awards 2015-06-01 37 +Agrippina 2017-08-01 315 +Ardmore 2016-02-01 433 +Amplypterus_panopus 2016-03-01 23 +Alexander_Bukharov 2017-09-01 5 +Alaska_Raceway_Park 2017-01-01 46 +Albanian_National_Road_Race_Championships 2017-03-01 31 +1968_Democratic_National_Convention_protest_activity 2017-10-01 2802 +2012_Birthday_Honours 2017-10-01 427 +2000_NHL_expansion_draft 2017-06-01 1 +A_Town_Where_You_Live 2016-11-01 2920 +Ahmed_Shahzad 2018-03-01 25 +Elisabeth_Svendsen 2016-11-01 39 +2002_FINA_Synchronised_Swimming_World_Cup 2016-08-01 30 +Akatek 2017-04-01 10 +Animation_with_DAZ_Studio 2018-02-01 78 +Fergus_Craig 2016-11-01 119 +Ancel_Nalau 2015-11-01 5 +5171_Augustesen 2017-04-01 20 +Anne_McGuire 2017-11-01 329 +Australian_Photoplay_Company 2015-12-01 6 +1913_in_Canada 2017-04-01 137 +Arhopala_allata 2015-05-01 26 +Il_Paradiso_delle_Signore 2017-01-01 31 +Geri_Palast 2017-01-01 38 +Alan_Abela_Wadge 2017-03-01 77 +22nd_Tactical_Air_Support_Squadron 2017-10-01 7 +Avant_Stellar 2017-06-01 22 +Black_phantom_tetra 2016-11-01 205 +Billy_McCaffrey 2017-01-01 314 +Annie_Furuhjelm 2017-11-01 97 +1992_PGA_Tour 2017-12-01 307 +2008_Chilean_pork_crisis 2016-01-01 55 +2012_Currie_Cup_First_Division 2018-02-01 32 +Aleksei_Fomkin 2015-05-01 144 +Alexander_Krausnick-Groh 2016-05-01 101 +Adam_Richard_Wiles 2017-08-01 5 +ATCvet_code_QA01AD01 2015-09-01 2 +Abu_Bakr_Ibn_Bajja 2017-03-01 5 +Architecture-Studio 2016-04-01 94 +950s_BC 2016-02-01 257 +Abschwunges 2017-07-01 1 +Adonis_Geroskipou 2017-06-01 15 +2008-09_SV_Werder_Bremen_season 2016-03-01 3 +Closed_loops 2016-04-01 1 +AFC_Youth_Championship_1982 2015-12-01 10 +Aquila_Shoes 2015-08-01 209 +9842_Funakoshi 2017-12-01 11 +Educational_quotient 2016-04-01 21 +Antoni_Julian_Nowowiejski 2018-01-01 211 +Adi_Oka_Idhile 2017-11-01 16 +DEXIA-BIL_Luxembourg_Open 2016-11-01 3 +Andrew_James_Simpson 2016-03-01 43 +Alexander_Boksenberg 2017-12-01 61 +1827_in_Denmark 2017-03-01 39 +Afternoon_tea_with_suggs 2017-11-01 3 +Alpha,_MN 2017-06-01 6 +Ari_Onasis 2015-06-01 4 +1961-62_Football_League_First_Division 2015-11-01 1 +Andi_Lila 2015-06-01 2847 +A_Gathering_Of_Old_Men 2018-02-01 1 +Abul_Fazl_al-Abbas 2017-01-01 1 +Asgill,_Charles 2017-08-01 1 +Alexander_Arkhangelsky 2015-07-01 12 +1947-48_Portuguese_Liga 2015-06-01 1 +3rd_MMC_-_Varna 2016-07-01 3 +Alberts,_Wayne 2017-05-01 3 +Alois_Schickelgruber 2018-02-01 9 +Hefner_Stadium 2017-01-01 2 +410912_Lisakaroline 2018-02-01 26 +Academy_at_Mountain_State 2018-03-01 1 +617_Squadron 2016-05-01 489 +Al_Silm_Haji_Hajjaj_Awwad_Al_Hajjaji 2015-07-01 5 +Arturo_Merino_Benitez_Airport 2017-10-01 13 +AEK_Athens_Futsal 2015-06-01 10 +Aggaeus 2018-02-01 2 +Association_for_Retarded_Citizens_of_the_United_States 2017-08-01 3 +Kielce_pogrom 2017-01-01 335 +1351_in_poetry 2016-01-01 17 +1923_Princeton_Tigers_football_team 2017-11-01 41 +Auzata_semipavonaria 2017-01-01 2 +892_in_poetry 2016-01-01 6 +Anton_Krotiak 2017-12-01 2 +Arthur_Shelley 2017-12-01 23 +2003_Kyoto_Purple_Sanga_season 2018-02-01 9 +Frederic_Bowker_Terrington_Carter 2016-04-01 6 +2-orthoplex 2016-03-01 1 +Acacia_australiana 2015-09-01 4 +2012_Newcastle_Knights_season 2016-06-01 103 +Ann_Wrights_Corner,_Virginia 2017-07-01 19 +12557_Caracol 2017-03-01 5 +2001_African_Footballer_of_the_Year 2017-05-01 1 +Bass_Pyramid 2017-01-01 22 +A_noodle 2015-05-01 5 +Aed_Bennan 2018-02-01 2 +1886_Yale_Bulldogs_football_team 2017-10-01 58 +2002_Players_Championship 2016-06-01 54 +African_Skimmer 2017-07-01 2 +3rd_Guldbagge_Awards 2016-12-01 39 +Arrows_A19B 2015-10-01 1 +Archduchess_Elisabetta_of_Austria-Este 2017-08-01 1526 +America_Islands 2015-11-01 1 +1932_Olympic_Games 2016-01-01 9 +2011_Chinese_pro-democracy_protests 2015-11-01 2044 +Bank_walkaway 2016-04-01 113 +594_in_Ireland 2017-04-01 1 +Association_of_Municipal_Corporations 2016-12-01 5 +Andreas_Brantelid 2015-09-01 167 +Amarthal_urf_Unchagaon 2017-05-01 82 +3-methoxymorphinan 2017-04-01 146 +2382_BC 2016-07-01 10 +1763_in_science 2016-07-01 28 +Arvert 2017-04-01 77 +Ale_yeast 2017-12-01 19 +A_Man_Without_a_Soul 2018-03-01 17 +Air_Force_Base_Louis_Trichardt 2017-09-01 1 +Athirson_Mazzoli_de_Oliveira 2017-06-01 3 +Anthony_Chan_Yau 2017-07-01 181 +Basic_Enlisted_Submarine_School 2017-06-01 392 +Aboriginal_Lands_of_Hawaiian_Ancestry 2015-09-01 11 +Fondren_Southwest,_Houston 2017-01-01 4 +3_World_Financial_Center 2017-07-01 64 +1971_IIHF_European_U19_Championship 2017-09-01 9 +1937-38_Allsvenskan 2015-12-01 6 +Christopher_Ashton_Kutcher 2017-06-01 2 +Australian_rules_football_in_south_australia 2016-12-01 1 +Amicable_pair 2018-01-01 7 +Alan_Tomes 2015-11-01 82 +Alexei_Petrovich,_Tsarevich_of_Russia 2015-12-01 3887 +Alexis_Damour 2015-10-01 66 +Bankruptcy_Act_of_1938 2017-06-01 76 +Amphiphyllum 2016-06-01 14 +Conway_High_School_West 2016-04-01 1 +5447_Lallement 2015-11-01 10 +Gabriel_Iddan 2017-01-01 1 +1879-80_Scottish_Cup 2017-04-01 3 +2011_Eneco_Tour 2016-10-01 31 +1471_in_England 2015-11-01 94 +Ashland_Town_Hall 2017-01-01 5 +Archduke_John 2015-05-01 20 +2000_Cameroonian_Premier_League 2017-09-01 18 +1997_flood 2017-11-01 5 +Agile_management 2015-09-01 26677 +Am_841 2017-12-01 3 +Apprentice_Mason 2018-01-01 4 +Hales-Jewett_theorem 2017-01-01 2 +Alien_Abductions 2017-10-01 14 +Arjun_Menon 2016-02-01 370 +Anthokyan 2016-01-01 4 +Automobili_Lamborghini 2016-02-01 1110 +Alain_Prost 2017-04-01 25196 +Fartein_Valen 2016-04-01 90 +Antonio_Galli_da_Bibiena 2016-05-01 5 +Al_Jawf,_Libya 2017-03-01 600 +AD_695 2018-02-01 1 +Amir_chand 2015-11-01 1 +Alcis_obliquisigna 2017-08-01 1 +Chandra_Talpade_Mohanty 2017-01-01 306 +Algerian_safe_house,_Jalalabad 2015-06-01 3 +Jake_Milner 2017-01-01 1 +Alternate_Communications_Center 2017-10-01 1 +In_the_Bleachers 2017-01-01 42 +Alex_Puodziukas 2016-04-01 7 +Altarpiece_of_Pilgrim_II 2018-02-01 2 +Cybernetical_Physics 2017-01-01 3 +Christopher_Unthank 2017-06-01 2 +1982_Independence_Bowl 2015-06-01 102 +Ascoli_Calcio_1898 2018-03-01 1115 +Briggs-Rauscher_reactions 2017-06-01 1 +Adjadja 2018-02-01 45 +Afghanistan_from_Ahmad_Shah_until_Dost_Mohammed 2016-06-01 3 +Catholic_social_doctrine 2017-01-01 6 +2833_BC 2016-11-01 1 +Bethy_Woodward 2016-04-01 38 +Bateman_polynomials 2017-06-01 22 +1966_Buenos_Aires_Grand_Prix 2015-10-01 19 +A_River_Somewhere 2015-10-01 353 +2016-17_BVIFA_National_Football_League 2017-04-01 2 +1909_Major_League_Baseball_season 2015-10-01 362 +1988_Oklahoma_Sooners_football 2017-11-01 2 +2010s_in_Chechen_fashion 2016-10-01 1 +Accademia_Olimpica 2017-08-01 17 +Air_cooling 2015-07-01 2010 +Amir_Saoud 2016-11-01 22 +Alex_Auburn 2015-05-01 52 +Apamea_impulsa 2016-11-01 6 +Australian_federal_election,_2007 2015-07-01 1794 +Ain_Sakhri 2017-10-01 76 +Belosaepiidae 2015-07-01 68 +Acts_of_Parliament_in_the_United_Kingdom 2017-10-01 4070 +Equity_Office 2016-11-01 202 +David_Bintley 2017-01-01 51 +Aksel_Schiotz 2018-03-01 3 +Appropriation_Act_2000 2017-05-01 12 +Edward_Johnson_III 2016-11-01 491 +2006_Ohio_State_Buckeyes_football_team 2016-03-01 1452 +Battle_of_Fort_Beausejour 2015-07-01 97 +Abel_Foullon 2015-12-01 82 +Apollo_VIII 2015-10-01 19 +Carry_on_up_the_jungle 2015-07-01 8 +Armour_villa 2017-05-01 4 +201_Poplar 2015-08-01 265 +Arta_prefecture 2016-08-01 1 +2015-16_Ekstraklasa 2018-02-01 13 +Alport,_Ontario 2018-02-01 2 +Bongoland 2017-06-01 62 +Alfred_Charles_Post 2016-11-01 11 +Aam_Aadmi_Party_crisis 2016-10-01 1 +Andrea_Moda 2015-07-01 143 +Abdul_Halim_Sharar 2017-08-01 545 +Apostolic_Vicariate_of_Yunnan 2016-12-01 1 +Catherine_Steadman 2016-11-01 5218 +Agastachys_odorata 2015-10-01 38 +9783_Tensho-kan 2016-03-01 2 +AFL_Cairns 2017-10-01 337 +Abomey 2015-06-01 1062 +Anne_Crofton,_1st_Baroness_Crofton 2015-12-01 42 +Cash-flow_return_on_investment 2017-01-01 137 +Alberto_Arvelo_Torrealba_Municipality 2015-08-01 56 +Abyssinian_Shorthorned_Zebu 2017-09-01 124 +Albanian_hip_hop 2016-01-01 1812 +Alphonso_IV_of_Portugal 2016-02-01 12 +19th_The_Alberta_Mounted_Rifles 2016-10-01 1 +Chinese_shadow_theatre 2016-04-01 1 +American_Committee_of_the_Fourth_International 2017-08-01 4 +2014_Bahrain_GP2_Series_round 2016-03-01 80 +Alexandrian_orthodox 2017-09-01 2 +2010_Hurricane_Season 2015-05-01 18 +1938_All-Ireland_Senior_Camogie_Championship_Final 2017-01-01 1 +ATC_code_D01 2018-01-01 203 +Albedo 2015-08-01 23484 +Chavigny,_Meurthe-et-Moselle 2017-01-01 12 +Becky_Essex 2015-07-01 51 +Archaeological_Museum_Padre_Le_Paige 2018-02-01 2 +Abu_Bakar_Sillah 2017-01-01 5 +Back_chat 2017-01-01 2 +Anchylobela_dyseimata 2015-12-01 11 +Anthony_Overton 2017-03-01 261 +Bear_maul 2016-04-01 3 +Ambarawa,_Central_Java 2016-01-01 1 +Amber_lager 2016-11-01 87 +2nd_LAAD 2017-09-01 8 +Ashiya,_Hyogo 2018-03-01 24 +Angels_at_Risk 2018-02-01 74 +Audrey_Marie_Munson 2016-03-01 17 +1984_Australian_Football_Championships 2017-01-01 27 +Ammonia_fountain 2016-06-01 434 +Allister_Bentley 2018-03-01 11 +Alsager_Hay_Hill 2016-10-01 72 +1753_English_cricket_season 2015-05-01 51 +2009-10_New_Jersey_Devils_season 2016-10-01 1 +An_Untamed_State 2016-05-01 1109 +Beatrice_Carmichael 2016-11-01 5 +Abdul_Ghani_Ahmad 2017-12-01 115 +Arteria_suralis 2017-02-01 3 +Berzasca_River 2017-01-01 1 +Angel_Attack 2015-09-01 98 +1969_San_Francisco_49ers_football_team 2017-11-01 1 +Anthony_Beilenson 2017-09-01 114 +Crystalline_Entity 2016-04-01 180 +Granice 2017-01-01 2 +203rd_General_Hospital 2017-07-01 44 +Acrocercops_rhombiferellum 2017-12-01 20 +Ampliglossum_blanchetii 2017-05-01 1 +11553_Scheria 2017-03-01 2 +Ashkenozi 2017-02-01 1 +2010_Calder_Cup_Playoffs 2018-01-01 9 +Alice_Caymmi 2016-01-01 121 +Alfredo_Alvar 2017-04-01 44 +2006_Legends_Tour 2017-07-01 30 +Albano_Albanese 2015-10-01 53 +1943_Frankford_Junction_train_wreck 2016-08-01 510 +Evans_Court_Apartment_Building 2016-04-01 4 +Abu_al-Rayhan_Muhammad_ibn_al-Biruni 2017-11-01 1 +Abubakar_Muhammad_Rimi 2015-05-01 4 +Dostpur 2016-11-01 26 +Accessories_Council_Excellence_Awards 2016-03-01 14 +2006_North_American_heat_wave 2015-06-01 1161 +Amstelodamum 2017-09-01 12 +A_Very_Peculiar_Practice 2016-08-01 1860 +Allegorie_der_Liebe 2015-09-01 1 +Alex_Mackie 2017-02-01 95 +1812_Homestead_Farm_and_Museum 2017-09-01 29 +Argus_distribution 2016-03-01 8 +Anthony_Thomas_Stover 2017-02-01 1 +Arthur_Shallcross 2016-11-01 20 +Antoine_Francois_Fourcroy 2018-01-01 1 +Abbas_Halim 2016-11-01 21 +Akiva_Baer_ben_Joseph 2017-08-01 1 +Balatonfuered 2016-11-01 3 +Antemnae 2017-11-01 204 +Cling_Cling 2017-06-01 93 +B_flat_major 2017-01-01 28 +AirExplore 2017-12-01 930 +Auckland_Super_Sprint 2015-11-01 120 +Alfredo_De_Gasperis 2017-12-01 793 +Geoffrey_I_of_Vianden 2017-01-01 5 +Copa_de_Zaachila 2016-04-01 6 +Alboacen 2017-09-01 1 +BNH_Hospital_Bangkok 2017-06-01 2 +Agricultural_health_and_safety 2016-09-01 1 +Chiasms 2017-06-01 2 +Al_Karaana 2016-05-01 58 +Alberta_Highway_872 2016-11-01 1 +Among_the_mourners 2016-03-01 1 +Achema_Power_Plant 2015-06-01 55 +ATSE_Graz 2017-10-01 65 +Arthroscopy 2017-02-01 11721 +2010-2012_European_Nations_Cup_Second_Division 2018-01-01 7 +1967_Cincinnati_Reds 2015-08-01 4 +24th_Golden_Disc_Awards 2017-05-01 71 +Johnny_Floyd 2017-01-01 17 +Arthur_Rupin 2016-02-01 5 +Alpine_skiing_at_the_2011_Canada_Winter_Games 2015-09-01 38 +College_Press_Service 2017-01-01 8 +American_Psycho 2015-08-01 55567 +CBC_Winnipeg 2017-06-01 17 +Burning_the_process 2016-04-01 1 +2011_Stanley_Cup_playoffs 2017-01-01 1036 +Andrew_Mumford 2017-01-01 6 +1925_in_fine_arts_of_the_Soviet_Union 2018-02-01 28 +Aragvi_river 2017-02-01 2 +Andrew_Adamson 2018-03-01 16269 +Arcides_fulvohirta 2016-10-01 1 +Araya_Selassie_Yohannes 2015-11-01 423 +Apartment_house 2016-09-01 85 +Advanced_Art 2015-12-01 171 +1028_Lydina 2015-06-01 53 +2005_July_6_United_Nations_assault_on_Cite_Soleil,_Haiti 2017-04-01 2 +Adolph_Weiss 2015-06-01 98 +Adam_Jerzy_Czartoryski 2015-09-01 1237 +1980_United_States_presidential_election 2017-05-01 56 +1956_Oscars 2016-08-01 10 +Burundian_Senate_election,_2005 2016-04-01 1 +Amarolea_floridana 2015-07-01 3 +August_Bier 2015-12-01 514 +Arbelodes_sebelensis 2018-03-01 6 +Abiah_Brown 2018-02-01 1 +A_Maceo_Smith_High_School 2016-10-01 2 +1488_in_architecture 2017-12-01 6 +2009_AMP_Energy_500 2016-04-01 45 +1921_Baylor_Bears_football_team 2017-03-01 21 +Dmitry_Akhba 2015-07-01 43 +2004_Big_12_Conference_Baseball_Tournament 2016-07-01 37 +Abdisalam_Omer 2018-02-01 116 +Alma,_son_of_Alma 2015-08-01 53 +An_Phoblacht 2016-10-01 962 +2009_Turner_Prize 2016-01-01 75 +Jack_Zajac 2017-01-01 24 +1906_Wimbledon_Championships 2016-04-01 22 +Chuckwalla_Valley 2017-06-01 22 +Alien_Quadrology 2016-02-01 1 +Chalcidoptera_contraria 2016-04-01 1 +Alaska_Republican_Gubernatorial_Primary_Election,_2006 2016-02-01 1 +333639_Yaima 2018-02-01 7 +Aquila_hastata 2015-11-01 28 +Al-Fua 2017-07-01 1 +Anihilation 2015-07-01 28 +International_Toy_Fair 2017-01-01 1 +38th_Regiment_Indiana_Infantry 2017-01-01 10 +Andrea_Stella 2017-07-01 75 +Anselmo_de_Moraes 2015-09-01 562 +Applemore 2016-05-01 3 +Akpinar,_Kirsehir 2015-06-01 3 +Ant_nest 2016-05-01 53 +Catherine_of_Siena 2016-11-01 8806 +Barbos 2015-06-01 12 +Amlaib_mac_Iduilb 2017-08-01 2 +Alice_Janowski 2018-03-01 17 +Acacia_leptocarpa 2017-03-01 48 +Al-Hadi_Yahya 2016-01-01 39 +2015_British_Figure_Skating_Championships 2017-07-01 38 +Avenues_Television 2016-03-01 214 +Dendropsophus_sartori 2015-07-01 11 +1952_in_Germany 2015-05-01 63 +Armuchee_High_School 2016-04-01 27 +April_1_RFC 2017-11-01 2 +Caroline_Bliss 2016-11-01 972 +66th_Rice_Bowl 2016-06-01 17 +Alec_Smight 2017-02-01 173 +Alexei_Panin 2017-09-01 3 +Codeword 2016-04-01 84 +Dormice 2015-07-01 63 +2105_BC 2017-11-01 6 +5th_National_Congress_of_Kuomintang 2016-06-01 5 +Caminho_das_Indias 2017-01-01 5 +Agerbo 2017-11-01 2 +Abe_Anellis 2018-01-01 86 +Aceh_Medal 2015-07-01 33 +Alltech_Arena 2016-10-01 144 +Aly_Oury 2016-06-01 260 +757th_Troop_Carrier_Squadron 2017-07-01 2 +Alec_Peters 2017-12-01 2731 +Agua_Buena_Airport 2017-09-01 12 +Alessandro_Livi 2016-08-01 104 +Andkaer 2017-04-01 3 +Cateran 2017-06-01 135 +57th_Venice_International_Film_Festival 2017-04-01 180 +Brijal_Patel 2017-06-01 98 +Cnemaspis_jerdonii 2015-07-01 6 +Aluminum_sodium_salt 2016-10-01 3 +Arnaldo_Antonio_Sanabria_Ayala 2017-09-01 4 +Angels_of_Iron 2018-02-01 83 +Bugs_Bunny_Rabbit_Rampage 2017-06-01 422 +Admiralty_Class_Destroyer 2017-10-01 2 +Atlas_Media 2017-05-01 2 +Arcesilaus_i_of_cyrene 2017-03-01 1 +2011_Tajikistan_national_football_team_results 2017-04-01 13 +Artur_Shakhnazarov 2017-12-01 22 +747_Express_Bus 2018-03-01 20 +101-in-1_Party_Megamix 2017-10-01 188 +Fastpoint_Games 2016-11-01 32 +Analog_Anthology_1 2017-07-01 1 +Archival_bond 2015-09-01 119 +1985_Air_Force_Falcons_football 2017-09-01 4 +American_Airlines_plane_diverted_to_Miami_after_landing_gear_problem 2017-06-01 3 +Adaptive_Evolution_in_the_Human_Genome 2017-08-01 2 +Arthur_Strangways 2015-11-01 5 +1583_in_poetry 2015-09-01 68 +Andrew_igoudala 2015-06-01 2 +Euonychophora 2016-11-01 37 +Catechizing 2016-04-01 4 +1960-61_ice_hockey_Bundesliga_season 2018-03-01 3 +Buk_Vlaka 2017-06-01 10 +Arbor_Day 2018-03-01 16265 +Guan_Sheng 2017-01-01 73 +2014_Barcelona_Open_Banc_Sabadell 2016-08-01 57 +1976-77_Nationalliga_A 2016-04-01 1 +AFL_records 2015-11-01 16 +2005_Tour_Down_Under 2016-10-01 26 +92_BCE 2015-08-01 4 +Bento_Box_Animation 2017-01-01 1 +Alabama_Territory 2018-03-01 1195 +Abdul-Wasa_Al-Saqqaf 2016-07-01 21 +Archbishops_of_Semarang 2017-01-01 6 +Ambivina 2017-10-01 13 +Aghjaghala_Ulia 2017-08-01 2 +Blechnum_novae-zelandiae 2016-11-01 26 +Dictyosome 2016-04-01 19 +Arts_Council_of_Great_Britain 2016-12-01 785 +LBC_Radio 2017-01-01 3 +Ageo,_Saitama 2016-06-01 396 +Babla_Mehta 2016-12-01 674 +2012-13_Russian_Cup 2018-01-01 10 +Chandragupt 2017-06-01 6 +407th_Air_Refueling_Squadron 2016-01-01 96 +Aftermarket 2016-07-01 1253 +A_Portrait_of_New_Orleans 2016-08-01 18 +2000-01_Yemeni_League 2017-03-01 1 +Actinidia_chinensis 2015-11-01 907 +Amsterdam_Tournament_1999 2018-03-01 1 +Arthur_Iberall 2017-02-01 112 +Auricula_Meretricula 2016-02-01 103 +Archbishop_of_Lahore 2016-09-01 8 +Chippewa_Indians_of_Montana 2016-04-01 9 +Abidjan-Niger_Railway 2018-01-01 22 +29th_Annual_Grammy_Awards 2017-05-01 1087 +Ateles_geoffroyi_frontatus 2017-06-01 3 +Enrico_Cernuschi 2016-11-01 3 +A4183_road 2017-02-01 8 +Ahrayut 2016-10-01 75 +Alison_Castle 2016-03-01 55 +Automobile_aftermarket 2016-10-01 5 +2008_GAINSCO_Auto_Insurance_Indy_300 2016-07-01 51 +1937_Scottish_Cup_Final 2017-04-01 126 +2005_Clipsal_500_Adelaide 2018-02-01 22 +Farid_Farjad 2016-04-01 120 +13_Tribes_of_Long_Island 2015-12-01 11 +Afroneta_bamilekei 2017-01-01 2 +Frederick_Stuart_Greene 2017-01-01 1 +Andre_Braugher 2017-04-01 37655 +1906_International_Lawn_Tennis_Challenge 2017-10-01 73 +2009-10_NFL_Playoffs 2016-01-01 69 +Cricket_Wellington 2016-11-01 2 +Craig_Blazer 2015-07-01 21 +Aeolidiella_orientalis 2017-05-01 3 +Andre_Prokovsky 2017-06-01 4 +Angela_McKee 2017-11-01 14 +Airbase_Golubovci 2016-10-01 1 +2011_ISAF_Sailing_World_Championships 2017-05-01 89 +Bartica_Airport 2017-06-01 27 +Agusan_Dam 2016-09-01 454 +Bosque_Real_Country_Club 2015-07-01 42 +Georges_Duhamel 2017-01-01 122 +Allrounder 2017-03-01 63 +2017_Missouri_State_Bears_football_team 2017-09-01 868 +Allons_a_Lafayette 2017-11-01 17 +Agathla 2015-05-01 105 +1086_in_poetry 2015-09-01 25 +Absolute_extreme 2017-09-01 1 +Agathe_Bonitzer 2017-12-01 229 +Chinese_Red_Pine 2017-06-01 18 +Angular_dispersion 2016-02-01 11 +Jean-Sebastian_Giguere 2017-01-01 2 +Actinium-235 2018-03-01 4 +Ago,_filo_e_nodo 2017-02-01 11 +Aranea_cruentata 2016-03-01 1 +2009_Korea_National_League 2017-11-01 19 +Americom-8 2016-08-01 28 +2006_Junee_Bushfire 2018-03-01 81 +2013_Major_League_Baseball_Home_Run_Derby 2017-09-01 182 +1928_US_Presidential_Election 2016-12-01 42 +After-eighty_generation 2016-02-01 127 +1932_Hawthorn_Football_Club_season 2017-07-01 16 +Amelia_Elizabeth_Mary_Rygate 2017-05-01 2 +Aline_Khalaf 2017-12-01 465 +Akron_Junction,_New_York 2017-07-01 56 +Apollo_moon_landing_conspiracy_theories 2015-09-01 4 +1978_National_League_Championship_Series 2017-03-01 325 +1959-60_German_football_championship 2017-08-01 5 +Almost_a_Bride 2017-01-01 1 +Andrew_Lysaght,_junior 2015-10-01 20 +1902_Otani_expedition 2018-02-01 1 +1892_Currie_Cup 2016-09-01 53 +1988_USC_Trojans_football_team 2016-10-01 494 +1944_in_Northern_Ireland 2016-12-01 46 +Alfred_Acherman 2017-07-01 1 +Arcadia,_Nebraska 2017-02-01 148 +4_x_400_metre_relay 2018-03-01 1 +A4030_road 2016-07-01 1 +Chi-li 2016-11-01 3 +Aircraft_fairing 2016-11-01 1861 +Buddhism_in_Belize 2015-07-01 40 +Alameda_County_Open 2017-02-01 33 +Area_of_countries_and_regions_of_the_United_Kingdom 2017-10-01 6 +2014_Weber_State_Wildcats_football_team 2016-10-01 47 +American_Journal_of_Comparative_Law 2016-04-01 62 +A_Teaspoon_Every_Four_Hours 2017-03-01 47 +Astasis 2016-03-01 1195 +Akhrakouaeronon 2015-11-01 62 +Annenkrone 2016-03-01 40 +Ballotine 2016-12-01 4753 +2000_Kipawa_earthquake 2015-11-01 139 +Archdiocese_of_cashel_and_emly 2017-01-01 1 +Chevrolet_SS396 2017-01-01 1 +Achyroseris 2016-03-01 1 +Daniel_Pulteney 2016-11-01 29 +2006_Major_League_Baseball_draft 2017-07-01 10637 +Adetunji_Idowu_Olurin 2016-01-01 37 +Ardatov,_Nizhny_Novgorod_Oblast 2017-04-01 18 +Andrew_Hilditch 2015-08-01 398 +A_Very_Merry_Daughter_Of_the_Bride 2017-04-01 67 +1993_in_radio 2017-08-01 85 +Deltan 2016-11-01 91 +Adnan_Custovic 2017-12-01 26 +Di_Gennaro 2017-01-01 4 +237_AD 2017-11-01 1 +Aaron_Gombar 2018-03-01 2 +Acrolophus 2017-04-01 47 +Alfred_Bergman 2017-06-01 27 +Charles_Bebb 2017-06-01 39 +Dirico 2017-01-01 24 +1982_Major_League_Baseball_Draft 2016-12-01 90 +DDT_wrestling 2016-11-01 4 +1988-89_Houston_Rockets_season 2016-02-01 10 +Acacia_loderi 2015-11-01 35 +2015_Deauville_American_Film_Festival 2016-10-01 126 +Andropadus_importunus 2016-02-01 9 +Antonio_Bacchetti 2017-04-01 52 +Ann_Trindade 2015-09-01 49 +5_x_Monk_5_x_Lacy 2016-05-01 37 +Barlochan,_Ontario 2017-06-01 2 +Achaian 2017-03-01 35 +Flow_rider 2017-01-01 1 +Antiblemma_discerpta 2018-02-01 1 +1997_Illinois_Fighting_Illini_football_team 2017-11-01 331 +Ahrntal 2016-03-01 540 +Apollo_Conference 2015-10-01 329 +Algenib_in_Perseus 2016-01-01 1 +Craig_Norgate 2016-04-01 42 +Antwerp_Zoo 2015-12-01 879 +Cold_Contagious 2017-06-01 161 +Bolito 2016-11-01 181 +Chinese_bridges 2016-11-01 1 +14th_Indiana_Infantry_Regiment 2017-04-01 115 +Bindunuwewa_massacre 2015-07-01 52 +Eastshore_Highway 2016-11-01 2 +Daemonologie 2017-01-01 1655 +Aero_Pacifico 2015-07-01 1 +Blue_Ribbon_Schools_Program 2017-06-01 557 +Ash_Township,_MI 2018-02-01 3 +Al-Hatab_Square 2018-02-01 450 +Alje_Vennema 2018-02-01 187 +1920_All-Ireland_Senior_Football_Championship_Final 2016-05-01 40 +Criss_Oliva 2016-11-01 801 +Bethlehem,_Ohio 2017-01-01 16 +1976_WHA_Amateur_Draft 2015-08-01 47 +Angela_Fimmano 2017-06-01 17 +Alexander_Bonini_of_Alexandria 2017-09-01 1 +Anarchist_faq 2015-05-01 13 +Aleksander_Benedykt_Sobieski 2016-05-01 240 +Cape_Florida_Lighthouse 2016-04-01 6 +Fernando_VI_of_Spain 2017-01-01 3 +Crossing_number 2017-06-01 29 +1984_NSL_Cup 2017-05-01 26 +Barbara_Weldon 2015-06-01 29 +Andreas_Olsen 2017-01-01 32 +Battle_of_Baima 2016-04-01 2 +Amory_Hansen 2016-05-01 26 +Akhmimic 2015-11-01 41 +Al_Awda 2018-02-01 18 +Adelheid-Marie_of_Anhalt-Dessau 2016-07-01 70 +Americans_for_Technology_Leadership 2015-10-01 90 +Belizean_diplomatic_missions 2017-06-01 3 +African_communist 2016-05-01 3 +Andosol 2016-09-01 246 +Alan_Attraction 2016-05-01 15 +A_Yank_in_Rome 2015-12-01 70 +2004_in_the_United_Arab_Emirates 2018-02-01 33 +Additionality 2017-06-01 371 +Assassination_of_Trotsky 2015-06-01 47 +Alice_Sotero 2018-02-01 27 +Agyneta_platnicki 2016-04-01 4 +Alexandra_Vasilyevna_Velyaminova 2015-07-01 30 +1881_in_Chile 2016-06-01 16 +Arterial_ischemic_stroke 2018-01-01 57 +Astro_Glacier 2015-09-01 27 +Chester_Earl_Merrow 2017-06-01 58 +Alejandro_de_la_Madrid 2015-11-01 1630 +70936_Kamen 2017-08-01 1 +AK_Steel_Holding_Corp 2015-08-01 8 +1124_Stroobantia 2017-10-01 23 +Asian_Wedding 2016-10-01 15 +23837_Matthewnanni 2015-10-01 18 +Acharya_Jagadish_Chandra_Bose_Indian_Botanic_Garden 2017-03-01 4893 +Betsy_Hodges 2016-04-01 560 +Arthur_and_the_Invisibles 2015-08-01 14924 +Arkansas-Ole_Miss_football_rivalry 2015-05-01 7 +Asia_Cup 2015-09-01 5938 +Arginine_racemase 2016-12-01 15 +585th_Field_Company,_Royal_Engineers 2018-03-01 1 +1975_Stagg_Bowl 2017-08-01 6 +Dame_Commander_of_The_Most_Honourable_Order_of_the_Bath 2017-01-01 1 +Askajian 2016-02-01 26 +2006_Nebraska_Cornhuskers_football_team 2015-08-01 975 +Cicero_Francis_Lowe_House 2015-07-01 10 +Conan_IV,_Duke_of_Brittany 2016-11-01 252 +2005_World_Modern_Pentathlon_Championships 2016-07-01 38 +1946_Aleutian_Islands_earthquake 2017-03-01 2019 +ANKRD17 2017-09-01 19 +1970_Maryland_Terrapins_football_team 2017-11-01 42 +Ali_Dehkhoda 2017-04-01 1 +1244_in_art 2015-07-01 22 +1520s_in_Denmark 2016-01-01 20 +Abdoulaye_Gaye 2017-12-01 10 +An_Angel_Has_Arrived 2016-03-01 36 +1453_BC 2015-08-01 26 +2017_National_Games_of_China 2017-05-01 1293 +A_Night_in_Sickbay 2016-05-01 251 +Dateline_Diamonds 2017-01-01 53 +419_guestbook_spamming 2016-02-01 5 +Familiar_bluet 2017-01-01 4 +Abu_Bakr_Mirza 2017-10-01 86 +7272_Darbydyar 2017-11-01 4 +Ages_of_consent_in_Latin_America 2017-03-01 961 +1982_Japan_Soccer_League_Cup 2016-04-01 14 +2810_BC 2015-07-01 9 +Druga_Liga_Republike_Srpske 2017-01-01 1 +1998_Swedish_Rally 2017-09-01 34 +1567_in_Norway 2015-10-01 89 +126_Army_Engineer_Regiment,_Royal_Engineers 2016-03-01 5 +2017_American_League_Wild_Card_Game 2017-10-01 25120 +August_Follen 2017-01-01 2 +Ala_Gertner 2015-11-01 876 +Glenwood,_Harford_County,_Maryland 2017-01-01 3 +Applied_ecology 2017-12-01 730 +Ariarathes_V_Eusebes_Philopator 2018-03-01 5 +2006_AFC_Champions_League 2017-09-01 947 +60_minutes_2 2016-10-01 2 +Embryonic_shield 2017-01-01 2 +2001_Meath_Intermediate_Football_Championship 2015-11-01 8 +Apparition_of_Christ_to_Madonna 2017-06-01 5 +Hoosier_Road_Elementary 2017-01-01 1 +Arua_Uda 2016-12-01 29 +Array_comprehension 2015-11-01 8 +Baszki 2015-06-01 36 +Akron_Neighborhoods 2016-01-01 4 +Catholic_Church_in_Costa_Rica 2017-06-01 85 +Canada-Sweden_relations 2015-07-01 1 +Barza_Radio_Community 2016-11-01 6 +Dalhousie_Middle_School 2016-11-01 5 +Alliphis_bakeri 2017-11-01 2 +Bartica_massacre 2017-06-01 53 +30th_January 2015-11-01 10 +1920_revolution 2017-05-01 5 +Amyraldism 2017-08-01 828 +AA_Jefferson_District 2016-05-01 45 +Eunebristis_cinclidias 2017-01-01 1 +A_Scott_Connelly 2017-06-01 5 +Antony_Durose 2016-07-01 19 +Arval_Brethren 2017-11-01 579 +Anthidium_dissectum 2017-05-01 2 +Aru,_Democratic_Republic_of_the_Congo 2017-04-01 81 +1956-57_West_Indian_cricket_season 2017-04-01 2 +2014_Moscow_Film_Festival 2017-08-01 2 +Anna_Gurji 2017-06-01 27 +Allen_Memorial_Medical_Library 2016-07-01 120 +Anton_Sistermans 2017-02-01 36 +Clotheshorses 2017-06-01 1 +36_Stratagems 2017-08-01 25 +Attack_of_the_crab_monsters 2016-10-01 16 +30_rock_awards 2015-09-01 2 +Aeroflot,_Uralsk_Civil_Aviation_Directorate 2017-08-01 2 +Amblyseius_parabufortus 2017-06-01 3 +Indian_coral_tree 2017-01-01 3 +3285_Ruth_Wolfe 2016-02-01 9 +Anderson_da_Silva_Gibin 2016-08-01 73 +5001st_Composite_Group 2017-03-01 4 +Danzik 2016-04-01 8 +4810_Ruslanova 2016-03-01 2 +Arkendale,_Virginia 2016-04-01 14 +Al_Francis_Bichara 2016-09-01 239 +Cayena 2017-01-01 1 +A_Glass_of_Darkness 2017-04-01 95 +GMC_CCKW 2017-01-01 887 +Alabama_State_Route_107 2015-11-01 13 +2011_in_motorsport 2017-12-01 26 +Adecco_General_Staffing,_New_Zealand 2017-12-01 86 +Anbargah 2015-10-01 6 +1995_Asian_Cup_Winners_Cup 2016-06-01 7 +1986_Wales_rugby_union_tour_of_the_South_Pacific 2016-12-01 30 +Adya_Goud_Brahmin 2017-03-01 2 +Akcakiraz 2015-08-01 5 +24249_Bobbiolson 2017-12-01 4 +Ahmanson_Theatre 2016-02-01 801 +Abdullah_ibn_Jahsh 2016-10-01 196 +1937_in_Chile 2015-08-01 24 +2000_in_England 2016-01-01 57 +A_Deepness_In_The_Sky 2017-08-01 2 +Area_code_678 2015-07-01 480 +Avalon_Hill 2017-01-01 880 +Anna,_Duchess_of_Prussia 2015-12-01 315 +Alexandr_Syman 2017-04-01 24 +7400_series_logic 2017-11-01 2 +Greenleaf_Township,_Minnesota 2017-01-01 1 +Acetylsal 2017-04-01 6 +Earth_and_Man_National_Museum 2016-11-01 43 +Affetside 2015-10-01 185 +1971_CFL_season 2015-08-01 202 +Beth_Bader 2016-11-01 21 +Enrolled_Nurse 2016-04-01 5 +Al-Azraq 2016-12-01 22 +4th_South_Carolina_Regiment 2015-07-01 42 +Amanda_Overmyer 2017-02-01 356 +Auto_wrap 2016-02-01 8 +Anonymous_internet_banking 2015-07-01 98 +Curatoria 2016-11-01 3 +A-roll 2016-05-01 134 +Accra_hearts_of_oak_sc 2017-10-01 4 +Apostasy_from_Judaism 2015-12-01 45 +Acantharctia_tenebrosa 2018-01-01 3 +Abigail_Keasey_Frankel 2017-11-01 25 +2008_Paraguayan_general_election 2016-01-01 1 +Adams_motor 2015-09-01 37 +Drummond_Community_High_School 2017-01-01 17 +Andrews_Nakahara 2017-10-01 474 +10th_Maccabiah 2017-04-01 30 +Ackerman,_Rick 2015-08-01 4 +Dumri,_Buxar 2016-11-01 35 +Asking_Jesus_into_your_heart 2016-09-01 1 +Adamowicz_brothers 2016-12-01 161 +Alien_Musibat 2017-12-01 2 +Ahmad_Al_Tayer 2016-04-01 39 +Analytical_phonics 2016-01-01 520 +Do_It_Good 2016-04-01 281 +2004_Kumbakonam_School_fire 2017-12-01 2114 +1977_Chattanooga_Mocs_football_team 2016-08-01 3 +Globe_valves 2017-01-01 11 +Abelmoschus_crinitus 2016-04-01 18 +1874_Yale_Bulldogs_football_team 2016-02-01 37 +Climer 2017-06-01 1 +Auchroisk 2017-06-01 37 +2010_Albirex_Niigata_season 2016-10-01 19 +Adhocracy 2017-06-01 2217 +Chios_Massacre 2015-07-01 1110 +African_Red_Slip 2017-02-01 221 +1976_Portland_Timbers_season 2016-07-01 41 +Alsace-Larraine 2015-09-01 2 +3750_Ilizarov 2017-07-01 12 +Aleksandr_Shkaev 2017-05-01 1 +32_bar_form 2016-01-01 12 +Aequatorium_jamesonii 2018-03-01 14 +Abade_neiva 2016-09-01 2 +Arakvaz 2016-08-01 23 +207_Sqn 2017-10-01 2 +Ducal_hat 2016-11-01 10 +2_Degrees 2017-03-01 19 +Ahmeddiyya_Islam 2016-03-01 4 +Amidi-ye_Kohneh 2017-11-01 13 +Contributions_to_Indian_Sociology 2016-11-01 42 +Clark_Leiblee 2016-04-01 5 +Abraham_of_Strathearn 2017-09-01 14 diff --git a/docs/ja/integrations/data-ingestion/data-formats/assets/time.parquet b/docs/ja/integrations/data-ingestion/data-formats/assets/time.parquet new file mode 100644 index 00000000000..37402b87f1a Binary files /dev/null and b/docs/ja/integrations/data-ingestion/data-formats/assets/time.parquet differ diff --git a/docs/ja/integrations/data-ingestion/data-formats/binary.md b/docs/ja/integrations/data-ingestion/data-formats/binary.md new file mode 100644 index 00000000000..d364d7dcf85 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/binary.md @@ -0,0 +1,233 @@ +--- +sidebar_label: ãƒã‚¤ãƒŠãƒªã¨ãƒã‚¤ãƒ†ã‚£ãƒ– +slug: /ja/integrations/data-formats/binary-native +--- + +# ClickHouseã§ã®ãƒã‚¤ãƒ†ã‚£ãƒ–ãŠã‚ˆã³ãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ä½¿ç”¨ + +ClickHouseã¯è¤‡æ•°ã®ãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ã“ã‚Œã«ã‚ˆã‚Šãƒ‘フォーマンスã¨ã‚¹ãƒšãƒ¼ã‚¹ã®åŠ¹çŽ‡ãŒå‘上ã—ã¾ã™ã€‚ãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒãƒã‚¤ãƒŠãƒªå½¢å¼ã§ä¿å­˜ã•ã‚Œã‚‹ãŸã‚ã€æ–‡å­—エンコーディングã®å®‰å…¨æ€§ã‚‚確ä¿ã•ã‚Œã¾ã™ã€‚ + +ã“ã“ã§ã¯ã€ãƒ‡ãƒ¢ãƒ³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç”¨ã« `some_data` [テーブル](assets/some_data.sql)ãŠã‚ˆã³[データ](assets/some_data.tsv)を使用ã—ã¾ã™ã€‚ã”自身ã®ClickHouseインスタンスã§å†ç¾ã—ã¦ã¿ã¦ãã ã•ã„。 + +## ãƒã‚¤ãƒ†ã‚£ãƒ–ClickHouseフォーマットã§ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +ClickHouseノード間ã§ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆãŠã‚ˆã³ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹æœ€ã‚‚効率的ãªãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯[ãƒã‚¤ãƒ†ã‚£ãƒ–](/docs/ja/interfaces/formats.md/#native)フォーマットã§ã™ã€‚エクスãƒãƒ¼ãƒˆã¯ `INTO OUTFILE` å¥ã‚’使用ã—ã¦è¡Œã‚ã‚Œã¾ã™ï¼š + +```sql +SELECT * FROM some_data +INTO OUTFILE 'data.clickhouse' FORMAT Native +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットã®[data.clickhouse](assets/data.clickhouse)ファイルãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +### ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットã‹ã‚‰ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +データをインãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€å°ã•ãªãƒ•ã‚¡ã‚¤ãƒ«ã‚„探索目的ã§[file()](/docs/ja/sql-reference/table-functions/file.md)を使用ã§ãã¾ã™ï¼š + +```sql +DESCRIBE file('data.clickhouse', Native); +``` +```response +┌─name──┬─type───┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ path │ String │ │ │ │ │ │ +│ month │ Date │ │ │ │ │ │ +│ hits │ UInt32 │ │ │ │ │ │ +└───────┴────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +:::tip +`file()` 関数を使用ã™ã‚‹å ´åˆã€ClickHouse Cloudã§ã¯ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã™ã‚‹ãƒžã‚·ãƒ³ä¸Šã§ `clickhouse client` ã§ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ä»–ã®ã‚ªãƒ—ションã¨ã—ã¦[`clickhouse-local`](/docs/ja/operations/utilities/clickhouse-local.md)を使用ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ã§ãƒ•ã‚¡ã‚¤ãƒ«ã‚’探索ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +本番環境ã§ã¯ã€`FROM INFILE` を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã—ã¾ã™ï¼š + +```sql +INSERT INTO sometable +FROM INFILE 'data.clickhouse' +FORMAT Native +``` + +### ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットã®åœ§ç¸® + +データをãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹éš›ï¼ˆãŠã‚ˆã³ä»–ã®ã»ã¨ã‚“ã©ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆï¼‰ã«ã€`COMPRESSION` å¥ã‚’使用ã—ã¦åœ§ç¸®ã‚’有効ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```sql +SELECT * FROM some_data +INTO OUTFILE 'data.clickhouse' +COMPRESSION 'lz4' +FORMAT Native +``` + +エクスãƒãƒ¼ãƒˆã«ã¯LZ4圧縮を使用ã—ã¾ã—ãŸã€‚データをインãƒãƒ¼ãƒˆã™ã‚‹ã¨ãã«ã¯ãれを指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +INSERT INTO sometable +FROM INFILE 'data.clickhouse' +COMPRESSION 'lz4' +FORMAT Native +``` + +## RowBinaryã¸ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã‚‚ã†ä¸€ã¤ã®ãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯[RowBinary](/docs/ja/interfaces/formats.md/#rowbinary)ã§ã€ãƒã‚¤ãƒŠãƒªè¡¨ç¾ã•ã‚ŒãŸè¡Œã§ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆãŠã‚ˆã³ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã§ãã¾ã™ï¼š + +```sql +SELECT * FROM some_data +INTO OUTFILE 'data.binary' FORMAT RowBinary +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€ãƒã‚¤ãƒŠãƒªè¡Œå½¢å¼ã®[data.binary](assets/data.binary)ファイルãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +### RowBinaryファイルã®æŽ¢ç´¢ + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯è‡ªå‹•ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ã®ã§ã€èª­ã¿è¾¼ã‚€å‰ã«ã‚¹ã‚­ãƒ¼ãƒžã‚’明示的ã«å®šç¾©ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +SELECT * +FROM file('data.binary', RowBinary, 'path String, month Date, hits UInt32') +LIMIT 5 +``` +```response +┌─path───────────────────────────┬──────month─┬─hits─┠+│ Bangor_City_Forest │ 2015-07-01 │ 34 │ +│ Alireza_Afzal │ 2017-02-01 │ 24 │ +│ Akhaura-Laksam-Chittagong_Line │ 2015-09-01 │ 30 │ +│ 1973_National_500 │ 2017-10-01 │ 80 │ +│ Attachment │ 2017-09-01 │ 1356 │ +└────────────────────────────────┴────────────┴──────┘ +``` + +[RowBinaryWithNames](/docs/ja/interfaces/formats.md/#rowbinarywithnames)を利用ã™ã‚‹ã¨ã€ã‚«ãƒ©ãƒ ä¸€è¦§ã‚’å«ã‚€ãƒ˜ãƒƒãƒ€ãƒ¼è¡Œã‚‚追加ã•ã‚Œã¾ã™ã€‚[RowBinaryWithNamesAndTypes](/docs/ja/interfaces/formats.md/#rowbinarywithnamesandtypes)ã§ã¯ã€ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã‚’å«ã‚€è¿½åŠ ã®ãƒ˜ãƒƒãƒ€ãƒ¼è¡Œã‚‚追加ã•ã‚Œã¾ã™ã€‚ + +### RowBinaryファイルã‹ã‚‰ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +RowBinaryファイルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€ã«ã¯ã€`FROM INFILE` å¥ã‚’使用ã—ã¾ã™ï¼š + +```sql +INSERT INTO sometable +FROM INFILE 'data.binary' +FORMAT RowBinary +``` + +## RawBLOBを使用ã—ãŸå˜ä¸€ãƒã‚¤ãƒŠãƒªå€¤ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +ãƒã‚¤ãƒŠãƒªãƒ•ã‚¡ã‚¤ãƒ«å…¨ä½“を読ã¿è¾¼ã¿ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ä¿å­˜ã—ãŸã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚ˆã†ãªå ´åˆã«ã¯ã€RawBLOBå½¢å¼ã‚’使用ã§ãã¾ã™ã€‚ã“ã®å½¢å¼ã¯å˜ä¸€ã‚«ãƒ©ãƒ ãƒ†ãƒ¼ãƒ–ルã§ã®ã¿ç›´æŽ¥ä½¿ç”¨ã§ãã¾ã™ï¼š + +```sql +CREATE TABLE images(data String) Engine = Memory +``` + +ç”»åƒãƒ•ã‚¡ã‚¤ãƒ«ã‚’ `images` テーブルã«ä¿å­˜ã—ã¦ã¿ã¾ã—ょã†ï¼š + +```bash +cat image.jpg | clickhouse-client -q "INSERT INTO images FORMAT RawBLOB" +``` + +`data` フィールドã®é•·ã•ã‚’確èªã™ã‚‹ã¨ã€å…ƒã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚µã‚¤ã‚ºã¨ç­‰ã—ããªã‚Šã¾ã™ï¼š + +```sql +SELECT length(data) FROM images +``` +```response +┌─length(data)─┠+│ 6121 │ +└──────────────┘ +``` + +### RawBLOBデータã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +ã“ã®å½¢å¼ã¯ã¾ãŸã€`INTO OUTFILE` å¥ã‚’使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹éš›ã«ã‚‚使用ã§ãã¾ã™ï¼š + +```sql +SELECT * FROM images LIMIT 1 +INTO OUTFILE 'out.jpg' +FORMAT RawBLOB +``` + +`LIMIT 1`を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã®ã¯ã€è¤‡æ•°ã®å€¤ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹ã¨ãƒ•ã‚¡ã‚¤ãƒ«ãŒç ´æã™ã‚‹ãŸã‚ã§ã™ã€‚ + +## MessagePack + +ClickHouseã¯[MessagePack](https://msgpack.org/)を使用ã—ã¦[MsgPack](/docs/ja/interfaces/formats.md/#msgpack)ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆã¨ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚MessagePackå½¢å¼ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ï¼š + +```sql +SELECT * +FROM some_data +INTO OUTFILE 'data.msgpk' +FORMAT MsgPack +``` + +[MessagePackファイル](assets/data.msgpk)ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ï¼š + +```sql +INSERT INTO sometable +FROM INFILE 'data.msgpk' +FORMAT MsgPack +``` + +## プロトコルãƒãƒƒãƒ•ã‚¡ + +[プロトコルãƒãƒƒãƒ•ã‚¡](/docs/ja/interfaces/formats.md/#protobuf)を使用ã™ã‚‹ã«ã¯ã€ã¾ãš[スキーマファイル](assets/schema.proto)を定義ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```protobuf +syntax = "proto3"; + +message MessageType { + string path = 1; + date month = 2; + uint32 hits = 3; +}; +``` + +ã“ã®ã‚¹ã‚­ãƒ¼ãƒžãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘ス(ç§ãŸã¡ã®å ´åˆã¯`schema.proto`)ã¯ã€[Protobuf](/docs/ja/interfaces/formats.md/#protobuf)フォーマット用ã®`format_schema`設定オプションã«è¨­å®šã•ã‚Œã¾ã™ï¼š + +```sql +SELECT * FROM some_data +INTO OUTFILE 'proto.bin' +FORMAT Protobuf +SETTINGS format_schema = 'schema:MessageType' +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ãŒ[proto.bin](assets/proto.bin)ファイルã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ClickHouseã¯Protobufデータã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆã‚„ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚‚サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚[ProtobufSingle](/docs/ja/interfaces/formats.md/#protobufsingle)を使用ã—ã¦ã€å˜ä¸€ã®ãƒ—ロトコルãƒãƒƒãƒ•ã‚¡ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’扱ã†ã“ã¨ã‚‚検討ã—ã¦ãã ã•ã„(ã“ã®å ´åˆã€é•·ã•åŒºåˆ‡ã‚Šã¯çœç•¥ã•ã‚Œã¾ã™ï¼‰ã€‚ + +## Cap’n Proto + +ClickHouseãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã‚‚ã†ä¸€ã¤ã®äººæ°—ã®ã‚ã‚‹ãƒã‚¤ãƒŠãƒªã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯[Cap’n Proto](https://capnproto.org/)ã§ã™ã€‚`Protobuf`å½¢å¼ã¨åŒæ§˜ã«ã€ã‚¹ã‚­ãƒ¼ãƒžãƒ•ã‚¡ã‚¤ãƒ«([schema.capnp](assets/schema.capnp))を定義ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +``` +@0xec8ff1a10aa10dbe; + +struct PathStats { + path @0 :Text; + month @1 :UInt32; + hits @2 :UInt32; +} +``` + +ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¦[CapnProto](/docs/ja/interfaces/formats.md/#capnproto)フォーマットã§ã‚¤ãƒ³ãƒãƒ¼ãƒˆã¨ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’è¡Œã„ã¾ã™ï¼š + +```sql +SELECT + path, + CAST(month, 'UInt32') AS month, + hits +FROM some_data +INTO OUTFILE 'capnp.bin' +FORMAT CapnProto +SETTINGS format_schema = 'schema:PathStats' +``` + +[`CapnProto`対応ã®åž‹](/docs/ja/interfaces/formats.md/#data_types-matching-capnproto)ã«åˆã‚ã›ã‚‹ãŸã‚ã€`Date`カラムを`UInt32`ã¨ã—ã¦ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +## ãã®ä»–ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ + +ClickHouseã§ã¯ã€ã•ã¾ã–ã¾ãªã‚·ãƒŠãƒªã‚ªã‚„プラットフォームã«å¯¾å¿œã™ã‚‹ãŸã‚ã«ã€å¤šãã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ä¸¡æ–¹ãŒå°Žå…¥ã•ã‚Œã¦ã„ã¾ã™ã€‚以下ã®è¨˜äº‹ã§ã€ã•ã‚‰ã«å¤šãã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ãれを扱ã†æ–¹æ³•ã‚’探索ã—ã¦ãã ã•ã„: + +- [CSVãŠã‚ˆã³TSVフォーマット](csv-tsv.md) +- [Parquet](parquet.md) +- [JSONフォーマット](/docs/ja/integrations/data-ingestion/data-formats/json/intro.md) +- [æ­£è¦è¡¨ç¾ã¨ãƒ†ãƒ³ãƒ—レート](templates-regex.md) +- **ãƒã‚¤ãƒ†ã‚£ãƒ–ãŠã‚ˆã³ãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ** +- [SQLフォーマット](sql.md) + +ã¾ãŸã€[clickhouse-local](https://clickhouse.com/blog/extracting-converting-querying-local-files-with-sql-clickhouse-local)ã‚‚ãƒã‚§ãƒƒã‚¯ã—ã€ClickHouseサーãƒãƒ¼ã‚’èµ·å‹•ã›ãšã«ãƒ­ãƒ¼ã‚«ãƒ«/リモートファイルã§ä½œæ¥­ã™ã‚‹ãŸã‚ã®ãƒãƒ¼ã‚¿ãƒ–ルãªå®Œå…¨æ©Ÿèƒ½ã®ãƒ„ールã§ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/data-formats/csv-tsv.md b/docs/ja/integrations/data-ingestion/data-formats/csv-tsv.md new file mode 100644 index 00000000000..6fb356fdb24 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/csv-tsv.md @@ -0,0 +1,375 @@ +--- +sidebar_label: CSV 㨠TSV +slug: /ja/integrations/data-formats/csv-tsv +--- + +# ClickHouseã§ã®CSVã¨TSVデータã®æ“作 + +ClickHouseã¯ã€CSVã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆãŠã‚ˆã³ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚CSVファイルã¯ãƒ˜ãƒƒãƒ€è¡Œã€ã‚«ã‚¹ã‚¿ãƒ ãƒ‡ãƒªãƒŸã‚¿ã€ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シンボルãªã©ã€ã•ã¾ã–ã¾ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆä»•æ§˜ã‚’æŒã¤å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ãã®ãŸã‚ã€ClickHouseã¯å„ケースã«åŠ¹çŽ‡çš„ã«å¯¾å¿œã™ã‚‹ãŸã‚ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨è¨­å®šã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ + +## CSVファイルã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +データをインãƒãƒ¼ãƒˆã™ã‚‹å‰ã«ã€æ¬¡ã®ã‚ˆã†ãªé–¢é€£ã™ã‚‹æ§‹é€ ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™: + +```sql +CREATE TABLE sometable +( + `path` String, + `month` Date, + `hits` UInt32 +) +ENGINE = MergeTree +ORDER BY tuple(month, path) +``` + +ã“ã®[CSVファイル](assets/data_small.csv)ã‹ã‚‰`sometable`テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’直接clickhouse-clientã«ãƒ‘イプã—ã¾ã™ï¼š + +```bash +clickhouse-client -q "INSERT INTO sometable FORMAT CSV" < data_small.csv +``` + +[FORMAT CSV](/docs/ja/interfaces/formats.md/#csv)を使用ã—ã¦ã€CSVフォーマットã®ãƒ‡ãƒ¼ã‚¿ã‚’å–り込むã“ã¨ã‚’ClickHouseã«çŸ¥ã‚‰ã›ã¾ã™ã€‚別ã®æ–¹æ³•ã¨ã—ã¦ã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹å ´åˆã¯ã€[FROM INFILE](/docs/ja/sql-reference/statements/insert-into.md/#inserting-data-from-a-file)å¥ã‚’使用ã—ã¾ã™ï¼š + +```sql +INSERT INTO sometable +FROM INFILE 'data_small.csv' +FORMAT CSV +``` + +ã“ã“ã§ã¯ã€`FORMAT CSV`å¥ã‚’使用ã—ã¦ã€ClickHouseãŒãƒ•ã‚¡ã‚¤ãƒ«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’ç†è§£ã§ãるよã†ã«ã—ã¦ã„ã¾ã™ã€‚URLã‹ã‚‰ç›´æŽ¥ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ã«ã¯[url()](/docs/ja/sql-reference/table-functions/url.md/)関数やã€S3ファイルã‹ã‚‰ã¯[s3()](/docs/ja/sql-reference/table-functions/s3.md/)関数を使用ã§ãã¾ã™ã€‚ + +:::tip +`file()`ãŠã‚ˆã³`INFILE`/`OUTFILE`ã«å¯¾ã—ã¦æ˜Žç¤ºçš„ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆè¨­å®šã‚’スキップã§ãã¾ã™ã€‚ +ãã®å ´åˆã€ClickHouseã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‹¡å¼µå­ã«åŸºã¥ã„ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’自動的ã«æ¤œå‡ºã—ã¾ã™ã€‚ +::: + +### ヘッダ付ãã®CSVファイル + +[ヘッダ付ãã®CSVファイル](assets/data_small_headers.csv)ãŒã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ï¼š + +```bash +head data-small-headers.csv +``` +```response +"path","month","hits" +"Akiba_Hebrew_Academy","2017-08-01",241 +"Aegithina_tiphia","2018-02-01",34 +``` + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€[CSVWithNames](/docs/ja/interfaces/formats.md/#csvwithnames)フォーマットを使用ã—ã¾ã™ï¼š + +```bash +clickhouse-client -q "INSERT INTO sometable FORMAT CSVWithNames" < data_small_headers.csv +``` + +ã“ã®å ´åˆã€ClickHouseã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€åˆã®è¡Œã‚’スキップã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +:::tip +23.1[ãƒãƒ¼ã‚¸ãƒ§ãƒ³](https://github.com/ClickHouse/ClickHouse/releases)以é™ã§ã¯ã€`CSV`タイプを使用ã—ãŸå ´åˆã«ClickHouseãŒCSVファイルã®ãƒ˜ãƒƒãƒ€ã‚’自動的ã«æ¤œå‡ºã™ã‚‹ã‚ˆã†ã«ãªã‚‹ã®ã§ã€`CSVWithNames`ã‚„`CSVWithNamesAndTypes`を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã›ã‚“。 +::: + +### カスタムデリミタ付ãã®CSVファイル + +CSVファイルãŒã‚«ãƒ³ãƒžä»¥å¤–ã®ãƒ‡ãƒªãƒŸã‚¿ã‚’使用ã™ã‚‹å ´åˆã¯ã€[format_csv_delimiter](/docs/ja/operations/settings/settings-formats.md/#format_csv_delimiter)オプションを使用ã—ã¦é–¢é€£ã™ã‚‹ã‚·ãƒ³ãƒœãƒ«ã‚’設定ã§ãã¾ã™ï¼š + +```sql +SET format_csv_delimiter = ';' +``` + +ã“ã‚Œã§ã€CSVファイルã‹ã‚‰ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆæ™‚ã«ã‚«ãƒ³ãƒžã®ä»£ã‚ã‚Šã«`;`シンボルãŒãƒ‡ãƒªãƒŸã‚¿ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +### CSVファイルã®è¡Œã®ã‚¹ã‚­ãƒƒãƒ— + +時ã«ã¯ã€CSVファイルã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚¤ãƒ³ãƒãƒ¼ãƒˆæ™‚ã«ç‰¹å®šã®è¡Œæ•°ã‚’スキップã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯[input_format_csv_skip_first_lines](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_skip_first_lines)オプションを使用ã—ã¦è¡Œã†ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +SET input_format_csv_skip_first_lines = 10 +``` + +ã“ã®å ´åˆã€CSVファイルã®æœ€åˆã®10行をスキップã—ã¾ã™ï¼š + +```sql +SELECT count(*) FROM file('data-small.csv', CSV) +``` +```response +┌─count()─┠+│ 990 │ +└─────────┘ +``` + +[ファイル](assets/data_small.csv)ã«ã¯1kè¡ŒãŒã‚ã‚Šã¾ã™ãŒã€æœ€åˆã®10行をスキップã™ã‚‹ã‚ˆã†ã«æŒ‡ç¤ºã—ãŸãŸã‚ã€ClickHouseã¯990è¡Œã®ã¿ã‚’ロードã—ã¾ã—ãŸã€‚ + +:::tip +`file()`関数を使用ã™ã‚‹å ´åˆã€ClickHouse Cloudã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã™ã‚‹ãƒžã‚·ãƒ³ä¸Šã§`clickhouse client`を実行ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ローカルã§ãƒ•ã‚¡ã‚¤ãƒ«ã‚’探索ã™ã‚‹ã«ã¯[`clickhouse-local`](/docs/ja/operations/utilities/clickhouse-local.md)を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +::: + +### CSVファイルã§ã®NULL値ã®æ‰±ã„ + +NULL値ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’生æˆã—ãŸã‚¢ãƒ—リケーションã«å¿œã˜ã¦ç•°ãªã‚‹æ–¹æ³•ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚デフォルトã§ã¯ã€ClickHouseã¯CSVã§`\N`ã‚’NULL値ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ãŒã€[format_csv_null_representation](/docs/ja/operations/settings/settings-formats.md/#format_tsv_null_representation)オプションを使用ã—ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ + +次ã®CSVファイルãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š + +```bash +> cat nulls.csv +Donald,90 +Joe,Nothing +Nothing,70 +``` + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ã¨ã€ClickHouseã¯`Nothing`を文字列ã¨ã—ã¦æ‰±ã„ã¾ã™ï¼ˆã“ã‚ŒãŒæ­£ã—ã„): + +```sql +SELECT * FROM file('nulls.csv') +``` +```response +┌─c1──────┬─c2──────┠+│ Donald │ 90 │ +│ Joe │ Nothing │ +│ Nothing │ 70 │ +└─────────┴─────────┘ +``` + +ClickHouseã«`Nothing`ã‚’`NULL`ã¨ã—ã¦æ‰±ã‚ã›ãŸã„å ´åˆã¯ã€æ¬¡ã®ã‚ªãƒ—ションを使用ã—ã¦å®šç¾©ã§ãã¾ã™ï¼š + +```sql +SET format_csv_null_representation = 'Nothing' +``` + +ã“ã‚Œã§ã€æœŸå¾…通りã«`NULL`ãŒå…¥ã‚Šã¾ã™ï¼š + +```sql +SELECT * FROM file('nulls.csv') +``` +```response +┌─c1─────┬─c2───┠+│ Donald │ 90 │ +│ Joe │ á´ºáµá´¸á´¸ │ +│ á´ºáµá´¸á´¸ │ 70 │ +└────────┴──────┘ +``` + +## TSV(タブ区切り)ファイル + +タブ区切りデータフォーマットã¯ã€ãƒ‡ãƒ¼ã‚¿äº¤æ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ã—ã¦åºƒã使用ã•ã‚Œã¦ã„るフォーマットã§ã™ã€‚[TSVファイル](assets/data_small.tsv)ã‹ã‚‰ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ã«ã¯ã€[TabSeparated](/docs/ja/interfaces/formats.md/#tabseparated)フォーマットを使用ã—ã¾ã™ï¼š + +```bash +clickhouse-client -q "INSERT INTO sometable FORMAT TabSeparated" < data_small.tsv +``` + +ヘッダをæŒã¤TSVファイルをæ“作ã™ã‚‹ãŸã‚ã®[TabSeparatedWithNames](/docs/ja/interfaces/formats.md/#tabseparatedwithnames)フォーマットもã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€CSVã¨åŒæ§˜ã«ã€[input_format_tsv_skip_first_lines](/docs/ja/operations/settings/settings-formats.md/#input_format_tsv_skip_first_lines)オプションを使用ã—ã¦æœ€åˆã®X行をスキップã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +### Raw TSV + +時折ã€TSVファイルã¯ã‚¿ãƒ–や改行をエスケープã›ãšã«ä¿å­˜ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ãã®ã‚ˆã†ãªãƒ•ã‚¡ã‚¤ãƒ«ã‚’扱ã†ãŸã‚ã«ã¯ã€[TabSeparatedRaw](/docs/ja/interfaces/formats.md/#tabseparatedraw)を使用ã™ã‚‹ã¹ãã§ã™ã€‚ + +## CSVã¸ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +å‰ã®ä¾‹ã®ã„ãšã‚Œã‹ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ã‚‚使用ã§ãã¾ã™ã€‚テーブル(ã¾ãŸã¯ã‚¯ã‚¨ãƒªï¼‰ã‹ã‚‰CSVフォーマットã«ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€åŒã˜`FORMAT`å¥ã‚’使用ã—ã¾ã™ï¼š + +```sql +SELECT * +FROM sometable +LIMIT 5 +FORMAT CSV +``` +```response +"Akiba_Hebrew_Academy","2017-08-01",241 +"Aegithina_tiphia","2018-02-01",34 +"1971-72_Utah_Stars_season","2016-10-01",1 +"2015_UEFA_European_Under-21_Championship_qualification_Group_8","2015-12-01",73 +"2016_Greater_Western_Sydney_Giants_season","2017-05-01",86 +``` + +CSVファイルã«ãƒ˜ãƒƒãƒ€ã‚’追加ã™ã‚‹ã«ã¯ã€[CSVWithNames](/docs/ja/interfaces/formats.md/#csvwithnames)フォーマットを使用ã—ã¾ã™ï¼š + +```sql +SELECT * +FROM sometable +LIMIT 5 +FORMAT CSVWithNames +``` +```response +"path","month","hits" +"Akiba_Hebrew_Academy","2017-08-01",241 +"Aegithina_tiphia","2018-02-01",34 +"1971-72_Utah_Stars_season","2016-10-01",1 +"2015_UEFA_European_Under-21_Championship_qualification_Group_8","2015-12-01",73 +"2016_Greater_Western_Sydney_Giants_season","2017-05-01",86 +``` + +### エクスãƒãƒ¼ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’CSVファイルã«ä¿å­˜ + +エクスãƒãƒ¼ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’ファイルã«ä¿å­˜ã™ã‚‹ã«ã¯ã€[INTO…OUTFILE](/docs/ja/sql-reference/statements/select/into-outfile.md)å¥ã‚’使用ã—ã¾ã™ï¼š + +```sql +SELECT * +FROM sometable +INTO OUTFILE 'out.csv' +FORMAT CSVWithNames +``` +```response +36838935 rows in set. Elapsed: 1.304 sec. Processed 36.84 million rows, 1.42 GB (28.24 million rows/s., 1.09 GB/s.) +``` + +36百万行をCSVファイルã«ä¿å­˜ã™ã‚‹ã®ã«ClickHouseãŒç´„**1**秒ã‹ã‹ã‚Šã¾ã—ãŸã€‚ + +### カスタムデリミタã§ã®CSVエクスãƒãƒ¼ãƒˆ + +カンマ以外ã®ãƒ‡ãƒªãƒŸã‚¿ã‚’使用ã—ãŸã„å ´åˆã¯ã€[format_csv_delimiter](/docs/ja/operations/settings/settings-formats.md/#format_csv_delimiter)設定オプションを使用ã§ãã¾ã™ï¼š + +```sql +SET format_csv_delimiter = '|' +``` + +ã“ã‚Œã§ã€ClickHouseã¯CSVフォーマットã§`|`をデリミタã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ï¼š + +```sql +SELECT * +FROM sometable +LIMIT 5 +FORMAT CSV +``` +```response +"Akiba_Hebrew_Academy"|"2017-08-01"|241 +"Aegithina_tiphia"|"2018-02-01"|34 +"1971-72_Utah_Stars_season"|"2016-10-01"|1 +"2015_UEFA_European_Under-21_Championship_qualification_Group_8"|"2015-12-01"|73 +"2016_Greater_Western_Sydney_Giants_season"|"2017-05-01"|86 +``` + +### Windowså‘ã‘ã®CSVエクスãƒãƒ¼ãƒˆ + +Windows環境ã§å•é¡Œãªã動作ã™ã‚‹CSVファイルãŒå¿…è¦ãªå ´åˆã¯ã€[output_format_csv_crlf_end_of_line](/docs/ja/operations/settings/settings-formats.md/#output_format_csv_crlf_end_of_line)オプションを有効ã«ã™ã‚‹ã“ã¨ã‚’検討ã™ã¹ãã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æ”¹è¡Œã¨ã—ã¦`\n`ã®ä»£ã‚ã‚Šã«`\r\n`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼š + +```sql +SET output_format_csv_crlf_end_of_line = 1; +``` + +## CSVファイルã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«– + +多ãã®å ´åˆã€ä¸æ˜ŽãªCSVファイルをæ“作ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ãŸã‚ã€ã‚«ãƒ©ãƒ ã«ã©ã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’使用ã™ã‚‹ã‹ã‚’探索ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã€æŒ‡å®šã•ã‚ŒãŸCSVファイルã®åˆ†æžã«åŸºã¥ã„ã¦ãƒ‡ãƒ¼ã‚¿åž‹ã‚’推測ã—よã†ã¨ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€Œã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã€ã¨ã—ã¦çŸ¥ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚検出ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ã¯ã€[file()](/docs/ja/sql-reference/table-functions/file.md)関数ã¨çµ„ã¿åˆã‚ã›ã¦`DESCRIBE`ステートメントを使用ã—ã¦æŽ¢ç´¢ã§ãã¾ã™ï¼š + +```sql +DESCRIBE file('data-small.csv', CSV) +``` +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(String) │ │ │ │ │ │ +│ c2 │ Nullable(Date) │ │ │ │ │ │ +│ c3 │ Nullable(Int64) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ã“ã“ã§ã€ClickHouseã¯åŠ¹çŽ‡çš„ã«CSVファイルã®ã‚«ãƒ©ãƒ åž‹ã‚’推測ã§ãã¾ã—ãŸã€‚ClickHouseã«æŽ¨æ¸¬ã•ã›ãŸããªã„å ´åˆã¯ã€æ¬¡ã®ã‚ªãƒ—ションを使用ã—ã¦ç„¡åŠ¹ã«ã§ãã¾ã™ï¼š + +```sql +SET input_format_csv_use_best_effort_in_schema_inference = 0 +``` + +ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã¯ã€ã“ã®å ´åˆ`String`ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ + +### カラムタイプを明示的ã«æŒ‡å®šã—ãŸCSVã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã¨ã‚¤ãƒ³ãƒãƒ¼ãƒˆ {#exporting-and-importing-csv-with-explicit-column-types} + +ClickHouseã¯ã€[CSVWithNamesAndTypes](/docs/ja/interfaces/formats.md/#csvwithnamesandtypes)(ãŠã‚ˆã³ä»–ã®*WithNamesフォーマットファミリー)を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹éš›ã«ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—を明示的ã«è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM sometable +LIMIT 5 +FORMAT CSVWithNamesAndTypes +``` +```response +"path","month","hits" +"String","Date","UInt32" +"Akiba_Hebrew_Academy","2017-08-01",241 +"Aegithina_tiphia","2018-02-01",34 +"1971-72_Utah_Stars_season","2016-10-01",1 +"2015_UEFA_European_Under-21_Championship_qualification_Group_8","2015-12-01",73 +"2016_Greater_Western_Sydney_Giants_season","2017-05-01",86 +``` + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€ã‚«ãƒ©ãƒ åã‚’æŒã¤1è¡Œã¨ã‚«ãƒ©ãƒ åž‹ã‚’æŒã¤ã‚‚ã†1è¡Œã®2ã¤ã®ãƒ˜ãƒƒãƒ€è¡ŒãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ClickHouse(ãŠã‚ˆã³ä»–ã®ã‚¢ãƒ—リ)ã¯[ãã®ã‚ˆã†ãªãƒ•ã‚¡ã‚¤ãƒ«](assets/data_csv_types.csv)ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹éš›ã«ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—を識別ã§ãã¾ã™ï¼š + +```sql +DESCRIBE file('data_csv_types.csv', CSVWithNamesAndTypes) +``` +```response +┌─name──┬─type───┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ path │ String │ │ │ │ │ │ +│ month │ Date │ │ │ │ │ │ +│ hits │ UInt32 │ │ │ │ │ │ +└───────┴────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ã“ã‚Œã§ã€ClickHouseã¯æŽ¨æ¸¬ã®ä»£ã‚ã‚Šã«ã€ï¼ˆ2番目ã®ï¼‰ãƒ˜ãƒƒãƒ€è¡Œã«åŸºã¥ã„ã¦ã‚«ãƒ©ãƒ åž‹ã‚’識別ã—ã¾ã™ã€‚ + +## カスタムデリミタã€ã‚»ãƒ‘レータã€ãŠã‚ˆã³ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルール + +複雑ãªã‚±ãƒ¼ã‚¹ã§ã¯ã€ãƒ†ã‚­ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã¯éžå¸¸ã«ã‚«ã‚¹ã‚¿ãƒ ãªå½¢å¼ã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã€ãã‚Œã§ã‚‚構造をæŒã¤ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚ˆã†ãªã‚±ãƒ¼ã‚¹ã«ã¯ã€ã‚«ã‚¹ã‚¿ãƒ ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールã€ãƒ‡ãƒªãƒŸã‚¿ã€è¡Œã‚»ãƒ‘レータã€é–‹å§‹/終了シンボルを設定ã§ãる特別ãª[CustomSeparated](/docs/ja/interfaces/formats.md/#format-customseparated)フォーマットãŒã‚ã‚Šã¾ã™ã€‚ + +次ã®ãƒ‡ãƒ¼ã‚¿ãŒãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ï¼š + +``` +row('Akiba_Hebrew_Academy';'2017-08-01';241),row('Aegithina_tiphia';'2018-02-01';34),... +``` + +個別ã®è¡ŒãŒ`row()`ã§å›²ã¾ã‚Œã€è¡Œã¯`,`ã§åˆ†é›¢ã•ã‚Œã€å€‹åˆ¥ã®å€¤ã¯`;`ã§åŒºåˆ‡ã‚‰ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€æ¬¡ã®è¨­å®šã‚’使用ã—ã¦ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +SET format_custom_row_before_delimiter = 'row('; +SET format_custom_row_after_delimiter = ')'; +SET format_custom_field_delimiter = ';'; +SET format_custom_row_between_delimiter = ','; +SET format_custom_escaping_rule = 'Quoted'; +``` + +ã“ã‚Œã§ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ[ファイル](assets/data_small_custom.txt)ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM file('data_small_custom.txt', CustomSeparated) +LIMIT 3 +``` +```response +┌─c1────────────────────────┬─────────c2─┬──c3─┠+│ Akiba_Hebrew_Academy │ 2017-08-01 │ 241 │ +│ Aegithina_tiphia │ 2018-02-01 │ 34 │ +│ 1971-72_Utah_Stars_season │ 2016-10-01 │ 1 │ +└───────────────────────────┴────────────┴─────┘ +``` + +[CustomSeparatedWithNames](/docs/ja/interfaces/formats.md/#customseparatedwithnames)を使用ã—ã¦ã€ãƒ˜ãƒƒãƒ€ã‚’æ­£ã—ãエクスãƒãƒ¼ãƒˆãŠã‚ˆã³ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã•ã‚‰ã«è¤‡é›‘ãªã‚±ãƒ¼ã‚¹ã«å¯¾å‡¦ã™ã‚‹ãŸã‚ã«ã€æ­£è¦è¡¨ç¾ã‚„テンプレートフォーマットã«ã¤ã„ã¦ã¯[regexã¨ãƒ†ãƒ³ãƒ—レート](templates-regex.md)を探ã£ã¦ãã ã•ã„。 + +## 大容é‡CSVファイルã®æ“作 + +CSVファイルã¯å¤§å®¹é‡ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã€ClickHouseã¯ã©ã®ã‚ˆã†ãªã‚µã‚¤ã‚ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã§ã‚‚効率的ã«æ“作ã—ã¾ã™ã€‚大容é‡ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯é€šå¸¸åœ§ç¸®ã•ã‚Œã¦ãŠã‚Šã€ClickHouseã¯å‡¦ç†å‰ã«è§£å‡ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。Insert中ã«`COMPRESSION`å¥ã‚’使用ã§ãã¾ã™ï¼š + +```sql +INSERT INTO sometable +FROM INFILE 'data_csv.csv.gz' +COMPRESSION 'gzip' FORMAT CSV +``` + +`COMPRESSION`å¥ã‚’çœç•¥ã—ãŸå ´åˆã€ClickHouseã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‹¡å¼µå­ã«åŸºã¥ã„ã¦åœ§ç¸®å½¢å¼ã‚’推測ã—よã†ã¨ã—ã¾ã™ã€‚åŒã˜ã‚¢ãƒ—ローãƒã‚’使用ã—ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’直接圧縮フォーマットã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM for_csv +INTO OUTFILE 'data_csv.csv.gz' +COMPRESSION 'gzip' FORMAT CSV +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€åœ§ç¸®ã•ã‚ŒãŸ`data_csv.csv.gz`ファイルãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +## ãã®ä»–ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ + +ClickHouseã¯ã€ã•ã¾ã–ã¾ãªã‚·ãƒŠãƒªã‚ªã‚„プラットフォームをカãƒãƒ¼ã™ã‚‹ãŸã‚ã«ã€å¤šãã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€ãƒ†ã‚­ã‚¹ãƒˆãŠã‚ˆã³ãƒã‚¤ãƒŠãƒªãƒ¼å½¢å¼ã®ã‚µãƒãƒ¼ãƒˆã‚’å°Žå…¥ã—ã¦ã„ã¾ã™ã€‚次ã®è¨˜äº‹ã§ã€ã“れらã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŠã‚ˆã³ãれらを使用ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã•ã‚‰ã«æŽ¢ã£ã¦ãã ã•ã„: + +- **CSVã¨TSVフォーマット** +- [Parquet](parquet.md) +- [JSONフォーマット](/docs/ja/integrations/data-ingestion/data-formats/json/intro.md) +- [æ­£è¦è¡¨ç¾ã¨ãƒ†ãƒ³ãƒ—レート](templates-regex.md) +- [ãƒã‚¤ãƒ†ã‚£ãƒ–ãŠã‚ˆã³ãƒã‚¤ãƒŠãƒªãƒ¼ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ](binary.md) +- [SQLフォーマット](sql.md) + +ã¾ãŸã€ãƒ­ãƒ¼ã‚«ãƒ«/リモートファイルã§Clickhouseサーãƒãƒ¼ã‚’å¿…è¦ã¨ã›ãšã«ä½œæ¥­ã‚’è¡Œã†ãŸã‚ã®æºå¸¯åž‹å®Œå…¨é›†åˆãƒ„ールã§ã‚ã‚‹[clickhouse-local](https://clickhouse.com/blog/extracting-converting-querying-local-files-with-sql-clickhouse-local)ã‚‚ãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/data-ingestion/data-formats/images/working-with-json_01.png b/docs/ja/integrations/data-ingestion/data-formats/images/working-with-json_01.png new file mode 100644 index 00000000000..012e2f1cdf8 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/data-formats/images/working-with-json_01.png differ diff --git a/docs/ja/integrations/data-ingestion/data-formats/intro.md b/docs/ja/integrations/data-ingestion/data-formats/intro.md new file mode 100644 index 00000000000..15b47b7bdee --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/intro.md @@ -0,0 +1,36 @@ +--- +slug: /ja/integrations/data-formats +sidebar_label: æ¦‚è¦ +sidebar_position: 1 +keywords: [clickhouse, CSV, TSV, Parquet, clickhouse-client, clickhouse-local] +--- + +# ClickHouseã¸ã®ã•ã¾ã–ã¾ãªãƒ‡ãƒ¼ã‚¿å½¢å¼ã‹ã‚‰ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€ã•ã¾ã–ã¾ãªãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ã‹ã‚‰ã®ãƒ­ãƒ¼ãƒ‰ä¾‹ã‚’見ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### [**ãƒã‚¤ãƒŠãƒª**](/docs/ja/integrations/data-ingestion/data-formats/binary.md) + +ClickHouse Nativeã€MessagePackã€Protocol Buffersã€Cap’n Protoãªã©ã®ãƒã‚¤ãƒŠãƒªå½¢å¼ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã¨ãƒ­ãƒ¼ãƒ‰ã€‚ + +### [**CSVã¨TSV**](/docs/ja/integrations/data-ingestion/data-formats/csv-tsv.md) + +カスタムヘッダーã¨ã‚»ãƒ‘レーターを使用ã—ãŸCSVファミリー(TSVã‚’å«ã‚€ï¼‰ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆã¨ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã€‚ + +### [**JSON**](/docs/ja/integrations/data-ingestion/data-formats/json/intro.md) + +オブジェクトや行区切りNDJSONãªã©ã€ã•ã¾ã–ã¾ãªå½¢å¼ã§ã®JSONã®ãƒ­ãƒ¼ãƒ‰ã¨ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã€‚ + +### [**Parquetデータ**](/docs/ja/integrations/data-ingestion/data-formats/parquet.md) + +Parquetã‚„Arrowãªã©ã€ä¸€èˆ¬çš„ãªApacheå½¢å¼ã®å‡¦ç†ã€‚ + +### [**SQLデータ**](/docs/ja/integrations/data-ingestion/data-formats/sql.md) + +MySQLã‚„Postgresqlã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®SQLダンプを必è¦ã¨ã—ã¦ã„ã¾ã™ã‹ï¼Ÿã“れ以上探ã™å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +BIツールã®Grafanaã€Tableauãªã©ã‚’接続ã—ãŸã„å ´åˆã¯ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®[ビジュアル化カテゴリー](../../data-visualization.md)ã‚’ã”覧ãã ã•ã„。 + +## 関連コンテンツ + +- ブログ: [ClickHouseã«ãŠã‘るデータ形å¼ã®ç´¹ä»‹](https://clickhouse.com/blog/data-formats-clickhouse-csv-tsv-parquet-native) diff --git a/docs/ja/integrations/data-ingestion/data-formats/json/exporting.md b/docs/ja/integrations/data-ingestion/data-formats/json/exporting.md new file mode 100644 index 00000000000..7714c91d473 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/json/exporting.md @@ -0,0 +1,173 @@ +--- +title: JSONã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ +slug: /ja/integrations/data-formats/json/exporting +description: ClickHouseã‹ã‚‰JSONデータをエクスãƒãƒ¼ãƒˆã™ã‚‹æ–¹æ³• +keywords: [json, clickhouse, formats, exporting] +--- + +# JSONã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +インãƒãƒ¼ãƒˆç”¨ã«ä½¿ç”¨ã•ã‚Œã‚‹ã»ã¼ã™ã¹ã¦ã®JSONフォーマットã¯ã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã«ã‚‚使用ã§ãã¾ã™ã€‚最も一般的ãªã®ã¯[`JSONEachRow`](/docs/ja/interfaces/formats.md/#jsoneachrow)ã§ã™: + +```sql +SELECT * FROM sometable FORMAT JSONEachRow +``` +```response +{"path":"Bob_Dolman","month":"2016-11-01","hits":245} +{"path":"1-krona","month":"2017-01-01","hits":4} +{"path":"Ahmadabad-e_Kalij-e_Sofla","month":"2017-01-01","hits":3} +``` + +ã¾ãŸã¯ã€ã‚«ãƒ©ãƒ åã‚’çœç•¥ã—ã¦ãƒ‡ã‚£ã‚¹ã‚¯å®¹é‡ã‚’節約ã™ã‚‹ãŸã‚ã«[`JSONCompactEachRow`](/ja/interfaces/formats#jsoncompacteachrow)を使用ã§ãã¾ã™: + +```sql +SELECT * FROM sometable FORMAT JSONCompactEachRow +``` +```response +["Bob_Dolman", "2016-11-01", 245] +["1-krona", "2017-01-01", 4] +["Ahmadabad-e_Kalij-e_Sofla", "2017-01-01", 3] +``` + +## データ型を文字列ã¨ã—ã¦ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ {#overriding-data-types-as-strings} + +ClickHouseã¯ãƒ‡ãƒ¼ã‚¿åž‹ã‚’å°Šé‡ã—ã€JSONを標準ã«å¾“ã£ã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ã—ã‹ã—ã€ã™ã¹ã¦ã®å€¤ã‚’文字列ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€[JSONStringsEachRow](/docs/ja/interfaces/formats.md/#jsonstringseachrow)フォーマットを使用ã§ãã¾ã™: + +```sql +SELECT * FROM sometable FORMAT JSONStringsEachRow +``` +```response +{"path":"Bob_Dolman","month":"2016-11-01","hits":"245"} +{"path":"1-krona","month":"2017-01-01","hits":"4"} +{"path":"Ahmadabad-e_Kalij-e_Sofla","month":"2017-01-01","hits":"3"} +``` + +ã“ã“ã§ã¯ã€æ•°å€¤ã‚«ãƒ©ãƒ `hits`ãŒæ–‡å­—列ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã¾ã™ã€‚文字列ã¨ã—ã¦ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã¯ã™ã¹ã¦ã®JSON*フォーマットã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€`JSONStrings\*`ã‚„`JSONCompactStrings\*`フォーマットを探索ã§ãã¾ã™: + +```sql +SELECT * FROM sometable FORMAT JSONCompactStringsEachRow +``` +```response +["Bob_Dolman", "2016-11-01", "245"] +["1-krona", "2017-01-01", "4"] +["Ahmadabad-e_Kalij-e_Sofla", "2017-01-01", "3"] +``` + +## データã¨å…±ã«ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹ + +アプリã§ä¸€èˆ¬çš„ãª[JSON](/docs/ja/interfaces/formats.md/#json)フォーマットã¯ã€çµæžœãƒ‡ãƒ¼ã‚¿ã ã‘ã§ãªãカラムタイプやクエリ統計もエクスãƒãƒ¼ãƒˆã—ã¾ã™: + +```sql +SELECT * FROM sometable FORMAT JSON +``` +```response +{ + "meta": + [ + { + "name": "path", + "type": "String" + }, + … + ], + + "data": + [ + { + "path": "Bob_Dolman", + "month": "2016-11-01", + "hits": 245 + }, + … + ], + + "rows": 3, + + "statistics": + { + "elapsed": 0.000497457, + "rows_read": 3, + "bytes_read": 87 + } +} +``` + +[JSONCompact](/docs/ja/interfaces/formats.md/#jsoncompact)フォーマットã¯ã€åŒã˜ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’表示ã—ã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿è‡ªä½“をコンパクトãªå½¢å¼ã§å‡ºåŠ›ã—ã¾ã™: + +```sql +SELECT * FROM sometable FORMAT JSONCompact +``` +```response +{ + "meta": + [ + { + "name": "path", + "type": "String" + }, + … + ], + + "data": + [ + ["Bob_Dolman", "2016-11-01", 245], + ["1-krona", "2017-01-01", 4], + ["Ahmadabad-e_Kalij-e_Sofla", "2017-01-01", 3] + ], + + "rows": 3, + + "statistics": + { + "elapsed": 0.00074981, + "rows_read": 3, + "bytes_read": 87 + } +} +``` + +ã™ã¹ã¦ã®å€¤ã‚’文字列ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã«ã€[`JSONStrings`](/docs/ja/interfaces/formats.md/#jsonstrings)ã¾ãŸã¯[`JSONCompactStrings`](/docs/ja/interfaces/formats.md/#jsoncompactstrings)ãƒãƒªã‚¢ãƒ³ãƒˆã‚’検討ã—ã¦ãã ã•ã„。 + +## JSONデータã¨æ§‹é€ ã‚’コンパクトã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹æ–¹æ³• + +データã¨ãã®æ§‹é€ ã®ä¸¡æ–¹ã‚’æŒã¤ã‚ˆã‚ŠåŠ¹çŽ‡çš„ãªæ–¹æ³•ã¯ã€[`JSONCompactEachRowWithNamesAndTypes`](/docs/ja/interfaces/formats.md/#jsoncompacteachrowwithnamesandtypes)フォーマットを使用ã™ã‚‹ã“ã¨ã§ã™: + +```sql +SELECT * FROM sometable FORMAT JSONCompactEachRowWithNamesAndTypes +``` +```response +["path", "month", "hits"] +["String", "Date", "UInt32"] +["Bob_Dolman", "2016-11-01", 245] +["1-krona", "2017-01-01", 4] +["Ahmadabad-e_Kalij-e_Sofla", "2017-01-01", 3] +``` + +ã“ã®å½¢å¼ã¯ã€ã‚«ãƒ©ãƒ åã¨ã‚¿ã‚¤ãƒ—ã‚’æŒã¤2ã¤ã®ãƒ˜ãƒƒãƒ€è¡Œã‚’å‰ç½®ã—ãŸã‚³ãƒ³ãƒ‘クトãªJSONå½¢å¼ã‚’使用ã—ã¾ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯åˆ¥ã®ClickHouseインスタンス(ã¾ãŸã¯ä»–ã®ã‚¢ãƒ—リ)ã«ãƒ‡ãƒ¼ã‚¿ã‚’インジェストã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +## JSONをファイルã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ + +JSONデータをファイルã«ä¿å­˜ã™ã‚‹ã«ã¯ã€[INTO OUTFILE](/docs/ja/sql-reference/statements/select/into-outfile.md)å¥ã‚’使用ã§ãã¾ã™: + +```sql +SELECT * FROM sometable INTO OUTFILE 'out.json' FORMAT JSONEachRow +``` +```response +36838935 rows in set. Elapsed: 2.220 sec. Processed 36.84 million rows, 1.27 GB (16.60 million rows/s., 572.47 MB/s.) +``` + +ClickHouseã¯37百万件近ã„レコードをJSONファイルã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã®ã«ã‚ãšã‹2秒ã—ã‹ã‹ã‹ã‚Šã¾ã›ã‚“。ã¾ãŸã€`COMPRESSION`å¥ã‚’使用ã—ã¦ã‚ªãƒ³ã‚¶ãƒ•ãƒ©ã‚¤ã®åœ§ç¸®ã‚’有効ã«ã—ã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +```sql +SELECT * FROM sometable INTO OUTFILE 'out.json.gz' FORMAT JSONEachRow +``` +```response +36838935 rows in set. Elapsed: 22.680 sec. Processed 36.84 million rows, 1.27 GB (1.62 million rows/s., 56.02 MB/s.) +``` + +é”æˆã™ã‚‹ã®ã«ã‚ˆã‚Šå¤šãã®æ™‚é–“ãŒã‹ã‹ã‚Šã¾ã™ãŒã€ã¯ã‚‹ã‹ã«å°ã•ãªåœ§ç¸®ãƒ•ã‚¡ã‚¤ãƒ«ãŒç”Ÿæˆã•ã‚Œã¾ã™: + +```bash +2.2G out.json +576M out.json.gz +``` diff --git a/docs/ja/integrations/data-ingestion/data-formats/json/formats.md b/docs/ja/integrations/data-ingestion/data-formats/json/formats.md new file mode 100644 index 00000000000..681b82a9703 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/json/formats.md @@ -0,0 +1,380 @@ +--- +title: ä»–ã®JSONå½¢å¼ã®å‡¦ç† +slug: /ja/integrations/data-formats/json/other-formats +description: ä»–ã®JSONå½¢å¼ã®å‡¦ç† +keywords: [json, formats, json formats] +--- + +# ä»–ã®å½¢å¼ã®å‡¦ç† + +以å‰ã®JSONデータã®ãƒ­ãƒ¼ãƒ‰ä¾‹ã§ã¯ã€[`JSONEachRow`](/ja/interfaces/formats#jsoneachrow) (ndjson) ã®ä½¿ç”¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚以下ã«ä¸€èˆ¬çš„ãªå½¢å¼ã§ã®JSONã®ãƒ­ãƒ¼ãƒ‰ä¾‹ã‚’示ã—ã¾ã™ã€‚ + +## JSONオブジェクトã®é…列 + +JSONデータã®æœ€ã‚‚一般的ãªå½¢å¼ã®1ã¤ã¯ã€JSONé…列ã«JSONオブジェクトã®ãƒªã‚¹ãƒˆãŒã‚ã‚‹å½¢å¼ã§ã™ã€‚[ã“ã®ä¾‹](../assets/list.json)ã®ã‚ˆã†ã«ï¼š + +```bash +> cat list.json +[ + { + "path": "Akiba_Hebrew_Academy", + "month": "2017-08-01", + "hits": 241 + }, + { + "path": "Aegithina_tiphia", + "month": "2018-02-01", + "hits": 34 + }, + ... +] +``` + +ã“ã®ã‚ˆã†ãªãƒ‡ãƒ¼ã‚¿ã®ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã—ょã†ï¼š + +```sql +CREATE TABLE sometable +( + `path` String, + `month` Date, + `hits` UInt32 +) +ENGINE = MergeTree +ORDER BY tuple(month, path) +``` + +JSONオブジェクトã®ãƒªã‚¹ãƒˆã‚’インãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€[`JSONEachRow`](/docs/ja/interfaces/formats.md/#jsoneachrow)å½¢å¼ã‚’使用ã—ã¾ã™ï¼ˆ[list.json](../assets/list.json) ファイルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ï¼‰ï¼š + +```sql +INSERT INTO sometable +FROM INFILE 'list.json' +FORMAT JSONEachRow +``` + +`FROM INFILE`å¥ã‚’使用ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã—ã€ã‚¤ãƒ³ãƒãƒ¼ãƒˆãŒæˆåŠŸã—ãŸã“ã¨ã‚’確èªã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM sometable +``` +```response +┌─path──────────────────────┬──────month─┬─hits─┠+│ 1971-72_Utah_Stars_season │ 2016-10-01 │ 1 │ +│ Akiba_Hebrew_Academy │ 2017-08-01 │ 241 │ +│ Aegithina_tiphia │ 2018-02-01 │ 34 │ +└───────────────────────────┴────────────┴──────┘ +``` + +## NDJSON (行区切りJSON) ã®å‡¦ç† + +多ãã®ã‚¢ãƒ—リケーションãŒJSONå½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’ログã«è¨˜éŒ²ã—ã€å„ログ行ãŒå€‹åˆ¥ã®JSONオブジェクトã¨ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚[ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«](../assets/object-per-line.json) ã®ã‚ˆã†ã«ï¼š + +```bash +cat object-per-line.json +``` +```response +{"path":"1-krona","month":"2017-01-01","hits":4} +{"path":"Ahmadabad-e_Kalij-e_Sofla","month":"2017-01-01","hits":3} +{"path":"Bob_Dolman","month":"2016-11-01","hits":245} +``` + +åŒã˜`JSONEachRow`å½¢å¼ã¯ã“ã®ã‚ˆã†ãªãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚‚対応ã§ãã¾ã™ï¼š + +```sql +INSERT INTO sometable FROM INFILE 'object-per-line.json' FORMAT JSONEachRow; +SELECT * FROM sometable; +``` +```response +┌─path──────────────────────┬──────month─┬─hits─┠+│ Bob_Dolman │ 2016-11-01 │ 245 │ +│ 1-krona │ 2017-01-01 │ 4 │ +│ Ahmadabad-e_Kalij-e_Sofla │ 2017-01-01 │ 3 │ +└───────────────────────────┴────────────┴──────┘ +``` + +## JSONオブジェクトキー + +å ´åˆã«ã‚ˆã£ã¦ã¯ã€JSONオブジェクトã®ãƒªã‚¹ãƒˆãŒé…列è¦ç´ ã§ã¯ãªãオブジェクトプロパティã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ï¼ˆä¾‹ã¨ã—ã¦[objects.json](../assets/objects.json) ã‚’å‚照): + +``` +cat objects.json +``` +```response +{ + "a": { + "path":"April_25,_2017", + "month":"2018-01-01", + "hits":2 + }, + "b": { + "path":"Akahori_Station", + "month":"2016-06-01", + "hits":11 + }, + ... +} +``` + +ClickHouseã¯ã€ã“ã®ç¨®ã®ãƒ‡ãƒ¼ã‚¿ã‚’[`JSONObjectEachRow`](/docs/ja/interfaces/formats.md/#jsonobjecteachrow)å½¢å¼ã‚’使用ã—ã¦ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ï¼š + +```sql +INSERT INTO sometable FROM INFILE 'objects.json' FORMAT JSONObjectEachRow; +SELECT * FROM sometable; +``` +```response +┌─path────────────┬──────month─┬─hits─┠+│ Abducens_palsy │ 2016-05-01 │ 28 │ +│ Akahori_Station │ 2016-06-01 │ 11 │ +│ April_25,_2017 │ 2018-01-01 │ 2 │ +└─────────────────┴────────────┴──────┘ +``` + +### 親オブジェクトキーã®å€¤ã‚’指定ã™ã‚‹ + +テーブルã«è¦ªã‚ªãƒ–ジェクトキーã®å€¤ã‚’ä¿å­˜ã—ãŸã„å ´åˆã¯ã€[次ã®ã‚ªãƒ—ション](/docs/ja/operations/settings/settings-formats.md/#format_json_object_each_row_column_for_object_name)を使用ã—ã¦ã‚­ãƒ¼å€¤ã‚’ä¿å­˜ã™ã‚‹åˆ—ã®åå‰ã‚’定義ã§ãã¾ã™ï¼š + +```sql +SET format_json_object_each_row_column_for_object_name = 'id' +``` + +å…ƒã®JSONファイルã‹ã‚‰ã©ã®ãƒ‡ãƒ¼ã‚¿ãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã‹ã‚’[`file()`](/docs/ja/sql-reference/functions/files.md/#file) 関数を使用ã—ã¦ç¢ºèªã§ãã¾ã™ï¼š + +```sql +SELECT * FROM file('objects.json', JSONObjectEachRow) +``` +```response +┌─id─┬─path────────────┬──────month─┬─hits─┠+│ a │ April_25,_2017 │ 2018-01-01 │ 2 │ +│ b │ Akahori_Station │ 2016-06-01 │ 11 │ +│ c │ Abducens_palsy │ 2016-05-01 │ 28 │ +└────┴─────────────────┴────────────┴──────┘ +``` + +`id` カラムãŒã‚­ãƒ¼å€¤ã«ã‚ˆã£ã¦æ­£ã—ã埋ã‚られã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +## JSONé…列 + +時ã«ã¯ã€ã‚¹ãƒšãƒ¼ã‚¹ã‚’節約ã™ã‚‹ãŸã‚ã«ã€JSONファイルãŒã‚ªãƒ–ジェクトã§ã¯ãªãé…列ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€[JSONé…列ã®ãƒªã‚¹ãƒˆ](../assets/arrays.json) を扱ã„ã¾ã™ï¼š + +```bash +cat arrays.json +``` +```response +["Akiba_Hebrew_Academy", "2017-08-01", 241], +["Aegithina_tiphia", "2018-02-01", 34], +["1971-72_Utah_Stars_season", "2016-10-01", 1] +``` + +ã“ã®å ´åˆã€ClickHouseã¯ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’ロードã—ã€é…列内ã®é †ç•ªã«åŸºã¥ã„ã¦å„値を対応ã™ã‚‹ã‚«ãƒ©ãƒ ã«å‰²ã‚Šå½“ã¦ã¾ã™ã€‚[`JSONCompactEachRow`](/docs/ja/interfaces/formats.md/#jsoncompacteachrow)å½¢å¼ã‚’使用ã—ã¾ã™ï¼š + +```sql +SELECT * FROM sometable +``` +```response +┌─c1────────────────────────┬─────────c2─┬──c3─┠+│ Akiba_Hebrew_Academy │ 2017-08-01 │ 241 │ +│ Aegithina_tiphia │ 2018-02-01 │ 34 │ +│ 1971-72_Utah_Stars_season │ 2016-10-01 │ 1 │ +└───────────────────────────┴────────────┴─────┘ +``` + +### JSONé…列ã‹ã‚‰å€‹ã€…ã®ã‚«ãƒ©ãƒ ã‚’インãƒãƒ¼ãƒˆã™ã‚‹ + +å ´åˆã«ã‚ˆã£ã¦ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒè¡Œå˜ä½ã§ã¯ãªãカラムå˜ä½ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€è¦ªJSONオブジェクトã«å€¤ã‚’æŒã¤ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚[次ã®ãƒ•ã‚¡ã‚¤ãƒ«](../assets/columns.json)を見ã¦ã¿ã¾ã—ょã†ï¼š + +```bash +cat columns.json +``` +```response +{ + "path": ["2007_Copa_America", "Car_dealerships_in_the_USA", "Dihydromyricetin_reductase"], + "month": ["2016-07-01", "2015-07-01", "2015-07-01"], + "hits": [178, 11, 1] +} +``` + +ClickHouseã¯ã€ã“ã®ã‚ˆã†ã«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’解æžã™ã‚‹ãŸã‚ã«[`JSONColumns`](/docs/ja/interfaces/formats.md/#jsoncolumns)å½¢å¼ã‚’使用ã—ã¾ã™ï¼š + +```sql +SELECT * FROM file('columns.json', JSONColumns) +``` +```response +┌─path───────────────────────┬──────month─┬─hits─┠+│ 2007_Copa_America │ 2016-07-01 │ 178 │ +│ Car_dealerships_in_the_USA │ 2015-07-01 │ 11 │ +│ Dihydromyricetin_reductase │ 2015-07-01 │ 1 │ +└────────────────────────────┴────────────┴──────┘ +``` + +よりコンパクトãªå½¢å¼ã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€ã‚ªãƒ–ジェクトã§ã¯ãªã[列ã®é…列](../assets/columns-array.json)を扱ã†å ´åˆã«ã¯[`JSONCompactColumns`](/docs/ja/interfaces/formats.md/#jsoncompactcolumns)å½¢å¼ã‚’使用ã—ã¾ã™ï¼š + +```sql +SELECT * FROM file('columns-array.json', JSONCompactColumns) +``` +```response +┌─c1──────────────┬─────────c2─┬─c3─┠+│ Heidenrod │ 2017-01-01 │ 10 │ +│ Arthur_Henrique │ 2016-11-01 │ 12 │ +│ Alan_Ebnother │ 2015-11-01 │ 66 │ +└─────────────────┴────────────┴────┘ +``` + +## 解æžã›ãšã«JSONオブジェクトをä¿å­˜ã™ã‚‹ + +å ´åˆã«ã‚ˆã£ã¦ã¯ã€JSONオブジェクトを解æžã›ãšã«å˜ä¸€ã®`String`(ã¾ãŸã¯JSON) カラムã«ä¿å­˜ã—ãŸã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ç•°ãªã‚‹æ§‹é€ ã®JSONオブジェクトã®ãƒªã‚¹ãƒˆã‚’扱ã†å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚[ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«](../assets/custom.json)を見ã¦ã¿ã¾ã—ょã†ã€‚ã“ã“ã«ã¯è¦ªãƒªã‚¹ãƒˆã®ä¸­ã«ç•°ãªã‚‹JSONオブジェクトãŒã‚ã‚Šã¾ã™ï¼š + +```bash +cat custom.json +``` +```response +[ + {"name": "Joe", "age": 99, "type": "person"}, + {"url": "/my.post.MD", "hits": 1263, "type": "post"}, + {"message": "Warning on disk usage", "type": "log"} +] +``` + +ã“れらã®å…ƒã®JSONオブジェクトを次ã®ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã—ãŸã„ã¨æ€ã„ã¾ã™ï¼š + +```sql +CREATE TABLE events +( + `data` String +) +ENGINE = MergeTree +ORDER BY () +``` + +ãã—ã¦ã€JSONオブジェクトを解æžã›ãšã«ä¿æŒã™ã‚‹ãŸã‚ã«[`JSONAsString`](/docs/ja/interfaces/formats.md/#jsonasstring)å½¢å¼ã‚’使用ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’ロードã§ãã¾ã™ï¼š + +```sql +INSERT INTO events (data) +FROM INFILE 'custom.json' +FORMAT JSONAsString +``` + +ä¿å­˜ã•ã‚ŒãŸã‚ªãƒ–ジェクトをクエリã™ã‚‹ãŸã‚ã«[JSON functions](/docs/ja/sql-reference/functions/json-functions.md)を使用ã§ãã¾ã™ï¼š + +```sql +SELECT + JSONExtractString(data, 'type') AS type, + data +FROM events +``` +```response +┌─type───┬─data─────────────────────────────────────────────────┠+│ person │ {"name": "Joe", "age": 99, "type": "person"} │ +│ post │ {"url": "/my.post.MD", "hits": 1263, "type": "post"} │ +│ log │ {"message": "Warning on disk usage", "type": "log"} │ +└────────┴──────────────────────────────────────────────────────┘ +``` + +`JSONAsString`ã¯é€šå¸¸`JSONEachRow`å½¢å¼ã§ä½¿ç”¨ã•ã‚Œã‚‹JSONオブジェクトãŒè¡Œã”ã¨ã«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã§ã‚‚å•é¡Œãªã動作ã—ã¾ã™ã€‚ + +## 入れå­ã«ãªã£ãŸã‚ªãƒ–ジェクトã®ã‚¹ã‚­ãƒ¼ãƒž + +[入れå­ã«ãªã£ãŸJSONオブジェクト](../assets/list-nested.json)を扱ã†å ´åˆã¯ã€è¿½åŠ ã§ã‚¹ã‚­ãƒ¼ãƒžã‚’定義ã—ã€è¤‡åˆåž‹ï¼ˆ[`Array`](/docs/ja/sql-reference/data-types/array.md/)ã€[`Object Data Type`](/ja/sql-reference/data-types/object-data-type)ã¾ãŸã¯[`Tuple`](/docs/ja/sql-reference/data-types/tuple.md/))を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ロードã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM file('list-nested.json', JSONEachRow, 'page Tuple(path String, title String, owner_id UInt16), month Date, hits UInt32') +LIMIT 1 +``` +```response +┌─page───────────────────────────────────────────────┬──────month─┬─hits─┠+│ ('Akiba_Hebrew_Academy','Akiba Hebrew Academy',12) │ 2017-08-01 │ 241 │ +└────────────────────────────────────────────────────┴────────────┴──────┘ +``` + +## 入れå­ã«ãªã£ãŸJSONオブジェクトã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ + +入れå­ã«ãªã£ãŸJSONキーをå‚ç…§ã™ã‚‹ãŸã‚ã«ã€[次ã®è¨­å®šã‚ªãƒ—ション](/docs/ja/operations/settings/settings-formats.md/#input_format_import_nested_json)を有効ã«ã—ã¾ã™ï¼š + +```sql +SET input_format_import_nested_json = 1 +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€å…¥ã‚Œå­ã«ãªã£ãŸJSONオブジェクトキーをドット表記法を使用ã—ã¦å‚ç…§ã§ãã¾ã™ï¼ˆæ©Ÿèƒ½ã•ã›ã‚‹ãŸã‚ã«ãƒãƒƒã‚¯ãƒ†ã‚£ãƒƒã‚¯è¨˜å·ã§ãƒ©ãƒƒãƒ—ã™ã‚‹ã“ã¨ã‚’忘れãªã„ã§ãã ã•ã„): + +```sql +SELECT * +FROM file('list-nested.json', JSONEachRow, '`page.owner_id` UInt32, `page.title` String, month Date, hits UInt32') +LIMIT 1 +``` +```results +┌─page.owner_id─┬─page.title───────────┬──────month─┬─hits─┠+│ 12 │ Akiba Hebrew Academy │ 2017-08-01 │ 241 │ +└───────────────┴──────────────────────┴────────────┴──────┘ +``` + +ã“ã®æ–¹æ³•ã§ã€å…¥ã‚Œå­ã«ãªã£ãŸJSONオブジェクトをフラット化ã—ãŸã‚Šã€ã„ãã¤ã‹ã®å…¥ã‚Œå­ã«ãªã£ãŸå€¤ã‚’使用ã—ã¦ãれらを個別ã®ã‚«ãƒ©ãƒ ã¨ã—ã¦ä¿å­˜ã§ãã¾ã™ã€‚ + +## ä¸æ˜Žãªã‚«ãƒ©ãƒ ã‚’スキップã™ã‚‹ + +デフォルトã§ã¯ã€ClickHouseã¯JSONデータã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆæ™‚ã«ä¸æ˜Žãªã‚«ãƒ©ãƒ ã‚’無視ã—ã¾ã™ã€‚`month`カラムãŒãªã„テーブルã«å…ƒã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’インãƒãƒ¼ãƒˆã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +CREATE TABLE shorttable +( + `path` String, + `hits` UInt32 +) +ENGINE = MergeTree +ORDER BY path +``` + +å…ƒã®3カラムã®JSONデータをã“ã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +INSERT INTO shorttable FROM INFILE 'list.json' FORMAT JSONEachRow; +SELECT * FROM shorttable +``` +```response +┌─path──────────────────────┬─hits─┠+│ 1971-72_Utah_Stars_season │ 1 │ +│ Aegithina_tiphia │ 34 │ +│ Akiba_Hebrew_Academy │ 241 │ +└───────────────────────────┴──────┘ +``` + +ClickHouseã¯ã‚¤ãƒ³ãƒãƒ¼ãƒˆæ™‚ã«ä¸æ˜Žãªã‚«ãƒ©ãƒ ã‚’無視ã—ã¾ã™ã€‚ã“ã‚Œã¯[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)設定オプションã«ã‚ˆã£ã¦ç„¡åŠ¹ã«ã§ãã¾ã™ï¼š + +```sql +SET input_format_skip_unknown_fields = 0; +INSERT INTO shorttable FROM INFILE 'list.json' FORMAT JSONEachRow; +``` +```response +Ok. +Exception on client: +Code: 117. DB::Exception: Unknown field found while parsing JSONEachRow format: month: (in file/uri /data/clickhouse/user_files/list.json): (at row 1) +``` + +ClickHouseã¯JSONã¨ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ æ§‹é€ ãŒä¸ä¸€è‡´ã®éš›ã«ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## BSON + +ClickHouseã¯ã€[BSON](https://bsonspec.org/)ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã¨ã‚¤ãƒ³ãƒãƒ¼ãƒˆã‚’許å¯ã—ã¾ã™ã€‚ã“ã®å½¢å¼ã¯ã€ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ï¼ˆä¾‹ï¼š [MongoDB](https://github.com/mongodb/mongo) データベース)ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +BSONデータをインãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€[BSONEachRow](/docs/ja/interfaces/formats.md/#bsoneachrow)å½¢å¼ã‚’使用ã—ã¾ã™ã€‚[ã“ã®BSONファイル](../assets/data.bson)ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT * FROM file('data.bson', BSONEachRow) +``` +```response +┌─path──────────────────────┬─month─┬─hits─┠+│ Bob_Dolman │ 17106 │ 245 │ +│ 1-krona │ 17167 │ 4 │ +│ Ahmadabad-e_Kalij-e_Sofla │ 17167 │ 3 │ +└───────────────────────────┴───────┴──────┘ +``` + +åŒã˜å½¢å¼ã‚’使用ã—ã¦BSONファイルã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM sometable +INTO OUTFILE 'out.bson' +FORMAT BSONEachRow +``` + +ãã®å¾Œã€ãƒ‡ãƒ¼ã‚¿ãŒ`out.bson`ファイルã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/data-formats/json/inference.md b/docs/ja/integrations/data-ingestion/data-formats/json/inference.md new file mode 100644 index 00000000000..4b7ebe1a6a3 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/json/inference.md @@ -0,0 +1,279 @@ +--- +title: JSON スキーマã®æŽ¨è«– +slug: /ja/integrations/data-formats/json/inference +description: JSON スキーマã®æŽ¨è«–ã®ä½¿ç”¨æ–¹æ³• +keywords: [json, schema, inference, schema inference] +--- + +ClickHouse 㯠JSON データã®æ§‹é€ ã‚’自動的ã«åˆ¤åˆ¥ã§ãã¾ã™ã€‚ã“れを利用ã—ã¦ã€`clickhouse-local` ã‚„ S3ãƒã‚±ãƒƒãƒˆä¸Šã®ãƒ‡ã‚£ã‚¹ã‚¯ã«ç›´æŽ¥ JSON データをクエリ**ã™ã‚‹ã€ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ã‚’ ClickHouse ã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹å‰ã«ã‚¹ã‚­ãƒ¼ãƒžã‚’自動的ã«ä½œæˆã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +## 型推論を使用ã™ã‚‹å ´åˆ + +* **一貫ã—ãŸæ§‹é€ ** - 型を推論ã—よã†ã¨ã—ã¦ã„るデータã«ã€èˆˆå‘³ã®ã‚る全カラムãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€‚推論後ã«è¿½åŠ ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã‚’å«ã‚€ãƒ‡ãƒ¼ã‚¿ã¯ç„¡è¦–ã•ã‚Œã€ã‚¯ã‚¨ãƒªã§ãã¾ã›ã‚“。 +* **一貫ã—ãŸåž‹** - 特定ã®ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ¼ã‚¿åž‹ãŒäº’æ›æ€§ã‚’æŒãŸãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +:::note é‡è¦ +ã‚‚ã—æ–°ã—ã„キーãŒã‚¹ã‚­ãƒ¼ãƒžã‚’変更ã™ã‚‹å分ãªè­¦å‘Šãªã—ã«è¿½åŠ ã•ã‚Œã‚‹å‹•çš„㪠JSON ã‚’ãŠæŒã¡ã®å ´åˆã¯ã€ä¾‹ãˆã° Kubernetes ã®ãƒ­ã‚°ãƒ©ãƒ™ãƒ«ãªã©ã€[**JSON スキーマã®è¨­è¨ˆ**](/docs/ja/integrations/data-formats/json/schema)ã®èª­è§£ã‚’推奨ã—ã¾ã™ã€‚ +::: + +## åž‹ã®æ¤œå‡º + +以å‰ã®ä¾‹ã§ã¯ã€NDJSONå½¢å¼ã®[Python PyPI データセット](https://clickpy.clickhouse.com/)ã®ç°¡å˜ãªãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¦ã„ã¾ã—ãŸã€‚ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€2.5百万ã®å­¦è¡“論文をå«ã‚€ãƒã‚¹ãƒˆã•ã‚ŒãŸæ§‹é€ ã‚’æŒã¤ã‚ˆã‚Šè¤‡é›‘ãª[arXiv データセット](https://www.kaggle.com/datasets/Cornell-University/arxiv?resource=download)を調査ã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ NDJSON ã¨ã—ã¦é…布ã•ã‚Œã€å„è¡ŒãŒç™ºè¡¨ã•ã‚ŒãŸå­¦è¡“論文を表ã—ã¦ã„ã¾ã™ã€‚以下ã«ä¾‹ã¨ãªã‚‹è¡Œã‚’示ã—ã¾ã™ã€‚ + +```json +{ + "id": "2101.11408", + "submitter": "Daniel Lemire", + "authors": "Daniel Lemire", + "title": "Number Parsing at a Gigabyte per Second", + "comments": "Software at https://github.com/fastfloat/fast_float and\n https://github.com/lemire/simple_fastfloat_benchmark/", + "journal-ref": "Software: Practice and Experience 51 (8), 2021", + "doi": "10.1002/spe.2984", + "report-no": null, + "categories": "cs.DS cs.MS", + "license": "http://creativecommons.org/licenses/by/4.0/", + "abstract": "With disks and networks providing gigabytes per second ....\n", + "versions": [ + { + "created": "Mon, 11 Jan 2021 20:31:27 GMT", + "version": "v1" + }, + { + "created": "Sat, 30 Jan 2021 23:57:29 GMT", + "version": "v2" + } + ], + "update_date": "2022-11-07", + "authors_parsed": [ + [ + "Lemire", + "Daniel", + "" + ] + ] +} +``` + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ã€ä»¥å‰ã®ä¾‹ã‚ˆã‚Šã‚‚複雑ãªã‚¹ã‚­ãƒ¼ãƒžã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’定義ã™ã‚‹ãƒ—ロセスを以下ã«ç¤ºã—ã€`Tuple` ã‚„ `Array` ãªã©ã®è¤‡é›‘ãªåž‹ã‚’å°Žå…¥ã—ã¾ã™ã€‚ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯å…¬é–‹ã•ã‚Œã¦ã„ã‚‹ S3 ãƒã‚±ãƒƒãƒˆ `s3://datasets-documentation/arxiv/arxiv.json.gz` ã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +上記ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯ãƒã‚¹ãƒˆã•ã‚ŒãŸ JSON オブジェクトãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ユーザーã¯ã‚¹ã‚­ãƒ¼ãƒžã‚’作æˆã—ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç†ã™ã‚‹ã¹ãã§ã™ãŒã€æŽ¨è«–ã«ã‚ˆã‚Šãƒ‡ãƒ¼ã‚¿ã‹ã‚‰åž‹ã‚’推測ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã‚¹ã‚­ãƒ¼ãƒž DDL ãŒè‡ªå‹•ç”Ÿæˆã•ã‚Œã€æ‰‹å‹•ã§ä½œæˆã™ã‚‹å¿…è¦ãŒãªããªã‚Šã€é–‹ç™ºãƒ—ロセスãŒåŠ é€Ÿã•ã‚Œã¾ã™ã€‚ + +:::note 自動フォーマット検出 +スキーマを検出ã™ã‚‹ã ã‘ã§ãªãã€JSON スキーマ推論ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‹¡å¼µå­ã‚„内容ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’自動的ã«æŽ¨æ¸¬ã—ã¾ã™ã€‚上記ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ãã®çµæžœã¨ã—ã¦è‡ªå‹•çš„ã« NDJSON ã¨ã—ã¦èªè­˜ã•ã‚Œã¾ã™ã€‚ +::: + +[s3 関数](/ja/sql-reference/table-functions/s3)㨠`DESCRIBE` コマンドを使用ã™ã‚‹ã¨ã€æŽ¨è«–ã•ã‚Œã‚‹åž‹ã‚’確èªã§ãã¾ã™ã€‚ + +```sql +DESCRIBE TABLE s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/arxiv/arxiv.json.gz') +SETTINGS describe_compact_output = 1 +``` +```response +┌─name───────────┬─type────────────────────────────────────────────────────────────────────┠+│ id │ Nullable(String) │ +│ submitter │ Nullable(String) │ +│ authors │ Nullable(String) │ +│ title │ Nullable(String) │ +│ comments │ Nullable(String) │ +│ journal-ref │ Nullable(String) │ +│ doi │ Nullable(String) │ +│ report-no │ Nullable(String) │ +│ categories │ Nullable(String) │ +│ license │ Nullable(String) │ +│ abstract │ Nullable(String) │ +│ versions │ Array(Tuple(created Nullable(String),version Nullable(String))) │ +│ update_date │ Nullable(Date) │ +│ authors_parsed │ Array(Array(Nullable(String))) │ +└────────────────┴─────────────────────────────────────────────────────────────────────────┘ +``` + +:::note null ã®å›žé¿ +多ãã®ã‚«ãƒ©ãƒ ãŒ Nullable ã¨ã—ã¦æ¤œå‡ºã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚[Nullable ã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•ã‚Œã¦ã„ã¾ã›ã‚“](https://clickhouse.com/docs/ja/sql-reference/data-types/nullable#storage-features)ãŒã€çµ¶å¯¾ã«å¿…è¦ãªå ´åˆã‚’除ã„ã¦ä½¿ç”¨ã¯é¿ã‘ã¦ãã ã•ã„。[schema_inference_make_columns_nullable](https://clickhouse.com/docs/ja/interfaces/schema-inference#schema_inference_make_columns_nullable)を使用ã—ã¦ã€Nullable ãŒé©ç”¨ã•ã‚Œã‚‹ã¨ãã®æŒ™å‹•ã‚’制御ã§ãã¾ã™ã€‚ +::: + +ã»ã¨ã‚“ã©ã®ã‚«ãƒ©ãƒ ãŒè‡ªå‹•çš„ã« `String` ã¨ã—ã¦æ¤œå‡ºã•ã‚Œã¦ã„る一方ã€`update_date` カラムã¯æ­£ã—ã `Date` ã¨ã—ã¦æ¤œå‡ºã•ã‚Œã¦ã„ã¾ã™ã€‚`versions` カラムã¯ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆã‚’æ ¼ç´ã™ã‚‹ãŸã‚ã« `Array(Tuple(created String, version String))` ã¨ã—ã¦ä½œæˆã•ã‚Œã€`authors_parsed` ã¯ãƒã‚¹ãƒˆã•ã‚ŒãŸé…列ã®ãŸã‚ã« `Array(Array(String))` ã¨ã—ã¦å®šç¾©ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +:::note 型検出ã®åˆ¶å¾¡ +日付や日時ã®è‡ªå‹•æ¤œå‡ºã¯ã€è¨­å®š [`input_format_try_infer_dates`](/docs/ja/interfaces/schema-inference#input_format_try_infer_dates)ãŠã‚ˆã³[`input_format_try_infer_datetimes`](/docs/ja/interfaces/schema-inference#input_format_try_infer_datetimes)(ã„ãšã‚Œã‚‚デフォルトã§æœ‰åŠ¹ï¼‰ã‚’通ã—ã¦åˆ¶å¾¡ã§ãã¾ã™ã€‚オブジェクトをタプルã¨ã—ã¦æŽ¨æ¸¬ã™ã‚‹ã“ã¨ã¯ã€è¨­å®š [`input_format_json_try_infer_named_tuples_from_objects`](/docs/ja/operations/settings/formats#input_format_json_try_infer_named_tuples_from_objects)ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚JSON ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–を制御ã™ã‚‹ãã®ä»–ã®è¨­å®šã€ä¾‹ãˆã°æ•°å­—ã®è‡ªå‹•æ¤œå‡ºã¯[ã“ã¡ã‚‰ã‚’å‚ç…§ã—ã¦ãã ã•ã„](/docs/ja/interfaces/schema-inference#text-formats)。 +::: + +## JSON ã®ã‚¯ã‚¨ãƒª + +スキーマ推論ã«ä¾å­˜ã—㦠JSON データをãã®å ´ã§ã‚¯ã‚¨ãƒªã§ãã¾ã™ã€‚下記ã«ã‚るよã†ã«ã€æ—¥ä»˜ã¨é…列ãŒè‡ªå‹•çš„ã«æ¤œå‡ºã•ã‚Œã‚‹ã“ã¨ã‚’利用ã—ã¦ã€å„å¹´ã®ãƒˆãƒƒãƒ—著者を探ã—ã¾ã™ã€‚ + +```sql +SELECT + toYear(update_date) AS year, + authors, + count() AS c +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/arxiv/arxiv.json.gz') +GROUP BY + year, + authors +ORDER BY + year ASC, + c DESC +LIMIT 1 BY year + +┌─year─┬─authors────────────────────────────────────┬───c─┠+│ 2007 │ The BABAR Collaboration, B. Aubert, et al │ 98 │ +│ 2008 │ The OPAL collaboration, G. Abbiendi, et al │ 59 │ +│ 2009 │ Ashoke Sen │ 77 │ +│ 2010 │ The BABAR Collaboration, B. Aubert, et al │ 117 │ +│ 2011 │ Amelia Carolina Sparavigna │ 21 │ +│ 2012 │ ZEUS Collaboration │ 140 │ +│ 2013 │ CMS Collaboration │ 125 │ +│ 2014 │ CMS Collaboration │ 87 │ +│ 2015 │ ATLAS Collaboration │ 118 │ +│ 2016 │ ATLAS Collaboration │ 126 │ +│ 2017 │ CMS Collaboration │ 122 │ +│ 2018 │ CMS Collaboration │ 138 │ +│ 2019 │ CMS Collaboration │ 113 │ +│ 2020 │ CMS Collaboration │ 94 │ +│ 2021 │ CMS Collaboration │ 69 │ +│ 2022 │ CMS Collaboration │ 62 │ +│ 2023 │ ATLAS Collaboration │ 128 │ +│ 2024 │ ATLAS Collaboration │ 120 │ +└──────┴────────────────────────────────────────────┴─────┘ + +18 rows in set. Elapsed: 20.172 sec. Processed 2.52 million rows, 1.39 GB (124.72 thousand rows/s., 68.76 MB/s.) +``` + +スキーマ推論ã«ã‚ˆã‚Šã€ã‚¹ã‚­ãƒ¼ãƒžã‚’指定ã™ã‚‹ã“ã¨ãªã JSON ファイルをクエリã§ãã‚‹ãŸã‚ã€ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ãªãƒ‡ãƒ¼ã‚¿è§£æžä½œæ¥­ãŒåŠ é€Ÿã•ã‚Œã¾ã™ã€‚ + +## テーブルã®ä½œæˆ + +スキーマ推論ã«ä¾å­˜ã—ã¦ã€ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ã‚­ãƒ¼ãƒžã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下㮠`CREATE AS EMPTY` コマンドã¯ã€ãƒ†ãƒ¼ãƒ–ル㮠DDL を推論ã—ã€ãƒ†ãƒ¼ãƒ–ルãŒä½œæˆã•ã‚Œã‚‹ã“ã¨ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ¼ã‚¿ã‚’ロードã—ã¾ã›ã‚“: + +```sql +CREATE TABLE arxiv +ENGINE = MergeTree +ORDER BY update_date EMPTY +AS SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/arxiv/arxiv.json.gz') +SETTINGS schema_inference_make_columns_nullable = 0 +``` + +テーブルスキーマを確èªã™ã‚‹ã«ã¯ã€`SHOW CREATE TABLE` コマンドを使用ã—ã¾ã™ï¼š + +```sql +SHOW CREATE TABLE arxiv + +CREATE TABLE arxiv +( + `id` String, + `submitter` String, + `authors` String, + `title` String, + `comments` String, + `journal-ref` String, + `doi` String, + `report-no` String, + `categories` String, + `license` String, + `abstract` String, + `versions` Array(Tuple(created String, version String)), + `update_date` Date, + `authors_parsed` Array(Array(String)) +) +ENGINE = MergeTree +ORDER BY update_date +SETTINGS index_granularity = 8192 +``` + +上記ã¯ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã«é©ã—ãŸæ­£ã—ã„スキーマã§ã™ã€‚スキーマ推論ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®ã‚µãƒ³ãƒ—リングã¨è¡Œå˜ä½ã§ã®èª­ã¿å–ã‚Šã«åŸºã¥ã„ã¦è¡Œã‚ã‚Œã¾ã™ã€‚カラム値ã¯ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¾“ã£ã¦æŠ½å‡ºã•ã‚Œã€å†å¸°ãƒ‘ーサーã¨ãƒ’ューリスティックãŒå„値ã®åž‹ã‚’判定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚スキーマ推論ã§ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰èª­ã¿å–る行数ã¨ãƒã‚¤ãƒˆæ•°ã®æœ€å¤§å€¤ã¯ã€è¨­å®š [`input_format_max_rows_to_read_for_schema_inference`](/docs/ja/interfaces/schema-inference#input_format_max_rows_to_read_for_schema_inferenceinput_format_max_bytes_to_read_for_schema_inference)(デフォルトã§25000)ãŠã‚ˆã³ [`input_format_max_bytes_to_read_for_schema_inference`](/docs/ja/interfaces/schema-inference#input_format_max_rows_to_read_for_schema_inferenceinput_format_max_bytes_to_read_for_schema_inference)(デフォルトã§32MB)ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚検出ãŒæ­£ã—ããªã„å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯[ã“ã¡ã‚‰](/docs/ja/interfaces/schema-inference#schema_inference_hints)ã§èª¬æ˜Žã•ã‚Œã¦ã„るよã†ã«ãƒ’ントをæä¾›ã§ãã¾ã™ã€‚ + +### スニペットã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ + +上記ã®ä¾‹ã§ã¯ã€S3 ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルスキーマを作æˆã—ã¦ã„ã¾ã™ã€‚ユーザーã¯å˜ä¸€è¡Œã®ã‚¹ãƒ‹ãƒšãƒƒãƒˆã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã‚’作æˆã—ãŸã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ã€[format](/docs/ja/sql-reference/table-functions/format)関数を使用ã—ã¦å®Ÿç¾ã§ãã¾ã™: + +```sql +CREATE TABLE arxiv +ENGINE = MergeTree +ORDER BY update_date EMPTY +AS SELECT * +FROM format(JSONEachRow, '{"id":"2101.11408","submitter":"Daniel Lemire","authors":"Daniel Lemire","title":"Number Parsing at a Gigabyte per Second","comments":"Software at https://github.com/fastfloat/fast_float and","doi":"10.1002/spe.2984","report-no":null,"categories":"cs.DS cs.MS","license":"http://creativecommons.org/licenses/by/4.0/","abstract":"Withdisks and networks providing gigabytes per second ","versions":[{"created":"Mon, 11 Jan 2021 20:31:27 GMT","version":"v1"},{"created":"Sat, 30 Jan 2021 23:57:29 GMT","version":"v2"}],"update_date":"2022-11-07","authors_parsed":[["Lemire","Daniel",""]]}') SETTINGS schema_inference_make_columns_nullable = 0 + +SHOW CREATE TABLE arxiv + +CREATE TABLE arxiv +( + `id` String, + `submitter` String, + `authors` String, + `title` String, + `comments` String, + `doi` String, + `report-no` String, + `categories` String, + `license` String, + `abstract` String, + `versions` Array(Tuple(created String, version String)), + `update_date` Date, + `authors_parsed` Array(Array(String)) +) +ENGINE = MergeTree +ORDER BY update_date +``` + +## JSON データã®ãƒ­ãƒ¼ãƒ‰ + +å‰è¿°ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ロードã§ãるテーブルを作æˆã—ã¾ã—ãŸã€‚以下㮠`INSERT INTO SELECT` を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’テーブルã«æŒ¿å…¥ã§ãã¾ã™ï¼š + +```sql +INSERT INTO arxiv SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/arxiv/arxiv.json.gz') + +0 rows in set. Elapsed: 38.498 sec. Processed 2.52 million rows, 1.39 GB (65.35 thousand rows/s., 36.03 MB/s.) +Peak memory usage: 870.67 MiB. +``` + +ãã®ä»–ã®ã‚½ãƒ¼ã‚¹ã€ãŸã¨ãˆã°ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ã®ä¾‹ã¯[ã“ã¡ã‚‰](/docs/ja/sql-reference/statements/insert-into)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ロード後ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ `PrettyJSONEachRow` を使用ã—ã¦è¡Œã‚’å…ƒã®æ§‹é€ ã§è¡¨ç¤ºã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’クエリã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM arxiv +LIMIT 1 +FORMAT PrettyJSONEachRow + +{ + "id": "0704.0004", + "submitter": "David Callan", + "authors": "David Callan", + "title": "A determinant of Stirling cycle numbers counts unlabeled acyclic", + "comments": "11 pages", + "journal-ref": "", + "doi": "", + "report-no": "", + "categories": "math.CO", + "license": "", + "abstract": " We show that a determinant of Stirling cycle numbers counts unlabeled acyclic\nsingle-source automata.", + "versions": [ + { + "created": "Sat, 31 Mar 2007 03:16:14 GMT", + "version": "v1" + } + ], + "update_date": "2007-05-23", + "authors_parsed": [ + [ + "Callan", + "David" + ] + ] +} + +1 row in set. Elapsed: 0.009 sec. +``` + +## エラーã®å‡¦ç† + +時折ã€ä¸é©åˆ‡ãªãƒ‡ãƒ¼ã‚¿ã«é­é‡ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚特定ã®ã‚«ãƒ©ãƒ ãŒé©åˆ‡ãªåž‹ã‚’æŒã£ã¦ã„ãªã„å ´åˆã‚„ä¸é©åˆ‡ã«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸ JSON ãªã©ã§ã™ã€‚ãã®ãŸã‚ã€æŒ¿å…¥ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã™ãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚‹å ´åˆã«ç‰¹å®šã®è¡Œã‚’無視ã™ã‚‹ãŸã‚ã® [`input_format_allow_errors_ratio`](/docs/ja/operations/settings/formats#input_format_allow_errors_ratio) 設定を使用ã§ãã¾ã™ã€‚ã•ã‚‰ã«ã€æŽ¨è«–を支æ´ã™ã‚‹ãŸã‚ã®[ヒント](/docs/ja/interfaces/schema-inference#schema_inference_hints)ã‚’æä¾›ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +## ã•ã‚‰ãªã‚‹å­¦ç¿’ + +データ型推論ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[ã“ã¡ã‚‰](/ja/interfaces/schema-inference)ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒšãƒ¼ã‚¸ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/data-ingestion/data-formats/json/intro.md b/docs/ja/integrations/data-ingestion/data-formats/json/intro.md new file mode 100644 index 00000000000..0dc3f760df9 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/json/intro.md @@ -0,0 +1,37 @@ +--- +sidebar_label: æ¦‚è¦ +sidebar_position: 10 +title: JSONã®æ“作 +slug: /ja/integrations/data-formats/json/overview +description: ClickHouseã§ã®JSONã®æ“作 +keywords: [json, clickhouse] +--- + +# æ¦‚è¦ + +
+ +
+ +
+ +ClickHouseã¯ã€JSONを扱ã†ãŸã‚ã®ã„ãã¤ã‹ã®ã‚¢ãƒ—ローãƒã‚’æä¾›ã—ã¦ãŠã‚Šã€ãã‚Œãžã‚Œã«åˆ©ç‚¹ã¨æ¬ ç‚¹ã€ãŠã‚ˆã³åˆ©ç”¨ç”¨é€”ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€JSONã‚’ã©ã®ã‚ˆã†ã«ãƒ­ãƒ¼ãƒ‰ã—ã€ã‚¹ã‚­ãƒ¼ãƒžã‚’最é©ã«è¨­è¨ˆã™ã‚‹ã‹ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚以下ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ï¼š + +- [JSONã®ãƒ­ãƒ¼ãƒ‰](/docs/ja/integrations/data-formats/json/loading) - ç°¡å˜ãªã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¦ClickHouseã§JSON(特ã«[NDJSON](https://github.com/ndjson/ndjson-spec))をロードã—ã€ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ +- [JSONスキーマã®æŽ¨æ¸¬](/docs/ja/integrations/data-formats/json/inference) - JSONスキーマã®æŽ¨æ¸¬ã‚’使用ã—ã¦JSONをクエリã—ã€ãƒ†ãƒ¼ãƒ–ルスキーマを作æˆã—ã¾ã™ã€‚ +- [JSONスキーマã®è¨­è¨ˆ](/docs/ja/integrations/data-formats/json/schema) - JSONスキーマを設計ã—最é©åŒ–ã™ã‚‹ãŸã‚ã®ã‚¹ãƒ†ãƒƒãƒ—。 +- [JSONã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ](/docs/ja/integrations/data-formats/json/exporting) - JSONã‚’ã©ã®ã‚ˆã†ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã‹ã«ã¤ã„ã¦ã€‚ +- [ãã®ä»–ã®JSONå½¢å¼ã®å‡¦ç†](/docs/ja/integrations/data-formats/json/other-formats) - NDJSON以外ã®JSONå½¢å¼ã‚’処ç†ã™ã‚‹ãŸã‚ã®ã„ãã¤ã‹ã®ãƒ’ント。 +- [JSONをモデリングã™ã‚‹ãŸã‚ã®ãã®ä»–ã®ã‚¢ãƒ—ローãƒ](/docs/ja/integrations/data-formats/json/other-approaches) - JSONをモデリングã™ã‚‹ãŸã‚ã®é«˜åº¦ãªã‚¢ãƒ—ローãƒã€‚**推奨ã•ã‚Œã¾ã›ã‚“。** + +:::note é‡è¦: æ–°ã—ã„JSONタイプãŒé–“ã‚‚ãªãリリースã•ã‚Œã¾ã™ +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€æ—¢å­˜ã®JSON処ç†æŠ€è¡“ã«ã¤ã„ã¦è€ƒæ…®ã—ã¦ã„ã¾ã™ã€‚ç¾åœ¨ã€æ–°ã—ã„JSONタイプãŒæ´»ç™ºã«é–‹ç™ºã•ã‚Œã¦ãŠã‚Šã€é–“ã‚‚ãªã利用å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã®é€²æ—状æ³ã«ã¤ã„ã¦ã¯ã€[ã“ã®GitHub issue](https://github.com/ClickHouse/ClickHouse/issues/54864)を追ã£ã¦ãã ã•ã„。ã“ã®æ–°ã—ã„データタイプã¯ã€æ—¢å­˜ã®å»ƒæ­¢äºˆå®šã®[オブジェクトデータタイプ](/docs/ja/sql-reference/data-types/object-data-type)(エイリアス`JSON`)ã«å–ã£ã¦ä»£ã‚ã‚Šã¾ã™ã€‚ +::: diff --git a/docs/ja/integrations/data-ingestion/data-formats/json/loading.md b/docs/ja/integrations/data-ingestion/data-formats/json/loading.md new file mode 100644 index 00000000000..ea23837cc90 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/json/loading.md @@ -0,0 +1,101 @@ +--- +sidebar_label: JSONã®èª­ã¿è¾¼ã¿ +sidebar_position: 20 +title: JSONã®æ“作 +slug: /ja/integrations/data-formats/json/loading +description: JSONã®èª­ã¿è¾¼ã¿ +keywords: [json, clickhouse, 挿入, 読ã¿è¾¼ã¿] +--- + +# JSONã®èª­ã¿è¾¼ã¿ + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€JSONデータãŒ[NDJSON](https://github.com/ndjson/ndjson-spec)(改行区切りJSON)形å¼ã€ClickHouseã§ã„ã†ã¨ã“ã‚ã®[`JSONEachRow`](/ja/interfaces/formats#jsoneachrow)ã§ã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãã®ç°¡æ½”ã•ã¨åŠ¹çŽ‡çš„ãªã‚¹ãƒšãƒ¼ã‚¹ä½¿ç”¨ã‹ã‚‰JSONを読ã¿è¾¼ã‚€ãŸã‚ã®æŽ¨å¥¨å½¢å¼ã§ã™ãŒã€ä»–ã®å½¢å¼ã‚‚[入力ã¨å‡ºåŠ›](/docs/ja/interfaces/formats#json)ã«å¯¾ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +次ã®JSONサンプルを考ãˆã¾ã™ã€‚ã“ã‚Œã¯[Python PyPIデータセット](https://clickpy.clickhouse.com/)ã®è¡Œã‚’表ã—ã¦ã„ã¾ã™ï¼š + +```json +{ + "date": "2022-11-15", + "country_code": "ES", + "project": "clickhouse-connect", + "type": "bdist_wheel", + "installer": "pip", + "python_minor": "3.9", + "system": "Linux", + "version": "0.3.0" +} +``` + +ã“ã®JSONオブジェクトをClickHouseã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルスキーマを定義ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã«ç¤ºã•ã‚Œã¦ã„ã‚‹ã®ã¯ã€**JSONキーãŒã‚«ãƒ©ãƒ åã«ãƒžãƒƒãƒ”ングã•ã‚Œã‚‹**シンプルãªã‚¹ã‚­ãƒ¼ãƒžã§ã™ï¼š + +```sql +CREATE TABLE pypi ( + `date` Date, + `country_code` String, + `project` String, + `type` String, + `installer` String, + `python_minor` String, + `system` String, + `version` String +) +ENGINE = MergeTree +ORDER BY (project, date) +``` + +:::note 並ã³æ›¿ãˆã‚­ãƒ¼ã«ã¤ã„㦠+ã“ã“ã§ã¯ã€`ORDER BY`å¥ã‚’使用ã—ã¦ä¸¦ã³æ›¿ãˆã‚­ãƒ¼ã‚’é¸æŠžã—ã¦ã„ã¾ã™ã€‚並ã³æ›¿ãˆã‚­ãƒ¼ã®è©³ç´°ã¨é¸æŠžæ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[ã“ã¡ã‚‰](/docs/ja/data-modeling/schema-design#choosing-an-ordering-key)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +ClickHouseã¯è¤‡æ•°ã®å½¢å¼ã§JSONデータを読ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã€æ‹¡å¼µå­ã¨å†…容ã‹ã‚‰è‡ªå‹•çš„ã«åž‹ã‚’推測ã—ã¾ã™ã€‚上記ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦JSONファイルを読ã¿å–ã‚‹ã«ã¯ã€[S3関数](/docs/ja/sql-reference/table-functions/s3)を使用ã—ã¾ã™ï¼š + +```sql +SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/pypi/json/*.json.gz') +LIMIT 1 +┌───────date─┬─country_code─┬─project────────────┬─type────────┬─installer────┬─python_minor─┬─system─┬─version─┠+│ 2022-11-15 │ CN │ clickhouse-connect │ bdist_wheel │ bandersnatch │ │ │ 0.2.8 │ +└────────────┴──────────────┴────────────────────┴─────────────┴──────────────┴──────────────┴────────┴─────────┘ + +1 row in set. Elapsed: 1.232 sec. +``` + +ã“ã“ã§ã¯ãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ã‚’指定ã™ã‚‹å¿…è¦ãŒãªã„ã“ã¨ã«æ³¨ç›®ã—ã¦ãã ã•ã„。代ã‚ã‚Šã«ã€ãƒã‚±ãƒƒãƒˆå†…ã®ã™ã¹ã¦ã®`*.json.gz`ファイルを読ã¿å–ã‚‹ãŸã‚ã«globパターンを使用ã—ã¦ã„ã¾ã™ã€‚ClickHouseã¯æ‹¡å¼µå­ã¨å†…容ã‹ã‚‰å½¢å¼ãŒ`JSONEachRow`(ndjson)ã§ã‚ã‚‹ã“ã¨ã‚’自動的ã«æŽ¨æ¸¬ã—ã¾ã™ã€‚ClickHouseãŒå½¢å¼ã‚’検出ã§ããªã„å ´åˆã§ã‚‚ã€ãƒ‘ラメータ関数を使用ã—ã¦æ‰‹å‹•ã§å½¢å¼ã‚’指定ã§ãã¾ã™ã€‚ + +```sql +SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/pypi/json/*.json.gz', JSONEachRow) +``` + +:::note 圧縮ファイルã«ã¤ã„㦠+上記ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯åœ§ç¸®ã•ã‚Œã¦ã„ã¾ã™ãŒã€ã“ã‚Œã¯ClickHouseã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«æ¤œå‡ºãŠã‚ˆã³å‡¦ç†ã•ã‚Œã¾ã™ã€‚ +::: + +ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã®è¡Œã‚’読ã¿è¾¼ã‚€ã«ã¯ã€[`INSERT INTO SELECT`](/ja/sql-reference/statements/insert-into#inserting-the-results-of-select)を使用ã—ã¾ã™ï¼š + +```sql +INSERT INTO pypi SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/pypi/json/*.json.gz') +Ok. + +0 rows in set. Elapsed: 10.445 sec. Processed 19.49 million rows, 35.71 MB (1.87 million rows/s., 3.42 MB/s.) + +SELECT * FROM pypi LIMIT 2 + +┌───────date─┬─country_code─┬─project────────────┠+│ 2022-05-26 │ CN │ clickhouse-connect │ +│ 2022-05-26 │ CN │ clickhouse-connect │ +└────────────┴──────────────┴────────────────────┘ + +2 rows in set. Elapsed: 0.005 sec. Processed 8.19 thousand rows, 908.03 KB (1.63 million rows/s., 180.38 MB/s.) +``` + +è¡Œã¯[`FORMAT`å¥](/ja/sql-reference/statements/select/format)を使ã£ã¦ã‚¤ãƒ³ãƒ©ã‚¤ãƒ³ã§èª­ã¿è¾¼ã‚€ã“ã¨ã‚‚ã§ãã¾ã™ã€‚例ãˆã° + +```sql +INSERT INTO pypi +FORMAT JSONEachRow +{"date":"2022-11-15","country_code":"CN","project":"clickhouse-connect","type":"bdist_wheel","installer":"bandersnatch","python_minor":"","system":"","version":"0.2.8"} +``` + +ã“れらã®ä¾‹ã¯JSONEachRowå½¢å¼ã®ä½¿ç”¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ä»–ã®ä¸€èˆ¬çš„ãªJSONå½¢å¼ã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€ãれらã®ãƒ­ãƒ¼ãƒ‰æ–¹æ³•ã«ã¤ã„ã¦ã®ä¾‹ã¯[ã“ã¡ã‚‰](/docs/ja/integrations/data-formats/json/other-formats)ã§æä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +上記ã§ã¯éžå¸¸ã«ã‚·ãƒ³ãƒ—ルãªJSONデータã®èª­ã¿è¾¼ã¿ä¾‹ã‚’æä¾›ã—ã¾ã—ãŸã€‚ãƒã‚¹ãƒˆã•ã‚ŒãŸæ§‹é€ ã‚’å«ã‚€ã‚ˆã‚Šè¤‡é›‘ãªJSONã«ã¤ã„ã¦ã¯ã€[**JSONスキーマã®è¨­è¨ˆ**](/docs/ja/integrations/data-formats/json/schema)ガイドをå‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/data-ingestion/data-formats/json/other.md b/docs/ja/integrations/data-ingestion/data-formats/json/other.md new file mode 100644 index 00000000000..e946e9de57c --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/json/other.md @@ -0,0 +1,318 @@ +--- +title: JSONをモデル化ã™ã‚‹ä»–ã®ã‚¢ãƒ—ローム+slug: /ja/integrations/data-formats/json/other-approaches +description: JSONをモデル化ã™ã‚‹ä»–ã®ã‚¢ãƒ—ローム+keywords: [json, formats] +--- + +# JSONをモデル化ã™ã‚‹ä»–ã®ã‚¢ãƒ—ローム+ +**以下ã¯ã€ClickHouseã§JSONをモデル化ã™ã‚‹éš›ã®ä»£æ›¿æ‰‹æ®µã§ã™ã€‚ã“れらã¯å®Œå…¨æ€§ã®ãŸã‚ã«æ–‡æ›¸åŒ–ã•ã‚Œã¦ã„ã¾ã™ãŒã€ã»ã¨ã‚“ã©ã®ä½¿ç”¨ã‚±ãƒ¼ã‚¹ã§ã¯æŽ¨å¥¨ã•ã‚Œãšã€é©ç”¨ã•ã‚Œã¾ã›ã‚“。** + +## ãƒã‚¹ãƒˆã‚’使用ã™ã‚‹ + +[Nestedåž‹](/docs/ja/sql-reference/data-types/nested-data-structures/nested)ã¯ã€å¤‰æ›´ã•ã‚Œã‚‹ã“ã¨ãŒå°‘ãªã„é™çš„ãªã‚ªãƒ–ジェクトをモデル化ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ã“ã‚Œã¯`Tuple`ãŠã‚ˆã³`Array(Tuple)`ã®ä»£æ›¿æ‰‹æ®µã‚’æä¾›ã—ã¾ã™ã€‚一般的ã«ã€ã“ã®åž‹ã¯ãã®å‹•ä½œãŒã—ã°ã—ã°æ··ä¹±ã‚’æ‹›ããŸã‚ã€JSONã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯é¿ã‘ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚`Nested`ã®ä¸»ãªåˆ©ç‚¹ã¯ã€ã‚µãƒ–カラムãŒã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã§ä½¿ç”¨ã§ãã‚‹ã“ã¨ã§ã™ã€‚ + +以下ã«ã€é™çš„オブジェクトをモデル化ã™ã‚‹ãŸã‚ã®Nestedåž‹ã®ä½¿ç”¨ä¾‹ã‚’示ã—ã¾ã™ã€‚次ã®ã‚ˆã†ãªå˜ç´”ãªãƒ­ã‚°ã‚¨ãƒ³ãƒˆãƒªã‚’JSONã§è€ƒãˆã¾ã™ï¼š + +```json +{ + "timestamp": 897819077, + "clientip": "45.212.12.0", + "request": { + "method": "GET", + "path": "/french/images/hm_nav_bar.gif", + "version": "HTTP/1.0" + }, + "status": 200, + "size": 3305 +} +``` + +`request`キーを`Nested`ã¨ã—ã¦å®£è¨€ã§ãã¾ã™ã€‚`Tuple`ã¨åŒæ§˜ã«ã€ã‚µãƒ–カラムを指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +-- デフォルト +SET flatten_nested=1 +CREATE table http +( + timestamp Int32, + clientip IPv4, + request Nested(method LowCardinality(String), path String, version LowCardinality(String)), + status UInt16, + size UInt32, +) ENGINE = MergeTree() ORDER BY (status, timestamp); +``` + +### flatten_nested + +設定`flatten_nested`ã¯ãƒã‚¹ãƒˆã®å‹•ä½œã‚’制御ã—ã¾ã™ã€‚ + +#### flatten_nested=1 + +`1`(デフォルト)ã®å€¤ã¯ã€ä»»æ„ã®ãƒ¬ãƒ™ãƒ«ã®ãƒã‚¹ãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¾ã›ã‚“。ã“ã®å€¤ã§ã¯ã€ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚’åŒã˜é•·ã•ã®è¤‡æ•°ã®[Array](/docs/ja/sql-reference/data-types/array)カラムã¨ã—ã¦è€ƒãˆã‚‹ã®ãŒæœ€ã‚‚ç°¡å˜ã§ã™ã€‚`method`ã€`path`ã€ãŠã‚ˆã³`version`ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯å…¨ã¦åˆ¥ã€…ã®`Array(Type)`カラムã¨ã—ã¦æ©Ÿèƒ½ã—ã€é‡è¦ãªåˆ¶ç´„ã¨ã—㦠**`method`ã€`path`ã€ãŠã‚ˆã³`version`フィールドã®é•·ã•ã¯åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。** ã“れを説明ã™ã‚‹ãŸã‚ã«ã€`SHOW CREATE TABLE`を使用ã™ã‚‹ã¨ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```sql +SHOW CREATE TABLE http + +CREATE TABLE http +( + `timestamp` Int32, + `clientip` IPv4, + `request.method` Array(LowCardinality(String)), + `request.path` Array(String), + `request.version` Array(LowCardinality(String)), + `status` UInt16, + `size` UInt32 +) +ENGINE = MergeTree +ORDER BY (status, timestamp) +``` + +以下ã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã—ã¾ã™ï¼š + +```sql +SET input_format_import_nested_json = 1; +INSERT INTO http +FORMAT JSONEachRow +{"timestamp":897819077,"clientip":"45.212.12.0","request":[{"method":"GET","path":"/french/images/hm_nav_bar.gif","version":"HTTP/1.0"}],"status":200,"size":3305} +``` + +ã“ã“ã§ã®ã„ãã¤ã‹ã®é‡è¦ãªãƒã‚¤ãƒ³ãƒˆï¼š + +* JSONã‚’ãƒã‚¹ãƒˆã•ã‚ŒãŸæ§‹é€ ã¨ã—ã¦æŒ¿å…¥ã™ã‚‹ãŸã‚ã«ã€`input_format_import_nested_json`設定を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚ŒãŒãªã„å ´åˆã€JSONをフラットã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例: + + ```sql + INSERT INTO http FORMAT JSONEachRow + {"timestamp":897819077,"clientip":"45.212.12.0","request":{"method":["GET"],"path":["/french/images/hm_nav_bar.gif"],"version":["HTTP/1.0"]},"status":200,"size":3305} + ``` +* ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰`method`ã€`path`ã€ãŠã‚ˆã³`version`ã¯JSONé…列ã¨ã—ã¦æ¸¡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例: + + ```json + { + "@timestamp": 897819077, + "clientip": "45.212.12.0", + "request": { + "method": [ + "GET" + ], + "path": [ + "/french/images/hm_nav_bar.gif" + ], + "version": [ + "HTTP/1.0" + ] + }, + "status": 200, + "size": 3305 + } + ``` + +カラムã¯ãƒ‰ãƒƒãƒˆè¡¨è¨˜ã‚’使用ã—ã¦ã‚¯ã‚¨ãƒªã§ãã¾ã™ï¼š + +```sql +SELECT clientip, status, size, `request.method` FROM http WHERE has(request.method, 'GET'); + +┌─clientip────┬─status─┬─size─┬─request.method─┠+│ 45.212.12.0 │ 200 │ 3305 │ ['GET'] │ +└─────────────┴────────┴──────┴────────────────┘ +1 row in set. Elapsed: 0.002 sec. +``` + +サブカラムã®`Array`使用ã¯ã€å®Œå…¨ãª[Array関数](/docs/ja/sql-reference/functions/array-functions)を潜在的ã«æ´»ç”¨ã§ãã‚‹ã“ã¨ã‚’æ„味ã—ã€ã‚«ãƒ©ãƒ ã«è¤‡æ•°ã®å€¤ãŒã‚ã‚‹å ´åˆã«ã¯[`ARRAY JOIN`](/docs/ja/sql-reference/statements/select/array-join)å¥ãŒå½¹ç«‹ã¡ã¾ã™ã€‚ + +#### flatten_nested=0 + +ã“ã‚Œã¯ä»»æ„ã®ãƒ¬ãƒ™ãƒ«ã®ãƒã‚¹ãƒˆã‚’許å¯ã—ã€ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚«ãƒ©ãƒ ã¯`Tuple`ã®å˜ä¸€ã®é…列ã¨ã—ã¦ä¿æŒã•ã‚Œã¾ã™ - 実質的ã«`Array(Tuple)`ã¨åŒã˜ã«ãªã‚Šã¾ã™ã€‚ + +**ã“ã‚ŒãŒ`Nested`を使ã£ãŸJSONã®ä½¿ç”¨ã«ãŠã„ã¦æŽ¨å¥¨ã•ã‚Œã‚‹æ–¹æ³•ã§ã‚ã‚Šã€ã—ã°ã—ã°æœ€ã‚‚å˜ç´”ãªæ–¹æ³•ã§ã™ã€‚以下ã«ç¤ºã™ã‚ˆã†ã«ã€ã‚ªãƒ–ジェクトã™ã¹ã¦ãŒãƒªã‚¹ãƒˆã§ã‚ã‚‹ã“ã¨ã‚’å¿…è¦ã¨ã™ã‚‹ã ã‘ã§ã™ã€‚** + +以下ã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルをå†ä½œæˆã—ã€è¡Œã‚’å†æŒ¿å…¥ã—ã¾ã™ï¼š + +```sql +CREATE TABLE http +( + `timestamp` Int32, + `clientip` IPv4, + `request` Nested(method LowCardinality(String), path String, version LowCardinality(String)), + `status` UInt16, + `size` UInt32 +) +ENGINE = MergeTree +ORDER BY (status, timestamp) + +SHOW CREATE TABLE http + +-- note Nested type is preserved. +CREATE TABLE default.http +( + `timestamp` Int32, + `clientip` IPv4, + `request` Nested(method LowCardinality(String), path String, version LowCardinality(String)), + `status` UInt16, + `size` UInt32 +) +ENGINE = MergeTree +ORDER BY (status, timestamp) + +INSERT INTO http +FORMAT JSONEachRow +{"timestamp":897819077,"clientip":"45.212.12.0","request":[{"method":"GET","path":"/french/images/hm_nav_bar.gif","version":"HTTP/1.0"}],"status":200,"size":3305} +``` + +ã“ã“ã§ã®ã„ãã¤ã‹ã®é‡è¦ãªãƒã‚¤ãƒ³ãƒˆï¼š + +* `input_format_import_nested_json`ã¯æŒ¿å…¥ã«å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 +* `SHOW CREATE TABLE`ã§ã¯`Nested`åž‹ãŒä¿æŒã•ã‚Œã¾ã™ã€‚ã“ã®ã‚«ãƒ©ãƒ ã®å†…部ã«ã¯å®Ÿè³ªçš„ã«ã¯`Array(Tuple(Nested(method LowCardinality(String), path String, version LowCardinality(String))))`ãŒã‚ã‚Šã¾ã™ã€‚ +* çµæžœã¨ã—ã¦ã€`request`ã‚’é…列ã¨ã—ã¦æŒ¿å…¥ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例: + + ```json + { + "timestamp": 897819077, + "clientip": "45.212.12.0", + "request": [ + { + "method": "GET", + "path": "/french/images/hm_nav_bar.gif", + "version": "HTTP/1.0" + } + ], + "status": 200, + "size": 3305 + } + ``` + +カラムã¯å†åº¦ã€ãƒ‰ãƒƒãƒˆè¡¨è¨˜ã‚’使用ã—ã¦ã‚¯ã‚¨ãƒªã§ãã¾ã™ï¼š + +```sql +SELECT clientip, status, size, `request.method` FROM http WHERE has(request.method, 'GET'); + +┌─clientip────┬─status─┬─size─┬─request.method─┠+│ 45.212.12.0 │ 200 │ 3305 │ ['GET'] │ +└─────────────┴────────┴──────┴────────────────┘ +1 row in set. Elapsed: 0.002 sec. +``` + +### 例 + +上記ã®ãƒ‡ãƒ¼ã‚¿ã®å¤§ããªä¾‹ã¯ã€s3ã®ãƒ‘ブリックãƒã‚±ãƒƒãƒˆã«ã‚ã‚Šã¾ã™ï¼š`s3://datasets-documentation/http/`。 + +```sql +SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/http/documents-01.ndjson.gz', 'JSONEachRow') +LIMIT 1 +FORMAT PrettyJSONEachRow + +{ + "@timestamp": "893964617", + "clientip": "40.135.0.0", + "request": { + "method": "GET", + "path": "\/images\/hm_bg.jpg", + "version": "HTTP\/1.0" + }, + "status": "200", + "size": "24736" +} + +1 row in set. Elapsed: 0.312 sec. +``` + +JSONã®åˆ¶ç´„ã¨å…¥åŠ›å½¢å¼ã‚’考慮ã—ã¦ã€ã“ã®ã‚µãƒ³ãƒ—ルデータセットを次ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¦æŒ¿å…¥ã—ã¾ã™ã€‚ã“ã“ã§ã¯ã€`flatten_nested=0`を設定ã—ã¾ã™ã€‚ + +次ã®æ–‡ã¯1000万行を挿入ã™ã‚‹ãŸã‚ã€å®Ÿè¡Œã«æ•°åˆ†ã‹ã‹ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚å¿…è¦ã§ã‚ã‚Œã°`LIMIT`ã‚’é©ç”¨ã—ã¦ãã ã•ã„。 + +```sql +INSERT INTO http +SELECT `@timestamp` AS `timestamp`, clientip, [request], status, +size FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/http/documents-01.ndjson.gz', +'JSONEachRow'); +``` + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹ã«ã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’é…列ã¨ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã§ã¯ã€å›ºå®šã•ã‚ŒãŸæœŸé–“ã«ã‚ãŸã‚‹ã‚¨ãƒ©ãƒ¼ã¨httpメソッドをã¾ã¨ã‚ã¦ã„ã¾ã™ã€‚ + +```sql +SELECT status, request.method[1] as method, count() as c +FROM http +WHERE status >= 400 + AND toDateTime(timestamp) BETWEEN '1998-01-01 00:00:00' AND '1998-06-01 00:00:00' +GROUP by method, status +ORDER BY c DESC LIMIT 5; + +┌─status─┬─method─┬─────c─┠+│ 404 │ GET │ 11267 │ +│ 404 │ HEAD │ 276 │ +│ 500 │ GET │ 160 │ +│ 500 │ POST │ 115 │ +│ 400 │ GET │ 81 │ +└────────┴────────┴───────┘ + +5 rows in set. Elapsed: 0.007 sec. +``` + +### ペアワイズé…列を使用ã™ã‚‹ + +ペアワイズé…列ã¯ã€JSONã‚’Stringã¨ã—ã¦è¡¨ç¾ã™ã‚‹æŸ”軟性ã¨ã€ã‚ˆã‚Šæ§‹é€ åŒ–ã•ã‚ŒãŸã‚¢ãƒ—ローãƒã®ãƒ‘フォーマンスã¨ã®ãƒãƒ©ãƒ³ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚スキーマã¯æŸ”軟ã§ã€ãƒ«ãƒ¼ãƒˆã«æ–°ã—ã„フィールドを追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€ã“ã‚Œã¯éžå¸¸ã«è¤‡é›‘ãªã‚¯ã‚¨ãƒªæ§‹æ–‡ã‚’å¿…è¦ã¨ã—ã€ãƒã‚¹ãƒˆã•ã‚ŒãŸæ§‹é€ ã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã›ã‚“。 + +例ã¨ã—ã¦ã€æ¬¡ã®ãƒ†ãƒ¼ãƒ–ルを考ãˆã¦ã¿ã¾ã™ï¼š + +```sql +CREATE TABLE http_with_arrays ( + keys Array(String), + values Array(String) +) +ENGINE = MergeTree ORDER BY tuple(); +``` + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹ã«ã¯ã€JSONをキーã¨å€¤ã®ãƒªã‚¹ãƒˆã¨ã—ã¦æ§‹é€ åŒ–ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã®ã‚¯ã‚¨ãƒªã¯ã€ã“れをé”æˆã™ã‚‹ãŸã‚ã®`JSONExtractKeysAndValues`ã®ä½¿ç”¨ä¾‹ã‚’示ã—ã¦ã„ã¾ã™ï¼š + +```sql +SELECT + arrayMap(x -> (x.1), JSONExtractKeysAndValues(json, 'String')) AS keys, + arrayMap(x -> (x.2), JSONExtractKeysAndValues(json, 'String')) AS values +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/http/documents-01.ndjson.gz', 'JSONAsString') +LIMIT 1 +FORMAT Vertical + +Row 1: +────── +keys: ['@timestamp','clientip','request','status','size'] +values: ['893964617','40.135.0.0','{"method":"GET","path":"/images/hm_bg.jpg","version":"HTTP/1.0"}','200','24736'] + +1 row in set. Elapsed: 0.416 sec. +``` + +リクエストカラムãŒãƒã‚¹ãƒˆã•ã‚ŒãŸæ§‹é€ ã¨ã—ã¦æ–‡å­—列ã§è¡¨ç¾ã•ã‚Œã¦ã„る点ã«æ³¨æ„ã—ã¦ãã ã•ã„。ルートã«ä»»æ„ã®æ–°ã—ã„キーを挿入ã§ãã¾ã™ã€‚ã¾ãŸã€JSON自体ã«ä»»æ„ã®é•ã„ã‚’æŒãŸã›ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ローカルテーブルã«æŒ¿å…¥ã™ã‚‹ã«ã¯ã€æ¬¡ã‚’実行ã—ã¾ã™ï¼š + +```sql +INSERT INTO http_with_arrays +SELECT + arrayMap(x -> (x.1), JSONExtractKeysAndValues(json, 'String')) AS keys, + arrayMap(x -> (x.2), JSONExtractKeysAndValues(json, 'String')) AS values +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/http/documents-01.ndjson.gz', 'JSONAsString') + +0 rows in set. Elapsed: 12.121 sec. Processed 10.00 million rows, 107.30 MB (825.01 thousand rows/s., 8.85 MB/s.) +``` + +ã“ã®æ§‹é€ ã‚’クエリã™ã‚‹ã«ã¯ã€å¿…è¦ãªã‚­ãƒ¼ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’識別ã™ã‚‹ãŸã‚ã«[`indexOf`](/ja/sql-reference/functions/array-functions#indexofarr-x)関数を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆã“ã‚Œã¯å€¤ã®é †åºã«ä¸€è‡´ã™ã‚‹ã¯ãšã§ã™ï¼‰ã€‚ã“れを使ã£ã¦å€¤ã®é…列カラムã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ã¤ã¾ã‚Šã€`values[indexOf(keys, 'status')]`。リクエストカラムã«ã¯å¼•ã続ãJSONã®è§£æžãƒ¡ã‚½ãƒƒãƒ‰ãŒå¿…è¦ã§ã™ - ã“ã®å ´åˆã€`simpleJSONExtractString`を使用ã—ã¾ã™ã€‚ + +```sql +SELECT toUInt16(values[indexOf(keys, 'status')]) as status, + simpleJSONExtractString(values[indexOf(keys, 'request')], 'method') as method, + count() as c +FROM http_with_arrays +WHERE status >= 400 + AND toDateTime(values[indexOf(keys, '@timestamp')]) BETWEEN '1998-01-01 00:00:00' AND '1998-06-01 00:00:00' +GROUP by method, status ORDER BY c DESC LIMIT 5; + +┌─status─┬─method─┬─────c─┠+│ 404 │ GET │ 11267 │ +│ 404 │ HEAD │ 276 │ +│ 500 │ GET │ 160 │ +│ 500 │ POST │ 115 │ +│ 400 │ GET │ 81 │ +└────────┴────────┴───────┘ + +5 rows in set. Elapsed: 0.383 sec. Processed 8.22 million rows, 1.97 GB (21.45 million rows/s., 5.15 GB/s.) +Peak memory usage: 51.35 MiB. +``` diff --git a/docs/ja/integrations/data-ingestion/data-formats/json/schema.md b/docs/ja/integrations/data-ingestion/data-formats/json/schema.md new file mode 100644 index 00000000000..15d35d35aec --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/json/schema.md @@ -0,0 +1,789 @@ +--- +title: JSON スキーマã®è¨­è¨ˆ +slug: /ja/integrations/data-formats/json/schema +description: JSON スキーマを最é©ã«è¨­è¨ˆã™ã‚‹æ–¹æ³• +keywords: [json, clickhouse, 挿入, ロード, フォーマット, スキーマ] +--- + +# スキーマを設計ã™ã‚‹ + +[スキーマ推論](/docs/ja/integrations/data-formats/JSON/inference) を使用ã—㦠JSON データã®åˆæœŸã‚¹ã‚­ãƒ¼ãƒžã‚’設定ã—ã€S3 ãªã©ã®å ´æ‰€ã§ JSON データファイルをクエリã§ãã¾ã™ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿ã®æœ€é©åŒ–ã•ã‚ŒãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç†ã‚¹ã‚­ãƒ¼ãƒžã‚’確立ã™ã‚‹ã“ã¨ã‚’目指ã™ã¹ãã§ã™ã€‚以下ã§ã¯ã€JSON 構造をモデリングã™ã‚‹ãŸã‚ã®ã‚ªãƒ—ションã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +## å¯èƒ½ãªé™ã‚ŠæŠ½å‡ºã™ã‚‹ + +å¯èƒ½ãªé™ã‚Šã€JSON キーをスキーマã®ãƒ«ãƒ¼ãƒˆã«ã‚るカラムã«æŠ½å‡ºã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã‚¯ã‚¨ãƒªæ§‹æ–‡ãŒç°¡ç´ åŒ–ã•ã‚Œã‚‹ã ã‘ã§ãªãã€å¿…è¦ã«å¿œã˜ã¦ã“れらã®ã‚«ãƒ©ãƒ ã‚’ `ORDER BY` å¥ã§ä½¿ç”¨ã—ãŸã‚Šã€[二次インデックス](/docs/ja/optimize/skipping-indexes) を指定ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ガイド [**JSON スキーマ推論**](/docs/ja/integrations/data-formats/json/inference) ã§æŽ¢æ±‚ã•ã‚ŒãŸ [arxiv データセット](https://www.kaggle.com/datasets/Cornell-University/arxiv?resource=download) を考ãˆã¦ã¿ã¾ã—ょã†: + +```json +{ + "id": "2101.11408", + "submitter": "Daniel Lemire", + "authors": "Daniel Lemire", + "title": "Number Parsing at a Gigabyte per Second", + "comments": "Software at https://github.com/fastfloat/fast_float and\n https://github.com/lemire/simple_fastfloat_benchmark/", + "journal-ref": "Software: Practice and Experience 51 (8), 2021", + "doi": "10.1002/spe.2984", + "report-no": null, + "categories": "cs.DS cs.MS", + "license": "http://creativecommons.org/licenses/by/4.0/", + "abstract": "With disks and networks providing gigabytes per second ....\n", + "versions": [ + { + "created": "Mon, 11 Jan 2021 20:31:27 GMT", + "version": "v1" + }, + { + "created": "Sat, 30 Jan 2021 23:57:29 GMT", + "version": "v2" + } + ], + "update_date": "2022-11-07", + "authors_parsed": [ + [ + "Lemire", + "Daniel", + "" + ] + ] +} +``` + +`versions.created` ã®æœ€åˆã®å€¤ã‚’ `published_date` ã¨ã„ã†åå‰ã§ãƒ¡ã‚¤ãƒ³ã®æ³¨æ–‡ã‚­ãƒ¼ã«ã™ã‚‹ã¨ã—ã¾ã™ã€‚ã“れを挿入å‰ã¾ãŸã¯æŒ¿å…¥æ™‚ã« ClickHouse ã® [マテリアライズドビュー](/ja/guides/developer/cascading-materialized-views) ã¾ãŸã¯ [マテリアライズドカラム](/ja/sql-reference/statements/alter/column#materialize-column) を使用ã—ã¦æŠ½å‡ºã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +マテリアライズドカラムã¯ã€ã‚¯ã‚¨ãƒªæ™‚ã«ãƒ‡ãƒ¼ã‚¿ã‚’抽出ã™ã‚‹æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã‚’æä¾›ã—ã€æŠ½å‡ºãƒ­ã‚¸ãƒƒã‚¯ãŒå˜ç´”㪠SQL å¼ã¨ã—ã¦ã‚­ãƒ£ãƒ—ãƒãƒ£ã§ãã‚‹å ´åˆã«æœ€ã‚‚推奨ã•ã‚Œã¾ã™ã€‚例ã¨ã—ã¦ã€`published_date` ã‚’ arxiv スキーマã«ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ã‚«ãƒ©ãƒ ã¨ã—ã¦è¿½åŠ ã—ã€ä»¥ä¸‹ã®ã‚ˆã†ã«æ³¨æ–‡ã‚­ãƒ¼ã¨ã—ã¦å®šç¾©ã§ãã¾ã™ï¼š + +```sql +CREATE TABLE arxiv +( + `id` String, + `submitter` String, + `authors` String, + `title` String, + `comments` String, + `journal-ref` String, + `doi` String, + `report-no` String, + `categories` String, + `license` String, + `abstract` String, + `versions` Array(Tuple(created String, version String)), + `update_date` Date, + `authors_parsed` Array(Array(String)), + `published_date` DateTime DEFAULT parseDateTimeBestEffort(versions[1].1) +) +ENGINE = MergeTree +ORDER BY published_date +``` + + +:::note ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚«ãƒ©ãƒ å¼ +上記ã®æ–¹æ³•ã§ã¯ã€ä½ç½®ã§ `created` カラムをå‚ç…§ã™ã‚‹ `versions[1].1` ã®è¡¨è¨˜ã‚’使用ã—ã¦ã‚¿ãƒ—ルã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€æŽ¨å¥¨ã•ã‚Œã‚‹æ§‹æ–‡ `versions.created_at[1]` よりも簡å˜ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +データをロードã™ã‚‹ã¨ã€ã‚«ãƒ©ãƒ ãŒæŠ½å‡ºã•ã‚Œã¾ã™ï¼š + +```sql +INSERT INTO arxiv SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/arxiv/arxiv.json.gz') +0 rows in set. Elapsed: 39.827 sec. Processed 2.52 million rows, 1.39 GB (63.17 thousand rows/s., 34.83 MB/s.) + +SELECT published_date +FROM arxiv_2 +LIMIT 2 +┌──────published_date─┠+│ 2007-03-31 02:26:18 │ +│ 2007-03-31 03:16:14 │ +└─────────────────────┘ + +2 rows in set. Elapsed: 0.001 sec. +``` + +:::note マテリアライズドカラムã®å‹•ä½œ +マテリアライズドカラムã®å€¤ã¯å¸¸ã«æŒ¿å…¥æ™‚ã«è¨ˆç®—ã•ã‚Œã€`INSERT` クエリã§æŒ‡å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。マテリアライズドカラムã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ `SELECT *` ã§è¿”ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ã€`SELECT *` ã®çµæžœã‚’常ã«ãƒ†ãƒ¼ãƒ–ルã«æˆ»ã—㦠`INSERT` ã§ãã‚‹ã¨ã„ã†ä¸å¤‰æ€§ã‚’維æŒã™ã‚‹ãŸã‚ã§ã™ã€‚ã“ã®å‹•ä½œã¯ `asterisk_include_materialized_columns=1` を設定ã™ã‚‹ã“ã¨ã§ç„¡åŠ¹ã«ã§ãã¾ã™ã€‚ +::: + +より複雑ãªãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¨å¤‰æ›ã‚¿ã‚¹ã‚¯ã«ã¯ã€[マテリアライズドビュー](/docs/ja/materialized-view) ã®ä½¿ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## é™çš„ JSON ã¨å‹•çš„ JSON + +JSON ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’定義ã™ã‚‹ä¸»ãªã‚¿ã‚¹ã‚¯ã¯ã€ãã‚Œãžã‚Œã®ã‚­ãƒ¼ã®å€¤ã«å¯¾ã—ã¦é©åˆ‡ãªåž‹ã‚’é¸å®šã™ã‚‹ã“ã¨ã§ã™ã€‚ユーザーã¯æ¬¡ã®ãƒ«ãƒ¼ãƒ«ã‚’ JSON 階層内ã®å„キーã«é©ç”¨ã—ã¦ã€ãã‚Œãžã‚Œã®ã‚­ãƒ¼ã«å¯¾ã—ã¦é©åˆ‡ãªåž‹ã‚’決定ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +1. **プリミティブ型** - キーã®å€¤ãŒãƒ—リミティブ型ã§ã‚ã‚‹å ´åˆã€ãã‚ŒãŒã‚µãƒ–オブジェクトã®ä¸€éƒ¨ã§ã‚ã‚ã†ã¨ãƒ«ãƒ¼ãƒˆã§ã‚ã‚ã†ã¨ã€ä¸€èˆ¬çš„ãªã‚¹ã‚­ãƒ¼ãƒž[設計ã®ãƒ™ã‚¹ãƒˆãƒ—ラクティス](/docs/ja/data-modeling/schema-design)ã¨[型最é©åŒ–ルール](/docs/ja/data-modeling/schema-design#optimizing-types)ã«å¾“ã£ã¦ãã®åž‹ã‚’é¸æŠžã—ã¦ãã ã•ã„。 以下ã®`phone_numbers`ã®ã‚ˆã†ãªãƒ—リミティブã®é…列ã¯ã€`Array()` 例ãˆã° `Array(String)` ã¨ã—ã¦ãƒ¢ãƒ‡ãƒ«åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +2. **é™çš„ã‹å‹•çš„ã‹** - キーã®å€¤ãŒè¤‡é›‘ãªã‚ªãƒ–ジェクトã€ã™ãªã‚ã¡ã‚ªãƒ–ジェクトã¾ãŸã¯ã‚ªãƒ–ジェクトã®é…列ã§ã‚ã‚‹å ´åˆã€ãã‚ŒãŒå¤‰æ›´å¯¾è±¡ã§ã‚ã‚‹ã‹ã©ã†ã‹ç¢ºèªã—ã¦ãã ã•ã„。新ã—ã„キーãŒã‚ã£ãŸã«è¿½åŠ ã•ã‚Œãªã„オブジェクトã§ã€æ–°ã—ã„キーã®è¿½åŠ ãŒäºˆæ¸¬å¯èƒ½ã§ [`ALTER TABLE ADD COLUMN`](/docs/ja/sql-reference/statements/alter/column#add-column) ã«ã‚ˆã‚‹ã‚¹ã‚­ãƒ¼ãƒžå¤‰æ›´ã§å¯¾å¿œã§ãã‚‹å ´åˆã¯ã€**é™çš„**ã¨ã¿ãªã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ã„ãã¤ã‹ã® JSON ドキュメントã§ã®ã¿ã‚­ãƒ¼ã®ã‚µãƒ–セットãŒæä¾›ã•ã‚Œã‚‹ã‚ªãƒ–ジェクトをå«ã¿ã¾ã™ã€‚æ–°ã—ã„キーãŒé »ç¹ã«è¿½åŠ ã•ã‚Œã€ã¾ãŸã¯äºˆæ¸¬ã§ããªã„オブジェクト㯠**å‹•çš„**ã¨ã¿ãªã•ã‚Œã‚‹ã¹ãã§ã™ã€‚値㌠**é™çš„** ã‹ **å‹•çš„** ã‹ã‚’確èªã™ã‚‹ã«ã¯ã€é–¢é€£ã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³ [**é™çš„オブジェクトã®å‡¦ç†**](/docs/ja/integrations/data-formats/json/schema#handling-static-objects) ãŠã‚ˆã³ [**動的オブジェクトã®å‡¦ç†**](/docs/ja/integrations/data-formats/json/schema#handling-dynamic-objects) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +

+ +**é‡è¦:** 上述ã®ãƒ«ãƒ¼ãƒ«ã¯å†å¸°çš„ã«é©ç”¨ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚キーã®å€¤ãŒå‹•çš„ã§ã‚ã‚‹ã¨åˆ¤æ–­ã•ã‚ŒãŸå ´åˆã€ãれ以上ã®è©•ä¾¡ã¯ä¸è¦ã§ã‚ã‚Šã€[**動的オブジェクトã®å‡¦ç†**](/docs/ja/integrations/data-formats/json/schema#handling-dynamic-objects) ã®ã‚¬ã‚¤ãƒ‰ãƒ©ã‚¤ãƒ³ã«å¾“ã†ã“ã¨ãŒã§ãã¾ã™ã€‚オブジェクトãŒé™çš„ã§ã‚ã‚‹å ´åˆã€ã‚­ãƒ¼ã®å€¤ãŒãƒ—リミティブã§ã‚ã‚‹ã‹å‹•çš„キーã«é­é‡ã™ã‚‹ã¾ã§ã‚µãƒ–キーを評価ã—続ã‘ã¾ã™ã€‚ + +ã“れらã®ãƒ«ãƒ¼ãƒ«ã‚’説明ã™ã‚‹ãŸã‚ã«ã€äººã‚’表ã™æ¬¡ã® JSON 例を使用ã—ã¾ã™: + +```json +{ + "id": 1, + "name": "Clicky McCliickHouse", + "username": "Clicky", + "email": "clicky@clickhouse.com", + "address": [ + { + "street": "Victor Plains", + "suite": "Suite 879", + "city": "Wisokyburgh", + "zipcode": "90566-7771", + "geo": { + "lat": -43.9509, + "lng": -34.4618 + } + } + ], + "phone_numbers": ["010-692-6593", "020-192-3333"], + "website": "clickhouse.com", + "company": { + "name": "ClickHouse", + "catchPhrase": "The real-time data warehouse for analytics", + "labels": { + "type": "database systems", + "founded": "2021" + } + }, + "dob": "2007-03-31", + "tags": { + "hobby": "Databases", + "holidays": [ + { + "year": 2024, + "location": "Azores, Portugal" + } + ], + "car": { + "model": "Tesla", + "year": 2023 + } + } +} +``` + +ã“れらã®ãƒ«ãƒ¼ãƒ«ã‚’é©ç”¨ã™ã‚‹ã¨ï¼š + +- ルートキー `name`ã€`username`ã€`email`ã€`website` 㯠`String` åž‹ã¨ã—ã¦è¡¨ç¾ã§ãã¾ã™ã€‚`phone_numbers` カラムã¯ã‚¿ã‚¤ãƒ— `Array(String)` ã®ãƒ—リミティブã®é…列ã§ã‚ã‚Šã€`dob` 㨠`id` ã¯ãã‚Œãžã‚Œ `Date` 㨠`UInt32` åž‹ã§ã™ã€‚ +- `address` オブジェクトã«ã¯æ–°ã—ã„キーãŒè¿½åŠ ã•ã‚Œã¾ã›ã‚“(新ã—ã„アドレスオブジェクトã®ã¿ï¼‰ã€‚ã—ãŸãŒã£ã¦ã€**é™çš„**ã¨ã¿ãªã™ã“ã¨ãŒã§ãã¾ã™ã€‚å†å¸°ã™ã‚‹ã¨ã€ã™ã¹ã¦ã®ã‚µãƒ–カラムã¯ï¼ˆ`geo` を除ã„ã¦ï¼‰ãƒ—リミティブ(ãŠã‚ˆã³ `String` 型)ã¨ã¿ãªã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れも `lat` ãŠã‚ˆã³ `lon` ã® 2 ã¤ã® `Float32` カラムをæŒã¤é™çš„構造ã§ã™ã€‚ +- `tags` カラム㯠**å‹•çš„** ã§ã™ã€‚ã“ã®ã‚ªãƒ–ジェクトã«ä»»æ„ã®ã‚¿ã‚°ãŒè¿½åŠ ã•ã‚Œã€æ§‹é€ ã®å¤‰æ›´ãŒã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ +- `company` オブジェクト㯠**é™çš„** ã§ã€æŒ‡å®šã•ã‚ŒãŸæœ€å¤§ 3 ã¤ã®ã‚­ãƒ¼ã—ã‹æŒã¡ã¾ã›ã‚“。サブキー `name` ãŠã‚ˆã³ `catchPhrase` 㯠`String` åž‹ã§ã™ã€‚キー `labels` 㯠**å‹•çš„** ã§ã™ã€‚ã“ã®ã‚ªãƒ–ジェクトã«ä»»æ„ã®ã‚¿ã‚°ã‚’追加ã§ãã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚値ã¯å¸¸ã«ã‚¿ã‚¤ãƒ—文字列ã®ã‚­ãƒ¼ã¨å€¤ã®ãƒšã‚¢ã«ãªã‚Šã¾ã™ã€‚ + +## é™çš„オブジェクトã®å‡¦ç† + +é™çš„オブジェクトã«ã¯åå‰ä»˜ãタプルã€ã™ãªã‚ã¡ `Tuple` を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚オブジェクトã®é…列ã¯ã‚¿ãƒ—ルã®é…列ã€ã™ãªã‚ã¡ `Array(Tuple)` を使用ã—ã¦ä¿æŒã§ãã¾ã™ã€‚タプル内ã§ã¯ã€ã‚«ãƒ©ãƒ ã¨ãã‚Œã«å¯¾å¿œã™ã‚‹åž‹ã¯åŒã˜ãƒ«ãƒ¼ãƒ«ã‚’使用ã—ã¦å®šç¾©ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ã“ã‚Œã¯ã€ä»¥ä¸‹ã«ç¤ºã™ã‚ˆã†ã«ã€ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚ªãƒ–ジェクトを表ã™ãƒã‚¹ãƒˆã•ã‚ŒãŸ `Tuple` ã‚’å°Žãå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“れを示ã™ãŸã‚ã«ã€å‰è¿°ã® JSON ã®äººã®ä¾‹ã‚’使用ã—ã€å‹•çš„オブジェクトをçœç•¥ã—ã¾ã™ï¼š + +```json +{ + "id": 1, + "name": "Clicky McCliickHouse", + "username": "Clicky", + "email": "clicky@clickhouse.com", + "address": [ + { + "street": "Victor Plains", + "suite": "Suite 879", + "city": "Wisokyburgh", + "zipcode": "90566-7771", + "geo": { + "lat": -43.9509, + "lng": -34.4618 + } + } + ], + "phone_numbers": ["010-692-6593", "020-192-3333"], + "website": "clickhouse.com", + "company": { + "name": "ClickHouse", + "catchPhrase": "The real-time data warehouse for analytics" + }, + "dob": "2007-03-31" +} +``` + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ã‚­ãƒ¼ãƒžã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```sql +CREATE TABLE people +( + `id` Int64, + `name` String, + `username` String, + `email` String, + `address` Array(Tuple(city String, geo Tuple(lat Float32, lng Float32), street String, suite String, zipcode String)), + `phone_numbers` Array(String), + `website` String, + `company` Tuple(catchPhrase String, name String), + `dob` Date +) +ENGINE = MergeTree +ORDER BY username +``` + +`company` カラム㌠`Tuple(catchPhrase String, name String)` ã¨ã—ã¦å®šç¾©ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。`address` フィールドã¯ãƒã‚¹ãƒˆã•ã‚ŒãŸ `Tuple` ã‚’æŒã¤ `Array(Tuple)` を使用ã—ã¦ã„ã¾ã™ã€‚ + +JSON ã¯ç¾çŠ¶ã®æ§‹é€ ã§ã“ã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã§ãã¾ã™ï¼š + +```sql +INSERT INTO people FORMAT JSONEachRow +{"id":1,"name":"Clicky McCliickHouse","username":"Clicky","email":"clicky@clickhouse.com","address":[{"street":"Victor Plains","suite":"Suite 879","city":"Wisokyburgh","zipcode":"90566-7771","geo":{"lat":-43.9509,"lng":-34.4618}}],"phone_numbers":["010-692-6593","020-192-3333"],"website":"clickhouse.com","company":{"name":"ClickHouse","catchPhrase":"The real-time data warehouse for analytics"},"dob":"2007-03-31"} +``` + +上記ã®ä¾‹ã§ã¯ãƒ‡ãƒ¼ã‚¿ãŒæœ€å°é™ã§ã™ãŒã€ä»¥ä¸‹ã«ç¤ºã™ã‚ˆã†ã«ã€ã‚¿ãƒ—ルフィールドをピリオド区切りåã§ã‚¯ã‚¨ãƒªã§ãã¾ã™ã€‚ + +```sql +SELECT + address.street, + company.name +FROM people + +┌─address.street────┬─company.name─┠+│ ['Victor Plains'] │ ClickHouse │ +└───────────────────┴──────────────┘ +``` + +`address.street` カラム㌠`Array` ã¨ã—ã¦è¿”ã•ã‚Œã‚‹æ–¹æ³•ã«æ³¨æ„ã—ã¦ãã ã•ã„。é…列内ã®ç‰¹å®šã®ã‚ªãƒ–ジェクトをä½ç½®ã«ã‚ˆã£ã¦ã‚¯ã‚¨ãƒªã™ã‚‹ã«ã¯ã€é…列ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’カラムåã®å¾Œã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€æœ€åˆã®ä½æ‰€ã‹ã‚‰é€šã‚Šã‚’å–å¾—ã™ã‚‹ã«ã¯ï¼š + +```sql +SELECT address.street[1] AS street +FROM people + +┌─street────────┠+│ Victor Plains │ +└───────────────┘ + +1 row in set. Elapsed: 0.001 sec. +``` + +タプルã®ä¸»ãªæ¬ ç‚¹ã¯ã€ã‚µãƒ–カラムを注文キーã¨ã—ã¦ä½¿ç”¨ã§ããªã„ã“ã¨ã§ã™ã€‚ã—ãŸãŒã£ã¦ã€ä»¥ä¸‹ã¯å¤±æ•—ã—ã¾ã™ï¼š + +```sql +CREATE TABLE people +( + `id` Int64, + `name` String, + `username` String, + `email` String, + `address` Array(Tuple(city String, geo Tuple(lat Float32, lng Float32), street String, suite String, zipcode String)), + `phone_numbers` Array(String), + `website` String, + `company` Tuple(catchPhrase String, name String), + `dob` Date +) +ENGINE = MergeTree +ORDER BY company.name + +Code: 47. DB::Exception: Missing columns: 'company.name' while processing query: 'company.name', required columns: 'company.name' 'company.name'. (UNKNOWN_IDENTIFIER) +``` + +:::note 注文キー内ã®ã‚¿ãƒ—ル +タプルカラムã¯æ³¨æ–‡ã‚­ãƒ¼ã«ä½¿ç”¨ã§ãã¾ã›ã‚“ãŒã€ã‚¿ãƒ—ル全体を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€ã“ã‚Œã¯ã‚ã¾ã‚Šæ„味をãªã•ãªã„å ´åˆãŒå¤šã„ã§ã™ã€‚ +::: + +### デフォルト値ã®å‡¦ç† + +JSON オブジェクトã¯æ§‹é€ åŒ–ã•ã‚Œã¦ã„ã¦ã‚‚ã€ã—ã°ã—ã°æ—¢çŸ¥ã®ã‚­ãƒ¼ã®ã‚µãƒ–セットã—ã‹æä¾›ã•ã‚Œã¾ã›ã‚“。幸ã„ã«ã‚‚ã€`Tuple` 型㯠JSON ペイロードã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’è¦æ±‚ã™ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +å‰è¿°ã® `people` テーブルã¨ã€`suite`ã€`geo`ã€`phone_numbers` ãŠã‚ˆã³ `catchPhrase` キーãŒæ¬ ã‘ã¦ã„る以下ã®ã‚¹ãƒ‘ース㪠JSON を考ãˆã¦ã¿ã¦ãã ã•ã„。 + +```json +{ + "id": 1, + "name": "Clicky McCliickHouse", + "username": "Clicky", + "email": "clicky@clickhouse.com", + "address": [ + { + "street": "Victor Plains", + "city": "Wisokyburgh", + "zipcode": "90566-7771" + } + ], + "website": "clickhouse.com", + "company": { + "name": "ClickHouse" + }, + "dob": "2007-03-31" +} +``` + +ã“ã®è¡ŒãŒæ­£å¸¸ã«æŒ¿å…¥ã•ã‚Œã‚‹ã“ã¨ãŒä»¥ä¸‹ã«ç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼š + +```sql +INSERT INTO people FORMAT JSONEachRow +{"id":1,"name":"Clicky McCliickHouse","username":"Clicky","email":"clicky@clickhouse.com","address":[{"street":"Victor Plains","city":"Wisokyburgh","zipcode":"90566-7771"}],"website":"clickhouse.com","company":{"name":"ClickHouse"},"dob":"2007-03-31"} + +Ok. + +1 row in set. Elapsed: 0.002 sec. +``` + +ã“ã® 1 行をクエリã™ã‚‹ã¨ã€ï¼ˆã‚µãƒ–オブジェクトをå«ã‚€ï¼‰çœç•¥ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒç¢ºèªã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM people +FORMAT PrettyJSONEachRow + +{ + "id": "1", + "name": "Clicky McCliickHouse", + "username": "Clicky", + "email": "clicky@clickhouse.com", + "address": [ + { + "city": "Wisokyburgh", + "geo": { + "lat": 0, + "lng": 0 + }, + "street": "Victor Plains", + "suite": "", + "zipcode": "90566-7771" + } + ], + "phone_numbers": [], + "website": "clickhouse.com", + "company": { + "catchPhrase": "", + "name": "ClickHouse" + }, + "dob": "2007-03-31" +} + +1 row in set. Elapsed: 0.001 sec. +``` + +:::note 空㨠null ã®åŒºåˆ¥ +値ãŒç©ºã§ã‚ã‚‹ã“ã¨ã¨æä¾›ã•ã‚Œãªã„ã“ã¨ã‚’区別ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€[Nullable åž‹](/docs/ja/sql-reference/data-types/nullable) を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚ŒãŒçµ¶å¯¾ã«å¿…è¦ã§ãªã„é™ã‚Šã€[Nullable カラムã¯é¿ã‘ã‚‹](/docs/ja/cloud/bestpractices/avoid-nullable-columns) ã¹ãã§ã™ã€‚ãªãœãªã‚‰ã€ã“ã‚Œã«ã‚ˆã‚Šã“れらã®ã‚«ãƒ©ãƒ ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスãŒæ‚ªåŒ–ã™ã‚‹ãŸã‚ã§ã™ã€‚ +::: + +### æ–°ã—ã„カラムã®å‡¦ç† + +JSON キーãŒé™çš„ã§ã‚ã‚‹å ´åˆã€æ§‹é€ åŒ–ã•ã‚ŒãŸã‚¢ãƒ—ローãƒãŒæœ€ã‚‚ç°¡å˜ã§ã™ãŒã€æ–°ã—ã„キーãŒäº‹å‰ã«çŸ¥ã‚‰ã‚Œã¦ã„ã¦ã€ã‚¹ã‚­ãƒ¼ãƒžã«å¿œã˜ã¦å¤‰æ›´å¯èƒ½ãªå ´åˆã€ã“ã®ã‚¢ãƒ—ローãƒã‚’使用ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +ClickHouse ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã€ã‚¹ã‚­ãƒ¼ãƒžã«å­˜åœ¨ã—ãªã„ JSON キーをペイロードã«æä¾›ã—ã¦ã‚‚無視ã—ã¾ã™ã€‚以下ã®ã‚ˆã†ã«ã€`nickname` キーãŒè¿½åŠ ã•ã‚ŒãŸä¿®æ­£æ¸ˆã¿ JSON ペイロードを考ãˆã¦ã¿ã¦ãã ã•ã„: + +```json +{ + "id": 1, + "name": "Clicky McCliickHouse", + "nickname": "Clicky", + "username": "Clicky", + "email": "clicky@clickhouse.com", + "address": [ + { + "street": "Victor Plains", + "suite": "Suite 879", + "city": "Wisokyburgh", + "zipcode": "90566-7771", + "geo": { + "lat": -43.9509, + "lng": -34.4618 + } + } + ], + "phone_numbers": ["010-692-6593", "020-192-3333"], + "website": "clickhouse.com", + "company": { + "name": "ClickHouse", + "catchPhrase": "The real-time data warehouse for analytics" + }, + "dob": "2007-03-31" +} +``` + +`nickname` キーãŒç„¡è¦–ã•ã‚ŒãŸçŠ¶æ…‹ã§ã“ã® JSON を正常ã«æŒ¿å…¥ã§ãã¾ã™ï¼š + +```sql +INSERT INTO people FORMAT JSONEachRow +{"id":1,"name":"Clicky McCliickHouse","nickname":"Clicky","username":"Clicky","email":"clicky@clickhouse.com","address":[{"street":"Victor Plains","suite":"Suite 879","city":"Wisokyburgh","zipcode":"90566-7771","geo":{"lat":-43.9509,"lng":-34.4618}}],"phone_numbers":["010-692-6593","020-192-3333"],"website":"clickhouse.com","company":{"name":"ClickHouse","catchPhrase":"The real-time data warehouse for analytics"},"dob":"2007-03-31"} + +Ok. + +1 row in set. Elapsed: 0.002 sec. +``` + +カラム㯠[`ALTER TABLE ADD COLUMN`](/ja/sql-reference/statements/alter/column#add-column) コマンドを使用ã—ã¦ã‚¹ã‚­ãƒ¼ãƒžã«è¿½åŠ ã§ãã¾ã™ã€‚ `DEFAULT` å¥ã‚’介ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã€ã“ã‚Œã¯ãã®å¾Œã®æŒ¿å…¥ã§æŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®å€¤ãŒå­˜åœ¨ã—ãªã„行(作æˆå‰ã«æŒ¿å…¥ã•ã‚ŒãŸè¡Œï¼‰ã«å¯¾ã—ã¦ã‚‚ã€ã“ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒè¿”ã•ã‚Œã¾ã™ã€‚ `DEFAULT` 値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€åž‹ã«å¯¾ã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +例ãˆã°ï¼š + +```sql +-- åˆæœŸè¡Œã‚’挿入(nickname ã¯ç„¡è¦–ã•ã‚Œã¾ã™ï¼‰ +INSERT INTO people FORMAT JSONEachRow +{"id":1,"name":"Clicky McCliickHouse","nickname":"Clicky","username":"Clicky","email":"clicky@clickhouse.com","address":[{"street":"Victor Plains","suite":"Suite 879","city":"Wisokyburgh","zipcode":"90566-7771","geo":{"lat":-43.9509,"lng":-34.4618}}],"phone_numbers":["010-692-6593","020-192-3333"],"website":"clickhouse.com","company":{"name":"ClickHouse","catchPhrase":"The real-time data warehouse for analytics"},"dob":"2007-03-31"} + +-- カラムを追加 +ALTER TABLE people + (ADD COLUMN `nickname` String DEFAULT 'no_nickname') + +-- æ–°ã—ã„行を挿入(åŒã˜ãƒ‡ãƒ¼ã‚¿ã€ç•°ãªã‚‹ID) +INSERT INTO people FORMAT JSONEachRow +{"id":2,"name":"Clicky McCliickHouse","nickname":"Clicky","username":"Clicky","email":"clicky@clickhouse.com","address":[{"street":"Victor Plains","suite":"Suite 879","city":"Wisokyburgh","zipcode":"90566-7771","geo":{"lat":-43.9509,"lng":-34.4618}}],"phone_numbers":["010-692-6593","020-192-3333"],"website":"clickhouse.com","company":{"name":"ClickHouse","catchPhrase":"The real-time data warehouse for analytics"},"dob":"2007-03-31"} + +-- 2 行をé¸æŠž +SELECT id, nickname FROM people + +┌─id─┬─nickname────┠+│ 2 │ Clicky │ +│ 1 │ no_nickname │ +└────┴─────────────┘ + +2 rows in set. Elapsed: 0.001 sec. +``` + +## 動的オブジェクトã®å‡¦ç† + +動的オブジェクトã®å‡¦ç†ã«ã¯ã€æ¬¡ã® 2 ã¤ã®æŽ¨å¥¨ã‚¢ãƒ—ローãƒãŒã‚ã‚Šã¾ã™ï¼š + +- [Map(String,V)](/docs/ja/sql-reference/data-types/map) åž‹ +- [String](/docs/ja/sql-reference/data-types/string) を使用ã—㟠JSON 関数 + +以下ã®ãƒ«ãƒ¼ãƒ«ã‚’é©ç”¨ã—ã¦ã€æœ€ã‚‚é©åˆ‡ãªã‚‚ã®ã‚’決定ã§ãã¾ã™ã€‚ + +1. オブジェクトãŒéžå¸¸ã«å‹•çš„ã§ã€äºˆæ¸¬å¯èƒ½ãªæ§‹é€ ãŒãªãã€ä»»æ„ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚ªãƒ–ジェクトをå«ã‚€å ´åˆã€`String` 型を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚å¿…è¦ãªãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯ã‚¯ã‚¨ãƒªæ™‚ã« JSON 関数を使用ã—ã¦æŠ½å‡ºã§ãã¾ã™ã€‚ +2. オブジェクトãŒä¸»ã« 1 ã¤ã®ã‚¿ã‚¤ãƒ—ã®ä»»æ„ã®ã‚­ãƒ¼ã‚’æ ¼ç´ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€`Map` 型を検討ã—ã¾ã™ã€‚ç†æƒ³çš„ã«ã¯ã€ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªã‚­ãƒ¼ã®æ•°ã¯æ•°ç™¾ã‚’超ãˆãªã„ã¹ãã§ã™ã€‚`Map` åž‹ã¯ã€ãƒ©ãƒ™ãƒ«ã‚„ã‚¿ã‚°ã€ä¾‹ãˆã°ãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿å†…ã® Kubernetes ãƒãƒƒãƒ‰ãƒ©ãƒ™ãƒ«ã«ä½¿ç”¨ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ + +
+ +:::note オブジェクトレベルã®ã‚¢ãƒ—ローãƒã®é©ç”¨ +åŒã˜ã‚¹ã‚­ãƒ¼ãƒžå†…ã§ç•°ãªã‚‹ã‚ªãƒ–ジェクトã«ç•°ãªã‚‹æŠ€è¡“ãŒé©ç”¨ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚一部ã®ã‚ªãƒ–ジェクト㯠`String` ã§æœ€å–„ã«è§£æ±ºã—ã€ä»–ã®ã‚ªãƒ–ジェクト㯠`Map` ã‚’é©ç”¨ã—ã¾ã™ã€‚`String` åž‹ãŒä½¿ç”¨ã•ã‚Œã‚‹ã¨ã€ã“れ以上スキーマã®æ±ºå®šã‚’è¡Œã†å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。対照的ã«ã€`Map` キーã¨ã—ã¦ã‚µãƒ–オブジェクト(JSON を表㙠`String` ã‚’å«ã‚€ï¼‰ã‚’ãƒã‚¹ãƒˆã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ +::: + +### String を使用ã™ã‚‹ + +動的㪠JSON ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¨ã£ã¦ã€æ§‹é€ åŒ–ã•ã‚ŒãŸã‚¢ãƒ—ローãƒã‚’使用ã™ã‚‹ã“ã¨ã¯ã—ã°ã—ã°ç¾å®Ÿçš„ã§ã¯ãªã„ãŸã‚ã€ã‚¹ã‚­ãƒ¼ãƒžãŒå分ã«ç†è§£ã•ã‚Œã¦ã„ãªã„ã‹å¤‰æ›´å¯¾è±¡ã¨ãªã‚‹ãŸã‚ã§ã™ã€‚絶対ã®æŸ”軟性を得るãŸã‚ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ `String` ã¨ã—ã¦æ ¼ç´ã—ã€å¿…è¦ã«å¿œã˜ã¦é–¢æ•°ã‚’使用ã—ã¦ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’抽出ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€æ§‹é€ åŒ–ã•ã‚ŒãŸã‚ªãƒ–ジェクトã¨ã—㦠JSON を処ç†ã™ã‚‹ã“ã¨ã®å¯¾æ¥µã‚’表ã—ã¾ã™ã€‚ã“ã®æŸ”軟性ã¯ã€ã‚¯ã‚¨ãƒªæ§‹æ–‡ã®è¤‡é›‘化ãŠã‚ˆã³ãƒ‘フォーマンスã®ä½Žä¸‹ã¨ã„ã†å½¢ã§ã‚³ã‚¹ãƒˆã‚’è² ã„ã¾ã™ã€‚ + +å‰è¿°ã®ã€[オリジナル㮠person オブジェクト](/docs/ja/integrations/data-formats/json/schema#static-vs-dynamic-json) を例ã«ã™ã‚‹ã¨ã€`tags` カラムã®æ§‹é€ ãŒç¢ºä¿ã§ãã¾ã›ã‚“。オリジナルã®è¡Œã‚’挿入ã—(`company.labels` ã‚‚å«ã‚ã¾ã™ãŒã€ã“ã“ã§ã¯ç„¡è¦–ã—ã¾ã™ï¼‰ã€`Tags` カラムを `String` ã¨å®£è¨€ã—ã¾ã™ï¼š + +```sql +CREATE TABLE people +( + `id` Int64, + `name` String, + `username` String, + `email` String, + `address` Array(Tuple(city String, geo Tuple(lat Float32, lng Float32), street String, suite String, zipcode String)), + `phone_numbers` Array(String), + `website` String, + `company` Tuple(catchPhrase String, name String), + `dob` Date, + `tags` String +) +ENGINE = MergeTree +ORDER BY username + +INSERT INTO people FORMAT JSONEachRow +{"id":1,"name":"Clicky McCliickHouse","username":"Clicky","email":"clicky@clickhouse.com","address":[{"street":"Victor Plains","suite":"Suite 879","city":"Wisokyburgh","zipcode":"90566-7771","geo":{"lat":-43.9509,"lng":-34.4618}}],"phone_numbers":["010-692-6593","020-192-3333"],"website":"clickhouse.com","company":{"name":"ClickHouse","catchPhrase":"The real-time data warehouse for analytics","labels":{"type":"database systems","founded":"2021"}},"dob":"2007-03-31","tags":{"hobby":"Databases","holidays":[{"year":2024,"location":"Azores, Portugal"}],"car":{"model":"Tesla","year":2023}}} + +Ok. +1 row in set. Elapsed: 0.002 sec. +``` + +`tags` カラムをé¸æŠžã™ã‚‹ã¨ã€JSON ãŒæ–‡å­—列ã¨ã—ã¦æŒ¿å…¥ã•ã‚ŒãŸã“ã¨ãŒè¦‹ã¦å–ã‚Œã¾ã™ï¼š + +```sql +SELECT tags +FROM people + +┌─tags───────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ {"hobby":"Databases","holidays":[{"year":2024,"location":"Azores, Portugal"}],"car":{"model":"Tesla","year":2023}} │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ + +1 row in set. Elapsed: 0.001 sec. +``` + +[JSONExtract](/docs/ja/sql-reference/functions/json-functions#jsonextract-functions) 関数を使用ã—ã¦ã€ã“ã® JSON ã‹ã‚‰å€¤ã‚’å–å¾—ã§ãã¾ã™ã€‚以下ã®ç°¡å˜ãªä¾‹ã‚’ã”覧ãã ã•ã„: + +```sql +SELECT JSONExtractString(tags, 'holidays') as holidays FROM people + +┌─holidays──────────────────────────────────────┠+│ [{"year":2024,"location":"Azores, Portugal"}] │ +└───────────────────────────────────────────────┘ + +1 row in set. Elapsed: 0.002 sec. +``` + +関数㌠JSON 内ã®ãƒ‘スを抽出ã™ã‚‹ãŸã‚ã« `String` カラム `tags` 㨠JSON 内ã®ãƒ‘スãŒå¿…è¦ãªã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‘スã«ã¯ã€é–¢æ•°ã‚’ãƒã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€ `tags.car.year` カラムを抽出ã™ã‚‹ãŸã‚ã® `JSONExtractUInt(JSONExtractString(tags, 'car'), 'year')` ã§ã™ã€‚ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‘スã®æŠ½å‡ºã¯ã€é–¢æ•° [JSON_QUERY](/docs/ja/sql-reference/functions/json-functions.md/#json_queryjson-path) ã‚‚ã—ã㯠[JSON_VALUE](/docs/ja/sql-reference/functions/json-functions.md/#json_valuejson-path) を通ã˜ã¦ç°¡ç´ åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`arxiv` データセットを考ãˆã¦ã¿ã¦ã€ã™ã¹ã¦ã®æœ¬æ–‡ã‚’ `String` ã¨ã—ã¦æ‰±ã†ã‚±ãƒ¼ã‚¹ã®æ¥µç«¯ãªä¾‹ã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +CREATE TABLE arxiv ( + body String +) +ENGINE = MergeTree ORDER BY () +``` + +ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã«æŒ¿å…¥ã™ã‚‹ã«ã¯ã€`JSONAsString` フォーマットを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +INSERT INTO arxiv SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/arxiv/arxiv.json.gz', 'JSONAsString') + +0 rows in set. Elapsed: 25.186 sec. Processed 2.52 million rows, 1.38 GB (99.89 thousand rows/s., 54.79 MB/s.) +``` + +å¹´ã”ã¨ã«ãƒªãƒªãƒ¼ã‚¹ã•ã‚ŒãŸè«–æ–‡ã®æ•°ã‚’カウントã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã¨ã—ã¾ã™ã€‚スキーマ㮠[構造化ãƒãƒ¼ã‚¸ãƒ§ãƒ³](/docs/ja/integrations/data-formats/json/inference#creating-tables) ã¨ã€å˜ä¸€ã®æ–‡å­—列を使用ã—ãŸå ´åˆã®ã‚¯ã‚¨ãƒªã‚’比較ã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +-- 構造化スキーマを使用 +SELECT + toYear(parseDateTimeBestEffort(versions.created[1])) AS published_year, + count() AS c +FROM arxiv_v2 +GROUP BY published_year +ORDER BY c ASC +LIMIT 10 + +┌─published_year─┬─────c─┠+│ 1986 │ 1 │ +│ 1988 │ 1 │ +│ 1989 │ 6 │ +│ 1990 │ 26 │ +│ 1991 │ 353 │ +│ 1992 │ 3190 │ +│ 1993 │ 6729 │ +│ 1994 │ 10078 │ +│ 1995 │ 13006 │ +│ 1996 │ 15872 │ +└────────────────┴───────┘ + +10 rows in set. Elapsed: 0.264 sec. Processed 2.31 million rows, 153.57 MB (8.75 million rows/s., 582.58 MB/s.) + +-- éžæ§‹é€ åŒ–文字列を使用 + +SELECT + toYear(parseDateTimeBestEffort(JSON_VALUE(body, '$.versions[0].created'))) AS published_year, + count() AS c +FROM arxiv +GROUP BY published_year +ORDER BY published_year ASC +LIMIT 10 + +┌─published_year─┬─────c─┠+│ 1986 │ 1 │ +│ 1988 │ 1 │ +│ 1989 │ 6 │ +│ 1990 │ 26 │ +│ 1991 │ 353 │ +│ 1992 │ 3190 │ +│ 1993 │ 6729 │ +│ 1994 │ 10078 │ +│ 1995 │ 13006 │ +│ 1996 │ 15872 │ +└────────────────┴───────┘ + +10 rows in set. Elapsed: 1.281 sec. Processed 2.49 million rows, 4.22 GB (1.94 million rows/s., 3.29 GB/s.) +Peak memory usage: 205.98 MiB. +``` + +ã“ã“ã§ã€`JSON_VALUE(body, '$.versions[0].created')` ã®ã‚ˆã†ã«ã‚¯ã‚¨ãƒªã§ JSON をメソッドã«ã‚ˆã£ã¦ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã™ã‚‹ãŸã‚ã« xpath å¼ã‚’使用ã—ã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +文字列関数ã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’ä¼´ã†æ˜Žç¤ºçš„ãªåž‹å¤‰æ›ã‚ˆã‚Šã‚‚é¡•è‘—ã«é…ã„ãŸã‚ã€ä¸Šè¨˜ã®ã‚¯ã‚¨ãƒªã¯å¸¸ã«ãƒ•ãƒ«ãƒ†ãƒ¼ãƒ–ルスキャンã¨ã™ã¹ã¦ã®è¡Œã®å‡¦ç†ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ã“ã®ã‚ˆã†ãªå°ã•ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã¯ã€ã‚¯ã‚¨ãƒªã¯ä¾ç„¶ã¨ã—ã¦é«˜é€Ÿã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ãŠã„ã¦ã¯ãƒ‘フォーマンスãŒä½Žä¸‹ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“ã®ã‚¢ãƒ—ローãƒã®æŸ”軟性ã¯æ˜Žç¢ºãªãƒ‘フォーマンスã¨æ§‹æ–‡ã®ã‚³ã‚¹ãƒˆãŒã‹ã‹ã‚‹ãŸã‚ã€ã‚¹ã‚­ãƒ¼ãƒžå†…ã®éžå¸¸ã«å‹•çš„ãªã‚ªãƒ–ジェクトã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ + +#### シンプルJSON関数 + +上記ã®ä¾‹ã§ã¯ã€JSON* 関数ファミリーを使用ã—ã¦ã„ã¾ã™ã€‚ã“れらã®é–¢æ•°ã¯ã€[simdjson](https://github.com/simdjson/simdjson) ã«åŸºã¥ã„ãŸåŽ³å¯†ãª JSON パーサーを利用ã—ã€ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã§ãƒã‚¹ãƒˆã•ã‚ŒãŸå ´åˆã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’区別ã—ã¾ã™ã€‚ã“れらã®é–¢æ•°ã¯ã€æ§‹æ–‡çš„ã«ã¯æ­£ã—ã„ãŒãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒæ•´ã£ã¦ã„ãªã„ JSONã€ä¾‹ã¨ã—ã¦ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰é–“ã«äºŒé‡ã‚¹ãƒšãƒ¼ã‚¹ãŒã‚ã‚‹å ´åˆã‚’処ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +より高速ã§åŽ³æ ¼ãªä¸€é€£ã®é–¢æ•°ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ã“れら㮠`simpleJSON*` 関数ã¯ã€JSON ã®æ§‹é€ ã¨ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¯¾ã—ã¦åŽ³ã—ã„å‰æを作るã“ã¨ã«ã‚ˆã£ã¦ä¸»ã«æ€§èƒ½ã‚’å‘上ã•ã›ã¾ã™ã€‚具体的ã«ã¯ï¼š + +* フィールドåã¯å®šæ•°ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +* フィールドåã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ãŒä¸€è²«ã—ã¦ã„ã‚‹ã“ã¨ã€‚例:`simpleJSONHas('{"abc":"def"}', 'abc') = 1` ã§ã™ãŒã€`visitParamHas('{"\\u0061\\u0062\\u0063":"def"}', 'abc') = 0` ã§ã™ã€‚ +* フィールドåã¯ã™ã¹ã¦ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸæ§‹é€ ã§ä¸€æ„ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãƒã‚¹ãƒˆãƒ¬ãƒ™ãƒ«é–“ã®åŒºåˆ¥ã¯ãªãã€ãƒžãƒƒãƒãƒ³ã‚°ã¯ç„¡å·®åˆ¥ã§ã™ã€‚複数ã®ãƒžãƒƒãƒãƒ³ã‚°ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒã‚ã‚‹å ´åˆã€æœ€åˆã®å‡ºç¾ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +* ストリングリテラル外ã§ã®ç‰¹æ®Šæ–‡å­—ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã«ã¯ã‚¹ãƒšãƒ¼ã‚¹ãŒå«ã¾ã‚Œã¾ã™ã€‚次ã®ä¾‹ã¯ç„¡åŠ¹ã§ã‚ã‚Šã€ãƒ‘ースã•ã‚Œã¾ã›ã‚“。 + + ```json + {"@timestamp": 893964617, "clientip": "40.135.0.0", "request": {"method": "GET", + "path": "/images/hm_bg.jpg", "version": "HTTP/1.0"}, "status": 200, "size": 24736} + ``` + + 一方ã€æ¬¡ã®ä¾‹ã¯æ­£ã—ã解æžã•ã‚Œã¾ã™ï¼š + + ```json + {"@timestamp":893964617,"clientip":"40.135.0.0","request":{"method":"GET", + "path":"/images/hm_bg.jpg","version":"HTTP/1.0"},"status":200,"size":24736} + ``` + +ã“れらã®é–¢æ•°ãŒé©åˆ‡ã§ã‚ã‚Šã€æ€§èƒ½ãŒé‡è¦ã§ JSON ãŒä¸Šè¨˜ã®è¦ä»¶ã‚’満ãŸã™å ´åˆã«ã€ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã¯ã€`simpleJSON*` 関数を使用ã—ã¦å†æ›¸ã‹ã‚ŒãŸå‰è¿°ã®ã‚¯ã‚¨ãƒªã®ä¾‹ã§ã™ï¼š + +```sql +SELECT + toYear(parseDateTimeBestEffort(simpleJSONExtractString(simpleJSONExtractRaw(body, 'versions'), 'created'))) AS published_year, + count() AS c +FROM arxiv +GROUP BY published_year +ORDER BY published_year ASC +LIMIT 10 + +┌─published_year─┬─────c─┠+│ 1986 │ 1 │ +│ 1988 │ 1 │ +│ 1989 │ 6 │ +│ 1990 │ 26 │ +│ 1991 │ 353 │ +│ 1992 │ 3190 │ +│ 1993 │ 6729 │ +│ 1994 │ 10078 │ +│ 1995 │ 13006 │ +│ 1996 │ 15872 │ +└────────────────┴───────┘ + +10 rows in set. Elapsed: 0.964 sec. Processed 2.48 million rows, 4.21 GB (2.58 million rows/s., 4.36 GB/s.) +Peak memory usage: 211.49 MiB. +``` + +上記ã®ä¾‹ã§ã¯ã€å…¬é–‹æ—¥ä»˜ç”¨ã«æœ€åˆã®å€¤ã‚’å–å¾—ã™ã‚‹ãŸã‚ã« `simpleJSONExtractString` を使用ã—㦠`created` キーを抽出ã—ã¦ã„ã¾ã™ã€‚ã“ã®å ´åˆã€æ€§èƒ½å‘上ã®ãŸã‚ `simpleJSON*` 関数ã®åˆ¶é™ãŒå—ã‘入れられã¾ã™ã€‚ + +### Map を使用ã™ã‚‹ + +オブジェクトãŒä¸»ã« 1 ã¤ã®ã‚¿ã‚¤ãƒ—ã®ä»»æ„ã®ã‚­ãƒ¼ã‚’æ ¼ç´ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€`Map` 型を検討ã—ã¾ã™ã€‚ç†æƒ³çš„ã«ã¯ã€ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªã‚­ãƒ¼ã®æ•°ã¯æ•°ç™¾ã‚’超ãˆãªã„ã¹ãã§ã™ã€‚`Map` åž‹ã¯ã€ãƒ©ãƒ™ãƒ«ã‚„ã‚¿ã‚°ã€ä¾‹ãˆã°ãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿å†…ã® Kubernetes ãƒãƒƒãƒ‰ãƒ©ãƒ™ãƒ«ã«ä½¿ç”¨ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚`Map` ãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã‚ªãƒ–ジェクトã®æ§‹ç¯‰ã«ã¯ã„ãã¤ã‹ã®åˆ¶é™ãŒã‚ã‚Šã¾ã™ï¼š + +- フィールドã¯ã™ã¹ã¦åŒã˜åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- サブカラムã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€ç‰¹æ®Šãªãƒžãƒƒãƒ—構文ãŒå¿…è¦ã§ã™ã€‚フィールドã¯ã‚«ãƒ©ãƒ ã¨ã—ã¦å­˜åœ¨ã›ãšã€ã‚ªãƒ–ジェクト全体ãŒã‚«ãƒ©ãƒ ã§ã™ã€‚ +- サブカラムã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã¨ã€`Map` 値全体ã€ã™ãªã‚ã¡ã™ã¹ã¦ã®å…„弟ã¨ãã®å„々ã®å€¤ãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚大ããªãƒžãƒƒãƒ—ã§ã¯ã€ã“ã‚ŒãŒé‡å¤§ãªãƒ‘フォーマンスペナルティã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note 文字列キー +オブジェクトを `Map` ã¨ã—ã¦ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã™ã‚‹å ´åˆã€JSON キーåã‚’æ ¼ç´ã™ã‚‹ãŸã‚ã« `String` キーãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ãƒžãƒƒãƒ—ã¯å¸¸ã« `Map(String, T)` ã¨ãªã‚Šã€`T` ã¯ãƒ‡ãƒ¼ã‚¿ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ +::: + +#### プリミティブ値 + +`Map` を最もå˜ç´”ã«é©ç”¨ã™ã‚‹æ–¹æ³•ã¯ã€ã‚ªãƒ–ジェクトãŒåŒã˜ãƒ—リミティブ型ã®å€¤ã‚’å«ã‚€å ´åˆã§ã™ã€‚ã»ã¨ã‚“ã©ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€å€¤ `T` ã« `String` 型を使用ã™ã‚‹ã“ã¨ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +å‰è¿°ã® [people ã® JSON](/docs/ja/integrations/data-formats/json/schema#static-vs-dynamic-json) を考ãˆãŸéš›ã€`company.labels` オブジェクトãŒå‹•çš„ã§ã‚ã‚‹ã¨åˆ¤æ–­ã—ã¾ã—ãŸã€‚é‡è¦ãªã®ã¯ã€ã“ã®ã‚ªãƒ–ジェクトã«ã¯ `String` åž‹ã®ã‚­ãƒ¼å€¤ãƒšã‚¢ãŒè¿½åŠ ã•ã‚Œã‚‹ã¨è€ƒãˆã‚‰ã‚Œã‚‹ã“ã¨ã§ã™ã€‚ã—ãŸãŒã£ã¦ã€ã“れを `Map(String, String)` ã¨ã—ã¦å®£è¨€ã§ãã¾ã™ï¼š + +```sql +CREATE TABLE people +( + `id` Int64, + `name` String, + `username` String, + `email` String, + `address` Array(Tuple(city String, geo Tuple(lat Float32, lng Float32), street String, suite String, zipcode String)), + `phone_numbers` Array(String), + `website` String, + `company` Tuple(catchPhrase String, name String, labels Map(String,String)), + `dob` Date, + `tags` String +) +ENGINE = MergeTree +ORDER BY username +``` + +å…ƒã®å®Œå…¨ãª JSON オブジェクトを挿入ã§ãã¾ã™ï¼š + +```sql +INSERT INTO people FORMAT JSONEachRow +{"id":1,"name":"Clicky McCliickHouse","username":"Clicky","email":"clicky@clickhouse.com","address":[{"street":"Victor Plains","suite":"Suite 879","city":"Wisokyburgh","zipcode":"90566-7771","geo":{"lat":-43.9509,"lng":-34.4618}}],"phone_numbers":["010-692-6593","020-192-3333"],"website":"clickhouse.com","company":{"name":"ClickHouse","catchPhrase":"The real-time data warehouse for analytics","labels":{"type":"database systems","founded":"2021"}},"dob":"2007-03-31","tags":{"hobby":"Databases","holidays":[{"year":2024,"location":"Azores, Portugal"}],"car":{"model":"Tesla","year":2023}}} + +Ok. + +1 row in set. Elapsed: 0.002 sec. +``` + +リクエストオブジェクト内ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’クエリã™ã‚‹éš›ã«ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ãªãƒžãƒƒãƒ—構文ãŒå¿…è¦ã§ã™ï¼š + +```sql +SELECT company.labels FROM people + +┌─company.labels───────────────────────────────┠+│ {'type':'database systems','founded':'2021'} │ +└──────────────────────────────────────────────┘ + +1 row in set. Elapsed: 0.001 sec. + +SELECT company.labels['type'] AS type FROM people + +┌─type─────────────┠+│ database systems │ +└──────────────────┘ + +1 row in set. Elapsed: 0.001 sec. +``` + +ã“ã®åž‹ã‚’クエリã™ã‚‹ãŸã‚ã® `Map` 関数ã®å®Œå…¨ãªã‚»ãƒƒãƒˆãŒ [ã“ã“ã«](/docs/ja/sql-reference/functions/tuple-map-functions.md) 示ã•ã‚Œã¦ã„ã¾ã™ã€‚データãŒä¸€è²«ã—ãŸåž‹ã§ãªã„å ´åˆã€[å¿…è¦ãªåž‹ã®åž‹å¤‰æ›](/docs/ja/sql-reference/functions/type-conversion-functions) ã‚’è¡Œã†é–¢æ•°ãŒå­˜åœ¨ã—ã¾ã™ã€‚ + +#### オブジェクト値 + +オブジェクトãŒä¸€è²«æ€§ã®ã‚るタイプをæŒã¤ã‚µãƒ–オブジェクトをæŒã¤å ´åˆã‚‚ã€`Map` 型を考慮ã§ãã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€`tags` キー用㮠`persons` オブジェクトãŒä¸€è²«ã—ãŸæ§‹é€ ã‚’è¦æ±‚ã™ã‚‹å ´åˆã€å„ `tag` ã®ã‚µãƒ–オブジェクトã«ã¯ `name` 㨠`time` カラムãŒå«ã¾ã‚Œã¾ã™ã€‚簡素化ã•ã‚ŒãŸã“ã®ã‚ˆã†ãª JSON ドキュメントã®ä¾‹ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```json +{ + "id": 1, + "name": "Clicky McCliickHouse", + "username": "Clicky", + "email": "clicky@clickhouse.com", + "tags": { + "hobby": { + "name": "Diving", + "time": "2024-07-11 14:18:01" + }, + "car": { + "name": "Tesla", + "time": "2024-07-11 15:18:23" + } + } +} +``` + +ã“ã‚Œã¯ã€`Map(String, Tuple(name String, time DateTime))` を使用ã—ã¦ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã«ç¤ºã—ã¾ã™ï¼š + +```sql +CREATE TABLE people +( + `id` Int64, + `name` String, + `username` String, + `email` String, + `tags` Map(String, Tuple(name String, time DateTime)) +) +ENGINE = MergeTree +ORDER BY username + +INSERT INTO people FORMAT JSONEachRow +{"id":1,"name":"Clicky McCliickHouse","username":"Clicky","email":"clicky@clickhouse.com","tags":{"hobby":{"name":"Diving","time":"2024-07-11 14:18:01"},"car":{"name":"Tesla","time":"2024-07-11 15:18:23"}}} + +Ok. + +1 row in set. Elapsed: 0.002 sec. + +SELECT tags['hobby'] AS hobby +FROM people +FORMAT JSONEachRow + +{"hobby":{"name":"Diving","time":"2024-07-11 14:18:01"}} + +1 row in set. Elapsed: 0.001 sec. +``` + +ã“ã®ã‚±ãƒ¼ã‚¹ã§ã®ãƒžãƒƒãƒ—ã®é©ç”¨ã¯ä¸€èˆ¬çš„ã«ã¯ç¨€ã§ã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ãŒå†ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã•ã‚Œã€å‹•çš„キーåãŒã‚µãƒ–オブジェクトをæŒãŸãªã„よã†ã«ã™ã‚‹ã“ã¨ãŒé©åˆ‡ã§ã‚ã‚‹ã“ã¨ã‚’示唆ã—ã¾ã™ã€‚例ãˆã°ã€ä¸Šè¨˜ã®ä¾‹ã‚’以下ã®ã‚ˆã†ã«å†ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã™ã‚‹ã“ã¨ã§ã€`Array(Tuple(key String, name String, time DateTime))` を使用ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +```json +{ + "id": 1, + "name": "Clicky McCliickHouse", + "username": "Clicky", + "email": "clicky@clickhouse.com", + "tags": [ + { + "key": "hobby", + "name": "Diving", + "time": "2024-07-11 14:18:01" + }, + { + "key": "car", + "name": "Tesla", + "time": "2024-07-11 15:18:23" + } + ] +} +``` diff --git a/docs/ja/integrations/data-ingestion/data-formats/parquet.md b/docs/ja/integrations/data-ingestion/data-formats/parquet.md new file mode 100644 index 00000000000..8a6ede08183 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/parquet.md @@ -0,0 +1,195 @@ +--- +sidebar_label: Parquet +sidebar_position: 3 +slug: /ja/integrations/data-formats/parquet +--- + +# ClickHouseã§ã®Parquetã®å–り扱ㄠ+ +Parquetã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’列指å‘ã§åŠ¹çŽ‡çš„ã«ä¿å­˜ã™ã‚‹ãŸã‚ã®ãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ã§ã™ã€‚ClickHouseã¯Parquetファイルã®èª­ã¿æ›¸ãをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +:::tip +クエリã§ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘スをå‚ç…§ã™ã‚‹å ´åˆã€ClickHouseãŒã©ã®å ´æ‰€ã‹ã‚‰èª­ã¿å–ã‚ã†ã¨ã™ã‚‹ã‹ã¯ã€ä½¿ç”¨ã—ã¦ã„ã‚‹ClickHouseã®ãƒãƒªã‚¢ãƒ³ãƒˆã«ä¾å­˜ã—ã¾ã™ã€‚ + +[`clickhouse-local`](/docs/ja/operations/utilities/clickhouse-local.md)を使用ã—ã¦ã„ã‚‹å ´åˆã€ClickHouse Localã‚’èµ·å‹•ã—ãŸå ´æ‰€ã«ç›¸å¯¾çš„ãªä½ç½®ã‹ã‚‰èª­ã¿å–ã‚Šã¾ã™ã€‚ +ClickHouse Serverã¾ãŸã¯`clickhouse client`を介ã—ã¦ClickHouse Cloudを使用ã—ã¦ã„ã‚‹å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã®`/var/lib/clickhouse/user_files/`ディレクトリã«ç›¸å¯¾çš„ãªä½ç½®ã‹ã‚‰èª­ã¿å–ã‚Šã¾ã™ã€‚ +::: + +## Parquetã‹ã‚‰ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +データを読ã¿è¾¼ã‚€å‰ã«ã€[file()](/docs/ja/sql-reference/functions/files.md/#file)関数を使用ã—ã¦[例ã®parquetファイル](assets/data.parquet)ã®æ§‹é€ ã‚’調ã¹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +DESCRIBE TABLE file('data.parquet', Parquet); +``` + +第2引数ã¨ã—ã¦[Parquet](/docs/ja/interfaces/formats.md/#data-format-parquet)を使用ã—ãŸã®ã§ã€ClickHouseã¯ãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ã‚’èªè­˜ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã‚«ãƒ©ãƒ ã¨åž‹ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ path │ Nullable(String) │ │ │ │ │ │ +│ date │ Nullable(String) │ │ │ │ │ │ +│ hits │ Nullable(Int64) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +データを実際ã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹å‰ã«ã€SQLã®åŠ›ã‚’利用ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‚’調ã¹ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +```sql +SELECT * +FROM file('data.parquet', Parquet) +LIMIT 3; +``` + +```response +┌─path──────────────────────┬─date───────┬─hits─┠+│ Akiba_Hebrew_Academy │ 2017-08-01 │ 241 │ +│ Aegithina_tiphia │ 2018-02-01 │ 34 │ +│ 1971-72_Utah_Stars_season │ 2016-10-01 │ 1 │ +└───────────────────────────┴────────────┴──────┘ +``` + +:::tip +`file()`ãŠã‚ˆã³`INFILE`/`OUTFILE`ã®ãŸã‚ã®æ˜Žç¤ºçš„ãªå½¢å¼è¨­å®šã‚’çœç•¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã®å ´åˆã€ClickHouseã¯ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«åŸºã¥ã„ã¦å½¢å¼ã‚’自動的ã«æ¤œå‡ºã—ã¾ã™ã€‚ +::: + +## 既存テーブルã¸ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +Parquetデータをインãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +CREATE TABLE sometable +( + `path` String, + `date` Date, + `hits` UInt32 +) +ENGINE = MergeTree +ORDER BY (date, path); +``` + +次ã«ã€`FROM INFILE`å¥ã‚’使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã§ãã¾ã™ã€‚ + +```sql +INSERT INTO sometable +FROM INFILE 'data.parquet' FORMAT Parquet; + +SELECT * +FROM sometable +LIMIT 5; +``` + +```response +┌─path──────────────────────────┬───────date─┬─hits─┠+│ 1988_in_philosophy │ 2015-05-01 │ 70 │ +│ 2004_Green_Bay_Packers_season │ 2015-05-01 │ 970 │ +│ 24_hours_of_lemans │ 2015-05-01 │ 37 │ +│ 25604_Karlin │ 2015-05-01 │ 20 │ +│ ASCII_ART │ 2015-05-01 │ 9 │ +└───────────────────────────────┴────────────┴──────┘ +``` + +ClickHouseãŒParquetã®æ–‡å­—列(`date`カラムã§ï¼‰ã‚’`Date`åž‹ã«è‡ªå‹•çš„ã«å¤‰æ›ã™ã‚‹ã“ã¨ã«æ³¨ç›®ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ã€ClickHouseãŒã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã®åž‹ã«åŸºã¥ã„ã¦åž‹ã‚­ãƒ£ã‚¹ãƒˆã‚’自動的ã«è¡Œã†ãŸã‚ã§ã™ã€‚ + +## ローカルファイルをリモートサーãƒãƒ¼ã«æŒ¿å…¥ + +ローカルã®Parquetファイルをリモートã®ClickHouseサーãƒãƒ¼ã«æŒ¿å…¥ã—ãŸã„å ´åˆã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ãƒ•ã‚¡ã‚¤ãƒ«ã®å†…容を`clickhouse-client`ã«ãƒ‘イプã™ã‚‹ã“ã¨ã§è¡Œãˆã¾ã™ã€‚ + +```sql +clickhouse client -q "INSERT INTO sometable FORMAT Parquet" < data.parquet +``` + +## Parquetファイルã‹ã‚‰æ–°ã—ã„ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ + +ClickHouseã¯Parquetファイルã®ã‚¹ã‚­ãƒ¼ãƒžã‚’読ã¿å–ã‚‹ãŸã‚ã€å³åº§ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE imported_from_parquet +ENGINE = MergeTree +ORDER BY tuple() AS +SELECT * +FROM file('data.parquet', Parquet) +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€æŒ‡å®šã•ã‚ŒãŸParquetファイルã‹ã‚‰è‡ªå‹•çš„ã«ãƒ†ãƒ¼ãƒ–ルを作æˆãŠã‚ˆã³å…¥åŠ›ã—ã¾ã™ã€‚ + +```sql +DESCRIBE TABLE imported_from_parquet; +``` + +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ path │ Nullable(String) │ │ │ │ │ │ +│ date │ Nullable(String) │ │ │ │ │ │ +│ hits │ Nullable(Int64) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +デフォルトã§ã¯ã€ClickHouseã¯ã‚«ãƒ©ãƒ åã€åž‹ã€ãŠã‚ˆã³å€¤ã«åŽ³å¯†ã§ã™ã€‚ã—ã‹ã—ã€ã‚¤ãƒ³ãƒãƒ¼ãƒˆä¸­ã«å­˜åœ¨ã—ãªã„カラムやサãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„値をスキップã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“れらã¯[Parquet設定](/docs/ja/interfaces/formats.md/#parquet-format-settings)ã§ç®¡ç†ã§ãã¾ã™ã€‚ + +## Parquetå½¢å¼ã¸ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +:::tip +`INTO OUTFILE`を使用ã—ã¦ClickHouse Cloudã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹éš›ã«ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ›¸ãè¾¼ã¾ã‚Œã‚‹ãƒžã‚·ãƒ³ã§`clickhouse client`ã§ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +ä»»æ„ã®ãƒ†ãƒ¼ãƒ–ルやクエリçµæžœã‚’Parquetファイルã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€`INTO OUTFILE`å¥ã‚’使用ã§ãã¾ã™ã€‚ + +```sql +SELECT * +FROM sometable +INTO OUTFILE 'export.parquet' +FORMAT Parquet +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€ä½œæ¥­ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«`export.parquet`ファイルãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +## ClickHouseã¨Parquetデータ型 + +ClickHouseã¨Parquetã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯ã»ã¨ã‚“ã©ãŒåŒã˜ã§ã™ãŒã€[若干異ãªã‚‹éƒ¨åˆ†](/docs/ja/interfaces/formats.md/#data-types-matching-parquet)ã‚‚ã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€ClickHouseã¯`DateTime`åž‹ã‚’Parquetã®`int64`ã¨ã—ã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ã“れをå†ã³ClickHouseã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹ã¨ã€æ¬¡ã®ã‚ˆã†ã«æ•°å€¤ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼ˆ[time.parquetファイル](assets/time.parquet))。 + +```sql +SELECT * FROM file('time.parquet', Parquet); +``` + +```response +┌─n─┬───────time─┠+│ 0 │ 1673622611 │ +│ 1 │ 1673622610 │ +│ 2 │ 1673622609 │ +│ 3 │ 1673622608 │ +│ 4 │ 1673622607 │ +└───┴────────────┘ +``` + +ã“ã®å ´åˆã€[型変æ›](/docs/ja/sql-reference/functions/type-conversion-functions.md)を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +SELECT + n, + toDateTime(time) <--- int ã‹ã‚‰æ™‚刻㸠+FROM file('time.parquet', Parquet); +``` + +```response +┌─n─┬────toDateTime(time)─┠+│ 0 │ 2023-01-13 15:10:11 │ +│ 1 │ 2023-01-13 15:10:10 │ +│ 2 │ 2023-01-13 15:10:09 │ +│ 3 │ 2023-01-13 15:10:08 │ +│ 4 │ 2023-01-13 15:10:07 │ +└───┴─────────────────────┘ +``` + +## 詳細ãªæƒ…å ± + +ClickHouseã¯ã€å¤šãã®å½¢å¼ã€ãƒ†ã‚­ã‚¹ãƒˆã€ãƒã‚¤ãƒŠãƒªã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ã•ã¾ã–ã¾ãªã‚·ãƒŠãƒªã‚ªã‚„プラットフォームã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚以下ã®è¨˜äº‹ã§å¤šæ§˜ãªå½¢å¼ã¨ãれらã®å–り扱ã„方法を探ã£ã¦ã¿ã¦ãã ã•ã„。 + +- [CSV and TSVå½¢å¼](csv-tsv.md) +- [Avro, Arrow and ORC](arrow-avro-orc.md) +- [JSONå½¢å¼](/docs/ja/integrations/data-ingestion/data-formats/json/intro.md) +- [Regexã¨ãƒ†ãƒ³ãƒ—レート](templates-regex.md) +- [ãƒã‚¤ãƒ†ã‚£ãƒ–ã¨ãƒã‚¤ãƒŠãƒªå½¢å¼](binary.md) +- [SQLå½¢å¼](sql.md) + +ã¾ãŸã€[clickhouse-local](https://clickhouse.com/blog/extracting-converting-querying-local-files-with-sql-clickhouse-local)も確èªã—ã¦ã¿ã¦ãã ã•ã„。ClickHouseサーãƒãƒ¼ãŒãªãã¦ã‚‚ローカル/リモートファイルã§ä½œæ¥­ã§ãã‚‹ãƒãƒ¼ã‚¿ãƒ–ルãªãƒ•ãƒ«æ©Ÿèƒ½ã®ãƒ„ールã§ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/data-formats/sql.md b/docs/ja/integrations/data-ingestion/data-formats/sql.md new file mode 100644 index 00000000000..046dd7b588f --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/sql.md @@ -0,0 +1,112 @@ +--- +sidebar_label: SQL ダンプ +slug: /ja/integrations/data-formats/sql +--- + +# ClickHouseã§ã®SQLデータã®æŒ¿å…¥ã¨ãƒ€ãƒ³ãƒ— + +ClickHouseã¯ã€ã•ã¾ã–ã¾ãªæ–¹æ³•ã§OLTPデータベースインフラストラクãƒãƒ£ã«ç°¡å˜ã«çµ±åˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã®ä¸€ã¤ã®æ–¹æ³•ã¯ã€ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ClickHouseé–“ã§SQLダンプを利用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’転é€ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +## SQLダンプã®ä½œæˆ + +データã¯[SQLInsert](/docs/ja/interfaces/formats.md/#sqlinsert)を使用ã—ã¦SQLå½¢å¼ã§ãƒ€ãƒ³ãƒ—ã§ãã¾ã™ã€‚ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’`INSERT INTO VALUES(...)`ã®å½¢å¼ã§æ›¸ãè¾¼ã¿ã€`output_format_sql_insert_table_name`設定オプションをテーブルåã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +```sql +SET output_format_sql_insert_table_name = 'some_table'; +SELECT * FROM some_data +INTO OUTFILE 'dump.sql' +FORMAT SQLInsert +``` + +カラムåã¯[`output_format_sql_insert_include_column_names`](/docs/ja/operations/settings/settings-formats.md/#output_format_sql_insert_include_column_names)オプションを無効ã«ã™ã‚‹ã“ã¨ã§çœç•¥ã§ãã¾ã™ã€‚ + +```sql +SET output_format_sql_insert_include_column_names = 0 +``` + +今度ã¯[dump.sql](assets/dump.sql)ファイルを他ã®OLTPデータベースã«ä¾›çµ¦ã§ãã¾ã™ã€‚ + +```bash +mysql some_db < dump.sql +``` + +ã“ã“ã§ã¯ã€`some_db` MySQLデータベースã«`some_table`テーブルãŒå­˜åœ¨ã™ã‚‹ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ + +一部ã®DBMSã¯ã€1回ã®ãƒãƒƒãƒã§å‡¦ç†ã§ãる値ã®é‡ã«åˆ¶é™ãŒã‚ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚デフォルトã§ã¯ClickHouseã¯65kã®å€¤ã®ãƒãƒƒãƒã‚’作æˆã—ã¾ã™ãŒã€[`output_format_sql_insert_max_batch_size`](/docs/ja/operations/settings/settings-formats.md/#output_format_sql_insert_max_batch_size)オプションã§ã“れを変更ã§ãã¾ã™ã€‚ + +```sql +SET output_format_sql_insert_max_batch_size = 1000; +``` + +### 一連ã®å€¤ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +ClickHouseã«ã¯ã€`INSERT INTO table VALUES`部分をçœç•¥ã—ã€ä¸€é€£ã®å€¤ã®ã¿ã‚’è¿”ã™[Values](/docs/ja/interfaces/formats.md/#data-format-values)å½¢å¼ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +SELECT * FROM some_data LIMIT 3 FORMAT Values +``` +```response +('Bangor_City_Forest','2015-07-01',34),('Alireza_Afzal','2017-02-01',24),('Akhaura-Laksam-Chittagong_Line','2015-09-01',30) +``` + +## SQLダンプã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥ + +SQLダンプを読ã¿å–ã‚‹ãŸã‚ã«ã¯ã€[MySQLDump](/docs/ja/interfaces/formats.md/#mysqldump)を使用ã—ã¾ã™ã€‚ + +```sql +SELECT * +FROM file('dump.sql', MySQLDump) +LIMIT 5 +``` +```response +┌─path───────────────────────────┬──────month─┬─hits─┠+│ Bangor_City_Forest │ 2015-07-01 │ 34 │ +│ Alireza_Afzal │ 2017-02-01 │ 24 │ +│ Akhaura-Laksam-Chittagong_Line │ 2015-09-01 │ 30 │ +│ 1973_National_500 │ 2017-10-01 │ 80 │ +│ Attachment │ 2017-09-01 │ 1356 │ +└────────────────────────────────┴────────────┴──────┘ +``` + +デフォルトã§ClickHouseã¯æœªçŸ¥ã®ã‚«ãƒ©ãƒ ã‚’スキップã—ã¾ã™ï¼ˆã“ã‚Œã¯[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)オプションã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ï¼‰ã—ã€ãƒ€ãƒ³ãƒ—ã«è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルãŒå«ã¾ã‚Œã‚‹å ´åˆã€æœ€åˆã«è¦‹ã¤ã‹ã£ãŸãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã—ã¾ã™ã€‚DDLæ–‡ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚MySQLダンプã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€ãŸã‚ã«ã¯ï¼ˆä¾‹ï¼š [mysql.sql](assets/mysql.sql) ファイル)以下ã®ã‚ˆã†ã«ã—ã¾ã™ã€‚ + +```sql +INSERT INTO some_data +FROM INFILE 'mysql.sql' FORMAT MySQLDump +``` + +ã¾ãŸã€MySQLダンプファイルã‹ã‚‰è‡ªå‹•çš„ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE table_from_mysql +ENGINE = MergeTree +ORDER BY tuple() AS +SELECT * +FROM file('mysql.sql', MySQLDump) +``` + +ã“ã“ã§ã¯ã€ClickHouseãŒè‡ªå‹•çš„ã«æŽ¨æ¸¬ã—ãŸæ§‹é€ ã«åŸºã¥ã„ã¦`table_from_mysql`ã¨ã„ã†åå‰ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã—ãŸã€‚ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã«åŸºã¥ã„ã¦ã‚¿ã‚¤ãƒ—を検出ã™ã‚‹ã‹ã€åˆ©ç”¨å¯èƒ½ãªå ´åˆã¯DDLを使用ã—ã¾ã™ã€‚ + +```sql +DESCRIBE TABLE table_from_mysql; +``` +```response +┌─name──┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ path │ Nullable(String) │ │ │ │ │ │ +│ month │ Nullable(Date32) │ │ │ │ │ │ +│ hits │ Nullable(UInt32) │ │ │ │ │ │ +└───────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +## ãã®ä»–ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ + +ClickHouseã¯ã€ã•ã¾ã–ã¾ãªã‚·ãƒŠãƒªã‚ªã‚„プラットフォームã«å¯¾å¿œã™ã‚‹ãŸã‚ã«ã€å¤šãã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’テキストã¨ãƒã‚¤ãƒŠãƒªã®ä¸¡æ–¹ã§ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚以下ã®è¨˜äº‹ã§ã•ã‚‰ã«å¤šãã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚„ãã®æ‰±ã„æ–¹ã«ã¤ã„ã¦å­¦ã‚“ã§ãã ã•ã„。 + +- [CSVã¨TSVフォーマット](csv-tsv.md) +- [Parquet](parquet.md) +- [JSONフォーマット](/docs/ja/integrations/data-ingestion/data-formats/json/intro.md) +- [æ­£è¦è¡¨ç¾ã¨ãƒ†ãƒ³ãƒ—レート](templates-regex.md) +- [ãƒã‚¤ãƒ†ã‚£ãƒ–ã¨ãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ](binary.md) +- **SQLフォーマット** + +ã¾ãŸã€[clickhouse-local](https://clickhouse.com/blog/extracting-converting-querying-local-files-with-sql-clickhouse-local)も確èªã—ã¦ãã ã•ã„。ã“ã‚Œã¯ã€ClickHouseサーãƒãƒ¼ã‚’使ã‚ãšã«ãƒ­ãƒ¼ã‚«ãƒ«/リモートファイル上ã§SQLã§ä½œæ¥­ã™ã‚‹ãŸã‚ã®ãƒãƒ¼ã‚¿ãƒ–ルãªãƒ•ãƒ«æ©Ÿèƒ½ã®ãƒ„ールã§ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/data-formats/templates-regex.md b/docs/ja/integrations/data-ingestion/data-formats/templates-regex.md new file mode 100644 index 00000000000..0e5734f4920 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/data-formats/templates-regex.md @@ -0,0 +1,243 @@ +--- +sidebar_label: æ­£è¦è¡¨ç¾ã¨ãƒ†ãƒ³ãƒ—レート +sidebar_position: 3 +slug: /ja/integrations/data-formats/templates-regexp +--- + +# ClickHouseã§ãƒ†ãƒ³ãƒ—レートã¨æ­£è¦è¡¨ç¾ã‚’使用ã—ãŸã‚«ã‚¹ã‚¿ãƒ ãƒ†ã‚­ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆã¨ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +ç§ãŸã¡ã¯ã—ã°ã—ã°ã‚«ã‚¹ã‚¿ãƒ ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ãƒ‡ãƒ¼ã‚¿ã‚’扱ã‚ãªã‘ã‚Œã°ãªã‚‰ãªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ãã‚Œã¯æ¨™æº–ã§ã¯ãªã„フォーマットã€ä¸æ­£ãªJSONã€å£Šã‚ŒãŸCSVãªã©ã§ã™ã€‚CSVã‚„JSONã®ã‚ˆã†ãªæ¨™æº–パーサを使用ã—ã¦ã‚‚ã€ã“れらã®ã™ã¹ã¦ã®ã‚±ãƒ¼ã‚¹ã§å‹•ä½œã™ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã—ã‹ã—ã€ClickHouseã«ã¯å¼·åŠ›ãªãƒ†ãƒ³ãƒ—レートã¨æ­£è¦è¡¨ç¾ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒã‚ã‚Šã¾ã™ã€‚ + +## テンプレートã«åŸºã¥ã„ãŸã‚¤ãƒ³ãƒãƒ¼ãƒˆ +次ã®[ログファイル](assets/error.log)ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã—ãŸã„ã¨ã—ã¾ã™ã€‚ + +```bash +head error.log +``` +```response +2023/01/15 14:51:17 [error] client: 7.2.8.1, server: example.com "GET /apple-touch-icon-120x120.png HTTP/1.1" +2023/01/16 06:02:09 [error] client: 8.4.2.7, server: example.com "GET /apple-touch-icon-120x120.png HTTP/1.1" +2023/01/15 13:46:13 [error] client: 6.9.3.7, server: example.com "GET /apple-touch-icon.png HTTP/1.1" +2023/01/16 05:34:55 [error] client: 9.9.7.6, server: example.com "GET /h5/static/cert/icon_yanzhengma.png HTTP/1.1" +``` + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ã€[テンプレート](/docs/ja/interfaces/formats.md/#format-template)フォーマットを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚入力データã®å„è¡Œã«å€¤ã®ãƒ—レースホルダーをæŒã¤ãƒ†ãƒ³ãƒ—レート文字列を定義ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` +
%20FORMAT%20JSONEachRow`を指定ã—ã¾ã™ã€‚**注æ„**:クエリã¯ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + * `Endpoint Authentication type` - BASIC + * `Auth username` - ClickHouseã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å + * `Auth password` - ClickHouseã®ãƒ‘スワード + +:::note + ã“ã®HTTP Urlã¯ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã‚„ã™ã„ã§ã™ã€‚正確ãªã‚¨ã‚¹ã‚±ãƒ¼ãƒ—を心ãŒã‘ã¦ãã ã•ã„。 +::: + +Auth options for Confluent HTTP Sink +
+ +* 設定 + * `Input Kafka record value format` ソースデータã«ä¾å­˜ã—ã¾ã™ãŒã€ã»ã¨ã‚“ã©ã®å ´åˆJSONã¾ãŸã¯Avroã§ã™ã€‚以下ã®è¨­å®šã§ã¯`JSON`を想定ã—ã¦ã„ã¾ã™ã€‚ + * `advanced configurations` セクションã§ã¯ï¼š + * `HTTP Request Method` - POSTã«è¨­å®š + * `Request Body Format` - json + * `Batch batch size` - ClickHouseã®æŽ¨å¥¨ã«åŸºã¥ãã€**最低ã§ã‚‚1000**ã«è¨­å®šã—ã¾ã™ã€‚ + * `Batch json as array` - true + * `Retry on HTTP codes` - 400-500ã§ã™ãŒã€å¿…è¦ã«å¿œã˜ã¦é©å¿œã€‚例:ClickHouseã®å‰ã«HTTPプロキシãŒã‚ã‚‹å ´åˆã¯å¤‰æ›´ãŒå¿…è¦ãªå ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + * `Maximum Reties` - デフォルト(10)ãŒé©åˆ‡ã§ã™ãŒã€ã‚ˆã‚Šå¼·åŠ›ãªãƒªãƒˆãƒ©ã‚¤ã‚’望む場åˆã¯èª¿æ•´ã—ã¦ãã ã•ã„。 + +Advanced options for Confluent HTTP Sink + +#### 5. 接続性ã®ãƒ†ã‚¹ãƒˆ +HTTP Sinkã§è¨­å®šã—ãŸãƒˆãƒ”ックã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ä½œæˆ +Create a message in the topic + +
+ +ãã—ã¦ã€ä½œæˆã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒClickHouseインスタンスã«æ›¸ãè¾¼ã¾ã‚ŒãŸã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +### トラブルシューティング +#### HTTP SinkãŒãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ãƒãƒƒãƒå‡¦ç†ã—ãªã„ + +[Sinkドキュメント](https://docs.confluent.io/kafka-connectors/http/current/overview.html#http-sink-connector-for-cp)ã‹ã‚‰ã®å¼•ç”¨ï¼š +> Kafkaヘッダ値ãŒç•°ãªã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å ´åˆã€HTTP Sinkコãƒã‚¯ã‚¿ã¯è¦æ±‚ã‚’ãƒãƒƒãƒå‡¦ç†ã—ã¾ã›ã‚“。 + +1. Kafkaレコードã«åŒã˜ã‚­ãƒ¼ãŒã‚ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +2. HTTP APIã®URLã«ãƒ‘ラメータを追加ã™ã‚‹ã¨ã€å„レコードãŒãƒ¦ãƒ‹ãƒ¼ã‚¯ãªURLを生æˆã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãŸã‚ã€è¿½åŠ ã®URLパラメータを使用ã™ã‚‹å ´åˆã€ãƒãƒƒãƒå‡¦ç†ã¯ç„¡åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +#### 400 Bad Request +##### CANNOT_PARSE_QUOTED_STRING +HTTP SinkãŒ`String`カラムã«JSONオブジェクトを挿入ã™ã‚‹éš›ã«ä»¥ä¸‹ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã§å¤±æ•—ã™ã‚‹å ´åˆï¼š + +``` +Code: 26. DB::ParsingException: Cannot parse JSON string: expected opening quote: (while reading the value of key key_name): While executing JSONEachRowRowInputFormat: (at row 1). (CANNOT_PARSE_QUOTED_STRING) +``` + +URLã«`input_format_json_read_objects_as_strings=1`設定をエンコードã•ã‚ŒãŸæ–‡å­—列ã¨ã—ã¦è¿½åŠ ã—ã¾ã™ `SETTINGS%20input_format_json_read_objects_as_strings%3D1` + +### GitHubデータセットをロードã™ã‚‹ï¼ˆã‚ªãƒ—ション) + +ã“ã®ä¾‹ã§ã¯ã€GitHubデータセットã®é…列フィールドをä¿ã¡ã¾ã™ã€‚例ã§ã¯ç©ºã®githubトピックを想定ã—ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æŒ¿å…¥ã«[kcat](https://github.com/edenhill/kcat)を使用ã—ã¾ã™ã€‚ + +##### 1. 設定を準備ã™ã‚‹ + +[ã“れらã®æ‰‹é †](https://docs.confluent.io/cloud/current/cp-component/connect-cloud-config.html#set-up-a-local-connect-worker-with-cp-install) ã«å¾“ã£ã¦ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚¿ã‚¤ãƒ—ã«é–¢é€£ã™ã‚‹Connectをセットアップã—ã¦ãã ã•ã„。スタンドアロンã¨åˆ†æ•£åž‹ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®é•ã„ã«æ³¨æ„ã—ã¦ãã ã•ã„。Confluent Cloudを使用ã™ã‚‹å ´åˆã€åˆ†æ•£è¨­å®šãŒè©²å½“ã—ã¾ã™ã€‚ + +最もé‡è¦ãªãƒ‘ラメータã¯`http.api.url`ã§ã™ã€‚ClickHouse用ã®[HTTPインターフェース](../../../../interfaces/http.md) ã§ã¯ã€INSERT文をURLã®ãƒ‘ラメータã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆï¼ˆã“ã®å ´åˆã€`JSONEachRow`)ã¨ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’å«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚フォーマットã¯Kafkaデータã¨ä¸€è²«ã—ã¦ã„ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ã“れらã®ãƒ‘ラメータã¯URLエスケープã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。GitHubデータセット用ã®ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ä¾‹ã‚’以下ã«ç¤ºã—ã¾ã™ï¼ˆClickHouseãŒãƒ­ãƒ¼ã‚«ãƒ«ã§å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹ã¨æƒ³å®šï¼‰ï¼š + +``` +://:?query=INSERT%20INTO%20.
%20FORMAT%20JSONEachRow + +http://localhost:8123?query=INSERT%20INTO%20default.github%20FORMAT%20JSONEachRow +``` + +HTTP Sinkã‚’ClickHouseã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã®è¿½åŠ ãƒ‘ラメータã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ã€‚完全ãªãƒ‘ラメータリストã¯[ã“ã¡ã‚‰](https://docs.confluent.io/kafka-connect-http/current/connector_config.html)ã‚’ã”覧ãã ã•ã„: + +* `request.method` - **POST**ã«è¨­å®š +* `retry.on.status.codes` - エラーステータスコード(400-500)ã§ãƒªãƒˆãƒ©ã‚¤ã™ã‚‹ã‚ˆã†ã«è¨­å®šã—ã¾ã™ã€‚データã§äºˆæƒ³ã•ã‚Œã‚‹ã‚¨ãƒ©ãƒ¼ã«åŸºã¥ã„ã¦è©³ç´°åŒ–ã—ã¦ãã ã•ã„。 +* `request.body.format` - 多ãã®å ´åˆã€ã“ã‚Œã¯JSONã§ã™ã€‚ +* `auth.type` - ClickHouseã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’使用ã™ã‚‹å ´åˆã€BASICã«è¨­å®šã—ã¾ã™ã€‚ä»–ã®ClickHouse互æ›èªè¨¼ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯ç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +* `ssl.enabled` - SSLを使用ã™ã‚‹å ´åˆã¯trueã«è¨­å®šã—ã¾ã™ã€‚ +* `connection.user` - ClickHouseã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å。 +* `connection.password` - ClickHouseã®ãƒ‘スワード。 +* `batch.max.size` - 1回ã®ãƒãƒƒãƒã§é€ä¿¡ã™ã‚‹è¡Œæ•°ã§ã™ã€‚é©åˆ‡ã«å¤§ããªæ•°ã«ãªã‚‹ã‚ˆã†ã«è¨­å®šã—ã¾ã™ã€‚ClickHouse [推奨事項](../../../../concepts/why-clickhouse-is-so-fast.md#performance-when-inserting-data) ã«åŸºã¥ãã€1000ãŒæœ€å°ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ +* `tasks.max` - HTTP Sinkコãƒã‚¯ã‚¿ã¯1ã¤ä»¥ä¸Šã®ã‚¿ã‚¹ã‚¯ã‚’実行ã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãƒãƒƒãƒã‚µã‚¤ã‚ºã¨ã¨ã‚‚ã«ã€ã“ã‚ŒãŒãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ä¸»ãªæ‰‹æ®µã§ã™ã€‚ +* `key.converter` - キーã®ã‚¿ã‚¤ãƒ—ã«å¿œã˜ã¦è¨­å®šã—ã¾ã™ã€‚ +* `value.converter` - トピック上ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¿ã‚¤ãƒ—ã«åŸºã¥ã„ã¦è¨­å®šã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ã‚¹ã‚­ãƒ¼ãƒžã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“。ã“ã“ã§ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€`http.api.url`パラメータã§æŒ‡å®šã•ã‚ŒãŸFORMATã¨ä¸€è²«ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚最もå˜ç´”ãªã®ã¯JSONを使用ã—ã€org.apache.kafka.connect.json.JsonConverterコンãƒãƒ¼ã‚¿ã‚’使用ã™ã‚‹ã“ã¨ã§ã™ã€‚値を文字列ã¨ã—ã¦æ‰±ã†ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼ˆorg.apache.kafka.connect.storage.StringConverterコンãƒãƒ¼ã‚¿ã‚’通ã˜ã¦ï¼‰- ãŸã ã—ã€ã“ã‚Œã¯INSERTステートメントã§é–¢æ•°ã‚’使用ã—ã¦å€¤ã‚’抽出ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã§ã—ょã†ã€‚[Avroフォーマット](../../../../interfaces/formats.md#data-format-avro) ã‚‚ClickHouseã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€io.confluent.connect.avro.AvroConverterコンãƒãƒ¼ã‚¿ã‚’使用ã™ã‚‹å ´åˆã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +プロキシã®è¨­å®šã‚„リトライã€é«˜åº¦ãªSSL設定をå«ã‚€è¨­å®šã®è©³ç´°ã¯[ã“ã¡ã‚‰](https://docs.confluent.io/kafka-connect-http/current/connector_config.html)ã‚’ã”覧ãã ã•ã„。 + +Githubサンプルデータ用ã®ä¾‹ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/clickhouse-docs/tree/main/docs/en/integrations/data-ingestion/kafka/code/connectors/http_sink)ã«ã‚ã‚Šã¾ã™ã€‚ConnectãŒã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ãƒ¢ãƒ¼ãƒ‰ã§å®Ÿè¡Œã•ã‚Œã€KafkaãŒConfluent Cloudã§ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„ã‚‹ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ + +##### 2. ClickHouseテーブルを作æˆã™ã‚‹ + +テーブルãŒä½œæˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。MergeTreeを使用ã—ãŸæœ€å°é™ã®GitHubデータセットã®ä¾‹ã‚’以下ã«ç¤ºã—ã¾ã™ã€‚ + + +```sql +CREATE TABLE github +( + file_time DateTime, + event_type Enum('CommitCommentEvent' = 1, 'CreateEvent' = 2, 'DeleteEvent' = 3, 'ForkEvent' = 4,'GollumEvent' = 5, 'IssueCommentEvent' = 6, 'IssuesEvent' = 7, 'MemberEvent' = 8, 'PublicEvent' = 9, 'PullRequestEvent' = 10, 'PullRequestReviewCommentEvent' = 11, 'PushEvent' = 12, 'ReleaseEvent' = 13, 'SponsorshipEvent' = 14, 'WatchEvent' = 15, 'GistEvent' = 16, 'FollowEvent' = 17, 'DownloadEvent' = 18, 'PullRequestReviewEvent' = 19, 'ForkApplyEvent' = 20, 'Event' = 21, 'TeamAddEvent' = 22), + actor_login LowCardinality(String), + repo_name LowCardinality(String), + created_at DateTime, + updated_at DateTime, + action Enum('none' = 0, 'created' = 1, 'added' = 2, 'edited' = 3, 'deleted' = 4, 'opened' = 5, 'closed' = 6, 'reopened' = 7, 'assigned' = 8, 'unassigned' = 9, 'labeled' = 10, 'unlabeled' = 11, 'review_requested' = 12, 'review_request_removed' = 13, 'synchronize' = 14, 'started' = 15, 'published' = 16, 'update' = 17, 'create' = 18, 'fork' = 19, 'merged' = 20), + comment_id UInt64, + path String, + ref LowCardinality(String), + ref_type Enum('none' = 0, 'branch' = 1, 'tag' = 2, 'repository' = 3, 'unknown' = 4), + creator_user_login LowCardinality(String), + number UInt32, + title String, + labels Array(LowCardinality(String)), + state Enum('none' = 0, 'open' = 1, 'closed' = 2), + assignee LowCardinality(String), + assignees Array(LowCardinality(String)), + closed_at DateTime, + merged_at DateTime, + merge_commit_sha String, + requested_reviewers Array(LowCardinality(String)), + merged_by LowCardinality(String), + review_comments UInt32, + member_login LowCardinality(String) +) ENGINE = MergeTree ORDER BY (event_type, repo_name, created_at) + +``` + +##### 3. Kafkaã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ + +Kafkaã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’挿入ã—ã¾ã™ã€‚以下ã§ã¯[kcat](https://github.com/edenhill/kcat)を使用ã—ã¦10,000件ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’挿入ã—ã¾ã™ã€‚ + +```bash +head -n 10000 github_all_columns.ndjson | kcat -b : -X security.protocol=sasl_ssl -X sasl.mechanisms=PLAIN -X sasl.username= -X sasl.password= -t github +``` + +ターゲットテーブル「Githubã€ã§ç°¡å˜ãªèª­ã¿å–ã‚Šã‚’è¡Œã„ã€ãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥ã‚’確èªã—ã¾ã™ã€‚ + +```sql +SELECT count() FROM default.github; + +| count() | +| :--- | +| 10000 | + +``` diff --git a/docs/ja/integrations/data-ingestion/kafka/images/kafka_01.excalidraw b/docs/ja/integrations/data-ingestion/kafka/images/kafka_01.excalidraw new file mode 100644 index 00000000000..d8e362fcfeb --- /dev/null +++ b/docs/ja/integrations/data-ingestion/kafka/images/kafka_01.excalidraw @@ -0,0 +1,755 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 878, + "versionNonce": 328208404, + "isDeleted": false, + "id": "w3o5tB4I0DAoE2Z_8IKNs", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 682.5, + "y": 706.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 204, + "height": 394, + "seed": 1090013588, + "groupIds": [ + "Jv6-AChTrMCrVUCMAxkkv" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "RGcUE81uoGG9Wjr69IRRM" + } + ], + "updated": 1652465060451, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 231, + "versionNonce": 960998188, + "isDeleted": false, + "id": "RGcUE81uoGG9Wjr69IRRM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 687.5, + "y": 868.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 194, + "height": 70, + "seed": 1493094828, + "groupIds": [ + "Jv6-AChTrMCrVUCMAxkkv" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652465060451, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Kafka Table \nEngine", + "baseline": 60, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "w3o5tB4I0DAoE2Z_8IKNs", + "originalText": "Kafka Table Engine" + }, + { + "type": "image", + "version": 671, + "versionNonce": 549252500, + "isDeleted": false, + "id": "5wdzcM6SoclCftewiStkr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 696.6291629162916, + "y": 1044.5, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1527032971, + "groupIds": [ + "Jv6-AChTrMCrVUCMAxkkv" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652465060451, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 490, + "versionNonce": 134309292, + "isDeleted": false, + "id": "OpHRgAlXBOkspHa9237pK", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 399, + "y": 700, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 206, + "height": 394.99999999999994, + "seed": 894230420, + "groupIds": [ + "4eZZpSvd60X5qb-FZFK5F" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "S5iZiJVKGX3m4Jxzm3sW1", + "type": "arrow" + } + ], + "updated": 1652465060451, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 522, + "versionNonce": 2138184468, + "isDeleted": false, + "id": "BawcP8SgldqVfO4MEwxKZ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 421.61840277777765, + "y": 1013.5, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 37.42083333333335, + "height": 60.75084554678695, + "seed": 1892392779, + "groupIds": [ + "4eZZpSvd60X5qb-FZFK5F" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652465060451, + "link": null, + "locked": false, + "status": "saved", + "fileId": "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 344, + "versionNonce": 2090848300, + "isDeleted": false, + "id": "aeFLYYiDEiobVoUWJkufD", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 445, + "y": 848.7499999999999, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 83, + "height": 72, + "seed": 2071509291, + "groupIds": [ + "4eZZpSvd60X5qb-FZFK5F" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652465060451, + "link": null, + "locked": false, + "fontSize": 28.500000000000032, + "fontFamily": 1, + "text": "Kafka\nTopic", + "baseline": 61, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Kafka\nTopic" + }, + { + "type": "text", + "version": 448, + "versionNonce": 2049284244, + "isDeleted": false, + "id": "6olbLzrgL1MA0e-Mk_Sno", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1347, + "y": 1185, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 173, + "height": 35, + "seed": 1581616747, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652465060451, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "User queries", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "User queries" + }, + { + "type": "arrow", + "version": 1403, + "versionNonce": 1460464300, + "isDeleted": false, + "id": "S5iZiJVKGX3m4Jxzm3sW1", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 605.0000000000001, + "y": 904.7304815823768, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 78.02606572763841, + "height": 0.2695184176232033, + "seed": 172826772, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652465060451, + "link": null, + "locked": false, + "startBinding": { + "elementId": "OpHRgAlXBOkspHa9237pK", + "focus": 0.034746004512532146, + "gap": 1 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 78.02606572763841, + 0.2695184176232033 + ] + ] + }, + { + "type": "rectangle", + "version": 969, + "versionNonce": 479028756, + "isDeleted": false, + "id": "fTTGbxiaLOJbMhRhUsc4v", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 997.5, + "y": 710, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 215, + "height": 394, + "seed": 1345975444, + "groupIds": [ + "62LlCOWxTeDkXJ6fupA__" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "IUs6Kr5j_CgrMHavwSWab" + }, + { + "id": "0IqXaCVB97fUCwQlxDYn8", + "type": "arrow" + }, + { + "id": "XtxP2K6AUmA8yxdc-7ttT", + "type": "arrow" + } + ], + "updated": 1652465060451, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 255, + "versionNonce": 1240642860, + "isDeleted": false, + "id": "IUs6Kr5j_CgrMHavwSWab", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1002.5, + "y": 872, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 205, + "height": 70, + "seed": 617182356, + "groupIds": [ + "62LlCOWxTeDkXJ6fupA__" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652465060452, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Materialized \nView", + "baseline": 60, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "fTTGbxiaLOJbMhRhUsc4v", + "originalText": "Materialized View" + }, + { + "type": "image", + "version": 771, + "versionNonce": 195003284, + "isDeleted": false, + "id": "xUOJ_PvsPr3ef2_P8dO_l", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1019.6291629162915, + "y": 1041, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1010175947, + "groupIds": [ + "62LlCOWxTeDkXJ6fupA__" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652465060452, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 825, + "versionNonce": 582692780, + "isDeleted": false, + "id": "DQhN188gSYbb8QNCNO-ur", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1301.5, + "y": 871, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 193, + "height": 70, + "seed": 1144070700, + "groupIds": [ + "WaWg_oFZTAxIjjhW8pi0O" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652465060452, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "MergeTree \nfamily table", + "baseline": 60, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "RjSTnPTzFEcCQwfgRryLR", + "originalText": "MergeTree family table" + }, + { + "type": "rectangle", + "version": 1361, + "versionNonce": 1569845524, + "isDeleted": false, + "id": "RjSTnPTzFEcCQwfgRryLR", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1296.5, + "y": 709, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 203, + "height": 394, + "seed": 378158636, + "groupIds": [ + "WaWg_oFZTAxIjjhW8pi0O" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "DQhN188gSYbb8QNCNO-ur" + }, + { + "id": "0IqXaCVB97fUCwQlxDYn8", + "type": "arrow" + }, + { + "id": "0CozKSjnZtY-uQsjp7TAa", + "type": "arrow" + } + ], + "updated": 1652465060452, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 1146, + "versionNonce": 1905285676, + "isDeleted": false, + "id": "mHwVKgVtq-QNgT610tzXi", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1316.6291629162915, + "y": 1042, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1030718757, + "groupIds": [ + "WaWg_oFZTAxIjjhW8pi0O" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652465060452, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "arrow", + "version": 1396, + "versionNonce": 1910156948, + "isDeleted": false, + "id": "XtxP2K6AUmA8yxdc-7ttT", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 993.7407827330846, + "y": 909.7665001139045, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 107.74078273308464, + "height": 1.766500113904499, + "seed": 1006009620, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652465060452, + "link": null, + "locked": false, + "startBinding": { + "elementId": "fTTGbxiaLOJbMhRhUsc4v", + "focus": -0.023096342081524727, + "gap": 3.759217266915357 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -107.74078273308464, + -1.766500113904499 + ] + ] + }, + { + "type": "arrow", + "version": 2562, + "versionNonce": 2048313108, + "isDeleted": false, + "id": "0IqXaCVB97fUCwQlxDYn8", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1293.4366941211092, + "y": 913.2775351569246, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 78.93669412110921, + "height": 2.764348193272099, + "seed": 2125579948, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652465081783, + "link": null, + "locked": false, + "startBinding": { + "elementId": "RjSTnPTzFEcCQwfgRryLR", + "focus": -0.01860928002735619, + "gap": 3.0633058788907874 + }, + "endBinding": { + "elementId": "fTTGbxiaLOJbMhRhUsc4v", + "focus": 0.06413755642360305, + "gap": 2 + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -78.93669412110921, + 2.764348193272099 + ] + ] + }, + { + "type": "arrow", + "version": 3666, + "versionNonce": 1227865108, + "isDeleted": false, + "id": "0CozKSjnZtY-uQsjp7TAa", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1473.9239300813729, + "y": 1187.3723869577298, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 2.5516436994646483, + "height": 77.82917299595692, + "seed": 735765420, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652465060452, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "RjSTnPTzFEcCQwfgRryLR", + "focus": -0.6178204858620798, + "gap": 6.543213961772835 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -2.5516436994646483, + -77.82917299595692 + ] + ] + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": { + "6a7ab914e457c49e24cbce1b5454bd1d4dcce288": { + "mimeType": "image/svg+xml", + "id": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "dataURL": "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIyMjIiIHZpZXdCb3g9IjAgMCA5IDgiIHdpZHRoPSIyNTAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0wIDdoMXYxaC0xeiIgZmlsbD0iI2YwMCIvPjxwYXRoIGQ9Im0wIDBoMXY3aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDMuMjVoMXYxLjVoLTF6IiBmaWxsPSIjZmMwIi8+PC9zdmc+", + "created": 1648219958285 + }, + "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96": { + "mimeType": "image/png", + "id": "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96", + "dataURL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA3cAAAWgCAYAAAD92Lq7AAAgAElEQVR4XuydCWBkVZX331pVqUpSlbXS6c6eXqDZpEV2aBYFRfAbhgZRFvflG3SYkU/GleDK6LjOjKKjMCCgEJFREBFBwqYO2IpiszTdnXRS2fekKknV275zb+qF9EJ3lqp6r179n5bdSb/37n2/c+t5//ece44o4AABEFgpATF9of2nfR+L/sI+Bz22bNmivvzyyxFJkiKirpcYklRSGgiUVoVCVbOiWG0KUpgujoiCWSaKYpllWSXUQJFliUG6YVC0rKAlCn5BFE1LsFRqKWA3JAqiLojCrGBZkiXS3wVrVrSEBN1jVpTlGcEyE3TvCYk+7E+TPoroGxNnpwZi09MTsmxOm6Y87TN8U2qpOj44OJg4BJwVPf9KY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UiL5SS1itMJhOcKEkpnfKGwur7QrW/76AT3839hTfu6+/sb2+oFciELQuvFK1agtyEIPKTiWRyQFW05+nnV+gfO2Kx2MCnP/3p2D6Kh0tUysK86667kN3SS18gjAUEQAAEQAAEQCCjBJxYQGZ0gGgcBFZDgESJwD6pe7BNePsURGVlZbWiYTTQCY3NG5obJycmGsidt443jHXk5lpPoZ35duKQxf1hAimVwGXvbi54sFieF/KGURUAy1W2/O/sfI0/VgLCupZ+2W+SGFuw7VeFCkI/3aSfPHYDJGB7IpPRHs3Uuslz2V1fX9/V0dGh7oc3E4Y8BN1qZiOuBQEQAAEQAAEQAIEDE1j+QhFEQSC3CVjfmVYSKvRhB/t9nyGdzc3N/j179oTIuxXavHlz6fDAQD2vm+s0gV9PQY3rSHOtE2UpLPNigKq6+elGPkow4iOBxdx+bziY6CKPISeRR3BeDLJkJKlTrF9Zms9Ud+wesT+kfmZho/Oho6lr/353FmapUCylQv1RBFFMxuPxKfp5gCRlP7nVeklU9ks+qTcSieyhf5smr+U0lSWY2c80sL17e+/DQxKU3P7eYPQgAAIgAAIgAAIOEIC4cwAymvA+Aebd27FjB0+ih4V0su8V21O2JEGzuWJz4bgwXkkiqow8fRTaaRbRJ0QXF9E9QpTypUAO+PKphINvaizi94m8T+MM/7y0ZKqO9/GmQOknWQlvPWn9jfx8VAFcI49hkjYBKvHEXJJCJuO0Jy5Bf4uSApumv0/zBh81eCNConGC/j5BYnRsGUXAmQhl3jiDxKu5fft25l1c0pi9PyMwQhAAARAAARAAARBwngDEnfPM0WJuELC/W/v7ji0WQasWRCSwRCaw9rG3bSW0F/d5X/1HSYKVUMU1IAACIAACIAACILDGBP4/bQx+6hrMsYMAAAAASUVORK5CYII=", + "created": 1648219881114 + } + } +} \ No newline at end of file diff --git a/docs/ja/integrations/data-ingestion/kafka/images/kafka_01.png b/docs/ja/integrations/data-ingestion/kafka/images/kafka_01.png new file mode 100644 index 00000000000..c467d4d0438 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/kafka/images/kafka_01.png differ diff --git a/docs/ja/integrations/data-ingestion/kafka/images/kafka_02.excalidraw b/docs/ja/integrations/data-ingestion/kafka/images/kafka_02.excalidraw new file mode 100644 index 00000000000..4d32c5c0c9f --- /dev/null +++ b/docs/ja/integrations/data-ingestion/kafka/images/kafka_02.excalidraw @@ -0,0 +1,1048 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 822, + "versionNonce": 1029316756, + "isDeleted": false, + "id": "w3o5tB4I0DAoE2Z_8IKNs", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 778.5, + "y": 706.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 204, + "height": 394, + "seed": 1090013588, + "groupIds": [ + "Jv6-AChTrMCrVUCMAxkkv" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "RGcUE81uoGG9Wjr69IRRM" + }, + { + "id": "fnewN-MLbbnm7F-0VOy8F", + "type": "arrow" + }, + { + "id": "S5iZiJVKGX3m4Jxzm3sW1", + "type": "arrow" + }, + { + "id": "20AgrF3HvHf7UeyROfh63", + "type": "arrow" + } + ], + "updated": 1652459081172, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 181, + "versionNonce": 35805716, + "isDeleted": false, + "id": "RGcUE81uoGG9Wjr69IRRM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 783.5, + "y": 868.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 194, + "height": 70, + "seed": 1493094828, + "groupIds": [ + "Jv6-AChTrMCrVUCMAxkkv" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458937733, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Kafka Table \nEngine", + "baseline": 60, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "w3o5tB4I0DAoE2Z_8IKNs", + "originalText": "Kafka Table Engine" + }, + { + "type": "image", + "version": 666, + "versionNonce": 1800864044, + "isDeleted": false, + "id": "5wdzcM6SoclCftewiStkr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 792.6291629162916, + "y": 1044.5, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1527032971, + "groupIds": [ + "Jv6-AChTrMCrVUCMAxkkv" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458937733, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 438, + "versionNonce": 197133612, + "isDeleted": false, + "id": "OpHRgAlXBOkspHa9237pK", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 374, + "y": 700, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 206, + "height": 394.99999999999994, + "seed": 894230420, + "groupIds": [ + "4eZZpSvd60X5qb-FZFK5F" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "S5iZiJVKGX3m4Jxzm3sW1", + "type": "arrow" + }, + { + "id": "fnewN-MLbbnm7F-0VOy8F", + "type": "arrow" + } + ], + "updated": 1652458820139, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 517, + "versionNonce": 1371621524, + "isDeleted": false, + "id": "BawcP8SgldqVfO4MEwxKZ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 396.61840277777765, + "y": 1013.5, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 37.42083333333335, + "height": 60.75084554678695, + "seed": 1892392779, + "groupIds": [ + "4eZZpSvd60X5qb-FZFK5F" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458820119, + "link": null, + "locked": false, + "status": "saved", + "fileId": "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 330, + "versionNonce": 474233516, + "isDeleted": false, + "id": "aeFLYYiDEiobVoUWJkufD", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 420, + "y": 848.7499999999999, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 83, + "height": 72, + "seed": 2071509291, + "groupIds": [ + "4eZZpSvd60X5qb-FZFK5F" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458820119, + "link": null, + "locked": false, + "fontSize": 28.500000000000032, + "fontFamily": 1, + "text": "Kafka\nTopic", + "baseline": 61, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Kafka\nTopic" + }, + { + "type": "text", + "version": 443, + "versionNonce": 1348424748, + "isDeleted": false, + "id": "6olbLzrgL1MA0e-Mk_Sno", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1441, + "y": 1181, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 226, + "height": 35, + "seed": 1581616747, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652459130524, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "(6) User queries", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "(6) User queries" + }, + { + "type": "arrow", + "version": 1398, + "versionNonce": 34256556, + "isDeleted": false, + "id": "S5iZiJVKGX3m4Jxzm3sW1", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 581, + "y": 824.6550741354022, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 196.5, + "height": 0.44225680624845154, + "seed": 172826772, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458937733, + "link": null, + "locked": false, + "startBinding": { + "elementId": "OpHRgAlXBOkspHa9237pK", + "focus": -0.3695889031240465, + "gap": 1 + }, + "endBinding": { + "elementId": "w3o5tB4I0DAoE2Z_8IKNs", + "focus": 0.39634447611422324, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 196.5, + 0.44225680624845154 + ] + ] + }, + { + "type": "rectangle", + "version": 912, + "versionNonce": 699792300, + "isDeleted": false, + "id": "fTTGbxiaLOJbMhRhUsc4v", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1109.5, + "y": 710, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 215, + "height": 394, + "seed": 1345975444, + "groupIds": [ + "62LlCOWxTeDkXJ6fupA__" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "IUs6Kr5j_CgrMHavwSWab" + }, + { + "id": "0IqXaCVB97fUCwQlxDYn8", + "type": "arrow" + }, + { + "id": "XtxP2K6AUmA8yxdc-7ttT", + "type": "arrow" + } + ], + "updated": 1652458937733, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 198, + "versionNonce": 748954260, + "isDeleted": false, + "id": "IUs6Kr5j_CgrMHavwSWab", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1114.5, + "y": 872, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 205, + "height": 70, + "seed": 617182356, + "groupIds": [ + "62LlCOWxTeDkXJ6fupA__" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458937733, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Materialized \nView", + "baseline": 60, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "fTTGbxiaLOJbMhRhUsc4v", + "originalText": "Materialized View" + }, + { + "type": "image", + "version": 766, + "versionNonce": 2031354028, + "isDeleted": false, + "id": "xUOJ_PvsPr3ef2_P8dO_l", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1131.6291629162915, + "y": 1041, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1010175947, + "groupIds": [ + "62LlCOWxTeDkXJ6fupA__" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458937733, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 455, + "versionNonce": 925846420, + "isDeleted": false, + "id": "DQhN188gSYbb8QNCNO-ur", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1474.5, + "y": 871, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 193, + "height": 70, + "seed": 1144070700, + "groupIds": [ + "WaWg_oFZTAxIjjhW8pi0O" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652459040868, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "MergeTree \nfamily table", + "baseline": 60, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "RjSTnPTzFEcCQwfgRryLR", + "originalText": "MergeTree family table" + }, + { + "type": "rectangle", + "version": 1136, + "versionNonce": 250341292, + "isDeleted": false, + "id": "RjSTnPTzFEcCQwfgRryLR", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1469.5, + "y": 709, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 203, + "height": 394, + "seed": 378158636, + "groupIds": [ + "WaWg_oFZTAxIjjhW8pi0O" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "DQhN188gSYbb8QNCNO-ur" + }, + { + "id": "0IqXaCVB97fUCwQlxDYn8", + "type": "arrow" + }, + { + "id": "0CozKSjnZtY-uQsjp7TAa", + "type": "arrow" + } + ], + "updated": 1652459040868, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 954, + "versionNonce": 1656679596, + "isDeleted": false, + "id": "mHwVKgVtq-QNgT610tzXi", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1489.6291629162915, + "y": 1042, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1030718757, + "groupIds": [ + "WaWg_oFZTAxIjjhW8pi0O" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652459040869, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "arrow", + "version": 1155, + "versionNonce": 2003689004, + "isDeleted": false, + "id": "XtxP2K6AUmA8yxdc-7ttT", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1104.7407827330846, + "y": 909.9101994992986, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 137.98378221250425, + "height": 2.066634598782457, + "seed": 1006009620, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652459417283, + "link": null, + "locked": false, + "startBinding": { + "elementId": "fTTGbxiaLOJbMhRhUsc4v", + "focus": -0.02317883163991407, + "gap": 4.759217266915357 + }, + "endBinding": { + "elementId": "PPMZXqupvG_AFJpkJkyTs", + "focus": 1.3955304257290362, + "gap": 14 + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -137.98378221250425, + -2.066634598782457 + ] + ] + }, + { + "type": "arrow", + "version": 1871, + "versionNonce": 116003372, + "isDeleted": false, + "id": "0IqXaCVB97fUCwQlxDYn8", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1465.4366941211092, + "y": 912.6083644337409, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 139.9366941211092, + "height": 4.0506980513524695, + "seed": 2125579948, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652459040869, + "link": null, + "locked": false, + "startBinding": { + "elementId": "RjSTnPTzFEcCQwfgRryLR", + "focus": -0.017801345344272513, + "gap": 4.063305878890787 + }, + "endBinding": { + "elementId": "fTTGbxiaLOJbMhRhUsc4v", + "focus": 0.0639631242434834, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -139.9366941211092, + 4.0506980513524695 + ] + ] + }, + { + "type": "arrow", + "version": 2340, + "versionNonce": 1410627372, + "isDeleted": false, + "id": "0CozKSjnZtY-uQsjp7TAa", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1646.9239300813729, + "y": 1187.3723869577298, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 2.5516436994646483, + "height": 77.82917299595692, + "seed": 735765420, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652459041009, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "RjSTnPTzFEcCQwfgRryLR", + "focus": -0.6178204858620798, + "gap": 6.543213961772835 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -2.5516436994646483, + -77.82917299595692 + ] + ] + }, + { + "type": "arrow", + "version": 1382, + "versionNonce": 1181162540, + "isDeleted": false, + "id": "fnewN-MLbbnm7F-0VOy8F", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 584.5422455342772, + "y": 955.0509996486933, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 190.97078732954185, + "height": 1.6618431469032657, + "seed": 1459117844, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458937733, + "link": null, + "locked": false, + "startBinding": { + "elementId": "OpHRgAlXBOkspHa9237pK", + "focus": 0.29481001141426355, + "gap": 4.5422455342771855 + }, + "endBinding": { + "elementId": "w3o5tB4I0DAoE2Z_8IKNs", + "focus": -0.24749175012578659, + "gap": 2.986967136180965 + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 190.97078732954185, + -1.6618431469032657 + ] + ] + }, + { + "id": "3GiF6AItYJOR_SCCtWz48", + "type": "text", + "x": 587.5, + "y": 782, + "width": 182, + "height": 35, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1111672852, + "version": 57, + "versionNonce": 1496301460, + "isDeleted": false, + "boundElements": null, + "updated": 1652458913553, + "link": null, + "locked": false, + "text": "(3) messages", + "fontSize": 28, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 25, + "containerId": null, + "originalText": "(3) messages" + }, + { + "id": "cqZdtZeI6DgfZ0mE1UVDj", + "type": "text", + "x": 590.5, + "y": 900, + "width": 183, + "height": 35, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 96965804, + "version": 41, + "versionNonce": 1015763244, + "isDeleted": false, + "boundElements": null, + "updated": 1652458954553, + "link": null, + "locked": false, + "text": "(2) messages", + "fontSize": 28, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 25, + "containerId": null, + "originalText": "(2) messages" + }, + { + "id": "PPMZXqupvG_AFJpkJkyTs", + "type": "text", + "x": 989.5, + "y": 824, + "width": 115, + "height": 70, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1424642220, + "version": 43, + "versionNonce": 1459172268, + "isDeleted": false, + "boundElements": [ + { + "id": "XtxP2K6AUmA8yxdc-7ttT", + "type": "arrow" + } + ], + "updated": 1652459417282, + "link": null, + "locked": false, + "text": "(4) read\nrows", + "fontSize": 28, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 60, + "containerId": null, + "originalText": "(4) read\nrows" + }, + { + "id": "DycObbWQ7GIFaHs1NENKr", + "type": "text", + "x": 1335.5, + "y": 830, + "width": 130, + "height": 70, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1772574612, + "version": 29, + "versionNonce": 440341012, + "isDeleted": false, + "boundElements": null, + "updated": 1652459030033, + "link": null, + "locked": false, + "text": "(5) insert\nrows", + "fontSize": 28, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 60, + "containerId": null, + "originalText": "(5) insert\nrows" + }, + { + "type": "text", + "version": 493, + "versionNonce": 1460463916, + "isDeleted": false, + "id": "F1AWugVwb8emy-O_UUz7p", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 762, + "y": 1183.7283930191138, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 218, + "height": 35, + "seed": 399215788, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652459103504, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "(1) Insert rows", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "(1) Insert rows" + }, + { + "type": "arrow", + "version": 2399, + "versionNonce": 1081526316, + "isDeleted": false, + "id": "20AgrF3HvHf7UeyROfh63", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 939.9239300813729, + "y": 1185.1007799768436, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 2.5516436994646483, + "height": 77.82917299595692, + "seed": 1174529044, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652459081172, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "w3o5tB4I0DAoE2Z_8IKNs", + "focus": -0.46277159554651515, + "gap": 6.771606980886645 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -2.5516436994646483, + -77.82917299595692 + ] + ] + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": { + "6a7ab914e457c49e24cbce1b5454bd1d4dcce288": { + "mimeType": "image/svg+xml", + "id": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "dataURL": "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIyMjIiIHZpZXdCb3g9IjAgMCA5IDgiIHdpZHRoPSIyNTAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0wIDdoMXYxaC0xeiIgZmlsbD0iI2YwMCIvPjxwYXRoIGQ9Im0wIDBoMXY3aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDMuMjVoMXYxLjVoLTF6IiBmaWxsPSIjZmMwIi8+PC9zdmc+", + "created": 1648219958285 + }, + "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96": { + "mimeType": "image/png", + "id": "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96", + "dataURL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA3cAAAWgCAYAAAD92Lq7AAAgAElEQVR4XuydCWBkVZX331pVqUpSlbXS6c6eXqDZpEV2aBYFRfAbhgZRFvflG3SYkU/GleDK6LjOjKKjMCCgEJFREBFBwqYO2IpiszTdnXRS2fekKknV275zb+qF9EJ3lqp6r179n5bdSb/37n2/c+t5//ece44o4AABEFgpATF9of2nfR+L/sI+Bz22bNmivvzyyxFJkiKirpcYklRSGgiUVoVCVbOiWG0KUpgujoiCWSaKYpllWSXUQJFliUG6YVC0rKAlCn5BFE1LsFRqKWA3JAqiLojCrGBZkiXS3wVrVrSEBN1jVpTlGcEyE3TvCYk+7E+TPoroGxNnpwZi09MTsmxOm6Y87TN8U2qpOj44OJg4BJwVPf9KYeM6EAABEAABEAABEACBQxPYf1IKXiAAAq9BgISUeGPbjWJHR4dEH/bdIfH02iKuoaFhzez0bKMomQ2mZTUEg8F1RT5fpWmJFaJlVpH4qhAEMWxZZin9O+kxi3SZQ4coChJ96L9z1INJwZLG6IcRUbRGDcEamZyYGKB/3ytYcpdapO4Nh8N7d+zYkTpEbxX6N3Hbtm3mPffcY5JIfU2x69ATo1kQAAEQAAEQAAEQ8BwBx+aSniOJB/IaAf7daCOBQh92sJ+N/R8yQsfc3Fx5eWn5Gn+R/wjLNDYLprVZUeRWRVVLTcMIkkgqYteZpsk//E621Jn/uyWJEr83E5DpNhZ/N/f/ni7ne7u/qFr888LfSdaRtjQl+gU59fY9SPAJssy0GnVdFDXq5Az1MpFKJXsFU/ibrEgvkMrdMTY21knPN37CCSeMkvhlwnfxIad5WsTTbheCz2vfGjwPCIAACIAACICAowSWM0l0tKNoHASyTaCtrU3qYJ958XGAkCMvlPzEI48cqZniEdGa6AbDMDYKpn4Eudw2UXxkaHH/mBeOfRYdJgk4UnYHCLjXCm3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xKU3P7eYPQgAAIgAAIgAAIOEIC4cwAymvA+Aebd27FjB0+ih4V0su8V21O2JEGzuWJz4bgwXkkiqow8fRTaaRbRJ0QXF9E9QpTypUAO+PKphINvaizi94m8T+MM/7y0ZKqO9/GmQOknWQlvPWn9jfx8VAFcI49hkjYBKvHEXJJCJuO0Jy5Bf4uSApumv0/zBh81eCNConGC/j5BYnRsGUXAmQhl3jiDxKu5fft25l1c0pi9PyMwQhAAARAAARAAARBwngDEnfPM0WJuELC/W/v7ji0WQasWRCSwRCaw9rG3bSW0F/d5X/1HSYKVUMU1IAACIAACIAACILDGBP4/bQx+6hrMsYMAAAAASUVORK5CYII=", + "created": 1648219881114 + } + } +} \ No newline at end of file diff --git a/docs/ja/integrations/data-ingestion/kafka/images/kafka_02.png b/docs/ja/integrations/data-ingestion/kafka/images/kafka_02.png new file mode 100644 index 00000000000..dfdbd2267f4 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/kafka/images/kafka_02.png differ diff --git a/docs/ja/integrations/data-ingestion/kafka/images/kafka_03.excalidraw b/docs/ja/integrations/data-ingestion/kafka/images/kafka_03.excalidraw new file mode 100644 index 00000000000..1800c44efb9 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/kafka/images/kafka_03.excalidraw @@ -0,0 +1,1484 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 877, + "versionNonce": 1057700116, + "isDeleted": false, + "id": "w3o5tB4I0DAoE2Z_8IKNs", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 778.5, + "y": 795.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 204, + "height": 305, + "seed": 1090013588, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "RGcUE81uoGG9Wjr69IRRM" + }, + { + "id": "fnewN-MLbbnm7F-0VOy8F", + "type": "arrow" + }, + { + "id": "z5NUzY_cWtaUODVlgPgjz", + "type": "arrow" + } + ], + "updated": 1652460591599, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 230, + "versionNonce": 727979564, + "isDeleted": false, + "id": "RGcUE81uoGG9Wjr69IRRM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 783.5, + "y": 913, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 194, + "height": 70, + "seed": 1493094828, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652460429499, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Kafka Table \nEngine", + "baseline": 60, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "w3o5tB4I0DAoE2Z_8IKNs", + "originalText": "Kafka Table Engine" + }, + { + "type": "image", + "version": 670, + "versionNonce": 525893036, + "isDeleted": false, + "id": "5wdzcM6SoclCftewiStkr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 792.6291629162916, + "y": 1044.5, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1527032971, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460421719, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 489, + "versionNonce": 433248404, + "isDeleted": false, + "id": "OpHRgAlXBOkspHa9237pK", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 374, + "y": 799, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 206, + "height": 295.99999999999994, + "seed": 894230420, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "fnewN-MLbbnm7F-0VOy8F", + "type": "arrow" + }, + { + "id": "20AgrF3HvHf7UeyROfh63", + "type": "arrow" + } + ], + "updated": 1652460582837, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 521, + "versionNonce": 1895931948, + "isDeleted": false, + "id": "BawcP8SgldqVfO4MEwxKZ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 396.61840277777765, + "y": 1013.5, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 37.42083333333335, + "height": 60.75084554678695, + "seed": 1892392779, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460438687, + "link": null, + "locked": false, + "status": "saved", + "fileId": "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 343, + "versionNonce": 1367918740, + "isDeleted": false, + "id": "aeFLYYiDEiobVoUWJkufD", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 420, + "y": 848.7499999999999, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 104, + "height": 108, + "seed": 2071509291, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652460438687, + "link": null, + "locked": false, + "fontSize": 28.500000000000032, + "fontFamily": 1, + "text": "Kafka\nTopic\n(github)", + "baseline": 97, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Kafka\nTopic\n(github)" + }, + { + "type": "rectangle", + "version": 968, + "versionNonce": 354049580, + "isDeleted": false, + "id": "fTTGbxiaLOJbMhRhUsc4v", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1109.5, + "y": 798, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 215, + "height": 306, + "seed": 1345975444, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "IUs6Kr5j_CgrMHavwSWab" + }, + { + "id": "0IqXaCVB97fUCwQlxDYn8", + "type": "arrow" + }, + { + "id": "XtxP2K6AUmA8yxdc-7ttT", + "type": "arrow" + } + ], + "updated": 1652460413189, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 254, + "versionNonce": 652405396, + "isDeleted": false, + "id": "IUs6Kr5j_CgrMHavwSWab", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1114.5, + "y": 916, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 205, + "height": 70, + "seed": 617182356, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652460413189, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Materialized \nView", + "baseline": 60, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "fTTGbxiaLOJbMhRhUsc4v", + "originalText": "Materialized View" + }, + { + "type": "image", + "version": 770, + "versionNonce": 2137439276, + "isDeleted": false, + "id": "xUOJ_PvsPr3ef2_P8dO_l", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1131.6291629162915, + "y": 1041, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1010175947, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460405919, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 824, + "versionNonce": 829597740, + "isDeleted": false, + "id": "DQhN188gSYbb8QNCNO-ur", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1480.5, + "y": 927.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 193, + "height": 70, + "seed": 1144070700, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652460395640, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "MergeTree \nfamily table", + "baseline": 60, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "RjSTnPTzFEcCQwfgRryLR", + "originalText": "MergeTree family table" + }, + { + "type": "rectangle", + "version": 1360, + "versionNonce": 1234027284, + "isDeleted": false, + "id": "RjSTnPTzFEcCQwfgRryLR", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1475.5, + "y": 810, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 203, + "height": 305, + "seed": 378158636, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "DQhN188gSYbb8QNCNO-ur" + }, + { + "id": "0IqXaCVB97fUCwQlxDYn8", + "type": "arrow" + }, + { + "id": "0CozKSjnZtY-uQsjp7TAa", + "type": "arrow" + } + ], + "updated": 1652460395640, + "link": null, + "locked": false, + "fontSize": 26.280792193787637, + "baseline": 350.9999999999999 + }, + { + "type": "image", + "version": 1145, + "versionNonce": 947799572, + "isDeleted": false, + "id": "mHwVKgVtq-QNgT610tzXi", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1495.6291629162915, + "y": 1054, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1030718757, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460387151, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "arrow", + "version": 2558, + "versionNonce": 1039248660, + "isDeleted": false, + "id": "0IqXaCVB97fUCwQlxDYn8", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1471.4366941211092, + "y": 963.7977243135721, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 145.9366941211092, + "height": 1.9431502892945218, + "seed": 2125579948, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460413189, + "link": null, + "locked": false, + "startBinding": { + "elementId": "RjSTnPTzFEcCQwfgRryLR", + "gap": 4.063305878890787, + "focus": -0.017801345344272513 + }, + "endBinding": { + "elementId": "fTTGbxiaLOJbMhRhUsc4v", + "gap": 1, + "focus": 0.0639631242434834 + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -145.9366941211092, + -1.9431502892945218 + ] + ] + }, + { + "type": "arrow", + "version": 3665, + "versionNonce": 1826298132, + "isDeleted": false, + "id": "0CozKSjnZtY-uQsjp7TAa", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1595.5129981322245, + "y": 1125.5684007913123, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 222.32892493558256, + "height": 121.75343195272853, + "seed": 735765420, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460510794, + "link": null, + "locked": false, + "startBinding": { + "elementId": "RjSTnPTzFEcCQwfgRryLR", + "gap": 10.568400791312115, + "focus": -0.8313797330069356 + }, + "endBinding": { + "elementId": "VtcX1BJjwsOGzM0IvQqzO", + "gap": 2.6840731966419753, + "focus": -0.08099668900567501 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -222.32892493558256, + 121.75343195272853 + ] + ] + }, + { + "type": "arrow", + "version": 1651, + "versionNonce": 455902484, + "isDeleted": false, + "id": "fnewN-MLbbnm7F-0VOy8F", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 586.5422455342772, + "y": 964.6509936995194, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 190.97078732954185, + "height": 2.323802059964578, + "seed": 1459117844, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460575675, + "link": null, + "locked": false, + "startBinding": { + "elementId": "OpHRgAlXBOkspHa9237pK", + "focus": 0.12719275448043063, + "gap": 6.5422455342771855 + }, + "endBinding": { + "elementId": "w3o5tB4I0DAoE2Z_8IKNs", + "focus": -0.08503908527857361, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 190.97078732954185, + -2.323802059964578 + ] + ] + }, + { + "type": "text", + "version": 42, + "versionNonce": 1867358996, + "isDeleted": false, + "id": "cqZdtZeI6DgfZ0mE1UVDj", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 590.5, + "y": 900, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 183, + "height": 35, + "seed": 96965804, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": null, + "updated": 1652460380446, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "(2) messages", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "(2) messages" + }, + { + "type": "text", + "version": 87, + "versionNonce": 33250092, + "isDeleted": false, + "id": "PPMZXqupvG_AFJpkJkyTs", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 993.5, + "y": 893, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 116, + "height": 70, + "seed": 1424642220, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652460600846, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "(3) read\nrows", + "baseline": 60, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "(3) read\nrows" + }, + { + "type": "text", + "version": 63, + "versionNonce": 407470892, + "isDeleted": false, + "id": "DycObbWQ7GIFaHs1NENKr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1332.5, + "y": 867, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 131, + "height": 70, + "seed": 1772574612, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652460605666, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "(4) insert\nrows", + "baseline": 60, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "(4) insert\nrows" + }, + { + "type": "text", + "version": 632, + "versionNonce": 891215660, + "isDeleted": false, + "id": "F1AWugVwb8emy-O_UUz7p", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 214, + "y": 843.7283930191138, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 142, + "height": 70, + "seed": 399215788, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652460556676, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "(1) Insert\n messages", + "baseline": 60, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "(1) Insert\n messages" + }, + { + "type": "arrow", + "version": 2726, + "versionNonce": 1126638868, + "isDeleted": false, + "id": "20AgrF3HvHf7UeyROfh63", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 231.47673829484896, + "y": 943.6052132454781, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 140.833858347953, + "height": 5.315910734403133, + "seed": 1174529044, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460553074, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "OpHRgAlXBOkspHa9237pK", + "focus": 0.08336612785291998, + "gap": 1.6894033571980458 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 140.833858347953, + -5.315910734403133 + ] + ] + }, + { + "type": "rectangle", + "version": 1992, + "versionNonce": 904332076, + "isDeleted": false, + "id": "6hrZ8Lxc1IkAujP2-UOiE", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 784.5, + "y": 1191, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 204, + "height": 265, + "seed": 1390883244, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "id": "k1iyxZ_8w-N2G2s3vA0QL", + "type": "text" + }, + { + "id": "dgu7t4SGC1_vz6zFKXgqT", + "type": "arrow" + }, + { + "type": "text", + "id": "k1iyxZ_8w-N2G2s3vA0QL" + }, + { + "id": "wlxapT8t7hjX8nTBYrMKs", + "type": "arrow" + } + ], + "updated": 1652460510794, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1347, + "versionNonce": 2056209172, + "isDeleted": false, + "id": "k1iyxZ_8w-N2G2s3vA0QL", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 789.5, + "y": 1288.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 194, + "height": 70, + "seed": 396300052, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652460510794, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Kafka Table \nEngine", + "baseline": 60, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "6hrZ8Lxc1IkAujP2-UOiE", + "originalText": "Kafka Table Engine" + }, + { + "type": "image", + "version": 1749, + "versionNonce": 726214700, + "isDeleted": false, + "id": "n9YlHz9gqfbSWi7lSMwv6", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 798.6291629162915, + "y": 1400, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 15473708, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460510794, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 1628, + "versionNonce": 1734197396, + "isDeleted": false, + "id": "jb4EQeDdqJ3eIcsJHTGnc", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 378, + "y": 1184.5, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 206, + "height": 265.99999999999994, + "seed": 1754533012, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "zXkcojDwCzWlWnSDKS0c3", + "type": "arrow" + }, + { + "id": "dgu7t4SGC1_vz6zFKXgqT", + "type": "arrow" + } + ], + "updated": 1652460510794, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 1630, + "versionNonce": 382419628, + "isDeleted": false, + "id": "xEoHwdvH0P_uYns_Ms3Oq", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 400.61840277777765, + "y": 1369, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 37.42083333333335, + "height": 60.75084554678695, + "seed": 602912428, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460510794, + "link": null, + "locked": false, + "status": "saved", + "fileId": "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 1485, + "versionNonce": 8424980, + "isDeleted": false, + "id": "MIxwP1DPYMwHsQgVazdsX", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 396, + "y": 1204.25, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 175, + "height": 108, + "seed": 487414292, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "dgu7t4SGC1_vz6zFKXgqT", + "type": "arrow" + } + ], + "updated": 1652460510794, + "link": null, + "locked": false, + "fontSize": 28.500000000000032, + "fontFamily": 1, + "text": "Kafka\nTopic\n(github_out)", + "baseline": 97, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Kafka\nTopic\n(github_out)" + }, + { + "type": "rectangle", + "version": 2148, + "versionNonce": 1458416532, + "isDeleted": false, + "id": "VtcX1BJjwsOGzM0IvQqzO", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1155.5, + "y": 1192.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 215, + "height": 261, + "seed": 1448803244, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "id": "-6G9aET6IBY_stKpoxVD7", + "type": "text" + }, + { + "id": "CrtJtOfS32z5l1W2UQfaP", + "type": "arrow" + }, + { + "type": "text", + "id": "-6G9aET6IBY_stKpoxVD7" + }, + { + "id": "0CozKSjnZtY-uQsjp7TAa", + "type": "arrow" + }, + { + "id": "wlxapT8t7hjX8nTBYrMKs", + "type": "arrow" + } + ], + "updated": 1652460510794, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1430, + "versionNonce": 230610580, + "isDeleted": false, + "id": "-6G9aET6IBY_stKpoxVD7", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1160.5, + "y": 1288, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 205, + "height": 70, + "seed": 228910356, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652460510794, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Materialized \nView", + "baseline": 60, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "VtcX1BJjwsOGzM0IvQqzO", + "originalText": "Materialized View" + }, + { + "type": "image", + "version": 1877, + "versionNonce": 1395559596, + "isDeleted": false, + "id": "w1F0_rc6Oz2UmAQRAHPlJ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1177.6291629162915, + "y": 1390.5, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 928425516, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460510794, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "arrow", + "version": 4947, + "versionNonce": 589450924, + "isDeleted": false, + "id": "dgu7t4SGC1_vz6zFKXgqT", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 591.007128303637, + "y": 1329.819177277539, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 189.52804472557273, + "height": 2.7145468799994887, + "seed": 521124628, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460540565, + "link": null, + "locked": false, + "startBinding": { + "elementId": "MIxwP1DPYMwHsQgVazdsX", + "focus": 1.3231617705533951, + "gap": 20.007128303637046 + }, + "endBinding": { + "elementId": "6hrZ8Lxc1IkAujP2-UOiE", + "focus": -0.015578660553000877, + "gap": 3.9648269707902273 + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 189.52804472557273, + -2.7145468799994887 + ] + ] + }, + { + "type": "text", + "version": 1150, + "versionNonce": 1435506476, + "isDeleted": false, + "id": "pREuftuG5AnRKp6e3-fvJ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 615.5, + "y": 1228.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 128, + "height": 70, + "seed": 353319060, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652460510794, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "(7) insert\nmessages", + "baseline": 60, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "(7) insert\nmessages" + }, + { + "type": "text", + "version": 1194, + "versionNonce": 1408603156, + "isDeleted": false, + "id": "WmVT-x9q2H7XouyFThDry", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1009.5, + "y": 1241.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 131, + "height": 70, + "seed": 1896696492, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652460525154, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "(6) insert\nrows", + "baseline": 60, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "(6) insert\nrows" + }, + { + "id": "1WeLblNsCSvF3GRcE7reh", + "type": "text", + "x": 1445.25, + "y": 1213.364196509557, + "width": 184, + "height": 70, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1282224276, + "version": 105, + "versionNonce": 1991606932, + "isDeleted": false, + "boundElements": null, + "updated": 1652460610106, + "link": null, + "locked": false, + "text": "(5) trigger on\n insert", + "fontSize": 28, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 60, + "containerId": null, + "originalText": "(5) trigger on\n insert" + }, + { + "type": "arrow", + "version": 5205, + "versionNonce": 1721554604, + "isDeleted": false, + "id": "wlxapT8t7hjX8nTBYrMKs", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 994.7646063352292, + "y": 1333.6314390588707, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 159.73539366477075, + "height": 1.9453894833075083, + "seed": 642100396, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460510813, + "link": null, + "locked": false, + "startBinding": { + "elementId": "6hrZ8Lxc1IkAujP2-UOiE", + "focus": 0.06589468890984199, + "gap": 6.264606335229246 + }, + "endBinding": { + "elementId": "VtcX1BJjwsOGzM0IvQqzO", + "focus": -0.1054420222882615, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 159.73539366477075, + 1.9453894833075083 + ] + ] + }, + { + "type": "arrow", + "version": 1817, + "versionNonce": 1397390228, + "isDeleted": false, + "id": "z5NUzY_cWtaUODVlgPgjz", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 982.7646063352291, + "y": 978.0260975395391, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 129.64692341642296, + "height": 4.110324198034277, + "seed": 1603864108, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652460596744, + "link": null, + "locked": false, + "startBinding": { + "elementId": "w3o5tB4I0DAoE2Z_8IKNs", + "focus": 0.17198514904952156, + "gap": 1 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 129.64692341642296, + 4.110324198034277 + ] + ] + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": { + "6a7ab914e457c49e24cbce1b5454bd1d4dcce288": { + "mimeType": "image/svg+xml", + "id": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "dataURL": "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIyMjIiIHZpZXdCb3g9IjAgMCA5IDgiIHdpZHRoPSIyNTAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0wIDdoMXYxaC0xeiIgZmlsbD0iI2YwMCIvPjxwYXRoIGQ9Im0wIDBoMXY3aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDMuMjVoMXYxLjVoLTF6IiBmaWxsPSIjZmMwIi8+PC9zdmc+", + "created": 1648219958285 + }, + "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96": { + "mimeType": "image/png", + "id": "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96", + "dataURL": "data:image/png;base64,iVBORw0KGgoAAAANSU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izi94m8T+MM/7y0ZKqO9/GmQOknWQlvPWn9jfx8VAFcI49hkjYBKvHEXJJCJuO0Jy5Bf4uSApumv0/zBh81eCNConGC/j5BYnRsGUXAmQhl3jiDxKu5fft25l1c0pi9PyMwQhAAARAAARAAARBwngDEnfPM0WJuELC/W/v7ji0WQasWRCSwRCaw9rG3bSW0F/d5X/1HSYKVUMU1IAACIAACIAACILDGBP4/bQx+6hrMsYMAAAAASUVORK5CYII=", + "created": 1648219881114 + } + } +} \ No newline at end of file diff --git a/docs/ja/integrations/data-ingestion/kafka/images/kafka_03.png b/docs/ja/integrations/data-ingestion/kafka/images/kafka_03.png new file mode 100644 index 00000000000..4d2c2cfd31a Binary files /dev/null and b/docs/ja/integrations/data-ingestion/kafka/images/kafka_03.png differ diff --git a/docs/ja/integrations/data-ingestion/kafka/images/kafka_04.excalidraw b/docs/ja/integrations/data-ingestion/kafka/images/kafka_04.excalidraw new file mode 100644 index 00000000000..34deb7a6532 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/kafka/images/kafka_04.excalidraw @@ -0,0 +1,2384 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 410, + "versionNonce": 1606949524, + "isDeleted": false, + "id": "OpHRgAlXBOkspHa9237pK", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 645, + "y": 397, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 560, + "height": 203, + "seed": 1180344869, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458539756, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 491, + "versionNonce": 1603764372, + "isDeleted": false, + "id": "BawcP8SgldqVfO4MEwxKZ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 654.6184027777776, + "y": 407.5, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 37.42083333333335, + "height": 60.75084554678695, + "seed": 1892392779, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "status": "saved", + "fileId": "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96", + "scale": [ + 1, + 1 + ] + }, + { + "type": "image", + "version": 569, + "versionNonce": 671974060, + "isDeleted": false, + "id": "5wdzcM6SoclCftewiStkr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 412.62916291629165, + "y": 1044.5, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1527032971, + "groupIds": [ + "oihEWuXq_eCQqfBeqPNXn" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 722, + "versionNonce": 1266830868, + "isDeleted": false, + "id": "w3o5tB4I0DAoE2Z_8IKNs", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 398.5, + "y": 706.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 299, + "height": 394.0000000000001, + "seed": 970209765, + "groupIds": [ + "oihEWuXq_eCQqfBeqPNXn" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 688, + "versionNonce": 1595952428, + "isDeleted": false, + "id": "yQt730wUg7Jm8prLoV0E4", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 444.5, + "y": 730.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 190.00000000000003, + "height": 89.99999999999999, + "seed": 554015205, + "groupIds": [ + "oihEWuXq_eCQqfBeqPNXn" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "I1HdsARxC3Fg0QwmFP7e_" + }, + { + "id": "S5iZiJVKGX3m4Jxzm3sW1", + "type": "arrow" + }, + { + "id": "yNYMjvDf-J0CBK_4SAyJq", + "type": "arrow" + }, + { + "id": "dqp4aHQM2LJ8LFkHyQVug", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 728, + "versionNonce": 1538747284, + "isDeleted": false, + "id": "no4hhjrIRjKPwEb_SIdv3", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 447, + "y": 833, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 190.00000000000003, + "height": 89.99999999999999, + "seed": 695150059, + "groupIds": [ + "oihEWuXq_eCQqfBeqPNXn" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "type": "text", + "id": "bbHzLDczYqvtwX1DL-R5S" + }, + { + "id": "dqp4aHQM2LJ8LFkHyQVug", + "type": "arrow" + }, + { + "id": "bsNl3So8xnScud4e0q3gT", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 743, + "versionNonce": 1853212588, + "isDeleted": false, + "id": "s7dSLvint5sJvavB_FVTn", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 449, + "y": 938, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 190.00000000000003, + "height": 89.99999999999999, + "seed": 1620350539, + "groupIds": [ + "oihEWuXq_eCQqfBeqPNXn" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "id": "bsNl3So8xnScud4e0q3gT", + "type": "arrow" + }, + { + "id": "_l-d0XevHle03pX6piCdU", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 389, + "versionNonce": 845994260, + "isDeleted": false, + "id": "I1HdsARxC3Fg0QwmFP7e_", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 449.5, + "y": 765, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 180, + "height": 21, + "seed": 1933919371, + "groupIds": [ + "oihEWuXq_eCQqfBeqPNXn" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "Kafka Table Engine", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "yQt730wUg7Jm8prLoV0E4", + "originalText": "Kafka Table Engine" + }, + { + "type": "text", + "version": 387, + "versionNonce": 439874092, + "isDeleted": false, + "id": "bbHzLDczYqvtwX1DL-R5S", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 452, + "y": 867.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 180, + "height": 21, + "seed": 1488694821, + "groupIds": [ + "oihEWuXq_eCQqfBeqPNXn" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "Materialized View", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "no4hhjrIRjKPwEb_SIdv3", + "originalText": "Materialized View" + }, + { + "type": "text", + "version": 455, + "versionNonce": 991467156, + "isDeleted": false, + "id": "eFshv2EPB1O6JDPdNKtb5", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 495, + "y": 955.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 98, + "height": 63, + "seed": 21572139, + "groupIds": [ + "oihEWuXq_eCQqfBeqPNXn" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "Replicated\nMerge Tree \n", + "baseline": 57, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Replicated\nMerge Tree \n" + }, + { + "type": "text", + "version": 304, + "versionNonce": 40936468, + "isDeleted": false, + "id": "aeFLYYiDEiobVoUWJkufD", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 865, + "y": 448, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 120, + "height": 52, + "seed": 2071509291, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "Kafka Topic\n", + "baseline": 44, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Kafka Topic\n" + }, + { + "type": "rectangle", + "version": 62, + "versionNonce": 359290668, + "isDeleted": false, + "id": "6kWQPOWnbWeeWakZ-aoHJ", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 663, + "y": 562, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 36, + "height": 24, + "seed": 1295853643, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "S5iZiJVKGX3m4Jxzm3sW1", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 107, + "versionNonce": 241893780, + "isDeleted": false, + "id": "hBSwH5KkpMp4AZuOon4qJ", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 714, + "y": 563, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 36, + "height": 24, + "seed": 960398469, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "yNYMjvDf-J0CBK_4SAyJq", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 151, + "versionNonce": 586060204, + "isDeleted": false, + "id": "SLQgImQNj2b86-9I3Z10u", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 880, + "y": 565, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 36, + "height": 24, + "seed": 1962219307, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "H1KleDze5j-giRfLVU-ly", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 183, + "versionNonce": 910012180, + "isDeleted": false, + "id": "lK29vU6mpWmEzPz8ut4fk", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 931, + "y": 566, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 36, + "height": 24, + "seed": 689582213, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "vHObq0tLqdKgChmGZY1e4", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 190, + "versionNonce": 419920940, + "isDeleted": false, + "id": "pF3Aoc6O1u0CmRgF4Exsv", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1085, + "y": 565, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 36, + "height": 24, + "seed": 639862923, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 224, + "versionNonce": 2053024916, + "isDeleted": false, + "id": "Cbu4Qs9Hw9NcJzecuNVnZ", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1135, + "y": 565, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 36, + "height": 24, + "seed": 15583237, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "yOeYgKv0-55ugVRrvTZbF", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 116, + "versionNonce": 1637815980, + "isDeleted": false, + "id": "4HpPg65wWidd2ra-SuNxk", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1230, + "y": 435, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 36, + "height": 24, + "seed": 1332885227, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 217, + "versionNonce": 1552153108, + "isDeleted": false, + "id": "6olbLzrgL1MA0e-Mk_Sno", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1276, + "y": 436, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 85, + "height": 26, + "seed": 1581616747, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "partition", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "partition" + }, + { + "type": "arrow", + "version": 1099, + "versionNonce": 425681196, + "isDeleted": false, + "id": "S5iZiJVKGX3m4Jxzm3sW1", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 688, + "y": 587, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 152, + "height": 138, + "seed": 2110100235, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "6kWQPOWnbWeeWakZ-aoHJ", + "focus": -0.6829155060352831, + "gap": 1 + }, + "endBinding": { + "elementId": "yQt730wUg7Jm8prLoV0E4", + "focus": -0.40897243107769427, + "gap": 5.5 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -152, + 138 + ] + ] + }, + { + "type": "arrow", + "version": 679, + "versionNonce": 933468052, + "isDeleted": false, + "id": "yNYMjvDf-J0CBK_4SAyJq", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 739, + "y": 591, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 157, + "height": 134, + "seed": 594821957, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "hBSwH5KkpMp4AZuOon4qJ", + "focus": -0.8030726256983242, + "gap": 4 + }, + "endBinding": { + "elementId": "yQt730wUg7Jm8prLoV0E4", + "focus": -0.11283152311189693, + "gap": 5.5 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -157, + 134 + ] + ] + }, + { + "type": "arrow", + "version": 917, + "versionNonce": 934435756, + "isDeleted": false, + "id": "dqp4aHQM2LJ8LFkHyQVug", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 536, + "y": 818, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 0, + "height": 14, + "seed": 832282699, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "no4hhjrIRjKPwEb_SIdv3", + "focus": 0.0631578947368421, + "gap": 15 + }, + "endBinding": { + "elementId": "yQt730wUg7Jm8prLoV0E4", + "focus": -0.03684210526315789, + "gap": 11.5 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 0, + 14 + ] + ] + }, + { + "type": "arrow", + "version": 922, + "versionNonce": 401835284, + "isDeleted": false, + "id": "bsNl3So8xnScud4e0q3gT", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 536, + "y": 924, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 1, + "height": 14, + "seed": 914334411, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "s7dSLvint5sJvavB_FVTn", + "focus": 0.12436363636363634, + "gap": 14 + }, + "endBinding": { + "elementId": "no4hhjrIRjKPwEb_SIdv3", + "focus": -0.027636363636363633, + "gap": 15 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1, + 14 + ] + ] + }, + { + "type": "image", + "version": 653, + "versionNonce": 918685228, + "isDeleted": false, + "id": "xUOJ_PvsPr3ef2_P8dO_l", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 805.6291629162915, + "y": 1045, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1010175947, + "groupIds": [ + "p8D-qlcPz9Jt6CGm3Hykj" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 799, + "versionNonce": 317309588, + "isDeleted": false, + "id": "fTTGbxiaLOJbMhRhUsc4v", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 791.5, + "y": 707, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 299, + "height": 394.0000000000001, + "seed": 1439426149, + "groupIds": [ + "p8D-qlcPz9Jt6CGm3Hykj" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 739, + "versionNonce": 997744812, + "isDeleted": false, + "id": "TdP4oWRlEc-9pLfHaDcgV", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 837.5, + "y": 731, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 190.00000000000003, + "height": 89.99999999999999, + "seed": 706207339, + "groupIds": [ + "p8D-qlcPz9Jt6CGm3Hykj" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "id": "GofrK5Hib8jBiHa3Owk54", + "type": "text" + }, + { + "id": "S5iZiJVKGX3m4Jxzm3sW1", + "type": "arrow" + }, + { + "id": "yNYMjvDf-J0CBK_4SAyJq", + "type": "arrow" + }, + { + "type": "text", + "id": "GofrK5Hib8jBiHa3Owk54" + }, + { + "id": "Z_UeBHZwQ5H4kXzc0nY8W", + "type": "arrow" + }, + { + "id": "H1KleDze5j-giRfLVU-ly", + "type": "arrow" + }, + { + "id": "vHObq0tLqdKgChmGZY1e4", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 780, + "versionNonce": 524046356, + "isDeleted": false, + "id": "YMjqZ7fDrBGho7Y5hVDRZ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 840, + "y": 833.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 190.00000000000003, + "height": 89.99999999999999, + "seed": 179032517, + "groupIds": [ + "p8D-qlcPz9Jt6CGm3Hykj" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "id": "w6pNx7-pQfFpnmLxrrAYA", + "type": "text" + }, + { + "id": "Z_UeBHZwQ5H4kXzc0nY8W", + "type": "arrow" + }, + { + "type": "text", + "id": "w6pNx7-pQfFpnmLxrrAYA" + }, + { + "id": "5QiNVNtXFF14U-aj2fOgo", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 794, + "versionNonce": 1031760684, + "isDeleted": false, + "id": "-wJsaOPL1Fd19lt_0PbzL", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 842, + "y": 938.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 190.00000000000003, + "height": 89.99999999999999, + "seed": 604428555, + "groupIds": [ + "p8D-qlcPz9Jt6CGm3Hykj" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "id": "5QiNVNtXFF14U-aj2fOgo", + "type": "arrow" + }, + { + "id": "_l-d0XevHle03pX6piCdU", + "type": "arrow" + }, + { + "id": "XtxP2K6AUmA8yxdc-7ttT", + "type": "arrow" + }, + { + "id": "ej-I5ud4HGqwa2-L9SDby", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 437, + "versionNonce": 1826696596, + "isDeleted": false, + "id": "GofrK5Hib8jBiHa3Owk54", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 842.5, + "y": 765.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 180, + "height": 21, + "seed": 657936677, + "groupIds": [ + "p8D-qlcPz9Jt6CGm3Hykj" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "Kafka Table Engine", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "TdP4oWRlEc-9pLfHaDcgV", + "originalText": "Kafka Table Engine" + }, + { + "type": "text", + "version": 441, + "versionNonce": 792798636, + "isDeleted": false, + "id": "w6pNx7-pQfFpnmLxrrAYA", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 845, + "y": 868, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 180, + "height": 21, + "seed": 125665195, + "groupIds": [ + "p8D-qlcPz9Jt6CGm3Hykj" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "Materialized View", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "YMjqZ7fDrBGho7Y5hVDRZ", + "originalText": "Materialized View" + }, + { + "type": "text", + "version": 503, + "versionNonce": 1024350996, + "isDeleted": false, + "id": "HE2GVgZnlQRR5zx3gsWdp", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 888, + "y": 956, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 98, + "height": 63, + "seed": 1490805893, + "groupIds": [ + "p8D-qlcPz9Jt6CGm3Hykj" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "Replicated\nMerge Tree \n", + "baseline": 57, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Replicated\nMerge Tree \n" + }, + { + "type": "arrow", + "version": 1066, + "versionNonce": 635932716, + "isDeleted": false, + "id": "Z_UeBHZwQ5H4kXzc0nY8W", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 929, + "y": 818.5, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 0, + "height": 14, + "seed": 514216523, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "YMjqZ7fDrBGho7Y5hVDRZ", + "focus": 0.0631578947368421, + "gap": 15 + }, + "endBinding": { + "elementId": "TdP4oWRlEc-9pLfHaDcgV", + "focus": -0.03684210526315789, + "gap": 11.5 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 0, + 14 + ] + ] + }, + { + "type": "arrow", + "version": 1070, + "versionNonce": 976869524, + "isDeleted": false, + "id": "5QiNVNtXFF14U-aj2fOgo", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 929, + "y": 924.5, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 1, + "height": 14, + "seed": 1129778149, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "-wJsaOPL1Fd19lt_0PbzL", + "focus": 0.12436363636363634, + "gap": 14 + }, + "endBinding": { + "elementId": "YMjqZ7fDrBGho7Y5hVDRZ", + "focus": -0.027636363636363633, + "gap": 15 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1, + 14 + ] + ] + }, + { + "type": "image", + "version": 780, + "versionNonce": 22850220, + "isDeleted": false, + "id": "mHwVKgVtq-QNgT610tzXi", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1195.6291629162915, + "y": 1042, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 50.74167416741681, + "height": 45.09920000000007, + "seed": 1030718757, + "groupIds": [ + "U6eS78sTSSn0o38G1hVr7" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "status": "saved", + "fileId": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "scale": [ + 1, + 1 + ] + }, + { + "type": "rectangle", + "version": 962, + "versionNonce": 1343858196, + "isDeleted": false, + "id": "RjSTnPTzFEcCQwfgRryLR", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1181.5, + "y": 704, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 299, + "height": 394.0000000000001, + "seed": 923962283, + "groupIds": [ + "U6eS78sTSSn0o38G1hVr7" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 729, + "versionNonce": 340423980, + "isDeleted": false, + "id": "4Sf2JJTKTIv4fXMhyftIK", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1227.5, + "y": 728, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 190.00000000000003, + "height": 89.99999999999999, + "seed": 1642961029, + "groupIds": [ + "U6eS78sTSSn0o38G1hVr7" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "id": "nS45VyL5gQgr4yEFQKF1O", + "type": "text" + }, + { + "id": "S5iZiJVKGX3m4Jxzm3sW1", + "type": "arrow" + }, + { + "id": "yNYMjvDf-J0CBK_4SAyJq", + "type": "arrow" + }, + { + "type": "text", + "id": "nS45VyL5gQgr4yEFQKF1O" + }, + { + "id": "U6eE3bs8s0eDq1lmlfqFA", + "type": "arrow" + }, + { + "id": "qr6MKD1-7_7vReZvNxdKb", + "type": "arrow" + }, + { + "id": "yOeYgKv0-55ugVRrvTZbF", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 768, + "versionNonce": 61064084, + "isDeleted": false, + "id": "nDwemTlbCnE6JVk1juOuX", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1230, + "y": 830.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 190.00000000000003, + "height": 89.99999999999999, + "seed": 800710219, + "groupIds": [ + "U6eS78sTSSn0o38G1hVr7" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "id": "Z0vWSwzkszboISa94ozDk", + "type": "text" + }, + { + "id": "U6eE3bs8s0eDq1lmlfqFA", + "type": "arrow" + }, + { + "type": "text", + "id": "Z0vWSwzkszboISa94ozDk" + }, + { + "id": "SjiA7FvjQPxrv-qfmRHWQ", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 782, + "versionNonce": 1276833708, + "isDeleted": false, + "id": "en2eREDEBckio9tpltvw4", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1232, + "y": 935.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 190.00000000000003, + "height": 89.99999999999999, + "seed": 672284645, + "groupIds": [ + "U6eS78sTSSn0o38G1hVr7" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "VmaWWRKBGZIpvSBPgiLg7", + "type": "arrow" + }, + { + "id": "Sxgek1GT7gVMM_dga8BOX", + "type": "arrow" + }, + { + "id": "pBM9wdru5a8pA3ErwiEVN", + "type": "arrow" + }, + { + "id": "czegUU8fG-rLrZaA50yq5", + "type": "arrow" + }, + { + "id": "V--avbs4_p6yFKQAQjIU4", + "type": "arrow" + }, + { + "id": "nixiZJMbyCAz_mgPpJLNo", + "type": "arrow" + }, + { + "id": "YvGcMZo4sI_GeyjPUVvwa", + "type": "arrow" + }, + { + "id": "SjiA7FvjQPxrv-qfmRHWQ", + "type": "arrow" + }, + { + "id": "0IqXaCVB97fUCwQlxDYn8", + "type": "arrow" + } + ], + "updated": 1652458511555, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 426, + "versionNonce": 1259221268, + "isDeleted": false, + "id": "nS45VyL5gQgr4yEFQKF1O", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1232.5, + "y": 762.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 180, + "height": 21, + "seed": 1226693867, + "groupIds": [ + "U6eS78sTSSn0o38G1hVr7" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "Kafka Table Engine", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "4Sf2JJTKTIv4fXMhyftIK", + "originalText": "Kafka Table Engine" + }, + { + "type": "text", + "version": 425, + "versionNonce": 1492654636, + "isDeleted": false, + "id": "Z0vWSwzkszboISa94ozDk", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1235, + "y": 865, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 180, + "height": 21, + "seed": 1173027653, + "groupIds": [ + "U6eS78sTSSn0o38G1hVr7" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "Materialized View", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "nDwemTlbCnE6JVk1juOuX", + "originalText": "Materialized View" + }, + { + "type": "text", + "version": 492, + "versionNonce": 1708060308, + "isDeleted": false, + "id": "C91KrmcNBK1wntk4LkBCb", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1278, + "y": 953, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 98, + "height": 63, + "seed": 516491147, + "groupIds": [ + "U6eS78sTSSn0o38G1hVr7" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 1, + "text": "Replicated\nMerge Tree \n", + "baseline": 57, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Replicated\nMerge Tree \n" + }, + { + "type": "arrow", + "version": 1020, + "versionNonce": 1439429804, + "isDeleted": false, + "id": "U6eE3bs8s0eDq1lmlfqFA", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1319, + "y": 815.5, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 0, + "height": 14, + "seed": 1406487205, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "nDwemTlbCnE6JVk1juOuX", + "focus": 0.0631578947368421, + "gap": 15 + }, + "endBinding": { + "elementId": "4Sf2JJTKTIv4fXMhyftIK", + "focus": -0.03684210526315789, + "gap": 11.5 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 0, + 14 + ] + ] + }, + { + "type": "arrow", + "version": 1024, + "versionNonce": 882637844, + "isDeleted": false, + "id": "SjiA7FvjQPxrv-qfmRHWQ", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1319, + "y": 921.5, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 1, + "height": 14, + "seed": 1995824683, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "en2eREDEBckio9tpltvw4", + "focus": 0.12436363636363634, + "gap": 14 + }, + "endBinding": { + "elementId": "nDwemTlbCnE6JVk1juOuX", + "focus": -0.027636363636363633, + "gap": 15 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1, + 14 + ] + ] + }, + { + "type": "arrow", + "version": 707, + "versionNonce": 1883275052, + "isDeleted": false, + "id": "H1KleDze5j-giRfLVU-ly", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 896.6471822090416, + "y": 594, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 0.8984692097415063, + "height": 131, + "seed": 206213061, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "SLQgImQNj2b86-9I3Z10u", + "focus": 0.06836643444191433, + "gap": 5 + }, + "endBinding": { + "elementId": "TdP4oWRlEc-9pLfHaDcgV", + "focus": -0.3892729439809281, + "gap": 6 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.8984692097415063, + 131 + ] + ] + }, + { + "type": "arrow", + "version": 723, + "versionNonce": 292247956, + "isDeleted": false, + "id": "vHObq0tLqdKgChmGZY1e4", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 949.6763431306226, + "y": 593, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 0.9822442535212303, + "height": 131.00000000000023, + "seed": 40415301, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "lK29vU6mpWmEzPz8ut4fk", + "focus": -0.031170433654243393, + "gap": 3 + }, + "endBinding": { + "elementId": "TdP4oWRlEc-9pLfHaDcgV", + "focus": 0.19455621301774917, + "gap": 6.999999999999773 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 0.9822442535212303, + 131.00000000000023 + ] + ] + }, + { + "type": "arrow", + "version": 368, + "versionNonce": 281000364, + "isDeleted": false, + "id": "qr6MKD1-7_7vReZvNxdKb", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1111, + "y": 587, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 153, + "height": 141, + "seed": 34914181, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "4Sf2JJTKTIv4fXMhyftIK", + "focus": -0.06723372781065089, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 153, + 141 + ] + ] + }, + { + "type": "arrow", + "version": 672, + "versionNonce": 661849876, + "isDeleted": false, + "id": "yOeYgKv0-55ugVRrvTZbF", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1165, + "y": 589, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 153, + "height": 138, + "seed": 647723019, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "Cbu4Qs9Hw9NcJzecuNVnZ", + "focus": 0.04166666666666667, + "gap": 1 + }, + "endBinding": { + "elementId": "4Sf2JJTKTIv4fXMhyftIK", + "focus": 0.3209302325581395, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 153, + 138 + ] + ] + }, + { + "type": "arrow", + "version": 979, + "versionNonce": 41133100, + "isDeleted": false, + "id": "_l-d0XevHle03pX6piCdU", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 644, + "y": 976, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 197, + "height": 2, + "seed": 1796874123, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "s7dSLvint5sJvavB_FVTn", + "focus": -0.1302043070127002, + "gap": 5 + }, + "endBinding": { + "elementId": "-wJsaOPL1Fd19lt_0PbzL", + "focus": 0.2278851463279956, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 197, + -2 + ] + ] + }, + { + "type": "arrow", + "version": 915, + "versionNonce": 1260979348, + "isDeleted": false, + "id": "XtxP2K6AUmA8yxdc-7ttT", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 837, + "y": 977, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 199, + "height": 1, + "seed": 643942629, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "-wJsaOPL1Fd19lt_0PbzL", + "focus": 0.13187845303867404, + "gap": 5 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -199, + -1 + ] + ] + }, + { + "type": "arrow", + "version": 702, + "versionNonce": 457588396, + "isDeleted": false, + "id": "ej-I5ud4HGqwa2-L9SDby", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1036.5, + "y": 980.5, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 197, + "height": 2, + "seed": 1342950315, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "-wJsaOPL1Fd19lt_0PbzL", + "focus": -0.04329099944781889, + "gap": 4.5 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 197, + -2 + ] + ] + }, + { + "type": "arrow", + "version": 1368, + "versionNonce": 1380143636, + "isDeleted": false, + "id": "0IqXaCVB97fUCwQlxDYn8", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1229.5, + "y": 981.5, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 199, + "height": 1, + "seed": 1613256837, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1652458511555, + "link": null, + "locked": false, + "startBinding": { + "elementId": "en2eREDEBckio9tpltvw4", + "focus": -0.03276243093922652, + "gap": 2.5 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -199, + -1 + ] + ] + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": { + "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96": { + "mimeType": "image/png", + "id": "b2dcc1fcc0af9092763d1d21dbe9ff1d70032f96", + "dataURL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA3cAAAWgCAYAAAD92Lq7AAAgAElEQVR4XuydCWBkVZX331pVqUpSlbXS6c6eXqDZpEV2aBYFRfAbhgZRFvflG3SYkU/GleDK6LjOjKKjMCCgEJFREBFBwqYO2IpiszTdnXRS2fekKknV275zb+qF9EJ3lqp6r179n5bdSb/37n2/c+t5//ece44o4AABEFgp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5X/1HSYKVUMU1IAACIAACIAACILDGBP4/bQx+6hrMsYMAAAAASUVORK5CYII=", + "created": 1648219881114 + }, + "6a7ab914e457c49e24cbce1b5454bd1d4dcce288": { + "mimeType": "image/svg+xml", + "id": "6a7ab914e457c49e24cbce1b5454bd1d4dcce288", + "dataURL": "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIyMjIiIHZpZXdCb3g9IjAgMCA5IDgiIHdpZHRoPSIyNTAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0wIDdoMXYxaC0xeiIgZmlsbD0iI2YwMCIvPjxwYXRoIGQ9Im0wIDBoMXY3aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDMuMjVoMXYxLjVoLTF6IiBmaWxsPSIjZmMwIi8+PC9zdmc+", + "created": 1648219958285 + } + } +} \ No newline at end of file diff --git a/docs/ja/integrations/data-ingestion/kafka/images/kafka_04.png b/docs/ja/integrations/data-ingestion/kafka/images/kafka_04.png new file mode 100644 index 00000000000..6923a7d710e Binary files /dev/null and b/docs/ja/integrations/data-ingestion/kafka/images/kafka_04.png differ diff --git a/docs/ja/integrations/data-ingestion/kafka/index.md b/docs/ja/integrations/data-ingestion/kafka/index.md new file mode 100644 index 00000000000..feece2ad98b --- /dev/null +++ b/docs/ja/integrations/data-ingestion/kafka/index.md @@ -0,0 +1,58 @@ +--- +sidebar_label: ClickHouseã¨Kafkaã®çµ±åˆ +sidebar_position: 1 +slug: /ja/integrations/kafka +description: ClickHouseã¨Kafkaã®ç´¹ä»‹ +--- + +# ClickHouseã¨Kafkaã®çµ±åˆ + +[Apache Kafka](https://kafka.apache.org/)ã¯ã€æ•°åƒã®ä¼æ¥­ãŒé«˜æ€§èƒ½ãƒ‡ãƒ¼ã‚¿ãƒ‘イプラインã€ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°åˆ†æžã€ãƒ‡ãƒ¼ã‚¿çµ±åˆã€ãƒŸãƒƒã‚·ãƒ§ãƒ³ã‚¯ãƒªãƒ†ã‚£ã‚«ãƒ«ãªã‚¢ãƒ—リケーションã®ãŸã‚ã«ä½¿ç”¨ã—ã¦ã„るオープンソースã®åˆ†æ•£ã‚¤ãƒ™ãƒ³ãƒˆã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ—ラットフォームã§ã™ã€‚Kafkaã¨ClickHouseãŒé–¢ä¸Žã™ã‚‹ã»ã¨ã‚“ã©ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯Kafkaベースã®ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«æŒ¿å…¥ã—ãŸã„ã¨è€ƒãˆã¦ã„ã¾ã™ã€‚以下ã«ã€ãã®ä¸¡æ–¹ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«å¯¾ã™ã‚‹ã„ãã¤ã‹ã®ã‚ªãƒ—ションを示ã—ã€ãã‚Œãžã‚Œã®ã‚¢ãƒ—ローãƒã®åˆ©ç‚¹ã¨æ¬ ç‚¹ã‚’特定ã—ã¾ã™ã€‚ + +## オプションã®é¸æŠž + +Kafkaã‚’ClickHouseã¨çµ±åˆã™ã‚‹éš›ã€é«˜ãƒ¬ãƒ™ãƒ«ã®ã‚¢ãƒ—ローãƒã«ã¤ã„ã¦æ—©æœŸã«ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ä¸Šã®æ±ºå®šã‚’下ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã«æœ€ã‚‚一般的ãªæˆ¦ç•¥ã‚’示ã—ã¾ã™ã€‚ + +### Kafka用ClickPipes(ClickHouse Cloud) +* [**ClickPipes**](../clickpipes/kafka.md)ã¯ã€ClickHouse Cloudã«ãƒ‡ãƒ¼ã‚¿ã‚’å–り込む最も簡å˜ã§ç›´æ„Ÿçš„ãªæ–¹æ³•ã‚’æä¾›ã—ã¾ã™ã€‚ç¾åœ¨ã€Apache Kafkaã€Confluent Cloudã€ãŠã‚ˆã³Amazon MSKをサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ä»Šå¾Œã•ã‚‰ã«å¤šãã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ãŒè¿½åŠ ã•ã‚Œã‚‹äºˆå®šã§ã™ã€‚ + +### 3rd-Party Cloudベースã®Kafka接続 +* [**Confluent Cloud**](./confluent/index.md) - Confluentプラットフォームã¯ã€ClickHouse Connector Sinkã‚’Confluent Cloud上ã§[アップロードã—ã¦ç¨¼åƒ](./confluent/custom-connector.md)ã™ã‚‹ã‚ªãƒ—ションやã€Apache Kafkaã‚’HTTPã¾ãŸã¯HTTPS経由ã§APIã¨çµ±åˆã™ã‚‹[Confluentプラットフォーム用ã®HTTP Sink Connector](./confluent/kafka-connect-http.md)を利用ã™ã‚‹ã‚ªãƒ—ションをæä¾›ã—ã¾ã™ã€‚ + +* [**Amazon MSK**](./msk/index.md) - Amazon MSK Connectフレームワークをサãƒãƒ¼ãƒˆã—ã¦ã€Apache Kafkaクラスターã‹ã‚‰ClickHouseãªã©ã®å¤–部システムã«ãƒ‡ãƒ¼ã‚¿ã‚’転é€ã—ã¾ã™ã€‚Amazon MSKã«ClickHouse Kafka Connectをインストールã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +* [**Redpanda Cloud**](https://cloud.redpanda.com/) - Redpandaã¯ã€Kafka API互æ›ã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ãƒ—ラットフォームã§ã€ClickHouseã®ã‚¢ãƒƒãƒ—ストリームデータソースã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ホストã•ã‚ŒãŸã‚¯ãƒ©ã‚¦ãƒ‰ãƒ—ラットフォームã§ã‚ã‚‹Redpanda Cloudã¯ã€Kafkaプロトコル経由ã§ClickHouseã¨çµ±åˆã•ã‚Œã€ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°åˆ†æžãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ãƒ‡ãƒ¼ã‚¿å–ã‚Šè¾¼ã¿ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +### セルフマãƒãƒ¼ã‚¸ãƒ‰Kafka接続 +* [**Kafka Connect**](./kafka-clickhouse-connect-sink.md) - Kafka Connectã¯ã€Apache Kafkaã®ç„¡æ–™ã®ã‚ªãƒ¼ãƒ—ンソースコンãƒãƒ¼ãƒãƒ³ãƒˆã§ã€Kafkaã¨ä»–ã®ãƒ‡ãƒ¼ã‚¿ã‚·ã‚¹ãƒ†ãƒ é–“ã§ã®ã‚·ãƒ³ãƒ—ルãªãƒ‡ãƒ¼ã‚¿çµ±åˆç”¨ã«è¨­è¨ˆã•ã‚ŒãŸé›†ä¸­ãƒ‡ãƒ¼ã‚¿ãƒãƒ–ã¨ã—ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚コãƒã‚¯ã‚¿ã¯ã€Kafkaã‹ã‚‰ä»–ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¸ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¹ã‚±ãƒ¼ãƒ©ãƒ–ルã§ä¿¡é ¼æ€§ã®é«˜ã„ストリーミングをシンプルã«æä¾›ã—ã¾ã™ã€‚Source Connectorsã¯ä»–ã®ã‚·ã‚¹ãƒ†ãƒ ã‹ã‚‰Kafkaトピックã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã€Sink Connectorsã¯Kafkaトピックã‹ã‚‰ClickHouseãªã©ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«ãƒ‡ãƒ¼ã‚¿ã‚’é…ä¿¡ã—ã¾ã™ã€‚ + +* [**Vector**](./kafka-vector.md) - Vectorã¯ãƒ™ãƒ³ãƒ€ãƒ¼ã«ä¾å­˜ã—ãªã„データパイプラインã§ã™ã€‚Kafkaã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã¿ã€ClickHouseã«ã‚¤ãƒ™ãƒ³ãƒˆã‚’é€ä¿¡ã™ã‚‹èƒ½åŠ›ãŒã‚ã‚Šã€å …牢ãªçµ±åˆã‚ªãƒ—ションをæä¾›ã—ã¾ã™ã€‚ + +* [**JDBC Connect Sink**](./kafka-connect-jdbc.md) - Kafka Connect JDBC Sinkコãƒã‚¯ã‚¿ã¯ã€Kafkaトピックã‹ã‚‰ä»»æ„ã®JDBCドライãƒãƒ¼ã‚’å‚™ãˆãŸãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +* **カスタムコード** - Kafkaã¨ClickHouse用ã®ãã‚Œãžã‚Œã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ©ã‚¤ãƒ–ラリを使用ã—ãŸã‚«ã‚¹ã‚¿ãƒ ã‚³ãƒ¼ãƒ‰ã¯ã€ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚«ã‚¹ã‚¿ãƒ å‡¦ç†ãŒå¿…è¦ãªå ´åˆã«é©åˆ‡ãªã‚±ãƒ¼ã‚¹ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æ–‡æ›¸ã®ç¯„囲を超ãˆã¦ã„ã¾ã™ã€‚ + +* [**Kafkaテーブルエンジン**](./kafka-table-engine.md)ã¯ã€ãƒã‚¤ãƒ†ã‚£ãƒ–ClickHouseçµ±åˆï¼ˆClickHouse Cloudã§ã¯åˆ©ç”¨ä¸å¯ï¼‰ã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルエンジンã¯**プル**ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ソースシステムã‹ã‚‰å–å¾—ã—ã¾ã™ã€‚ã“ã‚Œã«ã¯ã€ClickHouseãŒKafkaã«ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã“ã¨ãŒå¿…è¦ã§ã™ã€‚ + +* [**åå‰ä»˜ãコレクションを用ã„ãŸKafkaテーブルエンジン**](./kafka-table-engine-named-collections.md) - åå‰ä»˜ãコレクションを使用ã™ã‚‹ã“ã¨ã§ã€Kafkaã¨ã®ãƒã‚¤ãƒ†ã‚£ãƒ–ClickHouseçµ±åˆãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã¯ã€è¤‡æ•°ã®Kafkaクラスターã¸ã®å®‰å…¨ãªæŽ¥ç¶šã‚’許å¯ã—ã€æ§‹æˆç®¡ç†ã‚’集中化ã—ã€ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティã¨ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’å‘上ã•ã›ã¾ã™ã€‚ + +### アプローãƒã®é¸æŠž +ã„ãã¤ã‹ã®æ±ºå®šãƒã‚¤ãƒ³ãƒˆã«è¦ç´„ã•ã‚Œã¾ã™ï¼š + +* **接続性** - Kafkaテーブルエンジンã¯ã€ClickHouseãŒç›®çš„地ã§ã‚ã‚‹å ´åˆã€Kafkaã‹ã‚‰ãƒ—ルã§ãã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã¯åŒæ–¹å‘接続性ãŒå¿…è¦ã§ã™ã€‚例ãˆã°ã€ClickHouseãŒã‚¯ãƒ©ã‚¦ãƒ‰ã«ã‚ã‚Šã€KafkaãŒã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã•ã‚Œã¦ã„ã‚‹å ´åˆã®ã‚ˆã†ã«ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãŒåˆ†æ–­ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚³ãƒ³ãƒ—ライアンスやセキュリティ上ã®ç†ç”±ã‹ã‚‰ã“れを解除ã™ã‚‹ã“ã¨ã‚’ãŸã‚らã†ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。(ã“ã®ã‚¢ãƒ—ローãƒã¯ç¾åœ¨ã®ClickHouse Cloudã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。)Kafkaテーブルエンジンã¯ã€æ¶ˆè²»è€…用ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’使用ã—ã¦ã€ClickHouse自身ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’利用ã—ã¾ã™ã€‚ã“ã®ãƒªã‚½ãƒ¼ã‚¹ã®è² æ‹…ã‚’ClickHouseã«ã‹ã‘ã‚‹ã“ã¨ã¯ã€ãƒªã‚½ãƒ¼ã‚¹ã®åˆ¶ç´„ã®ãŸã‚ã«ä¸å¯èƒ½ã‹ã‚‚ã—ã‚Œãšã€ã¾ãŸã€ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒˆã¯é–¢å¿ƒã®åˆ†é›¢ã‚’好むã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã®å ´åˆã€åˆ¥ã®ãƒ—ロセスã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã€ç•°ãªã‚‹ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ä¸Šã«ãƒ‡ãƒ—ロイã§ãã‚‹Kafka Connectã®ã‚ˆã†ãªãƒ„ールãŒå¥½ã¾ã—ã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã‚Œã«ã‚ˆã‚Šã€Kafkaデータã®ãƒ—ルを担当ã™ã‚‹ãƒ—ロセスをClickHouseã¨ã¯ç‹¬ç«‹ã—ã¦ã‚¹ã‚±ãƒ¼ãƒ«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +* **クラウドã§ã®ãƒ›ã‚¹ãƒ†ã‚£ãƒ³ã‚°** - クラウドベンダã¯ã€ãƒ—ラットフォーム上ã§åˆ©ç”¨å¯èƒ½ãªKafkaコンãƒãƒ¼ãƒãƒ³ãƒˆã«åˆ¶é™ã‚’設ã‘ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚å„クラウドベンダã®æŽ¨å¥¨ã‚ªãƒ—ションを探るãŸã‚ã«ã€ã‚¬ã‚¤ãƒ‰ã«å¾“ã£ã¦ãã ã•ã„。 + +* **外部ã§ã®ã‚¨ãƒ³ãƒªãƒƒãƒãƒ¡ãƒ³ãƒˆ** - メッセージã¯ã€Materialized Viewã®selectステートメント内ã®é–¢æ•°ã‚’使用ã—ã¦ClickHouseã«æŒ¿å…¥ã•ã‚Œã‚‹å‰ã«æ“作ã§ãã¾ã™ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è¤‡é›‘ãªã‚¨ãƒ³ãƒªãƒƒãƒãƒ¡ãƒ³ãƒˆã‚’ClickHouse外部ã«ç§»å‹•ã™ã‚‹ã“ã¨ã‚’好むã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +* **データフローã®æ–¹å‘** - Vectorã¯ã€Kafkaã‹ã‚‰ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿è»¢é€ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +## å‰ææ¡ä»¶ + +リンクã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¬ã‚¤ãƒ‰ã¯ã€ä»¥ä¸‹ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ï¼š + +* Kafkaã®åŸºç¤Žï¼ˆãƒ—ロデューサーã€ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžãƒ¼ã€ãƒˆãƒ”ックãªã©ï¼‰ã«ç²¾é€šã—ã¦ã„ã‚‹ã“ã¨ã€‚ +* ã“れらã®ä¾‹ã®ãŸã‚ã«ãƒˆãƒ”ックを準備ã—ã¦ã„ã‚‹ã“ã¨ã€‚ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒKafkaã«JSONã¨ã—ã¦ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ã¨æƒ³å®šã—ã¦ã„ã¾ã™ãŒã€Avroを使用ã—ã¦ã„ã‚‹å ´åˆã‚‚原則ã¯åŒã˜ã§ã™ã€‚ +* kcat(以å‰ã¯kafkacatã¨å‘¼ã°ã‚Œã¦ã„ã¾ã—ãŸï¼‰ãŒç´ æ™´ã‚‰ã—ã„[ã“ã¡ã‚‰](https://github.com/edenhill/kcat)ã«ã‚ã‚‹ã“ã¨ã‚’利用ã—ã¦ã€Kafkaデータを公開ãŠã‚ˆã³æ¶ˆè²»ã—ã¾ã™ã€‚ +* サンプルデータをロードã™ã‚‹ãŸã‚ã®ã„ãã¤ã‹ã®pythonスクリプトをå‚ç…§ã—ã¦ã„ã¾ã™ãŒã€ä¾‹ã‚’自分ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«é©å¿œã•ã›ã¦ãã ã•ã„。 +* ClickHouseã®Materialized Viewã«ã¤ã„ã¦å¤§ã¾ã‹ã«ç†è§£ã—ã¦ã„ã‚‹ã“ã¨ã€‚ diff --git a/docs/ja/integrations/data-ingestion/kafka/kafka-clickhouse-connect-sink.md b/docs/ja/integrations/data-ingestion/kafka/kafka-clickhouse-connect-sink.md new file mode 100644 index 00000000000..869fb91991a --- /dev/null +++ b/docs/ja/integrations/data-ingestion/kafka/kafka-clickhouse-connect-sink.md @@ -0,0 +1,403 @@ +--- +sidebar_label: ClickHouse Kafka Connect Sink +sidebar_position: 2 +slug: /ja/integrations/kafka/clickhouse-kafka-connect-sink +description: ClickHouseå…¬å¼ã®Kafkaコãƒã‚¯ã‚¿ã€‚ +--- + +import ConnectionDetails from '@site/docs/ja/\_snippets/\_gather_your_details_http.mdx'; + +# ClickHouse Kafka Connect Sink + +:::note +サãƒãƒ¼ãƒˆãŒå¿…è¦ãªå ´åˆã¯ã€[ã“ã®ãƒªãƒã‚¸ãƒˆãƒªã§å•é¡Œã‚’報告](https://github.com/ClickHouse/clickhouse-kafka-connect/issues)ã™ã‚‹ã‹ã€[ClickHouseã®å…¬çš„Slack](https://clickhouse.com/slack)ã§è³ªå•ã—ã¦ãã ã•ã„。 +::: + +**ClickHouse Kafka Connect Sink** ã¯ã€Kafkaトピックã‹ã‚‰ClickHouseテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’転é€ã™ã‚‹Kafkaコãƒã‚¯ã‚¿ã§ã™ã€‚ + +### ライセンス + +Kafka Connector Sink 㯠[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) ã®ä¸‹ã§é…布ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### 環境è¦ä»¶ + +環境㫠[Kafka Connect](https://docs.confluent.io/platform/current/connect/index.html) フレームワークv2.7以上をインストールã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### ãƒãƒ¼ã‚¸ãƒ§ãƒ³äº’æ›æ€§ãƒžãƒˆãƒªãƒƒã‚¯ã‚¹ + +| ClickHouse Kafka Connect ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | Kafka Connect | Confluent プラットフォーム | +|--------------------------------------|------------------------|---------------|----------------------------| +| 1.0.0 | > 23.3 | > 2.7 | > 6.1 | + +### 主ãªç‰¹å¾´ + +- 標準ã§Exactly-onceセマンティクスをæ供。新ã—ã„ClickHouseã®ã‚³ã‚¢æ©Ÿèƒ½[KeepeMap](https://github.com/ClickHouse/ClickHouse/pull/39976)ã«ã‚ˆã‚Šå®Ÿç¾ã•ã‚Œã€æœ€å°é™ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãŒå¯èƒ½ã§ã™ã€‚ +- サードパーティã®ã‚¹ãƒ†ãƒ¼ãƒˆã‚¹ãƒˆã‚¢ã®ã‚µãƒãƒ¼ãƒˆï¼šç¾åœ¨ã¯In-memoryãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã™ãŒã€KeeperMapを使用ã§ãã¾ã™ï¼ˆRedisã¯è¿‘日追加予定)。 +- コア統åˆï¼šClickHouseã«ã‚ˆã£ã¦æ§‹ç¯‰ã€ä¿å®ˆã€ãŠã‚ˆã³ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +- [ClickHouse Cloud](https://clickhouse.com/cloud)ã«å¯¾ã—ã¦ç¶™ç¶šçš„ã«ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +- 宣言ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã¨ã‚¹ã‚­ãƒ¼ãƒžãƒ¬ã‚¹ã§ã®ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ã€‚ +- å…¨ã¦ã®ClickHouseデータタイプã«å¯¾å¿œã€‚ + +### インストール手順 + +#### 接続情報をåŽé›†ã™ã‚‹ + + + +#### 一般的ãªã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ‰‹é † + +コãƒã‚¯ã‚¿ã¯ã€ãƒ—ラグインを実行ã™ã‚‹ãŸã‚ã«å¿…è¦ãªã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å«ã‚€å˜ä¸€ã®Uber JARファイルã¨ã—ã¦é…布ã•ã‚Œã¾ã™ã€‚ + +プラグインをインストールã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®æ‰‹é †ã‚’実行ã—ã¦ãã ã•ã„: + +- ClickHouse Kafka Connect Sink リãƒã‚¸ãƒˆãƒªã® [リリース](https://github.com/ClickHouse/clickhouse-kafka-connect/releases) ページã‹ã‚‰ã‚³ãƒã‚¯ã‚¿ JAR ファイルをå«ã‚€ ZIP アーカイブをダウンロードã—ã¾ã™ã€‚ +- ZIP ファイルã®å†…容を展開ã—ã€ç›®çš„ã®å ´æ‰€ã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ +- プラグインを Confluent Platform ãŒè¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãるよã†ã«ã€Connect プロパティファイル㮠[plugin.path](https://kafka.apache.org/documentation/#connectconfigs_plugin.path) 設定ã«ãƒ—ラグインディレクトリを追加ã—ã¾ã™ã€‚ +- トピックåã€ClickHouseインスタンスã®ãƒ›ã‚¹ãƒˆåã€ãŠã‚ˆã³ãƒ‘スワードを設定ã—ã¾ã™ã€‚ + +```yml +connector.class=com.clickhouse.kafka.connect.ClickHouseSinkConnector +tasks.max=1 +topics= +ssl=true +jdbcConnectionProperties=?sslmode=STRICT +security.protocol=SSL +hostname= +database= +password= +ssl.truststore.location=/tmp/kafka.client.truststore.jks +port=8443 +value.converter.schemas.enable=false +value.converter=org.apache.kafka.connect.json.JsonConverter +exactlyOnce=true +username=default +schemas.enable=false +``` + +- Confluent Platformã‚’å†èµ·å‹•ã—ã¾ã™ã€‚ +- Confluent Platformを使用ã—ã¦ã„ã‚‹å ´åˆã€Confluent Control Center UI ã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ã€ClickHouse Sink ãŒåˆ©ç”¨å¯èƒ½ãªã‚³ãƒã‚¯ã‚¿ã®ãƒªã‚¹ãƒˆã«è¡¨ç¤ºã•ã‚Œã¦ã„ã‚‹ã‹ç¢ºèªã—ã¾ã™ã€‚ + +### 設定オプション + +ClickHouse Sink ã‚’ ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®æƒ…報をæä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +- 接続詳細:ホストå(**å¿…é ˆ**)ã¨ãƒãƒ¼ãƒˆï¼ˆã‚ªãƒ—ション) +- ユーザー資格情報:パスワード(**å¿…é ˆ**)ã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼å(オプション) +- コãƒã‚¯ã‚¿ã‚¯ãƒ©ã‚¹ï¼š`com.clickhouse.kafka.connect.ClickHouseSinkConnector`(**å¿…é ˆ**) +- トピックã¾ãŸã¯ topics.regex: ãƒãƒ¼ãƒªãƒ³ã‚°ã™ã‚‹Kafka トピック - トピックåã¯ãƒ†ãƒ¼ãƒ–ルåã¨ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆ**å¿…é ˆ**) +- キーã¨å€¤ã®ã‚³ãƒ³ãƒãƒ¼ã‚¿ãƒ¼ï¼šãƒˆãƒ”ック内ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¿ã‚¤ãƒ—ã«åŸºã¥ã„ã¦è¨­å®šã—ã¾ã™ã€‚ワーカ設定ã§å®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã«å¿…è¦ã§ã™ã€‚ + +設定オプションã®å…¨è¡¨ï¼š + +| プロパティå | 説明 | デフォルト値 | +|--------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------| +| `hostname` (**å¿…é ˆ**) | サーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆåã¾ãŸã¯IPアドレス | N/A | +| `port` | ClickHouseã®ãƒãƒ¼ãƒˆ - デフォルトã¯8443(クラウドã§ã¯HTTPS用)ã§ã™ãŒã€HTTP(自ホストデフォルトã®å ´åˆï¼‰ã‚’使用ã™ã‚‹å ´åˆã¯8123ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ | `8443` | +| `ssl` | ClickHouseã¸ã®SSL接続を有効ã«ã™ã‚‹ | `true` | +| `jdbcConnectionProperties` | ClickHouseã¸ã®æŽ¥ç¶šæ™‚ã®ãƒ—ロパティ。`?`ã§å§‹ã¾ã‚Šã€`param=value`é–“ã¯`&`ã§çµåˆã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ | `""` | +| `username` | ClickHouseã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¦ãƒ¼ã‚¶ãƒ¼å | `default` | +| `password` (**å¿…é ˆ**) | ClickHouseã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ‘スワード | N/A | +| `database` | ClickHouseã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å | `default` | +| `connector.class` (**å¿…é ˆ**) | コãƒã‚¯ã‚¿ã‚¯ãƒ©ã‚¹ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¨ã—ã¦æ˜Žç¤ºçš„ã«è¨­å®šã—ã¦ãã ã•ã„) | `"com.clickhouse.kafka.connect.ClickHouseSinkConnector"` | +| `tasks.max` | コãƒã‚¯ã‚¿ã‚¿ã‚¹ã‚¯ã®æ•° | `"1"` | +| `errors.retry.timeout` | ClickHouse JDBC リトライタイムアウト | `"60"` | +| `exactlyOnce` | Exactly Once 有効 | `"false"` | +| `topics` (**å¿…é ˆ**) | ãƒãƒ¼ãƒªãƒ³ã‚°ã™ã‚‹Kafkaトピック - トピックåã¯ãƒ†ãƒ¼ãƒ–ルåã¨ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ | `""` | +| `key.converter` (**å¿…é ˆ** - 説明å‚ç…§) | キーã®ã‚¿ã‚¤ãƒ—ã«å¿œã˜ã¦è¨­å®šã—ã¾ã™ã€‚キーを渡ã—ã¦ã„ã‚‹å ´åˆï¼ˆãƒ¯ãƒ¼ã‚«è¨­å®šã§å®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆï¼‰ã¯ã“ã“ã§å¿…è¦ã§ã™ã€‚ | `"org.apache.kafka.connect.storage.StringConverter"` | +| `value.converter` (**å¿…é ˆ** - 説明å‚ç…§) | トピック内ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¿ã‚¤ãƒ—ã«åŸºã¥ã„ã¦è¨­å®šã—ã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å½¢å¼ï¼š- JSONã€Stringã€Avroã¾ãŸã¯Protobuf フォーマット。ワーカ設定ã§å®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã«ã“ã“ã§å¿…è¦ã§ã™ã€‚ | `"org.apache.kafka.connect.json.JsonConverter"` | +| `value.converter.schemas.enable` | コãƒã‚¯ã‚¿å€¤ã‚³ãƒ³ãƒãƒ¼ã‚¿ã‚¹ã‚­ãƒ¼ãƒžã‚µãƒãƒ¼ãƒˆ | `"false"` | +| `errors.tolerance` | コãƒã‚¯ã‚¿ã‚¨ãƒ©ãƒ¼ãƒˆãƒ¬ãƒ©ãƒ³ã‚¹ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å€¤ï¼šnoneã€all | `"none"` | +| `errors.deadletterqueue.topic.name` | セットã•ã‚Œã¦ã„ã‚‹å ´åˆï¼ˆerrors.tolerance=allã®å ´åˆï¼‰ã€å¤±æ•—ã—ãŸãƒãƒƒãƒã«å¯¾ã—ã¦DLQãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼ˆ[トラブルシューティング](#Troubleshooting)ã‚’å‚照) | `""` | +| `errors.deadletterqueue.context.headers.enable` | DLQã«è¿½åŠ ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’追加ã—ã¾ã™ | `""` | +| `clickhouseSettings` | ClickHouse設定ã®ã‚³ãƒ³ãƒžåŒºåˆ‡ã‚Šãƒªã‚¹ãƒˆï¼ˆä¾‹: "insert_quorum=2, ãªã©...") | `""` | +| `topic2TableMap` | トピックåをテーブルåã«ãƒžãƒƒãƒ”ングã™ã‚‹ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šãƒªã‚¹ãƒˆï¼ˆä¾‹: "topic1=table1, topic2=table2, ãªã©...") | `""` | +| `tableRefreshInterval` | テーブル定義キャッシュã®æ›´æ–°é–“隔(秒å˜ä½ï¼‰ | `0` | +| `keeperOnCluster` | 自ホストインスタンスã®ãŸã‚ã« ON CLUSTER パラメータを設定å¯èƒ½ã«ã—ã¾ã™ï¼ˆä¾‹: " ON CLUSTER clusterNameInConfigFileDefinition ")exactly-once connect_state テーブル用([分散DDLクエリ](https://clickhouse.com/docs/ja/sql-reference/distributed-ddl)å‚照) | `""` | +| `bypassRowBinary` | スキーマベースã®ãƒ‡ãƒ¼ã‚¿ï¼ˆAvroã€Protobufãªã©ï¼‰ã«å¯¾ã™ã‚‹RowBinaryãŠã‚ˆã³RowBinaryWithDefaultsã®ä½¿ç”¨ã‚’無効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ - 欠æカラムãŒã‚ã‚‹å ´åˆã‚„ã€Nullable/DefaultãŒè¨±å®¹ã§ããªã„å ´åˆã«ã®ã¿ä½¿ç”¨ã—ã¦ãã ã•ã„ | `"false"` | +| `dateTimeFormats` | DateTime64スキーマフィールドを解æžã™ã‚‹ãŸã‚ã®æ—¥ä»˜æ™‚é–“å½¢å¼ã€`-`ã§åŒºåˆ‡ã‚Šã¾ã™ï¼ˆä¾‹: 'someDateField=yyyy-MM-dd HH:mm:ss.SSSSSSSSS;someOtherDateField=yyyy-MM-dd HH:mm:ss')。 | `""` | +| `tolerateStateMismatch` | ç¾åœ¨ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚ˆã‚Šã‚‚"æ—©ã„"レコードを削除ã§ãるよã†ã«ã‚³ãƒã‚¯ã‚¿ã‚’設定ã—ã¾ã™ï¼ˆä¾‹: オフセット5ãŒé€ä¿¡ã•ã‚Œã€æœ€å¾Œã«è¨˜éŒ²ã•ã‚ŒãŸã‚ªãƒ•ã‚»ãƒƒãƒˆãŒ250ã®å ´åˆï¼‰ | `"false"` | + +### ターゲットテーブル + +ClickHouse Connect Sinkã¯Kafkaトピックã‹ã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’読ã¿å–ã‚Šã€é©åˆ‡ãªãƒ†ãƒ¼ãƒ–ルã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ClickHouse Connect Sinkã¯æ—¢å­˜ã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’書ãè¾¼ã¿ã¾ã™ã€‚データを挿入ã™ã‚‹å‰ã«ã€ClickHouseã«é©åˆ‡ãªã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¤ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルãŒä½œæˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +å„トピックã«ã¯ClickHouse内ã§å°‚用ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルãŒå¿…è¦ã§ã™ã€‚ターゲットテーブルåã¯ã‚½ãƒ¼ã‚¹ãƒˆãƒ”ックåã¨ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### å‰å‡¦ç† + +ClickHouse Kafka Connect Sinkã«é€ä¿¡ã•ã‚Œã‚‹å‰ã«ã‚¢ã‚¦ãƒˆãƒã‚¦ãƒ³ãƒ‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’変æ›ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€[Kafka Connect Transformations](https://docs.confluent.io/platform/current/connect/transforms/overview.html) を使用ã—ã¦ãã ã•ã„。 + +### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型 + +**スキーマ宣言ã‚り:** + +| Kafka Connect タイプ | ClickHouse タイプ | サãƒãƒ¼ãƒˆ | プリミティブ | +| ----------------------------------------- |----------------------| -------- | ----------- | +| STRING | String | ✅ | Yes | +| INT8 | Int8 | ✅ | Yes | +| INT16 | Int16 | ✅ | Yes | +| INT32 | Int32 | ✅ | Yes | +| INT64 | Int64 | ✅ | Yes | +| FLOAT32 | Float32 | ✅ | Yes | +| FLOAT64 | Float64 | ✅ | Yes | +| BOOLEAN | Boolean | ✅ | Yes | +| ARRAY | Array(T) | ✅ | No | +| MAP | Map(Primitive, T) | ✅ | No | +| STRUCT | Variant(T1, T2, …) | ✅ | No | +| STRUCT | Tuple(a T1, b T2, …) | ✅ | No | +| STRUCT | Nested(a T1, b T2, …) | ✅ | No | +| BYTES | String | ✅ | No | +| org.apache.kafka.connect.data.Time | Int64 / DateTime64 | ✅ | No | +| org.apache.kafka.connect.data.Timestamp | Int32 / Date32 | ✅ | No | +| org.apache.kafka.connect.data.Decimal | Decimal | ✅ | No | + +**スキーマ宣言ãªã—:** + +レコードã¯JSONã«å¤‰æ›ã•ã‚Œã€ClickHouseã«[JSONEachRow](../../../sql-reference/formats.mdx#jsoneachrow)フォーマットã®å€¤ã¨ã—ã¦é€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +### 設定レシピ + +以下ã¯ã€ã™ãã«é–‹å§‹ã™ã‚‹ãŸã‚ã®ä¸€èˆ¬çš„ãªè¨­å®šãƒ¬ã‚·ãƒ”ã§ã™ã€‚ + +#### 基本設定 + +開始ã™ã‚‹ãŸã‚ã®æœ€ã‚‚基本的ãªè¨­å®šã§ã™ - Kafka Connect を分散モードã§å®Ÿè¡Œã—ã€ClickHouse サーãƒãƒ¼ãŒ `localhost:8443` ã§SSLを有効ã«ã—ã¦å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã€ãƒ‡ãƒ¼ã‚¿ã¯ã‚¹ã‚­ãƒ¼ãƒžãƒ¬ã‚¹ã®JSONã§ã™ã€‚ + +```json +{ + "name": "clickhouse-connect", + "config": { + "connector.class": "com.clickhouse.kafka.connect.ClickHouseSinkConnector", + "tasks.max": "1", + "consumer.override.max.poll.records": "5000", + "consumer.override.max.partition.fetch.bytes": "5242880", + "database": "default", + "errors.retry.timeout": "60", + "exactlyOnce": "false", + "hostname": "localhost", + "port": "8443", + "ssl": "true", + "jdbcConnectionProperties": "?ssl=true&sslmode=strict", + "username": "default", + "password": "", + "topics": "", + "value.converter": "org.apache.kafka.connect.json.JsonConverter", + "value.converter.schemas.enable": "false", + "clickhouseSettings": "" + } +} +``` + +#### 複数トピックã§ã®åŸºæœ¬è¨­å®š + +コãƒã‚¯ã‚¿ã¯è¤‡æ•°ã®ãƒˆãƒ”ックã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã§ãã¾ã™ã€‚ + +```json +{ + "name": "clickhouse-connect", + "config": { + "connector.class": "com.clickhouse.kafka.connect.ClickHouseSinkConnector", + ... + "topics": "SAMPLE_TOPIC, ANOTHER_TOPIC, YET_ANOTHER_TOPIC", + ... + } +} +``` + +#### DLQを使用ã—ãŸåŸºæœ¬è¨­å®š + +```json +{ + "name": "clickhouse-connect", + "config": { + "connector.class": "com.clickhouse.kafka.connect.ClickHouseSinkConnector", + ... + "errors.tolerance": "all", + "errors.deadletterqueue.topic.name": "", + "errors.deadletterqueue.context.headers.enable": "true", + } +} +``` + +#### ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿å½¢å¼ã§ã®ä½¿ç”¨ + +##### Avro スキーマサãƒãƒ¼ãƒˆ + +```json +{ + "name": "clickhouse-connect", + "config": { + "connector.class": "com.clickhouse.kafka.connect.ClickHouseSinkConnector", + ... + "value.converter": "io.confluent.connect.avro.AvroConverter", + "value.converter.schema.registry.url": ":", + "value.converter.schemas.enable": "true", + } +} +``` + +##### Protobuf スキーマサãƒãƒ¼ãƒˆ + +```json +{ + "name": "clickhouse-connect", + "config": { + "connector.class": "com.clickhouse.kafka.connect.ClickHouseSinkConnector", + ... + "value.converter": "io.confluent.connect.protobuf.ProtobufConverter", + "value.converter.schema.registry.url": ":", + "value.converter.schemas.enable": "true", + } +} +``` + +注æ„: クラスãŒè¶³ã‚Šãªã„ã¨ã„ã†å•é¡Œã«ç›´é¢ã—ãŸå ´åˆã€ã™ã¹ã¦ã®ç’°å¢ƒã«ãŠã„ã¦protobufコンãƒãƒ¼ã‚¿ãŒä»˜å±žã—ã¦ã„ã‚‹ã‚ã‘ã§ã¯ãªã„ãŸã‚ã€ä¾å­˜ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å«ã‚€Jarã®åˆ¥ã®ãƒªãƒªãƒ¼ã‚¹ãŒå¿…è¦ã«ãªã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +##### JSON スキーマサãƒãƒ¼ãƒˆ + +```json +{ + "name": "clickhouse-connect", + "config": { + "connector.class": "com.clickhouse.kafka.connect.ClickHouseSinkConnector", + ... + "value.converter": "org.apache.kafka.connect.json.JsonConverter", + } +} +``` + +##### String サãƒãƒ¼ãƒˆ + +コãƒã‚¯ã‚¿ã¯ç•°ãªã‚‹ClickHouseフォーマットã§ã®Stringコンãƒãƒ¼ã‚¿ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ï¼š[JSON](https://clickhouse.com/docs/ja/interfaces/formats#jsoneachrow)ã€[CSV](https://clickhouse.com/docs/ja/interfaces/formats#csv)ã€[TSV](https://clickhouse.com/docs/ja/interfaces/formats#tabseparated)。 + +```json +{ + "name": "clickhouse-connect", + "config": { + "connector.class": "com.clickhouse.kafka.connect.ClickHouseSinkConnector", + ... + "value.converter": "org.apache.kafka.connect.storage.StringConverter", + "customInsertFormat": "true", + "insertFormat": "CSV" + } +} +``` + +### ロギング + +クライアントKafka Connect Platformã«ã‚ˆã£ã¦ãƒ­ã‚®ãƒ³ã‚°ãŒè‡ªå‹•çš„ã«æä¾›ã•ã‚Œã¾ã™ã€‚ロギングã®é€ä¿¡å…ˆã¨å½¢å¼ã¯Kafka connectã®[設定ファイル](https://docs.confluent.io/platform/current/connect/logging.html#log4j-properties-file)を通ã—ã¦è¨­å®šã§ãã¾ã™ã€‚ + +Confluent Platformを使用ã™ã‚‹å ´åˆã€CLIコマンドを実行ã—ã¦ãƒ­ã‚°ã‚’表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```bash +confluent local services connect log +``` + +追加ã®è©³ç´°ã«ã¤ã„ã¦ã¯å…¬å¼ã®[ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«](https://docs.confluent.io/platform/current/connect/logging.html)ã‚’ã”覧ãã ã•ã„。 + +### モニタリング + +ClickHouse Kafka Connectã¯[Java Management Extensions (JMX)](https://www.oracle.com/technical-resources/articles/javase/jmx.html)を通ã—ã¦ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’レãƒãƒ¼ãƒˆã—ã¾ã™ã€‚JMXã¯Kafka Connectorã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +ClickHouse Connect MBeanName: + +```java +com.clickhouse:type=ClickHouseKafkaConnector,name=SinkTask{id} +``` + +ClickHouse Kafka Connectã¯æ¬¡ã®ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’報告ã—ã¾ã™ï¼š + +| åå‰ | タイプ | 説明 | +|------------------------|------|----------------------------------------------------------------------------------| +| receivedRecords | long | å—ä¿¡ã—ãŸãƒ¬ã‚³ãƒ¼ãƒ‰ã®ç·æ•°ã€‚ | +| recordProcessingTime | long | レコードを統一ã•ã‚ŒãŸæ§‹é€ ã«ã‚°ãƒ«ãƒ¼ãƒ—化ãŠã‚ˆã³å¤‰æ›ã™ã‚‹ã®ã«è²»ã‚„ã•ã‚ŒãŸç·æ™‚間(ナノ秒å˜ä½ï¼‰ã€‚ | +| taskProcessingTime | long | データをClickHouseã«å‡¦ç†ãŠã‚ˆã³æŒ¿å…¥ã™ã‚‹ã®ã«è²»ã‚„ã•ã‚ŒãŸç·æ™‚間(ナノ秒å˜ä½ï¼‰ã€‚ | + +### 制é™äº‹é … + +- 削除ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- ãƒãƒƒãƒã‚µã‚¤ã‚ºã¯Kafka Consumerã®ãƒ—ロパティã‹ã‚‰ç¶™æ‰¿ã•ã‚Œã¾ã™ã€‚ +- Exactly-onceã‚’KeeperMapã§ä½¿ç”¨ã—ã¦ã„ã¦ã‚ªãƒ•ã‚»ãƒƒãƒˆãŒå¤‰æ›´ã¾ãŸã¯æˆ»ã•ã‚ŒãŸå ´åˆã€ãã®ç‰¹å®šã®ãƒˆãƒ”ックã‹ã‚‰KeeperMapã®å†…容を削除ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚(ã•ã‚‰ãªã‚‹è©³ç´°ã«ã¤ã„ã¦ã¯ä¸‹è¨˜ã®ãƒˆãƒ©ãƒ–ルシューティングガイドをã”覧ãã ã•ã„) + +### パフォーマンスã®èª¿æ•´ + +ã‚‚ã—「Sinkコãƒã‚¯ã‚¿ã®ãƒãƒƒãƒã‚µã‚¤ã‚ºã‚’調整ã—ãŸã„ã€ã¨è€ƒãˆãŸã“ã¨ãŒã‚ã‚‹ã¨ã—ãŸã‚‰ã€ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ãã®ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ + +##### Connect Fetch対Connector Poll + +Kafka Connect(我々ã®Sinkコãƒã‚¯ã‚¿ãŒåŸºã¥ã„ã¦ã„るフレームワーク)ã¯ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§Kafkaトピックã‹ã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å–å¾—ã—ã¾ã™ï¼ˆã‚³ãƒã‚¯ã‚¿ã¨ã¯ç‹¬ç«‹ã—ã¦ï¼‰ã€‚ + +ã“ã®ãƒ—ロセス㯠`fetch.min.bytes` ãŠã‚ˆã³ `fetch.max.bytes` を使用ã—ã¦åˆ¶å¾¡ã§ãã¾ã™ã€‚`fetch.min.bytes` ã¯ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ãŒã‚³ãƒã‚¯ã‚¿ã«å€¤ã‚’渡ã™å‰ã«å¿…è¦ãªæœ€å°é‡ã‚’設定ã—(時間制é™ã¯ `fetch.max.wait.ms` ã«ã‚ˆã£ã¦è¨­å®šï¼‰ã€`fetch.max.bytes` ã¯ä¸Šé™ã‚µã‚¤ã‚ºã‚’設定ã—ã¾ã™ã€‚ã‚‚ã—コãƒã‚¯ã‚¿ã«å¤§ããªãƒãƒƒãƒã‚’渡ã—ãŸã„å ´åˆã¯ã€æœ€å°å–å¾—ã¾ãŸã¯æœ€å¤§å¾…機を増やã—ã¦ã‚ˆã‚Šå¤§ããªãƒ‡ãƒ¼ã‚¿ãƒãƒ³ãƒ‰ãƒ«ã‚’構築ã™ã‚‹ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚ + +å–å¾—ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯æ¬¡ã«ã‚³ãƒã‚¯ã‚¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ãƒãƒ¼ãƒªãƒ³ã‚°ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦æ¶ˆè²»ã•ã‚Œã€å„ãƒãƒ¼ãƒªãƒ³ã‚°ã®é‡ã¯`max.poll.records` ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚注æ„ã—ã¦ãã ã•ã„ã€ãƒ•ã‚§ãƒƒãƒã¯ãƒãƒ¼ãƒ«ã¨ã¯ç‹¬ç«‹ã—ã¦ã„ã¾ã™ï¼ + +ã“れらã®è¨­å®šã‚’調整ã™ã‚‹éš›ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ•ã‚§ãƒƒãƒã‚µã‚¤ã‚ºãŒ `max.poll.records` ã®è¤‡æ•°ã®ãƒãƒƒãƒã‚’生æˆã™ã‚‹ã“ã¨ã‚’目指ã™ã¹ãã§ã™ï¼ˆ`fetch.min.bytes` ãŠã‚ˆã³ `fetch.max.bytes` ã¯åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã‚’表ã—ã¦ã„ã‚‹ã“ã¨ã‚’念頭ã«ç½®ã„ã¦ãã ã•ã„) - ãã†ã™ã‚‹ã“ã¨ã§ã€å„コãƒã‚¯ã‚¿ã‚¿ã‚¹ã‚¯ãŒå¯èƒ½ãªé™ã‚Šå¤§ããªãƒãƒƒãƒã‚’挿入ã—ã¦ã„ã¾ã™ã€‚ + +ClickHouseã¯å¤§å°ã‚’å•ã‚ãšé »ç¹ã«è¡Œã‚れるå°ã•ã„ãƒãƒƒãƒã‚ˆã‚Šã‚‚ã€å¤šå°‘ã®é…延ãŒã‚ã£ã¦ã‚‚大ãƒãƒƒãƒã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ - ãƒãƒƒãƒãŒå¤§ãã„ã»ã©è‰¯ã„ã§ã™ã€‚ + +```properties +consumer.max.poll.records=5000 +consumer.max.partition.fetch.bytes=5242880 +``` + +詳細ã«ã¤ã„ã¦ã¯[Confluentã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://docs.confluent.io/platform/current/connect/references/allconfigs.html#override-the-worker-configuration)ã¾ãŸã¯[Kafkaã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://kafka.apache.org/documentation/#consumerconfigs)ã‚’ã”覧ãã ã•ã„。 + +#### 高スループットã®è¤‡æ•°ãƒˆãƒ”ック + +ã‚‚ã—コãƒã‚¯ã‚¿ãŒè¤‡æ•°ã®ãƒˆãƒ”ックを購読ã™ã‚‹ã‚ˆã†è¨­å®šã•ã‚Œã¦ãŠã‚Šã€topic2TableMapを使用ã—ã¦ãƒˆãƒ”ックをテーブルã«ãƒžãƒƒãƒ”ングã—ã¦ã„ã‚‹å ´åˆã§ã‚‚ã€æŒ¿å…¥ã§ãƒœãƒˆãƒ«ãƒãƒƒã‚¯ãŒç™ºç”Ÿã—ã¦æ¶ˆè²»è€…ラグãŒè¦‹ã‚‰ã‚Œã‚‹ã¨ãã¯ã€ãã‚Œãžã‚Œã®ãƒˆãƒ”ックã”ã¨ã«1ã¤ã®ã‚³ãƒã‚¯ã‚¿ã‚’作æˆã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。ã“ã®ãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã®ä¸»ãªåŽŸå› ã¯ã€ç¾åœ¨ãƒãƒƒãƒãŒãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦[é€æ¬¡çš„ã«](https://github.com/ClickHouse/clickhouse-kafka-connect/blob/578ac07e8be1a920aaa3b26e49183595c3edd04b/src/main/java/com/clickhouse/kafka/connect/sink/ProxySinkTask.java#L95-L100)挿入ã•ã‚Œã¦ã„ã‚‹ã‹ã‚‰ã§ã™ã€‚ + +1ã¤ã®ã‚³ãƒã‚¯ã‚¿ã‚’トピックã”ã¨ã«ä½œæˆã™ã‚‹ã“ã¨ã¯ã€å¯èƒ½ãªé™ã‚Šæœ€é€Ÿã®æŒ¿å…¥é€Ÿåº¦ã‚’å¾—ã‚‹ãŸã‚ã®å›žé¿ç­–ã§ã™ã€‚ + +### トラブルシューティング + +#### "State mismatch for topic \[someTopic\] partition \[0\]" + +ã“ã‚Œã¯ã€KeeperMapã«ä¿å­˜ã•ã‚ŒãŸã‚ªãƒ•ã‚»ãƒƒãƒˆãŒKafkaã«ä¿å­˜ã•ã‚ŒãŸã‚ªãƒ•ã‚»ãƒƒãƒˆã¨ç•°ãªã‚‹å ´åˆã«ç™ºç”Ÿã—ã¾ã™ã€‚通常ã€ãƒˆãƒ”ックãŒå‰Šé™¤ã•ã‚ŒãŸå ´åˆã‚„オフセットãŒæ‰‹å‹•ã§èª¿æ•´ã•ã‚ŒãŸå ´åˆã«ç™ºç”Ÿã—ã¾ã™ã€‚ +ã“れを解決ã™ã‚‹ã«ã¯ã€ãã®ç‰¹å®šã®ãƒˆãƒ”ックã¨ãƒ‘ーティションã«å¯¾ã—ã¦ä¿å­˜ã•ã‚ŒãŸå¤ã„値を削除ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**注æ„: ã“ã®èª¿æ•´ã«ã¯exactly-onceã®å½±éŸ¿ãŒã‚ã‚Šã¾ã™ã€‚** + +#### "コãƒã‚¯ã‚¿ãŒå†è©¦è¡Œã™ã‚‹ã‚¨ãƒ©ãƒ¼ã¯ä½•ã‹ï¼Ÿ" + +ç¾åœ¨ã¯ä¸€æ™‚çš„ã§å†è©¦è¡Œå¯èƒ½ã¨è€ƒãˆã‚‰ã‚Œã‚‹ã‚¨ãƒ©ãƒ¼ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚以下をå«ã¿ã¾ã™ï¼š + +- `ClickHouseException` - ã“ã‚Œã¯ã‚ªãƒ¼ãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸå ´åˆãªã©ã«ClickHouseãŒæŠ•ã’ã‚‹ã“ã¨ãŒã§ãる一般的ãªä¾‹å¤–ã§ã™ã€‚ + 特ã«ä¸€æ™‚çš„ã¨è€ƒãˆã‚‰ã‚Œã‚‹ã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰ï¼š + - 3 - UNEXPECTED_END_OF_FILE + - 159 - TIMEOUT_EXCEEDED + - 164 - READONLY + - 202 - TOO_MANY_SIMULTANEOUS_QUERIES + - 203 - NO_FREE_CONNECTION + - 209 - SOCKET_TIMEOUT + - 210 - NETWORK_ERROR + - 242 - TABLE_IS_READ_ONLY + - 252 - TOO_MANY_PARTS + - 285 - TOO_FEW_LIVE_REPLICAS + - 319 - UNKNOWN_STATUS_OF_INSERT + - 425 - SYSTEM_ERROR + - 999 - KEEPER_EXCEPTION + - 1002 - UNKNOWN_EXCEPTION +- `SocketTimeoutException` - ソケットãŒã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã—ãŸå ´åˆã«ã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ +- `UnknownHostException` - ホストãŒè§£æ±ºã§ããªã„å ´åˆã«ã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ +- `IOException` - ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«å•é¡ŒãŒã‚ã‚‹å ´åˆã«ã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +#### "å…¨ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒç©ºç™½/ゼロã§ã‚ã‚‹" +データã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒãƒ†ãƒ¼ãƒ–ルã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¨ä¸€è‡´ã—ã¦ã„ãªã„å¯èƒ½æ€§ãŒé«˜ã„ã§ã™ - ã“ã‚Œã¯ç‰¹ã«CDC(ãŠã‚ˆã³Debeziumフォーマット)ã§ä¸€èˆ¬çš„ã§ã™ã€‚ +一般的ãªè§£æ±ºç­–ã¯ã€ã‚³ãƒã‚¯ã‚¿è¨­å®šã«flatten変æ›ã‚’追加ã™ã‚‹ã“ã¨ã§ã™ï¼š + +```properties +transforms=flatten +transforms.flatten.type=org.apache.kafka.connect.transforms.Flatten$Value +transforms.flatten.delimiter=_ +``` + +ã“ã‚Œã«ã‚ˆã‚Šãƒ‡ãƒ¼ã‚¿ãŒãƒã‚¹ãƒˆã•ã‚ŒãŸJSONã‹ã‚‰ãƒ•ãƒ©ãƒƒãƒˆãªJSONã«å¤‰æ›ã•ã‚Œï¼ˆãƒ‡ãƒªãƒŸã‚¿ã¨ã—㦠`_` を使用)ã€ãƒ†ãƒ¼ãƒ–ル内ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯ã€Œfield1_field2_field3ã€ã®å½¢å¼ã§æ§‹æˆã•ã‚Œã¾ã™ï¼ˆä¾‹: "before_id", "after_id" ãªã©ï¼‰ã€‚ + +#### "KafkaキーをClickHouseã§ä½¿ç”¨ã—ãŸã„" +Kafkaキーã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§å€¤ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ä¿å­˜ã•ã‚Œã¾ã›ã‚“ãŒã€`KeyToValue` 変æ›ã‚’使用ã—ã¦ã‚­ãƒ¼ã‚’値フィールドã«ç§»å‹•ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆæ–°ã—ã„ `_key` フィールドåã®ä¸‹ï¼‰ï¼š + +```properties +transforms=keyToValue +transforms.keyToValue.type=com.clickhouse.kafka.connect.transforms.KeyToValue +transforms.keyToValue.field=_key +``` diff --git a/docs/ja/integrations/data-ingestion/kafka/kafka-connect-jdbc.md b/docs/ja/integrations/data-ingestion/kafka/kafka-connect-jdbc.md new file mode 100644 index 00000000000..e94b83686bf --- /dev/null +++ b/docs/ja/integrations/data-ingestion/kafka/kafka-connect-jdbc.md @@ -0,0 +1,148 @@ +--- +sidebar_label: Kafka Connect JDBC コãƒã‚¯ã‚¿ +sidebar_position: 4 +slug: /ja/integrations/kafka/kafka-connect-jdbc +description: Kafka Connect 㨠ClickHouse を使用ã—㟠JDBC コãƒã‚¯ã‚¿ シンク +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# JDBC コãƒã‚¯ã‚¿ + +:::note +ã“ã®ã‚³ãƒã‚¯ã‚¿ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒç°¡å˜ã§ãƒ—リミティブ・データ型(例:int)ã§æ§‹æˆã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ClickHouse固有ã®åž‹ã€ä¾‹ãˆã°ãƒžãƒƒãƒ—ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: + +以下ã®ä¾‹ã§ã¯ã€Kafka Connect ã® Confluent ディストリビューションを使用ã—ã¾ã™ã€‚ + +以下ã§ã¯ã€Kafka ã®å˜ä¸€ãƒˆãƒ”ックã‹ã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å–ã‚Šè¾¼ã¿ã€ClickHouse テーブルã«è¡Œã‚’挿入ã™ã‚‹ç°¡å˜ãªã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚Kafka 環境をæŒã£ã¦ã„ãªã„å ´åˆã€Confluent Cloud ã®ä½¿ç”¨ã‚’推奨ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ç„¡æ–™ã§åˆ©ç”¨ã§ãã‚‹å分ãªãƒ¬ãƒ™ãƒ«ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ + +JDBC コãƒã‚¯ã‚¿ã«ã¯ã‚¹ã‚­ãƒ¼ãƒžãŒå¿…è¦ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„(JDBC コãƒã‚¯ã‚¿ã§ãƒ—レーン㪠JSON ã‚„ CSV を使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“)。スキーマã¯å„メッセージã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€é–¢é€£ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’é¿ã‘ã‚‹ãŸã‚ã« [Confluent スキーマレジスト](https://www.confluent.io/blog/kafka-connect-deep-dive-converters-serialization-explained/#json-schemas)y ã®åˆ©ç”¨ã‚’å¼·ã推奨ã—ã¾ã™ã€‚æä¾›ã•ã‚ŒãŸæŒ¿å…¥ã‚¹ã‚¯ãƒªãƒ—トã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã‚’自動的ã«æŽ¨æ¸¬ã—ã€ãれをレジストリã«æŒ¿å…¥ã—ã¾ã™ã€‚ã“ã®ã‚¹ã‚¯ãƒªãƒ—トã¯ä»–ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã‚‚å†åˆ©ç”¨å¯èƒ½ã§ã™ã€‚Kafka ã®ã‚­ãƒ¼ã¯æ–‡å­—列ã§ã‚ã‚‹ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚Kafka スキーマã®è©³ç´°ã¯[ã“ã¡ã‚‰](https://docs.confluent.io/platform/current/schema-registry/index.html)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +### ライセンス +JDBC コãƒã‚¯ã‚¿ã¯ [Confluent Community License](https://www.confluent.io/confluent-community-license) ã®ä¸‹ã§é…布ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### 手順 +#### 接続ã®è©³ç´°ã‚’åŽé›†ã™ã‚‹ + + +#### 1. Kafka Connect 㨠コãƒã‚¯ã‚¿ã‚’インストールã™ã‚‹ + +Confluent パッケージをダウンロードã—ã€ãƒ­ãƒ¼ã‚«ãƒ«ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãŸã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚コãƒã‚¯ã‚¿ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã®æ‰‹é †ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](https://docs.confluent.io/kafka-connect-jdbc/current/#install-the-jdbc-connector)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +confluent-hub ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ–¹æ³•ã‚’使用ã™ã‚‹ã¨ã€ãƒ­ãƒ¼ã‚«ãƒ«ã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ãŒæ›´æ–°ã•ã‚Œã¾ã™ã€‚ + +Kafka ã‹ã‚‰ ClickHouse ã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹ã«ã¯ã€ã‚³ãƒã‚¯ã‚¿ã® Sink コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’使用ã—ã¾ã™ã€‚ + +#### 2. JDBC ドライãƒã‚’ダウンロードã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ + +ClickHouse JDBC ドライãƒãƒ¼ `clickhouse-jdbc--shaded.jar` ã‚’[ã“ã¡ã‚‰](https://github.com/ClickHouse/clickhouse-java/releases)ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¾ã™ã€‚ãã—ã¦ã€[ã“ã¡ã‚‰](https://docs.confluent.io/kafka-connect-jdbc/current/#installing-jdbc-drivers)ã®è©³ç´°ã«å¾“ã£ã¦ Kafka Connect ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¾ã™ã€‚ä»–ã®ãƒ‰ãƒ©ã‚¤ãƒã‚‚動作ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +:::note + +一般的ãªå•é¡Œ: ドキュメント㯠jar ã‚’ `share/java/kafka-connect-jdbc/` ã«ã‚³ãƒ”ーã™ã‚‹ã“ã¨ã‚’推奨ã—ã¦ã„ã¾ã™ã€‚ドライãƒãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ãƒ‰ãƒ©ã‚¤ãƒã‚’ `share/confluent-hub-components/confluentinc-kafka-connect-jdbc/lib/` ã«ã‚³ãƒ”ーã™ã‚‹ã‹ã€`plugin.path` を変更ã—ã¦ãƒ‰ãƒ©ã‚¤ãƒã‚’å«ã‚るよã†ã«ã—ã¾ã™ã€‚詳ã—ãã¯ä»¥ä¸‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +::: + +#### 3. 構æˆã‚’準備ã™ã‚‹ + +[ã“ã¡ã‚‰ã®æ‰‹é †](https://docs.confluent.io/cloud/current/cp-component/connect-cloud-config.html#set-up-a-local-connect-worker-with-cp-install)ã«å¾“ã£ã¦ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚¿ã‚¤ãƒ—ã«é–¢é€£ã™ã‚‹ Connect をセットアップã—ã€ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã¨åˆ†æ•£ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®é•ã„ã«æ³¨æ„ã—ã¦ãã ã•ã„。Confluent Cloud を使用ã™ã‚‹å ´åˆã€åˆ†æ•£ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ãŒé–¢é€£ã—ã¾ã™ã€‚ + +以下ã®ãƒ‘ラメータã¯ã€ClickHouse 㧠JDBC コãƒã‚¯ã‚¿ã‚’使用ã™ã‚‹å ´åˆã«é–¢é€£ã—ã¾ã™ã€‚全パラメータ一覧ã¯[ã“ã¡ã‚‰](https://docs.confluent.io/kafka-connect-jdbc/current/sink-connector/index.html)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +* `connection.url` - å½¢å¼ã¯ `jdbc:clickhouse://<clickhouse host>:<clickhouse http port>/<target database>` ã¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +* `connection.user` - ターゲットデータベースã¸ã®æ›¸ãè¾¼ã¿ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ +* `table.name.format` - データを挿入ã™ã‚‹ ClickHouse テーブル。存在ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +* `batch.size` - 一度ã«é€ä¿¡ã™ã‚‹è¡Œæ•°ã€‚ClickHouse ã®[推奨事項](../../../concepts/why-clickhouse-is-so-fast.md#performance-when-inserting-data)ã«åŸºã¥ãã€1000 を最å°å€¤ã¨ã—ã¦è€ƒæ…®ã—ã¦ãã ã•ã„。 +* `tasks.max` - JDBC Sink コãƒã‚¯ã‚¿ã¯ 1 ã¤ä»¥ä¸Šã®ã‚¿ã‚¹ã‚¯ã®å®Ÿè¡Œã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãƒãƒƒãƒã‚µã‚¤ã‚ºã¨å…±ã«ã€ãƒ‘フォーマンスå‘上ã®ä¸»è¦æ‰‹æ®µã‚’表ã—ã¾ã™ã€‚ +* `value.converter.schemas.enable` - スキーマレジストリを使用ã—ã¦ã„ã‚‹å ´åˆã¯ false ã«è¨­å®šã—ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«ã‚¹ã‚­ãƒ¼ãƒžã‚’埋ã‚込む場åˆã¯ true ã«è¨­å®šã—ã¾ã™ã€‚ +* `value.converter` - データタイプã«å¿œã˜ã¦è¨­å®šã—ã¾ã™ã€‚ãŸã¨ãˆã° JSON ã®å ´åˆã¯ “io.confluent.connect.json.JsonSchemaConverterâ€ã€‚ +* `key.converter` - “org.apache.kafka.connect.storage.StringConverter†ã«è¨­å®šã—ã¾ã™ã€‚文字列キーを利用ã—ã¾ã™ã€‚ +* `pk.mode` - ClickHouse ã«ã¯é–¢é€£ã—ãªã„ãŸã‚ã€none ã«è¨­å®šã—ã¾ã™ã€‚ +* `auto.create` - サãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚‰ãšã€false ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +* `auto.evolve` - å°†æ¥çš„ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€false を推奨ã—ã¾ã™ã€‚ +* `insert.mode` - “insert†ã«è¨­å®šã—ã¾ã™ã€‚ä»–ã®ãƒ¢ãƒ¼ãƒ‰ã¯ç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +* `key.converter` - キーã®ã‚¿ã‚¤ãƒ—ã«å¿œã˜ã¦è¨­å®šã—ã¾ã™ã€‚ +* `value.converter` - トピック上ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã«åŸºã¥ã„ã¦è¨­å®šã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚JSONã€Avroã€ã¾ãŸã¯ Protobuf å½¢å¼ãªã©ã€‚ + +サンプルデータセットをテストã«ä½¿ç”¨ã™ã‚‹å ´åˆã€ä»¥ä¸‹ã‚’設定ã—ã¦ãã ã•ã„: + +* `value.converter.schemas.enable` - スキーマレジストリを使用ã™ã‚‹ãŸã‚ false ã«è¨­å®šã—ã¾ã™ã€‚スキーマをå„メッセージã«åŸ‹ã‚込む場åˆã¯ true ã«è¨­å®šã—ã¾ã™ã€‚ +* `key.converter` - Set to “org.apache.kafka.connect.storage.StringConverterâ€. 文字列キーを利用ã—ã¾ã™ã€‚ +* `value.converter` - Set “io.confluent.connect.json.JsonSchemaConverterâ€. +* `value.converter.schema.registry.url` - スキーマサーãƒãƒ¼ã® URL を設定ã—ã€`value.converter.schema.registry.basic.auth.user.info` ã«ã‚ˆã‚Šã‚¹ã‚­ãƒ¼ãƒžã‚µãƒ¼ãƒãƒ¼ã¸ã®èªè¨¼æƒ…報を入力ã—ã¾ã™ã€‚ + +Github ã®ã‚µãƒ³ãƒ—ルデータ用ã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã®ä¾‹ã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/kafka-samples/tree/main/github_events/jdbc_sink)ã§ç¢ºèªã§ãã¾ã™ã€‚Connect ãŒã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ãƒ¢ãƒ¼ãƒ‰ã§å®Ÿè¡Œã•ã‚Œã€Kafka ㌠Confluent Cloud ã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ + +#### 4. ClickHouse テーブルを作æˆã™ã‚‹ + +テーブルãŒä½œæˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã€æ—¢å­˜ã®ä¾‹ã‹ã‚‰å­˜åœ¨ã™ã‚‹å ´åˆã¯å‰Šé™¤ã—ã¾ã™ã€‚以下ã«ç¤ºã™ã®ã¯ã€å‰Šæ¸›ã•ã‚ŒãŸ Github データセットã«å¯¾å¿œã—ãŸä¾‹ã§ã™ã€‚未対応㮠Array ã‚„ Map åž‹ã®ä¸åœ¨ã«æ³¨æ„ã—ã¦ãã ã•ã„: + +```sql +CREATE TABLE github +( + file_time DateTime, + event_type Enum('CommitCommentEvent' = 1, 'CreateEvent' = 2, 'DeleteEvent' = 3, 'ForkEvent' = 4, 'GollumEvent' = 5, 'IssueCommentEvent' = 6, 'IssuesEvent' = 7, 'MemberEvent' = 8, 'PublicEvent' = 9, 'PullRequestEvent' = 10, 'PullRequestReviewCommentEvent' = 11, 'PushEvent' = 12, 'ReleaseEvent' = 13, 'SponsorshipEvent' = 14, 'WatchEvent' = 15, 'GistEvent' = 16, 'FollowEvent' = 17, 'DownloadEvent' = 18, 'PullRequestReviewEvent' = 19, 'ForkApplyEvent' = 20, 'Event' = 21, 'TeamAddEvent' = 22), + actor_login LowCardinality(String), + repo_name LowCardinality(String), + created_at DateTime, + updated_at DateTime, + action Enum('none' = 0, 'created' = 1, 'added' = 2, 'edited' = 3, 'deleted' = 4, 'opened' = 5, 'closed' = 6, 'reopened' = 7, 'assigned' = 8, 'unassigned' = 9, 'labeled' = 10, 'unlabeled' = 11, 'review_requested' = 12, 'review_request_removed' = 13, 'synchronize' = 14, 'started' = 15, 'published' = 16, 'update' = 17, 'create' = 18, 'fork' = 19, 'merged' = 20), + comment_id UInt64, + path String, + ref LowCardinality(String), + ref_type Enum('none' = 0, 'branch' = 1, 'tag' = 2, 'repository' = 3, 'unknown' = 4), + creator_user_login LowCardinality(String), + number UInt32, + title String, + state Enum('none' = 0, 'open' = 1, 'closed' = 2), + assignee LowCardinality(String), + closed_at DateTime, + merged_at DateTime, + merge_commit_sha String, + merged_by LowCardinality(String), + review_comments UInt32, + member_login LowCardinality(String) +) ENGINE = MergeTree ORDER BY (event_type, repo_name, created_at) +``` + +#### 5. Kafka Connect ã‚’èµ·å‹•ã™ã‚‹ + +Kafka Connect ã‚’[スタンドアロン](https://docs.confluent.io/cloud/current/cp-component/connect-cloud-config.html#standalone-cluster)ã¾ãŸã¯[分散](https://docs.confluent.io/cloud/current/cp-component/connect-cloud-config.html#distributed-cluster)モードã§èµ·å‹•ã—ã¾ã™ã€‚ + +```bash +./bin/connect-standalone connect.properties.ini github-jdbc-sink.properties.ini +``` + +#### 6. Kafka ã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ + +æä¾›ã•ã‚ŒãŸ[スクリプトã¨è¨­å®š](https://github.com/ClickHouse/kafka-samples/tree/main/producer)を使用ã—㦠Kafka ã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’挿入ã—ã¾ã™ã€‚github.config を修正ã—㦠Kafka ã®èªè¨¼æƒ…報をå«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¹ã‚¯ãƒªãƒ—トã¯ç¾åœ¨ã€Confluent Cloud ã§ã®ä½¿ç”¨å‘ã‘ã«æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```bash +python producer.py -c github.config +``` + +ã“ã®ã‚¹ã‚¯ãƒªãƒ—トã¯ã€ä»»æ„ã® ndjson ファイルを Kafka トピックã«æŒ¿å…¥ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚スキーマを自動的ã«æŽ¨æ¸¬ã—よã†ã¨ã—ã¾ã™ã€‚æä¾›ã•ã‚ŒãŸã‚µãƒ³ãƒ—ル設定㯠10k ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ã¿ã‚’挿入ã—ã¾ã™ãŒã€å¿…è¦ãŒã‚ã‚Œã°[ã“ã¡ã‚‰](https://github.com/ClickHouse/clickhouse-docs/tree/main/docs/en/integrations/data-ingestion/kafka/code/producer/github.config#L25)ã§ä¿®æ­£ã—ã¦ãã ã•ã„。ã“ã®æ§‹æˆã¯ã¾ãŸã€Kafka ã¸ã®æŒ¿å…¥ä¸­ã«ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‹ã‚‰äº’æ›æ€§ã®ãªã„ Array フィールドを削除ã—ã¾ã™ã€‚ + +ã“れ㯠JDBC コãƒã‚¯ã‚¿ãŒãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ INSERT æ–‡ã«å¤‰æ›ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚自身ã®ãƒ‡ãƒ¼ã‚¿ã‚’使用ã™ã‚‹å ´åˆã€ã‚¹ã‚­ãƒ¼ãƒžã‚’å„メッセージã«æŒ¿å…¥ï¼ˆ`value.converter.schemas.enable` ã‚’ true ã«è¨­å®šï¼‰ã™ã‚‹ã‹ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’スキーマレジストリã«å‚ç…§ã—ãªãŒã‚‰å…¬é–‹ã™ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +Kafka Connect ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ¶ˆè²»ã‚’始ã‚ã€ClickHouse ã«è¡Œã‚’挿入ã—ã¦ã„ãã¯ãšã§ã™ã€‚「[JDBC Compliant Mode] トランザクションã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。ã€ã®è­¦å‘Šã¯äºˆæœŸã•ã‚Œã¦ãŠã‚Šã€ç„¡è¦–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ターゲットテーブル「Githubã€ã§ç°¡å˜ãªèª­ã¿å–ã‚Šã‚’è¡Œã†ã¨ã€ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ãŒç¢ºèªã§ãã¾ã™ã€‚ + +```sql +SELECT count() FROM default.github; +``` + +```response +| count\(\) | +| :--- | +| 10000 | +``` + +### 推奨ã•ã‚Œã‚‹ã•ã‚‰ãªã‚‹èª­ã¿ç‰© + +* [Kafka Sink Configuration Parameters](https://docs.confluent.io/kafka-connect-jdbc/current/sink-connector/sink_config_options.html#sink-config-options) +* [Kafka Connect Deep Dive – JDBC Source Connector](https://www.confluent.io/blog/kafka-connect-deep-dive-jdbc-source-connector) +* [Kafka Connect JDBC Sink deep-dive: Working with Primary Keys](https://rmoff.net/2021/03/12/kafka-connect-jdbc-sink-deep-dive-working-with-primary-keys/) +* [Kafka Connect in Action: JDBC Sink](https://www.youtube.com/watch?v=b-3qN_tlYR4&t=981s) - 読むより視è´ã‚’好む方ã«ã€‚ +* [Kafka Connect Deep Dive – Converters and Serialization Explained](https://www.confluent.io/blog/kafka-connect-deep-dive-converters-serialization-explained/#json-schemas) diff --git a/docs/ja/integrations/data-ingestion/kafka/kafka-table-engine-named-collections.md b/docs/ja/integrations/data-ingestion/kafka/kafka-table-engine-named-collections.md new file mode 100644 index 00000000000..2965a1c7494 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/kafka/kafka-table-engine-named-collections.md @@ -0,0 +1,214 @@ +--- +title: Named Collectionsを使用ã—ãŸClickHouseã¨Kafkaã®çµ±åˆ +description: named collectionsを使用ã—ã¦ClickHouseã‚’Kafkaã«æŽ¥ç¶šã™ã‚‹æ–¹æ³• +keywords: [named collection, 方法, kafka] +--- + +# Named Collectionsを使用ã—ãŸClickHouseã¨Kafkaã®çµ±åˆ + +## ã¯ã˜ã‚ã« + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€named collectionsを使用ã—ã¦ClickHouseã‚’Kafkaã«æŽ¥ç¶šã™ã‚‹æ–¹æ³•ã‚’探りã¾ã™ã€‚named collectionsã®ãŸã‚ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã™ã‚‹ã“ã¨ã«ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ãªåˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ï¼š +- 設定ã®é›†ä¸­ç®¡ç†ã¨å®¹æ˜“ãªç®¡ç†ã€‚ +- SQLテーブル定義を変更ã›ãšã«è¨­å®šã‚’変更å¯èƒ½ã€‚ +- å˜ä¸€ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’調査ã™ã‚‹ã“ã¨ã§ã€è¨­å®šã®ãƒ¬ãƒ“ューã¨ãƒˆãƒ©ãƒ–ルシューティングãŒå®¹æ˜“。 + +ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€Apache Kafka 3.4.1ã¨ClickHouse 24.5.1ã§ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## å‰ææ¡ä»¶ + +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ä»¥ä¸‹ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ï¼š +1. 動作中ã®Kafkaクラスター。 +2. 設定済ã¿ã§ç¨¼åƒä¸­ã®ClickHouseクラスター。 +3. SQLã®åŸºæœ¬çš„ãªçŸ¥è­˜ã¨ã€ClickHouseãŠã‚ˆã³Kafkaã®è¨­å®šã«é–¢ã™ã‚‹åŸºæœ¬ç†è§£ã€‚ + +## å¿…è¦æ¡ä»¶ + +named collectionを作æˆã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¿…è¦ãªã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’æŒã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„: + +```xml +1 +1 +1 +1 +``` + +アクセス制御を有効ã«ã™ã‚‹è©³ç´°ã«ã¤ã„ã¦ã¯ã€[ユーザー管ç†ã‚¬ã‚¤ãƒ‰](./../../../guides/sre/user-management/index.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 設定 + +ClickHouseã®`config.xml`ファイルã«ä»¥ä¸‹ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’追加ã—ã¦ãã ã•ã„: + +```xml + + + + + c1-kafka-1:9094,c1-kafka-2:9094,c1-kafka-3:9094 + cluster_1_clickhouse_topic + cluster_1_clickhouse_consumer + JSONEachRow + 0 + 1 + 1 + + + + SASL_SSL + false + PLAIN + kafka-client + kafkapassword1 + all + latest + + + + + + c2-kafka-1:29094,c2-kafka-2:29094,c2-kafka-3:29094 + cluster_2_clickhouse_topic + cluster_2_clickhouse_consumer + JSONEachRow + 0 + 1 + 1 + + + + SASL_SSL + false + PLAIN + kafka-client + kafkapassword2 + all + latest + + + +``` + +### 設定メモ + +1. Kafkaアドレスや関連設定をãŠä½¿ã„ã®Kafkaクラスター設定ã«åˆã‚ã›ã¦èª¿æ•´ã—ã¦ãã ã•ã„。 +2. ``ã®å‰ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯ã€ClickHouse Kafkaエンジンã®ãƒ‘ラメータãŒå«ã¾ã‚Œã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ‘ラメータã«ã¤ã„ã¦ã¯ã€[Kafkaエンジンパラメータ](https://clickhouse.com/docs/ja/engines/table-engines/integrations/kafka)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +3. ``内ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯ã€Kafka拡張設定オプションãŒå«ã¾ã‚Œã¾ã™ã€‚より多ãã®ã‚ªãƒ—ションã«ã¤ã„ã¦ã¯ã€[librdkafka設定](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +4. ã“ã®ä¾‹ã§ã¯ã€`SASL_SSL`セキュリティプロトコルã¨`PLAIN`メカニズムを使用ã—ã¦ã„ã¾ã™ã€‚ã“れらã®è¨­å®šã‚’ã‚ãªãŸã®Kafkaクラスター設定ã«åŸºã¥ã„ã¦èª¿æ•´ã—ã¦ãã ã•ã„。 + +## テーブルã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ä½œæˆ + +ClickHouseクラスター上ã«å¿…è¦ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ClickHouseã‚’å˜ä¸€ãƒŽãƒ¼ãƒ‰ã¨ã—ã¦å®Ÿè¡Œã—ã¦ã„ã‚‹å ´åˆã¯ã€SQLコマンドã®ã‚¯ãƒ©ã‚¹ã‚¿éƒ¨åˆ†ã‚’çœç•¥ã—ã€`ReplicatedMergeTree`ã®ä»£ã‚ã‚Šã«ä»–ã®ã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã—ã¦ãã ã•ã„。 + +### データベースã®ä½œæˆ + +```sql +CREATE DATABASE kafka_testing ON CLUSTER LAB_CLICKHOUSE_CLUSTER; +``` + +### Kafkaテーブルã®ä½œæˆ + +最åˆã®Kafkaクラスター用ã®æœ€åˆã®Kafkaテーブルを作æˆï¼š + +```sql +CREATE TABLE kafka_testing.first_kafka_table ON CLUSTER LAB_CLICKHOUSE_CLUSTER +( + `id` UInt32, + `first_name` String, + `last_name` String +) +ENGINE = Kafka(cluster_1); +``` + +2ã¤ç›®ã®Kafkaクラスター用ã®2ã¤ç›®ã®Kafkaテーブルを作æˆï¼š + +```sql +CREATE TABLE kafka_testing.second_kafka_table ON CLUSTER STAGE_CLICKHOUSE_CLUSTER +( + `id` UInt32, + `first_name` String, + `last_name` String +) +ENGINE = Kafka(cluster_2); +``` + +### レプリケートテーブルã®ä½œæˆ + +最åˆã®Kafkaテーブル用ã®ãƒ†ãƒ¼ãƒ–ルを作æˆï¼š + +```sql +CREATE TABLE kafka_testing.first_replicated_table ON CLUSTER STAGE_CLICKHOUSE_CLUSTER +( + `id` UInt32, + `first_name` String, + `last_name` String +) ENGINE = ReplicatedMergeTree() +ORDER BY id; +``` + +2ã¤ç›®ã®Kafkaテーブル用ã®ãƒ†ãƒ¼ãƒ–ルを作æˆï¼š + +```sql +CREATE TABLE kafka_testing.second_replicated_table ON CLUSTER STAGE_CLICKHOUSE_CLUSTER +( + `id` UInt32, + `first_name` String, + `last_name` String +) ENGINE = ReplicatedMergeTree() +ORDER BY id; +``` + +### Materialized Viewã®ä½œæˆ + +最åˆã®Kafkaテーブルã‹ã‚‰æœ€åˆã®ãƒ¬ãƒ—リケートテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ãŸã‚ã®materialized viewを作æˆï¼š + +```sql +CREATE MATERIALIZED VIEW kafka_testing.cluster_1_mv ON CLUSTER STAGE_CLICKHOUSE_CLUSTER TO first_replicated_table AS +SELECT + id, + first_name, + last_name +FROM first_kafka_table; +``` + +2ã¤ç›®ã®Kafkaテーブルã‹ã‚‰2ã¤ç›®ã®ãƒ¬ãƒ—リケートテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ãŸã‚ã®materialized viewを作æˆï¼š + +```sql +CREATE MATERIALIZED VIEW kafka_testing.cluster_2_mv ON CLUSTER STAGE_CLICKHOUSE_CLUSTER TO second_replicated_table AS +SELECT + id, + first_name, + last_name +FROM second_kafka_table; +``` + +## 設定ã®æ¤œè¨¼ + +Kafkaクラスター上ã§ä»¥ä¸‹ã®æ¶ˆè²»è€…グループãŒè¦‹ãˆã‚‹ã¯ãšã§ã™ï¼š +- `cluster_1_clickhouse_consumer` on `cluster_1` +- `cluster_2_clickhouse_consumer` on `cluster_2` + +ClickHouseノードã®ã„ãšã‚Œã‹ã§ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¦ã€ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ã‚’確èªã—ã¦ãã ã•ã„: + +```sql +SELECT * FROM first_replicated_table LIMIT 10; +``` + +```sql +SELECT * FROM second_replicated_table LIMIT 10; +``` + +### メモ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ä¸¡æ–¹ã®Kafkaトピックã«å–ã‚Šè¾¼ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã¯åŒã˜ã§ã™ãŒã€å®Ÿéš›ã«ã¯ç•°ãªã‚‹ã§ã—ょã†ã€‚å¿…è¦ã«å¿œã˜ã¦å¤šãã®Kafkaクラスターを追加ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +例ã®å‡ºåŠ›ï¼š + +```sql +┌─id─┬─first_name─┬─last_name─┠+│ 0 │ FirstName0 │ LastName0 │ +│ 1 │ FirstName1 │ LastName1 │ +│ 2 │ FirstName2 │ LastName2 │ +└────┴────────────┴───────────┘ +``` + +ã“ã‚Œã§ã€Named Collectionsを使用ã—ãŸClickHouseã¨Kafkaã®çµ±åˆã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã¯å®Œäº†ã§ã™ã€‚ClickHouseã®`config.xml`ファイルã«Kafka設定を集中ã•ã›ã‚‹ã“ã¨ã§ã€è¨­å®šã®ç®¡ç†ã¨èª¿æ•´ãŒã‚ˆã‚Šç°¡å˜ã«ãªã‚Šã€åŠ¹çŽ‡çš„ãªçµ±åˆãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/kafka/kafka-table-engine.md b/docs/ja/integrations/data-ingestion/kafka/kafka-table-engine.md new file mode 100644 index 00000000000..36e2e3f7415 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/kafka/kafka-table-engine.md @@ -0,0 +1,486 @@ +--- +sidebar_label: Kafka テーブルエンジン +sidebar_position: 5 +slug: /ja/integrations/kafka/kafka-table-engine +description: Kafka テーブルエンジンã®ä½¿ç”¨ +--- + +# Kafka テーブルエンジンã®ä½¿ç”¨ + +:::note +Kafka テーブルエンジンã¯[ClickHouse Cloud](https://clickhouse.com/cloud)ã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。[ClickPipes](../clickpipes/kafka.md)ã¾ãŸã¯[Kafka Connect](./kafka-clickhouse-connect-sink.md)を検討ã—ã¦ãã ã•ã„。 +::: + +### Kafka ã‚’ ClickHouse 㸠+ +Kafka テーブルエンジンを使用ã™ã‚‹ã«ã¯ã€[ClickHouse ã® Materialized View](../../../guides/developer/cascading-materialized-views.md)ã«ã¤ã„ã¦åŸºæœ¬çš„ãªçŸ¥è­˜ãŒå¿…è¦ã§ã™ã€‚ + +#### æ¦‚è¦ + +åˆã‚ã«æ³¨ç›®ã™ã‚‹ã®ã¯æœ€ã‚‚一般的ãªãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§ã™ã€‚Kafka テーブルエンジンを使用ã—㦠Kafka ã‹ã‚‰ ClickHouse ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ã€‚ + +Kafka テーブルエンジンã¯ã€ClickHouse ㌠Kafka トピックã‹ã‚‰ç›´æŽ¥ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚トピック上ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã™ãŒã€è¨­è¨ˆä¸Šã€ã‚¯ã‚¨ãƒªãŒãƒ†ãƒ¼ãƒ–ルã«ç™ºè¡Œã•ã‚ŒãŸã¨ãã«ã‚­ãƒ¥ãƒ¼ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’消費ã—ã€ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’増やã—ã¦ã‹ã‚‰çµæžœã‚’呼ã³å‡ºã—å…ƒã«è¿”ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ã“れらã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’リセットã—ãªã„é™ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’å†èª­ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +ã“ã®ãƒ†ãƒ¼ãƒ–ルエンジンã‹ã‚‰èª­ã¿è¾¼ã‚“ã ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’キャプãƒãƒ£ã—ã¦åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹æ–¹æ³•ãŒå¿…è¦ã§ã™ã€‚トリガーã«åŸºã¥ã Materialized View ãŒãƒã‚¤ãƒ†ã‚£ãƒ–ã«ãã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚Materialized View ã¯ãƒ†ãƒ¼ãƒ–ルエンジンã®èª­ã¿å–りを開始ã—ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãƒãƒƒãƒã‚’å—ä¿¡ã—ã¾ã™ã€‚TO å¥ãŒãƒ‡ãƒ¼ã‚¿ã®å®›å…ˆã‚’決定ã™ã‚‹ - 通常㯠[MergeTree ファミリー](../../../engines/table-engines/mergetree-family/index.md)ã®ãƒ†ãƒ¼ãƒ–ルã§ã™ã€‚ã“ã®ãƒ—ロセスã¯ä»¥ä¸‹ã®å›³ã§è¦–覚化ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +Kafka テーブルエンジン + +#### ステップ + +##### 1. 準備 + +対象トピックã«ãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚‹å ´åˆã€ä»¥ä¸‹ã®è¦ç´ ã‚’データセットã«é©ç”¨ã§ãã¾ã™ã€‚ã‚ã‚‹ã„ã¯ã€ã‚µãƒ³ãƒ—ル㮠Github データセットãŒ[ã“ã¡ã‚‰](https://datasets-documentation.s3.eu-west-3.amazonaws.com/kafka/github_all_columns.ndjson)ã§æä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ä»¥ä¸‹ã®ä¾‹ã§ä½¿ç”¨ã•ã‚Œã¦ãŠã‚Šã€å®Œå…¨ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆï¼ˆ[ã“ã¡ã‚‰](https://ghe.clickhouse.tech/))ã«æ¯”ã¹ã¦ã‚¹ã‚­ãƒ¼ãƒžãŒç¸®å°ã•ã‚Œã€è¡Œã®ã‚µãƒ–セット(具体的ã«ã¯[ClickHouse リãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/ClickHouse)ã«é–¢é€£ã™ã‚‹ Github イベントã«é™å®šï¼‰ã‚’使用ã—ã¦ã„ã¾ã™ãŒã€ãã‚Œã§ã‚‚データセットã¨å…±ã«å…¬é–‹ã•ã‚Œã¦ã„ã‚‹ã»ã¨ã‚“ã©ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã«ã¯å分ã§ã™ã€‚ + +##### 2. ClickHouse を設定 + +安全㪠Kafka ã«æŽ¥ç¶šã—ã¦ã„ã‚‹å ´åˆã¯ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ãŒå¿…è¦ã§ã™ã€‚ã“れらã®è¨­å®šã¯ SQL DDL コマンドを通ã˜ã¦æ¸¡ã™ã“ã¨ãŒã§ããšã€ClickHouse ã® config.xml ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚SASL ã§ä¿è­·ã•ã‚ŒãŸã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«æŽ¥ç¶šã—ã¦ã„ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ã“れ㯠Confluent Cloud ã¨å¯¾è©±ã™ã‚‹éš›ã®æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã§ã™ã€‚ + +```xml + + + username + password + sasl_ssl + PLAIN + + +``` + +上記ã®ã‚¹ãƒ‹ãƒšãƒƒãƒˆã‚’æ–°ã—ã„ファイルã¨ã—㦠conf.d/ ディレクトリã«ç½®ãã‹ã€æ—¢å­˜ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒžãƒ¼ã‚¸ã—ã¾ã™ã€‚設定ã§ãる設定ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](../../../engines/table-engines/integrations/kafka.md#configuration)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ã¯ `KafkaEngine` ã¨ã„ã†ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã—ã¾ã™ã€‚ + +```sql +CREATE DATABASE KafkaEngine; +``` + +データベースを作æˆã—ãŸã‚‰ã€ãã“ã«åˆ‡ã‚Šæ›¿ãˆã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +USE KafkaEngine; +``` + +##### 3. 目的ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ + +目的ã®ãƒ†ãƒ¼ãƒ–ルを準備ã—ã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ç°¡æ½”ã«ã™ã‚‹ãŸã‚ã«ç¸®å°ã•ã‚ŒãŸ GitHub スキーマを使用ã—ã¾ã™ã€‚MergeTree テーブルエンジンを使用ã—ã¦ã„ã¾ã™ãŒã€ã“ã®ä¾‹ã¯ [MergeTree ファミリー](../../../engines/table-engines/mergetree-family/index.md)ã®ã„ãšã‚Œã®ãƒ¡ãƒ³ãƒãƒ¼ã«ã‚‚ç°¡å˜ã«é©å¿œã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE github +( + file_time DateTime, + event_type Enum('CommitCommentEvent' = 1, 'CreateEvent' = 2, 'DeleteEvent' = 3, 'ForkEvent' = 4, 'GollumEvent' = 5, 'IssueCommentEvent' = 6, 'IssuesEvent' = 7, 'MemberEvent' = 8, 'PublicEvent' = 9, 'PullRequestEvent' = 10, 'PullRequestReviewCommentEvent' = 11, 'PushEvent' = 12, 'ReleaseEvent' = 13, 'SponsorshipEvent' = 14, 'WatchEvent' = 15, 'GistEvent' = 16, 'FollowEvent' = 17, 'DownloadEvent' = 18, 'PullRequestReviewEvent' = 19, 'ForkApplyEvent' = 20, 'Event' = 21, 'TeamAddEvent' = 22), + actor_login LowCardinality(String), + repo_name LowCardinality(String), + created_at DateTime, + updated_at DateTime, + action Enum('none' = 0, 'created' = 1, 'added' = 2, 'edited' = 3, 'deleted' = 4, 'opened' = 5, 'closed' = 6, 'reopened' = 7, 'assigned' = 8, 'unassigned' = 9, 'labeled' = 10, 'unlabeled' = 11, 'review_requested' = 12, 'review_request_removed' = 13, 'synchronize' = 14, 'started' = 15, 'published' = 16, 'update' = 17, 'create' = 18, 'fork' = 19, 'merged' = 20), + comment_id UInt64, + path String, + ref LowCardinality(String), + ref_type Enum('none' = 0, 'branch' = 1, 'tag' = 2, 'repository' = 3, 'unknown' = 4), + creator_user_login LowCardinality(String), + number UInt32, + title String, + labels Array(LowCardinality(String)), + state Enum('none' = 0, 'open' = 1, 'closed' = 2), + assignee LowCardinality(String), + assignees Array(LowCardinality(String)), + closed_at DateTime, + merged_at DateTime, + merge_commit_sha String, + requested_reviewers Array(LowCardinality(String)), + merged_by LowCardinality(String), + review_comments UInt32, + member_login LowCardinality(String) +) ENGINE = MergeTree ORDER BY (event_type, repo_name, created_at) +``` + +##### 4. トピックを作æˆã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ + +次ã«ã€ãƒˆãƒ”ックを作æˆã—ã¾ã™ã€‚ã“れを行ã†ãŸã‚ã®ã„ãã¤ã‹ã®ãƒ„ールãŒã‚ã‚Šã¾ã™ã€‚Kafka をローカルマシンã¾ãŸã¯ Docker コンテナ内ã§å®Ÿè¡Œã—ã¦ã„ã‚‹å ´åˆã€[RPK](https://docs.redpanda.com/current/get-started/rpk-install/) ãŒã‚ˆã機能ã—ã¾ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—㦠5パーティション㮠`github` ã¨ã„ã†ãƒˆãƒ”ックを作æˆã§ãã¾ã™ã€‚ + +```bash +rpk topic create -p 5 github --brokers : +``` + +Confluent Cloud 上㧠Kafka を実行ã—ã¦ã„ã‚‹å ´åˆã¯ã€[Confluent CLI](https://docs.confluent.io/platform/current/tutorials/examples/clients/docs/kcat.html#produce-records)を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +```bash +confluent kafka topic create --if-not-exists github +``` + +次ã«ã€ã“ã®ãƒˆãƒ”ックã«ãƒ‡ãƒ¼ã‚¿ã‚’投入ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れ㯠[kcat](https://github.com/edenhill/kcat) を使用ã—ã¦è¡Œã„ã¾ã™ã€‚èªè¨¼ãŒç„¡åŠ¹ãªçŠ¶æ…‹ã§ Kafka をローカルã§å®Ÿè¡Œã—ã¦ã„ã‚‹å ´åˆã¯ã€æ¬¡ã®ã‚ˆã†ãªã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã§ãã¾ã™ã€‚ + +```bash +cat github_all_columns.ndjson | +kcat -P \ + -b : \ + -t github +``` + +ã¾ãŸã¯ã€SASL を使用ã—ã¦èªè¨¼ã™ã‚‹ Kafka クラスターã®å ´åˆï¼š + +```bash +cat github_all_columns.ndjson | +kcat -P \ + -b : \ + -t github + -X security.protocol=sasl_ssl \ + -X sasl.mechanisms=PLAIN \ + -X sasl.username= \ + -X sasl.password= \ +``` + +データセットã«ã¯ 200,000 è¡ŒãŒå«ã¾ã‚Œã¦ã„ã‚‹ãŸã‚ã€æ•°ç§’ã§å–ã‚Šè¾¼ã¾ã‚Œã‚‹ã¯ãšã§ã™ã€‚より大ããªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’扱ã„ãŸã„å ´åˆã¯ã€[the large datasets section](https://github.com/ClickHouse/kafka-samples/tree/main/producer#large-datasets) of the [ClickHouse/kafka-samples](https://github.com/ClickHouse/kafka-samples) GitHub リãƒã‚¸ãƒˆãƒªã‚’ã”覧ãã ã•ã„。 + +##### 5. Kafka テーブルエンジンã®ä½œæˆ + +以下ã®ä¾‹ã¯ã€ãƒžãƒ¼ã‚¸ãƒ„リーテーブルã¨åŒã˜ã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルエンジンを作æˆã—ã¾ã™ã€‚ã“ã‚Œã¯åŽ³å¯†ã«ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。ターゲットテーブルã«ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚„エフェメラルカラムをæŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€è¨­å®šã¯é‡è¦ã§ã™ã€‚Kafka トピックã‹ã‚‰ JSON を消費ã™ã‚‹ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¨ã—㦠`JSONEachRow` を使用ã—ã¦ã„る点ã«æ³¨æ„ã—ã¦ãã ã•ã„。`github` ãŠã‚ˆã³ `clickhouse` ã¯ãã‚Œãžã‚Œãƒˆãƒ”ックåã¨ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã‚°ãƒ«ãƒ¼ãƒ—åを表ã—ã¦ã„ã¾ã™ã€‚トピックã¯å®Ÿéš›ã«ã¯å€¤ã®ãƒªã‚¹ãƒˆã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE github_queue +( + file_time DateTime, + event_type Enum('CommitCommentEvent' = 1, 'CreateEvent' = 2, 'DeleteEvent' = 3, 'ForkEvent' = 4, 'GollumEvent' = 5, 'IssueCommentEvent' = 6, 'IssuesEvent' = 7, 'MemberEvent' = 8, 'PublicEvent' = 9, 'PullRequestEvent' = 10, 'PullRequestReviewCommentEvent' = 11, 'PushEvent' = 12, 'ReleaseEvent' = 13, 'SponsorshipEvent' = 14, 'WatchEvent' = 15, 'GistEvent' = 16, 'FollowEvent' = 17, 'DownloadEvent' = 18, 'PullRequestReviewEvent' = 19, 'ForkApplyEvent' = 20, 'Event' = 21, 'TeamAddEvent' = 22), + actor_login LowCardinality(String), + repo_name LowCardinality(String), + created_at DateTime, + updated_at DateTime, + action Enum('none' = 0, 'created' = 1, 'added' = 2, 'edited' = 3, 'deleted' = 4, 'opened' = 5, 'closed' = 6, 'reopened' = 7, 'assigned' = 8, 'unassigned' = 9, 'labeled' = 10, 'unlabeled' = 11, 'review_requested' = 12, 'review_request_removed' = 13, 'synchronize' = 14, 'started' = 15, 'published' = 16, 'update' = 17, 'create' = 18, 'fork' = 19, 'merged' = 20), + comment_id UInt64, + path String, + ref LowCardinality(String), + ref_type Enum('none' = 0, 'branch' = 1, 'tag' = 2, 'repository' = 3, 'unknown' = 4), + creator_user_login LowCardinality(String), + number UInt32, + title String, + labels Array(LowCardinality(String)), + state Enum('none' = 0, 'open' = 1, 'closed' = 2), + assignee LowCardinality(String), + assignees Array(LowCardinality(String)), + closed_at DateTime, + merged_at DateTime, + merge_commit_sha String, + requested_reviewers Array(LowCardinality(String)), + merged_by LowCardinality(String), + review_comments UInt32, + member_login LowCardinality(String) +) + ENGINE = Kafka('kafka_host:9092', 'github', 'clickhouse', + 'JSONEachRow') settings kafka_thread_per_consumer = 0, kafka_num_consumers = 1; +``` + +エンジンã®è¨­å®šã¨ãƒ‘フォーマンスãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚°ã«ã¤ã„ã¦ã¯å¾Œè¿°ã—ã¾ã™ã€‚ã“ã®æ™‚点ã§ã€ãƒ†ãƒ¼ãƒ–ル `github_queue` ã«å¯¾ã™ã‚‹å˜ç´”㪠select ã‚’è¡Œã†ã¨ã„ãã¤ã‹ã®è¡ŒãŒèª­ã¿å–れるã¯ãšã§ã™ã€‚ãã®éš›ã«ã¯ã€ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã‚ªãƒ•ã‚»ãƒƒãƒˆãŒé€²ã‚€ãŸã‚ã€ã“れらã®è¡Œã‚’å†èª­ã™ã‚‹ã«ã¯[リセット](#common-operations)ãŒå¿…è¦ã§ã™ã€‚制é™ã¨å¿…è¦ãªãƒ‘ラメーター `stream_like_engine_allow_direct_select` ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +##### 6. Materialized View ã®ä½œæˆ + +Materialized View ã¯ã€ä»¥å‰ã«ä½œæˆã—ãŸ2ã¤ã®ãƒ†ãƒ¼ãƒ–ルを接続ã—ã€ã‚«ãƒ•ã‚«ãƒ†ãƒ¼ãƒ–ルエンジンã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã®ãƒžãƒ¼ã‚¸ãƒ„リーテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ã€‚多ãã®ãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚’è¡Œãˆã¾ã™ã€‚ã“ã“ã§ã¯ç°¡å˜ãªèª­ã¿å–ã‚Šã¨æŒ¿å…¥ã‚’è¡Œã„ã¾ã™ã€‚* を使用ã™ã‚‹ã¨ã€ã‚«ãƒ©ãƒ åãŒåŒä¸€ï¼ˆå¤§æ–‡å­—å°æ–‡å­—を区別)ã§ã‚ã‚‹ã“ã¨ãŒå‰æã¨ãªã‚Šã¾ã™ã€‚ + +```sql +CREATE MATERIALIZED VIEW github_mv TO github AS +SELECT * +FROM github_queue; +``` + +作æˆæ™‚点ã§ã€Materialized View 㯠Kafka エンジンã«æŽ¥ç¶šã—ã€èª­ã¿å–りを開始ã—ã€è¡Œã‚’ターゲットテーブルã«æŒ¿å…¥ã—ã¾ã™ã€‚ã“ã®ãƒ—ロセスã¯ç„¡æœŸé™ã«ç¶šãã€Kafka ã¸ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®è¿½åŠ ãŒæ¶ˆè²»ã•ã‚Œç¶šã‘ã¾ã™ã€‚Kafka ã«ã•ã‚‰ã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’追加ã™ã‚‹ãŸã‚ã«æŒ¿å…¥ã‚¹ã‚¯ãƒªãƒ—トをå†åº¦å®Ÿè¡Œã—ã¦ã¿ã¦ãã ã•ã„。 + +##### 7. 挿入ã•ã‚ŒãŸè¡Œã‚’確èªã™ã‚‹ + +ターゲットテーブルã«ãƒ‡ãƒ¼ã‚¿ãŒå­˜åœ¨ã™ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +```sql +SELECT count() FROM github; +``` + +200,000 è¡ŒãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™: +```response +┌─count()─┠+│ 200000 │ +└─────────┘ +``` + +#### 一般的ãªæ“作 + +##### メッセージ消費ã®åœæ­¢ã¨å†é–‹ + +メッセージ消費をåœæ­¢ã™ã‚‹ã«ã¯ã€Kafka エンジンテーブルをデタッãƒã—ã¾ã™ã€‚ + +```sql +DETACH TABLE github_queue; +``` + +ã“ã‚Œã¯ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã‚°ãƒ«ãƒ¼ãƒ—ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。消費をå†é–‹ã—ã€å‰å›žã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‹ã‚‰ç¶šè¡Œã™ã‚‹ã«ã¯ãƒ†ãƒ¼ãƒ–ルをå†ã‚¢ã‚¿ãƒƒãƒã—ã¾ã™ã€‚ + +```sql +ATTACH TABLE github_queue; +``` + +##### Kafka メタデータã®è¿½åŠ  + +元㮠Kafka メッセージã‹ã‚‰ã€ClickHouse ã«å–ã‚Šè¾¼ã¾ã‚ŒãŸå¾Œã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’追跡ã™ã‚‹ã“ã¨ã¯æœ‰ç”¨ã§ã™ã€‚ãŸã¨ãˆã°ã€ç‰¹å®šã®ãƒˆãƒ”ックやパーティションã‹ã‚‰ã©ã‚Œã ã‘消費ã—ãŸã‹ã‚’知りãŸã„å ´åˆã§ã™ã€‚ã“ã®ç›®çš„ã®ãŸã‚ã«ã€Kafka テーブルエンジンã«ã¯ã„ãã¤ã‹ã®[仮想カラム](../../../engines/table-engines/index.md#table_engines-virtual_columns)ãŒå…¬é–‹ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“れらをターゲットテーブルã®ã‚«ãƒ©ãƒ ã¨ã—ã¦ä¿æŒã™ã‚‹ã«ã¯ã€ã‚¹ã‚­ãƒ¼ãƒžã¨ Materialized View ã® select 文を変更ã—ã¾ã™ã€‚ + +ã¾ãšã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«ã‚«ãƒ©ãƒ ã‚’追加ã™ã‚‹å‰ã«ã€ä¸Šã§èª¬æ˜Žã—ãŸåœæ­¢æ“作を実行ã—ã¾ã™ã€‚ + +```sql +DETACH TABLE github_queue; +``` + +以下ã¯ã€è¡ŒãŒã©ã®ãƒˆãƒ”ックãŠã‚ˆã³ãƒ‘ーティションã‹ã‚‰æ¥ãŸã®ã‹ã‚’識別ã™ã‚‹æƒ…報カラムを追加ã—ã¾ã™ã€‚ + +```sql +ALTER TABLE github + ADD COLUMN topic String, + ADD COLUMN partition UInt64; +``` + +次ã«ã€å¿…è¦ãªã‚ˆã†ã«ä»®æƒ³ã‚«ãƒ©ãƒ ã‚’マップã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +仮想カラム㯠`_` ã§å§‹ã¾ã‚Šã¾ã™ã€‚ +仮想カラムã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯[ã“ã¡ã‚‰](../../../engines/table-engines/integrations/kafka.md#virtual-columns)ã«ã‚ã‚Šã¾ã™ã€‚ + +仮想カラムã§ãƒ†ãƒ¼ãƒ–ルを更新ã™ã‚‹ã«ã¯ã€Materialized View を削除ã—ã€Kafka エンジンテーブルをå†ã‚¢ã‚¿ãƒƒãƒã—ã€Materialized View ã‚’å†ä½œæˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +DROP VIEW github_mv; +``` + +```sql +ATTACH TABLE github_queue; +``` + +```sql +CREATE MATERIALIZED VIEW github_mv TO github AS +SELECT *, _topic as topic, _partition as partition +FROM github_queue; +``` + +æ–°ãŸã«æ¶ˆè²»ã•ã‚ŒãŸè¡Œã«ã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +```sql +SELECT actor_login, event_type, created_at, topic, partition +FROM github +LIMIT 10; +``` + +çµæžœã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + +| actor_login | event_type | created_at | topic | partition | +| :--- | :--- | :--- | :--- | :--- | +| IgorMinar | CommitCommentEvent | 2011-02-12 02:22:00 | github | 0 | +| queeup | CommitCommentEvent | 2011-02-12 02:23:23 | github | 0 | +| IgorMinar | CommitCommentEvent | 2011-02-12 02:23:24 | github | 0 | +| IgorMinar | CommitCommentEvent | 2011-02-12 02:24:50 | github | 0 | +| IgorMinar | CommitCommentEvent | 2011-02-12 02:25:20 | github | 0 | +| dapi | CommitCommentEvent | 2011-02-12 06:18:36 | github | 0 | +| sourcerebels | CommitCommentEvent | 2011-02-12 06:34:10 | github | 0 | +| jamierumbelow | CommitCommentEvent | 2011-02-12 12:21:40 | github | 0 | +| jpn | CommitCommentEvent | 2011-02-12 12:24:31 | github | 0 | +| Oxonium | CommitCommentEvent | 2011-02-12 12:31:28 | github | 0 | + +##### Kafka エンジンã®è¨­å®šã‚’変更ã™ã‚‹ + +Kafka エンジンテーブルをドロップã—ã¦æ–°ã—ã„設定ã§å†ä½œæˆã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã®ãƒ—ロセス中㫠Materialized View を変更ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“ - Kafka エンジンテーブルãŒå†ä½œæˆã•ã‚Œã‚‹ã¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æ¶ˆè²»ã¯å†é–‹ã•ã‚Œã¾ã™ã€‚ + +##### å•é¡Œã®ãƒ‡ãƒãƒƒã‚° + +èªè¨¼ã®å•é¡Œãªã©ã®ã‚¨ãƒ©ãƒ¼ã¯ã€Kafka エンジン DDL ã«å¯¾ã™ã‚‹å¿œç­”ã«å ±å‘Šã•ã‚Œã¾ã›ã‚“。å•é¡Œã®è¨ºæ–­ã«ã¯ã€ä¸»è¦ãª ClickHouse ログファイル clickhouse-server.err.log を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚基盤ã¨ãªã‚‹ Kafka クライアントライブラリ [librdkafka](https://github.com/edenhill/librdkafka) ã®ã•ã‚‰ãªã‚‹ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ­ã‚°ã¯è¨­å®šã‚’通ã˜ã¦æœ‰åŠ¹ã«ã§ãã¾ã™ã€‚ + +```xml + + all + +``` + +##### ç ´æã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å‡¦ç† + +Kafka ã¯ã—ã°ã—ã°ãƒ‡ãƒ¼ã‚¿ã®ã€Œä¸€æ™‚ä¿ç®¡æ‰€ã€ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒˆãƒ”ックã«æ··åœ¨ã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸å½¢å¼ã‚„ä¸ä¸€è‡´ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰åãŒå«ã¾ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®çŠ¶æ³ã‚’é¿ã‘ã€Kafka Streams ã‚„ ksqlDB ãªã©ã® Kafka 機能を活用ã—ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒ Kafka ã«æŒ¿å…¥ã•ã‚Œã‚‹å‰ã«ã€æ•´å½¢ã•ã‚Œã€ä¸€è²«æ€§ã®ã‚ã‚‹ã‚‚ã®ã«ã—ã¾ã™ã€‚ã“れらã®ã‚ªãƒ—ションãŒåˆ©ç”¨ã§ããªã„å ´åˆã€ClickHouse ã«ã¯å½¹ç«‹ã¤ã„ãã¤ã‹ã®æ©Ÿèƒ½ãŒã‚ã‚Šã¾ã™ã€‚ + +* メッセージフィールドを文字列ã¨ã—ã¦å‡¦ç†ã—ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã€Materialized View æ–‡ã§é–¢æ•°ã‚’使用ã—ã¦ã‚¯ãƒ¬ãƒ³ã‚¸ãƒ³ã‚°ã‚„キャスティングを行ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯æœ¬ç•ªç’°å¢ƒã§ã®ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表ã™ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€1回é™ã‚Šã®ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆã«ã¯å½¹ç«‹ã¤ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +* JSONEachRow フォーマットを使用ã—ã¦ã€ãƒˆãƒ”ックã‹ã‚‰ JSON を消費ã—ã¦ã„ã‚‹å ´åˆã¯ã€è¨­å®š [`input_format_skip_unknown_fields`](../../../operations/settings/settings-formats.md#settings-input-format-skip-unknown-fields) を使用ã—ã¾ã™ã€‚データを書ã込む際ã«ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ ClickHouse ã¯ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«å­˜åœ¨ã—ãªã„カラムãŒå…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã«å«ã¾ã‚Œã¦ã„ã‚‹ã¨ãã«ä¾‹å¤–を投ã’ã¾ã™ã€‚ãŸã ã—ã€ã“ã®ã‚ªãƒ—ションãŒæœ‰åŠ¹ã«ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“れらã®ä½™åˆ†ãªã‚«ãƒ©ãƒ ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ã“れもã¾ãŸæœ¬ç•ªãƒ¬ãƒ™ãƒ«ã®ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã§ã¯ãªãã€ä»–ã®äººã‚’æ··ä¹±ã•ã›ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +* `kafka_skip_broken_messages` 設定を考慮ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ–ロックã”ã¨ã«ç ´æã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«å¯¾ã™ã‚‹è¨±å®¹åº¦ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€kafka_max_block_size ã®æ–‡è„ˆã§è€ƒæ…®ã•ã‚Œã¾ã™ã€‚ã“ã®è¨±å®¹åº¦ã‚’超ãˆã‚‹ã¨ï¼ˆçµ¶å¯¾ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸å˜ä½ã§æ¸¬å®šï¼‰ã€é€šå¸¸ã®ä¾‹å¤–処ç†ã«æˆ»ã‚Šã€ä»–ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ + +##### é…信セマンティクスã¨é‡è¤‡ã«é–¢ã™ã‚‹èª²é¡Œ + +Kafka テーブルエンジンã¯å°‘ãªãã¨ã‚‚一度ã®ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã‚’æŒã£ã¦ã„ã¾ã™ã€‚稀ãªçŠ¶æ³ã§é‡è¤‡ãŒç”Ÿã˜ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒ Kafka ã‹ã‚‰èª­ã¿å–られã€ClickHouse ã«æ­£å¸¸ã«æŒ¿å…¥ã•ã‚ŒãŸå ´åˆã€æ–°ã—ã„オフセットをコミットã™ã‚‹å‰ã« Kafka ã¸ã®æŽ¥ç¶šãŒå¤±ã‚れるã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®çŠ¶æ³ã§ã¯ãƒ–ロックã®å†è©¦è¡ŒãŒå¿…è¦ã§ã™ã€‚ã“ã®ãƒ–ロックã¯ã€åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルや ReplicatedMergeTree をターゲットテーブルã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã§[データã®é‡è¤‡æŽ’除](../../../engines/table-engines/mergetree-family/replication.md#table_engines-replication)ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯é‡è¤‡è¡Œã®å¯èƒ½æ€§ã‚’減らã—ã¾ã™ãŒã€åŒä¸€ãƒ–ロックã«ä¾å­˜ã—ã¾ã™ã€‚Kafka ã®å†ãƒãƒ©ãƒ³ã‚¹ãªã©ã®ã‚¤ãƒ™ãƒ³ãƒˆã«ã‚ˆã£ã¦ã“ã®ä»®å®šãŒç„¡åŠ¹ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€ç¨€ã«é‡è¤‡ã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +##### クォーラムベースã®æŒ¿å…¥ + +ClickHouse ã§ã®ã‚ˆã‚Šé«˜ã„é…ä¿¡ä¿è¨¼ãŒå¿…è¦ãªå ´åˆã«ã¯[クォーラムベースã®æŒ¿å…¥](../../../operations/settings/settings.md#settings-insert_quorum)ã‚’è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れ㯠Materialized View やターゲットテーブルã«è¨­å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ãŸã ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロファイルã«è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```xml + + + 2 + + +``` + +### ClickHouse ã‹ã‚‰ Kafka 㸠+ +ã‚ã¾ã‚Šä¸€èˆ¬çš„ã§ãªã„ユースケースã§ã™ãŒã€ClickHouse ã®ãƒ‡ãƒ¼ã‚¿ã‚‚ Kafka ã«ä¿æŒã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€è¡Œã‚’手動㧠Kafka テーブルエンジンã«æŒ¿å…¥ã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯åŒã˜ Kafka エンジンã«ã‚ˆã£ã¦èª­ã¿å–られã€ãã® Materialized View ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ MergeTree テーブルã«é…ç½®ã—ã¾ã™ã€‚最後ã«ã€æ—¢å­˜ã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ Kafka ã«æŒ¿å…¥ã™ã‚‹éš›ã® Materialized View ã®å¿œç”¨ã‚’示ã—ã¾ã™ã€‚ + +#### ステップ + +ç§ãŸã¡ã®åˆæœŸã®ç›®çš„ã¯ä»¥ä¸‹ã®å›³ã§æœ€ã‚‚よã示ã•ã‚Œã¦ã„ã¾ã™ï¼š + +Kafka テーブルエンジンã®æŒ¿å…¥ + +[Kafka ã‚’ ClickHouse ã¸](#kafka-to-clickhouse)ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¨ãƒ“ューをæŒã£ã¦ã„ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã€ãƒˆãƒ”ックãŒå®Œå…¨ã«æ¶ˆè²»ã•ã‚Œã¦ã„ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ + +##### 1. 直接行を挿入ã™ã‚‹ + +ã¾ãšã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã®ä»¶æ•°ã‚’確èªã—ã¾ã™ã€‚ + +```sql +SELECT count() FROM github; +``` + +200,000 è¡ŒãŒã‚ã‚‹ã¯ãšã§ã™ï¼š +```response +┌─count()─┠+│ 200000 │ +└─────────┘ +``` + +GitHub ターゲットテーブルã‹ã‚‰ Kafka テーブルエンジン github_queue ã«è¡Œã‚’挿入ã—ã¾ã™ã€‚JSONEachRow フォーマットを活用ã—ã€SELECT ã‚’ 100 ã«åˆ¶é™ã™ã‚‹ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +```sql +INSERT INTO github_queue SELECT * FROM github LIMIT 100 FORMAT JSONEachRow +``` + +GitHub ã®è¡Œæ•°ã‚’å†ç¢ºèªã—ã¦ã€100 増加ã—ãŸã“ã¨ã‚’確èªã—ã¾ã™ã€‚上記ã®å›³ã«ç¤ºã™ã‚ˆã†ã«ã€è¡Œã¯ Kafka 㸠Kafka テーブルエンジンを介ã—ã¦æŒ¿å…¥ã•ã‚Œã€ãã®å¾Œ Materialized View ã«ã‚ˆã£ã¦ GitHub ターゲットテーブルã«å†æŒ¿å…¥ã•ã‚Œã¾ã—ãŸï¼ + +```sql +SELECT count() FROM github; +``` + +100 行追加ã•ã‚Œã¦ã„ã‚‹ã¯ãšã§ã™ï¼š +```response +┌─count()─┠+│ 200100 │ +└─────────┘ +``` + +##### 2. Materialized View ã®ä½¿ç”¨ + +Materialized View を利用ã—ã¦ã€ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆæŒ¿å…¥æ™‚ã« Kafka エンジン(ãŠã‚ˆã³ãƒˆãƒ”ック)ã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’プッシュã§ãã¾ã™ã€‚GitHub テーブルã«è¡ŒãŒæŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€Materialized View ãŒãƒˆãƒªã‚¬ãƒ¼ã•ã‚Œã€è¡ŒãŒå†ã³ Kafka エンジンãŠã‚ˆã³æ–°ã—ã„トピックã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ã“れもã¾ãŸä»¥ä¸‹ã®å›³ã§æœ€ã‚‚よã示ã•ã‚Œã¦ã„ã¾ã™ï¼š + +Kafka テーブルエンジン挿入㨠Materialized View + +`github_out` ã¾ãŸã¯åŒç­‰ã®æ–°ã—ã„ Kafka トピックを作æˆã—ã¾ã™ã€‚ã“ã®ãƒˆãƒ”ックを指㙠Kafka テーブルエンジン `github_out_queue` を作æˆã—ã¾ã™ã€‚ + +```sql +CREATE TABLE github_out_queue +( + file_time DateTime, + event_type Enum('CommitCommentEvent' = 1, 'CreateEvent' = 2, 'DeleteEvent' = 3, 'ForkEvent' = 4, 'GollumEvent' = 5, 'IssueCommentEvent' = 6, 'IssuesEvent' = 7, 'MemberEvent' = 8, 'PublicEvent' = 9, 'PullRequestEvent' = 10, 'PullRequestReviewCommentEvent' = 11, 'PushEvent' = 12, 'ReleaseEvent' = 13, 'SponsorshipEvent' = 14, 'WatchEvent' = 15, 'GistEvent' = 16, 'FollowEvent' = 17, 'DownloadEvent' = 18, 'PullRequestReviewEvent' = 19, 'ForkApplyEvent' = 20, 'Event' = 21, 'TeamAddEvent' = 22), + actor_login LowCardinality(String), + repo_name LowCardinality(String), + created_at DateTime, + updated_at DateTime, + action Enum('none' = 0, 'created' = 1, 'added' = 2, 'edited' = 3, 'deleted' = 4, 'opened' = 5, 'closed' = 6, 'reopened' = 7, 'assigned' = 8, 'unassigned' = 9, 'labeled' = 10, 'unlabeled' = 11, 'review_requested' = 12, 'review_request_removed' = 13, 'synchronize' = 14, 'started' = 15, 'published' = 16, 'update' = 17, 'create' = 18, 'fork' = 19, 'merged' = 20), + comment_id UInt64, + path String, + ref LowCardinality(String), + ref_type Enum('none' = 0, 'branch' = 1, 'tag' = 2, 'repository' = 3, 'unknown' = 4), + creator_user_login LowCardinality(String), + number UInt32, + title String, + labels Array(LowCardinality(String)), + state Enum('none' = 0, 'open' = 1, 'closed' = 2), + assignee LowCardinality(String), + assignees Array(LowCardinality(String)), + closed_at DateTime, + merged_at DateTime, + merge_commit_sha String, + requested_reviewers Array(LowCardinality(String)), + merged_by LowCardinality(String), + review_comments UInt32, + member_login LowCardinality(String) +) + ENGINE = Kafka('host:port', 'github_out', 'clickhouse_out', + 'JSONEachRow') settings kafka_thread_per_consumer = 0, kafka_num_consumers = 1; +``` + +次ã«ã€æ–°ã—ã„ Materialized View `github_out_mv` を作æˆã—㦠GitHub テーブルを指ã—ã€ãƒˆãƒªã‚¬ãƒ¼ã•ã‚Œã‚‹ã¨ä¸Šè¨˜ã®ã‚¨ãƒ³ã‚¸ãƒ³ã«è¡Œã‚’挿入ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™ã€‚GitHub テーブルã¸ã®è¿½åŠ ã¯ã€çµæžœã¨ã—ã¦æ–°ã—ã„ Kafka トピックã«ãƒ—ッシュã•ã‚Œã¾ã™ã€‚ + +```sql +CREATE MATERIALIZED VIEW github_out_mv TO github_out_queue AS +SELECT file_time, event_type, actor_login, repo_name, + created_at, updated_at, action, comment_id, path, + ref, ref_type, creator_user_login, number, title, + labels, state, assignee, assignees, closed_at, merged_at, + merge_commit_sha, requested_reviewers, merged_by, + review_comments, member_login +FROM github +FORMAT JsonEachRow; +``` + +オリジナル㮠github トピックã«æŒ¿å…¥ã™ã‚‹ã¨ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒã€Œgithub_clickhouseã€ãƒˆãƒ”ックã«é­”法ã®ã‚ˆã†ã«ç¾ã‚Œã¾ã™ã€‚ãƒã‚¤ãƒ†ã‚£ãƒ– Kafka ツールを使用ã—ã¦ã“れを確èªã—ã¦ãã ã•ã„。ãŸã¨ãˆã°ã€Confluent Cloud ホストã®ãƒˆãƒ”ックã«å¯¾ã—㦠[kcat](https://github.com/edenhill/kcat) を使用ã—㦠github トピック㫠100 行をインサートã—ã¾ã™ã€‚ + +```sql +head -n 10 github_all_columns.ndjson | +kcat -P \ + -b : \ + -t github + -X security.protocol=sasl_ssl \ + -X sasl.mechanisms=PLAIN \ + -X sasl.username= \ + -X sasl.password= +``` + +`github_out` トピックã®èª­ã¿å–ã‚Šã§ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®é…ä¿¡ãŒç¢ºèªã•ã‚Œã¾ã™ã€‚ + +```sql +kcat -C \ + -b : \ + -t github_out \ + -X security.protocol=sasl_ssl \ + -X sasl.mechanisms=PLAIN \ + -X sasl.username= \ + -X sasl.password= \ + -e -q | +wc -l +``` + +ã“ã‚Œã¯è¤‡é›‘ãªä¾‹ã§ã™ãŒã€Kafka エンジンã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã™ã‚‹å ´åˆã® Materialized View ã®åŠ›ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +### クラスターã¨ãƒ‘フォーマンス + +#### ClickHouse クラスターを使用ã™ã‚‹ + +Kafka コンシューマグループを通ã˜ã¦ã€è¤‡æ•°ã® ClickHouse インスタンスãŒåŒã˜ãƒˆãƒ”ックを読むã“ã¨ãŒã§ãã¾ã™ã€‚å„コンシューマ㯠1:1 マッピングã§ãƒˆãƒ”ックパーティションã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚Kafka テーブルエンジンを使用ã—㦠ClickHouse 消費をスケーリングã™ã‚‹éš›ã«ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã®ç·æ•°ãŒãƒˆãƒ”ックã®ãƒ‘ーティション数を超ãˆã‚‹ã“ã¨ãŒã§ããªã„ã“ã¨ã‚’考慮ã—ã¦ãã ã•ã„。ã—ãŸãŒã£ã¦ã€äº‹å‰ã«ãƒˆãƒ”ックã®ãƒ‘ーティションをé©åˆ‡ã«æ§‹æˆã—ã¦ãã ã•ã„。 + +複数㮠ClickHouse インスタンスãŒã€Kafka テーブルエンジンã®ä½œæˆä¸­ã«æŒ‡å®šã•ã‚ŒãŸåŒã˜ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã‚°ãƒ«ãƒ¼ãƒ— ID を使用ã—ã¦ãƒˆãƒ”ックを読ã¿è¾¼ã‚€ã‚ˆã†ã«æ§‹æˆã§ãã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€å„インスタンスã¯ä¸€ã¤ã¾ãŸã¯è¤‡æ•°ã®ãƒ‘ーティションã‹ã‚‰èª­ã¿å–ã‚Šã€ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã‚’ローカルã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã—ã¾ã™ã€‚ターゲットテーブルã¯ã€ãƒ‡ãƒ¼ã‚¿ã®é‡è¤‡ã‚’処ç†ã™ã‚‹ãŸã‚ã« ReplicatedMergeTree を使用ã—ã¦æ§‹æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã«ã‚ˆã‚Šã€å分㪠Kafka パーティションãŒã‚ã‚‹å ´åˆã¯ã€ClickHouse クラスターã«åˆã‚ã›ã¦ Kafka リードをスケールアウトã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +レプリケートã•ã‚ŒãŸ Kafka テーブルエンジン + +#### パフォーマンスã®ãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚° + +Kafka エンジン テーブルã®ã‚¹ãƒ«ãƒ¼ãƒ—ットパフォーマンスをå‘上ã•ã›ã‚‹éš›ã«ã¯æ¬¡ã®ç‚¹ã‚’考慮ã—ã¦ãã ã•ã„。 + +* パフォーマンスã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚µã‚¤ã‚ºã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€ãŠã‚ˆã³ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã®ã‚¿ã‚¤ãƒ—ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚å˜ä¸€ãƒ†ãƒ¼ãƒ–ルエンジン上ã§ã®ã‚¹ãƒ«ãƒ¼ãƒ—ットã¯ã€100k è¡Œ/秒を目標ã«ã™ã‚‹ã¹ãã§ã™ã€‚既定ã§ã¯ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ãƒ–ロックã§èª­ã¿å–られã€kafka_max_block_size パラメータã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ [max_insert_block_size](../../../operations/settings/settings.md#setting-max_insert_block_size) ã«è¨­å®šã•ã‚Œã¦ãŠã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ 1,048,576 ã§ã™ã€‚メッセージãŒéžå¸¸ã«å¤§ãããªã„é™ã‚Šã€ã“れを増加ã•ã›ã‚‹ã¹ãã§ã™ã€‚500k ã‹ã‚‰ 1M ã®ç¯„囲ã¯ä¸€èˆ¬çš„ã§ã™ã€‚スループットパフォーマンスã¸ã®å½±éŸ¿ã‚’テストã—評価ã—ã¦ãã ã•ã„。 +* テーブルエンジンã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžæ•°ã¯ kafka_num_consumers を使用ã—ã¦å¢—ã‚„ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ kafka_thread_per_consumer ã‚’ 1 ã«å¤‰æ›´ã—ãªã„é™ã‚Šã€æŒ¿å…¥ã¯ã‚·ãƒ³ã‚°ãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ã§è¡Œã‚ã‚Œã¾ã™ã€‚ã“れを 1 ã«è¨­å®šã™ã‚‹ã¨ã€ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ãŒä¸¦è¡Œã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ãªãŠã€1 消費者ã‚ãŸã‚Š 1 スレッド㮠Kafka エンジン テーブルを作æˆã™ã‚‹ã“ã¨ã¯ã€è¤‡æ•°ã® Kafka エンジンを個別ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¨ã¨ã‚‚ã«ä½œæˆã™ã‚‹ã“ã¨ã¨è«–ç†çš„ã«åŒç­‰ã§ã™ã€‚ +* コンシューマã®å¢—加ã¯ç„¡æ–™ã®æ“作ã§ã¯ã‚ã‚Šã¾ã›ã‚“。å„コンシューマã¯ç‹¬è‡ªã®ãƒãƒƒãƒ•ã‚¡ã¨ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’ä¿æŒã—ã€ã‚µãƒ¼ãƒãƒ¼ã¸ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’増やã—ã¾ã™ã€‚オーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’æ„è­˜ã—ã€ã¾ãšã‚¯ãƒ©ã‚¹ã‚¿å…¨ä½“ã§ç·šå½¢ã«ã‚¹ã‚±ãƒ¼ãƒ«ã—ã¦ãã ã•ã„。å¯èƒ½ã§ã‚ã‚Œã°ç·šå½¢ã«ã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ã‚¦ãƒˆã—ã¾ã™ã€‚ +* Kafka メッセージã®ã‚¹ãƒ«ãƒ¼ãƒ—ットãŒå¤‰å‹•ã—ã€é…延ãŒè¨±å®¹ã•ã‚Œã‚‹å ´åˆã¯ã€stream_flush_interval_ms を増やã—ã¦ã€ã‚ˆã‚Šå¤§ããªãƒ–ロックãŒãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ã‚ˆã†ã«ã—ã¾ã™ã€‚ +* [background_message_broker_schedule_pool_size](../../../operations/settings/settings.md#background_message_broker_schedule_pool_size)ã¯ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¿ã‚¹ã‚¯ã‚’実行ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã§ã™ã€‚ã“れらã®ã‚¹ãƒ¬ãƒƒãƒ‰ã¯ Kafka ストリーミングã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã¯ ClickHouse サーãƒãƒ¼ã®èµ·å‹•æ™‚ã«é©ç”¨ã•ã‚Œã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ã¯å¤‰æ›´ã§ããšã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ 16 ã§ã™ã€‚ログã«ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãŒè¦‹ã‚‰ã‚Œã‚‹å ´åˆã€ã“ã®è¨­å®šã‚’増やã™ã¹ãã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +* Kafka ã¨ã®é€šä¿¡ã«ã¯ã€ãƒ©ã‚¤ãƒ–ラリ librdkafka ãŒä½¿ç”¨ã•ã‚Œã¦ãŠã‚Šã€ãれ自体ãŒã‚¹ãƒ¬ãƒƒãƒ‰ã‚’生æˆã—ã¾ã™ã€‚大é‡ã® Kafka テーブルやコンシューマã®çµæžœã€å¤§é‡ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆåˆ‡ã‚Šæ›¿ãˆãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è² è·ã‚’クラスタ全体ã«åˆ†æ•£ã—ã€å¯èƒ½ã§ã‚ã‚Œã°ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã®ã¿ã‚’複製ã™ã‚‹ã‹ã€è¤‡æ•°ã®ãƒˆãƒ”ックを読ã¿å–ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„ - 値ã®ãƒªã‚¹ãƒˆãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ç•°ãªã‚‹ãƒˆãƒ”ックã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’フィルタリングã™ã‚‹å½¢ã§å˜ä¸€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰è¤‡æ•°ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +設定ã®å¤‰æ›´ã¯ãƒ†ã‚¹ãƒˆã•ã‚Œã‚‹ã¹ãã§ã™ã€‚Kafka コンシューマã®é…延を監視ã—ã¦ã€é©åˆ‡ãªã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ã‚¦ãƒˆãŒè¡Œã‚ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +#### 追加ã®è¨­å®š + +上記ã®è¨­å®šã«åŠ ãˆã¦ã€ä»¥ä¸‹ã‚‚興味深ã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“: + +* [Kafka_max_wait_ms](../../../operations/settings/settings.md#kafka-max-wait-ms) - Kafka ã‹ã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’読ã¿å–ã‚‹éš›ã®å†è©¦è¡Œã¾ã§ã®å¾…機時間をミリ秒å˜ä½ã§è¨­å®šã—ã¾ã™ã€‚ユーザープロファイルレベルã§è¨­å®šã•ã‚Œã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ 5000 ã§ã™ã€‚ + +[librdkafka ã®ã™ã¹ã¦ã®è¨­å®š ](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md)ã¯ã€ClickHouse 構æˆãƒ•ã‚¡ã‚¤ãƒ«ã® _kafka_ è¦ç´ å†…ã«é…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ - 設定å㯠XML è¦ç´ ã¨ã—ã¦ã€ãƒ”リオドをアンダースコアã«ç½®ãæ›ãˆã¦æŒ‡å®šã—ã¦ãã ã•ã„。 + +```xml + + + false + + +``` + +ã“れらã¯å°‚門的ãªè¨­å®šã§ã‚ã‚Šã€Kafka ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦è©³ç´°ãªèª¬æ˜Žã‚’確èªã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/kafka/kafka-vector.md b/docs/ja/integrations/data-ingestion/kafka/kafka-vector.md new file mode 100644 index 00000000000..eb64ada3c65 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/kafka/kafka-vector.md @@ -0,0 +1,129 @@ +--- +sidebar_label: Kafkaã¨ã®Vector +sidebar_position: 3 +slug: /ja/integrations/kafka/kafka-vector +description: Kafkaã¨ClickHouseã§Vectorを使用ã™ã‚‹ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +## Kafkaã¨ClickHouseã§Vectorを使用ã™ã‚‹ + +Vectorã¯ã€Kafkaã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã€ClickHouseã«ã‚¤ãƒ™ãƒ³ãƒˆã‚’é€ä¿¡ã§ãã‚‹ã€ãƒ™ãƒ³ãƒ€ãƒ¼ã«ä¾å­˜ã—ãªã„データパイプラインã§ã™ã€‚ + +ClickHouseã¨ã®Vectorã®[入門ガイド](../etl-tools/vector-to-clickhouse.md)ã¯ã€ãƒ­ã‚°ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã¨ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã‚¤ãƒ™ãƒ³ãƒˆã‚’読ã¿å–ã‚‹ã“ã¨ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚ç§ãŸã¡ã¯ã€Kafkaトピックã«ä¿æŒã•ã‚Œã¦ã„ã‚‹[Githubサンプルデータセット](https://datasets-documentation.s3.eu-west-3.amazonaws.com/kafka/github_all_columns.ndjson)を利用ã—ã¾ã™ã€‚ + +Vectorã¯ã€[sources](https://vector.dev/docs/about/concepts/#sources)を使用ã—ã¦ã€ãƒ—ッシュã¾ãŸã¯ãƒ—ルモデルã§ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ã¾ã™ã€‚[sinks](https://vector.dev/docs/about/concepts/#sinks)ã¯ã€ã‚¤ãƒ™ãƒ³ãƒˆã®å®›å…ˆã‚’æä¾›ã—ã¾ã™ã€‚ãã®ãŸã‚ã€Kafkaã®ã‚½ãƒ¼ã‚¹ã¨ClickHouseã®ã‚·ãƒ³ã‚¯ã‚’使用ã—ã¾ã™ã€‚注æ„点ã¨ã—ã¦ã€Kafkaã¯ã‚·ãƒ³ã‚¯ã¨ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ãŒã€ClickHouseã®ã‚½ãƒ¼ã‚¹ã¯å­˜åœ¨ã—ã¾ã›ã‚“。ã—ãŸãŒã£ã¦ã€ClickHouseã‹ã‚‰Kafkaã«ãƒ‡ãƒ¼ã‚¿ã‚’転é€ã—ãŸã„ユーザーã«ã¯Vectorã¯é©åˆ‡ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +Vectorã¯ã¾ãŸã€ãƒ‡ãƒ¼ã‚¿ã®[変æ›](https://vector.dev/docs/reference/configuration/transforms/)もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã“ã®ã‚¬ã‚¤ãƒ‰ã®ç¯„囲外ã§ã™ã€‚データセットã«ãŠã„ã¦å¤‰æ›ãŒå¿…è¦ãªå ´åˆã¯ã€Vectorã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ç¾åœ¨ã®ClickHouseシンクã®å®Ÿè£…ã¯ã€HTTPインターフェースを利用ã—ã¦ã„ã¾ã™ã€‚ClickHouseシンクã¯ç¾æ™‚点ã§JSONスキーマã®åˆ©ç”¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。データã¯ãƒ—レーンãªJSONå½¢å¼ã¾ãŸã¯æ–‡å­—列ã¨ã—ã¦Kafkaã«å…¬é–‹ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### ライセンス +Vectorã¯ã€[MPL-2.0ライセンス](https://github.com/vectordotdev/vector/blob/master/LICENSE)ã®ä¸‹ã§é…布ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### 接続情報をåŽé›†ã™ã‚‹ + + +### 手順 + +1. Kafkaã®`github`トピックを作æˆã—ã€[Githubデータセット](https://datasets-documentation.s3.eu-west-3.amazonaws.com/kafka/github_all_columns.ndjson)を挿入ã—ã¾ã™ã€‚ + +```bash +cat /opt/data/github/github_all_columns.ndjson | kcat -b : -X security.protocol=sasl_ssl -X sasl.mechanisms=PLAIN -X sasl.username= -X sasl.password= -t github +``` + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯`ClickHouse/ClickHouse`リãƒã‚¸ãƒˆãƒªã«ç„¦ç‚¹ã‚’当ã¦ãŸ200,000è¡Œã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +2. ターゲットテーブルãŒä½œæˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。以下ã§ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’使用ã—ã¾ã™ã€‚ + +```sql + +CREATE TABLE github +( + file_time DateTime, + event_type Enum('CommitCommentEvent' = 1, 'CreateEvent' = 2, 'DeleteEvent' = 3, 'ForkEvent' = 4, + 'GollumEvent' = 5, 'IssueCommentEvent' = 6, 'IssuesEvent' = 7, 'MemberEvent' = 8, 'PublicEvent' = 9, 'PullRequestEvent' = 10, 'PullRequestReviewCommentEvent' = 11, 'PushEvent' = 12, 'ReleaseEvent' = 13, 'SponsorshipEvent' = 14, 'WatchEvent' = 15, 'GistEvent' = 16, 'FollowEvent' = 17, 'DownloadEvent' = 18, 'PullRequestReviewEvent' = 19, 'ForkApplyEvent' = 20, 'Event' = 21, 'TeamAddEvent' = 22), + actor_login LowCardinality(String), + repo_name LowCardinality(String), + created_at DateTime, + updated_at DateTime, + action Enum('none' = 0, 'created' = 1, 'added' = 2, 'edited' = 3, 'deleted' = 4, 'opened' = 5, 'closed' = 6, 'reopened' = 7, 'assigned' = 8, 'unassigned' = 9, 'labeled' = 10, 'unlabeled' = 11, 'review_requested' = 12, 'review_request_removed' = 13, 'synchronize' = 14, 'started' = 15, 'published' = 16, 'update' = 17, 'create' = 18, 'fork' = 19, 'merged' = 20), + comment_id UInt64, + path String, + ref LowCardinality(String), + ref_type Enum('none' = 0, 'branch' = 1, 'tag' = 2, 'repository' = 3, 'unknown' = 4), + creator_user_login LowCardinality(String), + number UInt32, + title String, + labels Array(LowCardinality(String)), + state Enum('none' = 0, 'open' = 1, 'closed' = 2), + assignee LowCardinality(String), + assignees Array(LowCardinality(String)), + closed_at DateTime, + merged_at DateTime, + merge_commit_sha String, + requested_reviewers Array(LowCardinality(String)), + merged_by LowCardinality(String), + review_comments UInt32, + member_login LowCardinality(String) +) ENGINE = MergeTree ORDER BY (event_type, repo_name, created_at); + +``` + +3. [Vectorをダウンロードã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«](https://vector.dev/docs/setup/quickstart/)ã—ã¾ã™ã€‚`kafka.toml`ã¨ã„ã†è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã—ã€Kafkaã¨ClickHouseã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«åˆã‚ã›ã¦å€¤ã‚’変更ã—ã¾ã™ã€‚ + +```toml +[sources.github] +type = "kafka" +auto_offset_reset = "smallest" +bootstrap_servers = ":" +group_id = "vector" +topics = [ "github" ] +tls.enabled = true +sasl.enabled = true +sasl.mechanism = "PLAIN" +sasl.username = "" +sasl.password = "" +decoding.codec = "json" + +[sinks.clickhouse] +type = "clickhouse" +inputs = ["github"] +endpoint = "http://localhost:8123" +database = "default" +table = "github" +skip_unknown_fields = true +auth.strategy = "basic" +auth.user = "username" +auth.password = "password" +buffer.max_events = 10000 +batch.timeout_secs = 1 +``` + +ã“ã®è¨­å®šã¨Vectorã®å‹•ä½œã«é–¢ã™ã‚‹é‡è¦ãªæ³¨æ„点: + +- ã“ã®ä¾‹ã¯Confluent Cloudã«å¯¾ã—ã¦ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ãã®ãŸã‚ã€`sasl.*`ãŠã‚ˆã³`ssl.enabled`ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚ªãƒ—ションã¯ã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã®å ´åˆã«ã¯é©åˆ‡ã§ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- 設定パラメータ`bootstrap_servers`ã«ã¯ãƒ—ロトコル接頭辞ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。例ãˆã° `pkc-2396y.us-east-1.aws.confluent.cloud:9092` +- ソースパラメータã®`decoding.codec = "json"`ã¯ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå˜ä¸€ã®JSONオブジェクトã¨ã—ã¦ClickHouseシンクã«æ¸¡ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚文字列ã¨ã—ã¦ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’扱ã„ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®`bytes`値を使用ã™ã‚‹å ´åˆã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å†…容ã¯`message`フィールドã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ã»ã¨ã‚“ã©ã®å ´åˆã€ã“ã‚Œã¯[Vector入門](../etl-tools/vector-to-clickhouse.md#4-parse-the-logs)ガイドã§èª¬æ˜Žã•ã‚Œã¦ã„るよã†ã«ClickHouseã§å‡¦ç†ãŒå¿…è¦ã§ã™ã€‚ +- Vectorã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«[多ãã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’追加](https://vector.dev/docs/reference/configuration/sources/kafka/#output-data)ã—ã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€ClickHouseシンクã®è¨­å®šãƒ‘ラメータ`skip_unknown_fields = true`を介ã—ã¦ã“れらã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’無視ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルスキーマã®ä¸€éƒ¨ã§ãªã„フィールドを無視ã—ã¾ã™ã€‚例ãˆã°`offset`ãªã©ã®ãƒ¡ã‚¿ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒè¿½åŠ ã•ã‚Œã‚‹ã‚ˆã†ã«ã‚¹ã‚­ãƒ¼ãƒžã‚’調整ã—ã¦ã‚‚å•é¡Œã‚ã‚Šã¾ã›ã‚“。 +- シンクãŒã‚½ãƒ¼ã‚¹ã‚¤ãƒ™ãƒ³ãƒˆã¸ã®å‚ç…§ã¨ã—ã¦`inputs`パラメータをã©ã®ã‚ˆã†ã«ä½¿ç”¨ã™ã‚‹ã‹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 +- ClickHouseシンクã®å‹•ä½œã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](https://vector.dev/docs/reference/configuration/sinks/clickhouse/#buffers-and-batches)ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚最é©ãªã‚¹ãƒ«ãƒ¼ãƒ—ットを得るãŸã‚ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯`buffer.max_events`ã€`batch.timeout_secs`ãŠã‚ˆã³`batch.max_bytes`パラメータã®ãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚°ã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ClickHouseã®[推奨事項](../../../concepts/why-clickhouse-is-so-fast.md#performance-when-inserting-data)ã«å¾“ã„ã€1000ã®ã‚¤ãƒ™ãƒ³ãƒˆæ•°ã¯1ãƒãƒƒãƒã‚ãŸã‚Šã®æœ€ä½Žå€¤ã¨è€ƒãˆã‚‰ã‚Œã‚‹ã¹ãã§ã™ã€‚高スループットã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§ã¯ã€`buffer.max_events` パラメータを増やã™ã“ã¨ãŒã§ãã¾ã™ã€‚スループットã«å¤‰å‹•ãŒã‚ã‚‹å ´åˆã¯ã€`batch.timeout_secs` パラメータを変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +- `auto_offset_reset = "smallest"`パラメータã¯ã€KafkaソースãŒãƒˆãƒ”ックã®å…ˆé ­ã‹ã‚‰é–‹å§‹ã™ã‚‹ã“ã¨ã‚’強制ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¹ãƒ†ãƒƒãƒ—(1)ã§å…¬é–‹ã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’消費ã™ã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¾ã™ã€‚ç•°ãªã‚‹å‹•ä½œã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã¯[ã“ã¡ã‚‰](https://vector.dev/docs/reference/configuration/sources/kafka/#auto_offset_reset)ã‚’ã”覧ãã ã•ã„。 + +1. Vectorを開始ã—ã¾ã™ã€‚ + +```bash +vector --config ./kafka.toml +``` + +デフォルトã§ã¯ã€ClickHouseã¸ã®æŒ¿å…¥ãŒé–‹å§‹ã•ã‚Œã‚‹å‰ã«[ヘルスãƒã‚§ãƒƒã‚¯](https://vector.dev/docs/reference/configuration/sinks/clickhouse/#healthcheck)ãŒå¿…è¦ã§ã™ã€‚ã“ã‚Œã¯æŽ¥ç¶šå¯èƒ½æ€§ã‚’確ä¿ã—ã€ã‚¹ã‚­ãƒ¼ãƒžã‚’確èªã™ã‚‹ãŸã‚ã§ã™ã€‚å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã«ã•ã‚‰ã«è©³ç´°ãªãƒ­ã‚°ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€`VECTOR_LOG=debug`を付ã‘ã‚‹ã“ã¨ãŒå½¹ç«‹ã¤å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +5. データã®æŒ¿å…¥ã‚’確èªã—ã¾ã™ã€‚ + +```sql +SELECT count() as count FROM github; +``` + +| count | +| :--- | +| 200000 | diff --git a/docs/ja/integrations/data-ingestion/kafka/msk/index.md b/docs/ja/integrations/data-ingestion/kafka/msk/index.md new file mode 100644 index 00000000000..0cfc32faeec --- /dev/null +++ b/docs/ja/integrations/data-ingestion/kafka/msk/index.md @@ -0,0 +1,88 @@ +--- +sidebar_label: Amazon MSK 㨠Kafka Connector Sink +sidebar_position: 1 +slug: /ja/integrations/kafka/cloud/amazon-msk/ +description: ClickHouse å…¬å¼ Kafka コãƒã‚¯ã‚¿ã¨ Amazon MSK ã®é€£æº +keywords: [integration, kafka, amazon msk, sink, connector] +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Amazon MSK 㨠ClickHouse ã®çµ±åˆ + +
+ +
+ +## å‰ææ¡ä»¶ +以下をå‰æã¨ã—ã¦ã„ã¾ã™: +* ã‚ãªãŸãŒ [ClickHouse コãƒã‚¯ã‚¿ Sink](../kafka-clickhouse-connect-sink.md)ã€Amazon MSKã€MSK コãƒã‚¯ã‚¿ã«ç²¾é€šã—ã¦ã„ã‚‹ã“ã¨ã€‚Amazon MSK [開始ガイド](https://docs.aws.amazon.com/msk/latest/developerguide/getting-started.html)ã¨[MSK コãƒã‚¯ãƒˆã‚¬ã‚¤ãƒ‰](https://docs.aws.amazon.com/msk/latest/developerguide/msk-connect.html)を推奨ã—ã¾ã™ã€‚ +* MSK ブローカーãŒå…¬é–‹ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã€‚開発者ガイドã®[公開アクセス](https://docs.aws.amazon.com/msk/latest/developerguide/public-access.html)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +## ClickHouse ã®å…¬å¼ Kafka コãƒã‚¯ã‚¿ã¨ Amazon MSK + +### 接続ã®è©³ç´°ã‚’集ã‚ã‚‹ + + + +### ステップ +1. [ClickHouse コãƒã‚¯ã‚¿ Sink](../kafka-clickhouse-connect-sink.md)ã‚’ç†è§£ã—ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +1. [MSK インスタンスを作æˆã™ã‚‹](https://docs.aws.amazon.com/msk/latest/developerguide/create-cluster.html)。 +1. [IAM ロールを作æˆã—ã¦å‰²ã‚Šå½“ã¦ã‚‹](https://docs.aws.amazon.com/msk/latest/developerguide/create-client-iam-role.html)。 +1. ClickHouse Connect Sink ã®[リリースページ](https://github.com/ClickHouse/clickhouse-kafka-connect/releases)ã‹ã‚‰ `jar` ファイルをダウンロードã—ã¾ã™ã€‚ +1. Amazon MSK コンソールã®[カスタムプラグインページ](https://docs.aws.amazon.com/msk/latest/developerguide/msk-connect-plugins.html)ã§ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—㟠`jar` ファイルをインストールã—ã¾ã™ã€‚ +1. コãƒã‚¯ã‚¿ãŒå…¬é–‹ ClickHouse インスタンスã¨é€šä¿¡ã™ã‚‹å ´åˆã¯ã€[インターãƒãƒƒãƒˆã‚¢ã‚¯ã‚»ã‚¹ã‚’有効ã«ã—ã¾ã™](https://docs.aws.amazon.com/msk/latest/developerguide/msk-connect-internet-access.html)。 +1. 設定ã§ãƒˆãƒ”ックåã€ClickHouse インスタンスホストåã€ãŠã‚ˆã³ãƒ‘スワードを指定ã—ã¾ã™ã€‚ +```yml +connector.class=com.clickhouse.kafka.connect.ClickHouseSinkConnector +tasks.max=1 +topics= +ssl=true +security.protocol=SSL +hostname= +database= +password= +ssl.truststore.location=/tmp/kafka.client.truststore.jks +port=8443 +value.converter.schemas.enable=false +value.converter=org.apache.kafka.connect.json.JsonConverter +exactlyOnce=true +username=default +schemas.enable=false +``` + +## パフォーマンスãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚° +パフォーマンスをå‘上ã•ã›ã‚‹ãƒ¯ãƒ³ã‚¹ãƒ†ãƒƒãƒ—ã¨ã—ã¦ã€**worker** 設定ã«ä»¥ä¸‹ã‚’追加ã—ã¦ã€Kafka ã‹ã‚‰å–å¾—ã™ã‚‹ãƒãƒƒãƒã‚µã‚¤ã‚ºã¨ãƒ¬ã‚³ãƒ¼ãƒ‰æ•°ã‚’調整ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +```yml +consumer.max.poll.records=[NUMBER OF RECORDS] +consumer.max.partition.fetch.bytes=[NUMBER OF RECORDS * RECORD SIZE IN BYTES] +``` + +使用ã™ã‚‹å…·ä½“çš„ãªå€¤ã¯ã€å¸Œæœ›ã®ãƒ¬ã‚³ãƒ¼ãƒ‰æ•°ã‚„レコードサイズã«åŸºã¥ã„ã¦ç•°ãªã‚Šã¾ã™ã€‚例ãˆã°ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +```yml +consumer.max.poll.records=500 +consumer.max.partition.fetch.bytes=1048576 +``` + +詳細情報(実装やãã®ä»–ã®è€ƒæ…®äº‹é …ã«ã¤ã„ã¦ï¼‰ã¯ã€å…¬å¼ã® [Kafka](https://kafka.apache.org/documentation/#consumerconfigs) ãŠã‚ˆã³ +[Amazon MSK](https://docs.aws.amazon.com/msk/latest/developerguide/msk-connect-workers.html#msk-connect-create-custom-worker-config) ドキュメントã§ç¢ºèªã§ãã¾ã™ã€‚ + +## MSK Connect ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚­ãƒ³ã‚°ã«é–¢ã™ã‚‹æ³¨æ„事項 + +MSK Connect ㌠ClickHouse ã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«ã€MSK クラスターをプライベートサブãƒãƒƒãƒˆã«é…ç½®ã—ã€ãƒ—ライベート NAT を使用ã—ã¦ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã‚¢ã‚¯ã‚»ã‚¹ã‚’確ä¿ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ã“れを設定ã™ã‚‹æ–¹æ³•ã¯ä»¥ä¸‹ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚パブリックサブãƒãƒƒãƒˆã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ãŒã€Elastic IP アドレスを ENI ã«å¸¸ã«å‰²ã‚Šå½“ã¦ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。詳ã—ã㯠[AWS ã®è©³ç´°](https://docs.aws.amazon.com/msk/latest/developerguide/msk-connect-internet-access.html)ã‚’ã”覧ãã ã•ã„。 + +1. **プライベートサブãƒãƒƒãƒˆã®ä½œæˆ:** VPC 内ã«æ–°ã—ã„サブãƒãƒƒãƒˆã‚’作æˆã—ã€ãƒ—ライベートサブãƒãƒƒãƒˆã¨ã—ã¦æŒ‡å®šã—ã¾ã™ã€‚ã“ã®ã‚µãƒ–ãƒãƒƒãƒˆã«ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã¸ã®ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹ãŒã‚ã‚Šã¾ã›ã‚“。 +1. **NAT ゲートウェイã®ä½œæˆ:** VPC ã®ãƒ‘ブリックサブãƒãƒƒãƒˆã« NAT ゲートウェイを作æˆã—ã¾ã™ã€‚NAT ゲートウェイã¯ã€ãƒ—ライベートサブãƒãƒƒãƒˆã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã‚„ä»–ã® AWS サービスã¨æŽ¥ç¶šã§ãるよã†ã«ã—ã¾ã™ãŒã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã‹ã‚‰ã“れらã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¸ã®æŽ¥ç¶šã‚’防ãŽã¾ã™ã€‚ +1. **ルートテーブルã®æ›´æ–°:** インターãƒãƒƒãƒˆã«å‘ã‹ã†ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’ NAT ゲートウェイã«é€ã‚‹ãƒ«ãƒ¼ãƒˆã‚’追加ã—ã¾ã™ã€‚ +1. **セキュリティグループã¨ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ ACL ã®è¨­å®š:** [セキュリティグループ](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html)ã¨[ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ ACL(アクセス制御リスト)](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html)を構æˆã—ã€ClickHouse インスタンスã¸ã®é–¢é€£ã™ã‚‹ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’許å¯ã—ã¾ã™ã€‚ + 1. ClickHouse Cloud ã®å ´åˆã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚°ãƒ«ãƒ¼ãƒ—を構æˆã—ã¦ãƒãƒ¼ãƒˆ 9440 ãŠã‚ˆã³ 8443 ã§ã®ã‚¤ãƒ³ãƒã‚¦ãƒ³ãƒ‰ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’許å¯ã—ã¾ã™ã€‚ + 2. セルフマãƒãƒ¼ã‚¸ãƒ‰ã® ClickHouse ã®å ´åˆã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚°ãƒ«ãƒ¼ãƒ—ãŒè¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒãƒ¼ãƒˆï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ 8123)ã§ã®ã‚¤ãƒ³ãƒã‚¦ãƒ³ãƒ‰ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’許å¯ã™ã‚‹ã‚ˆã†ã«æ§‹æˆã—ã¾ã™ã€‚ +2. **MSK ã«ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚°ãƒ«ãƒ¼ãƒ—をアタッãƒ:** ã“れらã®æ–°ã—ã„セキュリティグループを NAT ゲートウェイã«ãƒ«ãƒ¼ãƒˆã•ã‚ŒãŸçŠ¶æ…‹ã§ MSK クラスターã«ã‚¢ã‚¿ãƒƒãƒã—ã¾ã™ã€‚ diff --git a/docs/ja/integrations/data-ingestion/redshift/images/pivot.png b/docs/ja/integrations/data-ingestion/redshift/images/pivot.png new file mode 100644 index 00000000000..6169d9ebfc1 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/redshift/images/pivot.png differ diff --git a/docs/ja/integrations/data-ingestion/redshift/images/pull.png b/docs/ja/integrations/data-ingestion/redshift/images/pull.png new file mode 100644 index 00000000000..616eb570643 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/redshift/images/pull.png differ diff --git a/docs/ja/integrations/data-ingestion/redshift/images/push.png b/docs/ja/integrations/data-ingestion/redshift/images/push.png new file mode 100644 index 00000000000..c3f375f0e93 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/redshift/images/push.png differ diff --git a/docs/ja/integrations/data-ingestion/redshift/images/redshift-to-clickhouse.png b/docs/ja/integrations/data-ingestion/redshift/images/redshift-to-clickhouse.png new file mode 100644 index 00000000000..3e062438fb7 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/redshift/images/redshift-to-clickhouse.png differ diff --git a/docs/ja/integrations/data-ingestion/redshift/images/s3-1.png b/docs/ja/integrations/data-ingestion/redshift/images/s3-1.png new file mode 100644 index 00000000000..067c368f51f Binary files /dev/null and b/docs/ja/integrations/data-ingestion/redshift/images/s3-1.png differ diff --git a/docs/ja/integrations/data-ingestion/redshift/images/s3-2.png b/docs/ja/integrations/data-ingestion/redshift/images/s3-2.png new file mode 100644 index 00000000000..40c9a3b4b97 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/redshift/images/s3-2.png differ diff --git a/docs/ja/integrations/data-ingestion/redshift/index.md b/docs/ja/integrations/data-ingestion/redshift/index.md new file mode 100644 index 00000000000..fed1b92cbda --- /dev/null +++ b/docs/ja/integrations/data-ingestion/redshift/index.md @@ -0,0 +1,250 @@ +--- +sidebar_label: Redshift +slug: /ja/integrations/redshift +description: Redshiftã‹ã‚‰ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œ +--- + +# Redshiftã‹ã‚‰ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œ + +## 関連コンテンツ + +
+ +
+ +- ブログ: [分æžãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®æœ€é©åŒ–: Redshift vs ClickHouse 比較](https://clickhouse.com/blog/redshift-vs-clickhouse-comparison) + +## ã¯ã˜ã‚ã« + +[Amazon Redshift](https://aws.amazon.com/redshift/) ã¯ã€Amazon Web Services ã®æä¾›ã®ä¸€éƒ¨ã§ã‚る人気ã®ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ‡ãƒ¼ã‚¿ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¸ãƒ³ã‚°ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã§ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€Redshiftインスタンスã‹ã‚‰ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œã®ãŸã‚ã®ã•ã¾ã–ã¾ãªã‚¢ãƒ—ローãƒã‚’紹介ã—ã¾ã™ã€‚以下ã®3ã¤ã®ã‚ªãƒ—ションをカãƒãƒ¼ã—ã¾ã™ã€‚ + +Redshitã‹ã‚‰ClickHouseã¸ã®ç§»è¡Œã‚ªãƒ—ション + +ClickHouse インスタンスã®è¦³ç‚¹ã‹ã‚‰ã¯ã€æ¬¡ã®ã„ãšã‚Œã‹ã®æ–¹æ³•ã§ç§»è¡Œã§ãã¾ã™ï¼š + +1. **[Redshiftã‹ã‚‰ClickHouseã¸ãƒ‡ãƒ¼ã‚¿ã‚’PUSHã™ã‚‹](#push-data-from-redshift-to-clickhouse)** サードパーティã®ETL/ELTツールやサービスを使用ã—ã¦ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹ + +2. **[Redshiftã‹ã‚‰ClickHouseã¸ãƒ‡ãƒ¼ã‚¿ã‚’PULLã™ã‚‹](#pull-data-from-redshift-to-clickhouse)** ClickHouse JDBC Bridgeを活用ã—ã¦Redshiftã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ + +3. **[S3を使用ã—ã¦Redshiftã‹ã‚‰ClickHouseã¸ãƒ‡ãƒ¼ã‚¿ã‚’PIVOTã™ã‚‹](#pivot-data-from-redshift-to-clickhouse-using-s3)** S3オブジェクトストレージを使用ã—ã¦ã€Œã‚¢ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã€ãƒ­ã‚¸ãƒƒã‚¯ã‚’é©ç”¨ã™ã‚‹ + +:::note +ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ã¯ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¨ã—ã¦Redshiftを使用ã—ã¾ã—ãŸãŒã€ã“ã“ã§ç´¹ä»‹ã™ã‚‹ç§»è¡Œã‚¢ãƒ—ローãƒã¯Redshiftã«é™å®šã•ã‚Œãšã€ãã®ä»–ã®äº’æ›æ€§ã®ã‚るデータソースã«ã‚‚é¡žä¼¼ã—ãŸæ‰‹é †ã‚’é©ç”¨ã§ãã¾ã™ã€‚ +::: + + +## Redshiftã‹ã‚‰ClickHouseã¸ãƒ‡ãƒ¼ã‚¿ã‚’PUSHã™ã‚‹ + +プッシュã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€ã‚µãƒ¼ãƒ‰ãƒ‘ーティã®ãƒ„ールやサービス(カスタムコードや[ETL/ELT](https://en.wikipedia.org/wiki/Extract,_transform,_load#ETL_vs._ELT)を使用ã™ã‚‹ã‹ã®ã„ãšã‚Œã‹ï¼‰ã‚’活用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseインスタンスã«é€ã‚‹ã¨ã„ã†è€ƒãˆæ–¹ã§ã™ã€‚例ãˆã°ã€[Airbyte](https://www.airbyte.com/)ã®ã‚ˆã†ãªã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã‚’使用ã—ã¦ã€Redshiftインスタンス(ソースã¨ã—ã¦ï¼‰ã‹ã‚‰ClickHouse(デスティãƒãƒ¼ã‚·ãƒ§ãƒ³ã¨ã—ã¦ï¼‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’移動ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆ[Airbyteã¨ã®çµ±åˆã‚¬ã‚¤ãƒ‰](/docs/ja/integrations/data-ingestion/etl-tools/airbyte-and-clickhouse.md)ã‚’å‚照)。 + +Redshitã‹ã‚‰ClickHouseã¸ã®PUSH + +### 利点 + +* ETL/ELTソフトウェアã®æ—¢å­˜ã®ã‚³ãƒã‚¯ã‚¿ã‚«ã‚¿ãƒ­ã‚°ã‚’活用ã§ãã¾ã™ã€‚ +* データをåŒæœŸã•ã›ã‚‹ãŸã‚ã®çµ„ã¿è¾¼ã¿æ©Ÿèƒ½ï¼ˆè¿½åŠ /上書ã/インクリメントロジック)ãŒã‚ã‚Šã¾ã™ã€‚ +* データ変æ›ã‚·ãƒŠãƒªã‚ªã‚’å¯èƒ½ã«ã—ã¾ã™ï¼ˆä¾‹ã¨ã—ã¦ã€[dbtã¨ã®çµ±åˆã‚¬ã‚¤ãƒ‰](/docs/ja/integrations/data-ingestion/etl-tools/dbt/index.md)ã‚’å‚照)。 + +### 欠点 + +* ユーザーã¯ETL/ELTインフラストラクãƒãƒ£ã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã¨ä¿å®ˆãŒå¿…è¦ã§ã™ã€‚ +* アーキテクãƒãƒ£ã«ã‚µãƒ¼ãƒ‰ãƒ‘ーティè¦ç´ ã‚’å°Žå…¥ã™ã‚‹ã“ã¨ã§ã€æ½œåœ¨çš„ãªã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティã®ãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã¨ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + + +## Redshiftã‹ã‚‰ClickHouseã¸ãƒ‡ãƒ¼ã‚¿ã‚’PULLã™ã‚‹ + +プルã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€ClickHouse JDBC Bridgeを活用ã—ã¦ã€ClickHouseインスタンスã‹ã‚‰ç›´æŽ¥Redshiftクラスタã«æŽ¥ç¶šã—ã€`INSERT INTO ... SELECT` クエリを実行ã—ã¾ã™ã€‚ + +Redshitã‹ã‚‰ClickHouseã¸ã®PULL + +### 利点 + +* JDBC互æ›ã®ã™ã¹ã¦ã®ãƒ„ールã«å¯¾ã—ã¦æ±Žç”¨çš„ã§ã™ã€‚ +* ClickHouseã‹ã‚‰è¤‡æ•°ã®å¤–部データソースをクエリã§ãる優雅ãªã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã§ã™ã€‚ + +### 欠点 + +* ClickHouse JDBC BridgeインスタンスãŒå¿…è¦ã§ã€ã“ã‚ŒãŒæ½œåœ¨çš„ãªã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティã®ãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +Redshiftã¯PostgreSQLベースã§ã™ãŒã€ClickHouseã®PostgreSQLテーブル関数やテーブルエンジンを使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ãªãœãªã‚‰ClickHouseã¯PostgreSQLãƒãƒ¼ã‚¸ãƒ§ãƒ³9以上を必è¦ã¨ã—ã€Redshift APIã¯ãれ以å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³(8.x)ã«åŸºã¥ã„ã¦ã„ã‚‹ã‹ã‚‰ã§ã™ã€‚ +::: + +### ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ« + +ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹ã«ã¯ã€ClickHouse JDBC Bridgeをセットアップã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ClickHouse JDBC Bridgeã¯ã€JDBC接続を処ç†ã—ã€ClickHouseインスタンスã¨ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹é–“ã®ãƒ—ロキシã¨ã—ã¦æ©Ÿèƒ½ã™ã‚‹ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã®Javaアプリケーションã§ã™ã€‚ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ã¯ã€[サンプルデータベース](https://docs.aws.amazon.com/redshift/latest/dg/c_sampledb.html)ã‚’æŒã¤äº‹å‰ã«ãƒãƒ”ュレートã•ã‚ŒãŸRedshiftインスタンスを使用ã—ã¾ã—ãŸã€‚ + +1. ClickHouse JDBC Bridgeをデプロイã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[外部データソース用ã®JDBC](/docs/ja/integrations/data-ingestion/dbms/jdbc-with-clickhouse.md)ã«é–¢ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¬ã‚¤ãƒ‰ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +:::note +ClickHouse Cloudを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€ClickHouse JDBC Bridgeを別ã®ç’°å¢ƒã§å®Ÿè¡Œã—ã€[remoteSecure](https://clickhouse.com/docs/ja/sql-reference/table-functions/remote/)関数を使用ã—ã¦ClickHouse Cloudã«æŽ¥ç¶šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +2. ClickHouse JDBC Bridge用ã«Redshiftデータソースを設定ã—ã¾ã™ã€‚例ãˆã°ã€ `/etc/clickhouse-jdbc-bridge/config/datasources/redshift.json ` + + ```json + { + "redshift-server": { + "aliases": [ + "redshift" + ], + "driverUrls": [ + "https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/2.1.0.4/redshift-jdbc42-2.1.0.4.jar" + ], + "driverClassName": "com.amazon.redshift.jdbc.Driver", + "jdbcUrl": "jdbc:redshift://redshift-cluster-1.ckubnplpz1uv.us-east-1.redshift.amazonaws.com:5439/dev", + "username": "awsuser", + "password": "", + "maximumPoolSize": 5 + } + } + ``` + +3. ClickHouse JDBC BridgeãŒãƒ‡ãƒ—ロイã•ã‚Œå®Ÿè¡Œä¸­ã«ãªã£ãŸã‚‰ã€ClickHouseã‹ã‚‰Redshiftインスタンスをクエリã—始ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + ```sql + SELECT * + FROM jdbc('redshift', 'select username, firstname, lastname from users limit 5') + ``` + + ```response + Query id: 1b7de211-c0f6-4117-86a2-276484f9f4c0 + + ┌─username─┬─firstname─┬─lastname─┠+ │ PGL08LJI │ Vladimir │ Humphrey │ + │ XDZ38RDD │ Barry │ Roy │ + │ AEB55QTM │ Reagan │ Hodge │ + │ OWY35QYB │ Tamekah │ Juarez │ + │ MSD36KVR │ Mufutau │ Watkins │ + └──────────┴───────────┴──────────┘ + + 5 rows in set. Elapsed: 0.438 sec. + ``` + + ```sql + SELECT * + FROM jdbc('redshift', 'select count(*) from sales') + ``` + + ```response + Query id: 2d0f957c-8f4e-43b2-a66a-cc48cc96237b + + ┌──count─┠+ │ 172456 │ + └────────┘ + + 1 rows in set. Elapsed: 0.304 sec. + ``` + +4. 以下ã«ã€`INSERT INTO ... SELECT`文を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã™ã‚‹ä¾‹ã‚’示ã—ã¾ã™ã€‚ + + ```sql + # 3カラムをæŒã¤ãƒ†ãƒ¼ãƒ–ãƒ«ä½œæˆ + CREATE TABLE users_imported + ( + `username` String, + `firstname` String, + `lastname` String + ) + ENGINE = MergeTree + ORDER BY firstname + ``` + + ```response + Query id: c7c4c44b-cdb2-49cf-b319-4e569976ab05 + + Ok. + + 0 rows in set. Elapsed: 0.233 sec. + ``` + + ```sql + # データã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + INSERT INTO users_imported (*) SELECT * + FROM jdbc('redshift', 'select username, firstname, lastname from users') + ``` + + ```response + Query id: 9d3a688d-b45a-40f4-a7c7-97d93d7149f1 + + Ok. + + 0 rows in set. Elapsed: 4.498 sec. Processed 49.99 thousand rows, 2.49 MB (11.11 thousand rows/s., 554.27 KB/s.) + ``` + +## S3を使用ã—ã¦Redshiftã‹ã‚‰ClickHouseã¸ãƒ‡ãƒ¼ã‚¿ã‚’PIVOTã™ã‚‹ + +ã“ã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€ä¸­é–“ピボットフォーマットã§ãƒ‡ãƒ¼ã‚¿ã‚’S3ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã€æ¬¡ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’ロードã—ã¾ã™ã€‚ + +Redshitã‹ã‚‰S3を使用ã—ã¦PIVOT + +### 利点 + +* Redshiftã¨ClickHouseã®ä¸¡æ–¹ãŒå¼·åŠ›ãªS3çµ±åˆæ©Ÿèƒ½ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ +* Redshiftã®`UNLOAD`コマンドã¨ClickHouse S3テーブル関数/テーブルエンジンã®ã‚ˆã†ãªæ—¢å­˜ã®æ©Ÿèƒ½ã‚’活用ã—ã¾ã™ã€‚ +* ClickHouseã§ã®ä¸¦åˆ—リードã¨S3ã¨ã®é–“ã®é«˜ã„スループット能力ã®ãŠã‹ã’ã§ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ã«ã‚¹ã‚±ãƒ¼ãƒ«ã—ã¾ã™ã€‚ +* Apache Parquetã®ã‚ˆã†ãªé«˜åº¦ã§åœ§ç¸®ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’活用ã§ãã¾ã™ã€‚ + +### 欠点 + +* プロセスãŒ2ステップã«ãªã‚‹ï¼ˆRedshiftã‹ã‚‰ã‚¢ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã€ãã®å¾ŒClickHouseã«ãƒ­ãƒ¼ãƒ‰ï¼‰ã€‚ + +### ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ« + +1. Redshiftã®[UNLOAD](https://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html)機能を使用ã—ã¦ã€æ—¢å­˜ã®ãƒ—ライベートS3ãƒã‚±ãƒƒãƒˆã«ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + + Redshitã‹ã‚‰S3ã¸ã®UNLOAD + + ã“ã‚Œã«ã‚ˆã‚Šã€S3ã«ã¯ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ‘ートファイルãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + + S3内ã®ãƒ‡ãƒ¼ã‚¿ + +2. ClickHouseã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ + + ```sql + CREATE TABLE users + ( + username String, + firstname String, + lastname String + ) + ENGINE = MergeTree + ORDER BY username + ``` + + ã‚ã‚‹ã„ã¯ã€ClickHouseã¯`CREATE TABLE ... EMPTY AS SELECT`を使用ã—ã¦ãƒ†ãƒ¼ãƒ–ル構造を推測ã—よã†ã¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + ```sql + CREATE TABLE users + ENGINE = MergeTree ORDER BY username + EMPTY AS + SELECT * FROM s3('https://your-bucket.s3.amazonaws.com/unload/users/*', '', '', 'CSV') + ``` + + ã“ã‚Œã¯ç‰¹ã«ã€Parquetã®ã‚ˆã†ã«ãƒ‡ãƒ¼ã‚¿åž‹ã«é–¢ã™ã‚‹æƒ…報をå«ã‚€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚‹å ´åˆã«ã†ã¾ã機能ã—ã¾ã™ã€‚ + +3. `INSERT INTO ... SELECT`ステートメントを使用ã—ã¦ã€ClickHouseã«S3ファイルをロードã—ã¾ã™ã€‚ + ```sql + INSERT INTO users SELECT * + FROM s3('https://your-bucket.s3.amazonaws.com/unload/users/*', '', '', 'CSV') + ``` + + ```response + Query id: 2e7e219a-6124-461c-8d75-e4f5002c8557 + + Ok. + + 0 rows in set. Elapsed: 0.545 sec. Processed 49.99 thousand rows, 2.34 MB (91.72 thousand rows/s., 4.30 MB/s.) + ``` + +:::note +ã“ã®ä¾‹ã§ã¯ã€ãƒ”ボットフォーマットã¨ã—ã¦CSVを使用ã—ã¾ã—ãŸã€‚ã—ã‹ã—ã€æœ¬ç•ªç’°å¢ƒã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®å ´åˆã€å¤§è¦æ¨¡ãªç§»è¡Œã«é©ã—ãŸé¸æŠžè‚¢ã¨ã—ã¦ã€Apache Parquetを推奨ã—ã¾ã™ã€‚Parquetã¯åœ§ç¸®ã‚’ä¼´ã„ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚³ã‚¹ãƒˆã‚’削減ã—ã€è»¢é€æ™‚間を短縮ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ã€å„ロウグループã¯SNAPPYを使用ã—ã¦åœ§ç¸®ã•ã‚Œã¦ã„ã¾ã™ï¼‰ã€‚ClickHouseã¯ã¾ãŸã€ãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆã‚’高速化ã™ã‚‹ãŸã‚ã«Parquetã®åˆ—指å‘を活用ã—ã¦ã„ã¾ã™ã€‚ +::: diff --git a/docs/ja/integrations/data-ingestion/s3-minio.md b/docs/ja/integrations/data-ingestion/s3-minio.md new file mode 100644 index 00000000000..fc3a3fd5f2d --- /dev/null +++ b/docs/ja/integrations/data-ingestion/s3-minio.md @@ -0,0 +1,45 @@ +--- +sidebar_label: MinIO ã®ä½¿ç”¨ +sidebar_position: 6 +slug: /ja/integrations/minio +description: MinIO ã®ä½¿ç”¨ +--- + +# MinIO ã®ä½¿ç”¨ + +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; + + + +ã™ã¹ã¦ã® S3 機能ã¨ãƒ†ãƒ¼ãƒ–ル㯠[MinIO](https://min.io/) ã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚特ã«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®ãƒ­ãƒ¼ã‚«ãƒªãƒ†ã‚£ãŒæœ€é©ãªå ´åˆã€ã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã® MinIO ストアã§ã¯å„ªã‚ŒãŸã‚¹ãƒ«ãƒ¼ãƒ—ットãŒå¾—られるã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +ã¾ãŸã€ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã® MergeTree 構æˆã‚‚一部ã®æ§‹æˆã‚’微調整ã™ã‚‹ã“ã¨ã§äº’æ›æ€§ãŒã‚ã‚Šã¾ã™: + +```xml + + + ... + + + s3 + https://min.io/tables// + your_access_key_id + your_secret_access_key + + /var/lib/clickhouse/disks/s3/ + + + cache + s3 + /var/lib/clickhouse/disks/s3_cache/ + 10Gi + + + ... + + +``` + +:::tip +エンドãƒã‚¤ãƒ³ãƒˆã‚¿ã‚°ã®äºŒé‡ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã«æ³¨ç›®ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ãƒã‚±ãƒƒãƒˆãƒ«ãƒ¼ãƒˆã‚’指定ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚ +::: diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-HMAC-key.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-HMAC-key.png new file mode 100644 index 00000000000..3ec80580181 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-HMAC-key.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-HMAC-service-account.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-HMAC-service-account.png new file mode 100644 index 00000000000..ca321eca8ec Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-HMAC-service-account.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-bucket-1.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-bucket-1.png new file mode 100644 index 00000000000..a616c48610f Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-bucket-1.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-bucket-2.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-bucket-2.png new file mode 100644 index 00000000000..760a7ff667b Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-bucket-2.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-bucket-folder.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-bucket-folder.png new file mode 100644 index 00000000000..c24df729b46 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-bucket-folder.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-create-a-service-account-key.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-create-a-service-account-key.png new file mode 100644 index 00000000000..3c702b62b52 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-create-a-service-account-key.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-0.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-0.png new file mode 100644 index 00000000000..bed731ea198 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-0.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-2.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-2.png new file mode 100644 index 00000000000..4bcc4df39e7 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-2.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-3.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-3.png new file mode 100644 index 00000000000..863861c84a2 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-3.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-a.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-a.png new file mode 100644 index 00000000000..9bbb890b376 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-create-service-account-a.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-examine-bucket-1.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-examine-bucket-1.png new file mode 100644 index 00000000000..87bc2013c99 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-examine-bucket-1.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-examine-bucket-2.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-examine-bucket-2.png new file mode 100644 index 00000000000..c0c063be597 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-examine-bucket-2.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-guide-key.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-guide-key.png new file mode 100644 index 00000000000..e2513f32a87 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-guide-key.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-new-key.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-new-key.png new file mode 100644 index 00000000000..7a2a856665f Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-new-key.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/GCS-service-account-storage-admin.png b/docs/ja/integrations/data-ingestion/s3/images/GCS-service-account-storage-admin.png new file mode 100644 index 00000000000..85da020506f Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/GCS-service-account-storage-admin.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/bucket1.png b/docs/ja/integrations/data-ingestion/s3/images/bucket1.png new file mode 100644 index 00000000000..67e0dd22b0f Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/bucket1.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/bucket2.png b/docs/ja/integrations/data-ingestion/s3/images/bucket2.png new file mode 100644 index 00000000000..c8a210b033b Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/bucket2.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/hardware_size.png b/docs/ja/integrations/data-ingestion/s3/images/hardware_size.png new file mode 100644 index 00000000000..f2d720147b8 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/hardware_size.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/insert_mechanics.png b/docs/ja/integrations/data-ingestion/s3/images/insert_mechanics.png new file mode 100644 index 00000000000..815e33c056a Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/insert_mechanics.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/insert_threads.png b/docs/ja/integrations/data-ingestion/s3/images/insert_threads.png new file mode 100644 index 00000000000..09d0da45cb6 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/insert_threads.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/merges.png b/docs/ja/integrations/data-ingestion/s3/images/merges.png new file mode 100644 index 00000000000..6a5e5f003c6 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/merges.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/mergetree.png b/docs/ja/integrations/data-ingestion/s3/images/mergetree.png new file mode 100644 index 00000000000..f48964b14d7 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/mergetree.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/pull.png b/docs/ja/integrations/data-ingestion/s3/images/pull.png new file mode 100644 index 00000000000..196c029e757 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/pull.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/resource_usage.png b/docs/ja/integrations/data-ingestion/s3/images/resource_usage.png new file mode 100644 index 00000000000..d36c9a08446 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/resource_usage.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/s3-j.png b/docs/ja/integrations/data-ingestion/s3/images/s3-j.png new file mode 100644 index 00000000000..a0249e7a80e Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/s3-j.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/s3Cluster.png b/docs/ja/integrations/data-ingestion/s3/images/s3Cluster.png new file mode 100644 index 00000000000..5cfcf2d8856 Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/s3Cluster.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/images/s3_01.png b/docs/ja/integrations/data-ingestion/s3/images/s3_01.png new file mode 100644 index 00000000000..6698407e9cb Binary files /dev/null and b/docs/ja/integrations/data-ingestion/s3/images/s3_01.png differ diff --git a/docs/ja/integrations/data-ingestion/s3/index.md b/docs/ja/integrations/data-ingestion/s3/index.md new file mode 100644 index 00000000000..7b1a2a6298d --- /dev/null +++ b/docs/ja/integrations/data-ingestion/s3/index.md @@ -0,0 +1,1246 @@ +--- +slug: /ja/integrations/s3 +sidebar_position: 1 +sidebar_label: S3ã¨ClickHouseã®çµ±åˆ + +--- +import BucketDetails from '@site/docs/ja/_snippets/_S3_authentication_and_bucket.md'; + +# S3ã¨ClickHouseã®çµ±åˆ + +S3ã‹ã‚‰ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ãŸã‚Šã€S3をエクスãƒãƒ¼ãƒˆå…ˆã¨ã—ã¦ä½¿ç”¨ã—ãŸã‚Šã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€Œãƒ‡ãƒ¼ã‚¿ãƒ¬ã‚¤ã‚¯ã€ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã¨ã®ç›¸äº’作用ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ã•ã‚‰ã«ã€S3ã¯ã€Œã‚³ãƒ¼ãƒ«ãƒ‰ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸éšŽå±¤ã‚’æä¾›ã—ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã‚³ãƒ³ãƒ”ュートã®åˆ†é›¢ã‚’支æ´ã§ãã¾ã™ã€‚以下ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€ãƒ‹ãƒ¥ãƒ¼ãƒ¨ãƒ¼ã‚¯å¸‚ã®ã‚¿ã‚¯ã‚·ãƒ¼ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’使用ã—ã¦ã€S3ã¨ClickHouseé–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’移動ã™ã‚‹ãƒ—ロセスを示ã—ã€ä¸»è¦ãªæ§‹æˆãƒ‘ラメータを特定ã—ã€ãƒ‘フォーマンスを最é©åŒ–ã™ã‚‹ãŸã‚ã®ãƒ’ントをæä¾›ã—ã¾ã™ã€‚ + +## S3テーブル関数 + +`s3`テーブル関数を使用ã™ã‚‹ã¨ã€S3互æ›ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿å–ã£ãŸã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’書ã込んã ã‚Šã§ãã¾ã™ã€‚構文ã®æ¦‚è¦ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +```sql +s3(path, [aws_access_key_id, aws_secret_access_key,] [format, [structure, [compression]]]) +``` + +ã“ã“ã§ï¼š + +* path — ファイルã®ãƒ‘スをå«ã‚€ãƒã‚±ãƒƒãƒˆURL。ã“ã®URLã¯ã€èª­ã¿å–り専用モードã§æ¬¡ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã«å¯¾å¿œã—ã¾ã™ï¼š`*`ã€`?`ã€`{abc,def}`ã€`{N..M}`(ã“ã“ã§`N`ã¨`M`ã¯æ•°å­—ã€`'abc'`ã¨`'def'`ã¯æ–‡å­—列ã§ã™ï¼‰ã€‚詳細ã¯ã€[パスã§ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ä½¿ç”¨ã«é–¢ã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](/docs/ja/engines/table-engines/integrations/s3/#wildcards-in-path)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +* format — ファイルã®[フォーマット](/docs/ja/interfaces/formats.md/#formats)。 +* structure — テーブルã®æ§‹é€ ã€‚å½¢å¼ã¯`'column1_name column1_type, column2_name column2_type, ...'`。 +* compression — パラメータã¯ã‚ªãƒ—ションã§ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å€¤ã¯`none`ã€`gzip/gz`ã€`brotli/br`ã€`xz/LZMA`ã€`zstd/zst`ã§ã™ã€‚デフォルトã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«ã‚ˆã£ã¦åœ§ç¸®ã‚’自動検出ã—ã¾ã™ã€‚ + +パスå¼ã«ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’使用ã™ã‚‹ã“ã¨ã§ã€è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å‚ç…§ã—ã€ä¸¦åˆ—処ç†ã®å¯èƒ½æ€§ã‚’é–‹ãã¾ã™ã€‚ + +### 準備 + +S3ベースã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¨ç›¸äº’作用ã™ã‚‹ãŸã‚ã«ã€æ¨™æº–ã®`MergeTree`テーブルを作æˆã—ã€å®›å…ˆã¨ã—ã¾ã™ã€‚以下ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«`trips`ã¨ã„ã†åå‰ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +```sql +CREATE TABLE trips +( + `trip_id` UInt32, + `vendor_id` Enum8('1' = 1, '2' = 2, '3' = 3, '4' = 4, 'CMT' = 5, 'VTS' = 6, 'DDS' = 7, 'B02512' = 10, 'B02598' = 11, 'B02617' = 12, 'B02682' = 13, 'B02764' = 14, '' = 15), + `pickup_date` Date, + `pickup_datetime` DateTime, + `dropoff_date` Date, + `dropoff_datetime` DateTime, + `store_and_fwd_flag` UInt8, + `rate_code_id` UInt8, + `pickup_longitude` Float64, + `pickup_latitude` Float64, + `dropoff_longitude` Float64, + `dropoff_latitude` Float64, + `passenger_count` UInt8, + `trip_distance` Float64, + `fare_amount` Float32, + `extra` Float32, + `mta_tax` Float32, + `tip_amount` Float32, + `tolls_amount` Float32, + `ehail_fee` Float32, + `improvement_surcharge` Float32, + `total_amount` Float32, + `payment_type` Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4), + `trip_type` UInt8, + `pickup` FixedString(25), + `dropoff` FixedString(25), + `cab_type` Enum8('yellow' = 1, 'green' = 2, 'uber' = 3), + `pickup_nyct2010_gid` Int8, + `pickup_ctlabel` Float32, + `pickup_borocode` Int8, + `pickup_ct2010` String, + `pickup_boroct2010` String, + `pickup_cdeligibil` String, + `pickup_ntacode` FixedString(4), + `pickup_ntaname` String, + `pickup_puma` UInt16, + `dropoff_nyct2010_gid` UInt8, + `dropoff_ctlabel` Float32, + `dropoff_borocode` UInt8, + `dropoff_ct2010` String, + `dropoff_boroct2010` String, + `dropoff_cdeligibil` String, + `dropoff_ntacode` FixedString(4), + `dropoff_ntaname` String, + `dropoff_puma` UInt16 +) +ENGINE = MergeTree +PARTITION BY toYYYYMM(pickup_date) +ORDER BY pickup_datetime +SETTINGS index_granularity = 8192 +``` + +`pickup_date`フィールドã§[パーティショニング](/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key.md/#custom-partitioning-key)を使用ã—ã¦ã„ã¾ã™ã€‚通常ã€ãƒ‘ーティションキーã¯ãƒ‡ãƒ¼ã‚¿ç®¡ç†ã®ãŸã‚ã§ã™ãŒã€å¾Œã§ã“ã®ã‚­ãƒ¼ã‚’利用ã—ã¦S3ã¸ã®æ›¸ãè¾¼ã¿ã‚’並列化ã—ã¾ã™ã€‚ + +ç§ãŸã¡ã®ã‚¿ã‚¯ã‚·ãƒ¼ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®å„エントリã¯ã€ã‚¿ã‚¯ã‚·ãƒ¼ã®æ—…ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ã“ã®åŒ¿å化ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯ã€ç´„20Mã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã§S3ãƒã‚±ãƒƒãƒˆhttps://datasets-documentation.s3.eu-west-3.amazonaws.com/ã®ãƒ•ã‚©ãƒ«ãƒ€**nyc-taxi**ã«åœ§ç¸®ã•ã‚Œã¦ã„ã¾ã™ã€‚データã¯TSVå½¢å¼ã§ã€ãƒ•ã‚¡ã‚¤ãƒ«ã”ã¨ã«ç´„1Mã®è¡ŒãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +### S3ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿èª­ã¿å–ã‚Š + +ClickHouseã«ä¿æŒã™ã‚‹ã“ã¨ãªãã€S3データをソースã¨ã—ã¦ã‚¯ã‚¨ãƒªã§ãã¾ã™ã€‚以下ã®ã‚¯ã‚¨ãƒªã§ã¯ã€10行をサンプルã—ã¾ã™ã€‚ã“ã®ãƒã‚±ãƒƒãƒˆã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯å…¬é–‹ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€ã“ã“ã§ã¯èªè¨¼æƒ…å ±ãŒä¸è¦ã§ã™ï¼š + +```sql +SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_*.gz', 'TabSeparatedWithNames') +LIMIT 10; +``` + +`TabSeparatedWithNames`å½¢å¼ã§ã¯ã€æœ€åˆã®è¡Œã«ã‚«ãƒ©ãƒ åãŒå«ã¾ã‚Œã¦ã„ã‚‹ãŸã‚ã€ã‚«ãƒ©ãƒ ã‚’列挙ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。`CSV`ã‚„`TSV`ãªã©ã®ä»–ã®å½¢å¼ã§ã¯ã€è‡ªå‹•ç”Ÿæˆã•ã‚ŒãŸã‚«ãƒ©ãƒ ï¼ˆä¾‹ï¼š`c1`ã€`c2`ã€`c3`ãªã©ï¼‰ãŒã“ã®ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦è¿”ã•ã‚Œã¾ã™ã€‚ + +クエリã¯ã¾ãŸã€ãƒã‚±ãƒƒãƒˆãƒ‘スã¨ãƒ•ã‚¡ã‚¤ãƒ«åã«é–¢ã™ã‚‹æƒ…報をæä¾›ã™ã‚‹[仮想カラム](../sql-reference/table-functions/s3#virtual-columns)(`_path`ã‚„`_file`ãªã©ï¼‰ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚例ãˆã°ï¼š + +```sql +SELECT _path, _file, trip_id +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_0.gz', 'TabSeparatedWithNames') +LIMIT 5; +``` + +```response +┌─_path──────────────────────────────────────┬─_file──────┬────trip_id─┠+│ datasets-documentation/nyc-taxi/trips_0.gz │ trips_0.gz │ 1199999902 │ +│ datasets-documentation/nyc-taxi/trips_0.gz │ trips_0.gz │ 1199999919 │ +│ datasets-documentation/nyc-taxi/trips_0.gz │ trips_0.gz │ 1199999944 │ +│ datasets-documentation/nyc-taxi/trips_0.gz │ trips_0.gz │ 1199999969 │ +│ datasets-documentation/nyc-taxi/trips_0.gz │ trips_0.gz │ 1199999990 │ +└────────────────────────────────────────────┴────────────┴────────────┘ +``` + +ã“ã®ã‚µãƒ³ãƒ—ルデータセットã®è¡Œæ•°ã‚’確èªã—ã¾ã™ã€‚ワイルドカードを使用ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‹¡å¼µã‚’è¡Œã†ãŸã‚ã€å…¨ã¦ã®20ファイルを考慮ã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯ã€ClickHouseインスタンスã®ã‚³ã‚¢æ•°ã«ã‚ˆã£ã¦ã¯ç´„10秒間ã‹ã‹ã‚Šã¾ã™ï¼š + +```sql +SELECT count() AS count +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_*.gz', 'TabSeparatedWithNames'); +``` + +```response +┌────count─┠+│ 20000000 │ +└──────────┘ +``` + +データをサンプリングã—ãŸã‚Šã€ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ã‹ã¤æŽ¢ç´¢çš„ãªã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã«ã¯ä¾¿åˆ©ã§ã™ãŒã€S3ã‹ã‚‰ç›´æŽ¥ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã®ã¯å®šæœŸçš„ã«è¡Œã†ã“ã¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“。本格的ã«å–り組むã¨ãã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã®`MergeTree`テーブルã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +### clickhouse-localã®ä½¿ç”¨ + +`clickhouse-local`プログラムを使用ã™ã‚‹ã¨ã€ClickHouseサーãƒãƒ¼ã‚’デプロイãŠã‚ˆã³æ§‹æˆã™ã‚‹ã“ã¨ãªãã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã—ã¦é«˜é€Ÿå‡¦ç†ã‚’実行ã§ãã¾ã™ã€‚`s3`テーブル関数を使用ã™ã‚‹ä»»æ„ã®ã‚¯ã‚¨ãƒªã¯ã€ã“ã®ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã‚’使用ã—ã¦å®Ÿè¡Œã§ãã¾ã™ã€‚例ãˆã°ï¼š + +```sql +clickhouse-local --query "SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_*.gz', 'TabSeparatedWithNames') LIMIT 10" +``` + +### S3ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ + +ClickHouseã®å®Œå…¨ãªæ©Ÿèƒ½ã‚’活用ã™ã‚‹ãŸã‚ã«ã€æ¬¡ã«ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«æŒ¿å…¥ã—ã¾ã™ã€‚`s3`関数ã¨å˜ç´”ãª`INSERT`文を組ã¿åˆã‚ã›ã¦ã“れを実ç¾ã—ã¾ã™ã€‚ターゲットテーブルã«å¿…è¦ãªæ§‹é€ ãŒæä¾›ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€ã‚«ãƒ©ãƒ ã‚’列挙ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®å ´åˆã€ã‚«ãƒ©ãƒ ã¯ãƒ†ãƒ¼ãƒ–ルDDLæ–‡ã§æŒ‡å®šã•ã‚ŒãŸé †åºã§å‡ºç¾ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼šã‚«ãƒ©ãƒ ã¯`SELECT`å¥ã§ã®ä½ç½®ã«åŸºã¥ã„ã¦ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚ã™ã¹ã¦ã®1,000万行ã®æŒ¿å…¥ã¯ã€ClickHouseインスタンスã«å¿œã˜ã¦æ•°åˆ†ã‹ã‹ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚以下ã§ã¯ã€1,000,000行を挿入ã—ã¦è¿…速ãªå¿œç­”を確ä¿ã—ã¦ã„ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦`LIMIT`å¥ã‚„カラムé¸æŠžã‚’調整ã—ã¦ã€éƒ¨åˆ†é›†åˆã‚’インãƒãƒ¼ãƒˆã—ã¾ã™ï¼š + +```sql +INSERT INTO trips + SELECT * + FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_*.gz', 'TabSeparatedWithNames') + LIMIT 1000000; +``` + +### ClickHouseローカルを使用ã—ãŸãƒªãƒ¢ãƒ¼ãƒˆæŒ¿å…¥ + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒãƒªã‚·ãƒ¼ã«ã‚ˆã‚ŠClickHouseクラスタã‹ã‚‰ã®å¤–部接続ãŒåˆ¶é™ã•ã‚Œã¦ã„ã‚‹å ´åˆã€`clickhouse-local`を使用ã—ã¦S3データを挿入ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚以下ã®ä¾‹ã§ã¯ã€S3ãƒã‚±ãƒƒãƒˆã‹ã‚‰èª­ã¿å–ã‚Šã€`remote`関数を使用ã—ã¦ClickHouseã«æŒ¿å…¥ã—ã¾ã™ï¼š + +```sql +clickhouse-local --query "INSERT INTO TABLE FUNCTION remote('localhost:9000', 'default.trips', 'username', 'password') (*) SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_*.gz', 'TabSeparatedWithNames') LIMIT 10" +``` + +:::note +SSL接続ã§ã“れを実行ã™ã‚‹ã«ã¯ã€`remoteSecure`関数を利用ã—ã¦ãã ã•ã„。 +::: + +### データã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +`s3`テーブル関数を使用ã—ã¦ã€S3ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’書ã込むã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã¯é©åˆ‡ãªæ¨©é™ãŒå¿…è¦ã§ã™ã€‚リクエストã§å¿…è¦ãªè³‡æ ¼æƒ…報を渡ã—ã¾ã™ãŒã€ä»–ã®ã‚ªãƒ—ションã«ã¤ã„ã¦ã¯[資格情報ã®ç®¡ç†](#managing-credentials)ページをå‚ç…§ã—ã¦ãã ã•ã„。 + +以下ã®å˜ç´”ãªä¾‹ã§ã¯ã€ã‚½ãƒ¼ã‚¹ã§ã¯ãªã宛先ã¨ã—ã¦ãƒ†ãƒ¼ãƒ–ル関数を使用ã—ã¾ã™ã€‚ã“ã“ã§ã€`trips`テーブルã‹ã‚‰10,000行をS3ãƒã‚±ãƒƒãƒˆã«æµã—è¾¼ã¿ã€`lz4`圧縮ã¨`CSV`ã®å‡ºåŠ›å½¢å¼ã‚’指定ã—ã¾ã™ï¼š + +```sql +INSERT INTO FUNCTION + s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/csv/trips.csv.lz4', + 's3_key', + 's3_secret', + 'CSV' + ) +SELECT * +FROM trips +LIMIT 10000; +``` + +ã“ã“ã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®å½¢å¼ãŒæ‹¡å¼µå­ã‹ã‚‰æŽ¨æ¸¬ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã¾ãŸã€`s3`関数内ã§åˆ—を指定ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“ - `SELECT`ã‹ã‚‰æŽ¨æ¸¬ã§ãã¾ã™ã€‚ + +### 大è¦æ¨¡ãƒ•ã‚¡ã‚¤ãƒ«ã®åˆ†å‰² + +データをå˜ä¸€ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¨ã—ã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ã¯ã‚ã¾ã‚Šæœ›ã¾ã—ãã‚ã‚Šã¾ã›ã‚“。ClickHouseã‚’å«ã‚€ã»ã¨ã‚“ã©ã®ãƒ„ールã¯ã€ä¸¦åˆ—処ç†ã®å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã™ã‚‹èª­ã¿å–りや書ãè¾¼ã¿ã§ã‚ˆã‚Šé«˜ã„スループットパフォーマンスをé”æˆã—ã¾ã™ã€‚`INSERT`コマンドを複数回実行ã—ã€ãƒ‡ãƒ¼ã‚¿ã®ã‚µãƒ–セットをターゲットã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouseã¯ã€`パーティション`キーを使用ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã‚’自動的ã«åˆ†å‰²ã™ã‚‹æ‰‹æ®µã‚’æä¾›ã—ã¾ã™ã€‚ + +以下ã®ä¾‹ã§ã¯ã€`rand()`関数ã®å‰°ä½™ã‚’使用ã—ã¦10個ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã—ã¾ã™ã€‚çµæžœã®ãƒ‘ーティションIDãŒãƒ•ã‚¡ã‚¤ãƒ«åã§å‚ç…§ã•ã‚Œã‚‹ã“ã¨ã«æ³¨ç›®ã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€æ•°å€¤ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ãŒä»˜ã„ãŸ10個ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒä½œæˆã•ã‚Œã¾ã™ã€‚例:`trips_0.csv.lz4`ã€`trips_1.csv.lz4`ãªã©...: + +```sql +INSERT INTO FUNCTION + s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/csv/trips_{_partition_id}.csv.lz4', + 's3_key', + 's3_secret', + 'CSV' + ) + PARTITION BY rand() % 10 +SELECT * +FROM trips +LIMIT 100000; +``` + +ã¾ãŸã¯ã€ãƒ‡ãƒ¼ã‚¿ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’å‚ç…§ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã¯ã€`payment_type`ãŒ5ã®ã‚«ãƒ¼ãƒ‰ã®ãƒŠãƒãƒ¥ãƒ©ãƒ«ãªãƒ‘ーティションキーをæä¾›ã—ã¾ã™ã€‚ + +```sql +INSERT INTO FUNCTION + s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/csv/trips_{_partition_id}.csv.lz4', + 's3_key', + 's3_secret', + 'CSV' + ) + PARTITION BY payment_type +SELECT * +FROM trips +LIMIT 100000; +``` + +### クラスターã®åˆ©ç”¨ + +上記ã®é–¢æ•°ã¯ã™ã¹ã¦å˜ä¸€ãƒŽãƒ¼ãƒ‰ã§ã®å®Ÿè¡Œã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚読ã¿å–り速度ã¯CPUコアã«ãƒªãƒ‹ã‚¢ã«ã‚¹ã‚±ãƒ¼ãƒ«ã™ã‚‹ãŸã‚ã€ä»–ã®ãƒªã‚½ãƒ¼ã‚¹ï¼ˆé€šå¸¸ã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ï¼‰ãŒé£½å’Œã™ã‚‹ã¾ã§ç¸¦æ–¹å‘ã«ã‚¹ã‚±ãƒ¼ãƒ«ã§ãã¾ã™ã€‚ã—ã‹ã—ã€ã“ã®ã‚¢ãƒ—ローãƒã«ã¯é™ç•ŒãŒã‚ã‚Šã¾ã™ã€‚`INSERT INTO SELECT`クエリを実行ã™ã‚‹ã¨ãã«åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹ã“ã¨ã§ã€ã„ãã¤ã‹ã®ãƒªã‚½ãƒ¼ã‚¹ãƒ—レッシャーを軽減ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã®èª­ã¿å–ã‚Šã€è§£æžã€å‡¦ç†ã‚’è¡Œã†ãƒŽãƒ¼ãƒ‰ãŒå˜ä¸€ã®ã¾ã¾ã§ã™ã€‚ã“ã®èª²é¡Œã«å¯¾å‡¦ã—ã€èª­ã¿å–ã‚Šã‚’æ°´å¹³ã«ã‚¹ã‚±ãƒ¼ãƒ«ã™ã‚‹ãŸã‚ã«ã€[s3Cluster](/docs/ja/sql-reference/table-functions/s3Cluster.md)関数ãŒã‚ã‚Šã¾ã™ã€‚ + +クエリをå—ä¿¡ã—ãŸãƒŽãƒ¼ãƒ‰ï¼ˆã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ã¨ã—ã¦çŸ¥ã‚‰ã‚Œã¦ã„ã¾ã™ï¼‰ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã¨ã®æŽ¥ç¶šã‚’作æˆã—ã¾ã™ã€‚ファイルを読ã¿å–ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚’決定ã™ã‚‹globパターンãŒã€ä¸€é€£ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«è§£æ±ºã•ã‚Œã¾ã™ã€‚イニシエーターã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚’クラスタ内ã®ãƒŽãƒ¼ãƒ‰ã«é…布ã—ã€ã“れらã®ãƒŽãƒ¼ãƒ‰ã¯ãƒ¯ãƒ¼ã‚«ãƒ¼ã¨ã—ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚ã“れらã®ãƒ¯ãƒ¼ã‚«ãƒ¼ã¯ã€èª­ã¿å–ã‚ŠãŒå®Œäº†ã—ãŸã‚‰å‡¦ç†ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’è¦æ±‚ã—ã¾ã™ã€‚ã“ã®ãƒ—ロセスã«ã‚ˆã‚Šã€èª­ã¿å–ã‚Šã‚’æ°´å¹³ã«ã‚¹ã‚±ãƒ¼ãƒ«ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +`s3Cluster`関数ã¯ã€å˜ä¸€ãƒŽãƒ¼ãƒ‰ãƒãƒªã‚¢ãƒ³ãƒˆã¨åŒã˜å½¢å¼ã‚’ã¨ã‚Šã¾ã™ãŒã€ãƒ¯ãƒ¼ã‚«ãƒ¼ãƒŽãƒ¼ãƒ‰ã‚’示ã™ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã‚¯ãƒ©ã‚¹ã‚¿ãŒå¿…è¦ã§ã™ï¼š + +``` +s3Cluster(cluster_name, source, [access_key_id, secret_access_key,] format, structure) +``` + +* `cluster_name` — リモートãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒ«ã‚µãƒ¼ãƒãƒ¼ã¸ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã¨æŽ¥ç¶šãƒ‘ラメータã®ã‚»ãƒƒãƒˆã‚’構築ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ã®åå‰ã€‚ +* `source` — ファイルã¾ãŸã¯ä¸€é€£ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®URL。読ã¿å–り専用モードã§ä»¥ä¸‹ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ï¼š*, ?, {'abc','def'} åŠã³ {N..M}ã€N, M — æ•°å­—ã€abc, def — 文字列。詳細ã¯[ワイルドカード使用ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](/docs/ja/engines/table-engines/integrations/s3.md/#wildcards-in-path)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +* `access_key_id`åŠã³`secret_access_key` — 指定ã•ã‚ŒãŸã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹è³‡æ ¼æƒ…報を指定ã—ã¾ã™ã€‚オプションã§ã™ã€‚ +* `format` — ファイルã®[フォーマット](/docs/ja/interfaces/formats.md/#formats)。 +* `structure` — テーブルã®æ§‹é€ ã€‚å½¢å¼ã¯'column1_name column1_type, column2_name column2_type, ...'ã§ã™ã€‚ + +`s3`関数ã®ã‚ˆã†ã«ã€ãƒã‚±ãƒƒãƒˆãŒã‚»ã‚­ãƒ¥ã‚¢ã§ã¯ãªã„ã€ã¾ãŸã¯IAMロールを通ã˜ã¦ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’定義ã—ã¦ã„ã‚‹å ´åˆã¯ã€è³‡æ ¼æƒ…å ±ã¯ã‚ªãƒ—ションã§ã™ã€‚ã—ã‹ã—ã€`s3Cluster`関数ã®å ´åˆã€22.3.1ã§ã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«æ§‹é€ ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€ã¤ã¾ã‚Šã‚¹ã‚­ãƒ¼ãƒžã¯æŽ¨æ¸¬ã•ã‚Œã¾ã›ã‚“。 + +ã“ã®é–¢æ•°ã¯ã€å¤šãã®å ´åˆã€`INSERT INTO SELECT`ã®ä¸€éƒ¨ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®å ´åˆã€åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹ã“ã¨ãŒå¤šã„ã§ã™ã€‚以下ã®ç°¡å˜ãªä¾‹ã‚’示ã—ã¾ã™ã€‚ã“ã“ã§`trips_all`ã¯åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã§ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルãŒã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒ©ã‚¹ã‚¿ã‚’使用ã—ã¦ã„ã‚‹é–“ã€èª­ã¿å–ã‚Šã¨æ›¸ãè¾¼ã¿ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒŽãƒ¼ãƒ‰ã®ä¸€è²«æ€§ã¯è¦ä»¶ã§ã¯ã‚ã‚Šã¾ã›ã‚“: + +```sql +INSERT INTO default.trips_all + SELECT * + FROM s3Cluster( + 'events', + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_*.gz', + 'TabSeparatedWithNames' + ) +``` + +挿入ã¯ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ãƒŽãƒ¼ãƒ‰ã«å¯¾ã—ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€èª­ã¿å–ã‚Šã¯å„ノードã§è¡Œã‚ã‚Œã¾ã™ãŒã€çµæžœã®è¡Œã¯ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ã«ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã•ã‚Œã€åˆ†é…ã•ã‚Œã¾ã™ã€‚高スループットã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€ã“ã‚ŒãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã¨ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«å¯¾å‡¦ã™ã‚‹ãŸã‚ã«ã€`s3Cluster`関数ã®ãƒ‘ラメータ[parallel_distributed_insert_select](/docs/ja/operations/settings/settings/#parallel_distributed_insert_select)を設定ã—ã¾ã™ã€‚ + +## S3テーブルエンジン + +`s3`関数ã¯ã€S3ã«ä¿å­˜ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«å¯¾ã™ã‚‹ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ã‚¯ã‚¨ãƒªã‚’å¯èƒ½ã«ã—ã¾ã™ãŒã€æ–‡æ³•çš„ã«å†—é•·ã§ã™ã€‚`S3`テーブルエンジンを使用ã™ã‚‹ã¨ã€ãƒã‚±ãƒƒãƒˆURLã¨è³‡æ ¼æƒ…報を繰り返ã—指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã›ã‚“。ã“れを解決ã™ã‚‹ãŸã‚ã«ã€ClickHouseã¯S3テーブルエンジンをæä¾›ã—ã¾ã™ã€‚ + +```sql +CREATE TABLE s3_engine_table (name String, value UInt32) + ENGINE = S3(path, [aws_access_key_id, aws_secret_access_key,] format, [compression]) + [SETTINGS ...] +``` + +* `path` — ãƒã‚±ãƒƒãƒˆURLã¨ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘ス。読ã¿å–り専用モードã§ä»¥ä¸‹ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ï¼š*, ?, {abc,def}ã€{N..M}(N, M — æ•°å­—ã€'abc', 'def' — 文字列)。詳細ã¯[ã“ã“](/docs/ja/engines/table-engines/integrations/s3#wildcards-in-path)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +* `format` — ファイルã®[フォーマット](/docs/ja/interfaces/formats.md/#formats)。 +* `aws_access_key_id`ã€`aws_secret_access_key` - AWSアカウントユーザー用ã®é•·æœŸçš„ãªè³‡æ ¼æƒ…報。ã“れを使用ã—ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«èªè¨¼ã§ãã¾ã™ã€‚パラメータã¯ã‚ªãƒ—ションã§ã™ã€‚資格情報ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã®å€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚詳細ã¯ã€[資格情報ã®ç®¡ç†](#managing-credentials)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +* `compression` — 圧縮タイプ。サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る値ã¯ã€noneã€gzip/gzã€brotli/brã€xz/LZMAã€zstd/zstã§ã™ã€‚パラメータã¯ã‚ªãƒ—ションã§ã™ã€‚デフォルトã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«ã‚ˆã‚Šåœ§ç¸®ã‚’自動検出ã—ã¾ã™ã€‚ + +### データã®èª­ã¿å–ã‚Š + +以下ã®ä¾‹ã§ã¯ã€`https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/`ãƒã‚±ãƒƒãƒˆã«ã‚る最åˆã®10個ã®TSVファイルを使用ã—ã¦`trips_raw`ã¨ã„ã†åå‰ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ãã‚Œãžã‚Œã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯1Mè¡ŒãŒå«ã¾ã‚Œã¦ã„ã¾ã™ï¼š + +```sql +CREATE TABLE trips_raw +( + `trip_id` UInt32, + `vendor_id` Enum8('1' = 1, '2' = 2, '3' = 3, '4' = 4, 'CMT' = 5, 'VTS' = 6, 'DDS' = 7, 'B02512' = 10, 'B02598' = 11, 'B02617' = 12, 'B02682' = 13, 'B02764' = 14, '' = 15), + `pickup_date` Date, + `pickup_datetime` DateTime, + `dropoff_date` Date, + `dropoff_datetime` DateTime, + `store_and_fwd_flag` UInt8, + `rate_code_id` UInt8, + `pickup_longitude` Float64, + `pickup_latitude` Float64, + `dropoff_longitude` Float64, + `dropoff_latitude` Float64, + `passenger_count` UInt8, + `trip_distance` Float64, + `fare_amount` Float32, + `extra` Float32, + `mta_tax` Float32, + `tip_amount` Float32, + `tolls_amount` Float32, + `ehail_fee` Float32, + `improvement_surcharge` Float32, + `total_amount` Float32, + `payment_type_` Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4), + `trip_type` UInt8, + `pickup` FixedString(25), + `dropoff` FixedString(25), + `cab_type` Enum8('yellow' = 1, 'green' = 2, 'uber' = 3), + `pickup_nyct2010_gid` Int8, + `pickup_ctlabel` Float32, + `pickup_borocode` Int8, + `pickup_ct2010` String, + `pickup_boroct2010` FixedString(7), + `pickup_cdeligibil` String, + `pickup_ntacode` FixedString(4), + `pickup_ntaname` String, + `pickup_puma` UInt16, + `dropoff_nyct2010_gid` UInt8, + `dropoff_ctlabel` Float32, + `dropoff_borocode` UInt8, + `dropoff_ct2010` String, + `dropoff_boroct2010` FixedString(7), + `dropoff_cdeligibil` String, + `dropoff_ntacode` FixedString(4), + `dropoff_ntaname` String〠+ `dropoff_puma` UInt16 +) ENGINE = S3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_{0..9}.gz', 'TabSeparatedWithNames', 'gzip'); +``` + +{0..9}パターンを使用ã—ã¦æœ€åˆã®10個ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«é™å®šã—ã¦ã„る点ã«æ³¨ç›®ã—ã¦ãã ã•ã„。作æˆå¾Œã¯ã€ä»–ã®ãƒ†ãƒ¼ãƒ–ルã¨åŒæ§˜ã«ã“ã®ãƒ†ãƒ¼ãƒ–ルをクエリã§ãã¾ã™ï¼š + +```sql +SELECT DISTINCT(pickup_ntaname) +FROM trips_raw +LIMIT 10; +``` + +```response +┌─pickup_ntaname───────────────────────────────────┠+│ Lenox Hill-Roosevelt Island │ +│ Airport │ +│ SoHo-TriBeCa-Civic Center-Little Italy │ +│ West Village │ +│ Chinatown │ +│ Hudson Yards-Chelsea-Flatiron-Union Square │ +│ Turtle Bay-East Midtown │ +│ Upper West Side │ +│ Murray Hill-Kips Bay │ +│ DUMBO-Vinegar Hill-Downtown Brooklyn-Boerum Hill │ +└──────────────────────────────────────────────────┘ +``` + +### データã®æŒ¿å…¥ + +`S3`テーブルエンジンã¯ä¸¦åˆ—読ã¿å–りをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚書ãè¾¼ã¿ã¯ã€ãƒ†ãƒ¼ãƒ–ル定義ã«ã‚°ãƒ­ãƒ–パターンãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã«ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ä¸Šè¨˜ã®ãƒ†ãƒ¼ãƒ–ルã§ã¯æ›¸è¾¼ã¿ã¯ãƒ–ロックã•ã‚Œã¾ã™ã€‚ + +書ãè¾¼ã¿ã‚’示ã™ãŸã‚ã«ã€æ›¸ãè¾¼ã¿å¯èƒ½ãªS3ãƒã‚±ãƒƒãƒˆã‚’指ã™ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +```sql +CREATE TABLE trips_dest +( + `trip_id` UInt32, + `pickup_date` Date, + `pickup_datetime` DateTime, + `dropoff_datetime` DateTime, + `tip_amount` Float32, + `total_amount` Float32 +) ENGINE = S3('/trips.bin', 'Native'); +``` + +```sql +INSERT INTO trips_dest + SELECT + trip_id, + pickup_date, + pickup_datetime, + dropoff_datetime, + tip_amount, + total_amount + FROM trips + LIMIT 10; +``` + +```sql +SELECT * FROM trips_dest LIMIT 5; +``` + +```response +┌────trip_id─┬─pickup_date─┬─────pickup_datetime─┬────dropoff_datetime─┬─tip_amount─┬─total_amount─┠+│ 1200018648 │ 2015-07-01 │ 2015-07-01 00:00:16 │ 2015-07-01 00:02:57 │ 0 │ 7.3 │ +│ 1201452450 │ 2015-07-01 │ 2015-07-01 00:00:20 │ 2015-07-01 00:11:07 │ 1.96 │ 11.76 │ +│ 1202368372 │ 2015-07-01 │ 2015-07-01 00:00:40 │ 2015-07-01 00:05:46 │ 0 │ 7.3 │ +│ 1200831168 │ 2015-07-01 │ 2015-07-01 00:01:06 │ 2015-07-01 00:09:23 │ 2 │ 12.3 │ +│ 1201362116 │ 2015-07-01 │ 2015-07-01 00:01:07 │ 2015-07-01 00:03:31 │ 0 │ 5.3 │ +└────────────┴─────────────┴─────────────────────┴─────────────────────┴────────────┴──────────────┘ +``` + +è¡Œã¯æ–°ã—ã„ファイルã«ã®ã¿æŒ¿å…¥ã§ãã¾ã™ã€‚マージサイクルやファイル分割æ“作ã¯ã‚ã‚Šã¾ã›ã‚“。一度書ãè¾¼ã¾ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€å¾Œç¶šã®æŒ¿å…¥ãŒå¤±æ•—ã—ã¾ã™ã€‚ユーザーã«ã¯2ã¤ã®ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ï¼š + +* 設定` s3_create_new_file_on_insert=1`を指定ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å„挿入時ã«æ–°ã—ã„ファイルãŒä½œæˆã•ã‚Œã¾ã™ã€‚数値サフィックスãŒãƒ•ã‚¡ã‚¤ãƒ«ã®æœ«å°¾ã«ä»˜åŠ ã•ã‚Œã€å„挿入æ“作ã§å˜èª¿ã«å¢—加ã—ã¾ã™ã€‚上記ã®ä¾‹ã§ã¯ã€å¾Œç¶šã®æŒ¿å…¥ã¯trips_1.binファイルã®ä½œæˆã‚’引ãèµ·ã“ã™ã§ã—ょã†ã€‚ +* 設定`s3_truncate_on_insert=1`を指定ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒåˆ‡ã‚Šè©°ã‚られã€å®Œäº†å¾Œã«æ–°ã—ã挿入ã•ã‚ŒãŸè¡Œã®ã¿ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +ã“れらã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§0ã«è¨­å®šã•ã‚Œã¦ãŠã‚Šã€ã„ãšã‚Œã‹ã‚’設定ã™ã‚‹ã‚ˆã†ã«ã—ã¦ã„ã¾ã™ã€‚`s3_truncate_on_insert`ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å„ªå…ˆã•ã‚Œã¾ã™ã€‚ + +`S3`テーブルエンジンã«é–¢ã™ã‚‹ãƒŽãƒ¼ãƒˆï¼š + +- ä¼çµ±çš„ãª`MergeTree`ファミリーテーブルã¨ã¯ç•°ãªã‚Šã€`S3`テーブルを削除ã™ã‚‹ã“ã¨ã¯ã€åŸºã«ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã›ã‚“。 +- ã“ã®ãƒ†ãƒ¼ãƒ–ルタイプã®å®Œå…¨ãªè¨­å®šã¯[ã“ã“](/docs/ja/engines/table-engines/integrations/s3.md/#settings)ã§è¦‹ã¤ã‘られã¾ã™ã€‚ +- ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã™ã‚‹éš›ã«ã¯ã€ä»¥ä¸‹ã®æ³¨æ„点ãŒã‚ã‚Šã¾ã™ï¼š + * ALTERクエリã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ + * サンプルæ“作ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ + * プライマリã¾ãŸã¯ã‚¹ã‚­ãƒƒãƒ—ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®æ¦‚念ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## 資格情報ã®ç®¡ç† + +å‰ã®ä¾‹ã§ã¯ã€`s3`関数ã¾ãŸã¯`S3`テーブル定義ã§è³‡æ ¼æƒ…報を渡ã—ã¾ã—ãŸãŒã€ã“ã‚Œã¯æ™‚折ã®ä½¿ç”¨ã«ã¯è¨±å®¹ã§ãã¾ã™ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ—ロダクションã§ã®ã‚ˆã‚Šæ˜Žç¤ºçš„ã§ãªã„èªè¨¼ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ãŒæ±‚ã‚られã¾ã™ã€‚ã“ã‚Œã«å¯¾å¿œã—ã¦ã€ClickHouseã¯æ•°ã¤ã®ã‚ªãƒ—ションをæä¾›ã—ã¾ã™ï¼š + +* 接続ã®è©³ç´°ã‚’**config.xml**ã¾ãŸã¯**conf.d**下ã®åŒç­‰ã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã«æŒ‡å®šã—ã¾ã™ã€‚デビアンパッケージを使用ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãŸå ´åˆã®ä¾‹ãƒ•ã‚¡ã‚¤ãƒ«ã®å†…容を以下ã«ç¤ºã—ã¾ã™ã€‚ + + ```xml + ubuntu@single-node-clickhouse:/etc/clickhouse-server/config.d$ cat s3.xml + + + + https://dalem-files.s3.amazonaws.com/test/ + key + secret + + + + + + ``` + + ã“れらã®è³‡æ ¼æƒ…å ±ã¯ã€ä¸Šè¨˜ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆãŒè¦æ±‚ã•ã‚ŒãŸURLã«å¯¾ã™ã‚‹å®Œå…¨ãªãƒ—レフィックス一致ã§ã‚るリクエストã®å ´åˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã¾ãŸã€ä¾‹ã§ã¯ã‚¢ã‚¯ã‚»ã‚¹ãƒˆãƒ¼ã‚¯ãƒ³ã¨ã—ã¦ã®ã‚ªãƒ«ã‚¿ãƒŠãƒ†ã‚£ãƒ–ã¨ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ã¨ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆã‚­ãƒ¼ã®ä»£ã‚ã‚Šã«ã€èªè¨¼ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’宣言ã™ã‚‹èƒ½åŠ›ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る設定ã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯[ã“ã“](/docs/ja/engines/table-engines/integrations/s3.md/#settings)ã§è¦‹ã¤ã‘られã¾ã™ã€‚ + +* 上記ã®ä¾‹ã§ã¯ã€æ§‹æˆãƒ‘ラメータ`use_environment_credentials`ã®åˆ©ç”¨å¯èƒ½æ€§ã‚’強調ã—ã¦ã„ã¾ã™ã€‚ã“ã®æ§‹æˆãƒ‘ラメータã¯ã€`s3`レベルã§ã‚°ãƒ­ãƒ¼ãƒãƒ«ã«è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + + ```xml + + + true + + + ``` + + ã“ã®è¨­å®šã¯ã€ç’°å¢ƒã‹ã‚‰S3資格情報をå–å¾—ã—よã†ã¨ã™ã‚‹ã“ã¨ã‚’許å¯ã™ã‚‹ãŸã‚ã€IAMロールを通ã˜ã¦ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ã¾ã™ã€‚具体的ã«ã¯ã€æ¬¡ã®é †åºã§ã®å–å¾—ãŒå®Ÿè¡Œã•ã‚Œã¾ã™ï¼š + + * 環境変数`AWS_ACCESS_KEY_ID`ã€`AWS_SECRET_ACCESS_KEY`ãŠã‚ˆã³`AWS_SESSION_TOKEN`ã®æ¤œç´¢ã€‚ + * **$HOME/.aws**ã§ã®ãƒã‚§ãƒƒã‚¯å®Ÿæ–½ã€‚ + * AWSセキュリティトークンサービスを通ã˜ãŸä¸€æ™‚çš„ãªè³‡æ ¼æƒ…å ±ã®å–å¾— - ã™ãªã‚ã¡ [AssumeRole](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) APIを通ã˜ã¦ã€‚ + * ECS環境変数`AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`ã¾ãŸã¯`AWS_CONTAINER_CREDENTIALS_FULL_URI`ã¨`AWS_ECS_CONTAINER_AUTHORIZATION_TOKEN`ã§ã®è³‡æ ¼æƒ…å ±ã®ãƒã‚§ãƒƒã‚¯ã€‚ + * [Amazon EC2インスタンスメタデータ](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-metadata.html)を通ã˜ãŸè³‡æ ¼æƒ…å ±ã®å–å¾—ã€ãŸã ã—[AWS_EC2_METADATA_DISABLED](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html#envvars-list-AWS_EC2_METADATA_DISABLED)ãŒtrueã«è¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€‚ + * ã“れらã®è¨­å®šã¯ã€ãƒ—レフィックス一致ルールを使用ã—ã¦ã€ç‰¹å®šã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆç”¨ã«è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## パフォーマンス最é©åŒ– {#s3-optimizing-performance} + +S3関数を使用ã—ãŸèª­ã¿å–ã‚ŠãŠã‚ˆã³æŒ¿å…¥ã‚’最é©åŒ–ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[専用ã®ãƒ‘フォーマンスガイド](./performance.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### S3ストレージã®ãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚° + +内部的ã«ã€ClickHouseã®MergeTreeã¯ã€[`Wide`ã¨`Compact`](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#mergetree-data-storage)ã¨ã„ã†2ã¤ã®ä¸»ãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å½¢å¼ã‚’使用ã—ã¾ã™ã€‚ç¾åœ¨ã®å®Ÿè£…ã¯ã€ï¼ˆ`min_bytes_for_wide_part`ãŠã‚ˆã³`min_rows_for_wide_part`ã®è¨­å®šã«ã‚ˆã‚Šåˆ¶å¾¡ã•ã‚Œã‚‹ï¼‰ClickHouseã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å‹•ä½œã‚’使用ã—ã¦ã„ã¾ã™ãŒã€å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯S3ã®å‹•ä½œãŒå¤‰ã‚ã‚‹ã“ã¨ãŒäºˆæ¸¬ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ã‚ˆã‚Šå¤§ããªãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒè¨­å®šã•ã‚Œ`Compact`フォーマットを推奨ã—ã€ãã‚Œã«ã‚ˆã‚Šãƒ•ã‚¡ã‚¤ãƒ«ãŒå°‘ãªããªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ç¾åœ¨ã€S3ストレージを専用ã«ä½¿ç”¨ã—ã¦ã„ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã“れらã®è¨­å®šã‚’調整ã™ã‚‹ã“ã¨ã‚’検討ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## S3ãƒãƒƒã‚¯ãƒ‰MergeTree + +`s3`関数ã¨é–¢é€£ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã™ã‚‹ã¨ã€ClickHouseã®è¦ªã—ã¿ã‚„ã™ã„構文を使用ã—ã¦S3データをクエリã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€ãƒ‡ãƒ¼ã‚¿ç®¡ç†æ©Ÿèƒ½ã¨ãƒ‘フォーマンスã«é–¢ã—ã¦ã¯ã€åˆ¶é™ãŒã‚ã‚Šã¾ã™ã€‚プライマリインデックスã®ã‚µãƒãƒ¼ãƒˆãŒãªã„ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µãƒãƒ¼ãƒˆãŒãªã„ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®æŒ¿å…¥ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒç®¡ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseã¯ã€S3ãŒç‰¹ã«ã‚¯ã‚¨ãƒªãƒ‘フォーマンスãŒé‡è¦ã§ãªã„「コールドã€ãƒ‡ãƒ¼ã‚¿ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã¨ã—ã¦é­…力的ã§ã‚ã‚‹ã“ã¨ã‚’èªè­˜ã—ã¦ãŠã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã‚³ãƒ³ãƒ”ュートを分離ã—ãŸã„ã¨è€ƒãˆã¦ã„ã¾ã™ã€‚ã“れをé”æˆã™ã‚‹ãŸã‚ã«ã€S3ã‚’MergeTreeエンジンã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã‚µãƒãƒ¼ãƒˆãŒæä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯S3ã®ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティã¨ã‚³ã‚¹ãƒˆãƒ¡ãƒªãƒƒãƒˆã€ãã—ã¦MergeTreeエンジンã®æŒ¿å…¥ãŠã‚ˆã³ã‚¯ã‚¨ãƒªãƒ‘フォーマンスを活用ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +### ストレージ階層 + +ClickHouseストレージボリュームã¯ã€ç‰©ç†ãƒ‡ã‚£ã‚¹ã‚¯ã‚’MergeTreeテーブルエンジンã‹ã‚‰æŠ½è±¡åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ä»»æ„ã®å˜ä¸€ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ã®é †åºä»˜ã‘ã•ã‚ŒãŸã‚»ãƒƒãƒˆã§æ§‹æˆã•ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«è¤‡æ•°ã®ãƒ–ロックデãƒã‚¤ã‚¹ã‚’使用ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã ã‘ã§ãªãã€S3ãªã©ã®ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—も使用å¯èƒ½ã§ã™ã€‚ClickHouseデータパーツã¯ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã«å¾“ã£ã¦ãƒœãƒªãƒ¥ãƒ¼ãƒ é–“ã§ç§»å‹•ãŠã‚ˆã³ãƒ•ã‚£ãƒ«ãƒ¬ãƒ¼ãƒˆã•ã‚Œã‚‹ã“ã¨ãŒã§ãã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸éšŽå±¤ã®æ¦‚念ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +ストレージ階層アンロックã¯ã€é€šå¸¸ã€æœ€ã‚‚æ–°ã—ã„データãŒæœ€ã‚‚クエリã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã€é«˜æ€§èƒ½ãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã€ä¾‹ãˆã°NVMe SSD上ã§ã®ã¿å°é‡ã®ã‚¹ãƒšãƒ¼ã‚¹ã‚’è¦æ±‚ã™ã‚‹ãƒ›ãƒƒãƒˆ-コールドアーキテクãƒãƒ£ã‚’解放ã—ã¾ã™ã€‚データãŒå¤ããªã‚‹ã«ã¤ã‚Œã¦ã€ã‚¯ã‚¨ãƒªæ™‚é–“ã®SLAãŒå¢—加ã—ã€ã‚¯ã‚¨ãƒªã®é »åº¦ãŒæ¸›å°‘ã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã®ãƒ•ã‚¡ãƒƒãƒˆãƒ†ãƒ¼ãƒ«ã¯ã€HDDã‚„S3ãªã©ã®ã‚ªãƒ–ジェクトストレージã®ã‚ˆã†ãªã€ãƒ‘フォーマンスã®ä½Žã„ストレージã«æ ¼ç´ã•ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### ディスクã®ä½œæˆ + +S3ãƒã‚±ãƒƒãƒˆã‚’ディスクã¨ã—ã¦åˆ©ç”¨ã™ã‚‹ãŸã‚ã«ã€ã¾ãšClickHouse構æˆãƒ•ã‚¡ã‚¤ãƒ«å†…ã§å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚config.xmlã‚’æ‹¡å¼µã™ã‚‹ã‹ã€ã¾ãŸã¯preferã§plugin.dã«æ–°ã—ã„ファイルをæä¾›ã—ã¾ã™ã€‚以下ã«ç¤ºã™ä¾‹ã¯S3ディスク宣言ã®ä¾‹ã§ã™ï¼š + +```xml + + + ... + + + s3 + https://sample-bucket.s3.us-east-2.amazonaws.com/tables/ + your_access_key_id + your_secret_access_key + + /var/lib/clickhouse/disks/s3/ + + + cache + s3 + /var/lib/clickhouse/disks/s3_cache/ + 10Gi + + + ... + + +``` + +ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯å®£è¨€ã«é–¢é€£ã™ã‚‹è¨­å®šã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯[ã“ã“](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-s3)ã§è¦‹ã¤ã‘られã¾ã™ã€‚資格情報ã¯ã€[資格情報ã®ç®¡ç†](#managing-credentials)ã§èª¬æ˜Žã•ã‚ŒãŸåŒã˜ã‚¢ãƒ—ローãƒã‚’使用ã—ã¦ã“ã“ã§ç®¡ç†ã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€ä¸Šè¨˜ã®è¨­å®šãƒ–ロックã§`use_environment_credentials`ã‚’trueã«è¨­å®šã—ã¦IAMロールを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### ストレージãƒãƒªã‚·ãƒ¼ã®ä½œæˆ + +設定ãŒå®Œäº†ã™ã‚‹ã¨ã€ã“ã®ã€Œãƒ‡ã‚£ã‚¹ã‚¯ã€ã¯ãƒãƒªã‚·ãƒ¼ã§å®£è¨€ã•ã‚ŒãŸã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒœãƒªãƒ¥ãƒ¼ãƒ ã§ä½¿ç”¨ã§ãã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ã€S3ãŒå”¯ä¸€ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã§ã‚ã‚‹ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒTTLやフィルレートã«åŸºã¥ã„ã¦ç§»å‹•ã•ã‚Œã‚‹å¯èƒ½æ€§ã®ã‚るより複雑ãªãƒ›ãƒƒãƒˆ-コールドアーキテクãƒãƒ£ã‚’無視ã—ã¾ã™ã€‚ + +```xml + + + + + ... + + + ... + + + + + +
+ s3 +
+
+
+
+
+
+``` + +### テーブルã®ä½œæˆ + +ディスクをwriteアクセスã®ã‚ã‚‹ãƒã‚±ãƒƒãƒˆã«è¨­å®šã—ã¦ã„ã‚‹ã¨ä»®å®šã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ä¾‹ã®ã‚ˆã†ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã§ãã¾ã™ã€‚ç°¡æ½”ã«ã™ã‚‹ãŸã‚ã«ã€NYCタクシーã®ã‚«ãƒ©ãƒ ã®ä¸€éƒ¨ã‚’使用ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’直接S3ãƒãƒƒã‚¯ãƒ‰ãƒ†ãƒ¼ãƒ–ルã«ã‚¹ãƒˆãƒªãƒ¼ãƒ ã—ã¾ã™ï¼š + +```sql +CREATE TABLE trips_s3 +( + `trip_id` UInt32, + `pickup_date` Date, + `pickup_datetime` DateTime, + `dropoff_datetime` DateTime, + `pickup_longitude` Float64, + `pickup_latitude` Float64, + `dropoff_longitude` Float64, + `dropoff_latitude` Float64, + `passenger_count` UInt8, + `trip_distance` Float64, + `tip_amount` Float32, + `total_amount` Float32, + `payment_type` Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4) +) +ENGINE = MergeTree +PARTITION BY toYYYYMM(pickup_date) +ORDER BY pickup_datetime +SETTINGS index_granularity = 8192, storage_policy='s3_main' +``` + +```sql +INSERT INTO trips_s3 SELECT trip_id, pickup_date, pickup_datetime, dropoff_datetime, pickup_longitude, pickup_latitude, dropoff_longitude, dropoff_latitude, passenger_count, trip_distance, tip_amount, total_amount, payment_type FROM s3('https://ch-nyc-taxi.s3.eu-west-3.amazonaws.com/tsv/trips_{0..9}.tsv.gz', 'TabSeparatedWithNames') LIMIT 1000000; +``` +ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã«ã‚ˆã‚Šã¾ã™ãŒã€1百万行ã®æŒ¿å…¥ã¯å®Ÿè¡Œã«æ•°åˆ†ã‹ã‹ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚進æ—㯠`system.processes` テーブルã§ç¢ºèªã§ãã¾ã™ã€‚行数を1åƒä¸‡ã¾ã§å¢—ã‚„ã—ã€ä¸€éƒ¨ã®ã‚µãƒ³ãƒ—ルクエリを試ã—ã¦ã¿ã¦ãã ã•ã„。 + +```sql +SELECT passenger_count, avg(tip_amount) as avg_tip, avg(total_amount) as avg_amount FROM trips_s3 GROUP BY passenger_count; +``` + +### テーブルã®å¤‰æ›´ + +特定ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã‚’変更ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã‚‚ã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯å¯èƒ½ã§ã™ãŒã€åˆ¶é™ãŒã‚ã‚Šã¾ã™ã€‚æ–°ã—ã„ターゲットãƒãƒªã‚·ãƒ¼ã¯ã€å‰ã®ãƒãƒªã‚·ãƒ¼ã®ã™ã¹ã¦ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¨ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’å«ã‚“ã§ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒãƒªã‚·ãƒ¼å¤‰æ›´ã‚’満ãŸã™ãŸã‚ã«ãƒ‡ãƒ¼ã‚¿ã¯ç§»è¡Œã•ã‚Œã¾ã›ã‚“。ã“れらã®åˆ¶ç´„を検証ã™ã‚‹éš›ã€ãƒœãƒªãƒ¥ãƒ¼ãƒ ã¨ãƒ‡ã‚£ã‚¹ã‚¯ã¯ãã®åå‰ã«ã‚ˆã£ã¦è­˜åˆ¥ã•ã‚Œã€é•åã—よã†ã¨ã™ã‚‹ã¨ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ã—ã‹ã—ã€ä»¥å‰ã®ä¾‹ã‚’使用ã™ã‚‹å ´åˆã€ä»¥ä¸‹ã®å¤‰æ›´ã¯æœ‰åŠ¹ã§ã™ã€‚ + +```xml + + + +
+ s3 +
+
+
+ + + + default + +
+ s3 +
+
+ 0.2 +
+
+``` + +```sql +ALTER TABLE trips_s3 MODIFY SETTING storage_policy='s3_tiered' +``` + +ã“ã“ã§ã¯æ–°ã—ã„ `s3_tiered` ãƒãƒªã‚·ãƒ¼ã«æ—¢å­˜ã®ãƒ¡ã‚¤ãƒ³ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’å†åˆ©ç”¨ã—ã€æ–°ã—ã„ホットボリュームを導入ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ‘ラメータ `` を通ã˜ã¦è¨­å®šã•ã‚ŒãŸ1ã¤ã®ãƒ‡ã‚£ã‚¹ã‚¯ã ã‘ã§æ§‹æˆã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã—ã¾ã™ã€‚ボリュームåãŠã‚ˆã³ãƒ‡ã‚£ã‚¹ã‚¯ã¯å¤‰æ›´ã•ã‚Œãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。新ã—ã„挿入ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‡ã‚£ã‚¹ã‚¯ã«é…ç½®ã•ã‚Œã€ã“れ㌠move_factor * disk_size ã«é”ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯ S3 ã«ç§»å‹•ã•ã‚Œã¾ã™ã€‚ + +### レプリケーションã®å–り扱ㄠ+ +S3ディスクを使用ã—ãŸãƒ¬ãƒ—リケーションã¯ã€`ReplicatedMergeTree` テーブルエンジンを使用ã—ã¦å®Ÿç¾ã§ãã¾ã™ã€‚[S3オブジェクトストレージを使用ã—ã¦2ã¤ã®AWSリージョンã§å˜ä¸€ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’レプリケートã™ã‚‹](#s3-multi-region)ガイドをå‚ç…§ã—ã¦ãã ã•ã„。 + +### 読ã¿å–ã‚Šã¨æ›¸ã込㿠+ +以下ã®ãƒŽãƒ¼ãƒˆã§ã¯ã€ClickHouseã¨S3é–“ã®ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ã‚·ãƒ§ãƒ³ã®å®Ÿè£…ã‚’ã‚«ãƒãƒ¼ã—ã¦ã„ã¾ã™ã€‚通常ã¯æƒ…å ±æä¾›ã®ã¿ã§ã™ãŒã€[パフォーマンスã®æœ€é©åŒ–](#s3-optimizing-performance)ã«å½¹ç«‹ã¤ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“: + +* デフォルトã§ã¯ã€ã‚¯ã‚¨ãƒªå‡¦ç†ãƒ‘イプラインã®ä»»æ„ã®ã‚¹ãƒ†ãƒ¼ã‚¸ã§ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ã‚¯ã‚¨ãƒªå‡¦ç†ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã¯ã‚³ã‚¢æ•°ã¨ç­‰ã—ã„ã§ã™ã€‚ã‚るステージã¯ä»–よりも並列化ãŒå®¹æ˜“ãªãŸã‚ã€ã“ã®å€¤ã¯ä¸Šé™ã‚’æä¾›ã—ã¾ã™ã€‚データãŒãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œã‚‹ãŸã‚ã€è¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚¹ãƒ†ãƒ¼ã‚¸ãŒä¸€åº¦ã«å®Ÿè¡Œã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã€ã‚¯ã‚¨ãƒªã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ­£ç¢ºãªæ•°ã¯ã“れを超ãˆã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚設定 [max_threads](/docs/ja/operations/settings/settings.md/#settings-max_threads) を変更ã—ã¦èª¿æ•´ã§ãã¾ã™ã€‚ +* S3ã®èª­ã¿å–ã‚Šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§éžåŒæœŸã§ã™ã€‚ã“ã®å‹•ä½œã¯ `remote_filesystem_read_method` 設定ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚デフォルト値㯠`threadpool` ã§ã™ã€‚リクエストã«å¿œã˜ã¦ã€ClickHouseã¯ã‚¹ãƒˆãƒ©ã‚¤ãƒ—ã§ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã‚’読ã¿å–ã‚Šã¾ã™ã€‚å„ストライプã¯å¤šæ•°ã®ã‚«ãƒ©ãƒ ã‚’å«ã‚€å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚スレッドã¯ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã«å¯¾ã—ã¦ã‚«ãƒ©ãƒ ã‚’一ã¤ãšã¤èª­ã¿è¾¼ã¿ã¾ã™ã€‚ã“れをåŒæœŸçš„ã«è¡Œã†ä»£ã‚ã‚Šã«ã€ãƒ‡ãƒ¼ã‚¿ã®å¾…æ©Ÿå‰ã«ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’プリフェッãƒã—ã¾ã™ã€‚ã“ã‚Œã¯å„カラムã§ã®åŒæœŸå¾…æ©Ÿã«æ¯”ã¹ã¦å¤§å¹…ãªãƒ‘フォーマンスå‘上をもãŸã‚‰ã—ã¾ã™ã€‚ã»ã¨ã‚“ã©ã®å ´åˆã€ã“ã®è¨­å®šã‚’変更ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。[パフォーマンスã®æœ€é©åŒ–](#s3-optimizing-performance)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +* s3関数ã¨ãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€ä¸¦åˆ—ダウンロード㯠`max_download_threads` 㨠`max_download_buffer_size` ã®å€¤ã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã¾ã™ã€‚ファイルãŒå…¨ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’通ã˜ãŸåˆè¨ˆãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚ºã‚ˆã‚Šå¤§ãã„å ´åˆã®ã¿ä¸¦åˆ—ã§ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ãƒãƒ¼ã‚¸ãƒ§ãƒ³ > 22.3.1 ã§ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ +* 書ãè¾¼ã¿ã¯ä¸¦åˆ—ã§å®Ÿè¡Œã•ã‚Œã€æœ€å¤§100ã®åŒæ™‚ファイル書ãè¾¼ã¿ã‚¹ãƒ¬ãƒƒãƒ‰ãŒã‚ã‚Šã¾ã™ã€‚`max_insert_delayed_streams_for_parallel_write` ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤1000ã§ã€ä¸¦åˆ—ã§æ›¸ãè¾¼ã¾ã‚Œã‚‹S3ブロブã®æ•°ã‚’制御ã—ã¾ã™ã€‚書ãè¾¼ã¾ã‚Œã‚‹å„ファイルã«å¯¾ã—ã¦ãƒãƒƒãƒ•ã‚¡ãŒå¿…è¦ãªãŸã‚(約1MB)ã€ã“ã®å€¤ã‚’低メモリシナリオã§ä½Žã設定ã™ã‚‹ã®ãŒé©åˆ‡ãªå ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +## S3オブジェクトストレージをClickHouseディスクã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ {#configuring-s3-for-clickhouse-use} + +ãƒã‚±ãƒƒãƒˆã¨IAMロールを作æˆã™ã‚‹ãŸã‚ã®ã‚¹ãƒ†ãƒƒãƒ—ãƒã‚¤ã‚¹ãƒ†ãƒƒãƒ—ã®æŒ‡ç¤ºãŒå¿…è¦ãªå ´åˆã¯ã€**Create S3 buckets and an IAM role**を展開ã—ã¦æŒ‡ç¤ºã«å¾“ã£ã¦ãã ã•ã„。 + + + +### ClickHouseã‚’S3ãƒã‚±ãƒƒãƒˆã‚’ディスクã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã‚ˆã†ã«è¨­å®š +以下ã®ä¾‹ã¯ã€ã‚µãƒ¼ãƒ“スã¨ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚ŒãŸLinux Debパッケージã«åŸºã¥ãデフォルトã®ClickHouseディレクトリを使用ã—ã¾ã™ã€‚ + +1. ClickHouseã®`config.d`ディレクトリã«ã€æ–°ã—ã„ストレージ設定を格ç´ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã—ã¾ã™ã€‚ +```bash +vim /etc/clickhouse-server/config.d/storage_config.xml +``` +2. 次ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸è¨­å®šã‚’追加ã—ã¾ã™ã€‚å…ˆã«å–å¾—ã—ãŸãƒã‚±ãƒƒãƒˆãƒ‘スã€ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ãŠã‚ˆã³ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆã‚­ãƒ¼ã‚’使用ã—ã¦ãã ã•ã„。 +```xml + + + + + s3 + https://mars-doc-test.s3.amazonaws.com/clickhouse3/ + ABC123 + Abc+123 + /var/lib/clickhouse/disks/s3_disk/ + + + cache + s3_disk + /var/lib/clickhouse/disks/s3_cache/ + 10Gi + + + + + +
+ s3_disk +
+
+
+
+
+
+``` + +:::note +``タグ内ã®`s3_disk`ãŠã‚ˆã³`s3_cache`ã‚¿ã‚°ã¯ä»»æ„ã®ãƒ©ãƒ™ãƒ«ã§ã™ã€‚ä»–ã®ãƒ©ãƒ™ãƒ«ã«è¨­å®šã§ãã¾ã™ãŒã€åŒã˜ãƒ©ãƒ™ãƒ«ã‚’``ã‚¿ã‚°ã®ä¸‹ã®``ã‚¿ã‚°ã«ä½¿ç”¨ã—ã¦ãƒ‡ã‚£ã‚¹ã‚¯ã‚’å‚ç…§ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +``ã‚¿ã‚°ã‚‚ä»»æ„ã§ã‚ã‚Šã€ClickHouseã§ãƒªã‚½ãƒ¼ã‚¹ã‚’作æˆã™ã‚‹éš›ã®è­˜åˆ¥ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹ãƒãƒªã‚·ãƒ¼åã§ã™ã€‚ + +上記ã®è¨­å®šã¯ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³22.8以é™ã®ã‚‚ã®ã§ã™ã€‚å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã¯[データã®ä¿å­˜](docs/ja/operations/storing-data.md/#using-local-cache)ドキュメントをå‚ç…§ã—ã¦ãã ã•ã„。 + +S3ã®ä½¿ç”¨ã«é–¢ã™ã‚‹è©³ç´°ã¯ä»¥ä¸‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„: +çµ±åˆã‚¬ã‚¤ãƒ‰ï¼š[S3ãƒãƒƒã‚¯ãƒ‰MergeTree](#s3-backed-mergetree) +::: + +3. ファイルã®æ‰€æœ‰è€…ã‚’`clickhouse`ユーザーã¨ã‚°ãƒ«ãƒ¼ãƒ—ã«æ›´æ–°ã—ã¾ã™ +```bash +chown clickhouse:clickhouse /etc/clickhouse-server/config.d/storage_config.xml +``` +4. 変更ãŒå映ã•ã‚Œã‚‹ã‚ˆã†ã«ClickHouseインスタンスをå†èµ·å‹• +```bash +service clickhouse-server restart +``` + +### テスト +1. ClickHouseクライアントã§ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ã€‚以下ã®ã‚ˆã†ã«è¡Œã„ã¾ã™ã€‚ +```bash +clickhouse-client --user default --password ClickHouse123! +``` +2. æ–°ã—ã„S3ストレージãƒãƒªã‚·ãƒ¼ã‚’指定ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ +```sql +CREATE TABLE s3_table1 + ( + `id` UInt64, + `column1` String + ) + ENGINE = MergeTree + ORDER BY id + SETTINGS storage_policy = 's3_main'; +``` + +3. æ­£ã—ã„ãƒãƒªã‚·ãƒ¼ã§ãƒ†ãƒ¼ãƒ–ルãŒä½œæˆã•ã‚ŒãŸã“ã¨ã‚’確èªã—ã¾ã™ +```sql +SHOW CREATE TABLE s3_table1; +``` +```response +┌─statement──────────────────────────────────────────────────── +│ CREATE TABLE default.s3_table1 +( + `id` UInt64, + `column1` String +) +ENGINE = MergeTree +ORDER BY id +SETTINGS storage_policy = 's3_main', index_granularity = 8192 +└────────────────────────────────────────────────────────────── +``` + +4. テスト行をテーブルã«æŒ¿å…¥ã—ã¾ã™ +```sql +INSERT INTO s3_table1 + (id, column1) + VALUES + (1, 'abc'), + (2, 'xyz'); +``` +```response +INSERT INTO s3_table1 (id, column1) FORMAT Values + +Query id: 0265dd92-3890-4d56-9d12-71d4038b85d5 + +Ok. + +2 rows in set. Elapsed: 0.337 sec. +``` +5. 行を表示ã—ã¾ã™ +```sql +SELECT * FROM s3_table1; +``` +```response +┌─id─┬─column1─┠+│ 1 │ abc │ +│ 2 │ xyz │ +└────┴─────────┘ + +2 rows in set. Elapsed: 0.284 sec. +``` +6. AWSコンソールã§ãƒã‚±ãƒƒãƒˆã«ç§»å‹•ã—ã€æ–°ã—ã„ãƒã‚±ãƒƒãƒˆã¨ãƒ•ã‚©ãƒ«ãƒ€ã‚’é¸æŠžã—ã¦ãã ã•ã„。 +以下ã®ã‚ˆã†ãªã‚‚ã®ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ï¼š + + ![create_s3_bucket_10](./images/s3-j.png) + +## S3オブジェクトストレージを使用ã—ãŸAWSリージョン間ã§ã®å˜ä¸€ã‚·ãƒ£ãƒ¼ãƒ‰ã®ãƒ¬ãƒ—リケート {#s3-multi-region} + +:::tip +オブジェクトストレージã¯ClickHouse Cloudã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€ClickHouse Cloudを使用ã—ã¦ã„ã‚‹å ´åˆã€ã“ã®æ‰‹é †ã«å¾“ã†å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +### 展開ã®è¨ˆç”» +ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã¯ã€AWS EC2ã«2ã¤ã®ClickHouseサーãƒãƒ¼ãƒŽãƒ¼ãƒ‰ã¨3ã¤ã®ClickHouse Keeper ノードを展開ã™ã‚‹ã“ã¨ã‚’対象ã¨ã—ã¦ã„ã¾ã™ã€‚ClickHouseサーãƒãƒ¼ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¯S3ã§ã™ã€‚ディザスタリカãƒãƒªãƒ¼ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã€2ã¤ã®AWSリージョンãŒä½¿ç”¨ã•ã‚Œã€å„リージョンã«ã¯ClickHouseサーãƒãƒ¼ã¨S3ãƒã‚±ãƒƒãƒˆãŒé…ç½®ã•ã‚Œã¾ã™ã€‚ + +ClickHouseã®ãƒ†ãƒ¼ãƒ–ルã¯2ã¤ã®ã‚µãƒ¼ãƒãƒ¼é–“ã€ã—ãŸãŒã£ã¦2ã¤ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³é–“ã§ãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚ + +### ソフトウェアã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +#### ClickHouseサーãƒãƒ¼ãƒŽãƒ¼ãƒ‰ +ClickHouseサーãƒãƒ¼ãƒŽãƒ¼ãƒ‰ã§ã®å±•é–‹æ‰‹é †ã‚’実行ã™ã‚‹éš›ã¯ã€[インストール手順](/docs/ja/getting-started/install.md/#available-installation-options)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### ClickHouseã®ãƒ‡ãƒ—ロイ + +ClickHouseã‚’2ã¤ã®ãƒ›ã‚¹ãƒˆã«ãƒ‡ãƒ—ロイã—ã¾ã™ã€‚サンプル構æˆã§ã¯ã“れら㯠`chnode1`〠`chnode2` ã¨å‘½åã•ã‚Œã¾ã™ã€‚ + +`chnode1`ã‚’1ã¤ã®AWSリージョンã«ã€ `chnode2`を別ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«é…ç½®ã—ã¾ã™ã€‚ + +#### ClickHouse Keeperã®ãƒ‡ãƒ—ロイ + +ClickHouse Keeperã‚’3ã¤ã®ãƒ›ã‚¹ãƒˆã«ãƒ‡ãƒ—ロイã—ã¾ã™ã€‚サンプル構æˆã§ã¯ã€ã“れら㯠`keepernode1`〠`keepernode2`ã€ãŠã‚ˆã³ `keepernode3` ã¨å‘½åã•ã‚Œã¾ã™ã€‚`keepernode1`ã¯`chnode1`ã¨åŒã˜ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«ã€`keepernode2`ã¯`chnode2`ã¨ã€`keepernode3`ã¯ã©ã¡ã‚‰ã‹ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã§ç•°ãªã‚‹ã‚¢ãƒ™ã‚¤ãƒ©ãƒ“リティゾーンã«ãƒ‡ãƒ—ロイã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouse Keeperノードã§ã®å±•é–‹æ‰‹é †ã‚’実行ã™ã‚‹éš›ã¯ã€[インストール手順](/docs/ja/getting-started/install.md/#install-standalone-clickhouse-keeper)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### S3ãƒã‚±ãƒƒãƒˆã®ä½œæˆ + +`chnode1`ã¨`chnode2`ã‚’é…ç½®ã—ãŸå„地域ã«2ã¤ã®S3ãƒã‚±ãƒƒãƒˆã‚’作æˆã—ã¾ã™ã€‚ + +ãƒã‚±ãƒƒãƒˆã¨IAMロールを作æˆã™ã‚‹ãŸã‚ã®ã‚¹ãƒ†ãƒƒãƒ—ãƒã‚¤ã‚¹ãƒ†ãƒƒãƒ—ã®æŒ‡ç¤ºãŒå¿…è¦ãªå ´åˆã¯ã€**Create S3 buckets and an IAM role**を展開ã—ã¦æŒ‡ç¤ºã«å¾“ã£ã¦ãã ã•ã„。 + + + +設定ファイルã¯ãã®å¾Œ `/etc/clickhouse-server/config.d/` ã«é…ç½®ã•ã‚Œã¾ã™ã€‚一ã¤ã®ãƒã‚±ãƒƒãƒˆã®ã‚µãƒ³ãƒ—ル設定ファイルを以下ã«ç¤ºã—ã¾ã™ã€‚ä»–ã®ãƒã‚±ãƒƒãƒˆã‚‚é¡žä¼¼ã—ã¦ãŠã‚Šã€3è¡Œã®ç•°ãªã‚‹ç‚¹ãŒã‚ã‚Šã¾ã™ï¼š + +```xml title="/etc/clickhouse-server/config.d/storage_config.xml" + + + + + s3 + + https://docs-clickhouse-s3.s3.us-east-2.amazonaws.com/clickhouses3/ + ABCDEFGHIJKLMNOPQRST + Tjdm4kf5snfkj303nfljnev79wkjn2l3knr81007 + + /var/lib/clickhouse/disks/s3_disk/ + + + + cache + s3 + /var/lib/clickhouse/disks/s3_cache/ + 10Gi + + + + + +
+ s3_disk +
+
+
+
+
+
+``` +:::note +ã“ã®ã‚¬ã‚¤ãƒ‰ã®æ‰‹é †ã®å¤šãã§ã¯ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’ `/etc/clickhouse-server/config.d/` ã«é…ç½®ã™ã‚‹ã‚ˆã†æ±‚ã‚られã¾ã™ã€‚ã“ã‚Œã¯Linuxシステムã®è¨­å®šã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å ´æ‰€ã§ã™ã€‚ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ディレクトリã«é…ç½®ã™ã‚‹ã¨ã€ClickHouseã¯å†…容を使用ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®è¨­å®šã‚’上書ãã—ã¾ã™ã€‚ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ç½®ãã“ã¨ã§ã€ã‚¢ãƒƒãƒ—グレード中ã«è¨­å®šã‚’失ã†ã“ã¨ã‚’防ãã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +### ClickHouse Keeperã®è¨­å®š + +ClickHouse Keeperã‚’å˜ç‹¬ã§ï¼ˆClickHouseサーãƒãƒ¼ã¨ã¯åˆ¥ã«ï¼‰å®Ÿè¡Œã™ã‚‹å ´åˆã€è¨­å®šã¯1ã¤ã®XMLファイルã§ã™ã€‚ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ã¯ã€ãã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ `/etc/clickhouse-keeper/keeper_config.xml` ã¨ã—ã¦ã„ã¾ã™ã€‚3ã¤ã®Keeperサーãƒãƒ¼ã¯åŒã˜è¨­å®šã‚’使用ã—ã¾ã™ãŒã€1ã¤ã®è¨­å®šã ã‘ãŒç•°ãªã‚Šã¾ã™ï¼›``ã§ã™ã€‚ + +`server_id`ã¯è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ãŒä½¿ç”¨ã•ã‚Œã‚‹ãƒ›ã‚¹ãƒˆã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹IDを示ã—ã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ã€`server_id` 㯠`3`ã§ã‚ã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ã®ä¸‹éƒ¨ã«ã‚ã‚‹`` セクションã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼3ãŒãƒ›ã‚¹ãƒˆå`keepernode3`ã¨ã—ã¦ã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ClickHouse Keeperプロセスã¯ãƒªãƒ¼ãƒ€ãƒ¼ã®é¸æŠžãŠã‚ˆã³ãã®ä»–ã®ã™ã¹ã¦ã®æ´»å‹•æ™‚ã«ã©ã®ä»–ã®ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã‹ã‚’知りã¾ã™ã€‚ + +```xml title="/etc/clickhouse-keeper/keeper_config.xml" + + + trace + /var/log/clickhouse-keeper/clickhouse-keeper.log + /var/log/clickhouse-keeper/clickhouse-keeper.err.log + 1000M + 3 + + 0.0.0.0 + + 9181 + + 3 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + + 10000 + 30000 + warning + + + + + 1 + keepernode1 + 9234 + + + 2 + keepernode2 + 9234 + + + + 3 + keepernode3 + 9234 + + + + + +``` + +設定ファイルをClickHouse Keeperã«ã‚³ãƒ”ーã—ã¦é…ç½®ã—ã¾ã™ï¼ˆ `` を設定ã™ã‚‹ã®ã‚’忘れãªã„ã§ãã ã•ã„): +```bash +sudo -u clickhouse \ + cp keeper.xml /etc/clickhouse-keeper/keeper.xml +``` + +### ClickHouseサーãƒãƒ¼ã®è¨­å®š + +#### クラスターã®å®šç¾© + +ClickHouseクラスターã¯ã€è¨­å®šã® `` セクションã§å®šç¾©ã•ã‚Œã¾ã™ã€‚ã“ã®ã‚µãƒ³ãƒ—ルã§ã¯ã€`cluster_1S_2R`ã¨ã„ã†1ã¤ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãŒå®šç¾©ã•ã‚Œã¦ãŠã‚Šã€ãã‚Œã¯1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã¨2ã¤ã®ãƒ¬ãƒ—リカã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚レプリカã¯ãƒ›ã‚¹ãƒˆ `chnode1` 㨠`chnode2` ã«é…ç½®ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```xml title="/etc/clickhouse-server/config.d/remote-servers.xml" + + + + + + chnode1 + 9000 + + + chnode2 + 9000 + + + + + +``` + +クラスターを使用ã™ã‚‹éš›ã«ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã€ã‚·ãƒ£ãƒ¼ãƒ‰ã€ãƒ¬ãƒ—リカã®è¨­å®šã‚’埋ã‚込むDDLクエリを作æˆã™ã‚‹ãƒžã‚¯ãƒ­ã‚’定義ã™ã‚‹ã¨ä¾¿åˆ©ã§ã™ã€‚ã“ã®ã‚µãƒ³ãƒ—ルã§ã¯ã€`shard` 㨠`replica` ã®è©³ç´°ã‚’æä¾›ã™ã‚‹ã“ã¨ãªãã€ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルエンジンを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚テーブルを作æˆã—ãŸéš›ã« `system.tables` をクエリã™ã‚‹ã“ã¨ã§ã€`shard`ã¨`replica`マクロã®ä½¿ç”¨æ–¹æ³•ã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚ + +```xml title="/etc/clickhouse-server/config.d/macros.xml" + + + /clickhouse/task_queue/ddl + + + cluster_1S_2R + 1 + replica_1 + + +``` +:::note +ã“ã®ãƒžã‚¯ãƒ­ã¯ `chnode1`用ã§ã™ã€‚`chnode2` ã§ã¯ `replica` ã‚’ `replica_2` ã«è¨­å®šã—ã¦ãã ã•ã„。 +::: + +#### ゼロコピー レプリケーションã®ç„¡åŠ¹åŒ– + +ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³22.7以下ã§ã¯ `allow_remote_fs_zero_copy_replication` 設定ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ `true` ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ‡ã‚£ã‚¶ã‚¹ã‚¿ãƒªã‚«ãƒãƒªãƒ¼ã‚·ãƒŠãƒªã‚ªã®å ´åˆã€ã“ã®è¨­å®šã¯`false` ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³22.8ãŠã‚ˆã³ãれ以é™ã§ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ `false` ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ 1) ã“ã®æ©Ÿèƒ½ãŒã¾ã ãƒ—ロダクションレディã§ã¯ãªã„ã€2) ディザスタリカãƒãƒªãƒ¼ã‚·ãƒŠãƒªã‚ªã§ã¯ãƒ‡ãƒ¼ã‚¿ã¨ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ä¸¡æ–¹ã‚’複数ã®åœ°åŸŸã«ä¿å­˜ã—ã¦ãŠãå¿…è¦ãŒã‚ã‚‹ã€ã¨ã„ã†2ã¤ã®ç†ç”±ã‹ã‚‰ `false` ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`allow_remote_fs_zero_copy_replication` ã‚’ `false` ã«è¨­å®šã—ã¦ãã ã•ã„。 + +```xml title="/etc/clickhouse-server/config.d/remote-servers.xml" + + + false + + +``` + +ClickHouse Keeper 㯠ClickHouse ノード間ã®ãƒ‡ãƒ¼ã‚¿ãƒ¬ãƒ—リケーションを調整ã—ã¾ã™ã€‚ClickHouse ノード㫠ClickHouse Keeper ノードを知らã›ã‚‹ãŸã‚ã«ã€å„ ClickHouse ノードã«è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’追加ã—ã¾ã™ã€‚ + +```xml title="/etc/clickhouse-server/config.d/use_keeper.xml" + + + + keepernode1 + 9181 + + + keepernode2 + 9181 + + + keepernode3 + 9181 + + + +``` + +### ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®è¨­å®š + +サーãƒãƒ¼ãŒé€šä¿¡ã§ãるよã†ã«ã€ã¾ãŸã‚ãªãŸãŒã‚µãƒ¼ãƒãƒ¼ã¨é€šä¿¡ã§ãるよã†ã«ã€AWSã§ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šã‚’è¡Œã†éš›ã¯[ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒãƒ¼ãƒˆ](../../../guides/sre/network-ports.md) リストをå‚ç…§ã—ã¦ãã ã•ã„。 + +ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã¯ã€ä»–ã®ã‚µãƒ¼ãƒãƒ¼ã¨ã®é€šä¿¡ã¨S3ã¨ã®é€šä¿¡ã‚’è¡Œã†ãŸã‚ã«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶šã‚’リッスンã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚デフォルトã§ã¯ã€ClickHouseã¯ãƒ«ãƒ¼ãƒ—ãƒãƒƒã‚¯ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã®ã¿ãƒªãƒƒã‚¹ãƒ³ã™ã‚‹ãŸã‚ã€ã“れを変更ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れ㯠`/etc/clickhouse-server/config.d/` ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ã“ã“ã«ClickHouseã¨ClickHouse Keeperã‚’ã™ã¹ã¦ã®IPv4インターフェース上ã§ãƒªãƒƒã‚¹ãƒ³ã™ã‚‹ã‚ˆã†ã«è¨­å®šã™ã‚‹ã‚µãƒ³ãƒ—ルを示ã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚ã‚‹ã„ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ« `/etc/clickhouse/config.xml` ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +```xml title="/etc/clickhouse-server/config.d/networking.xml" + + 0.0.0.0 + +``` + +### サーãƒãƒ¼ã®èµ·å‹• + +#### ClickHouse Keeperã®èµ·å‹• + +å„Keeperサーãƒãƒ¼ã§ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + +```bash +sudo systemctl enable clickhouse-keeper +sudo systemctl start clickhouse-keeper +sudo systemctl status clickhouse-keeper +``` + +#### ClickHouse Keeperã®çŠ¶æ…‹ã‚’ç¢ºèª + +ClickHouse Keeperã«ã‚³ãƒžãƒ³ãƒ‰ã‚’é€ä¿¡ã™ã‚‹ã«ã¯`netcat`を使用ã—ã¾ã™ã€‚例ãˆã°ã€`mntr` ã¯ClickHouse Keeperクラスタã®çŠ¶æ…‹ã‚’è¿”ã—ã¾ã™ã€‚å„Keeperノードã§ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã¨ã€1ã¤ã®ãƒŽãƒ¼ãƒ‰ãŒãƒªãƒ¼ãƒ€ãƒ¼ã§ã‚ã‚Šã€ä»–ã®2ã¤ãŒãƒ•ã‚©ãƒ­ãƒ¯ãƒ¼ã§ã‚ã‚‹ã“ã¨ãŒã‚ã‹ã‚‹ã§ã—ょã†ï¼š + +```bash +echo mntr | nc localhost 9181 +``` +```response +zk_version v22.7.2.15-stable-f843089624e8dd3ff7927b8a125cf3a7a769c069 +zk_avg_latency 0 +zk_max_latency 11 +zk_min_latency 0 +zk_packets_received 1783 +zk_packets_sent 1783 +# highlight-start +zk_num_alive_connections 2 +zk_outstanding_requests 0 +zk_server_state leader +# highlight-end +zk_znode_count 135 +zk_watch_count 8 +zk_ephemerals_count 3 +zk_approximate_data_size 42533 +zk_key_arena_size 28672 +zk_latest_snapshot_size 0 +zk_open_file_descriptor_count 182 +zk_max_file_descriptor_count 18446744073709551615 +# highlight-start +zk_followers 2 +zk_synced_followers 2 +# highlight-end +``` + +#### ClickHouseサーãƒãƒ¼ã®èµ·å‹• + +å„ClickHouseサーãƒãƒ¼ã§ +``` +sudo service clickhouse-server start +``` + +#### ClickHouseサーãƒãƒ¼ã®ç¢ºèª + +[クラスター設定](#define-a-cluster)を追加ã™ã‚‹ã“ã¨ã§ã€2ã¤ã®ClickHouseノードã«ãƒ¬ãƒ—リケートã•ã‚ŒãŸå˜ä¸€ã®ã‚·ãƒ£ãƒ¼ãƒ‰ãŒå®šç¾©ã•ã‚Œã¾ã—ãŸã€‚ã“ã®ç¢ºèªã‚¹ãƒ†ãƒƒãƒ—ã§ã¯ã€ClickHouseãŒèµ·å‹•ã—ãŸéš›ã«ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãŒæ§‹ç¯‰ã•ã‚ŒãŸã“ã¨ã‚’確èªã—ã€ãã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’使用ã—ã¦ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ +- クラスターãŒå­˜åœ¨ã™ã‚‹ã“ã¨ã®ç¢ºèªï¼š + ```sql + show clusters + ``` + ```response + ┌─cluster───────┠+ │ cluster_1S_2R │ + └───────────────┘ + + 1 row in set. Elapsed: 0.009 sec. ` + ``` + +- `ReplicatedMergeTree`テーブルエンジンを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + ```sql + create table trips on cluster 'cluster_1S_2R' ( + `trip_id` UInt32, + `pickup_date` Date, + `pickup_datetime` DateTime, + `dropoff_datetime` DateTime, + `pickup_longitude` Float64, + `pickup_latitude` Float64, + `dropoff_longitude` Float64, + `dropoff_latitude` Float64, + `passenger_count` UInt8, + `trip_distance` Float64, + `tip_amount` Float32, + `total_amount` Float32, + `payment_type` Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4)) + ENGINE = ReplicatedMergeTree + PARTITION BY toYYYYMM(pickup_date) + ORDER BY pickup_datetime + SETTINGS index_granularity = 8192, storage_policy='s3_main' + ``` + ```response + ┌─host────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┠+ │ chnode1 │ 9000 │ 0 │ │ 1 │ 0 │ + │ chnode2 │ 9000 │ 0 │ │ 0 │ 0 │ + └─────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘ + ``` +- 以å‰ã«å®šç¾©ã—ãŸãƒžã‚¯ãƒ­ã®ä½¿ç”¨ã‚’ç†è§£ã™ã‚‹ + + `shard` 㨠`replica` ã®ãƒžã‚¯ãƒ­ã¯[以å‰ã«å®šç¾©ã—ã¾ã—ãŸ](#define-a-cluster)ãŒã€ä»¥ä¸‹ã®è¡Œã§å„ClickHouseノード上ã§ãれらã®å€¤ãŒã©ã®ã‚ˆã†ã«ç½®ãæ›ãˆã‚‰ã‚Œã‚‹ã‹ã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚ã¾ãŸã€`uuid` ã¨ã„ã†å€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼›`uuid` ã¯ã‚·ã‚¹ãƒ†ãƒ ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã‚‹ã®ã§ãƒžã‚¯ãƒ­ã§å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + ```sql + SELECT create_table_query + FROM system.tables + WHERE name = 'trips' + FORMAT Vertical + ``` + ```response + Query id: 4d326b66-0402-4c14-9c2f-212bedd282c0 + + Row 1: + ────── + create_table_query: CREATE TABLE default.trips (`trip_id` UInt32, `pickup_date` Date, `pickup_datetime` DateTime, `dropoff_datetime` DateTime, `pickup_longitude` Float64, `pickup_latitude` Float64, `dropoff_longitude` Float64, `dropoff_latitude` Float64, `passenger_count` UInt8, `trip_distance` Float64, `tip_amount` Float32, `total_amount` Float32, `payment_type` Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4)) + # highlight-next-line + ENGINE = ReplicatedMergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}') + PARTITION BY toYYYYMM(pickup_date) ORDER BY pickup_datetime SETTINGS index_granularity = 8192, storage_policy = 's3_main' + + 1 row in set. Elapsed: 0.012 sec. + ``` + :::note + 上記ã§ç¤ºã•ã‚Œã¦ã„ã‚‹`clickhouse/tables/{uuid}/{shard}` ã¨ã„ã†zookeeperパスをカスタマイズã™ã‚‹ã«ã¯ã€`default_replica_path` ãŠã‚ˆã³ `default_replica_name` を設定ã§ãã¾ã™ã€‚ドキュメントã¯[ã“ã¡ã‚‰](/docs/ja/operations/server-configuration-parameters/settings.md/#default_replica_path)ã§ã™ã€‚ + ::: + +### テスト + +ã“れらã®ãƒ†ã‚¹ãƒˆã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒ2ã¤ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§ãƒ¬ãƒ—リケーションã•ã‚Œã¦ã„ã‚‹ã“ã¨ã¨ã€S3ãƒã‚±ãƒƒãƒˆã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +- ニューヨーク市タクシーデータセットã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’追加: + ```sql + INSERT INTO trips + SELECT trip_id, + pickup_date, + pickup_datetime, + dropoff_datetime, + pickup_longitude, + pickup_latitude, + dropoff_longitude, + dropoff_latitude, + passenger_count, + trip_distance, + tip_amount, + total_amount, + payment_type + FROM s3('https://ch-nyc-taxi.s3.eu-west-3.amazonaws.com/tsv/trips_{0..9}.tsv.gz', 'TabSeparatedWithNames') LIMIT 1000000; + ``` +- データãŒS3ã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã€‚ + + ã“ã®ã‚¯ã‚¨ãƒªã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã¨ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ã‚’決定ã™ã‚‹ãƒãƒªã‚·ãƒ¼ã‚’表示ã—ã¾ã™ã€‚ + ```sql + SELECT + engine, + data_paths, + metadata_path, + storage_policy, + formatReadableSize(total_bytes) + FROM system.tables + WHERE name = 'trips' + FORMAT Vertical + ``` + ```response + Query id: af7a3d1b-7730-49e0-9314-cc51c4cf053c + + Row 1: + ────── + engine: ReplicatedMergeTree + data_paths: ['/var/lib/clickhouse/disks/s3_disk/store/551/551a859d-ec2d-4512-9554-3a4e60782853/'] + metadata_path: /var/lib/clickhouse/store/e18/e18d3538-4c43-43d9-b083-4d8e0f390cf7/trips.sql + storage_policy: s3_main + formatReadableSize(total_bytes): 36.42 MiB + + 1 row in set. Elapsed: 0.009 sec. + ``` + + ローカルディスク上ã®ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã‚’確èªã—ã¾ã™ã€‚上記ã®é€šã‚Šã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®æ•°ç™¾ä¸‡è¡Œãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºã¯36.42 MiBã§ã™ã€‚ã“ã‚Œã¯S3上ã«ã‚ã‚Šã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ã«ã¯ãªã„ã¯ãšã§ã™ã€‚上記ã®ã‚¯ã‚¨ãƒªã¯ã¾ãŸãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ãƒ‡ãƒ¼ã‚¿ãŠã‚ˆã³ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒã©ã“ã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ローカルデータをãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„: + ```response + root@chnode1:~# du -sh /var/lib/clickhouse/disks/s3_disk/store/551 + 536K /var/lib/clickhouse/disks/s3_disk/store/551 + ``` + + å„S3ãƒã‚±ãƒƒãƒˆã®ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã‚’確èªã—ã¾ã™ï¼ˆç·é‡ã¯è¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€æŒ¿å…¥å¾Œã«ã¯ã©ã¡ã‚‰ã®ãƒã‚±ãƒƒãƒˆã‚‚ç´„36 MiBã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ï¼‰ï¼š + + ![最åˆã®S3ãƒã‚±ãƒƒãƒˆå†…ã®ã‚µã‚¤ã‚º](./images/bucket1.png) + + ![第二ã®S3ãƒã‚±ãƒƒãƒˆå†…ã®ã‚µã‚¤ã‚º](./images/bucket2.png) + +## S3Express + +[S3Express](https://aws.amazon.com/s3/storage-classes/express-one-zone/) ã¯Amazon S3ã®æ–°ã—ã„高性能ãªå˜ä¸€ã‚¢ãƒ™ã‚¤ãƒ©ãƒ“リティゾーンストレージクラスã§ã™ã€‚ + +ClickHouseã§S3Expressをテストã—ãŸçµŒé¨“ã«ã¤ã„ã¦ã¯ã€ã“ã®[ブログ](https://aws.amazon.com/blogs/storage/clickhouse-cloud-amazon-s3-express-one-zone-making-a-blazing-fast-analytical-database-even-faster/) ã‚’å‚ç…§ã§ãã¾ã™ã€‚ + +:::note +S3Expressã¯å˜ä¸€AZ内ã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€AZ ãŒåœæ­¢ã—ãŸå ´åˆã«ã¯ãƒ‡ãƒ¼ã‚¿ãŒåˆ©ç”¨ã§ããªããªã‚Šã¾ã™ã€‚ +::: + +### S3ディスク + +S3Expressãƒã‚±ãƒƒãƒˆã‚’ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®æ‰‹é †ãŒå¿…è¦ã§ã™ï¼š + +1. `Directory`タイプã®ãƒã‚±ãƒƒãƒˆã‚’ä½œæˆ +2. å¿…è¦ãªã™ã¹ã¦ã®æ¨©é™ã‚’S3ユーザーã«ä»˜ä¸Žã™ã‚‹é©åˆ‡ãªãƒã‚±ãƒƒãƒˆãƒãƒªã‚·ãƒ¼ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ï¼ˆä¾‹ï¼š`"Action": "s3express:*"` を使用ã—ã¦ç„¡åˆ¶é™ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ï¼‰ +3. ストレージãƒãƒªã‚·ãƒ¼ã‚’設定ã™ã‚‹éš›ã«`region`パラメータを指定 + +ストレージ設定ã¯é€šå¸¸ã®S3ã¨åŒæ§˜ã§ã€ä¾‹ã¨ã—ã¦ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +``` xml + + + + s3 + https://my-test-bucket--eun1-az1--x-s3.s3express-eun1-az1.eu-north-1.amazonaws.com/store/ + eu-north-1 + ... + ... + + + + + +
+ s3_express +
+
+
+
+
+``` + +ãã—ã¦ã€æ–°ã—ã„ストレージã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +``` sql +CREATE TABLE t +( + a UInt64, + s String +) +ENGINE = MergeTree +ORDER BY a +SETTINGS storage_policy = 's3_express'; +``` + +### S3ストレージ + +S3ストレージも`Object URL`パスã«å¯¾ã—ã¦ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚例: + +``` sql +select * from s3('https://test-bucket--eun1-az1--x-s3.s3express-eun1-az1.eu-north-1.amazonaws.com/file.csv', ...) +``` + +ã¾ãŸã€è¨­å®šã«ãƒã‚±ãƒƒãƒˆã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +``` xml + + + https://test-bucket--eun1-az1--x-s3.s3express-eun1-az1.eu-north-1.amazonaws.com + eu-north-1 + + +``` + +### ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— + +上記ã§ä½œæˆã—ãŸãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ä¿å­˜ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ï¼š + +``` sql +BACKUP TABLE t TO Disk('s3_express', 't.zip') + +┌─id───────────────────────────────────┬─status─────────┠+│ c61f65ac-0d76-4390-8317-504a30ba7595 │ BACKUP_CREATED │ +└──────────────────────────────────────┴────────────────┘ +``` + +``` sql +RESTORE TABLE t AS t_restored FROM Disk('s3_express', 't.zip') + +┌─id───────────────────────────────────┬─status───┠+│ 4870e829-8d76-4171-ae59-cffaf58dea04 │ RESTORED │ +└──────────────────────────────────────┴──────────┘ +``` diff --git a/docs/ja/integrations/data-ingestion/s3/performance.md b/docs/ja/integrations/data-ingestion/s3/performance.md new file mode 100644 index 00000000000..5ecae3db830 --- /dev/null +++ b/docs/ja/integrations/data-ingestion/s3/performance.md @@ -0,0 +1,392 @@ +--- +slug: /ja/integrations/s3/performance +sidebar_position: 2 +sidebar_label: パフォーマンスã®æœ€é©åŒ– +title: S3挿入ã¨èª­ã¿å–りパフォーマンスã®æœ€é©åŒ– +description: S3ã®èª­ã¿å–ã‚Šã¨æŒ¿å…¥ã®ãƒ‘フォーマンスã®æœ€é©åŒ– +--- + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€[s3テーブル関数](/docs/ja/sql-reference/table-functions/s3)を使用ã—ã¦S3ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã£ãŸã‚Šã€æŒ¿å…¥ã—ãŸã‚Šã™ã‚‹éš›ã®ãƒ‘フォーマンス最é©åŒ–ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚ + +:::info +**ã“ã®ã‚¬ã‚¤ãƒ‰ã§èª¬æ˜Žã™ã‚‹ãƒ¬ãƒƒã‚¹ãƒ³ã¯ã€[GCS](/docs/ja/sql-reference/table-functions/gcs)ã‚„[Azure Blob Storage](/docs/ja/sql-reference/table-functions/azureBlobStorage)ãªã©ç‹¬è‡ªã®ãƒ†ãƒ¼ãƒ–ル関数をæŒã¤ä»–ã®ã‚ªãƒ–ジェクトストレージ実装ã«ã‚‚é©ç”¨ã§ãã¾ã™ã€‚** +::: + +挿入パフォーマンスをå‘上ã•ã›ã‚‹ãŸã‚ã«ã‚¹ãƒ¬ãƒƒãƒ‰ã‚„ブロックサイズを調整ã™ã‚‹å‰ã«ã€S3挿入ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’ç†è§£ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚挿入メカニズムã«ç²¾é€šã—ã¦ã„ã‚‹å ´åˆã‚„ã€ã„ãã¤ã‹ã®ã‚¯ã‚¤ãƒƒã‚¯ãƒ’ントを知りãŸã„å ´åˆã¯ã€ä»¥ä¸‹ã®[例](/docs/ja/integrations/s3/performance#example-dataset)ã«ã‚¹ã‚­ãƒƒãƒ—ã—ã¦ãã ã•ã„。 + +## 挿入メカニズム(å˜ä¸€ãƒŽãƒ¼ãƒ‰ï¼‰ + +ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®ã‚µã‚¤ã‚ºã«åŠ ãˆã¦ã€ClickHouseã®ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ï¼ˆå˜ä¸€ãƒŽãƒ¼ãƒ‰ç”¨ï¼‰ã®ãƒ‘フォーマンスã¨ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨é‡ã«å½±éŸ¿ã‚’与ãˆã‚‹ä¸»ãªè¦å› ã¯**挿入ブロックサイズ**ã¨**挿入ã®ä¸¦åˆ—度**ã§ã™ã€‚ + +### 挿入ブロックサイズ + +![insert_mechanics](./images/insert_mechanics.png) + +`INSERT INTO SELECT`を実行ã™ã‚‹ã¨ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã®ä¸€éƒ¨ã‚’å—ã‘å–ã‚Šã€â‘  å„[パーティショニングキー](/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key)ã”ã¨ã«ãƒ¡ãƒ¢ãƒªå†…挿入ブロックを少ãªãã¨ã‚‚1ã¤å½¢æˆã—ã¾ã™ã€‚ブロック内ã®ãƒ‡ãƒ¼ã‚¿ãŒã‚½ãƒ¼ãƒˆã•ã‚Œã€ãƒ†ãƒ¼ãƒ–ルエンジン特有ã®æœ€é©åŒ–ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚データã¯åœ§ç¸®ã•ã‚ŒãŸå¾Œã€â‘¡ データベースストレージã«æ–°ã—ã„データ部分ã¨ã—ã¦æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +挿入ブロックサイズã¯ã€ClickHouseサーãƒãƒ¼ã®[ディスクファイルI/O使用é‡](https://en.wikipedia.org/wiki/Category:Disk_file_systems)ã¨ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã®ä¸¡æ–¹ã«å½±éŸ¿ã—ã¾ã™ã€‚より大ããªæŒ¿å…¥ãƒ–ロックã¯ã€ã‚ˆã‚Šå¤šãã®ãƒ¡ãƒ¢ãƒªã‚’使用ã—ã¾ã™ãŒã€åˆæœŸãƒ‘ーツã®ç”Ÿæˆã‚’より大ããã—ã€æ¸›å°‘ã•ã›ã¾ã™ã€‚ClickHouseãŒå¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹éš›ã«å¿…è¦ã¨ã™ã‚‹ãƒ‘ーツãŒå°‘ãªããªã‚‹ã»ã©ã€ãƒ‡ã‚£ã‚¹ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«I/Oã¨è‡ªå‹•çš„ã«å¿…è¦ã¨ã•ã‚Œã‚‹[ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã®æ•°](https://clickhouse.com/blog/supercharge-your-clickhouse-data-loads-part1#more-parts--more-background-part-merges)ã‚‚å°‘ãªããªã‚Šã¾ã™ã€‚ + +çµ±åˆãƒ†ãƒ¼ãƒ–ルエンジンやテーブル関数ã¨ã®`INSERT INTO SELECT`クエリを使用ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯ClickHouseサーãƒãƒ¼ã«ã‚ˆã£ã¦ãƒ—ルã•ã‚Œã¾ã™ï¼š + +![pull data](./images/pull.png) + +データãŒå®Œå…¨ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã¾ã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã¯ãƒ«ãƒ¼ãƒ—を実行ã—ã¾ã™ï¼š + +```bash +â‘  次ã®ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã‚’プルã—ã¦è§£æžã—ã€ãƒ¡ãƒ¢ãƒªå†…データブロック(å„パーティショニングキー用)を形æˆã—ã¾ã™ã€‚ + +â‘¡ ブロックを新ã—ã„パーツã¨ã—ã¦ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ + +â‘ ã«æˆ»ã‚‹ +``` + +â‘ ã§ã¯ã€ã‚µã‚¤ã‚ºã¯æŒ¿å…¥ãƒ–ロックã®å¤§ãã•ã«ä¾å­˜ã—ã€ã“ã‚Œã¯2ã¤ã®è¨­å®šã§åˆ¶å¾¡ã§ãã¾ã™ï¼š + +- [`min_insert_block_size_rows`](https://clickhouse.com/docs/ja/operations/settings/settings#min-insert-block-size-rows)(デフォルト:`1048545`万行) +- [`min_insert_block_size_bytes`](https://clickhouse.com/docs/ja/operations/settings/settings#min-insert-block-size-bytes)(デフォルト:`256 MiB`) + +指定ã•ã‚ŒãŸè¡Œæ•°ãŒæŒ¿å…¥ãƒ–ロックã«é›†ã¾ã‚‹ã‹ã€è¨­å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿é‡ã«é”ã™ã‚‹ã¨ï¼ˆã©ã¡ã‚‰ã‹ãŒå…ˆã«èµ·ã“る)ã€ãã®ãƒ–ロックã¯æ–°ã—ã„パーツã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ãƒˆãƒªã‚¬ãƒ¼ã¨ãªã‚Šã¾ã™ã€‚挿入ループã¯ã‚¹ãƒ†ãƒƒãƒ—â‘ ã§ç¶šãã¾ã™ã€‚ + +`min_insert_block_size_bytes`ã®å€¤ã¯éžåœ§ç¸®ãƒ¡ãƒ¢ãƒªå†…ブロックサイズを示ã—(圧縮済ã¿ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚»ãƒƒãƒˆã‚µã‚¤ã‚ºã§ã¯ã‚ã‚Šã¾ã›ã‚“)ã€ä½œæˆã•ã‚ŒãŸãƒ–ロックã¨ãƒ‘ーツãŒè¨­å®šã•ã‚ŒãŸè¡Œæ•°ã‚„ãƒã‚¤ãƒˆæ•°ã‚’å¿…ãšã—も正確ã«å«ã‚“ã§ã„ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯ClickHouseãŒãƒ‡ãƒ¼ã‚¿ã‚’è¡Œ-[ブロック](https://clickhouse.com/docs/ja/operations/settings/settings#setting-max_block_size)å˜ä½ã§ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã—ã€[処ç†](https://clickhouse.com/company/events/query-performance-introspection)ã™ã‚‹ãŸã‚ã€ã“れらã®è¨­å®šã¯æœ€ä½Žé™ã®é–¾å€¤ã‚’指定ã—ã¾ã™ã€‚ + +#### マージã«æ³¨æ„ã™ã‚‹ + +設定ã•ã‚ŒãŸæŒ¿å…¥ãƒ–ロックサイズãŒå°ã•ã„ã»ã©ã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿è² è·ã§ç”Ÿæˆã•ã‚Œã‚‹åˆæœŸãƒ‘ーツã¯å¢—ãˆã€ãƒ‡ãƒ¼ã‚¿ã®å–ã‚Šè¾¼ã¿ã¨ä¸¦è¡Œã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ‘ーツマージãŒå¤šããªã‚‹ãŸã‚ã€ãƒªã‚½ãƒ¼ã‚¹ç«¶åˆï¼ˆCPUã¨ãƒ¡ãƒ¢ãƒªï¼‰ãŒç™ºç”Ÿã—ã€å–ã‚Šè¾¼ã¿çµ‚了後ã«[å¥å…¨ãª](/docs/ja/operations/settings/merge-tree-settings#parts-to-throw-insert)(3000)パーツ数ã«åˆ°é”ã™ã‚‹ã¾ã§è¿½åŠ ã®æ™‚é–“ãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚ + +:::important +ClickHouseã®ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã¯ã€ãƒ‘ーツ数ãŒ[推奨制é™](/docs/ja/operations/settings/merge-tree-settings#parts-to-throw-insert)を超ãˆã‚‹ã¨æ‚ªå½±éŸ¿ã‚’å—ã‘ã¾ã™ã€‚ +::: + +ClickHouseã¯[マージパーツ](https://clickhouse.com/blog/asynchronous-data-inserts-in-clickhouse#data-needs-to-be-batched-for-optimal-performance)を継続的ã«å®Ÿè¡Œã—ã€[圧縮レベルã«åˆ°é”ã™ã‚‹ã¾ã§](/docs/ja/operations/settings/merge-tree-settings#max-bytes-to-merge-at-max-space-in-pool)~150 GiBã®ã‚µã‚¤ã‚ºã¾ã§ãƒ‘ーツを大ããã—ã¦ã„ãã¾ã™ã€‚ã“ã®ãƒ€ã‚¤ã‚¢ã‚°ãƒ©ãƒ ã¯ã€ClickHouseサーãƒãƒ¼ãŒãƒ‘ーツをã©ã®ã‚ˆã†ã«ãƒžãƒ¼ã‚¸ã™ã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ï¼š + +![merges](./images/merges.png) + +å˜ä¸€ã®ClickHouseサーãƒãƒ¼ã¯ã€ã„ãã¤ã‹ã®[ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã‚¹ãƒ¬ãƒƒãƒ‰](/docs/ja/operations/server-configuration-parameters/settings#background_pool_size)を使用ã—ã¦ä¸¦è¡Œã—ã¦[パーツマージ](https://clickhouse.com/blog/supercharge-your-clickhouse-data-loads-part1#more-parts--more-background-part-merges:~:text=to%20execute%20concurrent-,part%20merges,-.%20Each%20thread%20executes)を実行ã—ã¾ã™ã€‚å„スレッドã¯ãƒ«ãƒ¼ãƒ—を実行ã—ã¾ã™ï¼š + +```bash +â‘  次ã«ã©ã®ãƒ‘ーツをマージã™ã‚‹ã‹ã‚’決定ã—ã€ãれらをメモリã«ãƒ–ロックã¨ã—ã¦ãƒ­ãƒ¼ãƒ‰ã€‚ + +â‘¡ メモリ内ã®ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ–ロックを大ããªãƒ–ロックã«ãƒžãƒ¼ã‚¸ã€‚ + +â‘¢ マージã•ã‚ŒãŸãƒ–ロックを新ã—ã„ディスクパーツã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ + +â‘ ã«æˆ»ã‚‹ +``` + +[CPUコアã¨RAMサイズã®å¢—加](https://clickhouse.com/blog/supercharge-your-clickhouse-data-loads-part1#hardware-size)ãŒãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã‚¹ãƒ«ãƒ¼ãƒ—ットを増加ã•ã›ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +大ããªãƒ‘ーツã«ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒ‘ーツã¯[éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–](/docs/ja/operations/system-tables/parts)ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã€æœ€çµ‚çš„ã«[設定å¯èƒ½ãª](/docs/ja/operations/settings/merge-tree-settings#old-parts-lifetime)時間ãŒçµŒéŽã—ãŸå¾Œã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚時間ã¨ã¨ã‚‚ã«ã€ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒ‘ーツã®ãƒ„リーを作æˆã—ã¾ã™ï¼ˆãã®ãŸã‚[`MergeTree`](/docs/ja/engines/table-engines/mergetree-family)テーブルã¨å‘¼ã°ã‚Œã¾ã™ï¼‰ã€‚ + +### 挿入ã®ä¸¦åˆ—性 + +![resource_usage](./images/resource_usage.png) + +ClickHouseサーãƒãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿ã‚’並行ã—ã¦å‡¦ç†ã—ã€æŒ¿å…¥ã§ãã¾ã™ã€‚挿入ã®ä¸¦åˆ—度ã¯ã€ClickHouseサーãƒãƒ¼ã®å–ã‚Šè¾¼ã¿ã‚¹ãƒ«ãƒ¼ãƒ—ットã¨ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã«å½±éŸ¿ã‚’åŠã¼ã—ã¾ã™ã€‚データを並行ã—ã¦ãƒ­ãƒ¼ãƒ‰ãŠã‚ˆã³å‡¦ç†ã™ã‚‹ã«ã¯ã€ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªãŒå¤šãå¿…è¦ã§ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ãŒè¿…速ã«å‡¦ç†ã•ã‚Œã‚‹ãŸã‚ã€å–ã‚Šè¾¼ã¿ã‚¹ãƒ«ãƒ¼ãƒ—ットãŒå‘上ã—ã¾ã™ã€‚ + +s3ã®ã‚ˆã†ãªãƒ†ãƒ¼ãƒ–ル関数ã§ã¯ã€globパターンを使用ã—ã¦èª­ã¿è¾¼ã‚€ãƒ•ã‚¡ã‚¤ãƒ«åã®ã‚»ãƒƒãƒˆã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚globパターンãŒè¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¸€è‡´ã™ã‚‹å ´åˆã€ClickHouseã¯ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’並行ã—ã¦èª­ã¿è¾¼ã¿ã€ãã‚Œã«ã‚るデータをテーブルã«æŒ¿å…¥ã™ã‚‹ã“ã¨ã§ä¸¦è¡Œã—ã¦æŒ¿å…¥ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’利用ã§ãã¾ã™ï¼ˆã‚µãƒ¼ãƒãƒ¼å˜ä½ï¼‰ï¼š + +![insert_threads](./images/insert_threads.png) + +ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰å‡¦ç†ã•ã‚Œã‚‹ã¾ã§ã€å„挿入スレッドã¯ãƒ«ãƒ¼ãƒ—を実行ã—ã¾ã™ï¼š + +```bash +â‘  未処ç†ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‡ãƒ¼ã‚¿ï¼ˆéƒ¨åˆ†ã‚µã‚¤ã‚ºã¯è¨­å®šã•ã‚ŒãŸãƒ–ロックサイズã«åŸºã¥ã„ã¦ã„る)ã®æ¬¡ã®éƒ¨åˆ†ã‚’å–å¾—ã—ã€ãƒ¡ãƒ¢ãƒªå†…データブロックを作æˆã—ã¾ã™ã€‚ + +â‘¡ ブロックをストレージã«æ–°ã—ã„パーツã¨ã—ã¦æ›¸ãè¾¼ã¿ã¾ã™ã€‚ + +â‘ ã«æˆ»ã‚‹ã€‚ +``` + +ã“ã®ã‚ˆã†ãªä¸¦è¡ŒæŒ¿å…¥ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã¯ã€[`max_insert_threads`](https://clickhouse.com/docs/ja/operations/settings/settings#settings-max-insert-threads)設定ã§è¨­å®šã§ãã¾ã™ã€‚デフォルト値ã¯ã€ã‚ªãƒ¼ãƒ—ンソースã®ClickHouseã§ã¯`1`ã€[ClickHouse Cloud](https://clickhouse.com/cloud)ã§ã¯`4`ã§ã™ã€‚ + +大é‡ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚‹å ´åˆã€è¤‡æ•°ã®æŒ¿å…¥ã‚¹ãƒ¬ãƒƒãƒ‰ã«ã‚ˆã‚‹ä¸¦è¡Œå‡¦ç†ãŒã†ã¾ã機能ã—ã€åˆ©ç”¨å¯èƒ½ãªCPUコアã¨ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å¸¯åŸŸå¹…(並行ファイルダウンロードã®ãŸã‚)を完全㫠saturatã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚数個ã®å¤§ããªãƒ•ã‚¡ã‚¤ãƒ«ã ã‘をテーブルã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã‚·ãƒŠãƒªã‚ªã§ã¯ã€ClickHouseã¯è‡ªå‹•çš„ã«é«˜ã„データ処ç†ã®ä¸¦åˆ—度を確立ã—ã€å¤§ããªãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ç•°ãªã‚‹ç¯„囲を並行ã—ã¦èª­ã‚€ãŸã‚ã«æŒ¿å…¥ã‚¹ãƒ¬ãƒƒãƒ‰ã”ã¨ã«è¿½åŠ ã®ãƒªãƒ¼ãƒ€ãƒ¼ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’生æˆã—ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å¸¯åŸŸå¹…ã®ä½¿ç”¨ã‚’最é©åŒ–ã—ã¾ã™ã€‚ + +s3関数ã¨ãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€å€‹ã€…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ä¸¦è¡Œãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¯ã€[max_download_threads](https://clickhouse.com/codebrowser/ClickHouse/src/Core/Settings.h.html#DB::SettingsTraits::Data::max_download_threads)ã¨[max_download_buffer_size](https://clickhouse.com/codebrowser/ClickHouse/src/Core/Settings.h.html#DB::SettingsTraits::Data::max_download_buffer_size)ã®å€¤ã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã¾ã™ã€‚ファイルã¯ã€ãã®ã‚µã‚¤ã‚ºãŒ`2 * max_download_buffer_size`を超ãˆã‚‹å ´åˆã«ã®ã¿ä¸¦è¡Œã—ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯`max_download_buffer_size`デフォルトã¯10MiBã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚一部ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ã“ã®ãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚ºã‚’50MB(`max_download_buffer_size=52428800`)ã«å®‰å…¨ã«å¢—ã‚„ã™ã“ã¨ãŒã§ãã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒå˜ä¸€ã‚¹ãƒ¬ãƒƒãƒ‰ã«ã‚ˆã£ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã“ã¨ã‚’確ä¿ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å„スレッドãŒS3コールã«è²»ã‚„ã™æ™‚間を短縮ã—ã€S3å¾…ã¡æ™‚間も短ããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€ä¸¦è¡Œèª­ã¿å–ã‚Šã«å¯¾ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ãŒå°ã•ã™ãŽã‚‹å ´åˆã€ã‚¹ãƒ«ãƒ¼ãƒ—ットをå‘上ã•ã›ã‚‹ãŸã‚ã«ClickHouseã¯è‡ªå‹•çš„ã«ãƒ‡ãƒ¼ã‚¿ã‚’事å‰ã«èª­ã¿è¾¼ã¿ã—ã€ã“ã†ã—ãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚’éžåŒæœŸã§äº‹å‰èª­ã¿è¾¼ã¿ã™ã‚‹ã“ã¨ã§ã‚¹ãƒ«ãƒ¼ãƒ—ットをå‘上ã•ã›ã¾ã™ã€‚ + +## パフォーマンスã®æ¸¬å®š + +S3テーブル関数を使用ã—ãŸã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスを最é©åŒ–ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€æœ¬ç•ªç’°å¢ƒã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹å ´åˆã€ã¤ã¾ã‚Šã€ClickHouseã®è¨ˆç®—ã®ã¿ãŒä½¿ç”¨ã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿ãŒã‚ªãƒªã‚¸ãƒŠãƒ«ã®å½¢å¼ã§S3ã«æ®‹ã‚‹å ´åˆã€ãŠã‚ˆã³ClickHouse MergeTreeテーブルエンジンã«S3ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹å ´åˆã§ã™ã€‚指定ãŒãªã„é™ã‚Šã€ä»¥ä¸‹ã®æŽ¨å¥¨äº‹é …ã¯ä¸¡æ–¹ã®ã‚·ãƒŠãƒªã‚ªã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +## ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‚µã‚¤ã‚ºã®å½±éŸ¿ + +![Hardware size](./images/hardware_size.png) + +利用å¯èƒ½ãªCPUコアã®æ•°ã¨RAMサイズã¯ã€ä»¥ä¸‹ã«å½±éŸ¿ã‚’与ãˆã¾ã™ï¼š + +- サãƒãƒ¼ãƒˆã•ã‚Œã‚‹[åˆæœŸãƒ‘ーツサイズ](#insert-block-size) +- å¯èƒ½ãª[挿入ã®ä¸¦åˆ—度](#insert-parallelism) +- [ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ‘ーツマージ](https://clickhouse.com/blog/supercharge-your-clickhouse-data-loads-part1#more-parts--more-background-part-merges)ã®ã‚¹ãƒ«ãƒ¼ãƒ—ット + +ã—ãŸãŒã£ã¦ã€å…¨ä½“çš„ãªå–ã‚Šè¾¼ã¿ã‚¹ãƒ«ãƒ¼ãƒ—ットã«å½±éŸ¿ã—ã¾ã™ã€‚ + +## リージョンã®ãƒ­ãƒ¼ã‚«ãƒªãƒ†ã‚£ + +ãƒã‚±ãƒƒãƒˆãŒClickHouseインスタンスã¨åŒã˜ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«é…ç½®ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。ã“ã®å˜ç´”ãªæœ€é©åŒ–ã«ã‚ˆã‚Šã€ç‰¹ã«AWSインフラストラクãƒãƒ£ã§ClickHouseインスタンスをデプロイã™ã‚‹å ´åˆã€ã‚¹ãƒ«ãƒ¼ãƒ—ットパフォーマンスãŒåŠ‡çš„ã«å‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## フォーマット + +ClickHouseã¯ã€`s3`関数ã¨`S3`エンジンを使用ã—ã¦ã€[サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るフォーマット](/docs/ja/interfaces/formats.md/#data-formatting)ã§S3ãƒã‚±ãƒƒãƒˆã«æ ¼ç´ã•ã‚Œã¦ã„るファイルを読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚生ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読む場åˆã€ã“れらã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ã¯ç•°ãªã‚‹åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ï¼š + +* Nativeã€Parquetã€CSVWithNamesã€TabSeparatedWithNamesã®ã‚ˆã†ãªã‚«ãƒ©ãƒ åãŒã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€ã‚¯ã‚¨ãƒªãŒã‚ˆã‚Šç°¡ç´ åŒ–ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ`s3`関数ã§ã‚«ãƒ©ãƒ åを指定ã™ã‚‹å¿…è¦ãŒãªããªã‚Šã¾ã™ã€‚カラムåã«ã‚ˆã£ã¦ã“ã®æƒ…å ±ãŒæŽ¨æ¸¬ã§ãã‚‹ã‹ã‚‰ã§ã™ã€‚ +* フォーマットã«ã‚ˆã£ã¦ã€èª­ã¿å–ã‚Šã¨æ›¸ãè¾¼ã¿ã‚¹ãƒ«ãƒ¼ãƒ—ットã«é–¢ã—ã¦ãƒ‘フォーマンスãŒç•°ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚Nativeã¨Parquetã¯ã€ã™ã§ã«åˆ—指å‘ã§ã‚ˆã‚Šã‚³ãƒ³ãƒ‘クトã§ã‚ã‚‹ãŸã‚ã€èª­ã¿å–りパフォーマンスã«æœ€é©ã§ã™ã€‚Nativeフォーマットã¯ã€ClickHouseãŒãƒ‡ãƒ¼ã‚¿ã‚’メモリ内ã§æ ¼ç´ã™ã‚‹æ–¹æ³•ã¨ä¸€è‡´ã™ã‚‹ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã™ã‚‹éš›ã®å‡¦ç†ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’削減ã™ã‚‹ã¨ã„ã†åˆ©ç‚¹ã‚‚ã‚ã‚Šã¾ã™ã€‚ +* 大ããªãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿å–ã‚‹éš›ã«ã¯ã€ãƒ–ロックサイズãŒèª­ã¿å–ã‚Šã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ã«å½±éŸ¿ã‚’与ãˆã‚‹ã“ã¨ãŒã‚ˆãã‚ã‚Šã¾ã™ã€‚特ã«ãƒ‡ãƒ¼ã‚¿ã‚’サンプリングã™ã‚‹å ´åˆï¼ˆä¾‹ï¼šæœ€ä¸Šä½ã®N行を返ã™ï¼‰ãªã©ã§ã™ã€‚CSVã‚„TSVã®ã‚ˆã†ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€è¡Œã‚»ãƒƒãƒˆã‚’è¿”ã™ãŸã‚ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’解æžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚Nativeã‚„Parquetã®ã‚ˆã†ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€ãã®çµæžœã¨ã—ã¦ã‚ˆã‚Šé«˜é€Ÿã«ã‚µãƒ³ãƒ—リングを許å¯ã—ã¾ã™ã€‚ +* å„圧縮フォーマットã¯ã€åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã€é€Ÿåº¦ã€åœ§ç¸®ã¾ãŸã¯è§£å‡ãƒ‘フォーマンスをå‡è¡¡ã•ã›ã‚‹ã¨ã„ã†é•·æ‰€ã¨çŸ­æ‰€ã‚’æŒã£ã¦ãã¾ã™ã€‚CSVã‚„TSVã®ã‚ˆã†ãªç”Ÿãƒ•ã‚¡ã‚¤ãƒ«ã‚’圧縮ã™ã‚‹å ´åˆã€lz4ã¯æœ€é€Ÿã®è§£å‡ãƒ‘フォーマンスをæä¾›ã—ã€åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã‚’犠牲ã«ã—ã¾ã™ã€‚gzipã¯é€šå¸¸ã€åœ§ç¸®ã‚’改善ã™ã‚‹ãŒã€è‹¥å¹²ã®èª­ã¿å–り速度を犠牲ã«ã—ã¾ã™ã€‚xzã¯ã•ã‚‰ã«é€²ã‚“ã§æœ€é«˜ã®åœ§ç¸®ã‚’æä¾›ã—ã€åœ§ç¸®ã¨è§£å‡ã®ãƒ‘フォーマンスãŒæœ€ã‚‚低下ã—ã¾ã™ã€‚エクスãƒãƒ¼ãƒˆã™ã‚‹å ´åˆã€gzã¨lz4ã¯æ¯”較的åŒã˜é€Ÿåº¦ã§åœ§ç¸®ã—ã¾ã™ã€‚ã“れを接続速度ã¨æ¯”較ã—ã¦ãã ã•ã„。圧縮や解å‡ã®é€Ÿåº¦ã‹ã‚‰å¾—られる利点ã¯ã€s3ãƒã‚±ãƒƒãƒˆã¸ã®æŽ¥ç¶šãŒé…ã„å ´åˆã«ã¯ç°¡å˜ã«ç„¡åŠ¹ã«ãªã‚Šã¾ã™ã€‚ +* Nativeã¾ãŸã¯Parquetã®ã‚ˆã†ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯é€šå¸¸ã€åœ§ç¸®ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’正当化ã™ã‚‹ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。データサイズã®å‰Šæ¸›ã¯ã€ãŠãらã最å°é™ã®ã‚‚ã®ã§ã‚ã‚‹ãŸã‚ã€ã“れらã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯å…ƒæ¥ã‚³ãƒ³ãƒ‘クトã§ã™ã€‚特ã«s3ãŒã‚°ãƒ­ãƒ¼ãƒãƒ«ã«åˆ©ç”¨å¯èƒ½ã§é«˜å¸¯åŸŸå¹…ã§ã‚ã‚‹ãŸã‚ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è»¢é€æ™‚é–“ã‚’å分ã«ã‚ªãƒ•ã‚»ãƒƒãƒˆã™ã‚‹ã“ã¨ã¯ã»ã¨ã‚“ã©ã‚ã‚Šã¾ã›ã‚“。 + +## 例ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ + +ã•ã‚‰ãªã‚‹æœ€é©åŒ–を図るãŸã‚ã«ã€[Stack Overflowデータセットã‹ã‚‰ã®æŠ•ç¨¿](/docs/ja/data-modeling/schema-design#stack-overflow-dataset)を使用ã—ã¦ã€ã‚¯ã‚¨ãƒªã¨æŒ¿å…¥ãƒ‘フォーマンスã®ä¸¡æ–¹ã‚’最é©åŒ–ã—ã¾ã™ã€‚ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ã€2008å¹´7月ã‹ã‚‰2024å¹´3月ã¾ã§ã®æ¯Žæœˆã®æŠ•ç¨¿ã«é–¢ã™ã‚‹189ã®Parquetファイルã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +我々ã¯ä¸Šè¨˜ã®[推奨事項](#formats)ã«å¾“ã„ã€ãƒ‘フォーマンスã®å‘上ã®ãŸã‚ã«Parquetを使用ã—ã€ãƒã‚±ãƒƒãƒˆã¨åŒã˜åœ°åŸŸã«é…ç½®ã•ã‚ŒãŸClickHouseクラスタã§å…¨ã¦ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ã“ã®ã‚¯ãƒ©ã‚¹ã‚¿ã«ã¯3ã¤ã®ãƒŽãƒ¼ãƒ‰ãŒã‚ã‚Šã€ãã‚Œãžã‚Œ32GiBã®RAMã¨8ã¤ã®vCPUã‚’æŒã£ã¦ã„ã¾ã™ã€‚ + +調整ãªã—ã§ã€MergeTreeテーブルエンジンã«ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’挿入ã—ã€æœ€ã‚‚多ãã®è³ªå•ã‚’ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’計算ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ãƒ‘フォーマンスを示ã—ã¾ã™ã€‚ã“れらã®ã‚¯ã‚¨ãƒªã¯ã€æ„図的ã«ãƒ‡ãƒ¼ã‚¿å…¨ä½“をスキャンã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +-- トップユーザーå +SELECT + OwnerDisplayName, + count() AS num_posts +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/by_month/*.parquet') +WHERE OwnerDisplayName NOT IN ('', 'anon') +GROUP BY OwnerDisplayName +ORDER BY num_posts DESC +LIMIT 5 + +┌─OwnerDisplayName─┬─num_posts─┠+│ user330315 │ 10344 │ +│ user4039065 │ 5316 │ +│ user149341 │ 4102 │ +│ user529758 │ 3700 │ +│ user3559349 │ 3068 │ +└──────────────────┴───────────┘ + +5 rows in set. Elapsed: 3.013 sec. Processed 59.82 million rows, 24.03 GB (19.86 million rows/s., 7.98 GB/s.) +Peak memory usage: 603.64 MiB. + +-- postsテーブルã«ãƒ­ãƒ¼ãƒ‰ +INSERT INTO posts SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/by_month/*.parquet') + +0 rows in set. Elapsed: 191.692 sec. Processed 59.82 million rows, 24.03 GB (312.06 thousand rows/s., 125.37 MB/s.) +``` + +ã“ã®ä¾‹ã§ã¯æ•°è¡Œã—ã‹è¿”ã—ã¾ã›ã‚“。`SELECT`クエリã®ãƒ‘フォーマンスを測定ã™ã‚‹å ´åˆã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«è¿”ã•ã‚Œã‚‹ã“ã¨ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã‚¯ã‚¨ãƒªã«ã¯[nullフォーマット](/docs/ja/interfaces/formats/#null)を利用ã™ã‚‹ã‹ã€çµæžœã‚’[`Null`エンジン](/docs/ja/engines/table-engines/special/null.md)ã«ç›´æŽ¥é€ã‚‹ã¹ãã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒãƒ‡ãƒ¼ã‚¿ã§åœ§å€’ã•ã‚Œã‚‹ã“ã¨ã‚„ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®é£½å’Œã‚’é¿ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::info +クエリを読む時ã€åˆå›žã®ã‚¯ã‚¨ãƒªã¯å†å®Ÿè¡Œã•ã‚ŒãŸå ´åˆã«æ¯”ã¹ã¦é…ã見ãˆã‚‹ã“ã¨ãŒã‚ˆãã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯S3自身ã®ã‚­ãƒ£ãƒƒã‚·ãƒ³ã‚°ã¨[ClickHouseã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã‚­ãƒ£ãƒƒã‚·ãƒ¥](/docs/ja/operations/system-tables/schema_inference_cache)ã®åŒæ–¹ã«èµ·å› ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æŽ¨æ¸¬ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã‚’ä¿å­˜ã—ã€ãã®çµæžœã€ç¹°ã‚Šè¿”ã—アクセス時ã«æŽ¨æ¸¬ã‚¹ãƒ†ãƒƒãƒ—をスキップã§ãã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªæ™‚間を短縮ã—ã¾ã™ã€‚ +::: + +## 読ã¿å–り用ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®ä½¿ç”¨ + +S3上ã§ã®èª­ã¿å–りパフォーマンスã¯ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å¸¯åŸŸå¹…やローカルI/Oã«ã‚ˆã£ã¦åˆ¶é™ã•ã‚Œã¦ã„ãªã„é™ã‚Šã€ã‚³ã‚¢æ•°ã«æ¯”例ã—ã¦ã‚¹ã‚±ãƒ¼ãƒ«ã—ã¾ã™ã€‚スレッド数を増やã™ã“ã¨ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒèªè­˜ã—ã¦ãŠãã¹ãメモリオーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’æŒã£ã¦ã„ã¾ã™ã€‚以下ã®è¨­å®šã‚’調整ã™ã‚‹ã“ã¨ã§ã€èª­ã¿å–りスループット性能ãŒå‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼š + +* 通常ã€`max_threads`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼ˆã‚³ã‚¢ã®æ•°ï¼‰ãŒå分ã§ã™ã€‚クエリã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¡ãƒ¢ãƒªã®é‡ãŒå¤šãã€ã“ã®é‡ã‚’削減ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã€ã¾ãŸã¯çµæžœã«`LIMIT`ãŒä½Žã„å ´åˆã€ã“ã®å€¤ã‚’低ã設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚メモリã«ä½™è£•ãŒã‚るユーザーã¯ã€ã“ã®å€¤ã‚’増やã—ã¦ã€ã‚ˆã‚Šé«˜ã„読ã¿å–りスループットã®å¯èƒ½æ€§ã‚’追求ã™ã‚‹ã“ã¨ãŒæœ›ã¾ã—ã„ã§ã—ょã†ã€‚通常ã€ã“ã‚Œã¯ã‚³ã‚¢æ•°ã®å°‘ãªã„マシンã€ã¤ã¾ã‚Š10未満ã®å ´åˆã«ã®ã¿æœ‰ç›Šã§ã™ã€‚ã•ã‚‰ãªã‚‹ä¸¦åˆ—化ã®åˆ©ç›Šã¯ã€ä»–ã®ãƒªã‚½ãƒ¼ã‚¹ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã¨ã—ã¦ä½œç”¨ã™ã‚‹ã¨ã•ã‚Œã€é€šå¸¸ã¯æ¸›å°‘ã—ã¾ã™ã€‚例ãˆã°ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¨CPUã®ç«¶åˆã§ã™ã€‚ +* 22.3.1以å‰ã®ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€`s3`関数や`S3`テーブルエンジンを使用ã™ã‚‹éš›ã€è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚ãŸã£ã¦èª­ã¿å–りを並列化ã—ã¾ã—ãŸã€‚最é©ãªèª­ã¿å–りパフォーマンスをé”æˆã™ã‚‹ãŸã‚ã«ã€S3上ã§ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ãƒãƒ£ãƒ³ã‚¯ã«åˆ†å‰²ã—ã€èª­ã¿å–ã‚Šã«ã‚°ãƒ­ãƒ–パターンを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã—ãŸã€‚最新ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«å†…ã§ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã‚’並列化ã—ã¾ã™ã€‚ +* 低スレッド数ã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯`remote_filesystem_read_method`を「readã€ã«è¨­å®šã—ã¦ã€S3ã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã®åŒæœŸèª­ã¿å–ã‚Šã‚’è¡Œã†ã“ã¨ã§åˆ©ç›Šã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +* s3関数ã¨ãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€å€‹åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ä¸¦åˆ—ダウンロードã¯ã€`max_download_threads`ã¨`max_download_buffer_size`ã®å€¤ã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã¾ã™ã€‚ファイルã¯ã€ãã®ã‚µã‚¤ã‚ºãŒ2 * `max_download_buffer_size`を超ãˆã‚‹å ´åˆã«ã®ã¿ä¸¦è¡Œã—ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯ã€`max_download_buffer_size`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯10MiBã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚一部ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ã“ã®ãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚ºã‚’50 MB(`max_download_buffer_size=52428800`)ã«å®‰å…¨ã«å¢—ã‚„ã™ã“ã¨ãŒã§ãã€å„ファイルãŒå˜ä¸€ã‚¹ãƒ¬ãƒƒãƒ‰ã«ã‚ˆã£ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã“ã¨ã‚’確ä¿ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å„スレッドãŒS3コールã«è²»ã‚„ã™æ™‚間を短縮ã—ã€S3å¾…ã¡æ™‚間も短ããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚[ã“ã®ãƒ–ログãƒã‚¹ãƒˆ](https://clickhouse.com/blog/clickhouse-1-trillion-row-challenge)ã‚’å‚考ã«ã—ã¦ãã ã•ã„。 + +パフォーマンスをå‘上ã•ã›ã‚‹ãŸã‚ã®å¤‰æ›´ã‚’è¡Œã†å‰ã«ã€é©åˆ‡ã«æ¸¬å®šã™ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。S3 APIコールã¯é…延ã«æ•æ„Ÿã§ã‚ã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ã‚¿ã‚¤ãƒŸãƒ³ã‚°ã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ãƒ‘フォーマンス指標ã«ã¯ã‚¯ã‚¨ãƒªãƒ­ã‚°ã€ã™ãªã‚ã¡`system.query_log`を使用ã—ã¦ãã ã•ã„。 + +ã“ã“ã§ã®ã‚¯ã‚¨ãƒªã‚’例ã«ã€`max_threads`ã‚’å€å¢—ã—ã¦16ã«è¨­å®šã™ã‚‹ã¨ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`max_threads`ã¯ãƒŽãƒ¼ãƒ‰ã®ã‚³ã‚¢æ•°ï¼‰ã€èª­ã¿å–りクエリ性能ãŒ2å€å‘上ã—ã€ãƒ¡ãƒ¢ãƒªãŒå¢—ãˆã‚‹ä»£ã‚ã‚Šã«ã€‚ã•ã‚‰ãªã‚‹`max_threads`ã®å¢—加ã¯æ¸›è¡°ã™ã‚‹ãƒªã‚¿ãƒ¼ãƒ³ã‚’示ã—ã¾ã™ã€‚ + +```sql +SELECT + OwnerDisplayName, + count() AS num_posts +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/by_month/*.parquet') +WHERE OwnerDisplayName NOT IN ('', 'anon') +GROUP BY OwnerDisplayName +ORDER BY num_posts DESC +LIMIT 5 +SETTINGS max_threads = 16 + +┌─OwnerDisplayName─┬─num_posts─┠+│ user330315 │ 10344 │ +│ user4039065 │ 5316 │ +│ user149341 │ 4102 │ +│ user529758 │ 3700 │ +│ user3559349 │ 3068 │ +└──────────────────┴───────────┘ + +5 rows in set. Elapsed: 1.505 sec. Processed 59.82 million rows, 24.03 GB (39.76 million rows/s., 15.97 GB/s.) +Peak memory usage: 178.58 MiB. + +SETTINGS max_threads = 32 + +5 rows in set. Elapsed: 0.779 sec. Processed 59.82 million rows, 24.03 GB (76.81 million rows/s., 30.86 GB/s.) +Peak memory usage: 369.20 MiB. + +SETTINGS max_threads = 64 + +5 rows in set. Elapsed: 0.674 sec. Processed 59.82 million rows, 24.03 GB (88.81 million rows/s., 35.68 GB/s.) +Peak memory usage: 639.99 MiB. +``` + +## 挿入用スレッドã¨ãƒ–ロックサイズã®èª¿æ•´ + +最大ã®å–ã‚Šè¾¼ã¿æ€§èƒ½ã‚’é”æˆã™ã‚‹ã«ã¯ã€ï¼ˆ1)挿入ブロックサイズをé¸æŠžã—ã€ï¼ˆ2)利用å¯èƒ½ãªCPUコアã¨RAMã«åŸºã¥ã„ã¦é©åˆ‡ãªæŒ¿å…¥ã®ä¸¦åˆ—度をé¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¾ã¨ã‚ã‚‹ã¨ï¼š + +- [挿入ブロックサイズを大ãã設定ã™ã‚‹ã»ã©](#insert-block-size)ã€ClickHouseãŒä½œæˆã™ã‚‹ãƒ‘ーツãŒå°‘ãªããªã‚Šã€[ディスクファイル入出力](https://en.wikipedia.org/wiki/Category:Disk_file_systems)ã‚„[ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸](https://clickhouse.com/blog/supercharge-your-clickhouse-data-loads-part1#more-parts--more-background-part-merges)ãŒå°‘ãªããªã‚Šã¾ã™ã€‚ +- [並行挿入スレッドã®æ•°ã‚’多ã設定ã™ã‚‹ã»ã©](#insert-parallelism)ã€ãƒ‡ãƒ¼ã‚¿ã¯ã‚ˆã‚Šè¿…速ã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +ã“れら2ã¤ã®æ€§èƒ½è¦å› é–“ã«ã¯å¯¾ç«‹ã™ã‚‹ãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ãŒã‚ã‚Šã¾ã™ï¼ˆãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ã¨ã‚‚トレードオフãŒã‚ã‚Šã¾ã™ï¼‰ã€‚ClickHouseサーãƒãƒ¼ã®ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã®é‡ã«ã¯åˆ¶é™ãŒã‚ã‚Šã¾ã™ã€‚より大ããªãƒ–ロックã¯ã‚ˆã‚Šå¤šãã®ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã‚’使用ã™ã‚‹ãŸã‚ã€åˆ©ç”¨å¯èƒ½ãªä¸¦è¡ŒæŒ¿å…¥ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã‚’制é™ã—ã¾ã™ã€‚å対ã«ã€ã‚ˆã‚Šå¤šãã®ä¸¦è¡ŒæŒ¿å…¥ã‚¹ãƒ¬ãƒƒãƒ‰ã¯ã‚ˆã‚Šå¤šãã®ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã‚’å¿…è¦ã¨ã—ã€ãƒ¡ãƒ¢ãƒªå†…ã§åŒæ™‚ã«ä½œæˆã•ã‚Œã‚‹æŒ¿å…¥ãƒ–ロックã®æ•°ã‚’制é™ã—ã¾ã™ã€‚ã•ã‚‰ã«ã€æŒ¿å…¥ã‚¹ãƒ¬ãƒƒãƒ‰ã¨ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã‚¹ãƒ¬ãƒƒãƒ‰é–“ã®ãƒªã‚½ãƒ¼ã‚¹ç«¶åˆãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚高ã„æ•°ã®é…ç½®ã•ã‚ŒãŸæŒ¿å…¥ã‚¹ãƒ¬ãƒƒãƒ‰ã¯ï¼ˆ1)マージã™ã‚‹å¿…è¦ãŒã‚るパーツを多ã生æˆã—ã€ï¼ˆ2)ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã‚¹ãƒ¬ãƒƒãƒ‰ã‹ã‚‰CPUコアã¨ãƒ¡ãƒ¢ãƒªã‚¹ãƒšãƒ¼ã‚¹ã‚’奪ã„ã¾ã™ã€‚ + +[ã“ã®ãƒ–ログãƒã‚¹ãƒˆ](https://clickhouse.com/blog/supercharge-your-clickhouse-data-loads-part2)を読むã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã®ãƒ‘ラメータã®å‹•ä½œãŒã©ã®ã‚ˆã†ã«æ€§èƒ½ã¨ãƒªã‚½ãƒ¼ã‚¹ã«å½±éŸ¿ã‚’与ãˆã‚‹ã‹ã‚’より詳細ã«èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚°ãŒ2ã¤ã®ãƒ‘ラメータã®å¾®å¦™ãªãƒãƒ©ãƒ³ã‚¹ã‚’å«ã‚€ã“ã¨ãŒã‚ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ã“ã®å¾¹åº•çš„ãªãƒ†ã‚¹ãƒˆã¯å®Ÿç”¨çš„ã§ãªã„å ´åˆãŒã‚ã‚‹ãŸã‚ã€ã¾ã¨ã‚ã¨ã—ã¦ã€æ¬¡ã®ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ï¼š + +```bash +• max_insert_threads:挿入スレッドã«åˆ©ç”¨å¯èƒ½ãªCPUコアã®ç´„åŠåˆ†ã‚’é¸æŠžã—ã¾ã™ï¼ˆãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸å°‚用ã®ã‚³ã‚¢ã‚’å分ã«æ®‹ã—ã¾ã™ï¼‰ã€‚ + +• peak_memory_usage_in_bytes:æ„図ã—ãŸãƒ”ークメモリ使用é‡ã‚’é¸æŠžã—ã¾ã™ã€‚ãã‚ŒãŒå˜ç‹¬ã®å–ã‚Šè¾¼ã¿ã§ã‚ã‚‹å ´åˆã¯ã™ã¹ã¦ã®åˆ©ç”¨å¯èƒ½ãªRAMã€ä»–ã®åŒæ™‚タスクã®ãŸã‚ã«åŠåˆ†ã¾ãŸã¯ãれ以下をé¸æŠžã—ã¾ã™ã€‚ + +次ã«ï¼š +min_insert_block_size_bytes = peak_memory_usage_in_bytes / (~3 * max_insert_threads) +``` + +ã“ã®è¨ˆç®—å¼ã‚’使用ã™ã‚‹ã¨ãã¯ã€`min_insert_block_size_rows`ã‚’0ã«è¨­å®šã—ã¦ï¼ˆè¡Œãƒ™ãƒ¼ã‚¹ã®é–¾å€¤ã‚’無効ã«ã™ã‚‹ãŸã‚)ã€æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’é¸æŠžã—ãŸå€¤ã«è¨­å®šã—ã€`min_insert_block_size_bytes`を上記ã®è¨ˆç®—çµæžœã«åŸºã¥ã„ã¦è¨­å®šã—ã¾ã™ã€‚ + +上記ã®è¨ˆç®—å¼ã‚’使用ã—ã¦ã€Stack Overflowã®ä¾‹ã‚’å–り上ã’ã¾ã™ã€‚ + +- `max_insert_threads=4`(ノードã‚ãŸã‚Š8コア) +- `peak_memory_usage_in_bytes` - 32 GiB(ノードリソースã®100%)ã¾ãŸã¯`34359738368`ãƒã‚¤ãƒˆ +- `min_insert_block_size_bytes` = `34359738368/(3*4) = 2863311530` + +```sql +INSERT INTO posts SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/by_month/*.parquet') SETTINGS min_insert_block_size_rows=0, max_insert_threads=4, min_insert_block_size_bytes=2863311530 + +0 rows in set. Elapsed: 128.566 sec. Processed 59.82 million rows, 24.03 GB (465.28 thousand rows/s., 186.92 MB/s.) +``` + +示ã•ã‚Œã¦ã„るよã†ã«ã€ã“れらã®è¨­å®šã‚’調整ã™ã‚‹ã“ã¨ã§ã€æŒ¿å…¥æ€§èƒ½ãŒ33%を超ãˆã¦å‘上ã—ã¾ã—ãŸã€‚å˜ä¸€ãƒŽãƒ¼ãƒ‰ã®ãƒ‘フォーマンスをã•ã‚‰ã«å‘上ã•ã›ã‚‹ãŸã‚ã«ã€ä»–ã®è¨­å®šã‚’調整ã™ã‚‹ã“ã¨ã‚’ユーザーã«ãŠä»»ã›ã—ã¾ã™ã€‚ + +## リソースã¨ãƒŽãƒ¼ãƒ‰ã§ã®ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚° + +リソースã¨ãƒŽãƒ¼ãƒ‰ã«ã‚ˆã‚‹ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã¯ã€èª­ã¿å–ã‚ŠãŠã‚ˆã³æŒ¿å…¥ã‚¯ã‚¨ãƒªã®ä¸¡æ–¹ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +### 垂直スケーリング + +å‰ã®èª¿æ•´ã¨ã‚¯ã‚¨ãƒªã¯ã€ClickHouse Cloudクラスター内ã®å˜ä¸€ãƒŽãƒ¼ãƒ‰ã—ã‹ä½¿ç”¨ã—ã¦ã„ã¾ã›ã‚“。ユーザーã«ã¯é€šå¸¸ã€ClickHouseã®ãƒŽãƒ¼ãƒ‰ãŒè¤‡æ•°åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ユーザーã¯æœ€åˆã«åž‚直スケーリングを行ã„ã€ã‚³ã‚¢æ•°ã«æ¯”例ã—ã¦S3スループットをå‘上ã•ã›ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚以å‰ã®æŒ¿å…¥ã¨èª­ã¿å–りクエリをå†å®Ÿè¡Œã—ã€é©åˆ‡ãªè¨­å®šã§ãƒªã‚½ãƒ¼ã‚¹ã‚’二å€ã«ã—ã¦ClickHouse Cloudノードを利用ã™ã‚‹ã¨ã€ã©ã¡ã‚‰ã‚‚約二å€é€Ÿã実行ã•ã‚Œã¾ã™ã€‚ + +```sql +INSERT INTO posts SELECT * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/by_month/*.parquet') SETTINGS min_insert_block_size_rows=0, max_insert_threads=8, min_insert_block_size_bytes=2863311530 + +0 rows in set. Elapsed: 67.294 sec. Processed 59.82 million rows, 24.03 GB (888.93 thousand rows/s., 357.12 MB/s.) + +SELECT + OwnerDisplayName, + count() AS num_posts +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/by_month/*.parquet') +WHERE OwnerDisplayName NOT IN ('', 'anon') +GROUP BY OwnerDisplayName +ORDER BY num_posts DESC +LIMIT 5 +SETTINGS max_threads = 92 + +5 rows in set. Elapsed: 0.421 sec. Processed 59.82 million rows, 24.03 GB (142.08 million rows/s., 57.08 GB/s.) +``` + +:::note +個々ã®ãƒŽãƒ¼ãƒ‰ã¯ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚„S3 GETリクエストã«ã‚ˆã£ã¦ã‚‚ボトルãƒãƒƒã‚¯ã¨ãªã‚Šã€åž‚ç›´çš„ãªãƒ‘フォーマンスã®ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚’妨ã’ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +### 水平スケーリング + +最終的ã«ã€ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®åˆ©ç”¨å¯èƒ½æ€§ã‚„コスト効率ã«ã‚ˆã‚Šã€æ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ãŒå¿…è¦ã«ãªã‚‹ã“ã¨ãŒã‚ˆãã‚ã‚Šã¾ã™ã€‚ClickHouse Cloudã§ã¯ã€æœ¬ç•ªã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã¯å°‘ãªãã¨ã‚‚3ã¤ã®ãƒŽãƒ¼ãƒ‰ãŒã‚ã‚Šã¾ã™ã€‚挿入ã«ã¤ã„ã¦ã‚‚å…¨ã¦ã®ãƒŽãƒ¼ãƒ‰ã‚’利用ã™ã‚‹ã“ã¨ã‚’ユーザーã¯æ¤œè¨Žã™ã‚‹ã§ã—ょã†ã€‚ + +S3ã®ãƒªãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®åˆ©ç”¨ã¯ã€[クラスターã®åˆ©ç”¨](./index.md#utilizing-clusters)ã§èª¬æ˜Žã—ãŸã‚ˆã†ã«ã€`s3Cluster`関数を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒªãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ãŒãƒŽãƒ¼ãƒ‰é–“ã§åˆ†æ•£ã•ã‚Œã¾ã™ã€‚ + +クエリを最åˆã«å—ã‘å–ã£ãŸã‚µãƒ¼ãƒãƒ¼ã¯ã€æœ€åˆã«ã‚°ãƒ­ãƒ–パターンを解決ã—ã€å‡¦ç†ã‚’å‹•çš„ã«è‡ªèº«ã¨ä»–ã®ã‚µãƒ¼ãƒãƒ¼ã«åˆ†æ•£ã•ã›ã¾ã™ã€‚ + +![s3Cluster](./images/s3Cluster.png) + +以å‰ã®ãƒªãƒ¼ãƒ‰ã‚¯ã‚¨ãƒªã‚’3ã¤ã®ãƒŽãƒ¼ãƒ‰ã«è² è·ã‚’分散ã—ã€ã‚¯ã‚¨ãƒªã‚’`s3Cluster`を使用ã™ã‚‹ã‚ˆã†èª¿æ•´ã—ã¾ã™ã€‚ã“ã‚Œã¯ClickHouse Cloudã§è‡ªå‹•çš„ã«ã€`default`クラスターをå‚ç…§ã™ã‚‹ã“ã¨ã§è¡Œã‚ã‚Œã¾ã™ã€‚ + +[クラスターã®åˆ©ç”¨](#utilizing-clusters)ã«ç¤ºã•ã‚Œã¦ã„るよã†ã«ã€ã“ã®ä½œæ¥­ã¯ãƒ•ã‚¡ã‚¤ãƒ«ãƒ¬ãƒ™ãƒ«ã§åˆ†æ•£ã•ã‚Œã¾ã™ã€‚利用者ãŒã“ã®æ©Ÿèƒ½ã‚’活用ã™ã‚‹ã«ã¯ã€ãƒŽãƒ¼ãƒ‰æ•°ã‚’超ãˆã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ãŒå分ã«å¿…è¦ã§ã™ã€‚ + +```sql +SELECT + OwnerDisplayName, + count() AS num_posts +FROM s3Cluster('default', 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/by_month/*.parquet') +WHERE OwnerDisplayName NOT IN ('', 'anon') +GROUP BY OwnerDisplayName +ORDER BY num_posts DESC +LIMIT 5 +SETTINGS max_threads = 16 + +┌─OwnerDisplayName─┬─num_posts─┠+│ user330315 │ 10344 │ +│ user4039065 │ 5316 │ +│ user149341 │ 4102 │ +│ user529758 │ 3700 │ +│ user3559349 │ 3068 │ +└──────────────────┴───────────┘ + +5 rows in set. Elapsed: 0.622 sec. Processed 59.82 million rows, 24.03 GB (96.13 million rows/s., 38.62 GB/s.) +Peak memory usage: 176.74 MiB. +``` + +åŒæ§˜ã«ã€åŽŸæŒ¿å…¥ã‚¯ã‚¨ãƒªã‚’分散ã—ã€å˜ä¸€ãƒŽãƒ¼ãƒ‰ç”¨ã«ä»¥å‰è¦‹ã¤ã‘ãŸè¨­å®šã‚’使用ã—ã¾ã™ï¼š + +```sql +INSERT INTO posts SELECT * +FROM s3Cluster('default', 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/by_month/*.parquet') SETTINGS min_insert_block_size_rows=0, max_insert_threads=4, min_insert_block_size_bytes=2863311530 + +0 rows in set. Elapsed: 171.202 sec. Processed 59.82 million rows, 24.03 GB (349.41 thousand rows/s., 140.37 MB/s.) +``` + +読ã¿è¾¼ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ãŒæ€§èƒ½å‘上を示ã—ã¦ã„ã‚‹ãŒã€æŒ¿å…¥æ€§èƒ½ã‚’示ã—ã¦ã„ãªã„ã“ã¨ãŒåˆ†ã‹ã‚Šã¾ã™ã€‚デフォルトã§ã¯ã€ãƒªãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯`s3Cluster`を使用ã—ã¦åˆ†æ•£ã•ã‚Œã¾ã™ãŒã€æŒ¿å…¥ã¯åˆæœŸãƒŽãƒ¼ãƒ‰ã«å¯¾ã—ã¦ã®ã¿ç™ºç”Ÿã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒŽãƒ¼ãƒ‰ã”ã¨ã«æŒ¿å…¥ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’生æˆã™ã‚‹ã“ã¨ã§ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å¾…ã¡æ™‚é–“ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒå‰Šæ¸›ã•ã‚Œã€è¨ˆç®—領域ãŒæŒ¿å…¥ãƒ—ロセス専用ã«è¨­å®šã•ã‚Œã‚‹ãŸã‚ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã®è² è·ã‚‚削減ã—ã¾ã™ã€‚シナリオã®é«˜ã‚¹ãƒ«ãƒ¼ãƒ—ットã§ã“ã®ãƒœãƒˆãƒ«ãƒãƒƒã‚¯ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«å¯¾å‡¦ã™ã‚‹ã«ã¯ã€`s3cluster`関数ã®ãƒ‘ラメーター`parallel_distributed_insert_select`を設定ã—ã¾ã™ã€‚ + +ã“れを`parallel_distributed_insert_select=2`ã«è¨­å®šã™ã‚‹ã“ã¨ã§ã€`SELECT`ã¨`INSERT`ãŒã€å„ノードã®åˆ†æ•£ã‚¨ãƒ³ã‚¸ãƒ³ã®åŸºç¤Žãƒ†ãƒ¼ãƒ–ルã‹ã‚‰/ã«å¯¾ã—ã¦ä¸¦è¡Œã«å®Ÿè¡Œã•ã‚Œã‚‹ã‚ˆã†ã«ã—ã¾ã™ã€‚ + +```sql +INSERT INTO posts +SELECT * +FROM s3Cluster('default', 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/by_month/*.parquet') +SETTINGS parallel_distributed_insert_select = 2, min_insert_block_size_rows=0, max_insert_threads=4, min_insert_block_size_bytes=2863311530 + +0 rows in set. Elapsed: 54.571 sec. Processed 59.82 million rows, 24.03 GB (1.10 million rows/s., 440.38 MB/s.) +Peak memory usage: 11.75 GiB. +``` + +期待ã•ã‚ŒãŸé€šã‚Šã€ã“ã‚Œã«ã‚ˆã‚ŠæŒ¿å…¥ãƒ‘フォーマンスãŒ3å€å‘上ã—ã¾ã™ã€‚ + +## ã•ã‚‰ãªã‚‹èª¿æ•´ + +### é‡è¤‡é™¤åŽ»ã®ç„¡åŠ¹åŒ– + +挿入æ“作ã¯ã€ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãªã©ã®ã‚¨ãƒ©ãƒ¼ã«ã‚ˆã‚Šå¤±æ•—ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚挿入ãŒå¤±æ•—ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ãŒæ­£å¸¸ã«æŒ¿å…¥ã•ã‚ŒãŸã‹ã©ã†ã‹ã«ã‹ã‹ã‚らãšã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã£ã¦å†è©¦è¡Œã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚分散é…置(ClickHouse Cloudãªã©ï¼‰ã§ã¯ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ãŒã™ã§ã«æ­£å¸¸ã«æŒ¿å…¥ã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’確èªã—ã€æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒé‡è¤‡ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚’目的ã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã—ã¾ã›ã‚“。ãŸã ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯é€šå¸¸ã®æŒ¿å…¥ãŒè¡Œã‚ã‚ŒãŸã‹ã®ã‚ˆã†ã«æˆåŠŸçŠ¶æ…‹ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ + +ã“ã®å‹•ä½œã¯æŒ¿å…¥ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’ã‚‚ãŸã‚‰ã—ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹éš›ã‚„ãƒãƒƒãƒã§æ„味ãŒã‚ã‚Šã¾ã™ãŒã€ã‚ªãƒ–ジェクトストレージã‹ã‚‰ã®`INSERT INTO SELECT`実行時ã«ã¯ä¸è¦ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã‚’無効ã«ã™ã‚‹ã“ã¨ã§ã€æ€§èƒ½ã‚’å‘上ã•ã›ã‚‹ã“ã¨ãŒç¤ºã•ã‚Œã¾ã™ï¼š + +```sql +INSERT INTO posts +SETTINGS parallel_distributed_insert_select = 2, min_insert_block_size_rows = 0, max_insert_threads = 4, min_insert_block_size_bytes = 2863311530, insert_deduplicate = 0 +SELECT * +FROM s3Cluster('default', 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/by_month/*.parquet') +SETTINGS parallel_distributed_insert_select = 2, min_insert_block_size_rows = 0, max_insert_threads = 4, min_insert_block_size_bytes = 2863311530, insert_deduplicate = 0 + +0 rows in set. Elapsed: 52.992 sec. Processed 59.82 million rows, 24.03 GB (1.13 million rows/s., 453.50 MB/s.) +Peak memory usage: 26.57 GiB. +``` + +### 挿入時ã®æœ€é©åŒ– + +ClickHouseã®`optimize_on_insert`設定ã¯ã€æŒ¿å…¥ãƒ—ロセス中ã«ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ãŒãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚有効ã«ã™ã‚‹ã¨ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯`optimize_on_insert = 1`)ã€å°ã•ã„パーツãŒæŒ¿å…¥æ™‚ã«ã‚ˆã‚Šå¤§ããªã‚‚ã®ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã€èª­ã¿è¾¼ã¿ãƒ‘フォーマンスãŒå‘上ã™ã‚‹å¤§ããªãƒ‘ï¼ãƒ„ã«ã¨ã‚Šã“ã¾ã‚Œã¾ã™ã€‚ãŸã ã—ã€ã“ã‚Œã«ä»˜éšã™ã‚‹æŒ¿å…¥ãƒ—ロセスã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“ã®è¨­å®šã‚’無効ã«ã™ã‚‹ã¨ï¼ˆ`optimize_on_insert = 0`)ã€æŒ¿å…¥æ™‚ã®ãƒžãƒ¼ã‚¸ã‚’スキップã™ã‚‹ã“ã¨ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚’æ›´ã«è¿…速ã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚特ã«é »ç¹ãªå°æŒ¿å…¥æ™‚ã«ã¯ã€ãƒžãƒ¼ã‚¸ãƒ—ロセスã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã«ã¦å¾Œå›žã—ã•ã‚Œã€ã‚ˆã‚Šé«˜ã„挿入性能ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ãŒã€ä¸€æ™‚çš„ã«å°ã•ã„パーツãŒå¢—加ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ãŒå®Œäº†ã™ã‚‹ã¾ã§ã¯ã‚¯ã‚¨ãƒªãŒé…ããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€æŒ¿å…¥æ€§èƒ½ãŒå„ªå…ˆäº‹é …ã§ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã®ãƒžãƒ¼ã‚¸ãƒ—ロセスãŒå¾Œã§åŠ¹çŽ‡çš„ã«æœ€é©åŒ–ã§ãã‚‹å ´åˆã«æœ€é©ãªè¨­å®šã§ã™ã€‚設定を無効ã«ã™ã‚‹ã“ã¨ã§æŒ¿å…¥ã‚¹ãƒ«ãƒ¼ãƒ—ットを改善ã§ãã‚‹ã“ã¨ãŒç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼š + +```sql +SELECT * +FROM s3Cluster('default', 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/by_month/*.parquet') +SETTINGS parallel_distributed_insert_select = 2, min_insert_block_size_rows = 0, max_insert_threads = 4, min_insert_block_size_bytes = 2863311530, insert_deduplicate = 0, optimize_on_insert = 0 + +0 rows in set. Elapsed: 49.688 sec. Processed 59.82 million rows, 24.03 GB (1.20 million rows/s., 483.66 MB/s.) +``` + +## ãã®ä»–ã®ãƒ¡ãƒ¢ + +* メモリãŒå°‘ãªã„シナリオã§ã¯ã€S3ã«æŒ¿å…¥ã™ã‚‹å ´åˆã€`max_insert_delayed_streams_for_parallel_write`を下ã’ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/data-visualization.md b/docs/ja/integrations/data-visualization.md new file mode 100644 index 00000000000..9345e593c6c --- /dev/null +++ b/docs/ja/integrations/data-visualization.md @@ -0,0 +1,60 @@ +--- +sidebar_label: æ¦‚è¦ +sidebar_position: 1 +keywords: [clickhouse, connect, explo, tableau, grafana, metabase, mitzu, superset, deepnote, draxlr, rocketbi, omni, bi, visualization, tool] +--- + +# ClickHouseã§ã®ãƒ‡ãƒ¼ã‚¿ã®å¯è¦–化 + +
+ +
+ +
+ +データãŒClickHouseã«å…¥ã‚Šã¾ã—ãŸã®ã§ã€æ¬¡ã¯ãƒ‡ãƒ¼ã‚¿ã‚’分æžã™ã‚‹æ™‚ã§ã™ã€‚ã“ã‚Œã«ã¯ã€BIツールを使ã£ã¦å¯è¦–化を構築ã™ã‚‹ã“ã¨ãŒã‚ˆãå«ã¾ã‚Œã¾ã™ã€‚多ãã®äººæ°—ã®ã‚ã‚‹BIãŠã‚ˆã³å¯è¦–化ツールã¯ã€ClickHouseã«æŽ¥ç¶šã—ã¾ã™ã€‚一部ã®ãƒ„ールã¯ClickHouseã«ãã®ã¾ã¾æŽ¥ç¶šå¯èƒ½ã§ã€ä»–ã®ãƒ„ールã¯ã‚³ãƒã‚¯ã‚¿ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãŒå¿…è¦ã§ã™ã€‚以下ã®ãƒ„ールã«é–¢ã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒã‚ã‚Šã¾ã™ï¼š + +- [Explo](./data-visualization/explo-and-clickhouse.md) +- [Grafana](./data-visualization/grafana/index.md) +- [Tableau](./data-visualization/tableau-and-clickhouse.md) +- [Looker](./data-visualization/looker-and-clickhouse.md) +- [Metabase](./data-visualization/metabase-and-clickhouse.md) +- [Mitzu](./data-visualization/mitzu-and-clickhouse.md) +- [Omni](./data-visualization/omni-and-clickhouse.md) +- [Superset](./data-visualization/superset-and-clickhouse.md) +- [Deepnote](./data-visualization/deepnote.md) +- [Draxlr](./data-visualization/draxlr-and-clickhouse.md) +- [Rocket BI](./data-visualization/rocketbi-and-clickhouse.md) +- [Rill](https://docs.rilldata.com/reference/olap-engines/clickhouse) +- [Zing Data](./data-visualization/zingdata-and-clickhouse.md) + +## ClickHouse Cloudã¨ãƒ‡ãƒ¼ã‚¿å¯è¦–化ツールã®äº’æ›æ€§ + +| ツール | サãƒãƒ¼ãƒˆ via | テスト済㿠| ドキュメントã‚ã‚Š | コメント | +|-------------------------------------------------------------------------|-------------------------------|--------|------------|-------------------------------------------------------------------------------------------------------------------------------------| +| [Apache Superset](./data-visualization/superset-and-clickhouse.md) | ClickHouseå…¬å¼ã‚³ãƒã‚¯ã‚¿ | ✅ | ✅ | | +| [AWS QuickSight](./data-visualization/quicksight-and-clickhouse.md) | MySQLインターフェース | ✅ | ✅ | 一部制é™ã‚ã‚Šã€è©³ç´°ã¯[ドキュメント](./data-visualization/quicksight-and-clickhouse.md)ã‚’ã”覧ãã ã•ã„ | +| [Deepnote](./data-visualization/deepnote.md) | ãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ | ✅ | ✅ | | +| [Explo](./data-visualization/explo-and-clickhouse.md) | ãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ | ✅ | ✅ | | +| [Grafana](./data-visualization/grafana/index.md) | ClickHouseå…¬å¼ã‚³ãƒã‚¯ã‚¿ | ✅ | ✅ | | +| [Hashboard](./data-visualization/hashboard-and-clickhouse.md) | ãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ | ✅ | ✅ | | +| [Looker](./data-visualization/looker-and-clickhouse.md) | ãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ | ✅ | ✅ | 一部制é™ã‚ã‚Šã€è©³ç´°ã¯[ドキュメント](./data-visualization/looker-and-clickhouse.md)ã‚’ã”覧ãã ã•ã„ | +| Looker | MySQLインターフェース | 🚧 | ⌠| | +| [Looker Studio](./data-visualization/looker-studio-and-clickhouse.md) | MySQLインターフェース | ✅ | ✅ | | +| [Metabase](./data-visualization/metabase-and-clickhouse.md) | ClickHouseå…¬å¼ã‚³ãƒã‚¯ã‚¿ | ✅ | ✅ | +| [Mitzu](./data-visualization/mitzu-and-clickhouse.md) | ãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ | ✅ | ✅ | | +| [Omni](./data-visualization/omni-and-clickhouse.md) | ãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ | ✅ | ✅ | | +| [Power BI Desktop](./data-visualization/powerbi-and-clickhouse.md) | ClickHouseå…¬å¼ã‚³ãƒã‚¯ã‚¿ | ✅ | ✅ | ODBC経由ã§ã€ç›´æŽ¥ã‚¯ã‚¨ãƒªãƒ¢ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆ | +| [Power BI service](https://clickhouse.com/docs/ja/integrations/powerbi#power-bi-service) | ClickHouseå…¬å¼ã‚³ãƒã‚¯ã‚¿ | ✅ | ✅ | [Microsoft Data Gateway](https://learn.microsoft.com/en-us/power-bi/connect-data/service-gateway-custom-connectors)ã®è¨­å®šãŒå¿…è¦ | +| [Rill](https://docs.rilldata.com/reference/olap-engines/clickhouse) | ãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ | ✅ | ✅ | +| [Rocket BI](./data-visualization/rocketbi-and-clickhouse.md) | ãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ | ✅ | ⌠| | +| [Tableau Desktop](./data-visualization/tableau-and-clickhouse.md) | ClickHouseå…¬å¼ã‚³ãƒã‚¯ã‚¿ | ✅ | ✅ | èªè¨¼ãƒ—ロセス中 | +| [Tableau Online](./data-visualization/tableau-online-and-clickhouse.md) | MySQLインターフェース | ✅ | ✅ | 一部制é™ã‚ã‚Šã€è©³ç´°ã¯[ドキュメント](./data-visualization/tableau-online-and-clickhouse.md)ã‚’ã”覧ãã ã•ã„ | +| [Zing Data](./data-visualization/zingdata-and-clickhouse.md) | ãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ | ✅ | ✅ | | diff --git a/docs/ja/integrations/data-visualization/_category_.yml b/docs/ja/integrations/data-visualization/_category_.yml new file mode 100644 index 00000000000..fd768d017a4 --- /dev/null +++ b/docs/ja/integrations/data-visualization/_category_.yml @@ -0,0 +1,8 @@ +position: 300 +label: 'Data visualization' +collapsible: true +collapsed: true +link: + type: generated-index + title: Data visualization + slug: /ja/integrations/data-visualization diff --git a/docs/ja/integrations/data-visualization/deepnote.md b/docs/ja/integrations/data-visualization/deepnote.md new file mode 100644 index 00000000000..f735bbd04df --- /dev/null +++ b/docs/ja/integrations/data-visualization/deepnote.md @@ -0,0 +1,41 @@ +--- +sidebar_label: Deepnote +sidebar_position: 11 +slug: /ja/integrations/deepnote +keywords: [clickhouse, Deepnote, connect, integrate, notebook] +description: éžå¸¸ã«å¤§ããªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’効率的ã«ã‚¯ã‚¨ãƒªã—ã€ä½¿ã„慣れãŸãƒŽãƒ¼ãƒˆãƒ–ック環境ã§åˆ†æžã¨ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã‚’è¡Œã†ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# ClickHouse ã‚’ Deepnote ã«æŽ¥ç¶šã™ã‚‹ + +Deepnote ã¯ã€ãƒãƒ¼ãƒ ãŒç™ºè¦‹ã‚„知見を共有ã™ã‚‹ãŸã‚ã«æ§‹ç¯‰ã•ã‚ŒãŸå”力型データノートブックã§ã™ã€‚Jupyter 互æ›ã§ã‚ã‚‹ã“ã¨ã«åŠ ãˆã¦ã€ã‚¯ãƒ©ã‚¦ãƒ‰ã§å‹•ä½œã—ã€ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚¨ãƒ³ã‚¹ãƒ—ロジェクトを効率的ã«é€²ã‚ã‚‹ãŸã‚ã®ä¸­å¤®é›†æ¨©çš„ãªå ´æ‰€ã‚’æä¾›ã—ã¾ã™ã€‚ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€ã™ã§ã« Deepnote アカウントãŒã‚ã‚Šã€ç¨¼åƒä¸­ã® ClickHouse インスタンスをãŠæŒã¡ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ + +## インタラクティブãªä¾‹ +Deepnote ã®ãƒ‡ãƒ¼ã‚¿ãƒŽãƒ¼ãƒˆãƒ–ックã‹ã‚‰ ClickHouse ã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªä¾‹ã‚’ãŠæŽ¢ã—ã®å ´åˆã¯ã€ä»¥ä¸‹ã®ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ã€[ClickHouse プレイグラウンド](../../getting-started/playground.md)ã«æŽ¥ç¶šã•ã‚ŒãŸãƒ†ãƒ³ãƒ—レートプロジェクトを起動ã—ã¦ãã ã•ã„。 + +[](https://deepnote.com/launch?template=ClickHouse%20and%20Deepnote) + +## ClickHouse ã«æŽ¥ç¶šã™ã‚‹ + +1. Deepnote ã§ã€ŒIntegrationsã€æ¦‚è¦ã‚’é¸æŠžã—ã€ClickHouse タイルをクリックã—ã¾ã™ã€‚ + +ClickHouse integration tile + +2. ClickHouse インスタンスã®æŽ¥ç¶šè©³ç´°ã‚’入力ã—ã¾ã™: + + + ClickHouse details dialog + + **_注æ„:_** ClickHouse ã¸ã®æŽ¥ç¶šãŒ IP アクセスリストã§ä¿è­·ã•ã‚Œã¦ã„ã‚‹å ´åˆã€Deepnote ã® IP アドレスを許å¯ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。詳細㯠[Deepnote ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://docs.deepnote.com/integrations/authorize-connections-from-deepnote-ip-addresses)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +3. ãŠã‚ã§ã¨ã†ã”ã–ã„ã¾ã™ï¼ã“れ㧠ClickHouse ㌠Deepnote ã«çµ±åˆã•ã‚Œã¾ã—ãŸã€‚ + +## ClickHouse çµ±åˆã®ä½¿ç”¨æ–¹æ³• + +1. ノートブックã®å³å´ã§ ClickHouse çµ±åˆã«æŽ¥ç¶šã‚’開始ã—ã¾ã™ã€‚ + + ClickHouse details dialog +2. 次ã«ã€æ–°ã—ã„ ClickHouse クエリブロックを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚クエリçµæžœã¯ãƒ‡ãƒ¼ã‚¿ãƒ•ãƒ¬ãƒ¼ãƒ ã¨ã—ã¦ä¿å­˜ã•ã‚Œã€SQL ブロックã§æŒ‡å®šã•ã‚ŒãŸå¤‰æ•°ã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚ +3. ã¾ãŸã€æ—¢å­˜ã® [SQL ブロック](https://docs.deepnote.com/features/sql-cells) ã‚’ ClickHouse ブロックã«å¤‰æ›ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ diff --git a/docs/ja/integrations/data-visualization/draxlr-and-clickhouse.md b/docs/ja/integrations/data-visualization/draxlr-and-clickhouse.md new file mode 100644 index 00000000000..e7f9fcc2c74 --- /dev/null +++ b/docs/ja/integrations/data-visualization/draxlr-and-clickhouse.md @@ -0,0 +1,86 @@ +--- +sidebar_label: Draxlr +sidebar_position: 131 +slug: /ja/integrations/draxlr +keywords: [clickhouse, draxlr, connect, integrate, ui] +description: Draxlrã¯ã€ãƒ‡ãƒ¼ã‚¿ã®è¦–覚化ã¨åˆ†æžã‚’å¯èƒ½ã«ã™ã‚‹ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ãƒ„ールã§ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Draxlrã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +Draxlrã¯ã€ClickHouseデータベースã¸ã®æŽ¥ç¶šã‚’ç›´æ„Ÿçš„ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã§æä¾›ã—ã€ãƒãƒ¼ãƒ ãŒæ•°åˆ†ã§æ´žå¯Ÿã‚’探索ã€è¦–覚化ã€å…¬é–‹ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€æˆåŠŸã—ãŸæŽ¥ç¶šã‚’確立ã™ã‚‹ãŸã‚ã®æ‰‹é †ã‚’順を追ã£ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +## 1. ClickHouseã®èªè¨¼æƒ…報をå–å¾—ã™ã‚‹ + + +## 2. Draxlrã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +1. ナビãƒãƒ¼ã§**Connect a Database**ボタンをクリックã—ã¾ã™ã€‚ + +2. 利用å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒªã‚¹ãƒˆã‹ã‚‰**ClickHouse**ã‚’é¸æŠžã—ã€æ¬¡ã¸ã‚’クリックã—ã¾ã™ã€‚ + +3. ホスティングサービスã®ã„ãšã‚Œã‹ã‚’é¸ã³ã€æ¬¡ã¸ã‚’クリックã—ã¾ã™ã€‚ + +4. **Connection Name**フィールドã«ä»»æ„ã®åå‰ã‚’使用ã—ã¾ã™ã€‚ + +5. フォームã«æŽ¥ç¶šè©³ç´°ã‚’追加ã—ã¾ã™ã€‚ + + Connection Form + +6. **Next**ボタンをクリックã—ã€æŽ¥ç¶šãŒç¢ºç«‹ã•ã‚Œã‚‹ã¾ã§å¾…ã¡ã¾ã™ã€‚接続ãŒæˆåŠŸã™ã‚‹ã¨ãƒ†ãƒ¼ãƒ–ルページãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +## 3. データを探索ã™ã‚‹ + +1. リスト内ã®ã„ãšã‚Œã‹ã®ãƒ†ãƒ¼ãƒ–ルをクリックã—ã¾ã™ã€‚ + +2. テーブル内ã®ãƒ‡ãƒ¼ã‚¿ã‚’表示ã™ã‚‹ãŸã‚ã®æŽ¢ç´¢ãƒšãƒ¼ã‚¸ã«ç§»å‹•ã—ã¾ã™ã€‚ + +3. フィルターã®è¿½åŠ ã€çµåˆã€ä¸¦ã¹æ›¿ãˆã‚’開始ã§ãã¾ã™ã€‚ + + Connection Form + +4. **Graph**ボタンを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’視覚化ã™ã‚‹ã‚°ãƒ©ãƒ•ã‚¿ã‚¤ãƒ—ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + Connection Form + + +## 4. SQLクエリã®ä½¿ç”¨ + +1. ナビãƒãƒ¼ã§Exploreボタンをクリックã—ã¾ã™ã€‚ + +2. **Raw Query**ボタンをクリックã—ã€ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒªã‚¢ã«ã‚¯ã‚¨ãƒªã‚’入力ã—ã¾ã™ã€‚ + + Connection Form + +3. **Execute Query**ボタンをクリックã—ã¦çµæžœã‚’確èªã—ã¾ã™ã€‚ + + +## 5. クエリã®ä¿å­˜ + +1. クエリを実行ã—ãŸå¾Œã€**Save Query**ボタンをクリックã—ã¾ã™ã€‚ + + Connection Form + +2. **Query Name**テキストボックスã«ã‚¯ã‚¨ãƒªã®åå‰ã‚’付ã‘ã€ã‚«ãƒ†ã‚´ãƒªåˆ†ã‘ã®ãŸã‚フォルダをé¸æŠžã§ãã¾ã™ã€‚ + +3. **Add to dashboard**オプションを使用ã—ã¦ã€çµæžœã‚’ダッシュボードã«è¿½åŠ ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +4. **Save**ボタンをクリックã—ã¦ã‚¯ã‚¨ãƒªã‚’ä¿å­˜ã—ã¾ã™ã€‚ + + +## 6. ダッシュボードã®æ§‹ç¯‰ + +1. ナビãƒãƒ¼ã§**Dashboards**ボタンをクリックã—ã¾ã™ã€‚ + + Connection Form + +2. 左サイドãƒãƒ¼ã®**Add +**ボタンをクリックã—ã¦æ–°ã—ã„ダッシュボードを追加ã§ãã¾ã™ã€‚ + +3. æ–°ã—ã„ウィジェットを追加ã™ã‚‹ã«ã¯ã€å³ä¸Šã®**Add**ボタンをクリックã—ã¾ã™ã€‚ + +4. ä¿å­˜ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã®ãƒªã‚¹ãƒˆã‹ã‚‰ã‚¯ã‚¨ãƒªã‚’é¸æŠžã—ã€è¦–覚化タイプをé¸ã‚“ã§**Add Dashboard Item**ボタンをクリックã—ã¾ã™ã€‚ + + +## 詳細を学㶠+Draxlrã«ã¤ã„ã¦ã‚‚ã£ã¨çŸ¥ã‚‹ãŸã‚ã«ã¯ã€[Draxlrドキュメンテーション](https://draxlr.notion.site/draxlr/Draxlr-Docs-d228b23383f64d00a70836ff9643a928)サイトを訪れã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/data-visualization/embeddable-and-clickhouse.md b/docs/ja/integrations/data-visualization/embeddable-and-clickhouse.md new file mode 100644 index 00000000000..b6e82a0fca9 --- /dev/null +++ b/docs/ja/integrations/data-visualization/embeddable-and-clickhouse.md @@ -0,0 +1,66 @@ +--- +sidebar_label: Embeddable +slug: /ja/integrations/embeddable +keywords: [clickhouse, embeddable, connect, integrate, ui] +description: Embeddableã¯ã€è¿…速ã§ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªå®Œå…¨ã‚«ã‚¹ã‚¿ãƒ åˆ†æžä½“験をアプリã«ç›´æŽ¥çµ±åˆã™ã‚‹ãŸã‚ã®é–‹ç™ºè€…å‘ã‘ツールキットã§ã™ã€‚ +--- + +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Embeddable 㨠ClickHouse ã®æŽ¥ç¶š + +[Embeddable](https://embeddable.com/) ã§ã¯ã€ã‚³ãƒ¼ãƒ‰å†…㧠[データモデル](https://trevorio.notion.site/Data-modeling-35637bbbc01046a1bc47715456bfa1d8) 㨠[コンãƒãƒ¼ãƒãƒ³ãƒˆ](https://trevorio.notion.site/Using-components-761f52ac2d0743b488371088a1024e49) を定義ã—(コードリãƒã‚¸ãƒˆãƒªã«ä¿å­˜ï¼‰ã€**SDK** を使用ã—ã¦ã“れらを強力ãªEmbeddableã®**コードä¸è¦ãƒ“ルダー**ã§åˆ©ç”¨ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +ã“ã®çµæžœã€è£½å“ãƒãƒ¼ãƒ ãŒãƒ‡ã‚¶ã‚¤ãƒ³ã—ã€ã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ãƒªãƒ³ã‚°ãƒãƒ¼ãƒ ãŒæ§‹ç¯‰ã—ã€é¡§å®¢å¯¾å¿œãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ãƒãƒ¼ãƒ ãŒç¶­æŒã™ã‚‹ã€è¿…速ã§ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªé¡§å®¢å‘ã‘ã®åˆ†æžã‚’製å“内ã«ç›´æŽ¥æä¾›ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ã“ã‚ŒãŒç†æƒ³çš„ãªå½¢ã§ã™ã€‚ + +組ã¿è¾¼ã¿ã®è¡Œãƒ¬ãƒ™ãƒ«ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã«ã‚ˆã‚Šã€å„ユーザーã¯è¨±å¯ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚ã¾ãŸã€å®Œå…¨ã«æ§‹æˆå¯èƒ½ãª2層ã®ã‚­ãƒ£ãƒƒã‚·ãƒ³ã‚°ã«ã‚ˆã‚Šã€ã‚¹ã‚±ãƒ¼ãƒ«ã«å¿œã˜ãŸè¿…速ãªãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ åˆ†æžã‚’æä¾›ã§ãã¾ã™ã€‚ + +## 1. 接続情報をåŽé›†ã™ã‚‹ + + +## 2. ClickHouse接続タイプを作æˆã™ã‚‹ + +データベース接続ã¯ã€Embeddable APIを使用ã—ã¦è¿½åŠ ã—ã¾ã™ã€‚ã“ã®æŽ¥ç¶šã¯ã€ClickHouseサービスã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚次ã®API呼ã³å‡ºã—を使用ã—ã¦æŽ¥ç¶šã‚’追加ã§ãã¾ã™ï¼š + +```javascript +// セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€ã“ã‚Œã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã‹ã‚‰*一切*呼ã³å‡ºã—ã¦ã¯ã„ã‘ã¾ã›ã‚“ +fetch('https://api.embeddable.com/api/v1/connections', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: `Bearer ${apiKey}` /* APIキーを安全ã«ä¿æŒã—ã¦ãã ã•ã„ */, + }, + body: JSON.stringify({ + name: 'my-clickhouse-db', + type: 'clickhouse', + credentials: { + host: 'my.clickhouse.host', + user: 'clickhouse_user', + port: 8443, + password: '*****', + }, + }), +}); + + +Response: +Status 201 { errorMessage: null } +``` + +上記㯠`CREATE` アクションを示ã—ã¦ã„ã¾ã™ãŒã€ã™ã¹ã¦ã® `CRUD` æ“作ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +`apiKey` ã¯ã€Embeddable ダッシュボードã®1ã¤ã§ã€Œ**Publish**ã€ã‚’クリックã—ã¦è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`name` ã¯ã€ã“ã®æŽ¥ç¶šã‚’識別ã™ã‚‹ãŸã‚ã®ä¸€æ„ã®åå‰ã§ã™ã€‚ +- デフォルトã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã¯ã€Œdefaultã€ã¨å‘¼ã°ã‚Œã‚‹æŽ¥ç¶šã‚’探ã—ã¾ã™ãŒã€ç•°ãªã‚‹ `data_source` åをモデルã«ä¾›çµ¦ã™ã‚‹ã“ã¨ã§ã€ç•°ãªã‚‹æŽ¥ç¶šã«ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã‚’接続ã§ãã¾ã™ï¼ˆå˜ã«ãƒ¢ãƒ‡ãƒ«å†…ã§data_sourceåを指定ã—ã¦ãã ã•ã„)。 + +`type` ã¯ã€EmbeddableãŒä½¿ç”¨ã™ã‚‹ãƒ‰ãƒ©ã‚¤ãƒãƒ¼ã‚’指定ã—ã¾ã™ã€‚ + +- ã“ã“ã§ã¯ `clickhouse` を使用ã—ã¾ã™ãŒã€1ã¤ã®Embeddable ワークスペースã«è¤‡æ•°ã®ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ï¼ˆä¾‹ï¼š `postgres`, `bigquery`, `mongodb` ãªã©ï¼‰ã‚’接続ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`credentials` ã¯ã€ãƒ‰ãƒ©ã‚¤ãƒãƒ¼ãŒæœŸå¾…ã™ã‚‹å¿…è¦ãªèªè¨¼æƒ…報をå«ã‚€JavaScriptオブジェクトã§ã™ã€‚ +- ã“れらã¯å®‰å…¨ã«æš—å·åŒ–ã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã§è¨˜è¿°ã—ãŸã¨ãŠã‚Šã®ãƒ‡ãƒ¼ã‚¿ã ã‘ãŒå–å¾—ã•ã‚Œã¾ã™ã€‚ +Embeddableã¯ã€å„接続ã«å¯¾ã—ã¦èª­ã¿å–り専用ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã™ã‚‹ã“ã¨ã‚’å¼·ã推奨ã—ã¦ã„ã¾ã™ï¼ˆEmbeddableã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰èª­ã¿å–ã‚‹ã ã‘ã§ã€æ›¸ãè¾¼ã¿ã¯è¡Œã„ã¾ã›ã‚“)。 + +本番ã€QAã€ãƒ†ã‚¹ãƒˆãªã©ã®ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã‚’サãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚(ã¾ãŸã¯ç•°ãªã‚‹é¡§å®¢ã®ãŸã‚ã«ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ï¼‰ã€å„接続を環境ã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆ[Environments API](https://www.notion.so/Environments-API-497169036b5148b38f7936aa75e62949?pvs=21)ã‚’å‚照)。 diff --git a/docs/ja/integrations/data-visualization/explo-and-clickhouse.md b/docs/ja/integrations/data-visualization/explo-and-clickhouse.md new file mode 100644 index 00000000000..ed2320bfd67 --- /dev/null +++ b/docs/ja/integrations/data-visualization/explo-and-clickhouse.md @@ -0,0 +1,113 @@ +--- +sidebar_label: Explo +sidebar_position: 131 +slug: /ja/integrations/explo +keywords: [clickhouse, Explo, connect, integrate, ui] +description: Exploã¯ãƒ‡ãƒ¼ã‚¿ã«é–¢ã™ã‚‹è³ªå•ã‚’å•ã†ãŸã‚ã®ä½¿ã„ã‚„ã™ã„オープンソースã®UIツールã§ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Exploã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +ã‚らゆるプラットフォームå‘ã‘ã®é¡§å®¢å‘ã‘分æžã€‚美ã—ã„視覚化ã®ãŸã‚ã«è¨­è¨ˆã•ã‚Œã€ç°¡ç´ ã•ã‚’求ã‚ã¦æ§‹ç¯‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## 目的 + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ClickHouseã‹ã‚‰Exploã«ãƒ‡ãƒ¼ã‚¿ã‚’接続ã—ã€çµæžœã‚’視覚化ã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚ãƒãƒ£ãƒ¼ãƒˆã¯ä»¥ä¸‹ã®ã‚ˆã†ã«è¡¨ç¤ºã•ã‚Œã¾ã™: +Explo Dashboard + +

+ +:::tip データを追加 +作業ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒãªã„å ´åˆã€ä¾‹ã‚’追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯[UK Price Paid](/docs/ja/getting-started/example-datasets/uk-price-paid.md)データセットを使用ã—ã¦ã„ã‚‹ã®ã§ã€ãれをé¸ã¶ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚åŒã˜ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚«ãƒ†ã‚´ãƒªã«ä»–ã®ä¾‹ã‚‚ã„ãã¤ã‹ã‚ã‚Šã¾ã™ã€‚ +::: + +## 1. 接続ã«å¿…è¦ãªè©³ç´°ã‚’集ã‚ã¾ã™ + + +## 2. Exploã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +1. Exploアカウントã«ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã—ã¾ã™ã€‚ + +2. å·¦å´ã®ã‚µã‚¤ãƒ‰ãƒãƒ¼ã§Exploã®**データ**タブをクリックã—ã¾ã™ã€‚ + +Data Tab + +3. å³ä¸Šã®**データソースを接続**をクリックã—ã¾ã™ã€‚ + +Connect Data Source + +4. **ã¯ã˜ã‚ã«**ページã®æƒ…報を入力ã—ã¾ã™ã€‚ + +Getting Started + +5. **Clickhouse**ã‚’é¸æŠžã—ã¾ã™ã€‚ + +Clickhouse + +6. **Clickhouseã®è³‡æ ¼æƒ…å ±**を入力ã—ã¾ã™ã€‚ + +Credentials + +7. **セキュリティ**を設定ã—ã¾ã™ã€‚ + +Security + +8. Clickhouse内ã§ã€**Exploã®IPをホワイトリストã«è¿½åŠ **ã—ã¾ã™ã€‚ +` +54.211.43.19, 52.55.98.121, 3.214.169.94, and 54.156.141.148 +` + +## 3. ダッシュボードを作æˆã™ã‚‹ + +1. å·¦å´ã®ãƒŠãƒ“ゲーションãƒãƒ¼ã§**ダッシュボード**タブã«ç§»å‹•ã—ã¾ã™ã€‚ + +Dashboard + +2. å³ä¸Šã®**ダッシュボードを作æˆ**をクリックã—ã€ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã«åå‰ã‚’付ã‘ã¾ã™ã€‚ã“ã‚Œã§ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ãŒä½œæˆã•ã‚Œã¾ã—ãŸï¼ + +Create Dashboard + +3. 次ã®ã‚ˆã†ãªç”»é¢ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + +Explo Dashboard + +## 4. SQLクエリを実行ã™ã‚‹ + +1. スキーマタイトルã®ä¸‹ã«ã‚ã‚‹å³å´ã®ã‚µã‚¤ãƒ‰ãƒãƒ¼ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルåã‚’å–å¾—ã—ã¾ã™ã€‚ãã‚Œã‹ã‚‰ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’データセットエディタã«å…¥åŠ›ã—ã¾ã™ï¼š +` +SELECT * FROM YOUR_TABLE_NAME +LIMIT 100 +` + +Explo Dashboard + +2. 実行をクリックã—ã€ãƒ—レビュータブã«ç§»å‹•ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’確èªã—ã¾ã™ã€‚ + +Explo Dashboard + +## 5. ãƒãƒ£ãƒ¼ãƒˆã‚’作æˆã™ã‚‹ + +1. å·¦å´ã‹ã‚‰ãƒãƒ¼ãƒãƒ£ãƒ¼ãƒˆã®ã‚¢ã‚¤ã‚³ãƒ³ã‚’ドラッグã—ã¦ç”»é¢ã«é…ç½®ã—ã¾ã™ã€‚ + +Explo Dashboard + +2. データセットをé¸æŠžã—ã¾ã™ã€‚次ã®ã‚ˆã†ãªç”»é¢ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + +Explo Dashboard + +3. **county**ã‚’X軸ã«ã€**Price**ã‚’Y軸ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«å…¥åŠ›ã—ã¾ã™ï¼š + +Explo Dashboard + +4. 集約を**AVG**ã«å¤‰æ›´ã—ã¾ã™ã€‚ + +Explo Dashboard + +5. ã“ã‚Œã§ä¾¡æ ¼ã”ã¨ã«åˆ†é¡žã•ã‚ŒãŸä½å®…ã®å¹³å‡ä¾¡æ ¼ãŒè¡¨ç¤ºã•ã‚Œã¾ã—ãŸï¼ + +Explo Dashboard + +## 詳細を学㶠+ +Exploやダッシュボードã®ä½œæˆã«ã¤ã„ã¦è©³ã—ãã¯ã€Exploã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/data-visualization/grafana/config.md b/docs/ja/integrations/data-visualization/grafana/config.md new file mode 100644 index 00000000000..724d81bf141 --- /dev/null +++ b/docs/ja/integrations/data-visualization/grafana/config.md @@ -0,0 +1,303 @@ +--- +sidebar_label: プラグイン設定 +sidebar_position: 3 +slug: /ja/integrations/grafana/config +description: Grafanaã«ãŠã‘ã‚‹ClickHouseデータソースプラグインã®è¨­å®šã‚ªãƒ—ション +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_native.md'; + +# Grafanaã§ã®ClickHouseデータソースã®è¨­å®š + +設定を変更ã™ã‚‹æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯ã€Grafanaã®UIã§ãƒ—ラグイン設定ページをæ“作ã™ã‚‹ã“ã¨ã§ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¯[YAMLファイルã§ãƒ—ロビジョニング](https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources)ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€ClickHouseプラグインã®è¨­å®šã§åˆ©ç”¨å¯èƒ½ãªã‚ªãƒ—ションã®ä¸€è¦§ã¨ã€YAMLを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’プロビジョニングã™ã‚‹äººå‘ã‘ã®è¨­å®šã‚¹ãƒ‹ãƒšãƒƒãƒˆã‚’紹介ã—ã¾ã™ã€‚ + +å…¨ã¦ã®ã‚ªãƒ—ションã®æ¦‚è¦ã«ã¤ã„ã¦ã¯ã€è¨­å®šã‚ªãƒ—ションã®å®Œå…¨ãªãƒªã‚¹ãƒˆã‚’[ã“ã¡ã‚‰](#all-yaml-options)ã«ã¦ç¢ºèªã§ãã¾ã™ã€‚ + +## 共通設定 + +設定画é¢ã®ä¾‹ï¼š +Secure native config ã®ä¾‹ + +共通設定ã®ãŸã‚ã®YAML設定例: +```yaml +jsonData: + host: 127.0.0.1 # (å¿…é ˆ) サーãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ + port: 9000 # (å¿…é ˆ) サーãƒãƒ¼ãƒãƒ¼ãƒˆã€‚nativeã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§9440(セキュア)ãŠã‚ˆã³9000(インセキュア)。HTTPã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§8443(セキュア)ãŠã‚ˆã³8123(インセキュア)。 + + protocol: native # (å¿…é ˆ) 接続ã«ä½¿ã†ãƒ—ロトコル。"native" ã¾ãŸã¯ "http" ã«è¨­å®šå¯èƒ½ã€‚ + secure: false # 接続ãŒã‚»ã‚­ãƒ¥ã‚¢ãªå ´åˆã¯ true ã«è¨­å®šã€‚ + + username: default # èªè¨¼ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼å。 + + tlsSkipVerify: # true ã«è¨­å®šã™ã‚‹ã¨TLS検証をスキップã—ã¾ã™ã€‚ + tlsAuth: # TLSクライアントèªè¨¼ã‚’有効ã«ã™ã‚‹ã«ã¯trueã«è¨­å®šã€‚ + tlsAuthWithCACert: # CA証明書ãŒæä¾›ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯trueã«è¨­å®šã€‚自己署åã®TLS証明書を検証ã™ã‚‹ãŸã‚ã«å¿…è¦ã€‚ + +secureJsonData: + password: secureExamplePassword # èªè¨¼ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‘スワード。 + + tlsCACert: # TLS CA 証明書 + tlsClientCert: # TLS クライアント証明書 + tlsClientKey: # TLS クライアントキー +``` + +UIã‹ã‚‰è¨­å®šã‚’ä¿å­˜ã—ãŸéš›ã«ã¯ã€`version` プロパティãŒè¿½åŠ ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€è¨­å®šãŒä¿å­˜ã•ã‚ŒãŸãƒ—ラグインã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’示ã—ã¾ã™ã€‚ + +### HTTPプロトコル + +HTTPプロトコルを介ã—ã¦æŽ¥ç¶šã™ã‚‹å ´åˆã¯ã€è¨­å®šãŒè¿½åŠ ã§è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +追加ã®HTTP設定オプション + +#### HTTPパス + +HTTPサーãƒãƒ¼ãŒç•°ãªã‚‹URLパスã§å…¬é–‹ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã“ã«ãã®ãƒ‘スを追加ã§ãã¾ã™ã€‚ + +```yaml +jsonData: + # 最åˆã®ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’除ã„ãŸå½¢å¼ + path: additional/path/example +``` + +#### カスタムHTTPヘッダー + +サーãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚«ã‚¹ã‚¿ãƒ ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’追加ã§ãã¾ã™ã€‚ + +ヘッダーã¯ãƒ—レーンテキストã¾ãŸã¯ã‚»ã‚­ãƒ¥ã‚¢å€¤ã®ã„ãšã‚Œã‹ã§ã™ã€‚ +ã™ã¹ã¦ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚­ãƒ¼ã¯ãƒ—レーンテキストã§ä¿å­˜ã•ã‚Œã€ã‚»ã‚­ãƒ¥ã‚¢ãƒ˜ãƒƒãƒ€ãƒ¼å€¤ã¯(`password`フィールドã¨åŒæ§˜ã«)セキュア設定ã§ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +:::warning HTTP上ã®ã‚»ã‚­ãƒ¥ã‚¢å€¤ +セキュアヘッダー値ã¯ã€è¨­å®šã§ã‚»ã‚­ãƒ¥ã‚¢ã«ä¿å­˜ã•ã‚Œã¾ã™ãŒã€æŽ¥ç¶šãŒã‚»ã‚­ãƒ¥ã‚¢ã§ã¯ãªã„å ´åˆã§ã‚‚HTTPã§é€ä¿¡ã•ã‚Œã¾ã™ã€‚ +::: + +プレーン/セキュアヘッダーã®YAML例: +```yaml +jsonData: + httpHeaders: + - name: X-Example-Plain-Header + value: plain text value + secure: false + - name: X-Example-Secure-Header + # "value" ã¯é™¤å¤– + secure: true +secureJsonData: + secureHttpHeaders.X-Example-Secure-Header: secure header value +``` + +## 追加設定 + +ã“れらã®è¿½åŠ è¨­å®šã¯ã‚ªãƒ—ションã§ã™ã€‚ + +追加設定ã®ä¾‹ + +YAML例: +```yaml +jsonData: + defaultDatabase: default # クエリビルダーã§ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚デフォルト㯠"default"。 + defaultTable: # クエリビルダーã§ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ†ãƒ¼ãƒ–ル。 + + dialTimeout: 10 # サーãƒãƒ¼ã¸ã®æŽ¥ç¶šæ™‚ã®ãƒ€ã‚¤ã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’)。デフォルト㯠"10"。 + queryTimeout: 60 # クエリ実行時ã®ã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’)。デフォルトã¯60。ユーザーã«å¯¾ã™ã‚‹æ¨©é™ãŒå¿…è¦ã§ã™ã€‚権é™ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å ´åˆã¯ã€"0" ã«è¨­å®šã—ã¦ç„¡åŠ¹åŒ–を試ã¿ã¦ãã ã•ã„。 + validateSql: false # true ã«è¨­å®šã™ã‚‹ã¨ã€SQLエディタã§SQLを検証ã—ã¾ã™ã€‚ +``` + +### OpenTelemetry + +OpenTelemetry (OTel) ã¯ãƒ—ラグイン内ã«æ·±ãçµ±åˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +OpenTelemetryデータã¯ã€[エクスãƒãƒ¼ã‚¿ãƒ¼ãƒ—ラグイン](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/clickhouseexporter)を使用ã—ã¦ClickHouseã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã§ãã¾ã™ã€‚ +最善ã®åˆ©ç”¨ã®ãŸã‚ã«ã¯ã€[ログ](#logs)ã¨[トレース](#traces)ã®ä¸¡æ–¹ã®ãŸã‚ã«OTelを設定ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¦ã„ã¾ã™ã€‚ + +[データリンク](./query-builder.md#data-links) を有効ã«ã™ã‚‹ã«ã¯ã€ã“れらã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚’設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯å¼·åŠ›ãªå¯è¦³æ¸¬æ€§ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +### ログ + +[ログã®ã‚¯ã‚¨ãƒªæ§‹ç¯‰](./query-builder.md#logs)を高速化ã™ã‚‹ãŸã‚ã«ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹/テーブルã¨ã€ãƒ­ã‚°ã‚¯ã‚¨ãƒªç”¨ã®ã‚«ãƒ©ãƒ ã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªãƒ“ルダーã§å®Ÿè¡Œå¯èƒ½ãªãƒ­ã‚°ã‚¯ã‚¨ãƒªãŒäº‹å‰ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã€è¦³å¯Ÿãƒšãƒ¼ã‚¸ã§ã®ãƒ–ラウジングãŒé«˜é€ŸåŒ–ã•ã‚Œã¾ã™ã€‚ + +OpenTelemetryを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€ã€Œ**Use OTel**ã€ã‚¹ã‚¤ãƒƒãƒã‚’有効ã«ã—ã€**デフォルトログテーブル**ã‚’`otel_logs`ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã‚Œã«ã‚ˆã‚Šã€é¸æŠžã—ãŸOTelスキーマãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã™ã‚‹ãŸã‚ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚«ãƒ©ãƒ ãŒè‡ªå‹•çš„ã«ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +OpenTelemetryã¯ãƒ­ã‚°ã«ã¯å¿…é ˆã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€å˜ä¸€ã®ãƒ­ã‚°/トレースデータセットを使用ã™ã‚‹ã¨ã€[データリンク](./query-builder.md#data-links)ã«ã‚ˆã‚‹ã‚¹ãƒ ãƒ¼ã‚ºãªå¯è¦³æ¸¬æ€§ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã‚’促進ã—ã¾ã™ã€‚ + +ログ設定画é¢ã®ä¾‹ï¼š +ログ設定 + +ログ設定ã®YAML例: +```yaml +jsonData: + logs: + defaultDatabase: default # デフォルトã®ãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚ + defaultTable: otel_logs # デフォルトã®ãƒ­ã‚°ãƒ†ãƒ¼ãƒ–ル。OTelを使用ã—ã¦ã„ã‚‹å ´åˆã€ã“れ㯠"otel_logs" ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + + otelEnabled: false # OTelãŒæœ‰åŠ¹ã§ã‚ã‚‹å ´åˆã«trueã«è¨­å®šã€‚ + otelVersion: latest # 使用ã•ã‚Œã‚‹otelコレクタースキーマãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯UIã§è¡¨ç¤ºã•ã‚Œã¾ã™ãŒã€"latest"ã¯ãƒ—ラグイン内ã§ä½¿ç”¨å¯èƒ½ãªæœ€æ–°ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¾ã™ã€‚ + + # æ–°ã—ã„ログクエリを開ãéš›ã«é¸æŠžã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚«ãƒ©ãƒ ã€‚OTelãŒæœ‰åŠ¹ã§ã‚ã‚‹å ´åˆã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + timeColumn: # ログã®ä¸»ãªæ™‚間カラム。 + logLevelColumn: # ログã®ãƒ¬ãƒ™ãƒ«/シビリティ。値ã¯é€šå¸¸ "INFO"ã€"error"ã€ã¾ãŸã¯ "Debug" ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + logMessageColumn: # ログã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸/コンテンツ。 +``` + +### トレース + +[トレースã®ã‚¯ã‚¨ãƒªæ§‹ç¯‰](./query-builder.md#traces)を高速化ã™ã‚‹ãŸã‚ã«ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹/テーブルã¨ã€ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¯ã‚¨ãƒªç”¨ã®ã‚«ãƒ©ãƒ ã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªãƒ“ルダーã§å®Ÿè¡Œå¯èƒ½ãªãƒˆãƒ¬ãƒ¼ã‚¹æ¤œç´¢ã‚¯ã‚¨ãƒªãŒäº‹å‰ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã€è¦³å¯Ÿãƒšãƒ¼ã‚¸ã§ã®ãƒ–ラウジングãŒé«˜é€ŸåŒ–ã•ã‚Œã¾ã™ã€‚ + +OpenTelemetryを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€ã€Œ**Use OTel**ã€ã‚¹ã‚¤ãƒƒãƒã‚’有効ã«ã—ã€**デフォルトトレーステーブル**ã‚’`otel_traces`ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã‚Œã«ã‚ˆã‚Šã€é¸æŠžã—ãŸOTelスキーマãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã™ã‚‹ãŸã‚ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚«ãƒ©ãƒ ãŒè‡ªå‹•çš„ã«ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã•ã‚Œã¾ã™ã€‚ +OpenTelemetryã¯å¿…é ˆã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€ã“ã®æ©Ÿèƒ½ã¯ãƒˆãƒ¬ãƒ¼ã‚¹ã«ãã®ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã™ã‚‹ã®ãŒæœ€é©ã§ã™ã€‚ + +トレース設定画é¢ã®ä¾‹ï¼š +トレース設定 + +トレース設定ã®YAML例: +```yaml +jsonData: + traces: + defaultDatabase: default # デフォルトã®ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚ + defaultTable: otel_traces # デフォルトã®ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ル。OTelを使用ã—ã¦ã„ã‚‹å ´åˆã€ã“れ㯠"otel_traces" ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + + otelEnabled: false # OTelãŒæœ‰åŠ¹ã§ã‚ã‚‹å ´åˆã«trueã«è¨­å®šã€‚ + otelVersion: latest # 使用ã•ã‚Œã‚‹otelコレクタースキーマãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯UIã§è¡¨ç¤ºã•ã‚Œã¾ã™ãŒã€"latest"ã¯ãƒ—ラグイン内ã§ä½¿ç”¨å¯èƒ½ãªæœ€æ–°ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¾ã™ã€‚ + + # æ–°ã—ã„トレースクエリを開ãã¨ãã«é¸æŠžã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚«ãƒ©ãƒ ã€‚OTelãŒæœ‰åŠ¹ã®å ´åˆã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + traceIdColumn: # トレースIDカラム。 + spanIdColumn: # スパンIDカラム。 + operationNameColumn: # オペレーションåカラム。 + parentSpanIdColumn: # 親スパンIDカラム。 + serviceNameColumn: # サービスåカラム。 + durationTimeColumn: # 継続時間カラム。 + durationUnitColumn:

+ +
+ +## 1. 接続情報を集ã‚ã‚‹ + + +## 2. 読ã¿å–り専用ユーザーã®ä½œæˆ + +ClickHouse ã‚’ Grafana ã®ã‚ˆã†ãªãƒ‡ãƒ¼ã‚¿å¯è¦–化ツールã«æŽ¥ç¶šã™ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãŒä¸é©åˆ‡ã«å¤‰æ›´ã•ã‚Œãªã„よã†ã«èª­ã¿å–り専用ユーザーを作æˆã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +Grafana ã¯ã‚¯ã‚¨ãƒªãŒå®‰å…¨ã§ã‚ã‚‹ã‹ã‚’検証ã—ã¾ã›ã‚“。クエリã«ã¯ `DELETE` ã‚„ `INSERT` ã‚’å«ã‚€ä»»æ„ã® SQL ステートメントをå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +読ã¿å–り専用ユーザーを設定ã™ã‚‹ã«ã¯ã€æ¬¡ã®æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„: +1. [ClickHouse ã§ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ãƒ­ãƒ¼ãƒ«ã®ä½œæˆ](/docs/ja/operations/access-rights)ガイドã«å¾“ã£ã¦ `readonly` ユーザープロファイルを作æˆã—ã¾ã™ã€‚ +2. 基盤ã¨ãªã‚‹ [clickhouse-go クライアント](https://github.com/ClickHouse/clickhouse-go) ã«å¿…è¦ãª `max_execution_time` 設定を変更ã™ã‚‹ãŸã‚ã®å分ãªæ¨©é™ãŒ `readonly` ユーザーã«ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +3. 公共㮠ClickHouse インスタンスを使用ã—ã¦ã„ã‚‹å ´åˆã€`readonly` プロファイル㧠`readonly=2` を設定ã™ã‚‹ã“ã¨ã¯ãŠå‹§ã‚ã—ã¾ã›ã‚“。代ã‚ã‚Šã«ã€`readonly=1` ã®ã¾ã¾ã«ã—ã€ã“ã®è¨­å®šã®å¤‰æ›´ã‚’許å¯ã™ã‚‹ãŸã‚ã« `max_execution_time` ã®åˆ¶ç´„タイプを [changeable_in_readonly](/docs/ja/operations/settings/constraints-on-settings) ã«è¨­å®šã—ã¾ã™ã€‚ + +## 3. Grafana 用 ClickHouse プラグインをインストールã™ã‚‹ + +Grafana ㌠ClickHouse ã¸æŽ¥ç¶šã§ãるよã†ã«ã™ã‚‹å‰ã«ã€é©åˆ‡ãª Grafana プラグインをインストールã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚Grafana ã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ã„ã‚‹ã“ã¨ã‚’å‰æã«ã€æ¬¡ã®æ‰‹é †ã«å¾“ã„ã¾ã™ï¼š + +1. サイドãƒãƒ¼ã® **Connections** ページã‹ã‚‰ã€**Add new connection** タブをé¸æŠžã—ã¾ã™ã€‚ + +2. **ClickHouse** を検索ã—ã€Grafana Labs ã®ç½²åã•ã‚ŒãŸãƒ—ラグインをクリックã—ã¾ã™ï¼š + + Connections ページ㧠ClickHouse プラグインをé¸æŠž + +3. 次ã®ç”»é¢ã§ã€**Install** ボタンをクリックã—ã¾ã™ï¼š + + ClickHouse プラグインをインストール + +## 4. ClickHouse データソースを定義ã™ã‚‹ + +1. インストールãŒå®Œäº†ã—ãŸã‚‰ã€**Add new data source** ボタンをクリックã—ã¾ã™ã€‚(**Data sources** タブã‹ã‚‰ã‚‚データソースを追加ã§ãã¾ã™ã€‚) + + ClickHouse ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’ä½œæˆ + +2. 下ã«ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—㦠**ClickHouse** データソースã®ã‚¿ã‚¤ãƒ—を見ã¤ã‘ã‚‹ã‹ã€**Add data source** ページã®æ¤œç´¢ãƒãƒ¼ã§æ¤œç´¢ã—ã¾ã™ã€‚**ClickHouse** データソースをé¸æŠžã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ãƒšãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + + 接続設定ページ + +3. サーãƒãƒ¼è¨­å®šã¨èªè¨¼æƒ…報を入力ã—ã¾ã™ã€‚主è¦ãªè¨­å®šã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +- **Server host address:** ClickHouse サービスã®ãƒ›ã‚¹ãƒˆå。 +- **Server port:** ClickHouse サービスã®ãƒãƒ¼ãƒˆã€‚サーãƒãƒ¼è¨­å®šãŠã‚ˆã³ãƒ—ロトコルã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ +- **Protocol:** ClickHouse サービスã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®ãƒ—ロトコル。 +- **Secure connection:** サーãƒãƒ¼ãŒã‚»ã‚­ãƒ¥ã‚¢æŽ¥ç¶šã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã«æœ‰åŠ¹ã«ã—ã¾ã™ã€‚ +- **Username** 㨠**Password**: ClickHouse ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è³‡æ ¼æƒ…報を入力ã—ã¾ã™ã€‚ユーザーを設定ã—ã¦ã„ãªã„å ´åˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã« `default` を試ã—ã¦ãã ã•ã„。[読ã¿å–り専用ユーザーを設定](#2-making-a-read-only-user)ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +詳細ãªè¨­å®šã«ã¤ã„ã¦ã¯ã€[プラグイン設定](./config.md)ドキュメントを確èªã—ã¦ãã ã•ã„。 + +4. **Save & test** ボタンをクリックã—ã¦ã€Grafana ㌠ClickHouse サービスã«æŽ¥ç¶šã§ãã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚æˆåŠŸã—ãŸå ´åˆã€**Data source is working** メッセージãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + + Select Save & test + +## 5. 次ã®ã‚¹ãƒ†ãƒƒãƒ— + +ã“ã‚Œã§ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã®æº–å‚™ãŒæ•´ã„ã¾ã—ãŸï¼[query builder](./query-builder.md) ã§ã‚¯ã‚¨ãƒªã‚’構築ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦è©³ã—ãå­¦ã³ã¾ã—ょã†ã€‚ + +設定ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[プラグイン設定](./config.md)ドキュメントを確èªã—ã¦ãã ã•ã„。 + +ã“れらã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«å«ã¾ã‚Œã¦ã„ãªã„情報をãŠæŽ¢ã—ã®å ´åˆã¯ã€[GitHub ã®ãƒ—ラグインリãƒã‚¸ãƒˆãƒª](https://github.com/grafana/clickhouse-datasource)を確èªã—ã¦ãã ã•ã„。 + +## プラグインãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¢ãƒƒãƒ—グレード + +v4 以é™ã§ã¯ã€æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒãƒªãƒªãƒ¼ã‚¹ã•ã‚Œã‚‹ã¨è¨­å®šã‚„クエリãŒã‚¢ãƒƒãƒ—グレードã•ã‚Œã¾ã™ã€‚ + +v3 ã‹ã‚‰ã®è¨­å®šã¨ã‚¯ã‚¨ãƒªã¯é–‹ã„ãŸã¨ãã« v4 ã«ç§»è¡Œã•ã‚Œã¾ã™ã€‚å¤ã„設定やダッシュボード㯠v4 ã§ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ãŒã€ç§»è¡Œã¯æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§å†ä¿å­˜ã™ã‚‹ã¾ã§ä¿æŒã•ã‚Œã¾ã›ã‚“。å¤ã„設定/クエリを開ã„ãŸéš›ã«å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€å¤‰æ›´ã‚’破棄ã—ã€[GitHub ã§å•é¡Œã‚’報告](https://github.com/grafana/clickhouse-datasource/issues)ã—ã¦ãã ã•ã„。 + +æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ä½œæˆã•ã‚ŒãŸè¨­å®š/クエリを以å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## 関連コンテンツ + +- [GitHub ã®ãƒ—ラグインリãƒã‚¸ãƒˆãƒª](https://github.com/grafana/clickhouse-datasource) +- ブログ: [Visualizing Data with ClickHouse - Part 1 - Grafana](https://clickhouse.com/blog/visualizing-data-with-grafana) +- ブログ: [Visualizing ClickHouse Data with Grafana - Video](https://www.youtube.com/watch?v=Ve-VPDxHgZU) +- ブログ: [ClickHouse Grafana plugin 4.0 - Leveling up SQL Observability](https://clickhouse.com/blog/clickhouse-grafana-plugin-4-0) +- ブログ: [データ㮠ClickHouse ã¸ã®æŠ•å…¥ - Part 3 - S3 ã®ä½¿ç”¨](https://clickhouse.com/blog/getting-data-into-clickhouse-part-3-s3) +- ブログ: [ClickHouse を用ã„㟠Observability ソリューションã®æ§‹ç¯‰ - Part 1 - ログ](https://clickhouse.com/blog/storing-log-data-in-clickhouse-fluent-bit-vector-open-telemetry) +- ブログ: [ClickHouse を用ã„㟠Observability ソリューションã®æ§‹ç¯‰ - Part 2 - トレース](https://clickhouse.com/blog/storing-traces-and-spans-open-telemetry-in-clickhouse) +- ブログ & ウェビナー: [ClickHouse + Grafana を用ã„ãŸã‚ªãƒ¼ãƒ—ンソース GitHub アクティビティã®ã‚¹ãƒˆãƒ¼ãƒªãƒ¼](https://clickhouse.com/blog/introduction-to-clickhouse-and-grafana-webinar) diff --git a/docs/ja/integrations/data-visualization/grafana/query-builder.md b/docs/ja/integrations/data-visualization/grafana/query-builder.md new file mode 100644 index 00000000000..496cc8366f7 --- /dev/null +++ b/docs/ja/integrations/data-visualization/grafana/query-builder.md @@ -0,0 +1,247 @@ +--- +sidebar_label: クエリビルダー +sidebar_position: 2 +slug: /ja/integrations/grafana/query-builder +description: ClickHouse Grafana プラグインã§ã®ã‚¯ã‚¨ãƒªãƒ“ルダーã®ä½¿ç”¨ +--- + +# クエリビルダー + +ä»»æ„ã®ã‚¯ã‚¨ãƒªã¯ ClickHouse プラグインã§å®Ÿè¡Œã§ãã¾ã™ã€‚ +クエリビルダーã¯ã‚·ãƒ³ãƒ—ルãªã‚¯ã‚¨ãƒªã«ã¯ä¾¿åˆ©ãªã‚ªãƒ—ションã§ã™ãŒã€è¤‡é›‘ãªã‚¯ã‚¨ãƒªã«ã¯ [SQL エディタ](#sql-editor)を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +クエリビルダー内ã®ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã«ã¯[クエリタイプ](#query-types)ãŒã‚ã‚Šã€å°‘ãªãã¨ã‚‚1ã¤ã®ã‚«ãƒ©ãƒ ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +使用å¯èƒ½ãªã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š +- [Table](#table): データを表形å¼ã§è¡¨ç¤ºã™ã‚‹ãŸã‚ã®æœ€ã‚‚ç°¡å˜ãªã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—。集計関数をå«ã‚€å˜ç´”ãªã‚¯ã‚¨ãƒªã«ã‚‚複雑ãªã‚¯ã‚¨ãƒªã«ã‚‚é©ã—ã¦ã„ã¾ã™ã€‚ +- [Logs](#logs): ログã®ã‚¯ã‚¨ãƒªä½œæˆã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚[デフォルト設定](./config.md#logs)ã•ã‚ŒãŸã‚¨ã‚¯ã‚¹ãƒ—ローラビューã§æœ€é©ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ +- [Time Series](#time-series): 時系列クエリã®ä½œæˆã«æœ€é©ã§ã™ã€‚専用ã®æ™‚間カラムをé¸æŠžã—ã€é›†è¨ˆé–¢æ•°ã‚’追加ã§ãã¾ã™ã€‚ +- [Traces](#traces): トレースã®æ¤œç´¢/表示ã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚[デフォルト設定](./config.md#traces)ã•ã‚ŒãŸã‚¨ã‚¯ã‚¹ãƒ—ローラビューã§æœ€é©ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ +- [SQL Editor](#sql-editor): クエリã®å®Œå…¨ãªåˆ¶å¾¡ã‚’è¡Œã„ãŸã„å ´åˆã«ä½¿ç”¨ã§ãã¾ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ä»»æ„ã® SQL クエリを実行ã§ãã¾ã™ã€‚ + +## クエリタイプ + +*クエリタイプ*設定ã¯ã€ä½œæˆä¸­ã®ã‚¯ã‚¨ãƒªã®ã‚¿ã‚¤ãƒ—ã«åˆã†ã‚ˆã†ã«ã‚¯ã‚¨ãƒªãƒ“ルダーã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’変更ã—ã¾ã™ã€‚ +クエリタイプã¯ã€ãƒ‡ãƒ¼ã‚¿ã®å¯è¦–化ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‘ãƒãƒ«ã‚‚決定ã—ã¾ã™ã€‚ + +### Table + +最も柔軟ãªã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—㯠Table クエリã§ã™ã€‚ã“ã‚Œã¯ã€å˜ç´”ãŠã‚ˆã³é›†è¨ˆã‚¯ã‚¨ãƒªã‚’処ç†ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚ŒãŸä»–ã®ã‚¯ã‚¨ãƒªãƒ“ルダーを包括ã—ã¾ã™ã€‚ + +| フィールド | 説明 | +|----|----| +| ビルダーモード | å˜ç´”ãªã‚¯ã‚¨ãƒªã¯é›†è¨ˆã‚„ Group By ã‚’å«ã¾ãšã€é›†è¨ˆã‚¯ã‚¨ãƒªã¯ã“れらã®ã‚ªãƒ—ションをå«ã¿ã¾ã™ã€‚ | +| カラム | é¸æŠžã•ã‚ŒãŸã‚«ãƒ©ãƒ ã€‚ã“ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ç”Ÿã® SQL を入力ã—ã¦ã€é–¢æ•°ã‚„カラムã®ã‚¨ã‚¤ãƒªã‚¢ã‚·ãƒ³ã‚°ã‚’許å¯ã—ã¾ã™ã€‚ | +| 集計 | [集計関数](/docs/ja/sql-reference/aggregate-functions/index.md)ã®ãƒªã‚¹ãƒˆã€‚関数ã¨ã‚«ãƒ©ãƒ ã®ã‚«ã‚¹ã‚¿ãƒ å€¤ã‚’許å¯ã—ã¾ã™ã€‚集計モードã§ã®ã¿è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ | +| Group By | [GROUP BY](/docs/ja/sql-reference/statements/select/group-by.md) å¼ã®ãƒªã‚¹ãƒˆã€‚集計モードã§ã®ã¿è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ | +| Order By | [ORDER BY](/docs/ja/sql-reference/statements/select/order-by.md) å¼ã®ãƒªã‚¹ãƒˆã€‚ | +| Limit | クエリã®æœ«å°¾ã« [LIMIT](/docs/ja/sql-reference/statements/select/limit.md) 文を追加ã—ã¾ã™ã€‚`0` ã«è¨­å®šã™ã‚‹ã¨é™¤å¤–ã•ã‚Œã¾ã™ã€‚一部ã®å¯è¦–化ã§ã¯ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’表示ã™ã‚‹ãŸã‚ã« `0` ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ | +| フィルター | `WHERE` å¥ã«é©ç”¨ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã®ãƒªã‚¹ãƒˆã€‚ | + +Example aggregate table query + +ã“ã®ã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’テーブルã¨ã—ã¦ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ã—ã¾ã™ã€‚ + +### Logs + +Logs クエリタイプã¯ã€ãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã®ã‚¯ã‚¨ãƒªä½œæˆã«ç„¦ç‚¹ã‚’当ã¦ãŸã‚¯ã‚¨ãƒªãƒ“ルダーをæä¾›ã—ã¾ã™ã€‚ +デフォルトã¯ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã®[ログ設定](./config.md#logs)ã§è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã€ã‚¯ã‚¨ãƒªãƒ“ルダーをデフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹/テーブルã¨ã‚«ãƒ©ãƒ ã§ãƒ—レロードã§ãã¾ã™ã€‚ +ã¾ãŸã€OpenTelemetry を有効ã«ã—ã¦ã€ã‚¹ã‚­ãƒ¼ãƒžãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«å¿œã˜ãŸã‚«ãƒ©ãƒ ã‚’自動é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +**時間**ã¨**レベル**フィルターãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§è¿½åŠ ã•ã‚Œã€æ™‚間カラム㮠Order By ã‚‚å«ã¾ã‚Œã¾ã™ã€‚ +ã“れらã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¯å„フィールドã«é–¢é€£ä»˜ã‘られã¦ãŠã‚Šã€ã‚«ãƒ©ãƒ ãŒå¤‰æ›´ã•ã‚Œã‚‹ã¨æ›´æ–°ã•ã‚Œã¾ã™ã€‚ +**レベル**フィルターã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ SQL ã‹ã‚‰é™¤å¤–ã•ã‚Œã¦ãŠã‚Šã€`IS ANYTHING` オプションã‹ã‚‰å¤‰æ›´ã™ã‚‹ã“ã¨ã§æœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +Logs クエリタイプã¯[データリンク](#data-links)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +| フィールド | 説明 | +|----|----| +| Use OTel | OpenTelemetry カラムを有効ã«ã—ã¾ã™ã€‚é¸æŠžã•ã‚ŒãŸ OTel スキーマãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§å®šç¾©ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã‚’使用ã™ã‚‹ã‚ˆã†ã«é¸æŠžã•ã‚ŒãŸã‚«ãƒ©ãƒ ã‚’上書ãã—ã¾ã™ï¼ˆã‚«ãƒ©ãƒ é¸æŠžã‚’無効ã«ã—ã¾ã™ï¼‰ã€‚ | +| カラム | ログ行ã«è¿½åŠ ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã€‚生㮠SQL ã‚’ã“ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«å…¥åŠ›ã—ã¦é–¢æ•°ã‚„カラムã®ã‚¨ã‚¤ãƒªã‚¢ã‚·ãƒ³ã‚°ã‚’許å¯ã—ã¾ã™ã€‚ | +| 時間 | ログã®ãƒ—ライマリタイムスタンプカラム。時間的ãªåž‹ã‚’表示ã—ã¾ã™ãŒã€ã‚«ã‚¹ã‚¿ãƒ å€¤/関数も許å¯ã•ã‚Œã¾ã™ã€‚ | +| ログレベル | ä»»æ„。ログã®*レベル*ã¾ãŸã¯*é‡å¤§åº¦*。通常ã¯`INFO`, `error`, `Debug`ãªã©ã®å€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ | +| メッセージ | ログメッセージã®å†…容。 | +| Order By | [ORDER BY](/docs/ja/sql-reference/statements/select/order-by.md) å¼ã®ãƒªã‚¹ãƒˆã€‚ | +| Limit | クエリã®æœ«å°¾ã« [LIMIT](/docs/ja/sql-reference/statements/select/limit.md) 文を追加ã—ã¾ã™ã€‚`0` ã«è¨­å®šã™ã‚‹ã¨é™¤å¤–ã•ã‚Œã¾ã™ãŒã€å¤§è¦æ¨¡ãªãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 | +| フィルター | `WHERE` å¥ã«é©ç”¨ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã®ãƒªã‚¹ãƒˆã€‚ | +| メッセージフィルター | `LIKE %value%` を使用ã—ã¦ãƒ­ã‚°ã‚’便利ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ãƒªãƒ³ã‚°ã™ã‚‹ãŸã‚ã®ãƒ†ã‚­ã‚¹ãƒˆå…¥åŠ›ã€‚入力ãŒç©ºã®å ´åˆã¯é™¤å¤–ã•ã‚Œã¾ã™ã€‚ | + +Example OTel logs query + +
+ã“ã®ã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—ã¯ã€ä¸Šéƒ¨ã«ãƒ­ã‚°ãƒ’ストグラムパãƒãƒ«ã¨ã¨ã‚‚ã«ã€ãƒ­ã‚°ãƒ‘ãƒãƒ«ã¨ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’レンダリングã—ã¾ã™ã€‚ + +クエリ内ã§é¸æŠžã•ã‚ŒãŸè¿½åŠ ã‚«ãƒ©ãƒ ã¯ã€å±•é–‹ã•ã‚ŒãŸãƒ­ã‚°è¡Œå†…ã§ç¢ºèªã§ãã¾ã™ï¼š +Example of extra fields on logs query + +### Time Series + +Time Series クエリタイプã¯[table](#table)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€æ™‚系列データã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚ + +2ã¤ã®ãƒ“ューã¯ã»ã¼åŒã˜ã§ã™ãŒã€ä»¥ä¸‹ã®é‡è¦ãªé•ã„ãŒã‚ã‚Šã¾ã™ï¼š +- 専用ã®*時間*フィールド。 +- 集計モードã§ã¯ã€æ™‚間間隔マクロãŒè‡ªå‹•çš„ã«é©ç”¨ã•ã‚Œã€Time フィールドã«å¯¾ã™ã‚‹ Group By ãŒè¿½åŠ ã•ã‚Œã¾ã™ã€‚ +- 集計モードã§ã¯ã€ã€Œã‚«ãƒ©ãƒ ã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒéžè¡¨ç¤ºã«ãªã‚Šã¾ã™ã€‚ +- 時間範囲フィルター㨠Order By ㌠**Time** フィールドã«è‡ªå‹•çš„ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +:::é‡è¦ ã‚ãªãŸã®ãƒ“ジュアライゼーションãŒãƒ‡ãƒ¼ã‚¿ã‚’欠ã„ã¦ã„ã‚‹å ´åˆ +å ´åˆã«ã‚ˆã£ã¦ã¯ã€æ™‚系列パãƒãƒ«ãŒ `LIMIT` ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ `1000` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ãŸã‚ã«åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚ŒãŸã‚ˆã†ã«è¡¨ç¤ºã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +データセットãŒè¨±ã›ã°ã€`LIMIT` æ¡é …を削除ã—㦠`0` ã«è¨­å®šã—ã¦ã¿ã¦ãã ã•ã„。 +::: + +| フィールド | 説明 | +|----|----| +| ビルダーモード | å˜ç´”ãªã‚¯ã‚¨ãƒªã¯é›†è¨ˆãŠã‚ˆã³ Group By ã‚’å«ã¾ãšã€é›†è¨ˆã‚¯ã‚¨ãƒªã¯ã“れらã®ã‚ªãƒ—ションをå«ã¿ã¾ã™ã€‚ | +| 時間 | クエリã®ãƒ—ライマリ時間カラム。時間的ãªåž‹ã‚’表示ã—ã¾ã™ãŒã€ã‚«ã‚¹ã‚¿ãƒ å€¤/関数も許å¯ã•ã‚Œã¾ã™ã€‚ | +| カラム | é¸æŠžã•ã‚ŒãŸã‚«ãƒ©ãƒ ã€‚ã“ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ç”Ÿã® SQL を入力ã—ã¦ã€é–¢æ•°ã‚„カラムã®ã‚¨ã‚¤ãƒªã‚¢ã‚·ãƒ³ã‚°ã‚’許å¯ã—ã¾ã™ã€‚å˜ç´”モードã§ã®ã¿è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ | +| 集計 | [集計関数](/docs/ja/sql-reference/aggregate-functions/index.md)ã®ãƒªã‚¹ãƒˆã€‚関数ã¨ã‚«ãƒ©ãƒ ã®ã‚«ã‚¹ã‚¿ãƒ å€¤ã‚’許å¯ã—ã¾ã™ã€‚集計モードã§ã®ã¿è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ | +| Group By | [GROUP BY](/docs/ja/sql-reference/statements/select/group-by.md) å¼ã®ãƒªã‚¹ãƒˆã€‚集計モードã§ã®ã¿è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ | +| Order By | [ORDER BY](/docs/ja/sql-reference/statements/select/order-by.md) å¼ã®ãƒªã‚¹ãƒˆã€‚ | +| Limit | クエリã®æœ«å°¾ã« [LIMIT](/docs/ja/sql-reference/statements/select/limit.md) 文を追加ã—ã¾ã™ã€‚`0` ã«è¨­å®šã™ã‚‹ã¨é™¤å¤–ã•ã‚Œã¾ã™ãŒã€æ™‚系列データセットã§ã¯ãƒ•ãƒ«ãƒ“ジュアライゼーションを表示ã™ã‚‹ãŸã‚ã«æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ | +| フィルター | `WHERE` å¥ã«é©ç”¨ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã®ãƒªã‚¹ãƒˆã€‚ | + +Example time series query + +ã“ã®ã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—ã¯ã€æ™‚系列パãƒãƒ«ã§ãƒ‡ãƒ¼ã‚¿ã‚’レンダリングã—ã¾ã™ã€‚ + +### Traces + +Traces クエリタイプã¯ã€ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’ç°¡å˜ã«æ¤œç´¢ãŠã‚ˆã³è¡¨ç¤ºã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªãƒ“ルダーをæä¾›ã—ã¾ã™ã€‚ +ã“れ㯠OpenTelemetry データ用ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ãŒã€åˆ¥ã®ã‚¹ã‚­ãƒ¼ãƒžã‹ã‚‰ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’レンダリングã™ã‚‹ãŸã‚ã«ã‚«ãƒ©ãƒ ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +デフォルトã¯ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã®[トレース設定](./config.md#traces)ã§è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã€ã‚¯ã‚¨ãƒªãƒ“ルダーをデフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹/テーブルã¨ã‚«ãƒ©ãƒ ã§ãƒ—レロードã§ãã¾ã™ã€‚デフォルトãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚«ãƒ©ãƒ é¸æŠžã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æŠ˜ã‚ŠãŸãŸã¾ã‚Œã¾ã™ã€‚ +ã¾ãŸã€OpenTelemetry を有効ã«ã—ã¦ã€ã‚¹ã‚­ãƒ¼ãƒžãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«å¿œã˜ãŸã‚«ãƒ©ãƒ ã‚’自動é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +デフォルトã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¯ã€ãƒˆãƒƒãƒ—レベルã®ã‚¹ãƒ‘ンã®ã¿ã‚’表示ã™ã‚‹æ„図ã§è¿½åŠ ã•ã‚Œã¦ã„ã¾ã™ã€‚ +Time ãŠã‚ˆã³ Duration Time ã® Order By ã‚‚å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ +ã“れらã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¯å„フィールドã«é–¢é€£ä»˜ã‘られã¦ãŠã‚Šã€ã‚«ãƒ©ãƒ ãŒå¤‰æ›´ã•ã‚Œã‚‹ã¨æ›´æ–°ã•ã‚Œã¾ã™ã€‚ +**サービスå**フィルターã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ SQL ã‹ã‚‰é™¤å¤–ã•ã‚Œã¦ãŠã‚Šã€`IS ANYTHING` オプションã‹ã‚‰å¤‰æ›´ã™ã‚‹ã“ã¨ã§æœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +Traces クエリタイプã¯[データリンク](#data-links)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +| フィールド | 説明 | +|----|----| +| Trace モード | クエリを Trace Search ã‹ã‚‰ Trace ID 検索ã«å¤‰æ›´ã—ã¾ã™ã€‚ | +| Use OTel | OpenTelemetry カラムを有効ã«ã—ã¾ã™ã€‚é¸æŠžã•ã‚ŒãŸ OTel スキーマãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§å®šç¾©ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã‚’使用ã™ã‚‹ã‚ˆã†ã«é¸æŠžã•ã‚ŒãŸã‚«ãƒ©ãƒ ã‚’上書ãã—ã¾ã™ï¼ˆã‚«ãƒ©ãƒ é¸æŠžã‚’無効ã«ã—ã¾ã™ï¼‰ã€‚ | +| Trace ID カラム | トレース㮠ID。 | +| Span ID カラム | スパン ID。 | +| Parent Span ID カラム | 親スパン ID。ã“ã‚Œã¯é€šå¸¸ã€ãƒˆãƒƒãƒ—レベルトレースã§ã¯ç©ºã§ã™ã€‚ | +| サービスåカラム | サービスå。 | +| æ“作åカラム | æ“作å。 | +| 開始時間カラム | トレーススパンã®ãƒ—ライマリ時間カラム。スパンãŒé–‹å§‹ã•ã‚ŒãŸæ™‚刻。 | +| 期間時間カラム | スパンã®æœŸé–“。Grafana ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã“れをミリ秒ã®æµ®å‹•å°æ•°ç‚¹æ•°ã§æœŸå¾…ã—ã¦ã„ã¾ã™ã€‚変æ›ã¯`Duration Unit`ドロップダウンを介ã—ã¦è‡ªå‹•çš„ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ | +| 期間å˜ä½ | 期間ã«ä½¿ç”¨ã•ã‚Œã‚‹æ™‚é–“ã®å˜ä½ã€‚デフォルトã§ã¯ãƒŠãƒŽç§’。é¸æŠžã•ã‚ŒãŸå˜ä½ã¯ã€Grafana ã«å¿…è¦ãªãƒŸãƒªç§’ã®æµ®å‹•å°æ•°ç‚¹æ•°ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ | +| タグカラム | スパンタグ。OTel ã«åŸºã¥ãスキーマを使用ã—ã¦ã„ãªã„å ´åˆã¯é™¤å¤–ã—ã¾ã™ã€‚特定ã®ãƒžãƒƒãƒ—カラムタイプを期待ã—ã¾ã™ã€‚ | +| サービスタグカラム | サービスタグ。OTel ã«åŸºã¥ãスキーマを使用ã—ã¦ã„ãªã„å ´åˆã¯é™¤å¤–ã—ã¾ã™ã€‚特定ã®ãƒžãƒƒãƒ—カラムタイプを期待ã—ã¾ã™ã€‚ | +| Order By | [ORDER BY](/docs/ja/sql-reference/statements/select/order-by.md) å¼ã®ãƒªã‚¹ãƒˆã€‚ | +| Limit | クエリã®æœ«å°¾ã« [LIMIT](/docs/ja/sql-reference/statements/select/limit.md) 文を追加ã—ã¾ã™ã€‚`0` ã«è¨­å®šã™ã‚‹ã¨é™¤å¤–ã•ã‚Œã¾ã™ãŒã€å¤§è¦æ¨¡ãªãƒˆãƒ¬ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 | +| フィルター | `WHERE` å¥ã«é©ç”¨ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã®ãƒªã‚¹ãƒˆã€‚ | +| Trace ID | フィルターã§ä½¿ç”¨ã™ã‚‹ãƒˆãƒ¬ãƒ¼ã‚¹ ID。Trace ID モードã§ã®ã¿ä½¿ç”¨ã•ã‚Œã€Trace ID [データリンク](#data-links)ã‚’é–‹ãã¨ãã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ | + +Example OTel trace query + +ã“ã®ã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—ã¯ã€Trace Search モードã§ã¯ãƒ†ãƒ¼ãƒ–ルビューã§ã€Trace ID モードã§ã¯ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ‘ãƒãƒ«ã§ãƒ‡ãƒ¼ã‚¿ã‚’レンダリングã—ã¾ã™ã€‚ + +## SQL エディタ + +クエリビルダーã«ã¯è¤‡é›‘ã™ãŽã‚‹ã‚¯ã‚¨ãƒªã®å ´åˆã¯ã€SQL エディタを使用ã§ãã¾ã™ã€‚ +ã“ã‚Œã«ã‚ˆã‚Šã€ç”Ÿã® ClickHouse SQL を記述ã—ã¦å®Ÿè¡Œã™ã‚‹ã“ã¨ã§ã‚¯ã‚¨ãƒªã‚’完全ã«åˆ¶å¾¡ã§ãã¾ã™ã€‚ + +SQL エディタã¯ã€ã‚¯ã‚¨ãƒªã‚¨ãƒ‡ã‚£ã‚¿ã®ä¸Šéƒ¨ã§ã€ŒSQL Editorã€ã‚’é¸æŠžã™ã‚‹ã“ã¨ã§é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã‚‚[マクロ関数](#macros)を使用ã§ãã¾ã™ã€‚ + +クエリタイプを切り替ãˆã¦ã€ã‚¯ã‚¨ãƒªã«æœ€ã‚‚é©ã—ãŸãƒ“ジュアライゼーションをå–å¾—ã§ãã¾ã™ã€‚ +ダッシュボードビューã€ç‰¹ã«æ™‚系列データã§ã¯ã€ã“ã®åˆ‡ã‚Šæ›¿ãˆã‚‚効果ãŒã‚ã‚Šã¾ã™ã€‚ + +Example raw SQL query + +## データリンク + +Grafana [データリンク](https://grafana.com/docs/grafana/latest/panels-visualizations/configure-data-links) +ã¯æ–°ã—ã„クエリã¸ã®ãƒªãƒ³ã‚¯ã‚’作æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ +ã“ã®æ©Ÿèƒ½ã¯ã€ClickHouse プラグイン内ã§ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’ログã«ãƒªãƒ³ã‚¯ã—ãŸã‚Šãã®é€†ã‚’実行ã—ãŸã‚Šã™ã‚‹ãŸã‚ã«æœ‰åŠ¹åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ +データソースã®[設定](./config.md#opentelemetry)㧠OpenTelemetry を両方ã®ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã«è¨­å®šã™ã‚‹ã¨æœ€é©ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +
+ テーブル内ã®ãƒˆãƒ¬ãƒ¼ã‚¹ãƒªãƒ³ã‚¯ã®ä¾‹ + Trace links in table +
+ +
+ ログ内ã®ãƒˆãƒ¬ãƒ¼ã‚¹ãƒªãƒ³ã‚¯ã®ä¾‹ + Trace links in logs +
+ +### データリンクã®ä½œæˆæ–¹æ³• + +ã‚ãªãŸã¯ã€ã‚¯ã‚¨ãƒªå†…ã§`traceID`ã¨ã„ã†åå‰ã®ã‚«ãƒ©ãƒ ã‚’é¸æŠžã™ã‚‹ã“ã¨ã§ãƒ‡ãƒ¼ã‚¿ãƒªãƒ³ã‚¯ã‚’作æˆã§ãã¾ã™ã€‚ã“ã®åå‰ã¯å¤§æ–‡å­—ã¨å°æ–‡å­—を区別ã›ãšã€"ID"ã®å‰ã«ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã‚’追加ã™ã‚‹ã“ã¨ã‚‚サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚例ãˆã°ã€`traceId`, `TraceId`, `TRACE_ID`, `tracE_iD`ã¯ã™ã¹ã¦æœ‰åŠ¹ã§ã™ã€‚ + +OpenTelemetry ãŒ[ログ](#logs)ã¾ãŸã¯[トレース](#traces)クエリã§æœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ãƒˆãƒ¬ãƒ¼ã‚¹ ID カラムã¯è‡ªå‹•çš„ã«å«ã¾ã‚Œã¾ã™ã€‚ + +トレース ID カラムをå«ã‚ã‚‹ã“ã¨ã§ã€ã€Œ**View Trace**ã€ãŠã‚ˆã³ã€Œ**View Logs**ã€ãƒªãƒ³ã‚¯ãŒãƒ‡ãƒ¼ã‚¿ã«æ·»ä»˜ã•ã‚Œã¾ã™ã€‚ + +### リンクã®æ©Ÿèƒ½ + +データリンクãŒå­˜åœ¨ã™ã‚‹ã¨ã€æä¾›ã•ã‚ŒãŸãƒˆãƒ¬ãƒ¼ã‚¹ ID を使用ã—ã¦ãƒˆãƒ¬ãƒ¼ã‚¹ãŠã‚ˆã³ãƒ­ã‚°ã‚’é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +「**View Trace**ã€ã¯ãƒˆãƒ¬ãƒ¼ã‚¹ä»˜ãã®åˆ†å‰²ãƒ‘ãƒãƒ«ã‚’é–‹ãã€ã€Œ**View Logs**ã€ã¯ãƒˆãƒ¬ãƒ¼ã‚¹ ID ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚ŒãŸãƒ­ã‚°ã‚¯ã‚¨ãƒªã‚’é–‹ãã¾ã™ã€‚ +リンクãŒãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã§ã¯ãªãエクスプローラビューã‹ã‚‰ã‚¯ãƒªãƒƒã‚¯ã•ã‚ŒãŸå ´åˆã€ãƒªãƒ³ã‚¯ã¯ã‚¨ã‚¯ã‚¹ãƒ—ローラビューã®æ–°ã—ã„タブã§é–‹ã‹ã‚Œã¾ã™ã€‚ + +[ログ](./config.md#logs)ã¨[トレース](./config.md#traces)ã®ä¸¡æ–¹ã«å¯¾ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãŒæ§‹æˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã€ã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—ã‚’è·¨ã(ログã‹ã‚‰ãƒˆãƒ¬ãƒ¼ã‚¹ã€ãƒˆãƒ¬ãƒ¼ã‚¹ã‹ã‚‰ãƒ­ã‚°ï¼‰ã®ã«å¿…è¦ã§ã™ã€‚åŒã˜ã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—ã®ãƒªãƒ³ã‚¯ã‚’é–‹ãå ´åˆã«ã¯ã€ãŸã ã‚¯ã‚¨ãƒªã‚’コピーã™ã‚‹ã“ã¨ã§æ¸ˆã‚€ãŸã‚ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 + +
+ ログクエリ(左パãƒãƒ«ï¼‰ã‹ã‚‰ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’表示ã™ã‚‹ä¾‹ï¼ˆå³ãƒ‘ãƒãƒ«ï¼‰ + Example of data links linking +
+ +## マクロ + +マクロã¯ã‚¯ã‚¨ãƒªã«å‹•çš„ SQL を追加ã™ã‚‹ç°¡å˜ãªæ–¹æ³•ã§ã™ã€‚ +クエリ㌠ClickHouse サーãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã‚‹å‰ã«ã€ãƒ—ラグインã¯ãƒžã‚¯ãƒ­ã‚’展開ã—ã€å®Œå…¨ãªå¼ã«ç½®ãæ›ãˆã¾ã™ã€‚ + +SQL エディタã¨ã‚¯ã‚¨ãƒªãƒ“ルダーã®ä¸¡æ–¹ã®ã‚¯ã‚¨ãƒªã§ãƒžã‚¯ãƒ­ã‚’使用ã§ãã¾ã™ã€‚ + +### マクロã®ä½¿ç”¨æ–¹æ³• + +å¿…è¦ã«å¿œã˜ã¦ã€ã‚¯ã‚¨ãƒªã®ä»»æ„ã®å ´æ‰€ã«ãƒžã‚¯ãƒ­ã‚’複数回å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +以下ã¯ã€`$__timeFilter` マクロを使用ã™ã‚‹ä¾‹ã§ã™ï¼š + +入力: +```sql +SELECT log_time, log_message +FROM logs +WHERE $__timeFilter(log_time) +``` + +最終的ãªã‚¯ã‚¨ãƒªå‡ºåŠ›ï¼š +```sql +SELECT log_time, log_message +FROM logs +WHERE log_time >= toDateTime(1415792726) AND log_time <= toDateTime(1447328726) +``` + +ã“ã®ä¾‹ã§ã¯ã€Grafana ダッシュボードã®æ™‚間範囲㌠`log_time` カラムã«é©ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +プラグインã¯ä¸­æ‹¬å¼§ `{}` を使用ã—ãŸè¡¨è¨˜ã‚‚サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚クエリ㌠[パラメーター](/docs/ja/sql-reference/syntax.md#defining-and-using-query-parameters)内ã«å¿…è¦ãªå ´åˆã¯ã€ã“ã®è¡¨è¨˜ã‚’使用ã—ã¾ã™ã€‚ + +### マクロã®ãƒªã‚¹ãƒˆ + +プラグインã§åˆ©ç”¨å¯èƒ½ãªã™ã¹ã¦ã®ãƒžã‚¯ãƒ­ã®ãƒªã‚¹ãƒˆã§ã™ï¼š + +| マクロ | 説明 | 出力例 | +| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `$__dateFilter(columnName)` | Grafana パãƒãƒ«ã®æ™‚間範囲を[Date](/docs/ja/sql-reference/data-types/date.md)ã¨ã—ã¦æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹æ¡ä»¶ã«ç½®ãæ›ãˆã¾ã™ã€‚ | `columnName >= toDate('2022-10-21') AND columnName <= toDate('2022-10-23')` | +| `$__timeFilter(columnName)` | Grafana パãƒãƒ«ã®æ™‚間範囲を[DateTime](/docs/ja/sql-reference/data-types/datetime.md)ã¨ã—ã¦æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹æ¡ä»¶ã«ç½®ãæ›ãˆã¾ã™ã€‚ | `columnName >= toDateTime(1415792726) AND time <= toDateTime(1447328726)` | +| `$__timeFilter_ms(columnName)` | Grafana パãƒãƒ«ã®æ™‚間範囲を[DateTime64](/docs/ja/sql-reference/data-types/datetime64.md)ã¨ã—ã¦æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹æ¡ä»¶ã«ç½®ãæ›ãˆã¾ã™ã€‚ | `columnName >= fromUnixTimestamp64Milli(1415792726123) AND columnName <= fromUnixTimestamp64Milli(1447328726456)` | +| `$__dateTimeFilter(dateColumn, timeColumn)` | `$__dateFilter()` 㨠`$__timeFilter()` を別々㮠Date 㨠DateTime カラムã§çµ„ã¿åˆã‚ã›ãŸã‚·ãƒ§ãƒ¼ãƒˆãƒãƒ³ãƒ‰ã§ã™ã€‚Alias `$__dt()` | `$__dateFilter(dateColumn) AND $__timeFilter(timeColumn)` | +| `$__fromTime` | Grafana パãƒãƒ«ã®ç¯„囲ã®é–‹å§‹æ™‚刻を[DateTime](/docs/ja/sql-reference/data-types/datetime.md)ã¨ã—ã¦ã‚­ãƒ£ã‚¹ãƒˆã—ãŸã‚‚ã®ã«ç½®ãæ›ãˆã¾ã™ã€‚ | `toDateTime(1415792726)` | +| `$__fromTime_ms` | パãƒãƒ«ç¯„囲ã®é–‹å§‹æ™‚刻を[DateTime64](/docs/ja/sql-reference/data-types/datetime64.md)ã¨ã—ã¦ã‚­ãƒ£ã‚¹ãƒˆã—ãŸã‚‚ã®ã«ç½®ãæ›ãˆã¾ã™ã€‚ | `fromUnixTimestamp64Milli(1415792726123)` | +| `$__toTime` | Grafana パãƒãƒ«ç¯„囲ã®çµ‚了時刻を[DateTime](/docs/ja/sql-reference/data-types/datetime.md)ã¨ã—ã¦ã‚­ãƒ£ã‚¹ãƒˆã—ãŸã‚‚ã®ã«ç½®ãæ›ãˆã¾ã™ã€‚ | `toDateTime(1447328726)` | +| `$__toTime_ms` | パãƒãƒ«ç¯„囲ã®çµ‚了時刻を[DateTime64](/docs/ja/sql-reference/data-types/datetime64.md)ã¨ã—ã¦ã‚­ãƒ£ã‚¹ãƒˆã—ãŸã‚‚ã®ã«ç½®ãæ›ãˆã¾ã™ã€‚ | `fromUnixTimestamp64Milli(1447328726456)` | +| `$__timeInterval(columnName)` | ウィンドウサイズã«åŸºã¥ã間隔を計算ã™ã‚‹é–¢æ•°ã§ç½®ãæ›ãˆã¾ã™ã€‚ | `toStartOfInterval(toDateTime(columnName), INTERVAL 20 second)` | +| `$__timeInterval_ms(columnName)` | ウィンドウサイズã«åŸºã¥ã間隔を計算ã™ã‚‹é–¢æ•°ã§ç½®ãæ›ãˆã¾ã™ï¼ˆãƒŸãƒªç§’å˜ä½ï¼‰ã€‚ | `toStartOfInterval(toDateTime64(columnName, 3), INTERVAL 20 millisecond)` | +| `$__interval_s` | ダッシュボード間隔を秒å˜ä½ã§ç½®ãæ›ãˆã¾ã™ã€‚ | `20` | +| `$__conditionalAll(condition, $templateVar)` | テンプレート変数ãŒã™ã¹ã¦ã®å€¤ã‚’é¸æŠžã—ã¦ã„ãªã„å ´åˆã¯ç¬¬ä¸€å¼•æ•°ã«ç½®ãæ›ãˆã¾ã™ã€‚テンプレート変数ãŒã™ã¹ã¦ã®å€¤ã‚’é¸æŠžã™ã‚‹å ´åˆã¯ `1=1` ã«ç½®ãæ›ãˆã¾ã™ã€‚ | `condition` ã¾ãŸã¯ `1=1` | + diff --git a/docs/ja/integrations/data-visualization/hashboard-and-clickhouse.md b/docs/ja/integrations/data-visualization/hashboard-and-clickhouse.md new file mode 100644 index 00000000000..35b18f89152 --- /dev/null +++ b/docs/ja/integrations/data-visualization/hashboard-and-clickhouse.md @@ -0,0 +1,45 @@ +--- +sidebar_label: Hashboard +sidebar_position: 132 +slug: /ja/integrations/hashboard +keywords: [clickhouse, hashboard, connect, integrate, ui, analytics] +description: Hashboardã¯ClickHouseã¨ç°¡å˜ã«çµ±åˆå¯èƒ½ãªå¼·åŠ›ãªåˆ†æžãƒ—ラットフォームã§ã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ãƒ‡ãƒ¼ã‚¿åˆ†æžã‚’æä¾›ã—ã¾ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_native.md'; + +# ClickHouseã¨Hashboardã®æŽ¥ç¶š + +[Hashboard](https://hashboard.com)ã¯ã€çµ„織内ã®èª°ã‚‚ãŒãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’追跡ã—ã€è¡Œå‹•å¯èƒ½ãªã‚¤ãƒ³ã‚µã‚¤ãƒˆã‚’発見ã§ãるインタラクティブãªãƒ‡ãƒ¼ã‚¿æŽ¢ç´¢ãƒ„ールã§ã™ã€‚Hashboardã¯ã‚ãªãŸã®ClickHouseデータベースã«å¯¾ã—ã¦ãƒ©ã‚¤ãƒ–SQLクエリを発行ã—ã€ã‚»ãƒ«ãƒ•ã‚µãƒ¼ãƒ“ス型ã®ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ãªãƒ‡ãƒ¼ã‚¿æŽ¢ç´¢ç”¨é€”ã«ç‰¹ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +Hashboard data explorer + +
+ +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€Hashboardã‚’ã‚ãªãŸã®ClickHouseインスタンスã«æŽ¥ç¶šã™ã‚‹æ‰‹é †ã‚’案内ã—ã¾ã™ã€‚ã“ã®æƒ…å ±ã¯ã€Hashboardã®[ClickHouseインテグレーションドキュメント](https://docs.hashboard.com/docs/database-connections/clickhouse)ã§ã‚‚ã”覧ã„ãŸã ã‘ã¾ã™ã€‚ + +## å‰ææ¡ä»¶ + +- 自身ã®ã‚¤ãƒ³ãƒ•ãƒ©ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ä¸Šã¾ãŸã¯[ClickHouse Cloud](https://clickhouse.com/)上ã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„ã‚‹ClickHouseデータベース。 +- [Hashboardアカウント](https://hashboard.com/getAccess)ã¨ãƒ—ロジェクト。 + +## Hashboardã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹æ‰‹é † + +### 1. 接続詳細ã®åŽé›† + + + +### 2. Hashboardã§æ–°ã—ã„データベース接続を追加 + +1. [Hashboardプロジェクト](https://hashboard.com/app)ã«ç§»å‹•ã—ã¾ã™ã€‚ +2. サイドナビゲーションãƒãƒ¼ã®ã‚®ã‚¢ã‚¢ã‚¤ã‚³ãƒ³ã‚’クリックã—ã¦è¨­å®šãƒšãƒ¼ã‚¸ã‚’é–‹ãã¾ã™ã€‚ +3. `+ New Database Connection`をクリックã—ã¾ã™ã€‚ +4. モーダルã§ã€ŒClickHouseã€ã‚’é¸æŠžã—ã¾ã™ã€‚ +5. **Connection Name**ã€**Host**ã€**Port**ã€**Username**ã€**Password**ã€**Database**ã®å„フィールドã«ã€äº‹å‰ã«åŽé›†ã—ãŸæƒ…報を入力ã—ã¾ã™ã€‚ +6. 「Testã€ã‚’クリックã—ã¦æŽ¥ç¶šãŒæ­£å¸¸ã«æ§‹æˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +7. 「Addã€ã‚’クリックã—ã¾ã™ã€‚ + +ã“ã‚Œã§ã€ClickHouseデータベースãŒHashboardã«æŽ¥ç¶šã•ã‚Œã€[Data Models](https://docs.hashboard.com/docs/data-modeling/add-data-model)ã€[Explorations](https://docs.hashboard.com/docs/visualizing-data/explorations)ã€[Metrics](https://docs.hashboard.com/docs/metrics)ã€[Dashboards](https://docs.hashboard.com/docs/dashboards)を構築ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ã“れらã®æ©Ÿèƒ½ã«ã¤ã„ã¦ã®è©³ç´°ã¯Hashboardã®å¯¾å¿œã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 詳細情報 + +より高度ãªæ©Ÿèƒ½ã‚„トラブルシューティングã®æƒ…å ±ã«ã¤ã„ã¦ã¯ã€[Hashboardã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://docs.hashboard.com/)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/data-visualization/images/deepnote_01.png b/docs/ja/integrations/data-visualization/images/deepnote_01.png new file mode 100644 index 00000000000..058db58ffa3 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/deepnote_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/deepnote_02.png b/docs/ja/integrations/data-visualization/images/deepnote_02.png new file mode 100644 index 00000000000..46d63583428 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/deepnote_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/deepnote_03.png b/docs/ja/integrations/data-visualization/images/deepnote_03.png new file mode 100644 index 00000000000..a35e5386e92 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/deepnote_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/draxlr_01.png b/docs/ja/integrations/data-visualization/images/draxlr_01.png new file mode 100644 index 00000000000..67a384a68a0 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/draxlr_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/draxlr_02.png b/docs/ja/integrations/data-visualization/images/draxlr_02.png new file mode 100644 index 00000000000..de741803fb5 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/draxlr_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/draxlr_03.png b/docs/ja/integrations/data-visualization/images/draxlr_03.png new file mode 100644 index 00000000000..7244a2babb1 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/draxlr_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/draxlr_04.png b/docs/ja/integrations/data-visualization/images/draxlr_04.png new file mode 100644 index 00000000000..285f69793f3 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/draxlr_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/draxlr_05.png b/docs/ja/integrations/data-visualization/images/draxlr_05.png new file mode 100644 index 00000000000..e622fc7db62 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/draxlr_05.png differ diff --git a/docs/ja/integrations/data-visualization/images/draxlr_06.png b/docs/ja/integrations/data-visualization/images/draxlr_06.png new file mode 100644 index 00000000000..56191cb3803 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/draxlr_06.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_01.png b/docs/ja/integrations/data-visualization/images/explo_01.png new file mode 100644 index 00000000000..2da81827d8a Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_02.png b/docs/ja/integrations/data-visualization/images/explo_02.png new file mode 100644 index 00000000000..f6ed60f0da3 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_03.png b/docs/ja/integrations/data-visualization/images/explo_03.png new file mode 100644 index 00000000000..d33c033fc72 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_04.png b/docs/ja/integrations/data-visualization/images/explo_04.png new file mode 100644 index 00000000000..a335491d63a Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_05.png b/docs/ja/integrations/data-visualization/images/explo_05.png new file mode 100644 index 00000000000..104607a8859 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_05.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_06.png b/docs/ja/integrations/data-visualization/images/explo_06.png new file mode 100644 index 00000000000..05e38075dd3 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_06.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_07.png b/docs/ja/integrations/data-visualization/images/explo_07.png new file mode 100644 index 00000000000..eb981bed136 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_07.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_08.png b/docs/ja/integrations/data-visualization/images/explo_08.png new file mode 100644 index 00000000000..953838722fb Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_08.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_09.png b/docs/ja/integrations/data-visualization/images/explo_09.png new file mode 100644 index 00000000000..37813b8727a Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_09.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_10.png b/docs/ja/integrations/data-visualization/images/explo_10.png new file mode 100644 index 00000000000..89dfa761179 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_10.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_11.png b/docs/ja/integrations/data-visualization/images/explo_11.png new file mode 100644 index 00000000000..a720e90a769 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_11.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_12.png b/docs/ja/integrations/data-visualization/images/explo_12.png new file mode 100644 index 00000000000..961a2128772 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_12.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_13.png b/docs/ja/integrations/data-visualization/images/explo_13.png new file mode 100644 index 00000000000..863d96c03e3 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_13.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_14.png b/docs/ja/integrations/data-visualization/images/explo_14.png new file mode 100644 index 00000000000..e814c114b61 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_14.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_15.png b/docs/ja/integrations/data-visualization/images/explo_15.png new file mode 100644 index 00000000000..2ef119d4fff Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_15.png differ diff --git a/docs/ja/integrations/data-visualization/images/explo_16.png b/docs/ja/integrations/data-visualization/images/explo_16.png new file mode 100644 index 00000000000..a42adb352f8 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/explo_16.png differ diff --git a/docs/ja/integrations/data-visualization/images/hashboard_01.png b/docs/ja/integrations/data-visualization/images/hashboard_01.png new file mode 100644 index 00000000000..97ff0834ecb Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/hashboard_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_01.png b/docs/ja/integrations/data-visualization/images/looker_01.png new file mode 100644 index 00000000000..f6fae3fa0c8 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_02.png b/docs/ja/integrations/data-visualization/images/looker_02.png new file mode 100644 index 00000000000..06527e0daf0 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_03.png b/docs/ja/integrations/data-visualization/images/looker_03.png new file mode 100644 index 00000000000..d31f89c58f5 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_04.png b/docs/ja/integrations/data-visualization/images/looker_04.png new file mode 100644 index 00000000000..17c774aeb4d Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_studio_01.png b/docs/ja/integrations/data-visualization/images/looker_studio_01.png new file mode 100644 index 00000000000..73b1032ae23 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_studio_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_studio_02.png b/docs/ja/integrations/data-visualization/images/looker_studio_02.png new file mode 100644 index 00000000000..08f6400a8be Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_studio_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_studio_03.png b/docs/ja/integrations/data-visualization/images/looker_studio_03.png new file mode 100644 index 00000000000..70ee103dbd5 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_studio_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_studio_04.png b/docs/ja/integrations/data-visualization/images/looker_studio_04.png new file mode 100644 index 00000000000..6578d7a85be Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_studio_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_studio_05.png b/docs/ja/integrations/data-visualization/images/looker_studio_05.png new file mode 100644 index 00000000000..2a7c246c2a6 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_studio_05.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_studio_06.png b/docs/ja/integrations/data-visualization/images/looker_studio_06.png new file mode 100644 index 00000000000..b3c95194751 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_studio_06.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_studio_enable_mysql.png b/docs/ja/integrations/data-visualization/images/looker_studio_enable_mysql.png new file mode 100644 index 00000000000..085cb598744 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_studio_enable_mysql.png differ diff --git a/docs/ja/integrations/data-visualization/images/looker_studio_mysql_cloud.png b/docs/ja/integrations/data-visualization/images/looker_studio_mysql_cloud.png new file mode 100644 index 00000000000..61dfc680d01 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/looker_studio_mysql_cloud.png differ diff --git a/docs/ja/integrations/data-visualization/images/metabase_01.png b/docs/ja/integrations/data-visualization/images/metabase_01.png new file mode 100644 index 00000000000..0dbe17723d5 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/metabase_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/metabase_02.png b/docs/ja/integrations/data-visualization/images/metabase_02.png new file mode 100644 index 00000000000..64c61ab67cb Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/metabase_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/metabase_03.png b/docs/ja/integrations/data-visualization/images/metabase_03.png new file mode 100644 index 00000000000..f3cb6d5d2fa Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/metabase_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/metabase_04.png b/docs/ja/integrations/data-visualization/images/metabase_04.png new file mode 100644 index 00000000000..e2dd277cff1 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/metabase_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/metabase_05.png b/docs/ja/integrations/data-visualization/images/metabase_05.png new file mode 100644 index 00000000000..befe59e7be8 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/metabase_05.png differ diff --git a/docs/ja/integrations/data-visualization/images/metabase_06.png b/docs/ja/integrations/data-visualization/images/metabase_06.png new file mode 100644 index 00000000000..30be79f1fe3 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/metabase_06.png differ diff --git a/docs/ja/integrations/data-visualization/images/metabase_07.png b/docs/ja/integrations/data-visualization/images/metabase_07.png new file mode 100644 index 00000000000..404656531d8 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/metabase_07.png differ diff --git a/docs/ja/integrations/data-visualization/images/metabase_08.png b/docs/ja/integrations/data-visualization/images/metabase_08.png new file mode 100644 index 00000000000..3d1452648b5 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/metabase_08.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_01.png b/docs/ja/integrations/data-visualization/images/mitzu_01.png new file mode 100644 index 00000000000..9f3eb6c0a93 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_02.png b/docs/ja/integrations/data-visualization/images/mitzu_02.png new file mode 100644 index 00000000000..c98ae0fd711 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_03.png b/docs/ja/integrations/data-visualization/images/mitzu_03.png new file mode 100644 index 00000000000..e4a4d4c0558 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_04.png b/docs/ja/integrations/data-visualization/images/mitzu_04.png new file mode 100644 index 00000000000..e9274cd7a0a Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_05.png b/docs/ja/integrations/data-visualization/images/mitzu_05.png new file mode 100644 index 00000000000..dca2c7109f6 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_05.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_06.png b/docs/ja/integrations/data-visualization/images/mitzu_06.png new file mode 100644 index 00000000000..dee7598f9c1 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_06.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_07.png b/docs/ja/integrations/data-visualization/images/mitzu_07.png new file mode 100644 index 00000000000..95e2ba778cf Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_07.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_08.png b/docs/ja/integrations/data-visualization/images/mitzu_08.png new file mode 100644 index 00000000000..26b2c6a4fe6 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_08.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_09.png b/docs/ja/integrations/data-visualization/images/mitzu_09.png new file mode 100644 index 00000000000..b3d192a394a Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_09.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_10.png b/docs/ja/integrations/data-visualization/images/mitzu_10.png new file mode 100644 index 00000000000..630ffa79e2d Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_10.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_11.png b/docs/ja/integrations/data-visualization/images/mitzu_11.png new file mode 100644 index 00000000000..dd273052c31 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_11.png differ diff --git a/docs/ja/integrations/data-visualization/images/mitzu_12.png b/docs/ja/integrations/data-visualization/images/mitzu_12.png new file mode 100644 index 00000000000..91163e0c84f Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/mitzu_12.png differ diff --git a/docs/ja/integrations/data-visualization/images/omni_01.png b/docs/ja/integrations/data-visualization/images/omni_01.png new file mode 100644 index 00000000000..44363553e0a Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/omni_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/omni_02.png b/docs/ja/integrations/data-visualization/images/omni_02.png new file mode 100644 index 00000000000..6520b031e30 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/omni_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_01.png b/docs/ja/integrations/data-visualization/images/powerbi_01.png new file mode 100644 index 00000000000..beecd2f3e73 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_02.png b/docs/ja/integrations/data-visualization/images/powerbi_02.png new file mode 100644 index 00000000000..16ebb42b950 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_03.png b/docs/ja/integrations/data-visualization/images/powerbi_03.png new file mode 100644 index 00000000000..923fae266a9 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_04.png b/docs/ja/integrations/data-visualization/images/powerbi_04.png new file mode 100644 index 00000000000..8537f869dee Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_05.png b/docs/ja/integrations/data-visualization/images/powerbi_05.png new file mode 100644 index 00000000000..2c82b39c0b0 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_05.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_06.png b/docs/ja/integrations/data-visualization/images/powerbi_06.png new file mode 100644 index 00000000000..025c4b55784 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_06.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_07.png b/docs/ja/integrations/data-visualization/images/powerbi_07.png new file mode 100644 index 00000000000..6c85c225f01 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_07.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_08.png b/docs/ja/integrations/data-visualization/images/powerbi_08.png new file mode 100644 index 00000000000..4ae7901b77b Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_08.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_09.png b/docs/ja/integrations/data-visualization/images/powerbi_09.png new file mode 100644 index 00000000000..0f7bf60dff2 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_09.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_10.png b/docs/ja/integrations/data-visualization/images/powerbi_10.png new file mode 100644 index 00000000000..657c2d7d4b2 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_10.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_11.png b/docs/ja/integrations/data-visualization/images/powerbi_11.png new file mode 100644 index 00000000000..cdfc86ff09d Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_11.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_12.png b/docs/ja/integrations/data-visualization/images/powerbi_12.png new file mode 100644 index 00000000000..3756f70b563 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_12.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_13.png b/docs/ja/integrations/data-visualization/images/powerbi_13.png new file mode 100644 index 00000000000..f5bce5166ae Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_13.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_14.png b/docs/ja/integrations/data-visualization/images/powerbi_14.png new file mode 100644 index 00000000000..de81379958e Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_14.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_15.png b/docs/ja/integrations/data-visualization/images/powerbi_15.png new file mode 100644 index 00000000000..bff9861ba12 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_15.png differ diff --git a/docs/ja/integrations/data-visualization/images/powerbi_16.png b/docs/ja/integrations/data-visualization/images/powerbi_16.png new file mode 100644 index 00000000000..75d61fc7fac Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/powerbi_16.png differ diff --git a/docs/ja/integrations/data-visualization/images/quicksight_01.png b/docs/ja/integrations/data-visualization/images/quicksight_01.png new file mode 100644 index 00000000000..6ff51aa17cf Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/quicksight_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/quicksight_02.png b/docs/ja/integrations/data-visualization/images/quicksight_02.png new file mode 100644 index 00000000000..06f386e1e2e Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/quicksight_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/quicksight_03.png b/docs/ja/integrations/data-visualization/images/quicksight_03.png new file mode 100644 index 00000000000..78a7470f36d Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/quicksight_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/quicksight_04.png b/docs/ja/integrations/data-visualization/images/quicksight_04.png new file mode 100644 index 00000000000..2989cc4ed3b Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/quicksight_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/quicksight_05.png b/docs/ja/integrations/data-visualization/images/quicksight_05.png new file mode 100644 index 00000000000..742dc0d6715 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/quicksight_05.png differ diff --git a/docs/ja/integrations/data-visualization/images/quicksight_06.png b/docs/ja/integrations/data-visualization/images/quicksight_06.png new file mode 100644 index 00000000000..03eac2f2561 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/quicksight_06.png differ diff --git a/docs/ja/integrations/data-visualization/images/quicksight_07.png b/docs/ja/integrations/data-visualization/images/quicksight_07.png new file mode 100644 index 00000000000..9d9a444e402 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/quicksight_07.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_01.gif b/docs/ja/integrations/data-visualization/images/rocketbi_01.gif new file mode 100644 index 00000000000..e3356da7747 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_01.gif differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_02.gif b/docs/ja/integrations/data-visualization/images/rocketbi_02.gif new file mode 100644 index 00000000000..5b2e9fd6a1f Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_02.gif differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_03.png b/docs/ja/integrations/data-visualization/images/rocketbi_03.png new file mode 100644 index 00000000000..db9852d4cba Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_04.png b/docs/ja/integrations/data-visualization/images/rocketbi_04.png new file mode 100644 index 00000000000..6c5246b25cd Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_05.png b/docs/ja/integrations/data-visualization/images/rocketbi_05.png new file mode 100644 index 00000000000..dfc2f805115 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_05.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_06.png b/docs/ja/integrations/data-visualization/images/rocketbi_06.png new file mode 100644 index 00000000000..9565506839c Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_06.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_07.png b/docs/ja/integrations/data-visualization/images/rocketbi_07.png new file mode 100644 index 00000000000..45cb375761b Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_07.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_08.png b/docs/ja/integrations/data-visualization/images/rocketbi_08.png new file mode 100644 index 00000000000..213a8298b0e Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_08.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_09.png b/docs/ja/integrations/data-visualization/images/rocketbi_09.png new file mode 100644 index 00000000000..24494ec5084 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_09.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_10.png b/docs/ja/integrations/data-visualization/images/rocketbi_10.png new file mode 100644 index 00000000000..d986dacacf7 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_10.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_11.png b/docs/ja/integrations/data-visualization/images/rocketbi_11.png new file mode 100644 index 00000000000..40844806ba7 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_11.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_12.png b/docs/ja/integrations/data-visualization/images/rocketbi_12.png new file mode 100644 index 00000000000..8c34cee85db Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_12.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_13.png b/docs/ja/integrations/data-visualization/images/rocketbi_13.png new file mode 100644 index 00000000000..542cc0c5ef7 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_13.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_14.png b/docs/ja/integrations/data-visualization/images/rocketbi_14.png new file mode 100644 index 00000000000..f85769f0ea4 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_14.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_15.png b/docs/ja/integrations/data-visualization/images/rocketbi_15.png new file mode 100644 index 00000000000..d57adf3cac1 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_15.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_16.png b/docs/ja/integrations/data-visualization/images/rocketbi_16.png new file mode 100644 index 00000000000..bbf498a52ce Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_16.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_17.png b/docs/ja/integrations/data-visualization/images/rocketbi_17.png new file mode 100644 index 00000000000..ac2c9a5bc36 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_17.png differ diff --git a/docs/ja/integrations/data-visualization/images/rocketbi_18.png b/docs/ja/integrations/data-visualization/images/rocketbi_18.png new file mode 100644 index 00000000000..e0db7cd199a Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/rocketbi_18.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_01.png b/docs/ja/integrations/data-visualization/images/superset_01.png new file mode 100644 index 00000000000..52788b720b6 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_02.png b/docs/ja/integrations/data-visualization/images/superset_02.png new file mode 100644 index 00000000000..6504d9f0ff9 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_03.png b/docs/ja/integrations/data-visualization/images/superset_03.png new file mode 100644 index 00000000000..149b7e98dd8 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_04.png b/docs/ja/integrations/data-visualization/images/superset_04.png new file mode 100644 index 00000000000..a98d7a36a36 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_05.png b/docs/ja/integrations/data-visualization/images/superset_05.png new file mode 100644 index 00000000000..aa6d01f95b6 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_05.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_06.png b/docs/ja/integrations/data-visualization/images/superset_06.png new file mode 100644 index 00000000000..09a08d25c6a Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_06.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_07.png b/docs/ja/integrations/data-visualization/images/superset_07.png new file mode 100644 index 00000000000..c231203f716 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_07.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_08.png b/docs/ja/integrations/data-visualization/images/superset_08.png new file mode 100644 index 00000000000..3d40c421718 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_08.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_09.png b/docs/ja/integrations/data-visualization/images/superset_09.png new file mode 100644 index 00000000000..a69e32d49fe Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_09.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_10.png b/docs/ja/integrations/data-visualization/images/superset_10.png new file mode 100644 index 00000000000..8ee9f50e6af Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_10.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_11.png b/docs/ja/integrations/data-visualization/images/superset_11.png new file mode 100644 index 00000000000..40060fc7fdd Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_11.png differ diff --git a/docs/ja/integrations/data-visualization/images/superset_12.png b/docs/ja/integrations/data-visualization/images/superset_12.png new file mode 100644 index 00000000000..1251aa82179 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/superset_12.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_clickhousesettings.png b/docs/ja/integrations/data-visualization/images/tableau_clickhousesettings.png new file mode 100644 index 00000000000..cc609279eca Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_clickhousesettings.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_connecttoserver.png b/docs/ja/integrations/data-visualization/images/tableau_connecttoserver.png new file mode 100644 index 00000000000..b5a6376e65a Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_connecttoserver.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_desktop_01.png b/docs/ja/integrations/data-visualization/images/tableau_desktop_01.png new file mode 100644 index 00000000000..c233dcdde7f Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_desktop_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_desktop_02.png b/docs/ja/integrations/data-visualization/images/tableau_desktop_02.png new file mode 100644 index 00000000000..54bd68e390c Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_desktop_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_desktop_03.png b/docs/ja/integrations/data-visualization/images/tableau_desktop_03.png new file mode 100644 index 00000000000..6587b7d99fd Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_desktop_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_desktop_04.png b/docs/ja/integrations/data-visualization/images/tableau_desktop_04.png new file mode 100644 index 00000000000..28f80e067a3 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_desktop_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_desktop_05.png b/docs/ja/integrations/data-visualization/images/tableau_desktop_05.png new file mode 100644 index 00000000000..650b90b4fce Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_desktop_05.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_newworkbook.png b/docs/ja/integrations/data-visualization/images/tableau_newworkbook.png new file mode 100644 index 00000000000..eefacd53250 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_newworkbook.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_online_01.png b/docs/ja/integrations/data-visualization/images/tableau_online_01.png new file mode 100644 index 00000000000..a169e606f5b Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_online_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_online_02.png b/docs/ja/integrations/data-visualization/images/tableau_online_02.png new file mode 100644 index 00000000000..a5f856e7f14 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_online_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_online_03.png b/docs/ja/integrations/data-visualization/images/tableau_online_03.png new file mode 100644 index 00000000000..62ccc9d06b2 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_online_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_online_04.png b/docs/ja/integrations/data-visualization/images/tableau_online_04.png new file mode 100644 index 00000000000..c6994773a7c Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_online_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_showtables.png b/docs/ja/integrations/data-visualization/images/tableau_showtables.png new file mode 100644 index 00000000000..dc0b00b5599 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_showtables.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_tpcdschema.png b/docs/ja/integrations/data-visualization/images/tableau_tpcdschema.png new file mode 100644 index 00000000000..3c191b46fac Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_tpcdschema.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_workbook1.png b/docs/ja/integrations/data-visualization/images/tableau_workbook1.png new file mode 100644 index 00000000000..695097574d3 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_workbook1.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_workbook2.png b/docs/ja/integrations/data-visualization/images/tableau_workbook2.png new file mode 100644 index 00000000000..fbac3f71e5d Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_workbook2.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_workbook3.png b/docs/ja/integrations/data-visualization/images/tableau_workbook3.png new file mode 100644 index 00000000000..d5efed5ff13 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_workbook3.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_workbook4.png b/docs/ja/integrations/data-visualization/images/tableau_workbook4.png new file mode 100644 index 00000000000..4855d888c45 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_workbook4.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_workbook5.png b/docs/ja/integrations/data-visualization/images/tableau_workbook5.png new file mode 100644 index 00000000000..2b0cb26d9c9 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_workbook5.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_workbook6.png b/docs/ja/integrations/data-visualization/images/tableau_workbook6.png new file mode 100644 index 00000000000..9f38512eb1f Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_workbook6.png differ diff --git a/docs/ja/integrations/data-visualization/images/tableau_workbook7.png b/docs/ja/integrations/data-visualization/images/tableau_workbook7.png new file mode 100644 index 00000000000..2ad5c8409c4 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/tableau_workbook7.png differ diff --git a/docs/ja/integrations/data-visualization/images/zing_01.png b/docs/ja/integrations/data-visualization/images/zing_01.png new file mode 100644 index 00000000000..ffb8338b369 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/zing_01.png differ diff --git a/docs/ja/integrations/data-visualization/images/zing_02.png b/docs/ja/integrations/data-visualization/images/zing_02.png new file mode 100644 index 00000000000..9b74019b5f5 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/zing_02.png differ diff --git a/docs/ja/integrations/data-visualization/images/zing_03.png b/docs/ja/integrations/data-visualization/images/zing_03.png new file mode 100644 index 00000000000..2f76d36070f Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/zing_03.png differ diff --git a/docs/ja/integrations/data-visualization/images/zing_04.png b/docs/ja/integrations/data-visualization/images/zing_04.png new file mode 100644 index 00000000000..02f5be00fd5 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/zing_04.png differ diff --git a/docs/ja/integrations/data-visualization/images/zing_05.png b/docs/ja/integrations/data-visualization/images/zing_05.png new file mode 100644 index 00000000000..08d7b845a09 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/zing_05.png differ diff --git a/docs/ja/integrations/data-visualization/images/zing_06.png b/docs/ja/integrations/data-visualization/images/zing_06.png new file mode 100644 index 00000000000..f3522c5f242 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/zing_06.png differ diff --git a/docs/ja/integrations/data-visualization/images/zing_07.png b/docs/ja/integrations/data-visualization/images/zing_07.png new file mode 100644 index 00000000000..771fcaa06ca Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/zing_07.png differ diff --git a/docs/ja/integrations/data-visualization/images/zing_08.png b/docs/ja/integrations/data-visualization/images/zing_08.png new file mode 100644 index 00000000000..668028d211e Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/zing_08.png differ diff --git a/docs/ja/integrations/data-visualization/images/zing_09.png b/docs/ja/integrations/data-visualization/images/zing_09.png new file mode 100644 index 00000000000..3e88c504592 Binary files /dev/null and b/docs/ja/integrations/data-visualization/images/zing_09.png differ diff --git a/docs/ja/integrations/data-visualization/looker-and-clickhouse.md b/docs/ja/integrations/data-visualization/looker-and-clickhouse.md new file mode 100644 index 00000000000..8e8387ac801 --- /dev/null +++ b/docs/ja/integrations/data-visualization/looker-and-clickhouse.md @@ -0,0 +1,60 @@ +--- +sidebar_label: Looker +slug: /ja/integrations/looker +keywords: [clickhouse, looker, connect, integrate, ui] +description: Lookerã¯ã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§ã‚¤ãƒ³ã‚µã‚¤ãƒˆã‚’探索ã—共有ã™ã‚‹ã®ã«å½¹ç«‹ã¤ã‚¨ãƒ³ã‚¿ãƒ¼ãƒ—ライズプラットフォームã§ã‚ã‚Šã€BIã€ãƒ‡ãƒ¼ã‚¿ã‚¢ãƒ—リケーションã€ãŠã‚ˆã³çµ„ã¿è¾¼ã¿åˆ†æžã‚’æä¾›ã—ã¾ã™ã€‚ +--- + +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Looker + +Lookerã¯ã€å…¬å¼ã®ClickHouseデータソースを通ã˜ã¦ã€ClickHouse Cloudã¾ãŸã¯ã‚ªãƒ³ãƒ—レミスã®ãƒ‡ãƒ—ロイメントã«æŽ¥ç¶šã§ãã¾ã™ã€‚ + +## 1. 接続詳細ã®åŽé›† + + +## 2. ClickHouseデータソースを作æˆã™ã‚‹ + +管ç†è€… -> データベース -> 接続ã«ç§»å‹•ã—ã€å³ä¸Šã®ã€ŒæŽ¥ç¶šã‚’追加ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚ + +æ–°ã—ã„接続を追加 +
+ +データソースã®åå‰ã‚’é¸æŠžã—ã€æ–¹è¨€ã®ãƒ‰ãƒ­ãƒƒãƒ—ダウンã‹ã‚‰ `ClickHouse` ã‚’é¸ã³ã¾ã™ã€‚フォームã«è³‡æ ¼æƒ…報を入力ã—ã¾ã™ã€‚ + +資格情報を指定 +
+ +ClickHouse Cloudを使用ã—ã¦ã„ã‚‹å ´åˆã‚„デプロイメントã«SSLãŒå¿…è¦ãªå ´åˆã¯ã€è¿½åŠ ã®è¨­å®šã§SSLをオンã«ã—ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +SSLを有効化 +
+ +ã¾ãšæŽ¥ç¶šã‚’テストã—ã€ãã‚ŒãŒå®Œäº†ã—ãŸã‚‰ã€æ–°ã—ã„ClickHouseデータソースã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +接続テスト完了 +
+ +ã“ã‚Œã§ã€Lookerプロジェクトã«ClickHouseデータソースをアタッãƒã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +## 3. 既知ã®åˆ¶é™äº‹é … + +1. 以下ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æ–‡å­—列ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™: + * Array - JDBCドライãƒãƒ¼ã®åˆ¶é™ã«ã‚ˆã‚Šã‚·ãƒªã‚¢ãƒ«åŒ–ãŒäºˆæœŸã—ãŸé€šã‚Šã«å‹•ä½œã—ã¾ã›ã‚“ + * Decimal* - モデル内ã§æ•°å€¤ã«å¤‰æ›´ã§ãã¾ã™ + * LowCardinality(...) - モデル内ã§é©åˆ‡ãªåž‹ã«å¤‰æ›´ã§ãã¾ã™ + * Enum8, Enum16 + * UUID + * Tuple + * Map + * JSON + * Nested + * FixedString + * Geo types + * MultiPolygon + * Polygon + * Point + * Ring +2. [対称集計機能](https://cloud.google.com/looker/docs/reference/param-explore-symmetric-aggregates)ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ +3. [フル外部çµåˆ](https://cloud.google.com/looker/docs/reference/param-explore-join-type#full_outer)ã¯ãƒ‰ãƒ©ã‚¤ãƒãƒ¼ã§ã¾ã å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã›ã‚“ diff --git a/docs/ja/integrations/data-visualization/looker-studio-and-clickhouse.md b/docs/ja/integrations/data-visualization/looker-studio-and-clickhouse.md new file mode 100644 index 00000000000..fb09f2736d2 --- /dev/null +++ b/docs/ja/integrations/data-visualization/looker-studio-and-clickhouse.md @@ -0,0 +1,67 @@ +--- +sidebar_label: Looker Studio +slug: /ja/integrations/lookerstudio +keywords: [clickhouse, looker, studio, connect, mysql, integrate, ui] +description: Looker Studio(以å‰ã®Googleデータスタジオ)ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’カスタマイズå¯èƒ½ãªæƒ…報報告書やダッシュボードã«å¤‰æ›ã™ã‚‹ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ„ールã§ã™ã€‚ +--- + +import MySQLCloudSetup from '@site/docs/ja/_snippets/_clickhouse_mysql_cloud_setup.mdx'; +import MySQLOnPremiseSetup from '@site/docs/ja/_snippets/_clickhouse_mysql_on_premise_setup.mdx'; + +# Looker Studio + +Looker Studioã¯ã€å…¬å¼ã®Google MySQLデータソースを使用ã—ã¦ã€MySQLインターフェース経由ã§ClickHouseã«æŽ¥ç¶šã§ãã¾ã™ã€‚ + +## ClickHouse Cloudã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ— + + +## オンプレミスClickHouseサーãƒãƒ¼ã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ— + + +## Looker Studioã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +ã¾ãšã€https://lookerstudio.google.com ã«Googleアカウントã§ãƒ­ã‚°ã‚¤ãƒ³ã—ã€æ–°ã—ã„データソースを作æˆã—ã¾ã™ã€‚ + +æ–°ã—ã„データソースã®ä½œæˆ +
+ +GoogleãŒæä¾›ã™ã‚‹å…¬å¼ã®MySQLコãƒã‚¯ã‚¿ï¼ˆå称ã¯å˜ã«**MySQL**)を検索ã—ã¾ã™ã€‚ + +MySQLコãƒã‚¯ã‚¿ã®æ¤œç´¢ +
+ +接続ã®è©³ç´°ã‚’指定ã—ã¾ã™ã€‚MySQLインターフェースã®ãƒãƒ¼ãƒˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§9004ã§ã€ã‚µãƒ¼ãƒãƒ¼ã®è¨­å®šã«ã‚ˆã£ã¦ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +接続ã®è©³ç´°ã‚’指定 +
+ +次ã«ã€ClickHouseã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹æ–¹æ³•ã‚’2ã¤é¸ã¶ã“ã¨ãŒã§ãã¾ã™ã€‚ã¾ãšã€ãƒ†ãƒ¼ãƒ–ルブラウザ機能を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +テーブルブラウザã®ä½¿ç”¨ +
+ +ã¾ãŸã¯ã€ã‚«ã‚¹ã‚¿ãƒ ã‚¯ã‚¨ãƒªã‚’指定ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +カスタムクエリを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾— +
+ +最後ã«ã€ã‚¤ãƒ³ãƒˆãƒ­ã‚¹ãƒšã‚¯ãƒˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル構造を確èªã—ã€å¿…è¦ã«å¿œã˜ã¦ãƒ‡ãƒ¼ã‚¿åž‹ã‚’調整ã§ãã¾ã™ã€‚ + +イントロスペクトã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル構造ã®è¡¨ç¤º +
+ +ã“ã‚Œã§ã€ãƒ‡ãƒ¼ã‚¿ã®æŽ¢æŸ»ã‚„æ–°ã—ã„レãƒãƒ¼ãƒˆã®ä½œæˆã‚’進ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ + +## ClickHouse Cloudã§Looker Studioを使用ã™ã‚‹ + +ClickHouse Cloudを使用ã™ã‚‹å ´åˆã€æœ€åˆã«MySQLインターフェースを有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚接続ダイアログã®ã€ŒMySQLã€ã‚¿ãƒ–ã§ãれを行ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +MySQLã®æœ‰åŠ¹åŒ–ãŒå¿…è¦ +
+ +Looker Studioã®UIã§ã€ŒSSLを有効ã«ã™ã‚‹ã€ã‚ªãƒ—ションをé¸æŠžã—ã¾ã™ã€‚ClickHouse Cloudã®SSL証明書ã¯[Let's Encrypt](https://letsencrypt.org/certificates/)ã«ã‚ˆã‚Šç½²åã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ«ãƒ¼ãƒˆè¨¼æ˜Žæ›¸ã‚’[ã“ã¡ã‚‰](https://letsencrypt.org/certs/isrgrootx1.pem)ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ + +ClickHouse Cloudã§ã®SSL設定 +
+ +ãã®å¾Œã®æ‰‹é †ã¯ã€å‰è¿°ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«è¨˜è¼‰ã•ã‚Œã¦ã„る手順ã¨åŒã˜ã§ã™ã€‚ diff --git a/docs/ja/integrations/data-visualization/metabase-and-clickhouse.md b/docs/ja/integrations/data-visualization/metabase-and-clickhouse.md new file mode 100644 index 00000000000..5a12200f8c8 --- /dev/null +++ b/docs/ja/integrations/data-visualization/metabase-and-clickhouse.md @@ -0,0 +1,90 @@ +--- +sidebar_label: Metabase +sidebar_position: 131 +slug: /ja/integrations/metabase +keywords: [clickhouse, metabase, 接続, çµ±åˆ, UI] +description: Metabaseã¯ã€ãƒ‡ãƒ¼ã‚¿ã«é–¢ã™ã‚‹è³ªå•ã‚’ã™ã‚‹ãŸã‚ã®ä½¿ã„ã‚„ã™ã„オープンソースã®UIツールã§ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Metabaseã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +Metabaseã¯ã€ãƒ‡ãƒ¼ã‚¿ã«é–¢ã™ã‚‹è³ªå•ã‚’ã™ã‚‹ãŸã‚ã®ä½¿ã„ã‚„ã™ã„オープンソースã®UIツールã§ã™ã€‚Metabaseã¯Javaアプリケーションã§ã‚ã‚Šã€JARファイルをダウンロードã—ã¦`java -jar metabase.jar`ã§å®Ÿè¡Œã™ã‚‹ã ã‘ã§å‹•ä½œã—ã¾ã™ã€‚Metabaseã¯ã€JDBCドライãƒãƒ¼ã‚’使用ã—ã¦ClickHouseã«æŽ¥ç¶šã—ã¾ã™ã€‚ã“ã®ãƒ‰ãƒ©ã‚¤ãƒãƒ¼ã¯ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦`plugins`フォルダã«é…ç½®ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## 目的 + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€Metabaseを使用ã—ã¦ClickHouseã®ãƒ‡ãƒ¼ã‚¿ã«é–¢ã™ã‚‹ã„ãã¤ã‹ã®è³ªå•ã‚’ã—ã¦ã€å›žç­”を視覚化ã—ã¾ã™ã€‚ãã®å›žç­”ã®ä¸€ä¾‹ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + + Pie Chart +

+ +:::tip データを追加ã™ã‚‹ +作業ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒãªã„å ´åˆã¯ã€ä¾‹ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’追加ã§ãã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯[UK Price Paid](/docs/ja/getting-started/example-datasets/uk-price-paid.md)データセットを使用ã™ã‚‹ãŸã‚ã€ãれをé¸ã¶ã“ã¨ã‚‚ã§ãã¾ã™ã€‚åŒã˜ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚«ãƒ†ã‚´ãƒªã«ã¯ä»–ã«ã‚‚ã„ãã¤ã‹ã®é¸æŠžè‚¢ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## 1. 接続ã®è©³ç´°ã‚’集ã‚ã‚‹ + + +## 2. Metabase用ã®ClickHouseプラグインをダウンロードã™ã‚‹ + +1. `plugins`フォルダãŒãªã„å ´åˆã¯ã€`metabase.jar`ãŒä¿å­˜ã•ã‚Œã¦ã„る場所ã®ã‚µãƒ–フォルダã¨ã—ã¦ä½œæˆã—ã¦ãã ã•ã„。 + +2. プラグインã¯`clickhouse.metabase-driver.jar`ã¨ã„ã†åå‰ã®JARファイルã§ã™ã€‚最新ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®JARファイルをhttps://github.com/clickhouse/metabase-clickhouse-driver/releases/latestã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ãã ã•ã„。 + +3. `clickhouse.metabase-driver.jar`ã‚’`plugins`フォルダã«ä¿å­˜ã—ã¾ã™ã€‚ + +4. ドライãƒãƒ¼ãŒæ­£ã—ã読ã¿è¾¼ã¾ã‚Œã‚‹ã‚ˆã†ã«Metabaseを開始(ã¾ãŸã¯å†èµ·å‹•ï¼‰ã—ã¾ã™ã€‚ + +5. Metabaseã‚’http://hostname:3000ã§ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚åˆå›žèµ·å‹•æ™‚ã«ã¯ã‚¦ã‚§ãƒ«ã‚«ãƒ ç”»é¢ãŒè¡¨ç¤ºã•ã‚Œã€ä¸€é€£ã®è³ªå•ã‚’通éŽã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚データベースã®é¸æŠžã‚’促ã•ã‚ŒãŸå ´åˆã¯ã€ã€Œ**後ã§ãƒ‡ãƒ¼ã‚¿ã‚’追加ã—ã¾ã™**ã€ã‚’é¸æŠžã—ã¦ãã ã•ã„: + +## 3. Metabaseã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +1. å³ä¸Šã®æ­¯è»Šã‚¢ã‚¤ã‚³ãƒ³ã‚’クリックã—ã¦ã€**Admin Settings**ã‚’é¸æŠžã—ã€Metabase管ç†ãƒšãƒ¼ã‚¸ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ + +2. **データベースを追加**をクリックã—ã¾ã™ã€‚ã¾ãŸã¯ã€**データベース**タブをクリックã—ã¦ã€**データベースを追加**ボタンをé¸æŠžã—ã¾ã™ã€‚ + +3. ドライãƒãƒ¼ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãŒæ­£å¸¸ã«è¡Œã‚ã‚ŒãŸå ´åˆã¯ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンメニューã®**データベースタイプ**ã¨ã—ã¦**ClickHouse**ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + + Add a ClickHouse database + +4. データベースã«**表示å**を付ã‘ã¾ã™ã€‚ã“ã‚Œã¯Metabaseã®è¨­å®šã§ã‚ã‚‹ãŸã‚ã€ä»»æ„ã®åå‰ã‚’使用ã§ãã¾ã™ã€‚ + +5. ClickHouseデータベースã®æŽ¥ç¶šè©³ç´°ã‚’入力ã—ã¾ã™ã€‚ClickHouseサーãƒãƒ¼ãŒSSLを使用ã™ã‚‹ã‚ˆã†ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ã‚»ã‚­ãƒ¥ã‚¢æŽ¥ç¶šã‚’有効ã«ã—ã¾ã™ã€‚例: + + Connection details + +6. **ä¿å­˜**ボタンをクリックã™ã‚‹ã¨ã€Metabaseã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ†ãƒ¼ãƒ–ルをスキャンã—ã¾ã™ã€‚ + +## 4. SQLクエリを実行ã™ã‚‹ + +1. å³ä¸Šã®**Exit admin**ボタンをクリックã—ã¦**管ç†è¨­å®š**を終了ã—ã¾ã™ã€‚ + +2. å³ä¸Šã®**+ New**メニューをクリックã™ã‚‹ã¨ã€è³ªå•ã‚’è¡Œã„ã€SQLクエリを実行ã—ã€ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + + New menu + +3. 例ãˆã°ã€1995å¹´ã‹ã‚‰2022å¹´ã¾ã§ã®å¹´ã”ã¨ã®å¹³å‡ä¾¡æ ¼ã‚’è¿”ã™`uk_price_paid`テーブルã«å¯¾ã—ã¦å®Ÿè¡Œã•ã‚ŒãŸSQLクエリã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + + Run a SQL query + +## 5. 質å•ã‚’ã™ã‚‹ + +1. **+ New**をクリックã—ã€**Question**ã‚’é¸æŠžã—ã¾ã™ã€‚データベースã¨ãƒ†ãƒ¼ãƒ–ルを基ã«è³ªå•ã‚’構築ã§ãã¾ã™ã€‚例ãˆã°ã€ä»¥ä¸‹ã®è³ªå•ã¯`default`データベース内ã®`uk_price_paid`テーブルã«é–¢ã™ã‚‹ã‚‚ã®ã§ã™ã€‚グレーター・マンãƒã‚§ã‚¹ã‚¿ãƒ¼éƒ¡å†…ã®ç”ºã”ã¨ã®å¹³å‡ä¾¡æ ¼ã‚’計算ã™ã‚‹ç°¡å˜ãªè³ªå•ã§ã™ï¼š + + New question + +2. **Visualize**ボタンをクリックã—ã¦ã€çµæžœã‚’表形å¼ã§è¡¨ç¤ºã—ã¾ã™ã€‚ + + New question + +3. çµæžœã®ä¸‹ã«ã‚ã‚‹**Visualization**ボタンをクリックã—ã¦ã€è¦–覚化を棒グラフ(ã¾ãŸã¯ä»–ã®åˆ©ç”¨å¯èƒ½ãªã‚ªãƒ—ションã®ã„ãšã‚Œã‹ï¼‰ã«å¤‰æ›´ã—ã¾ã™ï¼š + + Pie Chart visualization + +## 詳ã—ã学㶠+ +MetabaseãŠã‚ˆã³ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã®æ§‹ç¯‰æ–¹æ³•ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€Metabaseã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’訪å•ã—ã¦ãã ã•ã„。 + +## 関連コンテンツ + +- ブログ: [データã®è¦–覚化 - 第3部 - Metabase](https://clickhouse.com/blog/visualizing-data-with-metabase) diff --git a/docs/ja/integrations/data-visualization/mitzu-and-clickhouse.md b/docs/ja/integrations/data-visualization/mitzu-and-clickhouse.md new file mode 100644 index 00000000000..1e088bc9c28 --- /dev/null +++ b/docs/ja/integrations/data-visualization/mitzu-and-clickhouse.md @@ -0,0 +1,161 @@ +--- +sidebar_label: Mitzu +slug: /ja/integrations/mitzu +keywords: [clickhouse, mitzu, connect, integrate, ui] +description: Mitzuã¯ãƒŽãƒ¼ã‚³ãƒ¼ãƒ‰ã®ãƒ‡ãƒ¼ã‚¿ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹ãƒã‚¤ãƒ†ã‚£ãƒ–製å“分æžã‚¢ãƒ—リケーションã§ã™ã€‚ +--- + +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Mitzuã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +Mitzuã¯ãƒŽãƒ¼ã‚³ãƒ¼ãƒ‰ã®ãƒ‡ãƒ¼ã‚¿ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹ãƒã‚¤ãƒ†ã‚£ãƒ–製å“分æžã‚¢ãƒ—リケーションã§ã™ã€‚Amplitudeã€Mixpanelã€Posthogã¨åŒæ§˜ã«ã€Mitzuã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒSQLã‚„Pythonã®çŸ¥è­˜ãªã—ã«è£½å“使用データをクエリã§ãるよã†ã«ã—ã¾ã™ã€‚Mitzuã¯ä¼æ¥­ã®è£½å“使用データをコピーã™ã‚‹ã®ã§ã¯ãªãã€ä¼æ¥­ã®ãƒ‡ãƒ¼ã‚¿ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹ã‚„データレイク上ã§ãƒã‚¤ãƒ†ã‚£ãƒ–ãªSQLクエリを生æˆã—ã¾ã™ã€‚ + +## 目的 + +本ガイドã§ã¯ä»¥ä¸‹ã‚’ã‚«ãƒãƒ¼ã—ã¾ã™ï¼š + +- データウェアãƒã‚¦ã‚¹ãƒã‚¤ãƒ†ã‚£ãƒ–ã®è£½å“åˆ†æž +- Mitzuã‚’ClickHouseã«çµ±åˆã™ã‚‹æ–¹æ³• + +:::tip サンプルデータセット +Mitzuã§ä½¿ç”¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒãªã„å ´åˆã¯ã€NYC Taxi Dataを使用ã§ãã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯Clickhouse Cloudã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ +::: + +## 1. 接続情報を集ã‚ã‚‹ + + + +## 2. Mitzuã«ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã¾ãŸã¯ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ— + +最åˆã®ã‚¹ãƒ†ãƒƒãƒ—ã¨ã—ã¦[https://app.mitzu.io](https://app.mitzu.io)ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã—ã¦ãã ã•ã„。 + +サインイン + +## 3. ワークスペースを作æˆã™ã‚‹ + +組織を作æˆã—ãŸå¾Œã€æœ€åˆã®ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’作æˆã™ã‚‹ã‚ˆã†ã«æ±‚ã‚られã¾ã™ã€‚ + +ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’ä½œæˆ + +## 4. Mitzuã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +ワークスペースãŒä½œæˆã•ã‚ŒãŸã‚‰ã€æŽ¥ç¶šæƒ…報を手動ã§è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +接続情報を設定 + +ガイド付ãオンボーディングã§ã¯ã€Mitzuã¯å˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルã¨çµ±åˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +> ClickHouseセットアップã§è£½å“分æžã‚’è¡Œã†ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®ã„ãã¤ã‹ã®é‡è¦ãªã‚«ãƒ©ãƒ ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +> +> 以下ãŒãã®ã‚«ãƒ©ãƒ ã§ã™ï¼š +> +> - **ユーザーID** - ユーザーã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªè­˜åˆ¥å­ã®ã‚«ãƒ©ãƒ ã€‚ +> - **イベント時間** - イベントã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã®ã‚«ãƒ©ãƒ ã€‚ +> - オプション[**イベントå**] - テーブルã«è¤‡æ•°ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚¿ã‚¤ãƒ—ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¤ãƒ™ãƒ³ãƒˆã‚’セグメントã™ã‚‹ã‚«ãƒ©ãƒ ã€‚ + +テーブル接続を設定 + +
+ +:::tip 追加ã®ãƒ†ãƒ¼ãƒ–ルを追加 +最åˆã®ã‚¬ã‚¤ãƒ‰ä»˜ãセットアップãŒå®Œäº†ã—ãŸå¾Œã€è¿½åŠ ã®ãƒ†ãƒ¼ãƒ–ルを追加ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚以下をå‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## 5. イベントカタログを作æˆã™ã‚‹ + +オンボーディングã®æœ€çµ‚ステップã¯ã€`イベントカタログ`ã®ä½œæˆã§ã™ã€‚ + +ã‚¤ãƒ™ãƒ³ãƒˆã‚«ã‚¿ãƒ­ã‚°ã‚’ä½œæˆ + +ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã¯ã€ä¸Šè¨˜ã§å®šç¾©ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã™ã¹ã¦ã®ã‚¤ãƒ™ãƒ³ãƒˆã¨ãã®ãƒ—ロパティを見ã¤ã‘ã¾ã™ã€‚ +ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ã‚µã‚¤ã‚ºã«ã‚ˆã‚Šã¾ã™ãŒã€æ•°åˆ†ã‹ã‹ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +ã™ã¹ã¦ãŒã†ã¾ãã„ã‘ã°ã€ã‚¤ãƒ™ãƒ³ãƒˆã‚’探索ã™ã‚‹æº–å‚™ãŒæ•´ã„ã¾ã™ã€‚ +探索ã™ã‚‹ + +## 6. セグメンテーションクエリを実行ã™ã‚‹ + +Mitzuã§ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ã‚°ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã€Amplitudeã€Mixpanelã€Posthogã¨åŒæ§˜ã«ç°¡å˜ã§ã™ã€‚ + +探索ページã®å·¦å´ã§ã‚¤ãƒ™ãƒ³ãƒˆã‚’é¸æŠžã—ã€æ™‚間軸ã®è¨­å®šã¯ä¸Šéƒ¨ã§è¡Œã„ã¾ã™ã€‚ + +セグメンテーション + +
+ +:::tip フィルターã¨ãƒ–レークダウン +フィルタリングã¯æœŸå¾…通りã«è¡Œãˆã¾ã™ã€‚プロパティ(ClickHouseカラム)をé¸ã³ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã—ãŸã„値をドロップダウンã‹ã‚‰é¸æŠžã—ã¾ã™ã€‚ +ブレークダウンã®å ´åˆã¯ã€ä»»æ„ã®ã‚¤ãƒ™ãƒ³ãƒˆã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロパティをé¸æŠžã—ã¾ã™ï¼ˆãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロパティを統åˆã™ã‚‹æ–¹æ³•ã¯ä»¥ä¸‹ã‚’å‚照)。 +::: + +## 7. ファãƒãƒ«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ + +ファãƒãƒ«ã®ãŸã‚ã«æœ€å¤§9ステップをé¸æŠžã—ã¾ã™ã€‚ファãƒãƒ«ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å®Œäº†ã•ã‚Œã‚‹æ™‚é–“æž ã‚’é¸æŠžã—ã¾ã™ã€‚ +å˜ä¸€è¡Œã®SQLコードを書ãã“ã¨ãªãã€ã™ãã«ã‚³ãƒ³ãƒãƒ¼ã‚¸ãƒ§ãƒ³çŽ‡ã®æ´žå¯Ÿã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ファãƒãƒ« + +
+ +:::tip 傾å‘を視覚化ã™ã‚‹ +`ファãƒãƒ«å‚¾å‘`ã‚’é¸æŠžã—ã¦ã€æ™‚é–“ã®çµŒéŽã¨ã¨ã‚‚ã«ãƒ•ã‚¡ãƒãƒ«ã®å‚¾å‘を視覚化ã—ã¾ã™ã€‚ +::: + +## 8. リテンションクエリを実行ã™ã‚‹ + +リテンション率計算ã®ãŸã‚ã«æœ€å¤§2ステップをé¸æŠžã—ã¾ã™ã€‚å†å¸°çš„ãªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’é¸æŠžã™ã‚‹ãŸã‚ã®ãƒªãƒ†ãƒ³ã‚·ãƒ§ãƒ³ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’é¸æŠžã—ã¾ã™ã€‚ +å˜ä¸€ã®SQLコードを書ãã“ã¨ãªãã€ã™ãã«ã‚³ãƒ³ãƒãƒ¼ã‚¸ãƒ§ãƒ³çŽ‡ã®æ´žå¯Ÿã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +リテンション + +
+ +:::tip コホートリテンション +`週間コホートリテンション`ã‚’é¸æŠžã—ã¦ã€ãƒªãƒ†ãƒ³ã‚·ãƒ§ãƒ³çŽ‡ãŒæ™‚é–“ã®çµŒéŽã¨ã¨ã‚‚ã«ã©ã®ã‚ˆã†ã«å¤‰åŒ–ã—ã¦ã„ã‚‹ã‹ã‚’視覚化ã—ã¾ã™ã€‚ +::: + +## 9. SQLãƒã‚¤ãƒ†ã‚£ãƒ– + +Mitzuã¯SQLãƒã‚¤ãƒ†ã‚£ãƒ–ã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€Exploreページã§é¸æŠžã—ãŸæ§‹æˆã«åŸºã¥ã„ã¦ãƒã‚¤ãƒ†ã‚£ãƒ–SQLコードを生æˆã—ã¾ã™ã€‚ + +SQLãƒã‚¤ãƒ†ã‚£ãƒ– + +
+ +:::tip BIツールã§ä½œæ¥­ã‚’続ã‘ã‚‹ +Mitzuã®UIã§åˆ¶é™ã«é”ã—ãŸå ´åˆã€SQLコードをコピーã—ã¦BIツールã§ä½œæ¥­ã‚’続ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +## 10. イベントテーブルを追加ã™ã‚‹ + +複数ã®ãƒ†ãƒ¼ãƒ–ルã«è£½å“使用イベントをä¿å­˜ã—ã¦ã„ã‚‹å ´åˆã€ãれらをイベントカタログã«ã‚‚追加ã§ãã¾ã™ã€‚ +ページ上部ã®ã‚®ã‚¢ã‚¢ã‚¤ã‚³ãƒ³ã‹ã‚‰ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹è¨­å®šãƒšãƒ¼ã‚¸ã«ç§»å‹•ã—ã€ã‚¤ãƒ™ãƒ³ãƒˆãƒ†ãƒ¼ãƒ–ルタブをé¸æŠžã—ã¾ã™ã€‚ + +ClickHouseウェアãƒã‚¦ã‚¹ã‹ã‚‰æ®‹ã‚Šã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ†ãƒ¼ãƒ–ルを追加ã—ã¾ã™ã€‚ + +追加ã®ãƒ†ãƒ¼ãƒ–ル + +
+ +ã™ã¹ã¦ã®ä»–ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ†ãƒ¼ãƒ–ルをワークスペースã«è¿½åŠ ã—ãŸã‚‰ã€ãれらも設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +**ユーザーID**ã€**イベント時間**ã€ãŠã‚ˆã³ã‚ªãƒ—ションã§**イベントå**カラムを設定ã—ã¾ã™ã€‚ + +テーブルを設定 + +設定ボタンをクリックã—ã€ä¸€æ‹¬ã§ã“れらã®ã‚«ãƒ©ãƒ ã‚’設定ã—ã¾ã™ã€‚ +Mitzuã«ã¯æœ€å¤§5000テーブルを追加ã§ãã¾ã™ã€‚ + +最後ã«ã€**イベントカタログをä¿å­˜ã—ã¦æ›´æ–°**ã™ã‚‹ã“ã¨ã‚’忘れãªã„ã§ãã ã•ã„。 + +## Mitzuサãƒãƒ¼ãƒˆ + +è¿·ã£ãŸå ´åˆã¯ã€[support@mitzu.io](email://support@mitzu.io)ã¾ã§ãŠæ°—軽ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 + +ã¾ãŸã¯ã€Slackコミュニティã«[ã“ã¡ã‚‰](https://join.slack.com/t/mitzu-io/shared_invite/zt-1h1ykr93a-_VtVu0XshfspFjOg6sczKg)ã‹ã‚‰å‚加ã§ãã¾ã™ã€‚ + +## 詳細を学㶠+ +Mitzuã«é–¢ã™ã‚‹è©³ç´°æƒ…å ±ã¯[mitzu.io](https://mitzu.io)ã‚’ã”覧ãã ã•ã„。 + +ドキュメントページã¯[docs.mitzu.io](https://docs.mitzu.io)ã«è¨ªå•ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/data-visualization/omni-and-clickhouse.md b/docs/ja/integrations/data-visualization/omni-and-clickhouse.md new file mode 100644 index 00000000000..286aa0e7c3f --- /dev/null +++ b/docs/ja/integrations/data-visualization/omni-and-clickhouse.md @@ -0,0 +1,30 @@ +--- +sidebar_label: Omni +slug: /ja/integrations/omni +keywords: [clickhouse, omni, connect, integrate, ui] +description: Omniã¯ã€BIã€ãƒ‡ãƒ¼ã‚¿ã‚¢ãƒ—リケーションã€åŸ‹ã‚è¾¼ã¿åˆ†æžã®ãŸã‚ã®ã‚¨ãƒ³ã‚¿ãƒ¼ãƒ—ライズプラットフォームã§ã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§ã‚¤ãƒ³ã‚µã‚¤ãƒˆã‚’探索ã—共有ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ +--- + +import ConnectionDetails from '@site/docs/ja/\_snippets/\_gather_your_details_http.mdx'; + +# Omni + +Omniã¯ã€å…¬å¼ã®ClickHouseデータソースを通ã˜ã¦ã€ClickHouse Cloudã¾ãŸã¯ã‚ªãƒ³ãƒ—レミス展開ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 1. 接続情報をåŽé›†ã™ã‚‹ + + + +## 2. ClickHouseデータソースを作æˆã™ã‚‹ + +Admin -> Connectionsã«ç§»å‹•ã—ã€å³ä¸Šã®ã€ŒAdd Connectionã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚ + +æ–°ã—ã„接続ã®è¿½åŠ  +
+ +`ClickHouse`ã‚’é¸æŠžã—ã€ãƒ•ã‚©ãƒ¼ãƒ ã«è³‡æ ¼æƒ…報を入力ã—ã¾ã™ã€‚ + +資格情報ã®æŒ‡å®š +
+ +ã“ã‚Œã§ã€Omniã§ClickHouseã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã€å¯è¦–化ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ diff --git a/docs/ja/integrations/data-visualization/powerbi-and-clickhouse.md b/docs/ja/integrations/data-visualization/powerbi-and-clickhouse.md new file mode 100644 index 00000000000..1baa8b5e29b --- /dev/null +++ b/docs/ja/integrations/data-visualization/powerbi-and-clickhouse.md @@ -0,0 +1,168 @@ +--- +sidebar_label: Power BI +slug: /ja/integrations/powerbi +keywords: [ clickhouse, powerbi, connect, integrate, ui ] +description: Microsoft Power BIã¯ã€ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ã«ä¸»çœ¼ã‚’ç½®ã„ã¦MicrosoftãŒé–‹ç™ºã—ãŸã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‡ãƒ¼ã‚¿å¯è¦–化ソフトウェア製å“ã§ã™ã€‚ +--- + +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Power BI + +Power BIã¯ã€[ODBCドライãƒãƒ¼](https://github.com/ClickHouse/clickhouse-odbc)ã‚„[ClickHouseãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿](https://github.com/ClickHouse/power-bi-clickhouse)を使用ã—ã¦ã€ClickHouse Cloudã¾ãŸã¯ã‚ªãƒ³ãƒ—レミスã®ãƒ‡ãƒ—ロイメントã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ã©ã¡ã‚‰ã®æ–¹æ³•ã‚‚ロードモードをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ãŒã€å¾Œè€…ã¯Direct Queryモードもサãƒãƒ¼ãƒˆã—ã€ãƒ†ãƒ¼ãƒ–ル全体をロードã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã›ã‚“。 + +ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ã¯ã€ã“れらã®æ–¹æ³•ã®ã©ã¡ã‚‰ã‹ã‚’使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€ãƒ—ロセスを案内ã—ã¾ã™ã€‚ +
+
+
+ +# ClickHouseãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ + +## 1. 接続情報を集ã‚ã‚‹ + + + +## 2. ClickHouse ODBCクライアントをインストールã™ã‚‹ + +最新ã®ClickHouse ODBCリリースを[ã“ã¡ã‚‰](https://github.com/ClickHouse/clickhouse-odbc/releases)ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ãã ã•ã„。付属ã®`.msi`インストーラーを実行ã—ã€ã‚¦ã‚£ã‚¶ãƒ¼ãƒ‰ã«å¾“ã£ã¦ãã ã•ã„。"デãƒãƒƒã‚°ã‚·ãƒ³ãƒœãƒ«"ã¯ã‚ªãƒ—ションã§å¿…è¦ã‚ã‚Šã¾ã›ã‚“ã®ã§ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã¾ã¾ã§å¤§ä¸ˆå¤«ã§ã™ã€‚ + +ODBCドライãƒãƒ¼ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« +
+ +ドライãƒãƒ¼ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãŒå®Œäº†ã—ãŸã‚‰ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãŒæˆåŠŸã—ãŸã“ã¨ã‚’確èªã§ãã¾ã™ã€‚スタートメニューã§ODBCを検索ã—ã€ã€ŒODBCデータソース **(64-bit)**ã€ã‚’é¸æŠžã—ã¾ã™ã€‚ + +æ–°ã—ã„ODBCデータソースã®ä½œæˆ +
+ +ClickHouseドライãƒãƒ¼ãŒãƒªã‚¹ãƒˆã«ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +ODBCã®å­˜åœ¨ç¢ºèª +
+ +ã¾ã Power BIãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€[Power BI Desktopをダウンロードã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«](https://www.microsoft.com/en-us/download/details.aspx?id=58494)ã—ã¦ãã ã•ã„。 + +## 3. ClickHouseãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ã‚’インストールã™ã‚‹ + +* カスタムコãƒã‚¯ã‚¿ãƒ¼ç”¨ã«æ¬¡ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’作æˆã—ã¾ã™ï¼š[Documents]\Power BI Desktop\Custom Connectors +* 最新ã®ãƒªãƒªãƒ¼ã‚¹ (.mezファイル) ã‚’[Releases Section](https://github.com/ClickHouse/power-bi-clickhouse/releases)ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã€å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ä½œæˆã—ãŸãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«é…ç½®ã—ã¾ã™ã€‚ +* Power BIã‚’é–‹ãã€ç½²åã•ã‚Œã¦ã„ãªã„コãƒã‚¯ã‚¿ã®èª­ã¿è¾¼ã¿ã‚’有効ã«ã—ã¾ã™ï¼šãƒ•ã‚¡ã‚¤ãƒ« -> オプションã¨è¨­å®š -> オプション -> セキュリティ -> データ拡張 -> 警告ãªã—ã¾ãŸã¯æ¤œè¨¼ãªã—ã§ä»»æ„ã®æ‹¡å¼µæ©Ÿèƒ½ã‚’ロードã™ã‚‹ã“ã¨ã‚’è¨±å¯ + +ç½²åã•ã‚Œã¦ã„ãªã„コãƒã‚¯ã‚¿ã®èª­ã¿è¾¼ã¿ã‚’有効ã«ã™ã‚‹ +
+ +* Power BIã‚’å†èµ·å‹•ã—ã¾ã™ã€‚ + +## 4. Power BIã«ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ + +Power BI Desktopã®é–‹å§‹ç”»é¢ã§ã€ã€Œãƒ‡ãƒ¼ã‚¿å–å¾—ã€ã‚’クリックã—ã¾ã™ã€‚ + +Power BI Desktopã®é–‹å§‹ +
+ +「ClickHouseConnector (Beta)ã€ã‚’検索ã—ã¾ã™ã€‚ + +データソースã®é¸æŠž +
+ +コãƒã‚¯ã‚¿ã‚’é¸æŠžã—ã€æ¬¡ã®ãƒœãƒƒã‚¯ã‚¹ã‚’埋ã‚ã¾ã™ï¼š + +* サーãƒãƒ¼ï¼ˆå¿…須フィールド) - インスタンスã®ãƒ‰ãƒ¡ã‚¤ãƒ³/アドレス。プレフィックス/サフィックスãªã—ã§è¿½åŠ ã—ã¦ãã ã•ã„。 +* ãƒãƒ¼ãƒˆï¼ˆå¿…須フィールド) - インスタンスã®ãƒãƒ¼ãƒˆã€‚ +* データベース - データベースå。 +* オプション - [ClickHouse ODBC GitHubページ](https://github.com/ClickHouse/clickhouse-odbc#configuration)ã«ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„ã‚‹ä»»æ„ã®ODBCオプション +* データ接続モード - ClickHouseã«ç›´æŽ¥ã‚¯ã‚¨ãƒªã‚’è¡Œã†ãŸã‚ã«DirectQueryã‚’é¸æŠžã—ã¾ã™ã€‚å°ã•ãªè² è·ãŒã‚ã‚‹å ´åˆã¯ã€ã‚¤ãƒ³ãƒãƒ¼ãƒˆãƒ¢ãƒ¼ãƒ‰ã‚’é¸æŠžã—ã€ãƒ‡ãƒ¼ã‚¿å…¨ä½“ã‚’Power BIã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouseインスタンス情報ã®å…¥åŠ› +
+ +* ユーザーåã¨ãƒ‘スワードを指定ã—ã¾ã™ã€‚ + +ユーザーåã¨ãƒ‘スワードã®ãƒ—ロンプト +
+ +最後ã«ã€Navigatorビューã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ã€‚希望ã®ãƒ†ãƒ¼ãƒ–ルをé¸æŠžã—ã€ã€Œãƒ­ãƒ¼ãƒ‰ã€ã‚’クリックã—ã¦ClickHouseã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +Navigatorビュー +
+ +インãƒãƒ¼ãƒˆãŒå®Œäº†ã™ã‚‹ã¨ã€é€šå¸¸é€šã‚ŠPower BIã§ClickHouseデータã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ +
+ +## Power BIサービス + +クラウドã§ã®ä½¿ç”¨ã«ã¤ã„ã¦ã¯ã€Microsoftã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。オンプレミスデータゲートウェイを使用ã—ã¦[カスタムデータコãƒã‚¯ã‚¿ã‚’使用ã™ã‚‹](https://learn.microsoft.com/en-us/power-bi/connect-data/service-gateway-custom-connectors)方法をã”覧ãã ã•ã„。 +## +
+
+ +# ODBCドライãƒãƒ¼ + +上記ã®ãƒã‚¤ãƒ†ã‚£ãƒ–コãƒã‚¯ã‚¿ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚¹ãƒ†ãƒƒãƒ—1ã¨2ã«å¾“ã£ã¦ãã ã•ã„。 + +## 3. æ–°ã—ã„ユーザーDSNを作æˆã™ã‚‹ + +ドライãƒãƒ¼ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãŒå®Œäº†ã—ãŸã‚‰ã€ODBCデータソースを作æˆã§ãã¾ã™ã€‚スタートメニューã§ODBCを検索ã—ã€ã€ŒODBCデータソース (64-bit)ã€ã‚’é¸æŠžã—ã¾ã™ã€‚ + +æ–°ã—ã„ODBCデータソースã®ä½œæˆ +
+ +ã“ã“ã§æ–°ã—ã„ユーザーDSNを追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚å·¦ã®ã€Œè¿½åŠ ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚ + +æ–°ã—ã„ユーザーDSNã®è¿½åŠ  +
+ +ODBCドライãƒãƒ¼ã®Unicodeãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚ + +Unicodeãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®é¸æŠž +
+ +接続情報を入力ã—ã¾ã™ã€‚「ホストã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ã¯ãƒ—ロトコルをå«ã‚ãªã„ã§ãã ã•ã„(例: http:// ã‚„ https:// 部分をçœç•¥ï¼‰ã€‚ClickHouse Cloudを使用ã—ã¦ã„ã‚‹å ´åˆã‚„オンプレミスã®ãƒ‡ãƒ—ロイメントã§SSLãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ã€ŒSSLModeã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«requireã¨å…¥åŠ›ã—ã¾ã™ã€‚「タイムアウトã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å€¤ã¯ç§’å˜ä½ã§è¨­å®šã•ã‚Œã€çœç•¥ã•ã‚ŒãŸå ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã®30秒ã«ãªã‚Šã¾ã™ã€‚ + +接続情報 +
+ +## 4. Power BIã«ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ + +ã¾ã Power BIãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€[Power BI Desktopをダウンロードã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«](https://www.microsoft.com/en-us/download/details.aspx?id=58494)ã—ã¦ãã ã•ã„。 + +Power BI Desktopã®é–‹å§‹ç”»é¢ã§ã€ã€Œãƒ‡ãƒ¼ã‚¿å–å¾—ã€ã‚’クリックã—ã¾ã™ã€‚ + +Power BI Desktopã®é–‹å§‹ +
+ +「ãã®ä»–〠-> 「ODBCã€ã‚’é¸æŠžã—ã¾ã™ã€‚ + +データソースメニュー +
+ +リストã‹ã‚‰å…ˆã»ã©ä½œæˆã—ãŸãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’é¸æŠžã—ã¾ã™ã€‚ + +ODBCデータソースã®é¸æŠž +
+ +データソース作æˆæ™‚ã«ã™ã¹ã¦ã®è³‡æ ¼æƒ…報を指定ã—ãŸå ´åˆã€ã™ãã«æŽ¥ç¶šã™ã‚‹ã¯ãšã§ã™ã€‚ãã†ã§ãªã„å ´åˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードを指定ã™ã‚‹ã‚ˆã†æ±‚ã‚られã¾ã™ã€‚ + +Navigatorビュー +
+ +最後ã«ã€Navigatorビューã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ã€‚希望ã®ãƒ†ãƒ¼ãƒ–ルをé¸æŠžã—ã€ã€Œãƒ­ãƒ¼ãƒ‰ã€ã‚’クリックã—ã¦ClickHouseã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’インãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +Navigatorビュー +
+ +インãƒãƒ¼ãƒˆãŒå®Œäº†ã™ã‚‹ã¨ã€é€šå¸¸é€šã‚ŠPower BIã§ClickHouseデータã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ +
+
+ +:::note +UInt64ãªã©ã®ç¬¦å·ãªã—æ•´æ•°åž‹ã¯ã€è‡ªå‹•çš„ã«ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã›ã‚“。Power BIã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る最大ã®æ•´æ•°åž‹ã¯Int64ã§ã™ã€‚
+データを正ã—ãインãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€Navigatorã§ã€Œãƒ­ãƒ¼ãƒ‰ã€ãƒœã‚¿ãƒ³ã‚’押ã™å‰ã«ã€ã€Œãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã€ã‚’クリックã—ã¦ãã ã•ã„。 +::: + +ã“ã®ä¾‹ã§ã¯ã€`pageviews`テーブルã«UInt64カラムãŒã‚ã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ã€Œãƒã‚¤ãƒŠãƒªã€ã¨ã—ã¦èªè­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚「データを変æ›ã€ã‚’è¡Œã†ã“ã¨ã§ã€ã‚«ãƒ©ãƒ ã®åž‹ã‚’å†å‰²ã‚Šå½“ã¦ã—ã€ä¾‹ãˆã°Textã¨ã—ã¦è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +Navigatorビュー +
+ +完了ã—ãŸã‚‰ã€å·¦ä¸Šã®ã€Œé–‰ã˜ã¦é©ç”¨ã€ã‚’クリックã—ã€ãƒ‡ãƒ¼ã‚¿ã®ãƒ­ãƒ¼ãƒ‰ã‚’続行ã—ã¾ã™ã€‚ diff --git a/docs/ja/integrations/data-visualization/quicksight-and-clickhouse.md b/docs/ja/integrations/data-visualization/quicksight-and-clickhouse.md new file mode 100644 index 00000000000..18bb4954d4c --- /dev/null +++ b/docs/ja/integrations/data-visualization/quicksight-and-clickhouse.md @@ -0,0 +1,146 @@ +--- +sidebar_label: QuickSight +slug: /ja/integrations/quicksight +keywords: [clickhouse, aws, amazon, quicksight, mysql, connect, integrate, ui] +description: Amazon QuickSightã¯ã€ãƒã‚¤ãƒ‘ースケールã§çµ±ä¸€ã•ã‚ŒãŸãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ï¼ˆBI)をæä¾›ã™ã‚‹ãƒ‡ãƒ¼ã‚¿é§†å‹•ã®çµ„織をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +--- + +import MySQLOnPremiseSetup from '@site/docs/ja/_snippets/_clickhouse_mysql_on_premise_setup.mdx'; + +# QuickSight + +QuickSightã¯ã€å…¬å¼ã®MySQLデータソースãŠã‚ˆã³Direct Queryモードを使用ã—ã¦ã€MySQLインターフェースを介ã—ã¦ã‚ªãƒ³ãƒ—レミスã®ClickHouseセットアップ(23.11+)ã«æŽ¥ç¶šã§ãã¾ã™ã€‚ + +## オンプレミスClickHouseサーãƒãƒ¼ã®è¨­å®š + +MySQLインターフェースを有効ã«ã—ãŸClickHouseサーãƒãƒ¼ã®è¨­å®šæ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[å…¬å¼ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://clickhouse.com/docs/ja/interfaces/mysql)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +サーãƒãƒ¼ã®`config.xml`ã«ã‚¨ãƒ³ãƒˆãƒªã‚’追加ã™ã‚‹ã“ã¨ã«åŠ ãˆã¦ + +```xml + + 9004 + +``` + +Double SHA1パスワード暗å·åŒ–を使用ã™ã‚‹ã“ã¨ãŒ_å¿…é ˆ_ã§ã™ã€‚ユーザーãŒMySQLインターフェースを使用ã™ã‚‹éš›ã®è¨­å®šã§ã™ã€‚ + +シェルã‹ã‚‰Double SHA1ã§æš—å·åŒ–ã•ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãƒ‘スワードを生æˆã™ã‚‹ã«ã¯: + +```shell +PASSWORD=$(base64 < /dev/urandom | head -c16); echo "$PASSWORD"; echo -n "$PASSWORD" | sha1sum | tr -d '-' | xxd -r -p | sha1sum | tr -d '-' +``` + +出力ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +``` +LZOQYnqQN4L/T6L0 +fbc958cc745a82188a51f30de69eebfc67c40ee4 +``` + +1行目ãŒç”Ÿæˆã•ã‚ŒãŸãƒ‘スワードã§ã€2行目ãŒClickHouseを設定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã‚‹ãƒãƒƒã‚·ãƒ¥ã§ã™ã€‚ + +以下ã¯ã€ç”Ÿæˆã•ã‚ŒãŸãƒãƒƒã‚·ãƒ¥ã‚’使用ã™ã‚‹`mysql_user`ã®è¨­å®šä¾‹ã§ã™: + +`/etc/clickhouse-server/users.d/mysql_user.xml` + +```xml + + + fbc958cc745a82188a51f30de69eebfc67c40ee4 + + ::/0 + + default + default + + +``` + +`password_double_sha1_hex`ã®ã‚¨ãƒ³ãƒˆãƒªã‚’ã€è‡ªåˆ†ã§ç”Ÿæˆã—ãŸDouble SHA1ãƒãƒƒã‚·ãƒ¥ã«ç½®ãæ›ãˆã¦ãã ã•ã„。 + +QuickSightã¯ã€MySQLユーザーã®ãƒ—ロファイルã«ã„ãã¤ã‹ã®è¿½åŠ è¨­å®šãŒå¿…è¦ã§ã™ã€‚ + +`/etc/clickhouse-server/users.d/mysql_user.xml` + +```xml + + + 1 + 1 + 1 + 1 + + +``` + +ãŸã ã—ã€ã“れをデフォルトã®ã‚‚ã®ã§ã¯ãªãã€MySQLユーザーãŒä½¿ç”¨ã§ãる別ã®ãƒ—ロファイルã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +最後ã«ã€ClickHouseサーãƒãƒ¼ã‚’希望ã™ã‚‹IPアドレスã§ãƒªãƒƒã‚¹ãƒ³ã™ã‚‹ã‚ˆã†ã«è¨­å®šã—ã¾ã™ã€‚ `config.xml`ã§ã€æ¬¡ã®éƒ¨åˆ†ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’解除ã—ã¦ã€ã™ã¹ã¦ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ãƒªãƒƒã‚¹ãƒ³ã™ã‚‹ã‚ˆã†ã«è¨­å®šã—ã¾ã™: + +```bash +:: +``` + +`mysql`ãƒã‚¤ãƒŠãƒªãŒåˆ©ç”¨å¯èƒ½ãªå ´åˆã¯ã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‹ã‚‰æŽ¥ç¶šã‚’テストã§ãã¾ã™ã€‚ 上記ã®ã‚µãƒ³ãƒ—ルユーザーå(`mysql_user`)ã¨ãƒ‘スワード(`LZOQYnqQN4L/T6L0`)を使用ã—ã¦ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã§æ¬¡ã®ã‚ˆã†ã«ã—ã¾ã™: + +```bash +mysql --protocol tcp -h localhost -u mysql_user -P 9004 --password=LZOQYnqQN4L/T6L0 +``` + +``` +mysql> show databases; ++--------------------+ +| name | ++--------------------+ +| INFORMATION_SCHEMA | +| default | +| information_schema | +| system | ++--------------------+ +4 rows in set (0.00 sec) +Read 4 rows, 603.00 B in 0.00156 sec., 2564 rows/sec., 377.48 KiB/sec. +``` + +## QuickSightã¨ClickHouseã®æŽ¥ç¶š + +ã¾ãšã€https://quicksight.aws.amazon.com ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã€[データセット] ã«ç§»å‹•ã—ã¦ã€ã€Œæ–°ã—ã„データセットã€ã‚’クリックã—ã¾ã™ã€‚ + +Creating a new dataset +
+ +QuickSightã«ãƒãƒ³ãƒ‰ãƒ«ã•ã‚Œã¦ã„ã‚‹å…¬å¼ã®MySQLコãƒã‚¯ã‚¿ï¼ˆ**MySQL**ã®ã¿ï¼‰ã‚’検索ã—ã¾ã™ã€‚ + +MySQL connector search +
+ +接続ã®è©³ç´°ã‚’指定ã—ã¾ã™ã€‚ MySQLインターフェースã®ãƒãƒ¼ãƒˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§9004ã§ã€ã‚µãƒ¼ãƒãƒ¼æ§‹æˆã«ã‚ˆã‚Šç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +Specifying the connection details +
+ +次ã«ã€ClickHouseã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹æ–¹æ³•ã¨ã—ã¦2ã¤ã®ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚ ã¾ãšã€ãƒªã‚¹ãƒˆã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルをé¸æŠžã™ã‚‹æ–¹æ³•ã§ã™ã€‚ + +Selecting a table from the list +
+ +ã‚ã‚‹ã„ã¯ã€ã‚«ã‚¹ã‚¿ãƒ SQLを指定ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +Using custom SQL to fetch the data +
+ +「データã®ç·¨é›†/プレビューã€ã‚’クリックã™ã‚‹ã¨ã€ã‚¤ãƒ³ãƒˆãƒ­ã‚¹ãƒšã‚¯ãƒˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル構造を確èªã™ã‚‹ã‹ã€ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹æ–¹æ³•ã¨ã—ã¦ã‚«ã‚¹ã‚¿ãƒ SQLを使用ã™ã‚‹å ´åˆã¯èª¿æ•´ã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +Viewing the introspected table structure +
+ +UIã®å·¦ä¸‹éš…ã§ã€ŒDirect Queryã€ãƒ¢ãƒ¼ãƒ‰ãŒé¸æŠžã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +Choosing the Direct Query mode +
+ +ã“ã‚Œã§ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®å…¬é–‹ã¨æ–°ã—ã„ビジュアル化ã®ä½œæˆã‚’進ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ + +## 既知ã®åˆ¶é™äº‹é … + +- SPICEインãƒãƒ¼ãƒˆã¯æœŸå¾…通りã«å‹•ä½œã—ã¾ã›ã‚“。Direct Queryモードを使用ã—ã¦ãã ã•ã„。[#58553](https://github.com/ClickHouse/ClickHouse/issues/58553)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/data-visualization/rocketbi-and-clickhouse.md b/docs/ja/integrations/data-visualization/rocketbi-and-clickhouse.md new file mode 100644 index 00000000000..71b887c70ec --- /dev/null +++ b/docs/ja/integrations/data-visualization/rocketbi-and-clickhouse.md @@ -0,0 +1,134 @@ +--- +sidebar_label: Rocket BI +sidebar_position: 131 +slug: /ja/integrations/rocketbi +keywords: [clickhouse, rocketbi, connect, integrate, ui] +description: RocketBIã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’迅速ã«åˆ†æžã—ã€ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã§ãƒ“ジュアライゼーションを構築ã—ã€ã‚¦ã‚§ãƒ–ブラウザ上ã§åŒåƒšã¨å…±åŒä½œæ¥­ã§ãるセルフサービスã®ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ãƒ—ラットフォームã§ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# 目標: 最åˆã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã™ã‚‹ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€Rocket.BIをインストールã—ã¦ç°¡å˜ãªãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã—ã¾ã™ã€‚ +以下ãŒãã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã§ã™ï¼š + +github_rocketbi2 +
+ +[ã“ã¡ã‚‰ã®ãƒªãƒ³ã‚¯ã‹ã‚‰ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’確èªã§ãã¾ã™ã€‚](https://demo.rocket.bi/dashboard/sales-dashboard-7?token=7eecf750-cbde-4c53-8fa8-8b905fec667e) + +## インストール + +事å‰ã«ãƒ“ルドã•ã‚ŒãŸDockerイメージを使用ã—ã¦RocketBIã‚’èµ·å‹•ã—ã¾ã™ã€‚ + +docker-compose.ymlã¨è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’å–å¾—ã—ã¾ã™ï¼š +``` +wget https://raw.githubusercontent.com/datainsider-co/rocket-bi/main/docker/docker-compose.yml +wget https://raw.githubusercontent.com/datainsider-co/rocket-bi/main/docker/.clickhouse.env +``` +.clickhouse.envを編集ã—ã€ClickHouseサーãƒãƒ¼ã®æƒ…報を追加ã—ã¾ã™ã€‚ + +以下ã®ã‚³ãƒžãƒ³ãƒ‰ã§RocketBIを開始ã—ã¾ã™ï¼š ```docker-compose up -d``` + +ブラウザã§```localhost:5050```ã‚’é–‹ãã€ã“ã¡ã‚‰ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã§ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã™ï¼š ```hello@gmail.com/123456``` + +ソースã‹ã‚‰ã®ãƒ“ルドや高度ãªè¨­å®šã«ã¤ã„ã¦ã¯ã€[Rocket.BI Readme](https://github.com/datainsider-co/rocket-bi/blob/main/README.md)ã‚’ã”å‚ç…§ãã ã•ã„。 + +## ダッシュボードを作ã£ã¦ã¿ã¾ã—ょㆠ+ +ダッシュボードã§ã¯ã€ãƒ¬ãƒãƒ¼ãƒˆã‚’見ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã€**+New**をクリックã—ã¦è¦–覚化を開始ã—ã¾ã™ã€‚ +ダッシュボードã§**無制é™ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰**ã¨**無制é™ã®ãƒãƒ£ãƒ¼ãƒˆ**を作æˆã§ãã¾ã™ã€‚ + +rocketbi_create_chart +
+ +YouTubeã§é«˜è§£åƒåº¦ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã‚’見る:[https://www.youtube.com/watch?v=TMkdMHHfvqY](https://www.youtube.com/watch?v=TMkdMHHfvqY) + +### ãƒãƒ£ãƒ¼ãƒˆã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’作æˆã™ã‚‹ + +#### ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’ä½œæˆ +タブフィルターã§ä½¿ç”¨ã—ãŸã„メトリックフィールドをé¸æŠžã—ã¾ã™ã€‚集計設定を確èªã—ã¦ãã ã•ã„。 + +rocketbi_chart_6 +
+ +フィルタã«åå‰ã‚’付ã‘ã€ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’ダッシュボードã«ä¿å­˜ã—ã¾ã™ã€‚ + +Metrics Control + +#### æ—¥ä»˜åž‹ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’ä½œæˆ +メインã®æ—¥ä»˜ã‚«ãƒ©ãƒ ã¨ã—ã¦æ—¥ä»˜ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’é¸æŠžã—ã¾ã™ï¼š + +rocketbi_chart_4 +
+ +ç•°ãªã‚‹ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—範囲ã§é‡è¤‡ãƒãƒªã‚¢ãƒ³ãƒˆã‚’追加ã—ã¾ã™ã€‚例ãˆã°ã€å¹´ã€æœˆã€æ—¥ä»˜ã‚„曜日ãªã©ã€‚ + +rocketbi_chart_5 +
+ +フィルタã«åå‰ã‚’付ã‘ã€ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’ダッシュボードã«ä¿å­˜ã—ã¾ã™ã€‚ + +Date Range Control + +### ã•ã‚ã€ãƒãƒ£ãƒ¼ãƒˆã‚’作りã¾ã—ょㆠ+ +#### 円グラフ: 地域別売上指標 +æ–°ã—ã„ãƒãƒ£ãƒ¼ãƒˆã‚’追加ã—ã€å††ã‚°ãƒ©ãƒ•ã‚’é¸æŠžã—ã¾ã™ã€‚ + +Add Pie Chart +
+ +ã¾ãšã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‹ã‚‰ã‚«ãƒ©ãƒ ã€ŒRegionã€ã‚’ドラッグ&ドロップã—ã¦å‡¡ä¾‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«é…ç½®ã—ã¾ã™ã€‚ + +Drag-n-drop Column to Chart +
+ +ãã®å¾Œã€ãƒãƒ£ãƒ¼ãƒˆã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚¿ãƒ–ã«ç§»å‹•ã—ã¾ã™ã€‚ + +Navigate to Chart Control in Visualization +
+ +メトリクスコントロールを値フィールドã«ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã—ã¾ã™ã€‚ + +Use Metrics Control in Chart +
+ +(メトリクスコントロールã¯ã‚½ãƒ¼ãƒˆã¨ã—ã¦ã‚‚使ãˆã¾ã™ï¼‰ + +ã•ã‚‰ãªã‚‹ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã®ãŸã‚ã«ãƒãƒ£ãƒ¼ãƒˆè¨­å®šã«ç§»å‹•ã—ã¾ã™ã€‚ + +Custom the Chart with Setting +
+ +例ãˆã°ã€ãƒ‡ãƒ¼ã‚¿ãƒ©ãƒ™ãƒ«ã‚’パーセンテージã«å¤‰æ›´ã—ã¾ã™ã€‚ + +Chart Customization Example +
+ +ãƒãƒ£ãƒ¼ãƒˆã‚’ä¿å­˜ã—ã¦ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã«è¿½åŠ ã—ã¾ã™ã€‚ + +Overview Dashboard with Pie Chart + +#### 時系列ãƒãƒ£ãƒ¼ãƒˆã«æ—¥ä»˜ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’使用 +ç©ã¿ä¸Šã’カラムãƒãƒ£ãƒ¼ãƒˆã‚’使用ã—ã¾ã—ょã†ã€‚ + +Create a Time-series chart with Tab Control +
+ +ãƒãƒ£ãƒ¼ãƒˆã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã§ã€ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’Y軸ã€æ—¥ä»˜ç¯„囲をX軸ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +Use Date Range as Controller +
+ +地域カラムをブレークダウンã«è¿½åŠ ã—ã¾ã™ã€‚ + +Add Region into Breakdown +
+ +KPIã¨ã—ã¦ãƒŠãƒ³ãƒãƒ¼ãƒãƒ£ãƒ¼ãƒˆã‚’追加ã—ã€ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’目立ãŸã›ã¾ã™ã€‚ + +Screenshot 2022-11-17 at 10 43 29 +
+ +ã“ã‚Œã§ã€rocket.BIを使ã£ã¦æœ€åˆã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’無事ã«ä½œæˆã—ã¾ã—ãŸã€‚ diff --git a/docs/ja/integrations/data-visualization/splunk-and-clickhouse.md b/docs/ja/integrations/data-visualization/splunk-and-clickhouse.md new file mode 100644 index 00000000000..e4617b3d4ea --- /dev/null +++ b/docs/ja/integrations/data-visualization/splunk-and-clickhouse.md @@ -0,0 +1,178 @@ +--- +sidebar_label: Splunk +sidebar_position: 198 +slug: /ja/integrations/splunk +keywords: [splunk, integration, data visualization] +description: SplunkダッシュボードをClickHouseã«æŽ¥ç¶šã™ã‚‹ +--- + +# Splunkã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +Splunkã¯ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã¨å¯è¦³æ¸¬æ€§ã®ãŸã‚ã®äººæ°—ã®ã‚る技術ã§ã™ã€‚ã¾ãŸã€å¼·åŠ›ãªæ¤œç´¢ã‚¨ãƒ³ã‚¸ãƒ³ã¨ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚¨ãƒ³ã‚¸ãƒ³ã§ã‚‚ã‚ã‚Šã¾ã™ã€‚ã•ã¾ã–ã¾ãªãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«å¯¾å¿œã™ã‚‹ãŸã‚ã®æ•°ç™¾ã®SplunkアプリãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +ClickHouseã«ç‰¹åŒ–ã—ãŸåˆ©ç”¨ã¨ã—ã¦ã€[Splunk DB Connect App](https://splunkbase.splunk.com/app/2686)を活用ã—ã€ClickHouse JDBCドライãƒãƒ¼ã‚’使ã£ã¦ClickHouseã®ãƒ†ãƒ¼ãƒ–ルを直接クエリã—ã¾ã™ã€‚ + +ã“ã®çµ±åˆã®ç†æƒ³çš„ãªãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã¯ã€ClickHouseã‚’netflowã€Avroã¾ãŸã¯Protobufãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã€DNSã€VPCフローログã€ãã®ä»–ã®OTELログã®ã‚ˆã†ãªå¤§è¦æ¨¡ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã®ãŸã‚ã«ä½¿ç”¨ã—ã¦ã„ã‚‹å ´åˆã§ã™ã€‚ã“れらã®ãƒ‡ãƒ¼ã‚¿ã¯Splunk上ã§æ¤œç´¢ã‚„ダッシュボード作æˆã‚’è¡Œã†ãŸã‚ã«ãƒãƒ¼ãƒ ã¨å…±æœ‰ã§ãã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã‚’使用ã™ã‚‹ã“ã¨ã§ã€ãƒ‡ãƒ¼ã‚¿ã¯Splunkã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ¬ã‚¤ãƒ¤ãƒ¼ã«å–ã‚Šè¾¼ã¾ã‚Œãšã€[Metabase](https://www.metabase.com/)ã‚„[Superset](https://superset.apache.org/)ã®ã‚ˆã†ãªä»–ã®ãƒ“ジュアライゼーション統åˆã¨åŒæ§˜ã«ClickHouseã‹ã‚‰ç›´æŽ¥ã‚¯ã‚¨ãƒªã•ã‚Œã¾ã™ã€‚ + +## 目標 + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ClickHouse JDBCドライãƒãƒ¼ã‚’使用ã—ã¦ClickHouseã‚’Splunkã«æŽ¥ç¶šã—ã¾ã™ã€‚ローカル版ã®Splunk Enterpriseをインストールã—ã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹åŒ–ã•ã‚Œã¾ã›ã‚“。代ã‚ã‚Šã«ã€DB Connectクエリエンジンを通ã—ã¦æ¤œç´¢æ©Ÿèƒ½ã‚’使用ã—ã¾ã™ã€‚ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã‚’使用ã™ã‚‹ã¨ã€ClickHouseã«æŽ¥ç¶šã•ã‚ŒãŸä»¥ä¸‹ã®ã‚ˆã†ãªãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã§ãã¾ã™ï¼š + +![Splunk 1](../images/splunk/splunk-1.png) + +:::note +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯[ニューヨーク市タクシーデータセット](https://clickhouse.com/docs/ja/getting-started/example-datasets/nyc-taxi)を使用ã—ã¾ã™ã€‚ä»–ã«ã‚‚使用å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯[当社ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](http://localhost:3000/docs/en/getting-started/example-datasets)ã«ã‚ã‚Šã¾ã™ã€‚ +::: + +## å‰ææ¡ä»¶ + +開始ã™ã‚‹å‰ã«å¿…è¦ãªã‚‚ã®ï¼š +- 検索ヘッド機能を使用ã™ã‚‹ãŸã‚ã®Splunk Enterprise +- ãŠä½¿ã„ã®OSã¾ãŸã¯ã‚³ãƒ³ãƒ†ãƒŠã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹[Java Runtime Environment (JRE)](https://docs.splunk.com/Documentation/DBX/3.16.0/DeployDBX/Prerequisites) +- [Splunk DB Connect](https://splunkbase.splunk.com/app/2686) +- Splunk Enterprise OSインスタンスã¸ã®ç®¡ç†è€…アクセスã¾ãŸã¯SSHアクセス +- ClickHouse接続ã®è©³ç´° (ClickHouse Cloudを使用ã—ã¦ã„ã‚‹å ´åˆã®è©³ç´°ã¯[ã“ã¡ã‚‰](https://clickhouse.com/docs/ja/integrations/metabase#1-gather-your-connection-details)ã‚’å‚ç…§) + +## Splunk Enterpriseã«DB Connectをインストールã—ã¦è¨­å®šã™ã‚‹ + +ã¾ãšã€Splunk Enterpriseインスタンスã«Java Runtime Environmentをインストールã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚Dockerを使用ã—ã¦ã„ã‚‹å ´åˆã€`microdnf install java-11-openjdk`コマンドを使用ã§ãã¾ã™ã€‚ + +`java_home`パスをメモã—ã¦ãŠãã¾ã™ï¼š`java -XshowSettings:properties -version`。 + +Splunk Enterpriseã«DB Connect AppãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。Splunk Web UIã®Appsセクションã«ã‚ã‚Šã¾ã™ã€‚ +- Splunk Webã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦Apps > Find More Appsã«ç§»å‹•ã—ã¾ã™ã€‚ +- 検索ボックスを使用ã—ã¦DB Connectを見ã¤ã‘ã¾ã™ã€‚ +- Splunk DB Connectã®æ¨ªã®ç·‘色ã®ã€ŒInstallã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚ +- 「Restart Splunkã€ã‚’クリックã—ã¾ã™ã€‚ + +DB Connect Appã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€[ã“ã¡ã‚‰ã®ãƒªãƒ³ã‚¯](https://splunkbase.splunk.com/app/2686)ã‚’å‚ç…§ã—ã¦è¿½åŠ ã®æŒ‡ç¤ºã‚’å¾—ã¦ãã ã•ã„。 + +DB Connect AppãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ãŸã‚‰ã€java_homeパスをConfiguration -> Settingsã§DB Connect Appã«è¿½åŠ ã—ã€ä¿å­˜ã‚’クリックã—ã¦ãƒªã‚»ãƒƒãƒˆã—ã¾ã™ã€‚ + +![Splunk 2](../images/splunk/splunk-2.png) + +## ClickHouse用ã®JDBCを設定ã™ã‚‹ + +[ClickHouse JDBCドライãƒãƒ¼](https://github.com/ClickHouse/clickhouse-java)ã‚’DB Connect Driversフォルダã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ï¼š + +``` +$SPLUNK_HOME/etc/apps/splunk_app_db_connect/drivers +``` + +次ã«ã€ClickHouse JDBC Driverクラスã®è©³ç´°ã‚’追加ã™ã‚‹ãŸã‚ã«ã€`$SPLUNK_HOME/etc/apps/splunk_app_db_connect/default/db_connection_types.conf`ファイルã§æŽ¥ç¶šã‚¿ã‚¤ãƒ—ã®è¨­å®šã‚’編集ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ファイルã«æ¬¡ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’追加ã—ã¾ã™ï¼š + +``` +[ClickHouse] +displayName = ClickHouse +serviceClass = com.splunk.dbx2.DefaultDBX2JDBC +jdbcUrlFormat = jdbc:ch://:/ +jdbcUrlSSLFormat = jdbc:ch://:/?ssl=true +jdbcDriverClass = com.clickhouse.jdbc.ClickHouseDriver +ui_default_catalog = $database$ +``` + +`$SPLUNK_HOME/bin/splunk restart`を使ã£ã¦Splunkã‚’å†èµ·å‹•ã—ã¾ã™ã€‚ + +DB Connect Appã«æˆ»ã‚Šã€Configuration > Settings > Driversã«ç§»å‹•ã—ã¾ã™ã€‚ClickHouseã®æ¨ªã«ç·‘色ã®ãƒã‚§ãƒƒã‚¯ãƒžãƒ¼ã‚¯ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã‚‹ã¯ãšã§ã™ï¼š + +![Splunk 3](../images/splunk/splunk-3.png) + +## Splunk Searchã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +DB Connect App Configuration -> Databases -> Identitiesã«ç§»å‹•ã—ã€ClickHouseã®IDを作æˆã—ã¾ã™ã€‚ + +Configuration -> Databases -> Connectionsã‹ã‚‰ClickHouseã¸ã®æ–°ã—ã„接続を作æˆã—ã€ã€ŒNew Connectionã€ã‚’é¸æŠžã—ã¾ã™ã€‚ + + + +
+ +ClickHouseホストã®è©³ç´°ã‚’追加ã—ã€ã€ŒEnable SSLã€ã«ãƒã‚§ãƒƒã‚¯ã‚’入れる: + +![Splunk 5](../images/splunk/splunk-5.png) + +接続をä¿å­˜ã—ãŸå¾Œã€Splunkã«ClickHouseã«æ­£å¸¸ã«æŽ¥ç¶šã•ã‚Œã¾ã™ï¼ + +:::note +エラーãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€Splunkインスタンスã®IPアドレスãŒClickHouse Cloud IPアクセスリストã«è¿½åŠ ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。詳細ã¯[ã“ã¡ã‚‰ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://clickhouse.com/docs/ja/cloud/security/setting-ip-filters)ã‚’å‚ç…§ãã ã•ã„。 +::: + +## SQLクエリを実行ã™ã‚‹ + +ã™ã¹ã¦ãŒæ­£å¸¸ã«å‹•ä½œã™ã‚‹ã‹ãƒ†ã‚¹ãƒˆã™ã‚‹ãŸã‚ã«SQLクエリを実行ã—ã¾ã™ã€‚ + +DB Connect Appã®DataLabセクションã‹ã‚‰SQL Explorerã§æŽ¥ç¶šã®è©³ç´°ã‚’é¸æŠžã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¢ã§ã¯`trips`テーブルを使用ã—ã¾ã™ï¼š + +![Splunk 6](../images/splunk/splunk-6.png) + +テーブル内ã®ã™ã¹ã¦ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ã‚«ã‚¦ãƒ³ãƒˆã‚’è¿”ã™SQLクエリを`trips`テーブルã§å®Ÿè¡Œã—ã¾ã™ï¼š + +![Splunk 7](../images/splunk/splunk-7.png) + +クエリãŒæˆåŠŸã—ãŸå ´åˆã€çµæžœãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ã€‚ + +## ダッシュボードを作æˆã™ã‚‹ + +SQLã¨å¼·åŠ›ãªSplunk Processing Language (SPL)を組ã¿åˆã‚ã›ãŸãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã—ã¾ã—ょã†ã€‚ + +å…ˆã«é€²ã‚€å‰ã«ã€ã¾ãš[DPL Safeguardsã‚’éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–化](https://docs.splunk.com/Documentation/Splunk/9.2.1/Security/SPLsafeguards?ref=hk#Deactivate_SPL_safeguards)ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +最も頻ç¹ã«ãƒ”ックアップã•ã‚ŒãŸãƒˆãƒƒãƒ—10ã®åœ°åŸŸã‚’示ã™æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ï¼š + +```sql +dbxquery query="SELECT pickup_ntaname, count(*) AS count +FROM default.trips GROUP BY pickup_ntaname +ORDER BY count DESC LIMIT 10;" connection="chc" +``` + +カラムãƒãƒ£ãƒ¼ãƒˆã‚’作æˆã™ã‚‹ãŸã‚ã«å¯è¦–化タブをé¸æŠžã—ã¾ã™ï¼š + +![Splunk 8](../images/splunk/splunk-8.png) + +「Save As > Save to a Dashboardã€ã‚’クリックã—ã¦ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã—ã¾ã—ょã†ã€‚ + +次ã«ã€ä¹—客数ã«åŸºã¥ãå¹³å‡æ–™é‡‘を示ã™ã‚¯ã‚¨ãƒªã‚’追加ã—ã¾ã—ょã†ï¼š + +```sql +dbxquery query="SELECT passenger_count,avg(total_amount) +FROM default.trips GROUP BY passenger_count;" connection="chc" +``` + +今回ã¯ã€ãƒãƒ¼ãƒãƒ£ãƒ¼ãƒˆã®å¯è¦–化を作æˆã—ã€ä»¥å‰ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã«ä¿å­˜ã—ã¾ã™ã€‚ + +![Splunk 9](../images/splunk/splunk-9.png) + +最後ã«ã€ä¹—客数ã¨æ—…è¡Œè·é›¢ã®ç›¸é–¢ã‚’示ã™ã‚‚ã†ä¸€ã¤ã®ã‚¯ã‚¨ãƒªã‚’追加ã—ã¾ã™ï¼š + +```sql +dbxquery query="SELECT passenger_count, toYear(pickup_datetime) AS year, +round(trip_distance) AS distance, count(* FROM default.trips) +GROUP BY passenger_count, year, distance +ORDER BY year, count(*) DESC; " connection="chc" +``` + +最終的ãªãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +![Splunk 10](../images/splunk/splunk-10.png) + +## 時系列データ + +Splunkã«ã¯ã€ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã§æ™‚系列データã®å¯è¦–化ã¨ãƒ—レゼンテーションã«ä½¿ç”¨ã§ãる数百ã®çµ„ã¿è¾¼ã¿é–¢æ•°ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€æ™‚系列データã§å‹•ä½œã™ã‚‹ã‚¯ã‚¨ãƒªã‚’Splunkã§ä½œæˆã™ã‚‹ãŸã‚ã«ã€SQL + SPLを組ã¿åˆã‚ã›ã¾ã™ã€‚ + +```sql +dbxquery query="SELECT time, orig_h, duration +FROM "demo"."conn" WHERE time >= now() - interval 1 HOURS" connection="chc" +| eval time = strptime(time, "%Y-%m-%d %H:%M:%S.%3Q") +| eval _time=time +| timechart avg(duration) as duration by orig_h +| eval duration=round(duration/60) +| sort - duration: +``` + +## 詳細を学㶠+ +Splunk DB ConnectãŠã‚ˆã³ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰æ§‹ç¯‰ã«é–¢ã™ã‚‹è©³ç´°æƒ…報をãŠæŽ¢ã—ã®å ´åˆã€[Splunkã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://docs.splunk.com/Documentation)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/integrations/data-visualization/superset-and-clickhouse.md b/docs/ja/integrations/data-visualization/superset-and-clickhouse.md new file mode 100644 index 00000000000..dbb06612e5a --- /dev/null +++ b/docs/ja/integrations/data-visualization/superset-and-clickhouse.md @@ -0,0 +1,100 @@ +--- +sidebar_label: Superset +sidebar_position: 198 +slug: /ja/integrations/superset +keywords: [clickhouse, superset, connect, integrate, ui] +description: Apache Supersetã¯ã‚ªãƒ¼ãƒ—ンソースã®ãƒ‡ãƒ¼ã‚¿æŽ¢ç´¢ãŠã‚ˆã³è¦–覚化プラットフォームã§ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Supersetã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +Apache Supersetã¯ã€Pythonã§æ›¸ã‹ã‚ŒãŸã‚ªãƒ¼ãƒ—ンソースã®ãƒ‡ãƒ¼ã‚¿æŽ¢ç´¢ãŠã‚ˆã³è¦–覚化プラットフォームã§ã™ã€‚Supersetã¯ã€ClickHouseãŒæä¾›ã™ã‚‹Pythonドライãƒãƒ¼ã‚’使用ã—ã¦ClickHouseã«æŽ¥ç¶šã—ã¾ã™ã€‚ãã‚Œã§ã¯ã€ãã®æ–¹æ³•ã‚’見ã¦ã¿ã¾ã—ょã†... + +## 目的 + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ClickHouseデータベースã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’使用ã—ã¦Supersetã§ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã—ã¾ã™ã€‚ダッシュボードã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + + New Dashboard +

+ +:::tip データを追加ã™ã‚‹ +作業ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒãªã„å ´åˆã¯ã€ä¾‹ã®1ã¤ã‚’追加ã§ãã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯[UK Price Paid](/docs/ja/getting-started/example-datasets/uk-price-paid.md)データセットを使用ã™ã‚‹ã®ã§ã€ãれをé¸ã¶ã“ã¨ã‚‚ã§ãã¾ã™ã€‚åŒã˜ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚«ãƒ†ã‚´ãƒªã«ã¯ä»–ã«ã‚‚ã„ãã¤ã‹ã‚ã‚Šã¾ã™ã€‚ +::: + +## 1. 接続情報をåŽé›†ã™ã‚‹ + + +## 2. ドライãƒã‚’インストールã™ã‚‹ + +1. Supersetã¯`clickhouse-connect`ドライãƒãƒ¼ã‚’使用ã—ã¦ClickHouseã«æŽ¥ç¶šã—ã¾ã™ã€‚`clickhouse-connect`ã®è©³ç´°ã¯https://pypi.org/project/clickhouse-connect/ã«ã‚ã‚Šã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ãã¾ã™ï¼š + + ```console + pip install clickhouse-connect + ``` + +2. Supersetを開始(ã¾ãŸã¯å†èµ·å‹•ï¼‰ã—ã¾ã™ã€‚ + +## 3. Supersetã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +1. Superset内ã§ã€ä¸Šéƒ¨ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰**Data**ã‚’é¸æŠžã—ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンメニューã‹ã‚‰**Databases**ã‚’é¸æŠžã—ã¾ã™ã€‚**+ Database**ボタンをクリックã—ã¦æ–°ã—ã„データベースを追加ã—ã¾ã™ï¼š + + Add a new database + +2. 最åˆã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã‚¿ã‚¤ãƒ—ã¨ã—ã¦**ClickHouse Connect**ã‚’é¸æŠžã—ã¾ã™ï¼š + + Select ClickHouse + +3. 次ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã¯ï¼š + - SSLをオンã¾ãŸã¯ã‚ªãƒ•ã«è¨­å®šã—ã¾ã™ã€‚ + - å…ˆã»ã©åŽé›†ã—ãŸæŽ¥ç¶šæƒ…報を入力ã—ã¾ã™ã€‚ + - **DISPLAY NAME**を指定ã—ã¾ã™ã€‚ã“ã‚Œã¯ä»»æ„ã®åå‰ã«ã§ãã¾ã™ã€‚複数ã®ClickHouseデータベースã«æŽ¥ç¶šã™ã‚‹å ´åˆã¯ã€åå‰ã‚’より説明的ã«ã—ã¾ã™ã€‚ + + Test the connection + +4. **CONNECT**をクリックã—ã€ç¶šã‘ã¦**FINISH**ボタンをクリックã—ã¦ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ウィザードを完了ã—ã¾ã™ã€‚ã“ã‚Œã§ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ä¸€è¦§ã«è¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ã€‚ + +## 4. データセットを追加ã™ã‚‹ + +1. Supersetã§ClickHouseã®ãƒ‡ãƒ¼ã‚¿ã‚’æ“作ã™ã‚‹ã«ã¯ã€**_データセット_**を定義ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚Supersetã®ä¸Šéƒ¨ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰**Data**ã‚’é¸æŠžã—ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンメニューã‹ã‚‰**Datasets**ã‚’é¸æŠžã—ã¾ã™ã€‚ + +2. データセットを追加ã™ã‚‹ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚データソースã¨ã—ã¦æ–°ã—ã„データベースをé¸æŠžã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã«å®šç¾©ã•ã‚Œã¦ã„るテーブルãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + + New dataset + + +3. ダイアログウィンドウã®ä¸‹éƒ¨ã«ã‚ã‚‹**ADD**ボタンをクリックã™ã‚‹ã¨ã€ãƒ†ãƒ¼ãƒ–ルãŒãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãƒªã‚¹ãƒˆã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã“ã‚Œã§ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã—ã¦ClickHouseデータを分æžã™ã‚‹æº–å‚™ãŒæ•´ã„ã¾ã—ãŸï¼ + + +## 5. Supersetã§ãƒãƒ£ãƒ¼ãƒˆã¨ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã™ã‚‹ + +Supersetã«æ…£ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã®æ¬¡ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ç°¡å˜ã«æ„Ÿã˜ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。Supersetã«åˆã‚ã¦è§¦ã‚Œã‚‹æ–¹ã‚‚ã€ä»–ã®å¤šãã®è¦–覚化ツールã¨ä¼¼ã¦ãŠã‚Šã€å§‹ã‚ã‚‹ã®ã«æ™‚é–“ã¯ã‹ã‹ã‚Šã¾ã›ã‚“ãŒã€è©³ç´°ã¨å¾®å¦™ãªç‚¹ã¯ä½¿ç”¨ã—ã¦ã„ã中ã§å­¦ã‚“ã§ã„ãã¾ã™ã€‚ + +1. 最åˆã«ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã—ã¾ã™ã€‚Supersetã®ä¸Šéƒ¨ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰**Dashboards**ã‚’é¸æŠžã—ã¾ã™ã€‚å³ä¸Šã®ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦æ–°ã—ã„ダッシュボードを追加ã—ã¾ã™ã€‚次ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã¯**UK property prices**ã¨ã„ã†åå‰ã§ã™ï¼š + + New dashboard + +2. æ–°ã—ã„ãƒãƒ£ãƒ¼ãƒˆã‚’作æˆã™ã‚‹ã«ã¯ã€ä¸Šéƒ¨ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰**Charts**ã‚’é¸æŠžã—ã€æ–°ã—ã„ãƒãƒ£ãƒ¼ãƒˆã‚’追加ã™ã‚‹ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚多数ã®ã‚ªãƒ—ションãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚次ã®ä¾‹ã¯ã€**uk_price_paid**データセットを使用ã—ãŸ**Pie Chart**ãƒãƒ£ãƒ¼ãƒˆã‚’示ã—ã¦ã„ã¾ã™ï¼š + + New chart + +3. Supersetã®å††ã‚°ãƒ©ãƒ•ã«ã¯ã€**Dimension**ã¨**Metric**ãŒå¿…è¦ã§ã€ä»–ã®è¨­å®šã¯ã‚ªãƒ—ションã§ã™ã€‚次元ã¨ãƒ¡ãƒˆãƒªãƒƒã‚¯ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’自分ã§é¸æŠžã§ãã€ã“ã®ä¾‹ã§ã¯ClickHouseフィールドã®`district`を次元ã¨ã—ã¦ã€`AVG(price)`をメトリックã¨ã—ã¦ä½¿ç”¨ã—ã¦ã„ã¾ã™ã€‚ + + The SUM metric + The SUM metric + +5. 円グラフã§ã¯ãªãドーナツグラフを好む場åˆã¯ã€**CUSTOMIZE**ã§ãã‚Œã¨ãã®ä»–ã®ã‚ªãƒ—ションを設定ã§ãã¾ã™ï¼š + + Add Chart to Dashboard + +6. **SAVE**ボタンをクリックã—ã¦ãƒãƒ£ãƒ¼ãƒˆã‚’ä¿å­˜ã—ã€**ADD TO DASHBOARD**ドロップダウンã‹ã‚‰**UK property prices**ã‚’é¸ã³ã€**SAVE & GO TO DASHBOARD**ã‚’é¸æŠžã—ã¦ãƒãƒ£ãƒ¼ãƒˆã‚’ä¿å­˜ã—ã€ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã«è¿½åŠ ã—ã¾ã™ï¼š + + Add Chart to Dashboard + +7. ã“ã‚Œã§å®Œäº†ã§ã™ã€‚ClickHouseã®ãƒ‡ãƒ¼ã‚¿ã«åŸºã¥ãSupersetã§ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ä½œæˆã¯ã€éžå¸¸ã«é«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿åˆ†æžã®ä¸–界を切り開ãã¾ã™ï¼ + + New Dashboard + +## 関連コンテンツ + +- ブログ: [ClickHouseã§ãƒ‡ãƒ¼ã‚¿ã‚’視覚化ã™ã‚‹ - Part 2 - Superset](https://clickhouse.com/blog/visualizing-data-with-superset) diff --git a/docs/ja/integrations/data-visualization/tableau-and-clickhouse.md b/docs/ja/integrations/data-visualization/tableau-and-clickhouse.md new file mode 100644 index 00000000000..6122be1cdf2 --- /dev/null +++ b/docs/ja/integrations/data-visualization/tableau-and-clickhouse.md @@ -0,0 +1,126 @@ +--- +sidebar_label: Tableau +sidebar_position: 205 +slug: /ja/integrations/tableau +keywords: [clickhouse, tableau, 接続, çµ±åˆ, ui] +description: Tableau 㯠ClickHouse ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルをデータソースã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Tableau 㨠ClickHouse ã®æŽ¥ç¶š + +Tableau 㯠ClickHouse ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルをデータソースã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ã“ã‚Œã«ã¯ã€ç‰¹åˆ¥ãª JDBC ドライãƒãƒ¼ã‚’ダウンロードã—ã¦ã€Tableau ãŒè¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãる特定ã®å ´æ‰€ã«ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## 接続方法 + +1. 接続情報をåŽé›†ã—ã¾ã™ + + +2. Tableau デスクトップをダウンロードã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¾ã™ã€‚ +3. 最新ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®clickhouse-tableau-connector-jdbc TACO コãƒã‚¯ã‚¿ã‚’ダウンロードã—ã¾ã™ã€‚ +4. TACO コãƒã‚¯ã‚¿ã‚’次ã®ãƒ•ã‚©ãƒ«ãƒ€ã«ä¿å­˜ã—ã¾ã™ï¼ˆOS ã«åŸºã¥ã): + - macOS: `~/Documents/My Tableau Repository/Connectors` + - Windows: `C:\Users[Windows User]\Documents\My Tableau Repository\Connectors` +5. `clickhouse-tableau-connector-jdbc` ã®æŒ‡ç¤ºã«å¾“ã£ã¦ã€å¯¾å¿œã™ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ClickHouse JDBC ドライãƒãƒ¼ をダウンロードã—ã¾ã™ã€‚ + +:::note +å¿…ãš **clickhouse-jdbc-x.x.x-shaded.jar** JAR ファイルをダウンロードã—ã¦ãã ã•ã„。 +::: + +6. JDBC ドライãƒãƒ¼ã‚’次ã®ãƒ•ã‚©ãƒ«ãƒ€ã«ä¿å­˜ã—ã¾ã™ï¼ˆOS ã«åŸºã¥ãã€ãƒ•ã‚©ãƒ«ãƒ€ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ä½œæˆå¯èƒ½ï¼‰ï¼š + - macOS: `~/Library/Tableau/Drivers` + - Windows: `C:\Program Files\Tableau\Drivers` +7. Tableau 㧠ClickHouse データソースを設定ã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ“ジュアライゼーションを始ã‚ã¾ã—ょã†ï¼ + +## Tableau 㧠ClickHouse データソースを設定 + +ドライãƒãƒ¼ã¨ã‚³ãƒã‚¯ã‚¿ã‚’マシン上ã®é©åˆ‡ãªãƒ•ã‚©ãƒ«ãƒ€ã«é…ç½®ã—ãŸã®ã§ã€ClickHouse ã® **TPCD** データベースã«æŽ¥ç¶šã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’ Tableau ã§å®šç¾©ã™ã‚‹æ–¹æ³•ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ + +1. Tableau ã‚’èµ·å‹•ã—ã¾ã™ã€‚(ã™ã§ã«èµ·å‹•ã—ã¦ã„ã‚‹å ´åˆã¯ã€å†èµ·å‹•ã—ã¦ãã ã•ã„。) + +2. å·¦å´ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ã€**To a Server** セクション㮠**More** をクリックã—ã¾ã™ã€‚ã™ã¹ã¦ãŒæ­£å¸¸ã«å‹•ä½œã—ã¦ã„ã‚‹å ´åˆã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ¸ˆã¿ã‚³ãƒã‚¯ã‚¿ã®ãƒªã‚¹ãƒˆã« **ClickHouse JDBC** ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ï¼š + + ![ClickHouse JDBC](./images/tableau_connecttoserver.png) + +3. **ClickHouse JDBC** をクリックã™ã‚‹ã¨ã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚接続情報を入力ã—ã¦ãã ã•ã„: + + | 設定 | 値 | + | ----------- | --------------------------------------------------- | + | サーãƒãƒ¼ | **w0vdp\**\**.europe-west4.gcp.clickhouse.cloud** | + | ãƒãƒ¼ãƒˆ | **8443** | + | データベース | **default** | + | ユーザーå | **default** | + | パスワード | *\***** | + +:::note +ClickHouse cloud を使用ã™ã‚‹å ´åˆã€å®‰å…¨ãªæŽ¥ç¶šã®ãŸã‚ã« SSL ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚’有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: +
+ +設定ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +!["ClickHouse Settings"](./images/tableau_clickhousesettings.png) + +:::note +ç§ãŸã¡ã® ClickHouse データベース㯠**TPCD** ã¨å付ã‘られã¦ã„ã¾ã™ãŒã€ä¸Šè¨˜ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã§ã¯ **データベース** ã‚’ **default** ã«è¨­å®šã—ã€æ¬¡ã®ã‚¹ãƒ†ãƒƒãƒ—㧠**スキーマ** ã« **TPCD** ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚(ã“ã‚Œã¯ã‚³ãƒã‚¯ã‚¿ã®ãƒã‚°ã«ã‚ˆã‚‹ã‚‚ã®ã‹ã‚‚ã—ã‚Œãªã„ã®ã§ã€ã“ã®å‹•ä½œãŒå¤‰ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ç¾åœ¨ã¯ **default** をデータベースã¨ã—ã¦ä½¿ç”¨ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„状æ³ã§ã™ã€‚) +::: + +4. **Sign In** ボタンをクリックã™ã‚‹ã¨ã€æ–°ã—ã„ Tableau ワークブックãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ï¼š + + !["New Workbook"](./images/tableau_newworkbook.png) + +5. **スキーマ** ドロップダウンã‹ã‚‰ **TPCD** ã‚’é¸æŠžã™ã‚‹ã¨ã€**TPCD** 内ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒªã‚¹ãƒˆãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + + !["Select TPCD for the Schema"](./images/tableau_tpcdschema.png) + +ã“れ㧠Tableau ã§ã®ãƒ“ジュアライゼーションã®æº–å‚™ãŒæ•´ã„ã¾ã—ãŸï¼ + +## Tableau ã§ã®ãƒ“ã‚¸ãƒ¥ã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ä½œæˆ + +Tableau 㧠ClickHouse データソースを設定ã—ãŸã®ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚’å¯è¦–化ã—ã¦ã¿ã¾ã—ょã†... + +1. **CUSTOMER** テーブルをワークブックã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã¾ã™ã€‚カラムã¯è¡¨ç¤ºã•ã‚Œã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ãƒ†ãƒ¼ãƒ–ルã¯ç©ºã®ã¾ã¾ã§ã™ï¼š + + ![""](./images/tableau_workbook1.png) + +2. **Update Now** ボタンをクリックã™ã‚‹ã¨ã€**CUSTOMER** ã‹ã‚‰ 100 è¡ŒãŒãƒ†ãƒ¼ãƒ–ルã«å映ã•ã‚Œã¾ã™ã€‚ + +3. **ORDERS** テーブルをワークブックã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã€**Custkey** を両テーブル間ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚·ãƒƒãƒ—フィールドã¨ã—ã¦è¨­å®šã—ã¾ã™ï¼š + + ![""](./images/tableau_workbook2.png) + +4. ã“れ㧠**ORDERS** 㨠**LINEITEM** テーブルãŒãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¨ã—ã¦é–¢é€£ä»˜ã‘られã€ãƒ‡ãƒ¼ã‚¿ã«é–¢ã™ã‚‹è³ªå•ã‚’解決ã™ã‚‹ãŸã‚ã«ã“ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚·ãƒƒãƒ—を使用ã§ãã¾ã™ã€‚ワークブック下部㮠**Sheet 1** タブをé¸æŠžã—ã¾ã™ã€‚ + + ![""](./images/tableau_workbook3.png) + +5. å„å¹´ã«æ³¨æ–‡ã•ã‚ŒãŸç‰¹å®šã®ã‚¢ã‚¤ãƒ†ãƒ ã®æ•°é‡ã‚’知りãŸã„ã¨ã—ã¾ã—ょã†ã€‚**ORDERS** ã‹ã‚‰ **Orderdate** ã‚’ **Columns** セクション(水平フィールド)ã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã€**LINEITEM** ã‹ã‚‰ **Quantity** ã‚’ **Rows** ã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã¾ã™ã€‚Tableau ã¯ä»¥ä¸‹ã®æŠ˜ã‚Œç·šã‚°ãƒ©ãƒ•ã‚’生æˆã—ã¾ã™ï¼š + + ![""](./images/tableau_workbook4.png) + +ã‚ã¾ã‚Šèˆˆå‘³æ·±ã„折れ線グラフã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ã‚¹ã‚¯ãƒªãƒ—トã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンステスト用ã«æ§‹ç¯‰ã•ã‚ŒãŸãŸã‚ã€TCPD データã®ã‚·ãƒŸãƒ¥ãƒ¬ãƒ¼ãƒˆã•ã‚ŒãŸæ³¨æ–‡ã«ã¯å¤‰åŒ–ãŒã‚ã¾ã‚Šè¦‹ã‚‰ã‚Œã¾ã›ã‚“。 + +6. å››åŠæœŸã”ã¨ã€ãŠã‚ˆã³å‡ºè·ãƒ¢ãƒ¼ãƒ‰ï¼ˆç©ºè¼¸ã€éƒµé€ã€èˆ¹èˆ¶ã€ãƒˆãƒ©ãƒƒã‚¯ãªã©ï¼‰ã”ã¨ã®å¹³å‡æ³¨æ–‡é‡‘é¡ï¼ˆãƒ‰ãƒ«ï¼‰ã‚’知りãŸã„ã¨ã—ã¾ã—ょã†ï¼š + + - **New Worksheet** タブをクリックã—ã¦æ–°ã—ã„ã‚·ãƒ¼ãƒˆã‚’ä½œæˆ + - **ORDERS** ã‹ã‚‰ **OrderDate** ã‚’ **Columns** ã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã€**Year** ã‹ã‚‰ **Quarter** ã«å¤‰æ›´ + - **LINEITEM** ã‹ã‚‰ **Shipmode** ã‚’ **Rows** ã«ãƒ‰ãƒ©ãƒƒã‚° + +次ã®ã‚ˆã†ã«è¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ï¼š + +![""](./images/tableau_workbook5.png) + +7. **Abc** ã®å€¤ã¯ã€ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’テーブルã«ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã¾ã§ã‚¹ãƒšãƒ¼ã‚¹ã‚’埋ã‚ã‚‹ã ã‘ã§ã™ã€‚**ORDERS** ã‹ã‚‰ **Totalprice** をテーブルã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã¾ã™ã€‚デフォルトã®è¨ˆç®—㯠**SUM** ã•ã‚Œã€**Totalpricess** ãŒåˆè¨ˆã•ã‚Œã¾ã™ï¼š + + ![""](./images/tableau_workbook6.png) + +8. **SUM** をクリックã—ã¦ã€**Measure** ã‚’ **Average** ã«å¤‰æ›´ã—ã¾ã™ã€‚åŒã˜ãƒ‰ãƒ­ãƒƒãƒ—ダウンメニューã‹ã‚‰ **Format** ã‚’é¸æŠžã—ã€**Numbers** ã‚’ **Currency (Standard)** ã«å¤‰æ›´ã—ã¾ã™ï¼š + + ![""](./images/tableau_workbook7.png) + + よãã§ãã¾ã—ãŸï¼Tableau ã‚’ ClickHouse ã«æŽ¥ç¶šã—ã€ClickHouse データを分æžãƒ»å¯è¦–化ã™ã‚‹ãŸã‚ã®å¯èƒ½æ€§ã®å…¨ä¸–界を開ã‹ã‚Œã¾ã—ãŸã€‚ + +:::note +Tableau ã¯ç´ æ™´ã‚‰ã—ã„ツールã§ã‚ã‚Šã€ClickHouse ã¨ã®æŽ¥ç¶šãŒã‚¹ãƒ ãƒ¼ã‚ºã§ã‚ã‚‹ã“ã¨ã‚’ç§ãŸã¡ã¯å–œã‚“ã§ã„ã¾ã™ï¼Tableau ã‚’åˆã‚ã¦ä½¿ç”¨ã™ã‚‹æ–¹ã¯ã€ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã¨ãƒ“ジュアライゼーションã®æ§‹ç¯‰ã«é–¢ã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**ã¾ã¨ã‚:** Tableau ã‚’ ClickHouse ã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã€ä¸€èˆ¬çš„㪠ODBC/JDBC ClickHouse ドライãƒãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã—ã‹ã—ã€ã“ã®ã‚³ãƒã‚¯ã‚¿ã¯æŽ¥ç¶šè¨­å®šãƒ—ロセスを簡素化ã—ã¾ã™ã€‚コãƒã‚¯ã‚¿ã«å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€GitHubã§ãŠæ°—軽ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 diff --git a/docs/ja/integrations/data-visualization/tableau-online-and-clickhouse.md b/docs/ja/integrations/data-visualization/tableau-online-and-clickhouse.md new file mode 100644 index 00000000000..e6418520dbf --- /dev/null +++ b/docs/ja/integrations/data-visualization/tableau-online-and-clickhouse.md @@ -0,0 +1,88 @@ +--- +sidebar_label: Tableau Online +slug: /ja/integrations/tableau-online +keywords: [clickhouse, tableau, online, mysql, connect, integrate, ui] +description: Tableau Onlineã¯ã€ã©ã“ã‹ã‚‰ã§ã‚‚人々ãŒã‚ˆã‚Šæ—©ãã€ã‚ˆã‚Šè‡ªä¿¡ã‚’æŒã£ã¦æ„æ€æ±ºå®šã§ãるよã†ã€ãƒ‡ãƒ¼ã‚¿ã®åŠ›ã‚’簡素化ã—ã¾ã™ã€‚ +--- + +import MySQLCloudSetup from '@site/docs/ja/_snippets/_clickhouse_mysql_cloud_setup.mdx'; +import MySQLOnPremiseSetup from '@site/docs/ja/_snippets/_clickhouse_mysql_on_premise_setup.mdx'; + +# Tableau Online + +Tableau Onlineã¯ã€å…¬å¼ã®MySQLデータソースを使用ã—ã¦ã€MySQLインターフェース経由ã§ClickHouse Cloudã¾ãŸã¯ã‚ªãƒ³ãƒ—レミスã®ClickHouseセットアップã«æŽ¥ç¶šã§ãã¾ã™ã€‚ + +## ClickHouse Cloud セットアップ + + +## オンプレミスã®ClickHouse サーãƒãƒ¼ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ— + + +## Tableau Onlineã‹ã‚‰ClickHouseã«æŽ¥ç¶šã™ã‚‹ï¼ˆSSLãªã—オンプレミスã®å ´åˆï¼‰ + +Tableau Cloudサイトã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã€æ–°ã—ã„公開データソースを追加ã—ã¾ã™ã€‚ + +Creating a new published data source +
+ +利用å¯èƒ½ãªã‚³ãƒã‚¯ã‚¿ã®ãƒªã‚¹ãƒˆã‹ã‚‰ã€ŒMySQLã€ã‚’é¸æŠžã—ã¾ã™ã€‚ + +Selecting MySQL connector +
+ +ClickHouseã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—中ã«åŽé›†ã—ãŸæŽ¥ç¶šæƒ…報を指定ã—ã¾ã™ã€‚ + +Specifying your connection details +
+ +Tableau Onlineã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’調ã¹ã€åˆ©ç”¨å¯èƒ½ãªãƒ†ãƒ¼ãƒ–ルã®ãƒªã‚¹ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚目的ã®ãƒ†ãƒ¼ãƒ–ルをå³å´ã®ã‚­ãƒ£ãƒ³ãƒã‚¹ã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã¾ã™ã€‚ã•ã‚‰ã«ã€ã€Œä»Šã™ãæ›´æ–°ã€ã‚’クリックã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’プレビューã—ãŸã‚Šã€èª¿æŸ»ã—ãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®ã‚¿ã‚¤ãƒ—ã‚„åå‰ã‚’微調整ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +Selecting the tables to use +
+ +ãã®å¾Œã€å³ä¸Šã®ã€ŒPublish Asã€ã‚’クリックã™ã‚Œã°ã€æ–°ã—ã作æˆã—ãŸãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’Tableau Onlineã§é€šå¸¸é€šã‚Šä½¿ç”¨ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +注:Tableau Onlineã‚’Tableau Desktopã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã—ã€ClickHouseデータセットを共有ã™ã‚‹å ´åˆã¯ã€ã“ã¡ã‚‰ã«è¡¨ç¤ºã•ã‚Œã‚‹ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ガイドã«å¾“ã„ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®MySQLコãƒã‚¯ã‚¿ã‚’使用ã™ã‚‹Tableau Desktopを使用ã™ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。[ã“ã¡ã‚‰](https://www.tableau.com/support/drivers)ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ãƒ‰ãƒ­ãƒƒãƒ—ダウンã§MySQLã‚’é¸æŠžã—ãŸå ´åˆã®ã¿è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã¾ãŸã€M1 Macã‚’ãŠä½¿ã„ã®æ–¹ã¯ã€[ã“ã¡ã‚‰ã®ãƒˆãƒ©ãƒ–ルシューティングスレッド](https://community.tableau.com/s/question/0D58b0000Ar6OhvCQE/unable-to-install-mysql-driver-for-m1-mac)ã§ãƒ‰ãƒ©ã‚¤ãƒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã®æ–¹æ³•ã‚’確èªã—ã¦ãã ã•ã„。 + +## Tableau Onlineã‹ã‚‰ClickHouseã«æŽ¥ç¶šã™ã‚‹ï¼ˆCloudã¾ãŸã¯ã‚ªãƒ³ãƒ—レミスセットアップã§SSL使用) + +Tableau Onlineã®MySQL接続設定ウィザードã§ã¯SSL証明書をæä¾›ã™ã‚‹ã“ã¨ãŒã§ããªã„ãŸã‚ã€æŽ¥ç¶šè¨­å®šã¯Tableau Desktopを使用ã—ã¦è¡Œã„ã€ãれをTableau Onlineã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ—ロセスã¯æ¯”較的簡å˜ã§ã™ã€‚ + +Windowsã¾ãŸã¯Macマシンã§Tableau Desktopを実行ã—ã€ã€ŒæŽ¥ç¶šã€->「サーãƒãƒ¼ã«æŽ¥ç¶šã€->「MySQLã€ã‚’é¸æŠžã—ã¾ã™ã€‚ +ãŠãらãã€æœ€åˆã«ãƒžã‚·ãƒ³ã«MySQLドライãƒã‚’インストールã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚[ã“ã¡ã‚‰](https://www.tableau.com/support/drivers)ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ãƒ‰ãƒ­ãƒƒãƒ—ダウンã§MySQLã‚’é¸æŠžã—ãŸå ´åˆã«è¡¨ç¤ºã•ã‚Œã‚‹ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ガイドã«å¾“ã£ã¦ãã ã•ã„。ã¾ãŸã€M1 Macã‚’ãŠä½¿ã„ã®æ–¹ã¯ã€[ã“ã¡ã‚‰ã®ãƒˆãƒ©ãƒ–ルシューティングスレッド](https://community.tableau.com/s/question/0D58b0000Ar6OhvCQE/unable-to-install-mysql-driver-for-m1-mac)ã§ãƒ‰ãƒ©ã‚¤ãƒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã®æ–¹æ³•ã‚’確èªã—ã¦ãã ã•ã„。 + +Create a new data source +
+ +:::note +MySQL接続設定画é¢ã§ã€ã€ŒSSLã€ã‚ªãƒ—ションãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +ClickHouse Cloudã®SSL証明書ã¯ã€[LetsEncrypt](https://letsencrypt.org/certificates/)ã«ã‚ˆã£ã¦ç½²åã•ã‚Œã¦ã„ã¾ã™ã€‚ +ã“ã®ãƒ«ãƒ¼ãƒˆè¨¼æ˜Žæ›¸ã‚’[ã“ã¡ã‚‰](https://letsencrypt.org/certs/isrgrootx1.pem)ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ +::: + +ClickHouse Cloudインスタンスã®MySQLユーザー資格情報ã¨ã€ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ãŸãƒ«ãƒ¼ãƒˆè¨¼æ˜Žæ›¸ã¸ã®ãƒ‘スをæä¾›ã—ã¾ã™ã€‚ + +Specifying your credentials +
+ +通常通りã€ç›®çš„ã®ãƒ†ãƒ¼ãƒ–ルをé¸æŠžã—(Tableau Onlineã¨åŒæ§˜ï¼‰ã€ã‚µãƒ¼ãƒãƒ¼ -> データソースã®å…¬é–‹ -> Tableau Cloudã‚’é¸æŠžã—ã¾ã™ã€‚ + +Publish data source +
+ +é‡è¦ï¼šèªè¨¼ã‚ªãƒ—ションã§ã€ŒåŸ‹ã‚è¾¼ã¿ãƒ‘スワードã€ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +Data source publishing settings - embedding your credentials +
+ +ã•ã‚‰ã«ã€ã€Œç™ºè¡Œã—ãŸãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’使用ã™ã‚‹ã‚ˆã†ã«ãƒ¯ãƒ¼ã‚¯ãƒ–ックを更新ã€ã‚’é¸æŠžã—ã¾ã™ã€‚ + +Data source publishing settings - updating the workbook for online usage +
+ +最後ã«ã€Œç™ºè¡Œã€ã‚’クリックã™ã‚‹ã¨ã€åŸ‹ã‚è¾¼ã¾ã‚ŒãŸè³‡æ ¼æƒ…報をæŒã¤ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ãŒTableau Onlineã§è‡ªå‹•çš„ã«é–‹ã‹ã‚Œã¾ã™ã€‚ + + +## 既知ã®åˆ¶é™äº‹é … (ClickHouse 23.11) + +既知ã®åˆ¶é™äº‹é …ã¯ã™ã¹ã¦ClickHouse `23.11`ã§ä¿®æ­£ã•ã‚Œã¦ã„ã¾ã™ã€‚ä»–ã®äº’æ›æ€§ã®å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€[ã“ã¡ã‚‰](https://clickhouse.com/company/contact)ã‹ã‚‰ã”連絡ã„ãŸã ãã‹ã€æ–°ã—ã„[å•é¡Œã‚’作æˆ](https://github.com/ClickHouse/ClickHouse/issues)ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/data-visualization/zingdata-and-clickhouse.md b/docs/ja/integrations/data-visualization/zingdata-and-clickhouse.md new file mode 100644 index 00000000000..a58aba52dee --- /dev/null +++ b/docs/ja/integrations/data-visualization/zingdata-and-clickhouse.md @@ -0,0 +1,73 @@ +--- +sidebar_label: Zing Data +sidebar_position: 206 +slug: /ja/integrations/zingdata +keywords: [clickhouse, zingdata, connect, integrate, ui] +description: Zing Dataã¯iOSã€Androidã€ã‚¦ã‚§ãƒ–用ã«ä½œã‚‰ã‚ŒãŸã€ClickHouseå‘ã‘ã®ã‚·ãƒ³ãƒ—ルãªã‚½ãƒ¼ã‚·ãƒ£ãƒ«ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ã§ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Zing Dataã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +Zing Dataã¯ã€ãƒ‡ãƒ¼ã‚¿ã®æŽ¢ç´¢ã¨è¦–覚化ã®ãŸã‚ã®ãƒ—ラットフォームã§ã™ã€‚Zing Dataã¯ã€ClickHouseãŒæä¾›ã™ã‚‹JSドライãƒãƒ¼ã‚’使用ã—ã¦ClickHouseã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +## 接続方法 +1. 接続情報を集ã‚ã¾ã™ã€‚ + + +2. Zing Dataをダウンロードã¾ãŸã¯è¨ªå•ã—ã¾ã™ã€‚ + + * モãƒã‚¤ãƒ«ã§Zing Dataを使用ã™ã‚‹ã«ã¯ã€[Google Play Store](https://play.google.com/store/apps/details?id=com.getzingdata.android)ã¾ãŸã¯[Apple App Store](https://apps.apple.com/us/app/zing-data-collaborative-bi/id1563294091)ã‹ã‚‰Zing Dataアプリをダウンロードã—ã¦ãã ã•ã„。 + + * ウェブã§Zing Dataを使用ã™ã‚‹ã«ã¯ã€[Zing Webコンソール](https://console.getzingdata.com/)を訪å•ã—ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’作æˆã—ã¾ã™ã€‚ + +3. データソースを追加ã™ã‚‹ + + * Zing Dataã¨ClickHouseデータをæ“作ã™ã‚‹ãŸã‚ã«ã¯ã€**_データソース_**を定義ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚Zing Dataã®ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リメニューã§**Sources**ã‚’é¸æŠžã—ã€**Add a Datasource**をクリックã—ã¾ã™ã€‚ + + * ウェブã§ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’追加ã™ã‚‹ã«ã¯ã€ãƒˆãƒƒãƒ—メニューã®**Data Sources**をクリックã—ã€**New Datasource**をクリックã—ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンメニューã‹ã‚‰**Clickhouse**ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![""](./images/zing_01.png) + +4. 接続情報を入力ã—ã€**Check Connection**をクリックã—ã¾ã™ã€‚ + + ![](./images/zing_02.png) + +5. 接続ãŒæˆåŠŸã™ã‚‹ã¨ã€Zingã¯ãƒ†ãƒ¼ãƒ–ルé¸æŠžç”»é¢ã«é€²ã¿ã¾ã™ã€‚å¿…è¦ãªãƒ†ãƒ¼ãƒ–ルをé¸æŠžã—ã¦**Save**をクリックã—ã¾ã™ã€‚ZingãŒãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã«æŽ¥ç¶šã§ããªã„å ´åˆã€è³‡æ ¼æƒ…報を確èªã—ã¦å†è©¦è¡Œã™ã‚‹ã‚ˆã†ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚資格情報を確èªã—ã¦å†è©¦è¡Œã—ã¦ã‚‚å•é¡ŒãŒè§£æ±ºã—ãªã„å ´åˆã¯ã€ã“ã“ã‹ã‚‰Zingサãƒãƒ¼ãƒˆã«é€£çµ¡ã—ã¦ãã ã•ã„。 + + ![""](./images/zing_03.png) + +6. ClickHouseデータソースãŒè¿½åŠ ã•ã‚Œã‚‹ã¨ã€**Data Sources** / **Sources** タブã®ä¸‹ã§ã€Zing組織内ã®ã™ã¹ã¦ã®äººãŒåˆ©ç”¨å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +## Zing Dataã§ã®ãƒãƒ£ãƒ¼ãƒˆã¨ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã®ä½œæˆ + +1. ClickHouseデータソースãŒè¿½åŠ ã•ã‚ŒãŸå¾Œã€ã‚¦ã‚§ãƒ–ã®**Zing App**をクリックã™ã‚‹ã‹ã€ãƒ¢ãƒã‚¤ãƒ«ã§ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’クリックã—ã¦ãƒãƒ£ãƒ¼ãƒˆã®ä½œæˆã‚’開始ã—ã¾ã™ã€‚ + +2. ãƒãƒ£ãƒ¼ãƒˆã‚’作æˆã™ã‚‹ãŸã‚ã«ã€ãƒ†ãƒ¼ãƒ–ルリストã®ä¸­ã‹ã‚‰ä»»æ„ã®ãƒ†ãƒ¼ãƒ–ルをクリックã—ã¾ã™ã€‚ + + ![""](./images/zing_04.png) + +3. 視覚的クエリ ビルダーを使用ã—ã¦ã€å¿…è¦ãªãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã€é›†è¨ˆãªã©ã‚’é¸ã³ã€**Run Question**をクリックã—ã¾ã™ã€‚ + + ![""](./images/zing_05.png) + +4. SQLã«è©³ã—ã„å ´åˆã¯ã€ã‚«ã‚¹ã‚¿ãƒ SQLを書ãã“ã¨ã§ã‚¯ã‚¨ãƒªã‚’実行ã—ãƒãƒ£ãƒ¼ãƒˆã‚’作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + ![""](./images/zing_06.png) + + ![""](./images/zing_07.png) + +5. ãƒãƒ£ãƒ¼ãƒˆã®ä¾‹ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ 質å•ã¯ä¸‰ç‚¹ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’使ã£ã¦ä¿å­˜ã§ãã¾ã™ã€‚ãƒãƒ£ãƒ¼ãƒˆã«ã‚³ãƒ¡ãƒ³ãƒˆã—ãŸã‚Šã€ãƒãƒ¼ãƒ ãƒ¡ãƒ³ãƒãƒ¼ã‚’タグ付ã‘ã—ãŸã‚Šã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã‚¢ãƒ©ãƒ¼ãƒˆã‚’作æˆã—ãŸã‚Šã€ãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒ—を変更ã—ãŸã‚Šã§ãã¾ã™ã€‚ + + ![""](./images/zing_08.png) + +6. ダッシュボードã¯ãƒ›ãƒ¼ãƒ ç”»é¢ã®**Dashboards**ã®ä¸‹ã«ã‚る「+ã€ã‚¢ã‚¤ã‚³ãƒ³ã‚’使用ã—ã¦ä½œæˆã§ãã¾ã™ã€‚既存ã®è³ªå•ã‚’ドラッグã—ã¦ã€ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã«è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + ![""](./images/zing_09.png) + +## 関連コンテンツ + +- ブログ: [ClickHouseã§ãƒ‡ãƒ¼ã‚¿ã‚’視覚化ã™ã‚‹ - Zing Data](https://getzingdata.com/blog/zing-adds-support-for-clickhouse-as-a-data-source/) +- [ドキュメント](https://docs.getzingdata.com/docs/) +- [クイックスタート](https://getzingdata.com/quickstart/) +- ダッシュボード作æˆã‚¬ã‚¤ãƒ‰ [Create Dashboards](https://getzingdata.com/blog/new-feature-create-multi-question-dashboards/) diff --git a/docs/ja/integrations/deployment/easypanel/index.md b/docs/ja/integrations/deployment/easypanel/index.md new file mode 100644 index 00000000000..c10f9802286 --- /dev/null +++ b/docs/ja/integrations/deployment/easypanel/index.md @@ -0,0 +1,18 @@ +--- +sidebar_label: Easypanel +slug: /ja/integrations/easypanel +keywords: [clickhouse, easypanel, deployment, integrate, install] +description: 独自ã®ã‚µãƒ¼ãƒãƒ¼ã«ClickHouseをデプロイã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ +--- +# Easypanelã§ClickHouseをデプロイã™ã‚‹ + +[Easypanel](https://easypanel.io)ã¯ã€æœ€æ–°ã®ã‚µãƒ¼ãƒãƒ¼ç®¡ç†ãƒ‘ãƒãƒ«ã§ã™ã€‚ã“れを使用ã—ã¦ã€ç‹¬è‡ªã®ã‚µãƒ¼ãƒãƒ¼ã«ClickHouseをデプロイã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +[![Deploy to Easypanel](https://easypanel.io/img/deploy-on-easypanel-40.svg)](https://easypanel.io/docs/templates/clickhouse) + +## 手順 + +1. クラウドプロãƒã‚¤ãƒ€ãƒ¼ã§Ubuntuを実行ã™ã‚‹VMを作æˆã—ã¾ã™ã€‚ +2. ウェブサイトã®æ‰‹é †ã«å¾“ã£ã¦Easypanelをインストールã—ã¾ã™ã€‚ +3. æ–°ã—ã„プロジェクトを作æˆã—ã¾ã™ã€‚ +4. 専用ã®ãƒ†ãƒ³ãƒ—レートを使用ã—ã¦ClickHouseをインストールã—ã¾ã™ã€‚ diff --git a/docs/ja/integrations/images/logos/Apache_Spark_logo.svg b/docs/ja/integrations/images/logos/Apache_Spark_logo.svg new file mode 100644 index 00000000000..4fe9de52151 --- /dev/null +++ b/docs/ja/integrations/images/logos/Apache_Spark_logo.svg @@ -0,0 +1,13 @@ + + +Apache Spark logo + + + + image/svg+xml + + + + + + diff --git a/docs/ja/integrations/images/logos/Node.js_logo.svg b/docs/ja/integrations/images/logos/Node.js_logo.svg new file mode 100644 index 00000000000..96e278d43ca --- /dev/null +++ b/docs/ja/integrations/images/logos/Node.js_logo.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/Python-logo-notext.svg b/docs/ja/integrations/images/logos/Python-logo-notext.svg new file mode 100644 index 00000000000..c5b0258bb57 --- /dev/null +++ b/docs/ja/integrations/images/logos/Python-logo-notext.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/acceldata_logo.png b/docs/ja/integrations/images/logos/acceldata_logo.png new file mode 100644 index 00000000000..e0bc5ffde26 Binary files /dev/null and b/docs/ja/integrations/images/logos/acceldata_logo.png differ diff --git a/docs/ja/integrations/images/logos/adaptive_logo.png b/docs/ja/integrations/images/logos/adaptive_logo.png new file mode 100644 index 00000000000..07b69a05dd6 Binary files /dev/null and b/docs/ja/integrations/images/logos/adaptive_logo.png differ diff --git a/docs/ja/integrations/images/logos/airbyte-logo.png b/docs/ja/integrations/images/logos/airbyte-logo.png new file mode 100644 index 00000000000..4b79d89d62c Binary files /dev/null and b/docs/ja/integrations/images/logos/airbyte-logo.png differ diff --git a/docs/ja/integrations/images/logos/airbyte.svg b/docs/ja/integrations/images/logos/airbyte.svg new file mode 100644 index 00000000000..d9604d75cca --- /dev/null +++ b/docs/ja/integrations/images/logos/airbyte.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/airbyte_logo.png b/docs/ja/integrations/images/logos/airbyte_logo.png new file mode 100644 index 00000000000..de5b32da690 Binary files /dev/null and b/docs/ja/integrations/images/logos/airbyte_logo.png differ diff --git a/docs/ja/integrations/images/logos/amazon_kinesis_logo.svg b/docs/ja/integrations/images/logos/amazon_kinesis_logo.svg new file mode 100644 index 00000000000..c848407b742 --- /dev/null +++ b/docs/ja/integrations/images/logos/amazon_kinesis_logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/amazon_msk.svg b/docs/ja/integrations/images/logos/amazon_msk.svg new file mode 100644 index 00000000000..c4ba73a0e63 --- /dev/null +++ b/docs/ja/integrations/images/logos/amazon_msk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/amazon_redshift.png b/docs/ja/integrations/images/logos/amazon_redshift.png new file mode 100644 index 00000000000..0d4e42f8aa4 Binary files /dev/null and b/docs/ja/integrations/images/logos/amazon_redshift.png differ diff --git a/docs/ja/integrations/images/logos/amazon_s3_logo.png b/docs/ja/integrations/images/logos/amazon_s3_logo.png new file mode 100644 index 00000000000..91e007c0b59 Binary files /dev/null and b/docs/ja/integrations/images/logos/amazon_s3_logo.png differ diff --git a/docs/ja/integrations/images/logos/amazon_s3_logo.svg b/docs/ja/integrations/images/logos/amazon_s3_logo.svg new file mode 100644 index 00000000000..725199615b6 --- /dev/null +++ b/docs/ja/integrations/images/logos/amazon_s3_logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/apache-spark.png b/docs/ja/integrations/images/logos/apache-spark.png new file mode 100644 index 00000000000..619f4d0b54a Binary files /dev/null and b/docs/ja/integrations/images/logos/apache-spark.png differ diff --git a/docs/ja/integrations/images/logos/apache-streampark.png b/docs/ja/integrations/images/logos/apache-streampark.png new file mode 100644 index 00000000000..1bb845979ee Binary files /dev/null and b/docs/ja/integrations/images/logos/apache-streampark.png differ diff --git a/docs/ja/integrations/images/logos/atlas-logo.png b/docs/ja/integrations/images/logos/atlas-logo.png new file mode 100644 index 00000000000..880b918f469 Binary files /dev/null and b/docs/ja/integrations/images/logos/atlas-logo.png differ diff --git a/docs/ja/integrations/images/logos/automq.png b/docs/ja/integrations/images/logos/automq.png new file mode 100644 index 00000000000..d02521472e4 Binary files /dev/null and b/docs/ja/integrations/images/logos/automq.png differ diff --git a/docs/ja/integrations/images/logos/azure_event_hubs.svg b/docs/ja/integrations/images/logos/azure_event_hubs.svg new file mode 100644 index 00000000000..540f89c6b43 --- /dev/null +++ b/docs/ja/integrations/images/logos/azure_event_hubs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/blinkops_logo.png b/docs/ja/integrations/images/logos/blinkops_logo.png new file mode 100644 index 00000000000..32b40cdc358 Binary files /dev/null and b/docs/ja/integrations/images/logos/blinkops_logo.png differ diff --git a/docs/ja/integrations/images/logos/bytewax.svg b/docs/ja/integrations/images/logos/bytewax.svg new file mode 100644 index 00000000000..9ddaeaa60a0 --- /dev/null +++ b/docs/ja/integrations/images/logos/bytewax.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/cassandra.png b/docs/ja/integrations/images/logos/cassandra.png new file mode 100644 index 00000000000..6e23e5d35f6 Binary files /dev/null and b/docs/ja/integrations/images/logos/cassandra.png differ diff --git a/docs/ja/integrations/images/logos/chdb.svg b/docs/ja/integrations/images/logos/chdb.svg new file mode 100644 index 00000000000..f72e534eecc --- /dev/null +++ b/docs/ja/integrations/images/logos/chdb.svg @@ -0,0 +1,168 @@ + + + + + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/clickhouse-cl.png b/docs/ja/integrations/images/logos/clickhouse-cl.png new file mode 100644 index 00000000000..41bd16c7132 Binary files /dev/null and b/docs/ja/integrations/images/logos/clickhouse-cl.png differ diff --git a/docs/ja/integrations/images/logos/clickhouse-monitoring-dashboard.svg b/docs/ja/integrations/images/logos/clickhouse-monitoring-dashboard.svg new file mode 100644 index 00000000000..d5c3ac793f2 --- /dev/null +++ b/docs/ja/integrations/images/logos/clickhouse-monitoring-dashboard.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/clickhouse.svg b/docs/ja/integrations/images/logos/clickhouse.svg new file mode 100644 index 00000000000..adea893c397 --- /dev/null +++ b/docs/ja/integrations/images/logos/clickhouse.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/ja/integrations/images/logos/cloudquery_logo.svg b/docs/ja/integrations/images/logos/cloudquery_logo.svg new file mode 100644 index 00000000000..7a46be2aa6a --- /dev/null +++ b/docs/ja/integrations/images/logos/cloudquery_logo.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/clougence.svg b/docs/ja/integrations/images/logos/clougence.svg new file mode 100644 index 00000000000..739a38a7db0 --- /dev/null +++ b/docs/ja/integrations/images/logos/clougence.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/confluent.svg b/docs/ja/integrations/images/logos/confluent.svg new file mode 100644 index 00000000000..51fba858d1b --- /dev/null +++ b/docs/ja/integrations/images/logos/confluent.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/confluent_alt.svg b/docs/ja/integrations/images/logos/confluent_alt.svg new file mode 100644 index 00000000000..06bc03da60c --- /dev/null +++ b/docs/ja/integrations/images/logos/confluent_alt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/csharp.svg b/docs/ja/integrations/images/logos/csharp.svg new file mode 100644 index 00000000000..f33e2d24538 --- /dev/null +++ b/docs/ja/integrations/images/logos/csharp.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/cubejs.svg b/docs/ja/integrations/images/logos/cubejs.svg new file mode 100644 index 00000000000..a1896d4a4a2 --- /dev/null +++ b/docs/ja/integrations/images/logos/cubejs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/data_grip.svg b/docs/ja/integrations/images/logos/data_grip.svg new file mode 100644 index 00000000000..c2b969968c0 --- /dev/null +++ b/docs/ja/integrations/images/logos/data_grip.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/dataease.png b/docs/ja/integrations/images/logos/dataease.png new file mode 100644 index 00000000000..5cfc76805e1 Binary files /dev/null and b/docs/ja/integrations/images/logos/dataease.png differ diff --git a/docs/ja/integrations/images/logos/datalens.png b/docs/ja/integrations/images/logos/datalens.png new file mode 100644 index 00000000000..d333cc345ac Binary files /dev/null and b/docs/ja/integrations/images/logos/datalens.png differ diff --git a/docs/ja/integrations/images/logos/dbeaver_logo.svg b/docs/ja/integrations/images/logos/dbeaver_logo.svg new file mode 100644 index 00000000000..f55e363df7a --- /dev/null +++ b/docs/ja/integrations/images/logos/dbeaver_logo.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/ja/integrations/images/logos/dbnet_logo.png b/docs/ja/integrations/images/logos/dbnet_logo.png new file mode 100644 index 00000000000..5efc05149cc Binary files /dev/null and b/docs/ja/integrations/images/logos/dbnet_logo.png differ diff --git a/docs/ja/integrations/images/logos/dbt.svg b/docs/ja/integrations/images/logos/dbt.svg new file mode 100644 index 00000000000..1e764ec4431 --- /dev/null +++ b/docs/ja/integrations/images/logos/dbt.svg @@ -0,0 +1,7 @@ + + + dbt + + + + diff --git a/docs/ja/integrations/images/logos/deep.png b/docs/ja/integrations/images/logos/deep.png new file mode 100644 index 00000000000..06f11c096c2 Binary files /dev/null and b/docs/ja/integrations/images/logos/deep.png differ diff --git a/docs/ja/integrations/images/logos/deepnote.svg b/docs/ja/integrations/images/logos/deepnote.svg new file mode 100644 index 00000000000..e0b8a4ac3b6 --- /dev/null +++ b/docs/ja/integrations/images/logos/deepnote.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/deltalake.png b/docs/ja/integrations/images/logos/deltalake.png new file mode 100644 index 00000000000..50287219024 Binary files /dev/null and b/docs/ja/integrations/images/logos/deltalake.png differ diff --git a/docs/ja/integrations/images/logos/dlthub_logo.svg b/docs/ja/integrations/images/logos/dlthub_logo.svg new file mode 100644 index 00000000000..db4bfa843be --- /dev/null +++ b/docs/ja/integrations/images/logos/dlthub_logo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/draxlr.svg b/docs/ja/integrations/images/logos/draxlr.svg new file mode 100644 index 00000000000..2c468296edf --- /dev/null +++ b/docs/ja/integrations/images/logos/draxlr.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/emqx.svg b/docs/ja/integrations/images/logos/emqx.svg new file mode 100644 index 00000000000..1b849cc76dd --- /dev/null +++ b/docs/ja/integrations/images/logos/emqx.svg @@ -0,0 +1,14 @@ + + + 320备份 + + + + + + + + + + + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/explo.png b/docs/ja/integrations/images/logos/explo.png new file mode 100644 index 00000000000..09d6fa12461 Binary files /dev/null and b/docs/ja/integrations/images/logos/explo.png differ diff --git a/docs/ja/integrations/images/logos/explo.svg b/docs/ja/integrations/images/logos/explo.svg new file mode 100644 index 00000000000..a2099e42eaf --- /dev/null +++ b/docs/ja/integrations/images/logos/explo.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/fivetran.svg b/docs/ja/integrations/images/logos/fivetran.svg new file mode 100644 index 00000000000..33747d0ed88 --- /dev/null +++ b/docs/ja/integrations/images/logos/fivetran.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/ja/integrations/images/logos/gcs.svg b/docs/ja/integrations/images/logos/gcs.svg new file mode 100644 index 00000000000..afc4aaea59a --- /dev/null +++ b/docs/ja/integrations/images/logos/gcs.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/gigasheet.png b/docs/ja/integrations/images/logos/gigasheet.png new file mode 100644 index 00000000000..b90610047e3 Binary files /dev/null and b/docs/ja/integrations/images/logos/gigasheet.png differ diff --git a/docs/ja/integrations/images/logos/glassflow.svg b/docs/ja/integrations/images/logos/glassflow.svg new file mode 100644 index 00000000000..1f674071763 --- /dev/null +++ b/docs/ja/integrations/images/logos/glassflow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/glue_logo.png b/docs/ja/integrations/images/logos/glue_logo.png new file mode 100644 index 00000000000..f076f4190af Binary files /dev/null and b/docs/ja/integrations/images/logos/glue_logo.png differ diff --git a/docs/ja/integrations/images/logos/golang.svg b/docs/ja/integrations/images/logos/golang.svg new file mode 100644 index 00000000000..c103808b45e --- /dev/null +++ b/docs/ja/integrations/images/logos/golang.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/goldsky.webp b/docs/ja/integrations/images/logos/goldsky.webp new file mode 100644 index 00000000000..3ea03458cc3 Binary files /dev/null and b/docs/ja/integrations/images/logos/goldsky.webp differ diff --git a/docs/ja/integrations/images/logos/goose_logo.png b/docs/ja/integrations/images/logos/goose_logo.png new file mode 100644 index 00000000000..470c5d9eb9d Binary files /dev/null and b/docs/ja/integrations/images/logos/goose_logo.png differ diff --git a/docs/ja/integrations/images/logos/grafana.svg b/docs/ja/integrations/images/logos/grafana.svg new file mode 100644 index 00000000000..c78f1104906 --- /dev/null +++ b/docs/ja/integrations/images/logos/grafana.svg @@ -0,0 +1,191 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/great-expectations.webp b/docs/ja/integrations/images/logos/great-expectations.webp new file mode 100644 index 00000000000..f6588b5e6db Binary files /dev/null and b/docs/ja/integrations/images/logos/great-expectations.webp differ diff --git a/docs/ja/integrations/images/logos/hadoop.svg b/docs/ja/integrations/images/logos/hadoop.svg new file mode 100644 index 00000000000..c1ce75ade0f --- /dev/null +++ b/docs/ja/integrations/images/logos/hadoop.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/hashboard.svg b/docs/ja/integrations/images/logos/hashboard.svg new file mode 100644 index 00000000000..969b33d86fa --- /dev/null +++ b/docs/ja/integrations/images/logos/hashboard.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/ja/integrations/images/logos/hive.svg b/docs/ja/integrations/images/logos/hive.svg new file mode 100644 index 00000000000..d271b347ad2 --- /dev/null +++ b/docs/ja/integrations/images/logos/hive.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/housewatch.png b/docs/ja/integrations/images/logos/housewatch.png new file mode 100644 index 00000000000..d16da2ea3f1 Binary files /dev/null and b/docs/ja/integrations/images/logos/housewatch.png differ diff --git a/docs/ja/integrations/images/logos/hudi.png b/docs/ja/integrations/images/logos/hudi.png new file mode 100644 index 00000000000..43bbdf0b7e6 Binary files /dev/null and b/docs/ja/integrations/images/logos/hudi.png differ diff --git a/docs/ja/integrations/images/logos/iceberg.png b/docs/ja/integrations/images/logos/iceberg.png new file mode 100644 index 00000000000..bae0f2a9175 Binary files /dev/null and b/docs/ja/integrations/images/logos/iceberg.png differ diff --git a/docs/ja/integrations/images/logos/java.svg b/docs/ja/integrations/images/logos/java.svg new file mode 100644 index 00000000000..a266da82834 --- /dev/null +++ b/docs/ja/integrations/images/logos/java.svg @@ -0,0 +1,3 @@ + + + diff --git a/docs/ja/integrations/images/logos/jdbc.svg b/docs/ja/integrations/images/logos/jdbc.svg new file mode 100644 index 00000000000..433302a9e56 --- /dev/null +++ b/docs/ja/integrations/images/logos/jdbc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/jitsu.svg b/docs/ja/integrations/images/logos/jitsu.svg new file mode 100644 index 00000000000..4488ec3aca6 --- /dev/null +++ b/docs/ja/integrations/images/logos/jitsu.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/jupyter.png b/docs/ja/integrations/images/logos/jupyter.png new file mode 100644 index 00000000000..e7a34e2c832 Binary files /dev/null and b/docs/ja/integrations/images/logos/jupyter.png differ diff --git a/docs/ja/integrations/images/logos/kafka.svg b/docs/ja/integrations/images/logos/kafka.svg new file mode 100644 index 00000000000..0f125035551 --- /dev/null +++ b/docs/ja/integrations/images/logos/kafka.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/kestra.svg b/docs/ja/integrations/images/logos/kestra.svg new file mode 100644 index 00000000000..aa30c11077e --- /dev/null +++ b/docs/ja/integrations/images/logos/kestra.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/ja/integrations/images/logos/logo-easypanel.png b/docs/ja/integrations/images/logos/logo-easypanel.png new file mode 100644 index 00000000000..ea909e265ed Binary files /dev/null and b/docs/ja/integrations/images/logos/logo-easypanel.png differ diff --git a/docs/ja/integrations/images/logos/logo-hex.png b/docs/ja/integrations/images/logos/logo-hex.png new file mode 100644 index 00000000000..60e01dff4e1 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo-hex.png differ diff --git a/docs/ja/integrations/images/logos/logo-vulcansql.png b/docs/ja/integrations/images/logos/logo-vulcansql.png new file mode 100644 index 00000000000..37dfdf59e21 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo-vulcansql.png differ diff --git a/docs/ja/integrations/images/logos/logo_airflow.png b/docs/ja/integrations/images/logos/logo_airflow.png new file mode 100644 index 00000000000..ec97d14b737 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_airflow.png differ diff --git a/docs/ja/integrations/images/logos/logo_beam.png b/docs/ja/integrations/images/logos/logo_beam.png new file mode 100644 index 00000000000..2921261a91c Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_beam.png differ diff --git a/docs/ja/integrations/images/logos/logo_bytebase.png b/docs/ja/integrations/images/logos/logo_bytebase.png new file mode 100644 index 00000000000..12fba79ef96 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_bytebase.png differ diff --git a/docs/ja/integrations/images/logos/logo_calyptia.png b/docs/ja/integrations/images/logos/logo_calyptia.png new file mode 100644 index 00000000000..4fef01c12a6 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_calyptia.png differ diff --git a/docs/ja/integrations/images/logos/logo_cpp.png b/docs/ja/integrations/images/logos/logo_cpp.png new file mode 100644 index 00000000000..38d99684e06 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_cpp.png differ diff --git a/docs/ja/integrations/images/logos/logo_dataddo.png b/docs/ja/integrations/images/logos/logo_dataddo.png new file mode 100644 index 00000000000..1f6af662622 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_dataddo.png differ diff --git a/docs/ja/integrations/images/logos/logo_datahub.png b/docs/ja/integrations/images/logos/logo_datahub.png new file mode 100644 index 00000000000..64e84f7446a Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_datahub.png differ diff --git a/docs/ja/integrations/images/logos/logo_dbvisualizer.png b/docs/ja/integrations/images/logos/logo_dbvisualizer.png new file mode 100644 index 00000000000..318362b081b Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_dbvisualizer.png differ diff --git a/docs/ja/integrations/images/logos/logo_decodable.png b/docs/ja/integrations/images/logos/logo_decodable.png new file mode 100644 index 00000000000..9defd326095 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_decodable.png differ diff --git a/docs/ja/integrations/images/logos/logo_deepflow.png b/docs/ja/integrations/images/logos/logo_deepflow.png new file mode 100644 index 00000000000..fd8201698f2 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_deepflow.png differ diff --git a/docs/ja/integrations/images/logos/logo_flink.png b/docs/ja/integrations/images/logos/logo_flink.png new file mode 100644 index 00000000000..ff83420f927 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_flink.png differ diff --git a/docs/ja/integrations/images/logos/logo_growthbook.png b/docs/ja/integrations/images/logos/logo_growthbook.png new file mode 100644 index 00000000000..c879a317f17 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_growthbook.png differ diff --git a/docs/ja/integrations/images/logos/logo_hightouch.png b/docs/ja/integrations/images/logos/logo_hightouch.png new file mode 100644 index 00000000000..492617c2415 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_hightouch.png differ diff --git a/docs/ja/integrations/images/logos/logo_holistics.png b/docs/ja/integrations/images/logos/logo_holistics.png new file mode 100644 index 00000000000..d41367dfb2f Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_holistics.png differ diff --git a/docs/ja/integrations/images/logos/logo_ibis.png b/docs/ja/integrations/images/logos/logo_ibis.png new file mode 100644 index 00000000000..515804f12bd Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_ibis.png differ diff --git a/docs/ja/integrations/images/logos/logo_inlong.png b/docs/ja/integrations/images/logos/logo_inlong.png new file mode 100644 index 00000000000..293aa09e065 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_inlong.png differ diff --git a/docs/ja/integrations/images/logos/logo_jaeger.png b/docs/ja/integrations/images/logos/logo_jaeger.png new file mode 100644 index 00000000000..b98e5b053d5 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_jaeger.png differ diff --git a/docs/ja/integrations/images/logos/logo_metabase.png b/docs/ja/integrations/images/logos/logo_metabase.png new file mode 100644 index 00000000000..2ee7383aa6a Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_metabase.png differ diff --git a/docs/ja/integrations/images/logos/logo_metaplane.png b/docs/ja/integrations/images/logos/logo_metaplane.png new file mode 100644 index 00000000000..8811d257e1c Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_metaplane.png differ diff --git a/docs/ja/integrations/images/logos/logo_mindsdb.png b/docs/ja/integrations/images/logos/logo_mindsdb.png new file mode 100644 index 00000000000..eb54d13e910 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_mindsdb.png differ diff --git a/docs/ja/integrations/images/logos/logo_mitzu.png b/docs/ja/integrations/images/logos/logo_mitzu.png new file mode 100644 index 00000000000..8484a06b063 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_mitzu.png differ diff --git a/docs/ja/integrations/images/logos/logo_mode.png b/docs/ja/integrations/images/logos/logo_mode.png new file mode 100644 index 00000000000..7fa819fa338 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_mode.png differ diff --git a/docs/ja/integrations/images/logos/logo_mprove.png b/docs/ja/integrations/images/logos/logo_mprove.png new file mode 100644 index 00000000000..d4ab40947f0 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_mprove.png differ diff --git a/docs/ja/integrations/images/logos/logo_nifi.png b/docs/ja/integrations/images/logos/logo_nifi.png new file mode 100644 index 00000000000..d8707bf11f9 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_nifi.png differ diff --git a/docs/ja/integrations/images/logos/logo_openBlocks.png b/docs/ja/integrations/images/logos/logo_openBlocks.png new file mode 100644 index 00000000000..2db869632c6 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_openBlocks.png differ diff --git a/docs/ja/integrations/images/logos/logo_otel.png b/docs/ja/integrations/images/logos/logo_otel.png new file mode 100644 index 00000000000..62dc3426bcb Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_otel.png differ diff --git a/docs/ja/integrations/images/logos/logo_peerdb.jpg b/docs/ja/integrations/images/logos/logo_peerdb.jpg new file mode 100644 index 00000000000..1bb79bb37e6 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_peerdb.jpg differ diff --git a/docs/ja/integrations/images/logos/logo_php.png b/docs/ja/integrations/images/logos/logo_php.png new file mode 100644 index 00000000000..21045d41067 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_php.png differ diff --git a/docs/ja/integrations/images/logos/logo_qryn.png b/docs/ja/integrations/images/logos/logo_qryn.png new file mode 100644 index 00000000000..12997b2fa5b Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_qryn.png differ diff --git a/docs/ja/integrations/images/logos/logo_r.png b/docs/ja/integrations/images/logos/logo_r.png new file mode 100644 index 00000000000..12694661597 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_r.png differ diff --git a/docs/ja/integrations/images/logos/logo_redash.png b/docs/ja/integrations/images/logos/logo_redash.png new file mode 100644 index 00000000000..1bfd80d7635 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_redash.png differ diff --git a/docs/ja/integrations/images/logos/logo_redpanda.png b/docs/ja/integrations/images/logos/logo_redpanda.png new file mode 100644 index 00000000000..f62aa4928d0 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_redpanda.png differ diff --git a/docs/ja/integrations/images/logos/logo_ruby.png b/docs/ja/integrations/images/logos/logo_ruby.png new file mode 100644 index 00000000000..a4b78fcea7c Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_ruby.png differ diff --git a/docs/ja/integrations/images/logos/logo_rust.png b/docs/ja/integrations/images/logos/logo_rust.png new file mode 100644 index 00000000000..e3d6e9095af Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_rust.png differ diff --git a/docs/ja/integrations/images/logos/logo_scala.png b/docs/ja/integrations/images/logos/logo_scala.png new file mode 100644 index 00000000000..bd0498d9103 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_scala.png differ diff --git a/docs/ja/integrations/images/logos/logo_schemaspy.png b/docs/ja/integrations/images/logos/logo_schemaspy.png new file mode 100644 index 00000000000..b6b2ad7596a Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_schemaspy.png differ diff --git a/docs/ja/integrations/images/logos/logo_seatunnel.png b/docs/ja/integrations/images/logos/logo_seatunnel.png new file mode 100644 index 00000000000..cc80d5090db Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_seatunnel.png differ diff --git a/docs/ja/integrations/images/logos/logo_sisense.png b/docs/ja/integrations/images/logos/logo_sisense.png new file mode 100644 index 00000000000..728451df802 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_sisense.png differ diff --git a/docs/ja/integrations/images/logos/logo_supabase.png b/docs/ja/integrations/images/logos/logo_supabase.png new file mode 100644 index 00000000000..843be59ca50 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_supabase.png differ diff --git a/docs/ja/integrations/images/logos/logo_tableau.png b/docs/ja/integrations/images/logos/logo_tableau.png new file mode 100644 index 00000000000..f59982b3404 Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_tableau.png differ diff --git a/docs/ja/integrations/images/logos/logo_vs.png b/docs/ja/integrations/images/logos/logo_vs.png new file mode 100644 index 00000000000..40199ddbedd Binary files /dev/null and b/docs/ja/integrations/images/logos/logo_vs.png differ diff --git a/docs/ja/integrations/images/logos/looker.svg b/docs/ja/integrations/images/logos/looker.svg new file mode 100644 index 00000000000..8ed1a7cb443 --- /dev/null +++ b/docs/ja/integrations/images/logos/looker.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/looker_studio.svg b/docs/ja/integrations/images/logos/looker_studio.svg new file mode 100644 index 00000000000..952b9039d9b --- /dev/null +++ b/docs/ja/integrations/images/logos/looker_studio.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/ja/integrations/images/logos/mage.jpg b/docs/ja/integrations/images/logos/mage.jpg new file mode 100644 index 00000000000..b6a669376c9 Binary files /dev/null and b/docs/ja/integrations/images/logos/mage.jpg differ diff --git a/docs/ja/integrations/images/logos/metabase.svg b/docs/ja/integrations/images/logos/metabase.svg new file mode 100644 index 00000000000..9602f6703b7 --- /dev/null +++ b/docs/ja/integrations/images/logos/metabase.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/minio.png b/docs/ja/integrations/images/logos/minio.png new file mode 100644 index 00000000000..72c994c68d2 Binary files /dev/null and b/docs/ja/integrations/images/logos/minio.png differ diff --git a/docs/ja/integrations/images/logos/mongodb.svg b/docs/ja/integrations/images/logos/mongodb.svg new file mode 100644 index 00000000000..fa3837793e1 --- /dev/null +++ b/docs/ja/integrations/images/logos/mongodb.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/msk.svg b/docs/ja/integrations/images/logos/msk.svg new file mode 100644 index 00000000000..2f3d43de1ed --- /dev/null +++ b/docs/ja/integrations/images/logos/msk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/mysql.svg b/docs/ja/integrations/images/logos/mysql.svg new file mode 100644 index 00000000000..5361d2629db --- /dev/null +++ b/docs/ja/integrations/images/logos/mysql.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/nats.svg b/docs/ja/integrations/images/logos/nats.svg new file mode 100644 index 00000000000..8694a2f33b0 --- /dev/null +++ b/docs/ja/integrations/images/logos/nats.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/nodejs-logo.svg b/docs/ja/integrations/images/logos/nodejs-logo.svg new file mode 100644 index 00000000000..8d788c57cb6 --- /dev/null +++ b/docs/ja/integrations/images/logos/nodejs-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/observable.svg b/docs/ja/integrations/images/logos/observable.svg new file mode 100644 index 00000000000..1b18a61be7b --- /dev/null +++ b/docs/ja/integrations/images/logos/observable.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/odbc.png b/docs/ja/integrations/images/logos/odbc.png new file mode 100644 index 00000000000..250fd8ce283 Binary files /dev/null and b/docs/ja/integrations/images/logos/odbc.png differ diff --git a/docs/ja/integrations/images/logos/omni.svg b/docs/ja/integrations/images/logos/omni.svg new file mode 100644 index 00000000000..e57a03e713f --- /dev/null +++ b/docs/ja/integrations/images/logos/omni.svg @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 00A1FF + + Primary + + Secondary + + 3F4755 + + A3ACBB + + E8BF43 + + + AA3F6B + + + + + + + 6773A2 + + 3FF2DE + + 4EE8FF + + FF5789 + + 290E05 + + diff --git a/docs/ja/integrations/images/logos/ops_ramp_logo.png b/docs/ja/integrations/images/logos/ops_ramp_logo.png new file mode 100644 index 00000000000..3f634d529fe Binary files /dev/null and b/docs/ja/integrations/images/logos/ops_ramp_logo.png differ diff --git a/docs/ja/integrations/images/logos/pinax-logo.png b/docs/ja/integrations/images/logos/pinax-logo.png new file mode 100644 index 00000000000..1ed48192871 Binary files /dev/null and b/docs/ja/integrations/images/logos/pinax-logo.png differ diff --git a/docs/ja/integrations/images/logos/popsink.svg b/docs/ja/integrations/images/logos/popsink.svg new file mode 100644 index 00000000000..584374bfd79 --- /dev/null +++ b/docs/ja/integrations/images/logos/popsink.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/ja/integrations/images/logos/postgresql.svg b/docs/ja/integrations/images/logos/postgresql.svg new file mode 100644 index 00000000000..313b7982444 --- /dev/null +++ b/docs/ja/integrations/images/logos/postgresql.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/powerbi.png b/docs/ja/integrations/images/logos/powerbi.png new file mode 100644 index 00000000000..fab7e5385e5 Binary files /dev/null and b/docs/ja/integrations/images/logos/powerbi.png differ diff --git a/docs/ja/integrations/images/logos/prequel.svg b/docs/ja/integrations/images/logos/prequel.svg new file mode 100644 index 00000000000..8646aba2207 --- /dev/null +++ b/docs/ja/integrations/images/logos/prequel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/pulse.png b/docs/ja/integrations/images/logos/pulse.png new file mode 100644 index 00000000000..9dd518e7217 Binary files /dev/null and b/docs/ja/integrations/images/logos/pulse.png differ diff --git a/docs/ja/integrations/images/logos/python-logo.png b/docs/ja/integrations/images/logos/python-logo.png new file mode 100644 index 00000000000..838816beb73 Binary files /dev/null and b/docs/ja/integrations/images/logos/python-logo.png differ diff --git a/docs/ja/integrations/images/logos/python-logo.svg b/docs/ja/integrations/images/logos/python-logo.svg new file mode 100644 index 00000000000..938831f7ed7 --- /dev/null +++ b/docs/ja/integrations/images/logos/python-logo.svg @@ -0,0 +1,288 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/python.svg b/docs/ja/integrations/images/logos/python.svg new file mode 100644 index 00000000000..39d0d512db6 --- /dev/null +++ b/docs/ja/integrations/images/logos/python.svg @@ -0,0 +1,4571 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@font-face{font-family:'Verdana';src:url("data:;base64,\ +T1RUTwADACAAAQAQQ0ZGIKSLMaMAAADoAAAM1UdQT1OyE8GIAAANwAAAAP5jbWFwA1UEMQAAADwA\ +AACsAAAAAQAAAAMAAAAMAAQAoAAAACQAIAAEAAQAIAAxADUAOABGAEkATABQAFIAYgBlAGcAaQBs\ +AG8AdQB5//8AAAAgADAAMwA3AEYASQBMAFAAUgBhAGQAZwBpAGwAbgByAHj////h/9L/0f/Q/8P/\ +wf+//7z/u/+t/6z/q/+q/6j/p/+l/6MAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\ +AAAAAAEABAIAAQEBCFZlcmRhbmEAAQEBOfgbAfgYBPgcDBUl/DscC5McCAEFHqAASIKBJf+Lix6g\ +AEiCgSX/i4sMB/clD/dZEPdbEZM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TBrL2yCPnW91AH\ +DmgcBIAW+4EG+9H4QfvT/EEF+28G+Ej4wfxE+MQF94EG98/8OvfQ+DoF93AG/Ev8ugUOaBwEf/rx\ +Ff0gHPoHBftdBvdk+Gb8Ufq7BfdgBvfr/dD37vnQBQ4cBRYUHATfFQAAAAABAAAACgAeACwAAURG\ +TFQACAAEAAAAAP//AAEAAAABa2VybgAIAAAAAQAAAAEABAACAAAAAQAIAAEAqgAEAAAADAAiADAA\ +NgBEAFoAYABmAGwAdgB8AIIAlAADAA7/nAAR/84AFv/OAAEAHP+SAAMADv/OABH/zgAW/84ABQAO\ +/9gAEf/OABb/zgAa/+wAHP/JAAEAHP/wAAEAHP/7AAEAHP/sAAIAG//sABz/8QABAA7/3AABABz/\ +9gAEABD/9gAR/+gAEv/2ABb/6AAFAA7/2AAQ//YAEf/uABL/9gAW/+4AAQAMAAkACwAMAA0ADgAP\ +ABUAFgAXABkAGwAcAAA=")} + + + + + + + + + + + + + + + + + + + + + + + + + 2006-06-28T15:19:32Z + 2006-06-28T15:19:32Z + Illustrator + + + + JPEG + 256 + 104 + /9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAASAAAAAEA +AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK +DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f +Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgAaAEAAwER +AAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAA +AQACAwQFBgcICQoLEAACAQMDAgQCBgcDBAIGAnMBAgMRBAAFIRIxQVEGE2EicYEUMpGhBxWxQiPB +UtHhMxZi8CRygvElQ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teaIDkCugdDEgYjfe66x +2+F6mtM2U9jqEfnKTEKE3tCgtoWKQ5eF9f6IRAsCA4C9mMIAXZJSTGgkNZfPVXxvOa5rR/2PZwId +qSJ73iiItnQgCIblrN2+6QMYIzHFiXtCf0ZgLv5oENWCTGdIxlA2pGidIKdGQWu5aCmFKYScOwcp +zn3/EW5CHl60hi2VgWpcT0IBbHEnM7bq7CsVeyF7XykJxzrXMyWdM0+fK51nel+pGX1v6tkdrisd +TSpMAg944WyCcQ4EfS6+weJwTFVV0Y0JnXfRo5e8fYWHpWGY6N8rqej+pCuygZ5OqjCwouKQ5rvN +rOOkbhe0louWUph04Nw5SHHuQxdP2Nmqy8WTOXVKqoytSqk6/maYKeYFmqI4IRVBudLXKpgGPnZO +q2ya3Qb7zkGKu1XBt5K/OkIVHrd4cqWYakk1uVeUTWs5NNRKch2Rfa8XzXXvX0shIw== + + + qCLQYktHHGoeFdRYoWmKh0nxsAibgqiVy1b2fV40+85x+cbeGO59gwKWzr14XOsNrWXMs8pZNw5N +rC7nzkHKeOvNX3eikY3dspwJ0FU6g+xB5N9dA23f40WbePAnYtq6xs0EyPeYUMsJqsrcSkaBff6q +GJw0FmxksSNYTwkXW4sBdJugMJWgfUf/d3HDBOPV61DseZYxOcgltQkKNycSvw887pbJfUuYKOct +3KGTIi1aw2CSTtshqZowQ3kZ9cL79afmcbf+0mp2Q09f9f/TnKm/v3e+69/ND/hl5qnb/IJ5ac58 +PXf+Cylwi7g8HC7tlUP/F1gVhvo= + + + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/qryn.svg b/docs/ja/integrations/images/logos/qryn.svg new file mode 100644 index 00000000000..fc04e953b48 --- /dev/null +++ b/docs/ja/integrations/images/logos/qryn.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/qstudio.png b/docs/ja/integrations/images/logos/qstudio.png new file mode 100644 index 00000000000..38e2b4f3093 Binary files /dev/null and b/docs/ja/integrations/images/logos/qstudio.png differ diff --git a/docs/ja/integrations/images/logos/quesma.svg b/docs/ja/integrations/images/logos/quesma.svg new file mode 100644 index 00000000000..cb9c996e5c5 --- /dev/null +++ b/docs/ja/integrations/images/logos/quesma.svg @@ -0,0 +1,15 @@ + + + + + + diff --git a/docs/ja/integrations/images/logos/quicksight.svg b/docs/ja/integrations/images/logos/quicksight.svg new file mode 100644 index 00000000000..66bb428daf9 --- /dev/null +++ b/docs/ja/integrations/images/logos/quicksight.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/rabbitmq.svg b/docs/ja/integrations/images/logos/rabbitmq.svg new file mode 100644 index 00000000000..17b4b6a60e7 --- /dev/null +++ b/docs/ja/integrations/images/logos/rabbitmq.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/redis.svg b/docs/ja/integrations/images/logos/redis.svg new file mode 100644 index 00000000000..90035f23c26 --- /dev/null +++ b/docs/ja/integrations/images/logos/redis.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/restack_logo.png b/docs/ja/integrations/images/logos/restack_logo.png new file mode 100644 index 00000000000..cccf00d650c Binary files /dev/null and b/docs/ja/integrations/images/logos/restack_logo.png differ diff --git a/docs/ja/integrations/images/logos/retool.svg b/docs/ja/integrations/images/logos/retool.svg new file mode 100644 index 00000000000..496e5e3d9d7 --- /dev/null +++ b/docs/ja/integrations/images/logos/retool.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/rill.svg b/docs/ja/integrations/images/logos/rill.svg new file mode 100644 index 00000000000..1545bc1b748 --- /dev/null +++ b/docs/ja/integrations/images/logos/rill.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/ja/integrations/images/logos/risingwave.svg b/docs/ja/integrations/images/logos/risingwave.svg new file mode 100644 index 00000000000..46c3c4b7b26 --- /dev/null +++ b/docs/ja/integrations/images/logos/risingwave.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/rocketbi-logo.svg b/docs/ja/integrations/images/logos/rocketbi-logo.svg new file mode 100644 index 00000000000..7428612a254 --- /dev/null +++ b/docs/ja/integrations/images/logos/rocketbi-logo.svg @@ -0,0 +1,103 @@ + + + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/rocksdb.svg b/docs/ja/integrations/images/logos/rocksdb.svg new file mode 100644 index 00000000000..c6a9f2e1f1b --- /dev/null +++ b/docs/ja/integrations/images/logos/rocksdb.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/rsyslog.png b/docs/ja/integrations/images/logos/rsyslog.png new file mode 100644 index 00000000000..5d25c5df717 Binary files /dev/null and b/docs/ja/integrations/images/logos/rsyslog.png differ diff --git a/docs/ja/integrations/images/logos/rudderstack.svg b/docs/ja/integrations/images/logos/rudderstack.svg new file mode 100644 index 00000000000..6b03e8c07df --- /dev/null +++ b/docs/ja/integrations/images/logos/rudderstack.svg @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/runreveal.png b/docs/ja/integrations/images/logos/runreveal.png new file mode 100644 index 00000000000..8813ed4c39c Binary files /dev/null and b/docs/ja/integrations/images/logos/runreveal.png differ diff --git a/docs/ja/integrations/images/logos/schemaspy_logo.png b/docs/ja/integrations/images/logos/schemaspy_logo.png new file mode 100644 index 00000000000..db244b3120a Binary files /dev/null and b/docs/ja/integrations/images/logos/schemaspy_logo.png differ diff --git a/docs/ja/integrations/images/logos/sematext_logo.png b/docs/ja/integrations/images/logos/sematext_logo.png new file mode 100644 index 00000000000..faf3bfe66cd Binary files /dev/null and b/docs/ja/integrations/images/logos/sematext_logo.png differ diff --git a/docs/ja/integrations/images/logos/signoz-logo.png b/docs/ja/integrations/images/logos/signoz-logo.png new file mode 100644 index 00000000000..8701ff89f85 Binary files /dev/null and b/docs/ja/integrations/images/logos/signoz-logo.png differ diff --git a/docs/ja/integrations/images/logos/signoz-logo.svg b/docs/ja/integrations/images/logos/signoz-logo.svg new file mode 100644 index 00000000000..7b18399c1bb --- /dev/null +++ b/docs/ja/integrations/images/logos/signoz-logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/docs/ja/integrations/images/logos/skywalking_logo.jpeg b/docs/ja/integrations/images/logos/skywalking_logo.jpeg new file mode 100644 index 00000000000..dba7df077c7 Binary files /dev/null and b/docs/ja/integrations/images/logos/skywalking_logo.jpeg differ diff --git a/docs/ja/integrations/images/logos/snappy_flow_logo.png b/docs/ja/integrations/images/logos/snappy_flow_logo.png new file mode 100644 index 00000000000..269ad7f6f5a Binary files /dev/null and b/docs/ja/integrations/images/logos/snappy_flow_logo.png differ diff --git a/docs/ja/integrations/images/logos/soda_logo.png b/docs/ja/integrations/images/logos/soda_logo.png new file mode 100644 index 00000000000..e2ed7da1143 Binary files /dev/null and b/docs/ja/integrations/images/logos/soda_logo.png differ diff --git a/docs/ja/integrations/images/logos/sqlite.svg b/docs/ja/integrations/images/logos/sqlite.svg new file mode 100644 index 00000000000..3887c50bc7c --- /dev/null +++ b/docs/ja/integrations/images/logos/sqlite.svg @@ -0,0 +1 @@ + diff --git a/docs/ja/integrations/images/logos/streamingfast.png b/docs/ja/integrations/images/logos/streamingfast.png new file mode 100644 index 00000000000..11494844416 Binary files /dev/null and b/docs/ja/integrations/images/logos/streamingfast.png differ diff --git a/docs/ja/integrations/images/logos/streamkap-logo.png b/docs/ja/integrations/images/logos/streamkap-logo.png new file mode 100644 index 00000000000..3de27de76e7 Binary files /dev/null and b/docs/ja/integrations/images/logos/streamkap-logo.png differ diff --git a/docs/ja/integrations/images/logos/superset.svg b/docs/ja/integrations/images/logos/superset.svg new file mode 100644 index 00000000000..812613aa70b --- /dev/null +++ b/docs/ja/integrations/images/logos/superset.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/ja/integrations/images/logos/tableau.svg b/docs/ja/integrations/images/logos/tableau.svg new file mode 100644 index 00000000000..7331f29908a --- /dev/null +++ b/docs/ja/integrations/images/logos/tableau.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/docs/ja/integrations/images/logos/tablum.svg b/docs/ja/integrations/images/logos/tablum.svg new file mode 100644 index 00000000000..9ed2a703dc2 --- /dev/null +++ b/docs/ja/integrations/images/logos/tablum.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/teleport_logo.png b/docs/ja/integrations/images/logos/teleport_logo.png new file mode 100644 index 00000000000..1ebdf14d3da Binary files /dev/null and b/docs/ja/integrations/images/logos/teleport_logo.png differ diff --git a/docs/ja/integrations/images/logos/tooljet.png b/docs/ja/integrations/images/logos/tooljet.png new file mode 100644 index 00000000000..64b2e77f773 Binary files /dev/null and b/docs/ja/integrations/images/logos/tooljet.png differ diff --git a/docs/ja/integrations/images/logos/trickster-logo.svg b/docs/ja/integrations/images/logos/trickster-logo.svg new file mode 100644 index 00000000000..fd9d7c7c4f6 --- /dev/null +++ b/docs/ja/integrations/images/logos/trickster-logo.svg @@ -0,0 +1 @@ +trickster-logo \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/upstash.svg b/docs/ja/integrations/images/logos/upstash.svg new file mode 100644 index 00000000000..dfed2937070 --- /dev/null +++ b/docs/ja/integrations/images/logos/upstash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/vector.png b/docs/ja/integrations/images/logos/vector.png new file mode 100644 index 00000000000..2ba6bccd389 Binary files /dev/null and b/docs/ja/integrations/images/logos/vector.png differ diff --git a/docs/ja/integrations/images/logos/warpstream.svg b/docs/ja/integrations/images/logos/warpstream.svg new file mode 100644 index 00000000000..9009d1c3011 --- /dev/null +++ b/docs/ja/integrations/images/logos/warpstream.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/yepcode.svg b/docs/ja/integrations/images/logos/yepcode.svg new file mode 100644 index 00000000000..062b3fcfed3 --- /dev/null +++ b/docs/ja/integrations/images/logos/yepcode.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/ja/integrations/images/logos/zing-logo.png b/docs/ja/integrations/images/logos/zing-logo.png new file mode 100644 index 00000000000..01f5ee1c712 Binary files /dev/null and b/docs/ja/integrations/images/logos/zing-logo.png differ diff --git a/docs/ja/integrations/images/mysql_table_engine_01.png b/docs/ja/integrations/images/mysql_table_engine_01.png new file mode 100644 index 00000000000..2737e8cd84d Binary files /dev/null and b/docs/ja/integrations/images/mysql_table_engine_01.png differ diff --git a/docs/ja/integrations/images/playui.png b/docs/ja/integrations/images/playui.png new file mode 100644 index 00000000000..57dae518505 Binary files /dev/null and b/docs/ja/integrations/images/playui.png differ diff --git a/docs/ja/integrations/images/prometheus-datadog.png b/docs/ja/integrations/images/prometheus-datadog.png new file mode 100644 index 00000000000..9537b27901c Binary files /dev/null and b/docs/ja/integrations/images/prometheus-datadog.png differ diff --git a/docs/ja/integrations/images/prometheus-grafana-alloy.png b/docs/ja/integrations/images/prometheus-grafana-alloy.png new file mode 100644 index 00000000000..1256f76e29a Binary files /dev/null and b/docs/ja/integrations/images/prometheus-grafana-alloy.png differ diff --git a/docs/ja/integrations/images/prometheus-grafana-chart.png b/docs/ja/integrations/images/prometheus-grafana-chart.png new file mode 100644 index 00000000000..bd5d2b99aae Binary files /dev/null and b/docs/ja/integrations/images/prometheus-grafana-chart.png differ diff --git a/docs/ja/integrations/images/prometheus-grafana-dropdown.png b/docs/ja/integrations/images/prometheus-grafana-dropdown.png new file mode 100644 index 00000000000..e8c80e27a2b Binary files /dev/null and b/docs/ja/integrations/images/prometheus-grafana-dropdown.png differ diff --git a/docs/ja/integrations/images/prometheus-grafana-metrics-endpoint.png b/docs/ja/integrations/images/prometheus-grafana-metrics-endpoint.png new file mode 100644 index 00000000000..a702427422b Binary files /dev/null and b/docs/ja/integrations/images/prometheus-grafana-metrics-endpoint.png differ diff --git a/docs/ja/integrations/images/prometheus-grafana-metrics-explorer.png b/docs/ja/integrations/images/prometheus-grafana-metrics-explorer.png new file mode 100644 index 00000000000..b0c8e70e055 Binary files /dev/null and b/docs/ja/integrations/images/prometheus-grafana-metrics-explorer.png differ diff --git a/docs/ja/integrations/images/splunk/splunk-1.png b/docs/ja/integrations/images/splunk/splunk-1.png new file mode 100644 index 00000000000..443f000c5db Binary files /dev/null and b/docs/ja/integrations/images/splunk/splunk-1.png differ diff --git a/docs/ja/integrations/images/splunk/splunk-10.png b/docs/ja/integrations/images/splunk/splunk-10.png new file mode 100644 index 00000000000..32fe77c11e7 Binary files /dev/null and b/docs/ja/integrations/images/splunk/splunk-10.png differ diff --git a/docs/ja/integrations/images/splunk/splunk-2.png b/docs/ja/integrations/images/splunk/splunk-2.png new file mode 100644 index 00000000000..8bd43d27f57 Binary files /dev/null and b/docs/ja/integrations/images/splunk/splunk-2.png differ diff --git a/docs/ja/integrations/images/splunk/splunk-3.png b/docs/ja/integrations/images/splunk/splunk-3.png new file mode 100644 index 00000000000..e9136637682 Binary files /dev/null and b/docs/ja/integrations/images/splunk/splunk-3.png differ diff --git a/docs/ja/integrations/images/splunk/splunk-4.png b/docs/ja/integrations/images/splunk/splunk-4.png new file mode 100644 index 00000000000..341f160d5fe Binary files /dev/null and b/docs/ja/integrations/images/splunk/splunk-4.png differ diff --git a/docs/ja/integrations/images/splunk/splunk-5.png b/docs/ja/integrations/images/splunk/splunk-5.png new file mode 100644 index 00000000000..fd0a8a7f7b2 Binary files /dev/null and b/docs/ja/integrations/images/splunk/splunk-5.png differ diff --git a/docs/ja/integrations/images/splunk/splunk-6.png b/docs/ja/integrations/images/splunk/splunk-6.png new file mode 100644 index 00000000000..1565adf518e Binary files /dev/null and b/docs/ja/integrations/images/splunk/splunk-6.png differ diff --git a/docs/ja/integrations/images/splunk/splunk-7.png b/docs/ja/integrations/images/splunk/splunk-7.png new file mode 100644 index 00000000000..ec8f2894b4d Binary files /dev/null and b/docs/ja/integrations/images/splunk/splunk-7.png differ diff --git a/docs/ja/integrations/images/splunk/splunk-8.png b/docs/ja/integrations/images/splunk/splunk-8.png new file mode 100644 index 00000000000..54808644dcb Binary files /dev/null and b/docs/ja/integrations/images/splunk/splunk-8.png differ diff --git a/docs/ja/integrations/images/splunk/splunk-9.png b/docs/ja/integrations/images/splunk/splunk-9.png new file mode 100644 index 00000000000..8ab8fddce00 Binary files /dev/null and b/docs/ja/integrations/images/splunk/splunk-9.png differ diff --git a/docs/ja/integrations/index.mdx b/docs/ja/integrations/index.mdx new file mode 100644 index 00000000000..f664db81f93 --- /dev/null +++ b/docs/ja/integrations/index.mdx @@ -0,0 +1,289 @@ +--- +slug: /ja/integrations +title: インテグレーション +keywords: [インテグレーション, çµ±åˆ, 連æº] +description: ClickHouseã¨ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ +hide_table_of_contents: true +--- + +import AccelDataPNG from "./images/logos/acceldata_logo.png"; +import AmazonMskSVG from "./images/logos/amazon_msk.svg"; +import ApacheStreamParkPNG from "./images/logos/apache-streampark.png"; +import AzureEventHubsSVG from "./images/logos/azure_event_hubs.svg"; +import BlinkOpsPNG from "./images/logos/blinkops_logo.png"; +import CHDBSVG from "./images/logos/chdb.svg"; +import ClickHouseSVG from "./images/logos/clickhouse.svg"; +import ClickHouseMonitoringDashboardSVG from "./images/logos/clickhouse-monitoring-dashboard.svg"; +import CloudCanalSVG from "./images/logos/clougence.svg"; +import CloudQuerySVG from "./images/logos/cloudquery_logo.svg"; +import ConfluentSVG from "./images/logos/confluent.svg"; +import CsharpSVG from "./images/logos/csharp.svg"; +import CubejsSVG from "./images/logos/cubejs.svg"; +import DatagripSVG from "./images/logos/data_grip.svg"; +import DatalensSVG from "./images/logos/datalens.svg"; +import DbeaverSVG from "./images/logos/dbeaver_logo.svg"; +import DbtSVG from "./images/logos/dbt.svg"; +import DeepnoteSVG from "./images/logos/deepnote.svg"; +import DlthubSVG from "./images/logos/dlthub_logo.svg"; +import DraxlrSVG from "./images/logos/draxlr.svg"; +import EmqxSVG from "./images/logos/emqx.svg"; +import ExploSVG from "./images/logos/explo.svg"; +import FivetranSVG from "./images/logos/fivetran.svg"; +import GcsSVG from "./images/logos/gcs.svg"; +import GlassFlowSVG from "./images/logos/glassflow.svg"; +import GoLangSVG from "./images/logos/golang.svg"; +import GrafanaSVG from "./images/logos/grafana.svg"; +import HashboardSVG from "./images/logos/hashboard.svg"; +import HdfsSVG from "./images/logos/hadoop.svg"; +import HiveSVG from "./images/logos/hive.svg"; +import JavaSVG from "./images/logos/java.svg"; +import JdbcSVG from "./images/logos/jdbc.svg"; +import JitsuSVG from "./images/logos/jitsu.svg"; +import KafkaSVG from "./images/logos/kafka.svg"; +import KinesisSVG from "./images/logos/amazon_kinesis_logo.svg"; +import KestraSVG from "./images/logos/kestra.svg"; +import LookerSVG from "./images/logos/looker.svg"; +import LookerStudioSVG from "./images/logos/looker_studio.svg"; +import MongodbSVG from "./images/logos/mongodb.svg"; +import MysqlSVG from "./images/logos/mysql.svg"; +import NatsSVG from "./images/logos/nats.svg"; +import NodeSVG from "./images/logos/Node.js_logo.svg"; +import OmniSVG from "./images/logos/omni.svg"; +import ObservableSVG from "./images/logos/observable.svg"; +import OpsRampPNG from "./images/logos/ops_ramp_logo.png"; +import PopsinkSVG from "./images/logos/popsink.svg"; +import PostgresqlSVG from "./images/logos/postgresql.svg"; +import PrequelSVG from "./images/logos/prequel.svg"; +import PythonSVG from "./images/logos/Python-logo-notext.svg"; +import QrynSVG from "./images/logos/qryn.svg"; +import QuesmaSVG from "./images/logos/quesma.svg"; +import QuickSightSVG from "./images/logos/quicksight.svg"; +import RabbitmqSVG from "./images/logos/rabbitmq.svg"; +import RedisSVG from "./images/logos/redis.svg"; +import RestackPNG from "./images/logos/restack_logo.png"; +import RetoolSVG from "./images/logos/retool.svg"; +import RillSVG from "./images/logos/rill.svg"; +import RisingWaveSVG from "./images/logos/risingwave.svg"; +import RocketbiSVG from "./images/logos/rocketbi-logo.svg"; +import RocksdbSVG from "./images/logos/rocksdb.svg"; +import RudderstackSVG from "./images/logos/rudderstack.svg"; +import S3SVG from "./images/logos/amazon_s3_logo.svg"; +import SematextPNG from "./images/logos/sematext_logo.png"; +import SkyWalkingJPEG from "./images/logos/skywalking_logo.jpeg"; +import SnappyFlowPNG from "./images/logos/snappy_flow_logo.png"; +import SparkSVG from "./images/logos/Apache_Spark_logo.svg"; +import SodaPNG from "./images/logos/soda_logo.png"; +import SqliteSVG from "./images/logos/sqlite.svg"; +import SupersetSVG from "./images/logos/superset.svg"; +import TablumSVG from "./images/logos/tablum.svg"; +import Teleport from "./images/logos/teleport.png"; +import TricksterCacheSVG from "./images/logos/trickster-logo.svg"; +import UpstashSVG from "./images/logos/upstash.svg"; +import YepcodeSVG from "./images/logos/yepcode.svg"; +import WarpStreamSVG from "./images/logos/warpstream.svg"; +import BytewaxSVG from "./images/logos/bytewax.svg"; + +ClickHouseã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã€ä»¥ä¸‹ã®ã‚µãƒãƒ¼ãƒˆãƒ¬ãƒ™ãƒ«ã§åˆ†é¡žã•ã‚Œã¦ã„ã¾ã™ï¼š + +- **コアインテグレーション:** ClickHouseã«ã‚ˆã£ã¦æ§‹ç¯‰ã¾ãŸã¯ä¿å®ˆã•ã‚Œã¦ãŠã‚Šã€ClickHouseã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“れらã¯ClickHouse GitHubオーガニゼーションã«å­˜åœ¨ã—ã¾ã™ã€‚ +- **パートナーインテグレーション:** サードパーティã®ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ãƒ™ãƒ³ãƒ€ãƒ¼ã«ã‚ˆã£ã¦æ§‹ç¯‰ã¾ãŸã¯ä¿å®ˆã•ã‚Œã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã§ã™ã€‚ +- **コミュニティインテグレーション:** コミュニティメンãƒãƒ¼ã«ã‚ˆã£ã¦æ§‹ç¯‰ã¾ãŸã¯ä¿å®ˆã•ã‚Œã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚公開ã•ã‚ŒãŸGitHubリãƒã‚¸ãƒˆãƒªã‚„コミュニティSlackãƒãƒ£ãƒ³ãƒãƒ«ä»¥å¤–ã«ç›´æŽ¥çš„ãªã‚µãƒãƒ¼ãƒˆã¯ã‚ã‚Šã¾ã›ã‚“。 + +å„インテグレーションã¯ã•ã‚‰ã«**言語クライアント**ã€**データインジェスãƒãƒ§ãƒ³**ã€**データビジュアライゼーション**ã€**SQLクライアント**ã®ã‚«ãƒ†ã‚´ãƒªãƒ¼ã«åˆ†é¡žã•ã‚Œã¦ã„ã¾ã™ã€‚ + +:::note +以下ã«ç¤ºã™ClickHouseã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆã‚’ç©æ¥µçš„ã«ã¾ã¨ã‚ã¦ã„ã¾ã™ãŒã€ã“ã‚Œã¯å®Œå…¨ãªã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã”自由ã«[貢献](https://github.com/ClickHouse/clickhouse-docs#contributing)ã—ã€é–¢é€£ã™ã‚‹ClickHouseインテグレーションをリストã«è¿½åŠ ã—ã¦ãã ã•ã„。 +::: + +コアインテグレーション + +

+ +|åå‰|ロゴ|カテゴリー|説明|リソース| +|------|----|----------------|------------------|-------------| +|Amazon Kinesis||データインジェスãƒãƒ§ãƒ³|Amazon Kinesisã¨ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã€‚|[ドキュメント](/docs/ja/integrations/clickpipes/kinesis/)| +|Amazon MSK||データインジェスãƒãƒ§ãƒ³|Amazon Managed Streaming for Apache Kafka (MSK)ã¨ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã€‚|[ドキュメント](/docs/ja/integrations/kafka/cloud/amazon-msk/)| +|Amazon S3||データインジェスãƒãƒ§ãƒ³|ClickHouseã®å†…蔵S3関数を使用ã—ã¦ã€S3データをインãƒãƒ¼ãƒˆã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã€ãƒˆãƒ©ãƒ³ã‚¹ãƒ•ã‚©ãƒ¼ãƒ ã€‚|[ドキュメント](/docs/ja/integrations/data-ingestion/s3/index.md)| +|Amazon Glue|Amazon Glue logo|データインジェスãƒãƒ§ãƒ³|ClickHouseã«JDBCを介ã—ã¦ã‚¯ã‚¨ãƒªã€‚|[ドキュメント](/docs/ja/integrations/glue)| +|Apache Spark||データインジェスãƒãƒ§ãƒ³|Spark ClickHouse Connectorã¯ã€Spark DataSource V2ã®ä¸Šã«æ§‹ç¯‰ã•ã‚ŒãŸé«˜æ€§èƒ½ã‚³ãƒã‚¯ã‚¿ã§ã™ã€‚|[GitHub](https://github.com/housepower/spark-clickhouse-connector),
[ドキュメント](/docs/ja/integrations/data-ingestion/apache-spark/index.md)| +|AutoMQ|AutoMQ logo|データインジェスãƒãƒ§ãƒ³|S3ã¨EBSã«è€ä¹…性を分離ã™ã‚‹ã‚¯ãƒ©ã‚¦ãƒ‰ãƒã‚¤ãƒ†ã‚£ãƒ–KafkaãŠã‚ˆã³RocketMQã®ä»£æ›¿ã€‚|[AutoMQ](https://www.automq.com/)| +|Cassandra|Cassandra logo|データインテグレーション|ClickHouseã§[Cassandra](https://cassandra.apache.org/)ã‚’Dictionaryソースã¨ã—ã¦ä½¿ç”¨å¯èƒ½ã€‚|[ドキュメント](/docs/ja/sql-reference/dictionaries/index.md#cassandra)| +|CHDB||SQLクライアント|組ã¿è¾¼ã¿ã®OLAP SQLエンジン。|[GitHub](https://github.com/chdb-io/chdb#/),
[ドキュメント](https://doc.chdb.io/)| +|ClickHouse Client||SQLクライアント|ClickHouseã®ãƒã‚¤ãƒ†ã‚£ãƒ–コマンドラインクライアント。|[ドキュメント](/docs/ja/interfaces/cli.md)| +|DeltaLake|Delta Lake logo|データインテグレーション|Amazon S3ã«ã‚る既存ã®[Delta Lake](https://github.com/delta-io/delta)テーブルã¨ã®èª­ã¿å–り専用インテグレーションをæ供。|[ドキュメント](/docs/ja/engines/table-engines/integrations/deltalake)| +|EmbeddedRocksDB||データインテグレーション|[rocksdb](http://rocksdb.org/)ã¨ClickHouseã®çµ±åˆã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚|[ドキュメント](/docs/ja/engines/table-engines/integrations/embedded-rocksdb)| +|Fivetran||データインジェスãƒãƒ§ãƒ³|[Fivetranデータムーブメントプラットフォーム](https://www.fivetran.com/)ã®[ClickHouse Cloud](https://clickhouse.com/cloud)宛先。|[ドキュメント](/docs/ja/integrations/data-ingestion/etl-tools/fivetran/index.md)| +|Google Cloud Storage||データインジェスãƒãƒ§ãƒ³|ClickHouseã®å†…蔵`S3`関数を使用ã—ã¦GCSデータをインãƒãƒ¼ãƒˆã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã€ãƒˆãƒ©ãƒ³ã‚¹ãƒ•ã‚©ãƒ¼ãƒ ã€‚|[ドキュメント](/docs/ja/integrations/data-ingestion/s3/index.md)| +|Go||言語クライアント|Goクライアントã¯ã€ä½Žã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã§ãƒ‘フォーマンスã®é«˜ã„接続をæä¾›ã—ã¾ã™ã€‚|[ドキュメント](/docs/ja/integrations/language-clients/go/index.md)| +|HDFS||データインテグレーション|[Apache Hadoop](https://en.wikipedia.org/wiki/Apache_Hadoop)エコシステムã¨ã®çµ±åˆã‚’æä¾›ã—ã€[HDFS](https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html)ã§ã®ãƒ‡ãƒ¼ã‚¿ç®¡ç†ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚|[ドキュメント](/docs/ja/engines/table-engines/integrations/hdfs)| +|Hive||データインテグレーション|Hiveエンジンを使用ã—ã¦HDFS Hiveテーブルã«å¯¾ã—ã¦`SELECT`クエリを実行å¯èƒ½ã€‚|[ドキュメント](/docs/ja/engines/table-engines/integrations/hive)| +|HouseWatch|HouseWatch logo|データ管ç†| ClickHouseクラスターを監視ãŠã‚ˆã³ç®¡ç†ã™ã‚‹ãŸã‚ã®ã‚ªãƒ¼ãƒ—ンソースツール。 |[GitHub](https://github.com/PostHog/HouseWatch)| +|Hudi|Apache Hudi logo|データインテグレーション|Amazon S3内ã®æ—¢å­˜ã®Apache [Hudi](https://hudi.apache.org/)テーブルã¨ã®èª­ã¿å–り専用インテグレーションをæ供。|[ドキュメント](/docs/ja/engines/table-engines/integrations/hudi)| +|Iceberg|Apache Iceberg logo|データインテグレーション|Amazon S3内ã®æ—¢å­˜ã®Apache [Iceberg](https://iceberg.apache.org/)テーブルã¨ã®èª­ã¿å–り専用インテグレーションをæ供。|[ドキュメント](/docs/ja/engines/table-engines/integrations/iceberg)| +|JDBC||データインテグレーション|[JDBC](https://en.wikipedia.org/wiki/Java_Database_Connectivity)テーブルエンジンを介ã—ã¦å¤–部データベースã«æŽ¥ç¶šå¯èƒ½ã€‚|[ドキュメント](/docs/ja/engines/table-engines/integrations/jdbc)| +|Java, JDBC||言語クライアント|JavaクライアントãŠã‚ˆã³JDBCドライãƒã€‚|[ドキュメント](/docs/ja/integrations/language-clients/java/index.md)| +|Kafka||データインジェスãƒãƒ§ãƒ³|オープンソースã®åˆ†æ•£ã‚¤ãƒ™ãƒ³ãƒˆã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ—ラットフォームã§ã‚ã‚‹Apache Kafkaã¨ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã€‚|[ドキュメント](/docs/ja/integrations/kafka)| +|Looker Studio||データビジュアライゼーション|Looker Studioã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’インフォーマティブã§è¦‹ã‚„ã™ãã€å…±æœ‰ã—ã‚„ã™ãã€å®Œå…¨ã«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºå¯èƒ½ãªãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã¨ãƒ¬ãƒãƒ¼ãƒˆã«å¤‰æ›ã™ã‚‹ç„¡æ–™ãƒ„ールã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/lookerstudio)| +|Looker||データビジュアライゼーション|Lookerã¯ã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§æ´žå¯Ÿã‚’探索ã—ã€å…±æœ‰ã™ã‚‹ã®ã‚’助ã‘ã‚‹ä¼æ¥­å‘ã‘プラットフォームã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/looker)| +|Metabase|Metabase logo|データビジュアライゼーション|Metabaseã¯ã€ãƒ‡ãƒ¼ã‚¿ã«é–¢ã™ã‚‹è³ªå•ã‚’ã™ã‚‹ãŸã‚ã®ä½¿ã„ã‚„ã™ã„オープンソースUIツールã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/metabase)| +|MinIO|Metabase logo|データインジェスãƒãƒ§ãƒ³|MinIOã¯ã€Amazon S3クラウドストレージサービスã¨API互æ›æ€§ã‚’æŒã¤é«˜æ€§èƒ½ã‚ªãƒ–ジェクトストレージã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/minio)| +|MongoDB||データインテグレーション|MongoDBエンジンã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆMongoDBコレクションã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹(`SELECT`クエリ)ãŸã‚ã®èª­ã¿å–り専用テーブルエンジンã§ã™ã€‚|[ドキュメント](/docs/ja/engines/table-engines/integrations/mongodb)| +|MySQL||データインテグレーション|MySQLエンジンã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆMySQLサーãƒãƒ¼ã«æ ¼ç´ã•ã‚Œã¦ã„るデータã«å¯¾ã—ã¦`SELECT`ãŠã‚ˆã³`INSERT`クエリを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚|[ドキュメント](/docs/ja/engines/table-engines/integrations/mysql)| +|NATS||データインテグレーション|ClickHouseã¨[NATS](https://nats.io/)ã¨ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚|[ドキュメント](/docs/ja/engines/table-engines/integrations/nats)| +|Node.JS||言語クライアント|ClickHouseã«æŽ¥ç¶šã™ã‚‹å…¬å¼JSクライアントã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/language-clients/js.md)| +|ODBC|ODBC logo|データインテグレーション|[ODBC](https://en.wikipedia.org/wiki/Open_Database_Connectivity)テーブルエンジンを介ã—ã¦å¤–部データベースã«æŽ¥ç¶šå¯èƒ½ã€‚|[ドキュメント](/docs/ja/engines/table-engines/integrations/odbc)| +|PostgreSQL||データインジェスãƒãƒ§ãƒ³|PostgreSQLデータベースã‹ã‚‰ClickHouse Cloudã¸ã®ã‚¹ãƒŠãƒƒãƒ—ショットãŠã‚ˆã³ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ CDCデータレプリケーション。|[ドキュメント](/docs/ja/integrations/postgresql)| +|PowerBI|PowerBI logo|データビジュアライゼーション|Microsoft Power BIã¯ã€ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ã«ç„¦ç‚¹ã‚’当ã¦ãŸã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‡ãƒ¼ã‚¿ãƒ“ジュアライゼーションソフトウェア製å“。|[ドキュメント](/docs/ja/integrations/powerbi)| +|Python||言語クライアント|Pythonã¨ClickHouseを接続ã™ã‚‹ãŸã‚ã®ä¸€é€£ã®Pythonパッケージ。|[ドキュメント](/docs/ja/integrations/language-clients/python/index.md)| +|QuickSight||データビジュアライゼーション|Amazon QuickSightã¯ã€ãƒ¦ãƒ‹ãƒ•ã‚¡ã‚¤ãƒ‰ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ï¼ˆBI)をãƒã‚¤ãƒ‘ースケールã§æä¾›ã™ã‚‹ãƒ‡ãƒ¼ã‚¿é§†å‹•åž‹çµ„織を支ãˆã¾ã™ã€‚|[ドキュメント](/docs/ja/integrations/quicksight)| +|RabbitMQ||データインテグレーション|ClickHouseãŒ[RabbitMQ](https://www.rabbitmq.com/)ã«æŽ¥ç¶šå¯èƒ½ã€‚|[ドキュメント](/docs/ja/engines/table-engines/integrations/rabbitmq)| +|Redis||データインテグレーション|ClickHouseãŒ[Redis](https://redis.io/)ã‚’Dictionaryソースã¨ã—ã¦ä½¿ç”¨å¯èƒ½ã€‚|[ドキュメント](/docs/ja/sql-reference/dictionaries/index.md#redis)| +|Rust|Rust logo|言語クライアント|ClickHouse用ã®åž‹ä»˜ãクライアント。|[ドキュメント](/docs/ja/integrations/language-clients/rust.md)| +|SQLite||データインテグレーション|SQLiteã¸ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆãŠã‚ˆã³ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’å¯èƒ½ã«ã—ã€ClickHouseã‹ã‚‰ç›´æŽ¥SQLiteテーブルã«ã‚¯ã‚¨ãƒªãŒå¯èƒ½ã€‚|[ドキュメント](/docs/ja/engines/table-engines/integrations/sqlite)| +|Superset||データビジュアライゼーション|Apache Supersetを使用ã—ã¦ã€ClickHouseデータを探索ãŠã‚ˆã³è¦–覚化ã—ã¾ã™ã€‚|[ドキュメント](/docs/ja/integrations/data-visualization/superset-and-clickhouse.md)| +|Tableau Online|Tableau Online logo|データビジュアライゼーション|Tableau Onlineã¯ã€ãƒ‡ãƒ¼ã‚¿ã®åŠ›ã‚’活用ã—ã¦ã€ã©ã“ã‹ã‚‰ã§ã‚‚迅速ã‹ã¤è‡ªä¿¡ã‚’æŒã£ã¦æ„æ€æ±ºå®šã§ãるよã†æ”¯æ´ã—ã¾ã™ã€‚|[ドキュメント](/docs/ja/integrations/tableau-online)| +|dbt||データインジェスãƒãƒ§ãƒ³|dbt(データビルドツール)を使用ã—ã¦ã€ClickHouse内ã§ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’記述ã™ã‚‹ã ã‘ã§å¤‰æ›ã—ã¾ã™ã€‚dbtã¯ELTã®Tを担当ã—ã¾ã™ã€‚|[ドキュメント](/docs/ja/integrations/data-ingestion/etl-tools/dbt/index.md)| + +
+
+ +パートナーインテグレーション + +
+ +|åå‰|ロゴ|カテゴリー|説明|リソース| +|------|----|----------------|------------------|-------------| +|Airbyte|Airbyte logo|データインジェスãƒãƒ§ãƒ³|Airbyteを使用ã—ã¦ã€140以上ã®ã‚³ãƒã‚¯ã‚¿ãƒ¼ã¨ELTデータパイプラインを作æˆã—ã€ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’ロードãŠã‚ˆã³åŒæœŸã—ã¾ã™ã€‚|[ドキュメント](/docs/ja/integrations/data-ingestion/etl-tools/airbyte-and-clickhouse.md)| +|AccelData|AccelData Logo|データ管ç†|ADOCã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¦–覚化ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ä¿¡é ¼æ€§ã¨æ•´åˆæ€§ã‚’監視ãŠã‚ˆã³ä¿è¨¼ã—ã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã®ãƒ‡ãƒ¼ã‚¿å‡¦ç†ã¨åˆ†æžã‚’促進ã—ã¾ã™ã€‚|[ドキュメント](https://docs.acceldata.io/documentation/clickhouse) | +|Atlas|Atlas logo|スキーマ管ç†|ClickHouseã®ã‚¹ã‚­ãƒ¼ãƒžã‚’コードã¨ã—ã¦ç®¡ç†ã—ã¾ã™ã€‚|[ドキュメント](https://atlasgo.io/guides/clickhouse?utm_source=clickhouse&utm_term=docs)| +|Azure Event Hubs||データインジェスãƒãƒ§ãƒ³|Apache Kafkaã®ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルをサãƒãƒ¼ãƒˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ—ラットフォーム。|[ウェブサイト](https://azure.microsoft.com/en-gb/products/event-hubs)| +|BlinkOps|BlinkOps Logo|セキュリティオートメーション|データã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼æ¨©é™ã‚’管ç†ã™ã‚‹è‡ªå‹•åŒ–を作æˆã€‚|[ドキュメント](https://docs.blinkops.com/docs/integrations/clickhouse)| +|Bytewax||データインジェスãƒãƒ§ãƒ³|Pythonストリームプロセッサをオープンソースã¨ã—ã¦æä¾›ã—ã€ãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›ã¨ClickHouseã¸ã®ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒãƒ§ãƒ³ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚|[ドキュメント](https://bytewax.io/blog/building-a-click-house-sink-for-bytewax)| +|Calyptia (Fluent Bit)|Calyptia logo|データインジェスãƒãƒ§ãƒ³|ログã€ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã€ãƒˆãƒ¬ãƒ¼ã‚¹ã®åŽé›†ã€å‡¦ç†ã€é…信用ã®CNCFå‚加オープンソースプロジェクト。|[ブログ](https://clickhouse.com/blog/kubernetes-logs-to-clickhouse-fluent-bit)| +|CloudCanal||データインテグレーション|データåŒæœŸã¨ç§»è¡Œãƒ„ール。|[ウェブサイト](https://www.cloudcanalx.com/us/)| +|CloudQuery||データインジェスãƒãƒ§ãƒ³|オープンソースã®é«˜æ€§èƒ½ELTフレームワーク。|[ドキュメント](https://www.cloudquery.io/docs/plugins/destinations/clickhouse/overview)| +|Confluent||データインジェスãƒãƒ§ãƒ³|Confluentプラットフォームã§ã®Apache Kafkaã¨ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã€‚|[ドキュメント](/docs/ja/integrations/kafka/cloud/confluent/custom-connector)| +|Cube.js||データビジュアライゼーション|Cubeã¯ãƒ‡ãƒ¼ã‚¿ã‚¢ãƒ—リ用ã®ã‚»ãƒžãƒ³ãƒ†ã‚£ãƒƒã‚¯ãƒ¬ã‚¤ãƒ¤ãƒ¼ã§ã™ã€‚|[ウェブサイト](https://cube.dev/for/clickhouse-dashboard)| +|DBeaver||SQLクライアント|JDBCドライãƒã‚’介ã—ã¦Clickhouseã«æŽ¥ç¶šã™ã‚‹ãƒžãƒ«ãƒãƒ—ラットフォームã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ãƒ„ール。|[ドキュメント](/docs/ja/integrations/sql-clients/dbeaver.md)| +|DataGrip||SQLクライアント|DataGripã¯ã€ClickHouse用ã®å°‚用サãƒãƒ¼ãƒˆã‚’å‚™ãˆãŸå¼·åŠ›ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹IDEã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/sql-clients/datagrip.md)| +|Dataddo|Dataddo logo|データインテグレーション|データインテグレーションプラットフォーム|[ウェブサイト](https://www.dataddo.com/storage/clickhouse)| +|DbVisualizer|DbVisualizer logo|SQLクライアント|DbVisualizerã¯ã€ClickHouseå‘ã‘ã®æ‹¡å¼µã‚µãƒãƒ¼ãƒˆã‚’æä¾›ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ„ールã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/sql-clients/dbvisualizer.md)| +|Decodable|Decodable logo|データインジェスãƒãƒ§ãƒ³|Apache Flink上ã®å¼·åŠ›ãªã‚¹ãƒˆãƒªãƒ¼ãƒ ãƒ—ロセッシング。|[ウェブサイト](https://www.decodable.co/connectors/clickhouse)| +|Deepnote||データビジュアライゼーション|Deepnoteã¯ã€ãƒãƒ¼ãƒ ã§ã‚¤ãƒ³ã‚µã‚¤ãƒˆã‚’発見ã—共有ã™ã‚‹ãŸã‚ã«æ§‹ç¯‰ã•ã‚ŒãŸã‚³ãƒ©ãƒœãƒ¬ãƒ¼ãƒ†ã‚£ãƒ–ãªJupyter互æ›ã®ãƒ‡ãƒ¼ã‚¿ãƒŽãƒ¼ãƒˆãƒ–ックã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/data-visualization/deepnote.md)| +|DLT||データインテグレーション|データã®ãƒ­ãƒ¼ãƒ‰ã‚’容易ã«ã™ã‚‹ã‚ªãƒ¼ãƒ—ンソースã®Pythonライブラリ。|[ドキュメント](/docs/ja/integrations/dlt)| +|Draxlr||データビジュアライゼーション|Draxlrã¯ã€ãƒ‡ãƒ¼ã‚¿ã®ãƒ“ジュアライゼーションã¨åˆ†æžã‚’æä¾›ã™ã‚‹ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ãƒ†ã‚¥ãƒ¼ãƒ«ã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/data-visualization/draxlr-and-clickhouse.md)| +|EMQX||データインジェスãƒãƒ§ãƒ³|EMQXã¯ã€é«˜æ€§èƒ½ã®ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸å‡¦ç†ã‚¨ãƒ³ã‚¸ãƒ³ã‚’æ­è¼‰ã—ã€å¤§è¦æ¨¡ã‚¹ã‚±ãƒ¼ãƒ«ã§IoTデãƒã‚¤ã‚¹ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã‚’実ç¾ã™ã‚‹ã‚ªãƒ¼ãƒ—ンソースMQTTブローカーã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/emqx)| +|Explo|Explo logo|データビジュアライゼーション|Exploã¯ã€ä»»æ„ã®ãƒ—ラットフォームå‘ã‘ã®é¡§å®¢å‘ã‘分æžãƒ„ールã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/explo)| +|Gigasheet|Gigasheet logo|データビジュアライゼーション|ビジãƒã‚¹ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒçž¬æ™‚ã«ClickHouseデータを分æžãŠã‚ˆã³æŽ¢ç´¢ã§ãるクラウドビッグデータ分æžã‚¹ãƒ—レッドシート。|[ウェブサイト](https://gigasheet.com/enterprise)| +|GlassFlow||データインジェスãƒãƒ§ãƒ³|ClickHouseå‘ã‘ã®Pythonã«ã‚ˆã‚‹ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã‚¤ãƒ™ãƒ³ãƒˆã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã¨ãƒ‡ãƒ¼ã‚¿å¤‰æ›|[ドキュメント](https://docs.glassflow.dev/integrations/managed-connectors/sinks/clickhouse)| +|Goldsky||データインテグレーション|高性能Web3データインデクシングã€ã‚µãƒ–グラフã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ¬ãƒ—リケーションパイプライン。|[ドキュメント](https://docs.goldsky.com/introduction)| +|Grafana||データビジュアライゼーション|Grafanaを使用ã—ã¦ã€ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’通ã˜ã¦ãƒ‡ãƒ¼ã‚¿ã‚’作æˆã€æŽ¢ç´¢ã€å…±æœ‰å¯èƒ½ã€‚|[ドキュメント](/docs/ja/integrations/data-visualization/grafana/index.md)| +|Great Expectations|Great Expectations logo|データ管ç†|オープンソースã®ãƒ‡ãƒ¼ã‚¿ç®¡ç†ãƒ„ールã§ã€æœ‰æ–™ã®ã‚¯ãƒ©ã‚¦ãƒ‰ã‚ªãƒ•ã‚¡ãƒªãƒ³ã‚°ã‚り。|[ウェブサイト](https://greatexpectations.io/)| +|GrowthBook|GrowthBook logo|データビジュアライゼーション|データウェアãƒã‚¦ã‚¹ãƒã‚¤ãƒ†ã‚£ãƒ–ãªå®Ÿé¨“プラットフォーム(機能フラグãŠã‚ˆã³A/Bテスト)。|[ドキュメント](https://docs.growthbook.io/warehouses/clickhouse)| +|HEX|HEX logo|データビジュアライゼーション|ノートブックã€ãƒ‡ãƒ¼ã‚¿ã‚¢ãƒ—リã€SQLã€Pythonã€ã‚³ãƒ¼ãƒ‰ãªã—ã€Rãªã©ã‚らゆるもã®ã‚’å‚™ãˆãŸãƒ¢ãƒ€ãƒ³ã§å”力的ãªãƒ—ラットフォーム。|[ドキュメント](https://learn.hex.tech/docs/connect-to-data/data-connections/overview)| +|Hashboard||データビジュアライゼーション|[Hashboard](https://hashboard.com)ã¯ã€ã‚»ãƒ«ãƒ•ã‚µãƒ¼ãƒ“スデータ探索ã¨ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãƒˆãƒ©ãƒƒã‚­ãƒ³ã‚°ã‚’å¯èƒ½ã«ã™ã‚‹ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ãƒ—ラットフォームã§ã™ã€‚|[ドキュメント](https://docs.hashboard.com/docs/database-connections/clickhouse)| +|HighTouch|HighTouch logo|データインテグレーション|データを直接ウェアãƒã‚¦ã‚¹ã‹ã‚‰140以上ã®å®›å…ˆã«åŒæœŸ|[ウェブサイト](https://hightouch.com/docs/sources/clickhouse)| +|Holistics|Holistics logo|データビジュアライゼーション|ClickHouseデータベースå‘ã‘ã®ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹|[ウェブサイト](https://www.holistics.io/integrations/clickhouse/)| +|IBM Instana| |データ管ç†|Instanaã¯ClickHouseサーãƒãƒ¼ãƒ—ロセスを自動検出ã—ã¦ç›£è¦–å¯èƒ½|[ドキュメント](https://www.ibm.com/docs/en/instana-observability/current?topic=technologies-monitoring-clickhouse)| +|Jitsu||データ分æž|オープンソースã®ã‚¤ãƒ™ãƒ³ãƒˆã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒ—ラットフォーム。|[ドキュメント](https://classic.jitsu.com/docs/destinations-configuration/clickhouse-destination)| +|LangChain|🦜ï¸ðŸ”—|SDK|LangChainã¯è¨€èªžãƒ¢ãƒ‡ãƒ«ã‚’利用ã—ãŸã‚¢ãƒ—リケーション開発ã®ãŸã‚ã®ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯|[ドキュメント](https://python.langchain.com/v0.2/docs/integrations/vectorstores/clickhouse/)| +|Mage|Metaplane logo|データインジェスãƒãƒ§ãƒ³|データã®å¤‰æ›ã¨çµ±åˆç”¨ã‚ªãƒ¼ãƒ—ンソースデータパイプラインツール|[ドキュメント](https://docs.mage.ai/integrations/databases/ClickHouse)| +|Metaplane|Metaplane logo|データ管ç†|ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒãƒ¼ãƒ å‘ã‘ã®ãƒ‡ãƒ¼ã‚¿ç›£è¦–|[ウェブサイト](https://www.metaplane.dev/integrations)| +|MindsDB|MindsDB logo|AI/ML| ä¼æ¥­ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰AIをカスタマイズã™ã‚‹ãŸã‚ã®ãƒ—ラットフォーム |[ウェブサイト](https://mindsdb.com/clickhouse-machine-learning )| +|Mitzu|Mitzu logo|データビジュアライゼーション|Mitzuã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’コピーã›ãšã«ãƒ•ã‚¡ãƒãƒ«ã€ãƒªãƒ†ãƒ³ã‚·ãƒ§ãƒ³ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ã‚°ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®æ´žå¯Ÿã‚’å¾—ã‚‹ãŸã‚ã®ãƒŽãƒ¼ã‚³ãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ãƒã‚¦ã‚¹ãƒã‚¤ãƒ†ã‚£ãƒ–製å“分æžã‚¢ãƒ—リケーションã§ã™ã€‚|[ドキュメント](/docs/ja/integrations/mitzu)| +|Mode Analytics|Mode logo|データビジュアライゼーション|データãƒãƒ¼ãƒ ã‚’中心ã«ã—ãŸãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹|[ウェブサイト](https://mode.com/)| +|Omni||データビジュアライゼーション|言語ã«å¯¾å¿œã—ãŸãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ã€‚Omniã¨å…±ã«ãƒ‡ãƒ¼ã‚¿ã®æŽ¢ç´¢ã€å¯è¦–化ã€ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã‚’自分ã®æ–¹æ³•ã§è¡Œãˆã¾ã™ã€‚スプレッドシートã‹ã‚‰SQLã¾ã§ã€ä¸€ã¤ã®ãƒ—ラットフォームã§ã€‚| [ウェブサイト](https://omni.co/)| +|Openblocks|Openblocks logo|SQLクライアント|Openblocksã¯UIを構築ã™ã‚‹ãŸã‚ã®ãƒ­ãƒ¼ã‚³ãƒ¼ãƒ‰ãƒ—ラットフォーム|[ドキュメント](https://docs.openblocks.dev/data-sources/connect-to-databases/clickhouse/)| +|OpsRamp (HP)| OpsRamp Logo|データ管ç†| ClickHouseã«å¯¾ã™ã‚‹è¦³æ¸¬å¯èƒ½æ€§ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’æä¾›|[ドキュメント](https://docs.opsramp.com/integrations/database-no-sql/automonitor-clickhouse-monitoring/)| +|Popsink||データインテグレーション|リアルタイムã®å¤‰æ›´ãƒ‡ãƒ¼ã‚¿ã‚­ãƒ£ãƒ—ãƒãƒ£ï¼ˆCDC)パイプラインをClickHouseã«æ§‹ç¯‰ã€‚|[ドキュメント](https://docs.popsink.com/connectors/target/clickhouse/)| +|Prequel||データ共有|Prequelã«ClickHouseインスタンスを接続ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„パートナーã«ãƒ‡ãƒ¼ã‚¿ã‚’共有ã¾ãŸã¯åŒæœŸã€‚|[ドキュメント](https://docs.prequel.co/docs/sources-clickhouse-generic)| +|Quesma||データインテグレーション|KibanaãŠã‚ˆã³OpenSearch Dashboardsを使用ã—ã¦ClickHouseã®ãƒ‡ãƒ¼ã‚¿ã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã€‚|[ウェブサイト](https://quesma.com/quesma-for-elk)| +|Redash|Redash logo|データビジュアライゼーション|データソースã®æŽ¥ç¶šã¨ã‚¯ã‚¨ãƒªã®ä½œæˆã€ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã®ä½œæˆã€ãƒ‡ãƒ¼ã‚¿ã®è¦–覚化ã€ãŠã‚ˆã³å…±æœ‰ã€‚|[ウェブサイト](https://redash.io/help/data-sources/querying/supported-data-sources)| +|Redpanda|Redpanda logo|データインジェスãƒãƒ§ãƒ³|Redpandaã¯ã€é–‹ç™ºè€…å‘ã‘ã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ãƒ—ラットフォームã§ã™ã€‚Apache Kafkaã«API互æ›ã§ã‚ã‚Šã€10å€é€Ÿãã€ä½¿ã„ã‚„ã™ãã€ã‚ˆã‚Šã‚³ã‚¹ãƒˆåŠ¹çŽ‡çš„ã§ã™ã€‚|[ブログ](https://redpanda.com/blog/real-time-olap-database-clickhouse-redpanda)| +|Restack Data Hub|Restack logo|データガãƒãƒŠãƒ³ã‚¹|Restack Data Hubã§ã‚ˆã‚ŠåŒ…括的ãªãƒ‡ãƒ¼ã‚¿ã‚¬ãƒãƒŠãƒ³ã‚¹ãŠã‚ˆã³è¦³æ¸¬å¯èƒ½æ€§ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã‚’実ç¾å¯èƒ½ã€‚|[ドキュメント](https://www.restack.io/docs/datahub-knowledge-datahub-clickhouse-integration)| +|Restack OpenMetadata|Restack logo|データå“質|Restack OpenMetadataã¯ã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®æŠ½å‡ºã€ã‚¯ã‚¨ãƒªä½¿ç”¨çŠ¶æ³ã®è¿½è·¡ã€ãƒ‡ãƒ¼ã‚¿ãƒ—ロファイリングã€ãƒ‡ãƒ¼ã‚¿å“質ãƒã‚§ãƒƒã‚¯ã‚’サãƒãƒ¼ãƒˆã€‚|[ドキュメント](https://www.restack.io/docs/openmetadata-knowledge-openmetadata-clickhouse-integration)| +|Retool||ノーコード|ドラッグアンドドロップインターフェースã§ã‚¢ãƒ—リケーションを作æˆã€‚|[ドキュメント](/docs/ja/integrations/retool)| +|Rill||データビジュアライゼーション|Rillã¯OLAPエンジンã¨å…±ã«ãƒ‡ãƒ¼ã‚¿ã‚’スライス&ダイスã™ã‚‹ãŸã‚ã®ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«BIツールã§ã™ã€‚|[ドキュメント](https://docs.rilldata.com/reference/olap-engines/clickhouse)| +|RisingWave||データインジェスãƒãƒ§ãƒ³| ãƒã‚¹ãƒˆã‚°ãƒ¬SQLã®ã‚ˆã†ãªä½“験ã®SQLストリーム処ç†ã€‚Apache Flinkより10å€é€Ÿãã€ã‚ˆã‚Šã‚³ã‚¹ãƒˆåŠ¹çŽ‡çš„ã§ã™ã€‚ |[ドキュメント](https://docs.risingwave.com/docs/current/sink-to-clickhouse/)| +|RudderStack||データインジェスãƒãƒ§ãƒ³|RudderStackã¯ã€é¡§å®¢ãƒ‡ãƒ¼ã‚¿ã‚’ç°¡å˜ã«åŽé›†ã—ã€å¿…è¦ã¨ã™ã‚‹ãƒ„ールã¨ãƒãƒ¼ãƒ ã«é€ä¿¡ã—ã¾ã™ã€‚|[ドキュメント](https://www.rudderstack.com/docs/destinations/warehouse-destinations/clickhouse/)| +|RunReveal|RunReveal logo|データインジェスãƒãƒ§ãƒ³|ã‚らゆるSaaSアプリケーションã‹ã‚‰ã®ç›£æŸ»ãƒ­ã‚°ã‚’ClickHouseã«ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆãŠã‚ˆã³æ­£è¦åŒ–。スケジュールã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‹ã‚‰ã‚¢ãƒ©ãƒ¼ãƒˆã¨æ¤œå‡ºã‚’作æˆã€‚|[ウェブサイト](https://runreveal.com)| +|Sematext|Sematext logo|データ管ç†|ClickHouseデータベースã®è¦³æ¸¬å¯èƒ½æ€§ç›£è¦–。|[ドキュメント](https://sematext.com/docs/integration/clickhouse/)| +|SiSense|SiSense logo|データビジュアライゼーション|ã‚らゆるアプリケーションã¾ãŸã¯ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã«åˆ†æžã‚’埋ã‚è¾¼ã¿ã€‚|[ウェブサイト](https://www.sisense.com/data-connectors/)| +|SigNoz|SigNoz logo|データビジュアライゼーション|オープンソースã®è¦³æ¸¬å¯èƒ½æ€§ãƒ—ラットフォーム|[ドキュメント](https://www.signoz.io/docs/architecture/)| +|Snappy Flow|Snappy Flow logo|データ管ç†|プラグインを介ã—ã¦ClickHouseデータベースã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’åŽé›†ã€‚|[ドキュメント](https://docs.snappyflow.io/docs/Integrations/clickhouse/instance)| +|Soda|Soda logo|データå“質|データãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹å‰ã«å“質を確èªã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€å“質å•é¡Œã‚’検出ã€è§£æ±ºã€é˜²æ­¢ã§ãã‚‹Sodaインテグレーション。|[ウェブサイト](https://www.soda.io/integrations/clickhouse)| +|StreamingFast|StreamingFast logo|データインジェスãƒãƒ§ãƒ³| ブロックãƒã‚§ãƒ¼ãƒ³ã«ä¾å­˜ã—ãªã„ã€ä¸¦åˆ—化ã•ã‚ŒãŸã€ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°å„ªå…ˆã®ãƒ‡ãƒ¼ã‚¿ã‚¨ãƒ³ã‚¸ãƒ³ã€‚|[ウェブサイト](https://www.streamingfast.io/)| +|Streamkap|Streamkap logo|データインジェスãƒãƒ§ãƒ³|ClickHouseã¸ã®ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ CDC(Change Data Capture)ストリーミングを数分ã§è¨­å®šã€‚|[ドキュメント](https://docs.streamkap.com/docs/clickhouse)| +|Supabase|Supabase logo|データインジェスãƒãƒ§ãƒ³|オープンソースã®Firebase代替|[GitHub](https://github.com/supabase/wrappers/tree/main/wrappers/src/fdw/clickhouse_fdw),[ブログ](https://clickhouse.com/blog/migrating-data-between-clickhouse-postgres)| +|Teleport|Teleport logo|セキュア接続|Teleport Database Serviceã¯x509証明書を用ã„ã¦ClickHouseã«èªè¨¼ã‚’è¡Œã„ã€ClickHouseã®HTTPã¨ãƒã‚¤ãƒ†ã‚£ãƒ–(TCP)インターフェースã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚|[ドキュメント](https://goteleport.com/docs/database-access/enroll-self-hosted-databases/clickhouse-self-hosted/)| +|TABLUM.IO||SQLクライアント|様々ãªã‚½ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’インジェストã—ã€ä¸æ•´åˆã‚’æ­£è¦åŒ–・クレンジングã—ã€SQLを通ã˜ã¦ãã‚Œã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ã—ã¾ã™ã€‚|[ドキュメント](/docs/ja/integrations/sql-clients/tablum.md)| +|Tooljet|Tooljet logo|データビジュアライゼーション|ToolJetã¯ã‚«ã‚¹ã‚¿ãƒ å†…部ツールを作æˆã—ã¦ãƒ‡ãƒ—ロイã™ã‚‹ãŸã‚ã®ã‚ªãƒ¼ãƒ—ンソースã®ãƒ­ãƒ¼ãƒ­ãƒ¼ãƒ‰ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã§ã™ã€‚|[ドキュメント](https://docs.tooljet.com/docs/1.x.x/data-sources/clickhouse/)| +|Upstash||データインジェスãƒãƒ§ãƒ³|サーãƒãƒ¼ãƒ¬ã‚¹KafkaãŠã‚ˆã³ä»–ã®ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã‚’æä¾›ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ—ラットフォーム|[ウェブサイト](https://upstash.com/)| +|Vector|Vector logo|データインジェスãƒãƒ§ãƒ³|ClickHouseã¨ã®çµ„ã¿è¾¼ã¿äº’æ›æ€§ã‚’å‚™ãˆãŸè¦³æ¸¬å¯èƒ½æ€§ãƒ‘イプラインを構築ã™ã‚‹ãŸã‚ã®è»½é‡ã§è¶…高速ãªãƒ„ール。|[ドキュメント](/docs/ja/integrations/vector/)| +|WarpStream||データインジェスãƒãƒ§ãƒ³|オブジェクトストレージ上ã«ç›´æŽ¥æ§‹ç¯‰ã•ã‚ŒãŸKafka互æ›ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ—ラットフォーム|[ウェブサイト](https://www.warpstream.com/)| +|YepCode||データインテグレーション|コードを書ã„ã¦çµ±åˆã¨è‡ªå‹•åŒ–ã™ã‚‹ãŸã‚ã®ãƒ„ール。|[ドキュメント](https://yepcode.io/docs/integrations/clickhouse/)| +|Zing Data|Zing logo|データビジュアライゼーション|ClickHouse用ã®ã‚·ãƒ³ãƒ—ルãªã‚½ãƒ¼ã‚·ãƒ£ãƒ«ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ã€‚iOSã€Androidã€ã‚¦ã‚§ãƒ–å‘ã‘ã«è¨­è¨ˆã•ã‚Œã¦ã¾ã™ã€‚|[ドキュメント](https://docs.getzingdata.com/docs/)| +
+ +
+ +コミュニティインテグレーション + +
+ +|åå‰|ロゴ|カテゴリー|説明|リソース| +|------|----|----------------|------------------|-------------| +|Apache Airflow|Airflow logo|データインジェスãƒãƒ§ãƒ³|データエンジニアリングパイプラインã®ãŸã‚ã®ã‚ªãƒ¼ãƒ—ンソースワークフローマãƒã‚¸ãƒ¡ãƒ³ãƒˆãƒ—ラットフォーム|[Github](https://github.com/bryzgaloff/airflow-clickhouse-plugin)| +|Apache Beam|Beam logo|データインジェスãƒãƒ§ãƒ³|データ処ç†ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã®å®šç¾©ã¨å®Ÿè¡Œã®ãŸã‚ã®ã‚ªãƒ¼ãƒ—ンソースã§çµ±ä¸€åŒ–ã•ã‚ŒãŸãƒ¢ãƒ‡ãƒ«ã¨è¨€èªžå›ºæœ‰ã®SDKセット。Google Dataflowã¨äº’æ›æ€§ã‚り。|[ドキュメント](https://clickhouse.com/docs/ja/integrations/apache-beam),
[例](https://github.com/ClickHouse/clickhouse-beam-connector/)| +|Apache InLong|InLong logo|データインジェスãƒãƒ§ãƒ³|大è¦æ¨¡ãƒ‡ãƒ¼ã‚¿ã®ãŸã‚ã®ãƒ¯ãƒ³ã‚¹ãƒˆãƒƒãƒ—ã®çµ±åˆãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯|[ドキュメント](https://inlong.apache.org/docs/data_node/load_node/clickhouse)| +|Apache Nifi|Nifi logo|データインジェスãƒãƒ§ãƒ³|ソフトウェアシステム間ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ãƒ­ãƒ¼ã‚’自動化|[ドキュメント](/docs/ja/integrations/nifi)| +|Apache SeaTunnel|SeaTunnel logo|データインジェスãƒãƒ§ãƒ³|SeaTunnelã¯éžå¸¸ã«ä½¿ã„ã‚„ã™ã„超高性能ã®åˆ†æ•£ãƒ‡ãƒ¼ã‚¿çµ±åˆãƒ—ラットフォーム|[ウェブサイト](https://seatunnel.apache.org/docs/2.3.0/connector-v2/sink/Clickhouse)| +|Apache SkyWalking|SkyWalking logo|データ管ç†|クラウドãƒã‚¤ãƒ†ã‚£ãƒ–アーキテクãƒãƒ£å†…ã®åˆ†æ•£ã‚·ã‚¹ãƒ†ãƒ å‘ã‘ã®ç›£è¦–ã€ãƒˆãƒ¬ãƒ¼ã‚¹ã€è¨ºæ–­æ©Ÿèƒ½ã‚’æä¾›ã™ã‚‹ã‚ªãƒ¼ãƒ—ンソースAPMシステム。|[ブログ](https://skywalking.apache.org/blog/2024-03-12-monitoring-clickhouse-through-skywalking/)| +|Apache StreamPark|SeaTunnel logo|データインジェスãƒãƒ§ãƒ³|ストリーム処ç†ã‚¢ãƒ—リケーション開発フレームワークã¨ã‚¹ãƒˆãƒªãƒ¼ãƒ å‡¦ç†ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒ—ラットフォーム。|[ウェブサイト](https://streampark.apache.org/docs/intro)| +|Bytebase|ByteBase logo|データ管ç†|オープンソースã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹DevOpsツール。アプリケーション開発ライフサイクル全体ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’管ç†ã™ã‚‹GitLabã§ã™ã€‚|[ドキュメント](https://www.bytebase.com/docs/introduction/supported-databases)| +|C#||言語クライアント|ClickHouse.Clientã¯ã€ClickHouseã®ãŸã‚ã®æ©Ÿèƒ½è±Šå¯ŒãªADO.NETクライアント実装|[ドキュメント](https://github.com/DarkWanderer/ClickHouse.Client/wiki/Quick-start)| +|C++|Cpp logo|言語クライアント|ClickHouse用ã®C++クライアント|[GitHub](https://github.com/ClickHouse/clickhouse-cpp)| +|CHProxy| |データ管ç†|Chproxyã¯ClickHouseデータベースã®ãŸã‚ã®HTTPプロキシãŠã‚ˆã³ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚µ|[GitHub](https://github.com/ContentSquare/chproxy)| +|Chat-DBT| |AIインテグレーション|Chat GPTを利用ã—ã¦ClickHouseクエリを作æˆã€‚|[GitHub](https://github.com/plmercereau/chat-dbt)| +|ClickHouse Monitoring Dashboard||ダッシュボード|ClickHouseã®ãŸã‚ã®ã‚·ãƒ³ãƒ—ルãªç›£è¦–ダッシュボード|[Github](https://github.com/duyet/clickhouse-monitoring)| +|Common Lisp|clickhouse-cl Logo|言語クライアント|Common Lisp ClickHouseクライアントライブラリ|[GitHub](https://github.com/juliojimenez/clickhouse-cl)| +|DBNet|Airflow logo|ソフトウェアIDE|Goã‚’ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã€ãƒ–ラウザをフロントエンドã¨ã™ã‚‹Webベースã®SQL IDE。|[Github](https://github.com/dbnet-io/dbnet)| +|DataLens|Datalens logo|データビジュアライゼーション|オープンソースã®ãƒ‡ãƒ¼ã‚¿åˆ†æžãŠã‚ˆã³ãƒ“ジュアライゼーションツール。|[ウェブサイト](https://datalens.tech/),
[ドキュメント](https://datalens.tech/docs/en/)| +|Dataease|Dataease logo|データビジュアライゼーション|データを分æžã—ã¦ãƒ“ジãƒã‚¹ãƒˆãƒ¬ãƒ³ãƒ‰ã®æ´žå¯Ÿã‚’å¾—ã‚‹ãŸã‚ã®ã‚ªãƒ¼ãƒ—ンソースã®ãƒ‡ãƒ¼ã‚¿ãƒ“ジュアライゼーション解æžãƒ„ール。|[ウェブサイト](https://dataease.io/)| +|Datahub|Datahub logo|データ管ç†|データ発見ã€ãƒ‡ãƒ¼ã‚¿ç›£è¦–ã€ãƒ•ã‚§ãƒ‡ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚¬ãƒãƒŠãƒ³ã‚¹ã‚’å¯èƒ½ã«ã™ã‚‹ã‚ªãƒ¼ãƒ—ンソースデータカタログ|[ドキュメント](https://datahubproject.io/docs/generated/ingestion/sources/clickhouse/)| +|Dbmate| |データ管ç†|データベーススキーマを複数ã®é–‹ç™ºè€…やサーãƒãƒ¼é–“ã§åŒæœŸã™ã‚‹ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç§»è¡Œãƒ„ール|[GitHub](https://github.com/amacneil/dbmate#clickhouse)| +|DeepFlow|Deepflow logo|データインジェスãƒãƒ§ãƒ³|eBPFを利用ã—ãŸã‚¢ãƒ—リケーション観測å¯èƒ½æ€§|[ウェブサイト](https://deepflow.io)| +|Easypanel|Easypanel logo|デプロイメント方法|モダンãªã‚µãƒ¼ãƒãƒ¼ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãƒ‘ãƒãƒ«ã€‚自身ã®ã‚µãƒ¼ãƒãƒ¼ã«ClickHouseをデプロイã™ã‚‹ãŸã‚ã«ä½¿ç”¨å¯èƒ½ã€‚|[ウェブサイト](https://easypanel.io),
[ドキュメント](docs/en/integrations/deployment/easypanel/index.md)| +|Explo||データビジュアライゼーション|Exploã¯ã€æŸ”軟ãªã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’æä¾›ã™ã‚‹ã“ã¨ã§ä¼æ¥­ãŒãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ åˆ†æžãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’構築ã™ã‚‹ã®ã‚’助ã‘ã¾ã™ã€‚|[ウェブサイト](https://www.explo.co/integrations/clickhouse)| +|Flink|Flink logo|データインジェスãƒãƒ§ãƒ³|Async Http Clientを活用ã—ãŸClickHouseデータベース用Flinkシンク|[GitHub](https://github.com/itinycheng/flink-connector-clickhouse)| +|Goose|Goose logo|データマイグレーション|SQLマイグレーションã¨Go関数をサãƒãƒ¼ãƒˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒžã‚¤ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒ„ール。|[GitHub](https://github.com/pressly/goose),
[ドキュメント](https://pressly.github.io/goose/)| +|Ibis|Ibis logo|言語クライアント|モダンãªSQLã®ã‚¹ã‚±ãƒ¼ãƒ«ã¨ãƒ‘フォーマンスをæŒã¤Python分æžã®æŸ”軟性|[ウェブサイト](https://ibis-project.org/backends/ClickHouse/)| +|Jaeger|Jaeger logo|データインジェスãƒãƒ§ãƒ³|ClickHouseã«ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã®Jaeger gRPCストレージプラグイン実装|[GitHub](https://github.com/jaegertracing/jaeger-clickhouse)| +|JupySQL|JupySQL logo|SQLクライアント|Jupyterノートブック用ã®ãƒã‚¤ãƒ†ã‚£ãƒ–SQLクライアント。|[ドキュメント](/docs/ja/integrations/jupysql)| +|Kestra||データオーケストレーション|オープンソースã®ãƒ‡ãƒ¼ã‚¿ã‚ªãƒ¼ã‚±ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãŠã‚ˆã³ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°ãƒ—ラットフォーム|[ウェブサイト](https://kestra.io/plugins/plugin-jdbc-clickhouse/)| +|Logchain|Adaptive Logchain logo|セキュリティ|データセキュリティã¨ç‰¹æ¨©ã‚¢ã‚¯ã‚»ã‚¹ç®¡ç†|[ウェブサイト](https://github.com/adaptive-scale/logchain)| +|Meltano||データインジェスãƒãƒ§ãƒ³|Meltanoã¯ã‚ªãƒ¼ãƒ—ンソースã®ãƒ•ãƒ«ã‚¹ã‚¿ãƒƒã‚¯ãƒ‡ãƒ¼ã‚¿çµ±åˆãƒ—ラットフォーム|[ドキュメント](https://hub.meltano.com/extractors/tap-clickhouse) +|Mprove|mprove logo|データビジュアライゼーション|ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç†æ©Ÿèƒ½ã‚’有ã™ã‚‹ã‚»ãƒ«ãƒ•ã‚µãƒ¼ãƒ“スビジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹|[ウェブサイト](https://mprove.io/)| +|Netobserv||データ管ç†|OpenShiftãŠã‚ˆã³Kubernetes用ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¦³æ¸¬å¯èƒ½æ€§ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ãƒ¼ã€‚|[ブログ](https://cloud.redhat.com/blog/deploying-network-observability-without-loki-an-example-with-clickhouse) +|Observable||データビジュアライゼーション|オンラインã§ãƒ‡ãƒ¼ã‚¿ã®æŽ¢ç´¢ã€åˆ†æžã€å¯è¦–化ã€é€šä¿¡ãŒå”力的ã«è¡Œãˆã‚‹ãƒ—ラットフォーム。|[ウェブサイト](https://observablehq.com/@stas-sl/clickhouse-playground)| +|OpenTelemetry|Otel logo|データインジェスãƒãƒ§ãƒ³|ClickHouseã«ãƒ­ã‚°ã€ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã€ãƒˆãƒ¬ãƒ¼ã‚¹ã®OpenTelemetryデータをé€ä¿¡ã™ã‚‹ã‚¨ã‚¯ã‚¹ãƒãƒ¼ã‚¿ãƒ¼|[GitHub](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/clickhouseexporter)| +|PHP|PHP logo|言語クライアント|ã“ã®æ‹¡å¼µæ©Ÿèƒ½ã¯ã€Yiiフレームワーク2.0用ã®ClickHouseçµ±åˆã‚’æä¾›ã—ã¾ã™ã€‚|[GitHub](https://github.com/smi2/phpClickHouse)| +|Pgwarehouse||データインジェスãƒãƒ§ãƒ³|Postgresテーブルを迅速ã«ClickHouseã«ãƒ¬ãƒ—リケートã™ã‚‹ãŸã‚ã®ã‚·ãƒ³ãƒ—ルツール|[GitHub](https://github.com/scottpersinger/pgwarehouse)| +|Pinax|Pinax logo|ブロックãƒã‚§ãƒ¼ãƒ³åˆ†æž|ブロックãƒã‚§ãƒ¼ãƒ³å‘ã‘ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€åˆ†æžã€æ¤œç´¢ãƒ„ール。|[ブログ](https://blog.pinax.network/substreams/simplify-real-time-blockchain-analytics-with-clickhouse/)| +|Pulse|PulseUI logo|データ管ç†|内部データUI用ã®ãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ープラットフォーム。|[ウェブサイト](https://www.timestored.com/pulse/)| +|QStudio|QStudio logo|GUI|ClickHouseデータベースをæ“作ã™ã‚‹ãŸã‚ã®ã‚·ãƒ³ãƒ—ルã«ä½¿ãˆã‚‹GUI。|[ウェブサイト](https://www.timestored.com/qstudio/database/clickhouse)| +|QStudio|qStudio logo|SQLクライアント|qStudioã¯ã€SQLスクリプトã®å®Ÿè¡Œã¨çµæžœã®ãƒãƒ£ãƒ¼ãƒˆåŒ–ãŒå¯èƒ½ãªç„¡æ–™ã®SQL GUIã§ã™ã€‚|[ドキュメント](https://www.timestored.com/qstudio/database/clickhouse)| +|Qryn|qryn logo|データインジェスãƒãƒ§ãƒ³ã€ç®¡ç†ã€ãƒ“ジュアライゼーション | qrynã¯ClickHouseã®ä¸Šã«æ§‹ç¯‰ã•ã‚ŒãŸå¤šè¨€èªžå¯¾å¿œã®è¦³æ¸¬å¯èƒ½æ€§ã‚¹ã‚¿ãƒƒã‚¯ã§ã‚ã‚Šã€Lokiã€Prometheusã€Tempoã€Opentelemetryãªã©ã®å¤šãã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚„標準APIã¨é€éŽçš„ã«äº’æ›æ€§ãŒã‚ã‚Šã€ã‚«ã‚¹ã‚¿ãƒ ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã€ã‚³ãƒ¼ãƒ‰ã€ãƒ—ラグインを必è¦ã¨ã—ã¾ã›ã‚“。|[ドキュメント](https://qryn.dev), [Github](https://github.com/metrico), [ウェブサイト](https://qryn.cloud)| +|RSyslog|RSyslog logo|データインジェスãƒãƒ§ãƒ³|ClickHouseã¸ã®ãƒ­ã‚®ãƒ³ã‚°ã‚’ãƒã‚¤ãƒ†ã‚£ãƒ–ã«ã‚µãƒãƒ¼ãƒˆã™ã‚‹ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã€‚|[ドキュメント](https://www.rsyslog.com/doc/master/configuration/modules/omclickhouse.html)| +|Rocket.BI||データビジュアライゼーション|RocketBIã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’迅速ã«åˆ†æžã—ã€ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã§ãƒ“ジュアライゼーションを構築ã—ã€ã‚³ãƒ©ãƒœãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã™ã‚‹ã®ã‚’助ã‘る自己完çµåž‹ã®ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ãƒ—ラットフォーム。|[GitHub](https://github.com/datainsider-co/rocket-bi),
[ドキュメント](/docs/ja/integrations/data-visualization/rocketbi-and-clickhouse.md)| + +|Ruby|Ruby logo|言語クライアント|ClickHouse用ã®ãƒ¢ãƒ€ãƒ³ãªRubyデータベースドライãƒ|[GitHub](https://github.com/shlima/click_house)| +|R|R logo|言語クライアント|Rパッケージã¯ClickHouseデータベース用ã®DBIインターフェースã§ã™|[GitHub](https://github.com/IMSMWU/RClickHouse)| +|SQLPad||SQLクライアント|SQLPadã¯ã€SQLクエリを書ã„ã¦å®Ÿè¡Œã—ã€çµæžœã‚’視覚化ã™ã‚‹ãŸã‚ã®ã‚¦ã‚§ãƒ–アプリã§ã™|[Documentation](https://getsqlpad.com/en/connections/#clickhouse)| +|Scala|Scala logo|言語クライアント|Akka Httpを使用ã—ãŸClickHouseã®Scalaクライアント|[GitHub](https://github.com/crobox/clickhouse-scala-client)| +|SchemaSpy|SchemaSpy logo|データå¯è¦–化|SchemaSpyã¯ClickHouseã®ã‚¹ã‚­ãƒ¼ãƒžå¯è¦–化をサãƒãƒ¼ãƒˆã—ã¾ã™|[GitHub](https://github.com/schemaspy/schemaspy)| +|Tableau|Tableau logo|データå¯è¦–化|ビジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ã«ãƒ•ã‚©ãƒ¼ã‚«ã‚¹ã—ãŸã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‡ãƒ¼ã‚¿å¯è¦–化ソフトウェア|[Documentation](/docs/ja/integrations/tableau)| +|TricksterCache||データå¯è¦–化| オープンソースã®HTTPリãƒãƒ¼ã‚¹ãƒ—ロキシキャッシュãŠã‚ˆã³ã‚¿ã‚¤ãƒ ã‚·ãƒªãƒ¼ã‚ºãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚¢ã‚¯ã‚»ãƒ©ãƒ¬ãƒ¼ã‚¿ãƒ¼ |[Website](https://trickstercache.org/)| +|Visual Studio Client|VS logo|言語クライアント|Visual Studioã®è»½é‡ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ|[Marketplace](https://marketplace.visualstudio.com/items?itemName=fanruten.clickhouse-light)| +|VulcanSQL|VulcanSQL logo|データAPIフレームワーク|データアプリケーション用ã®ãƒ‡ãƒ¼ã‚¿APIフレームワークã§ã€ãƒ‡ãƒ¼ã‚¿æ‹…当者ãŒã‚ˆã‚Šé€ŸãデータAPIを作æˆã—共有ã™ã‚‹ã®ã‚’支æ´ã—ã¾ã™ã€‚SQLテンプレートをデータAPIã«å¤‰æ›ã—ã€ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã‚¹ã‚­ãƒ«ã¯ä¸è¦ã§ã™ã€‚|[Website](https://vulcansql.com/),
[Documentation](https://vulcansql.com/docs/connect/clickhouse)| +
diff --git a/docs/ja/integrations/language-clients/_category_.yml b/docs/ja/integrations/language-clients/_category_.yml new file mode 100644 index 00000000000..ced0e2470a4 --- /dev/null +++ b/docs/ja/integrations/language-clients/_category_.yml @@ -0,0 +1,8 @@ +position: 101 +label: 'Language clients' +collapsible: true +collapsed: true +link: + type: generated-index + title: Language clients + slug: /ja/integrations/language-clients diff --git a/docs/ja/integrations/language-clients/go/index.md b/docs/ja/integrations/language-clients/go/index.md new file mode 100644 index 00000000000..607e2ab4e85 --- /dev/null +++ b/docs/ja/integrations/language-clients/go/index.md @@ -0,0 +1,2619 @@ +--- +sidebar_label: Go +sidebar_position: 1 +keywords: [clickhouse, go, client, golang] +slug: /ja/integrations/go +description: ClickHouse用ã®Goクライアントã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯Go標準ã®database/sqlインターフェースã¾ãŸã¯æœ€é©åŒ–ã•ã‚ŒãŸãƒã‚¤ãƒ†ã‚£ãƒ–インターフェースを使用ã—ã¦ClickHouseã«æŽ¥ç¶šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +--- + +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_native.md'; + +# ClickHouse Go + +## ç°¡å˜ãªä¾‹ +ã¾ãšã¯ç°¡å˜ãªä¾‹ã‹ã‚‰å§‹ã‚ã¾ã—ょã†ã€‚ã“ã‚Œã¯ClickHouseã«æŽ¥ç¶šã—ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ã®é¸æŠžã‚’è¡Œã„ã¾ã™ã€‚始ã‚ã‚‹ãŸã‚ã«ã¯ã€æŽ¥ç¶šæƒ…å ±ãŒå¿…è¦ã§ã™ã€‚ + +### 接続情報 + + +### モジュールã®åˆæœŸåŒ– + +```bash +mkdir clickhouse-golang-example +cd clickhouse-golang-example +go mod init clickhouse-golang-example +``` + +### サンプルコードをコピー + +ã“ã®ã‚³ãƒ¼ãƒ‰ã‚’`clickhouse-golang-example`ディレクトリã«`main.go`ã¨ã—ã¦ã‚³ãƒ”ーã—ã¦ãã ã•ã„。 + +```go title=main.go +package main + +import ( + "context" + "crypto/tls" + "fmt" + "log" + + "github.com/ClickHouse/clickhouse-go/v2" + "github.com/ClickHouse/clickhouse-go/v2/lib/driver" +) + +func main() { + conn, err := connect() + if err != nil { + panic((err)) + } + + ctx := context.Background() + rows, err := conn.Query(ctx, "SELECT name,toString(uuid) as uuid_str FROM system.tables LIMIT 5") + if err != nil { + log.Fatal(err) + } + + for rows.Next() { + var ( + name, uuid string + ) + if err := rows.Scan( + &name, + &uuid, + ); err != nil { + log.Fatal(err) + } + log.Printf("name: %s, uuid: %s", + name, uuid) + } + +} + +func connect() (driver.Conn, error) { + var ( + ctx = context.Background() + conn, err = clickhouse.Open(&clickhouse.Options{ + Addr: []string{":9440"}, + Auth: clickhouse.Auth{ + Database: "default", + Username: "default", + Password: "", + }, + ClientInfo: clickhouse.ClientInfo{ + Products: []struct { + Name string + Version string + }{ + {Name: "an-example-go-client", Version: "0.1"}, + }, + }, + + Debugf: func(format string, v ...interface{}) { + fmt.Printf(format, v) + }, + TLS: &tls.Config{ + InsecureSkipVerify: true, + }, + }) + ) + + if err != nil { + return nil, err + } + + if err := conn.Ping(ctx); err != nil { + if exception, ok := err.(*clickhouse.Exception); ok { + fmt.Printf("Exception [%d] %s \n%s\n", exception.Code, exception.Message, exception.StackTrace) + } + return nil, err + } + return conn, nil +} +``` + +### go mod tidyを実行 + +```bash +go mod tidy +``` +### 接続情報を設定 +以å‰ã«èª¿ã¹ãŸæŽ¥ç¶šæƒ…報を`main.go`ã®`connect()`関数ã§è¨­å®šã—ã¾ã™: + +```go +func connect() (driver.Conn, error) { + var ( + ctx = context.Background() + conn, err = clickhouse.Open(&clickhouse.Options{ + #highlight-next-line + Addr: []string{":9440"}, + Auth: clickhouse.Auth{ + #highlight-start + Database: "default", + Username: "default", + Password: "", + #highlight-end + }, +``` + +### 例を実行 +```bash +go run . +``` +```response +2023/03/06 14:18:33 name: COLUMNS, uuid: 00000000-0000-0000-0000-000000000000 +2023/03/06 14:18:33 name: SCHEMATA, uuid: 00000000-0000-0000-0000-000000000000 +2023/03/06 14:18:33 name: TABLES, uuid: 00000000-0000-0000-0000-000000000000 +2023/03/06 14:18:33 name: VIEWS, uuid: 00000000-0000-0000-0000-000000000000 +2023/03/06 14:18:33 name: hourly_data, uuid: a4e36bd4-1e82-45b3-be77-74a0fe65c52b +``` + +### 詳細を学㶠+ã“ã®ã‚«ãƒ†ã‚´ãƒªãƒ¼ã®æ®‹ã‚Šã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯ã€ClickHouse Goクライアントã®è©³ç´°ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +## ClickHouse Go クライアント + +ClickHouseã¯2ã¤ã®å…¬å¼Goクライアントをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“れらã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯è£œå®Œçš„ã§ã‚ã‚Šã€æ„図的ã«ç•°ãªã‚‹ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +* [clickhouse-go](https://github.com/ClickHouse/clickhouse-go) - 高レベルã®è¨€èªžã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã§ã€Go標準ã®database/sqlインターフェースã¾ãŸã¯ãƒã‚¤ãƒ†ã‚£ãƒ–インターフェースã®ã„ãšã‚Œã‹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +* [ch-go](https://github.com/ClickHouse/ch-go) - 低レベルクライアント。ãƒã‚¤ãƒ†ã‚£ãƒ–インターフェースã®ã¿ã€‚ + +clickhouse-goã¯é«˜ãƒ¬ãƒ™ãƒ«ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã—ã€è¡ŒæŒ‡å‘ã®ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã‚’使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã®ã‚¯ã‚¨ãƒªã¨æŒ¿å…¥ã‚’å¯èƒ½ã«ã—ã€ãƒ‡ãƒ¼ã‚¿åž‹ã«å¯¾ã—ã¦å¯›å®¹ãªãƒãƒƒãƒå‡¦ç†ã‚’è¡Œã„ã¾ã™ã€‚ch-goã¯æœ€é©åŒ–ã•ã‚ŒãŸåˆ—指å‘ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã—ã€ã‚¿ã‚¤ãƒ—ã®åŽ³å¯†ã•ã¨è¤‡é›‘ãªä½¿ç”¨ã‚’犠牲ã«ã—ã¦ä½ŽCPUã¨ãƒ¡ãƒ¢ãƒªã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã§é«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã‚’è¡Œã„ã¾ã™ã€‚ + +version 2.3ã‹ã‚‰ã€clickhouse-goã¯ä½Žãƒ¬ãƒ™ãƒ«é–¢æ•°ï¼ˆã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€ãƒ‡ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€åœ§ç¸®ãªã©ï¼‰ã«ch-goを利用ã—ã¦ã„ã¾ã™ã€‚clickhouse-goã¯ã¾ãŸã€Goã®`database/sql`インターフェースè¦æ ¼ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã©ã¡ã‚‰ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚‚エンコードã®ãŸã‚ã«ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットを使用ã—ã¦ã€æœ€é©ãªãƒ‘フォーマンスをæä¾›ã—ã€ãƒã‚¤ãƒ†ã‚£ãƒ–ClickHouseプロトコルを介ã—ã¦é€šä¿¡ã§ãã¾ã™ã€‚clickhouse-goã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ—ロキシã¾ãŸã¯è² è·åˆ†æ•£ã®è¦ä»¶ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã«ã¯HTTPを輸é€æ©Ÿæ§‹ã¨ã—ã¦ã‚‚サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +クライアントライブラリをé¸æŠžã™ã‚‹éš›ã«ã¯ã€å„クライアントã®åˆ©ç‚¹ã¨æ¬ ç‚¹ã‚’èªè­˜ã—ã¦ãŠãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚詳細ã¯Choosing a Client Libraryã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +| | ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマット | ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコル | HTTPプロトコル | 行指å‘API | 列指å‘API | タイプã®æŸ”軟性 | 圧縮 | クエリプレースホルダ | +|:-------------:|:------------------:|:------------------:|:--------------:|:--------------:|:-------------:|:------------------:|:-------------------:|:------------------:| +| clickhouse-go | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| ch-go | ✅ | ✅ | | | ✅ | | ✅ | | + +## クライアントã®é¸æŠž + +クライアントライブラリã®é¸æŠžã¯ã€ä½¿ç”¨ãƒ‘ターンã¨æœ€é©ãªãƒ‘フォーマンスã®è¦æ±‚ã«ä¾å­˜ã—ã¾ã™ã€‚毎秒数百万件ã®æŒ¿å…¥ãŒå¿…è¦ãªæŒ¿å…¥ä¸­å¿ƒã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§ã¯ã€ä½Žãƒ¬ãƒ™ãƒ«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ[ch-go](https://github.com/ClickHouse/ch-go)ã®ä½¿ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ã€ClickHouseãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットãŒè¦æ±‚ã™ã‚‹è¡ŒæŒ‡å‘フォーマットã‹ã‚‰åˆ—ã¸ã®ãƒ‡ãƒ¼ã‚¿å¤‰æ›ã®é–¢é€£ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’回é¿ã—ã€ç°¡æ˜“化ã®ãŸã‚ã«`interface{}`(`any`)タイプã®ãƒªãƒ•ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ä½¿ç”¨ã‚’回é¿ã—ã¾ã™ã€‚ + +集計を中心ã¨ã—ãŸã‚¯ã‚¨ãƒªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¾ãŸã¯ã‚¹ãƒ«ãƒ¼ãƒ—ットãŒä½Žã„挿入ワークロードã«é–¢ã—ã¦ã¯ã€[clickhouse-go](https://github.com/ClickHouse/clickhouse-go)ãŒä½¿ã„慣れãŸ`database/sql`インターフェースã¨ã‚ˆã‚Šã‚·ãƒ³ãƒ—ルãªè¡Œã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ユーザーã¯ã‚ªãƒ—ションã§HTTPを輸é€ãƒ—ロトコルã¨ã—ã¦ä½¿ç”¨ã—ã€æ§‹é€ ä½“ã¨ã®é–“ã§è¡Œã‚’マーシャリングã™ã‚‹ãŸã‚ã®ãƒ˜ãƒ«ãƒ‘ー関数を利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## clickhouse-go クライアント + +clickhouse-goクライアントã¯ã€ClickHouseã¨é€šä¿¡ã™ã‚‹ãŸã‚ã®2ã¤ã®APIインターフェースをæä¾›ã—ã¾ã™ï¼š + +* ClickHouseクライアント専用API +* `database/sql`標準 - GolangãŒæä¾›ã™ã‚‹SQLデータベース周りã®ã‚¸ã‚§ãƒãƒªãƒƒã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã€‚ + +`database/sql`ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ä¾å­˜ã—ãªã„インターフェースをæä¾›ã—ã€é–‹ç™ºè€…ãŒãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚’抽象化ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ãŒã€ãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹ã„ãã¤ã‹ã®ã‚¿ã‚¤ãƒ—ã¨ã‚¯ã‚¨ãƒªã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã‚’強制ã—ã¾ã™ã€‚ã“ã®ãŸã‚ã€ãƒ‘フォーマンスãŒé‡è¦ãªå ´åˆ(https://github.com/clickHouse/clickHouse-go#benchmark)ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå°‚用APIã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ãŸã ã—ã€è¤‡æ•°ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ãƒ„ールã«ClickHouseã‚’çµ±åˆã—ãŸã„ユーザーã¯æ¨™æº–インターフェースã®ä½¿ç”¨ã‚’好むã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +ã„ãšã‚Œã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚‚データをエンコードã™ã‚‹éš›ã«[native format](/docs/ja/native-protocol/basics.md)ã¨ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルを使用ã—ã¾ã™ã€‚加ãˆã¦ã€æ¨™æº–インターフェースã¯HTTPを介ã—ãŸé€šä¿¡ã‚‚サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +| | ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマット | ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコル | HTTPプロトコル | ãƒãƒ«ã‚¯æ›¸ãè¾¼ã¿ã‚µãƒãƒ¼ãƒˆ | 構造体マーシャリング | 圧縮 | クエリプレースホルダ | +|:------------------:|:------------------:|:------------------:|:--------------:|:------------------:|:-----------------:|:-----------:|:------------------:| +| ClickHouse API | ✅ | ✅ | | ✅ | ✅ | ✅ | ✅ | +| `database/sql` API | ✅ | ✅ | ✅ | ✅ | | ✅ | ✅ | + +## インストール + +ドライãƒã®v1ã¯éžæŽ¨å¥¨ã¨ãªã£ã¦ãŠã‚Šã€æ©Ÿèƒ½æ›´æ–°ã‚„æ–°ã—ã„ClickHouseタイプã®ã‚µãƒãƒ¼ãƒˆã¯è¡Œã‚ã‚Œã¾ã›ã‚“。ユーザーã¯ã€ãƒ‘フォーマンスãŒå„ªã‚Œã¦ã„ã‚‹v2ã¸ã®ç§»è¡Œã‚’推奨ã—ã¾ã™ã€‚ + +2.xãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’インストールã™ã‚‹ã«ã¯ã€ãƒ‘ッケージをgo.modファイルã«è¿½åŠ ã—ã¦ãã ã•ã„: + +`require github.com/ClickHouse/clickhouse-go/v2 main` + +ã¾ãŸã¯ã€ãƒªãƒã‚¸ãƒˆãƒªã‚’クローンã—ã¦ãã ã•ã„: + +```bash +git clone --branch v2 https://github.com/clickhouse/clickhouse-go.git $GOPATH/src/github +``` + +ä»–ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’インストールã™ã‚‹ã«ã¯ã€ãƒ‘スã¾ãŸã¯ãƒ–ランãƒåã‚’å¿…è¦ã«å¿œã˜ã¦ä¿®æ­£ã—ã¦ãã ã•ã„。 + +```bash +mkdir my-clickhouse-app && cd my-clickhouse-app + +cat > go.mod <<-END + module my-clickhouse-app + + go 1.18 + + require github.com/ClickHouse/clickhouse-go/v2 main +END + +cat > main.go <<-END + package main + + import ( + "fmt" + "github.com/ClickHouse/clickhouse-go/v2" + ) + + func main() { + conn, _ := clickhouse.Open(&clickhouse.Options{Addr: []string{"127.0.0.1:9000"}}) + v, _ := conn.ServerVersion() + fmt.Println(v.String()) + } +END + +go mod tidy +go run main.go + +``` + +### ãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚°ã¨äº’æ›æ€§ + +クライアントã¯ClickHouseã¨ã¯ç‹¬ç«‹ã—ã¦ãƒªãƒªãƒ¼ã‚¹ã•ã‚Œã¾ã™ã€‚2.xã¯ç¾åœ¨ã®ä¸»ãªé–‹ç™ºå¯¾è±¡ã§ã™ã€‚2.xã®å…¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯äº’ã„ã«äº’æ›æ€§ãŒã‚ã‚‹ã¹ãã§ã™ã€‚ + +#### ClickHouse互æ›æ€§ + +クライアントã¯ä»¥ä¸‹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +- ã“ã“ã«è¨˜éŒ²ã•ã‚Œã¦ã„ã‚‹ClickHouseã®å…¨ã¦ã®ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚[ã“ã“](https://github.com/ClickHouse/ClickHouse/blob/master/SECURITY.md)ã«è¨˜è¼‰ã•ã‚Œã¦ã„る通りã§ã™ã€‚ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒã‚‚ã¯ã‚„サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„å ´åˆã€ãã‚Œã«å¯¾ã—ã¦ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒªãƒªãƒ¼ã‚¹ã‚‚アクティブã«ã¯ãƒ†ã‚¹ãƒˆã•ã‚Œãªããªã‚Šã¾ã™ã€‚ +- クライアントã®ãƒªãƒªãƒ¼ã‚¹æ—¥ã‹ã‚‰2年以内ã®å…¨ã¦ã®ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚注æ„:LTSãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã¿ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«ãƒ†ã‚¹ãƒˆã•ã‚Œã¾ã™ã€‚ + +#### Golang互æ›æ€§ + +| クライアントãƒãƒ¼ã‚¸ãƒ§ãƒ³ | Golangãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +|:--------------:|:---------------:| +| => 2.0 <= 2.2 | 1.17, 1.18 | +| >= 2.3 | 1.18 | + + +## ClickHouse クライアント API + +ClickHouseクライアントAPI用ã®å…¨ã¦ã®ã‚³ãƒ¼ãƒ‰ä¾‹ã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/clickhouse-go/tree/main/examples)ã«ã‚ã‚Šã¾ã™ã€‚ + +### 接続 + +以下ã®ä¾‹ã¯ClickHouseã«æŽ¥ç¶šã—ã€ã‚µãƒ¼ãƒãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’è¿”ã™ä¾‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ClickHouseãŒã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¿è­·ã•ã‚Œã¦ãŠã‚‰ãšã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãªå ´åˆã‚’想定ã—ã¦ã„ã¾ã™ã€‚ + +注æ„:デフォルトã®ãƒã‚¤ãƒ†ã‚£ãƒ–ãƒãƒ¼ãƒˆã‚’使用ã—ã¦æŽ¥ç¶šã—ã¦ã„ã¾ã™ã€‚ + +```go +conn, err := clickhouse.Open(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.Port)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, +}) +if err != nil { + return err +} +v, err := conn.ServerVersion() +fmt.Println(v) +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/connect.go) + +**後続ã®ä¾‹ã§ã¯ã€æ˜Žç¤ºçš„ã«ç¤ºã•ã‚Œã¦ã„ãªã„é™ã‚Šã€ClickHouseã®`conn`変数ãŒä½œæˆã•ã‚Œã€åˆ©ç”¨å¯èƒ½ã§ã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚** + +#### 接続設定 + +接続を開ãéš›ã«ã€Options構造体を使用ã—ã¦ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®å‹•ä½œã‚’制御ã§ãã¾ã™ã€‚利用å¯èƒ½ãªè¨­å®šã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +* `Protocol` - ãƒã‚¤ãƒ†ã‚£ãƒ–ã¾ãŸã¯HTTP。ç¾åœ¨ã€HTTPã¯[database/sql API](#databasesql-api)ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +* `TLS` - TLSオプション。éžnilã®å€¤ãŒTLSを有効ã«ã—ã¾ã™ã€‚[Using TLS](#using-tls)ã‚’å‚照。 +* `Addr` - アドレス(ãƒãƒ¼ãƒˆè¾¼ã¿ï¼‰ã®ã‚¹ãƒ©ã‚¤ã‚¹ã€‚ +* `Auth` - èªè¨¼è©³ç´°ã€‚[Authentication](#authentication)ã‚’å‚照。 +* `DialContext` - 接続ã®ç¢ºç«‹æ–¹æ³•ã‚’決定ã™ã‚‹ã‚«ã‚¹ã‚¿ãƒ ãƒ€ã‚¤ãƒ¤ãƒ«é–¢æ•°ã€‚ +* `Debug` - デãƒãƒƒã‚°ã‚’有効ã«ã™ã‚‹ãŸã‚ã®true/false。 +* `Debugf` - デãƒãƒƒã‚°å‡ºåŠ›ã‚’消費ã™ã‚‹é–¢æ•°ã‚’æä¾›ã—ã¾ã™ã€‚`debug`ãŒtrueã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +* `Settings` - ClickHouseã®è¨­å®šã®ãƒžãƒƒãƒ—。ã“れらã¯å…¨ã¦ã®ClickHouseクエリã«é©ç”¨ã•ã‚Œã¾ã™ã€‚[Using Context](#using-context)を使用ã—ã¦ã€ã‚¯ã‚¨ãƒªã”ã¨ã«è¨­å®šã‚’設定ã§ãã¾ã™ã€‚ +* `Compression` - ブロックã®åœ§ç¸®ã‚’有効ã«ã—ã¾ã™ã€‚[Compression](#compression)ã‚’å‚照。 +* `DialTimeout` - 接続ã®ç¢ºç«‹ã«ã‹ã‹ã‚‹æœ€å¤§æ™‚間。デフォルトã¯`1秒`。 +* `MaxOpenConns` - ä»»æ„ã®æ™‚点ã§ä½¿ç”¨ã§ãる最大接続数ã§ã™ã€‚アイドルプールã«ã‚る接続ã¯å¢—減ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ä»»æ„ã®æ™‚点ã§ä½¿ç”¨ã§ãる接続ã¯ã“ã®æ•°ã«é™å®šã•ã‚Œã¾ã™ã€‚デフォルトã¯MaxIdleConns+5ã§ã™ã€‚ +* `MaxIdleConns` - プールã«ä¿æŒã™ã‚‹æŽ¥ç¶šæ•°ã€‚å¯èƒ½ãªå ´åˆã€æŽ¥ç¶šã¯å†åˆ©ç”¨ã•ã‚Œã¾ã™ã€‚デフォルトã¯`5`。 +* `ConnMaxLifetime` - 接続を利用å¯èƒ½ãªçŠ¶æ…‹ã§ä¿æŒã™ã‚‹æœ€é•·å¯¿å‘½ã€‚デフォルトã¯1時間ã§ã™ã€‚ã“ã®æ™‚é–“ã®å¾Œã€æŽ¥ç¶šã¯ç ´æ£„ã•ã‚Œã€å¿…è¦ã«å¿œã˜ã¦æ–°ã—ã„接続ãŒãƒ—ールã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ +* `ConnOpenStrategy` - ノードアドレスリストをã©ã®ã‚ˆã†ã«æ¶ˆè²»ã—ã€æŽ¥ç¶šã‚’確立ã™ã‚‹ã‹ã‚’決定ã—ã¾ã™ã€‚[Connecting to Multiple Nodes](#connecting-to-multiple-nodes)ã‚’å‚照。 +* `BlockBufferSize` - 一度ã«ãƒãƒƒãƒ•ã‚¡ã«ãƒ‡ã‚³ãƒ¼ãƒ‰ã™ã‚‹ãƒ–ロックã®æœ€å¤§æ•°ã€‚大ããªå€¤ã¯ä¸¦åˆ—化を増やã—ã¾ã™ãŒã€ãƒ¡ãƒ¢ãƒªã‚’犠牲ã«ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ブロックサイズã¯ã‚¯ã‚¨ãƒªã«ä¾å­˜ã™ã‚‹ãŸã‚ã€æŽ¥ç¶šæ™‚ã«ã“れを設定ã§ãã¾ã™ãŒã€è¿”ã™ãƒ‡ãƒ¼ã‚¿ã«åŸºã¥ã„ã¦ã‚¯ã‚¨ãƒªã”ã¨ã«ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルトã¯`2`ã§ã™ã€‚ + +```go +conn, err := clickhouse.Open(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.Port)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + DialContext: func(ctx context.Context, addr string) (net.Conn, error) { + dialCount++ + var d net.Dialer + return d.DialContext(ctx, "tcp", addr) + }, + Debug: true, + Debugf: func(format string, v ...interface{}) { + fmt.Printf(format, v) + }, + Settings: clickhouse.Settings{ + "max_execution_time": 60, + }, + Compression: &clickhouse.Compression{ + Method: clickhouse.CompressionLZ4, + }, + DialTimeout: time.Duration(10) * time.Second, + MaxOpenConns: 5, + MaxIdleConns: 5, + ConnMaxLifetime: time.Duration(10) * time.Minute, + ConnOpenStrategy: clickhouse.ConnOpenInOrder, + BlockBufferSize: 10, +}) +if err != nil { + return err +} +``` +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/connect_settings.go) + +#### 接続プール + +クライアントã¯æŽ¥ç¶šãƒ—ールを維æŒã—ã€å¿…è¦ã«å¿œã˜ã¦ã‚¯ã‚¨ãƒªé–“ã§ã“れらをå†åˆ©ç”¨ã—ã¾ã™ã€‚ä»»æ„ã®æ™‚点ã§ä½¿ç”¨ã•ã‚Œã‚‹æŽ¥ç¶šã¯`MaxOpenConns`ã§åˆ¶å¾¡ã•ã‚Œã€ãƒ—ールã®æœ€å¤§ã‚µã‚¤ã‚ºã¯`MaxIdleConns`ã§åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚クライアントã¯ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã”ã¨ã«ãƒ—ールã‹ã‚‰æŽ¥ç¶šã‚’å–å¾—ã—ã€ãれをå†åˆ©ç”¨ã®ãŸã‚ã«ãƒ—ールã«è¿”å´ã—ã¾ã™ã€‚接続ã¯ãƒãƒƒãƒã®æœŸé–“中使用ã•ã‚Œã€`Send()`ã§è§£æ”¾ã•ã‚Œã¾ã™ã€‚ + +プール内ã®åŒã˜æŽ¥ç¶šãŒå¾Œç¶šã®ã‚¯ã‚¨ãƒªã«ä½¿ç”¨ã•ã‚Œã‚‹ä¿è¨¼ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ`MaxOpenConns=1`を設定ã—ãŸå ´åˆã¯ä¾‹å¤–ã§ã™ã€‚ã“ã‚Œã¯ã‚ã£ãŸã«å¿…è¦ã‚ã‚Šã¾ã›ã‚“ãŒã€ä¸€æ™‚テーブルを使用ã—ã¦ã„ã‚‹å ´åˆã«ã¯å¿…è¦ã«ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +ã¾ãŸ`ConnMaxLifetime`ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§1時間ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã®ã“ã¨ãŒåŽŸå› ã§ã€ãƒŽãƒ¼ãƒ‰ãŒã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚’離れる際ã«ClickHouseã¸ã®è² è·ãŒä¸å‡è¡¡ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒŽãƒ¼ãƒ‰ãŒåˆ©ç”¨ä¸èƒ½ã«ãªã‚‹ã¨ã€ä»–ã®ãƒŽãƒ¼ãƒ‰ã«æŽ¥ç¶šãŒãƒãƒ©ãƒ³ã‚¹ã•ã‚Œã‚‹ãŸã‚ã§ã™ã€‚ã“れらã®æŽ¥ç¶šã¯æŒç¶šã—ã€å•é¡Œã®ã‚るノードãŒã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã«æˆ»ã£ã¦ã‚‚デフォルトã§1時間更新ã•ã‚Œã¾ã›ã‚“。負è·ã®é«˜ã„ワークロードã®å ´åˆã«ã¯ã“ã®å€¤ã‚’下ã’ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。 + +### TLSを使用ã™ã‚‹ + +低レベルã§ã¯ã€å…¨ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆæŽ¥ç¶šãƒ¡ã‚½ãƒƒãƒ‰ï¼ˆDSN/OpenDB/Open)ã¯å®‰å…¨ãªæŽ¥ç¶šã‚’確立ã™ã‚‹ãŸã‚ã«[Go tls パッケージ](https://pkg.go.dev/crypto/tls)を使用ã—ã¾ã™ã€‚Options構造体ã«éžnilã®`tls.Config`ãƒã‚¤ãƒ³ã‚¿ãƒ¼ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯TLSを使用ã—ã¾ã™ã€‚ + +```go +env, err := GetNativeTestEnvironment() +if err != nil { + return err +} +cwd, err := os.Getwd() +if err != nil { + return err +} +t := &tls.Config{} +caCert, err := ioutil.ReadFile(path.Join(cwd, "../../tests/resources/CAroot.crt")) +if err != nil { + return err +} +caCertPool := x509.NewCertPool() +successful := caCertPool.AppendCertsFromPEM(caCert) +if !successful { + return err +} +t.RootCAs = caCertPool +conn, err := clickhouse.Open(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.SslPort)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + TLS: t, +}) +if err != nil { + return err +} +v, err := conn.ServerVersion() +if err != nil { + return err +} +fmt.Println(v.String()) +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/ssl.go) + +ã“ã®æœ€å°é™ã®`TLS.Config`ã¯é€šå¸¸ã€ClickHouseサーãƒãƒ¼ã®å®‰å…¨ãªãƒã‚¤ãƒ†ã‚£ãƒ–ãƒãƒ¼ãƒˆï¼ˆé€šå¸¸ã¯9440)ã«æŽ¥ç¶šã™ã‚‹ã®ã«å分ã§ã™ã€‚ClickHouseサーãƒãƒ¼ã«æœ‰åŠ¹ãªè¨¼æ˜Žæ›¸ãŒãªã„(期é™åˆ‡ã‚Œã€ãƒ›ã‚¹ãƒˆåãŒé–“é•ã£ã¦ã„ã‚‹ã€å…¬é–‹çš„ã«èªè­˜ã•ã‚Œã‚‹ãƒ«ãƒ¼ãƒˆèªè¨¼å±€ã«ã‚ˆã£ã¦ç½²åã•ã‚Œã¦ã„ãªã„)場åˆã¯ã€InsecureSkipVerifyã‚’trueã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€ã“ã‚Œã¯å¼·ã推奨ã•ã‚Œã¾ã›ã‚“。 + +```go +conn, err := clickhouse.Open(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.SslPort)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + TLS: &tls.Config{ + InsecureSkipVerify: true, + }, +}) +if err != nil { + return err +} +v, err := conn.ServerVersion() +``` +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/ssl_no_verify.go) + +追加ã®TLSパラメータãŒå¿…è¦ãªå ´åˆã¯ã€ã‚¢ãƒ—リケーションコードã§`tls.Config`構造体ã®å¿…è¦ãªãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã¯ã€ç‰¹å®šã®æš—å·ã‚¹ã‚¤ãƒ¼ãƒˆã®æŒ‡å®šã€ç‰¹å®šã®TLSãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆãŸã¨ãˆã°1.2ã¾ãŸã¯1.3)ã®å¼·åˆ¶ã€å†…部CA証明書ãƒã‚§ãƒ¼ãƒ³ã®è¿½åŠ ã€ClickHouseサーãƒãƒ¼ã«ã‚ˆã£ã¦è¦æ±‚ã•ã‚ŒãŸå ´åˆã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè¨¼æ˜Žæ›¸ï¼ˆãŠã‚ˆã³ç§˜å¯†éµï¼‰ã®è¿½åŠ ã€ãã—ã¦ã‚ˆã‚Šå°‚門的ãªã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šã®ä»–ã®ã‚ªãƒ—ションãŒå«ã¾ã‚Œã¾ã™ã€‚ + +### èªè¨¼ + +接続情報ã§Auth構造体を指定ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードを指定ã—ã¾ã™ã€‚ + +```go +conn, err := clickhouse.Open(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.Port)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, +}) +if err != nil { + return err +} +if err != nil { + return err +} +v, err := conn.ServerVersion() +``` +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/auth.go) + +### 複数ã®ãƒŽãƒ¼ãƒ‰ã¸ã®æŽ¥ç¶š + +`Addr`構造体を介ã—ã¦è¤‡æ•°ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’指定ã§ãã¾ã™ã€‚ + +```go +conn, err := clickhouse.Open(&clickhouse.Options{ + Addr: []string{"127.0.0.1:9001", "127.0.0.1:9002", fmt.Sprintf("%s:%d", env.Host, env.Port)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, +}) +if err != nil { + return err +} +v, err := conn.ServerVersion() +if err != nil { + return err +} +fmt.Println(v.String()) +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/1c0d81d0b1388dbb9e09209e535667df212f4ae4/examples/clickhouse_api/multi_host.go#L26-L45) + +2ã¤ã®æŽ¥ç¶šæˆ¦ç•¥ãŒåˆ©ç”¨å¯èƒ½ã§ã™ï¼š + +* `ConnOpenInOrder`(デフォルト) - アドレスã¯é †ç•ªã«æ¶ˆè²»ã•ã‚Œã¾ã™ã€‚後ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã¯ã€ãƒªã‚¹ãƒˆå†…ã®ã‚ˆã‚Šæ—©ã„アドレスを使用ã—ã¦æŽ¥ç¶šã§ããªã„å ´åˆã«ã®ã¿åˆ©ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯äº‹å®Ÿä¸Šã®ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼æˆ¦ç•¥ã§ã™ã€‚ +* `ConnOpenRoundRobin` - ラウンドロビン戦略を使用ã—ã¦ã‚¢ãƒ‰ãƒ¬ã‚¹é–“ã®è² è·ã‚’ãƒãƒ©ãƒ³ã‚¹ã—ã¾ã™ã€‚ + +ã“ã‚Œã¯ã‚ªãƒ—ション`ConnOpenStrategy`を介ã—ã¦åˆ¶å¾¡ã§ãã¾ã™ã€‚ + +```go +conn, err := clickhouse.Open(&clickhouse.Options{ + Addr: []string{"127.0.0.1:9001", "127.0.0.1:9002", fmt.Sprintf("%s:%d", env.Host, env.Port)}, + ConnOpenStrategy: clickhouse.ConnOpenRoundRobin, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, +}) +if err != nil { + return err +} +v, err := conn.ServerVersion() +if err != nil { + return err +} +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/1c0d81d0b1388dbb9e09209e535667df212f4ae4/examples/clickhouse_api/multi_host.go#L50-L67) + +### 実行 + +ä»»æ„ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’`Exec`メソッドを介ã—ã¦å®Ÿè¡Œã§ãã¾ã™ã€‚ã“ã‚Œã¯DDLã‚„å˜ç´”ãªã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã«ä¾¿åˆ©ã§ã™ã€‚大ããªæŒ¿å…¥ã‚„クエリã®ç¹°ã‚Šè¿”ã—ã«ã¯ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 + +```go +conn.Exec(context.Background(), `DROP TABLE IF EXISTS example`) +err = conn.Exec(context.Background(), ` + CREATE TABLE IF NOT EXISTS example ( + Col1 UInt8, + Col2 String + ) engine=Memory +`) +if err != nil { + return err +} +conn.Exec(context.Background(), "INSERT INTO example VALUES (1, 'test-1')") +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/exec.go) + +クエリã«ç‰¹å®šã®è¨­å®šã‚’渡ã™ãŸã‚ã«Contextをクエリã«æ¸¡ã™æ©Ÿèƒ½ã«æ³¨æ„ã—ã¦ãã ã•ã„。詳細ã¯[Using Context](#using-context)ã§ã”覧ãã ã•ã„。 + +### ãƒãƒƒãƒæŒ¿å…¥ + +大é‡ã®è¡Œã‚’挿入ã™ã‚‹ãŸã‚ã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒãƒƒãƒã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ã“ã‚Œã«ã¯ã€ãƒãƒƒãƒã®æº–å‚™ã¨ã€ãã‚Œã¸ã®è¡Œã®è¿½åŠ ãŒå¿…è¦ã§ã™ã€‚é€ä¿¡ã¯æœ€çµ‚çš„ã«`Send()`メソッドを介ã—ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ãƒãƒƒãƒã¯SendãŒå®Ÿè¡Œã•ã‚Œã‚‹ã¾ã§ãƒ¡ãƒ¢ãƒªå†…ã«ä¿æŒã•ã‚Œã¾ã™ã€‚ + +```go +conn, err := GetNativeConnection(nil, nil, nil) +if err != nil { + return err +} +ctx := context.Background() +defer func() { + conn.Exec(ctx, "DROP TABLE example") +}() +conn.Exec(context.Background(), "DROP TABLE IF EXISTS example") +err = conn.Exec(ctx, ` + CREATE TABLE IF NOT EXISTS example ( + Col1 UInt8 + , Col2 String + , Col3 FixedString(3) + , Col4 UUID + , Col5 Map(String, UInt8) + , Col6 Array(String) + , Col7 Tuple(String, UInt8, Array(Map(String, String))) + , Col8 DateTime + ) Engine = Memory +`) +if err != nil { + return err +} + + +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} +for i := 0; i < 1000; i++ { + err := batch.Append( + uint8(42), + "ClickHouse", + "Inc", + uuid.New(), + map[string]uint8{"key": 1}, // Map(String, UInt8) + []string{"Q", "W", "E", "R", "T", "Y"}, // Array(String) + []interface{}{ // Tuple(String, UInt8, Array(Map(String, String))) + "String Value", uint8(5), []map[string]string{ + {"key": "value"}, + {"key": "value"}, + {"key": "value"}, + }, + }, + time.Now(), + ) + if err != nil { + return err + } +} +return batch.Send() +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/batch.go) + +ClickHouseã®æŽ¨å¥¨äº‹é …ã¯[ã“ã¡ã‚‰](https://clickhouse.com/docs/ja/about-us/performance/#performance-when-inserting-data)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。ãƒãƒƒãƒã¯goルーãƒãƒ³é–“ã§å…±æœ‰ã—ãªã„ã§ãã ã•ã„ - ルーãƒãƒ³ã”ã¨ã«åˆ¥ã€…ã®ãƒãƒƒãƒã‚’構築ã—ã¦ãã ã•ã„。 + +上記ã®ä¾‹ã‹ã‚‰ã€è¡Œã‚’追加ã™ã‚‹éš›ã«ã¯å¤‰æ•°ã‚¿ã‚¤ãƒ—ãŒã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã¨ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。マッピングã¯é€šå¸¸æ˜Žã‚‰ã‹ã§ã™ãŒã€ã“ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã¯æŸ”軟ã§ã‚るよã†ã«åŠªã‚ã¦ãŠã‚Šã€ç²¾åº¦ã®æ失ãŒãªã„é™ã‚Šåž‹ãŒå¤‰æ›ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€æ¬¡ã®ä¾‹ã§ã¯ã€datetime64ã«æ–‡å­—列を挿入ã™ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +```go +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} +for i := 0; i < 1000; i++ { + err := batch.Append( + "2006-01-02 15:04:05.999", + ) + if err != nil { + return err + } +} +return batch.Send() +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/type_convert.go) + +å„カラムタイプã«å¯¾ã™ã‚‹å¯¾å¿œã™ã‚‹goタイプã®å…¨ä½“çš„ãªè¦ç´„ã«ã¤ã„ã¦ã¯ã€ [Type Conversions](#type-conversions)ã‚’ã”å‚ç…§ãã ã•ã„。 + +特定ã®å¤‰æ›ã®ã‚µãƒãƒ¼ãƒˆãŒå¿…è¦ãªå ´åˆã¯ã€å•é¡Œã‚’報告ã—ã¦ã„ãŸã ã‘ã‚Œã°ã¨æ€ã„ã¾ã™ã€‚ + +### クエリã®å®Ÿè¡Œ + +ユーザーã¯`QueryRow`メソッドを使用ã—ã¦å˜ä¸€ã®è¡Œã‚’クエリã™ã‚‹ã‹ã€`Query`を介ã—ã¦çµæžœã‚»ãƒƒãƒˆã‚’ç¹°ã‚Šè¿”ã—処ç†ã™ã‚‹ã‚«ãƒ¼ã‚½ãƒ«ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚å‰è€…ã¯ãƒ‡ãƒ¼ã‚¿ã‚’シリアライズã™ã‚‹ãŸã‚ã®å®›å…ˆã‚’å—ã‘å–ã‚‹ã®ã«å¯¾ã—ã€å¾Œè€…ã¯å„è¡Œã«å¯¾ã—ã¦`Scan`を呼ã³å‡ºã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```go +row := conn.QueryRow(context.Background(), "SELECT * FROM example") +var ( + col1 uint8 + col2, col3, col4 string + col5 map[string]uint8 + col6 []string + col7 []interface{} + col8 time.Time +) +if err := row.Scan(&col1, &col2, &col3, &col4, &col5, &col6, &col7, &col8); err != nil { + return err +} +fmt.Printf("row: col1=%d, col2=%s, col3=%s, col4=%s, col5=%v, col6=%v, col7=%v, col8=%v\n", col1, col2, col3, col4, col5, col6, col7, col8) +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/query_row.go) + +```go +rows, err := conn.Query(ctx, "SELECT Col1, Col2, Col3 FROM example WHERE Col1 >= 2") +if err != nil { + return err +} +for rows.Next() { + var ( + col1 uint8 + col2 string + col3 time.Time + ) + if err := rows.Scan(&col1, &col2, &col3); err != nil { + return err + } + fmt.Printf("row: col1=%d, col2=%s, col3=%s\n", col1, col2, col3) +} +rows.Close() +return rows.Err() +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/query_rows.go) + +ã„ãšã‚Œã®å ´åˆã‚‚ã€å¯¾å¿œã™ã‚‹ã‚«ãƒ©ãƒ å€¤ã‚’シリアライズã™ã‚‹ãŸã‚ã«ãƒã‚¤ãƒ³ã‚¿ã‚’変数ã«æ¸¡ã™å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“れらã¯`SELECT`ステートメントã§æŒ‡å®šã•ã‚ŒãŸé †åºã§æ¸¡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ - デフォルトã§ã¯ã€ä¸Šè¨˜ã®ã‚ˆã†ã«`SELECT *`ãŒã‚ã‚‹å ´åˆã€ã‚«ãƒ©ãƒ ã®å®£è¨€é †åºãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +挿入ã¨åŒæ§˜ã«ã€`Scan`メソッドã¯ã‚¿ãƒ¼ã‚²ãƒƒãƒˆå¤‰æ•°ãŒé©åˆ‡ãªã‚¿ã‚¤ãƒ—ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れも柔軟ã§ã‚るよã†åŠªã‚ã¦ã„ã¾ã™ãŒã€UUIDカラムを文字列変数ã«èª­ã¿è¾¼ã‚€ã“ã¨ãªã©ã€åž‹ãŒå¯èƒ½ãªé™ã‚Šå¤‰æ›ã•ã‚Œã‚‹ã‚ˆã†ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã•ã¾ã–ã¾ãªã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã«å¯¾ã™ã‚‹golangタイプã®ä¸€è¦§ã«ã¤ã„ã¦ã¯ã€[Type Conversions](#type-conversions)ã‚’ã”å‚ç…§ãã ã•ã„。 + +最後ã«ã€`Query`ã¨`QueryRow`メソッドã«Contextを渡ã™èƒ½åŠ›ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ã€ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã®è¨­å®šã«ä½¿ç”¨ã§ãã¾ã™ã€‚詳細ã¯[Using Context](#using-context)ã§å‚ç…§ã—ã¦ãã ã•ã„。 + +### éžåŒæœŸæŒ¿å…¥ + +éžåŒæœŸæŒ¿å…¥ã¯Asyncメソッドを介ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒãƒ‡ãƒ¼ã‚¿ã‚’å—ä¿¡ã—ãŸå¾Œã«å¿œç­”ã™ã‚‹ã‹ã€ã‚µãƒ¼ãƒãƒ¼ã®æŒ¿å…¥ãŒå®Œäº†ã™ã‚‹ã¾ã§å¾…æ©Ÿã™ã‚‹ã‹ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Š[wait_for_async_insert](https://clickhouse.com/docs/ja/operations/settings/settings/#wait-for-async-insert)を制御ã—ã¾ã™ã€‚ + +```go +conn, err := GetNativeConnection(nil, nil, nil) +if err != nil { + return err +} +ctx := context.Background() +if err := clickhouse_tests.CheckMinServerServerVersion(conn, 21, 12, 0); err != nil { + return nil +} +defer func() { + conn.Exec(ctx, "DROP TABLE example") +}() +conn.Exec(ctx, `DROP TABLE IF EXISTS example`) +const ddl = ` + CREATE TABLE example ( + Col1 UInt64 + , Col2 String + , Col3 Array(UInt8) + , Col4 DateTime + ) ENGINE = Memory +` +if err := conn.Exec(ctx, ddl); err != nil { + return err +} +for i := 0; i < 100; i++ { + if err := conn.AsyncInsert(ctx, fmt.Sprintf(`INSERT INTO example VALUES ( + %d, '%s', [1, 2, 3, 4, 5, 6, 7, 8, 9], now() + )`, i, "Golang SQL database driver"), false); err != nil { + return err + } +} +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/async.go) + +### 列指å‘ã®æŒ¿å…¥ + +カラム形å¼ã§æŒ¿å…¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚データãŒæ—¢ã«ã“ã®æ§‹é€ ã«æ•´ç†ã•ã‚Œã¦ã„ã‚‹å ´åˆã«ãŠã„ã¦ã€ãƒ‘フォーマンスã®æ”¹å–„ãŒäºˆæƒ³ã•ã‚Œã¾ã™ã€‚ + +```go +batch, err := conn.PrepareBatch(context.Background(), "INSERT INTO example") +if err != nil { + return err +} +var ( + col1 []uint64 + col2 []string + col3 [][]uint8 + col4 []time.Time +) +for i := 0; i < 1_000; i++ { + col1 = append(col1, uint64(i)) + col2 = append(col2, "Golang SQL database driver") + col3 = append(col3, []uint8{1, 2, 3, 4, 5, 6, 7, 8, 9}) + col4 = append(col4, time.Now()) +} +if err := batch.Column(0).Append(col1); err != nil { + return err +} +if err := batch.Column(1).Append(col2); err != nil { + return err +} +if err := batch.Column(2).Append(col3); err != nil { + return err +} +if err := batch.Column(3).Append(col4); err != nil { + return err +} +return batch.Send() +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/columnar_insert.go) + +### 構造体ã®ä½¿ç”¨ + +ユーザーã«ã¨ã£ã¦ã€Golangã®æ§‹é€ ä½“ã¯ClickHouseã®ãƒ‡ãƒ¼ã‚¿ã®è¡Œã‚’è«–ç†çš„ã«è¡¨ç¾ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ãƒã‚¤ãƒ†ã‚£ãƒ–インターフェースã¯ã€ã“れを支æ´ã™ã‚‹ãŸã‚ã®ä¾¿åˆ©ãªé–¢æ•°ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ + +#### シリアライズ付ãé¸æŠž + +Selectメソッドを使用ã™ã‚‹ã¨ã€å¿œç­”行をå˜ä¸€ã®å‘¼ã³å‡ºã—ã§æ§‹é€ ä½“ã®ã‚¹ãƒ©ã‚¤ã‚¹ã«ãƒžãƒ¼ã‚·ãƒ£ãƒ«ã§ãã¾ã™ã€‚ + +```go +var result []struct { + Col1 uint8 + Col2 string + ColumnWithName time.Time `ch:"Col3"` +} + +if err = conn.Select(ctx, &result, "SELECT Col1, Col2, Col3 FROM example"); err != nil { + return err +} + +for _, v := range result { + fmt.Printf("row: col1=%d, col2=%s, col3=%s\n", v.Col1, v.Col2, v.ColumnWithName) +} +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/select_struct.go) + +#### Scan 構造体 + +ScanStructã¯ã€ã‚¯ã‚¨ãƒªã‹ã‚‰å˜ä¸€ã®è¡Œã‚’構造体ã«ãƒžãƒ¼ã‚·ãƒ£ãƒ«ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +```go +var result struct { + Col1 int64 + Count uint64 `ch:"count"` +} +if err := conn.QueryRow(context.Background(), "SELECT Col1, COUNT() AS count FROM example WHERE Col1 = 5 GROUP BY Col1").ScanStruct(&result); err != nil { + return err +} +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/scan_struct.go) + +#### 構造体ã®è¿½åŠ  + +AppendStructã¯[batch](#batch-insert)ã«æ§‹é€ ä½“を追加ã—ã¦è§£é‡ˆã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€æ§‹é€ ä½“ã®ã‚«ãƒ©ãƒ ãŒåå‰ã¨åž‹ã®ä¸¡æ–¹ã§ãƒ†ãƒ¼ãƒ–ルã¨ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚å…¨ã¦ã®ã‚«ãƒ©ãƒ ãŒåŒç­‰ã®æ§‹é€ ä½“フィールドをæŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒã€ä¸€éƒ¨ã®æ§‹é€ ä½“フィールドã¯åŒç­‰ã®ã‚«ãƒ©ãƒ è¡¨ç¾ã‚’æŒã£ã¦ã„ãªã„å ´åˆã‚‚ã‚ã‚Šã¾ã™ã€‚ã“れらã¯å˜ã«ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + +```go +batch, err := conn.PrepareBatch(context.Background(), "INSERT INTO example") +if err != nil { + return err +} +for i := 0; i < 1_000; i++ { + err := batch.AppendStruct(&row{ + Col1: uint64(i), + Col2: "Golang SQL database driver", + Col3: []uint8{1, 2, 3, 4, 5, 6, 7, 8, 9}, + Col4: time.Now(), + ColIgnored: "this will be ignored", + }) + if err != nil { + return err + } +} +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/append_struct.go) + +### ã‚¿ã‚¤ãƒ—å¤‰æ› + +クライアントã¯æŒ¿å…¥ã¨ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã®ãƒžãƒ¼ã‚·ãƒ£ãƒªãƒ³ã‚°ã«é–¢ã—ã¦å¯èƒ½ãªé™ã‚ŠæŸ”軟ã«å¯¾å¿œã™ã‚‹ã“ã¨ã‚’目指ã—ã¦ã„ã¾ã™ã€‚多ãã®å ´åˆã€ClickHouseã®ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã«ç›¸å½“ã™ã‚‹GolangタイプãŒå­˜åœ¨ã—ã¾ã™ã€‚例:[UInt64](https://clickhouse.com/docs/ja/sql-reference/data-types/int-uint/) to [uint64](https://pkg.go.dev/builtin#uint64)。ã“れらã®è«–ç†çš„ãªãƒžãƒƒãƒ”ングã¯å¸¸ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ユーザーã¯ã€å¤‰æ•°ã‚’カラムã«æŒ¿å…¥ã™ã‚‹ã‹ã€å—信データをã¾ãšå¤‰æ›ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ãã®å¤‰æ›ã‚’è¡Œãˆã‚‹å ´åˆã«ãŠã„ã¦å¤‰æ•°ã‚¿ã‚¤ãƒ—を利用ã™ã‚‹ã“ã¨ã‚’希望ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã®é€æ˜Žãªå¤‰æ›ã¯ã€ç²¾åº¦ã®æ失ãŒè¨±ã•ã‚Œãªã„å ´åˆã«ã®ã¿å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚例ãˆã°ã€uint32ã¯UInt64カラムã‹ã‚‰å—信データを得るãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。逆ã«ã€æŒ‡å®šãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆè¦ä»¶ã‚’満ãŸã›ã°ã€datetime64フィールドã«æ–‡å­—列を挿入ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +ç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るプリミティブタイプã®å¤‰æ›ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/clickhouse-go/blob/main/TYPES.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®ä½œæ¥­ã¯é€²è¡Œä¸­ã§ã‚ã‚Šã€æŒ¿å…¥ã‚¿ã‚¤ãƒŸãƒ³ã‚°ï¼ˆ`Append`/`AppendRow`)ã¨èª­ã¿å–り時(`Scan`ã§ã”利用ã„ãŸã ã‘ã¾ã™ï¼‰ã«åˆ†ã‘られã¾ã™ã€‚特定ã®å¤‰æ›ã®ã‚µãƒãƒ¼ãƒˆãŒå¿…è¦ãªå ´åˆã¯ã€å•é¡Œã‚’報告ã—ã¦ãã ã•ã„。 + +### 複雑ãªã‚¿ã‚¤ãƒ— + +#### 日付/日時タイプ + +ClickHouse goクライアントã¯`Date`ã€`Date32`ã€`DateTime`ã€ãŠã‚ˆã³`DateTime64`ã®æ—¥ä»˜/日時タイプをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚日付ã¯`2006-01-02`ã®å½¢å¼ã®æ–‡å­—列ã‹ã€ãƒã‚¤ãƒ†ã‚£ãƒ–Goã®`time.Time{}`ã¾ãŸã¯`sql.NullTime`を使ã£ã¦æŒ¿å…¥ã§ãã¾ã™ã€‚日時もåŒæ§˜ã§ã™ãŒã€`2006-01-02 15:04:05`ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®æ–‡å­—列ã¨ã—ã¦ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚timezoneオフセットãŒã‚ã‚‹å ´åˆã¯ã€`2006-01-02 15:04:05 +08:00`ã®ã‚ˆã†ã«ã—ã¦ãã ã•ã„。`time.Time{}`ã¨`sql.NullTime`ã¯èª­ã¿å–り時ã«ã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€`sql.Scanner`インターフェースã®ä»»æ„ã®å®Ÿè£…もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +Timezone情報ã®æ‰±ã„ã¯ã€ClickHouseã®ã‚¿ã‚¤ãƒ—ã¨å€¤ãŒæŒ¿å…¥/読ã¿å–ã‚Šã•ã‚Œã¦ã„ã‚‹ã‹ã«ä¾å­˜ã—ã¾ã™ï¼š + +* **DateTime/DateTime64** + * **挿入**時ã«ã¯ã€å€¤ã¯UNIXタイムスタンプ形å¼ã§ClickHouseã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚タイムゾーンãŒæä¾›ã•ã‚Œãªã„å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒä»®å®šã•ã‚Œã¾ã™ã€‚`time.Time{}`ã‚„`sql.NullTime`ã¯ã€å¯¾å¿œã™ã‚‹è«–ç†ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + * **é¸æŠž**時ã«ã¯ã€ã‚«ãƒ©ãƒ ã®timezoneãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãã®timezoneãŒ`time.Time`値を返ã™éš›ã«ä½¿ã‚ã‚Œã¾ã™ã€‚ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®timezoneãŒä½¿ã‚ã‚Œã¾ã™ã€‚ +* **Date/Date32** + * **挿入**時ã«ã¯ã€æ—¥ä»˜ã¯UNIXタイムスタンプã¸ã®å¤‰æ›æ™‚ã«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’考慮ã•ã‚Œã¾ã™ã€ã™ãªã‚ã¡ã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§ã‚ªãƒ•ã‚»ãƒƒãƒˆã•ã‚ŒãŸä¸Šã§æ—¥ä»˜ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚日付ã¯ClickHouseã«ãƒ­ã‚±ãƒ¼ãƒ«ãŒã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯ã€æ–‡å­—列内ã«æŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ­ãƒ¼ã‚«ãƒ«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒä½¿ã‚ã‚Œã¾ã™ã€‚ + * **é¸æŠž**時ã«ã¯ã€æ—¥æ™‚ãŒ`time.Time{}`ã¾ãŸã¯`sql.NullTime{}`インスタンスã«èª­ã¿è¾¼ã¾ã‚Œã‚‹ã¨ãã«timezone情報ãŒã‚ã‚Šã¾ã›ã‚“。 + +#### é…列 + +é…列ã¯ã‚¹ãƒ©ã‚¤ã‚¹ã¨ã—ã¦æŒ¿å…¥ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚è¦ç´ ã®åž‹ãƒ«ãƒ¼ãƒ«ã¯[プリミティブタイプ](#type-conversions)ã«å¯¾ã™ã‚‹ã‚‚ã®ã¨ä¸€è‡´ã—ã€å¯èƒ½ãªå ´åˆã¯è¦ç´ ãŒå¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +Scan時ã«ã¯ã€ã‚¹ãƒ©ã‚¤ã‚¹ã¸ã®ãƒã‚¤ãƒ³ã‚¿ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```go +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} +var i int64 +for i = 0; i < 10; i++ { + err := batch.Append( + []string{strconv.Itoa(int(i)), strconv.Itoa(int(i + 1)), strconv.Itoa(int(i + 2)), strconv.Itoa(int(i + 3))}, + [][]int64{{i, i + 1}, {i + 2, i + 3}, {i + 4, i + 5}}, + ) + if err != nil { + return err + } +} +if err := batch.Send(); err != nil { + return err +} +var ( + col1 []string + col2 [][]int64 +) +rows, err := conn.Query(ctx, "SELECT * FROM example") +if err != nil { + return err +} +for rows.Next() { + if err := rows.Scan(&col1, &col2); err != nil { + return err + } + fmt.Printf("row: col1=%v, col2=%v\n", col1, col2) +} +rows.Close() +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/array.go) + +#### マップ + +マップã¯ã€å‰è¿°ã®[タイプ変æ›](#type-conversions)ã§å®šç¾©ã•ã‚ŒãŸåž‹ãƒ«ãƒ¼ãƒ«ã«æº–æ‹ ã—ãŸGolangマップã¨ã—ã¦æŒ¿å…¥ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ + +```go +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} +var i int64 +for i = 0; i < 10; i++ { + err := batch.Append( + map[string]uint64{strconv.Itoa(int(i)): uint64(i)}, + map[string][]string{strconv.Itoa(int(i)): {strconv.Itoa(int(i)), strconv.Itoa(int(i + 1)), strconv.Itoa(int(i + 2)), strconv.Itoa(int(i + 3))}}, + map[string]map[string]uint64{strconv.Itoa(int(i)): {strconv.Itoa(int(i)): uint64(i)}}, + ) + if err != nil { + return err + } +} +if err := batch.Send(); err != nil { + return err +} +var ( + col1 map[string]uint64 + col2 map[string][]string + col3 map[string]map[string]uint64 +) +rows, err := conn.Query(ctx, "SELECT * FROM example") +if err != nil { + return err +} +for rows.Next() { + if err := rows.Scan(&col1, &col2, &col3); err != nil { + return err + } + fmt.Printf("row: col1=%v, col2=%v, col3=%v\n", col1, col2, col3) +} +rows.Close() +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/map.go) + +#### タプル + +タプルã¯ä»»æ„ã®é•·ã•ã®ã‚«ãƒ©ãƒ ã®ã‚°ãƒ«ãƒ¼ãƒ—を表ã—ã¾ã™ã€‚カラムã¯æ˜Žç¤ºçš„ã«åå‰ã‚’付ã‘ã‚‹ã‹ã€åž‹ã ã‘を指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例: + +```sql +// éžå +Col1 Tuple(String, Int64) + +// å +Col2 Tuple(name String, id Int64, age uint8) +``` + +ã“れらã®ã‚¢ãƒ—ローãƒã®ä¸­ã§ã€åã®ã‚¿ãƒ—ルã¯ã‚ˆã‚ŠæŸ”軟性ãŒã‚ã‚Šã¾ã™ã€‚éžåã®ã‚¿ãƒ—ルã¯ã‚¹ãƒ©ã‚¤ã‚¹ã‚’使用ã—ã¦æŒ¿å…¥ãŠã‚ˆã³èª­ã¿å–ã‚Šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒã€åã®ã‚¿ãƒ—ルã¯ãƒžãƒƒãƒ—ã«ã‚‚互æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +```go +if err = conn.Exec(ctx, ` + CREATE TABLE example ( + Col1 Tuple(name String, age UInt8), + Col2 Tuple(String, UInt8), + Col3 Tuple(name String, id String) + ) + Engine Memory + `); err != nil { + return err +} + +defer func() { + conn.Exec(ctx, "DROP TABLE example") +}() +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} +// åã¨éžåã®ã©ã¡ã‚‰ã‚‚スライスã§è¿½åŠ ã§ãã‚‹ +if err = batch.Append([]interface{}{"Clicky McClickHouse", uint8(42)}, []interface{}{"Clicky McClickHouse Snr", uint8(78)}, []string{"Dale", "521211"}); err != nil { + return err +} +if err = batch.Append(map[string]interface{}{"name": "Clicky McClickHouse Jnr", "age": uint8(20)}, []interface{}{"Baby Clicky McClickHouse", uint8(1)}, map[string]string{"name": "Geoff", "id": "12123"}); err != nil { + return err +} +if err = batch.Send(); err != nil { + return err +} +var ( + col1 map[string]interface{} + col2 []interface{} + col3 map[string]string +) +// åå‰ä»˜ãã®ã‚¿ãƒ—ルã¯ãƒžãƒƒãƒ—ã¾ãŸã¯ã‚¹ãƒ©ã‚¤ã‚¹ã«å–å¾—å¯èƒ½ã€æœªå‘½åã¯ã‚¹ãƒ©ã‚¤ã‚¹ã®ã¿ +if err = conn.QueryRow(ctx, "SELECT * FROM example").Scan(&col1, &col2, &col3); err != nil { + return err +} +fmt.Printf("row: col1=%v, col2=%v, col3=%v\n", col1, col2, col3) +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/tuple.go) + +Note:型付ãスライスã¨ãƒžãƒƒãƒ—ã¯ã€åå‰ä»˜ãタプルã®ã‚µãƒ–カラムãŒå…¨ã¦åŒä¸€ã®åž‹ã§ã‚ã‚‹å ´åˆã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +#### ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ + +ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯ã€åå‰ä»˜ãã®ã‚¿ãƒ—ルã®é…列ã¨åŒç­‰ã§ã™ã€‚使用法ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ[flatten_nested](https://clickhouse.com/docs/ja/operations/settings/settings/#flatten-nested)ã‚’1ã«è¨­å®šã™ã‚‹ã‹0ã«è¨­å®šã™ã‚‹ã‹ã«ä¾å­˜ã—ã¾ã™ã€‚ + +flatten_nestedã‚’0ã«è¨­å®šã™ã‚‹ã“ã¨ã§ã€ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚«ãƒ©ãƒ ã¯å˜ä¸€ã®ã‚¿ãƒ—ルã®é…列ã¨ã—ã¦æ®‹ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æŒ¿å…¥ã¨å–å¾—ãŒç°¡å˜ã«ãªã‚Šã¾ã™ã€‚マップã®ã‚­ãƒ¼ã¯ã‚«ãƒ©ãƒ ã®åå‰ã¨ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例: + +Note: マップã¯ã‚¿ãƒ—ルを表ç¾ã—ã¦ã„ã‚‹ãŸã‚`map[string]interface{}`ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。値ã¯ç¾åœ¨ã®ã¨ã“ã‚å¼·ã型付ã‘ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +```go +conn, err := GetNativeConnection(clickhouse.Settings{ + "flatten_nested": 0, +}, nil, nil) +if err != nil { + return err +} +ctx := context.Background() +defer func() { + conn.Exec(ctx, "DROP TABLE example") +}() +conn.Exec(context.Background(), "DROP TABLE IF EXISTS example") +err = conn.Exec(ctx, ` + CREATE TABLE example ( + Col1 Nested(Col1_1 String, Col1_2 UInt8), + Col2 Nested( + Col2_1 UInt8, + Col2_2 Nested( + Col2_2_1 UInt8, + Col2_2_2 UInt8 + ) + ) + ) Engine Memory +`) +if err != nil { + return err +} + +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} +var i int64 +for i = 0; i < 10; i++ { + err := batch.Append( + []map[string]interface{}{ + { + "Col1_1": strconv.Itoa(int(i)), + "Col1_2": uint8(i), + }, + { + "Col1_1": strconv.Itoa(int(i + 1)), + "Col1_2": uint8(i + 1), + }, + { + "Col1_1": strconv.Itoa(int(i + 2)), + "Col1_2": uint8(i + 2), + }, + }, + []map[string]interface{}{ + { + "Col2_2": []map[string]interface{}{ + { + "Col2_2_1": uint8(i), + "Col2_2_2": uint8(i + 1), + }, + }, + "Col2_1": uint8(i), + }, + { + "Col2_2": []map[string]interface{}{ + { + "Col2_2_1": uint8(i + 2), + "Col2_2_2": uint8(i + 3), + }, + }, + "Col2_1": uint8(i + 1), + }, + }, + ) + if err != nil { + return err + } +} +if err := batch.Send(); err != nil { + return err +} +var ( + col1 []map[string]interface{} + col2 []map[string]interface{} +) +rows, err := conn.Query(ctx, "SELECT * FROM example") +if err != nil { + return err +} +for rows.Next() { + if err := rows.Scan(&col1, &col2); err != nil { + return err + } + fmt.Printf("row: col1=%v, col2=%v\n", col1, col2) +} +rows.Close() +``` + +[Full Example - `flatten_tested=0`](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/nested.go#L28-L118) + +`flatten_nested`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤1を使用ã™ã‚‹å ´åˆã€ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚«ãƒ©ãƒ ã¯åˆ¥ã€…ã®é…列ã«ãƒ•ãƒ©ãƒƒãƒˆåŒ–ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã¯æŒ¿å…¥ã¨å–å¾—ã«ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚¹ãƒ©ã‚¤ã‚¹ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ä»»æ„ã®ãƒ¬ãƒ™ãƒ«ã®ãƒã‚¹ãƒˆãŒå‹•ä½œã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€å…¬å¼ã«ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +```go +conn, err := GetNativeConnection(nil, nil, nil) +if err != nil { + return err +} +ctx := context.Background() +defer func() { + conn.Exec(ctx, "DROP TABLE example") +}() +conn.Exec(ctx, "DROP TABLE IF EXISTS example") +err = conn.Exec(ctx, ` + CREATE TABLE example ( + Col1 Nested(Col1_1 String, Col1_2 UInt8), + Col2 Nested( + Col2_1 UInt8, + Col2_2 Nested( + Col2_2_1 UInt8, + Col2_2_2 UInt8 + ) + ) + ) Engine Memory +`) +if err != nil { + return err +} + +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} +var i uint8 +for i = 0; i < 10; i++ { + col1_1_data := []string{strconv.Itoa(int(i)), strconv.Itoa(int(i + 1)), strconv.Itoa(int(i + 2))} + col1_2_data := []uint8{i, i + 1, i + 2} + col2_1_data := []uint8{i, i + 1, i + 2} + col2_2_data := [][][]interface{}{ + { + {i, i + 1}, + }, + { + {i + 2, i + 3}, + }, + { + {i + 4, i + 5}, + }, + } + err := batch.Append( + col1_1_data, + col1_2_data, + col2_1_data, + col2_2_data, + ) + if err != nil { + return err + } +} +if err := batch.Send(); err != nil { + return err +} +``` + +[Full Example - `flatten_nested=1`](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/nested.go#L123-L180) + +Note: ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚«ãƒ©ãƒ ã¯åŒã˜æ¬¡å…ƒã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€ä¸Šè¨˜ã®ä¾‹ã§ã¯`Col_2_2`ã¨`Col_2_1`ã¯åŒä¸€ã®è¦ç´ æ•°ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +シンプルãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã¨ãƒã‚¹ãƒˆã«å¯¾ã™ã‚‹å…¬å¼ã‚µãƒãƒ¼ãƒˆã®ãŸã‚ã€`flatten_nested=0`を推奨ã—ã¾ã™ã€‚ + +#### 地ç†ã‚¿ã‚¤ãƒ— + +クライアントã¯ã€ã‚¸ã‚ªã‚¿ã‚¤ãƒ—ã®ãƒã‚¤ãƒ³ãƒˆã€ãƒªãƒ³ã‚°ã€ãƒãƒªã‚´ãƒ³ã€ãŠã‚ˆã³ãƒžãƒ«ãƒãƒãƒªã‚´ãƒ³ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ã“れらã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯Golangã§[github.com/paulmach/orb](https://github.com/paulmach/orb)パッケージを使用ã—ã¦è¡¨ç¾ã—ã¾ã™ã€‚ + +```go +if err = conn.Exec(ctx, ` + CREATE TABLE example ( + point Point, + ring Ring, + polygon Polygon, + mPolygon MultiPolygon + ) + Engine Memory + `); err != nil { + return err +} + +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} + +if err = batch.Append( + orb.Point{11, 22}, + orb.Ring{ + orb.Point{1, 2}, + orb.Point{1, 2}, + }, + orb.Polygon{ + orb.Ring{ + orb.Point{1, 2}, + orb.Point{12, 2}, + }, + orb.Ring{ + orb.Point{11, 2}, + orb.Point{1, 12}, + }, + }, + orb.MultiPolygon{ + orb.Polygon{ + orb.Ring{ + orb.Point{1, 2}, + orb.Point{12, 2}, + }, + orb.Ring{ + orb.Point{11, 2}, + orb.Point{1, 12}, + }, + }, + orb.Polygon{ + orb.Ring{ + orb.Point{1, 2}, + orb.Point{12, 2}, + }, + orb.Ring{ + orb.Point{11, 2}, + orb.Point{1, 12}, + }, + }, + }, +); err != nil { + return err +} + +if err = batch.Send(); err != nil { + return err +} + +var ( + point orb.Point + ring orb.Ring + polygon orb.Polygon + mPolygon orb.MultiPolygon +) + +if err = conn.QueryRow(ctx, "SELECT * FROM example").Scan(&point, &ring, &polygon, &mPolygon); err != nil { + return err +} +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/geo.go) + +#### UUID + +UUIDタイプã¯[github.com/google/uuid](https://github.com/google/uuid)パッケージã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ユーザーã¯ã¾ãŸã€æ–‡å­—列や`sql.Scanner`ã‚„`Stringify`を実装ã™ã‚‹ä»»æ„ã®ã‚¿ã‚¤ãƒ—ã¨ã—ã¦UUIDã‚’é€ä¿¡ãŠã‚ˆã³ãƒžãƒ¼ã‚·ãƒ£ãƒ«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```go +if err = conn.Exec(ctx, ` + CREATE TABLE example ( + col1 UUID, + col2 UUID + ) + Engine Memory + `); err != nil { + return err +} + +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} +col1Data, _ := uuid.NewUUID() +if err = batch.Append( + col1Data, + "603966d6-ed93-11ec-8ea0-0242ac120002", +); err != nil { + return err +} + +if err = batch.Send(); err != nil { + return err +} + +var ( + col1 uuid.UUID + col2 uuid.UUID +) + +if err = conn.QueryRow(ctx, "SELECT * FROM example").Scan(&col1, &col2); err != nil { + return err +} +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/uuid.go) + +#### å°æ•°ç‚¹ã‚¿ã‚¤ãƒ— + +å°æ•°ç‚¹ã‚¿ã‚¤ãƒ—ã¯[github.com/shopspring/decimal](https://github.com/shopspring/decimal)パッケージã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```go +if err = conn.Exec(ctx, ` + CREATE TABLE example ( + Col1 Decimal32(3), + Col2 Decimal(18,6), + Col3 Decimal(15,7), + Col4 Decimal128(8), + Col5 Decimal256(9) + ) Engine Memory + `); err != nil { + return err +} + +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} +if err = batch.Append( + decimal.New(25, 4), + decimal.New(30, 5), + decimal.New(35, 6), + decimal.New(135, 7), + decimal.New(256, 8), +); err != nil { + return err +} + +if err = batch.Send(); err != nil { + return err +} + +var ( + col1 decimal.Decimal + col2 decimal.Decimal + col3 decimal.Decimal + col4 decimal.Decimal + col5 decimal.Decimal +) + +if err = conn.QueryRow(ctx, "SELECT * FROM example").Scan(&col1, &col2, &col3, &col4, &col5); err != nil { + return err +} +fmt.Printf("col1=%v, col2=%v, col3=%v, col4=%v, col5=%v\n", col1, col2, col3, col4, col5) +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/decimal.go) + +#### Nullableタイプ + +Goã®Nil値ã¯ClickHouseã®NULL値を表ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒNullableã¨ã—ã¦å®£è¨€ã•ã‚Œã¦ã„ã‚‹å ´åˆã«ä½¿ç”¨ã§ãã¾ã™ã€‚挿入時ã«ã¯ã€é€šå¸¸ã®ã‚«ãƒ©ãƒ ã¾ãŸã¯Nullableãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã©ã¡ã‚‰ã«ã‚‚Nilを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚å‰è€…ã®å ´åˆã€ãã®ã‚¿ã‚¤ãƒ—ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒä¿å­˜ã•ã‚Œã€Nullableãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ClickHouseã«NULL値ãŒä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +Scan時ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯Nil値を表ç¾ã™ã‚‹ãŸã‚ã«Nullableフィールドã®ãŸã‚ã®Nilをサãƒãƒ¼ãƒˆã™ã‚‹åž‹ã¸ã®ãƒã‚¤ãƒ³ã‚¿ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€ä»¥ä¸‹ã®ä¾‹ã§ã¯col1ãŒNullable(String)ã§ã‚ã‚‹ãŸã‚ã€ã“ã‚Œã¯**stringã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ã“ã‚Œã¯nilを表ç¾ã™ã‚‹ãŸã‚ã®æ–¹æ³•ã§ã™ã€‚ + +```go +if err = conn.Exec(ctx, ` + CREATE TABLE example ( + col1 Nullable(String), + col2 String, + col3 Nullable(Int8), + col4 Nullable(Int64) + ) + Engine Memory + `); err != nil { + return err +} + +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} +if err = batch.Append( + nil, + nil, + nil, + sql.NullInt64{Int64: 0, Valid: false}, +); err != nil { + return err +} + +if err = batch.Send(); err != nil { + return err +} + +var ( + col1 *string + col2 string + col3 *int8 + col4 sql.NullInt64 +) + +if err = conn.QueryRow(ctx, "SELECT * FROM example").Scan(&col1, &col2, &col3, &col4); err != nil { + return err +} +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/nullable.go) + +クライアントã¯ã¾ãŸã€`sql.Null*`タイプã€ä¾‹ãˆã°`sql.NullInt64`もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“れらã¯ãã®å¯¾ã«ãªã‚‹ClickHouseタイプã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +#### 大ããªæ•´æ•° - Int128, Int256, UInt128, UInt256 + +64ビットを超ãˆã‚‹æ•°å€¤ã‚¿ã‚¤ãƒ—ã¯ã€ãƒã‚¤ãƒ†ã‚£ãƒ–goã®[big](https://pkg.go.dev/math/big)パッケージを使用ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +```go +if err = conn.Exec(ctx, ` + CREATE TABLE example ( + Col1 Int128, + Col2 UInt128, + Col3 Array(Int128), + Col4 Int256, + Col5 Array(Int256), + Col6 UInt256, + Col7 Array(UInt256) + ) Engine Memory`); err != nil { + return err +} + +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} + +col1Data, _ := new(big.Int).SetString("170141183460469231731687303715884105727", 10) +col2Data := big.NewInt(128) +col3Data := []*big.Int{ + big.NewInt(-128), + big.NewInt(128128), + big.NewInt(128128128), +} +col4Data := big.NewInt(256) +col5Data := []*big.Int{ + big.NewInt(256), + big.NewInt(256256), + big.NewInt(256256256256), +} +col6Data := big.NewInt(256) +col7Data := []*big.Int{ + big.NewInt(256), + big.NewInt(256256), + big.NewInt(256256256256), +} + +if err = batch.Append(col1Data, col2Data, col3Data, col4Data, col5Data, col6Data, col7Data); err != nil { + return err +} + +if err = batch.Send(); err != nil { + return err +} + +var ( + col1 big.Int + col2 big.Int + col3 []*big.Int + col4 big.Int + col5 []*big.Int + col6 big.Int + col7 []*big.Int +) + +if err = conn.QueryRow(ctx, "SELECT * FROM example").Scan(&col1, &col2, &col3, &col4, &col5, &col6, &col7); err != nil { + return err +} +fmt.Printf("col1=%v, col2=%v, col3=%v, col4=%v, col5=%v, col6=%v, col7=%v\n", col1, col2, col3, col4, col5, col6, col7) +``` + +[Full Example](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/big_int.go) + +### 圧縮 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹åœ§ç¸®æ–¹æ³•ã¯ã€ä½¿ç”¨ã•ã‚Œã¦ã„るプロトコルã«ä¾å­˜ã—ã¾ã™ã€‚ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルã§ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯`LZ4`ã¨`ZSTD`圧縮をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ãã®åœ§ç¸®ã¯ãƒ–ロックレベル上ã§ã®ã¿è¡Œã‚ã‚Œã¾ã™ã€‚圧縮ã¯æŽ¥ç¶šæ™‚ã®`Compression`設定をå«ã‚€ã“ã¨ã«ã‚ˆã£ã¦æœ‰åŠ¹ã«ã§ãã¾ã™ã€‚ + +```go +conn, err := clickhouse.Open(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.Port)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + Compression: &clickhouse.Compression{ + Method: clickhouse.CompressionZSTD, + }, + MaxOpenConns: 1, +}) +ctx := context.Background() +``` +```go +defer func() { + conn.Exec(ctx, "DROP TABLE example") +}() +conn.Exec(context.Background(), "DROP TABLE IF EXISTS example") +if err = conn.Exec(ctx, ` + CREATE TABLE example ( + Col1 Array(String) + ) Engine Memory + `); err != nil { + return err +} +batch, err := conn.PrepareBatch(ctx, "INSERT INTO example") +if err != nil { + return err +} +for i := 0; i < 1000; i++ { + if err := batch.Append([]string{strconv.Itoa(i), strconv.Itoa(i + 1), strconv.Itoa(i + 2), strconv.Itoa(i + 3)}); err != nil { + return err + } +} +if err := batch.Send(); err != nil { + return err +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/compression.go) + +標準インターフェースをHTTP経由ã§ä½¿ç”¨ã™ã‚‹å ´åˆã€è¿½åŠ ã®åœ§ç¸®æŠ€è¡“ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚詳細ã¯[database/sql API - 圧縮](#compression)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### パラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° + +クライアントã¯ã€Execã€ã‚¯ã‚¨ãƒªã€ãã—ã¦QueryRowメソッドã®ãƒ‘ラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚以下ã®ä¾‹ã§ç¤ºã™ã‚ˆã†ã«ã€åå‰ä»˜ãã€ç•ªå·ä»˜ãã€ä½ç½®æŒ‡å®šãƒ‘ラメータを使用ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚以下ã«ãれらã®ä¾‹ã‚’示ã—ã¾ã™ã€‚ + +```go +var count uint64 +// ä½ç½®ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° +if err = conn.QueryRow(ctx, "SELECT count() FROM example WHERE Col1 >= ? AND Col3 < ?", 500, now.Add(time.Duration(750)*time.Second)).Scan(&count); err != nil { + return err +} +// 250 +fmt.Printf("ä½ç½®ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚«ã‚¦ãƒ³ãƒˆ: %d\n", count) +// 数値ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° +if err = conn.QueryRow(ctx, "SELECT count() FROM example WHERE Col1 <= $2 AND Col3 > $1", now.Add(time.Duration(150)*time.Second), 250).Scan(&count); err != nil { + return err +} +// 100 +fmt.Printf("数値ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚«ã‚¦ãƒ³ãƒˆ: %d\n", count) +// åå‰ä»˜ããƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° +if err = conn.QueryRow(ctx, "SELECT count() FROM example WHERE Col1 <= @col1 AND Col3 > @col3", clickhouse.Named("col1", 100), clickhouse.Named("col3", now.Add(time.Duration(50)*time.Second))).Scan(&count); err != nil { + return err +} +// 50 +fmt.Printf("åå‰ä»˜ããƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚«ã‚¦ãƒ³ãƒˆ: %d\n", count) +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/bind.go) + +#### 特別ãªã‚±ãƒ¼ã‚¹ + +デフォルトã§ã¯ã€ã‚¹ãƒ©ã‚¤ã‚¹ã¯ã‚¯ã‚¨ãƒªã¸ã®ãƒ‘ラメータã¨ã—ã¦æ¸¡ã•ã‚ŒãŸå ´åˆã€ã‚³ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚ŒãŸå€¤ã®ãƒªã‚¹ãƒˆã«å±•é–‹ã•ã‚Œã¾ã™ã€‚ユーザーãŒãƒ©ãƒƒãƒ—ã®`[ ]`ã§å€¤ã®ã‚»ãƒƒãƒˆã‚’注入ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ArraySetを使用ã™ã‚‹ã¹ãã§ã™ã€‚ + +グループ/タプルãŒå¿…è¦ã§ã‚ã‚‹å ´åˆã€IN演算å­ã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹ã¨æœ‰ç”¨ãª`( )`ã§ãƒ©ãƒƒãƒ—ã•ã‚ŒãŸã‚‚ã®ãŒã€GroupSetを使用ã™ã‚‹ã“ã¨ã§å¯èƒ½ã§ã™ã€‚特ã«è¤‡æ•°ã®ã‚°ãƒ«ãƒ¼ãƒ—ãŒå¿…è¦ãªå ´åˆã«ä¾¿åˆ©ã§ã™ã€‚以下ã®ä¾‹ã«ç¤ºã—ã¾ã™ã€‚ + +最後ã«ã€DateTime64フィールドã¯ã€ãƒ‘ラメータãŒé©åˆ‡ã«ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ã•ã‚Œã‚‹ã‚ˆã†ç²¾åº¦ãŒå¿…è¦ã§ã™ã€‚フィールドã®ç²¾åº¦ãƒ¬ãƒ™ãƒ«ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ã¯çŸ¥ã‚‰ã‚Œãªã„ãŸã‚ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れを容易ã«ã™ã‚‹ãŸã‚ã«ã€`DateNamed`パラメータをæä¾›ã—ã¾ã™ã€‚ + +```go +var count uint64 +// é…列ã¯å±•é–‹ã•ã‚Œã¾ã™ +if err = conn.QueryRow(ctx, "SELECT count() FROM example WHERE Col1 IN (?)", []int{100, 200, 300, 400, 500}).Scan(&count); err != nil { + return err +} +fmt.Printf("é…列展開カウント: %d\n", count) +// é…列ã¯[]ã§ä¿æŒã•ã‚Œã¾ã™ +if err = conn.QueryRow(ctx, "SELECT count() FROM example WHERE Col4 = ?", clickhouse.ArraySet{300, 301}).Scan(&count); err != nil { + return err +} +fmt.Printf("é…列カウント: %d\n", count) +// グループセットを使ã†ã“ã¨ã§( )リストを形æˆã§ãã¾ã™ +if err = conn.QueryRow(ctx, "SELECT count() FROM example WHERE Col1 IN ?", clickhouse.GroupSet{[]interface{}{100, 200, 300, 400, 500}}).Scan(&count); err != nil { + return err +} +fmt.Printf("グループカウント: %d\n", count) +// ãƒã‚¹ãƒˆãŒå¿…è¦ãªå ´åˆã«ã‚ˆã‚Šæœ‰ç”¨ã§ã™ +if err = conn.QueryRow(ctx, "SELECT count() FROM example WHERE (Col1, Col5) IN (?)", []clickhouse.GroupSet{{[]interface{}{100, 101}}, {[]interface{}{200, 201}}}).Scan(&count); err != nil { + return err +} +fmt.Printf("グループカウント: %d\n", count) +// タイムã«ç²¾åº¦ãŒå¿…è¦ãªå ´åˆã¯DateNamedを使用ã—ã¦ãã ã•ã„# +if err = conn.QueryRow(ctx, "SELECT count() FROM example WHERE Col3 >= @col3", clickhouse.DateNamed("col3", now.Add(time.Duration(500)*time.Millisecond), clickhouse.NanoSeconds)).Scan(&count); err != nil { + return err +} +fmt.Printf("åå‰ä»˜ã日付ã®ã‚«ã‚¦ãƒ³ãƒˆ: %d\n", count) +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/bind_special.go) + +### コンテキストã®ä½¿ç”¨ + +Goã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã¯ã€ãƒ‡ãƒƒãƒ‰ãƒ©ã‚¤ãƒ³ã‚„キャンセルシグナルã€ãã®ä»–ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚¹ã‚³ãƒ¼ãƒ—化ã•ã‚ŒãŸå€¤ã‚’API境界間ã§æ¸¡ã™æ‰‹æ®µã‚’æä¾›ã—ã¾ã™ã€‚コãƒã‚¯ã‚·ãƒ§ãƒ³ã®å…¨ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€æœ€åˆã®å¤‰æ•°ã¨ã—ã¦ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’å—ã‘å–ã‚Šã¾ã™ã€‚以å‰ã®ä¾‹ã§ã¯context.Background()を使用ã—ã¾ã—ãŸãŒã€ã“ã®æ©Ÿèƒ½ã‚’使ã£ã¦è¨­å®šã‚„デッドラインを渡ã—ãŸã‚Šã€ã‚¯ã‚¨ãƒªã‚’キャンセルã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`withDeadline`を作æˆã—ãŸã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’渡ã™ã¨ã€ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦å®Ÿè¡Œæ™‚é–“ã®åˆ¶é™ã‚’設ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯çµ¶å¯¾çš„ãªæ™‚é–“ã§ã‚ã‚Šã€æœ‰åŠ¹æœŸé™ã¯ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’解放ã—ã€ClickHouseã«ã‚­ãƒ£ãƒ³ã‚»ãƒ«ä¿¡å·ã‚’é€ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã®ã¿è§£é™¤ã•ã‚Œã¾ã™ã€‚代替ã¨ã—ã¦`WithCancel`を使用ã—ã¦ã€ã‚¯ã‚¨ãƒªã‚’明示的ã«ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`clickhouse.WithQueryID`ã¨`clickhouse.WithQuotaKey`ã®ãƒ˜ãƒ«ãƒ‘ーã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªIDã¨å‰²ã‚Šå½“ã¦ã‚­ãƒ¼ã‚’指定ã§ãã¾ã™ã€‚クエリIDã¯ãƒ­ã‚°ã§ã®ã‚¯ã‚¨ãƒªã®è¿½è·¡ã‚„キャンセル目的ã§æœ‰ç”¨ã§ã™ã€‚割り当ã¦ã‚­ãƒ¼ã¯ã€ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªã‚­ãƒ¼å€¤ã«åŸºã¥ã„ã¦ClickHouseã®ä½¿ç”¨ã‚’制é™ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ - 詳細ã¯[ã‚¯ã‚ªãƒ¼ã‚¿ç®¡ç† ](https://clickhouse.com/docs/ja/operations/access-rights#quotas-management)ã‚’å‚ç…§ãã ã•ã„。 + +ユーザーã¯ã¾ãŸã€ç‰¹å®šã®ã‚¯ã‚¨ãƒªã«ã®ã¿è¨­å®šã‚’é©ç”¨ã™ã‚‹ãŸã‚ã«ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使用ã—ã¦ã€ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“ã«ã¯é©ç”¨ã—ã¾ã›ã‚“。[コãƒã‚¯ã‚·ãƒ§ãƒ³è¨­å®š](#connection-settings)ã§ç¤ºã™ã‚ˆã†ã«ã€‚ + +最後ã«ã€`clickhouse.WithBlockSize`を使用ã—ã¦ã€ãƒ–ロックãƒãƒƒãƒ•ã‚¡ã®ã‚µã‚¤ã‚ºã‚’制御ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æŽ¥ç¶šãƒ¬ãƒ™ãƒ«ã®è¨­å®š`BlockBufferSize`を上書ãã—ã€ãƒ‡ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ãƒ¡ãƒ¢ãƒªã«ä¿æŒã•ã‚Œã‚‹ãƒ–ロックã®æœ€å¤§æ•°ã‚’制御ã—ã¾ã™ã€‚値ãŒå¤§ãã„ã»ã©ä¸¦åˆ—化ãŒå‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ãƒ¡ãƒ¢ãƒªã®æ¶ˆè²»ãŒå¢—ãˆã‚‹ç‚¹ã«ã¯æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ + +以下ã«ã“れらã®ä¾‹ã‚’示ã—ã¾ã™ã€‚ + +```go +dialCount := 0 +conn, err := clickhouse.Open(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.Port)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + DialContext: func(ctx context.Context, addr string) (net.Conn, error) { + dialCount++ + var d net.Dialer + return d.DialContext(ctx, "tcp", addr) + }, +}) +if err != nil { + return err +} +if err := clickhouse_tests.CheckMinServerServerVersion(conn, 22, 6, 1); err != nil { + return nil +} +// 特定ã®APIコールã«è¨­å®šã‚’渡ã™ãŸã‚ã«ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使用ã§ãã¾ã™ +ctx := clickhouse.Context(context.Background(), clickhouse.WithSettings(clickhouse.Settings{ + "allow_experimental_object_type": "1", +})) + +conn.Exec(ctx, "DROP TABLE IF EXISTS example") + +// JSONカラムを作æˆã™ã‚‹ãŸã‚ã«ã¯allow_experimental_object_type=1ãŒå¿…è¦ã§ã™ +if err = conn.Exec(ctx, ` + CREATE TABLE example ( + Col1 JSON + ) + Engine Memory + `); err != nil { + return err +} + +// コンテキストを使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’キャンセルã§ãã¾ã™ +ctx, cancel := context.WithCancel(context.Background()) +go func() { + cancel() +}() +if err = conn.QueryRow(ctx, "SELECT sleep(3)").Scan(); err == nil { + return fmt.Errorf("キャンセルを期待ã—ã¦ã„ã¾ã—ãŸ") +} + +// クエリã«ãƒ‡ãƒƒãƒ‰ãƒ©ã‚¤ãƒ³ã‚’設定ã—ãŸå ´åˆ - 絶対時間ã«é”ã—ãŸå¾Œã«ã‚¯ã‚¨ãƒªã‚’キャンセルã—ã¾ã™ã€‚ +// ClickHouseã§ã¯ã‚¯ã‚¨ãƒªãŒå®Œäº†ã¾ã§ç¶šè¡Œã•ã‚Œã¾ã™ +ctx, cancel = context.WithDeadline(context.Background(), time.Now().Add(-time.Second)) +defer cancel() +if err := conn.Ping(ctx); err == nil { + return fmt.Errorf("デッドライン超éŽã‚’期待ã—ã¦ã„ã¾ã—ãŸ") +} + +// ログã§ã®ã‚¯ã‚¨ãƒªãƒˆãƒ¬ãƒ¼ã‚¹ã‚’助ã‘ã‚‹ãŸã‚ã«ã‚¯ã‚¨ãƒªIDを設定ã—ã¾ã™ã€‚例ãˆã°ã€system.query_logã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +var one uint8 +queryId, _ := uuid.NewUUID() +ctx = clickhouse.Context(context.Background(), clickhouse.WithQueryID(queryId.String())) +if err = conn.QueryRow(ctx, "SELECT 1").Scan(&one); err != nil { + return err +} + +conn.Exec(context.Background(), "DROP QUOTA IF EXISTS foobar") +defer func() { + conn.Exec(context.Background(), "DROP QUOTA IF EXISTS foobar") +}() +ctx = clickhouse.Context(context.Background(), clickhouse.WithQuotaKey("abcde")) +// クォータキーを設定 - ã¾ãšã‚¯ã‚©ãƒ¼ã‚¿ã‚’作æˆã™ã‚‹ +if err = conn.Exec(ctx, "CREATE QUOTA IF NOT EXISTS foobar KEYED BY client_key FOR INTERVAL 1 minute MAX queries = 5 TO default"); err != nil { + return err +} + +type Number struct { + Number uint64 `ch:"number"` +} +for i := 1; i <= 6; i++ { + var result []Number + if err = conn.Select(ctx, &result, "SELECT number FROM numbers(10)"); err != nil { + return err + } +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/context.go) + +### 進æ—/プロファイル/ログ情報 + +クエリã«é–¢ã™ã‚‹é€²æ—ã€ãƒ—ロファイルã€ãŠã‚ˆã³ãƒ­ã‚°æƒ…報をè¦æ±‚ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚進æ—情報ã¯ã€ClickHouseã§èª­ã¿å–られãŸãŠã‚ˆã³å‡¦ç†ã•ã‚ŒãŸè¡Œã¨ãƒã‚¤ãƒˆã®çµ±è¨ˆã‚’報告ã—ã¾ã™ã€‚ãã‚Œã«å¯¾ã—ã¦ã€ãƒ—ロファイル情報ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«è¿”ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã‚µãƒžãƒªãƒ¼ã‚’æä¾›ã—ã€ãƒã‚¤ãƒˆã€è¡Œã€ãŠã‚ˆã³ãƒ–ロックã®åˆè¨ˆã‚’å«ã¿ã¾ã™ã€‚最後ã«ã€ãƒ­ã‚°æƒ…å ±ã¯ã‚¹ãƒ¬ãƒƒãƒ‰ã«é–¢ã™ã‚‹çµ±è¨ˆã‚’æä¾›ã—ã¾ã™ã€‚例ãˆã°ã€ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚„データ速度ãªã©ã§ã™ã€‚ + +ã“ã®æƒ…報をå–å¾—ã™ã‚‹ã«ã¯ã€[コンテキスト](#using-context)を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```go +totalRows := uint64(0) +// コンテキストを使用ã—ã¦é€²æ—ãŠã‚ˆã³ãƒ—ロファイル情報用ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’渡ã—ã¾ã™ +ctx := clickhouse.Context(context.Background(), clickhouse.WithProgress(func(p *clickhouse.Progress) { + fmt.Println("進æ—: ", p) + totalRows += p.Rows +}), clickhouse.WithProfileInfo(func(p *clickhouse.ProfileInfo) { + fmt.Println("プロファイル情報: ", p) +}), clickhouse.WithLogs(func(log *clickhouse.Log) { + fmt.Println("ログ情報: ", log) +})) + +rows, err := conn.Query(ctx, "SELECT number from numbers(1000000) LIMIT 1000000") +if err != nil { + return err +} +for rows.Next() { +} + +fmt.Printf("åˆè¨ˆè¡Œæ•°: %d\n", totalRows) +rows.Close() +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/progress.go) + +### 動的スキャン + +ユーザーã¯ã€è¿”ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®ã‚¹ã‚­ãƒ¼ãƒžã‚„タイプãŒä¸æ˜Žãªãƒ†ãƒ¼ãƒ–ルを読ã¿å–ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ã€ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ãªãƒ‡ãƒ¼ã‚¿åˆ†æžãŒè¡Œã‚ã‚ŒãŸã‚Šã€æ±Žç”¨çš„ãªãƒ„ールãŒæ›¸ã‹ã‚Œã‚‹å ´åˆã«ä¸€èˆ¬çš„ã§ã™ã€‚ã“れをé”æˆã™ã‚‹ãŸã‚ã«ã€ã‚¯ã‚¨ãƒªå¿œç­”ã«ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—情報ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ã“ã‚Œã¯Goã®ãƒªãƒ•ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨çµ„ã¿åˆã‚ã›ã¦ã€æ­£ã—ã型付ã‘ã•ã‚ŒãŸå¤‰æ•°ã®ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’作æˆã—ã€Scanã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```go +const query = ` +SELECT + 1 AS Col1 + , 'Text' AS Col2 +` +rows, err := conn.Query(context.Background(), query) +if err != nil { + return err +} +var ( + columnTypes = rows.ColumnTypes() + vars = make([]interface{}, len(columnTypes)) +) +for i := range columnTypes { + vars[i] = reflect.New(columnTypes[i].ScanType()).Interface() +} +for rows.Next() { + if err := rows.Scan(vars...); err != nil { + return err + } + for _, v := range vars { + switch v := v.(type) { + case *string: + fmt.Println(*v) + case *uint8: + fmt.Println(*v) + } + } +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/dynamic_scan_types.go) + +### 外部テーブル + +[外部テーブル](https://clickhouse.com/docs/ja/engines/table-engines/special/external-data/)ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã‚¯ãƒªãƒƒã‚¯ãƒã‚¦ã‚¹ã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã§ãるよã†ã«ã—ã€SELECTクエリã¨å…±ã«ãã®ãƒ‡ãƒ¼ã‚¿ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ä¸€æ™‚çš„ãªãƒ†ãƒ¼ãƒ–ルã«é…ç½®ã•ã‚Œã€ã‚¯ã‚¨ãƒªè‡ªä½“ã§è©•ä¾¡ã®ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +クエリã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã™ã‚‹å¤–部データを作æˆã™ã‚‹ã«ã¯ã€ext.NewTableを介ã—ã¦å¤–部テーブルを構築ã—ã€ã“れをコンテキストã«æ¸¡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```go +table1, err := ext.NewTable("external_table_1", + ext.Column("col1", "UInt8"), + ext.Column("col2", "String"), + ext.Column("col3", "DateTime"), +) +if err != nil { + return err +} + +for i := 0; i < 10; i++ { + if err = table1.Append(uint8(i), fmt.Sprintf("value_%d", i), time.Now()); err != nil { + return err + } +} + +table2, err := ext.NewTable("external_table_2", + ext.Column("col1", "UInt8"), + ext.Column("col2", "String"), + ext.Column("col3", "DateTime"), +) + +for i := 0; i < 10; i++ { + table2.Append(uint8(i), fmt.Sprintf("value_%d", i), time.Now()) +} +ctx := clickhouse.Context(context.Background(), + clickhouse.WithExternalTable(table1, table2), +) +rows, err := conn.Query(ctx, "SELECT * FROM external_table_1") +if err != nil { + return err +} +for rows.Next() { + var ( + col1 uint8 + col2 string + col3 time.Time + ) + rows.Scan(&col1, &col2, &col3) + fmt.Printf("col1=%d, col2=%s, col3=%v\n", col1, col2, col3) +} +rows.Close() + +var count uint64 +if err := conn.QueryRow(ctx, "SELECT COUNT(*) FROM external_table_1").Scan(&count); err != nil { + return err +} +fmt.Printf("external_table_1: %d\n", count) +if err := conn.QueryRow(ctx, "SELECT COUNT(*) FROM external_table_2").Scan(&count); err != nil { + return err +} +fmt.Printf("external_table_2: %d\n", count) +if err := conn.QueryRow(ctx, "SELECT COUNT(*) FROM (SELECT * FROM external_table_1 UNION ALL SELECT * FROM external_table_2)").Scan(&count); err != nil { + return err +} +fmt.Printf("external_table_1 UNION external_table_2: %d\n", count) +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/external_data.go) + +### Open Telemetry + +ClickHouseã¯ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルã®ä¸€éƒ¨ã¨ã—ã¦[トレースコンテキスト](https://clickhouse.com/docs/ja/operations/opentelemetry/)を渡ã™ã“ã¨ã‚’許å¯ã—ã¦ã„ã¾ã™ã€‚クライアントã¯`clickhouse.withSpan`関数を介ã—ã¦Spanを作æˆã—ã€ã“れをコンテキスト経由ã§æ¸¡ã™ã“ã¨ã«ã‚ˆã£ã¦ã“れをé”æˆã—ã¾ã™ã€‚ + +```go +var count uint64 +rows := conn.QueryRow(clickhouse.Context(context.Background(), clickhouse.WithSpan( + trace.NewSpanContext(trace.SpanContextConfig{ + SpanID: trace.SpanID{1, 2, 3, 4, 5}, + TraceID: trace.TraceID{5, 4, 3, 2, 1}, + }), +)), "SELECT COUNT() FROM (SELECT number FROM system.numbers LIMIT 5)") +if err := rows.Scan(&count); err != nil { + return err +} +fmt.Printf("count: %d\n", count) +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/clickhouse_api/open_telemetry.go) + +トレースã®åˆ©ç”¨ã«ã¤ã„ã¦ã®è©³ç´°ã¯[OpenTelemetryサãƒãƒ¼ãƒˆ](https://clickhouse.com/docs/ja/operations/opentelemetry/)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +## データベース/SQL API + +`database/sql`ã¾ãŸã¯ã€Œæ¨™æº–ã€APIã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«æ¨™æº–çš„ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’éµå®ˆã•ã›ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションãŒåŸºç¤Žã¨ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã¤ã„ã¦èªè­˜ã—ã¦ã„ãªã„シナリオã§ä½¿ç”¨ã§ãã¾ã™ã€‚ã“ã‚Œã¯ä¸€å®šã®ã‚³ã‚¹ãƒˆã‚’ä¼´ã„ã¾ã™ - 抽象化ã¨é–“接ã®è¿½åŠ ãƒ¬ã‚¤ãƒ¤ãƒ¼ãŠã‚ˆã³ãã‚ŒãŒå¿…ãšã—ã‚‚ClickHouseã¨ä¸€è‡´ã—ãªã„プリミティブã§ã™ã€‚ã—ã‹ã—ã€ã“ã®ã‚³ã‚¹ãƒˆã¯ã€ç‰¹ã«è¤‡æ•°ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã™ã‚‹å¿…è¦ãŒã‚るツーリングシナリオã§å—ã‘入れå¯èƒ½ã§ã‚ã‚‹ã“ã¨ãŒå¤šã„ã§ã™ã€‚ + +ã•ã‚‰ã«ã€ã“ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯HTTPをトランスãƒãƒ¼ãƒˆå±¤ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹HTTP構文をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ - データã¯ä¾ç„¶ã¨ã—ã¦æœ€é©ãªãƒ‘フォーマンスã®ãŸã‚ãƒã‚¤ãƒ†ã‚£ãƒ–å½¢å¼ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +以下ã¯ClickHouse API文書ã®æ§‹é€ ã‚’ミラーリングã™ã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚ + +標準APIã®å®Œå…¨ãªã‚³ãƒ¼ãƒ‰ä¾‹ã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/clickhouse-go/tree/main/examples/std)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +### 接続 + +DSN文字列`clickhouse://:?=`を使用ã—ãŸ`Open`メソッドã¾ãŸã¯`clickhouse.OpenDB`メソッドを通ã˜ã¦æŽ¥ç¶šã‚’確立ã§ãã¾ã™ã€‚後者ã¯`database/sql`仕様ã®ä¸€éƒ¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€`sql.DB`インスタンスãŒè¿”ã•ã‚Œã¾ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãƒ—ロファイリングã®ã‚ˆã†ãªæ©Ÿèƒ½ã‚’æä¾›ã—ã€`database/sql`仕様を通ã˜ã¦å…¬é–‹ã•ã‚Œã‚‹æ˜Žç™½ãªæ‰‹æ®µãŒã‚ã‚Šã¾ã›ã‚“。 + +```go +func Connect() error { + env, err := GetStdTestEnvironment() + if err != nil { + return err + } + conn := clickhouse.OpenDB(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.Port)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + }) + return conn.Ping() +} + +func ConnectDSN() error { + env, err := GetStdTestEnvironment() + if err != nil { + return err + } + conn, err := sql.Open("clickhouse", fmt.Sprintf("clickhouse://%s:%d?username=%s&password=%s", env.Host, env.Port, env.Username, env.Password)) + if err != nil { + return err + } + return conn.Ping() +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/connect.go) + +**以é™ã®ä¾‹ã§ã¯ã€æ˜Žç¤ºçš„ã«ç¤ºã•ã‚Œãªã„é™ã‚Šã€ClickHouseã®`conn`変数ãŒä½œæˆã•ã‚Œåˆ©ç”¨å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‚’仮定ã—ã¾ã™ã€‚** + +#### 接続設定 + +次ã®ãƒ‘ラメータã¯ã€DSN文字列ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +* `hosts` - ロードãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ã¨ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼ã®ãŸã‚ã®ã‚·ãƒ³ã‚°ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ãƒ›ã‚¹ãƒˆã®ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šãƒªã‚¹ãƒˆ - [複数ã®ãƒŽãƒ¼ãƒ‰ã¸ã®æŽ¥ç¶š](#connecting-to-multiple-nodes)ã‚’å‚ç…§ãã ã•ã„。 +* `username/password` - èªè¨¼æƒ…å ± - [èªè¨¼](#authentication)ã‚’å‚ç…§ãã ã•ã„。 +* `database` - デフォルトã®ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é¸æŠž +* `dial_timeout` - 期間文字列ã¯ã€ã‚ªãƒ—ションã®ãƒ•ãƒ©ã‚¯ã‚·ãƒ§ãƒ³ã¨å˜ä½æŽ¥å°¾è¾žã‚’æŒã¤ã€å¯èƒ½ãªé™ã‚Šã‚µã‚¤ãƒ³ä»˜ãã®ä¸€é€£ã®å°æ•° - `300ms`ã€`1s`ãªã©ã§ã™ã€‚ 有効ãªæ™‚é–“å˜ä½ã¯`ms`ã€`s`ã€`m`ã§ã™ã€‚ +* `connection_open_strategy` - `random/in_order` (デフォルト `random`) - [複数ã®ãƒŽãƒ¼ãƒ‰ã¸ã®æŽ¥ç¶š](#connecting-to-multiple-nodes)ã‚’å‚ç…§ãã ã•ã„。 + - `round_robin` - セットã‹ã‚‰ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ­ãƒ“ンã®ã‚µãƒ¼ãƒãƒ¼ã‚’é¸æŠžã—ã¾ã™ + - `in_order` - 指定ã•ã‚ŒãŸé †åºã§æœ€åˆã®ç”Ÿãã¦ã„るサーãƒãƒ¼ã‚’é¸æŠžã—ã¾ã™ +* `debug` - デãƒãƒƒã‚°å‡ºåŠ›ã‚’有効ã«ã™ã‚‹ (ブール値) +* `compress` - 圧縮アルゴリズムを指定 - `none`(デフォルト)ã€`zstd`ã€`lz4`ã€`gzip`ã€`deflate`ã€`br`。 `true`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`lz4`ãŒä½¿ã‚ã‚Œã¾ã™ã€‚ãƒã‚¤ãƒ†ã‚£ãƒ–通信ã«ã¯`lz4`ã¨`zstd`ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ +* `compress_level` - 圧縮レベル(デフォルトã¯`0`)。圧縮詳細をå‚照。ã“ã‚Œã¯ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã«ç‰¹æœ‰: + - `gzip` - `-2`(最高速度)ã‹ã‚‰`9`(最高圧縮) + - `deflate` - `-2`(最高速度)ã‹ã‚‰`9`(最高圧縮) + - `br` - `0`(最高速度)ã‹ã‚‰`11`(最高圧縮) + - `zstd`ã€`lz4` - 無視ã•ã‚Œã¾ã™ +* `secure` - セキュアãªSSL接続を確立 (デフォルトã¯`false`) +* `skip_verify` - 証明書検証をスキップ (デフォルトã¯`false`) +* `block_buffer_size` - ユーザーãŒãƒ–ロックãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚ºã‚’制御ã§ãるよã†ã«ã—ã¾ã™ã€‚ [BlockBufferSize](#connection-settings)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。(デフォルトã¯`2`) + +```go +func ConnectSettings() error { + env, err := GetStdTestEnvironment() + if err != nil { + return err + } + conn, err := sql.Open("clickhouse", fmt.Sprintf("clickhouse://127.0.0.1:9001,127.0.0.1:9002,%s:%d/%s?username=%s&password=%s&dial_timeout=10s&connection_open_strategy=round_robin&debug=true&compress=lz4", env.Host, env.Port, env.Database, env.Username, env.Password)) + if err != nil { + return err + } + return conn.Ping() +} +``` +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/connect_settings.go) + +#### コãƒã‚¯ã‚·ãƒ§ãƒ³ãƒ—ーリング + +[複数ã®ãƒŽãƒ¼ãƒ‰ã¸ã®æŽ¥ç¶š](#connecting-to-multiple-nodes)ã«è¨˜è¼‰ã•ã‚Œã¦ã„る通りã«ã€æä¾›ã•ã‚ŒãŸãƒŽãƒ¼ãƒ‰ã‚¢ãƒ‰ãƒ¬ã‚¹ã®ãƒªã‚¹ãƒˆã®ä½¿ç”¨ã«ã¤ã„ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯å½±éŸ¿ã‚’与ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚コãƒã‚¯ã‚·ãƒ§ãƒ³ç®¡ç†ã¨ãƒ—ーリングã¯ã€æ„図的ã«`sql.DB`ã«å§”ã­ã‚‰ã‚Œã¾ã™ã€‚ + +#### HTTP経由ã§ã®æŽ¥ç¶š + +デフォルトã§ã¯ã€æŽ¥ç¶šã¯ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルを介ã—ã¦ç¢ºç«‹ã•ã‚Œã¾ã™ã€‚HTTPã‚’å¿…è¦ã¨ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€HTTPプロトコルをå«ã‚€ã‚ˆã†ã«DSNを変更ã™ã‚‹ã‹ã€æŽ¥ç¶šã‚ªãƒ—ションã§ãƒ—ロトコルを指定ã™ã‚‹ã“ã¨ã§ã“れを有効ã«ã§ãã¾ã™ã€‚ + +```go +func ConnectHTTP() error { + env, err := GetStdTestEnvironment() + if err != nil { + return err + } + conn := clickhouse.OpenDB(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.HttpPort)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + Protocol: clickhouse.HTTP, + }) + return conn.Ping() +} + +func ConnectDSNHTTP() error { + env, err := GetStdTestEnvironment() + if err != nil { + return err + } + conn, err := sql.Open("clickhouse", fmt.Sprintf("http://%s:%d?username=%s&password=%s", env.Host, env.HttpPort, env.Username, env.Password)) + if err != nil { + return err + } + return conn.Ping() +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/connect_http.go) + +#### 複数ã®ãƒŽãƒ¼ãƒ‰ã¸ã®æŽ¥ç¶š + +`OpenDB`を使用ã™ã‚‹å ´åˆã€ClickHouse APIã§ä½¿ç”¨ã•ã‚Œã‚‹åŒã˜ã‚ªãƒ—ションアプローãƒã‚’使用ã—ã¦è¤‡æ•°ã®ãƒ›ã‚¹ãƒˆã«æŽ¥ç¶šã—ã¾ã™ - オプションã§`ConnOpenStrategy`を指定ã—ã¾ã™ã€‚ + +DSNベースã®æŽ¥ç¶šã®å ´åˆã€æ–‡å­—列ã¯è¤‡æ•°ã®ãƒ›ã‚¹ãƒˆã¨`connection_open_strategy`パラメータをå—ã‘入れるãŸã‚ã€ã“ã®å€¤ã«`round_robin`ã¾ãŸã¯`in_order`を設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```go +func MultiStdHost() error { + env, err := GetStdTestEnvironment() + if err != nil { + return err + } + conn, err := clickhouse.Open(&clickhouse.Options{ + Addr: []string{"127.0.0.1:9001", "127.0.0.1:9002", fmt.Sprintf("%s:%d", env.Host, env.Port)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + ConnOpenStrategy: clickhouse.ConnOpenRoundRobin, + }) + if err != nil { + return err + } + v, err := conn.ServerVersion() + if err != nil { + return err + } + fmt.Println(v.String()) + return nil +} + +func MultiStdHostDSN() error { + env, err := GetStdTestEnvironment() + if err != nil { + return err + } + conn, err := sql.Open("clickhouse", fmt.Sprintf("clickhouse://127.0.0.1:9001,127.0.0.1:9002,%s:%d?username=%s&password=%s&connection_open_strategy=round_robin", env.Host, env.Port, env.Username, env.Password)) + if err != nil { + return err + } + return conn.Ping() +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/multi_host.go) + +### TLSã®ä½¿ç”¨ + +DSN接続文字列を使用ã™ã‚‹å ´åˆã€ãƒ‘ラメータ"secure=true"ã§SSLを有効ã«ã§ãã¾ã™ã€‚OpenDBメソッドã¯ã€éžnil TLS構造ã®æŒ‡å®šã«ä¾å­˜ã—ã¦[ãƒã‚¤ãƒ†ã‚£ãƒ–APIã®TLS](#using-tls)ã¨åŒã˜ã‚¢ãƒ—ローãƒã‚’使用ã—ã¾ã™ã€‚DSN接続文字列ã¯SSL検証をスキップã™ã‚‹ãŸã‚ã®skip_verifyパラメータをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ãŒã€OpenDBメソッドã¯æ§‹æˆã‚’渡ã™ã“ã¨ã‚’å¯èƒ½ã«ã—ã¦ã„ã‚‹ãŸã‚ã€ã‚ˆã‚Šé«˜åº¦ãªTLS構æˆã«å¿…è¦ã§ã™ã€‚ + +```go +func ConnectSSL() error { + env, err := GetStdTestEnvironment() + if err != nil { + return err + } + cwd, err := os.Getwd() + if err != nil { + return err + } + t := &tls.Config{} + caCert, err := ioutil.ReadFile(path.Join(cwd, "../../tests/resources/CAroot.crt")) + if err != nil { + return err + } + caCertPool := x509.NewCertPool() + successful := caCertPool.AppendCertsFromPEM(caCert) + if !successful { + return err + } + t.RootCAs = caCertPool + + conn := clickhouse.OpenDB(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.SslPort)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + TLS: t, + }) + return conn.Ping() +} + +func ConnectDSNSSL() error { + env, err := GetStdTestEnvironment() + if err != nil { + return err + } + conn, err := sql.Open("clickhouse", fmt.Sprintf("https://%s:%d?secure=true&skip_verify=true&username=%s&password=%s", env.Host, env.HttpsPort, env.Username, env.Password)) + if err != nil { + return err + } + return conn.Ping() +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/ssl.go) + +### èªè¨¼ + +OpenDBを使用ã™ã‚‹å ´åˆã€é€šå¸¸ã®ã‚ªãƒ—ションã§èªè¨¼æƒ…報を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚DSNベースã®æŽ¥ç¶šã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åãŠã‚ˆã³ãƒ‘スワードã¯æŽ¥ç¶šæ–‡å­—列内ã«æ¸¡ã™ã“ã¨ãŒã§ãã€ãƒ‘ラメータã¨ã—ã¦ã€ã¾ãŸã¯ã‚¢ãƒ‰ãƒ¬ã‚¹ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸè³‡æ ¼æƒ…å ±ã¨ã—ã¦æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```go +func ConnectAuth() error { + env, err := GetStdTestEnvironment() + if err != nil { + return err + } + conn := clickhouse.OpenDB(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.Port)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + }) + return conn.Ping() +} + +func ConnectDSNAuth() error { + env, err := GetStdTestEnvironment() + conn, err := sql.Open("clickhouse", fmt.Sprintf("http://%s:%d?username=%s&password=%s", env.Host, env.HttpPort, env.Username, env.Password)) + if err != nil { + return err + } + if err = conn.Ping(); err != nil { + return err + } + conn, err = sql.Open("clickhouse", fmt.Sprintf("http://%s:%s@%s:%d", env.Username, env.Password, env.Host, env.HttpPort)) + if err != nil { + return err + } + return conn.Ping() +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/auth.go) + +### 実行 + +接続ãŒç¢ºç«‹ã•ã‚Œã‚‹ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯Execメソッドを通ã˜ã¦`sql`文を実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```go +conn.Exec(`DROP TABLE IF EXISTS example`) +_, err = conn.Exec(` + CREATE TABLE IF NOT EXISTS example ( + Col1 UInt8, + Col2 String + ) engine=Memory +`) +if err != nil { + return err +} +_, err = conn.Exec("INSERT INTO example VALUES (1, 'test-1')") +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/exec.go) + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã®å—信をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“ - デフォルトã§ã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚コンテキストãŒå¿…è¦ãªå ´åˆã¯ã€ExecContextを使用ã—ã¦ãã ã•ã„ - コンテキストã®ä½¿ç”¨ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### ãƒãƒƒãƒã‚¤ãƒ³ã‚µãƒ¼ãƒˆ + +ãƒãƒƒãƒã®ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã¯`Being`メソッドを使用ã—ã¦`sql.Tx`を作æˆã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦é”æˆã§ãã¾ã™ã€‚ãã“ã‹ã‚‰`INSERT`文を指定ã—ã¦`Prepare`メソッドを使用ã—ã¦ãƒãƒƒãƒã‚’å–å¾—ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€`sql.Stmt`ãŒè¿”ã•ã‚Œã€`Exec`メソッドã§è¡Œã‚’追加ã§ãã¾ã™ã€‚ ãƒãƒƒãƒã¯`Commit`ãŒæœ€åˆã®`sql.Tx`ã§å®Ÿè¡Œã•ã‚Œã‚‹ã¾ã§ãƒ¡ãƒ¢ãƒªã«è“„ç©ã•ã‚Œã¾ã™ã€‚ + +```go +batch, err := scope.Prepare("INSERT INTO example") +if err != nil { + return err +} +for i := 0; i < 1000; i++ { + _, err := batch.Exec( + uint8(42), + "ClickHouse", "Inc", + uuid.New(), + map[string]uint8{"key": 1}, // Map(String, UInt8) + []string{"Q", "W", "E", "R", "T", "Y"}, // Array(String) + []interface{}{ // Tuple(String, UInt8, Array(Map(String, String))) + "String Value", uint8(5), []map[string]string{ + map[string]string{"key": "value"}, + map[string]string{"key": "value"}, + map[string]string{"key": "value"}, + }, + }, + time.Now(), + ) + if err != nil { + return err + } +} +return scope.Commit() +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/batch.go) + +### è¡Œã®ã‚¯ã‚¨ãƒª + +å˜ä¸€ã®è¡Œã‚’クエリã™ã‚‹éš›ã¯ã€QueryRowメソッドを使用ã§ãã¾ã™ã€‚ã“ã‚Œã¯*sql.Rowã‚’è¿”ã—ã€Scanを変数ã¸ã®ãƒã‚¤ãƒ³ã‚¿ã¨å…±ã«å‘¼ã³å‡ºã—ã¦ã‚«ãƒ©ãƒ ã‚’マーシャル化ã—ã¾ã™ã€‚QueryRowContextãƒãƒªã‚¢ãƒ³ãƒˆã¯ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ä»¥å¤–ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’渡ã™ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +```go +row := conn.QueryRow("SELECT * FROM example") +var ( + col1 uint8 + col2, col3, col4 string + col5 map[string]uint8 + col6 []string + col7 interface{} + col8 time.Time +) +if err := row.Scan(&col1, &col2, &col3, &col4, &col5, &col6, &col7, &col8); err != nil { + return err +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/query_row.go) + +次ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実行ã—ã¦è¤‡æ•°ã®è¡Œã‚’å復処ç†ã™ã‚‹ã«ã¯ã€`Query`メソッドを使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€è¡Œã‚’å復処ç†ã™ã‚‹ãŸã‚ã«Nextを呼ã³å‡ºã›ã‚‹`*sql.Rows`構造を返ã—ã¾ã™ã€‚QueryContext相当ã¯ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’渡ã™ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +```go +rows, err := conn.Query("SELECT * FROM example") +if err != nil { + return err +} +var ( + col1 uint8 + col2, col3, col4 string + col5 map[string]uint8 + col6 []string + col7 interface{} + col8 time.Time +) +for rows.Next() { + if err := rows.Scan(&col1, &col2, &col3, &col4, &col5, &col6, &col7, &col8); err != nil { + return err + } + fmt.Printf("è¡Œ: col1=%d, col2=%s, col3=%s, col4=%s, col5=%v, col6=%v, col7=%v, col8=%v\n", col1, col2, col3, col4, col5, col6, col7, col8) +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/query_rows.go) + +### éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆ + +éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã¯ã€ExecContextメソッドを使用ã—ã¦ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’実行ã™ã‚‹ã“ã¨ã§é”æˆã§ãã¾ã™ã€‚éžåŒæœŸãƒ¢ãƒ¼ãƒ‰ã‚’有効ã«ã—ã¦ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã‚µãƒ¼ãƒãƒ¼ãŒã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’完了ã™ã‚‹ã®ã‚’å¾…ã¤ã‹ã€ãƒ‡ãƒ¼ã‚¿ãŒå—ä¿¡ã•ã‚ŒãŸã‚‰å¿œç­”ã™ã‚‹ã‹ã‚’指定ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€[wait_for_async_insert](https://clickhouse.com/docs/ja/operations/settings/settings/#wait-for-async-insert)パラメータãŒå®Ÿè³ªçš„ã«åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ + +```go +const ddl = ` + CREATE TABLE example ( + Col1 UInt64 + , Col2 String + , Col3 Array(UInt8) + , Col4 DateTime + ) ENGINE = Memory + ` +if _, err := conn.Exec(ddl); err != nil { + return err +} +ctx := clickhouse.Context(context.Background(), clickhouse.WithStdAsync(false)) +{ + for i := 0; i < 100; i++ { + _, err := conn.ExecContext(ctx, fmt.Sprintf(`INSERT INTO example VALUES ( + %d, '%s', [1, 2, 3, 4, 5, 6, 7, 8, 9], now() + )`, i, "Golang SQL database driver")) + if err != nil { + return err + } + } +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/async.go) + +### カラム挿入 + +標準インターフェースを使用ã—ã¦ã®ã‚µãƒãƒ¼ãƒˆã¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +### 構造体ã®ä½¿ç”¨ + +標準インターフェースを使用ã—ã¦ã®ã‚µãƒãƒ¼ãƒˆã¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +### ã‚¿ã‚¤ãƒ—å¤‰æ› + +標準`database/sql`インターフェースã¯ã€[ClickHouse API](#type-conversions)ã¨åŒã˜ã‚¿ã‚¤ãƒ—をサãƒãƒ¼ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã„ãã¤ã‹ã®ä¾‹å¤–ã€ä¸»ã«è¤‡é›‘ãªã‚¿ã‚¤ãƒ—ã«ã¤ã„ã¦ã€ä»¥ä¸‹ã«è¨˜è¼‰ã—ã¾ã™ã€‚ClickHouse APIã¨åŒæ§˜ã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯æŒ¿å…¥æ™‚ã®å¤‰æ•°ã‚¿ã‚¤ãƒ—ã®å—ã‘入れã¨å¿œç­”ã®ãƒžãƒ¼ã‚·ãƒ£ãƒ«åŒ–ã«ã¤ã„ã¦ã§ãã‚‹ã ã‘柔軟ã§ã‚ã‚‹ã“ã¨ã‚’目指ã—ã¾ã™ã€‚詳細ã¯[タイプ変æ›](#type-conversions)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### 複雑ãªã‚¿ã‚¤ãƒ— + +特ã«è¿°ã¹ã‚‰ã‚Œã¦ã„ãªã„é™ã‚Šã€è¤‡é›‘ãªã‚¿ã‚¤ãƒ—ã®å‡¦ç†ã¯[ClickHouse API](#complex-types)ã¨åŒã˜ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚é•ã„ã¯`database/sql`ã®å†…部ã«ã‚ˆã‚Šã¾ã™ã€‚ + +#### マップ + +ClickHouse APIã¨ã¯ç•°ãªã‚Šã€æ¨™æº–APIã¯ã‚¹ã‚­ãƒ£ãƒ³ã‚¿ã‚¤ãƒ—ã§ãƒžãƒƒãƒ—ã®å¼·ã„型付ã‘ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚例ãˆã°ã€`Map(String,String)`フィールドã®ãŸã‚ã«`map[string]interface{}`を渡ã™ã“ã¨ã¯ã§ããšã€ä»£ã‚ã‚Šã«`map[string]string`を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ `interface{}`変数ã¯å¸¸ã«äº’æ›æ€§ãŒã‚ã‚Šã€ã‚ˆã‚Šè¤‡é›‘ãªæ§‹é€ ã®ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚構造体ã¯èª­ã¿å–り時ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +```go +var ( + col1Data = map[string]uint64{ + "key_col_1_1": 1, + "key_col_1_2": 2, + } + col2Data = map[string]uint64{ + "key_col_2_1": 10, + "key_col_2_2": 20, + } + col3Data = map[string]uint64{} + col4Data = []map[string]string{ + {"A": "B"}, + {"C": "D"}, + } + col5Data = map[string]uint64{ + "key_col_5_1": 100, + "key_col_5_2": 200, + } +) +if _, err := batch.Exec(col1Data, col2Data, col3Data, col4Data, col5Data); err != nil { + return err +} +if err = scope.Commit(); err != nil { + return err +} +var ( + col1 interface{} + col2 map[string]uint64 + col3 map[string]uint64 + col4 []map[string]string + col5 map[string]uint64 +) +if err := conn.QueryRow("SELECT * FROM example").Scan(&col1, &col2, &col3, &col4, &col5); err != nil { + return err +} +fmt.Printf("col1=%v, col2=%v, col3=%v, col4=%v, col5=%v", col1, col2, col3, col4, col5) +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/map.go) + +挿入ã®å‹•ä½œã¯ClickHouse APIã¨åŒã˜ã§ã™ã€‚ + +### 圧縮 + +標準APIã¯ãƒã‚¤ãƒ†ã‚£ãƒ–[ClickHouse API](#compression)ã¨åŒæ§˜ã®åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ–ロックレベルã®`lz4`ã¨`zstd`圧縮ã§ã™ã€‚ã•ã‚‰ã«ã€HTTP接続ã«ã¯gzipã€deflateã€brもサãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“れらãŒæœ‰åŠ¹åŒ–ã•ã‚Œã¦ã„ã‚‹å ´åˆã€åœ§ç¸®ã¯ã‚¤ãƒ³ã‚µãƒ¼ãƒˆæ™‚ã®ãƒ–ロックã¨ã‚¯ã‚¨ãƒªå¿œç­”ã®ãŸã‚ã«è¡Œã‚ã‚Œã¾ã™ã€‚ä»–ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã€ä¾‹ãˆã°pingやクエリリクエストã¯åœ§ç¸®ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯`lz4`ã¨`zstd`オプションã¨ä¸€è‡´ã—ã¦ã„ã¾ã™ã€‚ + +ã‚‚ã—`OpenDB`メソッドを使用ã—ã¦æŽ¥ç¶šã‚’確立ã™ã‚‹å ´åˆã€åœ§ç¸®ã®è¨­å®šã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã¯åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã‚’指定ã™ã‚‹èƒ½åŠ›ãŒå«ã¾ã‚Œã¾ã™ï¼ˆä»¥ä¸‹ã‚’å‚照)。`sql.Open`を使用ã—ã¦DSNを介ã—ã¦æŽ¥ç¶šã™ã‚‹å ´åˆã€`compress`パラメータを利用ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ç‰¹å®šã®åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã€ãŸã¨ãˆã°`gzip`ã€`deflate`ã€`br`ã€`zstd`ã¾ãŸã¯`lz4`ã‚ã‚‹ã„ã¯ãƒ–ールフラグã«ãªã‚Šã¾ã™ã€‚`true`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`lz4`ãŒä½¿ã‚ã‚Œã¾ã™ã€‚デフォルトã¯`none`ã§ã™ã€‚ã™ãªã‚ã¡ã€åœ§ç¸®ã¯ç„¡åŠ¹ã§ã™ã€‚ + +```go +conn := clickhouse.OpenDB(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.HttpPort)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + Compression: &clickhouse.Compression{ + Method: clickhouse.CompressionBrotli, + Level: 5, + }, + Protocol: clickhouse.HTTP, +}) +``` +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/compression.go#L27-L76) + +```go +conn, err := sql.Open("clickhouse", fmt.Sprintf("http://%s:%d?username=%s&password=%s&compress=gzip&compress_level=5", env.Host, env.HttpPort, env.Username, env.Password)) +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/compression.go#L78-L115) + +é©ç”¨ã•ã‚ŒãŸåœ§ç¸®ã®ãƒ¬ãƒ™ãƒ«ã¯ã€DSNパラメータcompress_levelã¾ãŸã¯Compressionオプションã®Levelフィールドã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚デフォルトã¯0ã§ã™ãŒã€ã“ã‚Œã¯ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã«ã‚ˆã£ã¦ç‰¹æœ‰ã§ã™: + +* `gzip` - `-2` (ベストスピード)ã‹ã‚‰`9` (ベスト圧縮) +* `deflate` - `-2` (ベストスピード)ã‹ã‚‰`9` (ベスト圧縮) +* `br` - `0` (ベストスピード)ã‹ã‚‰`11` (ベスト圧縮) +* `zstd`, `lz4` - 無視ã•ã‚Œã¾ã™ + +### パラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° + +標準APIã¯ã€[ClickHouse API](#parameter-binding)ã¨åŒæ§˜ã®ãƒ‘ラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°æ©Ÿèƒ½ã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€Execã€Queryã€QueryRowメソッド(ãŠã‚ˆã³å¯¾å¿œã™ã‚‹[コンテキスト](#using-context)ãƒãƒªã‚¢ãƒ³ãƒˆï¼‰ã«ãƒ‘ラメータを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ä½ç½®æŒ‡å®šã€åå‰ä»˜ãã€ãŠã‚ˆã³ç•ªå·ä»˜ãã®ãƒ‘ラメータãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```go +var count uint64 +// ä½ç½®ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° +if err = conn.QueryRow(ctx, "SELECT count() FROM example WHERE Col1 >= ? AND Col3 < ?", 500, now.Add(time.Duration(750)*time.Second)).Scan(&count); err != nil { + return err +} +// 250 +fmt.Printf("ä½ç½®ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚«ã‚¦ãƒ³ãƒˆ: %d\n", count) +// 数値ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° +if err = conn.QueryRow(ctx, "SELECT count() FROM example WHERE Col1 <= $2 AND Col3 > $1", now.Add(time.Duration(150)*time.Second), 250).Scan(&count); err != nil { + return err +} +// 100 +fmt.Printf("数値ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚«ã‚¦ãƒ³ãƒˆ: %d\n", count) +// åå‰ä»˜ããƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° +if err = conn.QueryRow(ctx, "SELECT count() FROM example WHERE Col1 <= @col1 AND Col3 > @col3", clickhouse.Named("col1", 100), clickhouse.Named("col3", now.Add(time.Duration(50)*time.Second))).Scan(&count); err != nil { + return err +} +// 50 +fmt.Printf("åå‰ä»˜ããƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚«ã‚¦ãƒ³ãƒˆ: %d\n", count) +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/bind.go) + +[特別ãªã‚±ãƒ¼ã‚¹](#special-cases)ãŒé©ç”¨ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +### コンテキストã®ä½¿ç”¨ + +標準APIã¯ã€[ClickHouse API](#using-context)ã¨åŒæ§˜ã«ã€ãƒ‡ãƒƒãƒ‰ãƒ©ã‚¤ãƒ³ã€ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã‚·ã‚°ãƒŠãƒ«ã€ãŠã‚ˆã³ä»–ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚¹ã‚³ãƒ¼ãƒ—ã®å€¤ã‚’コンテキストを通ã˜ã¦æ¸¡ã™èƒ½åŠ›ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ClickHouse APIã¨ã¯ç•°ãªã‚Šã€ã“ã‚Œã¯ãƒ¡ã‚½ãƒƒãƒ‰ã®`Context`ãƒãƒªã‚¢ãƒ³ãƒˆã‚’使用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦é”æˆã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使用ã™ã‚‹`Exec`メソッドã¯`ExecContext`ãƒãƒªã‚¢ãƒ³ãƒˆã‚’æŒã¡ã€ãã“ã§ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’最åˆã®ãƒ‘ラメータã¨ã—ã¦æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¢ãƒ—リケーションフローã®ä»»æ„ã®æ®µéšŽã§ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’渡ã™ã“ã¨ãŒã§ãã€ãŸã¨ãˆã°ã€æŽ¥ç¶šã‚’確立ã™ã‚‹éš›ã«`ConnContext`ã¾ãŸã¯ã‚¯ã‚¨ãƒªè¡Œã‚’リクエストã™ã‚‹éš›ã«`QueryRowContext`を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã«åˆ©ç”¨å¯èƒ½ãªãƒ¡ã‚½ãƒƒãƒ‰ã®ä¾‹ã‚’示ã—ã¾ã™ã€‚ + +デッドラインã€ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã‚·ã‚°ãƒŠãƒ«ã€ã‚¯ã‚¨ãƒªIDã€ã‚¯ã‚©ãƒ¼ã‚¿ã‚­ãƒ¼ãŠã‚ˆã³æŽ¥ç¶šè¨­å®šã‚’渡ã™ãŸã‚ã«ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使用ã™ã‚‹è©³ç´°ã«ã¤ã„ã¦ã¯ã€[ClickHouse API](#using-context)ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã®ä½¿ç”¨ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +```go +ctx := clickhouse.Context(context.Background(), clickhouse.WithSettings(clickhouse.Settings{ + "allow_experimental_object_type": "1", +})) +conn.ExecContext(ctx, "DROP TABLE IF EXISTS example") +// JSONカラムを作æˆã™ã‚‹ãŸã‚ã«ã¯allow_experimental_object_type=1ãŒå¿…è¦ã§ã™ +if _, err = conn.ExecContext(ctx, ` + CREATE TABLE example ( + Col1 JSON + ) + Engine Memory + `); err != nil { + return err +} + +// コンテキストを使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’キャンセルã§ãã¾ã™ +ctx, cancel := context.WithCancel(context.Background()) +go func() { + cancel() +}() +if err = conn.QueryRowContext(ctx, "SELECT sleep(3)").Scan(); err == nil { + return fmt.Errorf("キャンセルを期待ã—ã¦ã„ã¾ã—ãŸ") +} + +// クエリã«ãƒ‡ãƒƒãƒ‰ãƒ©ã‚¤ãƒ³ã‚’設定ã—ãŸå ´åˆ - 絶対時間ã«é”ã—ãŸå¾Œã«ã‚¯ã‚¨ãƒªã‚’キャンセルã—ã¾ã™ã€‚å†ã³ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã®è§£é™¤ã®ã¿ã‚’è¡Œã„〠+// ClickHouseã§ã¯ã‚¯ã‚¨ãƒªãŒå®Œäº†ã¾ã§ç¶šè¡Œã•ã‚Œã¾ã™ +ctx, cancel = context.WithDeadline(context.Background(), time.Now().Add(-time.Second)) +defer cancel() +if err := conn.PingContext(ctx); err == nil { + return fmt.Errorf("デッドライン超éŽã‚’期待ã—ã¦ã„ã¾ã—ãŸ") +} + +// ログã§ã®ã‚¯ã‚¨ãƒªãƒˆãƒ¬ãƒ¼ã‚¹ã‚’助ã‘ã‚‹ãŸã‚ã«ã‚¯ã‚¨ãƒªIDを設定ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€system.query_logã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +var one uint8 +ctx = clickhouse.Context(context.Background(), clickhouse.WithQueryID(uuid.NewString())) +if err = conn.QueryRowContext(ctx, "SELECT 1").Scan(&one); err != nil { + return err +} + +conn.ExecContext(context.Background(), "DROP QUOTA IF EXISTS foobar") +defer func() { + conn.ExecContext(context.Background(), "DROP QUOTA IF EXISTS foobar") +}() +ctx = clickhouse.Context(context.Background(), clickhouse.WithQuotaKey("abcde")) +// クォータキーを設定 - ã¾ãšã‚¯ã‚©ãƒ¼ã‚¿ã‚’作æˆã™ã‚‹ +if _, err = conn.ExecContext(ctx, "CREATE QUOTA IF NOT EXISTS foobar KEYED BY client_key FOR INTERVAL 1 minute MAX queries = 5 TO default"); err != nil { + return err +} + +// クエリã¯ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使用ã—ã¦ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã§ãã¾ã™ +ctx, cancel = context.WithCancel(context.Background()) +// キャンセルã®å‰ã«çµæžœã‚’ã„ãã¤ã‹å–å¾—ã—ã¾ã™ +ctx = clickhouse.Context(ctx, clickhouse.WithSettings(clickhouse.Settings{ + "max_block_size": "1", +})) +rows, err := conn.QueryContext(ctx, "SELECT sleepEachRow(1), number FROM numbers(100);") +if err != nil { + return err +} +var ( + col1 uint8 + col2 uint8 +) + +for rows.Next() { + if err := rows.Scan(&col1, &col2); err != nil { + if col2 > 3 { + fmt.Println("キャンセルを期待ã—ã¦ã„ã¾ã—ãŸ") + return nil + } + return err + } + fmt.Printf("è¡Œ: col2=%d\n", col2) + if col2 == 3 { + cancel() + } +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/context.go) + +### セッション + +ãƒã‚¤ãƒ†ã‚£ãƒ–接続ã¯æœ¬è³ªçš„ã«ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’æŒã£ã¦ã„ã¾ã™ãŒã€HTTP接続ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’設定ã¨ã—ã¦æ¸¡ã™ãŸã‚ã«ã‚»ãƒƒã‚·ãƒ§ãƒ³IDを作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ä¸€æ™‚テーブルãªã©ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ãƒã‚¤ãƒ³ãƒ‰ã•ã‚ŒãŸæ©Ÿèƒ½ãŒä½¿ç”¨å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +```go +conn := clickhouse.OpenDB(&clickhouse.Options{ + Addr: []string{fmt.Sprintf("%s:%d", env.Host, env.HttpPort)}, + Auth: clickhouse.Auth{ + Database: env.Database, + Username: env.Username, + Password: env.Password, + }, + Protocol: clickhouse.HTTP, + Settings: clickhouse.Settings{ + "session_id": uuid.NewString(), + }, +}) +if _, err := conn.Exec(`DROP TABLE IF EXISTS example`); err != nil { + return err +} +_, err = conn.Exec(` + CREATE TEMPORARY TABLE IF NOT EXISTS example ( + Col1 UInt8 + ) +`) +if err != nil { + return err +} +scope, err := conn.Begin() +if err != nil { + return err +} +batch, err := scope.Prepare("INSERT INTO example") +if err != nil { + return err +} +for i := 0; i < 10; i++ { + _, err := batch.Exec( + uint8(i), + ) + if err != nil { + return err + } +} +rows, err := conn.Query("SELECT * FROM example") +if err != nil { + return err +} +var ( + col1 uint8 +) +for rows.Next() { + if err := rows.Scan(&col1); err != nil { + return err + } + fmt.Printf("è¡Œ: col1=%d\n", col1) +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/session.go) + +### 動的スキャン + +[ClickHouse API](#dynamic-scanning)ã«ä¼¼ã¦ã€ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—情報ã¯åˆ©ç”¨å¯èƒ½ã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå®Ÿè¡Œæ™‚ã«æ­£ã—ã型付ã‘ã•ã‚ŒãŸå¤‰æ•°ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’作æˆã—ã€Scanã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¿ã‚¤ãƒ—ãŒæœªçŸ¥ã®å ´åˆã§ã‚‚カラムを読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```go +const query = ` +SELECT + 1 AS Col1 + , 'Text' AS Col2 +` +rows, err := conn.QueryContext(context.Background(), query) +if err != nil { + return err +} +columnTypes, err := rows.ColumnTypes() +if err != nil { + return err +} +vars := make([]interface{}, len(columnTypes)) +for i := range columnTypes { + vars[i] = reflect.New(columnTypes[i].ScanType()).Interface() +} +for rows.Next() { + if err := rows.Scan(vars...); err != nil { + return err + } + for _, v := range vars { + switch v := v.(type) { + case *string: + fmt.Println(*v) + case *uint8: + fmt.Println(*v) + } + } +} +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/dynamic_scan_types.go) + +### 外部テーブル + +[外部テーブル](https://clickhouse.com/docs/ja/engines/table-engines/special/external-data/)ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒSELECTクエリã¨å…±ã«ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã§ãるよã†ã«ã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ä¸€æ™‚çš„ãªãƒ†ãƒ¼ãƒ–ルã«ç½®ã‹ã‚Œã€ã‚¯ã‚¨ãƒªè‡ªä½“ã§ã®è©•ä¾¡ã«ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +クエリã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã™ã‚‹å¤–部データを作æˆã™ã‚‹ãŸã‚ã«ã¯ã€ext.NewTableを介ã—ã¦å¤–部テーブルを構築ã—ã€ã“れをコンテキストã«æ¸¡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```go +table1, err := ext.NewTable("external_table_1", + ext.Column("col1", "UInt8"), + ext.Column("col2", "String"), + ext.Column("col3", "DateTime"), +) +if err != nil { + return err +} + +for i := 0; i < 10; i++ { + if err = table1.Append(uint8(i), fmt.Sprintf("value_%d", i), time.Now()); err != nil { + return err + } +} + +table2, err := ext.NewTable("external_table_2", + ext.Column("col1", "UInt8"), + ext.Column("col2", "String"), + ext.Column("col3", "DateTime"), +) + +for i := 0; i < 10; i++ { + table2.Append(uint8(i), fmt.Sprintf("value_%d", i), time.Now()) +} +ctx := clickhouse.Context(context.Background(), + clickhouse.WithExternalTable(table1, table2), +) +rows, err := conn.QueryContext(ctx, "SELECT * FROM external_table_1") +if err != nil { + return err +} +for rows.Next() { + var ( + col1 uint8 + col2 string + col3 time.Time + ) + rows.Scan(&col1, &col2, &col3) + fmt.Printf("col1=%d, col2=%s, col3=%v\n", col1, col2, col3) +} +rows.Close() + +var count uint64 +if err := conn.QueryRowContext(ctx, "SELECT COUNT(*) FROM external_table_1").Scan(&count); err != nil { + return err +} +fmt.Printf("external_table_1: %d\n", count) +if err := conn.QueryRowContext(ctx, "SELECT COUNT(*) FROM external_table_2").Scan(&count); err != nil { + return err +} +fmt.Printf("external_table_2: %d\n", count) +if err := conn.QueryRowContext(ctx, "SELECT COUNT(*) FROM (SELECT * FROM external_table_1 UNION ALL SELECT * FROM external_table_2)").Scan(&count); err != nil { + return err +} +fmt.Printf("external_table_1 UNION external_table_2: %d\n", count) +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/external_data.go) + +### Open Telemetry + +ClickHouseã¯ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルã®ä¸€éƒ¨ã¨ã—ã¦[トレースコンテキスト](https://clickhouse.com/docs/ja/operations/opentelemetry/)を渡ã™ã“ã¨ã‚’許å¯ã—ã¦ã„ã¾ã™ã€‚クライアントã¯`clickhouse.withSpan`関数を介ã—ã¦Spanを作æˆã—ã€ã“れをコンテキスト経由ã§æ¸¡ã™ã“ã¨ã«ã‚ˆã£ã¦ã“れをé”æˆã—ã¾ã™ã€‚ã“ã‚Œã¯HTTPをトランスãƒãƒ¼ãƒˆã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å ´åˆã«ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +```go +var count uint64 +rows := conn.QueryRowContext(clickhouse.Context(context.Background(), clickhouse.WithSpan( + trace.NewSpanContext(trace.SpanContextConfig{ + SpanID: trace.SpanID{1, 2, 3, 4, 5}, + TraceID: trace.TraceID{5, 4, 3, 2, 1}, + }), +)), "SELECT COUNT() FROM (SELECT number FROM system.numbers LIMIT 5)") +if err := rows.Scan(&count); err != nil { + return err +} +fmt.Printf("count: %d\n", count) +``` + +[完全ãªä¾‹](https://github.com/ClickHouse/clickhouse-go/blob/main/examples/std/open_telemetry.go) + +## パフォーマンステップ + +* å¯èƒ½ã§ã‚ã‚Œã°ã€ClickHouse APIを利用ã™ã‚‹ã€‚ãã‚Œã«ã‚ˆã‚Šã€é‡è¦ãªãƒªãƒ•ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨é–“接をé¿ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +* 大è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’読ã¿å–ã‚‹å ´åˆã€[BlockBufferSize](#connection-settings)を変更ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¡ãƒ¢ãƒªã®ãƒ•ãƒƒãƒˆãƒ—リントãŒå¢—ãˆã¾ã™ãŒã€è¡Œã®å復中ã«ã‚ˆã‚Šå¤šãã®ãƒ–ロックãŒä¸¦åˆ—ã«ãƒ‡ã‚³ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚デフォルト値ã®2ã¯ä¿å®ˆçš„ã§ã€ãƒ¡ãƒ¢ãƒªã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’最å°é™ã«æŠ‘ãˆã¾ã™ã€‚高ã„値ã¯ãƒ¡ãƒ¢ãƒªå†…ã®ãƒ–ロック数を増やã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ†ã‚¹ãƒˆãŒå¿…è¦ã§ã€ç•°ãªã‚‹ã‚¯ã‚¨ãƒªã¯ç•°ãªã‚‹ãƒ–ロックサイズを生æˆã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãã®ãŸã‚ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’介ã—ã¦[クエリレベル](#using-context)ã§è¨­å®šã§ãã¾ã™ã€‚ +* データを挿入ã™ã‚‹éš›ã«ã¯ã€ã§ãã‚‹ã ã‘具体的ã«åž‹ã‚’指定ã—ã¦ãã ã•ã„。クライアントã¯UUIDã‚„IPã®ãŸã‚ã®æ–‡å­—列を許å¯ã™ã‚‹ãªã©ã®æŸ”軟ã•ã‚’目指ã—ã¦ã„ã¾ã™ãŒã€ã“ã‚Œã¯ãƒ‡ãƒ¼ã‚¿ã®æ¤œè¨¼ã‚’å¿…è¦ã¨ã—ã€æŒ¿å…¥æ™‚ã«ã‚³ã‚¹ãƒˆã‚’ä¼´ã„ã¾ã™ã€‚ +* å¯èƒ½ãªé™ã‚Šåˆ—指å‘ã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’利用ã—ã¦ãã ã•ã„。ã“れらã¯å¼·ã型付ã‘ã•ã‚Œã¦ãŠã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã‚ãªãŸã®å€¤ã‚’変æ›ã™ã‚‹å¿…è¦ã‚’é¿ã‘ã¾ã™ã€‚ +* ClickHouseã®æœ€é©ãªã‚¤ãƒ³ã‚µãƒ¼ãƒˆãƒ‘フォーマンスã®ãŸã‚ã®[推奨](https://clickhouse.com/docs/ja/sql-reference/statements/insert-into/#performance-considerations)ã«å¾“ã£ã¦ãã ã•ã„。 +``` diff --git a/docs/ja/integrations/language-clients/java/client-v1.md b/docs/ja/integrations/language-clients/java/client-v1.md new file mode 100644 index 00000000000..7fdad530fa9 --- /dev/null +++ b/docs/ja/integrations/language-clients/java/client-v1.md @@ -0,0 +1,348 @@ +--- +sidebar_label: クライアント V1 +sidebar_position: 3 +keywords: [clickhouse, java, client, integrate] +description: Java ClickHouse Connector v1 +slug: /ja/integrations/java/client-v1 +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + +# クライアント (V1) + +DBサーãƒã¨ãã®ãƒ—ロトコルを介ã—ã¦é€šä¿¡ã™ã‚‹ãŸã‚ã®Javaクライアントライブラリã§ã™ã€‚ç¾åœ¨ã®å®Ÿè£…ã§ã¯[HTTPインターフェース](/docs/ja/interfaces/http)ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ©ã‚¤ãƒ–ラリã¯ã€ã‚µãƒ¼ãƒã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã™ã‚‹ãŸã‚ã®ç‹¬è‡ªã®APIã‚’æä¾›ã—ã¾ã™ã€‚ + +*注æ„*: ã“ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¯é–“ã‚‚ãªãéžæŽ¨å¥¨ã«ãªã‚Šã¾ã™ã€‚ + +## セットアップ + + + + +```xml + + + com.clickhouse + clickhouse-http-client + 0.6.5 + +``` + + + + +```kotlin +// https://mvnrepository.com/artifact/com.clickhouse/clickhouse-http-client +implementation("com.clickhouse:clickhouse-http-client:0.6.5") +``` + + + +```groovy +// https://mvnrepository.com/artifact/com.clickhouse/clickhouse-http-client +implementation 'com.clickhouse:clickhouse-http-client:0.6.5' +``` + + + + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ `0.5.0` 以é™ã€ãƒ‰ãƒ©ã‚¤ãƒãƒ¼ã¯æ–°ã—ã„クライアントHTTPライブラリを使用ã—ã€ãれをä¾å­˜é–¢ä¿‚ã¨ã—ã¦è¿½åŠ ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + + + + +```xml + + + org.apache.httpcomponents.client5 + httpclient5 + 5.3.1 + +``` + + + + +```kotlin +// https://mvnrepository.com/artifact/org.apache.httpcomponents.client5/httpclient5 +implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1") +``` + + + +```groovy +// https://mvnrepository.com/artifact/org.apache.httpcomponents.client5/httpclient5 +implementation 'org.apache.httpcomponents.client5:httpclient5:5.3.1' +``` + + + + +## åˆæœŸåŒ– + +接続URLå½¢å¼: `protocol://host[:port][/database][?param[=value][¶m[=value]][#tag[,tag]]`, 例ã¨ã—ã¦: + +- `http://localhost:8443?ssl=true&sslmode=NONE` +- `https://(https://explorer@play.clickhouse.com:443` + +å˜ä¸€ãƒŽãƒ¼ãƒ‰ã«æŽ¥ç¶š: + +```java showLineNumbers +ClickHouseNode server = ClickHouseNode.of("http://localhost:8123/default?compress=0"); +``` +複数ノードã®ã‚¯ãƒ©ã‚¹ã‚¿ã«æŽ¥ç¶š: + +```java showLineNumbers +ClickHouseNodes servers = ClickHouseNodes.of( + "jdbc:ch:http://server1.domain,server2.domain,server3.domain/my_db" + + "?load_balancing_policy=random&health_check_interval=5000&failover=2"); +``` + +## クエリAPI + +```java showLineNumbers +try (ClickHouseClient client = ClickHouseClient.newInstance(ClickHouseProtocol.HTTP); + ClickHouseResponse response = client.read(servers) + .format(ClickHouseFormat.RowBinaryWithNamesAndTypes) + .query("select * from numbers limit :limit") + .params(1000) + .executeAndWait()) { + ClickHouseResponseSummary summary = response.getSummary(); + long totalRows = summary.getTotalRowsToRead(); +} +``` + +## ストリーミングクエリAPI + +```java showLineNumbers +try (ClickHouseClient client = ClickHouseClient.newInstance(ClickHouseProtocol.HTTP); + ClickHouseResponse response = client.read(servers) + .format(ClickHouseFormat.RowBinaryWithNamesAndTypes) + .query("select * from numbers limit :limit") + .params(1000) + .executeAndWait()) { + for (ClickHouseRecord r : response.records()) { + int num = r.getValue(0).asInteger(); + // åž‹å¤‰æ› + String str = r.getValue(0).asString(); + LocalDate date = r.getValue(0).asDate(); + } +} +``` + +[リãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client)内ã®[完全ãªã‚³ãƒ¼ãƒ‰ä¾‹](https://github.com/ClickHouse/clickhouse-java/blob/main/examples/client/src/main/java/com/clickhouse/examples/jdbc/Main.java#L73)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 挿入API + +```java showLineNumbers + +try (ClickHouseClient client = ClickHouseClient.newInstance(ClickHouseProtocol.HTTP); + ClickHouseResponse response = client.read(servers).write() + .format(ClickHouseFormat.RowBinaryWithNamesAndTypes) + .query("insert into my_table select c2, c3 from input('c1 UInt8, c2 String, c3 Int32')") + .data(myInputStream) // `myInputStream` ã¯RowBinaryå½¢å¼ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ + .executeAndWait()) { + ClickHouseResponseSummary summary = response.getSummary(); + summary.getWrittenRows(); +} +``` + +[リãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client)内ã®[完全ãªã‚³ãƒ¼ãƒ‰ä¾‹](https://github.com/ClickHouse/clickhouse-java/blob/main/examples/client/src/main/java/com/clickhouse/examples/jdbc/Main.java#L39)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**RowBinary エンコーディング** + +RowBinaryå½¢å¼ã¯ãã®[ページ](/docs/ja/interfaces/formats#rowbinarywithnamesandtypes)ã«è¨˜è¿°ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +[コード](https://github.com/ClickHouse/clickhouse-kafka-connect/blob/main/src/main/java/com/clickhouse/kafka/connect/sink/db/ClickHouseWriter.java#L622)ã®ä¾‹ãŒã‚ã‚Šã¾ã™ã€‚ + +## 機能 +### 圧縮 + +ã“ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§LZ4圧縮を使用ã—ã¾ã™ã€‚ãã‚Œã«ã¯ä»¥ä¸‹ã®ä¾å­˜é–¢ä¿‚ãŒå¿…è¦ã§ã™ã€‚ + + + + +```xml + + + org.lz4 + lz4-java + 1.8.0 + +``` + + + + +```kotlin +// https://mvnrepository.com/artifact/org.lz4/lz4-java +implementation("org.lz4:lz4-java:1.8.0") +``` + + + +```groovy +// https://mvnrepository.com/artifact/org.lz4/lz4-java +implementation 'org.lz4:lz4-java:1.8.0' +``` + + + + +代ã‚ã‚Šã«gzipを使用ã—ãŸã„å ´åˆã¯ã€æŽ¥ç¶šURLã«`compress_algorithm=gzip`を設定ã—ã¦ãã ã•ã„。 + +ã¾ãŸã€æ•°é€šã‚Šã®æ–¹æ³•ã§åœ§ç¸®ã‚’無効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +1. 接続URLã« `compress=0` を設定ã—ã¦ç„¡åŠ¹ã«ã™ã‚‹: `http://localhost:8123/default?compress=0` +2. クライアント設定経由ã§ç„¡åŠ¹ã«ã™ã‚‹: + +```java showLineNumbers +ClickHouseClient client = ClickHouseClient.builder() + .config(new ClickHouseConfig(Map.of(ClickHouseClientOption.COMPRESS, false))) + .nodeSelector(ClickHouseNodeSelector.of(ClickHouseProtocol.HTTP)) + .build(); +``` + +ç•°ãªã‚‹åœ§ç¸®ã‚ªãƒ—ションã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[圧縮ドキュメント](/ja/native-protocol/compression)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### 複数クエリ + +åŒã˜ã‚»ãƒƒã‚·ãƒ§ãƒ³å†…ã§ã€è¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚’一ã¤ã¥ã¤ãƒ¯ãƒ¼ã‚«ãƒ¼ã‚¹ãƒ¬ãƒƒãƒ‰ã§å®Ÿè¡Œã—ã¾ã™: + +```java showLineNumbers +CompletableFuture> future = ClickHouseClient.send(servers.apply(servers.getNodeSelector()), + "create database if not exists my_base", + "use my_base", + "create table if not exists test_table(s String) engine=Memory", + "insert into test_table values('1')('2')('3')", + "select * from test_table limit 1", + "truncate table test_table", + "drop table if exists test_table"); +List results = future.get(); +``` + +### åå‰ä»˜ãパラメータ + +パラメータリストã®ä½ç½®ã«ä¾å­˜ã™ã‚‹ä»£ã‚ã‚Šã«ã€åå‰ã§ãƒ‘ラメータを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯`params`機能を使用ã™ã‚‹ã“ã¨ã§åˆ©ç”¨å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +```java showLineNumbers +try (ClickHouseClient client = ClickHouseClient.newInstance(ClickHouseProtocol.HTTP); + ClickHouseResponse response = client.read(servers) + .format(ClickHouseFormat.RowBinaryWithNamesAndTypes) + .query("select * from my_table where name=:name limit :limit") + .params("Ben", 1000) + .executeAndWait()) { + //... + } +} +``` + +:::note パラメータ +`String`åž‹ã‚’å«ã‚€å…¨ã¦ã®`params`ã‚·ã‚°ãƒãƒãƒ£(`String`, `String[]`, `Map`)ã¯ã€æ¸¡ã•ã‚Œã‚‹ã‚­ãƒ¼ãŒæœ‰åŠ¹ãªClickHouseã®SQL文字列ã§ã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ãŸã¨ãˆã°: + +```java showLineNumbers +try (ClickHouseClient client = ClickHouseClient.newInstance(ClickHouseProtocol.HTTP); + ClickHouseResponse response = client.read(servers) + .format(ClickHouseFormat.RowBinaryWithNamesAndTypes) + .query("select * from my_table where name=:name") + .params(Map.of("name","'Ben'")) + .executeAndWait()) { + //... + } +} +``` + +Stringオブジェクトを手動ã§ClickHouse SQLã«è§£æžã—ãŸããªã„å ´åˆã¯ã€`com.clickhouse.data`ã«ã‚るヘルパー関数`ClickHouseValues.convertToSqlExpression`を使用ã§ãã¾ã™: + +```java showLineNumbers +try (ClickHouseClient client = ClickHouseClient.newInstance(ClickHouseProtocol.HTTP); + ClickHouseResponse response = client.read(servers) + .format(ClickHouseFormat.RowBinaryWithNamesAndTypes) + .query("select * from my_table where name=:name") + .params(Map.of("name", ClickHouseValues.convertToSqlExpression("Ben's"))) + .executeAndWait()) { + //... + } +} +``` + +上記ã®ä¾‹ã§ã¯ã€`ClickHouseValues.convertToSqlExpression`ãŒå†…部ã®ã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚©ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’エスケープã—ã€å¤‰æ•°ã‚’有効ãªã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚©ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã§å›²ã¿ã¾ã™ã€‚ + +ä»–ã®åž‹ã€ä¾‹ãˆã°`Integer`ã€`UUID`ã€`Array`ã€`Enum`ãªã©ã¯ã€`params`内ã§è‡ªå‹•çš„ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ +::: + +## ノード検出 + +Javaクライアントã¯ã€ClickHouseノードを自動ã§æ¤œå‡ºã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚自動検出ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚手動ã§æœ‰åŠ¹ã«ã™ã‚‹ã«ã¯ã€`auto_discovery`ã‚’ `true`ã«è¨­å®šã—ã¾ã™: + +```java +properties.setProperty("auto_discovery", "true"); +``` + +ã¾ãŸã¯æŽ¥ç¶šURL内ã§: + +```plaintext +jdbc:ch://my-server/system?auto_discovery=true +``` + +自動検出ãŒæœ‰åŠ¹ãªå ´åˆã€æŽ¥ç¶šURL内ã«å…¨ã¦ã®ClickHouseノードを指定ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。URLã«æŒ‡å®šã•ã‚ŒãŸãƒŽãƒ¼ãƒ‰ã¯ã‚·ãƒ¼ãƒ‰ã¨ã—ã¦æ‰±ã‚ã‚Œã€Javaクライアントã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルやclickhouse-keeperã‚‚ã—ãã¯zookeeperã‹ã‚‰ã•ã‚‰ã«å¤šãã®ãƒŽãƒ¼ãƒ‰ã‚’自動ã§æ¤œå‡ºã—ã¾ã™ã€‚ + +自動検出設定ã«é–¢ã™ã‚‹ã‚ªãƒ—ションã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +| プロパティ | デフォルト | 説明 | +|-------------------------|------------|-------------------------------------------------------------------------------------------------------| +| auto_discovery | `false` | クライアントãŒã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã¾ãŸã¯clickhouse-keeper/zookeeperã‹ã‚‰ã•ã‚‰ã«å¤šãã®ãƒŽãƒ¼ãƒ‰ã‚’検出ã™ã‚‹ã‹ã©ã†ã‹ | +| node_discovery_interval | `0` | ノード検出ã®é–“隔をミリ秒ã§æŒ‡å®šã—ã€ã‚¼ãƒ­ã‚„è² ã®å€¤ã¯ä¸€å›žé™ã‚Šã®æ¤œå‡ºã‚’æ„味ã—ã¾ã™ | +| node_discovery_limit | `100` | 一度ã«æ¤œå‡ºã§ãるノードã®æœ€å¤§æ•°ã€‚ゼロや負ã®å€¤ã¯åˆ¶é™ãªã—ã‚’æ„味ã—ã¾ã™ | + +### ロードãƒãƒ©ãƒ³ã‚·ãƒ³ã‚° + +Javaクライアントã¯ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ãƒãƒªã‚·ãƒ¼ã«å¾“ã£ã¦ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã™ã‚‹ClickHouseノードをé¸æŠžã—ã¾ã™ã€‚一般ã«ã€ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ãƒãƒªã‚·ãƒ¼ã¯ä»¥ä¸‹ã®ã“ã¨ã‚’担当ã—ã¾ã™: + +1. 管ç†ã•ã‚Œã¦ã„るノードリストã‹ã‚‰ãƒŽãƒ¼ãƒ‰ã‚’å–å¾—ã™ã‚‹ +2. ノードã®çŠ¶æ…‹ã‚’管ç†ã™ã‚‹ +3. (ã‚‚ã—自動検出ãŒæœ‰åŠ¹ã§ã‚ã‚Œã°)ノード検出ã®ãŸã‚ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセスをオプションã§ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã—ã€ãƒ˜ãƒ«ã‚¹ãƒã‚§ãƒƒã‚¯ã‚’実行ã™ã‚‹ + +ロードãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ã®è¨­å®šã«é–¢ã™ã‚‹ã‚ªãƒ—ション一覧ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +| プロパティ | デフォルト | 説明 | +|--------------------------|-------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| load_balancing_policy | `""` | ロードãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ãƒãƒªã‚·ãƒ¼ã¨ã—ã¦åˆ©ç”¨ã§ãã‚‹ã®ã¯:
  • `firstAlive` - 管ç†ãƒŽãƒ¼ãƒ‰ãƒªã‚¹ãƒˆã‹ã‚‰æœ€åˆã®æ­£å¸¸ãªãƒŽãƒ¼ãƒ‰ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒé€ã‚‰ã‚Œã¾ã™
  • `random` - 管ç†ãƒŽãƒ¼ãƒ‰ãƒªã‚¹ãƒˆã‹ã‚‰ãƒ©ãƒ³ãƒ€ãƒ ã«é¸ã°ã‚ŒãŸãƒŽãƒ¼ãƒ‰ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒé€ã‚‰ã‚Œã¾ã™
  • `roundRobin` - 管ç†ãƒŽãƒ¼ãƒ‰ãƒªã‚¹ãƒˆã®å„ノードã«é †ç•ªã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒé€ã‚‰ã‚Œã¾ã™
  • `ClickHouseLoadBalancingPolicy`を実装ã—ãŸå®Œå…¨ä¿®é£¾ã‚¯ãƒ©ã‚¹å - カスタムロードãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ãƒãƒªã‚·ãƒ¼
  • 指定ãŒãªã‘ã‚Œã°ã€ç®¡ç†ãƒŽãƒ¼ãƒ‰ãƒªã‚¹ãƒˆã®æœ€åˆã®ãƒŽãƒ¼ãƒ‰ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒé€ã‚‰ã‚Œã¾ã™ | +| load_balancing_tags | `""` | ノードをフィルタリングã™ã‚‹ãŸã‚ã®ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ã‚¿ã‚°ã€‚指定ã•ã‚ŒãŸã‚¿ã‚°ã‚’æŒã¤ãƒŽãƒ¼ãƒ‰ã«ã®ã¿ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒé€ã‚‰ã‚Œã¾ã™ | +| health_check_interval | `0` | ヘルスãƒã‚§ãƒƒã‚¯ã®é–“隔をミリ秒ã§æŒ‡å®šã—ã€ã‚¼ãƒ­ã‚„è² ã®å€¤ã¯ä¸€å›žé™ã‚Šã‚’æ„味ã—ã¾ã™ | +| health_check_method | `ClickHouseHealthCheckMethod.SELECT_ONE` | ヘルスãƒã‚§ãƒƒã‚¯ã®æ–¹æ³•ã€‚以下ã®ã†ã¡ä¸€ã¤:
  • `ClickHouseHealthCheckMethod.SELECT_ONE` - `select 1`クエリã§ã®ãƒã‚§ãƒƒã‚¯
  • `ClickHouseHealthCheckMethod.PING` - 一般ã«ã‚ˆã‚Šé«˜é€Ÿãªãƒ—ロトコル固有ã®ãƒã‚§ãƒƒã‚¯
  • | +| node_check_interval | `0` | ノードãƒã‚§ãƒƒã‚¯ã®é–“隔をミリ秒ã§æŒ‡å®šã—ã€è² ã®æ•°ã¯ã‚¼ãƒ­ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚特定ã®ãƒŽãƒ¼ãƒ‰ã®æœ€å¾Œã®ãƒã‚§ãƒƒã‚¯ã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸæ™‚é–“ãŒçµŒéŽã—ã¦ã„ã‚‹å ´åˆã«ãƒŽãƒ¼ãƒ‰ã®çŠ¶æ…‹ãŒãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚
    `health_check_interval`ã¨`node_check_interval`ã®é•ã„ã¯ã€`health_check_interval`ã¯ãƒŽãƒ¼ãƒ‰ã®ãƒªã‚¹ãƒˆï¼ˆã™ã¹ã¦ã‚‚ã—ãã¯èª¤ã£ã¦ã„ã‚‹ã‚‚ã®ã«å¯¾ã—ã¦ï¼‰ã®çŠ¶æ…‹ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¸ãƒ§ãƒ–をスケジュールã™ã‚‹ã‚ªãƒ—ションã§ã‚ã‚‹ã®ã«å¯¾ã—ã€`node_check_interval`ã¯ç‰¹å®šã®ãƒŽãƒ¼ãƒ‰ã®æœ€å¾Œã®ãƒã‚§ãƒƒã‚¯ã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸæ™‚é–“ãŒçµŒéŽã—ã¦ã„ã‚‹ã“ã¨ã‚’指定ã™ã‚‹ã‚ªãƒ—ションã§ã™ | +| check_all_nodes | `false` | ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã¨èª¤å‹•ä½œã—ã¦ã„るノードã®ã©ã¡ã‚‰ã«å¯¾ã—ã¦ãƒ˜ãƒ«ã‚¹ãƒã‚§ãƒƒã‚¯ã‚’実行ã™ã‚‹ã‹ã‚’指定ã—ã¾ã™ | + + +### フェイルオーãƒãƒ¼ã¨ãƒªãƒˆãƒ©ã‚¤ + +Javaクライアントã¯ã€å¤±æ•—ã—ãŸã‚¯ã‚¨ãƒªã«å¯¾ã™ã‚‹ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼ã¨ãƒªãƒˆãƒ©ã‚¤ã®å‹•ä½œã‚’セットアップã™ã‚‹ãŸã‚ã®è¨­å®šã‚ªãƒ—ションをæä¾›ã—ã¾ã™: + +| プロパティ | デフォルト | 説明 | +|-----------------------------|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| failover | `0` | リクエストã«å¯¾ã—ã¦ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼ãŒç™ºç”Ÿã§ãる最大回数。ゼロã¾ãŸã¯è² ã®å€¤ã¯ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼ãªã—ã‚’æ„味ã—ã¾ã™ã€‚フェイルオーãƒãƒ¼ã¯è² ã®å€¤ã‚’æ„味ã—ã€ç•°ãªã‚‹ãƒŽãƒ¼ãƒ‰ã«å¤±æ•—ã—ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã—ã¾ã™ã€‚ | +| retry | `0` | リクエストã«å¯¾ã—ã¦ãƒªãƒˆãƒ©ã‚¤ãŒç™ºç”Ÿã§ãる最大回数。ゼロã¾ãŸã¯è² ã®å€¤ã¯ãƒªãƒˆãƒ©ã‚¤ãªã—ã‚’æ„味ã—ã¾ã™ã€‚ClickHouseサーãƒãŒ`NETWORK_ERROR`エラーコードを返ã—ãŸå ´åˆã®ã¿ã€ãƒªãƒˆãƒ©ã‚¤ãŒè¡Œã‚ã‚Œã¾ã™ã€‚ | +| repeat_on_session_lock | `true` | セッションãŒãƒ­ãƒƒã‚¯ã•ã‚Œã¦ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã™ã‚‹å ´åˆ(`session_timeout` ã¾ãŸã¯ `connect_timeout` ã«å¾“ã†)ã®å®Ÿè¡Œã‚’ç¹°ã‚Šè¿”ã™ã‹ã©ã†ã‹ã‚’指定ã—ã¾ã™ã€‚ClickHouseサーãƒãŒ`SESSION_IS_LOCKED`エラーコードを返ã—ãŸå ´åˆã«ã€å¤±æ•—ã—ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒç¹°ã‚Šè¿”ã•ã‚Œã¾ã™ã€‚ | + +### カスタムHTTPヘッダーã®è¿½åŠ  + +Javaクライアントã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚«ã‚¹ã‚¿ãƒ HTTPヘッダーを追加ã™ã‚‹ãŸã‚ã®HTTP/Sトランスãƒãƒ¼ãƒˆãƒ¬ã‚¤ãƒ¤ãƒ¼ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +`custom_http_headers`プロパティを使用ã—ã€ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’`,`ã§åŒºåˆ‡ã£ã¦æŒ‡å®šã—ã¾ã™ã€‚ヘッダーキー/値ã¯`=`ã§åˆ†å‰²ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## Javaクライアントサãƒãƒ¼ãƒˆ + +```java +options.put("custom_http_headers", "X-ClickHouse-Quota=test, X-ClickHouse-Test=test"); +``` + +## JDBCドライãƒãƒ¼ + +```java +properties.setProperty("custom_http_headers", "X-ClickHouse-Quota=test, X-ClickHouse-Test=test"); +``` + + diff --git a/docs/ja/integrations/language-clients/java/client-v2.md b/docs/ja/integrations/language-clients/java/client-v2.md new file mode 100644 index 00000000000..4d9ae7af986 --- /dev/null +++ b/docs/ja/integrations/language-clients/java/client-v2.md @@ -0,0 +1,538 @@ +--- +sidebar_label: Client V2 +sidebar_position: 2 +keywords: [clickhouse, java, client, integrate] +description: Java ClickHouse Connector v2 +slug: /ja/integrations/java/client-v2 +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + +# Java クライアント (V2) + +DBサーãƒãƒ¼ã¨ãã®ãƒ—ロトコルを介ã—ã¦é€šä¿¡ã™ã‚‹ãŸã‚ã®Javaクライアントライブラリã§ã™ã€‚ç¾åœ¨ã®å®Ÿè£…ã¯[HTTPインターフェース](/docs/ja/interfaces/http)ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ©ã‚¤ãƒ–ラリã¯ã€ã‚µãƒ¼ãƒãƒ¼ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã™ã‚‹ãŸã‚ã®ç‹¬è‡ªã®APIã‚’æä¾›ã—ã¾ã™ã€‚ã¾ãŸã€ã•ã¾ã–ã¾ãªãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿å½¢å¼ï¼ˆRowBinary* & Native*)ã§ä½œæ¥­ã™ã‚‹ãŸã‚ã®ãƒ„ールもæä¾›ã—ã¾ã™ã€‚ + +## セットアップ + +- Maven Central (プロジェクトウェブページ): https://mvnrepository.com/artifact/com.clickhouse/client-v2 +- ナイトリービルド (リãƒã‚¸ãƒˆãƒªãƒªãƒ³ã‚¯): https://s01.oss.sonatype.org/content/repositories/snapshots/com/clickhouse/ + + + + +```xml + + com.clickhouse + client-v2 + 0.6.5 + +``` + + + + +```kotlin +// https://mvnrepository.com/artifact/com.clickhouse/client-v2 +implementation("com.clickhouse:client-v2:0.6.5") +``` + + + +```groovy +// https://mvnrepository.com/artifact/com.clickhouse/client-v2 +implementation 'com.clickhouse:client-v2:0.6.5' +``` + + + + +## åˆæœŸåŒ– + +`com.clickhouse.client.api.Client.Builder#build()`ã«ã‚ˆã£ã¦ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚ªãƒ–ジェクトãŒåˆæœŸåŒ–ã•ã‚Œã¾ã™ã€‚å„クライアントã¯ç‹¬è‡ªã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’æŒã¡ã€ã‚ªãƒ–ジェクト間ã§å…±æœ‰ã•ã‚Œã¾ã›ã‚“。ビルダーã«ã¯ä¾¿åˆ©ãªè¨­å®šã®ãŸã‚ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒç”¨æ„ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +例: +```java showLineNumbers + Client client = new Client.Builder() + .addEndpoint("https://clickhouse-cloud-instance:8443/") + .setUsername(user) + .setPassword(password) + .build(); +``` + +`Client`ã¯`AutoCloseable`ã§ã‚ã‚Šã€ä¸è¦ã«ãªã£ãŸã‚‰é–‰ã˜ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## 設定 + +ã™ã¹ã¦ã®è¨­å®šã¯ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ï¼ˆè¨­å®šãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—ã¦çŸ¥ã‚‰ã‚Œã‚‹ï¼‰ã«ã‚ˆã£ã¦å®šç¾©ã•ã‚Œã€ãã‚Œãžã‚Œã®å€¤ã®ã‚¹ã‚³ãƒ¼ãƒ—ã¨ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’明確ã«ã—ã¾ã™ã€‚ +主è¦ãªè¨­å®šãƒ‘ラメータã¯ä¸€ã¤ã®ã‚¹ã‚³ãƒ¼ãƒ—(クライアントã¾ãŸã¯æ“作)ã«å®šç¾©ã•ã‚Œã€äº’ã„ã«ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã•ã‚Œã¾ã›ã‚“。 + +設定ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆä½œæˆæ™‚ã«å®šç¾©ã•ã‚Œã¾ã™ã€‚`com.clickhouse.client.api.Client.Builder`ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 共通定義 + +### ClickHouseFormat + +[サãƒãƒ¼ãƒˆã•ã‚Œã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ](/docs/ja/interfaces/formats)ã®åˆ—挙ã§ã™ã€‚ClickHouseãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’å«ã¿ã¾ã™ã€‚ + +* `raw` - ユーザーã¯ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚’トランスコードã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ +* `full` - クライアントã¯ãƒ‡ãƒ¼ã‚¿ã‚’自分ã§ãƒˆãƒ©ãƒ³ã‚¹ã‚³ãƒ¼ãƒ‰ã§ãã€ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’å—ã‘入れã¾ã™ +* `-` - ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ClickHouseã§ã¯æ“作サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ + +ã“ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã‚‚ã®: + +| フォーマット | 入力 | 出力 | +|-----------------------------------------------------------------------------------------------------------------------------------|:------:|:------:| +| [TabSeparated](/docs/ja/interfaces/formats#tabseparated) | raw | raw | +| [TabSeparatedRaw](/docs/ja/interfaces/formats#tabseparatedraw) | raw | raw | +| [TabSeparatedWithNames](/docs/ja/interfaces/formats#tabseparatedwithnames) | raw | raw | +| [TabSeparatedWithNamesAndTypes](/docs/ja/interfaces/formats#tabseparatedwithnamesandtypes) | raw | raw | +| [TabSeparatedRawWithNames](/docs/ja/interfaces/formats#tabseparatedrawwithnames) | raw | raw | +| [TabSeparatedRawWithNamesAndTypes](/docs/ja/interfaces/formats#tabseparatedrawwithnamesandtypes) | raw | raw | +| [Template](/docs/ja/interfaces/formats#format-template) | raw | raw | +| [TemplateIgnoreSpaces](/docs/ja/interfaces/formats#templateignorespaces) | raw | - | +| [CSV](/docs/ja/interfaces/formats#csv) | raw | raw | +| [CSVWithNames](/docs/ja/interfaces/formats#csvwithnames) | raw | raw | +| [CSVWithNamesAndTypes](/docs/ja/interfaces/formats#csvwithnamesandtypes) | raw | raw | +| [CustomSeparated](/docs/ja/interfaces/formats#format-customseparated) | raw | raw | +| [CustomSeparatedWithNames](/docs/ja/interfaces/formats#customseparatedwithnames) | raw | raw | +| [CustomSeparatedWithNamesAndTypes](/docs/ja/interfaces/formats#customseparatedwithnamesandtypes) | raw | raw | +| [SQLInsert](/docs/ja/interfaces/formats#sqlinsert) | - | raw | +| [Values](/docs/ja/interfaces/formats#data-format-values) | raw | raw | +| [Vertical](/docs/ja/interfaces/formats#vertical) | - | raw | +| [JSON](/docs/ja/interfaces/formats#json) | raw | raw | +| [JSONAsString](/docs/ja/interfaces/formats#jsonasstring) | raw | - | +| [JSONAsObject](/docs/ja/interfaces/formats#jsonasobject) | raw | - | +| [JSONStrings](/docs/ja/interfaces/formats#jsonstrings) | raw | raw | +| [JSONColumns](/docs/ja/interfaces/formats#jsoncolumns) | raw | raw | +| [JSONColumnsWithMetadata](/docs/ja/interfaces/formats#jsoncolumnsmonoblock) | raw | raw | +| [JSONCompact](/docs/ja/interfaces/formats#jsoncompact) | raw | raw | +| [JSONCompactStrings](/docs/ja/interfaces/formats#jsoncompactstrings) | - | raw | +| [JSONCompactColumns](/docs/ja/interfaces/formats#jsoncompactcolumns) | raw | raw | +| [JSONEachRow](/docs/ja/interfaces/formats#jsoneachrow) | raw | raw | +| [PrettyJSONEachRow](/docs/ja/interfaces/formats#prettyjsoneachrow) | - | raw | +| [JSONEachRowWithProgress](/docs/ja/interfaces/formats#jsoneachrowwithprogress) | - | raw | +| [JSONStringsEachRow](/docs/ja/interfaces/formats#jsonstringseachrow) | raw | raw | +| [JSONStringsEachRowWithProgress](/docs/ja/interfaces/formats#jsonstringseachrowwithprogress) | - | raw | +| [JSONCompactEachRow](/docs/ja/interfaces/formats#jsoncompacteachrow) | raw | raw | +| [JSONCompactEachRowWithNames](/docs/ja/interfaces/formats#jsoncompacteachrowwithnames) | raw | raw | +| [JSONCompactEachRowWithNamesAndTypes](/docs/ja/interfaces/formats#jsoncompacteachrowwithnamesandtypes) | raw | raw | +| [JSONCompactStringsEachRow](/docs/ja/interfaces/formats#jsoncompactstringseachrow) | raw | raw | +| [JSONCompactStringsEachRowWithNames](/docs/ja/interfaces/formats#jsoncompactstringseachrowwithnames) | raw | raw | +| [JSONCompactStringsEachRowWithNamesAndTypes](/docs/ja/interfaces/formats#jsoncompactstringseachrowwithnamesandtypes) | raw | raw | +| [JSONObjectEachRow](/docs/ja/interfaces/formats#jsonobjecteachrow) | raw | raw | +| [BSONEachRow](/docs/ja/interfaces/formats#bsoneachrow) | raw | raw | +| [TSKV](/docs/ja/interfaces/formats#tskv) | raw | raw | +| [Pretty](/docs/ja/interfaces/formats#pretty) | - | raw | +| [PrettyNoEscapes](/docs/ja/interfaces/formats#prettynoescapes) | - | raw | +| [PrettyMonoBlock](/docs/ja/interfaces/formats#prettymonoblock) | - | raw | +| [PrettyNoEscapesMonoBlock](/docs/ja/interfaces/formats#prettynoescapesmonoblock) | - | raw | +| [PrettyCompact](/docs/ja/interfaces/formats#prettycompact) | - | raw | +| [PrettyCompactNoEscapes](/docs/ja/interfaces/formats#prettycompactnoescapes) | - | raw | +| [PrettyCompactMonoBlock](/docs/ja/interfaces/formats#prettycompactmonoblock) | - | raw | +| [PrettyCompactNoEscapesMonoBlock](/docs/ja/interfaces/formats#prettycompactnoescapesmonoblock) | - | raw | +| [PrettySpace](/docs/ja/interfaces/formats#prettyspace) | - | raw | +| [PrettySpaceNoEscapes](/docs/ja/interfaces/formats#prettyspacenoescapes) | - | raw | +| [PrettySpaceMonoBlock](/docs/ja/interfaces/formats#prettyspacemonoblock) | - | raw | +| [PrettySpaceNoEscapesMonoBlock](/docs/ja/interfaces/formats#prettyspacenoescapesmonoblock) | - | raw | +| [Prometheus](/docs/ja/interfaces/formats#prometheus) | - | raw | +| [Protobuf](/docs/ja/interfaces/formats#protobuf) | raw | raw | +| [ProtobufSingle](/docs/ja/interfaces/formats#protobufsingle) | raw | raw | +| [ProtobufList](/docs/ja/interfaces/formats#protobuflist) | raw | raw | +| [Avro](/docs/ja/interfaces/formats#data-format-avro) | raw | raw | +| [AvroConfluent](/docs/ja/interfaces/formats#data-format-avro-confluent) | raw | - | +| [Parquet](/docs/ja/interfaces/formats#data-format-parquet) | raw | raw | +| [ParquetMetadata](/docs/ja/interfaces/formats#data-format-parquet-metadata) | raw | - | +| [Arrow](/docs/ja/interfaces/formats#data-format-arrow) | raw | raw | +| [ArrowStream](/docs/ja/interfaces/formats#data-format-arrow-stream) | raw | raw | +| [ORC](/docs/ja/interfaces/formats#data-format-orc) | raw | raw | +| [One](/docs/ja/interfaces/formats#data-format-one) | raw | - | +| [Npy](/docs/ja/interfaces/formats#data-format-npy) | raw | raw | +| [RowBinary](/docs/ja/interfaces/formats#rowbinary) | full | full | +| [RowBinaryWithNames](/docs/ja/interfaces/formats#rowbinarywithnamesandtypes) | full | full | +| [RowBinaryWithNamesAndTypes](/docs/ja/interfaces/formats#rowbinarywithnamesandtypes) | full | full | +| [RowBinaryWithDefaults](/docs/ja/interfaces/formats#rowbinarywithdefaults) | full | - | +| [Native](/docs/ja/interfaces/formats#native) | full | raw | +| [Null](/docs/ja/interfaces/formats#null) | - | raw | +| [XML](/docs/ja/interfaces/formats#xml) | - | raw | +| [CapnProto](/docs/ja/interfaces/formats#capnproto) | raw | raw | +| [LineAsString](/docs/ja/interfaces/formats#lineasstring) | raw | raw | +| [Regexp](/docs/ja/interfaces/formats#data-format-regexp) | raw | - | +| [RawBLOB](/docs/ja/interfaces/formats#rawblob) | raw | raw | +| [MsgPack](/docs/ja/interfaces/formats#msgpack) | raw | raw | +| [MySQLDump](/docs/ja/interfaces/formats#mysqldump) | raw | - | +| [DWARF](/docs/ja/interfaces/formats#dwarf) | raw | - | +| [Markdown](/docs/ja/interfaces/formats#markdown) | - | raw | +| [Form](/docs/ja/interfaces/formats#form) | raw | - | + + +## データ挿入API + +### insert(String tableName, InputStream data, ClickHouseFormat format) + +指定ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒã‚¤ãƒˆã®`InputStream`ã¨ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘入れã¾ã™ã€‚`data`ãŒ`format`ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒæœŸå¾…ã•ã‚Œã¾ã™ã€‚ + +**ã‚·ã‚°ãƒãƒãƒ£** + +```java +CompletableFuture insert(String tableName, InputStream data, ClickHouseFormat format, InsertSettings settings) +CompletableFuture insert(String tableName, InputStream data, ClickHouseFormat format) +``` + +**パラメータ** + +`tableName` - 対象テーブルå。 + +`data` - エンコードã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®å…¥åŠ›ã‚¹ãƒˆãƒªãƒ¼ãƒ ã€‚ + +`format` - データãŒã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå½¢å¼ã€‚ + +`settings` - リクエスト設定。 + +**戻り値** + +`InsertResponse`åž‹ã®Future - æ“作çµæžœã¨ã‚µãƒ¼ãƒã‚µã‚¤ãƒ‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãªã©ã®è¿½åŠ æƒ…報。 + +**例** + +```java showLineNumbers +try (InputStream dataStream = getDataStream()) { + try (InsertResponse response = client.insert(TABLE_NAME, dataStream, ClickHouseFormat.JSONEachRow, + insertSettings).get(3, TimeUnit.SECONDS)) { + + log.info("Insert finished: {} rows written", response.getMetrics().getMetric(ServerMetrics.NUM_ROWS_WRITTEN).getLong()); + } catch (Exception e) { + log.error("Failed to write JSONEachRow data", e); + throw new RuntimeException(e); + } +} + +``` + +### insert(String tableName, List data, InsertSettings settings) + +データベースã«æ›¸ãè¾¼ã¿ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã—ã¾ã™ã€‚オブジェクトã®ãƒªã‚¹ãƒˆã¯åŠ¹çŽ‡çš„ãªå½¢å¼ã«å¤‰æ›ã•ã‚Œã€ãã®å¾Œã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚リストアイテムã®ã‚¯ãƒ©ã‚¹ã¯ã€äº‹å‰ã«`register(Class, TableSchema)`メソッドを使用ã—ã¦ç™»éŒ²ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**ã‚·ã‚°ãƒãƒãƒ£** +```java +client.insert(String tableName, List data, InsertSettings settings) +client.insert(String tableName, List data) +``` + +**パラメータ** + +`tableName` - 対象ã®ãƒ†ãƒ¼ãƒ–ルå。 + +`data` - DTO (Data Transfer Object) オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ + +`settings` - リクエスト設定。 + +**戻り値** + +`InsertResponse`åž‹ã®Future - æ“作çµæžœã¨ã‚µãƒ¼ãƒã‚µã‚¤ãƒ‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãªã©ã®è¿½åŠ æƒ…報。 + +**例** + +```java showLineNumbers +// é‡è¦ãªã‚¹ãƒ†ãƒƒãƒ—(1回ã ã‘実行):テーブルスキーマã«å¾“ã£ã¦ã‚ªãƒ–ジェクトシリアライザを事å‰ã‚³ãƒ³ãƒ‘イルã™ã‚‹ãŸã‚ã«ã‚¯ãƒ©ã‚¹ã‚’登録。 +client.register(ArticleViewEvent.class, client.getTableSchema(TABLE_NAME)); + + +List events = loadBatch(); + +try (InsertResponse response = client.insert(TABLE_NAME, events).get()) { + // 応答を処ç†ã—ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’サーブã—ãŸå¾Œã«é–‰ã˜ã‚‰ã‚Œã€æŽ¥ç¶šãŒè§£æ”¾ã•ã‚Œã¾ã™ã€‚ +} +``` + +### InsertSettings + +挿入æ“作ã®ãŸã‚ã®è¨­å®šã‚ªãƒ—ション。 + +**設定メソッド** + +
    +
    setQueryId(String queryId)
    +
    æ“作ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ã‚¯ã‚¨ãƒªIDを設定ã—ã¾ã™
    + +
    setDeduplicationToken(String token)
    +
    é‡è¤‡é™¤å¤–トークンを設定ã—ã¾ã™ã€‚ã“ã®ãƒˆãƒ¼ã‚¯ãƒ³ã¯ã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã€ã‚¯ã‚¨ãƒªã‚’識別ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚
    + +
    waitEndOfQuery(Boolean waitEndOfQuery)
    +
    クエリã®çµ‚了を待ã£ã¦ã‹ã‚‰å¿œç­”ã‚’é€ä¿¡ã™ã‚‹ã‚ˆã†ã‚µãƒ¼ãƒãƒ¼ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã—ã¾ã™ã€‚
    + +
    setInputStreamCopyBufferSize(int size)
    +
    コピー時ã®ãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚ºã€‚ユーザーæä¾›ã®å…¥åŠ›ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‹ã‚‰å‡ºåŠ›ã‚¹ãƒˆãƒªãƒ¼ãƒ ã¸ã®æ›¸ãè¾¼ã¿æ“作中ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒãƒƒãƒ•ã‚¡ã§ã™ã€‚
    +
    + +### InsertResponse + +挿入æ“作ã®çµæžœã‚’ä¿æŒã™ã‚‹å¿œç­”オブジェクトã§ã™ã€‚ã“ã®ã‚ªãƒ–ジェクトã¯ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰å¿œç­”ã‚’å—ã‘å–ã£ãŸå ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +:::note +ã“ã®ã‚ªãƒ–ジェクトã¯ã€å‰ã®å¿œç­”ã®ãƒ‡ãƒ¼ã‚¿ãŒã™ã¹ã¦èª­ã¿å–られるã¾ã§æŽ¥ç¶šãŒå†åˆ©ç”¨ã§ããªã„ãŸã‚ã€ã§ãã‚‹ã ã‘æ—©ãé–‰ã˜ã¦æŽ¥ç¶šã‚’解放ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +
    +
    OperationMetrics getMetrics()
    +
    æ“作メトリクスをå«ã‚€ã‚ªãƒ–ジェクトを返ã—ã¾ã™
    +
    String getQueryId()
    +
    アプリケーションã«ã‚ˆã£ã¦æ“作ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸã‚¯ã‚¨ãƒª ID(æ“作設定ã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚
    +
    + +## クエリAPI + +### query(String sqlQuery) + +`sqlQuery`ã‚’ãã®ã¾ã¾é€ä¿¡ã—ã¾ã™ã€‚応答フォーマットã¯ã‚¯ã‚¨ãƒªè¨­å®šã«ã‚ˆã£ã¦è¨­å®šã•ã‚Œã¾ã™ã€‚`QueryResponse`ã¯ã€å¯¾å¿œã™ã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ãƒªãƒ¼ãƒ€ãƒ¼ãŒæ¶ˆè²»ã™ã¹ã応答ストリームã¸ã®å‚照をä¿æŒã—ã¾ã™ã€‚ + +**ã‚·ã‚°ãƒãƒãƒ£** + +```java +CompletableFuture query(String sqlQuery, QuerySettings settings) +CompletableFuture query(String sqlQuery) +``` + +**パラメータ** + +`sqlQuery` - å˜ä¸€ã®SQLステートメント。クエリã¯ãã®ã¾ã¾ã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +`settings` - リクエスト設定。 + +**戻り値** + +`QueryResponse`åž‹ã®Future - çµæžœãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¨ã‚µãƒ¼ãƒã‚µã‚¤ãƒ‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãªã©ã®è¿½åŠ æƒ…報をå«ã¿ã¾ã™ã€‚データセットを消費ã—ãŸå¾Œã«å¿œç­”オブジェクトを閉ã˜ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** + +```java +final String sql = "select * from " + TABLE_NAME + " where title <> '' limit 10"; + +// デフォルトフォーマットã¯RowBinaryWithNamesAndTypesFormatReaderã§ã‚ã‚‹ãŸã‚ã€ãƒªãƒ¼ãƒ€ãƒ¼ã¯ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ æƒ…報をæŒã£ã¦ã„ã¾ã™ +try (QueryResponse response = client.query(sql).get(3, TimeUnit.SECONDS);) { + + // データã«ä¾¿åˆ©ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã®ãƒªãƒ¼ãƒ€ãƒ¼ã‚’ä½œæˆ + ClickHouseBinaryFormatReader reader = client.newBinaryFormatReader(response); + + while (reader.hasNext()) { + reader.next(); // ストリームã‹ã‚‰æ¬¡ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’読ã¿å–ã‚Šã€è§£æžã™ã‚‹ + + // 値をå–å¾— + double id = reader.getDouble("id"); + String title = reader.getString("title"); + String url = reader.getString("url"); + + // データをåŽé›† + } +} catch (Exception e) { + log.error("Failed to read data", e); +} + +// ビジãƒã‚¹ãƒ­ã‚¸ãƒƒã‚¯ã¯å¯èƒ½ãªé™ã‚Šæ—©ãHTTP接続を解放ã™ã‚‹ã‚ˆã†ã«ã€èª­å–りブロックã®å¤–ã«ç½®ã„ã¦ãã ã•ã„。 +``` + +### query(String sqlQuery, Map queryParams, QuerySettings settings) + +`sqlQuery`ã‚’ãã®ã¾ã¾é€ä¿¡ã—ã¾ã™ã€‚ã•ã‚‰ã«ã€ã‚¯ã‚¨ãƒªãƒ‘ラメータをé€ä¿¡ã—ã€ã‚µãƒ¼ãƒãƒ¼ãŒSQLå¼ã‚’コンパイルã§ãるよã†ã«ã—ã¾ã™ã€‚ + +**ã‚·ã‚°ãƒãƒãƒ£** +```java +CompletableFuture query(String sqlQuery, Map queryParams, QuerySettings settings) +``` + +**パラメータ** + +`sqlQuery` - `{}`ã‚’å«ã‚€SQLå¼ã€‚ + +`queryParams` - サーãƒãƒ¼ã§SQLå¼ã‚’完æˆã•ã›ã‚‹ãŸã‚ã®å¤‰æ•°ã®ãƒžãƒƒãƒ—。 + +`settings` - リクエスト設定。 + +**戻り値** + +`QueryResponse`åž‹ã®Future - çµæžœãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¨ã‚µãƒ¼ãƒã‚µã‚¤ãƒ‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãªã©ã®è¿½åŠ æƒ…報をå«ã¿ã¾ã™ã€‚データセットを消費ã—ãŸå¾Œã«å¿œç­”オブジェクトを閉ã˜ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** + +```java showLineNumbers + +// パラメータを定義。ãれらã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¨ä¸€ç·’ã«ã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ +Map queryParams = new HashMap<>(); +queryParams.put("param1", 2); + +try (QueryResponse queryResponse = + client.query("SELECT * FROM " + table + " WHERE col1 >= {param1:UInt32}", queryParams, new QuerySettings()).get()) { + + // データã«ä¾¿åˆ©ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã®ãƒªãƒ¼ãƒ€ãƒ¼ã‚’ä½œæˆ + ClickHouseBinaryFormatReader reader = client.newBinaryFormatReader(response); + + while (reader.hasNext()) { + reader.next(); // ストリームã‹ã‚‰æ¬¡ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’読ã¿å–ã‚Šã€è§£æžã™ã‚‹ + + // データを読ã¿å–ã‚‹ + } + +} catch (Exception e) { + log.error("Failed to read data", e); +} + +``` + +### queryAll(String sqlQuery) + +`RowBinaryWithNamesAndTypes`å½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’クエリã—ã¾ã™ã€‚çµæžœã‚’コレクションã¨ã—ã¦è¿”ã—ã¾ã™ã€‚読ã¿å–りパフォーマンスã¯ãƒªãƒ¼ãƒ€ãƒ¼ã¨åŒã˜ã§ã™ãŒã€å…¨ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’ä¿æŒã™ã‚‹ãŸã‚ã«ã¯ã‚ˆã‚Šå¤šãã®ãƒ¡ãƒ¢ãƒªãŒå¿…è¦ã§ã™ã€‚ + +**ã‚·ã‚°ãƒãƒãƒ£** +```java +List queryAll(String sqlQuery) +``` + +**パラメータ** + +`sqlQuery` - サーãƒãƒ¼ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹ãŸã‚ã®SQLå¼ã€‚ + +**戻り値** + +çµæžœãƒ‡ãƒ¼ã‚¿ã‚’行スタイルã§ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«`GenericRecord`オブジェクトã®ãƒªã‚¹ãƒˆã§è¡¨ç¾ã•ã‚ŒãŸå®Œå…¨ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +```java showLineNumbers +try { + log.info("テーブル全体を読ã¿å–ã‚Šã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã”ã¨ã«å‡¦ç†ä¸­"); + final String sql = "select * from " + TABLE_NAME + " where title <> ''"; + + // 完全ãªçµæžœã‚»ãƒƒãƒˆã‚’読ã¿å–ã‚Šã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã”ã¨ã«å‡¦ç† + client.queryAll(sql).forEach(row -> { + double id = row.getDouble("id"); + String title = row.getString("title"); + String url = row.getString("url"); + + log.info("id: {}, title: {}, url: {}", id, title, url); + }); +} catch (Exception e) { + log.error("Failed to read data", e); +} +``` + +### QuerySettings + +クエリæ“作ã®ãŸã‚ã®è¨­å®šã‚ªãƒ—ション。 + +**設定メソッド** + +
    +
    setQueryId(String queryId)
    +
    æ“作ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ã‚¯ã‚¨ãƒªIDを設定ã—ã¾ã™
    +
    setFormat(ClickHouseFormat format)
    +
    応答フォーマットを設定ã—ã¾ã™ã€‚完全ãªãƒªã‚¹ãƒˆã¯`RowBinaryWithNamesAndTypes`ã‚’å‚ç…§ã—ã¦ãã ã•ã„。
    +
    setMaxExecutionTime(Integer maxExecutionTime)
    +
    サーãƒãƒ¼ã§ã®æ“作実行時間を設定ã—ã¾ã™ã€‚読ã¿å–りタイムアウトã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。
    +
    waitEndOfQuery(Boolean waitEndOfQuery)
    +
    クエリã®çµ‚了を待ã£ã¦ã‹ã‚‰å¿œç­”ã‚’é€ä¿¡ã™ã‚‹ã‚ˆã†ã‚µãƒ¼ãƒãƒ¼ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã—ã¾ã™ã€‚
    +
    setUseServerTimeZone(Boolean useServerTimeZone)
    +
    サーãƒãƒ¼ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ï¼ˆã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè¨­å®šã‚’å‚照)ãŒã€æ“作ã®çµæžœã®æ—¥æ™‚型を解æžã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚デフォルト`false`
    +
    setUseTimeZone(String timeZone)
    +
    時間ã®å¤‰æ›ã®ãŸã‚ã«ã‚µãƒ¼ãƒãƒ¼ã«`timeZone`を使用ã™ã‚‹ã‚ˆã†è¦æ±‚ã—ã¾ã™ã€‚session_timezoneã‚’å‚ç…§ã—ã¦ãã ã•ã„。
    +
    + +### QueryResponse + +クエリ実行ã®çµæžœã‚’ä¿æŒã™ã‚‹å¿œç­”オブジェクトã§ã™ã€‚ã“ã®ã‚ªãƒ–ジェクトã¯ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã®å¿œç­”ã‚’å—ã‘å–ã£ãŸå ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +:::note +ã“ã®ã‚ªãƒ–ジェクトã¯ã€å‰ã®å¿œç­”ã®ãƒ‡ãƒ¼ã‚¿ãŒå®Œå…¨ã«èª­ã¿è¾¼ã¾ã‚Œã‚‹ã¾ã§æŽ¥ç¶šã‚’å†åˆ©ç”¨ã§ããªã„ãŸã‚ã€ã§ãã‚‹ã ã‘æ—©ãé–‰ã˜ã¦æŽ¥ç¶šã‚’解放ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +
    +
    ClickHouseFormat getFormat()
    +
    応答ã®ãƒ‡ãƒ¼ã‚¿ãŒã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ã„るフォーマットを返ã—ã¾ã™ã€‚
    +
    InputStream getInputStream()
    +
    指定ã•ã‚ŒãŸå½¢å¼ã§ã®éžåœ§ç¸®ãƒã‚¤ãƒˆã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’è¿”ã—ã¾ã™ã€‚
    +
    OperationMetrics getMetrics()
    +
    æ“作メトリクスをå«ã‚€ã‚ªãƒ–ジェクトを返ã—ã¾ã™
    +
    String getQueryId()
    +
    アプリケーションã«ã‚ˆã£ã¦æ“作ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸã‚¯ã‚¨ãƒª ID(æ“作設定ã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚
    +
    TimeZone getTimeZone()
    +
    応答ã§ã®Date/DateTime型を処ç†ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚
    +
    + +### 例 + +- [リãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client-v2)ã«ä¾‹ã‚³ãƒ¼ãƒ‰ãŒã‚ã‚Šã¾ã™ +- 見本ã®Spring Service [実装](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/demo-service) + +## 共通API + +### getTableSchema(String table) + +`table`ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’å–å¾—ã—ã¾ã™ã€‚ + +**ã‚·ã‚°ãƒãƒãƒ£** + +```java +TableSchema getTableSchema(String table) +TableSchema getTableSchema(String table, String database) +``` + +**パラメータ** + +`table` - スキーマデータをå–å¾—ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルå。 + +`database` - 対象ã®ãƒ†ãƒ¼ãƒ–ルãŒå®šç¾©ã•ã‚Œã¦ã„るデータベース。 + +**戻り値** + +テーブルカラムã®ãƒªã‚¹ãƒˆã‚’æŒã¤`TableSchema`オブジェクトを返ã—ã¾ã™ã€‚ + +### getTableSchemaFromQuery(String sql) + +SQLステートメントã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã‚’å–å¾—ã—ã¾ã™ã€‚ + +**ã‚·ã‚°ãƒãƒãƒ£** + +```java +TableSchema getTableSchemaFromQuery(String sql) +``` + +**パラメータ** + +`sql` - スキーマを返ã™ã¹ã"SELECT" SQLステートメント。 + +**戻り値** + +`sql`å¼ã«ä¸€è‡´ã™ã‚‹ã‚«ãƒ©ãƒ ã‚’æŒã¤`TableSchema`オブジェクトを返ã—ã¾ã™ã€‚ + +### TableSchema + +### register(Class clazz, TableSchema schema) + +Javaクラス用ã«æ›¸ãè¾¼ã¿/読ã¿è¾¼ã¿ãƒ‡ãƒ¼ã‚¿ã¨ã™ã‚‹SerDeレイヤーをコンパイルã—ã¾ã™ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ã‚²ãƒƒã‚¿ãƒ¼/セッターペアã¨å¯¾å¿œã™ã‚‹ã‚«ãƒ©ãƒ ã®ãŸã‚ã«ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¶ã¨ãƒ‡ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¶ã‚’作æˆã—ã¾ã™ã€‚ +カラムã®ä¸€è‡´ã¯ãƒ¡ã‚½ãƒƒãƒ‰åã‹ã‚‰ãã®åå‰ã‚’抽出ã™ã‚‹ã“ã¨ã§è¦‹ã¤ã‘られã¾ã™ã€‚例ãˆã°ã€`getFirstName`ã¯ã‚«ãƒ©ãƒ  `first_name`ã¾ãŸã¯`firstname`ã«å¯¾å¿œã—ã¾ã™ã€‚ + +**ã‚·ã‚°ãƒãƒãƒ£** + +```java +void register(Class clazz, TableSchema schema) +``` + +**パラメータ** + +`clazz` - データã®èª­ã¿æ›¸ãã«ä½¿ç”¨ã•ã‚Œã‚‹POJOを表ã™ã‚¯ãƒ©ã‚¹ã€‚ + +`schema` - POJOプロパティã¨ä¸€è‡´ã•ã›ã‚‹ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒ¼ãƒžã€‚ + +**例** + +```java showLineNumbers +client.register(ArticleViewEvent.class, client.getTableSchema(TABLE_NAME)); +``` + +## 使用例 + +完全ãªä¾‹ã®ã‚³ãƒ¼ãƒ‰ã¯ã€ `example` [フォルダ](https://github.com/ClickHouse/clickhouse-java/tree/main/examples)ã«ãƒªãƒã‚¸ãƒˆãƒªå†…ã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ï¼š + +- [client-v2](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client-v2) - 主ãªä¾‹ã®ã‚»ãƒƒãƒˆã€‚ +- [demo-service](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/demo-service) - Spring Bootアプリケーションã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã™ã‚‹æ–¹æ³•ã®ä¾‹ã€‚ +- [demo-kotlin-service](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/demo-kotlin-service) - Ktor (Kotlin) アプリケーションã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã™ã‚‹æ–¹æ³•ã®ä¾‹ã€‚ diff --git a/docs/ja/integrations/language-clients/java/index.md b/docs/ja/integrations/language-clients/java/index.md new file mode 100644 index 00000000000..d44b004fa6c --- /dev/null +++ b/docs/ja/integrations/language-clients/java/index.md @@ -0,0 +1,119 @@ +--- +sidebar_label: Java +sidebar_position: 1 +keywords: [clickhouse, java, jdbc, client, integrate, r2dbc] +description: Java ã‹ã‚‰ ClickHouse ã¸ã®æŽ¥ç¶šã‚ªãƒ—ション +slug: /ja/integrations/java +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + +# Java ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆæ¦‚è¦ + +- [Client-V2](./client-v2.md) +- [Client-V1 (旧版)](./client-v1.md) +- [JDBC ドライãƒãƒ¼](./jdbc-driver.md) +- [R2DBC ドライãƒãƒ¼](./r2dbc.md) + +## ClickHouse クライアント + +Java クライアントã¯ã€ClickHouse サーãƒãƒ¼ã¨ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯é€šä¿¡ã®è©³ç´°ã‚’抽象化ã™ã‚‹ç‹¬è‡ªã® API を実装ã™ã‚‹ãƒ©ã‚¤ãƒ–ラリã§ã™ã€‚ç¾åœ¨ã€HTTP インターフェースã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ©ã‚¤ãƒ–ラリã¯ã€æ§˜ã€…㪠ClickHouse フォーマットãŠã‚ˆã³é–¢é€£ã™ã‚‹æ©Ÿèƒ½ã‚’扱ã†ãŸã‚ã®ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã‚’æä¾›ã—ã¾ã™ã€‚ + +Java クライアント㯠2015 å¹´ã«é–‹ç™ºã•ã‚Œã¾ã—ãŸã€‚ãã®ã‚³ãƒ¼ãƒ‰ãƒ™ãƒ¼ã‚¹ã¯éžå¸¸ã«ç¶­æŒã—ã«ããã€API ã¯æ··ä¹±ã—ã€ã“れ以上最é©åŒ–ã™ã‚‹ã®ãŒé›£ã—ããªã‚Šã¾ã—ãŸã€‚ãã®ãŸã‚ã€2024 å¹´ã«æ–°ã—ã„コンãƒãƒ¼ãƒãƒ³ãƒˆ `client-v2` ã¸ã®ãƒªãƒ•ã‚¡ã‚¯ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã„ã¾ã—ãŸã€‚ã“ã‚Œã«ã¯ã€æ˜Žç¢ºãª APIã€ã‚ˆã‚Šè»½é‡ãªã‚³ãƒ¼ãƒ‰ãƒ™ãƒ¼ã‚¹ã€ãƒ‘フォーマンスã®å‘上ã€ã‚ˆã‚Šè‰¯ã„ ClickHouse フォーマットサãƒãƒ¼ãƒˆï¼ˆä¸»ã« RowBinary 㨠Native)ãŒå«ã¾ã‚Œã¾ã™ã€‚JDBC ã¯è¿‘ã„å°†æ¥ã“ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã™ã‚‹äºˆå®šã§ã™ã€‚ + +### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータタイプ + +|**データタイプ** |**Client V2 サãƒãƒ¼ãƒˆ**|**Client V1 サãƒãƒ¼ãƒˆ**| +|-----------------------|----------------------|----------------------| +|Int8 |✔ |✔ | +|Int16 |✔ |✔ | +|Int32 |✔ |✔ | +|Int64 |✔ |✔ | +|Int128 |✔ |✔ | +|Int256 |✔ |✔ | +|UInt8 |✔ |✔ | +|UInt16 |✔ |✔ | +|UInt32 |✔ |✔ | +|UInt64 |✔ |✔ | +|UInt128 |✔ |✔ | +|UInt256 |✔ |✔ | +|Float32 |✔ |✔ | +|Float64 |✔ |✔ | +|Decimal |✔ |✔ | +|Decimal32 |✔ |✔ | +|Decimal64 |✔ |✔ | +|Decimal128 |✔ |✔ | +|Decimal256 |✔ |✔ | +|Bool |✔ |✔ | +|String |✔ |✔ | +|FixedString |✔ |✔ | +|Nullable |✔ |✔ | +|Date |✔ |✔ | +|Date32 |✔ |✔ | +|DateTime |✔ |✔ | +|DateTime32 |✔ |✔ | +|DateTime64 |✔ |✔ | +|Interval |✗ |✗ | +|Enum |✔ |✔ | +|Enum8 |✔ |✔ | +|Enum16 |✔ |✔ | +|Array |✔ |✔ | +|Map |✔ |✔ | +|Nested |✔ |✔ | +|Tuple |✔ |✔ | +|UUID |✔ |✔ | +|IPv4 |✔ |✔ | +|IPv6 |✔ |✔ | +|Object |✗ |✔ | +|Point |✔ |✔ | +|Nothing |✔ |✔ | +|MultiPolygon |✔ |✔ | +|Ring |✔ |✔ | +|Polygon |✔ |✔ | +|SimpleAggregateFunction|✔ |✔ | +|AggregateFunction |✗ |✔ | + +[ClickHouse データタイプ](/docs/ja/sql-reference/data-types) + +:::note +- AggregatedFunction - :warning: `SELECT * FROM table ...` ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ +- Decimal - 一貫性ã®ãŸã‚ã« 21.9+ 㧠`SET output_format_decimal_trailing_zeros=1` を使用 +- Enum - 文字列ãŠã‚ˆã³æ•´æ•°ã®ä¸¡æ–¹ã¨ã—ã¦æ‰±ã†ã“ã¨ãŒã§ãã¾ã™ +- UInt64 - client-v1 ã§ã¯ `long` ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ +::: + +### 機能 + +クライアントã®æ©Ÿèƒ½ã®è¡¨: + +| å称 | Client V2 | Client V1 | コメント | +|----------------------------------------------|:---------:|:---------:|:---------:| +| Http 接続 |✔ |✔ | | +| Http 圧縮(LZ4) |✔ |✔ | | +| サーãƒãƒ¼å¿œç­”ã®åœ§ç¸® - LZ4 |✔ |✔ | | +| クライアントè¦æ±‚ã®åœ§ç¸® - LZ4 |✔ |✔ | | +| HTTPs |✔ |✔ | | +| クライアント SSL 証明書 (mTLS) |✔ |✔ | | +| Http プロキシ |✔ |✔ | | +| POJO シリアライズ・デシリアライズ |✔ |✗ | | +| コãƒã‚¯ã‚·ãƒ§ãƒ³ãƒ—ール |✔ |✔ | Apache HTTP クライアントを使用ã™ã‚‹å ´åˆ | +| åå‰ä»˜ãパラメータ |✔ |✔ | | +| 失敗時ã®ãƒªãƒˆãƒ©ã‚¤ |✔ |✔ | | +| フェイルオーãƒãƒ¼ |✗ |✔ | | +| ロードãƒãƒ©ãƒ³ã‚·ãƒ³ã‚° |✗ |✔ | | +| サーãƒãƒ¼è‡ªå‹•æ¤œå‡º |✗ |✔ | | +| ログコメント |✗ |✔ | | +| セッションロール |✗ |✔ | V2 ã§å°Žå…¥äºˆå®š | +| SSL クライアントèªè¨¼ |✗ |✔ | V2 ã§å°Žå…¥äºˆå®š | +| セッションタイムゾーン |✔ |✔ | | + +JDBC ドライãƒãƒ¼ã¯ã€åŸºç›¤ã¨ãªã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå®Ÿè£…ã¨åŒæ§˜ã®æ©Ÿèƒ½ã‚’継承ã—ã¾ã™ã€‚ä»–ã® JDBC ã®æ©Ÿèƒ½ã¯ãã® [ページ](/docs/ja/integrations/java/jdbc-driver#features) ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### 互æ›æ€§ + +- ã“ã®ãƒªãƒã‚¸ãƒˆãƒªå†…ã®ã™ã¹ã¦ã®ãƒ—ロジェクトã¯ã€ã™ã¹ã¦ã® [アクティブ㪠LTS ãƒãƒ¼ã‚¸ãƒ§ãƒ³](https://github.com/ClickHouse/ClickHouse/pulls?q=is%3Aopen+is%3Apr+label%3Arelease) ã® ClickHouse ã§ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +- [サãƒãƒ¼ãƒˆãƒãƒªã‚·ãƒ¼](https://github.com/ClickHouse/ClickHouse/blob/master/SECURITY.md#security-change-log-and-support) +- セキュリティ修正や新ãŸãªæ”¹å–„を逃ã•ãªã„よã†ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’継続的ã«ã‚¢ãƒƒãƒ—グレードã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ +- v2 API ã¸ã®ç§»è¡Œã§å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€[å•é¡Œã‚’作æˆ](https://github.com/ClickHouse/clickhouse-java/issues/new?assignees=&labels=v2-feedback&projects=&template=v2-feedback.md&title=) ã—ã¦ã„ãŸã ã‘ã‚Œã°å¯¾å¿œã—ã¾ã™ï¼ diff --git a/docs/ja/integrations/language-clients/java/jdbc-driver.md b/docs/ja/integrations/language-clients/java/jdbc-driver.md new file mode 100644 index 00000000000..03b1515784d --- /dev/null +++ b/docs/ja/integrations/language-clients/java/jdbc-driver.md @@ -0,0 +1,401 @@ +--- +sidebar_label: JDBC ドライãƒãƒ¼ +sidebar_position: 4 +keywords: [clickhouse, java, jdbc, ドライãƒãƒ¼, çµ±åˆ] +description: ClickHouse JDBC ドライãƒãƒ¼ +slug: /ja/integrations/java/jdbc-driver +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + + +# JDBC ドライãƒãƒ¼ + +`clickhouse-jdbc` ã¯æ¨™æº–ã® JDBC インターフェースを実装ã—ã¦ã„ã¾ã™ã€‚[clickhouse-client](/docs/ja/integrations/clickhouse-client-local.md) ã®ä¸Šã«æ§‹ç¯‰ã•ã‚Œã¦ãŠã‚Šã€ã‚«ã‚¹ã‚¿ãƒ ã‚¿ã‚¤ãƒ—マッピングã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚µãƒãƒ¼ãƒˆã€æ¨™æº–çš„ãªåŒæœŸ `UPDATE` ãŠã‚ˆã³ `DELETE` æ–‡ãªã©ã®è¿½åŠ æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¬ã‚¬ã‚·ãƒ¼ã‚¢ãƒ—リケーションやツールã§ã‚‚ç°¡å˜ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +:::note +最新㮠JDBC (0.6.5) ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ Client-V1 を使用ã—ã¦ã„ã¾ã™ +::: + +`clickhouse-jdbc` API ã¯åŒæœŸçš„ã§ã‚ã‚Šã€ä¸€èˆ¬ã«ã‚ˆã‚Šå¤§ããªã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ï¼ˆä¾‹ï¼šSQL パースã€ã‚¿ã‚¤ãƒ—マッピング/変æ›ãªã©ï¼‰ãŒã‚ã‚Šã¾ã™ã€‚パフォーマンスãŒé‡è¦ãªå ´åˆã‚„ã€ClickHouse ã¸ã®ã‚ˆã‚Šç›´æŽ¥çš„ãªã‚¢ã‚¯ã‚»ã‚¹ã‚’好む場åˆã¯ã€[clickhouse-client](/docs/ja/integrations/clickhouse-client-local.md) ã®ä½¿ç”¨ã‚’検討ã—ã¦ãã ã•ã„。 + +## 環境è¦ä»¶ + +- [OpenJDK](https://openjdk.java.net) ãƒãƒ¼ã‚¸ãƒ§ãƒ³ >= 8 + + +### セットアップ + + + + +```xml + + + com.clickhouse + clickhouse-jdbc + 0.6.5 + + all + +``` + + + + +```kotlin +// https://mvnrepository.com/artifact/com.clickhouse/clickhouse-jdbc +// ã™ã¹ã¦ã®ä¾å­˜é–¢ä¿‚ã‚’å«ã‚€ uber jar を使用ã—ã€ã‚ˆã‚Šå°ã•ã„ jar ã®ãŸã‚ã«åˆ†é¡žå­ã‚’ http ã«å¤‰æ›´ +implementation("com.clickhouse:clickhouse-jdbc:0.6.5:all") +``` + + + +```groovy +// https://mvnrepository.com/artifact/com.clickhouse/clickhouse-jdbc +// ã™ã¹ã¦ã®ä¾å­˜é–¢ä¿‚ã‚’å«ã‚€ uber jar を使用ã—ã€ã‚ˆã‚Šå°ã•ã„ jar ã®ãŸã‚ã«åˆ†é¡žå­ã‚’ http ã«å¤‰æ›´ +implementation 'com.clickhouse:clickhouse-jdbc:0.6.5:all' +``` + + + + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ `0.5.0` 以é™ã€Apache HTTP クライアントを使用ã—㦠Client ãŒãƒ‘ックã•ã‚Œã¦ã„ã¾ã™ã€‚パッケージã«å…±æœ‰ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒãªã„ãŸã‚ã€ä¾å­˜é–¢ä¿‚ã¨ã—ã¦ãƒ­ã‚¬ãƒ¼ã‚’追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + + + + +```xml + + + org.slf4j + slf4j-api + 2.0.16 + +``` + + + + +```kotlin +// https://mvnrepository.com/artifact/org.slf4j/slf4j-api +implementation("org.slf4j:slf4j-api:2.0.16") +``` + + + +```groovy +// https://mvnrepository.com/artifact/org.slf4j/slf4j-api +implementation 'org.slf4j:slf4j-api:2.0.16' +``` + + + + +## 設定 + +**ドライãƒãƒ¼ã‚¯ãƒ©ã‚¹**: `com.clickhouse.jdbc.ClickHouseDriver` + +**URL 構文**: `jdbc:(ch|clickhouse)[:]://endpoint1[,endpoint2,...][/][?param1=value1¶m2=value2][#tag1,tag2,...]`, 例: + +- `jdbc:ch://localhost` 㯠`jdbc:clickhouse:http://localhost:8123` ã¨åŒã˜ã§ã™ +- `jdbc:ch:https://localhost` 㯠`jdbc:clickhouse:http://localhost:8443?ssl=true&sslmode=STRICT` ã¨åŒã˜ã§ã™ +- `jdbc:ch:grpc://localhost` 㯠`jdbc:clickhouse:grpc://localhost:9100` ã¨åŒã˜ã§ã™ + +**接続プロパティ**: + +| プロパティ | デフォルト | 説明 | +| ------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| continueBatchOnError | `false` | エラーãŒç™ºç”Ÿã—ãŸã¨ãã«ãƒãƒƒãƒå‡¦ç†ã‚’続行ã™ã‚‹ã‹ã©ã†ã‹ | +| createDatabaseIfNotExist | `false` | データベースãŒå­˜åœ¨ã—ãªã„å ´åˆã«ä½œæˆã™ã‚‹ã‹ã©ã†ã‹ | +| custom_http_headers | | カンマ区切りã®ã‚«ã‚¹ã‚¿ãƒ  HTTP ヘッダーã€ä¾‹: `User-Agent=client1,X-Gateway-Id=123` | +| custom_http_params | | カンマ区切りã®ã‚«ã‚¹ã‚¿ãƒ  HTTP クエリパラメータã€ä¾‹: `extremes=0,max_result_rows=100` | +| nullAsDefault | `0` | `0` - null 値をãã®ã¾ã¾æ‰±ã„ã€null 値をéžnull カラムã«æŒ¿å…¥ã™ã‚‹éš›ã«ä¾‹å¤–を投ã’ã‚‹; `1` - null 値をãã®ã¾ã¾æ‰±ã„ã€æŒ¿å…¥æ™‚ã®null ãƒã‚§ãƒƒã‚¯ã‚’無効ã«ã™ã‚‹; `2` - クエリãŠã‚ˆã³æŒ¿å…¥ã®ä¸¡æ–¹ã§null を対応ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«ç½®ãæ›ãˆã‚‹ | +| jdbcCompliance | `true` | 標準ã®åŒæœŸUPDATE/DELETE ãŠã‚ˆã³ãƒ•ã‚§ã‚¤ã‚¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‹ã©ã†ã‹ | +| typeMappings | | ClickHouse データタイプ㨠Java クラスã¨ã®ãƒžãƒƒãƒ”ングをカスタマイズã—ã€[getColumnType()](https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSetMetaData.html#getColumnType-int-) ãŠã‚ˆã³ [getObject(Class)](https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html#getObject-java.lang.String-java.lang.Class-) ã®çµæžœã«å½±éŸ¿ã—ã¾ã™ã€‚例: `UInt128=java.lang.String,UInt256=java.lang.String` | +| wrapperObject | `false` | [getObject()](https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html#getObject-int-) ãŒArray /Tuple ã«å¯¾ã—㦠java.sql.Array / java.sql.Struct ã‚’è¿”ã™ã‹ã©ã†ã‹ | + +注: 詳細㯠[JDBC specific configuration](https://github.com/ClickHouse/clickhouse-java/blob/main/clickhouse-jdbc/src/main/java/com/clickhouse/jdbc/JdbcConfig.java) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータタイプ + +JDBC ドライãƒãƒ¼ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ©ã‚¤ãƒ–ラリã¨åŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +:::note +- AggregatedFunction - :warning: `SELECT * FROM table ...` ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ +- Decimal - 一貫性ã®ãŸã‚ã« 21.9+ 㧠`SET output_format_decimal_trailing_zeros=1` +- Enum - 文字列ã¨æ•´æ•°ã®ä¸¡æ–¹ã¨ã—ã¦æ‰±ã‚れるã“ã¨ãŒã§ãã¾ã™ +- UInt64 - `long` ã«ãƒžãƒƒãƒ—ã•ã‚Œã¾ã™ (client-v1 ã§ã¯) +::: + +## 接続を作æˆã™ã‚‹ + +```java +String url = "jdbc:ch://my-server/system"; // デフォルト㧠http プロトコルã¨ãƒãƒ¼ãƒˆ 8123 を使用 + +Properties properties = new Properties(); + +ClickHouseDataSource dataSource = new ClickHouseDataSource(url, properties); +try (Connection conn = dataSource.getConnection("default", "password"); + Statement stmt = conn.createStatement()) { +} +``` + +## シンプルãªã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆ + +```java showLineNumbers + +try (Connection conn = dataSource.getConnection(...); + Statement stmt = conn.createStatement()) { + ResultSet rs = stmt.executeQuery("select * from numbers(50000)"); + while(rs.next()) { + // ... + } +} +``` + +## 挿入 + +:::note +- `PreparedStatement` ã‚’ `Statement` ã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã—ã¦ãã ã•ã„ +::: + +使用ã¯ç°¡å˜ã§ã™ãŒã€å…¥åŠ›é–¢æ•°ï¼ˆä¸‹è¨˜å‚照)ã¨æ¯”較ã—ã¦ãƒ‘フォーマンスãŒé…ããªã‚Šã¾ã™: + +```java showLineNumbers +try (PreparedStatement ps = conn.prepareStatement("insert into mytable(* except (description))")) { + ps.setString(1, "test"); // id + ps.setObject(2, LocalDateTime.now()); // タイムスタンプ + ps.addBatch(); // パラメータã¯ãƒã‚¤ãƒŠãƒªå½¢å¼ã§ãƒãƒƒãƒ•ã‚¡ã•ã‚ŒãŸã‚¹ãƒˆãƒªãƒ¼ãƒ ã«å³åº§ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ + ... + ps.executeBatch(); // 手元ã®ã™ã¹ã¦ã‚’ストリームã—㦠ClickHouse ã«é€ä¿¡ã—ã¾ã™ +} +``` + +### 入力テーブル関数を使用 + +優れãŸãƒ‘フォーマンス特性をæŒã¤ã‚ªãƒ—ション: + +```java showLineNumbers +try (PreparedStatement ps = conn.prepareStatement( + "insert into mytable select col1, col2 from input('col1 String, col2 DateTime64(3), col3 Int32')")) { + // カラム定義ãŒè§£æžã•ã‚Œã€ãƒ‰ãƒ©ã‚¤ãƒãƒ¼ã¯ 3 ã¤ã®ãƒ‘ラメータãŒã‚ã‚‹ã“ã¨ã‚’知りã¾ã™: col1, col2 ãŠã‚ˆã³ col3 + ps.setString(1, "test"); // col1 + ps.setObject(2, LocalDateTime.now()); // col2, setTimestamp ã¯é…ã„ã®ã§æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“ + ps.setInt(3, 123); // col3 + ps.addBatch(); // パラメータã¯ãƒã‚¤ãƒŠãƒªå½¢å¼ã§ãƒãƒƒãƒ•ã‚¡ãƒ¼ã•ã‚ŒãŸã‚¹ãƒˆãƒªãƒ¼ãƒ ã«å³åº§ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ + ... + ps.executeBatch(); // 手元ã®ã™ã¹ã¦ã‚’ストリームã—㦠ClickHouse ã«é€ä¿¡ã—ã¾ã™ +} +``` +- å¯èƒ½ãªé™ã‚Š [入力関数ドキュメント](/ja/sql-reference/table-functions/input/) ã‚’å‚ç…§ã—ã¦ãã ã•ã„ + +### プレースホルダを使用ã—ãŸæŒ¿å…¥ + +ã“ã®ã‚ªãƒ—ションã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§è§£æžã•ã‚Œã‚‹é•·ã„ SQL å¼ãŒå¿…è¦ã«ãªã‚‹ãŸã‚ã€å°ã•ãªæŒ¿å…¥ã®å ´åˆã«ã®ã¿æŽ¨å¥¨ã•ã‚Œã¾ã™: + +```java showLineNumbers +try (PreparedStatement ps = conn.prepareStatement("insert into mytable values(trim(?),?,?)")) { + ps.setString(1, "test"); // id + ps.setObject(2, LocalDateTime.now()); // タイムスタンプ + ps.setString(3, null); // description + ps.addBatch(); // クエリã«ãƒ‘ラメータを追加 + ... + ps.executeBatch(); // 構æˆã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’発行: insert into mytable values(...)(...)...(...) +} +``` + +## DateTime ã¨ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã®å‡¦ç† + +`java.sql.Timestamp` ã§ã¯ãªã `java.time.LocalDateTime` ã¾ãŸã¯ `java.time.OffsetDateTime`ã€ãŠã‚ˆã³ `java.sql.Date` ã§ã¯ãªã `java.time.LocalDate` を使用ã—ã¦ãã ã•ã„。 + +```java showLineNumbers +try (PreparedStatement ps = conn.prepareStatement("select date_time from mytable where date_time > ?")) { + ps.setObject(2, LocalDateTime.now()); + ResultSet rs = ps.executeQuery(); + while(rs.next()) { + LocalDateTime dateTime = (LocalDateTime) rs.getObject(1); + } + ... +} +``` + +## `AggregateFunction` ã®å‡¦ç† + +:::note +ç¾æ™‚点ã§ã¯ã€`groupBitmap` ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +```java showLineNumbers +// 入力関数を使用ã—ãŸãƒãƒƒãƒæŒ¿å…¥ +try (ClickHouseConnection conn = newConnection(props); + Statement s = conn.createStatement(); + PreparedStatement stmt = conn.prepareStatement( + "insert into test_batch_input select id, name, value from input('id Int32, name Nullable(String), desc Nullable(String), value AggregateFunction(groupBitmap, UInt32)')")) { + s.execute("drop table if exists test_batch_input;" + + "create table test_batch_input(id Int32, name Nullable(String), value AggregateFunction(groupBitmap, UInt32))engine=Memory"); + Object[][] objs = new Object[][] { + new Object[] { 1, "a", "aaaaa", ClickHouseBitmap.wrap(1, 2, 3, 4, 5) }, + new Object[] { 2, "b", null, ClickHouseBitmap.wrap(6, 7, 8, 9, 10) }, + new Object[] { 3, null, "33333", ClickHouseBitmap.wrap(11, 12, 13) } + }; + for (Object[] v : objs) { + stmt.setInt(1, (int) v[0]); + stmt.setString(2, (String) v[1]); + stmt.setString(3, (String) v[2]); + stmt.setObject(4, v[3]); + stmt.addBatch(); + } + int[] results = stmt.executeBatch(); + ... +} + +// クエリパラメータã¨ã—㦠bitmap を使用 +try (PreparedStatement stmt = conn.prepareStatement( + "SELECT bitmapContains(my_bitmap, toUInt32(1)) as v1, bitmapContains(my_bitmap, toUInt32(2)) as v2 from {tt 'ext_table'}")) { + stmt.setObject(1, ClickHouseExternalTable.builder().name("ext_table") + .columns("my_bitmap AggregateFunction(groupBitmap,UInt32)").format(ClickHouseFormat.RowBinary) + .content(new ByteArrayInputStream(ClickHouseBitmap.wrap(1, 3, 5).toBytes())) + .asTempTable() + .build()); + ResultSet rs = stmt.executeQuery(); + Assert.assertTrue(rs.next()); + Assert.assertEquals(rs.getInt(1), 1); + Assert.assertEquals(rs.getInt(2), 0); + Assert.assertFalse(rs.next()); +} +``` + +
    + +## HTTP ライブラリã®è¨­å®š + +ClickHouse JDBC コãƒã‚¯ã‚¿ãƒ¼ã¯ã€[HttpClient](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.html)ã€[HttpURLConnection](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/HttpURLConnection.html)ã€[Apache HttpClient](https://hc.apache.org/httpcomponents-client-5.2.x/) ã®3ã¤ã® HTTP ライブラリをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +:::note +HttpClient 㯠JDK 11 以上ã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +JDBC ドライãƒãƒ¼ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ `HttpClient` を使用ã—ã¾ã™ã€‚ClickHouse JDBC コãƒã‚¯ã‚¿ãƒ¼ã§ä½¿ç”¨ã™ã‚‹ HTTP ライブラリを変更ã™ã‚‹ã«ã¯ã€æ¬¡ã®ãƒ—ロパティを設定ã—ã¾ã™ã€‚ + +```java +properties.setProperty("http_connection_provider", "APACHE_HTTP_CLIENT"); +``` + +対応ã™ã‚‹å€¤ã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯æ¬¡ã®é€šã‚Šã§ã™: + +| プロパティ値 | HTTP ライブラリ | +| ------------------- | ----------------- | +| HTTP_CLIENT | HTTPClient | +| HTTP_URL_CONNECTION | HttpURLConnection | +| APACHE_HTTP_CLIENT | Apache HttpClient | + +
    + +## SSL を使用ã—㦠ClickHouse ã«æŽ¥ç¶šã™ã‚‹ + +SSL を用ã„㦠ClickHouse ã«ã‚»ã‚­ãƒ¥ã‚¢ã« JDBC ã§æŽ¥ç¶šã™ã‚‹ã«ã¯ã€SSL パラメータをå«ã‚€ã‚ˆã†ã« JDBC プロパティを設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã€JDBC URL ã¾ãŸã¯ãƒ—ロパティオブジェクト㫠`sslmode` ã‚„ `sslrootcert` ãªã©ã® SSL プロパティを指定ã™ã‚‹ã“ã¨ã‚’å«ã¿ã¾ã™ã€‚ + +## SSL プロパティ + +| å称 | デフォルト値 | オプション値 | 説明 | +| ------------------ | ------------- | --------------- | ---------------------------------------------------------------------------- | +| ssl | false | true, false | 接続㧠SSL/TLS を有効ã«ã™ã‚‹ã‹ã©ã†ã‹ | +| sslmode | strict | strict, none | SSL/TLS 証明書を確èªã™ã‚‹ã‹ã©ã†ã‹ | +| sslrootcert | | | SSL/TLS ルート証明書ã®ãƒ‘ス | +| sslcert | | | SSL/TLS 証明書ã®ãƒ‘ス | +| sslkey | | | PKCS#8 フォーマット㮠RSA キー | +| key_store_type | | JKS, PKCS12 | キーストア/トラストストアファイルã®ã‚¿ã‚¤ãƒ—ã¾ãŸã¯ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’指定 | +| trust_store | | | トラストストアファイルã®ãƒ‘ス | +| key_store_password | | | キーストア設定ã§æŒ‡å®šã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã®ãƒ‘スワード | + +ã“れらã®ãƒ—ロパティã¯ã€Java アプリケーション㌠ClickHouse サーãƒãƒ¼ã¨æš—å·åŒ–ã•ã‚ŒãŸæŽ¥ç¶šã§é€šä¿¡ã—ã€ãƒ‡ãƒ¼ã‚¿è»¢é€ä¸­ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’強化ã—ã¾ã™ã€‚ + +```java showLineNumbers + String url = "jdbc:ch://your-server:8443/system"; + + Properties properties = new Properties(); + properties.setProperty("ssl", "true"); + properties.setProperty("sslmode", "strict"); // NONE ã¯ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã‚’信用ã—ã€STRICT ã¯ä¿¡é ¼ã§ãã‚‹ã‚‚ã®ã®ã¿ + properties.setProperty("sslrootcert", "/mine.crt"); + try (Connection con = DriverManager + .getConnection(url, properties)) { + + try (PreparedStatement stmt = con.prepareStatement( + + // ã“ã“ã«ã‚³ãƒ¼ãƒ‰ã‚’記述 + + } + } +``` + +## 大è¦æ¨¡æŒ¿å…¥æ™‚ã® JDBC タイムアウトã®è§£æ±º + +ClickHouse ã§å®Ÿè¡Œæ™‚é–“ã®é•·ã„大è¦æ¨¡æŒ¿å…¥ã‚’è¡Œã†å ´åˆã€ä»¥ä¸‹ã®ã‚ˆã†ãª JDBC タイムアウトエラーã«é­é‡ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™: + +```plaintext +Caused by: java.sql.SQLException: Read timed out, server myHostname [uri=https://hostname.aws.clickhouse.cloud:8443] +``` + +ã“れらã®ã‚¨ãƒ©ãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ãƒ—ロセスを妨ã’ã€ã‚·ã‚¹ãƒ†ãƒ ã®å®‰å®šæ€§ã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å•é¡Œã‚’解決ã™ã‚‹ã«ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã® OS ã®ã„ãã¤ã‹ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆè¨­å®šã‚’調整ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### Mac OS + +Mac OS ã§ã¯ã€æ¬¡ã®è¨­å®šã‚’調整ã—ã¦å•é¡Œã‚’解決ã§ãã¾ã™: + +- `net.inet.tcp.keepidle`: 60000 +- `net.inet.tcp.keepintvl`: 45000 +- `net.inet.tcp.keepinit`: 45000 +- `net.inet.tcp.keepcnt`: 8 +- `net.inet.tcp.always_keepalive`: 1 + +### Linux + +Linux ã§ã¯ã€åŒç­‰ã®è¨­å®šã ã‘ã§ã¯å•é¡ŒãŒè§£æ±ºã—ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ソケットã®ã‚­ãƒ¼ãƒ—アライブ設定を扱ã†æ–¹æ³•ãŒç•°ãªã‚‹ãŸã‚ã€è¿½åŠ ã®æ‰‹é †ãŒå¿…è¦ã§ã™ã€‚次ã®æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„: + +1. `/etc/sysctl.conf` や関連ã™ã‚‹è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§æ¬¡ã® Linux カーãƒãƒ«ãƒ‘ラメータを調整ã—ã¾ã™: + + - `net.inet.tcp.keepidle`: 60000 + - `net.inet.tcp.keepintvl`: 45000 + - `net.inet.tcp.keepinit`: 45000 + - `net.inet.tcp.keepcnt`: 8 + - `net.inet.tcp.always_keepalive`: 1 + - `net.ipv4.tcp_keepalive_intvl`: 75 + - `net.ipv4.tcp_keepalive_probes`: 9 + - `net.ipv4.tcp_keepalive_time`: 60 (デフォルトã®300秒ã‹ã‚‰ã“ã®å€¤ã‚’下ã’ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„) + +2. カーãƒãƒ«ãƒ‘ラメータを変更ã—ãŸå¾Œã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¦å¤‰æ›´ã‚’é©ç”¨ã—ã¾ã™: + + ```shell + sudo sysctl -p + ``` + +ã“れらã®è¨­å®šã‚’è¡Œã£ãŸå¾Œã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã‚½ã‚±ãƒƒãƒˆã®ã‚­ãƒ¼ãƒ—アライブオプションを有効ã«ã—ã¦ã„ã‚‹ã“ã¨ã‚’確èªã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: + +```java +properties.setProperty("socket_keepalive", "true"); +``` + +:::note +ç¾åœ¨ã€`clickhouse-java` ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ä»–ã® 2 ã¤ã® HTTP クライアントライブラリã§ã¯ã€ã‚½ã‚±ãƒƒãƒˆã‚ªãƒ—ションã®è¨­å®šãŒè¨±å¯ã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ã‚½ã‚±ãƒƒãƒˆã®ã‚­ãƒ¼ãƒ—アライブを設定ã™ã‚‹éš›ã¯ Apache HTTP クライアントライブラリを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚詳ã—ã㯠[HTTP ライブラリã®è¨­å®š](/docs/ja/integrations/java#configuring-http-library) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +ã¾ãŸã€JDBC URL ã«åŒç­‰ã®ãƒ‘ラメータを追加ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +JDBC ドライãƒãƒ¼ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚½ã‚±ãƒƒãƒˆãŠã‚ˆã³æŽ¥ç¶šã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¯ 30 秒ã§ã™ã€‚ã“ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚’大è¦æ¨¡ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥æ“作をサãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«æ‹¡å¤§ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`ClickHouseClient` 㧠`options` メソッドを使用ã—ã€`ClickHouseClientOption` ã«ã‚ˆã£ã¦å®šç¾©ã•ã‚ŒãŸ `SOCKET_TIMEOUT` ãŠã‚ˆã³ `CONNECTION_TIMEOUT` オプションã¨å…±ã«ä½¿ç”¨ã—ã¾ã™: + +```java showLineNumbers +final int MS_12H = 12 * 60 * 60 * 1000; // 12 時間(ミリ秒) +final String sql = "insert into table_a (c1, c2, c3) select c1, c2, c3 from table_b;"; + +try (ClickHouseClient client = ClickHouseClient.newInstance(ClickHouseProtocol.HTTP)) { + client.read(servers).write() + .option(ClickHouseClientOption.SOCKET_TIMEOUT, MS_12H) + .option(ClickHouseClientOption.CONNECTION_TIMEOUT, MS_12H) + .query(sql) + .executeAndWait(); +} +``` + diff --git a/docs/ja/integrations/language-clients/java/r2dbc.md b/docs/ja/integrations/language-clients/java/r2dbc.md new file mode 100644 index 00000000000..043ed26ab06 --- /dev/null +++ b/docs/ja/integrations/language-clients/java/r2dbc.md @@ -0,0 +1,77 @@ +--- +sidebar_label: R2DBC Driver +sidebar_position: 5 +keywords: [clickhouse, java, driver, integrate, r2dbc] +description: ClickHouse R2DBC Driver +slug: /ja/integrations/java/r2dbc +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + +## R2DBC ドライãƒãƒ¼ + +[R2DBC](https://r2dbc.io/) ã¯ã€ClickHouse å‘ã‘ã®éžåŒæœŸ Java クライアントã®ãƒ©ãƒƒãƒ‘ーã§ã™ã€‚ + +### 環境è¦ä»¶ + +- [OpenJDK](https://openjdk.java.net) ãƒãƒ¼ã‚¸ãƒ§ãƒ³ >= 8 + +### セットアップ + +```xml + + com.clickhouse + + clickhouse-r2dbc + 0.6.5 + + all + + + * + * + + + +``` + +### ClickHouse ã«æŽ¥ç¶š + +```java showLineNumbers +ConnectionFactory connectionFactory = ConnectionFactories + .get("r2dbc:clickhouse:http://{username}:{password}@{host}:{port}/{database}"); + + Mono.from(connectionFactory.create()) + .flatMapMany(connection -> connection +``` + +### クエリ + +```java showLineNumbers +connection + .createStatement("select domain, path, toDate(cdate) as d, count(1) as count from clickdb.clicks where domain = :domain group by domain, path, d") + .bind("domain", domain) + .execute() + .flatMap(result -> result + .map((row, rowMetadata) -> String.format("%s%s[%s]:%d", row.get("domain", String.class), + row.get("path", String.class), + row.get("d", LocalDate.class), + row.get("count", Long.class))) + ) + .doOnNext(System.out::println) + .subscribe(); +``` + +### インサート + +```java showLineNumbers +connection + .createStatement("insert into clickdb.clicks values (:domain, :path, :cdate, :count)") + .bind("domain", click.getDomain()) + .bind("path", click.getPath()) + .bind("cdate", LocalDateTime.now()) + .bind("count", 1) + .execute(); +``` diff --git a/docs/ja/integrations/language-clients/js.md b/docs/ja/integrations/language-clients/js.md new file mode 100644 index 00000000000..8d407a244d2 --- /dev/null +++ b/docs/ja/integrations/language-clients/js.md @@ -0,0 +1,1273 @@ +--- +sidebar_label: JavaScript +sidebar_position: 4 +keywords: [clickhouse, js, javascript, nodejs, web, browser, cloudflare, workers, client, connect, integrate] +slug: /ja/integrations/javascript +description: The official JS client for connecting to ClickHouse. +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# ClickHouse JS + +ClickHouseã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®å…¬å¼JSクライアントã§ã™ã€‚ +クライアントã¯TypeScriptã§æ›¸ã‹ã‚Œã¦ãŠã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®å…¬é–‹APIã«ã‚¿ã‚¤ãƒ”ングをæä¾›ã—ã¾ã™ã€‚ + +ä¾å­˜é–¢ä¿‚ゼロã§ã€æœ€å¤§é™ã®ãƒ‘フォーマンスを発æ®ã™ã‚‹ã‚ˆã†æœ€é©åŒ–ã•ã‚Œã¦ãŠã‚Šã€æ§˜ã€…ãªClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚„構æˆï¼ˆã‚ªãƒ³ãƒ—レミスã®ã‚·ãƒ³ã‚°ãƒ«ãƒŽãƒ¼ãƒ‰ã€ã‚ªãƒ³ãƒ—レミスクラスターã€ClickHouse Cloud)ã§ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ç•°ãªã‚‹ç’°å¢ƒã«å¯¾å¿œã™ã‚‹äºŒã¤ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒæä¾›ã•ã‚Œã¦ã„ã¾ã™ï¼š +- `@clickhouse/client` - Node.js専用 +- `@clickhouse/client-web` - ブラウザ(Chrome/Firefox)ã€Cloudflare workers対応 + +TypeScriptを使用ã™ã‚‹éš›ã¯ã€[インラインインãƒãƒ¼ãƒˆã¨ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆæ§‹æ–‡](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#type-modifiers-on-import-names)を有効ã«ã™ã‚‹ãŸã‚ã«ã€å°‘ãªãã¨ã‚‚[ãƒãƒ¼ã‚¸ãƒ§ãƒ³4.5](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html)ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +クライアントã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¯[ClickHouse-JS GitHubリãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/clickhouse-js)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +## 環境è¦ä»¶ï¼ˆNode.js) + +クライアントを実行ã™ã‚‹ãŸã‚ã«ã¯ã€Node.jsãŒç’°å¢ƒã§åˆ©ç”¨å¯èƒ½ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +クライアントã¯ã€ã™ã¹ã¦ã®[維æŒã•ã‚Œã¦ã„ã‚‹](https://github.com/nodejs/release#readme)Node.jsリリースã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +Node.jsã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒEnd-Of-Lifeã«è¿‘ã¥ã„ãŸå ´åˆã€ãã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚µãƒãƒ¼ãƒˆã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯å¤ããªã‚Šã€å®‰å…¨ã§ã¯ãªã„ã¨è€ƒãˆã‚‰ã‚Œã‚‹ãŸã‚ã§ã™ã€‚ + +ç¾åœ¨ã®Node.jsãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚µãƒãƒ¼ãƒˆ: + +| Node.js version | Supported? | +|-----------------|-------------| +| 22.x | ✔ | +| 20.x | ✔ | +| 18.x | ✔ | +| 16.x | Best effort | + +## 環境è¦ä»¶ï¼ˆWeb) + +クライアントã®Webãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€æœ€æ–°ã®Chrome/Firefoxブラウザã§å…¬å¼ã«ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ãŠã‚Šã€ãŸã¨ãˆã°React/Vue/AngularアプリケーションやCloudflare workersã«ä¾å­˜é–¢ä¿‚ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ + +## インストール + +最新ã®å®‰å®šç‰ˆNode.jsクライアントãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’インストールã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + +```sh +npm i @clickhouse/client +``` + +Web版ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ï¼š + +```sh +npm i @clickhouse/client-web +``` + +## ClickHouseã¨ã®äº’æ›æ€§ + +| Client version | ClickHouse | +|----------------|------------| +| 1.5.0 | 23.3+ | + +クライアントã¯ãŠãらãå¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã‚‚動作ã™ã‚‹ã§ã—ょã†ã€‚ãŸã ã—ã€ã“ã‚Œã¯ãƒ™ã‚¹ãƒˆã‚¨ãƒ•ã‚©ãƒ¼ãƒˆã®ã‚µãƒãƒ¼ãƒˆã§ã‚ã‚Šã€ä¿è¨¼ã¯ã§ãã¾ã›ã‚“。ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒ23.3よりもå¤ã„å ´åˆã€[ClickHouseã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒãƒªã‚·ãƒ¼](https://github.com/ClickHouse/ClickHouse/blob/master/SECURITY.md)ã‚’å‚ç…§ã—ã€ã‚¢ãƒƒãƒ—グレードを検討ã—ã¦ãã ã•ã„。 + +## 例 + +クライアントリãƒã‚¸ãƒˆãƒªå†…ã®[例](https://github.com/ClickHouse/clickhouse-js/blob/main/examples)ã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆä½¿ç”¨ã®æ§˜ã€…ãªã‚·ãƒŠãƒªã‚ªã‚’ã‚«ãƒãƒ¼ã™ã‚‹ã“ã¨ã‚’目指ã—ã¦ã„ã¾ã™ã€‚ + +概観ã¯[例ã®README](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/README.md#overview)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +例や以下ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ä¸æ˜Žãªç‚¹ã‚„ä¸è¶³ã—ã¦ã„る情報ãŒã‚ã‚Œã°ã€[ãŠå•ã„åˆã‚ã›](./js.md#contact-us)ãã ã•ã„。 + +# クライアントAPI + +特ã«æ˜Žç¤ºã•ã‚Œã¦ã„ãªã„é™ã‚Šã€ã»ã¨ã‚“ã©ã®ä¾‹ã¯Node.jsã¨Web版ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ä¸¡æ–¹ã«äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +#### クライアントインスタンスã®ä½œæˆ + +å¿…è¦ã«å¿œã˜ã¦å¤šãã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’`createClient`ファクトリã§ä½œæˆã§ãã¾ã™ã€‚ + +```ts +import { createClient } from '@clickhouse/client' // ã¾ãŸã¯ '@clickhouse/client-web' + +const client = createClient({ + /* configuration */ +}) +``` + +ESMモジュールãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„環境ã§ã¯ã€CJS構文を使ã†ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```ts +const { createClient } = require('@clickhouse/client'); + +const client = createClient({ + /* configuration */ +}) +``` + +クライアントインスタンスã¯ã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–時ã«[事å‰è¨­å®š](./js.md#configuration)ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### 設定 + +クライアントインスタンスを作æˆã™ã‚‹éš›ã€ä»¥ä¸‹ã®æŽ¥ç¶šè¨­å®šã‚’調整ã§ãã¾ã™ï¼š + +- **url?: string** - ClickHouseインスタンスURL。デフォルト値: `http://localhost:8123`。å‚考: [URL設定ドキュメント](./js.md#url-configuration)。 +- **pathname?: string** - ClickHouse URLã«è¿½åŠ ã™ã‚‹ã‚ªãƒ—ションã®ãƒ‘スå。デフォルト値: `''`。å‚考: [パスå付ãプロキシドキュメント](./js.md#proxy-with-a-pathname)。 +- **request_timeout?: number** - リクエストタイムアウト(ミリ秒)。デフォルト値: `30_000`。 +- **compression?: { response?: boolean; request?: boolean }** - 圧縮を有効ã«ã™ã‚‹ã€‚[圧縮ドキュメント](./js.md#compression) +- **username?: string** - リクエストを行ã†ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®åå‰ã€‚デフォルト値: `default`。 +- **password?: string** - ユーザーパスワード。デフォルト: `''`。 +- **application?: string** - Node.jsクライアントを使用ã™ã‚‹ã‚¢ãƒ—リケーションã®åå‰ã€‚デフォルト値: `clickhouse-js`。 +- **database?: string** - 使用ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å。デフォルト値: `default` +- **clickhouse_settings?: ClickHouseSettings** - ã™ã¹ã¦ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«é©ç”¨ã•ã‚Œã‚‹ClickHouse設定。デフォルト値: `{}`。 +- **log?: { LoggerClass?: Logger, level?: ClickHouseLogLevel }** - 内部クライアントログã®è¨­å®šã€‚[ログドキュメント](./js.md#logging-nodejs-only) +- **session_id?: string** - å„リクエストã«é€ä¿¡ã•ã‚Œã‚‹ã‚ªãƒ—ションã®ClickHouseセッションID。 +- **keep_alive?: { enabled?: boolean }** - Node.jsãŠã‚ˆã³Webãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã€‚ +- **http_headers?: Record** - ClickHouseリクエストã®ãŸã‚ã®è¿½åŠ ã®HTTPヘッダ。å‚考: [èªè¨¼ä»˜ãリãƒãƒ¼ã‚¹ãƒ—ロキシドキュメント](./js.md#reverse-proxy-with-authentication) + +#### Node.js特有ã®è¨­å®šãƒ‘ラメータ + +- **max_open_connections?: number** - ホストã”ã¨ã«è¨±å¯ã•ã‚Œã‚‹æœ€å¤§æŽ¥ç¶šã‚½ã‚±ãƒƒãƒˆæ•°ã€‚デフォルト値: `10`。 +- **tls?: { ca_cert: Buffer, cert?: Buffer, key?: Buffer }** - TLS証明書を設定ã™ã‚‹ã€‚[TLSドキュメント](./js.md#tls-certificates-nodejs-only) +- **keep_alive?: { enabled?: boolean, idle_socket_ttl?: number }** - [Keep Aliveドキュメント](./js.md#keep-alive-configuration-nodejs-only)å‚ç…§ +- **http_agent?: http.Agent | https.Agent** - (エクスペリメンタル) クライアント用ã®ã‚«ã‚¹ã‚¿ãƒ HTTPエージェント。[HTTPエージェントドキュメント](./js.md#custom-httphttps-agent-experimental-nodejs-only) +- **set_basic_auth_header?: boolean** - (エクスペリメンタル) ベーシックèªè¨¼è³‡æ ¼æƒ…å ±ã§`Authorization`ヘッダを設定ã™ã‚‹ã€‚デフォルト値: `true`。å‚考: [ã“ã®è¨­å®šã®HTTPエージェントドキュメントã§ã®ä½¿ç”¨æ³•](./js.md#custom-httphttps-agent-experimental-nodejs-only) + +### URLã®è¨­å®š + +:::important +URL設定ã¯å¸¸ã«ãƒãƒ¼ãƒ‰ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã•ã‚ŒãŸå€¤ã‚’上書ãã—ã€ãã®å ´åˆã«ã¯è­¦å‘ŠãŒãƒ­ã‚°ã«è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚ +::: + +クライアントインスタンスパラメータã®å¤šãã‚’URLã§è¨­å®šã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚URLã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯`http[s]://[username:password@]hostname:port[/database][?param1=value1¶m2=value2]`ã§ã™ã€‚ã»ã¨ã‚“ã©ã®å ´åˆã€ç‰¹å®šã®ãƒ‘ラメータã®åå‰ã¯ã€è¨­å®šã‚ªãƒ—ションインターフェース内ã®ãã®ãƒ‘スをå映ã—ã¦ã„ã¾ã™ãŒã€ã„ãã¤ã‹ã®ä¾‹å¤–ãŒã‚ã‚Šã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るパラメータã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +| Parameter | Type | +| ------------------------------------------- | ----------------------------------------------------------------- | +| `pathname` | ä»»æ„ã®æ–‡å­—列。 | +| `application_id` | ä»»æ„ã®æ–‡å­—列。 | +| `session_id` | ä»»æ„ã®æ–‡å­—列。 | +| `request_timeout` | 0以上ã®æ•°å€¤ã€‚ | +| `max_open_connections` | 0より大ãã„0以上ã®æ•°å€¤ã€‚ | +| `compression_request` | boolean。 詳細ã¯ä¸‹è¨˜å‚ç…§ [1]。 | +| `compression_response` | boolean。 | +| `log_level` | 許å¯ã•ã‚Œã‚‹å€¤: `OFF`, `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`。 | +| `keep_alive_enabled` | boolean。 | +| `clickhouse_setting_*` ã‚„ `ch_*` | 以下å‚ç…§ [2]。 | +| `http_header_*` | 以下å‚ç…§ [3]。 | +| (Node.jsã®ã¿) `keep_alive_idle_socket_ttl` | 0以上ã®æ•°å€¤ã€‚ | + +[1] boolean ã®å ´åˆã€æœ‰åŠ¹ãªå€¤ã¯ `true`/`1` ãŠã‚ˆã³ `false`/`0` ã«ãªã‚Šã¾ã™ã€‚ + +[2] `clickhouse_setting_` ã¾ãŸã¯ `ch_` ã§å§‹ã¾ã‚‹ãƒ‘ラメータã¯ã€ã“ã®æŽ¥é ­è¾žãŒå‰Šé™¤ã•ã‚Œã€æ®‹ã‚ŠãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã® `clickhouse_settings` ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€ `?ch_async_insert=1&ch_wait_for_async_insert=1` ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +```ts +createClient({ + clickhouse_settings: { + async_insert: 1, + wait_for_async_insert: 1, + }, +}) +``` + +注æ„: `clickhouse_settings` ã«å¯¾ã™ã‚‹boolean 値ã¯URL内㧠`1`/`0` ã¨ã—ã¦æ¸¡ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ + +[3] [2]ã¨åŒæ§˜ã§ã™ãŒã€ `http_header` 設定用ã§ã™ã€‚ãŸã¨ãˆã°ã€ `?http_header_x-clickhouse-auth=foobar` ã¯æ¬¡ã®ã‚ˆã†ã«ç­‰ä¾¡ã§ã™ï¼š + +```ts +createClient({ + http_headers: { + 'x-clickhouse-auth': 'foobar', + }, +}) +``` + +### 接続 + +#### 接続詳細をåŽé›† + + + +#### 接続概観 + +クライアントã¯HTTP(s)プロトコル経由ã§æŽ¥ç¶šã‚’実装ã—ã¦ã„ã¾ã™ã€‚RowBinaryã®ã‚µãƒãƒ¼ãƒˆã¯é€²è¡Œä¸­ã§ã™ã€‚[関連issue](https://github.com/ClickHouse/clickhouse-js/issues/216)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +以下ã®ä¾‹ã¯ã€ClickHouse Cloudã«å¯¾ã™ã‚‹æŽ¥ç¶šã‚’設定ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚`host`(プロトコルã¨ãƒãƒ¼ãƒˆã‚’å«ã‚€ï¼‰ã¨`password`ã®å€¤ãŒç’°å¢ƒå¤‰æ•°ã§æŒ‡å®šã•ã‚Œã€`default`ユーザーãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã¨ã—ã¾ã™ã€‚ + +**例:** 環境変数を使用ã—ã¦Node.jsクライアントインスタンスを作æˆã™ã‚‹ã€‚ + +```ts +import { createClient } from '@clickhouse/client' + +const client = createClient({ + host: process.env.CLICKHOUSE_HOST ?? 'http://localhost:8123', + username: process.env.CLICKHOUSE_USER ?? 'default', + password: process.env.CLICKHOUSE_PASSWORD ?? '', +}) +``` + +クライアントリãƒã‚¸ãƒˆãƒªã«ã¯ã€ç’°å¢ƒå¤‰æ•°ã‚’使用ã™ã‚‹è¤‡æ•°ã®ä¾‹ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ãŸã¨ãˆã°ã€[ClickHouse Cloudã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/create_table_cloud.ts)ã€[éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’使ã†](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/async_insert.ts)ãªã©ã€ä»–ã«ã‚‚多ãã®ä¾‹ãŒã‚ã‚Šã¾ã™ã€‚ + +#### コãƒã‚¯ã‚·ãƒ§ãƒ³ãƒ—ール(Node.jsã®ã¿ï¼‰ + +リクエストã”ã¨ã«æŽ¥ç¶šã‚’確立ã™ã‚‹ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ClickHouseã¸ã®æŽ¥ç¶šãƒ—ールを作æˆã—ã€Keep-Aliveメカニズムを利用ã—ã¦å†åˆ©ç”¨ã—ã¾ã™ã€‚デフォルトã§Keep-AliveãŒæœ‰åŠ¹ã§ã€æŽ¥ç¶šãƒ—ールã®ã‚µã‚¤ã‚ºã¯ `10` ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ãŒã€`max_open_connections` [設定オプション](./js.md#configuration)ã§å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ユーザー㌠`max_open_connections: 1` を設定ã—ãªã„é™ã‚Šã€ãƒ—ール内ã®åŒã˜æŽ¥ç¶šãŒå¾Œç¶šã®ã‚¯ã‚¨ãƒªã«ä½¿ç”¨ã•ã‚Œã‚‹ä¿è¨¼ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯ã¾ã‚Œã«ã—ã‹å¿…è¦ã¨ã•ã‚Œã¾ã›ã‚“ãŒã€ä¸€æ™‚çš„ãªãƒ†ãƒ¼ãƒ–ルを使用ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¨ã£ã¦å¿…è¦ãªå ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +ã¾ãŸã€[Keep-Alive設定](./js.md#keep-alive-configuration-nodejs-only)ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +### Query ID + +`query`や文をé€ä¿¡ã™ã‚‹ã™ã¹ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ï¼ˆ`command`ã€`exec`ã€`insert`ã€`select`)ã¯ã€çµæžœã«ãŠã„ã¦ãƒ¦ãƒ‹ãƒ¼ã‚¯ãª`query_id`ã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®è­˜åˆ¥å­ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã‚¯ã‚¨ãƒªã”ã¨ã«å‰²ã‚Šå½“ã¦ã€`system.query_log`ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ãŸã‚Šã€é•·æ™‚間実行ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã‚’キャンセルã™ã‚‹ãŸã‚ã«å½¹ç«‹ã¡ã¾ã™ï¼ˆ[例å‚ç…§](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/cancel_query.ts))。必è¦ã«å¿œã˜ã¦ã€`query_id`ã¯`command`/`query`/`exec`/`insert`メソッドã®ãƒ‘ラメータã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦ä¸Šæ›¸ãã§ãã¾ã™ã€‚ + +:::tip +ã‚‚ã—`query_id`パラメータを上書ãã™ã‚‹å ´åˆã€å„呼ã³å‡ºã—ã«å¯¾ã—ã¦ãã®ãƒ¦ãƒ‹ãƒ¼ã‚¯æ€§ã‚’ä¿è¨¼ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ランダムãªUUIDãŒãŠã™ã™ã‚ã§ã™ã€‚ +::: + +### ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã®åŸºæœ¬ãƒ‘ラメータ + +ã„ãã¤ã‹ã®ãƒ‘ラメータã¯ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ï¼ˆ[query](./js.md#query-method)/[command](./js.md#command-method)/[insert](./js.md#insert-method)/[exec](./js.md#exec-method))ã«é©ç”¨ã§ãã¾ã™ã€‚ + +```ts +interface BaseQueryParams { + // Queryレベルã§é©ç”¨ã§ãã‚‹ClickHouse設定。 + clickhouse_settings?: ClickHouseSettings + // クエリãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ç”¨ã®ãƒ‘ラメータ。 + query_params?: Record + // 進行中ã®ã‚¯ã‚¨ãƒªã‚’キャンセルã™ã‚‹ãŸã‚ã®AbortSignalインスタンス。 + abort_signal?: AbortSignal + // query_idã®ä¸Šæ›¸ã;指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ©ãƒ³ãƒ€ãƒ ãªè­˜åˆ¥å­ãŒè‡ªå‹•çš„ã«ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + query_id?: string + // session_idã®ä¸Šæ›¸ã;指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè¨­å®šã‹ã‚‰ã‚»ãƒƒã‚·ãƒ§ãƒ³IDãŒå–å¾—ã•ã‚Œã¾ã™ã€‚ + session_id?: string + // èªè¨¼æƒ…å ±ã®ä¸Šæ›¸ã;指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®èªè¨¼æƒ…å ±ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + auth?: { username: string, password: string } +} +``` + +### クエリメソッド + +`SELECT`ã®ã‚ˆã†ãªå¿œç­”ã‚’æŒã¤å¤§éƒ¨åˆ†ã®æ–‡ã€ã¾ãŸã¯`CREATE TABLE`ã®ã‚ˆã†ãªDDLã‚’é€ä¿¡ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã‚¢ãƒ—リケーション内ã§æ¶ˆè²»ã•ã‚Œã‚‹ã“ã¨ã‚’æ„図ã—ãŸæˆ»ã‚Šçµæžœã‚»ãƒƒãƒˆã‚’ä¼´ã„ã¾ã™ã€‚ + +:::note +データ挿入ã«ã¯å°‚用ã®[insert](./js.md#insert-method)メソッドãŒã‚ã‚Šã€DDL用ã«ã¯[command](./js.md#command-method)ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +```ts +interface QueryParams extends BaseQueryParams { + // 実行ã™ã‚‹ã‚¯ã‚¨ãƒªã§ã€ä½•ã‚‰ã‹ã®ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + query: string + // çµæžœãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚デフォルト: JSON。 + format?: DataFormat +} + +interface ClickHouseClient { + query(params: QueryParams): Promise +} +``` + +「ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã®åŸºæœ¬ãƒ‘ラメータã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。(./js.md#base-parameters-for-all-client-methods)。 + +:::tip +クエリ内ã«FORMATå¥ã‚’指定ã›ãšã€`format`パラメータを使用ã—ã¦ãã ã•ã„。 +::: + +#### ResultSetã¨Rowã®æŠ½è±¡åŒ– + +ResultSetã¯ã‚¢ãƒ—リケーションã§ã®ãƒ‡ãƒ¼ã‚¿å‡¦ç†ã«ä¾¿åˆ©ãªãƒ¡ã‚½ãƒƒãƒ‰ã‚’ã„ãã¤ã‹æä¾›ã—ã¾ã™ã€‚ + +Node.jsã®ResultSet実装ã¯å†…部ã§`Stream.Readable`を使用ã—ã€Web版ã¯Web APIã®`ReadableStream`を使用ã—ã¾ã™ã€‚ + +ResultSetを消費ã™ã‚‹ã«ã¯ã€`text`ã¾ãŸã¯`json`メソッドを呼ã³å‡ºã—ã¦ã‚¯ã‚¨ãƒªãŒè¿”ã™ã™ã¹ã¦ã®è¡Œã‚’メモリã«ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ + +åŒæ™‚ã«ã€å¤šã™ãŽã¦ä¸€åº¦ã«ãƒ¡ãƒ¢ãƒªã«åŽã¾ã‚‰ãªã„å ´åˆã¯ã€`stream`メソッドを呼ã³å‡ºã—ã¦ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ¢ãƒ¼ãƒ‰ã§ãƒ‡ãƒ¼ã‚¿ã‚’処ç†å‡ºæ¥ã¾ã™ã€‚å—ã‘å–ã£ãŸå„応答ãƒãƒ£ãƒ³ã‚¯ã¯ã€ç‰¹å®šã®ãƒãƒ£ãƒ³ã‚¯ãŒã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã•ã‚Œã‚‹ã‚µã‚¤ã‚ºï¼ˆã“ã‚Œã«ã‚ˆã‚Šå€‹ã€…ã®è¡Œã®ã‚µã‚¤ã‚ºãŒæ±ºã¾ã‚‹ï¼‰ã¨åŒç¨‹åº¦ã®æ¯”較的å°ã•ãªé…列ã®è¡Œã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +ストリーミング時ã«æœ€é©ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’決ã‚ã‚‹ãŸã‚ã®[サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータフォーマット](./js.md#supported-data-formats)ã®ãƒªã‚¹ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。JSONオブジェクトをストリーミングã—ãŸã„å ´åˆã¯ã€[JSONEachRow](https://clickhouse.com/docs/ja/sql-reference/formats#jsoneachrow) ã‚’é¸æŠžã—ã€å„è¡ŒãŒJSオブジェクトã¨ã—ã¦ãƒ‘ースã•ã‚Œã¾ã™ã€‚ã‚ã‚‹ã„ã¯ã€ã‚ˆã‚Šã‚³ãƒ³ãƒ‘クトãª[JSONCompactColumns](https://clickhouse.com/docs/ja/sql-reference/formats#jsoncompactcolumns)フォーマットをé¸æŠžã—ã¦ã€å„行をコンパクトãªå€¤ã®é…列ã¨ã—ã¦å—ã‘å–ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚次ã«ã€[ファイルã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°](./js.md#streaming-files-nodejs-only)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +:::important +ResultSet ã¾ãŸã¯ãã®ã‚¹ãƒˆãƒªãƒ¼ãƒ ãŒå®Œå…¨ã«æ¶ˆè²»ã•ã‚Œãªã„å ´åˆã€`request_timeout` ã®éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–期間ã®å¾Œã€ç ´æ£„ã•ã‚Œã¾ã™ã€‚ +::: + +```ts +interface BaseResultSet { + // å‰è¿°ã® "Query ID" 部分をå‚ç…§ + query_id: string + + // ストリーム全体を消費ã—ã¦ãã®å†…容を文字列ã¨ã—ã¦å–å¾— + // ã©ã® DataFormat ã§ã‚‚使用å¯èƒ½ + // 1回ã ã‘呼ã³å‡ºã— + text(): Promise + + // ストリーム全体を消費ã—ã€JSオブジェクトã¨ã—ã¦å†…å®¹ã‚’è§£æž + // JSON フォーマットã®ã¿ã§ä½¿ç”¨å¯èƒ½ + // 1回ã ã‘呼ã³å‡ºã— + json(): Promise + + // ストリーミングã§ãる応答用ã«ãƒªãƒ¼ãƒ€ãƒ–ルストリームを返㙠+ // ストリームã®å„å復処ç†ã§ã¯ã€é¸æŠžã—㟠DataFormat ã®Row[]ã®é…列をæä¾› + // 1回ã ã‘呼ã³å‡ºã— + stream(): Stream +} + +interface Row { + // è¡Œã®å†…容をプレーン文字列ã¨ã—ã¦å–å¾— + text: string + + // è¡Œã®å†…容をJSオブジェクトã¨ã—ã¦è§£æžã™ã‚‹ + json(): T +} +``` + +**例:** (Node.js/Web) `JSONEachRow`å½¢å¼ã®çµæžœãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’ä¼´ã†ã‚¯ã‚¨ãƒªã‚’実行ã—ã€ã‚¹ãƒˆãƒªãƒ¼ãƒ å…¨ä½“を消費ã—ã¦å†…容をJSオブジェクトã¨ã—ã¦è§£æžã—ã¾ã™ã€‚ +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/array_json_each_row.ts)。 + +```ts +const resultSet = await client.query({ + query: 'SELECT * FROM my_table', + format: 'JSONEachRow', +}) +const dataset = await resultSet.json() // JSONã®è§£æžã‚’é¿ã‘ã‚‹ãŸã‚ã«`row.text`を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ +``` + +**例:** (Node.jsã®ã¿) `on('data')` アプローãƒã‚’使用ã—㟠`JSONEachRow` フォーマットã«ã‚ˆã‚‹ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã‚¯ã‚¨ãƒªçµæžœã€‚ã“ã®æ–¹æ³•ã¯ `for await const` 構文ã¨äº¤æ›å¯èƒ½ã§ã™ã€‚ +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/node/select_streaming_json_each_row.ts)。 + +```ts +const rows = await client.query({ + query: 'SELECT number FROM system.numbers_mt LIMIT 5', + format: 'JSONEachRow', // ã¾ãŸã¯ã€JSONCompactEachRow, JSONStringsEachRow ãªã© +}) +const stream = rows.stream() +stream.on('data', (rows: Row[]) => { + rows.forEach((row: Row) => { + console.log(row.json()) // JSONã®è§£æžã‚’é¿ã‘ã‚‹ãŸã‚ã« `row.text`を使用 + }) +}) +await new Promise((resolve, reject) => { + stream.on('end', () => { + console.log('Completed!') + resolve(0) + }) + stream.on('error', reject) +}) +``` + +**例:** (Node.jsã®ã¿) `CSV`フォーマットã§ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã‚¯ã‚¨ãƒªçµæžœã‚’å–å¾—ã—ã€ãれを `on('data')` アプローãƒã‚’使用ã—ã¦ã‚¹ãƒˆãƒªãƒ¼ãƒ é€ã‚Šã™ã‚‹ã€‚ã“ã®æ–¹æ³•ã¯ `for await const` 構文ã¨äº¤æ›å¯èƒ½ã§ã™ã€‚ +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/node/select_streaming_text_line_by_line.ts) + +```ts +const resultSet = await client.query({ + query: 'SELECT number FROM system.numbers_mt LIMIT 5', + format: 'CSV', // ã¾ãŸã¯ã€TabSeparated, CustomSeparated ãªã© +}) +const stream = resultSet.stream() +stream.on('data', (rows: Row[]) => { + rows.forEach((row: Row) => { + console.log(row.text) + }) +}) +await new Promise((resolve, reject) => { + stream.on('end', () => { + console.log('Completed!') + resolve(0) + }) + stream.on('error', reject) +}) +``` + +**例:** (Node.jsã®ã¿) `for await const` 構文を使用ã—ã¦å–å¾—ã—㟠`JSONEachRow` フォーマットã®JSオブジェクトã¨ã—ã¦ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã‚¯ã‚¨ãƒªçµæžœã€‚ ã“ã®æ–¹æ³•ã¯ `on('data')` アプローãƒã¨äº¤æ›å¯èƒ½ã§ã™ã€‚ +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/node/select_streaming_json_each_row_for_await.ts)。 + +```ts +const resultSet = await client.query({ + query: 'SELECT number FROM system.numbers LIMIT 10', + format: 'JSONEachRow', // ã¾ãŸã¯ã€JSONCompactEachRow, JSONStringsEachRow ãªã© +}) +for await (const rows of resultSet.stream()) { + rows.forEach(row => { + console.log(row.json()) + }) +} +``` + +:::note +`for await const` 構文ã¯ã€`on('data')` アプローãƒã«æ¯”ã¹ã¦ã‚³ãƒ¼ãƒ‰ãŒå°‘ãªã„ã§ã™ãŒã€ãƒ‘フォーマンスã«è² ã®å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚詳細ã¯[Node.jsリãƒã‚¸ãƒˆãƒªå†…ã®ã“ã®issue](https://github.com/nodejs/node/issues/31979)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**例:** (Webã®ã¿) `ReadableStream`ã§ã®ã‚ªãƒ–ジェクトã®å復処ç†ã€‚ + +```ts +const resultSet = await client.query({ + query: 'SELECT * FROM system.numbers LIMIT 10', + format: 'JSONEachRow' +}) + +const reader = resultSet.stream().getReader() +while (true) { + const { done, value: rows } = await reader.read() + if (done) { break } + rows.forEach(row => { + console.log(row.json()) + }) +} +``` + +### Insertメソッド + +ã“ã‚Œã¯ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ã®ä¸»è¦ãªæ–¹æ³•ã§ã™ã€‚ + +```ts +export interface InsertResult { + query_id: string + executed: boolean +} + +interface ClickHouseClient { + insert(params: InsertParams): Promise +} +``` + +戻り値ã®åž‹ã¯æœ€å°é™ã§ã‚ã‚Šã€ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã•ãªã„ã“ã¨ã‚’å‰æã¨ã—ã¦ãŠã‚Šã€å¿œç­”ストリームを直ã¡ã«ãƒ‰ãƒ¬ã‚¤ãƒ³ã—ã¾ã™ã€‚ + +空ã®é…列㌠Insert メソッドã«æä¾›ã•ã‚ŒãŸå ´åˆã€ã‚¤ãƒ³ã‚µãƒ¼ãƒˆæ–‡ã¯ã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã¾ã›ã‚“。代ã‚ã‚Šã«ã€`{ query_id: '...', executed: false }`ã§å³åº§ã«è§£æ±ºã•ã‚Œã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ¡ã‚½ãƒƒãƒ‰ãƒ‘ラメータ㧠`query_id` ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€çµæžœã¯ç©ºæ–‡å­—列ã«ãªã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¯ã‚¨ãƒªãƒ­ã‚°ãƒ†ãƒ¼ãƒ–ルã«ãã®ã‚ˆã†ãª`query_id`ã‚’æŒã¤ã‚¯ã‚¨ãƒªãŒå­˜åœ¨ã—ãªã„ãŸã‚ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒç”Ÿæˆã—ãŸãƒ©ãƒ³ãƒ€ãƒ UUIDãŒæ··ä¹±ã‚’æ‹›ãå¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ + +インサート文ãŒã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚ŒãŸå ´åˆã€`executed` フラグ㯠`true` ã«ãªã‚Šã¾ã™ã€‚ + +#### Insertメソッドã¨Node.jsã§ã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚° + +ã“ã‚Œã¯ã€æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¿œã˜ã¦ `Stream.Readable` ã¾ãŸã¯å˜ç´”㪠`Array` ã®ã„ãšã‚Œã‹ã§å‹•ä½œã—ã¾ã™ã€‚[サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータフォーマット](./js.md#supported-data-formats)ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã¯[ファイルストリーミング](./js.md#streaming-files-nodejs-only)ã«ã‚‚関連ã—ã¾ã™ã€‚ + +Insertメソッドã¯awaitã•ã‚Œã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ãŸã ã—ã€å…¥åŠ›ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’指定ã—ã€ã‚¹ãƒˆãƒªãƒ¼ãƒ ãŒå®Œäº†ã—ãŸå¾Œã«ã®ã¿`insert`æ“作をawaitã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ï¼ˆã“ã‚Œã«ã‚ˆã‚Š`insert`プロミスãŒè§£æ±ºã•ã‚Œã¾ã™ï¼‰ã€‚ã“ã‚Œã¯æ½œåœ¨çš„ã«ã‚¤ãƒ™ãƒ³ãƒˆãƒªã‚¹ãƒŠãƒ¼ã‚„é¡žä¼¼ã®ã‚·ãƒŠãƒªã‚ªã§æœ‰ç”¨ã§ã™ãŒã€ã‚¨ãƒ©ãƒ¼ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§å¤šãã®ã‚¨ãƒƒã‚¸ã‚±ãƒ¼ã‚¹ã«å¯¾å¿œã™ã‚‹ãŸã‚ç°¡å˜ã§ã¯ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ãれよりもã€ä¾‹ãˆã°ã“ã®[例](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/async_insert_without_waiting.ts)ã®ã‚ˆã†ã«[éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆ](https://clickhouse.com/docs/ja/optimize/asynchronous-inserts)を使用ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。 + +:::tip +カスタムã®INSERTステートメントをæŒã£ã¦ã„ã¦ã€ã“れをã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§ãƒ¢ãƒ‡ãƒ«åŒ–ã™ã‚‹ã®ãŒå›°é›£ãªå ´åˆã€[command](./js.md#command-method)を使用ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。[INSERT INTO ... VALUES](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/insert_values_and_functions.ts)ã‚„[INSERT INTO ... SELECT](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/insert_from_select.ts)ã§ã®ä½¿ç”¨æ–¹æ³•ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +```ts +interface InsertParams extends BaseQueryParams { + // データを挿入ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルå + table: string + // 挿入ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã€‚ + values: ReadonlyArray | Stream.Readable + // 挿入ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚ + format?: DataFormat + // データを挿入ã™ã‚‹ã‚«ãƒ©ãƒ ã‚’指定ã§ãã¾ã™ã€‚ + // - `['a', 'b']` ã®ã‚ˆã†ãªé…列ã¯: `INSERT INTO table (a, b) FORMAT DataFormat` ã‚’ç”Ÿæˆ + // - `{ except: ['a', 'b']}` ã®ã‚ˆã†ãªã‚ªãƒ–ジェクトã¯: `INSERT INTO table (* EXCEPT (a, b)) FORMAT DataFormat` ã‚’ç”Ÿæˆ + // デフォルトã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ†ãƒ¼ãƒ–ルã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + // 生æˆã•ã‚Œã‚‹æ–‡ã¯: `INSERT INTO table FORMAT DataFormat` ã¨ãªã‚Šã¾ã™ã€‚ + columns?: NonEmptyArray | { except: NonEmptyArray } +} +``` + +ã¾ãŸã€å‚ç…§: [ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã®åŸºæœ¬ãƒ‘ラメータ](./js.md#base-parameters-for-all-client-methods)。 + +:::important +`abort_signal` ã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’キャンセルã—ã¦ã‚‚ã€ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ãŒè¡Œã‚ã‚Œãªã‹ã£ãŸã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。サーãƒãƒ¼ã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«å‰ã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ä¸€éƒ¨ã‚’å—ä¿¡ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**例:** (Node.js/Web) é…列ã®å€¤ã‚’挿入ã™ã‚‹ã€‚ +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/array_json_each_row.ts)。 + +```ts +await client.insert({ + table: 'my_table', + // 構造ã¯æœ›ã‚€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ JSONEachRow + values: [ + { id: 42, name: 'foo' }, + { id: 42, name: 'bar' }, + ], + format: 'JSONEachRow', +}) +``` + +**例:** (Node.jsã®ã¿) CSVファイルã‹ã‚‰ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’挿入ã™ã‚‹ã€‚ +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/node/insert_file_stream_csv.ts)。次ã«å‚ç…§: [ファイルストリーミング](./js.md#streaming-files-nodejs-only)。 + +```ts +await client.insert({ + table: 'my_table', + values: fs.createReadStream('./path/to/a/file.csv'), + format: 'CSV', +}) +``` + +**例**: インサート文ã‹ã‚‰ç‰¹å®šã®ã‚«ãƒ©ãƒ ã‚’除外ã™ã‚‹ã€‚ + +テーブル定義を仮定ã—ã¦ï¼š + +```sql +CREATE OR REPLACE TABLE mytable +(id UInt32, message String) +ENGINE MergeTree() +ORDER BY (id) +``` + +特定ã®ã‚«ãƒ©ãƒ ã®ã¿ã‚’挿入ã—ã¾ã™ã€‚ + +```ts +// 生æˆã•ã‚ŒãŸæ–‡: INSERT INTO mytable (message) FORMAT JSONEachRow +await client.insert({ + table: 'mytable', + values: [{ message: 'foo' }], + format: 'JSONEachRow', + // ã“ã®è¡Œã®`id`カラム値ã¯ã‚¼ãƒ­ã«ãªã‚Šã¾ã™ï¼ˆUInt32ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ + columns: ['message'], +}) +``` + +特定ã®ã‚«ãƒ©ãƒ ã‚’除外: + +```ts +// 生æˆã•ã‚ŒãŸæ–‡: INSERT INTO mytable (* EXCEPT (message)) FORMAT JSONEachRow +await client.insert({ + table: tableName, + values: [{ id: 144 }], + format: 'JSONEachRow', + // ã“ã®è¡Œã®`message`カラム値ã¯ç©ºã®æ–‡å­—列ã«ãªã‚Šã¾ã™ + columns: { + except: ['message'], + }, +}) +``` + +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/insert_exclude_columns.ts) ã‚’å‚ç…§ã—ã¦è¿½åŠ ã®è©³ç´°ã‚’確èªã—ã¦ãã ã•ã„。 + +**例**: クライアントインスタンスã«æä¾›ã•ã‚ŒãŸã‚‚ã®ã¨ã¯ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŒ¿å…¥ã™ã‚‹ã€‚ +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/insert_into_different_db.ts)。 + +```ts +await client.insert({ + table: 'mydb.mytable', // データベースをå«ã‚€å®Œå…¨ãªåå‰ + values: [{ id: 42, message: 'foo' }], + format: 'JSONEachRow', +}) +``` + +#### Web版ã®åˆ¶é™äº‹é … + +ç¾åœ¨ã€`@clickhouse/client-web` ã§ã®æŒ¿å…¥ã¯ `Array` ãŠã‚ˆã³ `JSON*` フォーマットã§ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ +ストリームã®æŒ¿å…¥ã¯ã¾ã Web版ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ãƒ–ラウザã®äº’æ›æ€§ãŒä½Žã„ã§ã™ã€‚ + +ãã®çµæžœã€Web版ã®`InsertParams`インターフェースã¯Node.js版ã¨ã¯å°‘ã—ç•°ãªã‚Šã€ +`values`ã¯`ReadonlyArray`åž‹ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ï¼š + +```ts +interface InsertParams extends BaseQueryParams { + // データを挿入ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルå + table: string + // 挿入ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã€‚ + values: ReadonlyArray + // 挿入ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚ + format?: DataFormat + // データを挿入ã™ã‚‹ã‚«ãƒ©ãƒ ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + // - `['a', 'b']` ã®ã‚ˆã†ãªé…列ã¯: `INSERT INTO table (a, b) FORMAT DataFormat` を生æˆã—ã¾ã™ + // - `{ except: ['a', 'b']}` ã®ã‚ˆã†ãªã‚ªãƒ–ジェクトã¯: `INSERT INTO table (* EXCEPT (a, b)) FORMAT DataFormat` を生æˆã—ã¾ã™ + // デフォルトã§ã¯ã€ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—〠+ // 生æˆã•ã‚ŒãŸæ–‡ã¯: `INSERT INTO table FORMAT DataFormat` ã«ãªã‚Šã¾ã™ã€‚ + columns?: NonEmptyArray | { except: NonEmptyArray } +} +``` + +ã“ã‚Œã¯å°†æ¥çš„ã«å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚次もå‚ç…§ã—ã¦ãã ã•ã„: [ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã®åŸºæœ¬ãƒ‘ラメータ](./js.md#base-parameters-for-all-client-methods)。 + +### Commandメソッド + +Commandメソッドã¯ã€FORMATå¥ãŒé©ç”¨ã§ããªã„文やã€å¿œç­”を特ã«å¿…è¦ã¨ã—ãªã„状æ³ã§ä½¿ç”¨ã—ã¾ã™ã€‚ +例ã¨ã—ã¦ã¯ã€`CREATE TABLE` ã‚„ `ALTER TABLE` ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯awaitã™ã¹ãã§ã™ã€‚ + +応答ストリームã¯å³åº§ã«ç ´æ£„ã•ã‚Œã€ãã®çµæžœã€åŸºç›¤ã¨ãªã‚‹ã‚½ã‚±ãƒƒãƒˆã‚‚解放ã•ã‚Œã¾ã™ã€‚ + +```ts +interface CommandParams extends BaseQueryParams { + // 実行ã™ã‚‹æ–‡ã€‚ + query: string +} + +interface CommandResult { + query_id: string +} + +interface ClickHouseClient { + command(params: CommandParams): Promise +} +``` + +ã¾ãŸã€å‚ç…§: [ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã®åŸºæœ¬ãƒ‘ラメータ](./js.md#base-parameters-for-all-client-methods)。 + +**例:** (Node.js/Web) ClickHouse Cloudã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã€‚ +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/create_table_cloud.ts)。 + +```ts +await client.command({ + query: ` + CREATE TABLE IF NOT EXISTS my_cloud_table + (id UInt64, name String) + ORDER BY (id) + `, + // クラスター使用時ã«ã€HTTPヘッダーãŒæ—¢ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ã‚‰ã‚ŒãŸå¾Œã«ã‚¯ã‚¨ãƒªå‡¦ç†ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸçŠ¶æ³ã‚’é¿ã‘ã‚‹ãŸã‚ã«æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + // https://clickhouse.com/docs/ja/interfaces/http/#response-bufferingã‚’å‚ç…§ + clickhouse_settings: { + wait_end_of_query: 1, + }, +}) +``` + +**例:** (Node.js/Web) セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseインスタンスã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã€‚ +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/create_table_single_node.ts)。 + +```ts +await client.command({ + query: ` + CREATE TABLE IF NOT EXISTS my_table + (id UInt64, name String) + ENGINE MergeTree() + ORDER BY (id) + `, +}) +``` + +**例:** (Node.js/Web) INSERT FROM SELECT + +```ts +await client.command({ + query: `INSERT INTO my_table SELECT '42'`, +}) +``` + +:::important +`abort_signal` ã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’キャンセルã—ã¦ã‚‚ã€ã‚µãƒ¼ãƒãƒ¼ãŒã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã—ã¦ã„ãªã„ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +### Execメソッド + +カスタムクエリãŒã‚ã£ã¦ã€`query`/`insert`ã«é©åˆã›ãšã€çµæžœã«é–¢å¿ƒãŒã‚ã‚‹å ´åˆã€`exec`ã‚’`command`ã®ä»£æ›¿ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ + +`exec`ã¯ãƒªãƒ¼ãƒ€ãƒ–ルストリームを返ã—ã€ã‚¢ãƒ—リケーションå´ã§æ¶ˆè²»ã¾ãŸã¯ç ´æ£„ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +```ts +interface ExecParams extends BaseQueryParams { + // 実行ã™ã‚‹æ–‡ã€‚ + query: string +} + +interface ClickHouseClient { + exec(params: ExecParams): Promise +} +``` + +ã¾ãŸã€å‚ç…§: [ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã®åŸºæœ¬ãƒ‘ラメータ](./js.md#base-parameters-for-all-client-methods)。 + +ストリームã®æˆ»ã‚Šåž‹ã¯ã€Node.js版ã¨Web版ã§ç•°ãªã‚Šã¾ã™ã€‚ + +Node.js: + +```ts +export interface QueryResult { + stream: Stream.Readable + query_id: string +} +``` + +Web: + +```ts +export interface QueryResult { + stream: ReadableStream + query_id: string +} +``` + +### Ping + +`ping`メソッドã¯ã‚µãƒ¼ãƒã«åˆ°é”å¯èƒ½ã‹ãƒã‚§ãƒƒã‚¯ã™ã‚‹ãŸã‚ã«æä¾›ã•ã‚Œã¦ãŠã‚Šã€ã‚µãƒ¼ãƒãŒåˆ°é”å¯èƒ½ã§ã‚る㨠`true` ã‚’è¿”ã—ã¾ã™ã€‚ + +サーãƒã«åˆ°é”ã§ããªã„å ´åˆã€åŸºç›¤ã¨ãªã‚‹ã‚¨ãƒ©ãƒ¼ãŒçµæžœã«å«ã¾ã‚Œã¾ã™ã€‚ + +```ts +type PingResult = + | { success: true } + | { success: false; error: Error } + +interface ClickHouseClient { + ping(): Promise +} +``` + +Pingã¯ã‚¢ãƒ—リケーション開始時ã«ã‚µãƒ¼ãƒãŒä½¿ç”¨å¯èƒ½ã‹ç¢ºèªã™ã‚‹ãŸã‚ã®ä¾¿åˆ©ãªãƒ„ールã§ã‚ã‚Šã€ã¨ã‚Šã‚ã‘ClickHouse Cloudã§ã¯ã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã‹ã‚‰Pingã§ç›®è¦šã‚ã¾ã™ã€‚ + +**例:** (Node.js/Web) ClickHouseサーãƒã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«Pingã™ã‚‹ã€‚注æ„:Web版ã§ã¯ã€æ•æ‰ã•ã‚ŒãŸã‚¨ãƒ©ãƒ¼ãŒç•°ãªã‚Šã¾ã™ã€‚ +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/ping.ts)。 + +```ts +const result = await client.ping(); +if (!result.success) { + // result.errorを処ç†ã™ã‚‹ +} +``` + +注æ„: `/ping` エンドãƒã‚¤ãƒ³ãƒˆãŒCORSを実装ã—ã¦ã„ãªã„ãŸã‚ã€Web版ã§ã¯ã€ç°¡å˜ãª `SELECT 1` を使用ã—ã¦é¡žä¼¼ã—ãŸçµæžœã‚’é”æˆã—ã¾ã™ã€‚ + +### クローズ (Node.jsã®ã¿) + +ã™ã¹ã¦ã®ã‚ªãƒ¼ãƒ—ンãªæŽ¥ç¶šã‚’é–‰ã˜ã¦ãƒªã‚½ãƒ¼ã‚¹ã‚’解放ã—ã¾ã™ã€‚Web版ã§ã¯No-opã§ã™ã€‚ + +```ts +await client.close() +``` + +## ファイルã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚° (Node.jsã®ã¿) + +クライアントリãƒã‚¸ãƒˆãƒªã«ã¯ã€äººæ°—ã®ã‚るデータフォーマット(NDJSONã€CSVã€Parquet)ã§ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã®ã„ãã¤ã‹ã®ä¾‹ãŒã‚ã‚Šã¾ã™ã€‚ + +- [NDJSONファイルã‹ã‚‰ã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/node/insert_file_stream_ndjson.ts) +- [CSVファイルã‹ã‚‰ã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/node/insert_file_stream_csv.ts) +- [Parquetファイルã‹ã‚‰ã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/node/insert_file_stream_parquet.ts) +- [ファイルã¨ã—ã¦ã®Parquetã¸ã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/node/select_parquet_as_file.ts) + +別ã®å½¢å¼ã‚’ファイルã«ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã™ã‚‹ã“ã¨ã¯Parquetã®å ´åˆã¨åŒæ§˜ã§ã™ã€‚ +`query`呼ã³å‡ºã—ã«ä½¿ç”¨ã™ã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆï¼ˆ`JSONEachRow`ã€`CSV`ãªã©ï¼‰ã¨å‡ºåŠ›ãƒ•ã‚¡ã‚¤ãƒ«åãŒç•°ãªã‚‹ã ã‘ã§ã™ã€‚ + +## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータフォーマット + +クライアントã¯ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ã—ã¦JSONã¾ãŸã¯ãƒ†ã‚­ã‚¹ãƒˆã‚’処ç†ã—ã¾ã™ã€‚ + +ã‚‚ã—`format`ã¨ã—ã¦JSONファミリーã®ã„ãšã‚Œã‹ã‚’指定ã—ãŸå ´åˆï¼ˆ`JSONEachRow`ã€`JSONCompactEachRow` ãªã©ï¼‰ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯é€šä¿¡ä¸­ã«ãƒ‡ãƒ¼ã‚¿ã‚’シリアル化ãŠã‚ˆã³ãƒ‡ã‚·ãƒªã‚¢ãƒ«åŒ–ã—ã¾ã™ã€‚ + +「生ã€ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§æä¾›ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ï¼ˆ`CSV`ã€`TabSeparated`ãŠã‚ˆã³`CustomSeparated`ファミリー)ã¯ã€è¿½åŠ ã®å¤‰æ›ãªã—ã§é€šä¿¡ç·šä¸Šã‚’é€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +:::tip +JSON一般形å¼ã¨[ClickHouse JSONå½¢å¼](https://clickhouse.com/docs/ja/sql-reference/formats#json)ã®é–“ã§æ··ä¹±ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +クライアントã¯`JSONEachRow`ãªã©ã®å½¢å¼ã§JSONオブジェクトをストリーミングã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼ˆã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã«é©ã—ãŸä»–ã®å½¢å¼ã®æ¦‚è¦ã«ã¤ã„ã¦ã¯ã“ã®è¡¨ã‚’å‚ç…§ã—ã¦ãã ã•ã„;クライアントリãƒã‚¸ãƒˆãƒªã®`select_streaming_`[例をå‚ç…§ã—ã¦ãã ã•ã„](https://github.com/ClickHouse/clickhouse-js/tree/main/examples/node))。 + +ãŸã ã—ã€[ClickHouse JSON](https://clickhouse.com/docs/ja/sql-reference/formats#json)ã®ã‚ˆã†ãªå½¢å¼ã‚„ã„ãã¤ã‹ã®ä»–ã®å½¢å¼ã¯ã€å¿œç­”ã§å˜ä¸€ã‚ªãƒ–ジェクトã¨ã—ã¦è¡¨ç¾ã•ã‚Œã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã£ã¦ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +::: + +| Format | Input (array) | Input (object) | Input/Output (Stream) | Output (JSON) | Output (text) | +|--------------------------------------------|---------------|----------------|-----------------------|---------------|----------------| +| JSON | ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | +| JSONCompact | ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | +| JSONObjectEachRow | ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | +| JSONColumnsWithMetadata | ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | +| JSONStrings | ⌠| âŒï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | +| JSONCompactStrings | ⌠| ⌠| ⌠| âœ”ï¸ | âœ”ï¸ | +| JSONEachRow | âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | âœ”ï¸ | +| JSONStringsEachRow | âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | âœ”ï¸ | +| JSONCompactEachRow | âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | âœ”ï¸ | +| JSONCompactStringsEachRow | âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | âœ”ï¸ | +| JSONCompactEachRowWithNames | âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | âœ”ï¸ | +| JSONCompactEachRowWithNamesAndTypes | âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | âœ”ï¸ | +| JSONCompactStringsEachRowWithNames | âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | âœ”ï¸ | +| JSONCompactStringsEachRowWithNamesAndTypes | âœ”ï¸ | ⌠| âœ”ï¸ | âœ”ï¸ | âœ”ï¸ | +| CSV | ⌠| ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | +| CSVWithNames | ⌠| ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | +| CSVWithNamesAndTypes | ⌠| ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | +| TabSeparated | ⌠| ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | +| TabSeparatedRaw | ⌠| ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | +| TabSeparatedWithNames | ⌠| ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | +| TabSeparatedWithNamesAndTypes | ⌠| ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | +| CustomSeparated | ⌠| ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | +| CustomSeparatedWithNames | ⌠| ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | +| CustomSeparatedWithNamesAndTypes | ⌠| ⌠| âœ”ï¸ | ⌠| âœ”ï¸ | +| Parquet | ⌠| ⌠| âœ”ï¸ | ⌠| ✔ï¸â—- 次をå‚ç…§ | + +Parquetã®å ´åˆã€selectã®ä¸»ãªãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã¯çµæžœã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’ファイルã«æ›¸ã込むã“ã¨ã§ã™ã€‚[例](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/node/select_parquet_as_file.ts)をクライアントリãƒã‚¸ãƒˆãƒªã§å‚ç…§ã—ã¦ãã ã•ã„。 + +ClickHouseã®å…¥åŠ›ãŠã‚ˆã³å‡ºåŠ›å½¢å¼ã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯[ã“ã“](https://clickhouse.com/docs/ja/interfaces/formats)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +## サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ClickHouseデータ型 + +| Type | Status | JS type | +|----------------|----------------|-----------------------| +| UInt8/16/32 | âœ”ï¸ | number | +| UInt64/128/256 | ✔ï¸â—- 次å‚ç…§ | string | +| Int8/16/32 | âœ”ï¸ | number | +| Int64/128/256 | ✔ï¸â—- 次å‚ç…§ | string | +| Float32/64 | âœ”ï¸ | number | +| Decimal | ✔ï¸â—- 次å‚ç…§ | number | +| Boolean | âœ”ï¸ | boolean | +| String | âœ”ï¸ | string | +| FixedString | âœ”ï¸ | string | +| UUID | âœ”ï¸ | string | +| Date32/64 | âœ”ï¸ | string | +| DateTime32/64 | ✔ï¸â—- 次å‚ç…§ | string | +| Enum | âœ”ï¸ | string | +| LowCardinality | âœ”ï¸ | string | +| Array(T) | âœ”ï¸ | T[] | +| JSON | âœ”ï¸ | object | +| Nested | âœ”ï¸ | T[] | +| Tuple | âœ”ï¸ | Tuple | +| Nullable(T) | âœ”ï¸ | JS type for T or null | +| IPv4 | âœ”ï¸ | string | +| IPv6 | âœ”ï¸ | string | +| Point | âœ”ï¸ | [ number, number ] | +| Ring | âœ”ï¸ | Array | +| Polygon | âœ”ï¸ | Array | +| MultiPolygon | âœ”ï¸ | Array | +| Map(K, V) | âœ”ï¸ | Record | + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ClickHouseå½¢å¼ã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯ã€ +[ã“ã¡ã‚‰](https://clickhouse.com/docs/ja/sql-reference/data-types/)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +### Date/Date32åž‹ã«ã¤ã„ã¦ã®æ³¨æ„点 + +クライアントã¯è¿½åŠ ã®åž‹å¤‰æ›ã‚’ã›ãšã«å€¤ã‚’挿入ã™ã‚‹ãŸã‚ã€`Date`/`Date32`åž‹ã®ã‚«ãƒ©ãƒ ã¯æ–‡å­—列ã¨ã—ã¦ã®ã¿æŒ¿å…¥ã§ãã¾ã™ã€‚ + +**例:** `Date`åž‹ã®å€¤ã‚’挿入ã™ã‚‹ã€‚ +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/ba387d7f4ce375a60982ac2d99cb47391cf76cec/__tests__/integration/date_time.test.ts)。 + +```ts +await client.insert({ + table: 'my_table', + values: [ { date: '2022-09-05' } ], + format: 'JSONEachRow', +}) +``` + +ãŸã ã—ã€`DateTime`ã¾ãŸã¯`DateTime64`カラムを使用ã—ã¦ã„ã‚‹å ´åˆã€æ–‡å­—列ã¨JS Dateオブジェクトã®ä¸¡æ–¹ã‚’使用ã§ãã¾ã™ã€‚JS Dateオブジェクトã¯`date_time_input_format`ã‚’`best_effort`ã¨ã—ã¦`insert`ã«ãã®ã¾ã¾æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®[例](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/insert_js_dates.ts)ã‚’å‚ç…§ã—ã¦è©³ç´°ã‚’確èªã—ã¦ãã ã•ã„。 + +### Decimal\* åž‹ã«ã¤ã„ã¦ã®æ³¨æ„点 + +`JSON*`ファミリーフォーマットを用ã„ã¦Decimalを挿入ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªãƒ†ãƒ¼ãƒ–ルãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹ã¨ã—ã¾ã™ï¼š + +```sql +CREATE TABLE my_table +( + id UInt32, + dec32 Decimal(9, 2), + dec64 Decimal(18, 3), + dec128 Decimal(38, 10), + dec256 Decimal(76, 20) +) +ENGINE MergeTree() +ORDER BY (id) +``` + +次ã®ã‚ˆã†ã«ã€ç²¾åº¦ã‚’失ã†ã“ã¨ãªãString表ç¾ã‚’用ã„ã¦å€¤ã‚’挿入ã§ãã¾ã™ï¼š + +```ts +await client.insert({ + table: 'my_table', + values: [{ + id: 1, + dec32: '1234567.89', + dec64: '123456789123456.789', + dec128: '1234567891234567891234567891.1234567891', + dec256: '12345678912345678912345678911234567891234567891234567891.12345678911234567891', + }], + format: 'JSONEachRow', +}) +``` + +ãŸã ã—ã€`JSON*`å½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹å ´åˆã€ClickHouseã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§Decimalを数値ã¨ã—ã¦è¿”ã™ãŸã‚ã€ç²¾åº¦ãŒå¤±ã‚れるå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“れをé¿ã‘ã‚‹ã«ã¯ã€ã‚¯ã‚¨ãƒªå†…ã§Decimalを文字列ã«ã‚­ãƒ£ã‚¹ãƒˆã—ã¾ã™ï¼š + +```ts +await client.query({ + query: ` + SELECT toString(dec32) AS decimal32, + toString(dec64) AS decimal64, + toString(dec128) AS decimal128, + toString(dec256) AS decimal256 + FROM my_table + `, + format: 'JSONEachRow', +}) +``` + +詳細ã«ã¤ã„ã¦ã¯[ã“ã®ä¾‹](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/insert_decimals.ts)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### 整数型:Int64ã€Int128ã€Int256ã€UInt64ã€UInt128ã€UInt256 + +サーãƒãƒ¼ã¯æ•°å€¤ã¨ã—ã¦å—ã‘入れるã“ã¨ãŒã§ãã¾ã™ãŒã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã§ã¯æ•´æ•°ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚’é¿ã‘ã‚‹ãŸã‚ã€ã“れらã®åž‹ã¯`JSON*`ファミリー出力フォーマットã§æ–‡å­—列ã¨ã—ã¦è¿”ã•ã‚Œã¾ã™ã€‚ã“れらã®åž‹ã®æœ€å¤§å€¤ã¯ `Number.MAX_SAFE_INTEGER` よりも大ãã„ã§ã™ã€‚ + +ãŸã ã—ã€ã“ã®å‹•ä½œã¯ +[`output_format_json_quote_64bit_integers` 設定](https://clickhouse.com/docs/ja/operations/settings/formats#output_format_json_quote_64bit_integers)を使用ã—ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ + +**例:** 64ビット数値ã®ãŸã‚ã«JSON出力フォーマットを調整ã™ã‚‹ã€‚ + +```ts +const resultSet = await client.query({ + query: 'SELECT * from system.numbers LIMIT 1', + format: 'JSONEachRow', +}) + +expect(await resultSet.json()).toEqual([ { number: '0' } ]) +``` + +```ts +const resultSet = await client.query({ + query: 'SELECT * from system.numbers LIMIT 1', + format: 'JSONEachRow', + clickhouse_settings: { output_format_json_quote_64bit_integers: 0 }, +}) + +expect(await resultSet.json()).toEqual([ { number: 0 } ]) +``` + +## ClickHouse設定 + +クライアントã¯ã€[設定](https://clickhouse.com/docs/ja/operations/settings/settings/)メカニズムを介ã—ã¦ClickHouseã®å‹•ä½œã‚’調整ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +ã“れらã®è¨­å®šã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ¬ãƒ™ãƒ«ã§è¨­å®šã§ãã€ClickHouseã¸ã®ã™ã¹ã¦ã®è¦æ±‚ã«é©ç”¨ã•ã‚Œã¾ã™ï¼š + +```ts +const client = createClient({ + clickhouse_settings: {} +}) +``` + +ã¾ãŸã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒ¬ãƒ™ãƒ«ã§è¨­å®šã‚’構æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```ts +client.query({ + clickhouse_settings: {} +}) +``` + +ã™ã¹ã¦ã®ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ClickHouse設定をå«ã‚€åž‹å®£è¨€ãƒ•ã‚¡ã‚¤ãƒ«ã¯ +[ã“ã¡ã‚‰](https://github.com/ClickHouse/clickhouse-js/blob/main/packages/client-common/src/settings.ts)ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::important +クエリãŒè¡Œã‚れるユーザーãŒã€è¨­å®šã‚’変更ã™ã‚‹ãŸã‚ã®å分ãªæ¨©é™ã‚’æŒã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +::: + +## 高度ãªãƒˆãƒ”ック + +### パラメータ付ãクエリ + +クエリã«ãƒ‘ラメータを作æˆã—ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã‹ã‚‰ãれらã«å€¤ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§ç‰¹å®šã®å‹•çš„値ã§ã‚¯ã‚¨ãƒªã‚’フォーマットã™ã‚‹å¿…è¦ãŒãªããªã‚Šã¾ã™ã€‚ + +通常ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã‚¯ã‚¨ãƒªã‚’作æˆã—ã€ã‚¯ã‚¨ãƒªã®ã‚¢ãƒ—リパラメータã‹ã‚‰å€¤ã‚’渡ã—ãŸã„場所ã«æ¬¡ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ä¸­æ‹¬å¼§ã«å…¥ã‚Œã¦ãã ã•ã„: + +``` +{: } +``` + +ã“ã“ã§ï¼š + +- `name` — プレースホルダー識別å­ã€‚ +- `data_type` - アプリケーションパラメータ値ã®[データ型](https://clickhouse.com/docs/ja/sql-reference/data-types/)。 + +**例:**: パラメータ付ãクエリ。 +[ソースコード](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/query_with_parameter_binding.ts)。 + +```ts +await client.query({ + query: 'SELECT plus({val1: Int32}, {val2: Int32})', + format: 'CSV', + query_params: { + val1: 10, + val2: 20, + }, +}) +``` + +ã•ã‚‰ã«è©³ã—ã„情報ã¯ã€https://clickhouse.com/docs/ja/interfaces/cli#cli-queries-with-parameters-syntax を確èªã—ã¦ãã ã•ã„。 + +### 圧縮 + +注æ„: リクエスト圧縮ã¯ç¾åœ¨Web版ã§ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。レスãƒãƒ³ã‚¹åœ§ç¸®ã¯é€šå¸¸ã©ãŠã‚Šæ©Ÿèƒ½ã—ã¾ã™ã€‚Node.js版ã¯ä¸¡æ–¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +大ããªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’通信ã™ã‚‹ã‚¢ãƒ—リケーションã¯ã€åœ§ç¸®ã‚’有効ã«ã™ã‚‹ã“ã¨ã§åˆ©ç›Šã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ç¾åœ¨ã€[zlib](https://nodejs.org/docs/latest-v14.x/api/zlib.html)を使用ã—ãŸ`GZIP`ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```typescript +createClient({ + compression: { + response: true, + request: true + } +}) +``` + +設定パラメータã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +- `response: true` ã¯ClickHouseサーãƒã«åœ§ç¸®ã•ã‚ŒãŸãƒ¬ã‚¹ãƒãƒ³ã‚¹ãƒœãƒ‡ã‚£ã‚’è¿”ã™ã‚ˆã†æŒ‡ç¤ºã—ã¾ã™ã€‚デフォルト値: `response: false` +- `request: true` クライアントリクエストボディã®åœ§ç¸®ã‚’有効ã«ã—ã¾ã™ã€‚デフォルト値: `request: false` + +### ロギング (Node.jsã®ã¿) + +:::important +ロギングã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã§ã‚ã‚Šã€å°†æ¥çš„ã«å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +デフォルトã®ãƒ­ã‚¬ãƒ¼å®Ÿè£…ã¯ã€ `console.debug/info/warn/error` メソッドを介ã—ã¦`stdout`ã«ãƒ­ã‚°ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’出力ã—ã¾ã™ã€‚ +`LoggerClass`ã‚’æä¾›ã—ã¦ãƒ­ã‚°ãƒ­ã‚¸ãƒƒã‚¯ã‚’カスタマイズã—〠`level`パラメータã§å¸Œæœ›ã™ã‚‹ãƒ­ã‚°ãƒ¬ãƒ™ãƒ«ã‚’é¸ã¶ã“ã¨ãŒã§ãã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯`OFF`ã§ã™ï¼‰ï¼š + +```typescript +import type { Logger } from '@clickhouse/client' + +// クライアントã«ã‚ˆã£ã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã•ã‚Œã‚‹3ã¤ã®ã™ã¹ã¦ã®LogParamsåž‹ +interface LogParams { + module: string + message: string + args?: Record +} +type ErrorLogParams = LogParams & { err: Error } +type WarnLogParams = LogParams & { err?: Error } + +class MyLogger implements Logger { + trace({ module, message, args }: LogParams) { + // ... + } + debug({ module, message, args }: LogParams) { + // ... + } + info({ module, message, args }: LogParams) { + // ... + } + warn({ module, message, args }: WarnLogParams) { + // ... + } + error({ module, message, args, err }: ErrorLogParams) { + // ... + } +} + +const client = createClient({ + log: { + LoggerClass: MyLogger, + level: ClickHouseLogLevel + } +}) +``` + +ç¾åœ¨ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ä»¥ä¸‹ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’ログã«è¨˜éŒ²ã—ã¾ã™ï¼š + +- `TRACE` - Keep-Aliveソケットã®ãƒ©ã‚¤ãƒ•ã‚µã‚¤ã‚¯ãƒ«ã«é–¢ã™ã‚‹ä½Žãƒ¬ãƒ™ãƒ«ã®æƒ…å ± +- `DEBUG` - 応答情報(èªè¨¼ãƒ˜ãƒƒãƒ€ãƒ¼ã‚„ホスト情報を除ã) +- `INFO` - 主ã«ä½¿ç”¨ã•ã‚Œãªã„ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒåˆæœŸåŒ–ã•ã‚Œã‚‹æ™‚ã«ç¾åœ¨ã®ãƒ­ã‚°ãƒ¬ãƒ™ãƒ«ã‚’表示ã™ã‚‹ +- `WARN` - 致命的ã§ãªã„エラー;失敗ã—ãŸ`ping`リクエストã¯è­¦å‘Šã¨ã—ã¦ãƒ­ã‚°ã«è¨˜éŒ²ã•ã‚Œã€åŸºç›¤ã¨ãªã‚‹ã‚¨ãƒ©ãƒ¼ã¯çµæžœã«å«ã¾ã‚Œã‚‹ +- `ERROR` - `query`/`insert`/`exec`/`command`メソッドã‹ã‚‰ã®è‡´å‘½çš„ãªã‚¨ãƒ©ãƒ¼ã€ä¾‹ãˆã°å¤±æ•—ã—ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆ + +デフォルトã®ãƒ­ã‚¬ãƒ¼å®Ÿè£…ã¯[ã“ã“](https://github.com/ClickHouse/clickhouse-js/blob/main/packages/client-common/src/logger.ts)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +### TLS証明書 (Node.jsã®ã¿) + +Node.jsクライアントã¯ã‚ªãƒ—ションã§åŸºæœ¬çš„ãªï¼ˆèªè¨¼å±€ã®ã¿ï¼‰ãŠã‚ˆã³ç›¸äº’(èªè¨¼å±€ã¨ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè¨¼æ˜Žæ›¸ï¼‰TLSをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +`certs`フォルダ内ã«è¨¼æ˜Žæ›¸ã‚’æŒã¡ã€CAファイルåãŒ`CA.pem`ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ãŸåŸºæœ¬çš„ãªTLS設定例: + +```ts +const client = createClient({ + host: 'https://:', + username: '', + password: '', // å¿…è¦ãªå ´åˆ + tls: { + ca_cert: fs.readFileSync('certs/CA.pem'), + }, +}) +``` + +クライアント証明書を使ã£ãŸç›¸äº’TLS設定例: + +```ts +const client = createClient({ + host: 'https://:', + username: '', + tls: { + ca_cert: fs.readFileSync('certs/CA.pem'), + cert: fs.readFileSync(`certs/client.crt`), + key: fs.readFileSync(`certs/client.key`), + }, +}) +``` + +クライアントリãƒã‚¸ãƒˆãƒªã®[基本TLS例](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/node/basic_tls.ts)ãŠã‚ˆã³[相互TLS例](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/node/mutual_tls.ts)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### Keep-Alive設定 (Node.jsã®ã¿) + +クライアントã¯åŸºç›¤ã¨ãªã‚‹HTTPエージェントã§Keep-Aliveをデフォルトã§æœ‰åŠ¹ã«ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€æŽ¥ç¶šã•ã‚ŒãŸã‚½ã‚±ãƒƒãƒˆã¯å¾Œç¶šã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§å†åˆ©ç”¨ã•ã‚Œã€`Connection: keep-alive` ヘッダãŒé€ä¿¡ã•ã‚Œã¾ã™ã€‚アイドル状態ã®ã‚½ã‚±ãƒƒãƒˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§2500ミリ秒間接続プールã«æ®‹ã‚Šã¾ã™ï¼ˆ[ã“ã®ã‚ªãƒ—ションã®èª¿æ•´ã«ã¤ã„ã¦ã®ãƒ¡ãƒ¢](./js.md#adjusting-idle_socket_ttl)ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +`keep_alive.idle_socket_ttl`ã¯ãã®å€¤ãŒã‚µãƒ¼ãƒãƒ¼/LB設定を大幅ã«ä¸‹å›žã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚主ãªç†ç”±ã¯ã€HTTP/1.1ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€šçŸ¥ã›ãšã«ã‚µãƒ¼ãƒãƒ¼ãŒã‚½ã‚±ãƒƒãƒˆã‚’é–‰ã˜ã‚‹ã“ã¨ã‚’許å¯ã™ã‚‹ãŸã‚ã€ã‚µãƒ¼ãƒãƒ¼ã‚„ロードãƒãƒ©ãƒ³ã‚µãƒ¼ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚ˆã‚Šå…ˆã«ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’é–‰ã˜ã‚‹ã¨ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒé–‰ã˜ãŸã‚½ã‚±ãƒƒãƒˆã‚’å†åˆ©ç”¨ã—よã†ã¨ã—ã¦`socket hang up`エラーãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚ + +`keep_alive.idle_socket_ttl`を変更ã™ã‚‹å ´åˆã€å¸¸ã«ã‚µãƒ¼ãƒãƒ¼/LBã®Keep-Alive設定ã¨åŒæœŸã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã€å¸¸ã«ãれより低ããªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ã“ã‚Œã«ã‚ˆã‚Šã€ã‚µãƒ¼ãƒãƒ¼ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚ˆã‚Šå…ˆã«ã‚ªãƒ¼ãƒ—ンãªæŽ¥ç¶šã‚’é–‰ã˜ã‚‹ã“ã¨ã¯ãªã„ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¾ã™ã€‚ + +#### `idle_socket_ttl`ã®èª¿æ•´ + +クライアント㯠`keep_alive.idle_socket_ttl` ã‚’ 2500ミリ秒ã«è¨­å®šã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯æœ€ã‚‚安全ãªãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨ã¿ãªã•ã‚Œã€ãã®é–“ã«`keep_alive_timeout`ãŒ[23.11よりå‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ClickHouseã§è¨­å®šãªã—ã§3秒ã»ã©ã«è¨­å®šã•ã‚Œã‚‹ã‹ã‚‚ã—ã‚Œãªã„](https://github.com/ClickHouse/ClickHouse/commit/1685cdcb89fe110b45497c7ff27ce73cc03e82d1)ãŸã‚ã§ã™ã€‚ + +:::warning +パフォーマンスã«æº€è¶³ã—ã¦ã„ã¦ã€å•é¡ŒãŒç™ºç”Ÿã—ã¦ã„ãªã„å ´åˆã€`keep_alive.idle_socket_ttl`設定ã®å€¤ã‚’増やã•ãªã„ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ãã†ã—ãªã„ã¨"Socket hang-up"エラーãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚ã¾ãŸã€ã‚¢ãƒ—リケーションãŒå¤šãã®ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã—ã€ãれらã®é–“ã«å¤šãã®ãƒ€ã‚¦ãƒ³ã‚¿ã‚¤ãƒ ãŒãªã„å ´åˆã€ãã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§å分ã§ã‚ã‚‹ã¯ãšã§ã™ã€‚ソケットã¯é•·æ™‚間アイドルã™ã‚‹ã“ã¨ãªãã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒãれらをプールã«ä¿æŒã™ã‚‹ã‹ã‚‰ã§ã™ã€‚ +::: + +次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã“ã¨ã§ã‚µãƒ¼ãƒãƒ¼å¿œç­”ヘッダã®ä¸­ã§æ­£ã—ã„Keep-Aliveタイムアウト値を見ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sh +curl -v --data-binary "SELECT 1" +``` + +応答ã®ä¸­ã®`Connection`ã¨`Keep-Alive`ヘッダã®å€¤ã‚’確èªã—ã¦ãã ã•ã„。ãŸã¨ãˆã°ï¼š + +``` +< Connection: Keep-Alive +< Keep-Alive: timeout=10 +``` + +ã“ã®å ´åˆã€`keep_alive_timeout`ã¯10秒ã§ã™ã€‚アイドルソケットをデフォルトよりも少ã—é•·ãé–‹ã„ã¦ãŠããŸã‚ã«ã€`keep_alive.idle_socket_ttl`ã‚’9000ã¾ãŸã¯9500ミリ秒ã«å¢—ã‚„ã—ã¦ã¿ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"Socket hang-up"エラーãŒç™ºç”Ÿã—ãªã„ã‹ç¢ºèªã—ã¦ãã ã•ã„。ã“れらãŒç™ºç”Ÿã™ã‚‹å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚ˆã‚Šå…ˆã«æŽ¥ç¶šã‚’é–‰ã˜ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã€ã‚¨ãƒ©ãƒ¼ãŒæ¶ˆãˆã‚‹ã¾ã§å€¤ã‚’下ã’ã¾ã™ã€‚ + +#### Keep-Aliveã®ãƒˆãƒ©ãƒ–ルシューティング + +Keep-Aliveを使用中ã«`socket hang up`エラーãŒç™ºç”Ÿã™ã‚‹å ´åˆã€æ¬¡ã®ã‚ªãƒ—ションã§ã“ã®å•é¡Œã‚’解決ã§ãã¾ã™ï¼š + +* ClickHouseサーãƒãƒ¼è¨­å®šã§ `keep_alive.idle_socket_ttl` 設定をã‚ãšã‹ã«æ¸›å°‘ã•ã›ã‚‹ã€‚特定ã®çŠ¶æ³ã€ãŸã¨ãˆã°ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¨ã‚µãƒ¼ãƒãƒ¼ã®é–“ã®é«˜ã„ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯é…延ãŒã‚ã‚‹å ´åˆã€é€ä¿¡ä¸­ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒã‚µãƒ¼ãƒãƒ¼ãŒé–‰ã˜ã‚‹äºˆå®šã®ã‚½ã‚±ãƒƒãƒˆã‚’å–å¾—ã™ã‚‹çŠ¶æ³ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€`keep_alive.idle_socket_ttl`ã‚’200〜500ミリ秒ã»ã©ã•ã‚‰ã«æ¸›å°‘ã•ã›ã‚‹ã“ã¨ãŒæœ‰ç›Šã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +* ã“ã®ã‚¨ãƒ©ãƒ¼ãŒãƒ‡ãƒ¼ã‚¿ã®å…¥å‡ºåŠ›ãªã—ã§é•·æ™‚間実行ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªä¸­ã«ç™ºç”Ÿã—ã¦ã„ã‚‹å ´åˆï¼ˆãŸã¨ãˆã°ã€é•·æ™‚間実行ã•ã‚Œã‚‹ `INSERT FROM SELECT`)ã€ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚µãŒã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã®æŽ¥ç¶šã‚’é–‰ã˜ã‚‹ãŸã‚ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã®ã‚ˆã†ãªé•·æ™‚間実行ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªä¸­ã«ä¸€éƒ¨ã®ãƒ‡ãƒ¼ã‚¿ã®å…¥å‡ºåŠ›ã‚’強制ã™ã‚‹ã“ã¨ã‚’試ã¿ã‚‹ãŸã‚ã«ã¯ã€ä»¥ä¸‹ã®ClickHouse設定を組ã¿åˆã‚ã›ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ + + ```ts + const client = createClient({ + // ã“ã“ã§ã¯ã€å®Ÿè¡Œæ™‚é–“ãŒ5分以上ã‹ã‹ã‚‹ã‚¯ã‚¨ãƒªãŒã‚ã‚‹ã¨æƒ³å®šã—ã¦ã„ã¾ã™ + request_timeout: 400_000, + /** ã“れらã®è¨­å®šã‚’組ã¿åˆã‚ã›ã‚‹ã“ã¨ã§ã€ãƒ‡ãƒ¼ã‚¿ã®å…¥å‡ºåŠ›ãŒãªã„長時間実行ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹éš›ã®LBã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã®å•é¡Œã‚’回é¿ã§ãã¾ã™ã€‚ + * 例ãˆã°ã€ `INSERT FROM SELECT` ãªã©ã®ã‚ˆã†ã«ã€‚LBãŒæŽ¥ç¶šã‚’アイドル状態ã¨è¦‹ãªã—ã¦çªç„¶åˆ‡æ–­ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + * ã“ã®å ´åˆã€LBã®ã‚¢ã‚¤ãƒ‰ãƒ«æŽ¥ç¶šã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãŒ120秒ã§ã‚ã‚‹ã¨æƒ³å®šã—ã€å®‰å…¨ãªå€¤ã¨ã—ã¦110秒ã«è¨­å®šã—ã¾ã™ã€‚ */ + clickhouse_settings: { + send_progress_in_http_headers: 1, + http_headers_progress_interval_ms: '110000', // UInt64ã€æ–‡å­—列ã¨ã—ã¦æ¸¡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ + }, + }) + ``` + ã—ã‹ã—ãªãŒã‚‰ã€å—信ヘッダーã®ç·ã‚µã‚¤ã‚ºã«ã¯æœ€è¿‘ã®Node.jsãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§16KBã®åˆ¶é™ãŒã‚ã‚‹ã“ã¨ã‚’覚ãˆã¦ãŠã„ã¦ãã ã•ã„。テストã§ã¯ç´„70〜80ã®é€²æ—ヘッダーをå—ä¿¡ã™ã‚‹ã¨ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ + + ã¾ãŸã€å®Œå…¨ã«ç•°ãªã‚‹æ–¹æ³•ã‚’使用ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ã“ã‚Œã¯ã€HTTPインターフェイスã®ã€Œæ©Ÿèƒ½ã€ã‚’利用ã™ã‚‹ã“ã¨ã§ã€æŽ¥ç¶šãŒå¤±ã‚ã‚Œã¦ã‚‚ミューテーションãŒã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚Œãªã„ãŸã‚ã€å¾…機時間を完全ã«å›žé¿ã§ãã¾ã™ã€‚[ã“ã®ä¾‹ï¼ˆãƒ‘ート2)](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/long_running_queries_timeouts.ts)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +* Keep-Alive機能を完全ã«ç„¡åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ã™ã¹ã¦ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã« `Connection: close` ヘッダーを追加ã—ã€åŸºç›¤ã®HTTPエージェントã¯æŽ¥ç¶šã‚’å†åˆ©ç”¨ã—ãªã„よã†ã«ã—ã¾ã™ã€‚`keep_alive.idle_socket_ttl` 設定ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã®ã‚½ã‚±ãƒƒãƒˆãŒãªã„ãŸã‚ã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã™ã¹ã¦ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å¯¾ã—ã¦æ–°ã—ã„接続ãŒç¢ºç«‹ã•ã‚Œã‚‹ãŸã‚ã€è¿½åŠ ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + + ```ts + const client = createClient({ + keep_alive: { + enabled: false, + }, + }) + ``` + +### 読ã¿å–り専用ユーザー + +クライアントを[readonly=1ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼](https://clickhouse.com/docs/ja/operations/settings/permissions-for-queries#readonly)ã§ä½¿ç”¨ã™ã‚‹å ´åˆã€`enable_http_compression`設定ãŒå¿…è¦ãªãŸã‚ã€ãƒ¬ã‚¹ãƒãƒ³ã‚¹åœ§ç¸®ã‚’有効ã«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。以下ã®è¨­å®šã¯ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ã¾ã™ï¼š + +```ts +const client = createClient({ + compression: { + response: true, // readonly=1ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“ + }, +}) +``` + +readonly=1ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®åˆ¶é™ã«ã¤ã„ã¦ã®è©³ç´°ã¯[ã“ã¡ã‚‰ã®ä¾‹](https://github.com/ClickHouse/clickhouse-js/blob/main/examples/read_only_user.ts)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### パスãƒãƒ¼ãƒ ã‚’æŒã¤ãƒ—ロキシ + +ClickHouseインスタンスãŒãƒ—ロキシã®èƒŒå¾Œã«ã‚ã‚Šã€URLã«ãƒ‘スãƒãƒ¼ãƒ ãŒã‚ã‚‹å ´åˆï¼ˆãŸã¨ãˆã°ã€http://proxy:8123/clickhouse_server)ã€`clickhouse_server` ã‚’ `pathname` 設定オプションã¨ã—ã¦æŒ‡å®šã—ã¦ãã ã•ã„(先頭ã«ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒã‚ã£ã¦ã‚‚ãªãã¦ã‚‚構ã„ã¾ã›ã‚“)。ã•ã‚‚ãªã‘ã‚Œã°ã€`url` ã«ç›´æŽ¥æŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãれ㌠`database` オプションã¨ã—ã¦è€ƒæ…®ã•ã‚Œã¾ã™ã€‚複数ã®ã‚»ã‚°ãƒ¡ãƒ³ãƒˆãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚例:`/my_proxy/db`。 + +```ts +const client = createClient({ + url: 'http://proxy:8123', + pathname: '/clickhouse_server', +}) +``` + +### èªè¨¼ä»˜ãã®ãƒªãƒãƒ¼ã‚¹ãƒ—ロキシ + +ClickHouseé…ç½®ã®å‰ã«èªè¨¼ä»˜ãã®ãƒªãƒãƒ¼ã‚¹ãƒ—ロキシãŒã‚ã‚‹å ´åˆã€å¿…è¦ãªãƒ˜ãƒƒãƒ€ãƒ¼ã‚’æä¾›ã™ã‚‹ãŸã‚ã« `http_headers` 設定を使用ã§ãã¾ã™ï¼š + +```ts +const client = createClient({ + http_headers: { + 'My-Auth-Header': '...', + }, +}) +``` + +### カスタムHTTP/HTTPSエージェント(エクスペリメンタルã€Node.jsã®ã¿ï¼‰ + +:::warning +ã“ã‚Œã¯å°†æ¥çš„ãªãƒªãƒªãƒ¼ã‚¹ã§ã®å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ã®ã‚るエクスペリメンタルãªæ©Ÿèƒ½ã§ã™ã€‚クライアントãŒæä¾›ã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å®Ÿè£…ã¨è¨­å®šã¯ã€ã»ã¨ã‚“ã©ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§å分ã§ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã€å¿…è¦ãŒã‚ã‚‹ã“ã¨ã‚’確信ã—ã¦ã„ã‚‹å ´åˆã«ã®ã¿ä½¿ç”¨ã—ã¦ãã ã•ã„。 +::: + +デフォルトã§ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè¨­å®šã§æä¾›ã•ã‚ŒãŸè¨­å®šï¼ˆ`max_open_connections`ã€`keep_alive.enabled`ã€`tls`ãªã©ï¼‰ã‚’使用ã—ã¦åŸºç›¤ã®HTTP(s)エージェントを構æˆã—ã€ClickHouseサーãƒãƒ¼ã¸ã®æŽ¥ç¶šã‚’管ç†ã—ã¾ã™ã€‚ã•ã‚‰ã«ã€TLS証明書ãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€åŸºç›¤ã®ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã¯å¿…è¦ãªè¨¼æ˜Žæ›¸ã§æ§‹æˆã•ã‚Œã€æ­£ã—ã„TLSèªè¨¼ãƒ˜ãƒƒãƒ€ãƒ¼ãŒå¼·åˆ¶ã•ã‚Œã¾ã™ã€‚ + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³1.2.0以é™ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®åŸºç›¤ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‚’ç½®ãæ›ãˆã‚‹ã‚«ã‚¹ã‚¿ãƒ HTTP(s)エージェントをクライアントã«æä¾›ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã“ã‚Œã¯ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æ§‹æˆãŒè¤‡é›‘ãªå ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚カスタムエージェントãŒæä¾›ã•ã‚Œã‚‹å ´åˆã€æ¬¡ã®æ¡ä»¶ãŒé©ç”¨ã•ã‚Œã¾ã™ï¼š +- `max_open_connections`ã¨`tls`オプションã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã£ã¦ç„¡è¦–ã•ã‚Œã€åŠ¹æžœã¯ã‚ã‚Šã¾ã›ã‚“。ã“れらã¯åŸºç›¤ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã®è¨­å®šã®ä¸€éƒ¨ã§ã™ã€‚ +- `keep_alive.enabled`ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®`Connection`ヘッダーã®å€¤ã®ã¿ã‚’è¦åˆ¶ã—ã¾ã™ï¼ˆ`true` -> `Connection: keep-alive`ã€`false` -> `Connection: close`)。 +- アイドル状態ã®ã‚­ãƒ¼ãƒ—アライブソケット管ç†ã¯å¼•ã続ã動作ã—ã¾ã™ï¼ˆã“ã‚Œã¯ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã§ã¯ãªã特定ã®ã‚½ã‚±ãƒƒãƒˆè‡ªä½“ã«é–¢é€£ä»˜ã‘られã¦ã„ã¾ã™ï¼‰ãŒã€`keep_alive.idle_socket_ttl`値を`0`ã«è¨­å®šã—ã¦å®Œå…¨ã«ç„¡åŠ¹ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +#### カスタムエージェント使用例 + +証明書ãªã—ã®ã‚«ã‚¹ã‚¿ãƒ HTTP(s)エージェントを使用: + +```ts +const agent = new http.Agent({ // ã¾ãŸã¯ https.Agent + keepAlive: true, + keepAliveMsecs: 2500, + maxSockets: 10, + maxFreeSockets: 10, +}) +const client = createClient({ + http_agent: agent, +}) +``` + +基本的ãªTLSã¨CA証明書を使用ã—ãŸã‚«ã‚¹ã‚¿ãƒ HTTPSエージェント: + +```ts +const agent = new https.Agent({ + keepAlive: true, + keepAliveMsecs: 2500, + maxSockets: 10, + maxFreeSockets: 10, + ca: fs.readFileSync('./ca.crt'), +}) +const client = createClient({ + url: 'https://myserver:8443', + http_agent: agent, + // カスタムHTTPSエージェントを使用ã™ã‚‹å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®HTTPS接続実装を使用ã—ã¾ã›ã‚“。ヘッダーã¯æ‰‹å‹•ã§æä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ + http_headers: { + 'X-ClickHouse-User': 'username', + 'X-ClickHouse-Key': 'password', + }, + // é‡è¦ï¼šèªå¯ãƒ˜ãƒƒãƒ€ãƒ¼ãŒTLSヘッダーã¨è¡çªã—ã¾ã™ã€‚ã“れを無効ã«ã—ã¾ã™ã€‚ + set_basic_auth_header: false, +}) +``` + +相互TLSを使用ã—ãŸã‚«ã‚¹ã‚¿ãƒ HTTPSエージェント: + +```ts +const agent = new https.Agent({ + keepAlive: true, + keepAliveMsecs: 2500, + maxSockets: 10, + maxFreeSockets: 10, + ca: fs.readFileSync('./ca.crt'), + cert: fs.readFileSync('./client.crt'), + key: fs.readFileSync('./client.key'), +}) +const client = createClient({ + url: 'https://myserver:8443', + http_agent: agent, + // カスタムHTTPSエージェントを使用ã™ã‚‹å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®HTTPS接続実装を使用ã—ã¾ã›ã‚“。ヘッダーã¯æ‰‹å‹•ã§æä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ + http_headers: { + 'X-ClickHouse-User': 'username', + 'X-ClickHouse-Key': 'password', + 'X-ClickHouse-SSL-Certificate-Auth': 'on', + }, + // é‡è¦ï¼šèªå¯ãƒ˜ãƒƒãƒ€ãƒ¼ãŒTLSヘッダーã¨è¡çªã—ã¾ã™ã€‚ã“れを無効ã«ã—ã¾ã™ã€‚ + set_basic_auth_header: false, +}) +``` + +証明書ãŠã‚ˆã³ã‚«ã‚¹ã‚¿ãƒ HTTPSエージェントを使用ã™ã‚‹å ´åˆã€TLSヘッダーã¨è¡çªã™ã‚‹ãŸã‚ã€`set_basic_auth_header`設定(ãƒãƒ¼ã‚¸ãƒ§ãƒ³1.2.0ã§å°Žå…¥ï¼‰ã‚’使用ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®èªè¨¼ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’無効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®TLSヘッダーã¯æ‰‹å‹•ã§æä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## 既知ã®åˆ¶é™äº‹é …(Node.js/ウェブ) + +- çµæžœã‚»ãƒƒãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒžãƒƒãƒ‘ーãŒãªãã€è¨€èªžã®ãƒ—リミティブã®ã¿ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚特定ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—マッパーã¯[RowBinaryå½¢å¼ã‚µãƒãƒ¼ãƒˆ](https://github.com/ClickHouse/clickhouse-js/issues/216)ãŒäºˆå®šã•ã‚Œã¦ã„ã¾ã™ã€‚ +- [Decimal*ã¨Date\* / DateTime\*データ型ã®åˆ¶é™äº‹é …](./js.md#datedate32-types-caveats)ãŒã‚ã‚Šã¾ã™ã€‚ +- JSON*ファミリ形å¼ã‚’使用ã™ã‚‹å ´åˆã€Int32より大ããªæ•°å€¤ã¯æ–‡å­—列ã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€Int64+åž‹ã®æœ€å¤§å€¤ãŒ`Number.MAX_SAFE_INTEGER`よりも大ãã„ãŸã‚ã§ã™ã€‚[Integral types](./js.md#integral-types-int64-int128-int256-uint64-uint128-uint256)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +## 既知ã®åˆ¶é™äº‹é …(ウェブ) + +- セレクトクエリã®ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã¯å‹•ä½œã—ã¾ã™ãŒã€ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã§ã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ï¼ˆåž‹ãƒ¬ãƒ™ãƒ«ã§ã‚‚)。 +- リクエスト圧縮ã¯ç„¡åŠ¹åŒ–ã•ã‚Œã€è¨­å®šã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚レスãƒãƒ³ã‚¹åœ§ç¸®ã¯æ©Ÿèƒ½ã—ã¾ã™ã€‚ +- ロギングサãƒãƒ¼ãƒˆã¯ã¾ã ã‚ã‚Šã¾ã›ã‚“。 + +## パフォーマンス最é©åŒ–ã®ãŸã‚ã®ãƒ’ント + +- アプリケーションã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚’削減ã™ã‚‹ãŸã‚ã«ã€ï¼ˆãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã®ï¼‰å¤§è¦æ¨¡ãªã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚„セレクトã§ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’使用ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。イベントリスナーやåŒæ§˜ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§ã¯ã€[éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆ](https://clickhouse.com/docs/ja/optimize/asynchronous-inserts)ãŒè‰¯ã„é¸æŠžè‚¢ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§ã®ãƒãƒƒãƒå‡¦ç†ã‚’最å°åŒ–ã€ã¾ãŸã¯å®Œå…¨ã«å›žé¿ã§ãã¾ã™ã€‚éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã®ä¾‹ã¯ã€[クライアントリãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/clickhouse-js/tree/main/examples)ã®ãƒ•ã‚¡ã‚¤ãƒ«åプレフィックス`async_insert_`ã§æä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ +- クライアントã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚„レスãƒãƒ³ã‚¹ã®åœ§ç¸®ã‚’有効ã«ã—ã¾ã›ã‚“。ã—ã‹ã—ã€å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’é¸æŠžã¾ãŸã¯æŒ¿å…¥ã™ã‚‹å ´åˆã€`ClickHouseClientConfigOptions.compression`ã§åœ§ç¸®ã‚’有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆ`request`ã¾ãŸã¯`response`ã®ã©ã¡ã‚‰ã‹ã€ã¾ãŸã¯ä¸¡æ–¹ã§ï¼‰ã€‚ +- 圧縮ã¯é‡è¦ãªãƒ‘フォーマンスã®ãƒšãƒŠãƒ«ãƒ†ã‚£ã‚’ä¼´ã„ã¾ã™ã€‚`request`ã¾ãŸã¯`response`ã«å¯¾ã—ã¦æœ‰åŠ¹ã«ã™ã‚‹ã¨ã€ãã‚Œãžã‚Œé¸æŠžã¾ãŸã¯æŒ¿å…¥ã®é€Ÿåº¦ã«æ‚ªå½±éŸ¿ã‚’åŠã¼ã—ã¾ã™ãŒã€ã‚¢ãƒ—リケーションã«ã‚ˆã£ã¦è»¢é€ã•ã‚Œã‚‹ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®é‡ã¯æ¸›å°‘ã—ã¾ã™ã€‚ + +## ã”相談・ãŠå•ã„åˆã‚ã› + +質å•ã‚„サãƒãƒ¼ãƒˆãŒå¿…è¦ãªå ´åˆã¯ã€[Community Slack](https://clickhouse.com/slack)(`#clickhouse-js`ãƒãƒ£ãƒ³ãƒãƒ«ï¼‰ã¾ãŸã¯[GitHub issues](https://github.com/ClickHouse/clickhouse-js/issues)を通ã˜ã¦ãŠæ°—軽ã«ã”連絡ãã ã•ã„。 diff --git a/docs/ja/integrations/language-clients/python/index.md b/docs/ja/integrations/language-clients/python/index.md new file mode 100644 index 00000000000..c706353b989 --- /dev/null +++ b/docs/ja/integrations/language-clients/python/index.md @@ -0,0 +1,926 @@ +--- +sidebar_label: Python +sidebar_position: 10 +keywords: [clickhouse, python, client, connect, integrate] +slug: /ja/integrations/python +description: ClickHouseã«Pythonを接続ã™ã‚‹ãŸã‚ã®ClickHouse Connectプロジェクトスイート +--- + +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# ClickHouse Connectを使用ã—ãŸPythonã®çµ±åˆ + +## イントロダクション + +ClickHouse Connectã¯ã€éžå¸¸ã«å¤šãã®Pythonアプリケーションã¨ã®ç›¸äº’é‹ç”¨æ€§ã‚’æä¾›ã™ã‚‹ã‚³ã‚¢ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ‰ãƒ©ã‚¤ãƒã§ã™ã€‚ + +- 主ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ã¯ãƒ‘ッケージ`clickhouse_connect.driver`内ã®`Client`オブジェクトã§ã™ã€‚ã“ã®ã‚³ã‚¢ãƒ‘ッケージã«ã¯ã€ClickHouseサーãƒãƒ¼ã¨ã®é€šä¿¡ã‚„挿入ã¨é¸æŠžã‚¯ã‚¨ãƒªã®é«˜åº¦ãªç®¡ç†ã®ãŸã‚ã®"コンテクスト"実装ã«ä½¿ç”¨ã•ã‚Œã‚‹ã•ã¾ã–ã¾ãªãƒ˜ãƒ«ãƒ‘ークラスã¨ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£é–¢æ•°ã‚‚å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ +- `clickhouse_connect.datatypes`パッケージã¯ã€ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã§ãªã„ã™ã¹ã¦ã®ClickHouseデータタイプã®åŸºæœ¬å®Ÿè£…ã¨ã‚µãƒ–クラスをæä¾›ã—ã¾ã™ã€‚ãã®ä¸»ãªæ©Ÿèƒ½ã¯ã€ClickHouseã¨ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーション間ã§æœ€ã‚‚効率的ãªè»¢é€ã‚’é”æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ClickHouseã®"ãƒã‚¤ãƒ†ã‚£ãƒ–"ãƒã‚¤ãƒŠãƒªåˆ—å½¢å¼ã¸ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã¨ãƒ‡ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã§ã™ã€‚ +- `clickhouse_connect.cdriver`パッケージ内ã®Cython/Cクラスã¯ã€æœ€ã‚‚一般的ãªã‚·ãƒªã‚¢ãƒ«åŒ–ã¨ãƒ‡ã‚·ãƒªã‚¢ãƒ«åŒ–ã®ã„ãã¤ã‹ã‚’最é©åŒ–ã—ã€ç´”粋ãªPythonã®ãƒ‘フォーマンスを大幅ã«å‘上ã•ã›ã¾ã™ã€‚ +- パッケージ`clickhouse_connect.cc_sqlalchemy`ã«ã¯ã€[SQLAlchemy](https://www.sqlalchemy.org/)方言ãŒé™ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®åˆ¶é™ã•ã‚ŒãŸå®Ÿè£…ã¯ã€ã‚¯ã‚¨ãƒª/カーソル機能ã«ç„¦ç‚¹ã‚’当ã¦ã€é€šå¸¸SQLAlchemy DDLãŠã‚ˆã³ORMæ“作ã¯ã‚µãƒãƒ¼ãƒˆã—ã¾ã›ã‚“(SQLAlchemyã¯OLTPデータベースå‘ã‘ã§ã‚ã‚Šã€ClickHouse OLAP指å‘ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’管ç†ã™ã‚‹ãŸã‚ã«ã‚ˆã‚Šå°‚門的ãªãƒ„ールやフレームワークをãŠå‹§ã‚ã—ã¾ã™ï¼‰ã€‚ +- コアドライãƒãŠã‚ˆã³ClickHouse Connect SQLAlchemy実装ã¯ã€ClickHouseã‚’Apache Supersetã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®æŽ¨å¥¨æ–¹æ³•ã§ã™ã€‚`ClickHouse Connect`データベース接続ã¾ãŸã¯`clickhousedb` SQLAlchemy方言接続文字列を使用ã—ã¦ãã ã•ã„。 + +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ã€ãƒ™ãƒ¼ã‚¿ãƒªãƒªãƒ¼ã‚¹0.8.2ã®æ™‚点ã§æœ‰åŠ¹ã§ã™ã€‚ + +:::note +å…¬å¼ã®ClickHouse Connect Pythonドライãƒã¯ã€ClickHouseサーãƒãƒ¼ã¨ã®é€šä¿¡ã«HTTPプロトコルを使用ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã€æŸ”軟性ã®å‘上ã€HTTPãƒãƒ©ãƒ³ã‚µã®ã‚µãƒãƒ¼ãƒˆã€JDBCベースã®ãƒ„ールã¨ã®äº’æ›æ€§ã®å‘上ãªã©ã®åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ãŒã€åœ§ç¸®çŽ‡ã‚„パフォーマンスã®ã‚„や低下ã€ãƒã‚¤ãƒ†ã‚£ãƒ–TCPベースã®ãƒ—ロトコルã®ä¸€éƒ¨ã®è¤‡é›‘ãªæ©Ÿèƒ½ã®ã‚µãƒãƒ¼ãƒˆã®æ¬ å¦‚ãªã©ã®ãƒ‡ãƒ¡ãƒªãƒƒãƒˆã‚‚ã‚ã‚Šã¾ã™ã€‚ +一部ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§ã¯ã€ãƒã‚¤ãƒ†ã‚£ãƒ–TCPベースã®ãƒ—ロトコルを使用ã™ã‚‹[コミュニティPythonドライãƒ](/docs/ja/interfaces/third-party/client-libraries.md)ã®ä½¿ç”¨ã‚’検討ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +::: + +### è¦ä»¶ã¨äº’æ›æ€§ + +| Python | | Platform¹ | | ClickHouse | | SQLAlchemy² | | Apache Superset | | +|----------:|:--|----------------:|:--|-----------:|:---|------------:|:--|----------------:|:--| +| 2.x, <3.8 | ⌠| Linux (x86) | ✅ | <24.3³ | 🟡 | <1.3 | ⌠| <1.4 | ⌠| +| 3.8.x | ✅ | Linux (Aarch64) | ✅ | 24.3.x | ✅ | 1.3.x | ✅ | 1.4.x | ✅ | +| 3.9.x | ✅ | macOS (x86) | ✅ | 24.4-24.6³ | 🟡 | 1.4.x | ✅ | 1.5.x | ✅ | +| 3.10.x | ✅ | macOS (ARM) | ✅ | 24.7.x | ✅ | >=2.x | ⌠| 2.0.x | ✅ | +| 3.11.x | ✅ | Windows | ✅ | 24.8.x | ✅ | | | 2.1.x | ✅ | +| 3.12.x | ✅ | | | 24.9.x | ✅ | | | 3.0.x | ✅ | + +¹ClickHouse Connectã¯ã€ãƒªã‚¹ãƒˆã•ã‚ŒãŸãƒ—ラットフォームã«å¯¾ã—ã¦æ˜Žç¤ºçš„ã«ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã•ã‚‰ã«ã€æœªãƒ†ã‚¹ãƒˆã®ãƒã‚¤ãƒŠãƒªãƒ›ã‚¤ãƒ¼ãƒ«ï¼ˆCã®æœ€é©åŒ–ã‚’å«ã‚€ï¼‰ã¯ã€å„ªã‚ŒãŸ[cibuildwheel](https://cibuildwheel.readthedocs.io/en/stable/)プロジェクトãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã™ã¹ã¦ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ç”¨ã«ãƒ“ルドã•ã‚Œã¾ã™ã€‚ +最後ã«ã€ClickHouse Connectã¯ç´”粋ãªPythonã¨ã—ã¦ã‚‚実行ã§ãã‚‹ãŸã‚ã€ã‚½ãƒ¼ã‚¹ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã¯æœ€è¿‘ã®Pythonインストールã§å‹•ä½œã™ã‚‹ã¯ãšã§ã™ã€‚ + +²å†åº¦ã€SQLAlchemyサãƒãƒ¼ãƒˆã¯ä¸»ã«ã‚¯ã‚¨ãƒªæ©Ÿèƒ½ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚SQLAlchemy API全体ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +³ClickHouse Connectã¯ã€ç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«å¯¾ã—ã¦ãƒ†ã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚HTTPプロトコルを使用ã—ã¦ã„ã‚‹ãŸã‚ã€ä»–ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ClickHouseã§ã‚‚æ­£ã—ã動作ã™ã‚‹ã¯ãšã§ã™ãŒã€ä¸€éƒ¨ã®é«˜åº¦ãªãƒ‡ãƒ¼ã‚¿åž‹ã¨ã®éžäº’æ›æ€§ãŒå­˜åœ¨ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +### インストール + +PyPIã‹ã‚‰pipを通ã˜ã¦ClickHouse Connectをインストールã—ã¾ã™ï¼š + +`pip install clickhouse-connect` + +ClickHouse Connectをソースã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š +* `git clone`ã§[GitHubリãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/clickhouse-connect)をクローンã—ã¾ã™ã€‚ +* (オプション)`pip install cython`を実行ã—ã¦C/Cythonã®æœ€é©åŒ–をビルドãŠã‚ˆã³æœ‰åŠ¹åŒ– +* プロジェクトã®ãƒ«ãƒ¼ãƒˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ç§»å‹•ã—ã¦`pip install .`を実行 + +### サãƒãƒ¼ãƒˆãƒãƒªã‚·ãƒ¼ + +ClickHouse Connectã¯ç¾åœ¨ãƒ™ãƒ¼ã‚¿ã§ã™ã®ã§ã€ç¾åœ¨ã®ãƒ™ãƒ¼ã‚¿ãƒªãƒªãƒ¼ã‚¹ã®ã¿ãŒç©æ¥µçš„ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚å•é¡Œã‚’報告ã™ã‚‹å‰ã«æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«æ›´æ–°ã—ã¦ãã ã•ã„。å•é¡Œã¯[GitHubプロジェクト](https://github.com/ClickHouse/clickhouse-connect/issues)ã«å ±å‘Šã—ã¦ãã ã•ã„。ClickHouse Connectã®å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã¯ã€ãƒªãƒªãƒ¼ã‚¹æ™‚点ã§ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨äº’æ›æ€§ã‚’æŒã¤ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¦ã„ã¾ã™ï¼ˆä¸€èˆ¬ã«ã€æœ€æ–°ã®`stable` 3ã¤ã¨`lts`ã®æœ€è¿‘ã®2ã¤ã®ãƒªãƒªãƒ¼ã‚¹ï¼‰ã€‚ + +### 基本的ãªä½¿ç”¨æ³• + +### 接続ã®è©³ç´°ã‚’集ã‚ã‚‹ + + + +#### 接続を確立ã™ã‚‹ + +ClickHouseã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®2ã¤ã®ä¾‹ã‚’示ã—ã¾ã™ï¼š +- ローカルホストã®ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã€‚ +- ClickHouse Cloudサービスã«æŽ¥ç¶šã™ã‚‹ã€‚ + +##### ローカルホストã®ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«ClickHouse Connectクライアントインスタンスを使用: + +```python +import clickhouse_connect + +client = clickhouse_connect.get_client(host='localhost', username='default', password='password') +``` + +##### ClickHouse Cloudサービスã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«ClickHouse Connectクライアントインスタンスを使用: + +:::tip +接続ã®è©³ç´°ã‚’å‰ã‚‚ã£ã¦é›†ã‚ã¦ãã ã•ã„。ClickHouse Cloudサービスã¯TLSã‚’å¿…è¦ã¨ã™ã‚‹ãŸã‚ã€ãƒãƒ¼ãƒˆ8443を使用ã—ã¾ã™ã€‚ +::: + +```python +import clickhouse_connect + +client = clickhouse_connect.get_client(host='HOSTNAME.clickhouse.cloud', port=8443, username='default', password='your password') +``` + +#### データベースã¨å¯¾è©±ã™ã‚‹ + +ClickHouse SQLコマンドを実行ã™ã‚‹ã«ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®`command`メソッドを使用ã—ã¾ã™ï¼š + +```python +client.command('CREATE TABLE new_table (key UInt32, value String, metric Float64) ENGINE MergeTree ORDER BY key') +``` + +ãƒãƒƒãƒãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã«ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®`insert`メソッドを使用ã—ã€è¡Œã¨å€¤ã®2次元é…列を指定ã—ã¾ã™ï¼š + +```python +row1 = [1000, 'String Value 1000', 5.233] +row2 = [2000, 'String Value 2000', -107.04] +data = [row1, row2] +client.insert('new_table', data, column_names=['key', 'value', 'metric']) +``` + +ClickHouse SQLを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®`query`メソッドを使用ã—ã¾ã™ï¼š + +```python +result = client.query('SELECT max(key), avg(metric) FROM new_table') +result.result_rows +Out[13]: [(2000, -50.9035)] +``` + +## ClickHouse Connect ドライãƒAPI + +***注:*** ã»ã¨ã‚“ã©ã®APIメソッドã«ã¯å¤šãã®å¼•æ•°ãŒã‚ã‚Šã€ãã®å¤šãã¯ã‚ªãƒ—ションã§ã‚ã‚‹ãŸã‚ã€ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰å¼•æ•°ã‚’渡ã™ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +*ã“ã“ã«æ–‡æ›¸åŒ–ã•ã‚Œã¦ã„ãªã„メソッドã¯APIã®ä¸€éƒ¨ã¨è¦‹ãªã•ã‚Œãšã€å‰Šé™¤ã¾ãŸã¯å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚* + +### クライアントã®åˆæœŸåŒ– + +`clickhouse_connect.driver.client`クラスã¯ã€Pythonアプリケーションã¨ClickHouseデータベースサーãƒãƒ¼é–“ã®ä¸»è¦ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚`clickhouse_connect.get_client`関数を使用ã—ã¦Clientインスタンスをå–å¾—ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ä»¥ä¸‹ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã™ï¼š + +#### 接続引数 + +| パラメータ | タイプ | デフォルト | 説明 | +|-----------------------|-------------|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| interface | str | http | httpã¾ãŸã¯httpsã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ | +| host | str | localhost | ClickHouseサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆåã¾ãŸã¯IPアドレス。設定ã—ãªã„å ´åˆã€`localhost`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ | +| port | int | 8123ã¾ãŸã¯8443 | ClickHouse HTTPã¾ãŸã¯HTTPSãƒãƒ¼ãƒˆã€‚設定ã—ãªã„å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§8123ã€*secure*=*True*ã¾ãŸã¯*interface*=*https*ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯8443ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ | +| username | str | default | ClickHouseã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å。設定ã—ãªã„å ´åˆã¯ã€`default` ClickHouseユーザーãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ | +| password | str | *<空ã®æ–‡å­—列>* | *username*ã®ãƒ‘スワード。 | +| database | str | *None* | 接続ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚設定ã—ãªã„å ´åˆã€ClickHouse Connectã¯*username*ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’使用ã—ã¾ã™ã€‚ | +| secure | bool | False | https/TLSを使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ã¾ãŸã¯ãƒãƒ¼ãƒˆå¼•æ•°ã‹ã‚‰æ´¾ç”Ÿã—ãŸå€¤ã‚’上書ãã—ã¾ã™ã€‚ | +| dsn | str | *None* | 標準DSN(データソースå)形å¼ã®æ–‡å­—列。ã“ã®æ–‡å­—列ã‹ã‚‰ã€è¨­å®šã•ã‚Œã¦ã„ãªã„ä»–ã®æŽ¥ç¶šå€¤ï¼ˆãƒ›ã‚¹ãƒˆã‚„ユーザーãªã©ï¼‰ãŒæŠ½å‡ºã•ã‚Œã¾ã™ã€‚ | +| compress | bool or str | True | ClickHouse HTTPã®æŒ¿å…¥ã¨ã‚¯ã‚¨ãƒªçµæžœã®åœ§ç¸®ã‚’有効ã«ã™ã‚‹ã€‚ [追加オプション(圧縮)](#compression) ã‚’å‚ç…§ | +| query_limit | int | 0(無制é™ï¼‰ | `query`応答ã®è¡Œæ•°ã®æœ€å¤§æ•°ã€‚0ã«è¨­å®šã™ã‚‹ã¨ç„¡åˆ¶é™ã®è¡ŒãŒè¿”ã•ã‚Œã¾ã™ã€‚大ããªã‚¯ã‚¨ãƒªåˆ¶é™ã¯ã€çµæžœãŒã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œãªã„ã¨ãã«ä¸€åº¦ã«ã™ã¹ã¦ã®çµæžœãŒãƒ¡ãƒ¢ãƒªã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ãŸã‚ã€ãƒ¡ãƒ¢ãƒªä¸è¶³ã®ä¾‹å¤–を引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ | +| query_retries | int | 2 | `query`リクエストã®æœ€å¤§ãƒªãƒˆãƒ©ã‚¤å›žæ•°ã€‚リトライå¯èƒ½ãªHTTPレスãƒãƒ³ã‚¹ã®ã¿ãŒãƒªãƒˆãƒ©ã‚¤ã•ã‚Œã¾ã™ã€‚`command`ã¾ãŸã¯`insert`リクエストã¯ã€æ„図ã—ãªã„é‡è¤‡ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’防ããŸã‚ã€ãƒ‰ãƒ©ã‚¤ãƒã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«ãƒªãƒˆãƒ©ã‚¤ã•ã‚Œã¾ã›ã‚“。 | +| connect_timeout | int | 10 | HTTP接続タイムアウト(秒)。 | +| send_receive_timeout | int | 300 | HTTP接続ã®é€å—信タイムアウト(秒)。 | +| client_name | str | *None* | HTTPã®User Agentヘッダーã«å…ˆè¡Œã™ã‚‹client_nameã‚ã‚Šã¾ã™ã€‚ClickHouseã®system.query_logã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¯ã‚¨ãƒªã‚’追跡ã™ã‚‹ãŸã‚ã«ã“れを設定ã—ã¾ã™ã€‚ | +| pool_mgr | obj | *<デフォルトã®PoolManager>* | `urllib3`ライブラリã®PoolManagerを使用ã—ã¾ã™ã€‚ç•°ãªã‚‹ãƒ›ã‚¹ãƒˆã¸ã®è¤‡æ•°ã®æŽ¥ç¶šãƒ—ールを必è¦ã¨ã™ã‚‹é«˜åº¦ãªä½¿ã„æ–¹ãŒå¿…è¦ãªå ´åˆã«ä½¿ç”¨ã—ã¾ã™ã€‚ | +| http_proxy | str | *None* | HTTPプロキシアドレス(HTTP_PROXY環境変数を設定ã™ã‚‹ã®ã¨åŒæ§˜ï¼‰ã€‚ | +| https_proxy | str | *None* | HTTPSプロキシアドレス(HTTPS_PROXY環境変数を設定ã™ã‚‹ã®ã¨åŒæ§˜ï¼‰ã€‚ | +| apply_server_timezone | bool | True | タイムゾーン対応ã®ã‚¯ã‚¨ãƒªçµæžœã«ã‚µãƒ¼ãƒãƒ¼ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’使用ã—ã¾ã™ã€‚ [Timezone Precedence](#time-zones) ã‚’å‚ç…§ | + +#### HTTPS/TLS 引数 + +| パラメータ | タイプ | デフォルト | 説明 | +|------------------|------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| verify | bool | True | HTTPS/TLSを使用ã™ã‚‹å ´åˆã€ClickHouseサーãƒãƒ¼TLS/SSL証明書(ホストåã€æœ‰åŠ¹æœŸé™ãªã©ï¼‰ã‚’検証ã—ã¾ã™ã€‚ | +| ca_cert | str | *None* | *verify*=*True*ã®å ´åˆã€ClickHouseサーãƒãƒ¼è¨¼æ˜Žæ›¸ã‚’検証ã™ã‚‹ãŸã‚ã®èªè¨¼å±€ãƒ«ãƒ¼ãƒˆã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘ス(.pemå½¢å¼ï¼‰ã€‚verifyãŒFalseã®å ´åˆã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ClickHouseサーãƒãƒ¼è¨¼æ˜Žæ›¸ãŒã‚°ãƒ­ãƒ¼ãƒãƒ«ã«ä¿¡é ¼ã•ã‚Œã¦ã„るルートã§ã‚ã‚‹å ´åˆã€èªè¨¼ãŒä¸è¦ã§ã™ã€‚ | +| client_cert | str | *None* | TLSクライアント証明書ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘ス(.pemå½¢å¼ï¼‰ã€‚(åŒæ–¹å‘TLSèªè¨¼ç”¨ï¼‰ã€‚ファイルã«ã¯ä¸­é–“証明書をå«ã‚€å®Œå…¨ãªè¨¼æ˜Žæ›¸ãƒã‚§ãƒ¼ãƒ³ãŒå«ã¾ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ | +| client_cert_key | str | *None* | クライアント証明書ã®ç§˜å¯†éµã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘ス。秘密éµãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè¨¼æ˜Žæ›¸ãƒ•ã‚¡ã‚¤ãƒ«ã«å«ã¾ã‚Œã¦ã„ãªã„å ´åˆã«å¿…è¦ã§ã™ã€‚ | +| server_host_name | str | *None* | プロキシã¾ãŸã¯ç•°ãªã‚‹ãƒ›ã‚¹ãƒˆåã®ãƒˆãƒ³ãƒãƒ«ã‚’介ã—ã¦æŽ¥ç¶šã™ã‚‹éš›ã«SSLエラーを回é¿ã™ã‚‹ãŸã‚ã«è¨­å®šã™ã‚‹TLS証明書ã®CNã¾ãŸã¯SNIã¨ã—ã¦è­˜åˆ¥ã•ã‚Œã‚‹ClickHouseサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå | +| tls_mode | str | *None* | 高度ãªTLS 動作を制御ã—ã¾ã™ã€‚`proxy` ãŠã‚ˆã³ `strict` 㯠ClickHouse ã®åŒæ–¹å‘ TLS 接続を呼ã³å‡ºã—ã¾ã›ã‚“ãŒã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè¨¼æ˜Žæ›¸ã¨ã‚­ãƒ¼ã‚’é€ä¿¡ã—ã¾ã™ã€‚ `mutual` ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè¨¼æ˜Žæ›¸ã«ã‚ˆã‚‹ ClickHouse åŒæ–¹å‘TLSèªè¨¼ã‚’想定ã—ã¦ã„ã¾ã™ã€‚*None*/デフォルトã®å‹•ä½œã¯ `mutual` ã§ã™ã€‚ | + +#### 設定引数 + +最後ã«ã€`get_client`ã®`settings`引数ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆã”ã¨ã«ã‚µãƒ¼ãƒãƒ¼ã«è¿½åŠ ã®ClickHouse設定を渡ã™ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã»ã¨ã‚“ã©ã®ã‚¯ã‚¨ãƒªã§*readonly*=*1*アクセスをæŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è¨­å®šã‚’変更ã§ããªã„ã®ã§æ³¨æ„ã—ã¦ãã ã•ã„。ãã®ãŸã‚ã€ClickHouse Connectã¯ãã®ã‚ˆã†ãªè¨­å®šã‚’最終リクエストã§ãƒ‰ãƒ­ãƒƒãƒ—ã—ã€è­¦å‘Šã‚’ログã«è¨˜éŒ²ã—ã¾ã™ã€‚以下ã®è¨­å®šã¯ã€ClickHouse Connectã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã‚‹HTTPクエリ/セッションã«ã®ã¿é©ç”¨ã•ã‚Œã€ä¸€èˆ¬çš„ãªClickHouse設定ã¨ã—ã¦ã¯æ–‡æ›¸åŒ–ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +| 設定 | 説明 | +|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| buffer_size | ClickHouseサーãƒãƒ¼ãŒHTTPãƒãƒ£ãƒãƒ«ã«æ›¸ã込むå‰ã«ä½¿ç”¨ã™ã‚‹ãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ | +| session_id | サーãƒãƒ¼ä¸Šã®é–¢é€£ã‚¯ã‚¨ãƒªã‚’関連付ã‘ã‚‹ãŸã‚ã®ä¸€æ„ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ID。仮ã®ãƒ†ãƒ¼ãƒ–ルã«å¿…è¦ã€‚ | +| compress | ClickHouseサーãƒãƒ¼ãŒPOST応答データを圧縮ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã©ã†ã‹ã€‚ã“ã®è¨­å®šã¯ã€"raw"クエリã«ã®ã¿ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ | +| decompress | ClickHouseサーãƒãƒ¼ã«é€ä¿¡ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’解å‡ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã©ã†ã‹ã€‚ã“ã®è¨­å®šã¯ã€"raw"挿入ã«ã®ã¿ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ | +| quota_key | ã“ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«é–¢é€£ä»˜ã‘られãŸã‚¯ã‚©ãƒ¼ã‚¿ã‚­ãƒ¼ã€‚ClickHouseサーãƒãƒ¼ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆå†…ã®ã‚¯ã‚©ãƒ¼ã‚¿ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | +| session_check | セッションステータスをãƒã‚§ãƒƒã‚¯ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ | +| session_timeout | セッションIDã§è­˜åˆ¥ã•ã‚Œã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã—ã€æœ‰åŠ¹ã§ãªããªã£ãŸã¨ã¿ãªã•ã‚Œã‚‹ã¾ã§ã®éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–状態ã®ç§’数。デフォルトã¯60秒ã§ã™ã€‚ | +| wait_end_of_query | ClickHouseサーãƒãƒ¼ã§å¿œç­”全体をãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€ã‚µãƒžãƒªãƒ¼æƒ…報を返ã™ãŸã‚ã«å¿…è¦ã§ã€ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œãªã„クエリã§è‡ªå‹•çš„ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ | + +クエリã¨ã¨ã‚‚ã«é€ä¿¡ã§ãã‚‹ä»–ã®ClickHouse設定ã«ã¤ã„ã¦ã¯ã€[ClickHouseã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](/docs/ja/operations/settings/settings.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### クライアント作æˆä¾‹ + +- ã™ã¹ã¦ã®ãƒ‘ラメータを指定ã—ãªã„å ´åˆã€ClickHouse Connect クライアントã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®HTTPãƒãƒ¼ãƒˆã§`localhost`ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§æŽ¥ç¶šã—ã¾ã™ï¼š + +```python +import clickhouse_connect + +client = clickhouse_connect.get_client() +client.server_version +Out[2]: '22.10.1.98' +``` + +- セキュアãªï¼ˆhttps)外部ClickHouseサーãƒãƒ¼ã¸ã®æŽ¥ç¶š + +```python +import clickhouse_connect + +client = clickhouse_connect.get_client(host='play.clickhouse.com', secure=True, port=443, user='play', password='clickhouse') +client.command('SELECT timezone()') +Out[2]: 'Etc/UTC' +``` + +- セッションIDã‚„ãã®ä»–ã®ã‚«ã‚¹ã‚¿ãƒ æŽ¥ç¶šãƒ‘ラメータã€ClickHouse設定を使用ã—ãŸæŽ¥ç¶šã€‚ + +```python +import clickhouse_connect + +client = clickhouse_connect.get_client(host='play.clickhouse.com', + user='play', + password='clickhouse', + port=443, + session_id='example_session_1', + connect_timeout=15, + database='github', + settings={'distributed_ddl_task_timeout':300}) +client.database +Out[2]: 'github' +``` + +### 共通メソッド引数 + +ã„ãã¤ã‹ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€å…±é€šã®`parameters`ãŠã‚ˆã³`settings`引数を使用ã—ã¾ã™ã€‚ã“れらã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰å¼•æ•°ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™ã€‚ + +#### パラメータ引数 + +ClickHouse Connect Clientã®`query*`ãŠã‚ˆã³`command`メソッドã¯ã€ClickHouse値å¼ã«Python表ç¾ã‚’ãƒã‚¤ãƒ³ãƒ‰ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚ªãƒ—ションã®`parameters`キーワード引数をå—ã‘å–ã‚Šã¾ã™ã€‚二ã¤ã®ãƒã‚¤ãƒ³ãƒ‰æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚ + +##### サーãƒãƒ¼ã‚µã‚¤ãƒ‰ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° + +ClickHouseã¯ã»ã¨ã‚“ã©ã®ã‚¯ã‚¨ãƒªå€¤ã«å¯¾ã—ã¦[サーãƒãƒ¼ã‚µã‚¤ãƒ‰ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°](/docs/ja/interfaces/cli.md#cli-queries-with-parameters)をサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ãƒã‚¤ãƒ³ãƒ‰ã•ã‚ŒãŸå€¤ã¯ã‚¯ã‚¨ãƒªã¨ã¯åˆ¥ã«HTTPクエリパラメータã¨ã—ã¦é€ä¿¡ã•ã‚Œã¾ã™ã€‚ClickHouse Connectã¯ã€ãƒã‚¤ãƒ³ãƒ‰å¼ãŒ{<name>:<datatype>}ã®å½¢å¼ã§ã‚ã‚‹ã“ã¨ã‚’検出ã—ãŸå ´åˆã€é©åˆ‡ãªã‚¯ã‚¨ãƒªãƒ‘ラメータを追加ã—ã¾ã™ã€‚サーãƒãƒ¼ã‚µã‚¤ãƒ‰ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã®å ´åˆã€`parameters`引数ã¯Pythonã®Dictionaryã§ã‚ã‚‹ã¹ãã§ã™ã€‚ + +- PythonDictionaryを使用ã—ãŸã‚µãƒ¼ãƒãƒ¼ã‚µã‚¤ãƒ‰ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã€DateTime値ã€ãŠã‚ˆã³æ–‡å­—列値 + +```python +import datetime + +my_date = datetime.datetime(2022, 10, 1, 15, 20, 5) + +parameters = {'table': 'my_table', 'v1': my_date, 'v2': "a string with a single quote'"} +client.query('SELECT * FROM {table:Identifier} WHERE date >= {v1:DateTime} AND string ILIKE {v2:String}', parameters=parameters) + +# サーãƒãƒ¼ã§ç”Ÿæˆã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ã€‚ +# SELECT * FROM my_table WHERE date >= '2022-10-01 15:20:05' AND string ILIKE 'a string with a single quote\'' +``` + +**é‡è¦** -- サーãƒãƒ¼ã‚µã‚¤ãƒ‰ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã¯ã€ClickHouseサーãƒãƒ¼ã«ã‚ˆã£ã¦`SELECT`クエリã®ã¿ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ä»–ã®ã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—(`ALTER`ã€`DELETE`ã€`INSERT`ãªã©ï¼‰ã«ã¯å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“。ã“ã®ç‚¹ã¯å°†æ¥çš„ã«å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼šhttps://github.com/ClickHouse/ClickHouse/issues/42092 ã‚’å‚照。 + +##### クライアントサイドãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° + +ClickHouse Connectã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µã‚¤ãƒ‰ã®ãƒ‘ラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚‚サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ãƒ†ãƒ³ãƒ—レート化ã•ã‚ŒãŸSQLクエリを生æˆã™ã‚‹éš›ã®æŸ”軟性をå‘上ã•ã›ã¾ã™ã€‚クライアントサイドãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã®å ´åˆã€`parameters`引数ã¯Dictionaryã¾ãŸã¯ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§ã‚ã‚‹ã¹ãã§ã™ã€‚クライアントサイドãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã¯ã€Pythonã®[「printfã€ã‚¹ã‚¿ã‚¤ãƒ«](https://docs.python.org/3/library/stdtypes.html#old-string-formatting)文字列フォーマットを使用ã—ã¦ãƒ‘ラメータを置æ›ã—ã¾ã™ã€‚ + +サーãƒãƒ¼ã‚µã‚¤ãƒ‰ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã¨ã¯ç•°ãªã‚Šã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è­˜åˆ¥å­ï¼ˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãƒ†ãƒ¼ãƒ–ルã€ã‚«ãƒ©ãƒ åãªã©ï¼‰ã«ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µã‚¤ãƒ‰ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãŒæ©Ÿèƒ½ã—ãªã„ãŸã‚注æ„ãŒå¿…è¦ã§ã™ã€‚Pythonスタイルã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ç•°ãªã‚‹ã‚¿ã‚¤ãƒ—ã®æ–‡å­—列を区別ã§ããªã„ãŸã‚ã€ã“れらã¯ç•°ãªã‚‹æ–¹æ³•ã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è­˜åˆ¥å­ã«ã¯é€†ã‚¢ã‚¯ã‚»ãƒ³ãƒˆã¾ãŸã¯ãƒ€ãƒ–ルクォートã€ãƒ‡ãƒ¼ã‚¿å€¤ã«ã¯ã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚©ãƒ¼ãƒˆãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼‰ã€‚ + +- PythonDictionaryã€DateTime値ã€æ–‡å­—列エスケープを用ã„ãŸä¾‹ + +```python +import datetime + +my_date = datetime.datetime(2022, 10, 1, 15, 20, 5) + +parameters = {'v1': my_date, 'v2': "a string with a single quote'"} +client.query('SELECT * FROM some_table WHERE date >= %(v1)s AND string ILIKE %(v2)s', parameters=parameters) + +# 以下ã®ã‚¯ã‚¨ãƒªã‚’生æˆ: +# SELECT * FROM some_table WHERE date >= '2022-10-01 15:20:05' AND string ILIKE 'a string with a single quote\'' +``` + +- Pythonシーケンス(タプル)ã€Float64ã€ãŠã‚ˆã³IPv4Addressを用ã„ãŸä¾‹ + +```python +import ipaddress + +parameters = (35200.44, ipaddress.IPv4Address(0x443d04fe)) +client.query('SELECT * FROM some_table WHERE metric >= %s AND ip_address = %s', parameters=parameters) + +# 以下ã®ã‚¯ã‚¨ãƒªã‚’生æˆ: +# SELECT * FROM some_table WHERE metric >= 35200.44 AND ip_address = '68.61.4.254'' +``` + +:::note +DateTime64引数(サブ秒精度をå«ã‚€ClickHouseタイプ)をãƒã‚¤ãƒ³ãƒ‰ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã„ãšã‚Œã‹ã®ã‚«ã‚¹ã‚¿ãƒ ã‚¢ãƒ—ローãƒãŒå¿…è¦ã§ã™: +- Pythonã®`datetime.datetime`値を新ã—ã„DT64Paramクラスã§ãƒ©ãƒƒãƒ—ã—ã¾ã™ã€‚例 + ```python + query = 'SELECT {p1:DateTime64(3)}' # Dictionaryを使ã£ãŸã‚µãƒ¼ãƒãƒ¼ã‚µã‚¤ãƒ‰ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° + parameters={'p1': DT64Param(dt_value)} + + query = 'SELECT %s as string, toDateTime64(%s,6) as dateTime' # リストを使ã£ãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µã‚¤ãƒ‰ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° + parameters=['a string', DT64Param(datetime.now())] + ``` + - パラメータ値ã®Dictionaryを使ã†å ´åˆã€ãƒ‘ラメータåã«æ–‡å­—列 `_64` を付加ã—ã¾ã™ + ```python + query = 'SELECT {p1:DateTime64(3)}, {a1:Array(DateTime(3))}' # Dictionaryを使ã£ãŸã‚µãƒ¼ãƒãƒ¼ã‚µã‚¤ãƒ‰ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚° + + parameters={'p1_64': dt_value, 'a1_64': [dt_value1, dt_value2]} + ``` +::: + +#### 設定引数 + +ã™ã¹ã¦ã®ä¸»è¦ãªClickHouse Connectクライアントã®ã€ŒæŒ¿å…¥ã€ã¨ã€Œé¸æŠžã€ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€æ¸¡ã•ã‚ŒãŸSQLæ–‡ã«å¯¾ã™ã‚‹ClickHouseサーãƒãƒ¼ã®[ユーザー設定](/docs/ja/operations/settings/settings.md)を渡ã™ãŸã‚ã®ã‚ªãƒ—ションã®`settings`キーワード引数をå—ã‘å–ã‚Šã¾ã™ã€‚`settings`引数ã¯Dictionaryã§ã‚ã‚‹ã¹ãã§ã™ã€‚å„アイテムã¯ã€ClickHouse設定åã¨ãã®é–¢é€£ã™ã‚‹å€¤ã§ã‚ã‚‹ã¹ãã§ã™ã€‚設定ãŒã‚µãƒ¼ãƒãƒ¼ã«ã‚¯ã‚¨ãƒªãƒ‘ラメータã¨ã—ã¦é€ä¿¡ã•ã‚Œã‚‹éš›ã«ã€å€¤ã¯æ–‡å­—列ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +クライアントレベル設定ã¨åŒæ§˜ã«ã€ClickHouse Connectã¯ã€ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦*readonly*=*1*ã¨ãƒžãƒ¼ã‚¯ã•ã‚ŒãŸè¨­å®šã‚’ドロップã—ã€é–¢é€£ã™ã‚‹ãƒ­ã‚°ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’出力ã—ã¾ã™ã€‚HTTPインターフェースを介ã—ãŸã‚¯ã‚¨ãƒªã«ã®ã¿é©ç”¨ã•ã‚Œã‚‹è¨­å®šã¯å¸¸ã«æœ‰åŠ¹ã§ã™ã€‚ãれらã®è¨­å®šã«ã¤ã„ã¦ã¯`get_client` [API](#settings-argument)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ClickHouse設定を使用ã—ãŸä¾‹ï¼š + +```python +settings = {'merge_tree_min_rows_for_concurrent_read': 65535, + 'session_id': 'session_1234', + 'use_skip_indexes': False} +client.query("SELECT event_type, sum(timeout) FROM event_errors WHERE event_time > '2022-08-01'", settings=settings) +``` + +### クライアント_command_ メソッド + +`Client.command`メソッドを使用ã—ã¦ã€é€šå¸¸ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã•ãªã„ã¾ãŸã¯å˜ä¸€ã®ãƒ—リミティブã¾ãŸã¯é…列値を返ã™SQLクエリをClickHouseサーãƒãƒ¼ã«é€ä¿¡ã—ã¾ã™ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®ãƒ‘ラメータをå–ã‚Šã¾ã™ï¼š + +| パラメータ | タイプ | デフォルト | 説明 | +|---------------|------------------|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------| +| cmd | str | *å¿…é ˆ* | å˜ä¸€ã®å€¤ã¾ãŸã¯å˜ä¸€è¡Œã®å€¤ã‚’è¿”ã™ClickHouse SQLステートメント。 | | +| parameters | dictã¾ãŸã¯iterable | *None* | [parameters description](#parameters-argument)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | +| data | strã¾ãŸã¯bytes | *None* | コマンドã¨ã¨ã‚‚ã«POST本文ã¨ã—ã¦å«ã‚るオプションã®ãƒ‡ãƒ¼ã‚¿ã€‚ | +| settings | dict | *None* | [settings description](#settings-argument)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | +| use_database | bool | True | クライアントデータベース(クライアントを作æˆã™ã‚‹éš›ã«æŒ‡å®šã•ã‚ŒãŸï¼‰ã‚’使用ã—ã¾ã™ã€‚Falseã®å ´åˆã€ã‚³ãƒžãƒ³ãƒ‰ã¯æŽ¥ç¶šã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆClickHouseサーãƒãƒ¼ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’使用ã—ã¾ã™ã€‚ | +| external_data | ExternalData | *None* | クエリã§ä½¿ç”¨ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ExternalDataオブジェクト。[Advanced Queries (External Data)](#external-data)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | + +- _command_ã¯ã€DDLステートメントã«ä½¿ç”¨ã§ãã¾ã™ã€‚SQL "コマンド"ãŒãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã•ãªã„å ´åˆã€ClickHouse X-ClickHouse-SummaryãŠã‚ˆã³X-ClickHouse-Query-Idヘッダーã®ã‚­ãƒ¼/値ペア`written_rows`ã€`written_bytes`ã€ãŠã‚ˆã³`query_id`ã‚’å«ã‚€"クエリサマリー"DictionaryãŒä»£ã‚ã‚Šã«è¿”ã•ã‚Œã¾ã™ã€‚ + +```python +client.command('CREATE TABLE test_command (col_1 String, col_2 DateTime) Engine MergeTree ORDER BY tuple()') +client.command('SHOW CREATE TABLE test_command') +Out[6]: 'CREATE TABLE default.test_command\\n(\\n `col_1` String,\\n `col_2` DateTime\\n)\\nENGINE = MergeTree\\nORDER BY tuple()\\nSETTINGS index_granularity = 8192' +``` + +- _command_ã¯ã€å˜ä¸€è¡Œã®ã¿ã‚’è¿”ã™å˜ç´”ãªã‚¯ã‚¨ãƒªã«ã‚‚使用ã§ãã¾ã™ã€‚ + +```python +result = client.command('SELECT count() FROM system.tables') +result +Out[7]: 110 +``` + +### クライアント_query_ メソッド + +`Client.query`メソッドã¯ã€ClickHouseサーãƒãƒ¼ã‹ã‚‰å˜ä¸€ã®"ãƒãƒƒãƒ"データセットをå–å¾—ã™ã‚‹ãŸã‚ã®ä¸»è¦ãªæ–¹æ³•ã§ã™ã€‚ +ã“ã‚Œã¯ã€ClickHouseã®ãƒã‚¤ãƒ†ã‚£ãƒ–å½¢å¼ã‚’HTTP経由ã§ä½¿ç”¨ã—ã¦ã€å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆï¼ˆæœ€å¤§ç´„100万行)を効率的ã«è»¢é€ã—ã¾ã™ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚ + +| パラメータ | タイプ | デフォルト | 説明 | +|-----------------------|------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| query | str | *å¿…é ˆ* | ClickHouse SQLã®SELECTã¾ãŸã¯DESCRIBEクエリ。 | +| parameters | dictã¾ãŸã¯iterable | *None* | [parameters description](#parameters-argument)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | +| settings | dict | *None* | [settings description](#settings-argument)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | | +| query_formats | dict | *None* | çµæžœå€¤ã®ãƒ‡ãƒ¼ã‚¿åž‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæŒ‡å®šã€‚Advanced Usage (Read Formats)ã‚’å‚照。 | +| column_formats | dict | *None* | カラムã”ã¨ã®ãƒ‡ãƒ¼ã‚¿åž‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚Advanced Usage (Read Formats)ã‚’å‚照。 | +| encoding | str | *None* | ClickHouse StringカラムをPython文字列ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€‚Pythonã¯è¨­å®šã—ã¦ã„ãªã„å ´åˆã€`UTF-8`を使用ã—ã¾ã™ã€‚ | +| use_none | bool | True | ClickHouseã®NULLã«å¯¾ã—ã¦Pythonã®*None*タイプを使用ã—ã¾ã™ã€‚Falseã®å ´åˆã€ClickHouseã®NULLã«å¯¾ã—ã¦ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼ˆãŸã¨ãˆã°0)を使用ã—ã¾ã™ã€‚注:パフォーマンス上ã®ç†ç”±ã‹ã‚‰numpy/Pandasã§ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯Falseã§ã™ã€‚ | +| column_oriented | bool | False | çµæžœã‚’列ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚Pythonデータを他ã®åˆ—指å‘データ形å¼ã«å¤‰æ›ã™ã‚‹éš›ã«ä¾¿åˆ©ã§ã™ã€‚ | +| query_tz | str | *None* | zoneinfoデータベースã‹ã‚‰ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å。ã“ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹ã™ã¹ã¦ã®datetimeã¾ãŸã¯Pandas Timestampオブジェクトã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ | +| column_tzs | dict | *None* | カラムåã¨ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³åã®Dictionary。`query_tz`ã«ä¼¼ã¦ã„ã¾ã™ãŒã€ç•°ãªã‚‹ã‚«ãƒ©ãƒ ã«ç•°ãªã‚‹ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’指定ã§ãã¾ã™ã€‚ | +| use_extended_dtypes | bool | True | Pandasã®æ‹¡å¼µãƒ‡ãƒ¼ã‚¿åž‹ï¼ˆStringArrayãªã©ï¼‰ãŠã‚ˆã³ClickHouseã®NULL値ã«å¯¾ã™ã‚‹pandas.NAãŠã‚ˆã³pandas.NaTを使用ã—ã¾ã™ã€‚主ã«`query_df`ãŠã‚ˆã³`query_df_stream`メソッドã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ | +| external_data | ExternalData | *None* | クエリã«ä½¿ç”¨ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ExternalDataオブジェクト。[Advanced Queries (External Data)](#external-data)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | +| context | QueryContext | *None* | 上記ã®ãƒ¡ã‚½ãƒƒãƒ‰å¼•æ•°ã‚’カプセル化ã™ã‚‹å†åˆ©ç”¨å¯èƒ½ãªQueryContextオブジェクトを使用ã§ãã¾ã™ã€‚ [Advanced Queries (QueryContexts)](#querycontexts)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | + +#### QueryResult オブジェクト + +基本的ãª`query`メソッドã¯ã€ä»¥ä¸‹ã®å…¬é–‹ãƒ—ロパティをæŒã¤QueryResultオブジェクトを返ã—ã¾ã™ï¼š + +- `result_rows` -- シーケンスã¨ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ã€‚å„è¡Œè¦ç´ ãŒåˆ—値ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§ã‚ã‚‹è¡Œã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€‚ +- `result_columns` -- シーケンスã¨ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ã€‚å„列è¦ç´ ãŒãã®ã‚«ãƒ©ãƒ ã«å¯¾ã™ã‚‹è¡Œå€¤ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§ã‚る列ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€‚ +- `column_names` -- `result_set`内ã®åˆ—åを表ã™æ–‡å­—列ã®ã‚¿ãƒ—ル +- `column_types` -- `result_columns`内ã®å„列ã«å¯¾ã™ã‚‹ClickHouseデータ型を表ã™ClickHouseTypeインスタンスã®ã‚¿ãƒ—ル +- `query_id` -- ClickHouseã®query_id(`system.query_log`テーブルã§ã®ã‚¯ã‚¨ãƒªè¡¨ç¤ºã«ä¾¿åˆ©ã§ã™ï¼‰ +- `summary` -- `X-ClickHouse-Summary` HTTPレスãƒãƒ³ã‚¹ãƒ˜ãƒƒãƒ€ãƒ¼ã«ã‚ˆã£ã¦è¿”ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ +- `first_item` -- 応答ã®æœ€åˆã®è¡Œã‚’Dictionaryã¨ã—ã¦å–å¾—ã™ã‚‹ãŸã‚ã®ä¾¿åˆ©ãªãƒ—ロパティ(キーã¯ã‚«ãƒ©ãƒ åã§ã™ï¼‰ +- `first_row` -- çµæžœã®æœ€åˆã®è¡Œã‚’è¿”ã™ãŸã‚ã®ä¾¿åˆ©ãªãƒ—ロパティ +- `column_block_stream` -- 列指å‘フォーマットã§ã‚¯ã‚¨ãƒªçµæžœã‚’è¿”ã™ã‚¸ã‚§ãƒãƒ¬ãƒ¼ã‚¿ã€‚ã“ã®ãƒ—ロパティã¯ç›´æŽ¥å‚ç…§ã™ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“(以下をå‚照)。 +- `row_block_stream` -- 行指å‘フォーマットã§ã‚¯ã‚¨ãƒªçµæžœã‚’è¿”ã™ã‚¸ã‚§ãƒãƒ¬ãƒ¼ã‚¿ã€‚ã“ã®ãƒ—ロパティã¯ç›´æŽ¥å‚ç…§ã™ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“(以下をå‚照)。 +- `rows_stream` -- クエリçµæžœã‚’1回ã®å‘¼ã³å‡ºã—ã§1è¡Œãšã¤ç”Ÿæˆã™ã‚‹ã‚¸ã‚§ãƒãƒ¬ãƒ¼ã‚¿ã€‚ã“ã®ãƒ—ロパティã¯ç›´æŽ¥å‚ç…§ã™ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“(以下をå‚照)。 +- `summary` -- `command`メソッドã§èª¬æ˜Žã•ã‚Œã¦ã„る通りã€ClickHouseã‹ã‚‰è¿”ã•ã‚Œã‚‹ã‚µãƒžãƒªãƒ¼æƒ…å ±ã®Dictionary + +`*_stream`プロパティã¯ã€è¿”ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ†ãƒ¬ãƒ¼ã‚¿ã¨ã—ã¦ä½¿ç”¨ã§ãã‚‹Python Contextã‚’è¿”ã—ã¾ã™ã€‚ãれらã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ`*_stream`メソッドを使用ã—ã¦é–“接的ã«ã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ストリーミングクエリçµæžœï¼ˆStreamContextオブジェクトを使用)を完全ã«ç†è§£ã™ã‚‹ã«ã¯ã€[Advanced Queries (Streaming Queries)](#streaming-queries)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### Numpyã€Pandasã€ã¾ãŸã¯Arrowを使用ã—ãŸã‚¯ã‚¨ãƒªçµæžœã®æ¶ˆè²» + +主è¦ãª`query`メソッドã®æ´¾ç”Ÿãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒ3ã¤ã‚ã‚Šã¾ã™ï¼š + +- `query_np` -- ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ClickHouse Connect QueryResultã®ä»£ã‚ã‚Šã«Numpyé…列を返ã—ã¾ã™ã€‚ +- `query_df` -- ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ClickHouse Connect QueryResultã®ä»£ã‚ã‚Šã«Pandasデータフレームを返ã—ã¾ã™ã€‚ +- `query_arrow` -- ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯PyArrowã®ãƒ†ãƒ¼ãƒ–ルを返ã—ã¾ã™ã€‚ClickHouseã®`Arrow`フォーマットを直接使用ã—ã€ä¸»è¦ãª`query`メソッドã¨å…±é€šã®3ã¤ã®å¼•æ•°ã®ã¿ã‚’å—ã‘å–ã‚Šã¾ã™ï¼š`query`ã€`parameters`ã€ãŠã‚ˆã³`settings`。ã¾ãŸã€`use_strings`ã¨ã„ã†è¿½åŠ ã®å¼•æ•°ãŒã‚ã‚Šã€ArrowテーブルãŒClickHouseã®æ–‡å­—列型を文字列(Trueã®å ´åˆï¼‰ã¾ãŸã¯ãƒã‚¤ãƒˆï¼ˆFalseã®å ´åˆï¼‰ã¨ã—ã¦è¡¨ç¾ã™ã‚‹ã‹ã©ã†ã‹ã‚’決定ã—ã¾ã™ã€‚ + +### クライアントストリーミングクエリメソッド + +ClickHouse Connect クライアントã¯ã‚¹ãƒˆãƒªãƒ¼ãƒ ã¨ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ï¼ˆPythonã®ã‚¸ã‚§ãƒãƒ¬ãƒ¼ã‚¿ã¨ã—ã¦å®Ÿè£…ã•ã‚ŒãŸï¼‰ãŸã‚ã®è¤‡æ•°ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’æä¾›ã—ã¾ã™ï¼š + +- `query_column_block_stream` -- ãƒã‚¤ãƒ†ã‚£ãƒ–Pythonオブジェクトを使用ã—ã¦ã€åˆ—ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦ã‚¯ã‚¨ãƒªãƒ‡ãƒ¼ã‚¿ã‚’ブロックã§è¿”ã—ã¾ã™ã€‚ +- `query_row_block_stream` -- ãƒã‚¤ãƒ†ã‚£ãƒ–Pythonオブジェクトを使用ã—ã¦ã€è¡Œã®ãƒ–ロックã¨ã—ã¦ã‚¯ã‚¨ãƒªãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ã€‚ +- `query_rows_stream` -- ãƒã‚¤ãƒ†ã‚£ãƒ–Pythonオブジェクトを使用ã—ã¦ã€è¡Œã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦ã‚¯ã‚¨ãƒªãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ã€‚ +- `query_np_stream` -- å„ClickHouseクエリデータブロックをNumpyé…列ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ +- `query_df_stream` -- å„ClickHouseブロックã®ã‚¯ã‚¨ãƒªãƒ‡ãƒ¼ã‚¿ã‚’Pandasデータフレームã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ +- `query_arrow_stream` -- PyArrow RecordBlocksã¨ã—ã¦ã‚¯ã‚¨ãƒªãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã®å„々ã¯ã€æ¶ˆè²»ã‚’開始ã™ã‚‹ãŸã‚ã«`with`ステートメントを通ã—ã¦é–‹ãå¿…è¦ãŒã‚ã‚‹`ContextStream`オブジェクトを返ã—ã¾ã™ã€‚詳細ã¨ä¾‹ã¯[Advanced Queries (Streaming Queries)](#streaming-queries)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### クライアント_insert_ メソッド + +ClickHouseã«è¤‡æ•°ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’挿入ã™ã‚‹ä¸€èˆ¬çš„ãªãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã®ãŸã‚ã«ã€`Client.insert`メソッドãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®ãƒ‘ラメータをå—ã‘å–ã‚Šã¾ã™ï¼š + +| パラメータ | タイプ | デフォルト | 説明 | +|-------------------|-----------------------------------|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| table | str | *å¿…é ˆ* | 挿入ã™ã‚‹ClickHouseテーブル。データベースをå«ã‚€å®Œå…¨ãªãƒ†ãƒ¼ãƒ–ルåãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ | +| data | シーケンスã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ | *å¿…é ˆ* | データを挿入ã™ã‚‹è¡Œã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¾ãŸã¯åˆ—ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€‚å„è¡Œã¯åˆ—値ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€ã¾ãŸã¯åˆ—ã¯è¡Œå€¤ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§æ§‹æˆã•ã‚Œã¾ã™ã€‚ | +| column_names | strã¾ãŸã¯strã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ | '*' | データマトリックスã®åˆ—åã®ãƒªã‚¹ãƒˆã€‚'*'ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouse Connectã¯ã™ã¹ã¦ã®åˆ—åをテーブルã‹ã‚‰å–å¾—ã™ã‚‹ãŸã‚ã®"pre-query"を実行ã—ã¾ã™ã€‚ | +| database | str | '' | 挿入先ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ | +| column_types | ClickHouseTypeã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ | *None* | ClickHouseTypeインスタンスã®ãƒªã‚¹ãƒˆã€‚column_typesã¾ãŸã¯column_type_namesã®ã©ã¡ã‚‰ã‚‚指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouse Connectã¯ãƒ†ãƒ¼ãƒ–ルã®ã™ã¹ã¦ã®åˆ—åž‹ã‚’å–å¾—ã™ã‚‹ãŸã‚ã®"pre-query"を実行ã—ã¾ã™ã€‚ | +| column_type_names | ClickHouseåž‹åã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ | *None* | ClickHouseデータタイプåã®ãƒªã‚¹ãƒˆã€‚column_typesã¾ãŸã¯column_type_namesã®ã©ã¡ã‚‰ã‚‚指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouse Connectã¯ãƒ†ãƒ¼ãƒ–ルã®ã™ã¹ã¦ã®åˆ—åž‹ã‚’å–å¾—ã™ã‚‹ãŸã‚ã®"pre-query"を実行ã—ã¾ã™ã€‚ | +| column_oriented | bool | False | Trueã®å ´åˆã€`data`引数ã¯åˆ—ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦ä»®å®šã•ã‚Œï¼ˆæŠ˜ã‚Šè¿”ã—ã¯å¿…è¦ãªã„)ã€ãã†ã§ãªã„å ´åˆã¯`data`ã¯è¡Œã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚ | +| settings | dict | *None* | [settings description](#settings-argument)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | +| insert_context | InsertContext | *None* | 上記ã®ãƒ¡ã‚½ãƒƒãƒ‰å¼•æ•°ã‚’カプセル化ã™ã‚‹å†åˆ©ç”¨å¯èƒ½ãªInsertContextオブジェクト。 [Advanced Inserts (InsertContexts)](#insertcontexts)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯"クエリサマリー"Dictionaryã‚’è¿”ã—ã¾ã™ã€‚"command"メソッドã§èª¬æ˜Žã•ã‚ŒãŸé€šã‚Šã§ã™ã€‚挿入ãŒä½•ã‚‰ã‹ã®ç†ç”±ã§å¤±æ•—ã—ãŸå ´åˆã€ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +主è¦ãª`insert`メソッドã®æ´¾ç”Ÿãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒ2ã¤ã‚ã‚Šã¾ã™ï¼š + +- `insert_df` -- Pythonã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®ä»£ã‚ã‚Šã«ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®2番目ã®ãƒ‘ラメータã¯`df`引数をè¦æ±‚ã—ã€ãã‚Œã¯Pandas Dataframeインスタンスã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ClickHouse Connectã¯ã€Dataframeを列指å‘ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¨ã—ã¦è‡ªå‹•çš„ã«å‡¦ç†ã™ã‚‹ãŸã‚ã€`column_oriented`パラメータã¯ä¸è¦ã§ã™ã€‚ +- `insert_arrow` -- Pythonã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®ä»£ã‚ã‚Šã«ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯`arrow_table`ã‚’è¦æ±‚ã—ã¾ã™ã€‚ClickHouse Connectã¯Arrowテーブルを未変更ã®ã¾ã¾ClickHouseサーãƒãƒ¼ã«æ¸¡ã—ã€`table`ã¨`arrow_table`ã®ä»–ã«`database`ãŠã‚ˆã³`settings`引数ã®ã¿ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +*注æ„:* Numpy é…列ã¯æœ‰åŠ¹ãªã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§ã‚ã‚Šã€ä¸»è¦ãª`insert`メソッドã®`data`引数ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ãã®ãŸã‚ã€ç‰¹åŒ–ã•ã‚ŒãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ä¸è¦ã§ã™ã€‚ + +### ファイル挿入 + +`clickhouse_connect.driver.tools`ã«ã¯ã€æ—¢å­˜ã®ClickHouseテーブルã«ç›´æŽ¥ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ãŸã‚ã®`insert_file`メソッドãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚解æžã¯ClickHouseサーãƒãƒ¼ã«å§”ã­ã‚‰ã‚Œã¾ã™ã€‚`insert_file`ã¯æ¬¡ã®ãƒ‘ラメータをå—ã‘å–ã‚Šã¾ã™ï¼š + +| パラメータ | タイプ | デフォルト | 説明 | +|--------------|-----------------|-------------------|------------------------------------------------------------------------------------------------------------------------| +| client | Client | *å¿…é ˆ* | 挿入を行ã†`driver.Client ` | +| table | str | *å¿…é ˆ* | 挿入ã™ã‚‹ClickHouseテーブル。データベースをå«ã‚€å®Œå…¨ãªãƒ†ãƒ¼ãƒ–ルåãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ | +| file_path | str | *å¿…é ˆ* | データファイルã®ãƒã‚¤ãƒ†ã‚£ãƒ–ãªãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘ス | +| fmt | str | CSV, CSVWithNames | ファイルã®ClickHouse入力フォーマット。 `column_names`ãŒæä¾›ã•ã‚Œã¦ã„ãªã„å ´åˆã¯CSVWithNamesãŒæƒ³å®šã•ã‚Œã¾ã™ã€‚ | +| column_names | strã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ | *None* | データファイル内ã®åˆ—åリスト。列åã‚’å«ã‚€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ã¯å¿…é ˆã§ã¯ã‚ã‚Šã¾ã›ã‚“。 | +| database | str | *None* | テーブルã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚ テーブルãŒå®Œå…¨ã«è³‡æ ¼åŒ–ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€æŒ¿å…¥ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’使用ã—ã¾ã™ã€‚ | +| settings | dict | *None* | [settings description](#settings-argument)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | +| compression | str | *None* | Content-Encoding HTTPヘッダーã«ä½¿ç”¨ã•ã‚Œã‚‹ã€èªè­˜ã•ã‚ŒãŸClickHouse圧縮タイプ(zstd, lz4, gzip) | + +データãŒä¸æ•´åˆã§ã‚ã‚‹ã‹ã€æ—¥ä»˜/時刻ã®å½¢å¼ãŒç•°å¸¸ãªå½¢å¼ã§ã‚るファイルã®å ´åˆã€è¨­å®šï¼ˆ`input_format_allow_errors_num`ã¾ãŸã¯`input_format_allow_errors_ratio`ãªã©ï¼‰ã¯ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§èªè­˜ã•ã‚Œã¾ã™ã€‚ + +```python +import clickhouse_connect +from clickhouse_connect.driver.tools import insert_file + +client = clickhouse_connect.get_client() +insert_file(client, 'example_table', 'my_data.csv', + settings={'input_format_allow_errors_ratio': .2, + 'input_format_allow_errors_num': 5}) +``` + +### クエリçµæžœã®ãƒ•ã‚¡ã‚¤ãƒ«ã¨ã—ã¦ä¿å­˜ã™ã‚‹ + +ClickHouseã‹ã‚‰ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ç›´æŽ¥ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ストリーミングã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ãŸã‚ã«`raw_stream`メソッドを使用ã—ã¾ã™ã€‚例ã¨ã—ã¦ã€ã‚¯ã‚¨ãƒªçµæžœã‚’CSVファイルã«ä¿å­˜ã—ãŸã„å ´åˆã€ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã‚¹ãƒ‹ãƒšãƒƒãƒˆã‚’使用ã§ãã¾ã™ï¼š + +```python +import clickhouse_connect + +if __name__ == '__main__': + client = clickhouse_connect.get_client() + query = 'SELECT number, toString(number) AS number_as_str FROM system.numbers LIMIT 5' + fmt = 'CSVWithNames' # ã¾ãŸã¯ã€CSV, CSVWithNamesAndTypes, TabSeparated, etc. + stream = client.raw_stream(query=query, fmt=fmt) + with open("output.csv", "wb") as f: + for chunk in stream: + f.write(chunk) +``` + +上記ã®ã‚³ãƒ¼ãƒ‰ã¯ã€ä»¥ä¸‹ã®å†…容をæŒã¤`output.csv`ファイルを生æˆã—ã¾ã™ï¼š + +```csv +"number","number_as_str" +0,"0" +1,"1" +2,"2" +3,"3" +4,"4" +``` + +ã“ã‚Œã¨åŒæ§˜ã«ã€[TabSeparated](https://clickhouse.com/docs/ja/interfaces/formats#tabseparated)ã‚„ãã®ä»–ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚[データã®å…¥åŠ›ã¨å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ](https://clickhouse.com/docs/ja/interfaces/formats)ã§åˆ©ç”¨å¯èƒ½ãªã™ã¹ã¦ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚ªãƒ—ションã®æ¦‚è¦ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### 生ã®API + +ClickHouseデータã¨ãƒã‚¤ãƒ†ã‚£ãƒ–ã¾ãŸã¯ã‚µãƒ¼ãƒ‰ãƒ‘ーティーデータタイプãŠã‚ˆã³æ§‹é€ é–“ã®å¤‰æ›ã‚’å¿…è¦ã¨ã—ãªã„ユースケースã«å¯¾ã—ã¦ã€ClickHouse Connectクライアント㯠ClickHouse接続ã®ç›´æŽ¥ä½¿ç”¨ã®ãŸã‚ã®2ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’æä¾›ã—ã¾ã™ã€‚ + +#### クライアント_raw_query_ メソッド + +`Client.raw_query`メソッドã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆæŽ¥ç¶šã‚’使用ã—ã¦ClickHouse HTTPクエリインターフェースを直接使用ã§ãるよã†ã«ã—ã¾ã™ã€‚戻り値ã¯æœªå‡¦ç†ã®`bytes`オブジェクトã§ã™ã€‚パラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã€ã‚¨ãƒ©ãƒ¼å‡¦ç†ã€ãƒªãƒˆãƒ©ã‚¤ãŠã‚ˆã³è¨­å®šç®¡ç†ã‚’最å°é™ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã§æä¾›ã™ã‚‹ä¾¿åˆ©ãªãƒ©ãƒƒãƒ‘ーã§ã™ï¼š + +| パラメータ | タイプ | デフォルト | 説明 | +|---------------|------------------|------------|----------------------------------------------------------------------------------------------------------| +| query | str | *å¿…é ˆ* | 有効ãªClickHouseクエリ | +| parameters | dictã¾ãŸã¯iterable | *None* | [parameters description](#parameters-argument)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | +| settings | dict | *None* | [settings description](#settings-argument)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | | +| fmt | str | *None* | çµæžœã®bytesã®ClickHouse出力フォーマット。 (指定ã•ã‚Œãªã„å ´åˆã€ClickHouseã¯TSVを使用ã—ã¾ã™ï¼‰ | +| use_database | bool | True | クエリコンテキストã®ãŸã‚ã«clickhouse-connectクライアントãŒå‰²ã‚Šå½“ã¦ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’使用 | +| external_data | ExternalData | *None* | クエリã§ä½¿ç”¨ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ExternalDataオブジェクト。[Advanced Queries (External Data)](#external-data)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。| + +çµæžœã®`bytes`オブジェクトを処ç†ã™ã‚‹ã®ã¯å‘¼ã³å‡ºã—å´ã®è²¬ä»»ã§ã™ã€‚`Client.query_arrow`ã¯ClickHouseã®`Arrow`出力フォーマットを使用ã—ã¦ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®è–„ã„ラッパーã«ã™ãŽãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +#### クライアント_raw_stream_ メソッド + +`Client.raw_stream`メソッドã¯ã€`raw_query`メソッドã¨åŒã˜APIã‚’æŒã¡ã¾ã™ãŒã€`bytes`オブジェクトã®ã‚¸ã‚§ãƒãƒ¬ãƒ¼ã‚¿/ストリームソースã¨ã—ã¦ä½¿ç”¨ã§ãã‚‹`io.IOBase`オブジェクトを返ã—ã¾ã™ã€‚ç¾åœ¨ã§ã¯`query_arrow_stream`メソッドã«ã‚ˆã£ã¦åˆ©ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +#### クライアント_raw_insert_ メソッド + +`Client.raw_insert`メソッドã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆæŽ¥ç¶šã‚’使用ã—ã¦`bytes`オブジェクトã¾ãŸã¯`bytes`オブジェクトジェãƒãƒ¬ãƒ¼ã‚¿ã®ç›´æŽ¥æŒ¿å…¥ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚挿入ペイロードを処ç†ã—ãªã„ãŸã‚ã€éžå¸¸ã«é«˜æ€§èƒ½ã§ã™ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯è¨­å®šãŠã‚ˆã³æŒ¿å…¥ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®æŒ‡å®šã«ã‚ªãƒ—ションをæä¾›ã—ã¾ã™ï¼š + +| パラメータ | タイプ | デフォルト | 説明 | +|--------------|----------------------------------------|------------|-------------------------------------------------------------------------------------------| +| table | str | *å¿…é ˆ* | å˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルåã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ä¿®é£¾ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルå | +| column_names | Sequence[str] | *None* | 挿入ブロックã®åˆ—å。`fmt`ã‹ã‚‰åå‰ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã¯å¿…é ˆ | +| insert_block | str, bytes, Generator[bytes], BinaryIO | *å¿…é ˆ* | 挿入ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã€‚文字列ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ | +| settings | dict | *None* | [settings description](#settings-argument)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 | | +| fmt | str | *None* | `insert_block` bytesã®ClickHouse入力フォーマット。(指定ã•ã‚Œãªã„å ´åˆã€ClickHouseã¯TSVを使用ã—ã¾ã™ï¼‰ | + +ã®å‘¼ã³å‡ºã—å´ã®è²¬ä»»ã¯ã€`insert_block`ãŒæŒ‡å®šã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã‚ã‚‹ã“ã¨ã¨æŒ‡å®šã•ã‚ŒãŸåœ§ç¸®æ–¹æ³•ã‚’使用ã—ã¦ã„ã‚‹ã“ã¨ã§ã™ã€‚ClickHouse Connectã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚¢ãƒƒãƒ—ロードやPyArrowテーブルã«ã“れらã®raw insertsを使用ã—ã€è§£æžã‚’ClickHouseサーãƒãƒ¼ã«å§”ã­ã¾ã™ã€‚ + +### ユーティリティクラスã¨æ©Ÿèƒ½ + +以下ã®ã‚¯ãƒ©ã‚¹ã¨é–¢æ•°ã‚‚"パブリック"ã®`clickhouse-connect` APIã®ä¸€éƒ¨ã¨è¦‹ãªã•ã‚Œã€ä¸Šè¨˜ã®ã‚¯ãƒ©ã‚¹ã¨ãƒ¡ã‚½ãƒƒãƒ‰ã¨åŒæ§˜ã«ã€ãƒžã‚¤ãƒŠãƒªãƒªãƒ¼ã‚¹é–“ã§å®‰å®šã—ã¦ã„ã¾ã™ã€‚ã“れらã®ã‚¯ãƒ©ã‚¹ã¨é–¢æ•°ã®é‡å¤§ãªå¤‰æ›´ã¯ã€ãƒžã‚¤ãƒŠï¼ˆã§ã¯ãªãパッãƒï¼‰ãƒªãƒªãƒ¼ã‚¹ã§ã®ã¿ç™ºç”Ÿã—ã€å°‘ãªãã¨ã‚‚1ã¤ã®ãƒžã‚¤ãƒŠãƒªãƒªãƒ¼ã‚¹ã§å»ƒæ­¢ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã®ã¾ã¾ã§ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +#### 例外 + +ã™ã¹ã¦ã®ã‚«ã‚¹ã‚¿ãƒ ä¾‹å¤–(DB API 2.0仕様ã§å®šç¾©ã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã‚’å«ã‚€ï¼‰ã¯ã€`clickhouse_connect.driver.exceptions`モジュールã«å®šç¾©ã•ã‚Œã¦ã„ã¾ã™ã€‚ +ドライãƒãŒå®Ÿéš›ã«æ¤œå‡ºã—ãŸä¾‹å¤–ã¯ã“れらã®ã‚¿ã‚¤ãƒ—を使用ã—ã¾ã™ã€‚ + +#### Clickhouse SQLユーティリティ + +`clickhouse_connect.driver.binding`モジュールã®é–¢æ•°ãŠã‚ˆã³DT64Paramクラスã¯ã€ClickHouse SQLクエリをé©åˆ‡ã«æ§‹ç¯‰ã—ã€ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚åŒæ§˜ã«ã€`clickhouse_connect.driver.parser`モジュールã®é–¢æ•°ã¯ã€ClickHouseデータ型ã®åå‰ã‚’解æžã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +### マルãƒã‚¹ãƒ¬ãƒƒãƒ‰ã€ãƒžãƒ«ãƒãƒ—ロセスã€ãŠã‚ˆã³éžåŒæœŸ/イベント駆動型ã®ä½¿ç”¨ä¾‹ + +ClickHouse Connectã¯ã€ãƒžãƒ«ãƒã‚¹ãƒ¬ãƒƒãƒ‰ã€ãƒžãƒ«ãƒãƒ—ロセスã€ãŠã‚ˆã³ã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—駆動/éžåŒæœŸã‚¢ãƒ—リケーションã§ã†ã¾ã機能ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªãŠã‚ˆã³æŒ¿å…¥å‡¦ç†ã¯å˜ä¸€ã‚¹ãƒ¬ãƒƒãƒ‰å†…ã§è¡Œã‚れるãŸã‚ã€ã“れらã®æ“作ã¯ä¸€èˆ¬ã«ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã™ã€‚ +(ã„ãã¤ã‹ã®æ“作を低レベルã§ä¸¦åˆ—処ç†ã™ã‚‹ã“ã¨ã¯ã€å˜ä¸€ã‚¹ãƒ¬ãƒƒãƒ‰ã®ãƒ‘フォーマンスペナルティを克æœã™ã‚‹ãŸã‚ã®ä»Šå¾Œã®æ”¹è‰¯å¯èƒ½æ€§ã§ã™ãŒã€ãã‚Œã§ã‚‚スレッドセーフã¯ç¶­æŒã•ã‚Œã¾ã™ã€‚) + +å„クエリã¾ãŸã¯æŒ¿å…¥ãŒã€ãã‚Œãžã‚Œç‹¬è‡ªã®QueryContextã¾ãŸã¯InsertContextオブジェクト内ã§çŠ¶æ…‹ã‚’維æŒã™ã‚‹ãŸã‚ã€ã“れらã®ãƒ˜ãƒ«ãƒ‘ーオブジェクトã¯ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã¯ãªãã€è¤‡æ•°ã®å‡¦ç†ã‚¹ãƒˆãƒªãƒ¼ãƒ é–“ã§å…±æœ‰ã—ã¦ã¯ãªã‚Šã¾ã›ã‚“。 +以下ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚ªãƒ–ジェクトã«ã¤ã„ã¦ã®è¿½åŠ ã®è­°è«–ãŒç¶šãã¾ã™ã€‚ + +ã•ã‚‰ã«ã€åŒæ™‚ã«è¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚„インサートãŒã€Œé£›è¡Œä¸­ã€ã«ãªã‚‹ã‚¢ãƒ—リケーションã®å ´åˆã€è€ƒæ…®ã™ã¹ã2ã¤ã®è¦ç´ ãŒã‚ã‚Šã¾ã™ã€‚1ã¤ç›®ã¯ã€ã‚¯ã‚¨ãƒª/インサートã«é–¢é€£ã™ã‚‹ClickHouseã®ã€Œã‚»ãƒƒã‚·ãƒ§ãƒ³ã€ã§ã‚ã‚Šã€2ã¤ç›®ã¯ClickHouse Connect Clientインスタンスã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã‚‹HTTP接続プールã§ã™ã€‚ + +### AsyncClientラッパー + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³0.7.16以é™ã€ClickHouse Connectã¯é€šå¸¸ã®`Client`ã®ä¸Šã«éžåŒæœŸãƒ©ãƒƒãƒ‘ーをæä¾›ã—ã¦ãŠã‚Šã€ã“ã‚Œã«ã‚ˆã‚Š`asyncio`環境ã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +`AsyncClient`ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€æ¨™æº–ã®`get_client`ã¨åŒã˜ãƒ‘ラメータをå—ã‘å–ã‚‹`get_async_client`ファクトリ関数を使用ã§ãã¾ã™ï¼š + +```python +import asyncio + +import clickhouse_connect + + +async def main(): + client = await clickhouse_connect.get_async_client() + result = await client.query("SELECT name FROM system.databases LIMIT 1") + print(result.result_rows) + + +asyncio.run(main()) +``` + +`AsyncClient`ã¯ã€æ¨™æº–ã®`Client`ã¨åŒã˜ãƒ¡ã‚½ãƒƒãƒ‰ã‚’åŒã˜ãƒ‘ラメータã§æŒã£ã¦ã„ã¾ã™ãŒã€é©ç”¨å¯èƒ½ãªå ´åˆã¯ã‚³ãƒ«ãƒ¼ãƒãƒ³ã¨ã—ã¦å‹•ä½œã—ã¾ã™ã€‚内部的ã«ã¯ã€I/Oæ“作を行ã†`Client`ã®ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€[run_in_executor](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor)呼ã³å‡ºã—ã§ãƒ©ãƒƒãƒ—ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +`AsyncClient`ラッパーを使用ã™ã‚‹ã¨ã€I/Oæ“作ã®å®Œäº†ã‚’å¾…ã¤é–“ã€å®Ÿè¡Œã‚¹ãƒ¬ãƒƒãƒ‰ã¨GILãŒè§£æ”¾ã•ã‚Œã‚‹ãŸã‚ã€ãƒžãƒ«ãƒã‚¹ãƒ¬ãƒƒãƒ‰ã®æ€§èƒ½ãŒå‘上ã—ã¾ã™ã€‚ + +注æ„:通常ã®`Client`ã¨ç•°ãªã‚Šã€`AsyncClient`ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`autogenerate_session_id`ã‚’`False`ã«å¼·åˆ¶ã—ã¾ã™ã€‚ + +関連リンク:[run_async example](https://github.com/ClickHouse/clickhouse-connect/blob/main/examples/run_async.py). + +### ClickHouseセッションIDã®ç®¡ç† + +å„ClickHouseクエリã¯ã€ClickHouseã®ã€Œã‚»ãƒƒã‚·ãƒ§ãƒ³ã€ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆå†…ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚セッションã¯ç¾åœ¨2ã¤ã®ç›®çš„ã§ä½¿ç”¨ã•ã‚Œã¾ã™ï¼š +- 複数ã®ã‚¯ã‚¨ãƒªã«ç‰¹å®šã®ClickHouse設定を関連付ã‘ã‚‹ãŸã‚([ユーザー設定](/docs/ja/operations/settings/settings.md)ã‚’å‚照)。ClickHouseã®`SET`コマンドを使用ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®ã‚¹ã‚³ãƒ¼ãƒ—ã«ãŠã‘る設定を変更ã—ã¾ã™ã€‚ +- [一時テーブル](https://clickhouse.com/docs/ja/sql-reference/statements/create/table#temporary-tables)を追跡ã™ã‚‹ãŸã‚。 + +デフォルトã§ã¯ã€ClickHouse Connect Clientインスタンスを使用ã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹å„クエリã¯ã€ã“ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹ãŸã‚ã«åŒã˜ã‚»ãƒƒã‚·ãƒ§ãƒ³IDを使用ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€`SET`ステートメントã¨ä¸€æ™‚テーブルã¯ã€å˜ä¸€ã®ClickHouseクライアントを使用ã™ã‚‹éš›ã«æœŸå¾…通りã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ã—ã‹ã—ã€è¨­è¨ˆä¸Šã€ClickHouseサーãƒãƒ¼ã¯åŒã˜ã‚»ãƒƒã‚·ãƒ§ãƒ³å†…ã§ã®åŒæ™‚クエリを許å¯ã—ã¾ã›ã‚“。ãã®çµæžœã€åŒæ™‚クエリを実行ã™ã‚‹ClickHouse Connectアプリケーションã«ã¯2ã¤ã®ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚ + +- 実行ã®å„スレッド(スレッドã€ãƒ—ロセスã€ã¾ãŸã¯ã‚¤ãƒ™ãƒ³ãƒˆãƒãƒ³ãƒ‰ãƒ©ï¼‰ã«å¯¾ã—ã¦å€‹åˆ¥ã®`Client`インスタンスを作æˆã—ã€è‡ªèº«ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³IDã‚’æŒãŸã›ã¾ã™ã€‚ã“ã‚ŒãŒæœ€è‰¯ã®ã‚¢ãƒ—ローãƒã§ã‚ã‚Šã€å„クライアントã®ã‚»ãƒƒã‚·ãƒ§ãƒ³çŠ¶æ…‹ã‚’ä¿æŒã—ã¾ã™ã€‚ +- å„クエリã«ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªã‚»ãƒƒã‚·ãƒ§ãƒ³IDを使用ã—ã¾ã™ã€‚ã“ã®æ–¹æ³•ã¯ã€ä¸€æ™‚テーブルや共有セッション設定ãŒä¸è¦ãªçŠ¶æ³ã§åŒæ™‚セッションå•é¡Œã‚’回é¿ã—ã¾ã™ã€‚(共有設定ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆä½œæˆæ™‚ã«ã‚‚æä¾›ã§ãã¾ã™ãŒã€ã“れらã¯å„リクエストã§é€ä¿¡ã•ã‚Œã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«é–¢é€£ä»˜ã‘られã¾ã›ã‚“)。ユニークãªsession_idã¯å„リクエストã®`settings`ディクショナリã«è¿½åŠ ã™ã‚‹ã‹ã€`autogenerate_session_id`共通設定を無効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```python +from clickhouse_connect import common + +common.set_setting('autogenerate_session_id', False) # ã“ã‚Œã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’作æˆã™ã‚‹å‰ã«å¸¸ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +client = clickhouse_connect.get_client(host='somehost.com', user='dbuser', password=1234) +``` + +ã“ã®å ´åˆã€ClickHouse Connectã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³IDã‚’é€ä¿¡ã›ãšã€ClickHouseサーãƒãƒ¼ã«ã‚ˆã£ã¦ãƒ©ãƒ³ãƒ€ãƒ ãªã‚»ãƒƒã‚·ãƒ§ãƒ³IDãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚å†åº¦ã€ä¸€æ™‚テーブルã¨ã‚»ãƒƒã‚·ãƒ§ãƒ³ãƒ¬ãƒ™ãƒ«ã®è¨­å®šã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 + +### HTTP接続プールã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º + +ClickHouse Connectã¯ã€`urllib3`接続プールを使用ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã¸ã®åŸºç¤Žçš„ãªHTTP接続を処ç†ã—ã¾ã™ã€‚デフォルトã§ã¯ã€ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯åŒã˜æŽ¥ç¶šãƒ—ールを共有ã—ã¦ãŠã‚Šã€ã“ã‚Œã¯ã»ã¨ã‚“ã©ã®ä½¿ç”¨ä¾‹ã§å分ã§ã™ã€‚ã“ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ—ールã¯ã€ã‚¢ãƒ—リケーションã§ä½¿ç”¨ã•ã‚Œã‚‹å„ClickHouseサーãƒãƒ¼ã«æœ€å¤§8ã¤ã®HTTP Keep Alive接続を維æŒã—ã¾ã™ã€‚ + +大è¦æ¨¡ãªãƒžãƒ«ãƒã‚¹ãƒ¬ãƒƒãƒ‰ã‚¢ãƒ—リケーションã§ã¯ã€å€‹åˆ¥ã®æŽ¥ç¶šãƒ—ールãŒé©åˆ‡ã§ã‚ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚カスタマイズã•ã‚ŒãŸæŽ¥ç¶šãƒ—ールã¯ã€ãƒ¡ã‚¤ãƒ³ã®`clickhouse_connect.get_client`関数ã¸ã®`pool_mgr`キーワード引数ã¨ã—ã¦æä¾›ã§ãã¾ã™ï¼š + +```python +import clickhouse_connect +from clickhouse_connect.driver import httputil + +big_pool_mgr = httputil.get_pool_manager(maxsize=16, num_pools=12) + +client1 = clickhouse_connect.get_client(pool_mgr=big_pool_mgr) +client2 = clickhouse_connect.get_client(pool_mgr=big_pool_mgr) +``` + +上記ã®ä¾‹ãŒç¤ºã™ã‚ˆã†ã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒ—ールマãƒãƒ¼ã‚¸ãƒ£ã‚’共有ã™ã‚‹ã“ã¨ãŒã§ãã€å„クライアント用ã«åˆ¥ã€…ã®ãƒ—ールマãƒãƒ¼ã‚¸ãƒ£ã‚’作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚PoolManagerを作æˆã™ã‚‹éš›ã®ã‚ªãƒ—ションã«ã¤ã„ã¦è©³ç´°ã‚’知りãŸã„å ´åˆã¯ã€[urllib3 ドキュメンテーション](https://urllib3.readthedocs.io/en/stable/advanced-usage.html#customizing-pool-behavior)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## ClickHouse Connectを使ã£ãŸãƒ‡ãƒ¼ã‚¿ã®ã‚¯ã‚¨ãƒªï¼šä¸Šç´šåˆ©ç”¨æ³• + +### QueryContexts + +ClickHouse Connectã¯æ¨™æº–ã®ã‚¯ã‚¨ãƒªã‚’QueryContext内ã§å®Ÿè¡Œã—ã¾ã™ã€‚QueryContextã«ã¯ã€ClickHouseデータベースã«å¯¾ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’構築ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ä¸»è¦ãªæ§‹é€ ã¨ã€QueryResultã‚„ä»–ã®å¿œç­”データ構造ã«çµæžœã‚’処ç†ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹è¨­å®šãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã¯ã€ã‚¯ã‚¨ãƒªãã®ã‚‚ã®ã€ãƒ‘ラメータã€è¨­å®šã€èª­ã¿å–りフォーマットã€ãã®ä»–ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¾ã™ã€‚ + +QueryContextã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®`create_query_context`メソッドを使用ã—ã¦å–å¾—ã§ãã¾ã™ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚³ã‚¢ã‚¯ã‚¨ãƒªãƒ¡ã‚½ãƒƒãƒ‰ã¨åŒã˜ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã¯ã€`query`ã€`query_df`ã€ã¾ãŸã¯`query_np`メソッドã«`context`キーワード引数ã¨ã—ã¦æ¸¡ã™ã“ã¨ãŒã§ãã€ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã¸ã®ä»–ã®å¼•æ•°ã‚’ã™ã¹ã¦ã‚‚ã—ãã¯ä¸€éƒ¨ã®ä»£ã‚ã‚Šã¨ã—ã¦æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚メソッド呼ã³å‡ºã—ã®ãŸã‚ã«æŒ‡å®šã•ã‚ŒãŸè¿½åŠ ã®å¼•æ•°ã¯ã€QueryContextã®ãƒ—ロパティを上書ãã—ã¾ã™ã€‚ + +最も明確ãªQueryContextã®ä½¿ç”¨ä¾‹ã¯ã€ç•°ãªã‚‹ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒ‘ラメータ値ã§åŒã˜ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã™ã‚‹ã“ã¨ã§ã™ã€‚ã™ã¹ã¦ã®ãƒ‘ラメータ値ã¯ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’使用ã—ã¦`QueryContext.set_parameters`メソッドを呼ã³å‡ºã™ã“ã¨ã«ã‚ˆã£ã¦æ›´æ–°ã§ãã€`QueryContext.set_parameter`を使用ã—ã¦å¥½ããª`key`ã€`value`ペアを更新ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +```python +client.create_query_context(query='SELECT value1, value2 FROM data_table WHERE key = {k:Int32}', + parameters={'k': 2}, + column_oriented=True) +result = client.query(context=qc) +assert result.result_set[1][0] == 'second_value2' +qc.set_parameter('k', 1) +result = test_client.query(context=qc) +assert result.result_set[1][0] == 'first_value2' +``` + +QueryContextsã¯ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã¯ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„ãŒã€`QueryContext.updated_copy`メソッドを呼ã³å‡ºã™ã“ã¨ã«ã‚ˆã£ã¦ãƒžãƒ«ãƒã‚¹ãƒ¬ãƒƒãƒ‰ç’°å¢ƒã§ã‚³ãƒ”ーをå–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### ストリーミングクエリ + +#### データブロック +ClickHouse Connectã¯ã€ä¸»è¦ãª`query`メソッドã‹ã‚‰å–å¾—ã™ã‚‹ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’ã€ClickHouseサーãƒãƒ¼ã‹ã‚‰å—ä¿¡ã—ãŸãƒ–ロックã®ã‚¹ãƒˆãƒªãƒ¼ãƒ ã¨ã—ã¦å‡¦ç†ã—ã¾ã™ã€‚ã“れらã®ãƒ–ロックã¯ã€ClickHouse独自ã®ã€Œãƒã‚¤ãƒ†ã‚£ãƒ–ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§é€å—ä¿¡ã•ã‚Œã¾ã™ã€‚「ブロックã€ã¨ã¯ã€å˜ã«ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã®ã‚«ãƒ©ãƒ åˆ—ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§ã‚ã‚Šã€å„カラムã¯æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒ‡ãƒ¼ã‚¿å€¤ã‚’ç­‰ã—ãå«ã¿ã¾ã™ã€‚(列指å‘データベースã§ã‚ã‚‹ClickHouseã¯ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’åŒæ§˜ã®å½¢å¼ã§ä¿å­˜ã—ã¾ã™ã€‚)クエリã‹ã‚‰è¿”ã•ã‚Œã‚‹ãƒ–ロックã®ã‚µã‚¤ã‚ºã¯ã€ã„ãã¤ã‹ã®ãƒ¬ãƒ™ãƒ«ï¼ˆãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロファイルã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã€ã¾ãŸã¯ã‚¯ã‚¨ãƒªï¼‰ã§è¨­å®šã§ãã‚‹2ã¤ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚ãれらã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +- [max_block_size](/docs/ja/operations/settings/settings.md/#setting-max_block_size) -- ブロックã®è¡Œæ•°ã®åˆ¶é™ã€‚デフォルトã¯65536ã§ã™ã€‚ +- [preferred_block_size_bytes](/docs/ja/operations/settings/settings.md/#preferred-block-size-bytes) -- ブロックã®ã‚µã‚¤ã‚ºã®ãƒã‚¤ãƒˆæ•°ã®ã‚½ãƒ•ãƒˆåˆ¶é™ã€‚デフォルトã¯1,000,000ã§ã™ã€‚ + +`preferred_block_size_setting`ã«é–¢ã‚らãšã€å„ブロックã¯`max_block_size`行を超ãˆã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。クエリã®ç¨®é¡žã«ã‚ˆã£ã¦ã¯ã€è¿”ã•ã‚Œã‚‹å®Ÿéš›ã®ãƒ–ロックã®ã‚µã‚¤ã‚ºã¯ä»»æ„ã§ã™ã€‚ãŸã¨ãˆã°ã€å¤šãã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’ã‚«ãƒãƒ¼ã™ã‚‹åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã¸ã®ã‚¯ã‚¨ãƒªã¯ã€å„シャードã‹ã‚‰ç›´æŽ¥å–å¾—ã•ã‚Œã‚‹å°ã•ãªãƒ–ロックをå«ã‚€ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +クライアントã®`query_*_stream`メソッドã®1ã¤ã‚’使用ã™ã‚‹å ´åˆã€çµæžœã¯ãƒ–ロックã”ã¨ã«è¿”ã•ã‚Œã¾ã™ã€‚ClickHouse Connectã¯å¸¸ã«1ã¤ã®ãƒ–ロックã®ã¿ã‚’読ã¿è¾¼ã¿ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’メモリã«ã™ã¹ã¦èª­ã¿è¾¼ã‚€ã“ã¨ãªã処ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚アプリケーションã¯ä»»æ„ã®æ•°ã®ãƒ–ロックを処ç†ã™ã‚‹æº–å‚™ãŒã§ãã¦ã„ã‚‹ã¯ãšã§ã€å„ブロックã®æ­£ç¢ºãªã‚µã‚¤ã‚ºã¯åˆ¶å¾¡ã§ãã¾ã›ã‚“。 + +#### é…延処ç†ã®ãŸã‚ã®HTTPデータãƒãƒƒãƒ•ã‚¡ + +HTTPプロトコルã®åˆ¶ç´„ã«ã‚ˆã‚Šã€ãƒ–ロックãŒClickHouseサーãƒãƒ¼ãŒãƒ‡ãƒ¼ã‚¿ã‚’ストリーミングã™ã‚‹é€Ÿåº¦ã‚ˆã‚Šã‚‚è‘—ã—ãé…ã„速度ã§å‡¦ç†ã•ã‚Œã‚‹ã¨ã€ClickHouseサーãƒãƒ¼ã¯æŽ¥ç¶šã‚’é–‰ã˜ã€å‡¦ç†ã‚¹ãƒ¬ãƒƒãƒ‰ã§ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ã“れをã‚る程度緩和ã™ã‚‹ãŸã‚ã«ã¯ã€HTTPストリーミングãƒãƒƒãƒ•ã‚¡ã®ãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚ºã‚’増やã™ã“ã¨ãŒã§ãã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯10メガãƒã‚¤ãƒˆï¼‰`http_buffer_size`設定を使用ã—ã¾ã™ã€‚ã“ã®çŠ¶æ³ã§å分ãªãƒ¡ãƒ¢ãƒªãŒã‚¢ãƒ—リケーション利用å¯èƒ½ã§ã‚ã‚Œã°ã€å¤§ããª`http_buffer_size`値ã¯å•é¡Œã‚ã‚Šã¾ã›ã‚“。ãƒãƒƒãƒ•ã‚¡å†…ã®ãƒ‡ãƒ¼ã‚¿ã¯`lz4`ã‚„`zstd`圧縮を使用ã—ã¦ã„ã‚‹å ´åˆã¯åœ§ç¸®ã•ã‚Œã¦ä¿å­˜ã•ã‚Œã‚‹ãŸã‚ã€ã“れらã®åœ§ç¸®ã‚¿ã‚¤ãƒ—を使用ã™ã‚‹ã¨åˆ©ç”¨å¯èƒ½ãªãƒãƒƒãƒ•ã‚¡å…¨ä½“ãŒå¢—ãˆã¾ã™ã€‚ + +#### StreamContexts + +å„`query_*_stream`メソッド(例ãˆã°`query_row_block_stream`)ã¯ã€ClickHouseã®`StreamContext`オブジェクトを返ã—ã¾ã™ã€‚ã“ã‚Œã¯Pythonã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ/ジェãƒãƒ¬ãƒ¼ã‚¿ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚基本的ãªä½¿ç”¨æ³•ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```python +with client.query_row_block_stream('SELECT pickup, dropoff, pickup_longitude, pickup_latitude FROM taxi_trips') as stream: + for block in stream: + for row in block: + +``` + +ã“ã®ä¾‹ã§ã¯ã€`StreamContext`ã‚’`with`æ–‡ãªã—ã§ä½¿ç”¨ã—よã†ã¨ã™ã‚‹ã¨ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚Pythonコンテキストを使用ã™ã‚‹ã“ã¨ã§ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒæ¶ˆè²»ã•ã‚Œãªã‹ã£ãŸå ´åˆã‚„ã€å‡¦ç†ä¸­ã«ä¾‹å¤–ãŒç™ºç”Ÿã—ãŸå ´åˆã§ã‚‚ストリーム(ã“ã®å ´åˆã¯ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°HTTPレスãƒãƒ³ã‚¹ï¼‰ãŒé©åˆ‡ã«é–‰ã˜ã‚‰ã‚Œã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¾ã™ã€‚ã•ã‚‰ã«ã€`StreamContext`ã¯ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’消費ã™ã‚‹ãŸã‚ã«ä¸€åº¦ã ã‘使用ã§ãã¾ã™ã€‚`StreamContext`ãŒçµ‚了ã—ãŸå¾Œã«ä½¿ç”¨ã—よã†ã¨ã™ã‚‹ã¨ã€`StreamClosedError`ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +StreamContextã®`source`プロパティを使用ã—ã¦ã€è¦ª`QueryResult`オブジェクトã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã€ãã“ã«ã¯ã‚«ãƒ©ãƒ åやタイプãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +#### ストリームタイプ + +`query_column_block_stream`メソッドã¯ã€ãƒã‚¤ãƒ†ã‚£ãƒ–ã®Pythonデータタイプã¨ã—ã¦ä¿å­˜ã•ã‚ŒãŸã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦ãƒ–ロックを返ã—ã¾ã™ã€‚上記ã®`taxi_trips`クエリを使用ã™ã‚‹ã¨ã€è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ãƒªã‚¹ãƒˆã§ã€ãƒªã‚¹ãƒˆã®å„è¦ç´ ã¯é–¢é€£ã™ã‚‹ã‚«ãƒ©ãƒ ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€åˆ¥ã®ãƒªã‚¹ãƒˆï¼ˆã¾ãŸã¯ã‚¿ãƒ—ル)ã«ãªã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€`block[0]`ã¯æ–‡å­—列ã ã‘ã‚’å«ã‚€ã‚¿ãƒ—ルã¨ãªã‚Šã¾ã™ã€‚列指å‘フォーマットã¯ã€ã‚«ãƒ©ãƒ ä¸­ã®ã™ã¹ã¦ã®å€¤ã‚’集計æ“作ã™ã‚‹éš›ã«æœ€ã‚‚多ã使用ã•ã‚Œã¾ã™ã€‚ + +`query_row_block_stream`メソッドã¯ã€å¾“æ¥ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã‚ˆã†ã«è¡Œã”ã¨ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦ãƒ–ロックを返ã—ã¾ã™ã€‚タクシートリップã®å ´åˆã€è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ãƒªã‚¹ãƒˆã§ã€ãƒªã‚¹ãƒˆã®å„è¦ç´ ã¯ãƒ‡ãƒ¼ã‚¿è¡Œã‚’表ã™åˆ¥ã®ãƒªã‚¹ãƒˆã§ã™ã€‚ã—ãŸãŒã£ã¦ã€`block[0]`ã¯æœ€åˆã®ã‚¿ã‚¯ã‚·ãƒ¼ãƒˆãƒªãƒƒãƒ—ã®ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ï¼ˆé †ç•ªã«ï¼‰ã‚’å«ã¿ã€`block[1]`ã¯2番目ã®ã‚¿ã‚¯ã‚·ãƒ¼ãƒˆãƒªãƒƒãƒ—ã®ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’å«ã‚€è¡Œã¨ãªã‚Šã¾ã™ã€‚行指å‘ã®çµæžœã¯é€šå¸¸ã€è¡¨ç¤ºã‚„変æ›ãƒ—ロセスã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +`query_row_stream`ã¯ä¾¿åˆ©ãªãƒ¡ã‚½ãƒƒãƒ‰ã§ã€ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’通ã—ã¦iteratingã™ã‚‹éš›ã«è‡ªå‹•çš„ã«æ¬¡ã®ãƒ–ロックã«ç§»å‹•ã—ã¾ã™ã€‚ãれ以外ã¯`query_row_block_stream`ã¨åŒã˜ã§ã™ã€‚ + +`query_np_stream`メソッドã¯ã€å„ブロックを2次元Numpyé…列ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚内部的ã«Numpyé…列ã¯(通常)カラムã¨ã—ã¦ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€ç‰¹å®šã®è¡Œã¾ãŸã¯ã‚«ãƒ©ãƒ ãƒ¡ã‚½ãƒƒãƒ‰ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。Numpyé…列ã®ã€Œå½¢çŠ¶ã€ã¯(columns, rows)ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚Numpyライブラリã¯Numpyé…列をæ“作ã™ã‚‹ãŸã‚ã®å¤šãã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’æä¾›ã—ã¾ã™ã€‚ãªãŠã€ã‚¯ã‚¨ãƒªä¸­ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒåŒã˜Numpy dtypeを共有ã—ã¦ã„ã‚‹å ´åˆã€è¿”ã•ã‚Œã‚‹Numpyé…列も1ã¤ã®dtypeã ã‘ã‚’æŒã¡ã€å†…部構造を変更ã™ã‚‹ã“ã¨ãªãreshape/rotateã§ãã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`query_df_stream`メソッドã¯ã€å„ClickHouseブロックを2次元ã®Pandas Dataframeã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€StreamContextオブジェクトãŒå»¶æœŸã•ã‚ŒãŸå½¢å¼ã§ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦ä½¿ç”¨ã§ãã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ãŒï¼ˆãŸã ã—一度ã ã‘) + +最後ã«ã€`query_arrow_stream`メソッドã¯ClickHouse`ArrowStream`å½¢å¼ã®çµæžœã‚’pyarrow.ipc.RecordBatchStreamReaderã¨ã—ã¦è¿”ã—ã€StreamContextã§ãƒ©ãƒƒãƒ—ã—ã¾ã™ã€‚å„ストリームã®å復ã¯PyArrow RecordBlockã‚’è¿”ã—ã¾ã™ã€‚ + +```python +df_stream = client.query_df_stream('SELECT * FROM hits') +column_names = df_stream.source.column_names +with df_stream: + for df in df_stream: + +``` + +### 読å–りフォーマット + +読ã¿å–りフォーマットã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®`query`ã€`query_np`ã€ãŠã‚ˆã³`query_df`メソッドã‹ã‚‰è¿”ã•ã‚Œã‚‹å€¤ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—を制御ã—ã¾ã™ã€‚(`raw_query`ãŠã‚ˆã³`query_arrow`ã¯ClickHouseã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’変更ã—ãªã„ãŸã‚ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆåˆ¶å¾¡ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。)ãŸã¨ãˆã°ã€UUIDã‚’`native`フォーマットã‹ã‚‰`string`フォーマットã«å¤‰æ›´ã™ã‚‹ã¨ã€ClickHouseã®`UUID`カラムã®ã‚¯ã‚¨ãƒªã¯æ¨™æº–ã®8-4-4-4-12RFC1422å½¢å¼ã§æ–‡å­—列値ã¨ã—ã¦è¿”ã•ã‚Œã¾ã™ã€‚ + +データタイプã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ã—ã¦ã¯ã€ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚フォーマットã¯1ã¤ã®å°æ–‡å­—ã®æ–‡å­—列ã§ã™ã€‚ + +読ã¿å–りフォーマットã¯ã€è¤‡æ•°ã®ãƒ¬ãƒ™ãƒ«ã§è¨­å®šã§ãã¾ã™ï¼š + +- グローãƒãƒ«ã«ã€`clickhouse_connect.datatypes.format`パッケージ内ã§å®šç¾©ã•ã‚Œã¦ã„るメソッドを使用ã—ã¦ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æ§‹æˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã§åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ +```python +from clickhouse_connect.datatypes.format import set_read_format + +# IPv6ãŠã‚ˆã³IPv4ã®ä¸¡æ–¹ã®å€¤ã‚’文字列ã¨ã—ã¦è¿”ã—ã¾ã™ +set_read_format('IPv*', 'string') + +# ã™ã¹ã¦ã®Dateタイプを基礎的ãªã‚¨ãƒãƒƒã‚¯ç§’ã¾ãŸã¯ã‚¨ãƒãƒƒã‚¯æ—¥ã¨ã—ã¦è¿”ã—ã¾ã™ +set_read_format('Date*', 'int') +``` +- クエリ全体ã€ã‚ªãƒ—ションã®`query_formats`ディクショナリアーギュメントを使用ã—ã¦ã€‚ã“ã®å ´åˆã€ç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—(ã¾ãŸã¯ã‚µãƒ–カラム)ã®ã‚«ãƒ©ãƒ ã”ã¨ã«è¨­å®šã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +```python +# ä»»æ„ã®UUIDカラムを文字列ã¨ã—ã¦è¿”ã—ã¾ã™ +client.query('SELECT user_id, user_uuid, device_uuid from users', query_formats={'UUID': 'string'}) +``` +- 特定ã®ã‚«ãƒ©ãƒ ã«å«ã¾ã‚Œã‚‹å€¤ã®å ´åˆã€ã‚ªãƒ—ションã®`column_formats`ディクショナリアーギュメントを使用ã—ã¦ã€‚キーã¯ClickHouseã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ åã§ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ãƒ‡ãƒ¼ã‚¿ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦ã®ã‚‚ã®ã§ã‚ã‚Šã€ã¾ãŸã¯ClickHouseã®ã‚¿ã‚¤ãƒ—åã¨ã‚¯ã‚¨ãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®å€¤ã§ã‚ã‚‹2次レベルã®ã€Œãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã§ã™ã€‚ã“ã®2次ディクショナリã¯ã€ã‚¿ãƒ—ルやマップãªã©ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ +```python +# dev_addressカラムã®IPv6値を文字列ã¨ã—ã¦è¿”ã—ã¾ã™ +client.query('SELECT device_id, dev_address, gw_address from devices', column_formats={'dev_address':'string'}) +``` + +#### 読ã¿å–りフォーマットオプション(Pythonタイプ) + +| ClickHouse Type | Native Python Type | Read Formats | Comments | +|-----------------------|-----------------------|--------------|-------------------------------------------------------------------------------------------------------------------| +| Int[8-64], UInt[8-32] | int | - | | +| UInt64 | int | signed | Supersetã¯ç¾åœ¨å¤§ããªç¬¦å·ãªã—UInt64値を処ç†ã§ãã¾ã›ã‚“ | +| [U]Int[128,256] | int | string | Pandasã¨Numpyã®int値ã¯æœ€å¤§64ビットã§ã‚ã‚‹ãŸã‚ã€ã“れらã¯æ–‡å­—列ã¨ã—ã¦è¿”ã™ã“ã¨ãŒã§ãã¾ã™ | +| Float32 | float | - | ã™ã¹ã¦ã®Pythonã®floatã¯å†…部ã§64ビットã§ã™ | +| Float64 | float | - | | +| Decimal | decimal.Decimal | - | | +| String | string | bytes | ClickHouseã®Stringカラムã¯å›ºæœ‰ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’æŒã£ã¦ã„ãªã„ãŸã‚ã€å¯å¤‰é•·ã®ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã«ã‚‚使用ã•ã‚Œã¾ã™ | +| FixedString | bytes | string | FixedStringã¯å›ºå®šã‚µã‚¤ã‚ºã®ãƒã‚¤ãƒˆé…列ã§ã™ãŒã€æ™‚ã«ã¯Pythonã®æ–‡å­—列ã¨ã—ã¦æ‰±ã‚れるã“ã¨ã‚‚ã‚ã‚Šã¾ã™ | +| Enum[8,16] | string | string, int | Pythonã®enumã¯ç©ºã®æ–‡å­—列を許容ã—ãªã„ãŸã‚ã€ã™ã¹ã¦ã®enumã¯æ–‡å­—列ã‹åŸºæœ¬ã®int値ã¨ã—ã¦ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ | +| Date | datetime.date | int | ClickHouseã¯Dateã‚’1970å¹´1月1æ—¥ã‹ã‚‰ã®æ—¥æ•°ã¨ã—ã¦ä¿å­˜ã—ã¾ã™ã€‚ã“ã®å€¤ã¯intã¨ã—ã¦æä¾›ã•ã‚Œã¾ã™ | +| Date32 | datetime.date | int | Dateã¨åŒã˜ã§ã™ãŒã€ã‚ˆã‚Šåºƒã„日付ã®ç¯„囲をæŒã¡ã¾ã™ | +| DateTime | datetime.datetime | int | ClickHouseã¯DateTimeをエãƒãƒƒã‚¯ç§’ã§ä¿å­˜ã—ã¾ã™ã€‚ã“ã®å€¤ã¯intã¨ã—ã¦æä¾›ã•ã‚Œã¾ã™ | +| DateTime64 | datetime.datetime | int | Pythonã®datetime.datetimeã¯ãƒžã‚¤ã‚¯ãƒ­ç§’精度ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚生ã®64ビットã®int値ãŒåˆ©ç”¨å¯èƒ½ã§ã™ | +| IPv4 | ipaddress.IPv4Address | string | IPアドレスã¯æ–‡å­—列ã¨ã—ã¦èª­ã¿è¾¼ã¾ã‚Œã€é©åˆ‡ã«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸæ–‡å­—列ãŒIPアドレスã¨ã—ã¦æŒ¿å…¥ã•ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ | +| IPv6 | ipaddress.IPv6Address | string | IPアドレスã¯æ–‡å­—列ã¨ã—ã¦èª­ã¿è¾¼ã¾ã‚Œã€é©åˆ‡ã«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸæ–‡å­—列ãŒIPアドレスã¨ã—ã¦æŒ¿å…¥ã•ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ | +| Tuple | dict or tuple | tuple, json | åå‰ä»˜ãタプルã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§Dictionaryã¨ã—ã¦è¿”ã•ã‚Œã¾ã™ã€‚ã¾ãŸã€åå‰ä»˜ãタプルã¯JSON文字列ã¨ã—ã¦ã‚‚è¿”ã•ã‚Œã¾ã™ | +| Map | dict | - | | +| Nested | Sequence[dict] | - | | +| UUID | uuid.UUID | string | UUIDã¯RFC 4122ã®æ¨™æº–å½¢å¼ã‚’使用ã—ã¦æ–‡å­—列ã¨ã—ã¦èª­ã¿è¾¼ã¾ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ | +| JSON | dict | string | デフォルトã§ã¯Pythonã®DictionaryãŒè¿”ã•ã‚Œã¾ã™ã€‚`string`フォーマットã§ã¯JSON文字列ãŒè¿”ã•ã‚Œã¾ã™ | +| Variant | object | - | ä¿å­˜ã•ã‚Œã¦ã„る値ã®ClickHouseデータタイプã«ä¸€è‡´ã™ã‚‹PythonタイプãŒè¿”ã•ã‚Œã¾ã™ | +| Dynamic | object | - | ä¿å­˜ã•ã‚Œã¦ã„る値ã®ClickHouseデータタイプã«ä¸€è‡´ã™ã‚‹PythonタイプãŒè¿”ã•ã‚Œã¾ã™ | + + +### 外部データ + +ClickHouseã®ã‚¯ã‚¨ãƒªã¯ã€ä»»æ„ã®ClickHouseフォーマットã§å¤–部データをå—ã‘入れるã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã¯ã‚¯ã‚¨ãƒªæ–‡å­—列ã¨å…±ã«é€ä¿¡ã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚外部データ機能ã®è©³ç´°ã¯[ã“ã¡ã‚‰](/docs/ja/engines/table-engines/special/external-data.md)ã§ã™ã€‚クライアントã®`query*`メソッドã¯ã€ã“ã®æ©Ÿèƒ½ã‚’利用ã™ã‚‹ãŸã‚ã«ã‚ªãƒ—ションã®`external_data`パラメータをå—ã‘入れã¾ã™ã€‚`external_data`パラメータã®å€¤ã¯`clickhouse_connect.driver.external.ExternalData`オブジェクトã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚ªãƒ–ジェクトã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã¯ã€ä»¥ä¸‹ã®å¼•æ•°ã‚’å—ã‘入れã¾ã™ï¼š + +| Name | Type | Description | +|-----------|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| +| file_path | str | 外部データを読ã¿è¾¼ã‚€ãŸã‚ã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚·ã‚¹ãƒ†ãƒ ãƒ‘スã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘ス。`file_path`ã¾ãŸã¯`data`ã®ã„ãšã‚Œã‹ãŒå¿…è¦ã§ã™ | +| file_name | str | 外部データ「ファイルã€ã®åå‰ã€‚æä¾›ã•ã‚Œãªã„å ´åˆã¯ã€ï¼ˆæ‹¡å¼µå­ãªã—ã®ï¼‰`file_path`ã‹ã‚‰æ±ºå®šã•ã‚Œã¾ã™ | +| data | bytes | ãƒã‚¤ãƒŠãƒªå½¢å¼ã®å¤–部データ(ファイルã‹ã‚‰èª­ã¿è¾¼ã‚€ä»£ã‚ã‚Šã«ï¼‰ã€‚`data`ã¾ãŸã¯`file_path`ã®ã„ãšã‚Œã‹ãŒå¿…è¦ã§ã™ | +| fmt | str | データã®ClickHouse [入力フォーマット](/docs/ja/sql-reference/formats.mdx)。デフォルトã¯`TSV` | +| types | str or seq of str | 外部データã®ã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®ãƒªã‚¹ãƒˆã€‚文字列ã®å ´åˆã€åž‹ã¯ã‚³ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚Œã‚‹ã¹ãã§ã™ã€‚`types`ã¾ãŸã¯`structure`ã®ã„ãšã‚Œã‹ãŒå¿…è¦ã§ã™ | +| structure | str or seq of str | データã®ã‚«ãƒ©ãƒ å+データタイプã®ãƒªã‚¹ãƒˆï¼ˆä¾‹ã‚’å‚照)。`structure`ã¾ãŸã¯`types`ã®ã„ãšã‚Œã‹ãŒå¿…è¦ã§ã™ | +| mime_type | str | ファイルデータã®ã‚ªãƒ—ションã®MIMEタイプ。ç¾åœ¨ã€ClickHouseã¯ã“ã®HTTPサブヘッダを無視ã—ã¾ã™ | + + +外部CSVファイルをå«ã‚€ã€Œæ˜ ç”»ã€ãƒ‡ãƒ¼ã‚¿ã‚’クエリã«é€ä¿¡ã—ã€ClickHouseサーãƒãƒ¼ä¸Šã«æ—¢ã«å­˜åœ¨ã™ã‚‹`directors`テーブルã¨ãã®ãƒ‡ãƒ¼ã‚¿ã‚’çµåˆã™ã‚‹ï¼š + +```python +import clickhouse_connect +from clickhouse_connect.driver.external import ExternalData + +client = clickhouse_connect.get_client() +ext_data = ExternalData(file_path='/data/movies.csv', + fmt='CSV', + structure=['movie String', 'year UInt16', 'rating Decimal32(3)', 'director String']) +result = client.query('SELECT name, avg(rating) FROM directors INNER JOIN movies ON directors.name = movies.director GROUP BY directors.name', + external_data=ext_data).result_rows +``` + +追加ã®å¤–部データファイルã¯ã€ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã¨åŒã˜ãƒ‘ラメータをå–ã‚‹`add_file`メソッドを使用ã—ã¦åˆæœŸExternalDataオブジェクトã«è¿½åŠ ã§ãã¾ã™ã€‚HTTPã®å ´åˆã€ã™ã¹ã¦ã®å¤–部データã¯`multi-part/form-data`ファイルアップロードã®ä¸€éƒ¨ã¨ã—ã¦é€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +### タイムゾーン +ClickHouse DateTimeãŠã‚ˆã³DateTime64ã®å€¤ã«ã¯è¤‡æ•°ã®æ–¹æ³•ã§ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’é©ç”¨ã§ãã¾ã™ã€‚内部的ã«ã€ClickHouseサーãƒãƒ¼ã¯å¸¸ã«ä»»æ„ã®DateTimeã¾ãŸã¯DateTime64オブジェクトをタイムゾーンナイーブãªæ•°å€¤ã€ã¤ã¾ã‚Š1970-01-01 00:00:00 UTC時間ã‹ã‚‰ã®ç§’æ•°ã¨ã—ã¦ä¿å­˜ã—ã¾ã™ã€‚DateTime64値ã®å ´åˆã€è¡¨ç¾ã¯ç²¾åº¦ã«ä¾å­˜ã—ã¦ã‚¨ãƒãƒƒã‚¯ã‹ã‚‰ã®ãƒŸãƒªç§’ã€ãƒžã‚¤ã‚¯ãƒ­ç§’ã€ã¾ãŸã¯ãƒŠãƒŽç§’ã§ã™ã€‚ãã®çµæžœã€ã„ã‹ãªã‚‹ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³æƒ…å ±ã®é©ç”¨ã‚‚常ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§è¡Œã‚ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã¯æœ‰æ„義ãªè¿½åŠ è¨ˆç®—ãŒä¼´ã†ãŸã‚ã€ãƒ‘フォーマンスãŒé‡è¦ãªã‚¢ãƒ—リケーションã§ã¯ã€DateTimeタイプをエãƒãƒƒã‚¯ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã¨ã—ã¦æ‰±ã†ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ユーザー表示や変æ›ã‚’除ãã€Pandas Timestampãªã©ã®Pandasデータ型ã¯ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ãŸã‚ã«å¸¸ã«ã‚¨ãƒãƒƒã‚¯ãƒŠãƒŽç§’を表ã™64ビット整数ã¨ãªã‚‹ãŸã‚ã§ã™ã€‚ + +クエリã§ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚¢ã‚¦ã‚§ã‚¢ãªãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã€ç‰¹ã«Pythonã®`datetime.datetime`オブジェクトを使用ã™ã‚‹éš›ã€`clickhouse-connect`ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’以下ã®å„ªå…ˆé †ä½ãƒ«ãƒ¼ãƒ«ã«å¾“ã£ã¦é©ç”¨ã—ã¾ã™ï¼š + +1. クエリメソッドパラメータ`client_tzs`ãŒã‚¯ã‚¨ãƒªã«æŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãã®ç‰¹å®šã®ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ +2. ClickHouseカラムã«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆï¼ˆä¾‹ãˆã°ã€DateTime64(3, 'America/Denver')ã®ã‚ˆã†ãªã‚¿ã‚¤ãƒ—)ã€ClickHouseカラムタイムゾーンãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚(ã“ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³23.2以å‰ã®DateTimeカラムã«ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“) +3. クエリメソッドパラメータ`query_tz`ãŒã‚¯ã‚¨ãƒªã«æŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã€Œã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã€ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ +4. クエリã¾ãŸã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³è¨­å®šãŒé©ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚(ã“ã®æ©Ÿèƒ½ã¯ClickHouseサーãƒãƒ¼ã§ã¾ã ãƒªãƒªãƒ¼ã‚¹ã•ã‚Œã¦ã„ã¾ã›ã‚“) +5. 最後ã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®`apply_server_timezone`パラメータãŒTrue(デフォルトã®è¨­å®šï¼‰ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseサーãƒãƒ¼ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ + +ã“れらã®ãƒ«ãƒ¼ãƒ«ã«åŸºã¥ã„ã¦é©ç”¨ã•ã‚ŒãŸã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒUTCã§ã‚ã‚‹å ´åˆã€`clickhouse-connect`ã¯å¸¸ã«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãƒŠã‚¤ãƒ¼ãƒ–ãªPython`datetime.datetime`オブジェクトを返ã—ã¾ã™ã€‚ã“ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãƒŠã‚¤ãƒ¼ãƒ–ãªã‚ªãƒ–ジェクトã«ã¯ã€å¿…è¦ã«å¿œã˜ã¦ã‚¢ãƒ—リケーションコードã§è¿½åŠ ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³æƒ…報を加ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## ClickHouse Connectを使ã£ãŸãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆï¼šä¸Šç´šåˆ©ç”¨æ³• + +### InsertContexts + +ClickHouse Connectã¯ã™ã¹ã¦ã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’InsertContext内ã§å®Ÿè¡Œã—ã¾ã™ã€‚InsertContextã«ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®`insert`メソッドã«å¼•æ•°ã¨ã—ã¦æ¸¡ã•ã‚ŒãŸã™ã¹ã¦ã®å€¤ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã•ã‚‰ã«ã€InsertContextãŒæœ€åˆã«æ§‹ç¯‰ã•ã‚ŒãŸã¨ãã€ClickHouse Connectã¯ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットã®åŠ¹çŽ‡çš„ãªã‚¤ãƒ³ã‚µãƒ¼ãƒˆã®ãŸã‚ã«å¿…è¦ãªã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã‚’å–å¾—ã—ã¾ã™ã€‚ã“ã®InsertContextを複数ã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã§å†ä½¿ç”¨ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ã“ã®ã€Œäº‹å‰ã‚¯ã‚¨ãƒªã€ã‚’回é¿ã—ã€ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’より迅速ã‹ã¤åŠ¹çŽ‡çš„ã«å®Ÿè¡Œã—ã¾ã™ã€‚ + +InsertContextã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®`create_insert_context`メソッドを使用ã—ã¦å–å¾—ã§ãã¾ã™ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€`insert`関数ã¨åŒã˜å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚å†åˆ©ç”¨ã®ãŸã‚ã«ä¿®æ­£ã™ã¹ãã¯InsertContextsã®`data`プロパティã®ã¿ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã£ã¦ã€åŒã˜ãƒ†ãƒ¼ãƒ–ルã«æ–°ã—ã„データを繰り返ã—インサートã™ã‚‹ãŸã‚ã®å†åˆ©ç”¨å¯èƒ½ãªã‚ªãƒ–ジェクトãŒæä¾›ã•ã‚Œã‚‹ã“ã¨ã¨ä¸€è‡´ã—ã¦ã„ã¾ã™ã€‚ + +```python +test_data = [[1, 'v1', 'v2'], [2, 'v3', 'v4']] +ic = test_client.create_insert_context(table='test_table', data='test_data') +client.insert(context=ic) +assert client.command('SELECT count() FROM test_table') == 2 +new_data = [[3, 'v5', 'v6'], [4, 'v7', 'v8']] +ic.data = new_data +client.insert(context=ic) +qr = test_client.query('SELECT * FROM test_table ORDER BY key DESC') +assert qr.row_count == 4 +assert qr[0][0] == 4 +``` + +InsertContextsã¯ã‚¤ãƒ³ã‚µãƒ¼ãƒˆãƒ—ロセス中ã«æ›´æ–°ã•ã‚Œã‚‹å¯å¤‰ã®çŠ¶æ…‹ã‚’æŒã¤ãŸã‚ã€ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### 書ãè¾¼ã¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ + +書ãè¾¼ã¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€ç¾åœ¨é™ã‚‰ã‚ŒãŸæ•°ã®ã‚¿ã‚¤ãƒ—ã«å¯¾ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ã»ã¨ã‚“ã©ã®å ´åˆã€ClickHouse Connectã¯æœ€åˆã®ï¼ˆnullã§ãªã„)データ値ã®åž‹ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦é©åˆ‡ãªæ›¸ãè¾¼ã¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’自動的ã«åˆ¤æ–­ã—よã†ã¨ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€DateTimeカラムã«æŒ¿å…¥ã™ã‚‹å ´åˆã€ã‚«ãƒ©ãƒ ã®æœ€åˆã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆå€¤ãŒPythonæ•´æ•°ã§ã‚ã‚‹å ´åˆã€ClickHouse Connectã¯ãã‚ŒãŒå®Ÿéš›ã«ã¯ã‚¨ãƒãƒƒã‚¯ç§’ã§ã‚ã‚‹ã¨ä»®å®šã—ã¦æ•´æ•°å€¤ã‚’直接挿入ã—ã¾ã™ã€‚ + +ã»ã¨ã‚“ã©ã®ã‚±ãƒ¼ã‚¹ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®æ›¸ãè¾¼ã¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’上書ãã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€`clickhouse_connect.datatypes.format`パッケージã®é–¢é€£ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã—ã¦ã‚°ãƒ­ãƒ¼ãƒãƒ«ãƒ¬ãƒ™ãƒ«ã§è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### 書ãè¾¼ã¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚ªãƒ—ション + +| ClickHouse Type | Native Python Type | Write Formats | Comments | +|-----------------------|-----------------------|---------------|-------------------------------------------------------------------------------------------------------------| +| Int[8-64], UInt[8-32] | int | - | | +| UInt64 | int | | | +| [U]Int[128,256] | int | | | +| Float32 | float | | | +| Float64 | float | | | +| Decimal | decimal.Decimal | | | +| String | string | | | +| FixedString | bytes | string | 文字列ã¨ã—ã¦æŒ¿å…¥ã•ã‚ŒãŸå ´åˆã€è¿½åŠ ã®ãƒã‚¤ãƒˆã¯ã‚¼ãƒ­ã«è¨­å®šã•ã‚Œã¾ã™ | +| Enum[8,16] | string | | | +| Date | datetime.date | int | ClickHouseã¯æ—¥ä»˜ã‚’1970å¹´1月1æ—¥ã‹ã‚‰ã®ã€Œã‚¨ãƒãƒƒã‚¯æ—¥ã€å€¤ã¨ã—ã¦ä¿å­˜ã—ã¾ã™ã€‚æ•´æ•°åž‹ã¯ã“れを仮定ã—ã¾ã™ | +| Date32 | datetime.date | int | 日付ã¨åŒã˜ã§ã™ãŒã€ã‚ˆã‚Šåºƒã„日付ã®ç¯„囲をæŒã¡ã¾ã™ | +| DateTime | datetime.datetime | int | ClickHouseã¯DateTimeをエãƒãƒƒã‚¯ç§’ã§ä¿å­˜ã—ã¾ã™ã€‚intåž‹ã¯ã“ã®ã€Œã‚¨ãƒãƒƒã‚¯ç§’ã€å€¤ã¨ä»®å®šã•ã‚Œã¾ã™ | +| DateTime64 | datetime.datetime | int | Pythonã®datetime.datetimeã¯ãƒžã‚¤ã‚¯ãƒ­ç§’ã®ç²¾åº¦ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚生ã®64ビットint値ãŒåˆ©ç”¨å¯èƒ½ã§ã™ | +| IPv4 | ipaddress.IPv4Address | string | æ­£ã—ãフォーマットã•ã‚ŒãŸæ–‡å­—列ã¯IPv4アドレスã¨ã—ã¦æŒ¿å…¥ã•ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ | +| IPv6 | ipaddress.IPv6Address | string | æ­£ã—ãフォーマットã•ã‚ŒãŸæ–‡å­—列ã¯IPv6アドレスã¨ã—ã¦æŒ¿å…¥ã•ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ | +| Tuple | dict or tuple | | | +| Map | dict | | | +| Nested | Sequence[dict] | | | +| UUID | uuid.UUID | string | æ­£ã—ãフォーマットã•ã‚ŒãŸæ–‡å­—列ã¯ClickHouse UUIDã¨ã—ã¦æŒ¿å…¥ã•ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ | +| JSON/Object('json') | dict | string | Dictionaryã¾ãŸã¯JSON文字列をJSONカラムã«æŒ¿å…¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆæ³¨æ„: `Object('json')` ã¯éžæŽ¨å¥¨ã§ã™ï¼‰ | +| Variant | object | | ç¾æ™‚点ã§ã¯ã™ã¹ã¦ã®ãƒãƒªã‚¢ãƒ³ãƒˆãŒæ–‡å­—列ã¨ã—ã¦æŒ¿å…¥ã•ã‚Œã€ClickHouseサーãƒãƒ¼ã«ã‚ˆã£ã¦è§£æžã•ã‚Œã¾ã™ | +| Dynamic | object | | 警告 - ç¾æ™‚点ã§ã¯ã€Dynamicカラムã¸ã®æŒ¿å…¥ã¯ClickHouse文字列ã¨ã—ã¦æ°¸ç¶šåŒ–ã•ã‚Œã¾ã™ | + + +## 追加オプション + +ClickHouse Connectã¯ã€ä¸Šç´šã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã®ãŸã‚ã«ã„ãã¤ã‹ã®è¿½åŠ ã‚ªãƒ—ションをæä¾›ã—ã¾ã™ + +### グローãƒãƒ«è¨­å®š + +ClickHouse Connectã®å‹•ä½œã‚’グローãƒãƒ«ã«åˆ¶å¾¡ã™ã‚‹è¨­å®šãŒå°‘æ•°ã‚ã‚Šã¾ã™ã€‚ãれらã¯ãƒˆãƒƒãƒ—レベルã®`common`パッケージã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ï¼š + +```python +from clickhouse_connect import common + +common.set_setting('autogenerate_session_id', False) +common.get_setting('invalid_setting_action') +'drop' +``` + +:::note +ã“れらã®å…±é€šè¨­å®š `autogenerate_session_id`, `product_name`, ãŠã‚ˆã³ `readonly` ã¯ã€å¸¸ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’作æˆã™ã‚‹å‰ã« +`clickhouse_connect.get_client` メソッドを使用ã—ã¦å¤‰æ›´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚クライアント作æˆå¾Œã«ã“れらã®è¨­å®šã‚’変更ã—ã¦ã‚‚ +既存ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®å‹•ä½œã«å½±éŸ¿ã‚’åŠã¼ã—ã¾ã›ã‚“。 +::: + +ç¾åœ¨å®šç¾©ã•ã‚Œã¦ã„るグローãƒãƒ«è¨­å®šã¯10個ã§ã™ï¼š + +| Setting Name | Default | Options | Description | +|-------------------------|---------|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| autogenerate_session_id | True | True, False | å„クライアントセッションã®ãŸã‚ã«æ–°ã—ã„UUID(1)セッションIDを自動生æˆï¼ˆæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆï¼‰ã€‚クライアントã¾ãŸã¯ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã§ã‚»ãƒƒã‚·ãƒ§ãƒ³IDãŒæä¾›ã•ã‚Œãªã„å ´åˆï¼ˆClickHouseã¯å†…部ランダムIDã‚’å„クエリã«ç”Ÿæˆã—ã¾ã™ï¼‰ | +| invalid_setting_action | 'error' | 'drop', 'send', 'error' | 無効ã¾ãŸã¯èª­ã¿å–り専用ã®è¨­å®šãŒæä¾›ã•ã‚ŒãŸå ´åˆã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ï¼ˆã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚»ãƒƒã‚·ãƒ§ãƒ³ã¾ãŸã¯ã‚¯ã‚¨ãƒªã®ã„ãšã‚Œã‹ï¼‰ã€‚`drop`ã®å ´åˆã¯è¨­å®šãŒç„¡è¦–ã•ã‚Œã€`send`ã®å ´åˆã¯è¨­å®šãŒClickHouseã¸é€ä¿¡ã•ã‚Œã€`error`ã®å ´åˆã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§ProgrammingErrorãŒç™ºç”Ÿã—ã¾ã™ | +| dict_parameter_format | 'json' | 'json', 'map' | ã“ã‚Œã¯ãƒ‘ラメータ化を行ã£ãŸã‚¯ã‚¨ãƒªãŒPythonã®Dictionaryã‚’JSONã¾ãŸã¯ClickHouseã®Map構文ã«å¤‰æ›ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚JSONカラムã¸ã®æŒ¿å…¥ã«ã¯`json`ã€ClickHouseã®Mapカラム用ã«ã¯`map`を使用ã—ã¾ã™ | +| product_name | | | クエリã¨å…±ã«ClickHouseã«æ¸¡ã•ã‚Œã‚‹æ–‡å­—列ã§ã€ClickHouse Connectを使用ã—ã¦ã„るアプリをトラッキングã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚å½¢å¼&gl/;product name;≷<product version>ã§ã‚ã‚‹ã¹ãã§ã™ | +| max_connection_age | 600 | | HTTP Keep Alive接続ãŒã‚ªãƒ¼ãƒ—ン/å†åˆ©ç”¨ã•ã‚Œç¶šã‘る最大ã®ç§’数。ロードãƒãƒ©ãƒ³ã‚µ/プロキシã®èƒŒå¾Œã®å˜ä¸€ã®ClickHouseノードã¸ã®æŽ¥ç¶šã®é›†ã¾ã‚Šã‚’防ãŽã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ10分ã§ã™ï¼‰ã€‚ | +| readonly | 0 | 0, 1 | ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³19.17以å‰ã®æ“作を許å¯ã™ã‚‹ãŸã‚ã«"read_only"設定ã¨ä¸€è‡´ã™ã‚‹ã‚ˆã†è¨­å®šå¯èƒ½ã€‚éžå¸¸ã«å¤ã„ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã®æ“作を許å¯ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã€‚ | +| use_protocol_version | True | True, False | クライアントプロトコルãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¾ã™ã€‚ ã“ã‚Œã¯DateTimeタイムゾーンカラムã«å¿…è¦ã§ã™ãŒã€chproxyã®ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。 | +| max_error_size | 1024 | | クライアントエラーメッセージã«è¿”ã•ã‚Œã‚‹æœ€å¤§æ–‡å­—数。ClickHouseã®ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸å…¨ä½“ã‚’å–å¾—ã™ã‚‹è¨­å®šã¨ã—ã¦ã¯0を使用ã—ã¾ã™ã€‚デフォルトã¯1024文字。 | +| send_os_user | True | True, False | クライアント情報ã§ClickHouseã«é€ä¿¡ã•ã‚Œã‚‹ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼ˆHTTP User-Agent文字列)をå«ã‚る。 | +| http_buffer_size | 10MB | | HTTPストリーミングクエリã«ä½¿ç”¨ã•ã‚Œã‚‹ã€Œã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã€ãƒãƒƒãƒ•ã‚¡ã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ | + +### 圧縮 + +ClickHouse Connectã¯ã€ã‚¯ã‚¨ãƒªçµæžœã¨ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã®ä¸¡æ–¹ã«å¯¾ã—ã¦lz4ã€zstdã€brotliã€ãŠã‚ˆã³gzip圧縮をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚圧縮を使用ã™ã‚‹ã“ã¨ã¯ã€å¤šãã®å ´åˆã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å¸¯åŸŸå¹…/転é€é€Ÿåº¦ã¨CPU使用é‡ï¼ˆã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¨ã‚µãƒ¼ãƒãƒ¼ã®ä¸¡æ–¹ï¼‰ã®é–“ã®ãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ãŒã‚ã‚‹ã“ã¨ã‚’常ã«è¦šãˆã¦ãŠã„ã¦ãã ã•ã„。 + +圧縮データをå—ä¿¡ã™ã‚‹ã«ã¯ã€ClickHouseサーãƒãƒ¼ã®`enable_http_compression`ã‚’1ã«è¨­å®šã™ã‚‹ã‹ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã€Œã‚¯ã‚¨ãƒªã”ã¨ã€ã«è¨­å®šã‚’変更ã™ã‚‹æ¨©é™ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +圧縮ã¯ã€`clickhouse_connect.get_client`ファクトリメソッドを呼ã³å‡ºã™å ´åˆã®`compress`パラメータã§åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯`compress`㯠`True` ã«è¨­å®šã•ã‚Œã¦ãŠã‚Šã€ã“ã‚Œã«ã‚ˆã‚Šãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®åœ§ç¸®è¨­å®šãŒãƒˆãƒªã‚¬ãƒ¼ã•ã‚Œã¾ã™ã€‚`query`ã€`query_np`ã€ãŠã‚ˆã³`query_df`クライアントメソッドを使用ã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã§ã¯ã€ClickHouse Connectã¯`query`クライアントメソッドを使用ã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ã€`Accept-Encoding`ヘッダーを`lz4`〠`zstd`ã€`br`(brotliライブラリãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹å ´åˆï¼‰ã€`gzip` ãŠã‚ˆã³`deflate`エンコーディングã¨ã¨ã‚‚ã«ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚(クリックãƒã‚¦ã‚¹ã‚µãƒ¼ãƒãƒ¼ã®å¤§å¤šæ•°ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§ã¯ã€`zstd`圧縮ペイロードãŒè¿”ã•ã‚Œã¾ã™ã€‚)インサートã®å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ClickHouse Connectã¯lz4圧縮を使ã£ã¦ã‚¤ãƒ³ã‚µãƒ¼ãƒˆãƒ–ロックを圧縮ã—ã€`Content-Encoding: lz4` HTTP ヘッダーをé€ä¿¡ã—ã¾ã™ã€‚ + +`get_client`ã®`compress`パラメータã¯ã€ç‰¹å®šã®åœ§ç¸®ãƒ¡ã‚½ãƒƒãƒ‰ã€`lz4`ã€`zstd`ã€`br` ã¾ãŸã¯`gzip`ã®ã„ãšã‚Œã‹ã«è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ãã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã¨ã‚¯ã‚¨ãƒªçµæžœï¼ˆã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹å ´åˆï¼‰ã®ä¸¡æ–¹ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚`zstd`ãŠã‚ˆã³`lz4`圧縮ライブラリã¯ã€ç¾åœ¨ClickHouse Connectã¨ã¨ã‚‚ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã¾ã™ã€‚`br`/brotliãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€brotliライブラリã¯åˆ¥é€”インストールã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +`raw*`クライアントメソッドã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè¨­å®šã«ã‚ˆã£ã¦æŒ‡å®šã•ã‚ŒãŸåœ§ç¸®ã‚’使用ã—ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +ã¾ãŸã€`gzip`圧縮ã®ä½¿ç”¨ã‚’推奨ã—ã¾ã›ã‚“。データã®åœ§ç¸®ã¨è§£å‡ã®ä¸¡æ–¹ã§ä»£æ›¿æ‰‹æ®µã¨æ¯”較ã—ã¦ã‹ãªã‚Šé…ã„ãŸã‚ã§ã™ã€‚ + +### HTTPプロキシサãƒãƒ¼ãƒˆ + +ClickHouse Connect ã§ã¯ã€urllib3ライブラリを使用ã—ãŸåŸºæœ¬çš„ãªHTTPプロキシサãƒãƒ¼ãƒˆãŒè¿½åŠ ã•ã‚Œã¦ã„ã¾ã™ã€‚標準的ãª`HTTP_PROXY`ã¨`HTTPS_PROXY`環境変数をèªè­˜ã—ã¾ã™ã€‚ã“れらã®ç’°å¢ƒå¤‰æ•°ã‚’使用ã™ã‚‹ã“ã¨ã§ã€`clickhouse_connect.get_client`メソッドを使用ã—ã¦ä½œæˆã•ã‚Œã‚‹ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ãªã‚Šã¾ã™ã€‚ã¾ãŸã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã”ã¨ã«è¨­å®šã™ã‚‹ãŸã‚ã«ã€get_clientメソッドã®`http_proxy`ã‚„`https_proxy`引数を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ãªHTTPプロキシサãƒãƒ¼ãƒˆã®å®Ÿè£…ã«ã¤ã„ã¦ã¯ã€[urllib3](https://urllib3.readthedocs.io/en/stable/advanced-usage.html#http-and-https-proxies) +ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +Socksプロキシを使用ã™ã‚‹ã«ã¯ã€urllib3 SOCKSProxyManagerã‚’`pool_mgr`引数ã¨ã—ã¦`get_client`ã«é€ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã¯PySocksライブラリを直接インストールã™ã‚‹ã‹ã€urllib3ã®ä¾å­˜é–¢ä¿‚ã¨ã—ã¦`[socks]`オプションを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### å¤ã„JSONデータタイプ + +エクスペリメンタルãª`Object`(ã¾ãŸã¯`Object('json')`)データタイプã¯éžæŽ¨å¥¨ã¨ã•ã‚Œã¦ãŠã‚Šã€è£½å“化環境ã«ã¯é¿ã‘ã‚‹ã¹ãã§ã™ã€‚ClickHouse Connectã¯ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã«å¯¾ã™ã‚‹é™å®šçš„ãªã‚µãƒãƒ¼ãƒˆã‚’引ã続ãæä¾›ã—ã¦ãŠã‚Šã€éŽåŽ»ã¨ã®äº’æ›æ€§ã®ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ã“ã®ã‚µãƒãƒ¼ãƒˆã«ã¯ã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã¾ãŸã¯ãã‚Œã«ç›¸å½“ã™ã‚‹ã€Œãƒˆãƒƒãƒ—レベルã€ã¾ãŸã¯ã€Œè¦ªã€JSON値を返ã™ã¨æƒ³å®šã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã¯å«ã¾ã‚Œã¦ãŠã‚‰ãšã€ãã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã¯ä¾‹å¤–を発生ã•ã›ã¾ã™ã€‚ + +### æ–°ã—ã„ Variant/Dynamic/JSON データタイプ(エクスペリメンタル機能) + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³0.8.0ã®ãƒªãƒªãƒ¼ã‚¹ã‹ã‚‰ã€ã‚¯ãƒªãƒƒã‚¯ãƒã‚¦ã‚¹ã‚³ãƒã‚¯ãƒˆã¯æ–°ã—ã„(ã¾ã ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªï¼‰ClickHouseタイプVariantã€Dynamicã€ãŠã‚ˆã³JSONã«å¯¾ã™ã‚‹ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã‚µãƒãƒ¼ãƒˆã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ + +#### 使用上ã®æ³¨æ„事項 +- JSONデータã¯ã€PythonDictionaryã¾ãŸã¯JSON文字列(例ãˆã°`{}`)ã¨ã—ã¦æŒ¿å…¥ã§ãã¾ã™ã€‚ä»–ã®å½¢å¼ã®JSONデータã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- ã“れらã®ã‚¿ã‚¤ãƒ—ã®ã‚µãƒ–カラム/パスを使用ã—ãŸã‚¯ã‚¨ãƒªã¯ã€ã‚µãƒ–カラムã®åž‹ã‚’è¿”ã—ã¾ã™ã€‚ +- ä»–ã®ä½¿ç”¨ä¸Šã®æ³¨æ„ã«ã¤ã„ã¦ã¯ã€ãƒ¡ã‚¤ãƒ³ã®ClickHouseドキュメントをå‚ç…§ã—ã¦ãã ã•ã„。 + +#### 既知ã®åˆ¶é™: +- ã“れらã®ã‚¿ã‚¤ãƒ—を使用ã™ã‚‹å‰ã«ã€ClickHouseã®è¨­å®šã§æœ‰åŠ¹åŒ–ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- æ–°ã—ã„JSONタイプã¯ClickHouse 24.8リリースã‹ã‚‰åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ +- 内部フォーマットã®å¤‰æ›´ã®ãŸã‚ã€ã‚¯ãƒªãƒƒã‚¯ãƒã‚¦ã‚¹ã‚³ãƒã‚¯ãƒˆã¯ClickHouse 24.7リリース以é™ã®Variantタイプã¨ã—ã‹äº’æ›æ€§ãŒã‚ã‚Šã¾ã›ã‚“。 +- è¿”ã•ã‚Œã‚‹JSONオブジェクトã¯æœ€å¤§ã§`max_dynamic_paths`ã®è¦ç´ æ•°ã—ã‹è¿”ã•ã‚Œã¾ã›ã‚“(デフォルトã§1024)。ã“ã‚Œã¯å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§ä¿®æ­£ã•ã‚Œã¾ã™ã€‚ +- `Dynamic`カラムã¸ã®æŒ¿å…¥ã¯å¸¸ã«Python値ã®æ–‡å­—列表ç¾ã¨ãªã‚Šã¾ã™ã€‚ã“ã‚Œã«ã¤ã„ã¦ã¯ã€https://github.com/ClickHouse/ClickHouse/issues/70395ã®ä¿®æ­£å¾Œã€å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§ä¿®æ­£ã•ã‚Œã‚‹äºˆå®šã§ã™ã€‚ +- æ–°ã—ã„タイプã®å®Ÿè£…ã¯Cコードã§ã®æœ€é©åŒ–ãŒã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ã‚·ãƒ³ãƒ—ルã§ç¢ºç«‹ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¨æ¯”ã¹ã¦è‹¥å¹²ãƒ‘フォーマンスãŒé…ã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/integrations/language-clients/rust.md b/docs/ja/integrations/language-clients/rust.md new file mode 100644 index 00000000000..20024dbce1d --- /dev/null +++ b/docs/ja/integrations/language-clients/rust.md @@ -0,0 +1,550 @@ +--- +sidebar_label: Rust +sidebar_position: 4 +keywords: [clickhouse, rs, rust, cargo, crate, http, client, connect, integrate] +slug: /ja/integrations/rust +description: ClickHouseã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®å…¬å¼Rustクライアント。 +--- + +# ClickHouse Rust クライアント + +ClickHouseã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®å…¬å¼Rustクライアントã¯ã€ã‚‚ã¨ã‚‚ã¨[Paul Loyd](https://github.com/loyd)ã«ã‚ˆã£ã¦é–‹ç™ºã•ã‚Œã¾ã—ãŸã€‚クライアントã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¯[GitHubリãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/clickhouse-rs)ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +## æ¦‚è¦ + +* 行をエンコード/デコードã™ã‚‹ãŸã‚ã«`serde`を使用ã—ã¾ã™ã€‚ +* `serde`属性をサãƒãƒ¼ãƒˆï¼š`skip_serializing`, `skip_deserializing`, `rename`。 +* HTTPトランスãƒãƒ¼ãƒˆä¸Šã§[`RowBinary`](https://clickhouse.com/docs/ja/interfaces/formats#rowbinary)フォーマットを使用ã—ã¾ã™ã€‚ + * TCP上ã§[`Native`](https://clickhouse.com/docs/ja/interfaces/formats#native)ã«åˆ‡ã‚Šæ›¿ãˆã‚‹è¨ˆç”»ãŒã‚ã‚Šã¾ã™ã€‚ +* TLSをサãƒãƒ¼ãƒˆã—ã¾ã™ï¼ˆ`native-tls`ãŠã‚ˆã³`rustls-tls`機能を通ã˜ã¦ï¼‰ã€‚ +* 圧縮ã¨è§£å‡ï¼ˆLZ4)をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +* データã®é¸æŠžã‚„挿入ã€DDLã®å®Ÿè¡Œã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§ã®ãƒãƒƒãƒå‡¦ç†ã®ãŸã‚ã®APIã‚’æä¾›ã—ã¾ã™ã€‚ +* å˜ä½“テスト用ã®ä¾¿åˆ©ãªãƒ¢ãƒƒã‚¯ã‚’æä¾›ã—ã¾ã™ã€‚ + +## インストール + +クレートを使用ã™ã‚‹ã«ã¯ã€`Cargo.toml`ã«æ¬¡ã®ã‚ˆã†ã«è¿½åŠ ã—ã¦ãã ã•ã„: + +```toml +[dependencies] +clickhouse = "0.12.2" + +[dev-dependencies] +clickhouse = { version = "0.12.2", features = ["test-util"] } +``` + +å‚考: [crates.ioページ](https://crates.io/crates/clickhouse)。 + +## Cargo機能 + +* `lz4`(デフォルトã§æœ‰åŠ¹ï¼‰ — `Compression::Lz4`ã¨`Compression::Lz4Hc(_)`ã®ãƒãƒªã‚¢ãƒ³ãƒˆã‚’有効ã«ã—ã¾ã™ã€‚有効ã«ã™ã‚‹ã¨ã€`Compression::Lz4`ãŒ`WATCH`を除ãã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +* `native-tls` — `HTTPS`スキーマをæŒã¤URLã‚’`hyper-tls`を通ã˜ã¦ã‚µãƒãƒ¼ãƒˆã—ã€OpenSSLã«ãƒªãƒ³ã‚¯ã—ã¾ã™ã€‚ +* `rustls-tls` — `HTTPS`スキーマをæŒã¤URLã‚’`hyper-rustls`を通ã˜ã¦ã‚µãƒãƒ¼ãƒˆã—ã€OpenSSLã«ãƒªãƒ³ã‚¯ã—ã¾ã›ã‚“。 +* `inserter` — `client.inserter()`を有効ã«ã—ã¾ã™ã€‚ +* `test-util` — モックを追加ã—ã¾ã™ã€‚詳ã—ãã¯[例](https://github.com/ClickHouse/clickhouse-rs/tree/main/examples/mock.rs)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。`dev-dependencies`ã®ã¿ã«ä½¿ç”¨ã—ã¦ãã ã•ã„。 +* `watch` — `client.watch`機能を有効ã«ã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯è©²å½“セクションをå‚ç…§ã—ã¦ãã ã•ã„。 +* `uuid` — `serde::uuid`を追加ã—ã€[uuid](https://docs.rs/uuid)クレートã¨é€£æºã—ã¾ã™ã€‚ +* `time` — `serde::time`を追加ã—ã€[time](https://docs.rs/time)クレートã¨é€£æºã—ã¾ã™ã€‚ + +:::important +`HTTPS` URL経由ã§ClickHouseã«æŽ¥ç¶šã™ã‚‹å ´åˆã¯ã€`native-tls`ã¾ãŸã¯`rustls-tls`機能を有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +両方を有効ã«ã—ãŸå ´åˆã€`rustls-tls`機能ãŒå„ªå…ˆã•ã‚Œã¾ã™ã€‚ +::: + +## ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®äº’æ›æ€§ + +クライアントã¯ClickHouseã®LTSã¾ãŸã¯ãれ以é™ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€ãŠã‚ˆã³ClickHouse Cloudã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseサーãƒãƒ¼v22.6よりå‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€[ã„ãã¤ã‹ã®ç¨€ãªã‚±ãƒ¼ã‚¹ã§RowBinaryã‚’æ­£ã—ã処ç†ã—ã¾ã›ã‚“](https://github.com/ClickHouse/ClickHouse/issues/37420)。 +ã“ã®å•é¡Œã‚’解決ã™ã‚‹ã«ã¯ã€v0.11+を使用ã—ã€`wa-37420`機能を有効ã«ã§ãã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯æ–°ã—ã„ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 + +## 例 + +クライアントリãƒã‚¸ãƒˆãƒªã®[例](https://github.com/ClickHouse/clickhouse-rs/blob/main/examples)ã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆåˆ©ç”¨ã®ã•ã¾ã–ã¾ãªã‚·ãƒŠãƒªã‚ªã‚’ã‚«ãƒãƒ¼ã™ã‚‹ã“ã¨ã‚’目指ã—ã¦ã„ã¾ã™ã€‚概è¦ã¯[examples README](https://github.com/ClickHouse/clickhouse-rs/blob/main/examples/README.md#overview)ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +例や以下ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ä¸æ˜Žãªç‚¹ã‚„ä¸è¶³ãŒã‚ã‚‹å ´åˆã¯ã€[ãŠå•ã„åˆã‚ã›ãã ã•ã„](./rust.md#contact-us)。 + +## 使用方法 + +:::note +`ch2rs` crateã¯ã€ClickHouseã‹ã‚‰è¡Œã‚¿ã‚¤ãƒ—を生æˆã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã™ã€‚ +::: + +### クライアントインスタンスã®ä½œæˆ + +:::tip +作æˆã•ã‚ŒãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’å†åˆ©ç”¨ã™ã‚‹ã‹ã€åŸºç¤Žã®hyper接続プールをå†åˆ©ç”¨ã™ã‚‹ãŸã‚ã«ã‚¯ãƒ­ãƒ¼ãƒ³ã—ã¦ãã ã•ã„。 +::: + +```rust +use clickhouse::Client; + +let client = Client::default() + // プロトコルã¨ãƒãƒ¼ãƒˆã®ä¸¡æ–¹ã‚’å«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ + .with_url("http://localhost:8123") + .with_user("name") + .with_password("123") + .with_database("test"); +``` + +### HTTPSã¾ãŸã¯ClickHouse Cloud接続 + +HTTPSã¯`rustls-tls`ã¾ãŸã¯`native-tls`ã®cargo機能ã§å‹•ä½œã—ã¾ã™ã€‚ + +ãã®å¾Œã€é€šå¸¸ã®æ–¹æ³•ã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’作æˆã—ã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€ç’°å¢ƒå¤‰æ•°ã‚’使用ã—ã¦æŽ¥ç¶šã®è©³ç´°ã‚’ä¿å­˜ã—ã¦ã„ã¾ã™ï¼š + +:::important +URLã¯ãƒ—ロトコルã¨ãƒãƒ¼ãƒˆã®ä¸¡æ–¹ã‚’å«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例:`https://instance.clickhouse.cloud:8443`。 +::: + +```rust +fn read_env_var(key: &str) -> String { + env::var(key).unwrap_or_else(|_| panic!("{key} env variable should be set")) +} + +let client = Client::default() + .with_url(read_env_var("CLICKHOUSE_URL")) + .with_user(read_env_var("CLICKHOUSE_USER")) + .with_password(read_env_var("CLICKHOUSE_PASSWORD")); +``` + +å‚考: +- クライアントリãƒã‚¸ãƒˆãƒªã®[ClickHouse Cloudã®HTTPS使用例](https://github.com/ClickHouse/clickhouse-rs/blob/main/examples/clickhouse_cloud.rs)。ã“ã‚Œã¯ã‚ªãƒ³ãƒ—レミスã®HTTPS接続ã§ã‚‚é©ç”¨å¯èƒ½ã§ã™ã€‚ + +### è¡Œã®é¸æŠž + +```rust +use serde::Deserialize; +use clickhouse::Row; +use clickhouse::sql::Identifier; + +#[derive(Row, Deserialize)] +struct MyRow<'a> { + no: u32, + name: &'a str, +} + +let table_name = "some"; +let mut cursor = client + .query("SELECT ?fields FROM ? WHERE no BETWEEN ? AND ?") + .bind(Identifier(table_name)) + .bind(500) + .bind(504) + .fetch::>()?; + +while let Some(row) = cursor.next().await? { .. } +``` + +* プレースホルダー`?fields`ã¯ã€`Row`ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰`no, name`ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ +* プレースホルダー`?`ã¯ã€ä»¥ä¸‹ã®`bind()`呼ã³å‡ºã—ã§å€¤ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ +* 便利ãª`fetch_one::()`ã¨`fetch_all::()`メソッドã¯ã€ãã‚Œãžã‚Œæœ€åˆã®è¡Œã¾ãŸã¯ã™ã¹ã¦ã®è¡Œã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ +* `sql::Identifier`ã¯ãƒ†ãƒ¼ãƒ–ルåã‚’ãƒã‚¤ãƒ³ãƒ‰ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +注æ„:応答全体ãŒã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œã‚‹ãŸã‚ã€ã‚«ãƒ¼ã‚½ãƒ«ã¯ä¸€éƒ¨ã®è¡Œã‚’生æˆã—ãŸå¾Œã§ã‚‚エラーを返ã™å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ã‚µãƒ¼ãƒãƒ¼å´ã®å¿œç­”ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã‚’有効ã«ã™ã‚‹ãŸã‚ã«`query(...).with_option("wait_end_of_query", "1")`を試ã™ã“ã¨ãŒã§ãã¾ã™ã€‚[詳細ã¯ã“ã¡ã‚‰](https://clickhouse.com/docs/ja/interfaces/http/#response-buffering)。`buffer_size`オプションも役立ã¡ã¾ã™ã€‚ + +:::warning +行をé¸æŠžã™ã‚‹ã¨ãã«`wait_end_of_query`ã‚’æ…Žé‡ã«ä½¿ç”¨ã—ã¦ãã ã•ã„。サーãƒãƒ¼å´ã§ã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ãŒå¢—加ã—ã€ãƒ‘フォーマンス全体ãŒä½Žä¸‹ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +### è¡Œã®æŒ¿å…¥ + +```rust +use serde::Serialize; +use clickhouse::Row; + +#[derive(Row, Serialize)] +struct MyRow { + no: u32, + name: String, +} + +let mut insert = client.insert("some")?; +insert.write(&MyRow { no: 0, name: "foo".into() }).await?; +insert.write(&MyRow { no: 1, name: "bar".into() }).await?; +insert.end().await?; +``` + +* `end()`ãŒå‘¼ã³å‡ºã•ã‚Œãªã„ã¨ã€`INSERT`ã¯ä¸­æ­¢ã•ã‚Œã¾ã™ã€‚ +* è¡Œã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è² è·ã‚’分é…ã™ã‚‹ã‚¹ãƒˆãƒªãƒ¼ãƒ ã¨ã—ã¦é †æ¬¡é€ä¿¡ã•ã‚Œã¾ã™ã€‚ +* ClickHouseã¯ã€ã™ã¹ã¦ã®è¡ŒãŒåŒã˜ãƒ‘ーティションã«é©åˆã—ã€ãã®æ•°ãŒ[`max_insert_block_size`](https://clickhouse.tech/docs/en/operations/settings/settings/#settings-max_insert_block_size)以下ã§ã‚ã‚‹å ´åˆã«ã®ã¿ãƒãƒƒãƒã‚’アトミックã«æŒ¿å…¥ã—ã¾ã™ã€‚ + +### éžåŒæœŸæŒ¿å…¥ï¼ˆã‚µãƒ¼ãƒãƒ¼å´ãƒãƒƒãƒå‡¦ç†ï¼‰ + +クライアントå´ã§ãƒ‡ãƒ¼ã‚¿ã®ãƒãƒƒãƒå‡¦ç†ã‚’é¿ã‘ã‚‹ãŸã‚ã«[ClickHouseéžåŒæœŸæŒ¿å…¥](https://clickhouse.com/docs/ja/optimize/asynchronous-inserts)を利用ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€`async_insert`オプションを`insert`メソッドã«ï¼ˆã¾ãŸã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹è‡ªä½“ã«ï¼‰æä¾›ã™ã‚‹ã“ã¨ã§å®Ÿç¾ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã™ã¹ã¦ã®`insert`呼ã³å‡ºã—ã«å½±éŸ¿ã—ã¾ã™ã€‚ + +```rust +let client = Client::default() + .with_url("http://localhost:8123") + .with_option("async_insert", "1") + .with_option("wait_for_async_insert", "0"); +``` + +å‚考: +- クライアントリãƒã‚¸ãƒˆãƒªã®[éžåŒæœŸæŒ¿å…¥ã®ä¾‹](https://github.com/ClickHouse/clickhouse-rs/blob/main/examples/async_insert.rs)。 + +### インサータ機能(クライアントå´ãƒãƒƒãƒå‡¦ç†ï¼‰ + +`inserter` cargo機能ãŒå¿…è¦ã§ã™ã€‚ + +```rust +let mut inserter = client.inserter("some")? + .with_timeouts(Some(Duration::from_secs(5)), Some(Duration::from_secs(20))) + .with_max_bytes(50_000_000) + .with_max_rows(750_000) + .with_period(Some(Duration::from_secs(15))); + +inserter.write(&MyRow { no: 0, name: "foo".into() })?; +inserter.write(&MyRow { no: 1, name: "bar".into() })?; +let stats = inserter.commit().await?; +if stats.rows > 0 { + println!( + "{} bytes, {} rows, {} transactions have been inserted", + stats.bytes, stats.rows, stats.transactions, + ); +} + +// アプリケーション終了時ã«inserterを最終化ã—ã€æ®‹ã‚Šã®è¡Œã‚’コミットã™ã‚‹ã“ã¨ã‚’忘れãªã„ã§ãã ã•ã„。. `end()`ã¯çµ±è¨ˆã‚‚æä¾›ã—ã¾ã™ã€‚ +inserter.end().await?; +``` + +* `Inserter`ã¯ã€ã„ãšã‚Œã‹ã®ã—ãã„値(`max_bytes`ã€`max_rows`ã€`period`)ã«é”ã—ãŸå ´åˆã«`commit()`ã§ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªæŒ¿å…¥ã‚’終了ã—ã¾ã™ã€‚ +* パラレルインサータã«ã‚ˆã‚‹è² è·ã‚¹ãƒ‘イクをé¿ã‘ã‚‹ãŸã‚ã«ã€`with_period_bias`を使用ã—ã¦ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãª`INSERT`é–“ã®é–“éš”ãŒãƒã‚¤ã‚¢ã‚¹ã•ã‚Œã¾ã™ã€‚ +* `Inserter::time_left()`を使用ã—ã¦ã€ç¾åœ¨ã®æœŸé–“ãŒçµ‚了ã—ãŸæ™‚を検出ã§ãã¾ã™ã€‚é …ç›®ãŒã¾ã‚Œã«ç”Ÿæˆã•ã‚Œã‚‹å ´åˆã¯ã€å†ã³`Inserter::commit()`を呼ã³å‡ºã—ã¦åˆ¶é™ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„。 +* 時間ã—ãã„値ã¯ã€ã‚¤ãƒ³ã‚µãƒ¼ã‚¿ã‚’高速ã«ã™ã‚‹ãŸã‚ã«[quanta](https://docs.rs/quanta)クレートを使用ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚`test-util`ãŒæœ‰åŠ¹ãªå ´åˆã€ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“(ã—ãŸãŒã£ã¦ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ†ã‚¹ãƒˆã§`tokio::time::advance()`ã«ã‚ˆã£ã¦æ™‚間を管ç†ã§ãã¾ã™ï¼‰ã€‚ +* `commit()`呼ã³å‡ºã—é–“ã®ã™ã¹ã¦ã®è¡Œã¯ã€åŒã˜`INSERT`ステートメントã§æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +:::warning +挿入を終了/最終化ã™ã‚‹å ´åˆã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹ã“ã¨ã‚’忘れãªã„ã§ãã ã•ã„: +```rust +inserter.end().await?; +``` +::: + +### DDLã®å®Ÿè¡Œ + +å˜ä¸€ãƒŽãƒ¼ãƒ‰ã®å±•é–‹ã§ã¯ã€æ¬¡ã®ã‚ˆã†ã«DDLを実行ã™ã‚‹ã ã‘ã§å分ã§ã™ï¼š + +```rust +client.query("DROP TABLE IF EXISTS some").execute().await?; +``` + +ã—ã‹ã—ã€è² è·åˆ†æ•£è£…置やClickHouse Cloudを使用ã—ã¦ã„ã‚‹å ´åˆã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§DDLãŒé©ç”¨ã•ã‚Œã‚‹ã®ã‚’å¾…ã¤ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯`wait_end_of_query`オプションを使用ã—ã¦è¡Œã†ã“ã¨ãŒã§ãã¾ã™ï¼š + +```rust +client + .query("DROP TABLE IF EXISTS some") + .with_option("wait_end_of_query", "1") + .execute() + .await?; +``` + +### ClickHouse設定 + +`with_option`メソッドを使用ã—ã¦ã€ã•ã¾ã–ã¾ãª[ClickHouse設定](https://clickhouse.com/docs/ja/operations/settings/settings)ã‚’é©ç”¨ã§ãã¾ã™ã€‚例ãˆã°ï¼š + +```rust +let numbers = client + .query("SELECT number FROM system.numbers") + // ã“ã®è¨­å®šã¯ã“ã®ç‰¹å®šã®ã‚¯ã‚¨ãƒªã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚グローãƒãƒ«ãªã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè¨­å®šã‚’上書ãã—ã¾ã™ã€‚ + .with_option("limit", "3") + .fetch_all::() + .await?; +``` + +`query`ã¨åŒæ§˜ã«ã€`insert`ãŠã‚ˆã³`inserter` メソッドã§ã‚‚åŒæ§˜ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ã•ã‚‰ã«ã€`Client`インスタンスã§ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ã¦ã€ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã«å¯¾ã™ã‚‹ã‚°ãƒ­ãƒ¼ãƒãƒ«è¨­å®šã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### クエリID + +`with_option`を使用ã—ã¦ã€ClickHouseã®ã‚¯ã‚¨ãƒªãƒ­ã‚°ã§ã‚¯ã‚¨ãƒªã‚’識別ã™ã‚‹ãŸã‚ã«`query_id`オプションを設定ã§ãã¾ã™ã€‚ + +```rust +let numbers = client + .query("SELECT number FROM system.numbers LIMIT 1") + .with_option("query_id", "some-query-id") + .fetch_all::() + .await?; +``` + +`query`ã¨åŒæ§˜ã«ã€`insert`ãŠã‚ˆã³`inserter` メソッドã§ã‚‚åŒæ§˜ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +:::danger +`query_id`を手動ã§è¨­å®šã™ã‚‹å ´åˆã¯ã€ãã‚ŒãŒä¸€æ„ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。UUIDã¯ãã®ãŸã‚ã®è‰¯ã„é¸æŠžè‚¢ã§ã™ã€‚ +::: + +å‚考:クライアントリãƒã‚¸ãƒˆãƒªã®[query_idã®ä¾‹](https://github.com/ClickHouse/clickhouse-rs/blob/main/examples/query_id.rs)。 + +### セッションID + +`query_id`ã¨åŒæ§˜ã«ã€åŒã˜ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã™ã‚‹ãŸã‚ã«`session_id`を設定ã§ãã¾ã™ã€‚`session_id`ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ¬ãƒ™ãƒ«ã§ã‚°ãƒ­ãƒ¼ãƒãƒ«ã«ã€ã¾ãŸã¯`query`ã€`insert`ã€`inserter`呼ã³å‡ºã—ã”ã¨ã«è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```rust +let client = Client::default() + .with_url("http://localhost:8123") + .with_option("session_id", "my-session"); +``` + +:::danger +クラスター化ã•ã‚ŒãŸãƒ‡ãƒ—ロイメントã§ã¯ã€ã€Œã‚¹ãƒ†ã‚£ãƒƒã‚­ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã€ãŒãªã„ãŸã‚ã€ã“ã®æ©Ÿèƒ½ã‚’é©åˆ‡ã«åˆ©ç”¨ã™ã‚‹ã«ã¯ç‰¹å®šã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ ノードã«æŽ¥ç¶šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ­ãƒ“ンã®è² è·åˆ†æ•£è£…ç½®ã¯ã€å¾Œç¶šã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒåŒã˜ ClickHouse ノードã«ã‚ˆã£ã¦å‡¦ç†ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã›ã‚“。 +::: + +å‚考:クライアントリãƒã‚¸ãƒˆãƒªã®[session_idã®ä¾‹](https://github.com/ClickHouse/clickhouse-rs/blob/main/examples/session_id.rs)。 + +### カスタムHTTPヘッダー + +プロキシèªè¨¼ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã‚„カスタムヘッダーを渡ã™å¿…è¦ãŒã‚ã‚‹å ´åˆã€æ¬¡ã®ã‚ˆã†ã«è¡Œã†ã“ã¨ãŒã§ãã¾ã™ï¼š + +```rust +let client = Client::default() + .with_url("http://localhost:8123") + .with_header("X-My-Header", "hello"); +``` + +å‚考:クライアントリãƒã‚¸ãƒˆãƒªã®[カスタムHTTPヘッダーã®ä¾‹](https://github.com/ClickHouse/clickhouse-rs/blob/main/examples/custom_http_headers.rs)。 + +### カスタムHTTPクライアント + +基礎ã¨ãªã‚‹HTTP接続プールã®è¨­å®šã‚’微調整ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +```rust +use hyper_util::client::legacy::connect::HttpConnector; +use hyper_util::client::legacy::Client as HyperClient; +use hyper_util::rt::TokioExecutor; + +let connector = HttpConnector::new(); // ã¾ãŸã¯HttpsConnectorBuilder +let hyper_client = HyperClient::builder(TokioExecutor::new()) + // クライアントå´ã§ç‰¹å®šã®ã‚¢ã‚¤ãƒ‰ãƒ«ã‚½ã‚±ãƒƒãƒˆã‚’生ã‹ã™æ™‚間(ミリ秒å˜ä½ï¼‰ã€‚ + // ã“ã‚Œã¯ClickHouseサーãƒãƒ¼ã®KeepAliveタイムアウトよりもã‹ãªã‚ŠçŸ­ã„ã“ã¨ãŒæƒ³å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + // ã“ã‚Œã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§23.11ãƒãƒ¼ã‚¸ãƒ§ãƒ³ä»¥å‰ã®3秒ã€ä»¥é™ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®å¾Œ10秒ã§ã—ãŸã€‚ + .pool_idle_timeout(Duration::from_millis(2_500)) + // プール内ã§è¨±å¯ã•ã‚Œã‚‹æœ€å¤§ã®ã‚¢ã‚¤ãƒ‰ãƒ«Keep-Alive接続。 + .pool_max_idle_per_host(4) + .build(connector); + +let client = Client::with_http_client(hyper_client).with_url("http://localhost:8123"); +``` + +:::warning +ã“ã®ä¾‹ã¯ãƒ¬ã‚¬ã‚·ãƒ¼ãªHyper APIã«ä¾å­˜ã—ã¦ãŠã‚Šã€å°†æ¥å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å‚考:クライアントリãƒã‚¸ãƒˆãƒªã®[カスタムHTTPクライアントã®ä¾‹](https://github.com/ClickHouse/clickhouse-rs/blob/main/examples/custom_http_client.rs)。 + +## データ型 + +:::info +追加ã®ä¾‹ã‚‚å‚ç…§ã—ã¦ãã ã•ã„: +* [シンプルãªClickHouseデータ型](https://github.com/ClickHouse/clickhouse-rs/blob/main/examples/data_types_derive_simple.rs) +* [コンテナ型ã®ClickHouseデータ型](https://github.com/ClickHouse/clickhouse-rs/blob/main/examples/data_types_derive_containers.rs) +::: + +* `(U)Int(8|16|32|64|128)`ã¯å¯¾å¿œã™ã‚‹`(u|i)(8|16|32|64|128)`åž‹ã¾ãŸã¯ãã®å‘¨ã‚Šã®æ–°ã—ã„åž‹ã«ãƒžãƒƒãƒ”ングã—ã¾ã™ã€‚ +* `(U)Int256`ã¯ç›´æŽ¥ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€[回é¿ç­–ãŒã‚ã‚Šã¾ã™](https://github.com/ClickHouse/clickhouse-rs/issues/48)。 +* `Float(32|64)`ã¯å¯¾å¿œã™ã‚‹`f(32|64)`ã¾ãŸã¯ãã®å‘¨ã‚Šã®æ–°ã—ã„åž‹ã«ãƒžãƒƒãƒ”ングã—ã¾ã™ã€‚ +* `Decimal(32|64|128)`ã¯å¯¾å¿œã™ã‚‹`i(32|64|128)`ã¾ãŸã¯ãã®å‘¨ã‚Šã®æ–°ã—ã„åž‹ã«ãƒžãƒƒãƒ”ングã—ã¾ã™ã€‚[fixnum](https://github.com/loyd/fixnum)ã‚„ä»–ã®å®Ÿè£…ã®ã‚µã‚¤ãƒ³ä»˜ã固定å°æ•°ç‚¹æ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã‚ˆã‚Šä¾¿åˆ©ã§ã™ã€‚ +* `Boolean`ã¯`bool`ã¾ãŸã¯ãã®å‘¨ã‚Šã®æ–°ã—ã„åž‹ã«ãƒžãƒƒãƒ”ングã—ã¾ã™ã€‚ +* `String`ã¯ä»»æ„ã®æ–‡å­—列ã¾ãŸã¯ãƒã‚¤ãƒˆåž‹ã«ãƒžãƒƒãƒ”ングã—ã¾ã™ã€‚例:`&str`, `&[u8]`, `String`, `Vec`ã¾ãŸã¯[`SmartString`](https://docs.rs/smartstring/latest/smartstring/struct.SmartString.html)。新ã—ã„型もサãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ãƒã‚¤ãƒˆã‚’ä¿å­˜ã™ã‚‹ã«ã¯ã€[serde_bytes](https://docs.rs/serde_bytes/latest/serde_bytes/)を使用ã™ã‚‹ã“ã¨ã‚’考慮ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ã‚ˆã‚ŠåŠ¹çŽ‡çš„ã§ã™ã€‚ + +```rust +#[derive(Row, Debug, Serialize, Deserialize)] +struct MyRow<'a> { + str: &'a str, + string: String, + #[serde(with = "serde_bytes")] + bytes: Vec, + #[serde(with = "serde_bytes")] + byte_slice: &'a [u8], +} +``` + +* `FixedString(N)`ã¯ãƒã‚¤ãƒˆã®é…列ã¨ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚例:`[u8; N]`。 + +```rust +#[derive(Row, Debug, Serialize, Deserialize)] +struct MyRow { + fixed_str: [u8; 16], // FixedString(16) +} +``` +* `Enum(8|16)`ã¯[serde_repr](https://docs.rs/serde_repr/latest/serde_repr/)を使用ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```rust +use serde_repr::{Deserialize_repr, Serialize_repr}; + +#[derive(Row, Serialize, Deserialize)] +struct MyRow { + level: Level, +} + +#[derive(Debug, Serialize_repr, Deserialize_repr)] +#[repr(u8)] +enum Level { + Debug = 1, + Info = 2, + Warn = 3, + Error = 4, +} +``` +* `UUID`ã¯`serde::uuid`を使用ã—ã¦[`uuid::Uuid`](https://docs.rs/uuid/latest/uuid/struct.Uuid.html)ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚`uuid`機能ãŒå¿…è¦ã§ã™ã€‚ + +```rust +#[derive(Row, Serialize, Deserialize)] +struct MyRow { + #[serde(with = "clickhouse::serde::uuid")] + uuid: uuid::Uuid, +} +``` +* `IPv6`ã¯[`std::net::Ipv6Addr`](https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html)ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚ +* `IPv4`ã¯`serde::ipv4`を使用ã—ã¦[`std::net::Ipv4Addr`](https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html)ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚ + +```rust +#[derive(Row, Serialize, Deserialize)] +struct MyRow { + #[serde(with = "clickhouse::serde::ipv4")] + ipv4: std::net::Ipv4Addr, +} +``` +* `Date`ã¯`u16`ã¾ãŸã¯ãã®å‘¨ã‚Šã®æ–°ã—ã„åž‹ã«ãƒžãƒƒãƒ”ングã•ã‚Œã€ `1970-01-01`ã‹ã‚‰çµŒéŽã—ãŸæ—¥æ•°ã‚’表ã—ã¾ã™ã€‚ã¾ãŸã€`serde::time::date`を使用ã—ã¦ã€[`time::Date`](https://docs.rs/time/latest/time/struct.Date.html)ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚`time`機能ãŒå¿…è¦ã§ã™ã€‚ + +```rust +#[derive(Row, Serialize, Deserialize)] +struct MyRow { + days: u16, + #[serde(with = "clickhouse::serde::time::date")] + date: Date, +} +``` +* `Date32`ã¯`i32`ã¾ãŸã¯ãã®å‘¨ã‚Šã®æ–°ã—ã„åž‹ã«ãƒžãƒƒãƒ”ングã•ã‚Œã€`1970-01-01`ã‹ã‚‰çµŒéŽã—ãŸæ—¥æ•°ã‚’表ã—ã¾ã™ã€‚ã¾ãŸã€`serde::time::date32`を使用ã—ã¦ã€[`time::Date`](https://docs.rs/time/latest/time/struct.Date.html)ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚`time`機能ãŒå¿…è¦ã§ã™ã€‚ + +```rust +#[derive(Row, Serialize, Deserialize)] +struct MyRow { + days: i32, + #[serde(with = "clickhouse::serde::time::date32")] + date: Date, +} +``` +* `DateTime`ã¯`u32`ã¾ãŸã¯ãã®å‘¨ã‚Šã®æ–°ã—ã„åž‹ã«ãƒžãƒƒãƒ”ングã•ã‚Œã€UNIX時代ã‹ã‚‰çµŒéŽã—ãŸç§’数を表ã—ã¾ã™ã€‚ã¾ãŸã€`serde::time::datetime`を使用ã—ã¦ã€[`time::OffsetDateTime`](https://docs.rs/time/latest/time/struct.OffsetDateTime.html)ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚`time`機能ãŒå¿…è¦ã§ã™ã€‚ + +```rust +#[derive(Row, Serialize, Deserialize)] +struct MyRow { + ts: u32, + #[serde(with = "clickhouse::serde::time::datetime")] + dt: OffsetDateTime, +} +``` + +* `DateTime64(_)`ã¯`i32`ã¾ãŸã¯ãã®å‘¨ã‚Šã®æ–°ã—ã„åž‹ã«ãƒžãƒƒãƒ”ングã•ã‚Œã€UNIX時代ã‹ã‚‰çµŒéŽã—ãŸæ™‚間を表ã—ã¾ã™ã€‚ã¾ãŸã€`serde::time::datetime64::*`を使用ã—ã¦ã€[`time::OffsetDateTime`](https://docs.rs/time/latest/time/struct.OffsetDateTime.html)ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚`time`機能ãŒå¿…è¦ã§ã™ã€‚ + +```rust +#[derive(Row, Serialize, Deserialize)] +struct MyRow { + ts: i64, // `DateTime64(X)`ã«å¿œã˜ãŸçµŒéŽç§’/μs/ms/ns + #[serde(with = "clickhouse::serde::time::datetime64::secs")] + dt64s: OffsetDateTime, // `DateTime64(0)` + #[serde(with = "clickhouse::serde::time::datetime64::millis")] + dt64ms: OffsetDateTime, // `DateTime64(3)` + #[serde(with = "clickhouse::serde::time::datetime64::micros")] + dt64us: OffsetDateTime, // `DateTime64(6)` + #[serde(with = "clickhouse::serde::time::datetime64::nanos")] + dt64ns: OffsetDateTime, // `DateTime64(9)` +} +``` + +* `Tuple(A, B, ...)`ã¯`(A, B, ...)`ã¾ãŸã¯ãã®å‘¨ã‚Šã®æ–°ã—ã„åž‹ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚ +* `Array(_)`ã¯ä»»æ„ã®ã‚¹ãƒ©ã‚¤ã‚¹ã€ä¾‹ï¼š`Vec<_>`, `&[_]`ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚æ–°ã—ã„型もサãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ +* `Map(K, V)`ã¯`Array((K, V))`ã®ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ã€‚ +* `LowCardinality(_)`ã¯ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ +* `Nullable(_)`ã¯`Option<_>`ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚`clickhouse::serde::*`ヘルパーã«å¯¾ã—ã¦ã¯`::option`を追加ã—ã¾ã™ã€‚ + +```rust +#[derive(Row, Serialize, Deserialize)] +struct MyRow { + #[serde(with = "clickhouse::serde::ipv4::option")] + ipv4_opt: Option, +} +``` +* `Nested`ã¯ãƒªãƒãƒ¼ãƒŸãƒ³ã‚°ã‚’使用ã—ã¦è¤‡æ•°ã®é…列をæä¾›ã™ã‚‹ã“ã¨ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ +```rust +// CREATE TABLE test(items Nested(name String, count UInt32)) +#[derive(Row, Serialize, Deserialize)] +struct MyRow { + #[serde(rename = "items.name")] + items_name: Vec, + #[serde(rename = "items.count")] + items_count: Vec, +} +``` +* `Geo`åž‹ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ `Point`ã¯ã‚¿ãƒ—ル`(f64, f64)`ã¨ã—ã¦å‹•ä½œã—ã€ãã®ä»–ã®åž‹ã¯å˜ã«ç‚¹ã®ã‚¹ãƒ©ã‚¤ã‚¹ã§ã™ã€‚ +```rust +type Point = (f64, f64); +type Ring = Vec; +type Polygon = Vec; +type MultiPolygon = Vec; +type LineString = Vec; +type MultiLineString = Vec; + +#[derive(Row, Serialize, Deserialize)] +struct MyRow { + point: Point, + ring: Ring, + polygon: Polygon, + multi_polygon: MultiPolygon, + line_string: LineString, + multi_line_string: MultiLineString, +} +``` + +* `Variant`ã€`Dynamic`ã€ï¼ˆæ–°ã—ã„)`JSON`データ型ã¯ã¾ã ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +## モック + +ã“ã®ã‚¯ãƒ¬ãƒ¼ãƒˆã¯ã€CHサーãƒãƒ¼ã‚’モックã—ã€DDLã€`SELECT`ã€`INSERT`ã€`WATCH`クエリをテストã™ã‚‹ãŸã‚ã®ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯`test-util`機能ã§æœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚**dev-dependency**ã¨ã—ã¦ã®ã¿ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +å‚考:[例](https://github.com/ClickHouse/clickhouse-rs/tree/main/examples/mock.rs)。 + +## トラブルシューティング + +### CANNOT_READ_ALL_DATA + +`CANNOT_READ_ALL_DATA`エラーã®æœ€ã‚‚一般的ãªåŽŸå› ã¯ã€ã‚¢ãƒ—リケーションå´ã®è¡Œå®šç¾©ãŒClickHouseã®ã‚‚ã®ã¨ä¸€è‡´ã—ã¦ã„ãªã„ã“ã¨ã§ã™ã€‚ + +次ã®ã‚ˆã†ãªãƒ†ãƒ¼ãƒ–ルを考ãˆã¦ã¿ã¾ã™ï¼š + +``` +CREATE OR REPLACE TABLE event_log (id UInt32) +ENGINE = MergeTree +ORDER BY timestamp +``` + +ãã—ã¦ã€ã‚¢ãƒ—リケーションå´ã§`EventLog`ãŒæ¬¡ã®ã‚ˆã†ã«å®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã€åž‹ãŒä¸€è‡´ã—ã¦ã„ã¾ã›ã‚“: + +```rust +#[derive(Debug, Serialize, Deserialize, Row)] +struct EventLog { + id: String, // <- 本æ¥ã¯u32ã§ã‚ã‚‹ã¹ãï¼ +} +``` + +データを挿入ã™ã‚‹ã¨ã€æ¬¡ã®ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼š + +``` +Error: BadResponse("Code: 33. DB::Exception: Cannot read all data. Bytes read: 5. Bytes expected: 23.: (at row 1)\n: While executing BinaryRowInputFormat. (CANNOT_READ_ALL_DATA)") +``` + +ã“ã®ä¾‹ã‚’正確ã«ã™ã‚‹ãŸã‚ã«ã¯ã€`EventLog`構造体を次ã®ã‚ˆã†ã«æ­£ã—ã定義ã—ã¾ã™ï¼š + +```rust +#[derive(Debug, Serialize, Deserialize, Row)] +struct EventLog { + id: u32 +} +``` + +## 既知ã®åˆ¶é™ + +* `Variant`ã€`Dynamic`ã€ï¼ˆæ–°ã—ã„)`JSON`データ型ã¯ã¾ã ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +* サーãƒãƒ¼å´ã®ãƒ‘ラメータãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã¯ã¾ã ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。追跡ã™ã‚‹ãŸã‚ã«[ã“ã®å•é¡Œ](https://github.com/ClickHouse/clickhouse-rs/issues/142)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## ãŠå•ã„åˆã‚ã› + +質å•ãŒã‚ã‚‹å ´åˆã‚„手助ã‘ãŒå¿…è¦ãªå ´åˆã¯ã€[Community Slack](https://clickhouse.com/slack)ã‚„[GitHub issues](https://github.com/ClickHouse/clickhouse-rs/issues)を通ã˜ã¦ãŠæ°—軽ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 diff --git a/docs/ja/integrations/migration/_category_.yml b/docs/ja/integrations/migration/_category_.yml new file mode 100644 index 00000000000..da1d794d41b --- /dev/null +++ b/docs/ja/integrations/migration/_category_.yml @@ -0,0 +1,8 @@ +position: 500 +label: 'Migration' +collapsible: true +collapsed: true +link: + type: generated-index + title: Migration + slug: /ja/cloud/migration diff --git a/docs/ja/integrations/migration/clickhouse-local-etl.md b/docs/ja/integrations/migration/clickhouse-local-etl.md new file mode 100644 index 00000000000..bf377ac5e8e --- /dev/null +++ b/docs/ja/integrations/migration/clickhouse-local-etl.md @@ -0,0 +1,165 @@ +--- +sidebar_label: clickhouse-localã®ä½¿ç”¨ +sidebar_position: 20 +keywords: [clickhouse, 移行, マイグレーション, データ, etl, elt, clickhouse-local, clickhouse-client] +slug: '/ja/cloud/migration/clickhouse-local' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + +import AddARemoteSystem from '@site/docs/ja/_snippets/_add_remote_ip_access_list_detail.md'; + + +# clickhouse-localを使用ã—ãŸClickHouseã¸ã®ç§»è¡Œ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ ClickHouse ã®ç§»è¡Œ + + +ClickHouseã€ã‚ˆã‚Šå…·ä½“çš„ã«ã¯[`clickhouse-local`](/docs/ja/operations/utilities/clickhouse-local.md)ã‚’ETLツールã¨ã—ã¦ä½¿ç”¨ã—ã€ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚·ã‚¹ãƒ†ãƒ ã‹ã‚‰ClickHouse Cloudã«ãƒ‡ãƒ¼ã‚¿ã‚’移行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚·ã‚¹ãƒ†ãƒ ã«ClickHouseãŒæä¾›ã™ã‚‹[インテグレーションエンジン](/docs/ja/engines/table-engines/#integration-engines)ã¾ãŸã¯[テーブル関数](/docs/ja/sql-reference/table-functions/)ãŒã‚ã‚‹ã‹ã€ã¾ãŸã¯ãƒ™ãƒ³ãƒ€ãƒ¼ãŒæä¾›ã™ã‚‹JDBCドライãƒã¾ãŸã¯ODBCドライãƒãŒåˆ©ç”¨å¯èƒ½ã§ã‚ã‚‹é™ã‚Šã§ã™ã€‚ + +ã“ã®ç§»è¡Œæ–¹æ³•ã‚’「ピボットã€æ–¹å¼ã¨å‘¼ã¶ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ã€‚中間ã®ãƒ”ボットãƒã‚¤ãƒ³ãƒˆã¾ãŸã¯ãƒãƒ–を使用ã—ã¦ã€ã‚½ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰å®›å…ˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãƒ‡ãƒ¼ã‚¿ã‚’移動ã™ã‚‹ãŸã‚ã§ã™ã€‚ãŸã¨ãˆã°ã€ã“ã®æ–¹æ³•ã¯ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¦ä»¶ã®ãŸã‚ã«ãƒ—ライベートã¾ãŸã¯å†…部ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‹ã‚‰ã®å¤–å‘ã接続ã®ã¿ãŒè¨±å¯ã•ã‚Œã¦ã„ã‚‹å ´åˆã«å¿…è¦ã«ãªã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ãã®ãŸã‚ã€clickhouse-localを使用ã—ã¦ã‚½ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ã€clickhouse-localãŒãƒ”ボットãƒã‚¤ãƒ³ãƒˆã¨ã—ã¦æ©Ÿèƒ½ã™ã‚‹ã“ã¨ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚’宛先ã®ClickHouseデータベースã¸ãƒ—ッシュã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseã¯ã€[MySQL](/docs/ja/engines/table-engines/integrations/mysql/)ã€[PostgreSQL](/docs/ja/engines/table-engines/integrations/postgresql)ã€[MongoDB](/docs/ja/engines/table-engines/integrations/mongodb)ã€ãã—ã¦[SQLite](/docs/ja/engines/table-engines/integrations/sqlite)ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚¨ãƒ³ã‚¸ãƒ³ã¨ãƒ†ãƒ¼ãƒ–ル関数(å³åº§ã«ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚¨ãƒ³ã‚¸ãƒ³ã‚’作æˆã™ã‚‹ï¼‰ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ä»–ã®ã™ã¹ã¦ã®ä¸€èˆ¬çš„ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚·ã‚¹ãƒ†ãƒ ã«ã¯ã€ãƒ™ãƒ³ãƒ€ãƒ¼ã‹ã‚‰åˆ©ç”¨å¯èƒ½ãªJDBCドライãƒã¾ãŸã¯ODBCドライãƒãŒã‚ã‚Šã¾ã™ã€‚ + +## clickhouse-localã¨ã¯ï¼Ÿ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ ClickHouse ã®ç§»è¡Œ + +通常ã€ClickHouseã¯ã‚¯ãƒ©ã‚¹ã‚¿å½¢å¼ã§å®Ÿè¡Œã•ã‚Œã€ã„ãã¤ã‹ã®ClickHouseデータベースエンジンã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒç•°ãªã‚‹ã‚µãƒ¼ãƒã§åˆ†æ•£çš„ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +シングルサーãƒã§ã¯ã€ClickHouseデータベースエンジンã¯`clickhouse-server`プログラムã®ä¸€éƒ¨ã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚データベースアクセス(パスã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãªã©ï¼‰ã¯ã‚µãƒ¼ãƒãƒ¼æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã§è¨­å®šã•ã‚Œã¾ã™ã€‚ + +`clickhouse-local`ツールã¯ã€ClickHouseサーãƒãƒ¼ã‚’設定ã—ãŸã‚Šèµ·å‹•ã—ãŸã‚Šã™ã‚‹ã“ã¨ãªãã€å¤šãã®å…¥åŠ›ã¨å‡ºåŠ›ã«å¯¾ã—ã¦è¶…高速SQLデータ処ç†ãŒå¯èƒ½ãªã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã®å½¢å¼ã§ClickHouseデータベースエンジンを使用ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +## clickhouse-localã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +`clickhouse-local`を使用ã™ã‚‹ã«ã¯ã€ç¾åœ¨ã®ã‚½ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚·ã‚¹ãƒ†ãƒ ã¨ClickHouse Cloudターゲットサービスã®ä¸¡æ–¹ã«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¢ã‚¯ã‚»ã‚¹ã§ãるホストマシンãŒå¿…è¦ã§ã™ã€‚ + +ãã®ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ã§ã€ã‚³ãƒ³ãƒ”ュータã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã«åŸºã¥ã„ã¦`clickhouse-local`ã®é©åˆ‡ãªãƒ“ルドをダウンロードã—ã¾ã™: + + + + +1. `clickhouse-local`をローカルã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã™ã‚‹æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã“ã¨ã§ã™: + ```bash + curl https://clickhouse.com/ | sh + ``` + +1. `clickhouse-local`を実行ã—ã¾ã™ï¼ˆãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã ã‘ã§ã™ï¼‰: + ```bash + ./clickhouse-local + ``` + + + + +1. `clickhouse-local`をローカルã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã™ã‚‹æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã“ã¨ã§ã™: + ```bash + curl https://clickhouse.com/ | sh + ``` + +1. `clickhouse-local`を実行ã—ã¾ã™ï¼ˆãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã ã‘ã§ã™ï¼‰: + ```bash + ./clickhouse local + ``` + + + + +:::info é‡è¦ +ã“ã®ã‚¬ã‚¤ãƒ‰å…¨ä½“ã§ã®ä¾‹ã¯ã€`clickhouse-local`を実行ã™ã‚‹ãŸã‚ã«Linuxコマンド(`./clickhouse-local`)を使用ã—ã¦ã„ã¾ã™ã€‚Macã§`clickhouse-local`を実行ã™ã‚‹å ´åˆã¯ã€`./clickhouse local`を使用ã—ã¦ãã ã•ã„。 +::: + + +:::tip リモートシステムをClickHouse Cloudサービスã®IPアクセスリストã«è¿½åŠ ã™ã‚‹ +`remoteSecure`関数ãŒClickHouse Cloudサービスã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«ã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆã‚·ã‚¹ãƒ†ãƒ ã®IPアドレスãŒIPアクセスリストã§è¨±å¯ã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ’ントã®ä¸‹ã«ã‚ã‚‹**Manage your IP Access List**を展開ã—ã¦è©³ç´°ã‚’確èªã—ã¦ãã ã•ã„。 +::: + + + +## 例1: MySQLã‹ã‚‰ClickHouse Cloudã¸ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚¨ãƒ³ã‚¸ãƒ³ã«ã‚ˆã‚‹ç§»è¡Œ + +ソースã®MySQLデータベースã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã«[インテグレーションテーブルエンジン](/docs/ja/engines/table-engines/integrations/mysql/)([mysqlテーブル関数](/docs/ja/sql-reference/table-functions/mysql/)ã«ã‚ˆã£ã¦å³åº§ã«ä½œæˆï¼‰ã‚’使用ã—ã€ClickHouseクラウドサービス上ã®å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むãŸã‚ã«[remoteSecureテーブル関数](/docs/ja/sql-reference/table-functions/remote/)を使用ã—ã¾ã™ã€‚ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ ClickHouse ã®ç§»è¡Œ + + +### 宛先ClickHouse Cloudサービス上ã§: + +#### 宛先データベースを作æˆã™ã‚‹: + + ```sql + CREATE DATABASE db + ``` + +#### MySQLテーブルã¨ç­‰ä¾¡ãªã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¤å®›å…ˆãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹: + + ```sql + CREATE TABLE db.table ... + ``` + +:::note +ClickHouse Cloud宛先テーブルã®ã‚¹ã‚­ãƒ¼ãƒžã¨ã‚½ãƒ¼ã‚¹MySQLテーブルã®ã‚¹ã‚­ãƒ¼ãƒžã¯ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆã‚«ãƒ©ãƒ åã¨é †åºãŒåŒã˜ã§ã‚ã‚Šã€ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ¼ã‚¿åž‹ãŒäº’æ›æ€§ãŒã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚ +::: + +### clickhouse-localホストマシンã§: + +#### マイグレーションクエリã§clickhouse-localを実行ã™ã‚‹: + + ```sql + ./clickhouse-local --query " +INSERT INTO FUNCTION +remoteSecure('HOSTNAME.clickhouse.cloud:9440', 'db.table', 'default', 'PASS') +SELECT * FROM mysql('host:port', 'database', 'table', 'user', 'password');" + ``` + +:::note +データã¯`clickhouse-local`ホストマシンã«ãƒ­ãƒ¼ã‚«ãƒ«ã§ä¿å­˜ã•ã‚Œã¾ã›ã‚“。代ã‚ã‚Šã«ã€ãƒ‡ãƒ¼ã‚¿ã¯ã‚½ãƒ¼ã‚¹MySQLテーブルã‹ã‚‰èª­ã¿å–られã€å³åº§ã«ClickHouse Cloudサービス上ã®å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ +::: + + +## 例2: MySQLã‹ã‚‰ClickHouse Cloudã¸ã®JDBCブリッジã«ã‚ˆã‚‹ç§»è¡Œ + +ソースMySQLデータベースã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã«[ClickHouse JDBC Bridge](https://github.com/ClickHouse/clickhouse-jdbc-bridge)ãŠã‚ˆã³MySQL JDBCドライãƒã¨ã¨ã‚‚ã«[JDBCインテグレーションテーブルエンジン](/docs/ja/engines/table-engines/integrations/jdbc.md)([jdbcテーブル関数](/docs/ja/sql-reference/table-functions/jdbc.md)ã«ã‚ˆã£ã¦å³åº§ã«ä½œæˆï¼‰ã‚’使用ã—ã€ClickHouseクラウドサービス上ã®å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むãŸã‚ã«[remoteSecureテーブル関数](/docs/ja/sql-reference/table-functions/remote.md)を使用ã—ã¾ã™ã€‚ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ ClickHouse ã®ç§»è¡Œ + +### 宛先ClickHouse Cloudサービスã§: + +#### 宛先データベースを作æˆã™ã‚‹: + ```sql + CREATE DATABASE db + ``` + +#### MySQLテーブルã¨ç­‰ä¾¡ãªã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¤å®›å…ˆãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹: + + ```sql + CREATE TABLE db.table ... + ``` + +:::note +ClickHouse Cloud宛先テーブルã®ã‚¹ã‚­ãƒ¼ãƒžã¨ã‚½ãƒ¼ã‚¹MySQLテーブルã®ã‚¹ã‚­ãƒ¼ãƒžã¯ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€ã‚«ãƒ©ãƒ åã¨é †åºãŒåŒã˜ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã€ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯äº’æ›æ€§ãŒã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +### clickhouse-localホストマシンã§: + +#### ClickHouse JDBC Bridgeをローカルã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã€è¨­å®šã€é–‹å§‹ã™ã‚‹: + +[ガイド](/docs/ja/integrations/data-ingestion/dbms/jdbc-with-clickhouse.md#install-the-clickhouse-jdbc-bridge-locally)ã§ã®æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„。ã“ã®ã‚¬ã‚¤ãƒ‰ã«ã¯MySQLã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’設定ã™ã‚‹ãŸã‚ã®æ‰‹é †ã‚‚å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +#### マイグレーションクエリã§clickhouse-localを実行ã™ã‚‹: + + ```sql + ./clickhouse-local --query " +INSERT INTO FUNCTION +remoteSecure('HOSTNAME.clickhouse.cloud:9440', 'db.table', 'default', 'PASS') +SELECT * FROM jdbc('datasource', 'database', 'table');" + ``` + +:::note +データã¯`clickhouse-local`ホストマシンã«ãƒ­ãƒ¼ã‚«ãƒ«ã§ä¿å­˜ã•ã‚Œã¾ã›ã‚“。代ã‚ã‚Šã«ã€ãƒ‡ãƒ¼ã‚¿ã¯MySQLソーステーブルã‹ã‚‰èª­ã¿å–られã€å³åº§ã«ClickHouse Cloudサービス上ã®å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ +::: + + diff --git a/docs/ja/integrations/migration/clickhouse-to-cloud.md b/docs/ja/integrations/migration/clickhouse-to-cloud.md new file mode 100644 index 00000000000..f29aba8b556 --- /dev/null +++ b/docs/ja/integrations/migration/clickhouse-to-cloud.md @@ -0,0 +1,194 @@ +--- +sidebar_position: 10 +sidebar_label: ClickHouseã‹ã‚‰ClickHouse Cloudã¸ã®ç§»è¡Œ +slug: /ja/cloud/migration/clickhouse-to-cloud +--- +import AddARemoteSystem from '@site/docs/ja/_snippets/_add_remote_ip_access_list_detail.md'; + +# セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseã‹ã‚‰ClickHouse Cloudã¸ã®ç§»è¡Œ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseã®ç§»è¡Œ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseサーãƒãƒ¼ã‹ã‚‰ClickHouse Cloudã¸ã®ç§»è¡Œæ–¹æ³•ã€ãŠã‚ˆã³ClickHouse Cloudサービス間ã®ç§»è¡Œæ–¹æ³•ã‚’示ã—ã¾ã™ã€‚`SELECT`ãŠã‚ˆã³`INSERT`クエリã§[`remoteSecure`](../../sql-reference/table-functions/remote.md)関数を使用ã™ã‚‹ã¨ã€ãƒªãƒ¢ãƒ¼ãƒˆã®ClickHouseサーãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ãŒå¯èƒ½ã¨ãªã‚Šã€ãƒ†ãƒ¼ãƒ–ルã®ç§»è¡ŒãŒ`INSERT INTO`クエリã«`SELECT`を埋ã‚込むã ã‘ã§ç°¡å˜ã«ãªã‚Šã¾ã™ã€‚ + +## セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseã‹ã‚‰ClickHouse Cloudã¸ã®ç§»è¡Œ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseã®ç§»è¡Œ + +:::note +ソーステーブルãŒã‚·ãƒ£ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹ã‹ãƒ¬ãƒ—リケートã•ã‚Œã¦ã„ã‚‹ã‹ã«é–¢ä¿‚ãªãã€ClickHouse Cloudã§ã¯å®›å…ˆãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã ã‘ã§ã™ï¼ˆã“ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹ã‚¨ãƒ³ã‚¸ãƒ³ãƒ‘ラメータã¯çœç•¥å¯èƒ½ã§ã€è‡ªå‹•çš„ã«ReplicatedMergeTreeテーブルã«ãªã‚Šã¾ã™ï¼‰ã€‚ClickHouse Cloudã¯åž‚ç›´ãŠã‚ˆã³æ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚’自動的ã«å‡¦ç†ã—ã¾ã™ã€‚レプリケーションやシャードã®ç®¡ç†ã«ã¤ã„ã¦è€ƒãˆã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +ã“ã®ä¾‹ã§ã¯ã€ã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseサーãƒãƒ¼ãŒ*ソース*ã§ã‚ã‚Šã€ClickHouse CloudサービスãŒ*宛先*ã§ã™ã€‚ + +### æ¦‚è¦ + +プロセスã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +1. ソースサービスã«èª­ã¿å–り専用ユーザーを追加 +2. 宛先サービスã«ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ル構造を複製 +3. ソースã‹ã‚‰å®›å…ˆã«ãƒ‡ãƒ¼ã‚¿ã‚’å–り込むã‹ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®å¯ç”¨æ€§ã«å¿œã˜ã¦ã‚½ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’プッシュ +4. 宛先ã®IPアクセスリストã‹ã‚‰ã‚½ãƒ¼ã‚¹ã‚µãƒ¼ãƒãƒ¼ã‚’削除 (該当ã™ã‚‹å ´åˆ) +5. ソースサービスã‹ã‚‰èª­ã¿å–り専用ユーザーを削除 + +### システム間ã§ã®ãƒ†ãƒ¼ãƒ–ル移行: +ã“ã®ä¾‹ã§ã¯ã€ã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseサーãƒãƒ¼ã‹ã‚‰ClickHouse Cloudã«1ã¤ã®ãƒ†ãƒ¼ãƒ–ルを移行ã—ã¾ã™ã€‚ + +### ソースClickHouseシステムã®å ´åˆ (ç¾åœ¨ãƒ‡ãƒ¼ã‚¿ãŒãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„るシステム) + +- ソーステーブル (`db.table` ã¨ã„ã†ä¾‹) を読ã¿å–る権é™ã‚’æŒã¤èª­ã¿å–り専用ユーザーを追加 +```sql +CREATE USER exporter +IDENTIFIED WITH SHA256_PASSWORD BY 'password-here' +SETTINGS readonly = 1; +``` + +```sql +GRANT SELECT ON db.table TO exporter; +``` + +- テーブル定義をコピー +```sql +select create_table_query +from system.tables +where database = 'db' and table = 'table' +``` + +### 宛先ClickHouse Cloudシステムã§: + +- 宛先データベースを作æˆï¼š +```sql +CREATE DATABASE db +``` + +- ソースã‹ã‚‰ã®CREATE TABLE文を使用ã—ã¦å®›å…ˆã‚’作æˆã€‚ + +:::tip +CREATE文を実行ã™ã‚‹ã¨ãã€ENGINEをパラメータãªã—ã®ReplicatedMergeTreeã«å¤‰æ›´ã—ã¾ã™ã€‚ClickHouse Cloudã¯å¸¸ã«ãƒ†ãƒ¼ãƒ–ルをレプリケートã—ã€æ­£ã—ã„パラメータをæä¾›ã—ã¾ã™ã€‚ãŸã ã—ã€`ORDER BY`ã€`PRIMARY KEY`ã€`PARTITION BY`ã€`SAMPLE BY`ã€`TTL`ã€`SETTINGS`å¥ã¯ä¿æŒã—ã¦ãã ã•ã„。 +::: + +```sql +CREATE TABLE db.table ... +``` + +- `remoteSecure` 関数を使用ã—ã¦ã€ã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾— + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseã®ç§»è¡Œ + +```sql +INSERT INTO db.table SELECT * FROM +remoteSecure('source-hostname', db, table, 'exporter', 'password-here') +``` + +:::note +ソースシステムãŒå¤–部ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‹ã‚‰åˆ©ç”¨ã§ããªã„å ´åˆã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’プルã™ã‚‹ã®ã§ã¯ãªãプッシュã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`remoteSecure` 関数ã¯SELECTã¨INSERTã®ä¸¡æ–¹ã§æ©Ÿèƒ½ã—ã¾ã™ã€‚次ã®ã‚ªãƒ—ションをã”覧ãã ã•ã„。 +::: + +- `remoteSecure` 関数を使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouse Cloudサービスã«ãƒ—ッシュ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseã®ç§»è¡Œ + +:::tip リモートシステムをClickHouse Cloudサービスã®IPアクセスリストã«è¿½åŠ ã™ã‚‹ +`remoteSecure` 関数ãŒClickHouse Cloudサービスã«æŽ¥ç¶šã§ãるよã†ã«ã€ãƒªãƒ¢ãƒ¼ãƒˆã‚·ã‚¹ãƒ†ãƒ ã®IPアドレスをIPアクセスリストã§è¨±å¯ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒãƒƒãƒ—ã®ä¸‹ã®**IPアクセスリストã®ç®¡ç†**を展開ã—ã¦è©³ç´°ã‚’確èªã—ã¦ãã ã•ã„。 +::: + + + +```sql +INSERT INTO FUNCTION +remoteSecure('HOSTNAME.clickhouse.cloud:9440', 'db.table', +'default', 'PASS') SELECT * FROM db.table +``` + +## ClickHouse Cloudサービス間ã®ç§»è¡Œ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseã®ç§»è¡Œ + +ClickHouse Cloudサービス間ã§ãƒ‡ãƒ¼ã‚¿ã‚’移行ã™ã‚‹éš›ã®ä¾‹: +- 復元ã—ãŸãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’移行 +- 開発サービスã‹ã‚‰ã‚¹ãƒ†ãƒ¼ã‚¸ãƒ³ã‚°ã‚µãƒ¼ãƒ“スã¸ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚³ãƒ”ー (ã¾ãŸã¯ã‚¹ãƒ†ãƒ¼ã‚¸ãƒ³ã‚°ã‹ã‚‰æœ¬ç•ªã¸) + +ã“ã®ä¾‹ã§ã¯ã€äºŒã¤ã®ClickHouse CloudサービスãŒã‚ã‚Šã€ãれらã¯*ソース*ã¨*宛先*ã¨å‘¼ã°ã‚Œã¾ã™ã€‚データã¯ã‚½ãƒ¼ã‚¹ã‹ã‚‰å®›å…ˆã«ãƒ—ルã•ã‚Œã¾ã™ã€‚プッシュã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€ã“ã“ã§ã¯èª­ã¿å–り専用ユーザーを使用ã™ã‚‹ãƒ—ルを示ã—ã¾ã™ã€‚ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseã®ç§»è¡Œ + +移行ã«ã¯ã„ãã¤ã‹ã®ã‚¹ãƒ†ãƒƒãƒ—ãŒã‚ã‚Šã¾ã™ï¼š +1. 一ã¤ã®ClickHouse Cloudサービスを*ソース*ã¨ã—ã¦è­˜åˆ¥ã—ã€ä»–方を*宛先*ã¨ã—ã¦è­˜åˆ¥ +1. ソースサービスã«èª­ã¿å–り専用ユーザーを追加 +1. 宛先サービスã«ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ル構造を複製 +1. 一時的ã«ã‚½ãƒ¼ã‚¹ã‚µãƒ¼ãƒ“スã®IPã‚¢ã‚¯ã‚»ã‚¹ã‚’è¨±å¯ +1. ソースã‹ã‚‰å®›å…ˆã«ãƒ‡ãƒ¼ã‚¿ã‚’コピー +1. 宛先ã§IPアクセスリストをå†è¨­å®š +1. ソースサービスã‹ã‚‰èª­ã¿å–り専用ユーザーを削除 + +#### ソースサービスã«èª­ã¿å–り専用ユーザーを追加 + +- ソーステーブル (`db.table` ã¨ã„ã†ä¾‹) を読ã¿å–る権é™ã‚’æŒã¤èª­ã¿å–り専用ユーザーを追加 + ```sql + CREATE USER exporter + IDENTIFIED WITH SHA256_PASSWORD BY 'password-here' + SETTINGS readonly = 1; + ``` + + ```sql + GRANT SELECT ON db.table TO exporter; + ``` + +- テーブル定義をコピー + ```sql + select create_table_query + from system.tables + where database = 'db' and table = 'table' + ``` + +#### 宛先サービスã§ãƒ†ãƒ¼ãƒ–ル構造を複製 + +宛先ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã€ä½œæˆã—ã¾ã™ï¼š + +- 宛先データベースを作æˆ: + ```sql + CREATE DATABASE db + ``` + +- ソースã‹ã‚‰ã®CREATE TABLE文を使用ã—ã¦å®›å…ˆã‚’作æˆã€‚ + + 宛先ã§ã‚½ãƒ¼ã‚¹ã‹ã‚‰ã®`select create_table_query...` ã®å‡ºåŠ›ã‚’使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + + ```sql + CREATE TABLE db.table ... + ``` + +#### ソースサービスã¸ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚¢ã‚¯ã‚»ã‚¹ã‚’è¨±å¯ + +ソースã‹ã‚‰å®›å…ˆã¸ãƒ‡ãƒ¼ã‚¿ã‚’プルã™ã‚‹ã«ã¯ã€ã‚½ãƒ¼ã‚¹ã‚µãƒ¼ãƒ“スãŒæŽ¥ç¶šã‚’許å¯ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚一時的ã«ã‚½ãƒ¼ã‚¹ã‚µãƒ¼ãƒ“スã®ã€ŒIPアクセスリストã€æ©Ÿèƒ½ã‚’無効ã«ã—ã¾ã™ã€‚ + +:::tip +ソースClickHouse Cloudサービスを引ã続ã使用ã™ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚’移行ã™ã‚‹å‰ã«æ—¢å­˜ã®IPアクセスリストをJSONファイルã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã¨ã€ç§»è¡Œå¾Œã«ã‚¢ã‚¯ã‚»ã‚¹ãƒªã‚¹ãƒˆã‚’インãƒãƒ¼ãƒˆã§ãã¾ã™ã€‚ +::: + +許å¯ãƒªã‚¹ãƒˆã‚’変更ã—ã€ä¸€æ™‚çš„ã«**Anywhere**ã‹ã‚‰ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ã¾ã™ã€‚[IPアクセスリスト](/docs/ja/cloud/security/setting-ip-filters)ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§è©³ç´°ã‚’確èªã—ã¦ãã ã•ã„。 + +#### ソースã‹ã‚‰å®›å…ˆã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚³ãƒ”ー + +- `remoteSecure` 関数を使用ã—ã¦ã€ã‚½ãƒ¼ã‚¹ClickHouse Cloudサービスã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’プルã—ã¾ã™ + 宛先ã«æŽ¥ç¶šã—ã¾ã™ã€‚ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’宛先ClickHouse Cloudサービスã§å®Ÿè¡Œã—ã¦ãã ã•ã„: + + ```sql + INSERT INTO db.table SELECT * FROM + remoteSecure('source-hostname', db, table, 'exporter', 'password-here') + ``` + +- 宛先サービスã§ãƒ‡ãƒ¼ã‚¿ã‚’ç¢ºèª + +#### ソースã§IPアクセスリストをå†è¨­å®š + + 以å‰ã«ã‚¢ã‚¯ã‚»ã‚¹ãƒªã‚¹ãƒˆã‚’エクスãƒãƒ¼ãƒˆã—ã¦ãŠã„ãŸå ´åˆã¯ã€**Share**を使用ã—ã¦å†ã‚¤ãƒ³ãƒãƒ¼ãƒˆã§ãã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã¯ã€ã‚¢ã‚¯ã‚»ã‚¹ãƒªã‚¹ãƒˆã«ã‚¨ãƒ³ãƒˆãƒªã‚’å†è¿½åŠ ã—ã¾ã™ã€‚ + +#### 読ã¿å–り専用ã®`exporter`ユーザーを削除 + +```sql +DROP USER exporter +``` + +- サービスIPアクセスリストをスイッãƒã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã‚’åˆ¶é™ + diff --git a/docs/ja/integrations/migration/etl-tool-to-clickhouse.md b/docs/ja/integrations/migration/etl-tool-to-clickhouse.md new file mode 100644 index 00000000000..945593e038c --- /dev/null +++ b/docs/ja/integrations/migration/etl-tool-to-clickhouse.md @@ -0,0 +1,18 @@ +--- +sidebar_label: サードパーティETLツールã®ä½¿ç”¨ +sidebar_position: 20 +keywords: [clickhouse, 移行, データ, etl, elt, clickhouse-local, clickhouse-client] +slug: '/ja/cloud/migration/etl-tool-to-clickhouse' +--- + +# サードパーティETLツールã®ä½¿ç”¨ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ClickHouseã®ç§»è¡Œ + +外部データソースã‹ã‚‰ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’移動ã™ã‚‹ã«ã¯ã€å¤šãã®äººæ°—ã®ã‚ã‚‹ETLãŠã‚ˆã³ELTツールã®1ã¤ã‚’使用ã™ã‚‹ã®ãŒæœ€é©ãªé¸æŠžã§ã™ã€‚以下ã®ãƒ„ールã«é–¢ã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’用æ„ã—ã¦ã„ã¾ã™ï¼š + +- [Airbyte](/docs/ja/integrations/data-ingestion/etl-tools/airbyte-and-clickhouse.md) +- [dbt](/docs/ja/integrations/data-ingestion/etl-tools/dbt/index.md) +- [Vector](/docs/ja/integrations/data-ingestion/etl-tools/vector-to-clickhouse.md) + +ã—ã‹ã—ã€ClickHouseã¨çµ±åˆã™ã‚‹å¤šãã®ä»–ã®ETL/ELTツールも存在ã™ã‚‹ãŸã‚ã€ãŠæ°—ã«å…¥ã‚Šã®ãƒ„ールã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§è©³ç´°ã‚’確èªã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/migration/images/Migrations.excalidraw b/docs/ja/integrations/migration/images/Migrations.excalidraw new file mode 100644 index 00000000000..096af376c09 --- /dev/null +++ b/docs/ja/integrations/migration/images/Migrations.excalidraw @@ -0,0 +1,18373 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://app.excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 5186, + "versionNonce": 1551391109, + "isDeleted": false, + "id": "eocVgawgE_cK_xyDcJv0W", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2842.709746204976, + "y": -274.4604295479421, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 1763430219, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "zbuG_G2z3ThbiIoyaxsn8", + "type": "arrow" + } + ], + "updated": 1664549186130, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5105, + "versionNonce": 150449483, + "isDeleted": false, + "id": "sTZiJekZz3cYz0HSNumAX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2757.533239606998, + "y": -398.61601543652614, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 583261925, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + } + ], + "updated": 1664549186130, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5507, + "versionNonce": 1704780005, + "isDeleted": false, + "id": "GyPY_fHYVk-JJoS-CJBXo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2893.2381823224323, + "y": -307.6648304251157, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 1125756395, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Ia_We5W4appXeHh8tUHML", + "type": "arrow" + } + ], + "updated": 1664549186130, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5436, + "versionNonce": 2009713643, + "isDeleted": false, + "id": "JdoN_xAxm5QVElBgTICsV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2815.280023741235, + "y": -363.9679449559899, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 1460714053, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186130, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5218, + "versionNonce": 460946501, + "isDeleted": false, + "id": "JBfYHzpGaD-BRmURVWyye", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2618.9409576848384, + "y": -280.23510796135633, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 1797437579, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186130, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4484, + "versionNonce": 270472843, + "isDeleted": false, + "id": "ijf3lbGjrEa38HDrGEUaD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2874.88135150373, + "y": -289.9208719248545, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 1475029413, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186130, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4184, + "versionNonce": 1441508261, + "isDeleted": false, + "id": "2-_WUjfO_mVgZHDNNpYT4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2703.458111081255, + "y": -337.601508333757, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 1324445483, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + } + ], + "updated": 1664549186130, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4383, + "versionNonce": 280104235, + "isDeleted": false, + "id": "QHMoWc59857j-vkBXHbUi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2650.3358601947557, + "y": -279.56542918561354, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 1719708933, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186130, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4276, + "versionNonce": 354479877, + "isDeleted": false, + "id": "uF0nkkqh1ak24hajhXNfQ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2778.384825438113, + "y": -359.17132004254927, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 1089491403, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186130, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4255, + "versionNonce": 2095919051, + "isDeleted": false, + "id": "CRELD-37FidPGtMVIrm3F", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2830.8724634921937, + "y": -327.65021775716195, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 1112458341, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186130, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7338, + "versionNonce": 2006369893, + "isDeleted": false, + "id": "AB6imHeOWWcp-MfhCKiHI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2806.4435724536715, + "y": -269.48501592462526, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 1647960171, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186130, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7155, + "versionNonce": 116063851, + "isDeleted": false, + "id": "3Ouuh95Kcw0u-fPjBrk7W", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2737.9568731650625, + "y": -288.2714401303292, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 1596125125, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "arrow", + "version": 681, + "versionNonce": 1880797637, + "isDeleted": false, + "id": "zbuG_G2z3ThbiIoyaxsn8", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2695.5133568786378, + "y": 31.82104502994298, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 0.1789299121555814, + "height": 173.41062845241322, + "seed": 1285069579, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.04430116411155349, + "gap": 23.15195627043795, + "elementId": "eocVgawgE_cK_xyDcJv0W" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.1789299121555814, + -173.41062845241322 + ] + ] + }, + { + "type": "text", + "version": 7565, + "versionNonce": 964032779, + "isDeleted": false, + "id": "udUxQz16RLyBPUa0j18RV", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2677.281267769821, + "y": -72.82190872671163, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 139, + "height": 50, + "seed": 1528475429, + "groupIds": [ + "w2iuN8CTMVUY9BjPJRX8u" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "6FaXKDfsyAvl8vl6CIWfb", + "type": "arrow" + }, + { + "id": "Y7ghgh9VxQ6d7g6RwVuco", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "remoteSecure\ntable function", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "remoteSecure\ntable function" + }, + { + "type": "line", + "version": 6624, + "versionNonce": 1003106597, + "isDeleted": false, + "id": "El4-N3Ym3m9sIeV9AGvEO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2773.0104719014153, + "y": 70.28378667186553, + "strokeColor": "#31303d", + "backgroundColor": "#31303d", + "width": 156.91960211347427, + "height": 202.52965871184844, + "seed": 2089222571, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.5174402625558941, + 153.07081832845213 + ], + [ + 0.024214989577192328, + 170.49726629104168 + ], + [ + 8.081706559553382, + 178.02701896603557 + ], + [ + 36.14151890922964, + 184.3996278642901 + ], + [ + 83.57055021187553, + 186.38396307887345 + ], + [ + 128.88585322586226, + 183.21568123649243 + ], + [ + 152.96220736647672, + 175.63879251308563 + ], + [ + 156.35785132473478, + 169.2513958349361 + ], + [ + 156.83475722633008, + 155.2214896600979 + ], + [ + 156.46044154775237, + 12.841787280570305 + ], + [ + 155.6166138575266, + -0.6104712421417235 + ], + [ + 145.54079235081196, + -8.129027022318041 + ], + [ + 124.32326252611965, + -12.483376690432408 + ], + [ + 75.97137880920118, + -16.145695632974988 + ], + [ + 37.20543098622435, + -13.961846601127224 + ], + [ + 6.716276296944874, + -6.55449714796462 + ], + [ + -0.08484488714419755, + -0.09197470959336009 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 4414, + "versionNonce": 1644732331, + "isDeleted": false, + "id": "gDp4XjcF_Xd0Q9h5hyO-Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2774.2247959700353, + "y": 127.78800947936907, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 157.08237038522887, + "height": 17.4285282276581, + "seed": 883131013, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 4.138445982244127, + 6.947302618857926 + ], + [ + 21.98585257323534, + 12.776025671289773 + ], + [ + 45.73462235278188, + 16.3058651076338 + ], + [ + 82.94003624662689, + 16.627523483376613 + ], + [ + 126.35747752200551, + 14.380233996405693 + ], + [ + 151.7137538814974, + 6.204645573105942 + ], + [ + 157.08237038522887, + -0.8010047442814846 + ] + ] + }, + { + "type": "ellipse", + "version": 7420, + "versionNonce": 403883141, + "isDeleted": false, + "id": "1gOaZ_nGpKcOwWSpadN6y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2776.944777815187, + "y": 56.294857446613605, + "strokeColor": "#000000", + "backgroundColor": "#ffc029", + "width": 155.9130940868504, + "height": 31.532250296696027, + "seed": 2066715723, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4513, + "versionNonce": 986542667, + "isDeleted": false, + "id": "M35kZCSgO9fZjHLn4yCEC", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2773.778389975453, + "y": 184.60078512451946, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 157.08237038522887, + "height": 17.4285282276581, + "seed": 1081797093, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 4.138445982244127, + 6.947302618857926 + ], + [ + 21.98585257323534, + 12.776025671289773 + ], + [ + 45.73462235278188, + 16.3058651076338 + ], + [ + 82.94003624662689, + 16.627523483376613 + ], + [ + 126.35747752200551, + 14.380233996405693 + ], + [ + 151.7137538814974, + 6.204645573105942 + ], + [ + 157.08237038522887, + -0.8010047442814846 + ] + ] + }, + { + "type": "image", + "version": 8065, + "versionNonce": 951184357, + "isDeleted": false, + "id": "WK9ynhswSkPGfIyLfT4b0", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2710.341212876384, + "y": 102.73601224218874, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 35.27218506101576, + "height": 31.349918082230808, + "seed": 1215091435, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 8118, + "versionNonce": 1419702507, + "isDeleted": false, + "id": "MSirq4VMsqUkQnwOfAPBY", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2761.8606995699693, + "y": 155.20284832872676, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 135.77817410382812, + "height": 27.30734227786485, + "seed": 1605264709, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false, + "fontSize": 21.23904399389489, + "fontFamily": 1, + "text": "Self-managed", + "baseline": 19.30734227786485, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Self-managed" + }, + { + "type": "rectangle", + "version": 5154, + "versionNonce": 2109024069, + "isDeleted": false, + "id": "Rl4NqisZYihc_o2Hk139d", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1757.3637013374182, + "y": -261.9365779856453, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 80297355, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "WhT5JlYLdzlyd9Pi3bUto", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5076, + "versionNonce": 1091017611, + "isDeleted": false, + "id": "FhjjWIjuQGmHe4su5k2Xz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1673.0257465779605, + "y": -386.0921638742293, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 1973122213, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5472, + "versionNonce": 1769600677, + "isDeleted": false, + "id": "icSPEVTd0G4t84Cwf0bC-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1807.8921374548745, + "y": -295.1409788628189, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 1535071275, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5405, + "versionNonce": 2084696619, + "isDeleted": false, + "id": "LaB84OqavriGXtx-shONK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1729.933978873677, + "y": -351.44409339369304, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 502241285, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5187, + "versionNonce": 1454234117, + "isDeleted": false, + "id": "x3B7uQvD162Iwb0kqwlJb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1533.5949128172806, + "y": -267.7112563990595, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 746165963, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4453, + "versionNonce": 389575883, + "isDeleted": false, + "id": "j6uIEGeWZsUqlBoW8dB0b", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1789.5353066361722, + "y": -277.39702036255767, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 581455717, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4154, + "versionNonce": 1850626405, + "isDeleted": false, + "id": "i0FZzUR07Iiy9zPcP5jL5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1618.1120662136973, + "y": -325.07765677146017, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 1985119595, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4352, + "versionNonce": 562406251, + "isDeleted": false, + "id": "1xtlEvx9E5nqa3-paE4h9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1564.9898153271943, + "y": -267.0415776233167, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 840112837, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4245, + "versionNonce": 1571347653, + "isDeleted": false, + "id": "9w-kLgt59DSi5zp2Ch9De", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1693.038780570555, + "y": -346.6474684802524, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 5545995, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4224, + "versionNonce": 1400110603, + "isDeleted": false, + "id": "ISaEXrsMC_ePrLeAywQjz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1745.5264186246359, + "y": -315.1263661948651, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 1422752293, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7308, + "versionNonce": 1281031205, + "isDeleted": false, + "id": "Q_otGc_AL1WdWBY571rsI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1721.0975275861138, + "y": -256.9611643623284, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 1148872363, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7125, + "versionNonce": 2013136043, + "isDeleted": false, + "id": "mUdjt5JX1AzOmUxfCOeGS", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1652.6108282975047, + "y": -275.74758856803237, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 600108421, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "arrow", + "version": 616, + "versionNonce": 307376005, + "isDeleted": false, + "id": "WhT5JlYLdzlyd9Pi3bUto", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1610.16731201108, + "y": 44.34489659223982, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 0.1789299121555814, + "height": 173.41062845241322, + "seed": 426662219, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.04430116411155349, + "gap": 23.15195627043795, + "elementId": "Rl4NqisZYihc_o2Hk139d" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.1789299121555814, + -173.41062845241322 + ] + ] + }, + { + "type": "text", + "version": 7682, + "versionNonce": 382613323, + "isDeleted": false, + "id": "T_BVRKbMs0CxFyatCwNDo", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1584.0047749786709, + "y": -132.42288696904507, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 139, + "height": 75, + "seed": 1043789029, + "groupIds": [ + "Z_jvRKw_9nTn-fN3zJ6jR" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "6FaXKDfsyAvl8vl6CIWfb", + "type": "arrow" + }, + { + "id": "Y7ghgh9VxQ6d7g6RwVuco", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "pull data with\nremoteSecure\n", + "baseline": 68, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "pull data with\nremoteSecure\n" + }, + { + "type": "line", + "version": 6593, + "versionNonce": 768341733, + "isDeleted": false, + "id": "9x1I_AbIM-1bYyNyxe0Up", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1687.6644270338556, + "y": 82.80763823416419, + "strokeColor": "#31303d", + "backgroundColor": "#31303d", + "width": 156.91960211347427, + "height": 202.52965871184844, + "seed": 478869483, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.5174402625558941, + 153.07081832845213 + ], + [ + 0.024214989577192328, + 170.49726629104168 + ], + [ + 8.081706559553382, + 178.02701896603557 + ], + [ + 36.14151890922964, + 184.3996278642901 + ], + [ + 83.57055021187553, + 186.38396307887345 + ], + [ + 128.88585322586226, + 183.21568123649243 + ], + [ + 152.96220736647672, + 175.63879251308563 + ], + [ + 156.35785132473478, + 169.2513958349361 + ], + [ + 156.83475722633008, + 155.2214896600979 + ], + [ + 156.46044154775237, + 12.841787280570305 + ], + [ + 155.6166138575266, + -0.6104712421417235 + ], + [ + 145.54079235081196, + -8.129027022318041 + ], + [ + 124.32326252611965, + -12.483376690432408 + ], + [ + 75.97137880920118, + -16.145695632974988 + ], + [ + 37.20543098622435, + -13.961846601127224 + ], + [ + 6.716276296944874, + -6.55449714796462 + ], + [ + -0.08484488714419755, + -0.09197470959336009 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 4383, + "versionNonce": 1581192683, + "isDeleted": false, + "id": "ln1F2DhOgCovBFTa3Frmc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1688.8787511024757, + "y": 140.31186104166773, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 157.08237038522887, + "height": 17.4285282276581, + "seed": 2142310469, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 4.138445982244127, + 6.947302618857926 + ], + [ + 21.98585257323534, + 12.776025671289773 + ], + [ + 45.73462235278188, + 16.3058651076338 + ], + [ + 82.94003624662689, + 16.627523483376613 + ], + [ + 126.35747752200551, + 14.380233996405693 + ], + [ + 151.7137538814974, + 6.204645573105942 + ], + [ + 157.08237038522887, + -0.8010047442814846 + ] + ] + }, + { + "type": "ellipse", + "version": 7390, + "versionNonce": 2035667525, + "isDeleted": false, + "id": "G5Sp4Zc0Bs8Y0rXgm5Es1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1691.5987329476275, + "y": 68.81870900891226, + "strokeColor": "#000000", + "backgroundColor": "#ffc029", + "width": 155.9130940868504, + "height": 31.532250296696027, + "seed": 1541063307, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4482, + "versionNonce": 1297817739, + "isDeleted": false, + "id": "Sr7DK7mCEjE6OERpLkQa-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1688.4323451078935, + "y": 197.12463668681812, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 157.08237038522887, + "height": 17.4285282276581, + "seed": 1980809125, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 4.138445982244127, + 6.947302618857926 + ], + [ + 21.98585257323534, + 12.776025671289773 + ], + [ + 45.73462235278188, + 16.3058651076338 + ], + [ + 82.94003624662689, + 16.627523483376613 + ], + [ + 126.35747752200551, + 14.380233996405693 + ], + [ + 151.7137538814974, + 6.204645573105942 + ], + [ + 157.08237038522887, + -0.8010047442814846 + ] + ] + }, + { + "type": "image", + "version": 8035, + "versionNonce": 567099813, + "isDeleted": false, + "id": "3WZkbAKG-wCOldcaclPZZ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1624.9951680088243, + "y": 115.2598638044874, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 35.27218506101576, + "height": 31.349918082230808, + "seed": 1075329323, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 8088, + "versionNonce": 501012267, + "isDeleted": false, + "id": "3DzCSsBHphljQROyKj5Qm", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1676.5146547024096, + "y": 167.72669989102542, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 135.77817410382812, + "height": 27.30734227786485, + "seed": 394494725, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false, + "fontSize": 21.23904399389489, + "fontFamily": 1, + "text": "Self-managed", + "baseline": 19.30734227786485, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Self-managed" + }, + { + "type": "rectangle", + "version": 5189, + "versionNonce": 1549780229, + "isDeleted": false, + "id": "u_-uiKhnzobkX8T9ukZmq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1145.2510040923016, + "y": -252.7058343503686, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 917363659, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "Qzp2LNJVkLt1RJnx6nWoY", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5110, + "versionNonce": 1848555979, + "isDeleted": false, + "id": "tSapz3XOF_PQIRt5yJxbN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1060.0744974943236, + "y": -376.86142023895263, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 948361829, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5506, + "versionNonce": 1552604261, + "isDeleted": false, + "id": "NxwoJzgeWmSj09AEdK2Mf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1195.779440209758, + "y": -285.9102352275422, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 464923243, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5439, + "versionNonce": 728451179, + "isDeleted": false, + "id": "_O7ylbKjzJpy7H68b0hEM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1117.8212816285604, + "y": -342.21334975841637, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 1105741253, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5221, + "versionNonce": 169609157, + "isDeleted": false, + "id": "_-xAWwWHtGgybNXX4g82Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -921.482215572164, + "y": -258.4805127637828, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 1677436171, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4487, + "versionNonce": 995951371, + "isDeleted": false, + "id": "suC9KO1YfMU2mqA6jR2k2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1177.4226093910556, + "y": -268.166276727281, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 650462501, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4189, + "versionNonce": 1999685413, + "isDeleted": false, + "id": "TVFyNDR1jkMdLunKsAILq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1005.9993689685807, + "y": -315.8469131361835, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 116968363, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4386, + "versionNonce": 1719560619, + "isDeleted": false, + "id": "x8pysprjdXw4LXOaRj-yK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -952.8771180820777, + "y": -257.81083398804003, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 445339781, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4279, + "versionNonce": 372677253, + "isDeleted": false, + "id": "Scw7oQwCDZCupck6Ohjze", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1080.9260833254384, + "y": -337.41672484497576, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 685252171, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4258, + "versionNonce": 33160267, + "isDeleted": false, + "id": "XW86ilQOOHjHpIXKfagrJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1133.4137213795193, + "y": -305.89562255958845, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 116916197, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186131, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7343, + "versionNonce": 803930597, + "isDeleted": false, + "id": "ei-HgI1Ngrq16it8ioscm", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1108.9848303409972, + "y": -247.73042072705175, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 74718443, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7160, + "versionNonce": 1504328427, + "isDeleted": false, + "id": "mLI03EMP_MlhZ9xVv8Ebn", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1040.498131052388, + "y": -266.5168449327557, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 1108917061, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186131, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "arrow", + "version": 686, + "versionNonce": 425426245, + "isDeleted": false, + "id": "Qzp2LNJVkLt1RJnx6nWoY", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -998.0546147659634, + "y": 53.57564022751467, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 0.1789299121555814, + "height": 173.41062845241322, + "seed": 358041483, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.04430116411155348, + "gap": 23.15195627043613, + "elementId": "u_-uiKhnzobkX8T9ukZmq" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.1789299121555814, + -173.41062845241322 + ] + ] + }, + { + "type": "text", + "version": 7741, + "versionNonce": 1511630219, + "isDeleted": false, + "id": "F0P9ewab_cGXeVa_S24JB", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -976.8352852052221, + "y": 8.516873875832971, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 149, + "height": 75, + "seed": 72026789, + "groupIds": [ + "poP2XKPcypx4veilY02Nq" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "6FaXKDfsyAvl8vl6CIWfb", + "type": "arrow" + }, + { + "id": "Y7ghgh9VxQ6d7g6RwVuco", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "push data with\nremoteSecure\n", + "baseline": 68, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "push data with\nremoteSecure\n" + }, + { + "type": "line", + "version": 6627, + "versionNonce": 702909605, + "isDeleted": false, + "id": "kF504rmjDJYjNm1dxF6Sp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1075.5517297887354, + "y": 92.03838186943904, + "strokeColor": "#31303d", + "backgroundColor": "#31303d", + "width": 156.91960211347427, + "height": 202.52965871184844, + "seed": 29105707, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.5174402625558941, + 153.07081832845213 + ], + [ + 0.024214989577192328, + 170.49726629104168 + ], + [ + 8.081706559553382, + 178.02701896603557 + ], + [ + 36.14151890922964, + 184.3996278642901 + ], + [ + 83.57055021187553, + 186.38396307887345 + ], + [ + 128.88585322586226, + 183.21568123649243 + ], + [ + 152.96220736647672, + 175.63879251308563 + ], + [ + 156.35785132473478, + 169.2513958349361 + ], + [ + 156.83475722633008, + 155.2214896600979 + ], + [ + 156.46044154775237, + 12.841787280570305 + ], + [ + 155.6166138575266, + -0.6104712421417235 + ], + [ + 145.54079235081196, + -8.129027022318041 + ], + [ + 124.32326252611965, + -12.483376690432408 + ], + [ + 75.97137880920118, + -16.145695632974988 + ], + [ + 37.20543098622435, + -13.961846601127224 + ], + [ + 6.716276296944874, + -6.55449714796462 + ], + [ + -0.08484488714419755, + -0.09197470959336009 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 4417, + "versionNonce": 2055388203, + "isDeleted": false, + "id": "ZH7P7PZtdtIfH6qJZyyNm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1076.7660538573555, + "y": 149.54260467694257, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 157.08237038522887, + "height": 17.4285282276581, + "seed": 507276805, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 4.138445982244127, + 6.947302618857926 + ], + [ + 21.98585257323534, + 12.776025671289773 + ], + [ + 45.73462235278188, + 16.3058651076338 + ], + [ + 82.94003624662689, + 16.627523483376613 + ], + [ + 126.35747752200551, + 14.380233996405693 + ], + [ + 151.7137538814974, + 6.204645573105942 + ], + [ + 157.08237038522887, + -0.8010047442814846 + ] + ] + }, + { + "type": "ellipse", + "version": 7425, + "versionNonce": 1899409413, + "isDeleted": false, + "id": "oozdvqxDuu2ORxX7UeIA3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1079.486035702511, + "y": 78.04945264418711, + "strokeColor": "#000000", + "backgroundColor": "#ffc029", + "width": 155.9130940868504, + "height": 31.532250296696027, + "seed": 1150099659, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4516, + "versionNonce": 1724907211, + "isDeleted": false, + "id": "tOm4XoP6DuVVQK2K56LOE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1076.3196478627733, + "y": 206.35538032209297, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 157.08237038522887, + "height": 17.4285282276581, + "seed": 1860855141, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 4.138445982244127, + 6.947302618857926 + ], + [ + 21.98585257323534, + 12.776025671289773 + ], + [ + 45.73462235278188, + 16.3058651076338 + ], + [ + 82.94003624662689, + 16.627523483376613 + ], + [ + 126.35747752200551, + 14.380233996405693 + ], + [ + 151.7137538814974, + 6.204645573105942 + ], + [ + 157.08237038522887, + -0.8010047442814846 + ] + ] + }, + { + "type": "image", + "version": 8070, + "versionNonce": 759981925, + "isDeleted": false, + "id": "q89ljFsdB2yUYTrPK8XAd", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1012.8824707637041, + "y": 124.49060743976224, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 35.27218506101576, + "height": 31.349918082230808, + "seed": 392482667, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 8123, + "versionNonce": 1771826539, + "isDeleted": false, + "id": "vmd-fNJzjeCXPn6ynHcjy", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1064.4019574572894, + "y": 176.9574435263021, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 135.77817410382812, + "height": 27.30734227786485, + "seed": 430076101, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false, + "fontSize": 21.23904399389489, + "fontFamily": 1, + "text": "Self-managed", + "baseline": 19.30734227786485, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Self-managed" + }, + { + "type": "rectangle", + "version": 5340, + "versionNonce": 7615173, + "isDeleted": false, + "id": "bnpnAwTJnvGRDpq-8H6T-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1472.8303859983316, + "y": -292.15458962978846, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 479046155, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5263, + "versionNonce": 372312075, + "isDeleted": false, + "id": "HHJx4DC7seOBEmq6s6fB0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1558.0068925963096, + "y": -416.3101755183725, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 2080509989, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5660, + "versionNonce": 1733005861, + "isDeleted": false, + "id": "GSa1VYpyUjmVoVOwxwJN8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1422.3019498808753, + "y": -325.3589905069621, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 1224880299, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5593, + "versionNonce": 847892139, + "isDeleted": false, + "id": "C6CpZKvDq0iL-6dRTAHoM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1500.2601084620728, + "y": -381.6621050378362, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 1677116293, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5375, + "versionNonce": 1858078085, + "isDeleted": false, + "id": "UGXmM8ucVPa0kyo3UCyJq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1696.5991745184692, + "y": -297.9292680432063, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 242017099, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4641, + "versionNonce": 1632682315, + "isDeleted": false, + "id": "ETMfS6RcMoYiZdlNRXeAo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1440.6587806995703, + "y": -307.6150320067045, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 96340709, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4343, + "versionNonce": 705629413, + "isDeleted": false, + "id": "hfvCtJ700vnry5KILpb-5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1612.0820211220525, + "y": -355.295668415607, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 1160266219, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + }, + { + "id": "V88bOY9ZubeXG4qX1OI5_", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4542, + "versionNonce": 199253995, + "isDeleted": false, + "id": "RCxiSv0zMo3ndKzZsBAih", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1665.4389237700925, + "y": -297.39775277623085, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 837117509, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "V88bOY9ZubeXG4qX1OI5_", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4433, + "versionNonce": 1757816901, + "isDeleted": false, + "id": "1JzKblajkQOfcg5CHbIY8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1537.1553067651948, + "y": -376.86548012439926, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 1446956171, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4415, + "versionNonce": 205728395, + "isDeleted": false, + "id": "9Vlq7mUBfahl8YSdJIOxR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1484.667668711114, + "y": -345.34437783901194, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 1263162789, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7496, + "versionNonce": 750966693, + "isDeleted": false, + "id": "3uA3h2WT8qCj-gW9xmOWJ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1509.096559749636, + "y": -287.1791760064716, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 627770155, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7312, + "versionNonce": 389259563, + "isDeleted": false, + "id": "ob6WnA_AmpL_lsbkEtUNu", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1577.5832590382452, + "y": -305.78515545770097, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 2098878725, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "line", + "version": 6313, + "versionNonce": 1613929221, + "isDeleted": false, + "id": "Igw1HfRPwlhyp17tCUbPI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1613.7692621506467, + "y": 278.4652444342846, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 991389131, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 4105, + "versionNonce": 1713128395, + "isDeleted": false, + "id": "s2OyvZ10eSEAL0vmsshSB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1613.3851770212677, + "y": 299.760970549376, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 819130469, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 7112, + "versionNonce": 1267921509, + "isDeleted": false, + "id": "KrDr7i37_0Kxs03RvEl15", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1612.5851766978558, + "y": 273.07196242930695, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 777942123, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4205, + "versionNonce": 555192939, + "isDeleted": false, + "id": "jThqKMmpWCJnOGfX0PEOS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1613.4839813555045, + "y": 320.80254944088847, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1145150405, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "text", + "version": 7141, + "versionNonce": 1269915077, + "isDeleted": false, + "id": "S1jOdSJMTbq9wgWpy9fwM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1493.0954385670557, + "y": 365.0270381715054, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 326, + "height": 91, + "seed": 1326100235, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": "Your current \ndatabase system ", + "baseline": 78, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Your current \ndatabase system " + }, + { + "type": "text", + "version": 8746, + "versionNonce": 149949707, + "isDeleted": false, + "id": "S-sZwKi50-fROp5QFyjP7", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1677.0535132131336, + "y": 82.01172657008647, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 139, + "height": 50, + "seed": 2139347749, + "groupIds": [ + "0s7_yes783KRQ5j50YqxQ" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "integration \ntable function", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "integration \ntable function" + }, + { + "type": "arrow", + "version": 849, + "versionNonce": 1202412837, + "isDeleted": false, + "id": "5tRpfhGO8OWl6LGOfw5wn", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1641.2572484387238, + "y": 245.87294916599603, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 1.5211604095256916, + "height": 168.25096705689975, + "seed": 261526955, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1.5211604095256916, + -168.25096705689975 + ] + ] + }, + { + "type": "arrow", + "version": 1034, + "versionNonce": 1629500331, + "isDeleted": false, + "id": "V88bOY9ZubeXG4qX1OI5_", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1640.58312300724, + "y": -19.02142211849423, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 1.6661732726533955, + "height": 152.55026546497993, + "seed": 1258761861, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.6642194234658855, + "gap": 31.83950144560427, + "elementId": "hfvCtJ700vnry5KILpb-5" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1.6661732726533955, + -152.55026546497993 + ] + ] + }, + { + "type": "rectangle", + "version": 9182, + "versionNonce": 1726902405, + "isDeleted": false, + "id": "_3nfG2YPKVAhsRCxBr43E", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1505.3776948841005, + "y": 4.141482113112943, + "strokeColor": "#15223c", + "backgroundColor": "#31303d", + "width": 294.46426921113283, + "height": 54.852953705010954, + "seed": 791455819, + "groupIds": [ + "4I0L8FmtpVsxnNC_Fy2mw", + "veL8ggdzzKtJ7oWiaquYo" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "_Fx0M6HC7YwaB-SPomer4", + "type": "arrow" + }, + { + "id": "in4OQZmiC0mSNkoK8FiXY", + "type": "arrow" + }, + { + "id": "5tRpfhGO8OWl6LGOfw5wn", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 7538, + "versionNonce": 433227339, + "isDeleted": false, + "id": "gpKHumwb4BuS1AygU0vL2", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1519.521153854581, + "y": 14.599447256006897, + "strokeColor": "#ffffff", + "backgroundColor": "transparent", + "width": 264, + "height": 34, + "seed": 629741029, + "groupIds": [ + "veL8ggdzzKtJ7oWiaquYo" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 3, + "text": "clickhouse-local", + "baseline": 27, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "clickhouse-local" + }, + { + "type": "text", + "version": 7799, + "versionNonce": 121116645, + "isDeleted": false, + "id": "CDx2eRTNYvC2evLn9UA9Y", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1666.8904060179666, + "y": -67.1317816833689, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 139, + "height": 50, + "seed": 598173419, + "groupIds": [ + "QlLkMVTnyWZ9AaG1CZkul" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "6FaXKDfsyAvl8vl6CIWfb", + "type": "arrow" + }, + { + "id": "Y7ghgh9VxQ6d7g6RwVuco", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "remoteSecure\ntable function", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "remoteSecure\ntable function" + }, + { + "type": "rectangle", + "version": 5360, + "versionNonce": 971080939, + "isDeleted": false, + "id": "Y9Xqr6Hy5XTR71BUgQgtI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2038.3863150015131, + "y": -266.15304282011493, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 1511461189, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5284, + "versionNonce": 1922421573, + "isDeleted": false, + "id": "89UPmv7lFKYI3Dfcrz9PT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2123.562821599491, + "y": -390.30862870869896, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 1133597067, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5680, + "versionNonce": 148352907, + "isDeleted": false, + "id": "XC6beEp1xJkgCVgVYEuBd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1987.8578788840568, + "y": -299.3574436972849, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 1980670117, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5613, + "versionNonce": 1432691365, + "isDeleted": false, + "id": "3lVFjqbVZDDRNRgWp43yq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2065.8160374652543, + "y": -355.6605582281627, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 807725099, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5395, + "versionNonce": 2028963371, + "isDeleted": false, + "id": "U9hirGwh1u7iI66-g7-3N", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2262.1551035216507, + "y": -271.92772123352916, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 2132624389, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4661, + "versionNonce": 1951630853, + "isDeleted": false, + "id": "UaM69jwZZ6lRQlZOYy7cP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2006.2147097027519, + "y": -281.61348519702733, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 2135730891, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4364, + "versionNonce": 1360234699, + "isDeleted": false, + "id": "Uxld2hRW7kAuMwWQ4lVbD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2177.637950125234, + "y": -329.29412160593347, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 1765833573, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + }, + { + "id": "DTAqZ4bq8VfVjpy0_jKkX", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4563, + "versionNonce": 576617829, + "isDeleted": false, + "id": "whBDXrKjTQ3QWHPQJZAgT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2230.994852773274, + "y": -271.3962059665573, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 631445867, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "DTAqZ4bq8VfVjpy0_jKkX", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4453, + "versionNonce": 383661931, + "isDeleted": false, + "id": "k783u8fAZ_mgwtupTn84w", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2102.7112357683764, + "y": -350.8639333147221, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 1288029893, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4435, + "versionNonce": 1993574597, + "isDeleted": false, + "id": "w-pb3wv9qjcYWq0jmnUrP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2050.2235977142955, + "y": -319.3428310293384, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 544388107, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186132, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7517, + "versionNonce": 949621259, + "isDeleted": false, + "id": "VpBlYoCVWDmjl-YigSE1z", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2074.6524887528176, + "y": -261.1776291967981, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 1548396069, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7333, + "versionNonce": 1129326629, + "isDeleted": false, + "id": "CD67JjmSWvTnG5NIzlLt2", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2143.1391880414267, + "y": -279.7836086480238, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 1605761707, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186132, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "line", + "version": 6333, + "versionNonce": 2000787627, + "isDeleted": false, + "id": "RXPCvzbV9dqKVVmm-1iJq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2179.325191153828, + "y": 304.4667912439618, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 448567685, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 4125, + "versionNonce": 1237441413, + "isDeleted": false, + "id": "zjFANKNYkK2BOd3X8Dnph", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2178.9411060244493, + "y": 325.7625173590495, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1880583499, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 7133, + "versionNonce": 276777803, + "isDeleted": false, + "id": "cX9egqgHLeCp8W9PSgELZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2178.1411057010373, + "y": 299.0735092389805, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 1364795621, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4225, + "versionNonce": 845554405, + "isDeleted": false, + "id": "TYS5fmiO2X1phq2TnRClT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2179.039910358686, + "y": 346.804096250562, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1693551595, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "text", + "version": 7211, + "versionNonce": 682469867, + "isDeleted": false, + "id": "d48czVWIK1q_na8G8Qtiz", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2155.187992491814, + "y": 393.7710367462041, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 114, + "height": 46, + "seed": 1169013829, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": "MySQL", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "MySQL" + }, + { + "type": "arrow", + "version": 869, + "versionNonce": 1103789637, + "isDeleted": false, + "id": "Ti6G6VOeKpQE33Ru5yLlo", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2206.8131774419053, + "y": 271.8744959756732, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 1.5211604095256916, + "height": 168.25096705689975, + "seed": 38721163, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1.5211604095256916, + -168.25096705689975 + ] + ] + }, + { + "type": "arrow", + "version": 1075, + "versionNonce": 1960260747, + "isDeleted": false, + "id": "DTAqZ4bq8VfVjpy0_jKkX", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2206.1390520104214, + "y": 6.980124691181118, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 1.6661732726533955, + "height": 152.55026546497993, + "seed": 798485413, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.6642194234658858, + "gap": 31.839501445607468, + "elementId": "Uxld2hRW7kAuMwWQ4lVbD" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1.6661732726533955, + -152.55026546497993 + ] + ] + }, + { + "type": "rectangle", + "version": 9203, + "versionNonce": 1322020261, + "isDeleted": false, + "id": "Q7DMddDx1R1RM3Cwr97KG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2070.933623887282, + "y": 30.14302892278647, + "strokeColor": "#15223c", + "backgroundColor": "#31303d", + "width": 294.46426921113283, + "height": 54.852953705010954, + "seed": 652856619, + "groupIds": [ + "X12ICvFt26Q_43ALKdjMs", + "uZ7ohDSs6TS9Y-UYFGOs6" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "_Fx0M6HC7YwaB-SPomer4", + "type": "arrow" + }, + { + "id": "in4OQZmiC0mSNkoK8FiXY", + "type": "arrow" + }, + { + "id": "Ti6G6VOeKpQE33Ru5yLlo", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 7559, + "versionNonce": 615934763, + "isDeleted": false, + "id": "9xrFHPBViBJps8xzsbYw_", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2085.0770828577624, + "y": 40.600994065680425, + "strokeColor": "#ffffff", + "backgroundColor": "transparent", + "width": 264, + "height": 34, + "seed": 1866804997, + "groupIds": [ + "uZ7ohDSs6TS9Y-UYFGOs6" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 3, + "text": "clickhouse-local", + "baseline": 27, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "clickhouse-local" + }, + { + "type": "text", + "version": 7838, + "versionNonce": 2023321861, + "isDeleted": false, + "id": "RLoWdGCEB3nVJ-UXuqLXB", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2232.446335021148, + "y": -35.40711569906671, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 139, + "height": 50, + "seed": 1982656459, + "groupIds": [ + "DOzl9sP535w5t2EIYZN9Y" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "6FaXKDfsyAvl8vl6CIWfb", + "type": "arrow" + }, + { + "id": "Y7ghgh9VxQ6d7g6RwVuco", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "remoteSecure\ntable function", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "remoteSecure\ntable function" + }, + { + "type": "rectangle", + "version": 5453, + "versionNonce": 213241291, + "isDeleted": false, + "id": "QLRQNqM0DekkRV72VDElL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2710.962700345579, + "y": -307.19632612158784, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 53675621, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5378, + "versionNonce": 481232997, + "isDeleted": false, + "id": "JskpHRhct7wBEOBorxYoV", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2796.139206943557, + "y": -431.3519120101719, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 1110621803, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5773, + "versionNonce": 267377771, + "isDeleted": false, + "id": "9b3mEEiZk47sVt5Wr9F5t", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2660.4342642281226, + "y": -340.4007269987578, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 1043263941, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5706, + "versionNonce": 215659461, + "isDeleted": false, + "id": "zqUP79CRucvginaHyPgC3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2738.39242280932, + "y": -396.7038415296356, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 902150411, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5488, + "versionNonce": 1244600075, + "isDeleted": false, + "id": "H-uyNDWn1T1Pa1der-m1c", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2934.7314888657165, + "y": -312.97100453500207, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 1029075237, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4754, + "versionNonce": 87683877, + "isDeleted": false, + "id": "-A3yB5iFEO21LAiMEYdWE", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2678.7910950468176, + "y": -322.65676849850024, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 1046503339, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4458, + "versionNonce": 2045640107, + "isDeleted": false, + "id": "k41TkBJzazUTgviBbyZxh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2850.2143354693, + "y": -370.3374049074064, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 504824965, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + }, + { + "id": "XlVVR4ZgJFBe8WD-KcSP3", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4657, + "versionNonce": 1647986309, + "isDeleted": false, + "id": "lPNF9B7qRFiDLbPpPVwnn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2903.57123811734, + "y": -312.43948926803023, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 908931659, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "XlVVR4ZgJFBe8WD-KcSP3", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4546, + "versionNonce": 710348875, + "isDeleted": false, + "id": "vDJ3KEtLjVJPfAp6yFBtg", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2775.287621112442, + "y": -391.907216616195, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 1949182949, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4528, + "versionNonce": 379137509, + "isDeleted": false, + "id": "EKa41LuMplksaAk8BpXDo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2722.7999830583612, + "y": -360.3861143308113, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 1309061355, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7611, + "versionNonce": 491048683, + "isDeleted": false, + "id": "EhaoZGhA3P_mIUh2FUSZv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2747.2288740968834, + "y": -302.220912498271, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 2141808453, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7427, + "versionNonce": 1633954117, + "isDeleted": false, + "id": "-vRDnb_uQe56L_f9fi3-R", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2815.7155733854925, + "y": -320.8268919494967, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 930569099, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "line", + "version": 6574, + "versionNonce": 1967241611, + "isDeleted": false, + "id": "9MMeH5E8djM0p03TcIQ0n", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2849.783341449118, + "y": 321.1264044694417, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 585512613, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 4366, + "versionNonce": 1140373669, + "isDeleted": false, + "id": "sWDXZfkaJyPY2d6aTcBke", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2849.399256319739, + "y": 342.42213058452944, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 247050795, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 7375, + "versionNonce": 529027115, + "isDeleted": false, + "id": "c4HBnBmcMOU0sHu8O5mkA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2848.599255996327, + "y": 315.7331224644604, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 412228101, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4466, + "versionNonce": 939809797, + "isDeleted": false, + "id": "BjQvC8uOs8L7_2OFfRaSo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2849.4980606539757, + "y": 363.4637094760419, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 79181003, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "text", + "version": 7461, + "versionNonce": 2114130635, + "isDeleted": false, + "id": "uZ57dMk6euTNZSrBOdeYj", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2826.266764169861, + "y": 410.4567813983231, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 114, + "height": 46, + "seed": 1772786021, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": "MySQL", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "MySQL" + }, + { + "type": "text", + "version": 9094, + "versionNonce": 629445477, + "isDeleted": false, + "id": "RLLvzclZKk2Y7wCoZXt7W", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2913.2424719004193, + "y": 54.49551966997387, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 187, + "height": 25, + "seed": 1225614187, + "groupIds": [ + "G9KYceRCtj8BCf9udXOjc" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "jdbc table function", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "jdbc table function" + }, + { + "type": "arrow", + "version": 1216, + "versionNonce": 1363968363, + "isDeleted": false, + "id": "RXRWX_I5avcBD3syyLpzW", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2875.213477889116, + "y": 294.4659430489519, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 1.0821727133607055, + "height": 120.69869142340576, + "seed": 595401925, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.10198627796379695, + "gap": 13.013592838166915, + "elementId": "AQ7Eq4Z-ixVZgP25gx4qf" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1.0821727133607055, + -120.69869142340576 + ] + ] + }, + { + "type": "arrow", + "version": 1264, + "versionNonce": 415686341, + "isDeleted": false, + "id": "XlVVR4ZgJFBe8WD-KcSP3", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2878.715437354487, + "y": -34.063158610291794, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 1.6661732726533955, + "height": 152.55026546497993, + "seed": 872660491, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.6642194234658853, + "gap": 31.83950144560427, + "elementId": "k41TkBJzazUTgviBbyZxh" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1.6661732726533955, + -152.55026546497993 + ] + ] + }, + { + "type": "rectangle", + "version": 9298, + "versionNonce": 1655643147, + "isDeleted": false, + "id": "XIU7OgxZhON1vg7mGWK4K", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2743.510009231348, + "y": -10.90025437868644, + "strokeColor": "#15223c", + "backgroundColor": "#31303d", + "width": 294.46426921113283, + "height": 54.852953705010954, + "seed": 1302805541, + "groupIds": [ + "rItIqxNjuNH8uQjDDwqEh", + "z8lSyLtuUq2RjhK3vt_ki" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "_Fx0M6HC7YwaB-SPomer4", + "type": "arrow" + }, + { + "id": "in4OQZmiC0mSNkoK8FiXY", + "type": "arrow" + }, + { + "id": "RXRWX_I5avcBD3syyLpzW", + "type": "arrow" + }, + { + "id": "5IsHfjXfIvUwAj6Rzg-1G", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 7653, + "versionNonce": 946388517, + "isDeleted": false, + "id": "glOJivpvcygQ5DiFZO_Bx", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2757.653468201828, + "y": -0.4422892357924866, + "strokeColor": "#ffffff", + "backgroundColor": "transparent", + "width": 264, + "height": 34, + "seed": 815121579, + "groupIds": [ + "z8lSyLtuUq2RjhK3vt_ki" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 3, + "text": "clickhouse-local", + "baseline": 27, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "clickhouse-local" + }, + { + "type": "text", + "version": 7914, + "versionNonce": 1847943851, + "isDeleted": false, + "id": "1pZvoCk_Fpp8xhXPSb4w1", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2905.022720365214, + "y": -82.17351817516646, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 139, + "height": 50, + "seed": 538341253, + "groupIds": [ + "SgAZ3oMeBmqZk2Rjv2wES" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "6FaXKDfsyAvl8vl6CIWfb", + "type": "arrow" + }, + { + "id": "Y7ghgh9VxQ6d7g6RwVuco", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "remoteSecure\ntable function", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "remoteSecure\ntable function" + }, + { + "type": "rectangle", + "version": 9476, + "versionNonce": 2069344645, + "isDeleted": false, + "id": "AQ7Eq4Z-ixVZgP25gx4qf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 2744.4668338726988, + "y": 105.9007050823675, + "strokeColor": "#15223c", + "backgroundColor": "#31303d", + "width": 294.46426921113283, + "height": 54.852953705010954, + "seed": 1718482763, + "groupIds": [ + "Mrsd76BfO04f1N4VjwGb_", + "C4NNTepDJg6S_j-UE6oOv" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "_Fx0M6HC7YwaB-SPomer4", + "type": "arrow" + }, + { + "id": "in4OQZmiC0mSNkoK8FiXY", + "type": "arrow" + }, + { + "id": "RXRWX_I5avcBD3syyLpzW", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 7846, + "versionNonce": 1280955723, + "isDeleted": false, + "id": "i8HTBNgjAKi9zonBo2CCS", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2800.285848004449, + "y": 116.17779521062039, + "strokeColor": "#ffffff", + "backgroundColor": "transparent", + "width": 181, + "height": 34, + "seed": 2030581477, + "groupIds": [ + "C4NNTepDJg6S_j-UE6oOv" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "5IsHfjXfIvUwAj6Rzg-1G", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 3, + "text": "JDBC Bridge", + "baseline": 27, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "JDBC Bridge" + }, + { + "type": "text", + "version": 9263, + "versionNonce": 517028069, + "isDeleted": false, + "id": "XkvZi9TJUONQJEKIa5q7M", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2911.32246934891, + "y": 171.4618948866555, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 194, + "height": 25, + "seed": 602330603, + "groupIds": [ + "wec4QXViWCf2eUO2oJME9" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "MySQL JDBC driver", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "MySQL JDBC driver" + }, + { + "type": "arrow", + "version": 1453, + "versionNonce": 1554445291, + "isDeleted": false, + "id": "5IsHfjXfIvUwAj6Rzg-1G", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2878.6953643592533, + "y": 104.42438689604387, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 0.2500900222476048, + "height": 52.22630397311332, + "seed": 319427141, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false, + "startBinding": { + "focus": -0.13195639242293994, + "gap": 11.753408314576518, + "elementId": "i8HTBNgjAKi9zonBo2CCS" + }, + "endBinding": { + "focus": 0.08460500628444809, + "gap": 8.245383596607098, + "elementId": "XIU7OgxZhON1vg7mGWK4K" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.2500900222476048, + -52.22630397311332 + ] + ] + }, + { + "type": "text", + "version": 7887, + "versionNonce": 1549980741, + "isDeleted": false, + "id": "dksJxnPJX1FBxQP0ApYfr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 2237.965571990844, + "y": 105.16392976127827, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 139, + "height": 50, + "seed": 134930571, + "groupIds": [ + "7yOV8wGEwhUqtHYeGO88h" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "6FaXKDfsyAvl8vl6CIWfb", + "type": "arrow" + }, + { + "id": "Y7ghgh9VxQ6d7g6RwVuco", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "mysql\ntable function", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "mysql\ntable function" + }, + { + "type": "rectangle", + "version": 5586, + "versionNonce": 790052491, + "isDeleted": false, + "id": "7VdIZrL59PIsP71N1QzeJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3411.669643334031, + "y": -271.35471878549833, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 2063172005, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "566IgwGGurzir3uYye-06", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5508, + "versionNonce": 1609171877, + "isDeleted": false, + "id": "nSgv45NFeLQ-bqcIzf0hj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3326.493136736053, + "y": -395.51030467408236, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 1821677355, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + }, + { + "id": "566IgwGGurzir3uYye-06", + "type": "arrow" + } + ], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5902, + "versionNonce": 1852126507, + "isDeleted": false, + "id": "iiPkjs4Cho1bcLMTDnnuf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3462.1980794514875, + "y": -304.5591196626756, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 1174668549, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186133, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5835, + "versionNonce": 2106869509, + "isDeleted": false, + "id": "XM_rwAZojOUqEn-QL-LTR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3384.23992087029, + "y": -360.8622341935461, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 267286987, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5617, + "versionNonce": 167466955, + "isDeleted": false, + "id": "l1k49jq0YF3UgAAAkY4Yw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3187.9008548138936, + "y": -277.12939719891256, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 128392293, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4883, + "versionNonce": 668933733, + "isDeleted": false, + "id": "hc2CNF7LyvvFjKUOBTDOe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3443.841248632785, + "y": -286.81516116241073, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 2134050923, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4586, + "versionNonce": 536094315, + "isDeleted": false, + "id": "AHCGqMCshju3TA4qrVVu8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3272.4180082103103, + "y": -334.49579757131687, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 128993221, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4786, + "versionNonce": 630720965, + "isDeleted": false, + "id": "8UfeXjyv1bn1axxHip1Dq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3219.2957573238073, + "y": -276.4597184231734, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 1076675339, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Ia_We5W4appXeHh8tUHML", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4675, + "versionNonce": 656023819, + "isDeleted": false, + "id": "6tFsdZeQfqqJ69y4vuJ1Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3347.344722567168, + "y": -356.0656092801055, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 943523621, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4654, + "versionNonce": 131893541, + "isDeleted": false, + "id": "CzE3x9ZyOtv3cmjUXKtQU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3399.832360621249, + "y": -324.5445069947218, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 995502507, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7740, + "versionNonce": 1491584939, + "isDeleted": false, + "id": "Gq3mlAQK143s3dN97AB6t", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3375.4034695827268, + "y": -266.3793051621815, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 1807407749, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7558, + "versionNonce": 1612323973, + "isDeleted": false, + "id": "Rt6mXmiq9xOLhnVdvSimd", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3307.733963257864, + "y": -284.7681760341711, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 1708768331, + "groupIds": [ + "m44l2OPH0SKVUNVNjo82v" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "arrow", + "version": 988, + "versionNonce": 1535613515, + "isDeleted": false, + "id": "Ia_We5W4appXeHh8tUHML", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3052.171869192357, + "y": -230.066113271605, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 145.7814330403453, + "height": 2.387487505808167, + "seed": 1256669669, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false, + "startBinding": { + "focus": -0.1470189008902115, + "gap": 21.42349255452723, + "elementId": "8UfeXjyv1bn1axxHip1Dq" + }, + "endBinding": { + "focus": -0.054202581905544625, + "gap": 13.318412802223108, + "elementId": "GyPY_fHYVk-JJoS-CJBXo" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 145.7814330403453, + -2.387487505808167 + ] + ] + }, + { + "type": "text", + "version": 7677, + "versionNonce": 906904549, + "isDeleted": false, + "id": "sj3g87N1YYUr9L-hK7w8X", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -3054.5375325110317, + "y": -302.35859420909765, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 139, + "height": 50, + "seed": 730987243, + "groupIds": [ + "HZcAgq3ZliGzaHNhBeld1" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "6FaXKDfsyAvl8vl6CIWfb", + "type": "arrow" + }, + { + "id": "Y7ghgh9VxQ6d7g6RwVuco", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "remoteSecure\ntable function", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "remoteSecure\ntable function" + }, + { + "type": "rectangle", + "version": 5251, + "versionNonce": 735320299, + "isDeleted": false, + "id": "hdWykLSX5pm3Kznfr37KP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2316.457289635463, + "y": -258.6342258254499, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 181386565, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "l1yPE0_hFtqgj_iTE6pr_", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5170, + "versionNonce": 1036418885, + "isDeleted": false, + "id": "JkHi4SEll_ZZFKZyTV_Gf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2231.280783037485, + "y": -382.78981171403393, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 420046219, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5572, + "versionNonce": 1196934027, + "isDeleted": false, + "id": "p8hfQELunDW-RcloGPmxy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2366.9857257529193, + "y": -291.8386267026235, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 1657916581, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "Ia_We5W4appXeHh8tUHML", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5500, + "versionNonce": 1302351525, + "isDeleted": false, + "id": "Z9Y6Mioy1b4frkR1g28RN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2289.027567171722, + "y": -348.14174123349767, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 1165655083, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5282, + "versionNonce": 374151723, + "isDeleted": false, + "id": "I5b1HaGcAJbW8nqBVfHmi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2092.6885011153254, + "y": -264.4089042388641, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 1117450245, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4548, + "versionNonce": 340341253, + "isDeleted": false, + "id": "fl1UhNgfYttf_53GO_Nj6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2348.628894934217, + "y": -274.0946682023623, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 2093989579, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4249, + "versionNonce": 362716363, + "isDeleted": false, + "id": "pIE95rc6PqwKYNe_Ayn9B", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2177.205654511742, + "y": -321.7753046112648, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 1210623845, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4447, + "versionNonce": 247376229, + "isDeleted": false, + "id": "Hj1PTYHrR1mDh_mdYrFUP", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2124.0834036252427, + "y": -263.73922546312133, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 698592619, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4340, + "versionNonce": 1088867179, + "isDeleted": false, + "id": "4OK0yV1DXeHrnrhOEJwVK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2252.1323688685998, + "y": -343.34511632005706, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 1976070853, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4319, + "versionNonce": 1045312709, + "isDeleted": false, + "id": "rSyo9MG4Stvbpis0T7IAj", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2304.6200069226807, + "y": -311.82401403466974, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 2134951947, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7403, + "versionNonce": 1013982731, + "isDeleted": false, + "id": "bHBtQPU29vbCRgFR7A3bI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2280.1911158841585, + "y": -253.65881220213305, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 672649765, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7220, + "versionNonce": 513102885, + "isDeleted": false, + "id": "KKZBzGEThhkzasd3WFrcp", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2211.7044165955494, + "y": -272.445236407837, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 1671532203, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "arrow", + "version": 811, + "versionNonce": 1060449451, + "isDeleted": false, + "id": "l1yPE0_hFtqgj_iTE6pr_", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2169.2609003091247, + "y": 47.64724875243519, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 0.1789299121555814, + "height": 173.41062845241322, + "seed": 1275348357, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.04430116411155349, + "gap": 23.15195627043795, + "elementId": "hdWykLSX5pm3Kznfr37KP" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.1789299121555814, + -173.41062845241322 + ] + ] + }, + { + "type": "text", + "version": 7630, + "versionNonce": 1535215493, + "isDeleted": false, + "id": "ikrVYnuIfskkjAEtLC8ts", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2151.028811200308, + "y": -56.99570500421942, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 139, + "height": 50, + "seed": 426803531, + "groupIds": [ + "BbvhFtoTdHDywZsEGoFIC" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "6FaXKDfsyAvl8vl6CIWfb", + "type": "arrow" + }, + { + "id": "Y7ghgh9VxQ6d7g6RwVuco", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "remoteSecure\ntable function", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "remoteSecure\ntable function" + }, + { + "type": "line", + "version": 6688, + "versionNonce": 1021337419, + "isDeleted": false, + "id": "4rWThdkE9NcLOVotrJ6mz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2246.758015331904, + "y": 86.10999039435592, + "strokeColor": "#31303d", + "backgroundColor": "#31303d", + "width": 156.91960211347427, + "height": 202.52965871184844, + "seed": 1422609637, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.5174402625558941, + 153.07081832845213 + ], + [ + 0.024214989577192328, + 170.49726629104168 + ], + [ + 8.081706559553382, + 178.02701896603557 + ], + [ + 36.14151890922964, + 184.3996278642901 + ], + [ + 83.57055021187553, + 186.38396307887345 + ], + [ + 128.88585322586226, + 183.21568123649243 + ], + [ + 152.96220736647672, + 175.63879251308563 + ], + [ + 156.35785132473478, + 169.2513958349361 + ], + [ + 156.83475722633008, + 155.2214896600979 + ], + [ + 156.46044154775237, + 12.841787280570305 + ], + [ + 155.6166138575266, + -0.6104712421417235 + ], + [ + 145.54079235081196, + -8.129027022318041 + ], + [ + 124.32326252611965, + -12.483376690432408 + ], + [ + 75.97137880920118, + -16.145695632974988 + ], + [ + 37.20543098622435, + -13.961846601127224 + ], + [ + 6.716276296944874, + -6.55449714796462 + ], + [ + -0.08484488714419755, + -0.09197470959336009 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 4478, + "versionNonce": 1196445413, + "isDeleted": false, + "id": "geZkKJOZdhyrggQ7qazU8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2247.972339400524, + "y": 143.61421320185946, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 157.08237038522887, + "height": 17.4285282276581, + "seed": 705175531, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 4.138445982244127, + 6.947302618857926 + ], + [ + 21.98585257323534, + 12.776025671289773 + ], + [ + 45.73462235278188, + 16.3058651076338 + ], + [ + 82.94003624662689, + 16.627523483376613 + ], + [ + 126.35747752200551, + 14.380233996405693 + ], + [ + 151.7137538814974, + 6.204645573105942 + ], + [ + 157.08237038522887, + -0.8010047442814846 + ] + ] + }, + { + "type": "ellipse", + "version": 7485, + "versionNonce": 1338785259, + "isDeleted": false, + "id": "ehbDxEiRf_uFTOq1oLka9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2250.6923212456722, + "y": 72.12106116910763, + "strokeColor": "#000000", + "backgroundColor": "#ffc029", + "width": 155.9130940868504, + "height": 31.532250296696027, + "seed": 1912236101, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4577, + "versionNonce": 277817925, + "isDeleted": false, + "id": "IUWTUS2AQPGLoJUpWh2rm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2247.525933405942, + "y": 200.42698884700985, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 157.08237038522887, + "height": 17.4285282276581, + "seed": 259189387, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 4.138445982244127, + 6.947302618857926 + ], + [ + 21.98585257323534, + 12.776025671289773 + ], + [ + 45.73462235278188, + 16.3058651076338 + ], + [ + 82.94003624662689, + 16.627523483376613 + ], + [ + 126.35747752200551, + 14.380233996405693 + ], + [ + 151.7137538814974, + 6.204645573105942 + ], + [ + 157.08237038522887, + -0.8010047442814846 + ] + ] + }, + { + "type": "image", + "version": 8130, + "versionNonce": 1661159563, + "isDeleted": false, + "id": "SOGsF7zsparRJTeljGmJc", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2184.0887563068727, + "y": 118.56221596468276, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 35.27218506101576, + "height": 31.349918082230808, + "seed": 91166629, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 8183, + "versionNonce": 941332901, + "isDeleted": false, + "id": "w__t4vd79SSk8wNtXWgm8", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2235.608243000458, + "y": 171.02905205121897, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 135.77817410382812, + "height": 27.30734227786485, + "seed": 510353707, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false, + "fontSize": 21.23904399389489, + "fontFamily": 1, + "text": "Self-managed", + "baseline": 19.30734227786485, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Self-managed" + }, + { + "type": "rectangle", + "version": 5245, + "versionNonce": 473956139, + "isDeleted": false, + "id": "wZWqwlbGVmv_3REfU_-V8", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 72.53530425621375, + "y": -78.33831423580341, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 1498864389, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "zbuG_G2z3ThbiIoyaxsn8", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5164, + "versionNonce": 1193483525, + "isDeleted": false, + "id": "jrqM_ilDD8rJ2VVBqrBO3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 157.71181085419175, + "y": -202.49390012438744, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 811336651, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5566, + "versionNonce": 99410379, + "isDeleted": false, + "id": "vPToa6FdwoLyJdILu5COt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 22.006868138757454, + "y": -111.54271511297338, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 372191845, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "7_HcUZOHbIY1UTDIRXGOr", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5494, + "versionNonce": 1159935077, + "isDeleted": false, + "id": "Vfuy5whpmukORwoxPV_ZK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 99.96502671995495, + "y": -167.84582964385118, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 224350827, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5276, + "versionNonce": 2032431211, + "isDeleted": false, + "id": "H216n5THNRqzZzfGZOCEp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 296.30409277635135, + "y": -84.11299264921763, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 2026216901, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4542, + "versionNonce": 1844010949, + "isDeleted": false, + "id": "JWL80PaYAkMuTLBIFT13A", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 40.36369895745975, + "y": -93.7987566127158, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 373280011, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4243, + "versionNonce": 1202793227, + "isDeleted": false, + "id": "OJQZgw4mHPpyoq4K3Jmyo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 211.78693937993467, + "y": -141.47939302161467, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 1211604261, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4441, + "versionNonce": 663953189, + "isDeleted": false, + "id": "VTcOWqSYHjLKC2Db2hVMR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 264.90919026643405, + "y": -83.4433138734712, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 779613099, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4334, + "versionNonce": 638423467, + "isDeleted": false, + "id": "Od7MzAHJWoVlupwHzHs4P", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 136.86022502307696, + "y": -163.04920473041057, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 200454277, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4313, + "versionNonce": 948826757, + "isDeleted": false, + "id": "S_zvmjmRGJRN--_X-781R", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 84.37258696899607, + "y": -131.5281024450196, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 1714570827, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7397, + "versionNonce": 1432626251, + "isDeleted": false, + "id": "HynFmorjXHuDafQLe1vz7", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 108.8014780075182, + "y": -73.36290061248656, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 28596197, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7214, + "versionNonce": 1033329125, + "isDeleted": false, + "id": "qSbLMG7pnZ2tt6nKAULY4", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 177.2881772961273, + "y": -92.14932481819051, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 1682523371, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "rectangle", + "version": 5645, + "versionNonce": 227500779, + "isDeleted": false, + "id": "c5LxUAmYxjw7NIjMdvp-3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -496.42459287284055, + "y": -75.23260347335963, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 1401557829, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "566IgwGGurzir3uYye-06", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5567, + "versionNonce": 1606210885, + "isDeleted": false, + "id": "_pE1fcw_qvGHy7u58Wps9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -411.24808627486254, + "y": -199.38818936194366, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 273117067, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + }, + { + "id": "566IgwGGurzir3uYye-06", + "type": "arrow" + } + ], + "updated": 1664549186134, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5960, + "versionNonce": 656002443, + "isDeleted": false, + "id": "M3A6eayRqfci6_fQLGuCc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -546.9530289902968, + "y": -108.43700435053688, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 231826085, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5893, + "versionNonce": 1247536293, + "isDeleted": false, + "id": "qYH-NnUq0Yn-aPb4P-42Z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -468.99487040909935, + "y": -164.7401188814074, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 2087142955, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5675, + "versionNonce": 87942187, + "isDeleted": false, + "id": "fpjGYlmtPWgk2EMHT6R62", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -272.65580435270294, + "y": -81.00728188677385, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 1429718533, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4941, + "versionNonce": 1629620229, + "isDeleted": false, + "id": "fVOX95mu6E9-WYP1Z22Mz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -528.5961981715946, + "y": -90.69304585027203, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 261310667, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4645, + "versionNonce": 1072047819, + "isDeleted": false, + "id": "NtNAz-pNECma9x2G_pxFz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -357.17295774911963, + "y": -138.37368225917817, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 1555742053, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4845, + "versionNonce": 906805093, + "isDeleted": false, + "id": "ATmXuvYlXL4i4rBFJnn-Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -304.0507068626166, + "y": -80.3376031110347, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 1868953451, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "7_HcUZOHbIY1UTDIRXGOr", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4733, + "versionNonce": 229447019, + "isDeleted": false, + "id": "U8JCs_X1xzl2DrXkdsPkp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -432.09967210597733, + "y": -159.9434939679668, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 463980741, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4712, + "versionNonce": 1063881413, + "isDeleted": false, + "id": "XywoMS8apBgAgb-bHXyTz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -484.5873101600582, + "y": -128.4223916825831, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 707383819, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7799, + "versionNonce": 1843212299, + "isDeleted": false, + "id": "jYjk1VVjSGIyX_3NYhu-M", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -460.1584191215361, + "y": -70.25718985004278, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 1134323749, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7617, + "versionNonce": 1305864741, + "isDeleted": false, + "id": "YMMr7CQZ_Q_5iQnC25Fyz", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -392.4889127966735, + "y": -88.64606072203242, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 551114923, + "groupIds": [ + "Gh5QFUevEkL35kHqkRuvk" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "arrow", + "version": 1165, + "versionNonce": 309393067, + "isDeleted": false, + "id": "7_HcUZOHbIY1UTDIRXGOr", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -136.92681873116726, + "y": -33.94399795946447, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 145.7814330403453, + "height": 2.387487505808167, + "seed": 1988500357, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false, + "startBinding": { + "focus": -0.14701890089017966, + "gap": 21.423492554524714, + "elementId": "ATmXuvYlXL4i4rBFJnn-Y" + }, + "endBinding": { + "focus": -0.05420258190551906, + "gap": 13.318412802221175, + "elementId": "vPToa6FdwoLyJdILu5COt" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 145.7814330403453, + -2.387487505808167 + ] + ] + }, + { + "type": "text", + "version": 7736, + "versionNonce": 1111448965, + "isDeleted": false, + "id": "plfMnxwGm3mHl6DrB2XOY", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -139.29248204984015, + "y": -106.23647889695712, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 139, + "height": 50, + "seed": 824118091, + "groupIds": [ + "Kd-Ab3YPuapFFMQHjjeRy" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "6FaXKDfsyAvl8vl6CIWfb", + "type": "arrow" + }, + { + "id": "Y7ghgh9VxQ6d7g6RwVuco", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "remoteSecure\ntable function", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "remoteSecure\ntable function" + }, + { + "type": "rectangle", + "version": 5326, + "versionNonce": 169011531, + "isDeleted": false, + "id": "rjmTXa-owLXE_vN03orWW", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 106.1187098426808, + "y": 360.7418043474863, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 1017275109, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "zbuG_G2z3ThbiIoyaxsn8", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5245, + "versionNonce": 65234149, + "isDeleted": false, + "id": "EKW3dDelTCBlbIGW3kf4k", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 191.2952164406588, + "y": 236.5862184589023, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 525691371, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5647, + "versionNonce": 706578411, + "isDeleted": false, + "id": "HiiD5S4sPVdQsG7tv7JS-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 55.590273725224506, + "y": 327.53740347031635, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 981384773, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "wB2S7HvWGXAfhfyzZJliu", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5574, + "versionNonce": 911179845, + "isDeleted": false, + "id": "9wr_SoYrP8LZqONOlKro-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 133.548432306422, + "y": 271.23428893943856, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 1082586251, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5356, + "versionNonce": 949703307, + "isDeleted": false, + "id": "wYb1u3p7YLkDfBkdUiaf2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 329.8874983628184, + "y": 354.9671259340721, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 653831589, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4622, + "versionNonce": 794898341, + "isDeleted": false, + "id": "GgRBfq3WjFGuXfTM9Lyoe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 73.9471045439268, + "y": 345.2813619705739, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 1684941611, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4324, + "versionNonce": 1447479595, + "isDeleted": false, + "id": "kL-CDc6-O0jV_X0sLwuUy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 245.37034496640172, + "y": 297.60072556167506, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 20820229, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4521, + "versionNonce": 759558917, + "isDeleted": false, + "id": "y5-Ck5mrLP6GRmzFcfhun", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 298.49259585289747, + "y": 355.63680470981853, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 2138410443, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4414, + "versionNonce": 680160203, + "isDeleted": false, + "id": "LU9Jda4q6oLTkQYv8-fF1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 170.44363060954402, + "y": 276.03091385287917, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 113985637, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4393, + "versionNonce": 1283148389, + "isDeleted": false, + "id": "qVMnQcxHBQv8cli8AGnuw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 117.95599255546313, + "y": 307.5520161382701, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 347577451, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7478, + "versionNonce": 1132509803, + "isDeleted": false, + "id": "3sCda1Ba7vwDKQwgiNx1m", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 142.38488359398525, + "y": 365.7172179708032, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 1768879045, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7365, + "versionNonce": 1036957125, + "isDeleted": false, + "id": "YlPWZi87SXRGq0XIaUtQY", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 210.66548600575425, + "y": 370.70641225843974, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 158, + "height": 36, + "seed": 1610536715, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Destination", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Destination" + }, + { + "type": "rectangle", + "version": 5851, + "versionNonce": 1408513291, + "isDeleted": false, + "id": "PZZfU07Fz7658lCtDAuJM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -530.2659176429997, + "y": 364.3299894533011, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 1162228517, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "566IgwGGurzir3uYye-06", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5773, + "versionNonce": 1012774181, + "isDeleted": false, + "id": "5O92161RK_hfDtw0g_hI7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -445.08941104502173, + "y": 240.17440356471707, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 1069923755, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + }, + { + "id": "566IgwGGurzir3uYye-06", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 6123, + "versionNonce": 157244331, + "isDeleted": false, + "id": "6Gvy8J4igkVq6yLtsC19k", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -580.794353760456, + "y": 331.12558857612385, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 1455326853, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 6098, + "versionNonce": 1133889669, + "isDeleted": false, + "id": "35zIwykMdV-ua1HGxDB6V", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -502.83619517925854, + "y": 274.82247404525333, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 1597427787, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5880, + "versionNonce": 1072475723, + "isDeleted": false, + "id": "KcnXprTx4G3RFbGh45cUN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -306.49712912286213, + "y": 358.5553110398869, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 1888841189, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5104, + "versionNonce": 87322597, + "isDeleted": false, + "id": "nrsLdUIac10vyqx2LAERL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -562.4375229417537, + "y": 348.8695470763887, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 539791083, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4851, + "versionNonce": 1786162411, + "isDeleted": false, + "id": "2mcALtn_Jpe8oU0fVg742", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -391.0142825192788, + "y": 301.18891066748256, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 836266309, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5051, + "versionNonce": 524757829, + "isDeleted": false, + "id": "OdoEJPUUjjpm3wkZyaUby", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -337.8920316327758, + "y": 359.22498981562603, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 1160870283, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "wB2S7HvWGXAfhfyzZJliu", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4938, + "versionNonce": 1015535499, + "isDeleted": false, + "id": "K_Mb-Ei7K-MMMB6K0UW7t", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -465.9409968761365, + "y": 279.61909895869394, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 2078603429, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4917, + "versionNonce": 304839333, + "isDeleted": false, + "id": "t6lbfCFxQlbVuZhDofbE_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -518.4286349302174, + "y": 311.1402012440776, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 1535119403, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 8005, + "versionNonce": 341487147, + "isDeleted": false, + "id": "R06ERP8NpJTYVwIrec4eJ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -493.9997438916953, + "y": 369.30540307661795, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 677944325, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7884, + "versionNonce": 1989074437, + "isDeleted": false, + "id": "THA16tSc-D1o3XgBExhNZ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -409.3998157948654, + "y": 369.1646870977329, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 91, + "height": 36, + "seed": 1694683851, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Source", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Source" + }, + { + "type": "arrow", + "version": 1658, + "versionNonce": 618246347, + "isDeleted": false, + "id": "wB2S7HvWGXAfhfyzZJliu", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -170.7543140350963, + "y": 405.7758149384408, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 213.1839646328135, + "height": 3.1598516889071107, + "seed": 2137052005, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false, + "startBinding": { + "focus": -0.14682192295464302, + "gap": 21.413555760747784, + "elementId": "OdoEJPUUjjpm3wkZyaUby" + }, + "endBinding": { + "focus": -0.05420258190550621, + "gap": 13.318393240498267, + "elementId": "HiiD5S4sPVdQsG7tv7JS-" + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 213.1839646328135, + -3.1598516889071107 + ] + ] + }, + { + "type": "text", + "version": 7965, + "versionNonce": 1936643429, + "isDeleted": false, + "id": "sJTx0Ba2ovrRNuR2HeFUm", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -79.37936725138297, + "y": 286.59799742132054, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 130, + "height": 125, + "seed": 1112818027, + "groupIds": [ + "1HFR7Ei8MXpm-rFjcELuN" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + }, + { + "id": "6FaXKDfsyAvl8vl6CIWfb", + "type": "arrow" + }, + { + "id": "Y7ghgh9VxQ6d7g6RwVuco", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "pull data \nfrom Source\nwith \nremoteSecure\n", + "baseline": 118, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "pull data \nfrom Source\nwith \nremoteSecure\n" + }, + { + "type": "rectangle", + "version": 8137, + "versionNonce": 1604280171, + "isDeleted": false, + "id": "8o5d6LTypxQ8rCasaSBD_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -626.5480510568605, + "y": -2211.1328222176408, + "strokeColor": "#15223c", + "backgroundColor": "#ffffff", + "width": 619.7113194723053, + "height": 149.93149863847913, + "seed": 855330981, + "groupIds": [ + "L-ntX2Ybuoz63aPG94gYe" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "1WQ2iSmfSDsYi77fBC6D1", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7989, + "versionNonce": 1947787461, + "isDeleted": false, + "id": "IfhDKrrSyh5x4Z9wePwZD", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -1314.2783841270584, + "y": -2477.641544159903, + "strokeColor": "#15223c", + "backgroundColor": "#ffffff", + "width": 619.7113194723053, + "height": 416.6435439165702, + "seed": 161167403, + "groupIds": [ + "uHpShOIDYE8Fdg4MD0AyX" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "1WQ2iSmfSDsYi77fBC6D1", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8604, + "versionNonce": 519453195, + "isDeleted": false, + "id": "lOlHuzp_Bro1f80c_5cNq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -2434.008438051972, + "y": -2839.48752327043, + "strokeColor": "#15223c", + "backgroundColor": "#ffffff", + "width": 619.7113194723053, + "height": 416.6435439165702, + "seed": 1525937157, + "groupIds": [ + "XDrUJY93osCRJu9SnBsUk" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "DLLu8qJxF24-v8VR3aTuM", + "type": "arrow" + }, + { + "id": "to7w8wQvUflVpas8AZ72I", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8425, + "versionNonce": 506101797, + "isDeleted": false, + "id": "owHDN4M6MPDZVxWkmlr31", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -2315.1169344429827, + "y": -2540.8198024434214, + "strokeColor": "#15223c", + "backgroundColor": "#31303d", + "width": 373.7286622373204, + "height": 86.97522378964102, + "seed": 1970862795, + "groupIds": [ + "TzVb1rYGyv6CoPeU5WaTR" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "DLLu8qJxF24-v8VR3aTuM", + "type": "arrow" + }, + { + "id": "zgSfFJcjgXYvLLCAvnkV6", + "type": "arrow" + }, + { + "id": "oQUHRqs2QGzG4h5w2xgHi", + "type": "arrow" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 6156, + "versionNonce": 265863339, + "isDeleted": false, + "id": "fCZ78dlKsWB3LHYeTjsV-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1999.1278443875717, + "y": -2783.5686647175507, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 1992371045, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 3948, + "versionNonce": 126956421, + "isDeleted": false, + "id": "7JOyMXo41znrPsMV0493B", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1999.5119295169434, + "y": -2762.2729386024557, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 835021163, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 6954, + "versionNonce": 1542550347, + "isDeleted": false, + "id": "CggrI2uulJ9_pAZkMKg3i", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2000.3119298403626, + "y": -2788.9619467225248, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 1185969861, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4048, + "versionNonce": 747272933, + "isDeleted": false, + "id": "-Pi5MqguOGFoJ1g3XDKED", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1999.4131251827066, + "y": -2741.231359710947, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 332071947, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "line", + "version": 6107, + "versionNonce": 328913387, + "isDeleted": false, + "id": "du9sSXuxvj6INm7ctNc0z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2030.6655592523284, + "y": -2747.1359239737985, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 627004965, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 3899, + "versionNonce": 631494213, + "isDeleted": false, + "id": "F_ZxA64nXfaCQz11e3ttr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2031.0496443817037, + "y": -2725.8401978587035, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1669614251, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 6904, + "versionNonce": 1474256011, + "isDeleted": false, + "id": "ubrEXPq51KMZnVZr5nJOt", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2031.8496447051193, + "y": -2752.5292059787726, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 1035684229, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186135, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 3999, + "versionNonce": 498779557, + "isDeleted": false, + "id": "3KmShGA8VpZg3r1L_nxcu", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2030.950840047467, + "y": -2704.798618967191, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 94092619, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "line", + "version": 5968, + "versionNonce": 1148818219, + "isDeleted": false, + "id": "vo2FuZyVXE4kxU5zDafW6", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2068.3237015834484, + "y": -2718.7109320403843, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 16896229, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186135, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 3760, + "versionNonce": 134007045, + "isDeleted": false, + "id": "VA3YXVsEbA12Ce-gjYuoM", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2068.7077867128237, + "y": -2697.415205925293, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1701567467, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 6764, + "versionNonce": 433321419, + "isDeleted": false, + "id": "90ol4Dx2NQLv4dbdfaUat", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2069.5077870362393, + "y": -2724.104214045362, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 1556114501, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186136, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 3860, + "versionNonce": 367485029, + "isDeleted": false, + "id": "cWerttJv5C9YhfOQDo6B7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2068.608982378587, + "y": -2676.3736270337804, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 520038027, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "text", + "version": 6470, + "versionNonce": 654902379, + "isDeleted": false, + "id": "thD28xk-4mxO0w_Gul7mP", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2125.130287433395, + "y": -2641.427641902789, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 226, + "height": 36, + "seed": 819239845, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186136, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "local databases", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "local databases" + }, + { + "type": "image", + "version": 7108, + "versionNonce": 1833438149, + "isDeleted": false, + "id": "lJNyMtyhWww3bsnkrDxvf", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2274.392192420676, + "y": -2524.7127932699814, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 1762663723, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186136, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "line", + "version": 3336, + "versionNonce": 1944272651, + "isDeleted": false, + "id": "4g0WqdIPD6miHNNmQIkbK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2254.2810782844635, + "y": -2775.069802607545, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 28.141120546780353, + "height": 26.4694644712729, + "seed": 90955525, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.4202789324840898, + 12.662423142687857 + ], + [ + 3.6081824750241807, + 23.68156917315497 + ], + [ + 15.369235688558051, + 26.4694644712729 + ], + [ + 28.141120546780353, + 25.568094542118917 + ], + [ + 19.331773949639178, + 16.303687984597477 + ], + [ + 8.855346337312973, + 6.759908312836984 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 1400, + "versionNonce": 507267877, + "isDeleted": false, + "id": "Ebtrlwu6f6s_oTpUl4skk", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2254.3213866165743, + "y": -2775.013669603247, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 81.63006082540662, + "height": 0, + "seed": 1057570763, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -81.63006082540662, + 0 + ] + ] + }, + { + "type": "line", + "version": 1456, + "versionNonce": 719136171, + "isDeleted": false, + "id": "fOcFgdbU5tM8S6CFAhn6x", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2335.7610500894907, + "y": -2775.0129332344522, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 157.64424675756638, + "seed": 17020517, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 157.64424675756638 + ] + ] + }, + { + "type": "line", + "version": 1411, + "versionNonce": 1496424069, + "isDeleted": false, + "id": "41TQ0eTXw8jeobeYFfQdg", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2335.9078927799374, + "y": -2617.397442653256, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 110.30903029543029, + "height": 0, + "seed": 1258622571, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 110.30903029543029, + 0 + ] + ] + }, + { + "type": "line", + "version": 1414, + "versionNonce": 1126250571, + "isDeleted": false, + "id": "wUvsqNUUs95IZc_6RrtKP", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2225.739013846326, + "y": -2616.8406136278836, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0.08908533300960872, + "height": 132.91524135430075, + "seed": 510239173, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.08908533300960872, + -132.91524135430075 + ] + ] + }, + { + "type": "line", + "version": 1369, + "versionNonce": 1692763621, + "isDeleted": false, + "id": "R6W--oEOcjCTl9C43tEFT", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2255.01231520493, + "y": -2775.24723089887, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29.188478790539616, + "height": 26.489656438216134, + "seed": 265160971, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 29.188478790539616, + 26.489656438216134 + ] + ] + }, + { + "type": "line", + "version": 2691, + "versionNonce": 1787426539, + "isDeleted": false, + "id": "Fdcn78xbgeOSnj7CoQbbk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2363.4190810240425, + "y": -2685.0483800056472, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 222.82788035249055, + "height": 42.93306688912038, + "seed": 582689061, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 82.73777835873057, + 0 + ], + [ + 176.75798103910643, + 0.386784386388482 + ], + [ + 191.8012134679665, + 2.90088289791351 + ], + [ + 197.7558263043905, + 12.183708171236837 + ], + [ + 198.06922697999158, + 29.008828979135387 + ], + [ + 193.3682168459725, + 39.64539960481836 + ], + [ + 176.75798103910634, + 42.54628250273184 + ], + [ + 83.67798038553447, + 42.93306688912038 + ], + [ + -1.2536027024050451, + 42.546282502731934 + ], + [ + -17.863838509271364, + 39.25861521842982 + ], + [ + -24.758653372498994, + 29.782397751912292 + ], + [ + -24.131852021296485, + 12.377100364431039 + ], + [ + -16.610235806866456, + 2.7074907047192958 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "text", + "version": 1533, + "versionNonce": 1415938373, + "isDeleted": false, + "id": "dMHJjXGe9guXMXrK-EYFJ", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2358.1173754919027, + "y": -2681.4355958478964, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 173, + "height": 36, + "seed": 1390325675, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "server-config", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "server-config" + }, + { + "type": "line", + "version": 1226, + "versionNonce": 799138187, + "isDeleted": false, + "id": "g87gFrurQUavEi63bWE9Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2324.2634283468024, + "y": -2747.3133525753483, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 60.21375194139211, + "height": 0, + "seed": 1399174277, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 60.21375194139211, + 0 + ] + ] + }, + { + "type": "line", + "version": 1471, + "versionNonce": 2098139301, + "isDeleted": false, + "id": "ElBPOU2qrPpFter7yuhWl", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2324.1874112357864, + "y": -2736.2068479769196, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 1180795467, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 1485, + "versionNonce": 1805875243, + "isDeleted": false, + "id": "skOtVgeZIfPXuV9pJF6Dd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2324.1600029541178, + "y": -2724.879259809947, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 1814485989, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 1530, + "versionNonce": 747615237, + "isDeleted": false, + "id": "8APrtNgnN5V9YNdGuY9KU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2324.153860521051, + "y": -2713.5416287968264, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 1932591339, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 1547, + "versionNonce": 1819884235, + "isDeleted": false, + "id": "e1iSkYCjVO1Z7oGY9xLs_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2324.2481182261063, + "y": -2700.8752080621643, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 1426855749, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "text", + "version": 6716, + "versionNonce": 518318949, + "isDeleted": false, + "id": "p95-LgGntL-KQaYF7hN_n", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2207.349379832528, + "y": -2519.883290156843, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 224, + "height": 36, + "seed": 1658301323, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186136, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "database engine", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "database engine" + }, + { + "type": "arrow", + "version": 1783, + "versionNonce": 1589487979, + "isDeleted": false, + "id": "DLLu8qJxF24-v8VR3aTuM", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2278.6531810373754, + "y": -2614.1771529124717, + "strokeColor": "#000000", + "backgroundColor": "#868e96", + "width": 31.295754211033, + "height": 69.40972855836844, + "seed": 410183333, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": -0.6882118099130294, + "gap": 11.151214588133826, + "elementId": "2IJ0D70LQc4E7GBchXo4Y" + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 31.295754211033, + 69.40972855836844 + ] + ] + }, + { + "type": "arrow", + "version": 1878, + "versionNonce": 878458565, + "isDeleted": false, + "id": "zgSfFJcjgXYvLLCAvnkV6", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2054.711098371644, + "y": -2605.4727323626003, + "strokeColor": "#000000", + "backgroundColor": "#868e96", + "width": 21.171898020946173, + "height": 60.90873194937376, + "seed": 160432683, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.17799632636425824, + "gap": 3.7441979698051, + "elementId": "owHDN4M6MPDZVxWkmlr31" + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -21.171898020946173, + 60.90873194937376 + ] + ] + }, + { + "type": "rectangle", + "version": 7810, + "versionNonce": 2008761355, + "isDeleted": false, + "id": "9xGjafV3vr3k4QjWOoZl7", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -1195.6070062758836, + "y": -2178.973823332891, + "strokeColor": "#15223c", + "backgroundColor": "#31303d", + "width": 373.7286622373204, + "height": 86.97522378964102, + "seed": 420006405, + "groupIds": [ + "q8BAAGEs7VgjlP3TlbgV5" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "1WQ2iSmfSDsYi77fBC6D1", + "type": "arrow" + }, + { + "id": "MsQOvDI0B0vHVxpY1itjF", + "type": "arrow" + } + ], + "updated": 1664549186136, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 5550, + "versionNonce": 1737692709, + "isDeleted": false, + "id": "C_ff__dpNEYjPWzj8x7qf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -879.3977904626563, + "y": -2421.722685607024, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 1883538635, + "groupIds": [ + "t44jaMA2cANIgv7wU62tb" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 3342, + "versionNonce": 1600948907, + "isDeleted": false, + "id": "z1x4uq2iKYVksIjr67LFm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -879.7818755920316, + "y": -2400.4269594919324, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 130761061, + "groupIds": [ + "t44jaMA2cANIgv7wU62tb" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 6345, + "versionNonce": 58132869, + "isDeleted": false, + "id": "-IRYwunN3-LHQeU_Mqiuq", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -880.5818759154472, + "y": -2427.1159676120014, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 512734059, + "groupIds": [ + "t44jaMA2cANIgv7wU62tb" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186136, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 3442, + "versionNonce": 1518075211, + "isDeleted": false, + "id": "LPgKzYud4xjEI3SrfTIww", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -879.6830712577948, + "y": -2379.38538060042, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 436718789, + "groupIds": [ + "t44jaMA2cANIgv7wU62tb" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "line", + "version": 5501, + "versionNonce": 423989477, + "isDeleted": false, + "id": "-nlSvDoxV24uIt8EvhvJb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -910.9355053274166, + "y": -2385.289944863268, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 1153175051, + "groupIds": [ + "p1M8ePJl3IsnIgMnz_coa" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 3293, + "versionNonce": 876878827, + "isDeleted": false, + "id": "Lrl2c88T-b0-CzfgcQjC0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -911.319590456792, + "y": -2363.9942187481765, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 2136730661, + "groupIds": [ + "p1M8ePJl3IsnIgMnz_coa" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 6295, + "versionNonce": 915156037, + "isDeleted": false, + "id": "Pq1a2mHMny48WxACyoviR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -912.1195907802075, + "y": -2390.6832268682456, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 633607339, + "groupIds": [ + "p1M8ePJl3IsnIgMnz_coa" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186136, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 3393, + "versionNonce": 1758422667, + "isDeleted": false, + "id": "kox69SzM1UYi2K90cG-Rw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -911.2207861225552, + "y": -2342.9526398566677, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 397746053, + "groupIds": [ + "p1M8ePJl3IsnIgMnz_coa" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "line", + "version": 5362, + "versionNonce": 1529371557, + "isDeleted": false, + "id": "WTYe4F3Uwv12Mg1UKU6EK", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -948.5936476585348, + "y": -2356.8649529298573, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 1095911243, + "groupIds": [ + "V7h5dcjt_e-bILChTDhlJ" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 3154, + "versionNonce": 249060651, + "isDeleted": false, + "id": "AF25pl3vV8MpUK1w4GQef", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -948.9777327879101, + "y": -2335.5692268147623, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1766909669, + "groupIds": [ + "V7h5dcjt_e-bILChTDhlJ" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 6155, + "versionNonce": 793222917, + "isDeleted": false, + "id": "m6-9zYuql8_uOvmQ677Xk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -949.7777331113257, + "y": -2362.2582349348313, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 1036068331, + "groupIds": [ + "V7h5dcjt_e-bILChTDhlJ" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186136, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 3254, + "versionNonce": 29982667, + "isDeleted": false, + "id": "KGPZOq2fKhP8g-iXm5gKO", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -948.8789284536733, + "y": -2314.5276479232534, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1455211077, + "groupIds": [ + "V7h5dcjt_e-bILChTDhlJ" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "text", + "version": 5864, + "versionNonce": 2036823653, + "isDeleted": false, + "id": "7u8QGBy2yXZZHlgiJxYq8", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -967.0651813436962, + "y": -2279.5816627922623, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 149, + "height": 36, + "seed": 303771787, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186136, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "databases", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "databases" + }, + { + "type": "image", + "version": 6500, + "versionNonce": 1270697579, + "isDeleted": false, + "id": "UE-lXJ75LD3ut7MQ8LB0t", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1154.6621384957625, + "y": -2162.8668141594544, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 349581733, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186136, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "line", + "version": 2731, + "versionNonce": 1414881733, + "isDeleted": false, + "id": "eni9frbYUCh26lLp9P91N", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1134.55102435955, + "y": -2413.223823497018, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 28.141120546780353, + "height": 26.4694644712729, + "seed": 1880811307, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.4202789324840898, + 12.662423142687857 + ], + [ + 3.6081824750241807, + 23.68156917315497 + ], + [ + 15.369235688558051, + 26.4694644712729 + ], + [ + 28.141120546780353, + 25.568094542118917 + ], + [ + 19.331773949639178, + 16.303687984597477 + ], + [ + 8.855346337312973, + 6.759908312836984 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 794, + "versionNonce": 1333676299, + "isDeleted": false, + "id": "qo52KSrQz2Kp_NMVFvAJy", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1134.5913326916607, + "y": -2413.1676904927162, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 81.63006082540662, + "height": 0, + "seed": 1623897349, + "groupIds": [ + "Nrj5jBY5GXFtj9YeXiFl4" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -81.63006082540662, + 0 + ] + ] + }, + { + "type": "line", + "version": 850, + "versionNonce": 623829285, + "isDeleted": false, + "id": "q65ecq1UCsaaRRT5xFQU6", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1216.0309961645735, + "y": -2413.1669541239253, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 157.64424675756638, + "seed": 1848297931, + "groupIds": [ + "Nrj5jBY5GXFtj9YeXiFl4" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 157.64424675756638 + ] + ] + }, + { + "type": "line", + "version": 805, + "versionNonce": 847703979, + "isDeleted": false, + "id": "ot3cmlGfx6olNKg7B_EPM", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1216.1778388550238, + "y": -2255.551463542729, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 110.30903029543029, + "height": 0, + "seed": 1981271141, + "groupIds": [ + "Nrj5jBY5GXFtj9YeXiFl4" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 110.30903029543029, + 0 + ] + ] + }, + { + "type": "line", + "version": 808, + "versionNonce": 1365341317, + "isDeleted": false, + "id": "i4aG1wwhE1qIMqB79RSKq", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1106.0089599214089, + "y": -2254.9946345173566, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0.08908533300960872, + "height": 132.91524135430075, + "seed": 1902467179, + "groupIds": [ + "Nrj5jBY5GXFtj9YeXiFl4" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.08908533300960872, + -132.91524135430075 + ] + ] + }, + { + "type": "line", + "version": 763, + "versionNonce": 117555787, + "isDeleted": false, + "id": "-48LMYLMQKlmphs3CsegD", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1135.2822612800164, + "y": -2413.4012517883393, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29.188478790539616, + "height": 26.489656438216134, + "seed": 1149958085, + "groupIds": [ + "Nrj5jBY5GXFtj9YeXiFl4" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 29.188478790539616, + 26.489656438216134 + ] + ] + }, + { + "type": "line", + "version": 2086, + "versionNonce": 883596261, + "isDeleted": false, + "id": "leoRf9zelCB40OVcpDG3i", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1243.689027099129, + "y": -2323.2024008951203, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 222.82788035249055, + "height": 42.93306688912038, + "seed": 1469387531, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 82.73777835873057, + 0 + ], + [ + 176.75798103910643, + 0.386784386388482 + ], + [ + 191.8012134679665, + 2.90088289791351 + ], + [ + 197.7558263043905, + 12.183708171236837 + ], + [ + 198.06922697999158, + 29.008828979135387 + ], + [ + 193.3682168459725, + 39.64539960481836 + ], + [ + 176.75798103910634, + 42.54628250273184 + ], + [ + 83.67798038553447, + 42.93306688912038 + ], + [ + -1.2536027024050451, + 42.546282502731934 + ], + [ + -17.863838509271364, + 39.25861521842982 + ], + [ + -24.758653372498994, + 29.782397751912292 + ], + [ + -24.131852021296485, + 12.377100364431039 + ], + [ + -16.610235806866456, + 2.7074907047192958 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "text", + "version": 925, + "versionNonce": 902381803, + "isDeleted": false, + "id": "kT6GiFMZmJAHGfQ8r00_N", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1238.3873215669892, + "y": -2319.5896167373694, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 173, + "height": 36, + "seed": 1715582757, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "server-config", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "server-config" + }, + { + "type": "line", + "version": 620, + "versionNonce": 1461180229, + "isDeleted": false, + "id": "l2NCpRyjNaEBL_tyLF61N", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1204.5333744218851, + "y": -2385.4673734648177, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 60.21375194139211, + "height": 0, + "seed": 1630828971, + "groupIds": [ + "RTfMpmxNGvaxlvYzr-7hS" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 60.21375194139211, + 0 + ] + ] + }, + { + "type": "line", + "version": 865, + "versionNonce": 677899147, + "isDeleted": false, + "id": "ZaCZ8v6BqbBfjT2w95s6z", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1204.4573573108728, + "y": -2374.360868866389, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 1437174405, + "groupIds": [ + "RTfMpmxNGvaxlvYzr-7hS" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 879, + "versionNonce": 1661380261, + "isDeleted": false, + "id": "wxOmkWcSJPBx1-K3oL3mG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1204.4299490292042, + "y": -2363.03328069942, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 1533938763, + "groupIds": [ + "RTfMpmxNGvaxlvYzr-7hS" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186136, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 924, + "versionNonce": 857227819, + "isDeleted": false, + "id": "o9HHNCuZXX7qEny2rQo-r", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1204.4238065961372, + "y": -2351.6956496862995, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 1669329381, + "groupIds": [ + "RTfMpmxNGvaxlvYzr-7hS" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 941, + "versionNonce": 1529121285, + "isDeleted": false, + "id": "6UIQWH7tXvdBD-vWnmKyU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1204.518064301189, + "y": -2339.0292289516374, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 169626347, + "groupIds": [ + "RTfMpmxNGvaxlvYzr-7hS" + ], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "text", + "version": 6109, + "versionNonce": 1053082827, + "isDeleted": false, + "id": "Zw3Q4k7LAawCjJpC01mGn", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1087.6193259076144, + "y": -2158.0373110463124, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 224, + "height": 36, + "seed": 1825729861, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "database engine", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "database engine" + }, + { + "type": "arrow", + "version": 391, + "versionNonce": 275710309, + "isDeleted": false, + "id": "1WQ2iSmfSDsYi77fBC6D1", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1157.9424821553775, + "y": -2251.670750881972, + "strokeColor": "#000000", + "backgroundColor": "#868e96", + "width": 30.543190647570555, + "height": 68.97537186588124, + "seed": 1372173707, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": -0.4742441762028566, + "gap": 3.7215556831997674, + "elementId": "9xGjafV3vr3k4QjWOoZl7" + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 30.543190647570555, + 68.97537186588124 + ] + ] + }, + { + "type": "arrow", + "version": 711, + "versionNonce": 856159083, + "isDeleted": false, + "id": "MsQOvDI0B0vHVxpY1itjF", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -929.1710124087094, + "y": -2244.199945035819, + "strokeColor": "#000000", + "backgroundColor": "#868e96", + "width": 27.00154789127282, + "height": 61.48192373312122, + "seed": 1358855333, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.15452720968572006, + "gap": 3.744197969806919, + "elementId": "9xGjafV3vr3k4QjWOoZl7" + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -27.00154789127282, + 61.48192373312122 + ] + ] + }, + { + "type": "rectangle", + "version": 7944, + "versionNonce": 1479773381, + "isDeleted": false, + "id": "PX9bdLR5yM01mzEzgVkkY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -498.52377385314594, + "y": -2175.897587804234, + "strokeColor": "#15223c", + "backgroundColor": "#31303d", + "width": 373.7286622373204, + "height": 86.97522378964102, + "seed": 565234731, + "groupIds": [ + "nMjbdAw5na12mCX8CXtL_" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "1WQ2iSmfSDsYi77fBC6D1", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 6635, + "versionNonce": 539774475, + "isDeleted": false, + "id": "bsVBCXA748FSATArbCkum", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -458.0167475576445, + "y": -2159.5662654577254, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 665952261, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 6244, + "versionNonce": 34581541, + "isDeleted": false, + "id": "UUEqDhCh-gcse_FwzByhj", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -390.8107114416007, + "y": -2154.9610755176554, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 224, + "height": 36, + "seed": 498863819, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "database engine", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "database engine" + }, + { + "type": "text", + "version": 6229, + "versionNonce": 690771115, + "isDeleted": false, + "id": "Ew02QnfdHLCLjdtzreHXt", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1181.9094389344873, + "y": -2040.4462005822033, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 360, + "height": 44, + "seed": 921261925, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": "clickhouse-server", + "baseline": 35, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "clickhouse-server" + }, + { + "type": "text", + "version": 6344, + "versionNonce": 233889669, + "isDeleted": false, + "id": "tof5mYrfcrFk1yW2Kkf7C", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -493.7546811131933, + "y": -2040.4462005822033, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 339, + "height": 44, + "seed": 142998891, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 3, + "text": "clickhouse-local", + "baseline": 35, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "clickhouse-local" + }, + { + "type": "text", + "version": 6283, + "versionNonce": 766674763, + "isDeleted": false, + "id": "gwshLyWLuynSAj1I4DGMa", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1898.7704829782697, + "y": -2040.4462005822033, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 359, + "height": 46, + "seed": 687022789, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": "A ClickHouse cluster", + "baseline": 32, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "A ClickHouse cluster" + }, + { + "type": "rectangle", + "version": 8771, + "versionNonce": 571778789, + "isDeleted": false, + "id": "2IJ0D70LQc4E7GBchXo4Y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -2236.2062122382094, + "y": -2657.4604490531865, + "strokeColor": "#15223c", + "backgroundColor": "#ffffff", + "width": 619.7113194723053, + "height": 416.6435439165702, + "seed": 1834555403, + "groupIds": [ + "U0h2rmvhxA2gwH1s-q5xK" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "oQUHRqs2QGzG4h5w2xgHi", + "type": "arrow" + }, + { + "id": "to7w8wQvUflVpas8AZ72I", + "type": "arrow" + }, + { + "id": "DLLu8qJxF24-v8VR3aTuM", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 8588, + "versionNonce": 874079723, + "isDeleted": false, + "id": "w6lV85637T8vrQnLtQo0h", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -2117.31470862922, + "y": -2358.792728226178, + "strokeColor": "#15223c", + "backgroundColor": "#31303d", + "width": 373.7286622373204, + "height": 86.97522378964102, + "seed": 40665637, + "groupIds": [ + "rufko5ZiQVhaQIYHNmSaH" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "oQUHRqs2QGzG4h5w2xgHi", + "type": "arrow" + }, + { + "id": "sKcHbfBhkzgjKfvYE_7GJ", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 6321, + "versionNonce": 1091076677, + "isDeleted": false, + "id": "vMqGIVkP_P4qA4lq7uZVX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1801.3256185738092, + "y": -2601.5415905003074, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 170909355, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 4113, + "versionNonce": 325808267, + "isDeleted": false, + "id": "xz2OkFtyOky0242nkEq-R", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1801.7097037031808, + "y": -2580.2458643852124, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1480783237, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 7120, + "versionNonce": 1068102053, + "isDeleted": false, + "id": "oPYEfDHa3usT3Yh_9hbNG", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1802.5097040266, + "y": -2606.9348725052814, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 2041893195, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4213, + "versionNonce": 1566779179, + "isDeleted": false, + "id": "uPueOipKG6P9QxFSZ74Ck", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1801.610899368944, + "y": -2559.2042854937035, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1169423589, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "line", + "version": 6272, + "versionNonce": 2066117893, + "isDeleted": false, + "id": "hMsiCnXNSIotMym_Ltblx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1832.8633334385677, + "y": -2565.108849756555, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 490893291, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 4064, + "versionNonce": 141232587, + "isDeleted": false, + "id": "NbKOwIRa0uNLPX4qQM-uz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1833.247418567943, + "y": -2543.81312364146, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 575477829, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 7070, + "versionNonce": 1325108325, + "isDeleted": false, + "id": "wCX7A_I4NX1TASBumw2zS", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1834.0474188913586, + "y": -2570.502131761529, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 1189296779, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4164, + "versionNonce": 1503500395, + "isDeleted": false, + "id": "Z87gu7b7LzxDOuq9g9FAw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1833.1486142337062, + "y": -2522.7715447499477, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 2011940773, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "line", + "version": 6133, + "versionNonce": 1257682885, + "isDeleted": false, + "id": "VFDI5b6VToCAXDifZJdln", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1870.5214757696858, + "y": -2536.683857823141, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 592556331, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 3925, + "versionNonce": 247812875, + "isDeleted": false, + "id": "52kKBUaqBC5sVlQeaSGJA", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1870.9055608990611, + "y": -2515.3881317080495, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 951945989, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 6930, + "versionNonce": 691369765, + "isDeleted": false, + "id": "4s-741RvQPWHUR05TYqNz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1871.7055612224767, + "y": -2542.0771398281186, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 1677218763, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4025, + "versionNonce": 1214036395, + "isDeleted": false, + "id": "wSBgiro_O9_eVryQts-TX", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1870.8067565648244, + "y": -2494.346552816537, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 893379173, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "text", + "version": 6636, + "versionNonce": 69552773, + "isDeleted": false, + "id": "KLYPzHaY43-bmD0sAtqPz", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1927.3280616196325, + "y": -2459.400567685546, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 226, + "height": 36, + "seed": 686924395, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "local databases", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "local databases" + }, + { + "type": "image", + "version": 7274, + "versionNonce": 864963659, + "isDeleted": false, + "id": "x4jX_Ey9XsbLNZZvPTMwl", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2076.5899666069135, + "y": -2342.685719052738, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 1379945925, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "line", + "version": 3501, + "versionNonce": 1283699173, + "isDeleted": false, + "id": "PmkLIhEEA4XbCS_C3J0o_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2056.478852470701, + "y": -2593.042728390302, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 28.141120546780353, + "height": 26.4694644712729, + "seed": 721952011, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.4202789324840898, + 12.662423142687857 + ], + [ + 3.6081824750241807, + 23.68156917315497 + ], + [ + 15.369235688558051, + 26.4694644712729 + ], + [ + 28.141120546780353, + 25.568094542118917 + ], + [ + 19.331773949639178, + 16.303687984597477 + ], + [ + 8.855346337312973, + 6.759908312836984 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 1565, + "versionNonce": 1949600491, + "isDeleted": false, + "id": "CQtmCNBpcJmZJI-m5QZCb", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2056.5191608028117, + "y": -2592.9865953860035, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 81.63006082540662, + "height": 0, + "seed": 2128366885, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -81.63006082540662, + 0 + ] + ] + }, + { + "type": "line", + "version": 1621, + "versionNonce": 2136878405, + "isDeleted": false, + "id": "mvM9Pu5Qhb2jut2eEYBXi", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2137.958824275728, + "y": -2592.985859017209, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 157.64424675756638, + "seed": 632701867, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 157.64424675756638 + ] + ] + }, + { + "type": "line", + "version": 1576, + "versionNonce": 1322907019, + "isDeleted": false, + "id": "HhOfE7St0DWqnMwsY0ZCH", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2138.105666966175, + "y": -2435.3703684360125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 110.30903029543029, + "height": 0, + "seed": 1786863749, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 110.30903029543029, + 0 + ] + ] + }, + { + "type": "line", + "version": 1579, + "versionNonce": 470957221, + "isDeleted": false, + "id": "VosRxAhvb_iTjI81IL--5", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2027.9367880325635, + "y": -2434.8135394106403, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0.08908533300960872, + "height": 132.91524135430075, + "seed": 19306059, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.08908533300960872, + -132.91524135430075 + ] + ] + }, + { + "type": "line", + "version": 1534, + "versionNonce": 314117163, + "isDeleted": false, + "id": "VNO0Nktk4AygV_4FDIMsP", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2057.2100893911675, + "y": -2593.2201566816266, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29.188478790539616, + "height": 26.489656438216134, + "seed": 2062354405, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 29.188478790539616, + 26.489656438216134 + ] + ] + }, + { + "type": "line", + "version": 2856, + "versionNonce": 1515020293, + "isDeleted": false, + "id": "Pu9qPDHkRhNtvX0s-tNvR", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2165.61685521028, + "y": -2503.021305788404, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 222.82788035249055, + "height": 42.93306688912038, + "seed": 1010013419, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 82.73777835873057, + 0 + ], + [ + 176.75798103910643, + 0.386784386388482 + ], + [ + 191.8012134679665, + 2.90088289791351 + ], + [ + 197.7558263043905, + 12.183708171236837 + ], + [ + 198.06922697999158, + 29.008828979135387 + ], + [ + 193.3682168459725, + 39.64539960481836 + ], + [ + 176.75798103910634, + 42.54628250273184 + ], + [ + 83.67798038553447, + 42.93306688912038 + ], + [ + -1.2536027024050451, + 42.546282502731934 + ], + [ + -17.863838509271364, + 39.25861521842982 + ], + [ + -24.758653372498994, + 29.782397751912292 + ], + [ + -24.131852021296485, + 12.377100364431039 + ], + [ + -16.610235806866456, + 2.7074907047192958 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "text", + "version": 1698, + "versionNonce": 1136414411, + "isDeleted": false, + "id": "8A95rXiMD0Ja17NcrANJI", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2160.31514967814, + "y": -2499.408521630653, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 173, + "height": 36, + "seed": 36488005, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "server-config", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "server-config" + }, + { + "type": "line", + "version": 1391, + "versionNonce": 537728869, + "isDeleted": false, + "id": "FhyDVuTQ36snnXtmO3L6k", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2126.46120253304, + "y": -2565.286278358105, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 60.21375194139211, + "height": 0, + "seed": 375897995, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 60.21375194139211, + 0 + ] + ] + }, + { + "type": "line", + "version": 1636, + "versionNonce": 75382123, + "isDeleted": false, + "id": "wPCKhup0thT5yVa4ZfzHw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2126.385185422024, + "y": -2554.179773759676, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 882774693, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 1650, + "versionNonce": 933159621, + "isDeleted": false, + "id": "Ffko5vqrQfbbzaIZ9-yxH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2126.357777140355, + "y": -2542.852185592704, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 2046662187, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 1695, + "versionNonce": 1078548491, + "isDeleted": false, + "id": "wXOkeFLKsR6ZbcUYToiX4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2126.351634707288, + "y": -2531.514554579583, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 1592686085, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 1712, + "versionNonce": 1168130597, + "isDeleted": false, + "id": "iKZaxGY-1-uDuIbHPu5P3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2126.4458924123437, + "y": -2518.848133844921, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 635410635, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "text", + "version": 6882, + "versionNonce": 353902251, + "isDeleted": false, + "id": "jR9YUhC2QGrb_Sj_ZC5Fu", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2009.5471540187655, + "y": -2337.8562159395997, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 224, + "height": 36, + "seed": 1545301349, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "database engine", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "database engine" + }, + { + "type": "arrow", + "version": 2195, + "versionNonce": 2130621829, + "isDeleted": false, + "id": "oQUHRqs2QGzG4h5w2xgHi", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -2080.850955223613, + "y": -2432.1500786952283, + "strokeColor": "#000000", + "backgroundColor": "#868e96", + "width": 31.295754211033454, + "height": 69.3604978411513, + "seed": 396904299, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": { + "focus": -0.08713030619764997, + "gap": 21.694499958552115, + "elementId": "owHDN4M6MPDZVxWkmlr31" + }, + "endBinding": { + "focus": -0.6956229250733946, + "gap": 14.324279522642883, + "elementId": "Hv-bEvtN4bPONYgD1cW4_" + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 31.295754211033454, + 69.3604978411513 + ] + ] + }, + { + "type": "arrow", + "version": 2210, + "versionNonce": 2106921291, + "isDeleted": false, + "id": "sKcHbfBhkzgjKfvYE_7GJ", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1856.9088725578831, + "y": -2423.445658145357, + "strokeColor": "#000000", + "backgroundColor": "#868e96", + "width": 21.171898020946173, + "height": 60.90873194937376, + "seed": 1265793221, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.1779963263642492, + "gap": 3.7441979698051, + "elementId": "w6lV85637T8vrQnLtQo0h" + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -21.171898020946173, + 60.90873194937376 + ] + ] + }, + { + "type": "rectangle", + "version": 8107, + "versionNonce": 519552229, + "isDeleted": false, + "id": "Hv-bEvtN4bPONYgD1cW4_", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -2035.230921489937, + "y": -2475.253020304618, + "strokeColor": "#15223c", + "backgroundColor": "#ffffff", + "width": 619.7113194723053, + "height": 416.6435439165702, + "seed": 899817995, + "groupIds": [ + "0dpL5qfWTpkqvPyKpGsyG" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "mz5ZDQIxBn0lpiSDqW9Gn", + "type": "arrow" + }, + { + "id": "oQUHRqs2QGzG4h5w2xgHi", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 7926, + "versionNonce": 991604715, + "isDeleted": false, + "id": "e4D-rDmMszcmdTLp_xpUJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": -1916.3394178809476, + "y": -2176.585299477606, + "strokeColor": "#15223c", + "backgroundColor": "#31303d", + "width": 373.7286622373204, + "height": 86.97522378964102, + "seed": 110172197, + "groupIds": [ + "RWYJMjak8rzA1Wrw0oc9P" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "mz5ZDQIxBn0lpiSDqW9Gn", + "type": "arrow" + }, + { + "id": "to7w8wQvUflVpas8AZ72I", + "type": "arrow" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 5665, + "versionNonce": 488167493, + "isDeleted": false, + "id": "MDVsilsQYlVZ8plmoFD6a", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1600.3503278255384, + "y": -2419.3341617517353, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 952608939, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 3457, + "versionNonce": 2142468747, + "isDeleted": false, + "id": "SiXpZm_zmcRTc7JdoX_y4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1600.73441295491, + "y": -2398.038435636644, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1466223493, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186137, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 6461, + "versionNonce": 591366053, + "isDeleted": false, + "id": "Jn4c1-g771eXf3stxzTL3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1601.5344132783293, + "y": -2424.727443756713, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 1455643467, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186137, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 3557, + "versionNonce": 1478095147, + "isDeleted": false, + "id": "horI9wNnxozy4FQxWry7r", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1600.6356086206733, + "y": -2376.996856745135, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1848316645, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "line", + "version": 5616, + "versionNonce": 1134119685, + "isDeleted": false, + "id": "9hW_e28QUxAnAVHXoQixp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1631.8880426902952, + "y": -2382.901421007983, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 737130987, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 3408, + "versionNonce": 1438159819, + "isDeleted": false, + "id": "VrrLyxIFQHqfZvyRNSOFo", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1632.2721278196705, + "y": -2361.605694892888, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 393309765, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 6411, + "versionNonce": 1856217701, + "isDeleted": false, + "id": "aD8FHkoO8tj4Mw1By8ekB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1633.072128143086, + "y": -2388.294703012957, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 1700217995, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186138, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 3508, + "versionNonce": 2024399467, + "isDeleted": false, + "id": "Auk6Fine-mzeYXs45fr8g", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1632.1733234854337, + "y": -2340.5641160013793, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 840261029, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "line", + "version": 5477, + "versionNonce": 690752965, + "isDeleted": false, + "id": "OoB5Lf23xkJ5HXPUyrQPZ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1669.5461850214133, + "y": -2354.4764290745725, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 716471083, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 3269, + "versionNonce": 1505254667, + "isDeleted": false, + "id": "F7fqeBv3BXgUBHewMqG3n", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1669.9302701507886, + "y": -2333.1807029594775, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1698980101, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 6271, + "versionNonce": 38800677, + "isDeleted": false, + "id": "vMSCqHqG8CNqJtRXuxuDI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1670.7302704742042, + "y": -2359.8697110795465, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 1215421899, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664549186138, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 3369, + "versionNonce": 341738411, + "isDeleted": false, + "id": "tmZF-8nwfo9xmcmy1QXXr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1669.8314658165518, + "y": -2312.139124067965, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 377223269, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "text", + "version": 5978, + "versionNonce": 1232937093, + "isDeleted": false, + "id": "12__p2EERUjpFQKzOHo91", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1687.85277087136, + "y": -2277.1931389369774, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 149, + "height": 36, + "seed": 430566507, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186138, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "databases", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "databases" + }, + { + "type": "image", + "version": 6615, + "versionNonce": 1892079179, + "isDeleted": false, + "id": "UyJgmTtraYE64GA2UeWLn", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1875.614675858641, + "y": -2160.4782903041696, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 529114053, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664549186138, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "line", + "version": 2845, + "versionNonce": 74500069, + "isDeleted": false, + "id": "HADzMX9ibWYhgnGgWbNvd", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1855.5035617224285, + "y": -2410.8352996417298, + "strokeColor": "#000000", + "backgroundColor": "#000000", + "width": 28.141120546780353, + "height": 26.4694644712729, + "seed": 841426699, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.4202789324840898, + 12.662423142687857 + ], + [ + 3.6081824750241807, + 23.68156917315497 + ], + [ + 15.369235688558051, + 26.4694644712729 + ], + [ + 28.141120546780353, + 25.568094542118917 + ], + [ + 19.331773949639178, + 16.303687984597477 + ], + [ + 8.855346337312973, + 6.759908312836984 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 909, + "versionNonce": 1305203947, + "isDeleted": false, + "id": "6u9bCIBr_auHuJMQJJpoj", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1855.5438700545392, + "y": -2410.7791666374314, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 81.63006082540662, + "height": 0, + "seed": 1149952805, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -81.63006082540662, + 0 + ] + ] + }, + { + "type": "line", + "version": 965, + "versionNonce": 624460613, + "isDeleted": false, + "id": "1tRqjMTwFhmN4iC2sjzyK", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1936.9835335274556, + "y": -2410.7784302686405, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 157.64424675756638, + "seed": 1214516651, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 157.64424675756638 + ] + ] + }, + { + "type": "line", + "version": 920, + "versionNonce": 1257766795, + "isDeleted": false, + "id": "3fFdtOziIgPP2jXLo5faW", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1937.1303762179023, + "y": -2253.162939687444, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 110.30903029543029, + "height": 0, + "seed": 1777153669, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 110.30903029543029, + 0 + ] + ] + }, + { + "type": "line", + "version": 923, + "versionNonce": 3265189, + "isDeleted": false, + "id": "GFAoCsgsvjYoQAkFT4op6", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1826.961497284291, + "y": -2252.606110662068, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0.08908533300960872, + "height": 132.91524135430075, + "seed": 1602953291, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.08908533300960872, + -132.91524135430075 + ] + ] + }, + { + "type": "line", + "version": 878, + "versionNonce": 847631915, + "isDeleted": false, + "id": "wgVw9ld8GCwduJkcOpmVc", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1856.234798642895, + "y": -2411.0127279330545, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29.188478790539616, + "height": 26.489656438216134, + "seed": 174988773, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 29.188478790539616, + 26.489656438216134 + ] + ] + }, + { + "type": "line", + "version": 2200, + "versionNonce": 34223621, + "isDeleted": false, + "id": "VSwI2ddlHozaITCXQGMGr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1964.6415644620074, + "y": -2320.8138770398355, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 222.82788035249055, + "height": 42.93306688912038, + "seed": 829873899, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 82.73777835873057, + 0 + ], + [ + 176.75798103910643, + 0.386784386388482 + ], + [ + 191.8012134679665, + 2.90088289791351 + ], + [ + 197.7558263043905, + 12.183708171236837 + ], + [ + 198.06922697999158, + 29.008828979135387 + ], + [ + 193.3682168459725, + 39.64539960481836 + ], + [ + 176.75798103910634, + 42.54628250273184 + ], + [ + 83.67798038553447, + 42.93306688912038 + ], + [ + -1.2536027024050451, + 42.546282502731934 + ], + [ + -17.863838509271364, + 39.25861521842982 + ], + [ + -24.758653372498994, + 29.782397751912292 + ], + [ + -24.131852021296485, + 12.377100364431039 + ], + [ + -16.610235806866456, + 2.7074907047192958 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "text", + "version": 1042, + "versionNonce": 593483979, + "isDeleted": false, + "id": "wpsc6PgLwwnTlEPBUR1NH", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1959.3398589298677, + "y": -2317.2010928820846, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 173, + "height": 36, + "seed": 1830492485, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "server-config", + "baseline": 25, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "server-config" + }, + { + "type": "line", + "version": 735, + "versionNonce": 633285989, + "isDeleted": false, + "id": "fh2ZhrDeu23hyYMpxBhBT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1925.4859117847673, + "y": -2383.078849609533, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 60.21375194139211, + "height": 0, + "seed": 1488046475, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 60.21375194139211, + 0 + ] + ] + }, + { + "type": "line", + "version": 980, + "versionNonce": 2065729387, + "isDeleted": false, + "id": "wRexc-gyHIaWTd2pRtHU9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1925.4098946737513, + "y": -2371.972345011104, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 458336421, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 994, + "versionNonce": 715012293, + "isDeleted": false, + "id": "p7mnZ1VDsNTL0Lc2U7sHk", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1925.3824863920827, + "y": -2360.6447568441354, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 980836395, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 1039, + "versionNonce": 1204747, + "isDeleted": false, + "id": "P22_gMUKA8RbPs9b-rEzb", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1925.3763439590157, + "y": -2349.3071258310147, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 381635589, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "line", + "version": 1056, + "versionNonce": 172283941, + "isDeleted": false, + "id": "6B5AcruXgH-nCyLD3MVJ0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1925.4706016640712, + "y": -2336.6407050963526, + "strokeColor": "#000000", + "backgroundColor": "#ffffff", + "width": 78.07920298436403, + "height": 0, + "seed": 816784075, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 78.07920298436403, + 0 + ] + ] + }, + { + "type": "text", + "version": 6225, + "versionNonce": 1261430955, + "isDeleted": false, + "id": "ykhBGUSVx8_gAhJjltiHL", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1808.571863270493, + "y": -2155.6487871910276, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 224, + "height": 36, + "seed": 1331790693, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664549186138, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "database engine", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "database engine" + }, + { + "type": "arrow", + "version": 1004, + "versionNonce": 782273413, + "isDeleted": false, + "id": "mz5ZDQIxBn0lpiSDqW9Gn", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1879.8756644753403, + "y": -2249.9426499466563, + "strokeColor": "#000000", + "backgroundColor": "#868e96", + "width": 31.295754211033, + "height": 69.63579478585052, + "seed": 1945538923, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": -0.47424417620283493, + "gap": 3.7215556831997674, + "elementId": "e4D-rDmMszcmdTLp_xpUJ" + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 31.295754211033, + 69.63579478585052 + ] + ] + }, + { + "type": "arrow", + "version": 972, + "versionNonce": 1914936139, + "isDeleted": false, + "id": "to7w8wQvUflVpas8AZ72I", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": -1648.8446611065237, + "y": -2241.950183904267, + "strokeColor": "#000000", + "backgroundColor": "#868e96", + "width": 28.505962040905615, + "height": 61.62068645685258, + "seed": 1501941445, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "focus": 0.1462681295898969, + "gap": 3.744197969808738, + "elementId": "e4D-rDmMszcmdTLp_xpUJ" + }, + "lastCommittedPoint": null, + "startArrowhead": "arrow", + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -28.505962040905615, + 61.62068645685258 + ] + ] + }, + { + "type": "text", + "version": 656, + "versionNonce": 1743704805, + "isDeleted": false, + "id": "gbadPz-4zj3IDJdO5qfsX", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": -2029.567502425948, + "y": -1948.406668685543, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 622, + "height": 140, + "seed": 1167535115, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "fontSize": 27.892801669284363, + "fontFamily": 1, + "text": "Typically, ClickHouse is run in the form \nof a cluster, where several instances of \nthe ClickHouse database engine are running \nin a distributed fashion on different servers.", + "baseline": 130, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Typically, ClickHouse is run in the form \nof a cluster, where several instances of \nthe ClickHouse database engine are running \nin a distributed fashion on different servers." + }, + { + "type": "text", + "version": 1313, + "versionNonce": 1900542443, + "isDeleted": false, + "id": "Z5vcHpNlFJ6NtIedQaSF5", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": -1332.568992691742, + "y": -1943.9070466637686, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 665, + "height": 140, + "seed": 1674161701, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "fontSize": 27.892801669284363, + "fontFamily": 1, + "text": "On a single server, the database engine is \nrun as part of the clickhouse-server program.\nDatabase access (paths, users, security, ...) \nis configured with a server-configuration file.", + "baseline": 130, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "On a single server, the database engine is \nrun as part of the clickhouse-server program.\nDatabase access (paths, users, security, ...) \nis configured with a server-configuration file." + }, + { + "type": "text", + "version": 2097, + "versionNonce": 582823493, + "isDeleted": false, + "id": "udp3EAZO5LoiAoBsvIk50", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 50, + "angle": 0, + "x": -623.3794925498278, + "y": -1962.1812713616519, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 583, + "height": 210, + "seed": 1502311083, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664549186138, + "link": null, + "locked": false, + "fontSize": 27.892801669284363, + "fontFamily": 1, + "text": "The database engine can also be used \nisolated in a command line utility fashion.\nEnabling blazing fast SQL data processing\non an ample amount of input and output \nformats without having to configure, and\n start a ClickHouse server program. ", + "baseline": 200, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "The database engine can also be used \nisolated in a command line utility fashion.\nEnabling blazing fast SQL data processing\non an ample amount of input and output \nformats without having to configure, and\n start a ClickHouse server program. " + }, + { + "type": "text", + "version": 8616, + "versionNonce": 323754245, + "isDeleted": false, + "id": "aj8v9PRA-2I7IADOUYim9", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5595.347266367396, + "y": -136.89640861599423, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 148, + "height": 50, + "seed": 598984005, + "groupIds": [ + "XQ3S1IL0Opx7UqJFzxHpY" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "objectStorage \ntable function", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "objectStorage \ntable function" + }, + { + "type": "rectangle", + "version": 5436, + "versionNonce": 702653899, + "isDeleted": false, + "id": "Zux-4PqGRMyYJPQ6Z-4qU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5795.523769562579, + "y": -120.55567942307403, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 1984552331, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5358, + "versionNonce": 449622117, + "isDeleted": false, + "id": "rcS2ZPTKNchUYBD_6zgEF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5880.700276160557, + "y": -244.71126531165805, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 1374999717, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5756, + "versionNonce": 1239463019, + "isDeleted": false, + "id": "zLHrPiNtSWD_QDGM6H8Dx", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5744.995333445123, + "y": -153.76008030024764, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 334230571, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5689, + "versionNonce": 1224956869, + "isDeleted": false, + "id": "aAaf6PBrwP7ezaIQWZRzz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5822.95349202632, + "y": -210.0631948311218, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 1746728965, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5471, + "versionNonce": 1078259467, + "isDeleted": false, + "id": "xS5nrW3VhvMgaR9QgGRZ-", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 6019.292558082717, + "y": -126.33035783649007, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 1850881739, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4738, + "versionNonce": 101554981, + "isDeleted": false, + "id": "VdZechBBkrOZ_441x_Cr4", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5763.352164263818, + "y": -136.01612179998824, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 2731877, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "1dwqI7QoSbvZbReXTfO5n", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4437, + "versionNonce": 1515777669, + "isDeleted": false, + "id": "W3UGSeNjOjNhQvHhldFSL", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5934.7754046863, + "y": -183.69675820889074, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 873932139, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4637, + "versionNonce": 1188489291, + "isDeleted": false, + "id": "OBd58xqxFN65d0dtexpk1", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5988.13230733434, + "y": -125.79884256951641, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 409500357, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4529, + "versionNonce": 1688393189, + "isDeleted": false, + "id": "2BwfV9PQtMuRudSOPiRVi", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5859.848690329442, + "y": -205.266569917683, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 1552236555, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4514, + "versionNonce": 1275700971, + "isDeleted": false, + "id": "aHt9_XQM55rCi5aVzRXwB", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5807.495713518243, + "y": -173.74546763229569, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 158784037, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "1dwqI7QoSbvZbReXTfO5n", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7591, + "versionNonce": 267964741, + "isDeleted": false, + "id": "knCf-ZQD0ALgd2Z-cqphV", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5831.789943313884, + "y": -115.58026579975717, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 295110315, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7408, + "versionNonce": 632000907, + "isDeleted": false, + "id": "AIDIOXhlfP_7oo3S-8gbI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5899.974674966939, + "y": -134.1862452509847, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 1010978181, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "rectangle", + "version": 5855, + "versionNonce": 163078309, + "isDeleted": false, + "id": "vFGv81WkxKtPQ5X38ZadY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5189.821570528773, + "y": -95.6046773766202, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 323.289754704958, + "height": 115.3522129463697, + "seed": 537416933, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "SUB74Pc_Jt6aHbUsXNbl0", + "type": "arrow" + }, + { + "id": "B4Y35dz_jcqbVyYWUHWzl", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5777, + "versionNonce": 2005861381, + "isDeleted": false, + "id": "VD36wqiRE-ThZwm-eFVkh", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5279.371314789765, + "y": -226.13481307908205, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 218.56208768785902, + "height": 210.97312630980835, + "seed": 50305003, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + }, + { + "id": "6jIP_lvnGFudlMlYzXDPE", + "type": "arrow" + }, + { + "id": "1dwqI7QoSbvZbReXTfO5n", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 6177, + "versionNonce": 1339484875, + "isDeleted": false, + "id": "1ZwXxjyr1uyZbcIqrBnT3", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5136.698840882411, + "y": -130.5138997156455, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 151.77922756101336, + "height": 147.22585073418284, + "seed": 1616277573, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "qyS2BP83H-q9I6nU1KncI", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 6105, + "versionNonce": 1836727141, + "isDeleted": false, + "id": "wO8PyKOrN8hKcDTvbqAOI", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5218.65962376535, + "y": -189.7077984644411, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 104.19060205803729, + "height": 93.65945873034212, + "seed": 1253794443, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5888, + "versionNonce": 1793415531, + "isDeleted": false, + "id": "JwCDP4TqU6pqh2QXY9vsN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5425.079373248344, + "y": -101.67584647905369, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 129.01234342686138, + "height": 121.42338204881058, + "seed": 1527390117, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "1dwqI7QoSbvZbReXTfO5n", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5187, + "versionNonce": 600278725, + "isDeleted": false, + "id": "zzH_FfUftotnQAMXSaMCr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5155.998170837505, + "y": -111.85890892838779, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 133.6765724777816, + "height": 130.09595000069802, + "seed": 1239734571, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4855, + "versionNonce": 57472011, + "isDeleted": false, + "id": "68MJ3v5kD6_DzvOEBWiWz", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5336.222835517365, + "y": -161.987623607557, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 161.12801146875478, + "height": 173.06341972569936, + "seed": 1448141573, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + }, + { + "id": "1dwqI7QoSbvZbReXTfO5n", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5052, + "versionNonce": 1830053413, + "isDeleted": false, + "id": "stHr2fYbdhqfgKynO3zjw", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5392.319254324998, + "y": -101.11704149714478, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 153.96676651458776, + "height": 118.16054174375324, + "seed": 501644235, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "1dwqI7QoSbvZbReXTfO5n", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4945, + "versionNonce": 1817074053, + "isDeleted": false, + "id": "pmztsjTvb2BWm2UKNG3ZY", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5257.44914102152, + "y": -184.66489929575891, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 128.90240917500367, + "height": 130.0959500006982, + "seed": 1990736485, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4962, + "versionNonce": 159493451, + "isDeleted": false, + "id": "CddnCjgoRgdtBpZqH7699", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5202.266617666923, + "y": -151.52540154899452, + "strokeColor": "transparent", + "backgroundColor": "#ced4da", + "width": 177.83758302847713, + "height": 162.32155229444905, + "seed": 1390070379, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "arrow", + "version": 2155, + "versionNonce": 1249900811, + "isDeleted": false, + "id": "1dwqI7QoSbvZbReXTfO5n", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5561.095621174024, + "y": -65.96652494199247, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 179.0962977170202, + "height": 2.485330077484832, + "seed": 336504101, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551781482, + "link": null, + "locked": false, + "startBinding": { + "elementId": "stHr2fYbdhqfgKynO3zjw", + "focus": -0.3834145353939106, + "gap": 19.34860912005938 + }, + "endBinding": { + "elementId": "VdZechBBkrOZ_441x_Cr4", + "focus": -0.07255204687762361, + "gap": 23.354374344341224 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 179.0962977170202, + -2.485330077484832 + ] + ] + }, + { + "type": "text", + "version": 7817, + "versionNonce": 1460915179, + "isDeleted": false, + "id": "32jlX2gHh3ER_kGBZf5aS", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 5196.863567453697, + "y": -83.3887370971446, + "strokeColor": "#31303d", + "backgroundColor": "transparent", + "width": 299, + "height": 36, + "seed": 1951083813, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Cloud Object Storage", + "baseline": 25, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Cloud Object Storage" + }, + { + "type": "arrow", + "version": 2488, + "versionNonce": 1104322475, + "isDeleted": false, + "id": "B4Y35dz_jcqbVyYWUHWzl", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 5342.075955953225, + "y": 180.57591323724202, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 1.7522594107804252, + "height": 142.2152528531183, + "seed": 227296523, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551781482, + "link": null, + "locked": false, + "startBinding": { + "elementId": "KFgM-xHaTKSm1297aN4H0", + "focus": -0.11551418679492209, + "gap": 14.436652669988725 + }, + "endBinding": { + "elementId": "vFGv81WkxKtPQ5X38ZadY", + "focus": 0.041256740436980056, + "gap": 18.61312481437421 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1.7522594107804252, + -142.2152528531183 + ] + ] + }, + { + "type": "text", + "version": 9029, + "versionNonce": 1982404235, + "isDeleted": false, + "id": "D7fz6J2ac4Owm7PnpkrSf", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 5360.141669976354, + "y": 111.9664732674006, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 217, + "height": 75, + "seed": 1970629547, + "groupIds": [ + "3S7SevEcncXcvETkqB3ds" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "write directly or use\nThird-Party ETL/ELT\nor clickhouse-local", + "baseline": 68, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "write directly or use\nThird-Party ETL/ELT\nor clickhouse-local" + }, + { + "type": "line", + "version": 6947, + "versionNonce": 763472805, + "isDeleted": false, + "id": "y1BRz0qKn4DJ340_LsN6I", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 5317.394985932922, + "y": 200.3753845145077, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 1470675077, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 4770, + "versionNonce": 628886827, + "isDeleted": false, + "id": "AVBMRUJIRARqCHeLtnNYJ", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 5317.010900803543, + "y": 221.67111062959907, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1589689931, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 7746, + "versionNonce": 167177989, + "isDeleted": false, + "id": "KFgM-xHaTKSm1297aN4H0", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 5316.210900480131, + "y": 194.98210250953002, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 2036948965, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + }, + { + "id": "B4Y35dz_jcqbVyYWUHWzl", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4839, + "versionNonce": 1638712933, + "isDeleted": false, + "id": "JZHSpLi6wEbEXBbjM_ePr", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 5317.10970513778, + "y": 242.71268952111154, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 877182187, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664551781458, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "text", + "version": 7830, + "versionNonce": 1899298411, + "isDeleted": false, + "id": "sesYiqxQJUxTK33hzHVHW", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 40, + "angle": 0, + "x": 5230.178682355667, + "y": 283.06071990086707, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 254, + "height": 71, + "seed": 1440459589, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664551781458, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Your current \ndatabase system ", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Your current \ndatabase system " + }, + { + "type": "rectangle", + "version": 5299, + "versionNonce": 2125111915, + "isDeleted": false, + "id": "aV3RfkC3wKVHUp5tEuK4y", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3914.6656124197557, + "y": -213.78282066465408, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 307.50162551476666, + "height": 109.71888985503384, + "seed": 1870277611, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5221, + "versionNonce": 278351301, + "isDeleted": false, + "id": "ESggzWW8hpId86StwqGIy", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3999.8421190177332, + "y": -337.9384065532381, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 207.88842288322263, + "height": 200.67007486644405, + "seed": 2105482309, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "lKCfnT3UEtLEOfa3RAEeC", + "type": "arrow" + } + ], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5619, + "versionNonce": 1637948683, + "isDeleted": false, + "id": "SuFibC9OVLAF-qoNFbdnT", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3864.137176302292, + "y": -246.9872215418277, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 144.36696033557143, + "height": 140.03595152550415, + "seed": 1925412491, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5552, + "versionNonce": 1515408677, + "isDeleted": false, + "id": "rPMbhTwIX5HmCsQGwDR4i", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3942.095334883497, + "y": -303.29033607270185, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 99.10236569497235, + "height": 89.0855196778425, + "seed": 641551269, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 5334, + "versionNonce": 556745643, + "isDeleted": false, + "id": "Fr-byLWoClrS2ys5fV0mN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4138.434400939896, + "y": -219.55749907807194, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.71191628523573, + "height": 115.49356826845703, + "seed": 1607101739, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4600, + "versionNonce": 1058562181, + "isDeleted": false, + "id": "xZe_s-joyqzf-mVky8ssf", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3882.4940071209944, + "y": -229.24326304157012, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 127.14836375707134, + "height": 123.7426040135782, + "seed": 708742917, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4300, + "versionNonce": 629118539, + "isDeleted": false, + "id": "mbRnZVRIVh6yjdsIToG0n", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4053.9172475434752, + "y": -276.9238994504726, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 153.25918845718437, + "height": 164.6117209354941, + "seed": 167350219, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "8l0PIWzB2WbCUSnksZIYy", + "type": "arrow" + } + ], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4500, + "versionNonce": 614729701, + "isDeleted": false, + "id": "75o7ItMDxgLNIXgFRKss9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4107.274150191517, + "y": -219.02598381109647, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 146.44766897019824, + "height": 112.39007153526828, + "seed": 1476421221, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4392, + "versionNonce": 1835832555, + "isDeleted": false, + "id": "iZ2Y3qLn6kDnzoRUghExn", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3978.990533186611, + "y": -298.4937111592649, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 122.60735076574734, + "height": 123.74260401357837, + "seed": 1936416363, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 4374, + "versionNonce": 1560527685, + "isDeleted": false, + "id": "QZ0PTcljG3MhNtupabSrN", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3926.502895132538, + "y": -266.97260887387756, + "strokeColor": "transparent", + "backgroundColor": "#31303d", + "width": 169.15273392681794, + "height": 154.39444170501514, + "seed": 1380995525, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "zOVxC4o7_ZtF7vcg4x5Xq", + "type": "arrow" + } + ], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "image", + "version": 7454, + "versionNonce": 479531685, + "isDeleted": false, + "id": "ZGzwzOZ3SZXkwq9n4VqSm", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3950.931786171053, + "y": -208.80740704133723, + "strokeColor": "transparent", + "backgroundColor": "transparent", + "width": 43.683412004092766, + "height": 38.82581658923765, + "seed": 1995069707, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [ + { + "id": "cnPNcesK_y0kbtZpFeFIZ", + "type": "arrow" + }, + { + "id": "Og9qOL9oXZodHht5DIc4b", + "type": "arrow" + }, + { + "id": "T5mH0DyTz2rUpHq7St2Hq", + "type": "arrow" + } + ], + "updated": 1664551778847, + "link": null, + "locked": false, + "status": "saved", + "fileId": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "scale": [ + 1, + 1 + ] + }, + { + "type": "text", + "version": 7270, + "versionNonce": 1895208491, + "isDeleted": false, + "id": "N_-kZOPZyIGUXg5-gQuTs", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4019.4184854596683, + "y": -227.4133864925666, + "strokeColor": "#ffc029", + "backgroundColor": "transparent", + "width": 151, + "height": 71, + "seed": 105632037, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664551778847, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "ClickHouse \nCloud", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "ClickHouse \nCloud" + }, + { + "type": "line", + "version": 6303, + "versionNonce": 805664261, + "isDeleted": false, + "id": "bXXuSkoYNNOnn7HcPY7NH", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4047.254178949017, + "y": 354.44827728594237, + "strokeColor": "#000000", + "backgroundColor": "#ced4da", + "width": 58.29547497037776, + "height": 75.23956530082171, + "seed": 837877675, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664551778847, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.19222853912591387, + 56.86565565026561 + ], + [ + 0.008995844367387427, + 63.33956360913941 + ], + [ + 3.002345889965314, + 66.136859183983 + ], + [ + 13.426538065275391, + 68.50427700508838 + ], + [ + 31.046375675959993, + 69.24145554923822 + ], + [ + 47.88096534511206, + 68.06444201903525 + ], + [ + 56.82530678670703, + 65.24963544943097 + ], + [ + 58.086785115168524, + 62.87672398291019 + ], + [ + 58.263955179808185, + 57.66462789525514 + ], + [ + 58.12489728023635, + 4.770711108788363 + ], + [ + 57.81141613873247, + -0.22678945483607263 + ], + [ + 54.068258543762745, + -3.0199253944729088 + ], + [ + 46.18596747133091, + -4.637561933636917 + ], + [ + 28.2232911133324, + -5.998109751583486 + ], + [ + 13.821780335965565, + -5.186812024209034 + ], + [ + 2.495089915404978, + -2.434989123642279 + ], + [ + -0.03151979056958358, + -0.03416851246621335 + ], + [ + 0, + 0 + ] + ] + }, + { + "type": "line", + "version": 4095, + "versionNonce": 1438161099, + "isDeleted": false, + "id": "VH8Xejonbm_38fYTwDxqm", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4046.870093819638, + "y": 375.7440034010342, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1633707141, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664551778847, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "ellipse", + "version": 7101, + "versionNonce": 1918004581, + "isDeleted": false, + "id": "dLk_CBZv2f3yKNsSsqAR2", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4046.070093496226, + "y": 349.0549952809647, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "width": 57.92155824688832, + "height": 11.714199393658093, + "seed": 782881355, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "type": "arrow", + "id": "bxuMGTzXLn7H-uBCptINx" + } + ], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "line", + "version": 4195, + "versionNonce": 1684096875, + "isDeleted": false, + "id": "WqP7iPI7ioVNPWL5WG2Ks", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4046.9688981538748, + "y": 396.7855822925467, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 58.35594322026013, + "height": 6.474680775262577, + "seed": 1196133349, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1664551778847, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 1.5374285361730287, + 2.5809159625347795 + ], + [ + 8.167722203747559, + 4.746280736825956 + ], + [ + 16.990366383406357, + 6.0576125509484715 + ], + [ + 30.812140369570116, + 6.177108315273491 + ], + [ + 46.941676304261016, + 5.342242522380577 + ], + [ + 56.36150756783912, + 2.3050196140919486 + ], + [ + 58.35594322026013, + -0.29757245998908605 + ] + ] + }, + { + "type": "arrow", + "version": 1207, + "versionNonce": 1799908933, + "isDeleted": false, + "id": "zOVxC4o7_ZtF7vcg4x5Xq", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4079.3577135319933, + "y": 43.97406724185157, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 2.203425141327898, + "height": 144.25589993564154, + "seed": 1209714501, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551778930, + "link": null, + "locked": false, + "startBinding": { + "elementId": "UBUv4y9VmqvaUUjtShHGU", + "focus": 0.003982939178254775, + "gap": 18.36147820106453 + }, + "endBinding": { + "elementId": "QZ0PTcljG3MhNtupabSrN", + "focus": -0.7650101167593557, + "gap": 31.585170739477093 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -2.203425141327898, + -144.25589993564154 + ] + ] + }, + { + "type": "rectangle", + "version": 9426, + "versionNonce": 54206987, + "isDeleted": false, + "id": "UBUv4y9VmqvaUUjtShHGU", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 3977.893746935334, + "y": 62.3355454429161, + "strokeColor": "#15223c", + "backgroundColor": "#31303d", + "width": 204.09321695970974, + "height": 93.15707154311905, + "seed": 371955365, + "groupIds": [ + "qtKMV9h0lOMGFiAtutCDp", + "_TdSGw-5yrTILOnABrer3" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "_Fx0M6HC7YwaB-SPomer4", + "type": "arrow" + }, + { + "id": "ZsjkxeMfY7suqvLayroRm", + "type": "arrow" + }, + { + "id": "iuYv_lMtKD64ophwryuXG", + "type": "arrow" + }, + { + "id": "KK-tLtm7eSZaQRA0Z0wWk", + "type": "arrow" + }, + { + "id": "zOVxC4o7_ZtF7vcg4x5Xq", + "type": "arrow" + } + ], + "updated": 1664551778847, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 7725, + "versionNonce": 1694223237, + "isDeleted": false, + "id": "q96ejHCXzB3TmAz1pvi2B", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4000.2958985848754, + "y": 72.58167909483882, + "strokeColor": "#ffffff", + "backgroundColor": "transparent", + "width": 174, + "height": 71, + "seed": 1694126635, + "groupIds": [ + "_TdSGw-5yrTILOnABrer3" + ], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664551778847, + "link": null, + "locked": false, + "fontSize": 28, + "fontFamily": 1, + "text": "Third-Party \nETL/ELT", + "baseline": 61, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Third-Party \nETL/ELT" + }, + { + "type": "arrow", + "version": 1135, + "versionNonce": 510674059, + "isDeleted": false, + "id": "KK-tLtm7eSZaQRA0Z0wWk", + "fillStyle": "solid", + "strokeWidth": 4, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 4080.1237631640865, + "y": 327.4391234447171, + "strokeColor": "#495057", + "backgroundColor": "#31303d", + "width": 0.8930321127918432, + "height": 154.77472373480487, + "seed": 1009482245, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1664551778931, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "UBUv4y9VmqvaUUjtShHGU", + "focus": -0.014115883975155083, + "gap": 17.171782723877072 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 0.8930321127918432, + -154.77472373480487 + ] + ] + }, + { + "type": "text", + "version": 7303, + "versionNonce": 820122341, + "isDeleted": false, + "id": "AwGOiLT64Jrk_aQlWn83w", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 3929.561885157685, + "y": 434.9120378208687, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 326, + "height": 91, + "seed": 1646045131, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "bY79_nx3hsOCGZr6hWPOs", + "type": "arrow" + }, + { + "id": "o-a13AjXcSuBj2pAGkCmU", + "type": "arrow" + }, + { + "id": "Oz-z3HIdXjxFTvbZu9lck", + "type": "arrow" + }, + { + "id": "3rItUtwE3JgCJKAgt7peW", + "type": "arrow" + } + ], + "updated": 1664551778847, + "link": null, + "locked": false, + "fontSize": 36, + "fontFamily": 1, + "text": "Your current \ndatabase system ", + "baseline": 78, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Your current \ndatabase system " + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": { + "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947": { + "mimeType": "image/svg+xml", + "id": "bfbc0263131b7f70f07896400491d8349bb00593a9d18fa66180000a7f5de05fd54541d7309b760a05fd3dcbce0fc947", + "dataURL": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjIyMiIgdmlld0JveD0iMCAwIDkgOCIgd2lkdGg9IjI1MDAiPjxwYXRoIGQ9Im0wIDdoMXYxaC0xeiIgZmlsbD0iI2YwMCIvPjxwYXRoIGQ9Im0wIDBoMXY3aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDBoMXY4aC0xem0yIDMuMjVoMXYxLjVoLTF6IiBmaWxsPSIjZmMwIi8+PC9zdmc+", + "created": 1648232988228 + } + } +} \ No newline at end of file diff --git a/docs/ja/integrations/migration/images/ch-local-01.png b/docs/ja/integrations/migration/images/ch-local-01.png new file mode 100644 index 00000000000..cec2d481dee Binary files /dev/null and b/docs/ja/integrations/migration/images/ch-local-01.png differ diff --git a/docs/ja/integrations/migration/images/ch-local-02.png b/docs/ja/integrations/migration/images/ch-local-02.png new file mode 100644 index 00000000000..e95cae0916d Binary files /dev/null and b/docs/ja/integrations/migration/images/ch-local-02.png differ diff --git a/docs/ja/integrations/migration/images/ch-local-03.png b/docs/ja/integrations/migration/images/ch-local-03.png new file mode 100644 index 00000000000..6525eccd67b Binary files /dev/null and b/docs/ja/integrations/migration/images/ch-local-03.png differ diff --git a/docs/ja/integrations/migration/images/ch-local-04.png b/docs/ja/integrations/migration/images/ch-local-04.png new file mode 100644 index 00000000000..bab1739aee7 Binary files /dev/null and b/docs/ja/integrations/migration/images/ch-local-04.png differ diff --git a/docs/ja/integrations/migration/images/object-storage-01.png b/docs/ja/integrations/migration/images/object-storage-01.png new file mode 100644 index 00000000000..6f6108ac334 Binary files /dev/null and b/docs/ja/integrations/migration/images/object-storage-01.png differ diff --git a/docs/ja/integrations/migration/images/rockset_0.png b/docs/ja/integrations/migration/images/rockset_0.png new file mode 100644 index 00000000000..63f23d18fae Binary files /dev/null and b/docs/ja/integrations/migration/images/rockset_0.png differ diff --git a/docs/ja/integrations/migration/images/rockset_1.png b/docs/ja/integrations/migration/images/rockset_1.png new file mode 100644 index 00000000000..928cee91af7 Binary files /dev/null and b/docs/ja/integrations/migration/images/rockset_1.png differ diff --git a/docs/ja/integrations/migration/images/self-managed-01.png b/docs/ja/integrations/migration/images/self-managed-01.png new file mode 100644 index 00000000000..8c3d1253fad Binary files /dev/null and b/docs/ja/integrations/migration/images/self-managed-01.png differ diff --git a/docs/ja/integrations/migration/images/self-managed-02.png b/docs/ja/integrations/migration/images/self-managed-02.png new file mode 100644 index 00000000000..473d131bc3a Binary files /dev/null and b/docs/ja/integrations/migration/images/self-managed-02.png differ diff --git a/docs/ja/integrations/migration/images/self-managed-03.png b/docs/ja/integrations/migration/images/self-managed-03.png new file mode 100644 index 00000000000..8dd838958c4 Binary files /dev/null and b/docs/ja/integrations/migration/images/self-managed-03.png differ diff --git a/docs/ja/integrations/migration/images/self-managed-04.png b/docs/ja/integrations/migration/images/self-managed-04.png new file mode 100644 index 00000000000..8e0e740a280 Binary files /dev/null and b/docs/ja/integrations/migration/images/self-managed-04.png differ diff --git a/docs/ja/integrations/migration/images/self-managed-05.png b/docs/ja/integrations/migration/images/self-managed-05.png new file mode 100644 index 00000000000..651bc5993da Binary files /dev/null and b/docs/ja/integrations/migration/images/self-managed-05.png differ diff --git a/docs/ja/integrations/migration/images/self-managed-06.png b/docs/ja/integrations/migration/images/self-managed-06.png new file mode 100644 index 00000000000..b0c718157d1 Binary files /dev/null and b/docs/ja/integrations/migration/images/self-managed-06.png differ diff --git a/docs/ja/integrations/migration/images/third-party-01.png b/docs/ja/integrations/migration/images/third-party-01.png new file mode 100644 index 00000000000..420c980c9f8 Binary files /dev/null and b/docs/ja/integrations/migration/images/third-party-01.png differ diff --git a/docs/ja/integrations/migration/images/uploadcsv1.png b/docs/ja/integrations/migration/images/uploadcsv1.png new file mode 100644 index 00000000000..b73de7ed3ca Binary files /dev/null and b/docs/ja/integrations/migration/images/uploadcsv1.png differ diff --git a/docs/ja/integrations/migration/images/uploadcsv2.png b/docs/ja/integrations/migration/images/uploadcsv2.png new file mode 100644 index 00000000000..76bf0de8a87 Binary files /dev/null and b/docs/ja/integrations/migration/images/uploadcsv2.png differ diff --git a/docs/ja/integrations/migration/images/uploadcsv3.png b/docs/ja/integrations/migration/images/uploadcsv3.png new file mode 100644 index 00000000000..b138c33b426 Binary files /dev/null and b/docs/ja/integrations/migration/images/uploadcsv3.png differ diff --git a/docs/ja/integrations/migration/images/uploadcsv4.png b/docs/ja/integrations/migration/images/uploadcsv4.png new file mode 100644 index 00000000000..a8b8c811be9 Binary files /dev/null and b/docs/ja/integrations/migration/images/uploadcsv4.png differ diff --git a/docs/ja/integrations/migration/images/uploadcsv5.png b/docs/ja/integrations/migration/images/uploadcsv5.png new file mode 100644 index 00000000000..b3eeea8fc64 Binary files /dev/null and b/docs/ja/integrations/migration/images/uploadcsv5.png differ diff --git a/docs/ja/integrations/migration/index.md b/docs/ja/integrations/migration/index.md new file mode 100644 index 00000000000..cd7bfff418f --- /dev/null +++ b/docs/ja/integrations/migration/index.md @@ -0,0 +1,30 @@ +--- +sidebar_label: æ¦‚è¦ +sidebar_position: 1 +keywords: [clickhouse, 移行, マイグレーション, データ] +--- + +# ClickHouse ã¸ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œ + +
    + +
    + +
    + +ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ã®å ´æ‰€ã«å¿œã˜ã¦ã€ClickHouse Cloud ã«ãƒ‡ãƒ¼ã‚¿ã‚’移行ã™ã‚‹ãŸã‚ã®ã„ãã¤ã‹ã®ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚ + +- [セルフマãƒãƒ¼ã‚¸ãƒ‰ã‹ã‚‰ã‚¯ãƒ©ã‚¦ãƒ‰ã¸](./clickhouse-to-cloud.md): `remoteSecure` 関数を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’è»¢é€ +- [ä»–ã®DBMS](./clickhouse-local-etl.md): [clickhouse-local] ETL ツールã¨ç¾åœ¨ã®DBMS用ã®é©åˆ‡ãªClickHouseテーブル関数を使用 +- [ã©ã“ã‹ã‚‰ã§ã‚‚ï¼](./etl-tool-to-clickhouse.md): 様々ãªãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã«æŽ¥ç¶šã§ãる人気ã®ETL/ELTツールã®ä¸€ã¤ã‚’使用 +- [オブジェクトストレージ](./object-storage-to-clickhouse.md): S3ã‹ã‚‰ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’ç°¡å˜ã«æŒ¿å…¥ + +例ã¨ã—ã¦ã€[Redshiftã‹ã‚‰ã®ç§»è¡Œ](/docs/ja/integrations/data-ingestion/redshift/index.md)ã«ãŠã„ã¦ã€ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œã®3ã¤ã®æ–¹æ³•ã‚’紹介ã—ã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/integrations/migration/object-storage-to-clickhouse.md b/docs/ja/integrations/migration/object-storage-to-clickhouse.md new file mode 100644 index 00000000000..5215502c3ba --- /dev/null +++ b/docs/ja/integrations/migration/object-storage-to-clickhouse.md @@ -0,0 +1,21 @@ +--- +title: オブジェクトストレージã‹ã‚‰ClickHouse Cloud㸠+description: オブジェクトストレージã‹ã‚‰ClickHouse Cloudã¸ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œ +keywords: [オブジェクトストレージ, s3, azure blob, gcs, マイグレーション] +--- + +# クラウドオブジェクトストレージã‹ã‚‰ClickHouse Cloudã«ãƒ‡ãƒ¼ã‚¿ã‚’移動ã™ã‚‹ + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseã®ãƒžã‚¤ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ + +クラウドオブジェクトストレージをデータレイクã¨ã—ã¦ä½¿ç”¨ã—ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouse Cloudã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ãŸã„å ´åˆã‚„ã€ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚·ã‚¹ãƒ†ãƒ ãŒãƒ‡ãƒ¼ã‚¿ã‚’クラウドオブジェクトストレージã«ç›´æŽ¥ã‚ªãƒ•ãƒ­ãƒ¼ãƒ‰ã§ãã‚‹å ´åˆã€Cloud Object Storageã«æ ¼ç´ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’ClickHouse Cloudã®ãƒ†ãƒ¼ãƒ–ルã«ç§»è¡Œã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®ãƒ†ãƒ¼ãƒ–ル関数を使用ã§ãã¾ã™: + +- [s3](/docs/ja/sql-reference/table-functions/s3.md) ã¾ãŸã¯ [s3Cluster](/docs/ja/sql-reference/table-functions/s3Cluster.md) +- [gcs](/docs/ja/sql-reference/table-functions/gcs) +- [azureBlobStorage](/docs/ja/sql-reference/table-functions/azureBlobStorage) + +ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚·ã‚¹ãƒ†ãƒ ãŒã‚¯ãƒ©ã‚¦ãƒ‰ã‚ªãƒ–ジェクトストレージã«ãƒ‡ãƒ¼ã‚¿ã‚’直接オフロードã§ããªã„å ´åˆã¯ã€[サードパーティã®ETL/ELTツール](./etl-tool-to-clickhouse.md) ã‚„ [clickhouse-local](./clickhouse-local-etl.md) を使用ã—ã¦ã€ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚·ã‚¹ãƒ†ãƒ ã‹ã‚‰ã‚¯ãƒ©ã‚¦ãƒ‰ã‚ªãƒ–ジェクトストレージã«ãƒ‡ãƒ¼ã‚¿ã‚’移動ã—ã€ãã®å¾Œã€ç¬¬äºŒæ®µéšŽã§ClickHouse Cloudã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’移行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’クラウドオブジェクトストレージã«ã‚ªãƒ•ãƒ­ãƒ¼ãƒ‰ã—ã€ãã®å¾ŒClickHouseã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã¨ã„ã†2段階ã®ãƒ—ロセスã§ã™ãŒã€ã“ã®æ–¹æ³•ã®åˆ©ç‚¹ã¯ã€ã‚¯ãƒ©ã‚¦ãƒ‰ã‚ªãƒ–ジェクトストレージã‹ã‚‰ã®é«˜åº¦ã«ä¸¦åˆ—化ã•ã‚ŒãŸèª­ã¿è¾¼ã¿ã‚’サãƒãƒ¼ãƒˆã™ã‚‹[堅牢ãªClickHouse Cloud](https://clickhouse.com/blog/getting-data-into-clickhouse-part-3-s3) ã«ã‚ˆã‚Šã€ãƒšã‚¿ãƒã‚¤ãƒˆè¦æ¨¡ã¾ã§ã‚¹ã‚±ãƒ¼ãƒ«ã§ãã‚‹ã“ã¨ã§ã™ã€‚ã¾ãŸã€[Parquet](https://clickhouse.com/docs/ja/interfaces/formats/#data-format-parquet) ã®ã‚ˆã†ãªé«˜åº¦ãªåœ§ç¸®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’活用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +S3を使用ã—ã¦ClickHouse Cloudã«ãƒ‡ãƒ¼ã‚¿ã‚’å–り込む方法を具体的ãªã‚³ãƒ¼ãƒ‰ä¾‹ã§ç¤ºã—ãŸ[ブログ記事](https://clickhouse.com/blog/getting-data-into-clickhouse-part-3-s3)ãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/integrations/migration/rockset.md b/docs/ja/integrations/migration/rockset.md new file mode 100644 index 00000000000..39229aeb9b6 --- /dev/null +++ b/docs/ja/integrations/migration/rockset.md @@ -0,0 +1,145 @@ +--- +title: Rocksetã‹ã‚‰ã®ç§»è¡Œ +slug: /ja/migrations/rockset +description: Rocksetã‹ã‚‰ClickHouseã¸ã®ç§»è¡Œ +keywords: [migrate, migration, migrating, data, etl, elt, rockset] +--- + +# Rocksetã‹ã‚‰ã®ç§»è¡Œ + +Rocksetã¯ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ åˆ†æžãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã‚ã‚Šã€[2024å¹´6月ã«OpenAIã«è²·åŽã•ã‚Œã¾ã—ãŸ](https://rockset.com/blog/openai-acquires-rockset/)。 +ユーザーã¯2024å¹´9月30æ—¥åˆå¾Œ5時PDTã¾ã§ã«[サービスã‹ã‚‰ã‚ªãƒ•ãƒœãƒ¼ãƒ‰ã™ã‚‹](https://docs.rockset.com/documentation/docs/faq)å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ç§ãŸã¡ã¯ã€ClickHouse CloudãŒRocksetユーザーã«ã¨ã£ã¦ç´ æ™´ã‚‰ã—ã„é¸æŠžè‚¢ã¨ãªã‚‹ã¨è€ƒãˆã¦ã„ã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€Rocksetã‹ã‚‰ClickHouseã«ç§»è¡Œã™ã‚‹éš›ã«è€ƒæ…®ã™ã¹ããƒã‚¤ãƒ³ãƒˆã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +ã§ã¯ã€å§‹ã‚ã¾ã—ょã†ï¼ + +## å³æ™‚ã®ã‚µãƒãƒ¼ãƒˆ + +å³æ™‚ã®ã‚µãƒãƒ¼ãƒˆãŒå¿…è¦ãªå ´åˆã¯ã€[ã“ã®ãƒ•ã‚©ãƒ¼ãƒ ](https://clickhouse.com/company/contact?loc=docs-rockest-migrations)ã«ã”記入ã„ãŸã ãã€äººé–“ã®æ‹…当者ãŒå¯¾å¿œã„ãŸã—ã¾ã™ï¼ + + +## ClickHouseã¨Rocksetã®æ¯”較 - æ¦‚è¦ + +ã¾ãšã€ClickHouseã®å¼·ã¿ã¨ã€Rocksetã¨ã®æ¯”較ã§æœŸå¾…ã•ã‚Œã‚‹åˆ©ç‚¹ã«ã¤ã„ã¦ç°¡å˜ã«èª¬æ˜Žã—ã¾ã™ã€‚ + +ClickHouseã¯ã€ã‚¹ã‚­ãƒ¼ãƒžãƒ•ã‚¡ãƒ¼ã‚¹ãƒˆã‚¢ãƒ—ローãƒã‚’通ã˜ã¦ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ãƒ‘フォーマンスã¨ã‚³ã‚¹ãƒˆåŠ¹çŽ‡ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚ +åŠæ§‹é€ åŒ–データもサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿ã®æ§‹é€ ã‚’ã©ã®ã‚ˆã†ã«è¨­å®šã™ã‚‹ã‹ã‚’決定ã™ã‚‹ã“ã¨ã§ã€æ€§èƒ½ã¨ãƒªã‚½ãƒ¼ã‚¹ã®åŠ¹çŽ‡ã‚’最大化ã™ã‚‹ã¨ã„ã†å“²å­¦ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ +上記ã®ã‚¹ã‚­ãƒ¼ãƒžãƒ•ã‚¡ãƒ¼ã‚¹ãƒˆã‚¢ãƒ—ローãƒã®çµæžœã¨ã—ã¦ã€ãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ã§ã¯ã€ClickHouseã¯Rocksetを上回るスケーラビリティã€ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ã‚·ãƒ§ãƒ³ãƒˆãƒ©ãƒ•ãƒ—ットã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã€ãŠã‚ˆã³ã‚³ã‚¹ãƒˆåŠ¹çŽ‡ã‚’実ç¾ã—ã¦ã„ã¾ã™ã€‚ + +ä»–ã®ãƒ‡ãƒ¼ã‚¿ã‚·ã‚¹ãƒ†ãƒ ã¨ã®çµ±åˆã«é–¢ã—ã¦ã¯ã€ClickHouseã«ã¯Rocksetを超ãˆã‚‹[広範ãªæ©Ÿèƒ½](/ja/integrations)ãŒã‚ã‚Šã¾ã™ã€‚ + +Rocksetã¨ClickHouseã®ä¸¡æ–¹ã¯ã€ã‚¯ãƒ©ã‚¦ãƒ‰ãƒ™ãƒ¼ã‚¹ã®è£½å“ã¨é–¢é€£ã™ã‚‹ã‚µãƒãƒ¼ãƒˆã‚µãƒ¼ãƒ“スをæä¾›ã—ã¦ã„ã¾ã™ã€‚ +Rocksetã¨ã¯ç•°ãªã‚Šã€ClickHouseã«ã¯ã‚ªãƒ¼ãƒ—ンソース製å“ã¨ã‚³ãƒŸãƒ¥ãƒ‹ãƒ†ã‚£ãŒã‚ã‚Šã¾ã™ã€‚ +ClickHouseã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¯[github.com/clickhouse/clickhouse](https://github.com/clickhouse/clickhouse)ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã€åŸ·ç­†æ™‚点ã§1,500人を超ãˆã‚‹è²¢çŒ®è€…ãŒã„ã¾ã™ã€‚ +[ClickHouse Community Slack](https://clickhouse.com/slack)ã«ã¯ã€7,000人以上ã®ãƒ¡ãƒ³ãƒãƒ¼ãŒçµŒé¨“やベストプラクティスを共有ã—ã€å•é¡Œã«å¯¾ã™ã‚‹æ”¯æ´ã‚’ã—ã¦ã„ã¾ã™ã€‚ + +ã“ã®ç§»è¡Œã‚¬ã‚¤ãƒ‰ã¯Rocksetã‹ã‚‰ClickHouse Cloudã¸ã®ç§»è¡Œã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚ªãƒ¼ãƒ—ンソース機能ã«é–¢ã™ã‚‹[ãã®ä»–ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](/)ã‚‚å‚ç…§ã§ãã¾ã™ã€‚ + +## Rocksetã®ã‚­ãƒ¼ãƒã‚¤ãƒ³ãƒˆ + +ã¾ãšã€[Rocksetã®ã‚­ãƒ¼ãƒã‚¤ãƒ³ãƒˆ](https://docs.rockset.com/documentation/docs/key-concepts)を見ã¦ã€ClickHouse Cloudã§ã®åŒç­‰ã®æ©Ÿèƒ½ï¼ˆå­˜åœ¨ã™ã‚‹å ´åˆï¼‰ã‚’説明ã—ã¾ã™ã€‚ + +### データソース + +Rocksetã¨ClickHouseã®ä¸¡æ–¹ãŒæ§˜ã€…ãªã‚½ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã®ãƒ­ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +Rocksetã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’作æˆã—ã€ãã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã«åŸºã¥ã„ã¦_コレクション_を作æˆã—ã¾ã™ã€‚ +イベントストリーミングプラットフォームã€OLTPデータベースã€ã‚¯ãƒ©ã‚¦ãƒ‰ãƒã‚±ãƒƒãƒˆã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«å¯¾ã™ã‚‹å®Œå…¨ç®¡ç†ã•ã‚ŒãŸçµ±åˆãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouse Cloudã§ã¯ã€å®Œå…¨ç®¡ç†ã•ã‚ŒãŸçµ±åˆã®åŒç­‰ç‰©ã¯[ClickPipes](/ja/integrations/ClickPipes)ã§ã™ã€‚ +ClickPipesã¯ã‚¤ãƒ™ãƒ³ãƒˆã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ—ラットフォームã¨ã‚¯ãƒ©ã‚¦ãƒ‰ãƒã‚±ãƒƒãƒˆã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‹ã‚‰ç¶™ç¶šçš„ã«ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +ClickPipesã¯ãƒ‡ãƒ¼ã‚¿ã‚’_テーブル_ã«ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ + +### ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆå¤‰æ› + +Rocksetã®ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆå¤‰æ›ã¯ã€Rocksetã«å…¥ã£ã¦ãる生データをコレクションã«ä¿å­˜ã™ã‚‹å‰ã«å¤‰æ›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +ClickHouse Cloudã§ã‚‚ClickPipesを通ã˜ã¦åŒæ§˜ã®ã“ã¨ãŒã§ãã€ClickHouseã®[Materialized View機能](/ja/guides/developer/cascading-materialized-views)を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã—ã¾ã™ã€‚ + +### コレクション + +Rocksetã§ã¯ã€ã‚¯ã‚¨ãƒªã‚’コレクションã«å¯¾ã—ã¦å®Ÿè¡Œã—ã¾ã™ã€‚ClickHouse Cloudã§ã¯ã€ã‚¯ã‚¨ãƒªã‚’テーブルã«å¯¾ã—ã¦å®Ÿè¡Œã—ã¾ã™ã€‚ +ã©ã¡ã‚‰ã®ã‚µãƒ¼ãƒ“スã§ã‚‚ã€ã‚¯ã‚¨ãƒªã¯SQLを使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +ClickHouseã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’æ“作ãŠã‚ˆã³å¤‰æ›ã™ã‚‹ãŸã‚ã®SQL標準ã®é–¢æ•°ã«åŠ ãˆã¦ã€ã•ã‚‰ãªã‚‹é–¢æ•°ã‚’追加ã—ã¦ã„ã¾ã™ã€‚ + +### クエリ ラムダ + +Rocksetã¯ã€å°‚用ã®RESTエンドãƒã‚¤ãƒ³ãƒˆã‹ã‚‰å®Ÿè¡Œã§ãã‚‹åå‰ä»˜ãã®ãƒ‘ラメータ化ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã§ã‚るクエリ ラムダをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +ClickHouse Cloudã®[クエリAPIエンドãƒã‚¤ãƒ³ãƒˆ](/ja/get-started/query-endpoints)ã¯åŒæ§˜ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ + +### ビュー + +Rocksetã§ã¯ã€SQLクエリã§å®šç¾©ã•ã‚ŒãŸä»®æƒ³çš„ãªã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚るビューを作æˆã§ãã¾ã™ã€‚ +ClickHouse Cloudã¯ã•ã¾ã–ã¾ãª[ビュー](/ja/sql-reference/statements/create/view)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +* _通常ã®ãƒ“ュー_ ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ä¿æŒã—ã¾ã›ã‚“。クエリ時ã«åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®èª­ã¿å–ã‚Šã‚’è¡Œã„ã¾ã™ã€‚ +* _パラメータ化ã•ã‚ŒãŸãƒ“ュー_ ã¯é€šå¸¸ã®ãƒ“ューã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ã‚¯ã‚¨ãƒªæ™‚ã«è§£æ±ºã•ã‚Œã‚‹ãƒ‘ラメータã¨å…±ã«ä½œæˆã§ãã¾ã™ã€‚ +* _Materialized View_ ã¯å¯¾å¿œã™ã‚‹`SELECT`クエリã«ã‚ˆã£ã¦å¤‰æ›ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã—ã¾ã™ã€‚関連ã™ã‚‹ã‚½ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ã«æ–°ã—ã„データãŒè¿½åŠ ã•ã‚ŒãŸã¨ãã«ãƒˆãƒªã‚¬ãƒ¼ã¨ã—ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +### エイリアス + +Rocksetã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¯ã€è¤‡æ•°ã®åå‰ã‚’コレクションã«é–¢é€£ä»˜ã‘ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +ClickHouse Cloudã§ã¯ã€åŒç­‰ã®æ©Ÿèƒ½ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +### ワークスペース + +Rocksetã®ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã¯ã€ãƒªã‚½ãƒ¼ã‚¹ï¼ˆä¾‹ï¼šã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚¯ã‚¨ãƒªãƒ©ãƒ ãƒ€ã€ãƒ“ューã€ãŠã‚ˆã³ã‚¨ã‚¤ãƒªã‚¢ã‚¹ï¼‰ãŠã‚ˆã³ä»–ã®ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’ä¿æŒã™ã‚‹ã‚³ãƒ³ãƒ†ãƒŠã§ã™ã€‚ + +ClickHouse Cloudã§ã¯ã€å®Œå…¨ãªåˆ†é›¢ã‚’実ç¾ã™ã‚‹ãŸã‚ã«ç•°ãªã‚‹ã‚µãƒ¼ãƒ“スを利用ã§ãã¾ã™ã€‚ +ã¾ãŸã€ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ル/ビューã¸ã®RBACアクセスを簡素化ã™ã‚‹ãŸã‚ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## 設計上ã®è€ƒæ…®äº‹é … + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€Rocksetã®ã‚­ãƒ¼ãƒ•ã‚£ãƒ¼ãƒãƒ£ãƒ¼ã‚’ã„ãã¤ã‹ç¢ºèªã—ã€ClickHouse Cloudを使用ã™ã‚‹éš›ã®å¯¾å¿œæ–¹æ³•ã‚’å­¦ã³ã¾ã™ã€‚ + +### JSONサãƒãƒ¼ãƒˆ + +Rocksetã¯ã€Rockset固有ã®åž‹ã‚’サãƒãƒ¼ãƒˆã™ã‚‹æ‹¡å¼µç‰ˆJSONå½¢å¼ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +ClickHouseã§JSONã‚’æ“作ã™ã‚‹ãŸã‚ã®æ–¹æ³•ã¯ã„ãã¤ã‹ã‚ã‚Šã¾ã™ï¼š + +* JSON推論 +* クエリ時ã®JSON抽出 +* インサート時ã®JSON抽出 + +ユーザーケースã«æœ€é©ãªã‚¢ãƒ—ローãƒã‚’ç†è§£ã™ã‚‹ã«ã¯ã€[JSONã«é–¢ã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](/docs/ja/integrations/data-formats/json)ã‚’ã”覧ãã ã•ã„。 + +ã•ã‚‰ã«ã€ClickHouseã«ã¯ã¾ã‚‚ãªã[åŠæ§‹é€ åŒ–カラムデータ型](https://github.com/ClickHouse/ClickHouse/issues/54864)ãŒè¿½åŠ ã•ã‚Œã¾ã™ã€‚ +ã“ã®æ–°ã—ã„åž‹ã¯ã€Rocksetã®JSONåž‹ãŒæä¾›ã™ã‚‹æŸ”軟性をユーザーã«æä¾›ã™ã‚‹ã¯ãšã§ã™ã€‚ + +### フルテキスト検索 + +Rocksetã¯`SEARCH`関数ã§ãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆæ¤œç´¢ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +ClickHouseã¯æ¤œç´¢ã‚¨ãƒ³ã‚¸ãƒ³ã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€[文字列検索用ã®ã•ã¾ã–ã¾ãªé–¢æ•°](/ja/sql-reference/functions/string-search-functions)ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ +ClickHouseã¯ã¾ãŸã€å¤šãã®ã‚·ãƒŠãƒªã‚ªã§å½¹ç«‹ã¤[ブルームフィルター](/ja/optimize/skipping-indexes)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### ベクトル検索 + +Rocksetã«ã¯é¡žä¼¼åº¦ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒã‚ã‚Šã€ãƒ™ã‚¯ãƒˆãƒ«æ¤œç´¢ã‚¢ãƒ—リケーションã§ä½¿ç”¨ã•ã‚Œã‚‹åŸ‹ã‚è¾¼ã¿ã‚’インデックスã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ClickHouseも線形スキャンを使用ã—ã¦ãƒ™ã‚¯ãƒˆãƒ«æ¤œç´¢ã‚’実行ã§ãã¾ã™ï¼š +- [ClickHouseã§ã®ãƒ™ã‚¯ãƒˆãƒ«æ¤œç´¢ - パート1](https://clickhouse.com/blog/vector-search-clickhouse-p1?loc=docs-rockest-migrations) +- [ClickHouseã§ã®ãƒ™ã‚¯ãƒˆãƒ«æ¤œç´¢ - パート2](https://clickhouse.com/blog/vector-search-clickhouse-p2?loc=docs-rockest-migrations) + +ClickHouseã«ã¯[ベクトル検索類似度インデックス](https://clickhouse.com/docs/ja/engines/table-engines/mergetree-family/annindexes)ã‚‚ã‚ã‚Šã¾ã™ãŒã€ã“ã®ã‚¢ãƒ—ローãƒã¯ç¾åœ¨å®Ÿé¨“中ã§ã‚ã‚Šã€[æ–°ã—ã„クエリアナライザー](https://clickhouse.com/docs/ja/guides/developer/understanding-query-execution-with-the-analyzer)ã¨ã¯ã¾ã äº’æ›æ€§ãŒã‚ã‚Šã¾ã›ã‚“。 + +### OLTPデータベースã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆ + +Rocksetã®ç®¡ç†ã•ã‚ŒãŸçµ±åˆã¯ã€MongoDBã‚„DynamoDBãªã©ã®OLTPデータベースã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +DynamoDBã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’インジェストã™ã‚‹å ´åˆã¯ã€[ã“ã¡ã‚‰ã®DynamoDBçµ±åˆã‚¬ã‚¤ãƒ‰](/docs/ja/integrations/data-ingestion/dbms/dynamodb/index.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### コンピュート・コンピュート分離 + +コンピュート・コンピュート分離ã¯ã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ åˆ†æžã‚·ã‚¹ãƒ†ãƒ ã«ãŠã‘るアーキテクãƒãƒ£ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ‘ターンã§ã€çªç„¶ã®ãƒ‡ãƒ¼ã‚¿æµå…¥ã‚„クエリã«å¯¾å¿œã§ãるよã†ã«ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ +å˜ä¸€ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆã¨ã‚¯ã‚¨ãƒªã®ä¸¡æ–¹ã‚’処ç†ã™ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã®æ€¥å¢—ãŒã‚ã‚‹ã¨ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆå¾…機時間ãŒå¢—加ã—ã€ãƒ‡ãƒ¼ã‚¿æµå…¥ãŒæ€¥å¢—ã™ã‚‹ã¨ã‚¯ã‚¨ãƒªå¾…機時間ãŒå¢—加ã—ã¾ã™ã€‚ + +コンピュート・コンピュート分離ã¯ã€ã“ã®å•é¡Œã‚’回é¿ã™ã‚‹ãŸã‚ã«ãƒ‡ãƒ¼ã‚¿ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆã¨ã‚¯ã‚¨ãƒªå‡¦ç†ã®ã‚³ãƒ¼ãƒ‰ãƒ‘スを分離ã—ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯2023å¹´3月ã«Rocksetã§å®Ÿè£…ã•ã‚Œã¾ã—ãŸã€‚ + +ã“ã®æ©Ÿèƒ½ã¯ç¾åœ¨ClickHouse Cloudã§å®Ÿè£…中ã§ã‚ã‚Šã€ãƒ—ライベートプレビューã«è¿‘ã¥ã„ã¦ã„ã¾ã™ã€‚サãƒãƒ¼ãƒˆã«é€£çµ¡ã—ã¦æœ‰åŠ¹åŒ–ã—ã¦ãã ã•ã„。 + +## 無料移行サービス + +Rocksetユーザーã«ã¨ã£ã¦ã‚¹ãƒˆãƒ¬ã‚¹ã®å¤šã„時期ã§ã‚ã‚‹ã“ã¨ã‚’ç§ãŸã¡ã¯ç†è§£ã—ã¦ã„ã¾ã™ - 誰も短期間ã§æœ¬ç•ªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’移行ã—ãŸã„ã¨ã¯æ€ã‚ãªã„ã§ã—ょã†ï¼ + +ClickHouseãŒã‚ãªãŸã«é©ã—ã¦ã„ã‚‹ã‹ã‚‚ã—ã‚Œãªã„å ´åˆã€ç§»è¡Œã‚’スムーズã«è¡Œã†ãŸã‚ã«[無料移行サービス](https://clickhouse.com/comparison/rockset?loc=docs-rockest-migrations)ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/integrations/migration/upload-a-csv-file.md b/docs/ja/integrations/migration/upload-a-csv-file.md new file mode 100644 index 00000000000..98882ec3d91 --- /dev/null +++ b/docs/ja/integrations/migration/upload-a-csv-file.md @@ -0,0 +1,29 @@ +--- +title: "CSVファイルã®ã‚¢ãƒƒãƒ—ロード" +--- + +# CSVファイルã®ã‚¢ãƒƒãƒ—ロード + +ヘッダー行ã«ã‚«ãƒ©ãƒ åã‚’å«ã‚€CSVã¾ãŸã¯TSVファイルをアップロードã™ã‚‹ã¨ã€ClickHouseã¯ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’推測ã™ã‚‹ãŸã‚ã«ä¸€é€£ã®è¡Œã‚’事å‰å‡¦ç†ã—ã€ãã®å¾Œæ–°ã—ã„テーブルã«è¡Œã‚’挿入ã—ã¾ã™ã€‚ + +1. **ClickHouse Cloud**サービスã®**詳細**ページã«ç§»å‹•ã—ã¾ã™ã€‚ + + ![詳細ページ](./images/uploadcsv1.png) + +2. **アクション**ドロップダウンメニューã‹ã‚‰**データã®èª­ã¿è¾¼ã¿**ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![データã®è¿½åŠ ](./images/uploadcsv2.png) + +3. **データソース**ページã§**ファイルアップロード**ボタンをクリックã—ã€è¡¨ç¤ºã•ã‚Œã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã‚¢ãƒƒãƒ—ロードã—ãŸã„ファイルをé¸æŠžã—ã¾ã™ã€‚**é–‹ã**をクリックã—ã¦ç¶šè¡Œã—ã¾ã™ï¼ˆä»¥ä¸‹ã®ä¾‹ã¯macOSã§ã™ãŒã€ä»–ã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã§ã¯ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼‰ã€‚ + + ![アップロードã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠž](./images/uploadcsv3.png) + +4. ClickHouseãŒæŽ¨æ¸¬ã—ãŸãƒ‡ãƒ¼ã‚¿åž‹ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + + ![推測ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹](./images/uploadcsv4.png) + +5. ***æ–°ã—ã„テーブルåを入力***ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹æº–å‚™ãŒã§ããŸã‚‰ã€**ClickHouseã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆ**ボタンをクリックã—ã¾ã™ã€‚ + + ![アップロードã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠž](./images/uploadcsv5.png) + +6. ClickHouseサービスã«æŽ¥ç¶šã—ã€ãƒ†ãƒ¼ãƒ–ルãŒæ­£å¸¸ã«ä½œæˆã•ã‚ŒãŸã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。データãŒæº–備完了ã§ã™ï¼ データをå¯è¦–化ã—ãŸã„å ´åˆã¯ã€ç°¡å˜ã«ClickHouseã«æŽ¥ç¶šã§ãã‚‹ã„ãã¤ã‹ã®[BIツール](../data-visualization.md)ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/no-code/_category_.yml b/docs/ja/integrations/no-code/_category_.yml new file mode 100644 index 00000000000..95665c8dc01 --- /dev/null +++ b/docs/ja/integrations/no-code/_category_.yml @@ -0,0 +1,8 @@ +position: 300 +label: 'No-Code platforms' +collapsible: true +collapsed: true +link: + type: generated-index + title: No-Code platforms + slug: /ja/integrations/no-code diff --git a/docs/ja/integrations/no-code/images/retool_01.png b/docs/ja/integrations/no-code/images/retool_01.png new file mode 100644 index 00000000000..89219697453 Binary files /dev/null and b/docs/ja/integrations/no-code/images/retool_01.png differ diff --git a/docs/ja/integrations/no-code/images/retool_02.png b/docs/ja/integrations/no-code/images/retool_02.png new file mode 100644 index 00000000000..e6d02e41ba6 Binary files /dev/null and b/docs/ja/integrations/no-code/images/retool_02.png differ diff --git a/docs/ja/integrations/no-code/images/retool_03.png b/docs/ja/integrations/no-code/images/retool_03.png new file mode 100644 index 00000000000..1ed2cfa91c8 Binary files /dev/null and b/docs/ja/integrations/no-code/images/retool_03.png differ diff --git a/docs/ja/integrations/no-code/images/retool_04.png b/docs/ja/integrations/no-code/images/retool_04.png new file mode 100644 index 00000000000..959103a7b83 Binary files /dev/null and b/docs/ja/integrations/no-code/images/retool_04.png differ diff --git a/docs/ja/integrations/no-code/images/retool_05.png b/docs/ja/integrations/no-code/images/retool_05.png new file mode 100644 index 00000000000..3726cfd40fd Binary files /dev/null and b/docs/ja/integrations/no-code/images/retool_05.png differ diff --git a/docs/ja/integrations/no-code/retool.md b/docs/ja/integrations/no-code/retool.md new file mode 100644 index 00000000000..65b8de193d0 --- /dev/null +++ b/docs/ja/integrations/no-code/retool.md @@ -0,0 +1,41 @@ +--- +sidebar_label: Retool +slug: /ja/integrations/retool +keywords: [clickhouse, retool, connect, integrate, ui, admin, panel, dashboard, nocode, no-code] +description: 豊富ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’å‚™ãˆãŸã‚¦ã‚§ãƒ–やモãƒã‚¤ãƒ«ã‚¢ãƒ—リをã™ã°ã‚„ã構築ã—ã€è¤‡é›‘ãªã‚¿ã‚¹ã‚¯ã‚’自動化ã—ã€AIã‚’çµ±åˆã™ã‚‹â€”ã™ã¹ã¦ãƒ‡ãƒ¼ã‚¿ã«ã‚ˆã£ã¦æ”¯ãˆã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# Retoolã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +## 1. 接続情報をåŽé›†ã™ã‚‹ + + +## 2. ClickHouseリソースを作æˆã™ã‚‹ + +Retoolアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã€_Resources_ タブã«ç§»å‹•ã—ã¾ã™ã€‚「Create New〠-> 「Resourceã€ã‚’é¸æŠžã—ã¦ãã ã•ã„: + +æ–°ã—ã„ãƒªã‚½ãƒ¼ã‚¹ã‚’ä½œæˆ +
    + +利用å¯èƒ½ãªã‚³ãƒã‚¯ã‚¿ã®ãƒªã‚¹ãƒˆã‹ã‚‰ã€ŒJDBCã€ã‚’é¸æŠžã—ã¾ã™ï¼š + +JDBCコãƒã‚¯ã‚¿ã‚’é¸æŠž +
    + +セットアップウィザードã§ã€ã€ŒDriver nameã€ã¨ã—㦠`com.clickhouse.jdbc.ClickHouseDriver` ã‚’å¿…ãšé¸æŠžã—ã¦ãã ã•ã„: + +æ­£ã—ã„ドライãƒã‚’é¸æŠž +
    + +ClickHouseã®èªè¨¼æƒ…報を次ã®å½¢å¼ã§å…¥åŠ›ã—ã¾ã™ï¼š `jdbc:clickhouse://HOST:PORT/DATABASE?user=USERNAME&password=PASSWORD`。インスタンスãŒSSLã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã‚„ClickHouse Cloudを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€æŽ¥ç¶šæ–‡å­—列㫠`&ssl=true` を追加ã—ã¦ãã ã•ã„。ã“ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š `jdbc:clickhouse://HOST:PORT/DATABASE?user=USERNAME&password=PASSWORD&ssl=true` + +èªè¨¼æƒ…報を指定 +
    + +ãã®å¾Œã€æŽ¥ç¶šã‚’テストã—ã¦ãã ã•ã„: + +接続をテスト +
    + +ã“ã‚Œã§ã€ã‚ãªãŸã®ã‚¢ãƒ—リã§ClickHouseリソースを使用ã—ã¦é€²ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ diff --git a/docs/ja/integrations/prometheus.md b/docs/ja/integrations/prometheus.md new file mode 100644 index 00000000000..793c29427f2 --- /dev/null +++ b/docs/ja/integrations/prometheus.md @@ -0,0 +1,263 @@ +--- +slug: /ja/integrations/prometheus +sidebar_label: Prometheus +title: Prometheus +description: ClickHouseã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’Prometheusã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã¾ã™ +keywords: [prometheus, grafana, 監視, メトリクス, エクスãƒãƒ¼ã‚¿ãƒ¼] +--- + +# Prometheusçµ±åˆ + +ã“ã®æ©Ÿèƒ½ã¯ã€[Prometheus](https://prometheus.io/)ã‚’çµ±åˆã—ã¦ClickHouse Cloudサービスを監視ã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚Prometheusメトリクスã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã€[ClickHouse Cloud API](/ja/cloud/manage/api/api-overview) エンドãƒã‚¤ãƒ³ãƒˆã‚’介ã—ã¦å…¬é–‹ã•ã‚Œã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå®‰å…¨ã«æŽ¥ç¶šã—ã€ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’Prometheusメトリクスコレクターã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“れらã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯ã€Grafanaã‚„Datadogãªã©ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã«çµ±åˆã—ã¦å¯è¦–化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +開始ã™ã‚‹ã«ã¯ã€[APIキーを生æˆ](/ja/cloud/manage/openapi)ã—ã¦ãã ã•ã„。 + +## Prometheusエンドãƒã‚¤ãƒ³ãƒˆAPIã§ClickHouse Cloudメトリクスをå–å¾—ã™ã‚‹ + +### APIリファレンス + +|Method|Path| +|---|---| +|GET|https://api.clickhouse.cloud/v1/organizations/:organizationId/services/:serviceId/prometheus| + +**リクエストパラメータ** + +|Name|Type| +|---|---| +|Organization ID|uuid| +|Service ID|uuid| + +### èªè¨¼ + +基本èªè¨¼ã«ã¯ClickHouse Cloud APIキーを使用ã—ã¾ã™: + +```bash +Username: +Password: + +例: +export KEY_SECRET= +export KEY_ID= +export ORG_ID= +export SERVICE_ID= +curl --silent --user $KEY_ID:$KEY_SECRET https://api.clickhouse.cloud/v1/organizations/$ORG_ID/services/$SERVICE_ID/prometheus +``` + +### サンプルレスãƒãƒ³ã‚¹ + +``` +# HELP ClickHouse_ServiceInfo サービスã«é–¢ã™ã‚‹æƒ…å ±ã€ã‚¯ãƒ©ã‚¹ã‚¿ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãŠã‚ˆã³ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å«ã‚€ +# TYPE ClickHouse_ServiceInfo untyped +ClickHouse_ServiceInfo{clickhouse_org="c2ba4799-a76e-456f-a71a-b021b1fafe60",clickhouse_service="12f4a114-9746-4a75-9ce5-161ec3a73c4c",clickhouse_service_name="test service",clickhouse_cluster_status="running",clickhouse_version="24.5",scrape="full"} 1 + +# HELP ClickHouseProfileEvents_Query 解釈ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªæ•°ãŠã‚ˆã³æ½œåœ¨çš„ã«å®Ÿè¡Œã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªæ•°ã€‚解æžã«å¤±æ•—ã—ãŸã‚¯ã‚¨ãƒªã‚„ã€ASTサイズ制é™ã€ã‚¯ã‚©ãƒ¼ã‚¿åˆ¶é™ã€ã¾ãŸã¯åŒæ™‚実行クエリ数ã®åˆ¶é™ã«ã‚ˆã‚Šæ‹’å¦ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã¯å«ã¾ã‚Œã¾ã›ã‚“。ClickHouseã«ã‚ˆã£ã¦å†…部的ã«é–‹å§‹ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’å«ã‚€ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚サブクエリã¯ã‚«ã‚¦ãƒ³ãƒˆã—ã¾ã›ã‚“。 +# TYPE ClickHouseProfileEvents_Query counter +ClickHouseProfileEvents_Query{clickhouse_org="c2ba4799-a76e-456f-a71a-b021b1fafe60",clickhouse_service="12f4a114-9746-4a75-9ce5-161ec3a73c4c",clickhouse_service_name="test service",hostname="c-cream-ma-20-server-3vd2ehh-0",instance="c-cream-ma-20-server-3vd2ehh-0",table="system.events"} 6 + +# HELP ClickHouseProfileEvents_QueriesWithSubqueries ã™ã¹ã¦ã®ã‚µãƒ–クエリをå«ã‚€ã‚¯ã‚¨ãƒªã®æ•° +# TYPE ClickHouseProfileEvents_QueriesWithSubqueries counter +ClickHouseProfileEvents_QueriesWithSubqueries{clickhouse_org="c2ba4799-a76e-456f-a71a-b021b1fafe60",clickhouse_service="12f4a114-9746-4a75-9ce5-161ec3a73c4c",clickhouse_service_name="test service",hostname="c-cream-ma-20-server-3vd2ehh-0",instance="c-cream-ma-20-server-3vd2ehh-0",table="system.events"} 230 + +# HELP ClickHouseProfileEvents_SelectQueriesWithSubqueries ã™ã¹ã¦ã®ã‚µãƒ–クエリをå«ã‚€SELECTクエリã®æ•° +# TYPE ClickHouseProfileEvents_SelectQueriesWithSubqueries counter +ClickHouseProfileEvents_SelectQueriesWithSubqueries{clickhouse_org="c2ba4799-a76e-456f-a71a-b021b1fafe60",clickhouse_service="12f4a114-9746-4a75-9ce5-161ec3a73c4c",clickhouse_service_name="test service",hostname="c-cream-ma-20-server-3vd2ehh-0",instance="c-cream-ma-20-server-3vd2ehh-0",table="system.events"} 224 + +# HELP ClickHouseProfileEvents_FileOpen é–‹ã‹ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã€‚ +# TYPE ClickHouseProfileEvents_FileOpen counter +ClickHouseProfileEvents_FileOpen{clickhouse_org="c2ba4799-a76e-456f-a71a-b021b1fafe60",clickhouse_service="12f4a114-9746-4a75-9ce5-161ec3a73c4c",clickhouse_service_name="test service",hostname="c-cream-ma-20-server-3vd2ehh-0",instance="c-cream-ma-20-server-3vd2ehh-0",table="system.events"} 4157 + +# HELP ClickHouseProfileEvents_Seek 'lseek' 関数ãŒå‘¼ã³å‡ºã•ã‚ŒãŸå›žæ•°ã€‚ +# TYPE ClickHouseProfileEvents_Seek counter +ClickHouseProfileEvents_Seek{clickhouse_org="c2ba4799-a76e-456f-a71a-b021b1fafe60",clickhouse_service="12f4a114-9746-4a75-9ce5-161ec3a73c4c",clickhouse_service_name="test service",hostname="c-cream-ma-20-server-3vd2ehh-0",instance="c-cream-ma-20-server-3vd2ehh-0",table="system.events"} 1840 +``` + +### メトリクスラベル + +ã™ã¹ã¦ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã«ã¯ä»¥ä¸‹ã®ãƒ©ãƒ™ãƒ«ãŒã‚ã‚Šã¾ã™ï¼š + +|Label|Description| +|---|---| +|clickhouse_org|組織ID| +|clickhouse_service|サービスID| +|clickhouse_service_name|サービスå| + +### 情報メトリクス + +ClickHouse Cloudã¯ç‰¹åˆ¥ãªãƒ¡ãƒˆãƒªã‚¯ã‚¹`ClickHouse_ServiceInfo`ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯å¸¸ã«å€¤`1`ã‚’æŒã¤`gauge`ã§ã™ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã«ã¯ã™ã¹ã¦ã®**メトリクスラベル**ã¨ä»¥ä¸‹ã®ãƒ©ãƒ™ãƒ«ãŒå«ã¾ã‚Œã¾ã™ï¼š + +|Label|Description| +|---|---| +|clickhouse_cluster_status|サービスã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã€‚以下ã®ã„ãšã‚Œã‹ã«ãªã‚Šã¾ã™ï¼š[`awaking` \| `running` \| `degraded` \| `idle` \| `stopped`]| +|clickhouse_version|サービスãŒå®Ÿè¡Œã—ã¦ã„ã‚‹ClickHouseサーãƒãƒ¼ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³| +|scrape|最後ã®ã‚¹ã‚¯ãƒ¬ã‚¤ãƒ—ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’示ã—ã¾ã™ã€‚`full`ã¾ãŸã¯`partial`ã®ã„ãšã‚Œã‹ã«ãªã‚Šã¾ã™| +|full|最後ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚¹ã‚¯ãƒ¬ã‚¤ãƒ—中ã«ã‚¨ãƒ©ãƒ¼ãŒãªã‹ã£ãŸã“ã¨ã‚’示ã—ã¾ã™| +|partial|最後ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚¹ã‚¯ãƒ¬ã‚¤ãƒ—中ã«ã„ãã¤ã‹ã®ã‚¨ãƒ©ãƒ¼ãŒã‚ã‚Šã€`ClickHouse_ServiceInfo`メトリクスã®ã¿ãŒè¿”ã•ã‚ŒãŸã“ã¨ã‚’示ã—ã¾ã™| + +メトリクスをå–å¾—ã™ã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã€ã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã®ã‚µãƒ¼ãƒ“スをå†é–‹ã•ã›ã¾ã›ã‚“。サービスãŒ`idle`状態ã®å ´åˆã€`ClickHouse_ServiceInfo`メトリクスã®ã¿ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +### Prometheusã®è¨­å®š + +Prometheusサーãƒãƒ¼ã¯ã€æŒ‡å®šã•ã‚ŒãŸé–“éš”ã§è¨­å®šã•ã‚ŒãŸã‚¿ãƒ¼ã‚²ãƒƒãƒˆã‹ã‚‰ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’åŽé›†ã—ã¾ã™ã€‚以下ã¯ã€ClickHouse Cloud Prometheusエンドãƒã‚¤ãƒ³ãƒˆã‚’使用ã™ã‚‹ãŸã‚ã®Prometheusサーãƒãƒ¼ã®è¨­å®šä¾‹ã§ã™ï¼š + +```yaml +global: + scrape_interval: 15s + +scrape_configs: + - job_name: "prometheus" + static_configs: + - targets: ["localhost:9090"] + - job_name: "clickhouse" + static_configs: + - targets: ["api.clickhouse.cloud"] + scheme: https + metrics_path: "/v1/organizations//services//prometheus" + basic_auth: + username: + password: + honor_labels: true +``` + +`honor_labels`ã®è¨­å®šãƒ‘ラメーターã¯`true`ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ©ãƒ™ãƒ«ãŒé©åˆ‡ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ + +## Grafanaã¨ã®çµ±åˆ + +ユーザーã¯ã€Grafanaã¨çµ±åˆã™ã‚‹ãŸã‚ã®ä¸»ãªæ–¹æ³•ãŒ2ã¤ã‚ã‚Šã¾ã™ï¼š + +- **Metrics Endpoint** – ã“ã®æ–¹æ³•ã¯ã€è¿½åŠ ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚„インフラを必è¦ã¨ã—ãªã„利点ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æä¾›ã¯Grafana Cloudã«é™å®šã•ã‚Œã¦ãŠã‚Šã€ClickHouse Cloud Prometheusエンドãƒã‚¤ãƒ³ãƒˆURLã¨èªè¨¼æƒ…å ±ã®ã¿ãŒå¿…è¦ã§ã™ã€‚ +- **Grafana Alloy** - Grafana Alloyã¯ã€Grafana Agentã«ä»£ã‚ã‚‹OpenTelemetry (OTel) Collectorã®ãƒ™ãƒ³ãƒ€ãƒ¼ä¸­ç«‹ãªãƒ‡ã‚£ã‚¹ãƒˆãƒªãƒ“ューションã§ã™ã€‚ã“ã‚Œã¯ã‚¹ã‚¯ãƒ¬ãƒ¼ãƒ‘ーã¨ã—ã¦ä½¿ç”¨å¯èƒ½ã§ã€ç‹¬è‡ªã®ã‚¤ãƒ³ãƒ•ãƒ©ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ã«ãƒ‡ãƒ—ロイå¯èƒ½ã§ã€ã©ã®Prometheusエンドãƒã‚¤ãƒ³ãƒˆã¨ã‚‚互æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“れらã®ã‚ªãƒ—ションを使用ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã®æŒ‡ç¤ºã‚’以下ã«ç¤ºã—ã¾ã™ã€‚ClickHouse Cloud Prometheusエンドãƒã‚¤ãƒ³ãƒˆã«ç‰¹åŒ–ã—ãŸè©³ç´°ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚ + +### Grafana Cloudã¨Metrics Endpoint + +- Grafana Cloudアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ +- **Metrics Endpoint**ã‚’é¸æŠžã—ã¦æ–°ã—ã„接続を追加 +- Prometheusエンドãƒã‚¤ãƒ³ãƒˆã‚’指ã™ã‚ˆã†ã«Scrape URLを設定ã—ã€åŸºæœ¬èªè¨¼ã‚’使用ã—ã¦APIキー/シークレットã§æŽ¥ç¶šã‚’設定 +- 接続ãŒã§ãã‚‹ã“ã¨ã‚’確èªã™ã‚‹ãŸã‚ã«ãƒ†ã‚¹ãƒˆ + +Grafana Metrics Endpointを設定 + +
    + +設定後ã€ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’設定ã™ã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’é¸æŠžã™ã‚‹ãŸã‚ã®ãƒ‰ãƒ­ãƒƒãƒ—ダウンãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ï¼š + +Grafana Metrics Explorerドロップダウン + +
    + +Grafana Metrics Explorerãƒãƒ£ãƒ¼ãƒˆ + +### Grafana Cloudã¨Alloy + +Grafana Cloudを使用ã—ã¦ã„ã‚‹å ´åˆã€Alloyã‚’Grafanaã®Alloyメニューã«ç§»å‹•ã—ã¦ç”»é¢ã®æŒ‡ç¤ºã«å¾“ã†ã“ã¨ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ãã¾ã™ï¼š + +Grafana Alloy + +
    + +ã“ã‚Œã«ã‚ˆã‚Šã€èªè¨¼ãƒˆãƒ¼ã‚¯ãƒ³ã‚’用ã„ã¦Grafana Cloudエンドãƒã‚¤ãƒ³ãƒˆã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹ãŸã‚ã®`prometheus.remote_write`コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’æŒã¤ã‚ˆã†ã«AlloyãŒè¨­å®šã•ã‚Œã¾ã™ã€‚ユーザーã¯Alloyã®è¨­å®šï¼ˆLinuxã§ã¯`/etc/alloy/config.alloy`ã«ã‚ã‚Šã¾ã™ï¼‰ã‚’変更ã—ã¦ã€ClickHouse Cloud Prometheusエンドãƒã‚¤ãƒ³ãƒˆç”¨ã®ã‚¹ã‚¯ãƒ¬ãƒ¼ãƒ‘ーをå«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +以下ã¯ã€ClickHouse Cloudエンドãƒã‚¤ãƒ³ãƒˆã‹ã‚‰ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’スクレイプã™ã‚‹ãŸã‚ã®`prometheus.scrape`コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’å«ã‚€Alloyã®è¨­å®šä¾‹ã§ã™ã€‚ã¾ãŸè‡ªå‹•çš„ã«è¨­å®šã•ã‚ŒãŸ`prometheus.remote_write`コンãƒãƒ¼ãƒãƒ³ãƒˆã‚‚å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚`basic_auth`設定コンãƒãƒ¼ãƒãƒ³ãƒˆã«ã¯ç§ãŸã¡ã®Cloud APIキーIDãŠã‚ˆã³ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆãŒãã‚Œãžã‚Œãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードã¨ã—ã¦å«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +```yaml +prometheus.scrape "clickhouse_cloud" { + // 通常ã®ãƒªãƒƒã‚¹ãƒ³ã‚¢ãƒ‰ãƒ¬ã‚¹ã‹ã‚‰ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’åŽé›†ã—ã¾ã™ã€‚ + targets = [{ + __address__ = "https://api.clickhouse.cloud/v1/organizations/:organizationId/services/:serviceId/prometheus", +// 例: https://api.clickhouse.cloud/v1/organizations/97a33bdb-4db3-4067-b14f-ce40f621aae1/services/f7fefb6e-41a5-48fa-9f5f-deaaa442d5d8/prometheus + }] + + honor_labels = true + + basic_auth { + username = "KEY_ID" + password = "KEY_SECRET" + } + + forward_to = [prometheus.remote_write.metrics_service.receiver] + // follows to metrics_service below +} + +prometheus.remote_write "metrics_service" { + endpoint { + url = "https://prometheus-prod-10-prod-us-central-0.grafana.net/api/prom/push" + basic_auth { + username = "" + password = "" + } + } +} +``` + +`honor_labels`ã®è¨­å®šãƒ‘ラメーターã¯`true`ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ©ãƒ™ãƒ«ãŒé©åˆ‡ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ + +### セルフマãƒãƒ¼ã‚¸ãƒ‰ã®Grafanaã¨Alloy + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®Grafanaユーザーã¯ã€[ã“ã¡ã‚‰](https://grafana.com/docs/alloy/latest/get-started/install/)ã§Alloyエージェントをインストールã™ã‚‹ãŸã‚ã®æ‰‹é †ã‚’見ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ユーザーãŒPrometheusメトリクスをé€ã‚ŠãŸã„目的ã®å ´æ‰€ã«Alloyを設定ã—ã¦ã„ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚以下ã®`prometheus.scrape`コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ã€AlloyãŒClickHouse Cloudエンドãƒã‚¤ãƒ³ãƒˆã‚’スクレイプã™ã‚‹åŽŸå› ã¨ãªã‚Šã¾ã™ã€‚`prometheus.remote_write`ãŒã‚¹ã‚¯ãƒ¬ã‚¤ãƒ—ã•ã‚ŒãŸãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å—ã‘å–ã‚‹ã¨æƒ³å®šã—ã¦ã„ã¾ã™ã€‚ã“ã®è¨­å®šãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã€ãƒ•ã‚©ãƒ¯ãƒ¼ãƒ‰å…ˆã‚’希望ã®ãƒ‡ã‚¹ãƒ†ã‚£ãƒãƒ¼ã‚·ãƒ§ãƒ³ã«èª¿æ•´ã—ã¦ãã ã•ã„。 + +```yaml +prometheus.scrape "clickhouse_cloud" { + // 通常ã®ãƒªãƒƒã‚¹ãƒ³ã‚¢ãƒ‰ãƒ¬ã‚¹ã‹ã‚‰ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’åŽé›†ã—ã¾ã™ã€‚ + targets = [{ + __address__ = "https://api.clickhouse.cloud/v1/organizations/:organizationId/services/:serviceId/prometheus", +// 例: https://api.clickhouse.cloud/v1/organizations/97a33bdb-4db3-4067-b14f-ce40f621aae1/services/f7fefb6e-41a5-48fa-9f5f-deaaa442d5d8/prometheus + }] + + honor_labels = true + + basic_auth { + username = "KEY_ID" + password = "KEY_SECRET" + } + + forward_to = [prometheus.remote_write.metrics_service.receiver] + // preferred receiverã«è»¢é€ã€‚修正ã—ã¦ãã ã•ã„。 +} +``` + +設定ã™ã‚‹ã¨ã€ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚¨ã‚¯ã‚¹ãƒ—ローラーã«ClickHouse関連ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ï¼š + +Grafana Metrics Explorer + +
    + +`honor_labels`ã®è¨­å®šãƒ‘ラメーターã¯`true`ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ©ãƒ™ãƒ«ãŒé©åˆ‡ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ + +## Datadogã¨ã®çµ±åˆ + +Datadog [Agent](https://docs.datadoghq.com/agent/?tab=Linux)ãŠã‚ˆã³[OpenMetricsçµ±åˆ](https://docs.datadoghq.com/integrations/openmetrics/)を使用ã—ã¦ã€ClickHouse Cloudエンドãƒã‚¤ãƒ³ãƒˆã‹ã‚‰ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’åŽé›†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã¯ã€ã“ã®ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã¨çµ±åˆã®ãŸã‚ã®ç°¡å˜ãªè¨­å®šä¾‹ã§ã™ã€‚ãŸã ã—ã€æœ€ã‚‚関心ãŒã‚るメトリクスã®ã¿ã‚’é¸æŠžã—ãŸã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。以下ã®ã‚­ãƒ£ãƒƒãƒã‚ªãƒ¼ãƒ«ã®ä¾‹ã¯ã€å¤šãã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®çµ„ã¿åˆã‚ã›ã‚’エクスãƒãƒ¼ãƒˆã—ã€Datadogã¯ãれをカスタムメトリクスã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ + +```yaml +init_config: + +instances: + - openmetrics_endpoint: 'https://api.clickhouse.cloud/v1/organizations/97a33bdb-4db3-4067-b14f-ce40f621aae1/services/f7fefb6e-41a5-48fa-9f5f-deaaa442d5d8/prometheus' + namespace: 'clickhouse' + metrics: + - '^ClickHouse.*' + username: username + password: password +``` + +
    + +Prometheus Datadog Integration diff --git a/docs/ja/integrations/sql-clients/_category_.yml b/docs/ja/integrations/sql-clients/_category_.yml new file mode 100644 index 00000000000..e69789ad1c0 --- /dev/null +++ b/docs/ja/integrations/sql-clients/_category_.yml @@ -0,0 +1,8 @@ +position: 300 +label: 'SQL clients' +collapsible: true +collapsed: true +link: + type: generated-index + title: SQL clients + slug: /ja/integrations/sql-clients diff --git a/docs/ja/integrations/sql-clients/datagrip.md b/docs/ja/integrations/sql-clients/datagrip.md new file mode 100644 index 00000000000..19cc22fd876 --- /dev/null +++ b/docs/ja/integrations/sql-clients/datagrip.md @@ -0,0 +1,53 @@ +--- +sidebar_label: DataGrip +slug: /ja/integrations/datagrip +description: DataGrip ã¯ã€ClickHouse を標準ã§ã‚µãƒãƒ¼ãƒˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ IDE ã§ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# DataGrip ã‚’ ClickHouse ã«æŽ¥ç¶šã™ã‚‹ + +## DataGrip を開始ã¾ãŸã¯ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ + +DataGrip 㯠https://www.jetbrains.com/datagrip/ ã§å…¥æ‰‹ã§ãã¾ã™ã€‚ + +## 1. 接続情報を集ã‚ã‚‹ + + +## 2. ClickHouse ドライãƒãƒ¼ã‚’ロードã™ã‚‹ + +1. DataGrip ã‚’èµ·å‹•ã—ã€**Data Sources and Drivers** ダイアログ㮠**Data Sources** タブ㧠**+** アイコンをクリックã—ã¾ã™ã€‚ + + ![](@site/docs/ja/integrations/sql-clients/images/datagrip-5.png) + + **ClickHouse** ã‚’é¸æŠžã—ã¾ã™ã€‚ + + :::tip + 接続を確立ã™ã‚‹ã«ã¤ã‚Œã¦é †åºãŒå¤‰ã‚ã‚‹ãŸã‚ã€ClickHouse ãŒãƒªã‚¹ãƒˆã®ä¸€ç•ªä¸Šã«ã¾ã è¡¨ç¤ºã•ã‚Œã¦ã„ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + ::: + + ![](@site/docs/ja/integrations/sql-clients/images/datagrip-6.png) + +- **Drivers** タブã«åˆ‡ã‚Šæ›¿ãˆã¦ ClickHouse ドライãƒãƒ¼ã‚’ロードã—ã¾ã™ã€‚ + + DataGrip ã«ã¯ã€ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã‚µã‚¤ã‚ºã‚’最å°é™ã«æŠ‘ãˆã‚‹ãŸã‚ã«ãƒ‰ãƒ©ã‚¤ãƒãƒ¼ãŒä»˜å±žã—ã¦ã„ã¾ã›ã‚“。**Drivers** タブ㧠**Complete Support** リストã‹ã‚‰ **ClickHouse** ã‚’é¸æŠžã—ã€**+** 記å·ã‚’展開ã—ã¾ã™ã€‚**Provided Driver** オプションã‹ã‚‰ **Latest stable** ドライãƒãƒ¼ã‚’é¸æŠžã—ã¾ã™ã€‚ + + ![](@site/docs/ja/integrations/sql-clients/images/datagrip-1.png) + +## 3. ClickHouse ã«æŽ¥ç¶šã™ã‚‹ + +- データベースã®æŽ¥ç¶šæƒ…報を指定ã—ã€**Test Connection** をクリックã—ã¾ã™ï¼š + + 手順1ã§æŽ¥ç¶šæƒ…報を集ã‚ã¾ã—ãŸã€‚ホスト㮠URLã€ãƒãƒ¼ãƒˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã€ãƒ‘スワードã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åを入力ã—ã€æŽ¥ç¶šã‚’テストã—ã¾ã™ã€‚ + + :::tip + DataGrip ダイアログ㮠**HOST** エントリーã¯å®Ÿéš›ã«ã¯ URL ã§ã™ã€‚以下ã®ç”»åƒã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + JDBC URL 設定ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[ClickHouse JDBC ドライãƒãƒ¼](https://github.com/ClickHouse/clickhouse-java) リãƒã‚¸ãƒˆãƒªã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + ::: + + ![](@site/docs/ja/integrations/sql-clients/images/datagrip-7.png) + +## 詳細情報 + +DataGrip ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€DataGrip ドキュメントをå‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/sql-clients/dbeaver.md b/docs/ja/integrations/sql-clients/dbeaver.md new file mode 100644 index 00000000000..2d5966b6d00 --- /dev/null +++ b/docs/ja/integrations/sql-clients/dbeaver.md @@ -0,0 +1,70 @@ +--- +slug: /ja/integrations/dbeaver +sidebar_label: DBeaver +description: DBeaverã¯ãƒžãƒ«ãƒãƒ—ラットフォームデータベースツールã§ã™ã€‚ +--- + +# DBeaverã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +DBeaverã«ã¯è¤‡æ•°ã®æ供形態ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€[DBeaver Community](https://dbeaver.io/)を使用ã—ã¾ã™ã€‚ã•ã¾ã–ã¾ãªæ供形態ã¨æ©Ÿèƒ½ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](https://dbeaver.com/edition/)ã‚’ã”覧ãã ã•ã„。DBeaverã¯JDBCを使用ã—ã¦ClickHouseã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +:::note +ClickHouseã®`Nullable`カラムã®ã‚µãƒãƒ¼ãƒˆã‚’改善ã™ã‚‹ãŸã‚ã€DBeaverãƒãƒ¼ã‚¸ãƒ§ãƒ³23.1.0以上を使用ã—ã¦ãã ã•ã„。 +::: + +## 1. ClickHouseã®è©³ç´°ã‚’åŽé›†ã™ã‚‹ + +DBeaverã¯JDBCã‚’HTTP(S)経由ã§ä½¿ç”¨ã—ã¦ClickHouseã«æŽ¥ç¶šã—ã¾ã™ã€‚以下ã®æƒ…å ±ãŒå¿…è¦ã§ã™ï¼š + +- エンドãƒã‚¤ãƒ³ãƒˆ +- ãƒãƒ¼ãƒˆç•ªå· +- ユーザーå +- パスワード + +## 2. DBeaverをダウンロードã™ã‚‹ + +DBeaverã¯https://dbeaver.io/download/ ã‹ã‚‰å…¥æ‰‹ã§ãã¾ã™ã€‚ + +## 3. データベースを追加ã™ã‚‹ + +- **Database > New Database Connection** メニューã¾ãŸã¯ **Database Navigator** 内㮠**New Database Connection** アイコンを使用ã—ã¦ã€**Connect to a database** ダイアログを表示ã—ã¾ã™ï¼š + +![Add a new database](./images/dbeaver-add-database.png) + +- **Analytical**ã‚’é¸æŠžã—ã€ç¶šã‘ã¦**ClickHouse**ã‚’é¸æŠžã—ã¾ã™ï¼š + +- JDBC URLを構築ã—ã¾ã™ã€‚**Main**タブã§ãƒ›ã‚¹ãƒˆã€ãƒãƒ¼ãƒˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã€ãƒ‘スワードã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’設定ã—ã¾ã™ï¼š + +![Set the hostname, port, user, password, and database name](./images/dbeaver-host-port.png) + +- デフォルトã§ã¯ã€**SSL > Use SSL**プロパティã¯æœªè¨­å®šã«ãªã£ã¦ã„ã¾ã™ã€‚ClickHouse Cloudã‚„HTTPãƒãƒ¼ãƒˆã§SSLã‚’è¦æ±‚ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹å ´åˆã¯ã€**SSL > Use SSL**をオンã«ã—ã¾ã™ï¼š + +![Enable SSL if required](./images/dbeaver-use-ssl.png) + +- 接続をテストã—ã¾ã™ï¼š + +![Test the connection](./images/dbeaver-test-connection.png) + +ã‚‚ã—DBeaverãŒClickHouseドライãƒãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ãªã„ã¨æ¤œå‡ºã—ãŸå ´åˆã€ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã‚’案内ã—ã¾ã™ï¼š + +![Download the ClickHouse driver](./images/dbeaver-download-driver.png) + +- ドライãƒã‚’ダウンロードã—ãŸå¾Œã€å†åº¦**Test**接続を行ã„ã¾ã™ï¼š + +![Test the connection](./images/dbeaver-test-connection.png) + +## 4. ClickHouseã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ + +クエリエディタを開ã„ã¦ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ + +- 接続をå³ã‚¯ãƒªãƒƒã‚¯ã—ã¦**SQL Editor > Open SQL Script**ã‚’é¸ã³ã€ã‚¯ã‚¨ãƒªã‚¨ãƒ‡ã‚£ã‚¿ã‚’é–‹ãã¾ã™ï¼š + +![Open the SQL editor](./images/dbeaver-sql-editor.png) + +- `system.query_log`ã«å¯¾ã™ã‚‹ä¾‹ã®ã‚¯ã‚¨ãƒªï¼š + + ![A sample query](./images/dbeaver-query-log-select.png) + +## 次ã®ã‚¹ãƒ†ãƒƒãƒ— + +DBeaverã®æ©Ÿèƒ½ã«ã¤ã„ã¦å­¦ã¶ã«ã¯[DBeaver wiki](https://github.com/dbeaver/dbeaver/wiki)ã‚’ã€ClickHouseã®æ©Ÿèƒ½ã«ã¤ã„ã¦å­¦ã¶ã«ã¯[ClickHouseã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://clickhouse.com/docs)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/integrations/sql-clients/dbvisualizer.md b/docs/ja/integrations/sql-clients/dbvisualizer.md new file mode 100644 index 00000000000..2890db8f59a --- /dev/null +++ b/docs/ja/integrations/sql-clients/dbvisualizer.md @@ -0,0 +1,49 @@ +--- +sidebar_label: DbVisualizer +slug: /ja/integrations/dbvisualizer +description: DbVisualizerã¯ClickHouseã«å¯¾ã™ã‚‹æ‹¡å¼µã‚µãƒãƒ¼ãƒˆã‚’å‚™ãˆãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ„ールã§ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +# DbVisualizerã‚’ClickHouseã«æŽ¥ç¶š + +## DbVisualizerã®é–‹å§‹ã¾ãŸã¯ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ + +DbVisualizer㯠https://www.dbvis.com/download/ ã§å…¥æ‰‹å¯èƒ½ã§ã™ã€‚ + +## 1. 接続詳細を集ã‚ã‚‹ + + + +## 2. 組ã¿è¾¼ã¿JDBCドライãƒç®¡ç† + +DbVisualizerã«ã¯ã€ClickHouse用ã®æœ€æ–°ã®JDBCドライãƒãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚最新ã®ãƒªãƒªãƒ¼ã‚¹ã‚„éŽåŽ»ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¸ã®å®Œå…¨ãªJDBCドライãƒç®¡ç†ãŒçµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +![](@site/docs/ja/integrations/sql-clients/images/dbvisualizer-driver-manager.png) + +## 3. ClickHouseã«æŽ¥ç¶š + +DbVisualizerã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã€ã¾ãšãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹æŽ¥ç¶šã‚’作æˆã—設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +1. **Database->Create Database Connection**ã‹ã‚‰æ–°ã—ã„接続を作æˆã—ã€ãƒãƒƒãƒ—アップメニューã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‰ãƒ©ã‚¤ãƒã‚’é¸ã³ã¾ã™ã€‚ + +2. æ–°ã—ã„接続ã®ãŸã‚ã®**Object View**タブãŒé–‹ã‹ã‚Œã¾ã™ã€‚ + +3. **Name**フィールドã«æŽ¥ç¶šã®åå‰ã‚’入力ã—ã€ã‚ªãƒ—ションã§**Notes**フィールドã«æŽ¥ç¶šã®èª¬æ˜Žã‚’入力ã—ã¾ã™ã€‚ + +4. **Database Type**ã¯**Auto Detect**ã®ã¾ã¾ã«ã—ã¦ãŠãã¾ã™ã€‚ + +5. **Driver Type**内ã§é¸æŠžã—ãŸãƒ‰ãƒ©ã‚¤ãƒã«ç·‘ã®ãƒã‚§ãƒƒã‚¯ãƒžãƒ¼ã‚¯ãŒä»˜ã„ã¦ã„ã‚‹å ´åˆã€ãã‚Œã¯ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ç·‘ã®ãƒã‚§ãƒƒã‚¯ãƒžãƒ¼ã‚¯ãŒä»˜ã„ã¦ã„ãªã„å ´åˆã¯ã€**Driver Manager**ã§ãƒ‰ãƒ©ã‚¤ãƒã‚’構æˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +6. 残りã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚µãƒ¼ãƒãƒ¼ã®æƒ…報を入力ã—ã¾ã™ã€‚ + +7. **Ping Server**ボタンをクリックã—ã¦ã€æŒ‡å®šã•ã‚ŒãŸã‚¢ãƒ‰ãƒ¬ã‚¹ã¨ãƒãƒ¼ãƒˆã«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶šã‚’確立ã§ãã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +8. Ping Serverã®çµæžœãŒã‚µãƒ¼ãƒãƒ¼ã«åˆ°é”ã§ãã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã‚‹å ´åˆã¯ã€**Connect**をクリックã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +:::tip +データベースã¸ã®æŽ¥ç¶šã«å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€[Fixing Connection Issues](https://confluence.dbvis.com/display/UG231/Fixing+Connection+Issues)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 詳細情報 + +DbVisualizerã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[DbVisualizer ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://confluence.dbvis.com/display/UG231/Users+Guide)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/sql-clients/images/credentials-and-endpoint.png b/docs/ja/integrations/sql-clients/images/credentials-and-endpoint.png new file mode 100644 index 00000000000..6e34d348505 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/credentials-and-endpoint.png differ diff --git a/docs/ja/integrations/sql-clients/images/datagrip-1.png b/docs/ja/integrations/sql-clients/images/datagrip-1.png new file mode 100644 index 00000000000..db671163a5a Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/datagrip-1.png differ diff --git a/docs/ja/integrations/sql-clients/images/datagrip-2.png b/docs/ja/integrations/sql-clients/images/datagrip-2.png new file mode 100644 index 00000000000..e46de6f229f Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/datagrip-2.png differ diff --git a/docs/ja/integrations/sql-clients/images/datagrip-3.png b/docs/ja/integrations/sql-clients/images/datagrip-3.png new file mode 100644 index 00000000000..c99fa6ed34e Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/datagrip-3.png differ diff --git a/docs/ja/integrations/sql-clients/images/datagrip-4.png b/docs/ja/integrations/sql-clients/images/datagrip-4.png new file mode 100644 index 00000000000..0ce6be5f35a Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/datagrip-4.png differ diff --git a/docs/ja/integrations/sql-clients/images/datagrip-5.png b/docs/ja/integrations/sql-clients/images/datagrip-5.png new file mode 100644 index 00000000000..dd8edfb7afb Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/datagrip-5.png differ diff --git a/docs/ja/integrations/sql-clients/images/datagrip-6.png b/docs/ja/integrations/sql-clients/images/datagrip-6.png new file mode 100644 index 00000000000..a51e34f6f0b Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/datagrip-6.png differ diff --git a/docs/ja/integrations/sql-clients/images/datagrip-7.png b/docs/ja/integrations/sql-clients/images/datagrip-7.png new file mode 100644 index 00000000000..f30d7414d08 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/datagrip-7.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbeaver-add-database.png b/docs/ja/integrations/sql-clients/images/dbeaver-add-database.png new file mode 100644 index 00000000000..629bc272b76 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbeaver-add-database.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbeaver-connect-to-a-database.png b/docs/ja/integrations/sql-clients/images/dbeaver-connect-to-a-database.png new file mode 100644 index 00000000000..5268926e997 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbeaver-connect-to-a-database.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbeaver-connection-details-blank.png b/docs/ja/integrations/sql-clients/images/dbeaver-connection-details-blank.png new file mode 100644 index 00000000000..d3df12a39e9 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbeaver-connection-details-blank.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbeaver-download-driver.png b/docs/ja/integrations/sql-clients/images/dbeaver-download-driver.png new file mode 100644 index 00000000000..217e7c1dbcc Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbeaver-download-driver.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbeaver-endpoint-details-test.png b/docs/ja/integrations/sql-clients/images/dbeaver-endpoint-details-test.png new file mode 100644 index 00000000000..01f6e70286c Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbeaver-endpoint-details-test.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbeaver-host-port.png b/docs/ja/integrations/sql-clients/images/dbeaver-host-port.png new file mode 100644 index 00000000000..94d84f0ff94 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbeaver-host-port.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbeaver-query-log-select.png b/docs/ja/integrations/sql-clients/images/dbeaver-query-log-select.png new file mode 100644 index 00000000000..5143fcc1127 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbeaver-query-log-select.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbeaver-set-ssl-true.png b/docs/ja/integrations/sql-clients/images/dbeaver-set-ssl-true.png new file mode 100644 index 00000000000..97f850f0a82 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbeaver-set-ssl-true.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbeaver-sql-editor.png b/docs/ja/integrations/sql-clients/images/dbeaver-sql-editor.png new file mode 100644 index 00000000000..8963183f498 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbeaver-sql-editor.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbeaver-test-connection.png b/docs/ja/integrations/sql-clients/images/dbeaver-test-connection.png new file mode 100644 index 00000000000..208ea5cf26c Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbeaver-test-connection.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbeaver-use-ssl.png b/docs/ja/integrations/sql-clients/images/dbeaver-use-ssl.png new file mode 100644 index 00000000000..a3ab9a9b192 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbeaver-use-ssl.png differ diff --git a/docs/ja/integrations/sql-clients/images/dbvisualizer-driver-manager.png b/docs/ja/integrations/sql-clients/images/dbvisualizer-driver-manager.png new file mode 100644 index 00000000000..03c5df28acb Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/dbvisualizer-driver-manager.png differ diff --git a/docs/ja/integrations/sql-clients/images/jupysql-plot-1.png b/docs/ja/integrations/sql-clients/images/jupysql-plot-1.png new file mode 100644 index 00000000000..477b7c2834a Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/jupysql-plot-1.png differ diff --git a/docs/ja/integrations/sql-clients/images/jupysql-plot-2.png b/docs/ja/integrations/sql-clients/images/jupysql-plot-2.png new file mode 100644 index 00000000000..f850c67a4a5 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/jupysql-plot-2.png differ diff --git a/docs/ja/integrations/sql-clients/images/qstudio-add-connection.png b/docs/ja/integrations/sql-clients/images/qstudio-add-connection.png new file mode 100644 index 00000000000..71f01e97f35 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/qstudio-add-connection.png differ diff --git a/docs/ja/integrations/sql-clients/images/qstudio-running-query.png b/docs/ja/integrations/sql-clients/images/qstudio-running-query.png new file mode 100644 index 00000000000..ea35291a640 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/qstudio-running-query.png differ diff --git a/docs/ja/integrations/sql-clients/images/tablum-ch-0.png b/docs/ja/integrations/sql-clients/images/tablum-ch-0.png new file mode 100644 index 00000000000..e813098736f Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/tablum-ch-0.png differ diff --git a/docs/ja/integrations/sql-clients/images/tablum-ch-1.png b/docs/ja/integrations/sql-clients/images/tablum-ch-1.png new file mode 100644 index 00000000000..bae9f90579b Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/tablum-ch-1.png differ diff --git a/docs/ja/integrations/sql-clients/images/tablum-ch-2.png b/docs/ja/integrations/sql-clients/images/tablum-ch-2.png new file mode 100644 index 00000000000..e09ea11d3e5 Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/tablum-ch-2.png differ diff --git a/docs/ja/integrations/sql-clients/images/tablum-ch-3.png b/docs/ja/integrations/sql-clients/images/tablum-ch-3.png new file mode 100644 index 00000000000..d165d77837e Binary files /dev/null and b/docs/ja/integrations/sql-clients/images/tablum-ch-3.png differ diff --git a/docs/ja/integrations/sql-clients/jupysql.md b/docs/ja/integrations/sql-clients/jupysql.md new file mode 100644 index 00000000000..38702438008 --- /dev/null +++ b/docs/ja/integrations/sql-clients/jupysql.md @@ -0,0 +1,430 @@ +--- +slug: /ja/integrations/jupysql +sidebar_label: Jupyter notebooks +description: Jupysqlã¯Jupyterå‘ã‘ã®ãƒžãƒ«ãƒãƒ—ラットフォームデータベースツールã§ã™ã€‚ +--- + +# ClickHouseã§JupySQLを使用ã™ã‚‹ +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ClickHouseã¨ã®çµ±åˆã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +Jupysqlを使ã£ã¦ClickHouse上ã§ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚データãŒãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸå¾Œã€SQLプロットã§ãƒ‡ãƒ¼ã‚¿ã‚’å¯è¦–化ã—ã¾ã™ã€‚ + +Jupysqlã¨ClickHouseã®çµ±åˆã¯ã€clickhouse_sqlalchemyライブラリを使用ã™ã‚‹ã“ã¨ã§å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ã“ã®ãƒ©ã‚¤ãƒ–ラリã¯ã€ä¸¡ã‚·ã‚¹ãƒ†ãƒ é–“ã®ã‚³ãƒŸãƒ¥ãƒ‹ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚’容易ã«ã—ã€ClickHouseã«æŽ¥ç¶šã—ã¦SQL方言を渡ã™ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚接続ã•ã‚ŒãŸã‚‰ã€Clickhouseã®ãƒã‚¤ãƒ†ã‚£ãƒ–UIã¾ãŸã¯Jupyterノートブックã‹ã‚‰ç›´æŽ¥SQLクエリを実行ã§ãã¾ã™ã€‚ + +```python +# å¿…è¦ãªãƒ‘ッケージをインストール +%pip install --quiet jupysql clickhouse_sqlalchemy +``` + + 注: æ›´æ–°ã•ã‚ŒãŸãƒ‘ッケージを使用ã™ã‚‹ã«ã¯ã‚«ãƒ¼ãƒãƒ«ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + + + +```python +import pandas as pd +from sklearn_evaluation import plot + +# jupysql Jupyter拡張機能をインãƒãƒ¼ãƒˆã—ã¦SQLã‚»ãƒ«ã‚’ä½œæˆ +%load_ext sql +%config SqlMagic.autocommit=False +``` + +**次ã®æ®µéšŽã«é€²ã‚€ã«ã¯ã€ClickhouseãŒèµ·å‹•ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。ローカル版ã¾ãŸã¯ã‚¯ãƒ©ã‚¦ãƒ‰ç‰ˆã®ã©ã¡ã‚‰ã§ã‚‚利用ã§ãã¾ã™ã€‚** + +**注:** 接続文字列ã¯ã€æŽ¥ç¶šã—よã†ã¨ã—ã¦ã„るインスタンスタイプ(URLã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ãƒ‘スワード)ã«å¿œã˜ã¦èª¿æ•´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ãƒ­ãƒ¼ã‚«ãƒ«ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’使用ã—ã¦ã„ã¾ã™ã€‚詳ã—ãã¯ã€[ã“ã¡ã‚‰ã®ã‚¬ã‚¤ãƒ‰](https://clickhouse.com/docs/ja/getting-started/quick-start)ã‚’ã”覧ãã ã•ã„。 + +```python +%sql clickhouse://default:@localhost:8123/default +``` + +```sql +%%sql +CREATE TABLE trips +( + `trip_id` UInt32, + `vendor_id` Enum8('1' = 1, '2' = 2, '3' = 3, '4' = 4, 'CMT' = 5, 'VTS' = 6, 'DDS' = 7, 'B02512' = 10, 'B02598' = 11, 'B02617' = 12, 'B02682' = 13, 'B02764' = 14, '' = 15), + `pickup_date` Date, + `pickup_datetime` DateTime, + `dropoff_date` Date, + `dropoff_datetime` DateTime, + `store_and_fwd_flag` UInt8, + `rate_code_id` UInt8, + `pickup_longitude` Float64, + `pickup_latitude` Float64, + `dropoff_longitude` Float64, + `dropoff_latitude` Float64, + `passenger_count` UInt8, + `trip_distance` Float64, + `fare_amount` Float32, + `extra` Float32, + `mta_tax` Float32, + `tip_amount` Float32, + `tolls_amount` Float32, + `ehail_fee` Float32, + `improvement_surcharge` Float32, + `total_amount` Float32, + `payment_type` Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4), + `trip_type` UInt8, + `pickup` FixedString(25), + `dropoff` FixedString(25), + `cab_type` Enum8('yellow' = 1, 'green' = 2, 'uber' = 3), + `pickup_nyct2010_gid` Int8, + `pickup_ctlabel` Float32, + `pickup_borocode` Int8, + `pickup_ct2010` String, + `pickup_boroct2010` String, + `pickup_cdeligibil` String, + `pickup_ntacode` FixedString(4), + `pickup_ntaname` String, + `pickup_puma` UInt16, + `dropoff_nyct2010_gid` UInt8, + `dropoff_ctlabel` Float32, + `dropoff_borocode` UInt8, + `dropoff_ct2010` String, + `dropoff_boroct2010` String, + `dropoff_cdeligibil` String, + `dropoff_ntacode` FixedString(4), + `dropoff_ntaname` String, + `dropoff_puma` UInt16 +) +ENGINE = MergeTree +PARTITION BY toYYYYMM(pickup_date) +ORDER BY pickup_datetime; +``` + + * clickhouse://default:***@localhost:8123/default + Done. + + + + + +
    + + +
    + + + + +```sql +%%sql +INSERT INTO trips +SELECT * FROM s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_{1..2}.gz', + 'TabSeparatedWithNames', " + `trip_id` UInt32, + `vendor_id` Enum8('1' = 1, '2' = 2, '3' = 3, '4' = 4, 'CMT' = 5, 'VTS' = 6, 'DDS' = 7, 'B02512' = 10, 'B02598' = 11, 'B02617' = 12, 'B02682' = 13, 'B02764' = 14, '' = 15), + `pickup_date` Date, + `pickup_datetime` DateTime, + `dropoff_date` Date, + `dropoff_datetime` DateTime, + `store_and_fwd_flag` UInt8, + `rate_code_id` UInt8, + `pickup_longitude` Float64, + `pickup_latitude` Float64, + `dropoff_longitude` Float64, + `dropoff_latitude` Float64, + `passenger_count` UInt8, + `trip_distance` Float64, + `fare_amount` Float32, + `extra` Float32, + `mta_tax` Float32, + `tip_amount` Float32, + `tolls_amount` Float32, + `ehail_fee` Float32, + `improvement_surcharge` Float32, + `total_amount` Float32, + `payment_type` Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4), + `trip_type` UInt8, + `pickup` FixedString(25), + `dropoff` FixedString(25), + `cab_type` Enum8('yellow' = 1, 'green' = 2, 'uber' = 3), + `pickup_nyct2010_gid` Int8, + `pickup_ctlabel` Float32, + `pickup_borocode` Int8, + `pickup_ct2010` String, + `pickup_boroct2010` String, + `pickup_cdeligibil` String, + `pickup_ntacode` FixedString(4), + `pickup_ntaname` String, + `pickup_puma` UInt16, + `dropoff_nyct2010_gid` UInt8, + `dropoff_ctlabel` Float32, + `dropoff_borocode` UInt8, + `dropoff_ct2010` String, + `dropoff_boroct2010` String, + `dropoff_cdeligibil` String, + `dropoff_ntacode` FixedString(4), + `dropoff_ntaname` String, + `dropoff_puma` UInt16 +") SETTINGS input_format_try_infer_datetimes = 0 +``` + + * clickhouse://default:***@localhost:8123/default + Done. + + + + + + + + +
    + + + + +```python +%sql SELECT count() FROM trips limit 5; +``` + + * clickhouse://default:***@localhost:8123/default + Done. + + + + + + + + + + + + +
    count()
    1999657
    + + + + +```python +%sql SELECT DISTINCT(pickup_ntaname) FROM trips limit 5; +``` + + * clickhouse://default:***@localhost:8123/default + Done. + + + + + + + + + + + + + + + + + + + + + + + + +
    pickup_ntaname
    Morningside Heights
    Hudson Yards-Chelsea-Flatiron-Union Square
    Midtown-Midtown South
    SoHo-TriBeCa-Civic Center-Little Italy
    Murray Hill-Kips Bay
    + + + + +```python +%sql SELECT round(avg(tip_amount), 2) FROM trips +``` + + * clickhouse://default:***@localhost:8123/default + Done. + + + + + + + + + + + + +
    round(avg(tip_amount), 2)
    1.68
    + + + + +```sql +%%sql +SELECT + passenger_count, + ceil(avg(total_amount),2) AS average_total_amount +FROM trips +GROUP BY passenger_count +``` + + * clickhouse://default:***@localhost:8123/default + Done. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    passenger_countaverage_total_amount
    022.69
    115.97
    217.15
    316.76
    417.33
    516.35
    616.04
    759.8
    836.41
    99.81
    + + + + +```sql +%%sql +SELECT + pickup_date, + pickup_ntaname, + SUM(1) AS number_of_trips +FROM trips +GROUP BY pickup_date, pickup_ntaname +ORDER BY pickup_date ASC +limit 5; +``` + + * clickhouse://default:***@localhost:8123/default + Done. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    pickup_datepickup_ntanamenumber_of_trips
    2015-07-01Bushwick North2
    2015-07-01Brighton Beach1
    2015-07-01Briarwood-Jamaica Hills3
    2015-07-01Williamsburg1
    2015-07-01Queensbridge-Ravenswood-Long Island City9
    + + + + +```python +# %sql DESCRIBE trips; +``` + + +```python +# %sql SELECT DISTINCT(trip_distance) FROM trips limit 50; +``` + + +```sql +%%sql --save short-trips --no-execute +SELECT * +FROM trips +WHERE trip_distance < 6.3 +``` + + * clickhouse://default:***@localhost:8123/default + Skipping execution... + + + +```python +%sqlplot histogram --table short-trips --column trip_distance --bins 10 --with short-trips +``` + + + + + + + + + + +![histogram example](images/jupysql-plot-1.png) + + + + +```python +ax = %sqlplot histogram --table short-trips --column trip_distance --bins 50 --with short-trips +ax.grid() +ax.set_title("Trip distance from trips < 6.3") +_ = ax.set_xlabel("Trip distance") +``` + + + +![histogram second example](images/jupysql-plot-1.png) diff --git a/docs/ja/integrations/sql-clients/qstudio.md b/docs/ja/integrations/sql-clients/qstudio.md new file mode 100644 index 00000000000..e67232e24e1 --- /dev/null +++ b/docs/ja/integrations/sql-clients/qstudio.md @@ -0,0 +1,58 @@ +--- +slug: /ja/integrations/qstudio +sidebar_label: qStudio +description: qStudioã¯ç„¡æ–™ã®SQLツールã§ã™ã€‚ +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_http.mdx'; + +qStudioã¯ç„¡æ–™ã®SQL GUIã§ã€SQLスクリプトã®å®Ÿè¡Œã€ãƒ†ãƒ¼ãƒ–ルã®ç°¡å˜ãªãƒ–ラウジングã€çµæžœã®ã‚°ãƒ©ãƒ•åŒ–やエクスãƒãƒ¼ãƒˆãŒå¯èƒ½ã§ã™ã€‚ã™ã¹ã¦ã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã§ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§å‹•ä½œã—ã¾ã™ã€‚ + +# qStudioã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +qStudioã¯JDBCを使用ã—ã¦ClickHouseã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +## 1. ClickHouseã®è©³ç´°æƒ…報をåŽé›†ã™ã‚‹ + +qStudioã¯JDBC over HTTP(S)を使ã£ã¦ClickHouseã«æŽ¥ç¶šã—ã¾ã™ã€‚å¿…è¦ãªæƒ…å ±ã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +- エンドãƒã‚¤ãƒ³ãƒˆ +- ãƒãƒ¼ãƒˆç•ªå· +- ユーザーå +- パスワード + + + +## 2. qStudioをダウンロードã™ã‚‹ + +qStudioã¯https://www.timestored.com/qstudio/download/ ã§å…¥æ‰‹å¯èƒ½ã§ã™ã€‚ + +## 3. データベースを追加ã™ã‚‹ + +- qStudioã‚’åˆã‚ã¦é–‹ãã¨ãã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚ªãƒ—ションã®**Server->Add Server**やツールãƒãƒ¼ã®ã‚µãƒ¼ãƒãƒ¼è¿½åŠ ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãã ã•ã„。 +- 次ã«è©³ç´°ã‚’設定ã—ã¾ã™ï¼š + +![æ–°ã—ã„データベースを設定ã™ã‚‹](./images/qstudio-add-connection.png) + +1. サーãƒãƒ¼ã‚¿ã‚¤ãƒ—: Clickhouse.com +2. ホストã«ã¯**https://**ã‚’å¿…ãšå«ã‚ã¦ãã ã•ã„。 + ホスト: https://abc.def.clickhouse.cloud + ãƒãƒ¼ãƒˆ: 8443 +3. ユーザーå: default + パスワード: XXXXXXXXXXX +4. 「追加ã€ã‚’クリック + +qStudioãŒClickHouse JDBCドライãƒãƒ¼ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ãªã„ã¨åˆ¤æ–­ã—ãŸå ´åˆã¯ã€ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã‚’促ã—ã¾ã™ï¼š + +## 4. ClickHouseã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ + +- クエリエディタを開ã„ã¦ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚クエリã¯æ¬¡ã®æ–¹æ³•ã§å®Ÿè¡Œã§ãã¾ã™ï¼š +- Ctrl + e - ãƒã‚¤ãƒ©ã‚¤ãƒˆã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’実行 +- Ctrl + Enter - ç¾åœ¨ã®è¡Œã‚’実行 + +- クエリã®ä¾‹ï¼š + + ![サンプルクエリ](./images/qstudio-running-query.png) + +## 次ã®ã‚¹ãƒ†ãƒƒãƒ— + +QStudioã®æ©Ÿèƒ½ã«ã¤ã„ã¦ã¯[QStudio](https://www.timestored.com/qstudio)ã‚’å‚ç…§ã—ã€ClickHouseã®æ©Ÿèƒ½ã«ã¤ã„ã¦ã¯[ClickHouseã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://clickhouse.com/docs)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/integrations/sql-clients/sql-console.md b/docs/ja/integrations/sql-clients/sql-console.md new file mode 100644 index 00000000000..4a3ac421631 --- /dev/null +++ b/docs/ja/integrations/sql-clients/sql-console.md @@ -0,0 +1,365 @@ +--- +sidebar_label: SQLコンソール +sidebar_position: 1 +--- + +# SQLコンソール + +SQLコンソールã¯ã€ClickHouse Cloudã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’探索ã—クエリを実行ã™ã‚‹æœ€é€Ÿã‹ã¤æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã§ã™ã€‚SQLコンソールã§ã¯ä»¥ä¸‹ã®ã“ã¨ãŒã§ãã¾ã™ï¼š +- ClickHouse Cloudサービスã¸ã®æŽ¥ç¶š +- テーブルデータã®è¡¨ç¤ºã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã€ä¸¦ã³æ›¿ãˆ +- クエリã®å®Ÿè¡Œã¨çµæžœãƒ‡ãƒ¼ã‚¿ã®æ•°ã‚¯ãƒªãƒƒã‚¯ã§ã®è¦–覚化 +- クエリをãƒãƒ¼ãƒ ãƒ¡ãƒ³ãƒãƒ¼ã¨å…±æœ‰ã—ã€ã‚ˆã‚ŠåŠ¹æžœçš„ã«ã‚³ãƒ©ãƒœãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ + +## コントロールプレーンã‹ã‚‰SQLコンソールを開ã + +SQLコンソールã¯ã€ã‚µãƒ¼ãƒ“スã®æ¦‚è¦ç”»é¢ã‹ã‚‰ç›´æŽ¥é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚「接続ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã€ã€ŒSQLコンソールを開ãã€ã‚’é¸æŠžã—ã¦ãã ã•ã„。 + + ![サービスã‹ã‚‰SQLコンソールを開ã](@site/docs/ja/cloud/images/sqlconsole/open-sql-console-from-service.png) + +SQLコンソールã¯æ–°ã—ã„タブã§é–‹ãã€ã‚µãƒ¼ãƒ“スã®èªè¨¼æƒ…報を入力ã™ã‚‹ã‚ˆã†ä¿ƒã•ã‚Œã¾ã™ï¼š + + ![èªè¨¼æƒ…報を入力](@site/docs/ja/cloud/images/sqlconsole/enter-credentials.png) + +èªè¨¼æƒ…報を入力ã—ãŸå¾Œã€ã€ŒæŽ¥ç¶šã€ã‚’クリックã™ã‚‹ã¨ã€SQLコンソールã¯æŽ¥ç¶šã¨èªè¨¼ã‚’試ã¿ã¾ã™ã€‚æˆåŠŸã™ã‚‹ã¨ã€SQLコンソールã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + + ![èªè¨¼æˆåŠŸ](@site/docs/ja/cloud/images/sqlconsole/authentication-success.png) + +### SQLコンソールを直接読ã¿è¾¼ã‚€ + +SQLコンソールã¯ã€https://console.clickhouse.cloud ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦ç›´æŽ¥èª­ã¿è¾¼ã‚€ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ClickHouse Cloudアカウントã«ãƒ­ã‚°ã‚¤ãƒ³ã—ãŸå¾Œã€ã‚µãƒ¼ãƒ“スã®ä¸€è¦§ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚1ã¤é¸æŠžã—ã€ã‚µãƒ¼ãƒ“スèªè¨¼ç”»é¢ã§èªè¨¼æƒ…報を入力ã—ã¦ãã ã•ã„: + + ![サービスをé¸æŠž](@site/docs/ja/cloud/images/sqlconsole/select-a-service.png) + +:::note +組織ã«ã‚µãƒ¼ãƒ“スãŒ1ã¤ã—ã‹å­˜åœ¨ã—ãªã„å ´åˆã€SQLコンソールã¯ç›´ã¡ã«ã‚µãƒ¼ãƒ“スèªè¨¼ç”»é¢ã«ç§»å‹•ã—ã¾ã™ã€‚ +::: + +### サービススイッãƒãƒ£ãƒ¼ã‚’使用ã™ã‚‹ + +SQLコンソールã‹ã‚‰ç›´æŽ¥ã‚µãƒ¼ãƒ“スを簡å˜ã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚コンソールã®å³ä¸Šéš…ã«ã‚るサービススイッãƒãƒ£ãƒ¼ã‚’é–‹ãã€åˆ¥ã®ã‚µãƒ¼ãƒ“スをé¸æŠžã—ã¦ãã ã•ã„: + + ![サービスを切り替ãˆã‚‹](@site/docs/ja/cloud/images/sqlconsole/switch-services.png) + +## テーブルã®æŽ¢ç´¢ + +### テーブルリストã¨ã‚¹ã‚­ãƒ¼ãƒžæƒ…å ±ã®è¡¨ç¤º +ClickHouseインスタンス内ã®ãƒ†ãƒ¼ãƒ–ルã®æ¦‚è¦ã¯ã€å·¦ã®ã‚µã‚¤ãƒ‰ãƒãƒ¼ã‚¨ãƒªã‚¢ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚左上ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’使用ã—ã¦ã€ç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ãƒ†ãƒ¼ãƒ–ルを表示ã—ã¾ã™ + + ![テーブルリストã¨ã‚¹ã‚­ãƒ¼ãƒž](@site/docs/ja/cloud/images/sqlconsole/table-list-and-schema.png) + +リスト内ã®ãƒ†ãƒ¼ãƒ–ルã¯å±•é–‹ã—ã¦ã€ã‚«ãƒ©ãƒ ã¨ã‚¿ã‚¤ãƒ—を確èªã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ + + ![カラムã®è¡¨ç¤º](@site/docs/ja/cloud/images/sqlconsole/view-columns.png) + +### テーブルデータã®æŽ¢ç´¢ + +リスト内ã®ãƒ†ãƒ¼ãƒ–ルをクリックã™ã‚‹ã¨ã€æ–°ã—ã„タブã§é–‹ãã¾ã™ã€‚テーブルビューã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’ç°¡å˜ã«è¡¨ç¤ºã€é¸æŠžã€ã‚³ãƒ”ーã§ãã¾ã™ã€‚Microsoft Excelã‚„Google Sheetsã®ã‚ˆã†ãªã‚¹ãƒ—レッドシートアプリケーションã«ã‚³ãƒ”ー&ペーストã™ã‚‹éš›ã‚‚ã€æ§‹é€ ã¨ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ç¶­æŒã•ã‚Œã¾ã™ã€‚テーブルデータã®ãƒšãƒ¼ã‚¸ã‚’フリップã™ã‚‹ï¼ˆ30è¡Œå˜ä½ã§ãƒšãƒ¼ã‚¸ãƒãƒ¼ã‚·ãƒ§ãƒ³ã•ã‚Œã¦ã„ã¾ã™ï¼‰éš›ã¯ã€ãƒ•ãƒƒã‚¿ã®ãƒŠãƒ“ゲーションを使用ã—ã¦ãã ã•ã„。 + + ![abc](@site/docs/ja/cloud/images/sqlconsole/abc.png) + +### セルデータã®æ¤œæŸ» +セルインスペクターツールを使用ã—ã¦ã€1ã¤ã®ã‚»ãƒ«ã«å«ã¾ã‚Œã‚‹å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’表示ã§ãã¾ã™ã€‚セルをå³ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã€Œã‚»ãƒ«ã‚’検査ã€ã‚’é¸æŠžã™ã‚‹ã“ã¨ã§é–‹ã‘ã¾ã™ã€‚セルインスペクタã®å†…容ã¯ã€ä¸Šéƒ¨å³éš…ã®ã‚³ãƒ”ーアイコンをクリックã™ã‚‹ã“ã¨ã§ã‚³ãƒ”ーã§ãã¾ã™ã€‚ + + ![セルコンテンツã®æ¤œæŸ»](@site/docs/ja/cloud/images/sqlconsole/inspecting-cell-content.png) + +## テーブルã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¨ã‚½ãƒ¼ãƒˆ + +### テーブルã®ã‚½ãƒ¼ãƒˆ +SQLコンソールã§ãƒ†ãƒ¼ãƒ–ルをソートã™ã‚‹ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルを開ãã€ãƒ„ールãƒãƒ¼ã§ã€Œã‚½ãƒ¼ãƒˆã€ãƒœã‚¿ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€ã‚½ãƒ¼ãƒˆã‚’構æˆã™ã‚‹ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãŒé–‹ãã¾ã™ã€‚ソートã™ã‚‹ã‚«ãƒ©ãƒ ã‚’é¸æŠžã—ã€ã‚½ãƒ¼ãƒˆé †ï¼ˆæ˜‡é †ã¾ãŸã¯é™é †ï¼‰ã‚’構æˆã§ãã¾ã™ã€‚「é©ç”¨ã€ã‚’é¸æŠžã™ã‚‹ã‹Enterキーを押ã—ã¦ãƒ†ãƒ¼ãƒ–ルをソートã—ã¾ã™ + + ![カラムã§é™é †ã«ã‚½ãƒ¼ãƒˆ](@site/docs/ja/cloud/images/sqlconsole/sort-descending-on-column.png) + +SQLコンソールã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルã«è¤‡æ•°ã®ã‚½ãƒ¼ãƒˆã‚’追加ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚å†åº¦ã€Œã‚½ãƒ¼ãƒˆã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦åˆ¥ã®ã‚½ãƒ¼ãƒˆã‚’追加ã—ã¾ã™ã€‚注æ„:ソートã¯ã€ã‚½ãƒ¼ãƒˆãƒšã‚¤ãƒ³ã«è¡¨ç¤ºã•ã‚Œã‚‹é †ï¼ˆä¸Šã‹ã‚‰ä¸‹ï¼‰ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ソートを削除ã™ã‚‹ã«ã¯ã€ã‚½ãƒ¼ãƒˆã®æ¨ªã«ã‚る「xã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚ + +### テーブルã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚° + +SQLコンソールã§ãƒ†ãƒ¼ãƒ–ルをフィルタリングã™ã‚‹ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルを開ã「フィルタã€ãƒœã‚¿ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€ãƒ•ã‚£ãƒ«ã‚¿ã‚’構æˆã™ã‚‹ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãŒé–‹ãã¾ã™ã€‚フィルタリングã™ã‚‹ã‚«ãƒ©ãƒ ã¨å¿…è¦ãªæ¡ä»¶ã‚’é¸æŠžã—ã¾ã™ã€‚SQLコンソールã¯ã‚«ãƒ©ãƒ ã«å«ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®ã‚¿ã‚¤ãƒ—ã«å¿œã˜ãŸãƒ•ã‚£ãƒ«ã‚¿ã‚ªãƒ—ションをインテリジェントã«è¡¨ç¤ºã—ã¾ã™ã€‚ + + ![ラジオカラムãŒGSMã¨ç­‰ã—ã„フィルタ](@site/docs/ja/cloud/images/sqlconsole/filter-on-radio-column-equal-gsm.png) + +フィルタã«æº€è¶³ã—ãŸã‚‰ã€ã€Œé©ç”¨ã€ã‚’é¸æŠžã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’フィルタリングã—ã¾ã™ã€‚以下ã®ã‚ˆã†ã«è¿½åŠ ã®ãƒ•ã‚£ãƒ«ã‚¿ã‚’追加ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + ![2000より大ãã„範囲ã§ãƒ•ã‚£ãƒ«ã‚¿ã‚’追加ã™ã‚‹](@site/docs/ja/cloud/images/sqlconsole/add-more-filters.png) + +ソート機能ã¨åŒæ§˜ã«ã€ãƒ•ã‚£ãƒ«ã‚¿ã®æ¨ªã«ã‚る「xã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦å‰Šé™¤ã—ã¾ã™ã€‚ + +### 一緒ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¨ã‚½ãƒ¼ãƒˆ + +SQLコンソールã§ã¯ã€åŒæ™‚ã«ãƒ†ãƒ¼ãƒ–ルã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¨ã‚½ãƒ¼ãƒˆãŒå¯èƒ½ã§ã™ã€‚上記ã®æ‰‹é †ã‚’使用ã—ã¦ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ«ã‚¿ã¨ã‚½ãƒ¼ãƒˆã‚’追加ã—ã€ã€Œé©ç”¨ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãã ã•ã„。 + + ![一緒ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¨ã‚½ãƒ¼ãƒˆ](@site/docs/ja/cloud/images/sqlconsole/filtering-and-sorting-together.png) + +### フィルタã¨ã‚½ãƒ¼ãƒˆã‹ã‚‰ã‚¯ã‚¨ãƒªã‚’ä½œæˆ + +SQLコンソールã¯ã€ä¸€åº¦ã®ã‚¯ãƒªãƒƒã‚¯ã§ã‚½ãƒ¼ãƒˆã¨ãƒ•ã‚£ãƒ«ã‚¿ã‚’クエリã«ç›´æŽ¥å¤‰æ›ã§ãã¾ã™ã€‚ツールãƒãƒ¼ã‹ã‚‰ãŠå¥½ã¿ã®ã‚½ãƒ¼ãƒˆã¨ãƒ•ã‚£ãƒ«ã‚¿ãƒ‘ラメータを使用ã—ã¦ã€Œã‚¯ã‚¨ãƒªã‚’作æˆã€ãƒœã‚¿ãƒ³ã‚’é¸æŠžã™ã‚‹ã ã‘ã§ã™ã€‚「クエリを作æˆã€ã‚’クリックã—ãŸå¾Œã€ãƒ†ãƒ¼ãƒ–ルビューã«å«ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã«å¯¾å¿œã™ã‚‹SQLコマンドãŒäº‹å‰ã«å…¥åŠ›ã•ã‚ŒãŸæ–°ã—ã„クエリタブãŒé–‹ãã¾ã™ã€‚ + + ![ソートã¨ãƒ•ã‚£ãƒ«ã‚¿ã‹ã‚‰ã‚¯ã‚¨ãƒªã‚’作æˆã™ã‚‹](@site/docs/ja/cloud/images/sqlconsole/create-a-query-from-sorts-and-filters.png) + +:::note +「クエリを作æˆã€æ©Ÿèƒ½ã®ä½¿ç”¨æ™‚ã«ãƒ•ã‚£ãƒ«ã‚¿ã¨ã‚½ãƒ¼ãƒˆã¯å¿…é ˆã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +SQLコンソールã§ã®ã‚¯ã‚¨ãƒªã«é–¢ã™ã‚‹è©³ç´°ã¯ã€ï¼ˆãƒªãƒ³ã‚¯ï¼‰ã‚¯ã‚¨ãƒªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ã”覧ãã ã•ã„。 + +## クエリã®ä½œæˆã¨å®Ÿè¡Œ + +### クエリã®ä½œæˆ +SQLコンソールã§æ–°ã—ã„クエリを作æˆã™ã‚‹æ–¹æ³•ã¯2ã¤ã‚ã‚Šã¾ã™ã€‚ +* タブãƒãƒ¼ã®ã€Œ+ã€ãƒœã‚¿ãƒ³ã‚’クリック +* 左サイドãƒãƒ¼ã®ã‚¯ã‚¨ãƒªãƒªã‚¹ãƒˆã‹ã‚‰ã€Œæ–°ã—ã„クエリã€ãƒœã‚¿ãƒ³ã‚’é¸æŠž + + ![クエリã®ä½œæˆ](@site/docs/ja/cloud/images/sqlconsole/creating-a-query.png) + +### クエリã®å®Ÿè¡Œ +クエリを実行ã™ã‚‹ã«ã¯ã€SQLエディタã«SQLコマンドを入力ã—ã€ã€Œå®Ÿè¡Œã€ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã‹ã€ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆ `cmd / ctrl + enter` を使用ã—ã¦ãã ã•ã„。複数ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’順次記述ã—ã¦å®Ÿè¡Œã™ã‚‹ã«ã¯ã€å„コマンドã®å¾Œã«ã‚»ãƒŸã‚³ãƒ­ãƒ³ã‚’追加ã—ã¦ãã ã•ã„。 + +クエリ実行オプション +デフォルトã§ã¯ã€ã€Œå®Ÿè¡Œã€ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨SQLエディタã«å«ã¾ã‚Œã‚‹ã™ã¹ã¦ã®ã‚³ãƒžãƒ³ãƒ‰ãŒå®Ÿè¡Œã•ã‚Œã¾ã™ã€‚SQLコンソールã¯ä»–ã®2ã¤ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚ªãƒ—ションをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š +* é¸æŠžã—ãŸã‚³ãƒžãƒ³ãƒ‰ã‚’実行 +* カーソルã®ã‚ã‚‹ä½ç½®ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行 + +é¸æŠžã—ãŸã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã«ã¯ã€ç›®çš„ã®ã‚³ãƒžãƒ³ãƒ‰ã¾ãŸã¯ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’é¸æŠžã—ã€ã€Œå®Ÿè¡Œã€ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ï¼ˆã¾ãŸã¯ `cmd / ctrl + enter` ショートカットを使用)。é¸æŠžãŒã‚ã‚‹å ´åˆã€SQLエディタã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ï¼ˆã‚¨ãƒ‡ã‚£ã‚¿å†…ã®ä»»æ„ã®å ´æ‰€ã‚’å³ã‚¯ãƒªãƒƒã‚¯ã—ã¦é–‹ã)ã‹ã‚‰ã€Œé¸æŠžã—ãŸã‚‚ã®ã‚’実行ã€ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + ![é¸æŠžã—ãŸã‚¯ã‚¨ãƒªã‚’実行](@site/docs/ja/cloud/images/sqlconsole/run-selected-query.png) + +カーソルã®ç¾åœ¨ä½ç½®ã«ã‚るコマンドを実行ã™ã‚‹ã«ã¯ã€2ã¤ã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™ï¼š +* 拡張実行オプションメニューã‹ã‚‰ã€Œã‚«ãƒ¼ã‚½ãƒ«ä½ç½®ã§å®Ÿè¡Œã€ã‚’é¸æŠžã™ã‚‹ï¼ˆã¾ãŸã¯å¯¾å¿œã™ã‚‹ `cmd / ctrl + shift + enter` キーボードショートカットを使用) + + ![カーソルä½ç½®ã§å®Ÿè¡Œ](@site/docs/ja/cloud/images/sqlconsole/run-at-cursor-2.png) + + * SQLエディタã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ã€Œã‚«ãƒ¼ã‚½ãƒ«ä½ç½®ã§å®Ÿè¡Œã€ã‚’é¸æŠž + + ![カーソルä½ç½®ã§å®Ÿè¡Œ](@site/docs/ja/cloud/images/sqlconsole/run-at-cursor.png) + +:::note +カーソルä½ç½®ã«ã‚るコマンドã¯ã€å®Ÿè¡Œæ™‚ã«é»„色ã§ç‚¹æ»…ã—ã¾ã™ã€‚ +::: + +### クエリã®ã‚­ãƒ£ãƒ³ã‚»ãƒ« + +クエリãŒå®Ÿè¡Œä¸­ã®å ´åˆã€ã‚¯ã‚¨ãƒªã‚¨ãƒ‡ã‚£ã‚¿ã®ãƒ„ールãƒãƒ¼ã®ã€Œå®Ÿè¡Œã€ãƒœã‚¿ãƒ³ã¯ã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€ãƒœã‚¿ãƒ³ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã‹ `Esc` を押ã—ã¦ã‚¯ã‚¨ãƒªã‚’キャンセルã™ã‚‹ã ã‘ã§ã™ã€‚注æ„:キャンセル後も既ã«è¿”ã•ã‚Œã¦ã„ã‚‹çµæžœã¯æŒç¶šã—ã¾ã™ã€‚ + + ![クエリをキャンセル](@site/docs/ja/cloud/images/sqlconsole/cancel-a-query.png) + +### クエリã®ä¿å­˜ + +クエリã«åå‰ãŒä»˜ã‘られã¦ã„ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªã¯ã€Œç„¡é¡Œã‚¯ã‚¨ãƒªã€ã¨å‘¼ã°ã‚Œã‚‹ã¹ãã§ã™ã€‚クエリåをクリックã—ã¦å¤‰æ›´ã—ã¦ãã ã•ã„。クエリã®åå‰ã‚’変更ã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªãŒä¿å­˜ã•ã‚Œã¾ã™ã€‚ + + ![クエリã«åå‰ã‚’付ã‘ã‚‹](@site/docs/ja/cloud/images/sqlconsole/give-a-query-a-name.png) + +ã¾ãŸã€ä¿å­˜ãƒœã‚¿ãƒ³ã¾ãŸã¯ `cmd / ctrl + s` キーボードショートカットを使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’ä¿å­˜ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + ![クエリをä¿å­˜ã™ã‚‹](@site/docs/ja/cloud/images/sqlconsole/save-the-query.png) + +## GenAIを使用ã—ãŸã‚¯ã‚¨ãƒªã®ç®¡ç† + +ã“ã®æ©Ÿèƒ½ã‚’使用ã™ã‚‹ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚¯ã‚¨ãƒªã‚’自然言語ã®è³ªå•å½¢å¼ã§ä½œæˆã—ã€ãã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«åŸºã¥ã„ã¦SQLクエリを生æˆã§ãã¾ã™ã€‚GenAIã¯ã‚¯ã‚¨ãƒªã®ãƒ‡ãƒãƒƒã‚°ã‚‚支æ´ã—ã¾ã™ã€‚ + +GenAIã«é–¢ã™ã‚‹è©³ç´°ã¯ã€[ClickHouse Cloudã®GenAI対応クエリæ案ã®ç™ºè¡¨ãƒ–ログ記事](https://clickhouse.com/blog/announcing-genai-powered-query-suggestions-clickhouse-cloud)ã‚’ã”覧ãã ã•ã„。 + +### テーブルセットアップ + +UK Price Paidã®ä¾‹ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’インãƒãƒ¼ãƒˆã—ã€ãれを使用ã—ã¦GenAIクエリを作æˆã—ã¾ã—ょã†ã€‚ + +1. ClickHouse Cloudサービスを開ã。 +2. *+* アイコンをクリックã—ã¦æ–°ã—ã„クエリを作æˆã€‚ +3. 次ã®ã‚³ãƒ¼ãƒ‰ã‚’貼り付ã‘ã¦å®Ÿè¡Œï¼š + + ```sql + CREATE TABLE uk_price_paid + ( + price UInt32, + date Date, + postcode1 LowCardinality(String), + postcode2 LowCardinality(String), + type Enum8('terraced' = 1, 'semi-detached' = 2, 'detached' = 3, 'flat' = 4, 'other' = 0), + is_new UInt8, + duration Enum8('freehold' = 1, 'leasehold' = 2, 'unknown' = 0), + addr1 String, + addr2 String, + street LowCardinality(String), + locality LowCardinality(String), + town LowCardinality(String), + district LowCardinality(String), + county LowCardinality(String) + ) + ENGINE = MergeTree + ORDER BY (postcode1, postcode2, addr1, addr2); + ``` + + ã“ã®ã‚¯ã‚¨ãƒªã¯ç´„1秒ã§å®Œäº†ã™ã‚‹ã¯ãšã§ã™ã€‚完了ã—ãŸã‚‰ã€`uk_price_paid`ã¨ã„ã†ç©ºã®ãƒ†ãƒ¼ãƒ–ルãŒã§ãã¦ã„ã‚‹ã¯ãšã§ã™ã€‚ + +4. æ–°ã—ã„クエリを作æˆã—ã¦ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’貼り付ã‘ã¦ãã ã•ã„: + + ```sql + INSERT INTO uk_price_paid + WITH + splitByChar(' ', postcode) AS p + SELECT + toUInt32(price_string) AS price, + parseDateTimeBestEffortUS(time) AS date, + p[1] AS postcode1, + p[2] AS postcode2, + transform(a, ['T', 'S', 'D', 'F', 'O'], ['terraced', 'semi-detached', 'detached', 'flat', 'other']) AS type, + b = 'Y' AS is_new, + transform(c, ['F', 'L', 'U'], ['freehold', 'leasehold', 'unknown']) AS duration, + addr1, + addr2, + street, + locality, + town, + district, + county + FROM url( + 'http://prod.publicdata.landregistry.gov.uk.s3-website-eu-west-1.amazonaws.com/pp-complete.csv', + 'CSV', + 'uuid_string String, + price_string String, + time String, + postcode String, + a String, + b String, + c String, + addr1 String, + addr2 String, + street String, + locality String, + town String, + district String, + county String, + d String, + e String' + ) SETTINGS max_http_get_redirects=10; + ``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€`gov.uk` ウェブサイトã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’å–å¾—ã—ã¾ã™ã€‚ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ç´„4GBã®å¤§ãã•ãŒã‚ã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªã®å®Œäº†ã«ã¯æ•°åˆ†ã‹ã‹ã‚Šã¾ã™ã€‚クエリãŒå‡¦ç†ã•ã‚Œã‚‹ã¨ã€`uk_price_paid`テーブル内ã«ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆå…¨ä½“ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã¯ãšã§ã™ã€‚ + +#### ã‚¯ã‚¨ãƒªä½œæˆ + +自然言語を使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’生æˆã—ã¾ã—ょã†ã€‚ + +1. **uk_price_paid** テーブルをé¸æŠžã—ã€**クエリを作æˆ** をクリックã—ã¾ã™ã€‚ +2. **SQLを生æˆ** をクリックã—ã¾ã™ã€‚Chat-GPTã«ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã™ã‚‹ã“ã¨ã«åŒæ„を求ã‚られる場åˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã¯ **åŒæ„ã™ã‚‹** ã¨é¸æŠžã—ã¦ãã ã•ã„。 +3. ã“ã®ãƒ—ロンプトを使用ã—ã¦è‡ªç„¶è¨€èªžã®ã‚¯ã‚¨ãƒªã‚’入力ã—ã€ChatGPTã«SQLクエリã«å¤‰æ›ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚今回ã®ä¾‹ã§ã¯æ¬¡ã®ã‚ˆã†ã«å…¥åŠ›ã—ã¾ã™ï¼š + + > Show me the total price and total number of all uk_price_paid transactions by year. + +4. コンソールã¯æ±‚ã‚ã¦ã„るクエリを生æˆã—ã€æ–°ã—ã„タブã«è¡¨ç¤ºã—ã¾ã™ã€‚今回ã®ä¾‹ã§ã¯ã€GenAIãŒä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’作æˆã—ã¾ã—ãŸï¼š + + ```sql + -- Show me the total price and total number of all uk_price_paid transactions by year. + SELECT year(date), sum(price) as total_price, Count(*) as total_transactions + FROM uk_price_paid + GROUP BY year(date) + ``` + +5. 作æˆã•ã‚ŒãŸã‚¯ã‚¨ãƒªãŒæ­£ã—ã„ã“ã¨ã‚’確èªã—ãŸã‚‰ã€**実行** をクリックã—ã¦å®Ÿè¡Œã—ã¾ã™ã€‚ + +GenAIã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。GenAIã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’任何ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§å®Ÿè¡Œã™ã‚‹éš›ã¯æ³¨æ„ã—ã¦ãã ã•ã„。 + +### デãƒãƒƒã‚° + +次ã«ã€GenAIã®ã‚¯ã‚¨ãƒªãƒ‡ãƒãƒƒã‚°æ©Ÿèƒ½ã‚’テストã—ã¾ã—ょã†ã€‚ + +1. *+* アイコンをクリックã—ã¦æ–°ã—ã„クエリを作æˆã—ã€æ¬¡ã®ã‚³ãƒ¼ãƒ‰ã‚’貼り付ã‘ã¾ã™ï¼š + + ```sql + -- Show me the total price and total number of all uk_price_paid transactions by year. + SELECT year(date), sum(pricee) as total_price, Count(*) as total_transactions + FROM uk_price_paid + GROUP BY year(date) + ``` + +2. **実行** をクリックã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯`pricee`ã‚’å‚ç…§ã—よã†ã¨ã—ã¦ã„ã‚‹ãŸã‚失敗ã—ã¾ã™ã€‚ +3. **クエリを修正** をクリックã—ã¾ã™ã€‚ +4. GenAIã¯ã‚¯ã‚¨ãƒªã‚’修正ã—よã†ã¨ã—ã¾ã™ã€‚ã“ã®å ´åˆã€`pricee`ã‚’`price`ã«å¤‰æ›´ã—ã¾ã—ãŸã€‚ã¾ãŸã€ã“ã®ã‚·ãƒŠãƒªã‚ªã§ã¯`toYear`ãŒã‚ˆã‚Šé©ã—ã¦ã„ã‚‹ã¨èªè­˜ã—ã¾ã—ãŸã€‚ +5. **é©ç”¨** ã‚’é¸æŠžã—ã¦ã€æ案ã•ã‚ŒãŸå¤‰æ›´ã‚’クエリã«å映ã—ã€**実行** をクリックã—ã¾ã™ã€‚ + +GenAIã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。GenAIã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’任何ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§å®Ÿè¡Œã™ã‚‹éš›ã¯æ³¨æ„ã—ã¦ãã ã•ã„。 + +## 高度ãªã‚¯ã‚¨ãƒªæ©Ÿèƒ½ + +### クエリçµæžœã®æ¤œç´¢ + +クエリを実行ã—ãŸå¾Œã€çµæžœãƒšã‚¤ãƒ³ã®æ¤œç´¢å…¥åŠ›ã‚’使用ã—ã¦ã€è¿”ã•ã‚ŒãŸçµæžœã‚»ãƒƒãƒˆã‚’迅速ã«æ¤œç´¢ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã€è¿½åŠ ã®`WHERE`å¥ã®çµæžœã‚’プレビューã—ãŸã‚Šã€ç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿ãŒçµæžœã‚»ãƒƒãƒˆã«å«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ãŸã‚Šã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã™ã€‚検索入力ã«å€¤ã‚’入力ã™ã‚‹ã¨ã€çµæžœãƒšã‚¤ãƒ³ãŒæ›´æ–°ã•ã‚Œã€ãã®å€¤ã¨ä¸€è‡´ã™ã‚‹ã‚¨ãƒ³ãƒˆãƒªã‚’å«ã‚€ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¿”ã•ã‚Œã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€ClickHouseリãƒã‚¸ãƒˆãƒªã®`github_events`テーブル内ã®`alexey-milovidov`ã®å…¨ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’探ã—ã¦ã¿ã¾ã—ょã†ï¼š + + ![GitHubデータを検索](@site/docs/ja/cloud/images/sqlconsole/search-github.png) + +注:入力ã•ã‚ŒãŸå€¤ã¨ä¸€è‡´ã™ã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒè¿”ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€ä¸Šè¨˜ã®ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚·ãƒ§ãƒƒãƒˆã®3ã¤ç›®ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯`actor_login`フィールドã§`alexey-milovidov`ã¨ä¸€è‡´ã—ã¦ã„ã¾ã›ã‚“ãŒã€`body`フィールドã§ä¸€è‡´ã—ã¦ã„ã¾ã™ï¼š + + ![本文ã§ä¸€è‡´](@site/docs/ja/cloud/images/sqlconsole/match-in-body.png) + +### ページãƒãƒ¼ã‚·ãƒ§ãƒ³è¨­å®šã®èª¿æ•´ + +デフォルトã§ã¯ã€ã‚¯ã‚¨ãƒªçµæžœãƒšã‚¤ãƒ³ã¯ã™ã¹ã¦ã®çµæžœãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’1ã¤ã®ãƒšãƒ¼ã‚¸ã«è¡¨ç¤ºã—ã¾ã™ã€‚より大ããªçµæžœã‚»ãƒƒãƒˆã§ã¯ã€çµæžœã‚’ページãƒãƒ¼ã‚·ãƒ§ãƒ³ã—ã¦è¡¨ç¤ºã™ã‚‹æ–¹ãŒè¦‹ã‚„ã™ã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€çµæžœãƒšã‚¤ãƒ³ã®å³ä¸‹éš…ã«ã‚るページãƒãƒ¼ã‚·ãƒ§ãƒ³ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’使用ã—ã¦å®Ÿç¾ã§ãã¾ã™ï¼š + ![ページãƒãƒ¼ã‚·ãƒ§ãƒ³ã‚ªãƒ—ション](@site/docs/ja/cloud/images/sqlconsole/pagination.png) + +ページサイズをé¸æŠžã™ã‚‹ã¨ã€ã™ãã«çµæžœã‚»ãƒƒãƒˆã«ãƒšãƒ¼ã‚¸ãƒãƒ¼ã‚·ãƒ§ãƒ³ãŒé©ç”¨ã•ã‚Œã€çµæžœãƒšã‚¤ãƒ³ãƒ•ãƒƒã‚¿ã®ä¸­å¤®ã«ãƒŠãƒ“ゲーションオプションãŒè¡¨ç¤ºã•ã‚Œã¾ã™ + + ![ページãƒãƒ¼ã‚·ãƒ§ãƒ³ãƒŠãƒ“ゲーション](@site/docs/ja/cloud/images/sqlconsole/pagination-nav.png) + +### クエリçµæžœãƒ‡ãƒ¼ã‚¿ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +クエリçµæžœã‚»ãƒƒãƒˆã¯ã€SQLコンソールã‹ã‚‰ç›´æŽ¥CSVå½¢å¼ã§ç°¡å˜ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã§ãã¾ã™ã€‚å³å´ã®çµæžœãƒšã‚¤ãƒ³ãƒ„ールãƒãƒ¼ã®`•••`メニューを開ãã€ã€ŒCSVã¨ã—ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã€ã‚’é¸æŠžã—ã¦ãã ã•ã„。 + + ![CSVã¨ã—ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰](@site/docs/ja/cloud/images/sqlconsole/download-as-csv.png) + +## クエリデータã®è¦–覚化 + +データã®ä¸€éƒ¨ã¯ãƒãƒ£ãƒ¼ãƒˆå½¢å¼ã§ã‚ˆã‚Šç°¡å˜ã«è§£é‡ˆã§ãã¾ã™ã€‚クエリçµæžœãƒ‡ãƒ¼ã‚¿ã‹ã‚‰SQLコンソールã§æ•°ã‚¯ãƒªãƒƒã‚¯ã§è¦–覚化を迅速ã«ä½œæˆã§ãã¾ã™ã€‚例ã¨ã—ã¦ã€NYCタクシートリップã®é€±æ¬¡çµ±è¨ˆã‚’計算ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’使用ã—ã¾ã™ï¼š + +```sql +select + toStartOfWeek(pickup_datetime) as week, + sum(total_amount) as fare_total, + sum(trip_distance) as distance_total, + count(*) as trip_total +from + nyc_taxi +group by + 1 +order by + 1 asc +``` + + ![表形å¼ã®ã‚¯ã‚¨ãƒªçµæžœ](@site/docs/ja/cloud/images/sqlconsole/tabular-query-results.png) + +視覚化ãŒãªã„ã¨ã€ã“れらã®çµæžœã¯è§£é‡ˆãŒå›°é›£ã§ã™ã€‚ã“れをãƒãƒ£ãƒ¼ãƒˆã«å¤‰æ›ã—ã¾ã—ょã†ã€‚ + +### ãƒãƒ£ãƒ¼ãƒˆã®ä½œæˆ + +視覚化ã®ä½œæˆã‚’開始ã™ã‚‹ã«ã¯ã€ã‚¯ã‚¨ãƒªçµæžœãƒšã‚¤ãƒ³ãƒ„ールãƒãƒ¼ã‹ã‚‰ã€Œãƒãƒ£ãƒ¼ãƒˆã€ã‚ªãƒ—ションをé¸æŠžã—ã¾ã™ã€‚ãƒãƒ£ãƒ¼ãƒˆæ§‹æˆãƒšã‚¤ãƒ³ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + + ![クエリã‹ã‚‰ãƒãƒ£ãƒ¼ãƒˆã¸åˆ‡ã‚Šæ›¿ãˆã‚‹](@site/docs/ja/cloud/images/sqlconsole/switch-from-query-to-chart.png) + +`week`ã”ã¨ã®`trip_total`を追跡ã™ã‚‹å˜ç´”ãªæ£’グラフを作æˆã—ã¦ã¿ã¾ã—ょã†ã€‚ã“れを実ç¾ã™ã‚‹ã«ã¯ã€`week`フィールドをx軸ã«ã€`trip_total`フィールドをy軸ã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã¾ã™ï¼š + + ![週ã”ã¨ã®ãƒˆãƒªãƒƒãƒ—åˆè¨ˆ](@site/docs/ja/cloud/images/sqlconsole/trip-total-by-week.png) + +ã»ã¨ã‚“ã©ã®ãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒ—ã¯ã€æ•°å€¤è»¸ã«è¤‡æ•°ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’æŒã¤ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚例ã¨ã—ã¦ã€`fare_total`フィールドをy軸ã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã¦ã¿ã¾ã—ょã†ï¼š + + ![棒グラフ](@site/docs/ja/cloud/images/sqlconsole/bar-chart.png) + +### ãƒãƒ£ãƒ¼ãƒˆã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º + +SQLコンソールã¯10種類ã®ãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒ—をサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ãƒãƒ£ãƒ¼ãƒˆæ§‹æˆãƒšã‚¤ãƒ³ã«ã‚ã‚‹ãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒ—セレクターã‹ã‚‰é¸æŠžã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€å‰è¿°ã®ãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒ—を棒ãƒãƒ£ãƒ¼ãƒˆã‹ã‚‰ã‚¨ãƒªã‚¢ãƒãƒ£ãƒ¼ãƒˆã«ç°¡å˜ã«å¤‰æ›´ã§ãã¾ã™ï¼š + + ![棒グラフã‹ã‚‰ã‚¨ãƒªã‚¢ã«å¤‰æ›´](@site/docs/ja/cloud/images/sqlconsole/change-from-bar-to-area.png) + +ãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒˆãƒ«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’供給ã—ã¦ã„るクエリã®åå‰ã«ä¸€è‡´ã—ã¾ã™ã€‚クエリåã‚’æ›´æ–°ã™ã‚‹ã¨ã€ãƒãƒ£ãƒ¼ãƒˆã‚¿ã‚¤ãƒˆãƒ«ã‚‚æ›´æ–°ã•ã‚Œã¾ã™ï¼š + + ![クエリåã‚’æ›´æ–°](@site/docs/ja/cloud/images/sqlconsole/update-query-name.png) + +「詳細ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®ãƒãƒ£ãƒ¼ãƒˆæ§‹æˆãƒšã‚¤ãƒ³ã§ã€ã‚ˆã‚Šé«˜åº¦ãªãƒãƒ£ãƒ¼ãƒˆç‰¹æ€§ã‚’調整ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚以下ã®è¨­å®šã‚’調整ã—ã¦ã¿ã¾ã—ょã†ï¼š +- サブタイトル +- 軸タイトル +- x軸ã®ãƒ©ãƒ™ãƒ«ã®å‘ã + +ãƒãƒ£ãƒ¼ãƒˆã¯ãã‚Œã«å¿œã˜ã¦æ›´æ–°ã•ã‚Œã¾ã™ï¼š + + ![サブタイトルãªã©ã‚’æ›´æ–°](@site/docs/ja/cloud/images/sqlconsole/update-subtitle-etc.png) + +一部ã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€å„フィールドã®è»¸ã‚¹ã‚±ãƒ¼ãƒ«ã‚’個別ã«èª¿æ•´ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“れもãƒãƒ£ãƒ¼ãƒˆæ§‹æˆãƒšã‚¤ãƒ³ã®ã€Œè©³ç´°ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã€è»¸ç¯„囲ã®æœ€å°å€¤ã¨æœ€å¤§å€¤ã‚’指定ã™ã‚‹ã“ã¨ã§å®Ÿç¾ã§ãã¾ã™ã€‚上記ã®ãƒãƒ£ãƒ¼ãƒˆã¯è‰¯å¥½ã«è¦‹ãˆã¾ã™ãŒã€`trip_total`ã¨`fare_total`フィールドã®ç›¸é–¢ã‚’示ã™ãŸã‚ã«ã¯ã€è»¸ç¯„囲ã«ã„ãã¤ã‹ã®èª¿æ•´ãŒå¿…è¦ã§ã™ï¼š + + ![軸スケールã®èª¿æ•´](@site/docs/ja/cloud/images/sqlconsole/adjust-axis-scale.png) diff --git a/docs/ja/integrations/sql-clients/tablum.md b/docs/ja/integrations/sql-clients/tablum.md new file mode 100644 index 00000000000..3a9da5422d3 --- /dev/null +++ b/docs/ja/integrations/sql-clients/tablum.md @@ -0,0 +1,62 @@ +--- +sidebar_label: TABLUM.IO +slug: /ja/integrations/tablumio +description: TABLUM.IOã¯ã€ClickHouseã‚’ã™ãã«ã‚µãƒãƒ¼ãƒˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ç®¡ç†SaaSã§ã™ã€‚ +--- + +# TABLUM.IOã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +## TABLUM.IOã®ã‚¹ã‚¿ãƒ¼ãƒˆã‚¢ãƒƒãƒ—ページを開ã + +TABLUM.IOã®ã‚¯ãƒ©ã‚¦ãƒ‰ç‰ˆã¯[https://go.tablum.io/](https://go.tablum.io/)ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +:::note + TABLUM.IOã®è‡ªå·±ãƒ›ã‚¹ãƒˆç‰ˆã‚’Linuxサーãƒãƒ¼ã«Dockerã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +::: + +## 1. サービスã«ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã¾ãŸã¯ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã™ã‚‹ + + 最åˆã«ã€ãƒ¡ãƒ¼ãƒ«ã‚’使用ã—ã¦TABLUM.IOã«ã‚µã‚¤ãƒ³ã‚¢ãƒƒãƒ—ã™ã‚‹ã‹ã€Googleã¾ãŸã¯Facebookã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’使用ã—ã¦ã‚¯ã‚¤ãƒƒã‚¯ãƒ­ã‚°ã‚¤ãƒ³ã‚’è¡Œã£ã¦ãã ã•ã„。 + + ![](@site/docs/ja/integrations/sql-clients/images/tablum-ch-0.png) + +## 2. ClickHouseコãƒã‚¯ã‚¿ã‚’追加ã™ã‚‹ + +ClickHouseã®æŽ¥ç¶šæƒ…報を準備ã—ã€**Connector**タブã«ç§»å‹•ã—ã¦ã€ãƒ›ã‚¹ãƒˆã®URLã€ãƒãƒ¼ãƒˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã€ãƒ‘スワードã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã€ã‚³ãƒã‚¯ã‚¿ã®åå‰ã‚’入力ã—ã¾ã™ã€‚ã“れらã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’入力後ã€**Test connection**ボタンをクリックã—ã¦æƒ…報を検証ã—ã€ãã®å¾Œã€**Save connector for me**をクリックã—ã¦æ°¸ç¶šåŒ–ã—ã¾ã™ã€‚ + +:::tip +æ­£ã—ã„**HTTP**ãƒãƒ¼ãƒˆã‚’指定ã—ã€æŽ¥ç¶šæƒ…å ±ã«å¿œã˜ã¦**SSL**モードを切り替ãˆã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +::: + +:::tip +通常ã€TLSを使用ã™ã‚‹å ´åˆã¯ãƒãƒ¼ãƒˆãŒ8443ã§ã€ä½¿ç”¨ã—ãªã„å ´åˆã¯8123ã§ã™ã€‚ +::: + + ![](@site/docs/ja/integrations/sql-clients/images/tablum-ch-1.png) + +## 3. コãƒã‚¯ã‚¿ã‚’é¸æŠžã™ã‚‹ + +**Dataset**タブã«ç§»å‹•ã—ã¾ã™ã€‚ドロップダウンã§æœ€è¿‘作æˆã—ãŸClickHouseコãƒã‚¯ã‚¿ã‚’é¸æŠžã—ã¾ã™ã€‚å³å´ã®ãƒ‘ãƒãƒ«ã«ã¯åˆ©ç”¨å¯èƒ½ãªãƒ†ãƒ¼ãƒ–ルã¨ã‚¹ã‚­ãƒ¼ãƒžã®ãƒªã‚¹ãƒˆãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + + ![](@site/docs/ja/integrations/sql-clients/images/tablum-ch-2.png) + +## 4. SQLクエリを入力ã—ã¦å®Ÿè¡Œã™ã‚‹ + +SQLコンソールã«ã‚¯ã‚¨ãƒªã‚’入力ã—ã€**Run Query**を押ã—ã¾ã™ã€‚çµæžœã¯ã‚¹ãƒ—レッドシートã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +:::tip +カラムåã‚’å³ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã¨ã€ã‚½ãƒ¼ãƒˆã€ãƒ•ã‚£ãƒ«ã‚¿ã€ãã®ä»–ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’å«ã‚€ãƒ‰ãƒ­ãƒƒãƒ—ダウンメニューãŒé–‹ãã¾ã™ã€‚ +::: + + ![](@site/docs/ja/integrations/sql-clients/images/tablum-ch-3.png) + +:::note +TABLUM.IOを使用ã™ã‚‹ã¨ã€ +* ã‚ãªãŸã®TABLUM.IOアカウント内ã§è¤‡æ•°ã®ClickHouseコãƒã‚¯ã‚¿ã‚’作æˆãŠã‚ˆã³åˆ©ç”¨ã§ã〠+* データソースã«é–¢ä¿‚ãªãロードã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã§ã‚¯ã‚¨ãƒªã‚’実行ã§ã〠+* çµæžœã‚’æ–°ã—ã„ClickHouseデータベースã¨ã—ã¦å…±æœ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +## 詳ã—ã学㶠+ +TABLUM.IOã«é–¢ã™ã‚‹è©³ç´°æƒ…å ±ã¯https://tablum.ioã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ diff --git a/docs/ja/interfaces/cli.md b/docs/ja/interfaces/cli.md new file mode 100644 index 00000000000..1a21c238815 --- /dev/null +++ b/docs/ja/interfaces/cli.md @@ -0,0 +1,405 @@ +--- +slug: /ja/interfaces/cli +sidebar_position: 17 +sidebar_label: コマンドラインクライアント +title: コマンドラインクライアント +--- +import ConnectionDetails from '@site/docs/ja/_snippets/_gather_your_details_native.md'; + +## clickhouse-client + +ClickHouseã¯ãƒã‚¤ãƒ†ã‚£ãƒ–ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã€`clickhouse-client`ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ã“ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚ªãƒ—ションã¨è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚詳細ã¯[設定](#interfaces_cli_configuration)ã‚’ã”覧ãã ã•ã„。 + +`clickhouse-client`パッケージã‹ã‚‰[インストール](../getting-started/install.md)ã—ã€`clickhouse-client`コマンドã§å®Ÿè¡Œã—ã¾ã™ã€‚ + +```bash +$ clickhouse-client +ClickHouse client version 20.13.1.5273 (official build). +Connecting to localhost:9000 as user default. +Connected to ClickHouse server version 20.13.1. + +:) +``` + +ç•°ãªã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¨ã‚µãƒ¼ãƒãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ä¸€éƒ¨ã®æ©Ÿèƒ½ã¯å¤ã„クライアントã§ã¯ä½¿ç”¨ã§ããªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚クライアントã¨ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リã®åŒã˜ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã—よã†ã¨ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã¯`clickhouse-client`ãŒä»¥ä¸‹ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã—ã¾ã™ï¼š + +```response +ClickHouse client version is older than ClickHouse server. +It may lack support for new features. +``` + +## 使用法 {#cli_usage} + +クライアントã¯ã€ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã¨éžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–(ãƒãƒƒãƒï¼‰ãƒ¢ãƒ¼ãƒ‰ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +### 接続ã®è©³ç´°ã‚’集ã‚ã‚‹ + + +### インタラクティブ + +ClickHouse Cloudサービスã¾ãŸã¯TLSãŠã‚ˆã³ãƒ‘スワードを使用ã™ã‚‹ä»»æ„ã®ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã€ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ã«`--secure`ã€ãƒãƒ¼ãƒˆ9440ã€ãŠã‚ˆã³ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードを指定ã—ã¾ã™ï¼š + +```bash +clickhouse-client --host \ + --secure \ + --port 9440 \ + --user \ + --password +``` + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã€ãã®ã‚µãƒ¼ãƒãƒ¼ã®è©³ç´°ãŒå¿…è¦ã§ã™ã€‚TLSãŒä½¿ç”¨ã•ã‚Œã‚‹ã‹ã©ã†ã‹ã€ãƒãƒ¼ãƒˆç•ªå·ã€ãƒ‘スワードもã™ã¹ã¦è¨­å®šå¯èƒ½ã§ã™ã€‚ClickHouse Cloudã®ä¾‹ã‚’出発点ã¨ã—ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +### ãƒãƒƒãƒ + +ãƒãƒƒãƒãƒ¢ãƒ¼ãƒ‰ã‚’使用ã™ã‚‹ã«ã¯ã€`query`パラメーターを指定ã™ã‚‹ã‹ã€`stdin`ã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã—ã¾ã™ï¼ˆ`stdin`ãŒã‚¿ãƒ¼ãƒŸãƒŠãƒ«ã§ãªã„ã“ã¨ã‚’確èªã—ã¾ã™ï¼‰ã€‚両方を行ã†ã“ã¨ã‚‚ã§ãã¾ã™ã€‚HTTPインターフェースã«ä¼¼ã¦ã„ã¾ã™ãŒã€`query`パラメーターを使用ã—`stdin`ã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯`query`パラメーターã€æ”¹è¡Œã€`stdin`ã®ãƒ‡ãƒ¼ã‚¿ã®é€£çµã§ã™ã€‚ã“ã‚Œã¯å¤§ããªINSERTクエリã«ä¾¿åˆ©ã§ã™ã€‚ + +クライアントを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ä¾‹ï¼š + +#### リモートClickHouseサービスã«CSVファイルを挿入ã™ã‚‹ + +ã“ã®ä¾‹ã¯TLSã¨ãƒ‘スワードを使用ã™ã‚‹ClickHouse Cloudã¾ãŸã¯ä»»æ„ã®ClickHouseサーãƒãƒ¼ã«é©ã—ã¦ã„ã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã‚µãƒ³ãƒ—ルデータセットã®CSVファイル`cell_towers.csv`を既存ã®`default`データベース内ã®`cell_towers`テーブルã«æŒ¿å…¥ã—ã¾ã™ï¼š + +```bash +clickhouse-client --host HOSTNAME.clickhouse.cloud \ + --secure \ + --port 9440 \ + --user default \ + --password PASSWORD \ + --query "INSERT INTO cell_towers FORMAT CSVWithNames" \ + < cell_towers.csv +``` + +:::note +クエリã®æ§‹æ–‡ã«é›†ä¸­ã™ã‚‹ãŸã‚ã«ã€ä»–ã®ä¾‹ã§ã¯æŽ¥ç¶šã®è©³ç´°ï¼ˆ`--host`ã€`--port`ãªã©ï¼‰ã‚’çœç•¥ã—ã¦ã„ã¾ã™ã€‚コマンドを試ã™éš›ã«ã¯ã“れらを追加ã—ã¦ãã ã•ã„。 +::: + +#### データを挿入ã™ã‚‹ä¸‰ã¤ã®æ–¹æ³• + +```bash +echo -ne "1, 'some text', '2016-08-14 00:00:00'\n2, 'some more text', '2016-08-14 00:00:01'" | \ + clickhouse-client --database=test --query="INSERT INTO test FORMAT CSV"; +``` + +```bash +cat <<_EOF | clickhouse-client --database=test --query="INSERT INTO test FORMAT CSV"; +3, 'some text', '2016-08-14 00:00:00' +4, 'some more text', '2016-08-14 00:00:01' +_EOF +``` + +```bash +cat file.csv | clickhouse-client --database=test --query="INSERT INTO test FORMAT CSV"; +``` + +### 注æ„事項 + +ãƒãƒƒãƒãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯TabSeparatedã§ã™ã€‚クエリã®FORMATå¥ã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’設定ã§ãã¾ã™ã€‚ + +デフォルトã§ã¯ã€ãƒãƒƒãƒãƒ¢ãƒ¼ãƒ‰ã§ã¯å˜ä¸€ã®ã‚¯ã‚¨ãƒªã—ã‹å‡¦ç†ã§ãã¾ã›ã‚“。“スクリプトâ€ã‹ã‚‰è¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚’作æˆã™ã‚‹ã«ã¯ã€`--multiquery`パラメータを使用ã—ã¾ã™ã€‚ã“ã‚Œã¯INSERTを除ãã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã«æœ‰åŠ¹ã§ã™ã€‚クエリçµæžœã¯é€£ç¶šã—ã¦ç„¡åˆ†åˆ¥ã«å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚åŒæ§˜ã«ã€å¤§é‡ã®ã‚¯ã‚¨ãƒªã‚’処ç†ã™ã‚‹ã«ã¯ã€å„クエリã«å¯¾ã—ã¦â€˜clickhouse-client’を実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚‘clickhouse-client’プログラムã®èµ·å‹•ã«æ•°åミリ秒ã‹ã‹ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +インタラクティブモードã§ã¯ã€ã‚¯ã‚¨ãƒªã‚’入力ã™ã‚‹ãŸã‚ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãŒå¾—られã¾ã™ã€‚ + +‘multiline’ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ï¼šã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã«ã¯Enterキーを押ã—ã¾ã™ã€‚クエリã®æœ€å¾Œã«ã‚»ãƒŸã‚³ãƒ­ãƒ³ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。複数行ã®ã‚¯ã‚¨ãƒªã‚’入力ã™ã‚‹ã«ã¯ã€æ”¹è¡Œå‰ã«ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥`\`を入力ã—ã¾ã™ã€‚Enterキーを押ã—ãŸå¾Œã€æ¬¡ã®è¡Œã®ã‚¯ã‚¨ãƒªã‚’入力ã™ã‚‹ã‚ˆã†ã«æ±‚ã‚られã¾ã™ã€‚ + +multilineãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼šã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã«ã¯ã€æœ€å¾Œã«ã‚»ãƒŸã‚³ãƒ­ãƒ³ã‚’付ã‘ã¦Enterキーを押ã—ã¾ã™ã€‚入力ã—ãŸè¡Œã®æœ€å¾Œã«ã‚»ãƒŸã‚³ãƒ­ãƒ³ã‚’付ã‘ãªã‹ã£ãŸå ´åˆã€æ¬¡ã®è¡Œã®ã‚¯ã‚¨ãƒªã‚’入力ã™ã‚‹ã‚ˆã†ã«æ±‚ã‚られã¾ã™ã€‚ + +å˜ä¸€ã®ã‚¯ã‚¨ãƒªã®ã¿ãŒå®Ÿè¡Œã•ã‚Œã‚‹ãŸã‚ã€ã‚»ãƒŸã‚³ãƒ­ãƒ³ä»¥é™ã®ã™ã¹ã¦ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + +`\G`をセミコロンã¨ã—ã¦ã€ã¾ãŸã¯å¾Œã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯Verticalフォーマットを示ã—ã¾ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€å„値ãŒåˆ¥ã€…ã®è¡Œã«å°åˆ·ã•ã‚Œã‚‹ãŸã‚ã€å¹…広ã„テーブルã«ä¾¿åˆ©ã§ã™ã€‚ã“ã®çã—ã„機能ã¯MySQL CLIã¨ã®äº’æ›æ€§ã®ãŸã‚ã«è¿½åŠ ã•ã‚Œã¾ã—ãŸã€‚ + +コマンドラインã¯â€˜replxx’(‘readline’ã«ä¼¼ã¦ã„ã¾ã™ï¼‰ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ã¤ã¾ã‚Šã€æ…£ã‚Œè¦ªã—ã‚“ã ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’使用ã—ã€å±¥æ­´ã‚’ä¿æŒã—ã¾ã™ã€‚履歴ã¯`~/.clickhouse-client-history`ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +デフォルトã§ã¯ã€ä½¿ç”¨ã•ã‚Œã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯PrettyCompactã§ã™ã€‚クエリã®FORMATå¥ã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’変更ã™ã‚‹ã‹ã€ã‚¯ã‚¨ãƒªã®æœ€å¾Œã«`\G`を指定ã—ãŸã‚Šã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã§`--format`ã¾ãŸã¯`--vertical`引数を使用ã—ãŸã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ãŸã‚Šã™ã‚‹ã“ã¨ã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’変更ã§ãã¾ã™ã€‚ + +クライアントを終了ã™ã‚‹ã«ã¯ã€Ctrl+Dを押ã™ã‹ã€ã‚¯ã‚¨ãƒªã®ä»£ã‚ã‚Šã«æ¬¡ã®ã„ãšã‚Œã‹ã‚’入力ã—ã¾ã™ï¼šã€Œexitã€ã€ã€Œquitã€ã€ã€Œlogoutã€ã€ã€Œexit;ã€ã€ã€Œquit;ã€ã€ã€Œlogout;ã€ã€ã€Œqã€ã€ã€ŒQã€ã€ã€Œ:q〠+ +クエリを処ç†ã™ã‚‹éš›ã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯æ¬¡ã‚’表示ã—ã¾ã™ï¼š + +1. プログレスã¯ã€1秒間ã«æœ€å¤§10回(デフォルト)更新ã•ã‚Œã¾ã™ã€‚クエリãŒè¿…速ãªå ´åˆã€ãƒ—ログレスã¯è¡¨ç¤ºã•ã‚Œãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +2. デãƒãƒƒã‚°ã®ãŸã‚ã«ã€è§£æžå¾Œã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸã‚¯ã‚¨ãƒªã€‚ +3. 指定ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã®çµæžœã€‚ +4. çµæžœã®è¡Œæ•°ã€çµŒéŽæ™‚é–“ã€ã‚¯ã‚¨ãƒªå‡¦ç†ã®å¹³å‡é€Ÿåº¦ã€‚ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿é‡ã¯åœ§ç¸®ã•ã‚Œã¦ã„ãªã„データを指ã—ã¾ã™ã€‚ + +é•·ã„クエリをキャンセルã™ã‚‹ã«ã¯ã€Ctrl+Cを押ã—ã¾ã™ã€‚ãŸã ã—ã€ã‚µãƒ¼ãƒãƒ¼ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’中断ã™ã‚‹ã®ã‚’å¾…ã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚一部ã®ã‚¹ãƒ†ãƒ¼ã‚¸ã§ã¯ã‚¯ã‚¨ãƒªã‚’キャンセルã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。待ãŸãšã«2回目ã®Ctrl+Cを押ã™ã¨ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯çµ‚了ã—ã¾ã™ã€‚ + +コマンドラインクライアントã¯å¤–部データ(外部一時テーブル)をクエリã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€ã€Œã‚¯ã‚¨ãƒªå‡¦ç†ã®ãŸã‚ã®å¤–部データã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’ã”覧ãã ã•ã„。 + +### パラメータ付ãクエリ {#cli-queries-with-parameters} + +クライアントアプリケーションã‹ã‚‰å€¤ã‚’渡ã—ã¦ãƒ‘ラメータ付ãクエリを作æˆã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§ç‰¹å®šã®å‹•çš„値をæŒã¤ã‚¯ã‚¨ãƒªã‚’フォーマットã™ã‚‹å¿…è¦ãŒãªããªã‚Šã¾ã™ã€‚ 例ãˆã°ï¼š + +```bash +$ clickhouse-client --param_parName="[1, 2]" -q "SELECT * FROM table WHERE a = {parName:Array(UInt16)}" +``` + +インタラクティブセッション内ã‹ã‚‰ãƒ‘ラメータを設定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š +```bash +$ clickhouse-client -nq " + SET param_parName='[1, 2]'; + SELECT {parName:Array(UInt16)}" +``` + +#### クエリ構文 {#cli-queries-with-parameters-syntax} + +通常ã©ãŠã‚Šã«ã‚¯ã‚¨ãƒªã‚’フォーマットã—ã€æ¬¡ã«ã‚¢ãƒ—リã®ãƒ‘ラメータã‹ã‚‰ã‚¯ã‚¨ãƒªã«æ¸¡ã—ãŸã„値を以下ã®å½¢å¼ã§ä¸­æ‹¬å¼§ã«å…¥ã‚Œã¾ã™ï¼š + +```sql +{:} +``` + +- `name` — プレースホルダー識別å­ã€‚コンソールクライアントã§ã¯`--param_ = value`ã¨ã—ã¦ã‚¢ãƒ—リパラメータã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- `data type` — アプリパラメータ値ã®[データ型](../sql-reference/data-types/index.md)。例ãˆã°ã€`(integer, ('string', integer))`ã®ã‚ˆã†ãªãƒ‡ãƒ¼ã‚¿æ§‹é€ ã¯ã€`Tuple(UInt8, Tuple(String, UInt8))`データ型をæŒã¤ã“ã¨ãŒã§ãã¾ã™ï¼ˆä»–ã®[æ•´æ•°](../sql-reference/data-types/int-uint.md)タイプも使用ã§ãã¾ã™ï¼‰ã€‚テーブルã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ã‚«ãƒ©ãƒ åをパラメータã¨ã—ã¦æ¸¡ã™ã“ã¨ã‚‚å¯èƒ½ã§ã€ãã®å ´åˆ`Identifier`をデータ型ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +#### 例 {#example} + +```bash +$ clickhouse-client --param_tuple_in_tuple="(10, ('dt', 10))" -q "SELECT * FROM table WHERE val = {tuple_in_tuple:Tuple(UInt8, Tuple(String, UInt8))}" +$ clickhouse-client --param_tbl="numbers" --param_db="system" --param_col="number" --param_alias="top_ten" --query "SELECT {col:Identifier} as {alias:Identifier} FROM {db:Identifier}.{tbl:Identifier} LIMIT 10" +``` + +## 設定 {#interfaces_cli_configuration} + +`clickhouse-client`ã«ãƒ‘ラメータを渡ã™ã“ã¨ãŒã§ã(ã™ã¹ã¦ã®ãƒ‘ラメータã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒã‚ã‚Šã¾ã™ï¼‰ã€ä»¥ä¸‹ã®æ–¹æ³•ã‚’使用ã—ã¾ã™ï¼š + +- コマンドラインã‹ã‚‰ + + コマンドラインオプションã¯ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«å†…ã§ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¨è¨­å®šã‚’上書ãã—ã¾ã™ã€‚ + +- 設定ファイルã‹ã‚‰ã€‚ + + 設定ファイルã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’上書ãã—ã¾ã™ã€‚ + +### コマンドラインオプション {#command-line-options} + +- `--host, -h` – サーãƒãƒ¼å(デフォルト㯠'localhost')。åå‰ã¾ãŸã¯IPv4ã‚‚ã—ãã¯IPv6アドレスを使用ã§ãã¾ã™ã€‚ +- `--port` – 接続先ã®ãƒãƒ¼ãƒˆã€‚デフォルト値: 9000。HTTPインターフェースã¨ãƒã‚¤ãƒ†ã‚£ãƒ–インターフェースã¯ç•°ãªã‚‹ãƒãƒ¼ãƒˆã‚’使用ã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 +- `--user, -u` – ユーザーå。デフォルト値: default。 +- `--password` – パスワード。デフォルト値: 空文字列。 +- `--ask-password` - ユーザーã«ãƒ‘スワードã®å…¥åŠ›ã‚’促ã—ã¾ã™ã€‚ +- `--query, -q` – éžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モード使用時ã®å‡¦ç†ã‚¯ã‚¨ãƒªã€‚`--query`ã¯è¤‡æ•°å›žæŒ‡å®šã§ãã¾ã™ï¼ˆä¾‹ï¼š`--query "SELECT 1" --query "SELECT 2"`)。`--queries-file`ã¨ã¯åŒæ™‚ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `--queries-file` – 実行ã™ã‚‹ã‚¯ã‚¨ãƒªãŒè¨˜è¿°ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘ス。`--queries-file`ã¯è¤‡æ•°å›žæŒ‡å®šã§ãã¾ã™ï¼ˆä¾‹ï¼š`--queries-file queries1.sql --queries-file queries2.sql`)。`--query`ã¨ã¯åŒæ™‚ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `--multiquery, -n` – 指定ã•ã‚ŒãŸå ´åˆã€ã‚»ãƒŸã‚³ãƒ­ãƒ³ã§åŒºåˆ‡ã‚‰ã‚ŒãŸè¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚’`--query`オプションã®å¾Œã«ãƒªã‚¹ãƒˆã§ãã¾ã™ã€‚便利ãªã“ã¨ã«ã€`--query`ã‚’çœç•¥ã—ã€`--multiquery`ã®å¾Œã«ã‚¯ã‚¨ãƒªã‚’直接渡ã™ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ +- `--multiline, -m` – 指定ã•ã‚ŒãŸå ´åˆã€è¤‡æ•°è¡Œã®ã‚¯ã‚¨ãƒªã‚’許å¯ã—ã¾ã™ï¼ˆEnterã§ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã—ã¾ã›ã‚“)。 +- `--database, -d` – ç¾åœ¨ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é¸æŠžã—ã¾ã™ã€‚デフォルト値: サーãƒãƒ¼è¨­å®šã‹ã‚‰ã®ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ ‘default’)。 +- `--format, -f` – çµæžœã‚’出力ã™ã‚‹ãŸã‚ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’指定ã—ã¾ã™ã€‚ +- `--vertical, -E` – 指定ã•ã‚ŒãŸå ´åˆã€çµæžœã‚’出力ã™ã‚‹ãŸã‚ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§[Verticalフォーマット](../interfaces/formats.md#vertical)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯`–format=Vertical`ã¨åŒã˜ã§ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€å„値ãŒåˆ¥ã€…ã®è¡Œã«å°åˆ·ã•ã‚Œã‚‹ãŸã‚ã€å¹…広ã„テーブルã®è¡¨ç¤ºã«å½¹ç«‹ã¡ã¾ã™ã€‚ +- `--time, -t` – 指定ã•ã‚ŒãŸå ´åˆã€éžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã§ã‚¯ã‚¨ãƒªå®Ÿè¡Œæ™‚間を‘stderr’ã«å‡ºåŠ›ã—ã¾ã™ã€‚ +- `--memory-usage` – 指定ã•ã‚ŒãŸå ´åˆã€éžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã§ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’‘stderr’ã«å‡ºåŠ›ã—ã¾ã™ã€‚å¯èƒ½ãªå€¤ã¯ï¼š'none' - メモリ使用é‡ã‚’出力ã—ãªã„ã€'default' - ãƒã‚¤ãƒˆæ•°ã‚’出力ã€'readable' - メモリ使用é‡ã‚’人間ãŒèª­ã¿ã‚„ã™ã„å½¢å¼ã§å‡ºåŠ›ã€‚ +- `--stacktrace` – 指定ã•ã‚ŒãŸå ´åˆã€ä¾‹å¤–ãŒç™ºç”Ÿã—ãŸã¨ãã«ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚‚出力ã—ã¾ã™ã€‚ +- `--config-file` – 設定ファイルã®åå‰ã€‚ +- `--secure` – 指定ã•ã‚ŒãŸå ´åˆã€ã‚»ã‚­ãƒ¥ã‚¢æŽ¥ç¶šï¼ˆTLS)を介ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã—ã¾ã™ã€‚CA証明書を[設定ファイル](#configuration_files)ã§è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。利用å¯èƒ½ãªè¨­å®šã¯[サーãƒãƒ¼å´ã®TLS設定](../operations/server-configuration-parameters/settings.md#openssl)ã¨åŒã˜ã§ã™ã€‚ +- `--history_file` — コマンド履歴をå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘ス。 +- `--history_max_entries` — 履歴ファイルã®æœ€å¤§ã‚¨ãƒ³ãƒˆãƒªãƒ¼æ•°ã€‚デフォルト値:1 000 000。 +- `--param_` — [パラメータ付ãクエリ](#cli-queries-with-parameters)ã®ãŸã‚ã®å€¤ã€‚ +- `--hardware-utilization` — プログレスãƒãƒ¼ã§ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢åˆ©ç”¨æƒ…報を表示。 +- `--print-profile-events` – `ProfileEvents`パケットを出力。 +- `--profile-events-delay-ms` – `ProfileEvents`パケットã®å‡ºåŠ›é–“隔(-1 - åˆè¨ˆã®ã¿å‡ºåŠ›ã€0 - å˜ä¸€ãƒ‘ケットã”ã¨ã«å‡ºåŠ›ï¼‰ã€‚ +- `--jwt` – 指定ã•ã‚ŒãŸå ´åˆã€JSON Web Tokenを介ã—ã¦èªè¨¼ã‚’有効ã«ã—ã¾ã™ã€‚サーãƒãƒ¼JWTèªè¨¼ã¯ClickHouse Cloudã§ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ +- `--progress` – クエリ実行ã®é€²æ—を表示。å¯èƒ½ãªå€¤: 'tty|on|1|true|yes' - インタラクティブモードã§TTYã«å‡ºåŠ›; 'err' - éžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã§STDERRã«å‡ºåŠ›; 'off|0|false|no' - 進æ—表示を無効ã«ã—ã¾ã™ã€‚デフォルト:インタラクティブモードã§ã¯TTYã€éžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã§ã¯ç„¡åŠ¹ã€‚ +- `--progress-table` – クエリ実行中ã«å¤‰åŒ–ã™ã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’æŒã¤é€²æ—テーブルを表示。å¯èƒ½ãªå€¤: 'tty|on|1|true|yes' - インタラクティブモードã§TTYã«å‡ºåŠ›; 'err' - éžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã§STDERRã«å‡ºåŠ›; 'off|0|false|no' - 進æ—テーブルを無効ã«ã—ã¾ã™ã€‚デフォルト:インタラクティブモードã§ã¯TTYã€éžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã§ã¯ç„¡åŠ¹ã€‚ +- `--enable-progress-table-toggle` – 進æ—テーブルå°åˆ·ãŒæœ‰åŠ¹ãªã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã§ã€ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚­ãƒ¼ï¼ˆã‚¹ãƒšãƒ¼ã‚¹ï¼‰ã‚’押ã—ã¦é€²æ—テーブルを切り替ãˆã‚‹ã“ã¨ã‚’有効ã«ã—ã¾ã™ã€‚デフォルト:'true'。 + +`--host`ã€`--port`ã€`--user`ã€`--password`オプションã®ä»£ã‚ã‚Šã«ã€ClickHouseクライアントã¯æŽ¥ç¶šæ–‡å­—列もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼ˆæ¬¡ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚照)。 + +## エイリアス {#cli_aliases} + +- `\l` - SHOW DATABASES +- `\d` - SHOW TABLES +- `\c ` - USE DATABASE +- `.` - 最後ã®ã‚¯ã‚¨ãƒªã‚’繰り返㙠+ +## ショートキー {#shortkeys_aliases} + +- `Alt (Option) + Shift + e` - ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã‚’エディタã§é–‹ã。環境変数を設定ã§ãã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯vim)。 +- `Alt (Option) + #` - 行をコメントアウト。 +- `Ctrl + r` - ã‚ã„ã¾ã„履歴検索。 + +:::tip +MacOSã§ãƒ¡ã‚¿ã‚­ãƒ¼ï¼ˆOption)ã®æ­£ã—ã„動作を設定ã™ã‚‹ã«ã¯ï¼š + +iTerm2: Preferences -> Profile -> Keys -> Left Option keyã¸è¡Œãã€Esc+をクリックã—ã¾ã™ã€‚ +::: + +使用å¯èƒ½ãªã™ã¹ã¦ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚­ãƒ¼ã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯[replxx](https://github.com/AmokHuginnsson/replxx/blob/1f149bf/src/replxx_impl.cxx#L262)ã‚’ã”覧ãã ã•ã„。 + +## 接続文字列 {#connection_string} + +clickhouse-clientã¯ã¾ãŸã€`MongoDB`ã‚„`PostgreSQL`ã€`MySQL`ã¨ä¼¼ãŸæŽ¥ç¶šæ–‡å­—列を使用ã—ã¦clickhouseサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚以下ã®æ§‹æ–‡ã§æŽ¥ç¶šæ–‡å­—列を記述ã—ã¾ã™ï¼š + +```text +clickhouse:[//[user[:password]@][hosts_and_ports]][/database][?query_parameters] +``` + +ã“ã“㧠+ +- `user` - (オプション)ユーザーå, +- `password` - (オプション)ユーザーパスワード。`:`ãŒæŒ‡å®šã•ã‚Œã€ãƒ‘スワードãŒç©ºç™½ãªã‚‰ã°ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ãƒ‘スワードを入力ã™ã‚‹ã‚ˆã†ã«ä¿ƒã—ã¾ã™ã€‚ +- `hosts_and_ports` - (オプション)ホストã¨ãƒãƒ¼ãƒˆã®ãƒªã‚¹ãƒˆ `host[:port] [, host:[port]], ...`, +- `database` - (オプション)データベースå, +- `query_parameters` - (オプション)キーã¨å€¤ã®ãƒšã‚¢ã®ãƒªã‚¹ãƒˆ `param1=value1[,¶m2=value2], ...`。一部ã®ãƒ‘ラメータã«ã¯å€¤ãŒå¿…è¦ã‚ã‚Šã¾ã›ã‚“。パラメータåã¨å€¤ã¯å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +ユーザーãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`default`ユーザーãŒãƒ‘スワードãªã—ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +ホストãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`localhost`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +ãƒãƒ¼ãƒˆãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`9000`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +データベースãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`default`データベースãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +ユーザーåã€ãƒ‘スワードã€ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒæŽ¥ç¶šæ–‡å­—列ã§æŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`--user`ã€`--password`ã€ã¾ãŸã¯`--database`ã§æŒ‡å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“(ãã®é€†ã‚‚åŒæ§˜ã§ã™ï¼‰ã€‚ + +ホストコンãƒãƒ¼ãƒãƒ³ãƒˆã¯ã€ãƒ›ã‚¹ãƒˆåã¨IPアドレスã®ã©ã¡ã‚‰ã‹ã‚’指定ã§ãã¾ã™ã€‚IPv6アドレスを指定ã™ã‚‹ã«ã¯ã€è§’括弧内ã«è¨˜è¼‰ã—ã¾ã™ï¼š + +```text +clickhouse://[2001:db8::1234] +``` + +URIã§ã¯è¤‡æ•°ã®ãƒ›ã‚¹ãƒˆã¸ã®æŽ¥ç¶šãŒå¯èƒ½ã§ã™ã€‚接続文字列ã«ã¯è¤‡æ•°ã®ãƒ›ã‚¹ãƒˆã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouse-clientã¯ã“れらã®ãƒ›ã‚¹ãƒˆã«é †ã«æŽ¥ç¶šã‚’試ã¿ã¾ã™ï¼ˆã¤ã¾ã‚Šã€å·¦ã‹ã‚‰å³ã¸ï¼‰ã€‚接続ãŒç¢ºç«‹ã•ã‚Œã‚‹ã¨ã€æ®‹ã‚Šã®ãƒ›ã‚¹ãƒˆã¸ã®æŽ¥ç¶šã¯è¡Œã‚ã‚Œã¾ã›ã‚“。 + +接続文字列ã¯clickhouse-clientã®æœ€åˆã®å¼•æ•°ã¨ã—ã¦æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚接続文字列ã¯ä»»æ„ã®ä»–ã®[command-line-options](#command-line-options)ã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã§ãã¾ã™ãŒã€`--host/-h`ãŠã‚ˆã³`--port`ã¯é™¤ãã¾ã™ã€‚ + +`query_parameters`コンãƒãƒ¼ãƒãƒ³ãƒˆã«è¨±å¯ã•ã‚Œã‚‹ã‚­ãƒ¼ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +- `secure`ã¾ãŸã¯ã‚·ãƒ§ãƒ¼ãƒˆãƒãƒ³ãƒ‰` s` - 値ãªã—。指定ã•ã‚ŒãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ã‚»ã‚­ãƒ¥ã‚¢æŽ¥ç¶šï¼ˆTLS)を介ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã—ã¾ã™ã€‚[コマンドラインオプション](#command-line-options)ã®`secure`ã‚’å‚ç…§ã—ã¦ãã ã•ã„ + +### パーセントエンコーディング {#connection_string_uri_percent_encoding} + +`user`ã€`password`ã€`hosts`ã€`database`ã€`query parameters`内ã®éžASCIIã€ã‚¹ãƒšãƒ¼ã‚¹ã€ç‰¹æ®Šæ–‡å­—ã¯[パーセントエンコーディング](https://en.wikipedia.org/wiki/URL_encoding)ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### 例 {#connection_string_examples} + +ãƒãƒ¼ãƒˆ9000ã§localhostã«æŽ¥ç¶šã—ã€ã‚¯ã‚¨ãƒª`SELECT 1`を実行ã—ã¾ã™ã€‚ + +```bash +clickhouse-client clickhouse://localhost:9000 --query "SELECT 1" +``` + +ユーザー`john`ã€ãƒ‘スワード`secret`ã€ãƒ›ã‚¹ãƒˆ`127.0.0.1`ã€ãƒãƒ¼ãƒˆ`9000`を使用ã—ã¦localhostã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +```bash +clickhouse-client clickhouse://john:secret@127.0.0.1:9000 +``` + +デフォルトユーザーを使用ã—ã€ãƒ›ã‚¹ãƒˆã«IPV6アドレス`[::1]`ã€ãƒãƒ¼ãƒˆ`9000`を使用ã—ã¦localhostã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +```bash +clickhouse-client clickhouse://[::1]:9000 +``` + +ãƒãƒ¼ãƒˆ9000を使用ã—ã€è¤‡æ•°è¡Œãƒ¢ãƒ¼ãƒ‰ã§localhostã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +```bash +clickhouse-client clickhouse://localhost:9000 '-m' +``` + +ユーザー`default`を使用ã—ã¦ãƒãƒ¼ãƒˆ9000ã§localhostã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +```bash +clickhouse-client clickhouse://default@localhost:9000 + +# equivalent to: +clickhouse-client clickhouse://localhost:9000 --user default +``` + +ãƒãƒ¼ãƒˆ9000ã§localhostã«æŽ¥ç¶šã—ã€`my_database`データベースを使用ã—ã¾ã™ã€‚ + +```bash +clickhouse-client clickhouse://localhost:9000/my_database + +# equivalent to: +clickhouse-client clickhouse://localhost:9000 --database my_database +``` + +ショートカット's' URIパラメータを使用ã—ã¦ã€æŽ¥ç¶šæ–‡å­—列ã§æŒ‡å®šã•ã‚ŒãŸ`my_database`データベースã¨ã‚»ã‚­ãƒ¥ã‚¢æŽ¥ç¶šã‚’使用ã—ã¦localhostã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +```bash +clickhouse-client clickhouse://localhost/my_database?s + +# equivalent to: +clickhouse-client clickhouse://localhost/my_database -s +``` + +デフォルトã®ãƒ›ã‚¹ãƒˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒãƒ¼ãƒˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +```bash +clickhouse-client clickhouse: +``` + +デフォルトホストã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒãƒ¼ãƒˆã‚’使用ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼`my_user`を使用ã—ã¦æŽ¥ç¶šã—ã€ãƒ‘スワードãªã—ã§æŽ¥ç¶šã—ã¾ã™ã€‚ + +```bash +clickhouse-client clickhouse://my_user@ + +# Using a blank password between : and @ means to asking user to enter the password before starting the connection. +clickhouse-client clickhouse://my_user:@ +``` + +ユーザーåã¨ã—ã¦ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’使用ã—ã¦localhostã«æŽ¥ç¶šã—ã¾ã™ã€‚'@' シンボルã¯ãƒ‘ーセントエンコードã•ã‚Œã€'%40'ã«ãªã‚Šã¾ã™ã€‚ + +```bash +clickhouse-client clickhouse://some_user%40some_mail.com@localhost:9000 +``` + +指定ã•ã‚ŒãŸãƒ›ã‚¹ãƒˆã®ä¸€ã¤ã«æŽ¥ç¶šã—ã¾ã™ï¼š`192.168.1.15`ã€`192.168.1.25`。 + +```bash +clickhouse-client clickhouse://192.168.1.15,192.168.1.25 +``` + +### 設定ファイル {#configuration_files} + +`clickhouse-client`ã¯ä»¥ä¸‹ã®æœ€åˆã«å­˜åœ¨ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ã¾ã™ï¼š + +- `--config-file`パラメータã§å®šç¾©ã•ã‚ŒãŸã€‚ +- `./clickhouse-client.xml`, `.yaml`, `.yml` +- `~/.clickhouse-client/config.xml`, `.yaml`, `.yml` +- `/etc/clickhouse-client/config.xml`, `.yaml`, `.yml` + +設定ファイルã®ä¾‹ï¼š + +```xml + + username + password + true + + + /etc/ssl/cert.pem + + + +``` + +ã¾ãŸã¯ã€YAMLå½¢å¼ã§åŒã˜è¨­å®šï¼š + +```yaml +user: username +password: 'password' +secure: true +openSSL: + client: + caConfig: '/etc/ssl/cert.pem' +``` + +### クエリIDフォーマット {#query-id-format} + +インタラクティブモードã§ã¯`clickhouse-client`ã¯å„クエリã®ã‚¯ã‚¨ãƒªIDを表示ã—ã¾ã™ã€‚デフォルトã§ã¯ã€IDã¯æ¬¡ã®ã‚ˆã†ã«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼š + +```sql +Query id: 927f137d-00f1-4175-8914-0dd066365e96 +``` + +カスタムフォーマットã¯è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«å†…ã®`query_id_formats`ã‚¿ã‚°ã§æŒ‡å®šã§ãã¾ã™ã€‚フォーマット文字列内ã®`{query_id}`プレースホルダーã¯ã‚¯ã‚¨ãƒªã®IDã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚タグ内ã«è¤‡æ•°ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列を指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã€ã‚¯ã‚¨ãƒªã®ãƒ—ロファイリングを促進ã™ã‚‹URLを生æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**例** + +```xml + + + http://speedscope-host/#profileURL=qp%3Fid%3D{query_id} + + +``` + +上記ã®è¨­å®šãŒé©ç”¨ã•ã‚Œã‚‹ã¨ã€ã‚¯ã‚¨ãƒªã®IDã¯æ¬¡ã®ã‚ˆã†ã«è¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + +```response +speedscope:http://speedscope-host/#profileURL=qp%3Fid%3Dc8ecc783-e753-4b38-97f1-42cddfb98b7d +``` diff --git a/docs/ja/interfaces/cpp.md b/docs/ja/interfaces/cpp.md new file mode 100644 index 00000000000..2c869e93708 --- /dev/null +++ b/docs/ja/interfaces/cpp.md @@ -0,0 +1,13 @@ +--- +slug: /ja/interfaces/cpp +sidebar_position: 24 +sidebar_label: C++ クライアントライブラリ +--- + +# C++ クライアントライブラリ + +[clickhouse-cpp](https://github.com/ClickHouse/clickhouse-cpp) リãƒã‚¸ãƒˆãƒªã®READMEã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +# userver éžåŒæœŸãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ + +[userver (ベータ版)](https://github.com/userver-framework/userver) ã¯ClickHouseを標準ã§ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/interfaces/formats.md b/docs/ja/interfaces/formats.md new file mode 100644 index 00000000000..e678b6c02db --- /dev/null +++ b/docs/ja/interfaces/formats.md @@ -0,0 +1,2966 @@ +--- +slug: /ja/interfaces/formats +sidebar_position: 21 +sidebar_label: ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’表示… +title: 入出力データã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ +--- + +ClickHouseã¯æ§˜ã€…ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘入れるã“ã¨ãŒã§ãã€è¿”ã™ã“ã¨ãŒã§ãã¾ã™ã€‚入力をサãƒãƒ¼ãƒˆã™ã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€`INSERT`ã«æä¾›ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®è§£æžã€Fileã‚„URLã€HDFSã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®`SELECT`ã®å®Ÿè¡Œã€ã‚‚ã—ãã¯Dictionaryã®èª­ã¿è¾¼ã¿ã«ä½¿ç”¨ã§ãã¾ã™ã€‚出力をサãƒãƒ¼ãƒˆã™ã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€`SELECT`ã®çµæžœã‚’æ•´å½¢ã™ã‚‹ã®ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ã¾ãŸã€ãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¸ã®`INSERT`を実行ã™ã‚‹ãŸã‚ã«ã‚‚使用ã§ãã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆåã¯å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るフォーマットã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +| フォーマット | 入力 | 出力 | +|-----------------------------------------------------------------------------------------------|------|-------| +| [TabSeparated](#tabseparated) | ✔ | ✔ | +| [TabSeparatedRaw](#tabseparatedraw) | ✔ | ✔ | +| [TabSeparatedWithNames](#tabseparatedwithnames) | ✔ | ✔ | +| [TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes) | ✔ | ✔ | +| [TabSeparatedRawWithNames](#tabseparatedrawwithnames) | ✔ | ✔ | +| [TabSeparatedRawWithNamesAndTypes](#tabseparatedrawwithnamesandtypes) | ✔ | ✔ | +| [Template](#format-template) | ✔ | ✔ | +| [TemplateIgnoreSpaces](#templateignorespaces) | ✔ | ✗ | +| [CSV](#csv) | ✔ | ✔ | +| [CSVWithNames](#csvwithnames) | ✔ | ✔ | +| [CSVWithNamesAndTypes](#csvwithnamesandtypes) | ✔ | ✔ | +| [CustomSeparated](#format-customseparated) | ✔ | ✔ | +| [CustomSeparatedWithNames](#customseparatedwithnames) | ✔ | ✔ | +| [CustomSeparatedWithNamesAndTypes](#customseparatedwithnamesandtypes) | ✔ | ✔ | +| [SQLInsert](#sqlinsert) | ✗ | ✔ | +| [Values](#data-format-values) | ✔ | ✔ | +| [Vertical](#vertical) | ✗ | ✔ | +| [JSON](#json) | ✔ | ✔ | +| [JSONAsString](#jsonasstring) | ✔ | ✗ | +| [JSONAsObject](#jsonasobject) | ✔ | ✗ | +| [JSONStrings](#jsonstrings) | ✔ | ✔ | +| [JSONColumns](#jsoncolumns) | ✔ | ✔ | +| [JSONColumnsWithMetadata](#jsoncolumnsmonoblock) | ✔ | ✔ | +| [JSONCompact](#jsoncompact) | ✔ | ✔ | +| [JSONCompactStrings](#jsoncompactstrings) | ✗ | ✔ | +| [JSONCompactColumns](#jsoncompactcolumns) | ✔ | ✔ | +| [JSONEachRow](#jsoneachrow) | ✔ | ✔ | +| [PrettyJSONEachRow](#prettyjsoneachrow) | ✗ | ✔ | +| [JSONEachRowWithProgress](#jsoneachrowwithprogress) | ✗ | ✔ | +| [JSONStringsEachRow](#jsonstringseachrow) | ✔ | ✔ | +| [JSONStringsEachRowWithProgress](#jsonstringseachrowwithprogress) | ✗ | ✔ | +| [JSONCompactEachRow](#jsoncompacteachrow) | ✔ | ✔ | +| [JSONCompactEachRowWithNames](#jsoncompacteachrowwithnames) | ✔ | ✔ | +| [JSONCompactEachRowWithNamesAndTypes](#jsoncompacteachrowwithnamesandtypes) | ✔ | ✔ | +| [JSONCompactStringsEachRow](#jsoncompactstringseachrow) | ✔ | ✔ | +| [JSONCompactStringsEachRowWithNames](#jsoncompactstringseachrowwithnames) | ✔ | ✔ | +| [JSONCompactStringsEachRowWithNamesAndTypes](#jsoncompactstringseachrowwithnamesandtypes) | ✔ | ✔ | +| [JSONObjectEachRow](#jsonobjecteachrow) | ✔ | ✔ | +| [BSONEachRow](#bsoneachrow) | ✔ | ✔ | +| [TSKV](#tskv) | ✔ | ✔ | +| [Pretty](#pretty) | ✗ | ✔ | +| [PrettyNoEscapes](#prettynoescapes) | ✗ | ✔ | +| [PrettyMonoBlock](#prettymonoblock) | ✗ | ✔ | +| [PrettyNoEscapesMonoBlock](#prettynoescapesmonoblock) | ✗ | ✔ | +| [PrettyCompact](#prettycompact) | ✗ | ✔ | +| [PrettyCompactNoEscapes](#prettycompactnoescapes) | ✗ | ✔ | +| [PrettyCompactMonoBlock](#prettycompactmonoblock) | ✗ | ✔ | +| [PrettyCompactNoEscapesMonoBlock](#prettycompactnoescapesmonoblock) | ✗ | ✔ | +| [PrettySpace](#prettyspace) | ✗ | ✔ | +| [PrettySpaceNoEscapes](#prettyspacenoescapes) | ✗ | ✔ | +| [PrettySpaceMonoBlock](#prettyspacemonoblock) | ✗ | ✔ | +| [PrettySpaceNoEscapesMonoBlock](#prettyspacenoescapesmonoblock) | ✗ | ✔ | +| [Prometheus](#prometheus) | ✗ | ✔ | +| [Protobuf](#protobuf) | ✔ | ✔ | +| [ProtobufSingle](#protobufsingle) | ✔ | ✔ | +| [ProtobufList](-format-avro-confluent) | ✔ | ✔ | +| [Avro](#data-format-avro) | ✔ | ✔ | +| [AvroConfluent](#data-format-avro-confluent) | ✔ | ✗ | +| [Parquet](#data-format-parquet) | ✔ | ✔ | +| [ParquetMetadata](#data-format-parquet-metadata) | ✔ | ✗ | +| [Arrow](#data-format-arrow) | ✔ | ✔ | +| [ArrowStream](#data-format-arrow-stream) | ✔ | ✔ | +| [ORC](#data-format-orc) | ✔ | ✔ | +| [One](#data-format-one) | ✔ | ✗ | +| [Npy](#data-format-npy) | ✔ | ✔ | +| [RowBinary](#rowbinary) | ✔ | ✔ | +| [RowBinaryWithNames](#rowbinarywithnamesandtypes) | ✔ | ✔ | +| [RowBinaryWithNamesAndTypes](#rowbinarywithnamesandtypes) | ✔ | ✔ | +| [RowBinaryWithDefaults](#rowbinarywithdefaults) | ✔ | ✗ | +| [Native](#native) | ✔ | ✔ | +| [Null](#null) | ✗ | ✔ | +| [XML](#xml) | ✗ | ✔ | +| [CapnProto](#capnproto) | ✔ | ✔ | +| [LineAsString](#lineasstring) | ✔ | ✔ | +| [Regexp](#data-format-regexp) | ✔ | ✗ | +| [RawBLOB](#rawblob) | ✔ | ✔ | +| [MsgPack](#msgpack) | ✔ | ✔ | +| [MySQLDump](#mysqldump) | ✔ | ✗ | +| [DWARF](#dwarf) | ✔ | ✗ | +| [Markdown](#markdown) | ✗ | ✔ | +| [Form](#form) | ✔ | ✗ | + +ClickHouse設定ã«ã‚ˆã‚Šã€ã„ãã¤ã‹ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆå‡¦ç†ãƒ‘ラメータを制御ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[設定](/docs/ja/operations/settings/settings-formats.md) セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +## TabSeparated {#tabseparated} + +TabSeparatedフォーマットã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯è¡Œã”ã¨ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚å„è¡Œã®å€¤ã¯ã‚¿ãƒ–ã§åŒºåˆ‡ã‚‰ã‚Œã€æœ€å¾Œã®å€¤ã«ã¯æ”¹è¡ŒãŒå¿…é ˆã§ã™ã€‚ユニックス形å¼ã®æ”¹è¡ŒãŒå¿…è¦ã§ã™ã€‚最後ã®è¡Œã‚‚改行をå«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚値ã¯ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ã§æ›¸ã‹ã‚Œã€å›²ã¿æ–‡å­—ã¯ã‚ã‚Šã¾ã›ã‚“。特別ãªæ–‡å­—ã¯ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã¾ã™ã€‚ + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯`TSV`ã¨ã„ã†åå‰ã§ã‚‚利用ã§ãã¾ã™ã€‚ + +`TabSeparated`フォーマットã¯ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ—ログラムやスクリプトを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã™ã€‚HTTPインターフェイスやã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ãƒãƒƒãƒãƒ¢ãƒ¼ãƒ‰ã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’使用ã—ã¦ã€ç•°ãªã‚‹DBMSé–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’転é€ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚例ãˆã°ã€MySQLã‹ã‚‰ãƒ€ãƒ³ãƒ—ã‚’å–å¾—ã—ã€ãれをClickHouseã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`TabSeparated`フォーマットã¯ã€ç·è¨ˆå€¤ï¼ˆWITH TOTALSを使用時)や極値(`extremes`ã‚’1ã«è¨­å®šæ™‚)ã®å‡ºåŠ›ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã®å ´åˆã€ç·è¨ˆå€¤ã¨æ¥µå€¤ã¯ãƒ¡ã‚¤ãƒ³ãƒ‡ãƒ¼ã‚¿ã®å¾Œã«å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚メインçµæžœã€ç·è¨ˆå€¤ã€æ¥µå€¤ã¯ã€ç©ºè¡Œã§åˆ†ã‘られã¾ã™ã€‚例: + +``` sql +SELECT EventDate, count() AS c FROM test.hits GROUP BY EventDate WITH TOTALS ORDER BY EventDate FORMAT TabSeparated +``` + +``` response +2014-03-17 1406958 +2014-03-18 1383658 +2014-03-19 1405797 +2014-03-20 1353623 +2014-03-21 1245779 +2014-03-22 1031592 +2014-03-23 1046491 + +1970-01-01 8873898 + +2014-03-17 1031592 +2014-03-23 1406958 +``` + +### データフォーマティング {#tabseparated-data-formatting} + +æ•´æ•°ã¯10進法ã§æ›¸ã‹ã‚Œã¾ã™ã€‚数値ã®å…ˆé ­ã«ã¯ã€Œ+ã€è¨˜å·ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆè§£æžæ™‚ã«ç„¡è¦–ã•ã‚Œã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ™‚ã«ã¯è¨˜éŒ²ã•ã‚Œã¾ã›ã‚“)。éžè² ã®æ•°å€¤ã«ã¯è² ç¬¦å·ã‚’ã¤ã‘ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。解æžæ™‚ã«ã¯ç©ºã®æ–‡å­—列を0ã¨è§£é‡ˆã™ã‚‹ã“ã¨ãŒè¨±ã•ã‚Œã€ã¾ãŸï¼ˆç¬¦å·ä»˜ãタイプã®å ´åˆï¼‰ãƒžã‚¤ãƒŠã‚¹è¨˜å·ã ã‘ã®æ–‡å­—列を0ã¨è§£é‡ˆã—ã¾ã™ã€‚該当ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã«åŽã¾ã‚‰ãªã„æ•°å­—ã¯ã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãªã—ã«åˆ¥ã®æ•°ã¨ã—ã¦è§£æžã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +浮動å°æ•°ç‚¹æ•°ã¯10進法ã§æ›¸ã‹ã‚Œã¾ã™ã€‚å°æ•°ç‚¹ã¯å°æ•°ã®åŒºåˆ‡ã‚Šè¨˜å·ã¨ã—ã¦ä½¿ã‚ã‚Œã¾ã™ã€‚指数表記や `inf`, `+inf`, `-inf`, `nan` ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚浮動å°æ•°ç‚¹æ•°ã®ã‚¨ãƒ³ãƒˆãƒªã¯ã€å°æ•°ç‚¹ã§å§‹ã¾ã‚‹ã‹çµ‚ã‚ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +フォーマット時ã«ã€æµ®å‹•å°æ•°ç‚¹æ•°ã®ç²¾åº¦ãŒå¤±ã‚れる場åˆãŒã‚ã‚Šã¾ã™ã€‚ +解æžæ™‚ã«ã¯ã€æ©Ÿæ¢°ã§è¡¨ç¾å¯èƒ½ãªæœ€ã‚‚è¿‘ã„数値を必ãšã—も読ã¾ãªã‘ã‚Œã°ãªã‚‰ãªã„ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +日付ã¯YYYY-MM-DDå½¢å¼ã§æ›¸ã‹ã‚Œã€ä»»æ„ã®æ–‡å­—を区切り文字ã¨ã—ã¦è§£æžã•ã‚Œã¾ã™ã€‚ +日時付ãã®æ—¥ä»˜ã¯ã€`YYYY-MM-DD hh:mm:ss`å½¢å¼ã§æ›¸ã‹ã‚Œã€ä»»æ„ã®æ–‡å­—を区切り文字ã¨ã—ã¦è§£æžã•ã‚Œã¾ã™ã€‚ +ã“ã‚Œã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ãŒèµ·å‹•ã—ãŸã¨ãã®ã‚·ã‚¹ãƒ†ãƒ ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§è¡Œã‚ã‚Œã¾ã™ï¼ˆãƒ‡ãƒ¼ã‚¿ã‚’フォーマットã™ã‚‹å´ã«ä¾å­˜ã—ã¾ã™ï¼‰ã€‚å¤æ™‚é–“ã®æ™‚ã¯æŒ‡å®šã•ã‚Œã¾ã›ã‚“。ã—ãŸãŒã£ã¦ã€ãƒ€ãƒ³ãƒ—ã«å¤æ™‚間中ã®æ™‚é–“ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã¨ã€ãƒ€ãƒ³ãƒ—ãŒãƒ‡ãƒ¼ã‚¿ã¨ä¸€è‡´ã—ãªã„ã“ã¨ãŒã‚ã‚Šã€è§£æžæ™‚ã«ã¯2ã¤ã®æ™‚é–“ã®ã†ã¡1ã¤ãŒé¸ã°ã‚Œã¾ã™ã€‚ +読ã¿å–ã‚Šæ“作中ã«ã€ä¸æ­£ãªæ—¥ä»˜ã‚„日時付ãã®æ—¥ä»˜ã¯ã€è‡ªç„¶ãªã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯nullã®æ—¥ä»˜ã‚„時間ã¨ã—ã¦è§£æžã•ã‚Œã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ã•ã‚Œã¾ã›ã‚“。 + +例外ã¨ã—ã¦ã€æ—¥æ™‚ã®è§£æžãŒ10進数æ¡ãŒ10個ã ã‘ã‹ã‚‰æˆã‚‹Unixタイムスタンプ形å¼ã§ã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚çµæžœã¯ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã«ä¾å­˜ã—ã¾ã›ã‚“。`YYYY-MM-DD hh:mm:ss`㨠`NNNNNNNNNN` ã®å½¢å¼ã¯è‡ªå‹•çš„ã«åŒºåˆ¥ã•ã‚Œã¾ã™ã€‚ + +文字列ã¯ã€ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã§ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚ŒãŸç‰¹æ®Šæ–‡å­—ã¨å…±ã«å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚出力ã«ã¯ä»¥ä¸‹ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスを使用ã—ã¾ã™: `\b`, `\f`, `\r`, `\n`, `\t`, `\0`, `\'`, `\\`. 解æžã‚‚ã¾ãŸã€ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ `\a`, `\v`, `\xHH` (16進エスケープシーケンス)ãŠã‚ˆã³ä»»æ„ã®`\c`シーケンスをサãƒãƒ¼ãƒˆã—ã€ã“ã“ã§`c`ã¯ä»»æ„ã®æ–‡å­—ã§ã™ï¼ˆã“れらã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¯`c`ã«å¤‰æ›ã•ã‚Œã¾ã™ï¼‰ã€‚ã—ãŸãŒã£ã¦ã€ãƒ‡ãƒ¼ã‚¿ã®èª­ã¿å–ã‚Šã¯ã€æ”¹è¡ŒãŒ`\n`ã¾ãŸã¯ `\`ã€ã¾ãŸã¯æ”¹è¡Œã¨ã—ã¦æ›¸ã‹ã‚Œã‚‹å½¢å¼ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚例ãˆã°ã€å˜èªžé–“ã®ã‚¹ãƒšãƒ¼ã‚¹ã®ä»£ã‚ã‚Šã«æ”¹è¡Œã‚’使用ã—ãŸ`Hello world`文字列ã¯ã€ä»¥ä¸‹ã®ã©ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã§ã‚‚解æžã§ãã¾ã™ï¼š + +```text +Hello\nworld + +Hello\ +world +``` + +2番目ã®ãƒãƒªã‚¢ãƒ³ãƒˆã¯ã€MySQLãŒã‚¿ãƒ–分割ã•ã‚ŒãŸãƒ€ãƒ³ãƒ—を書ã込むã¨ãã«ä½¿ç”¨ã™ã‚‹ãŸã‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +TabSeparatedフォーマットã§ãƒ‡ãƒ¼ã‚¿ã‚’渡ã™ã¨ãã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã™ã‚‹å¿…è¦ãŒã‚る文字ã®æœ€å°ã‚»ãƒƒãƒˆï¼šã‚¿ãƒ–ã€æ”¹è¡Œï¼ˆLF)ã€ãŠã‚ˆã³ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã€‚ + +ã”ãå°‘æ•°ã®è¨˜å·ã®ã¿ãŒã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã¾ã™ã€‚出力時ã«ã‚ãªãŸã®ã‚¿ãƒ¼ãƒŸãƒŠãƒ«ã‚’æã­ã‚‹æ–‡å­—列値ã«ç°¡å˜ã«è¡Œã当ãŸã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +é…列ã¯å››è§’ã„括弧ã§å›²ã¾ã‚ŒãŸã‚³ãƒ³ãƒžåŒºåˆ‡ã‚Šã®å€¤ãƒªã‚¹ãƒˆã¨ã—ã¦æ›¸ã‹ã‚Œã¾ã™ã€‚é…列内ã®ç•ªå·ã‚¢ã‚¤ãƒ†ãƒ ã¯é€šå¸¸é€šã‚Šæ›¸å¼ãŒè¨­å®šã•ã‚Œã¾ã™ã€‚`Date` 㨠`DateTime` åž‹ã¯ã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚©ãƒ¼ãƒˆã§å›²ã¾ã‚Œã¾ã™ã€‚文字列ã¯ä¸Šè¨˜ã¨åŒã˜ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールã§ã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚©ãƒ¼ãƒˆã§å›²ã¾ã‚Œã¾ã™ã€‚ + +[NULL](/docs/ja/sql-reference/syntax.md)ã¯[format_tsv_null_representation](/docs/ja/operations/settings/settings-formats.md/#format_tsv_null_representation)設定(デフォルト値ã¯`\N`)ã«å¾“ã£ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +入力データã«ãŠã„ã¦ã€ENUMã®å€¤ã¯åå‰ã¾ãŸã¯idã¨ã—ã¦è¡¨ç¾ã§ãã¾ã™ã€‚ã¾ãšã€å…¥åŠ›å€¤ã‚’ENUMåã«ãƒžãƒƒãƒã—よã†ã¨ã—ã¾ã™ã€‚失敗ã—ãŸå ´åˆã§ã‹ã¤å…¥åŠ›å€¤ãŒæ•°å­—ã§ã‚ã‚‹å ´åˆã€ãã®æ•°å­—ã‚’ENUM idã«ãƒžãƒƒãƒã•ã›ã‚ˆã†ã¨ã—ã¾ã™ã€‚ +入力データãŒENUM idã®ã¿ã‚’å«ã‚€å ´åˆã€ENUM解æžã‚’最é©åŒ–ã™ã‚‹ãŸã‚ã«ã€[input_format_tsv_enum_as_number](/docs/ja/operations/settings/settings-formats.md/#input_format_tsv_enum_as_number)設定を有効化ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +[Nested](/docs/ja/sql-reference/data-types/nested-data-structures/index.md)構造ã®å„è¦ç´ ã¯é…列ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +例ãˆã°ï¼š + +``` sql +CREATE TABLE nestedt +( + `id` UInt8, + `aux` Nested( + a UInt8, + b String + ) +) +ENGINE = TinyLog +``` + +``` sql +INSERT INTO nestedt Values ( 1, [1], ['a']) +``` + +``` sql +SELECT * FROM nestedt FORMAT TSV +``` + +``` response +1 [1] ['a'] +``` + +### TabSeparatedフォーマット設定 {#tabseparated-format-settings} + +- [format_tsv_null_representation](/docs/ja/operations/settings/settings-formats.md/#format_tsv_null_representation) - TSVフォーマットã§ã®NULLã®ã‚«ã‚¹ã‚¿ãƒ è¡¨ç¾ã€‚デフォルト値 - `\N`。 +- [input_format_tsv_empty_as_default](/docs/ja/operations/settings/settings-formats.md/#input_format_tsv_empty_as_default) - TSV入力ã®ç©ºãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’デフォルト値ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚デフォルト値 - `false`。複雑ãªãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå¼ã®å ´åˆã€[input_format_defaults_for_omitted_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_defaults_for_omitted_fields)も有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- [input_format_tsv_enum_as_number](/docs/ja/operations/settings/settings-formats.md/#input_format_tsv_enum_as_number) - TSVå½¢å¼ã§æŒ¿å…¥ã•ã‚ŒãŸenum値をenumインデックスã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_tsv_use_best_effort_in_schema_inference](/docs/ja/operations/settings/settings-formats.md/#input_format_tsv_use_best_effort_in_schema_inference) - TSVå½¢å¼ã§ã‚¹ã‚­ãƒ¼ãƒžã‚’推測ã™ã‚‹ãŸã‚ã«ã„ãã¤ã‹ã®èª¿æ•´ã¨ãƒ’ューリスティックを使用ã—ã¾ã™ã€‚無効化ã•ã‚Œã‚‹ã¨ã€ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯æ–‡å­—列ã¨ã—ã¦æŽ¨æ¸¬ã•ã‚Œã¾ã™ã€‚デフォルト値 - `true`。 +- [output_format_tsv_crlf_end_of_line](/docs/ja/operations/settings/settings-formats.md/#output_format_tsv_crlf_end_of_line) - TSV出力形å¼ã§è¡Œæœ«ã‚’`\r\n`ã«ã™ã‚‹å ´åˆã¯trueã«è¨­å®šã€‚デフォルト値 - `false`。 +- [input_format_tsv_crlf_end_of_line](/docs/ja/operations/settings/settings-formats.md/#input_format_tsv_crlf_end_of_line) - TSV入力形å¼ã§è¡Œæœ«ã‚’`\r\n`ã«ã™ã‚‹å ´åˆã¯trueã«è¨­å®šã€‚デフォルト値 - `false`。 +- [input_format_tsv_skip_first_lines](/docs/ja/operations/settings/settings-formats.md/#input_format_tsv_skip_first_lines) - データã®æœ€åˆã®è¡Œã‚’指定ã•ã‚ŒãŸæ•°ã ã‘スキップã—ã¾ã™ã€‚デフォルト値 - `0`。 +- [input_format_tsv_detect_header](/docs/ja/operations/settings/settings-formats.md/#input_format_tsv_detect_header) - TSVå½¢å¼ã§åå‰ã¨ã‚¿ã‚¤ãƒ—ã‚’å«ã‚€ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’自動的ã«æ¤œå‡ºã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_tsv_skip_trailing_empty_lines](/docs/ja/operations/settings/settings-formats.md/#input_format_tsv_skip_trailing_empty_lines) - データã®æœ«å°¾ã®ç©ºè¡Œã‚’スキップã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_tsv_allow_variable_number_of_columns](/docs/ja/operations/settings/settings-formats.md/#input_format_tsv_allow_variable_number_of_columns) - TSVå½¢å¼ã§ã‚«ãƒ©ãƒ æ•°ã‚’変動å¯èƒ½ã«ã—ã¾ã™ã€‚余分ãªã‚«ãƒ©ãƒ ã‚’無視ã—ã€æ¬ è½ã—ãŸã‚«ãƒ©ãƒ ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’使用。デフォルト値 - `false`。 + +## TabSeparatedRaw {#tabseparatedraw} + +`TabSeparated`フォーマットã¨ç•°ãªã‚Šã€è¡Œã¯ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ãªã—ã§æ›¸ãè¾¼ã¾ã‚Œã‚‹ã€‚ +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã®è§£æžã§ã¯ã€å„フィールドã«ã‚¿ãƒ–や改行をå«ã‚€ã“ã¨ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯`TSVRaw`ã€`Raw`ã¨ã„ã†åå‰ã§ã‚‚利用ã§ãã¾ã™ã€‚ + +## TabSeparatedWithNames {#tabseparatedwithnames} + +`TabSeparated`フォーマットã¨ç•°ãªã‚Šã€ã‚«ãƒ©ãƒ åãŒæœ€åˆã®è¡Œã«æ›¸ã‹ã‚Œã¾ã™ã€‚ + +解æžä¸­ã€æœ€åˆã®è¡Œã¯ã‚«ãƒ©ãƒ åã‚’å«ã‚€ã“ã¨ã‚’期待ã•ã‚Œã¦ã„ã¾ã™ã€‚カラムåを使用ã—ã¦ä½ç½®ã‚’決定ã—ãŸã‚Šã€æ­£ç¢ºæ€§ã‚’確èªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +設定 [input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã€ä¸æ˜Žãªåå‰ã®ã‚«ãƒ©ãƒ ã¯ã€è¨­å®š [input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã€æœ€åˆã®è¡Œã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯`TSVWithNames`ã¨ã„ã†åå‰ã§ã‚‚利用ã§ãã¾ã™ã€‚ + +## TabSeparatedWithNamesAndTypes {#tabseparatedwithnamesandtypes} + +`TabSeparated`フォーマットã¨ç•°ãªã‚Šã€ã‚«ãƒ©ãƒ åã¯æœ€åˆã®è¡Œã«æ›¸ã‹ã‚Œã€ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã¯2行目ã«æ›¸ã‹ã‚Œã¾ã™ã€‚ + +:::note +設定 [input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã€ä¸æ˜Žãªåå‰ã®ã‚«ãƒ©ãƒ ã¯ã€è¨­å®š [input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã€æœ€åˆã®è¡Œã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +設定 [input_format_with_types_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_types_use_header) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚¿ã‚¤ãƒ—ã¯å¯¾å¿œã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã¨æ¯”較ã•ã‚Œã¾ã™ã€‚ãれ以外ã®å ´åˆã€2行目ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯`TSVWithNamesAndTypes`ã¨ã„ã†åå‰ã§ã‚‚利用ã§ãã¾ã™ã€‚ + +## TabSeparatedRawWithNames {#tabseparatedrawwithnames} + +`TabSeparatedWithNames`フォーマットã¨ç•°ãªã‚Šã€è¡Œã¯ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ãªã—ã§æ›¸ã‹ã‚Œã¾ã™ã€‚ +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã®è§£æžã§ã¯ã€å„フィールドã«ã‚¿ãƒ–や改行をå«ã‚€ã“ã¨ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯`TSVRawWithNames`ã€`RawWithNames`ã¨ã„ã†åå‰ã§ã‚‚利用ã§ãã¾ã™ã€‚ + +## TabSeparatedRawWithNamesAndTypes {#tabseparatedrawwithnamesandtypes} + +`TabSeparatedWithNamesAndTypes`フォーマットã¨ç•°ãªã‚Šã€è¡Œã¯ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ãªã—ã§æ›¸ã‹ã‚Œã¾ã™ã€‚ +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã®è§£æžã§ã¯ã€å„フィールドã«ã‚¿ãƒ–や改行をå«ã‚€ã“ã¨ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯`TSVRawWithNamesAndNames`ã€`RawWithNamesAndNames`ã¨ã„ã†åå‰ã§ã‚‚利用ã§ãã¾ã™ã€‚ + +## Template {#format-template} + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールをæŒã¤å€¤ã®ãƒ—レースホルダーを使用ã—ã¦ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列を指定ã§ãã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +設定ã¯`format_template_resultset`ã€`format_template_row`(`format_template_row_format`)ã€`format_template_rows_between_delimiter`ã¨ã€ãã®ä»–ã®ã„ãã¤ã‹ã®å½¢å¼ã®è¨­å®šï¼ˆä¾‹ï¼š`JSON`エスケープ使用時ã®`output_format_json_quote_64bit_integers`)。 + +設定`format_template_row`ã¯ã€æ¬¡ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’æŒã¤è¡Œã«å¯¾ã™ã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列をå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘スを指定ã—ã¾ã™ï¼š + +`delimiter_1${column_1:serializeAs_1}delimiter_2${column_2:serializeAs_2} ... delimiter_N`〠+ +ã“ã“ã§`delimiter_i`ã¯å€¤é–“ã®ãƒ‡ãƒªãƒŸã‚¿ï¼ˆ`$`シンボル㯠`$$`ã§ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—å¯èƒ½ï¼‰ã€ +`column_i`ã¯é¸æŠžã¾ãŸã¯æŒ¿å…¥ã•ã‚Œã‚‹å€¤ã®ã‚«ãƒ©ãƒ åã¾ãŸã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ï¼ˆç©ºã®å ´åˆã€ãã®ã‚«ãƒ©ãƒ ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã‚‹ï¼‰ã€ +`serializeAs_i`ã¯ã‚«ãƒ©ãƒ å€¤ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールをæ„味ã—ã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã‚‹ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +- `CSV`, `JSON`, `XML`(åŒã˜åå‰ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«é¡žä¼¼ï¼‰ +- `Escaped`(`TSV`ã«é¡žä¼¼ï¼‰ +- `Quoted`(`Values`ã«é¡žä¼¼ï¼‰ +- `Raw`(エスケープãªã—ã€`TSVRaw`ã«é¡žä¼¼ï¼‰ +- `None`(エスケープルールãªã—ã€è©³ç´°ã¯å¾Œè¿°ï¼‰ + +エスケープルールãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€`None`ãŒåˆ©ç”¨ã•ã‚Œã¾ã™ã€‚`XML`ã¯å‡ºåŠ›ã«ã®ã¿é©ã—ã¦ã„ã¾ã™ã€‚ + +ã—ãŸãŒã£ã¦ã€æ¬¡ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列: + + `Search phrase: ${SearchPhrase:Quoted}, count: ${c:Escaped}, ad price: $$${price:JSON};` + +ã§ã¯ã€`SearchPhrase`ã€`c`ã€`price`カラムã®å€¤ãŒ `Quoted`ã€`Escaped`ã€`JSON` ã¨ã—ã¦ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã€`Search phrase:`ã€`, count:`ã€`, ad price: $`ã€`;`ã®ãƒ‡ãƒªãƒŸã‚¿é–“ã«ï¼ˆé¸æŠž/挿入フォーマット時ã«ï¼‰å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚例ãˆã°ï¼š + +`Search phrase: 'bathroom interior design', count: 2166, ad price: $3;` + +クラスタ内ã®ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã«ãƒ†ãƒ³ãƒ—レートフォーマットã®å‡ºåŠ›è¨­å®šã‚’é…ç½®ã™ã‚‹ã“ã¨ãŒæŒ‘戦的ã¾ãŸã¯å¯èƒ½ã§ãªã„å ´åˆã‚„ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒç°¡å˜ãªå ´åˆã¯ã€`format_template_row_format`を使用ã—ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘スã§ã¯ãªãã€ã‚¯ã‚¨ãƒªå†…ã§ç›´æŽ¥ãƒ†ãƒ³ãƒ—レート文字列を設定ã§ãã¾ã™ã€‚ + +設定`format_template_rows_between_delimiter`ã¯ã€è¡Œé–“ã®ãƒ‡ãƒªãƒŸã‚¿ã‚’指定ã—ã€æœ€å¾Œã®è¡Œä»¥å¤–ã®ã™ã¹ã¦ã®è¡Œã®å¾Œã«å°åˆ·ã•ã‚Œã‚‹ï¼ˆã‚‚ã—ãã¯æœŸå¾…ã•ã‚Œã‚‹ï¼‰ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯`\n`)設定ã§ã™ã€‚ + +設定`format_template_resultset`ã¯ã€çµæžœã‚»ãƒƒãƒˆã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列をå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘スを指定ã—ã¾ã™ã€‚設定`format_template_resultset_format`ã¯ã€çµæžœã‚»ãƒƒãƒˆã®ãƒ†ãƒ³ãƒ—レート文字列をクエリ内ã§ç›´æŽ¥è¨­å®šã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã«ã—ã¾ã™ã€‚çµæžœã‚»ãƒƒãƒˆã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列ã«ã¯ã€è¡Œç”¨ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列ã¨åŒã˜ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãŒã‚ã‚Šã¾ã™ã€‚プレフィックスã€ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ã€è¿½åŠ æƒ…å ±ã®æ–¹æ³•ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚カラムåã®ä»£ã‚ã‚Šã«æ¬¡ã®ãƒ—レースホルダーをå«ã‚€ï¼š + +- `data`ã¯ã€`format_template_row`フォーマットã§ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤è¡Œã§ã€`format_template_rows_between_delimiter`ã§åˆ†å‰²ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ—レースホルダーã¯ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列ã§æœ€åˆã®ãƒ—レースホルダーã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +- `totals`ã¯ã€`format_template_row`フォーマットã®åˆè¨ˆå€¤ã®è¡Œã§ã™ï¼ˆWITH TOTALS使用時) +- `min`ã¯ã€`format_template_row`フォーマットã®æœ€å°å€¤ã®è¡Œã§ã™ï¼ˆæ¥µé™ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ã¨ã) +- `max`ã¯ã€`format_template_row`フォーマットã®æœ€å¤§å€¤ã®è¡Œã§ã™ï¼ˆæ¥µé™ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ã¨ã) +- `rows`ã¯ã€å‡ºåŠ›è¡Œã®ç·æ•° +- `rows_before_limit`ã¯ã€LIMITãªã—ã®å ´åˆã§ã‚‚å°‘ãªãã¨ã‚‚ã‚る行数。クエリã«LIMITãŒå«ã¾ã‚Œã‚‹å ´åˆã®ã¿å‡ºåŠ›ã—ã¾ã™ã€‚GROUP BYãŒå«ã¾ã‚Œã‚‹å ´åˆã€LIMITãŒãªã‘ã‚Œã°ã€`rows_before_limit_at_least`ã¯æ­£ç¢ºãªè¡Œæ•°ã§ã™ã€‚ +- `time`ã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å®Ÿè¡Œæ™‚間(秒) +- `rows_read`ã¯ã€èª­ã¿å–られãŸè¡Œã®æ•° +- `bytes_read`ã¯ã€èª­ã¿å–られãŸãƒã‚¤ãƒˆæ•°ï¼ˆéžåœ§ç¸®ï¼‰ + +プレースホルダー`data`ã€`totals`ã€`min`ã€ãŠã‚ˆã³`max`ã«ã¯ã€ã‚¨ã‚¹ì¼€ãƒ¼ãƒ—ルールãŒæŒ‡å®šã•ã‚Œã¦ã¯ãªã‚Šã¾ã›ã‚“(ã¾ãŸã¯`None`ãŒæ˜Žç¤ºçš„ã«æŒ‡å®šã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚残りã®ãƒ—レースホルダーã«ã¯ã€ä»»æ„ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールãŒæŒ‡å®šã§ãã¾ã™ã€‚ +`format_template_resultset`設定ãŒç©ºã®æ–‡å­—列ã®å ´åˆã€`${data}`ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +挿入クエリã«å¯¾ã™ã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€ãƒ—レフィックスやサフィックスãŒã‚ã‚Œã°ã€ä¸€éƒ¨ã®ã‚«ãƒ©ãƒ ã‚„フィールドをスキップã§ãるよã†ã«ã—ã¦ã„ã¾ã™ï¼ˆä¾‹ã‚’å‚照)。 + +é¸æŠžä¾‹ï¼š + +``` sql +SELECT SearchPhrase, count() AS c FROM test.hits GROUP BY SearchPhrase ORDER BY c DESC LIMIT 5 FORMAT Template SETTINGS +format_template_resultset = '/some/path/resultset.format', format_template_row = '/some/path/row.format', format_template_rows_between_delimiter = '\n ' +``` + +`/some/path/resultset.format`: + +``` text + + Search phrases + + + + ${data} +
    Search phrases
    Search phrase Count
    + + ${max} +
    Max
    + Processed ${rows_read:XML} rows in ${time:XML} sec + + +``` + +`/some/path/row.format`: + +``` text + ${0:XML} ${1:XML} +``` + +çµæžœï¼š + +``` html + + Search phrases + + + + + + + +
    Search phrases
    Search phrase Count
    bathroom interior design 2166
    clickhouse 1655
    spring 2014 fashion 1549
    freeform photos 1480
    + + +
    Max
    8873898
    + Processed 3095973 rows in 0.1569913 sec + + +``` + +挿入例: + +``` text +Some header +Page views: 5, User id: 4324182021466249494, Useless field: hello, Duration: 146, Sign: -1 +Page views: 6, User id: 4324182021466249494, Useless field: world, Duration: 185, Sign: 1 +Total rows: 2 +``` + +``` sql +INSERT INTO UserActivity SETTINGS +format_template_resultset = '/some/path/resultset.format', format_template_row = '/some/path/row.format' +FORMAT Template +``` + +`/some/path/resultset.format`: + +``` text +Some header\n${data}\nTotal rows: ${:CSV}\n +``` + +`/some/path/row.format`: + +``` text +Page views: ${PageViews:CSV}, User id: ${UserID:CSV}, Useless field: ${:CSV}, Duration: ${Duration:CSV}, Sign: ${Sign:CSV} +``` + +`PageViews`ã€`UserID`ã€`Duration`ã€ãŠã‚ˆã³`Sign`ã¯ãƒ†ãƒ¼ãƒ–ル内ã®ã‚«ãƒ©ãƒ åã§ã™ã€‚行内ã®`Useless field`ã®å¾Œã‚„サフィックスã®`\nTotal rows:`ã®å¾Œã®å€¤ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +入力データã®ã™ã¹ã¦ã®ãƒ‡ãƒªãƒŸã‚¿ã¯ã€æŒ‡å®šã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列ã®ãƒ‡ãƒªãƒŸã‚¿ã¨åŽ³å¯†ã«ç­‰ã—ã„å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## TemplateIgnoreSpaces {#templateignorespaces} + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯å…¥åŠ›å°‚用ã§ã™ã€‚ +`Template`ã«ä¼¼ã¦ã„ã¾ã™ãŒã€å…¥åŠ›ã‚¹ãƒˆãƒªãƒ¼ãƒ ã®ãƒ‡ãƒªãƒŸã‚¿ã¨å€¤ã®é–“ã®ç©ºç™½æ–‡å­—をスキップã—ã¾ã™ã€‚ãŸã ã—ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列ã«ç©ºç™½æ–‡å­—ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã“れらã®æ–‡å­—ã¯ã€å…¥åŠ›ã‚¹ãƒˆãƒªãƒ¼ãƒ ã§æœŸå¾…ã•ã‚Œã¾ã™ã€‚ã¾ãŸã€ã„ãã¤ã‹ã®ãƒ‡ãƒªãƒŸã‚¿ã‚’別々ã«åˆ†ã‘ã‚‹ãŸã‚ã«ã€ç©ºã®ãƒ—レースホルダー(`${}`ã¾ãŸã¯`${:None}`)を指定ã™ã‚‹ã“ã¨ã‚‚許å¯ã—ã¾ã™ã€‚ã“ã®ã‚ˆã†ãªãƒ—レースホルダーã¯ã€ç©ºç™½æ–‡å­—をスキップã™ã‚‹ã ã‘ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ãã®ãŸã‚ã€ã™ã¹ã¦ã®è¡Œã§ã®ã‚«ãƒ©ãƒ å€¤ã®é †åºãŒåŒã˜å ´åˆã€`JSON`を読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€JSONフォーマットã®ä¾‹ã‹ã‚‰å‡ºåŠ›ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ãŸã‚ã®å½¢å¼ã¨ã—ã¦ã€ä»¥ä¸‹ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒä½¿ç”¨ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ï¼š + +``` sql +INSERT INTO table_name SETTINGS +format_template_resultset = '/some/path/resultset.format', format_template_row = '/some/path/row.format', format_template_rows_between_delimiter = ',' +FORMAT TemplateIgnoreSpaces +``` + +`/some/path/resultset.format`: + +``` text +{${}"meta"${}:${:JSON},${}"data"${}:${}[${data}]${},${}"totals"${}:${:JSON},${}"extremes"${}:${:JSON},${}"rows"${}:${:JSON},${}"rows_before_limit_at_least"${}:${:JSON}${}} +``` + +`/some/path/row.format`: + +``` text +{${}"SearchPhrase"${}:${}${phrase:JSON}${},${}"c"${}:${}${cnt:JSON}${}} +``` + +## TSKV {#tskv} + +TabSeparatedã«ä¼¼ã¦ã„ã¾ã™ãŒã€å€¤ã‚’åå‰=valueå½¢å¼ã§å‡ºåŠ›ã—ã¾ã™ã€‚åå‰ã¯TabSeparatedフォーマットã¨åŒæ§˜ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã€=`記å·ã‚‚エスケープã•ã‚Œã¾ã™ã€‚ + +``` text +SearchPhrase= count()=8267016 +SearchPhrase=bathroom interior design count()=2166 +SearchPhrase=clickhouse count()=1655 +SearchPhrase=2014 spring fashion count()=1549 +SearchPhrase=freeform photos count()=1480 +SearchPhrase=angelina jolie count()=1245 +SearchPhrase=omsk count()=1112 +SearchPhrase=photos of dog breeds count()=1091 +SearchPhrase=curtain designs count()=1064 +SearchPhrase=baku count()=1000 +``` + +[NULL](/docs/ja/sql-reference/syntax.md)ã¯`\N`ã¨ã—ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +``` sql +SELECT * FROM t_null FORMAT TSKV +``` + +``` text +x=1 y=\N +``` + +å°ã•ãªã‚«ãƒ©ãƒ ãŒå¤šæ•°ã‚ã‚‹å ´åˆã€ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯éžåŠ¹çŽ‡çš„ã§ã™ã—ã€é€šå¸¸ä½¿ç”¨ã™ã‚‹ç†ç”±ã¯ã‚ã‚Šã¾ã›ã‚“。ãã‚Œã«ã‚‚ã‹ã‹ã‚らãšã€åŠ¹çŽ‡ã«ãŠã„ã¦JSONEachRowã«åŠ£ã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。 + +データã®å‡ºåŠ›ã¨è§£æžã®ä¸¡æ–¹ãŒã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚解æžä¸­ã¯ã€ç•°ãªã‚‹ã‚«ãƒ©ãƒ ã®å€¤ã®é †åºã¯ä»»æ„ã§ã™ã€‚一部ã®å€¤ãŒçœç•¥ã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒè¨±å¯ã•ã‚Œã¦ãŠã‚Šã€ãれらã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¨åŒç­‰ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ã“ã®å ´åˆã€é›¶ã‚„空白行ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚テーブルã«æŒ‡å®šã•ã‚Œã†ã‚‹è¤‡é›‘ãªå€¤ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +解æžãŒ`tskv`ã¨ã„ã†è¿½åŠ ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®å­˜åœ¨ã‚’許å¯ã—ã¾ã™ã€‚ã“ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯å®Ÿéš›ã«ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + +インãƒãƒ¼ãƒˆä¸­ã«ã€ä¸æ˜Žãªåå‰ã®ã‚«ãƒ©ãƒ ã¯ã€è¨­å®š[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ + +## CSV {#csv} + +コンマ区切り値形å¼ï¼ˆ[RFC](https://tools.ietf.org/html/rfc4180))。 + +書å¼è¨­å®šæ™‚ã€è¡Œã¯äºŒé‡å¼•ç”¨ç¬¦ã§å›²ã¾ã‚Œã¾ã™ã€‚文字列内ã®äºŒé‡å¼•ç”¨ç¬¦ã¯ã€äºŒé‡å¼•ç”¨ç¬¦åˆ—ã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ä»–ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—文字ã«é–¢ã™ã‚‹ãƒ«ãƒ¼ãƒ«ã¯ã‚ã‚Šã¾ã›ã‚“。日付ã¨æ—¥æ™‚ã¯äºŒé‡å¼•ç”¨ç¬¦ã§å›²ã¾ã‚Œã¾ã™ã€‚数値ã¯å¼•ç”¨ç¬¦ãªã—ã§å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚値ã¯ãƒ‡ãƒªãƒŸã‚¿æ–‡å­—ã§åˆ†å‰²ã•ã‚Œã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯`,`ã§ã™ã€‚デリミタ文字ã¯è¨­å®š[format_csv_delimiter](/docs/ja/operations/settings/settings-formats.md/#format_csv_delimiter)ã§å®šç¾©ã•ã‚Œã¾ã™ã€‚è¡Œã®åŒºåˆ‡ã‚Šã«ã¯Unixã®æ”¹è¡Œï¼ˆLF)ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚é…列ã¯ã€æœ€åˆã«TabSeparatedå½¢å¼ã§æ–‡å­—列ã¨ã—ã¦ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã—ãŸå¾Œã€çµæžœã®æ–‡å­—列を二é‡å¼•ç”¨ç¬¦ã§å›²ã‚“ã§å‡ºåŠ›ã—ã¾ã™ã€‚CSVå½¢å¼ã§ã¯ã€ã‚¿ãƒ—ルã¯åˆ¥ã®ã‚«ãƒ©ãƒ ã¨ã—ã¦ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œã¾ã™ï¼ˆæ•…ã«ã€ã‚¿ãƒ—ル内部ã®ãƒã‚¹ãƒˆã¯å¤±ã‚ã‚Œã¾ã™ï¼‰ã€‚ + +```bash +$ clickhouse-client --format_csv_delimiter="|" --query="INSERT INTO test.csv FORMAT CSV" < data.csv +``` + +\*デフォルトã§ã¯ã€ãƒ‡ãƒªãƒŸã‚¿ã¯`,`ã§ã™ã€‚詳細ã«ã¤ã„ã¦ã¯[format_csv_delimiter](/docs/ja/operations/settings/settings-formats.md/#format_csv_delimiter)設定をå‚ç…§ã—ã¦ãã ã•ã„。 + +解æžæ™‚ã€ã™ã¹ã¦ã®å€¤ã¯å¼•ç”¨ç¬¦ã‚ã‚Šã¾ãŸã¯å¼•ç”¨ç¬¦ãªã—ã§è§£æžã§ãã¾ã™ã€‚ダブル引用符ãŠã‚ˆã³ã‚·ãƒ³ã‚°ãƒ«å¼•ç”¨ç¬¦ã®ä¸¡æ–¹ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚行も引用符ãªã—ã§é…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã€ãれを区切り文字ã¾ãŸã¯æ”¹è¡Œï¼ˆCRã¾ãŸã¯LF)ã¾ã§è§£æžã—ã¾ã™ã€‚RFCã«é•åã—ã¦ã€å¼•ç”¨ç¬¦ãªã—ã®è¡Œè§£æžä¸­ã«ã€å…ˆé ­ãŠã‚ˆã³æœ«å°¾ã®ã‚¹ãƒšãƒ¼ã‚¹ãŠã‚ˆã³ã‚¿ãƒ–ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚改行ã®ç¨®é¡žã«é–¢ã—ã¦ã¯ã€Unix(LF)ã€Windows(CR LF)ã€ãŠã‚ˆã³Mac OS Classic(CR LF)ãŒã™ã¹ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +`NULL`ã¯è¨­å®š[format_csv_null_representation](/docs/ja/operations/settings/settings-formats.md/#format_tsv_null_representation)(デフォルト値ã¯`\N`)ã«å¾“ã£ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +入力データã«ãŠã„ã¦ã€ENUMã®å€¤ã¯åå‰ã¾ãŸã¯idã¨ã—ã¦è¡¨ç¾ã§ãã¾ã™ã€‚最åˆã«å…¥åŠ›å€¤ã‚’ENUMåã«åˆã‚ã›ã‚ˆã†ã¨ã—ã€å¤±æ•—ã—ã€å€¤ãŒæ•°å€¤ã§ã‚ã‚‹å ´åˆã€ENUM idã«åˆã‚ã›ã‚ˆã†ã¨ã—ã¾ã™ã€‚ +入力データãŒENUM idã®ã¿ã‚’å«ã‚€å ´åˆã€ENUM解æžã‚’最é©åŒ–ã™ã‚‹ãŸã‚ã«ã€[input_format_csv_enum_as_number](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_enum_as_number)設定を有効化ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +CSVå½¢å¼ã¯ã€`TabSeparated`ã¨åŒæ§˜ã«ã€åˆè¨ˆã‚„極値ã®å‡ºåŠ›ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### CSVフォーマット設定 {#csv-format-settings} + +- [format_csv_delimiter](/docs/ja/operations/settings/settings-formats.md/#format_csv_delimiter) - CSVデータã§ãƒ‡ãƒªãƒŸã‚¿ã¨è¦‹ãªã•ã‚Œã‚‹æ–‡å­—。デフォルト値 - `,`。 +- [format_csv_allow_single_quotes](/docs/ja/operations/settings/settings-formats.md/#format_csv_allow_single_quotes) - シングルクォート内ã®æ–‡å­—列を許å¯ã€‚デフォルト値 - `true`。 +- [format_csv_allow_double_quotes](/docs/ja/operations/settings/settings-formats.md/#format_csv_allow_double_quotes) - ダブルクォート内ã®æ–‡å­—列を許å¯ã€‚デフォルト値 - `true`。 +- [format_csv_null_representation](/docs/ja/operations/settings/settings-formats.md/#format_tsv_null_representation) - CSVフォーマット内ã®NULLã®ã‚«ã‚¹ã‚¿ãƒ è¡¨ç¾ã€‚デフォルト値 - `\N`。 +- [input_format_csv_empty_as_default](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_empty_as_default) - CSV入力ã®ç©ºãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’デフォルト値ã¨ã—ã¦æ‰±ã†ã€‚デフォルト値 - `true`。複雑ãªãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå¼ã®å ´åˆã€[input_format_defaults_for_omitted_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_defaults_for_omitted_fields)も有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- [input_format_csv_enum_as_number](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_enum_as_number) - CSVå½¢å¼ã§æŒ¿å…¥ã•ã‚ŒãŸenum値をenumインデックスã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_csv_use_best_effort_in_schema_inference](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_use_best_effort_in_schema_inference) - CSVå½¢å¼ã§ã‚¹ã‚­ãƒ¼ãƒžã‚’推測ã™ã‚‹ãŸã‚ã®ã„ãã¤ã‹ã®èª¿æ•´ã‚„ヒューリスティックを使用ã—ã¾ã™ã€‚無効化ã•ã‚Œã‚‹ã¨ã€ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯æ–‡å­—列ã¨ã—ã¦æŽ¨æ¸¬ã•ã‚Œã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_csv_arrays_as_nested_csv](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_arrays_as_nested_csv) - CSVã‹ã‚‰Arrayを読ã¿å–ã‚‹éš›ã«ã€ãã‚Œã®è¦ç´ ãŒãƒã‚¹ãƒˆã•ã‚ŒãŸCSVã¨ã—ã¦ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œã€ãã‚Œã‹ã‚‰æ–‡å­—列ã«å…¥ã‚Œã‚‰ã‚Œã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [output_format_csv_crlf_end_of_line](/docs/ja/operations/settings/settings-formats.md/#output_format_csv_crlf_end_of_line) - trueã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€CSV出力形å¼ã®è¡Œã®çµ‚了ã¯`\r\n`ã¨ãªã‚Šã€`\n`ã§ã¯ã‚ã‚Šã¾ã›ã‚“。デフォルト値 - `false`。 +- [input_format_csv_skip_first_lines](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_skip_first_lines) - データã®æœ€åˆã«æŒ‡å®šã•ã‚ŒãŸæ•°ã®è¡Œã‚’スキップã—ã¾ã™ã€‚デフォルト値 - `0`。 +- [input_format_csv_detect_header](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_detect_header) - CSVå½¢å¼ã§åå‰ã¨ã‚¿ã‚¤ãƒ—ã‚’å«ã‚€ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’自動的ã«æ¤œå‡ºã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_csv_skip_trailing_empty_lines](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_skip_trailing_empty_lines) - データã®æœ«å°¾ã®ç©ºè¡Œã‚’スキップã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_csv_trim_whitespaces](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_trim_whitespaces) - éžå¼•ç”¨ã•ã‚ŒãŸCSV文字列内ã®ã‚¹ãƒšãƒ¼ã‚¹ã‚„タブをトリムã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_csv_allow_whitespace_or_tab_as_delimiter](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_allow_whitespace_or_tab_as_delimiter) - CSV文字列内ã§ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãƒ‡ãƒªãƒŸã‚¿ã¨ã—ã¦ãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ã‚„タブを使用ã§ãるよã†ã«ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_csv_allow_variable_number_of_columns](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_allow_variable_number_of_columns) - CSVå½¢å¼ã§ã‚«ãƒ©ãƒ æ•°ã‚’変動å¯èƒ½ã«ã—ã€ä½™åˆ†ãªã‚«ãƒ©ãƒ ã¯ç„¡è¦–ã—ã€æ¬ è½ã—ãŸã‚«ãƒ©ãƒ ã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’使用。デフォルト値 - `false`。 +- [input_format_csv_use_default_on_bad_values](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_use_default_on_bad_values) - CSVフィールドã®ä¸æ­£ãªå€¤ã®ãƒ‡ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºãŒå¤±æ•—ã—ãŸã¨ãã€ã‚«ãƒ©ãƒ ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’設定ã§ãるよã†ã«ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_csv_try_infer_numbers_from_strings](/docs/ja/operations/settings/settings-formats.md/#input_format_csv_try_infer_numbers_from_strings) - スキーマ推測中ã«æ–‡å­—列フィールドã‹ã‚‰æ•°å€¤ã‚’推測ã—よã†ã¨ã—ã¾ã™ã€‚デフォルト値 - `false`。 + +## CSVWithNames {#csvwithnames} + +カラムåã§ãƒ˜ãƒƒãƒ€ãƒ¼è¡Œã‚‚出力ã—ã¾ã™ã€‚[TabSeparatedWithNames](#tabseparatedwithnames)ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +:::note +設定 [input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã€ä¸æ˜Žãªåå‰ã®ã‚«ãƒ©ãƒ ã¯ã€è¨­å®š [input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã€æœ€åˆã®è¡Œã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +## CSVWithNamesAndTypes {#csvwithnamesandtypes} + +カラムåã¨ã‚¿ã‚¤ãƒ—ã¨å…±ã«2ã¤ã®ãƒ˜ãƒƒãƒ€ãƒ¼è¡Œã‚’書ãè¾¼ã¿ã¾ã™ã€‚ã“ã‚Œã¯[TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes)ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +:::note +設定 [input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã€ä¸æ˜Žãªåå‰ã®ã‚«ãƒ©ãƒ ã¯ã€è¨­å®š [input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã€æœ€åˆã®è¡Œã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +設定 [input_format_with_types_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_types_use_header) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚¿ã‚¤ãƒ—ã¯å¯¾å¿œã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã¨æ¯”較ã•ã‚Œã¾ã™ã€‚ãれ以外ã®å ´åˆã€2行目ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +## CustomSeparated {#format-customseparated} + +[Template](#format-template)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã®åå‰ã¨ã‚¿ã‚¤ãƒ—ã‚’å°åˆ·ã‚‚ã—ãã¯èª­ã¿å–ã‚Šã€ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールã¯[format_custom_escaping_rule](/docs/ja/operations/settings/settings-formats.md/#format_custom_escaping_rule)設定ã€ãƒ‡ãƒªãƒŸã‚¿ã¯[format_custom_field_delimiter](/docs/ja/operations/settings/settings-formats.md/#format_custom_field_delimiter)ã€[format_custom_row_before_delimiter](/docs/ja/operations/settings/settings-formats.md/#format_custom_row_before_delimiter)ã€[format_custom_row_after_delimiter](/docs/ja/operations/settings/settings-formats.md/#format_custom_row_after_delimiter)ã€[format_custom_row_between_delimiter](/docs/ja/operations/settings/settings-formats.md/#format_custom_row_between_delimiter)ã€[format_custom_result_before_delimiter](/docs/ja/operations/settings/settings-formats.md/#format_custom_result_before_delimiter)ãŠã‚ˆã³[format_custom_result_after_delimiter](/docs/ja/operations/settings/settings-formats.md/#format_custom_result_after_delimiter)ã‹ã‚‰å–å¾—ã—ã¾ã™ãŒã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列ã‹ã‚‰ã¯å–å¾—ã—ã¾ã›ã‚“。 + +追加設定: +- [input_format_custom_detect_header](/docs/ja/operations/settings/settings-formats.md/#input_format_custom_detect_header) - ヘッダを自動的ã«æ¤œå‡ºã™ã‚‹ã“ã¨ã‚’有効ã«ã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_custom_skip_trailing_empty_lines](/docs/ja/operations/settings/settings-formats.md/#input_format_custom_skip_trailing_empty_lines) - ファイル末尾ã®ç©ºè¡Œã‚’スキップã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_custom_allow_variable_number_of_columns](/docs/ja/operations/settings/settings-formats.md/#input_format_custom_allow_variable_number_of_columns) - カスタムセパレーテッド形å¼ã§ã‚«ãƒ©ãƒ æ•°ã‚’変動å¯èƒ½ã«ã—ã€ä½™åˆ†ãªã‚«ãƒ©ãƒ ã¯ç„¡è¦–ã—ã€æ¬ è½ã—ãŸã‚«ãƒ©ãƒ ã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’使用。デフォルト値 - `false`。 + +ã¾ãŸã€[TemplateIgnoreSpaces](#templateignorespaces)ã«é¡žä¼¼ã™ã‚‹`CustomSeparatedIgnoreSpaces`フォーマットもã‚ã‚Šã¾ã™ã€‚ + +## CustomSeparatedWithNames {#customseparatedwithnames} + +カラムåã§ãƒ˜ãƒƒãƒ€ãƒ¼è¡Œã‚‚出力ã—ã¾ã™ã€‚[TabSeparatedWithNames](#tabseparatedwithnames)ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +:::note +設定 [input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã€ä¸æ˜Žãªåå‰ã®ã‚«ãƒ©ãƒ ã¯ã€è¨­å®š [input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã€æœ€åˆã®è¡Œã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +## CustomSeparatedWithNamesAndTypes {#customseparatedwithnamesandtypes} + +カラムåã¨ã‚¿ã‚¤ãƒ—ã¨å…±ã«2ã¤ã®ãƒ˜ãƒƒãƒ€ãƒ¼è¡Œã‚’書ãè¾¼ã¿ã¾ã™ã€‚ã“ã‚Œã¯[TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes)ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +:::note +設定 [input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã€ä¸æ˜Žãªåå‰ã®ã‚«ãƒ©ãƒ ã¯ã€è¨­å®š [input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã€æœ€åˆã®è¡Œã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +設定 [input_format_with_types_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_types_use_header) ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã®ã‚¿ã‚¤ãƒ—ã¯å¯¾å¿œã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã¨æ¯”較ã•ã‚Œã¾ã™ã€‚ãれ以外ã®å ´åˆã€2行目ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +## SQLInsert {#sqlinsert} + +データを`INSERT INTO table (columns...) VALUES (...), (...) ...;`ステートメントã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦å‡ºåŠ›ã—ã¾ã™ã€‚ + +例: + +```sql +SELECT number AS x, number + 1 AS y, 'Hello' AS z FROM numbers(10) FORMAT SQLInsert SETTINGS output_format_sql_insert_max_batch_size = 2 +``` + +```sql +INSERT INTO table (x, y, z) VALUES (0, 1, 'Hello'), (1, 2, 'Hello'); +INSERT INTO table (x, y, z) VALUES (2, 3, 'Hello'), (3, 4, 'Hello'); +INSERT INTO table (x, y, z) VALUES (4, 5, 'Hello'), (5, 6, 'Hello'); +INSERT INTO table (x, y, z) VALUES (6, 7, 'Hello'), (7, 8, 'Hello'); +INSERT INTO table (x, y, z) VALUES (8, 9, 'Hello'), (9, 10, 'Hello'); +``` + +ã“ã®å½¢å¼ã§å‡ºåŠ›ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã«ã¯ã€[MySQLDump](#mysqldump)入力形å¼ã‚’使用ã§ãã¾ã™ã€‚ + +### SQLInsertフォーマット設定 {#sqlinsert-format-settings} + +- [output_format_sql_insert_max_batch_size](/docs/ja/operations/settings/settings-formats.md/#output_format_sql_insert_max_batch_size) - 1ã¤ã®INSERTステートメント内ã®æœ€å¤§è¡Œæ•°ã€‚デフォルト値 - `65505`。 +- [output_format_sql_insert_table_name](/docs/ja/operations/settings/settings-formats.md/#output_format_sql_insert_table_name) - 出力INSERTクエリã®ãƒ†ãƒ¼ãƒ–ルå。デフォルト値 - `'table'`。 +- [output_format_sql_insert_include_column_names](/docs/ja/operations/settings/settings-formats.md/#output_format_sql_insert_include_column_names) - INSERTクエリã«ã‚«ãƒ©ãƒ åã‚’å«ã‚ã¾ã™ã€‚デフォルト値 - `true`。 +- [output_format_sql_insert_use_replace](/docs/ja/operations/settings/settings-formats.md/#output_format_sql_insert_use_replace) - INSERTã®ä»£ã‚ã‚Šã«REPLACEステートメントを使用ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [output_format_sql_insert_quote_names](/docs/ja/operations/settings/settings-formats.md/#output_format_sql_insert_quote_names) - カラムåã‚’"\`"文字ã§å¼•ç”¨ã—ã¾ã™ã€‚デフォルト値 - `true`。 + +## JSON {#json} + +データをJSONå½¢å¼ã§å‡ºåŠ›ã—ã¾ã™ã€‚データテーブル以外ã«ã‚‚ã€ã‚«ãƒ©ãƒ åã¨ã‚¿ã‚¤ãƒ—ã®ã»ã‹ã€å‡ºåŠ›ã•ã‚ŒãŸè¡Œã®ç·æ•°ã€LIMITãŒãªã‘ã‚Œã°å‡ºåŠ›å¯èƒ½ã ã£ãŸè¡Œæ•°ãªã©ã®è¿½åŠ æƒ…報も出力ã•ã‚Œã¾ã™ã€‚例: + +``` sql +SELECT SearchPhrase, count() AS c FROM test.hits GROUP BY SearchPhrase WITH TOTALS ORDER BY c DESC LIMIT 5 FORMAT JSON +``` + +``` json +{ + "meta": + [ + { + "name": "num", + "type": "Int32" + }, + { + "name": "str", + "type": "String" + }, + { + "name": "arr", + "type": "Array(UInt8)" + } + ], + + "data": + [ + { + "num": 42, + "str": "hello", + "arr": [0,1] + }, + { + "num": 43, + "str": "hello", + "arr": [0,1,2] + }, + { + "num": 44, + "str": "hello", + "arr": [0,1,2,3] + } + ], + + "rows": 3, + + "rows_before_limit_at_least": 3, + + "statistics": + { + "elapsed": 0.001137687, + "rows_read": 3, + "bytes_read": 24 + } +} +``` + +ã“ã®JSONã¯JavaScriptã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“れをä¿è¨¼ã™ã‚‹ãŸã‚ã«ã€ã„ãã¤ã‹ã®æ–‡å­—ã¯ã•ã‚‰ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã¦ã„ã¾ã™ï¼šã‚¹ãƒ©ãƒƒã‚·ãƒ¥ `/` 㯠`\/` ã¨ã—ã¦ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã¾ã™ã€‚ブラウザã®å•é¡Œã‚’引ãèµ·ã“ã™`U+2028`ã¨`U+2029`ã®ç‰¹æ®Šãªæ”¹è¡Œã¯ã€`\uXXXX`ã¨ã—ã¦ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã¾ã™ã€‚ASCII制御文字ã¯ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã¾ã™ï¼šãƒãƒƒã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã€ãƒ•ã‚©ãƒ¼ãƒ ãƒ•ã‚£ãƒ¼ãƒ‰ã€ãƒ©ã‚¤ãƒ³ãƒ•ã‚£ãƒ¼ãƒ‰ã€ã‚­ãƒ£ãƒªãƒƒã‚¸ãƒªã‚¿ãƒ¼ãƒ³ã€ãŠã‚ˆã³æ°´å¹³ã‚¿ãƒ–㯠`\b`, `\f`, `\n`, `\r`, `\t` ã¨ã—ã¦ã€00-1F範囲ã«ã‚る残りã®ãƒã‚¤ãƒˆã¯ `\uXXXX` シーケンスã¨ã—ã¦ç½®ãæ›ãˆã¾ã™ã€‚無効ãªUTF-8シーケンスã¯ç½®ãæ›ãˆæ–‡å­—ã«å¤‰æ›´ã•ã‚Œã‚‹ã®ã§ã€å‡ºåŠ›ãƒ†ã‚­ã‚¹ãƒˆã¯æœ‰åŠ¹ãªUTF-8シーケンスã§æ§‹æˆã•ã‚Œã¾ã™ã€‚JavaScriptã¨ã®äº’æ›æ€§ã®ãŸã‚ã€Int64 ãŠã‚ˆã³ UInt64 ã®æ•´æ•°ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§å¼•ç”¨ç¬¦ã§å›²ã¾ã‚Œã¦ã„ã¾ã™ã€‚引用符を除去ã™ã‚‹ã«ã¯ã€è¨­å®šãƒ‘ラメータ[output_format_json_quote_64bit_integers](/docs/ja/operations/settings/settings-formats.md/#output_format_json_quote_64bit_integers)ã‚’0ã«è¨­å®šã—ã¾ã™ã€‚ + +`rows` – 出力行ã®ç·æ•°ã€‚ + +`rows_before_limit_at_least` – LIMITãŒãªã‘ã‚Œã°æœ€ä½Žé™æ®‹ã£ã¦ã„ãŸè¡Œæ•°ã€‚クエリã«LIMITãŒå«ã¾ã‚Œã‚‹å ´åˆã®ã¿å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ +クエリã«GROUP BYãŒå«ã¾ã‚Œã‚‹å ´åˆã€`rows_before_limit_at_least`ã¯LIMITãŒãªã„å ´åˆã®æ­£ç¢ºãªè¡Œæ•°ã§ã™ã€‚ + +`totals` – åˆè¨ˆå€¤ï¼ˆWITH TOTALSを使用時)。 + +`extremes` – 極値(`extremes`ãŒ1ã«è¨­å®šæ™‚)。 + +ClickHouseã¯[NULL](/docs/ja/sql-reference/syntax.md)をサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€JSON出力ã§`null`ã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚出力ã§`+nan`ã€`-nan`ã€`+inf`ã€ãŠã‚ˆã³`-inf`を有効ã«ã™ã‚‹ã«ã¯ã€å‡ºåŠ›å½¢å¼ã®å¼•æ•°ã‚’変更ã—ã¦ãã ã•ã„[output_format_json_quote_denormals](/docs/ja/operations/settings/settings-formats.md/#output_format_json_quote_denormals)ã‚’1ã«è¨­å®šã—ã¾ã™ã€‚ + +**関連項目** + +- [JSONEachRow](#jsoneachrow)フォーマット +- [output_format_json_array_of_rows](/docs/ja/operations/settings/settings-formats.md/#output_format_json_array_of_rows)設定 + +JSON入力形å¼ã§ã¯ã€è¨­å®š[input_format_json_validate_types_from_metadata](/docs/ja/operations/settings/settings-formats.md/#input_format_json_validate_types_from_metadata)ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰æ¤œè¨¼ã•ã‚ŒãŸã‚¿ã‚¤ãƒ—ãŒã€å¯¾å¿œã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã®ã‚¿ã‚¤ãƒ—ã¨æ¯”較ã•ã‚Œã¾ã™ã€‚ + +## JSONStrings {#jsonstrings} + +JSONã¨ç•°ãªã‚Šã€ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒæ–‡å­—列ã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã€åž‹ã¤ãJSON値ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +例: + +```json +{ + "meta": + [ + { + "name": "num", + "type": "Int32" + }, + { + "name": "str", + "type": "String" + }, + { + "name": "arr", + "type": "Array(UInt8)" + } + ], + + "data": + [ + { + "num": "42", + "str": "hello", + "arr": "[0,1]" + }, + { + "num": "43", + "str": "hello", + "arr": "[0,1,2]" + }, + { + "num": "44", + "str": "hello", + "arr": "[0,1,2,3]" + } + ], + + "rows": 3, + + "rows_before_limit_at_least": 3, + + "statistics": + { + "elapsed": 0.001403233, + "rows_read": 3, + "bytes_read": 24 + } +} +``` + +## JSONColumns {#jsoncolumns} + +:::tip +JSONColumns*å½¢å¼ã®å‡ºåŠ›ã¯ã€ClickHouseフィールドåã¨ãã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®ãƒ†ãƒ¼ãƒ–ルã®å„è¡Œã®å†…容をæä¾›ã—ã¾ã™ã€‚視覚的ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒå·¦90度回転ã—ãŸã‚ˆã†ã«è¦‹ãˆã¾ã™ã€‚ +::: + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒ1ã¤ã®JSONオブジェクトã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ +JSONColumns出力形å¼ã¯ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’メモリã«ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã—ã¦ã€å˜ä¸€ãƒ–ロックã¨ã—ã¦å‡ºåŠ›ã™ã‚‹ãŸã‚ã€é«˜ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã«ã¤ãªãŒã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +例: +```json +{ + "num": [42, 43, 44], + "str": ["hello", "hello", "hello"], + "arr": [[0,1], [0,1,2], [0,1,2,3]] +} +``` + +インãƒãƒ¼ãƒˆä¸­ã€è¨­å®š[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ã¨ã€ä¸æ˜Žãªåå‰ã®ã‚«ãƒ©ãƒ ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ブロックã«å­˜åœ¨ã—ãªã„カラムã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§æº€ãŸã•ã‚Œã¾ã™ï¼ˆã“ã“ã§[input_format_defaults_for_omitted_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_defaults_for_omitted_fields)設定を使用ã§ãã¾ã™ï¼‰ + +## JSONColumnsWithMetadata {#jsoncolumnsmonoblock} + +JSONColumnså½¢å¼ã¨ç•°ãªã‚Šã€ã„ãã¤ã‹ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚„統計情報(JSONå½¢å¼ã¨é¡žä¼¼ï¼‰ã‚‚å«ã‚“ã§ã„ã¾ã™ã€‚ +出力形å¼ã¯ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’メモリã«ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã—ã¦ã€å˜ä¸€ãƒ–ロックã¨ã—ã¦å‡ºåŠ›ã™ã‚‹ãŸã‚ã€é«˜ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã«ã¤ãªãŒã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +例: +```json +{ + "meta": + [ + { + "name": "num", + "type": "Int32" + }, + { + "name": "str", + "type": "String" + }, + + { + "name": "arr", + "type": "Array(UInt8)" + } + ], + + "data": + { + "num": [42, 43, 44], + "str": ["hello", "hello", "hello"], + "arr": [[0,1], [0,1,2], [0,1,2,3]] + }, + + "rows": 3, + + "rows_before_limit_at_least": 3, + + "statistics": + { + "elapsed": 0.000272376, + "rows_read": 3, + "bytes_read": 24 + } +} +``` + +JSONColumnsWithMetadata入力形å¼ã«ãŠã„ã¦ã€[input_format_json_validate_types_from_metadata](/docs/ja/operations/settings/settings-formats.md/#input_format_json_validate_types_from_metadata)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰ã®åž‹ã‚’テーブルã®å¯¾å¿œã™ã‚‹ã‚«ãƒ©ãƒ ã®åž‹ã¨æ¯”較ã—ã¾ã™ã€‚ + +## JSONAsString {#jsonasstring} + +ã“ã®å½¢å¼ã§ã¯ã€å˜ä¸€ã®JSONオブジェクトをå˜ä¸€ã®å€¤ã¨ã—ã¦è§£é‡ˆã—ã¾ã™ã€‚入力ã«è¤‡æ•°ã®JSONオブジェクト(カンマã§åŒºåˆ‡ã‚‰ã‚Œã‚‹ï¼‰ãŒã‚ã‚‹å ´åˆã€ãれらã¯åˆ¥ã€…ã®è¡Œã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚入力データãŒè§’括弧ã§å›²ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ãã‚Œã¯JSONã®é…列ã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚ + +ã“ã®å½¢å¼ã¯ã€[String](/docs/ja/sql-reference/data-types/string.md)åž‹ã®å˜ä¸€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ã®ã¿è§£æžã§ãã¾ã™ã€‚残りã®ã‚«ãƒ©ãƒ ã¯[DEFAULT](/docs/ja/sql-reference/statements/create/table.md/#default)ã¾ãŸã¯[MATERIALIZED](/docs/ja/sql-reference/statements/create/table.md/#materialized)ã¨ã—ã¦è¨­å®šã™ã‚‹ã‹ã€çœç•¥ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚全体ã®JSONオブジェクトを文字列ã¨ã—ã¦åŽé›†ã—ãŸå¾Œã«ã€[JSON関数](/docs/ja/sql-reference/functions/json-functions.md)を使用ã—ã¦å‡¦ç†ã§ãã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +DROP TABLE IF EXISTS json_as_string; +CREATE TABLE json_as_string (json String) ENGINE = Memory; +INSERT INTO json_as_string (json) FORMAT JSONAsString {"foo":{"bar":{"x":"y"},"baz":1}},{},{"any json stucture":1} +SELECT * FROM json_as_string; +``` + +çµæžœ: + +``` response +┌─json──────────────────────────────┠+│ {"foo":{"bar":{"x":"y"},"baz":1}} │ +│ {} │ +│ {"any json stucture":1} │ +└───────────────────────────────────┘ +``` + +**複数ã®JSONオブジェクトã‹ã‚‰ãªã‚‹é…列** + +クエリ: + +``` sql +CREATE TABLE json_square_brackets (field String) ENGINE = Memory; +INSERT INTO json_square_brackets FORMAT JSONAsString [{"id": 1, "name": "name1"}, {"id": 2, "name": "name2"}]; + +SELECT * FROM json_square_brackets; +``` + +çµæžœ: + +```response +┌─field──────────────────────┠+│ {"id": 1, "name": "name1"} │ +│ {"id": 2, "name": "name2"} │ +└────────────────────────────┘ +``` + +## JSONAsObject {#jsonasobject} + +ã“ã®å½¢å¼ã§ã¯ã€å˜ä¸€ã®JSONオブジェクトをå˜ä¸€ã®[JSON](/docs/ja/sql-reference/data-types/newjson.md)値ã¨ã—ã¦è§£é‡ˆã—ã¾ã™ã€‚入力ã«è¤‡æ•°ã®JSONオブジェクト(カンマã§åŒºåˆ‡ã‚‰ã‚Œã‚‹ï¼‰ãŒã‚ã‚‹å ´åˆã€ãれらã¯åˆ¥ã€…ã®è¡Œã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚入力データãŒè§’括弧ã§å›²ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ãã‚Œã¯JSONã®é…列ã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚ + +ã“ã®å½¢å¼ã¯ã€[JSON](/docs/ja/sql-reference/data-types/newjson.md)åž‹ã®å˜ä¸€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ã®ã¿è§£æžã§ãã¾ã™ã€‚残りã®ã‚«ãƒ©ãƒ ã¯[DEFAULT](/docs/ja/sql-reference/statements/create/table.md/#default)ã¾ãŸã¯[MATERIALIZED](/docs/ja/sql-reference/statements/create/table.md/#materialized)ã¨ã—ã¦è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SET allow_experimental_json_type = 1; +CREATE TABLE json_as_object (json JSON) ENGINE = Memory; +INSERT INTO json_as_object (json) FORMAT JSONAsObject {"foo":{"bar":{"x":"y"},"baz":1}},{},{"any json stucture":1} +SELECT * FROM json_as_object FORMAT JSONEachRow; +``` + +çµæžœ: + +``` response +{"json":{"foo":{"bar":{"x":"y"},"baz":"1"}}} +{"json":{}} +{"json":{"any json stucture":"1"}} +``` + +**複数ã®JSONオブジェクトã‹ã‚‰ãªã‚‹é…列** + +クエリ: + +``` sql +SET allow_experimental_json_type = 1; +CREATE TABLE json_square_brackets (field JSON) ENGINE = Memory; +INSERT INTO json_square_brackets FORMAT JSONAsObject [{"id": 1, "name": "name1"}, {"id": 2, "name": "name2"}]; +SELECT * FROM json_square_brackets FORMAT JSONEachRow; +``` + +çµæžœ: + +```response +{"field":{"id":"1","name":"name1"}} +{"field":{"id":"2","name":"name2"}} +``` + +**デフォルト値をæŒã¤ã‚«ãƒ©ãƒ ** + +```sql +SET allow_experimental_json_type = 1; +CREATE TABLE json_as_object (json JSON, time DateTime MATERIALIZED now()) ENGINE = Memory; +INSERT INTO json_as_object (json) FORMAT JSONAsObject {"foo":{"bar":{"x":"y"},"baz":1}}; +INSERT INTO json_as_object (json) FORMAT JSONAsObject {}; +INSERT INTO json_as_object (json) FORMAT JSONAsObject {"any json stucture":1} +SELECT time, json FROM json_as_object FORMAT JSONEachRow +``` + +```response +{"time":"2024-09-16 12:18:10","json":{}} +{"time":"2024-09-16 12:18:13","json":{"any json stucture":"1"}} +{"time":"2024-09-16 12:18:08","json":{"foo":{"bar":{"x":"y"},"baz":"1"}}} +``` + +## JSONCompact {#jsoncompact} + +データ行をオブジェクトã§ã¯ãªãé…列ã§å‡ºåŠ›ã™ã‚‹ç‚¹ã§JSONã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ + +例: + +```json +{ + "meta": + [ + { + "name": "num", + "type": "Int32" + }, + { + "name": "str", + "type": "String" + }, + { + "name": "arr", + "type": "Array(UInt8)" + } + ], + + "data": + [ + [42, "hello", [0,1]], + [43, "hello", [0,1,2]], + [44, "hello", [0,1,2,3]] + ], + + "rows": 3, + + "rows_before_limit_at_least": 3, + + "statistics": + { + "elapsed": 0.001222069, + "rows_read": 3, + "bytes_read": 24 + } +} +``` + +## JSONCompactStrings {#jsoncompactstrings} + +データ行をオブジェクトã§ã¯ãªãé…列ã§å‡ºåŠ›ã™ã‚‹ç‚¹ã§JSONStringsã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ + +例: + +```json +{ + "meta": + [ + { + "name": "num", + "type": "Int32" + }, + { + "name": "str", + "type": "String" + }, + { + "name": "arr", + "type": "Array(UInt8)" + } + ], + + "data": + [ + ["42", "hello", "[0,1]"], + ["43", "hello", "[0,1,2]"], + ["44", "hello", "[0,1,2,3]"] + ], + + "rows": 3, + + "rows_before_limit_at_least": 3, + + "statistics": + { + "elapsed": 0.001572097, + "rows_read": 3, + "bytes_read": 24 + } +} +``` + +## JSONCompactColumns {#jsoncompactcolumns} + +ã“ã®å½¢å¼ã§ã¯ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒå˜ä¸€ã®JSONé…列ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ +JSONCompactColumns出力形å¼ã¯ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’メモリã«ãƒãƒƒãƒ•ã‚¡ãƒ¼ã—ã¦å˜ä¸€ã®ãƒ–ロックã¨ã—ã¦å‡ºåŠ›ã™ã‚‹ãŸã‚ã€é«˜ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã«ã¤ãªãŒã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +例: + +```json +[ + [42, 43, 44], + ["hello", "hello", "hello"], + [[0,1], [0,1,2], [0,1,2,3]] +] +``` + +ブロックã«å­˜åœ¨ã—ãªã„カラムã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§åŸ‹ã‚られã¾ã™ï¼ˆã“ã“ã§[input_format_defaults_for_omitted_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_defaults_for_omitted_fields)設定を使用ã§ãã¾ã™ï¼‰ã€‚ + +## JSONEachRow {#jsoneachrow} + +ã“ã®å½¢å¼ã§ã¯ã€ClickHouseã¯å„行を区切りã€æ–°ã—ã„è¡Œã”ã¨ã«åŒºåˆ‡ã‚‰ã‚ŒãŸJSONオブジェクトã¨ã—ã¦å‡ºåŠ›ã—ã¾ã™ã€‚ + +例: + +```json +{"num":42,"str":"hello","arr":[0,1]} +{"num":43,"str":"hello","arr":[0,1,2]} +{"num":44,"str":"hello","arr":[0,1,2,3]} +``` + +データをインãƒãƒ¼ãƒˆã™ã‚‹ã¨ã€[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã€åå‰ã®çŸ¥ã‚‰ã‚Œã¦ã„ãªã„カラムã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ + +## PrettyJSONEachRow {#prettyjsoneachrow} + +JSONEachRowã¨ç•°ãªã‚‹ç‚¹ã¯ã€JSONãŒæ”¹è¡Œãƒ‡ãƒªãƒŸã‚¿ã¨4ã¤ã®ã‚¹ãƒšãƒ¼ã‚¹ã®ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã§æ•´å½¢ã•ã‚Œã¦å‡ºåŠ›ã•ã‚Œã‚‹ç‚¹ã§ã™ã€‚出力専用ã«é©ã—ã¦ã„ã¾ã™ã€‚ + +例: + +```json +{ + "num": "42", + "str": "hello", + "arr": [ + "0", + "1" + ], + "tuple": { + "num": 42, + "str": "world" + } +} +{ + "num": "43", + "str": "hello", + "arr": [ + "0", + "1", + "2" + ], + "tuple": { + "num": 43, + "str": "world" + } +} +``` + +## JSONStringsEachRow {#jsonstringseachrow} + +JSONEachRowã¨ç•°ãªã‚‹ç‚¹ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒæ–‡å­—列ã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã€åž‹ä»˜ãJSON値ã¨ã—ã¦ã§ã¯ãªã„ã“ã¨ã§ã™ã€‚ + +例: + +```json +{"num":"42","str":"hello","arr":"[0,1]"} +{"num":"43","str":"hello","arr":"[0,1,2]"} +{"num":"44","str":"hello","arr":"[0,1,2,3]"} +``` + +## JSONCompactEachRow {#jsoncompacteachrow} + +JSONEachRowã¨ã¯ç•°ãªã‚‹ç‚¹ã¯ã€ãƒ‡ãƒ¼ã‚¿è¡ŒãŒã‚ªãƒ–ジェクトã§ã¯ãªãé…列ã§å‡ºåŠ›ã•ã‚Œã‚‹ã“ã¨ã§ã™ã€‚ + +例: + +```json +[42, "hello", [0,1]] +[43, "hello", [0,1,2]] +[44, "hello", [0,1,2,3]] +``` + +## JSONCompactStringsEachRow {#jsoncompactstringseachrow} + +JSONCompactEachRowã¨ç•°ãªã‚‹ç‚¹ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒæ–‡å­—列ã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã€åž‹ä»˜ãJSON値ã¨ã—ã¦ã§ã¯ãªã„ã“ã¨ã§ã™ã€‚ + +例: + +```json +["42", "hello", "[0,1]"] +["43", "hello", "[0,1,2]"] +["44", "hello", "[0,1,2,3]"] +``` + +## JSONEachRowWithProgress {#jsoneachrowwithprogress} +## JSONStringsEachRowWithProgress {#jsonstringseachrowwithprogress} + +`JSONEachRow`/`JSONStringsEachRow`ã¨ç•°ãªã‚‹ç‚¹ã¯ã€ClickHouseãŒé€²æ—情報もJSON値ã¨ã—ã¦æä¾›ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +```json +{"row":{"num":42,"str":"hello","arr":[0,1]}} +{"row":{"num":43,"str":"hello","arr":[0,1,2]}} +{"row":{"num":44,"str":"hello","arr":[0,1,2,3]}} +{"progress":{"read_rows":"3","read_bytes":"24","written_rows":"0","written_bytes":"0","total_rows_to_read":"3"}} +``` + +## JSONCompactEachRowWithNames {#jsoncompacteachrowwithnames} + +`JSONCompactEachRow`å½¢å¼ã¨ç•°ãªã‚‹ç‚¹ã¯ã€ã‚«ãƒ©ãƒ åã‚’å«ã‚€ãƒ˜ãƒƒãƒ€ãƒ¼è¡Œã‚‚出力ã•ã‚Œã‚‹ã“ã¨ã§ã™ã€‚[TabSeparatedWithNames](#tabseparatedwithnames)å½¢å¼ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +:::note +[settings-formats-input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚未知ã®åå‰ã®ã‚«ãƒ©ãƒ ã¯ã€[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã¯ã€æœ€åˆã®è¡ŒãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +## JSONCompactEachRowWithNamesAndTypes {#jsoncompacteachrowwithnamesandtypes} + +`JSONCompactEachRow`å½¢å¼ã¨ç•°ãªã‚‹ç‚¹ã¯ã€ã‚«ãƒ©ãƒ åã¨åž‹ã‚’å«ã‚€2ã¤ã®ãƒ˜ãƒƒãƒ€ãƒ¼è¡Œã‚‚出力ã•ã‚Œã‚‹ã“ã¨ã§ã™ã€‚[TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes)å½¢å¼ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +:::note +[settings-formats-input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚未知ã®åå‰ã®ã‚«ãƒ©ãƒ ã¯ã€[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã¯ã€æœ€åˆã®è¡ŒãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +[settings-formats-input_format_with_types_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_types_use_header)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®åž‹ã¯ãƒ†ãƒ¼ãƒ–ルã®å¯¾å¿œã™ã‚‹ã‚«ãƒ©ãƒ ã®åž‹ã¨æ¯”較ã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€2番目ã®è¡Œã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +## JSONCompactStringsEachRowWithNames {#jsoncompactstringseachrowwithnames} + +`JSONCompactStringsEachRow`ã¨ã¯ç•°ãªã‚‹ç‚¹ã¯ã€ã‚«ãƒ©ãƒ åã‚’å«ã‚€ãƒ˜ãƒƒãƒ€ãƒ¼è¡Œã‚‚出力ã•ã‚Œã‚‹ã“ã¨ã§ã™ã€‚[TabSeparatedWithNames](#tabseparatedwithnames)å½¢å¼ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +:::note +[settings-formats-input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚未知ã®åå‰ã®ã‚«ãƒ©ãƒ ã¯ã€[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã¯ã€æœ€åˆã®è¡ŒãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +## JSONCompactStringsEachRowWithNamesAndTypes {#jsoncompactstringseachrowwithnamesandtypes} + +`JSONCompactStringsEachRow`ã¨ã¯ç•°ãªã‚‹ç‚¹ã¯ã€ã‚«ãƒ©ãƒ åã¨åž‹ã‚’å«ã‚€2ã¤ã®ãƒ˜ãƒƒãƒ€ãƒ¼è¡Œã‚‚出力ã•ã‚Œã‚‹ã“ã¨ã§ã™ã€‚[TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes)å½¢å¼ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +:::note +[settings-formats-input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚未知ã®åå‰ã®ã‚«ãƒ©ãƒ ã¯ã€[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã¯ã€æœ€åˆã®è¡ŒãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +[settings-formats-input_format_with_types_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_types_use_header)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®åž‹ã¯ãƒ†ãƒ¼ãƒ–ルã®å¯¾å¿œã™ã‚‹ã‚«ãƒ©ãƒ ã®åž‹ã¨æ¯”較ã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€2番目ã®è¡Œã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +```json +["num", "str", "arr"] +["Int32", "String", "Array(UInt8)"] +[42, "hello", [0,1]] +[43, "hello", [0,1,2]] +[44, "hello", [0,1,2,3]] +``` + +## JSONObjectEachRow {#jsonobjecteachrow} + +ã“ã®å½¢å¼ã§ã¯ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒå˜ä¸€ã®JSONオブジェクトã¨ã—ã¦è¡¨ç¾ã•ã‚Œã€å„è¡ŒãŒã“ã®ã‚ªãƒ–ジェクトã®å€‹åˆ¥ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¨ã—ã¦è¡¨ã•ã‚Œã€JSONEachRowå½¢å¼ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +例: + +```json +{ + "row_1": {"num": 42, "str": "hello", "arr": [0,1]}, + "row_2": {"num": 43, "str": "hello", "arr": [0,1,2]}, + "row_3": {"num": 44, "str": "hello", "arr": [0,1,2,3]} +} +``` + +オブジェクトåをカラム値ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã«ã¯ã€ç‰¹åˆ¥ãªè¨­å®š[format_json_object_each_row_column_for_object_name](/docs/ja/operations/settings/settings-formats.md/#format_json_object_each_row_column_for_object_name)を使用ã§ãã¾ã™ã€‚ã“ã®è¨­å®šã®å€¤ã¯ã€çµæžœã®ã‚ªãƒ–ジェクトã§è¡Œã®JSONキーã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã®åå‰ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ + +例: + +出力ã®å ´åˆ: + +テーブル`test`を次ã®ã‚ˆã†ã«ä»®å®šã—ã¾ã™ã€‚2ã¤ã®ã‚«ãƒ©ãƒ ãŒã‚ã‚Šã¾ã™: +``` +┌─object_name─┬─number─┠+│ first_obj │ 1 │ +│ second_obj │ 2 │ +│ third_obj │ 3 │ +└─────────────┴────────┘ +``` +`JSONObjectEachRow`å½¢å¼ã§å‡ºåŠ›ã—ã€`format_json_object_each_row_column_for_object_name`設定を使用ã—ã¾ã—ょã†: + +```sql +select * from test settings format_json_object_each_row_column_for_object_name='object_name' +``` + +出力: +```json +{ + "first_obj": {"number": 1}, + "second_obj": {"number": 2}, + "third_obj": {"number": 3} +} +``` + +入力ã®å ´åˆ: + +å‰ã®ä¾‹ã‹ã‚‰ã®å‡ºåŠ›ã‚’`data.json`ã¨ã„ã†ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã—ãŸã¨ä»®å®šã—ã¾ã™: +```sql +select * from file('data.json', JSONObjectEachRow, 'object_name String, number UInt64') settings format_json_object_each_row_column_for_object_name='object_name' +``` + +``` +┌─object_name─┬─number─┠+│ first_obj │ 1 │ +│ second_obj │ 2 │ +│ third_obj │ 3 │ +└─────────────┴────────┘ +``` + +スキーマ推論ã§ã‚‚動作ã—ã¾ã™: + +```sql +desc file('data.json', JSONObjectEachRow) settings format_json_object_each_row_column_for_object_name='object_name' +``` + +``` +┌─name────────┬─type────────────┠+│ object_name │ String │ +│ number │ Nullable(Int64) │ +└─────────────┴─────────────────┘ +``` + +### データã®æŒ¿å…¥ {#json-inserting-data} + +``` sql +INSERT INTO UserActivity FORMAT JSONEachRow {"PageViews":5, "UserID":"4324182021466249494", "Duration":146,"Sign":-1} {"UserID":"4324182021466249494","PageViews":6,"Duration":185,"Sign":1} +``` + +ClickHouseã¯ä»¥ä¸‹ã‚’許å¯ã—ã¾ã™: + +- オブジェクト内ã®ã‚­ãƒ¼ã¨å€¤ã®ãƒšã‚¢ã®é †åºã¯ä»»æ„ã§ã™ã€‚ +- 一部ã®å€¤ã®çœç•¥ã€‚ + +ClickHouseã¯è¦ç´ é–“ã®ç©ºç™½ã‚„オブジェクト後ã®ã‚«ãƒ³ãƒžã‚’無視ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトを1è¡Œã§æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚行区切りã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 + +**çœç•¥ã•ã‚ŒãŸå€¤ã®å‡¦ç†** + +ClickHouseã¯ã€çœç•¥ã•ã‚ŒãŸå€¤ã‚’対応ã™ã‚‹[データ型](/docs/ja/sql-reference/data-types/index.md)ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§è£œã„ã¾ã™ã€‚ + +`DEFAULT expr`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ã€[input_format_defaults_for_omitted_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_defaults_for_omitted_fields)設定ã«å¿œã˜ã¦ç•°ãªã‚‹ç½®æ›ãƒ«ãƒ¼ãƒ«ã‚’使用ã—ã¾ã™ã€‚ + +次ã®ãƒ†ãƒ¼ãƒ–ルを考慮ã—ã¦ãã ã•ã„: + +``` sql +CREATE TABLE IF NOT EXISTS example_table +( + x UInt32, + a DEFAULT x * 2 +) ENGINE = Memory; +``` + +- `input_format_defaults_for_omitted_fields = 0`ã®å ´åˆã€`x`ã¨`a`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ã¨ã‚‚ã«`0`(`UInt32`データ型ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼‰ã§ã™ã€‚ +- `input_format_defaults_for_omitted_fields = 1`ã®å ´åˆã€`x`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯`0`ã§ã™ãŒã€`a`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯`x * 2`ã§ã™ã€‚ + +:::note +`input_format_defaults_for_omitted_fields = 1`ã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ã€`input_format_defaults_for_omitted_fields = 0`ã§ã®æŒ¿å…¥ã«æ¯”ã¹ã¦ã€ClickHouseã¯ã‚ˆã‚Šå¤šãã®è¨ˆç®—資æºã‚’消費ã—ã¾ã™ã€‚ +::: + +### データã®é¸æŠž {#json-selecting-data} + +`UserActivity`テーブルを例ã¨ã—ã¦è€ƒæ…®ã—ã¾ã—ょã†: + +``` response +┌──────────────UserID─┬─PageViews─┬─Duration─┬─Sign─┠+│ 4324182021466249494 │ 5 │ 146 │ -1 │ +│ 4324182021466249494 │ 6 │ 185 │ 1 │ +└─────────────────────┴───────────┴──────────┴──────┘ +``` + +クエリ`SELECT * FROM UserActivity FORMAT JSONEachRow`ã¯ä»¥ä¸‹ã‚’è¿”ã—ã¾ã™: + +``` response +{"UserID":"4324182021466249494","PageViews":5,"Duration":146,"Sign":-1} +{"UserID":"4324182021466249494","PageViews":6,"Duration":185,"Sign":1} +``` + +[JSON](#json)å½¢å¼ã¨ç•°ãªã‚Šã€ç„¡åŠ¹ãªUTF-8シーケンスã®ç½®æ›ã¯ã‚ã‚Šã¾ã›ã‚“。値ã¯`JSON`ã¨åŒã˜ã‚ˆã†ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã¾ã™ã€‚ + +:::info +ä»»æ„ã®ãƒã‚¤ãƒˆã‚»ãƒƒãƒˆã¯æ–‡å­—列ã«å‡ºåŠ›ã§ãã¾ã™ã€‚データãŒæƒ…報を失ã†ã“ã¨ãªãJSONã¨ã—ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆå¯èƒ½ã§ã‚ã‚‹ã¨ç¢ºä¿¡ã—ã¦ã„ã‚‹å ´åˆã¯ã€`JSONEachRow`å½¢å¼ã‚’使用ã—ã¦ãã ã•ã„。 +::: + +### ãƒã‚¹ãƒˆæ§‹é€ ã®ä½¿ç”¨ {#jsoneachrow-nested} + +[Nested](/docs/ja/sql-reference/data-types/nested-data-structures/index.md)データ型カラムをæŒã¤ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹å ´åˆã€åŒã˜æ§‹é€ ã®JSONデータを挿入ã§ãã¾ã™ã€‚[input_format_import_nested_json](/docs/ja/operations/settings/settings-formats.md/#input_format_import_nested_json)設定を有効ã«ã—ã¦ãã ã•ã„。 + +例ã¨ã—ã¦ã€æ¬¡ã®ãƒ†ãƒ¼ãƒ–ルを考慮ã—ã¦ãã ã•ã„: + +``` sql +CREATE TABLE json_each_row_nested (n Nested (s String, i Int32) ) ENGINE = Memory +``` + +`Nested`データ型ã®èª¬æ˜Žã§ç¤ºã™ã‚ˆã†ã«ã€ClickHouseã¯ãƒã‚¹ãƒˆã•ã‚ŒãŸæ§‹é€ ã®å„è¦ç´ ã‚’別々ã®ã‚«ãƒ©ãƒ ã¨ã—ã¦æ‰±ã„ã¾ã™ï¼ˆæˆ‘々ã®ãƒ†ãƒ¼ãƒ–ルã§ã¯`n.s`ã¨`n.i`)。次ã®ã‚ˆã†ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã§ãã¾ã™: + +``` sql +INSERT INTO json_each_row_nested FORMAT JSONEachRow {"n.s": ["abc", "def"], "n.i": [1, 23]} +``` + +データを階層型JSONオブジェクトã¨ã—ã¦æŒ¿å…¥ã™ã‚‹ã«ã¯ã€[input_format_import_nested_json=1](/docs/ja/operations/settings/settings-formats.md/#input_format_import_nested_json)ã«è¨­å®šã—ã¾ã™ã€‚ + +``` json +{ + "n": { + "s": ["abc", "def"], + "i": [1, 23] + } +} +``` + +ã“ã®è¨­å®šãªã—ã§ã¯ã€ClickHouseã¯ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +``` sql +SELECT name, value FROM system.settings WHERE name = 'input_format_import_nested_json' +``` + +``` response +┌─name────────────────────────────┬─value─┠+│ input_format_import_nested_json │ 0 │ +└─────────────────────────────────┴───────┘ +``` + +``` sql +INSERT INTO json_each_row_nested FORMAT JSONEachRow {"n": {"s": ["abc", "def"], "i": [1, 23]}} +``` + +``` response +Code: 117. DB::Exception: Unknown field found while parsing JSONEachRow format: n: (at row 1) +``` + +``` sql +SET input_format_import_nested_json=1 +INSERT INTO json_each_row_nested FORMAT JSONEachRow {"n": {"s": ["abc", "def"], "i": [1, 23]}} +SELECT * FROM json_each_row_nested +``` + +``` response +┌─n.s───────────┬─n.i────┠+│ ['abc','def'] │ [1,23] │ +└───────────────┴────────┘ +``` + +### JSONå½¢å¼ã®è¨­å®š {#json-formats-settings} + +- [input_format_import_nested_json](/docs/ja/operations/settings/settings-formats.md/#input_format_import_nested_json) - ãƒã‚¹ãƒˆã•ã‚ŒãŸJSONデータをãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«ãƒžãƒƒãƒ—ã—ã¾ã™ï¼ˆã“ã‚Œã¯JSONEachRowå½¢å¼ã§æ©Ÿèƒ½ã—ã¾ã™ï¼‰ã€‚デフォルト値 - `false`。 +- [input_format_json_read_bools_as_numbers](/docs/ja/operations/settings/settings-formats.md/#input_format_json_read_bools_as_numbers) - JSON入力形å¼ã§ãƒ–ール値を数値ã¨ã—ã¦è§£æžã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_json_read_bools_as_strings](/docs/ja/operations/settings/settings-formats.md/#input_format_json_read_bools_as_strings) - JSON入力形å¼ã§ãƒ–ール値を文字列ã¨ã—ã¦è§£æžã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_json_read_numbers_as_strings](/docs/ja/operations/settings/settings-formats.md/#input_format_json_read_numbers_as_strings) - JSON入力形å¼ã§æ•°å€¤ã‚’文字列ã¨ã—ã¦è§£æžã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_json_read_arrays_as_strings](/docs/ja/operations/settings/settings-formats.md/#input_format_json_read_arrays_as_strings) - JSON入力形å¼ã§é…列を文字列ã¨ã—ã¦è§£æžã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_json_read_objects_as_strings](/docs/ja/operations/settings/settings-formats.md/#input_format_json_read_objects_as_strings) - JSON入力形å¼ã§ã‚ªãƒ–ジェクトを文字列ã¨ã—ã¦è§£æžã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_json_named_tuples_as_objects](/docs/ja/operations/settings/settings-formats.md/#input_format_json_named_tuples_as_objects) - åå‰ä»˜ãタプルカラムをJSONオブジェクトã¨ã—ã¦è§£æžã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_json_try_infer_numbers_from_strings](/docs/ja/operations/settings/settings-formats.md/#input_format_json_try_infer_numbers_from_strings) - スキーマ推論中ã«æ–‡å­—列フィールドã‹ã‚‰æ•°å€¤ã‚’推測ã—よã†ã¨ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_json_try_infer_named_tuples_from_objects](/docs/ja/operations/settings/settings-formats.md/#input_format_json_try_infer_named_tuples_from_objects) - スキーマ推論中ã«JSONオブジェクトã‹ã‚‰åå‰ä»˜ãタプルを推測ã—よã†ã¨ã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_json_infer_incomplete_types_as_strings](/docs/ja/operations/settings/settings-formats.md/#input_format_json_infer_incomplete_types_as_strings) - JSON入力形å¼ã§ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中ã«Nullã¾ãŸã¯ç©ºã®ã‚ªãƒ–ジェクト/é…列ã®ã¿ã‚’å«ã‚€Keysã«String型を使用ã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_json_defaults_for_missing_elements_in_named_tuple](/docs/ja/operations/settings/settings-formats.md/#input_format_json_defaults_for_missing_elements_in_named_tuple) - åå‰ä»˜ãタプル解æžä¸­ã«ã€JSONオブジェクト内ã§æ¬ ã‘ã¦ã„ã‚‹è¦ç´ ã«å¯¾ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’挿入ã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_json_ignore_unknown_keys_in_named_tuple](/docs/ja/operations/settings/settings-formats.md/#input_format_json_ignore_unknown_keys_in_named_tuple) - åå‰ä»˜ãタプルã®jsonオブジェクト内ã§æœªçŸ¥ã®ã‚­ãƒ¼ã‚’無視ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_json_compact_allow_variable_number_of_columns](/docs/ja/operations/settings/settings-formats.md/#input_format_json_compact_allow_variable_number_of_columns) - JSONCompact/JSONCompactEachRowå½¢å¼ã§å¤‰å‹•ã™ã‚‹ã‚«ãƒ©ãƒ æ•°ã‚’許å¯ã—ã€ä½™åˆ†ãªã‚«ãƒ©ãƒ ã‚’無視ã—ã€æ¬ ã‘ã¦ã„るカラムã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’使用ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_json_throw_on_bad_escape_sequence](/docs/ja/operations/settings/settings-formats.md/#input_format_json_throw_on_bad_escape_sequence) - JSON文字列ã«èª¤ã£ãŸã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã«ä¾‹å¤–をスローã—ã¾ã™ã€‚無効化ã•ã‚ŒãŸå ´åˆã€èª¤ã£ãŸã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスã¯ãƒ‡ãƒ¼ã‚¿å†…ã§ãã®ã¾ã¾æ®‹ã‚Šã¾ã™ã€‚デフォルト値 - `true`。 +- [input_format_json_empty_as_default](/docs/ja/operations/settings/settings-formats.md/#input_format_json_empty_as_default) - JSON入力ã§ç©ºã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’デフォルト値ã¨ã—ã¦å‡¦ç†ã—ã¾ã™ã€‚デフォルト値 - `false`。複雑ãªãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå¼ã®å ´åˆã¯ã€[input_format_defaults_for_omitted_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_defaults_for_omitted_fields)も有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- [output_format_json_quote_64bit_integers](/docs/ja/operations/settings/settings-formats.md/#output_format_json_quote_64bit_integers) - JSON出力形å¼ã§64ビット整数ã®å¼•ç”¨ã‚’制御ã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [output_format_json_quote_64bit_floats](/docs/ja/operations/settings/settings-formats.md/#output_format_json_quote_64bit_floats) - JSON出力形å¼ã§64ビット浮動å°æ•°ç‚¹æ•°ã®å¼•ç”¨ã‚’制御ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [output_format_json_quote_denormals](/docs/ja/operations/settings/settings-formats.md/#output_format_json_quote_denormals) - JSON出力形å¼ã§ã®`+nan`ã€`-nan`ã€`+inf`ã€`-inf` ã®å‡ºåŠ›ã‚’有効ã«ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [output_format_json_quote_decimals](/docs/ja/operations/settings/settings-formats.md/#output_format_json_quote_decimals) - JSON出力形å¼ã§ã®å°æ•°ã®å¼•ç”¨ã‚’制御ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [output_format_json_escape_forward_slashes](/docs/ja/operations/settings/settings-formats.md/#output_format_json_escape_forward_slashes) - JSON出力形å¼ã§ã®æ–‡å­—列出力ã®ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—を制御ã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [output_format_json_named_tuples_as_objects](/docs/ja/operations/settings/settings-formats.md/#output_format_json_named_tuples_as_objects) - åå‰ä»˜ãタプルカラムをJSONオブジェクトã¨ã—ã¦ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã—ã¾ã™ã€‚デフォルト値 - `true`。 +- [output_format_json_array_of_rows](/docs/ja/operations/settings/settings-formats.md/#output_format_json_array_of_rows) - JSONEachRow(Compact)å½¢å¼ã§å…¨è¡Œã®JSONé…列を出力ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [output_format_json_validate_utf8](/docs/ja/operations/settings/settings-formats.md/#output_format_json_validate_utf8) - JSON出力形å¼ã§ã®UTF-8シーケンスã®æ¤œè¨¼ã‚’有効ã«ã—ã¾ã™ï¼ˆãã‚Œã¯JSON/JSONCompact/JSONColumnsWithMetadataå½¢å¼ã«å½±éŸ¿ã—ã¾ã›ã‚“ã€ãれらã¯å¸¸ã«utf8を検証ã—ã¾ã™ï¼‰ã€‚デフォルト値 - `false`。 + +## BSONEachRow {#bsoneachrow} + +ã“ã®å½¢å¼ã§ã¯ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’区分ãªã—ã§BSONドキュメントã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ/解æžã—ã¾ã™ã€‚ +å„è¡Œã¯å˜ä¸€ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¨ã—ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã€å„カラムã¯ã‚«ãƒ©ãƒ åをキーã¨ã—ã¦å˜ä¸€ã®BSONドキュメントフィールドã¨ã—ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +出力ã®ãŸã‚ã«ã€ClickHouseã®ã‚¿ã‚¤ãƒ—ã¨BSONタイプã®å¯¾å¿œé–¢ä¿‚ã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +| ClickHouseã®ã‚¿ã‚¤ãƒ— | BSONタイプ | +|-----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| +| [Bool](/docs/ja/sql-reference/data-types/boolean.md) | `\x08` boolean | +| [Int8/UInt8](/docs/ja/sql-reference/data-types/int-uint.md)/[Enum8](/docs/ja/sql-reference/data-types/enum.md) | `\x10` int32 | +| [Int16/UInt16](/docs/ja/sql-reference/data-types/int-uint.md)/[Enum16](/docs/ja/sql-reference/data-types/enum.md) | `\x10` int32 | +| [Int32](/docs/ja/sql-reference/data-types/int-uint.md) | `\x10` int32 | +| [UInt32](/docs/ja/sql-reference/data-types/int-uint.md) | `\x12` int64 | +| [Int64/UInt64](/docs/ja/sql-reference/data-types/int-uint.md) | `\x12` int64 | +| [Float32/Float64](/docs/ja/sql-reference/data-types/float.md) | `\x01` double | +| [Date](/docs/ja/sql-reference/data-types/date.md)/[Date32](/docs/ja/sql-reference/data-types/date32.md) | `\x10` int32 | +| [DateTime](/docs/ja/sql-reference/data-types/datetime.md) | `\x12` int64 | +| [DateTime64](/docs/ja/sql-reference/data-types/datetime64.md) | `\x09` datetime | +| [Decimal32](/docs/ja/sql-reference/data-types/decimal.md) | `\x10` int32 | +| [Decimal64](/docs/ja/sql-reference/data-types/decimal.md) | `\x12` int64 | +| [Decimal128](/docs/ja/sql-reference/data-types/decimal.md) | `\x05` binary, `\x00` binary subtype, size = 16 | +| [Decimal256](/docs/ja/sql-reference/data-types/decimal.md) | `\x05` binary, `\x00` binary subtype, size = 32 | +| [Int128/UInt128](/docs/ja/sql-reference/data-types/int-uint.md) | `\x05` binary, `\x00` binary subtype, size = 16 | +| [Int256/UInt256](/docs/ja/sql-reference/data-types/int-uint.md) | `\x05` binary, `\x00` binary subtype, size = 32 | +| [String](/docs/ja/sql-reference/data-types/string.md)/[FixedString](/docs/ja/sql-reference/data-types/fixedstring.md) | `\x05` binary, `\x00` binary subtype or \x02 string if setting output_format_bson_string_as_string is enabled | +| [UUID](/docs/ja/sql-reference/data-types/uuid.md) | `\x05` binary, `\x04` uuid subtype, size = 16 | +| [Array](/docs/ja/sql-reference/data-types/array.md) | `\x04` array | +| [Tuple](/docs/ja/sql-reference/data-types/tuple.md) | `\x04` array | +| [Named Tuple](/docs/ja/sql-reference/data-types/tuple.md) | `\x03` document | +| [Map](/docs/ja/sql-reference/data-types/map.md) | `\x03` document | +| [IPv4](/docs/ja/sql-reference/data-types/ipv4.md) | `\x10` int32 | +| [IPv6](/docs/ja/sql-reference/data-types/ipv6.md) | `\x05` binary, `\x00` binary subtype | + +入力ã®ãŸã‚ã«ã€BSONタイプã¨ClickHouseã®ã‚¿ã‚¤ãƒ—ã®å¯¾å¿œé–¢ä¿‚ã¯æ¬¡ã®é€šã‚Šã§ã™: + +| BSONタイプ | ClickHouseタイプ | +|------------------------------|------------------------------------------------------------------------------------------------------| +| `\x01` double | [Float32/Float64](/docs/ja/sql-reference/data-types/float.md) | +| `\x02` string | [String](/docs/ja/sql-reference/data-types/string.md)/[FixedString](/docs/ja/sql-reference/data-types/fixedstring.md) | +| `\x03` document | [Map](/docs/ja/sql-reference/data-types/map.md)/[Named Tuple](/docs/ja/sql-reference/data-types/tuple.md) | +| `\x04` array | [Array](/docs/ja/sql-reference/data-types/array.md)/[Tuple](/docs/ja/sql-reference/data-types/tuple.md) | +| `\x05` binary, `\x00` | [String](/docs/ja/sql-reference/data-types/string.md)/[FixedString](/docs/ja/sql-reference/data-types/fixedstring.md)/[IPv6](/docs/ja/sql-reference/data-types/ipv6.md) | +| `\x05` binary, `\x02` old | [String](/docs/ja/sql-reference/data-types/string.md)/[FixedString](/docs/ja/sql-reference/data-types/fixedstring.md) | +| `\x05` binary, `\x03` old | [UUID](/docs/ja/sql-reference/data-types/uuid.md) | +| `\x05` binary, `\x04` | [UUID](/docs/ja/sql-reference/data-types/uuid.md) | +| `\x07` ObjectId | [String](/docs/ja/sql-reference/data-types/string.md)/[FixedString](/docs/ja/sql-reference/data-types/fixedstring.md) | +| `\x08` boolean | [Bool](/docs/ja/sql-reference/data-types/boolean.md) | +| `\x09` datetime | [DateTime64](/docs/ja/sql-reference/data-types/datetime64.md) | +| `\x0A` null value | [NULL](/docs/ja/sql-reference/data-types/nullable.md) | +| `\x0D` JavaScript code | [String](/docs/ja/sql-reference/data-types/string.md)/[FixedString](/docs/ja/sql-reference/data-types/fixedstring.md) | +| `\x0E` symbol | [String](/docs/ja/sql-reference/data-types/string.md)/[FixedString](/docs/ja/sql-reference/data-types/fixedstring.md) | +| `\x10` int32 | [Int32/UInt32](/docs/ja/sql-reference/data-types/int-uint.md)/[Decimal32](/docs/ja/sql-reference/data-types/decimal.md)/[IPv4](/docs/ja/sql-reference/data-types/ipv4.md)/[Enum8/Enum16](/docs/ja/sql-reference/data-types/enum.md) | +| `\x12` int64 | [Int64/UInt64](/docs/ja/sql-reference/data-types/int-uint.md)/[Decimal64](/docs/ja/sql-reference/data-types/decimal.md)/[DateTime64](/docs/ja/sql-reference/data-types/datetime64.md) | + +ä»–ã®BSONタイプã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。ã¾ãŸã€ç•°ãªã‚‹æ•´æ•°åž‹é–“ã®å¤‰æ›ã‚’è¡Œã„ã¾ã™ï¼ˆãŸã¨ãˆã°ã€BSON int32値をClickHouse UInt8ã«æŒ¿å…¥ã§ãã¾ã™ï¼‰ã€‚ +大ããªæ•´æ•°ãŠã‚ˆã³å°æ•°ï¼ˆInt128/UInt128/Int256/UInt256/Decimal128/Decimal256)ã¯ã€`\x00`ãƒã‚¤ãƒŠãƒªã‚µãƒ–タイプをæŒã¤BSONãƒã‚¤ãƒŠãƒªå€¤ã‹ã‚‰è§£æžã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ã“ã®å½¢å¼ã¯ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºãŒäºˆæƒ³å€¤ã®ã‚µã‚¤ã‚ºã¨ç­‰ã—ã„ã“ã¨ã‚’検証ã—ã¾ã™ã€‚ + +注: ã“ã®å½¢å¼ã¯ã€ãƒ“ッグエンディアンプラットフォームã§ã¯é©åˆ‡ã«å‹•ä½œã—ã¾ã›ã‚“。 + +### BSONå½¢å¼ã®è¨­å®š {#bson-format-settings} + +- [output_format_bson_string_as_string](/docs/ja/operations/settings/settings-formats.md/#output_format_bson_string_as_string) - Stringカラムã«å¯¾ã—ã¦BSON Stringタイプを使用ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_bson_skip_fields_with_unsupported_types_in_schema_inference](/docs/ja/operations/settings/settings-formats.md/#input_format_bson_skip_fields_with_unsupported_types_in_schema_inference) - フォーマットBSONEachRowã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„åž‹ã‚’æŒã¤ã‚«ãƒ©ãƒ ã‚’スキップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルト値 - `false`。 + +## Native {#native} + +最も効率的ãªå½¢å¼ã§ã™ã€‚データã¯ãƒã‚¤ãƒŠãƒªå½¢å¼ã§ãƒ–ロックã”ã¨ã«æ›¸ãè¾¼ã¾ã‚Œèª­ã¿å–られã¾ã™ã€‚å„ブロックã«ã¤ã„ã¦ã€è¡Œæ•°ã€ã‚«ãƒ©ãƒ æ•°ã€ã‚«ãƒ©ãƒ åã¨åž‹ã€ãã—ã¦ã“ã®ãƒ–ロックã®ã‚«ãƒ©ãƒ éƒ¨åˆ†ãŒæ¬¡ã€…ã«è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€ã“ã®å½¢å¼ã¯ã€Œã‚«ãƒ©ãƒ åž‹ã€ã§ã‚ã‚Šã€ã‚«ãƒ©ãƒ ã‚’è¡Œã«å¤‰æ›ã—ã¾ã›ã‚“。ã“ã‚Œã¯ã€ã‚µãƒ¼ãƒãƒ¼é–“ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ã§ä½¿ç”¨ã•ã‚Œã‚‹å½¢å¼ã§ã‚ã‚Šã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚„C++クライアントã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ + +ã“ã®å½¢å¼ã‚’使用ã—ã¦ã€ClickHouse DBMSã§ã®ã¿èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãるダンプを迅速ã«ç”Ÿæˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å½¢å¼ã‚’自分ã§æ“作ã™ã‚‹æ„味ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## Null {#null} + +何も出力ã—ã¾ã›ã‚“。ãŸã ã—ã€ã‚¯ã‚¨ãƒªã¯å‡¦ç†ã•ã‚Œã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ä¼é€ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ†ã‚¹ãƒˆã€ç‰¹ã«ãƒ‘フォーマンステストã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +当然ãªãŒã‚‰ã€ã“ã®å½¢å¼ã¯å‡ºåŠ›å°‚用ã§ã‚ã‚Šã€è§£æžã«ã¯é©ã—ã¦ã„ã¾ã›ã‚“。 + +## Pretty {#pretty} + +Unicodeアートテーブルã¨ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’出力ã—ã€ANSIエスケープシーケンスを使用ã—ã¦ç«¯æœ«å†…ã®è‰²ã‚’設定ã—ã¾ã™ã€‚ +テーブルã®å®Œå…¨ãªã‚°ãƒªãƒƒãƒ‰ãŒæç”»ã•ã‚Œã€å„è¡Œã¯ç«¯æœ«å†…ã§2行をå æœ‰ã—ã¾ã™ã€‚ +å„çµæžœãƒ–ロックã¯å€‹åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€çµæžœã‚’ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã›ãšã«ãƒ–ロックを出力ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ï¼ˆå€¤ã®å¯è¦–å¹…ã‚’ã™ã¹ã¦äº‹å‰ã«è¨ˆç®—ã™ã‚‹ãŸã‚ã«ã¯ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ãŒå¿…è¦ã«ãªã‚Šã¾ã™ï¼‰ã€‚ + +[NULL](/docs/ja/sql-reference/syntax.md)ã¯`á´ºáµá´¸á´¸`ã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +例([PrettyCompact](#prettycompact)å½¢å¼ã§è¡¨ç¤ºï¼‰: + +``` sql +SELECT * FROM t_null +``` + +``` response +┌─x─┬────y─┠+│ 1 │ á´ºáµá´¸á´¸ │ +└───┴──────┘ +``` + +è¡Œã¯Pretty*å½¢å¼ã§ã¯ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã¾ã›ã‚“。例ã¯[PrettyCompact](#prettycompact)å½¢å¼ã§è¡¨ç¤ºã•ã‚Œã¾ã™: + +``` sql +SELECT 'String with \'quotes\' and \t character' AS Escaping_test +``` + +``` response +┌─Escaping_test────────────────────────┠+│ String with 'quotes' and character │ +└──────────────────────────────────────┘ +``` + +端末ã«ã‚ã¾ã‚Šã«ã‚‚多ãã®ãƒ‡ãƒ¼ã‚¿ã‚’ダンプã—ãªã„よã†ã«ã€æœ€åˆã®10,000è¡Œã®ã¿ãŒå°åˆ·ã•ã‚Œã¾ã™ã€‚行数ãŒ10,000以上ã®å ´åˆã€ã€ŒShowed first 10 000ã€ã¨ã„ã†ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå°åˆ·ã•ã‚Œã¾ã™ã€‚ã“ã®å½¢å¼ã¯ã€ã‚¯ã‚¨ãƒªçµæžœã‚’出力ã™ã‚‹ãŸã‚ã«ã®ã¿é©ã—ã¦ãŠã‚Šã€è§£æžã«ã¯é©ã—ã¦ã„ã¾ã›ã‚“(テーブルã«æŒ¿å…¥ã™ã‚‹ãŸã‚ã«ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ï¼‰ã€‚ + +Prettyå½¢å¼ã¯ã€ç·åˆå€¤ï¼ˆWITH TOTALSを使用ã—ãŸå ´åˆï¼‰ã¨æ¥µç«¯å€¤ï¼ˆ'extremes'ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼‰ã®å‡ºåŠ›ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ã“ã®å ´åˆã€ç·åˆå€¤ã¨æ¥µç«¯å€¤ã¯ãƒ¡ã‚¤ãƒ³ãƒ‡ãƒ¼ã‚¿ã®å¾Œã«å€‹åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã§å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚例([PrettyCompact](#prettycompact)å½¢å¼ã§è¡¨ç¤ºï¼‰: + +``` sql +SELECT EventDate, count() AS c FROM test.hits GROUP BY EventDate WITH TOTALS ORDER BY EventDate FORMAT PrettyCompact +``` + +``` response +┌──EventDate─┬───────c─┠+│ 2014-03-17 │ 1406958 │ +│ 2014-03-18 │ 1383658 │ +│ 2014-03-19 │ 1405797 │ +│ 2014-03-20 │ 1353623 │ +│ 2014-03-21 │ 1245779 │ +│ 2014-03-22 │ 1031592 │ +│ 2014-03-23 │ 1046491 │ +└────────────┴─────────┘ + +Totals: +┌──EventDate─┬───────c─┠+│ 1970-01-01 │ 8873898 │ +└────────────┴─────────┘ + +Extremes: +┌──EventDate─┬───────c─┠+│ 2014-03-17 │ 1031592 │ +│ 2014-03-23 │ 1406958 │ +└────────────┴─────────┘ +``` + +## PrettyNoEscapes {#prettynoescapes} + +[Pretty](#pretty)ã¨ã¯ç•°ãªã‚ŠANSIエスケープシーケンスã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ãƒ–ラウザã§ã“ã®å½¢å¼ã‚’表示ã™ã‚‹ã®ã«å¿…è¦ã§ã‚ã‚Šã€ã¾ãŸã€ã€Œwatchã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã‚’使用ã™ã‚‹éš›ã«ã‚‚役立ã¡ã¾ã™ã€‚ + +例: + +``` bash +$ watch -n1 "clickhouse-client --query='SELECT event, value FROM system.events FORMAT PrettyCompactNoEscapes'" +``` + +ブラウザã§è¡¨ç¤ºã™ã‚‹ãŸã‚ã«ã¯ã€HTTPインターフェイスを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## PrettyMonoBlock {#prettymonoblock} + +[Pretty](#pretty)ã¨ã¯ç•°ãªã‚Šã€æœ€å¤§10,000è¡ŒãŒãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã•ã‚Œã€ãƒ–ロックã§ã¯ãªãå˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +## PrettyNoEscapesMonoBlock {#prettynoescapesmonoblock} + +[PrettyNoEscapes](#prettynoescapes)ã¨ã¯ç•°ãªã‚Šã€æœ€å¤§10,000è¡ŒãŒãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã•ã‚Œã€ãƒ–ロックã§ã¯ãªãå˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + + +## PrettyCompact {#prettycompact} + +[Pretty](#pretty)ã¨ã¯ç•°ãªã‚Šã€è¡Œé–“ã«ã‚°ãƒªãƒƒãƒ‰ãŒæç”»ã•ã‚Œã€çµæžœãŒã‚ˆã‚Šã‚³ãƒ³ãƒ‘クトã«ãªã‚Šã¾ã™ã€‚ +ã“ã®å½¢å¼ã¯ã€å¯¾è©±ãƒ¢ãƒ¼ãƒ‰ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## PrettyCompactNoEscapes {#prettycompactnoescapes} + +[PrettyCompact](#prettycompact)ã¨ã¯ç•°ãªã‚Šã€ANSIエスケープシーケンスã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ãƒ–ラウザã§ã“ã®å½¢å¼ã‚’表示ã™ã‚‹ã®ã«å¿…è¦ã§ã‚ã‚Šã€ã€Œwatchã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã‚’使用ã™ã‚‹éš›ã«ã‚‚役立ã¡ã¾ã™ã€‚ + +## PrettyCompactMonoBlock {#prettycompactmonoblock} + +[PrettyCompact](#prettycompact)ã¨ã¯ç•°ãªã‚Šã€æœ€å¤§10,000è¡ŒãŒãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã•ã‚Œã€ãƒ–ロックã§ã¯ãªãå˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +## PrettyCompactNoEscapesMonoBlock {#prettycompactnoescapesmonoblock} + +[PrettyCompactNoEscapes](#prettycompactnoescapes)ã¨ã¯ç•°ãªã‚Šã€æœ€å¤§10,000è¡ŒãŒãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã•ã‚Œã€ãƒ–ロックã§ã¯ãªãå˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +## PrettySpace {#prettyspace} + +[PrettyCompact](#prettycompact)ã¨ã¯ç•°ãªã‚Šã€ã‚°ãƒªãƒƒãƒ‰ã®ä»£ã‚ã‚Šã«ãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ï¼ˆã‚¹ãƒšãƒ¼ã‚¹æ–‡å­—)ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## PrettySpaceNoEscapes {#prettyspacenoescapes} + +[PrettySpace](#prettyspace)ã¨ã¯ç•°ãªã‚Šã€ANSIエスケープシーケンスã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ãƒ–ラウザã§ã“ã®å½¢å¼ã‚’表示ã™ã‚‹ã®ã«å¿…è¦ã§ã‚ã‚Šã€ã€Œwatchã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã‚’使用ã™ã‚‹éš›ã«ã‚‚役立ã¡ã¾ã™ã€‚ + +## PrettySpaceMonoBlock {#prettyspacemonoblock} + +[PrettySpace](#prettyspace)ã¨ã¯ç•°ãªã‚Šã€æœ€å¤§10,000è¡ŒãŒãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã•ã‚Œã€ãƒ–ロックã§ã¯ãªãå˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +## PrettySpaceNoEscapesMonoBlock {#prettyspacenoescapesmonoblock} + +[PrettySpaceNoEscapes](#prettyspacenoescapes)ã¨ã¯ç•°ãªã‚Šã€æœ€å¤§10,000è¡ŒãŒãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã•ã‚Œã€ãƒ–ロックã§ã¯ãªãå˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +## Prettyå½¢å¼ã®è¨­å®š {#pretty-formats-settings} + +- [output_format_pretty_max_rows](/docs/ja/operations/settings/settings-formats.md/#output_format_pretty_max_rows) - Prettyフォーマットã®è¡Œã®ãƒªãƒŸãƒƒãƒˆã€‚デフォルト値 - `10000`。 +- [output_format_pretty_max_column_pad_width](/docs/ja/operations/settings/settings-formats.md/#output_format_pretty_max_column_pad_width) - Prettyフォーマットã§ã‚«ãƒ©ãƒ å†…ã®ã™ã¹ã¦ã®å€¤ã‚’パッドã™ã‚‹æœ€å¤§å¹…。デフォルト値 - `250`。 +- [output_format_pretty_max_value_width](/docs/ja/operations/settings/settings-formats.md/#output_format_pretty_max_value_width) - Prettyフォーマットã§è¡¨ç¤ºã™ã‚‹æœ€å¤§ã®å€¤ã®å¹…。ã“れを超ãˆã‚‹å ´åˆã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ã€‚デフォルト値 - `10000`。 +- [output_format_pretty_color](/docs/ja/operations/settings/settings-formats.md/#output_format_pretty_color) - Prettyフォーマットã§ANSIエスケープシーケンスを使用ã—ã¦è‰²ã‚’塗る。デフォルト値 - `true`。 +- [output_format_pretty_grid_charset](/docs/ja/operations/settings/settings-formats.md/#output_format_pretty_grid_charset) - グリッドã®ç½«ç·šã‚’å°åˆ·ã™ã‚‹ãŸã‚ã®æ–‡å­—セット。使用å¯èƒ½ãªæ–‡å­—セット: ASCII, UTF-8。デフォルト値 - `UTF-8`。 +- [output_format_pretty_row_numbers](/docs/ja/operations/settings/settings-formats.md/#output_format_pretty_row_numbers) - Pretty出力形å¼ã§å„è¡Œã®å‰ã«è¡Œç•ªå·ã‚’追加ã™ã‚‹ã€‚デフォルト値 - `true`。 +- [output_format_pretty_display_footer_column_names](/docs/ja/operations/settings/settings-formats.md/#output_format_pretty_display_footer_column_names) - テーブル内ã«å¤šãã®è¡ŒãŒã‚ã‚‹å ´åˆã€ãƒ•ãƒƒã‚¿ãƒ¼ã§ã‚«ãƒ©ãƒ åを表示ã™ã‚‹ã€‚デフォルト値 - `true`。 +- [output_format_pretty_display_footer_column_names_min_rows](/docs/ja/operations/settings/settings-formats.md/#output_format_pretty_display_footer_column_names_min_rows) - フッターãŒè¡¨ç¤ºã•ã‚Œã‚‹æœ€å°è¡Œæ•°ã‚’設定ã—ã¾ã™ã€‚[output_format_pretty_display_footer_column_names](/docs/ja/operations/settings/settings-formats.md/#output_format_pretty_display_footer_column_names)ãŒæœ‰åŠ¹ãªå ´åˆã«é©ç”¨ã•ã‚Œã¾ã™ã€‚デフォルト値 - 50。 + +## RowBinary {#rowbinary} + +データを行ã”ã¨ã«ãƒã‚¤ãƒŠãƒªå½¢å¼ã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŠã‚ˆã³è§£æžã—ã¾ã™ã€‚è¡Œã¨å€¤ã¯åŒºåˆ‡ã‚Šãªã—ã§åˆ—挙ã•ã‚Œã¾ã™ã€‚データãŒãƒã‚¤ãƒŠãƒªå½¢å¼ã§ã‚ã‚‹ãŸã‚ã€`FORMAT RowBinary`ã®å¾Œã®åŒºåˆ‡ã‚Šæ–‡å­—ã¯æ¬¡ã®ã‚ˆã†ã«åŽ³å¯†ã«æŒ‡å®šã•ã‚Œã¾ã™ï¼šä»»æ„ã®æ•°ã®ç©ºç™½ï¼ˆã‚¹ãƒšãƒ¼ã‚¹`' '` - スペースã€ã‚³ãƒ¼ãƒ‰`0x20`; タブ`'\t'` - タブã€ã‚³ãƒ¼ãƒ‰`0x09`; 改ページ`'\f'` - 改ページã€ã‚³ãƒ¼ãƒ‰`0x0C`)ã«ç¶šã„ã¦æ­£ç¢ºã«1ã¤ã®æ–°ã—ã„行シーケンス(Windowsスタイル`"\r\n"`ã¾ãŸã¯Unixスタイル`'\n'`)ã§ã‚ã‚Šã€ãã®ã™ã後ã«ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã®å½¢å¼ã¯ã€ãƒã‚¤ãƒ†ã‚£ãƒ–å½¢å¼ã‚ˆã‚Šã‚‚効率ãŒæ‚ªãã€è¡Œãƒ™ãƒ¼ã‚¹ã§ã‚ã‚‹ãŸã‚ã§ã™ã€‚ + +æ•´æ•°ã¯å›ºå®šé•·ãƒªãƒˆãƒ«ã‚¨ãƒ³ãƒ‡ã‚£ã‚¢ãƒ³è¡¨ç¾ã‚’使用ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€UInt64ã¯8ãƒã‚¤ãƒˆã‚’使用ã—ã¾ã™ã€‚ +DateTimeã¯Unixタイムスタンプを値ã¨ã—ã¦æ ¼ç´ã™ã‚‹UInt32ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ +Dateã¯1970-01-01ã‹ã‚‰ã®æ—¥æ•°ã‚’値ã¨ã—ã¦æ ¼ç´ã™ã‚‹UInt16オブジェクトã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ +Stringã¯å¯å¤‰é•·ï¼ˆç¬¦å·ãªã—[LEB128](https://en.wikipedia.org/wiki/LEB128))ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã€æ–‡å­—列ã®ãƒã‚¤ãƒˆãŒç¶šãã¾ã™ã€‚ +FixedStringã¯å˜ã«ãƒã‚¤ãƒˆã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦è¡¨ã•ã‚Œã¾ã™ã€‚ + +Arrayã¯å¯å¤‰é•·ï¼ˆç¬¦å·ãªã—[LEB128](https://en.wikipedia.org/wiki/LEB128))ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã€é…列ã®é€£ç¶šã™ã‚‹è¦ç´ ãŒç¶šãã¾ã™ã€‚ + +[NULL](/docs/ja/sql-reference/syntax.md/#null-literal)サãƒãƒ¼ãƒˆã®ãŸã‚ã€å„[Nullable](/docs/ja/sql-reference/data-types/nullable.md)値ã®å‰ã«1ã¾ãŸã¯0ã‚’å«ã‚€è¿½åŠ ã®ãƒã‚¤ãƒˆãŒè¿½åŠ ã•ã‚Œã¾ã™ã€‚1ã®å ´åˆã€å€¤ã¯`NULL`ã¨ã•ã‚Œã€ã“ã®ãƒã‚¤ãƒˆã¯åˆ¥ã®å€¤ã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚0ã®å ´åˆã€ã“ã®ãƒã‚¤ãƒˆã®å¾Œã®å€¤ã¯`NULL`ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## RowBinaryWithNames {#rowbinarywithnames} + +[RowBinary](#rowbinary)ã¨é¡žä¼¼ã—ã¾ã™ãŒã€ãƒ˜ãƒƒãƒ€ãƒ¼ãŒè¿½åŠ ã•ã‚Œã¦ã„ã¾ã™: + +- [LEB128](https://en.wikipedia.org/wiki/LEB128)ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸã‚«ãƒ©ãƒ æ•°(N) +- N個ã®`String`ãŒã‚«ãƒ©ãƒ åを指定 + +:::note +[settings-formats-input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚未知ã®åå‰ã®ã‚«ãƒ©ãƒ ã¯ã€[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã¯ã€æœ€åˆã®è¡ŒãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +## RowBinaryWithNamesAndTypes {#rowbinarywithnamesandtypes} + +[RowBinary](#rowbinary)ã¨é¡žä¼¼ã—ã¾ã™ãŒã€ãƒ˜ãƒƒãƒ€ãƒ¼ãŒè¿½åŠ ã•ã‚Œã¦ã„ã¾ã™: + +- [LEB128](https://en.wikipedia.org/wiki/LEB128)ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸã‚«ãƒ©ãƒ æ•°(N) +- N個ã®`String`ãŒã‚«ãƒ©ãƒ åを指定 +- N個ã®`String`ãŒã‚«ãƒ©ãƒ åž‹ã‚’指定 + +:::note +[settings-formats-input_format_with_names_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_names_use_header)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ã‚«ãƒ©ãƒ ã¯åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚未知ã®åå‰ã®ã‚«ãƒ©ãƒ ã¯ã€[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã¯ã€æœ€åˆã®è¡ŒãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +[settings-formats-input_format_with_types_use_header](/docs/ja/operations/settings/settings-formats.md/#input_format_with_types_use_header)ã®è¨­å®šãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®åž‹ã¯ãƒ†ãƒ¼ãƒ–ルã®å¯¾å¿œã™ã‚‹ã‚«ãƒ©ãƒ ã®åž‹ã¨æ¯”較ã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€2番目ã®è¡Œã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +::: + +## RowBinaryWithDefaults {#rowbinarywithdefaults} + +[RowBinary](#rowbinary)ã¨é¡žä¼¼ã—ã¾ã™ãŒã€å„カラムã®å‰ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’使用ã™ã‚‹ã‹ã©ã†ã‹ã‚’示ã™è¿½åŠ ã®ãƒã‚¤ãƒˆãŒã‚ã‚Šã¾ã™ã€‚ + +例: + +```sql +:) select * from format('RowBinaryWithDefaults', 'x UInt32 default 42, y UInt32', x'010001000000') + +┌──x─┬─y─┠+│ 42 │ 1 │ +└────┴───┘ +``` + +カラム`x`ã®å ´åˆã€å”¯ä¸€ã®1ãƒã‚¤ãƒˆ`01`ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒä½¿ç”¨ã•ã‚Œã‚‹ã¹ãã§ã‚ã‚‹ã“ã¨ã‚’示ã—ã€ãã®å¾Œã®ãƒ‡ãƒ¼ã‚¿ã¯æä¾›ã•ã‚Œã¾ã›ã‚“。 +カラム`y`ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯`00`ã®ãƒã‚¤ãƒˆã§å§‹ã¾ã‚Šã€ã“ã‚Œã¯ã‚«ãƒ©ãƒ ã«å®Ÿéš›ã®å€¤ãŒã‚ã‚‹ã“ã¨ã‚’示ã—ã€ãã®å¾Œã®ãƒ‡ãƒ¼ã‚¿`01000000`ã‹ã‚‰èª­ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## RowBinaryå½¢å¼ã®è¨­å®š {#row-binary-format-settings} + +- [format_binary_max_string_size](/docs/ja/operations/settings/settings-formats.md/#format_binary_max_string_size) - RowBinaryå½¢å¼ã§ã®Stringã«å¯¾ã™ã‚‹æœ€å¤§è¨±å®¹ã‚µã‚¤ã‚ºã€‚デフォルト値 - `1GiB`。 +- [output_format_binary_encode_types_in_binary_format](/docs/ja/operations/settings/settings-formats.md/#output_format_binary_encode_types_in_binary_format) - ヘッダー内ã§ã®åž‹ã®åå‰ã‚’æŒã¤æ–‡å­—列ã®ä»£ã‚ã‚Šã«ã€[ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°](/docs/ja/sql-reference/data-types/data-types-binary-encoding.md)を使用ã—ã¦RowBinaryWithNamesAndTypes出力形å¼ã§åž‹ã‚’記述ã—ã¾ã™ã€‚デフォルト値 - `false`。 +- [input_format_binary_encode_types_in_binary_format](/docs/ja/operations/settings/settings-formats.md/#input_format_binary_encode_types_in_binary_format) - RowBinaryWithNamesAndTypes入力形å¼ã§åž‹åを文字列ã¨ã—ã¦ã§ã¯ãªãã€[ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°](/docs/ja/sql-reference/data-types/data-types-binary-encoding.md)を使用ã—ã¦ãƒ˜ãƒƒãƒ€ãƒ¼å†…ã®åž‹ã‚’読ã¿å–ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルト値 - `false`. +- [output_format_binary_write_json_as_string](/docs/ja/operations/settings/settings-formats.md/#output_format_binary_write_json_as_string) - RowBinary出力形å¼ã§[JSON](/docs/ja/sql-reference/data-types/newjson.md)データ型ã®å€¤ã‚’JSON [String](/docs/ja/sql-reference/data-types/string.md)値ã¨ã—ã¦æ›¸ã込むã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルト値 - `false`. +- [input_format_binary_read_json_as_string](/docs/ja/operations/settings/settings-formats.md/#input_format_binary_read_json_as_string) - RowBinary入力形å¼ã§[JSON](/docs/ja/sql-reference/data-types/newjson.md)データ型ã®å€¤ã‚’JSON [String](/docs/ja/sql-reference/data-types/string.md)値ã¨ã—ã¦èª­ã¿å–ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルト値 - `false`. + +## 値 {#data-format-values} + +å„行を括弧ã§å›²ã‚“ã§å‡ºåŠ›ã—ã¾ã™ã€‚è¡Œã¯ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚Œã€æœ€å¾Œã®è¡Œã®å¾Œã«ã¯ã‚«ãƒ³ãƒžã¯ã‚ã‚Šã¾ã›ã‚“。括弧内ã®å€¤ã‚‚カンマã§åŒºåˆ‡ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚数値ã¯å¼•ç”¨ç¬¦ãªã—ã®10進形å¼ã§å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚é…列ã¯è§’括弧ã§å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚文字列ã€æ—¥ä»˜ã€ãŠã‚ˆã³æ™‚é–“ã‚’ä¼´ã†æ—¥ä»˜ã¯å¼•ç”¨ç¬¦ã§å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚エスケープルールã¨è§£æžã¯[TabSeparated](#tabseparated)å½¢å¼ã¨ä¼¼ã¦ã„ã¾ã™ã€‚フォーマット中ã€ä½™åˆ†ãªã‚¹ãƒšãƒ¼ã‚¹ã¯æŒ¿å…¥ã•ã‚Œã¾ã›ã‚“ãŒã€è§£æžä¸­ã«ã¯è¨±å¯ã•ã‚Œã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ï¼ˆé…列値内ã®ã‚¹ãƒšãƒ¼ã‚¹ã‚’除ãã€ã“ã‚Œã¯è¨±å¯ã•ã‚Œã¾ã›ã‚“)。[NULL](/docs/ja/sql-reference/syntax.md)ã¯`NULL`ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +Valueså½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’渡ã™éš›ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ãŒå¿…è¦ãªæœ€å°é™ã®æ–‡å­—セット:シングルクオートã¨ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã€‚ + +ã“ã®å½¢å¼ã¯`INSERT INTO t VALUES ...`ã§ä½¿ç”¨ã•ã‚Œã¾ã™ãŒã€ã‚¯ã‚¨ãƒªã®çµæžœã‚’フォーマットã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## 値形å¼ã®è¨­å®š {#values-format-settings} + +- [input_format_values_interpret_expressions](/docs/ja/operations/settings/settings-formats.md/#input_format_values_interpret_expressions) - ストリーミングパーサãŒãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’解æžã§ããªã„å ´åˆã€SQLパーサを実行ã—ã€SQLå¼ã¨ã—ã¦è§£é‡ˆã—よã†ã¨ã—ã¾ã™ã€‚デフォルト値 - `true`. +- [input_format_values_deduce_templates_of_expressions](/docs/ja/operations/settings/settings-formats.md/#input_format_values_deduce_templates_of_expressions) - ストリーミングパーサãŒãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’解æžã§ããªã„å ´åˆã€SQLパーサを実行ã—ã€SQLå¼ã®ãƒ†ãƒ³ãƒ—レートを導出ã—ã€ãƒ†ãƒ³ãƒ—レートを使用ã—ã¦ã™ã¹ã¦ã®è¡Œã‚’解æžã—ã€ã™ã¹ã¦ã®è¡Œã«å¯¾ã—ã¦å¼ã‚’解釈ã—よã†ã¨ã—ã¾ã™ã€‚デフォルト値 - `true`. +- [input_format_values_accurate_types_of_literals](/docs/ja/operations/settings/settings-formats.md/#input_format_values_accurate_types_of_literals) - テンプレートを使用ã—ã¦å¼ã‚’解æžã—解釈ã™ã‚‹éš›ã«ã€ãƒªãƒ†ãƒ©ãƒ«ã®å®Ÿéš›ã®åž‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚„精度ã®å•é¡Œã‚’回é¿ã—ã¾ã™ã€‚デフォルト値 - `true`. + +## åž‚ç›´ {#vertical} + +å„値を指定ã•ã‚ŒãŸã‚«ãƒ©ãƒ åã¨ã¨ã‚‚ã«åˆ¥ã®è¡Œã«å‡ºåŠ›ã—ã¾ã™ã€‚ã“ã®å½¢å¼ã¯ã€å„è¡ŒãŒå¤šæ•°ã®ã‚«ãƒ©ãƒ ã§æ§‹æˆã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã€1è¡Œã¾ãŸã¯æ•°è¡Œã ã‘を出力ã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã™ã€‚ + +[NULL](/docs/ja/sql-reference/syntax.md)ã¯`á´ºáµá´¸á´¸`ã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +例: + +``` sql +SELECT * FROM t_null FORMAT Vertical +``` + +``` response +Row 1: +────── +x: 1 +y: á´ºáµá´¸á´¸ +``` + +Verticalå½¢å¼ã§ã¯è¡Œã¯ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã¾ã›ã‚“: + +``` sql +SELECT 'string with \'quotes\' and \t with some special \n characters' AS test FORMAT Vertical +``` + +``` response +Row 1: +────── +test: string with 'quotes' and with some special + characters +``` + +ã“ã®å½¢å¼ã¯ã‚¯ã‚¨ãƒªçµæžœã®å‡ºåŠ›ã«ã®ã¿é©ã—ã¦ã„ã¾ã™ãŒã€ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’解æžã™ã‚‹ï¼ˆå–å¾—ã™ã‚‹ï¼‰ãŸã‚ã«ã¯é©ã—ã¦ã„ã¾ã›ã‚“。 + +## XML {#xml} + +XMLå½¢å¼ã¯å‡ºåŠ›å°‚用ã§ã‚ã‚Šã€è§£æžã«ã¯é©ã—ã¦ã„ã¾ã›ã‚“。例: + +``` xml + + + + + + SearchPhrase + String + + + count() + UInt64 + + + + + + + 8267016 + + + bathroom interior design + 2166 + + + clickhouse + 1655 + + + 2014 spring fashion + 1549 + + + freeform photos + 1480 + + + angelina jolie + 1245 + + + omsk + 1112 + + + photos of dog breeds + 1091 + + + curtain designs + 1064 + + + baku + 1000 + + + 10 + 141137 + +``` + +カラムåãŒå—ã‘入れå¯èƒ½ãªå½¢å¼ã§ãªã„å ´åˆã€å˜ã«â€˜field’ãŒè¦ç´ åã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚一般ã«ã€XML構造ã¯JSON構造ã«å¾“ã„ã¾ã™ã€‚JSONã¨åŒæ§˜ã«ã€ç„¡åŠ¹ãªUTF-8シーケンスã¯ç½®æ›æ–‡å­—�ã«å¤‰æ›´ã•ã‚Œã‚‹ãŸã‚ã€å‡ºåŠ›ãƒ†ã‚­ã‚¹ãƒˆã¯æœ‰åŠ¹ãªUTF-8シーケンスã§æ§‹æˆã•ã‚Œã¾ã™ã€‚ + +文字列値内ã®æ–‡å­—`<`ã¨`&`ã¯ãã‚Œãžã‚Œ`<`ã¨`&`ã¨ã—ã¦ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã¾ã™ã€‚ + +é…列ã¯`HelloWorld...`ã¨ã—ã¦ã€ã‚¿ãƒ—ルã¯`HelloWorld...`ã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +## CapnProto {#capnproto} + +CapnProtoã¯ã€[Protocol Buffers](https://developers.google.com/protocol-buffers/)ã‚„[Thrift](https://en.wikipedia.org/wiki/Apache_Thrift)ã«ä¼¼ãŸãƒã‚¤ãƒŠãƒªãƒ¡ãƒƒã‚»ãƒ¼ã‚¸å½¢å¼ã§ã™ãŒã€[JSON](#json)ã‚„[MessagePack](https://msgpack.org/)ã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ + +CapnProtoメッセージã¯åŽ³å¯†ã«åž‹ä»˜ã‘ã•ã‚Œã¦ãŠã‚Šã€è‡ªå·±è¨˜è¿°çš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã—ãŸãŒã£ã¦ã€å¤–部スキーマã®è¨˜è¿°ãŒå¿…è¦ã§ã™ã€‚スキーマã¯ã‚¯ã‚¨ãƒªã”ã¨ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œãã®å ´ã§é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +ã¾ãŸã€[Format Schema](#formatschema)ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +### データ型ã®ãƒžãƒƒãƒãƒ³ã‚° {#data_types-matching-capnproto} + +以下ã®è¡¨ã¯ã€`INSERT`ãŠã‚ˆã³`SELECT`クエリã«ãŠã‘ã‚‹ClickHouseã®[データ型](/docs/ja/sql-reference/data-types/index.md)ã¨å¯¾å¿œã™ã‚‹ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型を示ã—ã¦ã„ã¾ã™ã€‚ + +| CapnProto データ型 (`INSERT`) | ClickHouse データ型 | CapnProto データ型 (`SELECT`) | +|----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------| +| `UINT8`, `BOOL` | [UInt8](/docs/ja/sql-reference/data-types/int-uint.md) | `UINT8` | +| `INT8` | [Int8](/docs/ja/sql-reference/data-types/int-uint.md) | `INT8` | +| `UINT16` | [UInt16](/docs/ja/sql-reference/data-types/int-uint.md), [Date](/docs/ja/sql-reference/data-types/date.md) | `UINT16` | +| `INT16` | [Int16](/docs/ja/sql-reference/data-types/int-uint.md) | `INT16` | +| `UINT32` | [UInt32](/docs/ja/sql-reference/data-types/int-uint.md), [DateTime](/docs/ja/sql-reference/data-types/datetime.md) | `UINT32` | +| `INT32` | [Int32](/docs/ja/sql-reference/data-types/int-uint.md), [Decimal32](/docs/ja/sql-reference/data-types/decimal.md) | `INT32` | +| `UINT64` | [UInt64](/docs/ja/sql-reference/data-types/int-uint.md) | `UINT64` | +| `INT64` | [Int64](/docs/ja/sql-reference/data-types/int-uint.md), [DateTime64](/docs/ja/sql-reference/data-types/datetime.md), [Decimal64](/docs/ja/sql-reference/data-types/decimal.md) | `INT64` | +| `FLOAT32` | [Float32](/docs/ja/sql-reference/data-types/float.md) | `FLOAT32` | +| `FLOAT64` | [Float64](/docs/ja/sql-reference/data-types/float.md) | `FLOAT64` | +| `TEXT, DATA` | [String](/docs/ja/sql-reference/data-types/string.md), [FixedString](/docs/ja/sql-reference/data-types/fixedstring.md) | `TEXT, DATA` | +| `union(T, Void), union(Void, T)` | [Nullable(T)](/docs/ja/sql-reference/data-types/date.md) | `union(T, Void), union(Void, T)` | +| `ENUM` | [Enum(8/16)](/docs/ja/sql-reference/data-types/enum.md) | `ENUM` | +| `LIST` | [Array](/docs/ja/sql-reference/data-types/array.md) | `LIST` | +| `STRUCT` | [Tuple](/docs/ja/sql-reference/data-types/tuple.md) | `STRUCT` | +| `UINT32` | [IPv4](/docs/ja/sql-reference/data-types/ipv4.md) | `UINT32` | +| `DATA` | [IPv6](/docs/ja/sql-reference/data-types/ipv6.md) | `DATA` | +| `DATA` | [Int128/UInt128/Int256/UInt256](/docs/ja/sql-reference/data-types/int-uint.md) | `DATA` | +| `DATA` | [Decimal128/Decimal256](/docs/ja/sql-reference/data-types/decimal.md) | `DATA` | +| `STRUCT(entries LIST(STRUCT(key Key, value Value)))` | [Map](/docs/ja/sql-reference/data-types/map.md) | `STRUCT(entries LIST(STRUCT(key Key, value Value)))` | + +æ•´æ•°åž‹ã¯å…¥åŠ›/出力ã®éš›ã«ç›¸äº’ã«å¤‰æ›å¯èƒ½ã§ã™ã€‚ + +CapnProtoå½¢å¼ã§`Enum`を扱ã†ã«ã¯[format_capn_proto_enum_comparising_mode](/docs/ja/operations/settings/settings-formats.md/#format_capn_proto_enum_comparising_mode)設定を使用ã—ã¦ãã ã•ã„。 + +é…列ã¯ãƒã‚¹ãƒˆå¯èƒ½ã§ã‚ã‚Šã€`Nullable`型を引数ã¨ã—ã¦æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚`Tuple`ã¨`Map`åž‹ã‚‚ãƒã‚¹ãƒˆã§ãã¾ã™ã€‚ + +### データã®æŒ¿å…¥ã¨é¸æŠž {#inserting-and-selecting-data-capnproto} + +ファイルã‹ã‚‰CapnProtoデータをClickHouseテーブルã«æŒ¿å…¥ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¾ã™: + +``` bash +$ cat capnproto_messages.bin | clickhouse-client --query "INSERT INTO test.hits SETTINGS format_schema = 'schema:Message' FORMAT CapnProto" +``` + +ã“ã“ã§ã€`schema.capnp`ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +``` capnp +struct Message { + SearchPhrase @0 :Text; + c @1 :Uint64; +} +``` + +ClickHouseテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã—ã€CapnProtoå½¢å¼ã§ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¾ã™: + +``` bash +$ clickhouse-client --query = "SELECT * FROM test.hits FORMAT CapnProto SETTINGS format_schema = 'schema:Message'" +``` + +### 自動生æˆã‚¹ã‚­ãƒ¼ãƒžã®ä½¿ç”¨ {#using-autogenerated-capn-proto-schema} + +データã®å¤–部CapnProtoスキーマãŒãªã„å ´åˆã§ã‚‚ã€è‡ªå‹•ç”Ÿæˆã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¦CapnProtoå½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’入力/出力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例: + +```sql +SELECT * FROM test.hits format CapnProto SETTINGS format_capn_proto_use_autogenerated_schema=1 +``` + +ã“ã®å ´åˆã€ClickHouseã¯ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã«å¾“ã£ã¦CapnProtoスキーマを自動生æˆã—ã€ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¦CapnProtoå½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’シリアル化ã—ã¾ã™ã€‚ + +自動生æˆã‚¹ã‚­ãƒ¼ãƒžã§CapnProtoファイルを読ã¿è¾¼ã‚€ã“ã¨ã‚‚ã§ãã¾ã™ï¼ˆã“ã®å ´åˆã€ãƒ•ã‚¡ã‚¤ãƒ«ã¯åŒã˜ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¦ä½œæˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰: + +```bash +$ cat hits.bin | clickhouse-client --query "INSERT INTO test.hits SETTINGS format_capn_proto_use_autogenerated_schema=1 FORMAT CapnProto" +``` + +設定[format_capn_proto_use_autogenerated_schema](../operations/settings/settings-formats.md#format_capn_proto_use_autogenerated_schema)ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã«ãªã£ã¦ãŠã‚Šã€[format_schema](../operations/settings/settings-formats.md#formatschema-format-schema)ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +入力/出力中ã«è‡ªå‹•ç”Ÿæˆã‚¹ã‚­ãƒ¼ãƒžã‚’ファイルã«ä¿å­˜ã™ã‚‹ã“ã¨ã‚‚ã§ãã€è¨­å®š[output_format_schema](../operations/settings/settings-formats.md#outputformatschema-output-format-schema)を使用ã—ã¾ã™ã€‚例: + +```sql +SELECT * FROM test.hits format CapnProto SETTINGS format_capn_proto_use_autogenerated_schema=1, output_format_schema='path/to/schema/schema.capnp' +``` + +ã“ã®å ´åˆã€è‡ªå‹•ç”Ÿæˆã•ã‚ŒãŸCapnProtoスキーマã¯ãƒ•ã‚¡ã‚¤ãƒ«`path/to/schema/schema.capnp`ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +## Prometheus {#prometheus} + +[Prometheusã®ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼](https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format)ã§ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’公開ã—ã¾ã™ã€‚ + +出力テーブルã«ã¯é©åˆ‡ãªæ§‹é€ ãŒå¿…è¦ã§ã™ã€‚ +カラム`name`([String](/docs/ja/sql-reference/data-types/string.md))ã¨`value`(数値)ã¯å¿…é ˆã§ã™ã€‚ +è¡Œã«ã¯ã‚ªãƒ—ションã§`help`([String](/docs/ja/sql-reference/data-types/string.md))ã¨`timestamp`(数値)をå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +カラム`type`([String](/docs/ja/sql-reference/data-types/string.md))ã¯`counter`ã€`gauge`ã€`histogram`ã€`summary`ã€`untyped`ã¾ãŸã¯ç©ºã§ã™ã€‚ +å„メトリックã®å€¤ã«ã¯ã„ãã¤ã‹ã®`labels`([Map(String, String)](/docs/ja/sql-reference/data-types/map.md))をæŒãŸã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +ã„ãã¤ã‹ã®é€£ç¶šã—ãŸè¡Œã¯ã€ç•°ãªã‚‹ãƒ©ãƒ™ãƒ«ã§1ã¤ã®ãƒ¡ãƒˆãƒªãƒƒã‚¯ã«å‚ç…§ã•ã‚Œã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚テーブルã¯ï¼ˆä¾‹ï¼š`ORDER BY name`ã§ï¼‰ãƒ¡ãƒˆãƒªãƒƒã‚¯åã§ã‚½ãƒ¼ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +[`histogram`]ã¨[`summary`]ã®ãƒ©ãƒ™ãƒ«ã«ã¯ç‰¹åˆ¥ãªè¦ä»¶ãŒã‚ã‚Šã¾ã™ã€‚詳細ã¯[Prometheus文書](https://prometheus.io/docs/instrumenting/exposition_formats/#histograms-and-summaries)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。ラベルãŒ`{'count':''}`ãŠã‚ˆã³`{'sum':''}`ã§ã‚ã‚‹è¡Œã«ã¯ç‰¹åˆ¥ãªãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•ã‚Œã€ãã‚Œãžã‚Œ`_count`ã¨`_sum`ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +**例:** + +``` +┌─name────────────────────────────────┬─type──────┬─help──────────────────────────────────────┬─labels─────────────────────────┬────value─┬─────timestamp─┠+│ http_request_duration_seconds │ histogram │ A histogram of the request duration. │ {'le':'0.05'} │ 24054 │ 0 │ +│ http_request_duration_seconds │ histogram │ │ {'le':'0.1'} │ 33444 │ 0 │ +│ http_request_duration_seconds │ histogram │ │ {'le':'0.2'} │ 100392 │ 0 │ +│ http_request_duration_seconds │ histogram │ │ {'le':'0.5'} │ 129389 │ 0 │ +│ http_request_duration_seconds │ histogram │ │ {'le':'1'} │ 133988 │ 0 │ +│ http_request_duration_seconds │ histogram │ │ {'le':'+Inf'} │ 144320 │ 0 │ +│ http_request_duration_seconds │ histogram │ │ {'sum':''} │ 53423 │ 0 │ +│ http_requests_total │ counter │ Total number of HTTP requests │ {'method':'post','code':'200'} │ 1027 │ 1395066363000 │ +│ http_requests_total │ counter │ │ {'method':'post','code':'400'} │ 3 │ 1395066363000 │ +│ metric_without_timestamp_and_labels │ │ │ {} │ 12.47 │ 0 │ +│ rpc_duration_seconds │ summary │ A summary of the RPC duration in seconds. │ {'quantile':'0.01'} │ 3102 │ 0 │ +│ rpc_duration_seconds │ summary │ │ {'quantile':'0.05'} │ 3272 │ 0 │ +│ rpc_duration_seconds │ summary │ │ {'quantile':'0.5'} │ 4773 │ 0 │ +│ rpc_duration_seconds │ summary │ │ {'quantile':'0.9'} │ 9001 │ 0 │ +│ rpc_duration_seconds │ summary │ │ {'quantile':'0.99'} │ 76656 │ 0 │ +│ rpc_duration_seconds │ summary │ │ {'count':''} │ 2693 │ 0 │ +│ rpc_duration_seconds │ summary │ │ {'sum':''} │ 17560473 │ 0 │ +│ something_weird │ │ │ {'problem':'division by zero'} │ inf │ -3982045 │ +└─────────────────────────────────────┴───────────┴───────────────────────────────────────────┴────────────────────────────────┴──────────┴───────────────┘ +``` + +次ã®ã‚ˆã†ã«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¾ã™: + +``` +# HELP http_request_duration_seconds A histogram of the request duration. +# TYPE http_request_duration_seconds histogram +http_request_duration_seconds_bucket{le="0.05"} 24054 +http_request_duration_seconds_bucket{le="0.1"} 33444 +http_request_duration_seconds_bucket{le="0.5"} 129389 +http_request_duration_seconds_bucket{le="1"} 133988 +http_request_duration_seconds_bucket{le="+Inf"} 144320 +http_request_duration_seconds_sum 53423 +http_request_duration_seconds_count 144320 + +# HELP http_requests_total Total number of HTTP requests +# TYPE http_requests_total counter +http_requests_total{code="200",method="post"} 1027 1395066363000 +http_requests_total{code="400",method="post"} 3 1395066363000 + +metric_without_timestamp_and_labels 12.47 + +# HELP rpc_duration_seconds A summary of the RPC duration in seconds. +# TYPE rpc_duration_seconds summary +rpc_duration_seconds{quantile="0.01"} 3102 +rpc_duration_seconds{quantile="0.05"} 3272 +rpc_duration_seconds{quantile="0.5"} 4773 +rpc_duration_seconds{quantile="0.9"} 9001 +rpc_duration_seconds{quantile="0.99"} 76656 +rpc_duration_seconds_sum 17560473 +rpc_duration_seconds_count 2693 + +something_weird{problem="division by zero"} +Inf -3982045 +``` + +## Protobuf {#protobuf} + +Protobufã¨ã¯ã€[Protocol Buffers](https://protobuf.dev/)å½¢å¼ã§ã™ã€‚ + +ã“ã®å½¢å¼ã¯å¤–部フォーマットスキーマãŒå¿…è¦ã§ã™ã€‚スキーマã¯ã‚¯ã‚¨ãƒªé–“ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ +ClickHouseã¯`proto2`ã¨`proto3`ã®ä¸¡æ–¹ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ç¹°ã‚Šè¿”ã—/オプション/必須フィールドãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +使用例: + +``` sql +SELECT * FROM test.table FORMAT Protobuf SETTINGS format_schema = 'schemafile:MessageType' +``` + +``` bash +cat protobuf_messages.bin | clickhouse-client --query "INSERT INTO test.table SETTINGS format_schema='schemafile:MessageType' FORMAT Protobuf" +``` + +ファイル`schemafile.proto`ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +``` capnp +syntax = "proto3"; + +message MessageType { + string name = 1; + string surname = 2; + uint32 birthDate = 3; + repeated string phoneNumbers = 4; +}; +``` + +テーブルカラムã¨Protocol Buffersã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸åž‹ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®é–“ã®å¯¾å¿œã‚’見ã¤ã‘ã‚‹ãŸã‚ã«ã€ClickHouseã¯ãã®åå‰ã‚’比較ã—ã¾ã™ã€‚ +ã“ã®æ¯”較ã¯å¤§æ–‡å­—ã¨å°æ–‡å­—を区別ã›ãšã€`_`(アンダースコア)ã¨`.`(ドット)ã¯ç­‰ã—ã„ã¨ã¿ãªã•ã‚Œã¾ã™ã€‚ +カラムã¨Protocol Buffersã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®åž‹ãŒç•°ãªã‚‹å ´åˆã¯ã€å¿…è¦ãªå¤‰æ›ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ + +ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚以下ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—ã§ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ `z` ã®å ´åˆ + +``` capnp +message MessageType { + message XType { + message YType { + int32 z; + }; + repeated YType y; + }; + XType x; +}; +``` + +ClickHouseã¯`x.y.z`(ã¾ãŸã¯`x_y_z`ã‚„`X.y_Z`ãªã©ï¼‰ã¨ã„ã†åå‰ã®ã‚«ãƒ©ãƒ ã‚’探ãã†ã¨ã—ã¾ã™ã€‚ +ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ã€[ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ](/docs/ja/sql-reference/data-types/nested-data-structures/index.md)を入力ã¾ãŸã¯å‡ºåŠ›ã™ã‚‹ã®ã«é©ã—ã¦ã„ã¾ã™ã€‚ + +プロトコルãƒãƒƒãƒ•ã‚¡ã®ã‚¹ã‚­ãƒ¼ãƒžã§æ¬¡ã®ã‚ˆã†ã«å®šç¾©ã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ + +``` capnp +syntax = "proto2"; + +message MessageType { + optional int32 result_per_page = 3 [default = 10]; +} +``` + +ã¯é©ç”¨ã•ã‚Œãšã€[テーブルデフォルト](/docs/ja/sql-reference/statements/create/table.md/#create-default-values)ãŒä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +ClickHouseã¯`length-delimited`å½¢å¼ã§ãƒ—ロトコルãƒãƒƒãƒ•ã‚¡ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’入出力ã—ã¾ã™ã€‚ +ã¤ã¾ã‚Šã€å„メッセージã®å‰ã«ã€ãã®é•·ã•ãŒ[varint](https://developers.google.com/protocol-buffers/docs/encoding#varints)ã¨ã—ã¦æ›¸ã‹ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +ã¾ãŸã€[一般的ãªè¨€èªžã§é•·ã•åŒºåˆ‡ã‚Šã®ãƒ—ロトコルãƒãƒƒãƒ•ã‚¡ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’読ã¿æ›¸ãã™ã‚‹æ–¹æ³•](https://cwiki.apache.org/confluence/display/GEODE/Delimiting+Protobuf+Messages)ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +### 自動生æˆã‚¹ã‚­ãƒ¼ãƒžã®ä½¿ç”¨ {#using-autogenerated-protobuf-schema} + +データã®å¤–部プロトコルãƒãƒƒãƒ•ã‚¡ã‚¹ã‚­ãƒ¼ãƒžãŒãªã„å ´åˆã§ã‚‚ã€è‡ªå‹•ç”Ÿæˆã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¦ãƒ—ロトコルãƒãƒƒãƒ•ã‚¡å½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’入力/出力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例: + +```sql +SELECT * FROM test.hits format Protobuf SETTINGS format_protobuf_use_autogenerated_schema=1 +``` + +ã“ã®å ´åˆã€ClickHouseã¯ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã«å¾“ã£ã¦ãƒ—ロトコルãƒãƒƒãƒ•ã‚¡ã‚¹ã‚­ãƒ¼ãƒžã‚’自動生æˆã—ã€ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¦ãƒ—ロトコルãƒãƒƒãƒ•ã‚¡å½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’シリアル化ã—ã¾ã™ã€‚ + +自動生æˆã‚¹ã‚­ãƒ¼ãƒžã§ãƒ—ロトコルãƒãƒƒãƒ•ã‚¡ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿è¾¼ã‚€ã“ã¨ã‚‚ã§ãã¾ã™ï¼ˆã“ã®å ´åˆã€ãƒ•ã‚¡ã‚¤ãƒ«ã¯åŒã˜ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¦ä½œæˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰: + +```bash +$ cat hits.bin | clickhouse-client --query "INSERT INTO test.hits SETTINGS format_protobuf_use_autogenerated_schema=1 FORMAT Protobuf" +``` + +設定[format_protobuf_use_autogenerated_schema](../operations/settings/settings-formats.md#format_protobuf_use_autogenerated_schema)ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã«ãªã£ã¦ãŠã‚Šã€[format_schema](../operations/settings/settings-formats.md#formatschema-format-schema)ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +入力/出力中ã«è‡ªå‹•ç”Ÿæˆã‚¹ã‚­ãƒ¼ãƒžã‚’ファイルã«ä¿å­˜ã™ã‚‹ã“ã¨ã‚‚ã§ãã€è¨­å®š[output_format_schema](../operations/settings/settings-formats.md#outputformatschema-output-format-schema)を使用ã—ã¾ã™ã€‚例: + +```sql +SELECT * FROM test.hits format Protobuf SETTINGS format_protobuf_use_autogenerated_schema=1, output_format_schema='path/to/schema/schema.proto' +``` + +ã“ã®å ´åˆã€è‡ªå‹•ç”Ÿæˆã•ã‚ŒãŸãƒ—ロトコルãƒãƒƒãƒ•ã‚¡ã‚¹ã‚­ãƒ¼ãƒžã¯ãƒ•ã‚¡ã‚¤ãƒ«`path/to/schema/schema.capnp`ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +### プロトコルãƒãƒƒãƒ•ã‚¡ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®å‰Šé™¤ + +[format_schema_path](../operations/server-configuration-parameters/settings.md/#format_schema_path)ã‹ã‚‰ãƒ­ãƒ¼ãƒ‰ã—ãŸãƒ—ロトコルãƒãƒƒãƒ•ã‚¡ã‚¹ã‚­ãƒ¼ãƒžã‚’リロードã™ã‚‹ã«ã¯ã€[SYSTEM DROP ... FORMAT CACHE](../sql-reference/statements/system.md/#system-drop-schema-format)ステートメントを使用ã—ã¾ã™ã€‚ + +```sql +SYSTEM DROP FORMAT SCHEMA CACHE FOR Protobuf +``` + +## ProtobufSingle {#protobufsingle} + +[Protobuf](#protobuf)ã¨åŒæ§˜ã§ã™ãŒã€é•·ã•åŒºåˆ‡ã‚ŠãŒãªã„å˜ä¸€ã®ãƒ—ロトコルãƒãƒƒãƒ•ã‚¡ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ä¿å­˜/解æžã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ + +## ProtobufList {#protobuflist} + +Protobufã«ä¼¼ã¦ã„ã¾ã™ãŒã€è¡Œã¯å›ºå®šåãŒã€ŒEnvelopeã€ã§ã‚るメッセージ内ã®ã‚µãƒ–メッセージã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +使用例: + +``` sql +SELECT * FROM test.table FORMAT ProtobufList SETTINGS format_schema = 'schemafile:MessageType' +``` + +``` bash +cat protobuflist_messages.bin | clickhouse-client --query "INSERT INTO test.table FORMAT ProtobufList SETTINGS format_schema='schemafile:MessageType'" +``` + +ファイル`schemafile.proto`ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +``` capnp +syntax = "proto3"; +message Envelope { + message MessageType { + string name = 1; + string surname = 2; + uint32 birthDate = 3; + repeated string phoneNumbers = 4; + }; + MessageType row = 1; +}; +``` + +## Avro {#data-format-avro} + +[Apache Avro](https://avro.apache.org/)ã¯ã€Apacheã®Hadoopプロジェクト内ã§é–‹ç™ºã•ã‚ŒãŸè¡ŒæŒ‡å‘ã®ãƒ‡ãƒ¼ã‚¿ã‚·ãƒªã‚¢ãƒ«åŒ–フレームワークã§ã™ã€‚ + +ClickHouseã®Avroå½¢å¼ã¯[Avroデータファイル](https://avro.apache.org/docs/current/spec.html#Object+Container+Files)ã®èª­ã¿å–ã‚ŠãŠã‚ˆã³æ›¸ãè¾¼ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### データ型ã®ãƒžãƒƒãƒãƒ³ã‚° {#data_types-matching} + +以下ã®è¡¨ã¯ã€`INSERT`ãŠã‚ˆã³`SELECT`クエリã«ãŠã‘ã‚‹ClickHouseã®[データ型](/docs/ja/sql-reference/data-types/index.md)ã¨ã®ãƒžãƒƒãƒãƒ³ã‚°ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +| Avro データ型 `INSERT` | ClickHouse データ型 | Avro データ型 `SELECT` | +|-------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|--------------------------------| +| `boolean`, `int`, `long`, `float`, `double` | [Int(8\16\32)](/docs/ja/sql-reference/data-types/int-uint.md), [UInt(8\16\32)](/docs/ja/sql-reference/data-types/int-uint.md) | `int` | +| `boolean`, `int`, `long`, `float`, `double` | [Int64](/docs/ja/sql-reference/data-types/int-uint.md), [UInt64](/docs/ja/sql-reference/data-types/int-uint.md) | `long` | +| `boolean`, `int`, `long`, `float`, `double` | [Float32](/docs/ja/sql-reference/data-types/float.md) | `float` | +| `boolean`, `int`, `long`, `float`, `double` | [Float64](/docs/ja/sql-reference/data-types/float.md) | `double` | +| `bytes`, `string`, `fixed`, `enum` | [String](/docs/ja/sql-reference/data-types/string.md) | `bytes` ã¾ãŸã¯ `string` \* | +| `bytes`, `string`, `fixed` | [FixedString(N)](/docs/ja/sql-reference/data-types/fixedstring.md) | `fixed(N)` | +| `enum` | [Enum(8\16)](/docs/ja/sql-reference/data-types/enum.md) | `enum` | +| `array(T)` | [Array(T)](/docs/ja/sql-reference/data-types/array.md) | `array(T)` | +| `map(V, K)` | [Map(V, K)](/docs/ja/sql-reference/data-types/map.md) | `map(string, K)` | +| `union(null, T)`, `union(T, null)` | [Nullable(T)](/docs/ja/sql-reference/data-types/date.md) | `union(null, T)` | +| `union(T1, T2, …)` \** | [Variant(T1, T2, …)](/docs/ja/sql-reference/data-types/variant.md) | `union(T1, T2, …)` \** | +| `null` | [Nullable(Nothing)](/docs/ja/sql-reference/data-types/special-data-types/nothing.md) | `null` | +| `int (date)` \**\* | [Date](/docs/ja/sql-reference/data-types/date.md), [Date32](docs/en/sql-reference/data-types/date32.md) | `int (date)` \**\* | +| `long (timestamp-millis)` \**\* | [DateTime64(3)](/docs/ja/sql-reference/data-types/datetime.md) | `long (timestamp-millis)` \**\*| +| `long (timestamp-micros)` \**\* | [DateTime64(6)](/docs/ja/sql-reference/data-types/datetime.md) | `long (timestamp-micros)` \**\*| +| `bytes (decimal)` \**\* | [DateTime64(N)](/docs/ja/sql-reference/data-types/datetime.md) | `bytes (decimal)` \**\* | +| `int` | [IPv4](/docs/ja/sql-reference/data-types/ipv4.md) | `int` | +| `fixed(16)` | [IPv6](/docs/ja/sql-reference/data-types/ipv6.md) | `fixed(16)` | +| `bytes (decimal)` \**\* | [Decimal(P, S)](/docs/ja/sql-reference/data-types/decimal.md) | `bytes (decimal)` \**\* | +| `string (uuid)` \**\* | [UUID](/docs/ja/sql-reference/data-types/uuid.md) | `string (uuid)` \**\* | +| `fixed(16)` | [Int128/UInt128](/docs/ja/sql-reference/data-types/int-uint.md) | `fixed(16)` | +| `fixed(32)` | [Int256/UInt256](/docs/ja/sql-reference/data-types/int-uint.md) | `fixed(32)` | +| `record` | [Tuple](/docs/ja/sql-reference/data-types/tuple.md) | `record` | + +\* `bytes`ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã™ã€‚ã“ã‚Œã¯[output_format_avro_string_column_pattern](/docs/ja/operations/settings/settings-formats.md/#output_format_avro_string_column_pattern)ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ + +\** [Variantåž‹](/docs/ja/sql-reference/data-types/variant)ã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å€¤ã¨ã—ã¦`null`を暗黙的ã«å—ã‘入れるãŸã‚ã€ä¾‹ãˆã°Avro `union(T1, T2, null)`ã¯`Variant(T1, T2)`ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ +çµæžœã¨ã—ã¦ã€ClickHouseã‹ã‚‰Avroを生æˆã™ã‚‹éš›ã«ã¯ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中ã«ä»»æ„ã®å€¤ãŒå®Ÿéš›ã«`null`ã‹ã©ã†ã‹ä¸æ˜ŽãªãŸã‚ã€`union`型セットã«å¸¸ã«`null`åž‹ã‚’å«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +\**\* [Avroè«–ç†åž‹](https://avro.apache.org/docs/current/spec.html#Logical+Types) + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„Avroè«–ç†ãƒ‡ãƒ¼ã‚¿åž‹ï¼š`time-millis`, `time-micros`, `duration` + +### データ挿入 {#inserting-data-1} + +Avroファイルã‹ã‚‰ClickHouseテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã«ã¯: + +``` bash +$ cat file.avro | clickhouse-client --query="INSERT INTO {some_table} FORMAT Avro" +``` + +入力Avroファイルã®ãƒ«ãƒ¼ãƒˆã‚¹ã‚­ãƒ¼ãƒžã¯`record`åž‹ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +テーブルカラムã¨Avroスキーマã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®é–“ã®å¯¾å¿œã‚’見ã¤ã‘ã‚‹ãŸã‚ã«ã€ClickHouseã¯ãã®åå‰ã‚’比較ã—ã¾ã™ã€‚比較ã¯å¤§æ–‡å­—ã¨å°æ–‡å­—を区別ã—ã¾ã™ã€‚ +使用ã•ã‚Œã¦ã„ãªã„フィールドã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ + +ClickHouseテーブルカラムã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯ã€æŒ¿å…¥ã•ã‚Œã‚‹Avroデータã®å¯¾å¿œã™ã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®åž‹ã¨ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚データを挿入ã™ã‚‹éš›ã€ClickHouseã¯ä¸Šè¨˜ã®è¡¨ã«å¾“ã£ã¦ãƒ‡ãƒ¼ã‚¿åž‹ã‚’解釈ã—ã€ãã®å¾Œã€ClickHouseテーブルカラムã«å¯¾å¿œã™ã‚‹åž‹ã«ãƒ‡ãƒ¼ã‚¿ã‚’[キャスト](/docs/ja/sql-reference/functions/type-conversion-functions.md/#type_conversion_function-cast)ã—ã¾ã™ã€‚ + +データをインãƒãƒ¼ãƒˆã™ã‚‹éš›ã€ã‚¹ã‚­ãƒ¼ãƒžå†…ã§ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒè¦‹ã¤ã‹ã‚‰ãšã€è¨­å®š[inform_format_avro_allow_missing_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_avro_allow_missing_fields)ãŒæœ‰åŠ¹ã®å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒã‚¨ãƒ©ãƒ¼ã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +### データé¸æŠž {#selecting-data-1} + +ClickHouseテーブルã‹ã‚‰Avroファイルã«ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ã«ã¯: + +``` bash +$ clickhouse-client --query="SELECT * FROM {some_table} FORMAT Avro" > file.avro +``` + +カラムåã¯ä»¥ä¸‹ã‚’満ãŸã™å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +- `[A-Za-z_]`ã§å§‹ã¾ã‚‹ +- 次ã«`[A-Za-z0-9_]`ã®ã¿ã‚’å«ã‚€ + +出力Avroファイルã®åœ§ç¸®ã¨åŒæœŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã¯[output_format_avro_codec](/docs/ja/operations/settings/settings-formats.md/#output_format_avro_codec)ã¨[output_format_avro_sync_interval](/docs/ja/operations/settings/settings-formats.md/#output_format_avro_sync_interval)ã§ãã‚Œãžã‚Œè¨­å®šã§ãã¾ã™ã€‚ + +### データ例 {#example-data-avro} + +ClickHouseã®[DESCRIBE](/docs/ja/sql-reference/statements/describe-table)機能を使用ã—ã¦ã€æ¬¡ã®ä¾‹ã®ã‚ˆã†ãªAvroファイルã®æŽ¨è«–å½¢å¼ã‚’ã™ã°ã‚„ã表示ã§ãã¾ã™ã€‚ã“ã®ä¾‹ã«ã¯ClickHouse S3パブリックãƒã‚±ãƒƒãƒˆå†…ã®å…¬é–‹ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãªAvroファイルã®URLãŒå«ã¾ã‚Œã¦ã„ã¾ã™ï¼š + +``` +DESCRIBE url('https://clickhouse-public-datasets.s3.eu-central-1.amazonaws.com/hits.avro','Avro); +``` +``` +┌─name───────────────────────┬─type────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ WatchID │ Int64 │ │ │ │ │ │ +│ JavaEnable │ Int32 │ │ │ │ │ │ +│ Title │ String │ │ │ │ │ │ +│ GoodEvent │ Int32 │ │ │ │ │ │ +│ EventTime │ Int32 │ │ │ │ │ │ +│ EventDate │ Date32 │ │ │ │ │ │ +│ CounterID │ Int32 │ │ │ │ │ │ +│ ClientIP │ Int32 │ │ │ │ │ │ +│ ClientIP6 │ FixedString(16) │ │ │ │ │ │ +│ RegionID │ Int32 │ │ │ │ │ │ +... +│ IslandID │ FixedString(16) │ │ │ │ │ │ +│ RequestNum │ Int32 │ │ │ │ │ │ +│ RequestTry │ Int32 │ │ │ │ │ │ +└────────────────────────────┴─────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +## AvroConfluent {#data-format-avro-confluent} + +AvroConfluentã¯ã€[Kafka](https://kafka.apache.org/)ãŠã‚ˆã³[Confluent Schema Registry](https://docs.confluent.io/current/schema-registry/index.html)ã§ä¸€èˆ¬çš„ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚·ãƒ³ã‚°ãƒ«ã‚ªãƒ–ジェクトAvroメッセージã®ãƒ‡ã‚³ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +å„Avroメッセージã«ã¯ã‚¹ã‚­ãƒ¼ãƒžIDãŒåŸ‹ã‚è¾¼ã¾ã‚Œã¦ãŠã‚Šã€ã‚¹ã‚­ãƒ¼ãƒžãƒ¬ã‚¸ã‚¹ãƒˆãƒªã®åŠ©ã‘を借りã¦å®Ÿéš›ã®ã‚¹ã‚­ãƒ¼ãƒžã«è§£æ±ºã§ãã¾ã™ã€‚ + +スキーマã¯ä¸€åº¦è§£æ±ºã•ã‚Œã‚‹ã¨ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ + +スキーマレジストリURLã¯[format_avro_schema_registry_url](/docs/ja/operations/settings/settings-formats.md/#format_avro_schema_registry_url)ã§è¨­å®šã•ã‚Œã¾ã™ã€‚ + +### データ型ã®ãƒžãƒƒãƒãƒ³ã‚° {#data_types-matching-1} + +[Avro](#data-format-avro)ã¨åŒæ§˜ã§ã™ã€‚ + +### 使用方法 {#usage} + +スキーマ解決をã™ã°ã‚„ã確èªã™ã‚‹ã«ã¯ã€[kafkacat](https://github.com/edenhill/kafkacat)ã¨[clickhouse-local](/docs/ja/operations/utilities/clickhouse-local.md)を使用ã§ãã¾ã™ï¼š + +``` bash +$ kafkacat -b kafka-broker -C -t topic1 -o beginning -f '%s' -c 3 | clickhouse-local --input-format AvroConfluent --format_avro_schema_registry_url 'http://schema-registry' -S "field1 Int64, field2 String" -q 'select * from table' +1 a +2 b +3 c +``` + +[Kafka](/docs/ja/engines/table-engines/integrations/kafka.md)ã§`AvroConfluent`を使用ã™ã‚‹ã«ã¯ï¼š + +``` sql +CREATE TABLE topic1_stream +( + field1 String, + field2 String +) +ENGINE = Kafka() +SETTINGS +kafka_broker_list = 'kafka-broker', +kafka_topic_list = 'topic1', +kafka_group_name = 'group1', +kafka_format = 'AvroConfluent'; + +-- デãƒãƒƒã‚°ç›®çš„ã®å ´åˆã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§format_avro_schema_registry_urlを設定ã§ãã¾ã™ã€‚ +-- ã“ã®æ–¹æ³•ã¯æœ¬ç•ªç’°å¢ƒã§ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +SET format_avro_schema_registry_url = 'http://schema-registry'; + +SELECT * FROM topic1_stream; +``` + +:::note +`format_avro_schema_registry_url`ã®è¨­å®šå€¤ã¯å†èµ·å‹•å¾Œã‚‚維æŒã™ã‚‹ãŸã‚ã«`users.xml`ã§è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€`Kafka`テーブルエンジンã®`format_avro_schema_registry_url`設定を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +::: + +## Parquet {#data-format-parquet} + +[Apache Parquet](https://parquet.apache.org/)ã¯ã€Hadoopエコシステムã§åºƒã使用ã•ã‚Œã¦ã„る列指å‘ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å½¢å¼ã§ã™ã€‚ClickHouseã¯ã“ã®å½¢å¼ã®èª­ã¿å–ã‚ŠãŠã‚ˆã³æ›¸ãè¾¼ã¿æ“作をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### データ型ã®ãƒžãƒƒãƒãƒ³ã‚° {#data-types-matching-parquet} + +以下ã®è¡¨ã¯ã€`INSERT`ãŠã‚ˆã³`SELECT`クエリã«ãŠã‘ã‚‹ClickHouseã®[データ型](/docs/ja/sql-reference/data-types/index.md)ã¨ã®ãƒžãƒƒãƒãƒ³ã‚°ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +| Parquet データ型 (`INSERT`) | ClickHouse データ型 | Parquet データ型 (`SELECT`) | +|-----------------------------------------------|------------------------------------------------------------------------------------------------------------|-------------------------------| +| `BOOL` | [Bool](/docs/ja/sql-reference/data-types/boolean.md) | `BOOL` | +| `UINT8`, `BOOL` | [UInt8](/docs/ja/sql-reference/data-types/int-uint.md) | `UINT8` | +| `INT8` | [Int8](/docs/ja/sql-reference/data-types/int-uint.md)/[Enum8](/docs/ja/sql-reference/data-types/enum.md) | `INT8` | +| `UINT16` | [UInt16](/docs/ja/sql-reference/data-types/int-uint.md) | `UINT16` | +| `INT16` | [Int16](/docs/ja/sql-reference/data-types/int-uint.md)/[Enum16](/docs/ja/sql-reference/data-types/enum.md) | `INT16` | +| `UINT32` | [UInt32](/docs/ja/sql-reference/data-types/int-uint.md) | `UINT32` | +| `INT32` | [Int32](/docs/ja/sql-reference/data-types/int-uint.md) | `INT32` | +| `UINT64` | [UInt64](/docs/ja/sql-reference/data-types/int-uint.md) | `UINT64` | +| `INT64` | [Int64](/docs/ja/sql-reference/data-types/int-uint.md) | `INT64` | +| `FLOAT` | [Float32](/docs/ja/sql-reference/data-types/float.md) | `FLOAT` | +| `DOUBLE` | [Float64](/docs/ja/sql-reference/data-types/float.md) | `DOUBLE` | +| `DATE` | [Date32](/docs/ja/sql-reference/data-types/date.md) | `DATE` | +| `TIME (ms)` | [DateTime](/docs/ja/sql-reference/data-types/datetime.md) | `UINT32` | +| `TIMESTAMP`, `TIME (us, ns)` | [DateTime64](/docs/ja/sql-reference/data-types/datetime64.md) | `TIMESTAMP` | +| `STRING`, `BINARY` | [String](/docs/ja/sql-reference/data-types/string.md) | `BINARY` | +| `STRING`, `BINARY`, `FIXED_LENGTH_BYTE_ARRAY` | [FixedString](/docs/ja/sql-reference/data-types/fixedstring.md) | `FIXED_LENGTH_BYTE_ARRAY` | +| `DECIMAL` | [Decimal](/docs/ja/sql-reference/data-types/decimal.md) | `DECIMAL` | +| `LIST` | [Array](/docs/ja/sql-reference/data-types/array.md) | `LIST` | +| `STRUCT` | [Tuple](/docs/ja/sql-reference/data-types/tuple.md) | `STRUCT` | +| `MAP` | [Map](/docs/ja/sql-reference/data-types/map.md) | `MAP` | +| `UINT32` | [IPv4](/docs/ja/sql-reference/data-types/ipv4.md) | `UINT32` | +| `FIXED_LENGTH_BYTE_ARRAY`, `BINARY` | [IPv6](/docs/ja/sql-reference/data-types/ipv6.md) | `FIXED_LENGTH_BYTE_ARRAY` | +| `FIXED_LENGTH_BYTE_ARRAY`, `BINARY` | [Int128/UInt128/Int256/UInt256](/docs/ja/sql-reference/data-types/int-uint.md) | `FIXED_LENGTH_BYTE_ARRAY` | + +é…列ã¯ãƒã‚¹ãƒˆå¯èƒ½ã§ã‚ã‚Šã€`Nullable`型を引数ã¨ã—ã¦æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚`Tuple`ã¨`Map`åž‹ã‚‚ãƒã‚¹ãƒˆã§ãã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„Parquetデータ型:`FIXED_SIZE_BINARY`, `JSON`, `UUID`, `ENUM`。 + +ClickHouseテーブルカラムã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯ã€æŒ¿å…¥ã•ã‚Œã‚‹Parquetデータã®å¯¾å¿œã™ã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚データを挿入ã™ã‚‹éš›ã€ClickHouseã¯ä¸Šè¨˜ã®è¡¨ã«å¾“ã£ã¦ãƒ‡ãƒ¼ã‚¿åž‹ã‚’解釈ã—ã€ãã®å¾Œã€[キャスト](/docs/ja/sql-reference/functions/type-conversion-functions/#type_conversion_function-cast)ã‚’è¡Œã„ã€ClickHouseテーブルカラムã«è¨­å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ã«å¤‰æ›ã—ã¾ã™ã€‚ + +### データã®æŒ¿å…¥ã¨é¸æŠž {#inserting-and-selecting-data-parquet} + +ファイルã‹ã‚‰ParquetデータをClickHouseテーブルã«æŒ¿å…¥ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¾ã™: + +``` bash +$ cat {filename} | clickhouse-client --query="INSERT INTO {some_table} FORMAT Parquet" +``` + +ClickHouseテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã—ã€ãれをParquetå½¢å¼ã§ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¾ã™: + +``` bash +$ clickhouse-client --query="SELECT * FROM {some_table} FORMAT Parquet" > {some_file.pq} +``` + +Hadoopã¨ã®ãƒ‡ãƒ¼ã‚¿äº¤æ›ã«ã¯ã€[HDFSテーブルエンジン](/docs/ja/engines/table-engines/integrations/hdfs.md)を使用ã§ãã¾ã™ã€‚ + +### Parquetå½¢å¼ã®è¨­å®š {#parquet-format-settings} + +- [output_format_parquet_row_group_size](/docs/ja/operations/settings/settings-formats.md/#output_format_parquet_row_group_size) - データ出力ã®éš›ã®è¡Œã‚°ãƒ«ãƒ¼ãƒ—サイズ(行å˜ä½ï¼‰ã€‚デフォルト値 - `1000000`. +- [output_format_parquet_string_as_string](/docs/ja/operations/settings/settings-formats.md/#output_format_parquet_string_as_string) - Parquet String型を使用ã—ã¦StringカラムをBinaryã§ãªã出力ã—ã¾ã™ã€‚デフォルト値 - `false`. +- [input_format_parquet_import_nested](/docs/ja/operations/settings/settings-formats.md/#input_format_parquet_import_nested) - Parquet入力形å¼ã§ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’[Nested](/docs/ja/sql-reference/data-types/nested-data-structures/index.md)テーブルã«æŒ¿å…¥ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルト値 - `false`. +- [input_format_parquet_case_insensitive_column_matching](/docs/ja/operations/settings/settings-formats.md/#input_format_parquet_case_insensitive_column_matching) - Parquetカラムã¨ClickHouseカラムã®ç…§åˆã‚’大文字ã¨å°æ–‡å­—を区別ã›ãšã«å‡¦ç†ã—ã¾ã™ã€‚デフォルト値 - `false`. +- [input_format_parquet_allow_missing_columns](/docs/ja/operations/settings/settings-formats.md/#input_format_parquet_allow_missing_columns) - Parquetデータを読ã¿å–ã‚‹éš›ã«ã‚«ãƒ©ãƒ ãŒæ¬ æã—ã¦ã‚‚許å¯ã—ã¾ã™ã€‚デフォルト値 - `false`. +- [input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference](/docs/ja/operations/settings/settings-formats.md/#input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference) - Parquetå½¢å¼ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„åž‹ã®ã‚«ãƒ©ãƒ ã‚’スキップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルト値 - `false`. +- [input_format_parquet_local_file_min_bytes_for_seek](/docs/ja/operations/settings/settings-formats.md/#input_format_parquet_local_file_min_bytes_for_seek) - Parquet入力形å¼ã§ã‚·ãƒ¼ã‚¯ã‚’実行ã™ã‚‹éš›ã«å¿…è¦ãªæœ€å°ãƒã‚¤ãƒˆæ•°ï¼ˆãƒ­ãƒ¼ã‚«ãƒ«èª­ã¿å–りファイル)を定義ã—ã¾ã™ã€‚デフォルト値 - `8192`. +- [output_format_parquet_fixed_string_as_fixed_byte_array](/docs/ja/operations/settings/settings-formats.md/#output_format_parquet_fixed_string_as_fixed_byte_array) - FixedStringカラムã«Parquet FIXED_LENGTH_BYTE_ARRAY型を使用ã—ã¾ã™ã€‚デフォルト値 - `true`. +- [output_format_parquet_version](/docs/ja/operations/settings/settings-formats.md/#output_format_parquet_version) - 出力形å¼ã§ä½¿ç”¨ã•ã‚Œã‚‹Parquetフォーマットã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚デフォルト値 - `2.latest`. +- [output_format_parquet_compression_method](/docs/ja/operations/settings/settings-formats.md/#output_format_parquet_compression_method) - 出力Parquetå½¢å¼ã«ä½¿ç”¨ã•ã‚Œã‚‹åœ§ç¸®æ–¹æ³•ã€‚デフォルト値 - `lz4`. +- [input_format_parquet_max_block_size](/docs/ja/operations/settings/settings-formats.md/#input_format_parquet_max_block_size) - Parquetリーダーã®æœ€å¤§ãƒ–ロック行サイズ。デフォルト値 - `65409`. +- [input_format_parquet_prefer_block_bytes](/docs/ja/operations/settings/settings-formats.md/#input_format_parquet_prefer_block_bytes) - ParquetリーダーãŒå‡ºåŠ›ã™ã‚‹å¹³å‡ãƒ–ロックãƒã‚¤ãƒˆæ•°ã€‚デフォルト値 - `16744704`. +- [output_format_parquet_write_page_index](/docs/ja/operations/settings/settings-formats.md/#input_format_parquet_max_block_size) - Parquetファイルã«ãƒšãƒ¼ã‚¸ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’書ã込むå¯èƒ½æ€§ã‚’追加ã—ã¾ã™ã€‚ç¾åœ¨ã¯`output_format_parquet_use_custom_encoder`を無効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚デフォルト値 - `true`. + +## ParquetMetadata {data-format-parquet-metadata} + +Parquetファイルメタデータ(https://parquet.apache.org/docs/file-format/metadata/)を読むãŸã‚ã®ç‰¹åˆ¥ãªå½¢å¼ã§ã™ã€‚常ã«ä»¥ä¸‹ã®æ§‹é€ /内容ã§1行を出力ã—ã¾ã™: +- num_columns - カラムã®æ•° +- num_rows - åˆè¨ˆè¡Œæ•° +- num_row_groups - åˆè¨ˆè¡Œã‚°ãƒ«ãƒ¼ãƒ—æ•° +- format_version - parquetフォーマットã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€å¸¸ã«1.0ã¾ãŸã¯2.6 +- total_uncompressed_size - データã®ç·éžåœ§ç¸®ãƒã‚¤ãƒˆã‚µã‚¤ã‚ºã€ã™ã¹ã¦ã®è¡Œã‚°ãƒ«ãƒ¼ãƒ—ã®total_byte_sizeã®åˆè¨ˆã¨ã—ã¦è¨ˆç®— +- total_compressed_size - データã®ç·åœ§ç¸®ãƒã‚¤ãƒˆã‚µã‚¤ã‚ºã€ã™ã¹ã¦ã®è¡Œã‚°ãƒ«ãƒ¼ãƒ—ã®total_compressed_sizeã®åˆè¨ˆã¨ã—ã¦è¨ˆç®— +- columns - 次ã®æ§‹é€ ã‚’æŒã¤ã‚«ãƒ©ãƒ ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ãƒªã‚¹ãƒˆ: + - name - カラムå + - path - カラムパス(ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å ´åˆã«ã¯nameã¨ç•°ãªã‚‹ï¼‰ + - max_definition_level - 最大定義レベル + - max_repetition_level - 最大繰り返ã—レベル + - physical_type - カラムã®ç‰©ç†åž‹ + - logical_type - カラムã®è«–ç†åž‹ +- compression - ã“ã®ã‚«ãƒ©ãƒ ã§ä½¿ç”¨ã•ã‚Œã¦ã„る圧縮 +- total_uncompressed_size - 行グループã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã® total_uncompressed_size ã‚’åˆè¨ˆã—ã¦å¾—られるã€ã‚«ãƒ©ãƒ ã®ç·éžåœ§ç¸®ãƒã‚¤ãƒˆã‚µã‚¤ã‚º +- total_compressed_size - 行グループã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã® total_compressed_size ã‚’åˆè¨ˆã—ã¦å¾—られるã€ã‚«ãƒ©ãƒ ã®ç·åœ§ç¸®ãƒã‚¤ãƒˆã‚µã‚¤ã‚º +- space_saved - 圧縮ã«ã‚ˆã£ã¦ç¯€ç´„ã•ã‚ŒãŸã‚¹ãƒšãƒ¼ã‚¹ã®å‰²åˆï¼ˆãƒ‘ーセント)ã€(1 - total_compressed_size/total_uncompressed_size)ã¨ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ +- encodings - ã“ã®ã‚«ãƒ©ãƒ ã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®ãƒªã‚¹ãƒˆ +- row_groups - 次ã®æ§‹é€ ã‚’æŒã¤è¡Œã‚°ãƒ«ãƒ¼ãƒ—ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒªã‚¹ãƒˆ: + - num_columns - 行グループ内ã®ã‚«ãƒ©ãƒ æ•° + - num_rows - 行グループ内ã®è¡Œæ•° + - total_uncompressed_size - 行グループã®ç·éžåœ§ç¸®ãƒã‚¤ãƒˆã‚µã‚¤ã‚º + - total_compressed_size - 行グループã®ç·åœ§ç¸®ãƒã‚¤ãƒˆã‚µã‚¤ã‚º + - columns - 次ã®æ§‹é€ ã‚’æŒã¤ã‚«ãƒ©ãƒ ãƒãƒ£ãƒ³ã‚¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ãƒªã‚¹ãƒˆ: + - name - カラムå + - path - カラムパス + - total_compressed_size - カラムã®ç·åœ§ç¸®ãƒã‚¤ãƒˆã‚µã‚¤ã‚º + - total_uncompressed_size - 行グループã®ç·éžåœ§ç¸®ãƒã‚¤ãƒˆã‚µã‚¤ã‚º + - have_statistics - カラムãƒãƒ£ãƒ³ã‚¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ã‚«ãƒ©ãƒ çµ±è¨ˆãŒå«ã¾ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’示ã™çœŸå½å€¤ + - statistics - カラムãƒãƒ£ãƒ³ã‚¯ã®çµ±è¨ˆæƒ…å ± (have_statistics ㌠false ã®å ´åˆã€ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯ NULL) 次ã®æ§‹é€ ã‚’æŒã¤: + - num_values - カラムãƒãƒ£ãƒ³ã‚¯å†…ã®éž NULL 値ã®æ•° + - null_count - カラムãƒãƒ£ãƒ³ã‚¯å†…ã® NULL 値ã®æ•° + - distinct_count - カラムãƒãƒ£ãƒ³ã‚¯å†…ã®ç•°ãªã‚‹å€¤ã®æ•° + - min - カラムãƒãƒ£ãƒ³ã‚¯ã®æœ€å°å€¤ + - max - カラムãƒãƒ£ãƒ³ã‚¯ã®æœ€å¤§å€¤ + +例: + +```sql +SELECT * FROM file(data.parquet, ParquetMetadata) format PrettyJSONEachRow +``` + +```json +{ + "num_columns": "2", + "num_rows": "100000", + "num_row_groups": "2", + "format_version": "2.6", + "metadata_size": "577", + "total_uncompressed_size": "282436", + "total_compressed_size": "26633", + "columns": [ + { + "name": "number", + "path": "number", + "max_definition_level": "0", + "max_repetition_level": "0", + "physical_type": "INT32", + "logical_type": "Int(bitWidth=16, isSigned=false)", + "compression": "LZ4", + "total_uncompressed_size": "133321", + "total_compressed_size": "13293", + "space_saved": "90.03%", + "encodings": [ + "RLE_DICTIONARY", + "PLAIN", + "RLE" + ] + }, + { + "name": "concat('Hello', toString(modulo(number, 1000)))", + "path": "concat('Hello', toString(modulo(number, 1000)))", + "max_definition_level": "0", + "max_repetition_level": "0", + "physical_type": "BYTE_ARRAY", + "logical_type": "None", + "compression": "LZ4", + "total_uncompressed_size": "149115", + "total_compressed_size": "13340", + "space_saved": "91.05%", + "encodings": [ + "RLE_DICTIONARY", + "PLAIN", + "RLE" + ] + } + ], + "row_groups": [ + { + "num_columns": "2", + "num_rows": "65409", + "total_uncompressed_size": "179809", + "total_compressed_size": "14163", + "columns": [ + { + "name": "number", + "path": "number", + "total_compressed_size": "7070", + "total_uncompressed_size": "85956", + "have_statistics": true, + "statistics": { + "num_values": "65409", + "null_count": "0", + "distinct_count": null, + "min": "0", + "max": "999" + } + }, + { + "name": "concat('Hello', toString(modulo(number, 1000)))", + "path": "concat('Hello', toString(modulo(number, 1000)))", + "total_compressed_size": "7093", + "total_uncompressed_size": "93853", + "have_statistics": true, + "statistics": { + "num_values": "65409", + "null_count": "0", + "distinct_count": null, + "min": "Hello0", + "max": "Hello999" + } + } + ] + }, + ... + ] +} +``` + +## Arrow {#data-format-arrow} + +[Apache Arrow](https://arrow.apache.org/)ã«ã¯2ã¤ã®çµ„ã¿è¾¼ã¿ã®åˆ—指å‘ストレージフォーマットãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã¯ã“れらã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®èª­ã¿æ›¸ãをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +`Arrow`ã¯ã€Apache Arrowã®"file mode"フォーマットã§ã™ã€‚ã“ã‚Œã¯ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªãƒ©ãƒ³ãƒ€ãƒ ã‚¢ã‚¯ã‚»ã‚¹ç”¨ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### データ型ã®ãƒžãƒƒãƒãƒ³ã‚° {#data-types-matching-arrow} + +下記ã®è¡¨ã¯ã€`INSERT`ãŠã‚ˆã³`SELECT`クエリã«ãŠã„ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã¨ClickHouse [データ型](/docs/ja/sql-reference/data-types/index.md)ã®ãƒžãƒƒãƒãƒ³ã‚°ã®æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +| Arrow データ型 (`INSERT`) | ClickHouse データ型 | Arrow データ型 (`SELECT`) | +|-----------------------------------------|------------------------------------------------------------------------------------------------------------|----------------------------| +| `BOOL` | [Bool](/docs/ja/sql-reference/data-types/boolean.md) | `BOOL` | +| `UINT8`, `BOOL` | [UInt8](/docs/ja/sql-reference/data-types/int-uint.md) | `UINT8` | +| `INT8` | [Int8](/docs/ja/sql-reference/data-types/int-uint.md)/[Enum8](/docs/ja/sql-reference/data-types/enum.md) | `INT8` | +| `UINT16` | [UInt16](/docs/ja/sql-reference/data-types/int-uint.md) | `UINT16` | +| `INT16` | [Int16](/docs/ja/sql-reference/data-types/int-uint.md)/[Enum16](/docs/ja/sql-reference/data-types/enum.md) | `INT16` | +| `UINT32` | [UInt32](/docs/ja/sql-reference/data-types/int-uint.md) | `UINT32` | +| `INT32` | [Int32](/docs/ja/sql-reference/data-types/int-uint.md) | `INT32` | +| `UINT64` | [UInt64](/docs/ja/sql-reference/data-types/int-uint.md) | `UINT64` | +| `INT64` | [Int64](/docs/ja/sql-reference/data-types/int-uint.md) | `INT64` | +| `FLOAT`, `HALF_FLOAT` | [Float32](/docs/ja/sql-reference/data-types/float.md) | `FLOAT32` | +| `DOUBLE` | [Float64](/docs/ja/sql-reference/data-types/float.md) | `FLOAT64` | +| `DATE32` | [Date32](/docs/ja/sql-reference/data-types/date32.md) | `UINT16` | +| `DATE64` | [DateTime](/docs/ja/sql-reference/data-types/datetime.md) | `UINT32` | +| `TIMESTAMP`, `TIME32`, `TIME64` | [DateTime64](/docs/ja/sql-reference/data-types/datetime64.md) | `UINT32` | +| `STRING`, `BINARY` | [String](/docs/ja/sql-reference/data-types/string.md) | `BINARY` | +| `STRING`, `BINARY`, `FIXED_SIZE_BINARY` | [FixedString](/docs/ja/sql-reference/data-types/fixedstring.md) | `FIXED_SIZE_BINARY` | +| `DECIMAL` | [Decimal](/docs/ja/sql-reference/data-types/decimal.md) | `DECIMAL` | +| `DECIMAL256` | [Decimal256](/docs/ja/sql-reference/data-types/decimal.md) | `DECIMAL256` | +| `LIST` | [Array](/docs/ja/sql-reference/data-types/array.md) | `LIST` | +| `STRUCT` | [Tuple](/docs/ja/sql-reference/data-types/tuple.md) | `STRUCT` | +| `MAP` | [Map](/docs/ja/sql-reference/data-types/map.md) | `MAP` | +| `UINT32` | [IPv4](/docs/ja/sql-reference/data-types/ipv4.md) | `UINT32` | +| `FIXED_SIZE_BINARY`, `BINARY` | [IPv6](/docs/ja/sql-reference/data-types/ipv6.md) | `FIXED_SIZE_BINARY` | +| `FIXED_SIZE_BINARY`, `BINARY` | [Int128/UInt128/Int256/UInt256](/docs/ja/sql-reference/data-types/int-uint.md) | `FIXED_SIZE_BINARY` | + +é…列ã¯ãƒã‚¹ãƒˆå¯èƒ½ã§ã‚ã‚Šã€å¼•æ•°ã¨ã—ã¦`Nullable`åž‹ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚`Tuple`ã¨`Map`åž‹ã‚‚ãƒã‚¹ãƒˆå¯èƒ½ã§ã™ã€‚ + +`INSERT`クエリã«ã¯`DICTIONARY`åž‹ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€`SELECT`クエリã§ã¯ã€[LowCardinality](/docs/ja/sql-reference/data-types/lowcardinality.md)åž‹ã‚’`DICTIONARY`åž‹ã¨ã—ã¦å‡ºåŠ›ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã™ã‚‹è¨­å®š [output_format_arrow_low_cardinality_as_dictionary](/docs/ja/operations/settings/settings-formats.md/#output-format-arrow-low-cardinality-as-dictionary)ãŒã‚ã‚Šã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„Arrowデータ型: `FIXED_SIZE_BINARY`, `JSON`, `UUID`, `ENUM`. + +ClickHouseã®ãƒ†ãƒ¼ãƒ–ルカラムã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯ã€å¯¾å¿œã™ã‚‹Arrowã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¨ä¸€è‡´ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。データを挿入ã™ã‚‹éš›ã€ClickHouseã¯ä¸Šè¨˜ã®è¡¨ã«å¾“ã£ã¦ãƒ‡ãƒ¼ã‚¿åž‹ã‚’解釈ã—ã€ãã®å¾Œã€ClickHouseã®ãƒ†ãƒ¼ãƒ–ルカラムã«è¨­å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ã«[キャスト](/docs/ja/sql-reference/functions/type-conversion-functions.md/#type_conversion_function-cast)ã—ã¾ã™ã€‚ + +### データ挿入 {#inserting-data-arrow} + +Arrowデータをファイルã‹ã‚‰ClickHouseテーブルã«æŒ¿å…¥ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¾ã™: + +``` bash +$ cat filename.arrow | clickhouse-client --query="INSERT INTO some_table FORMAT Arrow" +``` + +### データã®é¸æŠž {#selecting-data-arrow} + +ClickHouseテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã—ã€ãれをArrowフォーマットã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¾ã™: + +``` bash +$ clickhouse-client --query="SELECT * FROM {some_table} FORMAT Arrow" > {filename.arrow} +``` + +### Arrowフォーマットã®è¨­å®š {#arrow-format-settings} + +- [output_format_arrow_low_cardinality_as_dictionary](/docs/ja/operations/settings/settings-formats.md/#output_format_arrow_low_cardinality_as_dictionary) - ClickHouse LowCardinalityåž‹ã‚’Dictionary Arrowåž‹ã¨ã—ã¦å‡ºåŠ›ã™ã‚‹ã“ã¨ã‚’有効ã«ã—ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- [output_format_arrow_use_64_bit_indexes_for_dictionary](/docs/ja/operations/settings/settings-formats.md/#output_format_arrow_use_64_bit_indexes_for_dictionary) - Dictionaryã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«64ビット整数型を使用ã—ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- [output_format_arrow_use_signed_indexes_for_dictionary](/docs/ja/operations/settings/settings-formats.md/#output_format_arrow_use_signed_indexes_for_dictionary) - Dictionaryã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ç¬¦å·ä»˜ã整数型を使用ã—ã¾ã™ã€‚デフォルト値ã¯`true`ã§ã™ã€‚ +- [output_format_arrow_string_as_string](/docs/ja/operations/settings/settings-formats.md/#output_format_arrow_string_as_string) - Stringカラムã«Binaryã§ã¯ãªãArrow String型を使用ã—ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- [input_format_arrow_case_insensitive_column_matching](/docs/ja/operations/settings/settings-formats.md/#input_format_arrow_case_insensitive_column_matching) - Arrowカラムã¨ClickHouseカラムã®ãƒžãƒƒãƒãƒ³ã‚°ã«ãŠã„ã¦å¤§æ–‡å­—å°æ–‡å­—を無視ã—ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- [input_format_arrow_allow_missing_columns](/docs/ja/operations/settings/settings-formats.md/#input_format_arrow_allow_missing_columns) - Arrowデータを読ã¿å–ã‚‹éš›ã«æ¬ è½ã—ã¦ã„るカラムを許å¯ã—ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- [input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference](/docs/ja/operations/settings/settings-formats.md/#input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference) - Arrowフォーマットã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–時ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„åž‹ã®ã‚«ãƒ©ãƒ ã‚’スキップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- [output_format_arrow_fixed_string_as_fixed_byte_array](/docs/ja/operations/settings/settings-formats.md/#output_format_arrow_fixed_string_as_fixed_byte_array) - FixedStringカラムã«Byte/Stringã§ã¯ãªãArrow FIXED_SIZE_BINARY型を使用ã—ã¾ã™ã€‚デフォルト値ã¯`true`ã§ã™ã€‚ +- [output_format_arrow_compression_method](/docs/ja/operations/settings/settings-formats.md/#output_format_arrow_compression_method) - 出力Arrowフォーマットã«ä½¿ç”¨ã•ã‚Œã‚‹åœ§ç¸®ãƒ¡ã‚½ãƒƒãƒ‰ã€‚デフォルト値ã¯`lz4_frame`ã§ã™ã€‚ + +## ArrowStream {#data-format-arrow-stream} + +`ArrowStream`ã¯Apache Arrowã®ã€Œstream modeã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã™ã€‚ã“ã‚Œã¯ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã‚¹ãƒˆãƒªãƒ¼ãƒ å‡¦ç†ç”¨ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## ORC {#data-format-orc} + +[Apache ORC](https://orc.apache.org/)ã¯[Hadoop](https://hadoop.apache.org/)エコシステムã§åºƒã使用ã•ã‚Œã¦ã„る列指å‘ストレージフォーマットã§ã™ã€‚ + +### データ型ã®ãƒžãƒƒãƒãƒ³ã‚° {#data-types-matching-orc} + +下記ã®è¡¨ã¯ã€`INSERT`ãŠã‚ˆã³`SELECT`クエリã«ãŠã„ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã¨ClickHouse [データ型](/docs/ja/sql-reference/data-types/index.md)ã®ãƒžãƒƒãƒãƒ³ã‚°ã®æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +| ORC データ型 (`INSERT`) | ClickHouse データ型 | ORC データ型 (`SELECT`) | +|---------------------------------------|-------------------------------------------------------------------------------------------------------------------|--------------------------| +| `Boolean` | [UInt8](/docs/ja/sql-reference/data-types/int-uint.md) | `Boolean` | +| `Tinyint` | [Int8/UInt8](/docs/ja/sql-reference/data-types/int-uint.md)/[Enum8](/docs/ja/sql-reference/data-types/enum.md) | `Tinyint` | +| `Smallint` | [Int16/UInt16](/docs/ja/sql-reference/data-types/int-uint.md)/[Enum16](/docs/ja/sql-reference/data-types/enum.md) | `Smallint` | +| `Int` | [Int32/UInt32](/docs/ja/sql-reference/data-types/int-uint.md) | `Int` | +| `Bigint` | [Int64/UInt32](/docs/ja/sql-reference/data-types/int-uint.md) | `Bigint` | +| `Float` | [Float32](/docs/ja/sql-reference/data-types/float.md) | `Float` | +| `Double` | [Float64](/docs/ja/sql-reference/data-types/float.md) | `Double` | +| `Decimal` | [Decimal](/docs/ja/sql-reference/data-types/decimal.md) | `Decimal` | +| `Date` | [Date32](/docs/ja/sql-reference/data-types/date32.md) | `Date` | +| `Timestamp` | [DateTime64](/docs/ja/sql-reference/data-types/datetime64.md) | `Timestamp` | +| `String`, `Char`, `Varchar`, `Binary` | [String](/docs/ja/sql-reference/data-types/string.md) | `Binary` | +| `List` | [Array](/docs/ja/sql-reference/data-types/array.md) | `List` | +| `Struct` | [Tuple](/docs/ja/sql-reference/data-types/tuple.md) | `Struct` | +| `Map` | [Map](/docs/ja/sql-reference/data-types/map.md) | `Map` | +| `Int` | [IPv4](/docs/ja/sql-reference/data-types/int-uint.md) | `Int` | +| `Binary` | [IPv6](/docs/ja/sql-reference/data-types/ipv6.md) | `Binary` | +| `Binary` | [Int128/UInt128/Int256/UInt256](/docs/ja/sql-reference/data-types/int-uint.md) | `Binary` | +| `Binary` | [Decimal256](/docs/ja/sql-reference/data-types/decimal.md) | `Binary` | + +ãã®ä»–ã®åž‹ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +é…列ã¯ãƒã‚¹ãƒˆå¯èƒ½ã§ã€å¼•æ•°ã¨ã—ã¦`Nullable`åž‹ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚`Tuple`ã¨`Map`åž‹ã‚‚ãƒã‚¹ãƒˆå¯èƒ½ã§ã™ã€‚ + +ClickHouseã®ãƒ†ãƒ¼ãƒ–ルカラムã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯ã€å¯¾å¿œã™ã‚‹ORCデータフィールドã¨ä¸€è‡´ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。データを挿入ã™ã‚‹éš›ã€ClickHouseã¯ä¸Šè¨˜ã®è¡¨ã«å¾“ã£ã¦ãƒ‡ãƒ¼ã‚¿åž‹ã‚’解釈ã—ã€ãã®å¾Œã€ClickHouseã®ãƒ†ãƒ¼ãƒ–ルカラムã«è¨­å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ã«[キャスト](/docs/ja/sql-reference/functions/type-conversion-functions.md/#type_conversion_function-cast)ã—ã¾ã™ã€‚ + +### データ挿入 {#inserting-data-orc} + +ORCデータをファイルã‹ã‚‰ClickHouseテーブルã«æŒ¿å…¥ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¾ã™: + +``` bash +$ cat filename.orc | clickhouse-client --query="INSERT INTO some_table FORMAT ORC" +``` + +### データã®é¸æŠž {#selecting-data-orc} + +ClickHouseテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã—ã€ãれをORCフォーマットã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¾ã™: + +``` bash +$ clickhouse-client --query="SELECT * FROM {some_table} FORMAT ORC" > {filename.orc} +``` + +### Arrowフォーマットã®è¨­å®š {#parquet-format-settings} + +- [output_format_arrow_string_as_string](/docs/ja/operations/settings/settings-formats.md/#output_format_arrow_string_as_string) - Stringカラムã«Binaryã§ã¯ãªãArrow String型を使用ã—ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- [output_format_orc_compression_method](/docs/ja/operations/settings/settings-formats.md/#output_format_orc_compression_method) - 出力ORCフォーマットã«ä½¿ç”¨ã•ã‚Œã‚‹åœ§ç¸®ãƒ¡ã‚½ãƒƒãƒ‰ã€‚デフォルト値ã¯`none`ã§ã™ã€‚ +- [input_format_arrow_case_insensitive_column_matching](/docs/ja/operations/settings/settings-formats.md/#input_format_arrow_case_insensitive_column_matching) - Arrowカラムã¨ClickHouseカラムã®ãƒžãƒƒãƒãƒ³ã‚°ã«ãŠã„ã¦å¤§æ–‡å­—å°æ–‡å­—を無視ã—ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- [input_format_arrow_allow_missing_columns](/docs/ja/operations/settings/settings-formats.md/#input_format_arrow_allow_missing_columns) - Arrowデータを読ã¿å–ã‚‹éš›ã«æ¬ è½ã—ã¦ã„るカラムを許å¯ã—ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- [input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference](/docs/ja/operations/settings/settings-formats.md/#input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference) - Arrowフォーマットã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–時ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„åž‹ã®ã‚«ãƒ©ãƒ ã‚’スキップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ + +Hadoopã¨ãƒ‡ãƒ¼ã‚¿ã‚’交æ›ã™ã‚‹ã«ã¯ã€[HDFSテーブルエンジン](/docs/ja/engines/table-engines/integrations/hdfs.md)を使用ã§ãã¾ã™ã€‚ + +## One {#data-format-one} + +ファイルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–らãšã€`UInt8`åž‹ã€åå‰`dummy`ã€å€¤`0`ã‚’æŒã¤ã‚«ãƒ©ãƒ ã‚’å«ã‚€è¡Œã®ã¿ã‚’è¿”ã™ç‰¹æ®Šãªå…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚ +仮想カラム`_file/_path`を使用ã—ã¦ã€å®Ÿéš›ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–らãšã«ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’リストã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +例: + +クエリ: +```sql +SELECT _file FROM file('path/to/files/data*', One); +``` + +çµæžœ: +```text +┌─_file────┠+│ data.csv │ +└──────────┘ +┌─_file──────┠+│ data.jsonl │ +└────────────┘ +┌─_file────┠+│ data.tsv │ +└──────────┘ +┌─_file────────┠+│ data.parquet │ +└──────────────┘ +``` + +## Npy {#data-format-npy} + +ã“ã®æ©Ÿèƒ½ã¯ã€NumPyã®.npyファイルã‹ã‚‰NumPyé…列をClickHouseã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã‚ˆã†ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚NumPyファイルフォーマットã¯ã€æ•°å€¤ãƒ‡ãƒ¼ã‚¿ã®é…列を効率的ã«ä¿å­˜ã™ã‚‹ãŸã‚ã®ãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã™ã€‚インãƒãƒ¼ãƒˆä¸­ã€ClickHouseã¯æœ€ä¸Šä½æ¬¡å…ƒã‚’å˜ä¸€ã‚«ãƒ©ãƒ ã‚’æŒã¤è¡Œã®é…列ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹Npyデータ型ã¨ã€ãã‚Œã«å¯¾å¿œã™ã‚‹ClickHouseã®åž‹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ã€‚ + +| Npy データ型 (`INSERT`) | ClickHouse データ型 | Npy データ型 (`SELECT`) | +|--------------------------|-----------------------------------------------------------------|--------------------------| +| `i1` | [Int8](/docs/ja/sql-reference/data-types/int-uint.md) | `i1` | +| `i2` | [Int16](/docs/ja/sql-reference/data-types/int-uint.md) | `i2` | +| `i4` | [Int32](/docs/ja/sql-reference/data-types/int-uint.md) | `i4` | +| `i8` | [Int64](/docs/ja/sql-reference/data-types/int-uint.md) | `i8` | +| `u1`, `b1` | [UInt8](/docs/ja/sql-reference/data-types/int-uint.md) | `u1` | +| `u2` | [UInt16](/docs/ja/sql-reference/data-types/int-uint.md) | `u2` | +| `u4` | [UInt32](/docs/ja/sql-reference/data-types/int-uint.md) | `u4` | +| `u8` | [UInt64](/docs/ja/sql-reference/data-types/int-uint.md) | `u8` | +| `f2`, `f4` | [Float32](/docs/ja/sql-reference/data-types/float.md) | `f4` | +| `f8` | [Float64](/docs/ja/sql-reference/data-types/float.md) | `f8` | +| `S`, `U` | [String](/docs/ja/sql-reference/data-types/string.md) | `S` | +| | [FixedString](/docs/ja/sql-reference/data-types/fixedstring.md) | `S` | + +**Pythonを使用ã—ã¦.npyå½¢å¼ã§é…列をä¿å­˜ã™ã‚‹ä¾‹** + +```Python +import numpy as np +arr = np.array([[[1],[2],[3]],[[4],[5],[6]]]) +np.save('example_array.npy', arr) +``` + +**ClickHouseã§NumPyファイルを読む例** + +クエリ: +```sql +SELECT * +FROM file('example_array.npy', Npy) +``` + +çµæžœ: +``` +┌─array─────────┠+│ [[1],[2],[3]] │ +│ [[4],[5],[6]] │ +└───────────────┘ +``` + +**データã®é¸æŠž** + +ClickHouseテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã—ã€ãれをNpyフォーマットã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¾ã™: + +```bash +$ clickhouse-client --query="SELECT {column} FROM {some_table} FORMAT Npy" > {filename.npy} +``` + +## LineAsString {#lineasstring} + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã®å„è¡ŒãŒå˜ä¸€ã®æ–‡å­—列値ã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€åž‹[String](/docs/ja/sql-reference/data-types/string.md)ã®å˜ä¸€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã®ã¿è§£æžã§ãã¾ã™ã€‚ä»–ã®ã‚«ãƒ©ãƒ ã¯[DEFAULT](/docs/ja/sql-reference/statements/create/table.md/#default)ã¾ãŸã¯[MATERIALIZED](/docs/ja/sql-reference/statements/create/table.md/#materialized)ã«è¨­å®šã•ã‚Œã‚‹ã‹ã€çœç•¥ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +DROP TABLE IF EXISTS line_as_string; +CREATE TABLE line_as_string (field String) ENGINE = Memory; +INSERT INTO line_as_string FORMAT LineAsString "I love apple", "I love banana", "I love orange"; +SELECT * FROM line_as_string; +``` + +çµæžœ: + +``` text +┌─field─────────────────────────────────────────────┠+│ "I love apple", "I love banana", "I love orange"; │ +└───────────────────────────────────────────────────┘ +``` + +## Regexp {#data-format-regexp} + +インãƒãƒ¼ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®å„è¡Œã¯ã€æ­£è¦è¡¨ç¾ã«å¾“ã£ã¦è§£æžã•ã‚Œã¾ã™ã€‚ + +`Regexp`フォーマットを使用ã™ã‚‹éš›ã«ã¯ã€ä»¥ä¸‹ã®è¨­å®šã‚’利用ã§ãã¾ã™ï¼š + +- `format_regexp` — [String](/docs/ja/sql-reference/data-types/string.md)。[re2](https://github.com/google/re2/wiki/Syntax)å½¢å¼ã®æ­£è¦è¡¨ç¾ã‚’å«ã¿ã¾ã™ã€‚ + +- `format_regexp_escaping_rule` — [String](/docs/ja/sql-reference/data-types/string.md)。以下ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼š + + - CSV (é¡žä¼¼ [CSV](#csv)) + - JSON (é¡žä¼¼ [JSONEachRow](#jsoneachrow)) + - Escaped (é¡žä¼¼ [TSV](#tabseparated)) + - Quoted (é¡žä¼¼ [Values](#data-format-values)) + - Raw (サブパターンを丸ã”ã¨æŠ½å‡ºã€ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールãªã—ã€[TSVRaw](#tabseparatedraw)ã«é¡žä¼¼) + +- `format_regexp_skip_unmatched` — [UInt8](/docs/ja/sql-reference/data-types/int-uint.md)。インãƒãƒ¼ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒ `format_regexp` å¼ã«ä¸€è‡´ã—ãªã‹ã£ãŸå ´åˆã«ä¾‹å¤–をスローã™ã‚‹å¿…è¦æ€§ã‚’定義ã—ã¾ã™ã€‚`0`ã¾ãŸã¯`1`ã«è¨­å®šã§ãã¾ã™ã€‚ + +**使用方法** + +[format_regexp](/docs/ja/operations/settings/settings-formats.md/#format_regexp)設定ã‹ã‚‰ã®æ­£è¦è¡¨ç¾ã¯ã€ã‚¤ãƒ³ãƒãƒ¼ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®å„è¡Œã«é©ç”¨ã•ã‚Œã¾ã™ã€‚æ­£è¦è¡¨ç¾ã®ã‚µãƒ–パターン数ã¯ã€ã‚¤ãƒ³ãƒãƒ¼ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆå†…ã®ã‚«ãƒ©ãƒ æ•°ã¨ä¸€è‡´ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +インãƒãƒ¼ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®å„è¡Œã¯ã€æ”¹è¡Œæ–‡å­— `'\n'` åˆã¯ DOSスタイルã®æ”¹è¡Œ `"\r\n"` ã§åŒºåˆ‡ã‚‰ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +å„サブパターンã®å†…容ã¯ã€[format_regexp_escaping_rule](/docs/ja/operations/settings/settings-formats.md/#format_regexp_escaping_rule)設定ã«å¾“ã£ã¦ã€å¯¾å¿œã™ã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§è§£æžã•ã‚Œã¾ã™ã€‚ + +æ­£è¦è¡¨ç¾ãŒè¡Œã«ä¸€è‡´ã›ãšã€[format_regexp_skip_unmatched](/docs/ja/operations/settings/settings-formats.md/#format_regexp_escaping_rule)ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãã®è¡Œã¯é™ã‹ã«ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ãれ以外ã®å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**例** + +ファイル data.tsvを考ãˆã¦ã¿ã¾ã—ょã†: + +```text +id: 1 array: [1,2,3] string: str1 date: 2020-01-01 +id: 2 array: [1,2,3] string: str2 date: 2020-01-02 +id: 3 array: [1,2,3] string: str3 date: 2020-01-03 +``` +ãã—ã¦ãƒ†ãƒ¼ãƒ–ル: + +```sql +CREATE TABLE imp_regex_table (id UInt32, array Array(UInt32), string String, date Date) ENGINE = Memory; +``` + +インãƒãƒ¼ãƒˆã‚³ãƒžãƒ³ãƒ‰: + +```bash +$ cat data.tsv | clickhouse-client --query "INSERT INTO imp_regex_table SETTINGS format_regexp='id: (.+?) array: (.+?) string: (.+?) date: (.+?)', format_regexp_escaping_rule='Escaped', format_regexp_skip_unmatched=0 FORMAT Regexp;" +``` + +クエリ: + +```sql +SELECT * FROM imp_regex_table; +``` + +çµæžœ: + +```text +┌─id─┬─array───┬─string─┬───────date─┠+│ 1 │ [1,2,3] │ str1 │ 2020-01-01 │ +│ 2 │ [1,2,3] │ str2 │ 2020-01-02 │ +│ 3 │ [1,2,3] │ str3 │ 2020-01-03 │ +└────┴─────────┴────────┴────────────┘ +``` + +## フォーマットスキーマ {#formatschema} + +フォーマットスキーマをå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«åã¯ã€è¨­å®š `format_schema` ã§è¨­å®šã•ã‚Œã¾ã™ã€‚ +`Cap'n Proto` ãŠã‚ˆã³ `Protobuf` ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã®è¨­å®šã®è¨­å®šãŒå¿…è¦ã§ã™ã€‚ +フォーマットスキーマã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«åã¨ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—ã®åå‰ã‚’コロンã§åŒºåˆ‡ã£ãŸçµ„ã¿åˆã‚ã›ã§ã™ã€ +例ãˆã° `schemafile.proto:MessageType` ã§ã™ã€‚ +ファイルãŒãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®æ¨™æº–æ‹¡å¼µå­ï¼ˆä¾‹ãˆã°ã€`Protobuf`ã®å ´åˆã¯`.proto`)をæŒã£ã¦ã„ã‚‹å ´åˆã€ãã®æ‹¡å¼µå­ã‚’çœç•¥ã§ãã€ã“ã®å ´åˆã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚¹ã‚­ãƒ¼ãƒžã¯ `schemafile:MessageType` ã¨ãªã‚Šã¾ã™ã€‚ + +[client](/docs/ja/interfaces/cli.md) 㧠[インタラクティブモード](/docs/ja/interfaces/cli.md/#cli_usage) ã§ãƒ‡ãƒ¼ã‚¿ã‚’入出力ã™ã‚‹å ´åˆã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚¹ã‚­ãƒ¼ãƒžã«æŒ‡å®šã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«åã«ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆä¸Šã®ç¾åœ¨ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰ã®çµ¶å¯¾ãƒ‘スã¾ãŸã¯ç›¸å¯¾ãƒ‘スをå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +[ãƒãƒƒãƒãƒ¢ãƒ¼ãƒ‰](/docs/ja/interfaces/cli.md/#cli_usage) ã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’使用ã™ã‚‹å ´åˆã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šã®ç†ç”±ã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã¸ã®ãƒ‘スã¯ç›¸å¯¾ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +[HTTPインターフェイス](/docs/ja/interfaces/http.md)を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’入出力ã™ã‚‹å ´åˆã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚¹ã‚­ãƒ¼ãƒžã«æŒ‡å®šã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«åã¯ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šã®[format_schema_path](/docs/ja/operations/server-configuration-parameters/settings.md/#format_schema_path)ã«æŒ‡å®šã•ã‚ŒãŸãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«å­˜åœ¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## エラーã®ã‚¹ã‚­ãƒƒãƒ— {#skippingerrors} + +`CSV`, `TabSeparated`, `TSKV`, `JSONEachRow`, `Template`, `CustomSeparated`, `Protobuf`ãªã©ã®å½¢å¼ã§ã¯ã€ãƒ‘ースエラーãŒç™ºç”Ÿã—ãŸå ´åˆã«å£Šã‚ŒãŸè¡Œã‚’スキップã—ã€æ¬¡ã®è¡Œã®æœ€åˆã‹ã‚‰ãƒ‘ースを続行ã§ãã¾ã™ã€‚[input_format_allow_errors_num](/docs/ja/operations/settings/settings-formats.md/#input_format_allow_errors_num)㨠+[input_format_allow_errors_ratio](/docs/ja/operations/settings/settings-formats.md/#input_format_allow_errors_ratio)ã®è¨­å®šã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +制é™äº‹é …: +- `JSONEachRow`ã®å ´åˆã€ãƒ‘ースエラー時ã«ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’æ–°ã—ã„行(ã¾ãŸã¯EOF)ã¾ã§ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹ãŸã‚ã€æ­£ç¢ºã«ã‚¨ãƒ©ãƒ¼ã‚’カウントã™ã‚‹ã«ã¯`\\n`ã§è¡Œã‚’区切る必è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- `Template`ãŠã‚ˆã³`CustomSeparated`ã¯ã€æ¬¡ã®è¡Œã®é–‹å§‹ã‚’見ã¤ã‘ã‚‹ãŸã‚ã«æœ€å¾Œã®ã‚«ãƒ©ãƒ å¾Œã®åŒºåˆ‡ã‚Šæ–‡å­—ã¨è¡Œé–“ã®åŒºåˆ‡ã‚Šæ–‡å­—を使用ã™ã‚‹ãŸã‚ã€å°‘ãªãã¨ã‚‚ã©ã¡ã‚‰ã‹ä¸€ã¤ãŒç©ºã§ãªã„å ´åˆã«ã®ã¿ã‚¨ãƒ©ãƒ¼ã®ã‚¹ã‚­ãƒƒãƒ—ãŒæ©Ÿèƒ½ã—ã¾ã™ã€‚ + +## RawBLOB {#rawblob} + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã¯å˜ä¸€ã®å€¤ã«èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚åž‹[String](/docs/ja/sql-reference/data-types/string.md)ã¾ãŸã¯é¡žä¼¼ã®å˜ä¸€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®ãƒ†ãƒ¼ãƒ–ルã®ã¿ã‚’解æžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +çµæžœã¯ã€ãƒã‚¤ãƒŠãƒªå½¢å¼ã§åŒºåˆ‡ã‚Šã‚„エスケープãªã—ã§å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚複数ã®å€¤ãŒå‡ºåŠ›ã•ã‚Œã‚‹å ´åˆã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯æ›–昧ã«ãªã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’å†åº¦èª­ã¿å–ã‚‹ã“ã¨ãŒã§ããªããªã‚Šã¾ã™ã€‚ + +以下ã¯ã€`RawBLOB`フォーマットã¨[TabSeparatedRaw](#tabseparatedraw)フォーマットã®æ¯”較ã§ã™ã€‚ + +`RawBLOB`: +- データã¯ãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§å‡ºåŠ›ã•ã‚Œã€ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ãªã—; +- 値間ã®åŒºåˆ‡ã‚Šãªã—; +- å„値ã®æœ€å¾Œã«æ”¹è¡Œãªã—。 + +`TabSeparatedRaw`: +- データã¯ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ãªã—ã§å‡ºåŠ›ã•ã‚Œã‚‹; +- è¡Œã«ã¯ã‚¿ãƒ–ã§åŒºåˆ‡ã‚‰ã‚ŒãŸå€¤ãŒå«ã¾ã‚Œã‚‹; +- å„è¡Œã®æœ€å¾Œã®å€¤ã®å¾Œã«ã¯æ”¹è¡ŒãŒã‚る。 + +以下ã¯`RawBLOB`ã¨[RowBinary](#rowbinary)フォーマットã®æ¯”較ã§ã™ã€‚ + +`RawBLOB`: +- Stringフィールドã¯é•·ã•ã‚’プレフィックスã«æŒãŸãšã«å‡ºåŠ›ã•ã‚Œã‚‹ã€‚ + +`RowBinary`: +- Stringフィールドã¯varintå½¢å¼ï¼ˆç¬¦å·ãªã—[LEB128](https://ja.wikipedia.org/wiki/LEB128))ã§é•·ã•ãŒè¡¨ã•ã‚Œã€ãã®å¾Œã«æ–‡å­—列ã®ãƒã‚¤ãƒˆãŒç¶šã。 + +`RawBLOB`入力ã«ç©ºã®ãƒ‡ãƒ¼ã‚¿ã‚’渡ã™ã¨ã€ClickHouseã¯ä¾‹å¤–をスローã—ã¾ã™: + +``` text +Code: 108. DB::Exception: No data to insert +``` + +**例** + +``` bash +$ clickhouse-client --query "CREATE TABLE {some_table} (a String) ENGINE = Memory;" +$ cat {filename} | clickhouse-client --query="INSERT INTO {some_table} FORMAT RawBLOB" +$ clickhouse-client --query "SELECT * FROM {some_table} FORMAT RawBLOB" | md5sum +``` + +çµæžœ: + +``` text +f9725a22f9191e064120d718e26862a9 - +``` + +## MsgPack {#msgpack} + +ClickHouseã¯[MessagePack](https://msgpack.org/)データファイルã®èª­ã¿æ›¸ãをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### データ型ã®ãƒžãƒƒãƒãƒ³ã‚° {#data-types-matching-msgpack} + +| MessagePack データ型 (`INSERT`) | ClickHouse データ型 | MessagePack データ型 (`SELECT`) | +|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|----------------------------------| +| `uint N`, `positive fixint` | [UIntN](/docs/ja/sql-reference/data-types/int-uint.md) | `uint N` | +| `int N`, `negative fixint` | [IntN](/docs/ja/sql-reference/data-types/int-uint.md) | `int N` | +| `bool` | [UInt8](/docs/ja/sql-reference/data-types/int-uint.md) | `uint 8` | +| `fixstr`, `str 8`, `str 16`, `str 32`, `bin 8`, `bin 16`, `bin 32` | [String](/docs/ja/sql-reference/data-types/string.md) | `bin 8`, `bin 16`, `bin 32` | +| `fixstr`, `str 8`, `str 16`, `str 32`, `bin 8`, `bin 16`, `bin 32` | [FixedString](/docs/ja/sql-reference/data-types/fixedstring.md) | `bin 8`, `bin 16`, `bin 32` | +| `float 32` | [Float32](/docs/ja/sql-reference/data-types/float.md) | `float 32` | +| `float 64` | [Float64](/docs/ja/sql-reference/data-types/float.md) | `float 64` | +| `uint 16` | [Date](/docs/ja/sql-reference/data-types/date.md) | `uint 16` | +| `int 32` | [Date32](/docs/ja/sql-reference/data-types/date32.md) | `int 32` | +| `uint 32` | [DateTime](/docs/ja/sql-reference/data-types/datetime.md) | `uint 32` | +| `uint 64` | [DateTime64](/docs/ja/sql-reference/data-types/datetime.md) | `uint 64` | +| `fixarray`, `array 16`, `array 32` | [Array](/docs/ja/sql-reference/data-types/array.md)/[Tuple](/docs/ja/sql-reference/data-types/tuple.md) | `fixarray`, `array 16`, `array 32` | +| `fixmap`, `map 16`, `map 32` | [Map](/docs/ja/sql-reference/data-types/map.md) | `fixmap`, `map 16`, `map 32` | +| `uint 32` | [IPv4](/docs/ja/sql-reference/data-types/ipv4.md) | `uint 32` | +| `bin 8` | [String](/docs/ja/sql-reference/data-types/string.md) | `bin 8` | +| `int 8` | [Enum8](/docs/ja/sql-reference/data-types/enum.md) | `int 8` | +| `bin 8` | [(U)Int128/(U)Int256](/docs/ja/sql-reference/data-types/int-uint.md) | `bin 8` | +| `int 32` | [Decimal32](/docs/ja/sql-reference/data-types/decimal.md) | `int 32` | +| `int 64` | [Decimal64](/docs/ja/sql-reference/data-types/decimal.md) | `int 64` | +| `bin 8` | [Decimal128/Decimal256](/docs/ja/sql-reference/data-types/decimal.md) | `bin 8 ` | + +例: + +".msgpk"ファイルã¸ã®æ›¸ãè¾¼ã¿: + +```sql +$ clickhouse-client --query="CREATE TABLE msgpack (array Array(UInt8)) ENGINE = Memory;" +$ clickhouse-client --query="INSERT INTO msgpack VALUES ([0, 1, 2, 3, 42, 253, 254, 255]), ([255, 254, 253, 42, 3, 2, 1, 0])"; +$ clickhouse-client --query="SELECT * FROM msgpack FORMAT MsgPack" > tmp_msgpack.msgpk; +``` + +### MsgPackフォーマットã®è¨­å®š {#msgpack-format-settings} + +- [input_format_msgpack_number_of_columns](/docs/ja/operations/settings/settings-formats.md/#input_format_msgpack_number_of_columns) - 挿入ã•ã‚ŒãŸMsgPackデータ内ã®ã‚«ãƒ©ãƒ æ•°ã€‚データã‹ã‚‰ã®è‡ªå‹•ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã«ä½¿ç”¨ã€‚デフォルト値ã¯`0`。 +- [output_format_msgpack_uuid_representation](/docs/ja/operations/settings/settings-formats.md/#output_format_msgpack_uuid_representation) - MsgPackフォーマットã§UUIDを出力ã™ã‚‹æ–¹æ³•ã€‚デフォルト値ã¯`EXT`。 + +## MySQLDump {#mysqldump} + +ClickHouseã¯MySQL [ダンプ](https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html)ã®èª­ã¿å–りをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +ダンプ内ã®1ã¤ã®ãƒ†ãƒ¼ãƒ–ルã«å±žã™ã‚‹INSERTクエリã‹ã‚‰ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚複数ã®ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯æœ€åˆã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ +[input_format_mysql_dump_table_name](/docs/ja/operations/settings/settings-formats.md/#input_format_mysql_dump_table_name)設定を使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–るテーブルã®åå‰ã‚’指定ã§ãã¾ã™ã€‚ +[input_format_mysql_dump_map_columns](/docs/ja/operations/settings/settings-formats.md/#input_format_mysql_dump_map_columns)設定ãŒ1ã«è¨­å®šã•ã‚Œã¦ãŠã‚Šã€æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®CREATEクエリã¾ãŸã¯INSERTクエリ内ã®ã‚«ãƒ©ãƒ åãŒãƒ€ãƒ³ãƒ—ã«å«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã®ã‚«ãƒ©ãƒ ã¯ãã®åå‰ã§ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ—ã•ã‚Œã¾ã™ã€ +未知ã®åå‰ã®ã‚«ãƒ©ãƒ ã¯ã€è¨­å®š[input_format_skip_unknown_fields](/docs/ja/operations/settings/settings-formats.md/#input_format_skip_unknown_fields)ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼šãƒ€ãƒ³ãƒ—ãŒæŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®CREATEクエリをå«ã‚€å ´åˆã€æ§‹é€ ã¯ãã“ã‹ã‚‰æŠ½å‡ºã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°ã€ã‚¹ã‚­ãƒ¼ãƒžã¯INSERTクエリã®ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰æŽ¨è«–ã•ã‚Œã¾ã™ã€‚ + +例: + +ファイル dump.sql: +```sql +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `test` ( + `x` int DEFAULT NULL, + `y` int DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +INSERT INTO `test` VALUES (1,NULL),(2,NULL),(3,NULL),(3,NULL),(4,NULL),(5,NULL),(6,7); +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `test 3` ( + `y` int DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +INSERT INTO `test 3` VALUES (1); +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `test2` ( + `x` int DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +INSERT INTO `test2` VALUES (1),(2),(3); +``` + +クエリ: + +```sql +DESCRIBE TABLE file(dump.sql, MySQLDump) SETTINGS input_format_mysql_dump_table_name = 'test2' +``` + +```text +┌─name─┬─type────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ x │ Nullable(Int32) │ │ │ │ │ │ +└──────┴─────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +```sql +SELECT * +FROM file(dump.sql, MySQLDump) + SETTINGS input_format_mysql_dump_table_name = 'test2' +``` + +```text +┌─x─┠+│ 1 │ +│ 2 │ +│ 3 │ +└───┘ +``` + +## DWARF {#dwarf} + +ELFファイル(実行ファイルã€ãƒ©ã‚¤ãƒ–ラリã€ã‚ªãƒ–ジェクトファイル)ã‹ã‚‰DWARFデãƒãƒƒã‚°ã‚·ãƒ³ãƒœãƒ«ã‚’解æžã—ã¾ã™ã€‚`dwarfdump`ã«ä¼¼ã¦ã„ã¾ã™ãŒã€ã¯ã‚‹ã‹ã«é€Ÿã(数百MB/秒)ã€SQLã¨å…±ã«åˆ©ç”¨ã§ãã¾ã™ã€‚.debug_infoセクション内ã®å„デãƒãƒƒã‚°æƒ…報エントリ(DIE)ã«å¯¾ã—ã¦1行を生æˆã—ã¾ã™ã€‚DIEを終端ã™ã‚‹ãŸã‚ã«DWARFエンコーディングãŒä½¿ç”¨ã™ã‚‹"null"エントリもå«ã¾ã‚Œã¾ã™ã€‚ + +ç°¡å˜ãªèƒŒæ™¯: `.debug_info` 㯠*ユニット* ã§æ§‹æˆã•ã‚Œã¦ãŠã‚Šã€ãã‚Œãžã‚ŒãŒã‚³ãƒ³ãƒ‘イルユニットã«å¯¾å¿œã—ã¾ã™ã€‚å„ユニットã¯ã€`compile_unit` DIEをルートã¨ã™ã‚‹ *DIE* ã®ãƒ„リーã§ã™ã€‚å„DIE㯠*ã‚¿ã‚°* ã‚’æŒã¡ã€*属性* ã®ãƒªã‚¹ãƒˆã‚’æŒã¡ã¾ã™ã€‚å„属性㯠*åå‰* 㨠*値*(ãŠã‚ˆã³ãã®å€¤ãŒã©ã®ã‚ˆã†ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹ã‹ã‚’指定ã™ã‚‹ *form*)をæŒã¡ã¾ã™ã€‚DIEã¯ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‹ã‚‰ã®å†…容を表ã—ã€ãã®ã‚¿ã‚°ãŒã©ã®ã‚ˆã†ãªå†…容ã§ã‚ã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚例ãˆã°ã€é–¢æ•°ã¯ï¼ˆã‚¿ã‚°= `subprogram`)ã€ã‚¯ãƒ©ã‚¹/構造体/列挙型(`class_type`/`structure_type`/`enumeration_type`)ã€å¤‰æ•°ï¼ˆ`variable`)ã€é–¢æ•°ã®å¼•æ•°ï¼ˆ`formal_parameter`)ãªã©ã§ã™ã€‚ツリー構造ã¯å¯¾å¿œã™ã‚‹ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’å映ã—ã¦ã„ã¾ã™ã€‚例ãˆã°ã€`class_type` DIE ã¯ã‚¯ãƒ©ã‚¹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’表㙠`subprogram` DIE ã‚’å«ã‚€ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +以下ã®ã‚«ãƒ©ãƒ ã‚’出力ã—ã¾ã™: + - `offset` - `.debug_info` セクション内ã®DIEã®ä½ç½® + - `size` - エンコードã•ã‚ŒãŸDIEã®ãƒã‚¤ãƒˆæ•°ï¼ˆå±žæ€§ã‚’å«ã‚€ï¼‰ + - `tag` - DIEã®ã‚¿ã‚¤ãƒ—; 通常㮠"DW_TAG_" プレフィックスã¯çœç•¥ã•ã‚Œã¾ã™ + - `unit_name` - ã“ã®DIEã‚’å«ã‚€ã‚³ãƒ³ãƒ‘イルユニットã®åå‰ + - `unit_offset` - `.debug_info` セクション内ã§ã“ã®DIEã‚’å«ã‚€ã‚³ãƒ³ãƒ‘イルユニットã®ä½ç½® + - ç¾åœ¨ã®DIEã®ãƒ„リー内ã®å…ˆç¥–ã®ã‚¿ã‚°ã‚’é †ã«å«ã‚€é…列: + - `ancestor_tags` + - `ancestor_offsets` - `ancestor_tags`ã¨ä¸¦è¡Œã™ã‚‹è£œOffset + - 利便性ã®ãŸã‚ã«å±žæ€§é…列ã‹ã‚‰é‡è¤‡ã—ãŸã„ãã¤ã‹ã®ä¸€èˆ¬çš„ãªå±žæ€§ï¼š + - `name` + - `linkage_name` - マングルã•ã‚ŒãŸå®Œå…¨ä¿®é£¾å; 通常ã€é–¢æ•°ã®ã¿ãŒãれをæŒã¡ã¾ã™ï¼ˆã™ã¹ã¦ã®é–¢æ•°ãŒæŒã£ã¦ã„ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“) + - `decl_file` - ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå®£è¨€ã•ã‚ŒãŸã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ãƒ•ã‚¡ã‚¤ãƒ«ã®åå‰ + - `decl_line` - ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå®£è¨€ã•ã‚ŒãŸã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰å†…ã®è¡Œç•ªå· + - 属性を説明ã™ã‚‹ä¸¦è¡Œé…列: + - `attr_name` - 属性ã®åå‰; 通常㮠"DW_AT_" プレフィックスã¯çœç•¥ + - `attr_form` - 属性ãŒã©ã®ã‚ˆã†ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã€è§£é‡ˆã•ã‚Œã‚‹ã‹; 通常ã®DW_FORM_プレフィックスã¯çœç•¥ + - `attr_int` - 属性ã®æ•´æ•°å€¤; 属性ãŒæ•°å€¤ã‚’æŒãŸãªã„å ´åˆã¯0 + - `attr_str` - 属性ã®æ–‡å­—列値; 属性ãŒæ–‡å­—列値をæŒãŸãªã„å ´åˆã¯ç©º + +例:最も多ãã®é–¢æ•°å®šç¾©ã‚’æŒã¤ã‚³ãƒ³ãƒ‘イルユニットを見ã¤ã‘る(テンプレートã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–やインクルードã•ã‚ŒãŸãƒ˜ãƒƒãƒ€ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã®é–¢æ•°ã‚’å«ã‚€ï¼‰ï¼š +```sql +SELECT + unit_name, + count() AS c +FROM file('programs/clickhouse', DWARF) +WHERE tag = 'subprogram' AND NOT has(attr_name, 'declaration') +GROUP BY unit_name +ORDER BY c DESC +LIMIT 3 +``` +```text +┌─unit_name──────────────────────────────────────────────────┬─────c─┠+│ ./src/Core/Settings.cpp │ 28939 │ +│ ./src/AggregateFunctions/AggregateFunctionSumMap.cpp │ 23327 │ +│ ./src/AggregateFunctions/AggregateFunctionUniqCombined.cpp │ 22649 │ +└────────────────────────────────────────────────────────────┴───────┘ + +3 rows in set. Elapsed: 1.487 sec. Processed 139.76 million rows, 1.12 GB (93.97 million rows/s., 752.77 MB/s.) +Peak memory usage: 271.92 MiB. +``` + +## Markdown {#markdown} + +çµæžœã‚’[Markdown](https://en.wikipedia.org/wiki/Markdown)フォーマットを利用ã—ã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã€è‡ªåˆ†ã®`.md`ファイルã«è²¼ã‚Šä»˜ã‘る準備を整ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +SELECT + number, + number * 2 +FROM numbers(5) +FORMAT Markdown +``` +```results +| number | multiply(number, 2) | +|-:|-:| +| 0 | 0 | +| 1 | 2 | +| 2 | 4 | +| 3 | 6 | +| 4 | 8 | +``` + +Markdownテーブルã¯è‡ªå‹•çš„ã«ç”Ÿæˆã•ã‚Œã€Githubã®ã‚ˆã†ãªMarkdown対応プラットフォームã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯å‡ºåŠ›å°‚用ã§ã™ã€‚ + +## Form {#form} + +Formフォーマットã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’ `key1=value1&key2=value2` ã®å½¢å¼ã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸ `application/x-www-form-urlencoded` フォーマットã§å˜ä¸€ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’読ã¿æ›¸ãã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +例: + +ユーザーファイルパスã«é…ç½®ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ« `data.tmp` ã«ã¯ã€URLエンコードã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚Šã¾ã™: + +```text +t_page=116&c.e=ls7xfkpm&c.tti.m=raf&rt.start=navigation&rt.bmr=390%2C11%2C10 +``` + +```sql +SELECT * FROM file(data.tmp, Form) FORMAT vertical; +``` + +çµæžœ: + +```text +Row 1: +────── +t_page: 116 +c.e: ls7xfkpm +c.tti.m: raf +rt.start: navigation +rt.bmr: 390,11,10 +``` diff --git a/docs/ja/interfaces/grpc.md b/docs/ja/interfaces/grpc.md new file mode 100644 index 00000000000..2113bc858f1 --- /dev/null +++ b/docs/ja/interfaces/grpc.md @@ -0,0 +1,99 @@ +--- +slug: /ja/interfaces/grpc +sidebar_position: 19 +sidebar_label: gRPC インターフェース +--- + +# gRPC インターフェース + +## æ¦‚è¦ {#grpc-interface-introduction} + +ClickHouseã¯[gRPC](https://grpc.io/) インターフェースをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€HTTP/2ã¨[Protocol Buffers](https://en.wikipedia.org/wiki/Protocol_Buffers)を使用ã™ã‚‹ã‚ªãƒ¼ãƒ—ンソースã®ãƒªãƒ¢ãƒ¼ãƒˆãƒ—ロシージャコールシステムã§ã™ã€‚ClickHouseã«ãŠã‘ã‚‹gRPCã®å®Ÿè£…ã¯æ¬¡ã®æ©Ÿèƒ½ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +- SSL; +- èªè¨¼; +- セッション; +- 圧縮; +- åŒã˜ãƒãƒ£ãƒãƒ«ã‚’通ã˜ãŸä¸¦åˆ—クエリ; +- クエリã®ã‚­ãƒ£ãƒ³ã‚»ãƒ«; +- 進æ—ã¨ãƒ­ã‚°å–å¾—; +- 外部テーブル。 + +インターフェースã®ä»•æ§˜ã¯[clickhouse_grpc.proto](https://github.com/ClickHouse/ClickHouse/blob/master/src/Server/grpc_protos/clickhouse_grpc.proto)ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## gRPC 設定 {#grpc-interface-configuration} + +gRPCインターフェースを使用ã™ã‚‹ã«ã¯ã€ãƒ¡ã‚¤ãƒ³[サーãƒãƒ¼è¨­å®š](../operations/configuration-files.md)㧠`grpc_port` を設定ã—ã¾ã™ã€‚ãã®ä»–ã®è¨­å®šã‚ªãƒ—ションã¯æ¬¡ã®ä¾‹ã§ç¢ºèªã—ã¦ãã ã•ã„: + +```xml +9100 + + false + + + /path/to/ssl_cert_file + /path/to/ssl_key_file + + + false + + + /path/to/ssl_ca_cert_file + + + deflate + + + medium + + + -1 + -1 + + + false + +``` + +## 組ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ {#grpc-client} + +æä¾›ã•ã‚Œã‚‹[仕様](https://github.com/ClickHouse/ClickHouse/blob/master/src/Server/grpc_protos/clickhouse_grpc.proto)を使用ã—ã¦ã€gRPCãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ä»»æ„ã®ãƒ—ログラミング言語ã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’開発ã§ãã¾ã™ã€‚ã¾ãŸã¯ã€çµ„ã¿è¾¼ã¿ã®Pythonクライアントを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒªãƒã‚¸ãƒˆãƒªå†…ã®[utils/grpc-client/clickhouse-grpc-client.py](https://github.com/ClickHouse/ClickHouse/blob/master/utils/grpc-client/clickhouse-grpc-client.py)ã«é…ç½®ã•ã‚Œã¦ã„ã¾ã™ã€‚組ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã¯ã€[grpcioã¨grpcio-tools](https://grpc.io/docs/languages/python/quickstart)ã®PythonモジュールãŒå¿…è¦ã§ã™ã€‚ + +クライアントã¯æ¬¡ã®å¼•æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +- `--help` – ヘルプメッセージを表示ã—ã¦çµ‚了ã—ã¾ã™ã€‚ +- `--host HOST, -h HOST` – サーãƒãƒ¼å。デフォルト値: `localhost`。IPv4ã¾ãŸã¯IPv6アドレスも使用ã§ãã¾ã™ã€‚ +- `--port PORT` – 接続ã™ã‚‹ãƒãƒ¼ãƒˆã€‚ã“ã®ãƒãƒ¼ãƒˆã¯ClickHouseサーãƒãƒ¼ã®è¨­å®šã§æœ‰åŠ¹ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆ`grpc_port`ã‚’å‚照)。デフォルト値: `9100`。 +- `--user USER_NAME, -u USER_NAME` – ユーザーå。デフォルト値: `default`。 +- `--password PASSWORD` – パスワード。デフォルト値: 空ã®æ–‡å­—列。 +- `--query QUERY, -q QUERY` – éžå¯¾è©±ãƒ¢ãƒ¼ãƒ‰ã§ä½¿ç”¨ã™ã‚‹ã‚¯ã‚¨ãƒªã€‚ +- `--database DATABASE, -d DATABASE` – デフォルトデータベース。指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šã§ã‚»ãƒƒãƒˆã•ã‚ŒãŸç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯`default`)。 +- `--format OUTPUT_FORMAT, -f OUTPUT_FORMAT` – çµæžœã®å‡ºåŠ›[å½¢å¼](formats.md)。対話モードã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤: `PrettyCompact`。 +- `--debug` – デãƒãƒƒã‚°æƒ…å ±ã®è¡¨ç¤ºã‚’有効ã«ã—ã¾ã™ã€‚ + +`--query`引数ãªã—ã§å‘¼ã³å‡ºã™ã“ã¨ã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’対話モードã§é–‹å§‹ã§ãã¾ã™ã€‚ + +ãƒãƒƒãƒãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€`stdin`を通ã˜ã¦ã‚¯ã‚¨ãƒªãƒ‡ãƒ¼ã‚¿ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**クライアント使用例** + +以下ã®ä¾‹ã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€CSVファイルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã—ã¾ã™ã€‚ãã®å¾Œã€ãƒ†ãƒ¼ãƒ–ルã®å†…容をクエリã—ã¾ã™ã€‚ + +``` bash +./clickhouse-grpc-client.py -q "CREATE TABLE grpc_example_table (id UInt32, text String) ENGINE = MergeTree() ORDER BY id;" +echo -e "0,Input data for\n1,gRPC protocol example" > a.csv +cat a.csv | ./clickhouse-grpc-client.py -q "INSERT INTO grpc_example_table FORMAT CSV" + +./clickhouse-grpc-client.py --format PrettyCompact -q "SELECT * FROM grpc_example_table;" +``` + +çµæžœï¼š + +``` text +┌─id─┬─text──────────────────┠+│ 0 │ Input data for │ +│ 1 │ gRPC protocol example │ +└────┴───────────────────────┘ +``` diff --git a/docs/ja/interfaces/http.md b/docs/ja/interfaces/http.md new file mode 100644 index 00000000000..f30e21d19f7 --- /dev/null +++ b/docs/ja/interfaces/http.md @@ -0,0 +1,872 @@ +--- +slug: /ja/interfaces/http +sidebar_position: 19 +sidebar_label: HTTP インターフェース +--- + +# HTTP インターフェース + +HTTP インターフェースを使用ã™ã‚‹ã¨ã€ClickHouse ã‚’ä»»æ„ã®ãƒ—ラットフォームã§ä»»æ„ã®ãƒ—ログラミング言語ã‹ã‚‰ REST API ã®å½¢å¼ã§åˆ©ç”¨ã§ãã¾ã™ã€‚HTTP インターフェースã¯ãƒã‚¤ãƒ†ã‚£ãƒ–インターフェースよりも制é™ãŒã‚ã‚Šã¾ã™ãŒã€è¨€èªžã‚µãƒãƒ¼ãƒˆãŒå„ªã‚Œã¦ã„ã¾ã™ã€‚ + +デフォルトã§ã¯ã€`clickhouse-server` 㯠HTTP ã®ãŸã‚ã«ãƒãƒ¼ãƒˆ 8123 ã§ãƒªã‚¹ãƒ³ã—ã¦ã„ã¾ã™ï¼ˆã“ã‚Œã¯è¨­å®šã§å¤‰æ›´å¯èƒ½ã§ã™ï¼‰ã€‚ +HTTPS も有効化å¯èƒ½ã§ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒãƒ¼ãƒˆã¯ 8443 ã§ã™ã€‚ + +パラメータãªã—㧠`GET /` リクエストを行ã†ã¨ã€200 ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚³ãƒ¼ãƒ‰ã¨ [http_server_default_response](../operations/server-configuration-parameters/settings.md#http_server_default_response) ã«å®šç¾©ã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€ŒOk.ã€ã®æ–‡å­—列(行末ã«æ”¹è¡Œä»˜ã)ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +``` bash +$ curl 'http://localhost:8123/' +Ok. +``` + +ã¾ãŸå‚ç…§ã—ã¦ãã ã•ã„: [HTTP レスãƒãƒ³ã‚¹ã‚³ãƒ¼ãƒ‰ã®æ³¨æ„事項](#http_response_codes_caveats)。 + +ユーザーã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã§ `curl` コマンドãŒåˆ©ç”¨ã§ããªã„å ´åˆã‚‚ã‚ã‚Šã¾ã™ã€‚Ubuntu ã‚„ Debian ã§ã¯ã€`sudo apt install curl` を実行ã—ã¦ãã ã•ã„。例を実行ã™ã‚‹å‰ã«ã€ã“ã®[ドキュメント](https://curl.se/download.html)ã‚’å‚ç…§ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¦ãã ã•ã„。 + +Web UI ã¯æ¬¡ã®URLã§ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™: `http://localhost:8123/play`。 + +![Web UI](../images/play.png) + +ヘルスãƒã‚§ãƒƒã‚¯ã‚¹ã‚¯ãƒªãƒ—トã§ã¯ `GET /ping` リクエストを使用ã—ã¾ã™ã€‚ã“ã®ãƒãƒ³ãƒ‰ãƒ©ã¯å¸¸ã«ã€ŒOk.ã€ï¼ˆè¡Œæœ«ã«æ”¹è¡Œä»˜ã)を返ã—ã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 18.12.13 ã‹ã‚‰åˆ©ç”¨å¯èƒ½ã§ã™ã€‚レプリカã®é…延をãƒã‚§ãƒƒã‚¯ã™ã‚‹ã«ã¯ `/replicas_status` ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +``` bash +$ curl 'http://localhost:8123/ping' +Ok. +$ curl 'http://localhost:8123/replicas_status' +Ok. +``` + +リクエストをURLã® `query` パラメータã¨ã—ã¦ã€ã¾ãŸã¯POSTã¨ã—ã¦é€ä¿¡ã—ã¾ã™ã€‚ã¾ãŸã¯ `query` パラメータã«ã‚¯ã‚¨ãƒªã®æœ€åˆã®éƒ¨åˆ†ã‚’é€ã‚Šã€æ®‹ã‚Šã‚’POSTã§é€ä¿¡ã—ã¾ã™ï¼ˆå¾Œã§ã“ã‚ŒãŒå¿…è¦ãªç†ç”±ã‚’説明ã—ã¾ã™ï¼‰ã€‚URLã®ã‚µã‚¤ã‚ºã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§1 MiBã«åˆ¶é™ã•ã‚Œã¦ãŠã‚Šã€ã“れ㯠`http_max_uri_size` 設定ã§å¤‰æ›´å¯èƒ½ã§ã™ã€‚ + +æˆåŠŸã™ã‚‹ã¨ã€200 ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚³ãƒ¼ãƒ‰ã¨ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãƒœãƒ‡ã‚£ã«çµæžœãŒè¿”ã•ã‚Œã¾ã™ã€‚ +エラーãŒç™ºç”Ÿã™ã‚‹ã¨ã€500 ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚³ãƒ¼ãƒ‰ã¨ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜Žæ–‡ãŒãƒ¬ã‚¹ãƒãƒ³ã‚¹ãƒœãƒ‡ã‚£ã«å«ã¾ã‚Œã¾ã™ã€‚ + +GET メソッドを使用ã™ã‚‹éš›ã¯ã€`readonly` ãŒè¨­å®šã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’修正ã™ã‚‹ã‚¯ã‚¨ãƒªã®å ´åˆã¯ã€POST メソッドã®ã¿ã‚’使用ã§ãã¾ã™ã€‚クエリ自体を POST ボディã¾ãŸã¯ URL パラメータã«é€ä¿¡ã§ãã¾ã™ã€‚ + +例: + +``` bash +$ curl 'http://localhost:8123/?query=SELECT%201' +1 + +$ wget -nv -O- 'http://localhost:8123/?query=SELECT 1' +1 + +$ echo -ne 'GET /?query=SELECT%201 HTTP/1.0\r\n\r\n' | nc localhost 8123 +HTTP/1.0 200 OK +Date: Wed, 27 Nov 2019 10:30:18 GMT +Connection: Close +Content-Type: text/tab-separated-values; charset=UTF-8 +X-ClickHouse-Server-Display-Name: clickhouse.ru-central1.internal +X-ClickHouse-Query-Id: 5abe861c-239c-467f-b955-8a201abb8b7f +X-ClickHouse-Summary: {"read_rows":"0","read_bytes":"0","written_rows":"0","written_bytes":"0","total_rows_to_read":"0","elapsed_ns":"662334"} + +1 +``` + +ã”覧ã®ã¨ãŠã‚Šã€`curl` ã¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’ URL エスケープã—ãªã‘ã‚Œã°ãªã‚‰ãšã€ã‚„ã‚„ä¸ä¾¿ã§ã™ã€‚ +`wget` ã¯ã™ã¹ã¦ã‚’自動ã§ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã—ã¾ã™ãŒã€ä¿æŒæŽ¥ç¶š `keep-alive` ã‚„ `Transfer-Encoding: chunked` を使ã†éš›ã« HTTP 1.1 ã§ã†ã¾ã動作ã—ãªã„ãŸã‚ã€ä½¿ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã›ã‚“。 + +``` bash +$ echo 'SELECT 1' | curl 'http://localhost:8123/' --data-binary @- +1 + +$ echo 'SELECT 1' | curl 'http://localhost:8123/?query=' --data-binary @- +1 + +$ echo '1' | curl 'http://localhost:8123/?query=SELECT' --data-binary @- +1 +``` + +一部ã®ã‚¯ã‚¨ãƒªãŒãƒ‘ラメータã¨ã—ã¦é€ä¿¡ã•ã‚Œã€ä¸€éƒ¨ãŒ POST ã§é€ä¿¡ã•ã‚Œã‚‹ã¨ã€ã“れらã®ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†é–“ã«æ”¹è¡ŒãŒæŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ +例(ã“ã‚Œã¯å‹•ä½œã—ã¾ã›ã‚“): + +``` bash +$ echo 'ECT 1' | curl 'http://localhost:8123/?query=SEL' --data-binary @- +Code: 59, e.displayText() = DB::Exception: Syntax error: failed at position 0: SEL +ECT 1 +, expected One of: SHOW TABLES, SHOW DATABASES, SELECT, INSERT, CREATE, ATTACH, RENAME, DROP, DETACH, USE, SET, OPTIMIZE., e.what() = DB::Exception +``` + +デフォルトã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯ [TabSeparated](formats.md#tabseparated) å½¢å¼ã§è¿”ã•ã‚Œã¾ã™ã€‚ + +クエリ㮠FORMAT å¥ã‚’使用ã—ã¦ã€ä»–ã®ä»»æ„ã®å½¢å¼ã‚’リクエストã§ãã¾ã™ã€‚ + +ã¾ãŸã¯ã€`default_format` URL パラメータã¾ãŸã¯ `X-ClickHouse-Format` ヘッダーを使用ã—ã¦ã€TabSeparated 以外ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå½¢å¼ã‚’指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +``` bash +$ echo 'SELECT 1 FORMAT Pretty' | curl 'http://localhost:8123/?' --data-binary @- +â”â”â”â”┓ +┃ 1 ┃ +┡â”â”â”┩ +│ 1 │ +└───┘ +``` + +`INSERT` クエリã§ã¯ãƒ‡ãƒ¼ã‚¿ã®é€ä¿¡ã« POST メソッドãŒå¿…è¦ã§ã™ã€‚ã“ã®å ´åˆã€ã‚¯ã‚¨ãƒªã®é–‹å§‹éƒ¨åˆ†ã‚’ URL パラメータã«æ›¸ãã€POST を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚挿入ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ã€ãŸã¨ãˆã° MySQL ã®ã‚¿ãƒ–区切りダンプã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã®ã‚ˆã†ã«ã—ã¦ã€`INSERT` クエリ㯠MySQL ã® `LOAD DATA LOCAL INFILE` ã‚’ç½®ãæ›ãˆã¾ã™ã€‚ + +**例** + +テーブルã®ä½œæˆ: + +``` bash +$ echo 'CREATE TABLE t (a UInt8) ENGINE = Memory' | curl 'http://localhost:8123/' --data-binary @- +``` + +ãŠãªã˜ã¿ã® INSERT クエリを使用ã—ãŸãƒ‡ãƒ¼ã‚¿æŒ¿å…¥: + +``` bash +$ echo 'INSERT INTO t VALUES (1),(2),(3)' | curl 'http://localhost:8123/' --data-binary @- +``` + +データをクエリã¨åˆ¥ã«é€ä¿¡: + +``` bash +$ echo '(4),(5),(6)' | curl 'http://localhost:8123/?query=INSERT%20INTO%20t%20VALUES' --data-binary @- +``` + +ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿å½¢å¼ã‚’指定ã§ãã¾ã™ã€‚「Valuesã€å½¢å¼ã¯ã€INSERT INTO t VALUES ã¨åŒã˜ã§ã™: + +``` bash +$ echo '(7),(8),(9)' | curl 'http://localhost:8123/?query=INSERT%20INTO%20t%20FORMAT%20Values' --data-binary @- +``` + +タブ区切りã®ãƒ€ãƒ³ãƒ—ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã«ã¯ã€å¯¾å¿œã™ã‚‹å½¢å¼ã‚’指定ã—ã¾ã™: + +``` bash +$ echo -ne '10\n11\n12\n' | curl 'http://localhost:8123/?query=INSERT%20INTO%20t%20FORMAT%20TabSeparated' --data-binary @- +``` + +テーブル内容を読ã¿å‡ºã—ã¾ã™ã€‚データã¯ä¸¦åˆ—クエリ処ç†ã«ã‚ˆã‚Šãƒ©ãƒ³ãƒ€ãƒ ãªé †åºã§å‡ºåŠ›ã•ã‚Œã¾ã™: + +``` bash +$ curl 'http://localhost:8123/?query=SELECT%20a%20FROM%20t' +7 +8 +9 +10 +11 +12 +1 +2 +3 +4 +5 +6 +``` + +テーブルを削除ã—ã¾ã™ã€‚ + +``` bash +$ echo 'DROP TABLE t' | curl 'http://localhost:8123/' --data-binary @- +``` + +データテーブルを返ã•ãªã„æˆåŠŸã—ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å ´åˆã€ç©ºã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãƒœãƒ‡ã‚£ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + + +## 圧縮 {#compression} + +大é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹éš›ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’削減ã—ãŸã‚Šã€åœ§ç¸®æ¸ˆã¿ã®ãƒ€ãƒ³ãƒ—を作æˆã™ã‚‹ãŸã‚ã«åœ§ç¸®ã‚’使用ã§ãã¾ã™ã€‚ + +データをé€ä¿¡ã™ã‚‹éš›ã«ã€ClickHouse ã®å†…部圧縮形å¼ã‚’使用ã§ãã¾ã™ã€‚圧縮データã¯éžæ¨™æº–ã®å½¢å¼ã‚’æŒã¡ã€`clickhouse-compressor` プログラムを使用ã—ã¦æ“作ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れ㯠`clickhouse-client` パッケージã¨ã¨ã‚‚ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¾ã™ã€‚データ挿入ã®åŠ¹çŽ‡ã‚’高ã‚ã‚‹ãŸã‚ã«ã€[http_native_compression_disable_checksumming_on_decompress](../operations/settings/settings.md#http_native_compression_disable_checksumming_on_decompress) 設定を使用ã—ã¦ã‚µãƒ¼ãƒãƒ¼å´ã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ æ¤œè¨¼ã‚’無効ã«ã§ãã¾ã™ã€‚ + +URLã« `compress=1` を指定ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã¯é€ä¿¡ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’圧縮ã—ã¾ã™ã€‚URLã« `decompress=1` を指定ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã¯ POST 方法ã§æ¸¡ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’解å‡ã—ã¾ã™ã€‚ + +ã¾ãŸã€[HTTP圧縮](https://en.wikipedia.org/wiki/HTTP_compression)を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ClickHouse ã¯æ¬¡ã®[圧縮方å¼](https://en.wikipedia.org/wiki/HTTP_compression#Content-Encoding_tokens)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: + +- `gzip` +- `br` +- `deflate` +- `xz` +- `zstd` +- `lz4` +- `bz2` +- `snappy` + +圧縮ã•ã‚ŒãŸ `POST` リクエストをé€ä¿¡ã™ã‚‹ã«ã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒ˜ãƒƒãƒ€ãƒ¼ `Content-Encoding: compression_method` を追加ã—ã¾ã™ã€‚ +ClickHouse ã«å¿œç­”を圧縮ã•ã›ã‚‹ãŸã‚ã«ã¯ã€[enable_http_compression](../operations/settings/settings.md#enable_http_compression) 設定ã§åœ§ç¸®ã‚’有効化ã—ã€`Accept-Encoding: compression_method` ヘッダーをリクエストã«è¿½åŠ ã—ã¦ãã ã•ã„。全ã¦ã®åœ§ç¸®æ–¹æ³•ã«å¯¾ã™ã‚‹ãƒ‡ãƒ¼ã‚¿åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã¯ [http_zlib_compression_level](../operations/settings/settings.md#http_zlib_compression_level) 設定ã§è¨­å®šå¯èƒ½ã§ã™ã€‚ + +:::info +一部㮠HTTP クライアントã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’解å‡ã™ã‚‹å ´åˆãŒã‚り(`gzip` ã‚„ `deflate`)ã€æ­£ã—ã圧縮設定を使用ã—ãŸå ´åˆã§ã‚‚解å‡æ¸ˆã¿ã®ãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**例** + +``` bash +# 圧縮データをサーãƒãƒ¼ã«é€ä¿¡ã™ã‚‹ +$ echo "SELECT 1" | gzip -c | \ + curl -sS --data-binary @- -H 'Content-Encoding: gzip' 'http://localhost:8123/' +``` + +``` bash +# サーãƒãƒ¼ã‹ã‚‰åœ§ç¸®ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã‚’å—ã‘å–ã‚‹ +$ curl -vsS "http://localhost:8123/?enable_http_compression=1" \ + -H 'Accept-Encoding: gzip' --output result.gz -d 'SELECT number FROM system.numbers LIMIT 3' +$ zcat result.gz +0 +1 +2 +``` + +```bash +# サーãƒãƒ¼ã‹ã‚‰åœ§ç¸®ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘å–ã‚Šã€gunzipを使用ã—ã¦è§£å‡ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘å–ã‚‹ +$ curl -sS "http://localhost:8123/?enable_http_compression=1" \ + -H 'Accept-Encoding: gzip' -d 'SELECT number FROM system.numbers LIMIT 3' | gunzip - +0 +1 +2 +``` + +## デフォルトデータベース {#default-database} + +`database` URL パラメータã¾ãŸã¯ `X-ClickHouse-Database` ヘッダーを使用ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’指定ã§ãã¾ã™ã€‚ + +``` bash +$ echo 'SELECT number FROM numbers LIMIT 10' | curl 'http://localhost:8123/?database=system' --data-binary @- +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +``` + +デフォルトã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šã«ç™»éŒ²ã•ã‚Œã¦ã„るデータベースãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯ã€Œdefaultã€ã¨ã„ã†åå‰ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã™ã€‚ã‚ã‚‹ã„ã¯ã€å¸¸ã«ãƒ†ãƒ¼ãƒ–ルåã®å‰ã«ãƒ‰ãƒƒãƒˆã‚’付ã‘ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +ユーザーåã¨ãƒ‘スワードã¯æ¬¡ã®æ–¹æ³•ã®ã„ãšã‚Œã‹ã§æŒ‡å®šã§ãã¾ã™: + +1. HTTP 基本èªè¨¼ã‚’使用ã—ã¾ã™ã€‚例: + + + +``` bash +$ echo 'SELECT 1' | curl 'http://user:password@localhost:8123/' -d @- +``` + +2. `user` ãŠã‚ˆã³ `password` URL パラメータã§æŒ‡å®šã™ã‚‹ï¼ˆ*ã“ã®æ–¹æ³•ã¯ã€ãƒ‘ラメータãŒã‚¦ã‚§ãƒ–プロキシã«ã‚ˆã£ã¦ãƒ­ã‚°è¨˜éŒ²ã•ã‚Œã€ãƒ–ラウザã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚推奨ã•ã‚Œã¾ã›ã‚“*)。例: + + + +``` bash +$ echo 'SELECT 1' | curl 'http://localhost:8123/?user=user&password=password' -d @- +``` + +3. `X-ClickHouse-User` ãŠã‚ˆã³ `X-ClickHouse-Key` ヘッダーを使用ã—ã¾ã™ã€‚例: + + + +``` bash +$ echo 'SELECT 1' | curl -H 'X-ClickHouse-User: user' -H 'X-ClickHouse-Key: password' 'http://localhost:8123/' -d @- +``` + +ユーザーåãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€`default` åãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚パスワードãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ç©ºã®ãƒ‘スワードãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +ã¾ãŸã€å•ã„åˆã‚ã›ã®å‡¦ç†ã«é–¢ã™ã‚‹ä»»æ„ã®è¨­å®šã‚„設定プロファイル全体を URL パラメータã§æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚例: http://localhost:8123/?profile=web&max_rows_to_read=1000000000&query=SELECT+1 + +詳細ã«ã¤ã„ã¦ã¯ã€[設定](../operations/settings/index.md)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +``` bash +$ echo 'SELECT number FROM system.numbers LIMIT 10' | curl 'http://localhost:8123/?' --data-binary @- +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +``` + +ãã®ä»–ã®ãƒ‘ラメータã«ã¤ã„ã¦ã¯ã€ã€ŒSETã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +åŒæ§˜ã«ã€HTTP プロトコル㧠ClickHouse セッションを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れを行ã†ã«ã¯ã€`session_id` GET パラメータをリクエストã«è¿½åŠ ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ä»»æ„ã®æ–‡å­—列をセッション ID ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚デフォルトã§ã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–状態㌠60 秒続ãã¨çµ‚了ã—ã¾ã™ã€‚ã“ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚’変更ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼æ§‹æˆã§ `default_session_timeout` 設定を変更ã™ã‚‹ã‹ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã« `session_timeout` GET パラメータを追加ã—ã¾ã™ã€‚セッションステータスを確èªã™ã‚‹ã«ã¯ã€`session_check=1` パラメータを使用ã—ã¾ã™ã€‚å˜ä¸€ã‚»ãƒƒã‚·ãƒ§ãƒ³å†…ã§ã¯ã€ä¸€åº¦ã«ä¸€ã¤ã®ã‚¯ã‚¨ãƒªã—ã‹å®Ÿè¡Œã§ãã¾ã›ã‚“。 + +クエリã®é€²è¡ŒçŠ¶æ³ã«ã¤ã„ã¦ã®æƒ…報を `X-ClickHouse-Progress` レスãƒãƒ³ã‚¹ãƒ˜ãƒƒãƒ€ãƒ¼ã§å—ä¿¡ã§ãã¾ã™ã€‚ã“れを行ã†ã«ã¯ã€[send_progress_in_http_headers](../operations/settings/settings.md#send_progress_in_http_headers) を有効ã«ã—ã¾ã™ã€‚ヘッダーシーケンスã®ä¾‹: + +``` text +X-ClickHouse-Progress: {"read_rows":"2752512","read_bytes":"240570816","total_rows_to_read":"8880128","elapsed_ns":"662334"} +X-ClickHouse-Progress: {"read_rows":"5439488","read_bytes":"482285394","total_rows_to_read":"8880128","elapsed_ns":"992334"} +X-ClickHouse-Progress: {"read_rows":"8783786","read_bytes":"819092887","total_rows_to_read":"8880128","elapsed_ns":"1232334"} +``` + +å¯èƒ½ãªãƒ˜ãƒƒãƒ€ãƒ¼ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰: + +- `read_rows` — 読ã¿å–ã£ãŸè¡Œæ•°ã€‚ +- `read_bytes` — ãƒã‚¤ãƒˆå˜ä½ã§èª­ã¿å–ã£ãŸãƒ‡ãƒ¼ã‚¿ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã€‚ +- `total_rows_to_read` — 読ã¿å–ã‚‹ã¹ãç·è¡Œæ•°ã€‚ +- `written_rows` — 書ãè¾¼ã¾ã‚ŒãŸè¡Œæ•°ã€‚ +- `written_bytes` — ãƒã‚¤ãƒˆå˜ä½ã§æ›¸ãè¾¼ã¾ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã€‚ + +実行中ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã€HTTP 接続ãŒå¤±ã‚ã‚Œã¦ã‚‚自動的ã«ã¯åœæ­¢ã—ã¾ã›ã‚“。解æžã¨ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã‚µãƒ¼ãƒãƒ¼å´ã§å®Ÿè¡Œã•ã‚Œã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®ä½¿ç”¨ãŒéžåŠ¹çŽ‡çš„ã«ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +オプション㮠`query_id` パラメータã¯ã‚¯ã‚¨ãƒª ID(任æ„ã®æ–‡å­—列)ã¨ã—ã¦æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€ã€Œè¨­å®šã€replace_running_queryã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +オプション㮠`quota_key` パラメータã¯ã€ã‚¯ã‚©ãƒ¼ã‚¿ã‚­ãƒ¼ã¨ã—ã¦ï¼ˆä»»æ„ã®æ–‡å­—列)渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€ã€Œã‚¯ã‚©ãƒ¼ã‚¿ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +HTTP インターフェースã¯ã€ã‚¯ã‚¨ãƒªã®ãŸã‚ã«å¤–部データ(外部一時テーブル)を渡ã™ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€ã€Œã‚¯ã‚¨ãƒªå‡¦ç†ã®ãŸã‚ã®å¤–部データã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## レスãƒãƒ³ã‚¹ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚° {#response-buffering} + +サーãƒãƒ¼å´ã§ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã‚’有効ã«ã§ãã¾ã™ã€‚ã“ã®ç›®çš„ã®ãŸã‚ã« `buffer_size` 㨠`wait_end_of_query` URL パラメータãŒæä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ +ã¾ãŸã¯ã€è¨­å®š `http_response_buffer_size` 㨠`http_wait_end_of_query` を使用ã§ãã¾ã™ã€‚ + +`buffer_size` ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒ¡ãƒ¢ãƒªå†…ã§ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã™ã‚‹çµæžœã®ãƒã‚¤ãƒˆæ•°ã‚’決定ã—ã¾ã™ã€‚çµæžœæœ¬ä½“ãŒã“ã®ã—ãã„値を超ãˆã‚‹å ´åˆã€ãƒãƒƒãƒ•ã‚¡ã¯ HTTP ãƒãƒ£ãƒãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã€æ®‹ã‚Šã®ãƒ‡ãƒ¼ã‚¿ã¯ç›´æŽ¥ HTTP ãƒãƒ£ãƒãƒ«ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +レスãƒãƒ³ã‚¹å…¨ä½“ãŒãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã•ã‚Œã‚‹ã‚ˆã†ã«ã™ã‚‹ã«ã¯ã€`wait_end_of_query=1` を設定ã—ã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ¡ãƒ¢ãƒªã«ä¿å­˜ã•ã‚Œãªã„データã¯ä¸€æ™‚çš„ãªã‚µãƒ¼ãƒãƒ¼ãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +例: + +``` bash +$ curl -sS 'http://localhost:8123/?max_result_bytes=4000000&buffer_size=3000000&wait_end_of_query=1' -d 'SELECT toUInt8(number) FROM system.numbers LIMIT 9000000 FORMAT RowBinary' +``` + +ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã‚’使用ã—ã¦ã€ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚³ãƒ¼ãƒ‰ã¨ HTTP ヘッダーãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã•ã‚ŒãŸå¾Œã«ã‚¯ã‚¨ãƒªå‡¦ç†ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã®çŠ¶æ³ã‚’回é¿ã—ã¾ã™ã€‚ã“ã®çŠ¶æ³ã§ã¯ã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒãƒ¬ã‚¹ãƒãƒ³ã‚¹æœ¬ä½“ã®æœ«å°¾ã«æ›¸ãè¾¼ã¾ã‚Œã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§ã¯è§£æžæ®µéšŽã§ã®ã¿ã‚¨ãƒ©ãƒ¼ã‚’検出ã§ãã¾ã™ã€‚ + +## クエリパラメータã«ã‚ˆã‚‹ãƒ­ãƒ¼ãƒ«è¨­å®š {#setting-role-with-query-parameters} + +ã“れ㯠ClickHouse 24.4 ã«è¿½åŠ ã•ã‚ŒãŸæ–°æ©Ÿèƒ½ã§ã™ã€‚ + +特定ã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€æ–‡è‡ªä½“を実行ã™ã‚‹å‰ã«ä»˜ä¸Žã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã‚’設定ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +ã—ã‹ã—ã€`SET ROLE` ã¨æ–‡ã‚’一緒ã«é€ä¿¡ã™ã‚‹ã“ã¨ã¯ä¸å¯èƒ½ã§ã™ã€‚マルãƒã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“: + +``` +curl -sS "http://localhost:8123" --data-binary "SET ROLE my_role;SELECT * FROM my_table;" +``` + +ã“ã®çµæžœã€æ¬¡ã®ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™: + +``` +Code: 62. DB::Exception: Syntax error (Multi-statements are not allowed) +``` + +ã“ã®åˆ¶é™ã‚’å…‹æœã™ã‚‹ãŸã‚ã«ã€`role` クエリパラメータを使用ã§ãã¾ã™: + +``` +curl -sS "http://localhost:8123?role=my_role" --data-binary "SELECT * FROM my_table;" +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€æ–‡ã®å‰ã« `SET ROLE my_role` を実行ã™ã‚‹ã®ã¨åŒç­‰ã«ãªã‚Šã¾ã™ã€‚ + +ã•ã‚‰ã«ã€è¤‡æ•°ã® `role` クエリパラメータを指定ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™: + +``` +curl -sS "http://localhost:8123?role=my_role&role=my_other_role" --data-binary "SELECT * FROM my_table;" +``` + +ã“ã®å ´åˆã€`?role=my_role&role=my_other_role` ã¯æ–‡ã®å‰ã« `SET ROLE my_role, my_other_role` を実行ã™ã‚‹ã®ã¨åŒæ§˜ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +## HTTP レスãƒãƒ³ã‚¹ã‚³ãƒ¼ãƒ‰ã®æ³¨æ„事項 {#http_response_codes_caveats} + +HTTP プロトコルã®åˆ¶é™ã®ãŸã‚ã€HTTP 200 ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚³ãƒ¼ãƒ‰ã¯ã‚¯ã‚¨ãƒªãŒæˆåŠŸã—ãŸã“ã¨ã‚’ä¿è¨¼ã—ã¾ã›ã‚“。 + +例を示ã—ã¾ã™: + +``` +curl -v -Ss "http://localhost:8123/?max_block_size=1&query=select+sleepEachRow(0.001),throwIf(number=2)from+numbers(5)" +* Trying 127.0.0.1:8123... +... +< HTTP/1.1 200 OK +... +Code: 395. DB::Exception: Value passed to 'throwIf' function is non-zero: while executing 'FUNCTION throwIf(equals(number, 2) :: 1) -> throwIf(equals(number, 2)) +``` + +ã“ã®å‹•ä½œã®åŽŸå› ã¯ HTTP プロトコルã®ç‰¹æ€§ã«ã‚ˆã‚‹ã‚‚ã®ã§ã™ã€‚HTTP ヘッダーãŒæœ€åˆã« HTTP コード 200 ã§é€ä¿¡ã•ã‚Œã€ç¶šã„㦠HTTP 本体ãŒé€ä¿¡ã•ã‚Œã€ã‚¨ãƒ©ãƒ¼ãŒãƒ—レーンテキストã¨ã—ã¦æœ¬ä½“ã«æ³¨å…¥ã•ã‚Œã¾ã™ã€‚ +ã“ã®å‹•ä½œã¯ã€ä½¿ç”¨ã•ã‚Œã‚‹å½¢å¼ã«é–¢ä¿‚ãªãã€`Native`ã€`TSV`ã€`JSON` ã®ã„ãšã‚Œã§ã‚ã£ã¦ã‚‚ã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚¹ãƒˆãƒªãƒ¼ãƒ ã®é€”中ã«å¸¸ã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ +ã“ã®å•é¡Œã‚’軽減ã™ã‚‹ã«ã¯ã€[レスãƒãƒ³ã‚¹ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°](#response-buffering)を有効ã«ã—ã¦ãã ã•ã„。ã“ã®å ´åˆã€HTTP ヘッダーã®é€ä¿¡ãŒã‚¯ã‚¨ãƒªå…¨ä½“ãŒè§£æ±ºã•ã‚Œã‚‹ã¾ã§é…延ã—ã¾ã™ã€‚ +ãŸã ã—ã€ã“ã‚Œã§ã¯å•é¡ŒãŒå®Œå…¨ã«è§£æ±ºã•ã‚Œã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。çµæžœãŒ `http_response_buffer_size` ã«åŽã¾ã‚‰ãªã‘ã‚Œã°ãªã‚‰ãšã€`send_progress_in_http_headers` ã®ã‚ˆã†ãªä»–ã®è¨­å®šãŒãƒ˜ãƒƒãƒ€ãƒ¼ã®é…延ã«å¹²æ¸‰ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +ã™ã¹ã¦ã®ã‚¨ãƒ©ãƒ¼ã‚’キャッãƒã™ã‚‹å”¯ä¸€ã®æ–¹æ³•ã¯ã€å¿…è¦ãªå½¢å¼ã‚’使用ã—ã¦è§£æžã™ã‚‹å‰ã« HTTP 本体を分æžã™ã‚‹ã“ã¨ã§ã™ã€‚ + +## パラメータをæŒã¤ã‚¯ã‚¨ãƒª {#cli-queries-with-parameters} + +パラメータをæŒã¤ã‚¯ã‚¨ãƒªã‚’作æˆã—ã€ãれらã«å¯¾å¿œã™ã‚‹ HTTP リクエストパラメータã‹ã‚‰å€¤ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚詳ã—ã㯠[CLI 用ã®ãƒ‘ラメータ付ãクエリ](../interfaces/cli.md#cli-queries-with-parameters) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### 例 {#example} + +``` bash +$ curl -sS "
    ?param_id=2¶m_phrase=test" -d "SELECT * FROM table WHERE int_column = {id:UInt8} and string_column = {phrase:String}" +``` + +### URL パラメータ内ã®ã‚¿ãƒ– + +クエリパラメータã¯ã€Œã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã€å½¢å¼ã‹ã‚‰è§£æžã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã¯ã€`\N` ã¨ã—ã¦ãƒŒãƒ«ã‚’明確ã«è§£æžã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã¨ã„ã†åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚¿ãƒ–文字㯠`\t`(ã¾ãŸã¯ `\` ã¨ã‚¿ãƒ–)ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€æ¬¡ã®ä¾‹ã§ã¯ `abc` 㨠`123` ã®é–“ã«å®Ÿéš›ã®ã‚¿ãƒ–ãŒå«ã¾ã‚Œã¦ãŠã‚Šã€å…¥åŠ›æ–‡å­—列ãŒ2ã¤ã®å€¤ã«åˆ†å‰²ã•ã‚Œã¾ã™: + +```bash +curl -sS "http://localhost:8123" -d "SELECT splitByChar('\t', 'abc 123')" +``` + +```response +['abc','123'] +``` + +ã—ã‹ã—ã€URLパラメータã§å®Ÿéš›ã®ã‚¿ãƒ–ã‚’ `%09` を使用ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã—よã†ã¨ã™ã‚‹ã¨ã€æ­£ã—ã解æžã•ã‚Œã¾ã›ã‚“: + +```bash +curl -sS "http://localhost:8123?param_arg1=abc%09123" -d "SELECT splitByChar('\t', {arg1:String})" +Code: 457. DB::Exception: Value abc 123 cannot be parsed as String for query parameter 'arg1' because it isn't parsed completely: only 3 of 7 bytes was parsed: abc. (BAD_QUERY_PARAMETER) (version 23.4.1.869 (official build)) +``` + +URLパラメータを使用ã™ã‚‹å ´åˆã€`\t` ã‚’ `%5C%09` ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°: + +```bash +curl -sS "http://localhost:8123?param_arg1=abc%5C%09123" -d "SELECT splitByChar('\t', {arg1:String})" +``` + +```response +['abc','123'] +``` + +## 事å‰å®šç¾©ã•ã‚ŒãŸ HTTP インターフェース {#predefined_http_interface} + +ClickHouse 㯠HTTP インターフェースを介ã—ã¦ç‰¹å®šã®ã‚¯ã‚¨ãƒªã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚例ãˆã°ã€æ¬¡ã®ã‚ˆã†ã«ã—ã¦ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むã“ã¨ãŒã§ãã¾ã™: + +``` bash +$ echo '(4),(5),(6)' | curl 'http://localhost:8123/?query=INSERT%20INTO%20t%20VALUES' --data-binary @- +``` + +ClickHouse ã¯ã€[Prometheus エクスãƒãƒ¼ã‚¿ãƒ¼](https://github.com/ClickHouse/clickhouse_exporter)ã®ã‚ˆã†ãªã‚µãƒ¼ãƒ‰ãƒ‘ーティツールã¨ç°¡å˜ã«çµ±åˆã§ãる事å‰å®šç¾©ã•ã‚ŒãŸ HTTP インターフェースもサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +例: + +- ã¾ãšã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«æ¬¡ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’追加ã—ã¾ã™: + + + +``` xml + + + /predefined_query + POST,GET + + predefined_query_handler + SELECT * FROM system.metrics LIMIT 5 FORMAT Template SETTINGS format_template_resultset = 'prometheus_template_output_format_resultset', format_template_row = 'prometheus_template_output_format_row', format_template_rows_between_delimiter = '\n' + + + ... + ... + +``` + +- Prometheus å½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’直接リクエストã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + + + +``` bash +$ curl -v 'http://localhost:8123/predefined_query' +* Trying ::1... +* Connected to localhost (::1) port 8123 (#0) +> GET /predefined_query HTTP/1.1 +> Host: localhost:8123 +> User-Agent: curl/7.47.0 +> Accept: */* +> +< HTTP/1.1 200 OK +< Date: Tue, 28 Apr 2020 08:52:56 GMT +< Connection: Keep-Alive +< Content-Type: text/plain; charset=UTF-8 +< X-ClickHouse-Server-Display-Name: i-mloy5trc +< Transfer-Encoding: chunked +< X-ClickHouse-Query-Id: 96fe0052-01e6-43ce-b12a-6b7370de6e8a +< X-ClickHouse-Format: Template +< X-ClickHouse-Timezone: Asia/Shanghai +< Keep-Alive: timeout=10 +< X-ClickHouse-Summary: {"read_rows":"0","read_bytes":"0","written_rows":"0","written_bytes":"0","total_rows_to_read":"0","elapsed_ns":"662334"} +< +# HELP "Query" "Number of executing queries" +# TYPE "Query" counter +"Query" 1 + +# HELP "Merge" "Number of executing background merges" +# TYPE "Merge" counter +"Merge" 0 + +# HELP "PartMutation" "Number of mutations (ALTER DELETE/UPDATE)" +# TYPE "PartMutation" counter +"PartMutation" 0 + +# HELP "ReplicatedFetch" "Number of data parts being fetched from replica" +# TYPE "ReplicatedFetch" counter +"ReplicatedFetch" 0 + +# HELP "ReplicatedSend" "Number of data parts being sent to replicas" +# TYPE "ReplicatedSend" counter +"ReplicatedSend" 0 + +* Connection #0 to host localhost left intact + +* Connection #0 to host localhost left intact +``` + +例ã‹ã‚‰ã‚‚ã‚ã‹ã‚‹ã‚ˆã†ã«ã€`http_handlers` ㌠config.xml ファイルã§è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`http_handlers` ã«ã¯å¤šãã® `rules` ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouse ã¯å—ä¿¡ã—ãŸHTTPリクエストを事å‰å®šç¾©ã•ã‚ŒãŸåž‹ã¨ä¸€è‡´ã•ã›ã€ä¸€è‡´ã™ã‚Œã°æœ€åˆã®å‡¦ç†ãŒå®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ãã—ã¦ã€ClickHouse ã¯ä¸€è‡´ãŒæˆåŠŸã—ãŸå ´åˆã«å¯¾å¿œã™ã‚‹äº‹å‰å®šç¾©ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ + +ç¾åœ¨ã€`rule` 㯠`method`ã€`headers`ã€`url`ã€`handler` を設定ã§ãã¾ã™: +- `method` 㯠HTTP リクエストã®ãƒ¡ã‚½ãƒƒãƒ‰éƒ¨åˆ†ã‚’マッãƒãƒ³ã‚°ã™ã‚‹å½¹å‰²ã‚’æŒã¡ã¾ã™ã€‚`method` 㯠HTTP プロトコルã§ã®[メソッド](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) ã®å®šç¾©ã‚’完全ã«éµå®ˆã—ã¦ã„ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã‚ªãƒ—ションã§ã™ã€‚設定ファイルã«å®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã€HTTP リクエストã®ãƒ¡ã‚½ãƒƒãƒ‰éƒ¨åˆ†ã¨ã¯ä¸€è‡´ã—ã¾ã›ã‚“。 + +- `url` 㯠HTTP リクエスト㮠URL 部分をマッãƒãƒ³ã‚°ã™ã‚‹å½¹å‰²ã‚’æŒã¡ã€[RE2](https://github.com/google/re2) ã®æ­£è¦è¡¨ç¾ã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã¯ã‚ªãƒ—ションã§ã™ã€‚設定ファイルã«å®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã€HTTP リクエスト㮠URL 部分ã¨ã¯ä¸€è‡´ã—ã¾ã›ã‚“。 + +- `headers` 㯠HTTP リクエストã®ãƒ˜ãƒƒãƒ€ãƒ¼éƒ¨åˆ†ã‚’マッãƒãƒ³ã‚°ã™ã‚‹å½¹å‰²ã‚’æŒã¡ã€RE2 ã®æ­£è¦è¡¨ç¾ã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã¯ã‚ªãƒ—ションã§ã™ã€‚設定ファイルã«å®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã€HTTP リクエストã®ãƒ˜ãƒƒãƒ€ãƒ¼éƒ¨åˆ†ã¨ã¯ä¸€è‡´ã—ã¾ã›ã‚“。 + +- `handler` ã¯ãƒ¡ã‚¤ãƒ³ã®å‡¦ç†éƒ¨åˆ†ã‚’å«ã¿ã¾ã™ã€‚ç¾åœ¨ã€`handler` 㯠`type`ã€`status`ã€`content_type`ã€`http_response_headers`ã€`response_content`ã€`query`ã€`query_param_name` を設定ã§ãã¾ã™ã€‚ + `type` ã¯ç¾åœ¨ã€æ¬¡ã®3種類をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: [predefined_query_handler](#predefined_query_handler)ã€[dynamic_query_handler](#dynamic_query_handler)ã€[static](#static)。 + + - `query` — `predefined_query_handler` タイプã§ä½¿ç”¨ã•ã‚Œã€ãƒãƒ³ãƒ‰ãƒ©ãŒå‘¼ã³å‡ºã•ã‚ŒãŸã¨ãã«ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ + + - `query_param_name` — `dynamic_query_handler` タイプã§ä½¿ç”¨ã•ã‚Œã€HTTP リクエストパラメータ内㮠`query_param_name` 値ã«å¯¾å¿œã™ã‚‹å€¤ã‚’抽出ã—ã¦å®Ÿè¡Œã—ã¾ã™ã€‚ + + - `status` — `static` タイプã§ä½¿ç”¨ã•ã‚Œã€ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’è¿”ã—ã¾ã™ã€‚ + + - `content_type` — ã©ã®ã‚¿ã‚¤ãƒ—ã§ã‚‚使用å¯èƒ½ã§ã™ã€‚レスãƒãƒ³ã‚¹ã®[コンテンツタイプ](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type)ã‚’è¿”ã—ã¾ã™ã€‚ + + - `http_response_headers` — ã©ã®ã‚¿ã‚¤ãƒ—ã§ã‚‚使用å¯èƒ½ã§ã™ã€‚レスãƒãƒ³ã‚¹ãƒ˜ãƒƒãƒ€ãƒ¼ã®ãƒžãƒƒãƒ—ã§ã™ã€‚コンテンツタイプを設定ã™ã‚‹ã«ã‚‚使用ã§ãã¾ã™ã€‚ + + - `response_content` — `static` タイプã§ä½¿ç”¨ã•ã‚Œã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã•ã‚Œã‚‹ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã§ã™ã€‚接頭辞 'file://' ã¾ãŸã¯ 'config://' を使用ã™ã‚‹å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã™ã‚‹ã‚³ãƒ³ãƒ†ãƒ³ãƒ„をファイルã¾ãŸã¯è¨­å®šã‹ã‚‰æŽ¢ã—ã¾ã™ã€‚ + +次ã«ã€ç•°ãªã‚‹ `type` ã«å¯¾ã™ã‚‹è¨­å®šæ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚ + +### predefined_query_handler {#predefined_query_handler} + +`predefined_query_handler` 㯠`Settings` ãŠã‚ˆã³ `query_params` 値を設定ã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚`predefined_query_handler` タイプ㧠`query` を設定ã§ãã¾ã™ã€‚ + +`query` ã®å€¤ã¯ã€`predefined_query_handler` ã®äº‹å‰å®šç¾©ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã§ã‚ã‚Šã€HTTP リクエストãŒãƒžãƒƒãƒã—ãŸã¨ãã« ClickHouse ã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã€ã‚¯ã‚¨ãƒªã®çµæžœãŒè¿”ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯å¿…é ˆã®è¨­å®šã§ã™ã€‚ + +次ã®ä¾‹ã§ã¯ã€[max_threads](../operations/settings/settings.md#max_threads) ãŠã‚ˆã³ `max_final_threads` 設定ã®å€¤ã‚’定義ã—ã€ãれらã®è¨­å®šãŒæ­£å¸¸ã«è¨­å®šã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’クエリã§ç¢ºèªã—ã¾ã™ã€‚ + +:::æ³¨æ„ +デフォルト㮠`handlers` ã§ã‚ã‚‹ `query`ã€`play`ã€`ping` ã‚’ä¿æŒã™ã‚‹ã«ã¯ã€`` ルールを追加ã—ã¦ãã ã•ã„。 +::: + +例: + +``` xml + + + [^/]+)]]> + GET + + TEST_HEADER_VALUE + [^/]+)]]> + + + predefined_query_handler + + SELECT name, value FROM system.settings + WHERE name IN ({name_1:String}, {name_2:String}) + + + + + +``` + +``` bash +$ curl -H 'XXX:TEST_HEADER_VALUE' -H 'PARAMS_XXX:max_final_threads' 'http://localhost:8123/query_param_with_url/max_threads?max_threads=1&max_final_threads=2' +max_final_threads 2 +max_threads 1 +``` + +:::æ³¨æ„ +1 ã¤ã® `predefined_query_handler` ã«ã¯ 1 ã¤ã® `query` ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +### dynamic_query_handler {#dynamic_query_handler} + +`dynamic_query_handler` ã§ã¯ã€ã‚¯ã‚¨ãƒªã¯ HTTP リクエストã®ãƒ‘ラメータã®å½¢ã§æ›¸ã‹ã‚Œã¦ã„ã¾ã™ã€‚`predefined_query_handler` ã§ã¯ã€ã‚¯ã‚¨ãƒªã¯è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ã‹ã‚Œã¦ã„ã¾ã™ã€‚`dynamic_query_handler` 㧠`query_param_name` を設定ã§ãã¾ã™ã€‚ + +ClickHouse 㯠HTTP リクエスト URL ã§ã® `query_param_name` ã®å€¤ã«å¯¾å¿œã™ã‚‹å€¤ã‚’抽出ã—ã¦å®Ÿè¡Œã—ã¾ã™ã€‚`query_param_name` ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ `/query` ã§ã™ã€‚ã“ã‚Œã¯ã‚ªãƒ—ションã®è¨­å®šã§ã™ã€‚設定ファイルã«å®šç¾©ãŒãªã„å ´åˆã€ãƒ‘ラメータã¯æ¸¡ã•ã‚Œã¾ã›ã‚“。 + +ã“ã®æ©Ÿèƒ½ã‚’試ã™ãŸã‚ã«ã€ä¾‹ã§ã¯ [max_threads](../operations/settings/settings.md#max_threads) ãŠã‚ˆã³ `max_final_threads` ã®å€¤ã‚’定義ã—ã€è¨­å®šãŒæ­£å¸¸ã«è¨­å®šã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’クエリã—ã¾ã™ã€‚ + +例: + +``` xml + + + + TEST_HEADER_VALUE_DYNAMIC + + dynamic_query_handler + query_param + + + + +``` + +``` bash +$ curl -H 'XXX:TEST_HEADER_VALUE_DYNAMIC' 'http://localhost:8123/own?max_threads=1&max_final_threads=2¶m_name_1=max_threads¶m_name_2=max_final_threads&query_param=SELECT%20name,value%20FROM%20system.settings%20where%20name%20=%20%7Bname_1:String%7D%20OR%20name%20=%20%7Bname_2:String%7D' +max_threads 1 +max_final_threads 2 +``` + +### static {#static} + +`static` 㯠[content_type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type)ã€[status](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) ãŠã‚ˆã³ `response_content` ã‚’è¿”ã™ã“ã¨ãŒã§ãã¾ã™ã€‚`response_content` ã¯æŒ‡å®šã•ã‚ŒãŸã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã‚’è¿”ã—ã¾ã™ã€‚ + +例: + +メッセージを返ã™ã€‚ + +``` xml + + + GET + xxx + /hi + + static + 402 + text/html; charset=UTF-8 + + en + 43 + + Say Hi! + + + + +``` + +`http_response_headers` 㯠`content_type` ã§ã¯ãªãã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„タイプを設定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +``` xml + + + GET + xxx + /hi + + static + 402 + + text/html; charset=UTF-8 + en + 43 + + Say Hi! + + + + +``` + +``` bash +$ curl -vv -H 'XXX:xxx' 'http://localhost:8123/hi' +* Trying ::1... +* Connected to localhost (::1) port 8123 (#0) +> GET /hi HTTP/1.1 +> Host: localhost:8123 +> User-Agent: curl/7.47.0 +> Accept: */* +> XXX:xxx +> +< HTTP/1.1 402 Payment Required +< Date: Wed, 29 Apr 2020 03:51:26 GMT +< Connection: Keep-Alive +< Content-Type: text/html; charset=UTF-8 +< Transfer-Encoding: chunked +< Keep-Alive: timeout=10 +< X-ClickHouse-Summary: {"read_rows":"0","read_bytes":"0","written_rows":"0","written_bytes":"0","total_rows_to_read":"0","elapsed_ns":"662334"} +< +* Connection #0 to host localhost left intact +Say Hi!% +``` + +設定ã‹ã‚‰ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã™ã‚‹ã‚³ãƒ³ãƒ†ãƒ³ãƒ„を探ã—ã¾ã™ã€‚ + +``` xml +
    ]]>
    + + + + GET + xxx + /get_config_static_handler + + static + config://get_config_static_handler + + + +``` + +``` bash +$ curl -v -H 'XXX:xxx' 'http://localhost:8123/get_config_static_handler' +* Trying ::1... +* Connected to localhost (::1) port 8123 (#0) +> GET /get_config_static_handler HTTP/1.1 +> Host: localhost:8123 +> User-Agent: curl/7.47.0 +> Accept: */* +> XXX:xxx +> +< HTTP/1.1 200 OK +< Date: Wed, 29 Apr 2020 04:01:24 GMT +< Connection: Keep-Alive +< Content-Type: text/plain; charset=UTF-8 +< Transfer-Encoding: chunked +< Keep-Alive: timeout=10 +< X-ClickHouse-Summary: {"read_rows":"0","read_bytes":"0","written_rows":"0","written_bytes":"0","total_rows_to_read":"0","elapsed_ns":"662334"} +< +* Connection #0 to host localhost left intact +
    % +``` + +ファイルã‹ã‚‰ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã™ã‚‹ã‚³ãƒ³ãƒ†ãƒ³ãƒ„を探ã—ã¾ã™ã€‚ + +``` xml + + + GET + xxx + /get_absolute_path_static_handler + + static + text/html; charset=UTF-8 + + 737060cd8c284d8af7ad3082f209582d + + file:///absolute_path_file.html + + + + GET + xxx + /get_relative_path_static_handler + + static + text/html; charset=UTF-8 + + 737060cd8c284d8af7ad3082f209582d + + file://./relative_path_file.html + + + +``` + +``` bash +$ user_files_path='/var/lib/clickhouse/user_files' +$ sudo echo "Relative Path File" > $user_files_path/relative_path_file.html +$ sudo echo "Absolute Path File" > $user_files_path/absolute_path_file.html +$ curl -vv -H 'XXX:xxx' 'http://localhost:8123/get_absolute_path_static_handler' +* Trying ::1... +* Connected to localhost (::1) port 8123 (#0) +> GET /get_absolute_path_static_handler HTTP/1.1 +> Host: localhost:8123 +> User-Agent: curl/7.47.0 +> Accept: */* +> XXX:xxx +> +< HTTP/1.1 200 OK +< Date: Wed, 29 Apr 2020 04:18:16 GMT +< Connection: Keep-Alive +< Content-Type: text/html; charset=UTF-8 +< Transfer-Encoding: chunked +< Keep-Alive: timeout=10 +< X-ClickHouse-Summary: {"read_rows":"0","read_bytes":"0","written_rows":"0","written_bytes":"0","total_rows_to_read":"0","elapsed_ns":"662334"} +< +Absolute Path File +* Connection #0 to host localhost left intact +$ curl -vv -H 'XXX:xxx' 'http://localhost:8123/get_relative_path_static_handler' +* Trying ::1... +* Connected to localhost (::1) port 8123 (#0) +> GET /get_relative_path_static_handler HTTP/1.1 +> Host: localhost:8123 +> User-Agent: curl/7.47.0 +> Accept: */* +> XXX:xxx +> +< HTTP/1.1 200 OK +< Date: Wed, 29 Apr 2020 04:18:31 GMT +< Connection: Keep-Alive +< Content-Type: text/html; charset=UTF-8 +< Transfer-Encoding: chunked +< Keep-Alive: timeout=10 +< X-ClickHouse-Summary: {"read_rows":"0","read_bytes":"0","written_rows":"0","written_bytes":"0","total_rows_to_read":"0","elapsed_ns":"662334"} +< +Relative Path File +* Connection #0 to host localhost left intact +``` + +## HTTP ストリーミング中ã«ç™ºç”Ÿã—ãŸä¾‹å¤–ã§ã®æœ‰åŠ¹ãª JSON/XML 応答 {valid-output-on-exception-http-streaming} + +HTTP 経由ã§ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œä¸­ã€ãƒ‡ãƒ¼ã‚¿ã®ä¸€éƒ¨ãŒæ—¢ã«é€ä¿¡ã•ã‚ŒãŸã¨ãã«ä¾‹å¤–ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚通常ã€ç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿å½¢å¼ãŒä½¿ç”¨ã•ã‚Œã¦ãƒ‡ãƒ¼ã‚¿ã‚’出力ã—ã€å‡ºåŠ›ãŒæŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿å½¢å¼ã«ãŠã„ã¦ç„¡åŠ¹ã«ãªã‚‹å ´åˆã§ã‚‚ã€ä¾‹å¤–ã¯ãƒ—レーンテキストã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ +ã“れを防ããŸã‚ã«ã€æŒ‡å®šã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ä¾‹å¤–を記述ã™ã‚‹ `http_write_exception_in_output_format` 設定(デフォルトã§æœ‰åŠ¹ï¼‰ãŒä½¿ç”¨ã§ãã¾ã™ï¼ˆç¾åœ¨ã€XML ãŠã‚ˆã³ JSON* å½¢å¼ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼‰ã€‚ + +例: + +```bash +$ curl 'http://localhost:8123/?query=SELECT+number,+throwIf(number>3)+from+system.numbers+format+JSON+settings+max_block_size=1&http_write_exception_in_output_format=1' +{ + "meta": + [ + { + "name": "number", + "type": "UInt64" + }, + { + "name": "throwIf(greater(number, 2))", + "type": "UInt8" + } + ], + + "data": + [ + { + "number": "0", + "throwIf(greater(number, 2))": 0 + }, + { + "number": "1", + "throwIf(greater(number, 2))": 0 + }, + { + "number": "2", + "throwIf(greater(number, 2))": 0 + } + ], + + "rows": 3, + + "exception": "Code: 395. DB::Exception: Value passed to 'throwIf' function is non-zero: while executing 'FUNCTION throwIf(greater(number, 2) :: 2) -> throwIf(greater(number, 2)) UInt8 : 1'. (FUNCTION_THROW_IF_VALUE_IS_NON_ZERO) (version 23.8.1.1)" +} +``` + +```bash +$ curl 'http://localhost:8123/?query=SELECT+number,+throwIf(number>2)+from+system.numbers+format+XML+settings+max_block_size=1&http_write_exception_in_output_format=1' + + + + + + number + UInt64 + + + throwIf(greater(number, 2)) + UInt8 + + + + + + 0 + 0 + + + 1 + 0 + + + 2 + 0 + + + 3 + Code: 395. DB::Exception: Value passed to 'throwIf' function is non-zero: while executing 'FUNCTION throwIf(greater(number, 2) :: 2) -> throwIf(greater(number, 2)) UInt8 : 1'. (FUNCTION_THROW_IF_VALUE_IS_NON_ZERO) (version 23.8.1.1) + +``` + diff --git a/docs/ja/interfaces/images/mysql1.png b/docs/ja/interfaces/images/mysql1.png new file mode 100644 index 00000000000..f5ac85b6e2c Binary files /dev/null and b/docs/ja/interfaces/images/mysql1.png differ diff --git a/docs/ja/interfaces/images/mysql2.png b/docs/ja/interfaces/images/mysql2.png new file mode 100644 index 00000000000..7b999e41665 Binary files /dev/null and b/docs/ja/interfaces/images/mysql2.png differ diff --git a/docs/ja/interfaces/images/mysql3.png b/docs/ja/interfaces/images/mysql3.png new file mode 100644 index 00000000000..be6cb963003 Binary files /dev/null and b/docs/ja/interfaces/images/mysql3.png differ diff --git a/docs/ja/interfaces/images/mysql4.png b/docs/ja/interfaces/images/mysql4.png new file mode 100644 index 00000000000..3b5ce1e844d Binary files /dev/null and b/docs/ja/interfaces/images/mysql4.png differ diff --git a/docs/ja/interfaces/images/mysql5.png b/docs/ja/interfaces/images/mysql5.png new file mode 100644 index 00000000000..fc026a8b753 Binary files /dev/null and b/docs/ja/interfaces/images/mysql5.png differ diff --git a/docs/ja/interfaces/jdbc.md b/docs/ja/interfaces/jdbc.md new file mode 100644 index 00000000000..a748a613a19 --- /dev/null +++ b/docs/ja/interfaces/jdbc.md @@ -0,0 +1,13 @@ +--- +slug: /ja/interfaces/jdbc +sidebar_position: 22 +sidebar_label: JDBC ドライãƒãƒ¼ +--- + +# JDBC ドライãƒãƒ¼ + +Javaアプリケーションã‹ã‚‰ClickHouseã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ã€[å…¬å¼JDBCドライãƒãƒ¼](https://github.com/ClickHouse/clickhouse-jdbc)(ãŠã‚ˆã³Javaクライアント)を使用ã—ã¦ãã ã•ã„。 + +- サードパーティ製ドライãƒãƒ¼: + - [ClickHouse-Native-JDBC](https://github.com/housepower/ClickHouse-Native-JDBC) + - [clickhouse4j](https://github.com/blynkkk/clickhouse4j) diff --git a/docs/ja/interfaces/mysql.md b/docs/ja/interfaces/mysql.md new file mode 100644 index 00000000000..d82a70e8259 --- /dev/null +++ b/docs/ja/interfaces/mysql.md @@ -0,0 +1,162 @@ +--- +slug: /ja/interfaces/mysql +sidebar_position: 20 +sidebar_label: MySQL Interface +--- + +# MySQL インターフェース + +ClickHouseã¯ã€MySQLã®ãƒ¯ã‚¤ãƒ¤ãƒ¼ãƒ—ロトコルをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒã‚¤ãƒ†ã‚£ãƒ–ãªClickHouseコãƒã‚¯ã‚¿ã‚’æŒãŸãªã„一部ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒMySQLプロトコルを利用ã§ãã€ä»¥ä¸‹ã®BIツールã§æ¤œè¨¼æ¸ˆã¿ã§ã™: + +- [Looker Studio](../integrations/data-visualization/looker-studio-and-clickhouse.md) +- [Tableau Online](../integrations/tableau-online) +- [QuickSight](../integrations/quicksight) + +ä»–ã®æœªæ¤œè¨¼ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¾ãŸã¯çµ±åˆã‚’試ã¿ã‚‹å ´åˆã€ä»¥ä¸‹ã®åˆ¶é™ãŒã‚ã‚‹ã“ã¨ã‚’ã”了承ãã ã•ã„: + +- SSLã®å®Ÿè£…ãŒå®Œå…¨ã«äº’æ›æ€§ãŒãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã€[TLS SNI](https://www.cloudflare.com/learning/ssl/what-is-sni/)ã«é–¢é€£ã—ãŸå•é¡ŒãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- 特定ã®ãƒ„ールãŒå¿…è¦ã¨ã™ã‚‹æ–¹è¨€ã®æ©Ÿèƒ½ï¼ˆä¾‹ãˆã°ã€MySQL特有ã®é–¢æ•°ã‚„設定)ãŒæœªå®Ÿè£…ã®å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +ãƒã‚¤ãƒ†ã‚£ãƒ–ドライãƒãŒåˆ©ç”¨å¯èƒ½ãªå ´åˆï¼ˆä¾‹: [DBeaver](../integrations/dbeaver))ã€MySQLインターフェースã®ä»£ã‚ã‚Šã«ãã¡ã‚‰ã‚’使用ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ã¾ãŸã€å¤šãã®MySQL言語クライアントãŒå•é¡Œãªã動作ã™ã‚‹ã¯ãšã§ã™ãŒã€MySQLインターフェースãŒæ—¢å­˜ã®MySQLクエリをæŒã¤ã‚³ãƒ¼ãƒ‰ãƒ™ãƒ¼ã‚¹ã®ãƒ‰ãƒ­ãƒƒãƒ—イン代替ã§ã‚ã‚‹ã“ã¨ã¯ä¿è¨¼ã•ã‚Œã¾ã›ã‚“。 + +特定ã®ãƒ„ールã§ãƒã‚¤ãƒ†ã‚£ãƒ–ClickHouseドライãƒãŒåˆ©ç”¨ã§ããšã€MySQLインターフェースを通ã˜ã¦ä½¿ç”¨ã—ãŸã„ãŒã€ã„ãã¤ã‹ã®éžäº’æ›æ€§ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã¯ã€ClickHouseリãƒã‚¸ãƒˆãƒªã§[å•é¡Œã‚’作æˆ](https://github.com/ClickHouse/ClickHouse/issues)ã—ã¦ãã ã•ã„。 + +::::note +上記ã®BIツールã®SQL方言をより良ãサãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ã€ClickHouseã®MySQLインターフェースã¯ã€è¨­å®š[prefer_column_name_to_alias = 1](../operations/settings/settings.md#prefer-column-name-to-alias)ã§ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ã“ã‚Œã¯ã‚ªãƒ•ã«ã™ã‚‹ã“ã¨ãŒã§ããšã€ç¨€ãªã‚±ãƒ¼ã‚¹ã§ClickHouseã®é€šå¸¸ã®ã‚¯ã‚¨ãƒªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã¨MySQLクエリインターフェースã®é–“ã§ç•°ãªã‚‹å‹•ä½œã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +:::: + +## ClickHouse Cloudã§ã®MySQLインターフェースã®æœ‰åŠ¹åŒ– + +1. ClickHouse Cloudサービスを作æˆã—ãŸå¾Œã€ã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ç”»é¢ã§MySQLタブをé¸æŠžã—ã¾ã™ã€‚ + +![Credentials screen - Prompt](./images/mysql1.png) + +2. 特定ã®ã‚µãƒ¼ãƒ“ス用ã«MySQLインターフェースを有効化ã™ã‚‹ã‚ˆã†ã«ã‚¹ã‚¤ãƒƒãƒã‚’切り替ãˆã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã“ã®ã‚µãƒ¼ãƒ“スã«å¯¾ã—ã¦ãƒãƒ¼ãƒˆ`3306`ãŒå…¬é–‹ã•ã‚Œã€ç‹¬è‡ªã®MySQLユーザーåã‚’å«ã‚€MySQL接続画é¢ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚パスワードã¯ã‚µãƒ¼ãƒ“スã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ‘スワードã¨åŒã˜ã«ãªã‚Šã¾ã™ã€‚ + +![Credentials screen - Enabled MySQL](./images/mysql2.png) + +既存ã®ã‚µãƒ¼ãƒ“ス用ã«MySQLインターフェースを有効化ã™ã‚‹å ´åˆ: + +1. サービスを`Running`状態ã«ã—ã¦ã€MySQLインターフェースを有効化ã—ãŸã„サービスã®"View connection string"ボタンをクリックã—ã¾ã™ã€‚ + +![Connection screen - Prompt MySQL](./images/mysql3.png) + +2. 特定ã®ã‚µãƒ¼ãƒ“ス用ã«MySQLインターフェースを有効化ã™ã‚‹ã‚ˆã†ã«ã‚¹ã‚¤ãƒƒãƒã‚’切り替ãˆã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‘スワードを入力ã™ã‚‹ã‚ˆã†ã«ä¿ƒã•ã‚Œã¾ã™ã€‚ + +![Connection screen - Prompt MySQL](./images/mysql4.png) + +3. パスワードを入力ã™ã‚‹ã¨ã€ã“ã®ã‚µãƒ¼ãƒ“スã®MySQL接続文字列ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ +![Connection screen - MySQL Enabled](./images/mysql5.png) + +## ClickHouse Cloudã§è¤‡æ•°ã®MySQLユーザーを作æˆã™ã‚‹ + +デフォルトã§ã€`mysql4` ユーザーãŒçµ„ã¿è¾¼ã¾ã‚Œã¦ãŠã‚Šã€ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯`default`ユーザーã¨åŒã˜ãƒ‘スワードを使用ã—ã¾ã™ã€‚`` ã®éƒ¨åˆ†ã¯ClickHouse Cloudã®ãƒ›ã‚¹ãƒˆåã®æœ€åˆã®ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã§ã™ã€‚ã“ã®å½¢å¼ã¯ã€å®‰å…¨ãªæŽ¥ç¶šã‚’実装ã—ã¦ã„るツールã§[SNI情報ãŒTLSãƒãƒ³ãƒ‰ã‚·ã‚§ã‚¤ã‚¯ã§æä¾›ã•ã‚Œãªã„å ´åˆ](https://www.cloudflare.com/learning/ssl/what-is-sni)ã«å¿…è¦ã¨ãªã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã«è¿½åŠ ã®ãƒ’ントãŒãªã„ã¨å†…部ルーティングを行ã†ã“ã¨ãŒã§ãã¾ã›ã‚“(MySQLコンソールクライアントãŒãã®ã‚ˆã†ãªãƒ„ールã®ã²ã¨ã¤ã§ã™ï¼‰ã€‚ + +ã“ã®ãŸã‚ã€MySQLインターフェース用ã«æ–°ã—ã„ユーザーを作æˆã™ã‚‹éš›ã«ã¯ã€`mysql4_` å½¢å¼ã«å¾“ã†ã“ã¨ã‚’_å¼·ã推奨_ã—ã¾ã™ã€‚ã“ã“ã§``ã¯Cloudサービスを識別ã™ã‚‹ãŸã‚ã®ãƒ’ントã§ã€``ã¯ä»»æ„ã®æŽ¥å°¾èªžã§ã™ã€‚ + +:::tip +ClickHouse Cloudã®ãƒ›ã‚¹ãƒˆåãŒ`foobar.us-east1.aws.clickhouse.cloud`ã®å ´åˆã€``部分ã¯`foobar`ã«ç›¸å½“ã—ã€ã‚«ã‚¹ã‚¿ãƒ MySQLユーザーåã¯`mysql4foobar_team1`ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ +::: + +MySQLインターフェースã¨å…±ã«ä½¿ç”¨ã™ã‚‹ãŸã‚ã«è¿½åŠ ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã§ãã¾ã™ã€‚例ãˆã°ã€è¿½åŠ ã®è¨­å®šã‚’é©ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆãªã©ã§ã™ã€‚ + +1. オプション - カスタムユーザーã«é©ç”¨ã™ã‚‹[設定プロファイルを作æˆ](https://clickhouse.com/docs/ja/sql-reference/statements/create/settings-profile)ã—ã¾ã™ã€‚例ãˆã°ã€`my_custom_profile` を追加ã®è¨­å®šã¨å…±ã«ä½œæˆã—ã€å¾Œã§ä½œæˆã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«æŽ¥ç¶šã—ãŸéš›ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§é©ç”¨ã•ã‚Œã¾ã™ï¼š + + ```sql + CREATE SETTINGS PROFILE my_custom_profile SETTINGS prefer_column_name_to_alias=1; + ``` + + `prefer_column_name_to_alias`ã¯ä¾‹ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã“ã«ä»–ã®è¨­å®šã‚’使用ã§ãã¾ã™ã€‚ +2. 以下ã®å½¢å¼ã‚’使用ã—ã¦[ユーザーを作æˆ](https://clickhouse.com/docs/ja/sql-reference/statements/create/user)ã—ã¾ã™ï¼š`mysql4_`([上記å‚ç…§](#creating-multiple-mysql-users-in-clickhouse-cloud))。パスワードã¯ãƒ€ãƒ–ルSHA1å½¢å¼ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ï¼š + + ```sql + CREATE USER mysql4foobar_team1 IDENTIFIED WITH double_sha1_password BY 'YourPassword42$'; + ``` + + ã¾ãŸã€ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãŸã‚ã«ã‚«ã‚¹ã‚¿ãƒ ãƒ—ロファイルを使用ã—ãŸã„å ´åˆã¯ï¼š + + ```sql + CREATE USER mysql4foobar_team1 IDENTIFIED WITH double_sha1_password BY 'YourPassword42$' SETTINGS PROFILE 'my_custom_profile'; + ``` + + ã“ã“ã§`my_custom_profile`ã¯å…ˆã«ä½œæˆã—ãŸãƒ—ロファイルã®åå‰ã§ã™ã€‚ +3. æ–°ã—ã„ユーザーã«å¿…è¦ãªæ¨©é™ã‚’[付与](https://clickhouse.com/docs/ja/sql-reference/statements/grant)ã—ã¦ã€è¦æ±‚ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルやデータベースã¨å¯¾è©±ã§ãるよã†ã«ã—ã¾ã™ã€‚例ãˆã°ã€`system.query_log`ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’付与ã—ãŸã„å ´åˆï¼š + + ```sql + GRANT SELECT ON system.query_log TO mysql4foobar_team1; + ``` + +4. 作æˆã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’使用ã—ã¦ã€MySQLインターフェースã¨å…±ã«ClickHouse Cloudサービスã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +### ClickHouse Cloudã§ã®è¤‡æ•°ã®MySQLユーザーã®ãƒˆãƒ©ãƒ–ルシューティング + +æ–°ã—ã„MySQLユーザーを作æˆã—ã€MySQL CLIクライアント経由ã§æŽ¥ç¶šä¸­ã«ä»¥ä¸‹ã®ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•ã‚ŒãŸå ´åˆï¼š + +``` +ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 54 +``` + +ã“ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åãŒ`mysql4_`å½¢å¼ã«å¾“ã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„([上記å‚ç…§](#creating-multiple-mysql-users-in-clickhouse-cloud))。 + +## セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseã§MySQLインターフェースを有効化 + +サーãƒãƒ¼ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«[mysql_port](../operations/server-configuration-parameters/settings.md#mysql_port)設定を追加ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€`config.d/`[フォルダ](../operations/configuration-files)内ã«æ–°ã—ã„XMLファイルã«ãƒãƒ¼ãƒˆã‚’定義ã§ãã¾ã™ï¼š + +``` xml + + 9004 + +``` + +ClickHouseサーãƒãƒ¼ã‚’èµ·å‹•ã—ã€æ¬¡ã®ã‚ˆã†ãªMySQL互æ›ãƒ—ロトコルをリッスンã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã™ãƒ­ã‚°ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’探ã—ã¾ã™ï¼š + +``` +{} Application: Listening for MySQL compatibility protocol: 127.0.0.1:9004 +``` + +## MySQLã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ + +以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€MySQLクライアント`mysql`ã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ï¼š + +```bash +mysql --protocol tcp -h [hostname] -u [username] -P [port_number] [database_name] +``` + +例: + +``` bash +$ mysql --protocol tcp -h 127.0.0.1 -u default -P 9004 default +``` + +接続ãŒæˆåŠŸã—ãŸå ´åˆã®å‡ºåŠ›ï¼š + +``` text +Welcome to the MySQL monitor. Commands end with ; or \g. +Your MySQL connection id is 4 +Server version: 20.2.1.1-ClickHouse + +Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + +Oracle is a registered trademark of Oracle Corporation and/or its +affiliates. Other names may be trademarks of their respective +owners. + +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + +mysql> +``` + +ã™ã¹ã¦ã®MySQLクライアントã¨ã®äº’æ›æ€§ã®ãŸã‚ã«ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ‘スワードを[ダブルSHA1](../operations/settings/settings-users.md#password_double_sha1_hex)ã§æŒ‡å®šã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ +ユーザーパスワードãŒ[SHA256](../operations/settings/settings-users.md#password_sha256_hex)ã§æŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ä¸€éƒ¨ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯èªè¨¼ã§ãã¾ã›ã‚“(mysqljsãŠã‚ˆã³ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ„ールã®å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®MySQLãŠã‚ˆã³MariaDB)。 + +制é™äº‹é …: + +- プリペアドクエリã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ + +- 一部ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¯æ–‡å­—列ã¨ã—ã¦é€ä¿¡ã•ã‚Œã¾ã™ + +é•·ã„クエリをキャンセルã™ã‚‹ã«ã¯ã€`KILL QUERY connection_id`文を使用ã—ã¾ã™ï¼ˆã“ã‚Œã¯å‡¦ç†ä¸­ã«`KILL QUERY WHERE query_id = connection_id`ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ï¼‰ã€‚例: + +``` bash +$ mysql --protocol tcp -h mysql_server -P 9004 default -u default --password=123 -e "KILL QUERY 123456;" +``` diff --git a/docs/ja/interfaces/odbc.md b/docs/ja/interfaces/odbc.md new file mode 100644 index 00000000000..3a29bb3f073 --- /dev/null +++ b/docs/ja/interfaces/odbc.md @@ -0,0 +1,9 @@ +--- +slug: /ja/interfaces/odbc +sidebar_position: 23 +sidebar_label: ODBC ドライãƒãƒ¼ +--- + +# ODBC ドライãƒãƒ¼ + +ClickHouseをデータソースã¨ã—ã¦åˆ©ç”¨ã™ã‚‹ã«ã¯ã€[å…¬å¼ã®ODBCドライãƒãƒ¼](https://github.com/ClickHouse/clickhouse-odbc)を使用ã—ã¾ã™ã€‚ diff --git a/docs/ja/interfaces/overview.md b/docs/ja/interfaces/overview.md new file mode 100644 index 00000000000..588ea6fce7a --- /dev/null +++ b/docs/ja/interfaces/overview.md @@ -0,0 +1,34 @@ +--- +slug: /ja/interfaces/overview +sidebar_label: Overview +sidebar_position: 1 +keywords: [clickhouse, network, interfaces, http, tcp, grpc, command-line, client, jdbc, odbc, driver] +description: ClickHouse 㯠3ã¤ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã—ã¾ã™ +--- + +# ドライãƒãƒ¼ã¨ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ + +ClickHouse ã¯3ã¤ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã—ã¾ã™ï¼ˆè¿½åŠ ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã®ãŸã‚ã«TLSã§ãƒ©ãƒƒãƒ”ングã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼‰: + +- [HTTP](http.md)ã€ã“ã‚Œã¯æ–‡æ›¸åŒ–ã•ã‚Œã¦ãŠã‚Šç›´æŽ¥ä½¿ç”¨ã™ã‚‹ã®ãŒç°¡å˜ã§ã™ã€‚ +- オーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒå°‘ãªã„[ãƒã‚¤ãƒ†ã‚£ãƒ–TCP](../interfaces/tcp.md)。 +- [gRPC](grpc.md)。 + +ã»ã¨ã‚“ã©ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ã“れらã«ç›´æŽ¥å¯¾è©±ã™ã‚‹ã®ã§ã¯ãªãã€é©åˆ‡ãªãƒ„ールやライブラリを使用ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ClickHouse ãŒå…¬å¼ã«ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹ã‚‚ã®ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +- [コマンドラインクライアント](../interfaces/cli.md) +- [JDBCドライãƒãƒ¼](../interfaces/jdbc.md) +- [ODBCドライãƒãƒ¼](../interfaces/odbc.md) +- [C++クライアントライブラリ](../interfaces/cpp.md) + +ClickHouseサーãƒãƒ¼ã¯ãƒ‘ワーユーザーå‘ã‘ã®åŸ‹ã‚è¾¼ã¿ãƒ“ジュアルインターフェースをæä¾›ã—ã¦ã„ã¾ã™ï¼š + +- Play UI: ブラウザã§`/play`ã‚’é–‹ã; +- 高度ãªãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰: ブラウザã§`/dashboard`ã‚’é–‹ã; +- ClickHouseエンジニアå‘ã‘ã®ãƒã‚¤ãƒŠãƒªã‚·ãƒ³ãƒœãƒ«ãƒ“ューアー: ブラウザã§`/binary`ã‚’é–‹ã; + +ClickHouseã¨é€£æºã™ã‚‹ãŸã‚ã®ã‚µãƒ¼ãƒ‰ãƒ‘ーティ製ライブラリも多数ã‚ã‚Šã¾ã™ï¼š + +- [クライアントライブラリ](../interfaces/third-party/client-libraries.md) +- [çµ±åˆ](../interfaces/third-party/integrations.md) +- [ビジュアルインターフェース](../interfaces/third-party/gui.md) diff --git a/docs/ja/interfaces/postgresql.md b/docs/ja/interfaces/postgresql.md new file mode 100644 index 00000000000..9f0e2326878 --- /dev/null +++ b/docs/ja/interfaces/postgresql.md @@ -0,0 +1,71 @@ +--- +slug: /ja/interfaces/postgresql +sidebar_position: 20 +sidebar_label: PostgreSQL インターフェース +--- + +# PostgreSQL インターフェース + +ClickHouse 㯠PostgreSQL ã®ãƒ¯ã‚¤ãƒ¤ãƒ¼ãƒ—ロトコルをサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€Postgres クライアントを使用ã—㦠ClickHouse ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã‚ã‚‹æ„味ã€ClickHouse 㯠PostgreSQL インスタンスã®ã‚ˆã†ã«æŒ¯ã‚‹èˆžã†ã“ã¨ãŒã§ãã€Amazon Redshift ãªã©ã€ClickHouse ã«ç›´æŽ¥ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ PostgreSQL クライアントアプリケーションを ClickHouse ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +PostgreSQL ワイヤープロトコルを有効ã«ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã« [postgresql_port](../operations/server-configuration-parameters/settings.md#postgresql_port) 設定を追加ã—ã¾ã™ã€‚例ãˆã°ã€`config.d` フォルダ内ã«æ–°ã—ã„ XML ファイルを作æˆã—ã€ãƒãƒ¼ãƒˆã‚’定義ã—ã¾ã™ï¼š + +```xml + + 9005 + +``` + +ClickHouse サーãƒãƒ¼ã‚’èµ·å‹•ã—ã€**PostgreSQL compatibility protocol をリスニング中** ã¨ã„ã†ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å«ã‚€ãƒ­ã‚°ã‚’確èªã—ã¾ã™ï¼š + +```response +{} Application: Listening for PostgreSQL compatibility protocol: 127.0.0.1:9005 +``` + +## psql ã‚’ ClickHouse ã«æŽ¥ç¶šã™ã‚‹ + +次ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€PostgreSQL クライアント `psql` ã‚’ ClickHouse ã«æŽ¥ç¶šã™ã‚‹æ–¹æ³•ã‚’示ã—ã¾ã™ï¼š + +```bash +psql -p [port] -h [hostname] -U [username] [database_name] +``` + +例: + +```bash +psql -p 9005 -h 127.0.0.1 -U alice default +``` + +:::note +`psql` クライアントã¯ãƒ‘スワードã§ã®ãƒ­ã‚°ã‚¤ãƒ³ã‚’è¦æ±‚ã™ã‚‹ãŸã‚ã€ãƒ‘スワードãªã—ã§ã¯ `default` ユーザーを使用ã—ã¦æŽ¥ç¶šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。`default` ユーザーã«ãƒ‘スワードを設定ã™ã‚‹ã‹ã€åˆ¥ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ãã ã•ã„。 +::: + +`psql` クライアントã¯ãƒ‘スワードを求ã‚ã¾ã™ï¼š + +```response +Password for user alice: +psql (14.2, server 22.3.1.1) +WARNING: psql major version 14, server major version 22. + Some psql features might not work. +Type "help" for help. + +default=> +``` + +以上ã§å®Œäº†ã§ã™ï¼PostgreSQL クライアント㌠ClickHouse ã«æŽ¥ç¶šã•ã‚Œã€ã™ã¹ã¦ã®ã‚³ãƒžãƒ³ãƒ‰ã¨ã‚¯ã‚¨ãƒªã¯ ClickHouse 上ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +:::note +ç¾åœ¨ã€PostgreSQL プロトコルã¯ãƒ—レーンテキストパスワードã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +::: + +## SSL ã®ä½¿ç”¨ + +ClickHouse インスタンス㧠SSL/TLS ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`postgresql_port` ã¯åŒã˜è¨­å®šã‚’使用ã—ã¾ã™ï¼ˆãƒãƒ¼ãƒˆã¯ã‚»ã‚­ãƒ¥ã‚¢ãªã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¨éžã‚»ã‚­ãƒ¥ã‚¢ãªã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ä¸¡æ–¹ã§å…±æœ‰ã•ã‚Œã¾ã™ï¼‰ã€‚ + +å„クライアントã¯ã€SSL を使用ã—ã¦æŽ¥ç¶šã™ã‚‹ãŸã‚ã®ç‹¬è‡ªã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚次ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€è¨¼æ˜Žæ›¸ã¨ã‚­ãƒ¼ã‚’渡ã—㦠`psql` ã‚’ ClickHouse ã«ã‚»ã‚­ãƒ¥ã‚¢ã«æŽ¥ç¶šã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ï¼š + +```bash +psql "port=9005 host=127.0.0.1 user=alice dbname=default sslcert=/path/to/certificate.pem sslkey=/path/to/key.pem sslrootcert=/path/to/rootcert.pem sslmode=verify-ca" +``` + +詳細㪠SSL 設定ã«ã¤ã„ã¦ã¯ã€[PostgreSQL ドキュメント](https://jdbc.postgresql.org/documentation/head/ssl-client.html)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/interfaces/prometheus.md b/docs/ja/interfaces/prometheus.md new file mode 100644 index 00000000000..48f1129b48f --- /dev/null +++ b/docs/ja/interfaces/prometheus.md @@ -0,0 +1,160 @@ +--- +slug: /ja/interfaces/prometheus +sidebar_position: 19 +sidebar_label: Prometheusプロトコル +--- + +# Prometheusプロトコル + +## メトリクスã®å…¬é–‹ {#expose} + +:::note +ClickHouse Cloudを使用ã—ã¦ã„ã‚‹å ´åˆã€[Prometheus Integration](/ja/integrations/prometheus)を使用ã—ã¦Prometheusã«ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’公開ã§ãã¾ã™ã€‚ +::: + +ClickHouseã¯ãã®è‡ªèº«ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’Prometheusã‹ã‚‰ã®ã‚¹ã‚¯ãƒ¬ã‚¤ãƒ”ングã®ãŸã‚ã«å…¬é–‹ã§ãã¾ã™ï¼š + +```xml + + 9363 + /metrics + true + true + true + true + +``` + +``セクションを使用ã—ã¦ã€ã‚ˆã‚Šè©³ç´°ãªãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’作æˆã§ãã¾ã™ã€‚ +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯[](/ja/interfaces/http)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€Prometheusプロトコル用ã«æ©Ÿèƒ½ã—ã¾ã™ï¼š + +```xml + + 9363 + + + /metrics + + expose_metrics + true + true + true + true + + + + +``` + +設定: + +| åå‰ | デフォルト | 説明 | +|---|---|---| +| `port` | ãªã— | メトリクス公開プロトコルをæä¾›ã™ã‚‹ãŸã‚ã®ãƒãƒ¼ãƒˆã€‚ | +| `endpoint` | `/metrics` | Prometheusサーãƒãƒ¼ã«ã‚ˆã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®ã‚¹ã‚¯ãƒ¬ã‚¤ãƒ”ング用HTTPエンドãƒã‚¤ãƒ³ãƒˆã€‚`/`ã§å§‹ã¾ã‚Šã¾ã™ã€‚``セクションã¨ä½µç”¨ã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 | +| `url` / `headers` / `method` | ãªã— | リクエストã«å¯¾ã™ã‚‹é©åˆãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’見ã¤ã‘ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã€‚[](/ja/interfaces/http)セクションã®åŒã˜åå‰ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ä¼¼ã¦ã„ã¾ã™ã€‚ | +| `metrics` | true | [system.metrics](/ja/operations/system-tables/metrics)テーブルã‹ã‚‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’公開ã—ã¾ã™ã€‚ | +| `asynchronous_metrics` | true | [system.asynchronous_metrics](/ja/operations/system-tables/asynchronous_metrics)テーブルã‹ã‚‰ç¾åœ¨ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹å€¤ã‚’公開ã—ã¾ã™ã€‚ | +| `events` | true | [system.events](/ja/operations/system-tables/events)テーブルã‹ã‚‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’公開ã—ã¾ã™ã€‚ | +| `errors` | true | 最後ã®ã‚µãƒ¼ãƒãƒ¼å†èµ·å‹•ä»¥é™ã«ç™ºç”Ÿã—ãŸã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰ã”ã¨ã®ã‚¨ãƒ©ãƒ¼æ•°ã‚’公開ã—ã¾ã™ã€‚ã“ã®æƒ…å ±ã¯[system.errors](/ja/operations/system-tables/errors)ã‹ã‚‰ã‚‚å–å¾—ã§ãã¾ã™ã€‚ | + +ãƒã‚§ãƒƒã‚¯ï¼ˆ`127.0.0.1`ã‚’ClickHouseサーãƒãƒ¼ã®IPアドレスã¾ãŸã¯ãƒ›ã‚¹ãƒˆåã«ç½®ãæ›ãˆã¦ãã ã•ã„): +```bash +curl 127.0.0.1:9363/metrics +``` + +## リモート書ãè¾¼ã¿ãƒ—ロトコル {#remote-write} + +ClickHouseã¯[remote-write](https://prometheus.io/docs/specs/remote_write_spec/)プロトコルをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +ã“ã®ãƒ—ロトコルã«ã‚ˆã£ã¦å—ä¿¡ã—ãŸãƒ‡ãƒ¼ã‚¿ã¯ã€ï¼ˆã‚らã‹ã˜ã‚作æˆã—ã¦ãŠãå¿…è¦ãŒã‚る)[TimeSeries](/ja/engines/table-engines/special/time_series)テーブルã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +```xml + + 9363 + + + /write + + remote_write + db_name + time_series_table
    +
    +
    +
    +
    +``` + +設定: + +| åå‰ | デフォルト | 説明 | +|---|---|---| +| `port` | ãªã— | `remote-write`プロトコルをæä¾›ã™ã‚‹ãŸã‚ã®ãƒãƒ¼ãƒˆã€‚ | +| `url` / `headers` / `method` | ãªã— | リクエストã«å¯¾ã™ã‚‹é©åˆãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’見ã¤ã‘ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã€‚[](/ja/interfaces/http)セクションã®åŒã˜åå‰ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ä¼¼ã¦ã„ã¾ã™ã€‚ | +| `table` | ãªã— | `remote-write`プロトコルã§å—ä¿¡ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’書ã込む[TimeSeries](/ja/engines/table-engines/special/time_series)テーブルã®åå‰ã€‚ã“ã®åå‰ã«ã¯ã‚ªãƒ—ションã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ | +| `database` | ãªã— | `table`設定ã§æŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`table`設定ã§æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルãŒã‚るデータベースã®åå‰ã€‚ | + +## リモート読ã¿å–りプロトコル {#remote-read} + +ClickHouseã¯[remote-read](https://prometheus.io/docs/prometheus/latest/querying/remote_read_api/)プロトコルをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +ã“ã®ãƒ—ロトコルを通ã˜ã¦ã€[TimeSeries](/ja/engines/table-engines/special/time_series)テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã€é€ä¿¡ã—ã¾ã™ã€‚ + +```xml + + 9363 + + + /read + + remote_read + db_name + time_series_table
    +
    +
    +
    +
    +``` + +設定: + +| åå‰ | デフォルト | 説明 | +|---|---|---| +| `port` | ãªã— | `remote-read`プロトコルをæä¾›ã™ã‚‹ãŸã‚ã®ãƒãƒ¼ãƒˆã€‚ | +| `url` / `headers` / `method` | ãªã— | リクエストã«å¯¾ã™ã‚‹é©åˆãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’見ã¤ã‘ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã€‚[](/ja/interfaces/http)セクションã®åŒã˜åå‰ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ä¼¼ã¦ã„ã¾ã™ã€‚ | +| `table` | ãªã— | `remote-read`プロトコルã§é€ä¿¡ã™ã‚‹ãŸã‚ã«èª­ã¿å–ã‚‹[TimeSeries](/ja/engines/table-engines/special/time_series)テーブルã®åå‰ã€‚ã“ã®åå‰ã«ã¯ã‚ªãƒ—ションã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ | +| `database` | ãªã— | `table`設定ã§æŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`table`設定ã§æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルãŒã‚るデータベースã®åå‰ã€‚ | + +## 複数プロトコル用ã®è¨­å®š {#multiple-protocols} + +複数ã®ãƒ—ロトコルを一ã¤ã®å ´æ‰€ã«ä¸€ç·’ã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```xml + + 9363 + + + /metrics + + expose_metrics + true + true + true + true + + + + /write + + remote_write + db_name.time_series_table
    +
    +
    + + /read + + remote_read + db_name.time_series_table
    +
    +
    +
    +
    +``` diff --git a/docs/ja/interfaces/schema-inference.md b/docs/ja/interfaces/schema-inference.md new file mode 100644 index 00000000000..930e7af0110 --- /dev/null +++ b/docs/ja/interfaces/schema-inference.md @@ -0,0 +1,2094 @@ +--- +slug: /ja/interfaces/schema-inference +sidebar_position: 21 +sidebar_label: スキーマã®æŽ¨æ¸¬ +title: 入力データã‹ã‚‰ã®è‡ªå‹•ã‚¹ã‚­ãƒ¼ãƒžã®æŽ¨æ¸¬ +--- + +ClickHouseã¯ã€ã»ã¼ã™ã¹ã¦ã®å¯¾å¿œã™ã‚‹[入力フォーマット](formats.md)ã§ã€å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã®æ§‹é€ ã‚’自動的ã«æ±ºå®šã§ãã¾ã™ã€‚ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯ã€ã‚¹ã‚­ãƒ¼ãƒžã®æŽ¨æ¸¬ãŒä½¿ç”¨ã•ã‚Œã‚‹ã¨ãã€ãã®å‹•ä½œã€ãŠã‚ˆã³ãれを制御ã™ã‚‹ã“ã¨ãŒã§ãる設定ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +## 使用法 {#usage} + +スキーマã®æŽ¨æ¸¬ã¯ã€ClickHouseãŒç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹å¿…è¦ãŒã‚ã‚Šã€ãã®æ§‹é€ ãŒä¸æ˜Žãªã¨ãã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## テーブル関数 [file](../sql-reference/table-functions/file.md), [s3](../sql-reference/table-functions/s3.md), [url](../sql-reference/table-functions/url.md), [hdfs](../sql-reference/table-functions/hdfs.md), [azureBlobStorage](../sql-reference/table-functions/azureBlobStorage.md). + +ã“れらã®ãƒ†ãƒ¼ãƒ–ル関数ã¯ã€å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã®æ§‹é€ ã‚’æŒã¤ã‚ªãƒ—ションã®å¼•æ•° `structure` ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ã“ã®å¼•æ•°ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„ã‹ `auto` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰æ§‹é€ ãŒæŽ¨æ¸¬ã•ã‚Œã¾ã™ã€‚ + +**例:** + +ディレクトリ `user_files` ã« JSONEachRow å½¢å¼ã®ãƒ•ã‚¡ã‚¤ãƒ« `hobbies.jsonl` ãŒã‚ã‚Šã€å†…容ã¯æ¬¡ã®é€šã‚Šã§ã™: +```json +{"id" : 1, "age" : 25, "name" : "Josh", "hobbies" : ["football", "cooking", "music"]} +{"id" : 2, "age" : 19, "name" : "Alan", "hobbies" : ["tennis", "art"]} +{"id" : 3, "age" : 32, "name" : "Lana", "hobbies" : ["fitness", "reading", "shopping"]} +{"id" : 4, "age" : 47, "name" : "Brayan", "hobbies" : ["movies", "skydiving"]} +``` + +ClickHouseã¯æ§‹é€ ã‚’指定ã›ãšã«ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š +```sql +SELECT * FROM file('hobbies.jsonl') +``` +```response +┌─id─┬─age─┬─name───┬─hobbies──────────────────────────┠+│ 1 │ 25 │ Josh │ ['football','cooking','music'] │ +│ 2 │ 19 │ Alan │ ['tennis','art'] │ +│ 3 │ 32 │ Lana │ ['fitness','reading','shopping'] │ +│ 4 │ 47 │ Brayan │ ['movies','skydiving'] │ +└────┴─────┴────────┴──────────────────────────────────┘ +``` + +注: フォーマット `JSONEachRow` ã¯è‡ªå‹•çš„ã«ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ `.jsonl` ã‹ã‚‰æ±ºå®šã•ã‚Œã¾ã—ãŸã€‚ + +`DESCRIBE` クエリを使用ã—ã¦è‡ªå‹•çš„ã«æ±ºå®šã•ã‚ŒãŸæ§‹é€ ã‚’確èªã§ãã¾ã™ï¼š +```sql +DESCRIBE file('hobbies.jsonl') +``` +```response +┌─name────┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ id │ Nullable(Int64) │ │ │ │ │ │ +│ age │ Nullable(Int64) │ │ │ │ │ │ +│ name │ Nullable(String) │ │ │ │ │ │ +│ hobbies │ Array(Nullable(String)) │ │ │ │ │ │ +└─────────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +## テーブルエンジン [File](../engines/table-engines/special/file.md), [S3](../engines/table-engines/integrations/s3.md), [URL](../engines/table-engines/special/url.md), [HDFS](../engines/table-engines/integrations/hdfs.md), [azureBlobStorage](../engines/table-engines/integrations/azureBlobStorage.md) + +`CREATE TABLE` クエリã§ã‚«ãƒ©ãƒ ã®ãƒªã‚¹ãƒˆãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã¯ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰è‡ªå‹•çš„ã«æŽ¨æ¸¬ã•ã‚Œã¾ã™ã€‚ + +**例:** + +ファイル `hobbies.jsonl` を使用ã—ã¾ã™ã€‚ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤ã‚¨ãƒ³ã‚¸ãƒ³ `File` ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã§ãã¾ã™ï¼š +```sql +CREATE TABLE hobbies ENGINE=File(JSONEachRow, 'hobbies.jsonl') +``` +```response +Ok. +``` +```sql +SELECT * FROM hobbies +``` +```response +┌─id─┬─age─┬─name───┬─hobbies──────────────────────────┠+│ 1 │ 25 │ Josh │ ['football','cooking','music'] │ +│ 2 │ 19 │ Alan │ ['tennis','art'] │ +│ 3 │ 32 │ Lana │ ['fitness','reading','shopping'] │ +│ 4 │ 47 │ Brayan │ ['movies','skydiving'] │ +└────┴─────┴────────┴──────────────────────────────────┘ +``` +```sql +DESCRIBE TABLE hobbies +``` +```response +┌─name────┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ id │ Nullable(Int64) │ │ │ │ │ │ +│ age │ Nullable(Int64) │ │ │ │ │ │ +│ name │ Nullable(String) │ │ │ │ │ │ +│ hobbies │ Array(Nullable(String)) │ │ │ │ │ │ +└─────────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +## clickhouse-local + +`clickhouse-local` ã¯å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã®æ§‹é€ ã‚’æŒã¤ã‚ªãƒ—ションã®ãƒ‘ラメータ `-S/--structure` ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ‘ラメータãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„ã‹ `auto` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰æ§‹é€ ãŒæŽ¨æ¸¬ã•ã‚Œã¾ã™ã€‚ + +**例:** + +ファイル `hobbies.jsonl` を使用ã—ã¾ã™ã€‚ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ `clickhouse-local` を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š +```shell +clickhouse-local --file='hobbies.jsonl' --table='hobbies' --query='DESCRIBE TABLE hobbies' +``` +```response +id Nullable(Int64) +age Nullable(Int64) +name Nullable(String) +hobbies Array(Nullable(String)) +``` +```shell +clickhouse-local --file='hobbies.jsonl' --table='hobbies' --query='SELECT * FROM hobbies' +``` +```response +1 25 Josh ['football','cooking','music'] +2 19 Alan ['tennis','art'] +3 32 Lana ['fitness','reading','shopping'] +4 47 Brayan ['movies','skydiving'] +``` + +## 挿入テーブルã‹ã‚‰ã®æ§‹é€ ã®ä½¿ç”¨ {#using-structure-from-insertion-table} + +テーブル関数 `file/s3/url/hdfs` を使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ãã€ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰æŠ½å‡ºã™ã‚‹ä»£ã‚ã‚Šã«æŒ¿å…¥ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã‚’使用ã™ã‚‹ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚スキーマã®æŽ¨æ¸¬ã«ã¯æ™‚é–“ãŒã‹ã‹ã‚‹ã“ã¨ãŒã‚ã‚‹ãŸã‚ã€æŒ¿å…¥ã®ãƒ‘フォーマンスãŒå‘上ã—ã¾ã™ã€‚ã¾ãŸã€ãƒ†ãƒ¼ãƒ–ルãŒæœ€é©åŒ–ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã£ã¦ã„ã‚‹å ´åˆã«ã¯ã€åž‹ã®å¤‰æ›ãŒè¡Œã‚ã‚Œãªã„ã®ã§å½¹ç«‹ã¡ã¾ã™ã€‚ + +ã“ã®å‹•ä½œã‚’制御ã™ã‚‹ç‰¹åˆ¥ãªè¨­å®š [use_structure_from_insertion_table_in_table_functions](/docs/ja/operations/settings/settings.md/#use_structure_from_insertion_table_in_table_functions) ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯3ã¤ã®å€¤ã‚’æŒã¡ã¾ã™ï¼š +- 0 - テーブル関数ã¯ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰æ§‹é€ ã‚’抽出ã—ã¾ã™ã€‚ +- 1 - テーブル関数ã¯æŒ¿å…¥ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã‚’使用ã—ã¾ã™ã€‚ +- 2 - ClickHouseã¯æŒ¿å…¥ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã‚’使用ã§ãã‚‹ã‹ã‚¹ã‚­ãƒ¼ãƒžã®æŽ¨æ¸¬ã‚’使用ã™ã‚‹ã‹è‡ªå‹•çš„ã«åˆ¤æ–­ã—ã¾ã™ã€‚デフォルト値。 + +**例 1:** + +次ã®æ§‹é€ ã§ãƒ†ãƒ¼ãƒ–ル `hobbies1` を作æˆã—ã¾ã—ょã†ï¼š +```sql +CREATE TABLE hobbies1 +( + `id` UInt64, + `age` LowCardinality(UInt8), + `name` String, + `hobbies` Array(String) +) +ENGINE = MergeTree +ORDER BY id; +``` + +ファイル `hobbies.jsonl` ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ï¼š + +```sql +INSERT INTO hobbies1 SELECT * FROM file(hobbies.jsonl) +``` + +ã“ã®å ´åˆã€ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒå¤‰æ›´ãªã—ã§ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚Œã‚‹ãŸã‚ã€ClickHouseã¯ã‚¹ã‚­ãƒ¼ãƒžã®æŽ¨æ¸¬ã‚’使用ã›ãšã€æŒ¿å…¥ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã‚’使用ã—ã¾ã™ã€‚ + +**例 2:** + +次ã®æ§‹é€ ã§ãƒ†ãƒ¼ãƒ–ル `hobbies2` を作æˆã—ã¾ã—ょã†ï¼š +```sql +CREATE TABLE hobbies2 +( + `id` UInt64, + `age` LowCardinality(UInt8), + `hobbies` Array(String) +) + ENGINE = MergeTree +ORDER BY id; +``` + +ファイル `hobbies.jsonl` ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ï¼š + +```sql +INSERT INTO hobbies2 SELECT id, age, hobbies FROM file(hobbies.jsonl) +``` + +ã“ã®å ´åˆã€`SELECT` クエリã§ä½¿ç”¨ã•ã‚Œã‚‹ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒãƒ†ãƒ¼ãƒ–ルã«å­˜åœ¨ã™ã‚‹ãŸã‚ã€ClickHouseã¯æŒ¿å…¥ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã‚’使用ã—ã¾ã™ã€‚ãŸã ã—ã€ã“れ㯠JSONEachRowã€TSKVã€Parquet ãªã©ã®ä¸€éƒ¨ã®ã‚«ãƒ©ãƒ ã®èª­ã¿å–りをサãƒãƒ¼ãƒˆã™ã‚‹å…¥åŠ›å½¢å¼ã§ã®ã¿å‹•ä½œã—ã¾ã™ï¼ˆä¾‹ãˆã°TSVå½¢å¼ã§ã¯å‹•ä½œã—ã¾ã›ã‚“)。 + +**例 3:** + +次ã®æ§‹é€ ã§ãƒ†ãƒ¼ãƒ–ル `hobbies3` を作æˆã—ã¾ã—ょã†ï¼š + +```sql +CREATE TABLE hobbies3 +( + `identifier` UInt64, + `age` LowCardinality(UInt8), + `hobbies` Array(String) +) + ENGINE = MergeTree +ORDER BY identifier; +``` + +ファイル `hobbies.jsonl` ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ï¼š + +```sql +INSERT INTO hobbies3 SELECT id, age, hobbies FROM file(hobbies.jsonl) +``` + +ã“ã®å ´åˆã€`SELECT` クエリã§ã‚«ãƒ©ãƒ  `id` ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ãŒã€ãƒ†ãƒ¼ãƒ–ルã«ã¯ã“ã®ã‚«ãƒ©ãƒ ãŒå­˜åœ¨ã—ã¾ã›ã‚“(`identifier` ã¨ã„ã†åå‰ã®ã‚«ãƒ©ãƒ ãŒã‚ã‚Šã¾ã™ï¼‰ã€ã—ãŸãŒã£ã¦ ClickHouse ã¯æŒ¿å…¥ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã‚’使用ã§ããšã€ã‚¹ã‚­ãƒ¼ãƒžã®æŽ¨æ¸¬ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例 4:** + +次ã®æ§‹é€ ã§ãƒ†ãƒ¼ãƒ–ル `hobbies4` を作æˆã—ã¾ã—ょã†ï¼š + +```sql +CREATE TABLE hobbies4 +( + `id` UInt64, + `any_hobby` Nullable(String) +) + ENGINE = MergeTree +ORDER BY id; +``` + +ファイル `hobbies.jsonl` ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ï¼š + +```sql +INSERT INTO hobbies4 SELECT id, empty(hobbies) ? NULL : hobbies[1] FROM file(hobbies.jsonl) +``` + +ã“ã®å ´åˆã€ã‚«ãƒ©ãƒ  `hobbies` ã«å¯¾ã—㦠`SELECT` クエリ内ã§ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹ãŸã‚ã®ã„ãã¤ã‹ã®æ“作ãŒè¡Œã‚ã‚Œã¦ã„ã‚‹ãŸã‚ã€ClickHouse ã¯æŒ¿å…¥ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã‚’使用ã§ããšã€ã‚¹ã‚­ãƒ¼ãƒžã®æŽ¨æ¸¬ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## スキーマ推測キャッシュ {#schema-inference-cache} + +ã»ã¨ã‚“ã©ã®å…¥åŠ›å½¢å¼ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã§ã¯ã€ãã®æ§‹é€ ã‚’決定ã™ã‚‹ãŸã‚ã«ãƒ‡ãƒ¼ã‚¿ã‚’ã„ãã¤ã‹èª­ã¿è¾¼ã¿ã€ã“ã®ãƒ—ロセスã«ã¯æ™‚é–“ãŒã‹ã‹ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +ClickHouseãŒåŒã˜ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã³ã«åŒã˜ã‚¹ã‚­ãƒ¼ãƒžã®æŽ¨æ¸¬ã‚’防ããŸã‚ã«ã€æŽ¨æ¸¬ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã€å†åº¦åŒã˜ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å ´åˆã€ClickHouseã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¾ã™ã€‚ + +ã“ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’制御ã™ã‚‹ç‰¹åˆ¥ãªè¨­å®šãŒã‚ã‚Šã¾ã™ï¼š +- `schema_inference_cache_max_elements_for_{file/s3/hdfs/url/azure}` - 対応ã™ã‚‹ãƒ†ãƒ¼ãƒ–ル関数ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã®æœ€å¤§æ•°ã€‚デフォルト値㯠`4096` ã§ã™ã€‚ã“れらã®è¨­å®šã¯ã‚µãƒ¼ãƒãƒ¼æ§‹æˆã§è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- `schema_inference_use_cache_for_{file,s3,hdfs,url,azure}` - スキーマ推測ã®ãŸã‚ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’オン/オフã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã®è¨­å®šã¯ã‚¯ã‚¨ãƒªå†…ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ファイルã®å½¢å¼è¨­å®šã‚’変更ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’変更ã§ãã¾ã™ã€‚ +ã“ã®ç†ç”±ã‹ã‚‰ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚½ãƒ¼ã‚¹ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆåã€ä½¿ç”¨ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆè¨­å®šã€ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€çµ‚変更時刻ã«ã‚ˆã£ã¦ã‚¹ã‚­ãƒ¼ãƒžã‚’識別ã—ã¾ã™ã€‚ + +注: `url` テーブル関数ã§ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸä¸€éƒ¨ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯æœ€çµ‚修正時間ã«é–¢ã™ã‚‹æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚±ãƒ¼ã‚¹ã«ç‰¹åˆ¥ãªè¨­å®š `schema_inference_cache_require_modification_time_for_url` ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã‚’無効ã«ã™ã‚‹ã“ã¨ã§ã€æœ€çµ‚変更時間ãªã—ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ç¾åœ¨ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥å†…ã®ã™ã¹ã¦ã®ã‚¹ã‚­ãƒ¼ãƒžã¨ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’クリーンã«ã™ã‚‹ã‚·ã‚¹ãƒ†ãƒ ã‚¯ã‚¨ãƒª `SYSTEM DROP SCHEMA CACHE [FOR File/S3/URL/HDFS]` ã‚’æä¾›ã™ã‚‹ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル [schema_inference_cache](../operations/system-tables/schema_inference_cache.md) ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +**例:** + +s3 ã®ã‚µãƒ³ãƒ—ルデータセット `github-2022.ndjson.gz` ã®æ§‹é€ ã‚’推測ã—ã¦ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒã©ã®ã‚ˆã†ã«æ©Ÿèƒ½ã™ã‚‹ã‹ã‚’見ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +DESCRIBE TABLE s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/github/github-2022.ndjson.gz') +SETTINGS allow_experimental_object_type = 1 +``` +```response +┌─name───────┬─type─────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ type │ Nullable(String) │ │ │ │ │ │ +│ actor │ Object(Nullable('json')) │ │ │ │ │ │ +│ repo │ Object(Nullable('json')) │ │ │ │ │ │ +│ created_at │ Nullable(String) │ │ │ │ │ │ +│ payload │ Object(Nullable('json')) │ │ │ │ │ │ +└────────────┴──────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ + +5 rows in set. Elapsed: 0.601 sec. +``` +```sql +DESCRIBE TABLE s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/github/github-2022.ndjson.gz') +SETTINGS allow_experimental_object_type = 1 +``` +```response +┌─name───────┬─type─────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ type │ Nullable(String) │ │ │ │ │ │ +│ actor │ Object(Nullable('json')) │ │ │ │ │ │ +│ repo │ Object(Nullable('json')) │ │ │ │ │ │ +│ created_at │ Nullable(String) │ │ │ │ │ │ +│ payload │ Object(Nullable('json')) │ │ │ │ │ │ +└────────────┴──────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ + +5 rows in set. Elapsed: 0.059 sec. +``` + +ã”覧ã®ã¨ãŠã‚Šã€2回目ã®ã‚¯ã‚¨ãƒªã¯ã»ã¼å³åº§ã«æˆåŠŸã—ã¾ã—ãŸã€‚ + +スキーマã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ã®ã‚る設定を変更ã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +DESCRIBE TABLE s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/github/github-2022.ndjson.gz') +SETTINGS input_format_json_read_objects_as_strings = 1 + +┌─name───────┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ type │ Nullable(String) │ │ │ │ │ │ +│ actor │ Nullable(String) │ │ │ │ │ │ +│ repo │ Nullable(String) │ │ │ │ │ │ +│ created_at │ Nullable(String) │ │ │ │ │ │ +│ payload │ Nullable(String) │ │ │ │ │ │ +└────────────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ + +5 rows in set. Elapsed: 0.611 sec +``` + +キャッシュã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã¯ã€æŽ¨æ¸¬ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚る設定ãŒå¤‰æ›´ã•ã‚ŒãŸãŸã‚ã€åŒã˜ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“ã§ã—ãŸã€‚ + +`system.schema_inference_cache` テーブルã®å†…容を確èªã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT schema, format, source FROM system.schema_inference_cache WHERE storage='S3' +``` +```response +┌─schema──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─format─┬─source───────────────────────────────────────────────────────────────────────────────────────────────────┠+│ type Nullable(String), actor Object(Nullable('json')), repo Object(Nullable('json')), created_at Nullable(String), payload Object(Nullable('json')) │ NDJSON │ datasets-documentation.s3.eu-west-3.amazonaws.com443/datasets-documentation/github/github-2022.ndjson.gz │ +│ type Nullable(String), actor Nullable(String), repo Nullable(String), created_at Nullable(String), payload Nullable(String) │ NDJSON │ datasets-documentation.s3.eu-west-3.amazonaws.com443/datasets-documentation/github/github-2022.ndjson.gz │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +åŒã˜ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã—ã¦2ã¤ã®ç•°ãªã‚‹ã‚¹ã‚­ãƒ¼ãƒžãŒã‚ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ + +システムクエリを使用ã—ã¦ã‚¹ã‚­ãƒ¼ãƒžã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’クリアã§ãã¾ã™ï¼š +```sql +SYSTEM DROP SCHEMA CACHE FOR S3 +``` +```response +Ok. +``` +```sql +SELECT count() FROM system.schema_inference_cache WHERE storage='S3' +``` +```response +┌─count()─┠+│ 0 │ +└─────────┘ +``` + +## テキストフォーマット {#text-formats} + +テキストフォーマットã®å ´åˆã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’è¡Œã”ã¨ã«èª­ã¿å–ã‚Šã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¾“ã£ã¦ã‚«ãƒ©ãƒ å€¤ã‚’抽出ã—ã€ãã®å¾Œã€ä¸€éƒ¨ã®å†å¸°çš„ãªãƒ‘ーサーã¨ãƒ’ューリスティックを使用ã—ã¦å„値ã®ã‚¿ã‚¤ãƒ—を決定ã—ã¾ã™ã€‚スキーマ推測ã§ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰èª­ã¿å–る最大行数ãŠã‚ˆã³ãƒã‚¤ãƒˆæ•°ã¯ã€`input_format_max_rows_to_read_for_schema_inference`(デフォルト㧠25000)ãŠã‚ˆã³ `input_format_max_bytes_to_read_for_schema_inference`(デフォルト㧠32Mb)ã§åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ +デフォルトã§ã¯ã€ã™ã¹ã¦ã®æŽ¨æ¸¬ã•ã‚ŒãŸã‚¿ã‚¤ãƒ—ã¯[Nullable](../sql-reference/data-types/nullable.md)ã§ã™ãŒã€`schema_inference_make_columns_nullable` を設定ã™ã‚‹ã“ã¨ã§ã“れを変更ã§ãã¾ã™ï¼ˆä¾‹ã¯[テキストフォーマット用ã®è¨­å®š](#settings-for-text-formats)セクションã«ã‚ã‚Šã¾ã™ï¼‰ã€‚ + +### JSONフォーマット {#json-formats} + +JSONフォーマットã§ã¯ã€ClickHouse 㯠JSON 仕様ã«å¾“ã£ã¦å€¤ã‚’解æžã—ã€ãã®å¾Œã€ãれらã«æœ€é©ãªãƒ‡ãƒ¼ã‚¿åž‹ã‚’見ã¤ã‘よã†ã¨ã—ã¾ã™ã€‚ + +ã©ã®ã‚ˆã†ã«æ©Ÿèƒ½ã™ã‚‹ã‹ã€ã©ã®åž‹ã‚’推測ã§ãã‚‹ã®ã‹ã€ãŠã‚ˆã³ JSONフォーマットã§ä½¿ç”¨ã§ãる特定ã®è¨­å®šã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ + +**例** + +ã“ã“ã§ã¯ã€[format](../sql-reference/table-functions/format.md) テーブル関数ãŒä¾‹ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +æ•´æ•°ã€æµ®å‹•å°æ•°ç‚¹æ•°ã€ãƒ–ール値ã€æ–‡å­—列: +```sql +DESC format(JSONEachRow, '{"int" : 42, "float" : 42.42, "string" : "Hello, World!"}'); +``` +```response +┌─name───┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ int │ Nullable(Int64) │ │ │ │ │ │ +│ float │ Nullable(Float64) │ │ │ │ │ │ +│ bool │ Nullable(Bool) │ │ │ │ │ │ +│ string │ Nullable(String) │ │ │ │ │ │ +└────────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +日付ã€æ—¥ä»˜æ™‚刻: + +```sql +DESC format(JSONEachRow, '{"date" : "2022-01-01", "datetime" : "2022-01-01 00:00:00", "datetime64" : "2022-01-01 00:00:00.000"}') +``` +```response +┌─name───────┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ date │ Nullable(Date) │ │ │ │ │ │ +│ datetime │ Nullable(DateTime) │ │ │ │ │ │ +│ datetime64 │ Nullable(DateTime64(9)) │ │ │ │ │ │ +└────────────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +é…列: +```sql +DESC format(JSONEachRow, '{"arr" : [1, 2, 3], "nested_arrays" : [[1, 2, 3], [4, 5, 6], []]}') +``` +```response +┌─name──────────┬─type──────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ arr │ Array(Nullable(Int64)) │ │ │ │ │ │ +│ nested_arrays │ Array(Array(Nullable(Int64))) │ │ │ │ │ │ +└───────────────┴───────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +é…列㫠`null` ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ä»–ã®é…列è¦ç´ ã‹ã‚‰ã®åž‹ã‚’使用ã—ã¾ã™: +```sql +DESC format(JSONEachRow, '{"arr" : [null, 42, null]}') +``` +```response +┌─name─┬─type───────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ arr │ Array(Nullable(Int64)) │ │ │ │ │ │ +└──────┴────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +åå‰ä»˜ãタプル: + +設定 `input_format_json_try_infer_named_tuples_from_objects` ãŒæœ‰åŠ¹ãªå ´åˆã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã®éš›ã« ClickHouseã¯JSONオブジェクトã‹ã‚‰åå‰ä»˜ãタプルを推測ã—よã†ã¨ã—ã¾ã™ã€‚ +ã§ããŸåå‰ä»˜ãタプルã«ã¯ã‚µãƒ³ãƒ—ルデータã®ã™ã¹ã¦ã®å¯¾å¿œã™ã‚‹JSONオブジェクトã®ã™ã¹ã¦ã®è¦ç´ ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +```sql +SET input_format_json_try_infer_named_tuples_from_objects = 1; +DESC format(JSONEachRow, '{"obj" : {"a" : 42, "b" : "Hello"}}, {"obj" : {"a" : 43, "c" : [1, 2, 3]}}, {"obj" : {"d" : {"e" : 42}}}') +``` + +```response +┌─name─┬─type───────────────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ obj │ Tuple(a Nullable(Int64), b Nullable(String), c Array(Nullable(Int64)), d Tuple(e Nullable(Int64))) │ │ │ │ │ │ +└──────┴────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +åå‰ãªã—タプル: + +JSONフォーマットã§ã¯ã€ç•°ãªã‚‹ã‚¿ã‚¤ãƒ—ã®è¦ç´ ã‚’æŒã¤é…列をåå‰ãªã—タプルã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ +```sql +DESC format(JSONEachRow, '{"tuple" : [1, "Hello, World!", [1, 2, 3]]}') +``` +```response +┌─name──┬─type─────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ tuple │ Tuple(Nullable(Int64), Nullable(String), Array(Nullable(Int64))) │ │ │ │ │ │ +└───────┴──────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +一部ã®å€¤ãŒ `null` や空ã®å ´åˆã€ä»–ã®è¡Œã®å¯¾å¿œã™ã‚‹å€¤ã®åž‹ã‚’使用ã—ã¾ã™: +```sql +DESC format(JSONEachRow, $$ + {"tuple" : [1, null, null]} + {"tuple" : [null, "Hello, World!", []]} + {"tuple" : [null, null, [1, 2, 3]]} + $$) +``` +```response +┌─name──┬─type─────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ tuple │ Tuple(Nullable(Int64), Nullable(String), Array(Nullable(Int64))) │ │ │ │ │ │ +└───────┴──────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +マップ: + +JSONã§ã¯ã€åŒã˜åž‹ã®å€¤ã‚’æŒã¤ã‚ªãƒ–ジェクトをMapåž‹ã¨ã—ã¦èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +注æ„: ã“ã‚Œã¯è¨­å®š `input_format_json_read_objects_as_strings` ãŠã‚ˆã³ `input_format_json_try_infer_named_tuples_from_objects` ãŒç„¡åŠ¹ã®å ´åˆã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +```sql +SET input_format_json_read_objects_as_strings = 0, input_format_json_try_infer_named_tuples_from_objects = 0; +DESC format(JSONEachRow, '{"map" : {"key1" : 42, "key2" : 24, "key3" : 4}}') +``` +```response +┌─name─┬─type─────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ map │ Map(String, Nullable(Int64)) │ │ │ │ │ │ +└──────┴──────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +JSONオブジェクト型(設定 `allow_experimental_object_type` ãŒæœ‰åŠ¹ãªå ´åˆï¼‰: + +```sql +SET allow_experimental_object_type = 1 +DESC format(JSONEachRow, $$ + {"obj" : {"key1" : 42}} + {"obj" : {"key2" : "Hello, World!"}} + {"obj" : {"key1" : 24, "key3" : {"a" : 42, "b" : null}}} + $$) +``` +```response +┌─name─┬─type─────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ obj │ Object(Nullable('json')) │ │ │ │ │ │ +└──────┴──────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ãƒã‚¹ãƒˆã—ãŸè¤‡é›‘ãªåž‹: +```sql +DESC format(JSONEachRow, '{"value" : [[[42, 24], []], {"key1" : 42, "key2" : 24}]}') +``` +```response +┌─name──┬─type─────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ value │ Tuple(Array(Array(Nullable(String))), Tuple(key1 Nullable(Int64), key2 Nullable(Int64))) │ │ │ │ │ │ +└───────┴──────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ClickHouseãŒã‚るキーã®åž‹ã‚’決定ã§ããªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãŒnull/空ã®ã‚ªãƒ–ジェクト/空ã®é…列ã ã‘ã‚’å«ã‚€å ´åˆã€`input_format_json_infer_incomplete_types_as_strings` 設定ãŒæœ‰åŠ¹ãªå ´åˆã¯åž‹ `String` ãŒä½¿ç”¨ã•ã‚Œã€ãã†ã§ãªã„å ´åˆã¯ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ï¼š +```sql +DESC format(JSONEachRow, '{"arr" : [null, null]}') SETTINGS input_format_json_infer_incomplete_types_as_strings = 1; +``` +```response +┌─name─┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ arr │ Array(Nullable(String)) │ │ │ │ │ │ +└──────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +DESC format(JSONEachRow, '{"arr" : [null, null]}') SETTINGS input_format_json_infer_incomplete_types_as_strings = 0; +``` +```response +Code: 652. DB::Exception: Received from localhost:9000. DB::Exception: +Cannot determine type for column 'arr' by first 1 rows of data, +most likely this column contains only Nulls or empty Arrays/Maps. +... +``` + +#### JSON設定 {#json-settings} + +##### input_format_json_try_infer_numbers_from_strings + +ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€æ–‡å­—列値ã‹ã‚‰æ•°å€¤ã‚’推測ã§ãã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã§ã™ã€‚ + +**例:** + +```sql +SET input_format_json_try_infer_numbers_from_strings = 1; +DESC format(JSONEachRow, $$ + {"value" : "42"} + {"value" : "424242424242"} + $$) +``` +```response +┌─name──┬─type────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ value │ Nullable(Int64) │ │ │ │ │ │ +└───────┴─────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +##### input_format_json_try_infer_named_tuples_from_objects + +ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€JSONオブジェクトã‹ã‚‰åå‰ä»˜ãタプルを推測ã§ãã¾ã™ã€‚çµæžœã®åå‰ä»˜ãタプルã«ã¯ã€ã‚µãƒ³ãƒ—ルデータã®å¯¾å¿œã™ã‚‹JSONオブジェクトã®ã™ã¹ã¦ã®è¦ç´ ãŒå«ã¾ã‚Œã¾ã™ã€‚ +JSONデータãŒã‚¹ãƒ‘ースã§ãªã„å ´åˆã«ã¯ã€ã“ã®è¨­å®šãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã§ã™ã€‚ + +**例** + +```sql +SET input_format_json_try_infer_named_tuples_from_objects = 1; +DESC format(JSONEachRow, '{"obj" : {"a" : 42, "b" : "Hello"}}, {"obj" : {"a" : 43, "c" : [1, 2, 3]}}, {"obj" : {"d" : {"e" : 42}}}') +``` + +çµæžœ: + +``` +┌─name─┬─type───────────────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ obj │ Tuple(a Nullable(Int64), b Nullable(String), c Array(Nullable(Int64)), d Tuple(e Nullable(Int64))) │ │ │ │ │ │ +└──────┴────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +```sql +SET input_format_json_try_infer_named_tuples_from_objects = 1; +DESC format(JSONEachRow, '{"array" : [{"a" : 42, "b" : "Hello"}, {}, {"c" : [1,2,3]}, {"d" : "2020-01-01"}]}') +``` + +çµæžœ: + +``` +┌─name──┬─type────────────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ array │ Array(Tuple(a Nullable(Int64), b Nullable(String), c Array(Nullable(Int64)), d Nullable(Date))) │ │ │ │ │ │ +└───────┴─────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +##### input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects + +ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€åå‰ä»˜ãタプルã®æŽ¨æ¸¬ä¸­ã«æ›–昧ãªãƒ‘スã«å¯¾ã—ã¦ä¾‹å¤–ã®ä»£ã‚ã‚Šã«String型を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆ`input_format_json_try_infer_named_tuples_from_objects`ãŒæœ‰åŠ¹ãªå ´åˆï¼‰ã€‚ +ã“ã‚Œã«ã‚ˆã‚Šã€æ›–昧ãªãƒ‘スãŒã‚ã£ã¦ã‚‚JSONオブジェクトをåå‰ä»˜ãタプルã¨ã—ã¦èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ + +**例** + +設定無効時: +```sql +SET input_format_json_try_infer_named_tuples_from_objects = 1; +SET input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects = 0; +DESC format(JSONEachRow, '{"obj" : {"a" : 42}}, {"obj" : {"a" : {"b" : "Hello"}}}'); +``` +çµæžœ: + +```text +Code: 636. DB::Exception: The table structure cannot be extracted from a JSONEachRow format file. Error: +Code: 117. DB::Exception: JSON objects have ambiguous data: in some objects path 'a' has type 'Int64' and in some - 'Tuple(b String)'. You can enable setting input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects to use String type for path 'a'. (INCORRECT_DATA) (version 24.3.1.1). +You can specify the structure manually. (CANNOT_EXTRACT_TABLE_STRUCTURE) +``` + +設定有効時: +```sql +SET input_format_json_try_infer_named_tuples_from_objects = 1; +SET input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects = 1; +DESC format(JSONEachRow, '{"obj" : "a" : 42}, {"obj" : {"a" : {"b" : "Hello"}}}'); +SELECT * FROM format(JSONEachRow, '{"obj" : {"a" : 42}}, {"obj" : {"a" : {"b" : "Hello"}}}'); +``` + +çµæžœ: +```text +┌─name─┬─type──────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ obj │ Tuple(a Nullable(String)) │ │ │ │ │ │ +└──────┴───────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +┌─obj─────────────────┠+│ ('42') │ +│ ('{"b" : "Hello"}') │ +└─────────────────────┘ +``` + +##### input_format_json_read_objects_as_strings + +ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€å…¥ã‚Œå­ã«ãªã£ãŸJSONオブジェクトを文字列ã¨ã—ã¦èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +ã“ã®è¨­å®šã¯ã€JSONオブジェクト型を使用ã›ãšã«å…¥ã‚Œå­ã«ãªã£ãŸJSONオブジェクトを読ã¿å–ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã§ã™ã€‚ + +注æ„: ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹å ´åˆã¯ã€`input_format_json_try_infer_named_tuples_from_objects`も無効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +SET input_format_json_read_objects_as_strings = 1, input_format_json_try_infer_named_tuples_from_objects = 0; +DESC format(JSONEachRow, $$ + {"obj" : {"key1" : 42, "key2" : [1,2,3,4]}} + {"obj" : {"key3" : {"nested_key" : 1}}} + $$) +``` +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ obj │ Nullable(String) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + + +##### input_format_json_read_numbers_as_strings + +ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€æ•°å€¤å€¤ã‚’文字列ã¨ã—ã¦èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã§ã™ã€‚ + +**例** + +```sql +SET input_format_json_read_numbers_as_strings = 1; +DESC format(JSONEachRow, $$ + {"value" : 1055} + {"value" : "unknown"} + $$) +``` +```response +┌─name──┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ value │ Nullable(String) │ │ │ │ │ │ +└───────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +##### input_format_json_read_bools_as_numbers + +ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€Bool値を数値ã¨ã—ã¦èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã§ã™ã€‚ + +**例:** + +```sql +SET input_format_json_read_bools_as_numbers = 1; +DESC format(JSONEachRow, $$ + {"value" : true} + {"value" : 42} + $$) +``` +```response +┌─name──┬─type────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ value │ Nullable(Int64) │ │ │ │ │ │ +└───────┴─────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +##### input_format_json_read_bools_as_strings + +ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€Bool値を文字列ã¨ã—ã¦èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã§ã™ã€‚ + +**例:** + +```sql +SET input_format_json_read_bools_as_strings = 1; +DESC format(JSONEachRow, $$ + {"value" : true} + {"value" : "Hello, World"} + $$) +``` +```response +┌─name──┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ value │ Nullable(String) │ │ │ │ │ │ +└───────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +##### input_format_json_read_arrays_as_strings + +ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€JSONé…列値を文字列ã¨ã—ã¦èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã§ã™ã€‚ + +**例** + +```sql +SET input_format_json_read_arrays_as_strings = 1; +SELECT arr, toTypeName(arr), JSONExtractArrayRaw(arr)[3] from format(JSONEachRow, 'arr String', '{"arr" : [1, "Hello", [1,2,3]]}'); +``` +```response +┌─arr───────────────────┬─toTypeName(arr)─┬─arrayElement(JSONExtractArrayRaw(arr), 3)─┠+│ [1, "Hello", [1,2,3]] │ String │ [1,2,3] │ +└───────────────────────┴─────────────────┴───────────────────────────────────────────┘ +``` + +##### input_format_json_infer_incomplete_types_as_strings + +ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬æ™‚ã«ã‚µãƒ³ãƒ—ルデータ㫠`Null`/`{}`/`[]` ã®ã¿ã‚’å«ã‚€JSONキーã«å¯¾ã—ã¦String型を使用ã§ãã¾ã™ã€‚ +JSONフォーマットã§ã¯ã€ã™ã¹ã¦ã®å¯¾å¿œã™ã‚‹è¨­å®šãŒæœ‰åŠ¹ã§ã‚ã‚Œã°ã€ä»»æ„ã®å€¤ã‚’文字列ã¨ã—ã¦èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ä¸­ã«`Cannot determine type for column 'column_name' by first 25000 rows of data, most likely this column contains only Nulls or empty Arrays/Maps` ã®ã‚ˆã†ãªã‚¨ãƒ©ãƒ¼ã‚’回é¿ã™ã‚‹ãŸã‚ã«ã‚­ãƒ¼ã®åž‹ãŒä¸æ˜Žãªå ´åˆã«æ–‡å­—列型を使用ã§ãã¾ã™ã€‚ + +例: + +```sql +SET input_format_json_infer_incomplete_types_as_strings = 1, input_format_json_try_infer_named_tuples_from_objects = 1; +DESCRIBE format(JSONEachRow, '{"obj" : {"a" : [1,2,3], "b" : "hello", "c" : null, "d" : {}, "e" : []}}'); +SELECT * FROM format(JSONEachRow, '{"obj" : {"a" : [1,2,3], "b" : "hello", "c" : null, "d" : {}, "e" : []}}'); +``` + +çµæžœ: +``` +┌─name─┬─type───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ obj │ Tuple(a Array(Nullable(Int64)), b Nullable(String), c Nullable(String), d Nullable(String), e Array(Nullable(String))) │ │ │ │ │ │ +└──────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ + +┌─obj────────────────────────────┠+│ ([1,2,3],'hello',NULL,'{}',[]) │ +└────────────────────────────────┘ +``` + +### CSV {#csv} + +CSVフォーマットã§ã¯ã€ClickHouseã¯ãƒ‡ãƒªãƒŸã‚¿ã«å¾“ã£ã¦è¡Œã‹ã‚‰ã‚«ãƒ©ãƒ å€¤ã‚’抽出ã—ã¾ã™ã€‚ClickHouseã¯ã€æ•°å€¤ã‚„文字列以外ã®å…¨ã¦ã®åž‹ã‚’ダブルクオートã§å›²ã‚€ã“ã¨ã‚’期待ã—ã¦ã„ã¾ã™ã€‚値ãŒãƒ€ãƒ–ルクオートã§å›²ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ä¸­ã®ãƒ‡ãƒ¼ã‚¿ã‚’å†å¸°ãƒ‘ーサーを使用ã—ã¦è§£æžã—ã€ãã®å¾Œã€æœ€ã‚‚é©åˆ‡ãªãƒ‡ãƒ¼ã‚¿åž‹ã‚’見ã¤ã‘よã†ã¨ã—ã¾ã™ã€‚値ãŒãƒ€ãƒ–ルクオートã§å›²ã¾ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯ãれを数値ã¨ã—ã¦è§£æžã—ã€æ•°å€¤ã§ãªã„å ´åˆã€ClickHouseã¯ãれを文字列ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ + +ClickHouseãŒãƒ‘ーサーã¨ãƒ’ューリスティックを使ã£ã¦è¤‡é›‘ãªåž‹ã‚’決定ã—ãªã„よã†ã«ã—ãŸã„å ´åˆã¯ã€è¨­å®š `input_format_csv_use_best_effort_in_schema_inference` を無効ã«ã™ã‚‹ã“ã¨ãŒã§ãã€ClickHouseã¯ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’文字列ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ + +設定 `input_format_csv_detect_header` ãŒæœ‰åŠ¹ãªå ´åˆã€ClickHouseã¯ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中ã«ã‚«ãƒ©ãƒ å(ãŠãらã型も)をå«ã‚€ãƒ˜ãƒƒãƒ€ã‚’検出ã—よã†ã¨ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã§ã™ã€‚ + +**例:** + +æ•´æ•°ã€æµ®å‹•å°æ•°ç‚¹æ•°ã€ãƒ–ール値ã€æ–‡å­—列: +```sql +DESC format(CSV, '42,42.42,true,"Hello,World!"') +``` +```response +┌─name─┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(Int64) │ │ │ │ │ │ +│ c2 │ Nullable(Float64) │ │ │ │ │ │ +│ c3 │ Nullable(Bool) │ │ │ │ │ │ +│ c4 │ Nullable(String) │ │ │ │ │ │ +└──────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +引用符ãªã—ã®æ–‡å­—列: +```sql +DESC format(CSV, 'Hello world!,World hello!') +``` +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(String) │ │ │ │ │ │ +│ c2 │ Nullable(String) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +日付ã€æ—¥ä»˜æ™‚刻: + +```sql +DESC format(CSV, '"2020-01-01","2020-01-01 00:00:00","2022-01-01 00:00:00.000"') +``` +```response +┌─name─┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(Date) │ │ │ │ │ │ +│ c2 │ Nullable(DateTime) │ │ │ │ │ │ +│ c3 │ Nullable(DateTime64(9)) │ │ │ │ │ │ +└──────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +é…列: +```sql +DESC format(CSV, '"[1,2,3]","[[1, 2], [], [3, 4]]"') +``` +```response +┌─name─┬─type──────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Array(Nullable(Int64)) │ │ │ │ │ │ +│ c2 │ Array(Array(Nullable(Int64))) │ │ │ │ │ │ +└──────┴───────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +DESC format(CSV, $$"['Hello', 'world']","[['Abc', 'Def'], []]"$$) +``` +```response +┌─name─┬─type───────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Array(Nullable(String)) │ │ │ │ │ │ +│ c2 │ Array(Array(Nullable(String))) │ │ │ │ │ │ +└──────┴────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +é…列ã«nullãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ä»–ã®é…列è¦ç´ ã‹ã‚‰ã®åž‹ã‚’使用ã—ã¾ã™: +```sql +DESC format(CSV, '"[NULL, 42, NULL]"') +``` +```response +┌─name─┬─type───────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Array(Nullable(Int64)) │ │ │ │ │ │ +└──────┴────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +マップ: +```sql +DESC format(CSV, $$"{'key1' : 42, 'key2' : 24}"$$) +``` +```response +┌─name─┬─type─────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Map(String, Nullable(Int64)) │ │ │ │ │ │ +└──────┴──────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ãƒã‚¹ãƒˆã—ãŸé…列ã¨ãƒžãƒƒãƒ—: +```sql +DESC format(CSV, $$"[{'key1' : [[42, 42], []], 'key2' : [[null], [42]]}]"$$) +``` +```response +┌─name─┬─type──────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Array(Map(String, Array(Array(Nullable(Int64))))) │ │ │ │ │ │ +└──────┴───────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ClickHouseãŒå¼•ç”¨ç¬¦å†…ã®åž‹ã‚’決定ã§ããªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã«nullã—ã‹å«ã¾ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯ãれをStringã¨ã—ã¦æ‰±ã„ã¾ã™: +```sql +DESC format(CSV, '"[NULL, NULL]"') +``` +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(String) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +設定 `input_format_csv_use_best_effort_in_schema_inference` を無効ã«ã—ãŸä¾‹: +```sql +SET input_format_csv_use_best_effort_in_schema_inference = 0 +DESC format(CSV, '"[1,2,3]",42.42,Hello World!') +``` +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(String) │ │ │ │ │ │ +│ c2 │ Nullable(String) │ │ │ │ │ │ +│ c3 │ Nullable(String) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ヘッダー自動検出ã®ä¾‹ï¼ˆ`input_format_csv_detect_header` ãŒæœ‰åŠ¹ãªå ´åˆï¼‰ï¼š + +åå‰ã®ã¿: +```sql +SELECT * FROM format(CSV, +$$"number","string","array" +42,"Hello","[1, 2, 3]" +43,"World","[4, 5, 6]" +$$) +``` + +```response +┌─number─┬─string─┬─array───┠+│ 42 │ Hello │ [1,2,3] │ +│ 43 │ World │ [4,5,6] │ +└────────┴────────┴─────────┘ +``` + +åå‰ã¨åž‹: + +```sql +DESC format(CSV, +$$"number","string","array" +"UInt32","String","Array(UInt16)" +42,"Hello","[1, 2, 3]" +43,"World","[4, 5, 6]" +$$) +``` + +```response +┌─name───┬─type──────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ number │ UInt32 │ │ │ │ │ │ +│ string │ String │ │ │ │ │ │ +│ array │ Array(UInt16) │ │ │ │ │ │ +└────────┴───────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +注æ„: ヘッダーã¯ã€å°‘ãªãã¨ã‚‚1ã¤ã®ã‚«ãƒ©ãƒ ãŒéžæ–‡å­—列型ã§ã‚ã‚‹å ´åˆã®ã¿æ¤œå‡ºã•ã‚Œã¾ã™ã€‚ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒæ–‡å­—列型ã§ã‚ã‚‹å ´åˆã€ãƒ˜ãƒƒãƒ€ãƒ¼ã¯æ¤œå‡ºã•ã‚Œã¾ã›ã‚“: + +```sql +SELECT * FROM format(CSV, +$$"first_column","second_column" +"Hello","World" +"World","Hello" +$$) +``` + +```response +┌─c1───────────┬─c2────────────┠+│ first_column │ second_column │ +│ Hello │ World │ +│ World │ Hello │ +└──────────────┴───────────────┘ +``` + +#### CSV設定 {#csv-settings} + +##### input_format_csv_try_infer_numbers_from_strings + +ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€æ–‡å­—列値ã‹ã‚‰æ•°å€¤ã‚’推測ã§ãã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã§ã™ã€‚ + +**例:** + +```sql +SET input_format_json_try_infer_numbers_from_strings = 1; +DESC format(CSV, '42,42.42'); +``` +```response +┌─name─┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(Int64) │ │ │ │ │ │ +│ c2 │ Nullable(Float64) │ │ │ │ │ │ +└──────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +### TSV/TSKV {#tsv-tskv} + +TSV/TSKVフォーマットã§ã¯ã€ClickHouseã¯ã‚¿ãƒ–区切り文字ã«å¾“ã£ã¦è¡Œã‹ã‚‰ã‚«ãƒ©ãƒ å€¤ã‚’抽出ã—ã€ãã®å¾Œã€å†å¸°ãƒ‘ーサーを使用ã—ã¦æŠ½å‡ºã•ã‚ŒãŸå€¤ã‚’解æžã—ã€æœ€ã‚‚é©åˆ‡ãªåž‹ã‚’決定ã—ã¾ã™ã€‚åž‹ãŒæ±ºå®šã§ããªã„å ´åˆã€ClickHouseã¯ã“ã®å€¤ã‚’文字列ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ + +ClickHouseãŒãƒ‘ーサーã¨ãƒ’ューリスティックを使ã£ã¦è¤‡é›‘ãªåž‹ã‚’決定ã—ãªã„よã†ã«ã—ãŸã„å ´åˆã¯ã€è¨­å®š `input_format_tsv_use_best_effort_in_schema_inference` を無効ã«ã™ã‚‹ã“ã¨ãŒã§ãã€ClickHouseã¯ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’文字列ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ + +設定 `input_format_tsv_detect_header` ãŒæœ‰åŠ¹ãªå ´åˆã€ClickHouseã¯ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中ã«ã‚«ãƒ©ãƒ å(ãŠãらã型も)をå«ã‚€ãƒ˜ãƒƒãƒ€ã‚’検出ã—よã†ã¨ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã§ã™ã€‚ + +**例:** + +æ•´æ•°ã€æµ®å‹•å°æ•°ç‚¹æ•°ã€ãƒ–ール値ã€æ–‡å­—列: +```sql +DESC format(TSV, '42\t42.42\ttrue\tHello,World!') +``` +```response +┌─name─┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(Int64) │ │ │ │ │ │ +│ c2 │ Nullable(Float64) │ │ │ │ │ │ +│ c3 │ Nullable(Bool) │ │ │ │ │ │ +│ c4 │ Nullable(String) │ │ │ │ │ │ +└──────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +DESC format(TSKV, 'int=42\tfloat=42.42\tbool=true\tstring=Hello,World!\n') +``` +```response +┌─name───┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ int │ Nullable(Int64) │ │ │ │ │ │ +│ float │ Nullable(Float64) │ │ │ │ │ │ +│ bool │ Nullable(Bool) │ │ │ │ │ │ +│ string │ Nullable(String) │ │ │ │ │ │ +└────────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +日付ã€æ—¥ä»˜æ™‚刻: + +```sql +DESC format(TSV, '2020-01-01\t2020-01-01 00:00:00\t2022-01-01 00:00:00.000') +``` +```response +┌─name─┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(Date) │ │ │ │ │ │ +│ c2 │ Nullable(DateTime) │ │ │ │ │ │ +│ c3 │ Nullable(DateTime64(9)) │ │ │ │ │ │ +└──────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +é…列: +```sql +DESC format(TSV, '[1,2,3]\t[[1, 2], [], [3, 4]]') +``` +```response +┌─name─┬─type──────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Array(Nullable(Int64)) │ │ │ │ │ │ +│ c2 │ Array(Array(Nullable(Int64))) │ │ │ │ │ │ +└──────┴───────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +DESC format(TSV, '[''Hello'', ''world'']\t[[''Abc'', ''Def''], []]') +``` +```response +┌─name─┬─type───────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Array(Nullable(String)) │ │ │ │ │ │ +│ c2 │ Array(Array(Nullable(String))) │ │ │ │ │ │ +└──────┴────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +é…列ã«nullãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ä»–ã®é…列è¦ç´ ã‹ã‚‰ã®åž‹ã‚’使用ã—ã¾ã™: +```sql +DESC format(TSV, '[NULL, 42, NULL]') +``` +```response +┌─name─┬─type───────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Array(Nullable(Int64)) │ │ │ │ │ │ +└──────┴────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + + +Tuples: +```sql +DESC format(TSV, $$(42, 'Hello, world!')$$) +``` +```response +┌─name─┬─type─────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Tuple(Nullable(Int64), Nullable(String)) │ │ │ │ │ │ +└──────┴──────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +Maps: +```sql +DESC format(TSV, $${'key1' : 42, 'key2' : 24}$$) +``` +```response +┌─name─┬─type─────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Map(String, Nullable(Int64)) │ │ │ │ │ │ +└──────┴──────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ãƒã‚¹ãƒˆã•ã‚ŒãŸé…列ã€ã‚¿ãƒ—ルã€ãƒžãƒƒãƒ—: +```sql +DESC format(TSV, $$[{'key1' : [(42, 'Hello'), (24, NULL)], 'key2' : [(NULL, ','), (42, 'world!')]}]$$) +``` +```response +┌─name─┬─type────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Array(Map(String, Array(Tuple(Nullable(Int64), Nullable(String))))) │ │ │ │ │ │ +└──────┴─────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ClickHouseãŒåž‹ã‚’判別ã§ããªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãŒnullã®ã¿ã‚’å«ã‚€ãŸã‚ã€ClickHouseã¯ãれをStringã¨ã—ã¦æ‰±ã„ã¾ã™: +```sql +DESC format(TSV, '[NULL, NULL]') +``` +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(String) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +設定 `input_format_tsv_use_best_effort_in_schema_inference` ãŒç„¡åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã®ä¾‹: +```sql +SET input_format_tsv_use_best_effort_in_schema_inference = 0 +DESC format(TSV, '[1,2,3] 42.42 Hello World!') +``` +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(String) │ │ │ │ │ │ +│ c2 │ Nullable(String) │ │ │ │ │ │ +│ c3 │ Nullable(String) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ヘッダーã®è‡ªå‹•æ¤œå‡ºã®ä¾‹ï¼ˆ`input_format_tsv_detect_header` ãŒæœ‰åŠ¹ãªå ´åˆï¼‰: + +åå‰ã®ã¿: +```sql +SELECT * FROM format(TSV, +$$number string array +42 Hello [1, 2, 3] +43 World [4, 5, 6] +$$); +``` + +```response +┌─number─┬─string─┬─array───┠+│ 42 │ Hello │ [1,2,3] │ +│ 43 │ World │ [4,5,6] │ +└────────┴────────┴─────────┘ +``` + +åå‰ã¨åž‹: + +```sql +DESC format(TSV, +$$number string array +UInt32 String Array(UInt16) +42 Hello [1, 2, 3] +43 World [4, 5, 6] +$$) +``` + +```response +┌─name───┬─type──────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ number │ UInt32 │ │ │ │ │ │ +│ string │ String │ │ │ │ │ │ +│ array │ Array(UInt16) │ │ │ │ │ │ +└────────┴───────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒStringåž‹ã®å ´åˆã€ãƒ˜ãƒƒãƒ€ãƒ¼ã¯æ¤œå‡ºã•ã‚Œãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„: + +```sql +SELECT * FROM format(TSV, +$$first_column second_column +Hello World +World Hello +$$) +``` + +```response +┌─c1───────────┬─c2────────────┠+│ first_column │ second_column │ +│ Hello │ World │ +│ World │ Hello │ +└──────────────┴───────────────┘ +``` + +### Values {#values} + +Valueså½¢å¼ã§ã¯ã€ClickHouseã¯è¡Œã‹ã‚‰ã‚«ãƒ©ãƒ å€¤ã‚’抽出ã—ã€ãã®å¾Œãƒªãƒ†ãƒ©ãƒ«ã‚’解æžã™ã‚‹ã®ã«ä¼¼ãŸå†å¸°çš„ãªãƒ‘ーサーを使用ã—ã¦è§£æžã—ã¾ã™ã€‚ + +**例:** + +æ•´æ•°ã€æµ®å‹•å°æ•°ç‚¹ã€ãƒ–ールã€æ–‡å­—列: +```sql +DESC format(Values, $$(42, 42.42, true, 'Hello,World!')$$) +``` +```response +┌─name─┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(Int64) │ │ │ │ │ │ +│ c2 │ Nullable(Float64) │ │ │ │ │ │ +│ c3 │ Nullable(Bool) │ │ │ │ │ │ +│ c4 │ Nullable(String) │ │ │ │ │ │ +└──────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +日付ã€æ—¥æ™‚: + +```sql + DESC format(Values, $$('2020-01-01', '2020-01-01 00:00:00', '2022-01-01 00:00:00.000')$$) + ``` +```response +┌─name─┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(Date) │ │ │ │ │ │ +│ c2 │ Nullable(DateTime) │ │ │ │ │ │ +│ c3 │ Nullable(DateTime64(9)) │ │ │ │ │ │ +└──────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +é…列: +```sql +DESC format(Values, '([1,2,3], [[1, 2], [], [3, 4]])') +``` +```response +┌─name─┬─type──────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Array(Nullable(Int64)) │ │ │ │ │ │ +│ c2 │ Array(Array(Nullable(Int64))) │ │ │ │ │ │ +└──────┴───────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +é…列ã«nullãŒå«ã¾ã‚Œã‚‹å ´åˆã€ClickHouseã¯ä»–ã®é…列è¦ç´ ã‹ã‚‰ã‚¿ã‚¤ãƒ—を使用ã—ã¾ã™: +```sql +DESC format(Values, '([NULL, 42, NULL])') +``` +```response +┌─name─┬─type───────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Array(Nullable(Int64)) │ │ │ │ │ │ +└──────┴────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +タプル: +```sql +DESC format(Values, $$((42, 'Hello, world!'))$$) +``` +```response +┌─name─┬─type─────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Tuple(Nullable(Int64), Nullable(String)) │ │ │ │ │ │ +└──────┴──────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +マップ: +```sql +DESC format(Values, $$({'key1' : 42, 'key2' : 24})$$) +``` +```response +┌─name─┬─type─────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Map(String, Nullable(Int64)) │ │ │ │ │ │ +└──────┴──────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ãƒã‚¹ãƒˆã•ã‚ŒãŸé…列ã€ã‚¿ãƒ—ルã€ãŠã‚ˆã³ãƒžãƒƒãƒ—: +```sql +DESC format(Values, $$([{'key1' : [(42, 'Hello'), (24, NULL)], 'key2' : [(NULL, ','), (42, 'world!')]}])$$) +``` +```response +┌─name─┬─type────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Array(Map(String, Array(Tuple(Nullable(Int64), Nullable(String))))) │ │ │ │ │ │ +└──────┴─────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ClickHouseãŒåž‹ã‚’判別ã§ããªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãŒnullã®ã¿ã‚’å«ã‚€ãŸã‚ã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™: +```sql +DESC format(Values, '([NULL, NULL])') +``` +```response +Code: 652. DB::Exception: Received from localhost:9000. DB::Exception: +Cannot determine type for column 'c1' by first 1 rows of data, +most likely this column contains only Nulls or empty Arrays/Maps. +... +``` + +設定 `input_format_tsv_use_best_effort_in_schema_inference` ãŒç„¡åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã®ä¾‹: +```sql +SET input_format_tsv_use_best_effort_in_schema_inference = 0 +DESC format(TSV, '[1,2,3] 42.42 Hello World!') +``` +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(String) │ │ │ │ │ │ +│ c2 │ Nullable(String) │ │ │ │ │ │ +│ c3 │ Nullable(String) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +### CustomSeparated {#custom-separated} + +CustomSeparatedå½¢å¼ã§ã¯ã€ClickHouseã¯ã¾ãšè¡Œã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸåŒºåˆ‡ã‚Šæ–‡å­—ã«å¾“ã£ã¦ã‚«ãƒ©ãƒ å€¤ã‚’ã™ã¹ã¦æŠ½å‡ºã—ã€æ¬¡ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールã«å¾“ã£ã¦ãã‚Œãžã‚Œã®å€¤ã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’推測ã—よã†ã¨ã—ã¾ã™ã€‚ + +設定 `input_format_custom_detect_header` ãŒæœ‰åŠ¹ã§ã‚ã‚Œã°ã€ClickHouseã¯ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ä¸­ã«ã‚«ãƒ©ãƒ å(ãŠã‚ˆã³å ´åˆã«ã‚ˆã£ã¦ã¯åž‹ï¼‰ã‚’å«ã‚€ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’検出ã—よã†ã¨ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +**例** + +```sql +SET format_custom_row_before_delimiter = '', + format_custom_row_after_delimiter = '\n', + format_custom_row_between_delimiter = '\n', + format_custom_result_before_delimiter = '\n', + format_custom_result_after_delimiter = '\n', + format_custom_field_delimiter = '', + format_custom_escaping_rule = 'Quoted' + +DESC format(CustomSeparated, $$ +42.42'Some string 1'[1, NULL, 3] + +NULL'Some string 3'[1, 2, NULL] + +$$) +``` +```response +┌─name─┬─type───────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(Float64) │ │ │ │ │ │ +│ c2 │ Nullable(String) │ │ │ │ │ │ +│ c3 │ Array(Nullable(Int64)) │ │ │ │ │ │ +└──────┴────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ヘッダー自動検出ã®ä¾‹ï¼ˆ`input_format_custom_detect_header` ãŒæœ‰åŠ¹ãªå ´åˆï¼‰ + +```sql +SET format_custom_row_before_delimiter = '', + format_custom_row_after_delimiter = '\n', + format_custom_row_between_delimiter = '\n', + format_custom_result_before_delimiter = '\n', + format_custom_result_after_delimiter = '\n', + format_custom_field_delimiter = '', + format_custom_escaping_rule = 'Quoted' + +DESC format(CustomSeparated, $$ +'number''string''array' + +42.42'Some string 1'[1, NULL, 3] + +NULL'Some string 3'[1, 2, NULL] + +$$) +``` + +```response +┌─number─┬─string────────┬─array──────┠+│ 42.42 │ Some string 1 │ [1,NULL,3] │ +│ á´ºáµá´¸á´¸ │ Some string 3 │ [1,2,NULL] │ +└────────┴───────────────┴────────────┘ +``` + +### Template {#template} + +Templateå½¢å¼ã§ã¯ã€ClickHouseã¯ã¾ãšæŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ³ãƒ—レートã«å¾“ã£ã¦è¡Œã‹ã‚‰ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ å€¤ã‚’抽出ã—ã€ãã®å¾Œã€ãã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールã«å¾“ã£ã¦ãã‚Œãžã‚Œã®å€¤ã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’推測ã—ã¾ã™ã€‚ + +**例** + +次ã®å†…容ã®ãƒ•ã‚¡ã‚¤ãƒ« `resultset` ãŒã‚ã‚‹ã¨ã—ã¾ã™: +``` + +${data} +``` + +ãã—ã¦æ¬¡ã®å†…容ã®ãƒ•ã‚¡ã‚¤ãƒ« `row_format` ãŒã‚ã‚‹ã¨ã—ã¾ã™: +``` +${column_1:CSV}${column_2:Quoted}${column_3:JSON} +``` + +次ã®ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™: + +```sql +SET format_template_rows_between_delimiter = '\n', + format_template_row = 'row_format', + format_template_resultset = 'resultset_format' + +DESC format(Template, $$ +42.42'Some string 1'[1, null, 2] + +\N'Some string 3'[1, 2, null] + +$$) +``` +```response +┌─name─────┬─type───────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ column_1 │ Nullable(Float64) │ │ │ │ │ │ +│ column_2 │ Nullable(String) │ │ │ │ │ │ +│ column_3 │ Array(Nullable(Int64)) │ │ │ │ │ │ +└──────────┴────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +### Regexp {#regexp} + +Templateã¨åŒæ§˜ã«ã€Regexpå½¢å¼ã§ã¯ClickHouseãŒæ­£è¦è¡¨ç¾ã«å¾“ã£ã¦è¡Œã‹ã‚‰ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ å€¤ã‚’抽出ã—ã€ãã®å¾Œã€æŒ‡å®šã•ã‚ŒãŸã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルールã«å¾“ã£ã¦ãã‚Œãžã‚Œã®å€¤ã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’推測ã—ã¾ã™ã€‚ + +**例** + +```sql +SET format_regexp = '^Line: value_1=(.+?), value_2=(.+?), value_3=(.+?)', + format_regexp_escaping_rule = 'CSV' + +DESC format(Regexp, $$Line: value_1=42, value_2="Some string 1", value_3="[1, NULL, 3]" +Line: value_1=2, value_2="Some string 2", value_3="[4, 5, NULL]"$$) +``` +```response +┌─name─┬─type───────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(Int64) │ │ │ │ │ │ +│ c2 │ Nullable(String) │ │ │ │ │ │ +│ c3 │ Array(Nullable(Int64)) │ │ │ │ │ │ +└──────┴────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +### テキストフォーマット用ã®è¨­å®š {#settings-for-text-formats} + +#### input_format_max_rows_to_read_for_schema_inference/input_format_max_bytes_to_read_for_schema_inference + +ã“れらã®è¨­å®šã¯ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ä¸­ã«èª­ã¿è¾¼ã‚€ãƒ‡ãƒ¼ã‚¿ã®é‡ã‚’制御ã—ã¾ã™ã€‚ +より多ãã®è¡Œ/ãƒã‚¤ãƒˆã‚’読ã¿è¾¼ã‚€ã»ã©ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã«è²»ã‚„ã•ã‚Œã‚‹æ™‚é–“ãŒå¢—ãˆã¾ã™ãŒã€åž‹ã‚’æ­£ã—ã判別ã§ãã‚‹å¯èƒ½æ€§ãŒé«˜ã¾ã‚Šã¾ã™ï¼ˆç‰¹ã«ãƒ‡ãƒ¼ã‚¿ã«å¤šãã®nullãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆï¼‰ã€‚ + +デフォルト値: +- `input_format_max_rows_to_read_for_schema_inference` 㯠`25000`。 +- `input_format_max_bytes_to_read_for_schema_inference` 㯠`33554432` (32 Mb)。 + +#### column_names_for_schema_inference + +明示的ãªã‚«ãƒ©ãƒ åãŒãªã„å½¢å¼ã§ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã«ä½¿ç”¨ã™ã‚‹ã‚«ãƒ©ãƒ åã®ãƒªã‚¹ãƒˆã€‚指定ã•ã‚ŒãŸåå‰ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã® `c1,c2,c3,...` ã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚å½¢å¼: `column1,column2,column3,...`。 + +**例** + +```sql +DESC format(TSV, 'Hello, World! 42 [1, 2, 3]') settings column_names_for_schema_inference = 'str,int,arr' +``` +```response +┌─name─┬─type───────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ str │ Nullable(String) │ │ │ │ │ │ +│ int │ Nullable(Int64) │ │ │ │ │ │ +│ arr │ Array(Nullable(Int64)) │ │ │ │ │ │ +└──────┴────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +#### schema_inference_hints + +自動的ã«åˆ¤åˆ¥ã•ã‚ŒãŸåž‹ã®ä»£ã‚ã‚Šã«ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã§ä½¿ç”¨ã™ã‚‹ã‚«ãƒ©ãƒ åã¨åž‹ã®ãƒªã‚¹ãƒˆã€‚å½¢å¼: 'column_name1 column_type1, column_name2 column_type2, ...'。 +ã“ã®è¨­å®šã¯ã€è‡ªå‹•çš„ã«åˆ¤åˆ¥ã§ããªã‹ã£ãŸã‚«ãƒ©ãƒ ã®åž‹ã‚’指定ã™ã‚‹ã‹ã€ã‚¹ã‚­ãƒ¼ãƒžæœ€é©åŒ–ã®ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**例** + +```sql +DESC format(JSONEachRow, '{"id" : 1, "age" : 25, "name" : "Josh", "status" : null, "hobbies" : ["football", "cooking"]}') SETTINGS schema_inference_hints = 'age LowCardinality(UInt8), status Nullable(String)', allow_suspicious_low_cardinality_types=1 +``` +```response +┌─name────┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ id │ Nullable(Int64) │ │ │ │ │ │ +│ age │ LowCardinality(UInt8) │ │ │ │ │ │ +│ name │ Nullable(String) │ │ │ │ │ │ +│ status │ Nullable(String) │ │ │ │ │ │ +│ hobbies │ Array(Nullable(String)) │ │ │ │ │ │ +└─────────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +#### schema_inference_make_columns_nullable + +nullå¯èƒ½æ€§ã«é–¢ã™ã‚‹æƒ…å ±ãŒãªã„å½¢å¼ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã§ã€æŽ¨æ¸¬ã•ã‚ŒãŸåž‹ã‚’ `Nullable` ã«ã™ã‚‹ã‹ã‚’制御ã—ã¾ã™ã€‚ +ã“ã®è¨­å®šãŒæœ‰åŠ¹ãªå ´åˆã€ã™ã¹ã¦ã®æŽ¨æ¸¬ã•ã‚ŒãŸåž‹ã¯ `Nullable` ã«ãªã‚Šã¾ã™ã€‚無効ãªå ´åˆã€æŽ¨æ¸¬ã•ã‚ŒãŸåž‹ã¯æ±ºã—㦠`Nullable` ã«ã¯ãªã‚Šã¾ã›ã‚“。`auto` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ä¸­ã«è§£æžã•ã‚ŒãŸã‚µãƒ³ãƒ—ルã§ã‚«ãƒ©ãƒ ã« `NULL` ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã¾ãŸã¯ãƒ•ã‚¡ã‚¤ãƒ«ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ã‚«ãƒ©ãƒ ã®nullå¯èƒ½æ€§ã«é–¢ã™ã‚‹æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã®ã¿ã€æŽ¨æ¸¬ã•ã‚ŒãŸåž‹ã¯ `Nullable` ã«ãªã‚Šã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã§ã™ã€‚ + +**例** + +```sql +SET schema_inference_make_columns_nullable = 1 +DESC format(JSONEachRow, $$ + {"id" : 1, "age" : 25, "name" : "Josh", "status" : null, "hobbies" : ["football", "cooking"]} + {"id" : 2, "age" : 19, "name" : "Alan", "status" : "married", "hobbies" : ["tennis", "art"]} + $$) +``` +```response +┌─name────┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ id │ Nullable(Int64) │ │ │ │ │ │ +│ age │ Nullable(Int64) │ │ │ │ │ │ +│ name │ Nullable(String) │ │ │ │ │ │ +│ status │ Nullable(String) │ │ │ │ │ │ +│ hobbies │ Array(Nullable(String)) │ │ │ │ │ │ +└─────────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +SET schema_inference_make_columns_nullable = 'auto'; +DESC format(JSONEachRow, $$ + {"id" : 1, "age" : 25, "name" : "Josh", "status" : null, "hobbies" : ["football", "cooking"]} + {"id" : 2, "age" : 19, "name" : "Alan", "status" : "married", "hobbies" : ["tennis", "art"]} + $$) +``` +```response +┌─name────┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ id │ Int64 │ │ │ │ │ │ +│ age │ Int64 │ │ │ │ │ │ +│ name │ String │ │ │ │ │ │ +│ status │ Nullable(String) │ │ │ │ │ │ +│ hobbies │ Array(String) │ │ │ │ │ │ +└─────────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +```sql +SET schema_inference_make_columns_nullable = 0; +DESC format(JSONEachRow, $$ + {"id" : 1, "age" : 25, "name" : "Josh", "status" : null, "hobbies" : ["football", "cooking"]} + {"id" : 2, "age" : 19, "name" : "Alan", "status" : "married", "hobbies" : ["tennis", "art"]} + $$) +``` +```response + +┌─name────┬─type──────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ id │ Int64 │ │ │ │ │ │ +│ age │ Int64 │ │ │ │ │ │ +│ name │ String │ │ │ │ │ │ +│ status │ String │ │ │ │ │ │ +│ hobbies │ Array(String) │ │ │ │ │ │ +└─────────┴───────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +#### input_format_try_infer_integers + +有効ã«ã™ã‚‹ã¨ã€ClickHouseã¯ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã§æ•´æ•°ã‚’浮動å°æ•°ç‚¹ã®ä»£ã‚ã‚Šã«æŽ¨æ¸¬ã—よã†ã¨ã—ã¾ã™ã€‚ +サンプルデータã®ã‚«ãƒ©ãƒ å†…ã®ã™ã¹ã¦ã®æ•°å€¤ãŒæ•´æ•°ã§ã‚ã‚Œã°ã€çµæžœã®åž‹ã¯ `Int64` ã«ãªã‚Šã¾ã™ã€‚å°‘ãªãã¨ã‚‚1ã¤ã®æ•°å€¤ãŒæµ®å‹•å°æ•°ç‚¹ã§ã‚ã‚‹å ´åˆã€çµæžœã®åž‹ã¯ `Float64` ã«ãªã‚Šã¾ã™ã€‚ +サンプルデータãŒæ•´æ•°ã®ã¿ã‚’å«ã¿ã€å°‘ãªãã¨ã‚‚1ã¤ã®æ•´æ•°ãŒæ­£ã§ `Int64` をオーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã™ã‚‹å ´åˆã€ClickHouse㯠`UInt64` を推測ã—ã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã§ã™ã€‚ + +**例** + +```sql +SET input_format_try_infer_integers = 0 +DESC format(JSONEachRow, $$ + {"number" : 1} + {"number" : 2} + $$) +``` +```response +┌─name───┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ number │ Nullable(Float64) │ │ │ │ │ │ +└────────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +SET input_format_try_infer_integers = 1 +DESC format(JSONEachRow, $$ + {"number" : 1} + {"number" : 2} + $$) +``` +```response +┌─name───┬─type────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ number │ Nullable(Int64) │ │ │ │ │ │ +└────────┴─────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +DESC format(JSONEachRow, $$ + {"number" : 1} + {"number" : 18446744073709551615} + $$) +``` +```response +┌─name───┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ number │ Nullable(UInt64) │ │ │ │ │ │ +└────────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +DESC format(JSONEachRow, $$ + {"number" : 1} + {"number" : 2.2} + $$) +``` +```response +┌─name───┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ number │ Nullable(Float64) │ │ │ │ │ │ +└────────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +#### input_format_try_infer_datetimes + +有効ã«ã™ã‚‹ã¨ã€ClickHouseã¯ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã§ `DateTime` ã¾ãŸã¯ `DateTime64` 型を文字列フィールドã‹ã‚‰æŽ¨æ¸¬ã—よã†ã¨ã—ã¾ã™ã€‚ +サンプルデータ内ã®ã‚«ãƒ©ãƒ ã‹ã‚‰ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒæ—¥æ™‚ã¨ã—ã¦æ­£å¸¸ã«è§£æžã•ã‚ŒãŸå ´åˆã€çµæžœã®åž‹ã¯ `DateTime` ã¾ãŸã¯ï¼ˆä»»æ„ã®æ—¥æ™‚ãŒå°‘数部をæŒã£ã¦ã„ã‚‹å ´åˆï¼‰`DateTime64(9)` ã«ãªã‚Šã¾ã™ã€‚ +å°‘ãªãã¨ã‚‚1ã¤ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒæ—¥æ™‚ã¨ã—ã¦è§£æžã•ã‚Œãªã‹ã£ãŸå ´åˆã€çµæžœã®åž‹ã¯ `String` ã«ãªã‚Šã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã§ã™ã€‚ + +**例** + +```sql +SET input_format_try_infer_datetimes = 0; +DESC format(JSONEachRow, $$ + {"datetime" : "2021-01-01 00:00:00", "datetime64" : "2021-01-01 00:00:00.000"} + {"datetime" : "2022-01-01 00:00:00", "datetime64" : "2022-01-01 00:00:00.000"} + $$) +``` +```response +┌─name───────┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ datetime │ Nullable(String) │ │ │ │ │ │ +│ datetime64 │ Nullable(String) │ │ │ │ │ │ +└────────────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +SET input_format_try_infer_datetimes = 1; +DESC format(JSONEachRow, $$ + {"datetime" : "2021-01-01 00:00:00", "datetime64" : "2021-01-01 00:00:00.000"} + {"datetime" : "2022-01-01 00:00:00", "datetime64" : "2022-01-01 00:00:00.000"} + $$) +``` +```response +┌─name───────┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ datetime │ Nullable(DateTime) │ │ │ │ │ │ +│ datetime64 │ Nullable(DateTime64(9)) │ │ │ │ │ │ +└────────────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +DESC format(JSONEachRow, $$ + {"datetime" : "2021-01-01 00:00:00", "datetime64" : "2021-01-01 00:00:00.000"} + {"datetime" : "unknown", "datetime64" : "unknown"} + $$) +``` +```response +┌─name───────┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ datetime │ Nullable(String) │ │ │ │ │ │ +│ datetime64 │ Nullable(String) │ │ │ │ │ │ +└────────────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +#### input_format_try_infer_datetimes_only_datetime64 + +有効ã«ã™ã‚‹ã¨ã€`input_format_try_infer_datetimes` ãŒæœ‰åŠ¹ãªå ´åˆã€æ—¥æ™‚ã®å€¤ãŒå°æ•°éƒ¨ã‚’å«ã¾ãªã„å ´åˆã§ã‚‚ClickHouseã¯å¸¸ã« `DateTime64(9)` を推測ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ + +**例** + +```sql +SET input_format_try_infer_datetimes = 1; +SET input_format_try_infer_datetimes_only_datetime64 = 1; +DESC format(JSONEachRow, $$ + {"datetime" : "2021-01-01 00:00:00", "datetime64" : "2021-01-01 00:00:00.000"} + {"datetime" : "2022-01-01 00:00:00", "datetime64" : "2022-01-01 00:00:00.000"} + $$) +``` + +```text +┌─name───────┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ datetime │ Nullable(DateTime64(9)) │ │ │ │ │ │ +│ datetime64 │ Nullable(DateTime64(9)) │ │ │ │ │ │ +└────────────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +注æ„: スキーマ推測中ã®æ—¥æ™‚ã®è§£æžã¯ã€è¨­å®š [date_time_input_format](/docs/ja/operations/settings/settings-formats.md#date_time_input_format) ã«å½±éŸ¿ã•ã‚Œã¾ã™ + +#### input_format_try_infer_dates + +有効ã«ã™ã‚‹ã¨ã€ClickHouseã¯ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã§ `Date` 型を文字列フィールドã‹ã‚‰æŽ¨æ¸¬ã—よã†ã¨ã—ã¾ã™ã€‚ +サンプルデータ内ã®ã‚«ãƒ©ãƒ ã‹ã‚‰ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒæ—¥ä»˜ã¨ã—ã¦æ­£å¸¸ã«è§£æžã•ã‚ŒãŸå ´åˆã€çµæžœã®åž‹ã¯ `Date` ã«ãªã‚Šã¾ã™ã€‚ +å°‘ãªãã¨ã‚‚1ã¤ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒæ—¥ä»˜ã¨ã—ã¦è§£æžã•ã‚Œãªã‹ã£ãŸå ´åˆã€çµæžœã®åž‹ã¯ `String` ã«ãªã‚Šã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã§ã™ã€‚ + +**例** + +```sql +SET input_format_try_infer_datetimes = 0, input_format_try_infer_dates = 0 +DESC format(JSONEachRow, $$ + {"date" : "2021-01-01"} + {"date" : "2022-01-01"} + $$) +``` +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ date │ Nullable(String) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +SET input_format_try_infer_dates = 1 +DESC format(JSONEachRow, $$ + {"date" : "2021-01-01"} + {"date" : "2022-01-01"} + $$) +``` +```response +┌─name─┬─type───────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ date │ Nullable(Date) │ │ │ │ │ │ +└──────┴────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` +```sql +DESC format(JSONEachRow, $$ + {"date" : "2021-01-01"} + {"date" : "unknown"} + $$) +``` +```response +┌─name─┬─type─────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ date │ Nullable(String) │ │ │ │ │ │ +└──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +#### input_format_try_infer_exponent_floats + +有効ã«ã™ã‚‹ã¨ã€ClickHouseã¯ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ï¼ˆJSONを除ã)ã§æŒ‡æ•°å½¢å¼ã®æµ®å‹•å°æ•°ç‚¹ã‚’推測ã—よã†ã¨ã—ã¾ã™ï¼ˆæŒ‡æ•°å½¢å¼ã®æ•°å€¤ã¯å¸¸ã«æŽ¨æ¸¬ã•ã‚Œã¾ã™ï¼‰ã€‚ + +デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ + +**例** + +```sql +SET input_format_try_infer_exponent_floats = 1; +DESC format(CSV, +$$1.1E10 +2.3e-12 +42E00 +$$) +``` +```response +┌─name─┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ c1 │ Nullable(Float64) │ │ │ │ │ │ +└──────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +## 自己記述型フォーマット {#self-describing-formats} + +自己記述型フォーマットã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãã®ã‚‚ã®ã«ãƒ‡ãƒ¼ã‚¿ã®æ§‹é€ ã«é–¢ã™ã‚‹æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ +ãŸã¨ãˆã°ã€èª¬æ˜Žã‚’å«ã‚€ãƒ˜ãƒƒãƒ€ãƒ¼ã€ãƒã‚¤ãƒŠãƒªåž‹ãƒ„リーã€ã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ルã®ã‚ˆã†ãªã‚‚ã®ãŒã‚ã‚Šã¾ã™ã€‚ +ClickHouseã¯ã“ã†ã—ãŸå½¢å¼ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰è‡ªå‹•çš„ã«ã‚¹ã‚­ãƒ¼ãƒžã‚’推測ã™ã‚‹ãŸã‚ã€ã‚¿ã‚¤ãƒ—ã«é–¢ã™ã‚‹æƒ…報をå«ã‚€éƒ¨åˆ†ã‚’読ã¿è¾¼ã¿ã€ +ClickHouseテーブルã®ã‚¹ã‚­ãƒ¼ãƒžã«ãれを変æ›ã—ã¾ã™ã€‚ + +### -WithNamesAndTypes サフィックスãŒã‚るフォーマット {#formats-with-names-and-types} + +ClickHouseã¯ã€ä¸€éƒ¨ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ -WithNamesAndTypes をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã®ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒå®Ÿéš›ã®ãƒ‡ãƒ¼ã‚¿ã®å‰ã«ã‚«ãƒ©ãƒ åã¨åž‹ã‚’å«ã‚€2ã¤ã®è¿½åŠ è¡Œã‚’æŒã£ã¦ã„ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +ã“ã®ã‚ˆã†ãªå½¢å¼ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ä¸­ã«ã€ClickHouseã¯æœ€åˆã®2行を読ã¿ã€ã‚«ãƒ©ãƒ åã¨åž‹ã‚’抽出ã—ã¾ã™ã€‚ + +**例** + +```sql +DESC format(TSVWithNamesAndTypes, +$$num str arr +UInt8 String Array(UInt8) +42 Hello, World! [1,2,3] +$$) +``` +```response +┌─name─┬─type─────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ num │ UInt8 │ │ │ │ │ │ +│ str │ String │ │ │ │ │ │ +│ arr │ Array(UInt8) │ │ │ │ │ │ +└──────┴──────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +### メタデータをæŒã¤JSONフォーマット {#json-with-metadata} + +ã„ãã¤ã‹ã®JSONå…¥åŠ›å½¢å¼ ([JSON](formats.md#json), [JSONCompact](formats.md#json-compact), [JSONColumnsWithMetadata](formats.md#jsoncolumnswithmetadata)) ã¯ã€ã‚«ãƒ©ãƒ åã¨åž‹ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ +ã“ã®ã‚ˆã†ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã§ã¯ã€ClickHouseã¯ã“ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã¿ã¾ã™ã€‚ + +**例** +```sql +DESC format(JSON, $$ +{ + "meta": + [ + { + "name": "num", + "type": "UInt8" + }, + { + "name": "str", + "type": "String" + }, + { + "name": "arr", + "type": "Array(UInt8)" + } + ], + + "data": + [ + { + "num": 42, + "str": "Hello, World", + "arr": [1,2,3] + } + ], + + "rows": 1, + + "statistics": + { + "elapsed": 0.005723915, + "rows_read": 1, + "bytes_read": 1 + } +} +$$) +``` +```response +┌─name─┬─type─────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ num │ UInt8 │ │ │ │ │ │ +│ str │ String │ │ │ │ │ │ +│ arr │ Array(UInt8) │ │ │ │ │ │ +└──────┴──────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +### Avro {#avro} + +Avroå½¢å¼ã§ã¯ã€ClickHouseãŒãƒ‡ãƒ¼ã‚¿ã‹ã‚‰ãã®ã‚¹ã‚­ãƒ¼ãƒžã‚’読ã¿è¾¼ã¿ã€æ¬¡ã®åž‹ã®ãƒžãƒƒãƒãƒ³ã‚°ã‚’使用ã—ã¦ClickHouseスキーマã«å¤‰æ›ã—ã¾ã™ã€‚ + +| Avroデータ型 | ClickHouseデータ型 | +|------------------------------------|--------------------------------------------------------------------------------| +| `boolean` | [Bool](../sql-reference/data-types/boolean.md) | +| `int` | [Int32](../sql-reference/data-types/int-uint.md) | +| `int (date)` \* | [Date32](../sql-reference/data-types/date32.md) | +| `long` | [Int64](../sql-reference/data-types/int-uint.md) | +| `float` | [Float32](../sql-reference/data-types/float.md) | +| `double` | [Float64](../sql-reference/data-types/float.md) | +| `bytes`, `string` | [String](../sql-reference/data-types/string.md) | +| `fixed` | [FixedString(N)](../sql-reference/data-types/fixedstring.md) | +| `enum` | [Enum](../sql-reference/data-types/enum.md) | +| `array(T)` | [Array(T)](../sql-reference/data-types/array.md) | +| `union(null, T)`, `union(T, null)` | [Nullable(T)](../sql-reference/data-types/date.md) | +| `null` | [Nullable(Nothing)](../sql-reference/data-types/special-data-types/nothing.md) | +| `string (uuid)` \* | [UUID](../sql-reference/data-types/uuid.md) | +| `binary (decimal)` \* | [Decimal(P, S)](../sql-reference/data-types/decimal.md) | + +\* [Avroè«–ç†åž‹](https://avro.apache.org/docs/current/spec.html#Logical+Types) + +ãã®ä»–ã®Avroåž‹ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +### Parquet {#parquet} + +Parquetå½¢å¼ã§ã¯ã€ClickHouseãŒãã®ã‚¹ã‚­ãƒ¼ãƒžã‚’データã‹ã‚‰èª­ã¿è¾¼ã¿ã€æ¬¡ã®åž‹ã®ãƒžãƒƒãƒãƒ³ã‚°ã‚’使用ã—ã¦ClickHouseスキーマã«å¤‰æ›ã—ã¾ã™ã€‚ + +| Parquetデータ型 | ClickHouseデータ型 | +|------------------------------|---------------------------------------------------------| +| `BOOL` | [Bool](../sql-reference/data-types/boolean.md) | +| `UINT8` | [UInt8](../sql-reference/data-types/int-uint.md) | +| `INT8` | [Int8](../sql-reference/data-types/int-uint.md) | +| `UINT16` | [UInt16](../sql-reference/data-types/int-uint.md) | +| `INT16` | [Int16](../sql-reference/data-types/int-uint.md) | +| `UINT32` | [UInt32](../sql-reference/data-types/int-uint.md) | +| `INT32` | [Int32](../sql-reference/data-types/int-uint.md) | +| `UINT64` | [UInt64](../sql-reference/data-types/int-uint.md) | +| `INT64` | [Int64](../sql-reference/data-types/int-uint.md) | +| `FLOAT` | [Float32](../sql-reference/data-types/float.md) | +| `DOUBLE` | [Float64](../sql-reference/data-types/float.md) | +| `DATE` | [Date32](../sql-reference/data-types/date32.md) | +| `TIME (ms)` | [DateTime](../sql-reference/data-types/datetime.md) | +| `TIMESTAMP`, `TIME (us, ns)` | [DateTime64](../sql-reference/data-types/datetime64.md) | +| `STRING`, `BINARY` | [String](../sql-reference/data-types/string.md) | +| `DECIMAL` | [Decimal](../sql-reference/data-types/decimal.md) | +| `LIST` | [Array](../sql-reference/data-types/array.md) | +| `STRUCT` | [Tuple](../sql-reference/data-types/tuple.md) | +| `MAP` | [Map](../sql-reference/data-types/map.md) | + +ãã®ä»–ã®Parquetåž‹ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。デフォルトã§ã¯ã€ã™ã¹ã¦ã®æŽ¨æ¸¬ã•ã‚ŒãŸåž‹ã¯ `Nullable` 内ã«ã‚ã‚Šã¾ã™ãŒã€è¨­å®š `schema_inference_make_columns_nullable` を使用ã—ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ + +### Arrow {#arrow} + +Arrowå½¢å¼ã§ã¯ã€ClickHouseãŒãã®ã‚¹ã‚­ãƒ¼ãƒžã‚’データã‹ã‚‰èª­ã¿è¾¼ã¿ã€æ¬¡ã®åž‹ã®ãƒžãƒƒãƒãƒ³ã‚°ã‚’使用ã—ã¦ClickHouseスキーマã«å¤‰æ›ã—ã¾ã™ã€‚ + +| Arrowデータ型 | ClickHouseデータ型 | +|---------------------------------|---------------------------------------------------------| +| `BOOL` | [Bool](../sql-reference/data-types/boolean.md) | +| `UINT8` | [UInt8](../sql-reference/data-types/int-uint.md) | +| `INT8` | [Int8](../sql-reference/data-types/int-uint.md) | +| `UINT16` | [UInt16](../sql-reference/data-types/int-uint.md) | +| `INT16` | [Int16](../sql-reference/data-types/int-uint.md) | +| `UINT32` | [UInt32](../sql-reference/data-types/int-uint.md) | +| `INT32` | [Int32](../sql-reference/data-types/int-uint.md) | +| `UINT64` | [UInt64](../sql-reference/data-types/int-uint.md) | +| `INT64` | [Int64](../sql-reference/data-types/int-uint.md) | +| `FLOAT`, `HALF_FLOAT` | [Float32](../sql-reference/data-types/float.md) | +| `DOUBLE` | [Float64](../sql-reference/data-types/float.md) | +| `DATE32` | [Date32](../sql-reference/data-types/date32.md) | +| `DATE64` | [DateTime](../sql-reference/data-types/datetime.md) | +| `TIMESTAMP`, `TIME32`, `TIME64` | [DateTime64](../sql-reference/data-types/datetime64.md) | +| `STRING`, `BINARY` | [String](../sql-reference/data-types/string.md) | +| `DECIMAL128`, `DECIMAL256` | [Decimal](../sql-reference/data-types/decimal.md) | +| `LIST` | [Array](../sql-reference/data-types/array.md) | +| `STRUCT` | [Tuple](../sql-reference/data-types/tuple.md) | +| `MAP` | [Map](../sql-reference/data-types/map.md) | + +ãã®ä»–ã®Arrowåž‹ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。デフォルトã§ã¯ã€ã™ã¹ã¦ã®æŽ¨æ¸¬ã•ã‚ŒãŸåž‹ã¯ `Nullable` 内ã«ã‚ã‚Šã¾ã™ãŒã€è¨­å®š `schema_inference_make_columns_nullable` を使用ã—ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ + +### ORC {#orc} + +ORCå½¢å¼ã§ã¯ã€ClickHouseãŒãã®ã‚¹ã‚­ãƒ¼ãƒžã‚’データã‹ã‚‰èª­ã¿è¾¼ã¿ã€æ¬¡ã®åž‹ã®ãƒžãƒƒãƒãƒ³ã‚°ã‚’使用ã—ã¦ClickHouseスキーマã«å¤‰æ›ã—ã¾ã™ã€‚ + +| ORCデータ型 | ClickHouseデータ型 | +|--------------------------------------|---------------------------------------------------------| +| `Boolean` | [Bool](../sql-reference/data-types/boolean.md) | +| `Tinyint` | [Int8](../sql-reference/data-types/int-uint.md) | +| `Smallint` | [Int16](../sql-reference/data-types/int-uint.md) | +| `Int` | [Int32](../sql-reference/data-types/int-uint.md) | +| `Bigint` | [Int64](../sql-reference/data-types/int-uint.md) | +| `Float` | [Float32](../sql-reference/data-types/float.md) | +| `Double` | [Float64](../sql-reference/data-types/float.md) | +| `Date` | [Date32](../sql-reference/data-types/date32.md) | +| `Timestamp` | [DateTime64](../sql-reference/data-types/datetime64.md) | +| `String`, `Char`, `Varchar`,`BINARY` | [String](../sql-reference/data-types/string.md) | +| `Decimal` | [Decimal](../sql-reference/data-types/decimal.md) | +| `List` | [Array](../sql-reference/data-types/array.md) | +| `Struct` | [Tuple](../sql-reference/data-types/tuple.md) | +| `Map` | [Map](../sql-reference/data-types/map.md) | + +ãã®ä»–ã®ORCåž‹ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。デフォルトã§ã¯ã€ã™ã¹ã¦ã®æŽ¨æ¸¬ã•ã‚ŒãŸåž‹ã¯ `Nullable` 内ã«ã‚ã‚Šã¾ã™ãŒã€è¨­å®š `schema_inference_make_columns_nullable` を使用ã—ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ + +### Native {#native} + +ãƒã‚¤ãƒ†ã‚£ãƒ–å½¢å¼ã¯ClickHouse内部ã§ä½¿ç”¨ã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿ã«ã‚¹ã‚­ãƒ¼ãƒžã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ +スキーマ推測ã§ã¯ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã‚’変æ›ãªã—ã«èª­ã¿å–ã‚Šã¾ã™ã€‚ + +## 外部スキーマをæŒã¤ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ {#formats-with-external-schema} + +ãã®ã‚ˆã†ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€ç‰¹å®šã®ã‚¹ã‚­ãƒ¼ãƒžè¨€èªžã§ã®å¤–部ファイルã§ãƒ‡ãƒ¼ã‚¿ã‚’記述ã™ã‚‹ã‚¹ã‚­ãƒ¼ãƒžãŒå¿…è¦ã§ã™ã€‚ +ClickHouseã¯è‡ªå‹•çš„ã«ã“ã†ã—ãŸå½¢å¼ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã‚’推測ã™ã‚‹ãŸã‚ã«ã€å¤–部スキーマを別ファイルã‹ã‚‰èª­ã¿å–ã‚Šã€ãれをClickHouseテーブルスキーマã«å¤‰æ›ã—ã¾ã™ã€‚ + +### Protobuf {#protobuf} + +Protobufå½¢å¼ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã§ã¯ã€æ¬¡ã®åž‹ã®ãƒžãƒƒãƒãƒ³ã‚°ã‚’使用ã—ã¾ã™: + +| Protobufデータ型 | ClickHouseデータ型 | +|-------------------------------|---------------------------------------------------| +| `bool` | [UInt8](../sql-reference/data-types/int-uint.md) | +| `float` | [Float32](../sql-reference/data-types/float.md) | +| `double` | [Float64](../sql-reference/data-types/float.md) | +| `int32`, `sint32`, `sfixed32` | [Int32](../sql-reference/data-types/int-uint.md) | +| `int64`, `sint64`, `sfixed64` | [Int64](../sql-reference/data-types/int-uint.md) | +| `uint32`, `fixed32` | [UInt32](../sql-reference/data-types/int-uint.md) | +| `uint64`, `fixed64` | [UInt64](../sql-reference/data-types/int-uint.md) | +| `string`, `bytes` | [String](../sql-reference/data-types/string.md) | +| `enum` | [Enum](../sql-reference/data-types/enum.md) | +| `repeated T` | [Array(T)](../sql-reference/data-types/array.md) | +| `message`, `group` | [Tuple](../sql-reference/data-types/tuple.md) | + +### CapnProto {#capnproto} + +CapnProtoå½¢å¼ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã§ã¯ã€æ¬¡ã®åž‹ã®ãƒžãƒƒãƒãƒ³ã‚°ã‚’使用ã—ã¾ã™: + +| CapnProtoデータ型 | ClickHouseデータ型 | +|------------------------------------|--------------------------------------------------------| +| `Bool` | [UInt8](../sql-reference/data-types/int-uint.md) | +| `Int8` | [Int8](../sql-reference/data-types/int-uint.md) | +| `UInt8` | [UInt8](../sql-reference/data-types/int-uint.md) | +| `Int16` | [Int16](../sql-reference/data-types/int-uint.md) | +| `UInt16` | [UInt16](../sql-reference/data-types/int-uint.md) | +| `Int32` | [Int32](../sql-reference/data-types/int-uint.md) | +| `UInt32` | [UInt32](../sql-reference/data-types/int-uint.md) | +| `Int64` | [Int64](../sql-reference/data-types/int-uint.md) | +| `UInt64` | [UInt64](../sql-reference/data-types/int-uint.md) | +| `Float32` | [Float32](../sql-reference/data-types/float.md) | +| `Float64` | [Float64](../sql-reference/data-types/float.md) | +| `Text`, `Data` | [String](../sql-reference/data-types/string.md) | +| `enum` | [Enum](../sql-reference/data-types/enum.md) | +| `List` | [Array](../sql-reference/data-types/array.md) | +| `struct` | [Tuple](../sql-reference/data-types/tuple.md) | +| `union(T, Void)`, `union(Void, T)` | [Nullable(T)](../sql-reference/data-types/nullable.md) | + +## å¼·ã„åž‹ã®ãƒã‚¤ãƒŠãƒªå½¢å¼ {#strong-typed-binary-formats} + +ã“ã®ã‚ˆã†ãªå½¢å¼ã§ã¯ã€å„シリアライズã•ã‚ŒãŸå€¤ã«ãã®åž‹ã«é–¢ã™ã‚‹æƒ…報(ãŠã‚ˆã³å ´åˆã«ã‚ˆã£ã¦ã¯ãã‚Œã«é–¢ã™ã‚‹åå‰ï¼‰ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ãƒ†ãƒ¼ãƒ–ル全体ã«é–¢ã™ã‚‹æƒ…å ±ã¯ã‚ã‚Šã¾ã›ã‚“。 +ClickHouseã¯ã“ã®ã‚ˆã†ãªå½¢å¼ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã‚’è¡Œã†ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ã‚’è¡Œã”ã¨ã«èª­ã¿è¾¼ã¿ï¼ˆ`input_format_max_rows_to_read_for_schema_inference` è¡Œã¾ãŸã¯ `input_format_max_bytes_to_read_for_schema_inference` ãƒã‚¤ãƒˆã¾ã§ï¼‰ã€ +データã‹ã‚‰å„値ã«å¯¾ã™ã‚‹åž‹ï¼ˆãŠã‚ˆã³å ´åˆã«ã‚ˆã£ã¦ã¯åå‰ï¼‰ã‚’抽出ã—ã€ã“れらã®åž‹ã‚’ClickHouseã®åž‹ã«å¤‰æ›ã—ã¾ã™ã€‚ + +### MsgPack {#msgpack} + +MsgPackå½¢å¼ã§ã¯ã€è¡Œé–“ã®åŒºåˆ‡ã‚ŠãŒãªã„ãŸã‚ã€ã“ã®å½¢å¼ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨æ¸¬ã‚’è¡Œã†å ´åˆã¯ã€ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ æ•°ã‚’設定 `input_format_msgpack_number_of_columns` を使用ã—ã¦æŒ‡å®šã—ã¦ãã ã•ã„。ClickHouseã¯æ¬¡ã®åž‹ã®ãƒžãƒƒãƒãƒ³ã‚°ã‚’使用ã—ã¾ã™: + +| MessagePackデータ型 (`INSERT`) | ClickHouseデータ型 | +|--------------------------------------------------------------------|-----------------------------------------------------------| +| `int N`, `uint N`, `negative fixint`, `positive fixint` | [Int64](../sql-reference/data-types/int-uint.md) | +| `bool` | [UInt8](../sql-reference/data-types/int-uint.md) | +| `fixstr`, `str 8`, `str 16`, `str 32`, `bin 8`, `bin 16`, `bin 32` | [String](../sql-reference/data-types/string.md) | +| `float 32` | [Float32](../sql-reference/data-types/float.md) | +| `float 64` | [Float64](../sql-reference/data-types/float.md) | +| `uint 16` | [Date](../sql-reference/data-types/date.md) | +| `uint 32` | [DateTime](../sql-reference/data-types/datetime.md) | +| `uint 64` | [DateTime64](../sql-reference/data-types/datetime.md) | +| `fixarray`, `array 16`, `array 32` | [Array](../sql-reference/data-types/array.md) | +| `fixmap`, `map 16`, `map 32` | [Map](../sql-reference/data-types/map.md) | + +デフォルトã§ã¯ã€ã™ã¹ã¦ã®æŽ¨æ¸¬ã•ã‚ŒãŸåž‹ã¯ `Nullable` 内ã«ã‚ã‚Šã¾ã™ãŒã€è¨­å®š `schema_inference_make_columns_nullable` を使用ã—ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ +### BSONEachRow {#bsoneachrow} + +BSONEachRowã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®å„è¡ŒãŒBSONドキュメントã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚スキーマ推論ã«ãŠã„ã¦ã€ClickHouseã¯BSONドキュメントを一ã¤ãšã¤èª­ã¿å–ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰å€¤ã€åå‰ã€ã‚¿ã‚¤ãƒ—を抽出ã—ã¦ã€æ¬¡ã®ã‚¿ã‚¤ãƒ—マッãƒã‚’使用ã—ã¦ã“れらã®ã‚¿ã‚¤ãƒ—ã‚’ClickHouseタイプã«å¤‰æ›ã—ã¾ã™ï¼š + +| BSON Type | ClickHouse type | +|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------| +| `\x08` boolean | [Bool](../sql-reference/data-types/boolean.md) | +| `\x10` int32 | [Int32](../sql-reference/data-types/int-uint.md) | +| `\x12` int64 | [Int64](../sql-reference/data-types/int-uint.md) | +| `\x01` double | [Float64](../sql-reference/data-types/float.md) | +| `\x09` datetime | [DateTime64](../sql-reference/data-types/datetime64.md) | +| `\x05` binary with`\x00` binary subtype, `\x02` string, `\x0E` symbol, `\x0D` JavaScript code | [String](../sql-reference/data-types/string.md) | +| `\x07` ObjectId, | [FixedString(12)](../sql-reference/data-types/fixedstring.md) | +| `\x05` binary with `\x04` uuid subtype, size = 16 | [UUID](../sql-reference/data-types/uuid.md) | +| `\x04` array | [Array](../sql-reference/data-types/array.md)/[Tuple](../sql-reference/data-types/tuple.md) (if nested types are different) | +| `\x03` document | [Named Tuple](../sql-reference/data-types/tuple.md)/[Map](../sql-reference/data-types/map.md) (with String keys) | + +デフォルトã§ã¯ã€ã™ã¹ã¦ã®æŽ¨è«–ã•ã‚ŒãŸã‚¿ã‚¤ãƒ—ã¯`Nullable`内ã«ã‚ã‚Šã¾ã™ãŒã€è¨­å®š`schema_inference_make_columns_nullable`を使用ã—ã¦å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 定数スキーマをæŒã¤ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ {#formats-with-constant-schema} + +ã“ã®ã‚ˆã†ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ãƒ‡ãƒ¼ã‚¿ã¯å¸¸ã«åŒã˜ã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¡ã¾ã™ã€‚ + +### LineAsString {#line-as-string} + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰è¡Œå…¨ä½“ã‚’`String`データ型ã®å˜ä¸€ã®ã‚«ãƒ©ãƒ ã¨ã—ã¦èª­ã¿å–ã‚Šã¾ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§æŽ¨è«–ã•ã‚ŒãŸã‚¿ã‚¤ãƒ—ã¯å¸¸ã«`String`ã§ã‚ã‚Šã€ã‚«ãƒ©ãƒ åã¯`line`ã§ã™ã€‚ + +**例** + +```sql +DESC format(LineAsString, 'Hello\nworld!') +``` +```response +┌─name─┬─type───┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ line │ String │ │ │ │ │ │ +└──────┴────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +### JSONAsString {#json-as-string} + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰JSONオブジェクト全体を`String`データ型ã®å˜ä¸€ã®ã‚«ãƒ©ãƒ ã¨ã—ã¦èª­ã¿å–ã‚Šã¾ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§æŽ¨è«–ã•ã‚ŒãŸã‚¿ã‚¤ãƒ—ã¯å¸¸ã«`String`ã§ã‚ã‚Šã€ã‚«ãƒ©ãƒ åã¯`json`ã§ã™ã€‚ + +**例** + +```sql +DESC format(JSONAsString, '{"x" : 42, "y" : "Hello, World!"}') +``` +```response +┌─name─┬─type───┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ json │ String │ │ │ │ │ │ +└──────┴────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +### JSONAsObject {#json-as-object} + +ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰JSONオブジェクト全体を`Object('json')`データ型ã®å˜ä¸€ã®ã‚«ãƒ©ãƒ ã¨ã—ã¦èª­ã¿å–ã‚Šã¾ã™ã€‚推論ã•ã‚ŒãŸã‚¿ã‚¤ãƒ—ã¯å¸¸ã«`String`ã§ã‚ã‚Šã€ã‚«ãƒ©ãƒ åã¯`json`ã§ã™ã€‚ + +注æ„: ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯`allow_experimental_object_type`ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã®ã¿å‹•ä½œã—ã¾ã™ã€‚ + +**例** + +```sql +DESC format(JSONAsString, '{"x" : 42, "y" : "Hello, World!"}') SETTINGS allow_experimental_object_type=1 +``` +```response +┌─name─┬─type───────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ json │ Object('json') │ │ │ │ │ │ +└──────┴────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +## スキーマ推論モード {#schema-inference-modes} + +データファイルã®ã‚»ãƒƒãƒˆã‹ã‚‰ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã¯2ã¤ã®ç•°ãªã‚‹ãƒ¢ãƒ¼ãƒ‰ã§å‹•ä½œã—ã¾ã™ï¼š`default`ãŠã‚ˆã³`union`。ã“ã®ãƒ¢ãƒ¼ãƒ‰ã¯è¨­å®š`schema_inference_mode`ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ + +### デフォルトモード {#default-schema-inference-mode} + +デフォルトモードã§ã¯ã€ClickHouseã¯ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒåŒã˜ã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¤ã¨ä»®å®šã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’一ã¤ãšã¤èª­ã¿å–ã‚Šã€æˆåŠŸã™ã‚‹ã¾ã§ã‚¹ã‚­ãƒ¼ãƒžã‚’推論ã—よã†ã¨ã—ã¾ã™ã€‚ + +例: + +次ã®å†…容をæŒã¤3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«`data1.jsonl`ã€`data2.jsonl`ã€`data3.jsonl`ãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š + +`data1.jsonl`: +```json +{"field1" : 1, "field2" : null} +{"field1" : 2, "field2" : null} +{"field1" : 3, "field2" : null} +``` + +`data2.jsonl`: +```json +{"field1" : 4, "field2" : "Data4"} +{"field1" : 5, "field2" : "Data5"} +{"field1" : 6, "field2" : "Data5"} +``` + +`data3.jsonl`: +```json +{"field1" : 7, "field2" : "Data7", "field3" : [1, 2, 3]} +{"field1" : 8, "field2" : "Data8", "field3" : [4, 5, 6]} +{"field1" : 9, "field2" : "Data9", "field3" : [7, 8, 9]} +``` + +ã“れら3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–を試ã¿ã¾ã—ょã†ï¼š +```sql +:) DESCRIBE file('data{1,2,3}.jsonl') SETTINGS schema_inference_mode='default' +``` + +çµæžœï¼š +```text +┌─name───┬─type─────────────┠+│ field1 │ Nullable(Int64) │ +│ field2 │ Nullable(String) │ +└────────┴──────────────────┘ +``` + +見ã¦ã‚ã‹ã‚‹ã‚ˆã†ã«ã€ãƒ•ã‚¡ã‚¤ãƒ«`data3.jsonl`ã®`field3`ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯ã€ClickHouseãŒæœ€åˆã«ãƒ•ã‚¡ã‚¤ãƒ«`data1.jsonl`ã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã‚’推論ã—よã†ã¨ã—ã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰`field2`ã®ãŸã‚ã«nullã®ã¿ã§å¤±æ•—ã—ã€ãã®å¾Œ`data2.jsonl`ã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã‚’推論ã—ã¦æˆåŠŸã—ãŸãŸã‚ã€ãƒ•ã‚¡ã‚¤ãƒ«`data3.jsonl`ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ãŒèª­ã¿å–られãªã‹ã£ãŸãŸã‚ã§ã™ã€‚ + +### ユニオンモード {#default-schema-inference-mode} + +ユニオンモードã§ã¯ã€ClickHouseã¯ãƒ•ã‚¡ã‚¤ãƒ«ãŒç•°ãªã‚‹ã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¤å¯èƒ½æ€§ãŒã‚ã‚‹ã¨ä»®å®šã—ã€ãã‚Œãžã‚Œã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’推論ã—ã€ãれらを共通ã®ã‚¹ã‚­ãƒ¼ãƒžã«çµåˆã—ã¾ã™ã€‚ + +次ã®å†…容をæŒã¤3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«`data1.jsonl`ã€`data2.jsonl`ã€`data3.jsonl`ãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š + +`data1.jsonl`: +```json +{"field1" : 1} +{"field1" : 2} +{"field1" : 3} +``` + +`data2.jsonl`: +```json +{"field2" : "Data4"} +{"field2" : "Data5"} +{"field2" : "Data5"} +``` + +`data3.jsonl`: +```json +{"field3" : [1, 2, 3]} +{"field3" : [4, 5, 6]} +{"field3" : [7, 8, 9]} +``` + +ã“れら3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–を試ã¿ã¾ã—ょã†ï¼š +```sql +:) DESCRIBE file('data{1,2,3}.jsonl') SETTINGS schema_inference_mode='union' +``` + +çµæžœï¼š +```text +┌─name───┬─type───────────────────┠+│ field1 │ Nullable(Int64) │ +│ field2 │ Nullable(String) │ +│ field3 │ Array(Nullable(Int64)) │ +└────────┴────────────────────────┘ +``` + +見ã¦ã‚ã‹ã‚‹ã‚ˆã†ã«ã€ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +注æ„: +- 一部ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯ã€çµæžœã®ã‚¹ã‚­ãƒ¼ãƒžã‹ã‚‰æ¬ ã‘ã¦ã„るカラムãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆãŒã‚ã‚‹ãŸã‚ã€ãƒ¦ãƒ‹ã‚ªãƒ³ãƒ¢ãƒ¼ãƒ‰ã¯ä¸€éƒ¨ã®ã‚«ãƒ©ãƒ ã®èª­ã¿å–りをサãƒãƒ¼ãƒˆã™ã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆï¼ˆJSONEachRowã€Parquetã€TSVWithNamesãªã©ï¼‰ã®ã¿ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ä»–ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆï¼ˆCSVã€TSVã€JSONCompactEachRowãªã©ï¼‰ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。 +- ClickHouseãŒãƒ•ã‚¡ã‚¤ãƒ«ã®ä¸€ã¤ã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã‚’推論ã§ããªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ +- 多ãã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚‹å ´åˆã€ã™ã¹ã¦ã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã‚’読ã¿å–ã‚‹ã®ã«å¤šãã®æ™‚é–“ãŒã‹ã‹ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +## 自動フォーマット検出 {#automatic-format-detection} + +データフォーマットãŒæŒ‡å®šã•ã‚Œãšã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã§ã¯æ±ºå®šã§ããªã„å ´åˆã€ClickHouseã¯ãã®å†…容ã«ã‚ˆã£ã¦ãƒ•ã‚¡ã‚¤ãƒ«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’検出ã—よã†ã¨ã—ã¾ã™ã€‚ + +**例:** + +次ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã‚’æŒã¤`data`ãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š +``` +"a","b" +1,"Data1" +2,"Data2" +3,"Data3" +``` + +フォーマットや構造を指定ã›ãšã«ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’調ã¹ãŸã‚Šã‚¯ã‚¨ãƒªã‚’è¡Œã£ãŸã‚Šã§ãã¾ã™ï¼š +```sql +:) desc file(data); +``` + +```text +┌─name─┬─type─────────────┠+│ a │ Nullable(Int64) │ +│ b │ Nullable(String) │ +└──────┴──────────────────┘ +``` + +```sql +:) select * from file(data); +``` + +```text +┌─a─┬─b─────┠+│ 1 │ Data1 │ +│ 2 │ Data2 │ +│ 3 │ Data3 │ +└───┴───────┘ +``` + +:::note +ClickHouseã¯ä¸€éƒ¨ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ã¿ã‚’検出å¯èƒ½ã§ã‚ã‚Šã€æ¤œå‡ºã«ã¯æ™‚é–“ãŒã‹ã‹ã‚‹ãŸã‚ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’明示的ã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒå¸¸ã«æœ›ã¾ã—ã„ã§ã™ã€‚ +::: diff --git a/docs/ja/interfaces/tcp.md b/docs/ja/interfaces/tcp.md new file mode 100644 index 00000000000..5de1eebdea3 --- /dev/null +++ b/docs/ja/interfaces/tcp.md @@ -0,0 +1,9 @@ +--- +slug: /ja/interfaces/tcp +sidebar_position: 18 +sidebar_label: ãƒã‚¤ãƒ†ã‚£ãƒ– インターフェース (TCP) +--- + +# ãƒã‚¤ãƒ†ã‚£ãƒ– インターフェース (TCP) + +ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルã¯ã€[コマンドラインクライアント](../interfaces/cli.md)ã§ä½¿ç”¨ã•ã‚Œã€åˆ†æ•£ã‚¯ã‚¨ãƒªå‡¦ç†ä¸­ã®ã‚µãƒ¼ãƒãƒ¼é–“通信や他ã®C++プログラムã§ã‚‚使用ã•ã‚Œã¾ã™ã€‚残念ãªãŒã‚‰ã€ãƒã‚¤ãƒ†ã‚£ãƒ–ClickHouseプロトコルã«ã¯ã¾ã æ­£å¼ãªä»•æ§˜ãŒã‚ã‚Šã¾ã›ã‚“ãŒã€ClickHouseã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ï¼ˆ[ã“ã¡ã‚‰](https://github.com/ClickHouse/ClickHouse/tree/master/src/Client)ã‚ãŸã‚Šã‹ã‚‰ï¼‰ã‚’リãƒãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ãƒªãƒ³ã‚°ã™ã‚‹ã“ã¨ã‚„ã€TCPトラフィックをå‚å—ã—ã¦åˆ†æžã™ã‚‹ã“ã¨ã§ç†è§£ã§ãã¾ã™ã€‚ diff --git a/docs/ja/interfaces/third-party/client-libraries.md b/docs/ja/interfaces/third-party/client-libraries.md new file mode 100644 index 00000000000..91cd823e3a8 --- /dev/null +++ b/docs/ja/interfaces/third-party/client-libraries.md @@ -0,0 +1,81 @@ +--- +slug: /ja/interfaces/third-party/client-libraries +sidebar_position: 26 +sidebar_label: クライアントライブラリ +description: サードパーティã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ©ã‚¤ãƒ–ラリ +--- + +# サードパーティ製開発者ã«ã‚ˆã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ©ã‚¤ãƒ–ラリ + +:::note +ClickHouse Inc ã¯ä»¥ä¸‹ã«ãƒªã‚¹ãƒˆã•ã‚ŒãŸãƒ©ã‚¤ãƒ–ラリを**維æŒã—ã¦ãŠã‚‰ãš**ã€ãã®å“質をä¿è¨¼ã™ã‚‹ãŸã‚ã®åºƒç¯„ãªãƒ†ã‚¹ãƒˆã‚‚è¡Œã£ã¦ã„ã¾ã›ã‚“。 +::: + +### Python + - [infi.clickhouse_orm](https://github.com/Infinidat/infi.clickhouse_orm) + - [clickhouse-driver](https://github.com/mymarilyn/clickhouse-driver) + - [clickhouse-client](https://github.com/yurial/clickhouse-client) + - [aiochclient](https://github.com/maximdanilchenko/aiochclient) + - [asynch](https://github.com/long2ice/asynch) +### PHP + - [smi2/phpclickhouse](https://packagist.org/packages/smi2/phpClickHouse) + - [8bitov/clickhouse-php-client](https://packagist.org/packages/8bitov/clickhouse-php-client) + - [bozerkins/clickhouse-client](https://packagist.org/packages/bozerkins/clickhouse-client) + - [simpod/clickhouse-client](https://packagist.org/packages/simpod/clickhouse-client) + - [seva-code/php-click-house-client](https://packagist.org/packages/seva-code/php-click-house-client) + - [SeasClick C++ client](https://github.com/SeasX/SeasClick) + - [one-ck](https://github.com/lizhichao/one-ck) + - [glushkovds/phpclickhouse-laravel](https://packagist.org/packages/glushkovds/phpclickhouse-laravel) + - [kolya7k ClickHouse PHP extension](https://github.com//kolya7k/clickhouse-php) + - [hyvor/clickhouse-php](https://github.com/hyvor/clickhouse-php) +### Go + - [clickhouse](https://github.com/kshvakov/clickhouse/) + - [go-clickhouse](https://github.com/roistat/go-clickhouse) + - [chconn](https://github.com/vahid-sohrabloo/chconn) + - [mailrugo-clickhouse](https://github.com/mailru/go-clickhouse) + - [golang-clickhouse](https://github.com/leprosus/golang-clickhouse) + - [uptrace/go-clickhouse](https://clickhouse.uptrace.dev/) +### Swift + - [ClickHouseNIO](https://github.com/patrick-zippenfenig/ClickHouseNIO) + - [ClickHouseVapor ORM](https://github.com/patrick-zippenfenig/ClickHouseVapor) +### NodeJs + - [clickhouse (NodeJs)](https://github.com/TimonKK/clickhouse) + - [node-clickhouse](https://github.com/apla/node-clickhouse) + - [nestjs-clickhouse](https://github.com/depyronick/nestjs-clickhouse) + - [clickhouse-client](https://github.com/depyronick/clickhouse-client) + - [node-clickhouse-orm](https://github.com/zimv/node-clickhouse-orm) + - [clickhouse-ts](https://github.com/bytadaniel/clickhouse-ts) + - [clickcache](https://github.com/bytadaniel/clickcache) +### Perl + - [perl-DBD-ClickHouse](https://github.com/elcamlost/perl-DBD-ClickHouse) + - [HTTP-ClickHouse](https://metacpan.org/release/HTTP-ClickHouse) + - [AnyEvent-ClickHouse](https://metacpan.org/release/AnyEvent-ClickHouse) +### Ruby + - [ClickHouse (Ruby)](https://github.com/shlima/click_house) + - [clickhouse-activerecord](https://github.com/PNixx/clickhouse-activerecord) +### Rust + - [clickhouse.rs](https://github.com/loyd/clickhouse.rs) + - [clickhouse-rs](https://github.com/suharev7/clickhouse-rs) + - [Klickhouse](https://github.com/Protryon/klickhouse) +### R + - [RClickHouse](https://github.com/IMSMWU/RClickHouse) +### Java + - [clickhouse-client-java](https://github.com/VirtusAI/clickhouse-client-java) + - [clickhouse-client](https://github.com/Ecwid/clickhouse-client) +### Scala + - [clickhouse-scala-client](https://github.com/crobox/clickhouse-scala-client) +### Kotlin + - [AORM](https://github.com/TanVD/AORM) +### C# + - [Octonica.ClickHouseClient](https://github.com/Octonica/ClickHouseClient) + - [ClickHouse.Ado](https://github.com/killwort/ClickHouse-Net) + - [ClickHouse.Client](https://github.com/DarkWanderer/ClickHouse.Client) + - [ClickHouse.Net](https://github.com/ilyabreev/ClickHouse.Net) +### Elixir + - [clickhousex](https://github.com/appodeal/clickhousex/) + - [pillar](https://github.com/sofakingworld/pillar) + - [ecto_ch](https://github.com/plausible/ecto_ch) +### Nim + - [nim-clickhouse](https://github.com/leonardoce/nim-clickhouse) +### Haskell + - [hdbc-clickhouse](https://github.com/zaneli/hdbc-clickhouse) diff --git a/docs/ja/interfaces/third-party/gui.md b/docs/ja/interfaces/third-party/gui.md new file mode 100644 index 00000000000..8417d5cd140 --- /dev/null +++ b/docs/ja/interfaces/third-party/gui.md @@ -0,0 +1,367 @@ +--- +slug: /ja/interfaces/third-party/gui +sidebar_position: 28 +sidebar_label: Visual Interfaces +--- + +# サードパーティ開発者ã«ã‚ˆã‚‹è¦–覚的インターフェース + +## オープンソース {#open-source} + +### ch-ui {#ch-ui} + +[ch-ui](https://github.com/caioricciuti/ch-ui)ã¯ã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã¨ãƒ‡ãƒ¼ã‚¿ã®å¯è¦–化を目的ã¨ã—ãŸClickHouseデータベース用ã®ç°¡å˜ãªReact.jsアプリインターフェースã§ã™ã€‚Reactã¨ã‚¦ã‚§ãƒ–用ClickHouseクライアントã§æ§‹ç¯‰ã•ã‚Œã€ã‚¹ãƒ ãƒ¼ã‚ºã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ•ãƒ¬ãƒ³ãƒ‰ãƒªãƒ¼ãªUIã‚’æä¾›ã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã®ç°¡å˜ãªã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ã‚·ãƒ§ãƒ³ã‚’実ç¾ã—ã¾ã™ã€‚ + +機能: + +- ClickHouseçµ±åˆ: 接続を簡å˜ã«ç®¡ç†ã—ã€ã‚¯ã‚¨ãƒªã‚’実行。 +- レスãƒãƒ³ã‚·ãƒ–ãªã‚¿ãƒ–管ç†: クエリãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルタブã®ã‚ˆã†ãªè¤‡æ•°ã®ã‚¿ãƒ–ã‚’å‹•çš„ã«ç®¡ç†ã€‚ +- パフォーマンス最é©åŒ–: 効率的ãªã‚­ãƒ£ãƒƒã‚·ãƒ³ã‚°ã¨çŠ¶æ…‹ç®¡ç†ã®ãŸã‚ã«Indexed DBを利用。 +- ローカルデータストレージ: ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã¯ãƒ–ラウザ内ã§ãƒ­ãƒ¼ã‚«ãƒ«ã«ä¿å­˜ã•ã‚Œã€ä»–ã®å ´æ‰€ã«ã¯é€ä¿¡ã•ã‚Œã¾ã›ã‚“。 + +### ChartDB {#chartdb} + +[ChartDB](https://chartdb.io)ã¯ã€ã‚¯ã‚¨ãƒªã²ã¨ã¤ã§ClickHouseã‚’å«ã‚€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ã‚­ãƒ¼ãƒžã®å¯è¦–化ã¨è¨­è¨ˆãŒã§ãã‚‹ç„¡æ–™ã®ã‚ªãƒ¼ãƒ—ンソースツールã§ã™ã€‚Reactã§æ§‹ç¯‰ã•ã‚Œã¦ãŠã‚Šã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è³‡æ ¼æƒ…報やサインアップãªã—ã§ç°¡å˜ã«å§‹ã‚られã¾ã™ã€‚ + +機能: + +- スキーマã®å¯è¦–化: Materialized Viewや標準Viewã§ã€ãƒ†ãƒ¼ãƒ–ルã¸ã®å‚照を一緒ã«ç¤ºã™ã€ClickHouseスキーマをインãƒãƒ¼ãƒˆã—ã¦è¦–覚化。 +- AI駆動ã®DDLエクスãƒãƒ¼ãƒˆ: スキーマ管ç†ã¨ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆåŒ–を容易ã«ã™ã‚‹DDLスクリプトを生æˆã€‚ +- マルãƒSQL方言サãƒãƒ¼ãƒˆ: ã•ã¾ã–ã¾ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç’°å¢ƒã§ä½¿ãˆã‚‹ã€‚ +- サインアップや資格情報ãŒä¸è¦: ã™ã¹ã¦ã®æ©Ÿèƒ½ãŒãƒ–ラウザã§ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã€‚ + +[ChartDB ソースコード](https://github.com/chartdb/chartdb). + +### Tabix {#tabix} + +[Tabix](https://github.com/tabixio/tabix)プロジェクトã®ClickHouse用ウェブインターフェース。 + +機能: + +- 追加ソフトウェアをインストールã™ã‚‹ã“ã¨ãªãã€ãƒ–ラウザã‹ã‚‰ç›´æŽ¥ClickHouseã¨é€£æºã€‚ +- シンタックスãƒã‚¤ãƒ©ã‚¤ãƒˆä»˜ãã®ã‚¯ã‚¨ãƒªã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã€‚ +- コマンドã®ã‚ªãƒ¼ãƒˆã‚³ãƒ³ãƒ—リート機能。 +- クエリ実行ã®ã‚°ãƒ©ãƒ•ã‚£ã‚«ãƒ«è§£æžãƒ„ール。 +- カラースキームオプション。 + +[Tabix ドキュメント](https://tabix.io/doc/). + +### HouseOps {#houseops} + +[HouseOps](https://github.com/HouseOps/HouseOps) ã¯ã€OSXã€Linuxã€Windows対応ã®UI/IDEã§ã™ã€‚ + +機能: + +- シンタックスãƒã‚¤ãƒ©ã‚¤ãƒˆä»˜ãã®ã‚¯ã‚¨ãƒªãƒ¼ãƒ“ルダー。テーブルã¾ãŸã¯JSONビューã§å¿œç­”を表示。 +- クエリçµæžœã‚’CSVã¾ãŸã¯JSONã¨ã—ã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã€‚ +- 説明付ãã®ãƒ—ロセスリスト。書ãè¾¼ã¿ãƒ¢ãƒ¼ãƒ‰ã€‚プロセスをåœæ­¢ï¼ˆ`KILL`)ã™ã‚‹æ©Ÿèƒ½ã€‚ +- データベースã®ã‚°ãƒ©ãƒ•ã€‚全テーブルã¨ãã®ã‚«ãƒ©ãƒ ãŒè¿½åŠ æƒ…å ±ã¨ã¨ã‚‚ã«è¡¨ç¤ºã€‚ +- カラムサイズã®ã‚¯ã‚¤ãƒƒã‚¯ãƒ“ュー。 +- サーãƒãƒ¼è¨­å®šã€‚ + +開発予定ã®æ©Ÿèƒ½: + +- データベース管ç†ã€‚ +- ユーザー管ç†ã€‚ +- リアルタイムデータ分æžã€‚ +- クラスターモニタリング。 +- クラスターマãƒã‚¸ãƒ¡ãƒ³ãƒˆã€‚ +- レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³Kafkaテーブルã®ãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚°ã€‚ + +### LightHouse {#lighthouse} + +[LightHouse](https://github.com/VKCOM/lighthouse)ã¯ã€ClickHouse用ã®è»½é‡ãªã‚¦ã‚§ãƒ–インターフェースã§ã™ã€‚ + +機能: + +- フィルターã¨ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ã‚ˆã‚‹ãƒ†ãƒ¼ãƒ–ルリスト。 +- フィルターã¨ã‚½ãƒ¼ãƒˆã«ã‚ˆã‚‹ãƒ†ãƒ¼ãƒ–ルプレビュー。 +- 読ã¿å–り専用ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œã€‚ + +### Redash {#redash} + +[Redash](https://github.com/getredash/redash)ã¯ãƒ‡ãƒ¼ã‚¿ã®è¦–覚化プラットフォームã§ã™ã€‚ + +ClickHouseã‚’å«ã‚€è¤‡æ•°ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’サãƒãƒ¼ãƒˆã—ã€ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‹ã‚‰ã®ã‚¯ã‚¨ãƒªçµæžœã‚’1ã¤ã®æœ€çµ‚データセットã«çµåˆã§ãã¾ã™ã€‚ + +機能: + +- 強力ãªã‚¯ã‚¨ãƒªã‚¨ãƒ‡ã‚£ã‚¿ã€‚ +- データベースエクスプローラー。 +- データを異ãªã‚‹å½¢å¼ã§è¡¨ç¾ã™ã‚‹è¦–覚化ツール。 + +### Grafana {#grafana} + +[Grafana](https://grafana.com/grafana/plugins/grafana-clickhouse-datasource/)ã¯ã€ç›£è¦–ã¨è¦–覚化ã®ãŸã‚ã®ãƒ—ラットフォームã§ã™ã€‚ + +Grafanaã¯ã€ã©ã“ã«ä¿ç®¡ã•ã‚ŒãŸæŒ‡æ¨™ã§ã‚‚クエリã—ã€è¦–覚化ã—ã€ã‚¢ãƒ©ãƒ¼ãƒˆã‚’設定ã—ã€ç†è§£ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ãƒãƒ¼ãƒ ã¨ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã€æŽ¢ç´¢ã€å…±æœ‰ã—ã€ãƒ‡ãƒ¼ã‚¿é§†å‹•åž‹ã®æ–‡åŒ–を促進ã—ã¾ã™ã€‚コミュニティã«ä¿¡é ¼ã•ã‚Œã€æ„›ã•ã‚Œã¦ã„ã¾ã™ — grafana.com。 + +ClickHouseデータソースプラグインã¯ã€ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã—ã¦ClickHouseをサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +### qryn {#qryn} + +[qryn](https://metrico.in)ã¯ã€ClickHouse用ã®é«˜æ€§èƒ½ã‚ªãƒ–ザーãƒãƒ“リティスタックã§ã€ãƒã‚¤ãƒ†ã‚£ãƒ–Grafanaçµ±åˆã‚’å‚™ãˆã€Loki/LogQLã€Prometheus/PromQLã€OTLP/Tempoã€Elasticã€InfluxDBãªã©ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ä»»æ„ã®ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‹ã‚‰ã®ãƒ­ã‚°ã€ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã€ãƒ†ãƒ¬ãƒ¡ãƒˆãƒªãƒˆãƒ¬ãƒ¼ã‚¹ã‚’インジェストã—ã¦åˆ†æžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +機能: + +- クエリã€æŠ½å‡ºã€ãƒ‡ãƒ¼ã‚¿ã®è¦–覚化ã®ãŸã‚ã®å†…蔵Explore UIã¨LogQL CLI +- プラグインãªã—ã§ã‚¯ã‚¨ãƒªã€å‡¦ç†ã€ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆã€ãƒˆãƒ¬ãƒ¼ã‚¹ã€ã‚¢ãƒ©ãƒ¼ãƒˆã®ãƒã‚¤ãƒ†ã‚£ãƒ–Grafana APIサãƒãƒ¼ãƒˆ +- ログã€ã‚¤ãƒ™ãƒ³ãƒˆã€ãƒˆãƒ¬ãƒ¼ã‚¹ãªã©ã‹ã‚‰å‹•çš„ã«ãƒ‡ãƒ¼ã‚¿ã‚’検索ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã€æŠ½å‡ºã™ã‚‹å¼·åŠ›ãªãƒ‘イプライン +- LogQLã€PromQLã€InfluxDBã€Elasticãªã©ã¨äº’æ›æ€§ã®ã‚るインジェストã¨PUSH API +- Promtailã€Grafana-Agentã€Vectorã€Logstashã€Telegrafãªã©ã®ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã¨å³æ™‚使用å¯èƒ½ + +### DBeaver {#dbeaver} + +[DBeaver](https://dbeaver.io/) - ClickHouseサãƒãƒ¼ãƒˆã‚’æŒã¤ãƒ¦ãƒ‹ãƒãƒ¼ã‚µãƒ«ãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—データベースクライアント。 + +機能: + +- シンタックスãƒã‚¤ãƒ©ã‚¤ãƒˆã¨ã‚ªãƒ¼ãƒˆã‚³ãƒ³ãƒ—リート付ãã®ã‚¯ã‚¨ãƒªé–‹ç™ºã€‚ +- フィルターã¨ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿æ¤œç´¢ä»˜ãã®ãƒ†ãƒ¼ãƒ–ルリスト。 +- テーブルデータプレビュー。 +- 全文検索。 + +デフォルトã§ã¯ã€DBeaverã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³ï¼ˆä¾‹ã¨ã—ã¦CLIãŒè¡Œã†ã‚ˆã†ãªï¼‰ã‚’使用ã—ã¦æŽ¥ç¶šã—ã¾ã›ã‚“。セッションサãƒãƒ¼ãƒˆãŒå¿…è¦ãªå ´åˆï¼ˆä¾‹ãˆã°ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®è¨­å®šã‚’è¡Œã†ãŸã‚)ã€ãƒ‰ãƒ©ã‚¤ãƒãƒ¼æŽ¥ç¶šãƒ—ロパティを編集ã—ã¦`session_id`をランダムãªæ–‡å­—列ã«è¨­å®šã—ã¦ãã ã•ã„(内部ã§ã¯http接続を使用ã—ã¾ã™ï¼‰ã€‚ãã®å¾Œã€ã‚¯ã‚¨ãƒªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‹ã‚‰ä»»æ„ã®è¨­å®šã‚’使用ã§ãã¾ã™ã€‚ + +### clickhouse-cli {#clickhouse-cli} + +[clickhouse-cli](https://github.com/hatarist/clickhouse-cli)ã¯ã€Python 3ã§æ›¸ã‹ã‚ŒãŸClickHouse用ã®ä»£æ›¿ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã§ã™ã€‚ + +機能: + +- オートコンプリート。 +- クエリã¨ãƒ‡ãƒ¼ã‚¿å‡ºåŠ›ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãƒã‚¤ãƒ©ã‚¤ãƒˆã€‚ +- データ出力ã®ãƒšãƒ¼ã‚¸ãƒ£ãƒ¼ã‚µãƒãƒ¼ãƒˆã€‚ +- カスタムPostgreSQLライクãªã‚³ãƒžãƒ³ãƒ‰ã€‚ + +### clickhouse-flamegraph {#clickhouse-flamegraph} + +[clickhouse-flamegraph](https://github.com/Slach/clickhouse-flamegraph)ã¯ã€`system.trace_log`ã‚’[flamegraph](http://www.brendangregg.com/flamegraphs.html)ã¨ã—ã¦è¦–覚化ã™ã‚‹ãŸã‚ã®ç‰¹æ®Šãªãƒ„ールã§ã™ã€‚ + +### clickhouse-plantuml {#clickhouse-plantuml} + +[clickhouse-plantuml](https://pypi.org/project/clickhouse-plantuml/)ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ã‚­ãƒ¼ãƒ ã®[PlantUML](https://plantuml.com/)ダイアグラムを生æˆã™ã‚‹ã‚¹ã‚¯ãƒªãƒ—トã§ã™ã€‚ + +### xeus-clickhouse {#xeus-clickhouse} + +[xeus-clickhouse](https://github.com/wangfenjin/xeus-clickhouse)ã¯ã€ClickHouse用ã®Jupyterカーãƒãƒ«ã§ã‚ã‚Šã€Jupyterã§SQLを使ã£ã¦CHデータã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +### MindsDB Studio {#mindsdb} + +[MindsDB](https://mindsdb.com/)ã¯ã€æœ€å…ˆç«¯ã®æ©Ÿæ¢°å­¦ç¿’モデルを簡å˜ã«é–‹ç™ºã€ãƒˆãƒ¬ãƒ¼ãƒ‹ãƒ³ã‚°ã€ãƒ‡ãƒ—ロイã§ãã‚‹ã€ClickHouseã‚’å«ã‚€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç”¨ã®ã‚ªãƒ¼ãƒ—ンソースAI層ã§ã™ã€‚MindsDB Studio(GUI)ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰æ–°ã—ã„モデルをトレーニングã—ã€ãƒ¢ãƒ‡ãƒ«ãŒè¡Œã£ãŸäºˆæ¸¬ã‚’解釈ã—ã€æ½œåœ¨çš„ãªãƒ‡ãƒ¼ã‚¿ãƒã‚¤ã‚¢ã‚¹ã‚’識別ã—ã€Explainable AI機能を使用ã—ã¦ãƒ¢ãƒ‡ãƒ«ã®æ­£ç¢ºæ€§ã‚’評価ãŠã‚ˆã³è¦–覚化ã™ã‚‹ã“ã¨ã§ã€æ©Ÿæ¢°å­¦ç¿’モデルをより迅速ã«é©å¿œãŠã‚ˆã³èª¿æ•´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### DBM {#dbm} + +[DBM](https://github.com/devlive-community/dbm) DBMã¯ã€ClickHouse用ã®è¦–覚管ç†ãƒ„ールã§ã™ï¼ + +機能: + +- クエリ履歴ã®ã‚µãƒãƒ¼ãƒˆï¼ˆãƒšãƒ¼ã‚¸ãƒãƒ¼ã‚·ãƒ§ãƒ³ã€ã™ã¹ã¦ã‚¯ãƒªã‚¢ãªã©ï¼‰ +- é¸æŠžã—ãŸSQLå¥ã‚¯ã‚¨ãƒªã‚’サãƒãƒ¼ãƒˆ +- クエリã®çµ‚了をサãƒãƒ¼ãƒˆ +- テーブル管ç†ï¼ˆãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã€å‰Šé™¤ã€ãƒ—レビュー)ã®ã‚µãƒãƒ¼ãƒˆ +- データベース管ç†ï¼ˆå‰Šé™¤ã€ä½œæˆï¼‰ã®ã‚µãƒãƒ¼ãƒˆ +- カスタムクエリã®ã‚µãƒãƒ¼ãƒˆ +- 複数データソースã®ç®¡ç†ï¼ˆæŽ¥ç¶šãƒ†ã‚¹ãƒˆã€ç›£è¦–)ã®ã‚µãƒãƒ¼ãƒˆ +- モニター(プロセッサーã€æŽ¥ç¶šã€ã‚¯ã‚¨ãƒªï¼‰ã‚µãƒãƒ¼ãƒˆ +- データã®ç§»è¡Œã‚µãƒãƒ¼ãƒˆ + +### Bytebase {#bytebase} + +[Bytebase](https://bytebase.com)ã¯ã€ãƒãƒ¼ãƒ å‘ã‘ã®ã‚¦ã‚§ãƒ–ベースã§ã‚ªãƒ¼ãƒ—ンソースã®ã‚¹ã‚­ãƒ¼ãƒžå¤‰æ›´ã¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç†ãƒ„ールã§ã™ã€‚ClickHouseã‚’å«ã‚€ã•ã¾ã–ã¾ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +機能: + +- 開発者ã¨DBAé–“ã®ã‚¹ã‚­ãƒ¼ãƒžãƒ¬ãƒ“ュー。 +- Database-as-Codeã€ã‚¹ã‚­ãƒ¼ãƒžã‚’GitLabã®ã‚ˆã†ãªVCSã§ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç†ã—ã€ã‚³ãƒ¼ãƒ‰ã‚³ãƒŸãƒƒãƒˆæ™‚ã«ãƒ‡ãƒ—ロイメントをトリガー。 +- 環境ã”ã¨ã®ãƒãƒªã‚·ãƒ¼ä»˜ãストリームラインドデプロイ。 +- 完全ãªç§»è¡Œå±¥æ­´ã€‚ +- スキーマã®ãƒ‰ãƒªãƒ•ãƒˆæ¤œå‡ºã€‚ +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ãƒªã‚¹ãƒˆã‚¢ã€‚ +- RBAC。 + +### Zeppelin-Interpreter-for-ClickHouse {#zeppelin-interpreter-for-clickhouse} + +[Zeppelin-Interpreter-for-ClickHouse](https://github.com/SiderZhang/Zeppelin-Interpreter-for-ClickHouse)ã¯ã€ClickHouse用ã®[Zeppelin](https://zeppelin.apache.org)インタープリターã§ã™ã€‚JDBCインタープリターã¨æ¯”較ã™ã‚‹ã¨ã€é•·æ™‚間実行ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ã‚ˆã‚Šè‰¯ã„タイムアウト制御をæä¾›ã§ãã¾ã™ã€‚ + +### ClickCat {#clickcat} + +[ClickCat](https://github.com/clickcat-project/ClickCat)ã¯ã€ClickHouseデータを検索ã€æŽ¢ç´¢ã€å¯è¦–化ã™ã‚‹ã®ã«å½¹ç«‹ã¤ãƒ•ãƒ¬ãƒ³ãƒ‰ãƒªãƒ¼ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã§ã™ã€‚ + +機能: + +- インストールãªã—ã§SQLコードを実行ã§ãるオンラインSQLエディター。 +- 全プロセスã¨å¤‰ç•°ã‚’観察å¯èƒ½ã€‚未完ã®ãƒ—ロセスã¯UIã‹ã‚‰æ®ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +- メトリクスã«ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿è§£æžã€ãƒ‡ãƒ¼ã‚¿è§£æžã€ã‚¯ã‚¨ãƒªè§£æžãŒå«ã¾ã‚Œã¾ã™ã€‚ + +### ClickVisual {#clickvisual} + +[ClickVisual](https://clickvisual.net/) ã¯ClickVisualã¯è»½é‡ã®ã‚ªãƒ¼ãƒ—ンソースã®ãƒ­ã‚°ã‚¯ã‚¨ãƒªã€åˆ†æžã€ã‚¢ãƒ©ãƒ¼ãƒ ãƒ“ジュアル化プラットフォームã§ã™ã€‚ + +機能: + +- 分æžãƒ­ã‚°ãƒ©ã‚¤ãƒ–ラリã®ãƒ¯ãƒ³ã‚¯ãƒªãƒƒã‚¯ä½œæˆã‚’サãƒãƒ¼ãƒˆ +- ログåŽé›†è¨­å®šã®ç®¡ç†ã‚’サãƒãƒ¼ãƒˆ +- ユーザー定義ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹è¨­å®šã‚’サãƒãƒ¼ãƒˆ +- アラーム設定をサãƒãƒ¼ãƒˆ +- ライブラリã¨ãƒ†ãƒ¼ãƒ–ルã®æ¨©é™è¨­å®šã®ã‚µãƒãƒ¼ãƒˆ + +### ClickHouse-Mate {#clickmate} + +[ClickHouse-Mate](https://github.com/metrico/clickhouse-mate)ã¯ã€ClickHouseã§ãƒ‡ãƒ¼ã‚¿ã‚’検索ã—ã€æŽ¢ç´¢ã™ã‚‹ãŸã‚ã®Angularウェブクライアント+ユーザーインターフェースã§ã™ã€‚ + +機能: + +- ClickHouse SQLクエリオートコンプリート +- 高速ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルツリーナビゲーション +- 高度ãªçµæžœãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ãŠã‚ˆã³ã‚½ãƒ¼ãƒˆ +- インラインClickHouse SQLドキュメント +- クエリプリセットã¨å±¥æ­´ +- 100%ブラウザベースã€ã‚µãƒ¼ãƒãƒ¼/ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ãªã— + +クライアントã¯GitHubページを通ã˜ã¦å³æ™‚使用å¯èƒ½: https://metrico.github.io/clickhouse-mate/ + +### Uptrace {#uptrace} + +[Uptrace](https://github.com/uptrace/uptrace)ã¯ã€OpenTelemetryã¨ClickHouseã«ã‚ˆã‚Šåˆ†æ•£ãƒˆãƒ¬ãƒ¼ã‚¹ã¨ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’æä¾›ã™ã‚‹APMツールã§ã™ã€‚ + +機能: + +- [OpenTelemetryトレース](https://uptrace.dev/opentelemetry/distributed-tracing.html)ã€ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã€ãŠã‚ˆã³ãƒ­ã‚°ã€‚ +- AlertManagerを使用ã—ãŸEmail/Slack/PagerDuty通知。 +- スパンを集約ã™ã‚‹ãŸã‚ã®SQLライクãªã‚¯ã‚¨ãƒªè¨€èªžã€‚ +- メトリクスをクエリã™ã‚‹ãŸã‚ã®Promqlライクãªè¨€èªžã€‚ +- 事å‰æ§‹ç¯‰ã•ã‚ŒãŸãƒ¡ãƒˆãƒªã‚¯ã‚¹ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã€‚ +- YAML設定ã«ã‚ˆã‚‹è¤‡æ•°ãƒ¦ãƒ¼ã‚¶ãƒ¼/プロジェクト。 + +### clickhouse-monitoring {#clickhouse-monitoring} + +[clickhouse-monitoring](https://github.com/duyet/clickhouse-monitoring)ã¯ã€`system.*`テーブルã«åŸºã¥ã„ã¦ClickHouseクラスターを監視ã—ã€ãã®æ¦‚è¦ã‚’æä¾›ã™ã‚‹ã‚·ãƒ³ãƒ—ルãªNext.jsダッシュボードã§ã™ã€‚ + +機能: + +- クエリモニター: ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã€ã‚¯ã‚¨ãƒªå±¥æ­´ã€ã‚¯ã‚¨ãƒªãƒªã‚½ãƒ¼ã‚¹ï¼ˆãƒ¡ãƒ¢ãƒªã€èª­ã¿å–り部ã€file_openãªã©ï¼‰ã€æœ€ã‚‚高コストã®ã‚¯ã‚¨ãƒªã€æœ€ã‚‚使用ã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã¾ãŸã¯ã‚«ãƒ©ãƒ ãªã©ã€‚ +- クラスターモニター: åˆè¨ˆãƒ¡ãƒ¢ãƒª/CPU使用é‡ã€åˆ†æ•£ã‚­ãƒ¥ãƒ¼ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«è¨­å®šã€mergetree設定ã€æŒ‡æ¨™ãªã©ã€‚ +- テーブルã¨ãƒ‘ーツã®æƒ…å ±: サイズã€è¡Œæ•°ã€åœ§ç¸®ã€ãƒ‘ーツサイズãªã©ã€ã‚«ãƒ©ãƒ ãƒ¬ãƒ™ãƒ«ã®è©³ç´°ã€‚ +- 有用ãªãƒ„ール: Zookeeperデータ探査ã€ã‚¯ã‚¨ãƒªEXPLAINã€ã‚¯ã‚¨ãƒªã®ã‚­ãƒ«ãªã©ã€‚ +- 視覚化メトリックãƒãƒ£ãƒ¼ãƒˆ: クエリã¨ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨é‡ã€ãƒžãƒ¼ã‚¸/ミューテーションã®æ•°ã€ãƒžãƒ¼ã‚¸ãƒ‘フォーマンスã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスãªã©ã€‚ + +### CKibana {#ckibana} + +[CKibana](https://github.com/TongchengOpenSource/ckibana)ã¯ã€ãƒã‚¤ãƒ†ã‚£ãƒ–Kibana UIを使用ã—ã¦ClickHouseデータを検索ã€æŽ¢ç´¢ã€å¯è¦–化ã§ãる軽é‡ã‚µãƒ¼ãƒ“スã§ã™ã€‚ + +機能: + +- ãƒã‚¤ãƒ†ã‚£ãƒ–Kibana UIã‹ã‚‰ã®ãƒãƒ£ãƒ¼ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’ClickHouseクエリ構文ã«å¤‰æ›ã€‚ +- サンプリングやキャッシングãªã©ã®é«˜åº¦ãªæ©Ÿèƒ½ã‚’サãƒãƒ¼ãƒˆã—ã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスをå‘上。 +- ElasticSearchã‹ã‚‰ClickHouseã«ç§»è¡Œå¾Œã®å­¦ç¿’コストを最å°é™ã«ã€‚ + +## コマーシャル {#commercial} + +### DataGrip {#datagrip} + +[DataGrip](https://www.jetbrains.com/datagrip/)ã¯JetBrainsæä¾›ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹IDEã§ã€ClickHouseã«ç‰¹åŒ–ã—ãŸã‚µãƒãƒ¼ãƒˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ãã®ä»–ã®IntelliJベースã®ãƒ„ールã«ã‚‚組ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™: PyCharmã€IntelliJ IDEAã€GoLandã€PhpStormãªã©ã€‚ + +機能: + +- éžå¸¸ã«é«˜é€Ÿãªã‚³ãƒ¼ãƒ‰è£œå®Œã€‚ +- ClickHouseã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãƒã‚¤ãƒ©ã‚¤ãƒˆã€‚ +- ClickHouseã«ç‰¹æœ‰ã®æ©Ÿèƒ½ã€ä¾‹ãˆã°å…¥ã‚Œå­ã«ãªã£ãŸã‚«ãƒ©ãƒ ã‚„テーブルエンジンã®ã‚µãƒãƒ¼ãƒˆã€‚ +- データエディタ。 +- リファクタリング。 +- 検索ã¨ãƒŠãƒ“ゲーション。 + +### Yandex DataLens {#yandex-datalens} + +[Yandex DataLens](https://cloud.yandex.ru/services/datalens)ã¯ãƒ‡ãƒ¼ã‚¿ã®è¦–覚化ã¨åˆ†æžã‚µãƒ¼ãƒ“スã§ã™ã€‚ + +機能: + +- シンプルãªæ£’グラフã‹ã‚‰è¤‡é›‘ãªãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã¾ã§å¹…広ã„視覚化ãŒå¯èƒ½ã€‚ +- ダッシュボードã¯å…¬é–‹å¯èƒ½ã€‚ +- ClickHouseã‚’å«ã‚€è¤‡æ•°ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã®ã‚µãƒãƒ¼ãƒˆã€‚ +- Materialized Viewã«åŸºã¥ã„ãŸãƒ‡ãƒ¼ã‚¿ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã€‚ + +DataLensã¯ã€[商用利用ã«ãŠã„ã¦ã‚‚低負è·ãƒ—ロジェクトã«å¯¾ã—ã¦ç„¡æ–™](https://cloud.yandex.com/docs/datalens/pricing)ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +- [DataLens ドキュメント](https://cloud.yandex.com/docs/datalens/)。 +- [ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«](https://cloud.yandex.com/docs/solutions/datalens/data-from-ch-visualization)ã§ã€ClickHouseデータベースã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®è¦–覚化ã«ã¤ã„ã¦å­¦ã¶ã€‚ + +### Holistics Software {#holistics-software} + +[Holistics](https://www.holistics.io/)ã¯å…¨ã‚¹ã‚¿ãƒƒã‚¯ã®ãƒ‡ãƒ¼ã‚¿ãƒ—ラットフォームã¨ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ãƒ„ールã§ã™ã€‚ + +機能: + +- レãƒãƒ¼ãƒˆã®è‡ªå‹•ãƒ¡ãƒ¼ãƒ«ã€Slackã€Googleシートスケジュール。 +- ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç†ã€ã‚ªãƒ¼ãƒˆã‚³ãƒ³ãƒ—リートã€å†åˆ©ç”¨å¯èƒ½ãªã‚¯ã‚¨ãƒªã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã€å‹•çš„フィルター付ãã®è¦–覚化付ãSQLエディタ。 +- iframeを介ã—ãŸãƒ¬ãƒãƒ¼ãƒˆã¨ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã®åŸ‹ã‚è¾¼ã¿åˆ†æžã€‚ +- データ準備ã¨ETL機能。 +- 関連付ã‘ã«ã‚ˆã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã®ãŸã‚ã®SQLデータモデリングサãƒãƒ¼ãƒˆã€‚ + +### Looker {#looker} + +[Looker](https://looker.com)ã¯ã€ClickHouseã‚’å«ã‚€50以上ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹æ–¹è¨€ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ—ラットフォームãŠã‚ˆã³ãƒ“ジãƒã‚¹ã‚¤ãƒ³ãƒ†ãƒªã‚¸ã‚§ãƒ³ã‚¹ãƒ„ールã§ã™ã€‚Lookerã¯SaaSプラットフォームã¨ã—ã¦åˆ©ç”¨ã§ãã‚‹ã»ã‹ã€è‡ªç¤¾ã§ãƒ›ã‚¹ãƒ†ã‚£ãƒ³ã‚°ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ユーザーã¯ãƒ–ラウザを介ã—ã¦Lookerを使用ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’探索ã—ã€ãƒ“ジュアライゼーションã¨ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’構築ã—ã€ãƒ¬ãƒãƒ¼ãƒˆã‚’スケジュールã—ã€åŒåƒšã¨æ´žå¯Ÿã‚’共有ã§ãã¾ã™ã€‚Lookerã¯ã“れらã®æ©Ÿèƒ½ã‚’ä»–ã®ã‚¢ãƒ—リケーションã«åŸ‹ã‚込むãŸã‚ã®è±Šå¯Œãªãƒ„ールセットをæä¾›ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’ä»–ã®ã‚¢ãƒ—リケーションã¨çµ±åˆã™ã‚‹ãŸã‚ã®APIã‚‚æä¾›ã—ã¾ã™ã€‚ + +機能: + +- [データモデリング](https://looker.com/platform/data-modeling)をサãƒãƒ¼ãƒˆã™ã‚‹LookMLã®ä½¿ç”¨ã«ã‚ˆã‚‹ç°¡å˜ã§æ©Ÿæ•ãªé–‹ç™ºã€‚ +- Lookerã®[Data Actions](https://looker.com/platform/actions)を介ã—ãŸå¼·åŠ›ãªãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼çµ±åˆã€‚ + +[Lookerã§ClickHouseを設定ã™ã‚‹æ–¹æ³•](https://docs.looker.com/setup-and-management/database-config/clickhouse)。 + +### SeekTable {#seektable} + +[SeekTable](https://www.seektable.com)ã¯ãƒ‡ãƒ¼ã‚¿æŽ¢ç´¢ã¨é‹ç”¨ãƒ¬ãƒãƒ¼ãƒˆã®ãŸã‚ã®ã‚»ãƒ«ãƒ•ã‚µãƒ¼ãƒ“スBIツールã§ã™ã€‚クラウドサービスã¨ã‚»ãƒ«ãƒ•ãƒ›ã‚¹ãƒ†ãƒƒãƒ‰ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ä¸¡æ–¹ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚SeekTableã‹ã‚‰ã®ãƒ¬ãƒãƒ¼ãƒˆã¯ä»»æ„ã®ã‚¦ã‚§ãƒ–アプリã«åŸ‹ã‚込むã“ã¨ãŒã§ãã¾ã™ã€‚ + +機能: + +- ビジãƒã‚¹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å„ªã—ã„レãƒãƒ¼ãƒˆãƒ“ルダー。 +- SQLフィルタリングã¨ãƒ¬ãƒãƒ¼ãƒˆç‰¹æœ‰ã®ã‚¯ã‚¨ãƒªã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã®ãŸã‚ã®å¼·åŠ›ãªãƒ¬ãƒãƒ¼ãƒˆãƒ‘ラメータ。 +- ClickHouseã«ã¯ãƒã‚¤ãƒ†ã‚£ãƒ–ãªTCP/IPエンドãƒã‚¤ãƒ³ãƒˆã¨HTTP(S)インターフェースã®ã©ã¡ã‚‰ã‚‚接続å¯èƒ½ï¼ˆ2ã¤ã®ç•°ãªã‚‹ãƒ‰ãƒ©ã‚¤ãƒãƒ¼ï¼‰ã€‚ +- ClickHouse SQL方言ã®ã™ã¹ã¦ã®åŠ›ã‚’ディメンション/メジャーã®å®šç¾©ã§ä½¿ç”¨å¯èƒ½ã€‚ +- レãƒãƒ¼ãƒˆã®è‡ªå‹•ç”Ÿæˆã®ãŸã‚ã®[Web API](https://www.seektable.com/help/web-api-integration)ã‚’æ供。 +- アカウントデータã®[ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/リストア](https://www.seektable.com/help/self-hosted-backup-restore)ã«ã‚ˆã‚Šã€ãƒ¬ãƒãƒ¼ãƒˆé–‹ç™ºã®ãƒ•ãƒ­ãƒ¼ã‚’サãƒãƒ¼ãƒˆ; データモデル(キューブ)/レãƒãƒ¼ãƒˆæ§‹æˆã¯äººé–“ãŒèª­ã‚ã‚‹XMLã§ã‚ã‚Šã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã§ç®¡ç†å¯èƒ½ã€‚ + +SeekTableã¯ã€å€‹äººã¾ãŸã¯å€‹äººåˆ©ç”¨ã®ãŸã‚ã«[ç„¡æ–™](https://www.seektable.com/help/cloud-pricing)ã§ã™ã€‚ + +[SeekTableã§ã®ClickHouse接続設定方法。](https://www.seektable.com/help/clickhouse-pivot-table) + +### Chadmin {#chadmin} + +[Chadmin](https://github.com/bun4uk/chadmin)ã¯ã€ClickHouseクラスターã§ç¾åœ¨å®Ÿè¡Œã•ã‚Œã¦ã„るクエリを視覚化ã—ã€ãれらã®æƒ…報を表示ã—ã€å¿…è¦ã«å¿œã˜ã¦ã‚¯ã‚¨ãƒªã‚’åœæ­¢ã§ãるシンプルãªUIã§ã™ã€‚ + +### TABLUM.IO {#tablum_io} + +[TABLUM.IO](https://tablum.io/) ã¯ã€ETLã¨è¦–覚化ã®ãŸã‚ã®ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ã‚¯ã‚¨ãƒªãŠã‚ˆã³åˆ†æžãƒ„ールã§ã™ã€‚ClickHouseã«æŽ¥ç¶šã—ã€ç”¨é€”ã®åºƒã„SQLコンソールを介ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’クエリã—ãŸã‚Šã€é™çš„ファイルやサードパーティサービスã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚TABLUM.IOã¯ãƒ‡ãƒ¼ã‚¿çµæžœã‚’ãƒãƒ£ãƒ¼ãƒˆã‚„テーブルã¨ã—ã¦è¦–覚化ã§ãã¾ã™ã€‚ + +機能: +- ETL: 人気ã®ã‚るデータベースã€ãƒ­ãƒ¼ã‚«ãƒ«ãŠã‚ˆã³ãƒªãƒ¢ãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã€API呼ã³å‡ºã—ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ã€‚ +- シンタックスãƒã‚¤ãƒ©ã‚¤ãƒˆä»˜ãã®ç”¨é€”ã®åºƒã„SQLコンソールã¨ãƒ“ジュアルクエリビルダー。 +- ãƒãƒ£ãƒ¼ãƒˆãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦ã®ãƒ‡ãƒ¼ã‚¿è¦–覚化。 +- データã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãŠã‚ˆã³ã‚µãƒ–クエリ。 +- Slackã€Telegramã€ãƒ¡ãƒ¼ãƒ«ã¸ã®ãƒ‡ãƒ¼ã‚¿ãƒ¬ãƒãƒ¼ãƒˆã€‚ +- 独自ã®APIを介ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ‘イプライン。 +- JSONã€CSVã€SQLã€HTMLå½¢å¼ã§ã®ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã€‚ +- ウェブベースインターフェース。 + +TABLUM.IOã¯ã€ã‚»ãƒ«ãƒ•ãƒ›ã‚¹ãƒˆã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ï¼ˆDockerイメージã¨ã—ã¦ï¼‰ã¾ãŸã¯ã‚¯ãƒ©ã‚¦ãƒ‰ã§å®Ÿè¡Œå¯èƒ½ã§ã™ã€‚ +ライセンス: 3ヶ月無料期間ã®[商用製å“](https://tablum.io/pricing)。 + +クラウドã§ç„¡æ–™ã§è©¦ç”¨ã™ã‚‹ [クラウドã§è©¦ç”¨](https://tablum.io/try)。 +詳ã—ãã¯ã€[TABLUM.IO](https://tablum.io/)ã§è£½å“ã«ã¤ã„ã¦å­¦ã¶ã€‚ + +### CKMAN {#ckman} + +[CKMAN](https://www.github.com/housepower/ckman)ã¯ã€ClickHouseクラスタã®ç®¡ç†ã¨ç›£è¦–ã®ãŸã‚ã®ãƒ„ールã§ã™ï¼ + +機能: + +- ブラウザインターフェイスを通ã˜ãŸä¾¿åˆ©ã§è¿…速ãªã‚¯ãƒ©ã‚¹ã‚¿ã®è‡ªå‹•å±•é–‹ +- クラスタã®ã‚¹ã‚±ãƒ¼ãƒ«ã¾ãŸã¯ã‚¹ã‚±ãƒ¼ãƒ«ãƒ€ã‚¦ãƒ³ +- クラスターデータã®ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚¹ +- クラスターをオンラインã§ã‚¢ãƒƒãƒ—グレード +- ページã§ã‚¯ãƒ©ã‚¹ã‚¿è¨­å®šã‚’変更 +- クラスタノードã®ç›£è¦–ã¨Zookeeper監視をæä¾› +- テーブルã¨ãƒ‘ーティションã®çŠ¶æ…‹ã‚„é…ã„SQLステートメントを監視 +- 使ã„ã‚„ã™ã„SQL実行ページをæä¾› diff --git a/docs/ja/interfaces/third-party/index.md b/docs/ja/interfaces/third-party/index.md new file mode 100644 index 00000000000..114abf9817f --- /dev/null +++ b/docs/ja/interfaces/third-party/index.md @@ -0,0 +1,18 @@ +--- +slug: /ja/interfaces/third-party/ +toc_folder_title: Third-Party +sidebar_position: 24 +--- + +# サードパーティ製インターフェース + +ã“ã‚Œã¯ã€ClickHouse ã«å¯¾ã™ã‚‹ä½•ã‚‰ã‹ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã™ã‚‹ã‚µãƒ¼ãƒ‰ãƒ‘ーティ製ツールã¸ã®ãƒªãƒ³ã‚¯é›†ã§ã™ã€‚視覚的インターフェースã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã€ã¾ãŸã¯ API ã®ã„ãšã‚Œã‹ã¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +- [クライアントライブラリ](../../interfaces/third-party/client-libraries.md) +- [çµ±åˆ](../../interfaces/third-party/integrations.md) +- [GUI](../../interfaces/third-party/gui.md) +- [プロキシ](../../interfaces/third-party/proxy.md) + +:::note +[ODBC](../../interfaces/odbc.md) ã‚„ [JDBC](../../interfaces/jdbc.md) ãªã©ã®å…±é€š API をサãƒãƒ¼ãƒˆã—ã¦ã„る汎用ツールã¯é€šå¸¸ ClickHouse ã§ã‚‚動作ã—ã¾ã™ãŒã€ã‚ã¾ã‚Šã«å¤šã™ãŽã‚‹ãŸã‚ã“ã“ã«ã¯ä¸€è¦§ã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: diff --git a/docs/ja/interfaces/third-party/integrations.md b/docs/ja/interfaces/third-party/integrations.md new file mode 100644 index 00000000000..086d0929027 --- /dev/null +++ b/docs/ja/interfaces/third-party/integrations.md @@ -0,0 +1,115 @@ +--- +slug: /ja/interfaces/third-party/integrations +sidebar_position: 27 +sidebar_label: インテグレーション +--- + +# サードパーティ開発者ã«ã‚ˆã‚‹ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒ©ã‚¤ãƒ–ラリ + +:::note å…責事項 +ClickHouse, Inc. ã¯ã€ä»¥ä¸‹ã«ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„るツールやライブラリを**管ç†ã—ã¦ãŠã‚‰ãš**ã€ãã®å“質をä¿è¨¼ã™ã‚‹ãŸã‚ã«åºƒç¯„ãªãƒ†ã‚¹ãƒˆã‚’è¡Œã£ã¦ã„ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +## ã‚¤ãƒ³ãƒ•ãƒ©è£½å“ {#infrastructure-products} + +- リレーショナルデータベース管ç†ã‚·ã‚¹ãƒ†ãƒ  + - [MySQL](https://www.mysql.com) + - [mysql2ch](https://github.com/long2ice/mysql2ch) + - [ProxySQL](https://github.com/sysown/proxysql/wiki/ClickHouse-Support) + - [clickhouse-mysql-data-reader](https://github.com/Altinity/clickhouse-mysql-data-reader) + - [horgh-replicator](https://github.com/larsnovikov/horgh-replicator) + - [PostgreSQL](https://www.postgresql.org) + - [clickhousedb_fdw](https://github.com/Percona-Lab/clickhousedb_fdw) + - [infi.clickhouse_fdw](https://github.com/Infinidat/infi.clickhouse_fdw) (使用 [infi.clickhouse_orm](https://github.com/Infinidat/infi.clickhouse_orm)) + - [pg2ch](https://github.com/mkabilov/pg2ch) + - [clickhouse_fdw](https://github.com/adjust/clickhouse_fdw) + - [MSSQL](https://en.wikipedia.org/wiki/Microsoft_SQL_Server) + - [ClickHouseMigrator](https://github.com/zlzforever/ClickHouseMigrator) +- メッセージキュー + - [Kafka](https://kafka.apache.org) + - [clickhouse_sinker](https://github.com/housepower/clickhouse_sinker) (使用 [Go client](https://github.com/ClickHouse/clickhouse-go/)) + - [stream-loader-clickhouse](https://github.com/adform/stream-loader) +- ãƒãƒƒãƒå‡¦ç† + - [Spark](https://spark.apache.org) + - [spark-clickhouse-connector](https://github.com/housepower/spark-clickhouse-connector) +- ã‚¹ãƒˆãƒªãƒ¼ãƒ å‡¦ç† + - [Flink](https://flink.apache.org) + - [flink-clickhouse-sink](https://github.com/ivi-ru/flink-clickhouse-sink) +- オブジェクトストレージ + - [S3](https://en.wikipedia.org/wiki/Amazon_S3) + - [clickhouse-backup](https://github.com/AlexAkulov/clickhouse-backup) +- コンテナオーケストレーション + - [Kubernetes](https://kubernetes.io) + - [clickhouse-operator](https://github.com/Altinity/clickhouse-operator) +- 構æˆç®¡ç† + - [puppet](https://puppet.com) + - [innogames/clickhouse](https://forge.puppet.com/innogames/clickhouse) + - [mfedotov/clickhouse](https://forge.puppet.com/mfedotov/clickhouse) +- モニタリング + - [Graphite](https://graphiteapp.org) + - [graphouse](https://github.com/ClickHouse/graphouse) + - [carbon-clickhouse](https://github.com/lomik/carbon-clickhouse) + - [graphite-clickhouse](https://github.com/lomik/graphite-clickhouse) + - [graphite-ch-optimizer](https://github.com/innogames/graphite-ch-optimizer) - staledパーティションを最é©åŒ–ã—ã€[ロールアップ設定](../../engines/table-engines/mergetree-family/graphitemergetree.md#rollup-configuration)ã®ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨å¯èƒ½ã‹ç¢ºèª + - [Grafana](https://grafana.com/) + - [clickhouse-grafana](https://github.com/Vertamedia/clickhouse-grafana) + - [Prometheus](https://prometheus.io/) + - [clickhouse_exporter](https://github.com/f1yegor/clickhouse_exporter) + - [PromHouse](https://github.com/Percona-Lab/PromHouse) + - [clickhouse_exporter](https://github.com/hot-wifi/clickhouse_exporter) (使用 [Go client](https://github.com/kshvakov/clickhouse/)) + - [Nagios](https://www.nagios.org/) + - [check_clickhouse](https://github.com/exogroup/check_clickhouse/) + - [check_clickhouse.py](https://github.com/innogames/igmonplugins/blob/master/src/check_clickhouse.py) + - [Zabbix](https://www.zabbix.com) + - [clickhouse-zabbix-template](https://github.com/Altinity/clickhouse-zabbix-template) + - [Sematext](https://sematext.com/) + - [clickhouse integration](https://github.com/sematext/sematext-agent-integrations/tree/master/clickhouse) +- ロギング + - [rsyslog](https://www.rsyslog.com/) + - [omclickhouse](https://www.rsyslog.com/doc/master/configuration/modules/omclickhouse.html) + - [fluentd](https://www.fluentd.org) + - [loghouse](https://github.com/flant/loghouse) (for [Kubernetes](https://kubernetes.io)) + - [logagent](https://www.sematext.com/logagent) + - [logagent output-plugin-clickhouse](https://sematext.com/docs/logagent/output-plugin-clickhouse/) +- 地ç†æƒ…å ± + - [MaxMind](https://dev.maxmind.com/geoip/) + - [clickhouse-maxmind-geoip](https://github.com/AlexeyKupershtokh/clickhouse-maxmind-geoip) +- AutoML + - [MindsDB](https://mindsdb.com/) + - [MindsDB](https://github.com/mindsdb/mindsdb) - ClickHouseã¨ã®çµ±åˆã«ã‚ˆã‚Šã€ClickHouseã®ãƒ‡ãƒ¼ã‚¿ã‚’多様ãªAI/MLモデルã§åˆ©ç”¨å¯èƒ½ã«ã—ã¾ã™ã€‚ + +## プログラミング言語エコシステム {#programming-language-ecosystems} + +- Python + - [SQLAlchemy](https://www.sqlalchemy.org) + - [sqlalchemy-clickhouse](https://github.com/cloudflare/sqlalchemy-clickhouse) (使用 [infi.clickhouse_orm](https://github.com/Infinidat/infi.clickhouse_orm)) + - [PyArrow/Pandas](https://pandas.pydata.org) + - [Ibis](https://github.com/ibis-project/ibis) +- PHP + - [Doctrine](https://www.doctrine-project.org/) + - [dbal-clickhouse](https://packagist.org/packages/friendsofdoctrine/dbal-clickhouse) +- R + - [dplyr](https://db.rstudio.com/dplyr/) + - [RClickHouse](https://github.com/IMSMWU/RClickHouse) (使用 [clickhouse-cpp](https://github.com/artpaul/clickhouse-cpp)) +- Java + - [Hadoop](http://hadoop.apache.org) + - [clickhouse-hdfs-loader](https://github.com/jaykelin/clickhouse-hdfs-loader) (使用 [JDBC](../../sql-reference/table-functions/jdbc.md)) +- Scala + - [Akka](https://akka.io) + - [clickhouse-scala-client](https://github.com/crobox/clickhouse-scala-client) +- C# + - [ADO.NET](https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/ado-net-overview) + - [ClickHouse.Ado](https://github.com/killwort/ClickHouse-Net) + - [ClickHouse.Client](https://github.com/DarkWanderer/ClickHouse.Client) + - [ClickHouse.Net](https://github.com/ilyabreev/ClickHouse.Net) + - [ClickHouse.Net.Migrations](https://github.com/ilyabreev/ClickHouse.Net.Migrations) + - [Linq To DB](https://github.com/linq2db/linq2db) +- Elixir + - [Ecto](https://github.com/elixir-ecto/ecto) + - [clickhouse_ecto](https://github.com/appodeal/clickhouse_ecto) +- Ruby + - [Ruby on Rails](https://rubyonrails.org/) + - [activecube](https://github.com/bitquery/activecube) + - [ActiveRecord](https://github.com/PNixx/clickhouse-activerecord) + - [GraphQL](https://github.com/graphql) + - [activecube-graphql](https://github.com/bitquery/activecube-graphql) diff --git a/docs/ja/interfaces/third-party/proxy.md b/docs/ja/interfaces/third-party/proxy.md new file mode 100644 index 00000000000..697ed26cb35 --- /dev/null +++ b/docs/ja/interfaces/third-party/proxy.md @@ -0,0 +1,43 @@ +--- +slug: /ja/interfaces/third-party/proxy +sidebar_position: 29 +sidebar_label: プロキシ +--- + +# サードパーティ開発者ã«ã‚ˆã‚‹ãƒ—ロキシサーãƒãƒ¼ + +## chproxy {#chproxy} + +[chproxy](https://github.com/Vertamedia/chproxy) ã¯ã€ClickHouseデータベース用ã®HTTPプロキシãŠã‚ˆã³ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚µã§ã™ã€‚ + +特徴: + +- ユーザーã”ã¨ã®ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã¨ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã€‚ +- 柔軟ãªåˆ¶é™ã€‚ +- 自動SSL証明書ã®æ›´æ–°ã€‚ + +Goã§å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## KittenHouse {#kittenhouse} + +[KittenHouse](https://github.com/VKCOM/kittenhouse) ã¯ã€ã‚¢ãƒ—リケーションå´ã§INSERTデータをãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã™ã‚‹ã“ã¨ãŒä¸å¯èƒ½ã¾ãŸã¯ä¸ä¾¿ãªå ´åˆã«ã€ClickHouseã¨ã‚¢ãƒ—リケーションサーãƒãƒ¼é–“ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ—ロキシã¨ã—ã¦è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +特徴: + +- メモリ内ãŠã‚ˆã³ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ã®ãƒ‡ãƒ¼ã‚¿ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã€‚ +- テーブルã”ã¨ã®ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã€‚ +- ロードãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ã¨ãƒ˜ãƒ«ã‚¹ãƒã‚§ãƒƒã‚¯ã€‚ + +Goã§å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## ClickHouse-Bulk {#clickhouse-bulk} + +[ClickHouse-Bulk](https://github.com/nikepan/clickhouse-bulk) ã¯ã€ã‚·ãƒ³ãƒ—ルãªClickHouseインサートコレクターã§ã™ã€‚ + +特徴: + +- リクエストをグループ化ã—ã€ã—ãã„値ã¾ãŸã¯é–“éš”ã§é€ä¿¡ã€‚ +- 複数ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã€‚ +- 基本èªè¨¼ã€‚ + +Goã§å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/intro.md b/docs/ja/intro.md new file mode 100644 index 00000000000..8837dfd48ad --- /dev/null +++ b/docs/ja/intro.md @@ -0,0 +1,69 @@ +--- +slug: /ja +sidebar_label: ClickHouseã¨ã¯ï¼Ÿ +description: "ClickHouse®ã¯ã€ã‚ªãƒ³ãƒ©ã‚¤ãƒ³åˆ†æžå‡¦ç†ï¼ˆOLAP)å‘ã‘ã®åˆ—指å‘SQLデータベース管ç†ã‚·ã‚¹ãƒ†ãƒ ï¼ˆDBMS)ã§ã™ã€‚オープンソースソフトウェアã¨ã—ã¦ã‚‚ã€ã‚¯ãƒ©ã‚¦ãƒ‰æä¾›ã¨ã—ã¦ã‚‚利用å¯èƒ½ã§ã™ã€‚" +title: ClickHouseã¨ã¯ï¼Ÿ +--- + +ClickHouse®ã¯ã€ã‚ªãƒ³ãƒ©ã‚¤ãƒ³åˆ†æžå‡¦ç†ï¼ˆOLAP)å‘ã‘ã®é«˜æ€§èƒ½ãªåˆ—指å‘SQLデータベース管ç†ã‚·ã‚¹ãƒ†ãƒ ï¼ˆDBMS)ã§ã™ã€‚ã“ã‚Œã«ã¯ã€[オープンソースソフトウェア](https://github.com/ClickHouse/ClickHouse)ã¨ã—ã¦ã®æä¾›ã¨ã€[クラウドæä¾›](https://clickhouse.com/cloud)ã®ä¸¡æ–¹ãŒã‚ã‚Šã¾ã™ã€‚ + +## 分æžã¨ã¯ï¼Ÿ + +分æžã€ã¾ãŸã¯OLAP(オンライン分æžå‡¦ç†ï¼‰ã¯ã€å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«å¯¾ã—ã¦è¤‡é›‘ãªè¨ˆç®—(例:集計ã€æ–‡å­—列処ç†ã€ç®—術演算)を行ã†SQLクエリを指ã—ã¾ã™ã€‚ + +トランザクションクエリ(ã¾ãŸã¯OLTPã€ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ»ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å‡¦ç†ï¼‰ã¯ã€1クエリã‚ãŸã‚Šæ•°è¡Œã®ã¿ã‚’読ã¿æ›¸ãã—ã€ãƒŸãƒªç§’ã§å®Œäº†ã™ã‚‹ã®ã«å¯¾ã—ã€åˆ†æžã‚¯ã‚¨ãƒªã¯é€šå¸¸ã€æ•°åå„„ã€æ•°å…†ã®è¡Œã‚’処ç†ã—ã¾ã™ã€‚ + +多ãã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§ã¯ã€[分æžã‚¯ã‚¨ãƒªã¯ã€Œãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã€ã§ãªã‘ã‚Œã°ãªã‚‰ãªã„](https://clickhouse.com/engineering-resources/what-is-real-time-analytics)ã€ã¤ã¾ã‚Š1秒未満ã§çµæžœã‚’è¿”ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## 行指å‘ストレージã¨åˆ—指å‘ストレージ + +ãã®ã‚ˆã†ãªãƒ‘フォーマンスレベルã¯ã€é©åˆ‡ãªãƒ‡ãƒ¼ã‚¿ã®ã€ŒæŒ‡å‘ã€ã§ã®ã¿é”æˆã§ãã¾ã™ã€‚ + +データベースã¯ãƒ‡ãƒ¼ã‚¿ã‚’行指å‘ã¾ãŸã¯åˆ—指å‘ã§æ ¼ç´ã—ã¾ã™ã€‚ + +行指å‘データベースã§ã¯ã€é€£ç¶šã™ã‚‹ãƒ†ãƒ¼ãƒ–ル行ãŒé †æ¬¡ã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã«ã‚ˆã‚Šã€è¡Œã®ã‚«ãƒ©ãƒ å€¤ãŒä¸€ç·’ã«æ ¼ç´ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€è¡Œã‚’迅速ã«å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouseã¯åˆ—指å‘データベースã§ã™ã€‚ã“ã†ã—ãŸã‚·ã‚¹ãƒ†ãƒ ã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルã¯ã‚«ãƒ©ãƒ ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã—ã¦æ ¼ç´ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€å„カラムã®å€¤ãŒé †æ¬¡ã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã¯ã€å˜ä¸€ã®è¡Œã‚’復元ã™ã‚‹ã®ãŒå›°é›£ï¼ˆè¡Œã®å€¤ã®é–“ã«ã‚®ãƒ£ãƒƒãƒ—ãŒã‚ã‚‹ãŸã‚)ã§ã™ãŒã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚„集計ã¨ã„ã£ãŸã‚«ãƒ©ãƒ æ“作ãŒè¡ŒæŒ‡å‘データベースよりもã¯ã‚‹ã‹ã«é€Ÿããªã‚Šã¾ã™ã€‚ + +ã“ã®é•ã„ã¯ã€3ã¤ã®ã‚«ãƒ©ãƒ ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã†ä¾‹ã®ã‚¯ã‚¨ãƒªã§æœ€ã‚‚よã説明ã§ãã¾ã™ï¼š + +```sql +SELECT * +FROM table +WHERE time > ‘2024-09-01 13:14:15’ +AND location = ‘Berlin’ +AND `Mobile Phone` LIKE ‘%61010%` +``` + +**行指å‘DBMS** + +![Row-oriented](@site/docs/ja/images/row-oriented.gif#) + +**列指å‘DBMS** + +![Column-oriented](@site/docs/ja/images/column-oriented.gif#) + +## データã®ãƒ¬ãƒ—リケーションã¨æ•´åˆæ€§ + +ClickHouseã¯ã€éžåŒæœŸã®ãƒžãƒ«ãƒãƒžã‚¹ã‚¿ãƒ¼ãƒ¬ãƒ—リケーション方å¼ã‚’使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãŒè¤‡æ•°ã®ãƒŽãƒ¼ãƒ‰ã«å†—é•·çš„ã«æ ¼ç´ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ä»»æ„ã®åˆ©ç”¨å¯èƒ½ãªãƒ¬ãƒ—リカã«æ›¸ãè¾¼ã¾ã‚ŒãŸå¾Œã€æ®‹ã‚Šã®ãƒ¬ãƒ—リカãŒãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã‚³ãƒ”ーをå–å¾—ã—ã¾ã™ã€‚システムã¯ç•°ãªã‚‹ãƒ¬ãƒ—リカ間ã§åŒä¸€ã®ãƒ‡ãƒ¼ã‚¿ã‚’維æŒã—ã¾ã™ã€‚ã»ã¨ã‚“ã©ã®éšœå®³ã‹ã‚‰ã®å¾©æ—§ã¯è‡ªå‹•çš„ã«ã€ã‚ã‚‹ã„ã¯è¤‡é›‘ãªã‚±ãƒ¼ã‚¹ã§ã¯åŠè‡ªå‹•çš„ã«è¡Œã‚ã‚Œã¾ã™ã€‚ + +## ロールベースã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ + +ClickHouseã¯ã€SQLクエリを使用ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†ã‚’実装ã—ã€ANSI SQL標準や一般的ãªãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ ã§è¦‹ã‚‰ã‚Œã‚‹ã‚ˆã†ãªãƒ­ãƒ¼ãƒ«ãƒ™ãƒ¼ã‚¹ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡è¨­å®šã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +## SQLサãƒãƒ¼ãƒˆ + +ClickHouseã¯ã€ANSI SQL標準ã¨å¤šãã®å ´åˆåŒä¸€ã§ã‚ã‚‹[SQLã«åŸºã¥ã宣言的クエリ言語](/docs/ja/sql-reference)をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るクエリå¥ã«ã¯ã€[GROUP BY](/docs/ja/sql-reference/statements/select/group-by)ã€[ORDER BY](/docs/ja/sql-reference/statements/select/order-by)ã€[FROM](/docs/ja/sql-reference/statements/select/from)ã§ã®ã‚µãƒ–クエリã€[JOIN](/docs/ja/sql-reference/statements/select/join)å¥ã€[IN](/docs/ja/sql-reference/operators/in)演算å­ã€[ウィンドウ関数](/docs/ja/sql-reference/window-functions)ã€ã‚¹ã‚«ãƒ©ãƒ¼ã‚µãƒ–クエリãŒå«ã¾ã‚Œã¾ã™ã€‚ + +## 近似計算 + +ClickHouseã¯ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ãŸã‚ã«æ­£ç¢ºã•ã‚’犠牲ã«ã™ã‚‹æ–¹æ³•ã‚’æä¾›ã—ã¾ã™ã€‚例ãˆã°ã€ä¸€éƒ¨ã®é›†è¨ˆé–¢æ•°ã¯ã€ç•°ãªã‚‹å€¤ã®ã‚«ã‚¦ãƒ³ãƒˆã€ä¸­å¤®å€¤ã€åˆ†ä½ç‚¹ã‚’近似的ã«è¨ˆç®—ã—ã¾ã™ã€‚ã¾ãŸã€ã‚¯ã‚¨ãƒªã¯ãƒ‡ãƒ¼ã‚¿ã®ã‚µãƒ³ãƒ—ルã«å¯¾ã—ã¦å®Ÿè¡Œã•ã‚Œã€è¿…速ã«è¿‘ä¼¼çµæžœã‚’計算ã§ãã¾ã™ã€‚最後ã«ã€ã™ã¹ã¦ã®ã‚­ãƒ¼ã§ã¯ãªãã€é™ã‚‰ã‚ŒãŸæ•°ã®ã‚­ãƒ¼ã§é›†è¨ˆã‚’実行ã§ãã¾ã™ã€‚キーã®åˆ†å¸ƒã®åã‚Šã«ã‚ˆã£ã¦ã¯ã€æ­£ç¢ºãªè¨ˆç®—よりもã¯ã‚‹ã‹ã«å°‘ãªã„リソースを使用ã—ã¤ã¤ã€åˆç†çš„ã«æ­£ç¢ºãªçµæžœã‚’æä¾›ã§ãã¾ã™ã€‚ + +## アダプティブçµåˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ  + +ClickHouseã¯çµåˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’é©å¿œçš„ã«é¸æŠžã—ã€æœ€åˆã«é«˜é€Ÿãªãƒãƒƒã‚·ãƒ¥çµåˆã‚’使用ã—ã€å¤§ããªãƒ†ãƒ¼ãƒ–ルãŒè¤‡æ•°ã‚ã‚‹å ´åˆã«ãƒžãƒ¼ã‚¸çµåˆã«ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ã¾ã™ã€‚ + +## 優れãŸã‚¯ã‚¨ãƒªãƒ‘フォーマンス + +ClickHouseã¯æ¥µã‚ã¦é«˜é€Ÿãªã‚¯ã‚¨ãƒªãƒ‘フォーマンスã§çŸ¥ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ +ClickHouseãŒãªãœã“ã‚Œã»ã©é€Ÿã„ã®ã‹ã‚’知るã«ã¯ã€[ClickHouseã¯ãªãœé€Ÿã„ã®ã‹ï¼Ÿ](/docs/ja/concepts/why-clickhouse-is-so-fast.md)ガイドをå‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/managing-data/deletes.md b/docs/ja/managing-data/deletes.md new file mode 100644 index 00000000000..19a4d04f577 --- /dev/null +++ b/docs/ja/managing-data/deletes.md @@ -0,0 +1,71 @@ +--- +slug: /ja/deletes +title: データã®å‰Šé™¤ +description: ClickHouseã§ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹æ–¹æ³• +keywords: [削除, トランケート, ドロップ, è«–ç†å‰Šé™¤] +--- + +ClickHouseã§ã¯ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹ãŸã‚ã®ã„ãã¤ã‹ã®æ–¹æ³•ãŒã‚ã‚Šã€ãã‚Œãžã‚Œã«åˆ©ç‚¹ã¨ãƒ‘フォーマンス特性ãŒã‚ã‚Šã¾ã™ã€‚データモデルã¨å‰Šé™¤ã™ã‚‹äºˆå®šã®ãƒ‡ãƒ¼ã‚¿é‡ã«åŸºã¥ã„ã¦é©åˆ‡ãªæ–¹æ³•ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +| 方法 | 構文 | 使用ã®ã‚¿ã‚¤ãƒŸãƒ³ã‚° | +| --- | --- | --- | +| [è«–ç†å‰Šé™¤](/ja/guides/developer/lightweight-delete) | `DELETE FROM [table]` | å°è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹å ´åˆã«ä½¿ç”¨ã—ã¾ã™ã€‚`SELECT`クエリã‹ã‚‰ã™ãã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ãŒã€æœ€åˆã¯å†…部的ã«å‰Šé™¤æ¸ˆã¿ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã‚‹ã ã‘ã§ã€ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ã¯å‰Šé™¤ã•ã‚Œã¾ã›ã‚“。 | +| [物ç†å‰Šé™¤](/ja/sql-reference/statements/alter/delete) | `ALTER TABLE [table] DELETE` | ディスクã‹ã‚‰ã™ãã«ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«ä½¿ç”¨ã—ã¾ã™ï¼ˆä¾‹ï¼šã‚³ãƒ³ãƒ—ライアンス目的)。`SELECT`ã®ãƒ‘フォーマンスã«æ‚ªå½±éŸ¿ã‚’åŠã¼ã—ã¾ã™ã€‚ | +| [テーブルをトランケート](/ja/sql-reference/statements/truncate) | `TRUNCATE TABLE [db.table]` | テーブルã‹ã‚‰ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’効率的ã«å‰Šé™¤ã—ã¾ã™ã€‚ | +| [パーティションをドロップ](/ja/sql-reference/statements/alter/partition#drop-partitionpart) | `DROP PARTITION` | パーティションã‹ã‚‰ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’効率的ã«å‰Šé™¤ã—ã¾ã™ã€‚ | + +ClickHouseã§ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹ã•ã¾ã–ã¾ãªæ–¹æ³•ã®æ¦‚è¦ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ã€‚ + +## è«–ç†å‰Šé™¤ + +è«–ç†å‰Šé™¤ã«ã‚ˆã‚Šã€è¡Œã¯å‰Šé™¤æ¸ˆã¿ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã€ã™ã¹ã¦ã®å¾Œç¶šã®`SELECT`クエリã‹ã‚‰è‡ªå‹•çš„ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚削除ã•ã‚ŒãŸè¡Œã®ãã®å¾Œã®å‰Šé™¤ã¯è‡ªç„¶ãªãƒžãƒ¼ã‚¸ã‚µã‚¤ã‚¯ãƒ«ä¸­ã«è¡Œã‚れるãŸã‚ã€I/OãŒå°‘ãªããªã‚Šã¾ã™ã€‚ãã®ãŸã‚ã€æœªæŒ‡å®šã®æœŸé–“ã€ãƒ‡ãƒ¼ã‚¿ã¯å®Ÿéš›ã«ã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‹ã‚‰å‰Šé™¤ã•ã‚Œãšã€å‰Šé™¤ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã‚‹ã®ã¿ã§ã™ã€‚データãŒç¢ºå®Ÿã«å‰Šé™¤ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ä¸Šè¨˜ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚³ãƒžãƒ³ãƒ‰ã‚’検討ã—ã¦ãã ã•ã„。 + +```sql +-- ミューテーションã§2018å¹´ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚推奨ã•ã‚Œã¾ã›ã‚“。 +DELETE FROM posts WHERE toYear(CreationDate) = 2018 +``` + +è«–ç†å‰Šé™¤ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’使用ã—ã¦å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹ã¨ã€`SELECT`クエリã®ãƒ‘フォーマンスã«æ‚ªå½±éŸ¿ã‚’åŠã¼ã™å¯èƒ½æ€§ã‚‚ã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ—ロジェクションをæŒã¤ãƒ†ãƒ¼ãƒ–ルã«ã¯äº’æ›æ€§ãŒã‚ã‚Šã¾ã›ã‚“。 + +æ“作ã«ã¯å‰Šé™¤ã•ã‚ŒãŸè¡Œã‚’[マークã™ã‚‹ãŸã‚ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³](/ja/sql-reference/statements/delete#how-lightweight-deletes-work-internally-in-clickhouse)(`_row_exists`カラムを追加)ã«é–¢é€£ã—ãŸI/OãŒç”Ÿã˜ã¾ã™ã€‚ + +一般ã«ã€å‰Šé™¤ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã™ã‚‹ã“ã¨ãŒè¨±å®¹ã•ã‚Œã‚‹å ´åˆï¼ˆéžã‚³ãƒ³ãƒ—ライアンスケースãªã©ï¼‰ã€è«–ç†å‰Šé™¤ã‚’物ç†å‰Šé™¤ã‚ˆã‚Šã‚‚優先ã™ã‚‹ã¹ãã§ã™ã€‚ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ã“ã®ã‚¢ãƒ—ローãƒã¯é¿ã‘ã‚‹ã¹ãã§ã™ã€‚ + +[è«–ç†å‰Šé™¤](/ja/guides/developer/lightweight-delete)ã«ã¤ã„ã¦è©³ã—ã読む。 + +## 物ç†å‰Šé™¤ + +è«–ç†å‰Šé™¤ã¯`ALTER TABLE … DELETE`コマンドを通ã˜ã¦ç™ºè¡Œã§ãã¾ã™ã€‚例: + +```sql +-- ミューテーションã§2018å¹´ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚推奨ã•ã‚Œã¾ã›ã‚“。 +ALTER TABLE posts DELETE WHERE toYear(CreationDate) = 2018 +``` + +ã“れらã¯åŒæœŸçš„ã«ï¼ˆéžãƒ¬ãƒ—リケートã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ã€ã¾ãŸã¯éžåŒæœŸçš„ã«ï¼ˆ[mutations_sync](/ja/operations/settings/settings#mutations_sync)設定ã«ã‚ˆã‚Šæ±ºå®šï¼‰å®Ÿè¡Œã§ãã¾ã™ã€‚`WHERE`å¼ã«ä¸€è‡´ã™ã‚‹ã™ã¹ã¦ã®éƒ¨åˆ†ã‚’å†æ›¸ãè¾¼ã¿ã™ã‚‹ãŸã‚ã€éžå¸¸ã«I/OãŒå¤šããªã‚Šã¾ã™ã€‚ã“ã®ãƒ—ロセスã«ã¯ã‚¢ãƒˆãƒŸãƒƒã‚¯æ€§ãŒãªãã€éƒ¨åˆ†ãŒæº–å‚™ãŒã§ã次第ã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã•ã‚ŒãŸéƒ¨åˆ†ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ミューテーション中ã«å®Ÿè¡Œã•ã‚Œã‚‹`SELECT`クエリã¯ã€ã™ã§ã«ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã•ã‚ŒãŸéƒ¨åˆ†ã®ãƒ‡ãƒ¼ã‚¿ã¨ã¾ã ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã•ã‚Œã¦ã„ãªã„部分ã®ãƒ‡ãƒ¼ã‚¿ã®ä¸¡æ–¹ã‚’観察ã—ã¾ã™ã€‚進行状æ³ã®çŠ¶æ…‹ã¯[systems.mutations](/ja/operations/system-tables/mutations#system_tables-mutations)テーブルを通ã—ã¦ç¢ºèªã§ãã¾ã™ã€‚ã“れらã¯I/OãŒå¤šã„æ“作ã§ã‚ã‚Šã€ã‚¯ãƒ©ã‚¹ã‚¿ã®`SELECT`パフォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€æ…Žé‡ã«ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ + +[è«–ç†å‰Šé™¤](/ja/sql-reference/statements/alter/delete)ã«ã¤ã„ã¦è©³ã—ã読む。 + +## テーブルをトランケート + +テーブル内ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ä»¥ä¸‹ã®`TRUNCATE TABLE`コマンドを使用ã—ã¦ãã ã•ã„。ã“ã‚Œã¯è«–ç†ãªæ“作ã§ã™ã€‚ + +```sql +TRUNCATE TABLE posts +``` + +[TRUNCATE TABLE](/ja/sql-reference/statements/truncate)ã«ã¤ã„ã¦è©³ã—ã読む。 + +## パーティションをドロップ + +データã«ã‚«ã‚¹ã‚¿ãƒ ãƒ‘ーティションキーを指定ã—ã¦ã„ã‚‹å ´åˆã€ãƒ‘ーティションを効率的ã«ãƒ‰ãƒ­ãƒƒãƒ—ã§ãã¾ã™ã€‚高カーディナリティã®ãƒ‘ーティショニングã¯é¿ã‘ã¦ãã ã•ã„。 + +```sql +ALTER TABLE posts (DROP PARTITION '2008') +``` + +[DROP PARTITION](/ja/sql-reference/statements/alter/partition)ã«ã¤ã„ã¦è©³ã—ã読む。 + +## ãã®ä»–ã®ãƒªã‚½ãƒ¼ã‚¹ + +- [ClickHouseã§ã®ã‚¢ãƒƒãƒ—デートã¨å‰Šé™¤ã®å‡¦ç†](https://clickhouse.com/blog/handling-updates-and-deletes-in-clickhouse) diff --git a/docs/ja/managing-data/updates.md b/docs/ja/managing-data/updates.md new file mode 100644 index 00000000000..56571504cc4 --- /dev/null +++ b/docs/ja/managing-data/updates.md @@ -0,0 +1,81 @@ +--- +slug: /ja/updating-data +title: データã®æ›´æ–° +description: ClickHouseã§ãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã™ã‚‹æ–¹æ³• +keywords: [æ›´æ–°, データ更新] +--- + +## ClickHouseã¨OLTPデータベースã«ãŠã‘るデータ更新ã®é•ã„ + +更新を処ç†ã™ã‚‹éš›ã€ClickHouseã¨OLTPデータベースã¯ã€ãã®åŸºç¤Žã¨ãªã‚‹è¨­è¨ˆç†å¿µã¨ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã®é•ã„ã«ã‚ˆã‚Šå¤§ãã分ã‹ã‚Œã¾ã™ã€‚例ãˆã°ã€PostgreSQLã¯è¡ŒæŒ‡å‘ã§ACID準拠ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã‚ã‚Šã€ãƒžãƒ«ãƒãƒãƒ¼ã‚¸ãƒ§ãƒ³åŒæ™‚実行制御(MVCC)ãªã©ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’通ã˜ã¦ã€å …牢ã‹ã¤ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³æ€§ã®ã‚ã‚‹æ›´æ–°ãŠã‚ˆã³å‰Šé™¤æ“作をサãƒãƒ¼ãƒˆã—ã€ãƒ‡ãƒ¼ã‚¿ã®æ•´åˆæ€§ã‚’確ä¿ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€é«˜ã„åŒæ™‚実行環境ã§ã‚‚安全ã‹ã¤ä¿¡é ¼æ€§ã®ã‚る修正ãŒå¯èƒ½ã§ã™ã€‚ + +一方ã€ClickHouseã¯èª­ã¿è¾¼ã¿ãŒå¤šã„分æžã¨é«˜ã‚¹ãƒ«ãƒ¼ãƒ—ットã®è¿½åŠ ã®ã¿ã®æ“作ã«æœ€é©åŒ–ã•ã‚ŒãŸåˆ—指å‘ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã™ã€‚インプレース更新ã¨å‰Šé™¤ã‚’ãƒã‚¤ãƒ†ã‚£ãƒ–ã§ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ãŒã€é«˜ã„I/Oã‚’é¿ã‘ã‚‹ãŸã‚注æ„ã—ã¦ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚別ã®æ–¹æ³•ã¨ã—ã¦ã€å‰Šé™¤ã‚„æ›´æ–°ã‚’éžåŒæœŸçš„ã¾ãŸã¯èª­ã¿å–り時ã«å‡¦ç†ã•ã‚Œã‚‹è¿½åŠ æ“作ã«å¤‰æ›ã™ã‚‹ã‚ˆã†ã«ãƒ†ãƒ¼ãƒ–ルをå†æ§‹ç¯‰ã™ã‚‹ã“ã¨ãŒã§ãã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã®ãƒ‡ãƒ¼ã‚¿æ“作よりも高スループットã®ãƒ‡ãƒ¼ã‚¿å–ã‚Šè¾¼ã¿ã¨åŠ¹çŽ‡çš„ãªã‚¯ã‚¨ãƒªãƒ‘フォーマンスã«é‡ç‚¹ã‚’ç½®ã„ã¦ã„ã¾ã™ã€‚ + +## ClickHouseã§ãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã™ã‚‹æ–¹æ³• + +ClickHouseã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã™ã‚‹æ–¹æ³•ãŒã„ãã¤ã‹ã‚ã‚Šã€ãã‚Œãžã‚Œã«åˆ©ç‚¹ã¨ãƒ‘フォーマンスã®ç‰¹å¾´ãŒã‚ã‚Šã¾ã™ã€‚使用ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã¨æ›´æ–°äºˆå®šé‡ã«åŸºã¥ã„ã¦é©åˆ‡ãªæ–¹æ³•ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ã©ã¡ã‚‰ã®æ“作ã«ãŠã„ã¦ã‚‚ã€ä¸€å®šã®æ™‚間内ã«å‡¦ç†ã•ã‚Œã‚‹è¿½åŠ æ“作よりもé€ä¿¡ã•ã‚ŒãŸè¿½åŠ æ“作ã®æ•°ãŒçµ¶ãˆãšä¸Šå›žã‚‹å ´åˆã€é©ç”¨ã•ã‚Œãªã‘ã‚Œã°ãªã‚‰ãªã„éžãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚ŒãŸè¿½åŠ æ“作ã®ã‚­ãƒ¥ãƒ¼ãŒæˆé•·ã—続ã‘ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æœ€çµ‚çš„ã«`SELECT`クエリã®ãƒ‘フォーマンスãŒä½Žä¸‹ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ã¾ã¨ã‚ã‚‹ã¨ã€æ›´æ–°æ“作ã¯æ…Žé‡ã«ç™ºè¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€`system.mutations`テーブルを使用ã—ã¦è¿½åŠ æ“作ã®ã‚­ãƒ¥ãƒ¼ã‚’注æ„æ·±ã追跡ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚OLTPデータベースã®ã‚ˆã†ã«é »ç¹ã«æ›´æ–°ã‚’è¡Œã‚ãªã„ã§ãã ã•ã„。頻ç¹ã«æ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€[ReplacingMergeTree](/ja/engines/table-engines/mergetree-family/replacingmergetree)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +| 方法 | 構文 | 使用時期 | +| --- | --- | --- | +| [物ç†æ›´æ–°](/ja/sql-reference/statements/alter/update) | `ALTER TABLE [table] UPDATE` | データをディスクã«å³æ™‚æ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆï¼ˆä¾‹ï¼šã‚³ãƒ³ãƒ—ライアンスã®ãŸã‚)。`SELECT`パフォーマンスã«æ‚ªå½±éŸ¿ã‚’与ãˆã¾ã™ã€‚ | +| [è«–ç†æ›´æ–°](/ja/guides/developer/lightweight-update) | `ALTER TABLE [table] UPDATE` | `SET apply_mutations_on_fly = 1;`を使用ã—ã¦æœ‰åŠ¹åŒ–。少é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã™ã‚‹å ´åˆã«ä½¿ç”¨ã—ã¾ã™ã€‚æ›´æ–°ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒå³åº§ã«æ¬¡ã®ã™ã¹ã¦ã®`SELECT`クエリã§è¿”ã•ã‚Œã¾ã™ãŒã€æœ€åˆã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§å†…部的ã«æ›´æ–°æ¸ˆã¿ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã‚‹ã ã‘ã§ã™ã€‚ | +| [ReplacingMergeTree](/ja/engines/table-engines/mergetree-family/replacingmergetree) | `ENGINE = ReplacingMergeTree` | 大é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã™ã‚‹å ´åˆã«ä½¿ç”¨ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルエンジンã¯ãƒžãƒ¼ã‚¸æ™‚ã®ãƒ‡ãƒ¼ã‚¿é‡è¤‡å‰Šé™¤ã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ | + +以下ã¯ã€ClickHouseã§ãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã™ã‚‹ã•ã¾ã–ã¾ãªæ–¹æ³•ã®æ¦‚è¦ã§ã™ï¼š + +## 物ç†æ›´æ–° + +物ç†æ›´æ–°ã¯ã€ä¾‹ãˆã°`ALTER TABLE … UPDATE`コマンドを通ã˜ã¦ç™ºè¡Œã§ãã¾ã™ã€‚ + +```sql +ALTER TABLE posts_temp + (UPDATE AnswerCount = AnswerCount + 1 WHERE AnswerCount = 0) +``` +ã“れらã¯éžå¸¸ã«I/Oヘビーã§ã‚ã‚Šã€`WHERE`å¼ã«ä¸€è‡´ã™ã‚‹ã™ã¹ã¦ã®ãƒ‘ーツをå†æ›¸ãè¾¼ã¿ã—ã¾ã™ã€‚ã“ã®ãƒ—ロセスã«ã¯åŽŸå­æ€§ãŒãªãã€æº–å‚™ãŒæ•´ã„次第ã€å¤‰æ›´ã•ã‚ŒãŸãƒ‘ーツãŒç½®ãæ›ãˆã‚‰ã‚Œã€è¿½åŠ æ“作中ã«å®Ÿè¡Œã•ã‚Œã‚‹`SELECT`クエリã¯æ—¢ã«å¤‰æ›´ã•ã‚ŒãŸãƒ‘ーツã¨ã¾ã å¤‰æ›´ã•ã‚Œã¦ã„ãªã„パーツã®ä¸¡æ–¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’表示ã—ã¾ã™ã€‚ユーザーã¯[systems.mutations](/ja/operations/system-tables/mutations#system_tables-mutations)テーブルを通ã˜ã¦é€²æ—状æ³ã‚’追跡ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã¯I/Oを多ã消費ã™ã‚‹æ“作ã§ã‚ã‚Šã€ã‚¯ãƒ©ã‚¹ã‚¿ã®`SELECT`パフォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ç¯€åº¦ã‚’æŒã£ã¦ä½¿ç”¨ã™ã¹ãã§ã™ã€‚ + +[物ç†æ›´æ–°](/ja/sql-reference/statements/alter/update)ã«ã¤ã„ã¦è©³ã—ã読む。 + +## è«–ç†æ›´æ–° (ClickHouseクラウドã§ã®ã¿åˆ©ç”¨å¯èƒ½) + +è«–ç†æ›´æ–°ã¯ã€è¡Œã‚’å³åº§ã«æ›´æ–°ã—ã€ãã®å¾Œã®`SELECT`クエリã§è‡ªå‹•çš„ã«å¤‰æ›´ã•ã‚ŒãŸå€¤ã‚’è¿”ã™ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’æä¾›ã—ã¾ã™ï¼ˆã“ã‚Œã¯ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’ä¼´ã„ã€ã‚¯ã‚¨ãƒªã‚’é…ãã—ã¾ã™ï¼‰ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€é€šå¸¸ã®è¿½åŠ æ“作ã®åŽŸå­æ€§åˆ¶é™ãŒåŠ¹æžœçš„ã«è§£æ±ºã•ã‚Œã¾ã™ã€‚以下ã«ä¾‹ã‚’示ã—ã¾ã™ï¼š + +```sql +SET apply_mutations_on_fly = 1; + +SELECT ViewCount +FROM posts +WHERE Id = 404346 + +┌─ViewCount─┠+│ 26762 │ +└───────────┘ + +1 row in set. Elapsed: 0.115 sec. Processed 59.55 million rows, 238.25 MB (517.83 million rows/s., 2.07 GB/s.) +Peak memory usage: 113.65 MiB. + +-increment count +ALTER TABLE posts + (UPDATE ViewCount = ViewCount + 1 WHERE Id = 404346) + +SELECT ViewCount +FROM posts +WHERE Id = 404346 + +┌─ViewCount─┠+│ 26763 │ +└───────────┘ + +1 row in set. Elapsed: 0.149 sec. Processed 59.55 million rows, 259.91 MB (399.99 million rows/s., 1.75 GB/s.) +``` + +è«–ç†æ›´æ–°ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã™ã‚‹ãŸã‚ã«è¿½åŠ æ“作ãŒä½¿ç”¨ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã‚Œã¯å³åº§ã«ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œãšã€`SELECT`クエリã®éš›ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§éžåŒæœŸçš„ã«é©ç”¨ã•ã‚Œã‚‹ãŸã‚ã€é€šå¸¸ã®è¿½åŠ æ“作ã¨åŒæ§˜ã«é‡ã„オーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒã‹ã‹ã‚Šã€I/Oを多ã消費ã™ã‚‹æ“作ã§ã‚ã‚Šã€ç¯€åº¦ã‚’æŒã£ã¦ä½¿ç”¨ã™ã¹ãã§ã™ã€‚ã“ã®æ“作ã§ä½¿ç”¨ã§ãã‚‹å¼ã«ã‚‚制é™ãŒã‚ã‚Šã¾ã™ï¼ˆ[詳細](/ja/guides/developer/lightweight-update#support-for-subqueries-and-non-deterministic-functions)ã‚’å‚照)。 + +[è«–ç†æ›´æ–°](/ja/guides/developer/lightweight-update)ã«ã¤ã„ã¦è©³ã—ã読む。 + +## 追加資料 + +- [ClickHouseã«ãŠã‘ã‚‹æ›´æ–°ã¨å‰Šé™¤ã®å‡¦ç†](https://clickhouse.com/blog/handling-updates-and-deletes-in-clickhouse) diff --git a/docs/ja/materialized-view/images/materialized-view-diagram.png b/docs/ja/materialized-view/images/materialized-view-diagram.png new file mode 100644 index 00000000000..4836b0d8ec5 Binary files /dev/null and b/docs/ja/materialized-view/images/materialized-view-diagram.png differ diff --git a/docs/ja/materialized-view/images/refreshable-materialized-view-diagram.png b/docs/ja/materialized-view/images/refreshable-materialized-view-diagram.png new file mode 100644 index 00000000000..f64760e9b94 Binary files /dev/null and b/docs/ja/materialized-view/images/refreshable-materialized-view-diagram.png differ diff --git a/docs/ja/materialized-view/index.md b/docs/ja/materialized-view/index.md new file mode 100644 index 00000000000..7d70214e9ed --- /dev/null +++ b/docs/ja/materialized-view/index.md @@ -0,0 +1,348 @@ +--- +slug: /ja/materialized-view +title: Materialized View +description: Materialized Viewを使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’高速化ã™ã‚‹æ–¹æ³• +keywords: [materialized views, クエリを高速化, クエリ最é©åŒ–] +--- + +# Materialized View + +Materialized Viewを使用ã™ã‚‹ã¨ã€è¨ˆç®—ã®ã‚³ã‚¹ãƒˆã‚’クエリ時ã‹ã‚‰æŒ¿å…¥æ™‚ã«ç§»è¡Œã—ã€`SELECT`クエリを高速化ã§ãã¾ã™ã€‚ + +Postgresãªã©ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã¯ç•°ãªã‚Šã€ClickHouseã®Materialized Viewã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚Œã‚‹éš›ã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ãƒˆãƒªã‚¬ãƒ¼ã«éŽãŽã¾ã›ã‚“。ã“ã®ã‚¯ã‚¨ãƒªã®çµæžœã¯ã€2ã¤ç›®ã®ã€Œã‚¿ãƒ¼ã‚²ãƒƒãƒˆã€ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ã•ã‚‰ã«å¤šãã®è¡ŒãŒæŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€ãã®çµæžœãŒã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«é€ã‚‰ã‚Œã€ä¸­é–“çµæžœãŒæ›´æ–°ãŠã‚ˆã³ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸçµæžœã¯ã€å…ƒã®ãƒ‡ãƒ¼ã‚¿å…¨ä½“ã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã—ãŸã¨ãã¨åŒç­‰ã§ã™ã€‚ + +Materialized Viewã®ä¸»ãªå‹•æ©Ÿã¯ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚Œã‚‹çµæžœãŒã€è¡Œã«å¯¾ã™ã‚‹é›†è¨ˆã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã€ã¾ãŸã¯å¤‰æ›ã®çµæžœã‚’表ã—ã¦ã„ã‚‹ã“ã¨ã§ã™ã€‚ã“れらã®çµæžœã¯ã€ã—ã°ã—ã°å…ƒã®ãƒ‡ãƒ¼ã‚¿ã®å°ã•ãªè¡¨ç¾ï¼ˆé›†è¨ˆã®å ´åˆã¯éƒ¨åˆ†çš„ãªã‚¹ã‚±ãƒƒãƒï¼‰ã«ãªã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã‹ã‚‰çµæžœã‚’読ã¿å–ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªãŒå˜ç´”ã§ã‚ã‚‹ãŸã‚ã€å…ƒã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦åŒã˜è¨ˆç®—ã‚’è¡Œã£ãŸå ´åˆã‚ˆã‚Šã‚‚クエリ時間ãŒçŸ­ããªã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã€è¨ˆç®—(ã—ãŸãŒã£ã¦ã‚¯ã‚¨ãƒªã®é…延)ãŒã‚¯ã‚¨ãƒªæ™‚ã‹ã‚‰æŒ¿å…¥æ™‚ã«ç§»è¡Œã•ã‚Œã¾ã™ã€‚ + +ClickHouseã®Materialized Viewã¯ã€ãƒ™ãƒ¼ã‚¹ã«ã—ãŸãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ãŒæµå…¥ã™ã‚‹ã¨ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§æ›´æ–°ã•ã‚Œã€ç¶™ç¶šçš„ã«æ›´æ–°ã•ã‚Œç¶šã‘るインデックスã®ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€å¤šãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãŠã„ã¦Materialized ViewãŒã‚¯ã‚¨ãƒªã®é™çš„ãªã‚¹ãƒŠãƒƒãƒ—ショットã§ã‚ã‚Šã€æ–°ã—ãリフレッシュã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ï¼ˆClickHouseã®[リフレッシャブルMaterialized View](/ja/sql-reference/statements/create/view#refreshable-materialized-view)ã¨ä¼¼ã¦ã„ã¾ã™ï¼‰ã¨ã¯å¯¾ç…§çš„ã§ã™ã€‚ + +Materialized view diagram + +## 例 + +1æ—¥ã®æŠ•ç¨¿ã«å¯¾ã™ã‚‹ã‚¢ãƒƒãƒ—投票ã¨ãƒ€ã‚¦ãƒ³æŠ•ç¥¨ã®æ•°ã‚’å–å¾—ã—ãŸã„ã¨ã—ã¾ã™ã€‚ + +ClickHouseã®[`toStartOfDay`](/ja/sql-reference/functions/date-time-functions#tostartofday)関数ã®ãŠã‹ã’ã§ã€ã“ã‚Œã¯ã‹ãªã‚Šç°¡å˜ãªã‚¯ã‚¨ãƒªã§ã™: + +```sql +SELECT toStartOfDay(CreationDate) AS day, + countIf(VoteTypeId = 2) AS UpVotes, + countIf(VoteTypeId = 3) AS DownVotes +FROM votes +GROUP BY day +ORDER BY day ASC +LIMIT 10 + +┌─────────────────day─┬─UpVotes─┬─DownVotes─┠+│ 2008-07-31 00:00:00 │ 6 │ 0 │ +│ 2008-08-01 00:00:00 │ 182 │ 50 │ +│ 2008-08-02 00:00:00 │ 436 │ 107 │ +│ 2008-08-03 00:00:00 │ 564 │ 100 │ +│ 2008-08-04 00:00:00 │ 1306 │ 259 │ +│ 2008-08-05 00:00:00 │ 1368 │ 269 │ +│ 2008-08-06 00:00:00 │ 1701 │ 211 │ +│ 2008-08-07 00:00:00 │ 1544 │ 211 │ +│ 2008-08-08 00:00:00 │ 1241 │ 212 │ +│ 2008-08-09 00:00:00 │ 576 │ 46 │ +└─────────────────────┴─────────┴───────────┘ + +10 rows in set. Elapsed: 0.133 sec. Processed 238.98 million rows, 2.15 GB (1.79 billion rows/s., 16.14 GB/s.) +Peak memory usage: 363.22 MiB. +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€ã™ã§ã«ClickHouseã®ãŠã‹ã’ã§é«˜é€Ÿã§ã™ãŒã€ã•ã‚‰ã«æ”¹å–„ã§ãã‚‹ã§ã—ょã†ã‹ï¼Ÿ + +Materialized Viewを使用ã—ã¦ã“れを挿入時ã«è¨ˆç®—ã—ãŸã„å ´åˆã€çµæžœã‚’å—ã‘å–るテーブルãŒå¿…è¦ã§ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€1æ—¥ã«ã¤ã1è¡Œã ã‘ã‚’ä¿æŒã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚既存ã®æ—¥ã®ãƒ‡ãƒ¼ã‚¿ãŒæ›´æ–°ã•ã‚Œã‚‹å ´åˆã€ä»–ã®ã‚«ãƒ©ãƒ ã¯æ—¢å­˜ã®æ—¥ã®è¡Œã«ãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ã“ã®ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªçŠ¶æ…‹ã®ãƒžãƒ¼ã‚¸ã‚’è¡Œã†ãŸã‚ã«ã¯ã€ä»–ã®ã‚«ãƒ©ãƒ ã®éƒ¨åˆ†çš„ãªçŠ¶æ…‹ã‚’ä¿æŒã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“ã‚Œã¯ã€ClickHouseã«ãŠã‘る特別ãªã‚¨ãƒ³ã‚¸ãƒ³ã‚¿ã‚¤ãƒ—ã‚’å¿…è¦ã¨ã—ã¾ã™: [SummingMergeTree](/ja/engines/table-engines/mergetree-family/summingmergetree)。ã“ã‚Œã¯ã€å…¨ã¦ã®æ•°å€¤ã‚«ãƒ©ãƒ ã®åˆè¨ˆå€¤ã‚’å«ã‚€1ã¤ã®è¡Œã«ç½®ãæ›ãˆã¾ã™ã€‚以下ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€åŒã˜æ—¥ä»˜ã‚’æŒã¤è¡Œã‚’マージã—ã€æ•°å€¤ã‚«ãƒ©ãƒ ã‚’åˆè¨ˆã—ã¾ã™: + +``` +CREATE TABLE up_down_votes_per_day +( + `Day` Date, + `UpVotes` UInt32, + `DownVotes` UInt32 +) +ENGINE = SummingMergeTree +ORDER BY Day +``` + +Materialized Viewを示ã™ãŸã‚ã«ã€votesテーブルãŒç©ºã§ã‚ã‚Šã€ã¾ã ãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘å–ã£ã¦ã„ãªã„ã¨ä»®å®šã—ã¾ã™ã€‚我々ã®Materialized Viewã¯ã€`votes`ã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ä¸Šè¨˜ã®`SELECT`を実行ã—ã€ãã®çµæžœã‚’`up_down_votes_per_day`ã«é€ã‚Šã¾ã™: + +```sql +CREATE MATERIALIZED VIEW up_down_votes_per_day_mv TO up_down_votes_per_day AS +SELECT toStartOfDay(CreationDate)::Date AS Day, + countIf(VoteTypeId = 2) AS UpVotes, + countIf(VoteTypeId = 3) AS DownVotes +FROM votes +GROUP BY Day +``` + +ã“ã“ã§ã®`TO`å¥ã¯é‡è¦ã§ã€çµæžœãŒé€ã‚‰ã‚Œã‚‹å ´æ‰€ã€ã™ãªã‚ã¡`up_down_votes_per_day`を示ã—ã¦ã„ã¾ã™ã€‚ + +以å‰ã®æŒ¿å…¥ã‹ã‚‰votesテーブルをå†åº¦ãƒãƒ”ュレートã§ãã¾ã™: + +```sql +INSERT INTO votes SELECT toUInt32(Id) AS Id, toInt32(PostId) AS PostId, VoteTypeId, CreationDate, UserId, BountyAmount +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/votes.parquet') + +0 rows in set. Elapsed: 111.964 sec. Processed 477.97 million rows, 3.89 GB (4.27 million rows/s., 34.71 MB/s.) +Peak memory usage: 283.49 MiB. +``` + +完了後ã€`up_down_votes_per_day`ã®ã‚µã‚¤ã‚ºã‚’確èªã§ãã¾ã™ - 1æ—¥ã«ã¤ã1è¡Œã«ãªã‚‹ã¯ãšã§ã™: + +``` +SELECT count() +FROM up_down_votes_per_day +FINAL + +┌─count()─┠+│ 5723 │ +└─────────┘ +``` + +ã“ã“ã§ã€`votes`ã«ãŠã‘ã‚‹238百万行ã‹ã‚‰ã€ã“ã®ã‚¯ã‚¨ãƒªã®çµæžœã‚’ä¿å­˜ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦5000ã«è¡Œæ•°ã‚’効果的ã«æ¸›å°‘ã•ã›ã¾ã—ãŸã€‚ã“ã“ã§ã®éµã¯ã€`votes`テーブルã«æ–°ã—ã„投票ãŒæŒ¿å…¥ã•ã‚Œã‚‹ãŸã³ã«ã€æ–°ã—ã„値ãŒãã®æ—¥ã«å¯¾ã—ã¦`up_down_votes_per_day`ã«é€ã‚‰ã‚Œã€ãれらã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§è‡ªå‹•çš„ã«éžåŒæœŸã§ãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹ã“ã¨ã§ã™ - 1æ—¥ã«ã¤ã1è¡Œã®ã¿ã‚’ä¿æŒã—ã¾ã™ã€‚`up_down_votes_per_day`ã¯å¸¸ã«å°ã•ãã€æœ€æ–°ã®çŠ¶æ…‹ã«ä¿ãŸã‚Œã¾ã™ã€‚ + +è¡Œã®ãƒžãƒ¼ã‚¸ãŒéžåŒæœŸã§è¡Œã‚れるãŸã‚ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¯ã‚¨ãƒªã™ã‚‹éš›ã«1æ—¥ã‚ãŸã‚Šè¤‡æ•°ã®æŠ•ç¥¨ãŒå­˜åœ¨ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚クエリ時ã«æœªçµåˆã®è¡Œã‚’確実ã«ãƒžãƒ¼ã‚¸ã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®2ã¤ã®ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™: + +- テーブルåã«`FINAL`修飾å­ã‚’使用ã™ã‚‹ã€‚ã“ã‚Œã¯ä¸Šè¨˜ã®ã‚«ã‚¦ãƒ³ãƒˆã‚¯ã‚¨ãƒªã§è¡Œã„ã¾ã—ãŸã€‚ +- 最終テーブルã§ä½¿ç”¨ã—ãŸä¸¦ã³æ›¿ãˆã‚­ãƒ¼ï¼ˆä¾‹: `CreationDate`)ã§é›†ç´„ã—ã€ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’åˆè¨ˆã—ã¾ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã€ã‚ˆã‚ŠåŠ¹çŽ‡çš„ã§æŸ”軟ã§ã™ãŒï¼ˆãƒ†ãƒ¼ãƒ–ルãŒä»–ã®ã“ã¨ã«ã‚‚使用ã§ãã¾ã™ï¼‰ã€å‰è€…ã¯ä¸€éƒ¨ã®ã‚¯ã‚¨ãƒªã«ã¨ã£ã¦ã¯å˜ç´”ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。以下ã§ä¸¡æ–¹ã‚’示ã—ã¾ã™: + +```sql +SELECT + Day, + UpVotes, + DownVotes +FROM up_down_votes_per_day +FINAL +ORDER BY Day ASC +LIMIT 10 + +10 rows in set. Elapsed: 0.004 sec. Processed 8.97 thousand rows, 89.68 KB (2.09 million rows/s., 20.89 MB/s.) +Peak memory usage: 289.75 KiB. + +SELECT Day, sum(UpVotes) AS UpVotes, sum(DownVotes) AS DownVotes +FROM up_down_votes_per_day +GROUP BY Day +ORDER BY Day ASC +LIMIT 10 +┌────────Day─┬─UpVotes─┬─DownVotes─┠+│ 2008-07-31 │ 6 │ 0 │ +│ 2008-08-01 │ 182 │ 50 │ +│ 2008-08-02 │ 436 │ 107 │ +│ 2008-08-03 │ 564 │ 100 │ +│ 2008-08-04 │ 1306 │ 259 │ +│ 2008-08-05 │ 1368 │ 269 │ +│ 2008-08-06 │ 1701 │ 211 │ +│ 2008-08-07 │ 1544 │ 211 │ +│ 2008-08-08 │ 1241 │ 212 │ +│ 2008-08-09 │ 576 │ 46 │ +└────────────┴─────────┴───────────┘ + +10 rows in set. Elapsed: 0.010 sec. Processed 8.97 thousand rows, 89.68 KB (907.32 thousand rows/s., 9.07 MB/s.) +Peak memory usage: 567.61 KiB. +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªæ™‚é–“ã‚’0.133秒ã‹ã‚‰0.004秒 - 25å€ä»¥ä¸Šã®æ”¹å–„ã«ãªã‚Šã¾ã—ãŸï¼ + +### より複雑ãªä¾‹ + +上記ã®ä¾‹ã§ã¯ã€Dailyã®åˆè¨ˆå€¤ã‚’2ã¤å–り扱ã†ãŸã‚ã«Materialized Viewを使用ã—ã¦ã„ã¾ã™ã€‚åˆè¨ˆã¯ã€éƒ¨åˆ†çš„ãªçŠ¶æ…‹ã‚’維æŒã™ã‚‹ãŸã‚ã®æœ€ã‚‚ç°¡å˜ãªé›†è¨ˆå½¢å¼ã§ã™ - æ–°ã—ã„値ãŒåˆ°ç€ã—ãŸã¨ãã«æ—¢å­˜ã®å€¤ã«è¿½åŠ ã™ã‚‹ã ã‘ã§æ¸ˆã¿ã¾ã™ã€‚ã—ã‹ã—ã€ClickHouseã®Materialized Viewã¯ã€ã‚らゆるタイプã®é›†è¨ˆã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€æŠ•ç¨¿ã®çµ±è¨ˆã‚’å„日数ã«å¯¾ã—ã¦è¨ˆç®—ã—ãŸã„ã¨ã—ã¾ã—ょã†: `Score`ã®99.9パーセンタイルã¨`CommentCount`ã®å¹³å‡ã§ã™ã€‚ã“ã®è¨ˆç®—ã®ãŸã‚ã®ã‚¯ã‚¨ãƒªã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“: + +```sql +SELECT + toStartOfDay(CreationDate) AS Day, + quantile(0.999)(Score) AS Score_99th, + avg(CommentCount) AS AvgCommentCount +FROM posts +GROUP BY Day +ORDER BY Day DESC +LIMIT 10 + + ┌─────────────────Day─┬────────Score_99th─┬────AvgCommentCount─┠+ 1. │ 2024-03-31 00:00:00 │ 5.23700000000008 │ 1.3429811866859624 │ + 2. │ 2024-03-30 00:00:00 │ 5 │ 1.3097158891616976 │ + 3. │ 2024-03-29 00:00:00 │ 5.78899999999976 │ 1.2827635327635327 │ + 4. │ 2024-03-28 00:00:00 │ 7 │ 1.277746158224246 │ + 5. │ 2024-03-27 00:00:00 │ 5.738999999999578 │ 1.2113264918282023 │ + 6. │ 2024-03-26 00:00:00 │ 6 │ 1.3097536945812809 │ + 7. │ 2024-03-25 00:00:00 │ 6 │ 1.2836721018539201 │ + 8. │ 2024-03-24 00:00:00 │ 5.278999999999996 │ 1.2931667891256429 │ + 9. │ 2024-03-23 00:00:00 │ 6.253000000000156 │ 1.334061135371179 │ +10. │ 2024-03-22 00:00:00 │ 9.310999999999694 │ 1.2388059701492538 │ + └─────────────────────┴───────────────────┴────────────────────┘ + +10 rows in set. Elapsed: 0.113 sec. Processed 59.82 million rows, 777.65 MB (528.48 million rows/s., 6.87 GB/s.) +Peak memory usage: 658.84 MiB. +``` + +å‰è¿°ã®ã‚ˆã†ã«ã€postsテーブルã«æ–°ã—ã„投稿ãŒæŒ¿å…¥ã•ã‚Œã‚‹ã¨ãã€ä¸Šè¨˜ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹Materialized Viewを作æˆã§ãã¾ã™ã€‚ + +例ã®ç›®çš„ã§ã€S3ã‹ã‚‰ã®æŠ•ç¨¿ãƒ‡ãƒ¼ã‚¿ã®ãƒ­ãƒ¼ãƒ‰ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€`posts`ã¨åŒã˜ã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¤é‡è¤‡ãƒ†ãƒ¼ãƒ–ル`posts_null`を作æˆã—ã¾ã™ã€‚ãŸã ã—ã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã›ãšã€Materialized ViewãŒè¡Œã‚’挿入ã™ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚データã®ä¿å­˜ã‚’防ããŸã‚ã«ã€[`Null`テーブルエンジンタイプ](/ja/engines/table-engines/special/null)を使用ã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE posts_null AS posts ENGINE = Null +``` + +Nullテーブルエンジンã¯å¼·åŠ›ãªæœ€é©åŒ–ã§ã™ - `/dev/null`ã®ã‚ˆã†ãªã‚‚ã®ã§ã™ã€‚我々ã®Materialized Viewã¯ã€æŒ¿å…¥æ™‚ã«`posts_null`テーブルãŒè¡Œã‚’å—ã‘å–ã‚‹ã¨çµ±è¨ˆã‚’計算ã—ã¦æ ¼ç´ã—ã¾ã™ - ãŸã ã®ãƒˆãƒªã‚¬ãƒ¼ã«éŽãŽã¾ã›ã‚“。ãŸã ã—ã€ç”Ÿãƒ‡ãƒ¼ã‚¿ã¯ä¿å­˜ã•ã‚Œã¾ã›ã‚“。実際ã«ã¯ã€å…ƒã®æŠ•ç¨¿ã‚’ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ã“ã®ã‚¢ãƒ—ローãƒã¯é›†è¨ˆã‚’計算ã—ãªãŒã‚‰ç”Ÿãƒ‡ãƒ¼ã‚¿ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’回é¿ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ãれゆãˆã€Materialized Viewã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +```sql +CREATE MATERIALIZED VIEW post_stats_mv TO post_stats_per_day AS + SELECT toStartOfDay(CreationDate) AS Day, + quantileState(0.999)(Score) AS Score_quantiles, + avgState(CommentCount) AS AvgCommentCount +FROM posts_null +GROUP BY Day +``` + +注: ã“ã“ã§ã¯ã€é›†ç´„関数ã®æœ«å°¾ã«`State`サフィックスを付ã‘ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€é–¢æ•°ã®é›†ç´„状態ãŒè¿”ã•ã‚Œã€æœ€çµ‚çš„ãªçµæžœã§ã¯ãªãã€ä»–ã®çŠ¶æ…‹ã¨ãƒžãƒ¼ã‚¸ã™ã‚‹ãŸã‚ã®è¿½åŠ æƒ…報をæŒã¤éƒ¨åˆ†çŠ¶æ…‹ãŒå«ã¾ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°å¹³å‡ã®å ´åˆã€ã“ã‚Œã¯ã‚«ã‚¦ãƒ³ãƒˆã¨ã‚«ãƒ©ãƒ ã®åˆè¨ˆã‚’å«ã¿ã¾ã™ã€‚ + +> 部分的ãªé›†è¨ˆçŠ¶æ…‹ã¯æ­£ã—ã„çµæžœã‚’計算ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚ãŸã¨ãˆã°ã€å¹³å‡ã‚’計算ã™ã‚‹å ´åˆã€ã‚µãƒ–レンジã®å¹³å‡ã‚’å˜ç´”ã«å¹³å‡åŒ–ã™ã‚‹ã“ã¨ã¯èª¤ã£ãŸçµæžœã‚’ã‚‚ãŸã‚‰ã—ã¾ã™ã€‚ + +次ã«ã€ã“ã®ãƒ“ューã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ル`post_stats_per_day`を作æˆã—ã€ã“れらã®éƒ¨åˆ†çš„集計状態をä¿å­˜ã—ã¾ã™: + +```sql +CREATE TABLE post_stats_per_day +( + `Day` Date, + `Score_quantiles` AggregateFunction(quantile(0.999), Int32), + `AvgCommentCount` AggregateFunction(avg, UInt8) +) +ENGINE = AggregatingMergeTree +ORDER BY Day +``` + +以å‰ã¯ã€ã‚«ã‚¦ãƒ³ãƒˆã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã®`SummingMergeTree`ãŒå分ã§ã—ãŸãŒã€ä»–ã®é–¢æ•°ã«ã¯ã‚ˆã‚Šé«˜åº¦ãªã‚¨ãƒ³ã‚¸ãƒ³ã‚¿ã‚¤ãƒ—ãŒå¿…è¦ã§ã™: [`AggregatingMergeTree`](/ja/engines/table-engines/mergetree-family/aggregatingmergetree)。 +ClickHouseã«é›†ç´„状態ãŒä¿å­˜ã•ã‚Œã‚‹ã“ã¨ã‚’確実ã«çŸ¥ã‚‰ã›ã‚‹ãŸã‚ã«ã€`Score_quantiles`ã¨`AvgCommentCount`ã‚’`AggregateFunction`タイプã¨ã—ã¦å®šç¾©ã—ã€éƒ¨åˆ†çš„状態ã¨ã‚½ãƒ¼ã‚¹ã‚«ãƒ©ãƒ ã®ã‚¿ã‚¤ãƒ—ã®é–¢æ•°ã‚½ãƒ¼ã‚¹ã‚’指定ã—ã¾ã™ã€‚`SummingMergeTree`ã®ã‚ˆã†ã«ã€åŒã˜`ORDER BY`キー値をæŒã¤è¡ŒãŒãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ï¼ˆã“ã®ä¾‹ã®`Day`) + +Materialized Viewを経由ã—ã¦`post_stats_per_day`ã‚’ãƒãƒ”ュレートã™ã‚‹ã«ã¯ã€`posts`ã‹ã‚‰`posts_null`ã«ã™ã¹ã¦ã®è¡Œã‚’挿入ã™ã‚‹ã ã‘ã§ã™: + +```sql +INSERT INTO posts_null SELECT * FROM posts + +0 rows in set. Elapsed: 13.329 sec. Processed 119.64 million rows, 76.99 GB (8.98 million rows/s., 5.78 GB/s.) +``` + +> プロダクションã§ã¯ã€ãŠãらãMaterialized Viewã‚’`posts`テーブルã«ã‚¢ã‚¿ãƒƒãƒã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ã“ã“ã§ã¯ã€nullテーブルを示ã™ãŸã‚ã«`posts_null`を使用ã—ã¾ã—ãŸã€‚ + +最終クエリã¯ã€é–¢æ•°ã«`Merge`サフィックスを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆã‚«ãƒ©ãƒ ãŒéƒ¨åˆ†çš„ãªé›†è¨ˆçŠ¶æ…‹ã‚’æ ¼ç´ã—ã¦ã„ã‚‹ãŸã‚): + +```sql +SELECT + Day, + quantileMerge(0.999)(Score_quantiles), + avgMerge(AvgCommentCount) +FROM post_stats_per_day +GROUP BY Day +ORDER BY Day DESC +LIMIT 10 +``` + +ã“ã“ã§ã¯ã€`FINAL`を使用ã™ã‚‹ä»£ã‚ã‚Šã«`GROUP BY`を使用ã—ã¾ã™ã€‚ + +## ä»–ã®ç”¨é€” + +上記ã§ã¯ä¸»ã«ã€ãƒ‡ãƒ¼ã‚¿ã®éƒ¨åˆ†é›†è¨ˆã‚’インクリメンタルã«æ›´æ–°ã™ã‚‹ç›®çš„ã§Materialized Viewを使用ã—ã€ã‚¯ã‚¨ãƒªæ™‚é–“ã‹ã‚‰æŒ¿å…¥æ™‚é–“ã¸ã¨è¨ˆç®—を移行ã™ã‚‹ã“ã¨ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚ã“ã®ä¸€èˆ¬çš„ãªä½¿ç”¨ã‚±ãƒ¼ã‚¹ã‚’超ãˆã€Materialized Viewã«ã¯ä»–ã®å¤šãã®ç”¨é€”ãŒã‚ã‚Šã¾ã™ã€‚ + +### フィルタリングã¨å¤‰æ› + +å ´åˆã«ã‚ˆã£ã¦ã¯ã€æŒ¿å…¥æ™‚ã«è¡Œã¨ã‚«ãƒ©ãƒ ã®ã‚µãƒ–セットã®ã¿ã‚’挿入ã—ãŸã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€`posts_null`テーブルã¯æŒ¿å…¥ã‚’å—ã‘ã€`posts`テーブルã¸ã®æŒ¿å…¥å‰ã«`SELECT` クエリã§è¡Œã‚’フィルタリングã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€`posts`テーブルã®`Tags`カラムを変æ›ã—ãŸã„ã¨ã—ã¾ã™ã€‚ã“ã‚Œã¯ã‚¿ã‚°åã®ãƒ‘イプ区切りリストをå«ã‚“ã§ã„ã¾ã™ã€‚ã“れらをé…列ã«å¤‰æ›ã™ã‚‹ã“ã¨ã§ã€å€‹ã€…ã®ã‚¿ã‚°å€¤ã«ã‚ˆã‚‹é›†è¨ˆãŒã‚ˆã‚Šç°¡å˜ã«ãªã‚Šã¾ã™ã€‚ + +> ã“ã®å¤‰æ›ã¯ã€`INSERT INTO SELECT` を実行ã™ã‚‹ã¨ãã«ã‚‚実行ã§ãã¾ã™ã€‚Materialized Viewã¯ã“ã®ãƒ­ã‚¸ãƒƒã‚¯ã‚’ClickHouse DDLã«ã‚«ãƒ—セル化ã—ã€`INSERT`をシンプルã«ä¿ã¡ãªãŒã‚‰ã€æ–°ã—ã„è¡Œã«å¤‰æ›ã‚’é©ç”¨ã§ãã¾ã™ã€‚ + +ã“ã®å¤‰æ›ã®ãŸã‚ã®Materialized Viewã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +```sql +CREATE MATERIALIZED VIEW posts_mv TO posts AS + SELECT * EXCEPT Tags, arrayFilter(t -> (t != ''), splitByChar('|', Tags)) as Tags FROM posts_null +``` + +### å‚照テーブル + +ユーザーã¯ClickHouseã®é †åºä»˜ã‘キーをé¸æŠžã™ã‚‹éš›ã«ã€ãã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚„集計å¥ã§é »ç¹ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã—ã‹ã—ã€ã“ã‚Œã¯å˜ä¸€ã®ã‚«ãƒ©ãƒ ã‚»ãƒƒãƒˆã§ã‚«ãƒ—セル化ã§ããªã„ã€ã‚ˆã‚Šå¤šæ§˜ãªã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンをæŒã¤ã‚·ãƒŠãƒªã‚ªã«ãŠã„ã¦åˆ¶ç´„を与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€æ¬¡ã®`comments`テーブルを考ãˆã¦ã¿ã¾ã—ょã†: + +```sql +CREATE TABLE comments +( + `Id` UInt32, + `PostId` UInt32, + `Score` UInt16, + `Text` String, + `CreationDate` DateTime64(3, 'UTC'), + `UserId` Int32, + `UserDisplayName` LowCardinality(String) +) +ENGINE = MergeTree +ORDER BY PostId + +0 rows in set. Elapsed: 46.357 sec. Processed 90.38 million rows, 11.14 GB (1.95 million rows/s., 240.22 MB/s.) +``` + +ã“ã“ã§ã®é †åºä»˜ã‘キーã¯ã€`PostId` ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ãƒ†ãƒ¼ãƒ–ルを最é©åŒ–ã—ã¦ã„ã¾ã™ã€‚ + +特定ã®`UserId`ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã€å¹³å‡`Score`を計算ã—ãŸã„状æ³ã‚’考ãˆã¦ã¿ã¾ã—ょã†: + +```sql +SELECT avg(Score) +FROM comments +WHERE UserId = 8592047 + + ┌──────────avg(Score)─┠+1. │ 0.18181818181818182 │ + └─────────────────────┘ + +1 row in set. Elapsed: 0.778 sec. Processed 90.38 million rows, 361.59 MB (116.16 million rows/s., 464.74 MB/s.) +Peak memory usage: 217.08 MiB. +``` + +高速ã§ã™ï¼ˆãƒ‡ãƒ¼ã‚¿ã¯ClickHouseã«ã¨ã£ã¦å°ã•ã„)ãŒã€ãƒ—ロセスã•ã‚ŒãŸè¡Œæ•° - 90.38百万ã‹ã‚‰ãƒ•ãƒ«ãƒ†ãƒ¼ãƒ–ルスキャンを必è¦ã¨ã™ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚より大ããªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«å¯¾ã—ã¦ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚«ãƒ©ãƒ `UserId`ã®ãŸã‚ã®é †åºä»˜ã‘キー値`PostId`ã‚’å‚ç…§ã™ã‚‹Materialized Viewを使用ã—ã¦ã€ã“ã®ã‚¯ã‚¨ãƒªã‚’効率的ã«åŠ é€Ÿã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã®å€¤ã¯åŠ¹çŽ‡çš„ãªå‚ç…§ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ã“ã®ä¾‹ã§ã¯ã€Materialized Viewã¯ã¨ã¦ã‚‚シンプルã§ã€æŒ¿å…¥æ™‚ã«`comments`ã‹ã‚‰`PostId`ã¨`UserId`ã®ã¿ã‚’é¸æŠžã—ã¾ã™ã€‚ã“れらã®çµæžœã¯ã€`UserId`ã§ä¸¦ã³æ›¿ãˆã‚‰ã‚ŒãŸ`comments_posts_users`テーブルã«é€ã‚‰ã‚Œã¾ã™ã€‚以下ã§`comments`テーブルã®nullãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’作æˆã—ã€ã“ã®ãƒ“ューã¨`comments_posts_users`テーブルをãƒãƒ”ュレートã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™: + +```sql +CREATE TABLE comments_posts_users ( + PostId UInt32, + UserId Int32 +) ENGINE = MergeTree ORDER BY UserId + + +CREATE TABLE comments_null AS comments +ENGINE = Null + +CREATE MATERIALIZED VIEW comments_posts_users_mv TO comments_posts_users AS +SELECT PostId, UserId FROM comments_null + +INSERT INTO comments_null SELECT * FROM comments + +0 rows in set. Elapsed: 5.163 sec. Processed 90.38 million rows, 17.25 GB (17.51 million rows/s., 3.34 GB/s.) +``` + +ã“ã®ãƒ“ューをサブクエリã§ä½¿ç”¨ã—ã¦å‰ã®ã‚¯ã‚¨ãƒªã‚’加速ã§ãã¾ã™: + +```sql +SELECT avg(Score) +FROM comments +WHERE PostId IN ( + SELECT PostId + FROM comments_posts_users + WHERE UserId = 8592047 +) AND UserId = 8592047 + + + ┌──────────avg(Score)─┠+1. │ 0.18181818181818182 │ + └─────────────────────┘ + +1 row in set. Elapsed: 0.012 sec. Processed 88.61 thousand rows, 771.37 KB (7.09 million rows/s., 61.73 MB/s.) +``` + +### ãƒã‚§ã‚¤ãƒ³åŒ– + +Materialized Viewã¯ãƒã‚§ã‚¤ãƒ³åŒ–å¯èƒ½ã§ã€è¤‡é›‘ãªãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã‚’確立ã§ãã¾ã™ã€‚実際ã®ä¾‹ã«ã¤ã„ã¦ã¯ã€ã“ã®[ブログ投稿](https://clickhouse.com/blog/chaining-materialized-views)ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ diff --git a/docs/ja/materialized-view/refreshable-materialized-view.md b/docs/ja/materialized-view/refreshable-materialized-view.md new file mode 100644 index 00000000000..9d51e717565 --- /dev/null +++ b/docs/ja/materialized-view/refreshable-materialized-view.md @@ -0,0 +1,70 @@ +--- +slug: /ja/materialized-view/refreshable-materialized-view +title: リフレッシュå¯èƒ½ãªMaterialized View(エクスペリメンタル機能) +description: クエリを高速化ã™ã‚‹ãŸã‚ã®Materialized Viewã®ä½¿ã„æ–¹ +keywords: [refreshable materialized view, refresh, materialized views, speed up queries, query optimization] +--- + +import ExperimentalBadge from '@theme/badges/ExperimentalBadge'; + + + +リフレッシュå¯èƒ½ãªMaterialized Viewã¯ã€ä¼çµ±çš„ãªOLTPデータベースã«ãŠã‘ã‚‹Materialized Viewã¨æ¦‚念的ã«é¡žä¼¼ã—ã¦ãŠã‚Šã€æŒ‡å®šã•ã‚ŒãŸã‚¯ã‚¨ãƒªã®çµæžœã‚’ä¿å­˜ã—ã¦è¿…速ã«å–å¾—ã™ã‚‹ã“ã¨ã§ã€ãƒªã‚½ãƒ¼ã‚¹é›†ç´„çš„ãªã‚¯ã‚¨ãƒªã‚’ç¹°ã‚Šè¿”ã—実行ã™ã‚‹å¿…è¦ã‚’減らã—ã¾ã™ã€‚ClickHouseã®[インクリメンタルMaterialized View](/ja/materialized-view)ã¨ã¯ç•°ãªã‚Šã€å®Œå…¨ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«å¯¾ã—ã¦å®šæœŸçš„ã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ãã®çµæžœãŒã‚¯ã‚¨ãƒªç”¨ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“ã®çµæžœã‚»ãƒƒãƒˆã¯ã€ç†è«–çš„ã«ã¯å…ƒã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚ˆã‚Šå°ã•ããªã‚Šã€å¾Œç¶šã®ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’高速化ã—ã¾ã™ã€‚ + +リフレッシュå¯èƒ½ãªMaterialized Viewã®å›³ + +## リフレッシュå¯èƒ½ãªMaterialized Viewを使用ã™ã‚‹ã¹ãå ´åˆ + +ClickHouseã®ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«Materialized Viewã¯éžå¸¸ã«å¼·åŠ›ã§ã€ç‰¹ã«å˜ä¸€ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹é›†è¨ˆã‚’è¡Œã†å ´åˆã€ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªMaterialized Viewã®æ‰‹æ³•ã‚ˆã‚Šã‚‚通常ã€å¤§è¦æ¨¡ã«ã‚¹ã‚±ãƒ¼ãƒ«ã—ã¾ã™ã€‚データãŒæŒ¿å…¥ã•ã‚Œã‚‹å„ブロックã”ã¨ã«é›†è¨ˆã‚’計算ã—ã€æœ€çµ‚テーブルã§ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªçŠ¶æ…‹ã‚’マージã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªã¯å¸¸ã«ãƒ‡ãƒ¼ã‚¿ã®ä¸€éƒ¨ã«å¯¾ã—ã¦ã®ã¿å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ã“ã®æ–¹æ³•ã¯ãƒšã‚¿ãƒã‚¤ãƒˆå˜ä½ã®ãƒ‡ãƒ¼ã‚¿ã«ã¾ã§ã‚¹ã‚±ãƒ¼ãƒ«ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€é€šå¸¸ã¯å¥½ã¾ã‚Œã‚‹æ–¹æ³•ã§ã™ã€‚ + +ã—ã‹ã—ã€ã“ã®ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªãƒ—ロセスãŒå¿…è¦ã§ãªã„å ´åˆã‚„é©ç”¨ã§ããªã„å ´åˆã‚‚ã‚ã‚Šã¾ã™ã€‚ã„ãã¤ã‹ã®å•é¡Œã¯ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã‚¢ãƒ—ローãƒã¨äº’æ›æ€§ãŒãªã‹ã£ãŸã‚Šã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§ã®æ›´æ–°ã‚’å¿…è¦ã¨ã—ãªã‹ã£ãŸã‚Šã—ã€å®šæœŸçš„ãªå†æ§‹ç¯‰ã®æ–¹ãŒé©åˆ‡ã§ã‚ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€è¤‡é›‘ãªã‚¸ãƒ§ã‚¤ãƒ³ã‚’使用ã™ã‚‹ãŸã‚インクリメンタルアプローãƒã¨äº’æ›æ€§ãŒãªã„ケースã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆå…¨ä½“ã«å¯¾ã—ã¦ãƒ“ューã®å®Œå…¨ãªå†è¨ˆç®—を定期的ã«å®Ÿè¡Œã—ãŸã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +> リフレッシュå¯èƒ½ãªMaterialized Viewã¯ã€éžæ­£è¦åŒ–ã¨ã„ã£ãŸã‚¿ã‚¹ã‚¯ã‚’è¡Œã†ãƒãƒƒãƒãƒ—ロセスを実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚リフレッシュå¯èƒ½ãªMaterialized Viewã®é–“ã«ä¾å­˜é–¢ä¿‚を作æˆã™ã‚‹ã“ã¨ã§ã€ã‚るビューãŒåˆ¥ã®ãƒ“ューã®çµæžœã«ä¾å­˜ã—ã€ãã®ãƒ“ューãŒå®Œäº†ã™ã‚‹ã¨å®Ÿè¡Œã•ã‚Œã‚‹ã‚ˆã†ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れを使用ã—ã¦ã€ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚ŒãŸãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼ã‚„[dbt](https://www.getdbt.com/)ジョブã®ã‚ˆã†ãªå˜ç´”ãªDAGã‚’ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 例 + +例ã¨ã—ã¦ã€StackOverflowデータセットã®`postlinks`データセットを`posts`テーブルã«éžæ­£è¦åŒ–ã™ã‚‹ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’考ãˆã¾ã™ã€‚ãªãœãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã“れを行ã„ãŸãŒã‚‹ã‹ã«ã¤ã„ã¦ã¯ã€[éžæ­£è¦åŒ–データガイド](/ja/data-modeling/denormalization)ã§æŽ¢ã£ã¦ã„ã¾ã™ã€‚ + +```sql +SELECT + posts.*, + arrayMap(p -> (p.1, p.2), arrayFilter(p -> p.3 = 'Linked' AND p.2 != 0, Related)) AS LinkedPosts, + arrayMap(p -> (p.1, p.2), arrayFilter(p -> p.3 = 'Duplicate' AND p.2 != 0, Related)) AS DuplicatePosts +FROM posts +LEFT JOIN ( + SELECT + PostId, + groupArray((CreationDate, RelatedPostId, LinkTypeId)) AS Related + FROM postlinks + GROUP BY PostId +) AS postlinks ON posts_types_codecs_ordered.Id = postlinks.PostId +``` + +`posts`ã¨`postlinks`ã®ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ルã¯æ›´æ–°ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¸ãƒ§ã‚¤ãƒ³ã‚’インクリメンタルMaterialized Viewã§å®Ÿè£…ã™ã‚‹ä»£ã‚ã‚Šã«ã€ã“ã®ã‚¯ã‚¨ãƒªã‚’1時間ã”ã¨ã«å®Ÿè¡Œã—ã€ãã®çµæžœã‚’`post_with_links`テーブルã«ä¿å­˜ã™ã‚‹ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’設定ã™ã‚‹ã“ã¨ã§å分ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +ã“ã“ã§ã®æ§‹æ–‡ã¯ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«Materialized Viewã¨åŒä¸€ã§ã™ãŒã€[`REFRESH`](/ja/sql-reference/statements/create/view#refreshable-materialized-view)å¥ã‚’å«ã‚ã¦ã„ã¾ã™ï¼š + +```sql +-- エクスペリメンタル機能を有効化 +SET allow_experimental_refreshable_materialized_view = 1 + +CREATE MATERIALIZED VIEW posts_with_links_mv +REFRESH EVERY 1 HOUR TO posts_with_links AS +SELECT + posts.*, + arrayMap(p -> (p.1, p.2), arrayFilter(p -> p.3 = 'Linked' AND p.2 != 0, Related)) AS LinkedPosts, + arrayMap(p -> (p.1, p.2), arrayFilter(p -> p.3 = 'Duplicate' AND p.2 != 0, Related)) AS DuplicatePosts +FROM posts +LEFT JOIN ( + SELECT + PostId, + groupArray((CreationDate, RelatedPostId, LinkTypeId)) AS Related + FROM postlinks + GROUP BY PostId +) AS postlinks ON posts_types_codecs_ordered.Id = postlinks.PostId +``` + +ã“ã®ãƒ“ューã¯ã€ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã¸ã®æ›´æ–°ãŒå映ã•ã‚Œã‚‹ã‚ˆã†ã«è¨­å®šã•ã‚Œã¦ãŠã‚Šã€å³æ™‚ã«å®Ÿè¡Œã•ã‚Œã€ãã®å¾Œã‚‚毎時間実行ã•ã‚Œã¾ã™ã€‚特ã«ã€ã‚¯ã‚¨ãƒªãŒå†å®Ÿè¡Œã•ã‚Œã‚‹ã¨ãã€çµæžœã‚»ãƒƒãƒˆã¯åŽŸå­ã‹ã¤é€éŽçš„ã«æ›´æ–°ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/migrations/bigquery/equivalent-concepts.md b/docs/ja/migrations/bigquery/equivalent-concepts.md new file mode 100644 index 00000000000..86909ff402f --- /dev/null +++ b/docs/ja/migrations/bigquery/equivalent-concepts.md @@ -0,0 +1,478 @@ +--- +title: BigQuery 㨠ClickHouse Cloud ã®æ¯”較 +slug: /ja/migrations/bigquery +description: BigQuery 㨠ClickHouse Cloud ã®é•ã„ +keywords: [移行, データ, etl, elt, bigquery] +--- + +# BigQuery 㨠ClickHouse Cloud: åŒç­‰æ¦‚念ã¨ç•°ãªã‚‹æ¦‚念 + +## リソースã®çµ„織化 + +ClickHouse Cloud 内ã®ãƒªã‚½ãƒ¼ã‚¹ã®çµ„織化ã¯ã€[BigQuery ã®ãƒªã‚½ãƒ¼ã‚¹éšŽå±¤](https://cloud.google.com/bigquery/docs/resource-hierarchy) ã«ä¼¼ã¦ã„ã¾ã™ã€‚以下㮠ClickHouse Cloud ã®ãƒªã‚½ãƒ¼ã‚¹éšŽå±¤ã‚’示ã™å›³ã‚’基ã«ã—ãŸç‰¹å®šã®é•ã„を説明ã—ã¾ã™ã€‚ + +NEEDS ALT + +
    + +### 組織 + +BigQuery ã¨åŒæ§˜ã«ã€çµ„織㯠ClickHouse Cloud リソース階層ã®ãƒ«ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã§ã™ã€‚ClickHouse Cloud アカウントã§æœ€åˆã«è¨­å®šã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ‰€æœ‰ã™ã‚‹çµ„ç¹”ã«è‡ªå‹•çš„ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ユーザーã¯ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’ãã®çµ„ç¹”ã«æ‹›å¾…ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### BigQuery プロジェクト vs ClickHouse Cloud サービス + +組織内ã§ã¯ã€ClickHouse Cloud ã§ã®ãƒ‡ãƒ¼ã‚¿ãŒã‚µãƒ¼ãƒ“スã«é–¢é€£ä»˜ã‘られるãŸã‚ã€BigQuery プロジェクトã«ç·©ã‚„ã‹ã«ç›¸å½“ã™ã‚‹ã‚µãƒ¼ãƒ“スを作æˆã§ãã¾ã™ã€‚ClickHouse Cloud ã§ã¯[ã„ãã¤ã‹ã®ã‚µãƒ¼ãƒ“スタイプãŒåˆ©ç”¨å¯èƒ½](/ja/cloud/manage/service-types)ã§ã™ã€‚å„ ClickHouse Cloud サービスã¯ç‰¹å®šã®åœ°åŸŸã«ãƒ‡ãƒ—ロイã•ã‚Œã€ä»¥ä¸‹ã‚’å«ã¿ã¾ã™ï¼š + +1. コンピュートノードã®ã‚°ãƒ«ãƒ¼ãƒ—(ç¾åœ¨ã€é–‹ç™ºãƒ†ã‚£ã‚¢ã‚µãƒ¼ãƒ“スã«ã¯ 2 ノードã€é‹ç”¨ãƒ†ã‚£ã‚¢ã‚µãƒ¼ãƒ“スã«ã¯ 3 ノード)。ã“れらã®ãƒŽãƒ¼ãƒ‰ã«å¯¾ã—ã¦ã€ClickHouse Cloud ã¯[åž‚ç›´ãŠã‚ˆã³æ°´å¹³ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°](/ja/manage/scaling#vertical-and-horizontal-scaling)ã®ä¸¡æ–¹ã‚’手動ãŠã‚ˆã³è‡ªå‹•ã§ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +2. サービスãŒã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ã‚ªãƒ–ジェクトストレージフォルダ。 +3. エンドãƒã‚¤ãƒ³ãƒˆï¼ˆã¾ãŸã¯ ClickHouse Cloud UI コンソールを通ã˜ã¦ä½œæˆã•ã‚Œã‚‹è¤‡æ•°ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆï¼‰- サービスã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®ã‚µãƒ¼ãƒ“ス URL(例:`https://dv2fzne24g.us-east-1.aws.clickhouse.cloud:8443`)。 + +### BigQuery データセット vs ClickHouse Cloud データベース + +ClickHouse ã¯ãƒ†ãƒ¼ãƒ–ルをデータベースã«è«–ç†çš„ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã¾ã™ã€‚BigQuery データセットã¨åŒæ§˜ã«ã€ClickHouse データベースã¯ãƒ†ãƒ¼ãƒ–ルデータã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’組織ã—制御ã™ã‚‹è«–ç†ã‚³ãƒ³ãƒ†ãƒŠã§ã™ã€‚ + +### BigQuery フォルダ + +ClickHouse Cloud ã«ã¯ç¾åœ¨ã€BigQuery フォルダã«ç›¸å½“ã™ã‚‹æ¦‚念ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### BigQuery スロット予約ã¨ã‚¯ã‚©ãƒ¼ã‚¿ + +BigQuery スロット予約ã¨åŒæ§˜ã«ã€ClickHouse Cloud ã§ã¯[åž‚ç›´ãŠã‚ˆã³æ°´å¹³ã®ã‚ªãƒ¼ãƒˆã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚’設定](/ja/manage/scaling#configuring-vertical-auto-scaling)ã§ãã¾ã™ã€‚垂直オートスケーリングã§ã¯ã€ã‚µãƒ¼ãƒ“スã®ã‚³ãƒ³ãƒ”ュートノードã®ãƒ¡ãƒ¢ãƒªã¨ CPU コアã®æœ€å°ãŠã‚ˆã³æœ€å¤§ã‚µã‚¤ã‚ºã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€åˆæœŸã®ã‚µãƒ¼ãƒ“ス作æˆã®ãƒ•ãƒ­ãƒ¼ã§ã‚‚利用å¯èƒ½ã§ã™ã€‚å„コンピュートノードã¯åŒã˜ã‚µã‚¤ã‚ºã‚’æŒã£ã¦ã„ã¾ã™ã€‚[水平スケーリング](/ja/manage/scaling#self-serve-horizontal-scaling)を使用ã—ã¦ã€ã‚µãƒ¼ãƒ“ス内ã®ã‚³ãƒ³ãƒ”ュートノードã®æ•°ã‚’変更ã§ãã¾ã™ã€‚ + +ã•ã‚‰ã«ã€BigQuery クォータã«é¡žä¼¼ã—ã¦ã€ClickHouse Cloud ã¯ä¸¦è¡Œåˆ¶å¾¡ã€ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡åˆ¶é™ã€ãŠã‚ˆã³ I/O スケジューリングをæä¾›ã—ã€ã‚¯ã‚¨ãƒªã‚’ワークロードクラスã«éš”離ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚特定ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚¯ãƒ©ã‚¹ã«å¯¾ã™ã‚‹å…±æœ‰ãƒªã‚½ãƒ¼ã‚¹ï¼ˆCPU コアã€DRAMã€ãƒ‡ã‚£ã‚¹ã‚¯ãŠã‚ˆã³ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ I/O)ã®åˆ¶é™ã‚’設定ã™ã‚‹ã“ã¨ã§ã€ã“れらã®ã‚¯ã‚¨ãƒªãŒä»–ã®é‡è¦ãªãƒ“ジãƒã‚¹ã‚¯ã‚¨ãƒªã«å½±éŸ¿ã‚’与ãˆãªã„よã†ã«ã—ã¾ã™ã€‚並行制御ã¯ã€å¤šæ•°ã®åŒæ™‚クエリãŒã‚る状æ³ã§ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®éŽå‰°ãªã‚µãƒ–スクリプションを防ãŽã¾ã™ã€‚ + +ClickHouse ã¯ã€ã‚µãƒ¼ãƒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ãŠã‚ˆã³ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã§ãƒ¡ãƒ¢ãƒªã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®ãƒã‚¤ãƒˆã‚µã‚¤ã‚ºã‚’追跡ã—ã€æŸ”軟ãªãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡åˆ¶é™ã‚’設定ã§ãã¾ã™ã€‚メモリオーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªã¯ä¿è¨¼ã•ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚’超ãˆã‚‹è¿½åŠ ã®ç©ºãメモリを使用ã§ãる一方ã§ã€ä»–ã®ã‚¯ã‚¨ãƒªã®ãƒ¡ãƒ¢ãƒªåˆ¶é™ã‚’ä¿è¨¼ã—ã¾ã™ã€‚加ãˆã¦ã€é›†ç´„ã€ã‚½ãƒ¼ãƒˆã€ãŠã‚ˆã³çµåˆå¥ã®ãŸã‚ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’制é™ã—ã€ãƒ¡ãƒ¢ãƒªåˆ¶é™ãŒè¶…ãˆã‚‰ã‚ŒãŸå ´åˆã«ã¯å¤–部アルゴリズムã«ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +最後ã«ã€I/O スケジューリングã«ã‚ˆã‚Šãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€æœ€å¤§å¸¯åŸŸå¹…ã€ã‚¤ãƒ³ãƒ•ãƒ©ã‚¤ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆã€ãŠã‚ˆã³ãƒãƒªã‚·ãƒ¼ã«åŸºã¥ã„ã¦ã€ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚¯ãƒ©ã‚¹ã®ãƒ­ãƒ¼ã‚«ãƒ«ãŠã‚ˆã³ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ã‚£ã‚¹ã‚¯ã‚¢ã‚¯ã‚»ã‚¹ã‚’制é™ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### æ¨©é™ + +ClickHouse Cloud ã¯[クラウドコンソール](/ja/get-started/sql-console)ãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’通ã˜ã¦[ユーザーアクセスを管ç†](/ja/cloud/security/cloud-access-management)ã—ã¾ã™ã€‚コンソールアクセス㯠[clickhouse.cloud](https://clickhouse.cloud) ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ã‚’通ã˜ã¦ç®¡ç†ã•ã‚Œã¾ã™ã€‚データベースアクセスã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã¨ãƒ­ãƒ¼ãƒ«ã‚’通ã˜ã¦ç®¡ç†ã•ã‚Œã¾ã™ã€‚ã•ã‚‰ã«ã€ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯ã€SQL コンソールを通ã˜ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨å¯¾è©±ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®å½¹å‰²ã‚’付与ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## データ型 + +ClickHouse ã¯æ•°å€¤ã«é–¢ã—ã¦ã‚ˆã‚Šè©³ç´°ãªç²¾åº¦ã‚’æä¾›ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€BigQuery ã¯[INT64, NUMERIC, BIGNUMERIC ãŠã‚ˆã³ FLOAT64](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#numeric_types)ã®æ•°å€¤åž‹ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«å¯¾ã—㦠ClickHouse ã¯ã€ãƒ‡ã‚·ãƒžãƒ«ã€ãƒ•ãƒ­ãƒ¼ãƒˆã€æ•´æ•°ã«å¯¾ã—ã¦è¤‡æ•°ã®ç²¾åº¦ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ã“れらã®ãƒ‡ãƒ¼ã‚¿åž‹ã«ã‚ˆã‚Šã€ClickHouse ユーザーã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŠã‚ˆã³ãƒ¡ãƒ¢ãƒªã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’最é©åŒ–ã—ã€ã‚ˆã‚Šé«˜é€Ÿãªã‚¯ã‚¨ãƒªã¨ãƒªã‚½ãƒ¼ã‚¹æ¶ˆè²»ã‚’低減ã—ã¾ã™ã€‚以下ã«ã€å„ BigQuery åž‹ã«å¯¾ã™ã‚‹ ClickHouse ã®åŒç­‰åž‹ã‚’示ã—ã¾ã™ï¼š + +| BigQuery | ClickHouse | +|----------|------------| +| [ARRAY](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#array_type) | [Array(t)](/ja/sql-reference/data-types/array) | +| [NUMERIC](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#decimal_types) | [Decimal(P, S), Decimal32(S), Decimal64(S), Decimal128(S)](/ja/sql-reference/data-types/decimal) | +| [BIG NUMERIC](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#decimal_types) | [Decimal256(S)](/ja/sql-reference/data-types/decimal) | +| [BOOL](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#boolean_type) | [Bool](/ja/sql-reference/data-types/boolean) | +| [BYTES](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#bytes_type) | [FixedString](/ja/sql-reference/data-types/fixedstring) | +| [DATE](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#date_type) | [Date32](/ja/sql-reference/data-types/date32) (より狭ã„範囲) | +| [DATETIME](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#datetime_type) | [DateTime](/ja/sql-reference/data-types/datetime), [DateTime64](/ja/sql-reference/data-types/datetime64) (ç‹­ã„範囲ã§é«˜ç²¾åº¦) | +| [FLOAT64](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#floating_point_types) | [Float64](/ja/sql-reference/data-types/float) | +| [GEOGRAPHY](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#geography_type) | [Geo Data Types](/ja/sql-reference/data-types/float) | +| [INT64](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#integer_types) | [UInt8, UInt16, UInt32, UInt64, UInt128, UInt256, Int8, Int16, Int32, Int64, Int128, Int256](/ja/sql-reference/data-types/int-uint) | +| [INTERVAL](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#integer_types) | 該当ãªã— - [å¼ã¨ã—ã¦ã‚µãƒãƒ¼ãƒˆ](/ja/sql-reference/data-types/special-data-types/interval#usage-remarks)ã¾ãŸã¯[関数を通ã˜ã¦](/ja/sql-reference/functions/date-time-functions#addyears-addmonths-addweeks-adddays-addhours-addminutes-addseconds-addquarters) | +| [JSON](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#json_type) | [JSON](/ja/integrations/data-formats/json/overview#relying-on-schema-inference) | +| [STRING](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#string_type) | [String (bytes)](/ja/sql-reference/data-types/string) | +| [STRUCT](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#constructing_a_struct) | [Tuple](/ja/sql-reference/data-types/tuple), [Nested](/ja/sql-reference/data-types/nested-data-structures/nested) | +| [TIME](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#time_type) | [DateTime64](/ja/sql-reference/data-types/datetime64) | +| [TIMESTAMP](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#timestamp_type) | [DateTime64](/ja/sql-reference/data-types/datetime64) | + +ClickHouse åž‹ãŒè¤‡æ•°ã®ã‚ªãƒ—ションã§æ示ã•ã‚ŒãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ã®å®Ÿéš›ã®ç¯„囲を考慮ã—ã€å¿…è¦æœ€ä½Žé™ã®ã‚‚ã®ã‚’é¸æŠžã—ã¦ãã ã•ã„。ã¾ãŸã€ã•ã‚‰ãªã‚‹åœ§ç¸®ã®ãŸã‚ã«[é©åˆ‡ãªã‚³ãƒ¼ãƒ‡ãƒƒã‚¯](https://clickhouse.com/blog/optimize-clickhouse-codecs-compression-schema)ã®åˆ©ç”¨ã‚’検討ã—ã¦ãã ã•ã„。 + +## クエリ高速化技術 + +### 主キーãŠã‚ˆã³å¤–部キーã¨ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ + +BigQuery ã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルã«[主キーãŠã‚ˆã³å¤–部キーã®åˆ¶ç´„](https://cloud.google.com/bigquery/docs/information-schema-table-constraints)ã‚’æŒãŸã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚通常ã€ä¸»ã‚­ãƒ¼ãŠã‚ˆã³å¤–部キーã¯ã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ãƒ‡ãƒ¼ã‚¿ã®æ•´åˆæ€§ã‚’確ä¿ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚主キーã®å€¤ã¯é€šå¸¸ã€å„è¡Œã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå€¤ã§ã‚ã‚Š `NULL` ã§ã¯ã‚ã‚Šã¾ã›ã‚“。外部キー値ã¯ã€ä¸»ã‚­ãƒ¼è¡¨ã®ä¸»ã‚­ãƒ¼åˆ—ã§å­˜åœ¨ã™ã‚‹ã‹ `NULL` ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。BigQuery ã§ã¯ã€ã“れらã®åˆ¶ç´„ã¯å¼·åˆ¶ã•ã‚Œã¾ã›ã‚“ãŒã€ã‚¯ã‚¨ãƒªã‚ªãƒ—ティマイザã¯ã“ã®æƒ…報を用ã„ã¦ã‚¯ã‚¨ãƒªã®æœ€é©åŒ–ã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouse ã§ã‚‚テーブルã«ä¸»ã‚­ãƒ¼ãŒè¨­å®šå¯èƒ½ã§ã™ã€‚BigQuery ã¨åŒæ§˜ã«ã€ClickHouse ã¯ãƒ†ãƒ¼ãƒ–ルã®ä¸»ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã®å€¤ã®ä¸€æ„性を強制ã—ã¾ã›ã‚“。BigQuery ã¨ã¯ç•°ãªã‚Šã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ã¯ä¸»ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã«ã‚ˆã£ã¦[ディスクã«é †åºä»˜ã‘ã•ã‚Œã¦](/ja/optimize/sparse-primary-indexes#data-is-stored-on-disk-ordered-by-primary-key-columns)ä¿å­˜ã•ã‚Œã¾ã™ã€‚クエリオプティマイザã¯ã“ã®ä¸¦ã³é †ã‚’用ã„ã¦ãƒªã‚¾ãƒ¼ãƒˆã‚’防ãŽã€çµåˆæ™‚ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’最å°åŒ–ã—ã€ãƒªãƒŸãƒƒãƒˆå¥ã«å¯¾ã—ã¦ã‚·ãƒ§ãƒ¼ãƒˆã‚µãƒ¼ã‚­ãƒƒãƒˆã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚BigQuery ã¨ç•°ãªã‚Šã€ClickHouse ã¯è‡ªå‹•çš„ã«[(スパースãªï¼‰ãƒ—ライマリインデックス](/ja/optimize/sparse-primary-indexes#an-index-design-for-massive-data-scales)を主キーã®ã‚«ãƒ©ãƒ ã®å€¤ã«åŸºã¥ã„ã¦ä½œæˆã—ã¾ã™ã€‚ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€ä¸»ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã®ãƒ•ã‚£ãƒ«ã‚¿ã‚’å«ã‚€ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‚’高速化ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ClickHouse ã¯ç¾åœ¨ã€å¤–部キーã®åˆ¶ç´„をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。 + +## セカンダリインデックス(ClickHouse ã®ã¿ã«å­˜åœ¨ï¼‰ + +テーブルã®ä¸»ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã¨ã¯ç•°ãªã‚‹ã‚«ãƒ©ãƒ ã«ã‚»ã‚«ãƒ³ãƒ€ãƒªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’作æˆã™ã‚‹ã“ã¨ãŒ ClickHouse ã§ã¯ã§ãã¾ã™ã€‚ClickHouse ã¯ã‚¯ã‚¨ãƒªã®ç¨®é¡žã«å¿œã˜ãŸã•ã¾ã–ã¾ãªã‚»ã‚«ãƒ³ãƒ€ãƒªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’æä¾›ã—ã¦ã„ã¾ã™ï¼š + +- **ブルームフィルターインデックス**: + - 等価æ¡ä»¶ï¼ˆä¾‹ï¼š=ã€IN)ã§ã‚¯ã‚¨ãƒªã‚’高速化ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + - 値ãŒãƒ‡ãƒ¼ã‚¿ãƒ–ロックã«å­˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹ã‚’決定ã™ã‚‹ãŸã‚ã®ç¢ºçŽ‡çš„ãªãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚’使用ã—ã¾ã™ã€‚ +- **トークンブルームフィルターインデックス**: + - トークン化ã•ã‚ŒãŸæ–‡å­—列ã€ãŠã‚ˆã³ãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆæ¤œç´¢ã‚¯ã‚¨ãƒªã«é©ã—ãŸãƒ–ルームフィルターインデックス。 +- **Min-Max インデックス**: + - å„データ部分ã®ã‚«ãƒ©ãƒ ã®æœ€å°å€¤ã¨æœ€å¤§å€¤ã‚’維æŒã—ã¾ã™ã€‚指定ã•ã‚ŒãŸç¯„囲ã«å…¥ã‚‰ãªã„データ部分ã®èª­ã¿å–りをスキップã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +## 検索インデックス + +BigQuery ã®[検索インデックス](https://cloud.google.com/bigquery/docs/search-index)ã¨åŒæ§˜ã«ã€ClickHouse ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯æ–‡å­—列値を有ã™ã‚‹ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦[全文検索インデックス](/ja/engines/table-engines/mergetree-family/invertedindexes)を作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## ベクトルインデックス + +BigQuery ã¯æœ€è¿‘ã€[ベクトルインデックス](https://cloud.google.com/bigquery/docs/vector-index)をプリ GA 機能ã¨ã—ã¦å°Žå…¥ã—ã¾ã—ãŸã€‚åŒæ§˜ã«ã€ClickHouse ã«ã¯ãƒ™ã‚¯ãƒˆãƒ«æ¤œç´¢ã®ä½¿ç”¨ã‚±ãƒ¼ã‚¹ã‚’高速化ã™ã‚‹ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãª[インデックスã®ã‚µãƒãƒ¼ãƒˆ](/ja/engines/table-engines/mergetree-family/annindexes)ãŒã‚ã‚Šã¾ã™ã€‚ + +## パーティショニング +   +BigQuery ã¨åŒæ§˜ã«ã€ClickHouse ã¯å¤§è¦æ¨¡ãƒ†ãƒ¼ãƒ–ルã®ãƒ‘フォーマンスã¨ç®¡ç†æ€§ã‚’å‘上ã•ã›ã‚‹ãŸã‚ã«ã€ãƒ†ãƒ¼ãƒ–ルをパーティションã¨å‘¼ã°ã‚Œã‚‹å°ã•ã管ç†ã—ã‚„ã™ã„部分ã«åˆ†å‰²ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルパーティショニングを使用ã—ã¾ã™ã€‚ClickHouse ã®ãƒ‘ーティショニングã«ã¤ã„ã¦ã®è©³ç´°ã¯[ã“ã¡ã‚‰](/ja/engines/table-engines/mergetree-family/custom-partitioning-key)ã§èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ + +## クラスタリング + +BigQuery ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒªãƒ³ã‚°ã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å€¤ã«åŸºã¥ã„ã¦ãƒ†ãƒ¼ãƒ–ルデータを自動的ã«ã‚½ãƒ¼ãƒˆã—ã€é©åˆ‡ãªã‚µã‚¤ã‚ºã®ãƒ–ロックã«é…ç½®ã—ã¾ã™ã€‚クラスタリングã¯ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスをå‘上ã•ã›ã€BigQuery ãŒã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚³ã‚¹ãƒˆã‚’より良ã見ç©ã‚‚ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚クラスタリングã•ã‚ŒãŸã‚«ãƒ©ãƒ ã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªã¯ä¸è¦ãªãƒ‡ãƒ¼ã‚¿ã®ã‚¹ã‚­ãƒ£ãƒ³ã‚’排除ã—ã¾ã™ã€‚ + +ClickHouse ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ†ãƒ¼ãƒ–ルã®ä¸»ã‚­ãƒ¼ã‚«ãƒ©ãƒ ã«åŸºã¥ã„ã¦ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«è‡ªå‹•çš„ã«[クラスタリング](/ja/optimize/sparse-primary-indexes#data-is-stored-on-disk-ordered-by-primary-key-columns)ã•ã‚Œã€ã‚¯ã‚¨ãƒªãŒä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚’利用ã™ã‚‹ãŸã‚ã«è¿…速ã«æ¤œç´¢ã¾ãŸã¯ãƒ—ルーニングã•ã‚Œå¾—るブロックã«è«–ç†çš„ã«æ•´ç†ã•ã‚Œã¾ã™ã€‚ + +## マテリアライズドビュー + +BigQuery 㨠ClickHouse ã®ä¸¡æ–¹ãŒãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ‘フォーマンスã¨åŠ¹çŽ‡ã‚’å‘上ã•ã›ã‚‹ãŸã‚ã«ã€ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ã®å¤‰æ›ã‚¯ã‚¨ãƒªã®çµæžœã«åŸºã¥ã„ãŸäº‹å‰è¨ˆç®—ã•ã‚ŒãŸçµæžœã§ã™ã€‚ + +## マテリアライズドビューã®ã‚¯ã‚¨ãƒª + +BigQuery マテリアライズドビューã¯ç›´æŽ¥ã‚¯ã‚¨ãƒªã•ã‚Œã‚‹ã‹ã€ã‚ªãƒ—ティマイザã«ã‚ˆã£ã¦ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルをクエリã™ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ベーステーブルã¸ã®å¤‰æ›´ãŒãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを無効ã«ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ç›´æŽ¥èª­ã¿å–られã¾ã™ã€‚ベーステーブルã¸ã®å¤‰æ›´ãŒãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを無効ã«ã—ãªã„å ´åˆã€æ®‹ã‚Šã®ãƒ‡ãƒ¼ã‚¿ã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã‹ã‚‰èª­ã¿å–られã€å¤‰æ›´ã®ã¿ãŒãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–られã¾ã™ã€‚ + +ClickHouse ã§ã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯ç›´æŽ¥ã‚¯ã‚¨ãƒªã®ã¿å¯èƒ½ã§ã™ã€‚ã—ã‹ã—ã€BigQuery ã¨ã¯ç•°ãªã‚Šï¼ˆãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯é€šå¸¸ 5 分以内ã«è‡ªå‹•çš„ã«æ›´æ–°ã•ã‚Œã€[30 分ãŠã](https://cloud.google.com/bigquery/docs/materialized-views-manage#refresh)より頻ç¹ã«ã¯æ›´æ–°ã•ã‚Œã¾ã›ã‚“)ã€ClickHouse ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯å¸¸ã«ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã¨åŒæœŸã—ã¦ã„ã¾ã™ã€‚ + +**マテリアライズドビューã®æ›´æ–°** + +BigQuery ã¯å®šæœŸçš„ã«ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹ãƒ“ューã®å¤‰æ›ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã§ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを完全ã«æ›´æ–°ã—ã¾ã™ã€‚æ›´æ–°é–“éš”ã«ã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®ãƒ‡ãƒ¼ã‚¿ã‚’ベーステーブルã®æ–°ã—ã„データã¨çµ„ã¿åˆã‚ã›ã¦ä¸€è²«æ€§ã®ã‚るクエリçµæžœã‚’æä¾›ã—ãªãŒã‚‰ä¾ç„¶ã¨ã—ã¦ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを使用ã—ã¾ã™ã€‚ + +ClickHouse ã§ã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯å¢—分ã§æ›´æ–°ã•ã‚Œã¾ã™ã€‚ã“ã®å¢—分更新機構ã¯é«˜ã„スケーラビリティã¨ä½Žã„計算コストをæä¾›ã—ã¾ã™ã€‚特ã«ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã«æ•°åå„„ã¾ãŸã¯æ•°å…†ã®è¡ŒãŒå«ã¾ã‚Œã‚‹ã‚·ãƒŠãƒªã‚ªã«å¯¾ã—ã¦è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚マテリアライズドビューをベーステーブル全体ã‹ã‚‰ç¹°ã‚Šè¿”ã—æ›´æ–°ã™ã‚‹ä»£ã‚ã‚Šã«ã€ClickHouse ã¯ï¼ˆæ–°ãŸã«æŒ¿å…¥ã•ã‚ŒãŸãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã®è¡Œã®ï¼‰å€¤ã®ã¿ã‹ã‚‰éƒ¨åˆ†çµæžœã‚’計算ã—ã¾ã™ã€‚ã“ã®éƒ¨åˆ†çµæžœã¯ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ä»¥å‰ã«è¨ˆç®—ã•ã‚ŒãŸéƒ¨åˆ†çµæžœã¨ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã«ã¤ãªãŒã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å®Œå…¨ãªãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ç¹°ã‚Šè¿”ã—マテリアライズドビューを更新ã™ã‚‹å ´åˆã«æ¯”ã¹ã¦è¨ˆç®—コストãŒåŠ‡çš„ã«ä½Žä¸‹ã—ã¾ã™ã€‚ + +## トランザクション + +ClickHouse ã¨ã¯å¯¾ç…§çš„ã«ã€BigQuery ã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’使用ã™ã‚‹éš›ã€å˜ä¸€ã®ã‚¯ã‚¨ãƒªå†…ã¾ãŸã¯è¤‡æ•°ã®ã‚¯ã‚¨ãƒªã«ã¾ãŸãŒã‚‹ãƒžãƒ«ãƒã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚マルãƒã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã«ã‚ˆã‚Šã€1 ã¤ã¾ãŸã¯è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルã§è¡Œã®æŒ¿å…¥ã¾ãŸã¯å‰Šé™¤ãªã©ã®å¤‰ç•°æ“作を実行ã—ã€å¤‰æ›´ã‚’原å­çš„ã«ã‚³ãƒŸãƒƒãƒˆã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ãƒãƒƒã‚¯ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚マルãƒã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã¯[ClickHouse ã®ãƒ­ãƒ¼ãƒ‰ãƒžãƒƒãƒ—ã«2024å¹´ã®äºˆå®š](https://github.com/ClickHouse/ClickHouse/issues/58392)ã¨ã—ã¦ã‚ã‚Šã¾ã™ã€‚ + +## 集約関数 + +BigQuery ã¨æ¯”較ã—ã¦ã€ClickHouse ã¯ã‹ãªã‚Šå¤šãã®çµ„ã¿è¾¼ã¿é›†ç´„関数をæä¾›ã—ã¦ã„ã¾ã™ï¼š + +- BigQuery 㯠[18 ã®é›†ç´„関数](https://cloud.google.com/bigquery/docs/reference/standard-sql/aggregate_functions) ã¨ã€[4 ã¤ã®è¿‘似集約関数](https://cloud.google.com/bigquery/docs/reference/standard-sql/approximate_aggregate_functions) ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ +- ClickHouse 㯠[150 以上ã®çµ„ã¿è¾¼ã¿é›†è¨ˆé–¢æ•°](https://clickhouse.com/docs/ja/sql-reference/aggregate-functions/reference)ã‚’å‚™ãˆã¦ãŠã‚Šã€çµ„ã¿è¾¼ã¿é›†è¨ˆé–¢æ•°ã®æŒ™å‹•ã‚’[æ‹¡å¼µ](/ja/sql-reference/aggregate-functions/combinators)ã™ã‚‹å¼·åŠ›ãª[集約コンビãƒãƒ¼ã‚¿](/ja/sql-reference/aggregate-functions/combinators)ã‚‚å‚™ãˆã¦ã„ã¾ã™ã€‚ãŸã¨ãˆã°ã€150 以上ã®çµ„ã¿è¾¼ã¿é›†è¨ˆé–¢æ•°ã‚’テーブルã®è¡Œã§ã¯ãªãé…列ã«é©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã€[-Array サフィックス](/ja/sql-reference/aggregate-functions/combinators#-array)を使用ã™ã‚‹ã ã‘ã§æ¸ˆã¿ã¾ã™ã€‚[-Map サフィックス](/ja/sql-reference/aggregate-functions/combinators#-map)を使用ã™ã‚Œã°ã€ãƒžãƒƒãƒ—ã«å¯¾ã—ã¦ä»»æ„ã®é›†ç´„関数をé©ç”¨ã§ãã¾ã™ã€‚[-ForEach サフィックス](/ja/sql-reference/aggregate-functions/combinators#-foreach)を使用ã—ã¦é…列ã«å¯¾ã—ã¦ä»»æ„ã®é›†ç´„関数をé©ç”¨ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +## データソースã¨ãƒ•ã‚¡ã‚¤ãƒ«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ + +BigQuery ã¨æ¯”較ã—ã¦ã€ClickHouse ã¯åœ§å€’çš„ã«å¤šãã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +- ClickHouse ã«ã¯ã€ã‚らゆるデータソースã‹ã‚‰ 90 以上ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ãƒã‚¤ãƒ†ã‚£ãƒ–サãƒãƒ¼ãƒˆãŒã‚ã‚Šã¾ã™ã€‚ +- BigQuery 㯠5 ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨ 19 ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +## SQL 言語ã®ç‰¹å¾´ + +ClickHouse ã¯æ¨™æº– SQL ã‚’æä¾›ã—ã¦ãŠã‚Šã€åˆ†æžã‚¿ã‚¹ã‚¯ã«å¯¾ã—ã¦ã‚ˆã‚Šãƒ•ãƒ¬ãƒ³ãƒ‰ãƒªãƒ¼ãªå¤šãã®æ‹¡å¼µæ©Ÿèƒ½ã¨æ”¹å–„点を備ãˆã¦ã„ã¾ã™ã€‚例ãˆã°ã€ClickHouse SQL ã§ã¯ [ラムダ関数](/ja/sql-reference/functions#higher-order-functions---operator-and-lambdaparams-expr-function) ãŠã‚ˆã³é«˜æ¬¡é–¢æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€é…列ã«å¤‰æ›ã‚’é©ç”¨ã™ã‚‹éš›ã«ã‚¢ãƒ³ãƒã‚¹åŒ–/爆発処ç†ã‚’è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯BigQueryã®ã‚ˆã†ãªä»–ã®ã‚·ã‚¹ãƒ†ãƒ ã«å¯¾ã™ã‚‹å¤§ããªåˆ©ç‚¹ã§ã™ã€‚ + +## é…列 + +BigQuery ã® 8 ã¤ã®é…列関数ã¨æ¯”較ã—ã¦ã€ClickHouse ã«ã¯å¹…広ã„å•é¡Œã‚’エレガントã‹ã¤ã‚·ãƒ³ãƒ—ルã«ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ãŠã‚ˆã³è§£æ±ºã™ã‚‹ãŸã‚ã® 80 以上ã®[組ã¿è¾¼ã¿é…列関数](/ja/sql-reference/functions/array-functions)ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouse ã«ãŠã‘る典型的ãªãƒ‡ã‚¶ã‚¤ãƒ³ãƒ‘ターンã¯ã€ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルã®è¡Œã®å€¤ã‚’(暫定的ã«ï¼‰é…列ã«å¤‰æ›ã™ã‚‹ãŸã‚ã«[`groupArray`](/ja/sql-reference/aggregate-functions/reference/grouparray)集計関数を使用ã™ã‚‹ã“ã¨ã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€é…列関数を通ã˜ã¦ä¾¿åˆ©ã«å‡¦ç†ã—ã€[`arrayJoin`](/ja/sql-reference/functions/array-join)集計関数を通ã˜ã¦ãã®çµæžœã‚’個別ã®ãƒ†ãƒ¼ãƒ–ル行ã«æˆ»ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouse SQL ã¯[高次ラムダ関数](/ja/sql-reference/functions#higher-order-functions---operator-and-lambdaparams-expr-function)をサãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹ãŸã‚ã€å¤šãã®é«˜åº¦ãªé…列æ“作ãŒãƒ“ルトインé…列関数ã®ä¸€ã¤ã‚’å˜ã«å‘¼ã³å‡ºã™ã“ã¨ã§å®Ÿç¾å¯èƒ½ã§ã™ã€‚多ãã®å ´åˆã€BigQuery ã§ã¯ãã‚ŒãŒå¿…è¦ã§ã™ã€‚BigQuery ã§ã¯ã€é…列ã®[フィルタリング](https://cloud.google.com/bigquery/docs/arrays#filtering_arrays)ã‚„[ジッピング](https://cloud.google.com/bigquery/docs/arrays#zipping_arrays)ã‚’è¡Œã†éš›ã«ã€é…列表を一時的ã«å…ƒã«æˆ»ã™ã“ã¨ãŒå¿…è¦ã§ã—ãŸãŒã€ClickHouse ã§ã¯ã“れらã®æ“作ã¯é«˜æ¬¡é–¢æ•°[`arrayFilter`](/ja/sql-reference/functions/array-functions#arrayfilterfunc-arr1-)ãŠã‚ˆã³[`arrayZip`](/ja/sql-reference/functions/array-functions#arrayzip)ã®å˜ãªã‚‹é–¢æ•°å‘¼ã³å‡ºã—ã§ã™ã€‚ + +以下ã«ã€BigQuery ã‹ã‚‰ ClickHouse ã¸ã®é…列æ“作ã®ãƒžãƒƒãƒ”ングを示ã—ã¾ã™ï¼š + +| BigQuery | ClickHouse | +|----------|------------| +| [ARRAY_CONCAT](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_concat) | [arrayConcat](/ja/sql-reference/functions/array-functions#arrayconcat) | +| [ARRAY_LENGTH](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_length) | [length](/ja/sql-reference/functions/array-functions#length) | +| [ARRAY_REVERSE](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_reverse) | [arrayReverse](/ja/sql-reference/functions/array-functions#arrayreverse) | +| [ARRAY_TO_STRING](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_to_string) | [arrayStringConcat](/ja/sql-reference/functions/splitting-merging-functions#arraystringconcat) | +| [GENERATE_ARRAY](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#generate_array) | [range](/ja/sql-reference/functions/array-functions#rangeend-rangestart--end--step) | + +**サブクエリã®å„è¡Œã«1ã¤ã®è¦ç´ ãŒå«ã¾ã‚Œã‚‹é…列を作æˆ** + +_BigQuery_ + +[ARRAY 関数](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array) + +```sql +SELECT ARRAY + (SELECT 1 UNION ALL + SELECT 2 UNION ALL + SELECT 3) AS new_array; + +/*-----------* + | new_array | + +-----------+ + | [1, 2, 3] | + *-----------*/ +``` + +_ClickHouse_ + +[groupArray](/ja/sql-reference/aggregate-functions/reference/grouparray) 集計関数 + +```sql +SELECT groupArray(*) AS new_array +FROM +( + SELECT 1 + UNION ALL + SELECT 2 + UNION ALL + SELECT 3 +) + ┌─new_array─┠+1. │ [1,2,3] │ + └───────────┘ +``` + +**é…列をセットã«å¤‰æ›** + +_BigQuery_ + +[UNNEST](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#unnest_operator) オペレーター + +```sql +SELECT * +FROM UNNEST(['foo', 'bar', 'baz', 'qux', 'corge', 'garply', 'waldo', 'fred']) + AS element +WITH OFFSET AS offset +ORDER BY offset; + +/*----------+--------* + | element | offset | + +----------+--------+ + | foo | 0 | + | bar | 1 | + | baz | 2 | + | qux | 3 | + | corge | 4 | + | garply | 5 | + | waldo | 6 | + | fred | 7 | + *----------+--------*/ +``` + +_ClickHouse_ + +[ARRAY JOIN](/ja/sql-reference/statements/select/array-join) 節 + +```sql +WITH ['foo', 'bar', 'baz', 'qux', 'corge', 'garply', 'waldo', 'fred'] AS values +SELECT element, num-1 AS offset +FROM (SELECT values AS element) AS subquery +ARRAY JOIN element, arrayEnumerate(element) AS num; + +/*----------+--------* + | element | offset | + +----------+--------+ + | foo | 0 | + | bar | 1 | + | baz | 2 | + | qux | 3 | + | corge | 4 | + | garply | 5 | + | waldo | 6 | + | fred | 7 | + *----------+--------*/ +``` + +**日付を返ã™é…列** + +_BigQuery_ + +[GENERATE_DATE_ARRAY](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#generate_date_array) 関数 + +```sql +SELECT GENERATE_DATE_ARRAY('2016-10-05', '2016-10-08') AS example; + +/*--------------------------------------------------* + | example | + +--------------------------------------------------+ + | [2016-10-05, 2016-10-06, 2016-10-07, 2016-10-08] | + *--------------------------------------------------*/ +``` + +[range](https://clickhouse.com/docs/ja/sql-reference/functions/array-functions#rangeend-rangestart--end--step) + [arrayMap](/ja/sql-reference/functions/array-functions#arraymapfunc-arr1-) 関数 + +_ClickHouse_ + +```sql +SELECT arrayMap(x -> (toDate('2016-10-05') + x), range(toUInt32((toDate('2016-10-08') - toDate('2016-10-05')) + 1))) AS example + + ┌─example───────────────────────────────────────────────┠+1. │ ['2016-10-05','2016-10-06','2016-10-07','2016-10-08'] │ + └───────────────────────────────────────────────────────┘ +``` + +**タイムスタンプを返ã™é…列** + +_BigQuery_ + +[GENERATE_TIMESTAMP_ARRAY](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#generate_timestamp_array) 関数 + +```sql +SELECT GENERATE_TIMESTAMP_ARRAY('2016-10-05 00:00:00', '2016-10-07 00:00:00', + INTERVAL 1 DAY) AS timestamp_array; + +/*--------------------------------------------------------------------------* + | timestamp_array | + +--------------------------------------------------------------------------+ + | [2016-10-05 00:00:00+00, 2016-10-06 00:00:00+00, 2016-10-07 00:00:00+00] | + *--------------------------------------------------------------------------*/ +``` + +_ClickHouse_ + +[range](https://clickhouse.com/docs/ja/sql-reference/functions/array-functions#rangeend-rangestart--end--step) + [arrayMap](/ja/sql-reference/functions/array-functions#arraymapfunc-arr1-) 関数 + +```sql +SELECT arrayMap(x -> (toDateTime('2016-10-05 00:00:00') + toIntervalDay(x)), range(dateDiff('day', toDateTime('2016-10-05 00:00:00'), toDateTime('2016-10-07 00:00:00')) + 1)) AS timestamp_array + +Query id: b324c11f-655b-479f-9337-f4d34fd02190 + + ┌─timestamp_array─────────────────────────────────────────────────────┠+1. │ ['2016-10-05 00:00:00','2016-10-06 00:00:00','2016-10-07 00:00:00'] │ + └─────────────────────────────────────────────────────────────────────┘ +``` + +**é…列ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°** + +_BigQuery_ + +[UNNEST](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#unnest_operator) オペレーターを通ã˜ãŸä¸€æ™‚çš„ãªé…列をテーブルã«æˆ»ã™ã“ã¨ãŒå¿…è¦ + +```sql +WITH Sequences AS + (SELECT [0, 1, 1, 2, 3, 5] AS some_numbers + UNION ALL SELECT [2, 4, 8, 16, 32] AS some_numbers + UNION ALL SELECT [5, 10] AS some_numbers) +SELECT + ARRAY(SELECT x * 2 + FROM UNNEST(some_numbers) AS x + WHERE x < 5) AS doubled_less_than_five +FROM Sequences; + +/*------------------------* + | doubled_less_than_five | + +------------------------+ + | [0, 2, 2, 4, 6] | + | [4, 8] | + | [] | + *------------------------*/ +``` + +_ClickHouse_ + +[arrayFilter](/ja/sql-reference/functions/array-functions#arrayfilterfunc-arr1-) 関数 + +```sql +WITH Sequences AS + ( + SELECT [0, 1, 1, 2, 3, 5] AS some_numbers + UNION ALL + SELECT [2, 4, 8, 16, 32] AS some_numbers + UNION ALL + SELECT [5, 10] AS some_numbers + ) +SELECT arrayMap(x -> (x * 2), arrayFilter(x -> (x < 5), some_numbers)) AS doubled_less_than_five +FROM Sequences; + ┌─doubled_less_than_five─┠+1. │ [0,2,2,4,6] │ + └────────────────────────┘ + ┌─doubled_less_than_five─┠+2. │ [] │ + └────────────────────────┘ + ┌─doubled_less_than_five─┠+3. │ [4,8] │ + └────────────────────────┘ +``` + +**é…列ã®ã‚¸ãƒƒãƒ”ング** + +_BigQuery_ + +[UNNEST](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#unnest_operator) オペレーターを通ã˜ãŸé…列をテーブルã™ã‚‹ã“ã¨ãŒå¿…è¦ + +```sql +WITH + Combinations AS ( + SELECT + ['a', 'b'] AS letters, + [1, 2, 3] AS numbers + ) +SELECT + ARRAY( + SELECT AS STRUCT + letters[SAFE_OFFSET(index)] AS letter, + numbers[SAFE_OFFSET(index)] AS number + FROM Combinations + CROSS JOIN + UNNEST( + GENERATE_ARRAY( + 0, + LEAST(ARRAY_LENGTH(letters), ARRAY_LENGTH(numbers)) - 1)) AS index + ORDER BY index + ); + +/*------------------------------* + | pairs | + +------------------------------+ + | [{ letter: "a", number: 1 }, | + | { letter: "b", number: 2 }] | + *------------------------------*/ +``` + +_ClickHouse_ + +[arrayZip](/ja/sql-reference/functions/array-functions#arrayzip) 関数 + +```sql +WITH Combinations AS + ( + SELECT + ['a', 'b'] AS letters, + [1, 2, 3] AS numbers + ) +SELECT arrayZip(letters, arrayResize(numbers, length(letters))) AS pairs +FROM Combinations; + ┌─pairs─────────────┠+1. │ [('a',1),('b',2)] │ + └───────────────────┘ +``` + +**é…列ã®é›†è¨ˆ** + +_BigQuery_ + +[UNNEST](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#unnest_operator) オペレーターを通ã˜ãŸé…列テーブルã¸ã®å¤‰æ›ãŒå¿…è¦ + +```sql +WITH Sequences AS + (SELECT [0, 1, 1, 2, 3, 5] AS some_numbers + UNION ALL SELECT [2, 4, 8, 16, 32] AS some_numbers + UNION ALL SELECT [5, 10] AS some_numbers) +SELECT some_numbers, + (SELECT SUM(x) + FROM UNNEST(s.some_numbers) AS x) AS sums +FROM Sequences AS s; + +/*--------------------+------* + | some_numbers | sums | + +--------------------+------+ + | [0, 1, 1, 2, 3, 5] | 12 | + | [2, 4, 8, 16, 32] | 62 | + | [5, 10] | 15 | + *--------------------+------*/ +``` + +_ClickHouse_ + +[arraySum](/ja/sql-reference/functions/array-functions#arraysum), [arrayAvg](/ja/sql-reference/functions/array-functions#arrayavg), … 関数ã€ã¾ãŸã¯ä»»æ„ã® 90 以上ã®é›†ç´„関数åã‚’[arrayReduce](/ja/sql-reference/functions/array-functions#arrayreduce)関数ã®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨ + +```sql +WITH Sequences AS + ( + SELECT [0, 1, 1, 2, 3, 5] AS some_numbers + UNION ALL + SELECT [2, 4, 8, 16, 32] AS some_numbers + UNION ALL + SELECT [5, 10] AS some_numbers + ) +SELECT + some_numbers, + arraySum(some_numbers) AS sums +FROM Sequences; + ┌─some_numbers──┬─sums─┠+1. │ [0,1,1,2,3,5] │ 12 │ + └───────────────┴──────┘ + ┌─some_numbers──┬─sums─┠+2. │ [2,4,8,16,32] │ 62 │ + └───────────────┴──────┘ + ┌─some_numbers─┬─sums─┠+3. │ [5,10] │ 15 │ + └──────────────┴──────┘ +``` diff --git a/docs/ja/migrations/bigquery/loading-data.md b/docs/ja/migrations/bigquery/loading-data.md new file mode 100644 index 00000000000..3aa9b9e8f8a --- /dev/null +++ b/docs/ja/migrations/bigquery/loading-data.md @@ -0,0 +1,128 @@ +--- +sidebar_label: データã®ãƒ­ãƒ¼ãƒ‰ +title: BigQuery ã‹ã‚‰ ClickHouse ã¸ã®ãƒ‡ãƒ¼ã‚¿ã®ãƒ­ãƒ¼ãƒ‰ +slug: /ja/migrations/bigquery/loading-data +description: BigQuery ã‹ã‚‰ ClickHouse ã¸ã®ãƒ‡ãƒ¼ã‚¿ã®ãƒ­ãƒ¼ãƒ‰æ–¹æ³• +keywords: [移行, データ, etl, elt, bigquery] +--- + +_ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€ClickHouse Cloud ãŠã‚ˆã³ã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã®å ´åˆã¯ ClickHouse v23.5+ ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚_ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€[BigQuery](https://cloud.google.com/bigquery) ã‹ã‚‰ ClickHouse ã¸ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œã®æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚ + +ã¾ãšã€ãƒ†ãƒ¼ãƒ–ルを [Google ã®ã‚ªãƒ–ジェクトストア(GCS)](https://cloud.google.com/storage) ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã€ãã®ãƒ‡ãƒ¼ã‚¿ã‚’ [ClickHouse Cloud](https://clickhouse.com/cloud) ã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ã“ã®æ‰‹é †ã¯ã€BigQuery ã‹ã‚‰ ClickHouse ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ãŸã„å„テーブルã«å¯¾ã—ã¦ç¹°ã‚Šè¿”ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã«ã¯ã©ã®ãらã„時間ãŒã‹ã‹ã‚Šã¾ã™ã‹ï¼Ÿ + +BigQuery ã‹ã‚‰ ClickHouse ã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ã‚µã‚¤ã‚ºã«ä¾å­˜ã—ã¾ã™ã€‚å‚考ã¾ã§ã«ã€ã“ã®ã‚¬ã‚¤ãƒ‰ã‚’使用ã—㦠[4TB ã®å…¬é–‹ Ethereum データセット](https://cloud.google.com/blog/products/data-analytics/ethereum-bigquery-public-dataset-smart-contract-analytics) ã‚’ BigQuery ã‹ã‚‰ ClickHouse ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã®ã«ç´„1時間ã‹ã‹ã‚Šã¾ã™ã€‚ + +| テーブル | 行数 | エクスãƒãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«æ•° | データサイズ | BigQuery エクスãƒãƒ¼ãƒˆ | スロット時間 | ClickHouse インãƒãƒ¼ãƒˆ | +| --------------------------------------------------------------------------------------------------- | ------------- | ----------------- | --------- | --------------- | --------------- | ----------------- | +| [blocks](https://github.com/ClickHouse/examples/blob/main/ethereum/schemas/blocks.md) | 16,569,489 | 73 | 14.53GB | 23 秒 | 37 分 | 15.4 秒 | +| [transactions](https://github.com/ClickHouse/examples/blob/main/ethereum/schemas/transactions.md) | 1,864,514,414 | 5169 | 957GB | 1 分 38 秒 | 1 æ—¥ 8 時間 | 18 分 5 秒 | +| [traces](https://github.com/ClickHouse/examples/blob/main/ethereum/schemas/traces.md) | 6,325,819,306 | 17,985 | 2.896TB | 5 分 46 秒 | 5 æ—¥ 19 時間 | 34 分 55 秒 | +| [contracts](https://github.com/ClickHouse/examples/blob/main/ethereum/schemas/contracts.md) | 57,225,837 | 350 | 45.35GB | 16 秒 | 1 時間 51 分 | 39.4 秒 | +| åˆè¨ˆ | 8.26 billion | 23,577 | 3.982TB | 8 分 3 秒 | \> 6 æ—¥ 5 時間 | 53 分 45 秒 | + +## 1. GCS ã¸ã®ãƒ†ãƒ¼ãƒ–ルデータã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã¯ã€[BigQuery SQL ワークスペース](https://cloud.google.com/bigquery/docs/bigquery-web-ui) を利用ã—㦠SQL コマンドを実行ã—ã¾ã™ã€‚以下ã§ã¯ã€`EXPORT DATA` ステートメントを使用ã—ã¦ã€`mytable` ã¨ã„ㆠBigQuery テーブルを GCS ãƒã‚±ãƒƒãƒˆã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +```sql +DECLARE export_path STRING; +DECLARE n INT64; +DECLARE i INT64; +SET i = 0; + +-- n ã‚’ x billion è¡Œã«è¨­å®šã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚例ãˆã°ã€5 billion è¡Œãªã‚‰ n = 5 +SET n = 100; + +WHILE i < n DO + SET export_path = CONCAT('gs://mybucket/mytable/', i,'-*.parquet'); + EXPORT DATA + OPTIONS ( + uri = export_path, + format = 'PARQUET', + overwrite = true + ) + AS ( + SELECT * FROM mytable WHERE export_id = i + ); + SET i = i + 1; +END WHILE; +``` + +上記ã®ã‚¯ã‚¨ãƒªã§ã¯ã€BigQuery テーブルを [Parquet データフォーマット](https://parquet.apache.org/) ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã¾ãŸã€`uri` パラメータ㫠`*` 文字を使用ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆãŒ 1GB を超ãˆã‚‹å ´åˆã€å‡ºåŠ›ãŒè¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ†æ•£ã•ã‚Œã€æ•°å€¤ãŒå¢—加ã™ã‚‹ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ãŒä»˜ä¸Žã•ã‚Œã¾ã™ã€‚ + +ã“ã®ã‚¢ãƒ—ローãƒã«ã¯ä»¥ä¸‹ã®åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ï¼š + +- Google 㯠1 æ—¥ã‚ãŸã‚Šæœ€å¤§ 50TB を無料㧠GCS ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã§ãã¾ã™ã€‚ユーザ㯠GCS ストレージã®æ–™é‡‘ã®ã¿ã‚’支払ã„ã¾ã™ã€‚ +- エクスãƒãƒ¼ãƒˆã¯è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’自動的ã«ç”Ÿæˆã—ã€ãã‚Œãžã‚Œæœ€å¤§ 1GB ã®ãƒ†ãƒ¼ãƒ–ルデータã«åˆ¶é™ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€Import 時ã«ä¸¦åˆ—化ãŒå¯èƒ½ã«ãªã‚‹ã®ã§ ClickHouse ã«ã¨ã£ã¦æœ‰ç›Šã§ã™ã€‚ +- Parquet ã¯åˆ—指å‘フォーマットã®ãŸã‚ã€åœ§ç¸®ã•ã‚Œã¦ãŠã‚Šã€BigQuery ãŒã‚ˆã‚Šé€Ÿãエクスãƒãƒ¼ãƒˆã—ã€ClickHouse ãŒã‚ˆã‚Šé€Ÿãクエリ ã§ãã‚‹ãŸã‚ã€ã‚ˆã‚Šè‰¯ã„交æ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ãªã‚Šã¾ã™ã€‚ + +## 2. GCS ã‹ã‚‰ ClickHouse ã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +エクスãƒãƒ¼ãƒˆãŒå®Œäº†ã—ãŸã‚‰ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’ ClickHouse テーブルã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã«ã¯ã€[ClickHouse SQL コンソール](/docs/ja/integrations/sql-clients/sql-console) ã¾ãŸã¯ [`clickhouse-client`](/docs/ja/integrations/sql-clients/cli) を使用ã—ã¦ãã ã•ã„。 + +最åˆã«ã€ClickHouse ã«ãƒ†ãƒ¼ãƒ–ルを[作æˆ](/docs/ja/sql-reference/statements/create/table)ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +-- BigQuery テーブル㫠STRUCT åž‹ã®ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ +-- ãã®ã‚«ãƒ©ãƒ ã‚’ ClickHouse ã® Nested åž‹ã®ã‚«ãƒ©ãƒ ã«ãƒžãƒƒãƒ—ã™ã‚‹è¨­å®šã‚’有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +SET input_format_parquet_import_nested = 1; + +CREATE TABLE default.mytable +( + `timestamp` DateTime64(6), + `some_text` String +) +ENGINE = MergeTree +ORDER BY (timestamp); +``` + +テーブルを作æˆã—ãŸã‚‰ã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’加速ã™ã‚‹ãŸã‚ã«ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å†…ã«è¤‡æ•°ã® ClickHouse レプリカãŒã‚ã‚‹å ´åˆã¯ã€è¨­å®š `parallel_distributed_insert_select` を有効ã«ã—ã¾ã™ã€‚ClickHouse ノードãŒ1ã¤ã—ã‹ãªã„å ´åˆã¯ã€ã“ã®æ‰‹é †ã‚’スキップã§ãã¾ã™ï¼š + +```sql +SET parallel_distributed_insert_select = 1; +``` + +最後ã«ã€`SELECT` クエリã®çµæžœã«åŸºã¥ã„ã¦ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ [`INSERT INTO SELECT` コマンド](/docs/ja/sql-reference/statements/insert-into#inserting-the-results-of-select) を使用ã—ã¦ã€GCS ã‹ã‚‰ ClickHouse テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã§ãã¾ã™ã€‚ + +データを `INSERT` ã™ã‚‹ãŸã‚ã«ã¯ã€[s3Cluster 関数](/docs/ja/sql-reference/table-functions/s3Cluster) を使用ã—㦠GCS ãƒã‚±ãƒƒãƒˆã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ã¾ã™ã€‚GCS 㯠[Amazon S3](https://aws.amazon.com/s3/) ã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ClickHouse ノードãŒ1ã¤ã—ã‹ãªã„å ´åˆã¯ã€`s3Cluster` 関数ã®ä»£ã‚ã‚Šã« [s3 テーブル関数](/ja/sql-reference/table-functions/s3) を使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +INSERT INTO mytable +SELECT + timestamp, + ifNull(some_text, '') as some_text +FROM s3Cluster( + 'default', + 'https://storage.googleapis.com/mybucket/mytable/*.parquet.gz', + '', + '' +); +``` + +上記ã®ã‚¯ã‚¨ãƒªã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ `ACCESS_ID` 㨠`SECRET` ã¯ã€GCS ãƒã‚±ãƒƒãƒˆã«é–¢é€£ä»˜ã‘られ㟠[HMAC キー](https://cloud.google.com/storage/docs/authentication/hmackeys) ã§ã™ã€‚ + +:::note NULL å¯èƒ½ãªã‚«ãƒ©ãƒ ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹å ´åˆã¯ `ifNull` を使用 +上記ã®ã‚¯ã‚¨ãƒªã§ã¯ã€[`ifNull` 関数](/docs/ja/sql-reference/functions/functions-for-nulls#ifnull) を使用ã—㦠`some_text` カラムã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’指定ã—㦠ClickHouse テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¦ã„ã¾ã™ã€‚ClickHouse ã®ã‚«ãƒ©ãƒ ã‚’ [`Nullable`](/docs/ja/sql-reference/data-types/nullable) ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€ãƒ‘フォーマンスã«æ‚ªå½±éŸ¿ã‚’åŠã¼ã™å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚推奨ã•ã‚Œã¾ã›ã‚“。 + +別ã®æ–¹æ³•ã¨ã—ã¦ã€`SET input_format_null_as_default=1` を設定ã™ã‚‹ã¨ã€æ¬ è½ã—ã¦ã„る値や NULL 値ãŒãã‚Œãžã‚Œã®ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ï¼ˆãã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼‰ã€‚ +::: + +## 3. データエクスãƒãƒ¼ãƒˆã®æˆåŠŸç¢ºèª + +データãŒæ­£ã—ã挿入ã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’確èªã™ã‚‹ã«ã¯ã€æ–°ã—ã„テーブル㧠`SELECT` クエリを実行ã—ã¦ãã ã•ã„: + +```sql +SELECT * FROM mytable limit 10; +``` + +ä»–ã® BigQuery テーブルをエクスãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€ä¸Šè¨˜ã®æ‰‹é †ã‚’追加ã®å„テーブルã«å¯¾ã—ã¦ç¹°ã‚Šè¿”ã—ã¦ãã ã•ã„。 + +## ã•ã‚‰ã«è©³ã—ã„情報ã¨ã‚µãƒãƒ¼ãƒˆ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã«åŠ ãˆã¦ã€[ClickHouse を使用ã—㦠BigQuery を高速化ã—増分インãƒãƒ¼ãƒˆã‚’扱ã†æ–¹æ³•](https://clickhouse.com/blog/clickhouse-bigquery-migrating-data-for-realtime-queries)を示ã™ãƒ–ログ記事もãŠå‹§ã‚ã§ã™ã€‚ + +BigQuery ã‹ã‚‰ ClickHouse ã¸ã®ãƒ‡ãƒ¼ã‚¿è»¢é€ã«å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€support@clickhouse.com ã¾ã§ãŠå•ã„åˆã‚ã›ãã ã•ã„。 diff --git a/docs/ja/migrations/bigquery/migrating-to-clickhouse-cloud.md b/docs/ja/migrations/bigquery/migrating-to-clickhouse-cloud.md new file mode 100644 index 00000000000..71132f2a95d --- /dev/null +++ b/docs/ja/migrations/bigquery/migrating-to-clickhouse-cloud.md @@ -0,0 +1,593 @@ +--- +title: BigQueryã‹ã‚‰ClickHouse Cloudã¸ã®ç§»è¡Œ +slug: /ja/migrations/bigquery/migrating-to-clickhouse-cloud +description: BigQueryã‹ã‚‰ClickHouse Cloudã¸ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œæ–¹æ³• +keywords: [migrate, migration, migrating, data, etl, elt, bigquery] +--- + +## ãªãœBigQueryよりもClickHouse Cloudã‚’é¸ã¶ã®ã‹ï¼Ÿ + +TL;DR: ClickHouseã¯ã€ç¾ä»£ã®ãƒ‡ãƒ¼ã‚¿åˆ†æžã«ãŠã„ã¦BigQueryよりも高速ã§ã€å®‰ä¾¡ã§ã€å¼·åŠ›ã§ã™ã€‚ + +
    + +NEEDS ALT + +
    + +## BigQueryã‹ã‚‰ClickHouse Cloudã¸ã®ãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ + +### データセット + +BigQueryã‹ã‚‰ClickHouse Cloudã¸ã®å…¸åž‹çš„ãªç§»è¡Œã‚’示ã™ãŸã‚ã®ã‚µãƒ³ãƒ—ルデータセットã¨ã—ã¦ã€[ã“ã¡ã‚‰](/ja/getting-started/example-datasets/stackoverflow)ã§èª¬æ˜Žã•ã‚Œã¦ã„ã‚‹Stack Overflowデータセットを使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€2008å¹´ã‹ã‚‰2024å¹´4月ã¾ã§ã®Stack Overflow上ã®ã™ã¹ã¦ã®`post`ã€`vote`ã€`user`ã€`comment`ã€ãŠã‚ˆã³`badge`ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã®BigQueryスキーマã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +
    + +NEEDS ALT + +
    + +移行手順をテストã™ã‚‹ãŸã‚ã«ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’BigQueryインスタンスã§æ§‹ç¯‰ã—ãŸã„ユーザーã®ãŸã‚ã«ã€GCSãƒã‚±ãƒƒãƒˆã§Parquetå½¢å¼ã®ãƒ‡ãƒ¼ã‚¿ã‚’æä¾›ã—ã¦ãŠã‚Šã€BigQueryã§ã®ãƒ†ãƒ¼ãƒ–ル作æˆãŠã‚ˆã³ãƒ­ãƒ¼ãƒ‰ç”¨ã®DDLコマンドã¯[ã“ã¡ã‚‰](https://pastila.nl/?003fd86b/2b93b1a2302cfee5ef79fd374e73f431#hVPC52YDsUfXg2eTLrBdbA==)ã«ã‚ã‚Šã¾ã™ã€‚ + +### データ移行 + +BigQueryã¨ClickHouse Cloudé–“ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œã«ã¯ã€ä¸»ã«2ã¤ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚¿ã‚¤ãƒ—ãŒã‚ã‚Šã¾ã™ï¼š + +- **åˆå›žã®ä¸€æ‹¬ãƒ­ãƒ¼ãƒ‰ã¨å®šæœŸçš„ãªæ›´æ–°** - åˆå›žãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ç§»è¡ŒãŒå¿…è¦ã§ã€ãã®å¾Œã¯ä¸€å®šé–“éš”ã§ã®å®šæœŸæ›´æ–°ï¼ˆä¾‹ãˆã°ã€æ¯Žæ—¥ï¼‰ãŒå¿…è¦ã§ã™ã€‚ã“ã“ã§ã®æ›´æ–°ã¯ã€å¤‰æ›´ã•ã‚ŒãŸè¡Œã‚’å†é€ä¿¡ã™ã‚‹ã“ã¨ã§å‡¦ç†ã•ã‚Œã€æ¯”較ã«ä½¿ç”¨ã§ãるカラム(例ãˆã°ã€æ—¥ä»˜ï¼‰ã¾ãŸã¯XMIN値ã«ã‚ˆã£ã¦è­˜åˆ¥ã•ã‚Œã¾ã™ã€‚削除ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®å®Œå…¨ãªå®šæœŸçš„ãªãƒªãƒ­ãƒ¼ãƒ‰ã«ã‚ˆã£ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚ +- **リアルタイムレプリケーションã¾ãŸã¯CDC** - åˆå›žãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ç§»è¡ŒãŒå¿…è¦ã§ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¸ã®å¤‰æ›´ã¯ã€æ•°ç§’ã®é…延ã®ã¿ãŒè¨±å®¹ã•ã‚Œã‚‹çŠ¶æ…‹ã§ã€ClickHouseã«ã»ã¼ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§å映ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯å®Ÿè³ªçš„ã«[Change Data Capture (CDC)プロセス](https://en.wikipedia.org/wiki/Change_data_capture)ã§ã‚ã‚Šã€BigQueryã®ãƒ†ãƒ¼ãƒ–ルã¯ClickHouseã¨åŒæœŸã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€ã™ãªã‚ã¡BigQueryテーブルã§ã®æŒ¿å…¥ã€æ›´æ–°ãŠã‚ˆã³å‰Šé™¤ã¯ã€ClickHouse内ã®åŒç­‰ã®ãƒ†ãƒ¼ãƒ–ルã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +#### Google Cloud Storage (GCS)ã«ã‚ˆã‚‹ä¸€æ‹¬ãƒ­ãƒ¼ãƒ‰ + +BigQueryã¯Googleã®ã‚ªãƒ–ジェクトストア(GCS)ã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚我々ã®ã‚µãƒ³ãƒ—ルデータセットã®å ´åˆï¼š + +1. 7ã¤ã®ãƒ†ãƒ¼ãƒ–ルをGCSã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ãã®ãŸã‚ã®ã‚³ãƒžãƒ³ãƒ‰ã¯[ã“ã¡ã‚‰](https://pastila.nl/?014e1ae9/cb9b07d89e9bb2c56954102fd0c37abd#0Pzj52uPYeu1jG35nmMqRQ==)ã«ã‚ã‚Šã¾ã™ã€‚ + +2. データをClickHouse Cloudã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ã“ã“ã§ã€[gcsテーブル関数](/ja/sql-reference/table-functions/gcs)を使用ã—ã¾ã™ã€‚DDLã¨ã‚¤ãƒ³ãƒãƒ¼ãƒˆã‚¯ã‚¨ãƒªã¯[ã“ã¡ã‚‰](https://pastila.nl/?00531abf/f055a61cc96b1ba1383d618721059976#Wf4Tn43D3VCU5Hx7tbf1Qw==)ã«ã‚ã‚Šã¾ã™ã€‚ClickHouse CloudインスタンスãŒè¤‡æ•°ã®ã‚³ãƒ³ãƒ”ュートノードã‹ã‚‰æ§‹æˆã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€`gcs`テーブル関数ã®ä»£ã‚ã‚Šã«ã€gcsãƒã‚±ãƒƒãƒˆã§ã‚‚動作ã—データを並列ã§ãƒ­ãƒ¼ãƒ‰ã™ã‚‹[ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã‚’利用ã™ã‚‹s3Clusterテーブル関数](/ja/sql-reference/table-functions/s3Cluster)を使用ã—ã¦ã„ã¾ã™ã€‚ + +
    + +NEEDS ALT + +
    + +ã“ã®ã‚¢ãƒ—ローãƒã«ã¯ä»¥ä¸‹ã®åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ï¼š + +- BigQueryエクスãƒãƒ¼ãƒˆæ©Ÿèƒ½ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚µãƒ–セットã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’フィルタリングã™ã‚‹ãŸã‚ã®ã‚µãƒãƒ¼ãƒˆãŒä»˜ã„ã¦ã„ã¾ã™ã€‚ +- BigQueryã¯[Parquet, Avro, JSON, CSV](https://cloud.google.com/bigquery/docs/exporting-data)å½¢å¼ãŠã‚ˆã³ã„ãã¤ã‹ã®[圧縮タイプ](https://cloud.google.com/bigquery/docs/exporting-data)ã¸ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ClickHouseã¯ã“れらã™ã¹ã¦ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +- GCSã¯[オブジェクトライフサイクル管ç†](https://cloud.google.com/storage/docs/lifecycle)をサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€æŒ‡å®šã—ãŸæœŸé–“後ã«ClickHouseã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆãŠã‚ˆã³ã‚¤ãƒ³ãƒãƒ¼ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’削除ã§ãã¾ã™ã€‚ +- [Googleã¯1æ—¥50TBã¾ã§GCSã¸ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’ç„¡æ–™ã§è¨±å¯ã—ã¦ã„ã¾ã™](https://cloud.google.com/bigquery/quotas#export_jobs)。ユーザーã¯GCSストレージã®ã¿ã«æ”¯æ‰•ã„ã‚’è¡Œã„ã¾ã™ã€‚ +- エクスãƒãƒ¼ãƒˆã¯è‡ªå‹•çš„ã«è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’生æˆã—ã€ãƒ†ãƒ¼ãƒ–ルデータを最大1GBã«åˆ¶é™ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€Importを並列化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +以下ã®ä¾‹ã‚’試ã™å‰ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯[エクスãƒãƒ¼ãƒˆã«å¿…è¦ãªæ¨©é™](https://cloud.google.com/bigquery/docs/exporting-data#required_permissions)ãŠã‚ˆã³ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã¨ã‚¤ãƒ³ãƒãƒ¼ãƒˆã®ãƒ‘フォーマンスを最大化ã™ã‚‹ãŸã‚ã®[地域推薦](https://cloud.google.com/bigquery/docs/exporting-data#data-locations)をレビューã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +### スケジュールã•ã‚ŒãŸã‚¯ã‚¨ãƒªã«ã‚ˆã‚‹ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ãƒ¬ãƒ—リケーションã¾ãŸã¯CDC + +Change Data Capture (CDC) ã¯ã€2ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹é–“ã§ãƒ†ãƒ¼ãƒ–ルをåŒæœŸã•ã›ã¦ãŠãプロセスã§ã™ã€‚更新や削除をã»ã¼ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§å‡¦ç†ã™ã‚‹å ´åˆã€ã“ã‚Œã¯éžå¸¸ã«è¤‡é›‘ã§ã™ã€‚1ã¤ã®ã‚¢ãƒ—ローãƒã¯ã€BigQueryã®[スケジュールã•ã‚Œã‚¯ã‚¨ãƒªæ©Ÿèƒ½](https://cloud.google.com/bigquery/docs/scheduling-queries)を使ã£ã¦å˜ç´”ã«å®šæœŸçš„ãªã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’スケジュールã™ã‚‹ã“ã¨ã§ã™ã€‚ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ã«è‹¥å¹²ã®é…延を許容ã§ãã‚‹ãªã‚‰ã€ã“ã®ã‚¢ãƒ—ローãƒã¯å®Ÿè£…ãŒå®¹æ˜“ã§ç¶­æŒãŒç°¡å˜ã§ã™ã€‚[ã“ã®ãƒ–ログ投稿](https://clickhouse.com/blog/clickhouse-bigquery-migrating-data-for-realtime-queries#using-scheduled-queries)ã§ã¯ã€ä¸€ä¾‹ãŒç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## スキーマã®è¨­è¨ˆ + +Stack Overflowデータセットã«ã¯å¤šæ•°ã®é–¢é€£ãƒ†ãƒ¼ãƒ–ルãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã¾ãšä¸»ã¨ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã®ç§»è¡Œã«é›†ä¸­ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚ŒãŒå¿…ãšã—も最大ã®ãƒ†ãƒ¼ãƒ–ルã§ã¯ãªãã€æœ€ã‚‚分æžã‚¯ã‚¨ãƒªã‚’å—ã‘ã‚‹ã¨äºˆæƒ³ã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ClickHouseã®ä¸»è¦ãªæ¦‚念ã«ç²¾é€šã™ã‚‹ãŸã‚ã®æ‰‹æ®µã¨ãªã‚‹ã§ã—ょã†ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ClickHouseã®ç‰¹æ€§ã‚’最大é™åˆ©ç”¨ã—ã€æœ€é©ãªãƒ‘フォーマンスを得るãŸã‚ã«ã•ã‚‰ãªã‚‹ãƒ†ãƒ¼ãƒ–ルを追加ã™ã‚‹éš›ã«å†ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ãŒå¿…è¦ã«ãªã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã®ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ãƒ—ロセスã¯[データモデリングドキュメント](/ja/data-modeling/schema-design#next-data-modelling-techniques)ã§æŽ¢æ±‚ã—ã¦ã„ã¾ã™ã€‚ + +ã“ã®åŽŸå‰‡ã«å¾“ã„ã€ä¸»ãª`posts`テーブルã«ç„¦ç‚¹ã‚’当ã¦ã¾ã™ã€‚ã“ã®ãŸã‚ã®BigQueryスキーマã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```sql +CREATE TABLE stackoverflow.posts ( + id INTEGER, + posttypeid INTEGER, + acceptedanswerid STRING, + creationdate TIMESTAMP, + score INTEGER, + viewcount INTEGER, + body STRING, + owneruserid INTEGER, + ownerdisplayname STRING, + lasteditoruserid STRING, + lasteditordisplayname STRING, + lasteditdate TIMESTAMP, + lastactivitydate TIMESTAMP, + title STRING, + tags STRING, + answercount INTEGER, + commentcount INTEGER, + favoritecount INTEGER, + conentlicense STRING, + parentid STRING, + communityowneddate TIMESTAMP, + closeddate TIMESTAMP +); +``` + +### åž‹ã®æœ€é©åŒ– + +ã“ã®ãƒ—ロセスをé©ç”¨ã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚¹ã‚­ãƒ¼ãƒžãŒå¾—られã¾ã™ï¼š + +```sql +CREATE TABLE stackoverflow.posts +( + `Id` Int32, + `PostTypeId` Enum('Question' = 1, 'Answer' = 2, 'Wiki' = 3, 'TagWikiExcerpt' = 4, 'TagWiki' = 5, 'ModeratorNomination' = 6, 'WikiPlaceholder' = 7, 'PrivilegeWiki' = 8), + `AcceptedAnswerId` UInt32, + `CreationDate` DateTime, + `Score` Int32, + `ViewCount` UInt32, + `Body` String, + `OwnerUserId` Int32, + `OwnerDisplayName` String, + `LastEditorUserId` Int32, + `LastEditorDisplayName` String, + `LastEditDate` DateTime, + `LastActivityDate` DateTime, + `Title` String, + `Tags` String, + `AnswerCount` UInt16, + `CommentCount` UInt8, + `FavoriteCount` UInt8, + `ContentLicense` LowCardinality(String), + `ParentId` String, + `CommunityOwnedDate` DateTime, + `ClosedDate` DateTime +) +ENGINE = MergeTree +ORDER BY tuple() +COMMENT 'Optimized types' +``` + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€GCSã‹ã‚‰ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’[`INSERT INTO SELECT`](/ja/sql-reference/statements/insert-into)を使ã£ã¦ç°¡å˜ã«æŠ•å…¥ã§ãã¾ã™ã€‚ClickHouse Cloud上ã§ã¯ã€`gcs`互æ›ã®[s3Clusterテーブル関数](/ja/sql-reference/table-functions/s3Cluster)を使ã£ã¦ã€è¤‡æ•°ãƒŽãƒ¼ãƒ‰çµŒç”±ã§ã®ãƒ­ãƒ¼ãƒ‰ã‚’並列化ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼š + +```sql +INSERT INTO stackoverflow.posts SELECT * FROM gcs( 'gs://clickhouse-public-datasets/stackoverflow/parquet/posts/*.parquet', NOSIGN); +``` + +æ–°ã—ã„スキーマã«nullã¯ä¿æŒã•ã‚Œã¦ã„ã¾ã›ã‚“。上記ã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã¯ã€ã“れらをãã‚Œãžã‚Œã®ã‚¿ã‚¤ãƒ—ã«å¯¾ã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«è‡ªå‹•çš„ã«å¤‰æ›ã—ã¾ã™- æ•´æ•°ã®å ´åˆã¯0ã€æ–‡å­—列ã®å ´åˆã¯ç©ºã®å€¤ã§ã™ã€‚ClickHouseã¯ã€æ•°å€¤ã‚’自動的ã«å¯¾è±¡ç²¾åº¦ã«å¤‰æ›ã—ã¾ã™ã€‚ + +## ClickHouseã®ä¸»ã‚­ãƒ¼ã¯ã©ã®ã‚ˆã†ã«ç•°ãªã‚‹ã®ã‹ï¼Ÿ + +[ã“ã¡ã‚‰](/ja/migrations/bigquery)ã§èª¬æ˜Žã•ã‚Œã¦ã„るよã†ã«ã€BigQueryã¨åŒæ§˜ã«ã€ClickHouseã¯ãƒ†ãƒ¼ãƒ–ルã®ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ å€¤ã®ä¸€æ„性を強制ã—ã¾ã›ã‚“。 + +BigQueryã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒªãƒ³ã‚°ã¨ä¼¼ã¦ã„ã¦ã€ClickHouseテーブルã®ãƒ‡ãƒ¼ã‚¿ã¯ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã«ã‚ˆã‚Šãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“ã®ã‚½ãƒ¼ãƒˆé †åºã¯ã€ã‚¯ã‚¨ãƒªã‚ªãƒ—ティマイザã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆã‚’回é¿ã—ã€çµåˆã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨ã‚’最å°åŒ–ã—ã€ãƒªãƒŸãƒƒãƒˆå¥ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ +BigQueryã¨ã¯å¯¾ç…§çš„ã«ã€ClickHouseã¯ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ å€¤ã«åŸºã¥ã„ã¦[(スパースãªï¼‰ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹](/ja/optimize/sparse-primary-indexes)を自動的ã«ä½œæˆã—ã¾ã™ã€‚ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ä¸Šã§ãƒ•ã‚£ãƒ«ã‚¿ãŒã‚ã‚‹ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‚’高速化ã™ã‚‹ãŸã‚ã«åˆ©ç”¨ã•ã‚Œã¾ã™ã€‚具体的ã«ã¯ï¼š + +- メモリã¨ãƒ‡ã‚£ã‚¹ã‚¯ã®åŠ¹çŽ‡æ€§ã¯ã€ClickHouseãŒã—ã°ã—ã°ä½¿ç”¨ã•ã‚Œã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ã®é‡è¦ãªè¦ç´ ã§ã™ã€‚データã¯éƒ¨åˆ†ã¨å‘¼ã°ã‚Œã‚‹ãƒãƒ£ãƒ³ã‚¯ã«åˆ†ã‹ã‚Œã¦ClickHouseテーブルã«æ›¸ãè¾¼ã¾ã‚Œã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§çµåˆã®ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ClickHouseã§ã¯ã€å„部分ã¯è‡ªåˆ†è‡ªèº«ã®ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’æŒã¡ã¾ã™ã€‚部分ãŒçµåˆã•ã‚Œã‚‹ã¨ãã€çµåˆã—ãŸéƒ¨åˆ†ã®ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚‚çµåˆã•ã‚Œã¾ã™ã€‚ã“れらã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯å„è¡Œã”ã¨ã«æ§‹ç¯‰ã•ã‚Œã¦ã„ã¾ã›ã‚“。代ã‚ã‚Šã«ã€éƒ¨åˆ†ã®ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—ã”ã¨ã«1ã¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¨ãƒ³ãƒˆãƒªã‚’æŒã¡ã¾ã™- ã“ã‚Œã¯ã‚¹ãƒ‘ースインデキシングã¨å‘¼ã°ã‚Œã‚‹æŠ€è¡“ã§ã™ã€‚ +- スパースインデキシングã¯ã€ClickHouseãŒæŒ‡å®šã•ã‚ŒãŸã‚­ãƒ¼ã«ã‚ˆã£ã¦ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®éƒ¨åˆ†ã‚’並ã¹ã¦ä¿å­˜ã™ã‚‹ãŸã‚å¯èƒ½ã§ã™ã€‚å˜ä¸€è¡Œã‚’直接特定ã™ã‚‹ï¼ˆB-Treeベースã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã‚ˆã†ã«ï¼‰ã®ã§ã¯ãªãã€ã‚¹ãƒ‘ース主インデックスã¯ã‚¯ã‚¨ãƒªã«ä¸€è‡´ã™ã‚‹å¯èƒ½æ€§ã®ã‚ã‚‹è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’ã™ã°ã‚„ããƒã‚¤ãƒŠãƒªæ¤œç´¢ã«ã‚ˆã£ã¦ç‰¹å®šã—ã¾ã™ã€‚一致ã™ã‚‹å¯èƒ½æ€§ã®ã‚ã‚‹è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—ã¯ä¸¦åˆ—ã§ClickHouseエンジンã«ã‚¹ãƒˆãƒªãƒ¼ãƒ ã•ã‚Œã€ãƒžãƒƒãƒã‚’見ã¤ã‘ã¾ã™ã€‚ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹è¨­è¨ˆã«ã‚ˆã‚Šã€ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒå°ã•ã(主メモリã«å®Œå…¨ã«åŽã¾ã‚‹ï¼‰ãªã‚Šã¤ã¤ã€ç‰¹ã«ãƒ‡ãƒ¼ã‚¿åˆ†æžã®ä½¿ç”¨ä¾‹ã§å…¸åž‹çš„ãªç¯„囲クエリã®å®Ÿè¡Œæ™‚間を大幅ã«çŸ­ç¸®ã—ã¾ã™ã€‚詳ã—ã„情報ã«ã¤ã„ã¦ã¯ã€[ã“ã®è©³ç´°ã‚¬ã‚¤ãƒ‰](/ja/optimize/sparse-primary-indexes)ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +
    + +NEEDS ALT + +
    + +é¸æŠžã•ã‚ŒãŸClickHouseã®ä¸»ã‚­ãƒ¼ã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã ã‘ã§ãªãã€ãƒ‡ãƒ¼ã‚¿ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®æ›¸ãè¾¼ã¿é †åºã‚‚決定ã—ã¾ã™ã€‚ã“ã®ãŸã‚ã€ã“ã‚Œã¯åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã«å¤§ããªå½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãã—ã¦ã€ãã‚Œã¯ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã¯æŒ‡å®šã•ã‚ŒãŸé †åºã‚­ãƒ¼ã®å€¤ã«åŸºã¥ã„ã¦ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚例ãˆã°`CreationDate`ãŒã‚­ãƒ¼ã¨ã—ã¦ä½¿ã‚れる場åˆã€ã™ã¹ã¦ã®ä»–ã®ã‚«ãƒ©ãƒ ã®å€¤ã®é †åºã¯`CreationDate`カラムã®å€¤ã®é †åºã«å¯¾å¿œã—ã¾ã™ã€‚複数ã®é †åºã‚­ãƒ¼ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ - ã“ã‚Œã¯`SELECT`クエリã®`ORDER BY`å¥ã¨åŒã˜ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã§é †åºä»˜ã‘ã•ã‚Œã¾ã™ã€‚ + +### é †åºã‚­ãƒ¼ã®é¸æŠž + +é †åºã‚­ãƒ¼ã®é¸æŠžã«ãŠã‘る考慮事項ã¨ã‚¹ãƒ†ãƒƒãƒ—ã«ã¤ã„ã¦ã€ä¾‹ã¨ã—ã¦postsテーブルを使用ã—ãŸå ´åˆã¯[ã“ã¡ã‚‰](/ja/data-modeling/schema-design#choosing-an-ordering-key)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## データモデリング技術 + +BigQueryã‹ã‚‰ç§»è¡Œã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯ã€[ClickHouseã§ã®ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã‚¬ã‚¤ãƒ‰](/ja/data-modeling/schema-design)を読むã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã¯åŒã˜Stack Overflowデータセットを使用ã—ã€ClickHouseã®æ©Ÿèƒ½ã‚’使用ã—ãŸè¤‡æ•°ã®ã‚¢ãƒ—ローãƒã‚’探りã¾ã™ã€‚ + +### パーティション + +BigQueryã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ãƒ†ãƒ¼ãƒ–ルをå°ã•ã管ç†ã—ã‚„ã™ã„パーツ(パーティション)ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã§ã€å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‘フォーマンスã¨ç®¡ç†ã‚’å‘上ã•ã›ã‚‹æ–¹æ³•ã§ã‚るテーブルパーティションã®æ¦‚念ã«è¦ªã—ã‚“ã§ã„ã‚‹ã§ã—ょã†ã€‚ã“ã®ãƒ‘ーティションã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®ç¯„囲(例:日付)ã€å®šç¾©ã•ã‚ŒãŸãƒªã‚¹ãƒˆã€ã¾ãŸã¯ã‚­ãƒ¼ã«åŸºã¥ããƒãƒƒã‚·ãƒ¥ã«ã‚ˆã£ã¦é”æˆã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ç®¡ç†è€…ã¯ç‰¹å®šã®åŸºæº–(例:日付範囲や地ç†çš„ãªä½ç½®ï¼‰ã«åŸºã¥ã„ã¦ãƒ‡ãƒ¼ã‚¿ã‚’æ•´ç†ã§ãã¾ã™ã€‚ + +パーティション化ã¯ã€ãƒ‘ーティションプルーニングを通ã˜ã¦è¿…速ãªãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã¨åŠ¹çŽ‡çš„ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä½œæˆã‚’実ç¾ã—ã€ã‚¯ã‚¨ãƒªæ€§èƒ½ã‚’å‘上ã•ã›ã¾ã™ã€‚ã¾ãŸã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—やデータ削除ãªã©ã®ä¿å®ˆã‚¿ã‚¹ã‚¯ã‚’個別ã®ãƒ‘ーティション上ã§å®Ÿè¡Œã§ãるよã†ã«ã—ã€ãƒ†ãƒ¼ãƒ–ル全体ã«å¯¾ã—ã¦æ“作ã›ãšã«æ¸ˆã‚€ã‚ˆã†ã«ã—ã¾ã™ã€‚ãã‚Œã«ã‚ˆã‚Šã€ãƒ‘ーティション化ã¯è¤‡æ•°ã®ãƒ‘ーティション間ã§è² è·ã‚’分散ã™ã‚‹ã“ã¨ã§ã€BigQueryデータベースã®ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティを大幅ã«å‘上ã•ã›ã¾ã™ã€‚ + +ClickHouseã§ã¯ã€ãƒ‘ーティション化ã¯æœ€åˆã«è¡¨ã‚’定義ã™ã‚‹éš›ã«[`PARTITION BY`](/ja/engines/table-engines/mergetree-family/custom-partitioning-key)å¥ã«ã‚ˆã£ã¦æŒ‡å®šã•ã‚Œã¾ã™ã€‚ã“ã®å¥ã¯ã€ä»»æ„ã®ã‚«ãƒ©ãƒ ã®SQLå¼ã‚’å«ã‚€ã“ã¨ãŒã§ãã€ã“ã®çµæžœã«ã‚ˆã£ã¦è¡ŒãŒã©ã®ãƒ‘ーティションã«é€ã‚‰ã‚Œã‚‹ã‹ãŒå®šç¾©ã•ã‚Œã¾ã™ã€‚ + +
    + +NEEDS ALT + +
    + +データパーツã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§å„パーティションã«è«–ç†çš„ã«é–¢é€£ä»˜ãã€å˜ç‹¬ã§ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ã€[`toYear(CreationDate)`](/ja/sql-reference/functions/date-time-functions#toyear)を使用ã—ã¦å¹´ã”ã¨ã«æŠ•ç¨¿ãƒ†ãƒ¼ãƒ–ルをパーティション化ã—ã¦ã„ã¾ã™ã€‚è¡ŒãŒClickHouseã«æŒ¿å…¥ã•ã‚Œã‚‹ã¨ãã€ã“ã®å¼ã¯å„è¡Œã«å¯¾ã—ã¦è©•ä¾¡ã•ã‚Œã€ã‚¯ã‚¨ãƒªä¸­ã«çµæžœãƒ‘ーティションã«ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +```sql +CREATE TABLE posts +( + `Id` Int32 CODEC(Delta(4), ZSTD(1)), + `PostTypeId` Enum8('Question' = 1, 'Answer' = 2, 'Wiki' = 3, 'TagWikiExcerpt' = 4, 'TagWiki' = 5, 'ModeratorNomination' = 6, 'WikiPlaceholder' = 7, 'PrivilegeWiki' = 8), + `AcceptedAnswerId` UInt32, + `CreationDate` DateTime64(3, 'UTC'), +... + `ClosedDate` DateTime64(3, 'UTC') +) +ENGINE = MergeTree +ORDER BY (PostTypeId, toDate(CreationDate), CreationDate) +PARTITION BY toYear(CreationDate) +``` + +#### アプリケーション + +ClickHouseã®ãƒ‘ーティション化ã¯ã€BigQueryã«ãŠã‘ã‚‹åŒæ§˜ã®ã‚¢ãƒ—リケーションをæŒã£ã¦ã„ã¾ã™ãŒã€ã„ãã¤ã‹ã®å¾®å¦™ãªé•ã„ãŒã‚ã‚Šã¾ã™ã€‚具体的ã«ã¯ï¼š + +- **データ管ç†** - ClickHouseã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä¸»ã«ãƒ‘ーティションをデータ管ç†æ©Ÿèƒ½ã¨è¦‹ãªã™ã¹ãã§ã™ã€‚データを特定ã®ã‚­ãƒ¼ã«åŸºã¥ã„ã¦è«–ç†çš„ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã§ã€å„パーティションã«å€‹åˆ¥ã«æ“作を加ãˆã‚‰ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ‘ーティションを権利ã«ã‚ˆã‚Šè¿…速ã«ç§»å‹•ã—ãŸã‚Šã€[ストレージティアã«ãƒ‡ãƒ¼ã‚¿ã‚’å‹•ã‹ã—ãŸã‚Š](/ja/integrations/s3#storage-tiers)ã™ã‚‹ãªã©ã®åŠ¹çŽ‡çš„ãªæ“作ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚例ã¨ã—ã¦ã€å¤ã„ãƒã‚¹ãƒˆã‚’削除ã™ã‚‹å ´åˆï¼š + +```sql +SELECT DISTINCT partition +FROM system.parts +WHERE `table` = 'posts' + +┌─partition─┠+│ 2008 │ +│ 2009 │ +│ 2010 │ +│ 2011 │ +│ 2012 │ +│ 2013 │ +│ 2014 │ +│ 2015 │ +│ 2016 │ +│ 2017 │ +│ 2018 │ +│ 2019 │ +│ 2020 │ +│ 2021 │ +│ 2022 │ +│ 2023 │ +│ 2024 │ +└───────────┘ + +17 rows in set. Elapsed: 0.002 sec. + + ALTER TABLE posts + (DROP PARTITION '2008') + +Ok. + +0 rows in set. Elapsed: 0.103 sec. +``` + +- **クエリ最é©åŒ–** - パーティションã¯ã‚¯ã‚¨ãƒªæ€§èƒ½ã«å½¹ç«‹ã¤å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ã“ã‚ŒãŒã©ã®ç¨‹åº¦ã®åˆ©ç‚¹ã‚’ã‚‚ãŸã‚‰ã™ã‹ã¯ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã«å¤§ããä¾å­˜ã—ã¾ã™ã€‚クエリãŒå°‘æ•°ã®ãƒ‘ーティション(ç†æƒ³çš„ã«ã¯ã²ã¨ã¤ï¼‰ã«é™å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ‘フォーマンスãŒå‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€é€šå¸¸ã€ä¸»ã‚­ãƒ¼ã«ãªã„パーティションキーã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹å ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚ã—ã‹ã—ã€å¤šãã®ãƒ‘ーティションをカãƒãƒ¼ã™ã‚‹ã‚¯ã‚¨ãƒªã¯ã€ãƒ‘ーティションãŒä½¿ç”¨ã•ã‚Œãªã„å ´åˆã‚ˆã‚Šã‚‚クエリ性能ãŒä½Žä¸‹ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼ˆãƒ‘ーティションã«ã‚ˆã£ã¦å¯èƒ½ãªéƒ¨åˆ†ãŒå¢—加ã™ã‚‹ãŸã‚)。パーティションを利用ã—ã¦`GROUP BY`クエリを最é©åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ã“ã‚Œã¯å„パーティション内ã®å€¤ãŒãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ã‚ã‚‹å ´åˆã®ã¿åŠ¹æžœçš„ã§ã™ã€‚ã—ã‹ã—ã€ä¸€èˆ¬çš„ã«ã¯ä¸»ã‚­ãƒ¼ãŒæœ€é©åŒ–ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã€ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンãŒç‰¹å®šã®äºˆæ¸¬å¯èƒ½ãªã‚µãƒ–セットã«çµžã‚‰ã‚Œã¦ã„る特別ãªå ´åˆã«ã®ã¿ã‚¯ã‚¨ãƒªæœ€é©åŒ–技法ã¨ã—ã¦ãƒ‘ーティション化を検討ã™ã¹ãã§ã™ã€ä¾‹ãˆã°æ—¥ä»˜ã§ãƒ‘ーティション化ã—ã€æœ€è¿‘ã®æ—¥ä»˜ã®ã‚¯ã‚¨ãƒªãŒå¤šã„å ´åˆã«æœ‰ç”¨ã§ã™ã€‚ + +#### 推奨事項 + +パーティション化ã¯ãƒ‡ãƒ¼ã‚¿ç®¡ç†æŠ€è¡“ã§ã‚ã‚‹ã¨è€ƒãˆã‚‹ã¹ãã§ã™ã€‚ã“ã‚Œã¯ã€æ™‚系列データã®æ“作時ã€ä¾‹ãˆã°æœ€ã‚‚å¤ã„パーティションを[å˜ã«å‰Šé™¤ã™ã‚‹](/ja/sql-reference/statements/alter/partition#alter_drop-partition)ã¨ã„ã£ãŸæ–¹æ³•ã§ã‚¯ãƒ©ã‚¹ã‚¿ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«ç†æƒ³çš„ã§ã™ã€‚ + +é‡è¦ï¼šãƒ‘ーティションキーã®å¼ãŒé«˜ã„カーディナリティã®ã‚»ãƒƒãƒˆã‚’生æˆã—ãªã„よã†ã«ã—ã¦ãã ã•ã„ã€ã™ãªã‚ã¡100以上ã®ãƒ‘ーティションã®ä½œæˆã¯é¿ã‘ã‚‹ã¹ãã§ã™ã€‚例ãˆã°ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè­˜åˆ¥å­ã‚„åå‰ã¨ã„ã£ãŸé«˜ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã‚«ãƒ©ãƒ ã§ãƒ‡ãƒ¼ã‚¿ã‚’パーティション化ã—ãªã„ã§ãã ã•ã„。代ã‚ã‚Šã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè­˜åˆ¥å­ã‚„åå‰ã‚’`ORDER BY`å¼ã®æœ€åˆã®ã‚«ãƒ©ãƒ ã«ã—ã¾ã™ã€‚ + +> 内部的ã«ã€ClickHouseã¯æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®[部分を作æˆ](/ja/optimize/sparse-primary-indexes#clickhouse-index-design)ã—ã¾ã™ã€‚より多ãã®ãƒ‡ãƒ¼ã‚¿ãŒæŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€éƒ¨åˆ†ã®æ•°ãŒå¢—加ã—ã¾ã™ã€‚部分ã®æ•°ãŒæŒ‡å®šã•ã‚ŒãŸåˆ¶é™ã‚’超ãˆãŸå ´åˆã€ClickHouseã¯["too many parts"エラー](/docs/knowledgebase/exception-too-many-parts)ã¨ã—ã¦è¨­å®šã•ã‚ŒãŸãƒ«ãƒ¼ãƒ«ã«å¾“ã£ã¦æŒ¿å…¥æ™‚ã«ä¾‹å¤–を投ã’ã¾ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã®æ“作下ã§ã¯ç™ºç”Ÿã—ã¾ã›ã‚“。ClickHouseãŒä¸é©åˆ‡ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã‚„é–“é•ã£ã¦ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆï¼ˆä¾‹ï¼šå¤šãã®å°ã•ã„挿入)ã ã‘ã§ã™ã€‚部分ã¯ãƒ‘ーティションã”ã¨ã«åˆ†é›¢ã—ã¦ä½œæˆã•ã‚Œã‚‹ãŸã‚ã€ãƒ‘ーティション数を増やã™ã“ã¨ã¯éƒ¨åˆ†ã®æ•°ã‚‚増加ã•ã›ã¾ã™ã€‚高カーディナリティã®ãƒ‘ーティションキーã¯ã“ã®ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚‹ã®ã§é¿ã‘ã‚‹ã¹ãã§ã™ã€‚ + +## Materialized Viewã¨Projectionã®é•ã„ + +ClickHouseã®ãƒ—ロジェクションã®æ¦‚念ã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ†ãƒ¼ãƒ–ルã®è¤‡æ•°ã®`ORDER BY`å¥ã‚’指定ã§ãã¾ã™ã€‚ + +[ClickHouseã®ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒªãƒ³ã‚°](/ja/data-modeling/schema-design)ã§ã¯ã€ClickHouseã«ãŠã„ã¦é›†è¨ˆã‚’事å‰è¨ˆç®—ã™ã‚‹ãŸã‚ã«Materialized Viewを使用ã—ã€è¡Œã‚’変æ›ã—ã€ç•°ãªã‚‹ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã®ã‚¯ã‚¨ãƒªã‚’最é©åŒ–ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦æŽ¢ã‚Šã¾ã™ã€‚後者ã«ã¤ã„ã¦ã¯ã€Materialized ViewãŒè¡Œã‚’ç•°ãªã‚‹é †åºã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«é€ä¿¡ã™ã‚‹å ´åˆã®[例をæä¾›ã—ã¾ã—ãŸ](/ja/materialized-view#lookup-table)。 + +例ãˆã°ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’考ãˆã¦ã¿ã¦ãã ã•ã„: + +```sql +SELECT avg(Score) +FROM comments +WHERE UserId = 8592047 + + ┌──────────avg(Score)─┠+ │ 0.18181818181818182 │ + └────────────────────┘ + +1 row in set. Elapsed: 0.040 sec. Processed 90.38 million rows, 361.59 MB (2.25 billion rows/s., 9.01 GB/s.) +Peak memory usage: 201.93 MiB. +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯`UserId`ãŒé †åºã‚­ãƒ¼ã§ã¯ãªã„ãŸã‚ã€ã™ã¹ã¦ã®90m行をスキャンã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以å‰ã¯ã€ãƒªãƒƒãƒã‚¢ãƒƒãƒ—用ã®Materialized Viewを使ã£ã¦`PostId`ã®LOOKUPã‚’æä¾›ã—ã¾ã—ãŸã€‚プロジェクションを用ã„ã¦ã‚‚åŒã˜å•é¡Œã‚’解決ã§ãã¾ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯`ORDER BY user_id`ã®ãƒ—ロジェクションを追加ã—ã¾ã™ã€‚ + +```sql +ALTER TABLE comments ADD PROJECTION comments_user_id ( +SELECT * ORDER BY UserId +) + +ALTER TABLE comments MATERIALIZE PROJECTION comments_user_id +``` + +最åˆã«ãƒ—ロジェクションを作æˆã—ã€ãã®å¾Œã«ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ã“ã®å¾Œè€…ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ‡ãƒ¼ã‚¿ã‚’2回異ãªã‚‹é †åºã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•ã›ã¾ã™ã€‚プロジェクションã¯ã€ä»¥ä¸‹ã«ç¤ºã™ã‚ˆã†ã«ãƒ‡ãƒ¼ã‚¿ãŒä½œæˆã•ã‚Œã‚‹ã¨ãã«å®šç¾©ã™ã‚‹ã“ã¨ã‚‚ã§ãã€æŒ¿å…¥ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã«å¿œã˜ã¦è‡ªå‹•çš„ã«ä¿å®ˆã•ã‚Œã¾ã™ã€‚ + +```sql +CREATE TABLE comments +( + `Id` UInt32, + `PostId` UInt32, + `Score` UInt16, + `Text` String, + `CreationDate` DateTime64(3, 'UTC'), + `UserId` Int32, + `UserDisplayName` LowCardinality(String), + PROJECTION comments_user_id + ( + SELECT * + ORDER BY UserId + ) +) +ENGINE = MergeTree +ORDER BY PostId +``` + +プロジェクションãŒ`ALTER`コマンドを介ã—ã¦ä½œæˆã•ã‚Œã‚‹å ´åˆã€`MATERIALIZE PROJECTION`コマンドãŒç™ºè¡Œã•ã‚ŒãŸã¨ãã«ä½œæˆã¯éžåŒæœŸã§ã™ã€‚ユーザーã¯æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’使ã£ã¦ã“ã®æ“作ã®é€²æ—を確èªã—ã€`is_done=1`ã‚’å¾…ã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +SELECT + parts_to_do, + is_done, + latest_fail_reason +FROM system.mutations +WHERE (`table` = 'comments') AND (command LIKE '%MATERIALIZE%') + + ┌─parts_to_do─┬─is_done─┬─latest_fail_reason─┠+1. │ 1 │ 0 │ │ + └─────────────┴─────────┴────────────────────┘ + +1 row in set. Elapsed: 0.003 sec. +``` + +ã“ã®ã‚¯ã‚¨ãƒªã‚’ç¹°ã‚Šè¿”ã™ã¨ã€è¿½åŠ ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’使用ã™ã‚‹ä»£ã‚ã‚Šã«ãƒ‘フォーマンスãŒå¤§å¹…ã«å‘上ã—ã¦ã„ã‚‹ã“ã¨ãŒç¢ºèªã§ãã¾ã™ã€‚ + +```sql +SELECT avg(Score) +FROM comments +WHERE UserId = 8592047 + + ┌──────────avg(Score)─┠+1. │ 0.18181818181818182 │ + └────────────────────┘ + +1 row in set. Elapsed: 0.008 sec. Processed 16.36 thousand rows, 98.17 KB (2.15 million rows/s., 12.92 MB/s.) +Peak memory usage: 4.06 MiB. +``` + +[`EXPLAIN`コマンド](/ja/sql-reference/statements/explain)を使用ã—ã¦ã€ã“ã®ã‚¯ã‚¨ãƒªã«ãƒ—ロジェクションãŒä½¿ç”¨ã•ã‚ŒãŸã“ã¨ã‚’確èªã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```sql +EXPLAIN indexes = 1 +SELECT avg(Score) +FROM comments +WHERE UserId = 8592047 + + ┌─explain─────────────────────────────────────────────┠+ 1. │ Expression ((Projection + Before ORDER BY)) │ + 2. │ Aggregating │ + 3. │ Filter │ + 4. │ ReadFromMergeTree (comments_user_id) │ + 5. │ Indexes: │ + 6. │ PrimaryKey │ + 7. │ Keys: │ + 8. │ UserId │ + 9. │ Condition: (UserId in [8592047, 8592047]) │ +10. │ Parts: 2/2 │ +11. │ Granules: 2/11360 │ + └─────────────────────────────────────────────────────┘ + +11 rows in set. Elapsed: 0.004 sec. +``` + +### プロジェクションã®ä½¿ç”¨æ™‚期 + +プロジェクションã¯è‡ªå‹•çš„ã«ä¿å®ˆã•ã‚Œã‚‹ãŸã‚ã€æ–°ã—ã„ユーザーã«ã¯é­…力的ã§ã™ã€‚ã•ã‚‰ã«ã€ä¸€ã¤ã®ãƒ†ãƒ¼ãƒ–ルã«å˜ã«ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã—ã€ãƒ—ロジェクションã«ã‚ˆã£ã¦å¯èƒ½ãªå ´åˆã«å¿œã˜ã¦å¿œç­”時間を短縮ã§ãã¾ã™ã€‚ + +
    + +NEEDS ALT + +
    + +ã“ã‚Œã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒé©åˆ‡ãªæœ€é©åŒ–済ターゲットテーブルをé¸ã¶ã‹ã€ãƒ•ã‚£ãƒ«ã‚¿ã«å¿œã˜ã¦ã‚¯ã‚¨ãƒªã‚’書ãæ›ãˆã‚‹å¿…è¦ãŒã‚ã‚‹Materialized Viewã¨ã¯å¯¾ç…§çš„ã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ãƒ—リケーションã«ã‚ˆã‚Šå¤§ããªé‡ç‚¹ãŒç½®ã‹ã‚Œã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã®è¤‡é›‘ã•ãŒå¢—ã—ã¾ã™ã€‚ + +ã“れらã®åˆ©ç‚¹ã«ã‚‚ã‹ã‹ã‚らãšã€ãƒ—ロジェクションã«ã¯ã„ãã¤ã‹ã®åˆ¶ç´„ãŒã‚ã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã“れをèªè­˜ã—ã€æ…Žé‡ã«å±•é–‹ã™ã‚‹ã¹ãã§ã™ï¼š + +- プロジェクションã¯ã€å…ƒã®ãƒ†ãƒ¼ãƒ–ルã¨ç•°ãªã‚‹æœ‰åŠ¹æœŸé™ï¼ˆTTL)を使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。Materialized viewã§ç•°ãªã‚‹TTLを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- プロジェクションã¯ã€ï¼ˆã‚µãƒ¼ãƒ‰ãƒ†ãƒ¼ãƒ–ル)ã«ãŠã„ã¦ç¾åœ¨[`optimize_read_in_order`](https://clickhouse.com/blog/clickhouse-faster-queries-with-projections-and-primary-indexes)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。 +- プロジェクションをæŒã¤ãƒ†ãƒ¼ãƒ–ルã«ã¯è«–ç†æ›´æ–°ã‚„削除ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- Materialized viewã¯ãƒã‚§ãƒ¼ãƒ³å¯èƒ½ï¼šã‚ã‚‹Materialized viewã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルãŒåˆ¥ã®Materialized viewã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã«ãªã‚‹ã“ã¨ãŒã§ãã€ã•ã‚‰ã«ç¶šã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚プロジェクションã§ã¯ã“ã‚Œã¯ä¸å¯èƒ½ã§ã™ã€‚ +- プロジェクションã¯ã‚¸ãƒ§ã‚¤ãƒ³ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“ãŒã€Materialized viewã¯ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +- プロジェクションã¯ãƒ•ã‚£ãƒ«ã‚¿ï¼ˆ`WHERE`å¥ï¼‰ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“ãŒã€Materialized viewã¯ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +プロジェクションを使ã†ã“ã¨ã‚’ãŠå‹§ã‚ã™ã‚‹å ´åˆï¼š + +- データã®å®Œå…¨ãªä¸¦ã¹æ›¿ãˆãŒå¿…è¦ã§ã™ã€‚プロジェクション内ã®å¼ã¯ç†è«–çš„ã«ã¯`GROUP BY`を用ã„ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€Materialized viewã®æ–¹ãŒé›†è¨ˆã‚’ä¿å®ˆã™ã‚‹ã«ã¯ã‚ˆã‚ŠåŠ¹æžœçš„ã§ã™ã€‚クエリオプティマイザもå˜ç´”ãªä¸¦ã¹æ›¿ãˆã‚’使用ã™ã‚‹ãƒ—ロジェクションã®æ–¹ãŒ`SELECT * ORDER BY x`ã«ã‚ˆã‚‹ã‚‚ã®ã¨ã—ã¦åˆ©ç”¨ã—ã‚„ã™ããªã£ã¦ã„ã¾ã™ã€‚ユーザーã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ•ãƒƒãƒˆãƒ—リントを削減ã™ã‚‹ãŸã‚ã«ã€ã“ã®å¼ã§ä¸€éƒ¨ã®ã‚«ãƒ©ãƒ ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- データを2回書ã込むã“ã¨ã«ã‚ˆã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ•ãƒƒãƒˆãƒ—リントã®æ‹¡å¤§ã€ãŠã‚ˆã³ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã«æ…£ã‚Œã¦ã„る。挿入速度ã¸ã®å½±éŸ¿ã‚’テストã—ã€[ストレージオーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’評価](/ja/data-compression/compression-in-clickhouse)ã—ã¾ã™ã€‚ + +## BigQueryクエリã®ClickHouseã¸ã®æ›¸ãæ›ãˆ + +以下ã¯ã€BigQueryã¨ClickHouseを比較ã™ã‚‹ã‚¯ã‚¨ãƒªã®ä¾‹ã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®ãƒªã‚¹ãƒˆã¯ã€ClickHouseã®æ©Ÿèƒ½ã‚’利用ã—ã¦ã‚¯ã‚¨ãƒªã‚’大幅ã«ç°¡ç´ åŒ–ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚以下ã®ä¾‹ã¯ã€Stack Overflowデータセット(2024å¹´4月ã¾ã§ï¼‰ã‚’使用ã—ã¦ã„ã¾ã™ã€‚ + +**10個以上ã®è³ªå•ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§æœ€ã‚‚多ãビューを得ãŸã‚‚ã®ï¼š** + +_BigQuery_ + +NEEDS ALT + +
    + +_ClickHouse_ + +```sql +SELECT + OwnerDisplayName, + sum(ViewCount) AS total_views +FROM stackoverflow.posts +WHERE (PostTypeId = 'Question') AND (OwnerDisplayName != '') +GROUP BY OwnerDisplayName +HAVING count() > 10 +ORDER BY total_views DESC +LIMIT 5 + + ┌─OwnerDisplayName─┬─total_views─┠+1. │ Joan Venge │ 25520387 │ +2. │ Ray Vega │ 21576470 │ +3. │ anon │ 19814224 │ +4. │ Tim │ 19028260 │ +5. │ John │ 17638812 │ + └──────────────────┴─────────────┘ + +5 rows in set. Elapsed: 0.076 sec. Processed 24.35 million rows, 140.21 MB (320.82 million rows/s., 1.85 GB/s.) +Peak memory usage: 323.37 MiB. +``` + +**最も多ãã®ãƒ“ューをå—ã‘ãŸã‚¿ã‚°ï¼š** + +_BigQuery_ + +
    + +NEEDS ALT + +
    + +_ClickHouse_ + +```sql +-- ClickHouse +SELECT + arrayJoin(arrayFilter(t -> (t != ''), splitByChar('|', Tags))) AS tags, + sum(ViewCount) AS views +FROM stackoverflow.posts +GROUP BY tags +ORDER BY views DESC +LIMIT 5 + + + ┌─tags───────┬──────views─┠+1. │ javascript │ 8190916894 │ +2. │ python │ 8175132834 │ +3. │ java │ 7258379211 │ +4. │ c# │ 5476932513 │ +5. │ android │ 4258320338 │ + └────────────┴────────────┘ + +5 rows in set. Elapsed: 0.318 sec. Processed 59.82 million rows, 1.45 GB (188.01 million rows/s., 4.54 GB/s.) +Peak memory usage: 567.41 MiB. +``` + +## 集計関数 + +å¯èƒ½ãªé™ã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ClickHouseã®é›†è¨ˆé–¢æ•°ã‚’利用ã™ã¹ãã§ã™ã€‚以下ã§ã¯ã€å„å¹´ã§æœ€ã‚‚ビューã®å¤šã„質å•ã‚’計算ã™ã‚‹ãŸã‚ã«[`argMax`関数](/ja/sql-reference/aggregate-functions/reference/argmax)を使用ã™ã‚‹ä¾‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +_BigQuery_ + +
    + +NEEDS ALT + +
    + +NEEDS ALT + +
    + +_ClickHouse_ + +```sql +-- ClickHouse +SELECT + toYear(CreationDate) AS Year, + argMax(Title, ViewCount) AS MostViewedQuestionTitle, + max(ViewCount) AS MaxViewCount +FROM stackoverflow.posts +WHERE PostTypeId = 'Question' +GROUP BY Year +ORDER BY Year ASC +FORMAT Vertical + + +Row 1: +────── +Year: 2008 +MostViewedQuestionTitle: How to find the index for a given item in a list? +MaxViewCount: 6316987 + +Row 2: +────── +Year: 2009 +MostViewedQuestionTitle: How do I undo the most recent local commits in Git? +MaxViewCount: 13962748 + +… + +Row 16: +─────── +Year: 2023 +MostViewedQuestionTitle: How do I solve "error: externally-managed-environment" every time I use pip 3? +MaxViewCount: 506822 + +Row 17: +─────── +Year: 2024 +MostViewedQuestionTitle: Warning "Third-party cookie will be blocked. Learn more in the Issues tab" +MaxViewCount: 66975 + +17 rows in set. Elapsed: 0.225 sec. Processed 24.35 million rows, 1.86 GB (107.99 million rows/s., 8.26 GB/s.) +Peak memory usage: 377.26 MiB. +``` + +## æ¡ä»¶å¼ã¨é…列 + +æ¡ä»¶å¼ã¨é…列関数ã¯ã‚¯ã‚¨ãƒªã‚’大幅ã«ç°¡ç´ åŒ–ã—ã¾ã™ã€‚次ã®ã‚¯ã‚¨ãƒªã¯ã€2022å¹´ã‹ã‚‰2023å¹´ã«ã‹ã‘ã¦æœ€ã‚‚割åˆå¢—加ã—ãŸã‚¿ã‚°ï¼ˆ10000件以上ã®å‡ºç¾æ•°ãŒã‚ã‚‹ã‚‚ã®ï¼‰ã‚’計算ã—ã¾ã™ã€‚次ã®ClickHouseクエリã¯ã€æ¡ä»¶å¼ã€é…列関数ã€ãŠã‚ˆã³`HAVING`ã‚„`SELECT`å¥ã§ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹å†åˆ©ç”¨ã®èƒ½åŠ›ã«ã‚ˆã‚Šç°¡æ½”ã§ã™ã€‚ + +_BigQuery_ + +
    + +NEEDS ALT + +
    + +_ClickHouse_ + +```sql +SELECT + arrayJoin(arrayFilter(t -> (t != ''), splitByChar('|', Tags))) AS tag, + countIf(toYear(CreationDate) = 2023) AS count_2023, + countIf(toYear(CreationDate) = 2022) AS count_2022, + ((count_2023 - count_2022) / count_2022) * 100 AS percent_change +FROM stackoverflow.posts +WHERE toYear(CreationDate) IN (2022, 2023) +GROUP BY tag +HAVING (count_2022 > 10000) AND (count_2023 > 10000) +ORDER BY percent_change DESC +LIMIT 5 + +┌─tag─────────┬─count_2023─┬─count_2022─┬──────percent_change─┠+│ next.js │ 13788 │ 10520 │ 31.06463878326996 │ +│ spring-boot │ 16573 │ 17721 │ -6.478189718413183 │ +│ .net │ 11458 │ 12968 │ -11.644046884639112 │ +│ azure │ 11996 │ 14049 │ -14.613139725247349 │ +│ docker │ 13885 │ 16877 │ -17.72826924216389 │ +└─────────────┴────────────┴────────────┴─────────────────────┘ + +5 rows in set. Elapsed: 0.096 sec. Processed 5.08 million rows, 155.73 MB (53.10 million rows/s., 1.63 GB/s.) +Peak memory usage: 410.37 MiB. +``` + +ã“ã‚Œã§ã€BigQueryã‹ã‚‰ClickHouseã¸ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ç§»è¡Œç”¨ã®åŸºæœ¬ã‚¬ã‚¤ãƒ‰ãŒçµ‚了ã—ã¾ã™ã€‚BigQueryã‹ã‚‰ã®ç§»è¡Œã‚’è¡Œã†ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯ã€[ClickHouseã§ã®ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã‚¬ã‚¤ãƒ‰](/ja/data-modeling/schema-design)を読ã¿ã€é«˜åº¦ãªClickHouseã®æ©Ÿèƒ½ã‚’å­¦ã¶ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ +``` diff --git a/docs/ja/migrations/images/bigquery-1.png b/docs/ja/migrations/images/bigquery-1.png new file mode 100644 index 00000000000..413f5edfce5 Binary files /dev/null and b/docs/ja/migrations/images/bigquery-1.png differ diff --git a/docs/ja/migrations/images/bigquery-10.png b/docs/ja/migrations/images/bigquery-10.png new file mode 100644 index 00000000000..250ba4635f6 Binary files /dev/null and b/docs/ja/migrations/images/bigquery-10.png differ diff --git a/docs/ja/migrations/images/bigquery-11.png b/docs/ja/migrations/images/bigquery-11.png new file mode 100644 index 00000000000..aa09b54513e Binary files /dev/null and b/docs/ja/migrations/images/bigquery-11.png differ diff --git a/docs/ja/migrations/images/bigquery-12.png b/docs/ja/migrations/images/bigquery-12.png new file mode 100644 index 00000000000..c57f50b6413 Binary files /dev/null and b/docs/ja/migrations/images/bigquery-12.png differ diff --git a/docs/ja/migrations/images/bigquery-2.png b/docs/ja/migrations/images/bigquery-2.png new file mode 100644 index 00000000000..a1613c3268f Binary files /dev/null and b/docs/ja/migrations/images/bigquery-2.png differ diff --git a/docs/ja/migrations/images/bigquery-3.png b/docs/ja/migrations/images/bigquery-3.png new file mode 100644 index 00000000000..6547a43d4cc Binary files /dev/null and b/docs/ja/migrations/images/bigquery-3.png differ diff --git a/docs/ja/migrations/images/bigquery-4.png b/docs/ja/migrations/images/bigquery-4.png new file mode 100644 index 00000000000..53d05579c52 Binary files /dev/null and b/docs/ja/migrations/images/bigquery-4.png differ diff --git a/docs/ja/migrations/images/bigquery-5.png b/docs/ja/migrations/images/bigquery-5.png new file mode 100644 index 00000000000..381771653df Binary files /dev/null and b/docs/ja/migrations/images/bigquery-5.png differ diff --git a/docs/ja/migrations/images/bigquery-6.png b/docs/ja/migrations/images/bigquery-6.png new file mode 100644 index 00000000000..4af18b8994e Binary files /dev/null and b/docs/ja/migrations/images/bigquery-6.png differ diff --git a/docs/ja/migrations/images/bigquery-7.png b/docs/ja/migrations/images/bigquery-7.png new file mode 100644 index 00000000000..b7b710beb24 Binary files /dev/null and b/docs/ja/migrations/images/bigquery-7.png differ diff --git a/docs/ja/migrations/images/bigquery-8.png b/docs/ja/migrations/images/bigquery-8.png new file mode 100644 index 00000000000..1411c2f771a Binary files /dev/null and b/docs/ja/migrations/images/bigquery-8.png differ diff --git a/docs/ja/migrations/images/bigquery-9.png b/docs/ja/migrations/images/bigquery-9.png new file mode 100644 index 00000000000..4d3a686bb58 Binary files /dev/null and b/docs/ja/migrations/images/bigquery-9.png differ diff --git a/docs/ja/migrations/images/migrate_snowflake_clickhouse.png b/docs/ja/migrations/images/migrate_snowflake_clickhouse.png new file mode 100644 index 00000000000..9367121610a Binary files /dev/null and b/docs/ja/migrations/images/migrate_snowflake_clickhouse.png differ diff --git a/docs/ja/migrations/images/postgres-b-tree.png b/docs/ja/migrations/images/postgres-b-tree.png new file mode 100644 index 00000000000..9198fc18489 Binary files /dev/null and b/docs/ja/migrations/images/postgres-b-tree.png differ diff --git a/docs/ja/migrations/images/postgres-partitions.png b/docs/ja/migrations/images/postgres-partitions.png new file mode 100644 index 00000000000..4af18b8994e Binary files /dev/null and b/docs/ja/migrations/images/postgres-partitions.png differ diff --git a/docs/ja/migrations/images/postgres-projections.png b/docs/ja/migrations/images/postgres-projections.png new file mode 100644 index 00000000000..b7b710beb24 Binary files /dev/null and b/docs/ja/migrations/images/postgres-projections.png differ diff --git a/docs/ja/migrations/images/postgres-replacingmergetree.png b/docs/ja/migrations/images/postgres-replacingmergetree.png new file mode 100644 index 00000000000..4c72c61a71d Binary files /dev/null and b/docs/ja/migrations/images/postgres-replacingmergetree.png differ diff --git a/docs/ja/migrations/images/postgres-sparse-index.png b/docs/ja/migrations/images/postgres-sparse-index.png new file mode 100644 index 00000000000..381771653df Binary files /dev/null and b/docs/ja/migrations/images/postgres-sparse-index.png differ diff --git a/docs/ja/migrations/images/postgres-stackoverflow-schema.png b/docs/ja/migrations/images/postgres-stackoverflow-schema.png new file mode 100644 index 00000000000..6e3f7595a93 Binary files /dev/null and b/docs/ja/migrations/images/postgres-stackoverflow-schema.png differ diff --git a/docs/ja/migrations/postgres/data-modeling-techniques.md b/docs/ja/migrations/postgres/data-modeling-techniques.md new file mode 100644 index 00000000000..22743c4be38 --- /dev/null +++ b/docs/ja/migrations/postgres/data-modeling-techniques.md @@ -0,0 +1,238 @@ +--- +slug: /ja/migrations/postgresql/data-modeling-techniques +title: データモデリング手法 +description: PostgreSQLã‹ã‚‰ClickHouseã¸ã®ç§»è¡Œã®ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒªãƒ³ã‚° +keywords: [postgres, postgresql, migrate, migration, data modeling] +--- + +> ã“ã‚Œã¯ã€PostgreSQLã‹ã‚‰ClickHouseã¸ã®ç§»è¡Œã«é–¢ã™ã‚‹ã‚¬ã‚¤ãƒ‰ã®**パート3**ã§ã™ã€‚ã“ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã¯å…¥é–€çš„ãªã‚‚ã®ã§ã‚ã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒClickHouseã®ãƒ™ã‚¹ãƒˆãƒ—ラクティスã«æº–æ‹ ã—ãŸåˆæœŸã®æ©Ÿèƒ½çš„ãªã‚·ã‚¹ãƒ†ãƒ ã‚’展開ã™ã‚‹ã®ã‚’助ã‘ã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚複雑ãªãƒˆãƒ”ックをé¿ã‘ã€å®Œå…¨ã«æœ€é©åŒ–ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã«ã¯ãªã‚Šã¾ã›ã‚“ãŒã€æœ¬ç•ªã‚·ã‚¹ãƒ†ãƒ ã‚’構築ã—ã€å­¦ç¿’をベースã«ã™ã‚‹ãŸã‚ã®å …実ãªåŸºç›¤ã‚’æä¾›ã—ã¾ã™ã€‚ + +Postgresã‹ã‚‰ç§»è¡Œã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯ã€[ClickHouseã§ã®ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã«é–¢ã™ã‚‹ã‚¬ã‚¤ãƒ‰](/ja/data-modeling/schema-design)を読むã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€åŒã˜Stack Overflowデータセットを使用ã—ã€ClickHouseã®æ©Ÿèƒ½ã‚’使用ã—ãŸè¤‡æ•°ã®ã‚¢ãƒ—ローãƒã‚’探求ã—ã¾ã™ã€‚ + +## パーティション + +Postgresユーザーã¯ã€å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‘フォーマンスã¨ç®¡ç†æ€§ã‚’å‘上ã•ã›ã‚‹ãŸã‚ã«ã€ãƒ†ãƒ¼ãƒ–ルをよりå°ã•ã管ç†ã—ã‚„ã™ã„部分ã«åˆ†å‰²ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルパーティショニングã®æ¦‚念ã«æ…£ã‚Œã¦ã„ã¾ã™ã€‚パーティショニングã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ï¼ˆä¾‹ï¼šæ—¥ä»˜ï¼‰ã®ç¯„囲ã€å®šç¾©ã•ã‚ŒãŸãƒªã‚¹ãƒˆã€ã¾ãŸã¯ã‚­ãƒ¼ã®ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦é”æˆã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ç®¡ç†è€…ã¯æ—¥ä»˜ç¯„囲や地ç†çš„ãªä½ç½®ãªã©ã®ç‰¹å®šã®åŸºæº–ã«åŸºã¥ã„ã¦ãƒ‡ãƒ¼ã‚¿ã‚’æ•´ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚パーティショニングã¯ã€ãƒ‘ーティションプルーニングã«ã‚ˆã‚‹ã‚ˆã‚Šé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã¨ã‚ˆã‚ŠåŠ¹çŽ‡çš„ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹åŒ–ã‚’å¯èƒ½ã«ã™ã‚‹ã“ã¨ã§ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスをå‘上ã•ã›ã¾ã™ã€‚ã¾ãŸã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—やデータã®ãƒ‘ージã®ã‚ˆã†ãªä¿å®ˆä½œæ¥­ã‚’個々ã®ãƒ‘ーティションã§å®Ÿè¡Œã§ãるよã†ã«ã™ã‚‹ã“ã¨ã§åŠ¹çŽ‡ã‚’高ã‚ã¾ã™ã€‚ã•ã‚‰ã«ã€è¤‡æ•°ã®ãƒ‘ーティションã«è² è·ã‚’分散ã™ã‚‹ã“ã¨ã§ã€PostgreSQLデータベースã®ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティを大幅ã«å‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouseã§ã¯ã€ãƒ‘ーティショニングã¯ãƒ†ãƒ¼ãƒ–ルãŒæœ€åˆã«å®šç¾©ã•ã‚Œã‚‹éš›ã«`PARTITION BY`å¥ã‚’通ã˜ã¦æŒ‡å®šã•ã‚Œã¾ã™ã€‚ã“ã®å¥ã«ã¯ã€ä»»æ„ã®ã‚«ãƒ©ãƒ ã«å¯¾ã™ã‚‹SQLå¼ã‚’å«ã‚€ã“ã¨ãŒã§ãã€ãã®çµæžœãŒã©ã®ãƒ‘ーティションã«è¡Œã‚’é€ã‚‹ã‹ã‚’決定ã—ã¾ã™ã€‚ + +
    + +NEEDS ALT + +
    + +データパーツã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§å„パーティションã«è«–ç†çš„ã«é–¢é€£ä»˜ã‘られã€å€‹åˆ¥ã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ã€`posts`テーブルを`toYear(CreationDate)`ã¨ã„ã†å¼ã‚’使用ã—ã¦å¹´ã”ã¨ã«ãƒ‘ーティション分割ã—ã¾ã™ã€‚è¡ŒãŒClickHouseã«æŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€ã“ã®å¼ãŒå„è¡Œã«å¯¾ã—ã¦è©•ä¾¡ã•ã‚Œã€è©²å½“ã™ã‚‹ãƒ‘ーティションãŒå­˜åœ¨ã™ã‚‹å ´åˆã«ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã•ã‚Œã¾ã™ï¼ˆã‚‚ã—è¡ŒãŒãã®å¹´ã®æœ€åˆã®ã‚‚ã®ã§ã‚ã‚Œã°ã€ãƒ‘ーティションãŒä½œæˆã•ã‚Œã¾ã™ï¼‰ã€‚ + +```sql +CREATE TABLE posts +( + `Id` Int32 CODEC(Delta(4), ZSTD(1)), + `PostTypeId` Enum8('Question' = 1, 'Answer' = 2, 'Wiki' = 3, 'TagWikiExcerpt' = 4, 'TagWiki' = 5, 'ModeratorNomination' = 6, 'WikiPlaceholder' = 7, 'PrivilegeWiki' = 8), + `AcceptedAnswerId` UInt32, + `CreationDate` DateTime64(3, 'UTC'), +... + `ClosedDate` DateTime64(3, 'UTC') +) +ENGINE = MergeTree +ORDER BY (PostTypeId, toDate(CreationDate), CreationDate) +PARTITION BY toYear(CreationDate) +``` + +## パーティションã®åˆ©ç”¨æ³• + +ClickHouseã«ãŠã‘るパーティショニングã«ã¯ã€Postgresã¨åŒæ§˜ã®åˆ©ç”¨æ³•ãŒã‚ã‚Šã¾ã™ãŒã€ã„ãã¤ã‹å¾®å¦™ãªé•ã„ãŒã‚ã‚Šã¾ã™ã€‚具体的ã«ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +- **データ管ç†** - ClickHouseã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä¸»ã«ãƒ‘ーティショニングをデータ管ç†ã®æ©Ÿèƒ½ã¨è€ƒãˆã‚‹ã¹ãã§ã‚ã‚Šã€ã‚¯ã‚¨ãƒªã®æœ€é©åŒ–技術ã¨ã¯è€ƒãˆãªã„ã§ãã ã•ã„。キーã«åŸºã¥ã„ã¦ãƒ‡ãƒ¼ã‚¿ã‚’è«–ç†çš„ã«åˆ†é›¢ã™ã‚‹ã“ã¨ã§ã€ãã‚Œãžã‚Œã®ãƒ‘ーティションを独立ã—ã¦æ“作ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆä¾‹ï¼šå‰Šé™¤ï¼‰ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‘ーティションを移動ã•ã›ã‚‹ã“ã¨ãŒã§ãã‚‹ãŸã‚ã€æ™‚é–“ã«å¿œã˜ã¦åŠ¹çŽ‡çš„ã«[ストレージ階層間ã§](/ja/integrations/s3#storage-tiers)サブãƒãƒƒãƒˆã‚’移動ã•ã›ãŸã‚Šã€[データを期é™åˆ‡ã‚Œã«ã™ã‚‹/効率的ã«ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‹ã‚‰å‰Šé™¤ã™ã‚‹](/ja/sql-reference/statements/alter/partition)ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€ä»¥ä¸‹ã§ã¯2008å¹´ã®æŠ•ç¨¿ã‚’削除ã—ã¾ã™ã€‚ + +```sql +SELECT DISTINCT partition +FROM system.parts +WHERE `table` = 'posts' + +┌─partition─┠+│ 2008 │ +│ 2009 │ +│ 2010 │ +│ 2011 │ +│ 2012 │ +│ 2013 │ +│ 2014 │ +│ 2015 │ +│ 2016 │ +│ 2017 │ +│ 2018 │ +│ 2019 │ +│ 2020 │ +│ 2021 │ +│ 2022 │ +│ 2023 │ +│ 2024 │ +└───────────┘ + +17 rows in set. Elapsed: 0.002 sec. + + ALTER TABLE posts + (DROP PARTITION '2008') + +Ok. + +0 rows in set. Elapsed: 0.103 sec. +``` + +- **クエリã®æœ€é©åŒ–** - パーティションã¯ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスã«å½¹ç«‹ã¤ã“ã¨ãŒã‚ã‚Šã¾ã™ãŒã€ã“ã‚Œã¯ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã«å¤§ããä¾å­˜ã—ã¾ã™ã€‚クエリãŒæ•°å€‹ï¼ˆç†æƒ³çš„ã«ã¯1ã¤ï¼‰ã®ãƒ‘ーティションã®ã¿ã‚’ターゲットã¨ã™ã‚‹å ´åˆã€æ€§èƒ½ãŒå‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã€ãƒ‘ーティショニングキーãŒä¸»ã‚­ãƒ¼ã«å«ã¾ã‚Œã¦ãŠã‚‰ãšã€ãã‚Œã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã†å ´åˆã«æœ‰ç”¨ã§ã™ã€‚ã—ã‹ã—ã€å¤šãã®ãƒ‘ーティションをカãƒãƒ¼ã™ã‚‹å¿…è¦ãŒã‚るクエリã¯ã€ãƒ‘ーティショニングを使用ã—ãªã„å ´åˆã‚ˆã‚Šã‚‚性能ãŒæ‚ªåŒ–ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼ˆãã®çµæžœã€ã‚ˆã‚Šå¤šãã®ãƒ‘ーツãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚)。特定ã®ãƒ‘ーティションをターゲットã¨ã™ã‚‹ãƒ¡ãƒªãƒƒãƒˆã¯ã€æ—¢ã«ä¸»ã‚­ãƒ¼ã®åˆæœŸã‚¨ãƒ³ãƒˆãƒªã¨ã—ã¦ãƒ‘ーティショニングキーãŒã‚ã‚‹å ´åˆã€å­˜åœ¨ã—ãªã„ã‹ã®ã‚ˆã†ã«ä½Žä¸‹ã—ã¾ã™ã€‚パーティショニングã¯ã¾ãŸã€å„パーティションã®å€¤ãŒãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ã‚ã‚‹å ´åˆã«[GROUP BYクエリを最é©åŒ–](/ja/engines/table-engines/mergetree-family/custom-partitioning-key#group-by-optimisation-using-partition-key)ã™ã‚‹ãŸã‚ã«ã‚‚使用ã§ãã¾ã™ã€‚ã—ã‹ã—一般的ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä¸»ã‚­ãƒ¼ãŒæœ€é©åŒ–ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã€ç‰¹å®šã®äºˆæ¸¬å¯èƒ½ãªã‚µãƒ–セットã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンãŒã‚る例外的ãªå ´åˆã«ã®ã¿ã€ã‚¯ã‚¨ãƒªæœ€é©åŒ–技術ã¨ã—ã¦ãƒ‘ーティショニングを検討ã™ã¹ãã§ã™ã€‚例:日ã”ã¨ã«ãƒ‘ーティショニングã—ã€ã»ã¨ã‚“ã©ã®ã‚¯ã‚¨ãƒªãŒéŽåŽ»1日以内ã«è¡Œã‚れる場åˆã€‚ + +## パーティションã«é–¢ã™ã‚‹æŽ¨å¥¨äº‹é … + +ユーザーã¯ãƒ‘ーティショニングをデータ管ç†ã®æŠ€è¡“ã¨ã—ã¦è€ƒæ…®ã™ã¹ãã§ã™ã€‚ã“ã‚Œã¯ã€ã‚¿ã‚¤ãƒ ã‚·ãƒªãƒ¼ã‚ºãƒ‡ãƒ¼ã‚¿ã‚’扱ã†éš›ã«ã‚¯ãƒ©ã‚¹ã‚¿ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’期é™åˆ‡ã‚Œã«ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«ç†æƒ³çš„ã§ã™ã€‚例:最å¤ã®ãƒ‘ーティションを[å˜ã«å‰Šé™¤](/ja/sql-reference/statements/alter/partition#alter_drop-partition)ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**é‡è¦:** パーティショニングキーã®å¼ãŒé«˜ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã®ã‚»ãƒƒãƒˆã¤ã¾ã‚Š100を超ãˆã‚‹ãƒ‘ーティションを生æˆã—ãªã„ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。例ãˆã°ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè­˜åˆ¥å­ã‚„åå‰ã®ã‚ˆã†ãªé«˜ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã®ã‚«ãƒ©ãƒ ã§ãƒ‡ãƒ¼ã‚¿ã‚’パーティショニングã—ãªã„ã§ãã ã•ã„。代ã‚ã‚Šã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆè­˜åˆ¥å­ã‚„åå‰ã‚’ORDER BYå¼ã®æœ€åˆã®ã‚«ãƒ©ãƒ ã«ã—ã¦ãã ã•ã„。 + +> 内部的ã«ã¯ã€ClickHouseã¯æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦[パーツを生æˆã—ã¾ã™](/ja/optimize/sparse-primary-indexes#clickhouse-index-design)。データãŒå¤šã挿入ã•ã‚Œã‚‹ã«ã¤ã‚Œã¦ã€ãƒ‘ーツã®æ•°ãŒå¢—加ã—ã¾ã™ã€‚クエリã®æ€§èƒ½ã‚’低下ã•ã›ã‚‹éžå¸¸ã«å¤šãã®ãƒ‘ーツを防ããŸã‚ã«ã€ãƒ‘ーツã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã®éžåŒæœŸãƒ—ロセスã§çµ±åˆã•ã‚Œã¾ã™ã€‚パーツã®æ•°ãŒè¨­å®šã•ã‚ŒãŸåˆ¶é™ã‚’超ãˆã‚‹ã¨ã€ClickHouseã¯æŒ¿å…¥æ™‚ã«ä¾‹å¤–をスローã—ã¾ã™ã€‚ã“ã®å•é¡Œã¯é€šå¸¸ã®æ“作下ã§ç™ºç”Ÿã›ãšã€ClickHouseãŒèª¤ã£ã¦è¨­å®šã•ã‚Œã¦ã„ã‚‹ã‹èª¤ã£ã¦ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã®ã¿ç™ºç”Ÿã—ã¾ã™ã€‚例:多ãã®å°ã•ãªæŒ¿å…¥ã€‚ + +> パーツã¯ãƒ‘ーティションã”ã¨ã«å€‹åˆ¥ã«ä½œæˆã•ã‚Œã‚‹ãŸã‚ã€ãƒ‘ーティションã®æ•°ãŒå¢—ãˆã‚‹ã¨ãƒ‘ーツã®æ•°ã‚‚増ãˆã¾ã™ã€‚ã“ã‚Œã¯ãƒ‘ーティション数ã®å€æ•°ã§ã™ã€‚ã—ãŸãŒã£ã¦ã€é«˜ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã®ãƒ‘ーティショニングキーã¯ã“ã®ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€é¿ã‘ã‚‹ã¹ãã§ã™ã€‚ + +## マテリアライズドビューã¨ãƒ—ロジェクション + +Postgresã§ã¯ã€å˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルã«è¤‡æ•°ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’作æˆã™ã‚‹ã“ã¨ã§ã€ã•ã¾ã–ã¾ãªã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンを最é©åŒ–ã§ãã¾ã™ã€‚ã“ã®æŸ”軟性ã«ã‚ˆã‚Šã€ç®¡ç†è€…ã¨é–‹ç™ºè€…ã¯ç‰¹å®šã®ã‚¯ã‚¨ãƒªã¨é‹ç”¨ãƒ‹ãƒ¼ã‚ºã«åˆã‚ã›ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‘フォーマンスを調整ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouseã®ãƒ—ロジェクションã®æ¦‚念ã¯ãã‚Œã¨å®Œå…¨ã«åŒä¸€ã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦è¤‡æ•°ã®`ORDER BY`å¥ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouse [データモデリングドキュメント](/ja/data-modeling/schema-design)ã§ã¯ã€ClickHouseã«ãŠã„ã¦ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューãŒã©ã®ã‚ˆã†ã«ã—ã¦é›†è¨ˆã‚’事å‰è¨ˆç®—ã—ãŸã‚Šã€è¡Œã‚’変æ›ã—ãŸã‚Šã€ã•ã¾ã–ã¾ãªã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã«åŸºã¥ã„ã¦ã‚¯ã‚¨ãƒªã‚’最é©åŒ–ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã‚‹ã‹ã‚’探求ã—ã¦ã„ã¾ã™ã€‚ + +ã“ã‚Œã«é–¢é€£ã—ã¦ã€[å‰è¿°ã®ä¾‹](/ja/materialized-view#lookup-table)ã§ã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューãŒæŒ¿å…¥ã‚’å—ã‘ã‚‹å…ƒã®ãƒ†ãƒ¼ãƒ–ルã¨ã¯åˆ¥ã®é †åºã‚­ãƒ¼ã§è¡Œã‚’ターゲットテーブルã«é€ä¿¡ã™ã‚‹ä½¿ã„方を示ã—ã¾ã—ãŸã€‚ + +例ãˆã°ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’考ãˆã¦ã¿ã¦ãã ã•ã„: + +```sql +SELECT avg(Score) +FROM comments +WHERE UserId = 8592047 + + ┌──────────avg(Score)─┠+1. │ 0.18181818181818182 │ + └─────────────────────┘ + +1 row in set. Elapsed: 0.040 sec. Processed 90.38 million rows, 361.59 MB (2.25 billion rows/s., 9.01 GB/s.) +Peak memory usage: 201.93 MiB. +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯`UserId`ãŒã‚ªãƒ¼ãƒ€ãƒªãƒ³ã‚°ã‚­ãƒ¼ã§ã¯ãªã„ãŸã‚ã€å…¨90m行を(比較的高速ã«ï¼‰ã‚¹ã‚­ãƒ£ãƒ³ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以å‰ã¯ã€PostIdã®ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ã—ã¦æ©Ÿèƒ½ã™ã‚‹ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを使用ã—ã¦ã“ã®å•é¡Œã‚’解決ã—ã¾ã—ãŸã€‚åŒã˜å•é¡Œã¯ãƒ—ロジェクションを使用ã—ã¦è§£æ±ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯`ORDER BY user_id`ã®ãƒ—ロジェクションを追加ã—ã¾ã™ã€‚ + +```sql +ALTER TABLE comments ADD PROJECTION comments_user_id ( +SELECT * ORDER BY UserId +) + +ALTER TABLE comments MATERIALIZE PROJECTION comments_user_id +``` + +プロジェクションを最åˆã«ä½œæˆã—ã€ãれをマテリアライズã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã®å¾Œè€…ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’ディスク上ã«2回異ãªã‚‹é †åºã§ä¿æŒã—ã¾ã™ã€‚以下ã«ç¤ºã™ã‚ˆã†ã«ã€ãƒ‡ãƒ¼ã‚¿ãŒä½œæˆã•ã‚Œã‚‹éš›ã«ãƒ—ロジェクションを定義ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ãŒæŒ¿å…¥ã•ã‚Œã‚‹ã¨è‡ªå‹•çš„ã«ç¶­æŒã•ã‚Œã¾ã™ã€‚ + +```sql +CREATE TABLE comments +( + `Id` UInt32, + `PostId` UInt32, + `Score` UInt16, + `Text` String, + `CreationDate` DateTime64(3, 'UTC'), + `UserId` Int32, + `UserDisplayName` LowCardinality(String), + PROJECTION comments_user_id + ( + SELECT * + ORDER BY UserId + ) +) +ENGINE = MergeTree +ORDER BY PostId +``` + +`ALTER`ã§ãƒ—ロジェクションãŒä½œæˆã•ã‚Œã‚‹å ´åˆã€`MATERIALIZE PROJECTION`コマンドãŒç™ºè¡Œã•ã‚Œã‚‹ã¨ã€ä½œæˆã¯éžåŒæœŸã«ãªã‚Šã¾ã™ã€‚ユーザーã¯ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¦ã“ã®æ“作ã®é€²è¡ŒçŠ¶æ³ã‚’確èªã—ã€`is_done=1`ã‚’å¾…ã¡ã¾ã™ã€‚ + +```sql +SELECT + parts_to_do, + is_done, + latest_fail_reason +FROM system.mutations +WHERE (`table` = 'comments') AND (command LIKE '%MATERIALIZE%') + + ┌─parts_to_do─┬─is_done─┬─latest_fail_reason─┠+1. │ 1 │ 0 │ │ + └─────────────┴─────────┴────────────────────┘ + +1 row in set. Elapsed: 0.003 sec. +``` + +上記ã®ã‚¯ã‚¨ãƒªã‚’å†å®Ÿè¡Œã™ã‚‹ã¨ã€è¿½åŠ ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒå¿…è¦ã¨ãªã‚‹ä»£ã‚ã‚Šã«ãƒ‘フォーマンスãŒå¤§å¹…ã«æ”¹å–„ã•ã‚ŒãŸã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ + +```sql +SELECT avg(Score) +FROM comments +WHERE UserId = 8592047 + + ┌──────────avg(Score)─┠+1. │ 0.18181818181818182 │ + └─────────────────────┘ + +1 row in set. Elapsed: 0.008 sec. Processed 16.36 thousand rows, 98.17 KB (2.15 million rows/s., 12.92 MB/s.) +Peak memory usage: 4.06 MiB. +``` + +`EXPLAIN`コマンドを使用ã—ã¦ã€ã“ã®ã‚¯ã‚¨ãƒªã‚’供給ã™ã‚‹ãŸã‚ã«ãƒ—ロジェクションãŒä½¿ç”¨ã•ã‚ŒãŸã“ã¨ã‚‚確èªã§ãã¾ã™ï¼š + +```sql +EXPLAIN indexes = 1 +SELECT avg(Score) +FROM comments +WHERE UserId = 8592047 + + ┌─explain─────────────────────────────────────────────┠+ 1. │ Expression ((Projection + Before ORDER BY)) │ + 2. │ Aggregating │ + 3. │ Filter │ + 4. │ ReadFromMergeTree (comments_user_id) │ + 5. │ Indexes: │ + 6. │ PrimaryKey │ + 7. │ Keys: │ + 8. │ UserId │ + 9. │ Condition: (UserId in [8592047, 8592047]) │ +10. │ Parts: 2/2 │ +11. │ Granules: 2/11360 │ + └─────────────────────────────────────────────────────┘ + +11 rows in set. Elapsed: 0.004 sec. +``` + +## プロジェクションを使用ã™ã‚‹ã‚¿ã‚¤ãƒŸãƒ³ã‚° + +プロジェクションã¯è‡ªå‹•çš„ã«ãƒ‡ãƒ¼ã‚¿ãŒæŒ¿å…¥ã•ã‚Œã‚‹ã¨ç¶­æŒã•ã‚Œã‚‹ãŸã‚ã€æ–°ã—ã„ユーザーã«ã¯é­…力的ãªæ©Ÿèƒ½ã§ã™ã€‚ã•ã‚‰ã«ã€ã‚¯ã‚¨ãƒªã‚’å˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ルã«é€ã‚‹ã ã‘ã§ã€ãã‚Œã«å¿œã˜ã¦ãƒ—ロジェクションãŒæ´»ç”¨ã•ã‚Œã€å¿œç­”時間ãŒé«˜é€ŸåŒ–ã•ã‚Œã¾ã™ã€‚ + +
    + +NEEDS ALT + +
    + +ã“ã‚Œã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¨å¯¾ç…§çš„ã§ã‚ã‚Šã€ãã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ•ã‚£ãƒ«ã‚¿ã«å¿œã˜ã¦é©åˆ‡ãªæœ€é©åŒ–ã•ã‚ŒãŸã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルをé¸ã¶ã‹ã€ã‚¯ã‚¨ãƒªã‚’書ãæ›ãˆã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ãƒ—リケーションã«ã‚ˆã‚Šå¤§ããªé‡ã¿ã‚’ç½®ãã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã®è¤‡é›‘ã•ã‚’増ã—ã¾ã™ã€‚ + +ã“れらã®åˆ©ç‚¹ã«ã‚‚ã‹ã‹ã‚らãšã€ãƒ—ロジェクションã«ã¯å†…部的ãªåˆ¶é™ãŒã‚ã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãれをèªè­˜ã—ãŸä¸Šã§ã€æ…Žé‡ã«é…å‚™ã™ã¹ãã§ã™ã€‚ + +- プロジェクションã¯ã€ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã¨ï¼ˆéžè¡¨ç¤ºã®ï¼‰ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã§ç•°ãªã‚‹TTLを使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã§ã¯å¯èƒ½ã§ã™ã€‚ +- プロジェクションã¯ã€`optimize_read_in_order`を(éžè¡¨ç¤ºã®ï¼‰ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã§[ç¾æ™‚点ã§ã¯ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“](https://clickhouse.com/blog/clickhouse-faster-queries-with-projections-and-primary-indexes)。 +- プロジェクションをæŒã¤ãƒ†ãƒ¼ãƒ–ルã§ã¯è»½é‡ãªæ›´æ–°ã‚„削除ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- マテリアライズドビューã¯é€£éŽ–å¯èƒ½ã§ã‚ã‚Šã€ã‚るマテリアライズドビューã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルを別ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ãƒ—ロジェクションã§ã¯ãã‚ŒãŒã§ãã¾ã›ã‚“。 +- プロジェクションã¯ã‚¸ãƒ§ã‚¤ãƒ³ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“ãŒã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯ã‚µãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +- プロジェクションã¯ãƒ•ã‚£ãƒ«ã‚¿ï¼ˆWHEREå¥ï¼‰ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“ãŒã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯ã‚µãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +プロジェクションを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã™ã‚‹çŠ¶æ³ã¯ä»¥ä¸‹ã®å ´åˆã§ã™ï¼š + +- データã®å®Œå…¨ãªå†é †åºãŒå¿…è¦ã§ã‚ã‚‹å ´åˆã€‚プロジェクションã®ä¸­ã®å¼ã¯ç†è«–çš„ã«ã¯`GROUP BY`を使用ã§ãã¾ã™ãŒã€é›†è¨ˆã‚’維æŒã™ã‚‹ã«ã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®æ–¹ãŒåŠ¹æžœçš„ã§ã™ã€‚クエリオプティマイザーã¯ã€å˜ç´”ãªå†é †åºä»˜ã‘ã€ã™ãªã‚ã¡`SELECT * ORDER BY x`を使用ã™ã‚‹ãƒ—ロジェクションをより多ã利用ã—ã‚„ã™ã„ã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã“ã®å¼ã®ä¸­ã§ã‚«ãƒ©ãƒ ã®ã‚µãƒ–セットをé¸ã‚“ã§ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ãƒ•ãƒƒãƒˆãƒ—リントを減らã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +- データを二é‡ã«æ›¸ã込むã“ã¨ã«ã‚ˆã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ•ãƒƒãƒˆãƒ—リントã®å¢—加ã«æ…£ã‚Œã¦ã„ã¾ã™ã€‚挿入速度ã¸ã®å½±éŸ¿ã‚’テストã—ã€[ストレージã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’評価](/ja/data-compression/compression-in-clickhouse)ã—ã¦ãã ã•ã„。 + +[パート4ã¯ã“ã¡ã‚‰ã‚’クリック](/ja/migrations/postgresql/rewriting-queries)。 diff --git a/docs/ja/migrations/postgres/dataset.md b/docs/ja/migrations/postgres/dataset.md new file mode 100644 index 00000000000..3668ad99df2 --- /dev/null +++ b/docs/ja/migrations/postgres/dataset.md @@ -0,0 +1,113 @@ +--- +slug: /ja/migrations/postgresql/dataset +title: PostgreSQLã‹ã‚‰ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ +description: PostgreSQLã‹ã‚‰ClickHouseã¸ç§»è¡Œã™ã‚‹ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆä¾‹ +keywords: [postgres, postgresql, 移行, マイグレーション] +--- + +> ã“ã‚Œã¯ã€PostgreSQLã‹ã‚‰ClickHouseã¸ã®ç§»è¡Œã«é–¢ã™ã‚‹ã‚¬ã‚¤ãƒ‰ã®**パート1**ã§ã™ã€‚ã“ã®å†…容ã¯å…¥é–€ç·¨ã¨è¦‹ãªã•ã‚Œã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒClickHouseã®ãƒ™ã‚¹ãƒˆãƒ—ラクティスã«å¾“ã£ãŸåˆæœŸã®æ©Ÿèƒ½çš„ãªã‚·ã‚¹ãƒ†ãƒ ã‚’デプロイã™ã‚‹ã®ã‚’支æ´ã™ã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚複雑ãªãƒˆãƒ”ックをé¿ã‘ã€å®Œå…¨ã«æœ€é©åŒ–ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã«ã¯ãªã‚Šã¾ã›ã‚“ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæœ¬ç•ªç’°å¢ƒã®ã‚·ã‚¹ãƒ†ãƒ ã‚’構築ã—ã€å­¦ç¿’ã®åŸºç›¤ã‚’築ããŸã‚ã®å …実ãªåŸºç¤Žã‚’æä¾›ã—ã¾ã™ã€‚ + +## データセット + +Postgresã‹ã‚‰ClickHouseã¸ã®å…¸åž‹çš„ãªç§»è¡Œã‚’示ã™ä¾‹ã¨ã—ã¦ã€[ã“ã¡ã‚‰](/ja/getting-started/example-datasets/stackoverflow)ã§æ–‡æ›¸åŒ–ã•ã‚Œã¦ã„ã‚‹Stack Overflowã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’使用ã—ã¾ã™ã€‚ã“ã‚Œã«ã¯ã€2008å¹´ã‹ã‚‰2024å¹´4月ã¾ã§ã«Stack Overflowã§è¡Œã‚ã‚ŒãŸã™ã¹ã¦ã®`post`ã€`vote`ã€`user`ã€`comment`ã€ãŠã‚ˆã³`badge`ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã®PostgreSQLスキーマã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +
    + +NEEDS ALT + +
    + +*PostgreSQLã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ãŸã‚ã®DDLコマンドã¯[ã“ã¡ã‚‰](https://pastila.nl/?001c0102/eef2d1e4c82aab78c4670346acb74d83#TeGvJWX9WTA1V/5dVVZQjg==)ã«ã‚ã‚Šã¾ã™ã€‚* + +ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã¯å¿…ãšã—も最も最é©ã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€ä¸»ã‚­ãƒ¼ã€å¤–部キーã€ãƒ‘ーティショニングã€ãŠã‚ˆã³ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’å«ã‚€ã„ãã¤ã‹ã®äººæ°—ã®ã‚ã‚‹PostgreSQLã®æ©Ÿèƒ½ã‚’活用ã—ã¦ã„ã¾ã™ã€‚ + +ã“れらã®æ¦‚念をã€ãã‚Œãžã‚ŒClickHouseã®åŒç­‰ã®ã‚‚ã®ã«ç§»è¡Œã—ã¾ã™ã€‚ + +移行手順をテストã™ã‚‹ãŸã‚ã«ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’PostgreSQLインスタンスã«æŠ•å…¥ã—ãŸã„ユーザーã«ã¯ã€`pg_dump`å½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’æä¾›ã—ã¦ãŠã‚Šã€DDLãŠã‚ˆã³ãã®å¾Œã®ãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ã‚³ãƒžãƒ³ãƒ‰ã¯ä»¥ä¸‹ã«ç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼š + +```bash +# users +wget https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/pdump/2024/users.sql.gz +gzip -d users.sql.gz +psql < users.sql + +# posts +wget https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/pdump/2024/posts.sql.gz +gzip -d posts.sql.gz +psql < posts.sql + +# posthistory +wget https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/pdump/2024/posthistory.sql.gz +gzip -d posthistory.sql.gz +psql < posthistory.sql + +# comments +wget https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/pdump/2024/comments.sql.gz +gzip -d comments.sql.gz +psql < comments.sql + +# votes +wget https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/pdump/2024/votes.sql.gz +gzip -d votes.sql.gz +psql < votes.sql + +# badges +wget https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/pdump/2024/badges.sql.gz +gzip -d badges.sql.gz +psql < badges.sql + +# postlinks +wget https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/pdump/2024/postlinks.sql.gz +gzip -d postlinks.sql.gz +psql < postlinks.sql +``` + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ClickHouseã«ã¨ã£ã¦ã¯å°è¦æ¨¡ã§ã™ãŒã€Postgresã«ã¨ã£ã¦ã¯å¤§è¦æ¨¡ã§ã™ã€‚上記ã¯2024å¹´ã®æœ€åˆã®3ã‹æœˆã‚’ã‚«ãƒãƒ¼ã™ã‚‹ã‚µãƒ–セットを表ã—ã¦ã„ã¾ã™ã€‚ + +> 我々ã®ä¾‹ã§ã¯ã€Postgresã¨ClickHouseã®ãƒ‘フォーマンス差を示ã™ãŸã‚ã«å®Œå…¨ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’使用ã—ã¦ã„ã¾ã™ãŒã€ä»¥ä¸‹ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®æ‰‹é †ã¯ã€å°ã•ãªã‚µãƒ–セットã§ã‚‚機能的ã«åŒä¸€ã§ã™ã€‚Postgresã«å®Œå…¨ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’ロードã—ãŸã„ユーザーã¯[ã“ã¡ã‚‰](https://pastila.nl/?00d47a08/1c5224c0b61beb480539f15ac375619d#XNj5vX3a7ZjkdiX7In8wqA==)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。上記ã®ã‚¹ã‚­ãƒ¼ãƒžã«ã‚ˆã£ã¦èª²ã•ã‚Œã‚‹å¤–部制約ã®ãŸã‚ã€PostgreSQLã®å®Œå…¨ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯å‚照整åˆæ€§ã‚’満ãŸã™è¡Œã®ã¿ãŒå«ã¾ã‚Œã¾ã™ã€‚[Parquetãƒãƒ¼ã‚¸ãƒ§ãƒ³](/ja/getting-started/example-datasets/stackoverflow)ã¯ã€ãã®ã‚ˆã†ãªåˆ¶ç´„ãªã—ã§ClickHouseã«ç›´æŽ¥ç°¡å˜ã«ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ + +## データã®ç§»è¡Œ + +ClickHouseã¨Postgresé–“ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œã¯ã€2ã¤ã®ä¸»è¦ãªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚¿ã‚¤ãƒ—ã«åˆ†ã‹ã‚Œã¾ã™ï¼š + +- **åˆå›žã®ä¸€æ‹¬ãƒ­ãƒ¼ãƒ‰ã¨å®šæœŸæ›´æ–°** - åˆæœŸãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’移行ã—ã€æ¯Žæ—¥ãªã©ã®è¨­å®šã•ã‚ŒãŸé–“éš”ã§å®šæœŸæ›´æ–°ã‚’è¡Œã„ã¾ã™ã€‚ã“ã“ã§ã®æ›´æ–°ã¯ã€å¤‰æ›´ã•ã‚ŒãŸè¡Œã‚’å†é€ä¿¡ã™ã‚‹ã“ã¨ã§å‡¦ç†ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€æ¯”較ã«ä½¿ç”¨ã§ãるカラム(例:日付)やXMIN値ã«ã‚ˆã£ã¦è­˜åˆ¥ã§ãã¾ã™ã€‚削除æ“作ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®å®Œå…¨ãªå®šæœŸãƒªãƒ­ãƒ¼ãƒ‰ã§å‡¦ç†ã•ã‚Œã¾ã™ã€‚ +- **リアルタイムレプリケーションã¾ãŸã¯CDC** - åˆæœŸãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’移行ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¸ã®å¤‰æ›´ã¯ã€æ•°ç§’ã®é…延ãŒè¨±å®¹ã•ã‚Œã‚‹è¿‘リアルタイムã§ClickHouseã«å映ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯å®Ÿè³ªçš„ã«ã€Postgresã®ãƒ†ãƒ¼ãƒ–ルをClickHouseã¨åŒæœŸã•ã›ã‚‹Change Data Capture (CDC)プロセスã§ã™ã€‚ã¤ã¾ã‚Šã€Postgresテーブルã®æŒ¿å…¥ã€æ›´æ–°ã€å‰Šé™¤ãŒClickHouseã®åŒç­‰ã®ãƒ†ãƒ¼ãƒ–ルã«é©ç”¨ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### åˆå›žã®ä¸€æ‹¬ãƒ­ãƒ¼ãƒ‰ã¨å®šæœŸæ›´æ–° + +ã“ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¯ã€ä¸Šè¨˜ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®ä¸­ã§ã‚‚ç°¡å˜ãªæ–¹ã§ã™ã€‚変更ã¯å®šæœŸçš„ã«é©ç”¨ã§ãã¾ã™ã€‚データセットã®åˆå›žã®ä¸€æ‹¬ãƒ­ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã§é”æˆã§ãã¾ã™ï¼š + +- **テーブル関数** - ClickHouseã§[Postgresテーブル関数](/ja/sql-reference/table-functions/postgresql)を使用ã—ã¦Postgresã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’`SELECT`ã—ã€ClickHouseテーブルã«`INSERT`ã—ã¾ã™ã€‚数百GBã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¾ã§ã®ä¸€æ‹¬ãƒ­ãƒ¼ãƒ‰ã«é–¢é€£ã—ã¦ã„ã¾ã™ã€‚ +- **エクスãƒãƒ¼ãƒˆ** - CSVã‚„SQLスクリプトファイルãªã©ã®ä¸­é–“å½¢å¼ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ã®`INSERT FROM INFILE`å¥ã‚’使用ã—ã¦ã€ã¾ãŸã¯ã‚ªãƒ–ジェクトストレージã¨ãã®é–¢é€£æ©Ÿèƒ½ï¼ˆä¾‹ï¼šs3, gcs)を使用ã—ã¦ClickHouseã«ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ + +増分ロードã¯ã€ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã—ã¦è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚PostgresテーブルãŒæŒ¿å…¥ã®ã¿ã‚’å—ã‘å–ã‚Šã€å¢—加ã™ã‚‹IDã¾ãŸã¯ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ä¸Šè¨˜ã®ãƒ†ãƒ¼ãƒ–ル関数アプローãƒã‚’使用ã—ã¦ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã‚’ロードã§ãã¾ã™ã€‚ã¤ã¾ã‚Šã€`SELECT`ã«`WHERE`å¥ã‚’é©ç”¨ã§ãã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã¯ã€åŒã˜ã‚«ãƒ©ãƒ ãŒæ›´æ–°ã•ã‚Œã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¦ã„ã‚‹å ´åˆã«æ›´æ–°ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ã‚‚使用ã§ãã¾ã™ã€‚ãŸã ã—ã€å‰Šé™¤ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ã¯å®Œå…¨ãªãƒªãƒ­ãƒ¼ãƒ‰ãŒå¿…è¦ã«ãªã‚Šã€ãƒ†ãƒ¼ãƒ–ルãŒæˆé•·ã™ã‚‹ã«ã¤ã‚Œã¦å›°é›£ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +`CreationDate`を使用ã—ã¦åˆå›žãƒ­ãƒ¼ãƒ‰ã¨å¢—分ロードを示ã—ã¾ã™ï¼ˆè¡ŒãŒæ›´æ–°ã•ã‚ŒãŸå ´åˆã€ã“ã‚ŒãŒæ›´æ–°ã•ã‚Œã‚‹ã¨ä»®å®šã—ã¾ã™ï¼‰ã€‚ + +```sql +-- åˆå›žãƒ­ãƒ¼ãƒ‰ +INSERT INTO stackoverflow.posts SELECT * FROM postgresql('', 'postgres', 'posts', 'postgres', '', 'postgres', 'posts', 'postgres', ' ( SELECT (max(CreationDate) FROM stackoverflow.posts) +``` + +> ClickHouseã¯ã€`=`, `!=`, `>`, `>=`, `<`, `<=`, `IN`ã®ã‚ˆã†ãªå˜ç´”ãª`WHERE`å¥ã‚’PostgreSQLサーãƒãƒ¼ã«ãƒ—ッシュダウンã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãƒ­ãƒ¼ãƒ‰ã¯ã€å¤‰æ›´ã‚»ãƒƒãƒˆã‚’識別ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒå­˜åœ¨ã™ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ã“ã¨ã§ã€ã‚ˆã‚ŠåŠ¹çŽ‡çš„ã«è¡Œãˆã¾ã™ã€‚ + +> クエリレプリケーションを使用ã—ã¦UPDATEæ“作を検出ã™ã‚‹å¯èƒ½ãªæ–¹æ³•ã¯ã€[XMINシステムカラム](https://www.postgresql.org/docs/9.1/ddl-system-columns.html)(トランザクションID)をウォーターマークã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã§ã™ã€‚ã“ã®ã‚«ãƒ©ãƒ ã®å¤‰æ›´ã¯å¤‰åŒ–を示ã—ã€ã—ãŸãŒã£ã¦å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«é©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã‚’使用ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€XMIN値ãŒãƒ©ãƒƒãƒ—アラウンドã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€å…¨è¡¨ã‚¹ã‚­ãƒ£ãƒ³ãŒå¿…è¦ã§ã‚ã‚‹ãŸã‚ã€å¤‰æ›´ã‚’追跡ã™ã‚‹ã“ã¨ãŒã‚ˆã‚Šè¤‡é›‘ã«ãªã‚‹ã“ã¨ã‚’èªè­˜ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€ã€ŒChange Data Capture (CDC)ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### リアルタイムレプリケーションã¾ãŸã¯CDC + +Change Data Capture (CDC)ã¯ã€è¡¨ãŒ2ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹é–“ã§åŒæœŸã•ã‚Œã‚‹ãƒ—ロセスã§ã™ã€‚ã“ã‚Œã¯ã€æ›´æ–°ãŠã‚ˆã³å‰Šé™¤ã‚’リアルタイムã§å‡¦ç†ã™ã‚‹å ´åˆã€ã‹ãªã‚Šè¤‡é›‘ã«ãªã‚Šã¾ã™ã€‚ + +ã„ãã¤ã‹ã®ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ãŒã‚ã‚Šã¾ã™ï¼š +1. **[ClickHouseã«ã‚ˆã‚‹PeerDB](https://docs.peerdb.io/connect/clickhouse/clickhouse-cloud)** - PeerDBã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã¾ãŸã¯SaaSソリューションã¨ã—ã¦å®Ÿè¡Œã§ãるオープンコード専門Postgres CDCソリューションをæä¾›ã—ã€PostgresãŠã‚ˆã³ClickHouseã§ã‚¹ã‚±ãƒ¼ãƒ«ã§ã®å„ªã‚ŒãŸãƒ‘フォーマンスを示ã—ã¦ã„ã¾ã™ã€‚ã“ã®ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã€Postgresã¨ClickHouseé–“ã®é«˜æ€§èƒ½ãªãƒ‡ãƒ¼ã‚¿è»¢é€ãŠã‚ˆã³ä¿¡é ¼æ€§ä¿è¨¼ã‚’実ç¾ã™ã‚‹ãŸã‚ã«ä½Žãƒ¬ãƒ™ãƒ«ã®æœ€é©åŒ–ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚オンラインãŠã‚ˆã³ã‚ªãƒ•ãƒ©ã‚¤ãƒ³ã®ä¸¡æ–¹ã®ãƒ­ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +2. **独自ã«æ§‹ç¯‰** - ã“ã‚Œã¯**Debezium + Kafka**ã§å®Ÿç¾ã§ãã¾ã™ã€‚Debeziumã¯Postgresテーブルã®ã™ã¹ã¦ã®å¤‰æ›´ã‚’キャプãƒãƒ£ã—ã€ã“れらをイベントã¨ã—ã¦Kafkaキューã«ãƒ•ã‚©ãƒ¯ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ã“れらã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãã®å¾Œã€ClickHouse Kafkaコãƒã‚¯ã‚¿ã¾ãŸã¯[Clickpipes in ClickHouse Cloud](https://clickhouse.com/cloud/clickpipes)ã«ã‚ˆã£ã¦æ¶ˆè²»ã•ã‚Œã€ClickHouseã¸ã®æŒ¿å…¥ãŒè¡Œã‚ã‚Œã¾ã™ã€‚ã“ã‚Œã¯Change Data Capture (CDC)を表ã—ã¦ãŠã‚Šã€Debeziumã¯è¡¨ã®åˆå›žã‚³ãƒ”ーを行ã†ã ã‘ã§ãªãã€å¾Œç¶šã®ã™ã¹ã¦ã®æ›´æ–°ã€å‰Šé™¤ã€ãŠã‚ˆã³æŒ¿å…¥ãŒPostgresã§æ¤œå‡ºã•ã‚Œã€ä¸‹æµã®ã‚¤ãƒ™ãƒ³ãƒˆãŒç™ºç”Ÿã™ã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€Postgresã€Debeziumã€ãŠã‚ˆã³ClickHouseã®æ³¨æ„æ·±ã„設定を必è¦ã¨ã—ã¾ã™ã€‚例ã¯[ã“ã¡ã‚‰](https://clickhouse.com/blog/clickhouse-postgresql-change-data-capture-cdc-part-2)ã«ã‚ã‚Šã¾ã™ã€‚ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã®ä¾‹ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿æŽ¢ç´¢ã¨ä»–ã®ã‚¢ãƒ—ローãƒã§ä½¿ç”¨å¯èƒ½ãªæœ¬ç•ªã‚¹ã‚­ãƒ¼ãƒžã¸ã®ç°¡å˜ãªå復ã«ç„¦ç‚¹ã‚’当ã¦ã€åˆå›žã®ä¸€æ‹¬ãƒ­ãƒ¼ãƒ‰ã®ã¿ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ + +[パート2ã¯ã“ã¡ã‚‰](/ja/migrations/postgresql/designing-schemas). + diff --git a/docs/ja/migrations/postgres/designing-schemas.md b/docs/ja/migrations/postgres/designing-schemas.md new file mode 100644 index 00000000000..e39a8cf0065 --- /dev/null +++ b/docs/ja/migrations/postgres/designing-schemas.md @@ -0,0 +1,249 @@ +--- +slug: /ja/migrations/postgresql/designing-schemas +title: スキーマã®è¨­è¨ˆ +description: PostgreSQLã‹ã‚‰ClickHouseã¸ã®ç§»è¡Œæ™‚ã®ã‚¹ã‚­ãƒ¼ãƒžè¨­è¨ˆ +keywords: [postgres, postgresql, 移行, マイグレーション, スキーマ] +--- + +> ã“ã‚Œã¯ã€PostgreSQLã‹ã‚‰ClickHouseã¸ã®ç§»è¡Œã‚¬ã‚¤ãƒ‰ã®**パート2**ã§ã™ã€‚ã“ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã¯å…¥é–€çš„ãªã‚‚ã®ã§ã‚ã‚Šã€ClickHouseã®ãƒ™ã‚¹ãƒˆãƒ—ラクティスã«å¾“ã£ãŸåˆæœŸã®æ©Ÿèƒ½çš„ãªã‚·ã‚¹ãƒ†ãƒ ã‚’展開ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚複雑ãªãƒˆãƒ”ックã¯é¿ã‘ã€å®Œå…¨ã«æœ€é©åŒ–ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã«ã¯ãªã‚Šã¾ã›ã‚“ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæœ¬ç•ªã‚·ã‚¹ãƒ†ãƒ ã‚’構築ã—ã€ãã®å­¦ç¿’ã®åŸºç¤Žã‚’築ãã®ã«å½¹ç«‹ã¤å …実ãªåŸºç›¤ã‚’æä¾›ã—ã¾ã™ã€‚ + +Stack Overflowデータセットã«ã¯ã€é–¢é€£ã™ã‚‹è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚移行ã§ã¯ã€ä¸»è¦ãªãƒ†ãƒ¼ãƒ–ルを最åˆã«ç§»è¡Œã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã¯å¿…ãšã—も最大ã®ãƒ†ãƒ¼ãƒ–ルã§ã¯ãªãã€ã‚€ã—ã‚最も多ãã®åˆ†æžã‚¯ã‚¨ãƒªã‚’å—ã‘ã‚‹ã¨æœŸå¾…ã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ç‰¹ã«OLTP中心ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚’æŒã¤å ´åˆã€ClickHouseã®ä¸»è¦ãªæ¦‚念ã«æ…£ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ClickHouseã®æ©Ÿèƒ½ã‚’最大é™ã«æ´»ç”¨ã—ã€æœ€é©ãªãƒ‘フォーマンスを得るãŸã‚ã«ã€è¿½åŠ ã®ãƒ†ãƒ¼ãƒ–ルãŒè¿½åŠ ã•ã‚Œã‚‹ãŸã³ã«ãƒªãƒ¢ãƒ‡ãƒªãƒ³ã‚°ã‚’å¿…è¦ã¨ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã®ãƒ¢ãƒ‡ãƒªãƒ³ã‚°ãƒ—ロセスã«ã¤ã„ã¦ã¯ã€[データモデリングã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](/ja/data-modeling/schema-design#next-data-modelling-techniques)ã§æŽ¢ã‚Šã¾ã™ã€‚ + +## åˆæœŸã‚¹ã‚­ãƒ¼ãƒžã®è¨­å®š + +ã“ã®åŽŸå‰‡ã«å¾“ã„ã€ä¸»è¦ãª`posts`テーブルã«ç„¦ç‚¹ã‚’当ã¦ã¾ã™ã€‚Postgresスキーマã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼š + +```sql +CREATE TABLE posts ( + Id int, + PostTypeId int, + AcceptedAnswerId text, + CreationDate timestamp, + Score int, + ViewCount int, + Body text, + OwnerUserId int, + OwnerDisplayName text, + LastEditorUserId text, + LastEditorDisplayName text, + LastEditDate timestamp, + LastActivityDate timestamp, + Title text, + Tags text, + AnswerCount int, + CommentCount int, + FavoriteCount int, + ContentLicense text, + ParentId text, + CommunityOwnedDate timestamp, + ClosedDate timestamp, + PRIMARY KEY (Id), + FOREIGN KEY (OwnerUserId) REFERENCES users(Id) +) +``` + +上記ã®å„カラムã«å¯¾å¿œã™ã‚‹Typeを確立ã™ã‚‹ã«ã¯ã€[Postgresテーブル関数](/ja/sql-reference/table-functions/postgresql)ã¨å…±ã«`DESCRIBE`コマンドを使用ã§ãã¾ã™ã€‚次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’Postgresインスタンスã«åˆã‚ã›ã¦å¤‰æ›´ã—ã¦ãã ã•ã„: + +```sql +DESCRIBE TABLE postgresql(':', 'postgres', 'posts', '', '') +SETTINGS describe_compact_output = 1 + +┌─name──────────────────┬─type────────────────────┠+│ id │ Int32 │ +│ posttypeid │ Nullable(Int32) │ +│ acceptedanswerid │ Nullable(String) │ +│ creationdate │ Nullable(DateTime64(6)) │ +│ score │ Nullable(Int32) │ +│ viewcount │ Nullable(Int32) │ +│ body │ Nullable(String) │ +│ owneruserid │ Nullable(Int32) │ +│ ownerdisplayname │ Nullable(String) │ +│ lasteditoruserid │ Nullable(String) │ +│ lasteditordisplayname │ Nullable(String) │ +│ lasteditdate │ Nullable(DateTime64(6)) │ +│ lastactivitydate │ Nullable(DateTime64(6)) │ +│ title │ Nullable(String) │ +│ tags │ Nullable(String) │ +│ answercount │ Nullable(Int32) │ +│ commentcount │ Nullable(Int32) │ +│ favoritecount │ Nullable(Int32) │ +│ contentlicense │ Nullable(String) │ +│ parentid │ Nullable(String) │ +│ communityowneddate │ Nullable(DateTime64(6)) │ +│ closeddate │ Nullable(DateTime64(6)) │ +└───────────────────────┴─────────────────────────┘ + +22 rows in set. Elapsed: 0.478 sec. +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€åˆæœŸã®éžæœ€é©åŒ–スキーマãŒæä¾›ã•ã‚Œã¾ã™ã€‚ + +> `NOT NULL 制約`ãŒãªã‘ã‚Œã°ã€Postgresã®ã‚«ãƒ©ãƒ ã«ã¯Null値ãŒå«ã¾ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚è¡Œã®å€¤ã‚’調ã¹ãšã«ã€ClickHouseã¯ã“れらをåŒç­‰ã®Nullableåž‹ã«ãƒžãƒƒãƒ”ングã—ã¾ã™ã€‚Postgresã§ã¯ã€ä¸»ã‚­ãƒ¼ã¯Nullã§ãªã„ã“ã¨ãŒè¦æ±‚事項ã§ã™ã€‚ + +ã“れらã®åž‹ã‚’使用ã—ã¦ã€ClickHouseã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã«ã¯ã€`CREATE AS EMPTY SELECT`コマンドをシンプルã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE posts +ENGINE = MergeTree +ORDER BY () EMPTY AS +SELECT * FROM postgresql(':', 'postgres', 'posts', '', '') +``` + +ã“ã®ã‚¢ãƒ—ローãƒã¯ã€ä»–ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§s3ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ãŸã‚ã«ã‚‚使用ã§ãã¾ã™ã€‚åŒç­‰ã®ä¾‹ã¨ã—ã¦ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’Parquetフォーマットã‹ã‚‰ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ä¾‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## åˆæœŸãƒ­ãƒ¼ãƒ‰ + +作æˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを使用ã—ã¦ã€Postgresã‹ã‚‰ClickHouseã«è¡Œã‚’挿入ã—ã¾ã™ã€‚[Postgresテーブル関数](/ja/sql-reference/table-functions/postgresql)を使用ã—ã¾ã™ã€‚ + +```sql +INSERT INTO posts SELECT * +FROM postgresql(':', 'postgres', 'posts', '', '') + +0 rows in set. Elapsed: 1136.841 sec. Processed 58.89 million rows, 80.85 GB (51.80 thousand rows/s., 71.12 MB/s.) +Peak memory usage: 2.51 GiB. +``` + +> ã“ã®æ“作ã¯Postgresã«ã‹ãªã‚Šã®è² è·ã‚’ã‹ã‘ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ユーザーã¯ã€é‹ç”¨ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«å½±éŸ¿ã‚’与ãˆãªã„よã†ã«ã€SQLスクリプトをエクスãƒãƒ¼ãƒˆã™ã‚‹ã‚ˆã†ãªä»£æ›¿æ“作ã§ãƒãƒƒã‚¯ãƒ•ã‚£ãƒ«ã™ã‚‹ã“ã¨ã‚’検討ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã®æ“作ã®ãƒ‘フォーマンスã¯ã€Postgresã¨ClickHouseã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚µã‚¤ã‚ºã€ãŠã‚ˆã³ãã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ã‚³ãƒã‚¯ãƒˆã«ä¾å­˜ã—ã¾ã™ã€‚ + +> ClickHouseã‹ã‚‰Postgresã¸ã®å„`SELECT`ã¯ã€å˜ä¸€ã®æŽ¥ç¶šã‚’使用ã—ã¾ã™ã€‚ã“ã®æŽ¥ç¶šã¯ã€è¨­å®š`postgresql_connection_pool_size`(デフォルト16)ã§ã‚µã‚¤ã‚ºæŒ‡å®šã•ã‚ŒãŸã‚µãƒ¼ãƒãƒ¼å´ã®æŽ¥ç¶šãƒ—ールã‹ã‚‰å–られã¾ã™ã€‚ + +フルデータセットを使用ã—ã¦ã„ã‚‹å ´åˆã€ä¾‹ã§ã¯59mã®æŠ•ç¨¿ãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã¯ãšã§ã™ã€‚ClickHouseã§ã®ç°¡å˜ãªã‚«ã‚¦ãƒ³ãƒˆã§ç¢ºèªã—ã¾ã™ï¼š + +```sql +SELECT count() +FROM posts + +┌──count()─┠+│ 58889566 │ +└──────────┘ +``` + +## åž‹ã®æœ€é©åŒ– + +ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã®åž‹ã‚’最é©åŒ–ã™ã‚‹æ‰‹é †ã¯ã€ä»–ã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ãŒãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸå ´åˆã¨åŒã˜ã§ã™ï¼ˆä¾‹: S3ã®Parquet)。[Parquetを使用ã—ãŸä»£æ›¿ã‚¬ã‚¤ãƒ‰](/ja/data-modeling/schema-design)ã§èª¬æ˜Žã•ã‚Œã¦ã„るプロセスをé©ç”¨ã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚¹ã‚­ãƒ¼ãƒžãŒç”Ÿæˆã•ã‚Œã¾ã™ï¼š + +```sql +CREATE TABLE posts_v2 +( + `Id` Int32, + `PostTypeId` Enum('Question' = 1, 'Answer' = 2, 'Wiki' = 3, 'TagWikiExcerpt' = 4, 'TagWiki' = 5, 'ModeratorNomination' = 6, 'WikiPlaceholder' = 7, 'PrivilegeWiki' = 8), + `AcceptedAnswerId` UInt32, + `CreationDate` DateTime, + `Score` Int32, + `ViewCount` UInt32, + `Body` String, + `OwnerUserId` Int32, + `OwnerDisplayName` String, + `LastEditorUserId` Int32, + `LastEditorDisplayName` String, + `LastEditDate` DateTime, + `LastActivityDate` DateTime, + `Title` String, + `Tags` String, + `AnswerCount` UInt16, + `CommentCount` UInt8, + `FavoriteCount` UInt8, + `ContentLicense` LowCardinality(String), + `ParentId` String, + `CommunityOwnedDate` DateTime, + `ClosedDate` DateTime +) +ENGINE = MergeTree +ORDER BY tuple() +COMMENT '最é©åŒ–ã•ã‚ŒãŸã‚¿ã‚¤ãƒ—' +``` + +ã“ã®ãƒ†ãƒ¼ãƒ–ルを埋ã‚ã‚‹ã«ã¯ã€ä»¥å‰ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹ã‚·ãƒ³ãƒ—ルãª`INSERT INTO SELECT`を使用ã§ãã¾ã™ï¼š + +```sql +INSERT INTO posts_v2 SELECT * FROM posts + +0 rows in set. Elapsed: 146.471 sec. Processed 59.82 million rows, 83.82 GB (408.40 thousand rows/s., 572.25 MB/s.) +``` + +æ–°ã—ã„スキーマã§ã¯ã€nullã¯ä¿æŒã•ã‚Œã¾ã›ã‚“。上記ã®æŒ¿å…¥ã§ã¯ã€ã“れらをãã‚Œãžã‚Œã®ã‚¿ã‚¤ãƒ—ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«æš—黙的ã«å¤‰æ›ã—ã¾ã™ã€‚æ•´æ•°ã¯0ã€æ–‡å­—列ã¯ç©ºã®å€¤ã¨ãªã‚Šã¾ã™ã€‚ClickHouseã¯ã¾ãŸã€ä»»æ„ã®æ•°å€¤ã‚’ãã®ç›®æ¨™ç²¾åº¦ã«è‡ªå‹•çš„ã«å¤‰æ›ã—ã¾ã™ã€‚ + +## ClickHouseã«ãŠã‘る主(順åºï¼‰ã‚­ãƒ¼ + +OLTPデータベースã‹ã‚‰æ¥ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€å¤šãã®å ´åˆã€ClickHouseã§ã®åŒç­‰ã®æ¦‚念を探ã—ã¾ã™ã€‚ClickHouseãŒ`PRIMARY KEY`構文をサãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹ã“ã¨ã«æ°—付ãã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯OLTPデータベースã®ã‚½ãƒ¼ã‚¹ã¨åŒã˜ã‚­ãƒ¼ã‚’使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルスキーマを定義ã—よã†ã¨ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ã“ã‚Œã¯é©åˆ‡ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### ClickHouseã®ä¸»ã‚­ãƒ¼ã¯ã©ã®ã‚ˆã†ã«ç•°ãªã‚‹ã‹ï¼Ÿ + +OLTP主キーをClickHouseã§ä½¿ç”¨ã™ã‚‹ã®ãŒä¸é©åˆ‡ã§ã‚ã‚‹ç†ç”±ã‚’ç†è§£ã™ã‚‹ã«ã¯ã€ClickHouseã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä»˜ã‘ã®åŸºæœ¬ã‚’ç†è§£ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã“ã§ã¯Postgresを例ã¨ã—ã¦æ¯”較ã—ã¾ã™ãŒã€ã“れらã®ä¸€èˆ¬çš„ãªæ¦‚念ã¯ä»–ã®OLTPデータベースã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +- Postgresã®ä¸»ã‚­ãƒ¼ã¯ã€å®šç¾©ä¸Šã€è¡Œã”ã¨ã«ä¸€æ„ã§ã™ã€‚[B-tree構造](/ja/optimize/sparse-primary-indexes#an-index-design-for-massive-data-scales)を使用ã™ã‚‹ã“ã¨ã§ã€ã“ã®ã‚­ãƒ¼ã«ã‚ˆã‚‹å˜ä¸€è¡Œã®åŠ¹çŽ‡çš„ãªæ¤œç´¢ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ClickHouseã¯å˜ä¸€è¡Œã®å€¤ã®æ¤œç´¢ã«æœ€é©åŒ–ã§ãã¾ã™ãŒã€åˆ†æžãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã§ã¯é€šå¸¸ã€å¤šãã®è¡Œã«å¯¾ã—ã¦ä¸€éƒ¨ã®ã‚«ãƒ©ãƒ ã‚’読ã¿å–ã‚‹ã“ã¨ãŒæ±‚ã‚られã¾ã™ã€‚フィルターã¯ã€é›†è¨ˆãŒè¡Œã‚れる行ã®ã‚µãƒ–セットを特定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- メモリã¨ãƒ‡ã‚£ã‚¹ã‚¯ã®åŠ¹çŽ‡ã¯ã€ClickHouseãŒé »ç¹ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ã§ã¯éžå¸¸ã«é‡è¦ã§ã™ã€‚データã¯ã€ClickHouseテーブルã«ãƒ‘ーツã¨ã—ã¦çŸ¥ã‚‰ã‚Œã‚‹ãƒãƒ£ãƒ³ã‚¯ã«æ›¸ãè¾¼ã¾ã‚Œã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‘ーツをマージã™ã‚‹ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ClickHouseã§ã¯ã€å„パーツã«ç‹¬è‡ªã®ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒã‚ã‚Šã¾ã™ã€‚パーツãŒãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹ã¨ã€ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒ‘ーツã®ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚‚マージã•ã‚Œã¾ã™ã€‚Postgresã¨ã¯ç•°ãªã‚Šã€ã“れらã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯å„è¡Œã«å¯¾ã—ã¦æ§‹ç¯‰ã•ã‚Œã¾ã›ã‚“。代ã‚ã‚Šã«ã€ãƒ‘ーツã®ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—ã”ã¨ã«1ã¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¨ãƒ³ãƒˆãƒªã‚’æŒã¡ã€ã“ã®æŠ€è¡“ã¯**スパースインデックス**ã¨å‘¼ã°ã‚Œã¾ã™ã€‚ +- **スパースインデックス**ã¯ã€ClickHouseãŒã‚†ãˆã«å¯èƒ½ã§ã™ã€‚ClickHouseã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚­ãƒ¼ã«ã‚ˆã£ã¦ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ä¸¦ã¹ã‚‰ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’記憶ã—ã¾ã™ã€‚ãã®çµæžœã€ã‚¹ãƒ‘ース主インデックスã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¨ãƒ³ãƒˆãƒªã«å¯¾ã—ã¦ãƒã‚¤ãƒŠãƒªã‚µãƒ¼ãƒã‚’介ã—ã¦ã‚¯ã‚¨ãƒªã¨ä¸€è‡´ã™ã‚‹å¯èƒ½æ€§ã®ã‚ã‚‹è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—を迅速ã«ç‰¹å®šã§ãã¾ã™ã€‚特定ã•ã‚ŒãŸå¯èƒ½æ€§ã®ã‚るマッãƒãƒ³ã‚°è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—ã¯ã€ãã®å¾Œã€ClickHouseエンジンã«ä¸¦è¡Œã—ã¦ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã•ã‚Œã€ãƒžãƒƒãƒã‚’見ã¤ã‘ã¾ã™ã€‚ã“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹è¨­è¨ˆã«ã‚ˆã‚Šã€ä¸»ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒå°ã•ã(完全ã«ãƒ¡ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªã«åŽã¾ã‚‹ï¼‰çŠ¶æ…‹ã‚’ä¿ã¡ãªãŒã‚‰ã€ç‰¹ã«ãƒ‡ãƒ¼ã‚¿åˆ†æžã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«å…¸åž‹çš„ãªç¯„囲クエリã®å®Ÿè¡Œæ™‚間を大幅ã«é«˜é€ŸåŒ–ã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€ã“ã®[詳細ãªã‚¬ã‚¤ãƒ‰](/ja/optimize/sparse-primary-indexes)ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +
    + +NEEDS ALT + +
    + +NEEDS ALT + +
    + +ClickHouseã§é¸æŠžã•ã‚ŒãŸã‚­ãƒ¼ã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã ã‘ã§ãªãã€ãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®é †åºã‚‚決定ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã«å¤§ããªå½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€ãã‚ŒãŒçµæžœçš„ã«ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚大部分ã®ã‚«ãƒ©ãƒ ã®å€¤ãŒé€£ç¶šã—ã¦æ›¸ãè¾¼ã¾ã‚Œã‚‹ã‚ˆã†ãªé †åºã‚­ãƒ¼ã¯ã€é¸æŠžã•ã‚ŒãŸåœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ï¼ˆãŠã‚ˆã³ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ï¼‰ãŒãƒ‡ãƒ¼ã‚¿ã‚’より効果的ã«åœ§ç¸®ã™ã‚‹ã®ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +> テーブル内ã®å…¨ã¦ã®ã‚«ãƒ©ãƒ ã¯ã€æŒ‡å®šã•ã‚ŒãŸé †åºã‚­ãƒ¼ã®å€¤ã«åŸºã¥ã„ã¦ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆãã‚ŒãŒã‚­ãƒ¼è‡ªä½“ã«ã¯å«ã¾ã‚Œã¦ã„ãªãã¦ã‚‚ã§ã™ã€‚例ãˆã°ã€`CreationDate`ãŒã‚­ãƒ¼ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ä»–ã®å…¨ã¦ã®ã‚«ãƒ©ãƒ ã®å€¤ã®é †åºã¯ã€`CreationDate`カラムã®å€¤ã®é †åºã¨ä¸€è‡´ã—ã¾ã™ã€‚複数ã®é †åºã‚­ãƒ¼ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã€ã“ã‚Œã¯`SELECT`クエリã®`ORDER BY`å¥ã¨åŒã˜ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã§é †åºä»˜ã‘ã•ã‚Œã¾ã™ã€‚ + +### é †åºã‚­ãƒ¼ã®é¸æŠž + +é †åºã‚­ãƒ¼ã®é¸æŠžã«ãŠã‘る考慮事項ã¨ã‚¹ãƒ†ãƒƒãƒ—ã«ã¤ã„ã¦ã¯ã€postsテーブルを例ã«[ã“ã¡ã‚‰](/ja/data-modeling/schema-design#choosing-an-ordering-key)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 圧縮 + +ClickHouseã®åˆ—指å‘ストレージã¯ã€Postgresã¨æ¯”較ã—ã¦åœ§ç¸®ãŒå¤§å¹…ã«å‘上ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚以下ã¯ã€ä¸¡æ–¹ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§Stack Overflowテーブル全体ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸è¦ä»¶ã‚’比較ã—ãŸã‚‚ã®ã§ã™ï¼š + +```sql +--Postgres +SELECT + schemaname, + tablename, + pg_total_relation_size(schemaname || '.' || tablename) AS total_size_bytes, + pg_total_relation_size(schemaname || '.' || tablename) / (1024 * 1024 * 1024) AS total_size_gb +FROM + pg_tables s +WHERE + schemaname = 'public'; + schemaname | tablename | total_size_bytes | total_size_gb | +------------+-----------------+------------------+---------------+ + public | users | 4288405504 | 3 | + public | posts | 68606214144 | 63 | + public | votes | 20525654016 | 19 | + public | comments | 22888538112 | 21 | + public | posthistory | 125899735040 | 117 | + public | postlinks | 579387392 | 0 | + public | badges | 4989747200 | 4 | +(7 rows) + +--ClickHouse +SELECT + `table`, + formatReadableSize(sum(data_compressed_bytes)) AS compressed_size +FROM system.parts +WHERE (database = 'stackoverflow') AND active +GROUP BY `table` + +┌─table───────┬─compressed_size─┠+│ posts │ 25.17 GiB │ +│ users │ 846.57 MiB │ +│ badges │ 513.13 MiB │ +│ comments │ 7.11 GiB │ +│ votes │ 1.28 GiB │ +│ posthistory │ 40.44 GiB │ +│ postlinks │ 79.22 MiB │ +└─────────────┴─────────────────┘ +``` + +圧縮を最é©åŒ–ã—ã€æ¸¬å®šã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã®è©³ç´°ã¯[ã“ã¡ã‚‰](/ja/data-compression/compression-in-clickhouse)ã«ã¦ç¢ºèªã§ãã¾ã™ã€‚ + +[Part 3ã¯ã“ã¡ã‚‰](/ja/migrations/postgresql/data-modeling-techniques). diff --git a/docs/ja/migrations/postgres/overview.md b/docs/ja/migrations/postgres/overview.md new file mode 100644 index 00000000000..ba5a5c9f128 --- /dev/null +++ b/docs/ja/migrations/postgres/overview.md @@ -0,0 +1,22 @@ +--- +slug: /ja/migrations/postgresql/overview +title: PostgreSQLã‹ã‚‰ClickHouseã¸ã®ç§»è¡Œ +description: PostgreSQLã‹ã‚‰ClickHouseã¸ã®ç§»è¡Œã‚¬ã‚¤ãƒ‰ +keywords: [postgres, postgresql, 移行, マイグレーション] +--- + +## ãªãœPostgresよりClickHouseを使用ã™ã‚‹ã®ã‹ï¼Ÿ + +TLDR: ClickHouseã¯OLAPデータベースã¨ã—ã¦ã€ç‰¹ã«`GROUP BY`クエリを用ã„ãŸé«˜é€Ÿåˆ†æžç”¨ã«è¨­è¨ˆã•ã‚Œã¦ãŠã‚Šã€Postgresã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰å‘ã‘ã®OLTPデータベースã¨ã—ã¦è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +OLTPã€ã™ãªã‚ã¡ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ»ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å‡¦ç†ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³æƒ…報を管ç†ã™ã‚‹ã‚ˆã†ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚PostgresãŒå…¸åž‹çš„ãªä¾‹ã§ã‚ã‚‹ã“れらã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ä¸»ãªç›®çš„ã¯ã€ã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«å¯¾ã—ã¦æ›´æ–°ãƒ–ロックをé€ã‚Šè¾¼ã¿ã€ãã‚ŒãŒå…¨ä½“ã¨ã—ã¦æˆåŠŸã™ã‚‹ã‹å¤±æ•—ã™ã‚‹ã‹ã‚’ä¿è¨¼ã™ã‚‹ã“ã¨ã§ã™ã€‚ã“れらã®ã‚¿ã‚¤ãƒ—ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ä¿è¨¼ã¯ã€ACID特性をæŒã¤OLTPデータベースã®ä¸»ãªç„¦ç‚¹ã§ã‚ã‚Šã€Postgresã®å¤§ããªå¼·ã¿ã§ã™ã€‚ã“れらã®è¦ä»¶ã‚’考慮ã™ã‚‹ã¨ã€OLTPデータベースã¯é€šå¸¸ã€å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«å¯¾ã™ã‚‹åˆ†æžã‚¯ã‚¨ãƒªã®å®Ÿè¡Œæ™‚ã«æ€§èƒ½ã®é™ç•Œã«é”ã—ã¾ã™ã€‚ + +OLAPã€ã™ãªã‚ã¡ã‚ªãƒ³ãƒ©ã‚¤ãƒ³åˆ†æžå‡¦ç†ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã€åˆ†æžãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚’管ç†ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“れらã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ä¸»ãªç›®çš„ã¯ã€ã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ãŒè†¨å¤§ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«å¯¾ã—ã¦åŠ¹çŽ‡çš„ã«ã‚¯ã‚¨ãƒªã‚’実行ã—ã€é›†è¨ˆã§ãるよã†ã«ã™ã‚‹ã“ã¨ã§ã™ã€‚ClickHouseã®ã‚ˆã†ãªãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ OLAPシステムã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§å–ã‚Šè¾¼ã¾ã‚Œã‚‹éš›ã«ã“ã®åˆ†æžã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +より詳細ãªæ¯”較ã«ã¤ã„ã¦ã¯ã€[ã“ã¡ã‚‰ã®ãƒ–ログ投稿](https://clickhouse.com/blog/adding-real-time-analytics-to-a-supabase-application)ã‚’ã”覧ãã ã•ã„。 + +ClickHouseã¨Postgresã®åˆ†æžã‚¯ã‚¨ãƒªã«ãŠã‘る性能ã®é•ã„を確èªã™ã‚‹ã«ã¯ã€[PostgreSQLクエリをClickHouseã§æ›¸ãæ›ãˆã‚‹](/ja/migrations/postgresql/rewriting-queries)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +--- + +**[PostgreSQL移行ガイドをã“ã“ã‹ã‚‰å§‹ã‚ã‚‹](/ja/migrations/postgresql/dataset)。** diff --git a/docs/ja/migrations/postgres/replacing-merge-tree.md b/docs/ja/migrations/postgres/replacing-merge-tree.md new file mode 100644 index 00000000000..50809f8fcab --- /dev/null +++ b/docs/ja/migrations/postgres/replacing-merge-tree.md @@ -0,0 +1,324 @@ +--- +slug: /ja/guides/replacing-merge-tree +title: ReplacingMergeTree +description: ClickHouseã§ã®ReplacingMergeTreeエンジンã®ä½¿ç”¨ +keywords: [replacingmergetree, 挿入, é‡è¤‡æŽ’除] +--- + +トランザクションデータベースã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®æ›´æ–°ã‚„削除ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ãŒã€OLAPデータベースã¯ãã®ã‚ˆã†ãªæ“作ã®ä¿è¨¼ã‚’減少ã•ã›ã€é«˜é€Ÿãªåˆ†æžã‚¯ã‚¨ãƒªã‚’実ç¾ã™ã‚‹ãŸã‚ã«ä¸å¤‰ãƒ‡ãƒ¼ã‚¿ã‚’ãƒãƒƒãƒã§æŒ¿å…¥ã™ã‚‹ã“ã¨ã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ClickHouseã¯ã€çªç„¶å¤‰ç•°ã‚’通ã˜ã¦æ›´æ–°æ“作をæä¾›ã—ã€è¡Œã‚’軽é‡ã«å‰Šé™¤ã™ã‚‹æ‰‹æ®µã‚‚æä¾›ã—ã¦ã„ã¾ã™ãŒã€ãã®åˆ—指å‘ã®æ§‹é€ ã«ã‚ˆã‚Šã€ã“れらã®æ“作ã¯æ³¨æ„æ·±ãスケジュールã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ã“れらã®æ“作ã¯éžåŒæœŸã§å‡¦ç†ã•ã‚Œã€å˜ä¸€ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§è¡Œã‚ã‚Œã€ï¼ˆæ›´æ–°ã®å ´åˆã¯ï¼‰ãƒ‡ãƒ¼ã‚¿ãŒãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãç›´ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã®ãŸã‚ã€å°‘æ•°ã®å°è¦æ¨¡ãªå¤‰æ›´ã«ã¯ä½¿ç”¨ã™ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +上記ã®ä½¿ç”¨ãƒ‘ターンをé¿ã‘ã¤ã¤æ›´æ–°ã¨å‰Šé™¤ã®è¡Œã‚’処ç†ã™ã‚‹ãŸã‚ã«ã€ClickHouseã®ãƒ†ãƒ¼ãƒ–ルエンジンReplaceingMergeTreeを使用ã§ãã¾ã™ã€‚ + +## 挿入ã•ã‚ŒãŸè¡Œã®è‡ªå‹•ã‚¢ãƒƒãƒ—サート + +[ReplacingMergeTreeテーブルエンジン](/ja/engines/table-engines/mergetree-family/replacingmergetree)ã¯ã€éžåŠ¹çŽ‡çš„ãª`ALTER`ã‚„`DELETE`文を使用ã›ãšã«è¡Œã«å¯¾ã—ã¦æ›´æ–°æ“作をé©ç”¨ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒåŒã˜è¡Œã®è¤‡æ•°ã®ã‚³ãƒ”ーを挿入ã—ã€æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’指定ã§ãるよã†ã«ã—ã¾ã™ã€‚ã“ã®ãƒ—ロセスã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§éžåŒæœŸã«å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®è¡Œã‚’削除ã—ã€ä¸å¤‰ã®æŒ¿å…¥ã‚’使用ã—ã¦åŠ¹çŽ‡çš„ã«æ›´æ–°æ“作を模倣ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã€ãƒ†ãƒ¼ãƒ–ルエンジンãŒé‡è¤‡è¡Œã‚’識別ã™ã‚‹èƒ½åŠ›ã«ä¾å­˜ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€`ORDER BY`å¥ã‚’使用ã—ã¦ä¸€æ„性を決定ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦é”æˆã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€`ORDER BY`ã§æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å€¤ãŒåŒã˜ã§ã‚ã‚‹å ´åˆã€2è¡Œã¯é‡è¤‡ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚テーブルを定義ã™ã‚‹éš›ã«æŒ‡å®šã•ã‚Œã‚‹`ãƒãƒ¼ã‚¸ãƒ§ãƒ³`カラムã¯ã€é‡è¤‡ã¨ã—ã¦è­˜åˆ¥ã•ã‚ŒãŸ2è¡Œã®å ´åˆã€ã‚ˆã‚Šé«˜ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®å€¤ã‚’æŒã¤è¡ŒãŒä¿æŒã•ã‚Œã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +以下ã®ä¾‹ã§ã“ã®ãƒ—ロセスを示ã—ã¾ã™ã€‚ã“ã“ã§ã¯ã€è¡Œã¯Aカラム(テーブルã®`ORDER BY`)ã«ã‚ˆã£ã¦ä¸€æ„ã«è­˜åˆ¥ã•ã‚Œã¾ã™ã€‚ã“れらã®è¡Œã¯2ã¤ã®ãƒãƒƒãƒã¨ã—ã¦æŒ¿å…¥ã•ã‚ŒãŸã¨ä»®å®šã—ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«2ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを形æˆã—ã¦ã„ã¾ã™ã€‚後ã§ã€éžåŒæœŸã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセス中ã«ã€ã“れらã®ãƒ‘ーツã¯ä¸€ç·’ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚ + +ReplacingMergeTreeã¯ã•ã‚‰ã«ã€å‰Šé™¤ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯0ã¾ãŸã¯1ã‚’å«ã¿ã€å€¤ãŒ1ã§ã‚ã‚‹å ´åˆã€è¡Œï¼ˆãŠã‚ˆã³ãã®é‡è¤‡ï¼‰ãŒå‰Šé™¤ã•ã‚ŒãŸã“ã¨ã‚’示ã—ã€ãれ以外ã¯ã‚¼ãƒ­ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚**注:削除ã•ã‚ŒãŸè¡Œã¯ãƒžãƒ¼ã‚¸æ™‚ã«å‰Šé™¤ã•ã‚Œã¾ã›ã‚“。** + +ã“ã®ãƒ—ロセス中ã«ã€ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ä¸­ã«æ¬¡ã®ã“ã¨ãŒè¡Œã‚ã‚Œã¾ã™ï¼š + +- カラムAã®å€¤1ã§è­˜åˆ¥ã•ã‚ŒãŸè¡Œã¯ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³2ã®æ›´æ–°è¡Œã¨ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³3ã®å‰Šé™¤è¡Œï¼ˆãŠã‚ˆã³å‰Šé™¤ã‚«ãƒ©ãƒ ã®å€¤1)をæŒã£ã¦ã„ã¾ã™ã€‚削除ã•ã‚ŒãŸæœ€æ–°ã®è¡ŒãŒä¿æŒã•ã‚Œã¾ã™ã€‚ +- カラムAã®å€¤2ã§è­˜åˆ¥ã•ã‚ŒãŸè¡Œã¯2ã¤ã®æ›´æ–°è¡Œã‚’æŒã£ã¦ãŠã‚Šã€å¾Œè€…ã®è¡ŒãŒä¾¡æ ¼ã‚«ãƒ©ãƒ ã®å€¤6ã§ä¿æŒã•ã‚Œã¾ã™ã€‚ +- カラムAã®å€¤3ã§è­˜åˆ¥ã•ã‚ŒãŸè¡Œã¯ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³1ã®è¡Œã¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³2ã®å‰Šé™¤è¡ŒãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å‰Šé™¤è¡ŒãŒä¿æŒã•ã‚Œã¾ã™ã€‚ + +ã“ã®ãƒžãƒ¼ã‚¸ãƒ—ロセスã®çµæžœã¨ã—ã¦ã€æœ€çµ‚状態を表ã™4è¡ŒãŒå¾—られã¾ã™ã€‚ + +
    + +NEEDS ALT + +
    + +削除ã•ã‚ŒãŸè¡Œã¯æ±ºã—ã¦å‰Šé™¤ã•ã‚Œãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“れらã¯`OPTIMIZE table FINAL CLEANUP`ã§å¼·åˆ¶çš„ã«å‰Šé™¤ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªè¨­å®š`allow_experimental_replacing_merge_with_cleanup=1`ãŒå¿…è¦ã§ã™ã€‚ã“ã‚Œã¯æ¬¡ã®æ¡ä»¶ä¸‹ã§ã®ã¿ç™ºè¡Œã•ã‚Œã‚‹ã¹ãã§ã™ï¼š + +1. クリーンアップã§å‰Šé™¤ã•ã‚ŒãŸè¡Œã«å¯¾ã—ã¦å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®è¡ŒãŒæ“作発行後ã«æŒ¿å…¥ã•ã‚Œãªã„ã“ã¨ã‚’確èªã§ãã‚‹å ´åˆã€‚ã“れらãŒæŒ¿å…¥ã•ã‚ŒãŸå ´åˆã€å‰Šé™¤ã•ã‚ŒãŸè¡ŒãŒã‚‚ã¯ã‚„存在ã—ãªã„ãŸã‚ã€èª¤ã£ã¦ä¿æŒã•ã‚Œã¾ã™ã€‚ +2. クリーンアップを発行ã™ã‚‹å‰ã«ã™ã¹ã¦ã®ãƒ¬ãƒ—リカãŒåŒæœŸã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ã“ã‚Œã¯æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã§é”æˆã§ãã¾ã™ï¼š + +
    + +```sql +SYSTEM SYNC REPLICA table +``` + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¨å¾Œç¶šã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ãŒå®Œäº†ã™ã‚‹ã¾ã§ã€æŒ¿å…¥ã‚’一時åœæ­¢ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +> ReplacingMergeTreeã§å‰Šé™¤ã‚’扱ã†ã“ã¨ã¯ã€ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—を上記ã®æ¡ä»¶ã§ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ãる期間を除ãã€å‰Šé™¤æ•°ãŒå°‘ã‹ã‚‰ä¸­ç¨‹åº¦ï¼ˆ10%未満)ã®ãƒ†ãƒ¼ãƒ–ルã«ã®ã¿æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +> ヒント: ユーザーã¯ã€å¤‰æ›´ãŒãªã„é¸æŠžçš„ãªãƒ‘ーティションã«å¯¾ã—ã¦`OPTIMIZE FINAL CLEANUP`を発行ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## 主キー/é‡è¤‡æŽ’除キーã®é¸æŠž + +上記ã§èª¬æ˜Žã—ãŸã‚ˆã†ã«ã€ReplacingMergeTreeã®å ´åˆã«ã¯æº€ãŸã•ã‚Œã‚‹ã¹ãé‡è¦ãªè¿½åŠ ã®åˆ¶ç´„ãŒã‚ã‚Šã¾ã™ï¼š`ORDER BY`カラムã®å€¤ãŒå¤‰æ›´ã‚’ã¾ãŸã„ã§è¡Œã‚’一æ„ã«è­˜åˆ¥ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ã“ã¨ã§ã™ã€‚Postgresã®ã‚ˆã†ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ç§»è¡Œã™ã‚‹å ´åˆã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã®Postgres主キーã¯ClickHouseã®`ORDER BY`å¥ã«å«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€è‡ªåˆ†ã®ãƒ†ãƒ¼ãƒ–ルã®`ORDER BY`å¥ã§ã‚«ãƒ©ãƒ ã‚’é¸æŠžã™ã‚‹ã“ã¨ã«[クエリパフォーマンスを最é©åŒ–ã™ã‚‹](/ja/data-modeling/schema-design#choosing-an-ordering-key)ã“ã¨ã«æ…£ã‚Œã¦ã„ã¾ã™ã€‚一般的ã«ã€ã“れらã®ã‚«ãƒ©ãƒ ã¯ã€[é »ç¹ãªã‚¯ã‚¨ãƒªã«åŸºã¥ã„ã¦é¸æŠžã•ã‚Œã€å¢—加ã™ã‚‹ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã«å¿œã˜ã¦ãƒªã‚¹ãƒˆã•ã‚Œã‚‹ã¹ãã§ã™](/ja/optimize/sparse-primary-indexes)。é‡è¦ãªãƒã‚¤ãƒ³ãƒˆã¨ã—ã¦ã€ReplacingMergeTreeã¯è¿½åŠ ã®åˆ¶ç´„を課ã—ã¾ã™ - ã“れらã®ã‚«ãƒ©ãƒ ã¯ä¸å¤‰ã§ãªã‘ã‚Œã°ãªã‚‰ãšã€ã¤ã¾ã‚ŠPostgresã‹ã‚‰ã®ãƒ¬ãƒ—リケーションã®å ´åˆã€åŸºã«ãªã‚‹Postgresデータã§å¤‰æ›´ã•ã‚Œãªã„カラムã®ã¿ã‚’ã“ã®å¥ã«è¿½åŠ ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ä»–ã®ã‚«ãƒ©ãƒ ã¯å¤‰æ›´ã§ãã‚‹ãŒã€ã“れらã¯ä¸€æ„ã®è¡Œè­˜åˆ¥ã®ãŸã‚ã«ä¸€è²«ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +分æžãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã§ã¯ãƒã‚¹ãƒˆã‚°ãƒ¬ã‚¹ã®ä¸»ã‚­ãƒ¼ã¯ä¸€èˆ¬çš„ã«ã‚ã¾ã‚Šå½¹ç«‹ãŸãªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€ãªãœãªã‚‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã¾ã‚Œã«ãƒã‚¤ãƒ³ãƒˆè¡Œã®ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’è¡Œã†ã‹ã‚‰ã§ã™ã€‚カラムã¯å¢—加ã™ã‚‹ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã®é †ã«ä¸¦ã¹ã‚‰ã‚Œã‚‹ã¹ãã¨è¿°ã¹ãŸé€šã‚Šã€ãŠã‚ˆã³[ORDER BYã§ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„るカラムã®ãƒžãƒƒãƒãƒ³ã‚°ãŒé€šå¸¸ã‚ˆã‚Šé«˜é€Ÿã§ã‚ã‚‹](/ja/optimize/sparse-primary-indexes#secondary-key-columns-can-not-be-inefficient)ãŸã‚ã€Postgres主キーã¯`ORDER BY`ã®æœ€å¾Œã«è¿½åŠ ã•ã‚Œã‚‹ã¹ãã§ã™ï¼ˆåˆ†æžçš„価値ãŒã‚ã‚‹å ´åˆã‚’除ãã¾ã™ï¼‰ã€‚Postgresã§è¤‡æ•°ã®ã‚«ãƒ©ãƒ ãŒä¸»ã‚­ãƒ¼ã‚’å½¢æˆã™ã‚‹å ´åˆã¯ã€ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã¨ã‚¯ã‚¨ãƒªå€¤ã®å¯èƒ½æ€§ã‚’考慮ã—ã¦ã€`ORDER BY`ã«è¿½åŠ ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ã¾ãŸã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯`MATERIALIZED`カラムを通ã˜ã¦å€¤ã®é€£çµã‚’使用ã—ã¦ä¸€æ„ã®ä¸»ã‚­ãƒ¼ã‚’生æˆã™ã‚‹ã“ã¨ã‚’考慮ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +Stack Overflowデータセットã‹ã‚‰ã®ãƒã‚¹ãƒˆãƒ†ãƒ¼ãƒ–ルを考ãˆã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +CREATE TABLE stackoverflow.posts_updateable +( + `Version` UInt32, + `Deleted` UInt8, + `Id` Int32 CODEC(Delta(4), ZSTD(1)), + `PostTypeId` Enum8('Question' = 1, 'Answer' = 2, 'Wiki' = 3, 'TagWikiExcerpt' = 4, 'TagWiki' = 5, 'ModeratorNomination' = 6, 'WikiPlaceholder' = 7, 'PrivilegeWiki' = 8), + `AcceptedAnswerId` UInt32, + `CreationDate` DateTime64(3, 'UTC'), + `Score` Int32, + `ViewCount` UInt32 CODEC(Delta(4), ZSTD(1)), + `Body` String, + `OwnerUserId` Int32, + `OwnerDisplayName` String, + `LastEditorUserId` Int32, + `LastEditorDisplayName` String, + `LastEditDate` DateTime64(3, 'UTC') CODEC(Delta(8), ZSTD(1)), + `LastActivityDate` DateTime64(3, 'UTC'), + `Title` String, + `Tags` String, + `AnswerCount` UInt16 CODEC(Delta(2), ZSTD(1)), + `CommentCount` UInt8, + `FavoriteCount` UInt8, + `ContentLicense` LowCardinality(String), + `ParentId` String, + `CommunityOwnedDate` DateTime64(3, 'UTC'), + `ClosedDate` DateTime64(3, 'UTC') +) +ENGINE = ReplacingMergeTree(Version, Deleted) +PARTITION BY toYear(CreationDate) +ORDER BY (PostTypeId, toDate(CreationDate), CreationDate, Id) +``` + +`ORDER BY`キーã¨ã—ã¦`(PostTypeId, toDate(CreationDate), CreationDate, Id)`を使用ã—ã¦ã„ã¾ã™ã€‚å„投稿ã«ä¸€æ„ã®`Id`カラムã¯ã€è¡ŒãŒé‡è¤‡æŽ’除ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚スキーマã«å¿…è¦ã«å¿œã˜ã¦`Version`ãŠã‚ˆã³`Deleted`カラムを追加ã—ã¾ã™ã€‚ + +## ReplacingMergeTreeã®ã‚¯ã‚¨ãƒª + +マージ時ã«ã€ReplacingMergeTreeã¯`ORDER BY`カラムã®å€¤ã‚’一æ„ã®è­˜åˆ¥å­ã¨ã—ã¦ä½¿ç”¨ã—ã¦é‡è¤‡è¡Œã‚’識別ã—ã€æœ€é«˜ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ä¿æŒã™ã‚‹ã‹ã€æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒå‰Šé™¤ã‚’示ã™å ´åˆã¯ã™ã¹ã¦ã®é‡è¤‡ã‚’削除ã—ã¾ã™ã€‚ãŸã ã—ã€ã“ã‚Œã¯æœ€çµ‚çš„ãªæ­£ç¢ºæ€§ã®ã¿ã‚’æä¾›ã—ã€è¡ŒãŒé‡è¤‡æŽ’除ã•ã‚Œã‚‹ä¿è¨¼ã¯ã‚ã‚Šã¾ã›ã‚“。ã¾ãŸã€ãã‚Œã«ä¾å­˜ã™ã‚‹ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。ãã®ãŸã‚ã€ã‚¯ã‚¨ãƒªã¯æ›´æ–°ãŠã‚ˆã³å‰Šé™¤è¡ŒãŒã‚¯ã‚¨ãƒªã§è€ƒæ…®ã•ã‚Œã‚‹ãŸã‚ã€èª¤ã£ãŸå›žç­”を生æˆã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +正確ãªå›žç­”ã‚’å¾—ã‚‹ãŸã‚ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ ã§ã®é‡è¤‡æŽ’除ãŠã‚ˆã³å‰Šé™¤å‰Šé™¤ã¨ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã®ãƒžãƒ¼ã‚¸ã‚’補完ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯`FINAL`オペレーターを使用ã—ã¦å®Ÿç¾ã§ãã¾ã™ã€‚ + +上記ã®æŠ•ç¨¿ãƒ†ãƒ¼ãƒ–ルを考ãˆã¦ã¿ã¾ã—ょã†ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’ロードã™ã‚‹é€šå¸¸ã®æ–¹æ³•ã‚’使用ã§ãã¾ã™ãŒã€å‰Šé™¤ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚«ãƒ©ãƒ ã‚’指定ã—ã€å€¤ã‚’0ã«åŠ ãˆã¾ã™ã€‚例ã¨ã—ã¦ã€10000è¡Œã®ã¿ã‚’ロードã—ã¾ã™ã€‚ + +```sql +INSERT INTO stackoverflow.posts_updateable SELECT 0 AS Version, 0 AS Deleted, * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/*.parquet') WHERE AnswerCount > 0 LIMIT 10000 + +0 rows in set. Elapsed: 1.980 sec. Processed 8.19 thousand rows, 3.52 MB (4.14 thousand rows/s., 1.78 MB/s.) +``` + +行数を確èªã—ã¾ã—ょã†ï¼š + +```sql +SELECT count() FROM stackoverflow.posts_updateable + +┌─count()─┠+│ 10000 │ +└─────────┘ + +1 row in set. Elapsed: 0.002 sec. +``` + +投稿回答ã®çµ±è¨ˆã‚’æ›´æ–°ã—ã¾ã™ã€‚ã“れらã®å€¤ã‚’æ›´æ–°ã™ã‚‹ã®ã§ã¯ãªãã€5000è¡Œã®æ–°ã—ã„コピーを挿入ã—ã€ãã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’1ã¤è¿½åŠ ã—ã¾ã™ï¼ˆã“ã‚Œã«ã‚ˆã‚Šã€ãƒ†ãƒ¼ãƒ–ル内ã«150è¡Œã®è¡ŒãŒå­˜åœ¨ã—ã¾ã™ï¼‰ã€‚ `INSERT INTO SELECT`を使用ã—ã¦ã“れをシミュレートã§ãã¾ã™ï¼š + +```sql +INSERT INTO posts_updateable SELECT + Version + 1 AS Version, + Deleted, + Id, + PostTypeId, + AcceptedAnswerId, + CreationDate, + Score, + ViewCount, + Body, + OwnerUserId, + OwnerDisplayName, + LastEditorUserId, + LastEditorDisplayName, + LastEditDate, + LastActivityDate, + Title, + Tags, + AnswerCount, + CommentCount, + FavoriteCount, + ContentLicense, + ParentId, + CommunityOwnedDate, + ClosedDate +FROM posts_updateable --select 100 random rows +WHERE (Id % toInt32(floor(randUniform(1, 11)))) = 0 +LIMIT 5000 + +0 rows in set. Elapsed: 4.056 sec. Processed 1.42 million rows, 2.20 GB (349.63 thousand rows/s., 543.39 MB/s.) +``` + +ã•ã‚‰ã«ã€å‰Šé™¤ã‚«ãƒ©ãƒ ã®å€¤1ã§è¡Œã‚’å†æŒ¿å…¥ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€1000個ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæŠ•ç¨¿ã‚’削除ã—ã¾ã™ã€‚ã“れもシンプルãª`INSERT INTO SELECT`ã§ã‚·ãƒŸãƒ¥ãƒ¬ãƒ¼ãƒˆã§ãã¾ã™ã€‚ + +```sql +INSERT INTO posts_updateable SELECT + Version + 1 AS Version, + 1 AS Deleted, + Id, + PostTypeId, + AcceptedAnswerId, + CreationDate, + Score, + ViewCount, + Body, + OwnerUserId, + OwnerDisplayName, + LastEditorUserId, + LastEditorDisplayName, + LastEditDate, + LastActivityDate, + Title, + Tags, + AnswerCount + 1 AS AnswerCount, + CommentCount, + FavoriteCount, + ContentLicense, + ParentId, + CommunityOwnedDate, + ClosedDate +FROM posts_updateable --select 100 random rows +WHERE (Id % toInt32(floor(randUniform(1, 11)))) = 0 AND AnswerCount > 0 +LIMIT 1000 + +0 rows in set. Elapsed: 0.166 sec. Processed 135.53 thousand rows, 212.65 MB (816.30 thousand rows/s., 1.28 GB/s.) +``` + +上記ã®æ“作ã®çµæžœã¨ã—ã¦16,000行をæŒã¤ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ã¤ã¾ã‚Šã€10,000 + 5000 + 1000ã§ã™ã€‚ã“ã“ã§ã®æ­£ã—ã„åˆè¨ˆã¯ã€å®Ÿéš›ã«ã¯å…ƒã®åˆè¨ˆã‹ã‚‰1000行少ãªã„ã¯ãšã§ã™ã€‚ã¤ã¾ã‚Šã€10,000 - 1000 = 9000ã§ã™ã€‚ + +```sql +SELECT count() +FROM posts_updateable + +┌─count()─┠+│ 10000 │ +└─────────┘ +1 row in set. Elapsed: 0.002 sec. +``` + +ã“ã“ã§ã®çµæžœã¯ã€ç™ºç”Ÿã—ãŸãƒžãƒ¼ã‚¸ã«ã‚ˆã£ã¦ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚テーブルã«`FINAL`ã‚’é©ç”¨ã™ã‚‹ã¨ã€æ­£ã—ã„çµæžœãŒå¾—られã¾ã™ã€‚ + +```sql +SELECT count() +FROM posts_updateable +FINAL + +┌─count()─┠+│ 9000 │ +└─────────┘ + +1 row in set. Elapsed: 0.006 sec. Processed 11.81 thousand rows, 212.54 KB (2.14 million rows/s., 38.61 MB/s.) +Peak memory usage: 8.14 MiB. +``` + +## FINALã®ãƒ‘フォーマンス + +`FINAL`オペレーターã¯ã‚¯ã‚¨ãƒªã«ãƒ‘フォーマンスã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’生ã˜ã¾ã™ã€‚ã“ã‚Œã«å¯¾ã™ã‚‹é€²è¡Œä¸­ã®æ”¹å–„ã«ã‚‚ã‹ã‹ã‚らãšã€ç‰¹ã«ãƒ—ライマリキーã®ã‚«ãƒ©ãƒ ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ãªã„クエリã®å ´åˆã«é¡•è‘—ã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚ˆã‚Šå¤šãã®ãƒ‡ãƒ¼ã‚¿ãŒèª­ã¿è¾¼ã¾ã‚Œã€é‡è¤‡æŽ’除ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒå¢—加ã—ã¾ã™ã€‚ユーザーãŒ`WHERE`æ¡ä»¶ã§ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã‚’フィルタリングã™ã‚‹å ´åˆã€èª­ã¿è¾¼ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ãŒæ¸›å°‘ã—ã€é‡è¤‡æŽ’除ã®å¯¾è±¡ã¨ãªã‚‹éƒ¨åˆ†ã‚‚減少ã—ã¾ã™ã€‚ + +`WHERE`æ¡ä»¶ã«ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ãŒä½¿ç”¨ã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯ç¾åœ¨ã®ã¨ã“ã‚`FINAL`を使用ã—ã¦`PREWHERE`最é©åŒ–を活用ã—ã¦ã„ã¾ã›ã‚“。ã“ã®æœ€é©åŒ–ã¯ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã¦ã„ãªã„カラムã®èª­ã¿å–る行を減少ã•ã›ã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚`PREWHERE`を模倣ã—ã€æ½œåœ¨çš„ã«ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹æ–¹æ³•ã®ä¾‹ã¯ã€[ã“ã¡ã‚‰](https://clickhouse.com/blog/clickhouse-postgresql-change-data-capture-cdc-part-1#final-performance)ã‚’ã”覧ãã ã•ã„。 + +## ReplacingMergeTreeã§ã®ãƒ‘ーティションã®æ´»ç”¨ + +ClickHouseã§ã®ãƒ‡ãƒ¼ã‚¿ã®ãƒžãƒ¼ã‚¸ã¯ã€ãƒ‘ーティションレベルã§è¡Œã‚ã‚Œã¾ã™ã€‚ReplacingMergeTreeを使用ã™ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æœ€å–„ã®ãƒ‘ーティションã®å®Ÿè·µã«å¾“ã£ã¦ãƒ†ãƒ¼ãƒ–ルを分散ã•ã›ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ãŸã ã—ã€ç‰¹ã«**è¡Œã«å¯¾ã—ã¦ã“ã®ãƒ‘ーティショニングキーãŒå¤‰æ›´ã•ã‚Œãªã„ã“ã¨ã‚’確èªã§ãã‚‹å ´åˆã«é™ã‚Šã¾ã™**。ã“ã‚Œã«ã‚ˆã‚Šã€åŒã˜è¡Œã«é–¢é€£ã™ã‚‹æ›´æ–°ãŒåŒã˜ClickHouseã®ãƒ‘ーティションã«é€ä¿¡ã•ã‚Œã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¾ã™ã€‚Postgresã®åŒã˜ãƒ‘ーティションキーをå†åˆ©ç”¨ã—ã¦ã‚‚よã„ãŒã€ã“ã“ã§æ¦‚説ã•ã‚ŒãŸãƒ™ã‚¹ãƒˆãƒ—ラクティスã«å¾“ã†ã“ã¨ã‚’æ¡ä»¶ã¨ã—ã¾ã™ã€‚ + +ã“ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯`do_not_merge_across_partitions_select_final=1`設定を使用ã—ã¦`FINAL`クエリã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®è¨­å®šã«ã‚ˆã‚Šã€`FINAL`を使用ã—ã¦ã„ã‚‹ã¨ãã«ãƒ‘ーティションãŒå€‹åˆ¥ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã¦å‡¦ç†ã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + +パーティショニングを使用ã—ãªã„投稿テーブルを考ãˆã¦ã¿ã¾ã—ょã†ï¼š + +```sql +CREATE TABLE stackoverflow.posts_no_part +( + `Version` UInt32, + `Deleted` UInt8, + `Id` Int32 CODEC(Delta(4), ZSTD(1)), + … +) +ENGINE = ReplacingMergeTree +ORDER BY (PostTypeId, toDate(CreationDate), CreationDate, Id) + +INSERT INTO stackoverflow.posts_no_part SELECT 0 AS Version, 0 AS Deleted, * +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/stackoverflow/parquet/posts/*.parquet') + +0 rows in set. Elapsed: 182.895 sec. Processed 59.82 million rows, 38.07 GB (327.07 thousand rows/s., 208.17 MB/s.) +``` + +`FINAL`ãŒã„ãã¤ã‹ã®ä½œæ¥­ã‚’è¡Œã†ã“ã¨ã‚’å¿…è¦ã¨ã™ã‚‹ãŸã‚ã«ã€1mã®è¡Œã‚’æ›´æ–°ã—ã€ãã®`AnswerCount`ã‚’é‡è¤‡è¡Œã‚’挿入ã—ã¦ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã—ã¾ã™ã€‚ + +```sql +INSERT INTO posts_no_part SELECT Version + 1 AS Version, Deleted, Id, PostTypeId, AcceptedAnswerId, CreationDate, Score, ViewCount, Body, OwnerUserId, OwnerDisplayName, LastEditorUserId, LastEditorDisplayName, LastEditDate, LastActivityDate, Title, Tags, AnswerCount + 1 AS AnswerCount, CommentCount, FavoriteCount, ContentLicense, ParentId, CommunityOwnedDate, ClosedDate +FROM posts_no_part +LIMIT 1000000 +``` + +`FINAL`ã§å¹´ã”ã¨ã®å›žç­”ã®åˆè¨ˆã‚’計算ã™ã‚‹ï¼š + +```sql +SELECT toYear(CreationDate) AS year, sum(AnswerCount) AS total_answers +FROM posts_no_part +FINAL +GROUP BY year +ORDER BY year ASC + +┌─year─┬─total_answers─┠+│ 2008 │ 371480 │ +… +│ 2024 │ 127765 │ +└──────┴───────────────┘ + +17 rows in set. Elapsed: 2.338 sec. Processed 122.94 million rows, 1.84 GB (52.57 million rows/s., 788.58 MB/s.) +Peak memory usage: 2.09 GiB. +``` + +パーティションを年ã”ã¨ã«åŒºåˆ‡ã‚‹ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦åŒã˜æ‰‹é †ã‚’ç¹°ã‚Šè¿”ã—ã€`do_not_merge_across_partitions_select_final=1`を使用ã—ã¦ä¸Šè¨˜ã®ã‚¯ã‚¨ãƒªã‚’å†åº¦å®Ÿè¡Œã—ã¾ã™ã€‚ + +```sql +CREATE TABLE stackoverflow.posts_with_part +( + `Version` UInt32, + `Deleted` UInt8, + `Id` Int32 CODEC(Delta(4), ZSTD(1)), + ... +) +ENGINE = ReplacingMergeTree +PARTITION BY toYear(CreationDate) +ORDER BY (PostTypeId, toDate(CreationDate), CreationDate, Id) + +// populate & update omitted + +SELECT toYear(CreationDate) AS year, sum(AnswerCount) AS total_answers +FROM posts_with_part +FINAL +GROUP BY year +ORDER BY year ASC + +┌─year─┬─total_answers─┠+│ 2008 │ 387832 │ +│ 2009 │ 1165506 │ +│ 2010 │ 1755437 │ +... +│ 2023 │ 787032 │ +│ 2024 │ 127765 │ +└──────┴───────────────┘ + +17 rows in set. Elapsed: 0.994 sec. Processed 64.65 million rows, 983.64 MB (65.02 million rows/s., 989.23 MB/s.) +``` + +示ã•ã‚Œã¦ã„るよã†ã«ã€ãƒ‘ーティショニングã«ã‚ˆã‚Šã€ã“ã®å ´åˆã€é‡è¤‡æŽ’除プロセスãŒãƒ‘ーティションレベルã§ä¸¦è¡Œã—ã¦è¡Œã‚れるã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスãŒå¤§å¹…ã«å‘上ã—ã¾ã—ãŸã€‚ + +## 大ããªãƒ‘ートã®ãƒžãƒ¼ã‚¸å‹•ä½œ + +ClickHouseã®ReplacingMergeTreeエンジンã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツをマージã—ã¦é‡è¤‡è¡Œã‚’管ç†ã—ã€æŒ‡å®šã•ã‚ŒãŸä¸€æ„ã®ã‚­ãƒ¼ã«åŸºã¥ã„ã¦å„è¡Œã®æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã¿ã‚’ä¿æŒã™ã‚‹ã‚ˆã†ã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ã—ã‹ã—ã€ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒ‘ートãŒ[`max_bytes_to_merge_at_max_space_in_pool`](/docs/ja/operations/settings/merge-tree-settings#max-bytes-to-merge-at-max-space-in-pool)ã®ã—ãã„値ã«é”ã™ã‚‹ã¨ã€ã•ã‚‰ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹å¯¾è±¡ã¨ã—ã¦é¸æŠžã•ã‚Œãªããªã‚Šã¾ã™ã€‚ãŸã¨ãˆ[`min_age_to_force_merge_seconds`](/docs/ja/operations/settings/merge-tree-settings#min_age_to_force_merge_seconds)ãŒè¨­å®šã•ã‚Œã¦ã„ãŸã¨ã—ã¦ã‚‚ã§ã™ã€‚ãã®çµæžœã€è‡ªå‹•ãƒžãƒ¼ã‚¸ã«é ¼ã£ã¦é€²è¡Œä¸­ã®ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ã§ç´¯ç©ã™ã‚‹é‡è¤‡ã‚’削除ã™ã‚‹ã“ã¨ãŒã§ããªããªã‚Šã¾ã™ã€‚ + +ã“ã®å•é¡Œã«å¯¾å‡¦ã™ã‚‹ãŸã‚ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯`OPTIMIZE FINAL`を呼ã³å‡ºã—ã¦æ‰‹å‹•ã§ãƒ‘ーツをマージã—ã€é‡è¤‡ã‚’削除ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚自動的ãªãƒžãƒ¼ã‚¸ã¨ã¯ç•°ãªã‚Šã€`OPTIMIZE FINAL`ã¯`max_bytes_to_merge_at_max_space_in_pool`ã—ãã„値を無視ã—ã€åˆ©ç”¨å¯èƒ½ãªãƒªã‚½ãƒ¼ã‚¹ã€ç‰¹ã«ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã«åŸºã¥ã„ã¦ã€å„パーティションã«å˜ä¸€ã®ãƒ‘ートãŒæ®‹ã‚‹ã¾ã§ãƒ‘ーツをマージã—ã¾ã™ã€‚ãŸã ã—ã€ã“ã®ã‚¢ãƒ—ローãƒã¯å¤§ããªãƒ†ãƒ¼ãƒ–ルã§ãƒ¡ãƒ¢ãƒªã‚’集中的ã«ä½¿ç”¨ã—ã€æ–°ã—ã„データãŒè¿½åŠ ã•ã‚Œã‚‹ã¨å†åº¦å®Ÿè¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +パフォーマンスを維æŒã—ã¤ã¤ã€ã‚ˆã‚ŠæŒç¶šå¯èƒ½ãªè§£æ±ºç­–ã¨ã—ã¦ã€ãƒ†ãƒ¼ãƒ–ルをパーティショニングã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツãŒæœ€å¤§ãƒžãƒ¼ã‚¸ã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã®ã‚’防ãŽã€ç¶™ç¶šçš„ãªæ‰‹å‹•ã®æœ€é©åŒ–ã®å¿…è¦æ€§ãŒæ¸›å°‘ã—ã¾ã™ã€‚ diff --git a/docs/ja/migrations/snowflake.md b/docs/ja/migrations/snowflake.md new file mode 100644 index 00000000000..9fc6bc8ab76 --- /dev/null +++ b/docs/ja/migrations/snowflake.md @@ -0,0 +1,110 @@ +--- +sidebar_label: Snowflake +sidebar_position: 20 +slug: /ja/migrations/snowflake +description: Snowflakeã‹ã‚‰ClickHouseã¸ã®ç§»è¡Œ +keywords: [migrate, migration, migrating, data, etl, elt, snowflake] +--- + +# Snowflakeã‹ã‚‰ClickHouseã¸ã®ç§»è¡Œ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€Snowflakeã‹ã‚‰ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œæ–¹æ³•ã‚’紹介ã—ã¾ã™ã€‚ + +Snowflakeã¨ClickHouseé–“ã§ã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œã«ã¯ã€è»¢é€ç”¨ã®ä¸­é–“ストレージã¨ã—ã¦S3ãªã©ã®ã‚ªãƒ–ジェクトストアを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ç§»è¡Œãƒ—ロセスã§ã¯ã€Snowflakeã®`COPY INTO`コマンドã¨ClickHouseã®`INSERT INTO SELECT`コマンドを使用ã—ã¾ã™ã€‚ + +## 1. Snowflakeã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +Migrating from Snowflake to ClickHouse + +上記ã®å›³ã«ç¤ºã•ã‚Œã¦ã„るよã†ã«ã€Snowflakeã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯å¤–部ステージを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +次ã®ã‚ˆã†ãªã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¤Snowflakeテーブルをエクスãƒãƒ¼ãƒˆã™ã‚‹å ´åˆã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +CREATE TABLE MYDATASET ( + timestamp TIMESTAMP, + some_text varchar, + some_file OBJECT, + complex_data VARIANT, +) DATA_RETENTION_TIME_IN_DAYS = 0; +``` + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseデータベースã«ç§»å‹•ã™ã‚‹ã«ã¯ã€ã¾ãšã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’外部ステージã«ã‚³ãƒ”ーã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚データã®ã‚³ãƒ”ー時ã«ã¯ã€ã‚¿ã‚¤ãƒ—情報ã®å…±æœ‰ã€ç²¾åº¦ã®ä¿æŒã€åŠ¹çŽ‡çš„ãªåœ§ç¸®ã€åˆ†æžã§ä¸€èˆ¬çš„ãªãƒã‚¹ãƒˆæ§‹é€ ã®ãƒã‚¤ãƒ†ã‚£ãƒ–サãƒãƒ¼ãƒˆãŒå¯èƒ½ãªParquetå½¢å¼ã‚’推奨ã—ã¾ã™ã€‚ + +以下ã®ä¾‹ã§ã¯ã€Parquetã¨å¸Œæœ›ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚ªãƒ—ションを表ã™åå‰ä»˜ãファイルフォーマットをSnowflakeã§ä½œæˆã—ã¾ã™ã€‚ãã—ã¦ã©ã®ãƒã‚±ãƒƒãƒˆã«ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’コピーã™ã‚‹ã‹ã‚’指定ã—ã€æœ€å¾Œã«ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’ãƒã‚±ãƒƒãƒˆã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ + +```sql +CREATE FILE FORMAT my_parquet_format TYPE = parquet; + +-- S3ãƒã‚±ãƒƒãƒˆã¸ã®ã‚³ãƒ”ーを指定ã™ã‚‹å¤–部ステージを作æˆã—ã¾ã™ +CREATE OR REPLACE STAGE external_stage +URL='s3://mybucket/mydataset' +CREDENTIALS=(AWS_KEY_ID='' AWS_SECRET_KEY='') +FILE_FORMAT = my_parquet_format; + +-- ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«"mydataset"プレフィックスを付ã‘ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€å¤§ã‚µã‚¤ã‚ºã‚’150MBã«æŒ‡å®šã—ã¾ã™ã€‚ +-- `header=true`パラメータã¯ã‚«ãƒ©ãƒ åã‚’å–å¾—ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ +COPY INTO @external_stage/mydataset from mydataset max_file_size=157286400 header=true; +``` + +ç´„5TBã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§æœ€å¤§ãƒ•ã‚¡ã‚¤ãƒ«ã‚µã‚¤ã‚º150MBã€åŒã˜AWS `us-east-1`地域ã«ã‚ã‚‹2X-Large Snowflake warehouseを使用ã—ãŸå ´åˆã€S3ãƒã‚±ãƒƒãƒˆã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚³ãƒ”ーã¯ç´„30分ã‹ã‹ã‚Šã¾ã™ã€‚ + +## 2. ClickHouseã¸ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ + +データãŒä¸­é–“ã®ã‚ªãƒ–ジェクトストレージã«ã‚¹ãƒ†ãƒ¼ã‚¸ãƒ³ã‚°ã•ã‚ŒãŸã‚‰ã€ClickHouseã®[s3 テーブル関数](/docs/ja/sql-reference/table-functions/s3)ãªã©ã®æ©Ÿèƒ½ã‚’使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚’テーブルã«æŒ¿å…¥ã§ãã¾ã™ã€‚ + +以下ã®ä¾‹ã§ã¯ã€AWS S3用ã®[s3 テーブル関数](/docs/ja/sql-reference/table-functions/s3)を使用ã—ã¦ã„ã¾ã™ãŒã€Google Cloud Storageã«ã¯[gcs テーブル関数](/docs/ja/sql-reference/table-functions/gcs)ã€Azure Blob Storageã«ã¯[azureBlobStorage テーブル関数](/docs/ja/sql-reference/table-functions/azureBlobStorage)を使用ã§ãã¾ã™ã€‚ + +次ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã‚¹ã‚­ãƒ¼ãƒžã‚’想定ã—ã¦ã„ã¾ã™ï¼š + +```sql +CREATE TABLE default.mydataset +( + `timestamp` DateTime64(6), + `some_text` String, + `some_file` Tuple(filename String, version String), + `complex_data` Tuple(name String, description String), +) +ENGINE = MergeTree +ORDER BY (timestamp) +``` + +ã“ã®å ´åˆã€S3ã‹ã‚‰ClickHouseテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ãŸã‚ã«`INSERT INTO SELECT`コマンドを使用ã§ãã¾ã™ï¼š + +```sql +INSERT INTO mydataset +SELECT + timestamp, + some_text, + JSONExtract( + ifNull(some_file, '{}'), + 'Tuple(filename String, version String)' + ) AS some_file, + JSONExtract( + ifNull(complex_data, '{}'), + 'Tuple(filename String, description String)' + ) AS complex_data, +FROM s3('https://mybucket.s3.amazonaws.com/mydataset/mydataset*.parquet') +SETTINGS input_format_null_as_default = 1, -- 値ãŒnullã®å ´åˆã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨ã—ã¦ã‚«ãƒ©ãƒ ã‚’挿入ã™ã‚‹ +input_format_parquet_case_insensitive_column_matching = 1 -- ソースデータã¨ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ル間ã®ã‚«ãƒ©ãƒ ãƒžãƒƒãƒãƒ³ã‚°ãŒå¤§æ–‡å­—å°æ–‡å­—を区別ã—ãªã„ +``` + +:::note ãƒã‚¹ãƒˆæ§‹é€ ã®ã‚«ãƒ©ãƒ ã«ã¤ã„ã¦ã®æ³¨æ„ +オリジナルã®Snowflakeテーブルスキーマã«ãŠã‘ã‚‹`VARIANT`ãŠã‚ˆã³`OBJECT`カラムã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§JSON文字列ã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã€ClickHouseã«æŒ¿å…¥ã™ã‚‹éš›ã«ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +`some_file`ã®ã‚ˆã†ãªãƒã‚¹ãƒˆæ§‹é€ ã¯ã€Snowflakeã«ã‚ˆã‚‹ã‚³ãƒ”ー時ã«JSON文字列ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ClickHouseã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹éš›ã«ã¯ã€ã“れらã®æ§‹é€ ã‚’[JSONExtract関数](/docs/ja/sql-reference/functions/json-functions#jsonextractjson-indices_or_keys-return_type)を使用ã—ã¦ClickHouse挿入時ã«Tuplesã«å¤‰æ›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## 3. æ­£ã—ã„データエクスãƒãƒ¼ãƒˆã®ãƒ†ã‚¹ãƒˆ + +データãŒæ­£ã—ã挿入ã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’テストã™ã‚‹ã«ã¯ã€å˜ã«æ–°ã—ã„テーブルã«å¯¾ã—ã¦`SELECT`クエリを実行ã—ã¾ã™ï¼š + +```sql +SELECT * FROM mydataset limit 10; +``` + +## ã•ã‚‰ãªã‚‹èª­ã¿ç‰©ã¨ã‚µãƒãƒ¼ãƒˆ + +ã“ã®ã‚¬ã‚¤ãƒ‰ã«åŠ ãˆã¦ã€[Snowflakeã¨ClickHouseã®æ¯”較](https://clickhouse.com/blog/clickhouse-vs-snowflake-for-real-time-analytics-comparison-migration-guide)ã«é–¢ã™ã‚‹ãƒ–ログ記事を読むã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +Snowflakeã‹ã‚‰ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿è»¢é€ã«å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€support@clickhouse.comã¾ã§ãŠæ°—軽ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„。 diff --git a/docs/ja/native-protocol/_category_.yml b/docs/ja/native-protocol/_category_.yml new file mode 100644 index 00000000000..f4032af5727 --- /dev/null +++ b/docs/ja/native-protocol/_category_.yml @@ -0,0 +1,3 @@ +label: 'Native Protocol' +collapsible: true +collapsed: true diff --git a/docs/ja/native-protocol/basics.md b/docs/ja/native-protocol/basics.md new file mode 100644 index 00000000000..dea61d7166b --- /dev/null +++ b/docs/ja/native-protocol/basics.md @@ -0,0 +1,150 @@ +--- +slug: /ja/native-protocol/basics +sidebar_position: 1 +--- + +# 基本 + +:::note +クライアントプロトコルã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ã¯ä½œæˆä¸­ã§ã™ã€‚ + +ã»ã¨ã‚“ã©ã®ä¾‹ã¯Goã§ã®ã¿ã§ã™ã€‚ +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ã€ClickHouse TCPクライアントã®ãƒã‚¤ãƒŠãƒªãƒ—ロトコルã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +## Varint + +é•·ã•ã€ãƒ‘ケットコードã€ãã®ä»–ã®å ´åˆã«ã¯*unsigned varint*エンコーディングãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ [binary.PutUvarint](https://pkg.go.dev/encoding/binary#PutUvarint) 㨠[binary.ReadUvarint](https://pkg.go.dev/encoding/binary#ReadUvarint) を使用ã—ã¾ã™ã€‚ + +:::note +*Signed* varintã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。 +::: + +## 文字列 + +å¯å¤‰é•·æ–‡å­—列㯠*(length, value)* ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã€*length* 㯠[varint](#varint) ã§ã€*value* ã¯utf8文字列ã§ã™ã€‚ + +:::important +OOMを防ããŸã‚ã«é•·ã•ã‚’検証ã—ã¦ãã ã•ã„: + +`0 ≤ len < MAX` +::: + + + + +```go +s := "Hello, world!" + +// 文字列ã®é•·ã•ã‚’uvarintã¨ã—ã¦æ›¸ã込む。 +buf := make([]byte, binary.MaxVarintLen64) +n := binary.PutUvarint(buf, uint64(len(s))) +buf = buf[:n] + +// 文字列ã®å€¤ã‚’書ã込む。 +buf = append(buf, s...) +``` + + + + +```go +r := bytes.NewReader([]byte{ + 0xd, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, + 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21, +}) + +// é•·ã•ã‚’読ã¿è¾¼ã‚€ã€‚ +n, err := binary.ReadUvarint(r) +if err != nil { + panic(err) +} + +// OOMã‚„make()ã§ã®ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ä¾‹å¤–を防ããŸã‚ã«nã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã€‚ +const maxSize = 1024 * 1024 * 10 // 10 MB +if n > maxSize || n < 0 { + panic("invalid n") +} + +buf := make([]byte, n) +if _, err := io.ReadFull(r, buf); err != nil { + panic(err) +} + +fmt.Println(string(buf)) +// Hello, world! +``` + + + + + + + +```hexdump +00000000 0d 48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21 |.Hello, world!| +``` + + + + +```text +DUhlbGxvLCB3b3JsZCE +``` + + + + +```go +data := []byte{ + 0xd, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, + 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21, +} +``` + + + + +## æ•´æ•° + +:::tip +ClickHouseã¯å›ºå®šã‚µã‚¤ã‚ºã®æ•´æ•°ã«å¯¾ã—ã¦**リトルエンディアン**を使用ã—ã¾ã™ã€‚ +::: + +### Int32 +```go +v := int32(1000) + +// エンコード。 +buf := make([]byte, 8) +binary.LittleEndian.PutUint32(buf, uint32(v)) + +// デコード。 +d := int32(binary.LittleEndian.Uint32(buf)) +fmt.Println(d) // 1000 +``` + + + + +```hexdump +00000000 e8 03 00 00 00 00 00 00 |........| +``` + + + + +```text +6AMAAAAAAAA +``` + + + + +## ブール値 + +ブール値ã¯å˜ä¸€ãƒã‚¤ãƒˆã§è¡¨ã•ã‚Œã€`1` 㯠`true`ã€`0` 㯠`false` ã§ã™ã€‚ diff --git a/docs/ja/native-protocol/client.md b/docs/ja/native-protocol/client.md new file mode 100644 index 00000000000..5f6b8b93878 --- /dev/null +++ b/docs/ja/native-protocol/client.md @@ -0,0 +1,121 @@ +--- +slug: /ja/native-protocol/client +sidebar_position: 2 +--- + +# クライアントパケット + +| 値 | åå‰ | 説明 | +|-------|---------------------|---------------------------| +| 0 | [Hello](#hello) | クライアントãƒãƒ³ãƒ‰ã‚·ã‚§ã‚¤ã‚¯é–‹å§‹ | +| 1 | [Query](#query) | クエリリクエスト | +| 2 | [Data](#data) | データをå«ã‚€ãƒ–ロック | +| 3 | [Cancel](#cancel) | クエリをキャンセル | +| 4 | [Ping](#ping) | Pingリクエスト | +| 5 | TableStatus | テーブルステータスリクエスト | + +`Data`ã¯åœ§ç¸®å¯èƒ½ã§ã™ã€‚ + +## Hello + +ãŸã¨ãˆã°ã€`Go Client` v1.10ã§`54451`プロトコルãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’サãƒãƒ¼ãƒˆã—ã€`default`データベースã«`default`ユーザーã§`secret`パスワードを使ã£ã¦æŽ¥ç¶šã—ãŸã„å ´åˆã§ã™ã€‚ + +| フィールド | タイプ | 値 | 説明 | +|----------------------|------------|----------------|----------------------------| +| client_name | String | `"Go Client"` | クライアント実装å | +| version_major | UVarInt | `1` | クライアントメジャーãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +| version_minor | UVarInt | `10` | クライアントマイナーãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +| protocol_version | UVarInt | `54451` | TCPプロトコルãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +| database | String | `"default"` | データベースå | +| username | String | `"default"` | ユーザーå | +| password | String | `"secret"` | パスワード | + +### プロトコルãƒãƒ¼ã‚¸ãƒ§ãƒ³ + +プロトコルãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã®TCPプロトコルãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã™ã€‚ + +通常ã¯æœ€æ–°ã®äº’æ›æ€§ã®ã‚るサーãƒãƒ¼ãƒªãƒ“ジョンã¨åŒã˜ã§ã™ãŒã€ã“ã‚Œã¨æ··åŒã—ãªã„ã§ãã ã•ã„。 + +### デフォルト + +ã™ã¹ã¦ã®å€¤ã¯**明示的ã«è¨­å®š**ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚サーãƒãƒ¼å´ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ã‚ã‚Šã¾ã›ã‚“。クライアントå´ã§ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨ã—ã¦`"default"`データベースã€`"default"`ユーザーåã€ãŠã‚ˆã³`""`(空ã®æ–‡å­—列)パスワードを使用ã—ã¾ã™ã€‚ + +## クエリ + +| フィールド | タイプ | 値 | 説明 | +|---------------------|-------------------------------|------------|------------------------------| +| query_id | String | `1ff-a123` | クエリID, UUIDv4å¯èƒ½ | +| client_info | [ClientInfo](#client-info) | タイプをå‚ç…§| クライアントã«é–¢ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ | +| settings | [Settings](#settings) | タイプをå‚ç…§| 設定ã®ãƒªã‚¹ãƒˆ | +| secret | String | `secret` | サーãƒãƒ¼é–“ã®ç§˜å¯† | +| [stage](#stage) | UVarInt | `2` | クエリステージã¾ã§å®Ÿè¡Œ | +| compression | UVarInt | `0` | 無効=0ã€æœ‰åŠ¹=1 | +| body | String | `SELECT 1` | クエリテキスト | + +### クライアント情報 + +| フィールド | タイプ | 説明 | +|-----------------------|-------------------|---------------------------------| +| query_kind | byte | None=0, Initial=1, Secondary=2 | +| initial_user | String | åˆæœŸãƒ¦ãƒ¼ã‚¶ãƒ¼ | +| initial_query_id | String | åˆæœŸã‚¯ã‚¨ãƒªID | +| initial_address | String | åˆæœŸã‚¢ãƒ‰ãƒ¬ã‚¹ | +| initial_time | Int64 | åˆæœŸæ™‚é–“ | +| interface | byte | TCP=1, HTTP=2 | +| os_user | String | OSユーザー | +| client_hostname | String | クライアントホストå | +| client_name | String | クライアントå | +| version_major | UVarInt | クライアントメジャーãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +| version_minor | UVarInt | クライアントマイナーãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +| protocol_version | UVarInt | クライアントプロトコルãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +| quota_key | String | クオータキー | +| distributed_depth | UVarInt | 分散深度 | +| version_patch | UVarInt | クライアントパッãƒãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +| otel | Bool | トレースフィールドã®æœ‰ç„¡ | +| trace_id | FixedString(16) | トレースID | +| span_id | FixedString(8) | スパンID | +| trace_state | String | トレース状態 | +| trace_flags | Byte | トレースフラグ | + +### 設定 + +| フィールド | タイプ | 値 | 説明 | +|---------------|---------|------------------|----------------------| +| key | String | `send_logs_level`| 設定ã®ã‚­ãƒ¼ | +| value | String | `trace` | 設定ã®å€¤ | +| important | Bool | `true` | 無視å¯èƒ½ã‹ã©ã†ã‹ | + +リストã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã€ã‚­ãƒ¼ã¨å€¤ãŒç©ºã®å ´åˆã¯ãƒªã‚¹ãƒˆã®çµ‚ã‚りを示ã—ã¾ã™ã€‚ + +### ステージ + +| 値 | åå‰ | 説明 | +|-------|---------------------|-----------------------------------------------| +| 0 | FetchColumns | カラムタイプã®ã¿å–å¾— | +| 1 | WithMergeableState | マージå¯èƒ½ãªçŠ¶æ…‹ã¾ã§ | +| 2 | Complete | 完全ãªå®Œäº†ã¾ã§ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãŒæŽ¨å¥¨ï¼‰ | + +## データ + +| フィールド | タイプ | 説明 | +|-----------|--------------------|------------------------| +| info | BlockInfo | エンコードã•ã‚ŒãŸãƒ–ロック情報 | +| columns | UVarInt | カラム数 | +| rows | UVarInt | 行数 | +| columns | [[]Column](#column)| データをå«ã‚€ã‚«ãƒ©ãƒ  | + +### カラム + +| フィールド | タイプ | 値 | 説明 | +|-----------|---------|-----------------|-------------------| +| name | String | `foo` | カラムå | +| type | String | `DateTime64(9)` | カラムタイプ | +| data | bytes | ~ | カラムデータ | + +## キャンセル + +パケットボディãªã—。サーãƒãƒ¼ã¯ã‚¯ã‚¨ãƒªã‚’キャンセルã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## ピング + +パケットボディãªã—。サーãƒãƒ¼ã¯[pongã§å¿œç­”ã™ã‚‹](./server.md#pong)å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/native-protocol/columns.md b/docs/ja/native-protocol/columns.md new file mode 100644 index 00000000000..f80834c344e --- /dev/null +++ b/docs/ja/native-protocol/columns.md @@ -0,0 +1,96 @@ +--- +slug: /ja/native-protocol/columns +sidebar_position: 4 +--- + +# カラムタイプ + +一般的ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€[データタイプ](https://clickhouse.com/docs/ja/sql-reference/data-types/)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 数値タイプ + +:::tip + +数値タイプã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯ã€AMD64ã‚„ARM64ã®ã‚ˆã†ãªãƒªãƒˆãƒ«ã‚¨ãƒ³ãƒ‡ã‚£ã‚¢ãƒ³CPUã®ãƒ¡ãƒ¢ãƒªãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã¨ä¸€è‡´ã—ã¦ã„ã¾ã™ã€‚ + +ã“ã‚Œã«ã‚ˆã‚Šã€éžå¸¸ã«åŠ¹çŽ‡çš„ãªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¨ãƒ‡ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’実ç¾ã§ãã¾ã™ã€‚ + +::: + +### æ•´æ•° + +Intã¨UIntã®8, 16, 32, 64, 128ã¾ãŸã¯256ビットã®æ–‡å­—列ã§ã€ãƒªãƒˆãƒ«ã‚¨ãƒ³ãƒ‡ã‚£ã‚¢ãƒ³å½¢å¼ã§ã™ã€‚ + +### 浮動å°æ•°ç‚¹æ•° + +IEEE 754ã®ãƒã‚¤ãƒŠãƒªè¡¨ç¾ã§ã®Float32ã¨Float64ã§ã™ã€‚ + +## 文字列 + +å˜ãªã‚‹æ–‡å­—列ã®é…列ã§ã™ã€‚ã¤ã¾ã‚Šã€(len, value)。 + +## FixedString(N) + +Nãƒã‚¤ãƒˆã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®é…列ã§ã™ã€‚ + +## IP + +IPv4ã¯`UInt32`数値型ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã€UInt32ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +IPv6ã¯`FixedString(16)`ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã€ãƒã‚¤ãƒŠãƒªã§ç›´æŽ¥è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +## Tuple + +Tupleã¯å˜ã«ã‚«ãƒ©ãƒ ã®é…列ã§ã™ã€‚例ãˆã°ã€Tuple(String, UInt8)ã¯2ã¤ã®ã‚«ãƒ©ãƒ ãŒé€£ç¶šã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸã‚‚ã®ã§ã™ã€‚ + +## Map + +`Map(K, V)`ã¯3ã¤ã®ã‚«ãƒ©ãƒ ã‹ã‚‰æˆã‚Šã¾ã™: `Offsets ColUInt64, Keys K, Values V`。 + +`Keys`ã¨`Values`カラムã®è¡Œæ•°ã¯`Offsets`ã®æœ€å¾Œã®å€¤ã§ã™ã€‚ + +## é…列 + +`Array(T)`ã¯2ã¤ã®ã‚«ãƒ©ãƒ ã‹ã‚‰æˆã‚Šã¾ã™: `Offsets ColUInt64, Data T`。 + +`Data`ã®è¡Œæ•°ã¯`Offsets`ã®æœ€å¾Œã®å€¤ã§ã™ã€‚ + +## Nullable + +`Nullable(T)`ã¯`Nulls ColUInt8, Values T`ã¨ã„ã†åŒã˜è¡Œæ•°ã‚’æŒã¤å†…容ã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +```go +// Nullsã¯Valuesカラムã«å¯¾ã™ã‚‹nullableã®ã€Œãƒžã‚¹ã‚¯ã€ã§ã™ã€‚ +// 例ãˆã°ã€[null, "", "hello", null, "world"]をエンコードã™ã‚‹å ´åˆ +// Values: ["", "", "hello", "", "world"] (len: 5) +// Nulls: [ 1, 0, 0, 1, 0] (len: 5) +``` + +## UUID + +`FixedString(16)`ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã€UUID値ã¯ãƒã‚¤ãƒŠãƒªã§è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +## Enum + +`Int8`ã¾ãŸã¯`Int16`ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã™ãŒã€ãã‚Œãžã‚Œã®æ•´æ•°ãŒã„ãã¤ã‹ã®`String`値ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## Low Cardinality + +`LowCardinality(T)`ã¯`Index T, Keys K`ã‹ã‚‰æˆã‚Šã€`K`ã¯`Index`ã®ã‚µã‚¤ã‚ºã«å¿œã˜ã¦(UInt8, UInt16, UInt32, UInt64)ã®ã„ãšã‚Œã‹ã§ã™ã€‚ + +```go +// インデックス(ã™ãªã‚ã¡ã€Dictionary)カラムã¯ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå€¤ã‚’å«ã¿ã€Keysカラム㯠+// インデックスカラムã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’å«ã¿ã€ãã‚ŒãŒå®Ÿéš›ã®å€¤ã‚’表ã—ã¾ã™ã€‚ +// +// 例ãˆã°ã€["Eko", "Eko", "Amadela", "Amadela", "Amadela", "Amadela"]㯠+// 以下ã®ã‚ˆã†ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã§ãã¾ã™: +// Index: ["Eko", "Amadela"] (String) +// Keys: [0, 0, 1, 1, 1, 1] (UInt8) +// +// CardinalityKeyã¯Indexサイズã«å¿œã˜ã¦é¸æŠžã•ã‚Œã¾ã™ã€‚é¸æŠžã•ã‚ŒãŸã‚¿ã‚¤ãƒ—ã®æœ€å¤§å€¤ã¯ã€ +// Indexè¦ç´ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’表ç¾ã§ãã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +``` + +## Bool + +`UInt8`ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã‚ã‚Šã€`0`ã¯falseã€`1`ã¯trueを表ã—ã¾ã™ã€‚ diff --git a/docs/ja/native-protocol/hash.md b/docs/ja/native-protocol/hash.md new file mode 100644 index 00000000000..506cc6ff270 --- /dev/null +++ b/docs/ja/native-protocol/hash.md @@ -0,0 +1,39 @@ +--- +slug: /ja/native-protocol/hash +sidebar_position: 5 +--- + +# CityHash + +ClickHouseã¯ã€**å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®** [Googleã®CityHash](https://github.com/google/cityhash) を使用ã—ã¦ã„ã¾ã™ã€‚ + +:::info +CityHashã¯ã€ClickHouseã«è¿½åŠ ã•ã‚ŒãŸå¾Œã«ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ãŒå¤‰æ›´ã•ã‚Œã¾ã—ãŸã€‚ + +CityHashã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯ã€ç‰¹å®šã®ãƒãƒƒã‚·ãƒ¥å€¤ã«ä¾å­˜ã›ãšã€ä¿å­˜ã‚„シャーディングキーã¨ã—ã¦ã®ä½¿ç”¨ã‚’控ãˆã‚‹ã¹ãã§ã‚ã‚‹ã¨ç‰¹ã«æ³¨æ„ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ã—ã‹ã—ã€ã“ã®é–¢æ•°ã‚’ユーザーã«å…¬é–‹ã—ãŸãŸã‚ã€CityHashã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆ1.0.2)を固定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã—ãŸã€‚ç¾åœ¨ã€SQLã§ä½¿ç”¨å¯èƒ½ãªCityHash関数ã®å‹•ä½œã¯å¤‰ã‚らãªã„ã“ã¨ã‚’ä¿è¨¼ã—ã¦ã„ã¾ã™ã€‚ + +— Alexey Milovidov +::: + +:::note æ³¨æ„ + +Googleã®ç¾åœ¨ã®CityHashã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ClickHouseã®`cityHash64`ãƒãƒªã‚¢ãƒ³ãƒˆã¨[ç•°ãªã‚Šã¾ã™](https://github.com/ClickHouse/ClickHouse/issues/8354)。 + +Googleã®CityHashã®å€¤ã‚’å–å¾—ã™ã‚‹ç›®çš„ã§`farmHash64`を使用ã—ãªã„ã§ãã ã•ã„ï¼[FarmHash](https://opensource.googleblog.com/2014/03/introducing-farmhash.html)ã¯CityHashã®å¾Œç¶™ã§ã™ãŒã€å®Œå…¨ã«äº’æ›æ€§ãŒã‚ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +| 文字列 | ClickHouse64 | CityHash64 | FarmHash64 | +|------------------------------------------------------------|----------------------|---------------------|----------------------| +| `Moscow` | 12507901496292878638 | 5992710078453357409 | 5992710078453357409 | +| `How can you write a big system without C++? -Paul Glick` | 6237945311650045625 | 749291162957442504 | 11716470977470720228 | + +::: + +ã¾ãŸã€ä½œæˆç†ç”±ã‚„説明ã«ã¤ã„ã¦ã¯[Introducing CityHash](https://opensource.googleblog.com/2011/04/introducing-cityhash.html)ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。è¦ç´„ã™ã‚‹ã¨ã€**éžæš—å·å­¦çš„ãª**ãƒãƒƒã‚·ãƒ¥ã§ã€[MurmurHash](http://en.wikipedia.org/wiki/MurmurHash)よりも高速ã§ã™ãŒã€ã‚ˆã‚Šè¤‡é›‘ã§ã™ã€‚ + +## 実装 + +### Go + +両方ã®ãƒãƒªã‚¢ãƒ³ãƒˆã‚’実装ã—ã¦ã„ã‚‹Goパッケージ[go-faster/city](https://github.com/go-faster/city)を使用ã§ãã¾ã™ã€‚ diff --git a/docs/ja/native-protocol/images/ch_compression_block.drawio.svg b/docs/ja/native-protocol/images/ch_compression_block.drawio.svg new file mode 100644 index 00000000000..a5ebbe5e368 --- /dev/null +++ b/docs/ja/native-protocol/images/ch_compression_block.drawio.svg @@ -0,0 +1,4 @@ + + + +
    Checksum
    (16 bytes)
    Checksum...
    Data size
    (uint32, 4 bytes)
    Data size...
    Raw size
    (uint32, 4 bytes)
    Raw size...
    Mode
    (1 byte)
    Mode...
    Compressed 
    Data
    Compressed...
    Raw size length
    Raw size length
    Header, 9 bytes
    Header, 9 bytes
    Checksum input
    Checksum input
    0
    0
    15
    15
    16
    16
    20
    20
    21
    21
    25
    25
    26
    26
    ~
    ~
    Text is not SVG - cannot display
    \ No newline at end of file diff --git a/docs/ja/native-protocol/server.md b/docs/ja/native-protocol/server.md new file mode 100644 index 00000000000..eb53c72a89e --- /dev/null +++ b/docs/ja/native-protocol/server.md @@ -0,0 +1,131 @@ +--- +slug: /ja/native-protocol/server +sidebar_position: 3 +--- + +# サーãƒãƒ¼ãƒ‘ケット + +| 値 | åå‰ | 説明 | +|-------|--------------------------------|----------------------------------------------------------------| +| 0 | [Hello](#hello) | サーãƒãƒ¼ã®ãƒãƒ³ãƒ‰ã‚·ã‚§ã‚¤ã‚¯å¿œç­” | +| 1 | Data | [クライアントデータ](./client.md#data) ã¨åŒæ§˜ | +| 2 | [Exception](#exception) | クエリ処ç†ã®ä¾‹å¤– | +| 3 | [Progress](#progress) | クエリã®é€²æ— | +| 4 | [Pong](#pong) | ピン応答 | +| 5 | [EndOfStream](#end-of-stream) | ã™ã¹ã¦ã®ãƒ‘ケットãŒè»¢é€ã•ã‚ŒãŸ | +| 6 | [ProfileInfo](#profile-info) | プロファイリングデータ | +| 7 | Totals | åˆè¨ˆå€¤ | +| 8 | Extremes | 極値 (最å°, 最大) | +| 9 | TablesStatusResponse | TableStatus リクエストã¸ã®å¿œç­” | +| 10 | [Log](#log) | クエリシステムログ | +| 11 | TableColumns | カラムã®è©³ç´° | +| 12 | UUIDs | 一æ„ãªãƒ‘ーツIDã®ãƒªã‚¹ãƒˆ | +| 13 | ReadTaskRequest | 次ã«å¿…è¦ãªã‚¿ã‚¹ã‚¯ã‚’記述ã™ã‚‹ãŸã‚ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’説明ã™ã‚‹æ–‡å­—列(UUID)| +| 14 | [ProfileEvents](#profile-events) | サーãƒãƒ¼ã‹ã‚‰ã®ãƒ—ロファイルイベントをå«ã‚€ãƒ‘ケット | + +`Data`ã€`Totals`ã€ãŠã‚ˆã³ `Extremes` ã¯åœ§ç¸®å¯èƒ½ã§ã™ã€‚ + +## Hello + +[クライアント㮠hello](./client.md#hello) ã«å¯¾ã™ã‚‹å¿œç­”。 + +| フィールド | タイプ | 値 | 説明 | +|----------------|----------|----------------|-----------------------| +| name | String | `Clickhouse` | サーãƒãƒ¼å | +| version_major | UVarInt | `21` | サーãƒãƒ¼ãƒ¡ã‚¸ãƒ£ãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +| version_minor | UVarInt | `12` | サーãƒãƒ¼ãƒžã‚¤ãƒŠãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +| revision | UVarInt | `54452` | サーãƒãƒ¼ãƒªãƒ“ジョン | +| tz | String | `Europe/Moscow`| サーãƒãƒ¼ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ | +| display_name | String | `Clickhouse` | UI用サーãƒãƒ¼å | +| version_patch | UVarInt | `3` | サーãƒãƒ¼ãƒ‘ッãƒãƒãƒ¼ã‚¸ãƒ§ãƒ³ | + +## Exception + +クエリ処ç†ä¸­ã®ã‚µãƒ¼ãƒãƒ¼ä¾‹å¤–。 + +| フィールド | タイプ | 値 | 説明 | +|---------------|----------|----------------------------------------|------------------------------| +| code | Int32 | `60` | [ErrorCodes.cpp][codes] ã‚’å‚ç…§ã—ã¦ãã ã•ã„。| +| name | String | `DB::Exception` | サーãƒãƒ¼ãƒ¡ã‚¸ãƒ£ãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +| message | String | `DB::Exception: Table X doesn't exist` | サーãƒãƒ¼ãƒžã‚¤ãƒŠãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | +| stack_trace | String | ~ | C++ スタックトレース | +| nested | Bool | `true` | 追加ã®ã‚¨ãƒ©ãƒ¼ | + +`nested` ㌠`false` ã«ãªã‚‹ã¾ã§ã€ä¾‹å¤–ã®é€£ç¶šãƒªã‚¹ãƒˆã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +[codes]: https://clickhouse.com/codebrowser/ClickHouse/src/Common/ErrorCodes.cpp.html "エラーコードã®ãƒªã‚¹ãƒˆ" + +## Progress + +サーãƒãƒ¼ãŒå®šæœŸçš„ã«å ±å‘Šã™ã‚‹ã‚¯ã‚¨ãƒªå®Ÿè¡Œã®é€²æ—。 + +:::tip +**デルタ**ã§å ±å‘Šã•ã‚Œã¾ã™ã€‚åˆè¨ˆã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§è“„ç©ã—ã¦ãã ã•ã„。 +::: + +| フィールド | タイプ | 値 | 説明 | +|---------------|----------|--------|---------------------| +| rows | UVarInt | `65535`| 行数 | +| bytes | UVarInt | `871799`| ãƒã‚¤ãƒˆæ•° | +| total_rows | UVarInt | `0` | åˆè¨ˆè¡Œæ•° | +| wrote_rows | UVarInt | `0` | クライアントã‹ã‚‰ã®è¡Œæ•°| +| wrote_bytes | UVarInt | `0` | クライアントã‹ã‚‰ã®ãƒã‚¤ãƒˆæ•° | + +## Pong + +[クライアント㮠ping](./client.md#ping) ã«å¯¾ã™ã‚‹å¿œç­”ã€ãƒ‘ケットボディãªã—。 + +## End of stream + +**Data** パケットã¯ã‚‚ã†é€ä¿¡ã•ã‚Œãªããªã‚Šã€ã‚¯ã‚¨ãƒªçµæžœãŒå®Œå…¨ã«ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¸ã‚¹ãƒˆãƒªãƒ¼ãƒ ã•ã‚Œã¾ã—ãŸã€‚ + +パケットボディãªã—。 + +## Profile info + +| フィールド | タイプ | +|---------------------------|----------| +| rows | UVarInt | +| blocks | UVarInt | +| bytes | UVarInt | +| applied_limit | Bool | +| rows_before_limit | UVarInt | +| calculated_rows_before_limit | Bool | + +## Log + +サーãƒãƒ¼ãƒ­ã‚°ã‚’å«ã‚€ **Data block**。 + +:::tip +カラム㮠**data block** ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ãŒã€åœ§ç¸®ã•ã‚Œã¾ã›ã‚“。 +::: + +| カラム | タイプ | +|--------------|-----------| +| time | DateTime | +| time_micro | UInt32 | +| host_name | String | +| query_id | String | +| thread_id | UInt64 | +| priority | Int8 | +| source | String | +| text | String | + +## Profile events + +プロファイルイベントをå«ã‚€ **Data block**。 + +:::tip +カラム㮠**data block** ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ãŒã€åœ§ç¸®ã•ã‚Œã¾ã›ã‚“。 + +`value` ã®ã‚¿ã‚¤ãƒ—ã¯ã‚µãƒ¼ãƒãƒ¼ãƒªãƒ“ジョンã«ã‚ˆã£ã¦ `UInt64` ã¾ãŸã¯ `Int64` ã§ã™ã€‚ +::: + +| カラム | タイプ | +|--------------|------------------| +| host_name | String | +| current_time | DateTime | +| thread_id | UInt64 | +| type | Int8 | +| name | String | +| value | UInt64 ã¾ãŸã¯ Int64 | diff --git a/docs/ja/operations/_category_.yml b/docs/ja/operations/_category_.yml new file mode 100644 index 00000000000..352809f663b --- /dev/null +++ b/docs/ja/operations/_category_.yml @@ -0,0 +1,4 @@ +position: 70 +label: 'Operations' +collapsible: true +collapsed: true diff --git a/docs/ja/operations/_troubleshooting.md b/docs/ja/operations/_troubleshooting.md new file mode 100644 index 00000000000..132daa898bf --- /dev/null +++ b/docs/ja/operations/_troubleshooting.md @@ -0,0 +1,218 @@ +[//]: # (ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯FAQ > トラブルシューティングã«å«ã¾ã‚Œã¾ã™) + +- [インストール](#troubleshooting-installation-errors) +- [サーãƒãƒ¼ã¸ã®æŽ¥ç¶š](#troubleshooting-accepts-no-connections) +- [クエリ処ç†](#troubleshooting-does-not-process-queries) +- [クエリ処ç†ã®åŠ¹çŽ‡](#troubleshooting-too-slow) + +## インストール {#troubleshooting-installation-errors} + +### Apt-getã§ClickHouseリãƒã‚¸ãƒˆãƒªã‹ã‚‰Debパッケージをå–å¾—ã§ããªã„ {#you-cannot-get-deb-packages-from-clickhouse-repository-with-apt-get} + +- ファイアウォールã®è¨­å®šã‚’確èªã—ã¦ãã ã•ã„。 +- 何らã‹ã®ç†ç”±ã§ãƒªãƒã‚¸ãƒˆãƒªã«ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã„å ´åˆã¯ã€[インストールガイド](../getting-started/install.md)ã®è¨˜äº‹ã§èª¬æ˜Žã•ã‚Œã¦ã„るよã†ã«ãƒ‘ッケージをダウンロードã—ã€`sudo dpkg -i `コマンドを使ã£ã¦æ‰‹å‹•ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¦ãã ã•ã„。`tzdata`パッケージも必è¦ã§ã™ã€‚ + +### Apt-getã§ClickHouseリãƒã‚¸ãƒˆãƒªã‹ã‚‰Debパッケージを更新ã§ããªã„ {#you-cannot-update-deb-packages-from-clickhouse-repository-with-apt-get} + +- GPGキーãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã«å•é¡ŒãŒç™ºç”Ÿã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +リãƒã‚¸ãƒˆãƒªè¨­å®šã‚’æ›´æ–°ã™ã‚‹ã«ã¯ã€[セットアップ](../getting-started/install.md#setup-the-debian-repository)ページã®æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„。 + +### `apt-get update`ã§ç•°ãªã‚‹è­¦å‘ŠãŒè¡¨ç¤ºã•ã‚Œã‚‹ {#you-get-different-warnings-with-apt-get-update} + +- 完全ãªè­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã§ã™ï¼š + +``` +N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://packages.clickhouse.com/deb stable InRelease' doesn't support architecture 'i386' +``` + +``` +E: Failed to fetch https://packages.clickhouse.com/deb/dists/stable/main/binary-amd64/Packages.gz File has unexpected size (30451 != 28154). Mirror sync in progress? +``` + +``` +E: Repository 'https://packages.clickhouse.com/deb stable InRelease' changed its 'Origin' value from 'Artifactory' to 'ClickHouse' +E: Repository 'https://packages.clickhouse.com/deb stable InRelease' changed its 'Label' value from 'Artifactory' to 'ClickHouse' +N: Repository 'https://packages.clickhouse.com/deb stable InRelease' changed its 'Suite' value from 'stable' to '' +N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details. +``` + +``` +Err:11 https://packages.clickhouse.com/deb stable InRelease + 400 Bad Request [IP: 172.66.40.249 443] +``` + +上記ã®å•é¡Œã‚’解決ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚¹ã‚¯ãƒªãƒ—トを使用ã—ã¦ãã ã•ã„: + +```bash +sudo rm /var/lib/apt/lists/packages.clickhouse.com_* /var/lib/dpkg/arch /var/lib/apt/lists/partial/packages.clickhouse.com_* +sudo apt-get clean +sudo apt-get autoclean +``` + +### 誤ã£ãŸç½²åã®ãŸã‚ã«Yumã§ãƒ‘ッケージをå–å¾—ã§ããªã„ + +å¯èƒ½ãªå•é¡Œï¼šã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒèª¤ã£ã¦ãŠã‚Šã€2022å¹´9月ã«GPGキーãŒæ›´æ–°ã•ã‚ŒãŸå¾Œã«å£Šã‚ŒãŸå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +解決策ã¯yumã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŠã‚ˆã³libディレクトリをクリアã™ã‚‹ã“ã¨ã§ã™ï¼š + +``` +sudo find /var/lib/yum/repos/ /var/cache/yum/ -name 'clickhouse-*' -type d -exec rm -rf {} + +sudo rm -f /etc/yum.repos.d/clickhouse.repo +``` + +ãã®å¾Œã€[インストールガイド](../getting-started/install.md#from-rpm-packages)ã«å¾“ã£ã¦ãã ã•ã„。 + +### Dockerコンテナを実行ã§ããªã„ + +å˜ç´”ãª`docker run clickhouse/clickhouse-server`を実行ã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã§ã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ï¼š + +``` +$ docker run -it clickhouse/clickhouse-server +........ +2024.11.06 21:04:48.912036 [ 1 ] {} SentryWriter: Sending crash reports is disabled +Poco::Exception. Code: 1000, e.code() = 0, System exception: cannot start thread, Stack trace (when copying this message, always include the lines below): + +0. Poco::ThreadImpl::startImpl(Poco::SharedPtr>) @ 0x00000000157c7b34 +1. Poco::Thread::start(Poco::Runnable&) @ 0x00000000157c8a0e +2. BaseDaemon::initializeTerminationAndSignalProcessing() @ 0x000000000d267a14 +3. BaseDaemon::initialize(Poco::Util::Application&) @ 0x000000000d2652cb +4. DB::Server::initialize(Poco::Util::Application&) @ 0x000000000d128b38 +5. Poco::Util::Application::run() @ 0x000000001581cfda +6. DB::Server::run() @ 0x000000000d1288f0 +7. Poco::Util::ServerApplication::run(int, char**) @ 0x0000000015825e27 +8. mainEntryClickHouseServer(int, char**) @ 0x000000000d125b38 +9. main @ 0x0000000007ea4eee +10. ? @ 0x00007f67ff946d90 +11. ? @ 0x00007f67ff946e40 +12. _start @ 0x00000000062e802e + (version 24.10.1.2812 (official build)) +``` + +ç†ç”±ã¯ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³`20.10.10`未満ã®å¤ã„Dockerデーモンã§ã™ã€‚修正方法ã¯ãれをアップグレードã™ã‚‹ã‹ã€`docker run [--privileged | --security-opt seccomp=unconfined]`を実行ã™ã‚‹ã“ã¨ã§ã™ã€‚後者ã«ã¯ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šã®å½±éŸ¿ãŒã‚ã‚Šã¾ã™ã€‚ + +## サーãƒãƒ¼ã¸ã®æŽ¥ç¶š {#troubleshooting-accepts-no-connections} + +å¯èƒ½ãªå•é¡Œï¼š + +- サーãƒãƒ¼ãŒå‹•ä½œã—ã¦ã„ãªã„。 +- 予期ã—ãªã„ã€ã¾ãŸã¯èª¤ã£ãŸæ§‹æˆãƒ‘ラメータ。 + +### サーãƒãƒ¼ãŒå‹•ä½œã—ã¦ã„ãªã„ {#server-is-not-running} + +**サーãƒãƒ¼ãŒå‹•ä½œã—ã¦ã„ã‚‹ã‹ç¢ºèªã™ã‚‹** + +コマンド: + +``` bash +$ sudo service clickhouse-server status +``` + +サーãƒãƒ¼ãŒå‹•ä½œã—ã¦ã„ãªã„å ´åˆã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã§é–‹å§‹ã—ã¦ãã ã•ã„: + +``` bash +$ sudo service clickhouse-server start +``` + +**ログを確èªã™ã‚‹** + +`clickhouse-server`ã®ãƒ¡ã‚¤ãƒ³ãƒ­ã‚°ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`/var/log/clickhouse-server/clickhouse-server.log`ã«ã‚ã‚Šã¾ã™ã€‚ + +サーãƒãƒ¼ãŒæ­£å¸¸ã«èµ·å‹•ã—ãŸå ´åˆã€ä»¥ä¸‹ã®æ–‡å­—列ãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ï¼š + +- ` Application: starting up.` — サーãƒãƒ¼ãŒèµ·å‹•ã—ã¾ã—ãŸã€‚ +- ` Application: Ready for connections.` — サーãƒãƒ¼ãŒå®Ÿè¡Œä¸­ã§æŽ¥ç¶šå¾…機中ã§ã™ã€‚ + +ã‚‚ã—`clickhouse-server`ã®èµ·å‹•ãŒæ§‹æˆã‚¨ãƒ©ãƒ¼ã§å¤±æ•—ã—ãŸå ´åˆã€``文字列ã¨ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜ŽãŒè¡¨ç¤ºã•ã‚Œã‚‹ã¯ãšã§ã™ã€‚例ãˆã°ï¼š + +``` text +2019.01.11 15:23:25.549505 [ 45 ] {} ExternalDictionaries: Failed reloading 'event2id' external dictionary: Poco::Exception. Code: 1000, e.code() = 111, e.displayText() = Connection refused, e.what() = Connection refused +``` + +ã‚‚ã—ファイルã®æœ€å¾Œã«ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•ã‚Œãªã„å ´åˆã€ä»¥ä¸‹ã®æ–‡å­—列ã‹ã‚‰å§‹ã¾ã‚‹å…¨ãƒ•ã‚¡ã‚¤ãƒ«ã‚’確èªã—ã¦ãã ã•ã„: + +``` text + Application: starting up. +``` + +サーãƒãƒ¼ã®2番目ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’èµ·å‹•ã—よã†ã¨ã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ãƒ­ã‚°ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + +``` text +2019.01.11 15:25:11.151730 [ 1 ] {} : Starting ClickHouse 19.1.0 with revision 54413 +2019.01.11 15:25:11.154578 [ 1 ] {} Application: starting up +2019.01.11 15:25:11.156361 [ 1 ] {} StatusFile: Status file ./status already exists - unclean restart. Contents: +PID: 8510 +Started at: 2019-01-11 15:24:23 +Revision: 54413 + +2019.01.11 15:25:11.156673 [ 1 ] {} Application: DB::Exception: Cannot lock file ./status. Another server instance in same directory is already running. +2019.01.11 15:25:11.156682 [ 1 ] {} Application: shutting down +2019.01.11 15:25:11.156686 [ 1 ] {} Application: Uninitializing subsystem: Logging Subsystem +2019.01.11 15:25:11.156716 [ 2 ] {} BaseDaemon: Stop SignalListener thread +``` + +**system.dログを見る** + +`clickhouse-server`ã®ãƒ­ã‚°ã«æœ‰ç”¨ãªæƒ…å ±ãŒãªã„ã€ã¾ãŸã¯ãƒ­ã‚°ãŒå­˜åœ¨ã—ãªã„å ´åˆã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦`system.d`ログを見るã“ã¨ãŒã§ãã¾ã™ï¼š + +``` bash +$ sudo journalctl -u clickhouse-server +``` + +**インタラクティブモードã§clickhouse-serverã‚’èµ·å‹•ã™ã‚‹** + +``` bash +$ sudo -u clickhouse /usr/bin/clickhouse-server --config-file /etc/clickhouse-server/config.xml +``` + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯æ¨™æº–ã®è‡ªå‹•èµ·å‹•ã‚¹ã‚¯ãƒªãƒ—トã®ãƒ‘ラメータã§ã‚µãƒ¼ãƒãƒ¼ã‚’インタラクティブアプリã¨ã—ã¦èµ·å‹•ã—ã¾ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯`clickhouse-server`ã¯ã™ã¹ã¦ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’コンソールã«å‡ºåŠ›ã—ã¾ã™ã€‚ + +### 設定パラメータ {#configuration-parameters} + +確èªäº‹é …: + +- Docker設定。 + + IPv6ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã§Docker内ã«ClickHouseを実行ã™ã‚‹å ´åˆã€`network=host`ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +- エンドãƒã‚¤ãƒ³ãƒˆè¨­å®šã€‚ + + [listen_host](../operations/server-configuration-parameters/settings.md#listen_host)ã¨[tcp_port](../operations/server-configuration-parameters/settings.md#tcp_port)ã®è¨­å®šã‚’確èªã—ã¦ãã ã•ã„。 + + ClickHouseサーãƒãƒ¼ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ãƒ­ãƒ¼ã‚«ãƒ«ãƒ›ã‚¹ãƒˆã‹ã‚‰ã®æŽ¥ç¶šã®ã¿ã‚’å—ã‘付ã‘ã¾ã™ã€‚ + +- HTTPプロトコル設定。 + + HTTP APIã®ãƒ—ロトコル設定を確èªã—ã¦ãã ã•ã„。 + +- 安全ãªæŽ¥ç¶šè¨­å®šã€‚ + + 以下ã®é …ç›®ã«ã¤ã„ã¦ç¢ºèªã—ã¦ãã ã•ã„: + + - [tcp_port_secure](../operations/server-configuration-parameters/settings.md#tcp_port_secure)ã®è¨­å®šã€‚ + - [SSL証明書](../operations/server-configuration-parameters/settings.md#openssl)ã®è¨­å®šã€‚ + + 接続時ã«é©åˆ‡ãªãƒ‘ラメータを使用ã—ã¦ãã ã•ã„。例ãˆã°ã€`clickhouse_client`ã§`port_secure`パラメータを使用ã—ã¦ãã ã•ã„。 + +- ユーザー設定。 + + 誤ã£ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼åやパスワードを使用ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## ã‚¯ã‚¨ãƒªå‡¦ç† {#troubleshooting-does-not-process-queries} + +ClickHouseãŒã‚¯ã‚¨ãƒªã‚’処ç†ã§ããªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜Žã‚’クライアントã«é€ä¿¡ã—ã¾ã™ã€‚`clickhouse-client`ã§ã¯ã€ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜ŽãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚HTTPインターフェースを使用ã—ã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’レスãƒãƒ³ã‚¹ãƒœãƒ‡ã‚£ã«é€ä¿¡ã—ã¾ã™ã€‚例ãˆã°ï¼š + +``` bash +$ curl 'http://localhost:8123/' --data-binary "SELECT a" +Code: 47, e.displayText() = DB::Exception: Unknown identifier: a. Note that there are no tables (FROM clause) in your query, context: required_names: 'a' source_tables: table_aliases: private_aliases: column_aliases: public_columns: 'a' masked_columns: array_join_columns: source_columns: , e.what() = DB::Exception +``` + +`stack-trace`パラメータを使用ã—ã¦`clickhouse-client`ã‚’èµ·å‹•ã™ã‚‹ã¨ã€ClickHouseã¯ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜Žã¨å…±ã«ã‚µãƒ¼ãƒãƒ¼ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’è¿”ã—ã¾ã™ã€‚ + +接続ãŒåˆ‡ã‚ŒãŸã¨ã„ã†ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚ŒãŸå ´åˆã€ãã®ã‚¯ã‚¨ãƒªã‚’å†å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã‚Œã§ã‚‚毎回クエリを実行ã™ã‚‹ãŸã³ã«æŽ¥ç¶šãŒåˆ‡ã‚Œã‚‹å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã‚’確èªã—ã¦ã‚¨ãƒ©ãƒ¼ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„。 + +## クエリ処ç†ã®åŠ¹çŽ‡ {#troubleshooting-too-slow} + +ClickHouseã®å‹•ä½œãŒé…ã™ãŽã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã®ãŸã‚ã«ã‚µãƒ¼ãƒãƒ¼ãƒªã‚½ãƒ¼ã‚¹ã¨ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«è² è·ã‚’ã‹ã‘ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +クエリã®ãƒ—ロファイルを行ã†ãŸã‚ã«`clickhouse-benchmark`ユーティリティを使用ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€1秒ã‚ãŸã‚Šå‡¦ç†ã—ãŸã‚¯ã‚¨ãƒªã®æ•°ã€1秒ã‚ãŸã‚Šå‡¦ç†ã—ãŸè¡Œã®æ•°ã€ãŠã‚ˆã³ã‚¯ã‚¨ãƒªå‡¦ç†æ™‚é–“ã®ç™¾åˆ†ä½ã‚’示ã—ã¾ã™ã€‚ diff --git a/docs/ja/operations/allocation-profiling.md b/docs/ja/operations/allocation-profiling.md new file mode 100644 index 00000000000..71833e9ea90 --- /dev/null +++ b/docs/ja/operations/allocation-profiling.md @@ -0,0 +1,207 @@ +--- +slug: /ja/operations/allocation-profiling +sidebar_label: "アロケーションプロファイリング" +title: "アロケーションプロファイリング" +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# アロケーションプロファイリング + +ClickHouseã¯ã€[jemalloc](https://github.com/jemalloc/jemalloc)をグローãƒãƒ«ã‚¢ãƒ­ã‚±ãƒ¼ã‚¿ãƒ¼ã¨ã—ã¦ä½¿ç”¨ã—ã¦ãŠã‚Šã€ã“ã‚Œã¯ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®ã‚µãƒ³ãƒ—リングやプロファイリング用ã®ã„ãã¤ã‹ã®ãƒ„ールをæä¾›ã—ã¦ã„ã¾ã™ã€‚ +アロケーションプロファイリングをより便利ã«ã™ã‚‹ãŸã‚ã«ã€Keeperã«ã¯`SYSTEM`コマンドã¨4LWコマンドãŒæä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## アロケーションã®ã‚µãƒ³ãƒ—リングã¨ãƒ’ーププロファイルã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ + +`jemalloc`ã§ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚’サンプリングã—ã¦ãƒ—ロファイルã™ã‚‹ãŸã‚ã«ã¯ã€ç’°å¢ƒå¤‰æ•°`MALLOC_CONF`を使用ã—ã¦ãƒ—ロファイリングを有効ã«ã—ã¦ClickHouse/Keeperã‚’èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```sh +MALLOC_CONF=background_thread:true,prof:true +``` + +`jemalloc`ã¯ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚’サンプリングã—ã€æƒ…報を内部ã«ä¿æŒã—ã¾ã™ã€‚ + +ç¾åœ¨ã®ãƒ—ロファイルをフラッシュã™ã‚‹ã‚ˆã†ã«`jemalloc`ã«æŒ‡ç¤ºã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«å®Ÿè¡Œã—ã¾ã™ï¼š + + + + + SYSTEM JEMALLOC FLUSH PROFILE + + + + + echo jmfp | nc localhost 9181 + + + + +デフォルトã§ã¯ã€ãƒ’ーププロファイルファイルã¯`/tmp/jemalloc_clickhouse._pid_._seqnum_.heap`ã«ç”Ÿæˆã•ã‚Œã€`_pid_`ã¯ClickHouseã®PIDã€`_seqnum_`ã¯ç¾åœ¨ã®ãƒ’ーププロファイルã®ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå·ã§ã™ã€‚ +Keeperã®å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯åŒã˜ãƒ«ãƒ¼ãƒ«ã«å¾“ã£ã¦`/tmp/jemalloc_keeper._pid_._seqnum_.heap`ã«ãªã‚Šã¾ã™ã€‚ + +別ã®å ´æ‰€ã‚’指定ã™ã‚‹ã«ã¯ã€`MALLOC_CONF`環境変数ã«`prof_prefix`オプションを追加ã—ã¾ã™ã€‚ +ãŸã¨ãˆã°ã€`/data`フォルダã«ãƒ—ロファイルを生æˆã—ãŸã„å ´åˆã€ãƒ•ã‚¡ã‚¤ãƒ«åã®ãƒ—レフィックスを`my_current_profile`ã¨ã™ã‚‹ã«ã¯ã€ClickHouse/Keeperを以下ã®ç’°å¢ƒå¤‰æ•°ã§å®Ÿè¡Œã—ã¾ã™ï¼š +```sh +MALLOC_CONF=background_thread:true,prof:true,prof_prefix:/data/my_current_profile +``` +生æˆã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯ãƒ—レフィックスã«PIDã¨ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå·ãŒè¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +## ヒーププロファイルã®åˆ†æž + +ヒーププロファイルを生æˆã—ãŸå¾Œã€ãれを分æžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã‚Œã«ã¯ã€`jemalloc`ã®ãƒ„ールã§ã‚ã‚‹[jeprof](https://github.com/jemalloc/jemalloc/blob/dev/bin/jeprof.in)を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ„ールã¯ä»¥ä¸‹ã®æ–¹æ³•ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ãã¾ã™ï¼š +- システムã®ãƒ‘ッケージマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã‚’使用ã—ã¦`jemalloc`をインストールã™ã‚‹ +- [jemallocリãƒã‚¸ãƒˆãƒª](https://github.com/jemalloc/jemalloc)をクローンã—ã€ãƒ«ãƒ¼ãƒˆãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‹ã‚‰autogen.shを実行ã™ã‚‹ã¨ã€`bin`フォルダ内ã«`jeprof`スクリプトãŒç”¨æ„ã•ã‚Œã¾ã™ + +:::note +`jeprof`ã¯`addr2line`を使用ã—ã¦ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’生æˆã—ã¾ã™ãŒã€ã“ã‚ŒãŒéžå¸¸ã«é…ã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +ãã®å ´åˆã¯ã€[代替実装](https://github.com/gimli-rs/addr2line)ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +``` +git clone https://github.com/gimli-rs/addr2line.git --depth=1 --branch=0.23.0 +cd addr2line +cargo build --features bin --release +cp ./target/release/addr2line path/to/current/addr2line +``` +::: + +`jeprof`を使用ã—ã¦ãƒ’ーププロファイルã‹ã‚‰ç”Ÿæˆã§ãる多ãã®ç•°ãªã‚‹å½¢å¼ãŒã‚ã‚Šã¾ã™ã€‚ +`jeprof --help`を実行ã—ã€åˆ©ç”¨æ³•ãŠã‚ˆã³ãƒ„ールãŒæä¾›ã™ã‚‹å¤šãã®ç•°ãªã‚‹ã‚ªãƒ—ションを確èªã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +一般ã«ã€`jeprof`コマンドã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```sh +jeprof path/to/binary path/to/heap/profile --output_format [ > output_file] +``` + +2ã¤ã®ãƒ—ロファイル間ã§ã©ã®ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ãŒç™ºç”Ÿã—ãŸã‹ã‚’比較ã—ãŸã„å ´åˆã€ãƒ™ãƒ¼ã‚¹å¼•æ•°ã‚’設定ã§ãã¾ã™ï¼š + +```sh +jeprof path/to/binary --base path/to/first/heap/profile path/to/second/heap/profile --output_format [ > output_file] +``` + +例ãˆã°ï¼š + +- å„手続ããŒ1è¡Œã”ã¨ã«æ›¸ã‹ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’生æˆã—ãŸã„å ´åˆï¼š + +```sh +jeprof path/to/binary path/to/heap/profile --text > result.txt +``` + +- コールグラフ付ãã®PDFファイルを生æˆã—ãŸã„å ´åˆï¼š + +```sh +jeprof path/to/binary path/to/heap/profile --pdf > result.pdf +``` + +### フレームグラフã®ç”Ÿæˆ + +`jeprof`を使用ã—ã¦ãƒ•ãƒ¬ãƒ¼ãƒ ã‚°ãƒ©ãƒ•ã‚’作æˆã™ã‚‹ãŸã‚ã«æŠ˜ã‚ŠãŸãŸã¾ã‚ŒãŸã‚¹ã‚¿ãƒƒã‚¯ã‚’生æˆã§ãã¾ã™ã€‚ + +`--collapsed`引数を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +```sh +jeprof path/to/binary path/to/heap/profile --collapsed > result.collapsed +``` + +ãã®å¾Œã€å¤šãã®ç•°ãªã‚‹ãƒ„ールを使用ã—ã¦æŠ˜ã‚ŠãŸãŸã¾ã‚ŒãŸã‚¹ã‚¿ãƒƒã‚¯ã‚’視覚化ã§ãã¾ã™ã€‚ + +最も人気ãŒã‚ã‚‹ã®ã¯ã€`flamegraph.pl`スクリプトをå«ã‚€[FlameGraph](https://github.com/brendangregg/FlameGraph)ã§ã™ï¼š + +```sh +cat result.collapsed | /path/to/FlameGraph/flamegraph.pl --color=mem --title="Allocation Flame Graph" --width 2400 > result.svg +``` + +ã•ã‚‰ã«ã€åŽé›†ã•ã‚ŒãŸã‚¹ã‚¿ãƒƒã‚¯ã‚’よりインタラクティブã«åˆ†æžã™ã‚‹ãŸã‚ã®ãƒ„ールã§ã‚ã‚‹[speedscope](https://www.speedscope.app/)も興味深ã„ã§ã™ã€‚ + +## 実行時ã«ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ãƒ—ロファイラーを制御ã™ã‚‹ + +ClickHouse/KeeperãŒãƒ—ロファイラーを有効ã«ã—ã¦é–‹å§‹ã•ã‚ŒãŸå ´åˆã€å®Ÿè¡Œæ™‚ã«ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ãƒ—ロファイリングを無効/有効ã«ã™ã‚‹ãŸã‚ã®è¿½åŠ ã‚³ãƒžãƒ³ãƒ‰ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã™ã‚‹ã“ã¨ã§ã€ç‰¹å®šã®é–“éš”ã ã‘をプロファイル化ã™ã‚‹ã®ãŒå®¹æ˜“ã«ãªã‚Šã¾ã™ã€‚ + +プロファイラーを無効ã«ã™ã‚‹ï¼š + + + + + SYSTEM JEMALLOC DISABLE PROFILE + + + + + echo jmdp | nc localhost 9181 + + + + +プロファイラーを有効ã«ã™ã‚‹ï¼š + + + + + SYSTEM JEMALLOC ENABLE PROFILE + + + + + echo jmep | nc localhost 9181 + + + + +プロファイラーã®åˆæœŸçŠ¶æ…‹ã‚’制御ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹`prof_active`オプションを設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +ãŸã¨ãˆã°ã€èµ·å‹•æ™‚ã«ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®ã‚µãƒ³ãƒ—リングを行ã‚ãšã€ãƒ—ロファイラーを有効ã«ã—ãŸå¾Œã§ã®ã¿è¡Œã„ãŸã„å ´åˆã€ä»¥ä¸‹ã®ç’°å¢ƒå¤‰æ•°ã‚’使用ã—ã¦ClickHouse/Keeperã‚’èµ·å‹•ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š +```sh +MALLOC_CONF=background_thread:true,prof:true,prof_active:false +``` + +ãã®å¾Œã€å¾Œã®æ®µéšŽã§ãƒ—ロファイラーを有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## プロファイラーã®è¿½åŠ ã‚ªãƒ—ション + +`jemalloc`ã«ã¯ãƒ—ロファイラーã«é–¢é€£ã™ã‚‹ã•ã¾ã–ã¾ãªã‚ªãƒ—ションãŒã‚ã‚Šã€ã“れを変更ã™ã‚‹ã“ã¨ã§`MALLOC_CONF`環境変数を通ã˜ã¦åˆ¶å¾¡ã§ãã¾ã™ã€‚ +ãŸã¨ãˆã°ã€ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚µãƒ³ãƒ—ルã®é–“éš”ã¯`lg_prof_sample`ã§åˆ¶å¾¡ã§ãã¾ã™ã€‚ +Nãƒã‚¤ãƒˆã”ã¨ã«ãƒ’ーププロファイルをダンプã™ã‚‹å ´åˆã€`lg_prof_interval`を使用ã—ã¦æœ‰åŠ¹ã«ã§ãã¾ã™ã€‚ + +ã“れらã®ã‚ªãƒ—ションã«ã¤ã„ã¦ã¯ã€`jemalloc`ã®[リファレンスページ](https://jemalloc.net/jemalloc.3.html)を確èªã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## ãã®ä»–ã®ãƒªã‚½ãƒ¼ã‚¹ + +ClickHouse/Keeperã¯ã€`jemalloc`関連ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’ã•ã¾ã–ã¾ãªæ–¹æ³•ã§å…¬é–‹ã—ã¦ã„ã¾ã™ã€‚ + +:::warning 警告 +ã“れらã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®ã„ãšã‚Œã‚‚互ã„ã«åŒæœŸã•ã‚Œã¦ãŠã‚‰ãšã€å€¤ãŒãšã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã‚’æ„è­˜ã—ã¦ãã ã•ã„。 +::: + +### システムテーブル `asynchronous_metrics` + +```sql +SELECT * +FROM system.asynchronous_metrics +WHERE metric ILIKE '%jemalloc%' +FORMAT Vertical +``` + +[å‚ç…§](/ja/operations/system-tables/asynchronous_metrics) + +### システムテーブル `jemalloc_bins` + +ç•°ãªã‚‹ã‚µã‚¤ã‚ºã‚¯ãƒ©ã‚¹ï¼ˆãƒ“ン)ã§ã®jemallocアロケーターを介ã—ã¦è¡Œã‚ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã«é–¢ã™ã‚‹æƒ…報をã€ã™ã¹ã¦ã®ã‚¢ãƒªãƒ¼ãƒŠã‹ã‚‰é›†ç´„ã—ãŸã‚‚ã®ã‚’å«ã¿ã¾ã™ã€‚ + +[å‚ç…§](/ja/operations/system-tables/jemalloc_bins) + +### Prometheus + +`asynchronous_metrics`ã‹ã‚‰ã®ã™ã¹ã¦ã®`jemalloc`関連メトリクスã¯ã€ClickHouseã¨Keeperã®ä¸¡æ–¹ã§Prometheusエンドãƒã‚¤ãƒ³ãƒˆã‚’使用ã—ã¦å…¬é–‹ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +[å‚ç…§](/ja/operations/server-configuration-parameters/settings#prometheus) + +### Keeperã®`jmst` 4LWコマンド + +Keeperã¯ã€[基本アロケーター統計](https://github.com/jemalloc/jemalloc/wiki/Use-Case%3A-Basic-Allocator-Statistics)ã‚’è¿”ã™`jmst` 4LWコマンドをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +例: +```sh +echo jmst | nc localhost 9181 +``` diff --git a/docs/ja/operations/analyzer.md b/docs/ja/operations/analyzer.md new file mode 100644 index 00000000000..f7759a20440 --- /dev/null +++ b/docs/ja/operations/analyzer.md @@ -0,0 +1,184 @@ +--- +slug: /ja/operations/analyzer +sidebar_label: アナライザー +title: アナライザー +description: ClickHouseã®ã‚¯ã‚¨ãƒªã‚¢ãƒŠãƒ©ã‚¤ã‚¶ãƒ¼ã«ã¤ã„ã¦ã®è©³ç´° +keywords: [アナライザー] +--- + +# アナライザー + + + +## 既知ã®éžäº’æ›æ€§ + +ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³`24.3`ã§ã¯ã€æ–°ã—ã„クエリアナライザーãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã«ãªã‚Šã¾ã—ãŸã€‚多ãã®ãƒã‚°ã‚’修正ã—æ–°ãŸãªæœ€é©åŒ–ã‚’å°Žå…¥ã—ãŸä¸€æ–¹ã§ã€ClickHouseã®å‹•ä½œã«ã„ãã¤ã‹ã®ç ´å£Šçš„変更ãŒåŠ ã‚ã£ã¦ã„ã¾ã™ã€‚æ–°ã—ã„アナライザーã«åˆã‚ã›ã¦ã‚¯ã‚¨ãƒªã‚’書ãç›´ã™æ–¹æ³•ã‚’ç†è§£ã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®å¤‰æ›´ã‚’ãŠèª­ã¿ãã ã•ã„。 + +### 無効ãªã‚¯ã‚¨ãƒªã¯æœ€é©åŒ–ã•ã‚Œãªããªã‚Šã¾ã—㟠+ +以å‰ã®ã‚¯ã‚¨ãƒªãƒ—ランニングインフラストラクãƒãƒ£ã§ã¯ã€ã‚¯ã‚¨ãƒªã®æ¤œè¨¼ã‚¹ãƒ†ãƒƒãƒ—よりもå‰ã«ASTレベルã®æœ€é©åŒ–ãŒé©ç”¨ã•ã‚Œã¦ã„ã¾ã—ãŸã€‚ã“ã®æœ€é©åŒ–ã«ã‚ˆã‚Šã€åˆæœŸã®ã‚¯ã‚¨ãƒªãŒæ›¸ãæ›ãˆã‚‰ã‚Œã€å®Ÿè¡Œå¯èƒ½ã«ãªã£ã¦ã„ã¾ã—ãŸã€‚ + +æ–°ã—ã„アナライザーã§ã¯ã€æœ€é©åŒ–ステップã®å‰ã«ã‚¯ã‚¨ãƒªã®æ¤œè¨¼ãŒè¡Œã‚ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ä»¥å‰ã¯å®Ÿè¡Œå¯èƒ½ã ã£ãŸç„¡åŠ¹ãªã‚¯ã‚¨ãƒªã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œãªããªã‚Šã¾ã—ãŸã€‚ã“ã®ã‚ˆã†ãªå ´åˆã€ã‚¯ã‚¨ãƒªã‚’手動ã§ä¿®æ­£ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例1:** + +```sql +SELECT number +FROM numbers(1) +GROUP BY toString(number) +``` + +ã“ã®ã‚¯ã‚¨ãƒªã§ã¯ã€`number`カラムãŒé›†è¨ˆå¾Œã«åˆ©ç”¨å¯èƒ½ãª`toString(number)`ã ã‘ã§ãƒ—ロジェクションリストã«ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚å¤ã„アナライザーã§ã¯ã€`GROUP BY toString(number)`ãŒ`GROUP BY number`ã«æœ€é©åŒ–ã•ã‚Œã€ã‚¯ã‚¨ãƒªãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã—ãŸã€‚ + +**例2:** + +```sql +SELECT + number % 2 AS n, + sum(number) +FROM numbers(10) +GROUP BY n +HAVING number > 5 +``` + +ã“ã®ã‚¯ã‚¨ãƒªã§ã‚‚åŒã˜å•é¡ŒãŒç™ºç”Ÿã—ã¾ã™ã€‚カラム`number`ãŒç•°ãªã‚‹ã‚­ãƒ¼ã§é›†è¨ˆå¾Œã«ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚以å‰ã®ã‚¯ã‚¨ãƒªã‚¢ãƒŠãƒ©ã‚¤ã‚¶ãƒ¼ã¯ã“ã®ã‚¯ã‚¨ãƒªã‚’修正ã—ã€`HAVING`å¥ã‹ã‚‰`WHERE`å¥ã«`number > 5`フィルタを移動ã—ã¾ã—ãŸã€‚ + +クエリを修正ã™ã‚‹ã«ã¯ã€éžé›†è¨ˆã‚«ãƒ©ãƒ ã«é©ç”¨ã•ã‚Œã‚‹ã™ã¹ã¦ã®æ¡ä»¶ã‚’標準SQL構文ã«å¾“ã£ã¦`WHERE`セクションã«ç§»å‹•ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +```sql +SELECT + number % 2 AS n, + sum(number) +FROM numbers(10) +WHERE number > 5 +GROUP BY n +``` + +### 無効ãªã‚¯ã‚¨ãƒªã§ã®CREATE VIEW + +æ–°ã—ã„アナライザーã§ã¯å¸¸ã«åž‹ãƒã‚§ãƒƒã‚¯ãŒè¡Œã‚ã‚Œã¾ã™ã€‚以å‰ã¯ã€ç„¡åŠ¹ãª`SELECT`クエリã§`VIEW`を作æˆã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã—ãŸã€‚最åˆã®`SELECT`ã¾ãŸã¯`INSERT`(`MATERIALIZED VIEW`ã®å ´åˆï¼‰ã§å¤±æ•—ã—ã¦ã„ã¾ã—ãŸã€‚ + +今ã§ã¯ã€ãã®ã‚ˆã†ãª`VIEW`を作æˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +**例:** + +```sql +CREATE TABLE source (data String) ENGINE=MergeTree ORDER BY tuple(); + +CREATE VIEW some_view +AS SELECT JSONExtract(data, 'test', 'DateTime64(3)') +FROM source; +``` + +### `JOIN`å¥ã®æ—¢çŸ¥ã®éžäº’æ›æ€§ + +#### プロジェクションã‹ã‚‰ã‚«ãƒ©ãƒ ã‚’使用ã™ã‚‹ã‚¸ãƒ§ã‚¤ãƒ³ + +デフォルトã§ã¯ã€ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¯`SELECT`リストã‹ã‚‰`JOIN USING`キーã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã›ã‚“。 + +æ–°ã—ã„設定`analyzer_compatibility_join_using_top_level_identifier`を有効ã«ã™ã‚‹ã¨ã€`JOIN USING`ã®å‹•ä½œãŒå¤‰ã‚ã‚Šã€`SELECT`クエリã®ãƒ—ロジェクションリストã‹ã‚‰ã®å¼ã«åŸºã¥ã„ã¦è­˜åˆ¥å­ã‚’解決ã™ã‚‹ã®ãŒå„ªå…ˆã•ã‚Œã€å·¦ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ç›´æŽ¥ã‚«ãƒ©ãƒ ã‚’使用ã—ã¾ã›ã‚“。 + +**例:** + +```sql +SELECT a + 1 AS b, t2.s +FROM Values('a UInt64, b UInt64', (1, 1)) AS t1 +JOIN Values('b UInt64, s String', (1, 'one'), (2, 'two')) t2 +USING (b); +``` + +`analyzer_compatibility_join_using_top_level_identifier`ã‚’`true`ã«è¨­å®šã™ã‚‹ã¨ã€ã‚¸ãƒ§ã‚¤ãƒ³æ¡ä»¶ã¯`t1.a + 1 = t2.b`ã¨è§£é‡ˆã•ã‚Œã€å¾“æ¥ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®å‹•ä½œã¨ä¸€è‡´ã—ã¾ã™ã€‚çµæžœã¯`2, 'two'`ã¨ãªã‚Šã¾ã™ã€‚ +設定ãŒ`false`ã®å ´åˆã€ã‚¸ãƒ§ã‚¤ãƒ³æ¡ä»¶ã¯`t1.b = t2.b`ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šã•ã‚Œã€ã‚¯ã‚¨ãƒªã¯`2, 'one'`ã‚’è¿”ã—ã¾ã™ã€‚ +`t1`ã«`b`ãŒå­˜åœ¨ã—ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªã¯ã‚¨ãƒ©ãƒ¼ã§å¤±æ•—ã—ã¾ã™ã€‚ + +#### `JOIN USING`ã¨`ALIAS`/`MATERIALIZED`カラムã®å‹•ä½œå¤‰æ›´ + +æ–°ã—ã„アナライザーã§ã¯ã€`ALIAS`ã‚„`MATERIALIZED`カラムをå«ã‚€`JOIN USING`クエリã§`*`を使用ã™ã‚‹ã¨ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã“れらã®ã‚«ãƒ©ãƒ ãŒçµæžœã‚»ãƒƒãƒˆã«å«ã¾ã‚Œã¾ã™ã€‚ + +**例:** + +```sql +CREATE TABLE t1 (id UInt64, payload ALIAS sipHash64(id)) ENGINE = MergeTree ORDER BY id; +INSERT INTO t1 VALUES (1), (2); + +CREATE TABLE t2 (id UInt64, payload ALIAS sipHash64(id)) ENGINE = MergeTree ORDER BY id; +INSERT INTO t2 VALUES (2), (3); + +SELECT * FROM t1 +FULL JOIN t2 USING (payload); +``` + +æ–°ã—ã„アナライザーã§ã¯ã€ã“ã®ã‚¯ã‚¨ãƒªã®çµæžœã«ã¯ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰`id`ã¨ã¨ã‚‚ã«`payload`カラムãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã‚Œã«å¯¾ã—ã€ä»¥å‰ã®ã‚¢ãƒŠãƒ©ã‚¤ã‚¶ãƒ¼ã¯ã“れらã®`ALIAS`カラムをå«ã‚ã‚‹ãŸã‚ã«ç‰¹å®šã®è¨­å®šï¼ˆ`asterisk_include_alias_columns`ã¾ãŸã¯`asterisk_include_materialized_columns`)を有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ã‚«ãƒ©ãƒ ã®é †åºãŒç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã—ãŸã€‚ + +特ã«å¤ã„クエリを新ã—ã„アナライザーã«ç§»è¡Œã™ã‚‹éš›ã«ã¯ã€`*`ã®ä»£ã‚ã‚Šã«`SELECT`å¥ã§æ˜Žç¤ºçš„ã«ã‚«ãƒ©ãƒ ã‚’指定ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ + +#### `USING`å¥ã«ãŠã‘るタイプ修飾å­ã®å‡¦ç† + +æ–°ã—ã„アナライザーã§ã¯ã€`USING`å¥ã§æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å…±é€šã‚¹ãƒ¼ãƒ‘ータイプを求ã‚るルールãŒæ¨™æº–化ã•ã‚Œã€ç‰¹ã«`LowCardinality`ã‚„`Nullable`ã®ã‚ˆã†ãªã‚¿ã‚¤ãƒ—修飾å­ã‚’扱ã†éš›ã«ã€ã‚ˆã‚Šäºˆæ¸¬å¯èƒ½ãªçµæžœã‚’生ã¿å‡ºã—ã¾ã™ã€‚ + +- `LowCardinality(T)`ã¨`T`:`LowCardinality(T)`åž‹ã®ã‚«ãƒ©ãƒ ãŒ`T`åž‹ã®ã‚«ãƒ©ãƒ ã¨çµåˆã•ã‚Œã‚‹å ´åˆã€å…±é€šã®ã‚¹ãƒ¼ãƒ‘ータイプã¯`T`ã¨ãªã‚Šã€`LowCardinality`修飾å­ã¯ç ´æ£„ã•ã‚Œã¾ã™ã€‚ + +- `Nullable(T)`ã¨`T`:`Nullable(T)`åž‹ã®ã‚«ãƒ©ãƒ ãŒ`T`åž‹ã®ã‚«ãƒ©ãƒ ã¨çµåˆã•ã‚Œã‚‹å ´åˆã€å…±é€šã®ã‚¹ãƒ¼ãƒ‘ータイプã¯`Nullable(T)`ã¨ãªã‚Šã€nullableã®ç‰¹æ€§ã¯ä¿æŒã•ã‚Œã¾ã™ã€‚ + +**例:** + +```sql +SELECT id, toTypeName(id) FROM Values('id LowCardinality(String)', ('a')) AS t1 +FULL OUTER JOIN Values('id String', ('b')) AS t2 +USING (id); +``` + +ã“ã®ã‚¯ã‚¨ãƒªã§ã¯ã€`id`ã®å…±é€šã‚¹ãƒ¼ãƒ‘ータイプã¯`String`ã¨åˆ¤æ–­ã•ã‚Œã€`t1`ã®`LowCardinality`修飾å­ã¯ç ´æ£„ã•ã‚Œã¾ã™ã€‚ + +### プロジェクションカラムåã®å¤‰æ›´ + +プロジェクションåã®è¨ˆç®—中ã€ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¯ç½®ãæ›ãˆã‚‰ã‚Œã¾ã›ã‚“。 + +```sql +SELECT + 1 + 1 AS x, + x + 1 +SETTINGS enable_analyzer = 0 +FORMAT PrettyCompact + + ┌─x─┬─plus(plus(1, 1), 1)─┠+1. │ 2 │ 3 │ + └───┴─────────────────────┘ + +SELECT + 1 + 1 AS x, + x + 1 +SETTINGS enable_analyzer = 1 +FORMAT PrettyCompact + + ┌─x─┬─plus(x, 1)─┠+1. │ 2 │ 3 │ + └───┴────────────┘ +``` + +### éžäº’æ›ã®é–¢æ•°å¼•æ•°ã‚¿ã‚¤ãƒ— + +æ–°ã—ã„アナライザーã§ã¯ã€åˆæœŸã‚¯ã‚¨ãƒªã‚¢ãƒŠãƒªã‚·ã‚¹ä¸­ã«åž‹æŽ¨è«–ãŒè¡Œã‚ã‚Œã¾ã™ã€‚ã“ã®å¤‰æ›´ã«ã‚ˆã‚Šã€åž‹ãƒã‚§ãƒƒã‚¯ã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚µãƒ¼ã‚­ãƒƒãƒˆè©•ä¾¡ã®å‰ã«è¡Œã‚ã‚Œã€`if`関数ã®å¼•æ•°ã¯å¸¸ã«å…±é€šã®ã‚¹ãƒ¼ãƒ‘ータイプをæŒãŸãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**例:** + +次ã®ã‚¯ã‚¨ãƒªã¯`There is no supertype for types Array(UInt8), String because some of them are Array and some of them are not`ã¨ã„ã†ã‚¨ãƒ©ãƒ¼ã§å¤±æ•—ã—ã¾ã™ï¼š + +```sql +SELECT toTypeName(if(0, [2, 3, 4], 'String')) +``` + +### 異種クラスター + +æ–°ã—ã„アナライザーã¯ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®ã‚µãƒ¼ãƒãƒ¼é–“ã®é€šä¿¡ãƒ—ロトコルを大幅ã«å¤‰æ›´ã—ã¾ã—ãŸã€‚ãã®ãŸã‚ã€ç•°ãªã‚‹`enable_analyzer`設定値をæŒã¤ã‚µãƒ¼ãƒãƒ¼ã§åˆ†æ•£ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã¯ä¸å¯èƒ½ã§ã™ã€‚ + +### ミューテーションã¯ä»¥å‰ã®ã‚¢ãƒŠãƒ©ã‚¤ã‚¶ãƒ¼ã«ã‚ˆã£ã¦è§£é‡ˆã•ã‚Œã¾ã™ + +ミューテーションã¯ã¾ã å¤ã„アナライザーを使用ã—ã¦ãŠã‚Šã€ã“ã®ãŸã‚ã€æ–°ã—ã„ClickHouse SQL機能ã¯ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã§ä½¿ç”¨ã§ãã¾ã›ã‚“。例ãˆã°ã€`QUALIFY`å¥ã§ã™ã€‚ステータスã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/ClickHouse/issues/61563)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +### サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„機能 + +æ–°ã—ã„アナライザーãŒç¾æ™‚点ã§ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ãªã„機能ã®ä¸€è¦§: + +- Annoyインデックス。 +- Hypothesisインデックス。進行中ã®ä½œæ¥­ã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/ClickHouse/pull/48381)。 +- ウィンドウビューã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。将æ¥çš„ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹äºˆå®šã¯ã‚ã‚Šã¾ã›ã‚“。 diff --git a/docs/ja/operations/backup.md b/docs/ja/operations/backup.md new file mode 100644 index 00000000000..1f8aa8bf3b7 --- /dev/null +++ b/docs/ja/operations/backup.md @@ -0,0 +1,494 @@ +--- +slug: /ja/operations/backup +description: 人為的ミスを効果的ã«è»½æ¸›ã™ã‚‹ãŸã‚ã«ã€ãƒ‡ãƒ¼ã‚¿ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¾©å…ƒã®æˆ¦ç•¥ã‚’æ…Žé‡ã«æº–å‚™ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +--- + +# ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¾©å…ƒ + +- [ローカルディスクã¸ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—](#backup-to-a-local-disk) +- [S3エンドãƒã‚¤ãƒ³ãƒˆã‚’使用ã™ã‚‹ãŸã‚ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/リストアã®è¨­å®š](#configuring-backuprestore-to-use-an-s3-endpoint) +- [S3ディスクを使用ã—ãŸãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/リストア](#backuprestore-using-an-s3-disk) +- [代替案](#alternatives) + +## ã‚³ãƒžãƒ³ãƒ‰æ¦‚è¦ + +```bash + BACKUP|RESTORE + TABLE [db.]table_name [AS [db.]table_name_in_backup] + [PARTITION[S] partition_expr [,...]] | + DICTIONARY [db.]dictionary_name [AS [db.]name_in_backup] | + DATABASE database_name [AS database_name_in_backup] + [EXCEPT TABLES ...] | + TEMPORARY TABLE table_name [AS table_name_in_backup] | + VIEW view_name [AS view_name_in_backup] + ALL TEMPORARY TABLES [EXCEPT ...] | + ALL [EXCEPT ...] } [,...] + [ON CLUSTER 'cluster_name'] + TO|FROM File('/') | Disk('', '/') | S3('/', '', '') + [SETTINGS base_backup = File('/') | Disk(...) | S3('/', '', '')] + +``` + +:::note ALL +ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³23.4以å‰ã§ã¯ã€`ALL`ã¯`RESTORE`コマンドã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã—ãŸã€‚ +::: + +## 背景 + +[レプリケーション](../engines/table-engines/mergetree-family/replication.md)ã¯ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®éšœå®³ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ä¿è­·ã—ã¾ã™ãŒã€äººç‚ºçš„ミスã«å¯¾ã—ã¦ã¯ä¿è­·ã—ã¾ã›ã‚“。ãŸã¨ãˆã°ã€ãƒ‡ãƒ¼ã‚¿ã®èª¤å‰Šé™¤ã‚„ã€ä¸é©åˆ‡ãªãƒ†ãƒ¼ãƒ–ルã®å‰Šé™¤ã€ã¾ãŸã¯é–“é•ã£ãŸã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ä¸Šã§ã®å‰Šé™¤ã€ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã®ãƒã‚°ã«ã‚ˆã‚‹èª¤ã£ãŸãƒ‡ãƒ¼ã‚¿å‡¦ç†ã‚„データ破æãŒå«ã¾ã‚Œã¾ã™ã€‚ã“れらã®ãƒŸã‚¹ã¯å¤šãã®å ´åˆã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«å½±éŸ¿ã—ã¾ã™ã€‚ClickHouseã¯ã€ä¸€éƒ¨ã®èª¤ã‚Šã‚’防ããŸã‚ã®çµ„ã¿è¾¼ã¿ã®ã‚»ãƒ¼ãƒ•ã‚¬ãƒ¼ãƒ‰ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ã€[50GBを超ãˆã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€MergeTreeã®ã‚ˆã†ãªã‚¨ãƒ³ã‚¸ãƒ³ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを簡å˜ã«å‰Šé™¤ã§ããªã„](server-configuration-parameters/settings.md#max-table-size-to-drop)よã†ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã—ã‹ã—ã€ã“れらã®ã‚»ãƒ¼ãƒ•ã‚¬ãƒ¼ãƒ‰ã§ã¯ã™ã¹ã¦ã®ã‚±ãƒ¼ã‚¹ã‚’ã‚«ãƒãƒ¼ã—ãã‚Œãšã€å›žé¿ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +人為的ミスを効果的ã«è»½æ¸›ã™ã‚‹ãŸã‚ã«ã€**事å‰ã«**データã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¾©å…ƒã®æˆ¦ç•¥ã‚’æ…Žé‡ã«æº–å‚™ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ä¼æ¥­ã”ã¨ã«åˆ©ç”¨å¯èƒ½ãªãƒªã‚½ãƒ¼ã‚¹ã‚„ビジãƒã‚¹è¦ä»¶ãŒç•°ãªã‚‹ãŸã‚ã€ã™ã¹ã¦ã®çŠ¶æ³ã«åˆã†ClickHouseã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¾©å…ƒã®ä¸‡èƒ½ãªè§£æ±ºç­–ã¯å­˜åœ¨ã—ã¾ã›ã‚“。1GBã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦æ©Ÿèƒ½ã™ã‚‹ã‚‚ã®ãŒã€æ•°åペタãƒã‚¤ãƒˆã«ã¯åŠ¹ã‹ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãã‚Œãžã‚Œã«ç‹¬è‡ªã®åˆ©ç‚¹ã¨æ¬ ç‚¹ãŒã‚ã‚‹ã•ã¾ã–ã¾ãªã‚¢ãƒ—ローãƒãŒã‚ã‚Šã¾ã™ã€‚以下ã§ã“ã‚Œã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ã•ã¾ã–ã¾ãªæ¬ ç‚¹ã‚’補ã†ãŸã‚ã«ã€1ã¤ã®ã‚¢ãƒ—ローãƒã ã‘ã§ãªãã„ãã¤ã‹ã®ã‚¢ãƒ—ローãƒã‚’使用ã™ã‚‹ã®ãŒè‰¯ã„考ãˆã§ã™ã€‚ + +:::note +何ã‹ã‚’ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã—ãŸãŒå¾©å…ƒã‚’試ã—ãŸã“ã¨ãŒãªã„å ´åˆã€å®Ÿéš›ã«å¿…è¦ãªæ™‚ã«å¾©å…ƒãŒæ­£å¸¸ã«å‹•ä½œã—ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼ˆå°‘ãªãã¨ã‚‚ビジãƒã‚¹ãŒè¨±å®¹ã§ãる以上ã«æ™‚é–“ãŒã‹ã‹ã‚Šã¾ã™ï¼‰ã€‚ã—ãŸãŒã£ã¦ã€ã©ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—アプローãƒã‚’é¸æŠžã™ã‚‹ã«ã—ã¦ã‚‚ã€å¾©å…ƒãƒ—ロセスも自動化ã—ã€å®šæœŸçš„ã«äºˆå‚™ã®ClickHouseクラスター上ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +::: + +## ローカルディスクã¸ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— + +### ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—å…ˆã®è¨­å®š + +以下ã®ä¾‹ã§ã¯ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å®›å…ˆãŒ`Disk('backups', '1.zip')`ã®ã‚ˆã†ã«æŒ‡å®šã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚目的地を準備ã™ã‚‹ã«ã¯ã€/etc/clickhouse-server/config.d/backup_disk.xmlã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—先を指定ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’追加ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯`backups`ã¨ã„ã†åå‰ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’定義ã—ã€ãã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’**backups > allowed_disk**リストã«è¿½åŠ ã—ã¾ã™: + +```xml + + + + + + local + /backups/ + + + + + + backups + /backups/ + + + +``` + +### パラメータ + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ãƒ•ãƒ«ã¾ãŸã¯å¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã§è¡Œã†ã“ã¨ãŒã§ãã€ãƒ†ãƒ¼ãƒ–ル(マテリアライズドビューã€ãƒ—ロジェクションã€ãŠã‚ˆã³Dictionaryã‚’å«ã‚€ï¼‰ã‚„データベースをå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯åŒæœŸï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ã¾ãŸã¯éžåŒæœŸã«ã™ã‚‹ã“ã¨ãŒã§ãã€åœ§ç¸®ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ã¯ãƒ‘スワードä¿è­·ã‚’設定ã§ãã¾ã™ã€‚ + +BACKUPãŠã‚ˆã³RESTOREステートメントã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルåã®ãƒªã‚¹ãƒˆã€å®›å…ˆï¼ˆã¾ãŸã¯ã‚½ãƒ¼ã‚¹ï¼‰ã€ã‚ªãƒ—ションã¨è¨­å®šã‚’å–ã‚Šã¾ã™: +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å®›å…ˆã€ã¾ãŸã¯å¾©å…ƒã®ã‚½ãƒ¼ã‚¹ã€‚ã“ã‚Œã¯ä»¥å‰ã«å®šç¾©ã•ã‚ŒãŸãƒ‡ã‚£ã‚¹ã‚¯ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ãŸã¨ãˆã°`Disk('backups', 'filename.zip')` +- ASYNC: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ãŸã¯å¾©å…ƒã‚’éžåŒæœŸã«è¡Œã† +- PARTITIONS: 復元ã™ã‚‹ãƒ‘ーティションã®ãƒªã‚¹ãƒˆ +- SETTINGS: + - `id`: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ãŸã¯å¾©å…ƒæ“作ã®IDを指定ã—ã€æŒ‡å®šã—ãªã„å ´åˆã¯ãƒ©ãƒ³ãƒ€ãƒ ã«ç”Ÿæˆã•ã‚Œã¾ã™ã€‚æ—¢ã«åŒã˜`id`ã§å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹æ“作ãŒã‚ã‚‹å ´åˆã€ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + - [`compression_method`](/docs/ja/sql-reference/statements/create/table.md/#column-compression-codecs)ãŠã‚ˆã³compression_level + - ディスク上ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®`password` + - `base_backup`: ã“ã®ã‚½ãƒ¼ã‚¹ã®å‰å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å®›å…ˆã€‚ãŸã¨ãˆã°ã€`Disk('backups', '1.zip')` + - `use_same_s3_credentials_for_base_backup`: ベースãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’S3ã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªã®è³‡æ ¼æƒ…報を継承ã™ã‚‹ã‹ã©ã†ã‹ã€‚`S3`ã§ã®ã¿æ©Ÿèƒ½ã€‚ + - `use_same_password_for_base_backup`: ベースãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—アーカイブãŒã‚¯ã‚¨ãƒªã®ãƒ‘スワードを継承ã™ã‚‹ã‹ã©ã†ã‹ã€‚ + - `structure_only`: 有効ã«ã™ã‚‹ã¨ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãªã—ã§CREATEステートメントã®ã¿ã‚’ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ãŸã¯å¾©å…ƒã§ãã¾ã™ + - `storage_policy`: 復元ã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã€‚å‚照:[データストレージ用ã®è¤‡æ•°ã®ãƒ–ロックデãƒã‚¤ã‚¹ã®ä½¿ç”¨](../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-multiple-volumes)。ã“ã®è¨­å®šã¯`RESTORE`コマンドã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚指定ã•ã‚ŒãŸã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã¯`MergeTree`ファミリーã®ã‚¨ãƒ³ã‚¸ãƒ³ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ + - `s3_storage_class`: S3ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¯ãƒ©ã‚¹ã€‚ãŸã¨ãˆã°ã€`STANDARD` + - `azure_attempt_to_create_container`: Azure Blob Storageを使用ã™ã‚‹éš›ã€æŒ‡å®šã•ã‚ŒãŸã‚³ãƒ³ãƒ†ãƒŠãŒå­˜åœ¨ã—ãªã„å ´åˆã«ä½œæˆã‚’試ã¿ã‚‹ã‹ã©ã†ã‹ã€‚デフォルトã¯trueã§ã™ã€‚ + +### 使用例 + +テーブルをãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã—ã€ãã®å¾Œå¾©å…ƒã™ã‚‹: +``` +BACKUP TABLE test.table TO Disk('backups', '1.zip') +``` + +対応ã™ã‚‹å¾©å…ƒ: +``` +RESTORE TABLE test.table FROM Disk('backups', '1.zip') +``` + +:::note +上記ã®`RESTORE`ã¯ãƒ†ãƒ¼ãƒ–ル`test.table`ã«ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã«å¤±æ•—ã—ã¾ã™ã€‚復元をテストã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルを削除ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã¯ã€`allow_non_empty_tables=true`ã¨ã„ã†è¨­å®šã‚’使用ã—ã¦ãã ã•ã„: +``` +RESTORE TABLE test.table FROM Disk('backups', '1.zip') +SETTINGS allow_non_empty_tables=true +``` +::: + +テーブルを新ã—ã„åå‰ã§å¾©å…ƒã¾ãŸã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +``` +RESTORE TABLE test.table AS test.table2 FROM Disk('backups', '1.zip') +``` + +``` +BACKUP TABLE test.table3 AS test.table4 TO Disk('backups', '2.zip') +``` + +### 増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— + +増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã€`base_backup`を指定ã™ã‚‹ã“ã¨ã§å–å¾—ã§ãã¾ã™ã€‚ +:::note +増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ãƒ™ãƒ¼ã‚¹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ä¾å­˜ã—ã¦ã„ã¾ã™ã€‚増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å¾©å…ƒã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ™ãƒ¼ã‚¹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を利用å¯èƒ½ã«ä¿ã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +æ–°ã—ã„データを増分ã§ä¿å­˜ã—ã¾ã™ã€‚`base_backup`ã®è¨­å®šã«ã‚ˆã‚Šã€ä»¥å‰ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ãŒ`Disk('backups', 'd.zip')`ã‹ã‚‰`Disk('backups', 'incremental-a.zip')`ã«ä¿å­˜ã•ã‚Œã¾ã™: +``` +BACKUP TABLE test.table TO Disk('backups', 'incremental-a.zip') + SETTINGS base_backup = Disk('backups', 'd.zip') +``` + +増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ãƒ™ãƒ¼ã‚¹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’æ–°ã—ã„テーブル`test.table2`ã«å¾©å…ƒã—ã¾ã™: +``` +RESTORE TABLE test.table AS test.table2 + FROM Disk('backups', 'incremental-a.zip'); +``` + +### ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ãƒ‘スワードを設定ã™ã‚‹ + +ディスクã«æ›¸ãè¾¼ã¾ã‚ŒãŸãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒ‘スワードをé©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +``` +BACKUP TABLE test.table + TO Disk('backups', 'password-protected.zip') + SETTINGS password='qwerty' +``` + +復元: +``` +RESTORE TABLE test.table + FROM Disk('backups', 'password-protected.zip') + SETTINGS password='qwerty' +``` + +### 圧縮設定 + +圧縮方法ã¾ãŸã¯ãƒ¬ãƒ™ãƒ«ã‚’指定ã—ãŸã„å ´åˆ: +``` +BACKUP TABLE test.table + TO Disk('backups', 'filename.zip') + SETTINGS compression_method='lzma', compression_level=3 +``` + +### 特定ã®ãƒ‘ーティションを復元ã™ã‚‹ +テーブルã«é–¢é€£ä»˜ã‘られãŸç‰¹å®šã®ãƒ‘ーティションを復元ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ã“れを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ãƒ‘ーティション1ã¨4を復元ã™ã‚‹ã«ã¯: +``` +RESTORE TABLE test.table PARTITIONS '2', '3' + FROM Disk('backups', 'filename.zip') +``` + +### tarアーカイブã¨ã—ã¦ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯zipã¨åŒæ§˜ã«tarアーカイブã¨ã—ã¦ä¿å­˜ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ãŸã ã—ã€ãƒ‘スワードã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +tarã¨ã—ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を書ã: +``` +BACKUP TABLE test.table TO Disk('backups', '1.tar') +``` + +対応ã™ã‚‹å¾©å…ƒ: +``` +RESTORE TABLE test.table FROM Disk('backups', '1.tar') +``` + +圧縮方法を変更ã™ã‚‹ã«ã¯ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—åã«é©åˆ‡ãªãƒ•ã‚¡ã‚¤ãƒ«ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ã‚’付ã‘ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚gzipを使用ã—ã¦tarアーカイブを圧縮ã™ã‚‹ã«ã¯: +``` +BACKUP TABLE test.table TO Disk('backups', '1.tar.gz') +``` + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る圧縮ファイルサフィックスã¯`tar.gz`ã€`.tgz`ã€`tar.bz2`ã€`tar.lzma`ã€`.tar.zst`ã€`.tzst`ãŠã‚ˆã³`.tar.xz`ã§ã™ã€‚ + +### ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’確èªã™ã‚‹ + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—コマンドã¯`id`ãŠã‚ˆã³`status`ã‚’è¿”ã—ã€ãã®`id`を使用ã—ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’å–å¾—ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€é•·æ™‚é–“ã®ASYNCãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®é€²è¡ŒçŠ¶æ³ã‚’確èªã™ã‚‹ã®ã«éžå¸¸ã«ä¾¿åˆ©ã§ã™ã€‚以下ã®ä¾‹ã§ã¯ã€æ—¢å­˜ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルを上書ãã—よã†ã¨ã—ãŸã¨ãã«ç™ºç”Ÿã—ãŸå¤±æ•—を示ã—ã¦ã„ã¾ã™: +```sql +BACKUP TABLE helloworld.my_first_table TO Disk('backups', '1.zip') ASYNC +``` +```response +┌─id───────────────────────────────────┬─status──────────┠+│ 7678b0b3-f519-4e6e-811f-5a0781a4eb52 │ CREATING_BACKUP │ +└──────────────────────────────────────┴─────────────────┘ + +1 row in set. Elapsed: 0.001 sec. +``` + +``` +SELECT + * +FROM system.backups +where id='7678b0b3-f519-4e6e-811f-5a0781a4eb52' +FORMAT Vertical +``` +```response +Row 1: +────── +id: 7678b0b3-f519-4e6e-811f-5a0781a4eb52 +name: Disk('backups', '1.zip') +#highlight-next-line +status: BACKUP_FAILED +num_files: 0 +uncompressed_size: 0 +compressed_size: 0 +#highlight-next-line +error: Code: 598. DB::Exception: Backup Disk('backups', '1.zip') already exists. (BACKUP_ALREADY_EXISTS) (version 22.8.2.11 (official build)) +start_time: 2022-08-30 09:21:46 +end_time: 2022-08-30 09:21:46 + +1 row in set. Elapsed: 0.002 sec. +``` + +`system.backups`テーブルã¨å…±ã«ã€ã™ã¹ã¦ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŠã‚ˆã³ãƒªã‚¹ãƒˆã‚¢æ“作ã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ­ã‚°ãƒ†ãƒ¼ãƒ–ル[backup_log](../operations/system-tables/backup_log.md)ã§ã‚‚追跡ã•ã‚Œã¾ã™: +``` +SELECT * +FROM system.backup_log +WHERE id = '7678b0b3-f519-4e6e-811f-5a0781a4eb52' +ORDER BY event_time_microseconds ASC +FORMAT Vertical +``` +```response +Row 1: +────── +event_date: 2023-08-18 +event_time_microseconds: 2023-08-18 11:13:43.097414 +id: 7678b0b3-f519-4e6e-811f-5a0781a4eb52 +name: Disk('backups', '1.zip') +status: CREATING_BACKUP +error: +start_time: 2023-08-18 11:13:43 +end_time: 1970-01-01 03:00:00 +num_files: 0 +total_size: 0 +num_entries: 0 +uncompressed_size: 0 +compressed_size: 0 +files_read: 0 +bytes_read: 0 + +Row 2: +────── +event_date: 2023-08-18 +event_time_microseconds: 2023-08-18 11:13:43.174782 +id: 7678b0b3-f519-4e6e-811f-5a0781a4eb52 +name: Disk('backups', '1.zip') +status: BACKUP_FAILED +#highlight-next-line +error: Code: 598. DB::Exception: Backup Disk('backups', '1.zip') already exists. (BACKUP_ALREADY_EXISTS) (version 23.8.1.1) +start_time: 2023-08-18 11:13:43 +end_time: 2023-08-18 11:13:43 +num_files: 0 +total_size: 0 +num_entries: 0 +uncompressed_size: 0 +compressed_size: 0 +files_read: 0 +bytes_read: 0 + +2 rows in set. Elapsed: 0.075 sec. +``` + +## S3エンドãƒã‚¤ãƒ³ãƒˆã‚’使用ã™ã‚‹ãŸã‚ã®BACKUP/RESTOREã®è¨­å®š + +S3ãƒã‚±ãƒƒãƒˆã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を書ããŸã‚ã«ã¯ã€æ¬¡ã®æƒ…å ±ãŒå¿…è¦ã§ã™: +- S3エンドãƒã‚¤ãƒ³ãƒˆ, + ãŸã¨ãˆã° `https://mars-doc-test.s3.amazonaws.com/backup-S3/` +- アクセスキーID, + ãŸã¨ãˆã° `ABC123` +- シークレットアクセスキー, + ãŸã¨ãˆã° `Abc+123` + +:::note +S3ãƒã‚±ãƒƒãƒˆã®ä½œæˆã«ã¤ã„ã¦ã¯[ClickHouseディスクã¨ã—ã¦ã®S3オブジェクトストレージã®ä½¿ç”¨](/docs/ja/integrations/data-ingestion/s3/index.md#configuring-s3-for-clickhouse-use)ã§ã‚«ãƒãƒ¼ã•ã‚Œã¦ã„ã¾ã™ãŒã€ãƒãƒªã‚·ãƒ¼ã‚’ä¿å­˜ã—ãŸå¾Œã«ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«æˆ»ã‚‹ã ã‘ã§ã‚ˆãã€ClickHouseã‚’S3ãƒã‚±ãƒƒãƒˆã§ä½¿ç”¨ã™ã‚‹ã‚ˆã†ã«è¨­å®šã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å®›å…ˆã¯æ¬¡ã®ã‚ˆã†ã«æŒ‡å®šã•ã‚Œã¾ã™: +``` +S3('/<ディレクトリ>', '<アクセスキーID>', '<シークレットアクセスキー>') +``` + +```sql +CREATE TABLE data +( + `key` Int, + `value` String, + `array` Array(String) +) +ENGINE = MergeTree +ORDER BY tuple() +``` + +```sql +INSERT INTO data SELECT * +FROM generateRandom('key Int, value String, array Array(String)') +LIMIT 1000 +``` + +### ベース(åˆæœŸï¼‰ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ä½œæˆ + +増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ã¯é–‹å§‹ã™ã‚‹ãŸã‚ã®_ベース_ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå¿…è¦ã§ã™ã€‚ã“ã®ä¾‹ã‚’後ã§ãƒ™ãƒ¼ã‚¹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚S3ã®å®›å…ˆã®æœ€åˆã®ãƒ‘ラメータã¯S3エンドãƒã‚¤ãƒ³ãƒˆã§ã€ãã®å¾Œã¯ã“ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—用ã®ãƒã‚±ãƒƒãƒˆå†…ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã™ã€‚ã“ã®ä¾‹ã§ã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’`my_backup`ã¨ã—ã¦ã„ã¾ã™ã€‚ + +```sql +BACKUP TABLE data TO S3('https://mars-doc-test.s3.amazonaws.com/backup-S3/my_backup', 'ABC123', 'Abc+123') +``` + +```response +┌─id───────────────────────────────────┬─status─────────┠+│ de442b75-a66c-4a3c-a193-f76f278c70f3 │ BACKUP_CREATED │ +└──────────────────────────────────────┴────────────────┘ +``` + +### データを追加ã™ã‚‹ + +増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã€ãƒ™ãƒ¼ã‚¹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ç¾åœ¨ã®ãƒ†ãƒ¼ãƒ–ル内容ã¨ã®é–“ã®å·®åˆ†ã§æ§‹æˆã•ã‚Œã¾ã™ã€‚増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’å–ã‚‹å‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’ã•ã‚‰ã«è¿½åŠ ã—ã¾ã™: + +```sql +INSERT INTO data SELECT * +FROM generateRandom('key Int, value String, array Array(String)') +LIMIT 100 +``` +### 増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’å–ã‚‹ + +ã“ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—コマンドã¯ãƒ™ãƒ¼ã‚¹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€`SETTINGS base_backup`ã¨ãƒ™ãƒ¼ã‚¹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å ´æ‰€ã‚’追加ã—ã¾ã™ã€‚増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å®›å…ˆã¯ãƒ™ãƒ¼ã‚¹ã¨åŒã˜ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã¯ãªãã€ãƒã‚±ãƒƒãƒˆå†…ã®ç•°ãªã‚‹ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ベースãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯`my_backup`ã«ã‚ã‚Šã€å¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯`my_incremental`ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™: +```sql +BACKUP TABLE data TO S3('https://mars-doc-test.s3.amazonaws.com/backup-S3/my_incremental', 'ABC123', 'Abc+123') SETTINGS base_backup = S3('https://mars-doc-test.s3.amazonaws.com/backup-S3/my_backup', 'ABC123', 'Abc+123') +``` + +```response +┌─id───────────────────────────────────┬─status─────────┠+│ f6cd3900-850f-41c9-94f1-0c4df33ea528 │ BACKUP_CREATED │ +└──────────────────────────────────────┴────────────────┘ +``` +### 増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å¾©å…ƒã™ã‚‹ + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’æ–°ã—ã„テーブル`data3`ã«å¾©å…ƒã—ã¾ã™ã€‚増分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå¾©å…ƒã•ã‚Œã‚‹ã¨ãã€ãƒ™ãƒ¼ã‚¹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚‚åŒæ§˜ã«å«ã¾ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。復元ã™ã‚‹éš›ã«ã¯å¢—分ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã¿ã‚’指定ã—ã¾ã™: +```sql +RESTORE TABLE data AS data3 FROM S3('https://mars-doc-test.s3.amazonaws.com/backup-S3/my_incremental', 'ABC123', 'Abc+123') +``` + +```response +┌─id───────────────────────────────────┬─status───┠+│ ff0c8c39-7dff-4324-a241-000796de11ca │ RESTORED │ +└──────────────────────────────────────┴──────────┘ +``` + +### 行数を確èªã™ã‚‹ + +å…ƒã®ãƒ†ãƒ¼ãƒ–ル`data`ã«ã¯æœ€åˆã«1,000è¡Œã€æ¬¡ã«100è¡Œã®ãƒ‡ãƒ¼ã‚¿ãŒæŒ¿å…¥ã•ã‚Œã€åˆè¨ˆ1,100è¡Œã¨ãªã‚Šã¾ã™ã€‚復元ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルãŒ1,100è¡Œã‚ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™: +```sql +SELECT count() +FROM data3 +``` +```response +┌─count()─┠+│ 1100 │ +└─────────┘ +``` + +### 内容を確èªã™ã‚‹ +ã“ã‚Œã«ã‚ˆã‚Šã€å…ƒã®ãƒ†ãƒ¼ãƒ–ル`data`ã¨å¾©å…ƒã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル`data3`ã®å†…容ãŒæ¯”較ã•ã‚Œã¾ã™: +```sql +SELECT throwIf(( + SELECT groupArray(tuple(*)) + FROM data + ) != ( + SELECT groupArray(tuple(*)) + FROM data3 + ), 'Data does not match after BACKUP/RESTORE') +``` +## S3ディスクを使用ã—ã¦ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/復元 + +ClickHouseã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸è¨­å®šã§S3ディスクを設定ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€S3ã¸ã®`BACKUP`/`RESTORE`ã‚’è¡Œã†ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚以下ã®ã‚ˆã†ã«ãƒ‡ã‚£ã‚¹ã‚¯ã‚’設定ã™ã‚‹ãŸã‚ã«ã€/etc/clickhouse-server/config.dã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’追加ã—ã¾ã™: + +```xml + + + + + s3_plain + + + + + + + + +
    + s3_plain +
    +
    +
    +
    +
    + + + s3_plain + +
    +``` + +ãã—ã¦ã€é€šå¸¸é€šã‚Š`BACKUP`/`RESTORE`を実行ã—ã¾ã™: + +```sql +BACKUP TABLE data TO Disk('s3_plain', 'cloud_backup'); +RESTORE TABLE data AS data_restored FROM Disk('s3_plain', 'cloud_backup'); +``` + +:::note +ã—ã‹ã—ã€æ¬¡ã®ã“ã¨ã‚’覚ãˆã¦ãŠã„ã¦ãã ã•ã„: +- ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¯`MergeTree`自体ã«ã¯ä½¿ç”¨ã›ãšã€`BACKUP`/`RESTORE`ã®ã¿ã«ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ +- テーブルãŒS3ストレージã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€ãƒ‡ã‚£ã‚¹ã‚¯ã®ç¨®é¡žãŒç•°ãªã‚‹å ´åˆã€ãƒ‘ーツを宛先ãƒã‚±ãƒƒãƒˆã«ã‚³ãƒ”ーã™ã‚‹ãŸã‚ã®`CopyObject`コールを使用ã›ãšã€ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ãŠã‚ˆã³ã‚¢ãƒƒãƒ—ロードを行ã„ã¾ã™ã€‚ã“ã‚Œã¯éžå¸¸ã«éžåŠ¹çŽ‡çš„ã§ã™ã€‚ã“ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«ã¯`BACKUP ... TO S3()`ã®æ§‹æ–‡ã‚’使用ã™ã‚‹ã“ã¨ã‚’優先ã—ã¾ã™ã€‚ +::: + +## 代替案 + +ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’ディスクã«ä¿å­˜ã—ã¦ãŠã‚Šã€ãƒ‡ã‚£ã‚¹ã‚¯ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—方法ã¯ã•ã¾ã–ã¾ã§ã™ã€‚ã“れらã¯éŽåŽ»ã«ä½¿ç”¨ã•ã‚Œã¦ããŸä»£æ›¿æ¡ˆã§ã‚ã‚Šã€ã‚ãªãŸã®ç’°å¢ƒã«é©ã—ã¦ã„ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +### ソースデータを別ã®å ´æ‰€ã«è¤‡è£½ã™ã‚‹ {#duplicating-source-data-somewhere-else} + +ClickHouseã«å–ã‚Šè¾¼ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ã€ã—ã°ã—ã°[Apache Kafka](https://kafka.apache.org)ã®ã‚ˆã†ãªæ°¸ç¶šçš„ãªã‚­ãƒ¥ãƒ¼ã‚’通ã—ã¦é…ä¿¡ã•ã‚Œã¾ã™ã€‚ã“ã®å ´åˆã€ClickHouseã«æ›¸ãè¾¼ã¾ã‚Œã‚‹é–“ã«åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’読ã¿å–ã‚Šã€ã©ã“ã‹ã«ä¿å­˜ã™ã‚‹è¿½åŠ ã®ã‚µãƒ–スクライãƒãƒ¼ã‚»ãƒƒãƒˆã‚’設定ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚多ãã®ä¼æ¥­ã¯ã™ã§ã«ã‚ªãƒ–ジェクトストアや[HDFS](https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html)ã®ã‚ˆã†ãªåˆ†æ•£ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã®ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æŽ¨å¥¨ã‚³ãƒ¼ãƒ«ãƒ‰ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ + +### ファイルシステムã®ã‚¹ãƒŠãƒƒãƒ—ショット {#filesystem-snapshots} + +一部ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ã¯ã‚¹ãƒŠãƒƒãƒ—ショット機能ãŒã‚ã‚Šã¾ã™ï¼ˆä¾‹ï¼š[ZFS](https://en.wikipedia.org/wiki/ZFS))。ãŸã ã—ã€ã“れらã¯ãƒ©ã‚¤ãƒ–クエリã®å‡¦ç†ã«ã¯æœ€é©ã§ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã‚る解決策ã¯ã€ã“ã®ã‚ˆã†ãªãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚’æŒã¤è¿½åŠ ã®ãƒ¬ãƒ—リカを作æˆã—ã€ãれを`SELECT`クエリã«ä½¿ç”¨ã•ã‚Œã‚‹[分散テーブル](../engines/table-engines/special/distributed.md)ã‹ã‚‰é™¤å¤–ã™ã‚‹ã“ã¨ã§ã™ã€‚ã“ã®ã‚ˆã†ãªãƒ¬ãƒ—リカ上ã®ã‚¹ãƒŠãƒƒãƒ—ショットã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’変更ã™ã‚‹ã‚¯ã‚¨ãƒªã®ç¯„囲外ã«ã‚ã‚Šã¾ã™ã€‚ボーナスã¨ã—ã¦ã€ã“れらã®ãƒ¬ãƒ—リカã¯ç‰¹åˆ¥ãªãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢è¨­å®šã§ã€ã‚µãƒ¼ãƒãƒ¼æ¯Žã«å¤šãã®ãƒ‡ã‚£ã‚¹ã‚¯ãŒæŽ¥ç¶šã•ã‚Œã¦ã„ã‚‹å ´åˆãŒã‚ã‚Šã€ã‚³ã‚¹ãƒˆåŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +データé‡ãŒå°ã•ã„å ´åˆã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ†ãƒ¼ãƒ–ルã¸ã®å˜ç´”ãª`INSERT INTO ... SELECT ...`ãŒã†ã¾ã機能ã™ã‚‹ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +### パーツã®æ“作 {#manipulations-with-parts} + +ClickHouseã¯`ALTER TABLE ... FREEZE PARTITION ...`クエリを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルパーティションã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚³ãƒ”ーを作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ã“ã‚Œã¯`/var/lib/clickhouse/shadow/`フォルダã¸ã®ãƒãƒ¼ãƒ‰ãƒªãƒ³ã‚¯ã‚’使用ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€é€šå¸¸ã¯å¤ã„データã®ãŸã‚ã«è¿½åŠ ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’消費ã—ã¾ã›ã‚“。作æˆã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚³ãƒ”ーã¯ClickHouseサーãƒãƒ¼ã«ã‚ˆã£ã¦ç®¡ç†ã•ã‚Œãªã„ãŸã‚ã€ãã“ã«æ®‹ã—ã¦ãŠãã“ã¨ãŒã§ãã¾ã™ï¼šè¿½åŠ ã®å¤–部システムを必è¦ã¨ã›ãšã«å˜ç´”ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’æŒã¤ã“ã¨ãŒã§ãã€ã—ã‹ã—ãã‚Œã¯ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®å•é¡Œã«å¯¾ã—ã¦ã¯ä¾ç„¶ã¨ã—ã¦è„†å¼±ã§ã™ã€‚ã“ã®ãŸã‚ã€ãれらを他ã®å ´æ‰€ã«ãƒªãƒ¢ãƒ¼ãƒˆã§ã‚³ãƒ”ーã—ã¦ã‹ã‚‰ãƒ­ãƒ¼ã‚«ãƒ«ã®ã‚³ãƒ”ーを削除ã™ã‚‹ã®ãŒè‰¯ã„ã§ã™ã€‚分散ファイルシステムã¨ã‚ªãƒ–ジェクトストアã¯ä¾ç„¶ã¨ã—ã¦è‰¯ã„é¸æŠžã§ã™ãŒã€é€šå¸¸æŽ¥ç¶šã•ã‚Œã¦ã„るファイルサーãƒãƒ¼ã®å®¹é‡ã§å分ã§ã‚ã‚‹ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ï¼ˆã“ã®å ´åˆã€è»¢é€ã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã¾ãŸã¯[rsync](https://en.wikipedia.org/wiki/Rsync)経由ã§è¡Œã‚ã‚Œã¾ã™ï¼‰ã€‚ +データã¯`ALTER TABLE ... ATTACH PARTITION ...`クエリを使用ã—ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å¾©å…ƒã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +パーティションæ“作ã«é–¢é€£ã™ã‚‹ã‚¯ã‚¨ãƒªã«ã¤ã„ã¦è©³ã—ãã¯ã€[ALTERドキュメント](../sql-reference/statements/alter/partition.md#alter_manipulations-with-partitions)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®ã‚¢ãƒ—ローãƒã‚’自動化ã™ã‚‹ãŸã‚ã®ã‚µãƒ¼ãƒ‰ãƒ‘ーティツールãŒåˆ©ç”¨å¯èƒ½ã§ã™ï¼š[clickhouse-backup](https://github.com/AlexAkulov/clickhouse-backup)。 + +## åŒæ™‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/リストアを許å¯ã—ãªã„設定 + +åŒæ™‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/リストアを許å¯ã—ãªã„よã†ã«ã™ã‚‹ãŸã‚ã«ã¯ã€ãã‚Œãžã‚Œã®è¨­å®šã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```xml + + + false + false + + +``` + +デフォルト値ã¯ã©ã¡ã‚‰ã‚‚trueã§ã‚ã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯åŒæ™‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/リストアãŒè¨±å¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ +ã“れらã®è¨­å®šãŒfalseã®å ´åˆã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã§1度ã«å®Ÿè¡Œã§ãã‚‹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/リストアã¯1ã¤ã®ã¿ã§ã™ã€‚ + +## AzureBlobStorage エンドãƒã‚¤ãƒ³ãƒˆã‚’使用ã™ã‚‹ãŸã‚ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/リストアã®è¨­å®š + +AzureBlobStorageコンテナã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を書ããŸã‚ã«ã¯ã€æ¬¡ã®æƒ…å ±ãŒå¿…è¦ã§ã™: +- AzureBlobStorageã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆæŽ¥ç¶šæ–‡å­—列 / URL, +- コンテナ, +- パス, +- アカウントå (URLãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆ) +- アカウントキー (URLãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆ) + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å®›å…ˆã¯æ¬¡ã®ã‚ˆã†ã«æŒ‡å®šã•ã‚Œã¾ã™: +``` +AzureBlobStorage('<接続文字列>/', '<コンテナ>', '<パス>', '<アカウントå>', '<アカウントキー>') +``` + +```sql +BACKUP TABLE data TO AzureBlobStorage('DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite1:10000/devstoreaccount1/;', + 'test_container', 'data_backup'); +RESTORE TABLE data AS data_restored FROM AzureBlobStorage('DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite1:10000/devstoreaccount1/;', + 'test_container', 'data_backup'); +``` diff --git a/docs/ja/operations/caches.md b/docs/ja/operations/caches.md new file mode 100644 index 00000000000..6964a49ab6f --- /dev/null +++ b/docs/ja/operations/caches.md @@ -0,0 +1,28 @@ +--- +slug: /ja/operations/caches +sidebar_position: 65 +sidebar_label: キャッシュ +title: "キャッシュタイプ" +description: クエリを実行ã™ã‚‹éš›ã€ClickHouseã¯ç•°ãªã‚‹ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¾ã™ã€‚ +--- + +クエリを実行ã™ã‚‹éš›ã€ClickHouseã¯ç•°ãªã‚‹ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¾ã™ã€‚ + +主ãªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¿ã‚¤ãƒ—: + +- `mark_cache` — [MergeTree](../engines/table-engines/mergetree-family/mergetree.md)ファミリã®ãƒ†ãƒ¼ãƒ–ルエンジンã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒžãƒ¼ã‚¯ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã€‚ +- `uncompressed_cache` — [MergeTree](../engines/table-engines/mergetree-family/mergetree.md)ファミリã®ãƒ†ãƒ¼ãƒ–ルエンジンã§ä½¿ç”¨ã•ã‚Œã‚‹ã€éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã€‚ +- オペレーティングシステムã®ãƒšãƒ¼ã‚¸ã‚­ãƒ£ãƒƒã‚·ãƒ¥ï¼ˆå®Ÿéš›ã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã—ã¦é–“接的ã«ä½¿ç”¨ã•ã‚Œã¾ã™ï¼‰ã€‚ + +追加ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¿ã‚¤ãƒ—: + +- DNSキャッシュ。 +- [Regexp](../interfaces/formats.md#data-format-regexp)キャッシュ。 +- コンパイルã•ã‚ŒãŸå¼ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã€‚ +- [Avroフォーマット](../interfaces/formats.md#data-format-avro)スキーマã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã€‚ +- [Dictionary](../sql-reference/dictionaries/index.md)データキャッシュ。 +- スキーマ推論キャッシュ。 +- S3ã€Azureã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ãªã©ã«å¯¾ã™ã‚‹[ファイルシステムキャッシュ](storing-data.md)。 +- [クエリキャッシュ](query-cache.md)。 + +キャッシュã®ä¸€ã¤ã‚’削除ã™ã‚‹ã«ã¯ã€[SYSTEM DROP ... CACHE](../sql-reference/statements/system.md#drop-mark-cache)ステートメントを使用ã—ã¾ã™ã€‚ diff --git a/docs/ja/operations/cluster-discovery.md b/docs/ja/operations/cluster-discovery.md new file mode 100644 index 00000000000..6f36b4d4f28 --- /dev/null +++ b/docs/ja/operations/cluster-discovery.md @@ -0,0 +1,179 @@ +--- +slug: /ja/operations/cluster-discovery +sidebar_label: クラスター検出 +--- +# クラスター検出 + +## æ¦‚è¦ + +ClickHouseã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼æ¤œå‡ºæ©Ÿèƒ½ã¯ã€ãƒŽãƒ¼ãƒ‰ã‚’自動ã§æ¤œå‡ºãƒ»ç™»éŒ²ã§ãるよã†ã«ã™ã‚‹ã“ã¨ã§ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®è¨­å®šã‚’簡素化ã—ã¾ã™ã€‚設定ファイルã§ãƒŽãƒ¼ãƒ‰ã‚’明示的ã«å®šç¾©ã™ã‚‹å¿…è¦ãŒãªããªã‚Šã€ç‰¹ã«å„ノードを手動ã§å®šç¾©ã™ã‚‹ã“ã¨ãŒè² æ‹…ã«ãªã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ + +:::note + +クラスター検出ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã§ã‚ã‚Šã€å°†æ¥ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§å¤‰æ›´ã¾ãŸã¯å‰Šé™¤ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã®æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹ã«ã¯ã€æ¬¡ã®è¨­å®šã‚’設定ファイルã«å«ã‚ã¦ãã ã•ã„: + +```xml + + + 1 + + +``` +::: + +## リモートサーãƒãƒ¼ã®è¨­å®š + +### 従æ¥ã®æ‰‹å‹•è¨­å®š + +従æ¥ã€ClickHouseã§ã¯ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å†…ã®å„シャードã¨ãƒ¬ãƒ—リカを設定ã§æ‰‹å‹•ã§æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã—ãŸï¼š + +```xml + + + + + node1 + 9000 + + + node2 + 9000 + + + + + node3 + 9000 + + + node4 + 9000 + + + + +``` + +### クラスター検出ã®ä½¿ç”¨ + +クラスター検出を使用ã™ã‚‹ã¨ã€ZooKeeperã§ãƒ‘スを指定ã™ã‚‹ã ã‘ã§ã€ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ãŒè‡ªå‹•çš„ã«æ¤œå‡ºã•ã‚Œã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +```xml + + + + /clickhouse/discovery/cluster_name + + + + + + + + + + + + + + + + + +``` + +特定ã®ãƒŽãƒ¼ãƒ‰ã«ã‚·ãƒ£ãƒ¼ãƒ‰ç•ªå·ã‚’指定ã—ãŸã„å ´åˆã¯ã€``セクション内ã«``ã‚¿ã‚°ã‚’å«ã‚ã¾ã™ï¼š + +`node1` 㨠`node2` 用: + +```xml + + /clickhouse/discovery/cluster_name + 1 + +``` + +`node3` 㨠`node4` 用: + +```xml + + /clickhouse/discovery/cluster_name + 2 + +``` + +### オブザーãƒãƒ¼ãƒ¢ãƒ¼ãƒ‰ + +オブザーãƒãƒ¼ãƒ¢ãƒ¼ãƒ‰ã§è¨­å®šã•ã‚ŒãŸãƒŽãƒ¼ãƒ‰ã¯ã€ãƒ¬ãƒ—リカã¨ã—ã¦è‡ªåˆ†è‡ªèº«ã‚’登録ã—ã¾ã›ã‚“。 +クラスター内ã®ä»–ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リカを観察・検出ã™ã‚‹ã ã‘ã§ã€ç©æ¥µçš„ã«å‚加ã—ã¾ã›ã‚“。 +オブザーãƒãƒ¼ãƒ¢ãƒ¼ãƒ‰ã‚’有効ã«ã™ã‚‹ã«ã¯ã€``セクション内ã«``ã‚¿ã‚°ã‚’å«ã‚ã¾ã™ï¼š + +```xml + + /clickhouse/discovery/cluster_name + + +``` + +## 使用例ã¨åˆ¶é™äº‹é … + +指定ã—ãŸZooKeeperã®ãƒ‘スã«ãƒŽãƒ¼ãƒ‰ãŒè¿½åŠ ã¾ãŸã¯å‰Šé™¤ã•ã‚Œã‚‹ã¨ã€ãã‚Œã«å¿œã˜ã¦ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã«è‡ªå‹•çš„ã«è¿½åŠ ã¾ãŸã¯å‰Šé™¤ã•ã‚Œã€è¨­å®šå¤‰æ›´ã‚„サーãƒãƒ¼å†èµ·å‹•ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 + +ãŸã ã—ã€å¤‰æ›´ã¯ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼è¨­å®šã«ã®ã¿å½±éŸ¿ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚„既存ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルã«ã¯å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。 + +3ノードã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ä¾‹ã‚’考ãˆã¦ã¿ã¾ã—ょã†ï¼š + +```xml + + + + /clickhouse/discovery/default_cluster + + + +``` + +``` +SELECT * EXCEPT (default_database, errors_count, slowdowns_count, estimated_recovery_time, database_shard_name, database_replica_name) +FROM system.clusters WHERE cluster = 'default'; + +┌─cluster─┬─shard_num─┬─shard_weight─┬─replica_num─┬─host_name────┬─host_address─┬─port─┬─is_local─┬─user─┬─is_active─┠+│ default │ 1 │ 1 │ 1 │ 92d3c04025e8 │ 172.26.0.5 │ 9000 │ 0 │ │ á´ºáµá´¸á´¸ │ +│ default │ 1 │ 1 │ 2 │ a6a68731c21b │ 172.26.0.4 │ 9000 │ 1 │ │ á´ºáµá´¸á´¸ │ +│ default │ 1 │ 1 │ 3 │ 8e62b9cb17a1 │ 172.26.0.2 │ 9000 │ 0 │ │ á´ºáµá´¸á´¸ │ +└─────────┴───────────┴──────────────┴─────────────┴──────────────┴──────────────┴──────┴──────────┴──────┴───────────┘ +``` + +```sql +CREATE TABLE event_table ON CLUSTER default (event_time DateTime, value String) +ENGINE = ReplicatedMergeTree('/clickhouse/tables/event_table', '{replica}') +ORDER BY event_time PARTITION BY toYYYYMM(event_time); + +INSERT INTO event_table ... +``` + +次ã«æ–°ã—ã„ノードをクラスターã«è¿½åŠ ã—ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®`remote_servers`セクションã«åŒã˜ã‚¨ãƒ³ãƒˆãƒªã‚’æŒã¤æ–°ã—ã„ノードを起動ã—ã¾ã™ï¼š + +``` +┌─cluster─┬─shard_num─┬─shard_weight─┬─replica_num─┬─host_name────┬─host_address─┬─port─┬─is_local─┬─user─┬─is_active─┠+│ default │ 1 │ 1 │ 1 │ 92d3c04025e8 │ 172.26.0.5 │ 9000 │ 0 │ │ á´ºáµá´¸á´¸ │ +│ default │ 1 │ 1 │ 2 │ a6a68731c21b │ 172.26.0.4 │ 9000 │ 1 │ │ á´ºáµá´¸á´¸ │ +│ default │ 1 │ 1 │ 3 │ 8e62b9cb17a1 │ 172.26.0.2 │ 9000 │ 0 │ │ á´ºáµá´¸á´¸ │ +│ default │ 1 │ 1 │ 4 │ b0df3669b81f │ 172.26.0.6 │ 9000 │ 0 │ │ á´ºáµá´¸á´¸ │ +└─────────┴───────────┴──────────────┴─────────────┴──────────────┴──────────────┴──────┴──────────┴──────┴───────────┘ +``` + +4番目ã®ãƒŽãƒ¼ãƒ‰ãŒã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã«å‚加ã—ã¦ã„ã¾ã™ãŒã€ãƒ†ãƒ¼ãƒ–ル`event_table`ã¯ã¾ã æœ€åˆã®3ã¤ã®ãƒŽãƒ¼ãƒ‰ã«ã®ã¿å­˜åœ¨ã—ã¦ã„ã¾ã™ï¼š + +```sql +SELECT hostname(), database, table FROM clusterAllReplicas(default, system.tables) WHERE table = 'event_table' FORMAT PrettyCompactMonoBlock + +┌─hostname()───┬─database─┬─table───────┠+│ a6a68731c21b │ default │ event_table │ +│ 92d3c04025e8 │ default │ event_table │ +│ 8e62b9cb17a1 │ default │ event_table │ +└──────────────┴──────────┴─────────────┘ +``` + +テーブルãŒã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã§ãƒ¬ãƒ—リケートã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼æ¤œå‡ºã®ä»£ã‚ã‚Šã«[レプリケートã•ã‚ŒãŸ](../engines/database-engines/replicated.md)データベースエンジンを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ diff --git a/docs/ja/operations/configuration-files.md b/docs/ja/operations/configuration-files.md new file mode 100644 index 00000000000..5ced547e8a0 --- /dev/null +++ b/docs/ja/operations/configuration-files.md @@ -0,0 +1,363 @@ +--- +slug: /ja/operations/configuration-files +sidebar_position: 50 +sidebar_label: 設定ファイル +--- + +# 設定ファイル + +ClickHouseサーãƒãƒ¼ã¯ã€XMLã¾ãŸã¯YAML構文ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§æ§‹æˆã§ãã¾ã™ã€‚ã»ã¨ã‚“ã©ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚¿ã‚¤ãƒ—ã§ã¯ã€ClickHouseサーãƒãƒ¼ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¨ã—㦠`/etc/clickhouse-server/config.xml` ã§å®Ÿè¡Œã•ã‚Œã¾ã™ãŒã€ã‚µãƒ¼ãƒãƒ¼ã®èµ·å‹•æ™‚ã«ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚ªãƒ—ション `--config-file=` ã¾ãŸã¯ `-C` を使用ã—ã¦è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®å ´æ‰€ã‚’手動ã§æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚追加ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ãƒ¡ã‚¤ãƒ³ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®ç›¸å¯¾ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª `config.d/` ã«é…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª `/etc/clickhouse-server/config.d/` ã«é…ç½®ã—ã¾ã™ã€‚ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¨ãƒ¡ã‚¤ãƒ³ã®è¨­å®šãŒClickHouseサーãƒãƒ¼ã§è¨­å®šã‚’é©ç”¨ã™ã‚‹å‰ã«å‰å‡¦ç†ã‚¹ãƒ†ãƒƒãƒ—ã§ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚設定ファイルã¯ã‚¢ãƒ«ãƒ•ã‚¡ãƒ™ãƒƒãƒˆé †ã§ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚更新を簡素化ã—ã€ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«åŒ–を改善ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã® `config.xml` ファイルを変更ã›ãšã€è¿½åŠ ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã‚’ `config.d/` ã«é…ç½®ã™ã‚‹ã®ãŒæœ€è‰¯ã®ãƒ—ラクティスã§ã™ã€‚ +(ClickHouse keeper ã®è¨­å®šã¯ `/etc/clickhouse-keeper/keeper_config.xml` ã«å­˜åœ¨ã™ã‚‹ãŸã‚ã€è¿½åŠ ãƒ•ã‚¡ã‚¤ãƒ«ã¯ `/etc/clickhouse-keeper/keeper_config.d/` ã«é…ç½®ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚) + +XML ãŠã‚ˆã³ YAML 設定ファイルを混在ã•ã›ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚例ãˆã°ã€ãƒ¡ã‚¤ãƒ³è¨­å®šãƒ•ã‚¡ã‚¤ãƒ« `config.xml` ã¨è¿½åŠ ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ« `config.d/network.xml`ã€`config.d/timezone.yaml`ã€`config.d/keeper.yaml` ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚å˜ä¸€ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«å†…㧠XML 㨠YAML を混在ã•ã›ã‚‹ã“ã¨ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。XML 設定ファイル㯠`...` をトップレベルタグã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚YAML 設定ファイルã§ã¯ã€`clickhouse:` ã¯ã‚ªãƒ—ションã§ã‚ã‚Šã€å­˜åœ¨ã—ãªã„å ´åˆã«ã¯ãƒ‘ーサーãŒè‡ªå‹•çš„ã«è£œå®Œã—ã¾ã™ã€‚ + +## 設定ã®ãƒžãƒ¼ã‚¸ {#merging} + +通常ã€2ã¤ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆãƒ¡ã‚¤ãƒ³ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¨ `config.d/` ã‹ã‚‰ã®ä»–ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ï¼‰ãŒæ¬¡ã®ã‚ˆã†ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ï¼š + +- ノード(ã¤ã¾ã‚Šã€è¦ç´ ã¸ã®ãƒ‘ス)ãŒä¸¡æ–¹ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«å­˜åœ¨ã—ã€`replace` ã¾ãŸã¯ `remove` 属性をæŒãŸãªã„å ´åˆã€ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸè¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«å«ã¾ã‚Œã€ä¸¡æ–¹ã®ãƒŽãƒ¼ãƒ‰ã®å­ãŒå«ã¾ã‚Œã¦å†å¸°çš„ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚ +- ã‚‚ã—ã©ã¡ã‚‰ã‹ã®ãƒŽãƒ¼ãƒ‰ãŒ `replace` 属性をå«ã‚“ã§ã„ãŸå ´åˆã€ãã®ãƒŽãƒ¼ãƒ‰ã®ã¿ãŒãƒžãƒ¼ã‚¸ã•ã‚ŒãŸè¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«å«ã¾ã‚Œã¾ã™ãŒã€`replace` 属性をæŒã¤ãƒŽãƒ¼ãƒ‰ã®å­è¦ç´ ã®ã¿ãŒå«ã¾ã‚Œã¾ã™ã€‚ +- ã‚‚ã—ã©ã¡ã‚‰ã‹ã®ãƒŽãƒ¼ãƒ‰ãŒ `remove` 属性をå«ã‚“ã§ã„ãŸå ´åˆã€ãã®ãƒŽãƒ¼ãƒ‰ã¯ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸè¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯å«ã¾ã‚Œã¾ã›ã‚“(既ã«å­˜åœ¨ã™ã‚‹å ´åˆã¯å‰Šé™¤ã•ã‚Œã¾ã™ï¼‰ã€‚ + +例: + +```xml + + + + 1 + + + 2 + + + 3 + + +``` + +ãŠã‚ˆã³ + +```xml + + + + 4 + + + 5 + + + 6 + + +``` + +生æˆã•ã‚ŒãŸãƒžãƒ¼ã‚¸ã•ã‚ŒãŸè¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ï¼š + +```xml + + + 1 + 4 + + + 5 + + +``` + +### from_env 㨠from_zk ã®ä½¿ç”¨ + +è¦ç´ ã®å€¤ã‚’環境変数ã®å€¤ã«ç½®ãæ›ãˆã‚‹ãŸã‚ã«ã€å±žæ€§ `from_env` を使用ã§ãã¾ã™ã€‚ + +例:`$MAX_QUERY_SIZE = 150000` ã®å ´åˆï¼š + +```xml + + + + + + + +``` + +ã“ã‚Œã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +``` xml + + + + 150000 + + + +``` + +åŒæ§˜ã« `from_zk` を使用ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼š + +``` xml + + + +``` + +``` +# clickhouse-keeper-client +/ :) touch /zk_configs +/ :) create /zk_configs/postgresql_port "9005" +/ :) get /zk_configs/postgresql_port +9005 +``` + +ã“れも次ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +``` xml + + 9005 + +``` + +#### from_env 㨠from_zk 属性ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ + +デフォルト値を設定ã—ã€ç’°å¢ƒå¤‰æ•°ã¾ãŸã¯ZooKeeperノードãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã®ã¿ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`replace="1"` を使用ã—ã¦ãã ã•ã„(from_env よりå‰ã«å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚ + +å‰ã®ä¾‹ã‚’使用ã—ã€`MAX_QUERY_SIZE` ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆï¼š + +``` xml + + + + 150000 + + + +``` + +デフォルト値を使用ã—ã¾ã™ï¼š + +``` xml + + + + 150000 + + + +``` + +## 設定ã®ç½®æ› {#substitution} + +設定ファイルã¯ç½®æ›ã‚’定義ã§ãã¾ã™ã€‚ç½®æ›ã«ã¯2ã¤ã®ã‚¿ã‚¤ãƒ—ãŒã‚ã‚Šã¾ã™ï¼š + +- è¦ç´ ã« `incl` 属性ãŒã‚ã‚‹å ´åˆã€ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰å¯¾å¿œã™ã‚‹ç½®æ›ã‚’ãã®å€¤ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚デフォルトã§ã¯ã€ç½®æ›ãŒè¨˜è¿°ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス㯠`/etc/metrika.xml` ã§ã™ã€‚ã“ã‚Œã¯ã‚µãƒ¼ãƒãƒ¼è¨­å®šã® [include_from](../operations/server-configuration-parameters/settings.md#include_from) è¦ç´ ã§å¤‰æ›´å¯èƒ½ã§ã™ã€‚ç½®æ›å€¤ã¯ã€ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«å†…ã® `/clickhouse/substitution_name` è¦ç´ ã§æŒ‡å®šã•ã‚Œã¾ã™ã€‚ `incl` ã§æŒ‡å®šã•ã‚ŒãŸç½®æ›ãŒå­˜åœ¨ã—ãªã„å ´åˆã€ãã®å†…容ãŒãƒ­ã‚°ã«è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚ClickHouseãŒä¸è¶³ã—ã¦ã„ã‚‹ç½®æ›ã‚’ログã«è¨˜éŒ²ã—ãªã„よã†ã«ã™ã‚‹ã«ã¯ã€`optional="true"` 属性を指定ã—ã¦ãã ã•ã„(例:[macros](../operations/server-configuration-parameters/settings.md#macros) ã®è¨­å®šï¼‰ã€‚ + +- è¦ç´ å…¨ä½“ã‚’ç½®æ›ã§ç½®ãæ›ãˆãŸã„å ´åˆã¯ã€è¦ç´ åã¨ã—㦠`include` を使用ã—ã¦ãã ã•ã„。Zookeeperã‹ã‚‰ã®ç½®æ›ã‚‚ã€å±žæ€§ `from_zk = "/path/to/node"` を指定ã™ã‚‹ã“ã¨ã§è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€è¦ç´ ã®å€¤ã¯ `/path/to/node` ã®Zookeeperノードã®å†…容ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚XMLサブツリー全体をZookeeperノードã¨ã—ã¦ä¿å­˜ã—ã¦ã„ã‚‹å ´åˆã‚‚åŒæ§˜ã«ã€ã‚½ãƒ¼ã‚¹è¦ç´ ã«å®Œå…¨ã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +XMLç½®æ›ã®ä¾‹ï¼š + +```xml + + + + + + + + + + +``` + +既存ã®æ§‹æˆã¨ç½®æ›å†…容をマージã—ãŸã„å ´åˆã¯ã€å±žæ€§ `merge="true"` を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ï¼š``。ã“ã®å ´åˆã€æ—¢å­˜ã®è¨­å®šã¯ç½®æ›ã®å†…容ã¨ãƒžãƒ¼ã‚¸ã•ã‚Œã€æ—¢å­˜ã®è¨­å®šãŒç½®æ›ã‹ã‚‰ã®å€¤ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +## 設定ã®æš—å·åŒ–ã¨éš è”½ {#encryption} + +構æˆè¦ç´ ã€ä¾‹ãˆã°ãƒ—レーンテキストã®ãƒ‘スワードや秘密éµã‚’æš—å·åŒ–ã™ã‚‹ãŸã‚ã«å¯¾ç§°æš—å·åŒ–を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã®ãŸã‚ã«ã¯ã€ã¾ãš[æš—å·åŒ–コーデック](../sql-reference/statements/create/table.md#encryption-codecs)を設定ã—ã€æš—å·åŒ–ã™ã‚‹è¦ç´ ã« `encrypted_by` 属性ã¨æš—å·åŒ–コーデックã®åå‰ã‚’追加ã—ã¾ã™ã€‚ + +`from_zk`ã€`from_env` ãŠã‚ˆã³ `incl` 属性(ã¾ãŸã¯è¦ç´  `include`)ã¨ã¯ç•°ãªã‚Šã€ç½®æ›ã€ã™ãªã‚ã¡æš—å·åŒ–ã•ã‚ŒãŸå€¤ã®å¾©å·åŒ–ã¯å‰å‡¦ç†ãƒ•ã‚¡ã‚¤ãƒ«ã§è¡Œã‚ã‚Œã¾ã›ã‚“。復å·åŒ–ã¯ã‚µãƒ¼ãƒãƒ¼ãƒ—ロセスã§å®Ÿè¡Œæ™‚ã«ã®ã¿è¡Œã‚ã‚Œã¾ã™ã€‚ + +例: + +```xml + + + + + 00112233445566778899aabbccddeeff + + + + + admin + 961F000000040000000000EEDDEF4F453CFE6457C4234BD7C09258BD651D85 + + + +``` + +値を暗å·åŒ–ã™ã‚‹ã«ã¯ã€ï¼ˆä¾‹ã®ï¼‰ãƒ—ログラム `encrypt_decrypt` を使用ã§ãã¾ã™ï¼š + +例: + +``` bash +./encrypt_decrypt /etc/clickhouse-server/config.xml -e AES_128_GCM_SIV abcd +``` + +``` text +961F000000040000000000EEDDEF4F453CFE6457C4234BD7C09258BD651D85 +``` + +æš—å·åŒ–ã•ã‚ŒãŸè¨­å®šè¦ç´ ã§ã‚ã£ã¦ã‚‚ã€æš—å·åŒ–ã•ã‚ŒãŸè¦ç´ ã¯å‰å‡¦ç†æ¸ˆã¿ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã“ã‚ŒãŒClickHouseã®å±•é–‹ã«å•é¡Œã‚’引ãèµ·ã“ã™å ´åˆã¯ã€äºŒã¤ã®ä»£æ›¿æ¡ˆã‚’æ案ã—ã¾ã™ï¼š1. å‰å‡¦ç†æ¸ˆã¿ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ•ã‚¡ã‚¤ãƒ«æ¨©é™ã‚’600ã«è¨­å®šã™ã‚‹ã€ã‚‚ã—ã㯠2. `hide_in_preprocessed` 属性を使用ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +例: + +```xml + + + + admin + secret + + + +``` + +## ユーザー設定 {#user-settings} + +`config.xml` ファイルã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šã€ãƒ—ロファイルã€ãŠã‚ˆã³ã‚¯ã‚©ãƒ¼ã‚¿ã‚’å«ã‚€åˆ¥ã®è¨­å®šã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®è¨­å®šã¸ã®ç›¸å¯¾ãƒ‘ス㯠`users_config` è¦ç´ ã«è¨­å®šã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯ `users.xml` ã§ã™ã€‚`users_config` ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šã€ãƒ—ロファイルã€ãŠã‚ˆã³ã‚¯ã‚©ãƒ¼ã‚¿ã¯ `config.xml` ã«ç›´æŽ¥è¨˜è¼‰ã•ã‚Œã¾ã™ã€‚ + +ユーザー設定ã¯ã€`config.xml` ãŠã‚ˆã³ `config.d/` ã¨åŒæ§˜ã«ã€åˆ¥ã€…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ†å‰²ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ディレクトリåã¯ã€`.xml` 接尾辞を除ã„㟠`users_config` 設定㨠`.d` を連çµã—ã¦å®šç¾©ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯ `users.d` ãŒä½¿ç”¨ã•ã‚Œã€`users_config` 㯠`users.xml` ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +設定ファイルã¯ã¾ãš [マージ](#merging) ã•ã‚Œã€è¨­å®šã‚’考慮ã—ã€ãã®å¾Œã§ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ãŒå‡¦ç†ã•ã‚Œã‚‹ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 + +## XML例 {#example} + +ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ã«å„ユーザー用ã«å€‹åˆ¥ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’用æ„ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +``` bash +$ cat /etc/clickhouse-server/users.d/alice.xml +``` + +``` xml + + + + analytics + + ::/0 + + ... + analytics + + + +``` + +## YAML例 {#example} + +ã“ã“ã§ã¯ã€YAMLã§æ›¸ã‹ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šã‚’見るã“ã¨ãŒã§ãã¾ã™ï¼š[config.yaml.example](https://github.com/ClickHouse/ClickHouse/blob/master/programs/server/config.yaml.example)。 + +ClickHouse ã®è¨­å®šã«é–¢ã—ã¦ã€YAML 㨠XML フォーマットã«ã¯ã„ãã¤ã‹ã®é•ã„ãŒã‚ã‚Šã¾ã™ã€‚ã“ã“ã§ã¯ã€YAML フォーマットã§ã®è¨­å®šã‚’書ããŸã‚ã®ã„ãã¤ã‹ã®ãƒ’ントを示ã—ã¾ã™ã€‚ + +テキスト値をæŒã¤ XML ã‚¿ã‚°ã¯ã€YAML ã®ã‚­ãƒ¼ã¨å€¤ã®ãƒšã‚¢ã§è¡¨ã•ã‚Œã¾ã™ +``` yaml +key: value +``` + +対応ã™ã‚‹ XML: +``` xml +value +``` + +ãƒã‚¹ãƒˆã•ã‚ŒãŸ XML ノード㯠YAML マップã§è¡¨ã•ã‚Œã¾ã™ï¼š +``` yaml +map_key: + key1: val1 + key2: val2 + key3: val3 +``` + +対応ã™ã‚‹ XML: +``` xml + + val1 + val2 + val3 + +``` + +åŒã˜XMLタグを複数回作æˆã™ã‚‹ã«ã¯ã€YAMLシーケンスを使用ã—ã¾ã™ï¼š +``` yaml +seq_key: + - val1 + - val2 + - key1: val3 + - map: + key2: val4 + key3: val5 +``` + +対応ã™ã‚‹ XML: +```xml +val1 +val2 + + val3 + + + + val4 + val5 + + +``` + +XML属性を指定ã™ã‚‹ã«ã¯ã€`@` プレフィックスを付ã‘ãŸå±žæ€§ã‚­ãƒ¼ã‚’使用ã§ãã¾ã™ã€‚`@` 㯠YAML 標準ã§äºˆç´„ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€ãƒ€ãƒ–ルクォートã§å›²ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š +``` yaml +map: + "@attr1": value1 + "@attr2": value2 + key: 123 +``` + +対応ã™ã‚‹ XML: +``` xml + + 123 + +``` + +YAML シーケンスã«å±žæ€§ã‚’使用ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼š +``` yaml +seq: + - "@attr1": value1 + - "@attr2": value2 + - 123 + - abc +``` + +対応ã™ã‚‹ XML: +``` xml +123 +abc +``` + +å‰è¿°ã®æ§‹æ–‡ã§ã¯ã€XMLテキストノードをXML属性ã¨ã—ã¦YAMLã§è¡¨ç¾ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã“ã®ç‰¹æ®Šãªã‚±ãƒ¼ã‚¹ã¯ã€`#text` 属性キーを使用ã—ã¦å®Ÿç¾ã§ãã¾ã™ï¼š +```yaml +map_key: + "@attr1": value1 + "#text": value2 +``` + +対応ã™ã‚‹ XML: +```xml +value2 +``` + +## 実装ã®è©³ç´° {#implementation-details} + +å„設定ファイルã«ã¤ã„ã¦ã€ã‚µãƒ¼ãƒãƒ¼ã¯èµ·å‹•æ™‚ã« `file-preprocessed.xml` ファイルも生æˆã—ã¾ã™ã€‚ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ã™ã¹ã¦ã®ç½®æ›ã¨ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ãŒå®Œäº†ã—ãŸçŠ¶æ…‹ã‚’å«ã‚“ã§ãŠã‚Šã€æƒ…å ±æ供用ã«æ„図ã•ã‚Œã¦ã„ã¾ã™ã€‚設定ファイルã§ZooKeeperã®ç½®æ›ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ãŒã‚µãƒ¼ãƒãƒ¼èµ·å‹•æ™‚ã«ZooKeeperãŒåˆ©ç”¨ã§ããªã„å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯å‰å‡¦ç†æ¸ˆã¿ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰è¨­å®šã‚’ロードã—ã¾ã™ã€‚ + +サーãƒãƒ¼ã¯è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®å¤‰æ›´ã‚„ã€ç½®æ›ã‚„オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã‚’è¡Œã†éš›ã«ä½¿ç”¨ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ãŠã‚ˆã³ZooKeeperノードを追跡ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„クラスターã®è¨­å®šã‚’自動ã§ãƒªãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã›ãšã«ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã‚„ユーザーã®è¨­å®šã‚’変更ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ diff --git a/docs/ja/operations/external-authenticators/http.md b/docs/ja/operations/external-authenticators/http.md new file mode 100644 index 00000000000..aebcdc3df37 --- /dev/null +++ b/docs/ja/operations/external-authenticators/http.md @@ -0,0 +1,91 @@ +--- +slug: /ja/operations/external-authenticators/http +title: "HTTP" +--- +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; + + + +HTTPサーãƒãƒ¼ã¯ã€ClickHouseユーザーã®èªè¨¼ã«ä½¿ç”¨ã§ãã¾ã™ã€‚HTTPèªè¨¼ã¯ã€æ—¢å­˜ã®`users.xml`やローカルアクセス制御パスã§å®šç¾©ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ã®ã¿å¤–部èªè¨¼å™¨ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ç¾åœ¨ã€GETメソッドを使用ã™ã‚‹[Basic](https://datatracker.ietf.org/doc/html/rfc7617)èªè¨¼æ–¹å¼ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## HTTPèªè¨¼ã‚µãƒ¼ãƒãƒ¼ã®å®šç¾© {#http-auth-server-definition} + +HTTPèªè¨¼ã‚µãƒ¼ãƒãƒ¼ã‚’定義ã™ã‚‹ã«ã¯ã€`config.xml`ã«`http_authentication_servers`セクションを追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** +```xml + + + + + http://localhost:8000/auth + 1000 + 1000 + 1000 + 3 + 50 + 1000 + + + + +``` + +`http_authentication_servers`セクション内ã«ç•°ãªã‚‹åå‰ã‚’使用ã—ã¦è¤‡æ•°ã®HTTPサーãƒãƒ¼ã‚’定義ã§ãã¾ã™ã€‚ + +**パラメータ** +- `uri` - èªè¨¼ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’è¡Œã†ãŸã‚ã®URI + +サーãƒãƒ¼ã¨é€šä¿¡ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚½ã‚±ãƒƒãƒˆã®ãƒŸãƒªç§’å˜ä½ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆ: +- `connection_timeout_ms` - デフォルト: 1000 ms +- `receive_timeout_ms` - デフォルト: 1000 ms +- `send_timeout_ms` - デフォルト: 1000 ms + +リトライã®ãƒ‘ラメータ: +- `max_tries` - èªè¨¼ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’è¡Œã†æœ€å¤§è©¦è¡Œå›žæ•°ã€‚デフォルト: 3 +- `retry_initial_backoff_ms` - リトライ時ã®åˆæœŸãƒãƒƒã‚¯ã‚ªãƒ•é–“隔。デフォルト: 50 ms +- `retry_max_backoff_ms` - 最大ãƒãƒƒã‚¯ã‚ªãƒ•é–“隔。デフォルト: 1000 ms + +### `users.xml`ã§ã®HTTPèªè¨¼ã®æœ‰åŠ¹åŒ– {#enabling-http-auth-in-users-xml} + +ユーザーã«å¯¾ã—ã¦HTTPèªè¨¼ã‚’有効化ã™ã‚‹ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©ã§`password`や類似セクションã®ä»£ã‚ã‚Šã«`http_authentication`セクションを指定ã—ã¾ã™ã€‚ + +パラメータ: +- `server` - 主ãª`config.xml`ファイルã§å‰è¿°ã®ã‚ˆã†ã«è¨­å®šã—ãŸHTTPèªè¨¼ã‚µãƒ¼ãƒãƒ¼ã®åå‰ã€‚ +- `scheme` - HTTPèªè¨¼æ–¹å¼ã€‚ç¾åœ¨ã¯`Basic`ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚デフォルト: Basic + +例 (`users.xml`ã«è¨˜è¿°): +```xml + + + + + + basic_server + basic + + + +``` + +:::note +HTTPèªè¨¼ã¯ä»–ã®èªè¨¼ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¨ä½µç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。`http_authentication`ã¨ä¸¦ã‚“ã§`password`ã®ã‚ˆã†ãªä»–ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ClickHouseã¯ã‚·ãƒ£ãƒƒãƒˆãƒ€ã‚¦ãƒ³ã—ã¾ã™ã€‚ +::: + +### SQLを使用ã—ãŸHTTPèªè¨¼ã®æœ‰åŠ¹åŒ– {#enabling-http-auth-using-sql} + +ClickHouseã§[SQLã«ã‚ˆã‚‹ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†](/docs/ja/guides/sre/user-management/index.md#access-control)ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€HTTPèªè¨¼ã§èªè­˜ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’SQL文を使用ã—ã¦ä½œæˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +```sql +CREATE USER my_user IDENTIFIED WITH HTTP SERVER 'basic_server' SCHEME 'Basic' +``` + +...ã‚‚ã—ãã¯ã€`scheme`を明示的ã«å®šç¾©ã›ãšãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®`Basic`を使用 + +```sql +CREATE USER my_user IDENTIFIED WITH HTTP SERVER 'basic_server' +``` + +### セッション設定ã®ä¼é” {#passing-session-settings} + +HTTPèªè¨¼ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã®å¿œç­”ボディãŒJSONå½¢å¼ã§`settings`サブオブジェクトをæŒã£ã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ãã®ã‚­ãƒ¼: 値ペアを文字列値ã¨ã—ã¦è§£æžã—ã€èªè¨¼ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®è¨­å®šã¨ã—ã¦ã‚»ãƒƒãƒˆã—よã†ã¨ã—ã¾ã™ã€‚解æžãŒå¤±æ•—ã—ãŸå ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã®å¿œç­”ボディã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/operations/external-authenticators/index.md b/docs/ja/operations/external-authenticators/index.md new file mode 100644 index 00000000000..d6e44a92632 --- /dev/null +++ b/docs/ja/operations/external-authenticators/index.md @@ -0,0 +1,19 @@ +--- +slug: /ja/operations/external-authenticators/ +sidebar_position: 48 +sidebar_label: 外部ユーザーèªè¨¼è€…ã¨ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª +title: "外部ユーザーèªè¨¼è€…ã¨ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª" +pagination_next: 'en/operations/external-authenticators/kerberos' +--- +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; + + + +ClickHouseã¯ã€å¤–部サービスを使用ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®èªè¨¼ã¨ç®¡ç†ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¤–部èªè¨¼è€…ã¨ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +- [LDAP](./ldap.md#external-authenticators-ldap) [èªè¨¼è€…](./ldap.md#ldap-external-authenticator) ãŠã‚ˆã³ [ディレクトリ](./ldap.md#ldap-external-user-directory) +- Kerberos [èªè¨¼è€…](./kerberos.md#external-authenticators-kerberos) +- [SSL X.509 èªè¨¼](./ssl-x509.md#ssl-external-authentication) +- HTTP [èªè¨¼è€…](./http.md) diff --git a/docs/ja/operations/external-authenticators/kerberos.md b/docs/ja/operations/external-authenticators/kerberos.md new file mode 100644 index 00000000000..c5867efb56c --- /dev/null +++ b/docs/ja/operations/external-authenticators/kerberos.md @@ -0,0 +1,125 @@ +--- +slug: /ja/operations/external-authenticators/kerberos +--- +# Kerberos +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; + + + +既存ã§é©åˆ‡ã«è¨­å®šã•ã‚ŒãŸClickHouseユーザーã¯ã€Kerberosèªè¨¼ãƒ—ロトコルを通ã˜ã¦èªè¨¼ã§ãã¾ã™ã€‚ + +ç¾åœ¨ã€Kerberosã¯æ—¢å­˜ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®å¤–部èªè¨¼è£…ç½®ã¨ã—ã¦ã®ã¿ä½¿ç”¨ã§ãã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯`users.xml`ã¾ãŸã¯ãƒ­ãƒ¼ã‚«ãƒ«ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡çµŒè·¯ã§å®šç¾©ã•ã‚Œã¾ã™ã€‚ã“れらã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯HTTPリクエストã—ã‹ä½¿ç”¨ã§ããšã€GSS-SPNEGOメカニズムを使用ã—ã¦èªè¨¼ã§ããªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +ã“ã®ã‚¢ãƒ—ローãƒã‚’å–ã‚‹ã«ã¯ã€ã‚·ã‚¹ãƒ†ãƒ å†…ã§KerberosãŒé©åˆ‡ã«è¨­å®šã•ã‚Œã€ClickHouseã®è¨­å®šã§æœ‰åŠ¹ã«ã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## ClickHouseã§ã®Kerberosã®æœ‰åŠ¹åŒ– {#enabling-kerberos-in-clickhouse} + +Kerberosを有効ã«ã™ã‚‹ã«ã¯ã€`config.xml`ã«`kerberos`セクションをå«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯è¿½åŠ ã®ãƒ‘ラメータをå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### パラメータ: + +- `principal` - セキュリティコンテキストをå—ã‘入れる際ã«å–å¾—ãŠã‚ˆã³ä½¿ç”¨ã•ã‚Œã‚‹æ­£è¦ã®ã‚µãƒ¼ãƒ“スプリンシパルå。 + - ã“ã®ãƒ‘ラメータã¯çœç•¥å¯èƒ½ã§ã€çœç•¥ã•ã‚ŒãŸå ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ—リンシパルãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +- `realm` - èªè¨¼ã‚’ã€ç™ºä¿¡è€…ã®ãƒ¬ãƒ«ãƒ ãŒä¸€è‡´ã™ã‚‹è¦æ±‚ã«åˆ¶é™ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¬ãƒ«ãƒ ã€‚ + - ã“ã®ãƒ‘ラメータã¯çœç•¥å¯èƒ½ã§ã€çœç•¥ã•ã‚ŒãŸå ´åˆã¯ãƒ¬ãƒ«ãƒ ã«ã‚ˆã‚‹è¿½åŠ ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¯è¡Œã‚ã‚Œã¾ã›ã‚“。 + +- `keytab` - サービスã®keytabファイルã¸ã®ãƒ‘ス。 + - ã“ã®ãƒ‘ラメータã¯çœç•¥å¯èƒ½ã§ã€çœç•¥ã•ã‚ŒãŸå ´åˆã¯ã€`KRB5_KTNAME`環境変数ã«è¨­å®šã•ã‚ŒãŸã‚µãƒ¼ãƒ“スã®keytabファイルã®ãƒ‘スを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +例(`config.xml`ã«è¨˜è¿°ï¼‰: + +```xml + + + + +``` + +プリンシパルを指定ã™ã‚‹å ´åˆ: + +```xml + + + + HTTP/clickhouse.example.com@EXAMPLE.COM + + +``` + +レルムã«ã‚ˆã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã†å ´åˆ: + +```xml + + + + EXAMPLE.COM + + +``` + +:::note +`kerberos`セクションã¯ä¸€ã¤ã ã‘定義å¯èƒ½ã§ã™ã€‚複数ã®`kerberos`セクションãŒå­˜åœ¨ã™ã‚‹ã¨ã€ClickHouseã¯Kerberosèªè¨¼ã‚’無効ã«ã—ã¾ã™ã€‚ +::: + +:::note +`principal`ã¨`realm`セクションをåŒæ™‚ã«æŒ‡å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。両方ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’指定ã™ã‚‹ã¨ã€ClickHouseã¯Kerberosèªè¨¼ã‚’無効ã«ã—ã¾ã™ã€‚ +::: + +## 既存ユーザーã®å¤–部èªè¨¼è£…ç½®ã¨ã—ã¦ã®Kerberos {#kerberos-as-an-external-authenticator-for-existing-users} + +Kerberosã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«ã«å®šç¾©ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼ˆ`users.xml`ã¾ãŸã¯ãƒ­ãƒ¼ã‚«ãƒ«ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡çµŒè·¯ã§å®šç¾©ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼‰ã®è­˜åˆ¥ã‚’確èªã™ã‚‹æ–¹æ³•ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ç¾åœ¨ã€**HTTPインターフェース上ã®è¦æ±‚ã®ã¿**ãŒ*kerberized*(GSS-SPNEGOメカニズムを介ã—ã¦ï¼‰ã•ã‚Œã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +Kerberosプリンシパルåã®å½¢å¼ã¯é€šå¸¸ã€æ¬¡ã®ãƒ‘ターンã«å¾“ã„ã¾ã™ï¼š + +- *primary/instance@REALM* + +*/instance*部分ã¯0回以上発生ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚**èªè¨¼ãŒæˆåŠŸã™ã‚‹ãŸã‚ã«ã¯ã€ç™ºä¿¡è€…ã®æ­£è¦ã®ãƒ—リンシパルåã®*primary*部分ãŒkerberizedユーザーåã¨ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™**。 + +### `users.xml`ã§ã®Kerberos有効化 {#enabling-kerberos-in-users-xml} + +ユーザーã«å¯¾ã—ã¦Kerberosèªè¨¼ã‚’有効ã«ã™ã‚‹ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©ã§`password`ã‚„ãã‚Œã«é¡žä¼¼ã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®ä»£ã‚ã‚Šã«`kerberos`セクションを指定ã—ã¾ã™ã€‚ + +パラメータ: + +- `realm` - èªè¨¼ã‚’ã€ç™ºä¿¡è€…ã®ãƒ¬ãƒ«ãƒ ãŒä¸€è‡´ã™ã‚‹è¦æ±‚ã«åˆ¶é™ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¬ãƒ«ãƒ ã€‚ + - ã“ã®ãƒ‘ラメータã¯çœç•¥å¯èƒ½ã§ã€çœç•¥ã•ã‚ŒãŸå ´åˆã¯ãƒ¬ãƒ«ãƒ ã«ã‚ˆã‚‹è¿½åŠ ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¯è¡Œã‚ã‚Œã¾ã›ã‚“。 + +例(`users.xml`ã«è¨˜è¿°ï¼‰: + +```xml + + + + + + + + EXAMPLE.COM + + + + +``` + +:::note +Kerberosèªè¨¼ã¯ä»–ã®èªè¨¼ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¨ä½µç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。`kerberos`ã¨ä¸€ç·’ã«`password`ã®ã‚ˆã†ãªã‚»ã‚¯ã‚·ãƒ§ãƒ³ãŒå­˜åœ¨ã™ã‚‹ã¨ã€ClickHouseã¯åœæ­¢ã—ã¾ã™ã€‚ +::: + +:::info Reminder +ユーザー`my_user`ãŒ`kerberos`を使用ã™ã‚‹ã‚ˆã†ã«ãªã£ãŸå ´åˆã€å‰è¿°ã®é€šã‚Šã€ãƒ¡ã‚¤ãƒ³ã®`config.xml`ファイルã§Kerberosを有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +### SQLを使用ã—ãŸKerberosã®æœ‰åŠ¹åŒ– {#enabling-kerberos-using-sql} + +ClickHouseã§[SQL駆動ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†](/docs/ja/guides/sre/user-management/index.md#access-control)ãŒæœ‰åŠ¹ãªå ´åˆã€Kerberosã§è­˜åˆ¥ã•ã‚Œã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚‚SQL文を使用ã—ã¦ä½œæˆã§ãã¾ã™ã€‚ + +```sql +CREATE USER my_user IDENTIFIED WITH kerberos REALM 'EXAMPLE.COM' +``` + +レルムã«ã‚ˆã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã‚ãªã„å ´åˆ: + +```sql +CREATE USER my_user IDENTIFIED WITH kerberos +``` diff --git a/docs/ja/operations/external-authenticators/ldap.md b/docs/ja/operations/external-authenticators/ldap.md new file mode 100644 index 00000000000..586a9f08862 --- /dev/null +++ b/docs/ja/operations/external-authenticators/ldap.md @@ -0,0 +1,186 @@ +--- +slug: /ja/operations/external-authenticators/ldap +title: "LDAP" +--- +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; + + + +LDAPサーãƒãƒ¼ã¯ClickHouseユーザーã®èªè¨¼ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ã“ã®ãŸã‚ã«äºŒã¤ã®ç•°ãªã‚‹ã‚¢ãƒ—ローãƒãŒã‚ã‚Šã¾ã™: + +- 既存ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ã€`users.xml`やローカルアクセスコントロールパスã«å®šç¾©ã•ã‚Œã¦ã„るユーザーã«å¯¾ã—ã¦ã€LDAPを外部èªè¨¼å™¨ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã€‚ +- ローカルã«å®šç¾©ã•ã‚Œã¦ã„ãªã„ユーザーをã€LDAPサーãƒãƒ¼ä¸Šã«å­˜åœ¨ã™ã‚‹å ´åˆã«èªè¨¼ã™ã‚‹ãŸã‚ã€LDAPを外部ユーザーディレクトリã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã€‚ + +ã“れらã®ã‚¢ãƒ—ローãƒã®ã©ã¡ã‚‰ã‚‚ã€ClickHouseã®è¨­å®šå†…ã§ä»–ã®éƒ¨åˆ†ãŒå‚ç…§å¯èƒ½ãªå†…部å称ã®LDAPサーãƒãƒ¼ã‚’定義ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## LDAP サーãƒãƒ¼ã®å®šç¾© {#ldap-server-definition} + +LDAPサーãƒãƒ¼ã‚’定義ã™ã‚‹ã«ã¯ã€`config.xml`ã«`ldap_servers`セクションを追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** + +```xml + + + + + + localhost + 636 + uid={user_name},ou=users,dc=example,dc=com + 300 + yes + tls1.2 + demand + /path/to/tls_cert_file + /path/to/tls_key_file + /path/to/tls_ca_cert_file + /path/to/tls_ca_cert_dir + ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384 + + + + + localhost + 389 + EXAMPLE\{user_name} + + CN=Users,DC=example,DC=com + (&(objectClass=user)(sAMAccountName={user_name})) + + no + + + +``` + +注æ„: `ldap_servers`セクション内ã§ç•°ãªã‚‹åå‰ã‚’使用ã—ã¦è¤‡æ•°ã®LDAPサーãƒãƒ¼ã‚’定義ã§ãã¾ã™ã€‚ + +**パラメーター** + +- `host` — LDAPサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆåã¾ãŸã¯IP。ã“ã®ãƒ‘ラメーターã¯å¿…é ˆã§ç©ºã«ã¯ã§ãã¾ã›ã‚“。 +- `port` — LDAPサーãƒãƒ¼ã®ãƒãƒ¼ãƒˆã€‚`enable_tls`ãŒ`true`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯`636`ã€ãれ以外ã®å ´åˆã¯`389`ã§ã™ã€‚ +- `bind_dn` — ãƒã‚¤ãƒ³ãƒ‰ã«ä½¿ç”¨ã•ã‚Œã‚‹DNを構築ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ³ãƒ—レート。 + - å„èªè¨¼è©¦è¡Œæ™‚ã«ã€ãƒ†ãƒ³ãƒ—レート中ã®ã™ã¹ã¦ã®`{user_name}`サブストリングã¯å®Ÿéš›ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã«ç½®ãæ›ãˆã‚‰ã‚Œã€ã“ã®çµæžœå¾—られãŸDNãŒæ§‹ç¯‰ã•ã‚Œã¾ã™ã€‚ +- `user_dn_detection` — ãƒã‚¤ãƒ³ãƒ‰ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®å®Ÿéš›ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼DNを検出ã™ã‚‹ãŸã‚ã®LDAP検索パラメータã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã€‚ + - ã“ã‚Œã¯ä¸»ã«Active Directoryサーãƒãƒ¼ã§ã®ãƒ­ãƒ¼ãƒ«ãƒžãƒƒãƒ”ングをã•ã‚‰ã«é€²ã‚ã‚‹ãŸã‚ã®æ¤œç´¢ãƒ•ã‚£ãƒ«ã‚¿ã§ã™ã€‚çµæžœã®ãƒ¦ãƒ¼ã‚¶ãƒ¼DNã¯ã€è¨±å¯ã•ã‚Œã‚‹å ´æ‰€ã§`{user_dn}`サブストリングを置ãæ›ãˆã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼DNã¯ãƒã‚¤ãƒ³ãƒ‰DNã¨åŒç­‰ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ãŒã€æ¤œç´¢ãŒè¡Œã‚ã‚ŒãŸå ´åˆã¯ã€æ¤œå‡ºã•ã‚ŒãŸå®Ÿéš›ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼DNã®å€¤ã§æ›´æ–°ã•ã‚Œã¾ã™ã€‚ + - `base_dn` — LDAP検索ã®ãŸã‚ã®ãƒ™ãƒ¼ã‚¹DNを構築ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ³ãƒ—レート。 + - 実際ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒã‚¤ãƒ³ãƒ‰DNã§ãƒ†ãƒ³ãƒ—レート中ã®ã™ã¹ã¦ã®`{user_name}`ãŠã‚ˆã³`{bind_dn}`サブストリングを置ãæ›ãˆã‚‹ã“ã¨ã«ã‚ˆã‚Šæ§‹ç¯‰ã•ã‚Œã¾ã™ã€‚ + - `scope` — LDAP検索ã®ã‚¹ã‚³ãƒ¼ãƒ—。 + - 許容値ã¯: `base`, `one_level`, `children`, `subtree`(デフォルト)ã§ã™ã€‚ + - `search_filter` — LDAP検索ã®ãŸã‚ã®æ¤œç´¢ãƒ•ã‚£ãƒ«ã‚¿ã‚’構築ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ³ãƒ—レート。 + - LDAP検索中ã«å®Ÿéš›ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã€ãƒã‚¤ãƒ³ãƒ‰DNã€ãŠã‚ˆã³ãƒ™ãƒ¼ã‚¹DNã§ãƒ†ãƒ³ãƒ—レート中ã®`{user_name}`ã€`{bind_dn}`ã€ãŠã‚ˆã³`{base_dn}`サブストリングをã™ã¹ã¦ç½®ãæ›ãˆã‚‹ã“ã¨ã«ã‚ˆã‚Šæ§‹ç¯‰ã•ã‚Œã¾ã™ã€‚ + - 特殊文字ã¯XMLã§é©åˆ‡ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- `verification_cooldown` — æˆåŠŸã—ãŸãƒã‚¤ãƒ³ãƒ‰è©¦è¡Œå¾Œã€LDAPサーãƒãƒ¼ã«æŽ¥è§¦ã›ãšã«ã€ã™ã¹ã¦ã®é€£ç¶šã—ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæˆåŠŸã—ãŸã¨è¦‹ãªã•ã‚Œã‚‹ç§’数。 + - キャッシュを無効ã«ã—ã¦å„èªè¨¼è¦æ±‚ã§LDAPサーãƒãƒ¼ã«æŽ¥è§¦ã‚’強制ã™ã‚‹ã«ã¯`0`(デフォルト)を指定ã—ã¾ã™ã€‚ +- `enable_tls` — LDAPサーãƒãƒ¼ã¸ã®ã‚»ã‚­ãƒ¥ã‚¢ãªæŽ¥ç¶šã‚’è¡Œã†ã‹ã©ã†ã‹ã®ãƒ•ãƒ©ã‚°ã€‚ + - プレーンテキストã®`ldap://`プロトコルを指定ã™ã‚‹ã«ã¯`no`(推奨ã•ã‚Œã¾ã›ã‚“)。 + - SSL/TLSを介ã—ãŸLDAP `ldaps://`プロトコルを指定ã™ã‚‹ã«ã¯`yes`(推奨ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ã‚’指定ã—ã¾ã™ã€‚ + - レガシーã®StartTLSプロトコル(プレーンテキストã®`ldap://`プロトコルをTLSã«ã‚¢ãƒƒãƒ—グレード)を指定ã™ã‚‹ã«ã¯`starttls`を指定ã—ã¾ã™ã€‚ +- `tls_minimum_protocol_version` — SSL/TLSã®æœ€å°ãƒ—ロトコルãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ + - 許容値ã¯: `ssl2`, `ssl3`, `tls1.0`, `tls1.1`, `tls1.2`(デフォルト)ã§ã™ã€‚ +- `tls_require_cert` — SSL/TLSピア証明書ã®æ¤œè¨¼å‹•ä½œã€‚ + - 許容値ã¯: `never`, `allow`, `try`, `demand`(デフォルト)ã§ã™ã€‚ +- `tls_cert_file` — 証明書ファイルã¸ã®ãƒ‘ス。 +- `tls_key_file` — 証明書キーã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘ス。 +- `tls_ca_cert_file` — CA証明書ファイルã¸ã®ãƒ‘ス。 +- `tls_ca_cert_dir` — CA証明書ãŒå«ã¾ã‚Œã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¸ã®ãƒ‘ス。 +- `tls_cipher_suite` — 許å¯ã•ã‚Œã‚‹æš—å·ã‚¹ã‚¤ãƒ¼ãƒˆï¼ˆOpenSSL表記ã§ï¼‰ã€‚ + +## LDAP 外部èªè¨¼å™¨ {#ldap-external-authenticator} + +リモートLDAPサーãƒãƒ¼ã‚’使用ã—ã¦ã€ãƒ­ãƒ¼ã‚«ãƒ«ã«å®šç¾©ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼ˆ`users.xml`やローカルアクセスコントロールパスã§å®šç¾©ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼‰ã«å¯¾ã™ã‚‹ãƒ‘スワードを検証ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ãŸã‚ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©ã®ä¸­ã®`password`や類似セクションã®ä»£ã‚ã‚Šã«ã€å‰è¿°ã®LDAPサーãƒãƒ¼åを指定ã—ã¾ã™ã€‚ + +å„ログイン試行時ã«ã€ClickHouseã¯[LDAPサーãƒãƒ¼ã®å®šç¾©](#ldap-server-definition)ã«å®šç¾©ã•ã‚Œã¦ã„ã‚‹`bind_dn`パラメータã§æŒ‡å®šã•ã‚ŒãŸDNã«ã€æä¾›ã•ã‚ŒãŸè³‡æ ¼æƒ…報を使用ã—ã¦ã€Œãƒã‚¤ãƒ³ãƒ‰ã€ã—よã†ã¨ã—ã€æˆåŠŸã—ãŸå ´åˆã«ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒèªè¨¼ã•ã‚ŒãŸã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã—ã°ã—ã°å˜ç´”ãƒã‚¤ãƒ³ãƒ‰ãƒ¡ã‚½ãƒƒãƒ‰ã¨å‘¼ã°ã‚Œã¾ã™ã€‚ + +**例** + +```xml + + + + + + + + my_ldap_server + + + + +``` + +注æ„: ユーザー`my_user`ã¯`my_ldap_server`ã‚’å‚ç…§ã—ã¦ã„ã¾ã™ã€‚ã“ã®LDAPサーãƒãƒ¼ã¯ã€å‰è¿°ã®ã‚ˆã†ã«ãƒ¡ã‚¤ãƒ³ã®`config.xml`ファイルã«è¨­å®šã•ã‚Œã¦ã„ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +SQL駆動ã®[アクセスコントロールã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†](/docs/ja/guides/sre/user-management/index.md#access-control)ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€LDAPサーãƒãƒ¼ã«ã‚ˆã£ã¦èªè¨¼ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯[CREATE USER](/docs/ja/sql-reference/statements/create/user.md#create-user-statement)文を使用ã—ã¦ä½œæˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +クエリ: + +```sql +CREATE USER my_user IDENTIFIED WITH ldap SERVER 'my_ldap_server'; +``` + +## LDAP 外部ユーザーディレクトリ {#ldap-external-user-directory} + +ローカルã«å®šç¾©ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«åŠ ãˆã¦ã€ãƒªãƒ¢ãƒ¼ãƒˆLDAPサーãƒãƒ¼ã‚’ユーザー定義ã®ã‚½ãƒ¼ã‚¹ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®ãŸã‚ã«ã¯ã€`config.xml`ファイルã®`users_directories`セクション内ã®`ldap`セクションã§ã€å‰è¿°ã®LDAPサーãƒãƒ¼åを指定ã—ã¾ã™ï¼ˆ[LDAPサーãƒãƒ¼ã®å®šç¾©](#ldap-server-definition)ã‚’å‚照)。 + +å„ログイン試行時ã«ã€ClickHouseã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©ã‚’ローカルã§è¦‹ã¤ã‘ã€ãれを通常ã©ãŠã‚Šèªè¨¼ã—よã†ã¨ã—ã¾ã™ã€‚ユーザーãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯å¤–部LDAPディレクトリã«ãã®å®šç¾©ãŒå­˜åœ¨ã™ã‚‹ã¨ä»®å®šã—ã€æä¾›ã•ã‚ŒãŸè³‡æ ¼æƒ…å ±ã§LDAPサーãƒãƒ¼ã®æŒ‡å®šã•ã‚ŒãŸDNã«ã€Œãƒã‚¤ãƒ³ãƒ‰ã€ã—よã†ã¨ã—ã¾ã™ã€‚ã“ã‚Œã«æˆåŠŸã—ãŸå ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯å­˜åœ¨ã—ã€èªè¨¼ã•ã‚ŒãŸã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ユーザーã«ã¯`roles`セクションã§æŒ‡å®šã•ã‚ŒãŸãƒªã‚¹ãƒˆã‹ã‚‰ãƒ­ãƒ¼ãƒ«ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ã•ã‚‰ã«ã€LDAP「検索ã€ãŒå®Ÿè¡Œã•ã‚Œã€ãã®çµæžœã‚’役割åã¨ã—ã¦å¤‰æ›ã—ã€`role_mapping`セクションも設定ã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“れらã¯ã™ã¹ã¦ã€SQL駆動ã®[アクセスコントロールã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†](/docs/ja/guides/sre/user-management/index.md#access-control)ãŒæœ‰åŠ¹ã«ãªã£ã¦ãŠã‚Šã€[CREATE ROLE](/docs/ja/sql-reference/statements/create/role.md#create-role-statement)ステートメントを使用ã—ã¦ãƒ­ãƒ¼ãƒ«ãŒä½œæˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ + +**例** + +`config.xml`ã«å…¥ã‚Šã¾ã™ã€‚ + +```xml + + + + + + my_ldap_server + + + + + + ou=groups,dc=example,dc=com + subtree + (&(objectClass=groupOfNames)(member={bind_dn})) + cn + clickhouse_ + + + + + + my_ad_server + + CN=Users,DC=example,DC=com + CN + subtree + (&(objectClass=group)(member={user_dn})) + clickhouse_ + + + + +``` + +注æ„: `user_directories`セクション内ã®`ldap`セクションã§å‚ç…§ã•ã‚Œã¦ã„ã‚‹`my_ldap_server`ã¯ã€å‰è¿°ã®ã‚ˆã†ã«`config.xml`ã§è¨­å®šã•ã‚ŒãŸäº‹å‰ã«å®šç¾©ã•ã‚ŒãŸLDAPサーãƒãƒ¼ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“([LDAPサーãƒãƒ¼ã®å®šç¾©](#ldap-server-definition)ã‚’å‚照)。 + +**パラメーター** + +- `server` — 上記ã®`ldap_servers`構æˆã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§å®šç¾©ã•ã‚ŒãŸLDAPサーãƒãƒ¼åã®1ã¤ã€‚ã“ã®ãƒ‘ラメーターã¯å¿…é ˆã§ã€ç©ºã«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- `roles` — LDAPサーãƒãƒ¼ã‹ã‚‰å–å¾—ã—ãŸå„ユーザーã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ã€ãƒ­ãƒ¼ã‚«ãƒ«ã«å®šç¾©ã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã®ãƒªã‚¹ãƒˆã‚’å«ã‚€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã€‚ + - ã“ã“ã§æŒ‡å®šã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ãŒãªã„å ´åˆã€ã¾ãŸã¯ä¸‹è¨˜ã®ãƒ­ãƒ¼ãƒ«ãƒžãƒƒãƒ”ング中ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ­ãƒ¼ãƒ«ãŒãªã„å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯èªè¨¼å¾Œã«ã„ã‹ãªã‚‹æ“作も行ã†ã“ã¨ãŒã§ãã¾ã›ã‚“。 +- `role_mapping` — LDAP検索パラメーターã¨ãƒžãƒƒãƒ”ングルールをæŒã¤ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã€‚ + - ユーザーãŒèªè¨¼ã•ã‚Œã‚‹éš›ã€LDAPã«ãƒã‚¤ãƒ³ãƒ‰ã•ã‚ŒãŸã¾ã¾ã€`search_filter`ã¨ãƒ­ã‚°ã‚¤ãƒ³ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®åå‰ã‚’使用ã—ã¦LDAP検索ãŒå®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ãã®æ¤œç´¢ä¸­ã«è¦‹ã¤ã‹ã£ãŸå„エントリã«å¯¾ã—ã¦ã€æŒ‡å®šã•ã‚ŒãŸå±žæ€§ã®å€¤ãŒæŠ½å‡ºã•ã‚Œã¾ã™ã€‚指定ã•ã‚ŒãŸãƒ—レフィックスをæŒã¤å„属性値ã«ã¤ã„ã¦ã€ãƒ—レフィックスãŒå‰Šé™¤ã•ã‚Œã€çµæžœã®å€¤ãŒClickHouseã§å®šç¾©ã•ã‚ŒãŸãƒ­ãƒ¼ã‚«ãƒ«ãƒ­ãƒ¼ãƒ«ã®åå‰ã«ãªã‚Šã¾ã™ã€‚ã“ã‚Œã¯[CREATE ROLE](/docs/ja/sql-reference/statements/create/role.md#create-role-statement)ステートメントã§äº‹å‰ã«ä½œæˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒæœŸå¾…ã•ã‚Œã¾ã™ã€‚ + - åŒã˜`ldap`セクション内ã«è¤‡æ•°ã®`role_mapping`セクションを定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãれらã¯ã™ã¹ã¦é©ç”¨ã•ã‚Œã¾ã™ã€‚ + - `base_dn` — LDAP検索ã®ãŸã‚ã®ãƒ™ãƒ¼ã‚¹DNを構築ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ³ãƒ—レート。 + - LDAP検索中ã«å®Ÿéš›ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã€ãƒã‚¤ãƒ³ãƒ‰DNã€ãŠã‚ˆã³ãƒ¦ãƒ¼ã‚¶ãƒ¼DNã§ãƒ†ãƒ³ãƒ—レート中ã®`{user_name}`ã€`{bind_dn}`ã€ãŠã‚ˆã³`{user_dn}`サブストリングをã™ã¹ã¦ç½®ãæ›ãˆã‚‹ã“ã¨ã«ã‚ˆã‚Šæ§‹ç¯‰ã•ã‚Œã¾ã™ã€‚ + - `scope` — LDAP検索ã®ã‚¹ã‚³ãƒ¼ãƒ—。 + - 許容値ã¯: `base`, `one_level`, `children`, `subtree`(デフォルト)ã§ã™ã€‚ + - `search_filter` — LDAP検索ã®ãŸã‚ã®æ¤œç´¢ãƒ•ã‚£ãƒ«ã‚¿ã‚’構築ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ³ãƒ—レート。 + - LDAP検索中ã«å®Ÿéš›ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã€ãƒã‚¤ãƒ³ãƒ‰DNã€ãƒ¦ãƒ¼ã‚¶ãƒ¼DNã€ãŠã‚ˆã³ãƒ™ãƒ¼ã‚¹DNã§ãƒ†ãƒ³ãƒ—レート中ã®`{user_name}`ã€`{bind_dn}`ã€`{user_dn}`ã€ãŠã‚ˆã³`{base_dn}`サブストリングをã™ã¹ã¦ç½®ãæ›ãˆã‚‹ã“ã¨ã«ã‚ˆã‚Šæ§‹ç¯‰ã•ã‚Œã¾ã™ã€‚ + - 特殊文字ã¯XMLã§é©åˆ‡ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + - `attribute` — LDAP検索ã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹å€¤ã‚’æŒã¤å±žæ€§å。デフォルトã§ã¯`cn`ã§ã™ã€‚ + - `prefix` — LDAP検索ã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹å…ƒã®æ–‡å­—列リストã®å„文字列ã®å‰ã«å­˜åœ¨ã™ã‚‹ã¨äºˆæƒ³ã•ã‚Œã‚‹ãƒ—レフィックス。プレフィックスã¯å…ƒã®æ–‡å­—列ã‹ã‚‰å‰Šé™¤ã•ã‚Œã€ãã®çµæžœå¾—られãŸæ–‡å­—列ã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ­ãƒ¼ãƒ«åã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚デフォルトã§ã¯ç©ºã§ã™ã€‚ diff --git a/docs/ja/operations/external-authenticators/ssl-x509.md b/docs/ja/operations/external-authenticators/ssl-x509.md new file mode 100644 index 00000000000..6aa7a059596 --- /dev/null +++ b/docs/ja/operations/external-authenticators/ssl-x509.md @@ -0,0 +1,43 @@ +--- +slug: /ja/operations/external-authenticators/ssl-x509 +title: "SSL X.509証明書èªè¨¼" +--- +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; + + + +[SSL 'strict' オプション](../server-configuration-parameters/settings.md#openssl)ã¯ã€å—信接続ã«å¯¾ã™ã‚‹è¨¼æ˜Žæ›¸ã®åŽ³æ ¼ãªæ¤œè¨¼ã‚’有効ã«ã—ã¾ã™ã€‚ã“ã®å ´åˆã€ä¿¡é ¼ã•ã‚ŒãŸè¨¼æ˜Žæ›¸ã‚’æŒã¤æŽ¥ç¶šã®ã¿ãŒç¢ºç«‹ã•ã‚Œã€ä¿¡é ¼ã•ã‚Œã¦ã„ãªã„証明書ã®æŽ¥ç¶šã¯æ‹’å¦ã•ã‚Œã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€è¨¼æ˜Žæ›¸ã®æ¤œè¨¼ã«ã‚ˆã‚Šã€å—信接続を一æ„ã«èªè¨¼ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚証明書ã®`Common Name`ã‚ã‚‹ã„ã¯`subjectAltName extension`フィールドを用ã„ã¦ã€æŽ¥ç¶šã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’識別ã—ã¾ã™ã€‚`subjectAltName extension`ã¯ã‚µãƒ¼ãƒãƒ¼è¨­å®šã§ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ '*' ã®ä½¿ç”¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€è¤‡æ•°ã®è¨¼æ˜Žæ›¸ã‚’åŒã˜ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é–¢é€£ä»˜ã‘ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã•ã‚‰ã«ã€è¨¼æ˜Žæ›¸ã®å†ç™ºè¡ŒãŠã‚ˆã³å¤±åŠ¹ã¯ClickHouseã®è¨­å®šã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。 + +SSL証明書èªè¨¼ã‚’有効ã«ã™ã‚‹ã«ã¯ã€å„ClickHouseユーザーã«å¯¾å¿œã—ãŸ`Common Name`ã¾ãŸã¯`Subject Alt Name`ã®ãƒªã‚¹ãƒˆã‚’設定ファイル`users.xml`ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** +```xml + + + + + + host.domain.com:example_user + host.domain.com:example_user_dev + + + + + + + DNS:host.domain.com + + + + + + + + URI:spiffe://foo.com/*/bar + + + + +``` + +SSLã®[`ä¿¡é ¼ã®é€£éŽ–`](https://en.wikipedia.org/wiki/Chain_of_trust)ã‚’æ­£ã—ã機能ã•ã›ã‚‹ãŸã‚ã«ã¯ã€[`caConfig`](../server-configuration-parameters/settings.md#openssl)パラメータãŒé©åˆ‡ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ã“ã¨ã‚‚é‡è¦ã§ã™ã€‚ diff --git a/docs/ja/operations/monitoring.md b/docs/ja/operations/monitoring.md new file mode 100644 index 00000000000..e13ee4de999 --- /dev/null +++ b/docs/ja/operations/monitoring.md @@ -0,0 +1,68 @@ +--- +slug: /ja/operations/monitoring +sidebar_position: 45 +sidebar_label: 監視 +description: ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ãƒªã‚½ãƒ¼ã‚¹ã®åˆ©ç”¨çŠ¶æ³ã¨ClickHouseサーãƒãƒ¼ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’監視ã§ãã¾ã™ã€‚ +keywords: [監視, 観測性, 高度ãªãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰, ダッシュボード, 観測性ダッシュボード] +--- + +# 監視 +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_automated.md'; + + + +監視ã§ãる内容: + +- ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ãƒªã‚½ãƒ¼ã‚¹ã®åˆ©ç”¨çŠ¶æ³ã€‚ +- ClickHouseサーãƒãƒ¼ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã€‚ + +## 組ã¿è¾¼ã¿ã®é«˜åº¦ãªè¦³æ¸¬æ€§ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ + +Screenshot 2023-11-12 at 6 08 58 PM + +ClickHouseã«ã¯çµ„ã¿è¾¼ã¿ã®é«˜åº¦ãªè¦³æ¸¬æ€§ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰æ©Ÿèƒ½ãŒã‚ã‚Šã€`$HOST:$PORT/dashboard`(ユーザーã¨ãƒ‘スワードãŒå¿…è¦ï¼‰ã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ã“ã®ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã§ã¯ä»¥ä¸‹ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’表示ã—ã¾ã™: +- クエリ数/秒 +- CPU使用率 (コア) +- 実行中ã®ã‚¯ã‚¨ãƒª +- 実行中マージ +- é¸æŠžã•ã‚ŒãŸãƒã‚¤ãƒˆ/秒 +- IOå¾…æ©Ÿ +- CPUå¾…æ©Ÿ +- OS CPU使用率 (ユーザースペース) +- OS CPU使用率 (カーãƒãƒ«) +- ディスクã‹ã‚‰ã®èª­ã¿è¾¼ã¿ +- ファイルシステムã‹ã‚‰ã®èª­ã¿è¾¼ã¿ +- メモリ(トラッキング済ã¿ï¼‰ +- 挿入ã•ã‚ŒãŸè¡Œæ•°/秒 +- åˆè¨ˆMergeTreeパーツ +- パーティションã”ã¨ã®æœ€å¤§ãƒ‘ーツ + +## ãƒªã‚½ãƒ¼ã‚¹åˆ©ç”¨çŠ¶æ³ {#resource-utilization} + +ClickHouseã¯ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ãƒªã‚½ãƒ¼ã‚¹ã®çŠ¶æ…‹ã‚’自動ã§ç›£è¦–ã—ã¾ã™ã€‚例ãˆã°ä»¥ä¸‹ã®ã‚ˆã†ãªã‚‚ã®ãŒã‚ã‚Šã¾ã™: + +- プロセッサã®è² è·ã¨æ¸©åº¦ã€‚ +- ストレージシステムã€RAMã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®åˆ©ç”¨çŠ¶æ³ã€‚ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯`system.asynchronous_metric_log`テーブルã«åŽé›†ã•ã‚Œã¾ã™ã€‚ + +## ClickHouseサーãƒãƒ¼ãƒ¡ãƒˆãƒªã‚¯ã‚¹ {#clickhouse-server-metrics} + +ClickHouseサーãƒãƒ¼ã«ã¯è‡ªå·±çŠ¶æ…‹ç›£è¦–用ã®çµ„ã¿è¾¼ã¿è¨ˆå™¨ãŒã‚ã‚Šã¾ã™ã€‚ + +サーãƒãƒ¼ã‚¤ãƒ™ãƒ³ãƒˆã‚’追跡ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã‚’使用ã—ã¾ã™ã€‚設定ファイルã®[logger](../operations/server-configuration-parameters/settings.md#logger)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +ClickHouseã§ã¯ä»¥ä¸‹ã‚’åŽé›†ã—ã¾ã™: + +- サーãƒãƒ¼ãŒè¨ˆç®—リソースを使用ã™ã‚‹éš›ã®ã•ã¾ã–ã¾ãªãƒ¡ãƒˆãƒªã‚¯ã‚¹ã€‚ +- クエリ処ç†ã«é–¢ã™ã‚‹ä¸€èˆ¬çš„ãªçµ±è¨ˆã€‚ + +メトリクスã¯[system.metrics](../operations/system-tables/metrics.md#system_tables-metrics)ã€[system.events](../operations/system-tables/events.md#system_tables-events)ã€ãŠã‚ˆã³[system.asynchronous_metrics](../operations/system-tables/asynchronous_metrics.md#system_tables-asynchronous_metrics)テーブルã«ã‚ã‚Šã¾ã™ã€‚ + +ClickHouseã‚’[Graphite](https://github.com/graphite-project)ã«ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹ã‚ˆã†è¨­å®šã§ãã¾ã™ã€‚ClickHouseサーãƒãƒ¼ã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã®[Graphiteセクション](../operations/server-configuration-parameters/settings.md#graphite)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。メトリクスã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’設定ã™ã‚‹å‰ã«ã€å…¬å¼[ガイド](https://graphite.readthedocs.io/en/latest/install.html)ã«å¾“ã£ã¦Graphiteをセットアップã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseã‚’[Prometheus](https://prometheus.io)ã«ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹ã‚ˆã†è¨­å®šã§ãã¾ã™ã€‚ClickHouseサーãƒãƒ¼ã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã®[Prometheusセクション](../operations/server-configuration-parameters/settings.md#prometheus)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。メトリクスã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’設定ã™ã‚‹å‰ã«ã€Prometheusã®å…¬å¼[ガイド](https://prometheus.io/docs/prometheus/latest/installation/)ã«å¾“ã£ã¦ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ã•ã‚‰ã«ã€HTTP APIを通ã˜ã¦ã‚µãƒ¼ãƒãƒ¼ã®å¯ç”¨æ€§ã‚’監視ã§ãã¾ã™ã€‚`/ping`ã«`HTTP GET`リクエストをé€ä¿¡ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ãŒåˆ©ç”¨å¯èƒ½ã§ã‚ã‚Œã°`200 OK`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +クラスター構æˆã§ã‚µãƒ¼ãƒãƒ¼ã‚’監視ã™ã‚‹ã«ã¯ã€[max_replica_delay_for_distributed_queries](../operations/settings/settings.md#max_replica_delay_for_distributed_queries)パラメータを設定ã—ã€HTTPリソース`/replicas_status`を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`/replicas_status`ã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã€ãƒ¬ãƒ—リカãŒåˆ©ç”¨å¯èƒ½ã§ä»–ã®ãƒ¬ãƒ—リカよりé…ã‚Œã¦ã„ãªã„å ´åˆã€`200 OK`ã‚’è¿”ã—ã¾ã™ã€‚レプリカãŒé…ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€é…延ã«é–¢ã™ã‚‹æƒ…報をå«ã‚€`503 HTTP_SERVICE_UNAVAILABLE`ã‚’è¿”ã—ã¾ã™ã€‚ diff --git a/docs/ja/operations/named-collections.md b/docs/ja/operations/named-collections.md new file mode 100644 index 00000000000..2390554286a --- /dev/null +++ b/docs/ja/operations/named-collections.md @@ -0,0 +1,533 @@ +--- +slug: /ja/operations/named-collections +sidebar_position: 69 +sidebar_label: "Named collections" +title: "Named collections" +--- + +import CloudNotSupportedBadge from '@theme/badges/CloudNotSupportedBadge'; + + + +Named collectionsã¯å¤–部ソースã¨ã®çµ±åˆã‚’構æˆã™ã‚‹ãŸã‚ã®ã‚­ãƒ¼ãƒ»ãƒãƒªãƒ¥ãƒ¼ã®ãƒšã‚¢ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’ä¿å­˜ã™ã‚‹æ–¹æ³•ã‚’æä¾›ã—ã¾ã™ã€‚Dictionaryã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ†ãƒ¼ãƒ–ル関数ã€ãŠã‚ˆã³ã‚ªãƒ–ジェクトストレージã§Named collectionsを使用ã§ãã¾ã™ã€‚ + +Named collectionsã¯DDLã¾ãŸã¯æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã§æ§‹æˆå¯èƒ½ã§ã€ClickHouse起動時ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚オブジェクトã®ä½œæˆã‚’簡素化ã—ã€ç®¡ç†ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã®ãªã„ユーザーã‹ã‚‰è³‡æ ¼æƒ…報を隠ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +Named collectionã®ã‚­ãƒ¼ã¯ã€å¯¾å¿œã™ã‚‹é–¢æ•°ã€ãƒ†ãƒ¼ãƒ–ルエンジンã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãªã©ã®ãƒ‘ラメータåã¨ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ã€å„タイプã«ãƒªãƒ³ã‚¯ã•ã‚ŒãŸãƒ‘ラメータリストãŒã‚ã‚Šã¾ã™ã€‚ + +Named collectionã§è¨­å®šã•ã‚ŒãŸãƒ‘ラメータã¯SQLã§ä¸Šæ›¸ãå¯èƒ½ã§ã‚ã‚‹ã“ã¨ãŒã€ä»¥ä¸‹ã®ä¾‹ã§ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯`[NOT] OVERRIDABLE`キーワードãŠã‚ˆã³XML属性ã€ã¾ãŸã¯æ§‹æˆã‚ªãƒ—ション`allow_named_collection_override_by_default`を使用ã—ã¦åˆ¶é™ã§ãã¾ã™ã€‚ + +:::warning +上書ãを許å¯ã™ã‚‹ã¨ã€ç®¡ç†ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã®ãªã„ユーザーãŒéš ãã†ã¨ã—ã¦ã„る資格情報を推測ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +Named collectionsã‚’ãã®ç›®çš„ã§ä½¿ç”¨ã—ã¦ã„ã‚‹å ´åˆã€`allow_named_collection_override_by_default`(デフォルトã§æœ‰åŠ¹ï¼‰ã¯ç„¡åŠ¹ã«ã—ã¦ãã ã•ã„。 +::: + +## システムデータベースã§ã®Named collectionsã®ä¿å­˜ + +### DDL例 + +```sql +CREATE NAMED COLLECTION name AS +key_1 = 'value' OVERRIDABLE, +key_2 = 'value2' NOT OVERRIDABLE, +url = 'https://connection.url/' +``` + +上記ã®ä¾‹ã§ã¯ï¼š + + * `key_1`ã¯å¸¸ã«ä¸Šæ›¸ãå¯èƒ½ã§ã™ã€‚ + * `key_2`ã¯ä¸Šæ›¸ãã§ãã¾ã›ã‚“。 + * `url`ã¯ã€`allow_named_collection_override_by_default`ã®å€¤ã«å¿œã˜ã¦ä¸Šæ›¸ãå¯èƒ½ã§ã™ã€‚ + +### DDLを使用ã—ãŸNamed collections作æˆã®ãŸã‚ã®æ¨©é™ + +DDLã«ã‚ˆã£ã¦Named collectionsを管ç†ã™ã‚‹ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ`named_collection_control`特権をæŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れを割り当ã¦ã‚‹ã«ã¯ã€`/etc/clickhouse-server/users.d/`ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’追加ã—ã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼`default`ã«`access_management`ãŠã‚ˆã³`named_collection_control`ã®ä¸¡æ–¹ã®ç‰¹æ¨©ã‚’与ãˆã¦ã„ã¾ã™ï¼š + +```xml title='/etc/clickhouse-server/users.d/user_default.xml' + + + + 65e84be33532fb784c48129675f9eff3a682b27168c0ea744b2cf58ee02337c5 + 1 + + 1 + + + + +``` + +:::tip +上記ã®ä¾‹ã§ã¯ã€`password_sha256_hex`ã®å€¤ã¯ãƒ‘スワードã®SHA256ãƒãƒƒã‚·ãƒ¥ã®16進数表ç¾ã§ã™ã€‚ã“ã®è¨­å®šã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼`default`ã®`replace=true`属性ãŒã‚ã‚Šã¾ã™ã€‚ãã®ãŸã‚ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šã§ã¯ãƒ—レーンテキストã®`password`ãŒè¨­å®šã•ã‚Œã¦ãŠã‚Šã€ãƒ—レーンテキストã¨sha256 hexã®ä¸¡æ–¹ã®ãƒ‘スワードを1人ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¨­å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +::: + +### Named collectionsã®ä¿å­˜ + +Named collectionsã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ã¾ãŸã¯ZooKeeper/Keeperã«ä¿å­˜ã§ãã¾ã™ã€‚デフォルトã§ã¯ãƒ­ãƒ¼ã‚«ãƒ«ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +ã¾ãŸã€[disk encryption](storing-data#encrypted-virtual-file-system)ã§ä½¿ç”¨ã•ã‚Œã‚‹ã®ã¨åŒã˜ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã§æš—å·åŒ–ã—ã¦ä¿å­˜ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚デフォルトã§ã¯`aes_128_ctr`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +Named collectionsã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’構æˆã™ã‚‹ã«ã¯ã€`type`を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯`local`ã¾ãŸã¯`keeper`/`zookeeper`ã®ã„ãšã‚Œã‹ã§ã™ã€‚æš—å·åŒ–ã•ã‚ŒãŸã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®å ´åˆã€`local_encrypted`ã¾ãŸã¯`keeper_encrypted`/`zookeeper_encrypted`を使用ã§ãã¾ã™ã€‚ + +ZooKeeper/Keeperを使用ã™ã‚‹ã«ã¯ã€ZooKeeper/Keeperã§Named collectionsãŒä¿å­˜ã•ã‚Œã‚‹ãƒ‘スã§ã‚ã‚‹`path`を設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ã€æš—å·åŒ–ã¨ZooKeeper/Keeperを使用ã—ã¦ã„ã¾ã™ï¼š +``` + + + zookeeper_encrypted + bebec0cabebec0cabebec0cabebec0ca + aes_128_ctr + /named_collections_path/ + 1000 + + +``` + +オプションã®æ§‹æˆãƒ‘ラメータã§ã‚ã‚‹`update_timeout_ms`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯`5000`ã§ã™ã€‚ + +## 構æˆãƒ•ã‚¡ã‚¤ãƒ«ã§ã®Named collectionsã®ä¿å­˜ + +### XML例 + +```xml title='/etc/clickhouse-server/config.d/named_collections.xml' + + + + value + value_2 + https://connection.url/ + + + +``` + +上記ã®ä¾‹ã§ã¯ï¼š + + * `key_1`ã¯å¸¸ã«ä¸Šæ›¸ãå¯èƒ½ã§ã™ã€‚ + * `key_2`ã¯ä¸Šæ›¸ãã§ãã¾ã›ã‚“。 + * `url`ã¯ã€`allow_named_collection_override_by_default`ã®å€¤ã«å¿œã˜ã¦ä¸Šæ›¸ãå¯èƒ½ã§ã™ã€‚ + +## Named collectionsã®ä¿®æ­£ + +DDLクエリã§ä½œæˆã•ã‚ŒãŸNamed collectionsã¯ã€DDLを使用ã—ã¦å¤‰æ›´ã¾ãŸã¯å‰Šé™¤ã§ãã¾ã™ã€‚XMLファイルã§ä½œæˆã•ã‚ŒãŸNamed collectionsã¯ã€å¯¾å¿œã™ã‚‹XMLを編集ã¾ãŸã¯å‰Šé™¤ã—ã¦ç®¡ç†ã§ãã¾ã™ã€‚ + +### DDL Named collectionã®å¤‰æ›´ + +コレクション`collection2`ã®ã‚­ãƒ¼`key1`ã¨`key3`を変更ã¾ãŸã¯è¿½åŠ ã—ã¾ã™ +(ã“ã‚Œã«ã‚ˆã‚Šã€ãã®ã‚­ãƒ¼ã®`overridable`フラグã®å€¤ã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“): +```sql +ALTER NAMED COLLECTION collection2 SET key1=4, key3='value3' +``` + +キー`key1`を変更ã¾ãŸã¯è¿½åŠ ã—ã€å¸¸ã«ä¸Šæ›¸ãå¯èƒ½ã«ã—ã¾ã™ï¼š +```sql +ALTER NAMED COLLECTION collection2 SET key1=4 OVERRIDABLE +``` + +コレクション`collection2`ã‹ã‚‰ã‚­ãƒ¼`key2`を削除ã—ã¾ã™ï¼š +```sql +ALTER NAMED COLLECTION collection2 DELETE key2 +``` + +コレクション`collection2`ã®ã‚­ãƒ¼`key1`を変更ã¾ãŸã¯è¿½åŠ ã—ã€ã‚­ãƒ¼`key3`を削除ã—ã¾ã™ï¼š +```sql +ALTER NAMED COLLECTION collection2 SET key1=4, DELETE key3 +``` + +`overridable`フラグã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šã‚’使用ã™ã‚‹ã‚ˆã†ã«ã‚­ãƒ¼ã‚’強制ã™ã‚‹ã«ã¯ã€ã‚­ãƒ¼ã‚’削除ã—ã¦å†è¿½åŠ ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +```sql +ALTER NAMED COLLECTION collection2 DELETE key1; +ALTER NAMED COLLECTION collection2 SET key1=4; +``` + +### DDL Named collection `collection2`ã®å‰Šé™¤ï¼š +```sql +DROP NAMED COLLECTION collection2 +``` + +## S3ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã®ãŸã‚ã®Named collections + +パラメータã®èª¬æ˜Žã¯[s3 Table Function](../sql-reference/table-functions/s3.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### DDL例 + +```sql +CREATE NAMED COLLECTION s3_mydata AS +access_key_id = 'AKIAIOSFODNN7EXAMPLE', +secret_access_key = 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY', +format = 'CSV', +url = 'https://s3.us-east-1.amazonaws.com/yourbucket/mydata/' +``` + +### XML例 + +```xml + + + + AKIAIOSFODNN7EXAMPLE + wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + CSV + https://s3.us-east-1.amazonaws.com/yourbucket/mydata/ + + + +``` + +### s3()関数ã¨S3テーブルã®Named collection例 + +以下ã®ä¾‹ã¯ã©ã¡ã‚‰ã‚‚åŒã˜Named collection `s3_mydata`を使用ã—ã¦ã„ã¾ã™ï¼š + +#### s3()関数 + +```sql +INSERT INTO FUNCTION s3(s3_mydata, filename = 'test_file.tsv.gz', + format = 'TSV', structure = 'number UInt64', compression_method = 'gzip') +SELECT * FROM numbers(10000); +``` + +:::tip +上記ã®`s3()`関数ã®æœ€åˆã®å¼•æ•°ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åã€`s3_mydata`ã§ã™ã€‚Named collectionsãŒãªã‘ã‚Œã°ã€ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼IDã€ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€URLã‚’`s3()`関数ã¸ã®å„呼ã³å‡ºã—ã§æ¸¡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +#### S3テーブル + +```sql +CREATE TABLE s3_engine_table (number Int64) +ENGINE=S3(s3_mydata, url='https://s3.us-east-1.amazonaws.com/yourbucket/mydata/test_file.tsv.gz', format = 'TSV') +SETTINGS input_format_with_names_use_header = 0; + +SELECT * FROM s3_engine_table LIMIT 3; +┌─number─┠+│ 0 │ +│ 1 │ +│ 2 │ +└────────┘ +``` + +## MySQLデータベースã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã®ãŸã‚ã®Named collections + +パラメータã®èª¬æ˜Žã¯[mysql](../sql-reference/table-functions/mysql.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### DDL例 + +```sql +CREATE NAMED COLLECTION mymysql AS +user = 'myuser', +password = 'mypass', +host = '127.0.0.1', +port = 3306, +database = 'test', +connection_pool_size = 8, +replace_query = 1 +``` + +### XML例 + +```xml + + + + myuser + mypass + 127.0.0.1 + 3306 + test + 8 + 1 + + + +``` + +### mysql()関数ã€MySQLテーブルã€MySQLデータベースã€ãŠã‚ˆã³Dictionaryã®Named collection例 + +以下ã®4ã¤ã®ä¾‹ã¯ã€ã™ã¹ã¦åŒã˜Named collection `mymysql`を使用ã—ã¦ã„ã¾ã™ï¼š + +#### mysql()関数 + +```sql +SELECT count() FROM mysql(mymysql, table = 'test'); + +┌─count()─┠+│ 3 │ +└─────────┘ +``` +:::note +Named collectionã¯`table`パラメータを指定ã—ã¦ã„ãªã„ãŸã‚ã€é–¢æ•°å‘¼ã³å‡ºã—ã§`table = 'test'`ã¨ã—ã¦æŒ‡å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +#### MySQLテーブル + +```sql +CREATE TABLE mytable(A Int64) ENGINE = MySQL(mymysql, table = 'test', connection_pool_size=3, replace_query=0); +SELECT count() FROM mytable; + +┌─count()─┠+│ 3 │ +└─────────┘ +``` + +:::note +DDLãŒconnection_pool_sizeã®Named collection設定を上書ãã—ã¾ã™ã€‚ +::: + +#### MySQLデータベース + +```sql +CREATE DATABASE mydatabase ENGINE = MySQL(mymysql); + +SHOW TABLES FROM mydatabase; + +┌─name───┠+│ source │ +│ test │ +└────────┘ +``` + +#### MySQL Dictionary + +```sql +CREATE DICTIONARY dict (A Int64, B String) +PRIMARY KEY A +SOURCE(MYSQL(NAME mymysql TABLE 'source')) +LIFETIME(MIN 1 MAX 2) +LAYOUT(HASHED()); + +SELECT dictGet('dict', 'B', 2); + +┌─dictGet('dict', 'B', 2)─┠+│ two │ +└─────────────────────────┘ +``` + +## PostgreSQLデータベースã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã®ãŸã‚ã®Named collections + +パラメータã®èª¬æ˜Žã¯[postgresql](../sql-reference/table-functions/postgresql.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。ã•ã‚‰ã«ã€ä»¥ä¸‹ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ãŒã‚ã‚Šã¾ã™ï¼š + +- `username`ã¯`user`ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ +- `db`ã¯`database`ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ + +パラメータ`addresses_expr`ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã§`host:port`ã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚パラメータã¯ã‚ªãƒ—ションã§ã‚ã‚Šã€ä»–ã®ã‚ªãƒ—ションもã‚ã‚Šã¾ã™ï¼š`host`ã€`hostname`ã€`port`。以下ã®ç–‘似コードã¯å„ªå…ˆé †ä½ã‚’説明ã—ã¾ã™ï¼š + +```sql +CASE + WHEN collection['addresses_expr'] != '' THEN collection['addresses_expr'] + WHEN collection['host'] != '' THEN collection['host'] || ':' || if(collection['port'] != '', collection['port'], '5432') + WHEN collection['hostname'] != '' THEN collection['hostname'] || ':' || if(collection['port'] != '', collection['port'], '5432') +END +``` + +作æˆä¾‹ï¼š +```sql +CREATE NAMED COLLECTION mypg AS +user = 'pguser', +password = 'jw8s0F4', +host = '127.0.0.1', +port = 5432, +database = 'test', +schema = 'test_schema' +``` + +構æˆä¾‹ï¼š +```xml + + + + pguser + jw8s0F4 + 127.0.0.1 + 5432 + test + test_schema + + + +``` + +### postgresql関数ã§ã®Named collectionsã®ä½¿ç”¨ä¾‹ + +```sql +SELECT * FROM postgresql(mypg, table = 'test'); + +┌─a─┬─b───┠+│ 2 │ two │ +│ 1 │ one │ +└───┴─────┘ + + +SELECT * FROM postgresql(mypg, table = 'test', schema = 'public'); + +┌─a─┠+│ 1 │ +│ 2 │ +│ 3 │ +└───┘ +``` + +### エンジンPostgreSQLを使用ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã®Named collectionsã®ä½¿ç”¨ä¾‹ + +```sql +CREATE TABLE mypgtable (a Int64) ENGINE = PostgreSQL(mypg, table = 'test', schema = 'public'); + +SELECT * FROM mypgtable; + +┌─a─┠+│ 1 │ +│ 2 │ +│ 3 │ +└───┘ +``` + +:::note +PostgreSQLã¯ãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã«Named collectionã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’コピーã—ã¾ã™ã€‚コレクションã®å¤‰æ›´ã¯æ—¢å­˜ã®ãƒ†ãƒ¼ãƒ–ルã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。 +::: + +### エンジンPostgreSQLを使用ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã®Named collectionsã®ä½¿ç”¨ä¾‹ + +```sql +CREATE DATABASE mydatabase ENGINE = PostgreSQL(mypg); + +SHOW TABLES FROM mydatabase + +┌─name─┠+│ test │ +└──────┘ +``` + +### ソースPOSTGRESQLを使用ã—ãŸDictionaryã§ã®Named collectionsã®ä½¿ç”¨ä¾‹ + +```sql +CREATE DICTIONARY dict (a Int64, b String) +PRIMARY KEY a +SOURCE(POSTGRESQL(NAME mypg TABLE test)) +LIFETIME(MIN 1 MAX 2) +LAYOUT(HASHED()); + +SELECT dictGet('dict', 'b', 2); + +┌─dictGet('dict', 'b', 2)─┠+│ two │ +└─────────────────────────┘ +``` + +## リモートClickHouseデータベースã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã®ãŸã‚ã®Named collections + +パラメータã®èª¬æ˜Žã¯[remote](../sql-reference/table-functions/remote.md/#parameters)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +構æˆä¾‹ï¼š + +```sql +CREATE NAMED COLLECTION remote1 AS +host = 'remote_host', +port = 9000, +database = 'system', +user = 'foo', +password = 'secret', +secure = 1 +``` + +```xml + + + + remote_host + 9000 + system + foo + secret + 1 + + + +``` +`secure`ã¯æŽ¥ç¶šã«å¿…è¦ã‚ã‚Šã¾ã›ã‚“ãŒã€dictionariesã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +### `remote`/`remoteSecure`関数ã§ã®Named collectionsã®ä½¿ç”¨ä¾‹ + +```sql +SELECT * FROM remote(remote1, table = one); +┌─dummy─┠+│ 0 │ +└───────┘ + +SELECT * FROM remote(remote1, database = merge(system, '^one')); +┌─dummy─┠+│ 0 │ +└───────┘ + +INSERT INTO FUNCTION remote(remote1, database = default, table = test) VALUES (1,'a'); + +SELECT * FROM remote(remote1, database = default, table = test); +┌─a─┬─b─┠+│ 1 │ a │ +└───┴───┘ +``` + +### ソースClickHouseを使用ã—ãŸDictionaryã§ã®Named collectionsã®ä½¿ç”¨ä¾‹ + +```sql +CREATE DICTIONARY dict(a Int64, b String) +PRIMARY KEY a +SOURCE(CLICKHOUSE(NAME remote1 TABLE test DB default)) +LIFETIME(MIN 1 MAX 2) +LAYOUT(HASHED()); + +SELECT dictGet('dict', 'b', 1); +┌─dictGet('dict', 'b', 1)─┠+│ a │ +└─────────────────────────┘ +``` + +## Kafkaã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã®ãŸã‚ã®Named collections + +パラメータã®èª¬æ˜Žã¯[Kafka](../engines/table-engines/integrations/kafka.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### DDL例 + +```sql +CREATE NAMED COLLECTION my_kafka_cluster AS +kafka_broker_list = 'localhost:9092', +kafka_topic_list = 'kafka_topic', +kafka_group_name = 'consumer_group', +kafka_format = 'JSONEachRow', +kafka_max_block_size = '1048576'; + +``` +### XML例 + +```xml + + + + localhost:9092 + kafka_topic + consumer_group + JSONEachRow + 1048576 + + + +``` + +### Kafkaテーブルã§ã®Named collectionsã®ä½¿ç”¨ä¾‹ + +以下ã®ä¾‹ã¯ã©ã¡ã‚‰ã‚‚åŒã˜Named collection `my_kafka_cluster`を使用ã—ã¦ã„ã¾ã™ï¼š + +```sql +CREATE TABLE queue +( + timestamp UInt64, + level String, + message String +) +ENGINE = Kafka(my_kafka_cluster) + +CREATE TABLE queue +( + timestamp UInt64, + level String, + message String +) +ENGINE = Kafka(my_kafka_cluster) +SETTINGS kafka_num_consumers = 4, + kafka_thread_per_consumer = 1; +``` diff --git a/docs/ja/operations/opentelemetry.md b/docs/ja/operations/opentelemetry.md new file mode 100644 index 00000000000..44325596c16 --- /dev/null +++ b/docs/ja/operations/opentelemetry.md @@ -0,0 +1,67 @@ +--- +slug: /ja/operations/opentelemetry +sidebar_position: 62 +sidebar_label: OpenTelemetryã§ClickHouseをトレースã™ã‚‹ +title: "OpenTelemetryã§ClickHouseをトレースã™ã‚‹" +--- + +[OpenTelemetry](https://opentelemetry.io/)ã¯ã€åˆ†æ•£ã‚¢ãƒ—リケーションã‹ã‚‰ãƒˆãƒ¬ãƒ¼ã‚¹ã‚„メトリクスをåŽé›†ã™ã‚‹ãŸã‚ã®ã‚ªãƒ¼ãƒ—ン標準ã§ã™ã€‚ClickHouseã¯OpenTelemetryをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +## ClickHouseã¸ã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã®æä¾› + +ClickHouseã¯ã€[W3Cã®å‹§å‘Š](https://www.w3.org/TR/trace-context/)ã§èª¬æ˜Žã•ã‚Œã¦ã„るトレースコンテキストHTTPヘッダーをå—ã‘入れã¾ã™ã€‚ã¾ãŸã€ClickHouseサーãƒãƒ¼é–“やクライアントã¨ã‚µãƒ¼ãƒãƒ¼é–“ã§é€šä¿¡ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルを介ã—ã¦ãƒˆãƒ¬ãƒ¼ã‚¹ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’å—ã‘入れã¾ã™ã€‚手動テストã®ãŸã‚ã«ã€`clickhouse-client`ã«å¯¾ã—ã¦`--opentelemetry-traceparent`ãŠã‚ˆã³`--opentelemetry-tracestate`フラグを使用ã—ã¦ãƒˆãƒ¬ãƒ¼ã‚¹ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +æä¾›ã•ã‚ŒãŸãƒˆãƒ¬ãƒ¼ã‚¹ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãŒW3C標準ã«æº–æ‹ ã—ã¦ã„ãªã„ã‹ã€ãƒˆãƒ¬ãƒ¼ã‚¹ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãŒæä¾›ã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯[opentelemetry_start_trace_probability](../operations/settings/settings.md#opentelemetry-start-trace-probability)設定ã§åˆ¶å¾¡ã•ã‚Œã‚‹ç¢ºçŽ‡ã§æ–°ã—ã„トレースを開始ã§ãã¾ã™ã€‚ + +## トレースコンテキストã®ä¼æ’­ + +トレースコンテキストã¯ä»¥ä¸‹ã®ã‚±ãƒ¼ã‚¹ã§ä¸‹æµã‚µãƒ¼ãƒ“スã«ä¼æ’­ã•ã‚Œã¾ã™ï¼š + +* [分散テーブル](../engines/table-engines/special/distributed.md)エンジンを使用ã™ã‚‹éš›ã®ãƒªãƒ¢ãƒ¼ãƒˆã®ClickHouseサーãƒãƒ¼ã¸ã®ã‚¯ã‚¨ãƒªã€‚ + +* [url](../sql-reference/table-functions/url.md)テーブル関数。トレースコンテキスト情報ã¯HTTPヘッダーã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +## ClickHouse自体ã®ãƒˆãƒ¬ãƒ¼ã‚¹ + +ClickHouseã¯å„クエリãŠã‚ˆã³ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚¹ãƒ†ãƒ¼ã‚¸ï¼ˆã‚¯ã‚¨ãƒªãƒ—ランニングや分散クエリãªã©ï¼‰ã”ã¨ã«`トレーススパン`を作æˆã—ã¾ã™ã€‚ + +トレース情報を有用ã«ã™ã‚‹ã«ã¯ã€OpenTelemetryをサãƒãƒ¼ãƒˆã™ã‚‹ç›£è¦–システム(例ãˆã°ã€[Jaeger](https://jaegertracing.io/)ã‚„[Prometheus](https://prometheus.io/))ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã¯ç‰¹å®šã®ç›£è¦–システムã¸ã®ä¾å­˜ã‚’é¿ã‘ã‚‹ãŸã‚ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルを介ã—ã¦ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ã‚’æä¾›ã™ã‚‹ã ã‘ã§ã™ã€‚OpenTelemetryã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¹ãƒ‘ン情報ã¯ã€[標準ã§è¦æ±‚ã•ã‚Œã‚‹æƒ…å ±](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#span)ãŒ[system.opentelemetry_span_log](../operations/system-tables/opentelemetry_span_log.md)テーブルã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã‚µãƒ¼ãƒãƒ¼æ§‹æˆã§æœ‰åŠ¹ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚デフォルトã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«`config.xml`ã®`opentelemetry_span_log`è¦ç´ ã‚’å‚ç…§ã—ã¦ãã ã•ã„。デフォルトã§ã¯æœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +タグや属性ã¯ã‚­ãƒ¼ã¨å€¤ã‚’å«ã‚€2ã¤ã®ä¸¦åˆ—é…列ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚ãれらをæ“作ã™ã‚‹ã«ã¯[ARRAY JOIN](../sql-reference/statements/select/array-join.md)を使用ã—ã¾ã™ã€‚ + +## Log-query-settings + +[log_query_settings](settings/settings.md)設定を使用ã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œä¸­ã«ã‚¯ã‚¨ãƒªè¨­å®šã®å¤‰æ›´ã‚’ログã«è¨˜éŒ²ã§ãã¾ã™ã€‚有効ã«ã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªè¨­å®šã«åŠ ãˆã‚‰ã‚ŒãŸå¤‰æ›´ãŒOpenTelemetryスパンログã«è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ã®ã‚る設定変更を追跡ã™ã‚‹ãŸã‚ã«ã€ç‰¹ã«æœ¬ç•ªç’°å¢ƒã§ä¾¿åˆ©ã§ã™ã€‚ + +## 監視システムã¨ã®çµ±åˆ + +ç¾åœ¨ã€ClickHouseã‹ã‚‰ç›£è¦–システムã¸ã®ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®æº–å‚™ã•ã‚ŒãŸãƒ„ールã¯ã‚ã‚Šã¾ã›ã‚“。 + +テストã®ãŸã‚ã«ã€[system.opentelemetry_span_log](../operations/system-tables/opentelemetry_span_log.md)テーブルを使用ã—ã¦ã€[URL](../engines/table-engines/special/url.md)エンジンを使用ã—ãŸãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューをセットアップã™ã‚‹ã“ã¨ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€åˆ°ç€ã—ãŸãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã‚’トレースコレクタã®HTTPエンドãƒã‚¤ãƒ³ãƒˆã«ãƒ—ッシュã—ã¾ã™ã€‚例ãˆã°ã€`http://localhost:9411`ã§å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹Zipkinã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«ã€Zipkin v2 JSONå½¢å¼ã§æœ€å°é™ã®ã‚¹ãƒ‘ンデータをプッシュã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«ã—ã¾ã™ã€‚ + +```sql +CREATE MATERIALIZED VIEW default.zipkin_spans +ENGINE = URL('http://127.0.0.1:9411/api/v2/spans', 'JSONEachRow') +SETTINGS output_format_json_named_tuples_as_objects = 1, + output_format_json_array_of_rows = 1 AS +SELECT + lower(hex(trace_id)) AS traceId, + case when parent_span_id = 0 then '' else lower(hex(parent_span_id)) end AS parentId, + lower(hex(span_id)) AS id, + operation_name AS name, + start_time_us AS timestamp, + finish_time_us - start_time_us AS duration, + cast(tuple('clickhouse'), 'Tuple(serviceName text)') AS localEndpoint, + cast(tuple( + attribute.values[indexOf(attribute.names, 'db.statement')]), + 'Tuple("db.statement" text)') AS tags +FROM system.opentelemetry_span_log +``` + +エラーãŒç™ºç”Ÿã—ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã®ä¸€éƒ¨ã¯é™ã‹ã«å¤±ã‚ã‚Œã¾ã™ã€‚データãŒå±Šã‹ãªã„å ´åˆã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã§ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’確èªã—ã¦ãã ã•ã„。 + +## 関連コンテンツ + +- ブログ: [ClickHouseã§ã®è¦³æ¸¬æ€§ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã®æ§‹ç¯‰ - パート2 - トレース](https://clickhouse.com/blog/storing-traces-and-spans-open-telemetry-in-clickhouse) diff --git a/docs/ja/operations/optimizing-performance/profile-guided-optimization.md b/docs/ja/operations/optimizing-performance/profile-guided-optimization.md new file mode 100644 index 00000000000..84b07d3ec99 --- /dev/null +++ b/docs/ja/operations/optimizing-performance/profile-guided-optimization.md @@ -0,0 +1,25 @@ +--- +sidebar_position: 54 +sidebar_label: プロファイルガイド最é©åŒ– (PGO) +--- +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; + +# プロファイルガイド最é©åŒ– + +プロファイルガイド最é©åŒ–(PGO)ã¯ã€ãƒ—ログラムã®å®Ÿè¡Œæ™‚プロファイルã«åŸºã¥ã„ã¦æœ€é©åŒ–ã‚’è¡Œã†ã‚³ãƒ³ãƒ‘イラã®æœ€é©åŒ–技術ã§ã™ã€‚ + +テストã«ã‚ˆã‚Œã°ã€PGOã¯ClickHouseã®ãƒ‘フォーマンスå‘上ã«å½¹ç«‹ã¡ã¾ã™ã€‚テストã«ã‚ˆã‚‹ã¨ã€ClickBenchテストスイートã§QPSãŒæœ€å¤§15%å‘上ã—ã¾ã™ã€‚より詳細ãªçµæžœã¯[ã“ã¡ã‚‰](https://pastebin.com/xbue3HMU)ã«ã‚ã‚Šã¾ã™ã€‚パフォーマンスã®åˆ©ç‚¹ã¯ã€é€šå¸¸ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã«ä¾å­˜ã—ã¾ã™ã®ã§ã€çµæžœã¯è‰¯ãも悪ãã‚‚ãªã‚Šã¾ã™ã€‚ + +ClickHouseã«ãŠã‘ã‚‹PGOã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€é–¢é€£ã™ã‚‹GitHubã®[課題](https://github.com/ClickHouse/ClickHouse/issues/44567)ã‚’ã”覧ãã ã•ã„。 + +## PGOを使用ã—ã¦ClickHouseをビルドã™ã‚‹ã«ã¯ï¼Ÿ + +PGOã«ã¯ä¸»ã«2ã¤ã®ç¨®é¡žãŒã‚ã‚Šã¾ã™ï¼š[インストルメンテーション](https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers)ã¨[サンプリング](https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers)(AutoFDOã¨ã‚‚呼ã°ã‚Œã¾ã™ï¼‰ã€‚ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯ã€ClickHouseã«ãŠã‘るインストルメンテーションPGOã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +1. インストルメントモードã§ClickHouseをビルドã—ã¾ã™ã€‚Clangã§ã¯ã€`CXXFLAGS`ã«`-fprofile-generate`オプションを渡ã™ã“ã¨ã§å®Ÿè¡Œã§ãã¾ã™ã€‚ +2. サンプルワークロードã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ«ãƒ¡ãƒ³ãƒˆã•ã‚ŒãŸClickHouseを実行ã—ã¾ã™ã€‚ã“ã“ã§ã¯ã€é€šå¸¸ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚アプローãƒã®ä¸€ã¤ã¨ã—ã¦ã€ã‚µãƒ³ãƒ—ルワークロードã¨ã—ã¦[ClickBench](https://github.com/ClickHouse/ClickBench)を使用ã™ã‚‹ã“ã¨ãŒè€ƒãˆã‚‰ã‚Œã¾ã™ã€‚インストルメンテーションモードã®ClickHouseã¯å‹•ä½œãŒé…ã„ã‹ã‚‚ã—ã‚Œãªã„ã®ã§ã€ãã‚Œã«å‚™ãˆã¦ã€ãƒ‘フォーマンスãŒé‡è¦ãªç’°å¢ƒã§ã¯å®Ÿè¡Œã—ãªã„ã§ãã ã•ã„。 +3. å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã§åŽé›†ã—ãŸãƒ—ロファイルを使用ã—ã¦ã€`-fprofile-use`コンパイラフラグを用ã„ã¦å†åº¦ClickHouseをコンパイルã—ã¾ã™ã€‚ + +PGOã®é©ç”¨æ–¹æ³•ã«ã¤ã„ã¦ã®è©³ç´°ãªã‚¬ã‚¤ãƒ‰ã¯ã€Clangã®[ドキュメント](https://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization)ã«ã‚ã‚Šã¾ã™ã€‚ + +生産環境ã‹ã‚‰ç›´æŽ¥ã‚µãƒ³ãƒ—ルワークロードをåŽé›†ã™ã‚‹å ´åˆã¯ã€ã‚µãƒ³ãƒ—リングPGOã®ä½¿ç”¨ã‚’試ã¿ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ diff --git a/docs/ja/operations/optimizing-performance/sampling-query-profiler.md b/docs/ja/operations/optimizing-performance/sampling-query-profiler.md new file mode 100644 index 00000000000..e3f0f358dcf --- /dev/null +++ b/docs/ja/operations/optimizing-performance/sampling-query-profiler.md @@ -0,0 +1,77 @@ +--- +slug: /ja/operations/optimizing-performance/sampling-query-profiler +sidebar_position: 54 +sidebar_label: クエリプロファイリング +--- +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; + +# サンプリングクエリプロファイラー + +ClickHouseã¯ã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚’分æžã™ã‚‹ãŸã‚ã®ã‚µãƒ³ãƒ—リングプロファイラーを実行ã—ã¾ã™ã€‚プロファイラーを使用ã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œä¸­ã«æœ€ã‚‚é »ç¹ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ãƒ«ãƒ¼ãƒãƒ³ã‚’特定ã§ãã¾ã™ã€‚CPU時間ãŠã‚ˆã³ã‚¢ã‚¤ãƒ‰ãƒ«æ™‚é–“ã‚’å«ã‚€å£æ™‚計時間をトレースã§ãã¾ã™ã€‚ + +クエリプロファイラーã¯ClickHouse Cloudã§è‡ªå‹•çš„ã«æœ‰åŠ¹åŒ–ã•ã‚Œã¦ãŠã‚Šã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚µãƒ³ãƒ—ルクエリを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note 以下ã®ã‚¯ã‚¨ãƒªã‚’ClickHouse Cloudã§å®Ÿè¡Œã™ã‚‹å ´åˆã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ã®å…¨ãƒŽãƒ¼ãƒ‰ã‹ã‚‰é¸æŠžã™ã‚‹ãŸã‚ã«`FROM system.trace_log`ã‚’`FROM clusterAllReplicas(default, system.trace_log)`ã«å¤‰æ›´ã—ã¦ãã ã•ã„。 +::: + +``` sql +SELECT + count(), + arrayStringConcat(arrayMap(x -> concat(demangle(addressToSymbol(x)), '\n ', addressToLine(x)), trace), '\n') AS sym +FROM system.trace_log +WHERE (query_id = 'ebca3574-ad0a-400a-9cbc-dca382f5998c') AND (event_date = today()) +GROUP BY trace +ORDER BY count() DESC +LIMIT 10 +SETTINGS allow_introspection_functions = 1 +``` + +セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ãƒ‡ãƒ—ロイメント環境ã§ã‚¯ã‚¨ãƒªãƒ—ロファイラーを使用ã™ã‚‹ã«ã¯ï¼š + +- サーãƒãƒ¼è¨­å®šã®[trace_log](../../operations/server-configuration-parameters/settings.md#trace_log)セクションをセットアップã—ã¾ã™ã€‚ + + ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€ãƒ—ロファイラーã®å‹•ä½œçµæžœã‚’å«ã‚€[trace_log](../../operations/system-tables/trace_log.md#system_tables-trace_log)システムテーブルを設定ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ã¯å®Ÿè¡Œä¸­ã®ã‚µãƒ¼ãƒãƒ¼ã«å¯¾ã—ã¦ã®ã¿æœ‰åŠ¹ã§ã‚ã‚Šã€ã‚µãƒ¼ãƒãƒ¼ãŒå†èµ·å‹•ã™ã‚‹ã¨ã€ClickHouseã¯ãƒ†ãƒ¼ãƒ–ルをクリアã›ãšã€ã™ã¹ã¦ã®ä¿å­˜ã•ã‚ŒãŸä»®æƒ³ãƒ¡ãƒ¢ãƒªã‚¢ãƒ‰ãƒ¬ã‚¹ãŒç„¡åŠ¹ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +- [query_profiler_cpu_time_period_ns](../../operations/settings/settings.md#query_profiler_cpu_time_period_ns) ã¾ãŸã¯ [query_profiler_real_time_period_ns](../../operations/settings/settings.md#query_profiler_real_time_period_ns)設定をセットアップã—ã¾ã™ã€‚ã“れらã®è¨­å®šã¯åŒæ™‚ã«ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + + ã“れらã®è¨­å®šã«ã‚ˆã‚Šã€ãƒ—ロファイラーã®ã‚¿ã‚¤ãƒžãƒ¼ã‚’構æˆã§ãã¾ã™ã€‚セッション設定ãªã®ã§ã€ã‚µãƒ¼ãƒãƒ¼å…¨ä½“ã€å€‹ã€…ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロファイルã€ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–ãªã‚»ãƒƒã‚·ãƒ§ãƒ³ã€ãŠã‚ˆã³å„個別ã®ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ç•°ãªã‚‹ã‚µãƒ³ãƒ—リング頻度を得るã“ã¨ãŒã§ãã¾ã™ã€‚ + +デフォルトã®ã‚µãƒ³ãƒ—リング頻度ã¯1秒ã”ã¨ã®ã‚µãƒ³ãƒ—ルã§ã€CPUタイマーã¨å®Ÿæ™‚間タイマーã®ä¸¡æ–¹ãŒæœ‰åŠ¹ã§ã™ã€‚ã“ã®é »åº¦ã«ã‚ˆã‚Šã€ClickHouseクラスタã«é–¢ã™ã‚‹å分ãªæƒ…報をåŽé›†ã§ãã¾ã™ã€‚åŒæ™‚ã«ã€ã“ã®é »åº¦ã§ä½œæ¥­ã™ã‚‹å ´åˆã€ãƒ—ロファイラーã¯ClickHouseサーãƒãƒ¼ã®ãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。å„個別ã®ã‚¯ã‚¨ãƒªã‚’プロファイルã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ã‚ˆã‚Šé«˜ã„サンプリング頻度を試ã—ã¦ãã ã•ã„。 + +`trace_log`システムテーブルを分æžã™ã‚‹ã«ã¯ï¼š + +- `clickhouse-common-static-dbg`パッケージをインストールã—ã¾ã™ã€‚[DEBパッケージã‹ã‚‰ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«](../../getting-started/install.md#install-from-deb-packages)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +- [allow_introspection_functions](../../operations/settings/settings.md#allow_introspection_functions)設定ã«ã‚ˆã‚Šå†…çœé–¢æ•°ã‚’許å¯ã—ã¾ã™ã€‚ + + セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€å†…çœé–¢æ•°ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +- `addressToLine`ã€`addressToLineWithInlines`ã€`addressToSymbol`ã€ãŠã‚ˆã³`demangle` [内çœé–¢æ•°](../../sql-reference/functions/introspection.md)を使用ã—ã¦ã€ClickHouseコード内ã®é–¢æ•°åã¨ãã®ä½ç½®ã‚’å–å¾—ã—ã¾ã™ã€‚特定ã®ã‚¯ã‚¨ãƒªã®ãƒ—ロファイルをå–å¾—ã™ã‚‹ã«ã¯ã€`trace_log`テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’集約ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚個別ã®é–¢æ•°ã‚„スタックトレース全体ã§ãƒ‡ãƒ¼ã‚¿ã‚’集約ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`trace_log`情報を視覚化ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€[flamegraph](../../interfaces/third-party/gui.md#clickhouse-flamegraph-clickhouse-flamegraph)ã‚„[speedscope](https://github.com/laplab/clickhouse-speedscope)を試ã—ã¦ãã ã•ã„。 + +## 例 {#example} + +ã“ã®ä¾‹ã§ã¯ã€ä»¥ä¸‹ã‚’è¡Œã„ã¾ã™ï¼š + +- クエリアイデンティファイアã¨ç¾åœ¨ã®æ—¥ä»˜ã§`trace_log`データをフィルタリングã—ã¾ã™ã€‚ + +- スタックトレースã§é›†ç´„ã—ã¾ã™ã€‚ + +- 内çœé–¢æ•°ã‚’使用ã—ã¦ã€ä»¥ä¸‹ã®ãƒ¬ãƒãƒ¼ãƒˆã‚’å–å¾—ã—ã¾ã™ï¼š + + - シンボルã®åå‰ã¨å¯¾å¿œã™ã‚‹ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰é–¢æ•°ã€‚ + - ã“れらã®é–¢æ•°ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®ä½ç½®ã€‚ + + + +``` sql +SELECT + count(), + arrayStringConcat(arrayMap(x -> concat(demangle(addressToSymbol(x)), '\n ', addressToLine(x)), trace), '\n') AS sym +FROM system.trace_log +WHERE (query_id = 'ebca3574-ad0a-400a-9cbc-dca382f5998c') AND (event_date = today()) +GROUP BY trace +ORDER BY count() DESC +LIMIT 10 +``` diff --git a/docs/ja/operations/performance-test.md b/docs/ja/operations/performance-test.md new file mode 100644 index 00000000000..d4e31898dbc --- /dev/null +++ b/docs/ja/operations/performance-test.md @@ -0,0 +1,32 @@ +--- +slug: /ja/operations/performance-test +sidebar_position: 54 +sidebar_label: ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®ãƒ†ã‚¹ãƒˆ +title: "ClickHouseã§ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‚’テストã™ã‚‹æ–¹æ³•" +--- + +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; + + + +ClickHouseパッケージをインストールã›ãšã«ã€ä»»æ„ã®ã‚µãƒ¼ãƒãƒ¼ã§åŸºæœ¬çš„ãªClickHouseã®ãƒ‘フォーマンステストを実行ã§ãã¾ã™ã€‚ + + +## 自動実行 + +ベンãƒãƒžãƒ¼ã‚¯ã‚’å˜ä¸€ã®ã‚¹ã‚¯ãƒªãƒ—トã§å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +1. スクリプトをダウンロードã—ã¾ã™ã€‚ +``` +wget https://raw.githubusercontent.com/ClickHouse/ClickBench/main/hardware/hardware.sh +``` + +2. スクリプトを実行ã—ã¾ã™ã€‚ +``` +chmod a+x ./hardware.sh +./hardware.sh +``` + +3. 出力をコピーã—ã¦ã€feedback@clickhouse.com ã«é€ä¿¡ã—ã¦ãã ã•ã„。 + +ã™ã¹ã¦ã®çµæžœã¯ã“ã“ã«å…¬é–‹ã•ã‚Œã¦ã„ã¾ã™: https://clickhouse.com/benchmark/hardware/ diff --git a/docs/ja/operations/query-cache.md b/docs/ja/operations/query-cache.md new file mode 100644 index 00000000000..c5beff9c00e --- /dev/null +++ b/docs/ja/operations/query-cache.md @@ -0,0 +1,174 @@ +--- +slug: /ja/operations/query-cache +sidebar_position: 65 +sidebar_label: クエリキャッシュ +--- + +# クエリキャッシュ + +クエリキャッシュã¯ã€`SELECT` クエリを一度計算ã—ã€åŒã˜ã‚¯ã‚¨ãƒªã®å†å®Ÿè¡Œã‚’キャッシュã‹ã‚‰ç›´æŽ¥æä¾›ã§ãるよã†ã«ã—ã¾ã™ã€‚ +クエリã®ç¨®é¡žã«ã‚ˆã£ã¦ã¯ã€ClickHouseサーãƒãƒ¼ã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã¨ãƒªã‚½ãƒ¼ã‚¹æ¶ˆè²»ã‚’劇的ã«å‰Šæ¸›ã§ãã¾ã™ã€‚ + +## 背景ã€è¨­è¨ˆã€ãŠã‚ˆã³åˆ¶é™ + +クエリキャッシュã¯ã€ä¸€èˆ¬çš„ã«ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³çš„ã«æ•´åˆæ€§ãŒã‚ã‚‹ã‹ã€ä¸€è²«æ€§ãŒãªã„ã‚‚ã®ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +- トランザクション的ã«ä¸€è²«æ€§ã®ã‚るキャッシュã§ã¯ã€`SELECT` クエリã®çµæžœãŒå¤‰åŒ–ã—ãŸå ´åˆã€ã¾ãŸã¯å¤‰åŒ–ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸã‚¯ã‚¨ãƒªçµæžœã‚’無効ã«ã—ã¾ã™ï¼ˆç ´æ£„ã—ã¾ã™ï¼‰ã€‚ + ClickHouseã«ãŠã‘るデータを変更ã™ã‚‹æ“作ã¯ã€ãƒ†ãƒ¼ãƒ–ルã¸ã®æŒ¿å…¥/æ›´æ–°/削除ã¾ãŸã¯ã‚³ãƒ©ãƒ—シングマージãªã©ã§ã™ã€‚トランザクション的ã«æ•´åˆæ€§ã®ã‚るキャッシュã¯ã€ç‰¹ã«OLTPデータベースã«é©ã—ã¦ãŠã‚Šã€ + 例ãˆã° [MySQL](https://dev.mysql.com/doc/refman/5.6/en/query-cache.html)(v8.0以é™ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’削除)や + [Oracle](https://docs.oracle.com/database/121/TGDBA/tune_result_cache.htm)ãªã©ãŒã‚ã‚Šã¾ã™ã€‚ +- トランザクション的ã«æ•´åˆæ€§ã®ãªã„キャッシュã§ã¯ã€ã‚¯ã‚¨ãƒªçµæžœã®ã‚ãšã‹ãªä¸æ­£ç¢ºã•ãŒè¨±å®¹ã•ã‚Œã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ³ãƒˆãƒªãŒä¸€å®šã®æœ‰åŠ¹æœŸé–“(例:1分)をæŒã¡ã€ãã®æœŸé–“中ã«åŸºç¤Žã¨ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãŒã»ã¨ã‚“ã©å¤‰åŒ–ã—ãªã„ã¨ã„ã†ä»®å®šã®ä¸‹ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒæ©Ÿèƒ½ã—ã¾ã™ã€‚ + ã“ã®ã‚¢ãƒ—ローãƒã¯å…¨ä½“ã¨ã—ã¦OLAPデータベースã«ã‚ˆã‚Šé©ã—ã¦ã„ã‚‹ã¨è¨€ãˆã¾ã™ã€‚トランザクション的ã«æ•´åˆæ€§ã®ãªã„キャッシュãŒå分ãªä¾‹ã¨ã—ã¦ã€å ±å‘Šãƒ„ールã§è¤‡æ•°ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒåŒæ™‚ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ¯Žæ™‚売上報告を考ãˆã¦ã¿ã¾ã—ょã†ã€‚ + 売上データã¯é€šå¸¸ã‚†ã£ãã‚Šã¨å¤‰åŒ–ã™ã‚‹ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ãƒ¬ãƒãƒ¼ãƒˆã‚’一度計算ã™ã‚‹ã ã‘ã§æ¸ˆã¿ã¾ã™ï¼ˆæœ€åˆã®`SELECT`クエリã§è¡¨ã•ã‚Œã¾ã™ï¼‰ã€‚ãã®å¾Œã®ã‚¯ã‚¨ãƒªã¯ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰ç›´æŽ¥æä¾›ã•ã‚Œã¾ã™ã€‚ + ã“ã®ä¾‹ã§ã¯ã€å¦¥å½“ãªæœ‰åŠ¹æœŸé–“ã¯30分ã«ãªã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +トランザクション的ã«æ•´åˆæ€§ã®ãªã„キャッシングã¯ã€é€šå¸¸ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ„ールやデータベースã¨å¯¾è©±ã™ã‚‹ãƒ—ロキシパッケージ(例: +[chproxy](https://www.chproxy.org/configuration/caching/))ã«ã‚ˆã£ã¦æä¾›ã•ã‚Œã¾ã™ã€‚ãã®çµæžœã€åŒã˜ã‚­ãƒ£ãƒƒã‚·ãƒ³ã‚°ãƒ­ã‚¸ãƒƒã‚¯ã¨æ§‹æˆãŒã—ã°ã—ã°é‡è¤‡ã•ã‚Œã¾ã™ã€‚ +ClickHouseã®ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã§ã¯ã€ã‚­ãƒ£ãƒƒã‚·ãƒ³ã‚°ãƒ­ã‚¸ãƒƒã‚¯ãŒã‚µãƒ¼ãƒãƒ¼å´ã«ç§»å‹•ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ã®æ‰‹é–“ãŒæ¸›ã‚Šã€å†—長性ãŒå›žé¿ã•ã‚Œã¾ã™ã€‚ + +## 設定ã¨ä½¿ç”¨æ³• + +:::note +ClickHouse Cloudã§ã¯ã€ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥è¨­å®šã‚’編集ã™ã‚‹ãŸã‚ã«[クエリレベル設定](/ja/operations/settings/query-level)を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚[コンフィグレベル設定](/ja/operations/configuration-files)ã®ç·¨é›†ã¯ç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: + +[use_query_cache](settings/settings.md#use-query-cache) 設定を使用ã—ã¦ã€ç‰¹å®šã®ã‚¯ã‚¨ãƒªã¾ãŸã¯ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªãŒã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’利用ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã®æœ€åˆã®å®Ÿè¡Œã¯ã€ + +```sql +SELECT some_expensive_calculation(column_1, column_2) +FROM table +SETTINGS use_query_cache = true; +``` + +クエリã®çµæžœã‚’クエリキャッシュã«ä¿å­˜ã—ã¾ã™ã€‚åŒã˜ã‚¯ã‚¨ãƒªã®å¾Œç¶šã®å®Ÿè¡Œï¼ˆãƒ‘ラメータ`use_query_cache = true`も指定ã—ãŸã‚‚ã®ï¼‰ã¯ã€è¨ˆç®—済ã¿ã®çµæžœã‚’キャッシュã‹ã‚‰èª­ã¿è¾¼ã¿ã€å³åº§ã«è¿”ã—ã¾ã™ã€‚ + +:::note +`use_query_cache` 設定ã¨ä»–ã®ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥é–¢é€£ã®è¨­å®šã¯ã€å˜ç‹¬ã®`SELECT`æ–‡ã«å¯¾ã—ã¦ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚特ã«ã€`CREATE VIEW AS SELECT [...] SETTINGS use_query_cache = true`ã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸãƒ“ューã¸ã®`SELECT`ã®çµæžœã¯ã€ãã®`SELECT`æ–‡ãŒ`SETTINGS use_query_cache = true`ã§å®Ÿè¡Œã•ã‚Œãªã„é™ã‚Šã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã›ã‚“。 +::: + +キャッシュã®åˆ©ç”¨æ–¹æ³•ã¯ã€[enable_writes_to_query_cache](settings/settings.md#enable-writes-to-query-cache)ã¨[enable_reads_from_query_cache](settings/settings.md#enable-reads-from-query-cache)(ã©ã¡ã‚‰ã‚‚デフォルトã§`true`)ã®è¨­å®šã‚’使用ã—ã¦è©³ç´°ã«æ§‹æˆã§ãã¾ã™ã€‚ +å‰è€…ã®è¨­å®šã¯ã‚¯ã‚¨ãƒªçµæžœãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«ä¿å­˜ã•ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã€å¾Œè€…ã®è¨­å®šã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰ã‚¯ã‚¨ãƒªçµæžœã‚’å–å¾—ã—よã†ã¨ã™ã‚‹ã‹ã©ã†ã‹ã‚’決定ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’パッシブã«ã®ã¿ä½¿ç”¨ã—ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰èª­ã¿è¾¼ã‚€ã“ã¨ã‚’試ã¿ã¾ã™ãŒã€ãã®çµæžœã‚’キャッシュã«ä¿å­˜ã—ã¾ã›ã‚“: + +```sql +SELECT some_expensive_calculation(column_1, column_2) +FROM table +SETTINGS use_query_cache = true, enable_writes_to_query_cache = false; +``` + +最大é™ã®åˆ¶å¾¡ã‚’è¡Œã†ãŸã‚ã«ã€ç‰¹å®šã®ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ã®ã¿`use_query_cache`, `enable_writes_to_query_cache`, `enable_reads_from_query_cache`ã®è¨­å®šã‚’è¡Œã†ã“ã¨ãŒä¸€èˆ¬çš„ã«æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ +ã¾ãŸã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„プロファイルレベルã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’有効ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼ˆä¾‹ï¼š`SET use_query_cache = true`)。ãŸã ã—ã€ãã®å ´åˆã€ã™ã¹ã¦ã®`SELECT`クエリãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸçµæžœã‚’è¿”ã™ã“ã¨ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +クエリキャッシュã¯ã€æ–‡`SYSTEM DROP QUERY CACHE`を使用ã—ã¦ã‚¯ãƒªã‚¢ã§ãã¾ã™ã€‚クエリキャッシュã®å†…容ã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル[system.query_cache](system-tables/query_cache.md)ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ +データベース開始以é™ã®ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ’ットã¨ãƒŸã‚¹ã®æ•°ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル[system.events](system-tables/events.md)ã®ã‚¤ãƒ™ãƒ³ãƒˆ"QueryCacheHits"ãŠã‚ˆã³"QueryCacheMisses"ã¨ã—ã¦ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚両方ã®ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã¯ã€`use_query_cache = true`設定ã§å®Ÿè¡Œã•ã‚ŒãŸ`SELECT`クエリã«å¯¾ã—ã¦ã®ã¿æ›´æ–°ã•ã‚Œã€ãれ以外ã®ã‚¯ã‚¨ãƒªã¯"QueryCacheMisses"ã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。 +システムテーブル[system.query_log](system-tables/query_log.md)ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰`query_cache_usage`ã¯ã€å®Ÿè¡Œã•ã‚ŒãŸã‚¯ã‚¨ãƒªã”ã¨ã«ã€ãã®ã‚¯ã‚¨ãƒªçµæžœãŒã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«æ›¸ãè¾¼ã¾ã‚ŒãŸã‹ã€ã‚‚ã—ãã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰èª­ã¿å–られãŸã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ +システムテーブル[system.asynchronous_metrics](system-tables/asynchronous_metrics.md)ã®éžåŒæœŸãƒ¡ãƒˆãƒªãƒƒã‚¯"QueryCacheEntries"ãŠã‚ˆã³"QueryCacheBytes"ã¯ã€ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒç¾åœ¨å«ã‚“ã§ã„るエントリ/ãƒã‚¤ãƒˆæ•°ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +クエリキャッシュã¯ã€ClickHouseサーãƒãƒ¼ãƒ—ロセスã”ã¨ã«1ã¤å­˜åœ¨ã—ã¾ã™ã€‚ãŸã ã—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥çµæžœã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼é–“ã§å…±æœ‰ã•ã‚Œã¾ã›ã‚“。セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€ã“れを変更ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒï¼ˆä¸‹è¨˜å‚照)ã€æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + +クエリキャッシュ内ã®ã‚¯ã‚¨ãƒªçµæžœã¯ã€ã‚¯ã‚¨ãƒªã®[抽象構文木 (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree)ã«ã‚ˆã£ã¦å‚ç…§ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚­ãƒ£ãƒƒã‚·ãƒ³ã‚°ãŒå¤§æ–‡å­—/å°æ–‡å­—ã«ä¾å­˜ã—ãªã„ã“ã¨ã‚’æ„味ã—ã€ä¾‹ãˆã°`SELECT 1`ã¨`select 1`ãŒåŒã˜ã‚¯ã‚¨ãƒªã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ +キャッシュã®ãƒžãƒƒãƒãƒ³ã‚°ã‚’より自然ã«ã™ã‚‹ãŸã‚ã«ã€ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«é–¢é€£ã™ã‚‹ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«è¨­å®šã¯ASTã‹ã‚‰å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +クエリãŒä¾‹å¤–やユーザーã®ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã«ã‚ˆã‚Šä¸­æ­¢ã•ã‚ŒãŸå ´åˆã€ã‚¨ãƒ³ãƒˆãƒªã¯ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã›ã‚“。 + +クエリキャッシュã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€æœ€å¤§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ³ãƒˆãƒªæ•°ã€ãŠã‚ˆã³å€‹ã€…ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ³ãƒˆãƒªã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆãŠã‚ˆã³ãƒ¬ã‚³ãƒ¼ãƒ‰æ•°ï¼‰ã¯ã€ç•°ãªã‚‹[サーãƒãƒ¼ã‚³ãƒ³ãƒ•ã‚£ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚ªãƒ—ション](server-configuration-parameters/settings.md#server_configuration_parameters_query-cache)を使用ã—ã¦æ§‹æˆã§ãã¾ã™ã€‚ + +```xml + + 1073741824 + 1024 + 1048576 + 30000000 + +``` + +ã¾ãŸã€[設定プロファイル](settings/settings-profiles.md)ãŠã‚ˆã³[設定制約](settings/constraints-on-settings.md)を使用ã—ã¦ã€å€‹ã€…ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ä½¿ç”¨é‡ã‚’制é™ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +より具体的ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã§å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãるメモリã®æœ€å¤§é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã¨ã€ã‚¹ãƒˆã‚¢ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªçµæžœã®æœ€å¤§æ•°ã‚’制é™ã§ãã¾ã™ã€‚ +ãã®ãŸã‚ã«ã¯ã€ã¾ãšãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロファイル内ã®`users.xml`ã§[query_cache_max_size_in_bytes](settings/settings.md#query-cache-max-size-in-bytes)ã¨[query_cache_max_entries](settings/settings.md#query-cache-max-entries)ã®è¨­å®šã‚’è¡Œã„ã€æ¬¡ã«ä¸¡æ–¹ã®è¨­å®šã‚’読ã¿å–り専用ã«ã—ã¾ã™ï¼š + +``` xml + + + + 10000 + + 100 + + + + + + + + + + + +``` + +クエリã®çµæžœãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ã«ã¯ä¸€å®šæ™‚間以上ã®å®Ÿè¡ŒãŒå¿…è¦ãªå ´åˆã€è¨­å®š[query_cache_min_query_duration](settings/settings.md#query-cache-min-query-duration)を使用ã§ãã¾ã™ã€‚ +ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã®çµæžœã¯ã€ + +``` sql +SELECT some_expensive_calculation(column_1, column_2) +FROM table +SETTINGS use_query_cache = true, query_cache_min_query_duration = 5000; +``` + +クエリãŒ5秒以上実行ã•ã‚Œã‚‹å ´åˆã«ã®ã¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ã¾ãŸã€ã‚¯ã‚¨ãƒªã®çµæžœãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ã¾ã§ã«ä½•å›žå®Ÿè¡Œã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚’指定ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ãã‚Œã«ã¯è¨­å®š[query_cache_min_query_runs](settings/settings.md#query-cache-min-query-runs)を使用ã—ã¾ã™ã€‚ + +クエリキャッシュ内ã®ã‚¨ãƒ³ãƒˆãƒªã¯ã€ä¸€å®šæœŸé–“ï¼ˆæœ‰åŠ¹æœŸé™ (TTL))ãŒçµŒéŽã™ã‚‹ã¨å¤ããªã‚Šã¾ã™ã€‚デフォルトã§ã¯ã€ã“ã®æœŸé–“ã¯60秒ã§ã™ãŒã€è¨­å®š[query_cache_ttl](settings/settings.md#query-cache-ttl)を使用ã—ã¦ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã€ãƒ—ロファイルã€ã¾ãŸã¯ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã§ç•°ãªã‚‹å€¤ã‚’指定ã§ãã¾ã™ã€‚ +クエリキャッシュã¯ã€Œé…延ã€ã‚¨ãƒ³ãƒˆãƒªè¿½æ”¾ã‚’è¡Œã„ã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚¨ãƒ³ãƒˆãƒªãŒå¤ããªã£ãŸå ´åˆã€ã™ãã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰å‰Šé™¤ã•ã‚Œã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +代ã‚ã‚Šã«ã€æ–°ã—ã„エントリをクエリキャッシュã«æŒ¿å…¥ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒæ–°ã—ã„エントリã®ãŸã‚ã«å分ãªç©ºãスペースをæŒã£ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚ +ã“ã‚ŒãŒè¡Œã‚ã‚Œãªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã™ã¹ã¦ã®å¤ã„エントリを削除ã—よã†ã¨ã—ã¾ã™ã€‚ãã‚Œã§ã‚‚キャッシュã«å分ãªç©ºãスペースãŒãªã„å ´åˆã€æ–°ã—ã„エントリã¯æŒ¿å…¥ã•ã‚Œã¾ã›ã‚“。 + +クエリキャッシュ内ã®ã‚¨ãƒ³ãƒˆãƒªã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¸ã®èª­ã¿æ›¸ããŒé…ããªã‚Šã¾ã™ãŒã€å…¨ä½“ã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»é‡ãŒå‰Šæ¸›ã•ã‚Œã¾ã™ã€‚ +圧縮を無効化ã™ã‚‹ã«ã¯ã€è¨­å®š[query_cache_compress_entries](settings/settings.md#query-cache-compress-entries)を使用ã—ã¾ã™ã€‚ + +時ã«ã¯ã€åŒã˜ã‚¯ã‚¨ãƒªã«å¯¾ã™ã‚‹è¤‡æ•°ã®çµæžœã‚’キャッシュã—ã¦ãŠãã¨ä¾¿åˆ©ã§ã™ã€‚ã“れを実ç¾ã™ã‚‹ãŸã‚ã«ã€ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ³ãƒˆãƒªã®ã‚¿ã‚°ï¼ˆã¾ãŸã¯ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ï¼‰ã¨ã—ã¦æ©Ÿèƒ½ã™ã‚‹è¨­å®š[query_cache_tag](settings/settings.md#query-cache-tag)ãŒä½¿ç”¨ã§ãã¾ã™ã€‚ +クエリキャッシュã¯ã€ç•°ãªã‚‹ã‚¿ã‚°ã‚’æŒã¤åŒã˜ã‚¯ã‚¨ãƒªã®çµæžœã‚’ç•°ãªã‚‹ã‚‚ã®ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ + +åŒã˜ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦3ã¤ã®ç•°ãªã‚‹ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ³ãƒˆãƒªã‚’作æˆã™ã‚‹ä¾‹ï¼š + +```sql +SELECT 1 SETTINGS use_query_cache = true; -- query_cache_tagã¯æš—黙的ã«''(空文字列) +SELECT 1 SETTINGS use_query_cache = true, query_cache_tag = 'tag 1'; +SELECT 1 SETTINGS use_query_cache = true, query_cache_tag = 'tag 2'; +``` + +クエリキャッシュã‹ã‚‰ã‚¿ã‚°`tag`ã®ã‚¨ãƒ³ãƒˆãƒªã®ã¿ã‚’削除ã™ã‚‹ã«ã¯ã€æ–‡`SYSTEM DROP QUERY CACHE TAG 'tag'`を使用ã—ã¾ã™ã€‚ + +ClickHouseã¯ã€[max_block_size](settings/settings.md#setting-max_block_size)è¡Œã®ãƒ–ロックã§ãƒ†ãƒ¼ãƒ–ルデータを読ã¿è¾¼ã¿ã¾ã™ã€‚ +フィルタリングや集約ãªã©ã«ã‚ˆã‚Šã€çµæžœãƒ–ロックã¯é€šå¸¸'max_block_size'よりもã¯ã‚‹ã‹ã«å°ã•ããªã‚Šã¾ã™ãŒã€å ´åˆã«ã‚ˆã£ã¦ã¯éžå¸¸ã«å¤§ãããªã‚‹ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ã€‚ +設定[query_cache_squash_partial_results](settings/settings.md#query-cache-squash-partial-results)(デフォルトã§æœ‰åŠ¹ï¼‰ã¯ã€çµæžœãƒ–ロックãŒï¼ˆæ¥µå°ã®å ´åˆï¼‰'max_block_size'ã®ã‚µã‚¤ã‚ºã«ã‚¹ã‚¯ãƒ¯ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ã‹ã€ï¼ˆå¤§ãã„å ´åˆï¼‰ã«ãƒ–ロックãŒã‚¹ãƒ—リットã•ã‚Œã‚‹ã‹ã‚’制御ã—ã¾ã™ã€‚ +ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¸ã®æ›¸ãè¾¼ã¿ã®ãƒ‘フォーマンスã¯ä½Žä¸‹ã—ã¾ã™ãŒã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ³ãƒˆãƒªã®åœ§ç¸®çŽ‡ã¯æ”¹å–„ã•ã‚Œã€å¾Œã§ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰çµæžœãŒæä¾›ã•ã‚Œã‚‹éš›ã«ã€ã‚ˆã‚Šè‡ªç„¶ãªãƒ–ロック粒度ãŒå¾—られã¾ã™ã€‚ + +çµæžœã¨ã—ã¦ã€ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ã‚¯ã‚¨ãƒªã”ã¨ã«è¤‡æ•°ã®ï¼ˆéƒ¨åˆ†çš„ãªï¼‰çµæžœãƒ–ロックをä¿å­˜ã—ã¾ã™ã€‚ã“ã®æŒ¯ã‚‹èˆžã„ã¯è‰¯ã„デフォルトã§ã™ãŒã€è¨­å®š[query_cache_squash_partial_results](settings/settings.md#query-cache-squash-partial-results)を使用ã—ã¦æŠ‘制ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +ã¾ãŸã€éžæ±ºå®šçš„ãªé–¢æ•°ã‚’å«ã‚€ã‚¯ã‚¨ãƒªã®çµæžœã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã«ã¯ã€ +- Dictionaryアクセス用関数: [`dictGet()`](../sql-reference/functions/ext-dict-functions.md#dictGet) ãªã©ã€ +- [ユーザー定義関数](../sql-reference/statements/create/function.md)〠+- ç¾åœ¨ã®æ—¥ä»˜ã‚„時刻を返ã™é–¢æ•°: [`now()`](../sql-reference/functions/date-time-functions.md#now), + [`today()`](../sql-reference/functions/date-time-functions.md#today), + [`yesterday()`](../sql-reference/functions/date-time-functions.md#yesterday) ãªã©ã€ +- ランダムãªå€¤ã‚’è¿”ã™é–¢æ•°: [`randomString()`](../sql-reference/functions/random-functions.md#randomString), + [`fuzzBits()`](../sql-reference/functions/random-functions.md#fuzzBits) ãªã©ã€ +- クエリ処ç†ã«ä½¿ç”¨ã•ã‚Œã‚‹å†…部ãƒãƒ£ãƒ³ã‚¯ã®ã‚µã‚¤ã‚ºã¨é †åºã«ä¾å­˜ã™ã‚‹é–¢æ•°: + [`nowInBlock()`](../sql-reference/functions/date-time-functions.md#nowInBlock) ãªã©ã€ + [`rowNumberInBlock()`](../sql-reference/functions/other-functions.md#rowNumberInBlock), + [`runningDifference()`](../sql-reference/functions/other-functions.md#runningDifference), + [`blockSize()`](../sql-reference/functions/other-functions.md#blockSize) ãªã©ã€ +- 環境ã«ä¾å­˜ã™ã‚‹é–¢æ•°: [`currentUser()`](../sql-reference/functions/other-functions.md#currentUser), + [`queryID()`](../sql-reference/functions/other-functions.md#queryID), + [`getMacro()`](../sql-reference/functions/other-functions.md#getMacro) ãªã©ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +éžæ±ºå®šçš„ãªé–¢æ•°ã‚’å«ã‚€ã‚¯ã‚¨ãƒªã®çµæžœã‚’強制的ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã™ã‚‹å ´åˆã¯ã€è¨­å®š[query_cache_nondeterministic_function_handling](settings/settings.md#query-cache-nondeterministic-function-handling)を使用ã—ã¾ã™ã€‚ + +システムテーブル(例:[system.processes](system-tables/processes.md)ã¾ãŸã¯[information_schema.tables](system-tables/information_schema.md))をå«ã‚€ã‚¯ã‚¨ãƒªã®çµæžœã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã›ã‚“。 +システムテーブルをå«ã‚€ã‚¯ã‚¨ãƒªã®çµæžœã‚’強制的ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã™ã‚‹ã«ã¯ã€è¨­å®š[query_cache_system_table_handling](settings/settings.md#query-cache-system-table-handling)を使用ã—ã¾ã™ã€‚ + +最後ã«ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šã®ç†ç”±ã‹ã‚‰ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥å†…ã®ã‚¨ãƒ³ãƒˆãƒªã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼é–“ã§å…±æœ‰ã•ã‚Œã¾ã›ã‚“。ãŸã¨ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼Aã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼B(ãã®ã‚ˆã†ãªãƒãƒªã‚·ãƒ¼ãŒå­˜åœ¨ã—ãªã„ユーザー)ã®ãŸã‚ã«åŒã˜ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ãƒ†ãƒ¼ãƒ–ル上ã®è¡Œãƒãƒªã‚·ãƒ¼ã‚’回é¿ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。ã—ã‹ã—ã€å¿…è¦ã«å¿œã˜ã¦ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ³ãƒˆãƒªã¯ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ï¼ˆã™ãªã‚ã¡å…±æœ‰å¯èƒ½ï¼‰ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€è¨­å®š +[query_cache_share_between_users](settings/settings.md#query-cache-share-between-users)を供給ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šå®Ÿç¾ã§ãã¾ã™ã€‚ + +## 関連コンテンツ + +- ブログ: [Introducing the ClickHouse Query Cache](https://clickhouse.com/blog/introduction-to-the-clickhouse-query-cache-and-design) diff --git a/docs/ja/operations/quotas.md b/docs/ja/operations/quotas.md new file mode 100644 index 00000000000..13390de00de --- /dev/null +++ b/docs/ja/operations/quotas.md @@ -0,0 +1,115 @@ +--- +slug: /ja/operations/quotas +sidebar_position: 51 +sidebar_label: Quotas +title: Quotas +--- + +クォータã¯ã€ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨é‡ã‚’一定期間内ã§åˆ¶é™ã—ãŸã‚Šã€ãƒªã‚½ãƒ¼ã‚¹ã®ä½¿ç”¨ã‚’追跡ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚クォータã¯é€šå¸¸ã€Œusers.xmlã€ã«è¨­å®šã•ã‚Œã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šã«å«ã¾ã‚Œã¾ã™ã€‚ + +システムã«ã¯ã€å˜ä¸€ã®ã‚¯ã‚¨ãƒªã®è¤‡é›‘ã•ã‚’制é™ã™ã‚‹æ©Ÿèƒ½ã‚‚ã‚ã‚Šã¾ã™ã€‚詳細ã¯ã€[クエリã®è¤‡é›‘ã•ã«é–¢ã™ã‚‹åˆ¶é™](../operations/settings/query-complexity.md)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +クエリã®è¤‡é›‘ã•ã®åˆ¶é™ã¨ã¯å¯¾ç…§çš„ã«ã€ã‚¯ã‚©ãƒ¼ã‚¿ã¯ä»¥ä¸‹ã‚’特徴ã¨ã—ã¾ã™ï¼š + +- å˜ä¸€ã®ã‚¯ã‚¨ãƒªã‚’制é™ã™ã‚‹ã®ã§ã¯ãªãã€ä¸€å®šæœŸé–“内ã§å®Ÿè¡Œã§ãるクエリã®ã‚»ãƒƒãƒˆã«å¯¾ã—ã¦åˆ¶é™ã‚’ã‹ã‘ã¾ã™ã€‚ +- 分散クエリ処ç†ã®ãŸã‚ã®å…¨ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã§æ¶ˆè²»ã•ã‚ŒãŸãƒªã‚½ãƒ¼ã‚¹ã‚’考慮ã—ã¾ã™ã€‚ + +次ã«ã€ã‚¯ã‚©ãƒ¼ã‚¿ã‚’定義ã™ã‚‹ã€Œusers.xmlã€ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ + +``` xml + + + + + + + + 3600 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + +``` + +デフォルトã§ã¯ã€ã‚¯ã‚©ãƒ¼ã‚¿ã¯æ¯Žæ™‚ã®ãƒªã‚½ãƒ¼ã‚¹æ¶ˆè²»ã‚’追跡ã—ã€ä½¿ç”¨ã‚’制é™ã—ã¾ã›ã‚“。 +å„インターãƒãƒ«ã”ã¨ã«è¨ˆç®—ã•ã‚ŒãŸãƒªã‚½ãƒ¼ã‚¹æ¶ˆè²»ã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã”ã¨ã«ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã«å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +``` xml + + + + + 3600 + + 1000 + 100 + 100 + 100 + 1000000000 + 100000000000 + 900 + + + + 86400 + + 10000 + 10000 + 10000 + 1000 + 5000000000 + 500000000000 + 7200 + + +``` + +‘statbox’ クォータã®å ´åˆã€1時間ã”ã¨ãŠã‚ˆã³24時間(86,400秒)ã”ã¨ã«åˆ¶é™ãŒè¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚時間間隔ã¯ã€å®Ÿè£…ã§å®šç¾©ã•ã‚ŒãŸå›ºå®šã®æ™‚点ã‹ã‚‰å§‹ã¾ã‚‹ãŸã‚ã€24時間ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã¯å¿…ãšã—も深夜ã«å§‹ã¾ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +インターãƒãƒ«ãŒçµ‚了ã™ã‚‹ã¨ã€ã™ã¹ã¦ã®åŽé›†ã•ã‚ŒãŸå€¤ã¯ã‚¯ãƒªã‚¢ã•ã‚Œã¾ã™ã€‚次ã®æ™‚é–“ã®ã‚¯ã‚©ãƒ¼ã‚¿è¨ˆç®—ã¯å†ã³å§‹ã¾ã‚Šã¾ã™ã€‚ + +次ã®åˆ¶é™å¯èƒ½ãªé …ç›®ãŒã‚ã‚Šã¾ã™ï¼š + +`queries` – リクエストã®ç·æ•°ã€‚ + +`query_selects` – selectリクエストã®ç·æ•°ã€‚ + +`query_inserts` – insertリクエストã®ç·æ•°ã€‚ + +`errors` – 例外をスローã—ãŸã‚¯ã‚¨ãƒªã®æ•°ã€‚ + +`result_rows` – çµæžœã¨ã—ã¦ä¸Žãˆã‚‰ã‚ŒãŸè¡Œã®ç·æ•°ã€‚ + +`read_rows` – ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã§ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ãŸã‚ã«ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–られãŸã‚½ãƒ¼ã‚¹è¡Œã®ç·æ•°ã€‚ + +`execution_time` – åˆè¨ˆã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œæ™‚間(秒:ウォールタイム)。 + +å°‘ãªãã¨ã‚‚1ã¤ã®æ™‚é–“é–“éš”ã§åˆ¶é™ã‚’超ãˆã‚‹ã¨ã€ã©ã®åˆ¶é™ãŒã©ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã§è¶…ãˆã‚‰ã‚ŒãŸã‹ã€æ–°ã—ã„インターãƒãƒ«ãŒã„ã¤å§‹ã¾ã‚‹ã‹ã«ã¤ã„ã¦ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒæ·»ãˆã‚‰ã‚ŒãŸä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ï¼ˆã‚¯ã‚¨ãƒªãŒå†ã³é€ä¿¡ã§ãã‚‹å ´åˆï¼‰ã€‚ + +クォータã¯ã€Œã‚¯ã‚©ãƒ¼ã‚¿ã‚­ãƒ¼ã€æ©Ÿèƒ½ã‚’使用ã—ã¦ã€è¤‡æ•°ã®ã‚­ãƒ¼ã«å¯¾ã—ã¦ç‹¬ç«‹ã—ã¦ãƒªã‚½ãƒ¼ã‚¹ã‚’報告ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã«ãã®ä¾‹ã‚’示ã—ã¾ã™ï¼š + +``` xml + + + + +``` + +クォータã¯è¨­å®šã®ã€Œusersã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚「アクセス権ã€ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +分散クエリ処ç†ã§ã¯ã€è“„ç©ã•ã‚ŒãŸé‡ã¯è¦æ±‚者ã®ã‚µãƒ¼ãƒãƒ¼ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ãã®ãŸã‚ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒåˆ¥ã®ã‚µãƒ¼ãƒãƒ¼ã«ç§»å‹•ã™ã‚‹ã¨ã€ãã®ã‚µãƒ¼ãƒãƒ¼ã§ã®ã‚¯ã‚©ãƒ¼ã‚¿ã¯ã€Œã‚„ã‚Šç›´ã—ã€ã«ãªã‚Šã¾ã™ã€‚ + +サーãƒãƒ¼ãŒå†èµ·å‹•ã•ã‚Œã‚‹ã¨ã€ã‚¯ã‚©ãƒ¼ã‚¿ã¯ãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/operations/server-configuration-parameters/settings.md b/docs/ja/operations/server-configuration-parameters/settings.md new file mode 100644 index 00000000000..446099eecde --- /dev/null +++ b/docs/ja/operations/server-configuration-parameters/settings.md @@ -0,0 +1,3203 @@ +--- +slug: /ja/operations/server-configuration-parameters/settings +sidebar_position: 57 +sidebar_label: グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®š +description: ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¾ãŸã¯ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã§å¤‰æ›´ã§ããªã„サーãƒãƒ¼è¨­å®šã®èª¬æ˜ŽãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ +--- + +# グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®š + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¾ãŸã¯ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã§å¤‰æ›´ã§ããªã„サーãƒãƒ¼è¨­å®šã®èª¬æ˜ŽãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“れらã®è¨­å®šã¯ClickHouseサーãƒãƒ¼ã®`config.xml`ファイルã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ãã®ä»–ã®è¨­å®šã¯ã€Œ[設定](../../operations/settings/index.md#session-settings-intro)ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™ã€‚ + +設定を学ã¶å‰ã«ã€[設定ファイル](../../operations/configuration-files.md#configuration_files)セクションを読ã¿ã€ç½®æ›ã®ä½¿ç”¨ï¼ˆ`incl`ãŠã‚ˆã³`optional`属性)ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +## allow_use_jemalloc_memory + +jemallocメモリを使用ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +タイプ: Bool + +デフォルト: 1 + +## asynchronous_heavy_metrics_update_period_s + +éžåŒæœŸãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’æ›´æ–°ã™ã‚‹æœŸé–“(秒å˜ä½ï¼‰ã€‚ + +タイプ: UInt32 + +デフォルト: 120 + +## asynchronous_metrics_update_period_s + +éžåŒæœŸãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’æ›´æ–°ã™ã‚‹æœŸé–“(秒å˜ä½ï¼‰ã€‚ + +タイプ: UInt32 + +デフォルト: 1 + +## auth_use_forwarded_address + +プロキシを介ã—ã¦æŽ¥ç¶šã•ã‚ŒãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®èªè¨¼ã«å…ƒã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’使用ã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯ã€è»¢é€ã•ã‚ŒãŸã‚¢ãƒ‰ãƒ¬ã‚¹ãŒå®¹æ˜“ã«å½è£…ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ç‰¹ã«æ³¨æ„ã—ã¦ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ãã®ã‚ˆã†ãªèªè¨¼ã‚’å—ã‘入れるサーãƒãƒ¼ã¯ã€ä¿¡é ¼ã§ãるプロキシ経由ã§ã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ +::: + +タイプ: Bool + +デフォルト: 0 + +## background_buffer_flush_schedule_pool_size + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§Bufferエンジンテーブルã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥æ“作を実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +タイプ: UInt64 + +デフォルト: 16 + +## background_common_pool_size + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§\*MergeTreeエンジンテーブルã®ã•ã¾ã–ã¾ãªæ“作(主ã«ã‚¬ãƒ™ãƒ¼ã‚¸ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ï¼‰ã‚’実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +タイプ: UInt64 + +デフォルト: 8 + +## background_distributed_schedule_pool_size + +分散é€ä¿¡ã‚’実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +タイプ: UInt64 + +デフォルト: 16 + +## background_fetches_pool_size + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§\*MergeTreeエンジンテーブルã®ä»–ã®ãƒ¬ãƒ—リカã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツをフェッãƒã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +タイプ: UInt64 + +デフォルト: 16 + +## background_merges_mutations_concurrency_ratio + +スレッド数ã¨ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã®ãƒžãƒ¼ã‚¸ãŠã‚ˆã³ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’並行ã—ã¦å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã‚‹æ•°ã®æ¯”率を設定ã—ã¾ã™ã€‚例ãˆã°ã€ã“ã®æ¯”率ãŒ2ã«ç­‰ã—ãã€`background_pool_size`ãŒ16ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§32個ã®ãƒžãƒ¼ã‚¸ã‚’åŒæ™‚ã«å®Ÿè¡Œã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作ãŒä¸€æ™‚åœæ­¢ã—ã¦å»¶æœŸã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚å¯èƒ½ã§ã™ã€‚å°ã•ãªãƒžãƒ¼ã‚¸ã«ã‚ˆã‚Šé«˜ã„実行優先順ä½ã‚’与ãˆã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚ã“ã®æ¯”率を増やã™ã“ã¨ã¯å®Ÿè¡Œæ™‚ã«ã®ã¿å¯èƒ½ã§ã™ã€‚ã“れを下ã’ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`background_pool_size`設定ã¨åŒæ§˜ã«ã€å¾Œæ–¹äº’æ›æ€§ã®ãŸã‚ã«`default`プロファイルã‹ã‚‰`background_merges_mutations_concurrency_ratio`ã‚’é©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +タイプ: Float + +デフォルト: 2 + +## background_merges_mutations_scheduling_policy + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã¨ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°ã‚’è¡Œã†æ–¹é‡ã€‚å¯èƒ½ãªå€¤ã¯`round_robin`ã¨`shortest_task_first`ã§ã™ã€‚ + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã‚‹æ¬¡ã®ãƒžãƒ¼ã‚¸ã¾ãŸã¯ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã€‚ãƒãƒªã‚·ãƒ¼ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã›ãšã«å®Ÿè¡Œæ™‚ã«å¤‰æ›´å¯èƒ½ã§ã™ã€‚後方互æ›æ€§ã®ãŸã‚ã«`default`プロファイルã‹ã‚‰é©ç”¨ã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 「round_robinã€â€” ã™ã¹ã¦ã®åŒæ™‚マージã¨ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã€æž¯æ¸‡ã®ãªã„æ“作をä¿è¨¼ã™ã‚‹ãŸã‚ã«ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ­ãƒ“ン順ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚å°ã•ãªãƒžãƒ¼ã‚¸ã¯ã€å˜ã«ãƒžãƒ¼ã‚¸ã™ã‚‹ãƒ–ロックãŒå°‘ãªã„ãŸã‚ã€ã‚ˆã‚Šå¤§ããªã‚‚ã®ã‚ˆã‚Šã‚‚æ—©ã完了ã—ã¾ã™ã€‚ +- 「shortest_task_firstã€â€” 常ã«å°ã•ãªãƒžãƒ¼ã‚¸ã¾ãŸã¯ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’実行ã—ã¾ã™ã€‚マージã¨ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã€çµæžœã®ã‚µã‚¤ã‚ºã«åŸºã¥ã„ã¦å„ªå…ˆé †ä½ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚å°ã•ã„サイズã®ãƒžãƒ¼ã‚¸ã¯ã€å¤§ããªã‚‚ã®ã«å¯¾ã—ã¦åŽ³å¯†ã«å„ªå…ˆã•ã‚Œã¾ã™ã€‚ã“ã®ãƒãƒªã‚·ãƒ¼ã¯ã€å°ã•ãªãƒ‘ーツをå¯èƒ½ãªé™ã‚Šæ—©ãマージã™ã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ãŒã€INSERTsã§éŽåº¦ã«è² è·ãŒã‹ã‹ã‚‹ã¨ã€å¤§ããªãƒžãƒ¼ã‚¸ãŒç„¡æœŸé™ã«é…れるå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +タイプ: String + +デフォルト: round_robin + +## background_message_broker_schedule_pool_size + +メッセージストリーミングã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作を実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +タイプ: UInt64 + +デフォルト: 16 + +## background_move_pool_size + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§\*MergeTreeエンジンテーブルã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを他ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¾ãŸã¯ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«ç§»å‹•ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +タイプ: UInt64 + +デフォルト: 8 + +## background_pool_size + +MergeTreeエンジンをæŒã¤ãƒ†ãƒ¼ãƒ–ルã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã¨ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’設定ã—ã¾ã™ã€‚ã“ã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’実行時ã«å¢—ã‚„ã™ã“ã¨ã ã‘ãŒå¯èƒ½ã§ã™ã€‚スレッド数を減らã™ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã‚’調整ã™ã‚‹ã“ã¨ã§ã€CPUã¨ãƒ‡ã‚£ã‚¹ã‚¯ã®è² è·ã‚’管ç†ã—ã¾ã™ã€‚プールサイズãŒå°ã•ã„ã»ã©CPUã¨ãƒ‡ã‚£ã‚¹ã‚¯ãƒªã‚½ãƒ¼ã‚¹ã®ä½¿ç”¨ãŒå°‘ãªããªã‚Šã¾ã™ãŒã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセスã®é€²è¡ŒãŒé…ããªã‚Šã€æœ€çµ‚çš„ã«ã¯ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +変更ã™ã‚‹å‰ã«ã€é–¢é€£ã™ã‚‹MergeTreeã®è¨­å®šã€ãŸã¨ãˆã°`number_of_free_entries_in_pool_to_lower_max_size_of_merge`ã‚„`number_of_free_entries_in_pool_to_execute_mutation`ãªã©ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +タイプ: UInt64 + +デフォルト: 16 + +## background_schedule_pool_size + +レプリカーテーブルã€Kafkaストリーミングã€DNSキャッシュã®æ›´æ–°ã®ãŸã‚ã®è»½é‡ãªå‘¨æœŸçš„æ“作を常時実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +タイプ: UInt64 + +デフォルト: 512 + +## backup_threads + +BACKUPリクエストを実行ã™ã‚‹ãŸã‚ã®æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +タイプ: UInt64 + +デフォルト: 16 + +## backups_io_thread_pool_queue_size + +Backups IO スレッドプールã§ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ãるジョブã®æœ€å¤§æ•°ã€‚ç¾åœ¨ã®S3ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ロジックã®ãŸã‚ã€ã‚­ãƒ¥ãƒ¼ã‚’無制é™ï¼ˆ0)ã«ä¿ã¤ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 0 + +## cache_size_to_ram_max_ratio + +RAM最大比ã«å¯¾ã™ã‚‹ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºã‚’設定ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ä½Žãƒ¡ãƒ¢ãƒªã‚·ã‚¹ãƒ†ãƒ ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºã‚’減少ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +タイプ: Double + +デフォルト: 0.5 + +## concurrent_threads_soft_limit_num + +リモートサーãƒãƒ¼ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’除ãã€ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ãŸã‚ã«è¨±å¯ã•ã‚Œã‚‹æœ€å¤§ã‚¯ã‚¨ãƒªå‡¦ç†ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ã“ã‚Œã¯åŽ³ã—ã„制é™ã§ã¯ã‚ã‚Šã¾ã›ã‚“。制é™ã«é”ã—ãŸå ´åˆã§ã‚‚ã€ã‚¯ã‚¨ãƒªã¯å°‘ãªãã¨ã‚‚1ã¤ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’å–å¾—ã—ã¦å®Ÿè¡Œã•ã‚Œç¶šã‘ã¾ã™ã€‚実行中ã«ã•ã‚‰ã«å¤šãã®ã‚¹ãƒ¬ãƒƒãƒ‰ãŒä½¿ç”¨å¯èƒ½ã«ãªã‚‹ã¨ã€ã‚¯ã‚¨ãƒªã¯å¸Œæœ›ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã«ã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 0 + +## concurrent_threads_soft_limit_ratio_to_cores + +concurrent_threads_soft_limit_numã¨åŒã˜ã§ã™ãŒã€ã‚³ã‚¢ã¨æ¯”率ã§æŒ‡å®šã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 0 + +## default_database + +デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å。 + +タイプ: String + +デフォルト: default + +## disable_internal_dns_cache + +内部DNSキャッシュを無効ã«ã—ã¾ã™ã€‚ClickHouseã‚’é »ç¹ã«å¤‰æ›´ã•ã‚Œã‚‹ã‚¤ãƒ³ãƒ•ãƒ©ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ï¼ˆä¾‹: Kubernetes)ã§é‹ç”¨ã™ã‚‹éš›ã«æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +タイプ: Bool + +デフォルト: 0 + +## dns_cache_max_entries + +内部DNSキャッシュã®æœ€å¤§ã‚¨ãƒ³ãƒˆãƒªæ•°ã€‚ + +タイプ: UInt64 + +デフォルト: 10000 + +## dns_cache_update_period + +内部DNSキャッシュã®æ›´æ–°æœŸé–“(秒å˜ä½ï¼‰ã€‚ + +タイプ: Int32 + +デフォルト: 15 + +## dns_max_consecutive_failures + +ClickHouseã®DNSキャッシュã‹ã‚‰ãƒ›ã‚¹ãƒˆã‚’削除ã™ã‚‹å‰ã®æœ€å¤§é€£ç¶šè§£æ±ºå¤±æ•—æ•° + +タイプ: UInt32 + +デフォルト: 10 + +## index_mark_cache_policy + +インデックスマークキャッシュãƒãƒªã‚·ãƒ¼å。 + +タイプ: String + +デフォルト: SLRU + +## index_mark_cache_size + +インデックスマークã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºã€‚ゼロã¯ç„¡åŠ¹ã‚’æ„味ã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯å®Ÿè¡Œæ™‚ã«å¤‰æ›´å¯èƒ½ã§ã€ã™ãã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +タイプ: UInt64 + +デフォルト: 0 + +## index_mark_cache_size_ratio + +キャッシュã®åˆè¨ˆã‚µã‚¤ã‚ºã«å¯¾ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒžãƒ¼ã‚¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥å†…ã®ä¿è­·ã•ã‚ŒãŸã‚­ãƒ¥ãƒ¼ã®ã‚µã‚¤ã‚ºã€‚ + +タイプ: Double + +デフォルト: 0.5 + +## index_uncompressed_cache_policy + +インデックスéžåœ§ç¸®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒãƒªã‚·ãƒ¼å。 + +タイプ: String + +デフォルト: SLRU + +## index_uncompressed_cache_size + +MergeTreeインデックスã®éžåœ§ç¸®ãƒ–ロックã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºã€‚ゼロã¯ç„¡åŠ¹ã‚’æ„味ã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯å®Ÿè¡Œæ™‚ã«å¤‰æ›´å¯èƒ½ã§ã€ã™ãã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +タイプ: UInt64 + +デフォルト: 0 + +## index_uncompressed_cache_size_ratio + +キャッシュã®åˆè¨ˆã‚µã‚¤ã‚ºã«å¯¾ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹éžåœ§ç¸®ã‚­ãƒ£ãƒƒã‚·ãƒ¥å†…ã®ä¿è­·ã•ã‚ŒãŸã‚­ãƒ¥ãƒ¼ã®ã‚µã‚¤ã‚ºã€‚ + +タイプ: Double + +デフォルト: 0.5 + +## io_thread_pool_queue_size + +IOスレッドプールã®ã‚­ãƒ¥ãƒ¼ã‚µã‚¤ã‚ºã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 10000 + +## mark_cache_policy + +マークキャッシュãƒãƒªã‚·ãƒ¼å。 + +タイプ: String + +デフォルト: SLRU + +## mark_cache_size + +マーク(MergeTreeファミリーã®ãƒ†ãƒ¼ãƒ–ルã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ï¼‰ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºã€‚ + +:::note +ã“ã®è¨­å®šã¯å®Ÿè¡Œæ™‚ã«å¤‰æ›´å¯èƒ½ã§ã€ã™ãã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +タイプ: UInt64 + +デフォルト: 5368709120 + +## mark_cache_size_ratio + +キャッシュã®åˆè¨ˆã‚µã‚¤ã‚ºã«å¯¾ã™ã‚‹ãƒžãƒ¼ã‚¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥å†…ã®ä¿è­·ã•ã‚ŒãŸã‚­ãƒ¥ãƒ¼ã®ã‚µã‚¤ã‚ºã€‚ + +タイプ: Double + +デフォルト: 0.5 + +## max_backup_bandwidth_for_server + +サーãƒãƒ¼ä¸Šã®ã™ã¹ã¦ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«å¯¾ã™ã‚‹æœ€å¤§èª­ã¿å–り速度(ãƒã‚¤ãƒˆæ¯Žç§’)。ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 0 + +## max_backups_io_thread_pool_free_size + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—IOスレッドプール内ã®**アイドル**スレッド数ãŒ`max_backup_io_thread_pool_free_size`を超ãˆã‚‹å ´åˆã€ClickHouseã¯ã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã®ã‚¹ãƒ¬ãƒƒãƒ‰ãŒå ã‚ã¦ã„るリソースを解放ã—ã€ãƒ—ールサイズを減少ã•ã›ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’å†ä½œæˆã§ãã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 0 + +## max_backups_io_thread_pool_size + +BACKUPクエリã®ãŸã‚ã®IOæ“作ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•° + +タイプ: UInt64 + +デフォルト: 1000 + +## max_concurrent_queries + +åŒæ™‚ã«å®Ÿè¡Œã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã®ç·æ•°ã®åˆ¶é™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚挿入ãŠã‚ˆã³é¸æŠžã‚¯ã‚¨ãƒªã®åˆ¶é™ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®æœ€å¤§ã‚¯ã‚¨ãƒªæ•°ã®åˆ¶é™ã‚‚考慮ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚max_concurrent_insert_queries, max_concurrent_select_queries, max_concurrent_queries_for_all_usersã‚‚å‚ç…§ã—ã¦ãã ã•ã„。ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯å®Ÿè¡Œæ™‚ã«å¤‰æ›´å¯èƒ½ã§ã€ã™ãã«é©ç”¨ã•ã‚Œã¾ã™ã€‚æ—¢ã«å®Ÿè¡Œä¸­ã®ã‚¯ã‚¨ãƒªã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。 +::: + +タイプ: UInt64 + +デフォルト: 0 + +## max_concurrent_insert_queries + +åŒæ™‚ã«å®Ÿè¡Œã•ã‚Œã‚‹æŒ¿å…¥ã‚¯ã‚¨ãƒªã®ç·æ•°ã®åˆ¶é™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯å®Ÿè¡Œæ™‚ã«å¤‰æ›´å¯èƒ½ã§ã€ã™ãã«é©ç”¨ã•ã‚Œã¾ã™ã€‚æ—¢ã«å®Ÿè¡Œä¸­ã®ã‚¯ã‚¨ãƒªã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。 +::: + +タイプ: UInt64 + +デフォルト: 0 + +## max_concurrent_select_queries + +åŒæ™‚ã«å®Ÿè¡Œã•ã‚Œã‚‹é¸æŠžã‚¯ã‚¨ãƒªã®ç·æ•°ã®åˆ¶é™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯å®Ÿè¡Œæ™‚ã«å¤‰æ›´å¯èƒ½ã§ã€ã™ãã«é©ç”¨ã•ã‚Œã¾ã™ã€‚æ—¢ã«å®Ÿè¡Œä¸­ã®ã‚¯ã‚¨ãƒªã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。 +::: + +タイプ: UInt64 + +デフォルト: 0 + +## max_waiting_queries + +åŒæ™‚待機クエリã®ç·æ•°ã®åˆ¶é™ã€‚待機中ã®ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã¯ã€å¿…è¦ãªãƒ†ãƒ¼ãƒ–ルãŒéžåŒæœŸã«èª­ã¿è¾¼ã¾ã‚Œã‚‹é–“(`async_load_databases`ã‚’å‚照)ブロックã•ã‚Œã¾ã™ã€‚待機中ã®ã‚¯ã‚¨ãƒªã¯ã€`max_concurrent_queries`ã€`max_concurrent_insert_queries`ã€`max_concurrent_select_queries`ã€`max_concurrent_queries_for_user`ã€`max_concurrent_queries_for_all_users`ã®åˆ¶é™ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹éš›ã«ã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã›ã‚“。ã“ã®ä¿®æ­£ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®èµ·å‹•ç›´å¾Œã«ã“れらã®åˆ¶é™ã«é”ã™ã‚‹ã“ã¨ã‚’é¿ã‘ã‚‹ãŸã‚ã«è¡Œã‚ã‚Œã¾ã™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯å®Ÿè¡Œæ™‚ã«å¤‰æ›´å¯èƒ½ã§ã€ã™ãã«é©ç”¨ã•ã‚Œã¾ã™ã€‚æ—¢ã«å®Ÿè¡Œä¸­ã®ã‚¯ã‚¨ãƒªã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。 +::: + +タイプ: UInt64 + +デフォルト: 0 + +## max_connections + +サーãƒãƒ¼ã®æœ€å¤§æŽ¥ç¶šæ•°ã€‚ + +タイプ: Int32 + +デフォルト: 1024 + +## max_io_thread_pool_free_size + +IOスレッドプールã®æœ€å¤§ãƒ•ãƒªãƒ¼ã‚µã‚¤ã‚ºã€‚ + +タイプ: UInt64 + +デフォルト: 0 + +## max_io_thread_pool_size + +IOæ“作ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•° + +タイプ: UInt64 + +デフォルト: 100 + +## max_local_read_bandwidth_for_server + +ローカル読ã¿å–ã‚Šã®æœ€å¤§é€Ÿåº¦ï¼ˆ1秒ã‚ãŸã‚Šã®ãƒã‚¤ãƒˆæ•°ï¼‰ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 0 + +## max_local_write_bandwidth_for_server + +ローカル書ãè¾¼ã¿ã®æœ€å¤§é€Ÿåº¦ï¼ˆ1秒ã‚ãŸã‚Šã®ãƒã‚¤ãƒˆæ•°ï¼‰ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 0 + +## max_partition_size_to_drop + +パーティション削除ã®åˆ¶é™ã€‚ + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md)テーブルã®ã‚µã‚¤ã‚ºãŒ`max_partition_size_to_drop`(ãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’超ãˆã‚‹å ´åˆã€[DROP PARTITION](../../sql-reference/statements/alter/partition.md#drop-partitionpart)クエリを使用ã—ã¦ãƒ‘ーティションを削除ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã“ã®è¨­å®šã¯é©ç”¨ã™ã‚‹ãŸã‚ã«ClickHouseサーãƒãƒ¼ã®å†èµ·å‹•ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“。もã†ä¸€ã¤ã®åˆ¶é™ã‚’解除ã™ã‚‹æ–¹æ³•ã¯ã€`/flags/force_drop_table`ファイルを作æˆã™ã‚‹ã“ã¨ã§ã™ã€‚デフォルト値: 50 GB。値ãŒ0ã®å ´åˆã€åˆ¶é™ãªã—ã§ãƒ‘ーティションを削除ã§ãã¾ã™ã€‚ + +:::note +ã“ã®åˆ¶é™ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®å‰Šé™¤ã‚„テーブルã®åˆ‡ã‚Šæ¨ã¦ã‚’制é™ã—ã¾ã›ã‚“。詳細ã¯[max_table_size_to_drop](#max-table-size-to-drop)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## max_remote_read_network_bandwidth_for_server + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯çµŒç”±ã§ã®ãƒ‡ãƒ¼ã‚¿äº¤æ›ã®æœ€å¤§é€Ÿåº¦ï¼ˆãƒã‚¤ãƒˆæ¯Žç§’)ã§ã®èª­ã¿å–り。ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 0 + +## max_remote_write_network_bandwidth_for_server + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯çµŒç”±ã§ã®ãƒ‡ãƒ¼ã‚¿äº¤æ›ã®æœ€å¤§é€Ÿåº¦ï¼ˆãƒã‚¤ãƒˆæ¯Žç§’)ã§ã®æ›¸ãè¾¼ã¿ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 0 + +## max_server_memory_usage + +サーãƒãƒ¼å…¨ä½“ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã®åˆ¶é™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +デフォルトã®`max_server_memory_usage`値ã¯`memory_amount * max_server_memory_usage_to_ram_ratio`ã¨ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 0 + +## max_server_memory_usage_to_ram_ratio + +max_server_memory_usageã¨åŒã˜ã§ã™ãŒã€ç‰©ç†RAMã«å¯¾ã™ã‚‹æ¯”率ã§è¨­å®šã—ã¾ã™ã€‚低メモリシステムã§ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨çŽ‡ã‚’下ã’ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +RAMã¨ã‚¹ãƒ¯ãƒƒãƒ—ãŒä½Žã„ホストã§ã¯ã€`max_server_memory_usage_to_ram_ratio`ã‚’1より大ãã設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +タイプ: Double + +デフォルト: 0.9 + +## max_build_vector_similarity_index_thread_pool_size {#server_configuration_parameters_max_build_vector_similarity_index_thread_pool_size} + +ベクトルインデックスã®æ§‹ç¯‰ã«ä½¿ç”¨ã™ã‚‹æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚0ã¯ã™ã¹ã¦ã®ã‚³ã‚¢ã‚’æ„味ã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 16 + +## cgroups_memory_usage_observer_wait_time + +cgroupsã®ã—ãã„値ã§ã‚µãƒ¼ãƒãƒ¼ã®æœ€å¤§è¨±å®¹ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚’調整ã™ã‚‹é–“隔(秒å˜ä½ï¼‰ã€‚ (`cgroup_memory_watcher_hard_limit_ratio`ã¨`cgroup_memory_watcher_soft_limit_ratio` ã®è¨­å®šã‚’å‚照)。 + +cgroupオブザーãƒãƒ¼ã‚’無効ã«ã™ã‚‹ã«ã¯ã€ã“ã®å€¤ã‚’`0`ã«è¨­å®šã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 15 + +## cgroup_memory_watcher_hard_limit_ratio + +cgroupsã«å¾“ã£ãŸã‚µãƒ¼ãƒãƒ¼ãƒ—ロセスã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã«é–¢ã™ã‚‹ã€Œãƒãƒ¼ãƒ‰ã€ã—ãã„値を指定ã—ã¾ã™ã€‚ã“ã®ã—ãã„値を超ãˆã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã®æœ€å¤§ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ãŒã—ãã„値ã®å€¤ã«èª¿æ•´ã•ã‚Œã¾ã™ã€‚ + +`cgroups_memory_usage_observer_wait_time`ãŠã‚ˆã³`cgroup_memory_watcher_soft_limit_ratio`ã®è¨­å®šã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +タイプ: Double + +デフォルト: 0.95 + +## cgroup_memory_watcher_soft_limit_ratio + +cgroupsã«å¾“ã£ãŸã‚µãƒ¼ãƒãƒ¼ãƒ—ロセスã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã«é–¢ã™ã‚‹ã€Œã‚½ãƒ•ãƒˆã€ã—ãã„値を指定ã—ã€jemallocã®ã‚¢ãƒªãƒ¼ãƒŠã‚’パージã—ã¾ã™ã€‚ + +`cgroups_memory_usage_observer_wait_time`ã¨`cgroup_memory_watcher_hard_limit_ratio`ã®è¨­å®šã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +タイプ: Double + +デフォルト: 0.9 + +## max_table_size_to_drop + +テーブル削除ã®åˆ¶é™ã€‚ + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md)テーブルã®ã‚µã‚¤ã‚ºãŒ`max_table_size_to_drop`(ãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’超ãˆã‚‹å ´åˆã€[DROP](../../sql-reference/statements/drop.md)クエリや[TRUNCATE](../../sql-reference/statements/truncate.md)クエリを使用ã—ã¦å‰Šé™¤ã§ãã¾ã›ã‚“。 + +ã“ã®è¨­å®šã¯é©ç”¨ã™ã‚‹ãŸã‚ã«ClickHouseサーãƒãƒ¼ã®å†èµ·å‹•ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“。もã†ä¸€ã¤ã®åˆ¶é™ã‚’解除ã™ã‚‹æ–¹æ³•ã¯ã€`/flags/force_drop_table`ファイルを作æˆã™ã‚‹ã“ã¨ã§ã™ã€‚ + +デフォルト値: 50 GB。値ãŒ0ã®å ´åˆã€ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルを制é™ãªã—ã§å‰Šé™¤ã§ãã¾ã™ã€‚ +**例** +``` xml +0 +``` + +## max\_database\_num\_to\_warn {#max-database-num-to-warn} +アタッãƒã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®æ•°ãŒæŒ‡å®šã•ã‚ŒãŸå€¤ã‚’超ãˆãŸå ´åˆã€clickhouseサーãƒãƒ¼ã¯`system.warnings`テーブルã«è­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’追加ã—ã¾ã™ã€‚ +デフォルト値: 1000 + +**例** + +``` xml +50 +``` + +## max\_table\_num\_to\_warn {#max-table-num-to-warn} +アタッãƒã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®æ•°ãŒæŒ‡å®šã•ã‚ŒãŸå€¤ã‚’超ãˆãŸå ´åˆã€clickhouseサーãƒãƒ¼ã¯`system.warnings`テーブルã«è­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’追加ã—ã¾ã™ã€‚ +デフォルト値: 5000 + +**例** + +``` xml +400 +``` + +## max\_view\_num\_to\_warn {#max-view-num-to-warn} +アタッãƒã•ã‚ŒãŸãƒ“ューã®æ•°ãŒæŒ‡å®šã•ã‚ŒãŸå€¤ã‚’超ãˆãŸå ´åˆã€clickhouseサーãƒãƒ¼ã¯`system.warnings`テーブルã«è­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’追加ã—ã¾ã™ã€‚ +デフォルト値: 10000 + +**例** + +``` xml +400 +``` + +## max\_dictionary\_num\_to\_warn {#max-dictionary-num-to-warn} +アタッãƒã•ã‚ŒãŸãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®æ•°ãŒæŒ‡å®šã•ã‚ŒãŸå€¤ã‚’超ãˆãŸå ´åˆã€clickhouseサーãƒãƒ¼ã¯`system.warnings`テーブルã«è­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’追加ã—ã¾ã™ã€‚ +デフォルト値: 1000 + +**例** + +``` xml +400 +``` + +## max\_part\_num\_to\_warn {#max-part-num-to-warn} +アクティブパーツã®æ•°ãŒæŒ‡å®šã•ã‚ŒãŸå€¤ã‚’超ãˆãŸå ´åˆã€clickhouseサーãƒãƒ¼ã¯`system.warnings`テーブルã«è­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’追加ã—ã¾ã™ã€‚ +デフォルト値: 100000 + +**例** + +``` xml +400 +``` + +## max\_table\_num\_to\_throw {#max-table-num-to-throw} +テーブルã®æ•°ãŒã“ã®å€¤ã‚’超ãˆã‚‹å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚0ã¯åˆ¶é™ãŒãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ビューã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ†ãƒ¼ãƒ–ルã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã¯ã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã›ã‚“。Atomic/Ordinary/Replicated/Lazyデータベースエンジンã®ãƒ†ãƒ¼ãƒ–ルã ã‘ãŒã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã™ã€‚デフォルト値: 0 + +**例** +```xml +400 +``` + +## max\_database\_num\_to\_throw {#max-table-num-to-throw} +データベースã®æ•°ãŒã“ã®å€¤ã‚’超ãˆã‚‹å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚0ã¯åˆ¶é™ãŒãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +デフォルト値: 0 + +**例** +```xml +400 +``` + +## max_temporary_data_on_disk_size + +外部集計ã€çµåˆã€ã¾ãŸã¯ã‚½ãƒ¼ãƒˆã«ä½¿ç”¨ã§ãる最大ストレージé‡ã€‚ +ã“ã®åˆ¶é™ã‚’超ãˆãŸã‚¯ã‚¨ãƒªã¯ä¾‹å¤–ã§å¤±æ•—ã—ã¾ã™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +`max_temporary_data_on_disk_size_for_user`ã‚„`max_temporary_data_on_disk_size_for_query`ã‚‚å‚照。 + +タイプ: UInt64 + +デフォルト: 0 + +## max_thread_pool_free_size + +グローãƒãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã®**アイドル**スレッド数ãŒ`max_thread_pool_free_size`を超ãˆã‚‹å ´åˆã€ClickHouseã¯ä¸€éƒ¨ã®ã‚¹ãƒ¬ãƒƒãƒ‰ãŒå ã‚ã¦ã„るリソースを解放ã—ã€ãƒ—ールサイズを減少ã•ã›ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’å†ä½œæˆã§ãã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 1000 + +## max_thread_pool_size + +OSã‹ã‚‰å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚„ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作ã«ä½¿ç”¨ã§ãる最大スレッド数。 + +タイプ: UInt64 + +デフォルト: 10000 + +## mmap_cache_size + +マップã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’設定ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯é »ç¹ãªé–‹é–‰å‘¼ã³å‡ºã—(ãã‚Œã«ä¼´ã†ãƒšãƒ¼ã‚¸ãƒ•ã‚©ãƒ¼ãƒ«ãƒˆã®ãŸã‚éžå¸¸ã«é«˜ä¾¡ï¼‰ã‚’回é¿ã—ã€è¤‡æ•°ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚„クエリã‹ã‚‰ã®ãƒžãƒƒãƒ”ングをå†åˆ©ç”¨ã§ãã¾ã™ã€‚設定値ã¯ãƒžãƒƒãƒ—ã•ã‚ŒãŸé ˜åŸŸã®æ•°ã§ã™ï¼ˆé€šå¸¸ã¯ãƒžãƒƒãƒ—ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã«ç­‰ã—ã„)。マップã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ãƒ‡ãƒ¼ã‚¿ã®é‡ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル`system.metrics`ã¨`system.metric_log`ã§`MMappedFiles`ã¨`MMappedFileBytes`メトリクスã§ãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚°ã§ãã¾ã™ã€‚ã¾ãŸã€`system.asynchronous_metrics`ã¨`system.asynchronous_metrics_log`ã§`MMapCacheCells`メトリクスã€`system.events`ã€`system.processes`ã€`system.query_log`ã€`system.query_thread_log`ã€`system.query_views_log`ã§`CreatedReadBufferMMap`ã€`CreatedReadBufferMMapFailed`ã€`MMappedFileCacheHits`ã€`MMappedFileCacheMisses`イベントã§ã‚‚モニタリングã§ãã¾ã™ã€‚ + +注æ„: マップã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ãƒ‡ãƒ¼ã‚¿é‡ã¯ãƒ¡ãƒ¢ãƒªã‚’直接消費ã›ãšã€ã‚¯ã‚¨ãƒªã‚„サーãƒãƒ¼ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã«ã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯OSページキャッシュã¨åŒæ§˜ã«ç ´æ£„å¯èƒ½ãªãŸã‚ã§ã™ã€‚キャッシュã¯ã€MergeTreeファミリーã®ãƒ†ãƒ¼ãƒ–ル内ã®å¤ã„パーツãŒå‰Šé™¤ã•ã‚Œã‚‹ã¨è‡ªå‹•çš„ã«å‰Šé™¤ã•ã‚Œã€`SYSTEM DROP MMAP CACHE`クエリã§æ‰‹å‹•ã§å‰Šé™¤ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯å®Ÿè¡Œæ™‚ã«å¤‰æ›´å¯èƒ½ã§ã€ã™ãã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +タイプ: UInt64 + +デフォルト: 1000 + +## restore_threads + +RESTOREリクエストを実行ã™ã‚‹ãŸã‚ã®æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +タイプ: UInt64 + +デフォルト: 16 + +## show_addresses_in_stack_traces + +真ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã§ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’表示ã—ã¾ã™ + +タイプ: Bool + +デフォルト: 1 + +## shutdown_wait_unfinished_queries + +真ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ã‚·ãƒ£ãƒƒãƒˆãƒ€ã‚¦ãƒ³å‰ã«å®Ÿè¡Œä¸­ã®ã‚¯ã‚¨ãƒªãŒçµ‚了ã™ã‚‹ã®ã‚’å¾…ã¡ã¾ã™ã€‚ + +タイプ: Bool + +デフォルト: 0 + +## temporary_data_in_cache + +ã“ã®ã‚ªãƒ—ションã«ã‚ˆã‚Šã€ä¸€æ™‚データã¯ç‰¹å®šã®ãƒ‡ã‚£ã‚¹ã‚¯ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥å†…ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€ã‚¿ã‚¤ãƒ—ãŒ`cache`ã®ãƒ‡ã‚£ã‚¹ã‚¯åを指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã®å ´åˆã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¨ä¸€æ™‚データã¯åŒã˜ã‚¹ãƒšãƒ¼ã‚¹ã‚’共有ã—ã€ä¸€æ™‚データを作æˆã™ã‚‹ãŸã‚ã«ãƒ‡ã‚£ã‚¹ã‚¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’退é¿ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +一時データストレージを構æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãるオプションã¯ã€`tmp_path` ã€`tmp_policy` ã€`temporary_data_in_cache` ã®ã„ãšã‚Œã‹ã®ä¸€ã¤ã®ã¿ã§ã™ã€‚ +::: + +**例** + +`local_disk`用ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¨ä¸€æ™‚データã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ä¸Šã®`/tiny_local_cache`ã«ä¿å­˜ã•ã‚Œã€`tiny_local_cache`ã§ç®¡ç†ã•ã‚Œã¾ã™ã€‚ + +```xml + + + + + local + /local_disk/ + + + + + cache + local_disk + /tiny_local_cache/ + 10M + 1M + 1 + + + + + + + tiny_local_cache + + +``` + +タイプ: String + +デフォルト: + +## thread_pool_queue_size + +グローãƒãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã§ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ãるジョブã®æœ€å¤§æ•°ã€‚キューサイズを増やã™ã¨ã€ã‚ˆã‚Šå¤šãã®ãƒ¡ãƒ¢ãƒªãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®å€¤ã‚’`max_thread_pool_size`ã¨ç­‰ã—ãä¿ã¤ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト: 10000 + +## tmp_policy + +一時データをå«ã‚€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ãƒãƒªã‚·ãƒ¼ã€‚MergeTreeテーブルエンジンã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +:::note +- 一時データストレージを構æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãるオプションã¯ã€`tmp_path` ã€`tmp_policy` ã€`temporary_data_in_cache` ã®ã„ãšã‚Œã‹ã®ä¸€ã¤ã®ã¿ã§ã™ã€‚ +- `move_factor`ã€`keep_free_space_bytes`ã€`max_data_part_size_bytes`ãªã©ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +- ãƒãƒªã‚·ãƒ¼ã«ã¯æ­£ç¢ºã«*1ã¤ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ *ã¨*ローカル*ディスクをå«ã‚€ã¹ãã§ã™ã€‚ +::: + +**例** + +`/disk1`ãŒæº€æ¯ã«ãªã‚‹ã¨ã€ä¸€æ™‚データã¯`/disk2`ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +```xml + + + + + /disk1/ + + + /disk2/ + + + + + + + +
    + disk1 + disk2 +
    +
    +
    + +
    +
    + + + tmp_two_disks + +
    +``` +タイプ: String + +デフォルト: + +## uncompressed_cache_policy + +éžåœ§ç¸®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒãƒªã‚·ãƒ¼å。 + +タイプ: String + +デフォルト: SLRU + +## uncompressed_cache_size + +MergeTreeファミリーã®ãƒ†ãƒ¼ãƒ–ルエンジンã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã‚‹éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ゼロã¯ç„¡åŠ¹ã‚’æ„味ã—ã¾ã™ã€‚ + +サーãƒãƒ¼ã«ã¯1ã¤ã®å…±æœ‰ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒã‚ã‚Šã¾ã™ã€‚メモリã¯ã‚ªãƒ³ãƒ‡ãƒžãƒ³ãƒ‰ã§å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚キャッシュã¯ã€ã‚ªãƒ—ションuse_uncompressed_cacheãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +éžå¸¸ã«çŸ­ã„クエリã«å¯¾ã—ã¦å€‹åˆ¥ã®ã‚±ãƒ¼ã‚¹ã§éžåœ§ç¸®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒæœ‰åˆ©ã§ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯å®Ÿè¡Œæ™‚ã«å¤‰æ›´å¯èƒ½ã§ã€ã™ãã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +タイプ: UInt64 + +デフォルト: 0 + +## uncompressed_cache_size_ratio + +キャッシュã®åˆè¨ˆã‚µã‚¤ã‚ºã«å¯¾ã™ã‚‹éžåœ§ç¸®ã‚­ãƒ£ãƒƒã‚·ãƒ¥å†…ã®ä¿è­·ã•ã‚ŒãŸã‚­ãƒ¥ãƒ¼ã®ã‚µã‚¤ã‚ºã€‚ + +タイプ: Double + +デフォルト: 0.5 + +## builtin_dictionaries_reload_interval {#builtin-dictionaries-reload-interval} + +組ã¿è¾¼ã¿ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’å†èª­ã¿è¾¼ã¿ã™ã‚‹å‰ã®é–“隔(秒å˜ä½ï¼‰ã€‚ + +ClickHouseã¯æŒ‡å®šã•ã‚ŒãŸç§’æ•°ã”ã¨ã«çµ„ã¿è¾¼ã¿ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’å†èª­ã¿è¾¼ã¿ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹ã“ã¨ãªãディクショナリを「オンザフライã€ã§ç·¨é›†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +デフォルト値: 3600。 + +**例** + +```xml +3600 +``` + +## compression {#server-settings-compression} + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md)-エンジンテーブルã®ãƒ‡ãƒ¼ã‚¿åœ§ç¸®è¨­å®šã€‚ + +:::note +ClickHouseを使ã„始ã‚ãŸã°ã‹ã‚Šã®å ´åˆã¯ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 +::: + +設定テンプレート: + +```xml + + + ... + ... + ... + ... + + ... + +``` + +``フィールド: + +- `min_part_size` – データパートã®æœ€å°ã‚µã‚¤ã‚ºã€‚ +- `min_part_size_ratio` – データパートã®ã‚µã‚¤ã‚ºã¨ãƒ†ãƒ¼ãƒ–ルサイズã®æ¯”率。 +- `method` – 圧縮方法。許å¯ã•ã‚Œã‚‹å€¤ã¯: `lz4`, `lz4hc`, `zstd`,`deflate_qpl`. +- `level` – 圧縮レベル。[Codecs](../../sql-reference/statements/create/table.md#create-query-general-purpose-codecs)ã‚’å‚照。 + +複数ã®``セクションを設定ã§ãã¾ã™ã€‚ + +æ¡ä»¶ãŒæº€ãŸã•ã‚ŒãŸå ´åˆã®å‹•ä½œ: + +- データパートãŒæ¡ä»¶ã‚»ãƒƒãƒˆã¨ä¸€è‡´ã™ã‚‹å ´åˆã€ClickHouseã¯æŒ‡å®šã•ã‚ŒãŸåœ§ç¸®æ–¹æ³•ã‚’使用ã—ã¾ã™ã€‚ +- データパートãŒè¤‡æ•°ã®æ¡ä»¶ã‚»ãƒƒãƒˆã¨ä¸€è‡´ã™ã‚‹å ´åˆã€ClickHouseã¯æœ€åˆã«ä¸€è‡´ã—ãŸæ¡ä»¶ã‚»ãƒƒãƒˆã‚’使用ã—ã¾ã™ã€‚ + +データパートã«å¯¾ã™ã‚‹æ¡ä»¶ãŒæº€ãŸã•ã‚Œãªã„å ´åˆã€ClickHouseã¯`lz4`圧縮を使用ã—ã¾ã™ã€‚ + +**例** + +```xml + + + 10000000000 + 0.01 + zstd + 1 + + +``` + +## encryption {#server-settings-encryption} + +[æš—å·åŒ–コーデック](../../sql-reference/statements/create/table.md#create-query-encryption-codecs)ã§ä½¿ç”¨ã™ã‚‹ã‚­ãƒ¼ã‚’å–å¾—ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’構æˆã—ã¾ã™ã€‚キー(ã¾ãŸã¯ã‚­ãƒ¼ï¼‰ã¯ã€ç’°å¢ƒå¤‰æ•°ã«æ›¸ã込むã‹ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +キーã¯16ãƒã‚¤ãƒˆã®é•·ã•ã®16進数ã¾ãŸã¯æ–‡å­—列ã«ã§ãã¾ã™ã€‚ + +**例** + +設定ã‹ã‚‰èª­ã¿è¾¼ã¿: + +```xml + + + 1234567812345678 + + +``` + +:::note +設定ファイルã«ã‚­ãƒ¼ã‚’æ ¼ç´ã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯å®‰å…¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“。éµã‚’安全ãªãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®åˆ¥ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«ç§»å‹•ã—ã€ãã‚Œã«å¯¾ã™ã‚‹ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ãƒªãƒ³ã‚¯ã‚’`config.d/`フォルダーã«ç½®ãã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。 +::: + +16進数ã®ã‚­ãƒ¼ã‚’設定ã‹ã‚‰èª­ã¿è¾¼ã‚€å ´åˆ: + +```xml + + + 00112233445566778899aabbccddeeff + + +``` + +環境変数ã‹ã‚‰ã‚­ãƒ¼ã‚’読ã¿è¾¼ã‚€å ´åˆ: + +```xml + + + + + +``` + +ã“ã“ã§`current_key_id`ã¯æš—å·åŒ–ã®ãŸã‚ã®ç¾åœ¨ã®ã‚­ãƒ¼ã‚’設定ã—ã€æŒ‡å®šã•ã‚ŒãŸã™ã¹ã¦ã®ã‚­ãƒ¼ãŒå¾©å·åŒ–ã«ä½¿ç”¨ã•ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“れらã®æ–¹æ³•ã®ãã‚Œãžã‚Œã¯ã€è¤‡æ•°ã®ã‚­ãƒ¼ã«ã‚‚é©ç”¨å¯èƒ½ã§ã™: + +```xml + + + 00112233445566778899aabbccddeeff + + 1 + + +``` + +ã“ã“ã§`current_key_id`ã¯æš—å·åŒ–ã®ãŸã‚ã®ç¾åœ¨ã®ã‚­ãƒ¼ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +ã¾ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯12ãƒã‚¤ãƒˆé•·ã®nonceを追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æš—å·åŒ–ãŠã‚ˆã³å¾©å·åŒ–プロセスã§ã¯ã‚¼ãƒ­ãƒã‚¤ãƒˆã§æ§‹æˆã•ã‚Œã‚‹nonceãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼‰: + +```xml + + + 012345678910 + + +``` + +ã¾ãŸã¯16進数ã§è¨­å®šã§ãã¾ã™: + +```xml + + + abcdefabcdef + + +``` + +上記ã®ã™ã¹ã¦ã®ã“ã¨ã¯ã€`aes_256_gcm_siv`ã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ï¼ˆãŸã ã—キーã¯32ãƒã‚¤ãƒˆé•·ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“)。 + +## error_log {#error_log} + +デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ + +**有効化** + +エラーログã®å±¥æ­´åŽé›†[`system.error_log`](../../operations/system-tables/error_log.md)を手動ã§ã‚ªãƒ³ã«ã™ã‚‹ã«ã¯ã€æ¬¡ã®å†…容ã§`/etc/clickhouse-server/config.d/error_log.xml`を作æˆã—ã¦ãã ã•ã„: + +```xml + + + system + error_log
    + 7500 + 1000 + 1048576 + 8192 + 524288 + false +
    +
    +``` + +**無効化** + +`error_log`設定を無効ã«ã™ã‚‹ã«ã¯ã€æ¬¡ã®å†…容ã§`/etc/clickhouse-server/config.d/disable_error_log.xml`を作æˆã—ã¦ãã ã•ã„: + +```xml + + + +``` + +## custom_settings_prefixes {#custom_settings_prefixes} + +[カスタム設定](../../operations/settings/index.md#custom_settings)ã®ãƒ—レフィックスã®ãƒªã‚¹ãƒˆã€‚プレフィックスã¯ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** + +```xml +custom_ +``` + +**関連項目** + +- [カスタム設定](../../operations/settings/index.md#custom_settings) + +## core_dump {#core_dump} + +コアダンプファイルサイズã®ã‚½ãƒ•ãƒˆãƒªãƒŸãƒƒãƒˆã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `1073741824` (1 GB)。 + +:::note +ãƒãƒ¼ãƒ‰ãƒªãƒŸãƒƒãƒˆã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ„ールを使用ã—ã¦è¨­å®šã•ã‚Œã¾ã™ +::: + +**例** + +```xml + + 1073741824 + +``` + +## database_atomic_delay_before_drop_table_sec {#database_atomic_delay_before_drop_table_sec} + +削除ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを[UNDROP](/docs/ja/sql-reference/statements/undrop.md)ステートメントを使用ã—ã¦å¾©å…ƒã§ãã‚‹ã¾ã§ã®é…延時間。ã“ã®è¨­å®šã¯`SYNC`モディファイア付ãã§`DROP TABLE`ãŒå®Ÿè¡Œã•ã‚ŒãŸå ´åˆã€ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + +デフォルト値: `480` (8分)。 + +## database_catalog_unused_dir_hide_timeout_sec {#database_catalog_unused_dir_hide_timeout_sec} + +`store/`ディレクトリã®ã‚¬ãƒ™ãƒ¼ã‚¸ã‚’クリーンアップã™ã‚‹ã‚¿ã‚¹ã‚¯ã®ãƒ‘ラメータ。 +ClickHouseサーãƒãƒ¼ã§ä½¿ç”¨ã•ã‚Œã¦ã„ãªã„サブディレクトリ㌠+最後ã«`database_catalog_unused_dir_hide_timeout_sec`秒ã®é–“ã«å¤‰æ›´ã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¿ã‚¹ã‚¯ã¯ +ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’「隠ã™ã€ï¼ˆã™ã¹ã¦ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’削除ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ï¼‰ã“ã¨ã‚’è¡Œã„ã¾ã™ã€‚ +`store/`内ã«ClickHouseサーãƒãƒ¼ãŒäºˆæœŸã—ãªã„ã“ã¨ã‚‚期待ã•ã‚Œã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ゼロã¯ã€Œå³æ™‚ã€ã‚’æ„味ã—ã¾ã™ã€‚ + +デフォルト値: `3600` (1時間)。 + +## database_catalog_unused_dir_rm_timeout_sec {#database_catalog_unused_dir_rm_timeout_sec} + +`store/`ディレクトリã®ã‚¬ãƒ™ãƒ¼ã‚¸ã‚’クリーンアップã™ã‚‹ã‚¿ã‚¹ã‚¯ã®ãƒ‘ラメータ。 +ClickHouseサーãƒãƒ¼ã§ä½¿ç”¨ã•ã‚Œã¦ãŠã‚‰ãšã€ä»¥å‰ã«ã€Œéš ã•ã‚ŒãŸã€ +(`database_catalog_unused_dir_hide_timeout_sec`ã‚’å‚照) +最後ã«`database_catalog_unused_dir_rm_timeout_sec`秒ã®é–“ã«å¤‰æ›´ã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¿ã‚¹ã‚¯ã¯ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’削除ã—ã¾ã™ã€‚ +`store/`内ã«ClickHouseサーãƒãƒ¼ãŒäºˆæœŸã—ãªã„ã“ã¨ã‚‚期待ã•ã‚Œã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ゼロã¯ã€Œæ±ºã—ã¦ã€ã‚’æ„味ã—ã¾ã™ã€‚ + +デフォルト値: `2592000` (30æ—¥)。 + +## database_catalog_unused_dir_cleanup_period_sec {#database_catalog_unused_dir_cleanup_period_sec} + +`store/`ディレクトリã®ã‚¬ãƒ™ãƒ¼ã‚¸ã‚’クリーンアップã™ã‚‹ã‚¿ã‚¹ã‚¯ã®ãƒ‘ラメータ。 +タスクã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°æœŸé–“を設定ã—ã¾ã™ã€‚ゼロã¯ã€Œæ±ºã—ã¦ã€ã‚’æ„味ã—ã¾ã™ã€‚ + +デフォルト値: `86400` (1æ—¥)。 + +## default_profile {#default-profile} + +デフォルトã®è¨­å®šãƒ—ロファイル。 + +設定プロファイルã¯ãƒ‘ラメータ`user_config`ã§æŒ‡å®šã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã«é…ç½®ã•ã‚Œã¾ã™ã€‚ + +**例** + +```xml +default +``` + +## default_replica_path {#default_replica_path} + +ZooKeeper内ã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒ‘ス。 + +**例** + +```xml +/clickhouse/tables/{uuid}/{shard} +``` + +## default_replica_name {#default_replica_name} + +ZooKeeper内ã®ãƒ¬ãƒ—リカå。 + +**例** + +```xml +{replica} +``` + +## dictionaries_config {#dictionaries_config} + +ディクショナリã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。 + +パス: + +- 絶対パスã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã®ç›¸å¯¾ãƒ‘スを指定ã—ã¦ãã ã•ã„。 +- パスã¯ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰\*ã¨?ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ + +「[ディクショナリ](../../sql-reference/dictionaries/index.md)ã€ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +**例** + +```xml +*_dictionary.xml +``` + +## user_defined_executable_functions_config {#user_defined_executable_functions_config} + +実行å¯èƒ½ãªãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。 + +パス: + +- 絶対パスã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã®ç›¸å¯¾ãƒ‘スを指定ã—ã¦ãã ã•ã„。 +- パスã¯ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰\*ã¨?ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ + +「[実行å¯èƒ½ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°](../../sql-reference/functions/index.md#executable-user-defined-functions)ã€ã€‚ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +**例** + +```xml +*_function.xml +``` + +## dictionaries_lazy_load {#dictionaries_lazy_load} + +ディクショナリã®é…延読ã¿è¾¼ã¿ã€‚ + +`true`ã®å ´åˆã€å„ディクショナリã¯åˆã‚ã¦ä½¿ç”¨ã•ã‚ŒãŸã¨ãã«èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚読ã¿è¾¼ã¿ãŒå¤±æ•—ã—ãŸå ´åˆã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’使用ã—ã¦ã„ãŸé–¢æ•°ãŒä¾‹å¤–をスローã—ã¾ã™ã€‚ + +`false`ã®å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯èµ·å‹•æ™‚ã«ã™ã¹ã¦ã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’読ã¿è¾¼ã¿ã¾ã™ã€‚ +サーãƒãƒ¼ã¯æŽ¥ç¶šã‚’å—ã‘ã‚‹å‰ã«ã™ã¹ã¦ã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªãŒèª­ã¿è¾¼ã¿ã‚’完了ã™ã‚‹ã¾ã§èµ·å‹•ã‚’å¾…ã¡ã¾ã™ +(例外: `wait_dictionaries_load_at_startup`ãŒ`false`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆ - 下記をå‚照)。 + +デフォルトã¯`true`ã§ã™ã€‚ + +**例** + +```xml +true +``` + +## format_schema_path {#format_schema_path} + +入力データã®ã‚¹ã‚­ãƒ¼ãƒ ã‚’å«ã‚€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¸ã®ãƒ‘スã€ä¾‹ãˆã°[CapnProto](../../interfaces/formats.md#capnproto)フォーマットã®ã‚¹ã‚­ãƒ¼ãƒžã€‚ + +**例** + +```xml + + format_schemas/ +``` + +## graphite {#graphite} + +データを[Graphite](https://github.com/graphite-project)ã«é€ä¿¡ã—ã¾ã™ã€‚ + +設定: + +- host – Graphiteサーãƒãƒ¼ã€‚ +- port – Graphiteサーãƒãƒ¼ã®ãƒãƒ¼ãƒˆã€‚ +- interval – é€ä¿¡ã®é–“隔(秒å˜ä½ï¼‰ã€‚ +- timeout – データé€ä¿¡ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’å˜ä½ï¼‰ã€‚ +- root_path – キーã®ãƒ—レフィックス。 +- metrics – [system.metrics](../../operations/system-tables/metrics.md#system_tables-metrics)テーブルã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã—ã¾ã™ã€‚ +- events – è¦å®šã•ã‚ŒãŸæœŸé–“ã®ãƒ‡ãƒ«ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’[system.events](../../operations/system-tables/events.md#system_tables-events)テーブルã‹ã‚‰é€ä¿¡ã—ã¾ã™ã€‚ +- events_cumulative – [system.events](../../operations/system-tables/events.md#system_tables-events)テーブルã‹ã‚‰ç´¯ç©ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã—ã¾ã™ã€‚ +- asynchronous_metrics – [system.asynchronous_metrics](../../operations/system-tables/asynchronous_metrics.md#system_tables-asynchronous_metrics)テーブルã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã—ã¾ã™ã€‚ + +複数ã®``å¥ã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’ç•°ãªã‚‹é–“éš”ã§é€ä¿¡ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**例** + +```xml + + localhost + 42000 + 0.1 + 60 + one_min + true + true + false + true + +``` + +## graphite_rollup {#graphite-rollup} + +Graphite用ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚¹ãƒªãƒ åŒ–ã®è¨­å®šã€‚ + +詳細ã«ã¤ã„ã¦ã¯ã€[GraphiteMergeTree](../../engines/table-engines/mergetree-family/graphitemergetree.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**例** + +```xml + + + max + + 0 + 60 + + + 3600 + 300 + + + 86400 + 3600 + + + +``` + +## http_port/https_port {#http-porthttps-port} + +サーãƒãƒ¼ã«HTTP(s)ã§æŽ¥ç¶šã™ã‚‹ãŸã‚ã®ãƒãƒ¼ãƒˆã€‚ + +`https_port`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€[openSSL](#openssl)を設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +`http_port`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šãŒç„¡åŠ¹ã«ãªã‚Šã¾ã™ï¼ˆè¨­å®šã•ã‚Œã¦ã„ã‚Œã°ï¼‰ã€‚ + +**例** + +```xml +9999 +``` + +## http_server_default_response {#http_server_default_response} + +ClickHouse HTTP(s)サーãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸéš›ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§è¡¨ç¤ºã•ã‚Œã‚‹ãƒšãƒ¼ã‚¸ã€‚ +デフォルト値ã¯ã€ŒOk.ã€ï¼ˆæ”¹è¡Œä»˜ã)。 + +**例** + +`http://localhost: http_port`ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã¨`https://tabix.io/`ã‚’é–‹ã。 + +```xml + +
    ]]> +
    +``` + +## hsts_max_age {#hsts-max-age} + +HSTSã®æœŸé™åˆ‡ã‚Œæ™‚間を秒å˜ä½ã§è¨­å®šã—ã¾ã™ã€‚デフォルト値ã¯0ã§ã€ClickHouseã¯HSTSを無効ã«ã—ã¦ã„ã¾ã™ã€‚æ­£ã®æ•°ã‚’設定ã™ã‚‹ã¨ã€HSTSãŒæœ‰åŠ¹ã«ãªã‚Šã€max-ageã¯è¨­å®šã•ã‚ŒãŸæ•°ã«ãªã‚Šã¾ã™ã€‚ + +**例** + +```xml +600000 +``` + +## mlock_executable {#mlock_executable} + +起動後ã«mlockallを実行ã—ã€æœ€åˆã®ã‚¯ã‚¨ãƒªã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã‚’低下ã•ã›ã€é«˜IOè² è·æ™‚ã«ClickHouse実行ファイルãŒãƒšãƒ¼ã‚¸ã‚¢ã‚¦ãƒˆã•ã‚Œã‚‹ã®ã‚’防ãŽã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ãŒã€èµ·å‹•æ™‚é–“ãŒæœ€å¤§ã§æ•°ç§’増加ã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ã“ã®ãƒ‘ラメータã¯ã€ŒCAP_IPC_LOCKã€èƒ½åŠ›ãŒãªã„ã¨æ©Ÿèƒ½ã—ã¾ã›ã‚“ã®ã§ã”注æ„ãã ã•ã„。 +**例** + +```xml +false +``` + +## include_from {#include_from} + +ç½®æ›ã‚’å«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。XMLãŠã‚ˆã³YAMLå½¢å¼ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +詳細ã«ã¤ã„ã¦ã¯ã€ã€Œ[設定ファイル](../../operations/configuration-files.md#configuration_files)ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**例** + +```xml +/etc/metrica.xml +``` + +## interserver_listen_host {#interserver-listen-host} + +ClickHouseサーãƒãƒ¼é–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’交æ›ã§ãるホストã®åˆ¶é™ã€‚ +KeeperãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ç•°ãªã‚‹Keeperインスタンス間ã®é€šä¿¡ã«ã‚‚åŒã˜åˆ¶é™ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ +デフォルト値ã¯`listen_host`設定ã¨ç­‰ã—ã„ã§ã™ã€‚ + +例: + +```xml +::ffff:a00:1 +10.0.0.1 +``` + +## interserver_http_port {#interserver-http-port} + +ClickHouseサーãƒãƒ¼é–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’交æ›ã™ã‚‹ãŸã‚ã®ãƒãƒ¼ãƒˆã€‚ + +**例** + +```xml +9009 +``` + +## interserver_http_host {#interserver-http-host} + +ä»–ã®ã‚µãƒ¼ãƒãƒ¼ãŒã“ã®ã‚µãƒ¼ãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãるホストå。 + +指定ã—ãªã„å ´åˆã¯ã€`hostname -f`コマンドã¨åŒã˜æ–¹æ³•ã§å®šç¾©ã•ã‚Œã¾ã™ã€‚ + +特定ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ã‹ã‚‰ã®åˆ‡ã‚Šé›¢ã—ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +**例** + +```xml +example.clickhouse.com +``` + +## interserver_https_port {#interserver-https-port} + +ClickHouseサーãƒãƒ¼é–“ã®ãƒ‡ãƒ¼ã‚¿äº¤æ›ç”¨ã®`HTTPS`ãƒãƒ¼ãƒˆã€‚ + +**例** + +```xml +9010 +``` + +## interserver_https_host {#interserver-https-host} + +`interserver_http_host`ã«é¡žä¼¼ã—ã¦ãŠã‚Šã€`HTTPS`を介ã—ã¦ä»–ã®ã‚µãƒ¼ãƒãƒ¼ãŒã“ã®ã‚µãƒ¼ãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãるホストåã§ã™ã€‚ + +**例** + +```xml +example.clickhouse.com +``` + +## interserver_http_credentials {#server-settings-interserver-http-credentials} + +[レプリケーション](../../engines/table-engines/mergetree-family/replication.md)ã®é–“ã«ä»–ã®ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワード。ã¾ãŸã€ã‚µãƒ¼ãƒãƒ¼ã¯ã“れらã®è³‡æ ¼æƒ…報を使用ã—ã¦ä»–ã®ãƒ¬ãƒ—リカをèªè¨¼ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€`interserver_http_credentials`ã¯ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å†…ã®ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +デフォルトã§`interserver_http_credentials`セクションãŒçœç•¥ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ¬ãƒ—リケーション中ã®èªè¨¼ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。 + +:::note +`interserver_http_credentials`設定ã¯ã€ClickHouseクライアントã®è³‡æ ¼æƒ…å ±[設定](../../interfaces/cli.md#configuration_files)ã«ã¯é–¢é€£ã—ã¾ã›ã‚“。 +::: + +:::note +ã“れらã®è³‡æ ¼æƒ…å ±ã¯ã€`HTTP`ãŠã‚ˆã³`HTTPS`を介ã—ãŸãƒ¬ãƒ—リケーションã«å…±é€šã§ã™ã€‚ +::: + +セクションã¯æ¬¡ã®ãƒ‘ラメータをå«ã¿ã¾ã™: + +- `user` — ユーザーå。 +- `password` — パスワード。 +- `allow_empty` — `true`ã®å ´åˆã€è³‡æ ¼æƒ…å ±ãŒè¨­å®šã•ã‚Œã¦ã„ã¦ã‚‚ã€ä»–ã®ãƒ¬ãƒ—リカãŒèªè¨¼ãªã—ã§æŽ¥ç¶šã™ã‚‹ã“ã¨ãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚`false`ã®å ´åˆã€èªè¨¼ãªã—ã®æŽ¥ç¶šã¯æ‹’å¦ã•ã‚Œã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- `old` — 資格情報を回転ã•ã›ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã‚‹å¤ã„`user`ã¨`password`ã‚’å«ã¿ã¾ã™ã€‚複数ã®`old`セクションを指定å¯èƒ½ã§ã™ã€‚ + +**資格情報ã®ãƒ­ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³** + +ClickHouseã¯ã™ã¹ã¦ã®ãƒ¬ãƒ—リカをåœæ­¢ã™ã‚‹ã“ã¨ãªãå‹•çš„ãªã‚¤ãƒ³ã‚¿ã‚µãƒ¼ãƒãƒ¼è³‡æ ¼æƒ…å ±ã®ãƒ­ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚資格情報ã¯æ•°ã‚¹ãƒ†ãƒƒãƒ—ã§å¤‰æ›´ã§ãã¾ã™ã€‚ + +èªè¨¼ã‚’有効ã«ã™ã‚‹ã«ã¯ã€`interserver_http_credentials.allow_empty`ã‚’`true`ã«è¨­å®šã—ã€è³‡æ ¼æƒ…報を追加ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€èªè¨¼ã‚ã‚ŠãŠã‚ˆã³ãªã—ã®æŽ¥ç¶šãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ + +```xml + + admin + 111 + true + +``` + +ã™ã¹ã¦ã®ãƒ¬ãƒ—リカを構æˆã—ãŸå¾Œã€`allow_empty`ã‚’`false`ã«è¨­å®šã™ã‚‹ã‹ã€ã“ã®è¨­å®šã‚’削除ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æ–°ã—ã„資格情報を使用ã—ãŸèªè¨¼ãŒå¿…é ˆã¨ãªã‚Šã¾ã™ã€‚ + +既存ã®è³‡æ ¼æƒ…報を変更ã™ã‚‹ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードを`interserver_http_credentials.old`セクションã«ç§»å‹•ã—ã€æ–°ã—ã„値ã§`user`ã¨`password`ã‚’æ›´æ–°ã—ã¾ã™ã€‚ã“ã®æ™‚点ã§ã€ã‚µãƒ¼ãƒãƒ¼ã¯æ–°ã—ã„資格情報を使用ã—ã¦ä»–ã®ãƒ¬ãƒ—リカã«æŽ¥ç¶šã—ã€æ–°ã—ã„資格情報ã¾ãŸã¯å¤ã„資格情報ã®ã„ãšã‚Œã‹ã§æŽ¥ç¶šã‚’å—ã‘入れã¾ã™ã€‚ + +```xml + + admin + 222 + + admin + 111 + + + temp + 000 + + +``` + +æ–°ã—ã„資格情報ãŒã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«é©ç”¨ã•ã‚ŒãŸã‚‰ã€å¤ã„資格情報を削除ã§ãã¾ã™ã€‚ + +## keep_alive_timeout {#keep-alive-timeout} + +ClickHouseãŒæŽ¥ç¶šã‚’é–‰ã˜ã‚‹å‰ã«ç€ä¿¡è¦æ±‚ã‚’å¾…æ©Ÿã™ã‚‹ç§’数。デフォルトã¯10秒ã§ã™ã€‚ + +**例** + +```xml +10 +``` + +## max_keep_alive_requests {#max-keep-alive-requests} + +1ã¤ã®ã‚­ãƒ¼ãƒ—アライブ接続を介ã—ã¦ã®æœ€å¤§ãƒªã‚¯ã‚¨ã‚¹ãƒˆæ•°ã€‚クリックãƒã‚¦ã‚¹ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦æŽ¥ç¶šãŒé–‰ã˜ã‚‰ã‚Œã‚‹ã¾ã§ã®æ•°ã€‚デフォルトã¯10000ã§ã™ã€‚ + +**例** + +```xml +10 +``` + +## listen_host {#listen_host} + +リクエストãŒæ¥ã‚‹ã“ã¨ãŒã§ãるホストã®åˆ¶é™ã€‚サーãƒãƒ¼ãŒã™ã¹ã¦ã«å¿œç­”ã™ã‚‹ãŸã‚ã«ã¯ã€`::`を指定ã—ã¦ãã ã•ã„。 + +例: + +```xml +::1 +127.0.0.1 +``` + +## listen_try {#listen_try} + +IPv6ã¾ãŸã¯IPv4ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãŒä½¿ç”¨ã§ããªã„å ´åˆã§ã‚‚ã€ãƒªã‚¹ãƒ³ã—よã†ã¨ã™ã‚‹éš›ã«ã‚µãƒ¼ãƒãƒ¼ãŒçµ‚了ã—ãªã„よã†ã«ã—ã¾ã™ã€‚ + +例: + +```xml +0 +``` + +## listen_reuse_port {#listen_reuse_port} + +複数ã®ã‚µãƒ¼ãƒãƒ¼ãŒåŒã˜ã‚¢ãƒ‰ãƒ¬ã‚¹:ãƒãƒ¼ãƒˆã§ãƒªã‚¹ãƒ³ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚リクエストã¯OSã«ã‚ˆã£ã¦ãƒ©ãƒ³ãƒ€ãƒ ãªã‚µãƒ¼ãƒãƒ¼ã«ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + +例: + +```xml +0 +``` + +## listen_backlog {#listen_backlog} + +リスンソケットã®ãƒãƒƒã‚¯ãƒ­ã‚°ï¼ˆä¿ç•™ä¸­ã®æŽ¥ç¶šã®ã‚­ãƒ¥ãƒ¼ã‚µã‚¤ã‚ºï¼‰ã€‚ + +デフォルト値: `4096`(linux [5.4+](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=19f92a030ca6d772ab44b22ee6a01378a8cb32d4)ã«æº–拠)。 + +通常ã€ã“ã®å€¤ã‚’変更ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。ãªãœãªã‚‰: +- デフォルト値ã¯å分大ãã〠+- クライアントã®æŽ¥ç¶šã‚’å—ã‘入れるãŸã‚ã«ã‚µãƒ¼ãƒãƒ¼ã«ã¯å€‹åˆ¥ã®ã‚¹ãƒ¬ãƒƒãƒ‰ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚ + +ã—ãŸãŒã£ã¦ã€ClickHouseサーãƒãƒ¼ã®å ´åˆã«`TcpExtListenOverflows`(`nstat`ã‹ã‚‰ï¼‰ãŒã‚¼ãƒ­ä»¥å¤–ã§ã€ã“ã®ã‚«ã‚¦ãƒ³ã‚¿ãŒæˆé•·ã—ã¦ã‚‚ã€ã“ã®å€¤ã‚’増やã™å¿…è¦ãŒã‚ã‚‹ã¨ã„ã†æ„味ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ãªãœãªã‚‰: +- 通常ã€4096ãŒå分ã§ãªã„å ´åˆã€ãã‚Œã¯å†…部ã®ClickHouseスケーリングå•é¡Œã‚’示ã—ã¦ãŠã‚Šã€å•é¡Œã‚’報告ã™ã‚‹æ–¹ãŒè‰¯ã„ã§ã™ã€‚ +- ãã®æ™‚点ã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã„ãªã„ã‹ã€åˆ‡æ–­ã•ã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ãã®å¾Œã«ã‚µãƒ¼ãƒãƒ¼ãŒã‚ˆã‚Šå¤šãã®æŽ¥ç¶šã‚’処ç†ã§ãã‚‹ã¨ã„ã†æ„味ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +例: + +```xml +4096 +``` + +## logger {#logger} + +ログメッセージã®ä½ç½®ã¨å½¢å¼ã€‚ + +キー: + +- `level` – ログレベル。許容ã•ã‚Œã‚‹å€¤: `none`(ログをオフã«ã—ã¾ã™ï¼‰ã€`fatal`ã€`critical`ã€`error`ã€`warning`ã€`notice`ã€`information`〠+ `debug`ã€`trace`ã€`test` +- `log` – ログファイルã¸ã®ãƒ‘ス。 +- `errorlog` – エラーログファイルã¸ã®ãƒ‘ス。 +- `size` – 回転ãƒãƒªã‚·ãƒ¼: ログファイルã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ログファイルサイズãŒã“ã®ã—ãã„値を超ãˆã‚‹ã¨ã€åå‰ãŒå¤‰æ›´ã•ã‚Œã¦ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã•ã‚Œã€æ–°ã—ã„ログファイルãŒä½œæˆã•ã‚Œã¾ã™ã€‚ +- `count` – 回転ãƒãƒªã‚·ãƒ¼: ClickHouseãŒä¿æŒã™ã‚‹éŽåŽ»ã®ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€å¤§æ•°ã€‚ +- `stream_compress` – ログメッセージをLZ4ã§åœ§ç¸®ã—ã¾ã™ã€‚有効ã«ã™ã‚‹ã«ã¯`1`ã¾ãŸã¯`true`を設定ã—ã¾ã™ã€‚ +- `console` – ログメッセージをログファイルã«æ›¸ãè¾¼ã¾ãšã€ä»£ã‚ã‚Šã«ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã«è¡¨ç¤ºã—ã¾ã™ã€‚有効ã«ã™ã‚‹ã«ã¯`1`ã¾ãŸã¯`true`を設定ã—ã¾ã™ã€‚デフォルト㯠+ ClickHouseãŒãƒ‡ãƒ¼ãƒ¢ãƒ³ãƒ¢ãƒ¼ãƒ‰ã§å®Ÿè¡Œã•ã‚Œã¦ã„ãªã„å ´åˆã«`1`ã§ã™ã€‚ãれ以外ã®å ´åˆã¯`0`。 +- `console_log_level` – コンソール出力ã®ãƒ­ã‚°ãƒ¬ãƒ™ãƒ«ã€‚`level`ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã—ã¾ã™ã€‚ +- `formatting` – コンソール出力ã®ãƒ­ã‚°å½¢å¼ã€‚ç¾åœ¨ã¯`json`ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +- `use_syslog` - ログ出力をsyslogã«ã‚‚転é€ã—ã¾ã™ã€‚ +- `syslog_level` - syslogã¸ã®ãƒ­ã‚°ã®ãƒ­ã‚°ãƒ¬ãƒ™ãƒ«ã€‚ +- `message_regexp` - ã“ã®æ­£è¦è¡¨ç¾ã«ä¸€è‡´ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ã¿ã‚’ログã«è¨˜éŒ²ã—ã¾ã™ã€‚デフォルトã¯`""`ã§ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ãªã—を示ã—ã¾ã™ã€‚ +- `message_regexp_negative` - ã“ã®æ­£è¦è¡¨ç¾ã«ä¸€è‡´ã—ãªã„メッセージã®ã¿ã‚’ログã«è¨˜éŒ²ã—ã¾ã™ã€‚デフォルトã¯`""`ã§ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ãªã—を示ã—ã¾ã™ã€‚ + +**ログ形å¼ã®æŒ‡å®šå­** + +`log`ãŠã‚ˆã³`errorLog`パス内ã®ãƒ•ã‚¡ã‚¤ãƒ«åã¯ã€ç”Ÿæˆã•ã‚Œã‚‹ãƒ•ã‚¡ã‚¤ãƒ«åã®ä¸‹ã®å½¢å¼æŒ‡å®šå­ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ï¼ˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªéƒ¨åˆ†ã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“)。 + +列「例ã€ã¯`2023-07-06 18:32:07`時点ã§ã®å‡ºåŠ›ã‚’示ã—ã¾ã™ã€‚ + +| æŒ‡å®šå­ | 説明 | 例 | +|-------------|---------------------------------------------------------------------------------------------------------------------|--------------------------| +| %% | リテラル% | % | +| %n | 改行文字 | | +| %t | 水平タブ文字 | | +| %Y | å¹´ã‚’10進数ã§è¡¨ã—ãŸã‚‚ã®, 例: 2017 | 2023 | +| %y | å¹´ã®æœ€å¾Œã®2æ¡ï¼ˆç¯„囲 [00,99]) | 23 | +| %C | å¹´ã®æœ€åˆã®2æ¡ï¼ˆç¯„囲 [00,99]) | 20 | +| %G | [ISO 8601週ベースã®å¹´](https://en.wikipedia.org/wiki/ISO_8601#Week_dates)ã®4æ¡, ã™ãªã‚ã¡æŒ‡å®šã•ã‚ŒãŸé€±ãŒå«ã¾ã‚Œã‚‹å¹´ã€‚通常%Vã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ | 2023 | +| %g | [ISO 8601週ベースã®å¹´](https://en.wikipedia.org/wiki/ISO_8601#Week_dates)ã®æœ€å¾Œã®2æ¡, ã™ãªã‚ã¡æŒ‡å®šã•ã‚ŒãŸé€±ãŒå«ã¾ã‚Œã‚‹å¹´ã€‚ | 23 | +| %b | 略称月å, 例: Oct(ロケールä¾å­˜ï¼‰ | Jul | +| %h | %bã®åŒç¾© | Jul | +| %B | 完全月å, 例: October(ロケールä¾å­˜ï¼‰ | July | +| %m | 月を10進数ã§è¡¨ã—ãŸã‚‚ã®ï¼ˆç¯„囲 [01,12]) | 07 | +| %U | å¹´ã®ã†ã¡ã®é€±ã‚’10進数ã§è¡¨ã—ãŸã‚‚ã®ï¼ˆé€±ã®æœ€åˆã®æ—¥ã¯æ—¥æ›œæ—¥ï¼‰ (範囲 [00,53]) | 27 | +| %W | å¹´ã®ã†ã¡ã®é€±ã‚’10進数ã§è¡¨ã—ãŸã‚‚ã®ï¼ˆé€±ã®æœ€åˆã®æ—¥ã¯æœˆæ›œæ—¥ï¼‰ (範囲 [00,53]) | 27 | +| %V | ISO 8601週番å·ï¼ˆç¯„囲 [01,53]) | 27 | +| %j | å¹´ã®ã†ã¡ã®1日を10進数ã§è¡¨ã—ãŸã‚‚ã®ï¼ˆç¯„囲 [001,366]) | 187 | +| %d | 月ã®1日を0パディングã•ã‚ŒãŸ10進数ã§è¡¨ã—ãŸã‚‚ã®ï¼ˆç¯„囲 [01,31])。1æ¡ã¯ã‚¼ãƒ­ã§å‰æ–¹åŸ‹ã‚ã•ã‚Œã¾ã™ã€‚ | 06 | +| %e | 月ã®1日をスペースã§ãƒ‘ディングã•ã‚ŒãŸ10進数ã§è¡¨ã—ãŸã‚‚ã®ï¼ˆç¯„囲 [1,31])。1æ¡ã¯ã‚¹ãƒšãƒ¼ã‚¹ã§å‰æ–¹åŸ‹ã‚ã•ã‚Œã¾ã™ã€‚ |   6 | +| %a | 略称曜日å, 例: Fri(ロケールä¾å­˜ï¼‰ | Thu | +| %A | 完全曜日å, 例: Friday(ロケールä¾å­˜ï¼‰ | Thursday | +| %w | 週ã®æ—¥ã‚’æ•´æ•°ã§è¡¨ã—ãŸã‚‚ã®ï¼ˆ0ãŒæ—¥æ›œæ—¥ï¼‰ (範囲 [0-6]) | 4 | +| %u | 週ã®æ—¥ã‚’10進数ã§è¡¨ã—ãŸã‚‚ã®ï¼ˆISO 8601フォーマット, 月曜日ãŒ1) (範囲 [1-7]) | 4 | +| %H | 時間を10進数ã§è¡¨ã—ãŸã‚‚ã® (24時間制)(範囲 [00-23]) | 18 | +| %I | 時間を10進数ã§è¡¨ã—ãŸã‚‚ã® (12時間制)(範囲 [01-12]) | 06 | +| %M | 分を10進数ã§è¡¨ã—ãŸã‚‚ã®ï¼ˆç¯„囲 [00-59]) | 32 | +| %S | 秒を10進数ã§è¡¨ã—ãŸã‚‚ã®ï¼ˆç¯„囲 [00-60]) | 07 | +| %c | 標準日付ã¨æ™‚間文字列ã€ä¾‹: Sun Oct 17 04:41:13 2010(ロケールä¾å­˜ï¼‰ | Thu Jul 6 18:32:07 2023 | +| %x | ローカライズã•ã‚ŒãŸæ—¥ä»˜è¡¨ç¾ï¼ˆãƒ­ã‚±ãƒ¼ãƒ«ä¾å­˜ï¼‰ | 07/06/23 | +| %X | ローカライズã•ã‚ŒãŸæ™‚刻表ç¾ã€ä¾‹: 18:40:20 ã‚‚ã—ã㯠6:40:20 PM(ロケールä¾å­˜ï¼‰ | 18:32:07 | +| %D | 短ã„å½¢å¼ã® MM/DD/YY 日付ã€%m/%d/%y ã¨åŒç­‰ | 07/06/23 | +| %F | 短ã„å½¢å¼ã® YYYY-MM-DD 日付ã€%Y-%m-%d ã¨åŒç­‰ | 2023-07-06 | +| %r | ローカライズã•ã‚ŒãŸ12時間形å¼ã®æ™‚刻(ロケールä¾å­˜ï¼‰ | 06:32:07 PM | +| %R | "%H:%M" ã«ç›¸å½“ | 18:32 | +| %T | "%H:%M:%S" ã«ç›¸å½“(ISO 8601時間形å¼ï¼‰ | 18:32:07 | +| %p | ローカライズã•ã‚ŒãŸåˆå‰åˆå¾Œã®æŒ‡å®šï¼ˆãƒ­ã‚±ãƒ¼ãƒ«ä¾å­˜ï¼‰ | PM | +| %z | ISO 8601å½¢å¼ã§UTCã‹ã‚‰ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆï¼ˆä¾‹: -0430)ã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³æƒ…å ±ãŒãªã„å ´åˆã¯æ–‡å­—ãªã— | +0800 | +| %Z | ロケールä¾å­˜ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³åã¾ãŸã¯ç•¥ç§°ã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³æƒ…å ±ãŒãªã„å ´åˆã¯æ–‡å­—ãªã— | Z AWST | + +**例** + +``` xml + + trace + /var/log/clickhouse-server/clickhouse-server-%F-%T.log + /var/log/clickhouse-server/clickhouse-server-%F-%T.err.log + 1000M + 10 + true + +``` + +ログメッセージをコンソールã«ã®ã¿å‡ºåŠ›ã™ã‚‹ã«ã¯: + +``` xml + + information + true + +``` + +**レベル別ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰** + +個々ã®ãƒ­ã‚°åã®ãƒ­ã‚°ãƒ¬ãƒ™ãƒ«ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã§ãã¾ã™ã€‚例ãˆã°ã€"Backup" 㨠"RBAC" ã®å…¨ã¦ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ミュートã«ã™ã‚‹ã«ã¯ã€‚ + +```xml + + + + Backup + none + + + RBAC + none + + + +``` + +**æ­£è¦è¡¨ç¾ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°** + +ログメッセージ㯠`message_regexp` 㨠`message_regexp_negative` を使用ã—ã¦æ­£è¦è¡¨ç¾ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã§ãã¾ã™ã€‚ã“れをレベルã”ã¨ã«ã€ã¾ãŸã¯å…¨ä½“ã¨ã—ã¦å®Ÿè¡Œã§ãã¾ã™ã€‚グローãƒãƒ«ã¨ãƒ­ã‚¬ãƒ¼å›ºæœ‰ã®ãƒ‘ターンãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ãƒ‘ターンãŒã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã•ã‚Œï¼ˆç„¡è¦–ã•ã‚Œï¼‰ã€ãƒ­ã‚¬ãƒ¼å›ºæœ‰ã®ãƒ‘ターンã®ã¿ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®çŠ¶æ³ã§ã¯ã€è‚¯å®šãƒ‘ターンã¨å¦å®šãƒ‘ターンã¯ç‹¬ç«‹ã—ã¦è€ƒæ…®ã•ã‚Œã¾ã™ã€‚注æ„: ã“ã®æ©Ÿèƒ½ã®ä½¿ç”¨ã¯è‹¥å¹²ã®ãƒ‘フォーマンス低下を引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +```xml + + trace + + .*Trace.* + + + + + executeQuery + .*Read.* + .*from.* + + + +``` + +### syslog + +ログメッセージを syslog ã«ã‚‚書ã込むã«ã¯: + +``` xml + + 1 + +
    syslog.remote:10514
    + myhost.local + LOG_LOCAL6 + syslog +
    +
    +``` + +`` ã®ã‚­ãƒ¼: + +- `address` — syslog ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã®å½¢å¼ `host\[:port\]` 。çœç•¥ã•ã‚ŒãŸå ´åˆã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ãƒ¼ãƒ¢ãƒ³ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- `hostname` — ログをé€ä¿¡ã™ã‚‹ãƒ›ã‚¹ãƒˆã®åå‰ã€‚オプション。 +- `facility` — syslog ã® [facility keyword](https://en.wikipedia.org/wiki/Syslog#Facility)。大文字㧠"LOG_" プレフィックス付ãã§æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例: `LOG_USER`, `LOG_DAEMON`, `LOG_LOCAL3` ãªã©ã€‚デフォルト値: `address` ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆ `LOG_USER`, 指定ã•ã‚Œãªã„å ´åˆ `LOG_DAEMON`。 +- `format` - ログメッセージã®å½¢å¼ã€‚使用å¯èƒ½ãªå€¤: `bsd` 㨠`syslog.` + +### ãƒ­ã‚°å½¢å¼ + +コンソールログã«å‡ºåŠ›ã•ã‚Œã‚‹ãƒ­ã‚°å½¢å¼ã‚’指定ã§ãã¾ã™ã€‚ç¾åœ¨ã€JSONã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚以下ã¯JSONログã®å‡ºåŠ›ä¾‹ã§ã™ã€‚ + +```json +{ + "date_time": "1650918987.180175", + "thread_name": "#1", + "thread_id": "254545", + "level": "Trace", + "query_id": "", + "logger_name": "BaseDaemon", + "message": "å—ä¿¡ã—ãŸä¿¡å· 2", + "source_file": "../base/daemon/BaseDaemon.cpp; virtual void SignalListener::run()", + "source_line": "192" +} +``` + +JSONロギングサãƒãƒ¼ãƒˆã‚’有効ã«ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚¹ãƒ‹ãƒšãƒƒãƒˆã‚’使用ã—ã¾ã™ã€‚ + +```xml + + + json + + date_time + thread_name + thread_id + level + query_id + logger_name + message + source_file + source_line + + + +``` + +**JSONログã®ã‚­ãƒ¼åã®å¤‰æ›´** + +キーåã¯ã€`` タグ内ã®ã‚¿ã‚°å€¤ã‚’変更ã™ã‚‹ã“ã¨ã§ä¿®æ­£ã§ãã¾ã™ã€‚例ãˆã°ã€`DATE_TIME` ã‚’ `MY_DATE_TIME` ã«å¤‰æ›´ã™ã‚‹ã«ã¯ã€`MY_DATE_TIME` を使用ã—ã¾ã™ã€‚ + +**JSONログã®ã‚­ãƒ¼ã®çœç•¥** + +ログプロパティã¯ã€ãƒ—ロパティをコメントアウトã™ã‚‹ã“ã¨ã§çœç•¥ã§ãã¾ã™ã€‚例ãˆã°ã€`query_id` をログã«å‡ºåŠ›ã—ãŸããªã„å ´åˆã€`` タグをコメントアウトã—ã¾ã™ã€‚ + +## send_crash_reports {#send_crash_reports} + +[Send] ClickHouse Core Developers Team via [Sentry](https://sentry.io)中ã®è¨­å®šã‚’使用ã—ã¦ã€ã‚¯ãƒ©ãƒƒã‚·ãƒ¥ãƒ¬ãƒãƒ¼ãƒˆã‚’オプトインã§é€ä¿¡ã™ã‚‹è¨­å®šã€‚ + +特ã«ãƒ—レプロダクション環境ã§ã®æœ‰åŠ¹åŒ–ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ãŒæ­£å¸¸ã«å‹•ä½œã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãŒIPv4を介ã—ã¦ãƒ‘ブリックインターãƒãƒƒãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆåŸ·ç­†æ™‚点ã§ã¯IPv6ã¯Sentryã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“)。 + +キー: + +- `enabled` – ã“ã®æ©Ÿèƒ½ã‚’有効ã«ã™ã‚‹ãŸã‚ã®ãƒ–ールフラグ。デフォルト㯠`false`。クラッシュレãƒãƒ¼ãƒˆã®é€ä¿¡ã‚’許å¯ã™ã‚‹ã«ã¯ `true` ã«è¨­å®šã—ã¾ã™ã€‚ +- `send_logical_errors` – `LOGICAL_ERROR` 㯠`assert` ã®ã‚ˆã†ãªã‚‚ã®ã§ã€ClickHouse ã®ãƒã‚°ã§ã™ã€‚ã“ã®ãƒ–ールフラグã¯ã“ã®ä¾‹å¤–ã‚’sentryã«é€ä¿¡ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: `false`)。 +- `endpoint` – クラッシュレãƒãƒ¼ãƒˆã‚’é€ä¿¡ã™ã‚‹ãŸã‚ã®sentryエンドãƒã‚¤ãƒ³ãƒˆURLをオーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã§ãã¾ã™ã€‚ã“ã‚Œã«ã¯å€‹åˆ¥ã®Sentryアカウントã¾ãŸã¯è‡ªå·±ãƒ›ã‚¹ãƒˆæ¸ˆã¿ã®Sentryインスタンスを使用ã§ãã¾ã™ã€‚ [Sentry DSN](https://docs.sentry.io/error-reporting/quickstart/?platform=native#configure-the-sdk) 構文を使用ã—ã¾ã™ã€‚ +- `anonymize` - クラッシュレãƒãƒ¼ãƒˆã«ã‚µãƒ¼ãƒãƒ¼ãƒ›ã‚¹ãƒˆåを添付ã™ã‚‹ã®ã‚’回é¿ã—ã¾ã™ã€‚ +- `http_proxy` - クラッシュレãƒãƒ¼ãƒˆé€ä¿¡ç”¨ã®HTTPプロキシを設定ã—ã¾ã™ã€‚ +- `debug` - Sentryクライアントをデãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã—ã¾ã™ã€‚ +- `tmp_path` - 一時的ãªã‚¯ãƒ©ãƒƒã‚·ãƒ¥ãƒ¬ãƒãƒ¼ãƒˆçŠ¶æ…‹ã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ãƒ‘ス。 +- `environment` - ClickHouseサーãƒãƒ¼ãŒå‹•ä½œã—ã¦ã„る環境ã®ä»»æ„ã®åå‰ã€‚å„クラッシュレãƒãƒ¼ãƒˆã«è¨˜è¼‰ã•ã‚Œã¾ã™ã€‚デフォルト値ã¯ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«å¿œã˜ã¦ `test` ã‹ `prod` ã§ã™ã€‚ + +**推奨使用方法** + +``` xml + + true + +``` + +## macros {#macros} + +レプリケートテーブルã®ãƒ‘ラメータ置æ›ã€‚ + +レプリケートテーブルãŒä½¿ç”¨ã•ã‚Œã¦ã„ãªã„å ´åˆã¯çœç•¥å¯èƒ½ã€‚ + +詳ã—ãã¯ã€[Creating replicated tables](../../engines/table-engines/mergetree-family/replication.md#creating-replicated-tables) ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**例** + +``` xml + +``` + +## replica_group_name {#replica_group_name} + +データベースReplicatedã®ãƒ¬ãƒ—リカグループå。 + +Replicatedデータベースã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã¯åŒã˜ã‚°ãƒ«ãƒ¼ãƒ—内ã®ãƒ¬ãƒ—リカã§æ§‹æˆã•ã‚Œã¾ã™ã€‚ +DDLクエリã¯åŒã˜ã‚°ãƒ«ãƒ¼ãƒ—内ã®ãƒ¬ãƒ—リカã®ã¿ã‚’å¾…ã¡ã¾ã™ã€‚ + +デフォルトã§ã¯ç©ºã§ã™ã€‚ + +**例** + +``` xml +backups +``` + +デフォルト値: ``。 + +## max_open_files {#max-open-files} + +最大ã®ã‚ªãƒ¼ãƒ—ンファイル数。 + +デフォルト: `maximum`。 + +ã“ã®ã‚ªãƒ—ションã¯ã€macOS㧠`getrlimit()` 関数ãŒä¸æ­£ç¢ºãªå€¤ã‚’è¿”ã™ãŸã‚ã«ä½¿ç”¨ã‚’推奨ã—ã¾ã™ã€‚ + +**例** + +``` xml +262144 +``` + +## max_table_size_to_drop {#max-table-size-to-drop} + +テーブル削除ã®åˆ¶é™ã€‚ + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブルã®ã‚µã‚¤ã‚ºãŒ `max_table_size_to_drop`(ãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’超ãˆã‚‹å ´åˆã€[DROP](../../sql-reference/statements/drop.md) クエリや [TRUNCATE](../../sql-reference/statements/truncate.md) クエリを使用ã—ã¦å‰Šé™¤ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +ã“ã®è¨­å®šã¯ã€ClickHouseサーãƒãƒ¼ã®å†èµ·å‹•ãªã—ã§é©ç”¨ã•ã‚Œã¾ã™ã€‚制é™ã‚’解除ã™ã‚‹åˆ¥ã®æ–¹æ³•ã¯ã€ `/flags/force_drop_table` ファイルを作æˆã™ã‚‹ã“ã¨ã§ã™ã€‚ + +デフォルト値: 50 GB。 + +値ãŒ0ã®å ´åˆã€ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルを制é™ãªã—ã«å‰Šé™¤ã§ãã¾ã™ã€‚ + +**例** + +``` xml +0 +``` + +## max_partition_size_to_drop {#max-partition-size-to-drop} + +パーティションã®å‰Šé™¤ã®åˆ¶é™ã€‚ + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブルã®ã‚µã‚¤ã‚ºãŒ `max_partition_size_to_drop`(ãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’超ãˆã‚‹å ´åˆã€[DROP PARTITION](../../sql-reference/statements/alter/partition.md#drop-partitionpart) クエリを使用ã—ã¦ãƒ‘ーティションを削除ã§ãã¾ã›ã‚“。 + +ã“ã®è¨­å®šã¯ã€ClickHouseサーãƒãƒ¼ã®å†èµ·å‹•ãªã—ã§é©ç”¨ã•ã‚Œã¾ã™ã€‚制é™ã‚’解除ã™ã‚‹ã‚‚ã†ä¸€ã¤ã®æ–¹æ³•ã¯ã€ `/flags/force_drop_table` ファイルを作æˆã™ã‚‹ã“ã¨ã§ã™ã€‚ + +デフォルト値: 50 GB。 + +値ãŒ0ã®å ´åˆã€ãƒ‘ーティションを制é™ãªã—ã«å‰Šé™¤ã§ãã¾ã™ã€‚ + +:::note +ã“ã®åˆ¶é™ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®å‰Šé™¤ã‚„テーブルã®åˆ‡ã‚Šæ¨ã¦ã«ã¯åˆ¶é™ã‚’設ã‘ã¾ã›ã‚“。詳ã—ãã¯ã€[max_table_size_to_drop](#max-table-size-to-drop) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**例** + +``` xml +0 +``` + +## max_thread_pool_size {#max-thread-pool-size} + +ClickHouseã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã‹ã‚‰ã‚¯ã‚¨ãƒªã‚’処ç†ã™ã‚‹ãŸã‚ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’使用ã—ã¾ã™ã€‚クエリを処ç†ã™ã‚‹ãŸã‚ã®ã‚¢ã‚¤ãƒ‰ãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãŒãªã„å ´åˆã€ãƒ—ールã«æ–°ã—ã„スレッドãŒä½œæˆã•ã‚Œã¾ã™ã€‚`max_thread_pool_size` ã¯ã€ãƒ—ール内ã®æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’制é™ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `10000`。 + +**例** + +``` xml +12000 +``` + +## max_thread_pool_free_size {#max-thread-pool-free-size} + +グローãƒãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ール内ã®**アイドル**スレッドã®æ•°ãŒ `max_thread_pool_free_size` を超ãˆã‚‹å ´åˆã€ClickHouseã¯ä¸€éƒ¨ã®ã‚¹ãƒ¬ãƒƒãƒ‰ãŒå æœ‰ã™ã‚‹ãƒªã‚½ãƒ¼ã‚¹ã‚’解放ã—ã€ãƒ—ールサイズを減少ã•ã›ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’å†ä½œæˆã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `1000`。 + +**例** + +``` xml +1200 +``` + +## thread_pool_queue_size {#thread-pool-queue-size} + +グローãƒãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã§ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ãるジョブã®æœ€å¤§æ•°ã€‚キューサイズを増やã™ã¨ã€ã‚ˆã‚Šå¤§ããªãƒ¡ãƒ¢ãƒªä½¿ç”¨ã«ã¤ãªãŒã‚Šã¾ã™ã€‚ã“ã®å€¤ã‚’ [max_thread_pool_size](#max-thread-pool-size) ã¨åŒã˜ã«ã—ã¦ãŠãã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 制é™ãªã—。 + +デフォルト値: `10000`。 + +**例** + +``` xml +12000 +``` + +## max_io_thread_pool_size {#max-io-thread-pool-size} + +ClickHouseã¯IOæ“作を行ã†ãŸã‚ã«IOスレッドプールã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’使用ã—ã¾ã™ï¼ˆä¾‹: S3ã¨ã®ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ã‚·ãƒ§ãƒ³ï¼‰ã€‚`max_io_thread_pool_size` ã¯ãƒ—ール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æœ€å¤§æ•°ã‚’制é™ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `100`。 + +## max_io_thread_pool_free_size {#max-io-thread-pool-free-size} + +IOスレッドプール内ã®**アイドル**スレッドã®æ•°ãŒ `max_io_thread_pool_free_size` を超ãˆã‚‹å ´åˆã€ClickHouseã¯ã‚¢ã‚¤ãƒ‰ãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãŒå æœ‰ã™ã‚‹ãƒªã‚½ãƒ¼ã‚¹ã‚’解放ã—ã€ãƒ—ールサイズを減少ã•ã›ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’å†ä½œæˆã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `0`。 + +## io_thread_pool_queue_size {#io-thread-pool-queue-size} + +IOスレッドプールã§ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ãるジョブã®æœ€å¤§æ•°ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 制é™ãªã—。 + +デフォルト値: `10000`。 + +## max_backups_io_thread_pool_size {#max-backups-io-thread-pool-size} + +ClickHouseã¯S3ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®IOæ“作を行ã†ãŸã‚ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—IOスレッドプールã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’使用ã—ã¾ã™ã€‚`max_backups_io_thread_pool_size` ã¯ãƒ—ール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æœ€å¤§æ•°ã‚’制é™ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `1000`。 + +## max_backups_io_thread_pool_free_size {#max-backups-io-thread-pool-free-size} + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—IOスレッドプール内ã®**アイドル**スレッドã®æ•°ãŒ `max_backup_io_thread_pool_free_size` を超ãˆã‚‹å ´åˆã€ClickHouseã¯ã‚¢ã‚¤ãƒ‰ãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãŒå æœ‰ã™ã‚‹ãƒªã‚½ãƒ¼ã‚¹ã‚’解放ã—ã€ãƒ—ールサイズを減少ã•ã›ã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’å†ä½œæˆã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- ゼロ。 + +デフォルト値: `0`。 + +## backups_io_thread_pool_queue_size {#backups-io-thread-pool-queue-size} + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—IOスレッドプールã§ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ãるジョブã®æœ€å¤§æ•°ã€‚ç¾åœ¨ã®S3ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ロジックã®ãŸã‚ã€ã“ã®ã‚­ãƒ¥ãƒ¼ã‚’無制é™ã«ã—ã¦ãŠãã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 制é™ãªã—。 + +デフォルト値: `0`。 + +## background_pool_size {#background_pool_size} + +MergeTreeエンジンを使用ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã¨å¤‰ç•°ã‚’実行ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’設定ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ClickHouseサーãƒãƒ¼ã®èµ·å‹•æ™‚ã« `default` プロファイル設定ã‹ã‚‰å¾Œæ–¹äº’æ›æ€§ã®ãŸã‚ã«ã‚‚é©ç”¨ã§ãã¾ã™ã€‚ランタイム中ã«ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’増やã™ã“ã¨ã—ã‹ã§ãã¾ã›ã‚“。スレッド数を減らã™ã«ã¯ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã‚’調整ã™ã‚‹ã“ã¨ã§ã€CPUã¨ãƒ‡ã‚£ã‚¹ã‚¯ã®è² è·ã‚’管ç†ã§ãã¾ã™ã€‚プールサイズãŒå°ã•ã„ã»ã©ã€CPUã¨ãƒ‡ã‚£ã‚¹ã‚¯ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’より少ãªã利用ã—ã¾ã™ãŒã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセスã¯ã‚ˆã‚Šé…ã進行ã—ã€æœ€çµ‚çš„ã«ã¯ã‚¯ã‚¨ãƒªæ€§èƒ½ã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +変更ã™ã‚‹å‰ã«ã€[number_of_free_entries_in_pool_to_lower_max_size_of_merge](../../operations/settings/merge-tree-settings.md#number-of-free-entries-in-pool-to-lower-max-size-of-merge) ã‚„ [number_of_free_entries_in_pool_to_execute_mutation](../../operations/settings/merge-tree-settings.md#number-of-free-entries-in-pool-to-execute-mutation) ãªã©ã®é–¢é€£ã™ã‚‹MergeTree設定も確èªã—ã¦ãã ã•ã„。 + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 16。 + +**例** + +```xml +16 +``` + +## background_merges_mutations_concurrency_ratio {#background_merges_mutations_concurrency_ratio} + +スレッド数ã¨åŒæ™‚ã«å®Ÿè¡Œã§ãã‚‹ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã¨å¤‰ç•°ã®æ•°ã¨ã®æ¯”率を設定ã—ã¾ã™ã€‚例ãˆã°ã€æ¯”率ãŒ2㧠`background_pool_size` ãŒ16ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯32ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã‚’åŒæ™‚ã«å®Ÿè¡Œã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作ãŒä¸€æ™‚åœæ­¢ã•ã‚Œå»¶æœŸã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šå°ã•ãªãƒžãƒ¼ã‚¸ã«ã‚ˆã‚Šé«˜ã„実行優先度ãŒä¸Žãˆã‚‰ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æ¯”率をランタイム中ã«å¢—ã‚„ã™ã“ã¨ã—ã‹ã§ãã¾ã›ã‚“。比率を下ã’ã‚‹ã«ã¯ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`background_pool_size` 設定ã¨åŒæ§˜ã«ã€`background_merges_mutations_concurrency_ratio` 㯠`default` プロファイルã‹ã‚‰é©ç”¨ã§ãã€å¾Œæ–¹äº’æ›æ€§ã‚’ä¿ã¡ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 2。 + +**例** + +```xml +3 +``` + +## merges_mutations_memory_usage_soft_limit {#merges_mutations_memory_usage_soft_limit} + +マージã¨å¤‰ç•°ã®æ“作を実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ãŒè¨±å¯ã•ã‚Œã¦ã„ã‚‹RAMã®åˆ¶é™ã‚’設定ã—ã¾ã™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ClickHouseãŒã“ã®åˆ¶é™ã«é”ã™ã‚‹ã¨ã€æ–°ã—ã„ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã¾ãŸã¯å¤‰ç•°æ“作をスケジュールã—ã¾ã›ã‚“ãŒã€ã™ã§ã«ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚Œã¦ã„るタスクã¯å®Ÿè¡Œã—続ã‘ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +**例** + +```xml +0 +``` + +## merges_mutations_memory_usage_to_ram_ratio {#merges_mutations_memory_usage_to_ram_ratio} + +デフォルト㮠`merges_mutations_memory_usage_soft_limit` 値㯠`memory_amount * merges_mutations_memory_usage_to_ram_ratio` ã¨ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +デフォルト値: `0.5`。 + +**関連項目** + +- [max_memory_usage](../../operations/settings/query-complexity.md#settings_max_memory_usage) +- [merges_mutations_memory_usage_soft_limit](#merges_mutations_memory_usage_soft_limit) + +## async_load_databases {#async_load_databases} + +データベースã¨ãƒ†ãƒ¼ãƒ–ルã®éžåŒæœŸãƒ­ãƒ¼ãƒ‰ã€‚ + +`true` ã®å ´åˆã€`Ordinary`ã€`Atomic`ã€`Replicated` エンジンをæŒã¤ã™ã¹ã¦ã®éžã‚·ã‚¹ãƒ†ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒClickHouseサーãƒãƒ¼ã®èµ·å‹•å¾Œã«éžåŒæœŸã§ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚`system.asynchronous_loader` テーブルã€`tables_loader_background_pool_size`ã€`tables_loader_foreground_pool_size` サーãƒãƒ¼è¨­å®šã‚’å‚ç…§ã—ã¦ãã ã•ã„。ã¾ã ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ãªã„テーブルã«ã‚¢ã‚¯ã‚»ã‚¹ã—よã†ã¨ã™ã‚‹ã‚¯ã‚¨ãƒªã¯ã€æ­£ç¢ºã«ã“ã®ãƒ†ãƒ¼ãƒ–ルãŒèµ·å‹•ã•ã‚Œã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™ã€‚ロードジョブãŒå¤±æ•—ã—ãŸå ´åˆã€ãã®ã‚¯ã‚¨ãƒªã¯ã‚¨ãƒ©ãƒ¼ã‚’å†ã‚¹ãƒ­ãƒ¼ã—ã¾ã™ï¼ˆ`async_load_databases = false` ã®å ´åˆã«ã‚µãƒ¼ãƒãƒ¼å…¨ä½“をシャットダウンã™ã‚‹ä»£ã‚ã‚Šã«ï¼‰ã€‚å°‘ãªãã¨ã‚‚1ã¤ã®ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦å¾…æ©Ÿã•ã‚Œã¦ã„るテーブルã¯é«˜ã„優先度ã§ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚データベースã«é–¢ã™ã‚‹DDLクエリã¯æ­£ç¢ºã«ãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒèµ·å‹•ã™ã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™ã€‚待機クエリã®ç·æ•°ã‚’制é™ã™ã‚‹ãŸã‚ã« `max_waiting_queries` 設定を考慮ã—ã¦ãã ã•ã„。 + +`false` ã®å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ãŒèµ·å‹•ã—ãŸéš›ã«ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +デフォルト㯠`false` ã§ã™ã€‚ + +**例** + +``` xml +true +``` + +## async_load_system_database {#async_load_system_database} + +システムテーブルã®éžåŒæœŸãƒ­ãƒ¼ãƒ‰ã€‚`system` データベース内ã«å¤§é‡ã®ãƒ­ã‚°ãƒ†ãƒ¼ãƒ–ルやパーツãŒã‚ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚`async_load_databases` 設定ã¨ã¯ç‹¬ç«‹ã—ã¦ã„ã¾ã™ã€‚ + +`true` ã«è¨­å®šã™ã‚‹ã¨ã€`Ordinary`ã€`Atomic`ã€`Replicated` エンジンをæŒã¤ã™ã¹ã¦ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒClickHouseサーãƒãƒ¼ã®èµ·å‹•å¾Œã«éžåŒæœŸã§ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚`system.asynchronous_loader` テーブルã€`tables_loader_background_pool_size` 〠`tables_loader_foreground_pool_size` サーãƒãƒ¼è¨­å®šã‚’å‚ç…§ã—ã¦ãã ã•ã„。ã¾ã ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ãªã„システムテーブルã«ã‚¢ã‚¯ã‚»ã‚¹ã—よã†ã¨ã™ã‚‹ã‚¯ã‚¨ãƒªã¯ã€æ­£ç¢ºã«ã“ã®ãƒ†ãƒ¼ãƒ–ルãŒèµ·å‹•ã•ã‚Œã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™ã€‚å°‘ãªãã¨ã‚‚1ã¤ã®ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦å¾…æ©Ÿã•ã‚Œã¦ã„るテーブルã¯é«˜ã„優先度ã§ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ã¾ãŸã€å¾…機クエリã®ç·æ•°ã‚’制é™ã™ã‚‹ãŸã‚ã« `max_waiting_queries` 設定を考慮ã—ã¦ãã ã•ã„。 + +`false` ã®å ´åˆã€ã‚·ã‚¹ãƒ†ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã‚µãƒ¼ãƒãƒ¼ã®é–‹å§‹å‰ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +デフォルト㯠`false` ã§ã™ã€‚ + +**例** + +``` xml +true +``` + +## tables_loader_foreground_pool_size {#tables_loader_foreground_pool_size} + +フォアグラウンドプールã§ãƒ­ãƒ¼ãƒ‰ã‚¸ãƒ§ãƒ–を実行ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’設定ã—ã¾ã™ã€‚フォアグラウンドプールã¯ã€ã‚µãƒ¼ãƒãƒ¼ãŒãƒãƒ¼ãƒˆã®ãƒªãƒƒã‚¹ãƒ³ã‚’開始ã™ã‚‹å‰ã«ãƒ†ãƒ¼ãƒ–ルをåŒæœŸçš„ã«ãƒ­ãƒ¼ãƒ‰ã—ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ­ãƒ¼ãƒ‰ã‚’å¾…æ©Ÿã—ã¦ã„るクエリを処ç†ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚フォアグラウンドプールã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ールよりも優先度ãŒé«˜ã„ã§ã™ã€‚フォアグラウンドプールã§ã‚¸ãƒ§ãƒ–ãŒå®Ÿè¡Œä¸­ã®å ´åˆã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ールã§ã‚¸ãƒ§ãƒ–ãŒé–‹å§‹ã•ã‚Œã¾ã›ã‚“。 + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- ゼロ。利用å¯èƒ½ãªã™ã¹ã¦ã®CPUを使用ã—ã¾ã™ã€‚ + +デフォルト値: 0。 + +## tables_loader_background_pool_size {#tables_loader_background_pool_size} + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ールã§éžåŒæœŸãƒ­ãƒ¼ãƒ‰ã‚¸ãƒ§ãƒ–を実行ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’設定ã—ã¾ã™ã€‚ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ールã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®é–‹å§‹å¾Œã«ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ­ãƒ¼ãƒ‰ãŒå¾…æ©Ÿã•ã‚Œã¦ã„ãªã„å ´åˆã«ãƒ†ãƒ¼ãƒ–ルをéžåŒæœŸã§ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚テーブルãŒå¤šã„å ´åˆã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ールã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’低ãä¿ã¤ã“ã¨ãŒåˆ©ç›Šã‚’ã‚‚ãŸã‚‰ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€åŒæ™‚クエリ実行ã®ãŸã‚ã®CPUリソースãŒç¢ºä¿ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- ゼロ。利用å¯èƒ½ãªã™ã¹ã¦ã®CPUを使用ã—ã¾ã™ã€‚ + +デフォルト値: 0。 + +## merge_tree {#merge_tree} + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブルã®å¾®èª¿æ•´ã€‚ + +詳ã—ãã¯ã€MergeTreeSettings.h ヘッダーファイルをå‚ç…§ã—ã¦ãã ã•ã„。 + +**例** + +``` xml + + 5 + +``` + +## metric_log {#metric_log} + +デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ + +**有効化** + +メトリクス履歴åŽé›†ã‚’手動ã§ã‚ªãƒ³ã«ã™ã‚‹ã«ã¯ [`system.metric_log`](../../operations/system-tables/metric_log.md) を使用ã—ã€æ¬¡ã®å†…容㧠`/etc/clickhouse-server/config.d/metric_log.xml` を作æˆã—ã¾ã™ã€‚ + +``` xml + + + system + metric_log
    + 7500 + 1000 + 1048576 + 8192 + 524288 + false +
    +
    +``` + +**無効化** + +`metric_log` 設定を無効ã«ã™ã‚‹ã«ã¯ã€æ¬¡ã®å†…容㧠`/etc/clickhouse-server/config.d/disable_metric_log.xml` を作æˆã—ã¾ã™ã€‚ + +``` xml + + + +``` + +## replicated_merge_tree {#replicated_merge_tree} + +[ReplicatedMergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブルã®å¾®èª¿æ•´ã€‚ + +ã“ã®è¨­å®šã¯å„ªå…ˆé †ä½ãŒé«˜ã„ã§ã™ã€‚ + +詳ã—ãã¯ã€MergeTreeSettings.h ヘッダーファイルをå‚ç…§ã—ã¦ãã ã•ã„。 + +**例** + +``` xml + + 5 + +``` + +## openSSL {#openssl} + +SSLクライアント/サーãƒãƒ¼è¨­å®šã€‚ + +SSLã®ã‚µãƒãƒ¼ãƒˆã¯ `libpoco` ライブラリã«ã‚ˆã‚Šæä¾›ã•ã‚Œã¾ã™ã€‚利用å¯èƒ½ãªè¨­å®šã‚ªãƒ—ション㯠[SSLManager.h](https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h) ã«èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™ã€‚デフォルト値㯠[SSLManager.cpp](https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/src/SSLManager.cpp) ã«ã‚ã‚Šã¾ã™ã€‚ + +サーãƒãƒ¼/クライアント設定ã®ã‚­ãƒ¼: + +- privateKeyFile – PEM証明書ã®ç§˜å¯†éµãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯åŒæ™‚ã«éµã¨è¨¼æ˜Žæ›¸ãŒå«ã¾ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +- certificateFile – PEMå½¢å¼ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼è¨¼æ˜Žæ›¸ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。`privateKeyFile` ãŒè¨¼æ˜Žæ›¸ã‚’å«ã‚€å ´åˆã¯çœç•¥å¯èƒ½ã§ã™ã€‚ +- caConfig (デフォルト: ãªã—) – ä¿¡é ¼ã§ãã‚‹CA証明書をå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¸ã®ãƒ‘ス。ã“ã‚ŒãŒãƒ•ã‚¡ã‚¤ãƒ«ã‚’指ã™å ´åˆã€PEMå½¢å¼ã§ã‚り複数ã®CA証明書をå«ã‚€ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ディレクトリを指ã™å ´åˆã€CA証明書ã”ã¨ã«ä¸€ã¤ã®.pemファイルをå«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ファイルåã¯CAサブジェクトåã®ãƒãƒƒã‚·ãƒ¥å€¤ã§æ¤œç´¢ã•ã‚Œã¾ã™ã€‚詳細㯠[SSL_CTX_load_verify_locations](https://www.openssl.org/docs/man3.0/man3/SSL_CTX_load_verify_locations.html) ã®ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ãƒšãƒ¼ã‚¸ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- verificationMode (デフォルト: relaxed) – ノードã®è¨¼æ˜Žæ›¸ã‚’確èªã™ã‚‹æ–¹æ³•ã€‚詳細㯠[Context](https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/Context.h) クラスã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。使用å¯èƒ½ãªå€¤: `none`, `relaxed`, `strict`, `once`. +- verificationDepth (デフォルト: 9) – 検証ãƒã‚§ãƒ¼ãƒ³ã®æœ€å¤§é•·ã€‚証明書ãƒã‚§ãƒ¼ãƒ³ã®é•·ã•ãŒè¨­å®šå€¤ã‚’超ãˆã‚‹ã¨æ¤œè¨¼ã¯å¤±æ•—ã—ã¾ã™ã€‚ +- loadDefaultCAFile (デフォルト: true) – OpenSSLã®ãƒ“ルトインCA証明書を使用ã™ã‚‹ã‹ã©ã†ã‹ã€‚ClickHouseã¯ãƒ“ルトインCA証明書ãŒãƒ•ã‚¡ã‚¤ãƒ« `/etc/ssl/cert.pem`(もã—ãã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª `/etc/ssl/certs`)ã«ã‚ã‚‹ã€ã¾ãŸã¯ç’°å¢ƒå¤‰æ•° `SSL_CERT_FILE`(もã—ã㯠`SSL_CERT_DIR`)ã§æŒ‡å®šã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆã‚‚ã—ãã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªï¼‰ã«ã‚ã‚‹ã¨è¦‹ãªã—ã¾ã™ã€‚ +- cipherList (デフォルト: `ALL:!ADH:!LOW:!EXP:!MD5:!3DES:@STRENGTH`) - 対応ã™ã‚‹OpenSSLã®æš—å·åŒ–æ–¹å¼ã€‚ +- cacheSessions (デフォルト: false) – セッションã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚`sessionIdContext` ã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚å—容å¯èƒ½ãªå€¤: `true`, `false`. +- sessionIdContext (デフォルト: `${application.name}`) – サーãƒãƒ¼ãŒå„生æˆã•ã‚ŒãŸè­˜åˆ¥å­ã«è¿½åŠ ã™ã‚‹ãƒ©ãƒ³ãƒ€ãƒ æ–‡å­—列ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ã‚»ãƒƒãƒˆã€‚文字列ã®é•·ã•ã¯ `SSL_MAX_SSL_SESSION_ID_LENGTH` を超ãˆã¦ã¯ãªã‚Šã¾ã›ã‚“。ã“ã®ãƒ‘ラメータã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’キャッシュã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã¨ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’è¦æ±‚ã™ã‚‹å ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚デフォルト値: `${application.name}`. +- sessionCacheSize (デフォルト: [1024\*20](https://github.com/ClickHouse/boringssl/blob/master/include/openssl/ssl.h#L1978)) – サーãƒãƒ¼ãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã™ã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æœ€å¤§æ•°ã€‚値ãŒ0ã®å ´åˆã€ç„¡åˆ¶é™ã«ãªã‚Šã¾ã™ã€‚ +- sessionTimeout (デフォルト: [2h](https://github.com/ClickHouse/boringssl/blob/master/include/openssl/ssl.h#L1926)) – サーãƒãƒ¼ã§ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’キャッシュã™ã‚‹æ™‚間。 +- extendedVerification (デフォルト: false) – 有効化ã•ã‚Œã¦ã„ã‚‹å ´åˆã€è¨¼æ˜Žæ›¸ã®CNã¾ãŸã¯SANãŒãƒ”ã‚¢ã®ãƒ›ã‚¹ãƒˆåã¨ä¸€è‡´ã™ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +- requireTLSv1 (デフォルト: false) – TLSv1接続をè¦æ±‚ã—ã¾ã™ã€‚å—容å¯èƒ½ãªå€¤: `true`, `false`. +- requireTLSv1_1 (デフォルト: false) – TLSv1.1接続をè¦æ±‚ã—ã¾ã™ã€‚å—容å¯èƒ½ãªå€¤: `true`, `false`. +- requireTLSv1_2 (デフォルト: false) – TLSv1.2接続をè¦æ±‚ã—ã¾ã™ã€‚å—容å¯èƒ½ãªå€¤: `true`, `false`. +- fips (デフォルト: false) – OpenSSLã®FIPSモードをアクティブã«ã—ã¾ã™ã€‚ライブラリã®OpenSSLãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒFIPSをサãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹å ´åˆã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ +- privateKeyPassphraseHandler (デフォルト: `KeyConsoleHandler`)– 秘密éµã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã®ãƒ‘スフレーズをè¦æ±‚ã™ã‚‹ã‚¯ãƒ©ã‚¹ï¼ˆPrivateKeyPassphraseHandlerサブクラス)。例: ``, `KeyFileHandler`, `test`, ``. +- invalidCertificateHandler (デフォルト: `RejectCertificateHandler`) – 無効ãªè¨¼æ˜Žæ›¸ã‚’確èªã™ã‚‹ãŸã‚ã®ã‚¯ãƒ©ã‚¹ï¼ˆCertificateHandlerサブクラス)。例: ` RejectCertificateHandler `. +- disableProtocols (デフォルト: "") – 使用ãŒè¨±å¯ã•ã‚Œã¦ã„ãªã„プロトコル。 +- preferServerCiphers (デフォルト: false) – クライアントã«å¯¾ã—ã¦ã‚µãƒ¼ãƒãƒ¼æš—å·åŒ–æ–¹å¼ã‚’優先ã—ã¾ã™ã€‚ + +**設定例** + +``` xml + + + + /etc/clickhouse-server/server.crt + /etc/clickhouse-server/server.key + + /etc/clickhouse-server/dhparam.pem + none + true + true + sslv2,sslv3 + true + + + true + true + sslv2,sslv3 + true + + + + RejectCertificateHandler + + + +``` + +## part_log {#part-log} + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) ã«é–¢é€£ã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã®ãƒ­ã‚®ãƒ³ã‚°ã€‚ãŸã¨ãˆã°ã€ãƒ‡ãƒ¼ã‚¿ã®è¿½åŠ ã‚„マージ。ã“ã®ãƒ­ã‚°ã‚’使用ã—ã¦ãƒžãƒ¼ã‚¸ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’シミュレートã—ã€ãã®ç‰¹æ€§ã‚’比較ã§ãã¾ã™ã€‚ã¾ãŸã€ãƒžãƒ¼ã‚¸ãƒ—ロセスを視覚化ã§ãã¾ã™ã€‚ + +ログ㯠[system.part_log](../../operations/system-tables/part_log.md#system_tables-part-log) テーブルã«è¨˜éŒ²ã•ã‚Œã€åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯è¨˜éŒ²ã•ã‚Œã¾ã›ã‚“。ã“ã®ãƒ†ãƒ¼ãƒ–ルã®åå‰ã¯ `table` パラメーターã§æ§‹æˆå¯èƒ½ã§ã™ï¼ˆä»¥ä¸‹ã‚’å‚照)。 + +ロギングを構æˆã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ãƒ‘ラメーターを使用ã—ã¾ã™: + +- `database` – データベースå。 +- `table` – システムテーブルå。 +- `partition_by` — システムテーブル㮠[カスタムパーティションキー](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `order_by` - システムテーブル㮠[カスタムソートキー](../../engines/table-engines/mergetree-family/mergetree.md#order_by)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `engine` - システムテーブル㮠[MergeTreeエンジン定義](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)。`partition_by` ã¾ãŸã¯ `order_by` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `flush_interval_milliseconds` – メモリ中ã®ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ãŸã‚ã®é–“隔。 +- `max_size_rows` – ログã®æœ€å¤§è¡Œæ•°ã€‚未フラッシュã®ãƒ­ã‚°æ•°ãŒæœ€å¤§ã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ€ãƒ³ãƒ—ã•ã‚Œã¾ã™ã€‚ +デフォルト: 1048576。 +- `reserved_size_rows` – ログã®ãŸã‚ã«äº‹å‰ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã€‚ +デフォルト: 8192。 +- `buffer_size_rows_flush_threshold` – 行数ã®ã—ãã„値ã§ã€ã“ã‚Œã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +デフォルト: `max_size_rows / 2`。 +- `flush_on_crash` - クラッシュ時ã«ãƒ­ã‚°ã‚’ディスクã«ãƒ€ãƒ³ãƒ—ã™ã¹ãã‹ã©ã†ã‹ã‚’示ã™ã€‚ +デフォルト: false。 +- `storage_policy` – テーブルã§ä½¿ç”¨ã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã®åå‰ï¼ˆã‚ªãƒ—ション) +- `settings` - MergeTreeã®å‹•ä½œã‚’制御ã™ã‚‹ [追加パラメーター](../../engines/table-engines/mergetree-family/mergetree.md/#settings)(オプション)。 + +**例** + +``` xml + + system + part_log
    + toMonday(event_date) + 7500 + 1048576 + 8192 + 524288 + false +
    +``` + +## path {#path} + +データをå«ã‚€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¸ã®ãƒ‘ス。 + +:::note +トレイリングスラッシュã¯å¿…é ˆã§ã™ã€‚ +::: + +**例** + +``` xml +/var/lib/clickhouse/ +``` + +## query_log {#query-log} + +[log_queries=1](../../operations/settings/settings.md) 設定を使用ã—ã¦å—ä¿¡ã—ãŸã‚¯ã‚¨ãƒªã®ãƒ­ã‚®ãƒ³ã‚°è¨­å®šã€‚ + +クエリã¯ã€ [system.query_log](../../operations/system-tables/query_log.md#system_tables-query_log) テーブルã«è¨˜éŒ²ã•ã‚Œã€åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯è¨˜éŒ²ã•ã‚Œã¾ã›ã‚“。テーブルã®åå‰ã‚’以下㮠`table` パラメーターã§å¤‰æ›´ã§ãã¾ã™ã€‚ + +ロギングを構æˆã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ãƒ‘ラメーターを使用ã—ã¾ã™: + +- `database` – データベースå。 +- `table` – クエリãŒè¨˜éŒ²ã•ã‚Œã‚‹ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚ +- `partition_by` — システムテーブル㮠[カスタムパーティションキー](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `order_by` - システムテーブル㮠[カスタムソートキー](../../engines/table-engines/mergetree-family/mergetree.md#order_by)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `engine` - システムテーブル㮠[MergeTreeエンジン定義](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)。`partition_by` ã¾ãŸã¯ `order_by` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `flush_interval_milliseconds` – メモリ中ã®ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ãŸã‚ã®é–“隔。 +- `max_size_rows` – ログã®æœ€å¤§è¡Œæ•°ã€‚未フラッシュã®ãƒ­ã‚°æ•°ãŒæœ€å¤§ã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ€ãƒ³ãƒ—ã•ã‚Œã¾ã™ã€‚ +デフォルト: 1048576。 +- `reserved_size_rows` – ログã®ãŸã‚ã«äº‹å‰ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã€‚ +デフォルト: 8192。 +- `buffer_size_rows_flush_threshold` – 行数ã®ã—ãã„値ã§ã€ã“ã‚Œã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +デフォルト: `max_size_rows / 2`。 +- `flush_on_crash` - クラッシュ時ã«ãƒ­ã‚°ã‚’ディスクã«ãƒ€ãƒ³ãƒ—ã™ã‚‹ã‹ã©ã†ã‹ã®æŒ‡ç¤ºã€‚ +デフォルト: false。 +- `storage_policy` – テーブルã§ä½¿ç”¨ã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã®åå‰ï¼ˆã‚ªãƒ—ション) +- `settings` - MergeTreeã®å‹•ä½œã‚’制御ã™ã‚‹ [追加パラメーター](../../engines/table-engines/mergetree-family/mergetree.md/#settings)(オプション)。 + +テーブルãŒå­˜åœ¨ã—ãªã„å ´åˆã€ClickHouseã¯ãれを作æˆã—ã¾ã™ã€‚ClickHouseサーãƒãƒ¼ãŒæ›´æ–°ã•ã‚ŒãŸéš›ã«ã‚¯ã‚¨ãƒªãƒ­ã‚°ã®æ§‹é€ ãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã€å¤ã„構造ã®ãƒ†ãƒ¼ãƒ–ルã¯ãƒªãƒãƒ¼ãƒ ã•ã‚Œã€æ–°ã—ã„テーブルãŒè‡ªå‹•çš„ã«ä½œæˆã•ã‚Œã¾ã™ã€‚ + +**例** + +``` xml + + system + query_log
    + Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + INTERVAL 30 day + 7500 + 1048576 + 8192 + 524288 + false +
    +``` + +# query_metric_log {#query_metric_log} + +デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ + +**有効化** + +メトリクス履歴åŽé›†ã‚’手動ã§ã‚ªãƒ³ã«ã™ã‚‹ã«ã¯ [`system.query_metric_log`](../../operations/system-tables/query_metric_log.md) を使用ã—ã€æ¬¡ã®å†…容㧠`/etc/clickhouse-server/config.d/query_metric_log.xml` を作æˆã—ã¾ã™ã€‚ + +``` xml + + + system + query_metric_log
    + 7500 + 1000 + 1048576 + 8192 + 524288 + false +
    +
    +``` + +**無効化** + +`query_metric_log` 設定を無効ã«ã™ã‚‹ã«ã¯ã€æ¬¡ã®å†…容㧠`/etc/clickhouse-server/config.d/disable_query_metric_log.xml` を作æˆã—ã¾ã™ã€‚ + +``` xml + + + +``` + +## query_cache {#server_configuration_parameters_query-cache} + +[クエリキャッシュ](../query-cache.md) ã®è¨­å®šã€‚ + +次ã®è¨­å®šãŒä½¿ç”¨å¯èƒ½ã§ã™: + +- `max_size_in_bytes`: キャッシュã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚0ã¯ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒç„¡åŠ¹ã§ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚デフォルト値: `1073741824`(1 GiB)。 +- `max_entries`: キャッシュã«ä¿å­˜ã•ã‚Œã‚‹ `SELECT` クエリçµæžœã®æœ€å¤§æ•°ã€‚デフォルト値: `1024`。 +- `max_entry_size_in_bytes`: キャッシュã«ä¿å­˜ã•ã‚Œã‚‹ `SELECT` クエリçµæžœãŒæŒã¤å¯èƒ½ãªæœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚デフォルト値: `1048576`(1 MiB)。 +- `max_entry_size_in_rows`: キャッシュã«ä¿å­˜ã•ã‚Œã‚‹ `SELECT` クエリçµæžœãŒæŒã¤å¯èƒ½ãªæœ€å¤§è¡Œæ•°ã€‚デフォルト値: `30000000`(3000万)。 + +変更ã•ã‚ŒãŸè¨­å®šã¯ç›´ã¡ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +:::note +クエリキャッシュã®ãƒ‡ãƒ¼ã‚¿ã¯DRAMã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚メモリãŒä¸è¶³ã—ã¦ã„ã‚‹å ´åˆã¯ã€`max_size_in_bytes` ã®å€¤ã‚’å°ã•ã設定ã™ã‚‹ã‹ã€ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’完全ã«ç„¡åŠ¹ã«ã—ã¦ãã ã•ã„。 +::: + +**例** + +```xml + + 1073741824 + 1024 + 1048576 + 30000000 + +``` + +## query_thread_log {#query_thread_log} + +[log_query_threads=1](../../operations/settings/settings.md#log-query-threads) 設定を使用ã—ã¦å—ä¿¡ã—ãŸã‚¯ã‚¨ãƒªã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’ロギングã™ã‚‹ãŸã‚ã®è¨­å®šã€‚ + +クエリ㯠[system.query_thread_log](../../operations/system-tables/query_thread_log.md#system_tables-query_thread_log) テーブルã«è¨˜éŒ²ã•ã‚Œã€åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯è¨˜éŒ²ã•ã‚Œã¾ã›ã‚“。テーブルã®åå‰ã‚’以下㮠`table` パラメーターã§å¤‰æ›´ã§ãã¾ã™ã€‚ + +ロギングを構æˆã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ãƒ‘ラメーターを使用ã—ã¾ã™: + +- `database` – データベースå。 +- `table` – クエリãŒè¨˜éŒ²ã•ã‚Œã‚‹ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚ +- `partition_by` — システムテーブル㮠[カスタムパーティションキー](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `order_by` - システムテーブル㮠[カスタムソートキー](../../engines/table-engines/mergetree-family/mergetree.md#order_by)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `engine` - システムテーブル㮠[MergeTreeエンジン定義](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)。`partition_by` ã¾ãŸã¯ `order_by` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `flush_interval_milliseconds` – メモリ中ã®ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ãŸã‚ã®é–“隔。 +- `max_size_rows` – ログã®æœ€å¤§è¡Œæ•°ã€‚未フラッシュã®ãƒ­ã‚°æ•°ãŒæœ€å¤§ã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ€ãƒ³ãƒ—ã•ã‚Œã¾ã™ã€‚ +デフォルト: 1048576。 +- `reserved_size_rows` – ログã®ãŸã‚ã«äº‹å‰ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã€‚ +デフォルト: 8192。 +- `buffer_size_rows_flush_threshold` – 行数ã®ã—ãã„値ã§ã€ã“ã‚Œã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +デフォルト: `max_size_rows / 2`。 +- `flush_on_crash` - クラッシュ時ã«ãƒ­ã‚°ã‚’ディスクã«ãƒ€ãƒ³ãƒ—ã™ã‚‹ã‹ã©ã†ã‹ã®æŒ‡ç¤ºã€‚ +デフォルト: false。 +- `storage_policy` – テーブルã§ä½¿ç”¨ã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã®åå‰ï¼ˆã‚ªãƒ—ション) +- `settings` - MergeTreeã®å‹•ä½œã‚’制御ã™ã‚‹ [追加パラメーター](../../engines/table-engines/mergetree-family/mergetree.md/#settings)(オプション)。 + +テーブルãŒå­˜åœ¨ã—ãªã„å ´åˆã€ClickHouseã¯ãれを作æˆã—ã¾ã™ã€‚ClickHouseサーãƒãƒ¼ãŒæ›´æ–°ã•ã‚ŒãŸéš›ã«ã‚¯ã‚¨ãƒªã‚¹ãƒ¬ãƒƒãƒ‰ãƒ­ã‚°ã®æ§‹é€ ãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã€å¤ã„構造ã®ãƒ†ãƒ¼ãƒ–ルã¯ãƒªãƒãƒ¼ãƒ ã•ã‚Œã€æ–°ã—ã„テーブルãŒè‡ªå‹•çš„ã«ä½œæˆã•ã‚Œã¾ã™ã€‚ + +**例** + +``` xml + + system + query_thread_log
    + toMonday(event_date) + 7500 + 1048576 + 8192 + 524288 + false +
    +``` + +## query_views_log {#query_views_log} + +[log_query_views=1](../../operations/settings/settings.md#log-query-views) 設定を使用ã—ã¦å—ä¿¡ã—ãŸã‚¯ã‚¨ãƒªã«ä¾å­˜ã™ã‚‹ãƒ“ュー(ライブビューã€Materialized View ãªã©ï¼‰ã‚’ロギングã™ã‚‹ãŸã‚ã®è¨­å®šã€‚ + +クエリ㯠[system.query_views_log](../../operations/system-tables/query_views_log.md#system_tables-query_views_log) テーブルã«è¨˜éŒ²ã•ã‚Œã€åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯è¨˜éŒ²ã•ã‚Œã¾ã›ã‚“。テーブルã®åå‰ã‚’以下㮠`table` パラメーターã§å¤‰æ›´ã§ãã¾ã™ã€‚ + +ロギングを構æˆã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ãƒ‘ラメーターを使用ã—ã¾ã™: + +- `database` – データベースå。 +- `table` – クエリãŒè¨˜éŒ²ã•ã‚Œã‚‹ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚ +- `partition_by` — システムテーブル㮠[カスタムパーティションキー](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `order_by` - システムテーブル㮠[カスタムソートキー](../../engines/table-engines/mergetree-family/mergetree.md#order_by)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `engine` - システムテーブル㮠[MergeTreeエンジン定義](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)。`partition_by` ã¾ãŸã¯ `order_by` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `flush_interval_milliseconds` – メモリ中ã®ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ãŸã‚ã®é–“隔。 +- `max_size_rows` – ログã®æœ€å¤§è¡Œæ•°ã€‚未フラッシュã®ãƒ­ã‚°æ•°ãŒæœ€å¤§ã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ€ãƒ³ãƒ—ã•ã‚Œã¾ã™ã€‚ +デフォルト: 1048576。 +- `reserved_size_rows` – ログã®ãŸã‚ã«äº‹å‰ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã€‚ +デフォルト: 8192。 +- `buffer_size_rows_flush_threshold` – 行数ã®ã—ãã„値ã§ã€ã“ã‚Œã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +デフォルト: `max_size_rows / 2`。 +- `flush_on_crash` - クラッシュ時ã«ãƒ­ã‚°ã‚’ディスクã«ãƒ€ãƒ³ãƒ—ã™ã‚‹ã‹ã©ã†ã‹ã®æŒ‡ç¤ºã€‚ +デフォルト: false。 +- `storage_policy` – テーブルã§ä½¿ç”¨ã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã®åå‰ï¼ˆã‚ªãƒ—ション) +- `settings` - MergeTreeã®å‹•ä½œã‚’制御ã™ã‚‹ [追加パラメーター](../../engines/table-engines/mergetree-family/mergetree.md/#settings)(オプション)。 + +テーブルãŒå­˜åœ¨ã—ãªã„å ´åˆã€ClickHouseã¯ãれを作æˆã—ã¾ã™ã€‚ClickHouseサーãƒãƒ¼ãŒæ›´æ–°ã•ã‚ŒãŸéš›ã«ã‚¯ã‚¨ãƒªãƒ“ューã®ãƒ­ã‚°ã®æ§‹é€ ãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã€å¤ã„構造ã®ãƒ†ãƒ¼ãƒ–ルã¯ãƒªãƒãƒ¼ãƒ ã•ã‚Œã€æ–°ã—ã„テーブルãŒè‡ªå‹•çš„ã«ä½œæˆã•ã‚Œã¾ã™ã€‚ + +**例** + +``` xml + + system + query_views_log
    + toYYYYMM(event_date) + 7500 + 1048576 + 8192 + 524288 + false +
    +``` + +## text_log {#text_log} + +テキストメッセージをログã«è¨˜éŒ²ã™ã‚‹ãŸã‚ã® [text_log](../../operations/system-tables/text_log.md#system_tables-text_log) システムテーブルã®è¨­å®šã€‚ + +パラメータ: + +- `level` — テーブルã«ä¿å­˜ã•ã‚Œã‚‹æœ€å¤§ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒ¬ãƒ™ãƒ«ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ `Trace`)。 +- `database` — データベースå。 +- `table` — テーブルå。 +- `partition_by` — システムテーブル㮠[カスタムパーティションキー](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `order_by` - システムテーブル㮠[カスタムソートキー](../../engines/table-engines/mergetree-family/mergetree.md#order_by)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `engine` - システムテーブル㮠[MergeTreeエンジン定義](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)。`partition_by` ã¾ãŸã¯ `order_by` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `flush_interval_milliseconds` — メモリ中ã®ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ãŸã‚ã®é–“隔。 +- `max_size_rows` – ログã®æœ€å¤§è¡Œæ•°ã€‚未フラッシュã®ãƒ­ã‚°æ•°ãŒæœ€å¤§ã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ€ãƒ³ãƒ—ã•ã‚Œã¾ã™ã€‚ +デフォルト: 1048576。 +- `reserved_size_rows` – ログã®ãŸã‚ã«äº‹å‰ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã€‚ +デフォルト: 8192。 +- `buffer_size_rows_flush_threshold` – 行数ã®ã—ãã„値ã§ã€ã“ã‚Œã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +デフォルト: `max_size_rows / 2`。 +- `flush_on_crash` - クラッシュ時ã«ãƒ­ã‚°ã‚’ディスクã«ãƒ€ãƒ³ãƒ—ã™ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ã€‚ +デフォルト: false。 +- `storage_policy` – テーブルã§ä½¿ç”¨ã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã®åå‰ï¼ˆã‚ªãƒ—ション) +- `settings` - MergeTreeã®å‹•ä½œã‚’制御ã™ã‚‹ [追加パラメーター](../../engines/table-engines/mergetree-family/mergetree.md/#settings)(オプション)。 + +**例** +```xml + + + notice + system + text_log
    + 7500 + 1048576 + 8192 + 524288 + false + + Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + INTERVAL 30 day +
    +
    +``` + +## trace_log {#trace_log} + +[trace_log](../../operations/system-tables/trace_log.md#system_tables-trace_log) システムテーブルã®æ“作ã«é–¢ã™ã‚‹è¨­å®šã€‚ + +パラメータ: + +- `database` — テーブルをä¿å­˜ã™ã‚‹ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚ +- `table` — テーブルå。 +- `partition_by` — システムテーブル㮠[カスタムパーティションキー](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `order_by` - システムテーブル㮠[カスタムソートキー](../../engines/table-engines/mergetree-family/mergetree.md#order_by)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `engine` - システムテーブル㮠[MergeTreeエンジン定義](../../engines/table-engines/mergetree-family/index.md)。`partition_by` ã¾ãŸã¯ `order_by` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `flush_interval_milliseconds` — メモリ中ã®ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ãŸã‚ã®é–“隔。 +- `max_size_rows` – ログã®æœ€å¤§è¡Œæ•°ã€‚未フラッシュã®ãƒ­ã‚°æ•°ãŒæœ€å¤§ã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ€ãƒ³ãƒ—ã•ã‚Œã¾ã™ã€‚ +デフォルト: 1048576。 +- `reserved_size_rows` – ログã®ãŸã‚ã«äº‹å‰ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã€‚ +デフォルト: 8192。 +- `buffer_size_rows_flush_threshold` – 行数ã®ã—ãã„値ã§ã€ã“ã‚Œã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +デフォルト: `max_size_rows / 2`。 +- `storage_policy` – テーブルã§ä½¿ç”¨ã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã®åå‰ï¼ˆã‚ªãƒ—ション) +- `settings` - MergeTreeã®å‹•ä½œã‚’制御ã™ã‚‹ [追加パラメーター](../../engines/table-engines/mergetree-family/mergetree.md/#settings)(オプション)。 + +デフォルトã®ã‚µãƒ¼ãƒãƒ¼æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ« `config.xml` ã«ã¯ã€ä»¥ä¸‹ã®è¨­å®šã‚»ã‚¯ã‚·ãƒ§ãƒ³ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +``` xml + + system + trace_log
    + toYYYYMM(event_date) + 7500 + 1048576 + 8192 + 524288 + false +
    +``` + +## asynchronous_insert_log {#asynchronous_insert_log} + +éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’記録ã™ã‚‹ãŸã‚ã® [asynchronous_insert_log](../../operations/system-tables/asynchronous_insert_log.md#system_tables-asynchronous_insert_log) システムテーブルã®è¨­å®šã€‚ + +パラメータ: + +- `database` — データベースå。 +- `table` — テーブルå。 +- `partition_by` — システムテーブル㮠[カスタムパーティションキー](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `engine` - システムテーブル㮠[MergeTreeエンジン定義](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)。`partition_by` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `flush_interval_milliseconds` — メモリ中ã®ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ãŸã‚ã®é–“隔。 +- `max_size_rows` – ログã®æœ€å¤§è¡Œæ•°ã€‚未フラッシュã®ãƒ­ã‚°æ•°ãŒæœ€å¤§ã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ€ãƒ³ãƒ—ã•ã‚Œã¾ã™ã€‚ +デフォルト: 1048576。 +- `reserved_size_rows` – ログã®ãŸã‚ã«äº‹å‰ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã€‚ +デフォルト: 8192。 +- `buffer_size_rows_flush_threshold` – 行数ã®ã—ãã„値ã§ã€ã“ã‚Œã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +デフォルト: `max_size_rows / 2`。 +- `flush_on_crash` - クラッシュ時ã«ãƒ­ã‚°ã‚’ディスクã«ãƒ€ãƒ³ãƒ—ã™ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ã€‚ +デフォルト: false。 +- `storage_policy` – テーブルã§ä½¿ç”¨ã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã®åå‰ï¼ˆã‚ªãƒ—ション) + +**例** + +```xml + + + system + asynchronous_insert_log
    + 7500 + toYYYYMM(event_date) + 1048576 + 8192 + 524288 + false + +
    +
    +``` + +## crash_log {#crash_log} + +[crash_log](../../operations/system-tables/crash-log.md) システムテーブルã®æ“作ã«é–¢ã™ã‚‹è¨­å®šã€‚ + +パラメータ: + +- `database` — テーブルをä¿å­˜ã™ã‚‹ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚ +- `table` — テーブルå。 +- `partition_by` — システムテーブル㮠[カスタムパーティションキー](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `order_by` - システムテーブル㮠[カスタムソートキー](../../engines/table-engines/mergetree-family/mergetree.md#order_by)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `engine` - システムテーブル㮠[MergeTreeエンジン定義](../../engines/table-engines/mergetree-family/index.md)。`partition_by` ã¾ãŸã¯ `order_by` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `flush_interval_milliseconds` — メモリ中ã®ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ãŸã‚ã®é–“隔。 +- `max_size_rows` – ログã®æœ€å¤§è¡Œæ•°ã€‚未フラッシュã®ãƒ­ã‚°æ•°ãŒæœ€å¤§ã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ€ãƒ³ãƒ—ã•ã‚Œã¾ã™ã€‚ +デフォルト: 1048576。 +- `reserved_size_rows` – ログã®ãŸã‚ã«äº‹å‰ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã€‚ +デフォルト: 8192。 +- `buffer_size_rows_flush_threshold` – 行数ã®ã—ãã„値ã§ã€ã“ã‚Œã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +デフォルト: `max_size_rows / 2`。 +- `flush_on_crash` - クラッシュ時ã«ãƒ­ã‚°ã‚’ディスクã«ãƒ€ãƒ³ãƒ—ã™ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ã€‚ +デフォルト: false。 +- `storage_policy` – テーブルã§ä½¿ç”¨ã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã®åå‰ï¼ˆã‚ªãƒ—ション) +- `settings` - MergeTreeã®å‹•ä½œã‚’制御ã™ã‚‹ [追加パラメーター](../../engines/table-engines/mergetree-family/mergetree.md/#settings)(オプション)。 + +デフォルトã®ã‚µãƒ¼ãƒãƒ¼æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ« `config.xml` ã«ã¯ã€ä»¥ä¸‹ã®è¨­å®šã‚»ã‚¯ã‚·ãƒ§ãƒ³ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +``` xml + + system + crash_log
    + toYYYYMM(event_date) + 7500 + 1024 + 1024 + 512 + false +
    +``` + +## backup_log {#backup_log} + +`BACKUP` ãŠã‚ˆã³ `RESTORE` æ“作を記録ã™ã‚‹ãŸã‚ã® [backup_log](../../operations/system-tables/backup_log.md) システムテーブルã®è¨­å®šã€‚ + +パラメータ: + +- `database` — データベースå。 +- `table` — テーブルå。 +- `partition_by` — システムテーブル㮠[カスタムパーティションキー](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `order_by` - システムテーブル㮠[カスタムソートキー](../../engines/table-engines/mergetree-family/mergetree.md#order_by)。`engine` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `engine` - システムテーブル㮠[MergeTreeエンジン定義](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)。`partition_by` ã¾ãŸã¯ `order_by` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- `flush_interval_milliseconds` — メモリ中ã®ãƒãƒƒãƒ•ã‚¡ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹ãŸã‚ã®é–“隔。 +- `max_size_rows` – ログã®æœ€å¤§è¡Œæ•°ã€‚未フラッシュã®ãƒ­ã‚°æ•°ãŒæœ€å¤§ã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ€ãƒ³ãƒ—ã•ã‚Œã¾ã™ã€‚ +デフォルト: 1048576。 +- `reserved_size_rows` – ログã®ãŸã‚ã«äº‹å‰ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã€‚ +デフォルト: 8192。 +- `buffer_size_rows_flush_threshold` – 行数ã®ã—ãã„値ã§ã€ã“ã‚Œã«é”ã™ã‚‹ã¨ã€ãƒ­ã‚°ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +デフォルト: `max_size_rows / 2`。 +- `flush_on_crash` - クラッシュ時ã«ãƒ­ã‚°ã‚’ディスクã«ãƒ€ãƒ³ãƒ—ã™ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ã€‚ +デフォルト: false。 +- `storage_policy` – テーブルã§ä½¿ç”¨ã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã®åå‰ï¼ˆã‚ªãƒ—ション)。 +- `settings` - MergeTreeã®å‹•ä½œã‚’制御ã™ã‚‹ [追加パラメーター](../../engines/table-engines/mergetree-family/mergetree.md#settings)(オプション)。 + +**例** + +```xml + + +``` +```xml +system +backup_log
    +1000 +toYYYYMM(event_date) +1048576 +8192 +524288 +false + +
    +
    +``` + +## query_masking_rules {#query-masking-rules} + +æ­£è¦è¡¨ç¾ã«åŸºã¥ãルールã§ã€ã‚¯ã‚¨ãƒªã‚„å…¨ã¦ã®ãƒ­ã‚°ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«é©ç”¨ã•ã‚Œã€ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã§ã‚ã‚‹`system.query_log`ã€`system.text_log`ã€`system.processes`テーブルã€ãŠã‚ˆã³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã•ã‚Œã‚‹ãƒ­ã‚°ã«ä¿å­˜ã•ã‚Œã‚‹å‰ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€SQLクエリã‹ã‚‰ã®æ©Ÿå¯†ãƒ‡ãƒ¼ã‚¿ï¼ˆåå‰ã€ãƒ¡ãƒ¼ãƒ«ã€å€‹äººè­˜åˆ¥å­ã‚„クレジットカード番å·ãªã©ï¼‰ãŒãƒ­ã‚°ã«æ¼æ´©ã™ã‚‹ã®ã‚’防ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +**例** + +```xml + + + hide SSN + (^|\D)\d{3}-\d{2}-\d{4}($|\D) + 000-00-0000 + + +``` + +設定フィールド: +- `name` - ルールã®åå‰ï¼ˆã‚ªãƒ—ショナル) +- `regexp` - RE2互æ›ã®æ­£è¦è¡¨ç¾ï¼ˆå¿…須) +- `replace` - 機密データã®ãŸã‚ã®ç½®æ›æ–‡å­—列(オプショナルã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯å…­ã¤ã®ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ï¼‰ + +マスキングルールã¯ã€èª¤ã£ãŸå½¢å¼ã®ã‚¯ã‚¨ãƒªã‚„éžè§£æžå¯èƒ½ãªã‚¯ã‚¨ãƒªã‹ã‚‰ã®æ©Ÿå¯†ãƒ‡ãƒ¼ã‚¿ã®æ¼æ´©ã‚’防ããŸã‚ã«ã€ã‚¯ã‚¨ãƒªå…¨ä½“ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +`system.events`テーブルã«ã¯ã€å…¨ä½“ã®ã‚¯ã‚¨ãƒªãƒžã‚¹ã‚­ãƒ³ã‚°ãƒ«ãƒ¼ãƒ«ã®ä¸€è‡´æ•°ã‚’示ã™ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼`QueryMaskingRulesMatch`ãŒã‚ã‚Šã¾ã™ã€‚ + +分散クエリ用ã«ã¯ã€å„サーãƒãƒ¼ã‚’別々ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã†ã—ãªã„ã¨ã€ä»–ã®ãƒŽãƒ¼ãƒ‰ã«æ¸¡ã•ã‚Œã‚‹ã‚µãƒ–クエリãŒãƒžã‚¹ã‚­ãƒ³ã‚°ã•ã‚Œãšã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +## remote_servers {#server-settings-remote-servers} + +[分散テーブル](../../engines/table-engines/special/distributed.md)エンジンãŠã‚ˆã³`cluster`テーブル関数ã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®è¨­å®šã€‚ + +**例** + +```xml + +``` + +`incl`属性ã®å€¤ã«ã¤ã„ã¦ã¯ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã€Œ[設定ファイル](../../operations/configuration-files.md#configuration_files)ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**å‚ç…§** + +- [skip_unavailable_shards](../../operations/settings/settings.md#skip_unavailable_shards) +- [クラスター検出](../../operations/cluster-discovery.md) +- [レプリケーテッドデータベースエンジン](../../engines/database-engines/replicated.md) + +## timezone {#timezone} + +サーãƒãƒ¼ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã€‚ + +UTCã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¾ãŸã¯åœ°ç†çš„ãªå ´æ‰€ã®IANA識別å­ã¨ã—ã¦æŒ‡å®šã—ã¾ã™ï¼ˆä¾‹ãˆã°ã€Africa/Abidjan)。 + +タイムゾーンã¯ã€DateTimeフィールドをテキスト形å¼ã§å‡ºåŠ›ã™ã‚‹éš›ï¼ˆç”»é¢è¡¨ç¤ºã‚„ファイルã¸ã®å‡ºåŠ›ï¼‰ã‚„ã€æ–‡å­—列ã‹ã‚‰DateTimeã‚’å–å¾—ã™ã‚‹éš›ã«ã€æ–‡å­—列ã¨DateTimeå½¢å¼ã®é–“ã®å¤‰æ›ã«å¿…è¦ã§ã™ã€‚ã¾ãŸã€å…¥åŠ›ãƒ‘ラメータã«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€æ™‚é–“ã¨æ—¥ä»˜ã‚’æ“作ã™ã‚‹é–¢æ•°ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +```xml +Asia/Istanbul +``` + +**関連情報** + +- [session_timezone](../settings/settings.md#session_timezone) + +## tcp_port {#tcp_port} + +TCPプロトコルを介ã—ã¦ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¨é€šä¿¡ã™ã‚‹ãŸã‚ã®ãƒãƒ¼ãƒˆã€‚ + +**例** + +```xml +9000 +``` + +## tcp_port_secure {#tcp_port_secure} + +クライアントã¨ã®ã‚»ã‚­ãƒ¥ã‚¢é€šä¿¡ã®ãŸã‚ã®TCPãƒãƒ¼ãƒˆã€‚[OpenSSL](#openssl)設定ã¨ã¨ã‚‚ã«ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +**å¯èƒ½ãªå€¤** + +æ­£ã®æ•´æ•°ã€‚ + +**デフォルト値** + +```xml +9440 +``` + +## mysql_port {#mysql_port} + +MySQLプロトコルを介ã—ã¦ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¨é€šä¿¡ã™ã‚‹ãŸã‚ã®ãƒãƒ¼ãƒˆã€‚ + +**å¯èƒ½ãªå€¤** + +リッスンã™ã‚‹ãƒãƒ¼ãƒˆç•ªå·ã‚’指定ã™ã‚‹æ­£ã®æ•´æ•°ã€ã¾ãŸã¯ç„¡åŠ¹ã«ã™ã‚‹ãŸã‚ã®ç©ºã®å€¤ã€‚ + +例 + +```xml +9004 +``` + +## postgresql_port {#postgresql_port} + +PostgreSQLプロトコルを介ã—ã¦ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¨é€šä¿¡ã™ã‚‹ãŸã‚ã®ãƒãƒ¼ãƒˆã€‚ + +**å¯èƒ½ãªå€¤** + +リッスンã™ã‚‹ãƒãƒ¼ãƒˆç•ªå·ã‚’指定ã™ã‚‹æ­£ã®æ•´æ•°ã€ã¾ãŸã¯ç„¡åŠ¹ã«ã™ã‚‹ãŸã‚ã®ç©ºã®å€¤ã€‚ + +例 + +```xml +9005 +``` + +## tmp_path {#tmp-path} + +大è¦æ¨¡ãªã‚¯ã‚¨ãƒªå‡¦ç†ã®ãŸã‚ã®ä¸€æ™‚データをä¿å­˜ã™ã‚‹ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ä¸Šã®ãƒ‘ス。 + +:::note +- 一時データã®ä¿å­˜å…ˆã‚’設定ã™ã‚‹ãŸã‚ã®ã‚ªãƒ—ションã¯ã€`tmp_path` ã€`tmp_policy`ã€`temporary_data_in_cache`ã®ä¸€ã¤ã—ã‹ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- トレーリングスラッシュã¯å¿…é ˆã§ã™ã€‚ +::: + +**例** + +```xml +/var/lib/clickhouse/tmp/ +``` + +## user_files_path {#user_files_path} + +ユーザーファイルをå«ã‚€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã€‚[file()](../../sql-reference/table-functions/file.md)テーブル関数ã€[fileCluster()](../../sql-reference/table-functions/fileCluster.md)テーブル関数ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +```xml +/var/lib/clickhouse/user_files/ +``` + +## user_scripts_path {#user_scripts_path} + +ユーザースクリプトファイルをå«ã‚€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã€‚å¯åŸ·è¡Œãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°[Executable User Defined Functions](../../sql-reference/functions/index.md#executable-user-defined-functions)ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +```xml +/var/lib/clickhouse/user_scripts/ +``` + +## user_defined_path {#user_defined_path} + +ユーザー定義ファイルをå«ã‚€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã€‚[SQLユーザー定義関数](../../sql-reference/functions/index.md#user-defined-functions)ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +```xml +/var/lib/clickhouse/user_defined/ +``` + +## users_config {#users-config} + +以下をå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘ス: + +- ユーザー設定。 +- アクセス権。 +- 設定プロファイル。 +- クオータ設定。 + +**例** + +```xml +users.xml +``` + +## wait_dictionaries_load_at_startup {#wait_dictionaries_load_at_startup} + +ã“ã®è¨­å®šã«ã‚ˆã‚Šã€`dictionaries_lazy_load`ãŒ`false`ã®å ´åˆã®å‹•ä½œã‚’指定ã§ãã¾ã™ã€‚ +(`dictionaries_lazy_load`ãŒ`true`ã®å ´åˆã€ã“ã®è¨­å®šã¯ä½•ã«ã‚‚影響ã—ã¾ã›ã‚“。) + +`wait_dictionaries_load_at_startup`ãŒ`false`ã®å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯èµ·å‹•æ™‚ã«ã™ã¹ã¦ã®Dictionaryã®èª­ã¿è¾¼ã¿ã‚’開始ã—ã€èª­ã¿è¾¼ã¿ã¨ä¸¦è¡Œã—ã¦æŽ¥ç¶šã‚’å—ã‘入れã¾ã™ã€‚ +DictionaryãŒåˆã‚ã¦ã‚¯ã‚¨ãƒªã«ä½¿ç”¨ã•ã‚Œã‚‹ã¨ã€ãã®ã‚¯ã‚¨ãƒªã¯DictionaryãŒèª­ã¿è¾¼ã¾ã‚Œã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™ã€‚ +`wait_dictionaries_load_at_startup`ã‚’`false`ã«è¨­å®šã™ã‚‹ã¨ã€ClickHouseã®èµ·å‹•ãŒé€Ÿããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€ä¸€éƒ¨ã®ã‚¯ã‚¨ãƒªã¯é…ã実行ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼ˆDictionaryã®èª­ã¿è¾¼ã¿ã‚’å¾…æ©Ÿã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã§ã™ï¼‰ã€‚ + +`wait_dictionaries_load_at_startup`ãŒ`true`ã®å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯ã™ã¹ã¦ã®Dictionaryã®èª­ã¿è¾¼ã¿ãŒå®Œäº†ã™ã‚‹ã¾ã§èµ·å‹•æ™‚ã«å¾…æ©Ÿã—(正常ã«èª­ã¿è¾¼ã¾ã‚Œã‚‹ã‹ã©ã†ã‹ã¯å•ã‚ãšï¼‰ã€ãã®å¾Œã«æŽ¥ç¶šã‚’å—ã‘入れるよã†ã«ãªã‚Šã¾ã™ã€‚ + +デフォルトã¯`true`ã§ã™ã€‚ + +**例** + +```xml +true +``` + +## zookeeper {#server-settings_zookeeper} + +ClickHouseãŒ[ZooKeeper](http://zookeeper.apache.org/)クラスターã¨é€£æºã™ã‚‹ãŸã‚ã«å¿…è¦ãªè¨­å®šã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ + +ClickHouseã¯ã€ãƒ¬ãƒ—リケーテッドテーブルを使用ã™ã‚‹éš›ã«ãƒ¬ãƒ—リカã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã«ZooKeeperを使用ã—ã¾ã™ã€‚レプリケーテッドテーブルを使用ã—ãªã„å ´åˆã€ã“ã®ãƒ‘ラメータセクションã¯çœç•¥ã§ãã¾ã™ã€‚ + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯ä»¥ä¸‹ã®ãƒ‘ラメータãŒå«ã¾ã‚Œã¾ã™ï¼š + +- `node` — ZooKeeperエンドãƒã‚¤ãƒ³ãƒˆã€‚複数ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’設定ã§ãã¾ã™ã€‚ + + 例: + +```xml + + example_host + 2181 + +``` + + `index`属性ã¯ã€ZooKeeperクラスターã«æŽ¥ç¶šã—よã†ã¨ã™ã‚‹ã¨ãã®ãƒŽãƒ¼ãƒ‰ã®é †åºã‚’指定ã—ã¾ã™ã€‚ + +- `session_timeout_ms` — クライアントセッションã®æœ€å¤§ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚’ミリ秒ã§æŒ‡å®šã€‚ +- `operation_timeout_ms` — 1ã¤ã®æ“作ã®æœ€å¤§ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚’ミリ秒ã§æŒ‡å®šã€‚ +- `root` — ClickHouseサーãƒãƒ¼ãŒä½¿ç”¨ã™ã‚‹znodeã®ãƒ«ãƒ¼ãƒˆã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹[znode](http://zookeeper.apache.org/doc/r3.5.5/zookeeperOver.html#Nodes+and+ephemeral+nodes)。オプション。 +- `fallback_session_lifetime.min` - zookeeper_load_balancing戦略ã«ã‚ˆã£ã¦è§£æ±ºã•ã‚ŒãŸæœ€åˆã®zookeeperホストãŒåˆ©ç”¨ã§ããªã„å ´åˆã€zookeeperセッションã®å¯¿å‘½ã‚’フォールãƒãƒƒã‚¯ãƒŽãƒ¼ãƒ‰ã«é™å®šã€‚ã“ã‚Œã¯è² è·åˆ†æ•£ç›®çš„ã§ã€ç‰¹å®šã®zookeeperホストã¸ã®éŽå‰°ãªè² è·ã‚’é¿ã‘ã‚‹ãŸã‚ã«è¡Œã‚ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã¯ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æœ€å°æœŸé–“を設定ã—ã¾ã™ã€‚秒ã§è¨­å®šã€‚オプション。デフォルトã¯3時間。 +- `fallback_session_lifetime.max` - zookeeper_load_balancing戦略ã«ã‚ˆã£ã¦è§£æ±ºã•ã‚ŒãŸæœ€åˆã®zookeeperホストãŒåˆ©ç”¨ã§ããªã„å ´åˆã€zookeeperセッションã®å¯¿å‘½ã‚’フォールãƒãƒƒã‚¯ãƒŽãƒ¼ãƒ‰ã«é™å®šã€‚ã“ã‚Œã¯è² è·åˆ†æ•£ç›®çš„ã§ã€ç‰¹å®šã®zookeeperホストã¸ã®éŽå‰°ãªè² è·ã‚’é¿ã‘ã‚‹ãŸã‚ã«è¡Œã‚ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã¯ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æœ€å¤§æœŸé–“を設定ã—ã¾ã™ã€‚秒ã§è¨­å®šã€‚オプション。デフォルトã¯6時間。 +- `identity` — ClickHouseサーãƒãƒ¼ãŒè¦æ±‚ã•ã‚ŒãŸznodeã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«å¿…è¦ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ãƒ‘スワード。オプション。 +- zookeeper_load_balancing - ZooKeeperノードã®é¸æŠžã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’指定。 + * random - ZooKeeperノードをランダムã«é¸æŠžã€‚ + * in_order - 最åˆã®ZooKeeperノードをé¸æŠžã—ã€åˆ©ç”¨ã§ããªã„å ´åˆã¯æ¬¡ã®ãƒŽãƒ¼ãƒ‰ã‚’é¸æŠžã€‚ + * nearest_hostname - サーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆåã«æœ€ã‚‚è¿‘ã„ホストåã‚’æŒã¤ZooKeeperノードをé¸æŠžã€ãƒ›ã‚¹ãƒˆåã¯åå‰ã®æŽ¥é ­è¾žã§æ¯”較ã•ã‚Œã¾ã™ã€‚ + * hostname_levenshtein_distance - nearest_hostnameã¨åŒã˜ã§ã™ãŒã€ãƒ¬ãƒ¼ãƒ™ãƒ³ã‚·ãƒ¥ã‚¿ã‚¤ãƒ³è·é›¢å½¢å¼ã§ãƒ›ã‚¹ãƒˆåを比較。 + * first_or_random - 最åˆã®ZooKeeperノードをé¸æŠžã—ã€åˆ©ç”¨ã§ããªã„å ´åˆã¯æ®‹ã‚‹ZooKeeperノードをランダムã«é¸æŠžã€‚ + * round_robin - 最åˆã®ZooKeeperノードをé¸æŠžã—ã€å†æŽ¥ç¶šãŒç™ºç”Ÿã™ã‚‹ã¨æ¬¡ã®ãƒŽãƒ¼ãƒ‰ã‚’é¸æŠžã€‚ +- `use_compression` — セキュリティープロトコルã«ãŠã„ã¦ã€Keeperプロトコル内ã®åœ§ç¸®ã‚’有効ã«ã—ã¾ã™ã€‚ + +**設定ã®ä¾‹** + +```xml + + + example1 + 2181 + + + example2 + 2181 + + 30000 + 10000 + + /path/to/zookeeper/node + + user:password + + random + +``` + +**関連リンク** + +- [レプリケーション](../../engines/table-engines/mergetree-family/replication.md) +- [ZooKeeperプログラマーズガイド](http://zookeeper.apache.org/doc/current/zookeeperProgrammers.html) +- [ClickHouseã¨Zookeeperé–“ã®ã‚ªãƒ—ションã§ã®ã‚»ã‚­ãƒ¥ã‚¢é€šä¿¡](../ssl-zookeeper.md#secured-communication-with-zookeeper) + +## use_minimalistic_part_header_in_zookeeper {#server-settings-use_minimalistic_part-header-in-zookeeper} + +ZooKeeperã«ãŠã‘るデータパートヘッダーã®ä¿å­˜æ–¹æ³•ã€‚ + +ã“ã®è¨­å®šã¯`MergeTree`ファミリーã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚次ã®æ–¹æ³•ã§æŒ‡å®šã§ãã¾ã™ï¼š + +- `config.xml`ファイルã®[merge_tree](#merge_tree)セクションã§ã®ã‚°ãƒ­ãƒ¼ãƒãƒ«æŒ‡å®šã€‚ + + ClickHouseã¯ã‚µãƒ¼ãƒãƒ¼ä¸Šã®å…¨ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ã“ã®è¨­å®šã‚’使用ã—ã¾ã™ã€‚ã„ã¤ã§ã‚‚設定を変更ã§ãã¾ã™ã€‚既存ã®ãƒ†ãƒ¼ãƒ–ルã¯è¨­å®šãŒå¤‰æ›´ã•ã‚ŒãŸã¨ãã«å‹•ä½œã‚’変更ã—ã¾ã™ã€‚ + +- å„テーブルã”ã¨ã€‚ + + テーブルを作æˆã™ã‚‹ã¨ãã«ã€å¯¾å¿œã™ã‚‹[エンジン設定](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)を指定ã—ã¾ã™ã€‚ã“ã®è¨­å®šã‚’æŒã¤æ—¢å­˜ã®ãƒ†ãƒ¼ãƒ–ルã®å‹•ä½œã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«è¨­å®šãŒå¤‰æ›´ã•ã‚Œã¦ã‚‚変ã‚ã‚Šã¾ã›ã‚“。 + +**å¯èƒ½ãªå€¤** + +- 0 — 機能ã¯ã‚ªãƒ•ã§ã™ã€‚ +- 1 — 機能ã¯ã‚ªãƒ³ã§ã™ã€‚ + +`use_minimalistic_part_header_in_zookeeper = 1`ã®å ´åˆã€[レプリケーテッド](../../engines/table-engines/mergetree-family/replication.md)テーブルã¯ã€å˜ä¸€ã®`znode`を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ‘ートã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’コンパクトã«ä¿å­˜ã—ã¾ã™ã€‚テーブルã«å¤šãã®ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã®ä¿å­˜æ–¹æ³•ã¯ZooKeeper内ã§ä¿å­˜ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’大幅ã«æ¸›å°‘ã•ã›ã¾ã™ã€‚ + +:::note +`use_minimalistic_part_header_in_zookeeper = 1`ã‚’é©ç”¨ã—ãŸå¾Œã€ClickHouseサーãƒãƒ¼ã‚’ã“ã®è¨­å®šã‚’サãƒãƒ¼ãƒˆã—ãªã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。クラスター内ã®ã‚µãƒ¼ãƒãƒ¼ã‚’アップグレードã™ã‚‹éš›ã«ã¯æ…Žé‡ã«è¡Œã£ã¦ãã ã•ã„。一度ã«ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã‚’アップグレードã™ã‚‹ã“ã¨ã¯é¿ã‘ã¦ãã ã•ã„。ClickHouseã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’テスト環境ã¾ãŸã¯ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å†…ã®ä¸€éƒ¨ã®ã‚µãƒ¼ãƒãƒ¼ã§ãƒ†ã‚¹ãƒˆã™ã‚‹ã“ã¨ãŒã‚ˆã‚Šå®‰å…¨ã§ã™ã€‚ + +ã“ã®è¨­å®šã§æ—¢ã«ä¿å­˜ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ‘ートヘッダーã¯ã€ä»¥å‰ã®ï¼ˆéžã‚³ãƒ³ãƒ‘クトãªï¼‰è¡¨ç¾ã«å¾©å…ƒã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +::: + +**デフォルト値:** 0。 + +## distributed_ddl {#server-settings-distributed_ddl} + +クラスター上ã§[分散DDLクエリ](../../sql-reference/distributed-ddl.md)(CREATEã€DROPã€ALTERã€RENAME)を実行ã—ã¾ã™ã€‚ +[ZooKeeper](#server-settings_zookeeper)ãŒæœ‰åŠ¹ãªå ´åˆã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +``内ã§æ§‹æˆå¯èƒ½ãªè¨­å®šã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +- **path**: Keeper内ã§åˆ†æ•£DDLクエリã®ãŸã‚ã®`task_queue`ã®ãƒ‘ス +- **profile**: DDLクエリを実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ—ロファイル +- **pool_size**: åŒæ™‚ã«å®Ÿè¡Œã§ãã‚‹`ON CLUSTER`クエリã®æ•° +- **max_tasks_in_queue**: キュー内ã«å­˜åœ¨ã§ãるタスクã®æœ€å¤§æ•°ã€‚デフォルトã¯1,000 +- **task_max_lifetime**: ノードã®å¹´é½¢ãŒã“ã®å€¤ã‚’超ãˆãŸå ´åˆã«å‰Šé™¤ã€‚デフォルトã¯`7 * 24 * 60 * 60`(1週間) +- **cleanup_delay_period**: 最後ã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ãŒã“ã®æœŸé–“以æ¥è¡Œã‚ã‚Œã¦ã„ãªã„å ´åˆã€æ–°ã—ã„ノードイベントをå—ä¿¡ã—ãŸå¾Œã«æ¸…掃ãŒé–‹å§‹ã•ã‚Œã¾ã™ã€‚デフォルトã¯60秒 + +**例** + +```xml + + + /clickhouse/task_queue/ddl + + + default + + + 1 + + + + 604800 + + + 60 + + + 1000 + +``` + +## access_control_path {#access_control_path} + +SQLコマンドã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„ロールã®è¨­å®šã‚’ClickHouseサーãƒãƒ¼ãŒä¿å­˜ã™ã‚‹ãƒ•ã‚©ãƒ«ãƒ€ã¸ã®ãƒ‘ス。 + +デフォルト値: `/var/lib/clickhouse/access/`。 + +**関連情報** + +- [アクセス制御ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†](../../guides/sre/user-management/index.md#access-control) + +## user_directories {#user_directories} + +設定ファイルã«å«ã¾ã‚Œã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³ï¼š +- 事å‰å®šç¾©ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’å«ã‚€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。 +- SQLコマンドã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒä¿å­˜ã•ã‚Œã‚‹ãƒ•ã‚©ãƒ«ãƒ€ã¸ã®ãƒ‘ス。 +- SQLコマンドã«ã‚ˆã£ã¦ä½œæˆã•ã‚Œã€è¤‡è£½ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒä¿å­˜ã•ã‚Œã‚‹ZooKeeperノードã®ãƒ‘ス(エクスペリメンタル)。 + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€[`users_config`](../../operations/server-configuration-parameters/settings.md#users-config)ãŠã‚ˆã³[`access_control_path`](../../operations/server-configuration-parameters/settings.md#access_control_path)ã®ãƒ‘スã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。 + +`user_directories`セクションã¯ä»»æ„ã®æ•°ã®é …目をå«ã‚€ã“ã¨ãŒã§ãã€é …ç›®ã®é †åºã¯ãã®å„ªå…ˆé †ä½ã‚’æ„味ã—ã¾ã™ï¼ˆä¸Šä½ã®é …ç›®ã¯å„ªå…ˆé †ä½ãŒé«˜ã„)。 + +**例** + +```xml + + + /etc/clickhouse-server/users.xml + + + /var/lib/clickhouse/access/ + + +``` + +ユーザーã€ãƒ­ãƒ¼ãƒ«ã€è¡Œãƒãƒªã‚·ãƒ¼ã€ã‚¯ã‚ªãƒ¼ã‚¿ã€ãƒ—ロファイルã¯ZooKeeperã«ã‚‚ä¿å­˜ã§ãã¾ã™ï¼š + +```xml + + + /etc/clickhouse-server/users.xml + + + /clickhouse/access/ + + +``` + +`memory`セクション — 情報ã®ä¿å­˜ã‚’メモリã«ã®ã¿è¡Œã„ã€ãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®æ›¸ãè¾¼ã¿ã‚’è¡Œã‚ãªã„ã€`ldap`セクション — 情報ã®ä¿å­˜ã‚’LDAPサーãƒãƒ¼ã«ä¾å­˜ã™ã‚‹ã€ã¨ã„ã†ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚‚定義ã§ãã¾ã™ã€‚ + +LDAPサーãƒãƒ¼ã‚’リモートユーザーディレクトリã¨ã—ã¦ã€ãƒ­ãƒ¼ã‚«ãƒ«ã«å®šç¾©ã•ã‚Œã¦ã„ãªã„ユーザーã¨ã—ã¦è¿½åŠ ã™ã‚‹ã«ã¯ã€å˜ä¸€ã®`ldap`セクションを指定ã—ã€ä»¥ä¸‹ã®ãƒ‘ラメータを定義ã—ã¾ã™: +- `server` — `ldap_servers`設定セクションã§å®šç¾©ã•ã‚ŒãŸLDAPサーãƒãƒ¼åã®ä¸€ã¤ã€‚ã“ã®ãƒ‘ラメータã¯å¿…é ˆã§ç©ºã«ã§ãã¾ã›ã‚“。 +- `roles` — LDAPサーãƒãƒ¼ã‹ã‚‰å–å¾—ã—ãŸå„ユーザーã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ãƒ­ãƒ¼ã‚«ãƒ«ã§å®šç¾©ã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã®ãƒªã‚¹ãƒˆã‚’æŒã¤ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã€‚ロールãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€èªè¨¼å¾Œãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä½•ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚‚実行ã§ãã¾ã›ã‚“。列挙ã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã®ã„ãšã‚Œã‹ãŒèªè¨¼æ™‚ã«ãƒ­ãƒ¼ã‚«ãƒ«ã§å®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã€èªè¨¼ã¯ä¸æ­£ãªãƒ‘スワードã§ã‚ã‚‹ã‹ã®ã‚ˆã†ã«å¤±æ•—ã—ã¾ã™ã€‚ + +**例** + +```xml + + my_ldap_server + + + + + +``` + +## total_memory_profiler_step {#total-memory-profiler-step} + +メモリã®ãƒ”ーク割り当ã¦æ‰‹é †ã”ã¨ã«ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’å–å¾—ã™ã‚‹ãƒ¡ãƒ¢ãƒªã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’設定ã—ã¾ã™ã€‚データã¯`query_id`ãŒç©ºæ–‡å­—列ã«ç­‰ã—ã„`system.trace_log`システムテーブルã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値:`4194304`。 + +## total_memory_tracker_sample_probability {#total-memory-tracker-sample-probability} + +ランダム割り当ã¦ãŠã‚ˆã³é–‹æ”¾ã®åŽé›†ã‚’有効ã«ã—ã€`system.trace_log`システムテーブルã«`MemorySample`ã¨ã—ã¦æŒ‡å®šã•ã‚ŒãŸç¢ºçŽ‡ã§æ›¸ãè¾¼ã¿ã¾ã™ã€‚確率ã¯ã€å‰²ã‚Šå½“ã¦ã¾ãŸã¯é–‹æ”¾æ™‚ã®ã‚µã‚¤ã‚ºã«é–¢ä¿‚ãªãã€å„æ“作ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚事å‰ã«ãƒˆãƒ©ãƒƒã‚­ãƒ³ã‚°ã•ã‚Œã¦ã„ãªã„メモリé‡ãŒç„¡è¦–ã•ã‚Œãªã„メモリ制é™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯`4`MiB)を超ãˆã‚‹ã¨ãã«ã®ã¿ã‚µãƒ³ãƒ—リングãŒè¡Œã‚ã‚Œã¾ã™ã€‚`total_memory_profiler_step`ãŒä½Žã„å ´åˆã€ã“れをã•ã‚‰ã«ä½Žãã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚éžå¸¸ã«è©³ç´°ã«ã‚µãƒ³ãƒ—リングã™ã‚‹ã«ã¯ã€`total_memory_profiler_step`ã‚’`1`ã«è¨­å®šã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — ランダムãªå‰²ã‚Šå½“ã¦ãŠã‚ˆã³é–‹æ”¾ã®`system.trace_log`システムテーブルã¸ã®æ›¸ãè¾¼ã¿ã¯ç„¡åŠ¹ã€‚ + +デフォルト値:`0`。 + +## compiled_expression_cache_size {#compiled-expression-cache-size} + +[コンパイルã•ã‚ŒãŸå¼](../../operations/caches.md)ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値:`134217728`。 + +## compiled_expression_cache_elements_size {#compiled_expression_cache_elements_size} + +[コンパイルã•ã‚ŒãŸå¼](../../operations/caches.md)ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºï¼ˆè¦ç´ å˜ä½ï¼‰ã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値:`10000`。 + +## display_secrets_in_show_and_select {#display_secrets_in_show_and_select} + +`SHOW`ãŠã‚ˆã³`SELECT`クエリã§ã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãƒ†ãƒ¼ãƒ–ル関数ã€ãŠã‚ˆã³Dictionaryã®æ©Ÿå¯†æƒ…å ±ã®è¡¨ç¤ºã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +機密情報を表示ã—ãŸã„ユーザー㯠+[`format_display_secrets_in_show_and_select`フォーマット設定](../settings/formats#format_display_secrets_in_show_and_select) +をオンã«ã—〠+[`displaySecretsInShowAndSelect`](../../sql-reference/statements/grant#display-secrets)特権をæŒãŸã­ã°ãªã‚Šã¾ã›ã‚“。 + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 無効。 +- 1 — 有効。 + +デフォルト値:0。 + +## proxy {#proxy} + +S3ストレージã€S3テーブル関数ã€ãã—ã¦URL関数ã§ç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹HTTPãŠã‚ˆã³HTTPSリクエストã®ãƒ—ロキシサーãƒãƒ¼ã‚’定義ã—ã¾ã™ã€‚ + +プロキシサーãƒãƒ¼ã¯ã€ç’°å¢ƒå¤‰æ•°ã€ãƒ—ロキシリストã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ—ロキシリゾルãƒã§å®šç¾©ã§ãã¾ã™ã€‚ + +特定ã®ãƒ›ã‚¹ãƒˆã«å¯¾ã™ã‚‹ãƒ—ロキシサーãƒãƒ¼ã®ãƒã‚¤ãƒ‘スもã€`no_proxy`を使用ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### 環境変数 + +`http_proxy`ã¨`https_proxy`ã®ç’°å¢ƒå¤‰æ•°ã‚’指定ã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€ç‰¹å®šã®ãƒ—ロトコル用ã®ãƒ—ロキシサーãƒãƒ¼ã‚’指定ã§ãã¾ã™ã€‚システム上ã§è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ã‚·ãƒ¼ãƒ ãƒ¬ã‚¹ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +ã“ã‚Œã¯ã€ç‰¹å®šã®ãƒ—ロトコルã«å¯¾ã—ã¦1ã¤ã®ãƒ—ロキシサーãƒãƒ¼ãŒã‚ã‚Šã€ãã®ãƒ—ロキシサーãƒãƒ¼ãŒå¤‰æ›´ã•ã‚Œãªã„å ´åˆã«æœ€ã‚‚シンプルãªã‚¢ãƒ—ローãƒã§ã™ã€‚ + +### プロキシリスト + +ã“ã®ã‚¢ãƒ—ローãƒã§ã¯ã€1ã¤ã¾ãŸã¯è¤‡æ•°ã®ãƒ—ロトコルã«å¯¾ã™ã‚‹ãƒ—ロキシサーãƒãƒ¼ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚複数ã®ãƒ—ロキシサーãƒãƒ¼ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ã‚µãƒ¼ãƒãƒ¼é–“ã§è² è·ã‚’分散ã™ã‚‹ãŸã‚ã«ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ­ãƒ“ンベースã§ã•ã¾ã–ã¾ãªãƒ—ロキシを使用ã—ã¾ã™ã€‚特定ã®ãƒ—ロトコルã«å¯¾ã—ã¦è¤‡æ•°ã®ãƒ—ロキシサーãƒãƒ¼ãŒã‚ã‚Šã€ãƒ—ロキシサーãƒãƒ¼ã®ãƒªã‚¹ãƒˆãŒå¤‰æ›´ã•ã‚Œãªã„å ´åˆã«ã¯ã€æœ€ã‚‚シンプルãªã‚¢ãƒ—ローãƒã§ã™ã€‚ + +### 設定テンプレート + +```xml + + + http://proxy1 + http://proxy2:3128 + + + http://proxy1:3128 + + +``` + +`` フィールド + +* `` - 1ã¤ä»¥ä¸Šã®HTTPプロキシã®ãƒªã‚¹ãƒˆ +* `` - 1ã¤ä»¥ä¸Šã®HTTPSプロキシã®ãƒªã‚¹ãƒˆ + +``ãŠã‚ˆã³``フィールド + +* `` - プロキシã®URI + +### リモートプロキシリゾルム+ +プロキシサーãƒãƒ¼ãŒå‹•çš„ã«å¤‰ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãã®å ´åˆã€ãƒªã‚¾ãƒ«ãƒã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’定義ã§ãã¾ã™ã€‚ClickHouseã¯ãã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã«ç©ºã®GETリクエストをé€ä¿¡ã—ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒªã‚¾ãƒ«ãƒã¯ãƒ—ロキシã®ãƒ›ã‚¹ãƒˆã‚’è¿”ã™ã¹ãã§ã™ã€‚ãれをClickHouseã¯æ¬¡ã®ãƒ†ãƒ³ãƒ—レートを使用ã—ã¦ãƒ—ロキシURIã‚’å½¢æˆã—ã¾ã™: `{proxy_scheme}://{proxy_host}:{proxy_port}` + +### 設定テンプレート + +```xml + + + + http://resolver:8080/hostname + http + 80 + 10 + + + + + + http://resolver:8080/hostname + http + 3128 + 10 + + + +``` + +`` フィールド + +* `` - 1ã¤ä»¥ä¸Šã®ãƒªã‚¾ãƒ«ãƒã®ãƒªã‚¹ãƒˆ +* `` - 1ã¤ä»¥ä¸Šã®ãƒªã‚¾ãƒ«ãƒã®ãƒªã‚¹ãƒˆ + +``ãŠã‚ˆã³``フィールド + +* `` - リゾルãƒã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆãªã©ã®è©³ç´°æƒ…報。 + 複数ã®``è¦ç´ ã‚’é…ç½®ã§ãã¾ã™ãŒã€ç‰¹å®šã®ãƒ—ロトコルã«å¯¾ã—ã¦ã¯æœ€åˆã®``ã®ã¿ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ãれ以é™ã®``è¦ç´ ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€å¿…è¦ã§ã‚ã‚Œã°ã€ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒªã‚¾ãƒ«ãƒã«ã‚ˆã£ã¦å®Ÿè£…ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +`` フィールド + +* `` - プロキシリゾルãƒã®URI +* `` - 最終プロキシURIã®ãƒ—ロトコル。 `http`ã‹`https`ã®ã„ãšã‚Œã‹ãŒä½¿ç”¨å¯èƒ½ã§ã™ã€‚ +* `` - プロキシリゾルãƒã®ãƒãƒ¼ãƒˆç•ªå· +* `` - リゾルãƒã‹ã‚‰ã®å€¤ã‚’ClickHouseãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã™ã‚‹æ™‚間(秒å˜ä½ï¼‰ã€‚ã“ã®å€¤ã‚’0ã«è¨­å®šã™ã‚‹ã¨ã€ClickHouseã¯å„HTTPã¾ãŸã¯HTTPSリクエストã”ã¨ã«ãƒªã‚¾ãƒ«ãƒã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ + +### å„ªå…ˆé †ä½ + +プロキシ設定ã®å„ªå…ˆé †ä½ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +1. リモートプロキシリゾルム+2. プロキシリスト +3. 環境変数 + +ClickHouseã¯è¦æ±‚ã•ã‚ŒãŸãƒ—ロトコルã«ã¤ã„ã¦æœ€ã‚‚優先ã•ã‚Œã‚‹ãƒªã‚¾ãƒ«ãƒã‚¿ã‚¤ãƒ—を確èªã—ã¾ã™ã€‚ãã‚ŒãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã€æ¬¡ã«å„ªå…ˆã•ã‚Œã‚‹ãƒªã‚¾ãƒ«ãƒã‚¿ã‚¤ãƒ—を確èªã—ã€ç’°å¢ƒãƒªã‚¾ãƒ«ãƒã«åˆ°é”ã—ã¾ã™ã€‚よã£ã¦ã€ãƒªã‚¾ãƒ«ãƒã‚¿ã‚¤ãƒ—ã¯ãƒŸãƒƒã‚¯ã‚¹ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +### disable_tunneling_for_https_requests_over_http_proxy {#disable_tunneling_for_https_requests_over_http_proxy} + +デフォルトã§ã¯ã€ãƒˆãƒ³ãƒãƒªãƒ³ã‚°ï¼ˆã™ãªã‚ã¡`HTTP CONNECT`)ã¯`HTTP`プロキシ経由ã§ã®`HTTPS`リクエスト作æˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã§ãれを無効ã«ã§ãã¾ã™ã€‚ + +### no_proxy +デフォルトã§ã¯ã€ã™ã¹ã¦ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ãƒ—ロキシを通ã˜ã¦è¡Œã‚ã‚Œã¾ã™ã€‚特定ã®ãƒ›ã‚¹ãƒˆã«å¯¾ã—ã¦ãれを無効ã«ã™ã‚‹ãŸã‚ã«ã€`no_proxy`変数を設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +プロキシ設定ã§ãƒªã‚¹ãƒˆãŠã‚ˆã³ãƒªãƒ¢ãƒ¼ãƒˆãƒªã‚¾ãƒ«ãƒã¨ä¸€ç·’ã«ä½¿ã†ãŸã‚ã«ã¯``å¥ã®ä¸­ã§è¨­å®šã—ã€ç’°å¢ƒãƒªã‚¾ãƒ«ãƒã«ã¯ç’°å¢ƒå¤‰æ•°ã¨ã—ã¦è¨­å®šã§ãã¾ã™ã€‚ +IPアドレスã€ãƒ‰ãƒ¡ã‚¤ãƒ³ã€ã‚µãƒ–ドメインã€ãã—ã¦å®Œå…¨ãƒã‚¤ãƒ‘ス用ã®`'*'`ワイルドカードをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚先頭ã®ãƒ‰ãƒƒãƒˆã¯ã‚«ãƒ¼ãƒ«ã¨åŒæ§˜ã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +例: + +以下ã®è¨­å®šã§ã¯ã€`clickhouse.cloud`ã¨ãã®ã™ã¹ã¦ã®ã‚µãƒ–ドメイン(例ã€`auth.clickhouse.cloud`)ã¸ã®ãƒ—ロキシリクエストãŒãƒã‚¤ãƒ‘スã•ã‚Œã¾ã™ã€‚ +GitLabã«é–¢ã—ã¦ã‚‚ã€å…ˆé ­ã«ãƒ‰ãƒƒãƒˆãŒã‚ã£ã¦ã‚‚åŒæ§˜ã§ã™ã€‚`gitlab.com`ãŠã‚ˆã³`about.gitlab.com`ã¯ã©ã¡ã‚‰ã‚‚プロキシをãƒã‚¤ãƒ‘スã—ã¾ã™ã€‚ + +```xml + + clickhouse.cloud,.gitlab.com + + http://proxy1 + http://proxy2:3128 + + + http://proxy1:3128 + + +``` + +## max_materialized_views_count_for_table {#max_materialized_views_count_for_table} + +テーブルã«ã‚¢ã‚¿ãƒƒãƒã•ã‚ŒãŸãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®æ•°ã®åˆ¶é™ã€‚ +ã“ã“ã§ã¯ç›´æŽ¥ä¾å­˜ã™ã‚‹ãƒ“ューã®ã¿ãŒè€ƒæ…®ã•ã‚Œã¦ãŠã‚Šã€1ã¤ã®ãƒ“ューã®ä¸Šã«ã‚‚ã†1ã¤ã®ãƒ“ューを作æˆã™ã‚‹ã“ã¨ã¯è€ƒæ…®ã•ã‚Œã¾ã›ã‚“。 + +デフォルト値:`0`。 + +## format_alter_operations_with_parentheses {#format_alter_operations_with_parentheses} + +真ã®å ´åˆã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸã‚¯ã‚¨ãƒªã§å¤‰æ›´æ“作ãŒæ‹¬å¼§ã§å›²ã¾ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸå¤‰æ›´ã‚¯ã‚¨ãƒªã®è§£æžãŒæ›–昧ã•ã‚’減少ã•ã›ã¾ã™ã€‚ + +タイプ: Bool + +デフォルト: 0 + +## ignore_empty_sql_security_in_create_view_query {#ignore_empty_sql_security_in_create_view_query} + +真ã®å ´åˆã€ClickHouseã¯CREATE VIEWクエリã®ç©ºã®SQLセキュリティステートメントã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚’書ãè¾¼ã¿ã¾ã›ã‚“。 + +:::note +ã“ã®è¨­å®šã¯ç§»è¡ŒæœŸé–“ã«ã®ã¿å¿…è¦ã§ã‚ã‚Šã€24.4ã§å»ƒæ­¢äºˆå®šã§ã™ã€‚ +::: + +タイプ: Bool + +デフォルト: 1 + +## merge_workload {#merge_workload} + +マージã¨ä»–ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰é–“ã§ã®ãƒªã‚½ãƒ¼ã‚¹ã®åˆ©ç”¨ãŠã‚ˆã³å…±æœ‰æ–¹æ³•ã‚’調整ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚指定ã•ã‚ŒãŸå€¤ã¯ã™ã¹ã¦ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã«å¯¾ã—ã¦`workload`設定値ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚マージツリー設定ã«ã‚ˆã£ã¦ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰å¯èƒ½ã§ã™ã€‚ + +デフォルト値: "default" + +**å‚ç…§** +- [ワークロードスケジューリング](/docs/ja/operations/workload-scheduling.md) + +## mutation_workload {#mutation_workload} + +çªç„¶ã®ãƒˆãƒ©ãƒ³ã‚¹ãƒ•ã‚©ãƒ¼ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã¨ä»–ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰é–“ã§ã®ãƒªã‚½ãƒ¼ã‚¹ã®åˆ©ç”¨ãŠã‚ˆã³å…±æœ‰æ–¹æ³•ã‚’調整ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚指定ã•ã‚ŒãŸå€¤ã¯ã™ã¹ã¦ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰çªç„¶ã®ãƒˆãƒ©ãƒ³ã‚¹ãƒ•ã‚©ãƒ¼ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã«å¯¾ã—ã¦`workload`設定値ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚マージツリー設定ã«ã‚ˆã£ã¦ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰å¯èƒ½ã§ã™ã€‚ + +デフォルト値: "default" + +**å‚ç…§** +- [ワークロードスケジューリング](/docs/ja/operations/workload-scheduling.md) + +## workload_path {#workload_path} + +ã™ã¹ã¦ã®`CREATE WORKLOAD`ãŠã‚ˆã³`CREATE RESOURCE`クエリã®ãŸã‚ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã€‚デフォルトã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®ä½œæ¥­ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…ã®`/workload/`フォルダãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +```xml +/var/lib/clickhouse/workload/ +``` + +**å‚ç…§** +- [ワークロード階層](/docs/ja/operations/workload-scheduling.md#workloads) +- [workload_zookeeper_path](#workload_zookeeper_path) + +## workload_zookeeper_path {#workload_zookeeper_path} + +ã™ã¹ã¦ã®`CREATE WORKLOAD`ãŠã‚ˆã³`CREATE RESOURCE`クエリをä¿å­˜ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ZooKeeperノードã¸ã®ãƒ‘ス。整åˆæ€§ã®ãŸã‚ã«ã€ã™ã¹ã¦ã®SQL定義ãŒã“ã®å˜ä¸€ã®znodeã®å€¤ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯ã€ZooKeeperã¯ä½¿ç”¨ã•ã‚Œãšã€å®šç¾©ã¯[ディスク](#workload_path)ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +**例** + +```xml +/clickhouse/workload/definitions.sql +``` + +**å‚ç…§** +- [ワークロード階層](/docs/ja/operations/workload-scheduling.md#workloads) +- [workload_path](#workload_path) + +## max_authentication_methods_per_user {#max_authentication_methods_per_user} + +ユーザーãŒä½œæˆã•ã‚Œã‚‹éš›ã‚„èªè¨¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’変更ã™ã‚‹éš›ã«æŒ‡å®šã§ãã‚‹èªè¨¼ãƒ¡ã‚½ãƒƒãƒ‰ã®æœ€å¤§æ•°ã€‚ +ã“ã®è¨­å®šã‚’変更ã—ã¦ã‚‚既存ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。制é™ã‚’超ãˆã‚‹èªè¨¼ã«é–¢é€£ã™ã‚‹ä½œæˆ/変更クエリã¯å¤±æ•—ã—ã¾ã™ãŒã€èªè¨¼ã«é–¢é€£ã—ãªã„作æˆ/変更クエリã¯æˆåŠŸã—ã¾ã™ã€‚ + +タイプ: UInt64 + +デフォルト値: 100 + +0ã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ + +## use_legacy_mongodb_integration + +レガシーMongoDBçµ±åˆå®Ÿè£…を使用ã—ã¾ã™ã€‚éžæŽ¨å¥¨ã§ã™ã€‚ + +タイプ: Bool + +デフォルト値: `true`。 +``` diff --git a/docs/ja/operations/settings/composable-protocols.md b/docs/ja/operations/settings/composable-protocols.md new file mode 100644 index 00000000000..f64c4580522 --- /dev/null +++ b/docs/ja/operations/settings/composable-protocols.md @@ -0,0 +1,155 @@ +--- +slug: /ja/operations/settings/composable-protocols +sidebar_position: 64 +sidebar_label: Composable Protocols +--- + +# Composable Protocols + +Composable Protocolsã¯ã€ClickHouseサーãƒãƒ¼ã¸ã®TCPアクセスã®è¨­å®šã‚’より柔軟ã«æ§‹æˆã§ãã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€å¾“æ¥ã®è¨­å®šã¨å…±å­˜ã™ã‚‹ã‹ã€ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## Composable Protocolsセクションã¯è¨­å®šxml内ã§`protocols`ã¨ã—ã¦è¡¨ã•ã‚Œã¾ã™ +**例:** +``` xml + + + +``` + +## 基本モジュールã«ã‚ˆã£ã¦ãƒ—ロトコル層を定義ã—ã¾ã™ +**例:** +``` xml + + + + + http + + + +``` +ã“ã“ã§: +- `plain_http` - ä»–ã®å±¤ã‹ã‚‰å‚ç…§ã•ã‚Œã‚‹ã“ã¨ãŒã§ãã‚‹åå‰ +- `type` - データを処ç†ã™ã‚‹ãŸã‚ã«ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•ã‚Œã‚‹ãƒ—ロトコルãƒãƒ³ãƒ‰ãƒ©ã‚’示ã—ã€ãƒ—ロトコルãƒãƒ³ãƒ‰ãƒ©ã®ã‚»ãƒƒãƒˆã¯äº‹å‰ã«å®šç¾©ã•ã‚Œã¦ã„ã¾ã™: + * `tcp` - ãƒã‚¤ãƒ†ã‚£ãƒ–clickhouseプロトコルãƒãƒ³ãƒ‰ãƒ© + * `http` - http clickhouseプロトコルãƒãƒ³ãƒ‰ãƒ© + * `tls` - TLSæš—å·åŒ–層 + * `proxy1` - PROXYv1層 + * `mysql` - MySQL互æ›ãƒ—ロトコルãƒãƒ³ãƒ‰ãƒ© + * `postgres` - PostgreSQL互æ›ãƒ—ロトコルãƒãƒ³ãƒ‰ãƒ© + * `prometheus` - Prometheusプロトコルãƒãƒ³ãƒ‰ãƒ© + * `interserver` - clickhouseインターサーãƒãƒ¼ãƒãƒ³ãƒ‰ãƒ© + +:::note +`Composable Protocols`ã«ã¯`gRPC`プロトコルãƒãƒ³ãƒ‰ãƒ©ã¯å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: + +## エンドãƒã‚¤ãƒ³ãƒˆï¼ˆãƒªã‚¹ãƒ‹ãƒ³ã‚°ãƒãƒ¼ãƒˆï¼‰ã¯``ã‚¿ã‚°ãŠã‚ˆã³ï¼ˆã‚ªãƒ—ションã§ï¼‰``ã‚¿ã‚°ã§è¡¨ã•ã‚Œã¾ã™ +**例:** +``` xml + + + + + http + + 127.0.0.1 + 8123 + + + + +``` +``ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€ãƒ«ãƒ¼ãƒˆè¨­å®šã®``ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## 階層ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¯ã€ä»–ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’å‚ç…§ã™ã‚‹``ã‚¿ã‚°ã«ã‚ˆã£ã¦å®šç¾©ã•ã‚Œã¾ã™ +**例:** HTTPSプロトコルã®å®šç¾© +``` xml + + + + + http + + + + + tls + plain_http + 127.0.0.1 + 8443 + + + +``` + +## エンドãƒã‚¤ãƒ³ãƒˆã¯ä»»æ„ã®éšŽå±¤ã«ã‚¢ã‚¿ãƒƒãƒã§ãã¾ã™ +**例:** HTTP(ãƒãƒ¼ãƒˆ8123)ãŠã‚ˆã³HTTPS(ãƒãƒ¼ãƒˆ8443)エンドãƒã‚¤ãƒ³ãƒˆã®å®šç¾© +``` xml + + + + http + 127.0.0.1 + 8123 + + + + tls + plain_http + 127.0.0.1 + 8443 + + + +``` + +## 追加ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã¯ä»»æ„ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’å‚ç…§ã—ã€``ã‚¿ã‚°ã‚’çœç•¥ã™ã‚‹ã“ã¨ã§å®šç¾©ã§ãã¾ã™ +**例:** `plain_http`モジュールã®ãŸã‚ã«å®šç¾©ã•ã‚ŒãŸ`another_http`エンドãƒã‚¤ãƒ³ãƒˆ +``` xml + + + + http + 127.0.0.1 + 8123 + + + + tls + plain_http + 127.0.0.1 + 8443 + + + + plain_http + 127.0.0.1 + 8223 + + + +``` + +## 一部ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯ãã®å±¤ã«ç‰¹æœ‰ã®ãƒ‘ラメーターをå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ +**例:** TLS層ã®ãŸã‚ã«ãƒ—ライベートキー(`privateKeyFile`)ãŠã‚ˆã³è¨¼æ˜Žæ›¸ãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆ`certificateFile`)を指定ã§ãã¾ã™ +``` xml + + + + http + 127.0.0.1 + 8123 + + + + tls + plain_http + 127.0.0.1 + 8443 + another_server.key + another_server.crt + + + +``` diff --git a/docs/ja/operations/settings/constraints-on-settings.md b/docs/ja/operations/settings/constraints-on-settings.md new file mode 100644 index 00000000000..29180ca8a3d --- /dev/null +++ b/docs/ja/operations/settings/constraints-on-settings.md @@ -0,0 +1,108 @@ +--- +slug: /ja/operations/settings/constraints-on-settings +sidebar_position: 62 +sidebar_label: 設定ã®åˆ¶ç´„ +--- + +# 設定ã®åˆ¶ç´„ + +設定ã®åˆ¶ç´„ã¯ã€`user.xml`構æˆãƒ•ã‚¡ã‚¤ãƒ«ã®`profiles`セクションã§å®šç¾©ã§ãã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ`SET`クエリã§ä¸€éƒ¨ã®è¨­å®šã‚’変更ã™ã‚‹ã“ã¨ã‚’ç¦æ­¢ã—ã¾ã™ã€‚ +制約ã¯æ¬¡ã®ã‚ˆã†ã«å®šç¾©ã•ã‚Œã¾ã™: + +``` xml + + + + + lower_boundary + + + upper_boundary + + + lower_boundary + upper_boundary + + + + + + lower_boundary + upper_boundary + + + + + +``` + +ユーザーãŒåˆ¶ç´„ã‚’é•åã—よã†ã¨ã™ã‚‹å ´åˆã€ä¾‹å¤–ãŒæŠ•ã’られã€è¨­å®šã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。 +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る制約タイプã«ã¯ã€`min`ã€`max`ã€`readonly`(別å`const`)ãŠã‚ˆã³`changeable_in_readonly`ãŒã‚ã‚Šã¾ã™ã€‚`min`ã¨`max`制約ã¯æ•°å€¤è¨­å®šã«å¯¾ã—ã¦ä¸Šä¸‹é™ã‚’指定ã—ã€çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`readonly`ã¾ãŸã¯`const`制約ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãã®è¨­å®šã‚’å…¨ã変更ã§ããªã„ã“ã¨ã‚’指定ã—ã¾ã™ã€‚`changeable_in_readonly`制約タイプã¯ã€`readonly`設定ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã§ã‚‚ã€`min`/`max`範囲内ã§è¨­å®šã‚’変更ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€è¨­å®šã¯`readonly=1`モードã§å¤‰æ›´ã§ãã¾ã›ã‚“。`changeable_in_readonly`ã¯ã€`settings_constraints_replace_previous`ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã«ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™: +``` xml + + true + +``` + +複数ã®ãƒ—ロファイルãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«ãªã£ã¦ã„ã‚‹å ´åˆã€åˆ¶ç´„ã¯ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚マージプロセスã¯`settings_constraints_replace_previous`ã«ä¾å­˜ã—ã¾ã™: +- **true**(推奨): åŒã˜è¨­å®šã«å¯¾ã™ã‚‹åˆ¶ç´„ã¯ãƒžãƒ¼ã‚¸ä¸­ã«ç½®ãæ›ãˆã‚‰ã‚Œã€æœ€å¾Œã®åˆ¶ç´„ãŒä½¿ç”¨ã•ã‚Œã€å‰ã®ã™ã¹ã¦ã¯ç„¡è¦–ã•ã‚Œã€æ–°ã—ã„制約ã«è¨­å®šã•ã‚Œã¦ã„ãªã„フィールドもå«ã¾ã‚Œã¾ã™ã€‚ +- **false**(デフォルト): åŒã˜è¨­å®šã«å¯¾ã™ã‚‹åˆ¶ç´„ã¯ã€è¨­å®šã•ã‚Œã¦ã„ãªã„制約タイプãŒå‰ã®ãƒ—ロファイルã‹ã‚‰å–å¾—ã•ã‚Œã€è¨­å®šã•ã‚ŒãŸåˆ¶ç´„タイプãŒæ–°ã—ã„プロファイルã®å€¤ã«ç½®ãæ›ãˆã‚‰ã‚Œã‚‹æ–¹æ³•ã§ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚ + +読ã¿å–り専用モードã¯`readonly`設定ã«ã‚ˆã£ã¦æœ‰åŠ¹åŒ–ã•ã‚Œã¾ã™ï¼ˆ`readonly`制約タイプã¨æ··åŒã—ãªã„ã§ãã ã•ã„): +- `readonly=0`: 読ã¿å–り専用ã®åˆ¶é™ã¯ã‚ã‚Šã¾ã›ã‚“。 +- `readonly=1`: 読ã¿å–りクエリã®ã¿è¨±å¯ã•ã‚Œã€`changeable_in_readonly`ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„é™ã‚Šè¨­å®šã¯å¤‰æ›´ã§ãã¾ã›ã‚“。 +- `readonly=2`: 読ã¿å–りクエリã®ã¿è¨±å¯ã•ã‚Œã¾ã™ãŒã€è¨­å®šã¯å¤‰æ›´å¯èƒ½ã§ã™ã€‚ãŸã ã—ã€`readonly`設定自体ã¯å¤‰æ›´ã§ãã¾ã›ã‚“。 + +**例:** `users.xml`ã«æ¬¡ã®è¡ŒãŒå«ã¾ã‚Œã¦ã„ã‚‹ã¨ã—ã¾ã™: + +``` xml + + + 10000000000 + 0 + ... + + + 5000000000 + 20000000000 + + + + + + + +``` + +次ã®ã‚¯ã‚¨ãƒªã¯ã™ã¹ã¦ä¾‹å¤–を投ã’ã¾ã™: + +``` sql +SET max_memory_usage=20000000001; +SET max_memory_usage=4999999999; +SET force_index_by_date=1; +``` + +``` text +Code: 452, e.displayText() = DB::Exception: Setting max_memory_usage should not be greater than 20000000000. +Code: 452, e.displayText() = DB::Exception: Setting max_memory_usage should not be less than 5000000000. +Code: 452, e.displayText() = DB::Exception: Setting force_index_by_date should not be changed. +``` + +**注:** `default`プロファイルã¯ç‰¹åˆ¥ãªå‡¦ç†ãŒã•ã‚Œã¾ã™: `default`プロファイルã«å®šç¾©ã•ã‚ŒãŸã™ã¹ã¦ã®åˆ¶ç´„ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆåˆ¶ç´„ã¨ãªã‚Šã€ã“れらã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦æ˜Žç¤ºçš„ã«ä¸Šæ›¸ãã•ã‚Œã‚‹ã¾ã§ã€ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’制é™ã—ã¾ã™ã€‚ + +## MergeTree設定ã®åˆ¶ç´„ +[MergeTree設定](merge-tree-settings.md)ã«åˆ¶ç´„を設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã®åˆ¶ç´„ã¯ã€MergeTreeエンジンを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹éš›ã‚„ã€ãã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸è¨­å®šã‚’変更ã™ã‚‹éš›ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚MergeTree設定ã®åå‰ã¯ã€``セクションã§å‚ç…§ã™ã‚‹éš›ã«`merge_tree_`プレフィックスを追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例:** 明示的ã«æŒ‡å®šã•ã‚ŒãŸ`storage_policy`ã‚’æŒã¤æ–°ã—ã„テーブルã®ä½œæˆã‚’ç¦æ­¢ã—ã¾ã™ã€‚ + +``` xml + + + + + + + + + +``` diff --git a/docs/ja/operations/settings/index.md b/docs/ja/operations/settings/index.md new file mode 100644 index 00000000000..11887607c12 --- /dev/null +++ b/docs/ja/operations/settings/index.md @@ -0,0 +1,48 @@ +--- +title: "設定ã®æ¦‚è¦" +sidebar_position: 1 +slug: /ja/operations/settings/ +--- + +# 設定ã®æ¦‚è¦ + +:::note +XMLベースã®è¨­å®šãƒ—ロファイルã¨[設定ファイル](https://clickhouse.com/docs/ja/operations/configuration-files)ã¯ã€ç¾åœ¨ã®ã¨ã“ã‚ClickHouse Cloudã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。ClickHouse Cloudサービスã®è¨­å®šã‚’指定ã™ã‚‹ã«ã¯ã€[SQL駆動ã®è¨­å®šãƒ—ロファイル](https://clickhouse.com/docs/ja/operations/access-rights#settings-profiles-management)を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +ClickHouseã®è¨­å®šã¯ä¸»ã«2ã¤ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«åˆ†ã‹ã‚Œã¦ã„ã¾ã™: + +- グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®š +- クエリレベルã®è¨­å®š + +グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®šã¨ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã®è¨­å®šã®ä¸»ãªé•ã„ã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®šã¯è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã®è¨­å®šã¯è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯SQLクエリã§è¨­å®šã§ãã‚‹ã¨ã„ã†ç‚¹ã§ã™ã€‚ + +ClickHouseサーãƒãƒ¼ã‚’グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼ãƒ¬ãƒ™ãƒ«ã§è¨­å®šã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®š](/docs/ja/operations/server-configuration-parameters/settings.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ClickHouseサーãƒãƒ¼ã‚’クエリレベルã§è¨­å®šã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[クエリレベルã®è¨­å®š](/docs/ja/operations/settings/settings-query-level.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## デフォルト以外ã®è¨­å®šã‚’確èªã™ã‚‹ + +デフォルトã®å€¤ã‹ã‚‰å¤‰æ›´ã•ã‚ŒãŸè¨­å®šã‚’確èªã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¾ã™: + +```sql +SELECT name, value FROM system.settings WHERE changed +``` + +デフォルトã®å€¤ã‹ã‚‰è¨­å®šã‚’変更ã—ã¦ã„ãªã„å ´åˆã€ClickHouseã¯ä½•ã‚‚è¿”ã—ã¾ã›ã‚“。 + +特定ã®è¨­å®šã®å€¤ã‚’確èªã™ã‚‹ã«ã¯ã€ã‚¯ã‚¨ãƒªå†…ã§è¨­å®šã®`name`を指定ã—ã¾ã™: + +```sql +SELECT name, value FROM system.settings WHERE name = 'max_threads' +``` + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªçµæžœã‚’è¿”ã—ã¾ã™: + +```response +┌─name────────┬─value─────┠+│ max_threads │ 'auto(8)' │ +└─────────────┴───────────┘ + +1 row in set. Elapsed: 0.002 sec. +``` diff --git a/docs/ja/operations/settings/memory-overcommit.md b/docs/ja/operations/settings/memory-overcommit.md new file mode 100644 index 00000000000..50b574261c7 --- /dev/null +++ b/docs/ja/operations/settings/memory-overcommit.md @@ -0,0 +1,34 @@ +--- +slug: /ja/operations/settings/memory-overcommit +--- +# メモリーオーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆ + +メモリーオーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆã¯ã€ã‚¯ã‚¨ãƒªã®ã‚ˆã‚ŠæŸ”軟ãªãƒ¡ãƒ¢ãƒªãƒ¼åˆ¶é™ã‚’設定ã™ã‚‹ãŸã‚ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæŠ€è¡“ã§ã™ã€‚ + +ã“ã®æŠ€è¡“ã®ã‚¢ã‚¤ãƒ‡ã‚¢ã¯ã€ã‚¯ã‚¨ãƒªãŒä½¿ç”¨ã§ãるメモリーã®ä¿è¨¼ã•ã‚ŒãŸé‡ã‚’表ã™è¨­å®šã‚’å°Žå…¥ã™ã‚‹ã“ã¨ã§ã™ã€‚メモリーオーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆãŒæœ‰åŠ¹ã«ãªã‚Šã€ãƒ¡ãƒ¢ãƒªãƒ¼åˆ¶é™ã«é”ã—ãŸå ´åˆã€ClickHouseã¯æœ€ã‚‚オーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’é¸æŠžã—ã€ã“ã®ã‚¯ã‚¨ãƒªã‚’終了ã•ã›ã¦ãƒ¡ãƒ¢ãƒªãƒ¼ã‚’解放ã—よã†ã¨ã—ã¾ã™ã€‚ + +メモリー制é™ã«é”ã—ãŸå ´åˆã€ã‚¯ã‚¨ãƒªã¯æ–°ã—ã„メモリーを割り当ã¦ã‚ˆã†ã¨ã™ã‚‹éš›ã«ä¸€å®šæ™‚é–“å¾…æ©Ÿã—ã¾ã™ã€‚タイムアウトãŒç™ºç”Ÿã—ã€ãƒ¡ãƒ¢ãƒªãƒ¼ãŒè§£æ”¾ã•ã‚Œã‚Œã°ã€ã‚¯ã‚¨ãƒªã¯å®Ÿè¡Œã‚’続行ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã€ã‚¯ã‚¨ãƒªãŒçµ‚了ã•ã‚Œã¾ã™ã€‚ + +クエリをåœæ­¢ã¾ãŸã¯çµ‚了ã™ã‚‹é¸æŠžã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚ªãƒ¼ãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆãƒˆãƒ©ãƒƒã‚«ãƒ¼ã«ã‚ˆã£ã¦è¡Œã‚ã‚Œã€ã©ã®ãƒ¡ãƒ¢ãƒªãƒ¼åˆ¶é™ã«åˆ°é”ã—ãŸã‹ã«ä¾å­˜ã—ã¾ã™ã€‚オーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆãƒˆãƒ©ãƒƒã‚«ãƒ¼ãŒåœæ­¢ã™ã¹ãクエリをé¸ã¹ãªã„å ´åˆã€MEMORY_LIMIT_EXCEEDEDã®ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +## ユーザーオーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆãƒˆãƒ©ãƒƒã‚«ãƒ¼ + +ユーザーオーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆãƒˆãƒ©ãƒƒã‚«ãƒ¼ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¯ã‚¨ãƒªãƒªã‚¹ãƒˆå†…ã§æœ€ã‚‚オーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆçŽ‡ã®é«˜ã„クエリを見ã¤ã‘ã¾ã™ã€‚クエリã®ã‚ªãƒ¼ãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆçŽ‡ã¯ã€å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã‚’`memory_overcommit_ratio_denominator`設定値ã§å‰²ã£ãŸã‚‚ã®ã¨ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +クエリã®`memory_overcommit_ratio_denominator`ãŒã‚¼ãƒ­ã®å ´åˆã€ã‚ªãƒ¼ãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆãƒˆãƒ©ãƒƒã‚«ãƒ¼ã¯ã“ã®ã‚¯ã‚¨ãƒªã‚’é¸æŠžã—ã¾ã›ã‚“。 + +待機タイムアウトã¯`memory_usage_overcommit_max_wait_microseconds`設定ã§è¨­å®šã•ã‚Œã¾ã™ã€‚ + +**例** + +```sql +SELECT number FROM numbers(1000) GROUP BY number SETTINGS memory_overcommit_ratio_denominator=4000, memory_usage_overcommit_max_wait_microseconds=500 +``` + +## グローãƒãƒ«ã‚ªãƒ¼ãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆãƒˆãƒ©ãƒƒã‚«ãƒ¼ + +グローãƒãƒ«ã‚ªãƒ¼ãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆãƒˆãƒ©ãƒƒã‚«ãƒ¼ã¯ã€ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã®ãƒªã‚¹ãƒˆå†…ã§æœ€ã‚‚オーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆçŽ‡ã®é«˜ã„クエリを見ã¤ã‘ã¾ã™ã€‚ã“ã®å ´åˆã€ã‚ªãƒ¼ãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆçŽ‡ã¯å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã‚’`memory_overcommit_ratio_denominator_for_user`設定値ã§å‰²ã£ãŸã‚‚ã®ã¨ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +クエリã®`memory_overcommit_ratio_denominator_for_user`ãŒã‚¼ãƒ­ã®å ´åˆã€ã‚ªãƒ¼ãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆãƒˆãƒ©ãƒƒã‚«ãƒ¼ã¯ã“ã®ã‚¯ã‚¨ãƒªã‚’é¸æŠžã—ã¾ã›ã‚“。 + +待機タイムアウトã¯ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«å†…ã®`memory_usage_overcommit_max_wait_microseconds`パラメータã§è¨­å®šã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/operations/settings/merge-tree-settings.md b/docs/ja/operations/settings/merge-tree-settings.md new file mode 100644 index 00000000000..d744716a28f --- /dev/null +++ b/docs/ja/operations/settings/merge-tree-settings.md @@ -0,0 +1,1087 @@ +--- +slug: /ja/operations/settings/merge-tree-settings +title: "MergeTree テーブルã®è¨­å®š" +--- + +システムテーブル `system.merge_tree_settings` ã«ã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ã«è¨­å®šã•ã‚ŒãŸ MergeTree ã®è¨­å®šãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +MergeTree ã®è¨­å®šã¯ã‚µãƒ¼ãƒãƒ¼ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã® `merge_tree` セクションã§è¨­å®šã§ãã¾ã™ã€‚ã¾ãŸã€`CREATE TABLE` ステートメント㮠`SETTINGS` å¥ã§å€‹ã€…ã® `MergeTree` テーブルã«å¯¾ã—ã¦æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +`max_suspicious_broken_parts` ã®è¨­å®šã‚’カスタマイズã™ã‚‹ä¾‹ï¼š + +サーãƒãƒ¼è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§ã€ã™ã¹ã¦ã® `MergeTree` テーブルã«å¯¾ã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚’設定ã—ã¾ã™ã€‚ + +``` text + + 5 + +``` + +特定ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦è¨­å®šã™ã‚‹å ´åˆ: + +``` sql +CREATE TABLE tab +( + `A` Int64 +) +ENGINE = MergeTree +ORDER BY tuple() +SETTINGS max_suspicious_broken_parts = 500; +``` + +特定ã®ãƒ†ãƒ¼ãƒ–ルã®è¨­å®šã‚’ `ALTER TABLE ... MODIFY SETTING` ã§å¤‰æ›´ã™ã‚‹å ´åˆ: + +```sql +ALTER TABLE tab MODIFY SETTING max_suspicious_broken_parts = 100; + +-- グローãƒãƒ«ãªãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼ˆsystem.merge_tree_settings ã‹ã‚‰ã®å€¤ï¼‰ã«ãƒªã‚»ãƒƒãƒˆ +ALTER TABLE tab RESET SETTING max_suspicious_broken_parts; +``` + +## index_granularity + +インデックスã®ãƒžãƒ¼ã‚¯é–“ã®ãƒ‡ãƒ¼ã‚¿è¡Œã®æœ€å¤§æ•°ã€‚ + +デフォルト値: 8192。 + +## index_granularity_bytes + +データ粒度ã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +デフォルト値: 10485760 (ç´„10 MiB)。 + +行数ã®ã¿ã§ç²’度サイズを制é™ã™ã‚‹ã«ã¯ã€0ã«è¨­å®šã—ã¾ã™ï¼ˆæŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“)。 + +## min_index_granularity_bytes + +許容ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ç²’度ã®æœ€å°ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +デフォルト値: 1024ãƒã‚¤ãƒˆã€‚ + +éžå¸¸ã«ä½Žã„ index_granularity_bytes ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã®èª¤ä½œæˆã‚’防ããŸã‚ã®ä¿è­·æ‰‹æ®µã§ã™ã€‚ + +## enable_mixed_granularity_parts + +`index_granularity_bytes` 設定ã§ç²’度サイズを管ç†ã™ã‚‹ãŸã‚ã®é·ç§»ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 19.11 以å‰ã§ã¯ã€ç²’度サイズを制é™ã™ã‚‹ãŸã‚ã« `index_granularity` 設定ã®ã¿ãŒã‚ã‚Šã¾ã—ãŸã€‚`index_granularity_bytes` 設定ã¯ã€å·¨å¤§ãªè¡Œï¼ˆæ•°åメガãƒã‚¤ãƒˆã€æ•°ç™¾ãƒ¡ã‚¬ãƒã‚¤ãƒˆï¼‰ãŒã‚るテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹éš›ã® ClickHouse ã®ãƒ‘フォーマンスをå‘上ã•ã›ã¾ã™ã€‚大型ã®è¡Œã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹å ´åˆã€ã“ã®è¨­å®šã‚’テーブルã«å¯¾ã—ã¦æœ‰åŠ¹ã«ã™ã‚‹ã¨ã€`SELECT` クエリã®åŠ¹çŽ‡æ€§ãŒå‘上ã—ã¾ã™ã€‚ + +## use_minimalistic_part_header_in_zookeeper + +ZooKeeper ã«ãŠã‘るデータパーツヘッダーã®æ ¼ç´æ–¹æ³•ã€‚ã“れを有効ã«ã™ã‚‹ã¨ã€ZooKeeper ã¯ã‚ˆã‚Šå°‘ãªã„データをä¿å­˜ã—ã¾ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](../server-configuration-parameters/settings.md/#server-settings-use_minimalistic_part_header_in_zookeeper)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## min_merge_bytes_to_use_direct_io + +ストレージディスクã¸ã®ãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆI/Oアクセスを使用ã™ã‚‹ãŸã‚ã«å¿…è¦ãªãƒžãƒ¼ã‚¸æ“作ã®æœ€å°ãƒ‡ãƒ¼ã‚¿é‡ã€‚データパーツをマージã™ã‚‹éš›ã€ClickHouse ã¯ãƒžãƒ¼ã‚¸ã™ã‚‹ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã®ç·ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸é‡ã‚’計算ã—ã¾ã™ã€‚ +ã‚‚ã—é‡ãŒ `min_merge_bytes_to_use_direct_io` ãƒã‚¤ãƒˆã‚’超ãˆã‚‹å ´åˆã€ClickHouse ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ストレージディスクã«èª­ã¿æ›¸ãã—ã¾ã™ã€‚ã“ã®ã¨ãã€ãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆI/Oインターフェースを使用ã—ã¾ã™ï¼ˆ`O_DIRECT` オプション)。 +ã‚‚ã— `min_merge_bytes_to_use_direct_io = 0` å ´åˆã€ãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆI/Oã¯ç„¡åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +デフォルト値: `10 * 1024 * 1024 * 1024` ãƒã‚¤ãƒˆã€‚ + +## merge_with_ttl_timeout + +æœ‰åŠ¹æœŸé™ (TTL) ã«ã‚ˆã‚‹å‰Šé™¤ã¨å…±ã«ãƒžãƒ¼ã‚¸ã‚’ç¹°ã‚Šè¿”ã™ã¾ã§ã®æœ€å°é…延時間(秒å˜ä½ï¼‰ã€‚ + +デフォルト値: `14400` 秒(4時間)。 + +## merge_with_recompression_ttl_timeout + +å†åœ§ç¸® TTL を使用ã™ã‚‹ãƒžãƒ¼ã‚¸ã‚’ç¹°ã‚Šè¿”ã™ã¾ã§ã®æœ€å°é…延時間(秒å˜ä½ï¼‰ã€‚ + +デフォルト値: `14400` 秒(4時間)。 + +## write_final_mark + +データパートã®æœ€å¾Œï¼ˆæœ€çµ‚ãƒã‚¤ãƒˆå¾Œï¼‰ã«æœ€çµ‚インデックスマークを書ã込むã‹ã©ã†ã‹ã‚’設定ã—ã¾ã™ã€‚ + +デフォルト値: 1。 + +変更ã—ãªã„ã§ãã ã•ã„。悪ã„ã“ã¨ãŒèµ·ã“ã‚Šã¾ã™ã€‚ + +## storage_policy + +ストレージãƒãƒªã‚·ãƒ¼ã€‚ + +## min_bytes_for_wide_part + +`Wide` フォーマットã§ä¿å­˜ã§ãるデータパートã«å«ã¾ã‚Œã‚‹æœ€å°ã®ãƒã‚¤ãƒˆ/行数。 +ã“れらã®è¨­å®šã®ä¸€ã¤ã€ä¸¡æ–¹ã€ã¾ãŸã¯ã©ã¡ã‚‰ã‚‚設定ã§ãã¾ã™ã€‚ + +## max_compress_block_size + +テーブルã«æ›¸ã込むå‰ã«åœ§ç¸®ã•ã‚Œã‚‹æœªåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ãƒ–ロックã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ +ã“ã®è¨­å®šã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«è¨­å®šã«ã‚‚指定ã§ãã¾ã™ï¼ˆ[max_compress_block_size](/docs/ja/operations/settings/settings.md/#max-compress-block-size)設定をå‚照)。 +テーブル作æˆæ™‚ã«æŒ‡å®šã—ãŸå€¤ãŒã€ã“ã®è¨­å®šã®ã‚°ãƒ­ãƒ¼ãƒãƒ«å€¤ã‚’上書ãã—ã¾ã™ã€‚ + +## min_compress_block_size + +次ã®ãƒžãƒ¼ã‚¯ã‚’記録ã™ã‚‹éš›ã«åœ§ç¸®ãŒå¿…è¦ãªæœªåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ãƒ–ロックã®æœ€å°ã‚µã‚¤ã‚ºã€‚ +ã“ã®è¨­å®šã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«è¨­å®šã«ã‚‚指定ã§ãã¾ã™ï¼ˆ[min_compress_block_size](/docs/ja/operations/settings/settings.md/#min-compress-block-size)設定をå‚照)。 +テーブル作æˆæ™‚ã«æŒ‡å®šã—ãŸå€¤ãŒã€ã“ã®è¨­å®šã®ã‚°ãƒ­ãƒ¼ãƒãƒ«å€¤ã‚’上書ãã—ã¾ã™ã€‚ + +## max_suspicious_broken_parts + +å˜ä¸€ã®ãƒ‘ーティション内ã§ç ´æã—ãŸãƒ‘ーツã®æ•°ãŒ `max_suspicious_broken_parts` ã®å€¤ã‚’超ãˆã‚‹ã¨ã€ 自動削除ãŒæ‹’å¦ã•ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 100。 + +## parts_to_throw_insert {#parts-to-throw-insert} + +å˜ä¸€ã®ãƒ‘ーティション内ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツã®æ•°ãŒ `parts_to_throw_insert` ã®å€¤ã‚’超ãˆã‚‹ã¨ã€`INSERT` 㯠`Too many parts (N). Merges are processing significantly slower than inserts` ã¨ã„ã†ä¾‹å¤–ã§ä¸­æ–­ã•ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 3000。 + +`SELECT` クエリã®æœ€å¤§ãƒ‘フォーマンスをé”æˆã™ã‚‹ã«ã¯ã€å‡¦ç†ã•ã‚Œã‚‹ãƒ‘ーツã®æ•°ã‚’最å°é™ã«æŠ‘ãˆã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚詳細㯠[Merge Tree](../../development/architecture.md#merge-tree) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 23.6 よりå‰ã§ã¯ã€ã“ã®è¨­å®šã¯ 300 ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã—ãŸã€‚ç•°ãªã‚‹é«˜ã„値を設定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€`Too many parts` エラーã®ç™ºç”Ÿç¢ºçŽ‡ã‚’低ãã™ã‚‹ä¸€æ–¹ã§ã€`SELECT` ã®ãƒ‘フォーマンスãŒä½Žä¸‹ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€ãƒžãƒ¼ã‚¸ã®å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆï¼ˆä¾‹: ディスク容é‡ã®ä¸è¶³ï¼‰ã€å…ƒã® 300 ã§ã®è¨­å®šã‚ˆã‚Šã‚‚æ°—ã¥ãã®ãŒé…ã‚Œã¾ã™ã€‚ + +## parts_to_delay_insert {#parts-to-delay-insert} + +å˜ä¸€ã®ãƒ‘ーティション内ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツã®æ•°ãŒ `parts_to_delay_insert` ã®å€¤ã‚’超ãˆã‚‹ã¨ã€`INSERT` ãŒæ„図的ã«é…延ã•ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 1000。 + +ClickHouse ã¯ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã®ãƒžãƒ¼ã‚¸ãƒ—ロセスãŒãƒ‘ーツを追加ã™ã‚‹ã‚ˆã‚Šã‚‚速ãマージã§ãるよã†ã«ã€`INSERT` ã‚’é…延(「スリープã€ã‚’追加)ã—ã¦å®Ÿè¡Œã—ã¾ã™ã€‚ + +## inactive_parts_to_throw_insert {#inactive-parts-to-throw-insert} + +å˜ä¸€ã®ãƒ‘ーティションã«ãŠã‘ã‚‹éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツã®æ•°ãŒ `inactive_parts_to_throw_insert` ã®å€¤ã‚’超ãˆã‚‹å ´åˆã€`INSERT` 㯠"Too many inactive parts (N). Parts cleaning are processing significantly slower than inserts" ã¨ã„ã†ä¾‹å¤–ã§ä¸­æ–­ã•ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 0(無制é™ï¼‰ã€‚ + +## inactive_parts_to_delay_insert {#inactive-parts-to-delay-insert} + +å˜ä¸€ã®ãƒ‘ーティションã«ãŠã‘ã‚‹éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツã®æ•°ãŒ `inactive_parts_to_delay_insert` ã®å€¤ã«é”ã™ã‚‹ã¨ã€`INSERT` ã¯æ„図的ã«é…延ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚µãƒ¼ãƒãƒ¼ãŒãƒ‘ーツを速やã‹ã«ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ã§ããªã„å ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 0(無制é™ï¼‰ã€‚ + +## max_delay_to_insert {#max-delay-to-insert} + +å˜ä¸€ã®ãƒ‘ーティション内ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツã®æ•°ãŒ [parts_to_delay_insert](#parts-to-delay-insert) ã®å€¤ã‚’超ãˆãŸå ´åˆã« `INSERT` é…延を計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ç§’å˜ä½ã®å€¤ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 1。 + +`INSERT` ã®é…延(ミリ秒å˜ä½ï¼‰ã¯æ¬¡ã®å¼ã§è¨ˆç®—ã•ã‚Œã¾ã™: +```code +max_k = parts_to_throw_insert - parts_to_delay_insert +k = 1 + parts_count_in_partition - parts_to_delay_insert +delay_milliseconds = pow(max_delay_to_insert * 1000, k / max_k) +``` +例ãˆã°ã€ãƒ‘ーティション㫠299 ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツãŒã‚ã‚Šã€parts_to_throw_insert = 300, parts_to_delay_insert = 150, max_delay_to_insert = 1 ã®å ´åˆã€`INSERT` 㯠`pow( 1 * 1000, (1 + 299 - 150) / (300 - 150) ) = 1000` ミリ秒é…延ã•ã‚Œã¾ã™ã€‚ + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 23.1 ã‹ã‚‰å¼ãŒå¤‰æ›´ã•ã‚Œã¾ã—ãŸ: +```code +allowed_parts_over_threshold = parts_to_throw_insert - parts_to_delay_insert +parts_over_threshold = parts_count_in_partition - parts_to_delay_insert + 1 +delay_milliseconds = max(min_delay_to_insert_ms, (max_delay_to_insert * 1000) * parts_over_threshold / allowed_parts_over_threshold) +``` +例ãˆã°ã€ãƒ‘ーティション㫠224 ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツãŒã‚ã‚Šã€parts_to_throw_insert = 300, parts_to_delay_insert = 150, max_delay_to_insert = 1, min_delay_to_insert_ms = 10 ã®å ´åˆã€`INSERT` 㯠`max( 10, 1 * 1000 * (224 - 150 + 1) / (300 - 150) ) = 500` ミリ秒é…延ã•ã‚Œã¾ã™ã€‚ + +## max_parts_in_total {#max-parts-in-total} + +テーブルã®ã™ã¹ã¦ã®ãƒ‘ーティションã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツã®ç·æ•°ãŒ `max_parts_in_total` ã®å€¤ã‚’超ãˆãŸå ´åˆã€`INSERT` 㯠`Too many parts (N)` ã¨ã„ã†ä¾‹å¤–ã§ä¸­æ–­ã•ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 100000。 + +テーブル中ã®ãƒ‘ーツã®æ•°ãŒå¤šã„ã¨ã€ClickHouse クエリã®ãƒ‘フォーマンスãŒä½Žä¸‹ã—ã€ClickHouse ã®èµ·å‹•æ™‚é–“ãŒé•·ããªã‚Šã¾ã™ã€‚通常ã€ã“ã‚Œã¯ãƒ‘ーティション戦略ã®é¸æŠžãƒŸã‚¹ï¼ˆã‚ã¾ã‚Šã«å°ã•ãªãƒ‘ーティション)ãŒåŽŸå› ã§èª¤ã£ãŸè¨­è¨ˆã®çµæžœã§ã™ã€‚ + +## simultaneous_parts_removal_limit {#simultaneous-parts-removal-limit} + +å¤ã„パーツãŒå¤§é‡ã«ã‚ã‚‹å ´åˆã€ã‚¯ãƒªãƒ¼ãƒ³ã‚¹ãƒ¬ãƒƒãƒ‰ã¯åŒã˜ã‚¤ãƒ†ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã§ `simultaneous_parts_removal_limit` パーツを削除ã—よã†ã¨ã—ã¾ã™ã€‚ +`simultaneous_parts_removal_limit` ㌠`0` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +デフォルト値: 0。 + +## replicated_deduplication_window {#replicated-deduplication-window} + +ClickHouse Keeper ãŒé‡è¤‡ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ãŸã‚ã«ãƒãƒƒã‚·ãƒ¥ã‚’ä¿å­˜ã™ã‚‹æœ€è¿‘挿入ã•ã‚ŒãŸãƒ–ロックã®æ•°ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0(é‡è¤‡æŽ’除を無効ã«ã™ã‚‹ï¼‰ + +デフォルト値: 1000。 + +`Insert` コマンドã¯1ã¤ä»¥ä¸Šã®ãƒ–ロック(パーツ)を作æˆã—ã¾ã™ã€‚レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«æ›¸ã込む際ã®[挿入é‡è¤‡æŽ’除](../../engines/table-engines/mergetree-family/replication.md)ã®ãŸã‚ã«ã€ClickHouse ã¯ä½œæˆã•ã‚ŒãŸãƒ‘ーツã®ãƒãƒƒã‚·ãƒ¥ã‚’ClickHouse Keeperã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ãƒãƒƒã‚·ãƒ¥ã¯ã€æœ€æ–°ã® `replicated_deduplication_window` ブロックã®ã¿ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚å¤ã„ãƒãƒƒã‚·ãƒ¥ã¯ClickHouse Keeperã‹ã‚‰å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ +`replicated_deduplication_window` ãŒå¤šã„ã»ã©ã€`Inserts` ã®å®Ÿè¡ŒãŒé…ããªã‚Šã¾ã™ã€‚ãªãœãªã‚‰ã€ã‚ˆã‚Šå¤šãã®ã‚¨ãƒ³ãƒˆãƒªã¨æ¯”較ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚ +ãƒãƒƒã‚·ãƒ¥ã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰åã¨åž‹ã®çµ„æˆãŠã‚ˆã³æŒ¿å…¥ã•ã‚ŒãŸãƒ‘ーツã®ãƒ‡ãƒ¼ã‚¿ï¼ˆãƒã‚¤ãƒˆã®ã‚¹ãƒˆãƒªãƒ¼ãƒ ï¼‰ã‹ã‚‰è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +## non_replicated_deduplication_window {#non-replicated-deduplication-window} + +é‡è¤‡ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ãŸã‚ã«ãƒãƒƒã‚·ãƒ¥ãŒä¿å­˜ã•ã‚Œã‚‹ã€éžãƒ¬ãƒ—リケート[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブルã®æœ€è¿‘挿入ã•ã‚ŒãŸãƒ–ロックã®æ•°ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0(é‡è¤‡æŽ’除を無効ã«ã™ã‚‹ï¼‰ã€‚ + +デフォルト値: 0。 + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«ä¼¼ãŸé‡è¤‡æŽ’除機構を使用ã—ã¾ã™ï¼ˆ[replicated_deduplication_window](#replicated-deduplication-window)ã®è¨­å®šã‚’å‚照)。作æˆã•ã‚ŒãŸãƒ‘ーツã®ãƒãƒƒã‚·ãƒ¥ã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +## replicated_deduplication_window_seconds {#replicated-deduplication-window-seconds} + +挿入ã•ã‚ŒãŸãƒ–ロックã®ãƒãƒƒã‚·ãƒ¥ãŒClickHouse Keeperã‹ã‚‰å‰Šé™¤ã•ã‚Œã‚‹ã¾ã§ã®ç§’数。 + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 604800 (1週間)。 + +[replicated_deduplication_window](#replicated-deduplication-window)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€`replicated_deduplication_window_seconds` ã¯æŒ¿å…¥é‡è¤‡æŽ’除ã®ãŸã‚ã®ãƒ–ロックãƒãƒƒã‚·ãƒ¥ã‚’ä¿å­˜ã™ã‚‹æœŸé–“を指定ã—ã¾ã™ã€‚`replicated_deduplication_window_seconds`よりå¤ã„ãƒãƒƒã‚·ãƒ¥ã¯ã€`replicated_deduplication_window`未満ã§ã‚ã£ã¦ã‚‚ClickHouse Keeperã‹ã‚‰å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +時間ã¯æœ€æ–°ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã®æ™‚é–“ã«å¯¾ã—ã¦ç›¸å¯¾çš„ã§ã‚ã‚Šã€å®Ÿéš›ã®æ™‚é–“ã«å¯¾ã—ã¦ã§ã¯ã‚ã‚Šã¾ã›ã‚“。もã—ãã‚ŒãŒå”¯ä¸€ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã§ã‚ã‚Œã°ã€æ°¸é ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +## replicated_deduplication_window_for_async_inserts {#replicated-deduplication-window-for-async-inserts} + +ClickHouse Keeper ãŒé‡è¤‡ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ãŸã‚ã«ãƒãƒƒã‚·ãƒ¥ã‚’ä¿å­˜ã™ã‚‹æœ€è¿‘ã®éžåŒæœŸæŒ¿å…¥ãƒ–ロックã®æ•°ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0(éžåŒæœŸæŒ¿å…¥ã®é‡è¤‡æŽ’除を無効ã«ã™ã‚‹ï¼‰ + +デフォルト値: 10000。 + +[éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆ](./settings.md#async-insert) コマンドã¯ä¸€ã¤ä»¥ä¸Šã®ãƒ–ロック(パーツ)ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¦ã„ãã¾ã™ã€‚レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«æ›¸ã込む際㮠[挿入é‡è¤‡æŽ’除](../../engines/table-engines/mergetree-family/replication.md) ã®ãŸã‚ã«ã€ClickHouse ã¯å„挿入ã®ãƒãƒƒã‚·ãƒ¥ã‚’ClickHouse Keeperã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ãƒãƒƒã‚·ãƒ¥ã¯ã€æœ€æ–°ã® `replicated_deduplication_window_for_async_inserts` ブロックã®ã¿ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚å¤ã„ãƒãƒƒã‚·ãƒ¥ã¯ClickHouse Keeperã‹ã‚‰å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ +`replicated_deduplication_window_for_async_inserts` ãŒå¤šã„ã»ã©ã€`Async Inserts` ã®å®Ÿè¡ŒãŒé…ããªã‚Šã¾ã™ã€‚ãªãœãªã‚‰ã€ã‚ˆã‚Šå¤šãã®ã‚¨ãƒ³ãƒˆãƒªã¨æ¯”較ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚ +ãƒãƒƒã‚·ãƒ¥ã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰åã¨åž‹ã®çµ„æˆãŠã‚ˆã³æŒ¿å…¥ãƒ‡ãƒ¼ã‚¿ï¼ˆãƒã‚¤ãƒˆã®ã‚¹ãƒˆãƒªãƒ¼ãƒ ï¼‰ã‹ã‚‰è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +## replicated_deduplication_window_seconds_for_async_inserts {#replicated-deduplication-window-seconds-for-async_inserts} + +éžåŒæœŸã®æŒ¿å…¥ã®ãƒãƒƒã‚·ãƒ¥ãŒClickHouse Keeperã‹ã‚‰å‰Šé™¤ã•ã‚Œã‚‹ã¾ã§ã®ç§’数。 + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 604800 (1週間)。 + +[replicated_deduplication_window_for_async_inserts](#replicated-deduplication-window-for-async-inserts) ã«ä¼¼ã¦ãŠã‚Šã€éžåŒæœŸæŒ¿å…¥é‡è¤‡æŽ’除ã®ãŸã‚ã®ãƒ–ロックã®ãƒãƒƒã‚·ãƒ¥ã‚’ä¿å­˜ã™ã‚‹æœŸé–“を指定ã—ã¾ã™ã€‚`replicated_deduplication_window_seconds_for_async_inserts` よりå¤ã„ãƒãƒƒã‚·ãƒ¥ã¯ã€`replicated_deduplication_window_for_async_inserts` より少ãªãã¦ã‚‚ ClickHouse Keeper ã‹ã‚‰å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +時間ã¯æœ€æ–°ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã®æ™‚é–“ã«å¯¾ã—ã¦ç›¸å¯¾çš„ã§ã‚ã‚Šã€å®Ÿéš›ã®æ™‚é–“ã«å¯¾ã—ã¦ã§ã¯ã‚ã‚Šã¾ã›ã‚“。もã—ãã‚ŒãŒå”¯ä¸€ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã§ã‚ã‚Œã°ã€æ°¸é ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +## use_async_block_ids_cache {#use-async-block-ids-cache} + +`true` ã®å ´åˆã€éžåŒæœŸæŒ¿å…¥ã®ãƒãƒƒã‚·ãƒ¥ã‚’キャッシュã—ã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- true, false + +デフォルト値: false。 + +複数ã®éžåŒæœŸæŒ¿å…¥ã‚’æŒã¤ãƒ–ロックã¯ã€è¤‡æ•°ã®ãƒãƒƒã‚·ãƒ¥ã‚’生æˆã—ã¾ã™ã€‚一部ã®æŒ¿å…¥ãŒé‡è¤‡ã—ã¦ã„ã‚‹å ´åˆã€Keeper ã¯1ã¤ã®RPCã§1ã¤ã®é‡è¤‡ã—ãŸãƒãƒƒã‚·ãƒ¥ã®ã¿ã‚’è¿”ã—ã€ä¸è¦ãªRPCリトライを引ãèµ·ã“ã—ã¾ã™ã€‚ã“ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯Keeperã®ãƒãƒƒã‚·ãƒ¥ãƒ‘スを監視ã—ã¾ã™ã€‚Keeperã§æ›´æ–°ãŒç›£è¦–ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯å¯èƒ½ãªé™ã‚Šæ—©ãæ›´æ–°ã•ã‚Œã€ãƒ¡ãƒ¢ãƒªå†…ã§é‡è¤‡ã—ãŸæŒ¿å…¥ã‚’フィルタリングã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +## async_block_ids_cache_min_update_interval_ms + +`use_async_block_ids_cache` ã‚’æ›´æ–°ã™ã‚‹ãŸã‚ã®æœ€å°é–“隔(ミリ秒å˜ä½ï¼‰ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 100。 + +通常ã€`use_async_block_ids_cache` ã¯ç›£è¦–ã•ã‚Œã¦ã„ã‚‹Keeperパスã§æ›´æ–°ãŒã‚ã‚‹ã¨ã™ãã«æ›´æ–°ã•ã‚Œã¾ã™ã€‚ãŸã ã—ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®æ›´æ–°ãŒé »ç¹ã™ãŽã‚‹ã¨è² æ‹…ãŒã‹ã‹ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æœ€å°é–“éš”ãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®æ›´æ–°ãŒéŽåº¦ã«é€Ÿããªã‚‹ã®ã‚’防ãŽã¾ã™ã€‚ã“ã®å€¤ã‚’é•·ã設定ã—ã™ãŽã‚‹ã¨ã€é‡è¤‡ã—ãŸæŒ¿å…¥ã‚’å«ã‚€ãƒ–ロックã®ãƒªãƒˆãƒ©ã‚¤æ™‚é–“ãŒé•·ããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## max_replicated_logs_to_keep + +éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リカãŒã‚ã‚‹å ´åˆã€ClickHouse Keeper ã®ãƒ­ã‚°ã«å­˜åœ¨ã§ãる最大記録数。éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リカã¯ã€ã“ã®æ•°ã‚’超ãˆã‚‹ã¨å¤±ã‚ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 1000 + +## min_replicated_logs_to_keep + +ZooKeeper ログã«ã‚る最後ã®è¨˜éŒ²ã‚’ã“ã®æ•°ã¾ã§ä¿æŒã—ã¾ã™ã€‚テーブルã®ä½œæ¥­ã«ã¯å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“: ZooKeeper ログã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—å‰ã«è¨ºæ–­ã™ã‚‹ãŸã‚ã ã‘ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 10 + +## prefer_fetch_merged_part_time_threshold + +レプリケーションログ(ClickHouse Keeper ã¾ãŸã¯ ZooKeeper)ã®ã‚¨ãƒ³ãƒˆãƒªä½œæˆã‹ã‚‰ã®çµŒéŽæ™‚é–“ãŒæŒ‡å®šã•ã‚ŒãŸã—ãã„値を超ãˆã€ãƒ‘ーツã®ã‚µã‚¤ã‚ºã®åˆè¨ˆãŒ `prefer_fetch_merged_part_size_threshold` を超ãˆã‚‹å ´åˆã€ãƒ­ãƒ¼ã‚«ãƒ«ã§ãƒžãƒ¼ã‚¸ã‚’è¡Œã†ä»£ã‚ã‚Šã«ã€ãƒ¬ãƒ—リカã‹ã‚‰ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒ‘ーツをフェッãƒã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šéžå¸¸ã«é•·ã„マージを高速化ã—ã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 3600 + +## prefer_fetch_merged_part_size_threshold + +パーツサイズã®åˆè¨ˆãŒã“ã®ã—ãã„値を超ãˆã€ãƒ¬ãƒ—リケーションログエントリã®ä½œæˆã‹ã‚‰ã®çµŒéŽæ™‚間㌠`prefer_fetch_merged_part_time_threshold` を超ãˆã‚‹å ´åˆã€ãƒ­ãƒ¼ã‚«ãƒ«ã§ãƒžãƒ¼ã‚¸ã‚’è¡Œã†ä»£ã‚ã‚Šã«ãƒ¬ãƒ—リカã‹ã‚‰ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒ‘ーツをフェッãƒã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šéžå¸¸ã«é•·ã„マージを高速化ã—ã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 10,737,418,240 + +## execute_merges_on_single_replica_time_threshold + +ã“ã®è¨­å®šã®å€¤ãŒã‚¼ãƒ­ã‚ˆã‚Šå¤§ãã„å ´åˆã€1ã¤ã®ãƒ¬ãƒ—リカã®ã¿ãŒã™ãã«ãƒžãƒ¼ã‚¸ã‚’開始ã—ã€ä»–ã®ãƒ¬ãƒ—リカã¯ãã®çµæžœã‚’ダウンロードã™ã‚‹ãŸã‚ã«ãã®æ™‚é–“ã¾ã§å¾…ã¡ã¾ã™ã€‚ãã®æ™‚間内ã«é¸ã°ã‚ŒãŸãƒ¬ãƒ—リカãŒãƒžãƒ¼ã‚¸ã‚’完了ã—ãªã„å ´åˆã¯ã€æ¨™æº–ã®å‹•ä½œã«ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 0(秒) + +## remote_fs_execute_merges_on_single_replica_time_threshold + +ã“ã®è¨­å®šã®å€¤ãŒã‚¼ãƒ­ã‚ˆã‚Šå¤§ãã„å ´åˆã€ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒ‘ーツãŒå…±æœ‰ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ä¸Šã«ã‚ã‚Šã€`allow_remote_fs_zero_copy_replication` ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€1ã¤ã®ãƒ¬ãƒ—リカã®ã¿ãŒãƒžãƒ¼ã‚¸ã‚’ã™ãã«é–‹å§‹ã—ã¾ã™ã€‚ + +:::note ゼロコピー レプリケーションã¯ã¾ã æœ¬ç•ªç’°å¢ƒã§ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“ +ゼロコピー レプリケーション㯠ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 22.8 以é™ã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯æœ¬ç•ªç’°å¢ƒã§ã®ä½¿ç”¨ã‚’推奨ã—ã¾ã›ã‚“。 +::: + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 10800 + +## try_fetch_recompressed_part_timeout + +å†åœ§ç¸®ã‚’ä¼´ã†ãƒžãƒ¼ã‚¸ã‚’開始ã™ã‚‹å‰ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’å˜ä½ï¼‰ã€‚ã“ã®æœŸé–“ã€æ–°ã—ã„圧縮パーツをå–å¾—ã—よã†ã¨ã—ã¾ã™ã€‚ã“ã®æœŸé–“中ã€å†åœ§ç¸®ã‚’ä¼´ã†ãƒžãƒ¼ã‚¸ã‚’クリックãƒã‚¦ã‚¹ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã‚‹å ´åˆã®ãƒ¬ãƒ—リカã‹ã‚‰ãƒ•ã‚§ãƒƒãƒã—よã†ã¨ã—ã¾ã™ã€‚ + +å†åœ§ç¸®ã¯å¤šãã®å ´åˆé…ã動作ã™ã‚‹ãŸã‚ã€ã“ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¾ã§å†åœ§ç¸®ã‚’ä¼´ã†ãƒžãƒ¼ã‚¸ã‚’開始ã™ã‚‹ã“ã¨ãªãã€å†åœ§ç¸®ã•ã‚ŒãŸéƒ¨åˆ†ã‚’レプリカã‹ã‚‰ãƒ•ã‚§ãƒƒãƒã—よã†ã¨ã—ã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 7200 + +## always_fetch_merged_part + +`true` ã®å ´åˆã€ã“ã®ãƒ¬ãƒ—リカã¯ãƒ‘ーツをマージã›ãšã€å¸¸ã«ä»–ã®ãƒ¬ãƒ—リカã‹ã‚‰ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒ‘ーツをダウンロードã—ã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- true, false + +デフォルト値: false + +## max_suspicious_broken_parts + +最大破æパーツ数ã€ã“れを超ãˆã‚‹ã¨è‡ªå‹•å‰Šé™¤ãŒæ‹’å¦ã•ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 100 + +## max_suspicious_broken_parts_bytes + +全部ã®ç ´æパーツã®æœ€å¤§ã‚µã‚¤ã‚ºã€ã“れを超ãˆã‚‹å ´åˆã€è‡ªå‹•å‰Šé™¤ãŒæ‹’å¦ã•ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 1,073,741,824 + +## max_files_to_modify_in_alter_columns + +ファイルã®å¤‰æ›´ï¼ˆå‰Šé™¤ã€è¿½åŠ ï¼‰æ•°ãŒã“ã®è¨­å®šå€¤ã‚’超ãˆã‚‹å ´åˆ `ALTER` ã‚’é©ç”¨ã—ã¾ã›ã‚“。 + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 75 + +## max_files_to_remove_in_alter_columns + +削除ファイル数ãŒã“ã®è¨­å®šå€¤ã‚’超ãˆã‚‹å ´åˆã€ `ALTER` ã‚’é©ç”¨ã—ã¾ã›ã‚“。 + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 50 + +## replicated_max_ratio_of_wrong_parts + +ä¸æ­£ãªãƒ‘ーツã®æ¯”率ãŒç·ãƒ‘ーツ数を基準ã¨ã—ã¦ã“ã®å€¤ã‚’下回ã£ã¦ã„ã‚‹å ´åˆã«é–‹å§‹ã‚’許å¯ã—ã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- 浮動å°æ•°ç‚¹æ•°ã€0.0 - 1.0 + +デフォルト値: 0.5 + +## replicated_max_parallel_fetches_for_host + +エンドãƒã‚¤ãƒ³ãƒˆã‹ã‚‰ã®ä¸¦åˆ—フェッãƒã®åˆ¶é™ï¼ˆå®Ÿéš›ã®ãƒ—ールサイズ)。 + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 15 + +## replicated_fetches_http_connection_timeout + +部分フェッãƒãƒªã‚¯ã‚¨ã‚¹ãƒˆã® HTTP 接続タイムアウト。デフォルトプロファイル `http_connection_timeout` より継承ã•ã‚Œã€æ˜Žç¤ºçš„ã«è¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 明示的ã«è¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ—ロファイル `http_connection_timeout` より継承ã•ã‚Œã¾ã™ã€‚ + +## replicated_can_become_leader + +`true` ã®å ´åˆã€ã“ã®ãƒŽãƒ¼ãƒ‰ä¸Šã®ãƒ¬ãƒ—リカーテーブルã®ãƒ¬ãƒ—リカãŒãƒªãƒ¼ãƒ€ãƒ¼ã‚·ãƒƒãƒ—ã‚’å–å¾—ã—よã†ã¨ã—ã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- true, false + +デフォルト値: true + +## zookeeper_session_expiration_check_period + +ZooKeeper セッションã®æœ‰åŠ¹æœŸé™ãƒã‚§ãƒƒã‚¯æœŸé–“ã€ç§’å˜ä½ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 60 + +## detach_old_local_parts_when_cloning_replica + +失ã‚ã‚ŒãŸãƒ¬ãƒ—リカを修復ã™ã‚‹éš›ã«å¤ã„ローカルパーツを削除ã—ã¾ã›ã‚“。 + +許容ã•ã‚Œã‚‹å€¤: + +- true, false + +デフォルト値: true + +## replicated_fetches_http_connection_timeout {#replicated_fetches_http_connection_timeout} + +部分フェッãƒãƒªã‚¯ã‚¨ã‚¹ãƒˆã® HTTP 接続タイムアウト(秒å˜ä½ï¼‰ã€‚明示的ã«è¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ—ロファイル[http_connection_timeout](./settings.md#http_connection_timeout)より継承ã•ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0 - `http_connection_timeout` ã®å€¤ã‚’使用ã—ã¾ã™ã€‚ + +デフォルト値: 0。 + +## replicated_fetches_http_send_timeout {#replicated_fetches_http_send_timeout} + +部分フェッãƒãƒªã‚¯ã‚¨ã‚¹ãƒˆã® HTTP é€ä¿¡ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’å˜ä½ï¼‰ã€‚明示的ã«è¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ—ロファイル[http_send_timeout](./settings.md#http_send_timeout)より継承ã•ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0 - `http_send_timeout` ã®å€¤ã‚’使用ã—ã¾ã™ã€‚ + +デフォルト値: 0。 + +## replicated_fetches_http_receive_timeout {#replicated_fetches_http_receive_timeout} + +フェッãƒéƒ¨åˆ†ãƒªã‚¯ã‚¨ã‚¹ãƒˆã® HTTP å—信タイムアウト(秒å˜ä½ï¼‰ã€‚明示的ã«è¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ—ロファイル[http_receive_timeout](./settings.md#http_receive_timeout)より継承ã•ã‚Œã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0 - `http_receive_timeout` ã®å€¤ã‚’使用ã—ã¾ã™ã€‚ + +デフォルト値: 0。 + +## max_replicated_fetches_network_bandwidth {#max_replicated_fetches_network_bandwidth} + +[レプリケートã•ã‚ŒãŸ](../../engines/table-engines/mergetree-family/replication.md) フェッãƒã®ãŸã‚ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®æœ€å¤§é€Ÿåº¦ã‚’秒ã‚ãŸã‚Šã®ãƒã‚¤ãƒˆæ•°ã§åˆ¶é™ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルã«é©ç”¨ã•ã‚Œã€[max_replicated_fetches_network_bandwidth_for_server](settings.md#max_replicated_fetches_network_bandwidth_for_server) 設定ã¯ã‚µãƒ¼ãƒã«å¯¾ã—ã¦é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +サーãƒãƒ¼ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¨ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ル用ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¯ä¸¡æ–¹è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ã“ã®ãŸã‚ã«ã¯ãƒ†ãƒ¼ãƒ–ルレベル設定ã®å€¤ãŒã‚µãƒ¼ãƒãƒ¬ãƒ™ãƒ«ã®ã‚‚ã®ã‚ˆã‚Šã‚‚å°ã•ããªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã„å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯`max_replicated_fetches_network_bandwidth_for_server` 設定ã ã‘を考慮ã—ã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯æ­£ç¢ºã«é †å®ˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +許容ã•ã‚Œã‚‹å€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 無制é™ã€‚ + +デフォルト値: `0`. + +**使用方法** + +æ–°ã—ã„ノードを追加ã¾ãŸã¯ç½®æ›ã™ã‚‹éš›ã«ãƒ‡ãƒ¼ã‚¿ã‚’レプリケートã™ã‚‹é€Ÿåº¦ã‚’制é™ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã€‚ + +## max_replicated_sends_network_bandwidth {#max_replicated_sends_network_bandwidth} + +[レプリケートã•ã‚ŒãŸ](../../engines/table-engines/mergetree-family/replication.md) é€ä¿¡ã®ãŸã‚ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®æœ€å¤§é€Ÿåº¦ã‚’秒ã‚ãŸã‚Šã®ãƒã‚¤ãƒˆæ•°ã§åˆ¶é™ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルã«é©ç”¨ã•ã‚Œã€[max_replicated_sends_network_bandwidth_for_server](settings.md#max_replicated_sends_network_bandwidth_for_server) 設定ã¯ã‚µãƒ¼ãƒã«å¯¾ã—ã¦é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +サーãƒãƒ¼ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¨ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ル用ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¯ä¸¡æ–¹è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ã“ã®ãŸã‚ã«ã¯ãƒ†ãƒ¼ãƒ–ルレベル設定ã®å€¤ãŒã‚µãƒ¼ãƒãƒ¬ãƒ™ãƒ«ã®ã‚‚ã®ã‚ˆã‚Šã‚‚å°ã•ããªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã„å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯`max_replicated_sends_network_bandwidth_for_server` 設定ã ã‘を考慮ã—ã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯æ­£ç¢ºã«é †å®ˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +許容ã•ã‚Œã‚‹å€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 無制é™ã€‚ + +デフォルト値: `0`. + +**使用方法** + +æ–°ã—ã„ノードを追加ã¾ãŸã¯ç½®æ›ã™ã‚‹éš›ã«ãƒ‡ãƒ¼ã‚¿ã‚’レプリケートã™ã‚‹é€Ÿåº¦ã‚’制é™ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã€‚ + +## old_parts_lifetime {#old-parts-lifetime} + +サーãƒã®äºˆæœŸã—ãªã„å†èµ·å‹•ä¸­ã®ãƒ‡ãƒ¼ã‚¿æ失を防ããŸã‚ã®éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–パーツã®ä¿æŒæ™‚間(秒å˜ä½ï¼‰ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 480。 + +ã„ãã¤ã‹ã®ãƒ‘ーツを新ã—ã„パーツã«ãƒžãƒ¼ã‚¸ã—ãŸå¾Œã€ClickHouse ã¯å…ƒã®ãƒ‘ーツをéžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã—ã€`old_parts_lifetime` 秒後ã«ã®ã¿ãれらを削除ã—ã¾ã™ã€‚ +éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–パーツã¯ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã§ä½¿ç”¨ã•ã‚Œã¦ã„ãªã„å ´åˆã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ã™ãªã‚ã¡ã€ãƒ‘ーツ㮠`refcount` ㌠1 ã®å ´åˆã§ã™ã€‚ + +æ–°ã—ã„パーツã«ã¯ `fsync` ãŒå‘¼ã³å‡ºã•ã‚Œãªã„ãŸã‚ã€æ–°ã—ã„パーツã¯ä¸€æ™‚çš„ã«ã‚µãƒ¼ãƒã®RAM(OSキャッシュ)ã«ã®ã¿å­˜åœ¨ã—ã¾ã™ã€‚サーãƒãŒäºˆæœŸã›ãšå†èµ·å‹•ã•ã‚ŒãŸå ´åˆã€æ–°ã—ã„パーツãŒå¤±ã‚ã‚ŒãŸã‚Šæå‚·ã‚’å—ã‘ãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +データをä¿è­·ã™ã‚‹ãŸã‚ã«ã€éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–パーツã¯ã™ãã«å‰Šé™¤ã•ã‚Œã¾ã›ã‚“。 + +起動時ã€ClickHouse ã¯ãƒ‘ーツã®æ•´åˆæ€§ã‚’確èªã—ã¾ã™ã€‚ +マージã•ã‚ŒãŸãƒ‘ーツãŒæå‚·ã—ã¦ã„ã‚‹å ´åˆã€ClickHouse ã¯éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–パーツをアクティブリストã«æˆ»ã—ã€ãれらをå†ã³ãƒžãƒ¼ã‚¸ã—ã¾ã™ã€‚ãã®å¾Œã€æå‚·ã—ãŸãƒ‘ーツã¯ãƒªãƒãƒ¼ãƒ ã•ã‚Œï¼ˆ`broken_` 接頭辞ãŒè¿½åŠ ï¼‰ã€`detached` フォルダã«ç§»å‹•ã•ã‚Œã¾ã™ã€‚ +マージã•ã‚ŒãŸãƒ‘ーツãŒæå‚·ã—ã¦ã„ãªã„å ´åˆã€å…ƒã®éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–パーツã¯ãƒªãƒãƒ¼ãƒ ã•ã‚Œï¼ˆ`ignored_` 接頭辞ãŒè¿½åŠ ï¼‰ã€`detached` フォルダã«ç§»å‹•ã•ã‚Œã¾ã™ã€‚ + +デフォルト㮠`dirty_expire_centisecs` 値(Linux カーãƒãƒ«è¨­å®šï¼‰ã¯ 30 秒(書ãè¾¼ã¾ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒRAMã«ã®ã¿ä¿å­˜ã•ã‚Œã‚‹æœ€å¤§æ™‚間)ã§ã™ãŒã€ãƒ‡ã‚£ã‚¹ã‚¯ã‚·ã‚¹ãƒ†ãƒ ã«è² è·ãŒã‹ã‹ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯ã¯ã‚‹ã‹å¾Œã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚エクスペリメンタルã«ã€`old_parts_lifetime` ã®å€¤ã¨ã—㦠480 秒ãŒé¸ã°ã‚Œã€æ–°ã—ã„パーツãŒãƒ‡ã‚£ã‚¹ã‚¯ã«ç¢ºå®Ÿã«æ›¸ãè¾¼ã¾ã‚Œã‚‹æ™‚é–“ã¨ãªã‚Šã¾ã™ã€‚ + +## max_bytes_to_merge_at_max_space_in_pool {#max-bytes-to-merge-at-max-space-in-pool} + +å分ãªãƒªã‚½ãƒ¼ã‚¹ãŒåˆ©ç”¨å¯èƒ½ãªå ´åˆã«1ã¤ã®ãƒ‘ーツã«ãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹æœ€å¤§ãƒˆãƒ¼ã‚¿ãƒ«ãƒ‘ーツサイズ(ãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚`max_bytes_to_merge_at_max_space_in_pool`ã¯ã€è‡ªå‹•ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã«ã‚ˆã£ã¦ä½œæˆã•ã‚Œã‚‹æœ€å¤§å¯èƒ½ãƒ‘ーツサイズã«ãŠãŠã‚ˆã対応ã—ã¦ã„ã¾ã™ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 161061273600 (150 GB)。 + +マージスケジューラã¯å®šæœŸçš„ã«ãƒ‘ーティション内ã®ãƒ‘ーツサイズã¨æ•°ã‚’分æžã—ã€ãƒ—ール内ã«å分ãªç©ºãリソースãŒã‚ã‚‹å ´åˆã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã‚’開始ã—ã¾ã™ã€‚マージã¯ã€ã‚½ãƒ¼ã‚¹ãƒ‘ーツã®ç·ã‚µã‚¤ã‚ºãŒ `max_bytes_to_merge_at_max_space_in_pool` を超ãˆã‚‹ã¾ã§è¡Œã‚ã‚Œã¾ã™ã€‚ + +[OPTIMIZE FINAL](../../sql-reference/statements/optimize.md)ã«ã‚ˆã£ã¦é–‹å§‹ã•ã‚ŒãŸãƒžãƒ¼ã‚¸ã¯ã€`max_bytes_to_merge_at_max_space_in_pool` を無視ã—ã€åˆ©ç”¨å¯èƒ½ãªãƒªã‚½ãƒ¼ã‚¹ï¼ˆç©ºãディスク容é‡ï¼‰ã‚’考慮ã—ã¦ã€ãƒ‘ーティション内ã«1ã¤ã®ãƒ‘ーツãŒæ®‹ã‚‹ã¾ã§ãƒ‘ーツをマージã—ã¾ã™ã€‚ + +## max_bytes_to_merge_at_min_space_in_pool {#max-bytes-to-merge-at-min-space-in-pool} + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ールã§æœ€å°ã®åˆ©ç”¨å¯èƒ½ãƒªã‚½ãƒ¼ã‚¹ã§1ã¤ã®ãƒ‘ーツã«ãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹æœ€å¤§ãƒˆãƒ¼ã‚¿ãƒ«ãƒ‘ーツサイズ(ãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +許容ã•ã‚Œã‚‹å€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 1048576 (1 MB) + +`max_bytes_to_merge_at_min_space_in_pool`ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ç©ºã容é‡ä¸è¶³ã®çŠ¶æ³ã§ã‚‚å°ã•ãªãƒ‘ーツã®æ•°ã‚’減らã™ãŸã‚ã«ã€æœ€å¤§ãƒˆãƒ¼ã‚¿ãƒ«ãƒ‘ーツサイズを定義ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å°ã•ãªãƒ‘ーツã®æ•°ã‚’減らã—ã€`Too many parts` エラーã®å¯èƒ½æ€§ã‚’減らã—ã¾ã™ã€‚ +マージã¯ã€ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒˆãƒ¼ã‚¿ãƒ«ãƒ‘ーツサイズを2å€ã«ã™ã‚‹ã“ã¨ã§ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’予約ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ãƒ‡ã‚£ã‚¹ã‚¯ç©ºãスペースãŒå°‘ãªã„å ´åˆã€ãƒ•ãƒªãƒ¼ã‚¹ãƒšãƒ¼ã‚¹ã¯å¤šãã‚ã‚Šã¾ã™ãŒã€ã“ã®ã‚¹ãƒšãƒ¼ã‚¹ã¯é€²è¡Œä¸­ã®å¤§è¦æ¨¡ãªãƒžãƒ¼ã‚¸ã«ã‚ˆã£ã¦æ—¢ã«äºˆç´„ã•ã‚Œã¦ãŠã‚Šã€ä»–ã®ãƒžãƒ¼ã‚¸ã‚’開始ã§ããªã„ãŸã‚ã€å°ã•ãªãƒ‘ーツã®æ•°ãŒå¢—ãˆç¶šã‘ã¾ã™ã€‚ + +## merge_max_block_size {#merge-max-block-size} + +メモリã«èª­ã¿è¾¼ã¾ã‚Œã‚‹ãƒ‘ーツã‹ã‚‰ã®è¡Œæ•°ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 8192 + +マージ㌠`merge_max_block_size` è¡Œå˜ä½ã®ãƒ–ロックã§è¡Œã‚’読ã¿å–ã£ã¦ã€ãƒžãƒ¼ã‚¸ãŠã‚ˆã³æ–°ã—ã„パーツã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚読ã¿å–りブロックã¯RAM内ã«é…ç½®ã•ã‚Œã‚‹ãŸã‚ã€`merge_max_block_size` ã¯ãƒžãƒ¼ã‚¸ã®ãŸã‚ã«å¿…è¦ã¨ã•ã‚Œã‚‹RAMã®ã‚µã‚¤ã‚ºã«å½±éŸ¿ã‚’与ãˆã¾ã™ã€‚ã“ã®ãŸã‚ã€ãƒžãƒ¼ã‚¸ã¯éžå¸¸ã«åºƒã„行をæŒã¤ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦å¤§é‡ã®RAMを消費ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼ˆå¹³å‡è¡Œã‚µã‚¤ã‚ºãŒ100kbã®å ´åˆã€10個ã®ãƒ‘ーツをマージã™ã‚‹ã¨ãã€(100kb * 10 * 8192) = ç´„ 8GBã®RAM)。`merge_max_block_size` を減少ã•ã›ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€å¿…è¦ã¨ã•ã‚Œã‚‹RAMã®é‡ã‚’減少ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ãƒžãƒ¼ã‚¸ã‚’é…ãã—ã¾ã™ã€‚ + +## number_of_free_entries_in_pool_to_lower_max_size_of_merge {#number-of-free-entries-in-pool-to-lower-max-size-of-merge} + +プール(ã¾ãŸã¯ãƒ¬ãƒ—リケートã•ã‚ŒãŸã‚­ãƒ¥ãƒ¼ï¼‰ã«æŒ‡å®šã•ã‚ŒãŸæ•°å€¤ä»¥ä¸‹ã®ç©ºãエントリãŒã‚ã‚‹å ´åˆã€å‡¦ç†ã™ã‚‹æœ€å¤§ãƒžãƒ¼ã‚¸ã‚µã‚¤ã‚ºã‚’縮å°ã—始ã‚ã¾ã™ï¼ˆã‚‚ã—ãã¯ã‚­ãƒ¥ãƒ¼ã«æŠ•å…¥ã—ã¾ã™ï¼‰ã€‚ +ã“ã‚Œã¯é•·æ™‚間実行ã•ã‚Œã‚‹ãƒžãƒ¼ã‚¸ã§ãƒ—ールを埋ã‚å°½ãã•ãªã„よã†ã«ã€å°ã•ãªãƒžãƒ¼ã‚¸ã‚’処ç†ã•ã›ã‚‹ãŸã‚ã§ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 8 + +## number_of_free_entries_in_pool_to_execute_mutation {#number-of-free-entries-in-pool-to-execute-mutation} + +プールã«æŒ‡å®šã•ã‚ŒãŸæ•°å€¤ä»¥ä¸‹ã®ç©ºãエントリãŒã‚ã‚‹å ´åˆã€ãƒ‘ーツã®å¤‰ç•°ã‚’実行ã—ã¾ã›ã‚“。 +ã“ã‚Œã¯é€šå¸¸ã®ãƒžãƒ¼ã‚¸ã®ãŸã‚ã®ç©ºãスレッドを残ã™ãŸã‚ã€"パーツãŒå¤šã™ãŽã‚‹"ã®ã‚’é¿ã‘ã‚‹ãŸã‚ã§ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 20 + +**使用方法** + +`number_of_free_entries_in_pool_to_execute_mutation` ã®è¨­å®šå€¤ã¯ [background_pool_size](/docs/ja/operations/server-configuration-parameters/settings.md/#background_pool_size) * [background_merges_mutations_concurrency_ratio](/docs/ja/operations/server-configuration-parameters/settings.md/#background_merges_mutations_concurrency_ratio) ã®å€¤æœªæº€ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ClickHouse ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## max_part_loading_threads {#max-part-loading-threads} + +ClickHouse ãŒèµ·å‹•ã™ã‚‹éš›ã«ãƒ‘ーツを読ã¿è¾¼ã‚€æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 自動(CPUコア数)。 + +起動時ã€ClickHouse ã¯ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã®ã™ã¹ã¦ã®ãƒ‘ーツを読ã¿å–ã‚Šã¾ã™ï¼ˆãƒ‘ーツã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿å–る)ã—ã€ãƒ¡ãƒ¢ãƒªã«ã™ã¹ã¦ã®ãƒ‘ーツã®ãƒªã‚¹ãƒˆã‚’作æˆã—ã¾ã™ã€‚ã“ã®ãƒ—ロセスã¯ã€ãƒ‘ーツã®æ•°ãŒå¤šã„システムã§ã¯æ™‚é–“ãŒã‹ã‹ã‚‹ã“ã¨ãŒã‚ã‚Šã€`max_part_loading_threads` を増やã™ã“ã¨ã«ã‚ˆã‚Šã€ã“ã®ãƒ—ロセスを短縮ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆã“ã®å‡¦ç†ãŒCPUã¨ãƒ‡ã‚£ã‚¹ã‚¯I/Oã«ã‚ˆã£ã¦åˆ¶ç´„ã•ã‚Œã¦ã„ãªã„å ´åˆï¼‰ã€‚ + +## max_partitions_to_read {#max-partitions-to-read} + +一ã¤ã®ã‚¯ã‚¨ãƒªã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãる最大パーティション数を制é™ã—ã¾ã™ã€‚ + +テーブル作æˆæ™‚ã«æŒ‡å®šã—ãŸè¨­å®šå€¤ã¯ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã®è¨­å®šã§ä¸Šæ›¸ãã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: -1(無制é™ï¼‰ã€‚ + +ã¾ãŸã€ã‚¯ã‚¨ãƒªè¤‡é›‘性設定 [max_partitions_to_read](query-complexity#max-partitions-to-read) をクエリ / セッション / プロファイルレベルã§æŒ‡å®šã§ãã¾ã™ã€‚ + +## min_age_to_force_merge_seconds {#min_age_to_force_merge_seconds} + +ã™ã¹ã¦ã®ãƒ‘ート㌠`min_age_to_force_merge_seconds` ã®å€¤ã‚ˆã‚Šå¤ã„å ´åˆã«ãƒ‘ーツをマージã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 0 — 無効。 + +## min_age_to_force_merge_on_partition_only {#min_age_to_force_merge_on_partition_only} + +`min_age_to_force_merge_seconds` をパーティション全体ã«ã®ã¿é©ç”¨ã—ã€éƒ¨åˆ†ã‚»ãƒƒãƒˆã«ã¯é©ç”¨ã—ãªã„ã‹ã©ã†ã‹ã€‚ + +å¯èƒ½ãªå€¤: + +- true, false + +デフォルト値: false + +## number_of_free_entries_in_pool_to_execute_optimize_entire_partition {#number_of_free_entries_in_pool_to_execute_optimize_entire_partition} + +プールã«æŒ‡å®šã•ã‚ŒãŸæ•°ã‚ˆã‚Šã‚‚å°‘ãªã„空ãエントリãŒã‚ã‚‹å ´åˆã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ‘ーティション全体を最é©åŒ–ã™ã‚‹æ“作を実行ã—ã¾ã›ã‚“(`min_age_to_force_merge_seconds` を設定ã—ã€`min_age_to_force_merge_on_partition_only` を有効ã«ã—ãŸå ´åˆã«ç”Ÿæˆã•ã‚Œã‚‹ã‚¿ã‚¹ã‚¯ï¼‰ã€‚ã“ã‚Œã«ã‚ˆã‚Šé€šå¸¸ã®ãƒžãƒ¼ã‚¸ç”¨ã®ç©ºãスレッドを残ã—ã€"パーツãŒå¤šã™ãŽã‚‹"ã®ã‚’é¿ã‘ã‚‹ãŸã‚ã§ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 25 + +`number_of_free_entries_in_pool_to_execute_optimize_entire_partition` 設定ã®å€¤ã¯ [background_pool_size](/docs/ja/operations/server-configuration-parameters/settings.md/#background_pool_size) * [background_merges_mutations_concurrency_ratio](/docs/ja/operations/server-configuration-parameters/settings.md/#background_merges_mutations_concurrency_ratio) ã®å€¤ã‚ˆã‚Šå°‘ãªãã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ClickHouse ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## allow_floating_point_partition_key {#allow_floating_point_partition_key} + +パーティションキーã¨ã—ã¦æµ®å‹•å°æ•°ç‚¹æ•°ã‚’許å¯ã™ã‚‹ã‹ã©ã†ã‹ã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 浮動å°æ•°ç‚¹ãƒ‘ーティションキーを許å¯ã—ãªã„。 +- 1 — 浮動å°æ•°ç‚¹ãƒ‘ーティションキーを許å¯ã™ã‚‹ã€‚ + +デフォルト値: `0`. + +## check_sample_column_is_correct {#check_sample_column_is_correct} + +テーブル作æˆæ™‚ã«ã‚µãƒ³ãƒ—リング用ã®ã‚«ãƒ©ãƒ ã¾ãŸã¯ã‚µãƒ³ãƒ—リングå¼ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ãŒæ­£ã—ã„ã‹ã©ã†ã‹ã‚’確èªã™ã‚‹ãƒã‚§ãƒƒã‚¯ã‚’有効ã«ã—ã¾ã™ã€‚データタイプã¯ã€`UInt8`ã€`UInt16`ã€`UInt32`ã€`UInt64` ã®ã„ãšã‚Œã‹ã®ç¬¦å·ãªã— [æ•´æ•°åž‹](../../sql-reference/data-types/int-uint.md)ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +å¯èƒ½ãªå€¤: + +- true — ãƒã‚§ãƒƒã‚¯ãŒæœ‰åŠ¹ã§ã™ã€‚ +- false — テーブル作æˆæ™‚ã®ãƒã‚§ãƒƒã‚¯ãŒç„¡åŠ¹ã§ã™ã€‚ + +デフォルト値: `true`. + +デフォルトã§ã¯ã€ClickHouse サーãƒã¯ãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã«ã‚µãƒ³ãƒ—リング用ã®ã‚«ãƒ©ãƒ ã¾ãŸã¯ã‚µãƒ³ãƒ—リングå¼ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ã™ã§ã«ä¸æ­£ãªã‚µãƒ³ãƒ—リングå¼ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚Šã€ã‚µãƒ¼ãƒãŒèµ·å‹•ä¸­ã«ä¾‹å¤–を発生ã•ã›ãŸããªã„å ´åˆã¯ `check_sample_column_is_correct` ã‚’ `false` ã«è¨­å®šã—ã¦ãã ã•ã„。 + +## min_bytes_to_rebalance_partition_over_jbod {#min-bytes-to-rebalance-partition-over-jbod} + +æ–°ã—ã„大型パーツをボリュームディスク [JBOD](https://en.wikipedia.org/wiki/Non-RAID_drive_architectures) 上ã«åˆ†æ•£ã•ã›ã‚‹éš›ã®ãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ã‚’有効ã«ã™ã‚‹ãŸã‚ã®æœ€å°ãƒã‚¤ãƒˆæ•°ã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — ãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°ãŒç„¡åŠ¹ã§ã™ã€‚ + +デフォルト値: `0`. + +**使用例** + +`min_bytes_to_rebalance_partition_over_jbod` 設定ã®å€¤ã¯ [max_bytes_to_merge_at_max_space_in_pool](../../operations/settings/merge-tree-settings.md#max-bytes-to-merge-at-max-space-in-pool) / 1024 ã®å€¤ã‚ˆã‚Šå¤šããªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã„å ´åˆã€ ClickHouse ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## detach_not_byte_identical_parts {#detach_not_byte_identical_parts} + +マージã¾ãŸã¯å¤‰ç•°å¾Œã€ä»–ã®ãƒ¬ãƒ—リカã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã¨ãƒã‚¤ãƒˆå˜ä½ã§ä¸€è‡´ã—ãªã„å ´åˆã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツをデタッãƒã™ã‚‹ã‹ã©ã†ã‹ã‚’設定ã—ã¾ã™ã€‚無効ãªå ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€å¾Œã§ãã®ã‚ˆã†ãªãƒ‘ーツを分æžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ã€[データレプリケーション](../../engines/table-engines/mergetree-family/replication.md)ãŒæœ‰åŠ¹ãª `MergeTree` テーブルã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — パーツã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ +- 1 — パーツã¯ãƒ‡ã‚¿ãƒƒãƒã•ã‚Œã¾ã™ã€‚ + +デフォルト値: `0`. + +## merge_tree_clear_old_temporary_directories_interval_seconds {#setting-merge-tree-clear-old-temporary-directories-interval-seconds} + +å¤ã„一時ディレクトリã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—を実行ã™ã‚‹ãŸã‚ã®ç§’å˜ä½ã§ã®é–“隔をClickHouseã«è¨­å®šã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `60` 秒。 + +## merge_tree_clear_old_parts_interval_seconds {#setting-merge-tree-clear-old-parts-interval-seconds} + +å¤ã„パーツã€WALã€ãŠã‚ˆã³å¤‰ç•°ã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—を実行ã™ã‚‹ãŸã‚ã®ç§’å˜ä½ã§ã®é–“隔をClickHouseã«è¨­å®šã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: `1` 秒。 + +## max_concurrent_queries {#max-concurrent-queries} + +MergeTree テーブルã«é–¢é€£ã™ã‚‹æœ€å¤§åŒæ™‚実行クエリ数。クエリã¯ä»–ã® `max_concurrent_queries` 設定ã§ã‚‚制é™ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 制é™ãªã—。 + +デフォルト値: `0`(無制é™ï¼‰ã€‚ + +**例** + +``` xml +50 +``` + +## min_marks_to_honor_max_concurrent_queries {#min-marks-to-honor-max-concurrent-queries} + +クエリ㌠[max_concurrent_queries](#max-concurrent-queries) 設定をé©ç”¨ã§ãるよã†ã«ã™ã‚‹ãŸã‚ã«èª­ã¿å–ã‚‹å¿…è¦ã®ã‚る最å°ãƒžãƒ¼ã‚¯æ•°ã€‚クエリã¯ä»–ã® `max_concurrent_queries` 設定ã§ã‚‚制é™ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 無効(`max_concurrent_queries` 制é™ã¯ã‚¯ã‚¨ãƒªã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“)。 + +デフォルト値: `0`(制é™ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“)。 + +**例** + +``` xml +10 +``` + +## ratio_of_defaults_for_sparse_serialization {#ratio-of-defaults-for-sparse-serialization} + +カラム内㮠*_all_ 値ã«å¯¾ã™ã‚‹ _default_ 値ã®æ¯”率ã®æœ€å°é™ã‚’設定ã—ã¾ã™ã€‚ã“ã®å€¤ã‚’設定ã™ã‚‹ã“ã¨ã§ã€ã‚«ãƒ©ãƒ ãŒã‚¹ãƒ‘ースãªã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‚’使用ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +カラムãŒã‚¹ãƒ‘ース(ã»ã¨ã‚“ã©ã‚¼ãƒ­ã‚’å«ã‚€ï¼‰ã®å ´åˆã€ClickHouse ã¯ãれをスパースãªå½¢å¼ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã€è¨ˆç®—ãŒè‡ªå‹•çš„ã«æœ€é©åŒ–ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¯ã‚¨ãƒªä¸­ã«ãƒ‡ãƒ¼ã‚¿ãŒå®Œå…¨ã«å±•é–‹ã•ã‚Œã‚‹å¿…è¦ãŒãªã„ãŸã‚ã§ã™ã€‚スパースãªã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‚’有効ã«ã™ã‚‹ãŸã‚ã«ã¯ã€`ratio_of_defaults_for_sparse_serialization` 設定を 1.0 未満ã«å®šç¾©ã—ã¾ã™ã€‚値㌠1.0 以上ã®å ´åˆã€é€šå¸¸ã®å®Œå…¨ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‚’使用ã—ã¦å¸¸ã«æ›¸ãè¾¼ã¿ãŒè¡Œã‚ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 㨠1 ã®é–“ã®æµ®å‹•å°æ•°ç‚¹æ•°ã€ã‚¹ãƒ‘ースãªã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‚’有効ã«ã™ã‚‹ +- 1.0(ã¾ãŸã¯ãれ以上)ã€ã‚¹ãƒ‘ースãªã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‚’使用ã—ãŸããªã„å ´åˆ + +デフォルト値: `0.9375` + +**例** + +次ã®ãƒ†ãƒ¼ãƒ–ル内㮠`s` カラムã«ã¯ã€è¡Œã®95ï¼…ãŒç©ºã®æ–‡å­—列ã§ã™ã€‚`my_regular_table` ã§ã¯ã‚¹ãƒ‘ースãªã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‚’使用ã›ãšã€`my_sparse_table` ã§ã¯ `ratio_of_defaults_for_sparse_serialization` ã‚’ 0.95 ã«è¨­å®šã—ã¾ã™ã€‚ + +```sql +CREATE TABLE my_regular_table +( + `id` UInt64, + `s` String +) +ENGINE = MergeTree +ORDER BY id; + +INSERT INTO my_regular_table +SELECT + number AS id, + number % 20 = 0 ? toString(number): '' AS s +FROM + numbers(10000000); + + +CREATE TABLE my_sparse_table +( + `id` UInt64, + `s` String +) +ENGINE = MergeTree +ORDER BY id +SETTINGS ratio_of_defaults_for_sparse_serialization = 0.95; + +INSERT INTO my_sparse_table +SELECT + number, + number % 20 = 0 ? toString(number): '' +FROM + numbers(10000000); +``` + +`my_sparse_table` ã® `s` カラムãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ã‚ˆã‚Šå°‘ãªã„ストレージスペースを使用ã—ã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +```sql +SELECT table, name, data_compressed_bytes, data_uncompressed_bytes FROM system.columns +WHERE table LIKE 'my_%_table'; +``` + +```response +┌─table────────────┬─name─┬─data_compressed_bytes─┬─data_uncompressed_bytes─┠+│ my_regular_table │ id │ 37790741 │ 75488328 │ +│ my_regular_table │ s │ 2451377 │ 12683106 │ +│ my_sparse_table │ id │ 37790741 │ 75488328 │ +│ my_sparse_table │ s │ 2283454 │ 9855751 │ +└──────────────────┴──────┴───────────────────────┴─────────────────────────┘ +``` + +カラムãŒã‚¹ãƒ‘ースãªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’使用ã—ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’確èªã™ã‚‹ã«ã¯ã€`system.parts_columns` テーブル㮠`serialization_kind` カラムを表示ã—ã¾ã™ã€‚ + +```sql +SELECT column, serialization_kind FROM system.parts_columns +WHERE table LIKE 'my_sparse_table'; +``` + +スパースãªã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‚’使用ã—ã¦ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã•ã‚ŒãŸ `s` ã®éƒ¨åˆ†ã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚ + +```response +┌─column─┬─serialization_kind─┠+│ id │ Default │ +│ s │ Default │ +│ id │ Default │ +│ s │ Default │ +│ id │ Default │ +│ s │ Sparse │ +│ id │ Default │ +│ s │ Sparse │ +│ id │ Default │ +│ s │ Sparse │ +│ id │ Default │ +│ s │ Sparse │ +│ id │ Default │ +│ s │ Sparse │ +│ id │ Default │ +│ s │ Sparse │ +│ id │ Default │ +│ s │ Sparse │ +└────────┴────────────────────┘ +``` + +## replace_long_file_name_to_hash {#replace_long_file_name_to_hash} +カラムã®ãƒ•ã‚¡ã‚¤ãƒ«å㌠`max_file_name_length` ãƒã‚¤ãƒˆã‚’超ãˆã‚‹å ´åˆã€SipHash128 ã«ç½®ãæ›ãˆã¾ã™ã€‚デフォルト値: `false`. + +## max_file_name_length {#max_file_name_length} + +ãƒãƒƒã‚·ãƒ¥ã‚’é©ç”¨ã›ãšã«å…ƒã®ã¾ã¾ã«ã—ã¦ãŠãファイルåã®æœ€å¤§é•·ã€‚`replace_long_file_name_to_hash` ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã®ã¿å½±éŸ¿ã—ã¾ã™ã€‚ã“ã®è¨­å®šã®å€¤ã¯ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã®é•·ã•ã‚’å«ã¿ã¾ã›ã‚“。ã—ãŸãŒã£ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã®ã‚¨ãƒ©ãƒ¼ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€é€šå¸¸ 255 ãƒã‚¤ãƒˆä»¥ä¸‹ã®æœ€å¤§ãƒ•ã‚¡ã‚¤ãƒ«å長よりもã‚る程度ã®ä½™è£•ã‚’æŒã£ã¦è¨­å®šã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルト値: 127。 + +## allow_experimental_block_number_column + +マージã«ãŠã„ã¦ä»®æƒ³ã‚«ãƒ©ãƒ  `_block_number` を永続化ã—ã¾ã™ã€‚ + +デフォルト値: false. + +## exclude_deleted_rows_for_part_size_in_merge {#exclude_deleted_rows_for_part_size-in-merge} + +有効ã«ã™ã‚‹ã¨ã€`DELETE FROM` を使用ã—ã¦å‰Šé™¤ã•ã‚ŒãŸè¡Œã‚’除外ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®å®Ÿéš›ã®æŽ¨å®šã‚µã‚¤ã‚ºã‚’使用ã—ã¦ãƒ‘ーツをé¸æŠžã—ã¦ãƒžãƒ¼ã‚¸ã‚’è¡Œã„ã¾ã™ã€‚ã“ã®å‹•ä½œã¯ã€ã“ã®è¨­å®šãŒæœ‰åŠ¹åŒ–ã•ã‚ŒãŸ `DELETE FROM` ã®å½±éŸ¿ã‚’å—ã‘るデータパーツã«ã®ã¿ãƒˆãƒªã‚¬ãƒ¼ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +å¯èƒ½ãªå€¤: + +- true, false + +デフォルト値: false + +**関連項目** + +- [load_existing_rows_count_for_old_parts](#load_existing_rows_count-for-old-parts) 設定 + +## load_existing_rows_count_for_old_parts {#load_existing_rows_count_for_old_parts} + +[exclude_deleted_rows_for_part_size_in_merge](#exclude_deleted_rows_for_part_size_in_merge) ã¨ã¨ã‚‚ã«æœ‰åŠ¹ã«ã•ã‚Œã¦ã„ã‚‹å ´åˆã€æ—¢å­˜ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®å‰Šé™¤ã•ã‚ŒãŸè¡Œæ•°ãŒãƒ†ãƒ¼ãƒ–ルã®èµ·å‹•æ™‚ã«è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ†ãƒ¼ãƒ–ルã®èµ·å‹•æ™‚ã«é…延ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- true, false + +デフォルト値: false + +**関連項目** + +- [exclude_deleted_rows_for_part_size_in_merge](#exclude_deleted_rows_for_part_size_in_merge) 設定 + +## use_compact_variant_discriminators_serialization {#use_compact_variant_discriminators_serialization} + +Variant データ型ã§ã®ãƒã‚¤ãƒŠãƒªã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã®ãƒ‡ã‚£ã‚¹ã‚¯ãƒªãƒŸãƒãƒ¼ã‚¿ã®ãŸã‚ã®ã‚³ãƒ³ãƒ‘クトモードを有効化ã—ã¾ã™ã€‚ +ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€å¤§å¤šæ•°ãŒ1ã¤ã®ãƒãƒªã‚¢ãƒ³ãƒˆã¾ãŸã¯å¤šãã®NULL値ãŒã‚ã‚‹å ´åˆã«ã€ãƒ‘ーツã«ãƒ‡ã‚£ã‚¹ã‚¯ãƒªãƒŸãƒãƒ¼ã‚¿ãŒä¿å­˜ã•ã‚Œã‚‹ãŸã‚ã«å¤§å¹…ã«ãƒ¡ãƒ¢ãƒªã‚’節約ã§ãã¾ã™ã€‚ + +デフォルト値: true + +## merge_workload + +マージãŠã‚ˆã³ä»–ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰é–“ã§ã®ãƒªã‚½ãƒ¼ã‚¹åˆ©ç”¨ã¨å…±æœ‰ã‚’調整ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚特定ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ã®ãŸã‚ã® `workload` 設定値ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚指定ã•ã‚Œã¦ã„ãªã„å ´åˆï¼ˆç©ºã®æ–‡å­—列)ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®š `merge_workload` ãŒä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +デフォルト値: 空ã®æ–‡å­—列 + +**関連項目** +- [ワークロードスケジューリング](/docs/ja/operations/workload-scheduling.md) + +## mutation_workload + +変異ãŠã‚ˆã³ä»–ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰é–“ã§ã®ãƒªã‚½ãƒ¼ã‚¹åˆ©ç”¨ã¨å…±æœ‰ã‚’調整ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚特定ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰å¤‰ç•°ã®ãŸã‚ã® `workload` 設定値ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚指定ã•ã‚Œã¦ã„ãªã„å ´åˆï¼ˆç©ºã®æ–‡å­—列)ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®š `mutation_workload` ãŒä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +デフォルト値: 空ã®æ–‡å­—列 + +**関連項目** +- [ワークロードスケジューリング](/docs/ja/operations/workload-scheduling.md) + +### optimize_row_order + +æ–°ã—ã挿入ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルパートã®åœ§ç¸®æ€§ã‚’å‘上ã•ã›ã‚‹ãŸã‚ã«è¡Œé †åºã‚’最é©åŒ–ã™ã¹ãã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚ + +ã“ã‚Œã¯é€šå¸¸ã® MergeTree エンジン テーブルã«ã®ã¿å½±éŸ¿ã—ã¾ã™ã€‚専用㮠MergeTree エンジンテーブル(例: CollapsingMergeTree)ã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 + +MergeTree テーブルã¯ï¼ˆä»»æ„ã§ï¼‰[圧縮コーデック](../../sql-reference/statements/create/table.md#column_compression_codec)を使用ã—ã¦åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ +LZ4 ã‚„ ZSTD ãªã©ã®ä¸€èˆ¬çš„ãªåœ§ç¸®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒãƒ‘ターンを示ã™å ´åˆã€æœ€å¤§ã®åœ§ç¸®çŽ‡ã‚’é”æˆã—ã¾ã™ã€‚ +åŒã˜å€¤ã®é•·ã続ãランã¯é€šå¸¸éžå¸¸ã«ã‚ˆã圧縮ã•ã‚Œã¾ã™ã€‚ + +ã“ã®è¨­å®šãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ClickHouse ã¯æ–°ã—ã挿入ã•ã‚ŒãŸãƒ‘ーツ内ã®ãƒ‡ãƒ¼ã‚¿ã‚’ã€ãƒ†ãƒ¼ãƒ–ルã®æ–°ã—ã„パーツã®ã‚«ãƒ©ãƒ å…¨ä½“ã§ç­‰å€¤ãƒ©ãƒ³ã®æ•°ã‚’最å°åŒ–ã™ã‚‹ã‚ˆã†ãªè¡Œé †åºã§ä¿å­˜ã—よã†ã¨ã—ã¾ã™ã€‚ +言ã„æ›ãˆã‚Œã°ã€å°‘ãªã„æ•°ã®ç­‰å€¤ãƒ©ãƒ³ã¯å€‹ã€…ã®ãƒ©ãƒ³ãŒé•·ããªã‚Šã€ã‚ˆã圧縮ã•ã‚Œã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +最é©ãªè¡Œé †åºã‚’見ã¤ã‘ã‚‹ã“ã¨ã¯è¨ˆç®—上ä¸å¯èƒ½ï¼ˆNPãƒãƒ¼ãƒ‰ï¼‰ã§ã™ã€‚ +ãã®ãŸã‚ã€ClickHouse ã¯ä¾ç„¶ã¨ã—ã¦å…ƒã®è¡Œé †åºã‚ˆã‚Šã‚‚圧縮率を改善ã™ã‚‹è¡Œé †åºã‚’迅速ã«è¦‹ã¤ã‘ã‚‹ãŸã‚ã«ãƒ’ューリスティックスを使用ã—ã¾ã™ã€‚ + +
    + +行順åºã‚’見ã¤ã‘ã‚‹ãŸã‚ã®ãƒ’ューリスティックス + +SQLã§ã¯ã€ç•°ãªã‚‹è¡Œé †åºã®åŒã˜ãƒ†ãƒ¼ãƒ–ル(テーブルパート)ãŒåŒç­‰ã§ã‚ã‚‹ã¨è¦‹ãªã•ã‚Œã‚‹ãŸã‚ã€ãƒ†ãƒ¼ãƒ–ル(ã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ルパート)ã«å¯¾ã—ã¦è‡ªç”±ã«è¡Œã‚’シャッフルã™ã‚‹ã“ã¨ãŒä¸€èˆ¬ã«å¯èƒ½ã§ã™ã€‚ + +テーブルã®ä¸»ã‚­ãƒ¼ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã®è¡Œã®ã‚·ãƒ£ãƒƒãƒ•ãƒ«ã®è‡ªç”±åº¦ã¯åˆ¶é™ã•ã‚Œã¾ã™ã€‚ +ClickHouse ã§ã¯ã€ä¸»ã‚­ãƒ¼ `C1, C2, ..., CN` ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®è¡Œã«ã‚ˆã‚Š `C1`, `C2`, ..., `Cn` ã®ã‚«ãƒ©ãƒ ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒæ±‚ã‚られã¾ã™ï¼ˆ[クラスタインデックス](https://en.wikipedia.org/wiki/Database_index#Clustered))。 +ãã®çµæžœã€ãƒ—ライマリキーカラムã¨åŒã˜å€¤ã‚’æŒã¤è¡Œã€ã™ãªã‚ã¡è¡Œã®"等値クラス"内ã§ã®ã¿è¡Œã®ã‚·ãƒ£ãƒƒãƒ•ãƒ«ãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ +ç›´æ„Ÿçš„ã«ã¯ã€é«˜ã‚«ãƒ¼ãƒ‰ã®ãƒ—ライマリキーã€ä¾‹: `DateTime64` タイムスタンプカラムをå«ã‚€ä¸»ã‚­ãƒ¼ã¯å¤šæ•°ã®å°ã•ãªç­‰å€¤ã‚¯ãƒ©ã‚¹ã‚’生ã˜ã¾ã™ã€‚ +ãã‚Œã«å¯¾ã—ã¦ã€ä½Žã‚«ãƒ¼ãƒ‰ã®ãƒ—ライマリキーをæŒã¤ãƒ†ãƒ¼ãƒ–ルã¯å°‘æ•°ã®å¤§ããªç­‰å€¤ã‚¯ãƒ©ã‚¹ã‚’生æˆã—ã¾ã™ã€‚ +主キーãªã—ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ã™ã¹ã¦ã®è¡Œã‚’一ã¤ã®ç­‰å€¤ã‚¯ãƒ©ã‚¹ã¨ã—ã¦è¡¨ç¾ã™ã‚‹æ¥µç«¯ãªã‚±ãƒ¼ã‚¹ã§ã™ã€‚ + +等値クラスãŒå°‘ãªãã€å¤§ãã„ã»ã©ã€è¡Œã®å†ã‚·ãƒ£ãƒƒãƒ•ãƒ«æ™‚ã®è‡ªç”±åº¦ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +ãã‚Œãžã‚Œã®ç­‰å€¤ã‚¯ãƒ©ã‚¹ã«ãŠã‘る最é©ãªè¡Œé †åºã‚’見ã¤ã‘るヒューリスティックスã¯ã€D. Lemire, O. KaserãŒ[Reordering columns for smaller indexes](https://doi.org/10.1016/j.ins.2011.02.002)ã§æ案ã—ã€ä¸»ã‚­ãƒ¼ä»¥å¤–ã®ã‚«ãƒ©ãƒ ã®æ˜‡é †ã§è¡Œã‚’並ã¹æ›¿ãˆã¾ã™ã€‚ +次ã®3ã¤ã®æ‰‹é †ã‚’実行ã—ã¾ã™ã€‚ +1. 主キーカラムã®è¡Œå€¤ã«åŸºã¥ã„ã¦ã™ã¹ã¦ã®ç­‰å€¤ã‚¯ãƒ©ã‚¹ã‚’見ã¤ã‘ã¾ã™ã€‚ +2. å„等値クラスã«å¯¾ã—ã¦ã€ä¸»ã‚­ãƒ¼ä»¥å¤–ã®ã‚«ãƒ©ãƒ ã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã‚’計算(通常ã¯æŽ¨å®šï¼‰ã—ã¾ã™ã€‚ +3. å„等値クラスã«å¯¾ã—ã¦ã€ä¸»ã‚­ãƒ¼ä»¥å¤–ã®ã‚«ãƒ©ãƒ ã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã®æ˜‡é †ã§è¡Œã‚’並ã¹æ›¿ãˆã¾ã™ã€‚ + +
    + +有効ã«ã™ã‚‹ã¨ã€æ–°ã—ã„データã®è¡Œé †åºã‚’分æžãŠã‚ˆã³æœ€é©åŒ–ã™ã‚‹ãŸã‚ã®è¿½åŠ ã®CPUコストãŒç™ºç”Ÿã—ã¾ã™ã€‚ +INSERTã®å®Ÿè¡Œã¯ã€ãƒ‡ãƒ¼ã‚¿ç‰¹æ€§ã«å¿œã˜ã¦30〜50ï¼…é•·ããªã‚‹ã“ã¨ãŒäºˆæƒ³ã•ã‚Œã¾ã™ã€‚ +LZ4 ã¾ãŸã¯ ZSTD ã®åœ§ç¸®çŽ‡ã¯å¹³å‡20〜40%改善ã—ã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ã€ä½Žã‚«ãƒ¼ãƒ‰ã®ä¸»ã‚­ãƒ¼ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã«æœ€é©ã§ã™ã€‚ã™ãªã‚ã¡ã€å°‘æ•°ã®ç•°ãªã‚‹ä¸»ã‚­ãƒ¼å€¤ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã§ã™ã€‚ +高カードã®ä¸»ã‚­ãƒ¼ã€ä¾‹: `DateTime64` åž‹ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—カラムをå«ã‚€ä¸»ã‚­ãƒ¼ã¯ã€ã“ã®è¨­å®šã‹ã‚‰ã®åˆ©ç›Šã‚’期待ã•ã‚Œã¾ã›ã‚“。 + +## lightweight_mutation_projection_mode + +デフォルトã§ã¯ã€è«–ç†å‰Šé™¤ã® `DELETE` ã¯ã€ãƒ—ロジェクションをæŒã¤ãƒ†ãƒ¼ãƒ–ルã«ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。ã“ã‚Œã¯ã€ãƒ—ロジェクション中ã®è¡ŒãŒ `DELETE` æ“作ã«ã‚ˆã£ã¦å½±éŸ¿ã‚’å—ã‘ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ã—ãŸãŒã£ã¦ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ `throw` ã¨ãªã‚Šã¾ã™ã€‚ +ã—ã‹ã—ã€ã“ã®ã‚ªãƒ—ションã«ã‚ˆã‚Šå‹•ä½œã‚’変更ã§ãã¾ã™ã€‚`drop` ã¾ãŸã¯ `rebuild` ã®ã„ãšã‚Œã‹ã®å€¤ã‚’使用ã—ãŸå ´åˆã€å‰Šé™¤ãŒãƒ—ロジェクションã«ä¼´ã„ã¾ã™ã€‚`drop` ã¯ãƒ—ロジェクションを削除ã™ã‚‹ãŸã‚ã€ãƒ—ロジェクションãŒå‰Šé™¤ã•ã‚ŒãŸãŒãŸã‚ã«ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã§é«˜é€Ÿã§ã™ãŒã€å°†æ¥ã®ã‚¯ã‚¨ãƒªã§é…ããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +`rebuild` ã¯ãƒ—ロジェクションをå†æ§‹ç¯‰ã—ã€ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã¾ã™ãŒã€å°†æ¥ã®ã‚¯ã‚¨ãƒªã®ã‚¹ãƒ”ードアップãŒæœŸå¾…ã•ã‚Œã¾ã™ã€‚良ã„ã“ã¨ã¯ã€ã“れらã®ã‚ªãƒ—ションã¯éƒ¨åˆ†ãƒ¬ãƒ™ãƒ«ã§ã®ã¿å‹•ä½œã™ã‚‹ãŸã‚〠+タッãƒã—ãªã„部分ã®ãƒ—ロジェクションã¯ã€å‰Šé™¤ã‚„å†æ§‹ç¯‰ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’トリガーã™ã‚‹ã“ã¨ãªããã®ã¾ã¾æ®‹ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- throw, drop, rebuild + +デフォルト値: throw + +## deduplicate_merge_projection_mode + +éžã‚¯ãƒ©ã‚·ãƒƒã‚¯ MergeTree ã§éžã‚¯ãƒ©ã‚·ãƒƒã‚¯ MergeTree ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã®ãŸã‚ã«ãƒ—ロジェクションを作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã™ã‚‹ã‹ã©ã†ã‹ã€‚無視ã™ã‚‹ã‚ªãƒ—ションã¯ã€ç´”粋ã«äº’æ›æ€§ã®ãŸã‚ã®ã‚‚ã®ã§ã€èª¤ã£ãŸå›žç­”ã‚’ã‚‚ãŸã‚‰ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚許å¯ã•ã‚Œã‚‹å ´åˆã€ãƒžãƒ¼ã‚¸ãƒ—ロジェクションã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ï¼ˆå‰Šé™¤ã¾ãŸã¯å†æ§‹ç¯‰ï¼‰ã§ã™ã€‚ãã®ãŸã‚ã€ã‚¯ãƒ©ã‚·ãƒƒã‚¯ MergeTree ã¯ã“ã®è¨­å®šã‚’無視ã—ã¾ã™ã€‚ +`OPTIMIZE DEDUPLICATE` も制御ã—ã€ã™ã¹ã¦ã® MergeTree ファミリメンãƒãƒ¼ã«å½±éŸ¿ã‚’åŠã¼ã—ã¾ã™ã€‚`lightweight_mutation_projection_mode` オプションã¨åŒæ§˜ã«ã€éƒ¨åˆ†ãƒ¬ãƒ™ãƒ«ã§ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ignore, throw, drop, rebuild + +デフォルト値: throw + +## min_free_disk_bytes_to_perform_insert + +データを挿入ã™ã‚‹ãŸã‚ã«ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã«ç©ºã„ã¦ã„ã‚‹ã¹ã最å°ãƒã‚¤ãƒˆæ•°ã€‚利用å¯èƒ½ãªãƒã‚¤ãƒˆãŒ `min_free_disk_bytes_to_throw_insert` 未満ã®å ´åˆã¯ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã€æŒ¿å…¥ãŒå®Ÿè¡Œã•ã‚Œã¾ã›ã‚“。ã“ã®è¨­å®šã¯ä»¥ä¸‹ã‚’念頭ã«ç½®ã„ã¦ã„ã¾ã™ã€‚ +- `keep_free_space_bytes` 設定を考慮ã—ã¾ã™ã€‚ +- `INSERT` æ“作ã«ã‚ˆã£ã¦æ›¸ãè¾¼ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿é‡ã¯è€ƒæ…®ã—ã¾ã›ã‚“。 +- æ­£ã®ï¼ˆã‚¼ãƒ­ã§ãªã„)ãƒã‚¤ãƒˆæ•°ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã«ã®ã¿ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +デフォルト値: 0 ãƒã‚¤ãƒˆã€‚ + +`min_free_disk_bytes_to_perform_insert` 㨠`min_free_disk_ratio_to_perform_insert` ã®ä¸¡æ–¹ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouse ã¯ç©ºãメモリã®å¤§ãã•ã§å…¥åŠ›ã‚’許å¯ã™ã‚‹å€¤ã‚’考慮ã—ã¾ã™ã€‚ + +## min_free_disk_ratio_to_perform_insert + +`INSERT` を実行ã™ã‚‹ãŸã‚ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã®æœ€å°ã®ç©ºã対åˆè¨ˆæ¯”率。0ã¨1ã®é–“ã®æµ®å‹•å°æ•°ç‚¹å€¤ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã¯ä»¥ä¸‹ã‚’考慮ã—ã¾ã™ã€‚ +- `keep_free_space_bytes` 設定を考慮ã—ã¾ã™ã€‚ +- `INSERT` æ“作ã«ã‚ˆã£ã¦æ›¸ãè¾¼ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿é‡ã¯è€ƒæ…®ã—ã¾ã›ã‚“。 +- æ­£ã®ï¼ˆã‚¼ãƒ­ã§ãªã„)比率ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã«ã®ã¿ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ + +å¯èƒ½ãªå€¤: + +- 浮動å°æ•°ç‚¹ã€0.0 - 1.0 + +デフォルト値: 0.0 + +`min_free_disk_ratio_to_perform_insert` 㨠`min_free_disk_bytes_to_perform_insert` ã®ä¸¡æ–¹ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouse ã¯ç©ºãメモリã®å¤§ããªéƒ¨åˆ†ã§æŒ¿å…¥ã‚’実行ã™ã‚‹ã“ã¨ã‚’許å¯ã™ã‚‹å€¤ã‚’考慮ã—ã¾ã™ã€‚ diff --git a/docs/ja/operations/settings/permissions-for-queries.md b/docs/ja/operations/settings/permissions-for-queries.md new file mode 100644 index 00000000000..375fcfe71b2 --- /dev/null +++ b/docs/ja/operations/settings/permissions-for-queries.md @@ -0,0 +1,66 @@ +--- +slug: /ja/operations/settings/permissions-for-queries +sidebar_position: 58 +sidebar_label: クエリã®æ¨©é™ +--- + +# クエリã®æ¨©é™ + +ClickHouseã®ã‚¯ã‚¨ãƒªã¯ä»¥ä¸‹ã®ã„ãã¤ã‹ã®ã‚¿ã‚¤ãƒ—ã«åˆ†ã‘られã¾ã™ã€‚ + +1. データ読ã¿å–りクエリ: `SELECT`ã€`SHOW`ã€`DESCRIBE`ã€`EXISTS` +2. データ書ãè¾¼ã¿ã‚¯ã‚¨ãƒª: `INSERT`ã€`OPTIMIZE` +3. 設定変更クエリ: `SET`ã€`USE` +4. [DDL](https://en.wikipedia.org/wiki/Data_definition_language) クエリ: `CREATE`ã€`ALTER`ã€`RENAME`ã€`ATTACH`ã€`DETACH`ã€`DROP`ã€`TRUNCATE` +5. `KILL QUERY` + +以下ã®è¨­å®šã¯ã€ã‚¯ã‚¨ãƒªã®ã‚¿ã‚¤ãƒ—ã«ã‚ˆã£ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼æ¨©é™ã‚’調整ã—ã¾ã™ã€‚ + +## readonly +データã®èª­ã¿å–ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã®æ›¸ãè¾¼ã¿ã€ãŠã‚ˆã³è¨­å®šå¤‰æ›´ã‚¯ã‚¨ãƒªã«å¯¾ã™ã‚‹æ¨©é™ã‚’制é™ã—ã¾ã™ã€‚ + +1ã«è¨­å®šã™ã‚‹ã¨ã€ä»¥ä¸‹ãŒè¨±å¯ã•ã‚Œã¾ã™: + +- å…¨ã¦ã®ã‚¿ã‚¤ãƒ—ã®èª­ã¿å–りクエリ(`SELECT`ã‚„åŒç­‰ã®ã‚¯ã‚¨ãƒªãªã©ï¼‰ +- セッションコンテキストã®ã¿ã‚’変更ã™ã‚‹ã‚¯ã‚¨ãƒªï¼ˆ`USE`ãªã©ï¼‰ + +2ã«è¨­å®šã™ã‚‹ã¨ã€ä¸Šè¨˜ã«åŠ ãˆã¦ä»¥ä¸‹ã‚‚許å¯ã•ã‚Œã¾ã™: +- `SET` 㨠`CREATE TEMPORARY TABLE` + + :::tip + `EXISTS`ã€`DESCRIBE`ã€`EXPLAIN`ã€`SHOW PROCESSLIST` ãªã©ã®ã‚¯ã‚¨ãƒªã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®é¸æŠžã‚’è¡Œã†ã ã‘ãªã®ã§ã€`SELECT` ã¨åŒç­‰ã§ã™ã€‚ + ::: + +å¯èƒ½ãªå€¤: +- 0 — 読ã¿å–ã‚Šã€æ›¸ãè¾¼ã¿ã€è¨­å®šå¤‰æ›´ã‚¯ã‚¨ãƒªãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ +- 1 — データ読ã¿å–りクエリã®ã¿ãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ +- 2 — データ読ã¿å–ã‚ŠãŠã‚ˆã³è¨­å®šå¤‰æ›´ã‚¯ã‚¨ãƒªãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ + +デフォルト値: 0 + +:::note +`readonly = 1` を設定ã—ãŸå¾Œã€ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ `readonly` ãŠã‚ˆã³ `allow_ddl` ã®è¨­å®šã‚’変更ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +[HTTPインターフェース](../../interfaces/http.md)ã§`GET`メソッドを使用ã™ã‚‹å ´åˆã€`readonly = 1` ãŒè‡ªå‹•çš„ã«è¨­å®šã•ã‚Œã¾ã™ã€‚データを変更ã™ã‚‹ã«ã¯ã€`POST`メソッドを使用ã—ã¦ãã ã•ã„。 + +`readonly = 1` を設定ã™ã‚‹ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è¨­å®šã‚’変更ã§ããªããªã‚Šã¾ã™ã€‚特定ã®è¨­å®šã®ã¿ã®å¤‰æ›´ã‚’ç¦æ­¢ã™ã‚‹æ–¹æ³•ã‚‚ã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€`readonly = 1` ã®åˆ¶é™ä¸‹ã§ç‰¹å®šã®è¨­å®šã®ã¿ã®å¤‰æ›´ã‚’許å¯ã™ã‚‹æ–¹æ³•ã‚‚ã‚ã‚Šã¾ã™ã€‚詳細ã¯[設定ã®åˆ¶ç´„](../../operations/settings/constraints-on-settings.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## allow_ddl {#allow_ddl} + +[DDL](https://en.wikipedia.org/wiki/Data_definition_language)クエリを許å¯ã¾ãŸã¯ç¦æ­¢ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — DDLクエリã¯è¨±å¯ã•ã‚Œã¾ã›ã‚“。 +- 1 — DDLクエリã¯è¨±å¯ã•ã‚Œã¾ã™ã€‚ + +デフォルト値: 1 + +:::note +ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ `allow_ddl = 0` ã®å ´åˆã€`SET allow_ddl = 1` を実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +::: + +:::note KILL QUERY +`KILL QUERY` ã¯ã€`readonly` 㨠`allow_ddl` ã®è¨­å®šã®ã„ã‹ãªã‚‹çµ„ã¿åˆã‚ã›ã§ã‚‚実行å¯èƒ½ã§ã™ã€‚ +::: diff --git a/docs/ja/operations/settings/query-complexity.md b/docs/ja/operations/settings/query-complexity.md new file mode 100644 index 00000000000..1f247bd6343 --- /dev/null +++ b/docs/ja/operations/settings/query-complexity.md @@ -0,0 +1,423 @@ +--- +slug: /ja/operations/settings/query-complexity +sidebar_position: 59 +sidebar_label: クエリã®è¤‡é›‘ã•ã®åˆ¶é™ +--- + +# クエリã®è¤‡é›‘ã•ã®åˆ¶é™ + +クエリã®è¤‡é›‘ã•ã®åˆ¶é™ã¯è¨­å®šã®ä¸€éƒ¨ã§ã™ã€‚ã“れらã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‹ã‚‰ã®å®‰å…¨ãªå®Ÿè¡Œã‚’æä¾›ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã»ã¨ã‚“ã©ã®åˆ¶é™ã¯`SELECT`ã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚分散クエリ処ç†ã®ãŸã‚ã«ã€åˆ¶é™ã¯å„サーãƒãƒ¼ã”ã¨ã«å€‹åˆ¥ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +ClickHouse ã¯ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®åˆ¶é™ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€å„è¡Œã”ã¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã¤ã¾ã‚Šã€åˆ¶é™ã®å€¤ã‚’データパーツã®ã‚µã‚¤ã‚ºã§è¶…ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +「何ã‹ã®æœ€å¤§é‡ã€ã®åˆ¶é™ã¯ 0 ã®å€¤ã‚’å–ã‚‹ã“ã¨ãŒã§ãã€ã“ã‚Œã¯ã€Œåˆ¶é™ãªã—ã€ã‚’æ„味ã—ã¾ã™ã€‚ã»ã¨ã‚“ã©ã®åˆ¶é™ã«ã¯ã€åˆ¶é™ã‚’超ãˆãŸå ´åˆã«ã©ã†ã™ã‚‹ã‹ã‚’決定ã™ã‚‹ã€Œoverflow_modeã€è¨­å®šã‚‚ã‚ã‚Šã¾ã™ã€‚ãれ㯠2 ã¤ã®å€¤ã®ã„ãšã‚Œã‹ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã™: `throw`ã¾ãŸã¯`break`。集計(group_by_overflow_mode)ã®åˆ¶é™ã«ã¯ã€`any`ã®å€¤ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +`throw` – 例外を投ã’る(デフォルト)。 + +`break` – クエリã®å®Ÿè¡Œã‚’åœæ­¢ã—ã€éƒ¨åˆ†çš„ãªçµæžœã‚’è¿”ã™ï¼ˆã‚½ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ãŒå°½ããŸã‹ã®ã‚ˆã†ã«ï¼‰ã€‚ + +`any(group_by_overflow_mode ã®ã¿ï¼‰` – 集約ã®ã‚­ãƒ¼ãŒã‚»ãƒƒãƒˆã«å…¥ã£ãŸã‚­ãƒ¼ã«å¯¾ã—ã¦ã®ã¿ç¶™ç¶šã—ã€æ–°ã—ã„キーをセットã«è¿½åŠ ã—ãªã„。 + +## max_memory_usage {#settings_max_memory_usage} + +å˜ä¸€ã‚µãƒ¼ãƒãƒ¼ã§ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§RAMé‡ã€‚ + +デフォルト設定ã¯ç„¡åˆ¶é™ï¼ˆ`0`ã«è¨­å®šï¼‰ã€‚ + +クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼šãƒ¬ãƒ—リカã®RAMé‡ã«ä¾å­˜ã€‚ + +ã“ã®è¨­å®šã¯ã€åˆ©ç”¨å¯èƒ½ãªãƒ¡ãƒ¢ãƒªã®å®¹é‡ã‚„マシンã®ãƒ¡ãƒ¢ãƒªã®åˆè¨ˆå®¹é‡ã‚’考慮ã—ã¾ã›ã‚“。ã“ã®åˆ¶é™ã¯å˜ä¸€ã‚µãƒ¼ãƒãƒ¼å†…ã®å˜ä¸€ã‚¯ã‚¨ãƒªã«é©ç”¨ã•ã‚Œã¾ã™ã€‚`SHOW PROCESSLIST`を使用ã™ã‚‹ã¨ã€å„クエリã®ç¾åœ¨ã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚’確èªã§ãã¾ã™ã€‚ã•ã‚‰ã«ã€å„クエリã®ãƒ”ークメモリ消費ãŒè¿½è·¡ã•ã‚Œã€ãƒ­ã‚°ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +特定ã®é›†è¨ˆé–¢æ•°ã®çŠ¶æ…‹ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã¯ç›£è¦–ã•ã‚Œã¾ã›ã‚“。 + +`min`ã€`max`ã€`any`ã€`anyLast`ã€`argMin`ã€`argMax`ã®é›†è¨ˆé–¢æ•°ã®çŠ¶æ…‹ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã¯å®Œå…¨ã«ã¯è¿½è·¡ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +メモリ消費ã¯`max_memory_usage_for_user`ãŠã‚ˆã³[max_server_memory_usage](../../operations/server-configuration-parameters/settings.md#max_server_memory_usage)ã®ãƒ‘ラメータã«ã‚ˆã£ã¦ã‚‚制é™ã•ã‚Œã¾ã™ã€‚ + +## max_memory_usage_for_user {#max-memory-usage-for-user} + +å˜ä¸€ã‚µãƒ¼ãƒãƒ¼ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§RAMé‡ã€‚ + +デフォルト値ã¯[Settings.h](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.h#L288)ã§å®šç¾©ã•ã‚Œã¦ã„ã¾ã™ã€‚デフォルトã§ã¯ã€é‡ã¯åˆ¶é™ã•ã‚Œã¦ã„ã¾ã›ã‚“(`max_memory_usage_for_user = 0`)。 + +[max_memory_usage](#settings_max_memory_usage)ã®èª¬æ˜Žã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +ãŸã¨ãˆã°ã€`clickhouse_read`ã¨ã„ã†åå‰ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦`max_memory_usage_for_user`ã‚’1000ãƒã‚¤ãƒˆã«è¨­å®šã—ãŸã„å ´åˆã¯ã€æ¬¡ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’使用ã—ã¾ã™ã€‚ + +``` sql +ALTER USER clickhouse_read SETTINGS max_memory_usage_for_user = 1000; +``` + +ãã‚ŒãŒæ©Ÿèƒ½ã—ãŸã“ã¨ã‚’確èªã™ã‚‹ã«ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ãƒ­ã‚°ã‚¢ã‚¦ãƒˆã—ã€å†åº¦ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ã‹ã‚‰ã€`getSetting`関数を使用ã—ã¾ã™ï¼š + +```sql +SELECT getSetting('max_memory_usage_for_user'); +``` + +## max_rows_to_read {#max-rows-to-read} + +次ã®åˆ¶é™ã¯å„ブロックã§ãƒã‚§ãƒƒã‚¯ã•ã‚Œã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆå„è¡Œã§ã¯ã‚ã‚Šã¾ã›ã‚“)。ã¤ã¾ã‚Šã€åˆ¶é™ã‚’å°‘ã—超ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +クエリを実行ã™ã‚‹éš›ã«ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãる最大行数。 + +## max_bytes_to_read {#max-bytes-to-read} + +クエリを実行ã™ã‚‹éš›ã«ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãる最大ãƒã‚¤ãƒˆæ•°ï¼ˆéžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ï¼‰ã€‚ + +## read_overflow_mode {#read-overflow-mode} + +読ã¿å–りデータボリュームãŒåˆ¶é™ã‚’超ãˆãŸå ´åˆã«ã©ã†ã™ã‚‹ã‹ï¼š`throw`ã¾ãŸã¯`break`。デフォルトã¯`trow`。 + +## max_rows_to_read_leaf {#max-rows-to-read-leaf} + +次ã®åˆ¶é™ã¯å„ブロックã§ãƒã‚§ãƒƒã‚¯ã•ã‚Œã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆå„è¡Œã§ã¯ã‚ã‚Šã¾ã›ã‚“)。ã¤ã¾ã‚Šã€åˆ¶é™ã‚’å°‘ã—超ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +分散クエリを実行ã™ã‚‹éš›ã«ãƒªãƒ¼ãƒ•ãƒŽãƒ¼ãƒ‰ä¸Šã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãる最大行数ã§ã™ã€‚分散クエリã¯å„シャード(リーフ)ã«å¯¾ã™ã‚‹è¤‡æ•°ã®ã‚µãƒ–クエリを発行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ - ã“ã®åˆ¶é™ã¯ãƒªãƒ¼ãƒ•ãƒŽãƒ¼ãƒ‰ã§ã®èª­ã¿å–り段階ã§ã®ã¿ãƒã‚§ãƒƒã‚¯ã•ã‚Œã€ãƒ«ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã§ã®çµæžœãƒžãƒ¼ã‚¸æ®µéšŽã§ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€2ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‹ã‚‰æˆã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãŒã‚ã‚Šã€å„シャードã«100è¡Œã®ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹ã¨ã—ã¾ã™ã€‚ãã‚Œã‹ã‚‰åˆ†æ•£ã‚¯ã‚¨ãƒªã¯ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚ã†ã¨ã—ã¦ã„ã‚‹ã®ã§ã€`max_rows_to_read=150`を設定ã™ã‚‹ã¨ãƒˆãƒ¼ã‚¿ãƒ«ã§200è¡Œã«ãªã‚‹ãŸã‚失敗ã—ã¾ã™ã€‚一方ã§`max_rows_to_read_leaf=150`を設定ã—ãŸã‚¯ã‚¨ãƒªã¯æˆåŠŸã—ã¾ã™ã€ãªãœãªã‚‰ãƒªãƒ¼ãƒ•ãƒŽãƒ¼ãƒ‰ãŒæœ€å¤§ã§100行を読ã¿å–ã‚‹ã‹ã‚‰ã§ã™ã€‚ + +## max_bytes_to_read_leaf {#max-bytes-to-read-leaf} + +分散クエリを実行ã™ã‚‹éš›ã«ãƒªãƒ¼ãƒ•ãƒŽãƒ¼ãƒ‰ä¸Šã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãる最大ãƒã‚¤ãƒˆæ•°ï¼ˆéžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ï¼‰ã€‚分散クエリã¯å„シャード(リーフ)ã«å¯¾ã™ã‚‹è¤‡æ•°ã®ã‚µãƒ–クエリを発行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ - ã“ã®åˆ¶é™ã¯ãƒªãƒ¼ãƒ•ãƒŽãƒ¼ãƒ‰ã§ã®èª­ã¿å–り段階ã§ã®ã¿ãƒã‚§ãƒƒã‚¯ã•ã‚Œã€ãƒ«ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã§ã®çµæžœãƒžãƒ¼ã‚¸æ®µéšŽã§ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€2ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‹ã‚‰æˆã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãŒã‚ã‚Šã€å„シャードã«100ãƒã‚¤ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹ã¨ã—ã¾ã™ã€‚ãã‚Œã‹ã‚‰åˆ†æ•£ã‚¯ã‚¨ãƒªãŒã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’両方ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–ã‚ã†ã¨ã—ã¦ã„ã‚‹ã®ã§ã€`max_bytes_to_read=150`を設定ã™ã‚‹ã¨ãƒˆãƒ¼ã‚¿ãƒ«ã§200ãƒã‚¤ãƒˆã«ãªã‚‹ãŸã‚失敗ã—ã¾ã™ã€‚一方ã§`max_bytes_to_read_leaf=150`を設定ã—ãŸã‚¯ã‚¨ãƒªã¯æˆåŠŸã—ã¾ã™ã€ãªãœãªã‚‰ãƒªãƒ¼ãƒ•ãƒŽãƒ¼ãƒ‰ãŒæœ€å¤§ã§100ãƒã‚¤ãƒˆã‚’読ã¿å–ã‚‹ã‹ã‚‰ã§ã™ã€‚ + +## read_overflow_mode_leaf {#read-overflow-mode-leaf} + +リーフ制é™ã‚’超ãˆã‚‹ãƒ‡ãƒ¼ã‚¿é‡ã§èª­ã¿å–ã‚ŠãŒè¡Œã‚ã‚ŒãŸå ´åˆã«ã©ã®ã‚ˆã†ã«ã™ã‚‹ã‹ï¼š`throw`ã¾ãŸã¯`break`ã§ã™ã€‚デフォルトã¯`trow`ã§ã™ã€‚ + +## max_rows_to_group_by {#settings-max-rows-to-group-by} + +集計ã‹ã‚‰å—ã‘å–るユニークãªã‚­ãƒ¼ã®æœ€å¤§æ•°ã€‚ã“ã®è¨­å®šã¯é›†è¨ˆæ™‚ã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚’制é™ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +## group_by_overflow_mode {#group-by-overflow-mode} + +集計ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªã‚­ãƒ¼æ•°ãŒåˆ¶é™ã‚’超ãˆãŸå ´åˆã«ã©ã†ã™ã‚‹ã‹ï¼š`throw`〠`break`ã€ã¾ãŸã¯ `any`。 デフォルト㯠`throw` ã§ã™ã€‚ `any` 値を使用ã™ã‚‹ã¨ã€GROUP BY ã®è¿‘似値を実行ã§ãã¾ã™ã€‚ã“ã®è¿‘似値ã®ç²¾åº¦ã¯ãƒ‡ãƒ¼ã‚¿ã®çµ±è¨ˆçš„性質ã«ä¾å­˜ã—ã¾ã™ã€‚ + +## max_bytes_before_external_group_by {#settings-max_bytes_before_external_group_by} + +`GROUP BY`å¥ã®å¤–部メモリã§ã®å®Ÿè¡Œã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ 詳細ã¯[外部メモリã§ã®GROUP BY](../../sql-reference/statements/select/group-by.md#select-group-by-in-external-memory)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +å¯èƒ½ãªå€¤ï¼š + +- å˜ä¸€ã®[GROUP BY](../../sql-reference/statements/select/group-by.md#select-group-by-clause)æ“作ã§ä½¿ç”¨ã§ãる最大ã®RAMボリューム(ãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ +- 0 — 外部メモリã§ã®`GROUP BY`ãŒç„¡åŠ¹ã€‚ + +デフォルト値:`0`. + +クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼šãƒ¬ãƒ—リカã‚ãŸã‚Šã®ãƒ¡ãƒ¢ãƒªé‡ã®åŠåˆ†ã€‚ + +## max_bytes_before_external_sort {#settings-max_bytes_before_external_sort} + +`ORDER BY`å¥ã®å¤–部メモリã§ã®å®Ÿè¡Œã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ 詳細ã¯[ORDER BY ã®å®Ÿè£…方法](../../sql-reference/statements/select/order-by.md#implementation-details)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +- å˜ä¸€ã®[ORDER BY](../../sql-reference/statements/select/order-by.md)æ“作ã§ä½¿ç”¨å¯èƒ½ãªæœ€å¤§RAMボリューム(ãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ 推奨値ã¯ã€åˆ©ç”¨å¯èƒ½ãªã‚·ã‚¹ãƒ†ãƒ ãƒ¡ãƒ¢ãƒªã®åŠåˆ†ã§ã™ã€‚ +- 0 — 外部メモリã§ã®`ORDER BY`ãŒç„¡åŠ¹ã€‚ + +デフォルト値:0。 + +クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼šãƒ¬ãƒ—リカã‚ãŸã‚Šã®ãƒ¡ãƒ¢ãƒªé‡ã®åŠåˆ†ã€‚ + +## max_rows_to_sort {#max-rows-to-sort} + +ソートå‰ã®æœ€å¤§è¡Œæ•°ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚½ãƒ¼ãƒˆæ™‚ã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚’制é™ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## max_bytes_to_sort {#max-bytes-to-sort} + +ソートå‰ã®æœ€å¤§ãƒã‚¤ãƒˆæ•°ã€‚ + +## sort_overflow_mode {#sort-overflow-mode} + +ソートã™ã‚‹å‰ã«å—ã‘å–ã£ãŸè¡Œã®æ•°ãŒåˆ¶é™ã‚’超ãˆãŸå ´åˆã«ã©ã†ã™ã‚‹ã‹ï¼š`throw`ã¾ãŸã¯`break`。 デフォルトã¯`throw`ã§ã™ã€‚ + +## max_result_rows {#setting-max_result_rows} + +çµæžœã®è¡Œæ•°ã®åˆ¶é™ã€‚サブクエリã§ã‚‚ãƒã‚§ãƒƒã‚¯ã•ã‚Œã€åˆ†æ•£ã‚¯ã‚¨ãƒªã®ä¸€éƒ¨ã‚’実行ã™ã‚‹éš›ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã§ã‚‚ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚値ãŒ`0`ã®å ´åˆã¯åˆ¶é™ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。 + +デフォルト値:`0`. + +クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼š`0`. + +## max_result_bytes {#max-result-bytes} + +çµæžœã®ãƒã‚¤ãƒˆæ•°ã®åˆ¶é™ã€‚å‰ã®è¨­å®šã¨åŒæ§˜ã€‚ + +## result_overflow_mode {#result-overflow-mode} + +çµæžœã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ãŒã„ãšã‚Œã‹ã®åˆ¶é™ã‚’超ãˆãŸå ´åˆã«ã©ã†ã™ã‚‹ã‹ï¼š`throw`ã¾ãŸã¯`break`。 + +`break`を使用ã™ã‚‹ã“ã¨ã¯ã€LIMITを使用ã™ã‚‹ã“ã¨ã¨ä¼¼ã¦ã„ã¾ã™ã€‚`Break`ã¯ãƒ–ロックレベルã§ã®ã¿å®Ÿè¡Œã‚’中断ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€è¿”ã•ã‚Œã‚‹è¡Œæ•°ãŒ[max_result_rows](#setting-max_result_rows)より多ã„ã“ã¨ã‚’æ„味ã—ã€[max_block_size](../../operations/settings/settings.md#setting-max_block_size)ã®å€æ•°ã§ã‚ã‚Šã€[max_threads](../../operations/settings/settings.md#max_threads)ã«ä¾å­˜ã—ã¾ã™ã€‚ + +デフォルト値:`throw`. + +クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼š`throw`. + +例: + +``` sql +SET max_threads = 3, max_block_size = 3333; +SET max_result_rows = 3334, result_overflow_mode = 'break'; + +SELECT * +FROM numbers_mt(100000) +FORMAT Null; +``` + +çµæžœï¼š + +``` text +6666 rows in set. ... +``` + +## max_execution_time {#max-execution-time} + +クエリã®æœ€å¤§å®Ÿè¡Œæ™‚間(秒å˜ä½ï¼‰ã€‚ã“ã®æ™‚é–“ã€ã‚½ãƒ¼ãƒˆæ®µéšŽã®ã„ãšã‚Œã‹ã€ã¾ãŸã¯é›†è¨ˆé–¢æ•°ã®ãƒžãƒ¼ã‚¸ã‚„最終化時ã«ã¯ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã›ã‚“。 + +`max_execution_time`パラメータã¯ç†è§£ã—ã¥ã‚‰ã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ç¾åœ¨ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œé€Ÿåº¦ã«å¯¾ã™ã‚‹è£œé–“ã«åŸºã¥ã„ã¦å‹•ä½œã—ã¾ã™ï¼ˆã“ã®å‹•ä½œã¯[timeout_before_checking_execution_speed](#timeout-before-checking-execution-speed)ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ï¼‰ã€‚ClickHouseã¯ã€æŒ‡å®šã•ã‚ŒãŸ`max_execution_time`を超ãˆã‚‹ã¨äºˆæ¸¬ã•ã‚Œã‚‹å®Ÿè¡Œæ™‚é–“ãŒã‚ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã‚’中断ã—ã¾ã™ã€‚デフォルトã§ã€timeout_before_checking_execution_speedã¯10秒ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œé–‹å§‹ã‹ã‚‰10秒後ã«ã€ClickHouseãŒç·å®Ÿè¡Œæ™‚間を見ç©ã‚‚り始ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€`max_execution_time`ãŒ3600秒(1時間)ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€è¦‹ç©ã‚‚り時間ãŒã“ã®3600秒ã®åˆ¶é™ã‚’超ãˆã‚‹ã¨ã€ClickHouseã¯ã‚¯ã‚¨ãƒªã‚’終了ã—ã¾ã™ã€‚`timeout_before_checking_execution_speed`ã‚’0ã«è¨­å®šã™ã‚‹ã¨ã€ClickHouseã¯ã‚¯ãƒ­ãƒƒã‚¯æ™‚é–“ã‚’`max_execution_time`ã®åŸºæº–ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +## timeout_overflow_mode {#timeout-overflow-mode} + +クエリãŒ`max_execution_time`を超ãˆã¦å®Ÿè¡Œã•ã‚ŒãŸå ´åˆã¾ãŸã¯è¦‹ç©ã‚‚り実行時間ãŒ`max_estimated_execution_time`を超ãˆã¦ã„ã‚‹å ´åˆã«ã©ã†ã™ã‚‹ã‹ï¼š`throw`ã¾ãŸã¯`break`。デフォルトã¯`throw`。 + +## max_execution_time_leaf + +`max_execution_time`ã¨åŒæ§˜ã®æ„味ã§ã™ãŒã€åˆ†æ•£ã¾ãŸã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚¯ã‚¨ãƒªã®ãƒªãƒ¼ãƒ•ãƒŽãƒ¼ãƒ‰ã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ãƒªãƒ¼ãƒ•ãƒŽãƒ¼ãƒ‰ã®å®Ÿè¡Œæ™‚é–“ã‚’`10s`ã«åˆ¶é™ã—ã¦ã€åˆæœŸãƒŽãƒ¼ãƒ‰ã«ã¯åˆ¶é™ã‚’ã‹ã‘ãªã„å ´åˆã€å…¥ã‚Œå­ã®ã‚µãƒ–クエリ設定ã®ä¸­ã§`max_execution_time`ã‚’æŒã¤ä»£ã‚ã‚Šã«ï¼š + +``` sql +SELECT count() FROM cluster(cluster, view(SELECT * FROM t SETTINGS max_execution_time = 10)); +``` + +クエリ設定ã¨ã—ã¦`max_execution_time_leaf`を使用ã§ãã¾ã™ï¼š + +``` sql +SELECT count() FROM cluster(cluster, view(SELECT * FROM t)) SETTINGS max_execution_time_leaf = 10; +``` + +## timeout_overflow_mode_leaf + +リーフノードã®ã‚¯ã‚¨ãƒªãŒ`max_execution_time_leaf`より長ã実行ã•ã‚ŒãŸå ´åˆã«ã©ã†ã™ã‚‹ã‹ï¼š`throw`ã¾ãŸã¯`break`。デフォルトã¯`throw`。 + +## min_execution_speed {#min-execution-speed} + +秒ã‚ãŸã‚Šã®è¡Œæ•°ã§ã®æœ€å°å®Ÿè¡Œé€Ÿåº¦ã€‚‘timeout_before_checking_execution_speed’ãŒæœŸé™åˆ‡ã‚Œã«ãªã£ãŸæ™‚点ã§å„データブロックã§ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚実行速度ãŒä½Žã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +## min_execution_speed_bytes {#min-execution-speed-bytes} + +1秒ã‚ãŸã‚Šã®æœ€å°å®Ÿè¡Œãƒã‚¤ãƒˆæ•°ã€‚‘timeout_before_checking_execution_speed’ãŒæœŸé™åˆ‡ã‚Œã«ãªã£ãŸæ™‚点ã§å„データブロックã§ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚実行速度ãŒä½Žã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +## max_execution_speed {#max-execution-speed} + +1秒ã‚ãŸã‚Šã®æœ€å¤§å®Ÿè¡Œè¡Œæ•°ã€‚‘timeout_before_checking_execution_speed’ãŒæœŸé™åˆ‡ã‚Œã«ãªã£ãŸæ™‚点ã§å„データブロックã§ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚実行速度ãŒé«˜ã„å ´åˆã€å®Ÿè¡Œé€Ÿåº¦ã¯ä½Žæ¸›ã•ã‚Œã¾ã™ã€‚ + +## max_execution_speed_bytes {#max-execution-speed-bytes} + +1秒ã‚ãŸã‚Šã®æœ€å¤§å®Ÿè¡Œãƒã‚¤ãƒˆæ•°ã€‚‘timeout_before_checking_execution_speed’ãŒæœŸé™åˆ‡ã‚Œã«ãªã£ãŸæ™‚点ã§å„データブロックã§ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚実行速度ãŒé«˜ã„å ´åˆã€å®Ÿè¡Œé€Ÿåº¦ã¯ä½Žæ¸›ã•ã‚Œã¾ã™ã€‚ + +## timeout_before_checking_execution_speed {#timeout-before-checking-execution-speed} + +指定ã•ã‚ŒãŸç§’æ•°ãŒéŽãŽãŸå¾Œã«ã€å®Ÿè¡Œé€Ÿåº¦ãŒé…ã™ãŽãªã„ã“ã¨ï¼ˆâ€˜min_execution_speed’以上ã§ã‚ã‚‹ã“ã¨ï¼‰ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +## max_estimated_execution_time {#max_estimated_execution_time} + +秒å˜ä½ã®ã‚¯ã‚¨ãƒªæŽ¨å®šå®Ÿè¡Œæ™‚é–“ã®æœ€å¤§å€¤ã€‚‘timeout_before_checking_execution_speed’ãŒæœŸé™åˆ‡ã‚Œã«ãªã£ãŸæ™‚点ã§å„データブロックã§ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ + +## max_columns_to_read {#max-columns-to-read} + +1ã¤ã®ã‚¯ã‚¨ãƒªã§ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–れるカラムã®æœ€å¤§æ•°ã€‚クエリãŒã‚ˆã‚Šå¤šãã®ã‚«ãƒ©ãƒ ã‚’読ã¿å–ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +## max_temporary_columns {#max-temporary-columns} + +クエリ実行中ã«åŒæ™‚ã«RAMã«ä¿æŒã•ã‚Œã‚‹ä¸€æ™‚カラムã®æœ€å¤§æ•°ã§ã€å®šæ•°ã‚«ãƒ©ãƒ ã‚’å«ã¿ã¾ã™ã€‚一時カラムãŒã“ã®æ•°ã‚’超ãˆãŸå ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +## max_temporary_non_const_columns {#max-temporary-non-const-columns} + +‘max_temporary_columns’ã¨åŒã˜ã§ã™ãŒã€å®šæ•°ã‚«ãƒ©ãƒ ã‚’カウントã—ã¾ã›ã‚“。クエリ実行中ã€ä¸€æ™‚çš„ã«ç”Ÿæˆã•ã‚Œã‚‹å®šæ•°ã‚«ãƒ©ãƒ ã¯éžå¸¸ã«é »ç¹ã«å½¢æˆã•ã‚Œã¾ã™ãŒã€è¨ˆç®—資æºã¯ã»ã¨ã‚“ã©å¿…è¦ã¨ã—ã¾ã›ã‚“。 + +## max_subquery_depth {#max-subquery-depth} + +サブクエリã®æœ€å¤§ãƒã‚¹ãƒˆæ·±åº¦ã€‚サブクエリãŒã‚ˆã‚Šæ·±ã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚デフォルトã§100ã§ã™ã€‚ + +## max_pipeline_depth {#max-pipeline-depth} + +最大パイプライン深度。クエリ処ç†ä¸­ã«å„データブロックãŒé€šéŽã™ã‚‹å¤‰æ›ã®æ•°ã«å¯¾å¿œã—ã¾ã™ã€‚å˜ä¸€ã‚µãƒ¼ãƒãƒ¼å†…ã§ã®åˆ¶é™å†…ã§ã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã™ã€‚パイプラインã®æ·±ã•ãŒå¤§ãã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚デフォルトã§1000ã§ã™ã€‚ + +## max_ast_depth {#max-ast-depth} + +クエリã®æ§‹æ–‡æœ¨ã®æœ€å¤§ãƒã‚¹ãƒˆæ·±åº¦ã€‚超éŽã™ã‚‹ã¨ã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ã“ã®æ™‚点ã§ã¯ã€è§£æžä¸­ã§ã¯ãªãã€ã‚¯ã‚¨ãƒªã®è§£æžå¾Œã«ã®ã¿ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€è§£æžä¸­ã«æ·±ã™ãŽã‚‹æ§‹æ–‡æœ¨ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã‚‹ãŒã€ã‚¯ã‚¨ãƒªã¯å¤±æ•—ã—ã¾ã™ã€‚デフォルトã§1000ã§ã™ã€‚ + +## max_ast_elements {#max-ast-elements} + +クエリã®æ§‹æ–‡æœ¨ã®è¦ç´ ã®æœ€å¤§æ•°ã€‚超éŽã™ã‚‹ã¨ã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚å‰ã®è¨­å®šã¨åŒæ§˜ã«ã€ã‚¯ã‚¨ãƒªã®è§£æžå¾Œã«ã®ã¿ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚デフォルトã§50,000ã§ã™ã€‚ + +## max_rows_in_set {#max-rows-in-set} + +サブクエリã‹ã‚‰ä½œæˆã•ã‚ŒãŸINå¥ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®æœ€å¤§è¡Œæ•°ã€‚ + +## max_bytes_in_set {#max-bytes-in-set} + +サブクエリã‹ã‚‰ä½œæˆã•ã‚ŒãŸINå¥ã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚»ãƒƒãƒˆã®æœ€å¤§ãƒã‚¤ãƒˆæ•°ï¼ˆéžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ï¼‰ã€‚ + +## set_overflow_mode {#set-overflow-mode} + +データé‡ãŒåˆ¶é™ã‚’超ãˆãŸå ´åˆã«ã©ã†ã™ã‚‹ã‹ï¼š`throw`ã¾ãŸã¯`break`。デフォルトã§`trow`。 + +## max_rows_in_distinct {#max-rows-in-distinct} + +DISTINCTを使用ã™ã‚‹éš›ã®ç•°ãªã‚‹è¡Œæ•°ã®æœ€å¤§æ•°ã€‚ + +## max_bytes_in_distinct {#max-bytes-in-distinct} + +DISTINCTを使用ã™ã‚‹éš›ã«ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã§ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ãƒã‚¤ãƒˆæ•°ã€‚ + +## distinct_overflow_mode {#distinct-overflow-mode} + +データé‡ãŒåˆ¶é™ã‚’超ãˆãŸå ´åˆã«ã©ã†ã™ã‚‹ã‹ï¼š`throw`ã¾ãŸã¯`break`。デフォルトã§`trow`。 + +## max_rows_to_transfer {#max-rows-to-transfer} + +GLOBAL INを使用ã™ã‚‹éš›ã«ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«æ¸¡ã•ã‚Œã‚‹ã‹ã€ä¸€æ™‚テーブルã«ä¿å­˜ã•ã‚Œã‚‹æœ€å¤§è¡Œæ•°ã€‚ + +## max_bytes_to_transfer {#max-bytes-to-transfer} + +GLOBAL INを使用ã™ã‚‹éš›ã«ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«æ¸¡ã•ã‚Œã‚‹ã‹ã€ä¸€æ™‚テーブルã«ä¿å­˜ã•ã‚Œã‚‹æœ€å¤§ãƒã‚¤ãƒˆæ•°ï¼ˆéžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ï¼‰ã€‚ + +## transfer_overflow_mode {#transfer-overflow-mode} + +データé‡ãŒåˆ¶é™ã‚’超ãˆãŸå ´åˆã«ã©ã†ã™ã‚‹ã‹ï¼š'throw'ã¾ãŸã¯'break'。デフォルトã§`throw`。 + +## max_rows_in_join {#settings-max_rows_in_join} + +テーブルçµåˆæ™‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®è¡Œæ•°ã‚’制é™ã—ã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯[SELECT ... JOIN](../../sql-reference/statements/select/join.md#select-join)æ“作ãŠã‚ˆã³[Join](../../engines/table-engines/special/join.md)テーブルエンジンã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +クエリã«è¤‡æ•°ã®çµåˆãŒå«ã¾ã‚Œã‚‹å ´åˆã€ClickHouseã¯ã“ã®è¨­å®šã‚’å„中間çµæžœã«å¯¾ã—ã¦ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +制é™ã«é”ã—ãŸå ´åˆã€ClickHouseã¯ç•°ãªã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚アクションをé¸æŠžã™ã‚‹ã«ã¯[join_overflow_mode](#settings-join_overflow_mode)設定を使用ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•° +- 0 — 無制é™ã®è¡Œæ•° + +デフォルト値:0 + +## max_bytes_in_join {#settings-max_bytes_in_join} + +テーブルçµåˆæ™‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®ã‚µã‚¤ã‚ºã‚’ãƒã‚¤ãƒˆå˜ä½ã§åˆ¶é™ã—ã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯[SELECT ... JOIN](../../sql-reference/statements/select/join.md#select-join)æ“作ãŠã‚ˆã³[Joinテーブルエンジン](../../engines/table-engines/special/join.md)ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +クエリã«çµåˆãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ã“ã®è¨­å®šã‚’å„中間çµæžœã«å¯¾ã—ã¦ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +制é™ã«é”ã—ãŸå ´åˆã€ClickHouseã¯ç•°ãªã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚アクションをé¸æŠžã™ã‚‹ã«ã¯[join_overflow_mode](#settings-join_overflow_mode)設定を使用ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•° +- 0 — メモリ管ç†ãŒç„¡åŠ¹ + +デフォルト値:0 + +## join_overflow_mode {#settings-join_overflow_mode} + +次ã®çµåˆåˆ¶é™ã®ã„ãšã‚Œã‹ã«é”ã—ãŸå ´åˆã«ClickHouseãŒã©ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ã‹ã‚’定義ã—ã¾ã™ï¼š + +- [max_bytes_in_join](#settings-max_bytes_in_join) +- [max_rows_in_join](#settings-max_rows_in_join) + +å¯èƒ½ãªå€¤ï¼š + +- `THROW` — ClickHouseãŒä¾‹å¤–をスローã—ã€æ“作を中断。 +- `BREAK` — ClickHouseãŒæ“作を中断ã—ã€ä¾‹å¤–をスローã—ãªã„。 + +デフォルト値:`THROW`。 + +**関連情報** + +- [JOINå¥](../../sql-reference/statements/select/join.md#select-join) +- [Joinテーブルエンジン](../../engines/table-engines/special/join.md) + +## max_partitions_per_insert_block {#settings-max_partitions_per_insert_block} + +å˜ä¸€ã®æŒ¿å…¥ãƒ–ロックã«ãŠã‘る最大パーティション数を制é™ã—ã¾ã™ã€‚ + +- æ­£ã®æ•´æ•° +- 0 — パーティション数無制é™ã€‚ + +デフォルト値:100 + +**詳細** + +データを挿入ã™ã‚‹ã¨ã€ClickHouseã¯æŒ¿å…¥ãƒ–ロックã®ãƒ‘ーティション数を計算ã—ã¾ã™ã€‚ã‚‚ã—パーティション数ãŒ`max_partitions_per_insert_block`より多ã„å ´åˆã€`throw_on_max_partitions_per_insert_block`ã«åŸºã¥ã„ã¦ã€ClickHouseã¯è­¦å‘Šã‚’ログã™ã‚‹ã‹ã€ä¾‹å¤–をスローã—ã¾ã™ã€‚例外ã®ãƒ†ã‚­ã‚¹ãƒˆã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +> “1ã¤ã®INSERTブロックã«å¯¾ã—ã¦ãƒ‘ーティションãŒå¤šã™ãŽã¾ã™ï¼ˆ`partitions_count`パーティションã€åˆ¶é™ã¯â€ + toString(max_partitions) + “)。制é™ã¯â€˜max_partitions_per_insert_block’設定ã§åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚大é‡ã®ãƒ‘ーティションã¯ä¸€èˆ¬çš„ãªèª¤è§£ã§ã‚ã‚Šã€æ·±åˆ»ãªãƒ‘フォーマンスã®æ‚ªå½±éŸ¿ã‚’ã‚‚ãŸã‚‰ã—ã¾ã™ã€ä¾‹ãˆã°ã‚µãƒ¼ãƒãƒ¼ã®èµ·å‹•æ™‚é–“ãŒé…ããªã£ãŸã‚Šã€INSERTクエリã¨SELECTクエリãŒé…ããªã£ãŸã‚Šã—ã¾ã™ã€‚推奨ã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã®ãƒ‘ーティションã®åˆè¨ˆæ•°ã¯1000〜10000以下ã§ã™ã€‚SELECTクエリを高速化ã™ã‚‹ãŸã‚ã«ãƒ‘ーティションãŒæ„図ã•ã‚Œã¦ã„ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„(ORDER BYキーã¯ç¯„囲クエリを高速化ã™ã‚‹ã®ã«å分ã§ã™ï¼‰ã€‚パーティションã¯ãƒ‡ãƒ¼ã‚¿æ“作(DROP PARTITIONãªã©ï¼‰ã®ãŸã‚ã«æ„図ã•ã‚Œã¦ã„ã¾ã™ã€‚†+ +## throw_on_max_partitions_per_insert_block {#settings-throw_on_max_partition_per_insert_block} + +`max_partitions_per_insert_block`ã«é”ã—ãŸå ´åˆã®å‹•ä½œã‚’制御ã—ã¾ã™ã€‚ + +- `true` - 挿入ブロックãŒ`max_partitions_per_insert_block`ã«é”ã—ãŸå ´åˆã€ä¾‹å¤–を発生ã—ã¾ã™ã€‚ +- `false` - `max_partitions_per_insert_block`ã«é”ã—ãŸå ´åˆã«è­¦å‘Šã‚’ログã—ã¾ã™ã€‚ + +デフォルト値:`true` + +## max_temporary_data_on_disk_size_for_user {#settings_max_temporary_data_on_disk_size_for_user} + +ã™ã¹ã¦ã®åŒæ™‚実行ã•ã‚Œã¦ã„るユーザークエリã®ãŸã‚ã«ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§æ¶ˆè²»ã•ã‚Œã‚‹ä¸€æ™‚ファイルã®ãƒ‡ãƒ¼ã‚¿ã®æœ€å¤§é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +デフォルト値:0。 + +## max_temporary_data_on_disk_size_for_query {#settings_max_temporary_data_on_disk_size_for_query} + +ã™ã¹ã¦ã®åŒæ™‚実行ã•ã‚Œã¦ã„るクエリã®ãŸã‚ã«ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§æ¶ˆè²»ã•ã‚Œã‚‹ä¸€æ™‚ファイルã®ãƒ‡ãƒ¼ã‚¿ã®æœ€å¤§é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +デフォルト値:0。 + +## max_sessions_for_user {#max-sessions-per-user} + +ClickHouseサーãƒãƒ¼ã¸ã®èªè¨¼æ¸ˆã¿ãƒ¦ãƒ¼ã‚¶ãƒ¼ã”ã¨ã®åŒæ™‚セッションã®æœ€å¤§æ•°ã€‚ + +例: + +``` xml + + + 1 + + + 2 + + + 0 + + + + + + single_session_user + + + + two_sessions_profile + + + + unlimited_sessions_profile + + +``` + +デフォルト値:0(無制é™ã®åŒæ™‚セッション数)。 + +## max_partitions_to_read {#max-partitions-to-read} + +1ã¤ã®ã‚¯ã‚¨ãƒªã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãる最大パーティション数を制é™ã—ã¾ã™ã€‚ + +テーブルãŒä½œæˆã•ã‚ŒãŸã¨ãã«æŒ‡å®šã•ã‚ŒãŸè¨­å®šå€¤ã¯ã€ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«ã®è¨­å®šã§ä¸Šæ›¸ãã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- ä»»æ„ã®æ­£ã®æ•´æ•° + +デフォルト値:-1(無制é™ï¼‰ã€‚ + +テーブルã®è¨­å®šã§MergeTree設定[max_partitions_to_read](merge-tree-settings#max-partitions-to-read)を指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ diff --git a/docs/ja/operations/settings/settings-formats.md b/docs/ja/operations/settings/settings-formats.md new file mode 100644 index 00000000000..6ba3d2fffcd --- /dev/null +++ b/docs/ja/operations/settings/settings-formats.md @@ -0,0 +1,2350 @@ +--- +title: フォーマット設定 +sidebar_label: フォーマット設定 +slug: /ja/operations/settings/formats +toc_max_heading_level: 2 +--- + +ã“れらã®è¨­å®šã¯ã€[source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/FormatFactorySettings.h) ã‹ã‚‰è‡ªå‹•ç”Ÿæˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## bool_false_representation {#bool_false_representation} + +タイプ: String + +デフォルト値: false + +TSV/CSV/Vertical/Pretty フォーマット㧠false ã®ãƒ–ール値を表ç¾ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆã€‚ + +## bool_true_representation {#bool_true_representation} + +タイプ: String + +デフォルト値: true + +TSV/CSV/Vertical/Pretty フォーマット㧠true ã®ãƒ–ール値を表ç¾ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆã€‚ + +## column_names_for_schema_inference {#column_names_for_schema_inference} + +タイプ: String + +デフォルト値: + +カラムåãªã—ã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã«ä½¿ç”¨ã™ã‚‹ã‚«ãƒ©ãƒ åã®ãƒªã‚¹ãƒˆã€‚å½¢å¼: 'column1,column2,column3,...' + +## cross_to_inner_join_rewrite {#cross_to_inner_join_rewrite} + +タイプ: UInt64 + +デフォルト値: 1 + +WHERE セクションã«çµåˆå¼ãŒã‚ã‚‹å ´åˆã€ã‚«ãƒ³ãƒž/クロスçµåˆã®ä»£ã‚ã‚Šã«å†…部çµåˆã‚’使用ã—ã¾ã™ã€‚値: 0 - 書ãæ›ãˆãªã—, 1 - カンマ/クロスã§å¯èƒ½ãªã‚‰é©ç”¨, 2 - å…¨ã¦ã®ã‚«ãƒ³ãƒžçµåˆã‚’強制的ã«æ›¸ãæ›ãˆ, クロス - å¯èƒ½ãªã‚‰ + +## date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands {#date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands} + +タイプ: Bool + +デフォルト値: 0 + +datetime64 値ã®çµ‚端ã®ã‚¼ãƒ­ã‚’å‹•çš„ã«å‰Šé™¤ã—ã¦ã€å‡ºåŠ›ã‚¹ã‚±ãƒ¼ãƒ«ã‚’ '秒'ã€'ミリ秒'ã€'マイクロ秒' ã«å¯¾å¿œã™ã‚‹ [0, 3, 6] ã«èª¿æ•´ã—ã¾ã™ã€‚ + +## date_time_input_format {#date_time_input_format} + +タイプ: DateTimeInputFormat + +デフォルト値: basic + +日付ã¨æ™‚刻ã®ãƒ†ã‚­ã‚¹ãƒˆè¡¨ç¾ã®ãƒ‘ーサーをé¸æŠžå¯èƒ½ã€‚ + +ã“ã®è¨­å®šã¯[日付ã¨æ™‚é–“ã®é–¢æ•°](../../sql-reference/functions/date-time-functions.md)ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。 + +利用å¯èƒ½ãªå€¤: + +- `'best_effort'` — 拡張解æžã‚’有効ã«ã—ã¾ã™ã€‚ + + ClickHouse ã¯åŸºæœ¬ã® `YYYY-MM-DD HH:MM:SS` å½¢å¼ãŠã‚ˆã³ã™ã¹ã¦ã® [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) ã®æ—¥ä»˜ã¨æ™‚刻ã®å½¢å¼ã‚’解æžã§ãã¾ã™ã€‚例ãˆã°ã€`'2018-06-08T01:02:03.000Z'`。 + +- `'basic'` — 基本的ãªãƒ‘ーサーを使用。 + + ClickHouse ã¯åŸºæœ¬ã® `YYYY-MM-DD HH:MM:SS` ã¾ãŸã¯ `YYYY-MM-DD` ã®å½¢å¼ã®ã¿è§£æžã§ãã¾ã™ã€‚例ãˆã°ã€`2019-08-20 10:18:56` ã¾ãŸã¯ `2019-08-20`。 + +クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤: `'best_effort'`。 + +å‚ç…§: + +- [DateTime データ型。](../../sql-reference/data-types/datetime.md) +- [日付ã¨æ™‚間を扱ã†ãŸã‚ã®é–¢æ•°ã€‚](../../sql-reference/functions/date-time-functions.md) + +## date_time_output_format {#date_time_output_format} + +タイプ: DateTimeOutputFormat + +デフォルト値: simple + +日付ã¨æ™‚刻ã®ãƒ†ã‚­ã‚¹ãƒˆè¡¨ç¾ã®ç•°ãªã‚‹å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’é¸æŠžå¯èƒ½ã€‚ + +利用å¯èƒ½ãªå€¤: + +- `simple` - シンプルãªå‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚ + + ClickHouse ã¯æ—¥ä»˜ã¨æ™‚刻を `YYYY-MM-DD hh:mm:ss` å½¢å¼ã§å‡ºåŠ›ã—ã¾ã™ã€‚例ãˆã°ã€`2019-08-20 10:18:56`。計算ã¯ãƒ‡ãƒ¼ã‚¿åž‹ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ï¼ˆå­˜åœ¨ã™ã‚‹å ´åˆï¼‰ã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã«åŸºã¥ã„ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ + +- `iso` - ISO 出力フォーマット。 + + ClickHouse ã¯æ—¥ä»˜ã¨æ™‚刻を [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) `YYYY-MM-DDThh:mm:ssZ` å½¢å¼ã§å‡ºåŠ›ã—ã¾ã™ã€‚例ãˆã°ã€`2019-08-20T10:18:56Z`。出力㯠UTC (`Z` 㯠UTC ã‚’æ„味ã—ã¾ã™) ã§ã™ã€‚ + +- `unix_timestamp` - Unix タイムスタンプ出力フォーマット。 + + ClickHouse ã¯æ—¥ä»˜ã¨æ™‚刻を [Unix タイムスタンプ](https://en.wikipedia.org/wiki/Unix_time)å½¢å¼ã§å‡ºåŠ›ã—ã¾ã™ã€‚例ãˆã° `1566285536`。 + +å‚ç…§: + +- [DateTime データ型。](../../sql-reference/data-types/datetime.md) +- [日付ã¨æ™‚間を扱ã†ãŸã‚ã®é–¢æ•°ã€‚](../../sql-reference/functions/date-time-functions.md) + +## date_time_overflow_behavior {#date_time_overflow_behavior} + +タイプ: DateTimeOverflowBehavior + +デフォルト値: ignore + +Date, Date32, DateTime, DateTime64 åž‹ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãƒ¢ãƒ¼ãƒ‰ã€‚利用å¯èƒ½ãªå€¤: 'ignore', 'throw', 'saturate'。 + +## dictionary_use_async_executor {#dictionary_use_async_executor} + +タイプ: Bool + +デフォルト値: 0 + +複数ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚½ãƒ¼ã‚¹ã‚’読むパイプラインを実行ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ­ãƒ¼ã‚«ãƒ« CLICKHOUSE ソースã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## errors_output_format {#errors_output_format} + +タイプ: String + +デフォルト値: CSV + +エラーをテキスト出力ã«æ›¸ã出ã™æ–¹æ³•ã€‚ + +## exact_rows_before_limit {#exact_rows_before_limit} + +タイプ: Bool + +デフォルト値: 0 + +有効ã«ã™ã‚‹ã¨ã€ClickHouse 㯠rows_before_limit_at_least 統計ã®æ­£ç¢ºãªå€¤ã‚’æä¾›ã—ã¾ã™ãŒã€ãƒªãƒŸãƒƒãƒˆå‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’完全ã«èª­ã¿å–ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## format_avro_schema_registry_url {#format_avro_schema_registry_url} + +タイプ: URI + +デフォルト値: + +AvroConfluent フォーマット用: Confluent スキーマレジストリ URL。 + +## format_binary_max_array_size {#format_binary_max_array_size} + +タイプ: UInt64 + +デフォルト値: 1073741824 + +RowBinary フォーマット㧠Array ã«è¨±å¯ã•ã‚Œã‚‹æœ€å¤§ã‚µã‚¤ã‚ºã§ã™ã€‚ç ´æã—ãŸãƒ‡ãƒ¼ã‚¿ã®éš›ã«å¤§é‡ã®ãƒ¡ãƒ¢ãƒªã‚’割り当ã¦ãªã„よã†ã«ã—ã¾ã™ã€‚0 ã¯åˆ¶é™ãŒãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +## format_binary_max_string_size {#format_binary_max_string_size} + +タイプ: UInt64 + +デフォルト値: 1073741824 + +RowBinary フォーマット㧠String ã«è¨±å¯ã•ã‚Œã‚‹æœ€å¤§ã‚µã‚¤ã‚ºã§ã™ã€‚ç ´æã—ãŸãƒ‡ãƒ¼ã‚¿ã®éš›ã«å¤§é‡ã®ãƒ¡ãƒ¢ãƒªã‚’割り当ã¦ãªã„よã†ã«ã—ã¾ã™ã€‚0 ã¯åˆ¶é™ãŒãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +## format_capn_proto_enum_comparising_mode {#format_capn_proto_enum_comparising_mode} + +タイプ: CapnProtoEnumComparingMode + +デフォルト値: by_values + +ClickHouse Enum 㨠CapnProto Enum ã®ãƒžãƒƒãƒ”ング方法 + +## format_capn_proto_use_autogenerated_schema {#format_capn_proto_use_autogenerated_schema} + +タイプ: Bool + +デフォルト値: 1 + +format_schema ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€è‡ªå‹•ç”Ÿæˆã•ã‚ŒãŸ CapnProto スキーマを使用 + +## format_csv_allow_double_quotes {#format_csv_allow_double_quotes} + +タイプ: Bool + +デフォルト値: 1 + +true ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€äºŒé‡å¼•ç”¨ç¬¦ã§å›²ã¾ã‚ŒãŸæ–‡å­—列を許å¯ã—ã¾ã™ã€‚ + +## format_csv_allow_single_quotes {#format_csv_allow_single_quotes} + +タイプ: Bool + +デフォルト値: 0 + +true ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å˜ä¸€å¼•ç”¨ç¬¦ã§å›²ã¾ã‚ŒãŸæ–‡å­—列を許å¯ã—ã¾ã™ã€‚ + +## format_csv_delimiter {#format_csv_delimiter} + +タイプ: Char + +デフォルト値: , + +CSV データã§åŒºåˆ‡ã‚Šæ–‡å­—ã¨è¦‹ãªã•ã‚Œã‚‹æ–‡å­—。文字列ã§è¨­å®šã™ã‚‹å ´åˆã€æ–‡å­—列ã®é•·ã•ã¯ 1 ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +## format_csv_null_representation {#format_csv_null_representation} + +タイプ: String + +デフォルト値: \N + +CSV フォーマットã§ã®ã‚«ã‚¹ã‚¿ãƒ  NULL è¡¨ç¾ + +## format_custom_escaping_rule {#format_custom_escaping_rule} + +タイプ: EscapingRule + +デフォルト値: Escaped + +フィールドã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルール (CustomSeparated フォーマット用) + +## format_custom_field_delimiter {#format_custom_field_delimiter} + +タイプ: String + +デフォルト値: + +フィールド間ã®åŒºåˆ‡ã‚Šæ–‡å­— (CustomSeparated フォーマット用) + +## format_custom_result_after_delimiter {#format_custom_result_after_delimiter} + +タイプ: String + +デフォルト値: + +çµæžœã‚»ãƒƒãƒˆã®å¾Œã«ä»˜ã‘るサフィックス (CustomSeparated フォーマット用) + +## format_custom_result_before_delimiter {#format_custom_result_before_delimiter} + +タイプ: String + +デフォルト値: + +çµæžœã‚»ãƒƒãƒˆã®å‰ã«ä»˜ã‘るプレフィックス (CustomSeparated フォーマット用) + +## format_custom_row_after_delimiter {#format_custom_row_after_delimiter} + +タイプ: String + +デフォルト値: + +最後ã®ã‚«ãƒ©ãƒ ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®å¾Œã®åŒºåˆ‡ã‚Šæ–‡å­— (CustomSeparated フォーマット用) + +## format_custom_row_before_delimiter {#format_custom_row_before_delimiter} + +タイプ: String + +デフォルト値: + +最åˆã®ã‚«ãƒ©ãƒ ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®å‰ã®åŒºåˆ‡ã‚Šæ–‡å­— (CustomSeparated フォーマット用) + +## format_custom_row_between_delimiter {#format_custom_row_between_delimiter} + +タイプ: String + +デフォルト値: + +行間ã®åŒºåˆ‡ã‚Šæ–‡å­— (CustomSeparated フォーマット用) + +## format_display_secrets_in_show_and_select {#format_display_secrets_in_show_and_select} + +タイプ: Bool + +デフォルト値: 0 + +テーブルã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãƒ†ãƒ¼ãƒ–ル関数ã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã® `SHOW` 㨠`SELECT` クエリã§ç§˜å¯†ã‚’表示ã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +秘密を見るユーザーã¯ã€[`display_secrets_in_show_and_select` サーãƒãƒ¼è¨­å®š](../server-configuration-parameters/settings#display_secrets_in_show_and_select) をオンã«ã—〠+[`displaySecretsInShowAndSelect`](../../sql-reference/statements/grant#display-secrets) 特権をæŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +## format_json_object_each_row_column_for_object_name {#format_json_object_each_row_column_for_object_name} + +タイプ: String + +デフォルト値: + +[JSONObjectEachRow](../../interfaces/formats.md/#jsonobjecteachrow) フォーマットã§ã‚ªãƒ–ジェクトåã®ä¿å­˜/書ãè¾¼ã¿ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã®åå‰ã€‚ +カラムタイプ㯠String ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。値ãŒç©ºã®å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®åå‰ `row_{i}`ãŒã‚ªãƒ–ジェクトåã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +### input_format_json_compact_allow_variable_number_of_columns {#input_format_json_compact_allow_variable_number_of_columns} + +JSONCompact/JSONCompactEachRow 入力フォーマットã§è¡Œã®ã‚«ãƒ©ãƒ æ•°ã‚’変動å¯èƒ½ã«è¨±å¯ã™ã‚‹ã€‚ +予想より多ã„カラムをæŒã¤è¡Œã§ã¯ä½™åˆ†ãªã‚«ãƒ©ãƒ ã‚’無視ã—ã€æ¬ ã‘ã¦ã„るカラムをデフォルト値ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ + +デフォルトã§ã¯ç„¡åŠ¹ã€‚ + +### output_format_markdown_escape_special_characters {#output_format_markdown_escape_special_characters} + +有効ã«ã™ã‚‹ã¨ã€Markdown ã®ç‰¹æ®Šæ–‡å­—をエスケープã—ã¾ã™ã€‚ + +[Common Mark](https://spec.commonmark.org/0.30/#example-12)ã¯ä»¥ä¸‹ã®ç‰¹æ®Šæ–‡å­—ã‚’ \ ã§ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã§ãã‚‹ã¨å®šç¾©ã—ã¦ã„ã¾ã™: + +``` +! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ +``` + +å¯èƒ½ãªå€¤: + ++ 0 — 無効。 ++ 1 — 有効。 + +### input_format_json_empty_as_default {#input_format_json_empty_as_default} + +有効ã«ã™ã‚‹ã¨ã€JSON ã®ç©ºã®å…¥åŠ›ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’デフォルト値ã§ç½®ãæ›ãˆã¾ã™ã€‚複雑ãªãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå¼ã«å¯¾ã—ã¦ã¯ `input_format_defaults_for_omitted_fields` も有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + ++ 0 — 無効。 ++ 1 — 有効。 + +## format_protobuf_use_autogenerated_schema {#format_protobuf_use_autogenerated_schema} + +タイプ: Bool + +デフォルト値: 1 + +format_schema ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€è‡ªå‹•ç”Ÿæˆã•ã‚ŒãŸ Protobuf を使用 + +## format_regexp {#format_regexp} + +タイプ: String + +デフォルト値: + +æ­£è¦è¡¨ç¾ (Regexp フォーマット用) + +## format_regexp_escaping_rule {#format_regexp_escaping_rule} + +タイプ: EscapingRule + +デフォルト値: Raw + +フィールドã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ルール (Regexp フォーマット用) + +## format_regexp_skip_unmatched {#format_regexp_skip_unmatched} + +タイプ: Bool + +デフォルト値: 0 + +æ­£è¦è¡¨ç¾ã«ã‚ˆã£ã¦ä¸€è‡´ã—ãªã„行をスキップã™ã‚‹ (Regexp フォーマット用) + +## format_schema {#format_schema} + +タイプ: String + +デフォルト値: + +[Cap’n Proto](https://capnproto.org/) ã‚„ [Protobuf](https://developers.google.com/protocol-buffers/) ã®ã‚ˆã†ã«ã‚¹ã‚­ãƒ¼ãƒžå®šç¾©ã‚’å¿…è¦ã¨ã™ã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’使用ã™ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚値ã¯ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ã‚ˆã‚Šã¾ã™ã€‚ + +## format_template_resultset {#format_template_resultset} + +タイプ: String + +デフォルト値: + +çµæžœã‚»ãƒƒãƒˆç”¨ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列ãŒå«ã¾ã‚Œã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘ス (Template フォーマット用) + +## format_template_resultset_format {#format_template_resultset_format} + +タイプ: String + +デフォルト値: + +çµæžœã‚»ãƒƒãƒˆã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列 (Template フォーマット用) + +## format_template_row {#format_template_row} + +タイプ: String + +デフォルト値: + +行用ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列ãŒå«ã¾ã‚Œã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘ス (Template フォーマット用) + +## format_template_row_format {#format_template_row_format} + +タイプ: String + +デフォルト値: + +è¡Œã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列 (Template フォーマット用) + +## format_template_rows_between_delimiter {#format_template_rows_between_delimiter} + +タイプ: String + +デフォルト値: + +行間ã®åŒºåˆ‡ã‚Šæ–‡å­— (Template フォーマット用) + +## format_tsv_null_representation {#format_tsv_null_representation} + +タイプ: String + +デフォルト値: \N + +TSV フォーマットã§ã®ã‚«ã‚¹ã‚¿ãƒ  NULL è¡¨ç¾ + +## input_format_allow_errors_num {#input_format_allow_errors_num} + +タイプ: UInt64 + +デフォルト値: 0 + +テキストフォーマット (CSV, TSV, ãªã©) ã®èª­ã¿å–り時ã«è¨±å®¹ã•ã‚Œã‚‹æœ€å¤§ã‚¨ãƒ©ãƒ¼æ•°ã‚’設定ã—ã¾ã™ã€‚ + +デフォルト値㯠0 ã§ã™ã€‚ + +常㫠`input_format_allow_errors_ratio` ã¨ãƒšã‚¢ã§ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +è¡Œã®èª­ã¿å–り中ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¦ã‚‚エラーカウンター㌠`input_format_allow_errors_num` ã‚’ã¾ã ä¸‹å›žã£ã¦ã„ã‚‹å ´åˆã€ClickHouse ã¯ãã®è¡Œã‚’無視ã—次ã®è¡Œã¸é€²ã¿ã¾ã™ã€‚ + +`input_format_allow_errors_num` 㨠`input_format_allow_errors_ratio` ãŒä¸¡æ–¹ã¨ã‚‚超éŽã—ãŸå ´åˆã€ClickHouse ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## input_format_allow_errors_ratio {#input_format_allow_errors_ratio} + +タイプ: Float + +デフォルト値: 0 + +テキストフォーマット (CSV, TSV, ãªã©) ã®èª­ã¿å–り時ã«è¨±å®¹ã•ã‚Œã‚‹ã‚¨ãƒ©ãƒ¼ã®æœ€å¤§å‰²åˆã‚’設定ã—ã¾ã™ã€‚ +エラーã®å‰²åˆã¯ 0 㨠1 ã®é–“ã®æµ®å‹•å°æ•°ç‚¹æ•°ã§è¨­å®šã•ã‚Œã¾ã™ã€‚ + +デフォルト値㯠0 ã§ã™ã€‚ + +常㫠`input_format_allow_errors_num` ã¨ãƒšã‚¢ã§ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +è¡Œã®èª­ã¿å–り中ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¦ã‚‚エラーカウンター㌠`input_format_allow_errors_ratio` ã‚’ã¾ã ä¸‹å›žã£ã¦ã„ã‚‹å ´åˆã€ClickHouse ã¯ãã®è¡Œã‚’無視ã—次ã®è¡Œã¸é€²ã¿ã¾ã™ã€‚ + +`input_format_allow_errors_num` 㨠`input_format_allow_errors_ratio` ãŒä¸¡æ–¹ã¨ã‚‚超éŽã—ãŸå ´åˆã€ClickHouse ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## input_format_allow_seeks {#input_format_allow_seeks} + +タイプ: Bool + +デフォルト値: 1 + +ORC/Parquet/Arrow 入力フォーマットã§èª­ã¿å–り時ã®ã‚·ãƒ¼ã‚¯ã‚’許å¯ã—ã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_arrow_allow_missing_columns {#input_format_arrow_allow_missing_columns} + +タイプ: Bool + +デフォルト値: 1 + +Arrow 入力フォーマットã®èª­ã¿å–り時ã«æ¬ æカラムを許å¯ã—ã¾ã™ã€‚ + +## input_format_arrow_case_insensitive_column_matching {#input_format_arrow_case_insensitive_column_matching} + +タイプ: Bool + +デフォルト値: 0 + +Arrow ã®ã‚«ãƒ©ãƒ ã¨ CH ã®ã‚«ãƒ©ãƒ ã‚’一致ã•ã›ã‚‹ã¨ãã«å¤§æ–‡å­—ã¨å°æ–‡å­—を無視ã—ã¾ã™ã€‚ + +## input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference {#input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference} + +タイプ: Bool + +デフォルト値: 0 + +Arrow フォーマットã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œãªã„åž‹ã®ã‚«ãƒ©ãƒ ã‚’スキップã—ã¾ã™ã€‚ + +## input_format_avro_allow_missing_fields {#input_format_avro_allow_missing_fields} + +タイプ: Bool + +デフォルト値: 0 + +Avro/AvroConfluent フォーマット用: フィールドãŒã‚¹ã‚­ãƒ¼ãƒžã«è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã®ä»£ã‚ã‚Šã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’使用 + +## input_format_avro_null_as_default {#input_format_avro_null_as_default} + +タイプ: Bool + +デフォルト値: 0 + +Avro/AvroConfluent フォーマット用: null ã®å ´åˆã€Nullable ã§ãªã„カラムã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚’挿入 + +## input_format_binary_decode_types_in_binary_format {#input_format_binary_decode_types_in_binary_format} + +タイプ: Bool + +デフォルト値: 0 + +RowBinaryWithNamesAndTypes 入力フォーマットã§åž‹åã®ä»£ã‚ã‚Šã«ãƒã‚¤ãƒŠãƒªå½¢å¼ã§ãƒ‡ãƒ¼ã‚¿åž‹ã‚’読ã¿å–ã‚‹ + +## input_format_binary_read_json_as_string {#input_format_binary_read_json_as_string} + +タイプ: Bool + +デフォルト値: 0 + +RowBinary 入力フォーマット㧠[JSON](../../sql-reference/data-types/newjson.md) データ型ã®å€¤ã‚’ JSON [String](../../sql-reference/data-types/string.md) 値ã¨ã—ã¦èª­ã¿å–る。 + +## input_format_bson_skip_fields_with_unsupported_types_in_schema_inference {#input_format_bson_skip_fields_with_unsupported_types_in_schema_inference} + +タイプ: Bool + +デフォルト値: 0 + +BSON フォーマットã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œãªã„åž‹ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’スキップã—ã¾ã™ã€‚ + +## input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference {#input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference} + +タイプ: Bool + +デフォルト値: 0 + +CapnProto フォーマットã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œãªã„åž‹ã®ã‚«ãƒ©ãƒ ã‚’スキップã—ã¾ã™ã€‚ + +## input_format_csv_allow_cr_end_of_line {#input_format_csv_allow_cr_end_of_line} + +タイプ: Bool + +デフォルト値: 0 + +true ã«è¨­å®šã™ã‚‹ã¨ã€\\r ㌠\\n ã®å¾Œã«ç¶šã‹ãªãã¦ã‚‚行末ã«è¨±å¯ã•ã‚Œã¾ã™ã€‚ + +## input_format_csv_allow_variable_number_of_columns {#input_format_csv_allow_variable_number_of_columns} + +タイプ: Bool + +デフォルト値: 0 + +CSV 入力 (ファイルãŒäºˆæƒ³ã‚ˆã‚Šå¤šãã®ã‚«ãƒ©ãƒ ã‚’æŒã¤å ´åˆ) ã§ä½™åˆ†ãªã‚«ãƒ©ãƒ ã‚’無視ã—ã€CSV 入力ã§æ¬ ã‘ã¦ã„るフィールドをデフォルト値ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ + +## input_format_csv_allow_whitespace_or_tab_as_delimiter {#input_format_csv_allow_whitespace_or_tab_as_delimiter} + +タイプ: Bool + +デフォルト値: 0 + +CSV 文字列ã§ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®åŒºåˆ‡ã‚Šæ–‡å­—ã¨ã—ã¦ã‚¹ãƒšãƒ¼ã‚¹ã‚„タブ (\\t) を使用å¯èƒ½ã«ã—ã¾ã™ã€‚ + +## input_format_csv_arrays_as_nested_csv {#input_format_csv_arrays_as_nested_csv} + +タイプ: Bool + +デフォルト値: 0 + +CSV ã‹ã‚‰ Array を読ã¿å–ã‚‹éš›ã€è¦ç´ ãŒãƒã‚¹ãƒˆã•ã‚ŒãŸ CSV ã«ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œã¦ã‹ã‚‰æ–‡å­—列ã«æ ¼ç´ã•ã‚ŒãŸã¨ä»®å®šã—ã¾ã™ã€‚例: \"[\"\"Hello\"\", \"\"world\"\", \"\"42\"\"\"\" TV\"\"]\"。é…列ã®æ‹¬å¼§ã¯çœç•¥å¯èƒ½ã§ã™ã€‚ + +## input_format_csv_deserialize_separate_columns_into_tuple {#input_format_csv_deserialize_separate_columns_into_tuple} + +タイプ: Bool + +デフォルト値: 1 + +true ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€CSV フォーマットã«æ›¸ã‹ã‚ŒãŸåˆ¥ã€…ã®ã‚«ãƒ©ãƒ ã‚’ Tuple カラムã«ãƒ‡ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºå¯èƒ½ã§ã™ã€‚ + +## input_format_csv_detect_header {#input_format_csv_detect_header} + +タイプ: Bool + +デフォルト値: 1 + +CSV フォーマットã§åå‰ã¨åž‹ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’自動的ã«æ¤œå‡º + +## input_format_csv_empty_as_default {#input_format_csv_empty_as_default} + +タイプ: Bool + +デフォルト値: 1 + +CSV 入力ã§ç©ºã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’デフォルト値ã¨ã—ã¦æ‰±ã†ã€‚ + +## input_format_csv_enum_as_number {#input_format_csv_enum_as_number} + +タイプ: Bool + +デフォルト値: 0 + +CSV フォーマットã§æŒ¿å…¥ã•ã‚ŒãŸ enum 値を enum インデックスã¨ã—ã¦æ‰±ã† + +## input_format_csv_skip_first_lines {#input_format_csv_skip_first_lines} + +タイプ: UInt64 + +デフォルト値: 0 + +CSV フォーマットã®ãƒ‡ãƒ¼ã‚¿ã®å…ˆé ­ã§ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹è¡Œæ•°ã‚’指定ã—ã¾ã™ã€‚ + +## input_format_csv_skip_trailing_empty_lines {#input_format_csv_skip_trailing_empty_lines} + +タイプ: Bool + +デフォルト値: 0 + +CSV フォーマットã§æœ«å°¾ã®ç©ºè¡Œã‚’スキップ + +## input_format_csv_trim_whitespaces {#input_format_csv_trim_whitespaces} + +タイプ: Bool + +デフォルト値: 1 + +CSV 文字列ã®å…ˆé ­ã¨æœ«å°¾ã®ã‚¹ãƒšãƒ¼ã‚¹ã¨ã‚¿ãƒ– (\\t) 文字をトリムã—ã¾ã™ã€‚ + +## input_format_csv_try_infer_numbers_from_strings {#input_format_csv_try_infer_numbers_from_strings} + +タイプ: Bool + +デフォルト値: 0 + +有効ã«ã™ã‚‹ã¨ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中㫠ClickHouse ã¯æ–‡å­—列フィールドã‹ã‚‰æ•°å€¤ã‚’推論ã—よã†ã¨ã—ã¾ã™ã€‚ +CSV データãŒå¼•ç”¨ç¬¦ä»˜ãã® UInt64 数値をå«ã‚€å ´åˆã«æœ‰åŠ¹ã§ã™ã€‚ + +デフォルトã§ç„¡åŠ¹ã€‚ + +## input_format_csv_try_infer_strings_from_quoted_tuples {#input_format_csv_try_infer_strings_from_quoted_tuples} + +タイプ: Bool + +デフォルト値: 1 + +入力データ内ã®å¼•ç”¨ã•ã‚ŒãŸã‚¿ãƒ—ルを String åž‹ã®å€¤ã¨ã—ã¦è§£é‡ˆã—ã¾ã™ã€‚ + +## input_format_csv_use_best_effort_in_schema_inference {#input_format_csv_use_best_effort_in_schema_inference} + +タイプ: Bool + +デフォルト値: 1 + +CSV フォーマットã§ã‚¹ã‚­ãƒ¼ãƒžã‚’推論ã™ã‚‹ãŸã‚ã«ã„ãã¤ã‹ã®èª¿æ•´ã¨ãƒ’ューリスティックを使用ã™ã‚‹ + +## input_format_csv_use_default_on_bad_values {#input_format_csv_use_default_on_bad_values} + +タイプ: Bool + +デフォルト値: 0 + +CSV フィールドã®ãƒ‡ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã«å¤±æ•—ã—ãŸä¸è‰¯å€¤ã«ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’設定å¯èƒ½ã«ã™ã‚‹ + +## input_format_custom_allow_variable_number_of_columns {#input_format_custom_allow_variable_number_of_columns} + +タイプ: Bool + +デフォルト値: 0 + +CustomSeparated 入力 (ファイルãŒäºˆæƒ³ã‚ˆã‚Šå¤šãã®ã‚«ãƒ©ãƒ ã‚’æŒã¤å ´åˆ) ã§ä½™åˆ†ãªã‚«ãƒ©ãƒ ã‚’無視ã—ã€CustomSeparated 入力ã§æ¬ ã‘ã¦ã„るフィールドをデフォルト値ã¨ã—ã¦æ‰±ã„ã¾ã™ + +## input_format_custom_detect_header {#input_format_custom_detect_header} + +タイプ: Bool + +デフォルト値: 1 + +CustomSeparated フォーマットã§åå‰ã¨åž‹ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’自動的ã«æ¤œå‡º + +## input_format_custom_skip_trailing_empty_lines {#input_format_custom_skip_trailing_empty_lines} + +タイプ: Bool + +デフォルト値: 0 + +CustomSeparated フォーマットã§æœ«å°¾ã®ç©ºè¡Œã‚’スキップ + +## input_format_defaults_for_omitted_fields {#input_format_defaults_for_omitted_fields} + +タイプ: Bool + +デフォルト値: 1 + +`INSERT` クエリを実行ã™ã‚‹ã¨ãã€çœç•¥ã•ã‚ŒãŸå…¥åŠ›ã‚«ãƒ©ãƒ ã®å€¤ã‚’ãã‚Œãžã‚Œã®ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«ç½®ãæ›ãˆã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションã¯ã€[JSONEachRow](../../interfaces/formats.md/#jsoneachrow)(ãŠã‚ˆã³ä»–ã® JSON フォーマット)ã€[CSV](../../interfaces/formats.md/#csv)ã€[TabSeparated](../../interfaces/formats.md/#tabseparated)ã€[TSKV](../../interfaces/formats.md/#tskv)ã€[Parquet](../../interfaces/formats.md/#parquet)ã€[Arrow](../../interfaces/formats.md/#arrow)ã€[Avro](../../interfaces/formats.md/#avro)ã€[ORC](../../interfaces/formats.md/#orc)ã€[Native](../../interfaces/formats.md/#native) フォーマットã€ãŠã‚ˆã³ `WithNames`/`WithNamesAndTypes` サフィックス付ãã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +:::note +ã“ã®ã‚ªãƒ—ションãŒæœ‰åŠ¹ã§ã‚ã‚‹ã¨ãã€æ‹¡å¼µã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルメタデータãŒã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚サーãƒãƒ¼ä¸Šã§è¿½åŠ ã®è¨ˆç®—リソースを消費ã—ã€ãƒ‘フォーマンスを低下ã•ã›ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +## input_format_force_null_for_omitted_fields {#input_format_force_null_for_omitted_fields} + +タイプ: Bool + +デフォルト値: 0 + +çœç•¥ã•ã‚ŒãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’ null 値ã§å¼·åˆ¶åˆæœŸåŒ– + +## input_format_hive_text_allow_variable_number_of_columns {#input_format_hive_text_allow_variable_number_of_columns} + +タイプ: Bool + +デフォルト値: 1 + +Hive Text 入力 (ファイルãŒäºˆæƒ³ã‚ˆã‚Šå¤šãã®ã‚«ãƒ©ãƒ ã‚’æŒã¤å ´åˆ) ã§ä½™åˆ†ãªã‚«ãƒ©ãƒ ã‚’無視ã—ã€Hive Text 入力ã§æ¬ ã‘ã¦ã„るフィールドをデフォルト値ã¨ã—ã¦æ‰±ã„ã¾ã™ + +## input_format_hive_text_collection_items_delimiter {#input_format_hive_text_collection_items_delimiter} + +タイプ: Char + +デフォルト値:  + +Hive テキストファイルã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ï¼ˆé…列ã¾ãŸã¯ãƒžãƒƒãƒ—)アイテム間ã®åŒºåˆ‡ã‚Šæ–‡å­— + +## input_format_hive_text_fields_delimiter {#input_format_hive_text_fields_delimiter} + +タイプ: Char + +デフォルト値:  + +Hive テキストファイルã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰é–“ã®åŒºåˆ‡ã‚Šæ–‡å­— + +## input_format_hive_text_map_keys_delimiter {#input_format_hive_text_map_keys_delimiter} + +タイプ: Char + +デフォルト値:  + +Hive テキストファイルã®ãƒžãƒƒãƒ—キー/値ペア間ã®åŒºåˆ‡ã‚Šæ–‡å­— + +## input_format_import_nested_json {#input_format_import_nested_json} + +タイプ: Bool + +デフォルト値: 0 + +ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚ªãƒ–ジェクトをæŒã¤ JSON データã®æŒ¿å…¥ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るフォーマット: + +- [JSONEachRow](../../interfaces/formats.md/#jsoneachrow) + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +関連情報: + +- JSONEachRow フォーマットã§ã®[ãƒã‚¹ãƒˆã•ã‚ŒãŸæ§‹é€ ã®ä½¿ç”¨](../../interfaces/formats.md/#jsoneachrow-nested) + +## input_format_ipv4_default_on_conversion_error {#input_format_ipv4_default_on_conversion_error} + +タイプ: Bool + +デフォルト値: 0 + +IPv4 ã®ãƒ‡ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºä¸­ã®å¤‰æ›ã‚¨ãƒ©ãƒ¼ã‚’デフォルト値ã«ç½®ãæ›ãˆã¾ã™ã€‚ + +デフォルトã§ã¯ç„¡åŠ¹ã€‚ + +## input_format_ipv6_default_on_conversion_error {#input_format_ipv6_default_on_conversion_error} + +タイプ: Bool + +デフォルト値: 0 + +IPV6 ã®ãƒ‡ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºä¸­ã®å¤‰æ›ã‚¨ãƒ©ãƒ¼ã‚’デフォルト値ã«ç½®ãæ›ãˆã¾ã™ã€‚ + +デフォルトã§ã¯ç„¡åŠ¹ã€‚ + +## input_format_json_compact_allow_variable_number_of_columns {#input_format_json_compact_allow_variable_number_of_columns} + +タイプ: Bool + +デフォルト値: 0 + +JSONCompact(EachRow) 入力 (ファイルãŒäºˆæƒ³ã‚ˆã‚Šå¤šãã®ã‚«ãƒ©ãƒ ã‚’æŒã¤å ´åˆ) ã§ä½™åˆ†ãªã‚«ãƒ©ãƒ ã‚’無視ã—ã€JSONCompact(EachRow) 入力ã§æ¬ ã‘ã¦ã„るフィールドをデフォルト値ã¨ã—ã¦æ‰±ã„ã¾ã™ + +## input_format_json_defaults_for_missing_elements_in_named_tuple {#input_format_json_defaults_for_missing_elements_in_named_tuple} + +タイプ: Bool + +デフォルト値: 1 + +åå‰ä»˜ãタプルを解æžã™ã‚‹ã¨ãã«ã€JSON オブジェクトã®æ¬ ã‘ã¦ã„ã‚‹è¦ç´ ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’挿入ã—ã¾ã™ã€‚ +ã“ã®è¨­å®šã¯ã€`input_format_json_named_tuples_as_objects` 設定ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã«ã®ã¿å‹•ä½œã—ã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_json_empty_as_default {#input_format_json_empty_as_default} + +タイプ: Bool + +デフォルト値: 0 + +JSON 入力ã§ç©ºã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’デフォルト値ã¨ã—ã¦æ‰±ã†ã€‚ + +## input_format_json_ignore_unknown_keys_in_named_tuple {#input_format_json_ignore_unknown_keys_in_named_tuple} + +タイプ: Bool + +デフォルト値: 1 + +åå‰ä»˜ãタプル㮠JSON オブジェクトã§æœªçŸ¥ã®ã‚­ãƒ¼ã‚’無視ã™ã‚‹ã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_json_ignore_unnecessary_fields {#input_format_json_ignore_unnecessary_fields} + +タイプ: Bool + +デフォルト値: 1 + +ä¸è¦ãªãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’無視ã—ã€è§£æžã—ãªã„。ã“れを有効ã«ã™ã‚‹ã¨ã€ä¸æ­£ãªå½¢å¼ã® JSON 文字列やé‡è¤‡ã™ã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’æŒã¤ JSON 文字列ã§ä¾‹å¤–をスローã—ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## input_format_json_infer_incomplete_types_as_strings {#input_format_json_infer_incomplete_types_as_strings} + +タイプ: Bool + +デフォルト値: 1 + +スキーマ推論中ã«ãƒ‡ãƒ¼ã‚¿ã‚µãƒ³ãƒ—ル㧠`Null`/`{}`/`[]` ã®ã¿ã‚’å«ã‚€ JSON キーã«å¯¾ã—㦠String 型を使用å¯èƒ½ã«ã—ã¾ã™ã€‚ +JSON フォーマットã§ã¯ã€ä»»æ„ã®å€¤ã‚’ String ã¨ã—ã¦èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中㫠`Cannot determine type for column 'column_name' by first 25000 rows of data, most likely this column contains only Nulls or empty Arrays/Maps` ã®ã‚ˆã†ãªã‚¨ãƒ©ãƒ¼ã‚’回é¿ã§ãã¾ã™ã€‚ +未知ã®åž‹ã®ã‚­ãƒ¼ã« String 型を使用ã—ã¦ã€ã‚¨ãƒ©ãƒ¼ã‚’回é¿ã§ãã¾ã™ã€‚ + +例: + +```sql +SET input_format_json_infer_incomplete_types_as_strings = 1, input_format_json_try_infer_named_tuples_from_objects = 1; +DESCRIBE format(JSONEachRow, '{"obj" : {"a" : [1,2,3], "b" : "hello", "c" : null, "d" : {}, "e" : []}}'); +SELECT * FROM format(JSONEachRow, '{"obj" : {"a" : [1,2,3], "b" : "hello", "c" : null, "d" : {}, "e" : []}}'); +``` + +çµæžœ: +``` +┌─name─┬─type───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ obj │ Tuple(a Array(Nullable(Int64)), b Nullable(String), c Nullable(String), d Nullable(String), e Array(Nullable(String))) │ │ │ │ │ │ +└──────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ + +┌─obj────────────────────────────┠+│ ([1,2,3],'hello',NULL,'{}',[]) │ +└────────────────────────────────┘ +``` + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_json_max_depth {#input_format_json_max_depth} + +タイプ: UInt64 + +デフォルト値: 1000 + +JSON 内ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®æœ€å¤§æ·±åº¦ã€‚ã“ã®åˆ¶é™ã¯åŽ³å¯†ãªã‚‚ã®ã§ã¯ãªãã€æ­£ç¢ºã«é©ç”¨ã•ã‚Œã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## input_format_json_named_tuples_as_objects {#input_format_json_named_tuples_as_objects} + +タイプ: Bool + +デフォルト値: 1 + +åå‰ä»˜ãタプルカラムを JSON オブジェクトã¨ã—ã¦è§£æžã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_json_read_arrays_as_strings {#input_format_json_read_arrays_as_strings} + +タイプ: Bool + +デフォルト値: 1 + +JSON 入力フォーマット㧠JSON é…列を文字列ã¨ã—ã¦è§£æžã‚’許å¯ã€‚ + +例: + +```sql +SET input_format_json_read_arrays_as_strings = 1; +SELECT arr, toTypeName(arr), JSONExtractArrayRaw(arr)[3] from format(JSONEachRow, 'arr String', '{"arr" : [1, "Hello", [1,2,3]]}'); +``` + +çµæžœ: +``` +┌─arr───────────────────┬─toTypeName(arr)─┬─arrayElement(JSONExtractArrayRaw(arr), 3)─┠+│ [1, "Hello", [1,2,3]] │ String │ [1,2,3] │ +└───────────────────────┴─────────────────┴───────────────────────────────────────────┘ +``` + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_json_read_bools_as_numbers {#input_format_json_read_bools_as_numbers} + +タイプ: Bool + +デフォルト値: 1 + +JSON 入力フォーマットã§ãƒ–ールを数値ã¨ã—ã¦è§£æžã‚’許å¯ã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_json_read_bools_as_strings {#input_format_json_read_bools_as_strings} + +タイプ: Bool + +デフォルト値: 1 + +JSON 入力フォーマットã§ãƒ–ールを文字列ã¨ã—ã¦è§£æžã‚’許å¯ã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_json_read_numbers_as_strings {#input_format_json_read_numbers_as_strings} + +タイプ: Bool + +デフォルト値: 1 + +JSON 入力フォーマットã§æ•°å€¤ã‚’文字列ã¨ã—ã¦è§£æžã‚’許å¯ã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_json_read_objects_as_strings {#input_format_json_read_objects_as_strings} + +タイプ: Bool + +デフォルト値: 1 + +JSON 入力フォーマット㧠JSON オブジェクトを文字列ã¨ã—ã¦è§£æžã‚’許å¯ã€‚ + +例: + +```sql +SET input_format_json_read_objects_as_strings = 1; +CREATE TABLE test (id UInt64, obj String, date Date) ENGINE=Memory(); +INSERT INTO test FORMAT JSONEachRow {"id" : 1, "obj" : {"a" : 1, "b" : "Hello"}, "date" : "2020-01-01"}; +SELECT * FROM test; +``` + +çµæžœ: + +``` +┌─id─┬─obj──────────────────────┬───────date─┠+│ 1 │ {"a" : 1, "b" : "Hello"} │ 2020-01-01 │ +└────┴──────────────────────────┴────────────┘ +``` + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_json_throw_on_bad_escape_sequence {#input_format_json_throw_on_bad_escape_sequence} + +タイプ: Bool + +デフォルト値: 1 + +JSON 入力フォーマットã§ã€JSON 文字列ã«ä¸æ­£ãªã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã«ä¾‹å¤–をスローã—ã¾ã™ã€‚無効ã«ã™ã‚‹ã¨ã€ä¸æ­£ãªã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスã¯ãƒ‡ãƒ¼ã‚¿å†…ã«ãã®ã¾ã¾æ®‹ã‚Šã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_json_try_infer_named_tuples_from_objects {#input_format_json_try_infer_named_tuples_from_objects} + +タイプ: Bool + +デフォルト値: 1 + +有効ã«ã™ã‚‹ã¨ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中㫠ClickHouse 㯠JSON オブジェクトã‹ã‚‰åå‰ä»˜ãタプルを推論ã—よã†ã¨ã—ã¾ã™ã€‚ +çµæžœã®åå‰ä»˜ãタプルã«ã¯ã€ã‚µãƒ³ãƒ—ルデータã‹ã‚‰ã™ã¹ã¦ã®å¯¾å¿œã™ã‚‹ JSON オブジェクトã‹ã‚‰ã®ã™ã¹ã¦ã®è¦ç´ ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +例: + +```sql +SET input_format_json_try_infer_named_tuples_from_objects = 1; +DESC format(JSONEachRow, '{"obj" : {"a" : 42, "b" : "Hello"}}, {"obj" : {"a" : 43, "c" : [1, 2, 3]}}, {"obj" : {"d" : {"e" : 42}}}') +``` + +çµæžœ: + +``` +┌─name─┬─type───────────────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ obj │ Tuple(a Nullable(Int64), b Nullable(String), c Array(Nullable(Int64)), d Tuple(e Nullable(Int64))) │ │ │ │ │ │ +└──────┴────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_json_try_infer_numbers_from_strings {#input_format_json_try_infer_numbers_from_strings} + +タイプ: Bool + +デフォルト値: 0 + +有効ã«ã™ã‚‹ã¨ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中㫠ClickHouse ã¯æ–‡å­—列フィールドã‹ã‚‰æ•°å€¤ã‚’推論ã—よã†ã¨ã—ã¾ã™ã€‚ +JSON データãŒå¼•ç”¨ç¬¦ä»˜ãã® UInt64 数値をå«ã‚€å ´åˆã«æœ‰åŠ¹ã§ã™ã€‚ + +デフォルトã§ç„¡åŠ¹ã€‚ + +## input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects {#input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects} + +タイプ: Bool + +デフォルト値: 0 + +JSON オブジェクトã®åå‰ä»˜ãタプル推論中ã«ã‚ã„ã¾ã„ãªãƒ‘スã®å ´åˆã€ä¾‹å¤–ã®ä»£ã‚ã‚Šã« String 型を使用ã—ã¾ã™ + +## input_format_json_validate_types_from_metadata {#input_format_json_validate_types_from_metadata} + +タイプ: Bool + +デフォルト値: 1 + +JSON/JSONCompact/JSONColumnsWithMetadata 入力フォーマットã®å ´åˆã€ã“ã®è¨­å®šãŒ 1 ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ +入力データã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®åž‹ãŒãƒ†ãƒ¼ãƒ–ルã®å¯¾å¿œã™ã‚‹ã‚«ãƒ©ãƒ ã®åž‹ã¨æ¯”較ã•ã‚Œã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_max_bytes_to_read_for_schema_inference {#input_format_max_bytes_to_read_for_schema_inference} + +タイプ: UInt64 + +デフォルト値: 33554432 + +自動スキーマ推論ã®ãŸã‚ã«èª­ã¿å–るデータã®æœ€å¤§ãƒã‚¤ãƒˆæ•°ã€‚ + +## input_format_max_rows_to_read_for_schema_inference {#input_format_max_rows_to_read_for_schema_inference} + +タイプ: UInt64 + +デフォルト値: 25000 + +自動スキーマ推論ã®ãŸã‚ã«èª­ã¿å–るデータã®æœ€å¤§è¡Œæ•°ã€‚ + +## input_format_msgpack_number_of_columns {#input_format_msgpack_number_of_columns} + +タイプ: UInt64 + +デフォルト値: 0 + +挿入ã•ã‚ŒãŸ MsgPack データã®ã‚«ãƒ©ãƒ æ•°ã€‚データã‹ã‚‰ã®è‡ªå‹•ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## input_format_mysql_dump_map_column_names {#input_format_mysql_dump_map_column_names} + +タイプ: Bool + +デフォルト値: 1 + +MySQL ダンプã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®ã‚«ãƒ©ãƒ ã¨ ClickHouse テーブルã‹ã‚‰ã®ã‚«ãƒ©ãƒ ã‚’åå‰ã§ä¸€è‡´ã•ã›ã‚‹ + +## input_format_mysql_dump_table_name {#input_format_mysql_dump_table_name} + +タイプ: String + +デフォルト値: + +MySQL ダンプã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–るテーブルã®åå‰ + +## input_format_native_allow_types_conversion {#input_format_native_allow_types_conversion} + +タイプ: Bool + +デフォルト値: 1 + +Native 入力フォーマットã§ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®å¤‰æ›ã‚’許å¯ã™ã‚‹ + +## input_format_native_decode_types_in_binary_format {#input_format_native_decode_types_in_binary_format} + +タイプ: Bool + +デフォルト値: 0 + +Native 入力フォーマットã§åž‹åã®ä»£ã‚ã‚Šã«ãƒã‚¤ãƒŠãƒªå½¢å¼ã§ãƒ‡ãƒ¼ã‚¿åž‹ã‚’読ã¿å–ã‚‹ + +## input_format_null_as_default {#input_format_null_as_default} + +タイプ: Bool + +デフォルト値: 1 + +データ型ãŒ[nullable](../../sql-reference/data-types/nullable.md/#data_type-nullable)ã§ãªã„ [NULL](../../sql-reference/syntax.md/#null-literal) フィールドã«[デフォルト値](../../sql-reference/statements/create/table.md/#create-default-values)ã§ã®åˆæœŸåŒ–を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ +カラムタイプ㌠nullable ã§ãªãã€ã“ã®è¨­å®šãŒç„¡åŠ¹ãªå ´åˆã€`NULL` を挿入ã™ã‚‹ã¨ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚カラムタイプ㌠nullable ã®å ´åˆã€ã“ã®è¨­å®šã«é–¢ã‚ら㚠`NULL` 値ãŒãã®ã¾ã¾æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ã€ã»ã¨ã‚“ã©ã®å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +複雑ãªãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå¼ã«å¯¾ã—ã¦ã¯ `input_format_defaults_for_omitted_fields` も有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — nullable ã§ãªã„カラム㫠`NULL` を挿入ã™ã‚‹ã¨ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +- 1 — `NULL` フィールドãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚«ãƒ©ãƒ å€¤ã§åˆæœŸåŒ–ã•ã‚Œã¾ã™ã€‚ + +## input_format_orc_allow_missing_columns {#input_format_orc_allow_missing_columns} + +タイプ: Bool + +デフォルト値: 1 + +ORC 入力フォーマットã®èª­ã¿å–り時ã«æ¬ æカラムを許å¯ã—ã¾ã™ã€‚ + +## input_format_orc_case_insensitive_column_matching {#input_format_orc_case_insensitive_column_matching} + +タイプ: Bool + +デフォルト値: 0 + +ORC ã®ã‚«ãƒ©ãƒ ã¨ CH ã®ã‚«ãƒ©ãƒ ã‚’一致ã•ã›ã‚‹ã¨ãã«å¤§æ–‡å­—ã¨å°æ–‡å­—を無視ã—ã¾ã™ã€‚ + +## input_format_orc_dictionary_as_low_cardinality {#input_format_orc_dictionary_as_low_cardinality} + +タイプ: Bool + +デフォルト値: 1 + +ORC Dictionaryエンコードã•ã‚ŒãŸã‚«ãƒ©ãƒ ã‚’ ORC ファイルã®èª­ã¿å–り中㫠LowCardinality カラムã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ + +## input_format_orc_filter_push_down {#input_format_orc_filter_push_down} + +タイプ: Bool + +デフォルト値: 1 + +ORC ファイルを読ã¿å–ã‚‹ã¨ãã€ORC メタデータ㮠WHERE/PREWHERE å¼ã€æœ€å°/最大統計ã€ãƒ–ルームフィルタã«åŸºã¥ã„ã¦ã€å…¨ã‚¹ãƒˆãƒ©ã‚¤ãƒ—ã¾ãŸã¯è¡Œã‚°ãƒ«ãƒ¼ãƒ—をスキップã—ã¾ã™ã€‚ + +## input_format_orc_reader_time_zone_name {#input_format_orc_reader_time_zone_name} + +タイプ: String + +デフォルト値: GMT + +ORC 行リーダーã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³åã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã® ORC 行リーダーã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯ GMT ã§ã™ã€‚ + +## input_format_orc_row_batch_size {#input_format_orc_row_batch_size} + +タイプ: Int64 + +デフォルト値: 100000 + +ORC ストライプを読ã¿å–ã‚‹ã¨ãã®ãƒãƒƒãƒã‚µã‚¤ã‚ºã€‚ + +## input_format_orc_skip_columns_with_unsupported_types_in_schema_inference {#input_format_orc_skip_columns_with_unsupported_types_in_schema_inference} + +タイプ: Bool + +デフォルト値: 0 + +ORC フォーマットã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œãªã„åž‹ã®ã‚«ãƒ©ãƒ ã‚’スキップã—ã¾ã™ + +## input_format_orc_use_fast_decoder {#input_format_orc_use_fast_decoder} + +タイプ: Bool + +デフォルト値: 1 + +より高速㪠ORC デコーダー実装を使用ã—ã¾ã™ã€‚ + +## input_format_parquet_allow_missing_columns {#input_format_parquet_allow_missing_columns} + +タイプ: Bool + +デフォルト値: 1 + +Parquet 入力フォーマットã®èª­ã¿å–り時ã«æ¬ æカラムを許å¯ã—ã¾ã™ã€‚ + +## input_format_parquet_bloom_filter_push_down {#input_format_parquet_bloom_filter_push_down} + +タイプ: Bool + +デフォルト値: 0 + +Parquet ファイルを読ã¿å–ã‚‹ã¨ãã€WHERE å¼ã¨ Parquet メタデータã®ãƒ–ルームフィルタã«åŸºã¥ã„ã¦ã€å…¨è¡Œã‚°ãƒ«ãƒ¼ãƒ—をスキップã—ã¾ã™ã€‚ + +## input_format_parquet_case_insensitive_column_matching {#input_format_parquet_case_insensitive_column_matching} + +タイプ: Bool + +デフォルト値: 0 + +Parquet ã®ã‚«ãƒ©ãƒ ã¨ CH ã®ã‚«ãƒ©ãƒ ã‚’一致ã•ã›ã‚‹ã¨ãã«å¤§æ–‡å­—ã¨å°æ–‡å­—を無視ã—ã¾ã™ã€‚ + +## input_format_parquet_enable_row_group_prefetch {#input_format_parquet_enable_row_group_prefetch} + +タイプ: Bool + +デフォルト値: 1 + +パーケット解æžä¸­ã«è¡Œã‚°ãƒ«ãƒ¼ãƒ—ã®ãƒ—リフェッãƒã‚’有効ã«ã—ã¾ã™ã€‚ç¾åœ¨ã€å˜ä¸€ã‚¹ãƒ¬ãƒƒãƒ‰ã®è§£æžã®ã¿ãŒãƒ—リフェッãƒã‚’è¡Œãˆã¾ã™ã€‚ + +## input_format_parquet_filter_push_down {#input_format_parquet_filter_push_down} + +タイプ: Bool + +デフォルト値: 1 + +Parquet ファイルを読ã¿å–ã‚‹ã¨ãã€WHERE/PREWHERE å¼ã¨ Parquet メタデータã®æœ€å°/最大統計ã«åŸºã¥ã„ã¦ã€å…¨è¡Œã‚°ãƒ«ãƒ¼ãƒ—をスキップã—ã¾ã™ã€‚ + +## input_format_parquet_local_file_min_bytes_for_seek {#input_format_parquet_local_file_min_bytes_for_seek} + +タイプ: UInt64 + +デフォルト値: 8192 + +Parquet 入力フォーマットã§ç„¡è¦–ã™ã‚‹ã“ã¨ãªãã€ã‚·ãƒ¼ã‚¯ã‚’è¡Œã†ãŸã‚ã®ãƒ­ãƒ¼ã‚«ãƒ«èª­ã¿å–ã‚Š (ファイル) ã«å¿…è¦ãªæœ€å°ãƒã‚¤ãƒˆæ•° + +## input_format_parquet_max_block_size {#input_format_parquet_max_block_size} + +タイプ: UInt64 + +デフォルト値: 65409 + +Parquet リーダーã®æœ€å¤§ãƒ–ロックサイズ。 + +## input_format_parquet_prefer_block_bytes {#input_format_parquet_prefer_block_bytes} + +タイプ: UInt64 + +デフォルト値: 16744704 + +Parquet リーダーã«ã‚ˆã‚‹å¹³å‡ãƒ–ロックãƒã‚¤ãƒˆå‡ºåŠ› + +## input_format_parquet_preserve_order {#input_format_parquet_preserve_order} + +タイプ: Bool + +デフォルト値: 0 + +Parquet ファイルã®èª­ã¿å–り時ã«è¡Œã®é †åºã‚’ä¿æŒã—ã¾ã™ã€‚通常ã¯éžå¸¸ã«é…ããªã‚Šã¾ã™ã€‚ + +## input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference {#input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference} + +タイプ: Bool + +デフォルト値: 0 + +Parquet フォーマットã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œãªã„åž‹ã®ã‚«ãƒ©ãƒ ã‚’スキップã—ã¾ã™ã€‚ + +## input_format_parquet_use_native_reader {#input_format_parquet_use_native_reader} + +タイプ: Bool + +デフォルト値: 0 + +Parquet ファイルを読ã¿å–ã‚‹ã¨ãã€ãƒã‚¤ãƒ†ã‚£ãƒ–リーダーを使用ã™ã‚‹ä»£ã‚ã‚Šã«ã‚¢ãƒ­ãƒ¼ãƒªãƒ¼ãƒ€ãƒ¼ã‚’使用ã—ã¾ã™ã€‚ + +## input_format_protobuf_flatten_google_wrappers {#input_format_protobuf_flatten_google_wrappers} + +タイプ: Bool + +デフォルト値: 0 + +通常ã®éžãƒã‚¹ãƒˆã‚«ãƒ©ãƒ ã«å¯¾ã—㦠Google ラッパーを有効ã«ã—ã¾ã™ã€‚例ãˆã°ã€google.protobuf.StringValue 'str' 㯠String カラム 'str' ã«å¯¾å¿œã—ã¾ã™ã€‚Nullable カラムã®å ´åˆã€ç©ºã®ãƒ©ãƒƒãƒ‘ーã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨ã—ã¦èªè­˜ã•ã‚Œã€æ¬ ã‘ãŸå ´åˆã¯ null ã¨ã—ã¦èªè­˜ã•ã‚Œã¾ã™ + +## input_format_protobuf_skip_fields_with_unsupported_types_in_schema_inference {#input_format_protobuf_skip_fields_with_unsupported_types_in_schema_inference} + +タイプ: Bool + +デフォルト値: 0 + +Protobuf フォーマットã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œãªã„åž‹ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’スキップã—ã¾ã™ã€‚ + +## input_format_record_errors_file_path {#input_format_record_errors_file_path} + +タイプ: String + +デフォルト値: + +テキストフォーマット (CSVã€TSV) ã®èª­ã¿å–り中ã«ã‚¨ãƒ©ãƒ¼ã‚’記録ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘ス。 + +## input_format_skip_unknown_fields {#input_format_skip_unknown_fields} + +タイプ: Bool + +デフォルト値: 1 + +追加データã®æŒ¿å…¥ã‚’スキップã™ã‚‹ã‹å¦ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +データを書ã込むã¨ãã€ClickHouse ã¯å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã«ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«å­˜åœ¨ã—ãªã„カラムãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–をスローã—ã¾ã™ã€‚スキップãŒæœ‰åŠ¹ãªå ´åˆã€ClickHouse ã¯è¿½åŠ ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã›ãšã€ä¾‹å¤–をスローã—ã¾ã›ã‚“。 + +サãƒãƒ¼ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ: + +- [JSONEachRow](../../interfaces/formats.md/#jsoneachrow)(ãŠã‚ˆã³ãã®ä»–ã® JSON フォーマット) +- [BSONEachRow](../../interfaces/formats.md/#bsoneachrow)(ãŠã‚ˆã³ãã®ä»–ã® JSON フォーマット) +- [TSKV](../../interfaces/formats.md/#tskv) +- WithNames/WithNamesAndTypes ã®ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ä»˜ã全フォーマット +- [MySQLDump](../../interfaces/formats.md/#mysqldump) +- [Native](../../interfaces/formats.md/#native) + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +## input_format_try_infer_dates {#input_format_try_infer_dates} + +タイプ: Bool + +デフォルト値: 1 + +有効ã«ã™ã‚‹ã¨ã€ClickHouse ã¯ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中ã«æ–‡å­—列フィールドã‹ã‚‰ `Date` 型を推論ã—よã†ã¨ã—ã¾ã™ã€‚入力データã®ã‚«ãƒ©ãƒ ã‹ã‚‰ã™ã¹ã¦ã®æ—¥ä»˜ãŒæ­£å¸¸ã«ãƒ‘ースã•ã‚ŒãŸå ´åˆã€çµæžœã®åž‹ã¯ `Date` ã«ãªã‚Šã¾ã™ã€‚å°‘ãªãã¨ã‚‚1ã¤ã®æ—¥ä»˜ãŒãƒ‘ースã•ã‚Œãªã‹ã£ãŸå ´åˆã€çµæžœã®åž‹ã¯ `String` ã«ãªã‚Šã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_try_infer_datetimes {#input_format_try_infer_datetimes} + +タイプ: Bool + +デフォルト値: 1 + +有効ã«ã™ã‚‹ã¨ã€ClickHouse ã¯ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中ã«æ–‡å­—列フィールドã‹ã‚‰ `DateTime64` 型を推論ã—よã†ã¨ã—ã¾ã™ã€‚入力データã®ã‚«ãƒ©ãƒ ã‹ã‚‰ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒæ­£å¸¸ã«æ—¥æ™‚ã¨ã—ã¦ãƒ‘ースã•ã‚ŒãŸå ´åˆã€çµæžœã®åž‹ã¯ `DateTime64` ã«ãªã‚Šã¾ã™ã€‚å°‘ãªãã¨ã‚‚1ã¤ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒæ—¥æ™‚ã¨ã—ã¦ãƒ‘ースã•ã‚Œãªã‹ã£ãŸå ´åˆã€çµæžœã®åž‹ã¯ `String` ã«ãªã‚Šã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_try_infer_datetimes_only_datetime64 {#input_format_try_infer_datetimes_only_datetime64} + +タイプ: Bool + +デフォルト値: 0 + +input_format_try_infer_datetimes ãŒæœ‰åŠ¹ãªã¨ãã®ã¿ã€DateTime åž‹ã§ã¯ãªã DateTime64 型を推論ã—ã¾ã™ã€‚ + +## input_format_try_infer_exponent_floats {#input_format_try_infer_exponent_floats} + +タイプ: Bool + +デフォルト値: 0 + +JSON を除ãテキストフォーマットã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§æŒ‡æ•°è¡¨è¨˜ã«ã‚ˆã‚‹æµ®å‹•å°æ•°ç‚¹æ•°ã‚’推論ã—よã†ã¨ã—ã¾ã™ (JSONã§ã¯æŒ‡æ•°æ•°ãŒå¸¸ã«æŽ¨è«–ã•ã‚Œã¾ã™ï¼‰ + +## input_format_try_infer_integers {#input_format_try_infer_integers} + +タイプ: Bool + +デフォルト値: 1 + +有効ã«ã™ã‚‹ã¨ã€ClickHouse ã¯ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中ã«æ•´æ•°ã‚’浮動å°æ•°ç‚¹æ•°ã®ä»£ã‚ã‚Šã«æŽ¨è«–ã—よã†ã¨ã—ã¾ã™ã€‚入力データã®ã‚«ãƒ©ãƒ ã®ã™ã¹ã¦ã®æ•°ãŒæ•´æ•°ã§ã‚ã‚‹å ´åˆã€çµæžœã®ã‚¿ã‚¤ãƒ—㯠`Int64` ã«ãªã‚Šã¾ã™ã€‚å°‘ãªãã¨ã‚‚1ã¤ã®æ•°ãŒæµ®å‹•å°æ•°ç‚¹æ•°ã§ã‚ã‚‹å ´åˆã€çµæžœã®ã‚¿ã‚¤ãƒ—㯠`Float64` ã«ãªã‚Šã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã€‚ + +## input_format_try_infer_variants {#input_format_try_infer_variants} + +タイプ: Bool + +デフォルト値: 0 + +有効ã«ã™ã‚‹ã¨ã€ClickHouse ã¯ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中ã«ã‚«ãƒ©ãƒ /é…列è¦ç´ ã«å¯¾ã—ã¦å¯èƒ½ãªåž‹ãŒè¤‡æ•°ã‚ã‚‹å ´åˆã« [`Variant`](../../sql-reference/data-types/variant.md) 型を推論ã—よã†ã¨ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +## input_format_tsv_allow_variable_number_of_columns {#input_format_tsv_allow_variable_number_of_columns} + +タイプ: Bool + +デフォルト値: 0 + +TSV 入力 (ファイルãŒäºˆæƒ³ã‚ˆã‚Šå¤šãã®ã‚«ãƒ©ãƒ ã‚’æŒã¤å ´åˆ) ã§ä½™åˆ†ãªã‚«ãƒ©ãƒ ã‚’無視ã—ã€TSV 入力ã§æ¬ ã‘ã¦ã„るフィールドをデフォルト値ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ + +## input_format_tsv_crlf_end_of_line {#input_format_tsv_crlf_end_of_line} + +タイプ: Bool + +デフォルト値: 0 + +true ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ•ã‚¡ã‚¤ãƒ«é–¢æ•°ã¯ \\n ã®ä»£ã‚ã‚Šã« \\r\\n 㧠TSV フォーマットを読ã¿å–ã‚Šã¾ã™ã€‚ + +## input_format_tsv_detect_header {#input_format_tsv_detect_header} + +タイプ: Bool + +デフォルト値: 1 + +TSV フォーマットã§åå‰ã¨åž‹ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’自動的ã«æ¤œå‡º + +## input_format_tsv_empty_as_default {#input_format_tsv_empty_as_default} + +タイプ: Bool + +デフォルト値: 0 + +TSV 入力ã§ç©ºã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’デフォルト値ã¨ã—ã¦æ‰±ã†ã€‚ + +## input_format_tsv_enum_as_number {#input_format_tsv_enum_as_number} + +タイプ: Bool + +デフォルト値: 0 + +TSV フォーマットã§æŒ¿å…¥ã•ã‚ŒãŸ enum 値を enum インデックスã¨ã—ã¦æ‰±ã†ã€‚ + +## input_format_tsv_skip_first_lines {#input_format_tsv_skip_first_lines} + +タイプ: UInt64 + +デフォルト値: 0 + +TSV フォーマットã®ãƒ‡ãƒ¼ã‚¿ã®å…ˆé ­ã§ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹è¡Œæ•°ã‚’指定ã—ã¾ã™ã€‚ + +## input_format_tsv_skip_trailing_empty_lines {#input_format_tsv_skip_trailing_empty_lines} + +タイプ: Bool + +デフォルト値: 0 + +TSV フォーマットã§æœ«å°¾ã®ç©ºè¡Œã‚’スキップ + +## input_format_tsv_use_best_effort_in_schema_inference {#input_format_tsv_use_best_effort_in_schema_inference} + +タイプ: Bool + +デフォルト値: 1 + +TSV フォーマットã§ã‚¹ã‚­ãƒ¼ãƒžã‚’推論ã™ã‚‹ãŸã‚ã«ã„ãã¤ã‹ã®èª¿æ•´ã¨ãƒ’ューリスティックを使用ã™ã‚‹ + +## input_format_values_accurate_types_of_literals {#input_format_values_accurate_types_of_literals} + +タイプ: Bool + +デフォルト値: 1 + +Values フォーマット用: テンプレートを使用ã—ã¦å¼ã‚’解æžã—解釈ã™ã‚‹éš›ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚„精度ã®å•é¡Œã‚’é¿ã‘ã‚‹ãŸã‚ã«ãƒªãƒ†ãƒ©ãƒ«ã®å®Ÿéš›ã®åž‹ã‚’確èªã—ã¾ã™ã€‚ + +## input_format_values_deduce_templates_of_expressions {#input_format_values_deduce_templates_of_expressions} + +タイプ: Bool + +デフォルト値: 1 + +Values フォーマット用: フィールドãŒã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‘ーサーã«ã‚ˆã£ã¦è§£æžã§ããªã‹ã£ãŸå ´åˆã€SQL パーサーを実行ã—ã€SQL å¼ã®ãƒ†ãƒ³ãƒ—レートを推論ã—ã€ãƒ†ãƒ³ãƒ—レートを使用ã—ã¦ã™ã¹ã¦ã®è¡Œã‚’解æžã—ã€ãã‚Œã‹ã‚‰å…¨è¡Œã§å¼ã‚’解釈ã—よã†ã¨ã—ã¾ã™ã€‚ + +## input_format_values_interpret_expressions {#input_format_values_interpret_expressions} + +タイプ: Bool + +デフォルト値: 1 + +Values フォーマット用: フィールドãŒã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ãƒ‘ーサーã«ã‚ˆã£ã¦è§£æžã§ããªã‹ã£ãŸå ´åˆã€SQL パーサーを実行ã—ã€SQL å¼ã¨ã—ã¦è§£é‡ˆã—よã†ã¨ã—ã¾ã™ã€‚ + +## input_format_with_names_use_header {#input_format_with_names_use_header} + +タイプ: Bool + +デフォルト値: 1 + +データ挿入時ã®ã‚«ãƒ©ãƒ é †åºã®ç¢ºèªã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +挿入性能をå‘上ã•ã›ã‚‹ãŸã‚ã«ã€å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã®ã‚«ãƒ©ãƒ é †ãŒã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã¨åŒã˜ã§ã‚ã‚‹ã“ã¨ãŒã‚ã‹ã£ã¦ã„ã‚‹å ´åˆã¯ã€ã“ã®ãƒã‚§ãƒƒã‚¯ã‚’無効ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るフォーマット: + +- [CSVWithNames](../../interfaces/formats.md/#csvwithnames) +- [CSVWithNamesAndTypes](../../interfaces/formats.md/#csvwithnamesandtypes) +- [TabSeparatedWithNames](../../interfaces/formats.md/#tabseparatedwithnames) +- [TabSeparatedWithNamesAndTypes](../../interfaces/formats.md/#tabseparatedwithnamesandtypes) +- [JSONCompactEachRowWithNames](../../interfaces/formats.md/#jsoncompacteachrowwithnames) +- [JSONCompactEachRowWithNamesAndTypes](../../interfaces/formats.md/#jsoncompacteachrowwithnamesandtypes) +- [JSONCompactStringsEachRowWithNames](../../interfaces/formats.md/#jsoncompactstringseachrowwithnames) +- [JSONCompactStringsEachRowWithNamesAndTypes](../../interfaces/formats.md/#jsoncompactstringseachrowwithnamesandtypes) +- [RowBinaryWithNames](../../interfaces/formats.md/#rowbinarywithnames) +- [RowBinaryWithNamesAndTypes](../../interfaces/formats.md/#rowbinarywithnamesandtypes) +- [CustomSeparatedWithNames](../../interfaces/formats.md/#customseparatedwithnames) +- [CustomSeparatedWithNamesAndTypes](../../interfaces/formats.md/#customseparatedwithnamesandtypes) + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +## input_format_with_types_use_header {#input_format_with_types_use_header} + +タイプ: Bool + +デフォルト値: 1 + +フォーマットパーサーãŒå…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿åž‹ãŒä¸€è‡´ã™ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るフォーマット: + +- [CSVWithNamesAndTypes](../../interfaces/formats.md/#csvwithnamesandtypes) +- [TabSeparatedWithNamesAndTypes](../../interfaces/formats.md/#tabseparatedwithnamesandtypes) +- [JSONCompactEachRowWithNamesAndTypes](../../interfaces/formats.md/#jsoncompacteachrowwithnamesandtypes) +- [JSONCompactStringsEachRowWithNamesAndTypes](../../interfaces/formats.md/#jsoncompactstringseachrowwithnamesandtypes) +- [RowBinaryWithNamesAndTypes](../../interfaces/formats.md/#rowbinarywithnamesandtypes-rowbinarywithnamesandtypes) +- [CustomSeparatedWithNamesAndTypes](../../interfaces/formats.md/#customseparatedwithnamesandtypes) + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +## insert_distributed_one_random_shard {#insert_distributed_one_random_shard} + +タイプ: Bool + +デフォルト値: 0 + +[分散](../../engines/table-engines/special/distributed.md/#distributed)テーブルã«åˆ†æ•£ã‚­ãƒ¼ãŒãªã„å ´åˆã«ãƒ©ãƒ³ãƒ€ãƒ ã‚·ãƒ£ãƒ¼ãƒ‰æŒ¿å…¥ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€åˆ†æ•£ã‚­ãƒ¼ãŒãªã„å ´åˆã«ã€è¤‡æ•°ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’æŒã¤ `Distributed` テーブルã¸ã®ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ã‚’ ClickHouse サーãƒãƒ¼ã¯æ‹’å¦ã—ã¾ã™ã€‚`insert_distributed_one_random_shard = 1` ã®å ´åˆã€æŒ¿å…¥ãŒè¨±å¯ã•ã‚Œã€ã™ã¹ã¦ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®é–“ã§ãƒ©ãƒ³ãƒ€ãƒ ã«ãƒ‡ãƒ¼ã‚¿ãŒè»¢é€ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 複数ã®ã‚·ãƒ£ãƒ¼ãƒ‰ãŒã‚り分散キーãŒä¸Žãˆã‚‰ã‚Œã¦ã„ãªã„å ´åˆã€æŒ¿å…¥ã¯æ‹’å¦ã•ã‚Œã¾ã™ã€‚ +- 1 — 分散キーãŒä¸Žãˆã‚‰ã‚Œã¦ã„ãªã„å ´åˆã€åˆ©ç”¨å¯èƒ½ãªã™ã¹ã¦ã®ã‚·ãƒ£ãƒ¼ãƒ‰é–“ã§ãƒ©ãƒ³ãƒ€ãƒ ã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +## interval_output_format {#interval_output_format} + +タイプ: IntervalOutputFormat + +デフォルト値: numeric + +インターãƒãƒ«åž‹ã®ãƒ†ã‚­ã‚¹ãƒˆè¡¨ç¾ã®ç•°ãªã‚‹å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’é¸æŠžå¯èƒ½ã€‚ + +å¯èƒ½ãªå€¤: + +- `kusto` - KQL スタイルã®å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚ + + ClickHouse ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã‚’ [KQL フォーマット](https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings#the-constant-c-format-specifier)ã§å‡ºåŠ›ã—ã¾ã™ã€‚例ãˆã°ã€`toIntervalDay(2)` 㯠`2.00:00:00` ã¨ã—ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¾ã™ã€‚インターãƒãƒ«åž‹ãŒç•°ãªã‚‹é•·ã•ã§ã‚ã‚‹å ´åˆï¼ˆä¾‹ãˆã°ã€`IntervalMonth` 㨠`IntervalYear`)ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã‚ãŸã‚Šã®å¹³å‡ç§’æ•°ãŒè€ƒæ…®ã•ã‚Œã¾ã™ã€‚ + +- `numeric` - æ•°å­—ã«ã‚ˆã‚‹å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚ + + ClickHouse ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã‚’ãã®åŸºç¤Žã¨ãªã‚‹æ•°å­—表ç¾ã¨ã—ã¦å‡ºåŠ›ã—ã¾ã™ã€‚例ãˆã°ã€`toIntervalDay(2)` 㯠`2` ã¨ã—ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +å‚ç…§: + +- [Interval](../../sql-reference/data-types/special-data-types/interval.md) + +## output_format_arrow_compression_method {#output_format_arrow_compression_method} + +タイプ: ArrowCompression + +デフォルト値: lz4_frame + +Arrow 出力フォーマットã®åœ§ç¸®æ–¹æ³•ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るコーデック: lz4_frame, zstd, none (éžåœ§ç¸®) + +## output_format_arrow_fixed_string_as_fixed_byte_array {#output_format_arrow_fixed_string_as_fixed_byte_array} + +タイプ: Bool + +デフォルト値: 1 + +FixedString カラムã«å¯¾ã—㦠Binary ã®ä»£ã‚ã‚Šã« Arrow FIXED_SIZE_BINARY タイプを使用ã—ã¾ã™ã€‚ + +## output_format_arrow_low_cardinality_as_dictionary {#output_format_arrow_low_cardinality_as_dictionary} + +タイプ: Bool + +デフォルト値: 0 + +LowCardinality åž‹ã‚’ Dictionary Arrow åž‹ã¨ã—ã¦å‡ºåŠ›ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã™ã‚‹ + +## output_format_arrow_string_as_string {#output_format_arrow_string_as_string} + +タイプ: Bool + +デフォルト値: 1 + +String カラムã«å¯¾ã—㦠Binary ã®ä»£ã‚ã‚Šã« Arrow String タイプを使用ã—ã¾ã™ + +## output_format_arrow_use_64_bit_indexes_for_dictionary {#output_format_arrow_use_64_bit_indexes_for_dictionary} + +タイプ: Bool + +デフォルト値: 0 + +Arrow フォーマットã§Dictionaryインデックスã«å¸¸ã« 64 ビット整数を使用ã™ã‚‹ + +## output_format_arrow_use_signed_indexes_for_dictionary {#output_format_arrow_use_signed_indexes_for_dictionary} + +タイプ: Bool + +デフォルト値: 1 + +Arrow フォーマットã§Dictionaryインデックスã«ç¬¦å·ä»˜ã整数を使用ã™ã‚‹ + +## output_format_avro_codec {#output_format_avro_codec} + +タイプ: String + +デフォルト値: + +出力ã«ä½¿ç”¨ã™ã‚‹åœ§ç¸®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã€‚å¯èƒ½ãªå€¤: 'null', 'deflate', 'snappy', 'zstd'。 + +## output_format_avro_rows_in_file {#output_format_avro_rows_in_file} + +タイプ: UInt64 + +デフォルト値: 1 + +ファイル内ã®æœ€å¤§è¡Œæ•° (ストレージã§è¨±å¯ã•ã‚Œã¦ã„ã‚‹å ´åˆ) + +## output_format_avro_string_column_pattern {#output_format_avro_string_column_pattern} + +タイプ: String + +デフォルト値: + +Avro フォーマット用: Avro 文字列ã¨ã—ã¦é¸æŠžã™ã‚‹ String カラムã®æ­£è¦è¡¨ç¾ã€‚ + +## output_format_avro_sync_interval {#output_format_avro_sync_interval} + +タイプ: UInt64 + +デフォルト値: 16384 + +åŒæœŸé–“隔(ãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +## output_format_binary_encode_types_in_binary_format {#output_format_binary_encode_types_in_binary_format} + +タイプ: Bool + +デフォルト値: 0 + +RowBinaryWithNamesAndTypes 出力フォーマットã§ã€åž‹åã®ä»£ã‚ã‚Šã«ãƒã‚¤ãƒŠãƒªå½¢å¼ã§ãƒ‡ãƒ¼ã‚¿åž‹ã‚’書ã込む + +## output_format_binary_write_json_as_string {#output_format_binary_write_json_as_string} + +タイプ: Bool + +デフォルト値: 0 + +RowBinary 出力フォーマットã§ã€[JSON](../../sql-reference/data-types/newjson.md) データ型ã®å€¤ã‚’ JSON [String](../../sql-reference/data-types/string.md) 値ã¨ã—ã¦æ›¸ã込む。 + +## output_format_bson_string_as_string {#output_format_bson_string_as_string} + +タイプ: Bool + +デフォルト値: 0 + +String カラムã«å¯¾ã—㦠Binary ã®ä»£ã‚ã‚Šã« BSON String 型を使用ã—ã¾ã™ã€‚ + +## output_format_csv_crlf_end_of_line {#output_format_csv_crlf_end_of_line} + +タイプ: Bool + +デフォルト値: 0 + +true ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€CSV フォーマットã®è¡Œæœ«ã¯ \\n ã®ä»£ã‚ã‚Šã« \\r\\n ã«ãªã‚Šã¾ã™ã€‚ + +## output_format_csv_serialize_tuple_into_separate_columns {#output_format_csv_serialize_tuple_into_separate_columns} + +タイプ: Bool + +デフォルト値: 1 + +true ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€CSV フォーマットã®ã‚¿ãƒ—ルã¯åˆ¥ã€…ã®ã‚«ãƒ©ãƒ ã¨ã—ã¦ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œã¾ã™ï¼ˆã¤ã¾ã‚Šã€ã‚¿ãƒ—ル内ã®ãƒã‚¹ãƒˆãŒå¤±ã‚ã‚Œã¾ã™ï¼‰ + +## output_format_decimal_trailing_zeros {#output_format_decimal_trailing_zeros} + +タイプ: Bool + +デフォルト値: 0 + +Decimal 値を出力ã™ã‚‹éš›ã«çµ‚端ã®ã‚¼ãƒ­ã‚’出力ã—ã¾ã™ã€‚例: 1.230000 ã®ä»£ã‚ã‚Šã« 1.23。 + +デフォルトã§ã¯ç„¡åŠ¹ã€‚ + +## output_format_enable_streaming {#output_format_enable_streaming} + +タイプ: Bool + +デフォルト値: 0 + +ストリーミングをサãƒãƒ¼ãƒˆã™ã‚‹å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°ã‚’有効ã«ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ç„¡åŠ¹ã€‚ + +## output_format_json_array_of_rows {#output_format_json_array_of_rows} + +タイプ: Bool + +デフォルト値: 0 + +[JSONEachRow](../../interfaces/formats.md/#jsoneachrow) フォーマットã§å…¨è¡Œã‚’ JSON é…列ã¨ã—ã¦å‡ºåŠ›ã™ã‚‹æ©Ÿèƒ½ã‚’有効ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — ClickHouse ã¯ã™ã¹ã¦ã®è¡Œã‚’ `JSONEachRow` フォーマットã®é…列ã¨ã—ã¦å‡ºåŠ›ã—ã¾ã™ã€‚ +- 0 — ClickHouse ã¯å„行を `JSONEachRow` フォーマットã§å€‹åˆ¥ã«å‡ºåŠ›ã—ã¾ã™ã€‚ + +**設定を有効ã«ã—ãŸã‚¯ã‚¨ãƒªã®ä¾‹** + +クエリ: + +```sql +SET output_format_json_array_of_rows = 1; +SELECT number FROM numbers(3) FORMAT JSONEachRow; +``` + +çµæžœ: + +```text +[ +{"number":"0"}, +{"number":"1"}, +{"number":"2"} +] +``` + +**設定を無効ã«ã—ãŸã‚¯ã‚¨ãƒªã®ä¾‹** + +クエリ: + +```sql +SET output_format_json_array_of_rows = 0; +SELECT number FROM numbers(3) FORMAT JSONEachRow; +``` + +çµæžœ: + +```text +{"number":"0"} +{"number":"1"} +{"number":"2"} +``` + + +## output_format_json_escape_forward_slashes {#output_format_json_escape_forward_slashes} + +タイプ: Bool + +デフォルト値: 1 + +文字列出力をJSONå½¢å¼ã§å‡ºåŠ›ã™ã‚‹éš›ã«ã€ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—を制御ã—ã¾ã™ã€‚ã“ã‚Œã¯JavaScriptã¨ã®äº’æ›æ€§ã‚’æ„図ã—ãŸã‚‚ã®ã§ã™ã€‚常ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã‚‹ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã¨ã¯æ··åŒã—ãªã„ã§ãã ã•ã„。 + +デフォルトã§æœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +## output_format_json_named_tuples_as_objects {#output_format_json_named_tuples_as_objects} + +タイプ: Bool + +デフォルト値: 1 + +åå‰ä»˜ãタプルカラムをJSONオブジェクトã¨ã—ã¦ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã—ã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +## output_format_json_quote_64bit_floats {#output_format_json_quote_64bit_floats} + +タイプ: Bool + +デフォルト値: 0 + +64ビット[浮動å°æ•°ç‚¹æ•°](../../sql-reference/data-types/float.md)ã®JSONå½¢å¼ã«ãŠã‘るクォートを制御ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +## output_format_json_quote_64bit_integers {#output_format_json_quote_64bit_integers} + +タイプ: Bool + +デフォルト値: 1 + +64ビット以上ã®[æ•´æ•°](../../sql-reference/data-types/int-uint.md)(例: `UInt64` ã‚„ `Int128`)を[JSON](../../interfaces/formats.md/#json)å½¢å¼ã§å‡ºåŠ›ã™ã‚‹éš›ã®ã‚¯ã‚©ãƒ¼ãƒˆã‚’制御ã—ã¾ã™ã€‚ +ã“れらã®æ•´æ•°ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚¯ã‚©ãƒ¼ãƒˆã«å›²ã¾ã‚Œã¾ã™ã€‚ã“ã®å‹•ä½œã¯å¤šãã®JavaScriptã®å®Ÿè£…ã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — æ•´æ•°ã¯ã‚¯ã‚©ãƒ¼ãƒˆãªã—ã§å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ +- 1 — æ•´æ•°ã¯ã‚¯ã‚©ãƒ¼ãƒˆã§å›²ã¾ã‚Œã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +## output_format_json_quote_decimals {#output_format_json_quote_decimals} + +タイプ: Bool + +デフォルト値: 0 + +JSON出力形å¼ã§ã®å°æ•°ç‚¹æ•°ã®ã‚¯ã‚©ãƒ¼ãƒˆã‚’制御ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +## output_format_json_quote_denormals {#output_format_json_quote_denormals} + +タイプ: Bool + +デフォルト値: 0 + +[JSON](../../interfaces/formats.md/#json)出力形å¼ã§`+nan`ã€`-nan`ã€`+inf`ã€`-inf`ã®å‡ºåŠ›ã‚’有効ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +**例** + +次ã®ãƒ†ãƒ¼ãƒ–ル `account_orders` を考ãˆã¦ã¿ã¾ã™ï¼š + +```text +┌─id─┬─name───┬─duration─┬─period─┬─area─┠+│ 1 │ Andrew │ 20 │ 0 │ 400 │ +│ 2 │ John │ 40 │ 0 │ 0 │ +│ 3 │ Bob │ 15 │ 0 │ -100 │ +└────┴────────┴──────────┴────────┴──────┘ +``` + +`output_format_json_quote_denormals = 0` ã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯å‡ºåŠ›ã« `null` 値を返ã—ã¾ã™ï¼š + +```sql +SELECT area/period FROM account_orders FORMAT JSON; +``` + +```json +{ + "meta": + [ + { + "name": "divide(area, period)", + "type": "Float64" + } + ], + + "data": + [ + { + "divide(area, period)": null + }, + { + "divide(area, period)": null + }, + { + "divide(area, period)": null + } + ], + + "rows": 3, + + "statistics": + { + "elapsed": 0.003648093, + "rows_read": 3, + "bytes_read": 24 + } +} +``` + +`output_format_json_quote_denormals = 1` ã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯ä»¥ä¸‹ã®ã‚ˆã†ã«è¿”ã—ã¾ã™ï¼š + +```json +{ + "meta": + [ + { + "name": "divide(area, period)", + "type": "Float64" + } + ], + + "data": + [ + { + "divide(area, period)": "inf" + }, + { + "divide(area, period)": "-nan" + }, + { + "divide(area, period)": "-inf" + } + ], + + "rows": 3, + + "statistics": + { + "elapsed": 0.000070241, + "rows_read": 3, + "bytes_read": 24 + } +} +``` + +## output_format_json_skip_null_value_in_named_tuples {#output_format_json_skip_null_value_in_named_tuples} + +タイプ: Bool + +デフォルト値: 0 + +åå‰ä»˜ãタプルカラムをJSONオブジェクトã¨ã—ã¦ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã™ã‚‹éš›ã«ã€nullã®å€¤ã‚’æŒã¤ã‚­ãƒ¼ã¨å€¤ã®ãƒšã‚¢ã‚’スキップã—ã¾ã™ã€‚`output_format_json_named_tuples_as_objects`ãŒtrueã®ã¨ãã«ã®ã¿æœ‰åŠ¹ã§ã™ã€‚ + +## output_format_json_validate_utf8 {#output_format_json_validate_utf8} + +タイプ: Bool + +デフォルト値: 0 + +UTF-8シーケンスã®æ¤œè¨¼ã‚’JSON出力形å¼ã§åˆ¶å¾¡ã—ã¾ã™ã€‚ãŸã ã—ã€JSON/JSONCompact/JSONColumnsWithMetadataå½¢å¼ã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。ã“れらã¯å¸¸ã«UTF-8を検証ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +## output_format_markdown_escape_special_characters {#output_format_markdown_escape_special_characters} + +タイプ: Bool + +デフォルト値: 0 + +Markdown内ã®ç‰¹æ®Šæ–‡å­—をエスケープã—ã¾ã™ã€‚ + +## output_format_msgpack_uuid_representation {#output_format_msgpack_uuid_representation} + +タイプ: MsgPackUUIDRepresentation + +デフォルト値: ext + +MsgPackå½¢å¼ã§UUIDを出力ã™ã‚‹æ–¹æ³•ã€‚ + +## output_format_native_encode_types_in_binary_format {#output_format_native_encode_types_in_binary_format} + +タイプ: Bool + +デフォルト値: 0 + +Native出力形å¼ã§ã‚¿ã‚¤ãƒ—åã§ã¯ãªãデータ型をãƒã‚¤ãƒŠãƒªå½¢å¼ã§è¨˜è¿°ã€‚ + +## output_format_native_write_json_as_string {#output_format_native_write_json_as_string} + +タイプ: Bool + +デフォルト値: 0 + +[JSON](../../sql-reference/data-types/newjson.md)カラムã®ãƒ‡ãƒ¼ã‚¿ã‚’デフォルトã®ãƒã‚¤ãƒ†ã‚£ãƒ–JSONシリアライゼーションã®ä»£ã‚ã‚Šã«ã€JSON文字列をå«ã‚€[String](../../sql-reference/data-types/string.md)カラムã¨ã—ã¦è¨˜è¿°ã€‚ + +## output_format_orc_compression_method {#output_format_orc_compression_method} + +タイプ: ORCCompression + +デフォルト値: zstd + +ORC出力形å¼ã®åœ§ç¸®æ–¹æ³•ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るコーデック: lz4, snappy, zlib, zstd, none (無圧縮) + +## output_format_orc_dictionary_key_size_threshold {#output_format_orc_dictionary_key_size_threshold} + +タイプ: Double + +デフォルト値: 0 + +ORC出力形å¼ã®æ–‡å­—列カラムã«ãŠã„ã¦ã€ä¸€æ„ã®å€¤ã®æ•°ãŒéžnullè¡Œã®ç·æ•°ã®ã“ã®å‰²åˆã‚’超ãˆã‚‹å ´åˆã€Dictionaryエンコーディングをオフã«ã—ã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°Dictionaryエンコーディングを有効ã«ã—ã¾ã™ã€‚ + +## output_format_orc_row_index_stride {#output_format_orc_row_index_stride} + +タイプ: UInt64 + +デフォルト値: 10000 + +ORC出力形å¼ã§ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆè¡Œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã‚¹ãƒˆãƒ©ã‚¤ãƒ‰ + +## output_format_orc_string_as_string {#output_format_orc_string_as_string} + +タイプ: Bool + +デフォルト値: 1 + +Stringカラムã«å¯¾ã—ã¦Binaryã®ä»£ã‚ã‚Šã«ORC String型を使用 + +## output_format_parquet_batch_size {#output_format_parquet_batch_size} + +タイプ: UInt64 + +デフォルト値: 1024 + +指定ã•ã‚ŒãŸè¡Œæ•°ã”ã¨ã«ãƒšãƒ¼ã‚¸ã‚µã‚¤ã‚ºã‚’確èªã—ã¾ã™ã€‚カラムã®å¹³å‡å€¤ã®ã‚µã‚¤ã‚ºãŒæ•°KBを超ãˆã‚‹å ´åˆã¯ã€è€ƒæ…®ã—ã¦ã‚µã‚¤ã‚ºã‚’減らã—ã¦ãã ã•ã„。 + +## output_format_parquet_compliant_nested_types {#output_format_parquet_compliant_nested_types} + +タイプ: Bool + +デフォルト値: 1 + +Parquetファイルã®ã‚¹ã‚­ãƒ¼ãƒžã«ãŠã„ã¦ã€ãƒªã‚¹ãƒˆè¦ç´ ã«å¯¾ã—ã¦'item'ã®ä»£ã‚ã‚Šã«'element'ã¨ã„ã†åå‰ã‚’使用ã—ã¾ã™ã€‚ã“ã‚Œã¯Arrowライブラリã®å®Ÿè£…ã®æ­´å²çš„éºç”£ã§ã™ã€‚一般的ã«ã¯äº’æ›æ€§ãŒå‘上ã—ã¾ã™ãŒã€å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®Arrowã«ã¯ä¾‹å¤–ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +## output_format_parquet_compression_method {#output_format_parquet_compression_method} + +タイプ: ParquetCompression + +デフォルト値: zstd + +Parquet出力形å¼ã®åœ§ç¸®æ–¹æ³•ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るコーデック: snappy, lz4, brotli, zstd, gzip, none (無圧縮) + +## output_format_parquet_data_page_size {#output_format_parquet_data_page_size} + +タイプ: UInt64 + +デフォルト値: 1048576 + +圧縮å‰ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒšãƒ¼ã‚¸ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +## output_format_parquet_fixed_string_as_fixed_byte_array {#output_format_parquet_fixed_string_as_fixed_byte_array} + +タイプ: Bool + +デフォルト値: 1 + +FixedStringカラムã«å¯¾ã—ã¦Binaryã®ä»£ã‚ã‚Šã«Parquet FIXED_LENGTH_BYTE_ARRAY型を使用。 + +## output_format_parquet_parallel_encoding {#output_format_parquet_parallel_encoding} + +タイプ: Bool + +デフォルト値: 1 + +複数ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§Parquetエンコードを行ã„ã¾ã™ã€‚`output_format_parquet_use_custom_encoder`ãŒå¿…è¦ã§ã™ã€‚ + +## output_format_parquet_row_group_size {#output_format_parquet_row_group_size} + +タイプ: UInt64 + +デフォルト値: 1000000 + +行グループサイズã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆï¼ˆè¡Œå˜ä½ï¼‰ã€‚ + +## output_format_parquet_row_group_size_bytes {#output_format_parquet_row_group_size_bytes} + +タイプ: UInt64 + +デフォルト値: 536870912 + +圧縮å‰ã®è¡Œã‚°ãƒ«ãƒ¼ãƒ—サイズã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +## output_format_parquet_string_as_string {#output_format_parquet_string_as_string} + +タイプ: Bool + +デフォルト値: 1 + +Stringカラムã«å¯¾ã—ã¦Binaryã®ä»£ã‚ã‚Šã«Parquet String型を使用。 + +## output_format_parquet_use_custom_encoder {#output_format_parquet_use_custom_encoder} + +タイプ: Bool + +デフォルト値: 1 + +より高速ãªParquetエンコーダ実装を使用。 + +## output_format_parquet_version {#output_format_parquet_version} + +タイプ: ParquetVersion + +デフォルト値: 2.latest + +出力形å¼ã®Parquetフォーマットãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³: 1.0, 2.4, 2.6 ãŠã‚ˆã³ 2.latest (デフォルト) + +## output_format_parquet_write_page_index {#output_format_parquet_write_page_index} + +タイプ: Bool + +デフォルト値: 1 + +Parquetファイルã«ãƒšãƒ¼ã‚¸ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’書ã込むãŸã‚ã®æ©Ÿèƒ½ã‚’追加。 + +## output_format_pretty_color {#output_format_pretty_color} + +タイプ: UInt64Auto + +デフォルト値: auto + +Prettyå½¢å¼ã§ANSIエスケープシーケンスを使用。0 - 無効, 1 - 有効, 'auto' - 端末ã§æœ‰åŠ¹ã€‚ + +## output_format_pretty_display_footer_column_names {#output_format_pretty_display_footer_column_names} + +タイプ: UInt64 + +デフォルト値: 1 + +テーブル行ãŒå¤šã„å ´åˆã€ãƒ•ãƒƒã‚¿ãƒ¼ã«ã‚«ãƒ©ãƒ åを表示。 + +å¯èƒ½ãªå€¤: + +- 0 — フッターã«ã¯ã‚«ãƒ©ãƒ åを表示ã—ãªã„。 +- 1 — フッターã«ã¯è¡Œæ•°ãŒè¨­å®šã•ã‚ŒãŸã—ãã„値(デフォルトã§50)以上ã®å ´åˆã«ã‚«ãƒ©ãƒ åを表示ã™ã‚‹ã€‚ + +**例** + +クエリ: + +```sql +SELECT *, toTypeName(*) FROM (SELECT * FROM system.numbers LIMIT 1000); +``` + +çµæžœ: + +```response + ┌─number─┬─toTypeName(number)─┠+ 1. │ 0 │ UInt64 │ + 2. │ 1 │ UInt64 │ + 3. │ 2 │ UInt64 │ + ... + 999. │ 998 │ UInt64 │ +1000. │ 999 │ UInt64 │ + └─number─┴─toTypeName(number)─┘ +``` + +## output_format_pretty_display_footer_column_names_min_rows {#output_format_pretty_display_footer_column_names_min_rows} + +タイプ: UInt64 + +デフォルト値: 50 + +設定 [output_format_pretty_display_footer_column_names](#output_format_pretty_display_footer_column_names) ãŒæœ‰åŠ¹ãªå ´åˆã€ãƒ•ãƒƒã‚¿ãƒ¼ã«ã‚«ãƒ©ãƒ åを表示ã™ã‚‹ãŸã‚ã®è¡Œã®æœ€å°æ•°ã‚’設定ã—ã¾ã™ã€‚ + +## output_format_pretty_grid_charset {#output_format_pretty_grid_charset} + +タイプ: String + +デフォルト値: UTF-8 + +グリッドã®æž ç·šã‚’å°åˆ·ã™ã‚‹ãŸã‚ã®æ–‡å­—セットã§ã™ã€‚利用å¯èƒ½ãªæ–‡å­—セット: ASCII, UTF-8 (デフォルト)。 + +## output_format_pretty_highlight_digit_groups {#output_format_pretty_highlight_digit_groups} + +タイプ: Bool + +デフォルト値: 1 + +ã‚‚ã—有効ã§ã‚ã‚Šã€å‡ºåŠ›ãŒç«¯æœ«ã®å ´åˆã€åƒã€ç™¾ä¸‡ãªã©ã®æ¡ã«å¯¾å¿œã™ã‚‹æ¡ã‚’下線ã§ãƒã‚¤ãƒ©ã‚¤ãƒˆã—ã¾ã™ã€‚ + +## output_format_pretty_max_column_pad_width {#output_format_pretty_max_column_pad_width} + +タイプ: UInt64 + +デフォルト値: 250 + +Prettyå½¢å¼ã§ã‚«ãƒ©ãƒ å†…ã®ã™ã¹ã¦ã®å€¤ã‚’パディングã™ã‚‹æœ€å¤§å¹…。 + +## output_format_pretty_max_rows {#output_format_pretty_max_rows} + +タイプ: UInt64 + +デフォルト値: 10000 + +Prettyå½¢å¼ã®è¡Œæ•°åˆ¶é™ã€‚ + +## output_format_pretty_max_value_width {#output_format_pretty_max_value_width} + +タイプ: UInt64 + +デフォルト値: 10000 + +Prettyå½¢å¼ã§è¡¨ç¤ºã™ã‚‹å€¤ã®æœ€å¤§å¹…。ã“れを超ãˆã‚‹ã¨åˆ‡ã‚Šå–られる。 + +## output_format_pretty_max_value_width_apply_for_single_value {#output_format_pretty_max_value_width_apply_for_single_value} + +タイプ: UInt64 + +デフォルト値: 0 + +値を切りå–ã‚‹ã®ã¯å˜ä¸€ã®å€¤ãŒãƒ–ロックã«ãªã„å ´åˆã®ã¿ã«åˆ¶é™ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€å®Œå…¨ã«å‡ºåŠ›ã—ã¾ã™ã€‚ã“れ㯠`SHOW CREATE TABLE` クエリã«æœ‰ç”¨ã§ã™ã€‚ + +## output_format_pretty_row_numbers {#output_format_pretty_row_numbers} + +タイプ: Bool + +デフォルト値: 1 + +Pretty出力形å¼ã®ãŸã‚ã«å„è¡Œã®å‰ã«è¡Œç•ªå·ã‚’追加。 + +## output_format_pretty_single_large_number_tip_threshold {#output_format_pretty_single_large_number_tip_threshold} + +タイプ: UInt64 + +デフォルト値: 1000000 + +ブロックãŒå”¯ä¸€ã®å¤§ããªæ•°ã‚’å«ã‚€å ´åˆã€ãã®æ•°ãŒã“ã®å€¤ï¼ˆ0を除ã)を超ãˆã‚‹å ´åˆã¯ãƒ†ãƒ¼ãƒ–ルã®å³å´ã«èª­ã¿ã‚„ã™ã„数を表示。 + +## output_format_protobuf_nullables_with_google_wrappers {#output_format_protobuf_nullables_with_google_wrappers} + +タイプ: Bool + +デフォルト値: 0 + +Googleラッパーを使用ã—ã¦Nullableカラムをシリアライズã™ã‚‹éš›ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’空ã®ãƒ©ãƒƒãƒ‘ーã¨ã—ã¦ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã—ã¾ã™ã€‚無効ã«ã™ã‚‹ã¨ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¨null値ã¯ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œã¾ã›ã‚“。 + +## output_format_schema {#output_format_schema} + +タイプ: String + +デフォルト値: + +自動生æˆã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã‚’ [Cap’n Proto](../../interfaces/formats.md#capnproto-capnproto) ã¾ãŸã¯ [Protobuf](../../interfaces/formats.md#protobuf-protobuf) å½¢å¼ã§ä¿å­˜ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。 + +## output_format_sql_insert_include_column_names {#output_format_sql_insert_include_column_names} + +タイプ: Bool + +デフォルト値: 1 + +INSERTクエリ内ã«ã‚«ãƒ©ãƒ åã‚’å«ã‚ã‚‹ + +## output_format_sql_insert_max_batch_size {#output_format_sql_insert_max_batch_size} + +タイプ: UInt64 + +デフォルト値: 65409 + +1ã¤ã®INSERTæ–‡ã§ã®è¡Œæ•°ã®æœ€å¤§æ•°ã€‚ + +## output_format_sql_insert_quote_names {#output_format_sql_insert_quote_names} + +タイプ: Bool + +デフォルト値: 1 + +カラムåã‚’ '`' 文字ã§ã‚¯ã‚©ãƒ¼ãƒˆ + +## output_format_sql_insert_table_name {#output_format_sql_insert_table_name} + +タイプ: String + +デフォルト値: table + +出力INSERTクエリ内ã®ãƒ†ãƒ¼ãƒ–ルå + +## output_format_sql_insert_use_replace {#output_format_sql_insert_use_replace} + +タイプ: Bool + +デフォルト値: 0 + +INSERTã®ä»£ã‚ã‚Šã«REPLACE文を使用 + +## output_format_tsv_crlf_end_of_line {#output_format_tsv_crlf_end_of_line} + +タイプ: Bool + +デフォルト値: 0 + +真ã«è¨­å®šã™ã‚‹ã¨ã€TSVå½¢å¼ã§è¡Œã®çµ‚端ãŒ\\r\\nã«ãªã‚Šã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°\\nã§ã™ã€‚ + +## output_format_values_escape_quote_with_quote {#output_format_values_escape_quote_with_quote} + +タイプ: Bool + +デフォルト値: 0 + +真ãªã‚‰'ã‚’''ã§ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã—ã€ãã†ã§ãªã‘ã‚Œã°\\'ã§ã‚¯ã‚©ãƒ¼ãƒˆ + +## output_format_write_statistics {#output_format_write_statistics} + +タイプ: Bool + +デフォルト値: 1 + +読ã¿å–ã£ãŸè¡Œã€ãƒã‚¤ãƒˆã€çµŒéŽæ™‚é–“ã«é–¢ã™ã‚‹çµ±è¨ˆã‚’é©åˆ‡ãªå‡ºåŠ›å½¢å¼ã§æ›¸ãè¾¼ã¿ã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ + +## precise_float_parsing {#precise_float_parsing} + +タイプ: Bool + +デフォルト値: 0 + +より正確(ã—ã‹ã—é…ã„)浮動å°æ•°ç‚¹æ•°ã®è§£æžã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’優先 + +## regexp_dict_allow_hyperscan {#regexp_dict_allow_hyperscan} + +タイプ: Bool + +デフォルト値: 1 + +Hyperscanライブラリを使用ã—ãŸregexp_treeDictionaryを許å¯ã™ã‚‹ã€‚ + +## regexp_dict_flag_case_insensitive {#regexp_dict_flag_case_insensitive} + +タイプ: Bool + +デフォルト値: 0 + +regexp_tree Dictionaryã«å¯¾ã—ã¦å¤§æ–‡å­—å°æ–‡å­—を区別ã—ãªã„マッãƒãƒ³ã‚°ã‚’使用ã™ã‚‹ã€‚個々ã®è¡¨ç¾ã§(?i)ã¨(?-i)ã§ä¸Šæ›¸ãå¯èƒ½ã€‚ + +## regexp_dict_flag_dotall {#regexp_dict_flag_dotall} + +タイプ: Bool + +デフォルト値: 0 + +regexp_tree Dictionaryã«å¯¾ã—ã¦'.'ãŒæ”¹è¡Œæ–‡å­—ã«ãƒžãƒƒãƒã™ã‚‹ã“ã¨ã‚’許å¯ã€‚ + +## rows_before_aggregation {#rows_before_aggregation} + +タイプ: Bool + +デフォルト値: 0 + +有効ã«ã™ã‚‹ã¨ã€ClickHouseã¯é›†è¨ˆå‰ã«èª­ã¿å–ã£ãŸè¡Œæ•°ã‚’表ã™`rows_before_aggregation`統計ã®æ­£ç¢ºãªå€¤ã‚’æä¾›ã—ã¾ã™ã€‚ + +## schema_inference_hints {#schema_inference_hints} + +タイプ: String + +デフォルト値: + +スキーマãªã—ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¯¾ã—ã¦ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ãƒ’ントã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã‚«ãƒ©ãƒ åã¨ã‚¿ã‚¤ãƒ—ã®ãƒªã‚¹ãƒˆã€‚ + +例: + +クエリ: +```sql +desc format(JSONEachRow, '{"x" : 1, "y" : "String", "z" : "0.0.0.0" }') settings schema_inference_hints='x UInt8, z IPv4'; +``` + +çµæžœ: +```sql +x UInt8 +y Nullable(String) +z IPv4 +``` + +:::note +`schema_inference_hints` ãŒæ­£ã—ãフォーマットã•ã‚Œã¦ã„ãªã„å ´åˆã€ã¾ãŸã¯ã‚¿ã‚¤ãƒ—ミスや誤ã£ãŸãƒ‡ãƒ¼ã‚¿åž‹ãŒã‚ã‚‹å ´åˆã€å…¨ä½“ã®`s**chema_inference_hints**` ãŒç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +::: + +## schema_inference_make_columns_nullable {#schema_inference_make_columns_nullable} + +タイプ: UInt64Auto + +デフォルト値: 1 + +スキーマ推論ã§æŽ¨è«–ã•ã‚ŒãŸåž‹ã‚’ `Nullable` ã«ã™ã‚‹ã“ã¨ã‚’制御ã—ã¾ã™ã€‚設定ãŒæœ‰åŠ¹ãªå ´åˆã€ã™ã¹ã¦ã®æŽ¨è«–ã•ã‚ŒãŸåž‹ã¯ `Nullable` ã«ãªã‚Šã€ç„¡åŠ¹ã®å ´åˆã€æŽ¨è«–ã•ã‚ŒãŸåž‹ã¯æ±ºã—㦠`Nullable` ã§ã¯ãªã〠`auto` ã«è¨­å®šã•ã‚Œã‚‹ã¨ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–中ã«è§£æžã•ã‚ŒãŸã‚µãƒ³ãƒ—ルã§ã‚«ãƒ©ãƒ ã« `NULL` ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã¾ãŸã¯ãƒ•ã‚¡ã‚¤ãƒ«ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ã‚«ãƒ©ãƒ ã®ãƒŒãƒ«å¯èƒ½æ€§ã«é–¢ã™ã‚‹æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã«ã®ã¿ã€æŽ¨è«–ã•ã‚ŒãŸåž‹ã¯`Nullable` ã«ãªã‚Šã¾ã™ã€‚ + +## schema_inference_mode {#schema_inference_mode} + +タイプ: SchemaInferenceMode + +デフォルト値: default + +スキーマ推論ã®ãƒ¢ãƒ¼ãƒ‰ã€‚ 'default' - ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒåŒã˜ã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã£ã¦ã„ã‚‹ã¨ä»®å®šã—ã€ã©ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã‚‚スキーマを推論ã§ãã‚‹ã“ã¨ã‚’仮定ã™ã‚‹ã€ 'union' - ファイルã®ã‚¹ã‚­ãƒ¼ãƒžã¯ç•°ãªã£ã¦ã‚‚良ãã€çµæžœã¨ã—ã¦å¾—られるスキーマã¯ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚¹ã‚­ãƒ¼ãƒžã®é›†åˆã§ãªã‘ã‚Œã°ãªã‚‰ãªã„ + +## show_create_query_identifier_quoting_rule {#show_create_query_identifier_quoting_rule} + +タイプ: IdentifierQuotingRule + +デフォルト値: when_necessary + +SHOW CREATEクエリã«ãŠã‘る識別å­ã®ã‚¯ã‚©ãƒ¼ãƒˆãƒ«ãƒ¼ãƒ«ã‚’設定 + +## show_create_query_identifier_quoting_style {#show_create_query_identifier_quoting_style} + +タイプ: IdentifierQuotingStyle + +デフォルト値: Backticks + +SHOW CREATEクエリã«ãŠã‘る識別å­ã®ã‚¯ã‚©ãƒ¼ãƒˆã‚¹ã‚¿ã‚¤ãƒ«ã‚’設定 + +## type_json_skip_duplicated_paths {#type_json_skip_duplicated_paths} + +タイプ: Bool + +デフォルト値: 0 + +有効ã«ã™ã‚‹ã¨ã€JSONオブジェクトをJSONåž‹ã«è§£æžã™ã‚‹éš›ã«é‡è¤‡ã—ãŸãƒ‘スãŒç„¡è¦–ã•ã‚Œã€ä¾‹å¤–ã®ä»£ã‚ã‚Šã«æœ€åˆã®ã‚‚ã®ã®ã¿ãŒæŒ¿å…¥ã•ã‚Œã¾ã™ + +## validate_experimental_and_suspicious_types_inside_nested_types {#validate_experimental_and_suspicious_types_inside_nested_types} + +タイプ: Bool + +デフォルト値: 1 + +Array/Map/Tupleã®ã‚ˆã†ãªãƒã‚¹ãƒˆã•ã‚ŒãŸåž‹ã®å†…部ã§ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãŠã‚ˆã³æ€ªã—ã„åž‹ã®ä½¿ç”¨ã‚’検証ã™ã‚‹ diff --git a/docs/ja/operations/settings/settings-profiles.md b/docs/ja/operations/settings/settings-profiles.md new file mode 100644 index 00000000000..e373b6e40b9 --- /dev/null +++ b/docs/ja/operations/settings/settings-profiles.md @@ -0,0 +1,81 @@ +--- +slug: /ja/operations/settings/settings-profiles +sidebar_position: 61 +sidebar_label: 設定プロファイル +--- + +# 設定プロファイル + +設定プロファイルã¯ã€åŒã˜åå‰ã§ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚ŒãŸè¨­å®šã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ã€‚ + +:::note +ClickHouseã¯ã€è¨­å®šãƒ—ロファイルを管ç†ã™ã‚‹ãŸã‚ã®[SQL駆動ã®ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼](../../guides/sre/user-management/index.md#access-control)もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã®ä½¿ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ +::: + +プロファイルã«ã¯ä»»æ„ã®åå‰ã‚’付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ç•°ãªã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«åŒã˜ãƒ—ロファイルを指定ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚設定プロファイルã§æœ€ã‚‚é‡è¦ãªã“ã¨ã¯ã€`readonly=1`ã¨è¨˜è¿°ã—ã¦èª­ã¿å–り専用アクセスを確ä¿ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +設定プロファイルã¯äº’ã„ã«ç¶™æ‰¿ã§ãã¾ã™ã€‚継承を使用ã™ã‚‹ã«ã¯ã€ãƒ—ロファイル内ã«ãƒªã‚¹ãƒˆã•ã‚ŒãŸä»–ã®è¨­å®šã®å‰ã«ã€1ã¤ã¾ãŸã¯è¤‡æ•°ã®`profile`設定を示ã—ã¾ã™ã€‚åŒã˜è¨­å®šãŒç•°ãªã‚‹ãƒ—ロファイルã§å®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã€æœ€å¾Œã«å®šç¾©ã•ã‚ŒãŸã‚‚ã®ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +プロファイル内ã®ã™ã¹ã¦ã®è¨­å®šã‚’é©ç”¨ã™ã‚‹ã«ã¯ã€`profile`設定をセットã—ã¾ã™ã€‚ + +例: + +`web`プロファイルをインストールã—ã¾ã™ã€‚ + +``` sql +SET profile = 'web' +``` + +設定プロファイルã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§å®£è¨€ã•ã‚Œã¾ã™ã€‚通常ã€ã“ã‚Œã¯`users.xml`ã§ã™ã€‚ + +例: + +``` xml + + + + + + 8 + + + + + 1000000000 + 100000000000 + + 1000000 + any + + 1000000 + 1000000000 + + 100000 + 100000000 + break + + 600 + 1000000 + 15 + + 25 + 100 + 50 + + 2 + 25 + 50 + 100 + + 4 + + 1 + + +``` + +ã“ã®ä¾‹ã§ã¯ã€2ã¤ã®ãƒ—ロファイル: `default`ã¨`web`を指定ã—ã¦ã„ã¾ã™ã€‚ + +`default`プロファイルã«ã¯ç‰¹åˆ¥ãªç›®çš„ãŒã‚ã‚Šã¾ã™ã€‚ãã‚Œã¯ã€å¸¸ã«å­˜åœ¨ã—ã€ã‚µãƒ¼ãƒãƒ¼ã®é–‹å§‹æ™‚ã«é©ç”¨ã•ã‚Œã‚‹ã“ã¨ã§ã™ã€‚言ã„æ›ãˆã‚Œã°ã€`default`プロファイルã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®è¨­å®šãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +`web`プロファイルã¯ã€`SET`クエリを使用ã™ã‚‹ã‹ã€HTTPクエリã«URLパラメータを使用ã—ã¦è¨­å®šã§ãる通常ã®ãƒ—ロファイルã§ã™ã€‚ diff --git a/docs/ja/operations/settings/settings-query-level.md b/docs/ja/operations/settings/settings-query-level.md new file mode 100644 index 00000000000..055a6d586d3 --- /dev/null +++ b/docs/ja/operations/settings/settings-query-level.md @@ -0,0 +1,208 @@ +--- +sidebar_label: クエリレベルã®è¨­å®š +title: クエリレベルã®è¨­å®š +slug: /ja/operations/settings/query-level +--- + +ClickHouseã®ã‚¯ã‚¨ãƒªãƒ¬ãƒ™ãƒ«è¨­å®šã‚’設定ã™ã‚‹æ–¹æ³•ã¯ã„ãã¤ã‹ã‚ã‚Šã¾ã™ã€‚設定ã¯ãƒ¬ã‚¤ãƒ¤ãƒ¼ã¨ã—ã¦æ§‹æˆã•ã‚Œã€å¾Œã®ãƒ¬ã‚¤ãƒ¤ãƒ¼ã¯å‰ã®è¨­å®šå€¤ã‚’å†å®šç¾©ã—ã¾ã™ã€‚ + +設定を定義ã™ã‚‹éš›ã®å„ªå…ˆé †ä½ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +1. ユーザーã«ç›´æŽ¥ã€ã¾ãŸã¯è¨­å®šãƒ—ロファイル内ã§è¨­å®šã‚’é©ç”¨ã™ã‚‹ + + - SQL(推奨) + - 一ã¤ã¾ãŸã¯è¤‡æ•°ã®XMLã¾ãŸã¯YAMLファイルを`/etc/clickhouse-server/users.d`ã«è¿½åŠ ã™ã‚‹ + +2. セッション設定 + + - ClickHouse Cloud SQLコンソールã¾ãŸã¯ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã®`clickhouse client`ã‹ã‚‰`SET setting=value`ã‚’é€ä¿¡ã™ã‚‹ã€‚åŒæ§˜ã«ã€HTTPプロトコルã§ClickHouseセッションを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“れを行ã†ã«ã¯ã€`session_id` HTTPパラメータを指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +3. クエリ設定 + + - éžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã§`clickhouse client`ã‚’èµ·å‹•ã™ã‚‹éš›ã«ã€ã‚¹ã‚¿ãƒ¼ãƒˆãƒ‘ラメータ`--setting=value`を設定ã™ã‚‹ã€‚ + - HTTP APIを使用ã™ã‚‹å ´åˆã€CGIパラメータを渡ã™ï¼ˆ`URL?setting_1=value&setting_2=value...`)。 + - SELECTクエリã®[SETTINGS](../../sql-reference/statements/select/index.md#settings-in-select-query)å¥ã§è¨­å®šã‚’定義ã™ã‚‹ã€‚設定値ã¯ãã®ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ã®ã¿é©ç”¨ã•ã‚Œã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œå¾Œã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¾ãŸã¯å‰ã®å€¤ã«ãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +## 例 + +ã“れらã®ä¾‹ã§ã¯ã™ã¹ã¦ã€`async_insert`設定ã®å€¤ã‚’`1`ã«è¨­å®šã—ã€å®Ÿè¡Œä¸­ã®ã‚·ã‚¹ãƒ†ãƒ ã§ã®è¨­å®šã®ç¢ºèªæ–¹æ³•ã‚’示ã—ã¾ã™ã€‚ + +### SQLを使用ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ç›´æŽ¥è¨­å®šã‚’é©ç”¨ã™ã‚‹ + +ã“ã‚Œã¯ã€è¨­å®š`async_inset = 1`ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼`ingester`を作æˆã—ã¾ã™ï¼š + +```sql +CREATE USER ingester +IDENTIFIED WITH sha256_hash BY '7e099f39b84ea79559b3e85ea046804e63725fd1f46b37f281276aae20f86dc3' +# highlight-next-line +SETTINGS async_insert = 1 +``` + +#### 設定プロファイルã¨å‰²ã‚Šå½“ã¦ã‚’ç¢ºèª + +```sql +SHOW ACCESS +``` + +```response +┌─ACCESS─────────────────────────────────────────────────────────────────────────────┠+│ ... │ +# highlight-next-line +│ CREATE USER ingester IDENTIFIED WITH sha256_password SETTINGS async_insert = true │ +│ ... │ +└────────────────────────────────────────────────────────────────────────────────────┘ +``` +### SQLを使用ã—ã¦è¨­å®šãƒ—ロファイルを作æˆã—ユーザーã«å‰²ã‚Šå½“ã¦ã‚‹ + +ã“ã‚Œã¯ã€è¨­å®š`async_inset = 1`ã‚’æŒã¤ãƒ—ロファイル`log_ingest`を作æˆã—ã¾ã™ï¼š + +```sql +CREATE +SETTINGS PROFILE log_ingest SETTINGS async_insert = 1 +``` + +ã“ã‚Œã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼`ingester`を作æˆã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¨­å®šãƒ—ロファイル`log_ingest`を割り当ã¦ã¾ã™ï¼š + +```sql +CREATE USER ingester +IDENTIFIED WITH sha256_hash BY '7e099f39b84ea79559b3e85ea046804e63725fd1f46b37f281276aae20f86dc3' +# highlight-next-line +SETTINGS PROFILE log_ingest +``` + + +### XMLを使用ã—ã¦è¨­å®šãƒ—ロファイルã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã™ã‚‹ + +```xml title=/etc/clickhouse-server/users.d/users.xml + +# highlight-start + + + 1 + + +# highlight-end + + + + 7e099f39b84ea79559b3e85ea046804e63725fd1f46b37f281276aae20f86dc3 +# highlight-start + log_ingest +# highlight-end + + + 7e099f39b84ea79559b3e85ea046804e63725fd1f46b37f281276aae20f86dc3 + 1 + 1 + + + +``` + +#### 設定プロファイルã¨å‰²ã‚Šå½“ã¦ã‚’ç¢ºèª + +```sql +SHOW ACCESS +``` + +```response +┌─ACCESS─────────────────────────────────────────────────────────────────────────────┠+│ CREATE USER default IDENTIFIED WITH sha256_password │ +# highlight-next-line +│ CREATE USER ingester IDENTIFIED WITH sha256_password SETTINGS PROFILE log_ingest │ +│ CREATE SETTINGS PROFILE default │ +# highlight-next-line +│ CREATE SETTINGS PROFILE log_ingest SETTINGS async_insert = true │ +│ CREATE SETTINGS PROFILE readonly SETTINGS readonly = 1 │ +│ ... │ +└────────────────────────────────────────────────────────────────────────────────────┘ +``` + +### セッションã«è¨­å®šã‚’割り当ã¦ã‚‹ + +```sql +SET async_insert = 1; +SELECT value FROM system.settings where name='async_insert'; +``` + +```response +┌─value──┠+│ 1 │ +└────────┘ +``` + +### クエリ中ã«è¨­å®šã‚’割り当ã¦ã‚‹ + +```sql +INSERT INTO YourTable +# highlight-next-line +SETTINGS async_insert=1 +VALUES (...) +``` + +## 設定をデフォルト値ã«æˆ»ã™ + +設定を変更ã—ã€ãれをデフォルト値ã«æˆ»ã—ãŸã„å ´åˆã€å€¤ã‚’`DEFAULT`ã«è¨­å®šã—ã¾ã™ã€‚ãã®æ§‹æ–‡ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```sql +SET setting_name = DEFAULT +``` + +例ãˆã°ã€`async_insert`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯`0`ã§ã™ã€‚値を`1`ã«å¤‰æ›´ã—ãŸã¨ã—ã¾ã™ï¼š + +```sql +SET async_insert = 1; + +SELECT value FROM system.settings where name='async_insert'; +``` + +レスãƒãƒ³ã‚¹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```response +┌─value──┠+│ 1 │ +└────────┘ +``` + +次ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãã®å€¤ã‚’0ã«æˆ»ã—ã¾ã™ï¼š + +```sql +SET async_insert = DEFAULT; + +SELECT value FROM system.settings where name='async_insert'; +``` + +設定ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã«æˆ»ã‚Šã¾ã—ãŸï¼š + +```response +┌─value───┠+│ 0 │ +└─────────┘ +``` + +## カスタム設定 {#custom_settings} + +共通ã®[設定](../../operations/settings/settings.md)ã«åŠ ãˆã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚«ã‚¹ã‚¿ãƒ è¨­å®šã‚’定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +カスタム設定åã¯ã€æŒ‡å®šã•ã‚ŒãŸãƒ—レフィックスã®ã„ãšã‚Œã‹ã§å§‹ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®ãƒ—レフィックスã®ãƒªã‚¹ãƒˆã¯ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®[custom_settings_prefixes](../../operations/server-configuration-parameters/settings.md#custom_settings_prefixes)パラメータã§å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```xml +custom_ +``` + +カスタム設定を定義ã™ã‚‹ã«ã¯`SET`コマンドを使用ã—ã¾ã™ï¼š + +```sql +SET custom_a = 123; +``` + +カスタム設定ã®ç¾åœ¨ã®å€¤ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€`getSetting()`関数を使用ã—ã¾ã™ï¼š + +```sql +SELECT getSetting('custom_a'); +``` + +**関連情報** + +- ClickHouse設定ã®èª¬æ˜Žã«ã¤ã„ã¦ã¯ã€[設定](./settings.md)ページをå‚ç…§ã—ã¦ãã ã•ã„。 +- [グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®š](../../operations/server-configuration-parameters/settings.md) diff --git a/docs/ja/operations/settings/settings-users.md b/docs/ja/operations/settings/settings-users.md new file mode 100644 index 00000000000..8e91286cfa1 --- /dev/null +++ b/docs/ja/operations/settings/settings-users.md @@ -0,0 +1,250 @@ +--- +slug: /ja/operations/settings/settings-users +sidebar_position: 63 +sidebar_label: ユーザー設定 +--- + +# ユーザーã¨ãƒ­ãƒ¼ãƒ«ã®è¨­å®š + +`users.xml` ã® `users` セクションã«ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +:::note +ClickHouseã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ç®¡ç†ã®ãŸã‚ã®[SQL駆動ã®ãƒ¯ãƒ¼ã‚¯ãƒ•ãƒ­ãƒ¼](../../guides/sre/user-management/index.md#access-control)もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚利用をãŠå‹§ã‚ã—ã¾ã™ã€‚ +::: + +`users` セクションã®æ§‹é€ : + +``` xml + + + + + + + + + + ssh-ed25519 + AAAAC3NzaC1lZDI1NTE5AAAAIDNf0r6vRl24Ix3tv2IgPmNPO2ATa2krvt80DdcTatLj + + + ecdsa-sha2-nistp256 + AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNxeV2uN5UY6CUbCzTA1rXfYimKQA5ivNIqxdax4bcMXz4D0nSk2l5E1TkR5mG8EBWtmExSPbcEPJ8V7lyWWbA8= + + + ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCpgqL1SHhPVBOTFlOm0pu+cYBbADzC2jL41sPMawYCJHDyHuq7t+htaVVh2fRgpAPmSEnLEC2d4BEIKMtPK3bfR8plJqVXlLt6Q8t4b1oUlnjb3VPA9P6iGcW7CV1FBkZQEVx8ckOfJ3F+kI5VsrRlEDgiecm/C1VPl0/9M2llW/mPUMaD65cM9nlZgM/hUeBrfxOEqM11gDYxEZm1aRSbZoY4dfdm3vzvpSQ6lrCrkjn3X2aSmaCLcOWJhfBWMovNDB8uiPuw54g3ioZ++qEQMlfxVsqXDGYhXCrsArOVuW/5RbReO79BvXqdssiYShfwo+GhQ0+aLWMIW/jgBkkqx/n7uKLzCMX7b2F+aebRYFh+/QXEj7SnihdVfr9ud6NN3MWzZ1ltfIczlEcFLrLJ1Yq57wW6wXtviWh59WvTWFiPejGjeSjjJyqqB49tKdFVFuBnIU5u/bch2DXVgiAEdQwUrIp1ACoYPq22HFFAYUJrL32y7RxX3PGzuAv3LOc= + + + + 0|1 + + + + + profile_name + + default + default + + + + expression + + + + + + GRANT SELECT ON system.* + + + + +``` + +### user_name/password {#user-namepassword} + +パスワードã¯ãƒ—レーンテキストã¾ãŸã¯SHA256(16進形å¼ï¼‰ã§æŒ‡å®šã§ãã¾ã™ã€‚ + +- プレーンテキストã§ãƒ‘スワードを割り当ã¦ã‚‹ã«ã¯ï¼ˆ**éžæŽ¨å¥¨**)ã€`password` è¦ç´ ã«ç½®ãã¾ã™ã€‚ + + 例: `qwerty`。パスワードã¯ç©ºç™½ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + + +- SHA256ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦ãƒ‘スワードを割り当ã¦ã‚‹ã«ã¯ã€`password_sha256_hex` è¦ç´ ã«ç½®ãã¾ã™ã€‚ + + 例: `65e84be33532fb784c48129675f9eff3a682b27168c0ea744b2cf58ee02337c5`。 + + シェルã‹ã‚‰ãƒ‘スワードを生æˆã™ã‚‹ä¾‹: + + PASSWORD=$(base64 < /dev/urandom | head -c8); echo "$PASSWORD"; echo -n "$PASSWORD" | sha256sum | tr -d '-' + + çµæžœã®æœ€åˆã®è¡ŒãŒãƒ‘スワードã§ã™ã€‚第2è¡Œã¯å¯¾å¿œã™ã‚‹SHA256ãƒãƒƒã‚·ãƒ¥ã§ã™ã€‚ + + + +- MySQLクライアントã¨ã®äº’æ›æ€§ã®ãŸã‚ã«ã€ãƒ‘スワードã¯ãƒ€ãƒ–ルSHA1ãƒãƒƒã‚·ãƒ¥ã§ã‚‚指定ã§ãã¾ã™ã€‚`password_double_sha1_hex` è¦ç´ ã«ç½®ãã¾ã™ã€‚ + + 例: `08b4a0f1de6ad37da17359e592c8d74788a83eb0`。 + + シェルã‹ã‚‰ãƒ‘スワードを生æˆã™ã‚‹ä¾‹: + + PASSWORD=$(base64 < /dev/urandom | head -c8); echo "$PASSWORD"; echo -n "$PASSWORD" | sha1sum | tr -d '-' | xxd -r -p | sha1sum | tr -d '-' + + çµæžœã®æœ€åˆã®è¡ŒãŒãƒ‘スワードã§ã™ã€‚第2è¡Œã¯å¯¾å¿œã™ã‚‹ãƒ€ãƒ–ルSHA1ãƒãƒƒã‚·ãƒ¥ã§ã™ã€‚ + +### username/ssh-key {#user-sshkey} + +ã“ã®è¨­å®šã¯SSHキーã«ã‚ˆã‚‹èªè¨¼ã‚’許å¯ã—ã¾ã™ã€‚ + +例ãˆã°ã€`ssh-keygen` ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸSSHéµãŒæ¬¡ã®ã‚ˆã†ãªå½¢å¼ã®å ´åˆ +``` +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDNf0r6vRl24Ix3tv2IgPmNPO2ATa2krvt80DdcTatLj john@example.com +``` +`ssh_key` è¦ç´ ã¯æ¬¡ã®ã‚ˆã†ã«æŒ‡å®šã—ã¾ã™ +``` + + ssh-ed25519 + AAAAC3NzaC1lZDI1NTE5AAAAIDNf0r6vRl24Ix3tv2IgPmNPO2ATa2krvt80DdcTatLj + +``` + +ä»–ã®ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るアルゴリズムã«å¯¾ã—ã¦ã¯ã€`ssh-ed25519` ã‚’ `ssh-rsa` ã‚„ `ecdsa-sha2-nistp256` ã«ç½®ãæ›ãˆã¦ãã ã•ã„。 + +### access_management {#access_management-user-setting} + +ã“ã®è¨­å®šã¯ã€SQL駆動ã®[アクセス制御ã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆç®¡ç†](../../guides/sre/user-management/index.md#access-control)ã®ä½¿ç”¨ã‚’ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦æœ‰åŠ¹ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +デフォルト値: 0。 + +### grants {#grants-user-setting} + +ã“ã®è¨­å®šã¯ã€é¸æŠžã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ä»»æ„ã®æ¨©é™ã‚’付与ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ +リストã®å„è¦ç´ ã¯ã€è¢«æŽˆä¸Žè€…を指定ã—ãªã„ `GRANT` クエリã§ã‚ã‚‹ã¹ãã§ã™ã€‚ + +例: + +```xml + + + GRANT SHOW ON *.* + GRANT CREATE ON *.* WITH GRANT OPTION + GRANT SELECT ON system.* + + +``` + +ã“ã®è¨­å®šã¯ã€`dictionaries`ã€`access_management`ã€`named_collection_control`ã€`show_named_collections_secrets` +ãŠã‚ˆã³ `allow_databases` 設定ã¨åŒæ™‚ã«æŒ‡å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +### user_name/networks {#user-namenetworks} + +ユーザーãŒClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã§ãã‚‹ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®ãƒªã‚¹ãƒˆã§ã™ã€‚ + +リストã®å„è¦ç´ ã¯æ¬¡ã®å½¢å¼ã®ã„ãšã‚Œã‹ã«ãªã‚Šã¾ã™: + +- `` — IPアドレスã¾ãŸã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒžã‚¹ã‚¯ã€‚ + + 例: `213.180.204.3`, `10.0.0.1/8`, `10.0.0.1/255.255.255.0`, `2a02:6b8::3`, `2a02:6b8::3/64`, `2a02:6b8::3/ffff:ffff:ffff:ffff::`。 + +- `` — ホストå。 + + 例: `example01.host.ru`。 + + アクセスを確èªã™ã‚‹ãŸã‚ã«ã€DNSクエリãŒå®Ÿè¡Œã•ã‚Œã€å¸°ã£ã¦ããŸã™ã¹ã¦ã®IPアドレスãŒãƒ”アアドレスã¨æ¯”較ã•ã‚Œã¾ã™ã€‚ + +- `` — ホストåã®æ­£è¦è¡¨ç¾ã€‚ + + 例ã€`^example\d\d-\d\d-\d\.host\.ru$` + + アクセスを確èªã™ã‚‹ãŸã‚ã«ã€[DNS PTRクエリ](https://en.wikipedia.org/wiki/Reverse_DNS_lookup)ãŒãƒ”アアドレスã«å¯¾ã—ã¦è¡Œã‚ã‚Œã€æŒ‡å®šã•ã‚ŒãŸæ­£è¦è¡¨ç¾ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ãã®å¾Œã€PTRクエリã®çµæžœã«å¯¾ã—ã¦ã‚‚ã†ä¸€ã¤ã®DNSクエリãŒè¡Œã‚ã‚Œã€å¾—られãŸã™ã¹ã¦ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ãŒãƒ”アアドレスã¨æ¯”較ã•ã‚Œã¾ã™ã€‚æ­£è¦è¡¨ç¾ãŒ $ ã§çµ‚ã‚ã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚ + +ã™ã¹ã¦ã®DNSリクエストã®çµæžœã¯ã‚µãƒ¼ãƒãƒ¼ãŒå†èµ·å‹•ã•ã‚Œã‚‹ã¾ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ + +**例** + +ä»»æ„ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‹ã‚‰ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚¯ã‚»ã‚¹ã‚’開放ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«æŒ‡å®šã—ã¾ã™: + +``` xml +::/0 +``` + +:::note +é©åˆ‡ã«æ§‹æˆã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ã‚¢ã‚¦ã‚©ãƒ¼ãƒ«ã‚’æŒã£ã¦ã„ã‚‹ã‹ã€ã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ãŒã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã«ç›´æŽ¥æŽ¥ç¶šã•ã‚Œã¦ã„ãªã„é™ã‚Šã€ä»»æ„ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‹ã‚‰ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã™ã‚‹ã®ã¯å®‰å…¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +localhostã®ã¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«æŒ‡å®šã—ã¾ã™: + +``` xml +::1 +127.0.0.1 +``` + +### user_name/profile {#user-nameprofile} + +ユーザーã«è¨­å®šãƒ—ロファイルを割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚設定プロファイル㯠`users.xml` ファイルã®åˆ¥ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§è¨­å®šã•ã‚Œã¾ã™ã€‚詳ã—ã㯠[設定ã®ãƒ—ロファイル](../../operations/settings/settings-profiles.md) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### user_name/quota {#user-namequota} + +クォータã«ã‚ˆã‚Šã€ä¸€å®šæœŸé–“内ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒªã‚½ãƒ¼ã‚¹ã®ä½¿ç”¨ã‚’追跡ã¾ãŸã¯åˆ¶é™ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚クォータ㯠`users.xml` ã® `quotas` セクションã§è¨­å®šã•ã‚Œã¾ã™ã€‚ + +ユーザーã«ã‚¯ã‚©ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚クォータ構æˆã®è©³ç´°ã«ã¤ã„ã¦ã¯ [クォータ](../../operations/quotas.md#quotas) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### user_name/databases {#user-namedatabases} + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ `SELECT` クエリを通ã˜ã¦ClickHouseã‹ã‚‰è¿”ã•ã‚Œã‚‹è¡Œã‚’制é™ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚基本的ãªè¡Œãƒ¬ãƒ™ãƒ«ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’実装ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**例** + +次ã®è¨­å®šã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ `user1` ㌠`table1` ã® `SELECT` クエリçµæžœã¨ã—ã¦ã€`id` フィールドã®å€¤ãŒ1000ã§ã‚ã‚‹è¡Œã®ã¿ã‚’見るã“ã¨ãŒã§ãã‚‹ã“ã¨ã‚’強制ã—ã¾ã™ã€‚ + +``` xml + + + + + id = 1000 + + + + +``` + +`filter` 㯠[UInt8](../../sql-reference/data-types/int-uint.md) åž‹ã®å€¤ã‚’æŒã¤ä»»æ„ã®å¼ã§ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚通常ã€æ¯”較ãŠã‚ˆã³è«–ç†æ¼”ç®—å­ã‚’å«ã¿ã¾ã™ã€‚`database_name.table1` ã®è¡Œã§ `filter` ãŒ0ã«ãªã‚‹ã‚‚ã®ã¯ã€ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯è¿”ã•ã‚Œã¾ã›ã‚“。フィルタリング㯠`PREWHERE` æ“作ã¨ã¯äº’æ›æ€§ãŒãªãã€`WHERE→PREWHERE` 最é©åŒ–を無効ã«ã—ã¾ã™ã€‚ + +## ロール + +`user.xml` ã® `roles` セクションを使用ã—ã¦ã€ä»»æ„ã®äº‹å‰å®šç¾©ã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`roles` セクションã®æ§‹é€ : + +```xml + + + + GRANT SHOW ON *.* + REVOKE SHOW ON system.* + GRANT CREATE ON *.* WITH GRANT OPTION + + + +``` + +ã“れらã®ãƒ­ãƒ¼ãƒ«ã¯ `users` セクションã‹ã‚‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ä»˜ä¸Žã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +```xml + + + ... + + GRANT test_role + + + +``` diff --git a/docs/ja/operations/settings/settings.md b/docs/ja/operations/settings/settings.md new file mode 100644 index 00000000000..ed3c720044e --- /dev/null +++ b/docs/ja/operations/settings/settings.md @@ -0,0 +1,9657 @@ +--- +title: コア設定 +sidebar_label: コア設定 +slug: /ja/operations/settings/settings +toc_max_heading_level: 2 +--- + +ã™ã¹ã¦ã®è¨­å®šã¯ã€ãƒ†ãƒ¼ãƒ–ル [system.settings](/docs/ja/operations/system-tables/settings) ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ã“れらã®è¨­å®šã¯ã€[source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) ã‹ã‚‰è‡ªå‹•ç”Ÿæˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +## add_http_cors_header {#add_http_cors_header} + +タイプ: Bool + +デフォルト値: 0 + +HTTP CORS ヘッダーを追加ã—ã¾ã™ã€‚ + +## additional_result_filter {#additional_result_filter} + +タイプ: String + +デフォルト値: + +`SELECT` クエリã®çµæžœã«é©ç”¨ã•ã‚Œã‚‹è¿½åŠ ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼å¼ã§ã™ã€‚ã“ã®è¨­å®šã¯ã€ã„ã‹ãªã‚‹ã‚µãƒ–クエリã«ã‚‚é©ç”¨ã•ã‚Œã¾ã›ã‚“。 + +**例** + +``` sql +INSERT INTO table_1 VALUES (1, 'a'), (2, 'bb'), (3, 'ccc'), (4, 'dddd'); +SElECT * FROM table_1; +``` +```response +┌─x─┬─y────┠+│ 1 │ a │ +│ 2 │ bb │ +│ 3 │ ccc │ +│ 4 │ dddd │ +└───┴──────┘ +``` +```sql +SELECT * +FROM table_1 +SETTINGS additional_result_filter = 'x != 2' +``` +```response +┌─x─┬─y────┠+│ 1 │ a │ +│ 3 │ ccc │ +│ 4 │ dddd │ +└───┴──────┘ +``` + +## additional_table_filters {#additional_table_filters} + +タイプ: Map + +デフォルト値: {} + +指定ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–ã£ãŸå¾Œã«é©ç”¨ã•ã‚Œã‚‹è¿½åŠ ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼å¼ã§ã™ã€‚ + +**例** + +``` sql +INSERT INTO table_1 VALUES (1, 'a'), (2, 'bb'), (3, 'ccc'), (4, 'dddd'); +SELECT * FROM table_1; +``` +```response +┌─x─┬─y────┠+│ 1 │ a │ +│ 2 │ bb │ +│ 3 │ ccc │ +│ 4 │ dddd │ +└───┴──────┘ +``` +```sql +SELECT * +FROM table_1 +SETTINGS additional_table_filters = {'table_1': 'x != 2'} +``` +```response +┌─x─┬─y────┠+│ 1 │ a │ +│ 3 │ ccc │ +│ 4 │ dddd │ +└───┴──────┘ +``` + +## aggregate_functions_null_for_empty {#aggregate_functions_null_for_empty} + +タイプ: Bool + +デフォルト値: 0 + +クエリ内ã®ã™ã¹ã¦ã®é›†ç´„関数を書ãæ›ãˆã‚‹æ©Ÿèƒ½ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ã¾ãŸã€[-OrNull](../../sql-reference/aggregate-functions/combinators.md/#agg-functions-combinator-ornull) サフィックスãŒè¿½åŠ ã•ã‚Œã¾ã™ã€‚SQL 標準ã®äº’æ›æ€§ã®ãŸã‚ã«æœ‰åŠ¹ã«ã—ã¾ã™ã€‚分散クエリã®ä¸€è²«ã—ãŸçµæžœã‚’å¾—ã‚‹ãŸã‚ã«ã€ã‚¯ã‚¨ãƒªã®ãƒªãƒ©ã‚¤ãƒˆã‚’介ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ï¼ˆ[count_distinct_implementation](#count_distinct_implementation) 設定ã«é¡žä¼¼ï¼‰ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +**例** + +次ã®é›†ç´„関数を使用ã—ãŸã‚¯ã‚¨ãƒªã‚’考ãˆã¦ã¿ã¾ã™ã€‚ +```sql +SELECT SUM(-1), MAX(0) FROM system.one WHERE 0; +``` + +`aggregate_functions_null_for_empty = 0` ã®å ´åˆã€æ¬¡ã®çµæžœãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š +```text +┌─SUM(-1)─┬─MAX(0)─┠+│ 0 │ 0 │ +└─────────┴────────┘ +``` + +`aggregate_functions_null_for_empty = 1` ã®å ´åˆã€çµæžœã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š +```text +┌─SUMOrNull(-1)─┬─MAXOrNull(0)─┠+│ NULL │ NULL │ +└───────────────┴──────────────┘ +``` + +## aggregation_in_order_max_block_bytes {#aggregation_in_order_max_block_bytes} + +タイプ: UInt64 + +デフォルト値: 50000000 + +プライマリーキーã®é †åºã§é›†ç´„中ã«è“„ç©ã•ã‚Œã‚‹ãƒ–ロックã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆæ•°ï¼‰ã§ã™ã€‚å°ã•ãªãƒ–ロックサイズã¯ã€é›†ç´„ã®æœ€çµ‚マージステージをより並列化ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +## aggregation_memory_efficient_merge_threads {#aggregation_memory_efficient_merge_threads} + +タイプ: UInt64 + +デフォルト値: 0 + +メモリ効率ã®è‰¯ã„モードã§ä¸­é–“集約çµæžœã‚’マージã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã§ã™ã€‚大ãã„ã»ã©ã€ãƒ¡ãƒ¢ãƒªãŒæ¶ˆè²»ã•ã‚Œã¾ã™ã€‚0ã¯ã€Œmax_threadsã€ã¨åŒã˜æ„味ã§ã™ã€‚ + +## allow_aggregate_partitions_independently {#allow_aggregate_partitions_independently} + +タイプ: Bool + +デフォルト値: 0 + +パーティションキーãŒã‚°ãƒ«ãƒ¼ãƒ—化キーã«é©åˆã™ã‚‹å ´åˆã€åˆ¥ã€…ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§ãƒ‘ーティションã®ç‹¬ç«‹ã—ãŸé›†ç´„を有効ã«ã—ã¾ã™ã€‚パーティションã®æ•°ãŒã‚³ã‚¢ã®æ•°ã«è¿‘ãã€ãƒ‘ーティションã®ã‚µã‚¤ã‚ºãŒå¤§ã¾ã‹ã«åŒã˜ã§ã‚ã‚‹å ´åˆã«æœ‰ç›Šã§ã™ã€‚ + +## allow_archive_path_syntax {#allow_archive_path_syntax} + +タイプ: Bool + +デフォルト値: 1 + +ファイル/S3 エンジン/テーブル関数ã¯ã€ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ãŒæ­£ã—ã„æ‹¡å¼µå­ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€'::' ã‚’ '\\ :: \\' ã¨ã—ã¦ãƒ‘スを解æžã—ã¾ã™ã€‚ + +## allow_asynchronous_read_from_io_pool_for_merge_tree {#allow_asynchronous_read_from_io_pool_for_merge_tree} + +タイプ: Bool + +デフォルト値: 0 + +MergeTree テーブルã‹ã‚‰èª­ã¿å–ã‚‹ãŸã‚ã«ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ I/O プールを使用ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€I/O 処ç†ã«åˆ¶ç´„ã®ã‚るクエリã®æ€§èƒ½ã‚’å‘上ã•ã›ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## allow_changing_replica_until_first_data_packet {#allow_changing_replica_until_first_data_packet} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã‚ŒãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹ã¨ã€ãƒ˜ãƒƒã‚¸ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§ã¯ã€æœ€åˆã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ケットをå—ä¿¡ã™ã‚‹ã¾ã§æ–°ã—ã„接続を開始ã§ãã¾ã™ã€‚進行中ã§ã‚‚ã€æœ€åˆã®é€²è¡ŒãŒæ›´æ–°ã•ã‚Œã¦ã„ãªã„å ´åˆ (ãŸã ã—ã€`receive_data_timeout` タイムアウトãŒé©ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆ)ã€ãã†ã§ãªã‘ã‚Œã°ã€é€²è¡ŒãŒé€²ã‚“ã å¾Œã¯ãƒ¬ãƒ—リカã®å¤‰æ›´ã‚’無効ã«ã—ã¾ã™ã€‚ + +## allow_create_index_without_type {#allow_create_index_without_type} + +タイプ: Bool + +デフォルト値: 0 + +TYPE ãªã—㧠CREATE INDEX クエリを許å¯ã—ã¾ã™ã€‚クエリã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚SQL 互æ›æ€§ãƒ†ã‚¹ãƒˆã®ãŸã‚ã«è¡Œã‚ã‚Œã¦ã„ã¾ã™ã€‚ + +## allow_custom_error_code_in_throwif {#allow_custom_error_code_in_throwif} + +タイプ: Bool + +デフォルト値: 0 + +throwIf() 関数ã«ã‚«ã‚¹ã‚¿ãƒ ã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰ã‚’有効ã«ã—ã¾ã™ã€‚ã“ã‚ŒãŒçœŸã®å ´åˆã€æŠ•ã’られãŸä¾‹å¤–ãŒäºˆæœŸã—ãªã„エラーコードをæŒã¤å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## allow_ddl {#allow_ddl} + +タイプ: Bool + +デフォルト値: 1 + +ã“ã‚ŒãŒçœŸã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ DDL クエリを実行ã™ã‚‹ã“ã¨ãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ + +## allow_deprecated_database_ordinary {#allow_deprecated_database_ordinary} + +タイプ: Bool + +デフォルト値: 0 + +éžæŽ¨å¥¨ã® Ordinary エンジンを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_deprecated_error_prone_window_functions {#allow_deprecated_error_prone_window_functions} + +タイプ: Bool + +デフォルト値: 0 + +エラーãŒç™ºç”Ÿã—ã‚„ã™ã„ウィンドウ関数(neighbor, runningAccumulate, runningDifferenceStartingWithFirstValue, runningDifference)ã®ä½¿ç”¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_deprecated_snowflake_conversion_functions {#allow_deprecated_snowflake_conversion_functions} + +タイプ: Bool + +デフォルト値: 0 + +`snowflakeToDateTime`ã€`snowflakeToDateTime64`ã€`dateTimeToSnowflake`ã€ãŠã‚ˆã³ `dateTime64ToSnowflake` 関数ã¯éžæŽ¨å¥¨ã§ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ã•ã‚Œã¦ã„ã¾ã™ã€‚代ã‚ã‚Šã« `snowflakeIDToDateTime`ã€`snowflakeIDToDateTime64`ã€`dateTimeToSnowflakeID`ã€ãŠã‚ˆã³ `dateTime64ToSnowflakeID` 関数を使用ã—ã¦ãã ã•ã„。 + +éžæŽ¨å¥¨ã®é–¢æ•°ã‚’å†åº¦æœ‰åŠ¹ã«ã™ã‚‹ã«ã¯ï¼ˆä¾‹ï¼šç§»è¡ŒæœŸé–“中)ã€ã“ã®è¨­å®šã‚’ `true` ã«è¨­å®šã—ã¦ãã ã•ã„。 + +## allow_deprecated_syntax_for_merge_tree {#allow_deprecated_syntax_for_merge_tree} + +タイプ: Bool + +デフォルト値: 0 + +éžæŽ¨å¥¨ã®ã‚¨ãƒ³ã‚¸ãƒ³å®šç¾©æ§‹æ–‡ã‚’使用ã—㦠*MergeTree テーブルを作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_distributed_ddl {#allow_distributed_ddl} + +タイプ: Bool + +デフォルト値: 1 + +ã“ã‚ŒãŒçœŸã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯åˆ†æ•£ DDL クエリを実行ã™ã‚‹ã“ã¨ãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ + +## allow_drop_detached {#allow_drop_detached} + +タイプ: Bool + +デフォルト値: 0 + +ALTER TABLE ... DROP DETACHED PART[ITION] ... クエリを許å¯ã—ã¾ã™ã€‚ + +## allow_execute_multiif_columnar {#allow_execute_multiif_columnar} + +タイプ: Bool + +デフォルト値: 1 + +multiIf 関数をカラム形å¼ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_analyzer {#allow_experimental_analyzer} + +タイプ: Bool + +デフォルト値: 1 + +æ–°ã—ã„クエリアナライザーを許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_codecs {#allow_experimental_codecs} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã‚ŒãŒçœŸã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªåœ§ç¸®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã‚’指定ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ï¼ˆãŸã ã—ã€ç¾æ™‚点ã§ã¯ãã‚Œã¯å­˜åœ¨ã›ãšã€ã“ã®ã‚ªãƒ—ションã¯ä½•ã‚‚実行ã•ã‚Œã¾ã›ã‚“)。 + +## allow_experimental_database_materialized_mysql {#allow_experimental_database_materialized_mysql} + +タイプ: Bool + +デフォルト値: 0 + +Engine=MaterializedMySQL(...) を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_database_materialized_postgresql {#allow_experimental_database_materialized_postgresql} + +タイプ: Bool + +デフォルト値: 0 + +Engine=MaterializedPostgreSQL(...) を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_dynamic_type {#allow_experimental_dynamic_type} + +タイプ: Bool + +デフォルト値: 0 + +Dynamic データ型を許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_full_text_index {#allow_experimental_full_text_index} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã‚ŒãŒçœŸã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªãƒ•ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_funnel_functions {#allow_experimental_funnel_functions} + +タイプ: Bool + +デフォルト値: 0 + +ファunnel 分æžã®ãŸã‚ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªé–¢æ•°ã‚’有効ã«ã—ã¾ã™ã€‚ + +## allow_experimental_hash_functions {#allow_experimental_hash_functions} + +タイプ: Bool + +デフォルト値: 0 + +エクスペリメンタルãªãƒãƒƒã‚·ãƒ¥é–¢æ•°ã‚’有効ã«ã—ã¾ã™ã€‚ + +## allow_experimental_inverted_index {#allow_experimental_inverted_index} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã‚ŒãŒçœŸã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªã‚¤ãƒ³ãƒãƒ¼ãƒ†ãƒƒãƒ‰ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_join_condition {#allow_experimental_join_condition} + +タイプ: Bool + +デフォルト値: 0 + +左テーブルã¨å³ãƒ†ãƒ¼ãƒ–ルã®ä¸¡æ–¹ã®ã‚«ãƒ©ãƒ ã‚’å«ã‚€éžç­‰å¼æ¡ä»¶ã§ã®çµåˆã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚例: t1.y < t2.y。 + +## allow_experimental_join_right_table_sorting {#allow_experimental_join_right_table_sorting} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã‚ŒãŒçœŸã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`join_to_sort_minimum_perkey_rows` 㨠`join_to_sort_maximum_table_rows` ã®æ¡ä»¶ãŒæº€ãŸã•ã‚Œã¦ã„ã‚‹ã¨ã€å³ãƒ†ãƒ¼ãƒ–ルをキーã§ä¸¦ã¹æ›¿ãˆã€å·¦ã¾ãŸã¯å†…部ãƒãƒƒã‚·ãƒ¥çµåˆã§ãƒ‘フォーマンスをå‘上ã•ã›ã¾ã™ã€‚ + +## allow_experimental_json_type {#allow_experimental_json_type} + +タイプ: Bool + +デフォルト値: 0 + +JSON データ型を許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_kafka_offsets_storage_in_keeper {#allow_experimental_kafka_offsets_storage_in_keeper} + +タイプ: Bool + +デフォルト値: 0 + +ClickHouse Keeper ã« Kafka 関連ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã‚’許å¯ã—ã¾ã™ã€‚有効ã«ã™ã‚‹ã¨ã€ClickHouse Keeper パスã¨ãƒ¬ãƒ—リカåã‚’ Kafka テーブルエンジンã«æŒ‡å®šã§ãã¾ã™ã€‚ã“ã®çµæžœã€é€šå¸¸ã® Kafka エンジンã®ä»£ã‚ã‚Šã«ã€ã‚³ãƒŸãƒƒãƒˆã•ã‚ŒãŸã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’主㫠ClickHouse Keeper ã«ä¿å­˜ã™ã‚‹æ–°ã—ã„タイプã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## allow_experimental_live_view {#allow_experimental_live_view} + +タイプ: Bool + +デフォルト値: 0 + +éžæŽ¨å¥¨ã® LIVE VIEW ã®ä½œæˆã‚’許å¯ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — ライブビューã§ã®æ“作ãŒç„¡åŠ¹ã§ã™ã€‚ +- 1 — ライブビューã§ã®æ“作ãŒæœ‰åŠ¹ã§ã™ã€‚ + +## allow_experimental_materialized_postgresql_table {#allow_experimental_materialized_postgresql_table} + +タイプ: Bool + +デフォルト値: 0 + +MaterializedPostgreSQL テーブルエンジンを使用ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã§ã™ã€‚ + +## allow_experimental_nlp_functions {#allow_experimental_nlp_functions} + +タイプ: Bool + +デフォルト値: 0 + +自然言語処ç†ã®ãŸã‚ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªé–¢æ•°ã‚’有効ã«ã—ã¾ã™ã€‚ + +## allow_experimental_object_type {#allow_experimental_object_type} + +タイプ: Bool + +デフォルト値: 0 + +Object ãŠã‚ˆã³ JSON データ型を許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_parallel_reading_from_replicas {#allow_experimental_parallel_reading_from_replicas} + +タイプ: UInt64 + +デフォルト値: 0 + +SELECT クエリã®å®Ÿè¡Œã®ãŸã‚ã«ã€å„シャードã‹ã‚‰ `max_parallel_replicas` ã®æ•°ã ã‘ã®ãƒ¬ãƒ—リカを使用ã—ã¾ã™ã€‚読ã¿å–ã‚Šã¯ã€å‹•çš„ã«ä¸¦åˆ—化ã•ã‚Œã€èª¿æ•´ã•ã‚Œã¾ã™ã€‚0 - オフã€1 - 有効ã€å¤±æ•—ã—ãŸå ´åˆã¯é™ã‹ã«ç„¡åŠ¹åŒ–ã€2 - 有効ã€å¤±æ•—ã—ãŸå ´åˆã«ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## allow_experimental_query_deduplication {#allow_experimental_query_deduplication} + +タイプ: Bool + +デフォルト値: 0 + +部分 UUID ã«åŸºã¥ã SELECT クエリã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªãƒ‡ãƒ¼ã‚¿é‡è¤‡æŽ’除ã§ã™ã€‚ + +## allow_experimental_shared_set_join {#allow_experimental_shared_set_join} + +タイプ: Bool + +デフォルト値: 1 + +ClickHouse Cloud ã®ã¿ã€‚ShareSet ãŠã‚ˆã³ SharedJoin ã®ä½œæˆã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_statistics {#allow_experimental_statistics} + +タイプ: Bool + +デフォルト値: 0 + +[統計](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)ã‚’æŒã¤ã‚«ãƒ©ãƒ ã®å®šç¾©ãŠã‚ˆã³[統計をæ“作](../../engines/table-engines/mergetree-family/mergetree.md#column-statistics)を許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_time_series_table {#allow_experimental_time_series_table} + +タイプ: Bool + +デフォルト値: 0 + +[TimeSeries](../../engines/table-engines/integrations/time-series.md) テーブルエンジンをæŒã¤ãƒ†ãƒ¼ãƒ–ルã®ä½œæˆã‚’許å¯ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — [TimeSeries](../../engines/table-engines/integrations/time-series.md) テーブルエンジンã¯ç„¡åŠ¹ã§ã™ã€‚ +- 1 — [TimeSeries](../../engines/table-engines/integrations/time-series.md) テーブルエンジンã¯æœ‰åŠ¹ã§ã™ã€‚ + +## allow_experimental_variant_type {#allow_experimental_variant_type} + +タイプ: Bool + +デフォルト値: 0 + +エクスペリメンタル㪠[Variant](../../sql-reference/data-types/variant.md) ã®ä½œæˆã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_vector_similarity_index {#allow_experimental_vector_similarity_index} + +タイプ: Bool + +デフォルト値: 0 + +エクスペリメンタルãªãƒ™ã‚¯ãƒˆãƒ«é¡žä¼¼åº¦ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_experimental_window_view {#allow_experimental_window_view} + +タイプ: Bool + +デフォルト値: 0 + +WINDOW VIEW を有効ã«ã—ã¾ã™ã€‚æˆç†Ÿã—ã¦ã„ã¾ã›ã‚“。 + +## allow_get_client_http_header {#allow_get_client_http_header} + +タイプ: Bool + +デフォルト値: 0 + +ç¾åœ¨ã® HTTP リクエストã®ãƒ˜ãƒƒãƒ€ãƒ¼ã®å€¤ã‚’å–å¾—ã™ã‚‹ãŸã‚ã® `getClientHTTPHeader` 関数を使用ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚セキュリティ上ã®ç†ç”±ã‹ã‚‰ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯æœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã›ã‚“。一部ã®ãƒ˜ãƒƒãƒ€ãƒ¼ï¼ˆ`Cookie` ãªã©ï¼‰ã«ã¯æ©Ÿå¯†æƒ…å ±ãŒå«ã¾ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®é–¢æ•°ã§å–å¾—ã§ããªã„ヘッダーã¯ã€`X-ClickHouse-*` ãŠã‚ˆã³ `Authentication` ヘッダーã§ã™ã€‚ + +## allow_hyperscan {#allow_hyperscan} + +タイプ: Bool + +デフォルト値: 1 + +Hyperscan ライブラリを使用ã™ã‚‹é–¢æ•°ã‚’許å¯ã—ã¾ã™ã€‚é•·ã„コンパイル時間やéŽå‰°ãªãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨ã‚’é¿ã‘ã‚‹ãŸã‚ã«ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +## allow_introspection_functions {#allow_introspection_functions} + +タイプ: Bool + +デフォルト値: 0 + +クエリプロファイリングã®ãŸã‚ã® [イントロスペクション関数](../../sql-reference/functions/introspection.md) を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — インストロスペクション関数有効。 +- 0 — インストロスペクション関数無効。 + +**å‚ç…§** + +- [Sampling Query Profiler](../../operations/optimizing-performance/sampling-query-profiler.md) +- システムテーブル [trace_log](../../operations/system-tables/trace_log.md/#system_tables-trace_log) + +## allow_materialized_view_with_bad_select {#allow_materialized_view_with_bad_select} + +タイプ: Bool + +デフォルト値: 1 + +存在ã—ãªã„テーブルやカラムをå‚ç…§ã™ã‚‹ SELECT クエリを使用ã—㦠CREATE MATERIALIZED VIEW を許å¯ã—ã¾ã™ã€‚ãã‚Œã¯ä¾ç„¶ã¨ã—ã¦æ§‹æ–‡çš„ã«æœ‰åŠ¹ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。リフレッシュå¯èƒ½ãª MV ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。SELECT クエリã‹ã‚‰ MV スキーマを推測ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆï¼ˆã™ãªã‚ã¡ã€CREATE ã«ã‚«ãƒ©ãƒ ãƒªã‚¹ãƒˆãŒãªã TO テーブルãŒãªã„å ´åˆï¼‰ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。MV ã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +## allow_named_collection_override_by_default {#allow_named_collection_override_by_default} + +タイプ: Bool + +デフォルト値: 1 + +デフォルトã§åå‰ä»˜ãコレクションã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_non_metadata_alters {#allow_non_metadata_alters} + +タイプ: Bool + +デフォルト値: 1 + +テーブルメタデータã ã‘ã§ãªãã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ‡ãƒ¼ã‚¿ã«ã‚‚影響を与ãˆã‚‹ ALTER を実行ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_nonconst_timezone_arguments {#allow_nonconst_timezone_arguments} + +タイプ: Bool + +デフォルト値: 0 + +toTimeZone()ã€fromUnixTimestamp*()ã€snowflakeToDateTime*() ã®ã‚ˆã†ãªç‰¹å®šã®æ™‚間関連関数ã§éžå®šæ•°ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å¼•æ•°ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_nondeterministic_mutations {#allow_nondeterministic_mutations} + +タイプ: Bool + +デフォルト値: 0 + +ユーザーレベルã®è¨­å®šã§ã€ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル㌠`dictGet` ã®ã‚ˆã†ãªéžæ±ºå®šçš„関数を使用ã™ã‚‹ãŸã‚ã®å¤‰æ›´ã‚’許å¯ã—ã¾ã™ã€‚ + +例ãˆã°ã€DictionaryãŒãƒŽãƒ¼ãƒ‰é–“ã§åŒæœŸã—ã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€Dictionaryã‹ã‚‰å€¤ã‚’引ã£å¼µã‚‹å¤‰æ›´ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒ¡ã§ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã§ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€ã“ã®å‹•ä½œãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ãŒã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰é–“ã§åŒæœŸã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’ユーザーãŒç¢ºèªã™ã‚‹è²¬ä»»ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** + +``` xml + + + 1 + + + + + + + +``` + +## allow_nondeterministic_optimize_skip_unused_shards {#allow_nondeterministic_optimize_skip_unused_shards} + +タイプ: Bool + +デフォルト値: 0 + +シャーディングキー内ã®éžæ±ºå®šçš„(例ãˆã°ã€`rand` ã¾ãŸã¯ `dictGet`ã€å¾Œè€…ã«ã¯æ›´æ–°ã«é–¢ã—ã¦ã„ãã¤ã‹ã®æ³¨æ„事項ãŒã‚ã‚Šã¾ã™ï¼‰æ©Ÿèƒ½ã‚’許å¯ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — ä¸è¨±å¯ã€‚ +- 1 — 許å¯ã€‚ + +## allow_prefetched_read_pool_for_local_filesystem {#allow_prefetched_read_pool_for_local_filesystem} + +タイプ: Bool + +デフォルト値: 0 + +ã™ã¹ã¦ã®éƒ¨åˆ†ãŒãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ã‚ã‚‹å ´åˆã€ãƒ—リフェッãƒã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールを優先ã—ã¾ã™ã€‚ + +## allow_prefetched_read_pool_for_remote_filesystem {#allow_prefetched_read_pool_for_remote_filesystem} + +タイプ: Bool + +デフォルト値: 1 + +ã™ã¹ã¦ã®éƒ¨åˆ†ãŒãƒªãƒ¢ãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ã‚ã‚‹å ´åˆã€ãƒ—リフェッãƒã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールを優先ã—ã¾ã™ã€‚ + +## allow_push_predicate_when_subquery_contains_with {#allow_push_predicate_when_subquery_contains_with} + +タイプ: Bool + +デフォルト値: 1 + +サブクエリ㫠WITH å¥ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ—ッシュ述語を許å¯ã—ã¾ã™ã€‚ + +## allow_reorder_prewhere_conditions {#allow_reorder_prewhere_conditions} + +タイプ: Bool + +デフォルト値: 1 + +WHERE ã‹ã‚‰ PREWHERE ã«æ¡ä»¶ã‚’移動ã™ã‚‹éš›ã€æœ€é©åŒ–フィルタリングã®ãŸã‚ã«ãれらをå†é †åºã«ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_settings_after_format_in_insert {#allow_settings_after_format_in_insert} + +タイプ: Bool + +デフォルト値: 0 + +INSERT クエリ内㮠FORMAT ã®å¾Œã« `SETTINGS` ãŒè¨±å¯ã•ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚ã“ã‚Œã¯æŽ¨å¥¨ã•ã‚Œã¦ãŠã‚‰ãšã€ã“ã‚Œã«ã‚ˆã‚Š `SETTINGS` ã®ä¸€éƒ¨ãŒå€¤ã¨ã—ã¦è§£é‡ˆã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +例: + +```sql +INSERT INTO FUNCTION null('foo String') SETTINGS max_threads=1 VALUES ('bar'); +``` + +ã—ã‹ã—ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã¯ `allow_settings_after_format_in_insert` ã®ã¿ã§æ©Ÿèƒ½ã—ã¾ã™ï¼š + +```sql +SET allow_settings_after_format_in_insert=1; +INSERT INTO FUNCTION null('foo String') VALUES ('bar') SETTINGS max_threads=1; +``` + +å¯èƒ½ãªå€¤: + +- 0 — ä¸è¨±å¯ã€‚ +- 1 — 許å¯ã€‚ + +:::note +ã“ã®è¨­å®šã¯ã€æ—§æ§‹æ–‡ã«ä¾å­˜ã™ã‚‹ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã®å ´åˆã«ã®ã¿ã€å¾Œæ–¹äº’æ›æ€§ã®ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ +::: + +## allow_simdjson {#allow_simdjson} + +タイプ: Bool + +デフォルト値: 1 + +AVX2 命令ãŒåˆ©ç”¨å¯èƒ½ãªå ´åˆã€'JSON*' 関数㧠simdjson ライブラリを使用ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚無効ã«ã™ã‚‹ã¨ã€rapidjson ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## allow_statistics_optimize {#allow_statistics_optimize} + +タイプ: Bool + +デフォルト値: 0 + +クエリを最é©åŒ–ã™ã‚‹ãŸã‚ã«çµ±è¨ˆã‚’使用ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_suspicious_codecs {#allow_suspicious_codecs} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã‚ŒãŒçœŸã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€æ„味ã®ãªã„圧縮コーデックを指定ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## allow_suspicious_fixed_string_types {#allow_suspicious_fixed_string_types} + +タイプ: Bool + +デフォルト値: 0 + +CREATE TABLE ステートメントã«ãŠã„ã¦ã€n > 256 ã® FixedString(n) タイプã®ã‚«ãƒ©ãƒ ã‚’作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚é•·ã•ãŒ 256 以上㮠FixedString ã¯ç–‘ã‚ã—ãã€èª¤ç”¨ã‚’示ã™å¯èƒ½æ€§ãŒé«˜ã„ã§ã™ã€‚ + +## allow_suspicious_indices {#allow_suspicious_indices} + +タイプ: Bool + +デフォルト値: 0 + +åŒä¸€ã®å¼ã‚’æŒã¤ãƒ—ライマリ/セカンダリインデックスãŠã‚ˆã³ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’æ‹’å¦ã—ã¾ã™ã€‚ + +## allow_suspicious_low_cardinality_types {#allow_suspicious_low_cardinality_types} + +タイプ: Bool + +デフォルト値: 0 + +8 ãƒã‚¤ãƒˆä»¥ä¸‹ã®å›ºå®šã‚µã‚¤ã‚ºã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨ä¸€ç·’ã« [LowCardinality](../../sql-reference/data-types/lowcardinality.md) を使用ã™ã‚‹ã“ã¨ã‚’許å¯ã¾ãŸã¯åˆ¶é™ã—ã¾ã™ã€‚数値データ型ãŠã‚ˆã³ `FixedString(8_bytes_or_less)`。 + +å°ã•ãªå›ºå®šå€¤ã«å¯¾ã—㦠`LowCardinality` ã®ä½¿ç”¨ã¯é€šå¸¸éžåŠ¹çŽ‡çš„ã§ã™ã€‚ãªãœãªã‚‰ã€ClickHouse ã¯å„è¡Œã«å¯¾ã—ã¦æ•°å€¤ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’ä¿å­˜ã™ã‚‹ã‹ã‚‰ã§ã™ã€‚ãã®çµæžœï¼š + +- ディスクスペースã®ä½¿ç”¨é‡ãŒå¢—加ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- RAM 消費ãŒé«˜ããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚Dictionaryã®ã‚µã‚¤ã‚ºã«ä¾å­˜ã—ã¾ã™ã€‚ +- 一部ã®é–¢æ•°ã¯ã€è¿½åŠ ã®ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°/エンコーディングæ“作ã®ãŸã‚ã«é…ããªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) エンジンテーブル内ã§ã®ãƒžãƒ¼ã‚¸æ™‚é–“ã¯ã€ä¸Šè¨˜ã®ã™ã¹ã¦ã®ç†ç”±ã«ã‚ˆã‚Šå¢—加ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — `LowCardinality` ã®ä½¿ç”¨ã¯åˆ¶é™ã•ã‚Œã¾ã›ã‚“。 +- 0 — `LowCardinality` ã®ä½¿ç”¨ã¯åˆ¶é™ã•ã‚Œã¾ã™ã€‚ + +## allow_suspicious_primary_key {#allow_suspicious_primary_key} + +タイプ: Bool + +デフォルト値: 0 + +MergeTree ã®ç–‘ã‚ã—ã„ `PRIMARY KEY`/`ORDER BY` を許å¯ã—ã¾ã™ï¼ˆã™ãªã‚ã¡ã€SimpleAggregateFunction)。 + +## allow_suspicious_ttl_expressions {#allow_suspicious_ttl_expressions} + +タイプ: Bool + +デフォルト値: 0 + +テーブルã®ã‚«ãƒ©ãƒ ã«ä¾å­˜ã—ãªã„ TTL å¼ã‚’æ‹’å¦ã—ã¾ã™ã€‚ã“ã‚Œã¯ã»ã¨ã‚“ã©ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ãƒ©ãƒ¼ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +## allow_suspicious_types_in_group_by {#allow_suspicious_types_in_group_by} + +タイプ: Bool + +デフォルト値: 0 + +GROUP BY キー㧠[Variant](../../sql-reference/data-types/variant.md) ãŠã‚ˆã³ [Dynamic](../../sql-reference/data-types/dynamic.md) タイプã®ä½¿ç”¨ã‚’許å¯ã¾ãŸã¯åˆ¶é™ã—ã¾ã™ã€‚ + +## allow_suspicious_types_in_order_by {#allow_suspicious_types_in_order_by} + +タイプ: Bool + +デフォルト値: 0 + +ORDER BY キー㧠[Variant](../../sql-reference/data-types/variant.md) ãŠã‚ˆã³ [Dynamic](../../sql-reference/data-types/dynamic.md) タイプã®ä½¿ç”¨ã‚’許å¯ã¾ãŸã¯åˆ¶é™ã—ã¾ã™ã€‚ + +## allow_suspicious_variant_types {#allow_suspicious_variant_types} + +タイプ: Bool + +デフォルト値: 0 + +CREATE TABLE ステートメントã§ã€é¡žä¼¼ã®ãƒãƒªã‚¢ãƒ³ãƒˆã‚¿ã‚¤ãƒ—(例ãˆã°ã€ç•°ãªã‚‹æ•°å€¤ã¾ãŸã¯æ—¥ä»˜åž‹ï¼‰ã‚’æŒã¤ãƒãƒªã‚¢ãƒ³ãƒˆã‚¿ã‚¤ãƒ—を指定ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€é¡žä¼¼ã®ã‚¿ã‚¤ãƒ—ã‚’æŒã¤å€¤ã§ä½œæ¥­ã™ã‚‹éš›ã«è‹¥å¹²ã®æ›–昧性を引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## allow_unrestricted_reads_from_keeper {#allow_unrestricted_reads_from_keeper} + +タイプ: Bool + +デフォルト値: 0 + +æ¡ä»¶ãªã—㧠system.zookeeper テーブルã‹ã‚‰ã®ç„¡åˆ¶é™ã®èª­ã¿å–りを許å¯ã—ã¾ã™ã€‚便利ã§ã™ãŒã€zookeeper ã«å¯¾ã—ã¦å®‰å…¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## alter_move_to_space_execute_async {#alter_move_to_space_execute_async} + +タイプ: Bool + +デフォルト値: 0 + +ALTER TABLE MOVE ... TO [DISK|VOLUME] ã‚’éžåŒæœŸã«å®Ÿè¡Œã—ã¾ã™ã€‚ + +## alter_partition_verbose_result {#alter_partition_verbose_result} + +タイプ: Bool + +デフォルト値: 0 + +パーティションãŠã‚ˆã³éƒ¨å“ã®æ“作ãŒæ­£å¸¸ã«é©ç”¨ã•ã‚ŒãŸéƒ¨å“ã«é–¢ã™ã‚‹æƒ…å ±ã®è¡¨ç¤ºã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ã“れ㯠[ATTACH PARTITION|PART](../../sql-reference/statements/alter/partition.md/#alter_attach-partition) ãŠã‚ˆã³ [FREEZE PARTITION](../../sql-reference/statements/alter/partition.md/#alter_freeze-partition) ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 詳細表示を無効ã«ã—ã¾ã™ã€‚ +- 1 — 詳細表示を有効ã«ã—ã¾ã™ã€‚ + +**例** + +```sql +CREATE TABLE test(a Int64, d Date, s String) ENGINE = MergeTree PARTITION BY toYYYYMDECLARE(d) ORDER BY a; +INSERT INTO test VALUES(1, '2021-01-01', ''); +INSERT INTO test VALUES(1, '2021-01-01', ''); +ALTER TABLE test DETACH PARTITION ID '202101'; + +ALTER TABLE test ATTACH PARTITION ID '202101' SETTINGS alter_partition_verbose_result = 1; + +┌─command_type─────┬─partition_id─┬─part_name────┬─old_part_name─┠+│ ATTACH PARTITION │ 202101 │ 202101_7_7_0 │ 202101_5_5_0 │ +│ ATTACH PARTITION │ 202101 │ 202101_8_8_0 │ 202101_6_6_0 │ +└──────────────────┴──────────────┴──────────────┴───────────────┘ + +ALTER TABLE test FREEZE SETTINGS alter_partition_verbose_result = 1; + +┌─command_type─┬─partition_id─┬─part_name────┬─backup_name─┬─backup_path───────────────────┬─part_backup_path────────────────────────────────────────────┠+│ FREEZE ALL │ 202101 │ 202101_7_7_0 │ 8 │ /var/lib/clickhouse/shadow/8/ │ /var/lib/clickhouse/shadow/8/data/default/test/202101_7_7_0 │ +│ FREEZE ALL │ 202101 │ 202101_8_8_0 │ 8 │ /var/lib/clickhouse/shadow/8/ │ /var/lib/clickhouse/shadow/8/data/default/test/202101_8_8_0 │ +└──────────────┴──────────────┴──────────────┴─────────────┴───────────────────────────────┴─────────────────────────────────────────────────────────────┘ +``` + +## alter_sync {#alter_sync} + +タイプ: UInt64 + +デフォルト値: 1 + +[ALTER](../../sql-reference/statements/alter/index.md)ã€[OPTIMIZE](../../sql-reference/statements/optimize.md)ã€ã¾ãŸã¯ [TRUNCATE](../../sql-reference/statements/truncate.md) クエリã«ã‚ˆã£ã¦ãƒ¬ãƒ—リカã§ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒå®Ÿè¡Œã•ã‚Œã‚‹ã®ã‚’å¾…ã¤è¨­å®šã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — å¾…æ©Ÿã—ãªã„。 +- 1 — 自分ã®å®Ÿè¡Œã‚’å¾…ã¤ã€‚ +- 2 — ã™ã¹ã¦ã‚’å¾…ã¤ã€‚ + +クラウドデフォルト値: `0`。 + +:::note +`alter_sync` 㯠`Replicated` テーブルã«ã®ã¿é©ç”¨ã•ã‚Œã€`Replicated` ã§ãªã„テーブルã®å¤‰æ›´ã«ã¯ç„¡åŠ¹ã§ã™ã€‚ +::: + +## analyze_index_with_space_filling_curves {#analyze_index_with_space_filling_curves} + +タイプ: Bool + +デフォルト値: 1 + +テーブルã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ç©ºé–“充填曲線ãŒã‚ã‚‹å ´åˆï¼ˆä¾‹ï¼š `ORDER BY mortonEncode(x, y)` ã¾ãŸã¯ `ORDER BY hilbertEncode(x, y)`)ã€ãŠã‚ˆã³ã‚¯ã‚¨ãƒªãŒãã®å¼•æ•°ã«æ¡ä»¶ã‚’æŒã¤å ´åˆï¼ˆä¾‹ï¼š `x >= 10 AND x <= 20 AND y >= 20 AND y <= 30`)ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹åˆ†æžã®ãŸã‚ã«ç©ºé–“充填曲線を使用ã—ã¾ã™ã€‚ + +## analyzer_compatibility_join_using_top_level_identifier {#analyzer_compatibility_join_using_top_level_identifier} + +タイプ: Bool + +デフォルト値: 0 + +プロジェクションã‹ã‚‰ã® JOIN USING ã§ã®è­˜åˆ¥å­ã®è§£æ±ºã‚’強制ã—ã¾ã™ï¼ˆä¾‹ãˆã°ã€`SELECT a + 1 AS b FROM t1 JOIN t2 USING (b)` ã®å ´åˆã€çµåˆã¯ `t1.a + 1 = t2.b` ã«ã‚ˆã£ã¦è¡Œã‚ã‚Œã€`t1.b = t2.b` ã§ã¯ã‚ã‚Šã¾ã›ã‚“)。 + +## any_join_distinct_right_table_keys {#any_join_distinct_right_table_keys} + +タイプ: Bool + +デフォルト値: 0 + +`ANY INNER|LEFT JOIN` æ“作ã«ãŠã‘る従æ¥ã® ClickHouse サーãƒã®å‹•ä½œã‚’有効ã«ã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯ã€å¾“æ¥ã® `JOIN` ã®å‹•ä½œã«ä¾å­˜ã™ã‚‹ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ãŒã‚ã‚‹å ´åˆã®ã¿ä½¿ç”¨ã—ã¦ãã ã•ã„。 +::: + +従æ¥ã®å‹•ä½œãŒæœ‰åŠ¹ãªå ´åˆï¼š + +- `t1 ANY LEFT JOIN t2` 㨠`t2 ANY RIGHT JOIN t1` æ“作ã®çµæžœã¯ç­‰ã—ãã‚ã‚Šã¾ã›ã‚“。ãªãœãªã‚‰ã€ClickHouse ã¯å¤šå¯¾ä¸€ã®å·¦ã‹ã‚‰å³ã«ãƒžãƒƒãƒ”ングã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルキーã®ãƒ­ã‚¸ãƒƒã‚¯ã‚’使用ã™ã‚‹ã‹ã‚‰ã§ã™ã€‚ +- `ANY INNER JOIN` æ“作ã®çµæžœã¯ã€`SEMI LEFT JOIN` æ“作ã¨åŒæ§˜ã«ã€å·¦ãƒ†ãƒ¼ãƒ–ルã®ã™ã¹ã¦ã®è¡Œã‚’å«ã¿ã¾ã™ã€‚ + +従æ¥ã®å‹•ä½œãŒç„¡åŠ¹ãªå ´åˆï¼š + +- `t1 ANY LEFT JOIN t2` 㨠`t2 ANY RIGHT JOIN t1` æ“作ã®çµæžœã¯ç­‰ã—ã„ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¾ã™ã€‚ClickHouse 㯠`ANY RIGHT JOIN` æ“作ã§ã®ä¸€å¯¾å¤šã®ã‚­ãƒ¼ã®ãƒžãƒƒãƒ”ングをæä¾›ã™ã‚‹ãƒ­ã‚¸ãƒƒã‚¯ã‚’使用ã™ã‚‹ãŸã‚ã§ã™ã€‚ +- `ANY INNER JOIN` æ“作ã®çµæžœã¯ã€å·¦ãŠã‚ˆã³å³ã®ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã‚­ãƒ¼ã”ã¨ã«ä¸€è¡Œã‚’å«ã¿ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 従æ¥ã®å‹•ä½œãŒç„¡åŠ¹ã€‚ +- 1 — 従æ¥ã®å‹•ä½œãŒæœ‰åŠ¹ã€‚ + +å‚ç…§: + +- [JOIN ã®åŽ³å¯†ã•](../../sql-reference/statements/select/join.md/#join-settings) + +## apply_deleted_mask {#apply_deleted_mask} + +タイプ: Bool + +デフォルト値: 1 + +è«–ç†å‰Šé™¤ã§å‰Šé™¤ã•ã‚ŒãŸè¡Œã‚’フィルタリングã™ã‚‹æ©Ÿèƒ½ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ã“ã‚ŒãŒç„¡åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã¯ã“れらã®è¡Œã‚’読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒãƒƒã‚°ã‚„「未削除ã€ã‚·ãƒŠãƒªã‚ªã«ä¾¿åˆ©ã§ã™ã€‚ + +## apply_mutations_on_fly {#apply_mutations_on_fly} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã‚ŒãŒçœŸã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã«ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œã¦ã„ãªã„変異(UPDATE ãŠã‚ˆã³ DELETE)㌠SELECT ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ClickHouse Cloud ã®ã¿ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +## asterisk_include_alias_columns {#asterisk_include_alias_columns} + +タイプ: Bool + +デフォルト値: 0 + +ワイルドカードクエリ(`SELECT *`)ã®ãŸã‚ã« [ALIAS](../../sql-reference/statements/create/table.md#alias) カラムをå«ã‚ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## asterisk_include_materialized_columns {#asterisk_include_materialized_columns} + +タイプ: Bool + +デフォルト値: 0 + +ワイルドカードクエリ(`SELECT *`)ã®ãŸã‚ã« [MATERIALIZED](../../sql-reference/statements/create/table.md#materialized) カラムをå«ã‚ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## async_insert {#async_insert} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã‚ŒãŒçœŸã®å ´åˆã€INSERT クエリã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã¯ã‚­ãƒ¥ãƒ¼ã«ä¿å­˜ã•ã‚Œã€ãã®å¾Œãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ãƒ†ãƒ¼ãƒ–ルã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚wait_for_async_insert ㌠false ã®å ´åˆã€INSERT クエリã¯ã»ã¼çž¬æ™‚ã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒ‡ãƒ¼ã‚¿ãŒãƒ†ãƒ¼ãƒ–ルã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™ã€‚ + +## async_insert_busy_timeout_decrease_rate {#async_insert_busy_timeout_decrease_rate} + +タイプ: Double + +デフォルト値: 0.2 + +é©å¿œçš„ãªéžåŒæœŸæŒ¿å…¥ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãŒæ¸›å°‘ã™ã‚‹éš›ã®æŒ‡æ•°æˆé•·çŽ‡ã€‚ + +## async_insert_busy_timeout_increase_rate {#async_insert_busy_timeout_increase_rate} + +タイプ: Double + +デフォルト値: 0.2 + +é©å¿œçš„ãªéžåŒæœŸæŒ¿å…¥ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãŒå¢—加ã™ã‚‹éš›ã®æŒ‡æ•°æˆé•·çŽ‡ã€‚ + +## async_insert_busy_timeout_max_ms {#async_insert_busy_timeout_max_ms} + +タイプ: ミリ秒 + +デフォルト値: 200 + +最åˆã®ãƒ‡ãƒ¼ã‚¿ãŒç¾ã‚ŒãŸå¾Œã€ã‚¯ã‚¨ãƒªã”ã¨ã«åŽé›†ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’ダンプã™ã‚‹ã¾ã§å¾…æ©Ÿã™ã‚‹æœ€å¤§æ™‚間。 + +## async_insert_busy_timeout_min_ms {#async_insert_busy_timeout_min_ms} + +タイプ: ミリ秒 + +デフォルト値: 50 + +自動調整㌠async_insert_use_adaptive_busy_timeout を通ã˜ã¦æœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€æœ€åˆã®ãƒ‡ãƒ¼ã‚¿ãŒç¾ã‚Œã¦ã‹ã‚‰ã‚¯ã‚¨ãƒªã”ã¨ã«åŽé›†ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’ダンプã™ã‚‹ã¾ã§ã®æœ€å°æ™‚間。ã“ã®å€¤ã¯ã€é©å¿œã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®åˆæœŸå€¤ã¨ã—ã¦ã‚‚機能ã—ã¾ã™ã€‚ + +## async_insert_deduplicate {#async_insert_deduplicate} + +タイプ: Bool + +デフォルト値: 0 + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã§ã®éžåŒæœŸ INSERT クエリã®å ´åˆã€æŒ¿å…¥ãƒ–ロックã®é‡è¤‡æŽ’除ãŒè¡Œã‚れるã¹ãã“ã¨ã‚’示ã—ã¾ã™ã€‚ + +## async_insert_max_data_size {#async_insert_max_data_size} + +タイプ: UInt64 + +デフォルト値: 10485760 + +挿入ã•ã‚Œã‚‹å‰ã®ã‚¯ã‚¨ãƒªã”ã¨ã«åŽé›†ã•ã‚ŒãŸæœªè§£æžãƒ‡ãƒ¼ã‚¿ã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆæ•°ï¼‰ã€‚ + +## async_insert_max_query_number {#async_insert_max_query_number} + +タイプ: UInt64 + +デフォルト値: 450 + +挿入ã•ã‚Œã‚‹å‰ã®æœ€å¤§ã‚¯ã‚¨ãƒªæ•°ã€‚ + +## async_insert_poll_timeout_ms {#async_insert_poll_timeout_ms} + +タイプ: ミリ秒 + +デフォルト値: 10 + +éžåŒæœŸæŒ¿å…¥ã‚­ãƒ¥ãƒ¼ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ãƒãƒ¼ãƒªãƒ³ã‚°ã™ã‚‹ãŸã‚ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +## async_insert_use_adaptive_busy_timeout {#async_insert_use_adaptive_busy_timeout} + +タイプ: Bool + +デフォルト値: 1 + +ã“ã‚ŒãŒçœŸã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€éžåŒæœŸæŒ¿å…¥ã®ãŸã‚ã«é©å¿œçš„ビジータイムアウトを使用ã—ã¾ã™ã€‚ + +## async_query_sending_for_remote {#async_query_sending_for_remote} + +タイプ: Bool + +デフォルト値: 1 + +リモートクエリを実行ã™ã‚‹éš›ã®éžåŒæœŸæŽ¥ç¶šä½œæˆãŠã‚ˆã³ã‚¯ã‚¨ãƒªé€ä¿¡ã‚’有効ã«ã—ã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã§ã™ã€‚ + +## async_socket_for_remote {#async_socket_for_remote} + +タイプ: Bool + +デフォルト値: 1 + +リモートクエリを実行ã™ã‚‹éš›ã®ã‚½ã‚±ãƒƒãƒˆã‹ã‚‰ã®éžåŒæœŸèª­ã¿å–りを有効ã«ã—ã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã§ã™ã€‚ + +## azure_allow_parallel_part_upload {#azure_allow_parallel_part_upload} + +タイプ: Bool + +デフォルト値: 1 + +複数ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§ Azure マルãƒãƒ‘ートアップロードを使用ã—ã¾ã™ã€‚ + +## azure_check_objects_after_upload {#azure_check_objects_after_upload} + +タイプ: Bool + +デフォルト値: 0 + +アップロードãŒæˆåŠŸã—ãŸã“ã¨ã‚’確èªã™ã‚‹ãŸã‚ã«ã€Azure Blob ストレージã«ã‚¢ãƒƒãƒ—ロードã•ã‚ŒãŸå„オブジェクトをãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +## azure_create_new_file_on_insert {#azure_create_new_file_on_insert} + +タイプ: Bool + +デフォルト値: 0 + +Azure エンジンテーブルã«å„挿入時ã«æ–°ã—ã„ファイルを作æˆã™ã‚‹ã“ã¨ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +## azure_ignore_file_doesnt_exist {#azure_ignore_file_doesnt_exist} + +タイプ: Bool + +デフォルト値: 0 + +特定ã®ã‚­ãƒ¼ã‚’読ã¿å–ã‚‹éš›ã«ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã—ãªã„å ´åˆã€ãã®ä¸åœ¨ã‚’無視ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 1 — `SELECT` ã¯ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ +- 0 — `SELECT` ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## azure_list_object_keys_size {#azure_list_object_keys_size} + +タイプ: UInt64 + +デフォルト値: 1000 + +ListObject リクエストã«ã‚ˆã£ã¦ãƒãƒƒãƒã§è¿”ã•ã‚Œã‚‹å¯èƒ½æ€§ã®ã‚るファイルã®æœ€å¤§æ•°ã€‚ + +## azure_max_blocks_in_multipart_upload {#azure_max_blocks_in_multipart_upload} + +タイプ: UInt64 + +デフォルト値: 50000 + +Azure ã®ãƒžãƒ«ãƒãƒ‘ートアップロードã§ã®æœ€å¤§ãƒ–ロック数。 + +## azure_max_inflight_parts_for_one_file {#azure_max_inflight_parts_for_one_file} + +タイプ: UInt64 + +デフォルト値: 20 + +マルãƒãƒ‘ートアップロードリクエストã§åŒæ™‚ã«èª­ã¿è¾¼ã¾ã‚Œã‚‹éƒ¨å“ã®æœ€å¤§æ•°ã€‚0 ã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## azure_max_single_part_copy_size {#azure_max_single_part_copy_size} + +タイプ: UInt64 + +デフォルト値: 268435456 + +Azure Blob ストレージã«å˜ä¸€ã®ãƒ‘ートコピーを使用ã—ã¦ã‚³ãƒ”ーã™ã‚‹éš›ã®ã‚ªãƒ–ジェクトã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ + +## azure_max_single_part_upload_size {#azure_max_single_part_upload_size} + +タイプ: UInt64 + +デフォルト値: 104857600 + +以下ã¯ã€å˜ä¸€ãƒ‘ートアップロードを使用ã—㦠Azure Blob ストレージã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹ã‚ªãƒ–ジェクトã®æœ€å¤§ã‚µã‚¤ã‚ºã«é–¢ã™ã‚‹ ClickHouse ドキュメントã®ç¿»è¨³ã§ã™ã€‚ + +## azure_max_single_read_retries {#azure_max_single_read_retries} + +タイプ: UInt64 + +デフォルト値: 4 + +å˜ä¸€ã® Azure Blob ストレージリード中ã®æœ€å¤§ãƒªãƒˆãƒ©ã‚¤å›žæ•°ã€‚ + +## azure_max_unexpected_write_error_retries {#azure_max_unexpected_write_error_retries} + +タイプ: UInt64 + +デフォルト値: 4 + +Azure Blob ストレージã¸ã®æ›¸ãè¾¼ã¿ä¸­ã«äºˆæœŸã—ãªã„エラーãŒç™ºç”Ÿã—ãŸå ´åˆã®æœ€å¤§ãƒªãƒˆãƒ©ã‚¤å›žæ•°ã€‚ + +## azure_max_upload_part_size {#azure_max_upload_part_size} + +タイプ: UInt64 + +デフォルト値: 5368709120 + +マルãƒãƒ‘ートアップロード中㫠Azure Blob ストレージã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹ãƒ‘ートã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ + +## azure_min_upload_part_size {#azure_min_upload_part_size} + +タイプ: UInt64 + +デフォルト値: 16777216 + +マルãƒãƒ‘ートアップロード中㫠Azure Blob ストレージã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹ãƒ‘ートã®æœ€å°ã‚µã‚¤ã‚ºã€‚ + +## azure_sdk_max_retries {#azure_sdk_max_retries} + +タイプ: UInt64 + +デフォルト値: 10 + +Azure SDK ã®æœ€å¤§ãƒªãƒˆãƒ©ã‚¤å›žæ•°ã€‚ + +## azure_sdk_retry_initial_backoff_ms {#azure_sdk_retry_initial_backoff_ms} + +タイプ: UInt64 + +デフォルト値: 10 + +Azure SDK ã«ãŠã‘るリトライ間ã®æœ€å°ãƒãƒƒã‚¯ã‚ªãƒ•æ™‚間(ミリ秒)。 + +## azure_sdk_retry_max_backoff_ms {#azure_sdk_retry_max_backoff_ms} + +タイプ: UInt64 + +デフォルト値: 1000 + +Azure SDK ã«ãŠã‘るリトライ間ã®æœ€å¤§ãƒãƒƒã‚¯ã‚ªãƒ•æ™‚間(ミリ秒)。 + +## azure_skip_empty_files {#azure_skip_empty_files} + +タイプ: Bool + +デフォルト値: 0 + +S3 エンジンã§ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 0 — 空ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒè¦æ±‚ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨äº’æ›æ€§ãŒãªã„å ´åˆã€`SELECT` ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ +- 1 — 空ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã—㦠`SELECT` ã¯ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## azure_strict_upload_part_size {#azure_strict_upload_part_size} + +タイプ: UInt64 + +デフォルト値: 0 + +Azure Blob ストレージã«ãƒžãƒ«ãƒãƒ‘ートアップロード中ã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹ãƒ‘ートã®æ­£ç¢ºãªã‚µã‚¤ã‚ºã€‚ + +## azure_throw_on_zero_files_match {#azure_throw_on_zero_files_match} + +タイプ: Bool + +デフォルト値: 0 + +グロブ拡張ルールã«åŸºã¥ã„ã¦ä¸€è‡´ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚¼ãƒ­ã®å ´åˆã«ã‚¨ãƒ©ãƒ¼ã‚’スローã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 1 — `SELECT` ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ +- 0 — `SELECT` ã¯ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## azure_truncate_on_insert {#azure_truncate_on_insert} + +タイプ: Bool + +デフォルト値: 0 + +Azure エンジンテーブルã«æŒ¿å…¥ã™ã‚‹å‰ã«åˆ‡ã‚Šæ¨ã¦ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +## azure_upload_part_size_multiply_factor {#azure_upload_part_size_multiply_factor} + +タイプ: UInt64 + +デフォルト値: 2 + +Azure Blob ストレージã«ä¸€åº¦ã®æ›¸ãè¾¼ã¿ã‹ã‚‰ã‚¢ãƒƒãƒ—ロードã•ã‚ŒãŸ azure_multiply_parts_count_threshold パーツã”ã¨ã« azure_min_upload_part_size ã«æŽ›ã‘る係数。 + +## azure_upload_part_size_multiply_parts_count_threshold {#azure_upload_part_size_multiply_parts_count_threshold} + +タイプ: UInt64 + +デフォルト値: 500 + +ã“ã®æ•°ã®ãƒ‘ーツ㌠Azure Blob ストレージã«ã‚¢ãƒƒãƒ—ロードã•ã‚Œã‚‹ãŸã³ã«ã€azure_min_upload_part_size 㯠azure_upload_part_size_multiply_factor ã§æŽ›ã‘ç®—ã•ã‚Œã¾ã™ã€‚ + +## backup_restore_batch_size_for_keeper_multi {#backup_restore_batch_size_for_keeper_multi} + +タイプ: UInt64 + +デフォルト値: 1000 + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ãŸã¯ãƒªã‚¹ãƒˆã‚¢ä¸­ã® [Zoo]Keeper ã¸ã®ãƒžãƒ«ãƒãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æœ€å¤§ãƒãƒƒãƒã‚µã‚¤ã‚ºã€‚ + +## backup_restore_batch_size_for_keeper_multiread {#backup_restore_batch_size_for_keeper_multiread} + +タイプ: UInt64 + +デフォルト値: 10000 + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ãŸã¯ãƒªã‚¹ãƒˆã‚¢ä¸­ã® [Zoo]Keeper ã¸ã®ãƒžãƒ«ãƒãƒªãƒ¼ãƒ‰ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æœ€å¤§ãƒãƒƒãƒã‚µã‚¤ã‚ºã€‚ + +## backup_restore_failure_after_host_disconnected_for_seconds {#backup_restore_failure_after_host_disconnected_for_seconds} + +タイプ: UInt64 + +デフォルト値: 3600 + +`BACKUP ON CLUSTER` ã¾ãŸã¯ `RESTORE ON CLUSTER` æ“作中ã«ãƒ›ã‚¹ãƒˆãŒã“ã®æ™‚間内㫠ZooKeeper 内ã®ä¸€æ™‚的㪠'alive' ノードをå†ä½œæˆã—ãªã„å ´åˆã€å…¨ä½“ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ãŸã¯ãƒªã‚¹ãƒˆã‚¢ã¯å¤±æ•—ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ +ã“ã®å€¤ã¯ã€ãƒ›ã‚¹ãƒˆãŒéšœå®³å¾Œã« ZooKeeper ã«å†æŽ¥ç¶šã™ã‚‹ã®ã«å分ãªåˆç†çš„ãªæ™‚間より大ãã„å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## backup_restore_finish_timeout_after_error_sec {#backup_restore_finish_timeout_after_error_sec} + +タイプ: UInt64 + +デフォルト値: 180 + +イニシエーターãŒä»–ã®ãƒ›ã‚¹ãƒˆã® 'error' ノードã¸ã®å応を待ã£ã¦ã„ã‚‹é–“ã®æ™‚間。 + +## backup_restore_keeper_fault_injection_probability {#backup_restore_keeper_fault_injection_probability} + +タイプ: Float + +デフォルト値: 0 + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ãŸã¯ãƒªã‚¹ãƒˆã‚¢ä¸­ã® keeper リクエストã®éšœå®³æŒ¿å…¥ã®è¿‘似確率。有効ãªå€¤ã¯ [0.0f, 1.0f] ã®ç¯„囲ã§ã™ã€‚ + +## backup_restore_keeper_fault_injection_seed {#backup_restore_keeper_fault_injection_seed} + +タイプ: UInt64 + +デフォルト値: 0 + +0 - ランダムシードã€ãã†ã§ãªã‘ã‚Œã°è¨­å®šå€¤ã€‚ + +## backup_restore_keeper_max_retries {#backup_restore_keeper_max_retries} + +タイプ: UInt64 + +デフォルト値: 1000 + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ãŸã¯ãƒªã‚¹ãƒˆã‚¢æ“作中㮠[Zoo]Keeper æ“作ã®æœ€å¤§ãƒªãƒˆãƒ©ã‚¤å›žæ•°ã€‚ +一時的㪠[Zoo]Keeper 障害ã®ãŸã‚ã«æ“作全体ãŒå¤±æ•—ã—ãªã„よã†ã«å分大ãã„å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## backup_restore_keeper_max_retries_while_handling_error {#backup_restore_keeper_max_retries_while_handling_error} + +タイプ: UInt64 + +デフォルト値: 20 + +`BACKUP ON CLUSTER` ã¾ãŸã¯ `RESTORE ON CLUSTER` æ“作ã®ã‚¨ãƒ©ãƒ¼ã‚’処ç†ã™ã‚‹éš›ã® [Zoo]Keeper æ“作ã®æœ€å¤§ãƒªãƒˆãƒ©ã‚¤å›žæ•°ã€‚ + +## backup_restore_keeper_max_retries_while_initializing {#backup_restore_keeper_max_retries_while_initializing} + +タイプ: UInt64 + +デフォルト値: 20 + +`BACKUP ON CLUSTER` ã¾ãŸã¯ `RESTORE ON CLUSTER` æ“作ã®åˆæœŸåŒ–中㮠[Zoo]Keeper æ“作ã®æœ€å¤§ãƒªãƒˆãƒ©ã‚¤å›žæ•°ã€‚ + +## backup_restore_keeper_retry_initial_backoff_ms {#backup_restore_keeper_retry_initial_backoff_ms} + +タイプ: UInt64 + +デフォルト値: 100 + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ãŸã¯ãƒªã‚¹ãƒˆã‚¢ä¸­ã® [Zoo]Keeper æ“作ã®åˆæœŸãƒãƒƒã‚¯ã‚ªãƒ•ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +## backup_restore_keeper_retry_max_backoff_ms {#backup_restore_keeper_retry_max_backoff_ms} + +タイプ: UInt64 + +デフォルト値: 5000 + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ãŸã¯ãƒªã‚¹ãƒˆã‚¢ä¸­ã® [Zoo]Keeper æ“作ã®æœ€å¤§ãƒãƒƒã‚¯ã‚ªãƒ•ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +## backup_restore_keeper_value_max_size {#backup_restore_keeper_value_max_size} + +タイプ: UInt64 + +デフォルト値: 1048576 + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—中㮠[Zoo]Keeper ã®ãƒŽãƒ¼ãƒ‰ã®ãƒ‡ãƒ¼ã‚¿ã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ + +## backup_restore_s3_retry_attempts {#backup_restore_s3_retry_attempts} + +タイプ: UInt64 + +デフォルト値: 1000 + +Aws::Client::RetryStrategy ã®è¨­å®šã€‚Aws::Client ã¯è‡ªå‹•çš„ã«ãƒªãƒˆãƒ©ã‚¤ã‚’è¡Œã„ã€0 ã¯ãƒªãƒˆãƒ©ã‚¤ã‚’è¡Œã‚ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/リストアã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +## cache_warmer_threads {#cache_warmer_threads} + +タイプ: UInt64 + +デフォルト値: 4 + +ClickHouse Cloud ã®ã¿ã§ä½¿ç”¨å¯èƒ½ã€‚キャッシュãŒãƒ•ã‚§ãƒƒãƒã«ã‚ˆã£ã¦ãƒãƒ”ュレートã•ã‚Œã‚‹ã¨ãã«ã€æ–°ã—ã„データパーツをファイルキャッシュã«æŽ¨æ¸¬çš„ã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ゼロã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +## calculate_text_stack_trace {#calculate_text_stack_trace} + +タイプ: Bool + +デフォルト値: 1 + +クエリ実行中ã®ä¾‹å¤–発生時ã«ãƒ†ã‚­ã‚¹ãƒˆã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’計算ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã™ã€‚シンボル解決を必è¦ã¨ã—ã€å¤§é‡ã®èª¤ã£ãŸã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹å ´åˆã€ãƒ•ã‚¡ã‚¸ãƒ³ã‚°ãƒ†ã‚¹ãƒˆãŒé…ããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚通常ã®å ´åˆã€ã“ã‚Œã¯ç„¡åŠ¹ã«ã—ãªã„ã§ãã ã•ã„。 + +## cancel_http_readonly_queries_on_client_close {#cancel_http_readonly_queries_on_client_close} + +タイプ: Bool + +デフォルト値: 0 + +クライアントãŒå¿œç­”ã‚’å¾…ãŸãšã«æŽ¥ç¶šã‚’é–‰ã˜ã‚‹ã¨ãã« HTTP 読å–り専用クエリ(例: SELECT)をキャンセルã—ã¾ã™ã€‚ + +クラウドデフォルト値: `1`。 + +## cast_ipv4_ipv6_default_on_conversion_error {#cast_ipv4_ipv6_default_on_conversion_error} + +タイプ: Bool + +デフォルト値: 0 + +IPv4 ã¸ã® CAST 演算å­ã€IPv6 ã¸ã® CAST 演算å­ã€toIPv4ã€toIPv6 関数ã¯ã€å¤‰æ›ã‚¨ãƒ©ãƒ¼æ™‚ã«ä¾‹å¤–をスローã™ã‚‹ä»£ã‚ã‚Šã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +## cast_keep_nullable {#cast_keep_nullable} + +タイプ: Bool + +デフォルト値: 0 + +[CAST](../../sql-reference/functions/type-conversion-functions.md/#castx-t) æ“作ã«ãŠã‘ã‚‹ `Nullable` データ型ã®ä¿æŒã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +設定ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€`CAST` 関数ã®å¼•æ•°ãŒ `Nullable` ã§ã‚ã‚Œã°ã€çµæžœã‚‚ `Nullable` åž‹ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚設定ãŒç„¡åŠ¹ã®å ´åˆã€çµæžœã¯å¸¸ã«æ­£ç¢ºã«å®›å…ˆåž‹ã«ãªã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — `CAST` çµæžœã¯æŒ‡å®šã•ã‚ŒãŸå®›å…ˆåž‹ã¨æ­£ç¢ºã«ä¸€è‡´ã—ã¾ã™ã€‚ +- 1 — 引数ã®åž‹ãŒ `Nullable` ã®å ´åˆã€`CAST` çµæžœã¯ `Nullable(DestinationDataType)` ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +**例** + +以下ã®ã‚¯ã‚¨ãƒªã¯ã€å®›å…ˆãƒ‡ãƒ¼ã‚¿åž‹ã‚’正確ã«è¿”ã—ã¾ã™ã€‚ + +```sql +SET cast_keep_nullable = 0; +SELECT CAST(toNullable(toInt32(0)) AS Int32) as x, toTypeName(x); +``` + +çµæžœ: + +```text +┌─x─┬─toTypeName(CAST(toNullable(toInt32(0)), 'Int32'))─┠+│ 0 │ Int32 │ +└───┴───────────────────────────────────────────────────┘ +``` + +以下ã®ã‚¯ã‚¨ãƒªã¯ã€å®›å…ˆãƒ‡ãƒ¼ã‚¿åž‹ã« `Nullable` 修飾ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ + +```sql +SET cast_keep_nullable = 1; +SELECT CAST(toNullable(toInt32(0)) AS Int32) as x, toTypeName(x); +``` + +çµæžœ: + +```text +┌─x─┬─toTypeName(CAST(toNullable(toInt32(0)), 'Int32'))─┠+│ 0 │ Nullable(Int32) │ +└───┴───────────────────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [CAST](../../sql-reference/functions/type-conversion-functions.md/#type_conversion_function-cast) 関数 + +## cast_string_to_dynamic_use_inference {#cast_string_to_dynamic_use_inference} + +タイプ: Bool + +デフォルト値: 0 + +文字列ã‹ã‚‰å‹•çš„ã¸ã®å¤‰æ›ä¸­ã«åž‹ã®æŽ¨è«–を使用ã—ã¾ã™ã€‚ + +## check_query_single_value_result {#check_query_single_value_result} + +タイプ: Bool + +デフォルト値: 1 + +`MergeTree` ファミリーエンジン㮠[CHECK TABLE](../../sql-reference/statements/check-table.md/#checking-mergetree-tables) クエリçµæžœã«å¯¾ã™ã‚‹è©³ç´°ãƒ¬ãƒ™ãƒ«ã‚’定義ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — クエリã¯ãƒ†ãƒ¼ãƒ–ルã®å„データパートã®ãƒã‚§ãƒƒã‚¯ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’表示ã—ã¾ã™ã€‚ +- 1 — クエリã¯ä¸€èˆ¬çš„ãªãƒ†ãƒ¼ãƒ–ルãƒã‚§ãƒƒã‚¯ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’表示ã—ã¾ã™ã€‚ + +## check_referential_table_dependencies {#check_referential_table_dependencies} + +タイプ: Bool + +デフォルト値: 0 + +DDL クエリ(例ãˆã° DROP TABLE ã‚„ RENAME)ãŒå‚ç…§ä¾å­˜é–¢ä¿‚を壊ã•ãªã„ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +## check_table_dependencies {#check_table_dependencies} + +タイプ: Bool + +デフォルト値: 1 + +DDL クエリ(例ãˆã° DROP TABLE ã‚„ RENAME)ãŒä¾å­˜é–¢ä¿‚を壊ã•ãªã„ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +## checksum_on_read {#checksum_on_read} + +タイプ: Bool + +デフォルト値: 1 + +読ã¿å–り時ã«ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’検証ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã«ãªã£ã¦ãŠã‚Šã€æœ¬ç•ªç’°å¢ƒã§ã¯å¸¸ã«æœ‰åŠ¹ã«ã—ã¦ãŠãã¹ãã§ã™ã€‚設定を無効ã«ã—ã¦ã‚‚利点ã¯æœŸå¾…ã§ãã¾ã›ã‚“。ã“ã‚Œã¯å®Ÿé¨“やベンãƒãƒžãƒ¼ã‚¯ã«ã®ã¿ä½¿ç”¨ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã¯ MergeTree ファミリーã®ãƒ†ãƒ¼ãƒ–ルã«ã®ã¿é©ç”¨ã•ã‚Œã€ä»–ã®ãƒ†ãƒ¼ãƒ–ルエンジンやãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯çµŒç”±ã§ãƒ‡ãƒ¼ã‚¿ã‚’å—ä¿¡ã™ã‚‹å ´åˆã¯å¸¸ã«ãƒã‚§ãƒƒã‚¯ã‚µãƒ ãŒæ¤œè¨¼ã•ã‚Œã¾ã™ã€‚ + +## cloud_mode {#cloud_mode} + +タイプ: Bool + +デフォルト値: 0 + +クラウドモード。 + +## cloud_mode_database_engine {#cloud_mode_database_engine} + +タイプ: UInt64 + +デフォルト値: 1 + +クラウドã§è¨±å¯ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã€‚1 - DDL を使用ã—㦠Replicated データベースã«æ›¸ãæ›ãˆã‚‹ã€2 - DDL を使用ã—㦠Shared データベースã«æ›¸ãæ›ãˆã‚‹ã€‚ + +## cloud_mode_engine {#cloud_mode_engine} + +タイプ: UInt64 + +デフォルト値: 1 + +クラウドã§è¨±å¯ã•ã‚Œã‚‹ã‚¨ãƒ³ã‚¸ãƒ³ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã€‚0 - ã™ã¹ã¦ã‚’許å¯ã€1 - DDL を使用ã—㦠*ReplicatedMergeTree ã«æ›¸ãæ›ãˆã€2 - DDL を使用ã—㦠SharedMergeTree ã«æ›¸ãæ›ãˆã€‚UInt64 ã«ã‚ˆã‚Šå…¬é–‹éƒ¨åˆ†ã‚’最å°åŒ–ã—ã¾ã™ã€‚ + +## cluster_for_parallel_replicas {#cluster_for_parallel_replicas} + +タイプ: String + +デフォルト値: + +ç¾åœ¨ã®ã‚µãƒ¼ãƒãƒ¼ãŒä½ç½®ã™ã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã€‚ + +## collect_hash_table_stats_during_aggregation {#collect_hash_table_stats_during_aggregation} + +タイプ: Bool + +デフォルト値: 1 + +メモリ割り当ã¦ã‚’最é©åŒ–ã™ã‚‹ãŸã‚ã«ã€ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®çµ±è¨ˆã‚’åŽé›†ã™ã‚‹ã“ã¨ã‚’有効ã«ã—ã¾ã™ã€‚ + +## collect_hash_table_stats_during_joins {#collect_hash_table_stats_during_joins} + +タイプ: Bool + +デフォルト値: 1 + +メモリ割り当ã¦ã‚’最é©åŒ–ã™ã‚‹ãŸã‚ã«ã€ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®çµ±è¨ˆã‚’åŽé›†ã™ã‚‹ã“ã¨ã‚’有効ã«ã—ã¾ã™ã€‚ + +## compatibility {#compatibility} + +タイプ: String + +デフォルト値: + +`compatibility` 設定㯠ClickHouse ã«å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šã‚’使用ã•ã›ã¾ã™ã€‚å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯è¨­å®šã¨ã—ã¦æä¾›ã•ã‚Œã¾ã™ã€‚ + +設定ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ä»¥å¤–ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãれらã®è¨­å®šã¯å°Šé‡ã•ã‚Œã¾ã™ï¼ˆä¿®æ­£ã•ã‚Œã¦ã„ãªã„設定ã®ã¿ãŒ `compatibility` 設定ã®å½±éŸ¿ã‚’å—ã‘ã¾ã™ï¼‰ã€‚ + +ã“ã®è¨­å®šã¯ ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’文字列ã¨ã—ã¦å—ã‘å–ã‚Šã¾ã™ã€‚例ãˆã°ã€`22.3`ã€`22.8` 等。空ã®å€¤ã¯ã“ã®è¨­å®šãŒç„¡åŠ¹ã§ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ + +:::note +ClickHouse Cloud ã§ã¯ã€äº’æ›æ€§è¨­å®šã¯ ClickHouse Cloud サãƒãƒ¼ãƒˆã«ã‚ˆã£ã¦è¨­å®šã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。設定を行ã†ã«ã¯ [ケースを開ã„ã¦ãã ã•ã„](https://clickhouse.cloud/support)。 +::: + +## compatibility_ignore_auto_increment_in_create_table {#compatibility_ignore_auto_increment_in_create_table} + +タイプ: Bool + +デフォルト値: 0 + +true ã®å ´åˆã€ã‚«ãƒ©ãƒ å®£è¨€ã® AUTO_INCREMENT キーワードを無視ã—ã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ã“れ㯠MySQL ã‹ã‚‰ã®ç§»è¡Œã‚’簡素化ã—ã¾ã™ã€‚ + +## compatibility_ignore_collation_in_create_table {#compatibility_ignore_collation_in_create_table} + +タイプ: Bool + +デフォルト値: 1 + +テーブル作æˆæ™‚ã®ç…§åˆã®äº’æ›æ€§ã‚’無視ã—ã¾ã™ã€‚ + +## compile_aggregate_expressions {#compile_aggregate_expressions} + +タイプ: Bool + +デフォルト値: 1 + +集計関数をãƒã‚¤ãƒ†ã‚£ãƒ–コード㫠JIT コンパイルã™ã‚‹ã“ã¨ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€ãƒ‘フォーマンスãŒå‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 集計㯠JIT コンパイルãªã—ã§è¡Œã‚ã‚Œã¾ã™ã€‚ +- 1 — 集計㯠JIT コンパイルを使用ã—ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ + +**å‚ç…§** + +- [min_count_to_compile_aggregate_expression](#min_count_to_compile_aggregate_expression) + +## compile_expressions {#compile_expressions} + +タイプ: Bool + +デフォルト値: 0 + +ã„ãã¤ã‹ã®ã‚¹ã‚«ãƒ©ãƒ¼é–¢æ•°ã¨æ¼”ç®—å­ã‚’ãƒã‚¤ãƒ†ã‚£ãƒ–コードã«ã‚³ãƒ³ãƒ‘イルã—ã¾ã™ã€‚LLVM コンパイラインフラストラクãƒãƒ£ã®ãƒã‚°ã«ã‚ˆã‚Šã€AArch64 マシン㧠nullptr å‚照解除を引ãèµ·ã“ã—ã€ãã®çµæžœã€ã‚µãƒ¼ãƒãƒ¼ãŒã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹ã“ã¨ãŒçŸ¥ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®è¨­å®šã¯æœ‰åŠ¹ã«ã—ãªã„ã§ãã ã•ã„。 + +## compile_sort_description {#compile_sort_description} + +タイプ: Bool + +デフォルト値: 1 + +ソート説明をãƒã‚¤ãƒ†ã‚£ãƒ–コードã«ã‚³ãƒ³ãƒ‘イルã—ã¾ã™ã€‚ + +## connect_timeout {#connect_timeout} + +タイプ: Seconds + +デフォルト値: 10 + +レプリカãŒãªã„å ´åˆã®æŽ¥ç¶šã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +## connect_timeout_with_failover_ms {#connect_timeout_with_failover_ms} + +タイプ: Milliseconds + +デフォルト値: 1000 + +分散テーブルエンジンã«ãŠã‘るリモートサーãƒãƒ¼æŽ¥ç¶šã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆãƒŸãƒªç§’)。`shard` ãŠã‚ˆã³ `replica` セクションãŒã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å®šç¾©ã«ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€‚ +接続ã«å¤±æ•—ã—ãŸå ´åˆã€ã•ã¾ã–ã¾ãªãƒ¬ãƒ—リカã¸ã®è¤‡æ•°ã®æŽ¥ç¶šè©¦è¡ŒãŒè¡Œã‚ã‚Œã¾ã™ã€‚ + +## connect_timeout_with_failover_secure_ms {#connect_timeout_with_failover_secure_ms} + +タイプ: Milliseconds + +デフォルト値: 1000 + +最åˆã®å¥å…¨ãªãƒ¬ãƒ—リカをé¸æŠžã™ã‚‹ãŸã‚ã®æŽ¥ç¶šã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆã‚»ã‚­ãƒ¥ã‚¢ãªæŽ¥ç¶šç”¨ï¼‰ã€‚ + +## connection_pool_max_wait_ms {#connection_pool_max_wait_ms} + +タイプ: Milliseconds + +デフォルト値: 0 + +接続プールãŒæº€æ¯ã®ã¨ãã«æŽ¥ç¶šã‚’å¾…ã¤æ™‚間(ミリ秒)。 + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — ç„¡é™ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +## connections_with_failover_max_tries {#connections_with_failover_max_tries} + +タイプ: UInt64 + +デフォルト値: 3 + +分散テーブルエンジンã«ãŠã‘ã‚‹å„レプリカã¨ã®æŽ¥ç¶šè©¦è¡Œã®æœ€å¤§æ•°ã€‚ + +## convert_query_to_cnf {#convert_query_to_cnf} + +タイプ: Bool + +デフォルト値: 0 + +`true` ã«è¨­å®šã™ã‚‹ã¨ã€`SELECT` クエリãŒçµåˆæ¨™æº–形(CNF)ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚CNF ã«ã‚¯ã‚¨ãƒªã‚’書ãæ›ãˆã‚‹ã“ã¨ã§å®Ÿè¡ŒãŒé€Ÿããªã‚‹ã‚·ãƒŠãƒªã‚ªãŒã‚ã‚Šã¾ã™ï¼ˆå¤‰æ›´ã®èª¬æ˜Žã«ã¤ã„ã¦ã¯ã“ã® [Github issue](https://github.com/ClickHouse/ClickHouse/issues/11749) ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +以下㮠`SELECT` クエリãŒå¤‰æ›´ã•ã‚Œãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„(デフォルト動作): + +```sql +EXPLAIN SYNTAX +SELECT * +FROM +( + SELECT number AS x + FROM numbers(20) +) AS a +WHERE ((x >= 1) AND (x <= 5)) OR ((x >= 10) AND (x <= 15)) +SETTINGS convert_query_to_cnf = false; +``` + +çµæžœã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```response +┌─explain────────────────────────────────────────────────────────┠+│ SELECT x │ +│ FROM │ +│ ( │ +│ SELECT number AS x │ +│ FROM numbers(20) │ +│ WHERE ((x >= 1) AND (x <= 5)) OR ((x >= 10) AND (x <= 15)) │ +│ ) AS a │ +│ WHERE ((x >= 1) AND (x <= 5)) OR ((x >= 10) AND (x <= 15)) │ +│ SETTINGS convert_query_to_cnf = 0 │ +└────────────────────────────────────────────────────────────────┘ +``` + +`convert_query_to_cnf` ã‚’ `true` ã«è¨­å®šã—ã¦ã€å¤‰æ›´ã‚’確èªã—ã¾ã—ょã†ï¼š + +```sql +EXPLAIN SYNTAX +SELECT * +FROM +( + SELECT number AS x + FROM numbers(20) +) AS a +WHERE ((x >= 1) AND (x <= 5)) OR ((x >= 10) AND (x <= 15)) +SETTINGS convert_query_to_cnf = true; +``` + +`WHERE` å¥ãŒ CNF ã§æ›¸ãæ›ãˆã‚‰ã‚Œã¦ã„ã‚‹ã“ã¨ã«æ°—ã¥ãã¾ã™ãŒã€çµæžœã‚»ãƒƒãƒˆã¯åŒã˜ã§ã™ã€‚è«–ç†ã¯å¤‰æ›´ã•ã‚Œã¦ã„ã¾ã›ã‚“: + +```response +┌─explain───────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ SELECT x │ +│ FROM │ +│ ( │ +│ SELECT number AS x │ +│ FROM numbers(20) │ +│ WHERE ((x <= 15) OR (x <= 5)) AND ((x <= 15) OR (x >= 1)) AND ((x >= 10) OR (x <= 5)) AND ((x >= 10) OR (x >= 1)) │ +│ ) AS a │ +│ WHERE ((x >= 10) OR (x >= 1)) AND ((x >= 10) OR (x <= 5)) AND ((x <= 15) OR (x >= 1)) AND ((x <= 15) OR (x <= 5)) │ +│ SETTINGS convert_query_to_cnf = 1 │ +└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +å¯èƒ½ãªå€¤: true, false + +## count_distinct_implementation {#count_distinct_implementation} + +タイプ: String + +デフォルト値: uniqExact + +[CATEGORY(DISTINCT ...)](../../sql-reference/aggregate-functions/reference/count.md/#agg_function-count) 構文を実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ `uniq*` 関数ã®æŒ‡å®šã‚’è¡Œã„ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- [uniq](../../sql-reference/aggregate-functions/reference/uniq.md/#agg_function-uniq) +- [uniqCombined](../../sql-reference/aggregate-functions/reference/uniqcombined.md/#agg_function-uniqcombined) +- [uniqCombined64](../../sql-reference/aggregate-functions/reference/uniqcombined64.md/#agg_function-uniqcombined64) +- [uniqHLL12](../../sql-reference/aggregate-functions/reference/uniqhll12.md/#agg_function-uniqhll12) +- [uniqExact](../../sql-reference/aggregate-functions/reference/uniqexact.md/#agg_function-uniqexact) + +## count_distinct_optimization {#count_distinct_optimization} + +タイプ: Bool + +デフォルト値: 0 + +distinct ã®ã‚«ã‚¦ãƒ³ãƒˆã‚’書ãæ›ãˆã¦ã‚°ãƒ«ãƒ¼ãƒ—化ã®ã‚µãƒ–クエリã¨ã—ã¾ã™ã€‚ + +## create_if_not_exists {#create_if_not_exists} + +タイプ: Bool + +デフォルト値: 0 + +`CREATE` æ–‡ã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ `IF NOT EXISTS` を有効ã«ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¾ãŸã¯ `IF NOT EXISTS` ãŒæŒ‡å®šã•ã‚Œã€æä¾›ã•ã‚ŒãŸåå‰ã®ãƒ†ãƒ¼ãƒ–ルãŒã™ã§ã«å­˜åœ¨ã™ã‚‹å ´åˆã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã›ã‚“。 + +## create_index_ignore_unique {#create_index_ignore_unique} + +タイプ: Bool + +デフォルト値: 0 + +CREATE UNIQUE INDEX ã«ãŠã‘ã‚‹ UNIQUE キーワードを無視ã—ã¾ã™ã€‚SQL 互æ›æ€§ã®ãƒ†ã‚¹ãƒˆç”¨ã«ä½œæˆã•ã‚Œã¾ã—ãŸã€‚ + +## create_replicated_merge_tree_fault_injection_probability {#create_replicated_merge_tree_fault_injection_probability} + +タイプ: Float + +デフォルト値: 0 + +メタデータを ZooKeeper ã«ä½œæˆã—ãŸå¾Œã«ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹éš›ã®éšœå®³æŒ¿å…¥ã®ç¢ºçŽ‡ã€‚ + +## create_table_empty_primary_key_by_default {#create_table_empty_primary_key_by_default} + +タイプ: Bool + +デフォルト値: 0 + +ORDER BY ãŠã‚ˆã³ PRIMARY KEY ãŒæŒ‡å®šã•ã‚Œãªã„å ´åˆã«ã€*MergeTree テーブルを空ã®ä¸»ã‚­ãƒ¼ã§ä½œæˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## cross_join_min_bytes_to_compress {#cross_join_min_bytes_to_compress} + +タイプ: UInt64 + +デフォルト値: 1073741824 + +CROSS JOIN ã§åœ§ç¸®ã™ã‚‹ãŸã‚ã®ãƒ–ロックã®æœ€å°ã‚µã‚¤ã‚ºã€‚ゼロ値ã¯ã“ã®ã—ãã„値を無効ã«ã—ã¾ã™ã€‚ã“ã®ãƒ–ロックã¯ã€è¡Œã¾ãŸã¯ãƒã‚¤ãƒˆã®ã„ãšã‚Œã‹ã®ã—ãã„値ã«é”ã—ãŸã¨ãã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ + +## cross_join_min_rows_to_compress {#cross_join_min_rows_to_compress} + +タイプ: UInt64 + +デフォルト値: 10000000 + +CROSS JOIN ã§åœ§ç¸®ã™ã‚‹ãƒ–ロックã®æœ€å°è¡Œæ•°ã€‚ゼロ値ã¯ã“ã®ã—ãã„値を無効ã«ã—ã¾ã™ã€‚ã“ã®ãƒ–ロックã¯ã€è¡Œã¾ãŸã¯ãƒã‚¤ãƒˆã®ã„ãšã‚Œã‹ã®ã—ãã„値ã«é”ã—ãŸã¨ãã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ + +## data_type_default_nullable {#data_type_default_nullable} + +タイプ: Bool + +デフォルト値: 0 + +カラム定義ã«æ˜Žç¤ºçš„ãªä¿®é£¾å­ [NULL ã¾ãŸã¯ NOT NULL](../../sql-reference/statements/create/table.md/#null-modifiers) ãŒãªã„データ型㌠[Nullable](../../sql-reference/data-types/nullable.md/#data_type-nullable) ã§ã‚ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — カラム定義ã®ãƒ‡ãƒ¼ã‚¿åž‹ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ `Nullable` ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ +- 0 — カラム定義ã®ãƒ‡ãƒ¼ã‚¿åž‹ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ `Nullable` ã§ã¯ãªã„よã†ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ + +## database_atomic_wait_for_drop_and_detach_synchronously {#database_atomic_wait_for_drop_and_detach_synchronously} + +タイプ: Bool + +デフォルト値: 0 + +ã™ã¹ã¦ã® `DROP` ãŠã‚ˆã³ `DETACH` クエリ㫠`SYNC` 修飾å­ã‚’追加ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — クエリã¯é…延ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +- 1 — クエリã¯é…延ãªã—ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +## database_replicated_allow_explicit_uuid {#database_replicated_allow_explicit_uuid} + +タイプ: UInt64 + +デフォルト値: 0 + +0 - 複製データベース内ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—㦠UUID を明示的ã«æŒ‡å®šã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã›ã‚“。1 - 許å¯ã—ã¾ã™ã€‚2 - 許å¯ã—ã¾ã™ãŒã€æŒ‡å®šã•ã‚ŒãŸ UUID を無視ã—ã¦ãƒ©ãƒ³ãƒ€ãƒ ãªã‚‚ã®ã‚’生æˆã—ã¾ã™ã€‚ + +## database_replicated_allow_heavy_create {#database_replicated_allow_heavy_create} + +タイプ: Bool + +デフォルト値: 0 + +複製データベースエンジンã§ã®é•·æ™‚間実行ã•ã‚Œã‚‹ DDL クエリ(CREATE AS SELECT ãŠã‚ˆã³ POPULATE)を許å¯ã—ã¾ã™ã€‚ã“れ㯠DDL キューを長時間ブロックã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## database_replicated_allow_only_replicated_engine {#database_replicated_allow_only_replicated_engine} + +タイプ: Bool + +デフォルト値: 0 + +Replicated エンジンã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã§ã®ã¿ Replicated テーブルを作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## database_replicated_allow_replicated_engine_arguments {#database_replicated_allow_replicated_engine_arguments} + +タイプ: UInt64 + +デフォルト値: 0 + +0 - 複製データベース内㮠*MergeTree テーブルã«å¯¾ã—㦠ZooKeeper パスã¨ãƒ¬ãƒ—リカåを明示的ã«æŒ‡å®šã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã›ã‚“。1 - 許å¯ã—ã¾ã™ã€‚2 - 許å¯ã—ã¾ã™ãŒã€æŒ‡å®šã•ã‚ŒãŸãƒ‘スを無視ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚‚ã®ã‚’使用ã—ã¾ã™ã€‚3 - 許å¯ã—ã€è­¦å‘Šã‚’ログã«è¨˜éŒ²ã—ã¾ã›ã‚“。 + +## database_replicated_always_detach_permanently {#database_replicated_always_detach_permanently} + +タイプ: Bool + +デフォルト値: 0 + +データベースエンジン㌠Replicated ã®å ´åˆã€DETACH TABLE ã‚’ DETACH TABLE PERMANENTLY ã¨ã—ã¦å®Ÿè¡Œã—ã¾ã™ã€‚ + +## database_replicated_enforce_synchronous_settings {#database_replicated_enforce_synchronous_settings} + +タイプ: Bool + +デフォルト値: 0 + +一部ã®ã‚¯ã‚¨ãƒªã«å¯¾ã™ã‚‹åŒæœŸå¾…機を強制ã—ã¾ã™ï¼ˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åŽŸå­çš„ãªå‰Šé™¤ã¨åˆ‡ã‚Šé›¢ã—ã€mutation_syncã€alter_sync ã‚‚å‚照)。ã“れらã®è¨­å®šã‚’有効ã«ã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + +## database_replicated_initial_query_timeout_sec {#database_replicated_initial_query_timeout_sec} + +タイプ: UInt64 + +デフォルト値: 300 + +åˆæœŸ DDL クエリãŒè¤‡è£½ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãŠã„ã¦å‰ã® DDL キューエントリを処ç†ã™ã‚‹ã®ã‚’å¾…ã¤æ™‚間を秒å˜ä½ã§è¨­å®šã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — ç„¡é™ã€‚ + +## decimal_check_overflow {#decimal_check_overflow} + +タイプ: Bool + +デフォルト値: 1 + +å°æ•°ã®ç®—è¡“/比較æ“作ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +## deduplicate_blocks_in_dependent_materialized_views {#deduplicate_blocks_in_dependent_materialized_views} + +タイプ: Bool + +デフォルト値: 0 + +Replicated* テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘å–るマテリアライズドビューã«å¯¾ã™ã‚‹é‡è¤‡æŽ’除ãƒã‚§ãƒƒã‚¯ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +0 — 無効。 +1 — 有効。 + +使用 + +デフォルトã§ã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã«å¯¾ã™ã‚‹é‡è¤‡æŽ’除ã¯è¡Œã‚ã‚Œã¾ã›ã‚“ãŒã€ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã§è¡Œã‚ã‚Œã¾ã™ã€‚ +ソーステーブルã§é‡è¤‡æŽ’除ã®ãŸã‚ã«æŒ¿å…¥ã•ã‚ŒãŸãƒ–ロックãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã‚‹ã¨ã€ä»˜éšçš„ãªãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¸ã®æŒ¿å…¥ã¯è¡Œã‚ã‚Œã¾ã›ã‚“。ã“ã®å‹•ä½œã¯ã€é›†ç´„ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒç•°ãªã‚‹ INSERT ã‹ã‚‰å¾—られã¦ã„ã‚‹å ´åˆã§ã‚‚マテリアライズドビューã«æŒ¿å…¥ã§ãã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ +åŒæ™‚ã«ã€ã“ã®æŒ™å‹•ã¯ `INSERT` ã®å†ªç­‰æ€§ã‚’「破りã¾ã™ã€ã€‚主テーブルã¸ã® `INSERT` ãŒæˆåŠŸã—ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¸ã® `INSERT` ãŒå¤±æ•—ã—ãŸå ´åˆï¼ˆä¾‹: ClickHouse Keeper ã¨ã®é€šä¿¡ã«å¤±æ•—)ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ã‚¨ãƒ©ãƒ¼ã‚’å—ã‘å–ã‚Šæ“作をå†è©¦è¡Œã§ãã¾ã™ã€‚ã—ã‹ã—ã€æœ€åˆã®å¤±æ•—ã«ã‚ˆã‚Šå¤±ã‚ã‚ŒãŸè¡Œã‚’挿入ã™ã‚‹ã“ã¨ã¯ã€ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã®é‡è¤‡æŽ’除ã«ã‚ˆã£ã¦æ£„å´ã•ã‚Œã¾ã™ã€‚設定 `deduplicate_blocks_in_dependent_materialized_views` ã¯ã€ã“ã®å‹•ä½œã‚’変更ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚å†è©¦è¡Œæ™‚ã«ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯å†æŒ¿å…¥ã‚’å—ã‘å–ã‚Šã€è‡ªèº«ã§é‡è¤‡æŽ’除ãƒã‚§ãƒƒã‚¯ã‚’è¡Œã„ã¾ã™ã€‚ +ソーステーブルã®ãƒã‚§ãƒƒã‚¯çµæžœã‚’無視ã—ã€æœ€åˆã®å¤±æ•—ã«ã‚ˆã‚Šå¤±ã£ãŸè¡Œã‚’挿入ã—ã¾ã™ã€‚ + +## default_materialized_view_sql_security {#default_materialized_view_sql_security} + +タイプ: SQLSecurityType + +デフォルト値: DEFINER + +マテリアライズドビュー作æˆæ™‚ã« SQL SECURITY オプションã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’設定ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ [SQL セキュリティã®è©³ç´°](../../sql-reference/statements/create/view.md#sql_security) + +デフォルト値㯠`DEFINER` ã§ã™ã€‚ + +## default_max_bytes_in_join {#default_max_bytes_in_join} + +タイプ: UInt64 + +デフォルト値: 1000000000 + +制é™ãŒå¿…è¦ãªå ´åˆã€å³å´ã®ãƒ†ãƒ¼ãƒ–ルã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ãŸã ã— max_bytes_in_join ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€‚ + +## default_normal_view_sql_security {#default_normal_view_sql_security} + +タイプ: SQLSecurityType + +デフォルト値: INVOKER + +通常ã®ãƒ“ューを作æˆã™ã‚‹éš›ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ `SQL SECURITY` オプションを設定ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ [SQL セキュリティã®è©³ç´°](../../sql-reference/statements/create/view.md#sql_security)。 + +デフォルト値㯠`INVOKER` ã§ã™ã€‚ + +## default_table_engine {#default_table_engine} + +タイプ: DefaultTableEngine + +デフォルト値: MergeTree + +`CREATE` 文㧠`ENGINE` ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ†ãƒ¼ãƒ–ルエンジン。 + +å¯èƒ½ãªå€¤: + +- 有効ãªãƒ†ãƒ¼ãƒ–ルエンジンåを表ã™æ–‡å­—列。 + +クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤: `SharedMergeTree`。 + +**例** + +クエリ: + +```sql +SET default_table_engine = 'Log'; + +SELECT name, value, changed FROM system.settings WHERE name = 'default_table_engine'; +``` + +çµæžœï¼š + +```response +┌─name─────────────────┬─value─┬─changed─┠+│ default_table_engine │ Log │ 1 │ +└──────────────────────┴───────┴─────────┘ +``` + +ã“ã®ä¾‹ã§ã¯ã€ã‚¨ãƒ³ã‚¸ãƒ³ã‚’指定ã—ã¦ã„ãªã„æ–°ã—ã„テーブルã¯ã€`Log` テーブルエンジンを使用ã—ã¾ã™ï¼š + +クエリ: + +```sql +CREATE TABLE my_table ( + x UInt32, + y UInt32 +); + +SHOW CREATE TABLE my_table; +``` + +çµæžœï¼š + +```response +┌─statement────────────────────────────────────────────────────────────────┠+│ CREATE TABLE default.my_table +( + `x` UInt32, + `y` UInt32 +) +ENGINE = Log +└──────────────────────────────────────────────────────────────────────────┘ +``` + +## default_temporary_table_engine {#default_temporary_table_engine} + +タイプ: DefaultTableEngine + +デフォルト値: Memory + +一時テーブルã®ãŸã‚ã® [default_table_engine](#default_table_engine) ã¨åŒã˜ã€‚ + +ã“ã®ä¾‹ã§ã¯ã€ã‚¨ãƒ³ã‚¸ãƒ³ã‚’指定ã—ã¦ã„ãªã„æ–°ã—ã„一時テーブルã¯ã€`Log` テーブルエンジンを使用ã—ã¾ã™ï¼š + +クエリ: + +```sql +SET default_temporary_table_engine = 'Log'; + +CREATE TEMPORARY TABLE my_table ( + x UInt32, + y UInt32 +); + +SHOW CREATE TEMPORARY TABLE my_table; +``` + +çµæžœï¼š + +```response +┌─statement────────────────────────────────────────────────────────────────┠+│ CREATE TEMPORARY TABLE default.my_table +( + `x` UInt32, + `y` UInt32 +) +ENGINE = Log +└──────────────────────────────────────────────────────────────────────────┘ +``` + +## default_view_definer {#default_view_definer} + +タイプ: String + +デフォルト値: CURRENT_USER + +ビュー作æˆæ™‚ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ `DEFINER` オプションを設定ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ [SQL セキュリティã®è©³ç´°](../../sql-reference/statements/create/view.md#sql_security) + +デフォルト値㯠`CURRENT_USER` ã§ã™ã€‚ + +## describe_compact_output {#describe_compact_output} + +タイプ: Bool + +デフォルト値: 0 + +true ã®å ´åˆã€DESCRIBE クエリã®çµæžœã«åˆ—åã¨åž‹ã®ã¿ã‚’å«ã‚ã¾ã™ã€‚ + +## describe_extend_object_types {#describe_extend_object_types} + +タイプ: Bool + +デフォルト値: 0 + +DESCRIBE クエリã§ã‚ªãƒ–ジェクト型ã®åˆ—ã®å…·ä½“çš„ãªåž‹ã‚’推測ã—ã¾ã™ã€‚ + +## describe_include_subcolumns {#describe_include_subcolumns} + +タイプ: Bool + +デフォルト値: 0 + +[DESCRIBE](../../sql-reference/statements/describe-table.md) クエリã®ãŸã‚ã«ã‚µãƒ–カラムã®è¨˜è¿°ã‚’有効ã«ã—ã¾ã™ã€‚例ãˆã°ã€[Tuple](../../sql-reference/data-types/tuple.md) ã®ãƒ¡ãƒ³ãƒãƒ¼ã‚„ã€[Map](../../sql-reference/data-types/map.md/#map-subcolumns)ã€[Nullable](../../sql-reference/data-types/nullable.md/#finding-null) ã¾ãŸã¯ [Array](../../sql-reference/data-types/array.md/#array-size) データ型ã®ã‚µãƒ–カラム。 + +å¯èƒ½ãªå€¤: + +- 0 — サブカラム㯠`DESCRIBE` クエリã«å«ã¾ã‚Œã¾ã›ã‚“。 +- 1 — サブカラム㯠`DESCRIBE` クエリã«å«ã¾ã‚Œã¾ã™ã€‚ + +**例** + +[DESCRIBE](../../sql-reference/statements/describe-table.md) ステートメントã®ä¾‹ã‚’å‚照。 + +## describe_include_virtual_columns {#describe_include_virtual_columns} + +タイプ: Bool + +デフォルト値: 0 + +true ã®å ´åˆã€DESCRIBE クエリã®çµæžœã«ãƒ†ãƒ¼ãƒ–ルã®ä»®æƒ³ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +## dialect {#dialect} + +タイプ: Dialect + +デフォルト値: clickhouse + +クエリを解æžã™ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ€ã‚¤ã‚¢ãƒ¬ã‚¯ãƒˆã€‚ + +## dictionary_validate_primary_key_type {#dictionary_validate_primary_key_type} + +タイプ: Bool + +デフォルト値: 0 + +Dictionaryã®ãƒ—ライマリキータイプを検証ã—ã¾ã™ã€‚デフォルトã§ã¯ã€ã‚·ãƒ³ãƒ—ルãªãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã®å ´åˆã€id タイプã¯æš—黙的㫠UInt64 ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +## distinct_overflow_mode {#distinct_overflow_mode} + +タイプ: OverflowMode + +デフォルト値: throw + +制é™ã‚’超ãˆãŸå ´åˆã®å‹•ä½œã‚’指定ã—ã¾ã™ã€‚ + +## distributed_aggregation_memory_efficient {#distributed_aggregation_memory_efficient} + +タイプ: Bool + +デフォルト値: 1 + +分散集計ã®ãƒ¡ãƒ¢ãƒªç¯€ç´„モードãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +## distributed_background_insert_batch {#distributed_background_insert_batch} + +タイプ: Bool + +デフォルト値: 0 + +挿入データã®ãƒãƒƒãƒé€ä¿¡ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +ãƒãƒƒãƒé€ä¿¡ãŒæœ‰åŠ¹ãªå ´åˆã€[Distributed](../../engines/table-engines/special/distributed.md) テーブルエンジンã¯ã€æŒ¿å…¥ãƒ‡ãƒ¼ã‚¿ã®è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’1ã¤ã®æ“作ã§é€ä¿¡ã—よã†ã¨ã—ã¾ã™ã€‚ãƒãƒƒãƒé€ä¿¡ã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãŠã‚ˆã³ã‚µãƒ¼ãƒãƒ¼ãƒªã‚½ãƒ¼ã‚¹ã®åŠ¹çŽ‡ã‚’高ã‚ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ãƒ‘フォーマンスをå‘上ã•ã›ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 1 — 有効。 +- 0 — 無効。 +## distributed_background_insert_max_sleep_time_ms {#distributed_background_insert_max_sleep_time_ms} + +タイプ: ミリ秒 + +デフォルト値: 30000 + +[分散](../../engines/table-engines/special/distributed.md)テーブルエンジンãŒãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹ãŸã‚ã®æœ€å¤§é–“éš”ã§ã™ã€‚ã“ã‚Œã¯ã€[distributed_background_insert_sleep_time_ms](#distributed_background_insert_sleep_time_ms)設定ã§è¨­å®šã•ã‚ŒãŸé–“éš”ã®æŒ‡æ•°çš„ãªæˆé•·ã‚’制é™ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã®ãƒŸãƒªç§’。 + +## distributed_background_insert_sleep_time_ms {#distributed_background_insert_sleep_time_ms} + +タイプ: ミリ秒 + +デフォルト値: 100 + +[分散](../../engines/table-engines/special/distributed.md)テーブルエンジンãŒãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹ãŸã‚ã®åŸºæœ¬é–“éš”ã§ã™ã€‚エラーãŒç™ºç”Ÿã—ãŸå ´åˆã€å®Ÿéš›ã®é–“éš”ã¯æŒ‡æ•°çš„ã«å¢—加ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã®ãƒŸãƒªç§’。 + +## distributed_background_insert_split_batch_on_failure {#distributed_background_insert_split_batch_on_failure} + +タイプ: ブール + +デフォルト値: 0 + +失敗時ã«ãƒãƒƒãƒã‚’分割ã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +特定ã®ãƒãƒƒãƒã‚’リモートシャードã«é€ä¿¡ã™ã‚‹éš›ã«ã€`Memory limit exceeded`ã‚„é¡žä¼¼ã®ã‚¨ãƒ©ãƒ¼ã«ã‚ˆã£ã¦å¤±æ•—ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ãƒªãƒˆãƒ©ã‚¤ã—ã¦ã‚‚解決ã—ãªã„(ã“ã®ãŸã‚テーブルã®åˆ†æ•£é€ä¿¡ãŒåœæ­¢ã—ã¾ã™)ãŒã€ãã®ãƒãƒƒãƒã‹ã‚‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’1ã¤ãšã¤é€ä¿¡ã—ã¦INSERTã‚’æˆåŠŸã•ã›ã‚‹ã“ã¨ãŒã§ãã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +ã—ãŸãŒã£ã¦ã€ã“ã®è¨­å®šã‚’`1`ã«ã™ã‚‹ã¨ã€ãã®ã‚ˆã†ãªãƒãƒƒãƒã«ã¤ã„ã¦ãƒãƒƒãƒå‡¦ç†ã‚’無効ã«ã—ã¾ã™ï¼ˆã™ãªã‚ã¡ã€å¤±æ•—ã—ãŸãƒãƒƒãƒã®ãŸã‚ã«ä¸€æ™‚çš„ã«`distributed_background_insert_batch`を無効化ã—ã¾ã™ï¼‰ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — 有効。 +- 0 — 無効。 + +:::note +ã“ã®è¨­å®šã¯ã€ç•°å¸¸ãªã‚µãƒ¼ãƒãƒ¼ï¼ˆãƒžã‚·ãƒ³ï¼‰ã®åœæ­¢ã¨[分散](../../engines/table-engines/special/distributed.md)テーブルエンジンã®`fsync_after_insert` / `fsync_directories`ãŒãªã„å ´åˆã«ç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ã®ã‚る壊れãŸãƒãƒƒãƒã«ã‚‚影響ã—ã¾ã™ã€‚ +::: + +:::note +自動ãƒãƒƒãƒåˆ†å‰²ã«ä¾å­˜ã—ãªã„æ–¹ãŒè‰¯ã„ã§ã—ょã†ã€‚ã“ã‚Œã¯ãƒ‘フォーマンスã«æ‚ªå½±éŸ¿ã‚’åŠã¼ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## distributed_background_insert_timeout {#distributed_background_insert_timeout} + +タイプ: UInt64 + +デフォルト値: 0 + +分散ã¸ã®INSERTクエリã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã§ã™ã€‚ã“ã®è¨­å®šã¯ã€insert_distributed_syncãŒæœ‰åŠ¹ãªå ´åˆã«ã®ã¿ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ゼロ値ã¯ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãªã—ã‚’æ„味ã—ã¾ã™ã€‚ + +## distributed_cache_bypass_connection_pool {#distributed_cache_bypass_connection_pool} + +タイプ: ブール + +デフォルト値: 0 + +ClickHouse Cloudã®ã¿ã€‚分散キャッシュ接続プールをãƒã‚¤ãƒ‘スã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## distributed_cache_connect_max_tries {#distributed_cache_connect_max_tries} + +タイプ: UInt64 + +デフォルト値: 100 + +ClickHouse Cloudã®ã¿ã€‚分散キャッシュã¸ã®æŽ¥ç¶šãŒå¤±æ•—ã—ãŸå ´åˆã®æŽ¥ç¶šè©¦è¡Œå›žæ•°ã§ã™ã€‚ + +## distributed_cache_data_packet_ack_window {#distributed_cache_data_packet_ack_window} + +タイプ: UInt64 + +デフォルト値: 5 + +ClickHouse Cloudã®ã¿ã€‚å˜ä¸€ã®åˆ†æ•£ã‚­ãƒ£ãƒƒã‚·ãƒ¥èª­ã¿å–りリクエストã«ãŠã‘ã‚‹DataPacketシーケンスã®ACKé€ä¿¡ã«å¯¾ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚µã‚¤ã‚ºã§ã™ã€‚ + +## distributed_cache_discard_connection_if_unread_data {#distributed_cache_discard_connection_if_unread_data} + +タイプ: ブール + +デフォルト値: 1 + +ClickHouse Cloudã®ã¿ã€‚一部ã®ãƒ‡ãƒ¼ã‚¿ãŒæœªèª­ã®å ´åˆã€æŽ¥ç¶šã‚’破棄ã—ã¾ã™ã€‚ + +## distributed_cache_fetch_metrics_only_from_current_az {#distributed_cache_fetch_metrics_only_from_current_az} + +タイプ: ブール + +デフォルト値: 1 + +ClickHouse Cloudã®ã¿ã€‚system.distributed_cache_metricsã‚„system.distributed_cache_eventsã‹ã‚‰ç¾åœ¨ã®ã‚¢ãƒ™ã‚¤ãƒ©ãƒ“リティゾーンã®ã¿ã‹ã‚‰ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å–å¾—ã—ã¾ã™ã€‚ + +## distributed_cache_log_mode {#distributed_cache_log_mode} + +タイプ: DistributedCacheLogMode + +デフォルト値: on_error + +ClickHouse Cloudã®ã¿ã€‚system.distributed_cache_logã¸ã®æ›¸ãè¾¼ã¿ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ + +## distributed_cache_max_unacked_inflight_packets {#distributed_cache_max_unacked_inflight_packets} + +タイプ: UInt64 + +デフォルト値: 10 + +ClickHouse Cloudã®ã¿ã€‚å˜ä¸€ã®åˆ†æ•£ã‚­ãƒ£ãƒƒã‚·ãƒ¥èª­ã¿å–りリクエストã«ãŠã‘る未確èªã®é£›è¡Œä¸­ãƒ‘ケットã®æœ€å¤§æ•°ã§ã™ã€‚ + +## distributed_cache_pool_behaviour_on_limit {#distributed_cache_pool_behaviour_on_limit} + +タイプ: DistributedCachePoolBehaviourOnLimit + +デフォルト値: allocate_bypassing_pool + +ClickHouse Cloudã®ã¿ã€‚プールã®åˆ¶é™ã«é”ã—ãŸã¨ãã®åˆ†æ•£ã‚­ãƒ£ãƒƒã‚·ãƒ¥æŽ¥ç¶šã®å‹•ä½œã‚’特定ã—ã¾ã™ã€‚ + +## distributed_cache_read_alignment {#distributed_cache_read_alignment} + +タイプ: UInt64 + +デフォルト値: 0 + +ClickHouse Cloudã®ã¿ã€‚テスト目的ã®è¨­å®šã§ã‚ã‚Šã€å¤‰æ›´ã—ãªã„ã§ãã ã•ã„。 + +## distributed_cache_receive_response_wait_milliseconds {#distributed_cache_receive_response_wait_milliseconds} + +タイプ: UInt64 + +デフォルト値: 60000 + +ClickHouse Cloudã®ã¿ã€‚分散キャッシュã‹ã‚‰ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ãƒ‡ãƒ¼ã‚¿ã‚’å—ä¿¡ã™ã‚‹ãŸã‚ã®å¾…機時間(ミリ秒å˜ä½ï¼‰ã§ã™ã€‚ + +## distributed_cache_receive_timeout_milliseconds {#distributed_cache_receive_timeout_milliseconds} + +タイプ: UInt64 + +デフォルト値: 10000 + +ClickHouse Cloudã®ã¿ã€‚分散キャッシュã‹ã‚‰ã®å¿œç­”ã‚’å—ä¿¡ã™ã‚‹ãŸã‚ã®å¾…機時間(ミリ秒å˜ä½ï¼‰ã§ã™ã€‚ + +## distributed_cache_throw_on_error {#distributed_cache_throw_on_error} + +タイプ: ブール + +デフォルト値: 0 + +ClickHouse Cloudã®ã¿ã€‚分散キャッシュã¨ã®é€šä¿¡ä¸­ã«ç™ºç”Ÿã—ãŸä¾‹å¤–ã¾ãŸã¯åˆ†æ•£ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰å—ä¿¡ã—ãŸä¾‹å¤–ã‚’å†ã‚¹ãƒ­ãƒ¼ã—ã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã¯ã€ã‚¨ãƒ©ãƒ¼æ™‚ã«åˆ†æ•£ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ã‚¹ã‚­ãƒƒãƒ—ã«ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ã¾ã™ã€‚ + +## distributed_cache_wait_connection_from_pool_milliseconds {#distributed_cache_wait_connection_from_pool_milliseconds} + +タイプ: UInt64 + +デフォルト値: 100 + +ClickHouse Cloudã®ã¿ã€‚分散_cache_pool_behaviour_on_limitãŒwaitã®å ´åˆã«ã€æŽ¥ç¶šãƒ—ールã‹ã‚‰æŽ¥ç¶šã‚’å—ã‘å–ã‚‹ãŸã‚ã®å¾…機時間(ミリ秒å˜ä½ï¼‰ã§ã™ã€‚ + +## distributed_connections_pool_size {#distributed_connections_pool_size} + +タイプ: UInt64 + +デフォルト値: 1024 + +分散ã•ã‚ŒãŸã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‚’å˜ä¸€ã®Distributedテーブルã«å¯¾ã—ã¦ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã¨ã®åŒæ™‚接続ã®æœ€å¤§æ•°ã§ã™ã€‚クラスタ内ã®ã‚µãƒ¼ãƒãƒ¼ã®æ•°ä»¥ä¸Šã®å€¤ã‚’設定ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## distributed_ddl_entry_format_version {#distributed_ddl_entry_format_version} + +タイプ: UInt64 + +デフォルト値: 5 + +分散DDL (ON CLUSTER)クエリã®äº’æ›æ€§ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã™ã€‚ + +## distributed_ddl_output_mode {#distributed_ddl_output_mode} + +タイプ: DistributedDDLOutputMode + +デフォルト値: throw + +分散DDLクエリçµæžœã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- `throw` — クエリãŒçµ‚了ã—ãŸã™ã¹ã¦ã®ãƒ›ã‚¹ãƒˆã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’æŒã¤çµæžœã‚»ãƒƒãƒˆã‚’è¿”ã—ã¾ã™ã€‚クエリãŒä¸€éƒ¨ã®ãƒ›ã‚¹ãƒˆã§å¤±æ•—ã—ãŸå ´åˆã€æœ€åˆã®ä¾‹å¤–ã‚’å†ã‚¹ãƒ­ãƒ¼ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ›ã‚¹ãƒˆã§ã‚¯ã‚¨ãƒªãŒã¾ã çµ‚了ã—ã¦ã„ãªã„å ´åˆã€[distributed_ddl_task_timeout](#distributed_ddl_task_timeout)を超ãˆãŸå ´åˆã€`TIMEOUT_EXCEEDED`例外をスローã—ã¾ã™ã€‚ +- `none` — throwã«ä¼¼ã¦ã„ã¾ã™ãŒã€åˆ†æ•£DDLクエリã¯çµæžœã‚»ãƒƒãƒˆã‚’è¿”ã—ã¾ã›ã‚“。 +- `null_status_on_timeout` — 一部ã®çµæžœã‚»ãƒƒãƒˆã®è¡Œã§å®Ÿè¡Œã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã¨ã—ã¦`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¯ã‚¨ãƒªãŒå¯¾å¿œã™ã‚‹ãƒ›ã‚¹ãƒˆã§ã¾ã çµ‚了ã—ã¦ã„ãªã„å ´åˆã€`TIMEOUT_EXCEEDED`をスローã™ã‚‹ã®ã§ã¯ãªãè¿”ã—ã¾ã™ã€‚ +- `never_throw` — `TIMEOUT_EXCEEDED`をスローã›ãšã€ä¸€éƒ¨ã®ãƒ›ã‚¹ãƒˆã§ã‚¯ã‚¨ãƒªãŒå¤±æ•—ã—ãŸå ´åˆã‚‚例外をå†ã‚¹ãƒ­ãƒ¼ã—ã¾ã›ã‚“。 +- `none_only_active` — `none`ã«ä¼¼ã¦ã„ã¾ã™ãŒã€`Replicated`データベースã®éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リカを待ã¡ã¾ã›ã‚“。注æ„: ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ã‚¯ã‚¨ãƒªãŒä¸€éƒ¨ã®ãƒ¬ãƒ—リカã§å®Ÿè¡Œã•ã‚Œãªã„ã“ã¨ã‚’特定ã™ã‚‹ã“ã¨ã¯ã§ããšã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +- `null_status_on_timeout_only_active` — `null_status_on_timeout`ã«ä¼¼ã¦ã„ã¾ã™ãŒã€`Replicated`データベースã®éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リカを待ã¡ã¾ã›ã‚“。 +- `throw_only_active` — `throw`ã«ä¼¼ã¦ã„ã¾ã™ãŒã€`Replicated`データベースã®éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リカを待ã¡ã¾ã›ã‚“。 + +クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤: `none`。 + +## distributed_ddl_task_timeout {#distributed_ddl_task_timeout} + +タイプ: Int64 + +デフォルト値: 180 + +クラスタ内ã®ã™ã¹ã¦ã®ãƒ›ã‚¹ãƒˆã‹ã‚‰ã®DDLクエリ応答ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚’設定ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ›ã‚¹ãƒˆã§DDLリクエストãŒå®Ÿè¡Œã•ã‚Œãªã‹ã£ãŸå ´åˆã€å¿œç­”ã«ã¯ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚¨ãƒ©ãƒ¼ãŒå«ã¾ã‚Œã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯éžåŒæœŸãƒ¢ãƒ¼ãƒ‰ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚è² ã®å€¤ã¯ç„¡é™ã‚’æ„味ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — éžåŒæœŸãƒ¢ãƒ¼ãƒ‰ã€‚ +- è² ã®æ•´æ•° — ç„¡é™ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +## distributed_foreground_insert {#distributed_foreground_insert} + +タイプ: ブール + +デフォルト値: 0 + +[分散](../../engines/table-engines/special/distributed.md/#distributed)テーブルã¸ã®åŒæœŸãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€`Distributed`テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹éš›ã«ClickHouseサーãƒãƒ¼ã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ¢ãƒ¼ãƒ‰ã§ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãƒŽãƒ¼ãƒ‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã—ã¾ã™ã€‚`distributed_foreground_insert=1`ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯åŒæœŸå‡¦ç†ã•ã‚Œã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒã™ã¹ã¦ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«ä¿å­˜ã•ã‚Œã‚‹ã¾ã§`INSERT`æ“作ã¯æˆåŠŸã—ã¾ã›ã‚“(`internal_replication`ãŒtrueã®å ´åˆã€å„シャードã«å°‘ãªãã¨ã‚‚1ã¤ã®ãƒ¬ãƒ—リカãŒå¿…è¦ã§ã™ï¼‰ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — データã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ¢ãƒ¼ãƒ‰ã§æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ +- 1 — データã¯åŒæœŸãƒ¢ãƒ¼ãƒ‰ã§æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤: `1`。 + +**関連項目** + +- [分散テーブルエンジン](../../engines/table-engines/special/distributed.md/#distributed) +- [分散テーブルã®ç®¡ç†](../../sql-reference/statements/system.md/#query-language-system-distributed) + +## distributed_group_by_no_merge {#distributed_group_by_no_merge} + +タイプ: UInt64 + +デフォルト値: 0 + +分散クエリ処ç†ã®ãŸã‚ã«ç•°ãªã‚‹ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã®é›†è¨ˆçŠ¶æ…‹ã‚’マージã—ãªã„よã†ã«ã—ã¾ã™ã€‚ç•°ãªã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã«ç•°ãªã‚‹ã‚­ãƒ¼ãŒã‚ã‚‹ã“ã¨ãŒç¢ºå®Ÿãªå ´åˆã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- `0` — 無効(最終クエリ処ç†ã¯ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒŽãƒ¼ãƒ‰ã§è¡Œã‚ã‚Œã¾ã™ï¼‰ã€‚ +- `1` - ç•°ãªã‚‹ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã®é›†è¨ˆçŠ¶æ…‹ã‚’マージã›ãšã«åˆ†æ•£ã‚¯ã‚¨ãƒªå‡¦ç†ã‚’è¡Œã„ã¾ã™ï¼ˆã‚¯ã‚¨ãƒªã¯ã‚·ãƒ£ãƒ¼ãƒ‰ä¸Šã§å®Œå…¨ã«å‡¦ç†ã•ã‚Œã€ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ã¯ãƒ‡ãƒ¼ã‚¿ã‚’リレーã—ã¾ã™ï¼‰ã€‚ã“ã‚Œã¯ã€ç•°ãªã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã«ç•°ãªã‚‹ã‚­ãƒ¼ãŒã‚ã‚‹ã“ã¨ãŒç¢ºå®Ÿãªå ´åˆã«ä½¿ç”¨ã§ãã¾ã™ã€‚ +- `2` - `1`ã¨åŒã˜ã§ã™ãŒã€ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ã®ä¸Šã§`ORDER BY`ã¨`LIMIT`ã‚’é©ç”¨ã—ã¾ã™ï¼ˆã‚¯ã‚¨ãƒªãŒãƒªãƒ¢ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã§å®Œå…¨ã«å‡¦ç†ã•ã‚Œã‚‹å ´åˆã«ã¯ä¸å¯èƒ½ã§ã™ã€‚例: `distributed_group_by_no_merge=1`)。 + +**例** + +```sql +SELECT * +FROM remote('127.0.0.{2,3}', system.one) +GROUP BY dummy +LIMIT 1 +SETTINGS distributed_group_by_no_merge = 1 +FORMAT PrettyCompactMonoBlock + +┌─dummy─┠+│ 0 │ +│ 0 │ +└───────┘ +``` + +```sql +SELECT * +FROM remote('127.0.0.{2,3}', system.one) +GROUP BY dummy +LIMIT 1 +SETTINGS distributed_group_by_no_merge = 2 +FORMAT PrettyCompactMonoBlock + +┌─dummy─┠+│ 0 │ +└───────┘ +``` + +## distributed_insert_skip_read_only_replicas {#distributed_insert_skip_read_only_replicas} + +タイプ: ブール + +デフォルト値: 0 + +Distributedã¸ã®INSERTクエリ用ã«èª­ã¿å–り専用レプリカをスキップã™ã‚‹ã“ã¨ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 通常通りINSERTãŒè¡Œã‚ã‚Œã€èª­ã¿å–り専用レプリカã«é€ä¿¡ã•ã‚Œã‚‹ã¨å¤±æ•—ã—ã¾ã™ã€‚ +- 1 — イニシエータã¯ãƒ‡ãƒ¼ã‚¿ã‚’シャードã«é€ä¿¡ã™ã‚‹å‰ã«ã€èª­ã¿å–り専用レプリカをスキップã—ã¾ã™ã€‚ + +## distributed_product_mode {#distributed_product_mode} + +タイプ: DistributedProductMode + +デフォルト値: deny + +[分散サブクエリ](../../sql-reference/operators/in.md)ã®å‹•ä½œã‚’変更ã—ã¾ã™ã€‚ + +ClickHouseã¯ã€ã‚¯ã‚¨ãƒªãŒåˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã®éžGLOBALサブクエリをå«ã‚€å ´åˆã«ã“ã®è¨­å®šã‚’é©ç”¨ã—ã¾ã™ã€‚ + +制é™: + +- INãŠã‚ˆã³JOINサブクエリã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ +- FROMセクションãŒè¤‡æ•°ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’å«ã‚€åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルを使用ã—ã¦ã„ã‚‹å ´åˆã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ +- サブクエリãŒè¤‡æ•°ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’å«ã‚€åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã«é–¢ä¿‚ã™ã‚‹å ´åˆã€‚ +- テーブル値[remote](../../sql-reference/table-functions/remote.md)関数ã«ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。 + +å¯èƒ½ãªå€¤: + +- `deny` — デフォルト値。ã“れらã®ã‚¿ã‚¤ãƒ—ã®ã‚µãƒ–クエリã®ä½¿ç”¨ã‚’ç¦æ­¢ã—ã¾ã™ï¼ˆã€ŒDouble-distributed in/JOIN subqueries is deniedã€ä¾‹å¤–ã‚’è¿”ã—ã¾ã™ï¼‰ã€‚ +- `local` — サブクエリ内ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルを宛先サーãƒãƒ¼ï¼ˆã‚·ãƒ£ãƒ¼ãƒ‰ï¼‰ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ãƒ¼ãƒ–ルã«ç½®ãæ›ãˆã¾ã™ï¼ˆé€šå¸¸ã®`IN`/`JOIN`ã‚’ç½®ãæ›ãˆã¾ã™ï¼‰ã€‚ +- `global` — `IN`/`JOIN`クエリを`GLOBAL IN`/`GLOBAL JOIN`ã«ç½®ãæ›ãˆã¾ã™ã€‚ +- `allow` — ã“れらã®ã‚¿ã‚¤ãƒ—ã®ã‚µãƒ–クエリã®ä½¿ç”¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## distributed_push_down_limit {#distributed_push_down_limit} + +タイプ: UInt64 + +デフォルト値: 1 + +å„シャードã«åˆ¥ã€…ã«[LIMIT](#limit)ã‚’é©ç”¨ã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +ã“ã‚Œã«ã‚ˆã‚Šã€æ¬¡ã®ã“ã¨ã‚’回é¿ã§ãã¾ã™ï¼š +- ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã«è¿½åŠ ã®è¡Œã‚’é€ä¿¡ã™ã‚‹ã“ã¨ã€‚ +- イニシエータã§ãƒªãƒŸãƒƒãƒˆã®å¾Œã«è¡Œã‚’処ç†ã™ã‚‹ã“ã¨ã€‚ + +21.9ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‹ã‚‰ã€å°‘ãªãã¨ã‚‚1ã¤ã®æ¡ä»¶ãŒæº€ãŸã•ã‚ŒãŸå ´åˆã«ã®ã¿`distributed_push_down_limit`ãŒã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚’変更ã—ã¾ã™: +- [distributed_group_by_no_merge](#distributed_group_by_no_merge) > 0。 +- クエリãŒ`GROUP BY`/`DISTINCT`/`LIMIT BY`ã‚’æŒãŸãšã€ã§ã™ãŒ`ORDER BY`/`LIMIT`ã‚’æŒã¤ã€‚ +- クエリãŒ`ORDER BY`/`LIMIT`ã‚’æŒã¤`GROUP BY`/`DISTINCT`/`LIMIT BY`ã‚’æŒã¡ã€ä¸”ã¤ï¼š + - [optimize_skip_unused_shards](#optimize-skip-unused-shards)ãŒæœ‰åŠ¹ã§ã™ã€‚ + - [optimize_distributed_group_by_sharding_key](#optimize-distributed-group-by-sharding-key)ãŒæœ‰åŠ¹ã§ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +関連項目: + +- [distributed_group_by_no_merge](#distributed_group_by_no_merge) +- [optimize_skip_unused_shards](#optimize-skip-unused-shards) +- [optimize_distributed_group_by_sharding_key](#optimize-distributed-group-by-sharding-key) + +## distributed_replica_error_cap {#distributed_replica_error_cap} + +タイプ: UInt64 + +デフォルト値: 1000 + +- タイプ: 符å·ãªã—æ•´æ•° +- デフォルト値: 1000 + +å„レプリカã®ã‚¨ãƒ©ãƒ¼æ•°ãŒã“ã®å€¤ã«åˆ¶é™ã•ã‚Œã€1ã¤ã®ãƒ¬ãƒ—リカãŒã‚ã¾ã‚Šã«ã‚‚多ãã®ã‚¨ãƒ©ãƒ¼ã‚’è“„ç©ã™ã‚‹ã®ã‚’防ãŽã¾ã™ã€‚ + +関連項目: + +- [load_balancing](#load_balancing-round_robin) +- [テーブルエンジン分散](../../engines/table-engines/special/distributed.md) +- [distributed_replica_error_half_life](#distributed_replica_error_half_life) +- [distributed_replica_max_ignored_errors](#distributed_replica_max_ignored_errors) + +## distributed_replica_error_half_life {#distributed_replica_error_half_life} + +タイプ: 秒 + +デフォルト値: 60 + +- タイプ: 秒 +- デフォルト値: 60秒 + +分散テーブルã§ã®ã‚¨ãƒ©ãƒ¼ãŒã‚¼ãƒ­ã«ãªã‚‹é€Ÿåº¦ã‚’制御ã—ã¾ã™ã€‚レプリカãŒã—ã°ã‚‰ã利用ã§ããªã„å ´åˆã€5ã¤ã®ã‚¨ãƒ©ãƒ¼ã‚’è“„ç©ã—ã€distributed_replica_error_half_lifeãŒ1秒ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€æœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ã®å¾Œ3秒後ã«ãƒ¬ãƒ—リカã¯æ­£å¸¸ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +関連項目: + +- [load_balancing](#load_balancing-round_robin) +- [テーブルエンジン分散](../../engines/table-engines/special/distributed.md) +- [distributed_replica_error_cap](#distributed_replica_error_cap) +- [distributed_replica_max_ignored_errors](#distributed_replica_max_ignored_errors) + +## distributed_replica_max_ignored_errors {#distributed_replica_max_ignored_errors} + +タイプ: UInt64 + +デフォルト値: 0 + +- タイプ: 符å·ãªã—æ•´æ•° +- デフォルト値: 0 + +レプリカをé¸æŠžã™ã‚‹éš›ã«ç„¡è¦–ã•ã‚Œã‚‹ã‚¨ãƒ©ãƒ¼ã®æ•°ï¼ˆ`load_balancing`アルゴリズムã«å¾“ã£ã¦ï¼‰ã€‚ + +関連項目: + +- [load_balancing](#load_balancing-round_robin) +- [テーブルエンジン分散](../../engines/table-engines/special/distributed.md) +- [distributed_replica_error_cap](#distributed_replica_error_cap) +- [distributed_replica_error_half_life](#distributed_replica_error_half_life) + +## do_not_merge_across_partitions_select_final {#do_not_merge_across_partitions_select_final} + +タイプ: ブール + +デフォルト値: 0 + +SELECT FINALã§1ã¤ã®ãƒ‘ーティション内ã®ã¿ã§ãƒ‘ーツをマージã—ã¾ã™ã€‚ + +## empty_result_for_aggregation_by_constant_keys_on_empty_set {#empty_result_for_aggregation_by_constant_keys_on_empty_set} + +タイプ: ブール + +デフォルト値: 1 + +空セットã«å¯¾ã—ã¦å®šæ•°ã‚­ãƒ¼ã«ã‚ˆã‚‹é›†è¨ˆæ™‚ã€ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## empty_result_for_aggregation_by_empty_set {#empty_result_for_aggregation_by_empty_set} + +タイプ: ブール + +デフォルト値: 0 + +空セットã«å¯¾ã—ã¦ã‚­ãƒ¼ãªã—ã«é›†è¨ˆã‚’è¡Œã†ã¨ã€ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## enable_blob_storage_log {#enable_blob_storage_log} + +タイプ: ブール + +デフォルト値: 1 + +blobストレージæ“作ã«é–¢ã™ã‚‹æƒ…報をsystem.blob_storage_logテーブルã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ + +## enable_early_constant_folding {#enable_early_constant_folding} + +タイプ: ブール + +デフォルト値: 1 + +関数やサブクエリã®çµæžœã‚’分æžã—ã€å®šæ•°ãŒå«ã¾ã‚Œã‚‹å ´åˆã«ã‚¯ã‚¨ãƒªã‚’書ãæ›ãˆã‚‹ã“ã¨ã§ã€ã‚¯ã‚¨ãƒªæœ€é©åŒ–を有効ã«ã—ã¾ã™ã€‚ + +## enable_extended_results_for_datetime_functions {#enable_extended_results_for_datetime_functions} + +タイプ: ブール + +デフォルト値: 0 + +次ã®åž‹ã®çµæžœã‚’è¿”ã™ã“ã¨ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ï¼š +- `Date32`ã¯ã€[toStartOfYear](../../sql-reference/functions/date-time-functions.md#tostartofyear)ã€[toStartOfISOYear](../../sql-reference/functions/date-time-functions.md#tostartofisoyear)ã€[toStartOfQuarter](../../sql-reference/functions/date-time-functions.md#tostartofquarter)ã€[toStartOfMonth](../../sql-reference/functions/date-time-functions.md#tostartofmonth)ã€[toLastDayOfMonth](../../sql-reference/functions/date-time-functions.md#tolastdayofmonth)ã€[toStartOfWeek](../../sql-reference/functions/date-time-functions.md#tostartofweek)ã€[toLastDayOfWeek](../../sql-reference/functions/date-time-functions.md#tolastdayofweek)ã€ãŠã‚ˆã³[toMonday](../../sql-reference/functions/date-time-functions.md#tomonday)ã®é–¢æ•°ã«å¯¾ã—ã¦æ‹¡å¼µã•ã‚ŒãŸç¯„囲(`Date`åž‹ã¨æ¯”較ã—ã¦ï¼‰ã€‚ +- `DateTime64`ã¯ã€[toStartOfDay](../../sql-reference/functions/date-time-functions.md#tostartofday)ã€[toStartOfHour](../../sql-reference/functions/date-time-functions.md#tostartofhour)ã€[toStartOfMinute](../../sql-reference/functions/date-time-functions.md#tostartofminute)ã€[toStartOfFiveMinutes](../../sql-reference/functions/date-time-functions.md#tostartoffiveminutes)ã€[toStartOfTenMinutes](../../sql-reference/functions/date-time-functions.md#tostartoftenminutes)ã€[toStartOfFifteenMinutes](../../sql-reference/functions/date-time-functions.md#tostartoffifteenminutes)ã€ãŠã‚ˆã³[timeSlot](../../sql-reference/functions/date-time-functions.md#timeslot)ã®é–¢æ•°ã«å¯¾ã—ã¦æ‹¡å¼µã•ã‚ŒãŸç¯„囲(`DateTime`åž‹ã¨æ¯”較ã—ã¦ï¼‰ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 関数ã¯ã™ã¹ã¦ã®åž‹ã®å¼•æ•°ã«å¯¾ã—ã¦`Date`ã¾ãŸã¯`DateTime`ã‚’è¿”ã—ã¾ã™ã€‚ +- 1 — 関数ã¯`Date32`ã¾ãŸã¯`DateTime64`引数ã«å¯¾ã—ã¦`Date32`ã¾ãŸã¯`DateTime64`ã‚’è¿”ã—ã€ãã†ã§ãªã„å ´åˆã¯`Date`ã¾ãŸã¯`DateTime`ã‚’è¿”ã—ã¾ã™ã€‚ + +## enable_filesystem_cache {#enable_filesystem_cache} + +タイプ: ブール + +デフォルト値: 1 + +リモートファイルシステムã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ON/OFFを切り替ãˆã‚‹ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“(ディスク設定ã§è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ãŒã€æ„図ã—ãŸå ´åˆã«ä¸€éƒ¨ã®ã‚¯ã‚¨ãƒªã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’ãƒã‚¤ãƒ‘スã§ãるよã†ã«ã—ã¾ã™ã€‚ + +## enable_filesystem_cache_log {#enable_filesystem_cache_log} + +タイプ: ブール + +デフォルト値: 0 + +å„クエリã«å¯¾ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ãƒ­ã‚°ã‚’記録ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## enable_filesystem_cache_on_write_operations {#enable_filesystem_cache_on_write_operations} + +タイプ: ブール + +デフォルト値: 0 + +書ãè¾¼ã¿æ“作中ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«æ›¸ã込む。実際ã«æ©Ÿèƒ½ã™ã‚‹ãŸã‚ã«ã¯ã€ã“ã®è¨­å®šã‚‚ディスク設定ã«è¿½åŠ ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## enable_filesystem_read_prefetches_log {#enable_filesystem_read_prefetches_log} + +タイプ: ブール + +デフォルト値: 0 + +クエリ中ã«system.filesystemã®prefetch_logã«ãƒ­ã‚°ã‚’記録ã—ã¾ã™ã€‚テストã¾ãŸã¯ãƒ‡ãƒãƒƒã‚°ã®ã¿ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’推奨ã—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚ªãƒ³ã«ã—ãªã„ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## enable_global_with_statement {#enable_global_with_statement} + +タイプ: ブール + +デフォルト値: 1 + +UNIONクエリãŠã‚ˆã³ã™ã¹ã¦ã®ã‚µãƒ–クエリã«WITHステートメントをä¼æ’­ã•ã›ã¾ã™ã€‚ + +## enable_http_compression {#enable_http_compression} + +タイプ: ブール + +デフォルト値: 0 + +HTTPリクエストã«å¯¾ã™ã‚‹å¿œç­”ã§ã®ãƒ‡ãƒ¼ã‚¿åœ§ç¸®ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +詳細ã«ã¤ã„ã¦ã¯ã€[HTTPインターフェースã®èª¬æ˜Ž](../../interfaces/http.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +## enable_job_stack_trace {#enable_job_stack_trace} + +タイプ: ブール + +デフォルト値: 1 + +ジョブã®ä½œæˆè€…ã«ã‚ˆã‚‹ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’出力ã—ã€ã‚¸ãƒ§ãƒ–ãŒä¾‹å¤–を引ãèµ·ã“ã—ãŸå ´åˆã€‚ + +## enable_lightweight_delete {#enable_lightweight_delete} + +タイプ: ブール + +デフォルト値: 1 + +MergeTreeテーブルã«å¯¾ã—ã¦è«–ç†å‰Šé™¤ã‚’有効ã«ã—ã¾ã™ã€‚ + +## enable_memory_bound_merging_of_aggregation_results {#enable_memory_bound_merging_of_aggregation_results} + +タイプ: ブール + +デフォルト値: 1 + +集計ã®ãŸã‚ã®ãƒ¡ãƒ¢ãƒªãƒã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸æˆ¦ç•¥ã‚’有効ã«ã—ã¾ã™ã€‚ + +## enable_multiple_prewhere_read_steps {#enable_multiple_prewhere_read_steps} + +タイプ: ブール + +デフォルト値: 1 + +WHEREã‹ã‚‰PREWHEREã¸ã®æ¡ä»¶ã‚’より多ã移動ã•ã›ã€è¤‡æ•°ã®æ¡ä»¶ãŒANDã§çµ„ã¿åˆã‚ã•ã‚Œã¦ã„ã‚‹å ´åˆã«ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ã®èª­ã¿å–ã‚Šã¨ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’複数ã®ã‚¹ãƒ†ãƒƒãƒ—ã§è¡Œã„ã¾ã™ã€‚ + +## enable_named_columns_in_function_tuple {#enable_named_columns_in_function_tuple} + +タイプ: ブール + +デフォルト値: 0 + +ã™ã¹ã¦ã®åå‰ãŒãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ã€å¼•ç”¨ãªã—識別å­ã¨ã—ã¦æ‰±ãˆã‚‹å ´åˆã€function tuple()ã§åå‰ä»˜ãタプルを生æˆã—ã¾ã™ã€‚ + +## enable_optimize_predicate_expression {#enable_optimize_predicate_expression} + +タイプ: ブール + +デフォルト値: 1 + +`SELECT`クエリã§ã®è¿°èªžãƒ—ッシュダウンをオンã«ã—ã¾ã™ã€‚ + +述語プッシュダウンã¯ã€åˆ†æ•£ã‚¯ã‚¨ãƒªã§ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’大幅ã«å‰Šæ¸›ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +使用法 + +次ã®ã‚¯ã‚¨ãƒªã‚’考ãˆã¦ã¿ã¦ãã ã•ã„: + +1. `SELECT count() FROM test_table WHERE date = '2018-10-10'` +2. `SELECT count() FROM (SELECT * FROM test_table) WHERE date = '2018-10-10'` + +`enable_optimize_predicate_expression = 1`ã®å ´åˆã€ã“れらã®ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œæ™‚é–“ã¯ç­‰ã—ããªã‚Šã¾ã™ã€‚ClickHouseã¯ã‚µãƒ–クエリを処ç†ã™ã‚‹éš›ã«`WHERE`ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +`enable_optimize_predicate_expression = 0`ã®å ´åˆã€2番目ã®ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œæ™‚é–“ã¯ã¯ã‚‹ã‹ã«é•·ããªã‚Šã¾ã™ã€‚ãªãœãªã‚‰ã€ã‚µãƒ–クエリãŒçµ‚了ã—ãŸå¾Œã§ã€`WHERE`å¥ãŒã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã«é©ç”¨ã•ã‚Œã‚‹ã‹ã‚‰ã§ã™ã€‚ + +## enable_optimize_predicate_expression_to_final_subquery {#enable_optimize_predicate_expression_to_final_subquery} + +タイプ: ブール + +デフォルト値: 1 + +最終サブクエリã«è¿°èªžã®ãƒ—ッシュを許å¯ã—ã¾ã™ã€‚ + +## enable_order_by_all {#enable_order_by_all} + +タイプ: ブール + +デフォルト値: 1 + +`ORDER BY ALL`構文を使用ã—ãŸã‚½ãƒ¼ãƒˆã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚詳細ã¯[ORDER BY](../../sql-reference/statements/select/order-by.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +å¯èƒ½ãªå€¤: + +- 0 — ORDER BY ALLを無効ã«ã—ã¾ã™ã€‚ +- 1 — ORDER BY ALLを有効ã«ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +CREATE TABLE TAB(C1 Int, C2 Int, ALL Int) ENGINE=Memory(); + +INSERT INTO TAB VALUES (10, 20, 30), (20, 20, 10), (30, 10, 20); + +SELECT * FROM TAB ORDER BY ALL; -- ALLãŒæ›–昧ã§ã‚ã‚‹ã¨ã„ã†ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +SELECT * FROM TAB ORDER BY ALL SETTINGS enable_order_by_all = 0; +``` + +çµæžœ: + +```text +┌─C1─┬─C2─┬─ALL─┠+│ 20 │ 20 │ 10 │ +│ 30 │ 10 │ 20 │ +│ 10 │ 20 │ 30 │ +└────┴─────┴───────┘ +``` + +## enable_parsing_to_custom_serialization {#enable_parsing_to_custom_serialization} + +タイプ: ブール + +デフォルト値: 1 + +真ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰å¾—られãŸã‚·ãƒªã‚¢ãƒ«åŒ–ã®ãƒ’ントã«å¾“ã£ã¦ã‚«ã‚¹ã‚¿ãƒ ã‚·ãƒªã‚¢ãƒ«åŒ–(例:Sparse)をæŒã¤åˆ—ã«ç›´æŽ¥è§£æžã•ã‚Œã¾ã™ã€‚ + +## enable_positional_arguments {#enable_positional_arguments} + +タイプ: ブール + +デフォルト値: 1 + +[GROUP BY](../../sql-reference/statements/select/group-by.md)ã€[LIMIT BY](../../sql-reference/statements/select/limit-by.md)ã€[ORDER BY](../../sql-reference/statements/select/order-by.md)ステートメントã«å¯¾ã™ã‚‹ä½ç½®å¼•æ•°ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — ä½ç½®å¼•æ•°ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã›ã‚“。 +- 1 — ä½ç½®å¼•æ•°ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™: 列番å·ã‚’列åã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +CREATE TABLE positional_arguments(one Int, two Int, three Int) ENGINE=Memory(); + +INSERT INTO positional_arguments VALUES (10, 20, 30), (20, 20, 10), (30, 10, 20); + +SELECT * FROM positional_arguments ORDER BY 2,3; +``` + +çµæžœ: + +```text +┌─one─┬─two─┬─three─┠+│ 30 │ 10 │ 20 │ +│ 20 │ 20 │ 10 │ +│ 10 │ 20 │ 30 │ +└─────┴─────┴───────┘ +``` + +## enable_reads_from_query_cache {#enable_reads_from_query_cache} + +タイプ: ブール + +デフォルト値: 1 + +オンã®å ´åˆã€`SELECT`クエリã®çµæžœã¯[クエリキャッシュ](../query-cache.md)ã‹ã‚‰å–å¾—ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 - 無効 +- 1 - 有効 + +## enable_s3_requests_logging {#enable_s3_requests_logging} + +タイプ: ブール + +デフォルト値: 0 + +S3リクエストã®éžå¸¸ã«æ˜Žç¤ºçš„ãªãƒ­ã‚°è¨˜éŒ²ã‚’有効ã«ã—ã¾ã™ã€‚デãƒãƒƒã‚°å°‚用ã§æ„味ãŒã‚ã‚Šã¾ã™ã€‚ + +## enable_scalar_subquery_optimization {#enable_scalar_subquery_optimization} + +タイプ: ブール + +デフォルト値: 1 + +真ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å¤§ããªã‚¹ã‚«ãƒ©å€¤ã®ã‚¹ã‚«ãƒ©ãƒ¼ã‚µãƒ–クエリã®ï¼ˆéžï¼‰ã‚·ãƒªã‚¢ãƒ«åŒ–を防止ã—ã€åŒã˜ã‚µãƒ–クエリを複数回実行ã™ã‚‹ã®ã‚’回é¿ã§ãã¾ã™ã€‚ + +## enable_sharing_sets_for_mutations {#enable_sharing_sets_for_mutations} + +タイプ: ブール + +デフォルト値: 1 + +INサブクエリã®ãŸã‚ã«æ§‹ç¯‰ã•ã‚ŒãŸå…±æœ‰ã‚»ãƒƒãƒˆã‚ªãƒ–ジェクトを異ãªã‚‹ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ã‚¿ã‚¹ã‚¯é–“ã§å…±æœ‰ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã¨CPU消費ãŒå‰Šæ¸›ã•ã‚Œã¾ã™ã€‚ + +## enable_software_prefetch_in_aggregation {#enable_software_prefetch_in_aggregation} + +タイプ: ブール + +デフォルト値: 1 + +集計ã§ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ãƒ—リフェッãƒã‚’使用ã™ã‚‹ã“ã¨ã‚’有効ã«ã—ã¾ã™ã€‚ + +## enable_unaligned_array_join {#enable_unaligned_array_join} + +タイプ: ブール + +デフォルト値: 0 + +ç•°ãªã‚‹ã‚µã‚¤ã‚ºã®è¤‡æ•°ã®é…列を使用ã—ãŸARRAY JOINを許å¯ã—ã¾ã™ã€‚ã“ã®è¨­å®šãŒæœ‰åŠ¹ãªå ´åˆã€é…列ã¯æœ€ã‚‚é•·ã„ã‚‚ã®ã«ã‚µã‚¤ã‚ºå¤‰æ›´ã•ã‚Œã¾ã™ã€‚ + +## enable_url_encoding {#enable_url_encoding} + +タイプ: ブール + +デフォルト値: 1 + +[URL](../../engines/table-engines/special/url.md)エンジンã®ãƒ†ãƒ¼ãƒ–ルã®URIã®ãƒ‘スã®ãƒ‡ã‚³ãƒ¼ãƒ‰/エンコードを有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +デフォルトã§ã‚ªãƒ³ã§ã™ã€‚ + +## enable_vertical_final {#enable_vertical_final} + +タイプ: ブール + +デフォルト値: 1 + +ã“れを有効ã«ã™ã‚‹ã¨ã€æœ€çµ‚çš„ã«è¡Œã‚’マージã™ã‚‹ã®ã§ã¯ãªãã€å‰Šé™¤ã•ã‚ŒãŸã¨ã—ã¦è¡Œã‚’マークã—ã€å¾Œã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¦é‡è¤‡è¡Œã‚’削除ã—ã¾ã™ã€‚ + +## enable_writes_to_query_cache {#enable_writes_to_query_cache} + +タイプ: ブール + +デフォルト値: 1 + +オンã®å ´åˆã€`SELECT`クエリã®çµæžœã¯[クエリキャッシュ](../query-cache.md)ã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 - 無効 +- 1 - 有効 + +## enable_zstd_qat_codec {#enable_zstd_qat_codec} + +タイプ: ブール + +デフォルト値: 0 + +オンã®å ´åˆã€ZSTD_QATコーデックを使用ã—ã¦åˆ—を圧縮ã§ãã¾ã™ã€‚ + +## enforce_strict_identifier_format {#enforce_strict_identifier_format} + +タイプ: ブール + +デフォルト値: 0 + +有効ãªå ´åˆã€è‹±æ•°å­—ã¨ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã‚’å«ã‚€è­˜åˆ¥å­ã®ã¿ã‚’許å¯ã—ã¾ã™ã€‚ + +## engine_file_allow_create_multiple_files {#engine_file_allow_create_multiple_files} + +タイプ: ブール + +デフォルト値: 0 + +ファイルエンジンã®ãƒ†ãƒ¼ãƒ–ルã§ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ï¼ˆ`JSON`ã€`ORC`ã€`Parquet`ãªã©ï¼‰ã‚’æŒã¤å ´åˆã€å„挿入時ã«æ–°ã—ã„ファイルを作æˆã™ã‚‹ã“ã¨ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚有効ãªå ´åˆã€å„挿入ã”ã¨ã«æ¬¡ã®ãƒ‘ターンã«å¾“ã£ãŸåå‰ã®æ–°ã—ã„ファイルãŒä½œæˆã•ã‚Œã¾ã™ï¼š + +`data.Parquet` -> `data.1.Parquet` -> `data.2.Parquet` ãªã©ã€‚ + +å¯èƒ½ãªå€¤: +- 0 — `INSERT`クエリã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ«å°¾ã«æ–°ã—ã„データを追加ã—ã¾ã™ã€‚ +- 1 — `INSERT`クエリã¯æ–°ã—ã„ファイルを作æˆã—ã¾ã™ã€‚ + +## engine_file_empty_if_not_exists {#engine_file_empty_if_not_exists} + +タイプ: ブール + +デフォルト値: 0 + +ファイルã®ãªã„ファイルエンジンテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 0 — `SELECT`ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ +- 1 — `SELECT`ã¯ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## engine_file_skip_empty_files {#engine_file_skip_empty_files} + +タイプ: ブール + +デフォルト値: 0 + +[File](../../engines/table-engines/special/file.md)エンジンã®ãƒ†ãƒ¼ãƒ–ルã§ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã“ã¨ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 0 — 空ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒè¦æ±‚ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«é©åˆã—ãªã„å ´åˆã€`SELECT`ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ +- 1 — 空ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®å ´åˆã€`SELECT`ã¯ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## engine_file_truncate_on_insert {#engine_file_truncate_on_insert} + +タイプ: ブール + +デフォルト値: 0 + +[File](../../engines/table-engines/special/file.md)エンジンã®ãƒ†ãƒ¼ãƒ–ルã§ã€æŒ¿å…¥æ™‚ã«åˆ‡ã‚Šæ¨ã¦ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 0 — `INSERT`クエリã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ«å°¾ã«æ–°ã—ã„データを追加ã—ã¾ã™ã€‚ +- 1 — `INSERT`クエリã¯æ–°ã—ã„データã§ãƒ•ã‚¡ã‚¤ãƒ«ã®æ—¢å­˜ã®å†…容を置ãæ›ãˆã¾ã™ã€‚ + +## engine_url_skip_empty_files {#engine_url_skip_empty_files} + +タイプ: ブール + +デフォルト値: 0 + +[URL](../../engines/table-engines/special/url.md)エンジンã®ãƒ†ãƒ¼ãƒ–ルã§ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã“ã¨ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 0 — 空ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒè¦æ±‚ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«é©åˆã—ãªã„å ´åˆã€`SELECT`ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ +- 1 — 空ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®å ´åˆã€`SELECT`ã¯ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## except_default_mode {#except_default_mode} + +タイプ: SetOperationMode + +デフォルト値: ALL + +EXCEPTクエリã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ¢ãƒ¼ãƒ‰ã‚’設定ã—ã¾ã™ã€‚å¯èƒ½ãªå€¤: 空文字列ã€'ALL'ã€'DISTINCT'。空ã®å ´åˆã€ãƒ¢ãƒ¼ãƒ‰ãªã—ã§ã‚¯ã‚¨ãƒªãŒä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## external_storage_connect_timeout_sec {#external_storage_connect_timeout_sec} + +タイプ: UInt64 + +デフォルト値: 10 + +接続ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’å˜ä½ï¼‰ã€‚ç¾åœ¨ã¯MySQLã®ã¿ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## external_storage_max_read_bytes {#external_storage_max_read_bytes} + +タイプ: UInt64 + +デフォルト値: 0 + +外部エンジンをæŒã¤ãƒ†ãƒ¼ãƒ–ルãŒå±¥æ­´ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹éš›ã®æœ€å¤§ãƒã‚¤ãƒˆæ•°ã‚’制é™ã—ã¾ã™ã€‚ã“ã‚Œã¯ç¾åœ¨ã€MySQLテーブルエンジンã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã€Dictionaryã€ãŠã‚ˆã³MaterializedMySQLã«ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚0ã«ç­‰ã—ã„å ´åˆã€ã“ã®è¨­å®šã¯ç„¡åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +## external_storage_max_read_rows {#external_storage_max_read_rows} + +タイプ: UInt64 + +デフォルト値: 0 + +外部エンジンをæŒã¤ãƒ†ãƒ¼ãƒ–ルãŒå±¥æ­´ãƒ‡ãƒ¼ã‚¿ã‚’フラッシュã™ã‚‹éš›ã®æœ€å¤§è¡Œæ•°ã‚’制é™ã—ã¾ã™ã€‚ã“ã‚Œã¯ç¾åœ¨ã€MySQLテーブルエンジンã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã€Dictionaryã€ãŠã‚ˆã³MaterializedMySQLã«ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚0ã«ç­‰ã—ã„å ´åˆã€ã“ã®è¨­å®šã¯ç„¡åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +## external_storage_rw_timeout_sec {#external_storage_rw_timeout_sec} + +タイプ: UInt64 + +デフォルト値: 300 + +読ã¿å–ã‚Š/書ãè¾¼ã¿ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’å˜ä½ï¼‰ã€‚ç¾åœ¨ã¯MySQLã®ã¿ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## external_table_functions_use_nulls {#external_table_functions_use_nulls} + +タイプ: ブール + +デフォルト値: 1 + +[mysql](../../sql-reference/table-functions/mysql.md)ã€[postgresql](../../sql-reference/table-functions/postgresql.md)ã€ãŠã‚ˆã³[odbc](../../sql-reference/table-functions/odbc.md)テーブル関数ãŒNullableカラムを使用ã™ã‚‹æ–¹æ³•ã‚’定義ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — テーブル関数ã¯æ˜Žç¤ºçš„ã«Nullableカラムを使用ã—ã¾ã™ã€‚ +- 1 — テーブル関数ã¯æš—黙的ã«Nullableカラムを使用ã—ã¾ã™ã€‚ + +**使用法** + +設定ãŒ`0`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ†ãƒ¼ãƒ–ル関数ã¯Nullableカラムを作æˆã›ãšã€NULLã®ä»£ã‚ã‚Šã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’挿入ã—ã¾ã™ã€‚ã“ã‚Œã¯é…列内ã®NULL値ã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +## external_table_strict_query {#external_table_strict_query} + +タイプ: ブール + +デフォルト値: 0 + +真ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å¤–部テーブルã¸ã®ã‚¯ã‚¨ãƒªã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¸ã®å¤‰æ›ãŒç¦æ­¢ã•ã‚Œã¾ã™ã€‚ + +## extract_key_value_pairs_max_pairs_per_row {#extract_key_value_pairs_max_pairs_per_row} + +タイプ: UInt64 + +デフォルト値: 1000 + +`extractKeyValuePairs`関数ã§ç”Ÿæˆã§ãるペアã®æœ€å¤§æ•°ã§ã™ã€‚ã“ã‚Œã¯ã€éŽå‰°ãªãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚’防ããŸã‚ã®ã‚»ãƒ¼ãƒ•ã‚¬ãƒ¼ãƒ‰ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## extremes {#extremes} + +タイプ: ブール + +デフォルト値: 0 + +クエリçµæžœã®åˆ—ã®æ¥µç«¯ãªå€¤ï¼ˆæœ€å°å€¤ãŠã‚ˆã³æœ€å¤§å€¤ï¼‰ã‚’カウントã™ã‚‹ã‹ã©ã†ã‹ã€‚0ã¾ãŸã¯1ã‚’å—ã‘入れã¾ã™ã€‚デフォルトã¯0(無効)ã§ã™ã€‚ +極端ãªå€¤ã«é–¢ã™ã‚‹è©³ç´°ã¯ã€ã€Œæ¥µç«¯ãªå€¤ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## fallback_to_stale_replicas_for_distributed_queries {#fallback_to_stale_replicas_for_distributed_queries} + +タイプ: ブール + +デフォルト値: 1 + +æ›´æ–°ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒåˆ©ç”¨ã§ããªã„å ´åˆã€å¤ã„レプリカã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªã‚’強制ã—ã¾ã™ã€‚[レプリケーション](../../engines/table-engines/mergetree-family/replication.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ClickHouseã¯ã€ãƒ†ãƒ¼ãƒ–ルã®å¤ã„レプリカã®ä¸­ã‹ã‚‰æœ€ã‚‚関連性ã®é«˜ã„ã‚‚ã®ã‚’é¸æŠžã—ã¾ã™ã€‚ + +ã“ã‚Œã¯ã€ãƒ¬ãƒ—リケーションã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを指ã™åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®`SELECT`を実行ã™ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +デフォルトã§ã¯1(有効)ã§ã™ã€‚ + +## filesystem_cache_enable_background_download_during_fetch {#filesystem_cache_enable_background_download_during_fetch} + +タイプ: ブール + +デフォルト値: 1 +Only in ClickHouse Cloud. ファイルシステムキャッシュã«ãŠã‘るスペース予約ã®ãŸã‚ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ­ãƒƒã‚¯å¾…機時間 + +## filesystem_cache_enable_background_download_for_metadata_files_in_packed_storage {#filesystem_cache_enable_background_download_for_metadata_files_in_packed_storage} + +タイプ: Bool + +デフォルト値: 1 + +Only in ClickHouse Cloud. ファイルシステムキャッシュã«ãŠã‘るスペース予約ã®ãŸã‚ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ­ãƒƒã‚¯å¾…機時間 + +## filesystem_cache_max_download_size {#filesystem_cache_max_download_size} + +タイプ: UInt64 + +デフォルト値: 137438953472 + +å˜ä¸€ã®ã‚¯ã‚¨ãƒªã§ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãる最大リモートファイルシステムキャッシュサイズ + +## filesystem_cache_name {#filesystem_cache_name} + +タイプ: String + +デフォルト値: + +ステートレステーブルエンジンã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ¬ã‚¤ã‚¯ã«ä½¿ç”¨ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚­ãƒ£ãƒƒã‚·ãƒ¥å + +## filesystem_cache_reserve_space_wait_lock_timeout_milliseconds {#filesystem_cache_reserve_space_wait_lock_timeout_milliseconds} + +タイプ: UInt64 + +デフォルト値: 1000 + +ファイルシステムキャッシュã«ãŠã‘るスペース予約ã®ãŸã‚ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ­ãƒƒã‚¯å¾…機時間 + +## filesystem_cache_segments_batch_size {#filesystem_cache_segments_batch_size} + +タイプ: UInt64 + +デフォルト値: 20 + +読ã¿å–ã‚Šãƒãƒƒãƒ•ã‚¡ãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰è¦æ±‚ã§ãã‚‹å˜ä¸€ãƒãƒƒãƒã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã®ã‚µã‚¤ã‚ºåˆ¶é™ã€‚値ãŒä½Žã™ãŽã‚‹ã¨ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒéŽå‰°ã«ãªã‚Šã€é«˜ã™ãŽã‚‹ã¨ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ã‚¨ãƒ“クションをé…ãã™ã‚‹å¯èƒ½æ€§ãŒã‚る。 + +## filesystem_prefetch_max_memory_usage {#filesystem_prefetch_max_memory_usage} + +タイプ: UInt64 + +デフォルト値: 1073741824 + +プリフェッãƒã®æœ€å¤§ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã€‚ + +## filesystem_prefetch_step_bytes {#filesystem_prefetch_step_bytes} + +タイプ: UInt64 + +デフォルト値: 0 + +ãƒã‚¤ãƒˆå˜ä½ã®ãƒ—リフェッãƒã‚¹ãƒ†ãƒƒãƒ—。ゼロã¯`auto`ã‚’æ„味ã—ã€æœ€é©ãªãƒ—リフェッãƒã‚¹ãƒ†ãƒƒãƒ—ã¯è‡ªå‹•çš„ã«æŽ¨æ¸¬ã•ã‚Œã‚‹ãŒã€100%最良ã¨ã¯é™ã‚‰ãªã„。実際ã®å€¤ã¯ã€`filesystem_prefetch_min_bytes_for_single_read_task`ã®è¨­å®šã«ã‚ˆã£ã¦ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚る。 + +## filesystem_prefetch_step_marks {#filesystem_prefetch_step_marks} + +タイプ: UInt64 + +デフォルト値: 0 + +マークå˜ä½ã®ãƒ—リフェッãƒã‚¹ãƒ†ãƒƒãƒ—。ゼロã¯`auto`ã‚’æ„味ã—ã€æœ€é©ãªãƒ—リフェッãƒã‚¹ãƒ†ãƒƒãƒ—ã¯è‡ªå‹•çš„ã«æŽ¨æ¸¬ã•ã‚Œã‚‹ãŒã€100%最良ã¨ã¯é™ã‚‰ãªã„。実際ã®å€¤ã¯ã€`filesystem_prefetch_min_bytes_for_single_read_task`ã®è¨­å®šã«ã‚ˆã£ã¦ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚る。 + +## filesystem_prefetches_limit {#filesystem_prefetches_limit} + +タイプ: UInt64 + +デフォルト値: 200 + +最大プリフェッãƒæ•°ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã™ã‚‹ã€‚プリフェッãƒæ•°ã‚’制é™ã—ãŸã„å ´åˆã¯ã€`filesystem_prefetches_max_memory_usage`ã®è¨­å®šã‚’使用ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã‚‹ã€‚ + +## final {#final} + +タイプ: Bool + +デフォルト値: 0 + +クエリ内ã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«è‡ªå‹•çš„ã«[FINAL](../../sql-reference/statements/select/from.md#final-modifier)修飾å­ã‚’é©ç”¨ã—ã€[FINAL](../../sql-reference/statements/select/from.md#final-modifier)ãŒé©ç”¨å¯èƒ½ãªãƒ†ãƒ¼ãƒ–ルã€çµåˆãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ã‚µãƒ–クエリ内ã®ãƒ†ãƒ¼ãƒ–ルã€åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã«ã‚‚é©ç”¨ã•ã‚Œã‚‹ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 - 無効 +- 1 - 有効 + +例: + +```sql +CREATE TABLE test +( + key Int64, + some String +) +ENGINE = ReplacingMergeTree +ORDER BY key; + +INSERT INTO test FORMAT Values (1, 'first'); +INSERT INTO test FORMAT Values (1, 'second'); + +SELECT * FROM test; +┌─key─┬─some───┠+│ 1 │ second │ +└─────┴────────┘ +┌─key─┬─some──┠+│ 1 │ first │ +└─────┴───────┘ + +SELECT * FROM test SETTINGS final = 1; +┌─key─┬─some───┠+│ 1 │ second │ +└─────┴────────┘ + +SET final = 1; +SELECT * FROM test; +┌─key─┬─some───┠+│ 1 │ second │ +└─────┴────────┘ +``` + +## flatten_nested {#flatten_nested} + +タイプ: Bool + +デフォルト値: 1 + +[ãƒã‚¹ãƒˆ](../../sql-reference/data-types/nested-data-structures/index.md)カラムã®ãƒ‡ãƒ¼ã‚¿å½¢å¼ã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚«ãƒ©ãƒ ã¯åˆ¥ã€…ã®é…列ã«ãƒ•ãƒ©ãƒƒãƒˆåŒ–ã•ã‚Œã‚‹ã€‚ +- 0 — ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚«ãƒ©ãƒ ã¯ã‚¿ãƒ—ルã®å˜ä¸€é…列ã®ã¾ã¾ã¨ãªã‚‹ã€‚ + +**使用法** + +設定ãŒ`0`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ä»»æ„ã®ãƒã‚¹ãƒˆãƒ¬ãƒ™ãƒ«ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SET flatten_nested = 1; +CREATE TABLE t_nest (`n` Nested(a UInt32, b UInt32)) ENGINE = MergeTree ORDER BY tuple(); + +SHOW CREATE TABLE t_nest; +``` + +çµæžœ: + +``` text +┌─statement───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ CREATE TABLE default.t_nest +( + `n.a` Array(UInt32), + `n.b` Array(UInt32) +) +ENGINE = MergeTree +ORDER BY tuple() +SETTINGS index_granularity = 8192 │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SET flatten_nested = 0; + +CREATE TABLE t_nest (`n` Nested(a UInt32, b UInt32)) ENGINE = MergeTree ORDER BY tuple(); + +SHOW CREATE TABLE t_nest; +``` + +çµæžœ: + +``` text +┌─statement──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ CREATE TABLE default.t_nest +( + `n` Nested(a UInt32, b UInt32) +) +ENGINE = MergeTree +ORDER BY tuple() +SETTINGS index_granularity = 8192 │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## force_aggregate_partitions_independently {#force_aggregate_partitions_independently} + +タイプ: Bool + +デフォルト値: 0 + +é©ç”¨å¯èƒ½ãªå ´åˆã«æœ€é©åŒ–ã®ä½¿ç”¨ã‚’強制ã—ã¾ã™ãŒã€ãƒ’ューリスティックã®åˆ¤æ–­ã«ã‚ˆã‚Šä½¿ç”¨ã•ã‚Œãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +## force_aggregation_in_order {#force_aggregation_in_order} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã®è¨­å®šã¯ã€ã‚µãƒ¼ãƒãƒ¼è‡ªèº«ãŒåˆ†æ•£ã‚¯ã‚¨ãƒªã‚’サãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚通常ã®æ“作を破るãŸã‚ã€æ‰‹å‹•ã§å¤‰æ›´ã—ãªã„ã§ãã ã•ã„。(分散集計中ã«ãƒªãƒ¢ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã§é †åºã§ã®é›†è¨ˆã®ä½¿ç”¨ã‚’強制ã—ã¾ã™ï¼‰ã€‚ + +## force_data_skipping_indices {#force_data_skipping_indices} + +タイプ: String + +デフォルト値: + +指定ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ”ングインデックスãŒä½¿ç”¨ã•ã‚Œãªã„å ´åˆã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’無効ã«ã—ã¾ã™ã€‚ + +以下ã®ä¾‹ã‚’考ãˆã¦ã¿ã¦ãã ã•ã„。 + +```sql +CREATE TABLE data +( + key Int, + d1 Int, + d1_null Nullable(Int), + INDEX d1_idx d1 TYPE minmax GRANULARITY 1, + INDEX d1_null_idx assumeNotNull(d1_null) TYPE minmax GRANULARITY 1 +) +Engine=MergeTree() +ORDER BY key; + +SELECT * FROM data_01515; +SELECT * FROM data_01515 SETTINGS force_data_skipping_indices=''; -- クエリ㯠CANNOT_PARSE_TEXT エラーを生æˆã—ã¾ã™ã€‚ +SELECT * FROM data_01515 SETTINGS force_data_skipping_indices='d1_idx'; -- クエリ㯠INDEX_NOT_USED エラーを生æˆã—ã¾ã™ã€‚ +SELECT * FROM data_01515 WHERE d1 = 0 SETTINGS force_data_skipping_indices='d1_idx'; -- Ok. +SELECT * FROM data_01515 WHERE d1 = 0 SETTINGS force_data_skipping_indices='`d1_idx`'; -- Ok (完全ãªãƒ‘ーサã®ä¾‹ï¼‰ã€‚ +SELECT * FROM data_01515 WHERE d1 = 0 SETTINGS force_data_skipping_indices='`d1_idx`, d1_null_idx'; -- d1_null_idx ãŒä½¿ç”¨ã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ã‚¯ã‚¨ãƒªã¯ INDEX_NOT_USED エラーを生æˆã—ã¾ã™ã€‚ +SELECT * FROM data_01515 WHERE d1 = 0 AND assumeNotNull(d1_null) = 0 SETTINGS force_data_skipping_indices='`d1_idx`, d1_null_idx'; -- Ok. +``` + +## force_grouping_standard_compatibility {#force_grouping_standard_compatibility} + +タイプ: Bool + +デフォルト値: 1 + +GROUPING 関数ãŒå¼•æ•°ãŒé›†ç´„キーã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¦ã„ãªã„å ´åˆã« 1 ã‚’è¿”ã™ã‚ˆã†ã«ã—ã¾ã™ã€‚ + +## force_index_by_date {#force_index_by_date} + +タイプ: Bool + +デフォルト値: 0 + +インデックスãŒæ—¥ä»˜ã«ã‚ˆã£ã¦ä½¿ç”¨ã§ããªã„å ´åˆã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’無効ã«ã—ã¾ã™ã€‚ + +MergeTree ファミリーã®ãƒ†ãƒ¼ãƒ–ルã§æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +`force_index_by_date=1`ã®å ´åˆã€ClickHouse ã¯ã€ã‚¯ã‚¨ãƒªã«ãƒ‡ãƒ¼ã‚¿ç¯„囲を制é™ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãる日付キーæ¡ä»¶ãŒã‚ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚é©åˆ‡ãªæ¡ä»¶ãŒãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ãŸã ã—ã€æ¡ä»¶ãŒèª­ã¿å–るデータé‡ã‚’減少ã•ã›ã‚‹ã‹ã©ã†ã‹ã¯ç¢ºèªã—ã¾ã›ã‚“。ãŸã¨ãˆã°ã€æ¡ä»¶ `Date != ' 2000-01-01 '` ã¯ã€ãƒ†ãƒ¼ãƒ–ル内ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã«ä¸€è‡´ã™ã‚‹å ´åˆã§ã‚‚å—ã‘入れられã¾ã™ï¼ˆã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã«ãƒ•ãƒ«ã‚¹ã‚­ãƒ£ãƒ³ãŒå¿…è¦ã§ã™ï¼‰ã€‚MergeTree テーブル内ã®ãƒ‡ãƒ¼ã‚¿ç¯„囲ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## force_optimize_projection {#force_optimize_projection} + +タイプ: Bool + +デフォルト値: 0 + +`SELECT` クエリ内ã§[プロジェクション](../../engines/table-engines/mergetree-family/mergetree.md/#projections)ã®å¿…須使用を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚プロジェクション最é©åŒ–ãŒæœ‰åŠ¹ãªå ´åˆï¼ˆ[optimize_use_projections](#optimize_use_projections)設定をå‚照)。 + +å¯èƒ½ãªå€¤: + +- 0 — プロジェクション最é©åŒ–ã¯å¿…é ˆã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +- 1 — プロジェクション最é©åŒ–ã¯å¿…é ˆã§ã™ã€‚ + +## force_optimize_projection_name {#force_optimize_projection_name} + +タイプ: String + +デフォルト値: + +éžç©ºã®æ–‡å­—列ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã®ãƒ—ロジェクションãŒã‚¯ã‚¨ãƒªå†…ã§å°‘ãªãã¨ã‚‚一度使用ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 文字列: クエリ内ã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒ—ロジェクションã®åå‰ + +## force_optimize_skip_unused_shards {#force_optimize_skip_unused_shards} + +タイプ: UInt64 + +デフォルト値: 0 + +[optimize_skip_unused_shards](#optimize-skip-unused-shards) ãŒæœ‰åŠ¹ã§ã€æœªä½¿ç”¨ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’スキップã§ããªã„å ´åˆã«ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚スキップãŒä¸å¯èƒ½ã§ã€è¨­å®šãŒæœ‰åŠ¹ãªå ´åˆã¯ã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。ClickHouse ã¯ä¾‹å¤–をスローã—ã¾ã›ã‚“。 +- 1 — 有効。テーブルã«ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚­ãƒ¼ãŒã‚ã‚‹å ´åˆã®ã¿ã‚¯ã‚¨ãƒªã®å®Ÿè¡ŒãŒç„¡åŠ¹ã«ãªã‚Šã¾ã™ã€‚ +- 2 — 有効。テーブルã«ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚­ãƒ¼ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã«ã‹ã‹ã‚らãšã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡ŒãŒç„¡åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +## force_optimize_skip_unused_shards_nesting {#force_optimize_skip_unused_shards_nesting} + +タイプ: UInt64 + +デフォルト値: 0 + +分散クエリã®ãƒã‚¹ãƒˆãƒ¬ãƒ™ãƒ«ã«å¿œã˜ã¦[`force_optimize_skip_unused_shards`](#force-optimize-skip-unused-shards)を制御ã—ã¾ã™ï¼ˆåˆ¥ã®`Distributed`テーブルãŒåˆ¥ã®`Distributed`テーブルをå‚ç…§ã—ã¦ã„ã‚‹å ´åˆï¼‰ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 - 無効。`force_optimize_skip_unused_shards`ã¯å¸¸ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ +- 1 — 最åˆã®ãƒ¬ãƒ™ãƒ«ã®ã¿ã«å¯¾ã—ã¦`force_optimize_skip_unused_shards`を有効ã«ã—ã¾ã™ã€‚ +- 2 — 第二レベルã¾ã§`force_optimize_skip_unused_shards`を有効ã«ã—ã¾ã™ã€‚ + +## force_primary_key {#force_primary_key} + +タイプ: Bool + +デフォルト値: 0 + +プライマリキーã«ã‚ˆã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä½œæˆãŒä¸å¯èƒ½ãªå ´åˆã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’無効ã«ã—ã¾ã™ã€‚ + +MergeTree ファミリーã®ãƒ†ãƒ¼ãƒ–ルã§æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +`force_primary_key=1`ã®å ´åˆã€ClickHouse ã¯ã€ã‚¯ã‚¨ãƒªã«ãƒ‡ãƒ¼ã‚¿ç¯„囲を制é™ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãるプライマリキーæ¡ä»¶ãŒã‚ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚é©åˆ‡ãªæ¡ä»¶ãŒãªã„å ´åˆã¯ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ãŸã ã—ã€æ¡ä»¶ãŒèª­ã¿å–るデータé‡ã‚’減少ã•ã›ã‚‹ã‹ã©ã†ã‹ã¯ç¢ºèªã—ã¾ã›ã‚“。MergeTree テーブル内ã®ãƒ‡ãƒ¼ã‚¿ç¯„囲ã«é–¢ã™ã‚‹è©³ç´°ã«ã¤ã„ã¦ã¯ã€[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## force_remove_data_recursively_on_drop {#force_remove_data_recursively_on_drop} + +タイプ: Bool + +デフォルト値: 0 + +DROP クエリã§ãƒ‡ãƒ¼ã‚¿ã‚’å†å¸°çš„ã«å‰Šé™¤ã—ã¾ã™ã€‚'Directory not empty' エラーを回é¿ã—ã¾ã™ãŒã€ãƒ‡ã‚¿ãƒƒãƒã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’é™ã‹ã«å‰Šé™¤ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## formatdatetime_f_prints_single_zero {#formatdatetime_f_prints_single_zero} + +タイプ: Bool + +デフォルト値: 0 + +関数 'formatDateTime()' ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒã‚¿ '%f' ã¯ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸå€¤ã«å°æ•°ç§’ãŒãªã„å ´åˆã€å…­ã¤ã®ã‚¼ãƒ­ã®ä»£ã‚ã‚Šã«ä¸€ã¤ã®ã‚¼ãƒ­ã‚’å°åˆ·ã—ã¾ã™ã€‚ + +## formatdatetime_format_without_leading_zeros {#formatdatetime_format_without_leading_zeros} + +タイプ: Bool + +デフォルト値: 0 + +関数 'formatDateTime()' ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒã‚¿ '%c', '%l' ãŠã‚ˆã³ '%k' ã¯ã€æœˆã¨æ™‚間を先頭ゼロãªã—ã§å°åˆ·ã—ã¾ã™ã€‚ + +## formatdatetime_parsedatetime_m_is_month_name {#formatdatetime_parsedatetime_m_is_month_name} + +タイプ: Bool + +デフォルト値: 1 + +関数 'formatDateTime()' ãŠã‚ˆã³ 'parseDateTime()' ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒã‚¿ '%M' ã¯ã€åˆ†ã®ä»£ã‚ã‚Šã«æœˆåã‚’å°åˆ·/解æžã—ã¾ã™ã€‚ + +## fsync_metadata {#fsync_metadata} + +タイプ: Bool + +デフォルト値: 1 + +.sql ファイルを書ã込む際ã«[fSync](http://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html)を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚デフォルトã§ã¯æœ‰åŠ¹ã§ã™ã€‚ + +サーãƒãƒ¼ã«æ•°ç™¾ä¸‡ã®å°ã•ãªãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚Šã€ãれらãŒçµ¶ãˆãšä½œæˆã•ã‚Œã¦å‰Šé™¤ã•ã‚Œã‚‹å ´åˆã¯ã€ç„¡åŠ¹ã«ã™ã‚‹æ„味ãŒã‚ã‚Šã¾ã™ã€‚ + +## function_implementation {#function_implementation} + +タイプ: String + +デフォルト値: + +特定ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã¾ãŸã¯ãƒãƒªã‚¢ãƒ³ãƒˆã®é–¢æ•°å®Ÿè£…ã‚’é¸æŠžã—ã¾ã™ï¼ˆã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ï¼‰ã€‚空ã®å ´åˆã¯ã™ã¹ã¦æœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +## function_json_value_return_type_allow_complex {#function_json_value_return_type_allow_complex} + +タイプ: Bool + +デフォルト値: 0 + +json_value 関数ã«å¯¾ã—ã¦è¤‡é›‘ãªã‚¿ã‚¤ãƒ—(構造体ã€é…列ã€ãƒžãƒƒãƒ—ãªã©ï¼‰ã®è¿”å´ã‚’許å¯ã™ã‚‹ã‹åˆ¶å¾¡ã—ã¾ã™ã€‚ + +```sql +SELECT JSON_VALUE('{"hello":{"world":"!"}}', '$.hello') settings function_json_value_return_type_allow_complex=true + +┌─JSON_VALUE('{"hello":{"world":"!"}}', '$.hello')─┠+│ {"world":"!"} │ +└──────────────────────────────────────────────────┘ + +1 row in set. Elapsed: 0.001 sec. +``` + +å¯èƒ½ãªå€¤: + +- true — 許å¯ã€‚ +- false — ä¸è¨±å¯ã€‚ + +## function_json_value_return_type_allow_nullable {#function_json_value_return_type_allow_nullable} + +タイプ: Bool + +デフォルト値: 0 + +JSON_VALUE 関数ã«å¯¾ã—ã¦å€¤ãŒå­˜åœ¨ã—ãªã„å ´åˆã«`NULL`ã‚’è¿”ã™ã“ã¨ã‚’許å¯ã™ã‚‹ã‹åˆ¶å¾¡ã—ã¾ã™ã€‚ + +```sql +SELECT JSON_VALUE('{"hello":"world"}', '$.b') settings function_json_value_return_type_allow_nullable=true; + +┌─JSON_VALUE('{"hello":"world"}', '$.b')─┠+│ á´ºáµá´¸á´¸ │ +└────────────────────────────────────────┘ + +1 row in set. Elapsed: 0.001 sec. +``` + +å¯èƒ½ãªå€¤: + +- true — 許å¯ã€‚ +- false — ä¸è¨±å¯ã€‚ + +## function_locate_has_mysql_compatible_argument_order {#function_locate_has_mysql_compatible_argument_order} + +タイプ: Bool + +デフォルト値: 1 + +関数[locate](../../sql-reference/functions/string-search-functions.md#locate)ã®å¼•æ•°ã®é †åºã‚’制御ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 関数 `locate` ã¯å¼•æ•° `(haystack, needle[, start_pos])`ã‚’å—ã‘入れã¾ã™ã€‚ +- 1 — 関数 `locate` ã¯å¼•æ•° `(needle, haystack, [, start_pos])`(MySQL互æ›ã®å‹•ä½œï¼‰ã‚’å—ã‘入れã¾ã™ã€‚ + +## function_range_max_elements_in_block {#function_range_max_elements_in_block} + +タイプ: UInt64 + +デフォルト値: 500000000 + +関数[range](../../sql-reference/functions/array-functions.md/#range)ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ãƒœãƒªãƒ¥ãƒ¼ãƒ ã®å®‰å…¨é–¾å€¤ã‚’設定ã—ã¾ã™ã€‚データブロックã”ã¨ã«é–¢æ•°ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã‚‹å€¤ã®æœ€å¤§æ•°ï¼ˆãƒ–ロック内ã®ã™ã¹ã¦ã®è¡Œã®é…列サイズã®åˆè¨ˆï¼‰ã‚’定義ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +**å‚照もå‚ç…§** + +- [max_block_size](#setting-max_block_size) +- [min_insert_block_size_rows](#min-insert-block-size-rows) + +## function_sleep_max_microseconds_per_block {#function_sleep_max_microseconds_per_block} + +タイプ: UInt64 + +デフォルト値: 3000000 + +関数 `sleep` ãŒå„ブロックã”ã¨ã«è¨±å¯ã•ã‚Œã‚‹æœ€å¤§ãƒžã‚¤ã‚¯ãƒ­ç§’æ•°ã§ã™ã€‚ユーザーãŒãれより大ããªå€¤ã§å‘¼ã³å‡ºã—ãŸå ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯å®‰å…¨é–¾å€¤ã§ã™ã€‚ + +## function_visible_width_behavior {#function_visible_width_behavior} + +タイプ: UInt64 + +デフォルト値: 1 + +`visibleWidth` ã®å‹•ä½œã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚0 - コードãƒã‚¤ãƒ³ãƒˆã®æ•°ã ã‘をカウント; 1 - ゼロ幅ãŠã‚ˆã³çµ„ã¿åˆã‚ã›æ–‡å­—ã‚’æ­£ã—ãカウントã—ã€å…¨è§’文字を2ã¤ã¨ã—ã¦ã‚«ã‚¦ãƒ³ãƒˆã—ã€ã‚¿ãƒ–幅を見ç©ã‚‚ã‚Šã€å‰Šé™¤æ–‡å­—をカウントã—ã¾ã™ã€‚ + +## geo_distance_returns_float64_on_float64_arguments {#geo_distance_returns_float64_on_float64_arguments} + +タイプ: Bool + +デフォルト値: 1 + +`geoDistance`ã€`greatCircleDistance`ã€`greatCircleAngle` 関数ã®å…¨ã¦ã®å¼•æ•°ãŒ Float64 ã®å ´åˆã€Float64 ã‚’è¿”ã—ã€å†…部計算ã§å€ç²¾åº¦ã‚’使用ã—ã¾ã™ã€‚以å‰ã® ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ã€ã“れらã®é–¢æ•°ã¯å¸¸ã« Float32 ã‚’è¿”ã—ã¾ã—ãŸã€‚ + +## glob_expansion_max_elements {#glob_expansion_max_elements} + +タイプ: UInt64 + +デフォルト値: 1000 + +許å¯ã•ã‚Œã¦ã„る最大アドレス数(外部ストレージã€ãƒ†ãƒ¼ãƒ–ル関数ãªã©ï¼‰ã€‚ + +## grace_hash_join_initial_buckets {#grace_hash_join_initial_buckets} + +タイプ: UInt64 + +デフォルト値: 1 + +グレースãƒãƒƒã‚·ãƒ¥çµåˆã®åˆæœŸãƒã‚±ãƒƒãƒˆæ•° + +## grace_hash_join_max_buckets {#grace_hash_join_max_buckets} + +タイプ: UInt64 + +デフォルト値: 1024 + +グレースãƒãƒƒã‚·ãƒ¥çµåˆã®ãƒã‚±ãƒƒãƒˆæ•°ã®åˆ¶é™ + +## group_by_overflow_mode {#group_by_overflow_mode} + +タイプ: OverflowModeGroupBy + +デフォルト値: throw + +制é™ãŒè¶…éŽã•ã‚ŒãŸå ´åˆã«ä½•ã‚’ã™ã‚‹ã‹ã€‚ + +## group_by_two_level_threshold {#group_by_two_level_threshold} + +タイプ: UInt64 + +デフォルト値: 100000 + +2階層ã®é›†è¨ˆãŒå§‹ã¾ã‚‹ã‚­ãƒ¼ã®æ•°ã‹ã‚‰ã€‚0 - 閾値ãŒè¨­å®šã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +## group_by_two_level_threshold_bytes {#group_by_two_level_threshold_bytes} + +タイプ: UInt64 + +デフォルト値: 50000000 + +集計状態ã®ã‚µã‚¤ã‚ºãŒãƒã‚¤ãƒˆå˜ä½ã§ã€2階層ã®é›†è¨ˆãŒä½¿ç”¨ã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚‹æœ€å°ã‚µã‚¤ã‚ºã€‚0 - 閾値ãŒè¨­å®šã•ã‚Œã¦ã„ã¾ã›ã‚“。ã„ãšã‚Œã‹ã®é–¾å€¤ãŒãƒˆãƒªã‚¬ãƒ¼ã•ã‚ŒãŸã¨ãã«2階層ã®é›†è¨ˆãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## group_by_use_nulls {#group_by_use_nulls} + +タイプ: Bool + +デフォルト値: 0 + +[GROUP BYå¥](/docs/ja/sql-reference/statements/select/group-by.md)ãŒé›†ç´„キーã®ã‚¿ã‚¤ãƒ—を扱ã†æ–¹æ³•ã‚’変更ã—ã¾ã™ã€‚ +`ROLLUP`ã€`CUBE`ã€ã¾ãŸã¯ `GROUPING SETS` 指定å­ãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€ã„ãã¤ã‹ã®é›†ç´„キーã¯ç‰¹å®šã®çµæžœè¡Œã‚’生æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +ã“れらã®ã‚­ãƒ¼ã®åˆ—ã¯ã€ã“ã®è¨­å®šã«å¿œã˜ã¦ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¾ãŸã¯ `NULL` ã§ç›¸å¿œã®è¡Œã«æº€ãŸã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 集約キータイプã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæ¬ è½å€¤ã‚’生æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- 1 — ClickHouse 㯠SQL 標準ã§è¿°ã¹ã‚‰ã‚Œã¦ã„る通り㫠`GROUP BY` を実行ã—ã¾ã™ã€‚集約キーã®ã‚¿ã‚¤ãƒ—ã¯[Nullable](/docs/ja/sql-reference/data-types/nullable.md/#data_type-nullable)ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚該当ã™ã‚‹é›†ç´„キーã®åˆ—ã¯ã€ä½¿ç”¨ã•ã‚Œãªã‹ã£ãŸè¡Œã®[NULL](/docs/ja/sql-reference/syntax.md)ã§æº€ãŸã•ã‚Œã¾ã™ã€‚ + +å‚照もå‚ç…§: + +- [GROUP BYå¥](/docs/ja/sql-reference/statements/select/group-by.md) + +## handshake_timeout_ms {#handshake_timeout_ms} + +タイプ: ミリ秒 + +デフォルト値: 10000 + +ãƒãƒ³ãƒ‰ã‚·ã‚§ã‚¤ã‚¯ä¸­ã«ãƒ¬ãƒ—リカã‹ã‚‰ Hello パケットをå—ä¿¡ã™ã‚‹ãŸã‚ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆãƒŸãƒªç§’)。 + +## hdfs_create_new_file_on_insert {#hdfs_create_new_file_on_insert} + +タイプ: Bool + +デフォルト値: 0 + +HDFS エンジンテーブルã«å¯¾ã™ã‚‹å„挿入時ã«æ–°ã—ã„ファイルを作æˆã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚有効ãªå ´åˆã€å„挿入時ã«æ¬¡ã®ã‚ˆã†ãªåå‰ã§æ–°ã—ã„ HDFS ファイルãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +åˆæœŸ: `data.Parquet.gz` -> `data.1.Parquet.gz` -> `data.2.Parquet.gz` ãªã©ã€‚ + +å¯èƒ½ãªå€¤: +- 0 — `INSERT` クエリã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€å¾Œã«æ–°ã—ã„データを追加ã—ã¾ã™ã€‚ +- 1 — `INSERT` クエリã¯æ–°ã—ã„ファイルを作æˆã—ã¾ã™ã€‚ + +## hdfs_ignore_file_doesnt_exist {#hdfs_ignore_file_doesnt_exist} + +タイプ: Bool + +デフォルト値: 0 + +特定ã®ã‚­ãƒ¼ã‚’読ã¿å–ã‚‹éš›ã«ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã—ãªã„å ´åˆã«ãã®ä¸åœ¨ã‚’無視ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 1 — `SELECT` ã¯ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ +- 0 — `SELECT` ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## hdfs_replication {#hdfs_replication} + +タイプ: UInt64 + +デフォルト値: 0 + +hdfs ファイルãŒä½œæˆã•ã‚Œã‚‹éš›ã«æŒ‡å®šã§ãる実際ã®ãƒ¬ãƒ—リケーション数。 + +## hdfs_skip_empty_files {#hdfs_skip_empty_files} + +タイプ: Bool + +デフォルト値: 0 + +[HDFS](../../engines/table-engines/integrations/hdfs.md) エンジンテーブルã§ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 0 — 空ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨äº’æ›æ€§ãŒãªã„å ´åˆã€`SELECT` ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ +- 1 — 空ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã™ã‚‹`SELECT` ã¯ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## hdfs_throw_on_zero_files_match {#hdfs_throw_on_zero_files_match} + +タイプ: Bool + +デフォルト値: 0 + +グロブ展開è¦å‰‡ã«å¾“ã£ã¦ä¸€è‡´ã™ã‚‹ã‚¼ãƒ­ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚‹å ´åˆã«ã‚¨ãƒ©ãƒ¼ã‚’スローã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 1 — `SELECT` ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ +- 0 — `SELECT` ã¯ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## hdfs_truncate_on_insert {#hdfs_truncate_on_insert} + +タイプ: Bool + +デフォルト値: 0 + +hdfs エンジンテーブルã§ã®æŒ¿å…¥å‰ã«åˆ‡ã‚Šè©°ã‚を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚無効ã®å ´åˆã€HDFS ã«ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã«æŒ¿å…¥ã‚’試ã¿ã‚‹ã¨ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 0 — `INSERT` クエリã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€å¾Œã«æ–°ã—ã„データを追加ã—ã¾ã™ã€‚ +- 1 — `INSERT` クエリã¯æ—¢å­˜ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®å†…容を新ã—ã„データã§ç½®ãæ›ãˆã¾ã™ã€‚ + +## hedged_connection_timeout_ms {#hedged_connection_timeout_ms} + +タイプ: ミリ秒 + +デフォルト値: 50 + +ヘッジè¦æ±‚ã®ãŸã‚ã«ãƒ¬ãƒ—リカã¨ã®æŽ¥ç¶šã‚’確立ã™ã‚‹éš›ã®æŽ¥ç¶šã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +## hnsw_candidate_list_size_for_search {#hnsw_candidate_list_size_for_search} + +タイプ: UInt64 + +デフォルト値: 256 + +ベクトル類似性インデックスを探索ã™ã‚‹éš›ã®å‹•çš„候補リストã®ã‚µã‚¤ã‚ºã€åˆ¥å 'ef_search'。 + +## hsts_max_age {#hsts_max_age} + +タイプ: UInt64 + +デフォルト値: 0 + +HSTS ã®æœ‰åŠ¹æœŸé™ã€‚0 㯠HSTS を無効ã«ã—ã¾ã™ã€‚ + +## http_connection_timeout {#http_connection_timeout} + +タイプ: 秒 + +デフォルト値: 1 + +HTTP 接続タイムアウト(秒å˜ä½ï¼‰ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0 - 無効(無é™ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼‰ã€‚ + +## http_headers_progress_interval_ms {#http_headers_progress_interval_ms} + +タイプ: UInt64 + +デフォルト値: 100 + +指定ã•ã‚ŒãŸé–“éš”ã”ã¨ã«ã€X-ClickHouse-Progress HTTP ヘッダーをãれ以上é€ä¿¡ã—ãªã„。 + +## http_make_head_request {#http_make_head_request} + +タイプ: Bool + +デフォルト値: 1 + +`http_make_head_request` 設定ã¯ã€HTTP ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹éš›ã«ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚µã‚¤ã‚ºãªã©ã®æƒ…報をå–å¾—ã™ã‚‹ãŸã‚ã« `HEAD` リクエストを実行ã§ãるよã†ã«ã—ã¾ã™ã€‚有効ã«ãªã£ã¦ã„ã‚‹ãŸã‚ã€`HEAD` リクエストをサãƒãƒ¼ãƒˆã—ãªã„サーãƒãƒ¼ã§ã¯ã“ã®è¨­å®šã‚’無効ã«ã™ã‚‹ã“ã¨ãŒæœ›ã¾ã—ã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +## http_max_field_name_size {#http_max_field_name_size} + +タイプ: UInt64 + +デフォルト値: 131072 + +HTTP ヘッダー内ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰åã®æœ€å¤§é•· + +## http_max_field_value_size {#http_max_field_value_size} + +タイプ: UInt64 + +デフォルト値: 131072 + +HTTP ヘッダー内ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å€¤ã®æœ€å¤§é•· + +## http_max_fields {#http_max_fields} + +タイプ: UInt64 + +デフォルト値: 1000000 + +HTTP ヘッダー内ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®æœ€å¤§æ•° + +## http_max_multipart_form_data_size {#http_max_multipart_form_data_size} + +タイプ: UInt64 + +デフォルト値: 1073741824 + +multipart/form-data コンテンツã®ã‚µã‚¤ã‚ºã®åˆ¶é™ã€‚ã“ã®è¨­å®šã¯ URL パラメータã‹ã‚‰è§£æžã™ã‚‹ã“ã¨ã¯ã§ããšã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロファイルã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚コンテンツã¯ã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡ŒãŒé–‹å§‹ã•ã‚Œã‚‹å‰ã«ãƒ¡ãƒ¢ãƒªå†…ã§è§£æžã•ã‚Œã€å¤–部テーブルãŒä½œæˆã•ã‚Œã¾ã™ã€‚ãã—ã¦ã€ã“ã‚Œã¯ãã®æ®µéšŽã«å½±éŸ¿ã‚’与ãˆã‚‹å”¯ä¸€ã®åˆ¶é™ã§ã™ï¼ˆæœ€å¤§ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã¨æœ€å¤§å®Ÿè¡Œæ™‚é–“ã«é–¢ã™ã‚‹åˆ¶é™ã¯ã€HTTP フォームデータã®èª­ã¿å–り中ã«ã¯å½±éŸ¿ãŒã‚ã‚Šã¾ã›ã‚“)。 + +## http_max_request_param_data_size {#http_max_request_param_data_size} + +タイプ: UInt64 + +デフォルト値: 10485760 + +事å‰å®šç¾©ã•ã‚ŒãŸ HTTP リクエストã§ã‚¯ã‚¨ãƒªãƒ‘ラメータã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºã®åˆ¶é™ã€‚ + +## http_max_tries {#http_max_tries} + +タイプ: UInt64 + +デフォルト値: 10 + +HTTP 経由ã§èª­ã¿è¾¼ã‚€æœ€å¤§è©¦è¡Œå›žæ•°ã€‚ + +## http_max_uri_size {#http_max_uri_size} + +タイプ: UInt64 + +デフォルト値: 1048576 + +HTTP リクエストã®æœ€å¤§ URI 長を設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +## http_native_compression_disable_checksumming_on_decompress {#http_native_compression_disable_checksumming_on_decompress} + +タイプ: Bool + +デフォルト値: 0 + +クライアントã‹ã‚‰ã® HTTP POST データを解å‡ã™ã‚‹éš›ã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ æ¤œè¨¼ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ ClickHouse 独自ã®åœ§ç¸®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ã®ã¿ä½¿ç”¨ã•ã‚Œã¾ã™ï¼ˆ`gzip` ã‚„ `deflate` ã«ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“)。 + +詳細ã«ã¤ã„ã¦ã¯ã€[HTTP インターフェースã®èª¬æ˜Ž](../../interfaces/http.md)を読んã§ãã ã•ã„。 + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +## http_receive_timeout {#http_receive_timeout} + +タイプ: 秒 + +デフォルト値: 30 + +HTTP å—信タイムアウト(秒å˜ä½ï¼‰ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0 - 無効(無é™ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼‰ã€‚ + +## http_response_buffer_size {#http_response_buffer_size} + +タイプ: UInt64 + +デフォルト値: 0 + +HTTP レスãƒãƒ³ã‚¹ã‚’クライアントã«é€ä¿¡ã™ã‚‹å‰ã«ã‚µãƒ¼ãƒãƒ¼ãƒ¡ãƒ¢ãƒªå†…ã§ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã™ã‚‹ãƒã‚¤ãƒˆæ•°ï¼ˆhttp_wait_end_of_queryãŒæœ‰åŠ¹ãªå ´åˆã®ãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã‚‚å«ã‚€ï¼‰ã€‚ + +## http_retry_initial_backoff_ms {#http_retry_initial_backoff_ms} + +タイプ: UInt64 + +デフォルト値: 100 + +HTTP 経由ã§èª­ã¿è¾¼ã‚€éš›ã®ãƒãƒƒã‚¯ã‚ªãƒ•åˆæœŸæœ€å°ãƒžã‚¤ã‚¯ãƒ­ç§’数。 + +## http_retry_max_backoff_ms {#http_retry_max_backoff_ms} + +タイプ: UInt64 + +デフォルト値: 10000 + +HTTP 経由ã§èª­ã¿è¾¼ã‚€éš›ã®ãƒãƒƒã‚¯ã‚ªãƒ•æœ€å¤§ãƒžã‚¤ã‚¯ãƒ­ç§’数。 + +## http_send_timeout {#http_send_timeout} + +タイプ: 秒 + +デフォルト値: 30 + +HTTP é€ä¿¡ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’å˜ä½ï¼‰ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0 - 無効(無é™ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼‰ã€‚ + +:::note +ã“ã‚Œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ—ロファイルã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚変更を有効ã«ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®å†èµ·å‹•ãŒå¿…è¦ã§ã™ã€‚ +::: + +## http_skip_not_found_url_for_globs {#http_skip_not_found_url_for_globs} + +タイプ: Bool + +デフォルト値: 1 + +HTTP_NOT_FOUND エラーを伴ã†ã‚°ãƒ­ãƒ¼ãƒ–用㮠URL をスキップã—ã¾ã™ã€‚ + +## http_wait_end_of_query {#http_wait_end_of_query} + +タイプ: Bool + +デフォルト値: 0 + +サーãƒãƒ¼å´ã§ã® HTTP レスãƒãƒ³ã‚¹ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã‚’有効ã«ã—ã¾ã™ã€‚ + +## http_write_exception_in_output_format {#http_write_exception_in_output_format} + +タイプ: Bool + +デフォルト値: 1 + +有効ãªå‡ºåŠ›ã‚’生æˆã™ã‚‹ãŸã‚ã«ã€å‡ºåŠ›å½¢å¼ã«ä¾‹å¤–を書ãè¾¼ã¿ã¾ã™ã€‚JSON ãŠã‚ˆã³ XML å½¢å¼ã§å‹•ä½œã—ã¾ã™ã€‚ + +## http_zlib_compression_level {#http_zlib_compression_level} + +タイプ: Int64 + +デフォルト値: 3 + +[enable_http_compression = 1](#enable_http_compression) ã®å ´åˆã€HTTP リクエストã¸ã®å¿œç­”ã§ãƒ‡ãƒ¼ã‚¿åœ§ç¸®ã®ãƒ¬ãƒ™ãƒ«ã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: 1 ã‹ã‚‰ 9 ã®æ•°å€¤ã€‚ + +## iceberg_engine_ignore_schema_evolution {#iceberg_engine_ignore_schema_evolution} + +タイプ: Bool + +デフォルト値: 0 + +Iceberg テーブルエンジンã§ã‚¹ã‚­ãƒ¼ãƒžã®é€²åŒ–を無視ã—ã€ãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã«æŒ‡å®šã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã¾ãŸã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰è§£æžã•ã‚ŒãŸæœ€æ–°ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¦ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€é€²åŒ–ã—ãŸã‚¹ã‚­ãƒ¼ãƒžã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ãŒåŒã˜ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¦èª­ã¿è¾¼ã¾ã‚Œã‚‹ãŸã‚ã€èª¤ã£ãŸçµæžœã«ã¤ãªãŒã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## idle_connection_timeout {#idle_connection_timeout} + +タイプ: UInt64 + +デフォルト値: 3600 + +指定ã•ã‚ŒãŸç§’数後ã«ã‚¢ã‚¤ãƒ‰ãƒ« TCP 接続を閉ã˜ã‚‹ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ï¼ˆ0 - ã™ãã«é–‰ã˜ã‚‹ã€0秒後)。 + +## ignore_cold_parts_seconds {#ignore_cold_parts_seconds} + +タイプ: Int64 + +デフォルト値: 0 + +Only in ClickHouse Cloud. プリウォームã•ã‚Œã‚‹ã¾ã§ï¼ˆsee cache_populated_by_fetch)ã¾ãŸã¯ã“ã®ç§’æ•°å¤ããªã‚‹ã¾ã§ã€SELECT クエリã‹ã‚‰æ–°ã—ã„データパーツを除外ã—ã¾ã™ã€‚Replicated-/SharedMergeTree ã®ã¿ã€‚ + +## ignore_data_skipping_indices {#ignore_data_skipping_indices} + +タイプ: String + +デフォルト値: + +クエリã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã«æŒ‡å®šã•ã‚ŒãŸã‚¹ã‚­ãƒƒãƒ”ングインデックスを無視ã—ã¾ã™ã€‚ + +以下ã®ä¾‹ã‚’考ãˆã¦ã¿ã¦ãã ã•ã„。 + +```sql +CREATE TABLE data +( + key Int, + x Int, + y Int, + INDEX x_idx x TYPE minmax GRANULARITY 1, + INDEX y_idx y TYPE minmax GRANULARITY 1, + INDEX xy_idx (x,y) TYPE minmax GRANULARITY 1 +) +Engine=MergeTree() +ORDER BY key; + +INSERT INTO data VALUES (1, 2, 3); + +SELECT * FROM data; +SELECT * FROM data SETTINGS ignore_data_skipping_indices=''; -- クエリ㯠CANNOT_PARSE_TEXT エラーを生æˆã—ã¾ã™ã€‚ +SELECT * FROM data SETTINGS ignore_data_skipping_indices='x_idx'; -- Ok. +SELECT * FROM data SETTINGS ignore_data_skipping_indices='na_idx'; -- Ok。 + +SELECT * FROM data WHERE x = 1 AND y = 1 SETTINGS ignore_data_skipping_indices='xy_idx',force_data_skipping_indices='xy_idx' ; -- クエリ㯠INDEX_NOT_USED エラーを生æˆã—ã¾ã™ã€‚ãªãœãªã‚‰ xy_idx ãŒæ˜Žç¤ºçš„ã«ç„¡è¦–ã•ã‚Œã¦ã„ã‚‹ã‹ã‚‰ã§ã™ã€‚ +SELECT * FROM data WHERE x = 1 AND y = 2 SETTINGS ignore_data_skipping_indices='xy_idx'; +``` + +無視ã›ãšã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¦ã„ãªã„クエリ: +```sql +EXPLAIN indexes = 1 SELECT * FROM data WHERE x = 1 AND y = 2; + +Expression ((Projection + Before ORDER BY)) + Filter (WHERE) + ReadFromMergeTree (default.data) + Indexes: + PrimaryKey + Condition: true + Parts: 1/1 + Granules: 1/1 + Skip + Name: x_idx + Description: minmax GRANULARITY 1 + Parts: 0/1 + Granules: 0/1 + Skip + Name: y_idx + Description: minmax GRANULARITY 1 + Parts: 0/0 + Granules: 0/0 + Skip + Name: xy_idx + Description: minmax GRANULARITY 1 + Parts: 0/0 + Granules: 0/0 +``` + +`xy_idx` インデックスを無視: +```sql +EXPLAIN indexes = 1 SELECT * FROM data WHERE x = 1 AND y = 2 SETTINGS ignore_data_skipping_indices='xy_idx'; + +Expression ((Projection + Before ORDER BY)) + Filter (WHERE) + ReadFromMergeTree (default.data) + Indexes: + PrimaryKey + Condition: true + Parts: 1/1 + Granules: 1/1 + Skip + Name: x_idx + Description: minmax GRANULARITY 1 + Parts: 0/1 + Granules: 0/1 + Skip + Name: y_idx + Description: minmax GRANULARITY 1 + Parts: 0/0 + Granules: 0/0 +``` + +MergeTree ファミリーã®ãƒ†ãƒ¼ãƒ–ルã§æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +## ignore_drop_queries_probability {#ignore_drop_queries_probability} + +タイプ: Float + +デフォルト値: 0 + +有効ãªå ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯æŒ‡å®šã•ã‚ŒãŸç¢ºçŽ‡ã§ã™ã¹ã¦ã® DROP テーブルクエリを無視ã—ã¾ã™ï¼ˆMemory ãŠã‚ˆã³ JOIN エンジンã®å ´åˆã€DROP ã‚’ TRUNCATE ã«ç½®ãæ›ãˆã¾ã™ï¼‰ã€‚テスト目的ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## ignore_materialized_views_with_dropped_target_table {#ignore_materialized_views_with_dropped_target_table} + +タイプ: Bool + +デフォルト値: 0 + +ビューã¸ã®ãƒ—ッシュ中ã«ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルãŒå‰Šé™¤ã•ã‚ŒãŸçŠ¶æ…‹ã®MVを無視ã—ã¾ã™ã€‚ + +## ignore_on_cluster_for_replicated_access_entities_queries {#ignore_on_cluster_for_replicated_access_entities_queries} + +タイプ: Bool + +デフォルト値: 0 + +レプリケートアクセスエンティティ管ç†ã‚¯ã‚¨ãƒªã®ãŸã‚ã® ON CLUSTER å¥ã‚’無視ã—ã¾ã™ã€‚ + +## ignore_on_cluster_for_replicated_named_collections_queries {#ignore_on_cluster_for_replicated_named_collections_queries} + +タイプ: Bool + +デフォルト値: 0 + +レプリケートã•ã‚ŒãŸåå‰ä»˜ãコレクション管ç†ã‚¯ã‚¨ãƒªã®ãŸã‚ã® ON CLUSTER å¥ã‚’無視ã—ã¾ã™ã€‚ + +## ignore_on_cluster_for_replicated_udf_queries {#ignore_on_cluster_for_replicated_udf_queries} + +タイプ: Bool + +デフォルト値: 0 + +レプリケーションã•ã‚ŒãŸ UDF 管ç†ã‚¯ã‚¨ãƒªã®ãŸã‚ã® ON CLUSTER å¥ã‚’無視ã—ã¾ã™ã€‚ + +## implicit_select {#implicit_select} + +タイプ: Bool + +デフォルト値: 0 + +先頭㮠SELECT キーワードãªã—ã«å˜ç´”㪠SELECT クエリを書ãã“ã¨ã‚’許å¯ã—ã€ãã‚Œã«ã‚ˆã‚Šé›»å“スタイルã®ä½¿ç”¨ãŒç°¡å˜ã«ãªã‚Šã¾ã™ã€‚例: `1 + 2` ãŒæœ‰åŠ¹ãªã‚¯ã‚¨ãƒªã«ãªã‚Šã¾ã™ã€‚ + +`clickhouse-local` ã§ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã§ã‚ã‚Šã€æ˜Žç¤ºçš„ã«ç„¡åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## implicit_transaction {#implicit_transaction} + +タイプ: Bool + +デフォルト値: 0 + +有効ã«ã•ã‚Œã¦ã„ã¦ã€ã™ã§ã«ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å†…ã§ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªå…¨ä½“をトランザクション内ã«ãƒ©ãƒƒãƒ—ã—ã¾ã™ï¼ˆé–‹å§‹ + コミットã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ãƒãƒƒã‚¯ï¼‰ã€‚ + +## input_format_parallel_parsing {#input_format_parallel_parsing} + +タイプ: Bool + +デフォルト値: 1 + +データフォーマットã®é †åºã‚’ä¿æŒã™ã‚‹ä¸¦åˆ—解æžã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã®ã¯ [TSV](../../interfaces/formats.md/#tabseparated)ã€[TSKV](../../interfaces/formats.md/#tskv)ã€[CSV](../../interfaces/formats.md/#csv)ã€ãŠã‚ˆã³ [JSONEachRow](../../interfaces/formats.md/#jsoneachrow) å½¢å¼ã ã‘ã§ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — 有効。 +- 0 — 無効。 + +## insert_allow_materialized_columns {#insert_allow_materialized_columns} + +タイプ: Bool + +デフォルト値: 0 + +設定ãŒæœ‰åŠ¹ãªå ´åˆã€INSERT ã«ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ã‚«ãƒ©ãƒ ã‚’許å¯ã—ã¾ã™ã€‚ + +## insert_deduplicate {#insert_deduplicate} + +タイプ: Bool + +デフォルト値: 1 + +`INSERT` ã®ãƒ–ロックé‡è¤‡ï¼ˆReplicated* テーブル用)を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 +デフォルトã§ã¯ã€`INSERT`ステートメントã«ã‚ˆã£ã¦ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚ŒãŸãƒ–ロックã¯é‡è¤‡æŽ’除ã•ã‚Œã¾ã™ï¼ˆ[データレプリケーション](../../engines/table-engines/mergetree-family/replication.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã§ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§å„パーティションã®æœ€è¿‘ã®100ブロックã®ã¿ãŒé‡è¤‡æŽ’除ã•ã‚Œã¾ã™ï¼ˆ[replicated_deduplication_window](merge-tree-settings.md/#replicated-deduplication-window)ã€[replicated_deduplication_window_seconds](merge-tree-settings.md/#replicated-deduplication-window-seconds)ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。レプリケートã•ã‚Œã¦ã„ãªã„テーブルã«ã¤ã„ã¦ã¯ã€[non_replicated_deduplication_window](merge-tree-settings.md/#non-replicated-deduplication-window)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## insert_deduplication_token {#insert_deduplication_token} + +タイプ: 文字列 + +デフォルト値: + +ã“ã®è¨­å®šã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯MergeTree/ReplicatedMergeTreeã«ãŠã‘る独自ã®é‡è¤‡æŽ’除セマンティクスをæä¾›ã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€å„INSERTステートメントã§è¨­å®šã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå€¤ã‚’æä¾›ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯åŒã˜ãƒ‡ãƒ¼ã‚¿ãŒé‡è¤‡æŽ’除ã•ã‚Œã‚‹ã®ã‚’回é¿ã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ–‡å­—列 + +`insert_deduplication_token`ã¯ç©ºã§ãªã„å ´åˆã«ã®ã¿é‡è¤‡æŽ’除ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã§ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§å„パーティションã®æœ€è¿‘ã®æŒ¿å…¥ã®ã†ã¡100ã®ã¿ãŒé‡è¤‡æŽ’除ã•ã‚Œã¾ã™ï¼ˆ[replicated_deduplication_window](merge-tree-settings.md/#replicated-deduplication-window)ã€[replicated_deduplication_window_seconds](merge-tree-settings.md/#replicated-deduplication-window-seconds)ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。レプリケートã•ã‚Œã¦ã„ãªã„テーブルã«ã¤ã„ã¦ã¯ã€[non_replicated_deduplication_window](merge-tree-settings.md/#non-replicated-deduplication-window)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +:::note +`insert_deduplication_token`ã¯ãƒ‘ーティションレベルã§æ©Ÿèƒ½ã—ã¾ã™ï¼ˆ`insert_deduplication`ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã¨åŒæ§˜ï¼‰ã€‚複数ã®ãƒ‘ーティションã¯åŒã˜`insert_deduplication_token`ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +例: + +```sql +CREATE TABLE test_table +( A Int64 ) +ENGINE = MergeTree +ORDER BY A +SETTINGS non_replicated_deduplication_window = 100; + +INSERT INTO test_table SETTINGS insert_deduplication_token = 'test' VALUES (1); + +-- 次ã®æŒ¿å…¥ã¯ã€insert_deduplication_tokenãŒç•°ãªã‚‹ãŸã‚ã€é‡è¤‡æŽ’除ã•ã‚Œã¾ã›ã‚“ +INSERT INTO test_table SETTINGS insert_deduplication_token = 'test1' VALUES (1); + +-- 次ã®æŒ¿å…¥ã¯ã€insert_deduplication_tokenãŒä»¥å‰ã®ã‚‚ã®ã®1ã¤ã¨åŒã˜ã§ã‚ã‚‹ãŸã‚ã€é‡è¤‡æŽ’除ã•ã‚Œã¾ã™ +INSERT INTO test_table SETTINGS insert_deduplication_token = 'test' VALUES (2); + +SELECT * FROM test_table + +┌─A─┠+│ 1 │ +└───┘ +┌─A─┠+│ 1 │ +└───┘ +``` + +## insert_keeper_fault_injection_probability {#insert_keeper_fault_injection_probability} + +タイプ: Float + +デフォルト値: 0 + +挿入中ã®keeperリクエストã®å¤±æ•—確率ã®æ¦‚算。有效ãªå€¤ã¯[0.0f, 1.0f]ã®ç¯„囲ã§ã™ã€‚ + +## insert_keeper_fault_injection_seed {#insert_keeper_fault_injection_seed} + +タイプ: UInt64 + +デフォルト値: 0 + +0 - ランダムシードã€ãれ以外ã¯è¨­å®šå€¤ã€‚ + +## insert_keeper_max_retries {#insert_keeper_max_retries} + +タイプ: UInt64 + +デフォルト値: 20 + +ã“ã®è¨­å®šã¯ã€ãƒ¬ãƒ—リケートã•ã‚ŒãŸMergeTreeã¸ã®æŒ¿å…¥ä¸­ã«ClickHouse Keeper(ã¾ãŸã¯ZooKeeper)リクエストã®æœ€å¤§å†è©¦è¡Œå›žæ•°ã‚’設定ã—ã¾ã™ã€‚ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¨ãƒ©ãƒ¼ã€Keeperセッションタイムアウトã€ã¾ãŸã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã«ã‚ˆã£ã¦å¤±æ•—ã—ãŸKeeperリクエストã®ã¿ãŒå†è©¦è¡Œã®å¯¾è±¡ã¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — å†è©¦è¡Œã¯ç„¡åŠ¹ + +クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤: `20`。 + +Keeperリクエストã®å†è©¦è¡Œã¯ã€ã‚るタイムアウトã®å¾Œã«è¡Œã‚ã‚Œã¾ã™ã€‚タイムアウトã¯æ¬¡ã®è¨­å®šã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™: `insert_keeper_retry_initial_backoff_ms`, `insert_keeper_retry_max_backoff_ms`。最åˆã®å†è©¦è¡Œã¯`insert_keeper_retry_initial_backoff_ms`ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆå¾Œã«è¡Œã‚ã‚Œã¾ã™ã€‚ãã®å¾Œã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¯æ¬¡ã®ã‚ˆã†ã«è¨ˆç®—ã•ã‚Œã¾ã™: +``` +timeout = min(insert_keeper_retry_max_backoff_ms, latest_timeout * 2) +``` + +例ãˆã°ã€`insert_keeper_retry_initial_backoff_ms=100`ã€`insert_keeper_retry_max_backoff_ms=10000`ã€ãŠã‚ˆã³`insert_keeper_max_retries=8`ã®å ´åˆã€ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¯`100, 200, 400, 800, 1600, 3200, 6400, 10000`ã«ãªã‚Šã¾ã™ã€‚ + +障害è€æ€§ã®ä»–ã«ã€å†è©¦è¡Œã¯ã‚ˆã‚Šè‰¯ã„ユーザーエクスペリエンスをæä¾›ã™ã‚‹ç›®çš„ã‚‚ã‚ã‚Šã¾ã™ - 例ãˆã°ã€KeeperãŒå†èµ·å‹•ä¸­ï¼ˆã‚¢ãƒƒãƒ—グレードã«ã‚ˆã‚‹ï¼‰ã«INSERT実行中ã«ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã•ãšã«æ¸ˆã‚€ã‚ˆã†ã«ã—ã¾ã™ã€‚ + +## insert_keeper_retry_initial_backoff_ms {#insert_keeper_retry_initial_backoff_ms} + +タイプ: UInt64 + +デフォルト値: 100 + +INSERTクエリ実行中ã«å¤±æ•—ã—ãŸKeeperリクエストをå†è©¦è¡Œã™ã‚‹ãŸã‚ã®åˆæœŸã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆãƒŸãƒªç§’)。 + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — タイムアウトãªã—。 + +## insert_keeper_retry_max_backoff_ms {#insert_keeper_retry_max_backoff_ms} + +タイプ: UInt64 + +デフォルト値: 10000 + +INSERTクエリ実行中ã«å¤±æ•—ã—ãŸKeeperリクエストをå†è©¦è¡Œã™ã‚‹ãŸã‚ã®æœ€å¤§ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆãƒŸãƒªç§’)。 + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 最大タイムアウトã¯ç„¡åˆ¶é™ã€‚ + +## insert_null_as_default {#insert_null_as_default} + +タイプ: Bool + +デフォルト値: 1 + +[NULL](../../sql-reference/syntax.md/#null-literal)ã®ä»£ã‚ã‚Šã«ã€[デフォルト値](../../sql-reference/statements/create/table.md/#create-default-values)を挿入ã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚NULLã§ãªã„データ型ã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦ã¯ã€ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ãŒNULLã§ãªã„å ´åˆã€ã“ã®è¨­å®šãŒç„¡åŠ¹ã®ã¨ãã«`NULL`を挿入ã™ã‚‹ã¨ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚カラムタイプãŒNULLå¯èƒ½ãªå ´åˆã€`NULL`値ã¯ã“ã®è¨­å®šã«é–¢ä¿‚ãªããã®ã¾ã¾æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯[INSERT ... SELECT](../../sql-reference/statements/insert-into.md/#inserting-the-results-of-select)クエリã«é©ç”¨ã•ã‚Œã¾ã™ã€‚`SELECT`サブクエリã¯`UNION ALL`å¥ã§é€£çµå¯èƒ½ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +å¯èƒ½ãªå€¤: + +- 0 — NULLã‚’NULLã§ãªã„カラムã«æŒ¿å…¥ã™ã‚‹ã¨ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +- 1 — NULLã®ä»£ã‚ã‚Šã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚«ãƒ©ãƒ å€¤ãŒæŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +## insert_quorum {#insert_quorum} + +タイプ: UInt64Auto + +デフォルト値: 0 + +:::note +ã“ã®è¨­å®šã¯SharedMergeTreeã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。詳ã—ãã¯[SharedMergeTreeã®æ•´åˆæ€§](/docs/ja/cloud/reference/shared-merge-tree/#consistency)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +クォーラム書ãè¾¼ã¿ã‚’有効ã«ã—ã¾ã™ã€‚ + +- `insert_quorum < 2`ã®å ´åˆã€ã‚¯ã‚©ãƒ¼ãƒ©ãƒ æ›¸ãè¾¼ã¿ã¯ç„¡åŠ¹ã§ã™ã€‚ +- `insert_quorum >= 2`ã®å ´åˆã€ã‚¯ã‚©ãƒ¼ãƒ©ãƒ æ›¸ãè¾¼ã¿ã¯æœ‰åŠ¹ã§ã™ã€‚ +- `insert_quorum = 'auto'`ã®å ´åˆã€éŽåŠæ•°ã®æ•°ï¼ˆ`number_of_replicas / 2 + 1`)をクォーラム数ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +クォーラム書ã込㿠+ +`INSERT`ã¯ã€ClickHouseãŒ`insert_quorum_timeout`ã®é–“ã«`insert_quorum`ã®ãƒ¬ãƒ—リカã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むã“ã¨ã«æˆåŠŸã—ãŸå ´åˆã«ã®ã¿æˆåŠŸã—ã¾ã™ã€‚何らã‹ã®ç†ç”±ã§æˆåŠŸã—ãŸæ›¸ãè¾¼ã¿ã®ãƒ¬ãƒ—リカ数ãŒ`insert_quorum`ã«é”ã—ãªã„å ´åˆã€æ›¸ãè¾¼ã¿ã¯å¤±æ•—ã¨è¦‹ãªã•ã‚Œã€ClickHouseã¯ã™ã§ã«æ›¸ãè¾¼ã¾ã‚ŒãŸãƒ¬ãƒ—リカã‹ã‚‰æŒ¿å…¥ã•ã‚ŒãŸãƒ–ロックを削除ã—ã¾ã™ã€‚ + +`insert_quorum_parallel`ãŒç„¡åŠ¹ã®å ´åˆã€ã‚¯ã‚©ãƒ¼ãƒ©ãƒ å†…ã®ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã¯ä¸€è²«æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã¤ã¾ã‚Šã€ã™ã¹ã¦ã®ä»¥å‰ã®`INSERT`クエリã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã¾ã™ï¼ˆ`INSERT`シーケンスã¯ç·šå½¢åŒ–ã•ã‚Œã¾ã™ï¼‰ã€‚`insert_quorum`ãŠã‚ˆã³`insert_quorum_parallel`を使用ã—ã¦æ›¸ãè¾¼ã¾ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹éš›ã«ã¯ã€[select_sequential_consistency](#select_sequential_consistency)を使用ã—ã¦`SELECT`クエリã®é †æ¬¡æ•´åˆæ€§ã‚’有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouseã¯æ¬¡ã®å ´åˆã«ä¾‹å¤–を生æˆã—ã¾ã™: + +- クエリã®æ™‚点ã§ã®åˆ©ç”¨å¯èƒ½ãªãƒ¬ãƒ—リカã®æ•°ãŒ`insert_quorum`未満ã®å ´åˆã€‚ +- `insert_quorum_parallel`ãŒç„¡åŠ¹ã§ã‚ã‚Šã€å‰ã®ãƒ–ロックãŒ`insert_quorum`ã®ãƒ¬ãƒ—リカã«ã¾ã æŒ¿å…¥ã•ã‚Œã¦ã„ãªã„ã¨ãã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込もã†ã¨ã—ãŸå ´åˆã€‚ã“ã®çŠ¶æ³ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒä»¥å‰ã®`insert_quorum`ã®`INSERT`クエリãŒå®Œäº†ã™ã‚‹å‰ã«åŒã˜ãƒ†ãƒ¼ãƒ–ルã«åˆ¥ã®`INSERT`クエリを実行ã—よã†ã¨ã—ãŸå ´åˆã«ç™ºç”Ÿã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +ãã®ä»–ã®æƒ…å ±ã¯ä»¥ä¸‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„: + +- [insert_quorum_timeout](#insert_quorum_timeout) +- [insert_quorum_parallel](#insert_quorum_parallel) +- [select_sequential_consistency](#select_sequential_consistency) + +## insert_quorum_parallel {#insert_quorum_parallel} + +タイプ: Bool + +デフォルト値: 1 + +:::note +ã“ã®è¨­å®šã¯SharedMergeTreeã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。詳ã—ãã¯[SharedMergeTreeã®æ•´åˆæ€§](/docs/ja/cloud/reference/shared-merge-tree/#consistency)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +クォーラム`INSERT`クエリã«å¯¾ã—ã¦ä¸¦åˆ—性を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ã“ã‚ŒãŒæœ‰åŠ¹ãªå ´åˆã€å‰ã®ã‚¯ã‚¨ãƒªãŒã¾ã çµ‚了ã—ã¦ã„ãªã„é–“ã«è¿½åŠ ã®`INSERT`クエリをé€ä¿¡ã§ãã¾ã™ã€‚無効ã«ã—ãŸå ´åˆã€åŒã˜ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹è¿½åŠ ã®æ›¸ãè¾¼ã¿ã¯æ‹’å¦ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +ãã®ä»–ã®æƒ…å ±ã¯ä»¥ä¸‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„: + +- [insert_quorum](#insert_quorum) +- [insert_quorum_timeout](#insert_quorum_timeout) +- [select_sequential_consistency](#select_sequential_consistency) + +## insert_quorum_timeout {#insert_quorum_timeout} + +タイプ: ミリ秒 + +デフォルト値: 600000 + +クォーラムã¸ã®æ›¸ãè¾¼ã¿ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆãƒŸãƒªç§’)。タイムアウトãŒçµŒéŽã—ã€ã¾ã æ›¸ãè¾¼ã¿ãŒè¡Œã‚ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯ä¾‹å¤–を生æˆã—ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯åŒã˜ãƒ–ロックをåŒã˜ã¾ãŸã¯ä»–ã®ãƒ¬ãƒ—リカã«æ›¸ã込むãŸã‚ã«ã‚¯ã‚¨ãƒªã‚’å†è©¦è¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ãã®ä»–ã®æƒ…å ±ã¯ä»¥ä¸‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„: + +- [insert_quorum](#insert_quorum) +- [insert_quorum_parallel](#insert_quorum_parallel) +- [select_sequential_consistency](#select_sequential_consistency) + +## insert_shard_id {#insert_shard_id} + +タイプ: UInt64 + +デフォルト値: 0 + +`0`ã§ãªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãŒåŒæœŸçš„ã«æŒ¿å…¥ã•ã‚Œã‚‹[分散テーブル](../../engines/table-engines/special/distributed.md/#distributed)ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’指定ã—ã¾ã™ã€‚ + +`insert_shard_id`ã®å€¤ãŒç„¡åŠ¹ãªå ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +`requested_cluster`ã®ã‚·ãƒ£ãƒ¼ãƒ‰æ•°ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®è¨­å®šã‚’確èªã™ã‚‹ã‹ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’使用ã§ãã¾ã™: + +``` sql +SELECT uniq(shard_num) FROM system.clusters WHERE cluster = 'requested_cluster'; +``` + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 対応ã™ã‚‹[分散テーブル](../../engines/table-engines/special/distributed.md/#distributed)ã®`1`ã‹ã‚‰`shards_num`ã®ä»»æ„ã®æ•°ã€‚ + +**例** + +クエリ: + +```sql +CREATE TABLE x AS system.numbers ENGINE = MergeTree ORDER BY number; +CREATE TABLE x_dist AS x ENGINE = Distributed('test_cluster_two_shards_localhost', currentDatabase(), x); +INSERT INTO x_dist SELECT * FROM numbers(5) SETTINGS insert_shard_id = 1; +SELECT * FROM x_dist ORDER BY number ASC; +``` + +çµæžœ: + +``` text +┌─number─┠+│ 0 │ +│ 0 │ +│ 1 │ +│ 1 │ +│ 2 │ +│ 2 │ +│ 3 │ +│ 3 │ +│ 4 │ +│ 4 │ +└────────┘ +``` + +## interactive_delay {#interactive_delay} + +タイプ: UInt64 + +デフォルト値: 100000 + +リクエストã®å®Ÿè¡ŒãŒã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€é€²æ—ã‚’é€ä¿¡ã™ã‚‹ãŸã‚ã®ãƒžã‚¤ã‚¯ãƒ­ç§’å˜ä½ã®é–“隔。 + +## intersect_default_mode {#intersect_default_mode} + +タイプ: SetOperationMode + +デフォルト値: ALL + +INTERSECTクエリã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ¢ãƒ¼ãƒ‰ã‚’設定ã—ã¾ã™ã€‚å¯èƒ½ãªå€¤: 空ã®æ–‡å­—列ã€'ALL'ã€'DISTINCT'。空ã®å ´åˆã€ãƒ¢ãƒ¼ãƒ‰ãªã—ã§ã®ã‚¯ã‚¨ãƒªã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## join_algorithm {#join_algorithm} + +タイプ: JoinAlgorithm + +デフォルト値: default + +使用ã•ã‚Œã‚‹[JOIN](../../sql-reference/statements/select/join.md)アルゴリズムを指定ã—ã¾ã™ã€‚ + +複数ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’指定ã§ãã€é©åˆ‡ãªã‚‚ã®ãŒç‰¹å®šã®ã‚¯ã‚¨ãƒªã®ç¨®é¡ž/厳密性ãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルエンジンã«åŸºã¥ã„ã¦é¸æŠžã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- default + + ã“ã‚Œã¯ã€å¯èƒ½ã§ã‚ã‚Œã°`hash`ã¾ãŸã¯`direct`ã®åŒç­‰ã§ã™ï¼ˆ`direct,hash`ã¨åŒã˜ï¼‰ã€‚ + +- grace_hash + + [Grace hash join](https://en.wikipedia.org/wiki/Hash_join#Grace_hash_join)ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚Grace hashã¯ã€ãƒ¡ãƒ¢ãƒªã®ä½¿ç”¨ã‚’制é™ã—ãªãŒã‚‰ãƒ‘フォーマンスã®è‰¯ã„複雑ãªçµåˆã‚’æä¾›ã™ã‚‹ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚ªãƒ—ションをæä¾›ã—ã¾ã™ã€‚ + + grace joinã®æœ€åˆã®ãƒ•ã‚§ãƒ¼ã‚ºã§ã¯ã€å³å´ã®ãƒ†ãƒ¼ãƒ–ルを読ã¿å–ã‚Šã€ãれをキー列ã®ãƒãƒƒã‚·ãƒ¥å€¤ã«åŸºã¥ã„ã¦Nãƒã‚±ãƒƒãƒˆã«åˆ†å‰²ã—ã¾ã™ï¼ˆæœ€åˆã¯Nã¯`grace_hash_join_initial_buckets`ã§ã™ï¼‰ã€‚å„ãƒã‚±ãƒƒãƒˆãŒç‹¬ç«‹ã—ã¦å‡¦ç†ã§ãã‚‹ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹æ–¹æ³•ã§ã“ã‚ŒãŒè¡Œã‚ã‚Œã¾ã™ã€‚最åˆã®ãƒã‚±ãƒƒãƒˆã®è¡Œã¯ãƒ¡ãƒ¢ãƒªå†…ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã«è¿½åŠ ã•ã‚Œã€ä»–ã®è¡Œã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルãŒãƒ¡ãƒ¢ãƒªåˆ¶é™ã‚’超ãˆãŸå ´åˆï¼ˆä¾‹: [`max_bytes_in_join`](/docs/ja/operations/settings/query-complexity.md/#max_bytes_in_join)ã§è¨­å®šã•ã‚ŒãŸã‚‚ã®ï¼‰ã€ãƒã‚±ãƒƒãƒˆã®æ•°ãŒå¢—加ã—ã€å„è¡Œã®å‰²ã‚Šå½“ã¦ãƒã‚±ãƒƒãƒˆã‚‚増ãˆã¾ã™ã€‚ç¾åœ¨ã®ãƒã‚±ãƒƒãƒˆã«å±žã•ãªã„è¡Œã¯ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã€å†å‰²ã‚Šå½“ã¦ã•ã‚Œã¾ã™ã€‚ + + `INNER/LEFT/RIGHT/FULL ALL/ANY JOIN`をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +- hash + + [Hash join algorithm](https://en.wikipedia.org/wiki/Hash_join)ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã™ã¹ã¦ã®ç¨®é¡žãŠã‚ˆã³åŽ³å¯†æ€§ã®çµ„ã¿åˆã‚ã›ã¨ã€`JOIN ON`セクションã§`OR`ã§çµåˆã•ã‚ŒãŸè¤‡æ•°ã®çµåˆã‚­ãƒ¼ã‚’サãƒãƒ¼ãƒˆã™ã‚‹æœ€ã‚‚一般的ãªå®Ÿè£…ã§ã™ã€‚ + +- parallel_hash + + `hash`ã®å¤‰ç¨®ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚’ãƒã‚±ãƒƒãƒˆã«åˆ†å‰²ã—ã€ãƒ—ロセスを加速ã™ã‚‹ãŸã‚ã«åŒæ™‚ã«è¤‡æ•°ã®ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルを構築ã—ã¾ã™ã€‚ + + `hash`アルゴリズムを使用ã™ã‚‹éš›ã€å³å´ã®`JOIN`ã®éƒ¨åˆ†ãŒRAMã«ã‚¢ãƒƒãƒ—ロードã•ã‚Œã¾ã™ã€‚ + +- partial_merge + + [sort-merge algorithm](https://en.wikipedia.org/wiki/Sort-merge_join)ã®å¤‰ç¨®ã§ã€å³å´ã®ãƒ†ãƒ¼ãƒ–ルã®ã¿ãŒå®Œå…¨ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + + `RIGHT JOIN`ãŠã‚ˆã³`FULL JOIN`ã¯ã€åŽ³å¯†ã•ã®ã™ã¹ã¦ãŒ`ALL`ã§ã‚ã‚‹å ´åˆã«ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ï¼ˆ`SEMI`ã€`ANTI`ã€`ANY`ã€ãŠã‚ˆã³`ASOF`ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“)。 + + `partial_merge`アルゴリズムを使用ã™ã‚‹éš›ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’ソートã—ã€ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ€ãƒ³ãƒ—ã—ã¾ã™ã€‚ClickHouseã®`partial_merge`アルゴリズムã¯ã€å¤å…¸çš„ãªå®Ÿç¾ã¨ã¯å°‘ã—ç•°ãªã‚Šã¾ã™ã€‚最åˆã«ã€ClickHouseã¯çµåˆã‚­ãƒ¼ã§ãƒ–ロックã”ã¨ã«å³ã®ãƒ†ãƒ¼ãƒ–ルをソートã—ã€ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸãƒ–ロックã«å¯¾ã—ã¦æœ€å°-最大インデックスを作æˆã—ã¾ã™ã€‚次ã«ã€å·¦å´ã®ãƒ†ãƒ¼ãƒ–ルã®éƒ¨åˆ†ã‚’`join key`ã§ã‚½ãƒ¼ãƒˆã—ã€ãれをå³ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦çµåˆã—ã¾ã™ã€‚最å°-最大インデックスも必è¦ãªã„å³ãƒ†ãƒ¼ãƒ–ルã®ãƒ–ロックをスキップã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +- direct + + ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ã€å³ã®ãƒ†ãƒ¼ãƒ–ルãŒã‚­ãƒ¼-ãƒãƒªãƒ¥ãƒ¼ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ãŸã‚ã«é©ç”¨ã§ãã¾ã™ã€‚ + + `direct`アルゴリズムã¯ã€å·¦ã®ãƒ†ãƒ¼ãƒ–ルã®è¡Œã‚’キーã¨ã—ã¦ä½¿ç”¨ã—ã¦å³ã®ãƒ†ãƒ¼ãƒ–ルã§ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’è¡Œã„ã¾ã™ã€‚ã“ã‚Œã¯ã€[Dictionary](../../engines/table-engines/special/dictionary.md/#dictionary)ã‚„[EmbeddedRocksDB](../../engines/table-engines/integrations/embedded-rocksdb.md)ãªã©ã®ç‰¹åˆ¥ãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«ã‚ˆã£ã¦ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€`LEFT`åŠã³`INNER`JOINã ã‘ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +- auto + + `auto`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€æœ€åˆã«`hash`çµåˆãŒè©¦ã¿ã‚‰ã‚Œã€ãƒ¡ãƒ¢ãƒªåˆ¶é™ãŒé•åã•ã‚ŒãŸå ´åˆã¯ã€å‹•çš„ã«ä»–ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã«åˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ + +- full_sorting_merge + + [Sort-merge algorithm](https://en.wikipedia.org/wiki/Sort-merge_join)を完全ã«ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸçµåˆãƒ†ãƒ¼ãƒ–ルをçµåˆã™ã‚‹å‰ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +- prefer_partial_merge + + ClickHouseã¯å¯èƒ½ã§ã‚ã‚Œã°å¸¸ã«`partial_merge`çµåˆã‚’使用ã—よã†ã¨ã—ã€ãã†ã§ãªã‘ã‚Œã°`hash`を使用ã—ã¾ã™ã€‚*éžæŽ¨å¥¨*ã€`partial_merge,hash`ã¨åŒã˜ã§ã™ã€‚ + +## join_any_take_last_row {#join_any_take_last_row} + +タイプ: Bool + +デフォルト値: 0 + +`ANY`ã®åŽ³å¯†ã•ã‚’使用ã—ãŸçµåˆæ“作ã®å‹•ä½œã‚’変更ã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯ã€[Join](../../engines/table-engines/special/join.md)エンジンã®ãƒ†ãƒ¼ãƒ–ルã®ã¿ã®`JOIN`æ“作ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤: + +- 0 — å³ã®ãƒ†ãƒ¼ãƒ–ルã«ä¸€è‡´ã™ã‚‹è¡ŒãŒè¤‡æ•°ã‚ã‚‹å ´åˆã€æœ€åˆã«è¦‹ã¤ã‹ã£ãŸè¡Œã®ã¿ãŒçµåˆã•ã‚Œã¾ã™ã€‚ +- 1 — å³ã®ãƒ†ãƒ¼ãƒ–ルã«ä¸€è‡´ã™ã‚‹è¡ŒãŒè¤‡æ•°ã‚ã‚‹å ´åˆã€æœ€å¾Œã«è¦‹ã¤ã‹ã£ãŸè¡Œã®ã¿ãŒçµåˆã•ã‚Œã¾ã™ã€‚ + +ãã®ä»–ã®æƒ…å ±ã¯ä»¥ä¸‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„: + +- [JOINå¥](../../sql-reference/statements/select/join.md/#select-join) +- [Joinテーブルエンジン](../../engines/table-engines/special/join.md) +- [join_default_strictness](#join_default_strictness) + +## join_default_strictness {#join_default_strictness} + +タイプ: JoinStrictness + +デフォルト値: ALL + +[JOINå¥](../../sql-reference/statements/select/join.md/#select-join)ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®åŽ³å¯†ã•ã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- `ALL` — å³ã®ãƒ†ãƒ¼ãƒ–ルã«ä¸€è‡´ã™ã‚‹è¡ŒãŒè¤‡æ•°ã‚ã‚‹å ´åˆã€ClickHouseã¯ä¸€è‡´ã™ã‚‹è¡Œã‹ã‚‰[デカルトç©](https://en.wikipedia.org/wiki/Cartesian_product)を生æˆã—ã¾ã™ã€‚ã“ã‚ŒãŒæ¨™æº–SQLã‹ã‚‰ã®é€šå¸¸ã®`JOIN`ã®å‹•ä½œã§ã™ã€‚ +- `ANY` — å³ã®ãƒ†ãƒ¼ãƒ–ルã«ä¸€è‡´ã™ã‚‹è¡ŒãŒè¤‡æ•°ã‚ã‚‹å ´åˆã€æœ€åˆã«è¦‹ã¤ã‹ã£ãŸè¡Œã®ã¿ãŒçµåˆã•ã‚Œã¾ã™ã€‚å³ã®ãƒ†ãƒ¼ãƒ–ルã«ä¸€è‡´ã™ã‚‹è¡ŒãŒ1ã¤ã—ã‹ãªã„å ´åˆã€`ANY`ã¨`ALL`ã®çµæžœã¯åŒã˜ã§ã™ã€‚ +- `ASOF` — ä¸ç¢ºå®Ÿãªä¸€è‡´ã‚’æŒã¤ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®çµåˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- 空ã®æ–‡å­—列 — クエリã«`ALL`ã¾ãŸã¯`ANY`ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## join_on_disk_max_files_to_merge {#join_on_disk_max_files_to_merge} + +タイプ: UInt64 + +デフォルト値: 64 + +ディスク上ã§å®Ÿè¡Œã•ã‚Œã‚‹MergeJoinæ“作ã®ä¸¦åˆ—ソートã®ãŸã‚ã«è¨±å¯ã•ã‚Œã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã‚’制é™ã—ã¾ã™ã€‚ + +設定値ãŒå¤§ãã„ã»ã©ã€ä½¿ç”¨ã•ã‚Œã‚‹RAMãŒå¤šãã€ãƒ‡ã‚£ã‚¹ã‚¯I/OãŒå°‘ãªããªã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 2ã‹ã‚‰å§‹ã¾ã‚‹æ­£ã®æ•´æ•°ã€‚ + +## join_output_by_rowlist_perkey_rows_threshold {#join_output_by_rowlist_perkey_rows_threshold} + +タイプ: UInt64 + +デフォルト値: 5 + +ãƒãƒƒã‚·ãƒ¥çµåˆã«ãŠã„ã¦ã€è¡Œãƒªã‚¹ãƒˆã§å‡ºåŠ›ã™ã‚‹ã‹ã©ã†ã‹ã‚’決定ã™ã‚‹ãŸã‚ã®å³ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚­ãƒ¼ã”ã¨ã®å¹³å‡è¡Œæ•°ã®ä¸‹é™ã€‚ + +## join_overflow_mode {#join_overflow_mode} + +タイプ: OverflowMode + +デフォルト値: throw + +制é™ã‚’超ãˆãŸå ´åˆã«ä½•ã‚’ã™ã‚‹ã‹ã‚’指定ã—ã¾ã™ã€‚ + +## join_to_sort_maximum_table_rows {#join_to_sort_maximum_table_rows} + +タイプ: UInt64 + +デフォルト値: 10000 + +å·¦ã¾ãŸã¯å†…部çµåˆã«ãŠã„ã¦ã€å³ã®ãƒ†ãƒ¼ãƒ–ルをキーã«ã‚ˆã£ã¦å†æ•´ç†ã™ã‚‹ã‹ã©ã†ã‹ã‚’決定ã™ã‚‹ãŸã‚ã®å³ã®ãƒ†ãƒ¼ãƒ–ルã®æœ€å¤§è¡Œæ•°ã€‚ + +## join_to_sort_minimum_perkey_rows {#join_to_sort_minimum_perkey_rows} + +タイプ: UInt64 + +デフォルト値: 40 + +å·¦ã¾ãŸã¯å†…部çµåˆã«ãŠã„ã¦ã€å³ã®ãƒ†ãƒ¼ãƒ–ルをキーã«ã‚ˆã£ã¦å†æ•´ç†ã™ã‚‹ã‹ã©ã†ã‹ã‚’決定ã™ã‚‹ãŸã‚ã®å³ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚­ãƒ¼ã”ã¨ã®å¹³å‡è¡Œæ•°ã®ä¸‹é™ã€‚ã“ã®è¨­å®šã¯ã€ã‚¹ãƒ‘ーステーブルキーã«å¯¾ã—ã¦æœ€é©åŒ–ãŒé©ç”¨ã•ã‚Œãªã„よã†ã«ã—ã¾ã™ã€‚ + +## join_use_nulls {#join_use_nulls} + +タイプ: Bool + +デフォルト値: 0 + +[JOIN](../../sql-reference/statements/select/join.md)ã®å‹•ä½œã‚¿ã‚¤ãƒ—を設定ã—ã¾ã™ã€‚テーブルをマージã™ã‚‹éš›ã«ç©ºã®ã‚»ãƒ«ãŒå‡ºç¾ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã¯ã€ã“ã®è¨­å®šã«åŸºã¥ã„ã¦ãれらを異ãªã‚‹æ–¹æ³•ã§åŸ‹ã‚ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 空ã®ã‚»ãƒ«ã¯å¯¾å¿œã™ã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚¿ã‚¤ãƒ—ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§åŸ‹ã¾ã‚Šã¾ã™ã€‚ +- 1 — `JOIN`ã¯æ¨™æº–SQLã¨åŒæ§˜ã®å‹•ä½œã‚’ã—ã¾ã™ã€‚対応ã™ã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®åž‹ã¯[Nullable](../../sql-reference/data-types/nullable.md/#data_type-nullable)ã«å¤‰æ›ã•ã‚Œã€ç©ºã®ã‚»ãƒ«ã¯[NULL](../../sql-reference/syntax.md)ã§åŸ‹ã¾ã‚Šã¾ã™ã€‚ + +## joined_subquery_requires_alias {#joined_subquery_requires_alias} + +タイプ: Bool + +デフォルト値: 1 + +æ­£ã—ã„åå‰ã®è³‡æ ¼ã®ãŸã‚ã«ã€çµåˆã‚µãƒ–クエリã¨ãƒ†ãƒ¼ãƒ–ル関数ã«åˆ¥åを付ã‘ã‚‹ã“ã¨ã‚’強制ã—ã¾ã™ã€‚ + +## kafka_disable_num_consumers_limit {#kafka_disable_num_consumers_limit} + +タイプ: Bool + +デフォルト値: 0 + +利用å¯èƒ½ãªCPUコアã®æ•°ã«ä¾å­˜ã™ã‚‹kafka_num_consumersã®åˆ¶é™ã‚’無効ã«ã—ã¾ã™ã€‚ + +## kafka_max_wait_ms {#kafka_max_wait_ms} + +タイプ: ミリ秒 + +デフォルト値: 5000 + +å†è©¦è¡Œå‰ã«[Kafka](../../engines/table-engines/integrations/kafka.md/#kafka)ã‹ã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’読ã¿å–ã‚‹ãŸã‚ã®å¾…機時間(ミリ秒)。 + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — ç„¡é™ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +ãã®ä»–ã®æƒ…å ±ã¯ä»¥ä¸‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„: + +- [Apache Kafka](https://kafka.apache.org/) + +## keeper_map_strict_mode {#keeper_map_strict_mode} + +タイプ: Bool + +デフォルト値: 0 + +KeeperMapã«å¯¾ã™ã‚‹æ“作中ã«è¿½åŠ ã®ãƒã‚§ãƒƒã‚¯ã‚’強制ã—ã¾ã™ã€‚例ãˆã°ã€æ—¢å­˜ã®ã‚­ãƒ¼ã«å¯¾ã™ã‚‹æŒ¿å…¥ã«å¯¾ã—ã¦ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## keeper_max_retries {#keeper_max_retries} + +タイプ: UInt64 + +デフォルト値: 10 + +一般的ãªkeeperæ“作ã®æœ€å¤§å†è©¦è¡Œå›žæ•°ã€‚ + +## keeper_retry_initial_backoff_ms {#keeper_retry_initial_backoff_ms} + +タイプ: UInt64 + +デフォルト値: 100 + +一般的ãªkeeperæ“作ã®ãŸã‚ã®åˆæœŸã®ãƒãƒƒã‚¯ã‚ªãƒ•ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +## keeper_retry_max_backoff_ms {#keeper_retry_max_backoff_ms} + +タイプ: UInt64 + +デフォルト値: 5000 + +一般的ãªkeeperæ“作ã®ãŸã‚ã®æœ€å¤§ãƒãƒƒã‚¯ã‚ªãƒ•ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +## legacy_column_name_of_tuple_literal {#legacy_column_name_of_tuple_literal} + +タイプ: Bool + +デフォルト値: 0 + +大ããªã‚¿ãƒ—ルリテラルã®è¦ç´ ã®ã™ã¹ã¦ã®åå‰ã‚’ãƒãƒƒã‚·ãƒ¥ã®ä»£ã‚ã‚Šã«ãã®ã‚«ãƒ©ãƒ åã§ãƒªã‚¹ãƒˆã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯äº’æ›æ€§ã®ç†ç”±ã®ã¿ã§å­˜åœ¨ã—ã¾ã™ã€‚ã“れを'true'ã«è¨­å®šã™ã‚‹ã“ã¨ã¯ã€21.7よりも低ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‹ã‚‰ã‚ˆã‚Šé«˜ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¸ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ãƒ­ãƒ¼ãƒªãƒ³ã‚°ã‚¢ãƒƒãƒ—デートを行ã†éš›ã«æ„味ãŒã‚ã‚Šã¾ã™ã€‚ + +## lightweight_deletes_sync {#lightweight_deletes_sync} + +タイプ: UInt64 + +デフォルト値: 2 + +ã“ã‚Œã¯[`mutations_sync`](#mutations_sync)ã¨åŒã˜ã§ã™ãŒã€è«–ç†å‰Šé™¤ã®å®Ÿè¡Œã®ã¿ã‚’制御ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 - 削除ã¯éžåŒæœŸã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +- 1 - クエリã¯ç¾åœ¨ã®ã‚µãƒ¼ãƒãƒ¼ã§è«–ç†å‰Šé™¤ãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…æ©Ÿã—ã¾ã™ã€‚ +- 2 - クエリã¯ã™ã¹ã¦ã®ãƒ¬ãƒ—リカ(存在ã™ã‚‹å ´åˆï¼‰ã§è«–ç†å‰Šé™¤ãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…æ©Ÿã—ã¾ã™ã€‚ + +**ãã®ä»–ã®æƒ…å ±** + +- [ALTERクエリã®åŒæœŸæ€§](../../sql-reference/statements/alter/index.md#synchronicity-of-alter-queries) +- [ミューテーション](../../sql-reference/statements/alter/index.md#mutations) + +## limit {#limit} + +タイプ: UInt64 + +デフォルト値: 0 + +クエリçµæžœã‹ã‚‰å–å¾—ã™ã‚‹æœ€å¤§è¡Œæ•°ã‚’設定ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€[LIMIT](../../sql-reference/statements/select/limit.md/#limit-clause)å¥ã§è¨­å®šã•ã‚ŒãŸå€¤ã‚’調整ã—ã€ã‚¯ã‚¨ãƒªã«æŒ‡å®šã•ã‚ŒãŸåˆ¶é™ãŒã“ã®è¨­å®šã§è¨­å®šã•ã‚ŒãŸåˆ¶é™ã‚’超ãˆã‚‹ã“ã¨ãŒãªã„よã†ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 行数ã«åˆ¶é™ã¯ã‚ã‚Šã¾ã›ã‚“。 +- æ­£ã®æ•´æ•°ã€‚ + +## live_view_heartbeat_interval {#live_view_heartbeat_interval} + +タイプ: 秒 + +デフォルト値: 15 + +ライブクエリãŒç”Ÿãã¦ã„ã‚‹ã“ã¨ã‚’示ã™ãƒãƒ¼ãƒˆãƒ“ート間隔(秒)。 + +## load_balancing {#load_balancing} + +タイプ: LoadBalancing + +デフォルト値: random + +分散クエリ処ç†ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¬ãƒ—リカé¸æŠžã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’指定ã—ã¾ã™ã€‚ + +ClickHouseã¯ã€æ¬¡ã®ã‚ˆã†ãªãƒ¬ãƒ—リカã®é¸æŠžã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: + +- [Random](#load_balancing-random)(デフォルト) +- [Nearest hostname](#load_balancing-nearest_hostname) +- [Hostname levenshtein distance](#load_balancing-hostname_levenshtein_distance) +- [In order](#load_balancing-in_order) +- [First or random](#load_balancing-first_or_random) +- [Round robin](#load_balancing-round_robin) + +ãã®ä»–ã®æƒ…å ±ã¯ä»¥ä¸‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„: + +- [distributed_replica_max_ignored_errors](#distributed_replica_max_ignored_errors) + +### Random (デフォルト) {#load_balancing-random} + +``` sql +load_balancing = random +``` + +å„レプリカã®ã‚¨ãƒ©ãƒ¼ã®æ•°ãŒã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã™ã€‚クエリã¯ã€æœ€ã‚‚å°‘ãªã„エラーをæŒã¤ãƒ¬ãƒ—リカã«é€ä¿¡ã•ã‚Œã€åŒã˜ã‚¨ãƒ©ãƒ¼æ•°ã®ãƒ¬ãƒ—リカãŒè¤‡æ•°ã‚ã‚‹å ´åˆã¯ã€ãã®ã†ã¡ã®ã©ã‚Œã‹ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ +欠点: サーãƒãƒ¼ã®è¿‘接性ã¯è€ƒæ…®ã•ã‚Œãšã€ãƒ¬ãƒ—リカãŒç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãŒè¿”ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +### Nearest Hostname {#load_balancing-nearest_hostname} + +``` sql +load_balancing = nearest_hostname +``` + +å„レプリカã®ã‚¨ãƒ©ãƒ¼ã®æ•°ãŒã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã™ã€‚5分ã”ã¨ã«ã€ã‚¨ãƒ©ãƒ¼ã®æ•°ã¯2ã§çµ±åˆçš„ã«å‰²ã‚Šç®—ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æœ€è¿‘ã®æ™‚é–“ã«åŸºã¥ã„ã¦ã‚¨ãƒ©ãƒ¼ã®æ•°ãŒæŒ‡æ•°çš„ã«ã‚¹ãƒ ãƒ¼ã‚¸ãƒ³ã‚°ã•ã‚Œã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚エラー数ãŒæœ€ã‚‚å°‘ãªã„レプリカãŒ1ã¤ã‚ã‚‹å ´åˆï¼ˆã™ãªã‚ã¡ã€ä»–ã®ãƒ¬ãƒ—リカã§ã¯æœ€è¿‘エラーãŒç™ºç”Ÿã—ã¦ã„る)ã€ã‚¯ã‚¨ãƒªã¯ãã®ãƒ¬ãƒ—リカã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚åŒã˜æœ€å°ã‚¨ãƒ©ãƒ¼æ•°ã®ãƒ¬ãƒ—リカãŒè¤‡æ•°ã‚ã‚‹å ´åˆã¯ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚µãƒ¼ãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆåã«æœ€ã‚‚é¡žä¼¼ã—ãŸãƒ›ã‚¹ãƒˆåã®ãƒ¬ãƒ—リカã«ã‚¯ã‚¨ãƒªãŒé€ä¿¡ã•ã‚Œã¾ã™ï¼ˆåŒã˜ä½ç½®ã«ç•°ãªã‚‹æ–‡å­—æ•°ã«ã‚ˆã‚‹ï¼‰ã€‚ + +ãŸã¨ãˆã°ã€example01-01-1ã¨example01-01-2ã¯1箇所ã§ç•°ãªã‚Šã€example01-01-1ã¨example01-02-2ã¯2箇所ã§ç•°ãªã‚Šã¾ã™ã€‚ +ã“ã®æ–¹æ³•ã¯å˜ç´”ã«è¦‹ãˆã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒˆãƒãƒ­ã‚¸ãƒ¼ã«é–¢ã™ã‚‹å¤–部データを必è¦ã¨ã›ãšã€IPアドレスを比較ã™ã‚‹ã“ã¨ã‚‚難ã—ã„IPv6アドレスã«å¯¾ã—ã¦ã‚‚対処ã—ã¾ã™ã€‚ + +ã—ãŸãŒã£ã¦ã€ç­‰ä¾¡ãªãƒ¬ãƒ—リカãŒå­˜åœ¨ã™ã‚‹å ´åˆã€åå‰ã«ã‚ˆã£ã¦æœ€ã‚‚è¿‘ã„ã‚‚ã®ãŒå„ªå…ˆã•ã‚Œã¾ã™ã€‚ +ã•ã‚‰ã«ã€åŒã˜ã‚µãƒ¼ãƒãƒ¼ã«ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã™ã‚‹å ´åˆã€éšœå®³ãŒãªã„å ´åˆã€åˆ†æ•£ã‚¯ã‚¨ãƒªã‚‚åŒã˜ã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã‚‹ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ãã®ãŸã‚ã€ãƒ¬ãƒ—リカã«ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãŒæ ¼ç´ã•ã‚Œã¦ã„ã¦ã‚‚ã€ã‚¯ã‚¨ãƒªã¯ã»ã¨ã‚“ã©åŒã˜çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +### Hostname levenshtein distance {#load_balancing-hostname_levenshtein_distance} + +``` sql +load_balancing = hostname_levenshtein_distance +``` + +`nearest_hostname`ã¨åŒæ§˜ã§ã™ãŒã€ãƒ›ã‚¹ãƒˆåã‚’[levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance)ã®æ–¹å¼ã§æ¯”較ã—ã¾ã™ã€‚例ãˆã°: + +``` text +example-clickhouse-0-0 ample-clickhouse-0-0 +1 + +example-clickhouse-0-0 example-clickhouse-1-10 +2 + +example-clickhouse-0-0 example-clickhouse-12-0 +3 +``` + +### In Order {#load_balancing-in_order} + +``` sql +load_balancing = in_order +``` + +åŒã˜ã‚¨ãƒ©ãƒ¼æ•°ã®ãƒ¬ãƒ—リカã«ã¯ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«è¨˜è¼‰ã•ã‚ŒãŸé †åºã®ã¾ã¾ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã¾ã™ã€‚ +ã“ã®æ–¹æ³•ã¯ã€ã©ã®ãƒ¬ãƒ—リカãŒå„ªå…ˆã•ã‚Œã‚‹ã‹ãŒæ˜Žç¢ºã«ã‚ã‹ã£ã¦ã„ã‚‹ã¨ãã«é©åˆ‡ã§ã™ã€‚ + +### First or Random {#load_balancing-first_or_random} + +``` sql +load_balancing = first_or_random +``` + +ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ã€è¨­å®šã•ã‚ŒãŸæœ€åˆã®ãƒ¬ãƒ—リカをé¸æŠžã—ã¾ã™ã€‚最åˆã®ãƒ¬ãƒ—リカãŒåˆ©ç”¨ã§ããªã„å ´åˆã¯ãƒ©ãƒ³ãƒ€ãƒ ãªãƒ¬ãƒ—リカをé¸æŠžã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¯ãƒ­ã‚¹ãƒ¬ãƒ—リケーショントãƒãƒ­ã‚¸ãƒ¼ã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã§åŠ¹æžœçš„ã§ã™ãŒã€ä»–ã®æ§‹æˆã§ã¯å½¹ã«ç«‹ã¡ã¾ã›ã‚“。 + +`first_or_random`アルゴリズムã¯ã€`in_order`アルゴリズムã®å•é¡Œã‚’解決ã—ã¾ã™ã€‚`in_order`ã®å ´åˆã€ã‚るレプリカãŒãƒ€ã‚¦ãƒ³ã™ã‚‹ã¨æ¬¡ã®ãƒ¬ãƒ—リカã«äºŒé‡è² è·ãŒã‹ã‹ã‚Šã€æ®‹ã‚Šã®ãƒ¬ãƒ—リカã¯é€šå¸¸ã®ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®é‡ã‚’処ç†ã—ã¾ã™ã€‚`first_or_random`アルゴリズムを使用ã™ã‚‹å ´åˆã€ã¾ã åˆ©ç”¨å¯èƒ½ãªãƒ¬ãƒ—リカã®é–“ã§è² è·ãŒå‡ç­‰ã«åˆ†æ•£ã•ã‚Œã¾ã™ã€‚ + +`first_or_random`アルゴリズムを使用ã—ã¦ã€æœ€åˆã®ãƒ¬ãƒ—リカを明示的ã«å®šç¾©ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®è¨­å®šã‚’使用ã™ã‚‹ã¨ã€ãƒ¬ãƒ—リカ間ã§ã‚¯ã‚¨ãƒªã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚’å†ãƒãƒ©ãƒ³ã‚¹ã™ã‚‹ã‚ˆã‚Šå¤šãã®åˆ¶å¾¡ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +### Round Robin {#load_balancing-round_robin} + +``` sql +load_balancing = round_robin +``` + +ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ã€åŒã˜ã‚¨ãƒ©ãƒ¼æ•°ã®ãƒ¬ãƒ—リカã«å¯¾ã—ã¦ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ­ãƒ“ンãƒãƒªã‚·ãƒ¼ã‚’使用ã—ã¾ã™ï¼ˆ`round_robin`ãƒãƒªã‚·ãƒ¼ã®ã‚¯ã‚¨ãƒªã®ã¿ãŒã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã™ï¼‰ã€‚ + +## load_balancing_first_offset {#load_balancing_first_offset} + +タイプ: UInt64 + +デフォルト値: 0 + +FIRST_OR_RANDOMロードãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°æˆ¦ç•¥ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ã¨ãã«ã€å„ªå…ˆçš„ã«ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã™ã‚‹ãƒ¬ãƒ—リカを指定ã—ã¾ã™ã€‚ + +## load_marks_asynchronously {#load_marks_asynchronously} + +タイプ: Bool + +デフォルト値: 0 + +MergeTreeマークをéžåŒæœŸã«ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ + +## local_filesystem_read_method {#local_filesystem_read_method} + +タイプ: 文字列 + +デフォルト値: pread_threadpool + +ローカルファイルシステムã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã®ãƒ¡ã‚½ãƒƒãƒ‰ã€‚é¸æŠžè‚¢: read, pread, mmap, io_uring, pread_threadpool。'io_uring'メソッドã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã§ã€Logã€TinyLogã€StripeLogã€Fileã€Setã€ãŠã‚ˆã³åŒæ™‚読ã¿æ›¸ããŒã‚ã‚‹å ´åˆã¯ä»–ã®ãƒ†ãƒ¼ãƒ–ルã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。 + +## local_filesystem_read_prefetch {#local_filesystem_read_prefetch} + +タイプ: Bool + +デフォルト値: 0 + +ローカルファイルシステムã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹éš›ã«ãƒ—リフェッãƒã‚’使用ã™ã‚‹ã‹ã©ã†ã‹ã€‚ + +## lock_acquire_timeout {#lock_acquire_timeout} + +タイプ: 秒 + +デフォルト値: 120 + +ロックリクエストãŒå¤±æ•—ã™ã‚‹ã¾ã§ã«å¾…æ©Ÿã™ã‚‹ç§’数を定義ã—ã¾ã™ã€‚ + +ロックタイムアウトã¯ã€ãƒ†ãƒ¼ãƒ–ルã§ã®èª­ã¿å–ã‚Š/書ãè¾¼ã¿æ“作を実行中ã«ãƒ‡ãƒƒãƒ‰ãƒ­ãƒƒã‚¯ã‹ã‚‰ä¿è­·ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚タイムアウトãŒçµŒéŽã™ã‚‹ã¨ãƒ­ãƒƒã‚¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒå¤±æ•—ã—ã€ClickHouseサーãƒãƒ¼ã¯ã€Œãƒ­ãƒƒã‚¯è©¦è¡ŒãŒã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã—ã¾ã—ãŸï¼ãƒ‡ãƒƒãƒ‰ãƒ­ãƒƒã‚¯ã®å›žé¿ãŒå¯èƒ½ã§ã™ã€‚クライアントã¯å†è©¦è¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã€ã¨ã„ã†ä¾‹å¤–を投ã’ã¾ã™ã€‚エラーコードã¯`DEADLOCK_AVOIDED`ã§ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ï¼ˆç§’å˜ä½ï¼‰ã€‚ +- 0 — ロックタイムアウトãªã—。 + +## log_comment {#log_comment} + +タイプ: 文字列 + +デフォルト値: + +[system.query_log](../system-tables/query_log.md)テーブルã®`log_comment`フィールドã®å€¤ã¨ã€ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã®ã‚³ãƒ¡ãƒ³ãƒˆãƒ†ã‚­ã‚¹ãƒˆã‚’指定ã—ã¾ã™ã€‚ + +ã“ã‚Œã«ã‚ˆã‚Šã€ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã®å¯èª­æ€§ã‚’å‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã•ã‚‰ã«ã€[clickhouse-test](../../development/tests.md)を実行ã—ãŸå¾Œã«ã€ãƒ†ã‚¹ãƒˆã«é–¢é€£ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’`system.query_log`ã‹ã‚‰é¸æŠžã™ã‚‹ã®ã«ã‚‚役立ã¡ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- [max_query_size](#max_query_size)を超ãˆãªã„ä»»æ„ã®æ–‡å­—列。max_query_sizeを超ãˆã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SET log_comment = 'log_comment test', log_queries = 1; +SELECT 1; +SYSTEM FLUSH LOGS; +SELECT type, query FROM system.query_log WHERE log_comment = 'log_comment test' AND event_date >= yesterday() ORDER BY event_time DESC LIMIT 2; +``` + +çµæžœ: + +``` text +┌─type────────┬─query─────┠+│ QueryStart │ SELECT 1; │ +│ QueryFinish │ SELECT 1; │ +└─────────────┴───────────┘ +``` + +## log_formatted_queries {#log_formatted_queries} + +タイプ: Bool + +デフォルト値: 0 + +[system.query_log](../../operations/system-tables/query_log.md)システムテーブルã«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’ログã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ï¼ˆ[system.query_log](../../operations/system-tables/query_log.md)ã®`formatted_query`列ã«ãƒ‡ãƒ¼ã‚¿ã‚’埋ã‚è¾¼ã¿ã¾ã™ï¼‰ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — フォーマットã•ã‚ŒãŸã‚¯ã‚¨ãƒªã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã«ãƒ­ã‚°ã•ã‚Œã¾ã›ã‚“。 +- 1 — フォーマットã•ã‚ŒãŸã‚¯ã‚¨ãƒªã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã«ãƒ­ã‚°ã•ã‚Œã¾ã™ã€‚ + +## log_processors_profiles {#log_processors_profiles} + +タイプ: Bool + +デフォルト値: 1 + +実行中ã«ãƒ—ロセッサãŒè²»ã‚„ã—ãŸæ™‚é–“ã‚’`system.processors_profile_log`テーブルã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ + +ãã®ä»–ã®æƒ…å ±ã¯ä»¥ä¸‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„: + +- [`system.processors_profile_log`](../../operations/system-tables/processors_profile_log.md) +- [`EXPLAIN PIPELINE`](../../sql-reference/statements/explain.md#explain-pipeline) + +## log_profile_events {#log_profile_events} + +タイプ: Bool + +デフォルト値: 1 + +クエリパフォーマンス統計を`query_log`ã€`query_thread_log`ã€ãŠã‚ˆã³`query_views_log`ã«ãƒ­ã‚°ã—ã¾ã™ã€‚ + +## log_queries {#log_queries} + +タイプ: Bool + +デフォルト値: 1 + +クエリログを設定ã—ã¾ã™ã€‚ + +ã“ã®è¨­å®šã§ClickHouseã«é€ä¿¡ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã¯ã€[query_log](../../operations/server-configuration-parameters/settings.md/#query-log)サーãƒãƒ¼è¨­å®šãƒ‘ラメータã®ãƒ«ãƒ¼ãƒ«ã«å¾“ã£ã¦ãƒ­ã‚°ã•ã‚Œã¾ã™ã€‚ + +例: + +``` text +log_queries=1 +``` + +## log_queries_cut_to_length {#log_queries_cut_to_length} + +タイプ: UInt64 + +デフォルト値: 100000 + +クエリã®é•·ã•ãŒæŒ‡å®šã•ã‚ŒãŸé–¾å€¤ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’超ãˆã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã¯ã‚¯ã‚¨ãƒªãƒ­ã‚°ã«æ›¸ã込む際ã«ã‚«ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ã¾ãŸã€é€šå¸¸ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ­ã‚°ã«å°åˆ·ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã®é•·ã•ã‚‚制é™ã•ã‚Œã¾ã™ã€‚ + +## log_queries_min_query_duration_ms {#log_queries_min_query_duration_ms} + +タイプ: ミリ秒 + +デフォルト値: 0 + +無効ã«ã—ãŸå ´åˆï¼ˆ0以外)ã€ã“ã®è¨­å®šã®å€¤ã‚ˆã‚Šã‚‚æ—©ã実行ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã¯ãƒ­ã‚°ã«è¨˜éŒ²ã•ã‚Œã¾ã›ã‚“(ã“ã‚Œã¯[MySQLã®ã‚¹ãƒ­ãƒ¼ã‚¯ã‚¨ãƒªãƒ­ã‚°](https://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html)ã®`long_query_time`ã®ã‚ˆã†ã«è€ƒãˆã‚‰ã‚Œã¾ã™ï¼‰ã€‚基本的ã«ã€æ¬¡ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯è¡¨ç¤ºã•ã‚Œã¾ã›ã‚“。 + +- `system.query_log` +- `system.query_thread_log` + +次ã®ã‚¿ã‚¤ãƒ—ã®ã‚¯ã‚¨ãƒªã®ã¿ãŒãƒ­ã‚°ã«è¨˜è¼‰ã•ã‚Œã¾ã™ã€‚ + +- `QUERY_FINISH` +- `EXCEPTION_WHILE_PROCESSING` + +- タイプ: ミリ秒 +- デフォルト値: 0(ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªï¼‰ + +## log_queries_min_type {#log_queries_min_type} + +タイプ: LogQueriesType + +デフォルト値: QUERY_START + +`query_log`ã«è¨˜éŒ²ã™ã‚‹æœ€å°ã‚¿ã‚¤ãƒ—ã§ã™ã€‚ + +å¯èƒ½ãªå€¤: +- `QUERY_START`(`=1`) +- `QUERY_FINISH`(`=2`) +- `EXCEPTION_BEFORE_START`(`=3`) +- `EXCEPTION_WHILE_PROCESSING`(`=4`) + +ã“れを使用ã—ã¦ã€`query_log`ã«ã©ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ログã«è¨˜éŒ²ã™ã‚‹ã‹ã‚’制é™ã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€ã‚¨ãƒ©ãƒ¼ã®ã¿ã«é–¢å¿ƒãŒã‚ã‚‹å ´åˆã¯ã€`EXCEPTION_WHILE_PROCESSING`を使用ã§ãã¾ã™: + +``` text +log_queries_min_type='EXCEPTION_WHILE_PROCESSING' +``` + +## log_queries_probability {#log_queries_probability} + +タイプ: Float + +デフォルト値: 1 + +ユーザーãŒ[query_log](../../operations/system-tables/query_log.md)ã€[query_thread_log](../../operations/system-tables/query_thread_log.md)ã€ãŠã‚ˆã³[query_views_log](../../operations/system-tables/query_views_log.md)システムテーブルã«ã€æŒ‡å®šã•ã‚ŒãŸç¢ºçŽ‡ã§ãƒ©ãƒ³ãƒ€ãƒ ã«é¸æŠžã•ã‚ŒãŸã‚¯ã‚¨ãƒªã®ã‚µãƒ³ãƒ—ルã®ã¿ã‚’ログã«è¨˜éŒ²ã§ãるよã†ã«ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€1秒ã‚ãŸã‚Šå¤§é‡ã®ã‚¯ã‚¨ãƒªãŒç™ºç”Ÿã™ã‚‹éš›ã®è² è·ã‚’削減ã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — クエリã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã«ãƒ­ã‚°ã•ã‚Œã¾ã›ã‚“。 +- æ­£ã®æµ®å‹•å°æ•°ç‚¹æ•°ã§ç¯„囲㯠[0..1]。例ãˆã°ã€è¨­å®šå€¤ãŒ `0.5` ã®å ´åˆã€ã‚¯ã‚¨ãƒªã®ç´„åŠåˆ†ãŒã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã«è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚ +- 1 — ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªãŒã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã«è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚ + +## log_query_settings {#log_query_settings} + +タイプ: Bool + +デフォルト値: 1 + +クエリログ㨠OpenTelemetry span ログã«ã‚¯ã‚¨ãƒªè¨­å®šã‚’記録ã—ã¾ã™ã€‚ + +## log_query_threads {#log_query_threads} + +タイプ: Bool + +デフォルト値: 0 + +クエリスレッドã®ãƒ­ã‚®ãƒ³ã‚°ã‚’設定ã—ã¾ã™ã€‚ + +クエリスレッド㯠[system.query_thread_log](../../operations/system-tables/query_thread_log.md) テーブルã«ãƒ­ã‚°ã¨ã—ã¦è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€[log_queries](#log-queries) ㌠true ã®å ´åˆã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã§ ClickHouse ã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã®ã‚¹ãƒ¬ãƒƒãƒ‰ã¯ã€[query_thread_log](../../operations/server-configuration-parameters/settings.md/#query_thread_log) サーãƒãƒ¼è¨­å®šãƒ‘ラメーターã®ãƒ«ãƒ¼ãƒ«ã«å¾“ã£ã¦è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +**例** + +``` text +log_query_threads=1 +``` + +## log_query_views {#log_query_views} + +タイプ: Bool + +デフォルト値: 1 + +クエリビューã®ãƒ­ã‚®ãƒ³ã‚°ã‚’設定ã—ã¾ã™ã€‚ + +ã“ã®è¨­å®šãŒæœ‰åŠ¹ãªçŠ¶æ…‹ã§ ClickHouse ã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã«é–¢é€£ã™ã‚‹ãƒ“ュー(物化ビューã¾ãŸã¯ãƒ©ã‚¤ãƒ–ビュー)ãŒã‚ã‚Œã°ã€ãれら㯠[query_views_log](../../operations/server-configuration-parameters/settings.md/#query_views_log) サーãƒãƒ¼è¨­å®šãƒ‘ラメーターã«è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚ + +例: + +``` text +log_query_views=1 +``` + +## low_cardinality_allow_in_native_format {#low_cardinality_allow_in_native_format} + +タイプ: Bool + +デフォルト値: 1 + +[LowCardinality](../../sql-reference/data-types/lowcardinality.md) データ型を [Native](../../interfaces/formats.md/#native) å½¢å¼ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’許å¯ã¾ãŸã¯åˆ¶é™ã—ã¾ã™ã€‚ + +`LowCardinality` ã®ä½¿ç”¨ãŒåˆ¶é™ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouse サーãƒãƒ¼ã¯ `SELECT` クエリã®ãŸã‚ã« `LowCardinality` カラムを通常ã®ã‚«ãƒ©ãƒ ã«å¤‰æ›ã—ã€`INSERT` クエリã®ãŸã‚ã«é€šå¸¸ã®ã‚«ãƒ©ãƒ ã‚’ `LowCardinality` カラムã«å¤‰æ›ã—ã¾ã™ã€‚ + +ã“ã®è¨­å®šã¯ã€`LowCardinality` データ型をサãƒãƒ¼ãƒˆã—ãªã„サードパーティクライアントå‘ã‘ã«ä¸»ã«å¿…è¦ã§ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — `LowCardinality` ã®ä½¿ç”¨ã¯åˆ¶é™ã•ã‚Œã¾ã›ã‚“。 +- 0 — `LowCardinality` ã®ä½¿ç”¨ã¯åˆ¶é™ã•ã‚Œã¾ã™ã€‚ + +## low_cardinality_max_dictionary_size {#low_cardinality_max_dictionary_size} + +タイプ: UInt64 + +デフォルト値: 8192 + +[LowCardinality](../../sql-reference/data-types/lowcardinality.md) データ型ã®ãŸã‚ã«ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«æ›¸ã込むã“ã¨ãŒã§ãる共有グローãƒãƒ«Dictionaryã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã‚’設定ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€ç„¡åˆ¶é™ã®Dictionaryæˆé•·ã«ã‚ˆã‚‹RAMã®å•é¡Œã‚’防ãŽã¾ã™ã€‚最大Dictionaryサイズã®åˆ¶é™ã«ã‚ˆã‚Šã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã§ããªã„ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã¯ã€ClickHouse ãŒé€šå¸¸ã®æ–¹æ³•ã§æ›¸ãè¾¼ã¿ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +## low_cardinality_use_single_dictionary_for_part {#low_cardinality_use_single_dictionary_for_part} + +タイプ: Bool + +デフォルト値: 0 + +データパートã®ãŸã‚ã«å˜ä¸€Dictionaryã®ä½¿ç”¨ã‚’オンã¾ãŸã¯ã‚ªãƒ•ã«ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ClickHouse サーãƒãƒ¼ã¯Dictionaryã®ã‚µã‚¤ã‚ºã‚’監視ã—ã€DictionaryãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã—ãŸå ´åˆã«æ¬¡ã®Dictionaryã®æ›¸ãè¾¼ã¿ã‚’開始ã—ã¾ã™ã€‚複数ã®Dictionaryã®ä½œæˆã‚’ç¦æ­¢ã™ã‚‹ã«ã¯ `low_cardinality_use_single_dictionary_for_part = 1` を設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — データパートã®ãŸã‚ã®è¤‡æ•°ã®Dictionaryã®ä½œæˆãŒç¦æ­¢ã•ã‚Œã¾ã™ã€‚ +- 0 — データパートã®ãŸã‚ã®è¤‡æ•°ã®Dictionaryã®ä½œæˆã¯ç¦æ­¢ã•ã‚Œã¾ã›ã‚“。 + +## materialize_skip_indexes_on_insert {#materialize_skip_indexes_on_insert} + +タイプ: Bool + +デフォルト値: 1 + +true ã®å ´åˆã€æŒ¿å…¥æ™‚ã«ã‚¹ã‚­ãƒƒãƒ—インデックスãŒè¨ˆç®—ã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ã‚¹ã‚­ãƒƒãƒ—インデックスã¯ãƒžãƒ¼ã‚¸æ™‚ã«ã®ã¿è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +## materialize_statistics_on_insert {#materialize_statistics_on_insert} + +タイプ: Bool + +デフォルト値: 1 + +true ã®å ´åˆã€æŒ¿å…¥æ™‚ã«çµ±è¨ˆãŒè¨ˆç®—ã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€çµ±è¨ˆã¯ãƒžãƒ¼ã‚¸æ™‚ã«ã®ã¿è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +## materialize_ttl_after_modify {#materialize_ttl_after_modify} + +タイプ: Bool + +デフォルト値: 1 + +ALTER MODIFY TTL クエリã®å¾Œã«å¤ã„データ㫠TTL ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +## materialized_views_ignore_errors {#materialized_views_ignore_errors} + +タイプ: Bool + +デフォルト値: 0 + +MATERIALIZED VIEW ã®ã‚¨ãƒ©ãƒ¼ã‚’無視ã—ã€MV ã«é–¢ã‚らãšå…ƒã®ãƒ–ロックをテーブルã«é…ä¿¡ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## max_analyze_depth {#max_analyze_depth} + +タイプ: UInt64 + +デフォルト値: 5000 + +インタープリタã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã‚‹æœ€å¤§åˆ†æžæ•°ã€‚ + +## max_ast_depth {#max_ast_depth} + +タイプ: UInt64 + +デフォルト値: 1000 + +クエリ構文木ã®æœ€å¤§æ·±ã•ã€‚解æžå¾Œã«ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ + +## max_ast_elements {#max_ast_elements} + +タイプ: UInt64 + +デフォルト値: 50000 + +構文木ã®æœ€å¤§ãƒŽãƒ¼ãƒ‰æ•°ã€‚解æžå¾Œã«ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ + +## max_backup_bandwidth {#max_backup_bandwidth} + +タイプ: UInt64 + +デフォルト値: 0 + +サーãƒãƒ¼ä¸Šã®ç‰¹å®šã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—用ã®æœ€å¤§èª­ã¿å–り速度(ãƒã‚¤ãƒˆæ¯Žç§’)。ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## max_block_size {#max_block_size} + +タイプ: UInt64 + +デフォルト値: 65409 + +ClickHouse ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯åˆ—ã®éƒ¨åˆ†ã®ã‚»ãƒƒãƒˆã§ã‚るブロックã«ã‚ˆã£ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚å˜ä¸€ãƒ–ロックã®å†…部処ç†ã‚µã‚¤ã‚¯ãƒ«ã¯åŠ¹çŽ‡çš„ã§ã™ãŒã€å„ブロックを処ç†ã™ã‚‹éš›ã«ã¯ç›®ã«è¦‹ãˆã‚‹ã‚³ã‚¹ãƒˆãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +`max_block_size` 設定ã¯ã€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹éš›ã«å˜ä¸€ãƒ–ロックã«å«ã‚る推奨最大行数を示ã—ã¾ã™ã€‚ `max_block_size` サイズã®ãƒ–ロックã¯å¸¸ã«ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。も㗠ClickHouse ãŒå¿…è¦ãªãƒ‡ãƒ¼ã‚¿ãŒå°‘ãªã„ã¨åˆ¤æ–­ã—ãŸå ´åˆã¯ã€å°ã•ã„ブロックãŒå‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +ブロックサイズãŒå°ã•ã™ãŽã‚‹ã¨ã€å„ブロックを処ç†ã™ã‚‹éš›ã«ç›®ã«è¦‹ãˆã‚‹ã‚³ã‚¹ãƒˆãŒç™ºç”Ÿã™ã‚‹ã®ã§æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚大ãã™ãŽã‚‹ã¨ã€æœ€åˆã®ãƒ–ロックã®å‡¦ç†å¾Œã« LIMIT å¥ã‚’æŒã¤ã‚¯ã‚¨ãƒªãŒè¿…速ã«å®Ÿè¡Œã•ã‚Œãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚`max_block_size` を設定ã™ã‚‹éš›ã®ç›®æ¨™ã¯ã€å¤šãã®ã‚«ãƒ©ãƒ ã‚’複数ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§å–り出ã™éš›ã«ãƒ¡ãƒ¢ãƒªã‚’使ã„ã™ãŽãªã„よã†ã«ã—ã¤ã¤ã€å°‘ãªãã¨ã‚‚ã‚る程度ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®å±€æ‰€æ€§ã‚’ä¿ã¤ã“ã¨ã§ã™ã€‚ + +## max_bytes_before_external_group_by {#max_bytes_before_external_group_by} + +タイプ: UInt64 + +デフォルト値: 0 + +GROUP BY æ“作中ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ãŒã“ã®ãƒã‚¤ãƒˆæ•°ã®é–¾å€¤ã‚’超ãˆãŸå ´åˆã¯ã€'external aggregation' モードを有効ã«ã—ã¾ã™ï¼ˆãƒ‡ãƒ¼ã‚¿ã‚’ディスクã«ã‚¹ãƒ”ルã—ã¾ã™ï¼‰ã€‚推奨値ã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ¡ãƒ¢ãƒªã®åŠåˆ†ã§ã™ã€‚ + +## max_bytes_before_external_sort {#max_bytes_before_external_sort} + +タイプ: UInt64 + +デフォルト値: 0 + +ORDER BY æ“作中ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ãŒã“ã®ãƒã‚¤ãƒˆæ•°ã®é–¾å€¤ã‚’超ãˆãŸå ´åˆã¯ã€'external sorting' モードを有効ã«ã—ã¾ã™ï¼ˆãƒ‡ãƒ¼ã‚¿ã‚’ディスクã«ã‚¹ãƒ”ルã—ã¾ã™ï¼‰ã€‚推奨値ã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ¡ãƒ¢ãƒªã®åŠåˆ†ã§ã™ã€‚ + +## max_bytes_before_remerge_sort {#max_bytes_before_remerge_sort} + +タイプ: UInt64 + +デフォルト値: 1000000000 + +ORDER BY 㧠LIMIT ãŒã‚ã‚‹å ´åˆã€ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ãŒæŒ‡å®šã•ã‚ŒãŸé–¾å€¤ã‚’超ãˆãŸå ´åˆã€æœ€çµ‚çš„ãªãƒžãƒ¼ã‚¸ã«å‘ã‘ã¦ãƒ–ロックを追加的ã«ãƒžãƒ¼ã‚¸ã™ã‚‹æ‰‹é †ã‚’実行ã—ã€ä¸Šä½ LIMIT è¡Œã®ã¿ã‚’ä¿æŒã—ã¾ã™ã€‚ + +## max_bytes_in_distinct {#max_bytes_in_distinct} + +タイプ: UInt64 + +デフォルト値: 0 + +DISTINCT ã®å®Ÿè¡Œä¸­ã®çŠ¶æ…‹ã®æœ€å¤§åˆè¨ˆã‚µã‚¤ã‚ºï¼ˆåœ§ç¸®ã•ã‚Œã¦ã„ãªã„ãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’メモリ内ã§ç®¡ç†ã—ã¾ã™ã€‚ + +## max_bytes_in_join {#max_bytes_in_join} + +タイプ: UInt64 + +デフォルト値: 0 + +JOIN ã®ãŸã‚ã®ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒ¡ãƒ¢ãƒªå†…ã®ãƒã‚¤ãƒˆæ•°ï¼‰ã€‚ + +## max_bytes_in_set {#max_bytes_in_set} + +タイプ: UInt64 + +デフォルト値: 0 + +IN セクションã®å®Ÿè¡Œçµæžœã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒ¡ãƒ¢ãƒªå†…ã®ãƒã‚¤ãƒˆæ•°ï¼‰ã§ã™ã€‚ + +## max_bytes_to_read {#max_bytes_to_read} + +タイプ: UInt64 + +デフォルト値: 0 + +最も「深ã„ã€ã‚½ãƒ¼ã‚¹ã‹ã‚‰ã®èª­ã¿å–ã‚Šãƒã‚¤ãƒˆæ•°ã®åˆ¶é™ï¼ˆè§£å‡å¾Œï¼‰ã€‚ã¤ã¾ã‚Šã€æœ€ã‚‚æ·±ã„サブクエリã®ã¿ã€‚リモートサーãƒãƒ¼ã‹ã‚‰èª­ã¿å–ã‚‹ã¨ãã¯ã€ã“ã®åˆ¶é™ã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã§ã®ã¿ç¢ºèªã•ã‚Œã¾ã™ã€‚ + +## max_bytes_to_read_leaf {#max_bytes_to_read_leaf} + +タイプ: UInt64 + +デフォルト値: 0 + +分散クエリã®è‘‰ãƒŽãƒ¼ãƒ‰ã§ã®èª­ã¿å–ã‚Šãƒã‚¤ãƒˆæ•°ã®åˆ¶é™ã€‚ã“ã®åˆ¶é™ã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒªãƒ¼ãƒ‰ã®ã¿ã«é©ç”¨ã•ã‚Œã€ãƒ«ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã§ã®æœ€çµ‚çš„ãªãƒžãƒ¼ã‚¸ã‚¹ãƒ†ãƒ¼ã‚¸ã‚’除外ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€prefer_localhost_replica=1 ã®å ´åˆã«ä¸å®‰å®šã§ã™ã€‚ + +## max_bytes_to_sort {#max_bytes_to_sort} + +タイプ: UInt64 + +デフォルト値: 0 + +ORDER BY æ“作ã®ãŸã‚ã«å‡¦ç†ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ãƒã‚¤ãƒˆæ•°ãŒæŒ‡å®šã•ã‚ŒãŸé‡ã‚’超ãˆãŸå ´åˆã€ãã®å‹•ä½œã¯ 'sort_overflow_mode' ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚デフォルトã§ã¯ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +## max_bytes_to_transfer {#max_bytes_to_transfer} + +タイプ: UInt64 + +デフォルト値: 0 + +GLOBAL IN/JOIN セクションãŒå®Ÿè¡Œã•ã‚Œã‚‹ã¨ãã«ã€è»¢é€ã•ã‚Œã‚‹å¤–部テーブルã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆåœ§ç¸®ã•ã‚Œã¦ã„ãªã„ãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +## max_columns_to_read {#max_columns_to_read} + +タイプ: UInt64 + +デフォルト値: 0 + +クエリãŒæŒ‡å®šã•ã‚ŒãŸæ•°ã®ã‚«ãƒ©ãƒ ã‚’読ã¿å–ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ゼロã®å€¤ã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€ã‚ã¾ã‚Šã«ã‚‚複雑ãªã‚¯ã‚¨ãƒªã‚’防ããŸã‚ã«ä¾¿åˆ©ã§ã™ã€‚ + +## max_compress_block_size {#max_compress_block_size} + +タイプ: UInt64 + +デフォルト値: 1048576 + +テーブルã«æ›¸ã込むãŸã‚ã«åœ§ç¸®ã™ã‚‹å‰ã®æœªåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ãƒ–ロックã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚デフォルトã¯1,048,576(1 MiB)。一般ã«å°ã•ã„ブロックサイズを指定ã™ã‚‹ã¨åœ§ç¸®çŽ‡ãŒã‚ãšã‹ã«ä½Žä¸‹ã—ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®å±€æ‰€æ€§ã«ã‚ˆã‚Šåœ§ç¸®ãŠã‚ˆã³è§£å‡é€Ÿåº¦ãŒã‚ãšã‹ã«å‘上ã—ã€ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ãŒæ¸›å°‘ã—ã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門的ãªè¨­å®šã§ã‚ã‚Šã€ClickHouse を始ã‚ãŸã°ã‹ã‚Šã®å ´åˆã¯å¤‰æ›´ã—ãªã„ã§ãã ã•ã„。 +::: + +圧縮用ã®ãƒ–ロック(ãƒã‚¤ãƒˆã®ãƒãƒ£ãƒ³ã‚¯ã‹ã‚‰ãªã‚‹ãƒ¡ãƒ¢ãƒªã®æ–­ç‰‡ï¼‰ã¨ã‚¯ã‚¨ãƒªå‡¦ç†ç”¨ã®ãƒ–ロック(テーブルã‹ã‚‰ã®è¡Œã®ã‚»ãƒƒãƒˆï¼‰ã‚’æ··åŒã—ãªã„ã§ãã ã•ã„。 + +## max_concurrent_queries_for_all_users {#max_concurrent_queries_for_all_users} + +タイプ: UInt64 + +デフォルト値: 0 + +ã“ã®è¨­å®šã®å€¤ãŒåŒæ™‚ã«å‡¦ç†ã•ã‚Œã¦ã„るクエリã®ç¾åœ¨ã®æ•°ä»¥ä¸‹ã®å ´åˆã€ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +例: `max_concurrent_queries_for_all_users` ã‚’99ã«è¨­å®šã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†è€…ã¯è‡ªèº«ãŒ100ã«è¨­å®šã™ã‚‹ã“ã¨ã§ã€ã‚µãƒ¼ãƒãƒ¼ãŒã‚ªãƒ¼ãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹å ´åˆã§ã‚‚調査ã®ãŸã‚ã®ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ã€‚ + +1ã¤ã®ã‚¯ã‚¨ãƒªã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®è¨­å®šã‚’変更ã—ã¦ã‚‚ã€ä»–ã®ã‚¯ã‚¨ãƒªã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 制é™ãªã—。 + +**例** + +``` xml +99 +``` + +**関連情報** + +- [max_concurrent_queries](/docs/ja/operations/server-configuration-parameters/settings.md/#max_concurrent_queries) + +## max_concurrent_queries_for_user {#max_concurrent_queries_for_user} + +タイプ: UInt64 + +デフォルト値: 0 + +ユーザーã”ã¨ã«åŒæ™‚ã«å‡¦ç†ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã®æœ€å¤§æ•°ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 制é™ãªã—。 + +**例** + +``` xml +5 +``` + +## max_distributed_connections {#max_distributed_connections} + +タイプ: UInt64 + +デフォルト値: 1024 + +å˜ä¸€ã®åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦å˜ä¸€ã®ã‚¯ã‚¨ãƒªã®ãŸã‚ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã¨ã®åŒæ™‚接続ã®æœ€å¤§æ•°ã€‚クラスター内ã®ã‚µãƒ¼ãƒãƒ¼ã®æ•°ä»¥ä¸Šã®å€¤ã‚’設定ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ + +次ã®ãƒ‘ラメータã¯ã€åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹éš›ã¨ã‚µãƒ¼ãƒãƒ¼ã‚’èµ·å‹•ã™ã‚‹éš›ã®ã¿ä½¿ç”¨ã•ã‚Œã‚‹ãŸã‚ã€å®Ÿè¡Œæ™‚ã«å¤‰æ›´ã™ã‚‹ç†ç”±ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## max_distributed_depth {#max_distributed_depth} + +タイプ: UInt64 + +デフォルト値: 5 + +[Distributed](../../engines/table-engines/special/distributed.md) テーブルã®å†å¸°ã‚¯ã‚¨ãƒªã®æœ€å¤§æ·±ã•ã‚’制é™ã—ã¾ã™ã€‚ + +値ãŒè¶…ãˆãŸå ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — æ·±ã•åˆ¶é™ãªã—。 + +## max_download_buffer_size {#max_download_buffer_size} + +タイプ: UInt64 + +デフォルト値: 10485760 + +å„スレッドã®ãŸã‚ã®ä¸¦è¡Œãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ç”¨ãƒãƒƒãƒ•ã‚¡ã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆä¾‹: URL エンジン用)。 + +## max_download_threads {#max_download_threads} + +タイプ: MaxThreads + +デフォルト値: 4 + +データをダウンロードã™ã‚‹ãŸã‚ã®æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ï¼ˆä¾‹: URL エンジン用)。 + +## max_estimated_execution_time {#max_estimated_execution_time} + +タイプ: Seconds + +デフォルト値: 0 + +クエリã®æŽ¨å®šæœ€å¤§å®Ÿè¡Œæ™‚間(秒å˜ä½ï¼‰ã€‚ + +## max_execution_speed {#max_execution_speed} + +タイプ: UInt64 + +デフォルト値: 0 + +1秒ã‚ãŸã‚Šã®å®Ÿè¡Œè¡Œæ•°ã®æœ€å¤§æ•°ã€‚ + +## max_execution_speed_bytes {#max_execution_speed_bytes} + +タイプ: UInt64 + +デフォルト値: 0 + +1秒ã‚ãŸã‚Šã®å®Ÿè¡Œãƒã‚¤ãƒˆæ•°ã®æœ€å¤§æ•°ã€‚ + +## max_execution_time {#max_execution_time} + +タイプ: Seconds + +デフォルト値: 0 + +クエリã®å®Ÿè¡Œæ™‚é–“ãŒæŒ‡å®šã•ã‚ŒãŸç§’数を超ãˆãŸå ´åˆã€ãã®å‹•ä½œã¯ 'timeout_overflow_mode' ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚デフォルトã§ã¯ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ã“ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¯ãƒã‚§ãƒƒã‚¯ã•ã‚Œã€ã‚¯ã‚¨ãƒªã¯ãƒ‡ãƒ¼ã‚¿å‡¦ç†ã®æŒ‡å®šã•ã‚ŒãŸå ´æ‰€ã§ã®ã¿åœæ­¢ã§ãã¾ã™ã€‚ç¾åœ¨ã€é›†è¨ˆçŠ¶æ…‹ã®ãƒžãƒ¼ã‚¸ã‚„クエリ分æžä¸­ã«åœæ­¢ã™ã‚‹ã“ã¨ã¯ã§ããšã€å®Ÿéš›ã®å®Ÿè¡Œæ™‚é–“ã¯ã“ã®è¨­å®šã®å€¤ã‚’超ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## max_execution_time_leaf {#max_execution_time_leaf} + +タイプ: Seconds + +デフォルト値: 0 + +max_execution_time ã«é¡žä¼¼ã®æ„味をæŒã¡ã¾ã™ãŒã€åˆ†æ•£ã‚¯ã‚¨ãƒªã®è‘‰ãƒŽãƒ¼ãƒ‰ã§ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚タイムアウト㯠'timeout_overflow_mode_leaf' ã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +## max_expanded_ast_elements {#max_expanded_ast_elements} + +タイプ: UInt64 + +デフォルト値: 500000 + +エイリアスã¨ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ã‚’æ‹¡å¼µã—ãŸå¾Œã®ã‚¯ã‚¨ãƒªæ§‹æ–‡æœ¨ã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒŽãƒ¼ãƒ‰æ•°ï¼‰ã€‚ + +## max_fetch_partition_retries_count {#max_fetch_partition_retries_count} + +タイプ: UInt64 + +デフォルト値: 5 + +別ã®ãƒ›ã‚¹ãƒˆã‹ã‚‰ãƒ‘ーティションをå–å¾—ã™ã‚‹éš›ã®ãƒªãƒˆãƒ©ã‚¤å›žæ•°ã€‚ + +## max_final_threads {#max_final_threads} + +タイプ: MaxThreads + +デフォルト値: 'auto(12)' + +[FINAL](../../sql-reference/statements/select/from.md#select-from-final) 修飾å­ã‚’æŒã¤ `SELECT` クエリã®ãƒ‡ãƒ¼ã‚¿èª­ã¿å–りフェーズã«å¯¾ã™ã‚‹æœ€å¤§ä¸¦åˆ—スレッド数を設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 ã¾ãŸã¯ 1 — 無効。 `SELECT` クエリã¯å˜ä¸€ã‚¹ãƒ¬ãƒƒãƒ‰ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +## max_http_get_redirects {#max_http_get_redirects} + +タイプ: UInt64 + +デフォルト値: 0 + +許å¯ã•ã‚Œã‚‹æœ€å¤§æ•°ã®HTTP GETリダイレクトホップ。悪æ„ã®ã‚るサーãƒãƒ¼ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’予期ã—ãªã„サービスã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã™ã‚‹ã®ã‚’防ããŸã‚ã«ã€è¿½åŠ ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£å¯¾ç­–ãŒè¬›ã˜ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚\n\nã“ã‚Œã¯ã€å¤–部サーãƒãƒ¼ãŒä»–ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã™ã‚‹å ´åˆã§ã™ãŒã€ãã®ã‚¢ãƒ‰ãƒ¬ã‚¹ãŒä¼æ¥­ã®ã‚¤ãƒ³ãƒ•ãƒ©ã«å†…部的ã«è¦‹ãˆã‚‹å ´åˆã«è©²å½“ã—ã¾ã™ã€‚内部サーãƒãƒ¼ã«HTTPリクエストをé€ä¿¡ã™ã‚‹ã¨ã€èªè¨¼ã‚’ãƒã‚¤ãƒ‘スã—ã¦å†…部ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‹ã‚‰å†…部APIã‚’è¦æ±‚ã—ãŸã‚Šã€Redis ã‚„ Memcached ãªã©ã®ä»–ã®ã‚µãƒ¼ãƒ“スをクエリã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚内部ã®ã‚¤ãƒ³ãƒ•ãƒ©ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ï¼ˆãƒ­ãƒ¼ã‚«ãƒ«ãƒ›ã‚¹ãƒˆã§å‹•ä½œã—ã¦ã„ã‚‹ã‚‚ã®ã‚’å«ã‚€ï¼‰ã‚’æŒã£ã¦ã„ãªã„å ´åˆã‚„ã€ã‚µãƒ¼ãƒãƒ¼ã‚’ä¿¡é ¼ã™ã‚‹å ´åˆã¯ã€ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã‚’許å¯ã™ã‚‹ã®ã¯å®‰å…¨ã§ã™ã€‚ãŸã ã—ã€URLãŒHTTPを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã ã‘ã§ãªãã€ISPや中間ã®ã™ã¹ã¦ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚‚ä¿¡é ¼ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +## max_hyperscan_regexp_length {#max_hyperscan_regexp_length} + +タイプ: UInt64 + +デフォルト値: 0 + +[hyperscan マルãƒãƒžãƒƒãƒé–¢æ•°](../../sql-reference/functions/string-search-functions.md/#multimatchanyhaystack-pattern1-pattern2-patternn)ã§ã®å„æ­£è¦è¡¨ç¾ã®æœ€å¤§é•·ã‚’定義ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — é•·ã•ã«åˆ¶é™ãªã—。 + +**例** + +クエリ: + +```sql +SELECT multiMatchAny('abcd', ['ab','bcd','c','d']) SETTINGS max_hyperscan_regexp_length = 3; +``` + +çµæžœ: + +```text +┌─multiMatchAny('abcd', ['ab', 'bcd', 'c', 'd'])─┠+│ 1 │ +└────────────────────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT multiMatchAny('abcd', ['ab','bcd','c','d']) SETTINGS max_hyperscan_regexp_length = 2; +``` + +çµæžœ: + +```text +Exception: Regexp length too large. +``` + +**関連情報** + +- [max_hyperscan_regexp_total_length](#max-hyperscan-regexp-total-length) + +## max_hyperscan_regexp_total_length {#max_hyperscan_regexp_total_length} + +タイプ: UInt64 + +デフォルト値: 0 + +[hyperscan マルãƒãƒžãƒƒãƒé–¢æ•°](../../sql-reference/functions/string-search-functions.md/#multimatchanyhaystack-pattern1-pattern2-patternn)内ã®ã™ã¹ã¦ã®æ­£è¦è¡¨ç¾ã®åˆè¨ˆæœ€å¤§é•·ã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — é•·ã•ã«åˆ¶é™ãªã—。 + +**例** + +クエリ: + +```sql +SELECT multiMatchAny('abcd', ['a','b','c','d']) SETTINGS max_hyperscan_regexp_total_length = 5; +``` + +çµæžœ: + +```text +┌─multiMatchAny('abcd', ['a', 'b', 'c', 'd'])─┠+│ 1 │ +└─────────────────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT multiMatchAny('abcd', ['ab','bc','c','d']) SETTINGS max_hyperscan_regexp_total_length = 5; +``` + +çµæžœ: + +```text +Exception: Total regexp lengths too large. +``` + +**関連情報** + +- [max_hyperscan_regexp_length](#max-hyperscan-regexp-length) + +## max_insert_block_size {#max_insert_block_size} + +タイプ: UInt64 + +デフォルト値: 1048449 + +テーブルã«æŒ¿å…¥ã™ã‚‹ãŸã‚ã«å½¢æˆã•ã‚Œã‚‹ãƒ–ロックã®ã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã§ã™ã€‚ã“ã®è¨­å®šã¯ã€ã‚µãƒ¼ãƒãƒ¼ãŒãƒ–ロックを形æˆã™ã‚‹å ´åˆã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€HTTP インターフェース経由ã®INSERTã®å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿å½¢å¼ã‚’解æžã—ã€æŒ‡å®šã•ã‚ŒãŸã‚µã‚¤ã‚ºã®ãƒ–ロックを形æˆã—ã¾ã™ã€‚ã—ã‹ã—ã€clickhouse-clientを使用ã™ã‚‹å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒ‡ãƒ¼ã‚¿ã‚’独自ã«è§£æžã—ã€ã‚µãƒ¼ãƒãƒ¼ã§ã® `max_insert_block_size` 設定ã¯æŒ¿å…¥ã•ã‚Œã‚‹ãƒ–ロックã®ã‚µã‚¤ã‚ºã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。ã“ã®è¨­å®šã¯ã€INSERT SELECT を使用ã™ã‚‹å ´åˆã«ã¯ç›®çš„ãŒã‚ã‚Šã¾ã›ã‚“。SELECT ã®å¾Œã«å½¢æˆã•ã‚Œã‚‹åŒã˜ãƒ–ロックを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãŒæŒ¿å…¥ã•ã‚Œã‚‹ãŸã‚ã§ã™ã€‚ + +デフォルト値㯠`max_block_size` よりã‚ãšã‹ã«å¤§ãããªã£ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルエンジン(`*MergeTree`)ãŒãƒ‡ã‚£ã‚¹ã‚¯ã«æŒ¿å…¥ã•ã‚ŒãŸå„ブロックã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ートを形æˆã™ã‚‹ãŸã‚ã€ã‹ãªã‚Šå¤§ããªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«ãªã‚‹ãŸã‚ã§ã™ã€‚åŒæ§˜ã«ã€`*MergeTree` テーブルã¯æŒ¿å…¥ä¸­ã«ãƒ‡ãƒ¼ã‚¿ã‚’ソートã—ã€å分ã«å¤§ããªãƒ–ロックサイズã«ã‚ˆã£ã¦ãƒ¡ãƒ¢ãƒªå†…ã§ã‚ˆã‚Šå¤šãã®ãƒ‡ãƒ¼ã‚¿ã‚’ソートã§ãるよã†ã«ã—ã¾ã™ã€‚ + +## max_insert_delayed_streams_for_parallel_write {#max_insert_delayed_streams_for_parallel_write} + +タイプ: UInt64 + +デフォルト値: 0 + +最終パートフラッシュをé…らã›ã‚‹ãŸã‚ã®æœ€å¤§ã‚¹ãƒˆãƒªãƒ¼ãƒ ï¼ˆã‚«ãƒ©ãƒ ï¼‰ã®æ•°ã€‚デフォルトã¯è‡ªå‹•ï¼ˆåŸºç›¤ã¨ãªã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒä¸¦åˆ—書ãè¾¼ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹å ´åˆã¯1000ã€ãれ以外ã¯ç„¡åŠ¹ï¼‰ã€‚ + +## max_insert_threads {#max_insert_threads} + +タイプ: UInt64 + +デフォルト値: 0 + +`INSERT SELECT` クエリを実行ã™ã‚‹ãŸã‚ã®æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +å¯èƒ½ãªå€¤: + +- 0(ã¾ãŸã¯ 1) — `INSERT SELECT` ã¯ä¸¦åˆ—実行ã•ã‚Œã¾ã›ã‚“。 +- æ­£ã®æ•´æ•°ã€‚1より大ãã„。 + +クラウドデフォルト値: サービスã®ã‚µã‚¤ã‚ºã«å¿œã˜ã¦2〜4。 + +並列 `INSERT SELECT` ã¯ã€`SELECT` 部分ãŒä¸¦åˆ—ã§å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ [max_threads](#max_threads) 設定をå‚ç…§ã—ã¦ãã ã•ã„。より高ã„値ã¯ã€ã‚ˆã‚Šå¤šãã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã«ã¤ãªãŒã‚Šã¾ã™ã€‚ + +## max_joined_block_size_rows {#max_joined_block_size_rows} + +タイプ: UInt64 + +デフォルト値: 65409 + +JOIN çµæžœã®æœ€å¤§ãƒ–ロックサイズ(çµåˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹å ´åˆï¼‰ã€‚0ã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## max_limit_for_ann_queries {#max_limit_for_ann_queries} + +タイプ: UInt64 + +デフォルト値: 1000000 + +ã“ã®è¨­å®šã‚’超ãˆã‚‹ LIMIT ã‚’æŒã¤ SELECT クエリã¯ã€ãƒ™ã‚¯ãƒˆãƒ«é¡žä¼¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã§ãã¾ã›ã‚“。ベクトル類似インデックスã§ã®ãƒ¡ãƒ¢ãƒªã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚’防ãã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +## max_live_view_insert_blocks_before_refresh {#max_live_view_insert_blocks_before_refresh} + +タイプ: UInt64 + +デフォルト値: 64 + +マージå¯èƒ½ãªãƒ–ロックãŒãƒ‰ãƒ­ãƒƒãƒ—ã•ã‚Œã€ã‚¯ã‚¨ãƒªãŒå†å®Ÿè¡Œã•ã‚Œã‚‹å‰ã®æœ€å¤§æŒ¿å…¥ãƒ–ロック数を制é™ã—ã¾ã™ã€‚ + +## max_local_read_bandwidth {#max_local_read_bandwidth} + +タイプ: UInt64 + +デフォルト値: 0 + +ローカルリードã®æœ€å¤§é€Ÿåº¦ï¼ˆãƒã‚¤ãƒˆæ¯Žç§’)。 + +## max_local_write_bandwidth {#max_local_write_bandwidth} + +タイプ: UInt64 + +デフォルト値: 0 + +ローカル書ãè¾¼ã¿ã®æœ€å¤§é€Ÿåº¦ï¼ˆãƒã‚¤ãƒˆæ¯Žç§’)。 + +## max_memory_usage {#max_memory_usage} + +タイプ: UInt64 + +デフォルト値: 0 + +å˜ä¸€ã‚¯ã‚¨ãƒªã®å‡¦ç†ã«å¯¾ã™ã‚‹æœ€å¤§ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## max_memory_usage_for_user {#max_memory_usage_for_user} + +タイプ: UInt64 + +デフォルト値: 0 + +ユーザーã«ã‚ˆã‚‹ã™ã¹ã¦ã®åŒæ™‚実行クエリã®å‡¦ç†ã«å¯¾ã™ã‚‹æœ€å¤§ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## max_network_bandwidth {#max_network_bandwidth} + +タイプ: UInt64 + +デフォルト値: 0 + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã®ãƒ‡ãƒ¼ã‚¿äº¤æ›ã®é€Ÿåº¦ã‚’制é™ã—ã¾ã™ï¼ˆãƒã‚¤ãƒˆæ¯Žç§’)。ã“ã®è¨­å®šã¯ã€ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 帯域幅制御ãŒç„¡åŠ¹ã§ã™ã€‚ + +## max_network_bandwidth_for_all_users {#max_network_bandwidth_for_all_users} + +タイプ: UInt64 + +デフォルト値: 0 + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã®ãƒ‡ãƒ¼ã‚¿äº¤æ›ã®é€Ÿåº¦ã‚’制é™ã—ã¾ã™ï¼ˆãƒã‚¤ãƒˆæ¯Žç§’)。ã“ã®è¨­å®šã¯ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã®ã™ã¹ã¦ã®åŒæ™‚実行クエリã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — データ速度制御ãŒç„¡åŠ¹ã§ã™ã€‚ + +## max_network_bandwidth_for_user {#max_network_bandwidth_for_user} + +タイプ: UInt64 + +デフォルト値: 0 + +ユーザーã«ã‚ˆã‚‹ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã®ãƒ‡ãƒ¼ã‚¿äº¤æ›ã®é€Ÿåº¦ã‚’制é™ã—ã¾ã™ï¼ˆãƒã‚¤ãƒˆæ¯Žç§’)。ã“ã®è¨­å®šã¯ã€å˜ä¸€ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå®Ÿè¡Œã™ã‚‹ã™ã¹ã¦ã®åŒæ™‚実行クエリã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — データ速度制御ãŒç„¡åŠ¹ã§ã™ã€‚ + +## max_network_bytes {#max_network_bytes} + +タイプ: UInt64 + +デフォルト値: 0 + +クエリを実行ã™ã‚‹éš›ã«ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã«å—ä¿¡ã¾ãŸã¯é€ä¿¡ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’制é™ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€å„個別ã®ã‚¯ã‚¨ãƒªã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — データé‡åˆ¶å¾¡ãŒç„¡åŠ¹ã§ã™ã€‚ + +## max_number_of_partitions_for_independent_aggregation {#max_number_of_partitions_for_independent_aggregation} + +タイプ: UInt64 + +デフォルト値: 128 + +最é©åŒ–ã‚’é©ç”¨ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ル内ã®æœ€å¤§ãƒ‘ーティション数。 + +## max_parallel_replicas {#max_parallel_replicas} + +タイプ: NonZeroUInt64 + +デフォルト値: 1 + +クエリを実行ã™ã‚‹éš›ã®å„シャードã«å¯¾ã™ã‚‹æœ€å¤§ã®ãƒ¬ãƒ—リカ数。 + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +**追加情報** + +ã“ã®ã‚ªãƒ—ションã¯ä½¿ç”¨ã•ã‚Œã‚‹è¨­å®šã«å¿œã˜ã¦ç•°ãªã‚‹çµæžœã‚’生ã˜ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã¯ã€çµåˆã¾ãŸã¯ã‚µãƒ–クエリãŒé–¢ä¸Žã—ã¦ã„ã‚‹å ´åˆã‚„ã€ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŒç‰¹å®šã®è¦ä»¶ã‚’満ãŸã—ã¦ã„ãªã„å ´åˆã«ä¸æ­£ç¢ºãªçµæžœã‚’生ã˜ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[Distributed Subqueries and max_parallel_replicas](../../sql-reference/operators/in.md/#max_parallel_replica-subqueries) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +### `SAMPLE` キーを使用ã—ãŸä¸¦åˆ—å‡¦ç† + +クエリã¯ã€è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼ã§åŒæ™‚ã«å®Ÿè¡Œã•ã‚Œã‚‹å ´åˆã€ã‚ˆã‚Šé€Ÿã処ç†ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã—ã‹ã—ã€æ¬¡ã®ã‚ˆã†ãªå ´åˆã«ã¯ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスãŒä½Žä¸‹ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +- サンプリングキーã®ä½ç½®ãŒãƒ‘ーティショニングキー内ã«ã‚ã‚Šã€åŠ¹çŽ‡çš„ãªç¯„囲スキャンãŒã§ããªã„。 +- テーブルã«ã‚µãƒ³ãƒ—リングキーを追加ã™ã‚‹ã“ã¨ã§ã€ä»–ã®ã‚«ãƒ©ãƒ ã«ã‚ˆã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã®åŠ¹çŽ‡ãŒä½Žä¸‹ã™ã‚‹ã€‚ +- サンプリングキーãŒè¨ˆç®—コストã®é«˜ã„å¼ã§ã‚る。 +- クラスタã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·åˆ†å¸ƒã«ãƒ­ãƒ³ã‚°ãƒ†ãƒ¼ãƒ«ãŒã‚ã‚‹ãŸã‚ã€ã‚µãƒ¼ãƒãƒ¼ã‚’増やã™ã¨å…¨ä½“ã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãŒå¢—加ã™ã‚‹ã€‚ + +### [parallel_replicas_custom_key](#parallel_replicas_custom_key) を使用ã—ãŸä¸¦åˆ—å‡¦ç† + +ã“ã®è¨­å®šã¯ã€ä»»æ„ã®ãƒ¬ãƒ—リケートテーブルã«ä¾¿åˆ©ã§ã™ã€‚ + +## max_parser_backtracks {#max_parser_backtracks} + +タイプ: UInt64 + +デフォルト値: 1000000 + +å†å¸°ä¸‹é™è§£æžãƒ—ロセス中ã«ç•°ãªã‚‹ä»£æ›¿ã‚’試ã¿ã‚‹æœ€å¤§ãƒãƒƒã‚¯ãƒˆãƒ©ãƒƒã‚¯æ•°ã€‚ + +## max_parser_depth {#max_parser_depth} + +タイプ: UInt64 + +デフォルト値: 1000 + +å†å¸°ä¸‹é™ãƒ‘ーサーã§ã®å†å¸°ã®æœ€å¤§æ·±ã•ã‚’制é™ã—ã¾ã™ã€‚スタックサイズを制御ã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — å†å¸°ã®æ·±ã•ã«åˆ¶é™ãªã—。 + +## max_parsing_threads {#max_parsing_threads} + +タイプ: MaxThreads + +デフォルト値: 'auto(12)' + +並行解æžã‚’サãƒãƒ¼ãƒˆã™ã‚‹å…¥åŠ›å½¢å¼ã®ãƒ‡ãƒ¼ã‚¿ã‚’解æžã™ã‚‹ãŸã‚ã®æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚デフォルトã§ã¯è‡ªå‹•çš„ã«æ±ºå®šã•ã‚Œã¾ã™ã€‚ + +## max_partition_size_to_drop {#max_partition_size_to_drop} + +タイプ: UInt64 + +デフォルト値: 50000000000 + +クエリ時ã®ãƒ‘ーティション削除ã«å¯¾ã™ã‚‹åˆ¶é™ã€‚値ãŒ0ã®å ´åˆã€åˆ¶é™ãªã—ã§ãƒ‘ーティションを削除ã§ãã¾ã™ã€‚ + +クラウドデフォルト値: 1 TB。 + +:::note +ã“ã®ã‚¯ã‚¨ãƒªè¨­å®šã¯ã€ãã®ã‚µãƒ¼ãƒãƒ¼è¨­å®šã®åŒç­‰ã®ã‚‚ã®ã‚’上書ãã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[max_partition_size_to_drop](/docs/ja/operations/server-configuration-parameters/settings.md/#max-partition-size-to-drop) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## max_partitions_per_insert_block {#max_partitions_per_insert_block} + +タイプ: UInt64 + +デフォルト値: 100 + +å˜ä¸€ã® INSERT ã•ã‚ŒãŸãƒ–ロック内ã®æœ€å¤§ãƒ‘ーティション数を制é™ã—ã¾ã™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ブロックã«ãƒ‘ーティションãŒå¤šã™ãŽã‚‹å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯å®‰å…¨é–¾å€¤ã§ã™ã€‚多ãã®ãƒ‘ーティションを使用ã™ã‚‹ã“ã¨ã¯ä¸€èˆ¬çš„ãªèª¤è§£ã§ã™ã€‚ + +## max_partitions_to_read {#max_partitions_to_read} + +タイプ: Int64 + +デフォルト値: -1 + +1ã¤ã®ã‚¯ã‚¨ãƒªã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãる最大パーティション数を制é™ã—ã¾ã™ã€‚ <= 0 ã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## max_parts_to_move {#max_parts_to_move} + +タイプ: UInt64 + +デフォルト値: 1000 + +1ã¤ã®ã‚¯ã‚¨ãƒªã§ç§»å‹•ã§ãるパーツã®æ•°ã‚’制é™ã—ã¾ã™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## max_query_size {#max_query_size} + +タイプ: UInt64 + +デフォルト値: 262144 + +SQL パーサーã«ã‚ˆã£ã¦è§£æžã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªæ–‡å­—列ã®æœ€å¤§ãƒã‚¤ãƒˆæ•°ã€‚ +INSERT クエリ㮠VALUES å¥å†…ã®ãƒ‡ãƒ¼ã‚¿ã¯ã€åˆ¥ã®ã‚¹ãƒˆãƒªãƒ¼ãƒ ãƒ‘ーサー(O(1) RAM を消費)ã«ã‚ˆã£ã¦å‡¦ç†ã•ã‚Œã€ã“ã®åˆ¶é™ã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 + +:::note +`max_query_size` 㯠SQL クエリ内(例ãˆã°ã€`SELECT now() SETTINGS max_query_size=10000`)ã§ã¯è¨­å®šã§ãã¾ã›ã‚“。ClickHouse ã¯ã‚¯ã‚¨ãƒªã‚’解æžã™ã‚‹ãŸã‚ã«ãƒãƒƒãƒ•ã‚¡ã‚’割り当ã¦ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒã€ã“ã®ãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚ºã¯å®Ÿè¡Œå‰ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚‹ `max_query_size` 設定ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚ +::: + +## max_read_buffer_size {#max_read_buffer_size} + +タイプ: UInt64 + +デフォルト値: 1048576 + +ファイルシステムã‹ã‚‰èª­ã¿å–ã‚‹ãŸã‚ã®ãƒãƒƒãƒ•ã‚¡ã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ + +## max_read_buffer_size_local_fs {#max_read_buffer_size_local_fs} + +タイプ: UInt64 + +デフォルト値: 131072 + +ローカルファイルシステムã‹ã‚‰èª­ã¿å–ã‚‹ãŸã‚ã®ãƒãƒƒãƒ•ã‚¡ã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ 0 ã«è¨­å®šã—ãŸå ´åˆã€max_read_buffer_size ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## max_read_buffer_size_remote_fs {#max_read_buffer_size_remote_fs} + +タイプ: UInt64 + +デフォルト値: 0 + +リモートファイルシステムã‹ã‚‰èª­ã¿å–ã‚‹ãŸã‚ã®ãƒãƒƒãƒ•ã‚¡ã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ 0 ã«è¨­å®šã—ãŸå ´åˆã€max_read_buffer_size ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## max_recursive_cte_evaluation_depth {#max_recursive_cte_evaluation_depth} + +タイプ: UInt64 + +デフォルト値: 1000 + +å†å¸° CTE 評価深度ã®æœ€å¤§é™åº¦ã€‚ + +## max_remote_read_network_bandwidth {#max_remote_read_network_bandwidth} + +タイプ: UInt64 + +デフォルト値: 0 + +読ã¿å–ã‚Šã®ãŸã‚ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã®ãƒ‡ãƒ¼ã‚¿äº¤æ›ã®æœ€å¤§é€Ÿåº¦ï¼ˆãƒã‚¤ãƒˆæ¯Žç§’)。 + +## max_remote_write_network_bandwidth {#max_remote_write_network_bandwidth} + +タイプ: UInt64 + +デフォルト値: 0 + +書ãè¾¼ã¿ã®ãŸã‚ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã®ãƒ‡ãƒ¼ã‚¿äº¤æ›ã®æœ€å¤§é€Ÿåº¦ï¼ˆãƒã‚¤ãƒˆæ¯Žç§’)。 + +## max_replica_delay_for_distributed_queries {#max_replica_delay_for_distributed_queries} + +タイプ: UInt64 + +デフォルト値: 300 + +分散クエリã«å¯¾ã™ã‚‹é…延レプリカを無効ã«ã—ã¾ã™ã€‚詳細㯠[Replication](../../engines/table-engines/mergetree-family/replication.md) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +秒å˜ä½ã§æ™‚間を設定ã—ã¾ã™ã€‚レプリカã®é…延ãŒè¨­å®šå€¤ä»¥ä¸Šã«å¤§ãã„å ´åˆã¯ã€ã“ã®ãƒ¬ãƒ—リカã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。 + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — レプリカã®é…延ã¯ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã›ã‚“。 + +éžã‚¼ãƒ­ã®é…延をæŒã¤ãƒ¬ãƒ—リカを使用ã—ãªã„よã†ã«ã™ã‚‹ã«ã¯ã€ã“ã®ãƒ‘ラメータを1ã«è¨­å®šã—ã¾ã™ã€‚ + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを指ã™åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ `SELECT` を実行ã™ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## max_result_bytes {#max_result_bytes} + +タイプ: UInt64 + +デフォルト値: 0 + +çµæžœã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆï¼‰ãŒåˆ¶é™ã•ã‚Œã¾ã™ï¼ˆæœªåœ§ç¸®ï¼‰ã€‚閾値ã«é”ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã®ãƒ–ロックを処ç†ã—ãŸå¾Œã«ã‚¯ã‚¨ãƒªã¯åœæ­¢ã—ã¾ã™ãŒã€çµæžœã®æœ€å¾Œã®ãƒ–ロックã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã›ã‚“。ã—ãŸãŒã£ã¦ã€çµæžœã®ã‚µã‚¤ã‚ºã¯é–¾å€¤ã‚’超ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚注æ„事項: çµæžœã®ãƒ¡ãƒ¢ãƒªå†…サイズãŒã“ã®é–¾å€¤ã«ã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã™ã€‚çµæžœã®ã‚µã‚¤ã‚ºãŒå°ã•ãã¦ã‚‚ã€LowCardinality カラムã®Dictionaryã‚„ã€AggregateFunction カラムã®ã‚¢ãƒªãƒ¼ãƒŠã®ã‚ˆã†ã«ã€å¤§ããªãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚’メモリ内ã§å‚ç…§ã—ã¦ã„ã‚‹å ´åˆã€ã“ã®é–¾å€¤ã‚’超ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã¯éžå¸¸ã«ä½Žãƒ¬ãƒ™ãƒ«ã§ã‚ã‚Šã€æ³¨æ„ã—ã¦ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## max_result_rows {#max_result_rows} + +タイプ: UInt64 + +デフォルト値: 0 + +çµæžœã‚µã‚¤ã‚ºã«é–¢ã™ã‚‹åˆ¶é™ï¼ˆè¡Œï¼‰ã€‚閾値ã«é”ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã®ãƒ–ロックを処ç†ã—ãŸå¾Œã«ã‚¯ã‚¨ãƒªã¯åœæ­¢ã—ã¾ã™ãŒã€çµæžœã®æœ€å¾Œã®ãƒ–ロックã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã›ã‚“。ã—ãŸãŒã£ã¦ã€çµæžœã®ã‚µã‚¤ã‚ºã¯é–¾å€¤ã‚’超ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## max_rows_in_distinct {#max_rows_in_distinct} + +タイプ: UInt64 + +デフォルト値: 0 + +DISTINCT ã®å®Ÿè¡Œä¸­ã®æœ€å¤§è¦ç´ æ•°ã€‚ + +## max_rows_in_join {#max_rows_in_join} + +タイプ: UInt64 + +デフォルト値: 0 + +JOIN ã®ãŸã‚ã®ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã€‚ + +## max_rows_in_set {#max_rows_in_set} + +タイプ: UInt64 + +デフォルト値: 0 + +IN セクションã®å®Ÿè¡Œçµæžœã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆè¦ç´ æ•°ï¼‰ã€‚ + +## max_rows_in_set_to_optimize_join {#max_rows_in_set_to_optimize_join} + +タイプ: UInt64 + +デフォルト値: 0 + +çµåˆãƒ†ãƒ¼ãƒ–ルをãŠäº’ã„ã®è¡Œã‚»ãƒƒãƒˆã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ãŸã‚ã®æœ€å¤§ã‚»ãƒƒãƒˆã‚µã‚¤ã‚ºã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +## max_rows_to_group_by {#max_rows_to_group_by} + +タイプ: UInt64 + +デフォルト値: 0 + +GROUP BY中ã«æŒ‡å®šã•ã‚ŒãŸè¡Œæ•°ï¼ˆãƒ¦ãƒ‹ãƒ¼ã‚¯ãªGROUP BYキー)ãŒç”Ÿæˆã•ã‚Œã‚‹å ´åˆã€ãã®å‹•ä½œã¯ 'group_by_overflow_mode' ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚デフォルトã§ã¯ä¾‹å¤–をスローã•ã‚Œã¾ã™ãŒã€å¤§ã¾ã‹ãªGROUP BYモードã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## max_rows_to_read {#max_rows_to_read} + +タイプ: UInt64 + +デフォルト値: 0 + +最も「深ã„ã€ã‚½ãƒ¼ã‚¹ã‹ã‚‰èª­ã¿å–る行数ã®åˆ¶é™ã€‚ã¤ã¾ã‚Šã€æœ€ã‚‚æ·±ã„サブクエリã§ã®ã¿ã€‚リモートサーãƒãƒ¼ã‹ã‚‰èª­ã¿å–ã‚‹ã¨ãã¯ã€ã“ã®åˆ¶é™ã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã§ã®ã¿ç¢ºèªã•ã‚Œã¾ã™ã€‚ + +## max_rows_to_read_leaf {#max_rows_to_read_leaf} + +タイプ: UInt64 + +デフォルト値: 0 + +分散クエリã®è‘‰ãƒŽãƒ¼ãƒ‰ã§ã®èª­ã¿å–り行数ã®åˆ¶é™ã€‚ã“ã®åˆ¶é™ã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒªãƒ¼ãƒ‰ã®ã¿ã«é©ç”¨ã•ã‚Œã€ãƒ«ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã§ã®æœ€çµ‚çš„ãªãƒžãƒ¼ã‚¸ã‚¹ãƒ†ãƒ¼ã‚¸ã‚’除外ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€prefer_localhost_replica=1 ã®å ´åˆã«ä¸å®‰å®šã§ã™ã€‚ + +## max_rows_to_sort {#max_rows_to_sort} + +タイプ: UInt64 + +デフォルト値: 0 + +ORDER BY æ“作ã®ãŸã‚ã«å‡¦ç†ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„レコード数ãŒæŒ‡å®šã•ã‚ŒãŸé‡ã‚’超ãˆãŸå ´åˆã€ãã®å‹•ä½œã¯ 'sort_overflow_mode' ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚デフォルトã§ã¯ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +## max_rows_to_transfer {#max_rows_to_transfer} + +タイプ: UInt64 + +デフォルト値: 0 + +GLOBAL IN/JOIN セクションãŒå®Ÿè¡Œã•ã‚Œã‚‹éš›ã«ä¼é”ã•ã‚Œã‚‹å¤–部テーブルã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã€‚ + +## max_sessions_for_user {#max_sessions_for_user} + +タイプ: UInt64 + +デフォルト値: 0 + +ユーザーã®ãŸã‚ã®åŒæ™‚セッションã®æœ€å¤§æ•°ã€‚ + +## max_size_to_preallocate_for_aggregation {#max_size_to_preallocate_for_aggregation} + +タイプ: UInt64 + +デフォルト値: 100000000 + +集約å‰ã«å…¨ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã«åˆè¨ˆã§äº‹å‰ã«ç¢ºä¿ã‚’許å¯ã™ã‚‹è¦ç´ æ•°ã€‚ + +## max_size_to_preallocate_for_joins {#max_size_to_preallocate_for_joins} + +タイプ: UInt64 + +デフォルト値: 100000000 + +çµåˆå‰ã«å…¨ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã«åˆè¨ˆã§äº‹å‰ã«ç¢ºä¿ã‚’許å¯ã™ã‚‹è¦ç´ æ•°ã€‚ + +## max_streams_for_merge_tree_reading {#max_streams_for_merge_tree_reading} + +タイプ: UInt64 + +デフォルト値: 0 + +ゼロã§ãªã„å ´åˆã€MergeTree テーブルã®ãŸã‚ã®èª­ã¿å–りストリームã®æ•°ã‚’制é™ã—ã¾ã™ã€‚ +## max_streams_multiplier_for_merge_tables {#max_streams_multiplier_for_merge_tables} + +タイプ: Float + +デフォルト値: 5 + +マージテーブルã‹ã‚‰èª­ã¿è¾¼ã‚€éš›ã«ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’追加ã—ã¾ã™ã€‚ストリームã¯ã€ãƒžãƒ¼ã‚¸ãƒ†ãƒ¼ãƒ–ルãŒä½¿ç”¨ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã«åˆ†æ•£ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¹ãƒ¬ãƒƒãƒ‰é–“ã§ã®ä½œæ¥­ã®å‡ç­‰ãªåˆ†é…ãŒå¯èƒ½ã«ãªã‚Šã€ç‰¹ã«ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ã‚µã‚¤ã‚ºãŒç•°ãªã‚‹å ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +## max_streams_to_max_threads_ratio {#max_streams_to_max_threads_ratio} + +タイプ: Float + +デフォルト値: 1 + +スレッドã®æ•°ä»¥ä¸Šã®ã‚½ãƒ¼ã‚¹ã‚’使用ã§ãるよã†ã«ã—ã€ä½œæ¥­ã‚’スレッド間ã§å‡ç­‰ã«åˆ†é…ã—ã¾ã™ã€‚å°†æ¥çš„ã«ã¯ã€ã‚½ãƒ¼ã‚¹ã®æ•°ã¨ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã‚’ç­‰ã—ãã—ã€ãã‚Œãžã‚Œã®ã‚½ãƒ¼ã‚¹ãŒè‡ªã‚‰åˆ©ç”¨å¯èƒ½ãªä½œæ¥­ã‚’å‹•çš„ã«é¸æŠžã§ãるよã†ã«ãªã‚‹ã¨æƒ³å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## max_subquery_depth {#max_subquery_depth} + +タイプ: UInt64 + +デフォルト値: 100 + +クエリã«æŒ‡å®šã•ã‚ŒãŸæ•°ä»¥ä¸Šã®ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚µãƒ–クエリãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–を投ã’ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¯ã‚¨ãƒªã§è‹¦ã—ã‚€ã®ã‚’防ãサニティãƒã‚§ãƒƒã‚¯ã‚’æä¾›ã—ã¾ã™ã€‚ + +## max_table_size_to_drop {#max_table_size_to_drop} + +タイプ: UInt64 + +デフォルト値: 50000000000 + +クエリ実行時ã«ãƒ†ãƒ¼ãƒ–ルを削除ã™ã‚‹éš›ã®åˆ¶é™ã€‚値0ã¯ã€åˆ¶é™ãªã—ã§å…¨ã¦ã®ãƒ†ãƒ¼ãƒ–ルを削除ã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤: 1 TB。 + +:::note +ã“ã®ã‚¯ã‚¨ãƒªè¨­å®šã¯ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šã®åŒç­‰ã®ã‚‚ã®ã‚’上書ãã—ã¾ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](docs/ja/operations/server-configuration-parameters/settings.md/#max-table-size-to-drop)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## max_temporary_columns {#max_temporary_columns} + +タイプ: UInt64 + +デフォルト値: 0 + +クエリãŒä¸­é–“計算ã®çµæžœã¨ã—ã¦ãƒ¡ãƒ¢ãƒªå†…ã«æŒ‡å®šã•ã‚ŒãŸæ•°ä»¥ä¸Šã®ä¸€æ™‚カラムを生æˆã—ãŸå ´åˆã€ä¾‹å¤–ãŒæŠ•ã’られã¾ã™ã€‚ゼロã®å€¤ã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€ã‚ã¾ã‚Šã«ã‚‚複雑ãªã‚¯ã‚¨ãƒªã‚’防ãã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +## max_temporary_data_on_disk_size_for_query {#max_temporary_data_on_disk_size_for_query} + +タイプ: UInt64 + +デフォルト値: 0 + +ã™ã¹ã¦ã®åŒæ™‚実行クエリã«å¯¾ã—ã¦ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ä¸€æ™‚ファイルã«ã‚ˆã£ã¦æ¶ˆè²»ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®æœ€å¤§é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## max_temporary_data_on_disk_size_for_user {#max_temporary_data_on_disk_size_for_user} + +タイプ: UInt64 + +デフォルト値: 0 + +ã™ã¹ã¦ã®åŒæ™‚実行ユーザークエリã«å¯¾ã—ã¦ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ä¸€æ™‚ファイルã«ã‚ˆã£ã¦æ¶ˆè²»ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®æœ€å¤§é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## max_temporary_non_const_columns {#max_temporary_non_const_columns} + +タイプ: UInt64 + +デフォルト値: 0 + +`max_temporary_columns`設定ã«é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€éžå®šæ•°ã‚«ãƒ©ãƒ ã®ã¿ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚定数カラムã¯ã‚³ã‚¹ãƒˆãŒä½Žã„ãŸã‚ã€ã‚ˆã‚Šå¤šãã®å®šæ•°ã‚«ãƒ©ãƒ ã‚’許å¯ã™ã‚‹ã®ãŒåˆç†çš„ã§ã™ã€‚ + +## max_threads {#max_threads} + +タイプ: MaxThreads + +デフォルト値: 'auto(12)' + +クエリ処ç†ã‚¹ãƒ¬ãƒƒãƒ‰ã®æœ€å¤§æ•°ã€‚リモートサーãƒãƒ¼ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ãŸã‚ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã¯é™¤å¤–ã•ã‚Œã¾ã™ï¼ˆ`max_distributed_connections`パラメータをå‚照)。 + +ã“ã®ãƒ‘ラメータã¯ã€ã‚¯ã‚¨ãƒªå‡¦ç†ãƒ‘イプラインã®åŒã˜æ®µéšŽã‚’並行ã—ã¦å®Ÿè¡Œã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿è¾¼ã‚€éš›ã€é–¢æ•°ã‚’用ã„ãŸå¼ã®è©•ä¾¡ã€WHEREã§ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã€ãŠã‚ˆã³GROUP BYã®ãŸã‚ã®äº‹å‰é›†è¨ˆã‚’最低ã§ã‚‚`max_threads`ã®æ•°ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’使用ã—ã¦ä¸¦è¡Œã—ã¦å®Ÿè¡Œå¯èƒ½ã§ã‚ã‚Œã°ã€`max_threads`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +LIMITã«ã‚ˆã£ã¦æ—©ã完了ã™ã‚‹ã‚¯ã‚¨ãƒªã®å ´åˆã€ã‚ˆã‚Šå°‘ãªã„`max_threads`を設定ã§ãã¾ã™ã€‚例ãˆã°ã€å¿…è¦ãªæ•°ã®ã‚¨ãƒ³ãƒˆãƒªãŒå„ブロックã«å­˜åœ¨ã—ã€max_threads = 8ã§ã‚ã‚Œã°ã€8ã¤ã®ãƒ–ロックãŒå–å¾—ã•ã‚Œã¾ã™ãŒã€å®Ÿéš›ã«ã¯1ã¤ã‚’読むã ã‘ã§æ¸ˆã¿ã¾ã™ã€‚ + +`max_threads`ã®å€¤ãŒå°ã•ã„ã»ã©ã€æ¶ˆè²»ã•ã‚Œã‚‹ãƒ¡ãƒ¢ãƒªã¯å°‘ãªããªã‚Šã¾ã™ã€‚ + +## max_threads_for_indexes {#max_threads_for_indexes} + +タイプ: UInt64 + +デフォルト値: 0 + +インデックスを処ç†ã™ã‚‹ãŸã‚ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æœ€å¤§æ•°ã€‚ + +## max_untracked_memory {#max_untracked_memory} + +タイプ: UInt64 + +デフォルト値: 4194304 + +å°ã•ãªãƒ¡ãƒ¢ãƒªã®å‰²ã‚Šå½“ã¦ã¨è§£æ”¾ã¯ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚Œã€æŒ‡å®šã•ã‚ŒãŸå€¤ã‚ˆã‚Šã‚‚大ãããªã‚‹ã¾ã§ã¯è¿½è·¡ã¾ãŸã¯ãƒ—ロファイリングã•ã‚Œã¾ã›ã‚“。値ãŒ'memory_profiler_step'を超ãˆã‚‹å ´åˆã€å®Ÿè³ªçš„ã«ã¯'memory_profiler_step'ã«åˆ¶é™ã•ã‚Œã¾ã™ã€‚ + +## memory_overcommit_ratio_denominator {#memory_overcommit_ratio_denominator} + +タイプ: UInt64 + +デフォルト値: 1073741824 + +ã“ã‚Œã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ãƒ¬ãƒ™ãƒ«ã§ãƒãƒ¼ãƒ‰ãƒªãƒŸãƒƒãƒˆã«é”ã—ãŸã¨ãã®ã‚½ãƒ•ãƒˆãƒ¡ãƒ¢ãƒªãƒªãƒŸãƒƒãƒˆã‚’表ã—ã¾ã™ã€‚ã“ã®å€¤ã¯ã€ã‚¯ã‚¨ãƒªã®ã‚ªãƒ¼ãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆæ¯”を計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ゼロã¯ã‚¯ã‚¨ãƒªã‚’スキップã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +[メモリオーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆ](memory-overcommit.md)ã«ã¤ã„ã¦ã®è©³ç´°ã‚’ãŠèª­ã¿ãã ã•ã„。 + +## memory_overcommit_ratio_denominator_for_user {#memory_overcommit_ratio_denominator_for_user} + +タイプ: UInt64 + +デフォルト値: 1073741824 + +ã“ã‚Œã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ¬ãƒ™ãƒ«ã§ãƒãƒ¼ãƒ‰ãƒªãƒŸãƒƒãƒˆã«é”ã—ãŸã¨ãã®ã‚½ãƒ•ãƒˆãƒ¡ãƒ¢ãƒªãƒªãƒŸãƒƒãƒˆã‚’表ã—ã¾ã™ã€‚ã“ã®å€¤ã¯ã€ã‚¯ã‚¨ãƒªã®ã‚ªãƒ¼ãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆæ¯”を計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ゼロã¯ã‚¯ã‚¨ãƒªã‚’スキップã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +[メモリオーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆ](memory-overcommit.md)ã«ã¤ã„ã¦ã®è©³ç´°ã‚’ãŠèª­ã¿ãã ã•ã„。 + +## memory_profiler_sample_max_allocation_size {#memory_profiler_sample_max_allocation_size} + +タイプ: UInt64 + +デフォルト値: 0 + +指定ã•ã‚ŒãŸå€¤ä»¥ä¸‹ã®ã‚µã‚¤ã‚ºã®ãƒ©ãƒ³ãƒ€ãƒ ãªå‰²ã‚Šå½“ã¦ã‚’`memory_profiler_sample_probability`ã®ç¢ºçŽ‡ã§åŽé›†ã—ã¾ã™ã€‚0ã¯ç„¡åŠ¹ã‚’æ„味ã—ã¾ã™ã€‚ã“ã‚ŒãŒæœŸå¾…通りã«å‹•ä½œã™ã‚‹ãŸã‚ã«ã€`max_untracked_memory`ã‚’0ã«è¨­å®šã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## memory_profiler_sample_min_allocation_size {#memory_profiler_sample_min_allocation_size} + +タイプ: UInt64 + +デフォルト値: 0 + +指定ã•ã‚ŒãŸå€¤ä»¥ä¸Šã®ã‚µã‚¤ã‚ºã®ãƒ©ãƒ³ãƒ€ãƒ ãªå‰²ã‚Šå½“ã¦ã‚’`memory_profiler_sample_probability`ã®ç¢ºçŽ‡ã§åŽé›†ã—ã¾ã™ã€‚0ã¯ç„¡åŠ¹ã‚’æ„味ã—ã¾ã™ã€‚ã“ã‚ŒãŒæœŸå¾…通りã«å‹•ä½œã™ã‚‹ãŸã‚ã«ã€`max_untracked_memory`ã‚’0ã«è¨­å®šã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## memory_profiler_sample_probability {#memory_profiler_sample_probability} + +タイプ: Float + +デフォルト値: 0 + +ランダムãªå‰²ã‚Šå½“ã¦ã¨è§£æ”¾ã‚’åŽé›†ã—ã€'MemorySample'トレースタイプã§system.trace_logã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ã“ã®ç¢ºçŽ‡ã¯ã€ã‚µã‚¤ã‚ºã«é–¢ä¿‚ãªãã™ã¹ã¦ã®å‰²ã‚Šå½“ã¦/解放ã«å¯¾ã—ã¦é©ç”¨ã•ã‚Œã¾ã™ï¼ˆ`memory_profiler_sample_min_allocation_size`ã¨`memory_profiler_sample_max_allocation_size`ã§å¤‰æ›´å¯èƒ½ã§ã™ï¼‰ã€‚追跡ã•ã‚Œã¦ã„ãªã„メモリã®é‡ãŒ'max_untracked_memory'を超ãˆãŸã¨ãã®ã¿ã‚µãƒ³ãƒ—リングã¯è¡Œã‚ã‚Œã¾ã™ã€‚追加ã®è©³ç´°ãªã‚µãƒ³ãƒ—リングã®ãŸã‚ã«`max_untracked_memory`ã‚’0ã«è¨­å®šã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## memory_profiler_step {#memory_profiler_step} + +タイプ: UInt64 + +デフォルト値: 4194304 + +メモリプロファイラã®ã‚¹ãƒ†ãƒƒãƒ—を設定ã—ã¾ã™ã€‚クエリã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ãŒæ¬¡ã®ã‚¹ãƒ†ãƒƒãƒ—ã®ãƒã‚¤ãƒˆæ•°ã‚ˆã‚Šã‚‚大ãããªã‚‹ã¨ã€ãƒ¡ãƒ¢ãƒªãƒ—ロファイラã¯å‰²ã‚Šå½“ã¦ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’åŽé›†ã—ã€ãれを[trace_log](../../operations/system-tables/trace_log.md#system_tables-trace_log)ã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- メモリプロファイラをオフã«ã™ã‚‹ã«ã¯0を設定ã—ã¾ã™ã€‚ + +## memory_tracker_fault_probability {#memory_tracker_fault_probability} + +タイプ: Float + +デフォルト値: 0 + +`exception safety`ã®ãƒ†ã‚¹ãƒˆ - 指定ã•ã‚ŒãŸç¢ºçŽ‡ã§ãƒ¡ãƒ¢ãƒªã‚’割り当ã¦ã‚‹ãŸã³ã«ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +## memory_usage_overcommit_max_wait_microseconds {#memory_usage_overcommit_max_wait_microseconds} + +タイプ: UInt64 + +デフォルト値: 5000000 + +ユーザーレベルã§ã®ãƒ¡ãƒ¢ãƒªã‚ªãƒ¼ãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆã®å ´åˆã€ã‚¹ãƒ¬ãƒƒãƒ‰ãŒãƒ¡ãƒ¢ãƒªã®è§£æ”¾ã‚’å¾…ã¤æœ€å¤§æ™‚間。 +タイムアウトã«é”ã—ã€ãƒ¡ãƒ¢ãƒªãŒè§£æ”¾ã•ã‚Œãªã„å ´åˆã€ä¾‹å¤–ãŒæŠ•ã’られã¾ã™ã€‚ +[メモリオーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆ](memory-overcommit.md)ã«ã¤ã„ã¦ã®è©³ç´°ã‚’ãŠèª­ã¿ãã ã•ã„。 + +## merge_tree_coarse_index_granularity {#merge_tree_coarse_index_granularity} + +タイプ: UInt64 + +デフォルト値: 8 + +データを検索ã™ã‚‹éš›ã€ClickHouseã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‡ãƒ¼ã‚¿ãƒžãƒ¼ã‚¯ã‚’確èªã—ã¾ã™ã€‚å¿…è¦ãªã‚­ãƒ¼ãŒç‰¹å®šã®ç¯„囲ã«å­˜åœ¨ã™ã‚‹å ´åˆã€ClickHouseã¯ã“ã®ç¯„囲を`merge_tree_coarse_index_granularity`ã®ã‚µãƒ–範囲ã«åˆ†å‰²ã—ã€å†å¸°çš„ã«ãã“ã«å¿…è¦ãªã‚­ãƒ¼ã‚’探索ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®å¶æ•°æ•´æ•°ã€‚ + +## merge_tree_compact_parts_min_granules_to_multibuffer_read {#merge_tree_compact_parts_min_granules_to_multibuffer_read} + +タイプ: UInt64 + +デフォルト値: 16 + +ClickHouse Cloud専用。MergeTreeテーブルã®ã‚³ãƒ³ãƒ‘クト部ã®ã‚¹ãƒˆãƒ©ã‚¤ãƒ—内ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«æ•°ã§ã€ãƒžãƒ«ãƒãƒãƒƒãƒ•ã‚¡ãƒªãƒ¼ãƒ€ãƒ¼ã‚’使用ã—ã¦ä¸¦è¡Œèª­ã¿è¾¼ã¿ã¨ãƒ—リフェッãƒã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚リモートfsã‹ã‚‰èª­ã¿è¾¼ã‚€éš›ã«ãƒžãƒ«ãƒãƒãƒƒãƒ•ã‚¡ãƒªãƒ¼ãƒ€ãƒ¼ã‚’使用ã™ã‚‹ã¨ã€èª­ã¿å–ã‚Šè¦æ±‚ã®æ•°ãŒå¢—加ã—ã¾ã™ã€‚ + +## merge_tree_determine_task_size_by_prewhere_columns {#merge_tree_determine_task_size_by_prewhere_columns} + +タイプ: Bool + +デフォルト値: 1 + +読ã¿å–りタスクã®ã‚µã‚¤ã‚ºã‚’決定ã™ã‚‹ãŸã‚ã«ã®ã¿ã€å‰ã«æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®ã‚µã‚¤ã‚ºã‚’使用ã™ã‚‹ã‹ã©ã†ã‹ã€‚ + +## merge_tree_max_bytes_to_use_cache {#merge_tree_max_bytes_to_use_cache} + +タイプ: UInt64 + +デフォルト値: 2013265920 + +ClickHouseãŒ1ã¤ã®ã‚¯ã‚¨ãƒªã§`merge_tree_max_bytes_to_use_cache`ãƒã‚¤ãƒˆã‚’超ãˆã¦èª­ã¿è¾¼ã‚€å¿…è¦ãŒã‚ã‚‹å ´åˆã€æœªåœ§ç¸®ãƒ–ロックã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。 + +未圧縮ブロックã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ã€ã‚¯ã‚¨ãƒªã®ãŸã‚ã«æŠ½å‡ºã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã—ã¾ã™ã€‚ClickHouseã¯ã€ã“ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦ç¹°ã‚Šè¿”ã•ã‚Œã‚‹å°ã•ãªã‚¯ã‚¨ãƒªã¸ã®å¿œç­”を迅速化ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒç ´å£Šã•ã‚Œã‚‹ã®ã‚’防ãŽã¾ã™ã€‚[uncompressed_cache_size](../../operations/server-configuration-parameters/settings.md/#server-settings-uncompressed_cache_size)サーãƒãƒ¼è¨­å®šã¯ã€æœªåœ§ç¸®ãƒ–ロックã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ã‚µã‚¤ã‚ºã‚’定義ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +## merge_tree_max_rows_to_use_cache {#merge_tree_max_rows_to_use_cache} + +タイプ: UInt64 + +デフォルト値: 1048576 + +ClickHouseãŒ1ã¤ã®ã‚¯ã‚¨ãƒªã§`merge_tree_max_rows_to_use_cache`行を超ãˆã¦èª­ã¿è¾¼ã‚€å¿…è¦ãŒã‚ã‚‹å ´åˆã€æœªåœ§ç¸®ãƒ–ロックã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。 + +未圧縮ブロックã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ã€ã‚¯ã‚¨ãƒªã®ãŸã‚ã«æŠ½å‡ºã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã—ã¾ã™ã€‚ClickHouseã¯ã€ã“ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦ç¹°ã‚Šè¿”ã•ã‚Œã‚‹å°ã•ãªã‚¯ã‚¨ãƒªã¸ã®å¿œç­”を迅速化ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒç ´å£Šã•ã‚Œã‚‹ã®ã‚’防ãŽã¾ã™ã€‚[uncompressed_cache_size](../../operations/server-configuration-parameters/settings.md/#server-settings-uncompressed_cache_size)サーãƒãƒ¼è¨­å®šã¯ã€æœªåœ§ç¸®ãƒ–ロックã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ã‚µã‚¤ã‚ºã‚’定義ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +## merge_tree_min_bytes_for_concurrent_read {#merge_tree_min_bytes_for_concurrent_read} + +タイプ: UInt64 + +デフォルト値: 251658240 + +MergeTreeエンジンテーブルã®1ファイルã‹ã‚‰èª­ã¿å–ã‚‹ãƒã‚¤ãƒˆæ•°ãŒ`merge_tree_min_bytes_for_concurrent_read`を超ãˆã‚‹å ´åˆã€ClickHouseã¯ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰è¤‡æ•°ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§ã®ä¸¦è¡Œèª­ã¿å–りを試ã¿ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +## merge_tree_min_bytes_for_concurrent_read_for_remote_filesystem {#merge_tree_min_bytes_for_concurrent_read_for_remote_filesystem} + +タイプ: UInt64 + +デフォルト値: 0 + +リモートファイルシステムã‹ã‚‰ã®èª­ã¿å–り時ã«ã€MergeTreeエンジンãŒèª­ã¿å–りを並列化ã§ãるよã†ã«ã™ã‚‹å‰ã«ã€1ファイルã‹ã‚‰èª­ã¿å–ã‚‹ãƒã‚¤ãƒˆæ•°ã®æœ€å°å€¤ã§ã™ã€‚ã“ã®è¨­å®šã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +## merge_tree_min_bytes_for_seek {#merge_tree_min_bytes_for_seek} + +タイプ: UInt64 + +デフォルト値: 0 + +1ファイル内ã®2ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®é–“ã®è·é›¢ãŒ`merge_tree_min_bytes_for_seek`ãƒã‚¤ãƒˆæœªæº€ã§ã‚ã‚‹å ´åˆã€ClickHouseã¯ä¸¡æ–¹ã®ãƒ–ロックをå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã®ç¯„囲を sequentiallyã«èª­ã¿è¾¼ã¿ã€ä½™åˆ†ãªã‚·ãƒ¼ã‚¯ã‚’回é¿ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +## merge_tree_min_bytes_per_task_for_remote_reading {#merge_tree_min_bytes_per_task_for_remote_reading} + +タイプ: UInt64 + +デフォルト値: 2097152 + +タスクã”ã¨ã«èª­ã¿å–ã‚‹ãƒã‚¤ãƒˆæ•°ã®æœ€å°å€¤ã€‚ + +## merge_tree_min_read_task_size {#merge_tree_min_read_task_size} + +タイプ: UInt64 + +デフォルト値: 8 + +タスクサイズã®çµ¶å¯¾ä¸‹é™ï¼ˆã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«æ•°ãŒå°‘ãªãã€åˆ©ç”¨å¯èƒ½ãªã‚¹ãƒ¬ãƒƒãƒ‰æ•°ãŒå¤šãã¦ã‚‚å°ã•ãªã‚¿ã‚¹ã‚¯ã‚’割り当ã¦ã¾ã›ã‚“)。 + +## merge_tree_min_rows_for_concurrent_read {#merge_tree_min_rows_for_concurrent_read} + +タイプ: UInt64 + +デフォルト値: 163840 + +1ファイルã‹ã‚‰èª­ã¿å–る行数ãŒ`merge_tree_min_rows_for_concurrent_read`を超ãˆã‚‹å ´åˆã€ClickHouseã¯ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰è¤‡æ•°ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§ã®ä¸¦è¡Œèª­ã¿å–りを試ã¿ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +## merge_tree_min_rows_for_concurrent_read_for_remote_filesystem {#merge_tree_min_rows_for_concurrent_read_for_remote_filesystem} + +タイプ: UInt64 + +デフォルト値: 0 + +リモートファイルシステムã‹ã‚‰ã®èª­ã¿å–り時ã«ã€MergeTreeエンジンãŒèª­ã¿å–りを並列化ã§ãるよã†ã«ã™ã‚‹å‰ã«ã€1ファイルã‹ã‚‰èª­ã¿å–る行数ã®æœ€å°å€¤ã§ã™ã€‚ã“ã®è¨­å®šã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ + +## merge_tree_min_rows_for_seek {#merge_tree_min_rows_for_seek} + +タイプ: UInt64 + +デフォルト値: 0 + +1ファイル内ã®2ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®é–“ã®è·é›¢ãŒ`merge_tree_min_rows_for_seek`行未満ã§ã‚ã‚‹å ´åˆã€ClickHouseã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚’シークã›ãšã€ãƒ‡ãƒ¼ã‚¿ã‚’é€æ¬¡èª­ã¿è¾¼ã¿ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ + +## merge_tree_read_split_ranges_into_intersecting_and_non_intersecting_injection_probability {#merge_tree_read_split_ranges_into_intersecting_and_non_intersecting_injection_probability} + +タイプ: Float + +デフォルト値: 0 + +`PartsSplitter`ã®ãƒ†ã‚¹ãƒˆ - MergeTreeã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹éš›ã«ã€æŒ‡å®šã•ã‚ŒãŸç¢ºçŽ‡ã§ç¯„囲を交差ã™ã‚‹ã‚‚ã®ã¨äº¤å·®ã—ãªã„ã‚‚ã®ã«åˆ†å‰²ã—ã¾ã™ã€‚ + +## merge_tree_use_const_size_tasks_for_remote_reading {#merge_tree_use_const_size_tasks_for_remote_reading} + +タイプ: Bool + +デフォルト値: 1 + +リモートテーブルã‹ã‚‰èª­ã¿å–ã‚‹éš›ã«ã€å›ºå®šã‚µã‚¤ã‚ºã®ã‚¿ã‚¹ã‚¯ã‚’使用ã™ã‚‹ã‹ã©ã†ã‹ã€‚ + +## metrics_perf_events_enabled {#metrics_perf_events_enabled} + +タイプ: Bool + +デフォルト値: 0 + +有効ã«ã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œä¸­ã«ä¸€éƒ¨ã®ãƒ‘フォーマンスイベントãŒæ¸¬å®šã•ã‚Œã¾ã™ã€‚ + +## metrics_perf_events_list {#metrics_perf_events_list} + +タイプ: String + +デフォルト値: + +クエリã®å®Ÿè¡Œä¸­ã«æ¸¬å®šã•ã‚Œã‚‹ãƒ‘フォーマンスメトリクスをコンマã§åŒºåˆ‡ã£ãŸãƒªã‚¹ãƒˆã€‚空ã¯ã™ã¹ã¦ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’æ„味ã—ã¾ã™ã€‚利用å¯èƒ½ãªã‚¤ãƒ™ãƒ³ãƒˆã«ã¤ã„ã¦ã¯ã€ã‚½ãƒ¼ã‚¹ã®PerfEventInfoã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## min_bytes_to_use_direct_io {#min_bytes_to_use_direct_io} + +タイプ: UInt64 + +デフォルト値: 0 + +ストレージディスクã«å¯¾ã—ã¦ãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆI/Oアクセスを使用ã™ã‚‹ãŸã‚ã«å¿…è¦ãªæœ€å°ãƒ‡ãƒ¼ã‚¿ãƒœãƒªãƒ¥ãƒ¼ãƒ ã€‚ + +ClickHouseã¯ã€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€éš›ã«ã“ã®è¨­å®šã‚’使用ã—ã¾ã™ã€‚読ã¿å–るデータã®ç·ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒœãƒªãƒ¥ãƒ¼ãƒ ãŒ`min_bytes_to_use_direct_io`ãƒã‚¤ãƒˆã‚’超ãˆã‚‹å ´åˆã€ClickHouseã¯`O_DIRECT`オプションを使ã£ã¦ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — ダイレクトI/Oã¯ç„¡åŠ¹ã€‚ +- æ­£ã®æ•´æ•°ã€‚ + +## min_bytes_to_use_mmap_io {#min_bytes_to_use_mmap_io} + +タイプ: UInt64 + +デフォルト値: 0 + +ã“ã‚Œã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªè¨­å®šã§ã™ã€‚カーãƒãƒ«ã‹ã‚‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¹ãƒšãƒ¼ã‚¹ã«ãƒ‡ãƒ¼ã‚¿ã‚’コピーã—ãªã„ã§å¤§ããªãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿å–ã‚‹ãŸã‚ã®æœ€å°ãƒ¡ãƒ¢ãƒªé‡ã‚’設定ã—ã¾ã™ã€‚推奨ã•ã‚Œã‚‹ã—ãã„値ã¯ç´„64 MBã§ã™ã€‚ãªãœãªã‚‰ã€[mmap/munmap](https://en.wikipedia.org/wiki/Mmap)ã¯é…ã„ã‹ã‚‰ã§ã™ã€‚ã“ã‚Œã¯å¤§ããªãƒ•ã‚¡ã‚¤ãƒ«ã®ã¿ã«æ„味ãŒã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ãŒãƒšãƒ¼ã‚¸ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«å­˜åœ¨ã™ã‚‹å ´åˆã«ã®ã¿å½¹ç«‹ã¡ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 大ããªãƒ•ã‚¡ã‚¤ãƒ«ã¯ã‚«ãƒ¼ãƒãƒ«ã‹ã‚‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¹ãƒšãƒ¼ã‚¹ã«ãƒ‡ãƒ¼ã‚¿ã‚’コピーã™ã‚‹ã®ã¿ã§èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ + +## min_chunk_bytes_for_parallel_parsing {#min_chunk_bytes_for_parallel_parsing} + +タイプ: UInt64 + +デフォルト値: 10485760 + +- タイプ: æ­£ã®æ•´æ•° +- デフォルト値: 1 MiB + +å„スレッドãŒä¸¦è¡Œã—ã¦è§£æžã™ã‚‹æœ€å°ãƒãƒ£ãƒ³ã‚¯ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +## min_compress_block_size {#min_compress_block_size} + +タイプ: UInt64 + +デフォルト値: 65536 + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md)テーブル用。クエリ処ç†æ™‚ã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ã‚’減少ã•ã›ã‚‹ãŸã‚ã«ã€æ¬¡ã®ãƒžãƒ¼ã‚¯ã‚’書ã込む際ã€ãã®ã‚µã‚¤ã‚ºãŒ`min_compress_block_size`以上ã§ã‚ã‚Œã°ãƒ–ロックãŒåœ§ç¸®ã•ã‚Œã¾ã™ã€‚デフォルトã¯65,536ã§ã™ã€‚ + +未圧縮データã®å®Ÿéš›ã®ã‚µã‚¤ã‚ºãŒ`max_compress_block_size`未満ã§ã‚ã‚Œã°ã€ãƒ–ロックã®ã‚µã‚¤ã‚ºã¯ã“ã®å€¤ä»¥ä¸Šã€ã‹ã¤1マーク分ã®ãƒ‡ãƒ¼ã‚¿é‡ä»¥ä¸Šã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +例を見ã¦ã¿ã¾ã—ょã†ã€‚`index_granularity`ãŒãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã«8192ã«è¨­å®šã•ã‚Œã¦ã„ãŸã¨ã—ã¾ã™ã€‚ + +UInt32åž‹ã®ã‚«ãƒ©ãƒ ï¼ˆå€¤ã‚ãŸã‚Š4ãƒã‚¤ãƒˆï¼‰ã‚’書ã込む場åˆã€‚8192行を書ã込むã¨ã€åˆè¨ˆ32 KBã®ãƒ‡ãƒ¼ã‚¿ã«ãªã‚Šã¾ã™ã€‚`min_compress_block_size`ãŒ65,536ã§ã‚ã‚‹ãŸã‚ã€2マークã”ã¨ã«åœ§ç¸®ãƒ–ロックãŒå½¢æˆã•ã‚Œã¾ã™ã€‚ + +URLåž‹ã®ã‚«ãƒ©ãƒ ï¼ˆå¹³å‡ã‚µã‚¤ã‚º60ãƒã‚¤ãƒˆï¼‰ã®å ´åˆã‚‚見ã¦ã¿ã¾ã—ょã†ã€‚8192行を書ã込むã¨ã€å¹³å‡ã§500 KBå¼±ã®ãƒ‡ãƒ¼ã‚¿ã«ãªã‚Šã¾ã™ã€‚ã“ã‚Œã¯65,536を超ãˆã¦ã„ã‚‹ãŸã‚ã€å„マークã”ã¨ã«åœ§ç¸®ãƒ–ロックãŒå½¢æˆã•ã‚Œã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰å˜ä¸€ã®ãƒžãƒ¼ã‚¯ã®ç¯„囲を読ã¿è¾¼ã‚€ã¨ãã«ä½™åˆ†ãªãƒ‡ãƒ¼ã‚¿ã¯è§£å‡ã•ã‚Œã¾ã›ã‚“。 + +:::note +ã“ã‚Œã¯å°‚門家å‘ã‘ã®è¨­å®šã§ã‚ã‚Šã€ClickHouseを使用ã—始ã‚ãŸã°ã‹ã‚Šã®äººãŒå¤‰æ›´ã™ã‚‹ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +## min_count_to_compile_aggregate_expression {#min_count_to_compile_aggregate_expression} + +タイプ: UInt64 + +デフォルト値: 3 + +JITコンパイルを開始ã™ã‚‹ãŸã‚ã®åŒä¸€ã®é›†ç´„å¼ã®æœ€å°æ•°ã€‚ã“ã®è¨­å®šã¯ã€[compile_aggregate_expressions](#compile_aggregate_expressions)ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — åŒä¸€ã®é›†ç´„å¼ã¯å¸¸ã«JITコンパイルã•ã‚Œã¾ã™ã€‚ + +## min_count_to_compile_expression {#min_count_to_compile_expression} + +タイプ: UInt64 + +デフォルト値: 3 + +コンパイルãŒé–‹å§‹ã•ã‚Œã‚‹å‰ã«å®Ÿè¡Œã•ã‚Œã‚‹åŒã˜å¼ã®æœ€å°ã‚«ã‚¦ãƒ³ãƒˆã€‚ + +## min_count_to_compile_sort_description {#min_count_to_compile_sort_description} + +タイプ: UInt64 + +デフォルト値: 3 + +JITコンパイルã•ã‚Œã‚‹å‰ã®åŒä¸€ã®ã‚½ãƒ¼ãƒˆèª¬æ˜Žã®æ•°ã€‚ + +## min_execution_speed {#min_execution_speed} + +タイプ: UInt64 + +デフォルト値: 0 + +1秒ã‚ãŸã‚Šã®å®Ÿè¡Œè¡Œæ•°ã®æœ€å°å€¤ã€‚ + +## min_execution_speed_bytes {#min_execution_speed_bytes} + +タイプ: UInt64 + +デフォルト値: 0 + +1秒ã‚ãŸã‚Šã®å®Ÿè¡Œãƒã‚¤ãƒˆæ•°ã®æœ€å°å€¤ã€‚ + +## min_external_table_block_size_bytes {#min_external_table_block_size_bytes} + +タイプ: UInt64 + +デフォルト値: 268402944 + +外部テーブルã«æ¸¡ã•ã‚Œã‚‹ãƒ–ロックを指定ã•ã‚ŒãŸãƒã‚¤ãƒˆã‚µã‚¤ã‚ºã«åœ§ç¸®ã—ã¾ã™ã€‚ブロックãŒå分ã«å¤§ãããªã„å ´åˆã€‚ + +## min_external_table_block_size_rows {#min_external_table_block_size_rows} + +タイプ: UInt64 + +デフォルト値: 1048449 + +外部テーブルã«æ¸¡ã•ã‚ŒãŸãƒ–ロックを指定ã•ã‚ŒãŸè¡Œæ•°ã«åœ§ç¸®ã—ã¾ã™ã€‚ブロックãŒå分ã«å¤§ãããªã„å ´åˆã€‚ + +## min_free_disk_bytes_to_perform_insert {#min_free_disk_bytes_to_perform_insert} + +タイプ: UInt64 + +デフォルト値: 0 + +挿入を行ã†ãŸã‚ã«å¿…è¦ãªæœ€å°ç©ºããƒ‡ã‚£ã‚¹ã‚¯å®¹é‡ (ãƒã‚¤ãƒˆå˜ä½)。 + +## min_free_disk_ratio_to_perform_insert {#min_free_disk_ratio_to_perform_insert} + +タイプ: Float + +デフォルト値: 0 + +挿入を行ã†ãŸã‚ã«å¿…è¦ãªæœ€å°ç©ºãディスクスペースã®æ¯”率。 + +## min_free_disk_space_for_temporary_data {#min_free_disk_space_for_temporary_data} + +タイプ: UInt64 + +デフォルト値: 0 + +外部ソートや集約ã§ä½¿ç”¨ã•ã‚Œã‚‹ä¸€æ™‚データã®æ›¸ãè¾¼ã¿ä¸­ã«ä¿æŒã™ã‚‹å¿…è¦ãŒã‚る最å°ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã€‚ + +## min_hit_rate_to_use_consecutive_keys_optimization {#min_hit_rate_to_use_consecutive_keys_optimization} + +タイプ: Float + +デフォルト値: 0.5 + +åˆè¨ˆã‚­ãƒ¼æœ€é©åŒ–ã‚’ä¿æŒã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®æœ€å°ãƒ’ット率。 + +## min_insert_block_size_bytes {#min_insert_block_size_bytes} + +タイプ: UInt64 + +デフォルト値: 268402944 + +`INSERT`クエリã«ã‚ˆã£ã¦ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã§ãるブロック内ã®æœ€å°ãƒã‚¤ãƒˆæ•°ã‚’設定ã—ã¾ã™ã€‚å°ã•ã„サイズã®ãƒ–ロックã¯å¤§ããªãƒ–ロックã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 圧縮無効。 + +## min_insert_block_size_bytes_for_materialized_views {#min_insert_block_size_bytes_for_materialized_views} + +タイプ: UInt64 + +デフォルト値: 0 + +`INSERT`クエリã«ã‚ˆã£ã¦ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã§ãるブロック内ã®æœ€å°ãƒã‚¤ãƒˆæ•°ã‚’設定ã—ã¾ã™ã€‚å°ã•ã„サイズã®ãƒ–ロックã¯å¤§ããªãƒ–ロックã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€[マテリアライズドビュー](../../sql-reference/statements/create/view.md)ã«æŒ¿å…¥ã•ã‚Œã‚‹ãƒ–ロックã®ã¿ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã‚’調整ã™ã‚‹ã“ã¨ã§ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã«ãƒ—ッシュã™ã‚‹éš›ã®ãƒ–ロック圧縮を制御ã—ã€éŽå‰°ãªãƒ¡ãƒ¢ãƒªä½¿ç”¨ã‚’回é¿ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0 — 圧縮無効。 + +**詳細情報** + +- [min_insert_block_size_bytes](#min-insert-block-size-bytes) + +## min_insert_block_size_rows {#min_insert_block_size_rows} + +タイプ: UInt64 + +デフォルト値: 1048449 + +`INSERT`クエリã«ã‚ˆã£ã¦ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã§ãるブロック内ã®æœ€å°è¡Œæ•°ã‚’設定ã—ã¾ã™ã€‚å°ã•ã„サイズã®ãƒ–ロックã¯å¤§ããªãƒ–ロックã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 圧縮無効。 + +## min_insert_block_size_rows_for_materialized_views {#min_insert_block_size_rows_for_materialized_views} + +タイプ: UInt64 + +デフォルト値: 0 + +`INSERT`クエリã«ã‚ˆã£ã¦ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã§ãるブロック内ã®æœ€å°è¡Œæ•°ã‚’設定ã—ã¾ã™ã€‚å°ã•ã„サイズã®ãƒ–ロックã¯å¤§ããªãƒ–ロックã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€[マテリアライズドビュー](../../sql-reference/statements/create/view.md)ã«æŒ¿å…¥ã•ã‚Œã‚‹ãƒ–ロックã®ã¿ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã‚’調整ã™ã‚‹ã“ã¨ã§ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã«ãƒ—ッシュã™ã‚‹éš›ã®ãƒ–ロック圧縮を制御ã—ã€éŽå‰°ãªãƒ¡ãƒ¢ãƒªä½¿ç”¨ã‚’回é¿ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0 — 圧縮無効。 + +**詳細情報** + +- [min_insert_block_size_rows](#min-insert-block-size-rows) + +## mongodb_throw_on_unsupported_query {#mongodb_throw_on_unsupported_query} + +タイプ: Bool + +デフォルト値: 1 + +有効ã«ã™ã‚‹ã¨ã€MongoDBクエリを構築ã§ããªã„å ´åˆã€MongoDBテーブルã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ClickHouseã¯ãƒ†ãƒ¼ãƒ–ル全体を読ã¿è¾¼ã¿ã€ãƒ­ãƒ¼ã‚«ãƒ«ã§å‡¦ç†ã—ã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションã¯ã€ãƒ¬ã‚¬ã‚·ãƒ¼å®Ÿè£…ã‚„`allow_experimental_analyzer=0`ã®ã¨ãã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。 + +## move_all_conditions_to_prewhere {#move_all_conditions_to_prewhere} + +タイプ: Bool + +デフォルト値: 1 + +WHEREã‹ã‚‰PREWHEREã«ã™ã¹ã¦ã®é©ç”¨å¯èƒ½ãªæ¡ä»¶ã‚’移動ã—ã¾ã™ã€‚ + +## move_primary_key_columns_to_end_of_prewhere {#move_primary_key_columns_to_end_of_prewhere} + +タイプ: Bool + +デフォルト値: 1 + +主キー列をå«ã‚€PREWHEREæ¡ä»¶ã‚’ANDãƒã‚§ãƒ¼ãƒ³ã®æœ€å¾Œã«ç§»å‹•ã—ã¾ã™ã€‚ã“れらã®æ¡ä»¶ã¯ä¸»ã‚­ãƒ¼åˆ†æžä¸­ã«è€ƒæ…®ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒé«˜ãã€PREWHEREフィルタリングã«ã¯å¤šã寄与ã—ãªã„ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ + +## multiple_joins_try_to_keep_original_names {#multiple_joins_try_to_keep_original_names} + +タイプ: Bool + +デフォルト値: 0 + +複数ã®çµåˆã®ãƒªãƒ©ã‚¤ãƒˆæ™‚ã«ãƒˆãƒƒãƒ—レベルã®å¼ãƒªã‚¹ãƒˆã«ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’追加ã—ãªã„。 + +## mutations_execute_nondeterministic_on_initiator {#mutations_execute_nondeterministic_on_initiator} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã®å€¤ãŒtrueã®å ´åˆã€å®šæ•°éžæ±ºå®šæ€§é–¢æ•°ï¼ˆä¾‹ãˆã°ã€é–¢æ•°`now()`)ã¯ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã€`UPDATE`ãŠã‚ˆã³`DELETE`クエリã®ãƒªãƒ†ãƒ©ãƒ«ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€å®šæ•°éžæ±ºå®šæ€§é–¢æ•°ã‚’å«ã‚€å¤‰ç•°ã‚’実行中ã«ãƒ‡ãƒ¼ã‚¿ã‚’レプリカ間ã§åŒæœŸã•ã›ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚デフォルト値: `false`。 + +## mutations_execute_subqueries_on_initiator {#mutations_execute_subqueries_on_initiator} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã®å€¤ãŒtrueã®å ´åˆã€ã‚¹ã‚«ãƒ©ã‚µãƒ–クエリã¯ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã€`UPDATE`ãŠã‚ˆã³`DELETE`クエリã®ãƒªãƒ†ãƒ©ãƒ«ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚デフォルト値: `false`。 + +## mutations_max_literal_size_to_replace {#mutations_max_literal_size_to_replace} + +タイプ: UInt64 + +デフォルト値: 16384 + +`UPDATE`ãŠã‚ˆã³`DELETE`クエリã§ç½®æ›ã•ã‚Œã‚‹ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚ŒãŸãƒªãƒ†ãƒ©ãƒ«ã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚上記ã®2ã¤ã®è¨­å®šã®ã†ã¡å°‘ãªãã¨ã‚‚1ã¤ãŒæœ‰åŠ¹ãªå ´åˆã«ã®ã¿æœ‰åŠ¹ã§ã™ã€‚デフォルト値: 16384(16 KiB)。 + +## mutations_sync {#mutations_sync} + +タイプ: UInt64 + +デフォルト値: 0 + +`ALTER TABLE ... UPDATE|DELETE|MATERIALIZE INDEX|MATERIALIZE PROJECTION|MATERIALIZE COLUMN`クエリ([変異](../../sql-reference/statements/alter/index.md#mutations))をåŒæœŸçš„ã«å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 - 変異ã¯éžåŒæœŸã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +- 1 - クエリã¯ç¾åœ¨ã®ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å…¨ã¦ã®å¤‰ç•°ãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ã¡ã¾ã™ã€‚ +- 2 - クエリã¯å…¨ã¦ã®ãƒ¬ãƒ—リカ(存在ã™ã‚‹å ´åˆï¼‰ã§å…¨ã¦ã®å¤‰ç•°ãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ã¡ã¾ã™ã€‚ + +## mysql_datatypes_support_level {#mysql_datatypes_support_level} + +タイプ: MySQLDataTypesSupport + +デフォルト値: + +MySQLデータ型ãŒãã‚Œã«å¯¾å¿œã™ã‚‹ClickHouseデータ型ã«å¤‰æ›ã•ã‚Œã‚‹æ–¹æ³•ã‚’定義ã—ã¾ã™ã€‚`decimal`ã€`datetime64`ã€`date2Date32`ã¾ãŸã¯`date2String`ã®ã„ãšã‚Œã‹ã®çµ„ã¿åˆã‚ã›ã«ã‚³ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚ŒãŸãƒªã‚¹ãƒˆã€‚ +- `decimal`: 精度ãŒè¨±ã™é™ã‚Šã€`NUMERIC`ãŠã‚ˆã³`DECIMAL`åž‹ã‚’`Decimal`ã«å¤‰æ›ã—ã¾ã™ã€‚ +- `datetime64`: 精度ãŒ`0`ã§ãªã„å ´åˆã€`DATETIME`ãŠã‚ˆã³`TIMESTAMP`åž‹ã‚’`DateTime64`ã«å¤‰æ›ã—ã¾ã™ã€‚ +- `date2Date32`: `DATE`ã‚’`Date32`ã«å¤‰æ›ã—ã¾ã™ï¼ˆ`Date`ã®ä»£ã‚ã‚Šã«ï¼‰ã€‚ã“ã‚Œã¯`date2String`より優先ã•ã‚Œã¾ã™ã€‚ +- `date2String`: `DATE`ã‚’`String`ã«å¤‰æ›ã—ã¾ã™ï¼ˆ`Date`ã®ä»£ã‚ã‚Šã«ï¼‰ã€‚`datetime64`ã«ã‚ˆã£ã¦ä¸Šæ›¸ãã•ã‚Œã¾ã™ã€‚ + +## mysql_map_fixed_string_to_text_in_show_columns {#mysql_map_fixed_string_to_text_in_show_columns} + +タイプ: Bool + +デフォルト値: 1 + +有効ã«ã™ã‚‹ã¨ã€[FixedString](../../sql-reference/data-types/fixedstring.md)ã®ClickHouseデータ型ã¯ã€[SHOW COLUMNS](../../sql-reference/statements/show.md#show_columns)ã§`TEXT`ã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +ã“ã‚Œã¯ã€MySQLワイヤプロトコルを介ã—ã¦æŽ¥ç¶šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã®ã¿æœ‰åŠ¹ã§ã™ã€‚ + +- 0 - `BLOB`を使用。 +- 1 - `TEXT`を使用。 + +## mysql_map_string_to_text_in_show_columns {#mysql_map_string_to_text_in_show_columns} + +タイプ: Bool + +デフォルト値: 1 + +有効ã«ã™ã‚‹ã¨ã€[String](../../sql-reference/data-types/string.md)ã®ClickHouseデータ型ã¯ã€[SHOW COLUMNS](../../sql-reference/statements/show.md#show_columns)ã§`TEXT`ã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +ã“ã‚Œã¯ã€MySQLワイヤプロトコルを介ã—ã¦æŽ¥ç¶šã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã®ã¿æœ‰åŠ¹ã§ã™ã€‚ + +- 0 - `BLOB`を使用。 +- 1 - `TEXT`を使用。 + +## mysql_max_rows_to_insert {#mysql_max_rows_to_insert} + +タイプ: UInt64 + +デフォルト値: 65536 + +MySQLストレージエンジンã®MySQLãƒãƒƒãƒæŒ¿å…¥ã«ãŠã‘る最大行数。 + +## network_compression_method {#network_compression_method} + +タイプ: String + +デフォルト値: LZ4 + +サーãƒãƒ¼é–“ãŠã‚ˆã³ã‚µãƒ¼ãƒãƒ¼ã¨[clickhouse-client](../../interfaces/cli.md)é–“ã®é€šä¿¡ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿åœ§ç¸®æ–¹å¼ã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- `LZ4` — LZ4圧縮方å¼ã‚’設定。 +- `ZSTD` — ZSTD圧縮方å¼ã‚’設定。 + +**詳細情報** + +- [network_zstd_compression_level](#network_zstd_compression_level) + +## network_zstd_compression_level {#network_zstd_compression_level} + +タイプ: Int64 + +デフォルト値: 1 + +ZSTD圧縮ã®ãƒ¬ãƒ™ãƒ«ã‚’調整ã—ã¾ã™ã€‚[network_compression_method](#network_compression_method)ãŒ`ZSTD`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ã¨ãã®ã¿ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1ã‹ã‚‰15ã¾ã§ã®æ­£ã®æ•´æ•°ã€‚ + +## normalize_function_names {#normalize_function_names} + +タイプ: Bool + +デフォルト値: 1 + +関数åã‚’ãã®æ­£è¦åã«æ­£è¦åŒ–ã—ã¾ã™ã€‚ + +## number_of_mutations_to_delay {#number_of_mutations_to_delay} + +タイプ: UInt64 + +デフォルト値: 0 + +変異ã—ãŸãƒ†ãƒ¼ãƒ–ルã«æœªå‡¦ç†ã®å¤‰ç•°ãŒå°‘ãªãã¨ã‚‚ãã®æ•°ã‚ã‚‹å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã®å¤‰ç•°ã‚’人工的ã«é…らã›ã‚‹ã€‚0 - 無効。 + +## number_of_mutations_to_throw {#number_of_mutations_to_throw} + +タイプ: UInt64 + +デフォルト値: 0 + +変異ã—ãŸãƒ†ãƒ¼ãƒ–ルã«æœªå‡¦ç†ã®å¤‰ç•°ãŒå°‘ãªãã¨ã‚‚ãã®æ•°ã‚ã‚‹å ´åˆã€ 'Too many mutations ...' 例外を投ã’る。0 - 無効。 + +## odbc_bridge_connection_pool_size {#odbc_bridge_connection_pool_size} + +タイプ: UInt64 + +デフォルト値: 16 + +ODBCブリッジ内ã®å„接続設定文字列ã®æŽ¥ç¶šãƒ—ールサイズ。 + +## odbc_bridge_use_connection_pooling {#odbc_bridge_use_connection_pooling} + +タイプ: Bool + +デフォルト値: 1 + +ODBCブリッジã§æŽ¥ç¶šãƒ—ールを使用ã—ã¾ã™ã€‚falseã«è¨­å®šã™ã‚‹ã¨ã€æ¯Žå›žæ–°ã—ã„接続ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +## offset {#offset} + +タイプ: UInt64 + +デフォルト値: 0 + +クエリã‹ã‚‰è¿”ã•ã‚Œã‚‹è¡Œã®å‰ã«ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹è¡Œæ•°ã‚’設定ã—ã¾ã™ã€‚[OFFSET](../../sql-reference/statements/select/offset.md/#offset-fetch)å¥ã«ã‚ˆã£ã¦è¨­å®šã•ã‚ŒãŸã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’調整ã—ã€ã“れら2ã¤ã®å€¤ã‚’åˆè¨ˆã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — è¡Œã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã›ã‚“。 +- æ­£ã®æ•´æ•°ã€‚ + +**例** + +入力テーブル: + +``` sql +CREATE TABLE test (i UInt64) ENGINE = MergeTree() ORDER BY i; +INSERT INTO test SELECT number FROM numbers(500); +``` + +クエリ: + +``` sql +SET limit = 5; +SET offset = 7; +SELECT * FROM test LIMIT 10 OFFSET 100; +``` +çµæžœ: + +``` text +┌───i─┠+│ 107 │ +│ 108 │ +│ 109 │ +└─────┘ +``` + +## opentelemetry_start_trace_probability {#opentelemetry_start_trace_probability} + +タイプ: Float + +デフォルト値: 0 + +ClickHouseãŒå®Ÿè¡Œã•ã‚ŒãŸã‚¯ã‚¨ãƒªã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’開始ã§ãる確率を設定ã—ã¾ã™ï¼ˆè¦ª[トレースコンテキスト](https://www.w3.org/TR/trace-context/)ãŒæä¾›ã•ã‚Œã¦ã„ãªã„å ´åˆï¼‰ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 実行ã•ã‚ŒãŸã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã®ãƒˆãƒ¬ãƒ¼ã‚¹ãŒç„¡åŠ¹ã«ãªã‚Šã¾ã™ï¼ˆè¦ªãƒˆãƒ¬ãƒ¼ã‚¹ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãŒæä¾›ã•ã‚Œã¦ã„ãªã„å ´åˆï¼‰ã€‚ +- 0..1ã®ç¯„囲内ã®æ­£ã®æµ®å‹•å°æ•°ç‚¹æ•°ã€‚例ãˆã°ã€è¨­å®šå€¤ãŒ`0.5`ã®å ´åˆã€ClickHouseã¯å¹³å‡ã—ã¦åŠåˆ†ã®ã‚¯ã‚¨ãƒªã§ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’開始ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- 1 — 実行ã•ã‚ŒãŸã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã®ãƒˆãƒ¬ãƒ¼ã‚¹ãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +## opentelemetry_trace_processors {#opentelemetry_trace_processors} + +タイプ: Bool + +デフォルト値: 0 + +プロセッサã®ãŸã‚ã«OpenTelemetryスパンをåŽé›†ã—ã¾ã™ã€‚ + +## optimize_aggregation_in_order {#optimize_aggregation_in_order} + +タイプ: Bool + +デフォルト値: 0 + +MergeTreeテーブルã®ãƒ‡ãƒ¼ã‚¿ã‚’対応ã™ã‚‹é †åºã§é›†ç´„ã™ã‚‹ãŸã‚ã«[SELECT](../../sql-reference/statements/select/index.md)クエリã®`GROUP BY`最é©åŒ–を有効ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — `GROUP BY`最é©åŒ–ã¯ç„¡åŠ¹ã€‚ +- 1 — `GROUP BY`最é©åŒ–ã¯æœ‰åŠ¹ã€‚ + +**詳細情報** + +- [GROUP BY最é©åŒ–](../../sql-reference/statements/select/group-by.md/#aggregation-in-order) + +## optimize_aggregators_of_group_by_keys {#optimize_aggregators_of_group_by_keys} + +タイプ: Bool + +デフォルト値: 1 + +SELECTセクションã§GROUP BYキーã®æœ€å°/最大/any/anyLastアグリゲーターを排除ã—ã¾ã™ã€‚ + +## optimize_append_index {#optimize_append_index} + +タイプ: Bool + +デフォルト値: 0 + +インデックスæ¡ä»¶ã‚’追加ã™ã‚‹ãŸã‚ã«[制約](../../sql-reference/statements/create/table.md#constraints)を使用ã—ã¾ã™ã€‚デフォルトã¯`false`ã§ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- true, false + +## optimize_arithmetic_operations_in_aggregate_functions {#optimize_arithmetic_operations_in_aggregate_functions} + +タイプ: Bool + +デフォルト値: 1 + +集約関数ã®å¤–ã§ç®—術演算を移動ã—ã¾ã™ã€‚ + +## optimize_count_from_files {#optimize_count_from_files} + +タイプ: Bool + +デフォルト値: 1 + +ç•°ãªã‚‹å…¥åŠ›å½¢å¼ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ã®è¡Œæ•°ã®ã‚«ã‚¦ãƒ³ãƒˆã®æœ€é©åŒ–を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ†ãƒ¼ãƒ–ル関数/エンジン`file`/`s3`/`url`/`hdfs`/`azureBlobStorage`ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 最é©åŒ–無効。 +- 1 — 最é©åŒ–有効。 + +## optimize_distinct_in_order {#optimize_distinct_in_order} + +タイプ: Bool + +デフォルト値: 1 + +DISTINCTã®æœ€é©åŒ–を有効ã«ã—ã€DISTINCTã®ä¸€éƒ¨ã®ã‚«ãƒ©ãƒ ãŒã‚½ãƒ¼ãƒˆã®ãƒ—レフィックスを形æˆã™ã‚‹å ´åˆã«é©ç”¨ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ãƒžãƒ¼ã‚¸ãƒ„リーã¾ãŸã¯ORDER BYステートメントã®ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã®ãƒ—レフィックス。 + +## optimize_distributed_group_by_sharding_key {#optimize_distributed_group_by_sharding_key} + +タイプ: Bool + +デフォルト値: 1 + +コストã®ã‹ã‹ã‚‹ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ã‚µãƒ¼ãƒãƒ¼ã§ã®é›†ç´„ã‚’é¿ã‘ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€`GROUP BY sharding_key`クエリを最é©åŒ–ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ã‚µãƒ¼ãƒãƒ¼ã§ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ãŒå‰Šæ¸›ã•ã‚Œã¾ã™ã€‚ +以下ã®ã‚¿ã‚¤ãƒ—ã®ã‚¯ã‚¨ãƒªãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼ˆãã®ã™ã¹ã¦ã®çµ„ã¿åˆã‚ã›ã‚‚å«ã¾ã‚Œã¾ã™ï¼‰ï¼š + +- `SELECT DISTINCT [..., ]sharding_key[, ...] FROM dist` +- `SELECT ... FROM dist GROUP BY sharding_key[, ...]` +- `SELECT ... FROM dist GROUP BY sharding_key[, ...] ORDER BY x` +- `SELECT ... FROM dist GROUP BY sharding_key[, ...] LIMIT 1` +- `SELECT ... FROM dist GROUP BY sharding_key[, ...] LIMIT 1 BY x` + +次ã®ç¨®é¡žã®ã‚¯ã‚¨ãƒªã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“(ã„ãã¤ã‹ã¯å¾Œã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼‰ï¼š + +- `SELECT ... GROUP BY sharding_key[, ...] WITH TOTALS` +- `SELECT ... GROUP BY sharding_key[, ...] WITH ROLLUP` +- `SELECT ... GROUP BY sharding_key[, ...] WITH CUBE` +- `SELECT ... GROUP BY sharding_key[, ...] SETTINGS extremes=1` + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 無効。 +- 1 — 有効。 + +å‚照: + +- [distributed_group_by_no_merge](#distributed-group-by-no-merge) +- [distributed_push_down_limit](#distributed-push-down-limit) +- [optimize_skip_unused_shards](#optimize-skip-unused-shards) + +:::note +ç¾åœ¨ã®ã¨ã“ã‚ã€`optimize_skip_unused_shards`ãŒå¿…è¦ã§ã™ï¼ˆã“ã‚Œã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒåˆ†æ•£ãƒ†ãƒ¼ãƒ–ル経由ã§æŒ¿å…¥ã•ã‚Œã€ãã®ãŸã‚データãŒsharding_keyã«å¾“ã£ã¦åˆ†æ•£ã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã®ã¿æ­£ã—ã動作ã™ã‚‹ã¨ã„ã†ç†ç”±ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚ +::: + +## optimize_functions_to_subcolumns {#optimize_functions_to_subcolumns} + +タイプ: Bool + +デフォルト値: 1 + +サブカラムã®èª­ã¿è¾¼ã¿ã«å¤‰æ›ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦æœ€é©åŒ–を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€èª­ã¿è¾¼ã‚€ãƒ‡ãƒ¼ã‚¿ã®é‡ãŒæ¸›ã‚Šã¾ã™ã€‚ + +ã“れらã®é–¢æ•°ã¯å¤‰æ›å¯èƒ½ã§ã™ï¼š + +- [length](../../sql-reference/functions/array-functions.md/#array_functions-length)ã‚’[サイズ0](../../sql-reference/data-types/array.md/#array-size)サブカラムを読ã¿è¾¼ã‚€ãŸã‚ã«ä½¿ç”¨ã€‚ +- [empty](../../sql-reference/functions/array-functions.md/#function-empty)ã‚’[サイズ0](../../sql-reference/data-types/array.md/#array-size)サブカラムを読ã¿è¾¼ã‚€ãŸã‚ã«ä½¿ç”¨ã€‚ +- [notEmpty](../../sql-reference/functions/array-functions.md/#function-notempty)ã‚’[サイズ0](../../sql-reference/data-types/array.md/#array-size)サブカラムを読ã¿è¾¼ã‚€ãŸã‚ã«ä½¿ç”¨ã€‚ +- [isNull](../../sql-reference/operators/index.md#operator-is-null)ã‚’[nullable](../../sql-reference/data-types/nullable.md/#finding-null)サブカラムを読ã¿è¾¼ã‚€ãŸã‚ã«ä½¿ç”¨ã€‚ +- [isNotNull](../../sql-reference/operators/index.md#is-not-null)ã‚’[nullable](../../sql-reference/data-types/nullable.md/#finding-null)サブカラムを読ã¿è¾¼ã‚€ãŸã‚ã«ä½¿ç”¨ã€‚ +- [count](../../sql-reference/aggregate-functions/reference/count.md)ã‚’[nullable](../../sql-reference/data-types/nullable.md/#finding-null)サブカラムを読ã¿è¾¼ã‚€ãŸã‚ã«ä½¿ç”¨ã€‚ +- [mapKeys](../../sql-reference/functions/tuple-map-functions.md/#mapkeys)ã‚’[keys](../../sql-reference/data-types/map.md/#map-subcolumns)サブカラムを読ã¿è¾¼ã‚€ãŸã‚ã«ä½¿ç”¨ã€‚ +- [mapValues](../../sql-reference/functions/tuple-map-functions.md/#mapvalues)ã‚’[values](../../sql-reference/data-types/map.md/#map-subcolumns)サブカラムを読ã¿è¾¼ã‚€ãŸã‚ã«ä½¿ç”¨ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 最é©åŒ–無効。 +- 1 — 最é©åŒ–有効。 + +## optimize_group_by_constant_keys {#optimize_group_by_constant_keys} + +タイプ: Bool + +デフォルト値: 1 + +ã™ã¹ã¦ã®ã‚­ãƒ¼ãŒå®šæ•°ã§ã‚ã‚‹å ´åˆã®GROUP BYを最é©åŒ–ã—ã¾ã™ã€‚ + +## optimize_group_by_function_keys {#optimize_group_by_function_keys} + +タイプ: Bool + +デフォルト値: 1 + +GROUP BYセクションã®ä»–ã®ã‚­ãƒ¼ã®é–¢æ•°ã‚’排除ã—ã¾ã™ã€‚ + +## optimize_if_chain_to_multiif {#optimize_if_chain_to_multiif} + +タイプ: Bool + +デフォルト値: 0 + +if(cond1, then1, if(cond2, ...))ã®ãƒã‚§ãƒ¼ãƒ³ã‚’multiIfã«ç½®ãæ›ãˆã¾ã™ã€‚ç¾åœ¨ã€æ•°å€¤åž‹ã«ã¯æœ‰ç›Šã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## optimize_if_transform_strings_to_enum {#optimize_if_transform_strings_to_enum} + +タイプ: Bool + +デフォルト値: 0 + +IfãŠã‚ˆã³Transformã®æ–‡å­—列型引数をenumã«ç½®ãæ›ãˆã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ã“ã‚Œã¯ã€åˆ†æ•£ã‚¯ã‚¨ãƒªã«çŸ›ç›¾ã—ãŸå¤‰æ›´ã‚’ã‚‚ãŸã‚‰ã—ã€ãã‚ŒãŒå¤±æ•—ã«ã¤ãªãŒã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ + +## optimize_injective_functions_in_group_by {#optimize_injective_functions_in_group_by} + +タイプ: Bool + +デフォルト値: 1 + +GROUP BYセクションã§å¼•æ•°ã«ã‚ˆã£ã¦å°„影関数を置ãæ›ãˆã¾ã™ã€‚ + +## optimize_injective_functions_inside_uniq {#optimize_injective_functions_inside_uniq} + +タイプ: Bool + +デフォルト値: 1 + +uniq*()関数内ã®å˜ä¸€å¼•æ•°ã®å°„影関数を削除ã—ã¾ã™ã€‚ + +## optimize_min_equality_disjunction_chain_length {#optimize_min_equality_disjunction_chain_length} + +タイプ: UInt64 + +デフォルト値: 3 + +最é©åŒ–ã®ãŸã‚ã®å¼`expr = x1 OR ... expr = xN`ã®æœ€å°é•·ã•ã€‚ + +## optimize_min_inequality_conjunction_chain_length {#optimize_min_inequality_conjunction_chain_length} + +タイプ: UInt64 + +デフォルト値: 3 + +最é©åŒ–ã®ãŸã‚ã®å¼`expr <> x1 AND ... expr <> xN`ã®æœ€å°é•·ã•ã€‚ + +## optimize_move_to_prewhere {#optimize_move_to_prewhere} + +タイプ: Bool + +デフォルト値: 1 + +[SELECT](../../sql-reference/statements/select/index.md)クエリã§ã®è‡ªå‹•[PREFIX](../../sql-reference/statements/select/prewhere.md)最é©åŒ–を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +ã“ã‚Œã¯[*MergeTree](../../engines/table-engines/mergetree-family/index.md)テーブルã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 自動`PREWHERE`最é©åŒ–無効。 +- 1 — 自動`PREWHERE`最é©åŒ–有効。 + +## optimize_move_to_prewhere_if_final {#optimize_move_to_prewhere_if_final} + +タイプ: Bool + +デフォルト値: 0 + +[FINAL](../../sql-reference/statements/select/from.md#select-from-final)修飾å­ã‚’æŒã¤[SELECT](../../sql-reference/statements/select/index.md)クエリã«ãŠã‘る自動[PREFIX](../../sql-reference/statements/select/prewhere.md)最é©åŒ–を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +ã“ã‚Œã¯[*MergeTree](../../engines/table-engines/mergetree-family/index.md)テーブルã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — `FINAL`修飾å­ã®ã‚ã‚‹`SELECT`クエリã§ã®è‡ªå‹•`PREWHERE`最é©åŒ–無効。 +- 1 — `FINAL`修飾å­ã®ã‚ã‚‹`SELECT`クエリã§ã®è‡ªå‹•`PREWHERE`最é©åŒ–有効。 + +**å‚ç…§** + +- [optimize_move_to_prewhere](#optimize_move_to_prewhere)設定 + +## optimize_multiif_to_if {#optimize_multiif_to_if} + +タイプ: Bool + +デフォルト値: 1 + +`multiIf`ã®æ¡ä»¶ã‚’1ã¤ã«ç½®ãæ›ãˆã¾ã™ã€‚ + +## optimize_normalize_count_variants {#optimize_normalize_count_variants} + +タイプ: Bool + +デフォルト値: 1 + +semantically equal count()ã¨ã—ã¦é›†è¨ˆé–¢æ•°ã‚’å†è¨˜è¿°ã—ã¾ã™ã€‚ + +## optimize_on_insert {#optimize_on_insert} + +タイプ: Bool + +デフォルト値: 1 + +挿入ã®å‰ã«ãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ†ãƒ¼ãƒ–ルエンジンã«å¾“ã£ã¦ï¼ˆãƒžãƒ¼ã‚¸ãŒã“ã®ãƒ–ロックã§å®Ÿè¡Œã•ã‚ŒãŸã‹ã®ã‚ˆã†ã«ï¼‰è¡Œã‚ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 無効。 +- 1 — 有効。 + +**例** + +有効ã¨ç„¡åŠ¹ã®é•ã„: + +クエリ: + +```sql +SET optimize_on_insert = 1; + +CREATE TABLE test1 (`FirstTable` UInt32) ENGINE = ReplacingMergeTree ORDER BY FirstTable; + +INSERT INTO test1 SELECT number % 2 FROM numbers(5); + +SELECT * FROM test1; + +SET optimize_on_insert = 0; + +CREATE TABLE test2 (`SecondTable` UInt32) ENGINE = ReplacingMergeTree ORDER BY SecondTable; + +INSERT INTO test2 SELECT number % 2 FROM numbers(5); + +SELECT * FROM test2; +``` + +çµæžœï¼š + +``` text +┌─FirstTable─┠+│ 0 │ +│ 1 │ +└────────────┘ + +┌─SecondTable─┠+│ 0 │ +│ 0 │ +│ 0 │ +│ 1 │ +│ 1 │ +└─────────────┘ +``` + +ã“ã®è¨­å®šã¯[Materialized view](../../sql-reference/statements/create/view.md/#materialized)ã‚„[MaterializedMySQL](../../engines/database-engines/materialized-mysql.md)ã®å‹•ä½œã«å½±éŸ¿ã‚’与ãˆã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +## optimize_or_like_chain {#optimize_or_like_chain} + +タイプ: Bool + +デフォルト値: 0 + +複数ã®OR LIKEã‚’multiMatchAnyã«æœ€é©åŒ–ã—ã¾ã™ã€‚ã“ã®æœ€é©åŒ–ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ç„¡åŠ¹ã«ã™ã¹ãã§ã™ã€‚ãªãœãªã‚‰ã€å ´åˆã«ã‚ˆã£ã¦ã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹åˆ†æžã‚’無効ã«ã™ã‚‹ãŸã‚ã§ã™ã€‚ + +## optimize_read_in_order {#optimize_read_in_order} + +タイプ: Bool + +デフォルト値: 1 + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md)テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã®[ORDER BY](../../sql-reference/statements/select/order-by.md/#optimize_read_in_order)最é©åŒ–を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — `ORDER BY`最é©åŒ–無効。 +- 1 — `ORDER BY`最é©åŒ–有効。 + +**å‚ç…§** + +- [ORDER BYå¥](../../sql-reference/statements/select/order-by.md/#optimize_read_in_order) + +## optimize_read_in_window_order {#optimize_read_in_window_order} + +タイプ: Bool + +デフォルト値: 1 + +MergeTreeテーブルã§ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å¥ã«ãŠã‘ã‚‹ORDER BY最é©åŒ–を有効ã«ã—ã¾ã™ã€‚ + +## optimize_redundant_functions_in_order_by {#optimize_redundant_functions_in_order_by} + +タイプ: Bool + +デフォルト値: 1 + +ORDER BY内ã®å¼•æ•°ãŒORDER BYã«å«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ORDER BYã‹ã‚‰é–¢æ•°ã‚’削除ã—ã¾ã™ã€‚ + +## optimize_respect_aliases {#optimize_respect_aliases} + +タイプ: Bool + +デフォルト値: 1 + +ã“ã®è¨­å®šãŒtrueã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€WHERE/GROUP BY/ORDER BY内ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’å°Šé‡ã—ã€ãƒ‘ーティションプルーニング/セカンダリインデックス/optimize_aggregation_in_order/optimize_read_in_order/optimize_trivial_countã§åŠ©ã‘ã«ãªã‚Šã¾ã™ã€‚ + +## optimize_rewrite_aggregate_function_with_if {#optimize_rewrite_aggregate_function_with_if} + +タイプ: Bool + +デフォルト値: 1 + +è«–ç†çš„ã«ç­‰ã—ã„å ´åˆã€ifå¼ã‚’引数ã¨ã™ã‚‹é›†è¨ˆé–¢æ•°ã‚’å†è¨˜è¿°ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€`avg(if(cond, col, null))`ã¯`avgOrNullIf(cond, col)`ã«å†è¨˜è¿°ã§ãã¾ã™ã€‚性能を改善ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯åˆ†æžå™¨ï¼ˆ`enable_analyzer = 1`)ã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ +::: + +## optimize_rewrite_array_exists_to_has {#optimize_rewrite_array_exists_to_has} + +タイプ: Bool + +デフォルト値: 0 + +è«–ç†çš„ã«ç­‰ã—ã„å ´åˆã€arrayExists()関数をhas()ã«å†è¨˜è¿°ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€arrayExists(x -> x = 1, arr)ã¯has(arr, 1)ã«å†è¨˜è¿°ã§ãã¾ã™ã€‚ + +## optimize_rewrite_sum_if_to_count_if {#optimize_rewrite_sum_if_to_count_if} + +タイプ: Bool + +デフォルト値: 1 + +è«–ç†çš„ã«ç­‰ã—ã„å ´åˆã€sumIf()ãŠã‚ˆã³sum(if())関数をcountIf()関数ã«å†è¨˜è¿°ã—ã¾ã™ã€‚ + +## optimize_skip_merged_partitions {#optimize_skip_merged_partitions} + +タイプ: Bool + +デフォルト値: 0 + +一ã¤ã®ãƒ‘ーティションã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツãŒ1ã¤ã ã‘ã‚ã‚Šã€æœŸé™åˆ‡ã‚Œã®TTLãŒãªã„å ´åˆã«ã€[OPTIMIZE TABLE ... FINAL](../../sql-reference/statements/optimize.md)クエリã®ãŸã‚ã®æœ€é©åŒ–を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +- `OPTIMIZE TABLE ... FINAL SETTINGS optimize_skip_merged_partitions=1` + +デフォルトã§ã¯ã€`OPTIMIZE TABLE ... FINAL`クエリã¯ã€å˜ä¸€ã®éƒ¨åˆ†ãŒã‚ã£ã¦ã‚‚書ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 1 - 最é©åŒ–有効。 +- 0 - 最é©åŒ–無効。 + +## optimize_skip_unused_shards {#optimize_skip_unused_shards} + +タイプ: Bool + +デフォルト値: 0 + +`WHERE/PREWHERE`ã®æ¡ä»¶ã«sharding keyãŒå«ã¾ã‚Œã¦ã„ã‚‹[SELECT](../../sql-reference/statements/select/index.md)クエリã«å¯¾ã—ã¦æœªä½¿ç”¨ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®ã‚¹ã‚­ãƒƒãƒ—を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ï¼ˆãƒ‡ãƒ¼ã‚¿ãŒsharding keyã«ã‚ˆã£ã¦åˆ†æ•£ã•ã‚Œã¦ã„ã‚‹ã¨ä»®å®šï¼‰ã€‚ã•ã‚‚ãªã‘ã‚Œã°ã€ã‚¯ã‚¨ãƒªã¯ä¸æ­£ç¢ºãªçµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 無効。 +- 1 — 有効。 + +## optimize_skip_unused_shards_limit {#optimize_skip_unused_shards_limit} + +タイプ: UInt64 + +デフォルト値: 1000 + +sharding key値ã®åˆ¶é™ã§ã€åˆ¶é™ã«é”ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦`optimize_skip_unused_shards`をオフã«ã—ã¾ã™ã€‚ + +ã‚ã¾ã‚Šã«ã‚‚多ãã®å€¤ãŒã‚ã‚‹ã¨å‡¦ç†ã«å¤šå¤§ãªæ™‚é–“ãŒã‹ã‹ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€åˆ©ç›Šã¯ç–‘ã‚ã—ã„ã§ã™ã€‚ãªãœãªã‚‰ã€`IN (...)`内ã«å¤§é‡ã®å€¤ãŒã‚ã‚‹å ´åˆã€ã»ã¨ã‚“ã©ã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯ã™ã¹ã¦ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã«é€ä¿¡ã•ã‚Œã‚‹ãŸã‚ã§ã™ã€‚ + +## optimize_skip_unused_shards_nesting {#optimize_skip_unused_shards_nesting} + +タイプ: UInt64 + +デフォルト値: 0 + +分散クエリã®ãƒã‚¹ãƒˆãƒ¬ãƒ™ãƒ«ã«å¿œã˜ã¦[`optimize_skip_unused_shards`](#optimize-skip-unused-shards)を制御ã—ã¾ã™ï¼ˆãŸã¨ãˆã°ã€åˆ¥ã®`Distributed`テーブルをå‚ç…§ã™ã‚‹`Distributed`テーブルãŒã‚ã‚‹å ´åˆï¼‰ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 無効ã€`optimize_skip_unused_shards`ã¯å¸¸ã«å‹•ä½œã—ã¾ã™ã€‚ +- 1 — 最åˆã®ãƒ¬ãƒ™ãƒ«ã«å¯¾ã—ã¦ã®ã¿`optimize_skip_unused_shards`を有効ã«ã—ã¾ã™ã€‚ +- 2 — 2番目ã®ãƒ¬ãƒ™ãƒ«ã¾ã§`optimize_skip_unused_shards`を有効ã«ã—ã¾ã™ã€‚ + +## optimize_skip_unused_shards_rewrite_in {#optimize_skip_unused_shards_rewrite_in} + +タイプ: Bool + +デフォルト値: 1 + +リモートシャードã®ã‚¯ã‚¨ãƒªå†…ã®INã‚’å†è¨˜è¿°ã—ã€ã‚·ãƒ£ãƒ¼ãƒ‰ã«å±žã•ãªã„値を除外ã—ã¾ã™ï¼ˆ`optimize_skip_unused_shards`ãŒå¿…è¦ã§ã™ï¼‰ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 無効。 +- 1 — 有効。 + +## optimize_sorting_by_input_stream_properties {#optimize_sorting_by_input_stream_properties} + +タイプ: Bool + +デフォルト値: 1 + +入力ストリームã®ãƒ—ロパティã«ã‚ˆã‚‹ã‚½ãƒ¼ãƒˆã‚’最é©åŒ–ã—ã¾ã™ã€‚ + +## optimize_substitute_columns {#optimize_substitute_columns} + +タイプ: Bool + +デフォルト値: 0 + +[制約](../../sql-reference/statements/create/table.md#constraints)を使用ã—ã¦ã‚«ãƒ©ãƒ ã®ä»£æ›¿ã‚’è¡Œã„ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- true, false + +## optimize_syntax_fuse_functions {#optimize_syntax_fuse_functions} + +タイプ: Bool + +デフォルト値: 0 + +åŒä¸€å¼•æ•°ã‚’æŒã¤é›†è¨ˆé–¢æ•°ã‚’èžåˆã•ã›ã¾ã™ã€‚ã“ã‚Œã¯ã€`sum`ã€`count`ã€ã¾ãŸã¯`avg`ã®åŒä¸€å¼•æ•°ã‚’æŒã¤å°‘ãªãã¨ã‚‚2ã¤ã®é›†è¨ˆé–¢æ•°ã‚’`sumCount`ã«æ›¸ãæ›ãˆã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — åŒä¸€å¼•æ•°ã‚’æŒã¤é–¢æ•°ã¯èžåˆã•ã‚Œãªã„。 +- 1 — åŒä¸€å¼•æ•°ã‚’æŒã¤é–¢æ•°ã¯èžåˆã•ã‚Œã‚‹ã€‚ + +**例** + +クエリ: + +``` sql +CREATE TABLE fuse_tbl(a Int8, b Int8) Engine = Log; +SET optimize_syntax_fuse_functions = 1; +EXPLAIN SYNTAX SELECT sum(a), sum(b), count(b), avg(b) from fuse_tbl FORMAT TSV; +``` + +çµæžœï¼š + +``` text +SELECT + sum(a), + sumCount(b).1, + sumCount(b).2, + (sumCount(b).1) / (sumCount(b).2) +FROM fuse_tbl +``` + +## optimize_throw_if_noop {#optimize_throw_if_noop} + +タイプ: Bool + +デフォルト値: 0 + +マージを実行ã—ãªã‹ã£ãŸå ´åˆã€[OPTIMIZE](../../sql-reference/statements/optimize.md)クエリãŒä¾‹å¤–をスローã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€`OPTIMIZE`ã¯ä½•ã‚‚è¡Œã‚ãªã‹ã£ãŸå ´åˆã§ã‚‚正常ã«æˆ»ã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã‚’使用ã™ã‚‹ã¨ã€ã“れらã®çŠ¶æ³ã‚’区別ã—ã€ä¾‹å¤–メッセージã§ç†ç”±ã‚’å–å¾—ã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 1 — 例外をスローã™ã‚‹ã“ã¨ã‚’有効ã«ã—ã¾ã™ã€‚ +- 0 — 例外をスローã™ã‚‹ã“ã¨ã‚’無効ã«ã—ã¾ã™ã€‚ + +## optimize_time_filter_with_preimage {#optimize_time_filter_with_preimage} + +タイプ: Bool + +デフォルト値: 1 + +変æ›ãªã—ã§é–¢æ•°ã‚’åŒç­‰ã®æ¯”較ã«å¤‰æ›ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€æ—¥ä»˜ãŠã‚ˆã³æ—¥æ™‚ã®è¿°èªžã‚’最é©åŒ–ã—ã¾ã™ï¼ˆä¾‹ï¼štoYear(col) = 2023 -> col >= '2023-01-01' AND col <= '2023-12-31')。 + +## optimize_trivial_approximate_count_query {#optimize_trivial_approximate_count_query} + +タイプ: Bool + +デフォルト値: 0 + +ã“ã®æœ€é©åŒ–をサãƒãƒ¼ãƒˆã™ã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ãƒˆãƒªãƒ“アルカウントã®è¿‘似値を使用ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€EmbeddedRocksDB。 + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 最é©åŒ–無効。 +- 1 — 最é©åŒ–有効。 + +## optimize_trivial_count_query {#optimize_trivial_count_query} + +タイプ: Bool + +デフォルト値: 1 + +MergeTreeã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’使用ã—ã¦ã€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰`SELECT count()`ã®ãƒˆãƒªãƒ“アルクエリã®æœ€é©åŒ–を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚行レベルã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ã“ã®è¨­å®šã‚’無効ã«ã—ã¦ãã ã•ã„。 + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 最é©åŒ–無効。 +- 1 — 最é©åŒ–有効。 + +å‚照: + +- [optimize_functions_to_subcolumns](#optimize-functions-to-subcolumns) + +## optimize_trivial_insert_select {#optimize_trivial_insert_select} + +タイプ: Bool + +デフォルト値: 0 + +トリビアルãª'INSERT INTO table SELECT ... FROM TABLES'クエリを最é©åŒ–ã—ã¾ã™ã€‚ + +## optimize_uniq_to_count {#optimize_uniq_to_count} + +タイプ: Bool + +デフォルト値: 1 + +uniqãŠã‚ˆã³ãã®ãƒãƒªã‚¢ãƒ³ãƒˆï¼ˆuniqUpToを除ã)をã€ã‚µãƒ–クエリã«distinctã¾ãŸã¯group byå¥ãŒã‚ã‚‹å ´åˆã«countã«æ›¸ãæ›ãˆã¾ã™ã€‚ + +## optimize_use_implicit_projections {#optimize_use_implicit_projections} + +タイプ: Bool + +デフォルト値: 1 + +SELECTクエリを実行ã™ã‚‹ãŸã‚ã«æš—é»™ã®æŠ•å½±ã‚’自動的ã«é¸æŠžã—ã¾ã™ã€‚ + +## optimize_use_projections {#optimize_use_projections} + +タイプ: Bool + +デフォルト値: 1 + +`SELECT`クエリを処ç†ã™ã‚‹éš›ã®[プロジェクション](../../engines/table-engines/mergetree-family/mergetree.md/#projections)最é©åŒ–を有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — プロジェクション最é©åŒ–無効。 +- 1 — プロジェクション最é©åŒ–有効。 + +## optimize_using_constraints {#optimize_using_constraints} + +タイプ: Bool + +デフォルト値: 0 + +クエリ最é©åŒ–ã®ãŸã‚ã«[制約](../../sql-reference/statements/create/table.md#constraints)を使用ã—ã¾ã™ã€‚デフォルトã§ã¯`false`ã§ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- true, false + +## os_thread_priority {#os_thread_priority} + +タイプ: Int64 + +デフォルト値: 0 + +クエリを実行ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®å„ªå…ˆåº¦ï¼ˆ[nice](https://en.wikipedia.org/wiki/Nice_(Unix)))を設定ã—ã¾ã™ã€‚OSスケジューラーã¯ã€ã“ã®å„ªå…ˆåº¦ã‚’考慮ã—ã¦ã€å„利用å¯èƒ½ãªCPUコアã§æ¬¡ã«å®Ÿè¡Œã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚ + +:::note +ã“ã®è¨­å®šã‚’使用ã™ã‚‹ã«ã¯ã€`CAP_SYS_NICE` ã®èƒ½åŠ›ã‚’設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`clickhouse-server`パッケージã¯ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ä¸­ã«ã“れを設定ã—ã¾ã™ã€‚一部ã®ä»®æƒ³ç’°å¢ƒã§ã¯ã€`CAP_SYS_NICE`ã®è¨­å®šãŒè¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。ã“ã®å ´åˆã€`clickhouse-server`ã¯èµ·å‹•æ™‚ã«ãã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã—ã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 値ã¯`[-20, 19]`ã®ç¯„囲ã§è¨­å®šã§ãã¾ã™ã€‚ + +値ãŒä½Žã„ã»ã©ã€å„ªå…ˆåº¦ãŒé«˜ããªã‚Šã¾ã™ã€‚優先度ã®ä½Žã„`nice`ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã¯ã€å„ªå…ˆåº¦ã®é«˜ã„スレッドよりも頻ç¹ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚高ã„値ã¯ã€é•·æœŸé–“実行ã•ã‚Œã‚‹éžå¯¾è©±åž‹ã‚¯ã‚¨ãƒªã«å¥½ã¾ã—ã„ã§ã™ã€‚ãªãœãªã‚‰ã€ã“ã‚Œã«ã‚ˆã‚Šã€çŸ­æœŸé–“ã®å¯¾è©±åž‹ã‚¯ã‚¨ãƒªãŒåˆ°ç€ã—ãŸã¨ãã«ã€ãƒªã‚½ãƒ¼ã‚¹ã‚’ã™ã°ã‚„ã譲渡ã§ãã‚‹ã‹ã‚‰ã§ã™ã€‚ + +## output_format_compression_level {#output_format_compression_level} + +タイプ: UInt64 + +デフォルト値: 3 + +クエリ出力ãŒåœ§ç¸®ã•ã‚Œã¦ã„ã‚‹å ´åˆã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã€‚ã“ã®è¨­å®šã¯ã€`SELECT`クエリãŒ`INTO OUTFILE`ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€ã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ル関数`file`ã€`url`ã€`hdfs`ã€`s3`ã€ã¾ãŸã¯`azureBlobStorage`ã«æ›¸ã込む場åˆã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š1ã‹ã‚‰22ã¾ã§ã€‚ + +## output_format_compression_zstd_window_log {#output_format_compression_zstd_window_log} + +タイプ: UInt64 + +デフォルト値: 0 + +出力圧縮メソッドãŒ`zstd`ã®å ´åˆã«ä½¿ç”¨ã§ãã¾ã™ã€‚0より大ãã„å ´åˆã€ã“ã®è¨­å®šã¯åœ§ç¸®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ã‚µã‚¤ã‚ºï¼ˆ2ã®å†ªï¼‰ã‚’明示的ã«è¨­å®šã—ã€zstd圧縮ã®ãƒ­ãƒ³ã‚°ãƒ¬ãƒ³ã‚¸ãƒ¢ãƒ¼ãƒ‰ã‚’有効ã«ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€åœ§ç¸®çŽ‡ãŒå‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼šéžè² ã®æ•°ã€‚ãŸã ã—ã€å€¤ãŒå°ã•ã™ãŽã‚‹ã‹å¤§ãã™ãŽã‚‹ã¨ã€`zstdlib`ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚典型的ãªå€¤ã¯`20`(ウィンドウサイズ=`1MB`)ã‹ã‚‰`30`(ウィンドウサイズ=`1GB`)ã¾ã§ã§ã™ã€‚ + +## output_format_parallel_formatting {#output_format_parallel_formatting} + +タイプ: Bool + +デフォルト値: 1 + +データフォーマットã®ä¸¦åˆ—フォーマットを有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã‚‹ã®ã¯ã€[TSV](../../interfaces/formats.md/#tabseparated)ã€[TSKV](../../interfaces/formats.md/#tskv)ã€[CSV](../../interfaces/formats.md/#csv)ãŠã‚ˆã³[JSONEachRow](../../interfaces/formats.md/#jsoneachrow)フォーマットã®ã¿ã§ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 1 — 有効。 +- 0 — 無効。 + +## page_cache_inject_eviction {#page_cache_inject_eviction} + +タイプ: Bool + +デフォルト値: 0 + +ユーザースペースã®ãƒšãƒ¼ã‚¸ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ã€ãƒ©ãƒ³ãƒ€ãƒ ã«ã„ãã¤ã‹ã®ãƒšãƒ¼ã‚¸ã‚’無効ã«ã™ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚テスト用ã§ã™ã€‚ + +## parallel_distributed_insert_select {#parallel_distributed_insert_select} + +タイプ: UInt64 + +デフォルト値: 0 + +並列分散`INSERT ... SELECT`クエリを有効ã«ã—ã¾ã™ã€‚ + +`INSERT INTO distributed_table_a SELECT ... FROM distributed_table_b`クエリを実行ã—ãŸå ´åˆã€ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ã‚¯ãƒ©ã‚¹ã‚¿ã‚’使用ã—ã€ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ルãŒ[レプリケートã•ã‚ŒãŸ](../../engines/table-engines/mergetree-family/replication.md)ã¾ãŸã¯éžãƒ¬ãƒ—リケートã§ã‚ã‚‹å ´åˆã€ã“ã®ã‚¯ã‚¨ãƒªã¯å„シャードã§ãƒ­ãƒ¼ã‚«ãƒ«ã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 無効。 +- 1 — `SELECT`ãŒåˆ†æ•£ã‚¨ãƒ³ã‚¸ãƒ³ã®åŸºã«ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã®å„シャードã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +- 2 — `SELECT`ãŠã‚ˆã³`INSERT`ãŒåˆ†æ•£ã‚¨ãƒ³ã‚¸ãƒ³ã®åŸºã«ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã®å„シャードã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +## parallel_replica_offset {#parallel_replica_offset} + +タイプ: UInt64 + +デフォルト値: 0 + +ã“ã‚Œã¯å†…部設定ã§ã‚ã‚Šã€ç›´æŽ¥ä½¿ç”¨ã™ã¹ãã§ã¯ãªãã€'parallel replicas'モードã®å®Ÿè£…ã®è©³ç´°ã‚’表ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€ä¸¦åˆ—レプリカã®ä¸­ã§ã‚¯ã‚¨ãƒªå‡¦ç†ã«å‚加ã—ã¦ã„るレプリカã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’示ã™ãŸã‚ã«ã€åˆ†æ•£ã‚¯ã‚¨ãƒªã®ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ + +## parallel_replicas_allow_in_with_subquery {#parallel_replicas_allow_in_with_subquery} + +タイプ: Bool + +デフォルト値: 1 + +trueã®å ´åˆã€INã®ã‚µãƒ–クエリã¯ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ­ãƒ¯ãƒ¼ãƒ¬ãƒ—リカã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +## parallel_replicas_count {#parallel_replicas_count} + +タイプ: UInt64 + +デフォルト値: 0 + +ã“ã‚Œã¯å†…部設定ã§ã‚ã‚Šã€ç›´æŽ¥ä½¿ç”¨ã™ã¹ãã§ã¯ãªãã€'parallel replicas'モードã®å®Ÿè£…ã®è©³ç´°ã‚’表ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€åˆ†æ•£ã‚¯ã‚¨ãƒªã®ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ã€ã‚¯ã‚¨ãƒªå‡¦ç†ã«å‚加ã™ã‚‹ä¸¦åˆ—レプリカã®æ•°ã‚’自動的ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ + +## parallel_replicas_custom_key {#parallel_replicas_custom_key} + +タイプ: String + +デフォルト値: + +特定ã®ãƒ†ãƒ¼ãƒ–ル間ã§ãƒ¬ãƒ—リカ間ã®ä½œæ¥­ã‚’分割ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã‚‹ä»»æ„ã®æ•´æ•°å¼ã€‚ +値ã¯ä»»æ„ã®æ•´æ•°å¼ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +主キーを使用ã—ãŸå˜ç´”ãªå¼ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +ã“ã®è¨­å®šãŒã€è¤‡æ•°ã®ãƒ¬ãƒ—リカをæŒã¤å˜ä¸€ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã§æ§‹æˆã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“れらã®ãƒ¬ãƒ—リカã¯ä»®æƒ³ã‚·ãƒ£ãƒ¼ãƒ‰ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ +ãã†ã§ãªã‘ã‚Œã°ã€ãã‚Œã¯`SAMPLE`キーã¨åŒã˜ã‚ˆã†ã«å‹•ä½œã—ã€å„シャードã®è¤‡æ•°ã®ãƒ¬ãƒ—リカを使用ã—ã¾ã™ã€‚ + +## parallel_replicas_custom_key_range_lower {#parallel_replicas_custom_key_range_lower} + +タイプ: UInt64 + +デフォルト値: 0 + +フィルタータイプ`range`ãŒã‚«ã‚¹ã‚¿ãƒ ç¯„囲`[parallel_replicas_custom_key_range_lower, INT_MAX]`ã«åŸºã¥ã„ã¦ãƒ¬ãƒ—リカ間ã§ä½œæ¥­ã‚’å‡ç­‰ã«åˆ†å‰²ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +[parallel_replicas_custom_key_range_upper](#parallel_replicas_custom_key_range_upper)ã¨ä½µç”¨ã™ã‚‹ã“ã¨ã§ã€ã‚«ã‚¹ã‚¿ãƒ ã‚­ãƒ¼ç¯„囲ã«åŸºã¥ã„ã¦ãƒ¬ãƒ—リカ間ã§ä½œæ¥­ã‚’å‡ç­‰ã«åˆ†å‰²ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +注æ„:ã“ã®è¨­å®šã¯ã€ã‚¯ã‚¨ãƒªå‡¦ç†ä¸­ã«è¿½åŠ ã®ãƒ‡ãƒ¼ã‚¿ãŒãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã‚‹ã“ã¨ã¯ãªãã€ä¸¦åˆ—処ç†ã®ãŸã‚ã«ç¯„囲`[0, INT_MAX]`ãŒåˆ†å‰²ã•ã‚Œã‚‹ãƒã‚¤ãƒ³ãƒˆã‚’変更ã—ã¾ã™ã€‚ + +## parallel_replicas_custom_key_range_upper {#parallel_replicas_custom_key_range_upper} + +タイプ: UInt64 + +デフォルト値: 0 + +フィルタータイプ`range`ãŒã‚«ã‚¹ã‚¿ãƒ ç¯„囲`[0, parallel_replicas_custom_key_range_upper]`ã«åŸºã¥ã„ã¦ãƒ¬ãƒ—リカ間ã§ä½œæ¥­ã‚’å‡ç­‰ã«åˆ†å‰²ã§ãるよã†ã«ã—ã¾ã™ã€‚0ã®å€¤ã¯ä¸Šé™ã‚’無効ã«ã—ã€ã‚«ã‚¹ã‚¿ãƒ ã‚­ãƒ¼å¼ã®æœ€å¤§å€¤ã‚’設定ã—ã¾ã™ã€‚ + +[parallel_replicas_custom_key_range_lower](#parallel_replicas_custom_key_range_lower)ã¨ä½µç”¨ã™ã‚‹ã“ã¨ã§ã€ã‚«ã‚¹ã‚¿ãƒ ã‚­ãƒ¼ç¯„囲`[parallel_replicas_custom_key_range_lower, parallel_replicas_custom_key_range_upper]`ã§ãƒ¬ãƒ—リカ間ã§ä½œæ¥­ã‚’å‡ç­‰ã«åˆ†å‰²ã§ãã¾ã™ã€‚ + +注æ„:ã“ã®è¨­å®šã¯ã€ã‚¯ã‚¨ãƒªå‡¦ç†ä¸­ã«è¿½åŠ ã®ãƒ‡ãƒ¼ã‚¿ãŒãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã‚‹ã“ã¨ã¯ãªãã€ä¸¦åˆ—処ç†ã®ãŸã‚ã«ç¯„囲`[0, INT_MAX]`ãŒåˆ†å‰²ã•ã‚Œã‚‹ãƒã‚¤ãƒ³ãƒˆã‚’変更ã—ã¾ã™ã€‚ + +## parallel_replicas_for_non_replicated_merge_tree {#parallel_replicas_for_non_replicated_merge_tree} + +タイプ: Bool + +デフォルト値: 0 + +trueã®å ´åˆã€ClickHouseã¯éžãƒ¬ãƒ—リケートã®MergeTreeテーブルã«ã‚‚並列レプリカアルゴリズムを使用ã—ã¾ã™ã€‚ + +## parallel_replicas_local_plan {#parallel_replicas_local_plan} + +タイプ: Bool + +デフォルト値: 1 + +ローカルレプリカã®ãŸã‚ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ—ランを構築ã—ã¾ã™ã€‚ + +## parallel_replicas_mark_segment_size {#parallel_replicas_mark_segment_size} + +タイプ: UInt64 + +デフォルト値: 0 + +パーツãŒä»®æƒ³çš„ã«ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã«åˆ†å‰²ã•ã‚Œã€ãƒ¬ãƒ—リカ間ã§ä¸¦åˆ—読ã¿å–ã‚Šã®ãŸã‚ã«é…布ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€ã“れらã®ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã®ã‚µã‚¤ã‚ºã‚’制御ã—ã¾ã™ã€‚確実ãªå ´åˆã‚’除ã„ã¦å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ãŠå‹§ã‚ã—ã¾ã›ã‚“。値ã¯[128; 16384]ã®ç¯„囲ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ + +## parallel_replicas_min_number_of_rows_per_replica {#parallel_replicas_min_number_of_rows_per_replica} + +タイプ: UInt64 + +デフォルト値: 0 + +クエリã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¬ãƒ—リカã®æ•°ã‚’(読ã¿å–る推定行数 / min_number_of_rows_per_replica)ã«åˆ¶é™ã—ã¾ã™ã€‚制é™ã¯ã€'max_parallel_replicas'ã«ã‚ˆã£ã¦å¼•ã続ã制é™ã•ã‚Œã¾ã™ã€‚ + +## parallel_replicas_mode {#parallel_replicas_mode} + +タイプ: ParallelReplicasMode + +デフォルト値: read_tasks + +カスタムキーã«å¯¾ã—ã¦ä¸¦åˆ—レプリカã§ä½¿ç”¨ã™ã‚‹ãƒ•ã‚£ãƒ«ã‚¿ã®ã‚¿ã‚¤ãƒ—。デフォルト - カスタムキーã§ãƒ¢ã‚¸ãƒ¥ãƒ­æ¼”算を使用ã™ã‚‹ã€ç¯„囲 - カスタムキーã«å¯¾ã—ã¦ç¯„囲フィルタを使用ã™ã‚‹ã€‚ + +## parallel_replicas_prefer_local_join {#parallel_replicas_prefer_local_join} + +タイプ: Bool + +デフォルト値: 1 + +trueã®å ´åˆã€JOINãŒä¸¦åˆ—レプリカアルゴリズムã§å®Ÿè¡Œã§ãã€å³JOIN部分ã®ã™ã¹ã¦ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒ*MergeTreeã®å ´åˆã€ãƒ­ãƒ¼ã‚«ãƒ«JOINãŒä½¿ç”¨ã•ã‚Œã€GLOBAL JOINã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## parallel_replicas_single_task_marks_count_multiplier {#parallel_replicas_single_task_marks_count_multiplier} + +タイプ: Float + +デフォルト値: 2 + +コーディãƒãƒ¼ã‚¿ãƒ¼ã‹ã‚‰å–å¾—ã™ã‚‹æœ€å°ãƒžãƒ¼ã‚¯æ•°ã‚’計算ã™ã‚‹éš›ã«è¿½åŠ ã•ã‚Œã‚‹ä¹—数。ã“ã‚Œã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ¬ãƒ—リカã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +## parallel_view_processing {#parallel_view_processing} + +タイプ: Bool + +デフォルト値: 0 + +添付ã•ã‚ŒãŸãƒ“ューã«å¯¾ã—ã¦é€æ¬¡çš„ã§ã¯ãªã並行ã—ã¦ãƒ—ッシュã™ã‚‹ã“ã¨ã‚’有効ã«ã—ã¾ã™ã€‚ + +## parallelize_output_from_storages {#parallelize_output_from_storages} + +タイプ: Bool + +デフォルト値: 1 + +ストレージã‹ã‚‰ã®èª­ã¿å–りステップã®å‡ºåŠ›ã‚’並列化ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€å¯èƒ½ã§ã‚ã‚Œã°ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‹ã‚‰ã®èª­ã¿å–ã‚Šã®ç›´å¾Œã«ã‚¯ã‚¨ãƒªå‡¦ç†ã®ä¸¦åˆ—化を許å¯ã—ã¾ã™ã€‚ + +## parsedatetime_parse_without_leading_zeros {#parsedatetime_parse_without_leading_zeros} + +タイプ: Bool + +デフォルト値: 1 + +関数'parseDateTime()'内ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒã‚¿'%c'ã€'%l'ãŠã‚ˆã³'%k'ã¯ã€ã‚¼ãƒ­åŸ‹ã‚ãªã—ã§æœˆã¨æ™‚を解æžã—ã¾ã™ã€‚ + +## partial_merge_join_left_table_buffer_bytes {#partial_merge_join_left_table_buffer_bytes} + +タイプ: UInt64 + +デフォルト値: 0 + +0ã§ãªã„å ´åˆã€éƒ¨åˆ†çš„ãªãƒžãƒ¼ã‚¸JOINã®å·¦å´ãƒ†ãƒ¼ãƒ–ルã®ãŸã‚ã«ã€å·¦å´ãƒ†ãƒ¼ãƒ–ルã®ãƒ–ロックを大ããグループ化ã—ã¾ã™ã€‚çµåˆã‚¹ãƒ¬ãƒƒãƒ‰ã”ã¨ã«æŒ‡å®šãƒ¡ãƒ¢ãƒªã®æœ€å¤§2å€ã‚’使用ã—ã¾ã™ã€‚ + +## partial_merge_join_rows_in_right_blocks {#partial_merge_join_rows_in_right_blocks} + +タイプ: UInt64 + +デフォルト値: 65536 + +[JOIN](../../sql-reference/statements/select/join.md)クエリã®éƒ¨åˆ†çš„マージJOINアルゴリズムã§ã€å³å´ã®JOINデータブロックã®ã‚µã‚¤ã‚ºã‚’制é™ã—ã¾ã™ã€‚ + +ClickHouseサーãƒãƒ¼ã¯ï¼š + +1. å³å´ã®JOINデータを指定ã•ã‚ŒãŸè¡Œæ•°ã®ãƒ–ロックã«åˆ†å‰²ã—ã¾ã™ã€‚ +2. å„ブロックをãã®æœ€å°å€¤ã¨æœ€å¤§å€¤ã§ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹åŒ–ã—ã¾ã™ã€‚ +3. å¯èƒ½ã§ã‚ã‚Œã°æº–å‚™ã•ã‚ŒãŸãƒ–ロックをディスクã«ã‚¢ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚推奨ã•ã‚Œã‚‹å€¤ã®ç¯„囲:\[1000, 100000\]。 + +## partial_result_on_first_cancel {#partial_result_on_first_cancel} + +タイプ: Bool + +デフォルト値: 0 + +キャンセル後ã«éƒ¨åˆ†çµæžœã‚’è¿”ã™ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## parts_to_delay_insert {#parts_to_delay_insert} + +タイプ: UInt64 + +デフォルト値: 0 + +宛先テーブルã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツãŒ1ã¤ã®ãƒ‘ーティション内ã«å°‘ãªãã¨ã‚‚ã“ã®æ•°å­˜åœ¨ã™ã‚‹å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã¸ã®æŒ¿å…¥ã‚’人工的ã«é…延ã•ã›ã¾ã™ã€‚ + +## parts_to_throw_insert {#parts_to_throw_insert} + +タイプ: UInt64 + +デフォルト値: 0 + +宛先テーブルã®å˜ä¸€ãƒ‘ーティション内ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‘ーツãŒã“ã®æ•°ã‚’超ãˆã‚‹å ´åˆã€'Too many parts ...'例外をスローã—ã¾ã™ã€‚ + +## periodic_live_view_refresh {#periodic_live_view_refresh} + +タイプ: Seconds + +デフォルト値: 60 + +定期的ã«æ›´æ–°ã•ã‚ŒãŸãƒ©ã‚¤ãƒ–ビューãŒå¼·åˆ¶çš„ã«ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹é–“隔。 + +## poll_interval {#poll_interval} + +タイプ: UInt64 + +デフォルト値: 10 + +サーãƒãƒ¼ä¸Šã®ã‚¯ã‚¨ãƒªå¾…機ループã§æŒ‡å®šã•ã‚ŒãŸç§’数ブロックã—ã¾ã™ã€‚ + +## postgresql_connection_attempt_timeout {#postgresql_connection_attempt_timeout} + +タイプ: UInt64 + +デフォルト値: 2 + +PostgreSQLエンドãƒã‚¤ãƒ³ãƒˆã¸ã®å˜ä¸€æŽ¥ç¶šè©¦è¡Œã®ç§’å˜ä½æŽ¥ç¶šã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ +ã“ã®å€¤ã¯æŽ¥ç¶šURLã®`connect_timeout`パラメータã¨ã—ã¦æ¸¡ã•ã‚Œã¾ã™ã€‚ + +## postgresql_connection_pool_auto_close_connection {#postgresql_connection_pool_auto_close_connection} + +タイプ: Bool + +デフォルト値: 0 + +プールã«è¿”ã™å‰ã«æŽ¥ç¶šã‚’é–‰ã˜ã¾ã™ã€‚ + +## postgresql_connection_pool_retries {#postgresql_connection_pool_retries} + +タイプ: UInt64 + +デフォルト値: 2 + +PostgreSQLテーブルエンジンãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã«å¯¾ã™ã‚‹æŽ¥ç¶šãƒ—ールã®ãƒ—ッシュ/ãƒãƒƒãƒ—リトライ数。 + +## postgresql_connection_pool_size {#postgresql_connection_pool_size} + +タイプ: UInt64 + +デフォルト値: 16 + +PostgreSQLテーブルエンジンãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã®ãŸã‚ã®æŽ¥ç¶šãƒ—ールサイズ。 + +## postgresql_connection_pool_wait_timeout {#postgresql_connection_pool_wait_timeout} + +タイプ: UInt64 + +デフォルト値: 5000 + +PostgreSQLテーブルエンジンãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã®ç©ºã®ãƒ—ールã«å¯¾ã™ã‚‹æŽ¥ç¶šãƒ—ールã®ãƒ—ッシュ/ãƒãƒƒãƒ—タイムアウト。デフォルトã§ã¯ã€ç©ºã®ãƒ—ールã®ä¸Šã§ãƒ–ロックã—ã¾ã™ã€‚ + +## prefer_column_name_to_alias {#prefer_column_name_to_alias} + +タイプ: Bool + +デフォルト値: 0 + +クエリå¼ãŠã‚ˆã³å¥å†…ã§ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã®ä»£ã‚ã‚Šã«å…ƒã®ã‚«ãƒ©ãƒ åを使用ã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¨ã‚¤ãƒªã‚¢ã‚¹ãŒã‚«ãƒ©ãƒ åã¨åŒã˜ã§ã‚ã‚‹å ´åˆã«ç‰¹ã«é‡è¦ã§ã™ã€‚[Expression Aliases](../../sql-reference/syntax.md/#notes-on-usage)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã¨ã€ClickHouseã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹æ§‹æ–‡ãƒ«ãƒ¼ãƒ«ã¯ã»ã¨ã‚“ã©ã®ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã¨ã‚ˆã‚Šäº’æ›æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — カラムåã¯ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ +- 1 — カラムåã¯ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã›ã‚“。 + +**例** + +有効ã¨ç„¡åŠ¹ã®é•ã„: + +クエリ: + +```sql +SET prefer_column_name_to_alias = 0; +SELECT avg(number) AS number, max(number) FROM numbers(10); +``` + +çµæžœï¼š + +```text +Received exception from server (version 21.5.1): +Code: 184. DB::Exception: Received from localhost:9000. DB::Exception: Aggregate function avg(number) is found inside another aggregate function in query: While processing avg(number) AS number. +``` + +クエリ: + +```sql +SET prefer_column_name_to_alias = 1; +SELECT avg(number) AS number, max(number) FROM numbers(10); +``` + +çµæžœï¼š + +```text +┌─number─┬─max(number)─┠+│ 4.5 │ 9 │ +└────────┴─────────────┘ +``` + +## prefer_external_sort_block_bytes {#prefer_external_sort_block_bytes} + +タイプ: UInt64 + +デフォルト値: 16744704 + +外部ソートã®ãŸã‚ã®æœ€å¤§ãƒ–ロックãƒã‚¤ãƒˆã‚’優先ã—ã€ãƒžãƒ¼ã‚¸æ™‚ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’削減ã—ã¾ã™ã€‚ + +## prefer_global_in_and_join {#prefer_global_in_and_join} + +タイプ: Bool + +デフォルト値: 0 + +`IN`/`JOIN`演算å­ã‚’`GLOBAL IN`/`GLOBAL JOIN`ã«ç½®ãæ›ãˆã‚‹ã“ã¨ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — 無効。 `IN`/`JOIN`演算å­ã¯`GLOBAL IN`/`GLOBAL JOIN`ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã›ã‚“。 +- 1 — 有効。 `IN`/`JOIN`演算å­ã¯`GLOBAL IN`/`GLOBAL JOIN`ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +**使用方法** + +`SET distributed_product_mode=global`ãŒåˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹ã‚¯ã‚¨ãƒªã®å‹•ä½œã‚’変更ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ãŒã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ãƒ¼ãƒ–ルや外部リソースã®ãƒ†ãƒ¼ãƒ–ルã«ã¯é©ã—ã¦ã„ã¾ã›ã‚“。ã“ã®æ™‚ã«`prefer_global_in_and_join`設定ãŒç™»å ´ã—ã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ãƒ¼ãƒ–ルãŒå«ã¾ã‚Œã‚‹ã‚¯ã‚¨ãƒªå‡¦ç†ãƒŽãƒ¼ãƒ‰ãŒã‚ã‚Šã€ã“れらã¯åˆ†æ•£å‡¦ç†ã«é©ã—ã¦ã„ã¾ã›ã‚“。`GLOBAL`キーワードを使用ã—ã¦åˆ†æ•£å‡¦ç†ä¸­ã«ãƒ‡ãƒ¼ã‚¿ã‚’ãã®å ´ã§æ•£ã‚‰ã°ã‚‰ã›ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™â€”`GLOBAL IN`/`GLOBAL JOIN`を使用ã—ã¾ã™ã€‚ +```html +`prefer_global_in_and_join`ã®ã‚‚ã†ä¸€ã¤ã®ä½¿ç”¨ä¾‹ã¯ã€å¤–部エンジンã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã§ã™ã€‚ã“ã®è¨­å®šã¯ã€ãã®ã‚ˆã†ãªãƒ†ãƒ¼ãƒ–ルをçµåˆã™ã‚‹éš›ã«å¤–部ソースã¸ã®å‘¼ã³å‡ºã—回数を減らã™ã®ã«å½¹ç«‹ã¡ã¾ã™ï¼šã‚¯ã‚¨ãƒªã”ã¨ã«1回ã®å‘¼ã³å‡ºã—ã®ã¿ã§ã™ã€‚ + +**å‚照:** + +- `GLOBAL IN`/`GLOBAL JOIN`ã®ä½¿ç”¨æ–¹æ³•ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[分散サブクエリ](../../sql-reference/operators/in.md/#select-distributed-subqueries)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## prefer_localhost_replica {#prefer_localhost_replica} + +タイプ: Bool + +デフォルト値: 1 + +分散クエリを処ç†ã™ã‚‹éš›ã«ã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ›ã‚¹ãƒˆã®ãƒ¬ãƒ—リカを優先的ã«ä½¿ç”¨ã™ã‚‹ã‹ã©ã†ã‹ã‚’有効/無効ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 1 — ClickHouseã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ›ã‚¹ãƒˆã®ãƒ¬ãƒ—リカãŒå­˜åœ¨ã™ã‚‹å ´åˆã€å¸¸ã«ã‚¯ã‚¨ãƒªã‚’ãã®ãƒ¬ãƒ—リカã«é€ä¿¡ã—ã¾ã™ã€‚ +- 0 — ClickHouseã¯ã€[load_balancing](#load_balancing)設定ã§æŒ‡å®šã•ã‚ŒãŸãƒãƒ©ãƒ³ã‚¹æˆ¦ç•¥ã‚’使用ã—ã¾ã™ã€‚ + +:::note +[parallel_replicas_custom_key](#parallel_replicas_custom_key)を使用ã›ãšã«[max_parallel_replicas](#max_parallel_replicas)を使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€ã“ã®è¨­å®šã‚’無効ã«ã—ã¦ãã ã•ã„。 +[parallel_replicas_custom_key](#parallel_replicas_custom_key)ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€è¤‡æ•°ã®ãƒ¬ãƒ—リカをå«ã‚€è¤‡æ•°ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’æŒã¤ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã§ä½¿ç”¨ã™ã‚‹å ´åˆã«ã®ã¿ã€ã“ã®è¨­å®šã‚’無効ã«ã—ã¦ãã ã•ã„。 +å˜ä¸€ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã¨è¤‡æ•°ã®ãƒ¬ãƒ—リカをæŒã¤ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã§ä½¿ç”¨ã™ã‚‹å ´åˆã€ã“ã®è¨­å®šã‚’無効ã«ã™ã‚‹ã¨æ‚ªå½±éŸ¿ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## prefer_warmed_unmerged_parts_seconds {#prefer_warmed_unmerged_parts_seconds} + +タイプ: Int64 + +デフォルト値: 0 + +ClickHouse Cloudã§ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚マージã•ã‚Œã¦ã„ãªã„部分ãŒã“ã®ç§’数未満ã§å¤ãã€ãƒ—リウォームã•ã‚Œã¦ã„ãªã„å ´åˆï¼ˆcache_populated_by_fetchã‚’å‚照)ã€ã‹ã¤ã™ã¹ã¦ã®ã‚½ãƒ¼ã‚¹éƒ¨åˆ†ãŒåˆ©ç”¨å¯èƒ½ã§ãƒ—リウォームã•ã‚Œã¦ã„ã‚‹å ´åˆã€SELECTクエリã¯ãれらã®éƒ¨åˆ†ã‹ã‚‰èª­ã¿å–ã‚Šã¾ã™ã€‚ReplicatedMergeTree専用ã§ã™ã€‚ã“ã®è¨­å®šã¯ã€CacheWarmerãŒãã®éƒ¨åˆ†ã‚’処ç†ã—ãŸã‹ã©ã†ã‹ã®ã¿ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ã‚‚ã—ãã®éƒ¨åˆ†ãŒä»–ã®ä½•ã‹ã«ã‚ˆã£ã¦ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«å–å¾—ã•ã‚Œã¦ã„ã¦ã‚‚ã€CacheWarmerãŒãれを処ç†ã™ã‚‹ã¾ã§ã€Œã‚³ãƒ¼ãƒ«ãƒ‰ã€ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ã‚‚ã—プリウォームã•ã‚Œã¦ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰æŽ’除ã•ã‚ŒãŸå ´åˆã‚‚ã€ã€Œã‚¦ã‚©ãƒ¼ãƒ ã€ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +## preferred_block_size_bytes {#preferred_block_size_bytes} + +タイプ: UInt64 + +デフォルト値: 1000000 + +ã“ã®è¨­å®šã¯ã€ã‚¯ã‚¨ãƒªå‡¦ç†ã®ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックサイズを調整ã—ã€ç²—ã„ 'max_block_size' 設定ã«å¯¾ã™ã‚‹è¿½åŠ çš„ãªå¾®èª¿æ•´ã‚’表ã—ã¾ã™ã€‚カラムãŒå¤§ããã€'max_block_size' è¡ŒãŒæŒ‡å®šã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã‚ˆã‚Šã‚‚大ãã„å ´åˆã€ãã®ã‚µã‚¤ã‚ºã¯CPUキャッシュã®å±€æ‰€æ€§ã‚’改善ã™ã‚‹ãŸã‚ã«ä½Žãã•ã‚Œã¾ã™ã€‚ + +## preferred_max_column_in_block_size_bytes {#preferred_max_column_in_block_size_bytes} + +タイプ: UInt64 + +デフォルト値: 0 + +読ã¿å–り時ã®ãƒ–ロック内ã®æœ€å¤§ã‚«ãƒ©ãƒ ã‚µã‚¤ã‚ºã®åˆ¶é™ã§ã™ã€‚キャッシュミスã®å›žæ•°ã‚’減少ã•ã›ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚L2キャッシュサイズã«è¿‘ã„å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## preferred_optimize_projection_name {#preferred_optimize_projection_name} + +タイプ: String + +デフォルト値: + +空ã§ãªã„文字列ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ã‚¯ã‚¨ãƒªã§æŒ‡å®šã•ã‚ŒãŸãƒ—ロジェクションをé©ç”¨ã—よã†ã¨ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 文字列: 好ã¿ã®ãƒ—ロジェクションã®åå‰ + +## prefetch_buffer_size {#prefetch_buffer_size} + +タイプ: UInt64 + +デフォルト値: 1048576 + +ファイルシステムã‹ã‚‰èª­ã¿å–ã‚‹ãŸã‚ã®ãƒ—リフェッãƒãƒãƒƒãƒ•ã‚¡ã®æœ€å¤§ã‚µã‚¤ã‚ºã§ã™ã€‚ + +## print_pretty_type_names {#print_pretty_type_names} + +タイプ: Bool + +デフォルト値: 1 + +`DESCRIBE`クエリãŠã‚ˆã³`toTypeName()`関数内ã§ã€æ·±ããƒã‚¹ãƒˆã•ã‚ŒãŸã‚¿ã‚¤ãƒ—ã®åå‰ã‚’インデントを付ã‘ã¦æ•´å½¢ã—ã¦å°åˆ·ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +例: + +```sql +CREATE TABLE test (a Tuple(b String, c Tuple(d Nullable(UInt64), e Array(UInt32), f Array(Tuple(g String, h Map(String, Array(Tuple(i String, j UInt64))))), k Date), l Nullable(String))) ENGINE=Memory; +DESCRIBE TABLE test FORMAT TSVRaw SETTINGS print_pretty_type_names=1; +``` + +``` +a Tuple( + b String, + c Tuple( + d Nullable(UInt64), + e Array(UInt32), + f Array(Tuple( + g String, + h Map( + String, + Array(Tuple( + i String, + j UInt64 + )) + ) + )), + k Date + ), + l Nullable(String) +) +``` + +## priority {#priority} + +タイプ: UInt64 + +デフォルト値: 0 + +クエリã®å„ªå…ˆåº¦ã€‚1 - 最も高ã„ã€å€¤ãŒé«˜ã„ã»ã©å„ªå…ˆåº¦ã¯ä½Žã„ï¼›0 - 優先度を使用ã—ãªã„。 + +## query_cache_compress_entries {#query_cache_compress_entries} + +タイプ: Bool + +デフォルト値: 1 + +[クエリキャッシュ](../query-cache.md)内ã®ã‚¨ãƒ³ãƒˆãƒªã‚’圧縮ã—ã¾ã™ã€‚クエリキャッシュã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚’抑ãˆã¾ã™ãŒã€æŒ¿å…¥ã‚„読ã¿å–ã‚Šã®é€Ÿåº¦ã¯ä½Žä¸‹ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_cache_max_entries {#query_cache_max_entries} + +タイプ: UInt64 + +デフォルト値: 0 + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ[クエリキャッシュ](../query-cache.md)ã«æ ¼ç´ã§ãるクエリçµæžœã®æœ€å¤§æ•°ã€‚0ã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0以上ã®æ­£ã®æ•´æ•°ã€‚ + +## query_cache_max_size_in_bytes {#query_cache_max_size_in_bytes} + +タイプ: UInt64 + +デフォルト値: 0 + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ[クエリキャッシュ](../query-cache.md)ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹æœ€å¤§ãƒ¡ãƒ¢ãƒªé‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚0ã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0以上ã®æ­£ã®æ•´æ•°ã€‚ + +## query_cache_min_query_duration {#query_cache_min_query_duration} + +タイプ: ミリ秒 + +デフォルト値: 0 + +クエリã®çµæžœã‚’[クエリキャッシュ](../query-cache.md)ã«ä¿å­˜ã™ã‚‹ãŸã‚ã«ã€ã‚¯ã‚¨ãƒªãŒå®Ÿè¡Œã•ã‚Œãªã‘ã‚Œã°ãªã‚‰ãªã„最å°ã®æ™‚間(ミリ秒å˜ä½ï¼‰ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0以上ã®æ­£ã®æ•´æ•°ã€‚ + +## query_cache_min_query_runs {#query_cache_min_query_runs} + +タイプ: UInt64 + +デフォルト値: 0 + +`SELECT`クエリãŒçµæžœã‚’[クエリキャッシュ](../query-cache.md)ã«ä¿å­˜ã™ã‚‹å‰ã«ã€å®Ÿè¡Œã™ã‚‹å¿…è¦ãŒã‚る最å°å›žæ•°ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0以上ã®æ­£ã®æ•´æ•°ã€‚ + +## query_cache_nondeterministic_function_handling {#query_cache_nondeterministic_function_handling} + +タイプ: QueryCacheNondeterministicFunctionHandling + +デフォルト値: throw + +éžæ±ºå®šè«–的関数(例ãˆã°ã€`rand()`ã‚„`now()`)をå«ã‚€`SELECT`クエリã«å¯¾ã—ã¦[クエリキャッシュ](../query-cache.md)ãŒã©ã®ã‚ˆã†ã«å‡¦ç†ã™ã‚‹ã‹ã‚’制御ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- `'throw'` - 例外をスローã—ã€ã‚¯ã‚¨ãƒªçµæžœã‚’キャッシュã—ãªã„。 +- `'save'` - クエリçµæžœã‚’キャッシュã™ã‚‹ã€‚ +- `'ignore'` - クエリçµæžœã‚’キャッシュã›ãšã€ä¾‹å¤–をスローã—ãªã„。 + +## query_cache_share_between_users {#query_cache_share_between_users} + +タイプ: Bool + +デフォルト値: 0 + +有効ã«ã™ã‚‹ã¨ã€[クエリキャッシュ](../query-cache.md)ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸ`SELECT`クエリã®çµæžœã‚’ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒèª­ã¿å–れるよã†ã«ãªã‚Šã¾ã™ã€‚ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã“ã¨ã¯ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šã®ç†ç”±ã‹ã‚‰æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_cache_squash_partial_results {#query_cache_squash_partial_results} + +タイプ: Bool + +デフォルト値: 1 + +部分çµæžœãƒ–ロックを[max_block_size](#setting-max_block_size)ã®ã‚µã‚¤ã‚ºã®ãƒ–ロックã«åœ§ç¸®ã—ã¾ã™ã€‚[クエリキャッシュ](../query-cache.md)ã¸ã®æŒ¿å…¥ã®ãƒ‘フォーマンスを低下ã•ã›ã¾ã™ãŒã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ³ãƒˆãƒªã®åœ§ç¸®æ€§ã‚’å‘上ã•ã›ã¾ã™ï¼ˆ[query_cache_compress-entries](#query_cache_compress-entries)ã‚’å‚照)。 + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_cache_system_table_handling {#query_cache_system_table_handling} + +タイプ: QueryCacheSystemTableHandling + +デフォルト値: throw + +システムテーブル(ã™ãªã‚ã¡ã€`system.*`ãŠã‚ˆã³`information_schema.*`データベースã®ãƒ†ãƒ¼ãƒ–ル)ã«å¯¾ã™ã‚‹`SELECT`クエリã«å¯¾ã—ã¦ã€[クエリキャッシュ](../query-cache.md)ãŒã©ã®ã‚ˆã†ã«å‡¦ç†ã™ã‚‹ã‹ã‚’制御ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- `'throw'` - 例外をスローã—ã€ã‚¯ã‚¨ãƒªçµæžœã‚’キャッシュã—ãªã„。 +- `'save'` - クエリçµæžœã‚’キャッシュã™ã‚‹ã€‚ +- `'ignore'` - クエリçµæžœã‚’キャッシュã›ãšã€ä¾‹å¤–をスローã—ãªã„。 + +## query_cache_tag {#query_cache_tag} + +タイプ: String + +デフォルト値: + +[クエリキャッシュ](../query-cache.md)エントリã«ãƒ©ãƒ™ãƒ«ã¨ã—ã¦æ©Ÿèƒ½ã™ã‚‹æ–‡å­—列ã§ã™ã€‚åŒã˜ã‚¯ã‚¨ãƒªãŒç•°ãªã‚‹ã‚¿ã‚°ã‚’æŒã¤å ´åˆã€ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã§ã¯ç•°ãªã‚‹ã‚‚ã®ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- ä»»æ„ã®æ–‡å­—列 + +## query_cache_ttl {#query_cache_ttl} + +タイプ: 秒 + +デフォルト値: 60 + +ã“ã®æ™‚間(秒å˜ä½ï¼‰ã‚’経éŽã™ã‚‹ã¨ã€[クエリキャッシュ](../query-cache.md)ã®ã‚¨ãƒ³ãƒˆãƒªãŒå¤ããªã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0以上ã®æ­£ã®æ•´æ•°ã€‚ + +## query_metric_log_interval {#query_metric_log_interval} + +タイプ: Int64 + +デフォルト値: -1 + +個々ã®ã‚¯ã‚¨ãƒªã«å¯¾ã™ã‚‹[query_metric_log](../../operations/system-tables/query_metric_log.md)ã®åŽé›†é–“隔(ミリ秒å˜ä½ï¼‰ã§ã™ã€‚ + +ä»»æ„ã®è² ã®å€¤ã«è¨­å®šã•ã‚ŒãŸå ´åˆã€[query_metric_log設定](../../operations/server-configuration-parameters/settings.md#query_metric_log)ã‹ã‚‰`collect_interval_milliseconds`ã®å€¤ã‚’使用ã™ã‚‹ã‹ã€å­˜åœ¨ã—ãªã„å ´åˆã¯1000ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã•ã‚Œã¾ã™ã€‚ + +å˜ä¸€ã‚¯ã‚¨ãƒªã®åŽé›†ã‚’無効ã«ã™ã‚‹ã«ã¯ã€`query_metric_log_interval`ã‚’0ã«è¨­å®šã—ã¾ã™ã€‚ + +デフォルト値: -1 + +## query_plan_aggregation_in_order {#query_plan_aggregation_in_order} + +タイプ: Bool + +デフォルト値: 1 + +集約を順åºé€šã‚Šã«å‡¦ç†ã™ã‚‹ã‚¯ã‚¨ãƒªãƒ—ランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_plan_convert_outer_join_to_inner_join {#query_plan_convert_outer_join_to_inner_join} + +タイプ: Bool + +デフォルト値: 1 + +JOINã®å¾Œã«ãƒ•ã‚£ãƒ«ã‚¿ãŒå¸¸ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’フィルタリングã™ã‚‹å ´åˆã€OUTER JOINã‚’INNER JOINã«å¤‰æ›ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## query_plan_enable_multithreading_after_window_functions {#query_plan_enable_multithreading_after_window_functions} + +タイプ: Bool + +デフォルト値: 1 + +ウィンドウ関数を評価ã—ãŸå¾Œã«ãƒžãƒ«ãƒã‚¹ãƒ¬ãƒƒãƒ‰å‡¦ç†ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +## query_plan_enable_optimizations {#query_plan_enable_optimizations} + +タイプ: Bool + +デフォルト値: 1 + +クエリプランレベルã§ã®ã‚¯ã‚¨ãƒªæœ€é©åŒ–を切り替ãˆã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - クエリプランレベルã§ã®ã™ã¹ã¦ã®æœ€é©åŒ–を無効 +- 1 - クエリプランレベルã§ã®æœ€é©åŒ–を有効(ãŸã ã—ã€å€‹ã€…ã®æœ€é©åŒ–ã¯å€‹åˆ¥ã®è¨­å®šã§ç„¡åŠ¹ã«ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼‰ + +## query_plan_execute_functions_after_sorting {#query_plan_execute_functions_after_sorting} + +タイプ: Bool + +デフォルト値: 1 + +ソート処ç†ã®å¾Œã«å¼ã‚’移動ã™ã‚‹ã‚¯ã‚¨ãƒªãƒ—ランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_plan_filter_push_down {#query_plan_filter_push_down} + +タイプ: Bool + +デフォルト値: 1 + +実行プランã§ãƒ•ã‚£ãƒ«ã‚¿ã‚’下ã«ç§»å‹•ã™ã‚‹ã‚¯ã‚¨ãƒªãƒ—ランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_plan_lift_up_array_join {#query_plan_lift_up_array_join} + +タイプ: Bool + +デフォルト値: 1 + +ARRAY JOINを実行プランã®ä¸Šéƒ¨ã«ç§»å‹•ã™ã‚‹ã‚¯ã‚¨ãƒªãƒ—ランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_plan_lift_up_union {#query_plan_lift_up_union} + +タイプ: Bool + +デフォルト値: 1 + +クエリプランã®å¤§ããªéƒ¨åˆ†æœ¨ã‚’一ã¤ã®ãƒ¦ãƒ‹ã‚ªãƒ³ã«ç§»å‹•ã™ã‚‹ã‚¯ã‚¨ãƒªãƒ—ランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_plan_max_optimizations_to_apply {#query_plan_max_optimizations_to_apply} + +タイプ: UInt64 + +デフォルト値: 10000 + +クエリプランã«é©ç”¨ã•ã‚Œã‚‹æœ€é©åŒ–ã®ç·æ•°ã‚’制é™ã—ã¾ã™ã€‚[query_plan_enable_optimizations](#query_plan_enable_optimizations)設定をå‚ç…§ã—ã¦ãã ã•ã„。 +複雑ãªã‚¯ã‚¨ãƒªã«ã¤ã„ã¦é•·æ™‚é–“ã®æœ€é©åŒ–ã‚’é¿ã‘ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ +ã“ã®è¨­å®šã‚’超ãˆã‚‹æœ€é©åŒ–ã®å®Ÿéš›ã®æ•°ãŒã‚ã‚‹å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## query_plan_merge_expressions {#query_plan_merge_expressions} + +タイプ: Bool + +デフォルト値: 1 + +連続ã™ã‚‹ãƒ•ã‚£ãƒ«ã‚¿ã‚’マージã™ã‚‹ã‚¯ã‚¨ãƒªãƒ—ランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_plan_merge_filters {#query_plan_merge_filters} + +タイプ: Bool + +デフォルト値: 0 + +クエリプラン内ã®ãƒ•ã‚£ãƒ«ã‚¿ã‚’マージã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## query_plan_optimize_prewhere {#query_plan_optimize_prewhere} + +タイプ: Bool + +デフォルト値: 1 + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るストレージã®ãŸã‚ã«ãƒ•ã‚£ãƒ«ã‚¿ã‚’PREWHEREå¼ã«ãƒ—ッシュダウンã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## query_plan_push_down_limit {#query_plan_push_down_limit} + +タイプ: Bool + +デフォルト値: 1 + +実行プランã§LIMITを下ã«ç§»å‹•ã™ã‚‹ã‚¯ã‚¨ãƒªãƒ—ランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_plan_read_in_order {#query_plan_read_in_order} + +タイプ: Bool + +デフォルト値: 1 + +é †åºé€šã‚Šã«èª­ã¿å–る最é©åŒ–クエリプランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_plan_remove_redundant_distinct {#query_plan_remove_redundant_distinct} + +タイプ: Bool + +デフォルト値: 1 + +冗長ãªDISTINCTステップを削除ã™ã‚‹ã‚¯ã‚¨ãƒªãƒ—ランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_plan_remove_redundant_sorting {#query_plan_remove_redundant_sorting} + +タイプ: Bool + +デフォルト値: 1 + +冗長ãªã‚½ãƒ¼ãƒˆã‚¹ãƒ†ãƒƒãƒ—を削除ã™ã‚‹ã‚¯ã‚¨ãƒªãƒ—ランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ï¼ˆä¾‹ãˆã°ã€ã‚µãƒ–クエリ内ãªã©ï¼‰ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_plan_reuse_storage_ordering_for_window_functions {#query_plan_reuse_storage_ordering_for_window_functions} + +タイプ: Bool + +デフォルト値: 1 + +ウィンドウ関数ã®ã‚½ãƒ¼ãƒˆæ™‚ã«ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚½ãƒ¼ãƒˆã‚’å†ä½¿ç”¨ã™ã‚‹ã‚¯ã‚¨ãƒªãƒ—ランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_plan_split_filter {#query_plan_split_filter} + +タイプ: Bool + +デフォルト値: 1 + +:::note +ã“ã‚Œã¯å°‚門家レベルã®è¨­å®šã§ã‚ã‚Šã€é–‹ç™ºè€…ã«ã‚ˆã‚‹ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚ã«ã®ã¿ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šã¯ã€å°†æ¥çš„ã«å¾Œæ–¹äº’æ›æ€§ã®ãªã„方法ã§å¤‰æ›´ã•ã‚ŒãŸã‚Šã€å‰Šé™¤ã•ã‚ŒãŸã‚Šã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +フィルタをå¼ã«åˆ†å‰²ã™ã‚‹ã‚¯ã‚¨ãƒªãƒ—ランレベルã®æœ€é©åŒ–を切り替ãˆã¾ã™ã€‚設定[query_plan_enable_optimizations](#query_plan_enable_optimizations)ãŒ1ã®å ´åˆã«ã®ã¿åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 - 無効 +- 1 - 有効 + +## query_profiler_cpu_time_period_ns {#query_profiler_cpu_time_period_ns} + +タイプ: UInt64 + +デフォルト値: 1000000000 + +[クエリプロファイラ](../../operations/optimizing-performance/sampling-query-profiler.md)ã®CPUクロックタイマーã®æœŸé–“を設定ã—ã¾ã™ã€‚ã“ã®ã‚¿ã‚¤ãƒžãƒ¼ã¯CPU時間ã®ã¿ã‚’カウントã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã®ãƒŠãƒŽç§’。 + + 推奨値: + + - å˜ä¸€ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ã¯10000000(秒ã«100回)ã®ãƒŠãƒŽç§’以上。 + - クラスター全体ã®ãƒ—ロファイリングã«ã¯1000000000(1秒ã«1回)。 + +- タイマーをオフã«ã™ã‚‹ã«ã¯0。 + +**ClickHouse Cloudã§ã¯ä¸€æ™‚çš„ã«ç„¡åŠ¹ã§ã™ã€‚** + +å‚照: + +- システムテーブル[trace_log](../../operations/system-tables/trace_log.md/#system_tables-trace_log) + +## query_profiler_real_time_period_ns {#query_profiler_real_time_period_ns} + +タイプ: UInt64 + +デフォルト値: 1000000000 + +[クエリプロファイラ](../../operations/optimizing-performance/sampling-query-profiler.md)ã®å®Ÿéš›ã®ã‚¯ãƒ­ãƒƒã‚¯ã‚¿ã‚¤ãƒžãƒ¼ã®æœŸé–“を設定ã—ã¾ã™ã€‚実際ã®ã‚¯ãƒ­ãƒƒã‚¯ã‚¿ã‚¤ãƒžãƒ¼ã¯å£æ™‚計時間をカウントã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°æ•°ï¼ˆãƒŠãƒŽç§’)。 + + 推奨値: + + - å˜ä¸€ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ã¯10000000(秒ã«100回)ナノ秒未満。 + - クラスター全体ã®ãƒ—ロファイリングã«ã¯1000000000(1秒ã«1回)。 + +- タイマーをオフã«ã™ã‚‹ã«ã¯0。 + +**ClickHouse Cloudã§ã¯ä¸€æ™‚çš„ã«ç„¡åŠ¹ã§ã™ã€‚** + +å‚照: + +- システムテーブル[trace_log](../../operations/system-tables/trace_log.md/#system_tables-trace_log) + +## queue_max_wait_ms {#queue_max_wait_ms} + +タイプ: ミリ秒 + +デフォルト値: 0 + +åŒæ™‚リクエストã®æ•°ãŒæœ€å¤§ã‚’超ãˆãŸå ´åˆã®ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚­ãƒ¥ãƒ¼å†…ã®å¾…機時間ã§ã™ã€‚ + +## rabbitmq_max_wait_ms {#rabbitmq_max_wait_ms} + +タイプ: ミリ秒 + +デフォルト値: 5000 + +リトライå‰ã«RabbitMQã‹ã‚‰èª­ã¿å–ã‚‹éš›ã®å¾…機時間ã§ã™ã€‚ + +## read_backoff_max_throughput {#read_backoff_max_throughput} + +タイプ: UInt64 + +デフォルト値: 1048576 + +é…ã„読ã¿å–ã‚ŠãŒç™ºç”Ÿã—ãŸå ´åˆã«ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã‚’減らã™ãŸã‚ã®è¨­å®šã§ã™ã€‚読ã¿å–り帯域幅ãŒã“ã®ãƒã‚¤ãƒˆæ•°/秒を下回るイベントをカウントã—ã¾ã™ã€‚ + +## read_backoff_min_concurrency {#read_backoff_min_concurrency} + +タイプ: UInt64 + +デフォルト値: 1 + +é…ã„読ã¿å–ã‚ŠãŒç™ºç”Ÿã—ãŸå ´åˆã«æœ€å°é™ã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’維æŒã—よã†ã¨ã™ã‚‹è¨­å®šã§ã™ã€‚ + +## read_backoff_min_events {#read_backoff_min_events} + +タイプ: UInt64 + +デフォルト値: 2 + +é…ã„読ã¿å–ã‚ŠãŒç™ºç”Ÿã—ãŸå ´åˆã«ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã‚’減らã™ãŸã‚ã®è¨­å®šã§ã™ã€‚スレッド数を減少ã•ã›ã‚‹å‰ã«ã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã‚‹ã‚¤ãƒ™ãƒ³ãƒˆæ•°ã§ã™ã€‚ + +## read_backoff_min_interval_between_events_ms {#read_backoff_min_interval_between_events_ms} + +タイプ: ミリ秒 + +デフォルト値: 1000 + +é…ã„読ã¿å–ã‚ŠãŒç™ºç”Ÿã—ãŸå ´åˆã«ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã‚’減らã™ãŸã‚ã®è¨­å®šã§ã™ã€‚å‰ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒä¸€å®šã®æ™‚間未満ã—ã‹çµŒéŽã—ã¦ã„ãªã„å ´åˆã€ãã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’無視ã—ã¾ã™ã€‚ + +## read_backoff_min_latency_ms {#read_backoff_min_latency_ms} + +タイプ: ミリ秒 + +デフォルト値: 1000 + +é…ã„読ã¿å–ã‚ŠãŒç™ºç”Ÿã—ãŸå ´åˆã«ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã‚’減らã™ãŸã‚ã®è¨­å®šã§ã™ã€‚ã“ã®æ™‚間以上ã‹ã‹ã‚‹èª­ã¿å–ã‚Šã®ã¿ã«æ³¨æ„ã—ã¾ã™ã€‚ + +## read_from_filesystem_cache_if_exists_otherwise_bypass_cache {#read_from_filesystem_cache_if_exists_otherwise_bypass_cache} + +タイプ: Bool + +デフォルト値: 0 + +ファイルシステムキャッシュをå—動モードã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ - 既存ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ³ãƒˆãƒªã‹ã‚‰ã®åˆ©ç›Šã‚’å¾—ã‚‹ãŒã€æ–°ã—ã„エントリをキャッシュã«å…¥ã‚Œã¾ã›ã‚“。ã“ã®è¨­å®šã‚’é‡ã„アドホッククエリã«è¨­å®šã—ã€çŸ­ã„リアルタイムクエリã«å¯¾ã—ã¦ç„¡åŠ¹ã«ã™ã‚‹ã“ã¨ã§ã€éŽåº¦ã®ã‚¯ã‚¨ãƒªã«ã‚ˆã‚‹ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ã‚¹ãƒ©ãƒƒã‚·ãƒ³ã‚°ã‚’é¿ã‘ã€å…¨ä½“ã®ã‚·ã‚¹ãƒ†ãƒ åŠ¹çŽ‡ã‚’改善ã§ãã¾ã™ã€‚ + +## read_from_page_cache_if_exists_otherwise_bypass_cache {#read_from_page_cache_if_exists_otherwise_bypass_cache} + +タイプ: Bool + +デフォルト値: 0 + +å—動モードã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¹ãƒšãƒ¼ã‚¹ã®ãƒšãƒ¼ã‚¸ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¾ã™ã€‚read_from_filesystem_cache_if_exists_otherwise_bypass_cacheã«é¡žä¼¼ã—ã¦ã„ã¾ã™ã€‚ + +## read_in_order_two_level_merge_threshold {#read_in_order_two_level_merge_threshold} + +タイプ: UInt64 + +デフォルト値: 100 + +プライマリキーã®é †åºã§è¤‡æ•°ã‚¹ãƒ¬ãƒƒãƒ‰ã§èª­ã¿å–ã‚‹éš›ã«ãƒ—レリミナリマージステップを実行ã™ã‚‹ãŸã‚ã«èª­ã¿å–ã‚‹å¿…è¦ãŒã‚る部分ã®æœ€å°æ•°ã§ã™ã€‚ + +## read_in_order_use_buffering {#read_in_order_use_buffering} + +タイプ: Bool + +デフォルト値: 1 + +プライマリキーã®é †åºã§èª­ã¿å–ã‚‹éš›ã«ãƒžãƒ¼ã‚¸å‰ã«ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ã‚’使用ã—ã¾ã™ã€‚クエリ実行ã®ä¸¦åˆ—性ãŒå‘上ã—ã¾ã™ã€‚ + +## read_overflow_mode {#read_overflow_mode} + +タイプ: OverflowMode + +デフォルト値: throw + +制é™ã‚’超ãˆãŸå ´åˆã®å‡¦ç†ã®æ–¹æ³•ã§ã™ã€‚ + +## read_overflow_mode_leaf {#read_overflow_mode_leaf} + +タイプ: OverflowMode + +デフォルト値: throw + +リーフ制é™ã‚’超ãˆãŸå ´åˆã®å‡¦ç†ã®æ–¹æ³•ã§ã™ã€‚ + +## read_priority {#read_priority} + +タイプ: Int64 + +デフォルト値: 0 + +ローカルファイルシステムã¾ãŸã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–る優先度。ローカルファイルシステムã®`pread_threadpool`メソッドã¨ãƒªãƒ¢ãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã®`threadpool`メソッドã«å¯¾ã—ã¦ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## read_through_distributed_cache {#read_through_distributed_cache} + +タイプ: Bool + +デフォルト値: 0 + +ClickHouse Cloudã§ã®ã¿ã€‚分散キャッシュã‹ã‚‰ã®èª­ã¿å–りを許å¯ã—ã¾ã™ã€‚ + +## readonly {#readonly} + +タイプ: UInt64 + +デフォルト値: 0 + +0 - 読ã¿å–り専用制é™ãªã—。1 - 読ã¿å–りリクエストã®ã¿ã€ãŠã‚ˆã³æ˜Žç¤ºçš„ã«è¨±å¯ã•ã‚ŒãŸè¨­å®šã®ã¿å¤‰æ›´å¯èƒ½ã€‚2 - 読ã¿å–りリクエストã®ã¿ã€ãŠã‚ˆã³è¨­å®šã‚’変更å¯èƒ½ï¼ˆ'readonly'設定を除ã)。 + +## receive_data_timeout_ms {#receive_data_timeout_ms} + +タイプ: ミリ秒 + +デフォルト値: 2000 + +最åˆã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ケットã¾ãŸã¯ãƒ¬ãƒ—リカã‹ã‚‰ã®é€²è¡ŒçŠ¶æ³ã‚’示ã™ãƒ‘ケットをå—ä¿¡ã™ã‚‹ãŸã‚ã®æŽ¥ç¶šã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã§ã™ã€‚ + +## receive_timeout {#receive_timeout} + +タイプ: 秒 + +デフォルト値: 300 + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å—ä¿¡ã™ã‚‹ãŸã‚ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’å˜ä½ï¼‰ã€‚ã“ã®é–“ã«ãƒã‚¤ãƒˆãŒå—ä¿¡ã•ã‚Œãªã‹ã£ãŸå ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚クライアントã§ã“ã®è¨­å®šã‚’設定ã™ã‚‹ã¨ã€ã‚½ã‚±ãƒƒãƒˆã®'send_timeout'もサーãƒãƒ¼ã®å¯¾å¿œã™ã‚‹æŽ¥ç¶šã®çµ‚端ã§è¨­å®šã•ã‚Œã¾ã™ã€‚ + +## regexp_max_matches_per_row {#regexp_max_matches_per_row} + +タイプ: UInt64 + +デフォルト値: 1000 + +è¡Œã”ã¨ã«å˜ä¸€ã®æ­£è¦è¡¨ç¾ã®æœ€å¤§ãƒžãƒƒãƒæ•°ã‚’設定ã—ã¾ã™ã€‚[extractAllGroupsHorizontal](../../sql-reference/functions/string-search-functions.md/#extractallgroups-horizontal)関数ã§æ¬²å¼µã‚Šãªæ­£è¦è¡¨ç¾ã‚’使用ã™ã‚‹éš›ã®ãƒ¡ãƒ¢ãƒªéŽè² è·ã‹ã‚‰ä¿è­·ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ + +## reject_expensive_hyperscan_regexps {#reject_expensive_hyperscan_regexps} + +タイプ: Bool + +デフォルト値: 1 + +ãƒã‚¤ãƒ‘ースキャンã§è©•ä¾¡ã™ã‚‹ã®ãŒé«˜ã‚³ã‚¹ãƒˆã«ãªã‚‹ã¨è€ƒãˆã‚‰ã‚Œã‚‹ãƒ‘ターンを拒å¦ã—ã¾ã™ï¼ˆNFA状態ã®çˆ†ç™ºã«ã‚ˆã‚‹ï¼‰ã€‚ + +## remerge_sort_lowered_memory_bytes_ratio {#remerge_sort_lowered_memory_bytes_ratio} + +タイプ: Float + +デフォルト値: 2 + +å†ãƒžãƒ¼ã‚¸å¾Œã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ãŒã“ã®æ¯”率ã§æ¸›å°‘ã—ãªã„å ´åˆã€å†ãƒžãƒ¼ã‚¸ã¯ç„¡åŠ¹åŒ–ã•ã‚Œã¾ã™ã€‚ + +## remote_filesystem_read_method {#remote_filesystem_read_method} + +タイプ: String + +デフォルト値: threadpool + +リモートファイルシステムã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–る方法。readã¾ãŸã¯threadpoolã®ã„ãšã‚Œã‹ã€‚ + +## remote_filesystem_read_prefetch {#remote_filesystem_read_prefetch} + +タイプ: Bool + +デフォルト値: 1 + +リモートファイルシステムã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹éš›ã«ãƒ—リフェッãƒã‚’使用ã™ã¹ãã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚ + +## remote_fs_read_backoff_max_tries {#remote_fs_read_backoff_max_tries} + +タイプ: UInt64 + +デフォルト値: 5 + +ãƒãƒƒã‚¯ã‚ªãƒ•ã®ãŸã‚ã®æœ€å¤§èª­ã¿å–り試行回数ã§ã™ã€‚ + +## remote_fs_read_max_backoff_ms {#remote_fs_read_max_backoff_ms} + +タイプ: UInt64 + +デフォルト値: 10000 + +リモートディスクã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚ã†ã¨ã™ã‚‹éš›ã®æœ€å¤§å¾…機時間ã§ã™ã€‚ + +## remote_read_min_bytes_for_seek {#remote_read_min_bytes_for_seek} + +タイプ: UInt64 + +デフォルト値: 4194304 + +リモート読ã¿å–り(URLã€S3)ã§seekを実行ã™ã‚‹ãŸã‚ã«å¿…è¦ãªæœ€å°ãƒã‚¤ãƒˆæ•°ã§ã‚ã‚Šã€ç„¡è¦–ã—ã¦èª­ã¿å–らãšã«å®Ÿè¡Œã—ã¾ã™ã€‚ + +## rename_files_after_processing {#rename_files_after_processing} + +タイプ: String + +デフォルト値: + +- **タイプ:** String + +- **デフォルト値:** 空ã®æ–‡å­—列 + +ã“ã®è¨­å®šã«ã‚ˆã‚Šã€`file`テーブル関数ã«ã‚ˆã£ã¦å‡¦ç†ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒªãƒãƒ¼ãƒ ãƒ‘ターンを指定ã§ãã¾ã™ã€‚オプションãŒè¨­å®šã•ã‚Œã‚‹ã¨ã€`file`テーブル関数ã«ã‚ˆã£ã¦èª­ã¿å–られãŸã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€å‡¦ç†ãŒæˆåŠŸã—ãŸå ´åˆã«æŒ‡å®šã•ã‚ŒãŸãƒ‘ターンã«å¾“ã£ã¦ãƒ—レースホルダ付ãã§ãƒªãƒãƒ¼ãƒ ã•ã‚Œã¾ã™ã€‚ + +### プレースホルダ + +- `%a` — 完全ãªå…ƒã®ãƒ•ã‚¡ã‚¤ãƒ«å(例: "sample.csv")。 +- `%f` — æ‹¡å¼µå­ãªã—ã®å…ƒã®ãƒ•ã‚¡ã‚¤ãƒ«å(例: "sample")。 +- `%e` — å…ƒã®ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‹¡å¼µå­ï¼ˆä¾‹: ".csv")。 +- `%t` — タイムスタンプ(マイクロ秒)。 +- `%%` — ãƒ‘ãƒ¼ã‚»ãƒ³ãƒˆè¨˜å· ("%")。 + +### 例 +- オプション: `--rename_files_after_processing="processed_%f_%t%e"` + +- クエリ: `SELECT * FROM file('sample.csv')` + +`sample.csv`ã®èª­ã¿å–ã‚ŠãŒæˆåŠŸã—ãŸå ´åˆã€ãƒ•ã‚¡ã‚¤ãƒ«ã¯`processed_sample_1683473210851438.csv`ã«ãƒªãƒãƒ¼ãƒ ã•ã‚Œã¾ã™ã€‚ + +## replace_running_query {#replace_running_query} + +タイプ: Bool + +デフォルト値: 0 + +HTTPインターフェースを使用ã™ã‚‹éš›ã€'query_id'パラメータを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¯ã‚¨ãƒªã®è­˜åˆ¥å­ã¨ã—ã¦æ©Ÿèƒ½ã™ã‚‹ä»»æ„ã®æ–‡å­—列ã§ã™ã€‚ +ã“ã®æ™‚ã€åŒã˜ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰åŒã˜'query_id'ã®ã‚¯ã‚¨ãƒªãŒã™ã§ã«å­˜åœ¨ã™ã‚‹å ´åˆã€å‹•ä½œã¯'replace_running_query'パラメータã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ + +`0`(デフォルト) – 例外をスローã—ã€åŒã˜'query_id'ã®ã‚¯ã‚¨ãƒªãŒã™ã§ã«å®Ÿè¡Œä¸­ã®å ´åˆã€ãã®ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã›ã‚“。 + +`1` – å¤ã„クエリをキャンセルã—ã€æ–°ã—ã„クエリを実行ã—始ã‚ã¾ã™ã€‚ + +ã“ã®ãƒ‘ラメータを1ã«è¨­å®šã™ã‚‹ã¨ã‚»ã‚°ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³æ¡ä»¶ã®æ案を実装ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚次ã®æ–‡å­—を入力ã™ã‚‹ã¨ã€å¤ã„クエリãŒã¾ã å®Œäº†ã—ã¦ã„ãªã‘ã‚Œã°ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ + +## replace_running_query_max_wait_ms {#replace_running_query_max_wait_ms} + +タイプ: ミリ秒 + +デフォルト値: 5000 + +[replace_running_query](#replace-running-query)設定ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªå ´åˆã€åŒã˜`query_id`ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã®ã‚’å¾…ã¤ãŸã‚ã®æ™‚é–“ã§ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — åŒã˜`query_id`ã®ã‚¯ã‚¨ãƒªãŒæ—¢ã«å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹å ´åˆã€æ–°ã—ã„クエリを実行ã™ã‚‹ã“ã¨ã‚’許å¯ã—ãªã„例外をスローã—ã¾ã™ã€‚ + +## replication_wait_for_inactive_replica_timeout {#replication_wait_for_inactive_replica_timeout} + +タイプ: Int64 + +デフォルト値: 120 + +éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リカãŒ[ALTER](../../sql-reference/statements/alter/index.md)ã€[OPTIMIZE](../../sql-reference/statements/optimize.md)ã€ã¾ãŸã¯[TRUNCATE](../../sql-reference/statements/truncate.md)クエリを実行ã™ã‚‹ã®ã‚’å¾…ã¤æ™‚間(秒å˜ä½ï¼‰ã‚’指定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- 0 — å¾…æ©Ÿã—ãªã„。 +- è² ã®æ•´æ•° — 無制é™ã«å¾…機。 +- æ­£ã®æ•´æ•° — å¾…æ©Ÿã™ã‚‹ç§’数。 + +## restore_replace_external_dictionary_source_to_null {#restore_replace_external_dictionary_source_to_null} + +タイプ: Bool + +デフォルト値: 0 + +復元時ã«å¤–部DictionaryソースをNullã«ç½®ãæ›ãˆã¾ã™ã€‚テスト目的ã«æœ‰ç”¨ã§ã™ã€‚ + +## restore_replace_external_engines_to_null {#restore_replace_external_engines_to_null} + +タイプ: Bool + +デフォルト値: 0 + +テスト目的ã®ãŸã‚。ã™ã¹ã¦ã®å¤–部エンジンをNullã«ç½®ãæ›ãˆã€å¤–部接続を開始ã—ãªã„よã†ã«ã—ã¾ã™ã€‚ + +## restore_replace_external_table_functions_to_null {#restore_replace_external_table_functions_to_null} + +タイプ: Bool + +デフォルト値: 0 + +テスト目的ã®ãŸã‚。ã™ã¹ã¦ã®å¤–部テーブル関数をNullã«ç½®ãæ›ãˆã€å¤–部接続を開始ã—ãªã„よã†ã«ã—ã¾ã™ã€‚ + +## result_overflow_mode {#result_overflow_mode} + +タイプ: OverflowMode + +デフォルト値: throw + +制é™ã‚’超ãˆãŸå ´åˆã®å‡¦ç†ã®æ–¹æ³•ã§ã™ã€‚ + +## rewrite_count_distinct_if_with_count_distinct_implementation {#rewrite_count_distinct_if_with_count_distinct_implementation} + +タイプ: Bool + +デフォルト値: 0 + +`countDistcintIf`ã‚’[count_distinct_implementation](#count_distinct_implementation)設定ã§æ›¸ãæ›ãˆã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š + +- true — 許å¯ã€‚ +- false — ä¸è¨±å¯ã€‚ + +## s3_allow_parallel_part_upload {#s3_allow_parallel_part_upload} + +タイプ: Bool + +デフォルト値: 1 + +S3ã®ãƒžãƒ«ãƒãƒ‘ートアップロードã«è¤‡æ•°ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’使用ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚ãšã‹ã«ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ãŒå¢—加ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## s3_check_objects_after_upload {#s3_check_objects_after_upload} + +タイプ: Bool + +デフォルト値: 0 + +アップロードãŒæˆåŠŸã—ãŸã“ã¨ã‚’確èªã™ã‚‹ãŸã‚ã«ã€HEADリクエストã§ã‚¢ãƒƒãƒ—ロードã•ã‚ŒãŸå„オブジェクトをS3ã«ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +## s3_connect_timeout_ms {#s3_connect_timeout_ms} + +タイプ: UInt64 + +デフォルト値: 1000 + +S3ディスクã®ãƒ›ã‚¹ãƒˆã¸ã®æŽ¥ç¶šã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã§ã™ã€‚ + +## s3_create_new_file_on_insert {#s3_create_new_file_on_insert} + +タイプ: Bool + +デフォルト値: 0 + +S3エンジンテーブルã¸ã®å„挿入時ã«æ–°ã—ã„ファイルを作æˆã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚有効ã«ã™ã‚‹ã¨ã€å„挿入ã§æ¬¡ã®ãƒ‘ターンã«ä¼¼ãŸæ–°ã—ã„S3オブジェクトãŒä½œæˆã•ã‚Œã¾ã™ï¼š + +åˆæœŸ: `data.Parquet.gz` -> `data.1.Parquet.gz` -> `data.2.Parquet.gz`ãªã©ã€‚ + +å¯èƒ½ãªå€¤ï¼š +- 0 — `INSERT`クエリã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€å¾Œã«æ–°ã—ã„データを追加ã—ã¾ã™ã€‚ +- 1 — `INSERT`クエリã¯æ–°ã—ã„ファイルを作æˆã—ã¾ã™ã€‚ + +## s3_disable_checksum {#s3_disable_checksum} + +タイプ: Bool + +デフォルト値: 0 + +ファイルをS3ã«é€ä¿¡ã™ã‚‹éš›ã«ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’計算ã—ãªã„。ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ã«éŽå‰°ãªå‡¦ç†ãŒã‹ã‹ã‚‹ã®ã‚’é¿ã‘ã€æ›¸ãè¾¼ã¿é€Ÿåº¦ãŒå‘上ã—ã¾ã™ã€‚MergeTreeテーブルã®ãƒ‡ãƒ¼ã‚¿ã¯ClickHouseã«ã‚ˆã£ã¦ã™ã§ã«ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€ä¸»ã«å®‰å…¨ã§ã™ã€‚ã¾ãŸã€S3ã«HTTPSã§ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å ´åˆã€TLSレイヤーã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’介ã—ã¦ã®è»¢é€ä¸­ã«æ•´åˆæ€§ã‚’æä¾›ã—ã¾ã™ã€‚S3ã«è¿½åŠ ã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’計算ã™ã‚‹ã“ã¨ã§ã€æ·±å±¤é˜²å¾¡ã‚’æä¾›ã—ã¾ã™ã€‚ + +## s3_ignore_file_doesnt_exist {#s3_ignore_file_doesnt_exist} + +タイプ: Bool + +デフォルト値: 0 + +特定ã®ã‚­ãƒ¼ã‚’読ã¿å–ã‚‹ã¨ãã«ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã—ãªã„å ´åˆã®ç„¡è¦–動作ã§ã™ã€‚ + +å¯èƒ½ãªå€¤ï¼š +- 1 — `SELECT`ã¯ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ +- 0 — `SELECT`ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## s3_list_object_keys_size {#s3_list_object_keys_size} + +タイプ: UInt64 + +デフォルト値: 1000 + +ListObjectリクエストã«ã‚ˆã£ã¦ãƒãƒƒãƒã§è¿”ã•ã‚Œã‚‹å¯èƒ½æ€§ã®ã‚る最大ファイル数ã§ã™ã€‚ + +## s3_max_connections {#s3_max_connections} + +タイプ: UInt64 + +デフォルト値: 1024 + +サーãƒãƒ¼ã”ã¨ã®æœ€å¤§æŽ¥ç¶šæ•°ã§ã™ã€‚ + +## s3_max_get_burst {#s3_max_get_burst} + +タイプ: UInt64 + +デフォルト値: 0 + +リクエストã”ã¨ã®ç§’ã®åˆ¶é™ã«é”ã™ã‚‹å‰ã«åŒæ™‚ã«ç™ºè¡Œã§ãるリクエストã®æœ€å¤§æ•°ã€‚デフォルト(0)ã¯`s3_max_get_rps`ã«ç­‰ã—ã„ã§ã™ã€‚ + +## s3_max_get_rps {#s3_max_get_rps} + +タイプ: UInt64 + +デフォルト値: 0 + +スロットリングã®å‰ã®S3 GETリクエストã®æ¯Žç§’ã®åˆ¶é™ã€‚ゼロã¯ç„¡é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## s3_max_inflight_parts_for_one_file {#s3_max_inflight_parts_for_one_file} + +タイプ: UInt64 + +デフォルト値: 20 + +マルãƒãƒ‘ートアップロードリクエストã§åŒæ™‚ã«èª­ã¿è¾¼ã¾ã‚Œã‚‹éƒ¨åˆ†ã®æœ€å¤§æ•°ã€‚0ã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## s3_max_part_number {#s3_max_part_number} + +タイプ: UInt64 + +デフォルト値: 10000 +``` +```html +最大部分番å·æ•°ã®s3アップロード部分。 + +## s3_max_put_burst {#s3_max_put_burst} + +タイプ: UInt64 + +デフォルト値: 0 + +リクエスト毎秒制é™ã«é”ã™ã‚‹å‰ã«åŒæ™‚ã«ç™ºè¡Œã§ãる最大リクエスト数。デフォルト値ã¯ï¼ˆ0)ã¯`s3_max_put_rps`ã¨ç­‰ã—ã„。 + +## s3_max_put_rps {#s3_max_put_rps} + +タイプ: UInt64 + +デフォルト値: 0 + +スロットリングå‰ã®S3 PUTリクエスト毎秒ã®åˆ¶é™ã€‚ゼロã¯ç„¡åˆ¶é™ã‚’æ„味ã—ã¾ã™ã€‚ + +## s3_max_redirects {#s3_max_redirects} + +タイプ: UInt64 + +デフォルト値: 10 + +許å¯ã•ã‚Œã‚‹æœ€å¤§S3リダイレクトホップ数。 + +## s3_max_single_operation_copy_size {#s3_max_single_operation_copy_size} + +タイプ: UInt64 + +デフォルト値: 33554432 + +s3ã«ãŠã‘ã‚‹å˜ä¸€ã‚³ãƒ”ーæ“作ã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ + +## s3_max_single_part_upload_size {#s3_max_single_part_upload_size} + +タイプ: UInt64 + +デフォルト値: 33554432 + +S3ã«å¯¾ã—ã¦å˜ä¸€éƒ¨åˆ†ã‚¢ãƒƒãƒ—ロードを使用ã—ã¦ã‚¢ãƒƒãƒ—ロードã™ã‚‹ã‚ªãƒ–ジェクトã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ + +## s3_max_single_read_retries {#s3_max_single_read_retries} + +タイプ: UInt64 + +デフォルト値: 4 + +å˜ä¸€ã®S3読ã¿å–り中ã®æœ€å¤§ãƒªãƒˆãƒ©ã‚¤å›žæ•°ã€‚ + +## s3_max_unexpected_write_error_retries {#s3_max_unexpected_write_error_retries} + +タイプ: UInt64 + +デフォルト値: 4 + +S3書ãè¾¼ã¿ä¸­ã®äºˆæœŸã—ãªã„エラーãŒç™ºç”Ÿã—ãŸå ´åˆã®æœ€å¤§ãƒªãƒˆãƒ©ã‚¤å›žæ•°ã€‚ + +## s3_max_upload_part_size {#s3_max_upload_part_size} + +タイプ: UInt64 + +デフォルト値: 5368709120 + +マルãƒãƒ‘ートアップロード中ã«S3ã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹éƒ¨åˆ†ã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ + +## s3_min_upload_part_size {#s3_min_upload_part_size} + +タイプ: UInt64 + +デフォルト値: 16777216 + +マルãƒãƒ‘ートアップロード中ã«S3ã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹éƒ¨åˆ†ã®æœ€å°ã‚µã‚¤ã‚ºã€‚ + +## s3_request_timeout_ms {#s3_request_timeout_ms} + +タイプ: UInt64 + +デフォルト値: 30000 + +S3ã¨ã®ãƒ‡ãƒ¼ã‚¿ã®é€å—ä¿¡ã«é–¢ã™ã‚‹ã‚¢ã‚¤ãƒ‰ãƒªãƒ³ã‚°ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚å˜ä¸€ã®TCP読ã¿å–ã‚Šã¾ãŸã¯æ›¸ãè¾¼ã¿å‘¼ã³å‡ºã—ãŒã“ã®æ™‚間ブロックã•ã‚Œã‚‹ã¨å¤±æ•—ã—ã¾ã™ã€‚ + +## s3_retry_attempts {#s3_retry_attempts} + +タイプ: UInt64 + +デフォルト値: 100 + +Aws::Client::RetryStrategyã®è¨­å®šã€‚Aws::Clientã¯è‡ªå‹•çš„ã«ãƒªãƒˆãƒ©ã‚¤ã‚’è¡Œã„ã€0ã¯ãƒªãƒˆãƒ©ã‚¤ãªã—ã‚’æ„味ã—ã¾ã™ã€‚ + +## s3_skip_empty_files {#s3_skip_empty_files} + +タイプ: Bool + +デフォルト値: 0 + +[S3](../../engines/table-engines/integrations/s3.md)エンジンテーブルã§ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã‹ã©ã†ã‹ã®è¨­å®šã€‚ + +å¯èƒ½ãªå€¤: +- 0 — 空ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒè¦æ±‚ã•ã‚ŒãŸå½¢å¼ã¨äº’æ›æ€§ãŒãªã„å ´åˆã€`SELECT`ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ +- 1 — 空ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã—ã¦ç©ºã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## s3_strict_upload_part_size {#s3_strict_upload_part_size} + +タイプ: UInt64 + +デフォルト値: 0 + +マルãƒãƒ‘ートアップロード中ã«S3ã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹éƒ¨åˆ†ã®æ­£ç¢ºãªã‚µã‚¤ã‚ºï¼ˆã„ãã¤ã‹ã®å®Ÿè£…ã¯å¯å¤‰ã‚µã‚¤ã‚ºéƒ¨åˆ†ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“)。 + +## s3_throw_on_zero_files_match {#s3_throw_on_zero_files_match} + +タイプ: Bool + +デフォルト値: 0 + +ListObjectsリクエストãŒãƒ•ã‚¡ã‚¤ãƒ«ã«ä¸€è‡´ã—ãªã„å ´åˆã«ã‚¨ãƒ©ãƒ¼ã‚’スローã—ã¾ã™ã€‚ + +## s3_truncate_on_insert {#s3_truncate_on_insert} + +タイプ: Bool + +デフォルト値: 0 + +s3エンジンテーブルã¸ã®æŒ¿å…¥ã®å‰ã«ãƒˆãƒ©ãƒ³ã‚±ãƒ¼ãƒˆã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚無効ã«ã™ã‚‹ã¨ã€æ—¢ã«S3オブジェクトãŒå­˜åœ¨ã™ã‚‹å ´åˆã€æŒ¿å…¥è©¦è¡Œæ™‚ã«ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 0 — `INSERT`クエリã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ«å°¾ã«æ–°ã—ã„データを追加ã—ã¾ã™ã€‚ +- 1 — `INSERT`クエリã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æ—¢å­˜ã®å†…容を新ã—ã„データã§ç½®ãæ›ãˆã¾ã™ã€‚ + +## s3_upload_part_size_multiply_factor {#s3_upload_part_size_multiply_factor} + +タイプ: UInt64 + +デフォルト値: 2 + +s3_multiply_parts_count_thresholdã‹ã‚‰ã®å˜ä¸€æ›¸ãè¾¼ã¿ã§ã‚¢ãƒƒãƒ—ロードã•ã‚ŒãŸå„回ã®s3_min_upload_part_sizeã‚’ã“ã®ä¿‚æ•°ã§æŽ›ã‘ã¾ã™ã€‚ + +## s3_upload_part_size_multiply_parts_count_threshold {#s3_upload_part_size_multiply_parts_count_threshold} + +タイプ: UInt64 + +デフォルト値: 500 + +ã“ã®æ•°ã®éƒ¨åˆ†ãŒS3ã«ã‚¢ãƒƒãƒ—ロードã•ã‚Œã‚‹ãŸã³ã«ã€s3_min_upload_part_sizeã¯s3_upload_part_size_multiply_factorã§ä¹—ç®—ã•ã‚Œã¾ã™ã€‚ + +## s3_use_adaptive_timeouts {#s3_use_adaptive_timeouts} + +タイプ: Bool + +デフォルト値: 1 + +`true`ã«è¨­å®šã™ã‚‹ã¨ã€ã™ã¹ã¦ã®s3リクエストã«å¯¾ã—ã¦æœ€åˆã®2回ã®è©¦è¡ŒãŒä½Žã„é€ä¿¡ãŠã‚ˆã³å—信タイムアウトã§è¡Œã‚ã‚Œã¾ã™ã€‚ +`false`ã«è¨­å®šã™ã‚‹ã¨ã€ã™ã¹ã¦ã®è©¦è¡ŒãŒåŒä¸€ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã§è¡Œã‚ã‚Œã¾ã™ã€‚ + +## s3_validate_request_settings {#s3_validate_request_settings} + +タイプ: Bool + +デフォルト値: 1 + +s3リクエスト設定ã®æ¤œè¨¼ã‚’有効ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: +- 1 — 設定を検証ã—ã¾ã™ã€‚ +- 0 — 設定を検証ã—ã¾ã›ã‚“。 + +## s3queue_default_zookeeper_path {#s3queue_default_zookeeper_path} + +タイプ: String + +デフォルト値: /clickhouse/s3queue/ + +S3Queueエンジンã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ZooKeeperパスプレフィックス。 + +## s3queue_enable_logging_to_s3queue_log {#s3queue_enable_logging_to_s3queue_log} + +タイプ: Bool + +デフォルト値: 0 + +system.s3queue_logã¸ã®æ›¸ãè¾¼ã¿ã‚’有効ã«ã—ã¾ã™ã€‚ã“ã®å€¤ã¯ãƒ†ãƒ¼ãƒ–ル設定ã§ä¸Šæ›¸ãã§ãã¾ã™ã€‚ + +## schema_inference_cache_require_modification_time_for_url {#schema_inference_cache_require_modification_time_for_url} + +タイプ: Bool + +デフォルト値: 1 + +最終変更時刻ã®æ¤œè¨¼ãŒå¿…è¦ãªURLã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã—ã¾ã™ï¼ˆLast-ModifiedヘッダーをæŒã¤URLã®å ´åˆï¼‰ã€‚ + +## schema_inference_use_cache_for_azure {#schema_inference_use_cache_for_azure} + +タイプ: Bool + +デフォルト値: 1 + +Azureテーブル関数を使用ã—ã¦ã„ã‚‹é–“ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¾ã™ã€‚ + +## schema_inference_use_cache_for_file {#schema_inference_use_cache_for_file} + +タイプ: Bool + +デフォルト値: 1 + +ファイルテーブル関数を使用ã—ã¦ã„ã‚‹é–“ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¾ã™ã€‚ + +## schema_inference_use_cache_for_hdfs {#schema_inference_use_cache_for_hdfs} + +タイプ: Bool + +デフォルト値: 1 + +HDFSテーブル関数を使用ã—ã¦ã„ã‚‹é–“ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¾ã™ã€‚ + +## schema_inference_use_cache_for_s3 {#schema_inference_use_cache_for_s3} + +タイプ: Bool + +デフォルト値: 1 + +S3テーブル関数を使用ã—ã¦ã„ã‚‹é–“ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¾ã™ã€‚ + +## schema_inference_use_cache_for_url {#schema_inference_use_cache_for_url} + +タイプ: Bool + +デフォルト値: 1 + +URLテーブル関数を使用ã—ã¦ã„ã‚‹é–“ã€ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¾ã™ã€‚ + +## select_sequential_consistency {#select_sequential_consistency} + +タイプ: UInt64 + +デフォルト値: 0 + +:::note +ã“ã®è¨­å®šã¯SharedMergeTreeã¨ReplicatedMergeTreeã§ã®æŒ™å‹•ãŒç•°ãªã‚Šã¾ã™ã€‚[SharedMergeTreeã®æ•´åˆæ€§](/docs/ja/cloud/reference/shared-merge-tree/#consistency)ã‚’å‚ç…§ã—ã¦ã€SharedMergeTreeã«ãŠã‘ã‚‹`select_sequential_consistency`ã®æŒ™å‹•ã«ã¤ã„ã¦ã®è©³ç´°ã‚’確èªã—ã¦ãã ã•ã„。 +::: + +`SELECT`クエリã«å¯¾ã™ã‚‹é€£ç¶šæ•´åˆæ€§ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚`insert_quorum_parallel`ãŒç„¡åŠ¹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯æœ‰åŠ¹ï¼‰ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +使用方法 + +連続整åˆæ€§ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒ`insert_quorum`ã§å®Ÿè¡Œã•ã‚ŒãŸã™ã¹ã¦ã®å‰å›žã®`INSERT`クエリã§ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ¬ãƒ—リカã«å¯¾ã—ã¦ã®ã¿`SELECT`クエリを実行ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚クライアントãŒéƒ¨åˆ†çš„ãªãƒ¬ãƒ—リカをå‚ç…§ã™ã‚‹å ´åˆã€ClickHouseã¯ä¾‹å¤–を生æˆã—ã¾ã™ã€‚SELECTクエリã¯ã€ã¾ã ãƒ¬ãƒ—リカã®ã‚¯ã‚©ãƒ©ãƒ ã«æ›¸ãè¾¼ã¾ã‚Œã¦ã„ãªã„データをå«ã‚ã¾ã›ã‚“。 + +`insert_quorum_parallel`ãŒæœ‰åŠ¹ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ã§ã‚ã‚‹å ´åˆã€`select_sequential_consistency`ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。ã“ã‚Œã¯ã€ä¸¦è¡Œã™ã‚‹`INSERT`クエリãŒç•°ãªã‚‹ãƒ¬ãƒ—リカã®ã‚»ãƒƒãƒˆã«æ›¸ãè¾¼ã¾ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€å˜ä¸€ã®ãƒ¬ãƒ—リカãŒã™ã¹ã¦ã®æ›¸ãè¾¼ã¿ã‚’å—ã‘å–ã£ãŸä¿è¨¼ãŒãªã„ã‹ã‚‰ã§ã™ã€‚ + +関連情報: + +- [insert_quorum](#insert_quorum) +- [insert_quorum_timeout](#insert_quorum_timeout) +- [insert_quorum_parallel](#insert_quorum_parallel) + +## send_logs_level {#send_logs_level} + +タイプ: LogsLevel + +デフォルト値: fatal + +指定ã•ã‚ŒãŸæœ€å°ãƒ¬ãƒ™ãƒ«ã®ã‚µãƒ¼ãƒãƒ¼ãƒ†ã‚­ã‚¹ãƒˆãƒ­ã‚°ã‚’クライアントã«é€ä¿¡ã—ã¾ã™ã€‚有効ãªå€¤: 'trace', 'debug', 'information', 'warning', 'error', 'fatal', 'none' + +## send_logs_source_regexp {#send_logs_source_regexp} + +タイプ: String + +デフォルト値: + +指定ã•ã‚ŒãŸæ­£è¦è¡¨ç¾ã«ä¸€è‡´ã™ã‚‹ãƒ­ã‚°ã‚½ãƒ¼ã‚¹åã‚’æŒã¤ã‚µãƒ¼ãƒãƒ¼ãƒ†ã‚­ã‚¹ãƒˆãƒ­ã‚°ã‚’é€ä¿¡ã—ã¾ã™ã€‚空ã¯ã™ã¹ã¦ã®ã‚½ãƒ¼ã‚¹ã‚’æ„味ã—ã¾ã™ã€‚ + +## send_progress_in_http_headers {#send_progress_in_http_headers} + +タイプ: Bool + +デフォルト値: 0 + +`clickhouse-server`ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã«`X-ClickHouse-Progress` HTTPレスãƒãƒ³ã‚¹ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +詳細ã«ã¤ã„ã¦ã¯ã€[HTTPインターフェースã®èª¬æ˜Ž](../../interfaces/http.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +## send_timeout {#send_timeout} + +タイプ: 秒 + +デフォルト値: 300 + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¸ã®ãƒ‡ãƒ¼ã‚¿é€ä¿¡ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆç§’å˜ä½ï¼‰ã€‚クライアントãŒãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŒã€ã“ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«å†…ã«ãƒã‚¤ãƒˆã‚’é€ä¿¡ã§ããªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã‚’クライアントã§è¨­å®šã™ã‚‹ã¨ã€ã‚½ã‚±ãƒƒãƒˆã®'receive_timeout'もサーãƒãƒ¼ã®å¯¾å¿œã™ã‚‹æŽ¥ç¶šå´ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ + +## session_timezone {#session_timezone} + +タイプ: タイムゾーン + +デフォルト値: + +ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¾ãŸã¯ã‚¯ã‚¨ãƒªã®æš—é»™ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’設定ã—ã¾ã™ã€‚ +æš—é»™ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯ã€æ˜Žç¤ºçš„ã«æŒ‡å®šã•ã‚ŒãŸã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒãªã„DateTime/DateTime64åž‹ã®å€¤ã«é©ç”¨ã•ã‚Œã‚‹ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§ã™ã€‚ +ã“ã®è¨­å®šã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ«ã«è¨­å®šã•ã‚ŒãŸï¼ˆã‚µãƒ¼ãƒãƒ¼ãƒ¬ãƒ™ãƒ«ã®ï¼‰æš—é»™ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚ˆã‚Šã‚‚優先ã•ã‚Œã¾ã™ã€‚ +''(空ã®æ–‡å­—列)ã®å€¤ã¯ã€ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¾ãŸã¯ã‚¯ã‚¨ãƒªã®æš—é»™ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒ[サーãƒãƒ¼ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³](../server-configuration-parameters/settings.md#timezone)ã¨ç­‰ã—ã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +`timeZone()`ãŠã‚ˆã³`serverTimeZone()`関数を使用ã—ã¦ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¨ã‚µãƒ¼ãƒãƒ¼ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’å–å¾—ã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- `system.time_zones`ã‹ã‚‰ã®ä»»æ„ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³åã€ä¾‹ãˆã°`Europe/Berlin`ã€`UTC`ã€ã¾ãŸã¯`Zulu`。 + +例: + +```sql +SELECT timeZone(), serverTimeZone() FORMAT CSV + +"Europe/Berlin","Europe/Berlin" +``` + +```sql +SELECT timeZone(), serverTimeZone() SETTINGS session_timezone = 'Asia/Novosibirsk' FORMAT CSV + +"Asia/Novosibirsk","Europe/Berlin" +``` + +セッションタイムゾーン'America/Denver'を明示的ã«æŒ‡å®šã•ã‚Œã¦ã„ãªã„内å´ã®DateTimeã«å‰²ã‚Šå½“ã¦: + +```sql +SELECT toDateTime64(toDateTime64('1999-12-12 23:23:23.123', 3), 3, 'Europe/Zurich') SETTINGS session_timezone = 'America/Denver' FORMAT TSV + +1999-12-13 07:23:23.123 +``` + +:::warning +DateTime/DateTime64を解æžã™ã‚‹ã™ã¹ã¦ã®é–¢æ•°ãŒ`session_timezone`ã‚’å°Šé‡ã™ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã«ã‚ˆã‚Šå¾®å¦™ãªã‚¨ãƒ©ãƒ¼ãŒç”Ÿã˜ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +以下ã®ä¾‹ã¨èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +```sql +CREATE TABLE test_tz (`d` DateTime('UTC')) ENGINE = Memory AS SELECT toDateTime('2000-01-01 00:00:00', 'UTC'); + +SELECT *, timeZone() FROM test_tz WHERE d = toDateTime('2000-01-01 00:00:00') SETTINGS session_timezone = 'Asia/Novosibirsk' +0 rows in set. + +SELECT *, timeZone() FROM test_tz WHERE d = '2000-01-01 00:00:00' SETTINGS session_timezone = 'Asia/Novosibirsk' +┌───────────────────d─┬─timeZone()───────┠+│ 2000-01-01 00:00:00 │ Asia/Novosibirsk │ +└─────────────────────┴──────────────────┘ +``` + +ã“ã‚Œã¯ç•°ãªã‚‹è§£æžãƒ‘イプラインã«ã‚ˆã‚‹ã‚‚ã®ã§ã™: + +- 明示的ã«ä¸Žãˆã‚‰ã‚ŒãŸã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãªã—ã§ä½¿ç”¨ã•ã‚Œã‚‹`toDateTime()`ã¯ã€æœ€åˆã®`SELECT`クエリã§`session_timezone`ã¨ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã®è¨­å®šã‚’å°Šé‡ã—ã¾ã™ã€‚ +- 2番目ã®ã‚¯ã‚¨ãƒªã§ã¯ã€æ–‡å­—列ã‹ã‚‰DateTimeãŒè§£æžã•ã‚Œã€æ—¢å­˜ã®ã‚«ãƒ©ãƒ `d`ã®åž‹ã¨ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’引ã継ãŽã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€`session_timezone`ã¨ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã®è¨­å®šã¯å°Šé‡ã•ã‚Œã¾ã›ã‚“。 + +**関連情報** + +- [timezone](../server-configuration-parameters/settings.md#timezone) + +## set_overflow_mode {#set_overflow_mode} + +タイプ: OverflowMode + +デフォルト値: throw + +制é™ã‚’超ãˆãŸéš›ã«ä½•ã‚’ã™ã‚‹ã‹ã€‚ + +## short_circuit_function_evaluation {#short_circuit_function_evaluation} + +タイプ: ShortCircuitFunctionEvaluation + +デフォルト値: enable + +[if](../../sql-reference/functions/conditional-functions.md/#if)ã€[multiIf](../../sql-reference/functions/conditional-functions.md/#multiif)ã€[and](../../sql-reference/functions/logical-functions.md/#logical-and-function)ã€ãŠã‚ˆã³[or](../../sql-reference/functions/logical-functions.md/#logical-or-function)関数を短絡的ã«è¨ˆç®—ã§ãるよã†ã«ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã“れらã®é–¢æ•°å†…ã®è¤‡é›‘ãªå¼ã®å®Ÿè¡Œã‚’最é©åŒ–ã—ã€äºˆæœŸã—ãªã„例外(ゼロ除算ãªã©ï¼‰ã‚’防ãã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- `enable` — é©ç”¨å¯èƒ½ãªé–¢æ•°ã«å¯¾ã—ã¦çŸ­çµ¡è©•ä¾¡ãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ï¼ˆä¾‹å¤–をスローã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã‹ã€è¨ˆç®—コストã®é«˜ã„å ´åˆï¼‰ã€‚ +- `force_enable` — ã™ã¹ã¦ã®é–¢æ•°ã«å¯¾ã—ã¦çŸ­çµ¡è©•ä¾¡ãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ +- `disable` — 短絡評価ãŒç„¡åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +## show_table_uuid_in_table_create_query_if_not_nil {#show_table_uuid_in_table_create_query_if_not_nil} + +タイプ: Bool + +デフォルト値: 0 + +`SHOW TABLE`クエリã®è¡¨ç¤ºã‚’設定ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — クエリã¯ãƒ†ãƒ¼ãƒ–ルUUIDãªã—ã§è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ +- 1 — クエリã¯ãƒ†ãƒ¼ãƒ–ルUUID付ãã§è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +## single_join_prefer_left_table {#single_join_prefer_left_table} + +タイプ: Bool + +デフォルト値: 1 + +識別å­ã®æ›–昧ã•ãŒã‚ã‚‹å ´åˆã€å˜ä¸€JOINã®å ´åˆã¯å·¦å´ã®ãƒ†ãƒ¼ãƒ–ルを優先ã—ã¾ã™ã€‚ + +## skip_download_if_exceeds_query_cache {#skip_download_if_exceeds_query_cache} + +タイプ: Bool + +デフォルト値: 1 + +クエリキャッシュサイズを超ãˆã‚‹å ´åˆã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‹ã‚‰ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã‚’スキップã—ã¾ã™ã€‚ + +## skip_unavailable_shards {#skip_unavailable_shards} + +タイプ: Bool + +デフォルト値: 0 + +使用ã§ããªã„シャードをé™ã‹ã«ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +シャードã¯ã™ã¹ã¦ã®ãƒ¬ãƒ—リカãŒä½¿ç”¨ã§ããªã„å ´åˆã€ä½¿ç”¨ã§ããªã„ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚レプリカã¯ä»¥ä¸‹ã®çŠ¶æ³ã§ä½¿ç”¨ã§ãã¾ã›ã‚“: + +- ClickHouseãŒä½•ã‚‰ã‹ã®ç†ç”±ã§ãƒ¬ãƒ—リカã«æŽ¥ç¶šã§ããªã„。 + + レプリカã«æŽ¥ç¶šã™ã‚‹éš›ã€ClickHouseã¯ä½•åº¦ã‹è©¦ã¿ã¾ã™ã€‚ã“れらã®ã™ã¹ã¦ã®è©¦ã¿ãŒå¤±æ•—ã—ãŸå ´åˆã€ãã®ãƒ¬ãƒ—リカã¯ä½¿ç”¨ã§ããªã„ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +- レプリカãŒDNS経由ã§è§£æ±ºã§ããªã„。 + + レプリカã®ãƒ›ã‚¹ãƒˆåãŒDNSを介ã—ã¦è§£æ±ºã§ããªã„å ´åˆã€æ¬¡ã®çŠ¶æ³ãŒè€ƒãˆã‚‰ã‚Œã¾ã™: + + - レプリカã®ãƒ›ã‚¹ãƒˆã«DNSレコードãŒãªã„。ã“ã‚Œã¯ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯DNSã‚’æŒã¤ã‚·ã‚¹ãƒ†ãƒ ã§ç™ºç”Ÿã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€[Kubernetes](https://kubernetes.io)ã®ã‚ˆã†ã«ã€ãƒŽãƒ¼ãƒ‰ãŒãƒ€ã‚¦ãƒ³ã‚¿ã‚¤ãƒ ä¸­ã«è§£æ±ºã§ããªã„ã“ã¨ãŒã‚ã‚‹ãŒã€ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + + - 設定エラー。ClickHouseã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã«èª¤ã£ãŸãƒ›ã‚¹ãƒˆåãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — スキップãŒæœ‰åŠ¹ã€‚ + + シャードãŒåˆ©ç”¨ã§ããªããªã£ãŸå ´åˆã€ClickHouseã¯éƒ¨åˆ†çš„ãªãƒ‡ãƒ¼ã‚¿ã«åŸºã¥ã„ãŸçµæžœã‚’è¿”ã—ã€ãƒŽãƒ¼ãƒ‰ã®å¯ç”¨æ€§ã®å•é¡Œã‚’報告ã—ã¾ã›ã‚“。 + +- 0 — スキップãŒç„¡åŠ¹ã€‚ + + シャードãŒåˆ©ç”¨ã§ããªã„å ´åˆã€ClickHouseã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## sleep_after_receiving_query_ms {#sleep_after_receiving_query_ms} + +タイプ: ミリ秒 + +デフォルト値: 0 + +TCPHandler内ã§ã‚¯ã‚¨ãƒªã‚’å—ä¿¡ã—ãŸå¾Œã®ã‚¹ãƒªãƒ¼ãƒ—時間。 + +## sleep_in_send_data_ms {#sleep_in_send_data_ms} + +タイプ: ミリ秒 + +デフォルト値: 0 + +TCPHandler内ã§ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹éš›ã®ã‚¹ãƒªãƒ¼ãƒ—時間。 + +## sleep_in_send_tables_status_ms {#sleep_in_send_tables_status_ms} + +タイプ: ミリ秒 + +デフォルト値: 0 + +TCPHandler内ã§ãƒ†ãƒ¼ãƒ–ルステータス応答をé€ä¿¡ã™ã‚‹éš›ã®ã‚¹ãƒªãƒ¼ãƒ—時間。 + +## sort_overflow_mode {#sort_overflow_mode} + +タイプ: OverflowMode + +デフォルト値: throw + +制é™ã‚’超ãˆãŸéš›ã«ä½•ã‚’ã™ã‚‹ã‹ã€‚ + +## split_intersecting_parts_ranges_into_layers_final {#split_intersecting_parts_ranges_into_layers_final} + +タイプ: Bool + +デフォルト値: 1 + +FINAL最é©åŒ–中ã«äº¤å·®ã™ã‚‹éƒ¨åˆ†ç¯„囲をレイヤーã«åˆ†å‰²ã—ã¾ã™ã€‚ + +## split_parts_ranges_into_intersecting_and_non_intersecting_final {#split_parts_ranges_into_intersecting_and_non_intersecting_final} + +タイプ: Bool + +デフォルト値: 1 + +FINAL最é©åŒ–中ã«éƒ¨åˆ†ç¯„囲を交差ã™ã‚‹éƒ¨åˆ†ã¨äº¤å·®ã—ãªã„部分ã«åˆ†å‰²ã—ã¾ã™ã€‚ + +## splitby_max_substrings_includes_remaining_string {#splitby_max_substrings_includes_remaining_string} + +タイプ: Bool + +デフォルト値: 0 + +引数`max_substrings` > 0ã®[splitBy*()](../../sql-reference/functions/splitting-merging-functions.md)関数ãŒæ®‹ã‚Šã®æ–‡å­—列をçµæžœé…列ã®æœ€å¾Œã®è¦ç´ ã«å«ã‚ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- `0` - 残りã®æ–‡å­—列ã¯çµæžœé…列ã®æœ€å¾Œã®è¦ç´ ã«ã¯å«ã¾ã‚Œã¾ã›ã‚“。 +- `1` - 残りã®æ–‡å­—列ã¯çµæžœé…列ã®æœ€å¾Œã®è¦ç´ ã«å«ã¾ã‚Œã¾ã™ã€‚ã“ã‚Œã¯Sparkã®[`split()`](https://spark.apache.org/docs/3.1.2/api/python/reference/api/pyspark.sql.functions.split.html)関数やPythonã®['string.split()'](https://docs/ja/interfaces/cli)ã¾ãŸã¯[gRPCインターフェース](/docs/ja/interfaces/grpc)ã®å‹•ä½œã§ã™ã€‚ + +## throw_on_error_from_cache_on_write_operations {#throw_on_error_from_cache_on_write_operations} + +タイプ: Bool + +デフォルト値: 0 + +書ãè¾¼ã¿æ“作中(INSERTã€ãƒžãƒ¼ã‚¸ï¼‰ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ã‚¨ãƒ©ãƒ¼ã‚’無視ã—ã¾ã™ã€‚ + +## throw_on_max_partitions_per_insert_block {#throw_on_max_partitions_per_insert_block} + +タイプ: Bool + +デフォルト値: 1 + +max_partitions_per_insert_blockã¨å…±ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚true(デフォルト)ã®å ´åˆã€max_partitions_per_insert_blockã«é”ã—ãŸã¨ãã«ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚falseã®å ´åˆã€ã“ã®é™ç•Œã«é”ã—ãŸæŒ¿å…¥ã‚¯ã‚¨ãƒªã®è©³ç´°ãŒãƒ­ã‚°ã«è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€max_partitions_per_insert_blockを変更ã—ãŸå ´åˆã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¸ã®å½±éŸ¿ã‚’ç†è§£ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +## throw_on_unsupported_query_inside_transaction {#throw_on_unsupported_query_inside_transaction} + +タイプ: Bool + +デフォルト値: 1 + +トランザクション内ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„クエリãŒä½¿ç”¨ã•ã‚Œã‚‹ã¨ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +## timeout_before_checking_execution_speed {#timeout_before_checking_execution_speed} + +タイプ: 秒 + +デフォルト値: 10 + +指定ã•ã‚ŒãŸæ™‚é–“ãŒçµŒéŽã—ãŸå¾Œã€é€Ÿåº¦ãŒã‚ã¾ã‚Šã«ã‚‚低ããªã„ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +## timeout_overflow_mode {#timeout_overflow_mode} + +タイプ: OverflowMode + +デフォルト値: throw + +制é™ã‚’超ãˆãŸéš›ã«ä½•ã‚’ã™ã‚‹ã‹ã€‚ + +## timeout_overflow_mode_leaf {#timeout_overflow_mode_leaf} + +タイプ: OverflowMode + +デフォルト値: throw + +葉制é™ãŒè¶…ãˆãŸéš›ã«ä½•ã‚’ã™ã‚‹ã‹ã€‚ + +## totals_auto_threshold {#totals_auto_threshold} + +タイプ: Float + +デフォルト値: 0.5 + +`totals_mode = 'auto'`ã®é–¾å€¤ã€‚ +「WITH TOTALS修飾å­ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## totals_mode {#totals_mode} + +タイプ: TotalsMode + +デフォルト値: after_having_exclusive + +HAVINGãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ã¾ãŸã¯max_rows_to_group_byãŠã‚ˆã³group_by_overflow_mode = 'any'ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ã©ã®ã‚ˆã†ã«TOTALSを計算ã™ã‚‹ã‹ã€‚ +「WITH TOTALS修飾å­ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## trace_profile_events {#trace_profile_events} + +タイプ: Bool + +デフォルト値: 0 + +プロファイルイベントã®å„更新時ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’åŽé›†ã—ã€ãƒ—ロファイルイベントã®åå‰ã¨ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã®å€¤ã‚’å«ã‚€ã“ã¨ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ã“ã®æƒ…å ±ã¯[trace_log](../../operations/system-tables/trace_log.md#system_tables-trace_log)ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 1 — プロファイルイベントã®ãƒˆãƒ¬ãƒ¼ã‚¹ãŒæœ‰åŠ¹ã€‚ +- 0 — プロファイルイベントã®ãƒˆãƒ¬ãƒ¼ã‚¹ãŒç„¡åŠ¹ã€‚ + +## transfer_overflow_mode {#transfer_overflow_mode} + +タイプ: OverflowMode + +デフォルト値: throw + +制é™ã‚’超ãˆãŸéš›ã«ä½•ã‚’ã™ã‚‹ã‹ã€‚ + +## transform_null_in {#transform_null_in} + +タイプ: Bool + +デフォルト値: 0 + +[IN](../../sql-reference/operators/in.md)演算å­ã«å¯¾ã™ã‚‹[NULL](../../sql-reference/syntax.md/#null-literal)値ã®å¹³ç­‰æ€§ã‚’有効ã«ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€`NULL`値ã¯æ¯”較ã§ãã¾ã›ã‚“。ãªãœãªã‚‰ã€`NULL`ã¯æœªå®šç¾©ã®å€¤ã‚’æ„味ã™ã‚‹ã‹ã‚‰ã§ã™ã€‚ã—ãŸãŒã£ã¦ã€æ¯”較`expr = NULL`ã¯å¸¸ã«`false`ã‚’è¿”ã•ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ã“ã®è¨­å®šãŒæœ‰åŠ¹ãªå ´åˆã€`NULL = NULL`ã¯`IN`演算å­ã«å¯¾ã—ã¦`true`ã‚’è¿”ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — `IN`演算å­ã«ãŠã‘ã‚‹`NULL`値ã®æ¯”較ã¯`false`ã‚’è¿”ã—ã¾ã™ã€‚ +- 1 — `IN`演算å­ã«ãŠã‘ã‚‹`NULL`値ã®æ¯”較ã¯`true`ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +`null_in`テーブルを考ãˆã¾ã™: + +``` text +┌──idx─┬─────i─┠+│ 1 │ 1 │ +│ 2 │ NULL │ +│ 3 │ 3 │ +└──────┴───────┘ +``` + +クエリ: + +``` sql +SELECT idx, i FROM null_in WHERE i IN (1, NULL) SETTINGS transform_null_in = 0; +``` + +çµæžœ: + +``` text +┌──idx─┬────i─┠+│ 1 │ 1 │ +└──────┴──────┘ +``` + +クエリ: + +``` sql +SELECT idx, i FROM null_in WHERE i IN (1, NULL) SETTINGS transform_null_in = 1; +``` + +çµæžœ: + +``` text +┌──idx─┬─────i─┠+│ 1 │ 1 │ +│ 2 │ NULL │ +└──────┴───────┘ +``` + +**関連情報** + +- [IN演算å­ã«ãŠã‘ã‚‹NULL処ç†](../../sql-reference/operators/in.md/#in-null-processing) + +## traverse_shadow_remote_data_paths {#traverse_shadow_remote_data_paths} + +タイプ: Bool + +デフォルト値: 0 + +system.remote_data_pathsクエリを実行ã™ã‚‹ã¨ãã«ã€å®Ÿéš›ã®ãƒ†ãƒ¼ãƒ–ルデータã«åŠ ãˆã¦å‡çµãƒ‡ãƒ¼ã‚¿ï¼ˆã‚·ãƒ£ãƒ‰ã‚¦ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªï¼‰ã‚’トラãƒãƒ¼ã‚¹ã—ã¾ã™ã€‚ + +## union_default_mode {#union_default_mode} + +タイプ: SetOperationMode + +デフォルト値: + +`SELECT`クエリã®çµæžœã‚’çµåˆã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã‚’設定ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€`UNION`を使用ã™ã‚‹éš›ã«æ˜Žç¤ºçš„ã«`UNION ALL`ã¾ãŸã¯`UNION DISTINCT`を指定ã—ãªã„å ´åˆã«ã®ã¿ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- `'DISTINCT'` — ClickHouseã¯é‡è¤‡è¡Œã‚’削除ã—ã€ã‚¯ã‚¨ãƒªã‚’çµåˆã—ãŸçµæžœã‚’出力ã—ã¾ã™ã€‚ +- `'ALL'` — ClickHouseã¯é‡è¤‡è¡Œã‚’å«ã‚€ã™ã¹ã¦ã®è¡Œã‚’出力ã—ã¾ã™ã€‚ +- `''` — ClickHouseã¯`UNION`ã§ä½¿ç”¨ã•ã‚ŒãŸã¨ãã«ä¾‹å¤–を生æˆã—ã¾ã™ã€‚ + +[UNION](../../sql-reference/statements/select/union.md)ã®ä¾‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## unknown_packet_in_send_data {#unknown_packet_in_send_data} + +タイプ: UInt64 + +デフォルト値: 0 + +N番目ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ケットã®ä»£ã‚ã‚Šã«ä¸æ˜Žãªãƒ‘ケットをé€ä¿¡ã—ã¾ã™ã€‚ + +## use_cache_for_count_from_files {#use_cache_for_count_from_files} + +タイプ: Bool + +デフォルト値: 1 + +テーブル関数`file` / `s3` / `url` / `hdfs` / `azureBlobStorage`ã‹ã‚‰ã®ã‚«ã‚¦ãƒ³ãƒˆæ™‚ã«è¡Œæ•°ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’有効ã«ã—ã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã§ã™ã€‚ + +## use_client_time_zone {#use_client_time_zone} + +タイプ: Bool + +デフォルト値: 0 + +サーãƒãƒ¼ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’採用ã™ã‚‹ã®ã§ã¯ãªãã€DateTime文字列値を解釈ã™ã‚‹ãŸã‚ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’使用ã—ã¾ã™ã€‚ + +## use_compact_format_in_distributed_parts_names {#use_compact_format_in_distributed_parts_names} + +タイプ: Bool + +デフォルト値: 1 + +DistributedエンジンをæŒã¤ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ï¼ˆ`distributed_foreground_insert`)INSERTã®ãŸã‚ã®ãƒ–ロックを格ç´ã™ã‚‹ãŸã‚ã«ã‚³ãƒ³ãƒ‘クトãªå½¢å¼ã‚’使用ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — `user[:password]@host:port#default_database`ディレクトリ形å¼ã‚’使用ã—ã¾ã™ã€‚ +- 1 — `[shard{shard_index}[_replica{replica_index}]]`ディレクトリ形å¼ã‚’使用ã—ã¾ã™ã€‚ + +:::note +- `use_compact_format_in_distributed_parts_names=0`ã®å ´åˆã€ã‚¯ãƒ©ã‚¹ã‚¿å®šç¾©ã®å¤‰æ›´ã¯ã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰INSERTã§ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。 +- `use_compact_format_in_distributed_parts_names=1`ã®å ´åˆã€ã‚¯ãƒ©ã‚¹ã‚¿å®šç¾©ã®ãƒŽãƒ¼ãƒ‰ã®é †åºã‚’変更ã™ã‚‹ã¨ã€`shard_index` / `replica_index`ãŒå¤‰æ›´ã•ã‚Œã‚‹ãŸã‚ã€æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ +::: + +## use_concurrency_control {#use_concurrency_control} + +タイプ: Bool + +デフォルト値: 1 + +サーãƒãƒ¼ã®åŒæ™‚実行制御をéµå®ˆã—ã¾ã™ï¼ˆ`concurrent_threads_soft_limit_num`ãŠã‚ˆã³`concurrent_threads_soft_limit_ratio_to_cores` グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®šã‚’å‚照)。無効ã«ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ãŒéŽè² è·ã§ã‚ã£ã¦ã‚‚より多ãã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆé€šå¸¸ã®ä½¿ç”¨ã«ã¯æŽ¨å¥¨ã•ã‚Œãšã€ä¸»ã«ãƒ†ã‚¹ãƒˆã«å¿…è¦ã§ã™ï¼‰ã€‚ + +## use_hedged_requests {#use_hedged_requests} + +タイプ: Bool + +デフォルト値: 1 + +リモートクエリã®ãŸã‚ã®ãƒ˜ãƒƒã‚¸ãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒ­ã‚¸ãƒƒã‚¯ã‚’有効ã«ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªã®ãŸã‚ã«ç•°ãªã‚‹ãƒ¬ãƒ—リカã¨å¤šãã®æŽ¥ç¶šã‚’確立ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +既存ã®æŽ¥ç¶šãŒ`hedged_connection_timeout`内ã«ç¢ºç«‹ã•ã‚Œãªã‹ã£ãŸå ´åˆã‚„ã€`receive_data_timeout`内ã«ãƒ‡ãƒ¼ã‚¿ãŒå—ä¿¡ã•ã‚Œãªã‹ã£ãŸå ´åˆã«æ–°ã—ã„接続ãŒæœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚クエリã¯æœ€åˆã«éžç©ºã®é€²è¡ŒçŠ¶æ³ãƒ‘ケット(ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ‘ケット)をé€ä¿¡ã™ã‚‹æŽ¥ç¶šã‚’使用ã—ã€ä»–ã®æŽ¥ç¶šã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚Œã¾ã™ã€‚`max_parallel_replicas > 1`ã®ã‚¯ã‚¨ãƒªã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +デフォルトã§æœ‰åŠ¹ã§ã™ã€‚ + +クラウドã§ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã§ã™ã€‚ + +## use_hive_partitioning {#use_hive_partitioning} + +タイプ: Bool + +デフォルト値: 0 + +有効ã«ã™ã‚‹ã¨ã€ClickHouseã¯ãƒ•ã‚¡ã‚¤ãƒ«é–¢é€£ã®ãƒ†ãƒ¼ãƒ–ルエンジンã®ãƒ‘ス中ã§ã®Hiveスタイルã®ãƒ‘ーティショニングを検出ã—ã¾ã™ï¼ˆ`/name=value/`)。ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªå†…ã§ãƒ‘ーティション列を仮想列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã®ä»®æƒ³åˆ—ã¯ã€ãƒ‘ーティション化ã•ã‚ŒãŸãƒ‘スã§åŒã˜åå‰ã‚’æŒã¡ã¾ã™ãŒã€`_`ã§å§‹ã¾ã‚Šã¾ã™ã€‚ + +## use_index_for_in_with_subqueries {#use_index_for_in_with_subqueries} + +タイプ: Bool + +デフォルト値: 1 + +IN演算å­ã®å³å´ã«ã‚µãƒ–クエリã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ルå¼ãŒã‚ã‚‹å ´åˆã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¦ã¿ã¾ã™ã€‚ + +## use_index_for_in_with_subqueries_max_values {#use_index_for_in_with_subqueries_max_values} + +タイプ: UInt64 + +デフォルト値: 0 + +フィルタリングã«ãƒ†ãƒ¼ãƒ–ルインデックスを使用ã™ã‚‹ãŸã‚ã®IN演算å­ã®å³å´ã®ã‚»ãƒƒãƒˆã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å¤§ããªã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦è¿½åŠ ã®ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®æº–å‚™ã«ã‚ˆã‚‹ãƒ‘フォーマンス劣化ã¨é«˜ã„メモリ使用を回é¿ã§ãã¾ã™ã€‚ゼロã¯åˆ¶é™ãªã—ã‚’æ„味ã—ã¾ã™ã€‚ + +## use_json_alias_for_old_object_type {#use_json_alias_for_old_object_type} + +タイプ: Bool + +デフォルト値: 0 + +有効ã«ã™ã‚‹ã¨ã€`JSON`データ型エイリアスã¯æ–°ã—ã„[JSON](../../sql-reference/data-types/newjson.md)åž‹ã®ä»£ã‚ã‚Šã«å¤ã„[Object('json')](../../sql-reference/data-types/json.md)型を作æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## use_local_cache_for_remote_storage {#use_local_cache_for_remote_storage} + +タイプ: Bool + +デフォルト値: 1 + +HDFSã‚„S3ã®ã‚ˆã†ãªãƒªãƒ¢ãƒ¼ãƒˆã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ãŸã‚ã«ãƒ­ãƒ¼ã‚«ãƒ«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ†ãƒ¼ãƒ–ルエンジンã®ã¿ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## use_page_cache_for_disks_without_file_cache {#use_page_cache_for_disks_without_file_cache} + +タイプ: Bool + +デフォルト値: 0 + +ファイルキャッシュãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ãªã„リモートディスク用ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¹ãƒšãƒ¼ã‚¹ãƒšãƒ¼ã‚¸ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¾ã™ã€‚ + +## use_query_cache {#use_query_cache} + +タイプ: Bool + +デフォルト値: 0 + +オンã«ãªã£ã¦ã„ã‚‹å ´åˆã€`SELECT`クエリã¯[クエリキャッシュ](../query-cache.md)を利用ã§ãã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚[enable_reads_from_query_cache](#enable-reads-from-query-cache)ãŠã‚ˆã³[enable_writes_to_query_cache](#enable-writes-to-query-cache)パラメーターãŒã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ä½¿ç”¨æ–¹æ³•ã«é–¢ã—ã¦ã‚ˆã‚Šè©³ç´°ã«åˆ¶å¾¡ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 - 無効 +- 1 - 有効 + +## use_skip_indexes {#use_skip_indexes} + +タイプ: Bool + +デフォルト値: 1 + +クエリ実行中ã«ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ”ングインデックスを使用ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +## use_skip_indexes_if_final {#use_skip_indexes_if_final} + +タイプ: Bool + +デフォルト値: 0 + +FINAL修飾å­ã‚’使用ã—ãŸã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹éš›ã«ã‚¹ã‚­ãƒƒãƒ—インデックスを使用ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ã“ã®è¨­å®šã¯ç„¡åŠ¹ã§ã™ã€‚ãªãœãªã‚‰ã€ã‚¹ã‚­ãƒƒãƒ—インデックスã¯ã€æœ€è¿‘ã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€è¡Œï¼ˆã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ï¼‰ã‚’除外ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€ä¸æ­£ç¢ºãªçµæžœã«ã¤ãªãŒã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚有効ã«ã™ã‚‹ã¨ã€FINAL修飾å­ã‚’æŒã¤ã‚¯ã‚¨ãƒªã§ã‚‚スキップインデックスãŒé©ç”¨ã•ã‚Œã€ãƒ‘フォーマンスãŒå‘上ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€æœ€è¿‘ã®æ›´æ–°ã‚’見逃ã™ãƒªã‚¹ã‚¯ãŒã‚ã‚Šã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 無効。 +- 1 — 有効。 + +## use_structure_from_insertion_table_in_table_functions {#use_structure_from_insertion_table_in_table_functions} + +タイプ: UInt64 + +デフォルト値: 2 + +データã‹ã‚‰ã®ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–ã®ä»£ã‚ã‚Šã«ã€æŒ¿å…¥ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®æ§‹é€ ã‚’使用ã—ã¾ã™ã€‚å¯èƒ½ãªå€¤: 0 - 無効ã€1 - 有効ã€2 - 自動。 + +## use_uncompressed_cache {#use_uncompressed_cache} + +タイプ: Bool + +デフォルト値: 0 + +未圧縮ブロックã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã™ã‚‹ã‹ã©ã†ã‹ã€‚0ã¾ãŸã¯1ã‚’å—ã‘入れã¾ã™ã€‚デフォルトã§ã¯0(無効)。 +未圧縮キャッシュã®ä½¿ç”¨ï¼ˆMergeTreeファミリã®ãƒ†ãƒ¼ãƒ–ルã«ã®ã¿ï¼‰ã¯ã€å¤šæ•°ã®çŸ­ã„クエリを扱ã†éš›ã«ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ã‚’大幅ã«æ¸›å°‘ã•ã›ã€ã‚¹ãƒ«ãƒ¼ãƒ—ットを増加ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚é »ç¹ã«çŸ­ã„リクエストをé€ä¿¡ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯ã“ã®è¨­å®šã‚’有効ã«ã—ã¾ã™ã€‚ã¾ãŸã€æœªåœ§ç¸®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ–ロックã®ã‚µã‚¤ã‚ºã‚’設定ã™ã‚‹[uncompressed_cache_size](../../operations/server-configuration-parameters/settings.md/#server-settings-uncompressed_cache_size)構æˆãƒ‘ラメーターã«æ³¨æ„ã—ã¦ãã ã•ã„(構æˆãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ã¿è¨­å®šï¼‰ – デフォルトã¯8GiBã§ã™ã€‚未圧縮キャッシュã¯å¿…è¦ã«å¿œã˜ã¦å……å¡«ã•ã‚Œã€æœ€ã‚‚使用ã•ã‚Œã¦ã„ãªã„データã¯è‡ªå‹•çš„ã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +å°‘ãªãã¨ã‚‚ã‚る程度ã®å¤§é‡ãƒ‡ãƒ¼ã‚¿ï¼ˆ100万行以上)を読ã¿å–るクエリã«ã¤ã„ã¦ã¯ã€ã‚¹ãƒšãƒ¼ã‚¹ã‚’節約ã™ã‚‹ãŸã‚ã«è‡ªå‹•çš„ã«æœªåœ§ç¸®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒç„¡åŠ¹ã«ãªã‚Šã¾ã™ã€‚ã¤ã¾ã‚Šã€`use_uncompressed_cache`設定ã¯å¸¸ã«1ã«è¨­å®šã—ã¦ãŠãã“ã¨ãŒã§ãã¾ã™ã€‚ + +## use_variant_as_common_type {#use_variant_as_common_type} + +タイプ: Bool + +デフォルト値: 0 + +引数型ã«å…±é€šã®åž‹ãŒãªã„å ´åˆã€[if](../../sql-reference/functions/conditional-functions.md/#if)/[multiIf](../../sql-reference/functions/conditional-functions.md/#multiif)/[array](../../sql-reference/functions/array-functions.md)/[map](../../sql-reference/functions/tuple-map-functions.md)関数ã®çµæžœåž‹ã¨ã—ã¦`Variant`型を使用ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +例: + +```sql +SET use_variant_as_common_type = 1; +SELECT toTypeName(if(number % 2, number, range(number))) as variant_type FROM numbers(1); +SELECT if(number % 2, number, range(number)) as variant FROM numbers(5); +``` + +```text +┌─variant_type───────────────────┠+│ Variant(Array(UInt64), UInt64) │ +└────────────────────────────────┘ +┌─variant───┠+│ [] │ +│ 1 │ +│ [0,1] │ +│ 3 │ +│ [0,1,2,3] │ +└───────────┘ +``` + +```sql +SET use_variant_as_common_type = 1; +SELECT toTypeName(multiIf((number % 4) = 0, 42, (number % 4) = 1, [1, 2, 3], (number % 4) = 2, 'Hello, World!', NULL)) AS variant_type FROM numbers(1); +SELECT multiIf((number % 4) = 0, 42, (number % 4) = 1, [1, 2, 3], (number % 4) = 2, 'Hello, World!', NULL) AS variant FROM numbers(4); +``` + +```text +─variant_type─────────────────────────┠+│ Variant(Array(UInt8), String, UInt8) │ +└──────────────────────────────────────┘ + +┌─variant───────┠+│ 42 │ +│ [1,2,3] │ +│ Hello, World! │ +│ á´ºáµá´¸á´¸ │ +└───────────────┘ +``` + +```sql +SET use_variant_as_common_type = 1; +SELECT toTypeName(array(range(number), number, 'str_' || toString(number))) as array_of_variants_type from numbers(1); +SELECT array(range(number), number, 'str_' || toString(number)) as array_of_variants FROM numbers(3); +``` + +```text +┌─array_of_variants_type────────────────────────┠+│ Array(Variant(Array(UInt64), String, UInt64)) │ +└───────────────────────────────────────────────┘ + +┌─array_of_variants─┠+│ [[],0,'str_0'] │ +│ [[0],1,'str_1'] │ +│ [[0,1],2,'str_2'] │ +└───────────────────┘ +``` + +```sql +SET use_variant_as_common_type = 1; +SELECT toTypeName(map('a', range(number), 'b', number, 'c', 'str_' || toString(number))) as map_of_variants_type from numbers(1); +SELECT map('a', range(number), 'b', number, 'c', 'str_' || toString(number)) as map_of_variants FROM numbers(3); +``` + +```text +┌─map_of_variants_type────────────────────────────────┠+│ Map(String, Variant(Array(UInt64), String, UInt64)) │ +└─────────────────────────────────────────────────────┘ + +┌─map_of_variants───────────────┠+│ {'a':[],'b':0,'c':'str_0'} │ +│ {'a':[0],'b':1,'c':'str_1'} │ +│ {'a':[0,1],'b':2,'c':'str_2'} │ +└───────────────────────────────┘ +``` + +## use_with_fill_by_sorting_prefix {#use_with_fill_by_sorting_prefix} + +タイプ: Bool + +デフォルト値: 1 + +ORDER BYå¥ã§FILL列よりå‰ã®ã‚«ãƒ©ãƒ ãŒã‚½ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ãƒ—レフィックスを形æˆã—ã¾ã™ã€‚ソーティングプレフィックス内ã§ç•°ãªã‚‹å€¤ã‚’æŒã¤è¡Œã¯ç‹¬ç«‹ã—ã¦åŸ‹ã‚られã¾ã™ã€‚ + +## validate_polygons {#validate_polygons} + +タイプ: Bool + +デフォルト値: 1 + +多角形ãŒè‡ªå·±äº¤å·®ã¾ãŸã¯è‡ªå·±æŽ¥è§¦ã—ã¦ã„ã‚‹å ´åˆã€[pointInPolygon](../../sql-reference/functions/geo/index.md#pointinpolygon)関数ã§ä¾‹å¤–をスローã™ã‚‹ã‹ã©ã†ã‹ã‚’有効ã¾ãŸã¯ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- 0 — 例外をスローã™ã‚‹ã“ã¨ã‚’無効ã«ã—ã¾ã™ã€‚`pointInPolygon`ã¯ç„¡åŠ¹ãªå¤šè§’形をå—ã‘入れã€ãれらã«å¯¾ã—ã¦ä¸æ­£ç¢ºãªçµæžœã‚’è¿”ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- 1 — 例外をスローã™ã‚‹ã“ã¨ã‚’有効ã«ã—ã¾ã™ã€‚ +``` +## wait_changes_become_visible_after_commit_mode {#wait_changes_become_visible_after_commit_mode} + +タイプ: TransactionsWaitCSNMode + +デフォルト値: wait_unknown + +コミットã•ã‚ŒãŸå¤‰æ›´ãŒæœ€æ–°ã®ã‚¹ãƒŠãƒƒãƒ—ショットã§å®Ÿéš›ã«è¦‹ãˆã‚‹ã‚ˆã†ã«ãªã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™ã€‚ + +## wait_for_async_insert {#wait_for_async_insert} + +タイプ: Bool + +デフォルト値: 1 + +trueã®å ´åˆã€éžåŒæœŸæŒ¿å…¥å‡¦ç†ã®å®Œäº†ã‚’å¾…æ©Ÿã—ã¾ã™ã€‚ + +## wait_for_async_insert_timeout {#wait_for_async_insert_timeout} + +タイプ: 秒 + +デフォルト値: 120 + +éžåŒæœŸæŒ¿å…¥å‡¦ç†ã®å®Œäº†ã‚’å¾…ã¤ãŸã‚ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +## wait_for_window_view_fire_signal_timeout {#wait_for_window_view_fire_signal_timeout} + +タイプ: 秒 + +デフォルト値: 10 + +イベント時間処ç†ã«ãŠã„ã¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ“ューã®ä¿¡å·ç™ºç«ã‚’å¾…ã¤ãŸã‚ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +## window_view_clean_interval {#window_view_clean_interval} + +タイプ: 秒 + +デフォルト値: 60 + +å¤ã„データを解放ã™ã‚‹ãŸã‚ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ“ューã®ã‚¯ãƒªãƒ¼ãƒ³é–“隔(秒)。 + +## window_view_heartbeat_interval {#window_view_heartbeat_interval} + +タイプ: 秒 + +デフォルト値: 15 + +ウォッãƒã‚¯ã‚¨ãƒªãŒç”Ÿå­˜ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã™ãŸã‚ã®ãƒãƒ¼ãƒˆãƒ“ート間隔(秒)。 + +## workload {#workload} + +タイプ: 文字列 + +デフォルト値: default + +リソースã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®åå‰ã€‚ + +## write_through_distributed_cache {#write_through_distributed_cache} + +タイプ: Bool + +デフォルト値: 0 + +ClickHouse Cloud ã®ã¿ã€‚分散キャッシュã¸ã®æ›¸ãè¾¼ã¿ã‚’許å¯ã—ã¾ã™ï¼ˆS3ã¸ã®æ›¸ãè¾¼ã¿ã‚‚分散キャッシュã«ã‚ˆã£ã¦è¡Œã‚ã‚Œã¾ã™ï¼‰ã€‚ + +## zstd_window_log_max {#zstd_window_log_max} + +タイプ: Int64 + +デフォルト値: 0 + +ZSTD ã®æœ€å¤§ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ­ã‚°ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆã“れ㯠MergeTree ファミリーã«ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“)。 diff --git a/docs/ja/operations/ssl-zookeeper.md b/docs/ja/operations/ssl-zookeeper.md new file mode 100644 index 00000000000..16312c55cba --- /dev/null +++ b/docs/ja/operations/ssl-zookeeper.md @@ -0,0 +1,77 @@ +--- +slug: /ja/operations/ssl-zookeeper +sidebar_position: 45 +sidebar_label: Zookeeperã¨ã®å®‰å…¨ãªé€šä¿¡ +--- + +# ClickHouseã¨Zookeeperé–“ã®ã‚ªãƒ—ションã®å®‰å…¨ãªé€šä¿¡ +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_automated.md'; + + + +ClickHouse クライアントã¨ã®SSL通信用㫠`ssl.keyStore.location`ã€`ssl.keyStore.password`ã€`ssl.trustStore.location`ã€`ssl.trustStore.password` を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®ã‚ªãƒ—ションã¯Zookeeperãƒãƒ¼ã‚¸ãƒ§ãƒ³3.5.2ã‹ã‚‰åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +`zookeeper.crt`ã‚’ä¿¡é ¼ã•ã‚ŒãŸè¨¼æ˜Žæ›¸ã«è¿½åŠ ã§ãã¾ã™ã€‚ + +``` bash +sudo cp zookeeper.crt /usr/local/share/ca-certificates/zookeeper.crt +sudo update-ca-certificates +``` + +`config.xml`ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +``` xml + + /etc/clickhouse-server/client.crt + /etc/clickhouse-server/client.key + true + true + sslv2,sslv3 + true + + RejectCertificateHandler + + +``` + +ClickHouseã®è¨­å®šã«Zookeeperã‚’ã€ã„ãã¤ã‹ã®ã‚¯ãƒ©ã‚¹ã‚¿ã¨ãƒžã‚¯ãƒ­ã¨å…±ã«è¿½åŠ ã—ã¾ã™: + +``` xml + + + + localhost + 2281 + 1 + + + +``` + +`clickhouse-server`ã‚’èµ·å‹•ã—ã¾ã™ã€‚ログã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«å‡ºåŠ›ã•ã‚Œã‚‹ã¯ãšã§ã™: + +```text + ZooKeeper: initialized, hosts: secure://localhost:2281 +``` + +プレフィックス `secure://` ã¯æŽ¥ç¶šãŒSSLã§ä¿è­·ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +トラフィックãŒæš—å·åŒ–ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ãŸã‚ã«ã€ã‚»ã‚­ãƒ¥ã‚¢ãƒãƒ¼ãƒˆã§`tcpdump`を実行ã—ã¾ã™: + +```bash +tcpdump -i any dst port 2281 -nnXS +``` + +`clickhouse-client`ã§ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™: + +```sql +SELECT * FROM system.zookeeper WHERE path = '/'; +``` + +æš—å·åŒ–ã•ã‚Œã¦ã„ãªã„接続ã§ã¯ã€`tcpdump`ã®å‡ºåŠ›ã«æ¬¡ã®ã‚ˆã†ãªã‚‚ã®ãŒè¡¨ç¤ºã•ã‚Œã¾ã™: + +```text +..../zookeeper/quota. +``` + +æš—å·åŒ–ã•ã‚ŒãŸæŽ¥ç¶šã§ã¯ã“ã‚ŒãŒè¡¨ç¤ºã•ã‚Œã¾ã›ã‚“。 diff --git a/docs/ja/operations/startup-scripts.md b/docs/ja/operations/startup-scripts.md new file mode 100644 index 00000000000..6237f4a4879 --- /dev/null +++ b/docs/ja/operations/startup-scripts.md @@ -0,0 +1,31 @@ +--- +slug: /ja/operations/startup-scripts +sidebar_label: スタートアップスクリプト +--- + +# スタートアップスクリプト + +ClickHouse ã¯ã€èµ·å‹•æ™‚ã«ã‚µãƒ¼ãƒãƒ¼è¨­å®šã‹ã‚‰ä»»æ„ã® SQL クエリを実行ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒžã‚¤ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚„自動スキーマ作æˆã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +```xml + + + + CREATE ROLE OR REPLACE test_role + + + CREATE TABLE TestTable (id UInt64) ENGINE=TinyLog + SELECT 1; + + + +``` + +ClickHouse 㯠`startup_scripts` ã‹ã‚‰ã®ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‚’指定ã•ã‚ŒãŸé †åºã§é †ç•ªã«å®Ÿè¡Œã—ã¾ã™ã€‚ã©ã®ã‚¯ã‚¨ãƒªãŒå¤±æ•—ã—ã¦ã‚‚ã€ãã®å¾Œã®ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã¯ä¸­æ–­ã•ã‚Œã¾ã›ã‚“。 + +設定ファイル内ã§æ¡ä»¶ä»˜ãクエリを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€è©²å½“ã™ã‚‹ã‚¯ã‚¨ãƒªã¯æ¡ä»¶ã‚¯ã‚¨ãƒªãŒ `1` ã¾ãŸã¯ `true` ã‚’è¿”ã™å ´åˆã«ã®ã¿å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +:::note +æ¡ä»¶ã‚¯ã‚¨ãƒªãŒ `1` ã¾ãŸã¯ `true` 以外ã®å€¤ã‚’è¿”ã—ãŸå ´åˆã€çµæžœã¯ `false` ã¨è§£é‡ˆã•ã‚Œã€è©²å½“ã™ã‚‹ã‚¯ã‚¨ãƒªã¯å®Ÿè¡Œã•ã‚Œã¾ã›ã‚“。 +::: + diff --git a/docs/ja/operations/storing-data.md b/docs/ja/operations/storing-data.md new file mode 100644 index 00000000000..8be855d5946 --- /dev/null +++ b/docs/ja/operations/storing-data.md @@ -0,0 +1,977 @@ +--- +slug: /ja/operations/storing-data +sidebar_position: 68 +sidebar_label: "データä¿å­˜ç”¨ã®å¤–部ディスク" +title: "データä¿å­˜ç”¨ã®å¤–部ディスク" +--- + +ClickHouseã§å‡¦ç†ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯ã€é€šå¸¸ã€ClickHouseサーãƒãƒ¼ã¨åŒã˜ãƒžã‚·ãƒ³ã«ã‚るローカルファイルシステムã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯å¤§å®¹é‡ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’å¿…è¦ã¨ã—ã€ã“れらã¯ã‹ãªã‚Šé«˜ä¾¡ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ãれをé¿ã‘ã‚‹ãŸã‚ã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’リモートã«ä¿å­˜ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚様々ãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼š +1. [Amazon S3](https://aws.amazon.com/s3/) オブジェクトストレージ。 +2. [Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs)。 +3. éžã‚µãƒãƒ¼ãƒˆ: Hadoop 分散ファイルシステム ([HDFS](https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html)) + +:::note ClickHouseã¯å¤–部テーブルエンジンもサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ã“ã®ãƒšãƒ¼ã‚¸ã§èª¬æ˜Žã™ã‚‹å¤–部ストレージオプションã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ã“れらã¯ã€ä¸€èˆ¬çš„ãªãƒ•ã‚¡ã‚¤ãƒ«ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆï¼ˆä¾‹: Parquet)ã§ä¿å­˜ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ClickHouseã®`MergeTree`ファミリã¾ãŸã¯`Log`ファミリテーブルã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸è¨­å®šã‚’説明ã—ã¦ã„ã¾ã™ã€‚ +1. `Amazon S3`ディスクã«ä¿å­˜ã•ã‚Œã¦ã„るデータをæ“作ã™ã‚‹ã«ã¯ã€[S3](/docs/ja/engines/table-engines/integrations/s3.md)テーブルエンジンを使用ã—ã¦ãã ã•ã„。 +2. Azure Blob Storageã«ä¿å­˜ã•ã‚Œã¦ã„るデータをæ“作ã™ã‚‹ã«ã¯ã€[AzureBlobStorage](/docs/ja/engines/table-engines/integrations/azureBlobStorage.md)テーブルエンジンを使用ã—ã¦ãã ã•ã„。 +3. éžã‚µãƒãƒ¼ãƒˆ: Hadoop 分散ファイルシステムã®ãƒ‡ãƒ¼ã‚¿ã‚’æ“作ã™ã‚‹ã«ã¯ã€[HDFS](/docs/ja/engines/table-engines/integrations/hdfs.md)テーブルエンジンを使用ã—ã¦ãã ã•ã„。 +::: + +## 外部ストレージã®è¨­å®š {#configuring-external-storage} + +[MergeTree](/docs/ja/engines/table-engines/mergetree-family/mergetree.md)ã¨[Log](/docs/ja/engines/table-engines/log-family/log.md)ファミリテーブルエンジンã¯ã€`s3`ã€`azure_blob_storage`ã€`hdfs` (éžã‚µãƒãƒ¼ãƒˆ)ã®ã‚¿ã‚¤ãƒ—ã‚’æŒã¤ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’`S3`ã€`AzureBlobStorage`ã€`HDFS`(éžã‚µãƒãƒ¼ãƒˆ)ã«ä¿å­˜ã§ãã¾ã™ã€‚ + +ディスク設定ã«ã¯ä»¥ä¸‹ãŒå¿…è¦ã§ã™: +1. `type`セクションã¯`s3`ã€`azure_blob_storage`ã€`hdfs`(éžã‚µãƒãƒ¼ãƒˆ)ã€`local_blob_storage`ã€`web`ã®ã„ãšã‚Œã‹ã¨ç­‰ã—ãã™ã‚‹ã€‚ +2. 特定ã®å¤–部ストレージタイプã®è¨­å®šã€‚ + +24.1ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®clickhouseã‹ã‚‰ã¯ã€æ–°ã—ã„設定オプションを使用ã§ãるよã†ã«ãªã‚Šã¾ã—ãŸã€‚ +ã“ã‚Œã¯ä»¥ä¸‹ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: +1. `type`ãŒ`object_storage`ã¨ç­‰ã—ã„ã“㨠+2. `object_storage_type`ãŒ`s3`ã€`azure_blob_storage`(24.3以é™ã¯å˜ã«`azure`)ã€`hdfs`(éžã‚µãƒãƒ¼ãƒˆï¼‰ã€`local_blob_storage`(24.3以é™ã¯å˜ã«`local`)ã€`web`ã®ã„ãšã‚Œã‹ã¨ç­‰ã—ã„ã“ã¨ã€‚オプションã§ã€`metadata_type`を指定ã§ãã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`local`ã¨ç­‰ã—ã„)ãŒã€`plain`ã€`web`ã€ãã—ã¦24.4以é™ã¯`plain_rewritable`ã«è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚`plain`メタデータタイプã®ä½¿ç”¨æ³•ã«ã¤ã„ã¦ã¯ã€[plain storage section](/docs/ja/operations/storing-data.md/#storing-data-on-webserver)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 `web`メタデータタイプã¯`web`オブジェクトストレージタイプã§ã®ã¿ä½¿ç”¨å¯èƒ½ã§ã€`local`メタデータタイプã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ローカルã«ä¿å­˜ã—ã¾ã™ï¼ˆå„メタデータファイルã«ã¯ã€ã‚ªãƒ–ジェクトストレージ内ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒžãƒƒãƒ”ングã¨ãれらã«ã¤ã„ã¦ã®è¿½åŠ ã®ãƒ¡ã‚¿æƒ…å ±ãŒå«ã¾ã‚Œã¾ã™ï¼‰ã€‚ + +例ã¨ã—ã¦ã®è¨­å®šã‚ªãƒ—ション +``` xml + + s3 + https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/ + 1 + +``` + +ã¯ã€ï¼ˆ24.1以é™ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ï¼‰è¨­å®šã¨ç­‰ã—ã„: +``` xml + + object_storage + s3 + local + https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/ + 1 + +``` + +設定 +``` xml + + s3_plain + https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/ + 1 + +``` + +ã¯ä»¥ä¸‹ã¨ç­‰ã—ã„ +``` xml + + object_storage + s3 + plain + https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/ + 1 + +``` + +完全ãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸è¨­å®šã®ä¾‹ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã§ã—ょã†ï¼š +``` xml + + + + + s3 + https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/ + 1 + + + + + +
    + s3 +
    +
    +
    +
    +
    +
    +``` + +24.1ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®clickhouseã‹ã‚‰ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚‚設定ã§ãã¾ã™ï¼š +``` xml + + + + + object_storage + s3 + local + https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/ + 1 + + + + + +
    + s3 +
    +
    +
    +
    +
    +
    +``` + +特定ã®ç¨®é¡žã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’ã™ã¹ã¦ã®`MergeTree`テーブルã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚ªãƒ—ションã«ã™ã‚‹ã«ã¯ã€ 次ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’設定ファイルã«è¿½åŠ ã—ã¾ã™ï¼š + +``` xml + + + s3 + + +``` + +特定ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã‚’特定ã®ãƒ†ãƒ¼ãƒ–ルã«ã®ã¿è¨­å®šã—ãŸã„å ´åˆã¯ã€ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹éš›ã«è¨­å®šã§å®šç¾©ã§ãã¾ã™ï¼š + +``` sql +CREATE TABLE test (a Int32, b String) +ENGINE = MergeTree() ORDER BY a +SETTINGS storage_policy = 's3'; +``` + +`storage_policy`ã®ä»£ã‚ã‚Šã«`disk`を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`storage_policy`セクションã¯è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«ä¸è¦ã§ã€`disk`セクションã ã‘ã§å分ã§ã™ã€‚ + +``` sql +CREATE TABLE test (a Int32, b String) +ENGINE = MergeTree() ORDER BY a +SETTINGS disk = 's3'; +``` + +## 動的設定 {#dynamic-configuration} + +設定ファイル内ã«ã‚らã‹ã˜ã‚定義ã•ã‚ŒãŸãƒ‡ã‚£ã‚¹ã‚¯ãªã—ã§ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸è¨­å®šã‚’指定ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ãŒã€`CREATE`/`ATTACH`クエリ設定ã«è¨­å®šã§ãã¾ã™ã€‚ + +次ã®ã‚¯ã‚¨ãƒªã‚¢ä¾‹ã¯ã€ä¸Šè¿°ã®å‹•çš„ディスク設定を基ã«æ§‹ç¯‰ã•ã‚Œã¦ãŠã‚Šã€URLã«ä¿å­˜ã•ã‚Œã¦ã„るテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’キャッシュã™ã‚‹ãŸã‚ã«ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +```sql +ATTACH TABLE uk_price_paid UUID 'cf712b4f-2ca8-435c-ac23-c4393efe52f7' +( + price UInt32, + date Date, + postcode1 LowCardinality(String), + postcode2 LowCardinality(String), + type Enum8('other' = 0, 'terraced' = 1, 'semi-detached' = 2, 'detached' = 3, 'flat' = 4), + is_new UInt8, + duration Enum8('unknown' = 0, 'freehold' = 1, 'leasehold' = 2), + addr1 String, + addr2 String, + street LowCardinality(String), + locality LowCardinality(String), + town LowCardinality(String), + district LowCardinality(String), + county LowCardinality(String) +) +ENGINE = MergeTree +ORDER BY (postcode1, postcode2, addr1, addr2) + # highlight-start + SETTINGS disk = disk( + type=web, + endpoint='https://raw.githubusercontent.com/ClickHouse/web-tables-demo/main/web/' + ); + # highlight-end +``` + +以下ã®ä¾‹ã§ã¯å¤–部ストレージã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’追加ã—ã¾ã™ã€‚ + +```sql +ATTACH TABLE uk_price_paid UUID 'cf712b4f-2ca8-435c-ac23-c4393efe52f7' +( + price UInt32, + date Date, + postcode1 LowCardinality(String), + postcode2 LowCardinality(String), + type Enum8('other' = 0, 'terraced' = 1, 'semi-detached' = 2, 'detached' = 3, 'flat' = 4), + is_new UInt8, + duration Enum8('unknown' = 0, 'freehold' = 1, 'leasehold' = 2), + addr1 String, + addr2 String, + street LowCardinality(String), + locality LowCardinality(String), + town LowCardinality(String), + district LowCardinality(String), + county LowCardinality(String) +) +ENGINE = MergeTree +ORDER BY (postcode1, postcode2, addr1, addr2) + # highlight-start + SETTINGS disk = disk( + type=cache, + max_size='1Gi', + path='/var/lib/clickhouse/custom_disk_cache/', + disk=disk( + type=web, + endpoint='https://raw.githubusercontent.com/ClickHouse/web-tables-demo/main/web/' + ) + ); + # highlight-end +``` + +以下ã®è¨­å®šã«æ³¨ç›®ã—ã¦ãã ã•ã„。`type=web`ã®ãƒ‡ã‚£ã‚¹ã‚¯ãŒ`type=cache`ã®ãƒ‡ã‚£ã‚¹ã‚¯å†…ã«ãƒã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +:::note +例ã§ã¯`type=web`を使用ã—ã¦ã„ã¾ã™ãŒã€ä»»æ„ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¿ã‚¤ãƒ—ã‚’å‹•çš„ã«è¨­å®šå¯èƒ½ã§ã™ã€‚ローカルディスクã®å ´åˆã€`custom_local_disks_base_directory`設定パラメータ内ã§`path`引数ãŒå¿…è¦ã§ã™ã€‚ã“ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ã‚ã‚Šã¾ã›ã‚“ã®ã§ã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã™ã‚‹å ´åˆã¯ãã®è¨­å®šã‚‚忘れãšã«è¡Œã£ã¦ãã ã•ã„。 +::: + +設定ã«åŸºã¥ã設定ã¨SQL定義ã•ã‚ŒãŸè¨­å®šã®çµ„ã¿åˆã‚ã›ã‚‚å¯èƒ½ã§ã™ï¼š + +```sql +ATTACH TABLE uk_price_paid UUID 'cf712b4f-2ca8-435c-ac23-c4393efe52f7' +( + price UInt32, + date Date, + postcode1 LowCardinality(String), + postcode2 LowCardinality(String), + type Enum8('other' = 0, 'terraced' = 1, 'semi-detached' = 2, 'detached' = 3, 'flat' = 4), + is_new UInt8, + duration Enum8('unknown' = 0, 'freehold' = 1, 'leasehold' = 2), + addr1 String, + addr2 String, + street LowCardinality(String), + locality LowCardinality(String), + town LowCardinality(String), + district LowCardinality(String), + county LowCardinality(String) +) +ENGINE = MergeTree +ORDER BY (postcode1, postcode2, addr1, addr2) + # highlight-start + SETTINGS disk = disk( + type=cache, + max_size='1Gi', + path='/var/lib/clickhouse/custom_disk_cache/', + disk=disk( + type=web, + endpoint='https://raw.githubusercontent.com/ClickHouse/web-tables-demo/main/web/' + ) + ); + # highlight-end +``` + +ã“ã“ã§`web`ã¯ã‚µãƒ¼ãƒãƒ¼è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰æ¥ã‚‹ã‚‚ã®ã§ã™ï¼š + +``` xml + + + + web + 'https://raw.githubusercontent.com/ClickHouse/web-tables-demo/main/web/' + + + +``` + +### S3ストレージã®ä½¿ç”¨ {#s3-storage} + +å¿…è¦ãªãƒ‘ラメーター: + +- `endpoint` — `path`ã¾ãŸã¯`virtual hosted`[スタイル](https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html)ã®S3エンドãƒã‚¤ãƒ³ãƒˆURL。エンドãƒã‚¤ãƒ³ãƒˆURLã«ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãƒã‚±ãƒƒãƒˆã¨ãƒ«ãƒ¼ãƒˆãƒ‘スをå«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- `access_key_id` — S3アクセスキーID。 +- `secret_access_key` — S3シークレットアクセスキー。 + +オプションã®ãƒ‘ラメーター: + +- `region` — S3リージョンå。 +- `support_batch_delete` — ãƒãƒƒãƒå‰Šé™¤ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã‹ã®ãƒã‚§ãƒƒã‚¯ã‚’制御ã—ã¾ã™ã€‚Google Cloud Storage (GCS)を使用ã™ã‚‹å ´åˆã€ãƒãƒƒãƒå‰Šé™¤ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ã“ã®ãƒã‚§ãƒƒã‚¯ã‚’予防ã™ã‚‹ã“ã¨ã§ãƒ­ã‚°ã«ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚Œãªã„よã†`false`ã«è¨­å®šã—ã¾ã™ã€‚ +- `use_environment_credentials` — 環境変数AWS_ACCESS_KEY_IDã€AWS_SECRET_ACCESS_KEYã€ãŠã‚ˆã³AWS_SESSION_TOKEN(存在ã™ã‚‹å ´åˆï¼‰ã‹ã‚‰AWS資格情報を読ã¿å–ã‚Šã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- `use_insecure_imds_request` — `true`ã«è¨­å®šã™ã‚‹ã¨ã€S3クライアントã¯Amazon EC2メタデータã‹ã‚‰è³‡æ ¼æƒ…報をå–å¾—ã™ã‚‹éš›ã«éžã‚»ã‚­ãƒ¥ã‚¢ãªIMDS リクエストを使用ã—ã¾ã™ã€‚デフォルト値ã¯`false`ã§ã™ã€‚ +- `expiration_window_seconds` — 有効期é™ãƒ™ãƒ¼ã‚¹ã®è³‡æ ¼æƒ…å ±ã®æœ‰åŠ¹æœŸé™ã‚’確èªã™ã‚‹ãŸã‚ã®çŒ¶äºˆæœŸé–“。オプションã§ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯`120`ã§ã™ã€‚ +- `proxy` — S3エンドãƒã‚¤ãƒ³ãƒˆã®ãŸã‚ã®ãƒ—ロキシ設定。`proxy`ブロック内ã®å„`uri`è¦ç´ ã¯ãƒ—ロキシURLã‚’å«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- `connect_timeout_ms` — ソケット接続タイムアウト(ミリ秒å˜ä½ï¼‰ã€‚デフォルト値ã¯`10秒`ã§ã™ã€‚ +- `request_timeout_ms` — リクエストタイムアウト(ミリ秒å˜ä½ï¼‰ã€‚デフォルト値ã¯`5秒`ã§ã™ã€‚ +- `retry_attempts` — リクエストãŒå¤±æ•—ã—ãŸå ´åˆã®å†è©¦è¡Œå›žæ•°ã€‚デフォルト値ã¯`10`ã§ã™ã€‚ +- `single_read_retries` — 読ã¿å–り中ã®æŽ¥ç¶šãƒ‰ãƒ­ãƒƒãƒ—時ã«å†è©¦è¡Œã™ã‚‹å›žæ•°ã€‚デフォルト値ã¯`4`ã§ã™ã€‚ +- `min_bytes_for_seek` — 順次読ã¿å–ã‚Šã®ä»£ã‚ã‚Šã«ã‚·ãƒ¼ã‚¯æ“作を使用ã™ã‚‹æœ€å°ãƒã‚¤ãƒˆæ•°ã€‚デフォルト値ã¯`1 Mb`ã§ã™ã€‚ +- `metadata_path` — S3ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿å­˜ã™ã‚‹ãƒ­ãƒ¼ã‚«ãƒ«FSパス。デフォルト値ã¯`/var/lib/clickhouse/disks//`ã§ã™ã€‚ +- `skip_access_check` — trueã®å ´åˆã€ãƒ‡ã‚£ã‚¹ã‚¯ã®èµ·å‹•æ™‚ã«ã‚¢ã‚¯ã‚»ã‚¹ãƒã‚§ãƒƒã‚¯ã¯å®Ÿè¡Œã•ã‚Œã¾ã›ã‚“。デフォルト値ã¯`false`ã§ã™ã€‚ +- `header` — 指定ã•ã‚ŒãŸHTTPヘッダーを指定ã•ã‚ŒãŸã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«è¿½åŠ ã—ã¾ã™ã€‚オプションã§ã€è¤‡æ•°å›žæŒ‡å®šå¯èƒ½ã§ã™ã€‚ +- `server_side_encryption_customer_key_base64` — 指定ã•ã‚Œã¦ã„ã‚‹å ´åˆã€SSE-Cæš—å·åŒ–ã«ã‚ˆã‚‹S3オブジェクトã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã«å¿…è¦ãªãƒ˜ãƒƒãƒ€ãƒ¼ãŒè¨­å®šã•ã‚Œã¾ã™ã€‚ +- `server_side_encryption_kms_key_id` - 指定ã•ã‚ŒãŸå ´åˆã€[SSE-KMSæš—å·åŒ–](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html)ã®ãŸã‚ã«å¿…è¦ãªãƒ˜ãƒƒãƒ€ãƒ¼ãŒè¨­å®šã•ã‚Œã¾ã™ã€‚空ã®æ–‡å­—列ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€AWS管ç†ã®S3キーãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚オプションã§ã™ã€‚ +- `server_side_encryption_kms_encryption_context` - `server_side_encryption_kms_key_id`ã¨å…±ã«æŒ‡å®šã•ã‚ŒãŸå ´åˆã€SSE-KMSã®ãŸã‚ã®æš—å·åŒ–コンテキストヘッダーãŒè¨­å®šã•ã‚Œã¾ã™ã€‚オプションã§ã™ã€‚ +- `server_side_encryption_kms_bucket_key_enabled` - `server_side_encryption_kms_key_id`ã¨å…±ã«æŒ‡å®šã•ã‚ŒãŸå ´åˆã€SSE-KMSã®ãŸã‚ã®S3ãƒã‚±ãƒƒãƒˆã‚­ãƒ¼ã‚’有効ã«ã™ã‚‹ãŸã‚ã®ãƒ˜ãƒƒãƒ€ãƒ¼ãŒè¨­å®šã•ã‚Œã¾ã™ã€‚オプションã§ã€`true`ã¾ãŸã¯`false`を指定ã§ãã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ä½•ã‚‚指定ã•ã‚Œã¦ã„ã¾ã›ã‚“(ãƒã‚±ãƒƒãƒˆãƒ¬ãƒ™ãƒ«ã®è¨­å®šã«ä¸€è‡´ã—ã¾ã™ï¼‰ã€‚ +- `s3_max_put_rps` — スロットリングå‰ã®æœ€å¤§PUTリクエスト/秒レート。デフォルト値ã¯`0`(無制é™ï¼‰ã§ã™ã€‚ +- `s3_max_put_burst` — リクエスト/秒ã®åˆ¶é™ã«é”ã™ã‚‹å‰ã«åŒæ™‚ã«ç™ºè¡Œã§ãる最大リクエスト数。デフォルトã§ã¯ (`0`値) `s3_max_put_rps`ã«ç­‰ã—ã„。 +- `s3_max_get_rps` — スロットリングå‰ã®æœ€å¤§GETリクエスト/秒レート。デフォルト値ã¯`0`(無制é™ï¼‰ã§ã™ã€‚ +- `s3_max_get_burst` — リクエスト/秒ã®åˆ¶é™ã«é”ã™ã‚‹å‰ã«åŒæ™‚ã«ç™ºè¡Œã§ãる最大リクエスト数。デフォルトã§ã¯ (`0`値) `s3_max_get_rps`ã«ç­‰ã—ã„。 +- `read_resource` — ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®èª­ã¿å–りリクエストã®[スケジューリング](/docs/ja/operations/workload-scheduling.md)ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒªã‚½ãƒ¼ã‚¹å。デフォルト値ã¯ç©ºæ–‡å­—列(IOスケジューリングã¯ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«å¯¾ã—ã¦æœ‰åŠ¹ã§ã¯ã‚ã‚Šã¾ã›ã‚“)。 +- `write_resource` — ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®æ›¸ãè¾¼ã¿ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®[スケジューリング](/docs/ja/operations/workload-scheduling.md)ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒªã‚½ãƒ¼ã‚¹å。デフォルト値ã¯ç©ºæ–‡å­—列(IOスケジューリングã¯ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«å¯¾ã—ã¦æœ‰åŠ¹ã§ã¯ã‚ã‚Šã¾ã›ã‚“)。 +- `key_template` — オブジェクトã®ã‚­ãƒ¼ãŒç”Ÿæˆã•ã‚Œã‚‹å½¢å¼ã‚’定義ã—ã¾ã™ã€‚デフォルトã§ã¯ã€ClickHouseã¯`endpoint`オプションã®`root path`ã‚’å–å¾—ã—ã€ãƒ©ãƒ³ãƒ€ãƒ ã«ç”Ÿæˆã•ã‚ŒãŸã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ã‚’追加ã—ã¾ã™ã€‚ãã®ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ã¯3ã¤ã®ãƒ©ãƒ³ãƒ€ãƒ è¨˜å·ã‚’æŒã¤ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¨29ã®ãƒ©ãƒ³ãƒ€ãƒ è¨˜å·ã‚’æŒã¤ãƒ•ã‚¡ã‚¤ãƒ«åã§ã™ã€‚ã“ã®ã‚ªãƒ—ションã§ã¯ã€ã‚ªãƒ–ジェクトキーãŒã©ã®ã‚ˆã†ã«ç”Ÿæˆã•ã‚Œã‚‹ã‹ã‚’完全ã«åˆ¶å¾¡ã§ãã¾ã™ã€‚ã„ãã¤ã‹ã®ä½¿ç”¨ã‚·ãƒŠãƒªã‚ªã§ã¯ã€ãƒ—レフィックスã¾ãŸã¯ã‚ªãƒ–ジェクトキーã®ä¸­å¤®ã«ãƒ©ãƒ³ãƒ€ãƒ è¨˜å·ã‚’ä¿æŒã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€`[a-z]{3}-prefix-random/constant-part/random-middle-[a-z]{3}/random-suffix-[a-z]{29}`。値ã¯[`re2`](https://github.com/google/re2/wiki/Syntax)ã§è§£æžã•ã‚Œã¾ã™ã€‚サフィックスãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¦ãã ã•ã„。`key_compatibility_prefix`オプションã®å®šç¾©ãŒå¿…è¦ã§ã™ã€‚ã“ã®æ©Ÿèƒ½ã‚’使用ã™ã‚‹ã«ã¯ã€[storage_metadata_write_full_object_key](/docs/ja/operations/settings/settings#storage_metadata_write_full_object_key)ã®æ©Ÿèƒ½ãƒ•ãƒ©ã‚°ã‚’有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`endpoint`オプションã«`root path`を宣言ã™ã‚‹ã“ã¨ã¯ç¦æ­¢ã•ã‚Œã¦ã„ã¾ã™ã€‚`key_compatibility_prefix`ã®ã‚ªãƒ—ションã®å®šç¾©ãŒå¿…è¦ã§ã™ã€‚ +- `key_compatibility_prefix` — `key_template`オプションãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã®ã‚ªãƒ—ションãŒå¿…è¦ã§ã™ã€‚メタデータãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒ`VERSION_FULL_OBJECT_KEY`より低ã„メタデータファイルã§ä¿å­˜ã•ã‚ŒãŸã‚ªãƒ–ジェクトキーを読ã¿å–ã‚‹ã“ã¨ãŒã§ãるよã†ã«ã™ã‚‹ãŸã‚ã«ã€ä»¥å‰ã®`endpoint`オプションã®`root path`ã‚’ã“ã“ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +Google Cloud Storage (GCS) ã‚‚`type`ã‚’`s3`ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚詳細ã¯[GCSãƒãƒƒã‚­ãƒ³ã‚°ã•ã‚ŒãŸMergeTree](/docs/ja/integrations/gcs)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +### プレーンストレージã®ä½¿ç”¨ {#plain-storage} + +`22.10`ã‹ã‚‰å°Žå…¥ã•ã‚ŒãŸæ–°ã—ã„ディスクタイプ`s3_plain`ã¯ã€æ›¸ãè¾¼ã¿ã®ã¿ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’æä¾›ã—ã¾ã™ã€‚構æˆãƒ‘ラメータã¯`s3`ディスクタイプã¨åŒã˜ã§ã™ã€‚ +`s3`ディスクタイプã¨ã¯ç•°ãªã‚Šã€ãƒ‡ãƒ¼ã‚¿ã¯ãã®ã¾ã¾è¨˜æ†¶ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒ©ãƒ³ãƒ€ãƒ ã«ç”Ÿæˆã•ã‚ŒãŸãƒ–ロブåã®ä»£ã‚ã‚Šã«é€šå¸¸ã®ãƒ•ã‚¡ã‚¤ãƒ«åãŒä½¿ç”¨ã•ã‚Œï¼ˆclickhouseãŒãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿å­˜ã™ã‚‹æ–¹æ³•ã¨åŒã˜ï¼‰ã€`s3`内ã®ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰æ´¾ç”Ÿã—ãŸãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒãƒ­ãƒ¼ã‚«ãƒ«ã«ä¿å­˜ã•ã‚Œã¾ã›ã‚“。 + +ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¿ã‚¤ãƒ—ã¯ã€æ—¢å­˜ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã™ã‚‹ãƒžãƒ¼ã‚¸ã‚’実行ã—ãŸã‚Šã€æ–°ã—ã„データã®æŒ¿å…¥ã‚’許å¯ã—ãªã„ãŸã‚ã€ãƒ†ãƒ¼ãƒ–ルã®é™çš„ãªãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ä¿æŒã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¿ã‚¤ãƒ—ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã¨ã—ã¦ã¯ã€`BACKUP TABLE data TO Disk('plain_disk_name', 'backup_name')` を使用ã—ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を作æˆã—ã€ãã®å¾Œ `RESTORE TABLE data AS data_restored FROM Disk('plain_disk_name', 'backup_name')` ã¾ãŸã¯ `ATTACH TABLE data (...) ENGINE = MergeTree() SETTINGS disk = 'plain_disk_name'` を使用ã™ã‚‹æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚ + +設定: +``` xml + + s3_plain + https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/ + 1 + +``` + +`24.1`以é™ã€ä»»æ„ã®ã‚ªãƒ–ジェクトストレージディスク(`s3`ã€`azure`ã€`hdfs`(éžã‚µãƒãƒ¼ãƒˆï¼‰ã€`local`)を使用ã—ã¦`plain`メタデータタイプを構æˆã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +設定: +``` xml + + object_storage + azure + plain + https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/ + 1 + +``` + +### S3 プレーンリライトå¯èƒ½ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ä½¿ç”¨ {#s3-plain-rewritable-storage} + +æ–°ã—ã„ディスクタイプ`s3_plain_rewritable`ã¯`24.4`ã§å°Žå…¥ã•ã‚Œã¾ã—ãŸã€‚ +`s3_plain`ディスクタイプã¨åŒæ§˜ã«ã€è¿½åŠ ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å¿…è¦ã¨ã›ãšã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯S3ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ +`s3_plain`ディスクタイプã¨ã¯ç•°ãªã‚Šã€`s3_plain_rewritable`ã¯ãƒžãƒ¼ã‚¸ã®å®Ÿè¡Œã‚’許å¯ã—ã€INSERTæ“作をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +ãŸã ã—ã€[ミューテーション](/docs/ja/sql-reference/statements/alter#mutations)ã¨ãƒ¬ãƒ—リケーションã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¿ã‚¤ãƒ—ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã¨ã—ã¦ã¯ã€éžãƒ¬ãƒ—リケート`MergeTree`テーブルãŒã‚ã‚Šã¾ã™ã€‚`s3`ディスクタイプもéžãƒ¬ãƒ—リケート`MergeTree`テーブルã«é©ã—ã¦ã„ã¾ã™ãŒã€ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¿ã‚¤ãƒ—ã‚’é¸æŠžã™ã‚‹ã“ã¨ã§ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒä¸è¦ã§ã€åˆ¶é™ã•ã‚ŒãŸæ“作セットã«æº€è¶³ã§ãã‚‹å ´åˆã«å½¹ç«‹ã¡ã¾ã™ã€‚ã“ã‚Œã¯ãŸã¨ãˆã°ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã«å½¹ç«‹ã¤ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +設定: +``` xml + + s3_plain_rewritable + https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/ + 1 + +``` + +ã“ã‚Œã¯ä»¥ä¸‹ã¨ç­‰ã—ã„ +``` xml + + object_storage + s3 + plain_rewritable + https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/ + 1 + +``` + +`24.5`以é™ã€ä»»æ„ã®ã‚ªãƒ–ジェクトストレージディスク(`s3`ã€`azure`ã€`local`)を使ã£ã¦`plain_rewritable`メタデータタイプを構æˆã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +### Azure Blob Storage ã®ä½¿ç”¨ {#azure-blob-storage} + +`MergeTree`ファミリテーブルエンジンã¯ã€`azure_blob_storage`タイプã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’使用ã—ã¦[Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/)ã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +2022å¹´2月ç¾åœ¨ã€ã“ã®æ©Ÿèƒ½ã¯ã¾ã æ–°ã—ã„追加機能ãªã®ã§ã€Azure Blob Storageã®ä¸€éƒ¨ã®æ©Ÿèƒ½ãŒæœªå®Ÿè£…ã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +設定マークアップ: +``` xml + + ... + + + azure_blob_storage + http://account.blob.core.windows.net + container + account + pass123 + /var/lib/clickhouse/disks/blob_storage_disk/ + /var/lib/clickhouse/disks/blob_storage_disk/cache/ + false + + + ... + +``` + +接続パラメータ: +* `storage_account_url` - **å¿…é ˆ**ã€Azure Blob StorageアカウントURL。`http://account.blob.core.windows.net`ã‚„`http://azurite1:10000/devstoreaccount1`ã®ã‚ˆã†ãªå½¢å¼ã€‚ +* `container_name` - 対象ã®ã‚³ãƒ³ãƒ†ãƒŠåã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯`default-container`。 +* `container_already_exists` - `false`ã«è¨­å®šã™ã‚‹ã¨ã€æ–°ã—ã„コンテナ`container_name`ãŒã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«ä½œæˆã•ã‚Œã¾ã™ã€‚`true`ã«è¨­å®šã™ã‚‹ã¨ã€ã‚³ãƒ³ãƒ†ãƒŠã«ç›´æŽ¥æŽ¥ç¶šã•ã‚Œã¾ã™ã€‚設定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ã‚£ã‚¹ã‚¯ã¯ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«æŽ¥ç¶šã—ã¦ã‚³ãƒ³ãƒ†ãƒŠ`container_name`ãŒå­˜åœ¨ã™ã‚‹ã‹ãƒã‚§ãƒƒã‚¯ã—ã€ã¾ã å­˜åœ¨ã—ãªã„å ´åˆã¯ä½œæˆã—ã¾ã™ã€‚ + +èªè¨¼ãƒ‘ラメータ(ディスクã¯ä½¿ç”¨å¯èƒ½ãªå…¨ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰**ã¨**管ç†å¯¾è±¡ID資格情報を試ã¿ã¾ã™ï¼‰: +* `connection_string` - 接続文字列を用ã„ãŸèªè¨¼ç”¨ã€‚ +* `account_name`ã¨`account_key` - 共有キーを用ã„ãŸèªè¨¼ç”¨ã€‚ + +制é™ãƒ‘ラメータ(主ã«å†…部使用å‘ã‘): +* `s3_max_single_part_upload_size` - Blob Storageã«å˜ä¸€ã®ãƒ–ロックアップロードã®ã‚µã‚¤ã‚ºã‚’制é™ã—ã¾ã™ã€‚ +* `min_bytes_for_seek` - シークå¯èƒ½ãªé ˜åŸŸã®ã‚µã‚¤ã‚ºã‚’制é™ã—ã¾ã™ã€‚ +* `max_single_read_retries` - Blob Storageã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ãƒãƒ£ãƒ³ã‚¯ã®èª­ã¿å–り試行回数を制é™ã—ã¾ã™ã€‚ +* `max_single_download_retries` - Blob Storageã‹ã‚‰ã®èª­ã¿å–ã‚Šå¯èƒ½ãªãƒãƒƒãƒ•ã‚¡ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰è©¦è¡Œå›žæ•°ã‚’制é™ã—ã¾ã™ã€‚ +* `thread_pool_size` - `IDiskRemote`ãŒã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã™ã‚‹éš›ã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’制é™ã—ã¾ã™ã€‚ +* `s3_max_inflight_parts_for_one_file` - 一ã¤ã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦åŒæ™‚ã«å®Ÿè¡Œå¯èƒ½ãªputリクエストã®æ•°ã‚’制é™ã—ã¾ã™ã€‚ + +ãã®ä»–ã®ãƒ‘ラメータ: +* `metadata_path` - Blob Storageã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿å­˜ã™ã‚‹ãƒ­ãƒ¼ã‚«ãƒ«FSパス。デフォルト値ã¯`/var/lib/clickhouse/disks//`ã§ã™ã€‚ +* `skip_access_check` - trueã®å ´åˆã€ãƒ‡ã‚£ã‚¹ã‚¯ã®èµ·å‹•æ™‚ã«ã‚¢ã‚¯ã‚»ã‚¹ãƒã‚§ãƒƒã‚¯ã¯å®Ÿè¡Œã•ã‚Œã¾ã›ã‚“。デフォルト値ã¯`false`ã§ã™ã€‚ +* `read_resource` — ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®èª­ã¿å–りリクエストã®[スケジューリング](/docs/ja/operations/workload-scheduling.md)ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒªã‚½ãƒ¼ã‚¹å。デフォルト値ã¯ç©ºæ–‡å­—列(IOスケジューリングã¯ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«å¯¾ã—ã¦æœ‰åŠ¹ã§ã¯ã‚ã‚Šã¾ã›ã‚“)。 +* `write_resource` — ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®æ›¸ãè¾¼ã¿ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®[スケジューリング](/docs/ja/operations/workload-scheduling.md)ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒªã‚½ãƒ¼ã‚¹å。デフォルト値ã¯ç©ºæ–‡å­—列(IOスケジューリングã¯ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«å¯¾ã—ã¦æœ‰åŠ¹ã§ã¯ã‚ã‚Šã¾ã›ã‚“)。 +* `metadata_keep_free_space_bytes` - メタデータディスクã«äºˆç´„ã•ã‚Œã‚‹ç©ºã領域ã®é‡ã€‚ + +動作ã™ã‚‹è¨­å®šä¾‹ã¯ã€çµ±åˆãƒ†ã‚¹ãƒˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚ã‚Šã¾ã™ï¼ˆä¾‹: [test_merge_tree_azure_blob_storage](https://github.com/ClickHouse/ClickHouse/blob/master/tests/integration/test_merge_tree_azure_blob_storage/configs/config.d/storage_conf.xml)ã¾ãŸã¯[test_azure_blob_storage_zero_copy_replication](https://github.com/ClickHouse/ClickHouse/blob/master/tests/integration/test_azure_blob_storage_zero_copy_replication/configs/config.d/storage_conf.xml)ã‚’å‚照)。 + +:::note Zero-copy レプリケーションã¯æœ¬ç•ªç’°å¢ƒã«ã¯å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“ +Zero-copy レプリケーションã¯ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³22.8以é™ã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯æœ¬ç•ªç’°å¢ƒã§ã®ä½¿ç”¨ã‚’推奨ã—ã¾ã›ã‚“。 +::: + +## HDFS ストレージã®ä½¿ç”¨ï¼ˆéžå¯¾å¿œï¼‰ + +ã“ã®ã‚µãƒ³ãƒ—ル設定ã§ã¯ï¼š +- ディスクタイプã¯`hdfs`(éžã‚µãƒãƒ¼ãƒˆï¼‰ +- データã¯`hdfs://hdfs1:9000/clickhouse/`ã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ã¡ãªã¿ã«ã€HDFSã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ä½¿ç”¨æ™‚ã«å•é¡ŒãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚å•é¡ŒãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€ä¿®æ­£ã®ãŸã‚ã®ãƒ—ルリクエストを自由ã«è¡Œã£ã¦ãã ã•ã„。 + +```xml + + + + + hdfs + hdfs://hdfs1:9000/clickhouse/ + true + + + local + / + + + + + +
    + hdfs +
    + + hdd + +
    +
    +
    +
    +
    +``` + +HDFSã¯ã€ã‚³ãƒ¼ãƒŠãƒ¼ã‚±ãƒ¼ã‚¹ã§å‹•ä½œã—ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +### データ暗å·åŒ–ã®ä½¿ç”¨ {#encrypted-virtual-file-system} + +[S3](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-s3)ã€ã¾ãŸã¯ã‚ªãƒ³ãƒ—レミスディスクã«ä¿å­˜ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’æš—å·åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚æš—å·åŒ–モードをオンã«ã™ã‚‹ã«ã¯ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§`encrypted`タイプã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’定義ã—ã€ãƒ‡ãƒ¼ã‚¿ãŒä¿å­˜ã•ã‚Œã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`encrypted`ディスクã¯æ›¸ãè¾¼ã¿ä¸­ã«ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’オンザフライã§æš—å·åŒ–ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読む際ã«ã¯è‡ªå‹•çš„ã«å¾©å·ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€é€šå¸¸ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¨åŒæ§˜ã«`encrypted`ディスクをæ“作ã§ãã¾ã™ã€‚ + +ディスク設定ã®ä¾‹ï¼š + +``` xml + + + local + /path1/ + + + encrypted + disk1 + path2/ + _16_ascii_chars_ + + +``` + +例ãˆã°ã€ClickHouseãŒã‚るテーブルã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«`store/all_1_1_0/data.bin`ã‚’`disk1`ã«æ›¸ã込む場åˆã€å®Ÿéš›ã«ã¯ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ç‰©ç†ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ‘ス`/path1/store/all_1_1_0/data.bin`ã¨ã—ã¦æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +åŒã˜ãƒ•ã‚¡ã‚¤ãƒ«ã‚’`disk2`ã«æ›¸ã込む際ã«ã¯ã€å®Ÿéš›ã«ã¯ç‰©ç†ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ‘ス`/path1/path2/store/all_1_1_0/data.bin`ã¨ã—ã¦æš—å·åŒ–モードã§æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +必須パラメータ: + +- `type` — `encrypted`。暗å·åŒ–ã•ã‚ŒãŸãƒ‡ã‚£ã‚¹ã‚¯ã‚’作æˆã™ã‚‹ã«ã¯ã“ã‚ŒãŒå¿…è¦ã§ã™ã€‚ +- `disk` — データをä¿å­˜ã™ã‚‹ãŸã‚ã®ãƒ‡ã‚£ã‚¹ã‚¯ã®ã‚¿ã‚¤ãƒ—。 +- `key` — æš—å·åŒ–ã¨å¾©å·åŒ–ã®ãŸã‚ã®ã‚­ãƒ¼ã€‚タイプ: [Uint64](/docs/ja/sql-reference/data-types/int-uint.md)。キーを16進形å¼ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã«ã¯`key_hex`パラメータを使用ã§ãã¾ã™ã€‚ +keyを複数指定ã™ã‚‹å ´åˆã€`id`属性を使用ã—ã¦è­˜åˆ¥ã§ãã¾ã™ï¼ˆä¸‹è¨˜ã®ä¾‹ã‚’å‚照)。 + +オプションパラメータ: + +- `path` — ディスク上ã§ãƒ‡ãƒ¼ã‚¿ãŒä¿å­˜ã•ã‚Œã‚‹å ´æ‰€ã¸ã®ãƒ‘ス。指定ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ«ãƒ¼ãƒˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ +- `current_key_id` — æš—å·åŒ–ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚­ãƒ¼ã§ã™ã€‚指定ã•ã‚ŒãŸã™ã¹ã¦ã®ã‚­ãƒ¼ã¯å¾©å·åŒ–ã«ä½¿ç”¨ã§ãã€ä»¥å‰ã«æš—å·åŒ–ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’維æŒã—ã¤ã¤ã€ã„ã¤ã§ã‚‚別ã®ã‚­ãƒ¼ã«åˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ +- `algorithm` — æš—å·åŒ–ã«ä½¿ç”¨ã™ã‚‹[アルゴリズム](/docs/ja/sql-reference/statements/create/table.md/#create-query-encryption-codecs)。å¯èƒ½ãªå€¤ï¼š`AES_128_CTR`ã€`AES_192_CTR`ã€ã¾ãŸã¯`AES_256_CTR`。デフォルト値:`AES_128_CTR`。アルゴリズムã«ã‚ˆã£ã¦ã‚­ãƒ¼ã®é•·ã•ã¯ç•°ãªã‚Šã¾ã™ï¼š`AES_128_CTR` — 16ãƒã‚¤ãƒˆã€`AES_192_CTR` — 24ãƒã‚¤ãƒˆã€`AES_256_CTR` — 32ãƒã‚¤ãƒˆã€‚ + +ディスク設定ã®ä¾‹ï¼š + +``` xml + + + + + s3 + ... + + + encrypted + disk_s3 + AES_128_CTR + 00112233445566778899aabbccddeeff + ffeeddccbbaaa99887766554433221100 + 1 + + + + +``` + +### ローカルキャッシュã®ä½¿ç”¨ {#using-local-cache} + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³22.3以é™ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸è¨­å®šå†…ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«å¯¾ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’設定ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ +ãƒãƒ¼ã‚¸ãƒ§ãƒ³22.3ã‹ã‚‰22.7ã®é–“ã¯ã€`s3`ディスクタイプã«å¯¾ã—ã¦ã®ã¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³>=22.8ã§ã¯ã€ä»»æ„ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¿ã‚¤ãƒ—(S3ã€Azureã€ãƒ­ãƒ¼ã‚«ãƒ«ã€æš—å·åŒ–ãªã©ï¼‰ã«å¯¾ã—ã¦ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +ãƒãƒ¼ã‚¸ãƒ§ãƒ³>=23.5ã§ã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ã‚£ã‚¹ã‚¯ã‚¿ã‚¤ãƒ—(S3ã€Azureã€HDFS éžå¯¾å¿œï¼‰ã®ã¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +キャッシュã¯`LRU`キャッシュãƒãƒªã‚·ãƒ¼ã‚’使用ã—ã¦ã„ã¾ã™ã€‚ + + +次ã«ãƒãƒ¼ã‚¸ãƒ§ãƒ³22.8以é™ã®æ§‹æˆä¾‹ã§ã™ï¼š + +``` xml + + + + + s3 + ... + ... s3 configuration ... + + + cache + s3 + /s3_cache/ + 10Gi + + + + + +
    + cache +
    +
    +
    + +
    +``` + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³22.8以å‰ã®æ§‹æˆä¾‹ï¼š + +``` xml + + + + + s3 + ... + ... s3 configuration ... + 1 + 10737418240 + + + + + +
    + s3 +
    +
    +
    + +
    +``` + +ファイルキャッシュ**ディスク設定ã®è¨­å®š**: + +ã“れらã®è¨­å®šã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯è¨­å®šã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§å®šç¾©ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +- `path` - キャッシュをä¿å­˜ã™ã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¸ã®ãƒ‘ス。デフォルト:Noneã€ã“ã®è¨­å®šã¯å¿…é ˆã§ã™ã€‚ + +- `max_size` - ãƒã‚¤ãƒˆå˜ä½ã¾ãŸã¯èª­ã¿å–ã‚Šå¯èƒ½ãªå½¢å¼ã§ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆä¾‹ï¼š`ki, Mi, Gi`ãªã©ã€ä¾‹`10Gi`(ã“ã®å½¢å¼ã¯ãƒãƒ¼ã‚¸ãƒ§ãƒ³`22.10`以é™ã§ä½¿ç”¨å¯èƒ½ï¼‰ï¼‰ã€‚制é™ã«é”ã—ãŸå ´åˆã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ“クションãƒãƒªã‚·ãƒ¼ã«å¾“ã£ã¦å‰Šé™¤ã•ã‚Œã¾ã™ã€‚デフォルト:Noneã€ã“ã®è¨­å®šã¯å¿…é ˆã§ã™ã€‚ + +- `cache_on_write_operations` - `write-through`キャッシュ(ã™ã¹ã¦ã®æ›¸ãè¾¼ã¿æ“作(`INSERT`クエリã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ï¼‰ã§ãƒ‡ãƒ¼ã‚¿ãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ï¼‰ã‚’オンã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚デフォルト:`false`ã§ã™ã€‚`write-through`キャッシュã¯ã€è¨­å®š`enable_filesystem_cache_on_write_operations`を使用ã—ã¦ã‚¯ã‚¨ãƒªã”ã¨ã«ç„¡åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆãƒ‡ãƒ¼ã‚¿ã¯ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥è¨­å®šã¨å¯¾å¿œã™ã‚‹ã‚¯ã‚¨ãƒªè¨­å®šãŒä¸¡æ–¹ã¨ã‚‚有効ãªå ´åˆã«ã®ã¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ï¼‰ã€‚ + +- `enable_filesystem_query_cache_limit` - å„クエリ内ã§ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ã‚µã‚¤ã‚ºã‚’制é™ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ï¼ˆãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®š`max_query_cache_size`ã«ä¾å­˜ã—ã¾ã™ï¼‰ã€‚デフォルト:`false`ã§ã™ã€‚ + +- `enable_cache_hits_threshold` - データãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹å‰ã«å¿…è¦ãªèª­ã¿å–り回数を定義ã—ã¾ã™ã€‚デフォルト:`false`ã§ã™ã€‚ã“ã®ã—ãã„値ã¯ã€`cache_hits_threshold`ã«ã‚ˆã£ã¦å®šç¾©ã§ãã¾ã™ã€‚デフォルト:`0`ã€ã¤ã¾ã‚Šæœ€åˆã®è©¦è¡Œã§ãƒ‡ãƒ¼ã‚¿ãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ + +- `enable_bypass_cache_with_threshold` - è¦æ±‚ã•ã‚ŒãŸèª­ã¿å–り範囲ãŒã—ãã„値を超ãˆãŸå ´åˆã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’完全ã«ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルト:`false`ã§ã™ã€‚ã“ã®ã—ãã„値ã¯ã€`bypass_cache_threashold`ã«ã‚ˆã£ã¦å®šç¾©ã§ãã¾ã™ã€‚デフォルト:`268435456`(`256Mi`)。 + +- `max_file_segment_size` - å˜ä¸€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ã¾ãŸã¯èª­ã¿å–ã‚Šå¯èƒ½ãªå½¢å¼ï¼ˆ`ki, Mi, Gi`ãªã©ã€ä¾‹`10Gi`))。デフォルト:`8388608`(`8Mi`)。 + +- `max_elements` - キャッシュファイルã®æ•°ã®åˆ¶é™ã€‚デフォルト:`10000000`。 + +- `load_metadata_threads` - 起動時ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚デフォルト:`16`. + +ファイルキャッシュ**クエリ/プロファイル設定**: + +ã“れらã®è¨­å®šã®ä¸€éƒ¨ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¾ãŸã¯ãƒ‡ã‚£ã‚¹ã‚¯è¨­å®šã®è¨­å®šã§æœ‰åŠ¹ã«ã•ã‚Œã¦ã„るキャッシュ機能をクエリ/プロファイルã”ã¨ã«ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’ディスク設定ã§æœ‰åŠ¹ã«ã—ã€ã‚¯ã‚¨ãƒª/プロファイル設定を`enable_filesystem_cache`ã¨ã—ã¦`false`ã«è¨­å®šã—ã¦ã‚¯ã‚¨ãƒªã”ã¨ã«ç„¡åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã¾ãŸã€ `write-through`キャッシュãŒæœ‰åŠ¹ã§ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚特定ã®ã‚¯ã‚¨ãƒªã”ã¨ã«ã“ã®ä¸€èˆ¬çš„ãªè¨­å®šã‚’無効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`enable_filesystem_cache_on_write_operations`ã‚’`false`ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- `enable_filesystem_cache` - クエリã”ã¨ã«ãƒ‡ã‚£ã‚¹ã‚¯ã‚¿ã‚¤ãƒ—ãŒ`cache`ã§æ§‹æˆã•ã‚Œã¦ã„るストレージãƒãƒªã‚·ãƒ¼ã®å ´åˆã§ã‚‚キャッシュを無効ã«ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルト:`true`。 + +- `read_from_filesystem_cache_if_exists_otherwise_bypass_cache` - æ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã«ã®ã¿ã‚¯ã‚¨ãƒªã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’利用ã—ã€ãれ以外ã®å ´åˆã¯ã‚¯ã‚¨ãƒªãƒ‡ãƒ¼ã‚¿ãŒãƒ­ãƒ¼ã‚«ãƒ«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«æ›¸ãè¾¼ã¾ã‚Œãªã„よã†ã«ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルト:`false`。 + +- `enable_filesystem_cache_on_write_operations` - `write-through`キャッシュをオンã«ã—ã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥è¨­å®šã§`cache_on_write_operations`ãŒã‚ªãƒ³ã«ãªã£ã¦ã„ã‚‹å ´åˆã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚デフォルト:`false`。クラウドã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼š`true`。 + +- `enable_filesystem_cache_log` - `system.filesystem_cache_log`テーブルã¸ã®ãƒ­ã‚°è¨˜éŒ²ã‚’オンã«ã—ã¾ã™ã€‚クエリã”ã¨ã«ã€ã¾ãŸã¯ãƒ—ロファイル内ã§æœ‰åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚デフォルト:`false`。 + +- `max_query_cache_size` - ローカルキャッシュストレージã«æ›¸ãè¾¼ã‚る最大キャッシュサイズã®åˆ¶é™ã€‚キャッシュ設定ã§`enable_filesystem_query_cache_limit`ãŒæœ‰åŠ¹ãªå ´åˆã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚デフォルト:`false`。 + +- `skip_download_if_exceeds_query_cache` - `max_query_cache_size`設定ã®å‹•ä½œã‚’変更ã—ã¾ã™ã€‚デフォルト:`true`。ã“ã®è¨­å®šãŒã‚ªãƒ³ã§ã€ã‚¯ã‚¨ãƒªä¸­ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰åˆ¶é™ã«é”ã—ãŸå ´åˆã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ã“れ以上ダウンロードã•ã‚Œã¾ã›ã‚“。ã“ã®è¨­å®šãŒã‚ªãƒ•ã§ã€ã‚¯ã‚¨ãƒªä¸­ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰åˆ¶é™ãŒé”ã—ãŸå ´åˆã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ãã‚Œã§ã‚‚ç¾åœ¨ã®ã‚¯ã‚¨ãƒªå†…ã§ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’以å‰ã«ã‚¨ãƒ“クトã™ã‚‹ã“ã¨ã§æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€2番目ã®å‹•ä½œã¯ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥åˆ¶é™ã‚’維æŒã—ãªãŒã‚‰ã€`last recently used`ã®æŒ¯ã‚‹èˆžã„を維æŒã—ã¾ã™ã€‚ + +**警告** +キャッシュ設定ã®è¨­å®šã¨ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¯ã‚¨ãƒªè¨­å®šã¯æœ€æ–°ã®ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«å¯¾å¿œã—ã¦ã„ã¾ã™ãŒã€ä»¥å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ä½•ã‹ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +キャッシュ**システムテーブル**: + +- `system.filesystem_cache` - キャッシュã®ç¾åœ¨ã®çŠ¶æ³ã‚’表示ã™ã‚‹ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル。 + +- `system.filesystem_cache_log` - クエリã”ã¨ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ä½¿ç”¨ã®è©³ç´°ã‚’表示ã™ã‚‹ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル。`enable_filesystem_cache_log`設定ãŒ`true`ã§ã‚ã‚‹ã“ã¨ãŒå¿…è¦ã§ã™ã€‚ + +キャッシュ**コマンド**: + +- `SYSTEM DROP FILESYSTEM CACHE () (ON CLUSTER)` -- `ON CLUSTER`ã¯``ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„時ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ + +- `SHOW FILESYSTEM CACHES` -- サーãƒãƒ¼ã§æ§‹æˆã•ã‚Œã¦ã„るファイルシステムキャッシュã®ãƒªã‚¹ãƒˆã‚’表示ã—ã¾ã™ã€‚(ãƒãƒ¼ã‚¸ãƒ§ãƒ³<= `22.8`ã§ã¯`SHOW CACHES`ã¨ã„ã†ã‚³ãƒžãƒ³ãƒ‰åãŒä½¿ç”¨ã•ã‚Œã¾ã™) + +```sql +SHOW FILESYSTEM CACHES +``` + +çµæžœï¼š + +``` text +┌─Caches────┠+│ s3_cache │ +└───────────┘ +``` + +- `DESCRIBE FILESYSTEM CACHE ''` - 特定ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®æ§‹æˆã¨ã„ãã¤ã‹ã®ä¸€èˆ¬çš„ãªçµ±è¨ˆã‚’表示ã—ã¾ã™ã€‚キャッシュåã¯`SHOW FILESYSTEM CACHES`コマンドã‹ã‚‰å–å¾—ã§ãã¾ã™ã€‚(ãƒãƒ¼ã‚¸ãƒ§ãƒ³<= `22.8`ã§ã¯`DESCRIBE CACHE`ã¨ã„ã†ã‚³ãƒžãƒ³ãƒ‰åãŒä½¿ç”¨ã•ã‚Œã¾ã™) + +```sql +DESCRIBE FILESYSTEM CACHE 's3_cache' +``` + +``` text +┌────max_size─┬─max_elements─┬─max_file_segment_size─┬─boundary_alignment─┬─cache_on_write_operations─┬─cache_hits_threshold─┬─current_size─┬─current_elements─┬─path───────┬─background_download_threads─┬─enable_bypass_cache_with_threshold─┠+│ 10000000000 │ 1048576 │ 104857600 │ 4194304 │ 1 │ 0 │ 3276 │ 54 │ /s3_cache/ │ 2 │ 0 │ +└─────────────┴──────────────┴───────────────────────┴────────────────────┴───────────────────────────┴──────────────────────┴──────────────┴──────────────────┴────────────┴─────────────────────────────┴────────────────────────────────────┘ +``` + +キャッシュã®ç¾åœ¨ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ï¼š + +- `FilesystemCacheSize` + +- `FilesystemCacheElements` + +キャッシュã®éžåŒæœŸãƒ¡ãƒˆãƒªã‚¯ã‚¹ï¼š + +- `FilesystemCacheBytes` + +- `FilesystemCacheFiles` + +キャッシュプロファイルイベント: + +- `CachedReadBufferReadFromSourceBytes`, `CachedReadBufferReadFromCacheBytes,` + +- `CachedReadBufferReadFromSourceMicroseconds`, `CachedReadBufferReadFromCacheMicroseconds` + +- `CachedReadBufferCacheWriteBytes`, `CachedReadBufferCacheWriteMicroseconds` + +- `CachedWriteBufferCacheWriteBytes`, `CachedWriteBufferCacheWriteMicroseconds` + +### é™çš„Webストレージã®ä½¿ç”¨ï¼ˆèª­ã¿å–り専用) {#web-storage} + +ã“ã‚Œã¯èª­ã¿å–り専用ディスクã§ã™ã€‚ãã®ãƒ‡ãƒ¼ã‚¿ã¯èª­ã¿å–られるã ã‘ã§ã€å¤‰æ›´ã•ã‚Œã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。新ã—ã„テーブル㯠`ATTACH TABLE` クエリを介ã—ã¦ã“ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ï¼ˆä»¥ä¸‹ã®ä¾‹ã‚’å‚照)。ローカルディスクã¯å®Ÿéš›ã«ã¯ä½¿ç”¨ã•ã‚Œãšã€å„`SELECT`クエリã¯å¿…è¦ãªãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ãŸã‚ã®`http`リクエストを発生ã•ã›ã¾ã™ã€‚テーブルデータã®å¤‰æ›´ã¯ã™ã¹ã¦ä¾‹å¤–ã¨ãªã‚Šã€ä»¥ä¸‹ã®ã‚¿ã‚¤ãƒ—ã®ã‚¯ã‚¨ãƒªã¯è¨±å¯ã•ã‚Œã¾ã›ã‚“:[CREATE TABLE](/docs/ja/sql-reference/statements/create/table.md), [ALTER TABLE](/docs/ja/sql-reference/statements/alter/index.md), [RENAME TABLE](/docs/ja/sql-reference/statements/rename.md/#misc_operations-rename_table), [DETACH TABLE](/docs/ja/sql-reference/statements/detach.md), [TRUNCATE TABLE](/docs/ja/sql-reference/statements/truncate.md)。 +ウェブストレージã¯èª­ã¿å–り専用目的ã§ä½¿ç”¨ã§ãã¾ã™ã€‚例ã¨ã—ã¦ã€ã‚µãƒ³ãƒ—ルデータã®ãƒ›ã‚¹ãƒ†ã‚£ãƒ³ã‚°ã‚„データã®ç§»è¡ŒãŒã‚ã‚Šã¾ã™ã€‚ +データディレクトリを特定ã®ãƒ†ãƒ¼ãƒ–ル(`SELECT data_paths FROM system.tables WHERE name = 'table_name'`)ã«å¯¾ã—ã¦æº–å‚™ã™ã‚‹ãƒ„ール`clickhouse-static-files-uploader`ãŒã‚ã‚Šã¾ã™ã€‚å¿…è¦ãªå„テーブルã«ã¤ã„ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãŒå¾—られã¾ã™ã€‚ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ãŸã¨ãˆã°é™çš„ファイルをæŒã¤ã‚¦ã‚§ãƒ–サーãƒãƒ¼ã«ã‚¢ãƒƒãƒ—ロードã§ãã¾ã™ã€‚ã“ã®æº–å‚™ã®å¾Œã€ä»»æ„ã®ClickHouseサーãƒã«ã“ã®ãƒ†ãƒ¼ãƒ–ルを`DiskWeb`経由ã§ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®ã‚µãƒ³ãƒ—ル構æˆã§ã¯ï¼š +- ディスクタイプã¯`web` +- データã¯`http://nginx:80/test1/`ã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ +- ローカルストレージã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒä½¿ç”¨ã•ã‚Œã¾ã™ + +```xml + + + + + web + http://nginx:80/test1/ + + + cache + web + cached_web_cache/ + 100000000 + + + + + +
    + web +
    +
    +
    + + +
    + cached_web +
    +
    +
    +
    +
    +
    +``` + +:::tip +通常使用ã•ã‚Œãªã„Webデータセットã®å ´åˆã€ã‚¯ã‚¨ãƒªå†…ã§ä¸€æ™‚çš„ã«ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’設定ã§ãã‚‹ã®ã§ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’編集ã™ã‚‹æ‰‹é–“ãŒçœã‘ã¾ã™ã€‚詳細ã¯[dynamic configuration](#dynamic-configuration)ã‚’å‚照。 +::: + +:::tip +デモデータセットãŒGitHubã«ãƒ›ã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚自分ã®ãƒ†ãƒ¼ãƒ–ルをWebストレージã«æº–å‚™ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€ãƒ„ール[clickhouse-static-files-uploader](/docs/ja/operations/storing-data.md/#storing-data-on-webserver)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +ã“ã®`ATTACH TABLE`クエリã§ã¯ã€æŒ‡å®šã•ã‚ŒãŸ`UUID`ãŒãƒ‡ãƒ¼ã‚¿ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªåã«ä¸€è‡´ã—ã€ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã¯ç”Ÿã®GitHubコンテンツã®URLã§ã™ã€‚ + +```sql +# highlight-next-line +ATTACH TABLE uk_price_paid UUID 'cf712b4f-2ca8-435c-ac23-c4393efe52f7' +( + price UInt32, + date Date, + postcode1 LowCardinality(String), + postcode2 LowCardinality(String), + type Enum8('other' = 0, 'terraced' = 1, 'semi-detached' = 2, 'detached' = 3, 'flat' = 4), + is_new UInt8, + duration Enum8('unknown' = 0, 'freehold' = 1, 'leasehold' = 2), + addr1 String, + addr2 String, + street LowCardinality(String), + locality LowCardinality(String), + town LowCardinality(String), + district LowCardinality(String), + county LowCardinality(String) +) +ENGINE = MergeTree +ORDER BY (postcode1, postcode2, addr1, addr2) + # highlight-start + SETTINGS disk = disk( + type=web, + endpoint='https://raw.githubusercontent.com/ClickHouse/web-tables-demo/main/web/' + ); + # highlight-end +``` + +ã™ãã«ãƒ†ã‚¹ãƒˆã‚±ãƒ¼ã‚¹ã‚’準備ã—ã¾ã™ã€‚ã“ã®è¨­å®šã‚’コンフィグã«è¿½åŠ ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +``` xml + + + + + web + https://clickhouse-datasets.s3.yandex.net/disk-with-static-files-tests/test-hits/ + + + + + +
    + web +
    +
    +
    +
    +
    +
    +``` + +次ã«ã“ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ï¼š + +```sql +ATTACH TABLE test_hits UUID '1ae36516-d62d-4218-9ae3-6516d62da218' +( + WatchID UInt64, + JavaEnable UInt8, + Title String, + GoodEvent Int16, + EventTime DateTime, + EventDate Date, + CounterID UInt32, + ClientIP UInt32, + ClientIP6 FixedString(16), + RegionID UInt32, + UserID UInt64, + CounterClass Int8, + OS UInt8, + UserAgent UInt8, + URL String, + Referer String, + URLDomain String, + RefererDomain String, + Refresh UInt8, + IsRobot UInt8, + RefererCategories Array(UInt16), + URLCategories Array(UInt16), + URLRegions Array(UInt32), + RefererRegions Array(UInt32), + ResolutionWidth UInt16, + ResolutionHeight UInt16, + ResolutionDepth UInt8, + FlashMajor UInt8, + FlashMinor UInt8, + FlashMinor2 String, + NetMajor UInt8, + NetMinor UInt8, + UserAgentMajor UInt16, + UserAgentMinor FixedString(2), + CookieEnable UInt8, + JavascriptEnable UInt8, + IsMobile UInt8, + MobilePhone UInt8, + MobilePhoneModel String, + Params String, + IPNetworkID UInt32, + TraficSourceID Int8, + SearchEngineID UInt16, + SearchPhrase String, + AdvEngineID UInt8, + IsArtifical UInt8, + WindowClientWidth UInt16, + WindowClientHeight UInt16, + ClientTimeZone Int16, + ClientEventTime DateTime, + SilverlightVersion1 UInt8, + SilverlightVersion2 UInt8, + SilverlightVersion3 UInt32, + SilverlightVersion4 UInt16, + PageCharset String, + CodeVersion UInt32, + IsLink UInt8, + IsDownload UInt8, + IsNotBounce UInt8, + FUniqID UInt64, + HID UInt32, + IsOldCounter UInt8, + IsEvent UInt8, + IsParameter UInt8, + DontCountHits UInt8, + WithHash UInt8, + HitColor FixedString(1), + UTCEventTime DateTime, + Age UInt8, + Sex UInt8, + Income UInt8, + Interests UInt16, + Robotness UInt8, + GeneralInterests Array(UInt16), + RemoteIP UInt32, + RemoteIP6 FixedString(16), + WindowName Int32, + OpenerName Int32, + HistoryLength Int16, + BrowserLanguage FixedString(2), + BrowserCountry FixedString(2), + SocialNetwork String, + SocialAction String, + HTTPError UInt16, + SendTiming Int32, + DNSTiming Int32, + ConnectTiming Int32, + ResponseStartTiming Int32, + ResponseEndTiming Int32, + FetchTiming Int32, + RedirectTiming Int32, + DOMInteractiveTiming Int32, + DOMContentLoadedTiming Int32, + DOMCompleteTiming Int32, + LoadEventStartTiming Int32, + LoadEventEndTiming Int32, + NSToDOMContentLoadedTiming Int32, + FirstPaintTiming Int32, + RedirectCount Int8, + SocialSourceNetworkID UInt8, + SocialSourcePage String, + ParamPrice Int64, + ParamOrderID String, + ParamCurrency FixedString(3), + ParamCurrencyID UInt16, + GoalsReached Array(UInt32), + OpenstatServiceName String, + OpenstatCampaignID String, + OpenstatAdID String, + OpenstatSourceID String, + UTMSource String, + UTMMedium String, + UTMCampaign String, + UTMContent String, + UTMTerm String, + FromTag String, + HasGCLID UInt8, + RefererHash UInt64, + URLHash UInt64, + CLID UInt32, + YCLID UInt64, + ShareService String, + ShareURL String, + ShareTitle String, + ParsedParams Nested( + Key1 String, + Key2 String, + Key3 String, + Key4 String, + Key5 String, + ValueDouble Float64), + IslandID FixedString(16), + RequestNum UInt32, + RequestTry UInt8 +) +ENGINE = MergeTree() +PARTITION BY toYYYYMM(EventDate) +ORDER BY (CounterID, EventDate, intHash32(UserID)) +SAMPLE BY intHash32(UserID) +SETTINGS storage_policy='web'; +``` + +必須パラメーター: + +- `type` — `web`。ã“れ以外ã§ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã¯ä½œæˆã•ã‚Œã¾ã›ã‚“。 +- `endpoint` — `path`å½¢å¼ã§ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆURL。エンドãƒã‚¤ãƒ³ãƒˆURLã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒã‚¢ãƒƒãƒ—ロードã•ã‚ŒãŸãƒ«ãƒ¼ãƒˆãƒ‘スをå«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +オプションパラメーター: + +- `min_bytes_for_seek` — シークæ“作を使用ã™ã‚‹æœ€å°ãƒã‚¤ãƒˆæ•°ã€‚デフォルト値:`1` Mb。 +- `remote_fs_read_backoff_threashold` — リモートディスクã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹éš›ã®æœ€å¤§å¾…機時間。デフォルト値:`10000`秒。 +- `remote_fs_read_backoff_max_tries` — ãƒãƒƒã‚¯ã‚ªãƒ•ã®æœ€å¤§ãƒªãƒˆãƒ©ã‚¤å›žæ•°ã€‚デフォルト値:`5`。 + +クエリãŒ`DB:Exception Unreachable URL`ã®ä¾‹å¤–ã§å¤±æ•—ã—ãŸå ´åˆã¯ã€è¨­å®šã‚’調整ã—ã¦ã¿ã¦ãã ã•ã„:[http_connection_timeout](/docs/ja/operations/settings/settings.md/#http_connection_timeout), [http_receive_timeout](/docs/ja/operations/settings/settings.md/#http_receive_timeout), [keep_alive_timeout](/docs/ja/operations/server-configuration-parameters/settings.md/#keep-alive-timeout)。 + +アップロードã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã‚’実行ã—ã¾ã™ï¼š +`clickhouse static-files-disk-uploader --metadata-path --output-dir `(`--metadata-path` ã¯ã‚¯ã‚¨ãƒª`SELECT data_paths FROM system.tables WHERE name = 'table_name'`ã§ç¢ºèªã§ãã¾ã™ï¼‰ã€‚ + +ロードã™ã‚‹éš›ã«ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã¯`/store/`パスã«ã‚¢ãƒƒãƒ—ロードã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒã€ã‚³ãƒ³ãƒ•ã‚£ã‚°ã«ã¯`endpoint`ã ã‘ã‚’å«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ディスクロード時ã«URLã«åˆ°é”ã§ããªã„å ´åˆã€ã¤ã¾ã‚Šã‚µãƒ¼ãƒãŒèµ·å‹•ã—ã¦ãƒ†ãƒ¼ãƒ–ルを開始ã™ã‚‹æ™‚ã«ã€ã™ã¹ã¦ã®ã‚¨ãƒ©ãƒ¼ãŒã‚­ãƒ£ãƒƒãƒã•ã‚Œã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã¯å†ãƒ­ãƒ¼ãƒ‰ï¼ˆå¯è¦–化)ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚`DETACH TABLE table_name` -> `ATTACH TABLE table_name`。サーãƒèµ·å‹•æ™‚ã«ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒæ­£å¸¸ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸå ´åˆã€ãƒ†ãƒ¼ãƒ–ルã¯ã™ãã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +設定ãŒ`HTTP接続ã®æœ€å¤§å†è©¦è¡Œ`ã§åˆ¶é™ã•ã‚Œã¦ã„ã‚‹å ´åˆã€å˜ä¸€ã®HTTP読ã¿å–り中ã®æœ€å¤§å†è©¦è¡Œå›žæ•°ã‚’制é™ã™ã‚‹ãŸã‚ã«ã“ã®è¨­å®šã‚’使用ã—ã¦ãã ã•ã„。[http_max_single_read_retries](/docs/ja/operations/settings/settings.md/#http-max-single-read-retries)。 + +### ゼロコピー レプリケーション(生産環境ã«ã¯ä¸é©ï¼‰ {#zero-copy} + +ゼロコピー レプリケーションã¯ã€`S3`ãŠã‚ˆã³`HDFS`(éžå¯¾å¿œï¼‰ãƒ‡ã‚£ã‚¹ã‚¯ã§å¯èƒ½ã§ã™ãŒã€æŽ¨å¥¨ã•ã‚Œã¦ã„ã¾ã›ã‚“。ゼロコピー レプリケーションã¨ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒè¤‡æ•°ã®ãƒžã‚·ãƒ³ä¸Šã®ãƒªãƒ¢ãƒ¼ãƒˆã«ä¿å­˜ã•ã‚Œã¦ã„ã¦åŒæœŸã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãã®ã‚‚ã®ã§ã¯ãªãã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ï¼ˆãƒ‡ãƒ¼ã‚¿éƒ¨ã®ãƒ‘ス)ã ã‘ãŒãƒ¬ãƒ—リケートã•ã‚Œã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +:::note ゼロコピー レプリケーションã¯ã€æœ¬ç•ªç’°å¢ƒã«ã¯ä¸å‘ãã§ã™ +ゼロコピー レプリケーションã¯ã€ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³22.8以é™ã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã€æœ¬ç•ªç’°å¢ƒã§ã®ä½¿ç”¨ã‚’推奨ã—ã¾ã›ã‚“。 +::: + diff --git a/docs/ja/operations/system-tables/asynchronous_insert_log.md b/docs/ja/operations/system-tables/asynchronous_insert_log.md new file mode 100644 index 00000000000..c5f38443ff3 --- /dev/null +++ b/docs/ja/operations/system-tables/asynchronous_insert_log.md @@ -0,0 +1,66 @@ +--- +slug: /ja/operations/system-tables/asynchronous_insert_log +--- +# asynchronous_insert_log + +éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚å„エントリã¯ã€éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚¯ã‚¨ãƒªã¨ã—ã¦ãƒãƒƒãƒ•ã‚¡ã«ä¿å­˜ã•ã‚ŒãŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚¯ã‚¨ãƒªã‚’表ã—ã¾ã™ã€‚ + +ログを開始ã™ã‚‹ã«ã¯ã€[asynchronous_insert_log](../../operations/server-configuration-parameters/settings.md#asynchronous_insert_log) セクションã§ãƒ‘ラメーターを設定ã—ã¦ãã ã•ã„。 + +データã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥æœŸé–“ã¯ã€[asynchronous_insert_log](../../operations/server-configuration-parameters/settings.md#asynchronous_insert_log) サーãƒãƒ¼è¨­å®šã‚»ã‚¯ã‚·ãƒ§ãƒ³ã® `flush_interval_milliseconds` パラメーターã§è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚フラッシュを強制ã™ã‚‹ã«ã¯ã€[SYSTEM FLUSH LOGS](../../sql-reference/statements/system.md#query_language-system-flush_logs) クエリを使用ã—ã¦ãã ã•ã„。 + +ClickHouseã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰è‡ªå‹•çš„ã«ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã›ã‚“。詳細ã¯[概è¦](../../operations/system-tables/index.md#system-tables-introduction)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆãŒç™ºç”Ÿã—ãŸæ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆãŒçµ‚了ã—ãŸæ—¥æ™‚。 +- `event_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒精度ã§éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆãŒçµ‚了ã—ãŸæ—¥æ™‚。 +- `query` ([String](../../sql-reference/data-types/string.md)) — クエリ文字列。 +- `database` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒæ‰€å±žã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 +- `format` ([String](/docs/ja/sql-reference/data-types/string.md)) — フォーマットå。 +- `query_id` ([String](../../sql-reference/data-types/string.md)) — åˆæœŸã‚¯ã‚¨ãƒªã®ID。 +- `bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 挿入ã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚ +- `exception` ([String](../../sql-reference/data-types/string.md)) — 例外メッセージ。 +- `status` ([Enum8](../../sql-reference/data-types/enum.md)) — ビューã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã€‚値: + - `'Ok' = 1` — æˆåŠŸã—ãŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã€‚ + - `'ParsingError' = 2` — データã®è§£æžä¸­ã®ä¾‹å¤–。 + - `'FlushError' = 3` — データã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ä¸­ã®ä¾‹å¤–。 +- `flush_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — フラッシュãŒç™ºç”Ÿã—ãŸæ—¥æ™‚。 +- `flush_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒精度ã§ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ãŒç™ºç”Ÿã—ãŸæ—¥æ™‚。 +- `flush_query_id` ([String](../../sql-reference/data-types/string.md)) — フラッシュクエリã®ID。 + +**例** + +クエリ: + +``` sql +SELECT * FROM system.asynchronous_insert_log LIMIT 1 \G; +``` + +çµæžœ: + +``` text +hostname: clickhouse.eu-central1.internal +event_date: 2023-06-08 +event_time: 2023-06-08 10:08:53 +event_time_microseconds: 2023-06-08 10:08:53.199516 +query: INSERT INTO public.data_guess (user_id, datasource_id, timestamp, path, type, num, str) FORMAT CSV +database: public +table: data_guess +format: CSV +query_id: b46cd4c4-0269-4d0b-99f5-d27668c6102e +bytes: 133223 +exception: +status: Ok +flush_time: 2023-06-08 10:08:55 +flush_time_microseconds: 2023-06-08 10:08:55.139676 +flush_query_id: cd2c1e43-83f5-49dc-92e4-2fbc7f8d3716 +``` + +**関連項目** + +- [system.query_log](../../operations/system-tables/query_log.md#system_tables-query_log) — クエリã®å®Ÿè¡Œã«é–¢ã™ã‚‹ä¸€èˆ¬çš„ãªæƒ…報をå«ã‚€ `query_log` システムテーブルã®èª¬æ˜Žã€‚ +- [system.asynchronous_inserts](../../operations/system-tables/asynchronous_inserts.md#system_tables-asynchronous_inserts) — キュー内ã®ä¿ç•™ä¸­ã®éžåŒæœŸã‚¤ãƒ³ã‚µãƒ¼ãƒˆã«é–¢ã™ã‚‹æƒ…報をå«ã‚€ãƒ†ãƒ¼ãƒ–ル。 diff --git a/docs/ja/operations/system-tables/asynchronous_inserts.md b/docs/ja/operations/system-tables/asynchronous_inserts.md new file mode 100644 index 00000000000..72a2d5e6f12 --- /dev/null +++ b/docs/ja/operations/system-tables/asynchronous_inserts.md @@ -0,0 +1,45 @@ +--- +slug: /ja/operations/system-tables/asynchronous_inserts +--- +# asynchronous_inserts + +キュー内ã§ä¿ç•™ã—ã¦ã„ã‚‹éžåŒæœŸæŒ¿å…¥ã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +カラム: + +- `query` ([String](../../sql-reference/data-types/string.md)) — クエリ文字列。 +- `database` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒå­˜åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 +- `format` ([String](/docs/ja/sql-reference/data-types/string.md)) — フォーマットå。 +- `first_update` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒精度ã®æœ€åˆã®æŒ¿å…¥æ™‚間。 +- `total_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — キュー内ã§å¾…æ©Ÿã—ã¦ã„ã‚‹å…¨ãƒã‚¤ãƒˆæ•°ã€‚ +- `entries.query_id` ([Array(String)](../../sql-reference/data-types/array.md)) - キュー内ã§å¾…æ©Ÿã—ã¦ã„る挿入クエリã®ã‚¯ã‚¨ãƒªIDã®é…列。 +- `entries.bytes` ([Array(UInt64)](../../sql-reference/data-types/array.md)) - キュー内ã§å¾…æ©Ÿã—ã¦ã„ã‚‹å„挿入クエリã®ãƒã‚¤ãƒˆæ•°ã®é…列。 + +**例** + +クエリ: + +``` sql +SELECT * FROM system.asynchronous_inserts LIMIT 1 \G; +``` + +çµæžœ: + +``` text +Row 1: +────── +query: INSERT INTO public.data_guess (user_id, datasource_id, timestamp, path, type, num, str) FORMAT CSV +database: public +table: data_guess +format: CSV +first_update: 2023-06-08 10:08:54.199606 +total_bytes: 133223 +entries.query_id: ['b46cd4c4-0269-4d0b-99f5-d27668c6102e'] +entries.bytes: [133223] +``` + +**関連項目** + +- [system.query_log](../../operations/system-tables/query_log.md#system_tables-query_log) — クエリ実行ã«é–¢ã™ã‚‹ä¸€èˆ¬çš„ãªæƒ…報をå«ã‚€ `query_log` システムテーブルã®èª¬æ˜Žã€‚ +- [system.asynchronous_insert_log](../../operations/system-tables/asynchronous_insert_log.md#system_tables-asynchronous_insert_log) — 実行ã•ã‚ŒãŸéžåŒæœŸæŒ¿å…¥ã«é–¢ã™ã‚‹æƒ…報をå«ã‚€ãƒ†ãƒ¼ãƒ–ル。 diff --git a/docs/ja/operations/system-tables/asynchronous_loader.md b/docs/ja/operations/system-tables/asynchronous_loader.md new file mode 100644 index 00000000000..2aab2296421 --- /dev/null +++ b/docs/ja/operations/system-tables/asynchronous_loader.md @@ -0,0 +1,54 @@ +--- +slug: /ja/operations/system-tables/asynchronous_loader +--- +# asynchronous_loader + +最近ã®éžåŒæœŸã‚¸ãƒ§ãƒ–(例:テーブルã®ãƒ­ãƒ¼ãƒ‰ï¼‰ã®æƒ…å ±ã¨ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯å„ジョブã”ã¨ã«è¡ŒãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®æƒ…報を視覚化ã™ã‚‹ãƒ„ールã¨ã—㦠`utils/async_loader_graph` ãŒã‚ã‚Šã¾ã™ã€‚ + +例: + +``` sql +SELECT * +FROM system.asynchronous_loader +FORMAT Vertical +LIMIT 1 +``` + +``` text +``` + +カラム: + +- `job` (`String`) - ジョブå(ユニークã§ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ï¼‰ã€‚ +- `job_id` (`UInt64`) - ジョブã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ID。 +- `dependencies` (`Array(UInt64)`) - ã“ã®ã‚¸ãƒ§ãƒ–ã®å‰ã«å®Œäº†ã™ã‚‹å¿…è¦ãŒã‚るジョブã®IDリスト。 +- `dependencies_left` (`UInt64`) - ç¾åœ¨æ®‹ã£ã¦ã„ã‚‹ä¾å­˜é–¢ä¿‚ã®æ•°ã€‚ +- `status` (`Enum`) - ジョブã®ç¾åœ¨ã®ãƒ­ãƒ¼ãƒ‰ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹: + `PENDING`: ロードジョブã¯ã¾ã é–‹å§‹ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + `OK`: ロードジョブã¯å®Ÿè¡Œã•ã‚Œã€æˆåŠŸã—ã¾ã—ãŸã€‚ + `FAILED`: ロードジョブã¯å®Ÿè¡Œã•ã‚Œã€å¤±æ•—ã—ã¾ã—ãŸã€‚ + `CANCELED`: ロードジョブã¯å‰Šé™¤ã¾ãŸã¯ä¾å­˜é–¢ä¿‚ã®å¤±æ•—ã«ã‚ˆã‚Šå®Ÿè¡Œã•ã‚Œã¾ã›ã‚“。 + +ä¿ç•™ä¸­ã®ã‚¸ãƒ§ãƒ–ã¯ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã®çŠ¶æ…‹ã«ãªã£ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: +- `is_executing` (`UInt8`) - ジョブã¯ç¾åœ¨ãƒ¯ãƒ¼ã‚«ãƒ¼ã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã¦ã„ã¾ã™ã€‚ +- `is_blocked` (`UInt8`) - ジョブã¯ä¾å­˜é–¢ä¿‚ãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ã¡ã¾ã™ã€‚ +- `is_ready` (`UInt8`) - ジョブã¯å®Ÿè¡Œæº–å‚™ãŒã§ãã¦ãŠã‚Šã€ãƒ¯ãƒ¼ã‚«ãƒ¼ã®å¾…機状態ã§ã™ã€‚ +- `elapsed` (`Float64`) - 実行開始ã‹ã‚‰çµŒéŽã—ãŸç§’数。ジョブãŒé–‹å§‹ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã‚¼ãƒ­ã€‚ジョブãŒçµ‚了ã—ãŸå ´åˆã¯ç·å®Ÿè¡Œæ™‚間。 + +å„ジョブã«ã¯é–¢é€£ã™ã‚‹ãƒ—ールãŒã‚ã‚Šã€ã“ã®ãƒ—ールã§é–‹å§‹ã•ã‚Œã¾ã™ã€‚å„プールã«ã¯ä¸€å®šã®å„ªå…ˆé †ä½ã¨å¯å¤‰ã®æœ€å¤§ãƒ¯ãƒ¼ã‚«ãƒ¼æ•°ãŒã‚ã‚Šã¾ã™ã€‚優先順ä½ãŒé«˜ã„(`priority` 値ãŒä½Žã„)ã®ã‚¸ãƒ§ãƒ–ãŒå…ˆã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚å°‘ãªãã¨ã‚‚1ã¤ã®é«˜å„ªå…ˆé †ä½ã‚¸ãƒ§ãƒ–ãŒæº–備完了ã¾ãŸã¯å®Ÿè¡Œä¸­ã§ã‚ã‚‹é™ã‚Šã€ä½Žã„優先順ä½ã®ã‚¸ãƒ§ãƒ–ã¯é–‹å§‹ã•ã‚Œã¾ã›ã‚“。ジョブã®å„ªå…ˆé †ä½ã¯å¼•ã上ã’ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒï¼ˆä¸‹ã’ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“)ã€å®Ÿè¡Œä¸­ã«å„ªå…ˆé †ä½ã‚’高ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ­ãƒ¼ãƒ‰ãŠã‚ˆã³ã‚¹ã‚¿ãƒ¼ãƒˆã‚¢ãƒƒãƒ—ã®ã‚¸ãƒ§ãƒ–ã¯ã€å—信クエリãŒã“ã®ãƒ†ãƒ¼ãƒ–ルを必è¦ã¨ã™ã‚‹å ´åˆã€å„ªå…ˆã•ã‚Œã¾ã™ã€‚実行中ã«ã‚¸ãƒ§ãƒ–を優先ã—ã¦ã‚‚ã€ã‚¸ãƒ§ãƒ–ã¯ãã® `execution_pool` ã‹ã‚‰æ–°ã—ã指定ã•ã‚ŒãŸ `pool` ã«ç§»å‹•ã—ã¾ã›ã‚“。ジョブã¯å„ªå…ˆåº¦ã®é€†è»¢ã‚’é¿ã‘ã‚‹ãŸã‚ã«æ–°ã—ã„ジョブを作æˆã™ã‚‹å ´åˆã« `pool` を使用ã—ã¾ã™ã€‚æ—¢ã«é–‹å§‹ã•ã‚ŒãŸã‚¸ãƒ§ãƒ–ã¯ã€é«˜å„ªå…ˆé †ä½ã®ã‚¸ãƒ§ãƒ–ã«ã‚ˆã£ã¦ä¸­æ–­ã•ã‚Œãšã€é–‹å§‹å¾Œã¯å¸¸ã«å®Œäº†ã¾ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +- `pool_id` (`UInt64`) - ç¾åœ¨ã‚¸ãƒ§ãƒ–ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„るプールã®ID。 +- `pool` (`String`) - `pool_id` プールã®åå‰ã€‚ +- `priority` (`Int64`) - `pool_id` プールã®å„ªå…ˆé †ä½ã€‚ +- `execution_pool_id` (`UInt64`) - ジョブãŒå®Ÿè¡Œã•ã‚Œã‚‹ãƒ—ールã®ID。実行開始å‰ã®åˆã‚ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ—ールã¨ä¸€è‡´ã—ã¾ã™ã€‚ +- `execution_pool` (`String`) - `execution_pool_id` プールã®åå‰ã€‚ +- `execution_priority` (`Int64`) - `execution_pool_id` プールã®å„ªå…ˆé †ä½ã€‚ + +- `ready_seqno` (`Nullable(UInt64)`) - 準備完了状態ã®ã‚¸ãƒ§ãƒ–ã«å¯¾ã—㦠null ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ワーカーã¯ãã®ãƒ—ールã®æº–備キューã‹ã‚‰æ¬¡ã®ã‚¸ãƒ§ãƒ–を実行ã®ãŸã‚ã«å–å¾—ã—ã¾ã™ã€‚準備完了ジョブãŒè¤‡æ•°ã‚ã‚‹å ´åˆã¯ã€`ready_seqno` ã®å€¤ãŒæœ€ã‚‚低ã„ジョブãŒé¸ã°ã‚Œã¾ã™ã€‚ +- `waiters` (`UInt64`) - ã“ã®ã‚¸ãƒ§ãƒ–ã‚’å¾…æ©Ÿã—ã¦ã„るスレッドã®æ•°ã€‚ +- `exception` (`Nullable(String)`) - 失敗ãŠã‚ˆã³ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚ŒãŸã‚¸ãƒ§ãƒ–ã«å¯¾ã—㦠null ã§ã¯ã‚ã‚Šã¾ã›ã‚“。クエリ実行中ã«ç™ºç”Ÿã—ãŸã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚„ã€ã“ã®ã‚¸ãƒ§ãƒ–ã®ä¾å­˜é–¢ä¿‚失敗ãƒã‚§ãƒ¼ãƒ³ã¨å…±ã«ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã‚’引ãèµ·ã“ã—ãŸã‚¨ãƒ©ãƒ¼ã‚’ä¿æŒã—ã¾ã™ã€‚ + +ジョブã®ãƒ©ã‚¤ãƒ•ã‚¿ã‚¤ãƒ ä¸­ã®æ™‚間インスタンス: +- `schedule_time` (`DateTime64`) - ジョブãŒä½œæˆã•ã‚Œã€å®Ÿè¡Œã™ã‚‹ãŸã‚ã«ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚ŒãŸæ™‚間(通常ã™ã¹ã¦ã®ä¾å­˜é–¢ä¿‚ã¨å…±ã«ï¼‰ã€‚ +- `enqueue_time` (`Nullable(DateTime64)`) - ジョブãŒæº–備完了ã¨ãªã‚Šã€ãã®ãƒ—ールã®æº–備キューã«å…¥ã‚Œã‚‰ã‚ŒãŸæ™‚間。ジョブãŒæœªæº–å‚™ã®å ´åˆã¯ null。 +- `start_time` (`Nullable(DateTime64)`) - ワーカーãŒæº–備キューã‹ã‚‰ã‚¸ãƒ§ãƒ–をデキューã—ã€å®Ÿè¡Œã‚’開始ã—ãŸæ™‚間。ジョブãŒé–‹å§‹ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ null。 +- `finish_time` (`Nullable(DateTime64)`) - ジョブã®å®Ÿè¡ŒãŒçµ‚了ã—ãŸæ™‚間。ジョブãŒçµ‚了ã—ã¦ã„ãªã„å ´åˆã¯ null。 diff --git a/docs/ja/operations/system-tables/asynchronous_metric_log.md b/docs/ja/operations/system-tables/asynchronous_metric_log.md new file mode 100644 index 00000000000..fabad432c6b --- /dev/null +++ b/docs/ja/operations/system-tables/asynchronous_metric_log.md @@ -0,0 +1,51 @@ +--- +slug: /ja/operations/system-tables/asynchronous_metric_log +--- +# asynchronous_metric_log + +`system.asynchronous_metrics`ã®å±¥æ­´å€¤ã‚’ä¿æŒã—ã€ä¸€å®šã®æ™‚é–“é–“éš”ã§ï¼ˆä¸€ç§’ã”ã¨ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šï¼‰ä¿å­˜ã—ã¾ã™ã€‚デフォルトã§æœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — イベントã®æ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — イベントã®æ™‚刻。 +- `metric` ([String](../../sql-reference/data-types/string.md)) — メトリクスã®åå‰ã€‚ +- `value` ([Float64](../../sql-reference/data-types/float.md)) — メトリクスã®å€¤ã€‚ + +**例** + +``` sql +SELECT * FROM system.asynchronous_metric_log LIMIT 3 \G +``` + +``` text +Row 1: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2023-11-14 +event_time: 2023-11-14 14:39:07 +metric: AsynchronousHeavyMetricsCalculationTimeSpent +value: 0.001 + +Row 2: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2023-11-14 +event_time: 2023-11-14 14:39:08 +metric: AsynchronousHeavyMetricsCalculationTimeSpent +value: 0 + +Row 3: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2023-11-14 +event_time: 2023-11-14 14:39:09 +metric: AsynchronousHeavyMetricsCalculationTimeSpent +value: 0 +``` + +**関連項目** + +- [system.asynchronous_metrics](../system-tables/asynchronous_metrics.md) — ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§å®šæœŸçš„ã«è¨ˆç®—ã•ã‚Œã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å«ã‚€ã€‚ +- [system.metric_log](../system-tables/metric_log.md) — テーブル`system.metrics`ã¨`system.events`ã‹ã‚‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹å€¤ã®å±¥æ­´ã‚’ä¿æŒã—ã€å®šæœŸçš„ã«ãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ã€‚ diff --git a/docs/ja/operations/system-tables/asynchronous_metrics.md b/docs/ja/operations/system-tables/asynchronous_metrics.md new file mode 100644 index 00000000000..76c5fba5197 --- /dev/null +++ b/docs/ja/operations/system-tables/asynchronous_metrics.md @@ -0,0 +1,648 @@ +--- +slug: /ja/operations/system-tables/asynchronous_metrics +--- +# asynchronous_metrics + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§å®šæœŸçš„ã«è¨ˆç®—ã•ã‚Œã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å«ã¿ã¾ã™ã€‚例ãˆã°ã€ä½¿ç”¨ä¸­ã®RAMã®é‡ãªã©ã§ã™ã€‚ + +カラム: + +- `metric` ([String](../../sql-reference/data-types/string.md)) — メトリクスå。 +- `value` ([Float64](../../sql-reference/data-types/float.md)) — メトリクスã®å€¤ã€‚ +- `description` ([String](../../sql-reference/data-types/string.md) - メトリクスã®èª¬æ˜Žï¼‰ + +**例** + +``` sql +SELECT * FROM system.asynchronous_metrics LIMIT 10 +``` + +``` text +┌─metric──────────────────────────────────┬──────value─┬─description────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ AsynchronousMetricsCalculationTimeSpent │ 0.00179053 │ 時間(秒å˜ä½ï¼‰éžåŒæœŸãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®è¨ˆç®—ã«è²»ã‚„ã•ã‚ŒãŸæ™‚間(ã“ã‚Œã¯éžåŒæœŸãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã§ã™ï¼‰ã€‚ │ +│ NumberOfDetachedByUserParts │ 0 │ `ALTER TABLE DETACH`クエリを使用ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦MergeTreeテーブルã‹ã‚‰åˆ†é›¢ã•ã‚ŒãŸãƒ‘ーツã®ç·æ•°ï¼ˆäºˆæœŸã—ãªã„ã€å£Šã‚ŒãŸã€ã¾ãŸã¯ç„¡è¦–ã•ã‚ŒãŸãƒ‘ーツã¨ã¯å¯¾ç…§çš„ã«ï¼‰ã€‚サーãƒãƒ¼ã¯åˆ†é›¢ã•ã‚ŒãŸãƒ‘ーツを気ã«ã—ã¾ã›ã‚“ã€ãれらã¯å‰Šé™¤ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ │ +│ NumberOfDetachedParts │ 0 │ MergeTreeテーブルã‹ã‚‰åˆ†é›¢ã•ã‚ŒãŸãƒ‘ーツã®ç·æ•°ã€‚パーツã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ`ALTER TABLE DETACH`クエリを使用ã™ã‚‹ã‹ã€ã‚µãƒ¼ãƒãƒ¼è‡ªèº«ã«ã‚ˆã£ã¦å£Šã‚ŒãŸã€äºˆæœŸã—ãªã„ã€ã¾ãŸã¯ä¸è¦ãªå ´åˆã«åˆ†é›¢ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚サーãƒãƒ¼ã¯åˆ†é›¢ã•ã‚ŒãŸãƒ‘ーツを気ã«ã—ã¾ã›ã‚“ã€ãれらã¯å‰Šé™¤ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ │ +│ TotalRowsOfMergeTreeTables │ 2781309 │ MergeTreeファミリーã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«æ ¼ç´ã•ã‚Œã¦ã„る行(レコード)ã®ç·æ•°ã€‚ │ +│ TotalBytesOfMergeTreeTables │ 7741926 │ MergeTreeファミリーã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«æ ¼ç´ã•ã‚Œã¦ã„ã‚‹ãƒã‚¤ãƒˆæ•°ï¼ˆãƒ‡ãƒ¼ã‚¿ã¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’å«ã‚€åœ§ç¸®ï¼‰ã€‚ │ +│ NumberOfTables │ 93 │ サーãƒãƒ¼ä¸Šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å…¨ä½“ã®ãƒ†ãƒ¼ãƒ–ルç·æ•°ã€MergeTreeテーブルをå«ã‚€ã“ã¨ãŒã§ããªã„データベースを除外。`Lazy`ã€`MySQL`ã€`PostgreSQL`ã€`SQlite`ã®ã‚ˆã†ã«å‹•çš„ã«ãƒ†ãƒ¼ãƒ–ルセットを生æˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã¯é™¤å¤–ã•ã‚Œã¾ã™ã€‚ │ +│ NumberOfDatabases │ 6 │ サーãƒãƒ¼ä¸Šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ç·æ•°ã€‚ │ +│ MaxPartCountForPartition │ 6 │ MergeTreeファミリーã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã®å„パーティションã«ãŠã‘るパーツã®æœ€å¤§æ•°ã€‚値ãŒ300を超ãˆã‚‹ã¨ã€è¨­å®šãƒŸã‚¹ã€éŽè² è·ã€å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ã‚’示ã—ã¾ã™ã€‚ │ +│ ReplicasSumMergesInQueue │ 0 │ レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル全体ã§ã‚­ãƒ¥ãƒ¼ï¼ˆã¾ã é©ç”¨ã•ã‚Œã¦ã„ãªã„)ã«ã‚るマージæ“作ã®åˆè¨ˆã€‚ │ +│ ReplicasSumInsertsInQueue │ 0 │ レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル全体ã§ã‚­ãƒ¥ãƒ¼ï¼ˆã¾ã ãƒ¬ãƒ—リケートã•ã‚Œã¦ã„ãªã„)ã«ã‚ã‚‹INSERTæ“作ã®åˆè¨ˆã€‚ │ +└─────────────────────────────────────────┴────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + + + +## メトリクスã®èª¬æ˜Ž + +### AsynchronousHeavyMetricsCalculationTimeSpent + +éžåŒæœŸã®é‡ã„(テーブル関連ã®ï¼‰ãƒ¡ãƒˆãƒªã‚¯ã‚¹è¨ˆç®—ã«è²»ã‚„ã•ã‚ŒãŸæ™‚間(秒å˜ä½ï¼‰ï¼ˆã“ã‚Œã¯éžåŒæœŸãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã§ã™ï¼‰ã€‚ + +### AsynchronousHeavyMetricsUpdateInterval + +é‡ã„(テーブル関連ã®ï¼‰ãƒ¡ãƒˆãƒªã‚¯ã‚¹æ›´æ–°é–“éš” + +### AsynchronousMetricsCalculationTimeSpent + +éžåŒæœŸãƒ¡ãƒˆãƒªã‚¯ã‚¹è¨ˆç®—ã«è²»ã‚„ã•ã‚ŒãŸæ™‚間(秒å˜ä½ï¼‰ï¼ˆã“ã‚Œã¯éžåŒæœŸãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã§ã™ï¼‰ã€‚ + +### AsynchronousMetricsUpdateInterval + +メトリクス更新間隔 + +### BlockActiveTime_*name* + +ブロックデãƒã‚¤ã‚¹ä¸Šã§IOリクエストãŒã‚­ãƒ¥ãƒ¼ã•ã‚Œã¦ã„ãŸæ™‚間(秒å˜ä½ï¼‰ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockDiscardBytes_*name* + +ブロックデãƒã‚¤ã‚¹ä¸Šã§ç ´æ£„ã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚ã“れらã®æ“作ã¯SSDã«é–¢é€£ã—ã¦ã„ã¾ã™ã€‚破棄æ“作ã¯ClickHouseã§ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“ãŒã€ã‚·ã‚¹ãƒ†ãƒ å†…ã®ä»–ã®ãƒ—ロセスã§ä½¿ç”¨ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockDiscardMerges_*name* + +ブロックデãƒã‚¤ã‚¹ã‹ã‚‰è¦æ±‚ã•ã‚Œã€OS IOスケジューラã«ã‚ˆã£ã¦ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸç ´æ£„æ“作ã®æ•°ã€‚ã“れらã®æ“作ã¯SSDã«é–¢é€£ã—ã¦ã„ã¾ã™ã€‚破棄æ“作ã¯ClickHouseã§ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“ãŒã€ã‚·ã‚¹ãƒ†ãƒ å†…ã®ä»–ã®ãƒ—ロセスã§ä½¿ç”¨ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockDiscardOps_*name* + +ブロックデãƒã‚¤ã‚¹ã‹ã‚‰è¦æ±‚ã•ã‚ŒãŸç ´æ£„æ“作ã®æ•°ã€‚ã“れらã®æ“作ã¯SSDã«é–¢é€£ã—ã¦ã„ã¾ã™ã€‚破棄æ“作ã¯ClickHouseã§ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“ãŒã€ã‚·ã‚¹ãƒ†ãƒ å†…ã®ä»–ã®ãƒ—ロセスã§ä½¿ç”¨ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockDiscardTime_*name* + +ブロックデãƒã‚¤ã‚¹ã‹ã‚‰è¦æ±‚ã•ã‚ŒãŸç ´æ£„æ“作ã«è²»ã‚„ã•ã‚ŒãŸæ™‚間(秒å˜ä½ï¼‰ã€ã™ã¹ã¦ã®æ“作ã«æ¸¡ã£ã¦åˆè¨ˆã•ã‚ŒãŸã‚‚ã®ã€‚ã“れらã®æ“作ã¯SSDã«é–¢é€£ã—ã¦ã„ã¾ã™ã€‚破棄æ“作ã¯ClickHouseã§ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“ãŒã€ã‚·ã‚¹ãƒ†ãƒ å†…ã®ä»–ã®ãƒ—ロセスã§ä½¿ç”¨ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockInFlightOps_*name* + +デãƒã‚¤ã‚¹ãƒ‰ãƒ©ã‚¤ãƒã«ç™ºè¡Œã•ã‚ŒãŸãŒã¾ã å®Œäº†ã—ã¦ã„ãªã„I/Oリクエストã®æ•°ã‚’カウントã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚­ãƒ¥ãƒ¼ã«ã‚ã‚Šã¾ã ãƒ‡ãƒã‚¤ã‚¹ãƒ‰ãƒ©ã‚¤ãƒã«ç™ºè¡Œã•ã‚Œã¦ã„ãªã„I/Oリクエストã¯å«ã¾ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockQueueTime_*name* + +ã“ã®ãƒ–ロックデãƒã‚¤ã‚¹ã§IOリクエストãŒå¾…æ©Ÿã—ã¦ã„ãŸãƒŸãƒªç§’数をカウントã—ã¾ã™ã€‚複数ã®IOリクエストãŒå¾…æ©Ÿã—ã¦ã„ã‚‹å ´åˆã€ã“ã®å€¤ã¯ãƒŸãƒªç§’æ•°ã¨å¾…æ©Ÿã—ã¦ã„るリクエスト数ã®ç©ã¨ã—ã¦å¢—加ã—ã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockReadBytes_*name* + +ブロックデãƒã‚¤ã‚¹ã‹ã‚‰èª­ã¿å–られãŸãƒã‚¤ãƒˆæ•°ã€‚OSページキャッシュã®ä½¿ç”¨ã«ã‚ˆã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‹ã‚‰èª­ã¿å–られるãƒã‚¤ãƒˆæ•°ã‚ˆã‚Šã‚‚å°‘ãªããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockReadMerges_*name* + +ブロックデãƒã‚¤ã‚¹ã‹ã‚‰è¦æ±‚ã•ã‚Œã€OS IOスケジューラã«ã‚ˆã£ã¦ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸèª­ã¿å–ã‚Šæ“作ã®æ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockReadOps_*name* + +ブロックデãƒã‚¤ã‚¹ã‹ã‚‰è¦æ±‚ã•ã‚ŒãŸèª­ã¿å–ã‚Šæ“作ã®æ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockReadTime_*name* + +ブロックデãƒã‚¤ã‚¹ã‹ã‚‰ã®èª­ã¿å–ã‚Šæ“作ã«è²»ã‚„ã•ã‚ŒãŸæ™‚間(秒å˜ä½ï¼‰ã€ã™ã¹ã¦ã®æ“作ã«æ¸¡ã£ã¦åˆè¨ˆã•ã‚ŒãŸã‚‚ã®ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockWriteBytes_*name* + +ブロックデãƒã‚¤ã‚¹ã«æ›¸ãè¾¼ã¾ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚OSページキャッシュã®ä½¿ç”¨ã«ã‚ˆã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã¸ã®æ›¸ãè¾¼ã¿ã¨æ¯”ã¹ã¦å°‘ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã¾ãŸã€æ›¸ãè¾¼ã¿ã‚¹ãƒ«ãƒ¼ã‚­ãƒ£ãƒƒã‚·ãƒ³ã‚°ã®ãŸã‚ã€å¯¾å¿œã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã¸ã®æ›¸ãè¾¼ã¿ã‚ˆã‚Šã‚‚後ã«ãƒ–ロックデãƒã‚¤ã‚¹ã¸ã®æ›¸ãè¾¼ã¿ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン全体ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockWriteMerges_*name* + +ブロックデãƒã‚¤ã‚¹ã‹ã‚‰è¦æ±‚ã•ã‚Œã€OS IOスケジューラã«ã‚ˆã£ã¦ãƒžãƒ¼ã‚¸ã•ã‚ŒãŸæ›¸ãè¾¼ã¿æ“作ã®æ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン全体ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockWriteOps_*name* + +ブロックデãƒã‚¤ã‚¹ã‹ã‚‰è¦æ±‚ã•ã‚ŒãŸæ›¸ãè¾¼ã¿æ“作ã®æ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン全体ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### BlockWriteTime_*name* + +ブロックデãƒã‚¤ã‚¹ã‹ã‚‰ã®æ›¸ãè¾¼ã¿æ“作ã«è²»ã‚„ã•ã‚ŒãŸæ™‚間(秒å˜ä½ï¼‰ã€ã™ã¹ã¦ã®æ“作ã«æ¸¡ã£ã¦åˆè¨ˆã•ã‚ŒãŸã‚‚ã®ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン全体ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚出典:`/sys/block`。詳細ã¯https://www.kernel.org/doc/Documentation/block/stat.txtã‚’å‚照。 + +### CPUFrequencyMHz_*name* + +CPUã®ç¾åœ¨ã®å‘¨æ³¢æ•°ï¼ˆMHz)。ã»ã¨ã‚“ã©ã®æœ€æ–°ã®CPUã¯ã€é›»åŠ›ç¯€ç´„ã¨ã‚¿ãƒ¼ãƒœãƒ–ーストã®ãŸã‚ã«å‘¨æ³¢æ•°ã‚’å‹•çš„ã«èª¿æ•´ã—ã¾ã™ã€‚ + +### CompiledExpressionCacheBytes + +JITコンパイルコードキャッシュã«ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ç·ãƒã‚¤ãƒˆæ•°ã€‚ + +### CompiledExpressionCacheCount + +JITコンパイルコードキャッシュã®ç·ã‚¨ãƒ³ãƒˆãƒªãƒ¼æ•°ã€‚ + +### DiskAvailable_*name* + +ディスク(仮想ファイルシステム)ã§ä½¿ç”¨å¯èƒ½ãªãƒã‚¤ãƒˆæ•°ã€‚リモートファイルシステムã¯ã€16 EiBã®ã‚ˆã†ãªå¤§ããªå€¤ã‚’示ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +### DiskTotal_*name* + +ディスク(仮想ファイルシステム)ã®ç·ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚リモートファイルシステムã¯ã€16 EiBã®ã‚ˆã†ãªå¤§ããªå€¤ã‚’示ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +### DiskUnreserved_*name* + +マージã€ãƒ•ã‚§ãƒƒãƒã€ç§»å‹•ã®ãŸã‚ã®äºˆç´„ãªã—ã§ãƒ‡ã‚£ã‚¹ã‚¯ï¼ˆä»®æƒ³ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ï¼‰ã§ä½¿ç”¨å¯èƒ½ãªãƒã‚¤ãƒˆæ•°ã€‚リモートファイルシステムã¯ã€16 EiBã®ã‚ˆã†ãªå¤§ããªå€¤ã‚’示ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +### DiskUsed_*name* + +ディスク(仮想ファイルシステム)ã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ãƒã‚¤ãƒˆæ•°ã€‚リモートファイルシステムã¯ã€å¸¸ã«ã“ã®æƒ…報をæä¾›ã™ã‚‹ã¨ã¯é™ã‚Šã¾ã›ã‚“。 + +### FilesystemCacheBytes + +`cache`仮想ファイルシステム内ã®ç·ãƒã‚¤ãƒˆæ•°ã€‚ã“ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ä¿æŒã•ã‚Œã¾ã™ã€‚ + +### FilesystemCacheFiles + +`cache`仮想ファイルシステム内ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã®ç·æ•°ã€‚ã“ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ä¿æŒã•ã‚Œã¾ã™ã€‚ + +### FilesystemLogsPathAvailableBytes + +ClickHouseログパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリュームã§ä½¿ç”¨å¯èƒ½ãªãƒã‚¤ãƒˆæ•°ã€‚ã“ã®å€¤ãŒã‚¼ãƒ­ã«è¿‘ã¥ãã¨ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§ãƒ­ã‚°ã®ãƒ­ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’調整ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### FilesystemLogsPathAvailableINodes + +ClickHouseログパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリュームã§åˆ©ç”¨å¯èƒ½ãªinodeã®æ•°ã€‚ + +### FilesystemLogsPathTotalBytes + +ClickHouseログパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリュームã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ログã®ãŸã‚ã«å°‘ãªãã¨ã‚‚10 GBを確ä¿ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +### FilesystemLogsPathTotalINodes + +ClickHouseログパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリューム上ã®inodeã®ç·æ•°ã€‚ + +### FilesystemLogsPathUsedBytes + +ClickHouseログパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリュームã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ãƒã‚¤ãƒˆæ•°ã€‚ + +### FilesystemLogsPathUsedINodes + +ClickHouseログパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリュームã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹inodeã®æ•°ã€‚ + +### FilesystemMainPathAvailableBytes + +メインClickHouseパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリュームã§ä½¿ç”¨å¯èƒ½ãªãƒã‚¤ãƒˆæ•°ã€‚ + +### FilesystemMainPathAvailableINodes + +メインClickHouseパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリュームã§åˆ©ç”¨å¯èƒ½ãªinodeã®æ•°ã€‚ãã‚ŒãŒã‚¼ãƒ­ã«è¿‘ã¥ã„ã¦ã„ã‚‹å ´åˆã€è¨­å®šãƒŸã‚¹ã‚’示ã—ã¦ãŠã‚Šã€ãƒ‡ã‚£ã‚¹ã‚¯ãŒã„ã£ã±ã„ã§ãªãã¦ã‚‚'no space left on device'エラーを引ãèµ·ã“ã—ã¾ã™ã€‚ + +### FilesystemMainPathTotalBytes + +メインClickHouseパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリュームã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +### FilesystemMainPathTotalINodes + +メインClickHouseパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリューム上ã®inodeã®ç·æ•°ã€‚ãã‚ŒãŒ2500万未満ã§ã‚ã‚‹å ´åˆã€è¨­å®šãƒŸã‚¹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +### FilesystemMainPathUsedBytes + +メインClickHouseパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリュームã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ãƒã‚¤ãƒˆæ•°ã€‚ + +### FilesystemMainPathUsedINodes + +メインClickHouseパスãŒãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„るボリュームã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹inodeã®æ•°ã€‚ã“ã®å€¤ã¯ä¸»ã«ãƒ•ã‚¡ã‚¤ãƒ«æ•°ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ + +### HTTPThreads + +HTTPインターフェースã®ã‚µãƒ¼ãƒãƒ¼ä¸Šã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ï¼ˆTLSãªã—)。 + +### InterserverThreads + +レプリカ通信プロトコルã®ã‚µãƒ¼ãƒãƒ¼ä¸Šã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ï¼ˆTLSãªã—)。 + +### Jitter + +éžåŒæœŸãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®è¨ˆç®—用スレッドãŒèµ·åºŠã™ã‚‹ã‚ˆã†ã«ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚ŒãŸæ™‚刻ã¨å®Ÿéš›ã«èµ·åºŠã—ãŸæ™‚刻ã®æ™‚間差。全体的ãªã‚·ã‚¹ãƒ†ãƒ ã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã¨å¿œç­”性ã®ä»£ç†æŒ‡æ¨™ã€‚ + +### LoadAverage_*N* + +指数平滑化ã§1分間平滑化ã•ã‚ŒãŸå…¨ã‚·ã‚¹ãƒ†ãƒ ã®è² è·ã€‚ã“ã®è² è·ã¯ã€ç¾åœ¨CPUãŒå®Ÿè¡Œä¸­ã§ã‚ã‚‹ã‹ã€IOã‚’å¾…ã£ã¦ã„ã‚‹ã‹ã€ã¾ãŸã¯ã“ã®æ™‚点ã§ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚Œã¦ã„ãªã„ãŒå®Ÿè¡Œå¯èƒ½ãªOSカーãƒãƒ«ã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’表ã—ã¦ã„ã¾ã™ã€‚ã“ã®æ•°å€¤ã¯Clickhouse-serverã ã‘ã§ãªãå…¨ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€‚システムãŒéŽè² è·çŠ¶æ…‹ã«ã‚ã‚‹å ´åˆã€ç‰¹ã«æ•°å個ã®ãƒ—ロセスãŒå®Ÿè¡Œå¯èƒ½ã§ã‚ã‚‹ãŒCPUã¾ãŸã¯IOã‚’å¾…ã£ã¦ã„ã‚‹å ´åˆã€æ•°å€¤ã¯CPUコア数を超ãˆã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +### MMapCacheCells + +`mmap`(メモリマップ)ã§é–‹ã‹ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã€‚ã“ã®è¨­å®šã¯ã€`local_filesystem_read_method`ã‚’`mmap`ã«è¨­å®šã—ãŸã‚¯ã‚¨ãƒªã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚`ï½map`ã§é–‹ã‹ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€è²»ç”¨ãŒã‹ã‹ã‚‹TLBフラッシュをé¿ã‘ã‚‹ãŸã‚ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«ä¿æŒã•ã‚Œã¾ã™ã€‚ + +### MarkCacheBytes + +マークキャッシュ内ã®ç·ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ + +### MarkCacheFiles + +マークキャッシュ内ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã®ç·æ•° + +### MaxPartCountForPartition + +MergeTreeファミリーã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã®å„パーティションã«ãŠã‘るパーツã®æœ€å¤§æ•°ã€‚値ãŒ300を超ãˆã‚‹ã¨ã€è¨­å®šãƒŸã‚¹ã€éŽè² è·ã€å¤§è¦æ¨¡ãƒ‡ãƒ¼ã‚¿ãƒ­ãƒ¼ãƒ‰ã‚’示ã—ã¾ã™ã€‚ + +### MemoryCode + +サーãƒãƒ¼ãƒ—ロセスã®æ©Ÿæ¢°ã‚³ãƒ¼ãƒ‰ãƒšãƒ¼ã‚¸ã®ãŸã‚ã«ãƒžãƒƒãƒ—ã•ã‚ŒãŸä»®æƒ³ãƒ¡ãƒ¢ãƒªã®é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +### MemoryDataAndStack + +スタックãŠã‚ˆã³å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã®ä½¿ç”¨ã®ãŸã‚ã«ãƒžãƒƒãƒ—ã•ã‚ŒãŸä»®æƒ³ãƒ¡ãƒ¢ãƒªã®é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ã“ã‚Œã¯ã€ã‚¹ãƒ¬ãƒƒãƒ‰ã”ã¨ã®ã‚¹ã‚¿ãƒƒã‚¯ã¨'mmap'システムコールã§å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã®ã»ã¨ã‚“ã©ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã¯ä¸ç‰¹å®šã§ã™ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯å®Œå…¨æ€§ã®ãŸã‚ã«å­˜åœ¨ã—ã¾ã™ã€‚モニタリングã«ã¯`MemoryResident`メトリクスを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +### MemoryResidentMax + +サーãƒãƒ¼ãƒ—ロセスã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã‚‹ç‰©ç†ãƒ¡ãƒ¢ãƒªã®æœ€å¤§é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +### MemoryResident + +サーãƒãƒ¼ãƒ—ロセスã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã‚‹ç‰©ç†ãƒ¡ãƒ¢ãƒªã®é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +### MemoryShared + +サーãƒãƒ¼ãƒ—ロセスã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¡ãƒ¢ãƒªã®é‡ã§ã‚ã‚Šã€ä»–ã®ãƒ—ロセスã¨å…±æœ‰ã•ã‚Œã¦ã„ã¾ã™ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ClickHouseã¯å…±æœ‰ãƒ¡ãƒ¢ãƒªã‚’使用ã—ã¾ã›ã‚“ãŒã€ä¸€éƒ¨ã®ãƒ¡ãƒ¢ãƒªã¯OSã«ã‚ˆã£ã¦ç‹¬è‡ªã®ç†ç”±ã§å…±æœ‰ã¨ã—ã¦ãƒ©ãƒ™ãƒ«ä»˜ã‘ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯ã€ç›£è¦–ã™ã‚‹æ„味ã¯ã‚ã¾ã‚Šãªãã€å®Œå…¨æ€§ã®ãŸã‚ã«å­˜åœ¨ã—ã¾ã™ã€‚ + +### MemoryVirtual + +サーãƒãƒ¼ãƒ—ロセスã«ã‚ˆã£ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸä»®æƒ³ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚¹ãƒšãƒ¼ã‚¹ã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚仮想アドレススペースã®ã‚µã‚¤ã‚ºã¯é€šå¸¸ã€ç‰©ç†ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚ˆã‚Šã‚‚ã¯ã‚‹ã‹ã«å¤§ããã€ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã®è¦‹ç©ã‚‚ã‚Šã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å¤§ããªå€¤ã¯å®Œå…¨ã«æ­£å¸¸ã§ã‚ã‚Šã€æŠ€è¡“çš„ãªæ„味ã—ã‹æŒãŸãªã„。 + +### MySQLThreads + +MySQL互æ›æ€§ãƒ—ロトコルã®ã‚µãƒ¼ãƒãƒ¼å†…ã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +### NetworkReceiveBytes_*name* + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’介ã—ã¦å—ä¿¡ã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### NetworkReceiveDrop_*name* + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’介ã—ã¦å—信中ã«ãƒ‘ケットãŒãƒ‰ãƒ­ãƒƒãƒ—ã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### NetworkReceiveErrors_*name* + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’介ã—ã¦å—信中ã«ç™ºç”Ÿã—ãŸã‚¨ãƒ©ãƒ¼ã®å›žæ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### NetworkReceivePackets_*name* + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’介ã—ã¦å—ä¿¡ã•ã‚ŒãŸãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ‘ケットã®æ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### NetworkSendBytes_*name* + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’介ã—ã¦é€ä¿¡ã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### NetworkSendDrop_*name* + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’介ã—ã¦é€ä¿¡ä¸­ã«ãƒ‘ケットãŒãƒ‰ãƒ­ãƒƒãƒ—ã•ã‚ŒãŸå›žæ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### NetworkSendErrors_*name* + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’介ã—ã¦é€ä¿¡ä¸­ã«ã‚¨ãƒ©ãƒ¼ï¼ˆä¾‹ï¼šTCPå†é€ä¿¡ï¼‰ãŒç™ºç”Ÿã—ãŸå›žæ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### NetworkSendPackets_*name* + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’介ã—ã¦é€ä¿¡ã•ã‚ŒãŸãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ‘ケットã®æ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### NumberOfDatabases + +サーãƒãƒ¼ä¸Šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ç·æ•°ã€‚ + +### NumberOfDetachedByUserParts + +ユーザーã«ã‚ˆã£ã¦`ALTER TABLE DETACH`クエリを使用ã—ã¦MergeTreeテーブルã‹ã‚‰åˆ†é›¢ã•ã‚ŒãŸãƒ‘ーツã®åˆè¨ˆï¼ˆäºˆæœŸã—ãªã„ã€å£Šã‚ŒãŸã€ã¾ãŸã¯ç„¡è¦–ã•ã‚ŒãŸãƒ‘ーツã¨ã¯å¯¾ç…§çš„)。サーãƒãƒ¼ã¯åˆ†é›¢ã•ã‚ŒãŸãƒ‘ーツを気ã«ã›ãšã€ãれらã¯å‰Šé™¤å¯èƒ½ã§ã™ã€‚ + +### NumberOfDetachedParts + +MergeTreeテーブルã‹ã‚‰åˆ†é›¢ã•ã‚ŒãŸãƒ‘ーツã®åˆè¨ˆã€‚ユーザーãŒ`ALTER TABLE DETACH`クエリを使ã£ã¦ãƒ‘ーツを分離ã™ã‚‹ã‹ã€ã‚µãƒ¼ãƒãƒ¼è‡ªèº«ãŒå£Šã‚ŒãŸã€äºˆæœŸã—ãªã„ã€ã¾ãŸã¯ä¸è¦ãªå ´åˆã«åˆ†é›¢ã•ã‚Œã¾ã™ã€‚サーãƒãƒ¼ã¯åˆ†é›¢ã•ã‚ŒãŸãƒ‘ーツを気ã«ã›ãšã€ãれらã¯å‰Šé™¤å¯èƒ½ã§ã™ã€‚ + +### NumberOfTables + +サーãƒãƒ¼ä¸Šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å…¨ä½“ã®ãƒ†ãƒ¼ãƒ–ルç·æ•°ã€MergeTreeテーブルをå«ã‚€ã“ã¨ãŒã§ããªã„データベースを除外。`Lazy`ã€`MySQL`ã€`PostgreSQL`ã€`SQlite`ã®ã‚ˆã†ã«å‹•çš„ã«ãƒ†ãƒ¼ãƒ–ルセットを生æˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã¯é™¤å¤–ã•ã‚Œã¾ã™ã€‚ + +### OSContextSwitches + +ホストマシンãŒçµŒé¨“ã—ãŸã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚¹ã‚¤ãƒƒãƒã®æ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### OSGuestNiceTime + +Linuxカーãƒãƒ«ã®åˆ¶å¾¡ä¸‹ã§ã€ã‚²ã‚¹ãƒˆãŒå„ªå…ˆåº¦ã‚’高ã設定ã•ã‚ŒãŸã¨ã(`man procfs`å‚照)ã€ä»®æƒ³CPUを実行ã™ã‚‹ãŸã‚ã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“ã®å‰²åˆã§ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯ClickHouseã«ã¯ç„¡é–¢ä¿‚ã§ã™ãŒã€å®Œå…¨æ€§ã®ãŸã‚ã«å­˜åœ¨ã—ã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã¾ã™ã€‚å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã€[0..数コア]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSGuestNiceTimeCPU_*N* + +Linuxカーãƒãƒ«ã®åˆ¶å¾¡ä¸‹ã§ã€ã‚²ã‚¹ãƒˆãŒå„ªå…ˆåº¦ã‚’高ã設定ã•ã‚ŒãŸã¨ã(`man procfs`å‚照)ã€ä»®æƒ³CPUを実行ã™ã‚‹ãŸã‚ã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“ã®å‰²åˆã§ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスをå«ã‚“ã§ã„ã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯ClickHouseã«ã¯ç„¡é–¢ä¿‚ã§ã™ãŒã€å®Œå…¨æ€§ã®ãŸã‚ã«å­˜åœ¨ã—ã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã¾ã™ã€‚å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã€[0..数コア]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSGuestNiceTimeNormalized + +ã“ã®å€¤ã¯`OSGuestNiceTime`ã¨é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€ã‚³ã‚¢æ•°ã§å‰²ã‚‰ã‚Œã¦ãŠã‚Šã€ã‚³ã‚¢æ•°ã«é–¢ä¿‚ãªã[0..1]ã®ç¯„囲ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚³ã‚¢æ•°ãŒéžä¸€æ§˜ã§ã‚ã£ã¦ã‚‚クラスタ内ã®è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å¹³å‡å€¤ã‚’算出ã—ã€å¹³å‡ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨çŽ‡ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### OSGuestTime + +Linuxカーãƒãƒ«ã®åˆ¶å¾¡ä¸‹ã§ã€ä»®æƒ³CPUを実行ã™ã‚‹ãŸã‚ã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“ã®å‰²åˆã§ã™ï¼ˆ`man procfs`å‚照)。ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯ClickHouseã«ã¯ç„¡é–¢ä¿‚ã§ã™ãŒã€å®Œå…¨æ€§ã®ãŸã‚ã«å­˜åœ¨ã—ã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã€å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã€[0..コアã®æ•°]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSGuestTimeCPU_*N* + +Linuxカーãƒãƒ«ã®åˆ¶å¾¡ä¸‹ã§ã€ä»®æƒ³CPUを実行ã™ã‚‹ãŸã‚ã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“ã®å‰²åˆã§ã™ï¼ˆ`man procfs`å‚照)。ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯ClickHouseã«ã¯ç„¡é–¢ä¿‚ã§ã™ãŒã€å®Œå…¨æ€§ã®ãŸã‚ã«å­˜åœ¨ã—ã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã€å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã€[0..コアã®æ•°]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSGuestTimeNormalized + +ã“ã®å€¤ã¯`OSGuestTime`ã¨é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€ã‚³ã‚¢æ•°ã§å‰²ã‚‰ã‚Œã¦ãŠã‚Šã€ã‚³ã‚¢æ•°ã«é–¢ä¿‚ãªã[0..1]ã®ç¯„囲ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚³ã‚¢æ•°ãŒéžä¸€æ§˜ã§ã‚ã£ã¦ã‚‚クラスタ内ã®è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å¹³å‡å€¤ã‚’算出ã—ã€å¹³å‡ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨çŽ‡ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### OSIOWaitTime + +プロセスãŒI/Oã‚’å¾…ã£ã¦ã„ã‚‹éš›ã«ã€OSカーãƒãƒ«ãŒã“ã®CPUã§ä»–ã®ãƒ—ロセスを実行ã—ãªã‹ã£ãŸæ™‚é–“ã®å‰²åˆã§ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã€å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã€[0..コアã®æ•°]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSIOWaitTimeCPU_*N* + +プロセスãŒI/Oã‚’å¾…ã£ã¦ã„ã‚‹éš›ã«ã€OSカーãƒãƒ«ãŒã“ã®CPUã§ä»–ã®ãƒ—ロセスを実行ã—ãªã‹ã£ãŸæ™‚é–“ã®å‰²åˆã§ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãホストマシン上ã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã€å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã€[0..コアã®æ•°]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSIOWaitTimeNormalized + +ã“ã®å€¤ã¯`OSIOWaitTime`ã¨é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€ã‚³ã‚¢æ•°ã§å‰²ã‚‰ã‚Œã¦ãŠã‚Šã€ã‚³ã‚¢æ•°ã«é–¢ä¿‚ãªã[0..1]ã®ç¯„囲ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚³ã‚¢æ•°ãŒéžä¸€æ§˜ã§ã‚ã£ã¦ã‚‚クラスタ内ã®è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å¹³å‡å€¤ã‚’算出ã—ã€å¹³å‡ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨çŽ‡ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### OSIdleTime + +CPUコアãŒã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ï¼ˆI/Oã‚’å¾…ã£ã¦ã„るプロセスを実行ã™ã‚‹æº–å‚™ãŒã§ãã¦ã„ãªã„状態)ã®æ™‚é–“ã®å‰²åˆã‚’OSカーãƒãƒ«ã®è¦³ç‚¹ã‹ã‚‰ç¤ºã—ã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã«ã¯ã€CPUãŒå†…部ã§è¦å› ï¼ˆãƒ¡ãƒ¢ãƒªãƒ­ãƒ¼ãƒ‰ã€ãƒ‘イプラインã®åœæ­¢ã€åˆ†å²äºˆæ¸¬ã®å¤±æ•—ã€ä»–ã®SMTコアã®å®Ÿè¡Œãªã©ï¼‰ã«ã‚ˆã£ã¦å分ã«åˆ©ç”¨ã•ã‚Œã¦ã„ãªã‹ã£ãŸæ™‚é–“ã¯å«ã¾ã‚Œã¾ã›ã‚“。å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®CPUコアã®å€¤ã¯ã€ã“れらã™ã¹ã¦ã®ã‚³ã‚¢ã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãŸã‚ã€[0..コア数]ã®ç¯„囲内ã«ãªã‚Šã¾ã™ã€‚ + +### OSIdleTimeCPU_*N* + +CPUコアãŒã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ï¼ˆI/Oã‚’å¾…ã£ã¦ã„るプロセスを実行ã™ã‚‹æº–å‚™ãŒã§ãã¦ã„ãªã„状態)ã®æ™‚é–“ã®å‰²åˆã‚’OSカーãƒãƒ«ã®è¦³ç‚¹ã‹ã‚‰ç¤ºã—ã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã«ã¯ã€CPUãŒå†…部ã§è¦å› ï¼ˆãƒ¡ãƒ¢ãƒªãƒ­ãƒ¼ãƒ‰ã€ãƒ‘イプラインã®åœæ­¢ã€åˆ†å²äºˆæ¸¬ã®å¤±æ•—ã€ä»–ã®SMTコアã®å®Ÿè¡Œãªã©ï¼‰ã«ã‚ˆã£ã¦å分ã«åˆ©ç”¨ã•ã‚Œã¦ã„ãªã‹ã£ãŸæ™‚é–“ã¯å«ã¾ã‚Œã¾ã›ã‚“。å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®CPUコアã®å€¤ã¯ã€ã“れらã™ã¹ã¦ã®ã‚³ã‚¢ã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãŸã‚ã€[0..コア数]ã®ç¯„囲内ã«ãªã‚Šã¾ã™ã€‚ + +### OSIdleTimeNormalized + +ã“ã®å€¤ã¯`OSIdleTime`ã¨é¡žä¼¼ã—ã¦ãŠã‚Šã€ã‚³ã‚¢æ•°ã§å‰²ã‚‰ã‚Œã‚‹ãŸã‚ã€ã‚³ã‚¢æ•°ã«é–¢ä¿‚ãªã[0..1]ã®ç¯„囲ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚³ã‚¢æ•°ãŒéžä¸€æ§˜ã§ã‚ã£ã¦ã‚‚ã€ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§ã®ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å¹³å‡åŒ–ãŒå¯èƒ½ã«ãªã‚Šã€å¹³å‡ãƒªã‚½ãƒ¼ã‚¹åˆ©ç”¨çŽ‡ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### OSInterrupts + +ホストマシン上ã§ç™ºç”Ÿã—ãŸå‰²ã‚Šè¾¼ã¿ã®ç·æ•°ã§ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ + +### OSIrqTime + +CPUã§ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢å‰²è¾¼ã¿è¦æ±‚ã®å®Ÿè¡Œã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“ã®å‰²åˆã‚’示ã—ã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®é«˜ã„値ã¯ã€ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®è¨­å®šãƒŸã‚¹ã‚„éžå¸¸ã«é«˜ã„ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è² è·ã‚’示ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲ã«ã‚ã‚Šã¾ã™ã€‚å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã§è¨ˆç®—ã•ã‚Œã€[0..num cores]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSIrqTimeCPU_*N* + +CPUã§ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢å‰²è¾¼ã¿è¦æ±‚ã®å®Ÿè¡Œã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“ã®å‰²åˆã‚’示ã—ã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®é«˜ã„値ã¯ã€ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã®è¨­å®šãƒŸã‚¹ã‚„éžå¸¸ã«é«˜ã„ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è² è·ã‚’示ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲ã«ã‚ã‚Šã¾ã™ã€‚å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã§è¨ˆç®—ã•ã‚Œã€[0..num cores]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSIrqTimeNormalized + +ã“ã®å€¤ã¯`OSIrqTime`ã¨é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€ã‚³ã‚¢æ•°ã§å‰²ã‚‰ã‚Œã¦ãŠã‚Šã€ã‚³ã‚¢æ•°ã«é–¢ä¿‚ãªã[0..1]ã®ç¯„囲ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚³ã‚¢æ•°ãŒéžä¸€æ§˜ã§ã‚ã£ã¦ã‚‚クラスタ内ã®è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å¹³å‡åŒ–ãŒå¯èƒ½ã«ãªã‚Šã€å¹³å‡ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨çŽ‡ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### OSMemoryAvailable + +プログラムãŒä½¿ç”¨ã§ãるメモリã®é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ã“ã‚Œã¯`OSMemoryFreePlusCached`メトリクスã¨éžå¸¸ã«ä¼¼ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +### OSMemoryBuffers + +OSカーãƒãƒ«ãƒãƒƒãƒ•ã‚¡ã«ä½¿ç”¨ã•ã‚Œã¦ã„るメモリã®é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ã“ã‚Œã¯é€šå¸¸ã€å°ã•ã„ã¯ãšã§ã‚ã‚Šã€å¤§ããªå€¤ã¯OSã®è¨­å®šãƒŸã‚¹ã‚’示ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +### OSMemoryCached + +OSページキャッシュã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã¦ã„るメモリã®é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚一般ã«ã€ã»ã¼ã™ã¹ã¦ã®åˆ©ç”¨å¯èƒ½ãªãƒ¡ãƒ¢ãƒªãŒOSページキャッシュã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã€é«˜ã„値ã¯æ­£å¸¸ã‹ã¤äºˆæœŸã•ã‚Œã‚‹ã‚‚ã®ã§ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +### OSMemoryFreePlusCached + +ホストシステムã®è‡ªç”±ãƒ¡ãƒ¢ãƒªã¨OSページキャッシュメモリã®åˆè¨ˆé‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ã“ã®ãƒ¡ãƒ¢ãƒªã¯ãƒ—ログラムã§ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ã“ã®å€¤ã¯`OSMemoryAvailable`ã¨éžå¸¸ã«ä¼¼ã¦ã„ã‚‹ã¯ãšã§ã™ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +### OSMemoryFreeWithoutCached + +ホストシステムã®è‡ªç”±ãƒ¡ãƒ¢ãƒªã®é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚OSページキャッシュメモリã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。ページキャッシュメモリã¯ãƒ—ログラムã§ä½¿ç”¨å¯èƒ½ã§ã‚ã‚‹ãŸã‚ã€ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å€¤ã¯æ··ä¹±ã‚’æ‹›ãå¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚代ã‚ã‚Šã«`OSMemoryAvailable`メトリクスをå‚ç…§ã—ã¦ãã ã•ã„。便宜上ã€`OSMemoryFreePlusCached`メトリクスもæä¾›ã—ã¦ãŠã‚Šã€OSMemoryAvailableã¨ã»ã¼ä¼¼ã¦ã„ã‚‹ã¯ãšã§ã™ã€‚詳細ã¯https://www.linuxatemyram.com/ã‚’å‚ç…§ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +### OSMemoryTotal + +ホストシステムã®ç·ãƒ¡ãƒ¢ãƒªé‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +### OSNiceTime + +CPUコアãŒé«˜ã„優先度ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¹ãƒšãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¦ã„ãŸæ™‚é–“ã®å‰²åˆã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲ã«ã‚ã‚Šã¾ã™ã€‚å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã§è¨ˆç®—ã•ã‚Œã€[0..num cores]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSNiceTimeCPU_*N* + +CPUコアãŒé«˜ã„優先度ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¹ãƒšãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¦ã„ãŸæ™‚é–“ã®å‰²åˆã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲ã«ã‚ã‚Šã¾ã™ã€‚å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã§è¨ˆç®—ã•ã‚Œã€[0..num cores]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSNiceTimeNormalized + +ã“ã®å€¤ã¯`OSNiceTime`ã¨é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€ã‚³ã‚¢æ•°ã§å‰²ã‚‰ã‚Œã¦ãŠã‚Šã€ã‚³ã‚¢æ•°ã«é–¢ä¿‚ãªã[0..1]ã®ç¯„囲ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚³ã‚¢æ•°ãŒéžä¸€æ§˜ã§ã‚ã£ã¦ã‚‚ã€ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å¹³å‡å€¤ã‚’算出ã—ã€å¹³å‡ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨çŽ‡ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### OSOpenFiles + +ホストマシン上ã§é–‹ã‹ã‚Œã¦ã„るファイルã®ç·æ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ + +### OSProcessesBlocked + +I/O完了待ã¡ã§ãƒ–ロックã•ã‚Œã¦ã„るスレッドã®æ•°ï¼ˆ`man procfs`å‚照)。ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ + +### OSProcessesCreated + +作æˆã•ã‚ŒãŸãƒ—ロセスã®æ•°ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ + +### OSProcessesRunning + +オペレーティングシステムã«ã‚ˆã£ã¦å®Ÿè¡Œå¯èƒ½ã¨è¦‹ãªã•ã‚Œã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ï¼ˆå®Ÿè¡Œä¸­ã‹ã€å®Ÿè¡Œæº–備中ã‹ï¼‰ã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ + +### OSSoftIrqTime + +CPUã§ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢å‰²è¾¼ã¿è¦æ±‚ã®å®Ÿè¡Œã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“ã®å‰²åˆã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®é«˜ã„値ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ä¸Šã§éžåŠ¹çŽ‡çš„ãªã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ãŒå®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ã‚’示ã—ã¦ã„ã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲ã«ã‚ã‚Šã¾ã™ã€‚å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã§è¨ˆç®—ã•ã‚Œã€[0..num cores]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSSoftIrqTimeCPU_*N* + +CPUã§ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢å‰²è¾¼ã¿è¦æ±‚ã®å®Ÿè¡Œã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“ã®å‰²åˆã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ã¯ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®é«˜ã„値ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ä¸Šã§éžåŠ¹çŽ‡çš„ãªã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ãŒå®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ã‚’示ã—ã¦ã„ã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲ã«ã‚ã‚Šã¾ã™ã€‚å…¨CPUコアã®å€¤ã¯ãれらã®åˆè¨ˆã§è¨ˆç®—ã•ã‚Œã€[0..num cores]ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +### OSSoftIrqTimeNormalized + +ã“ã®å€¤ã¯`OSSoftIrqTime`ã¨é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€ã‚³ã‚¢æ•°ã§å‰²ã‚‰ã‚Œã¦ãŠã‚Šã€ã‚³ã‚¢æ•°ã«é–¢ä¿‚ãªã[0..1]ã®ç¯„囲ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚³ã‚¢æ•°ãŒéžä¸€æ§˜ã§ã‚ã£ã¦ã‚‚クラスタ内ã®è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å¹³å‡åŒ–ãŒå¯èƒ½ã«ãªã‚Šã€å¹³å‡ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨çŽ‡ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### OSStealTime + +仮想化環境ã§å®Ÿè¡Œä¸­ã®CPUãŒä»–ã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“ã®å‰²åˆã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’æ示ã™ã‚‹ä»®æƒ³åŒ–環境ã¯ã™ã¹ã¦ã§ã¯ãªãã€ã»ã¨ã‚“ã©ã®ç’°å¢ƒã«ã¯ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãŒã‚ã‚Šã¾ã›ã‚“。å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲ã«ã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®CPUコアã®å€¤ã¯ã€ãれらã™ã¹ã¦ã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€[0..num cores]ã®ç¯„囲ã«ã‚ã‚Šã¾ã™ã€‚ + +### OSStealTimeCPU_*N* + +仮想化環境ã§å®Ÿè¡Œä¸­ã®CPUãŒä»–ã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“ã®å‰²åˆã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’æ示ã™ã‚‹ä»®æƒ³åŒ–環境ã¯ã™ã¹ã¦ã§ã¯ãªãã€ã»ã¨ã‚“ã©ã®ç’°å¢ƒã«ã¯ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãŒã‚ã‚Šã¾ã›ã‚“。å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲ã«ã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®CPUコアã®å€¤ã¯ã€ãれらã™ã¹ã¦ã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€[0..num cores]ã®ç¯„囲ã«ã‚ã‚Šã¾ã™ã€‚ + +### OSStealTimeNormalized + +ã“ã®å€¤ã¯`OSStealTime`ã¨é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€ã‚³ã‚¢æ•°ã§å‰²ã‚‰ã‚Œã¦ãŠã‚Šã€ã‚³ã‚¢æ•°ã«é–¢ä¿‚ãªã[0..1]ã®ç¯„囲ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚³ã‚¢æ•°ãŒéžä¸€æ§˜ã§ã‚ã£ã¦ã‚‚ã€ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å¹³å‡å€¤ã‚’算出ã—ã€å¹³å‡ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨çŽ‡ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### OSSystemTime + +CPUコアãŒOSカーãƒãƒ«ï¼ˆã‚·ã‚¹ãƒ†ãƒ ï¼‰ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¦ã„ãŸæ™‚é–“ã®å‰²åˆã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®CPUコアã®å€¤ã¯ã€ã“れらã™ã¹ã¦ã®ã‚³ã‚¢ã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãŸã‚ã€[0..num cores]ã®ç¯„囲内ã«ãªã‚Šã¾ã™ã€‚ + +### OSSystemTimeCPU_*N* + +CPUコアãŒOSカーãƒãƒ«ï¼ˆã‚·ã‚¹ãƒ†ãƒ ï¼‰ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¦ã„ãŸæ™‚é–“ã®å‰²åˆã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€Clickhouse-serverã ã‘ã§ãªãã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®CPUコアã®å€¤ã¯ã€ã“れらã™ã¹ã¦ã®ã‚³ã‚¢ã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãŸã‚ã€[0..num cores]ã®ç¯„囲内ã«ãªã‚Šã¾ã™ã€‚ + +### OSSystemTimeNormalized + +ã“ã®å€¤ã¯`OSSystemTime`ã¨é¡žä¼¼ã—ã¦ãŠã‚Šã€ã‚³ã‚¢æ•°ã§å‰²ã‚‰ã‚Œã‚‹ãŸã‚ã€ã‚³ã‚¢æ•°ã«é–¢ä¿‚ãªã[0..1]ã®ç¯„囲ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚³ã‚¢æ•°ãŒéžä¸€æ§˜ã§ã‚ã£ã¦ã‚‚ã€ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§ã®ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å¹³å‡åŒ–ãŒå¯èƒ½ã«ãªã‚Šã€å¹³å‡ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨çŽ‡ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### OSThreadsRunnable + +OSカーãƒãƒ«ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ©ãŒèªè­˜ã—ã¦ã„ã‚‹'runnable'スレッドã®ç·æ•°ã€‚ + +### OSThreadsTotal + +OSカーãƒãƒ«ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ©ãŒèªè­˜ã—ã¦ã„るスレッドã®ç·æ•°ã€‚ + +### OSUptime + +ホストサーãƒãƒ¼ï¼ˆClickHouseãŒå®Ÿè¡Œã•ã‚Œã¦ã„るマシン)ã®ç¨¼åƒæ™‚間(秒å˜ä½ï¼‰ã€‚ + +### OSUserTime + +CPUコアãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¹ãƒšãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¦ã„ãŸæ™‚é–“ã®å‰²åˆã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯ã€CPUãŒå†…部ã§è¦å› ï¼ˆãƒ¡ãƒ¢ãƒªãƒ­ãƒ¼ãƒ‰ã€ãƒ‘イプラインã®åœæ­¢ã€åˆ†å²äºˆæ¸¬ã®å¤±æ•—ãªã©ï¼‰ã«ã‚ˆã£ã¦å分ã«åˆ©ç”¨ã•ã‚Œã¦ã„ãªã„時間もå«ã¾ã‚Œã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®CPUコアã®å€¤ã¯ã€ã“れらã™ã¹ã¦ã®ã‚³ã‚¢ã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãŸã‚ã€[0..num cores]ã®ç¯„囲内ã«ãªã‚Šã¾ã™ã€‚ + +### OSUserTimeCPU_*N* + +CPUコアãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¹ãƒšãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¦ã„ãŸæ™‚é–“ã®å‰²åˆã€‚ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã§ã‚ã‚Šã€ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã®ã™ã¹ã¦ã®ãƒ—ロセスãŒå«ã¾ã‚Œã€Clickhouse-serverã ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯ã€CPUãŒå†…部ã§è¦å› ï¼ˆãƒ¡ãƒ¢ãƒªãƒ­ãƒ¼ãƒ‰ã€ãƒ‘イプラインã®åœæ­¢ã€åˆ†å²äºˆæ¸¬ã®å¤±æ•—ãªã©ï¼‰ã«ã‚ˆã£ã¦å分ã«åˆ©ç”¨ã•ã‚Œã¦ã„ãªã„時間もå«ã¾ã‚Œã¾ã™ã€‚å˜ä¸€ã®CPUコアã®å€¤ã¯[0..1]ã®ç¯„囲内ã«ã‚ã‚Šã¾ã™ã€‚ã™ã¹ã¦ã®CPUコアã®å€¤ã¯ã€ã“れらã™ã¹ã¦ã®ã‚³ã‚¢ã®åˆè¨ˆã¨ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãŸã‚ã€[0..num cores]ã®ç¯„囲内ã«ãªã‚Šã¾ã™ã€‚ + +### OSUserTimeNormalized + +ã“ã®å€¤ã¯`OSUserTime`ã¨é¡žä¼¼ã—ã¦ãŠã‚Šã€ã‚³ã‚¢æ•°ã§å‰²ã‚‰ã‚Œã¦ãŠã‚Šã€ã‚³ã‚¢æ•°ã«é–¢ä¿‚ãªã[0..1]ã®ç¯„囲ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚³ã‚¢æ•°ãŒéžä¸€æ§˜ã§ã‚ã£ã¦ã‚‚ã€ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼é–“ã§ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã®å¹³å‡å€¤ã‚’測定ã—ã€å¹³å‡ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨çŽ‡ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### PostgreSQLThreads + +PostgreSQL互æ›ãƒ—ロトコルã®ã‚µãƒ¼ãƒãƒ¼å†…ã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +### QueryCacheBytes + +クエリキャッシュã®ç·ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +### QueryCacheEntries + +クエリキャッシュ内ã®ç·ã‚¨ãƒ³ãƒˆãƒªãƒ¼æ•°ã€‚ + +### ReplicasMaxAbsoluteDelay + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル全体ã§ã®æœ€æ–°ã®ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ‘ーツã¨ã¾ã ãƒ¬ãƒ—リケートã•ã‚Œã¦ã„ãªã„最も新ã—ã„データパーツã®é–“ã®ç§’å˜ä½ã®æœ€å¤§å·®ã€‚éžå¸¸ã«é«˜ã„値ã¯ãƒ‡ãƒ¼ã‚¿ã®ãªã„レプリカを示ã—ã¾ã™ã€‚ + +### ReplicasMaxInsertsInQueue + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル全体ã§ã®ã‚­ãƒ¥ãƒ¼ï¼ˆã¾ã ãƒ¬ãƒ—リケートã•ã‚Œã¦ã„ãªã„)ã«ã‚ã‚‹INSERTæ“作ã®æœ€å¤§æ•°ã€‚ + +### ReplicasMaxMergesInQueue + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル全体ã§ã®ã‚­ãƒ¥ãƒ¼ï¼ˆã¾ã é©ç”¨ã•ã‚Œã¦ã„ãªã„)ã«ã‚るマージæ“作ã®æœ€å¤§æ•°ã€‚ + +### ReplicasMaxQueueSize + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル全体ã§ã®ã‚­ãƒ¥ãƒ¼ã‚µã‚¤ã‚ºï¼ˆå–å¾—ã€ãƒžãƒ¼ã‚¸ãªã©ã®æ“作数)。 + +### ReplicasMaxRelativeDelay + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル全体ã§ã®ãƒ¬ãƒ—リカé…延ã¨åŒã˜ãƒ†ãƒ¼ãƒ–ルã®æœ€æ–°ã®ãƒ¬ãƒ—リカã®é…延ã¨ã®ç›¸å¯¾å·®ã®æœ€å¤§å€¤ã€‚ + +### ReplicasSumInsertsInQueue + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル全体ã§ã®ã‚­ãƒ¥ãƒ¼ï¼ˆã¾ã ãƒ¬ãƒ—リケートã•ã‚Œã¦ã„ãªã„)ã«ã‚ã‚‹INSERTæ“作ã®åˆè¨ˆæ•°ã€‚ + +### ReplicasSumMergesInQueue + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル全体ã§ã®ã‚­ãƒ¥ãƒ¼ï¼ˆã¾ã é©ç”¨ã•ã‚Œã¦ã„ãªã„)ã«ã‚るマージæ“作ã®åˆè¨ˆæ•°ã€‚ + +### ReplicasSumQueueSize + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル全体ã§ã®ã‚­ãƒ¥ãƒ¼ã‚µã‚¤ã‚ºï¼ˆå–å¾—ã€ãƒžãƒ¼ã‚¸ãªã©ã®æ“作数)。 + +### TCPThreads + +TCPプロトコル(TLSãªã—)ã®ã‚µãƒ¼ãƒãƒ¼ä¸Šã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +### Temperature_*N* + +対応ã™ã‚‹ãƒ‡ãƒã‚¤ã‚¹ã®æ¸©åº¦ï¼ˆâ„ƒï¼‰ã€‚センサーã¯éžç¾å®Ÿçš„ãªå€¤ã‚’è¿”ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ソース:`/sys/class/thermal` + +### Temperature_*name* + +対応ã™ã‚‹ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ãƒ¢ãƒ‹ã‚¿ãŠã‚ˆã³å¯¾å¿œã™ã‚‹ã‚»ãƒ³ã‚µãƒ¼ã«ã‚ˆã£ã¦å ±å‘Šã•ã‚ŒãŸæ¸©åº¦ï¼ˆâ„ƒï¼‰ã€‚センサーã¯éžç¾å®Ÿçš„ãªå€¤ã‚’è¿”ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ソース:`/sys/class/hwmon` + +### TotalBytesOfMergeTreeTables + +MergeTreeファミリーã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ãƒã‚¤ãƒˆæ•°ï¼ˆåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’å«ã‚€ï¼‰ã®åˆè¨ˆã€‚ + +### TotalPartsOfMergeTreeTables + +MergeTreeファミリーã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ル内ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®åˆè¨ˆæ•°ã€‚10,000を超ãˆã‚‹æ•°å€¤ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®èµ·å‹•æ™‚é–“ã«æ‚ªå½±éŸ¿ã‚’åŠã¼ã—ã€ãƒ‘ーティションキーã®é¸æŠžãŒä¸åˆç†ã§ã‚ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +### TotalPrimaryKeyBytesInMemory + +主キー値ãŒä½¿ç”¨ã™ã‚‹ãƒ¡ãƒ¢ãƒªã®ç·é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ï¼ˆã‚¢ã‚¯ãƒ†ã‚£ãƒ–パーツã®ã¿ãŒå¯¾è±¡ï¼‰ã€‚ + +### TotalPrimaryKeyBytesInMemoryAllocated + +主キー値ã®ãŸã‚ã«äºˆç´„ã•ã‚ŒãŸãƒ¡ãƒ¢ãƒªã®ç·é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ï¼ˆã‚¢ã‚¯ãƒ†ã‚£ãƒ–パーツã®ã¿ãŒå¯¾è±¡ï¼‰ã€‚ + +### TotalRowsOfMergeTreeTables + +MergeTreeファミリーã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã•ã‚Œã¦ã„る行(レコード)ã®åˆè¨ˆæ•°ã€‚ + +### UncompressedCacheBytes + +éžåœ§ç¸®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ç·ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚éžåœ§ç¸®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯é€šå¸¸ã€æ€§èƒ½ã‚’å‘上ã•ã›ã‚‹ã“ã¨ã¯ãªãã€ã»ã¨ã‚“ã©ã®å ´åˆé¿ã‘ã‚‹ã¹ãã§ã™ã€‚ + +### UncompressedCacheCells + +éžåœ§ç¸®ã‚­ãƒ£ãƒƒã‚·ãƒ¥å†…ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã®ç·æ•°ã€‚å„エントリーã¯ãƒ‡ãƒ¼ã‚¿ã®éžåœ§ç¸®ãƒ–ロックを表ã—ã¾ã™ã€‚éžåœ§ç¸®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯é€šå¸¸ã€æ€§èƒ½æ”¹å–„ã«å½¹ç«‹ãŸãšã€ã»ã¨ã‚“ã©ã®å ´åˆé¿ã‘ã‚‹ã¹ãã§ã™ã€‚ + +### Uptime + +サーãƒãƒ¼ã®ç¨¼åƒæ™‚間(秒å˜ä½ï¼‰ã€‚ã“ã‚Œã¯ã€æŽ¥ç¶šã‚’å—ã‘入れるå‰ã®ã‚µãƒ¼ãƒãƒ¼åˆæœŸåŒ–ã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“ã‚‚å«ã¾ã‚Œã¾ã™ã€‚ + +### jemalloc.active + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.allocated + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.arenas.all.dirty_purged + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.arenas.all.muzzy_purged + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.arenas.all.pactive + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.arenas.all.pdirty + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.arenas.all.pmuzzy + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.background_thread.num_runs + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.background_thread.num_threads + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.background_thread.run_intervals + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.epoch + +jemalloc(Jason Evansã®ãƒ¡ãƒ¢ãƒªã‚¢ãƒ­ã‚±ãƒ¼ã‚¿ï¼‰ã®çµ±è¨ˆã®å†…部増分更新番å·ã§ã‚ã‚Šã€ä»–ã®ã™ã¹ã¦ã®`jemalloc`メトリクスã«ä½¿ã‚ã‚Œã¾ã™ã€‚ + +### jemalloc.mapped + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.metadata + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.metadata_thp + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.resident + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.retained + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +### jemalloc.prof.active + +ローレベルメモリアロケータ(jemalloc)ã®å†…部メトリクス。詳細ã¯https://jemalloc.net/jemalloc.3.htmlã‚’å‚照。 + +**関連項目** + +- [モニタリング](../../operations/monitoring.md) — ClickHouseモニタリングã®åŸºæœ¬æ¦‚念。 +- [system.metrics](../../operations/system-tables/metrics.md#system_tables-metrics) — å³æ™‚計算ã•ã‚Œã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å«ã‚€ã€‚ +- [system.events](../../operations/system-tables/events.md#system_tables-events) — 発生ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆæ•°ã‚’å«ã‚€ã€‚ +- [system.metric_log](../../operations/system-tables/metric_log.md#system_tables-metric_log) — テーブル`system.metrics`ãŠã‚ˆã³`system.events`ã®ãƒ¡ãƒˆãƒªãƒƒã‚¯å€¤ã®å±¥æ­´ã‚’å«ã‚€ã€‚ diff --git a/docs/ja/operations/system-tables/azure_queue_settings.md b/docs/ja/operations/system-tables/azure_queue_settings.md new file mode 100644 index 00000000000..bdc09f2f073 --- /dev/null +++ b/docs/ja/operations/system-tables/azure_queue_settings.md @@ -0,0 +1,20 @@ +--- +slug: /ja/operations/system-tables/azure_queue_settings +--- +# azure_queue_settings + +[AzureQueue](../../engines/table-engines/integrations/azure-queue.md)テーブルã®è¨­å®šã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ +`24.10` サーãƒãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‹ã‚‰åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +カラム: + +- `database` ([String](../../sql-reference/data-types/string.md)) — テーブルå. +- `table` ([String](../../sql-reference/data-types/string.md)) — データベースå. +- `name` ([String](../../sql-reference/data-types/string.md)) — 設定å. +- `value` ([String](../../sql-reference/data-types/string.md)) — 設定値. +- `changed` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 設定ãŒæ˜Žç¤ºçš„ã«ã‚³ãƒ³ãƒ•ã‚£ã‚°ã§å®šç¾©ã•ã‚ŒãŸã‹ã€å¤‰æ›´ã•ã‚ŒãŸã‹. +- `description` ([String](../../sql-reference/data-types/string.md)) — 設定ã®èª¬æ˜Ž. +- `alterable` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `ALTER TABLE ... MODIFY SETTING`ã«ã‚ˆã£ã¦è¨­å®šã‚’変更ã§ãã‚‹ã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚ + - `0` — ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¨­å®šã‚’変更ã§ãã¾ã™ã€‚ + - `1` — ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è¨­å®šã‚’変更ã§ãã¾ã›ã‚“。 +- `type` ([String](../../sql-reference/data-types/string.md)) — 設定タイプ(実装固有ã®æ–‡å­—列値)。 diff --git a/docs/ja/operations/system-tables/backup_log.md b/docs/ja/operations/system-tables/backup_log.md new file mode 100644 index 00000000000..b1c1c7d7437 --- /dev/null +++ b/docs/ja/operations/system-tables/backup_log.md @@ -0,0 +1,152 @@ +--- +slug: /ja/operations/system-tables/backup_log +--- +# backup_log + +`BACKUP`ãŠã‚ˆã³`RESTORE`æ“作ã«é–¢ã™ã‚‹ãƒ­ã‚°ã‚¨ãƒ³ãƒˆãƒªã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — エントリã®æ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — エントリã®æ—¥ä»˜ã¨æ™‚刻。 +- `event_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒精度ã®ã‚¨ãƒ³ãƒˆãƒªã®æ™‚刻。 +- `id` ([String](../../sql-reference/data-types/string.md)) — ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¾ãŸã¯ãƒªã‚¹ãƒˆã‚¢æ“作ã®è­˜åˆ¥å­ã€‚ +- `name` ([String](../../sql-reference/data-types/string.md)) — ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ストレージã®åå‰ (`FROM`ã¾ãŸã¯`TO`å¥ã®å†…容)。 +- `status` ([Enum8](../../sql-reference/data-types/enum.md)) — æ“作ステータス。å¯èƒ½ãªå€¤: + - `'CREATING_BACKUP'` + - `'BACKUP_CREATED'` + - `'BACKUP_FAILED'` + - `'RESTORING'` + - `'RESTORED'` + - `'RESTORE_FAILED'` +- `error` ([String](../../sql-reference/data-types/string.md)) —æ“作ãŒå¤±æ•—ã—ãŸå ´åˆã®ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ï¼ˆæˆåŠŸã—ãŸå ´åˆã¯ç©ºæ–‡å­—列)。 +- `start_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — æ“作ã®é–‹å§‹æ™‚刻。 +- `end_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — æ“作ã®çµ‚了時刻。 +- `num_files` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ä¿å­˜ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã€‚ +- `total_size` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ä¿å­˜ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®åˆè¨ˆã‚µã‚¤ã‚ºã€‚ +- `num_entries` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚¨ãƒ³ãƒˆãƒªæ•°ã€‚フォルダーã¨ã—ã¦ä¿å­˜ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼å†…ã®ãƒ•ã‚¡ã‚¤ãƒ«æ•°ã€ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–内ã®ãƒ•ã‚¡ã‚¤ãƒ«æ•°ã§ã™ã€‚インクリメンタルãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—や空ファイルã¾ãŸã¯é‡è¤‡ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã‚Œã¯`num_files`ã¨ã¯ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚常ã«æ¬¡ãŒæˆã‚Šç«‹ã¡ã¾ã™: `num_entries <= num_files`。 +- `uncompressed_size` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®éžåœ§ç¸®ã‚µã‚¤ã‚ºã€‚ +- `compressed_size` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®åœ§ç¸®ã‚µã‚¤ã‚ºã€‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¦ã„ãªã„å ´åˆã¯`uncompressed_size`ã¨åŒã˜ã§ã™ã€‚ +- `files_read` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — リストアæ“作中ã«èª­ã¿å–られãŸãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã€‚ +- `bytes_read` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — リストアæ“作中ã«èª­ã¿å–られãŸãƒ•ã‚¡ã‚¤ãƒ«ã®ç·ã‚µã‚¤ã‚ºã€‚ + +**例** + +```sql +BACKUP TABLE test_db.my_table TO Disk('backups_disk', '1.zip') +``` +```response +┌─id───────────────────────────────────┬─status─────────┠+│ e5b74ecb-f6f1-426a-80be-872f90043885 │ BACKUP_CREATED │ +└──────────────────────────────────────┴────────────────┘ +``` +```sql +SELECT * FROM system.backup_log WHERE id = 'e5b74ecb-f6f1-426a-80be-872f90043885' ORDER BY event_date, event_time_microseconds \G +``` +```response +Row 1: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2023-08-19 +event_time_microseconds: 2023-08-19 11:05:21.998566 +id: e5b74ecb-f6f1-426a-80be-872f90043885 +name: Disk('backups_disk', '1.zip') +status: CREATING_BACKUP +error: +start_time: 2023-08-19 11:05:21 +end_time: 1970-01-01 03:00:00 +num_files: 0 +total_size: 0 +num_entries: 0 +uncompressed_size: 0 +compressed_size: 0 +files_read: 0 +bytes_read: 0 + +Row 2: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2023-08-19 +event_time: 2023-08-19 11:08:56 +event_time_microseconds: 2023-08-19 11:08:56.916192 +id: e5b74ecb-f6f1-426a-80be-872f90043885 +name: Disk('backups_disk', '1.zip') +status: BACKUP_CREATED +error: +start_time: 2023-08-19 11:05:21 +end_time: 2023-08-19 11:08:56 +num_files: 57 +total_size: 4290364870 +num_entries: 46 +uncompressed_size: 4290362365 +compressed_size: 3525068304 +files_read: 0 +bytes_read: 0 +``` +```sql +RESTORE TABLE test_db.my_table FROM Disk('backups_disk', '1.zip') +``` +```response +┌─id───────────────────────────────────┬─status───┠+│ cdf1f731-52ef-42da-bc65-2e1bfcd4ce90 │ RESTORED │ +└──────────────────────────────────────┴──────────┘ +``` +```sql +SELECT * FROM system.backup_log WHERE id = 'cdf1f731-52ef-42da-bc65-2e1bfcd4ce90' ORDER BY event_date, event_time_microseconds \G +``` +```response +Row 1: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2023-08-19 +event_time_microseconds: 2023-08-19 11:09:19.718077 +id: cdf1f731-52ef-42da-bc65-2e1bfcd4ce90 +name: Disk('backups_disk', '1.zip') +status: RESTORING +error: +start_time: 2023-08-19 11:09:19 +end_time: 1970-01-01 03:00:00 +num_files: 0 +total_size: 0 +num_entries: 0 +uncompressed_size: 0 +compressed_size: 0 +files_read: 0 +bytes_read: 0 + +Row 2: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2023-08-19 +event_time_microseconds: 2023-08-19 11:09:29.334234 +id: cdf1f731-52ef-42da-bc65-2e1bfcd4ce90 +name: Disk('backups_disk', '1.zip') +status: RESTORED +error: +start_time: 2023-08-19 11:09:19 +end_time: 2023-08-19 11:09:29 +num_files: 57 +total_size: 4290364870 +num_entries: 46 +uncompressed_size: 4290362365 +compressed_size: 4290362365 +files_read: 57 +bytes_read: 4290364870 +``` + +ã“ã‚Œã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル`system.backups`ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹åŸºæœ¬çš„ã«åŒã˜æƒ…å ±ã§ã™: + +```sql +SELECT * FROM system.backups ORDER BY start_time +``` +```response +┌─id───────────────────────────────────┬─name──────────────────────────┬─status─────────┬─error─┬──────────start_time─┬────────────end_time─┬─num_files─┬─total_size─┬─num_entries─┬─uncompressed_size─┬─compressed_size─┬─files_read─┬─bytes_read─┠+│ e5b74ecb-f6f1-426a-80be-872f90043885 │ Disk('backups_disk', '1.zip') │ BACKUP_CREATED │ │ 2023-08-19 11:05:21 │ 2023-08-19 11:08:56 │ 57 │ 4290364870 │ 46 │ 4290362365 │ 3525068304 │ 0 │ 0 │ +│ cdf1f731-52ef-42da-bc65-2e1bfcd4ce90 │ Disk('backups_disk', '1.zip') │ RESTORED │ │ 2023-08-19 11:09:19 │ 2023-08-19 11:09:29 │ 57 │ 4290364870 │ 46 │ 4290362365 │ 4290362365 │ 57 │ 4290364870 │ +└──────────────────────────────────────┴───────────────────────────────┴────────────────┴───────┴─────────────────────┴─────────────────────┴───────────┴────────────┴─────────────┴───────────────────┴─────────────────┴────────────┴────────────┘ +``` + +**関連項目** + +- [ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ãƒªã‚¹ãƒˆã‚¢](../../operations/backup.md) diff --git a/docs/ja/operations/system-tables/blob_storage_log.md b/docs/ja/operations/system-tables/blob_storage_log.md new file mode 100644 index 00000000000..7268df21a92 --- /dev/null +++ b/docs/ja/operations/system-tables/blob_storage_log.md @@ -0,0 +1,61 @@ +--- +slug: /ja/operations/system-tables/blob_storage_log +--- +# blob_storage_log + +アップロードや削除ãªã©ã€ã•ã¾ã–ã¾ãªblobストレージæ“作ã«é–¢ã™ã‚‹ãƒ­ã‚°ã‚¨ãƒ³ãƒˆãƒªã‚’å«ã¿ã¾ã™ã€‚ + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — イベントã®æ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — イベントã®æ™‚刻。 +- `event_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒精度ã®ã‚¤ãƒ™ãƒ³ãƒˆã®æ™‚刻。 +- `event_type` ([Enum8](../../sql-reference/data-types/enum.md)) — イベントã®ç¨®é¡žã€‚å¯èƒ½ãªå€¤: + - `'Upload'` + - `'Delete'` + - `'MultiPartUploadCreate'` + - `'MultiPartUploadWrite'` + - `'MultiPartUploadComplete'` + - `'MultiPartUploadAbort'` +- `query_id` ([String](../../sql-reference/data-types/string.md)) — イベントã«é–¢é€£ã™ã‚‹ã‚¯ã‚¨ãƒªã®è­˜åˆ¥å­ï¼ˆè©²å½“ã™ã‚‹å ´åˆï¼‰ã€‚ +- `thread_id` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — æ“作を行ã†ã‚¹ãƒ¬ãƒƒãƒ‰ã®è­˜åˆ¥å­ã€‚ +- `thread_name` ([String](../../sql-reference/data-types/string.md)) — æ“作を行ã†ã‚¹ãƒ¬ãƒƒãƒ‰ã®åå‰ã€‚ +- `disk_name` ([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md)) — 関連ã™ã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ã®åå‰ã€‚ +- `bucket` ([String](../../sql-reference/data-types/string.md)) — ãƒã‚±ãƒƒãƒˆã®åå‰ã€‚ +- `remote_path` ([String](../../sql-reference/data-types/string.md)) — リモートリソースã¸ã®ãƒ‘ス。 +- `local_path` ([String](../../sql-reference/data-types/string.md)) — リモートリソースをå‚ç…§ã™ã‚‹ãƒ­ãƒ¼ã‚«ãƒ«ã‚·ã‚¹ãƒ†ãƒ ä¸Šã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。 +- `data_size` ([UInt32](../../sql-reference/data-types/int-uint.md#uint-ranges)) — アップロードイベントã«é–¢ä¸Žã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºã€‚ +- `error` ([String](../../sql-reference/data-types/string.md)) — イベントã«é–¢é€£ã™ã‚‹ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ï¼ˆè©²å½“ã™ã‚‹å ´åˆï¼‰ã€‚ + +**例** + +ã‚ã‚‹blobストレージæ“作ãŒãƒ•ã‚¡ã‚¤ãƒ«ã‚’アップロードã—ã€ã‚¤ãƒ™ãƒ³ãƒˆãŒãƒ­ã‚°ã«è¨˜éŒ²ã•ã‚ŒãŸã¨ã—ã¾ã™: + +```sql +SELECT * FROM system.blob_storage_log WHERE query_id = '7afe0450-504d-4e4b-9a80-cd9826047972' ORDER BY event_date, event_time_microseconds \G +``` + +```text +Row 1: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2023-10-31 +event_time: 2023-10-31 16:03:40 +event_time_microseconds: 2023-10-31 16:03:40.481437 +event_type: Upload +query_id: 7afe0450-504d-4e4b-9a80-cd9826047972 +thread_id: 2381740 +disk_name: disk_s3 +bucket: bucket1 +remote_path: rrr/kxo/tbnqtrghgtnxkzgtcrlutwuslgawe +local_path: store/654/6549e8b3-d753-4447-8047-d462df6e6dbe/tmp_insert_all_1_1_0/checksums.txt +data_size: 259 +error: +``` + +ã“ã®ä¾‹ã§ã¯ã€ã‚¢ãƒƒãƒ—ロードæ“作ã¯ã‚¯ã‚¨ãƒªID `7afe0450-504d-4e4b-9a80-cd9826047972` ã®`INSERT`クエリã«é–¢é€£ã—ã¦ã„ã¾ã—ãŸã€‚ローカルメタデータファイル `store/654/6549e8b3-d753-4447-8047-d462df6e6dbe/tmp_insert_all_1_1_0/checksums.txt` ã¯ãƒã‚±ãƒƒãƒˆ `bucket1` ã®ãƒ‡ã‚£ã‚¹ã‚¯ `disk_s3` 上ã®ãƒªãƒ¢ãƒ¼ãƒˆãƒ‘ス `rrr/kxo/tbnqtrghgtnxkzgtcrlutwuslgawe` ã‚’å‚ç…§ã—ã¦ãŠã‚Šã€ã‚µã‚¤ã‚ºã¯259ãƒã‚¤ãƒˆã§ã™ã€‚ + +**å‚ç…§** + +- [データをä¿å­˜ã™ã‚‹ãŸã‚ã®å¤–部ディスク](../../operations/storing-data.md) diff --git a/docs/ja/operations/system-tables/build_options.md b/docs/ja/operations/system-tables/build_options.md new file mode 100644 index 00000000000..aea1e72f337 --- /dev/null +++ b/docs/ja/operations/system-tables/build_options.md @@ -0,0 +1,27 @@ +--- +slug: /ja/operations/system-tables/build_options +--- +# build_options + +ClickHouseサーãƒãƒ¼ã®ãƒ“ルドオプションã«é–¢ã™ã‚‹æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +カラム: + +- `name` (String) — ビルドオプションã®åå‰ã€ä¾‹ãˆã° `USE_ODBC` +- `value` (String) — ビルドオプションã®å€¤ã€ä¾‹ãˆã° `1` + +**例** + +``` sql +SELECT * FROM system.build_options LIMIT 5 +``` + +``` text +┌─name─────────────┬─value─┠+│ USE_BROTLI │ 1 │ +│ USE_BZIP2 │ 1 │ +│ USE_CAPNP │ 1 │ +│ USE_CASSANDRA │ 1 │ +│ USE_DATASKETCHES │ 1 │ +└──────────────────┴───────┘ +``` diff --git a/docs/ja/operations/system-tables/clusters.md b/docs/ja/operations/system-tables/clusters.md new file mode 100644 index 00000000000..d128203a0e4 --- /dev/null +++ b/docs/ja/operations/system-tables/clusters.md @@ -0,0 +1,82 @@ +--- +slug: /ja/operations/system-tables/clusters +--- +# clusters + +コンフィグファイルã«è¨˜è¼‰ã•ã‚Œã¦ã„る利用å¯èƒ½ãªã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã¨ãã®ã‚µãƒ¼ãƒãƒ¼ã«ã¤ã„ã¦ã®æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +カラム: + +- `cluster` ([String](../../sql-reference/data-types/string.md)) — クラスターå。 +- `shard_num` ([UInt32](../../sql-reference/data-types/int-uint.md)) — クラスター内ã®ã‚·ãƒ£ãƒ¼ãƒ‰ç•ªå·ã€‚1ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ +- `shard_weight` ([UInt32](../../sql-reference/data-types/int-uint.md)) — データを書ã込む際ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®ç›¸å¯¾çš„ãªé‡ã¿ã€‚ +- `replica_num` ([UInt32](../../sql-reference/data-types/int-uint.md)) — シャード内ã®ãƒ¬ãƒ—リカ番å·ã€‚1ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ +- `host_name` ([String](../../sql-reference/data-types/string.md)) — コンフィグã§æŒ‡å®šã•ã‚ŒãŸãƒ›ã‚¹ãƒˆå。 +- `host_address` ([String](../../sql-reference/data-types/string.md)) — DNSã‹ã‚‰å–å¾—ã—ãŸãƒ›ã‚¹ãƒˆIPアドレス。 +- `port` ([UInt16](../../sql-reference/data-types/int-uint.md)) — サーãƒãƒ¼ã¸ã®æŽ¥ç¶šã«ä½¿ç”¨ã™ã‚‹ãƒãƒ¼ãƒˆã€‚ +- `is_local` ([UInt8](../../sql-reference/data-types/int-uint.md)) — ホストãŒãƒ­ãƒ¼ã‚«ãƒ«ã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `user` ([String](../../sql-reference/data-types/string.md)) — サーãƒãƒ¼ã¸ã®æŽ¥ç¶šã«ä½¿ç”¨ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼å。 +- `default_database` ([String](../../sql-reference/data-types/string.md)) — デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å。 +- `errors_count` ([UInt32](../../sql-reference/data-types/int-uint.md)) — ã“ã®ãƒ›ã‚¹ãƒˆã§ãƒ¬ãƒ—リカã«åˆ°é”ã™ã‚‹ã®ã«å¤±æ•—ã—ãŸå›žæ•°ã€‚ +- `slowdowns_count` ([UInt32](../../sql-reference/data-types/int-uint.md)) — ヘッジリクエストã§æŽ¥ç¶šã‚’確立ã™ã‚‹éš›ã«ãƒ¬ãƒ—リカを変更ã™ã‚‹ã“ã¨ã«ãªã£ãŸé…延ã®å›žæ•°ã€‚ +- `estimated_recovery_time` ([UInt32](../../sql-reference/data-types/int-uint.md)) — レプリカエラーカウントãŒã‚¼ãƒ­ã«ãªã‚Šã€æ­£å¸¸ã«æˆ»ã‚‹ã¾ã§ã®æ®‹ã‚Šç§’数。 +- `database_shard_name` ([String](../../sql-reference/data-types/string.md)) — `Replicated` データベースシャードã®åå‰ï¼ˆ`Replicated` データベースã«å±žã™ã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®å ´åˆï¼‰ã€‚ +- `database_replica_name` ([String](../../sql-reference/data-types/string.md)) — `Replicated` データベースレプリカã®åå‰ï¼ˆ`Replicated` データベースã«å±žã™ã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®å ´åˆï¼‰ã€‚ +- `is_active` ([Nullable(UInt8)](../../sql-reference/data-types/int-uint.md)) — `Replicated` データベースレプリカã®çŠ¶æ…‹ï¼ˆ`Replicated` データベースã«å±žã™ã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®å ´åˆï¼‰ã€‚1ã¯ã€Œãƒ¬ãƒ—リカãŒã‚ªãƒ³ãƒ©ã‚¤ãƒ³ã€ã€0ã¯ã€Œãƒ¬ãƒ—リカãŒã‚ªãƒ•ãƒ©ã‚¤ãƒ³ã€ã€`NULL` ã¯ã€Œä¸æ˜Žã€ã‚’示ã—ã¾ã™ã€‚ +- `name` ([String](../../sql-reference/data-types/string.md)) - クラスターã¸ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ + +**例** + +クエリ: + +```sql +SELECT * FROM system.clusters LIMIT 2 FORMAT Vertical; +``` + +çµæžœ: + +```text +è¡Œ 1: +──── +cluster: test_cluster_two_shards +shard_num: 1 +shard_weight: 1 +replica_num: 1 +host_name: 127.0.0.1 +host_address: 127.0.0.1 +port: 9000 +is_local: 1 +user: default +default_database: +errors_count: 0 +slowdowns_count: 0 +estimated_recovery_time: 0 +database_shard_name: +database_replica_name: +is_active: NULL + +è¡Œ 2: +──── +cluster: test_cluster_two_shards +shard_num: 2 +shard_weight: 1 +replica_num: 1 +host_name: 127.0.0.2 +host_address: 127.0.0.2 +port: 9000 +is_local: 0 +user: default +default_database: +errors_count: 0 +slowdowns_count: 0 +estimated_recovery_time: 0 +database_shard_name: +database_replica_name: +is_active: NULL +``` + +**å‚ç…§** + +- [テーブルエンジン Distributed](../../engines/table-engines/special/distributed.md) +- [distributed_replica_error_cap 設定](../../operations/settings/settings.md#distributed_replica_error_cap) +- [distributed_replica_error_half_life 設定](../../operations/settings/settings.md#distributed_replica_error_half_life) diff --git a/docs/ja/operations/system-tables/columns.md b/docs/ja/operations/system-tables/columns.md new file mode 100644 index 00000000000..0eb2b0c09b7 --- /dev/null +++ b/docs/ja/operations/system-tables/columns.md @@ -0,0 +1,90 @@ +--- +slug: /ja/operations/system-tables/columns +--- +# columns + +ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ルを使用ã™ã‚‹ã¨ã€è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ä¸€åº¦ã«[DESCRIBE TABLE](../../sql-reference/statements/describe-table.md)クエリã«ä¼¼ãŸæƒ…報をå–å¾—ã§ãã¾ã™ã€‚ + +[一時テーブル](../../sql-reference/statements/create/table.md#temporary-tables)ã®ã‚«ãƒ©ãƒ ã¯ã€ãã‚ŒãŒä½œæˆã•ã‚ŒãŸã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ã®ã¿ `system.columns` ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã“れら㯠`database` フィールドãŒç©ºã®çŠ¶æ…‹ã§è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +`system.columns` テーブルã«ã¯ä»¥ä¸‹ã®ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ï¼ˆã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã¯æ‹¬å¼§å†…ã«ç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼‰ï¼š + +- `database` ([String](../../sql-reference/data-types/string.md)) — データベースå。 +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 +- `name` ([String](../../sql-reference/data-types/string.md)) — カラムå。 +- `type` ([String](../../sql-reference/data-types/string.md)) — カラムタイプ。 +- `position` ([UInt64](../../sql-reference/data-types/int-uint.md)) — テーブル内ã®ã‚«ãƒ©ãƒ ã®åºæ•°ã€1ã‹ã‚‰é–‹å§‹ã€‚ +- `default_kind` ([String](../../sql-reference/data-types/string.md)) — デフォルト値ã®å¼ã‚¿ã‚¤ãƒ— (`DEFAULT`, `MATERIALIZED`, `ALIAS`)ã€æœªå®šç¾©ã®å ´åˆã¯ç©ºã®æ–‡å­—列。 +- `default_expression` ([String](../../sql-reference/data-types/string.md)) — デフォルト値ã®å¼ã€æœªå®šç¾©ã®å ´åˆã¯ç©ºã®æ–‡å­—列。 +- `data_compressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 圧縮ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ +- `data_uncompressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 解å‡ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ +- `marks_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — マークã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ +- `comment` ([String](../../sql-reference/data-types/string.md)) — カラムã«é–¢ã™ã‚‹ã‚³ãƒ¡ãƒ³ãƒˆã€æœªå®šç¾©ã®å ´åˆã¯ç©ºã®æ–‡å­—列。 +- `is_in_partition_key` ([UInt8](../../sql-reference/data-types/int-uint.md)) — カラムãŒãƒ‘ーティションå¼ã«å«ã¾ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `is_in_sorting_key` ([UInt8](../../sql-reference/data-types/int-uint.md)) — カラムãŒã‚½ãƒ¼ãƒˆã‚­ãƒ¼å¼ã«å«ã¾ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `is_in_primary_key` ([UInt8](../../sql-reference/data-types/int-uint.md)) — カラムãŒä¸»ã‚­ãƒ¼å¼ã«å«ã¾ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `is_in_sampling_key` ([UInt8](../../sql-reference/data-types/int-uint.md)) — カラムãŒã‚µãƒ³ãƒ—リングキーå¼ã«å«ã¾ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `compression_codec` ([String](../../sql-reference/data-types/string.md)) — 圧縮コーデックå。 +- `character_octet_length` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã€æ–‡å­—データã€ã¾ãŸã¯ãƒ†ã‚­ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã¨ç”»åƒã®æœ€å¤§ãƒã‚¤ãƒˆé•·ã€‚ClickHouseã§ã¯ `FixedString` データ型ã«ã®ã¿æ„味ãŒã‚ã‚Šã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ `NULL` 値ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `numeric_precision` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — 近似数値データã€æ­£ç¢ºãªæ•°å€¤ãƒ‡ãƒ¼ã‚¿ã€æ•´æ•°ãƒ‡ãƒ¼ã‚¿ã€ã¾ãŸã¯è²¨å¹£ãƒ‡ãƒ¼ã‚¿ã®ç²¾åº¦ã€‚ClickHouseã§ã¯æ•´æ•°åž‹ã«å¯¾ã™ã‚‹ãƒ“ット幅㨠`Decimal` åž‹ã«å¯¾ã™ã‚‹å°æ•°ç²¾åº¦ã§ã™ã€‚ãれ以外ã®å ´åˆã¯ `NULL` 値ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `numeric_precision_radix` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — 近似数値データã€æ­£ç¢ºãªæ•°å€¤ãƒ‡ãƒ¼ã‚¿ã€æ•´æ•°ãƒ‡ãƒ¼ã‚¿ã€ã¾ãŸã¯è²¨å¹£ãƒ‡ãƒ¼ã‚¿ã®æ­£ç¢ºã•ã‚’表ã™æ•°å€¤ã‚·ã‚¹ãƒ†ãƒ ã®åŸºæ•°ã§ã™ã€‚ClickHouseã§ã¯æ•´æ•°åž‹ã«å¯¾ã—ã¦ã¯2ã€`Decimal` åž‹ã«å¯¾ã—ã¦ã¯10ã§ã™ã€‚ãれ以外ã®å ´åˆã¯ `NULL` 値ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `numeric_scale` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — 近似数値データã€æ­£ç¢ºãªæ•°å€¤ãƒ‡ãƒ¼ã‚¿ã€æ•´æ•°ãƒ‡ãƒ¼ã‚¿ã€ã¾ãŸã¯è²¨å¹£ãƒ‡ãƒ¼ã‚¿ã®ã‚¹ã‚±ãƒ¼ãƒ«ã€‚ClickHouseã§ã¯ `Decimal` åž‹ã«ã®ã¿æ„味ãŒã‚ã‚Šã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ `NULL` 値ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `datetime_precision` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — `DateTime64` データ型ã®å°æ•°ç²¾åº¦ã€‚ä»–ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®å ´åˆã¯ `NULL` 値ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**例** + +```sql +SELECT * FROM system.columns LIMIT 2 FORMAT Vertical; +``` + +```text +Row 1: +────── +database: INFORMATION_SCHEMA +table: COLUMNS +name: table_catalog +type: String +position: 1 +default_kind: +default_expression: +data_compressed_bytes: 0 +data_uncompressed_bytes: 0 +marks_bytes: 0 +comment: +is_in_partition_key: 0 +is_in_sorting_key: 0 +is_in_primary_key: 0 +is_in_sampling_key: 0 +compression_codec: +character_octet_length: á´ºáµá´¸á´¸ +numeric_precision: á´ºáµá´¸á´¸ +numeric_precision_radix: á´ºáµá´¸á´¸ +numeric_scale: á´ºáµá´¸á´¸ +datetime_precision: á´ºáµá´¸á´¸ + +Row 2: +────── +database: INFORMATION_SCHEMA +table: COLUMNS +name: table_schema +type: String +position: 2 +default_kind: +default_expression: +data_compressed_bytes: 0 +data_uncompressed_bytes: 0 +marks_bytes: 0 +comment: +is_in_partition_key: 0 +is_in_sorting_key: 0 +is_in_primary_key: 0 +is_in_sampling_key: 0 +compression_codec: +character_octet_length: á´ºáµá´¸á´¸ +numeric_precision: á´ºáµá´¸á´¸ +numeric_precision_radix: á´ºáµá´¸á´¸ +numeric_scale: á´ºáµá´¸á´¸ +datetime_precision: á´ºáµá´¸á´¸ +``` diff --git a/docs/ja/operations/system-tables/contributors.md b/docs/ja/operations/system-tables/contributors.md new file mode 100644 index 00000000000..a4026027533 --- /dev/null +++ b/docs/ja/operations/system-tables/contributors.md @@ -0,0 +1,43 @@ +--- +slug: /ja/operations/system-tables/contributors +--- +# contributors + +寄稿者ã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚é †åºã¯ã‚¯ã‚¨ãƒªå®Ÿè¡Œæ™‚ã«ãƒ©ãƒ³ãƒ€ãƒ ã§ã™ã€‚ + +カラム: + +- `name` (String) — git logã‹ã‚‰ã®å¯„稿者(著者)ã®åå‰ã€‚ + +**例** + +``` sql +SELECT * FROM system.contributors LIMIT 10 +``` + +``` text +┌─name─────────────┠+│ Olga Khvostikova │ +│ Max Vetrov │ +│ LiuYangkuan │ +│ svladykin │ +│ zamulla │ +│ Å imon Podlipský │ +│ BayoNet │ +│ Ilya Khomutov │ +│ Amy Krishnevsky │ +│ Loud_Scream │ +└──────────────────┘ +``` + +表ã§è‡ªåˆ†è‡ªèº«ã‚’見ã¤ã‘出ã™ã«ã¯ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¾ã™: + +``` sql +SELECT * FROM system.contributors WHERE name = 'Olga Khvostikova' +``` + +``` text +┌─name─────────────┠+│ Olga Khvostikova │ +└──────────────────┘ +``` diff --git a/docs/ja/operations/system-tables/crash-log.md b/docs/ja/operations/system-tables/crash-log.md new file mode 100644 index 00000000000..dba10b76216 --- /dev/null +++ b/docs/ja/operations/system-tables/crash-log.md @@ -0,0 +1,52 @@ +--- +slug: /ja/operations/system-tables/crash-log +--- +# crash_log + +致命的ãªã‚¨ãƒ©ãƒ¼ã«é–¢ã™ã‚‹ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã®æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«å­˜åœ¨ã—ã¦ãŠã‚‰ãšã€è‡´å‘½çš„ãªã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸã¨ãã«ã®ã¿ä½œæˆã•ã‚Œã¾ã™ã€‚ + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([DateTime](../../sql-reference/data-types/datetime.md)) — イベントã®æ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — イベントã®æ™‚刻。 +- `timestamp_ns` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ナノ秒å˜ä½ã®ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。 +- `signal` ([Int32](../../sql-reference/data-types/int-uint.md)) — シグナル番å·ã€‚ +- `thread_id` ([UInt64](../../sql-reference/data-types/int-uint.md)) — スレッドID。 +- `query_id` ([String](../../sql-reference/data-types/string.md)) — クエリID。 +- `trace` ([Array](../../sql-reference/data-types/array.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クラッシュ時ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã€‚å„è¦ç´ ã¯ClickHouseサーãƒãƒ¼ãƒ—ロセス内ã®ä»®æƒ³ãƒ¡ãƒ¢ãƒªã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã™ã€‚ +- `trace_full` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — クラッシュ時ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã€‚å„è¦ç´ ã¯ClickHouseサーãƒãƒ¼ãƒ—ロセス内ã§å‘¼ã³å‡ºã•ã‚ŒãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚’å«ã¿ã¾ã™ã€‚ +- `version` ([String](../../sql-reference/data-types/string.md)) — ClickHouseサーãƒãƒ¼ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +- `revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — ClickHouseサーãƒãƒ¼ã®ãƒªãƒ“ジョン。 +- `build_id` ([String](../../sql-reference/data-types/string.md)) — コンパイラã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã‚‹BuildID。 + +**例** + +クエリ: + +``` sql +SELECT * FROM system.crash_log ORDER BY event_time DESC LIMIT 1; +``` + +çµæžœï¼ˆå®Œå…¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“): + +``` text +è¡Œ 1: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2020-10-14 +event_time: 2020-10-14 15:47:40 +timestamp_ns: 1602679660271312710 +signal: 11 +thread_id: 23624 +query_id: 428aab7c-8f5c-44e9-9607-d16b44467e69 +trace: [188531193,...] +trace_full: ['3. DB::(anonymous namespace)::FunctionFormatReadableTimeDelta::executeImpl(std::__1::vector >&, std::__1::vector > const&, unsigned long, unsigned long) const @ 0xb3cc1f9 in /home/username/work/ClickHouse/build/programs/clickhouse',...] +version: ClickHouse 20.11.1.1 +revision: 54442 +build_id: +``` + +**関連項目** +- [trace_log](../../operations/system-tables/trace_log.md) システムテーブル + diff --git a/docs/ja/operations/system-tables/current-roles.md b/docs/ja/operations/system-tables/current-roles.md new file mode 100644 index 00000000000..9d76875b453 --- /dev/null +++ b/docs/ja/operations/system-tables/current-roles.md @@ -0,0 +1,12 @@ +--- +slug: /ja/operations/system-tables/current-roles +--- +# current_roles + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ­ãƒ¼ãƒ«ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚`SET ROLE` ã«ã‚ˆã‚Šã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã®å†…容ãŒå¤‰æ›´ã•ã‚Œã¾ã™ã€‚ + +カラム: + + - `role_name` ([String](../../sql-reference/data-types/string.md)) — ロールå。 + - `with_admin_option` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `current_role` ㌠`ADMIN OPTION` 権é™ã‚’æŒã¤ãƒ­ãƒ¼ãƒ«ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ + - `is_default` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `current_role` ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ­ãƒ¼ãƒ«ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ diff --git a/docs/ja/operations/system-tables/dashboards.md b/docs/ja/operations/system-tables/dashboards.md new file mode 100644 index 00000000000..bef16ad45ec --- /dev/null +++ b/docs/ja/operations/system-tables/dashboards.md @@ -0,0 +1,66 @@ +--- +slug: /ja/operations/system-tables/dashboards +--- +# dashboards + +[HTTPインターフェース](/docs/ja/interfaces/http.md)を介ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãª`/dashboard`ページã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ç›£è¦–やトラブルシューティングã«å½¹ç«‹ã¡ã¾ã™ã€‚ダッシュボード内ã®å„ãƒãƒ£ãƒ¼ãƒˆã«å¯¾ã—ã¦è¡ŒãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +:::note +`/dashboard`ページã¯`system.dashboards`ã ã‘ã§ãªãã€åŒã˜ã‚¹ã‚­ãƒ¼ãƒžã‚’æŒã¤ä»»æ„ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã‚¯ã‚¨ãƒªã‚’レンダリングã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚«ã‚¹ã‚¿ãƒ ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +例: + +``` sql +SELECT * +FROM system.dashboards +WHERE title ILIKE '%CPU%' +``` + +``` text +Row 1: +────── +dashboard: overview +title: CPU Usage (cores) +query: SELECT toStartOfInterval(event_time, INTERVAL {rounding:UInt32} SECOND)::INT AS t, avg(ProfileEvent_OSCPUVirtualTimeMicroseconds) / 1000000 +FROM system.metric_log +WHERE event_date >= toDate(now() - {seconds:UInt32}) AND event_time >= now() - {seconds:UInt32} +GROUP BY t +ORDER BY t WITH FILL STEP {rounding:UInt32} + +Row 2: +────── +dashboard: overview +title: CPU Wait +query: SELECT toStartOfInterval(event_time, INTERVAL {rounding:UInt32} SECOND)::INT AS t, avg(ProfileEvent_OSCPUWaitMicroseconds) / 1000000 +FROM system.metric_log +WHERE event_date >= toDate(now() - {seconds:UInt32}) AND event_time >= now() - {seconds:UInt32} +GROUP BY t +ORDER BY t WITH FILL STEP {rounding:UInt32} + +Row 3: +────── +dashboard: overview +title: OS CPU Usage (Userspace) +query: SELECT toStartOfInterval(event_time, INTERVAL {rounding:UInt32} SECOND)::INT AS t, avg(value) +FROM system.asynchronous_metric_log +WHERE event_date >= toDate(now() - {seconds:UInt32}) AND event_time >= now() - {seconds:UInt32} AND metric = 'OSUserTimeNormalized' +GROUP BY t +ORDER BY t WITH FILL STEP {rounding:UInt32} + +Row 4: +────── +dashboard: overview +title: OS CPU Usage (Kernel) +query: SELECT toStartOfInterval(event_time, INTERVAL {rounding:UInt32} SECOND)::INT AS t, avg(value) +FROM system.asynchronous_metric_log +WHERE event_date >= toDate(now() - {seconds:UInt32}) AND event_time >= now() - {seconds:UInt32} AND metric = 'OSSystemTimeNormalized' +GROUP BY t +ORDER BY t WITH FILL STEP {rounding:UInt32} +``` + +カラム: + +- `dashboard` (`String`) - ダッシュボードå。 +- `title` (`String`) - ãƒãƒ£ãƒ¼ãƒˆã®ã‚¿ã‚¤ãƒˆãƒ«ã€‚ +- `query` (`String`) - 表示ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã€‚ diff --git a/docs/ja/operations/system-tables/data_skipping_indices.md b/docs/ja/operations/system-tables/data_skipping_indices.md new file mode 100644 index 00000000000..9dcc1cc8201 --- /dev/null +++ b/docs/ja/operations/system-tables/data_skipping_indices.md @@ -0,0 +1,53 @@ +--- +slug: /ja/operations/system-tables/data_skipping_indices +--- +# data_skipping_indices + +å…¨ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«å­˜åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ”ングインデックスã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `database` ([String](../../sql-reference/data-types/string.md)) — データベースå。 +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 +- `name` ([String](../../sql-reference/data-types/string.md)) — インデックスå。 +- `type` ([String](../../sql-reference/data-types/string.md)) — インデックスタイプ。 +- `type_full` ([String](../../sql-reference/data-types/string.md)) — 作æˆæ–‡ã‹ã‚‰ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—å¼ã€‚ +- `expr` ([String](../../sql-reference/data-types/string.md)) — インデックス計算ã®ãŸã‚ã®å¼ã€‚ +- `granularity` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ブロック内ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«æ•°ã€‚ +- `data_compressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 圧縮ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ +- `data_uncompressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 解å‡ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ +- `marks_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — マークã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +**例** + +```sql +SELECT * FROM system.data_skipping_indices LIMIT 2 FORMAT Vertical; +``` + +```text +Row 1: +────── +database: default +table: user_actions +name: clicks_idx +type: minmax +type_full: minmax +expr: clicks +granularity: 1 +data_compressed_bytes: 58 +data_uncompressed_bytes: 6 +marks: 48 + +Row 2: +────── +database: default +table: users +name: contacts_null_idx +type: minmax +type_full: minmax +expr: assumeNotNull(contacts_null) +granularity: 1 +data_compressed_bytes: 58 +data_uncompressed_bytes: 6 +marks: 48 +``` diff --git a/docs/ja/operations/system-tables/data_type_families.md b/docs/ja/operations/system-tables/data_type_families.md new file mode 100644 index 00000000000..28c60714cde --- /dev/null +++ b/docs/ja/operations/system-tables/data_type_families.md @@ -0,0 +1,37 @@ +--- +slug: /ja/operations/system-tables/data_type_families +--- +# data_type_families + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹[データ型](../../sql-reference/data-types/index.md)ã«é–¢ã™ã‚‹æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +カラム: + +- `name` ([String](../../sql-reference/data-types/string.md)) — データ型ã®åå‰ã€‚ +- `case_insensitive` ([UInt8](../../sql-reference/data-types/int-uint.md)) — データ型ã®åå‰ã‚’クエリ内ã§å¤§æ–‡å­—å°æ–‡å­—を区別ã›ãšã«ä½¿ç”¨ã§ãã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ—ロパティ。例ãˆã°ã€`Date` 㨠`date` ã¯ã©ã¡ã‚‰ã‚‚有効ã§ã™ã€‚ +- `alias_to` ([String](../../sql-reference/data-types/string.md)) — `name`ãŒã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¨ãªã£ã¦ã„るデータ型ã®åå‰ã€‚ + +**例** + +``` sql +SELECT * FROM system.data_type_families WHERE alias_to = 'String' +``` + +``` text +┌─name───────┬─case_insensitive─┬─alias_to─┠+│ LONGBLOB │ 1 │ String │ +│ LONGTEXT │ 1 │ String │ +│ TINYTEXT │ 1 │ String │ +│ TEXT │ 1 │ String │ +│ VARCHAR │ 1 │ String │ +│ MEDIUMBLOB │ 1 │ String │ +│ BLOB │ 1 │ String │ +│ TINYBLOB │ 1 │ String │ +│ CHAR │ 1 │ String │ +│ MEDIUMTEXT │ 1 │ String │ +└────────────┴──────────────────┴──────────┘ +``` + +**関連項目** + +- [構文](../../sql-reference/syntax.md) — サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る構文ã«é–¢ã™ã‚‹æƒ…報。 diff --git a/docs/ja/operations/system-tables/database_engines.md b/docs/ja/operations/system-tables/database_engines.md new file mode 100644 index 00000000000..25e554c773e --- /dev/null +++ b/docs/ja/operations/system-tables/database_engines.md @@ -0,0 +1,26 @@ +--- +slug: /ja/operations/system-tables/database_engines +--- +# database_engines + +サーãƒãƒ¼ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータベースエンジンã®ãƒªã‚¹ãƒˆã‚’å«ã¿ã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ä»¥ä¸‹ã®ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¾ã™ï¼ˆã‚«ãƒ©ãƒ ã®åž‹ã¯æ‹¬å¼§å†…ã«ç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼‰: + +- `name` (String) — データベースエンジンã®åå‰ã€‚ + +例: + +``` sql +SELECT * +FROM system.database_engines +WHERE name in ('Atomic', 'Lazy', 'Ordinary') +``` + +``` text +┌─name─────┠+│ Ordinary │ +│ Atomic │ +│ Lazy │ +└──────────┘ +``` diff --git a/docs/ja/operations/system-tables/databases.md b/docs/ja/operations/system-tables/databases.md new file mode 100644 index 00000000000..3d252fe21c7 --- /dev/null +++ b/docs/ja/operations/system-tables/databases.md @@ -0,0 +1,44 @@ +--- +slug: /ja/operations/system-tables/databases +--- +# databases + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒåˆ©ç”¨å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `name` ([String](../../sql-reference/data-types/string.md)) — データベースå。 +- `engine` ([String](../../sql-reference/data-types/string.md)) — [データベースエンジン](../../engines/database-engines/index.md)。 +- `data_path` ([String](../../sql-reference/data-types/string.md)) — データパス。 +- `metadata_path` ([String](../../sql-reference/data-types/enum.md)) — メタデータパス。 +- `uuid` ([UUID](../../sql-reference/data-types/uuid.md)) — データベースUUID。 +- `comment` ([String](../../sql-reference/data-types/enum.md)) — データベースコメント。 +- `engine_full` ([String](../../sql-reference/data-types/enum.md)) — データベースエンジンã®ãƒ‘ラメータ。 +- `database` ([String](../../sql-reference/data-types/string.md)) – `name`ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ + +ã“ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã®`name`カラムã¯ã€`SHOW DATABASES`クエリã®å®Ÿè£…ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +データベースã®ä½œæˆã€‚ + +``` sql +CREATE DATABASE test; +``` + +ユーザーãŒåˆ©ç”¨å¯èƒ½ãªã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’確èªã—ã¾ã™ã€‚ + +``` sql +SELECT * FROM system.databases; +``` + +``` text +┌─name────────────────┬─engine─────┬─data_path────────────────────┬─metadata_path─────────────────────────────────────────────────────────┬─uuid─────────────────────────────────┬─engine_full────────────────────────────────────────────┬─comment─┠+│ INFORMATION_SCHEMA │ Memory │ /data/clickhouse_data/ │ │ 00000000-0000-0000-0000-000000000000 │ Memory │ │ +│ default │ Atomic │ /data/clickhouse_data/store/ │ /data/clickhouse_data/store/f97/f97a3ceb-2e8a-4912-a043-c536e826a4d4/ │ f97a3ceb-2e8a-4912-a043-c536e826a4d4 │ Atomic │ │ +│ information_schema │ Memory │ /data/clickhouse_data/ │ │ 00000000-0000-0000-0000-000000000000 │ Memory │ │ +│ replicated_database │ Replicated │ /data/clickhouse_data/store/ │ /data/clickhouse_data/store/da8/da85bb71-102b-4f69-9aad-f8d6c403905e/ │ da85bb71-102b-4f69-9aad-f8d6c403905e │ Replicated('some/path/database', 'shard1', 'replica1') │ │ +│ system │ Atomic │ /data/clickhouse_data/store/ │ /data/clickhouse_data/store/b57/b5770419-ac7a-4b67-8229-524122024076/ │ b5770419-ac7a-4b67-8229-524122024076 │ Atomic │ │ +└─────────────────────┴────────────┴──────────────────────────────┴───────────────────────────────────────────────────────────────────────┴──────────────────────────────────────┴────────────────────────────────────────────────────────┴─────────┘ + +``` diff --git a/docs/ja/operations/system-tables/detached_parts.md b/docs/ja/operations/system-tables/detached_parts.md new file mode 100644 index 00000000000..a86790b85fd --- /dev/null +++ b/docs/ja/operations/system-tables/detached_parts.md @@ -0,0 +1,12 @@ +--- +slug: /ja/operations/system-tables/detached_parts +--- +# detached_parts + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブルã®åˆ†é›¢ã•ã‚ŒãŸãƒ‘ーツã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚`reason`カラムã¯ã€ãƒ‘ーツãŒåˆ†é›¢ã•ã‚ŒãŸç†ç”±ã‚’指定ã—ã¾ã™ã€‚ + +ユーザーã«ã‚ˆã£ã¦åˆ†é›¢ã•ã‚ŒãŸãƒ‘ーツã®å ´åˆã€ç†ç”±ã¯ç©ºã§ã™ã€‚ãã®ã‚ˆã†ãªãƒ‘ーツã¯ã€[ALTER TABLE ATTACH PARTITION\|PART](../../sql-reference/statements/alter/partition.md#alter_attach-partition) コマンドã§ã‚¢ã‚¿ãƒƒãƒã§ãã¾ã™ã€‚ + +ä»–ã®ã‚«ãƒ©ãƒ ã®èª¬æ˜Žã«ã¤ã„ã¦ã¯ã€[system.parts](../../operations/system-tables/parts.md#system_tables-parts)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +パーツåãŒç„¡åŠ¹ãªå ´åˆã€ä¸€éƒ¨ã®ã‚«ãƒ©ãƒ ã®å€¤ã¯`NULL`ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ãã®ã‚ˆã†ãªãƒ‘ーツã¯ã€[ALTER TABLE DROP DETACHED PART](../../sql-reference/statements/alter/partition.md#alter_drop-detached)ã§å‰Šé™¤ã§ãã¾ã™ã€‚ diff --git a/docs/ja/operations/system-tables/detached_tables.md b/docs/ja/operations/system-tables/detached_tables.md new file mode 100644 index 00000000000..3ae2b59793d --- /dev/null +++ b/docs/ja/operations/system-tables/detached_tables.md @@ -0,0 +1,35 @@ +--- +slug: /ja/operations/system-tables/detached_tables +--- +# detached_tables + +å„分離ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `database` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒæ‰€å±žã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ + +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 + +- `uuid` ([UUID](../../sql-reference/data-types/uuid.md)) — テーブルã®UUID(Atomicデータベース)。 + +- `metadata_path` ([String](../../sql-reference/data-types/string.md)) - ファイルシステム内ã®ãƒ†ãƒ¼ãƒ–ルメタデータã¸ã®ãƒ‘ス。 + +- `is_permanently` ([UInt8](../../sql-reference/data-types/int-uint.md)) - テーブルãŒPERMANENTLYã§åˆ†é›¢ã•ã‚ŒãŸã“ã¨ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ + + +**例** + +```sql +SELECT * FROM system.detached_tables FORMAT Vertical; +``` + +```text +Row 1: +────── +database: base +table: t1 +uuid: 81b1c20a-b7c6-4116-a2ce-7583fb6b6736 +metadata_path: /var/lib/clickhouse/store/461/461cf698-fd0b-406d-8c01-5d8fd5748a91/t1.sql +is_permanently: 1 +``` diff --git a/docs/ja/operations/system-tables/dictionaries.md b/docs/ja/operations/system-tables/dictionaries.md new file mode 100644 index 00000000000..446d6678b49 --- /dev/null +++ b/docs/ja/operations/system-tables/dictionaries.md @@ -0,0 +1,91 @@ +--- +slug: /ja/operations/system-tables/dictionaries +--- +# dictionaries + +[Dictionary](../../sql-reference/dictionaries/index.md)ã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +カラム: + +- `database` ([String](../../sql-reference/data-types/string.md)) — DDLクエリã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸDictionaryã‚’å«ã‚€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ä»–ã®Dictionaryã®å ´åˆã¯ç©ºæ–‡å­—列。 +- `name` ([String](../../sql-reference/data-types/string.md)) — [Dictionaryå](../../sql-reference/dictionaries/index.md)。 +- `uuid` ([UUID](../../sql-reference/data-types/uuid.md)) — Dictionaryã®UUID。 +- `status` ([Enum8](../../sql-reference/data-types/enum.md)) — Dictionaryã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã€‚å¯èƒ½ãªå€¤ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + - `NOT_LOADED` — 使用ã•ã‚Œãªã‹ã£ãŸãŸã‚Dictionaryã¯ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã›ã‚“ã§ã—ãŸã€‚ + - `LOADED` — DictionaryãŒæ­£å¸¸ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã—ãŸã€‚ + - `FAILED` — エラーãŒåŽŸå› ã§Dictionaryをロードã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ + - `LOADING` — ç¾åœ¨ã€DictionaryãŒãƒ­ãƒ¼ãƒ‰ä¸­ã§ã™ã€‚ + - `LOADED_AND_RELOADING` — DictionaryãŒæ­£å¸¸ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã€ç¾åœ¨ãƒªãƒ­ãƒ¼ãƒ‰ä¸­ã§ã™ï¼ˆé »ç¹ãªç†ç”±: [SYSTEM RELOAD DICTIONARY](../../sql-reference/statements/system.md#query_language-system-reload-dictionary)クエリã€ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€Dictionary設定ã®å¤‰æ›´ï¼‰ã€‚ + - `FAILED_AND_RELOADING` — エラーãŒåŽŸå› ã§Dictionaryをロードã§ããšã€ç¾åœ¨ãƒ­ãƒ¼ãƒ‰ä¸­ã§ã™ã€‚ +- `origin` ([String](../../sql-reference/data-types/string.md)) — Dictionaryを記述ã™ã‚‹è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。 +- `type` ([String](../../sql-reference/data-types/string.md)) — Dictionaryã®å‰²ã‚Šå½“ã¦ã‚¿ã‚¤ãƒ—。[メモリã«Dictionaryã‚’ä¿å­˜](../../sql-reference/dictionaries/index.md#storig-dictionaries-in-memory)。 +- `key.names` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — Dictionaryã«ã‚ˆã£ã¦æä¾›ã•ã‚Œã‚‹[キーã®åå‰](../../sql-reference/dictionaries/index.md#dictionary-key-and-fields#ext_dict_structure-key)ã®é…列。 +- `key.types` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — Dictionaryã«ã‚ˆã£ã¦æä¾›ã•ã‚Œã‚‹[キーã®ã‚¿ã‚¤ãƒ—](../../sql-reference/dictionaries/index.md#dictionary-key-and-fields#ext_dict_structure-key)ã®å¯¾å¿œã™ã‚‹é…列。 +- `attribute.names` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — Dictionaryã«ã‚ˆã£ã¦æä¾›ã•ã‚Œã‚‹[属性ã®åå‰](../../sql-reference/dictionaries/index.md#dictionary-key-and-fields#ext_dict_structure-attributes)ã®é…列。 +- `attribute.types` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — Dictionaryã«ã‚ˆã£ã¦æä¾›ã•ã‚Œã‚‹[属性ã®ã‚¿ã‚¤ãƒ—](../../sql-reference/dictionaries/index.md#dictionary-key-and-fields#ext_dict_structure-attributes)ã®å¯¾å¿œã™ã‚‹é…列。 +- `bytes_allocated` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Dictionaryã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸRAMã®é‡ã€‚ +- `query_count` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Dictionaryã®ãƒ­ãƒ¼ãƒ‰ã¾ãŸã¯æœ€å¾Œã®æ­£å¸¸ãªå†èµ·å‹•ä»¥æ¥ã®ã‚¯ã‚¨ãƒªã®æ•°ã€‚ +- `hit_rate` ([Float64](../../sql-reference/data-types/float.md)) — キャッシュDictionaryã®å ´åˆã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥å†…ã«å€¤ãŒã‚ã£ãŸä½¿ç”¨å›žæ•°ã®å‰²åˆã€‚ +- `found_rate` ([Float64](../../sql-reference/data-types/float.md)) — 値ãŒè¦‹ã¤ã‹ã£ãŸä½¿ç”¨å›žæ•°ã®å‰²åˆã€‚ +- `element_count` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Dictionaryã«æ ¼ç´ã•ã‚Œã¦ã„るアイテムã®æ•°ã€‚ +- `load_factor` ([Float64](../../sql-reference/data-types/float.md)) — Dictionary (ãƒãƒƒã‚·ãƒ¥ãƒ™ãƒ¼ã‚¹ã®Dictionaryã§ã¯ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ル)ã®å……填率。 +- `source` ([String](../../sql-reference/data-types/string.md)) — Dictionaryã®[データソース](../../sql-reference/dictionaries/index.md#dictionary-sources)を説明ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆã€‚ +- `lifetime_min` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — メモリ内ã®Dictionaryã®æœ€å°[有効期é™](../../sql-reference/dictionaries/index.md#dictionary-updates)ã€ã“ã®å¾ŒClickHouseã¯Dictionaryをリロードã—よã†ã¨ã—ã¾ã™ï¼ˆ`invalidate_query`ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å¤‰ã‚ã£ã¦ã„ã‚Œã°ã®ã¿ï¼‰ã€‚秒å˜ä½ã§è¨­å®šã€‚ +- `lifetime_max` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — メモリ内ã®Dictionaryã®æœ€å¤§[有効期é™](../../sql-reference/dictionaries/index.md#dictionary-updates)ã€ã“ã®å¾ŒClickHouseã¯Dictionaryをリロードã—よã†ã¨ã—ã¾ã™ï¼ˆ`invalidate_query`ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å¤‰ã‚ã£ã¦ã„ã‚Œã°ã®ã¿ï¼‰ã€‚秒å˜ä½ã§è¨­å®šã€‚ +- `loading_start_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — Dictionaryã®ãƒ­ãƒ¼ãƒ‰é–‹å§‹æ™‚間。 +- `last_successful_update_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — Dictionaryã®ãƒ­ãƒ¼ãƒ‰ã¾ãŸã¯æ›´æ–°ã®çµ‚了時間。Dictionaryソースã«é–¢é€£ã™ã‚‹å•é¡Œã®ç›£è¦–ã¨åŽŸå› èª¿æŸ»ã«å½¹ç«‹ã¡ã¾ã™ã€‚ +- `loading_duration` ([Float32](../../sql-reference/data-types/float.md)) — Dictionaryロードã®æœŸé–“。 +- `last_exception` ([String](../../sql-reference/data-types/string.md)) — Dictionaryを作æˆã¾ãŸã¯ãƒªãƒ­ãƒ¼ãƒ‰ã™ã‚‹éš›ã«ç™ºç”Ÿã™ã‚‹ã‚¨ãƒ©ãƒ¼ã®ãƒ†ã‚­ã‚¹ãƒˆã€DictionaryãŒä½œæˆã§ããªã‹ã£ãŸå ´åˆã€‚ +- `comment` ([String](../../sql-reference/data-types/string.md)) — Dictionaryã¸ã®ã‚³ãƒ¡ãƒ³ãƒˆã®ãƒ†ã‚­ã‚¹ãƒˆã€‚ + +**例** + +Dictionaryを構æˆã—ã¾ã™ï¼š + +``` sql +CREATE DICTIONARY dictionary_with_comment +( + id UInt64, + value String +) +PRIMARY KEY id +SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() TABLE 'source_table')) +LAYOUT(FLAT()) +LIFETIME(MIN 0 MAX 1000) +COMMENT 'The temporary dictionary'; +``` + +DictionaryãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +``` sql +SELECT * FROM system.dictionaries LIMIT 1 FORMAT Vertical; +``` + +``` text +Row 1: +────── +database: default +name: dictionary_with_comment +uuid: 4654d460-0d03-433a-8654-d4600d03d33a +status: NOT_LOADED +origin: 4654d460-0d03-433a-8654-d4600d03d33a +type: +key.names: ['id'] +key.types: ['UInt64'] +attribute.names: ['value'] +attribute.types: ['String'] +bytes_allocated: 0 +query_count: 0 +hit_rate: 0 +found_rate: 0 +element_count: 0 +load_factor: 0 +source: +lifetime_min: 0 +lifetime_max: 0 +loading_start_time: 1970-01-01 00:00:00 +last_successful_update_time: 1970-01-01 00:00:00 +loading_duration: 0 +last_exception: +comment: The temporary dictionary +``` diff --git a/docs/ja/operations/system-tables/disks.md b/docs/ja/operations/system-tables/disks.md new file mode 100644 index 00000000000..3900ffe48b8 --- /dev/null +++ b/docs/ja/operations/system-tables/disks.md @@ -0,0 +1,29 @@ +--- +slug: /ja/operations/system-tables/disks +--- +# disk + +[サーãƒãƒ¼è¨­å®š](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-multiple-volumes_configure)ã§å®šç¾©ã•ã‚ŒãŸãƒ‡ã‚£ã‚¹ã‚¯ã®æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `name` ([String](../../sql-reference/data-types/string.md)) — サーãƒãƒ¼è¨­å®šå†…ã®ãƒ‡ã‚£ã‚¹ã‚¯ã®åå‰ã€‚ +- `path` ([String](../../sql-reference/data-types/string.md)) — ファイルシステム内ã®ãƒžã‚¦ãƒ³ãƒˆãƒã‚¤ãƒ³ãƒˆã¸ã®ãƒ‘ス。 +- `free_space` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ディスク上ã®ç©ºã容é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ +- `total_space` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ディスク容é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ +- `unreserved_space` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 予約ã•ã‚Œã¦ã„ãªã„空ã容é‡ã€‚(`free_space`ã‹ã‚‰ã€ç¾åœ¨å®Ÿè¡Œä¸­ã®ãƒžãƒ¼ã‚¸ã‚„インサートåŠã³ãã®ä»–ã®ãƒ‡ã‚£ã‚¹ã‚¯æ›¸ãè¾¼ã¿æ“作ã«ã‚ˆã£ã¦å–られã¦ã„る予約サイズを引ã„ãŸå€¤ã€‚) +- `keep_free_space` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ディスク上ã§å¸¸ã«ç©ºã‘ã¦ãŠãã¹ãディスク容é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ディスク設定ã®`keep_free_space_bytes`パラメーターã§å®šç¾©ã€‚ + +**例** + +```sql +SELECT * FROM system.disks; +``` + +```response +┌─name────┬─path─────────────────┬───free_space─┬──total_space─┬─keep_free_space─┠+│ default │ /var/lib/clickhouse/ │ 276392587264 │ 490652508160 │ 0 │ +└─────────┴──────────────────────┴──────────────┴──────────────┴─────────────────┘ + +1 rows in set. Elapsed: 0.001 sec. +``` diff --git a/docs/ja/operations/system-tables/distributed_ddl_queue.md b/docs/ja/operations/system-tables/distributed_ddl_queue.md new file mode 100644 index 00000000000..d93b318d782 --- /dev/null +++ b/docs/ja/operations/system-tables/distributed_ddl_queue.md @@ -0,0 +1,74 @@ +--- +slug: /ja/operations/system-tables/distributed_ddl_queue +--- +# distributed_ddl_queue + +クラスタã§å®Ÿè¡Œã•ã‚ŒãŸ[分散DDLクエリ(ON CLUSTERå¥ï¼‰](../../sql-reference/distributed-ddl.md)ã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `entry` ([String](../../sql-reference/data-types/string.md)) — クエリID。 +- `entry_version` ([Nullable(UInt8)](../../sql-reference/data-types/int-uint.md)) - エントリã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ +- `initiator_host` ([Nullable(String)](../../sql-reference/data-types/string.md)) - DDLæ“作を開始ã—ãŸãƒ›ã‚¹ãƒˆ +- `initiator_port` ([Nullable(UInt16)](../../sql-reference/data-types/int-uint.md)) - イニシエーターãŒä½¿ç”¨ã—ãŸãƒãƒ¼ãƒˆ +- `cluster` ([String](../../sql-reference/data-types/string.md)) — クラスターå。 +- `query` ([String](../../sql-reference/data-types/string.md)) — 実行ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã€‚ +- `settings` ([Map(String, String)](../../sql-reference/data-types/map.md)) - DDLæ“作ã§ä½¿ç”¨ã•ã‚ŒãŸè¨­å®š +- `query_create_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — クエリ生æˆæ™‚刻。 +- `host` ([String](../../sql-reference/data-types/string.md)) — ホストå +- `port` ([UInt16](../../sql-reference/data-types/int-uint.md)) — ホストãƒãƒ¼ãƒˆã€‚ +- `status` ([Enum8](../../sql-reference/data-types/enum.md)) — クエリã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã€‚ +- `exception_code` ([Enum8](../../sql-reference/data-types/enum.md)) — 例外コード。 +- `exception_text` ([Nullable(String)](../../sql-reference/data-types/string.md)) - 例外メッセージ +- `query_finish_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — クエリ終了時刻。 +- `query_duration_ms` ([UInt64](../../sql-reference/data-types/int-uint.md)) — クエリ実行時間(ミリ秒å˜ä½ï¼‰ã€‚ + +**例** + +``` sql +SELECT * +FROM system.distributed_ddl_queue +WHERE cluster = 'test_cluster' +LIMIT 2 +FORMAT Vertical + +Query id: f544e72a-6641-43f1-836b-24baa1c9632a + +Row 1: +────── +entry: query-0000000000 +entry_version: 5 +initiator_host: clickhouse01 +initiator_port: 9000 +cluster: test_cluster +query: CREATE DATABASE test_db UUID '4a82697e-c85e-4e5b-a01e-a36f2a758456' ON CLUSTER test_cluster +settings: {'max_threads':'16','use_uncompressed_cache':'0'} +query_create_time: 2023-09-01 16:15:14 +host: clickhouse-01 +port: 9000 +status: Finished +exception_code: 0 +exception_text: +query_finish_time: 2023-09-01 16:15:14 +query_duration_ms: 154 + +Row 2: +────── +entry: query-0000000001 +entry_version: 5 +initiator_host: clickhouse01 +initiator_port: 9000 +cluster: test_cluster +query: CREATE DATABASE test_db UUID '4a82697e-c85e-4e5b-a01e-a36f2a758456' ON CLUSTER test_cluster +settings: {'max_threads':'16','use_uncompressed_cache':'0'} +query_create_time: 2023-09-01 16:15:14 +host: clickhouse-01 +port: 9000 +status: Finished +exception_code: 630 +exception_text: Code: 630. DB::Exception: Cannot drop or rename test_db, because some tables depend on it: +query_finish_time: 2023-09-01 16:15:14 +query_duration_ms: 154 + +2 rows in set. Elapsed: 0.025 sec. +``` diff --git a/docs/ja/operations/system-tables/distribution_queue.md b/docs/ja/operations/system-tables/distribution_queue.md new file mode 100644 index 00000000000..404da9a7d5b --- /dev/null +++ b/docs/ja/operations/system-tables/distribution_queue.md @@ -0,0 +1,51 @@ +--- +slug: /ja/operations/system-tables/distribution_queue +--- +# distribution_queue + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã‚·ãƒ£ãƒ¼ãƒ‰ã«é€ä¿¡ã•ã‚Œã‚‹ã‚­ãƒ¥ãƒ¼ã«ã‚るローカルファイルã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ã“れらã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€æ–°ã—ã„データをéžåŒæœŸãƒ¢ãƒ¼ãƒ‰ã§åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸæ–°ã—ã„パーツをå«ã‚“ã§ã„ã¾ã™ã€‚ + +カラム: + +- `database` ([String](../../sql-reference/data-types/string.md)) — データベースã®åå‰ã€‚ + +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルã®åå‰ã€‚ + +- `data_path` ([String](../../sql-reference/data-types/string.md)) — ローカルファイルãŒæ ¼ç´ã•ã‚Œã¦ã„るフォルダã¸ã®ãƒ‘ス。 + +- `is_blocked` ([UInt8](../../sql-reference/data-types/int-uint.md)) — ローカルファイルをサーãƒãƒ¼ã«é€ä¿¡ã™ã‚‹ã“ã¨ãŒãƒ–ロックã•ã‚Œã¦ã„ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ + +- `error_count` ([UInt64](../../sql-reference/data-types/int-uint.md)) — エラーã®å›žæ•°ã€‚ + +- `data_files` ([UInt64](../../sql-reference/data-types/int-uint.md)) — フォルダ内ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã€‚ + +- `data_compressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ローカルファイル内ã®åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `broken_data_files` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 壊れã¦ã„る(エラーãŒã‚ã‚‹ãŸã‚)ã¨ãƒžãƒ¼ã‚¯ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã€‚ + +- `broken_data_compressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 壊れãŸãƒ•ã‚¡ã‚¤ãƒ«å†…ã®åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `last_exception` ([String](../../sql-reference/data-types/string.md)) — 発生ã—ãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ã«é–¢ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ï¼ˆã‚‚ã—ã‚ã‚Œã°ï¼‰ã€‚ + +**例** + +``` sql +SELECT * FROM system.distribution_queue LIMIT 1 FORMAT Vertical; +``` + +``` text +Row 1: +────── +database: default +table: dist +data_path: ./store/268/268bc070-3aad-4b1a-9cf2-4987580161af/default@127%2E0%2E0%2E2:9000/ +is_blocked: 1 +error_count: 0 +data_files: 1 +data_compressed_bytes: 499 +last_exception: +``` + +**関連項目** + +- [分散テーブルエンジン](../../engines/table-engines/special/distributed.md) diff --git a/docs/ja/operations/system-tables/dns_cache.md b/docs/ja/operations/system-tables/dns_cache.md new file mode 100644 index 00000000000..6f82f5a3ad7 --- /dev/null +++ b/docs/ja/operations/system-tables/dns_cache.md @@ -0,0 +1,38 @@ +--- +slug: /ja/operations/system-tables/dns_cache +--- +# dns_cache + +キャッシュã•ã‚ŒãŸDNSレコードã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `hostname` ([String](../../sql-reference/data-types/string.md)) — キャッシュã•ã‚ŒãŸãƒ›ã‚¹ãƒˆå +- `ip_address` ([String](../../sql-reference/data-types/string.md)) — ホストåã«å¯¾å¿œã™ã‚‹IPアドレス +- `ip_family` ([Enum](../../sql-reference/data-types/enum.md)) — IPアドレスã®ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã€å¯èƒ½ãªå€¤: + - 'IPv4' + - 'IPv6' + - 'UNIX_LOCAL' +- `cached_at` ([DateTime](../../sql-reference/data-types/datetime.md)) - レコードãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸæ—¥æ™‚ + +**例** + +クエリ: + +```sql +SELECT * FROM system.dns_cache; +``` + +çµæžœ: + +| hostname | ip\_address | ip\_family | cached\_at | +| :--- | :--- | :--- | :--- | +| localhost | ::1 | IPv6 | 2024-02-11 17:04:40 | +| localhost | 127.0.0.1 | IPv4 | 2024-02-11 17:04:40 | + +**関連項目** + +- [disable_internal_dns_cache 設定](../../operations/server-configuration-parameters/settings.md#disable_internal_dns_cache) +- [dns_cache_max_entries 設定](../../operations/server-configuration-parameters/settings.md#dns_cache_max_entries) +- [dns_cache_update_period 設定](../../operations/server-configuration-parameters/settings.md#dns_cache_update_period) +- [dns_max_consecutive_failures 設定](../../operations/server-configuration-parameters/settings.md#dns_max_consecutive_failures) diff --git a/docs/ja/operations/system-tables/dropped_tables.md b/docs/ja/operations/system-tables/dropped_tables.md new file mode 100644 index 00000000000..62788bbe234 --- /dev/null +++ b/docs/ja/operations/system-tables/dropped_tables.md @@ -0,0 +1,37 @@ +--- +slug: /ja/operations/system-tables/dropped_tables +--- +# dropped_tables + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€ãƒ‰ãƒ­ãƒƒãƒ—ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«é–¢ã™ã‚‹æƒ…å ±ãŒå«ã¾ã‚Œã¦ãŠã‚Šã€å®Ÿéš›ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ãŒã¾ã å®Ÿæ–½ã•ã‚Œã¦ã„ãªã„状態ã§ã™ã€‚ + +カラム: + +- `index` ([UInt32](../../sql-reference/data-types/int-uint.md)) — marked_dropped_tables キュー内ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚ +- `database` ([String](../../sql-reference/data-types/string.md)) — データベース。 +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 +- `uuid` ([UUID](../../sql-reference/data-types/uuid.md)) — テーブルã®UUID。 +- `engine` ([String](../../sql-reference/data-types/string.md)) — テーブルエンジンå。 +- `metadata_dropped_path` ([String](../../sql-reference/data-types/string.md)) — metadata_dropped ディレクトリ内ã®ãƒ†ãƒ¼ãƒ–ルメタデータファイルã®ãƒ‘ス。 +- `table_dropped_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — 次ã«ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿å‰Šé™¤ã‚’試ã¿ã‚‹äºˆå®šã®æ™‚刻。通常ã€ãƒ†ãƒ¼ãƒ–ルãŒãƒ‰ãƒ­ãƒƒãƒ—ã•ã‚ŒãŸæ™‚刻㫠`database_atomic_delay_before_drop_table_sec` を加ãˆãŸã‚‚ã®ã§ã™ã€‚ + +**例** + +以下ã®ä¾‹ã¯ã€dropped_tables ã«ã¤ã„ã¦ã®æƒ…報をå–å¾—ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +``` sql +SELECT * +FROM system.dropped_tables\G +``` + +``` text +Row 1: +────── +index: 0 +database: default +table: test +uuid: 03141bb2-e97a-4d7c-a172-95cc066bb3bd +engine: MergeTree +metadata_dropped_path: /data/ClickHouse/build/programs/data/metadata_dropped/default.test.03141bb2-e97a-4d7c-a172-95cc066bb3bd.sql +table_dropped_time: 2023-03-16 23:43:31 +``` diff --git a/docs/ja/operations/system-tables/dropped_tables_parts.md b/docs/ja/operations/system-tables/dropped_tables_parts.md new file mode 100644 index 00000000000..7f5b1253ca9 --- /dev/null +++ b/docs/ja/operations/system-tables/dropped_tables_parts.md @@ -0,0 +1,14 @@ +--- +slug: /ja/operations/system-tables/dropped_tables_parts +--- +# dropped_tables_parts {#system_tables-dropped_tables_parts} + +[system.dropped_tables](./dropped_tables.md) ã‹ã‚‰å‰Šé™¤ã•ã‚ŒãŸ [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブルã®ãƒ‘ーツã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ã‚­ãƒ¼ãƒžã¯ [system.parts](./parts.md) ã¨åŒã˜ã§ã™ã€‚ + +**関連項目** + +- [MergeTree ファミリー](../../engines/table-engines/mergetree-family/mergetree.md) +- [system.parts](./parts.md) +- [system.dropped_tables](./dropped_tables.md) diff --git a/docs/ja/operations/system-tables/enabled-roles.md b/docs/ja/operations/system-tables/enabled-roles.md new file mode 100644 index 00000000000..8941d13980a --- /dev/null +++ b/docs/ja/operations/system-tables/enabled-roles.md @@ -0,0 +1,13 @@ +--- +slug: /ja/operations/system-tables/enabled-roles +--- +# enabled_roles + +ç¾åœ¨ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ã‚’å«ã¿ã€ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ç¾åœ¨ã®ãƒ­ãƒ¼ãƒ«ã‚„ãã®ãƒ­ãƒ¼ãƒ«ã«å¯¾ã—ã¦ä»˜ä¸Žã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã‚‚å«ã¾ã‚Œã¾ã™ã€‚ + +カラム: + +- `role_name` ([String](../../sql-reference/data-types/string.md)) — ロールå。 +- `with_admin_option` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `enabled_role` ㌠`ADMIN OPTION` 特権をæŒã¤ãƒ­ãƒ¼ãƒ«ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `is_current` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `enabled_role` ãŒç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ç¾åœ¨ã®ãƒ­ãƒ¼ãƒ«ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `is_default` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `enabled_role` ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ­ãƒ¼ãƒ«ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ diff --git a/docs/ja/operations/system-tables/error_log.md b/docs/ja/operations/system-tables/error_log.md new file mode 100644 index 00000000000..24f18380b8d --- /dev/null +++ b/docs/ja/operations/system-tables/error_log.md @@ -0,0 +1,39 @@ +--- +slug: /ja/operations/system-tables/error_log +--- +# error_log + +`system.errors`テーブルã‹ã‚‰å¾—られるエラー値ã®å±¥æ­´ã‚’ä¿æŒã—ã¦ãŠã‚Šã€ä¸€å®šé–“éš”ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ã出ã•ã‚Œã¾ã™ã€‚ + +カラム: +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã—ãŸã‚µãƒ¼ãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — イベントã®æ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — イベントã®æ™‚刻。 +- `code` ([Int32](../../sql-reference/data-types/int-uint.md)) — エラーã®ã‚³ãƒ¼ãƒ‰ç•ªå·ã€‚ +- `error` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) - エラーã®å称。 +- `value` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ã“ã®ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå›žæ•°ã€‚ +- `remote` ([UInt8](../../sql-reference/data-types/int-uint.md)) — リモート例外(ã™ãªã‚ã¡ã€åˆ†æ•£ã‚¯ã‚¨ãƒªã®ä¸€ã¤ã§å—ã‘å–られãŸã‚‚ã®ï¼‰ã€‚ + +**例** + +``` sql +SELECT * FROM system.error_log LIMIT 1 FORMAT Vertical; +``` + +``` text +Row 1: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2024-06-18 +event_time: 2024-06-18 07:32:39 +code: 999 +error: KEEPER_EXCEPTION +value: 2 +remote: 0 +``` + +**関連項目** + +- [error_log 設定](../../operations/server-configuration-parameters/settings.md#error_log) — 設定ã®æœ‰åŠ¹åŒ–ãŠã‚ˆã³ç„¡åŠ¹åŒ–ã«ã¤ã„ã¦ã€‚ +- [system.errors](../../operations/system-tables/errors.md) — エラーコードã¨ãã‚ŒãŒãƒˆãƒªã‚¬ãƒ¼ã•ã‚ŒãŸå›žæ•°ã‚’å«ã‚€ã€‚ +- [監視](../../operations/monitoring.md) — ClickHouseã®ç›£è¦–ã®åŸºæœ¬æ¦‚念。 diff --git a/docs/ja/operations/system-tables/errors.md b/docs/ja/operations/system-tables/errors.md new file mode 100644 index 00000000000..55907d04302 --- /dev/null +++ b/docs/ja/operations/system-tables/errors.md @@ -0,0 +1,42 @@ +--- +slug: /ja/operations/system-tables/errors +--- +# errors + +エラーコードã¨ãã®ç™ºç”Ÿå›žæ•°ã‚’å«ã¿ã¾ã™ã€‚ + +カラム: + +- `name` ([String](../../sql-reference/data-types/string.md)) — エラーã®åå‰ (`errorCodeToName`)。 +- `code` ([Int32](../../sql-reference/data-types/int-uint.md)) — エラーã®ã‚³ãƒ¼ãƒ‰ç•ªå·ã€‚ +- `value` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ã“ã®ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå›žæ•°ã€‚ +- `last_error_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — 最後ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸæ™‚刻。 +- `last_error_message` ([String](../../sql-reference/data-types/string.md)) — 最後ã®ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€‚ +- `last_error_trace` ([Array(UInt64)](../../sql-reference/data-types/array.md)) — 呼ã³å‡ºã•ã‚ŒãŸãƒ¡ã‚½ãƒƒãƒ‰ãŒä¿å­˜ã•ã‚Œã¦ã„る物ç†ã‚¢ãƒ‰ãƒ¬ã‚¹ã®ãƒªã‚¹ãƒˆã‚’表ã™[スタックトレース](https://en.wikipedia.org/wiki/Stack_trace)。 +- `remote` ([UInt8](../../sql-reference/data-types/int-uint.md)) — リモート例外(ã™ãªã‚ã¡ã€åˆ†æ•£ã‚¯ã‚¨ãƒªã®ä¸€ã¤ã§å—ã‘å–られãŸã‚‚ã®ï¼‰ã€‚ + +:::note +ã„ãã¤ã‹ã®ã‚¨ãƒ©ãƒ¼ã®ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã¯ã€ã‚¯ã‚¨ãƒªãŒæ­£å¸¸ã«å®Ÿè¡Œã•ã‚ŒãŸå ´åˆã§ã‚‚増加ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚該当ã™ã‚‹ã‚¨ãƒ©ãƒ¼ãŒèª¤æ¤œçŸ¥ã§ãªã„ã¨ç¢ºä¿¡ã—ãªã„é™ã‚Šã€ã“ã®ãƒ†ãƒ¼ãƒ–ルをサーãƒãƒ¼ç›£è¦–ã®ç›®çš„ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 +::: + +**例** + +``` sql +SELECT name, code, value +FROM system.errors +WHERE value > 0 +ORDER BY code ASC +LIMIT 1 + +┌─name─────────────┬─code─┬─value─┠+│ CANNOT_OPEN_FILE │ 76 │ 1 │ +└──────────────────┴──────┴───────┘ +``` + +``` sql +WITH arrayMap(x -> demangle(addressToSymbol(x)), last_error_trace) AS all +SELECT name, arrayStringConcat(all, '\n') AS res +FROM system.errors +LIMIT 1 +SETTINGS allow_introspection_functions=1\G +``` diff --git a/docs/ja/operations/system-tables/events.md b/docs/ja/operations/system-tables/events.md new file mode 100644 index 00000000000..a3f95611133 --- /dev/null +++ b/docs/ja/operations/system-tables/events.md @@ -0,0 +1,38 @@ +--- +slug: /ja/operations/system-tables/events +--- +# events + +システムã§ç™ºç”Ÿã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã®æ•°ã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚例ãˆã°ã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã§ã¯ã€ClickHouseサーãƒãƒ¼ãŒèµ·å‹•ã—ã¦ã‹ã‚‰å‡¦ç†ã•ã‚ŒãŸ`SELECT`クエリã®æ•°ã‚’確èªã§ãã¾ã™ã€‚ + +カラム: + +- `event` ([String](../../sql-reference/data-types/string.md)) — イベントå。 +- `value` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 発生ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã®æ•°ã€‚ +- `description` ([String](../../sql-reference/data-types/string.md)) — イベントã®èª¬æ˜Žã€‚ +- `name` ([String](../../sql-reference/data-types/string.md)) — `event`ã®åˆ¥å。 + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ« [src/Common/ProfileEvents.cpp](https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/ProfileEvents.cpp) ã§ç¢ºèªã§ãã¾ã™ã€‚ + +**例** + +``` sql +SELECT * FROM system.events LIMIT 5 +``` + +``` text +┌─event─────────────────────────────────┬─value─┬─description────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ Query │ 12 │ クエリを解釈ã—ã€å®Ÿè¡Œã•ã‚Œã‚‹å¯èƒ½æ€§ã®ã‚るクエリã®æ•°ã€‚パースã«å¤±æ•—ã—ãŸã‚¯ã‚¨ãƒªã‚„ã€ASTサイズ制é™ã€ã‚¯ã‚©ãƒ¼ã‚¿åˆ¶é™ã€åŒæ™‚実行クエリ数ã®åˆ¶é™ã«ã‚ˆã‚Šæ‹’å¦ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã¯å«ã¾ã‚Œã¾ã›ã‚“。ClickHouse自身ã«ã‚ˆã£ã¦é–‹å§‹ã•ã‚ŒãŸå†…部クエリをå«ã‚€å ´åˆãŒã‚ã‚Šã¾ã™ã€‚サブクエリã¯ã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã›ã‚“。 │ +│ SelectQuery │ 8 │ Queryã¨åŒã˜ã§ã™ãŒã€SELECTクエリã®ã¿ã§ã™ã€‚ │ +│ FileOpen │ 73 │ é–‹ã‹ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã€‚ │ +│ ReadBufferFromFileDescriptorRead │ 155 │ ファイルディスクリプタã‹ã‚‰ã®èª­ã¿è¾¼ã¿ï¼ˆread/pread)ã®æ•°ã€‚ソケットã¯å«ã¾ã‚Œã¾ã›ã‚“。 │ +│ ReadBufferFromFileDescriptorReadBytes │ 9931 │ ファイルディスクリプタã‹ã‚‰èª­ã¿å–られãŸãƒã‚¤ãƒˆæ•°ã€‚ファイルãŒåœ§ç¸®ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã‚Œã¯åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã‚’示ã—ã¾ã™ã€‚ │ +└───────────────────────────────────────┴───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +**関連項目** + +- [system.asynchronous_metrics](../../operations/system-tables/asynchronous_metrics.md#system_tables-asynchronous_metrics) — 定期的ã«è¨ˆç®—ã•ã‚Œã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ +- [system.metrics](../../operations/system-tables/metrics.md#system_tables-metrics) — 瞬時ã«è¨ˆç®—ã•ã‚Œã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ +- [system.metric_log](../../operations/system-tables/metric_log.md#system_tables-metric_log) — テーブル `system.metrics` 㨠`system.events` ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹å€¤ã®å±¥æ­´ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ +- [Monitoring](../../operations/monitoring.md) — ClickHouseモニタリングã®åŸºæœ¬æ¦‚念。 diff --git a/docs/ja/operations/system-tables/functions.md b/docs/ja/operations/system-tables/functions.md new file mode 100644 index 00000000000..912fae37616 --- /dev/null +++ b/docs/ja/operations/system-tables/functions.md @@ -0,0 +1,39 @@ +--- +slug: /ja/operations/system-tables/functions +--- +# functions + +通常ã®é–¢æ•°ã¨é›†è¨ˆé–¢æ•°ã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +カラム: + +- `name` ([String](../../sql-reference/data-types/string.md)) – 関数ã®åå‰ã€‚ +- `is_aggregate` ([UInt8](../../sql-reference/data-types/int-uint.md)) — 関数ãŒé›†è¨ˆé–¢æ•°ã§ã‚ã‚‹ã‹ã©ã†ã‹ã€‚ +- `case_insensitive`, ([UInt8](../../sql-reference/data-types/int-uint.md)) - 関数åãŒå¤§æ–‡å­—å°æ–‡å­—を区別ã›ãšã«ä½¿ç”¨ã§ãã‚‹ã‹ã©ã†ã‹ã€‚ +- `alias_to`, ([String](../../sql-reference/data-types/string.md)) - 関数åãŒã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã‚ã‚‹å ´åˆã®å…ƒã®é–¢æ•°å。 +- `create_query`, ([String](../../sql-reference/data-types/enum.md)) - 未使用。 +- `origin`, ([Enum8](../../sql-reference/data-types/string.md)) - 未使用。 +- `description`, ([String](../../sql-reference/data-types/string.md)) - 関数ãŒä½•ã‚’ã™ã‚‹ã‹ã®é«˜ãƒ¬ãƒ™ãƒ«ãªèª¬æ˜Žã€‚ +- `syntax`, ([String](../../sql-reference/data-types/string.md)) - 関数ã®ã‚·ã‚°ãƒãƒãƒ£ã€‚ +- `arguments`, ([String](../../sql-reference/data-types/string.md)) - 関数ãŒå–る引数。 +- `returned_value`, ([String](../../sql-reference/data-types/string.md)) - 関数ãŒè¿”ã™å€¤ã€‚ +- `examples`, ([String](../../sql-reference/data-types/string.md)) - 関数ã®ä½¿ç”¨ä¾‹ã€‚ +- `categories`, ([String](../../sql-reference/data-types/string.md)) - 関数ã®ã‚«ãƒ†ã‚´ãƒªãƒ¼ã€‚ + +**例** + +```sql + SELECT name, is_aggregate, is_deterministic, case_insensitive, alias_to FROM system.functions LIMIT 5; +``` + +```text +┌─name─────────────────────┬─is_aggregate─┬─is_deterministic─┬─case_insensitive─┬─alias_to─┠+│ BLAKE3 │ 0 │ 1 │ 0 │ │ +│ sipHash128Reference │ 0 │ 1 │ 0 │ │ +│ mapExtractKeyLike │ 0 │ 1 │ 0 │ │ +│ sipHash128ReferenceKeyed │ 0 │ 1 │ 0 │ │ +│ mapPartialSort │ 0 │ 1 │ 0 │ │ +└──────────────────────────┴──────────────┴──────────────────┴──────────────────┴──────────┘ + +5 rows in set. Elapsed: 0.002 sec. +``` diff --git a/docs/ja/operations/system-tables/grants.md b/docs/ja/operations/system-tables/grants.md new file mode 100644 index 00000000000..600399f7894 --- /dev/null +++ b/docs/ja/operations/system-tables/grants.md @@ -0,0 +1,25 @@ +--- +slug: /ja/operations/system-tables/grants +--- +# grants + +ClickHouseユーザーアカウントã«ä»˜ä¸Žã•ã‚ŒãŸç‰¹æ¨©ã€‚ + +カラム: +- `user_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ユーザーå。 + +- `role_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ユーザーアカウントã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã€‚ + +- `access_type` ([Enum8](../../sql-reference/data-types/enum.md)) — ClickHouseユーザーアカウントã®ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ラメーター。 + +- `database` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — データベースã®åå‰ã€‚ + +- `table` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — テーブルã®åå‰ã€‚ + +- `column` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — アクセスãŒè¨±å¯ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®åå‰ã€‚ + +- `is_partial_revoke` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — è«–ç†å€¤ã€‚ã„ãã¤ã‹ã®ç‰¹æ¨©ãŒå–り消ã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚å¯èƒ½ãªå€¤: +- `0` — è¡Œã¯ä»˜ä¸Žã‚’示ã—ã¾ã™ã€‚ +- `1` — è¡Œã¯éƒ¨åˆ†çš„ãªå–り消ã—を示ã—ã¾ã™ã€‚ + +- `grant_option` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `WITH GRANT OPTION`ã¨ã¨ã‚‚ã«è¨±å¯ãŒä»˜ä¸Žã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚[GRANT](../../sql-reference/statements/grant.md#granting-privilege-syntax)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/operations/system-tables/graphite_retentions.md b/docs/ja/operations/system-tables/graphite_retentions.md new file mode 100644 index 00000000000..3d0b89ffffd --- /dev/null +++ b/docs/ja/operations/system-tables/graphite_retentions.md @@ -0,0 +1,18 @@ +--- +slug: /ja/operations/system-tables/graphite_retentions +--- +# graphite_retentions + +[graphite_rollup](../../operations/server-configuration-parameters/settings.md#graphite)パラメータã®æƒ…報をå«ã‚“ã§ãŠã‚Šã€[\*GraphiteMergeTree](../../engines/table-engines/mergetree-family/graphitemergetree.md)エンジンを使用ã—ãŸãƒ†ãƒ¼ãƒ–ルã§åˆ©ç”¨ã•ã‚Œã¾ã™ã€‚ + +カラム: + +- `config_name` (String) - `graphite_rollup`パラメータå。 +- `regexp` (String) - メトリックåã®ãƒ‘ターン。 +- `function` (String) - 集約関数ã®åå‰ã€‚ +- `age` (UInt64) - データãŒå­˜åœ¨ã™ã‚‹æœ€ä½Žå¹´é½¢ï¼ˆç§’å˜ä½ï¼‰ã€‚ +- `precision` (UInt64) - データã®å¹´é½¢ã‚’秒å˜ä½ã§ã©ã‚Œã ã‘正確ã«å®šç¾©ã™ã‚‹ã‹ã€‚ +- `priority` (UInt16) - パターンã®å„ªå…ˆåº¦ã€‚ +- `is_default` (UInt8) - パターンãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚ã‚‹ã‹ã©ã†ã‹ã€‚ +- `Tables.database` (Array(String)) - `config_name`パラメータを使用ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã®åå‰ã®é…列。 +- `Tables.table` (Array(String)) - `config_name`パラメータを使用ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルåã®é…列。 diff --git a/docs/ja/operations/system-tables/index.md b/docs/ja/operations/system-tables/index.md new file mode 100644 index 00000000000..52cc94c0470 --- /dev/null +++ b/docs/ja/operations/system-tables/index.md @@ -0,0 +1,90 @@ +--- +slug: /ja/operations/system-tables/ +sidebar_position: 52 +sidebar_label: æ¦‚è¦ +pagination_next: 'en/operations/system-tables/asynchronous_metric_log' +--- + +# システムテーブル + +## ã¯ã˜ã‚ã« {#system-tables-introduction} + +システムテーブルã¯æ¬¡ã®æƒ…報をæä¾›ã—ã¾ã™ï¼š + +- サーãƒãƒ¼ã®çŠ¶æ…‹ã€ãƒ—ロセスã€ç’°å¢ƒã€‚ +- サーãƒãƒ¼ã®å†…部プロセス。 +- ClickHouseãƒã‚¤ãƒŠãƒªãŒãƒ“ルドã•ã‚ŒãŸã¨ãã®ã‚ªãƒ—ション。 + +システムテーブル: + +- `system`データベースã«é…ç½®ã•ã‚Œã¦ã„ã¾ã™ã€‚ +- データã®èª­ã¿å–り専用ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ +- 削除や変更ã¯ã§ãã¾ã›ã‚“ãŒã€ãƒ‡ã‚¿ãƒƒãƒã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ + +ã»ã¨ã‚“ã©ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã¯ãã®ãƒ‡ãƒ¼ã‚¿ã‚’RAMã«ä¿å­˜ã—ã¾ã™ã€‚ClickHouseサーãƒãƒ¼ã¯èµ·å‹•æ™‚ã«ãã®ã‚ˆã†ãªã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ + +ä»–ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã¨ã¯ç•°ãªã‚Šã€ã‚·ã‚¹ãƒ†ãƒ ãƒ­ã‚°ãƒ†ãƒ¼ãƒ–ルã§ã‚ã‚‹[metric_log](../../operations/system-tables/metric_log.md)ã€[query_log](../../operations/system-tables/query_log.md)ã€[query_thread_log](../../operations/system-tables/query_thread_log.md)ã€[trace_log](../../operations/system-tables/trace_log.md)ã€[part_log](../../operations/system-tables/part_log.md)ã€[crash_log](../../operations/system-tables/crash-log.md)ã€[text_log](../../operations/system-tables/text_log.md)ã€[backup_log](../../operations/system-tables/backup_log.md)ã¯ã€[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md)テーブルエンジンã«ã‚ˆã£ã¦æä¾›ã•ã‚Œã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ãƒ‡ãƒ¼ã‚¿ã‚’ファイルシステムã«ä¿å­˜ã—ã¾ã™ã€‚ファイルシステムã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルを削除ã™ã‚‹ã¨ã€æ¬¡å›žã®ãƒ‡ãƒ¼ã‚¿æ›¸ãè¾¼ã¿æ™‚ã«ClickHouseサーãƒãƒ¼ãŒæ–°ã—ã„空ã®ãƒ†ãƒ¼ãƒ–ルをå†ä½œæˆã—ã¾ã™ã€‚æ–°ã—ã„リリースã§ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ã‚­ãƒ¼ãƒžãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã€ClickHouseã¯ç¾åœ¨ã®ãƒ†ãƒ¼ãƒ–ルã®åå‰ã‚’変更ã—ã€æ–°ã—ã„ã‚‚ã®ã‚’作æˆã—ã¾ã™ã€‚ + +システムログテーブルã¯ã€`/etc/clickhouse-server/config.d/`ã«ãƒ†ãƒ¼ãƒ–ルã¨åŒã˜åå‰ã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã™ã‚‹ã‹ã€`/etc/clickhouse-server/config.xml`ã«å¯¾å¿œã™ã‚‹è¦ç´ ã‚’設定ã™ã‚‹ã“ã¨ã§ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã§ãã¾ã™ã€‚カスタマイズå¯èƒ½ãªè¦ç´ ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +- `database`: システムログテーブルãŒå±žã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚ã“ã®ã‚ªãƒ—ションã¯ç¾åœ¨éžæŽ¨å¥¨ã§ã™ã€‚ã™ã¹ã¦ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ­ã‚°ãƒ†ãƒ¼ãƒ–ル㯠`system` データベースã«ã‚ã‚Šã¾ã™ã€‚ +- `table`: データを挿入ã™ã‚‹ãƒ†ãƒ¼ãƒ–ル。 +- `partition_by`: [PARTITION BY](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)å¼ã‚’指定ã—ã¾ã™ã€‚ +- `ttl`: テーブルã®[æœ‰åŠ¹æœŸé™ (TTL)](../../sql-reference/statements/alter/ttl.md)å¼ã‚’指定ã—ã¾ã™ã€‚ +- `flush_interval_milliseconds`: ディスクã¸ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã®é–“隔を設定ã—ã¾ã™ã€‚ +- `engine`: パラメータをå«ã‚€å®Œå…¨ãªã‚¨ãƒ³ã‚¸ãƒ³å¼ï¼ˆ`ENGINE =` ã‹ã‚‰å§‹ã¾ã‚‹ï¼‰ã‚’指定ã—ã¾ã™ã€‚ã“ã®ã‚ªãƒ—ション㯠`partition_by` ãŠã‚ˆã³ `ttl` ã¨è¡çªã—ã¾ã™ã€‚両方ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯ä¾‹å¤–を発生ã•ã›ã¦çµ‚了ã—ã¾ã™ã€‚ + +例: + +```xml + + + system + query_log
    + toYYYYMM(event_date) + event_date + INTERVAL 30 DAY DELETE + + 7500 + 1048576 + 8192 + 524288 + false +
    +
    +``` + +デフォルトã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®æˆé•·ã¯ç„¡åˆ¶é™ã§ã™ã€‚テーブルã®ã‚µã‚¤ã‚ºã‚’制御ã™ã‚‹ã«ã¯ã€å¤ã„ログレコードを削除ã™ã‚‹ãŸã‚ã«[TTL](../../sql-reference/statements/alter/ttl.md#manipulations-with-table-ttl)設定を使用ã§ãã¾ã™ã€‚ã¾ãŸã€`MergeTree` エンジンテーブルã®ãƒ‘ーティショニング機能を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## システムメトリックã®æƒ…å ±æº {#system-tables-sources-of-system-metrics} + +システムメトリックをåŽé›†ã™ã‚‹ãŸã‚ã«ClickHouseサーãƒãƒ¼ã¯æ¬¡ã‚’使用ã—ã¾ã™ï¼š + +- `CAP_NET_ADMIN`ã®æ¨©é™ã€‚ +- [procfs](https://en.wikipedia.org/wiki/Procfs)(Linuxã®ã¿ï¼‰ã€‚ + +**procfs** + +ClickHouseサーãƒãƒ¼ãŒ`CAP_NET_ADMIN`ã®æ¨©é™ã‚’æŒã£ã¦ã„ãªã„å ´åˆã€`ProcfsMetricsProvider`ã«ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—よã†ã¨ã—ã¾ã™ã€‚`ProcfsMetricsProvider`ã¯ã€CPUãŠã‚ˆã³I/Oã®ã‚¯ã‚¨ãƒªã”ã¨ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’åŽé›†ã—ã¾ã™ã€‚ + +システムã§procfsãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã€æœ‰åŠ¹åŒ–ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseサーãƒãƒ¼ã¯ã“れらã®ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’åŽé›†ã—ã¾ã™ï¼š + +- `OSCPUVirtualTimeMicroseconds` +- `OSCPUWaitMicroseconds` +- `OSIOWaitMicroseconds` +- `OSReadChars` +- `OSWriteChars` +- `OSReadBytes` +- `OSWriteBytes` + +:::note +Linuxカーãƒãƒ«ã®5.14.x以é™ã§ã¯ã€`OSIOWaitMicroseconds`ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã§ã™ã€‚ +`sudo sysctl kernel.task_delayacct=1`を使用ã™ã‚‹ã‹ã€`/etc/sysctl.d/`内ã«`.conf`ファイルを作æˆã—ã€`kernel.task_delayacct = 1`ã¨è¨­å®šã—ã¦æœ‰åŠ¹ã«ã§ãã¾ã™ã€‚ +::: + +## 関連コンテンツ + +- ブログ: [ClickHouseã®å†…部を視覚化ã™ã‚‹ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル](https://clickhouse.com/blog/clickhouse-debugging-issues-with-system-tables) +- ブログ: [é‡è¦ãªç›£è¦–クエリ - パート1 - INSERTクエリ](https://clickhouse.com/blog/monitoring-troubleshooting-insert-queries-clickhouse) +- ブログ: [é‡è¦ãªç›£è¦–クエリ - パート2 - SELECTクエリ](https://clickhouse.com/blog/monitoring-troubleshooting-select-queries-clickhouse) diff --git a/docs/ja/operations/system-tables/information_schema.md b/docs/ja/operations/system-tables/information_schema.md new file mode 100644 index 00000000000..91155be116d --- /dev/null +++ b/docs/ja/operations/system-tables/information_schema.md @@ -0,0 +1,400 @@ +--- +slug: /ja/operations/system-tables/information_schema +--- +# INFORMATION_SCHEMA + +`INFORMATION_SCHEMA`(ã¾ãŸã¯`information_schema`)ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚ªãƒ–ジェクトã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«é–¢ã™ã‚‹ï¼ˆå¤šå°‘)標準化ã•ã‚ŒãŸ[DBMSã«ä¾å­˜ã—ãªã„ビュー](https://en.wikipedia.org/wiki/Information_schema)ã‚’æä¾›ã™ã‚‹ã‚·ã‚¹ãƒ†ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã™ã€‚`INFORMATION_SCHEMA`ã®ãƒ“ューã¯é€šå¸¸ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã«æ¯”ã¹ã¦æ€§èƒ½ãŒåŠ£ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ãŒã€ãƒ„ールã¯ã“れを使用ã—ã¦è¤‡æ•°ã®DBMSã«ã¾ãŸãŒã£ã¦åŸºæœ¬æƒ…報をå–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`INFORMATION_SCHEMA`内ã®ãƒ“ューã®æ§‹é€ ã¨å†…容ã¯å¾Œæ–¹äº’æ›æ€§ã‚’æŒã¡ãªãŒã‚‰é€²åŒ–ã™ã‚‹ã“ã¨ãŒæƒ³å®šã•ã‚Œã¦ãŠã‚Šã€æ–°ã—ã„機能ãŒè¿½åŠ ã•ã‚Œã‚‹ã ã‘ã§ã€æ—¢å­˜ã®æ©Ÿèƒ½ã¯å¤‰æ›´ã•ã‚ŒãŸã‚Šå‰Šé™¤ã•ã‚ŒãŸã‚Šã—ã¾ã›ã‚“。内部実装ã«é–¢ã—ã¦ã¯ã€`INFORMATION_SCHEMA`内ã®ãƒ“ューã¯é€šå¸¸ã€[system.columns](../../operations/system-tables/columns.md)ã€[system.databases](../../operations/system-tables/databases.md)ã€ãã—ã¦[system.tables](../../operations/system-tables/tables.md)ã®ã‚ˆã†ãªé€šå¸¸ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚ + +``` sql +SHOW TABLES FROM INFORMATION_SCHEMA; + +-- ã¾ãŸã¯ï¼š +SHOW TABLES FROM information_schema; +``` + +``` text +┌─name────────────────────┠+│ COLUMNS │ +│ KEY_COLUMN_USAGE │ +│ REFERENTIAL_CONSTRAINTS │ +│ SCHEMATA │ +| STATISTICS | +│ TABLES │ +│ VIEWS │ +│ columns │ +│ key_column_usage │ +│ referential_constraints │ +│ schemata │ +| statistics | +│ tables │ +│ views │ +└─────────────────────────┘ +``` + +`INFORMATION_SCHEMA`ã«ã¯ä»¥ä¸‹ã®ãƒ“ューãŒå«ã¾ã‚Œã¾ã™ï¼š + +- [COLUMNS](#columns) +- [KEY_COLUMN_USAGE](#key_column_usage) +- [REFERENTIAL_CONSTRAINTS](#referential_constraints) +- [SCHEMATA](#schemata) +- [STATISTICS](#statistics) +- [TABLES](#tables) +- [VIEWS](#views) + +互æ›æ€§ã®ãŸã‚ã€å¤§æ–‡å­—ã¨å°æ–‡å­—を区別ã—ãªã„等価ãªãƒ“ューã€ä¾‹ï¼š`INFORMATION_SCHEMA.columns`ãŒæä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ã“ã¨ã¯ã€ã“れらã®ãƒ“ュー内ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã«ã‚‚当ã¦ã¯ã¾ã‚Šã€å°æ–‡å­—(例:`table_name`)ã¨å¤§æ–‡å­—(例:`TABLE_NAME`)ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒæä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## COLUMNS {#columns} + +[system.columns](../../operations/system-tables/columns.md)システムテーブルã‹ã‚‰èª­ã¿å–ã£ãŸã‚«ãƒ©ãƒ ã¨ã€ClickHouseã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ã‹ã€æ„味をãªã•ãªã„(常ã«`NULL`)ãŒã€æ¨™æº–ã«ã‚ˆã£ã¦å¿…è¦ãªã‚«ãƒ©ãƒ ã‚’å«ã¿ã¾ã™ã€‚ + +カラム: + +- `table_catalog` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒæ‰€åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `table_schema` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒæ‰€åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `table_name` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 +- `column_name` ([String](../../sql-reference/data-types/string.md)) — カラムå。 +- `ordinal_position` ([UInt64](../../sql-reference/data-types/int-uint.md)) — カラムãŒãƒ†ãƒ¼ãƒ–ル内ã§ä½•ç•ªç›®ã«ã‚ã‚‹ã‹ã‚’示ã™ä½ç½®ã€‚1ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ +- `column_default` ([String](../../sql-reference/data-types/string.md)) — デフォルト値ã®å¼ã€ã¾ãŸã¯å®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ç©ºæ–‡å­—列。 +- `is_nullable` ([UInt8](../../sql-reference/data-types/int-uint.md)) — カラムタイプãŒ`Nullable`ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `data_type` ([String](../../sql-reference/data-types/string.md)) — カラムタイプ。 +- `character_maximum_length` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã€æ–‡å­—データã€ã¾ãŸã¯ãƒ†ã‚­ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãŠã‚ˆã³ç”»åƒã®æœ€å¤§é•·ï¼ˆãƒã‚¤ãƒˆï¼‰ã€‚ClickHouseã§ã¯`FixedString`データタイプã«ã®ã¿æ„味をæŒã¡ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯`NULL`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `character_octet_length` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã€æ–‡å­—データã€ã¾ãŸã¯ãƒ†ã‚­ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãŠã‚ˆã³ç”»åƒã®æœ€å¤§é•·ï¼ˆãƒã‚¤ãƒˆï¼‰ã€‚ClickHouseã§ã¯`FixedString`データタイプã«ã®ã¿æ„味をæŒã¡ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯`NULL`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `numeric_precision` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — 近似的ã¾ãŸã¯æ­£ç¢ºãªæ•°å€¤ãƒ‡ãƒ¼ã‚¿ã€æ•´æ•°ãƒ‡ãƒ¼ã‚¿ã€ã¾ãŸã¯é‡‘é¡ãƒ‡ãƒ¼ã‚¿ã®ç²¾åº¦ã€‚ClickHouseã§ã¯æ•´æ•°åž‹ã®ãƒ“ット幅ãŠã‚ˆã³`Decimal`åž‹ã®ç²¾åº¦ã€‚ãã®ä»–ã®å ´åˆã¯`NULL`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `numeric_precision_radix` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — 近似的ã¾ãŸã¯æ­£ç¢ºãªæ•°å€¤ãƒ‡ãƒ¼ã‚¿ã€æ•´æ•°ãƒ‡ãƒ¼ã‚¿ã¾ãŸã¯é‡‘é¡ãƒ‡ãƒ¼ã‚¿ã®ç²¾åº¦ã®åŸºã€‚ClickHouseã§ã¯æ•´æ•°åž‹ã®åŸºãŒ2ã€`Decimal`åž‹ã®åŸºãŒ10ã§ã™ã€‚ãã®ä»–ã®å ´åˆã¯`NULL`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `numeric_scale` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — 近似的ã¾ãŸã¯æ­£ç¢ºãªæ•°å€¤ãƒ‡ãƒ¼ã‚¿ã€æ•´æ•°ãƒ‡ãƒ¼ã‚¿ã€ã¾ãŸã¯é‡‘é¡ãƒ‡ãƒ¼ã‚¿ã®ã‚¹ã‚±ãƒ¼ãƒ«ã€‚ClickHouseã§ã¯`Decimal`åž‹ã«ã®ã¿æ„味ãŒã‚ã‚Šã¾ã™ã€‚ãれ以外ã®å ´åˆã¯`NULL`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `datetime_precision` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — `DateTime64`データタイプã®å°æ•°ã®ç²¾åº¦ã€‚ãã®ä»–ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®å ´åˆã¯`NULL`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `character_set_catalog` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `character_set_schema` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `character_set_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `collation_catalog` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `collation_schema` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `collation_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `domain_catalog` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `domain_schema` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `domain_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `extra` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `MATERIALIZED`型カラムã®å ´åˆã¯`STORED GENERATED`ã€`ALIAS`型カラムã®å ´åˆã¯`VIRTUAL GENERATED`ã€`DEFAULT`型カラムã®å ´åˆã¯`DEFAULT_GENERATED`ã€ã¾ãŸã¯`NULL`。 + +**例** + +クエリ: + +``` sql +SELECT table_catalog, + table_schema, + table_name, + column_name, + ordinal_position, + column_default, + is_nullable, + data_type, + character_maximum_length, + character_octet_length, + numeric_precision, + numeric_precision_radix, + numeric_scale, + datetime_precision, + character_set_catalog, + character_set_schema, + character_set_name, + collation_catalog, + collation_schema, + collation_name, + domain_catalog, + domain_schema, + domain_name, + column_comment, + column_type +FROM INFORMATION_SCHEMA.COLUMNS +WHERE (table_schema = currentDatabase() OR table_schema = '') + AND table_name NOT LIKE '%inner%' +LIMIT 1 +FORMAT Vertical; +``` + +çµæžœï¼š + +``` text +Row 1: +────── +table_catalog: default +table_schema: default +table_name: describe_example +column_name: id +ordinal_position: 1 +column_default: +is_nullable: 0 +data_type: UInt64 +character_maximum_length: á´ºáµá´¸á´¸ +character_octet_length: á´ºáµá´¸á´¸ +numeric_precision: 64 +numeric_precision_radix: 2 +numeric_scale: 0 +datetime_precision: á´ºáµá´¸á´¸ +character_set_catalog: á´ºáµá´¸á´¸ +character_set_schema: á´ºáµá´¸á´¸ +character_set_name: á´ºáµá´¸á´¸ +collation_catalog: á´ºáµá´¸á´¸ +collation_schema: á´ºáµá´¸á´¸ +collation_name: á´ºáµá´¸á´¸ +domain_catalog: á´ºáµá´¸á´¸ +domain_schema: á´ºáµá´¸á´¸ +domain_name: á´ºáµá´¸á´¸ +``` + +## SCHEMATA {#schemata} + +[system.databases](../../operations/system-tables/databases.md)システムテーブルã‹ã‚‰èª­ã¿å–ã£ãŸã‚«ãƒ©ãƒ ã‚’å«ã¿ã€ClickHouseã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ã‹ã€æ„味をãªã•ãªã„(常ã«`NULL`)ãŒæ¨™æº–ã«ã‚ˆã£ã¦å¿…è¦ãªã‚«ãƒ©ãƒ ã‚’å«ã¿ã¾ã™ã€‚ + +カラム: + +- `catalog_name` ([String](../../sql-reference/data-types/string.md)) — データベースã®åå‰ã€‚ +- `schema_name` ([String](../../sql-reference/data-types/string.md)) — データベースã®åå‰ã€‚ +- `schema_owner` ([String](../../sql-reference/data-types/string.md)) — スキーマã®æ‰€æœ‰è€…å。常ã«`'default'`。 +- `default_character_set_catalog` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `default_character_set_schema` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `default_character_set_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `sql_path` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +**例** + +クエリ: + +``` sql +SELECT catalog_name, + schema_name, + schema_owner, + default_character_set_catalog, + default_character_set_schema, + default_character_set_name, + sql_path +FROM information_schema.schemata +WHERE schema_name ilike 'information_schema' +LIMIT 1 +FORMAT Vertical; +``` + +çµæžœï¼š + +``` text +Row 1: +────── +catalog_name: INFORMATION_SCHEMA +schema_name: INFORMATION_SCHEMA +schema_owner: default +default_character_set_catalog: á´ºáµá´¸á´¸ +default_character_set_schema: á´ºáµá´¸á´¸ +default_character_set_name: á´ºáµá´¸á´¸ +sql_path: á´ºáµá´¸á´¸ +``` + +## TABLES {#tables} + +[system.tables](../../operations/system-tables/tables.md)システムテーブルã‹ã‚‰èª­ã¿å–ã£ãŸã‚«ãƒ©ãƒ ã‚’å«ã¿ã¾ã™ã€‚ + +カラム: + +- `table_catalog` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒæ‰€åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `table_schema` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒæ‰€åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `table_name` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 +- `table_type` ([String](../../sql-reference/data-types/string.md)) — テーブルタイプ。å¯èƒ½ãªå€¤ï¼š + - `BASE TABLE` + - `VIEW` + - `FOREIGN TABLE` + - `LOCAL TEMPORARY` + - `SYSTEM VIEW` +- `table_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — è¡Œã®ç·æ•°ã€‚NULLã®å ´åˆã€æ±ºå®šã§ããªã‹ã£ãŸã“ã¨ã‚’示ã—ã¾ã™ã€‚ +- `data_length` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ディスク上ã«ãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºã€‚NULLã®å ´åˆã€æ±ºå®šã§ããªã‹ã£ãŸã“ã¨ã‚’示ã—ã¾ã™ã€‚ +- `table_collation` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — テーブルã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆç…§åˆé †åºã€‚常ã«`utf8mb4_0900_ai_ci`。 +- `table_comment` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — テーブル作æˆæ™‚ã«ä½¿ç”¨ã•ã‚ŒãŸã‚³ãƒ¡ãƒ³ãƒˆã€‚ + +**例** + +クエリ: + +``` sql +SELECT table_catalog, + table_schema, + table_name, + table_type, + table_collation, + table_comment +FROM INFORMATION_SCHEMA.TABLES +WHERE (table_schema = currentDatabase() OR table_schema = '') + AND table_name NOT LIKE '%inner%' +LIMIT 1 +FORMAT Vertical; +``` + +çµæžœï¼š + +``` text +Row 1: +────── +table_catalog: default +table_schema: default +table_name: describe_example +table_type: BASE TABLE +table_collation: utf8mb4_0900_ai_ci +table_comment: +``` + +## VIEWS {#views} + +[system.tables](../../operations/system-tables/tables.md)システムテーブルã‹ã‚‰èª­ã¿å–ã£ãŸã‚«ãƒ©ãƒ ã§ã€ãƒ†ãƒ¼ãƒ–ルエンジン[View](../../engines/table-engines/special/view.md)ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€‚ + +カラム: + +- `table_catalog` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒæ‰€åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `table_schema` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒæ‰€åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `table_name` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 +- `view_definition` ([String](../../sql-reference/data-types/string.md)) — ビューã®`SELECT`クエリ。 +- `check_option` ([String](../../sql-reference/data-types/string.md)) — `NONE`ã€ãƒã‚§ãƒƒã‚¯ãªã—。 +- `is_updatable` ([Enum8](../../sql-reference/data-types/enum.md)) — `NO`ã€ãƒ“ューã¯æ›´æ–°ã•ã‚Œã¾ã›ã‚“。 +- `is_insertable_into` ([Enum8](../../sql-reference/data-types/enum.md)) — 作æˆã•ã‚ŒãŸãƒ“ューãŒ[マテリアライズド](../../sql-reference/statements/create/view.md/#materialized-view)ã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚å¯èƒ½ãªå€¤ï¼š + - `NO` — 作æˆã•ã‚ŒãŸãƒ“ューã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + - `YES` — 作æˆã•ã‚ŒãŸãƒ“ューã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ã§ã™ã€‚ +- `is_trigger_updatable` ([Enum8](../../sql-reference/data-types/enum.md)) — `NO`ã€ãƒˆãƒªã‚¬ãƒ¼ã¯æ›´æ–°ã•ã‚Œã¾ã›ã‚“。 +- `is_trigger_deletable` ([Enum8](../../sql-reference/data-types/enum.md)) — `NO`ã€ãƒˆãƒªã‚¬ãƒ¼ã¯å‰Šé™¤ã•ã‚Œã¾ã›ã‚“。 +- `is_trigger_insertable_into` ([Enum8](../../sql-reference/data-types/enum.md)) — `NO`ã€ãƒˆãƒªã‚¬ãƒ¼ã«ãƒ‡ãƒ¼ã‚¿ã¯æŒ¿å…¥ã•ã‚Œã¾ã›ã‚“。 + +**例** + +クエリ: + +``` sql +CREATE VIEW v (n Nullable(Int32), f Float64) AS SELECT n, f FROM t; +CREATE MATERIALIZED VIEW mv ENGINE = Null AS SELECT * FROM system.one; +SELECT table_catalog, + table_schema, + table_name, + view_definition, + check_option, + is_updatable, + is_insertable_into, + is_trigger_updatable, + is_trigger_deletable, + is_trigger_insertable_into +FROM information_schema.views +WHERE table_schema = currentDatabase() +LIMIT 1 +FORMAT Vertical; +``` + +çµæžœï¼š + +``` text +Row 1: +────── +table_catalog: default +table_schema: default +table_name: mv +view_definition: SELECT * FROM system.one +check_option: NONE +is_updatable: NO +is_insertable_into: YES +is_trigger_updatable: NO +is_trigger_deletable: NO +is_trigger_insertable_into: NO +``` + +## KEY_COLUMN_USAGE {#key_column_usage} + +制約ã«ã‚ˆã‚Šåˆ¶é™ã•ã‚ŒãŸ[system.tables](../../operations/system-tables/tables.md)システムテーブルã‹ã‚‰ã®ã‚«ãƒ©ãƒ ã‚’å«ã¿ã¾ã™ã€‚ + +カラム: + +- `constraint_catalog` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚常ã«`def`。 +- `constraint_schema` ([String](../../sql-reference/data-types/string.md)) — 制約ãŒå±žã™ã‚‹ã‚¹ã‚­ãƒ¼ãƒžï¼ˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ï¼‰ã®åå‰ã€‚ +- `constraint_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — 制約ã®åå‰ã€‚ +- `table_catalog` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚常ã«`def`。 +- `table_schema` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒå±žã™ã‚‹ã‚¹ã‚­ãƒ¼ãƒžï¼ˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ï¼‰ã®åå‰ã€‚ +- `table_name` ([String](../../sql-reference/data-types/string.md)) — 制約をæŒã¤ãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚ +- `column_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — 制約をæŒã¤ã‚«ãƒ©ãƒ ã®åå‰ã€‚ +- `ordinal_position` ([UInt32](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚常ã«`1`。 +- `position_in_unique_constraint` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt32](../../sql-reference/data-types/int-uint.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚常ã«`NULL`。 +- `referenced_table_schema` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚常ã«NULL。 +- `referenced_table_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚常ã«NULL。 +- `referenced_column_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚常ã«NULL。 + +**例** + +```sql +CREATE TABLE test (i UInt32, s String) ENGINE MergeTree ORDER BY i; +SELECT constraint_catalog, + constraint_schema, + constraint_name, + table_catalog, + table_schema, + table_name, + column_name, + ordinal_position, + position_in_unique_constraint, + referenced_table_schema, + referenced_table_name, + referenced_column_name +FROM information_schema.key_column_usage +WHERE table_name = 'test' +FORMAT Vertical; +``` + +çµæžœï¼š + +``` +Row 1: +────── +constraint_catalog: def +constraint_schema: default +constraint_name: PRIMARY +table_catalog: def +table_schema: default +table_name: test +column_name: i +ordinal_position: 1 +position_in_unique_constraint: á´ºáµá´¸á´¸ +referenced_table_schema: á´ºáµá´¸á´¸ +referenced_table_name: á´ºáµá´¸á´¸ +referenced_column_name: á´ºáµá´¸á´¸ +``` + +## REFERENTIAL_CONSTRAINTS {#referential_constraints} + +外部キーã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ç¾åœ¨ã€å¤–部ツール(例:Tableau Online)ã¨ã®äº’æ›æ€§ã‚’æä¾›ã™ã‚‹ã®ã«å分ãªç©ºã®çµæžœï¼ˆè¡Œãªã—)を返ã—ã¾ã™ã€‚ + +カラム: + +- `constraint_catalog` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `constraint_schema` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `constraint_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `unique_constraint_catalog` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `unique_constraint_schema` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `unique_constraint_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `match_option` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `update_rule` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `delete_rule` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `table_name` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `referenced_table_name` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ + +## STATISTICS {#statistics} + +テーブルã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«é–¢ã™ã‚‹æƒ…報をæä¾›ã—ã¾ã™ã€‚ç¾åœ¨ã¯ã€å¤–部ツール(例:Tableau Online)ã¨ã®äº’æ›æ€§ã‚’æä¾›ã™ã‚‹ã®ã«å分ãªç©ºã®çµæžœï¼ˆè¡Œãªã—)を返ã—ã¾ã™ã€‚ + +カラム: + +- `table_catalog` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `table_schema` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `table_name` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `non_unique` ([Int32](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `index_schema` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `index_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `seq_in_index` ([UInt32](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `column_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `collation` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `cardinality` ([Nullable](../../sql-reference/data-types/nullable.md)([Int64](../../sql-reference/data-types/int-uint.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `sub_part` ([Nullable](../../sql-reference/data-types/nullable.md)([Int64](../../sql-reference/data-types/int-uint.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `packed` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `nullable` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `index_type` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `comment` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `index_comment` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `is_visible` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ +- `expression` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ç¾åœ¨ã¯æœªä½¿ç”¨ã€‚ diff --git a/docs/ja/operations/system-tables/jemalloc_bins.md b/docs/ja/operations/system-tables/jemalloc_bins.md new file mode 100644 index 00000000000..747c6c83824 --- /dev/null +++ b/docs/ja/operations/system-tables/jemalloc_bins.md @@ -0,0 +1,44 @@ +--- +slug: /ja/operations/system-tables/jemalloc_bins +--- +# jemalloc_bins + +ã“ã‚Œã¯ã€jemalloc アロケーターã«ã‚ˆã‚‹ã•ã¾ã–ã¾ãªã‚µã‚¤ã‚ºã‚¯ãƒ©ã‚¹ (ビン) ã§ã®ãƒ¡ãƒ¢ãƒªã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã«é–¢ã™ã‚‹æƒ…報をã€ã™ã¹ã¦ã®ã‚¢ãƒªãƒ¼ãƒŠã‹ã‚‰é›†è¨ˆã—ãŸã‚‚ã®ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ã“れらã®çµ±è¨ˆæƒ…å ±ã¯ã€jemalloc ã«ãŠã‘るスレッドローカルキャッシュã®ãŸã‚ã€å¿…ãšã—も完全ã«æ­£ç¢ºã§ã¯ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +カラム: + +- `index` (UInt64) — サイズ順ã«ä¸¦ã¹ã‚‰ã‚ŒãŸãƒ“ンã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ +- `large` (Bool) — 大ããªã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®å ´åˆã¯ Trueã€å°ã•ãªå ´åˆã¯ False +- `size` (UInt64) — ã“ã®ãƒ“ンã®ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚µã‚¤ã‚º +- `allocations` (UInt64) — アロケーションã®æ•° +- `deallocations` (UInt64) — デアロケーションã®æ•° + +**例** + +ç¾åœ¨ã®å…¨ä½“çš„ãªãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã«æœ€ã‚‚貢献ã—ã¦ã„るアロケーションサイズを見ã¤ã‘る。 + +``` sql +SELECT + *, + allocations - deallocations AS active_allocations, + size * active_allocations AS allocated_bytes +FROM system.jemalloc_bins +WHERE allocated_bytes > 0 +ORDER BY allocated_bytes DESC +LIMIT 10 +``` + +``` text +┌─index─┬─large─┬─────size─┬─allocactions─┬─deallocations─┬─active_allocations─┬─allocated_bytes─┠+│ 82 │ 1 │ 50331648 │ 1 │ 0 │ 1 │ 50331648 │ +│ 10 │ 0 │ 192 │ 512336 │ 370710 │ 141626 │ 27192192 │ +│ 69 │ 1 │ 5242880 │ 6 │ 2 │ 4 │ 20971520 │ +│ 3 │ 0 │ 48 │ 16938224 │ 16559484 │ 378740 │ 18179520 │ +│ 28 │ 0 │ 4096 │ 122924 │ 119142 │ 3782 │ 15491072 │ +│ 61 │ 1 │ 1310720 │ 44569 │ 44558 │ 11 │ 14417920 │ +│ 39 │ 1 │ 28672 │ 1285 │ 913 │ 372 │ 10665984 │ +│ 4 │ 0 │ 64 │ 2837225 │ 2680568 │ 156657 │ 10026048 │ +│ 6 │ 0 │ 96 │ 2617803 │ 2531435 │ 86368 │ 8291328 │ +│ 36 │ 1 │ 16384 │ 22431 │ 21970 │ 461 │ 7553024 │ +└───────┴───────┴──────────┴──────────────┴───────────────┴────────────────────┴─────────────────┘ +``` diff --git a/docs/ja/operations/system-tables/kafka_consumers.md b/docs/ja/operations/system-tables/kafka_consumers.md new file mode 100644 index 00000000000..d30b3455273 --- /dev/null +++ b/docs/ja/operations/system-tables/kafka_consumers.md @@ -0,0 +1,59 @@ +--- +slug: /ja/operations/system-tables/kafka_consumers +--- +# kafka_consumers + +Kafkaコンシューマã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ +[Kafkaテーブルエンジン](../../engines/table-engines/integrations/kafka)(ãƒã‚¤ãƒ†ã‚£ãƒ–ClickHouseçµ±åˆï¼‰ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +カラム: + +- `database` (String) - KafkaエンジンをæŒã¤ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚ +- `table` (String) - KafkaエンジンをæŒã¤ãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚ +- `consumer_id` (String) - Kafkaコンシューマã®è­˜åˆ¥å­ã€‚テーブルã«ã¯å¤šãã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžãŒå­˜åœ¨ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚`kafka_num_consumers`パラメータã§æŒ‡å®šã•ã‚Œã¾ã™ã€‚ +- `assignments.topic` (Array(String)) - Kafkaトピック。 +- `assignments.partition_id` (Array(Int32)) - Kafkaã®ãƒ‘ーティションID。ãªãŠã€ãƒ‘ーティションã«ã¯1ã¤ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžã—ã‹å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã›ã‚“。 +- `assignments.current_offset` (Array(Int64)) - ç¾åœ¨ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã€‚ +- `exceptions.time` (Array(DateTime)) - 最近10件ã®ä¾‹å¤–ãŒç™ºç”Ÿã—ãŸã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。 +- `exceptions.text` (Array(String)) - 最近10件ã®ä¾‹å¤–ã®ãƒ†ã‚­ã‚¹ãƒˆã€‚ +- `last_poll_time` (DateTime) - 最近ã®ãƒãƒ¼ãƒªãƒ³ã‚°ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。 +- `num_messages_read` (UInt64) - コンシューマã«ã‚ˆã£ã¦èª­ã¿å–られãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ•°ã€‚ +- `last_commit_time` (DateTime) - 最近ã®ãƒãƒ¼ãƒªãƒ³ã‚°ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。 +- `num_commits` (UInt64) - コンシューマã®ã‚³ãƒŸãƒƒãƒˆã®ç·æ•°ã€‚ +- `last_rebalance_time` (DateTime) - 最近ã®Kafkaリãƒãƒ©ãƒ³ã‚¹ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。 +- `num_rebalance_revocations` (UInt64) - コンシューマã‹ã‚‰ãƒ‘ーティションãŒå–り消ã•ã‚ŒãŸå›žæ•°ã€‚ +- `num_rebalance_assignments` (UInt64) - コンシューマãŒKafkaクラスターã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸå›žæ•°ã€‚ +- `is_currently_used` (UInt8) - コンシューマãŒä½¿ç”¨ä¸­ã‹ã©ã†ã‹ã€‚ +- `last_used` (UInt64) - ã“ã®ã‚³ãƒ³ã‚·ãƒ¥ãƒ¼ãƒžãŒæœ€å¾Œã«ä½¿ç”¨ã•ã‚ŒãŸæ™‚é–“ã€ãƒžã‚¤ã‚¯ãƒ­ç§’ã§ã®Unix時間。 +- `rdkafka_stat` (String) - ライブラリ内部ã®çµ±è¨ˆæƒ…報。詳ã—ãã¯https://github.com/ClickHouse/librdkafka/blob/master/STATISTICS.md ã‚’å‚ç…§ã—ã¦ãã ã•ã„。`statistics_interval_ms`ã‚’0ã«è¨­å®šã™ã‚‹ã¨ç„¡åŠ¹ã«ãªã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯3000(3秒ã”ã¨ã«1回)ã§ã™ã€‚ + +例: + +``` sql +SELECT * +FROM system.kafka_consumers +FORMAT Vertical +``` + +``` text +è¡Œ 1: +────── +database: test +table: kafka +consumer_id: ClickHouse-instance-test-kafka-1caddc7f-f917-4bb1-ac55-e28bd103a4a0 +assignments.topic: ['system_kafka_cons'] +assignments.partition_id: [0] +assignments.current_offset: [18446744073709550615] +exceptions.time: [] +exceptions.text: [] +last_poll_time: 2006-11-09 18:47:47 +num_messages_read: 4 +last_commit_time: 2006-11-10 04:39:40 +num_commits: 1 +last_rebalance_time: 1970-01-01 00:00:00 +num_rebalance_revocations: 0 +num_rebalance_assignments: 1 +is_currently_used: 1 +rdkafka_stat: {...} + +``` diff --git a/docs/ja/operations/system-tables/licenses.md b/docs/ja/operations/system-tables/licenses.md new file mode 100644 index 00000000000..8faaeb3164b --- /dev/null +++ b/docs/ja/operations/system-tables/licenses.md @@ -0,0 +1,29 @@ +--- +slug: /ja/operations/system-tables/licenses +--- +# licenses + +ClickHouseソースã®[contrib](https://github.com/ClickHouse/ClickHouse/tree/master/contrib)ディレクトリã«ã‚るサードパーティライブラリã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã‚’å«ã¿ã¾ã™ã€‚ + +カラム: + +- `library_name` ([String](../../sql-reference/data-types/string.md)) — ライセンスãŒé–¢é€£ã—ã¦ã„るライブラリã®åå‰ã€‚ +- `license_type` ([String](../../sql-reference/data-types/string.md)) — ライセンスタイプ — 例ãˆã°ã€Apacheã€MITãªã©ã€‚ +- `license_path` ([String](../../sql-reference/data-types/string.md)) — ライセンステキストãŒå«ã¾ã‚Œã¦ã„るファイルã¸ã®ãƒ‘ス。 +- `license_text` ([String](../../sql-reference/data-types/string.md)) — ライセンステキスト。 + +**例** + +``` sql +SELECT library_name, license_type, license_path FROM system.licenses LIMIT 15 +``` + +``` text +┌─library_name───────┬─license_type─┬─license_path────────────────────────┠+│ aws-c-common │ Apache │ /contrib/aws-c-common/LICENSE │ +│ base64 │ BSD 2-clause │ /contrib/aklomp-base64/LICENSE │ +│ brotli │ MIT │ /contrib/brotli/LICENSE │ +│ [...] │ [...] │ [...] │ +└────────────────────┴──────────────┴─────────────────────────────────────┘ + +``` diff --git a/docs/ja/operations/system-tables/merge_tree_settings.md b/docs/ja/operations/system-tables/merge_tree_settings.md new file mode 100644 index 00000000000..51be77c1124 --- /dev/null +++ b/docs/ja/operations/system-tables/merge_tree_settings.md @@ -0,0 +1,82 @@ +--- +slug: /ja/operations/system-tables/merge_tree_settings +title: merge_tree_settings +--- + +`MergeTree` テーブルã®è¨­å®šã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `name` ([String](../../sql-reference/data-types/string.md)) — 設定å。 +- `value` ([String](../../sql-reference/data-types/string.md)) — 設定値。 +- `changed` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 設定ãŒè¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§æ˜Žç¤ºçš„ã«å®šç¾©ã•ã‚ŒãŸã‹ã€æ˜Žç¤ºçš„ã«å¤‰æ›´ã•ã‚ŒãŸã‹ã©ã†ã‹ã€‚ +- `description` ([String](../../sql-reference/data-types/string.md)) — 設定ã®èª¬æ˜Žã€‚ +- `min` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — [制約](../../operations/settings/constraints-on-settings.md#constraints-on-settings)ã«ã‚ˆã‚Šè¨­å®šã•ã‚Œã‚‹æœ€å°å€¤ãŒã‚ã‚‹å ´åˆã€ãã®æœ€å°å€¤ã€‚最å°å€¤ãŒãªã„å ´åˆã€[NULL](../../sql-reference/syntax.md#null-literal)ã‚’å«ã‚€ã€‚ +- `max` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — [制約](../../operations/settings/constraints-on-settings.md#constraints-on-settings)ã«ã‚ˆã‚Šè¨­å®šã•ã‚Œã‚‹æœ€å¤§å€¤ãŒã‚ã‚‹å ´åˆã€ãã®æœ€å¤§å€¤ã€‚最大値ãŒãªã„å ´åˆã€[NULL](../../sql-reference/syntax.md#null-literal)ã‚’å«ã‚€ã€‚ +- `readonly` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¨­å®šã‚’変更ã§ãã‚‹ã‹ã©ã†ã‹ã‚’示ã™: + - `0` — ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è¨­å®šã‚’変更ã§ãる。 + - `1` — ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è¨­å®šã‚’変更ã§ããªã„。 +- `type` ([String](../../sql-reference/data-types/string.md)) — 設定タイプ(実装ã«ç‰¹æœ‰ã®æ–‡å­—列値)。 +- `is_obsolete` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) - 設定ãŒå»ƒæ­¢ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ã€‚ +- `tier` ([Enum8](../../sql-reference/data-types/enum.md)) — ã“ã®æ©Ÿèƒ½ã®ã‚µãƒãƒ¼ãƒˆãƒ¬ãƒ™ãƒ«ã€‚ClickHouseã®æ©Ÿèƒ½ã¯ã€é–‹ç™ºã®ç¾çŠ¶ã¨åˆ©ç”¨æ™‚ã®æœŸå¾…ã«å¿œã˜ãŸç•°ãªã‚‹æ®µéšŽã«æ•´ç†ã•ã‚Œã‚‹ã€‚値: + - `'Production'` — 機能ã¯å®‰å®šã—ã¦ãŠã‚Šã€å®‰å…¨ã«ä½¿ç”¨ã§ãる。**プロダクション**ã®ä»–ã®æ©Ÿèƒ½ã¨ç›¸äº’作用ã™ã‚‹éš›ã«å•é¡Œã¯ãªã„。 + - `'Beta'` — 機能ã¯å®‰å®šã—ã¦ãŠã‚Šã€å®‰å…¨ã§ã‚る。他ã®æ©Ÿèƒ½ã¨ä¸€ç·’ã«ä½¿ç”¨ã—ãŸå ´åˆã®çµæžœã¯æœªçŸ¥ã§ã‚ã‚Šã€æ­£ç¢ºæ€§ã¯ä¿è¨¼ã•ã‚Œã¦ã„ãªã„。テストã¨å ±å‘ŠãŒæ­“è¿Žã•ã‚Œã‚‹ã€‚ + - `'Experimental'` — 機能ã¯é–‹ç™ºä¸­ã§ã‚る。開発者ã¨ClickHouse愛好者ã®ãŸã‚ã«ã®ã¿æ„図ã•ã‚Œã¦ã„る。機能ã¯å‹•ä½œã™ã‚‹ã‹ã‚‚ã—ã‚Œãšã€ã•ã‚Œãªã„ã‹ã‚‚ã—ã‚Œãšã€ã„ã¤ã§ã‚‚削除ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚る。 + - `'Obsolete'` — ã‚‚ã¯ã‚„サãƒãƒ¼ãƒˆã•ã‚Œãªã„。ã™ã§ã«å‰Šé™¤ã•ã‚Œã¦ã„ã‚‹ã‹ã€å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§å‰Šé™¤ã•ã‚Œã‚‹äºˆå®šã§ã‚る。 + +**例** +```sql +SELECT * FROM system.merge_tree_settings LIMIT 4 FORMAT Vertical; +``` + +```response +Row 1: +────── +name: min_compress_block_size +value: 0 +changed: 0 +description: グラニュールãŒæ›¸ãè¾¼ã¾ã‚Œã‚‹ã¨ãã€ä¿ç•™ä¸­ã®éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºãŒæŒ‡å®šã•ã‚ŒãŸé–¾å€¤ä»¥ä¸Šã¾ãŸã¯ãれ以上ã®å ´åˆã€ãƒãƒƒãƒ•ã‚¡å†…ã®ãƒ‡ãƒ¼ã‚¿ã‚’圧縮ã—ã¾ã™ã€‚ã“ã®è¨­å®šãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€å¯¾å¿œã™ã‚‹ã‚°ãƒ­ãƒ¼ãƒãƒ«è¨­å®šãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +min: ____ +max: ____ +readonly: 0 +type: UInt64 +is_obsolete: 0 + +Row 2: +────── +name: max_compress_block_size +value: 0 +changed: 0 +description: ãƒãƒƒãƒ•ã‚¡å†…ã®ä¿ç•™ä¸­ã®éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ãŒæŒ‡å®šã•ã‚ŒãŸé–¾å€¤ä»¥ä¸Šã®ã‚µã‚¤ã‚ºã§ã‚ã‚‹å ´åˆã€ãれを圧縮ã—ã¾ã™ã€‚データブロックã¯ç¾åœ¨ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ãŒçµ‚了ã—ã¦ã„ãªãã¦ã‚‚圧縮ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€å¯¾å¿œã™ã‚‹ã‚°ãƒ­ãƒ¼ãƒãƒ«è¨­å®šãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +min: ____ +max: ____ +readonly: 0 +type: UInt64 +is_obsolete: 0 + +Row 3: +────── +name: index_granularity +value: 8192 +changed: 0 +description: 1ã¤ã®ä¸»ã‚­ãƒ¼å€¤ã«å¯¾å¿œã™ã‚‹è¡Œæ•°ã€‚ +min: ____ +max: ____ +readonly: 0 +type: UInt64 +is_obsolete: 0 + +Row 4: +────── +name: max_digestion_size_per_segment +value: 268435456 +changed: 0 +description: GINインデックスを構築ã™ã‚‹ãŸã‚ã«ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã”ã¨ã«æ¶ˆåŒ–ã™ã‚‹æœ€å¤§ãƒã‚¤ãƒˆæ•°ã€‚ +min: ____ +max: ____ +readonly: 0 +type: UInt64 +is_obsolete: 0 + +4 rows in set. Elapsed: 0.009 sec. +``` diff --git a/docs/ja/operations/system-tables/merges.md b/docs/ja/operations/system-tables/merges.md new file mode 100644 index 00000000000..c71b8346bba --- /dev/null +++ b/docs/ja/operations/system-tables/merges.md @@ -0,0 +1,26 @@ +--- +slug: /ja/operations/system-tables/merges +--- +# merges + +MergeTree ファミリーã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ã€ç¾åœ¨é€²è¡Œä¸­ã®ãƒžãƒ¼ã‚¸ã‚„パートã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +カラム: + +- `database` (String) — テーブルãŒå±žã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `table` (String) — テーブルå。 +- `elapsed` (Float64) — マージãŒé–‹å§‹ã•ã‚Œã¦ã‹ã‚‰ã®çµŒéŽæ™‚間(秒)。 +- `progress` (Float64) — 完了ã—ãŸä½œæ¥­ã®å‰²åˆã§ã€0ã‹ã‚‰1ã¾ã§ã®å€¤ã€‚ +- `num_parts` (UInt64) — マージã•ã‚Œã‚‹ãƒ‘ーツã®æ•°ã€‚ +- `result_part_name` (String) — マージã®çµæžœã¨ã—ã¦å½¢æˆã•ã‚Œã‚‹ãƒ‘ートã®åå‰ã€‚ +- `is_mutation` (UInt8) — ã“ã®ãƒ—ロセスãŒãƒ‘ートã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã§ã‚ã‚‹å ´åˆã¯1。 +- `total_size_bytes_compressed` (UInt64) — マージã•ã‚ŒãŸãƒãƒ£ãƒ³ã‚¯ã®åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®åˆè¨ˆã‚µã‚¤ã‚ºã€‚ +- `total_size_marks` (UInt64) — マージã•ã‚ŒãŸãƒ‘ーツã®ãƒžãƒ¼ã‚¯ã®ç·æ•°ã€‚ +- `bytes_read_uncompressed` (UInt64) — 読ã¿è¾¼ã¾ã‚ŒãŸæœªåœ§ç¸®ã®ãƒã‚¤ãƒˆæ•°ã€‚ +- `rows_read` (UInt64) — 読ã¿è¾¼ã¾ã‚ŒãŸè¡Œæ•°ã€‚ +- `bytes_written_uncompressed` (UInt64) — 書ãè¾¼ã¾ã‚ŒãŸæœªåœ§ç¸®ã®ãƒã‚¤ãƒˆæ•°ã€‚ +- `rows_written` (UInt64) — 書ãè¾¼ã¾ã‚ŒãŸè¡Œæ•°ã€‚ +- `memory_usage` (UInt64) — マージプロセスã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»é‡ã€‚ +- `thread_id` (UInt64) — マージプロセスã®ã‚¹ãƒ¬ãƒƒãƒ‰ID。 +- `merge_type` — ç¾åœ¨ã®ãƒžãƒ¼ã‚¸ã®ã‚¿ã‚¤ãƒ—。ミューテーションã®å ´åˆã¯ç©ºã€‚ +- `merge_algorithm` — ç¾åœ¨ã®ãƒžãƒ¼ã‚¸ã§ä½¿ç”¨ã•ã‚Œã¦ã„るアルゴリズム。ミューテーションã®å ´åˆã¯ç©ºã€‚ diff --git a/docs/ja/operations/system-tables/metric_log.md b/docs/ja/operations/system-tables/metric_log.md new file mode 100644 index 00000000000..49d261f4ed5 --- /dev/null +++ b/docs/ja/operations/system-tables/metric_log.md @@ -0,0 +1,54 @@ +--- +slug: /ja/operations/system-tables/metric_log +--- +# metric_log + +`system.metrics`ãŠã‚ˆã³`system.events`テーブルã‹ã‚‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹å€¤ã®å±¥æ­´ã‚’å«ã¿ã€å®šæœŸçš„ã«ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ + +カラム: +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — イベントã®æ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — イベントã®æ™‚刻。 +- `event_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒å˜ä½ã®è§£åƒåº¦ã®ã‚¤ãƒ™ãƒ³ãƒˆæ™‚刻。 + +**例** + +``` sql +SELECT * FROM system.metric_log LIMIT 1 FORMAT Vertical; +``` + +``` text +Row 1: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2020-09-05 +event_time: 2020-09-05 16:22:33 +event_time_microseconds: 2020-09-05 16:22:33.196807 +milliseconds: 196 +ProfileEvent_Query: 0 +ProfileEvent_SelectQuery: 0 +ProfileEvent_InsertQuery: 0 +ProfileEvent_FailedQuery: 0 +ProfileEvent_FailedSelectQuery: 0 +... +... +CurrentMetric_Revision: 54439 +CurrentMetric_VersionInteger: 20009001 +CurrentMetric_RWLockWaitingReaders: 0 +CurrentMetric_RWLockWaitingWriters: 0 +CurrentMetric_RWLockActiveReaders: 0 +CurrentMetric_RWLockActiveWriters: 0 +CurrentMetric_GlobalThread: 74 +CurrentMetric_GlobalThreadActive: 26 +CurrentMetric_LocalThread: 0 +CurrentMetric_LocalThreadActive: 0 +CurrentMetric_DistributedFilesToInsert: 0 +``` + +**関連項目** + +- [metric_log 設定](../../operations/server-configuration-parameters/settings.md#metric_log) — 設定ã®æœ‰åŠ¹åŒ–ã¨ç„¡åŠ¹åŒ–。 +- [system.asynchronous_metrics](../../operations/system-tables/asynchronous_metrics.md) — 定期的ã«è¨ˆç®—ã•ã‚Œã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å«ã¿ã¾ã™ã€‚ +- [system.events](../../operations/system-tables/events.md#system_tables-events) — 発生ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆæ•°ã‚’å«ã¿ã¾ã™ã€‚ +- [system.metrics](../../operations/system-tables/metrics.md) — å³åº§ã«è¨ˆç®—ã•ã‚Œã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å«ã¿ã¾ã™ã€‚ +- [モニタリング](../../operations/monitoring.md) — ClickHouseモニタリングã®åŸºæœ¬æ¦‚念。 diff --git a/docs/ja/operations/system-tables/metrics.md b/docs/ja/operations/system-tables/metrics.md new file mode 100644 index 00000000000..be92f021908 --- /dev/null +++ b/docs/ja/operations/system-tables/metrics.md @@ -0,0 +1,753 @@ +--- +slug: /ja/operations/system-tables/metrics +--- +# metrics + +å³æ™‚ã«è¨ˆç®—ã§ãã‚‹ã€ã¾ãŸã¯ç¾åœ¨ã®å€¤ã‚’æŒã¤ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚例ãˆã°ã€åŒæ™‚ã«å‡¦ç†ã•ã‚Œã¦ã„るクエリã®æ•°ã‚„ç¾åœ¨ã®ãƒ¬ãƒ—リカé…延ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯å¸¸ã«æœ€æ–°ã§ã™ã€‚ + +カラム: + +- `metric` ([String](../../sql-reference/data-types/string.md)) — メトリクスå。 +- `value` ([Int64](../../sql-reference/data-types/int-uint.md)) — メトリクスã®å€¤ã€‚ +- `description` ([String](../../sql-reference/data-types/string.md)) — メトリクスã®èª¬æ˜Žã€‚ +- `name` ([String](../../sql-reference/data-types/string.md)) — `metric`ã®åˆ¥å。 + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯ã€ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ« [src/Common/CurrentMetrics.cpp](https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/CurrentMetrics.cpp) ã§ç¢ºèªã§ãã¾ã™ã€‚ + +**例** + +``` sql +SELECT * FROM system.metrics LIMIT 10 +``` + +``` text +┌─metric───────────────────────────────┬─value─┬─description────────────────────────────────────────────────────────────┠+│ Query │ 1 │ Number of executing queries │ +│ Merge │ 0 │ Number of executing background merges │ +│ PartMutation │ 0 │ Number of mutations (ALTER DELETE/UPDATE) │ +│ ReplicatedFetch │ 0 │ Number of data parts being fetched from replicas │ +│ ReplicatedSend │ 0 │ Number of data parts being sent to replicas │ +│ ReplicatedChecks │ 0 │ Number of data parts checking for consistency │ +│ BackgroundMergesAndMutationsPoolTask │ 0 │ Number of active merges and mutations in an associated background pool │ +│ BackgroundFetchesPoolTask │ 0 │ Number of active fetches in an associated background pool │ +│ BackgroundCommonPoolTask │ 0 │ Number of active tasks in an associated background pool │ +│ BackgroundMovePoolTask │ 0 │ Number of active tasks in BackgroundProcessingPool for moves │ +└──────────────────────────────────────┴───────┴────────────────────────────────────────────────────────────────────────┘ +``` + +## メトリクスã®èª¬æ˜Ž + +### AggregatorThreads + +Aggregatorスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### AggregatorThreadsActive + +Aggregatorスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### TablesLoaderForegroundThreads + +éžåŒæœŸãƒ­ãƒ¼ãƒ€ãƒ¼å‰æ™¯ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### TablesLoaderForegroundThreadsActive + +éžåŒæœŸãƒ­ãƒ¼ãƒ€ãƒ¼å‰æ™¯ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### TablesLoaderBackgroundThreads + +éžåŒæœŸãƒ­ãƒ¼ãƒ€ãƒ¼èƒŒæ™¯ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### TablesLoaderBackgroundThreadsActive + +éžåŒæœŸãƒ­ãƒ¼ãƒ€ãƒ¼èƒŒæ™¯ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### AsyncInsertCacheSize + +キャッシュ内ã®éžåŒæœŸæŒ¿å…¥ãƒãƒƒã‚·ãƒ¥IDã®æ•°ã€‚ + +### AsynchronousInsertThreads + +éžåŒæœŸæŒ¿å…¥ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### AsynchronousInsertThreadsActive + +éžåŒæœŸæŒ¿å…¥ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### AsynchronousReadWait + +éžåŒæœŸèª­ã¿è¾¼ã¿ã‚’å¾…æ©Ÿã—ã¦ã„るスレッドã®æ•°ã€‚ + +### BackgroundBufferFlushSchedulePoolSize + +BackgroundBufferFlushSchedulePoolã§ã®ã‚¿ã‚¹ã‚¯æ•°ã®åˆ¶é™ã€‚ + +### BackgroundBufferFlushSchedulePoolTask + +BackgroundBufferFlushSchedulePoolã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªã‚¿ã‚¹ã‚¯ã®æ•°ã€‚ã“ã®ãƒ—ールã¯ä¸€å®šå‘¨æœŸã§ã®Bufferフラッシュã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +### BackgroundCommonPoolSize + +関連ã™ã‚‹èƒŒæ™¯ãƒ—ールã§ã®ã‚¿ã‚¹ã‚¯æ•°ã®åˆ¶é™ã€‚ + +### BackgroundCommonPoolTask + +関連ã™ã‚‹èƒŒæ™¯ãƒ—ールã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªã‚¿ã‚¹ã‚¯ã®æ•°ã€‚ + +### BackgroundDistributedSchedulePoolSize + +BackgroundDistributedSchedulePoolã§ã®ã‚¿ã‚¹ã‚¯æ•°ã®åˆ¶é™ã€‚ + +### BackgroundDistributedSchedulePoolTask + +BackgroundDistributedSchedulePoolã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªã‚¿ã‚¹ã‚¯ã®æ•°ã€‚ã“ã®ãƒ—ールã¯åˆ†æ•£é€ä¿¡ã‚’背景ã§å®Ÿè¡Œã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +### BackgroundFetchesPoolSize + +関連ã™ã‚‹èƒŒæ™¯ãƒ—ールã§ã®åŒæ™‚フェッãƒæ•°ã®åˆ¶é™ã€‚ + +### BackgroundFetchesPoolTask + +関連ã™ã‚‹èƒŒæ™¯ãƒ—ールã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ•ã‚§ãƒƒãƒæ•°ã€‚ + +### BackgroundMergesAndMutationsPoolSize + +関連ã™ã‚‹èƒŒæ™¯ãƒ—ールã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒžãƒ¼ã‚¸ã¨ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®åˆ¶é™ã€‚ + +### BackgroundMergesAndMutationsPoolTask + +関連ã™ã‚‹èƒŒæ™¯ãƒ—ールã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒžãƒ¼ã‚¸ã¨ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®æ•°ã€‚ + +### BackgroundMessageBrokerSchedulePoolSize + +メッセージストリーミングã®ãŸã‚ã®BackgroundProcessingPoolã§ã®ã‚¿ã‚¹ã‚¯æ•°ã®åˆ¶é™ã€‚ + +### BackgroundMessageBrokerSchedulePoolTask + +メッセージストリーミングã®ãŸã‚ã®BackgroundProcessingPoolã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªã‚¿ã‚¹ã‚¯ã®æ•°ã€‚ + +### BackgroundMovePoolSize + +移動ã®ãŸã‚ã®BackgroundProcessingPoolã§ã®ã‚¿ã‚¹ã‚¯æ•°ã®åˆ¶é™ã€‚ + +### BackgroundMovePoolTask + +移動ã®ãŸã‚ã®BackgroundProcessingPoolã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªã‚¿ã‚¹ã‚¯ã®æ•°ã€‚ + +### BackgroundSchedulePoolSize + +BackgroundSchedulePoolã§ã®ã‚¿ã‚¹ã‚¯æ•°ã®åˆ¶é™ã€‚ã“ã®ãƒ—ールã¯å¤ã„データパーツã®ã‚¯ãƒªãƒ¼ãƒ‹ãƒ³ã‚°ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®å¤‰æ›´ã€ãƒ¬ãƒ—リカã®å†åˆæœŸåŒ–ãªã©ã®å®šæœŸçš„ãªReplicatedMergeTreeタスクã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +### BackgroundSchedulePoolTask + +BackgroundSchedulePoolã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªã‚¿ã‚¹ã‚¯ã®æ•°ã€‚ã“ã®ãƒ—ールã¯å¤ã„データパーツã®ã‚¯ãƒªãƒ¼ãƒ‹ãƒ³ã‚°ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®å¤‰æ›´ã€ãƒ¬ãƒ—リカã®å†åˆæœŸåŒ–ãªã©ã®å®šæœŸçš„ãªReplicatedMergeTreeタスクã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +### BackupsIOThreads + +BackupsIOスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### BackupsIOThreadsActive + +BackupsIOスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### BackupsThreads + +BACKUP用ã®ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### BackupsThreadsActive + +BACKUP用ã®ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### BrokenDistributedFilesToInsert + +ç ´æã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚ŒãŸåˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã¸ã®éžåŒæœŸæŒ¿å…¥ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã€‚ã“ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯é–‹å§‹æ™‚0ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚å„シャードã®ãƒ•ã‚¡ã‚¤ãƒ«æ•°ã‚’åˆç®—ã—ã¾ã™ã€‚ + +### CacheDetachedFileSegments + +既存ã®åˆ‡ã‚Šé›¢ã•ã‚ŒãŸã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ã‚¡ã‚¤ãƒ«ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã®æ•°ã€‚ + +### CacheDictionaryThreads + +CacheDictionaryスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### CacheDictionaryThreadsActive + +CacheDictionaryスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### CacheDictionaryUpdateQueueBatches + +CacheDictionaries内ã®æ›´æ–°ã‚­ãƒ¥ãƒ¼ã®ã€Œãƒãƒƒãƒã€ï¼ˆã‚­ãƒ¼ã®ã‚»ãƒƒãƒˆï¼‰æ•°ã€‚ + +### CacheDictionaryUpdateQueueKeys + +CacheDictionaries内ã®æ›´æ–°ã‚­ãƒ¥ãƒ¼ã«ã‚る正確ãªã‚­ãƒ¼ã®æ•°ã€‚ + +### CacheFileSegments + +既存ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ã‚¡ã‚¤ãƒ«ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã®æ•°ã€‚ + +### ContextLockWait + +Context内ã®ãƒ­ãƒƒã‚¯ã‚’å¾…ã£ã¦ã„るスレッドã®æ•°ã€‚ã“ã‚Œã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ãƒ­ãƒƒã‚¯ã§ã™ã€‚ + +### DDLWorkerThreads + +ON CLUSTERクエリ用ã®DDLWorkerスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### DDLWorkerThreadsActive + +ON CLUSTERクエリ用ã®DDLWorkerスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### DatabaseCatalogThreads + +DatabaseCatalogスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### DatabaseCatalogThreadsActive + +DatabaseCatalogスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### DatabaseOnDiskThreads + +DatabaseOnDiskスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### DatabaseOnDiskThreadsActive + +DatabaseOnDiskスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### DelayedInserts + +MergeTreeテーブルã®ãƒ‘ーティションã«å¯¾ã—ã¦ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‡ãƒ¼ã‚¿ãƒ‘ーツãŒå¤šã„ãŸã‚ã€èª¿æ•´ã•ã‚Œã¦ã„ã‚‹INSERTクエリã®æ•°ã€‚ + +### DestroyAggregatesThreads + +アグリゲート状態ã®ç ´æ£„用スレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### DestroyAggregatesThreadsActive + +アグリゲート状態ã®ç ´æ£„用スレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### DictCacheRequests + +キャッシュタイプã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¸ã®ãƒ•ãƒ©ã‚¤ãƒªã‚¯ã‚¨ã‚¹ãƒˆæ•°ã€‚ + +### DiskObjectStorageAsyncThreads + +DiskObjectStorage用ã®éžåŒæœŸã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### DiskObjectStorageAsyncThreadsActive + +DiskObjectStorage用éžåŒæœŸã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### DiskSpaceReservedForMerge + +ç¾åœ¨è¡Œã£ã¦ã„る背景マージ用ã«äºˆç´„ã•ã‚ŒãŸãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã€‚ã“ã‚Œã¯ç¾åœ¨ãƒžãƒ¼ã‚¸ã—ã¦ã„るパーツã®åˆè¨ˆã‚µã‚¤ã‚ºã‚ˆã‚Šè‹¥å¹²å¤§ãããªã‚Šã¾ã™ã€‚ + +### DistributedFilesToInsert + +分散テーブルã¸ã®éžåŒæœŸæŒ¿å…¥ã«å‡¦ç†ã•ã‚Œã‚‹ä¿ç•™ä¸­ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã€‚å„シャードã®ãƒ•ã‚¡ã‚¤ãƒ«æ•°ã‚’åˆç®—ã—ã¾ã™ã€‚ + +### DistributedSend + +分散テーブルã«INSERTã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’é éš”サーãƒã¸é€ä¿¡ã™ã‚‹æŽ¥ç¶šæ•°ã€‚åŒæœŸãŠã‚ˆã³éžåŒæœŸãƒ¢ãƒ¼ãƒ‰ã®ä¸¡æ–¹ã‚’å«ã¿ã¾ã™ã€‚ + +### EphemeralNode + +ZooKeeper内ã§ä¿æŒã™ã‚‹ã‚¨ãƒ•ã‚§ãƒ¡ãƒ©ãƒ«ãƒŽãƒ¼ãƒ‰ã®æ•°ã€‚ + +### FilesystemCacheElements + +ファイルシステムキャッシュè¦ç´ ï¼ˆãƒ•ã‚¡ã‚¤ãƒ«ã‚»ã‚°ãƒ¡ãƒ³ãƒˆï¼‰ã€‚ + +### FilesystemCacheReadBuffers + +アクティブãªã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒãƒƒãƒ•ã‚¡ã®æ•°ã€‚ + +### FilesystemCacheSize + +ファイルシステムキャッシュã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +### GlobalThread + +グローãƒãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### GlobalThreadActive + +グローãƒãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### HTTPConnection + +HTTPサーãƒã¸ã®æŽ¥ç¶šæ•°ã€‚ + +### HashedDictionaryThreads + +HashedDictionaryスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### HashedDictionaryThreadsActive + +HashedDictionaryスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### IOPrefetchThreads + +IOプリフェッãƒã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### IOPrefetchThreadsActive + +IOプリフェッãƒã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### IOThreads + +IOスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### IOThreadsActive + +IOスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### IOUringInFlightEvents + +フライト中ã®io_uring SQEã®æ•°ã€‚ + +### IOUringPendingEvents + +é€ä¿¡å¾…ã¡ã®io_uring SQEã®æ•°ã€‚ + +### IOWriterThreads + +IO書ãè¾¼ã¿ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### IOWriterThreadsActive + +IO書ãè¾¼ã¿ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### InterserverConnection + +部å“をフェッãƒã™ã‚‹ãŸã‚ã®ä»–ã®ãƒ¬ãƒ—リカã‹ã‚‰ã®æŽ¥ç¶šæ•°ã€‚ + +### KafkaAssignedPartitions + +Kafkaテーブルã«ç¾åœ¨å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„るパーティションã®æ•°ã€‚ + +### KafkaBackgroundReads + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒªãƒ¼ãƒ‰ï¼ˆKafkaã‹ã‚‰ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®è£œå……)ã«ç¾åœ¨ä½œæ¥­ä¸­ã®æ•°ã€‚ + +### KafkaConsumers + +アクティブãªKafkaコンシューマã®æ•°ã€‚ + +### KafkaConsumersInUse + +直接ã¾ãŸã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒªãƒ¼ãƒ‰ã«ã‚ˆã‚Šç¾åœ¨åˆ©ç”¨ã•ã‚Œã¦ã„るコンシューマã®æ•°ã€‚ + +### KafkaConsumersWithAssignment + +割り当ã¦ã‚‰ã‚ŒãŸãƒ‘ーティションをæŒã¤ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªKafkaコンシューマã®æ•°ã€‚ + +### KafkaLibrdkafkaThreads + +アクティブãªlibrdkafkaスレッドã®æ•°ã€‚ + +### KafkaProducers + +作æˆã•ã‚ŒãŸã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªKafkaプロデューサã®æ•°ã€‚ + +### KafkaWrites + +Kafkaã«æŒ¿å…¥ã‚’実行中ã®æ•°ã€‚ + +### KeeperAliveConnections + +アライブ接続ã®æ•°ã€‚ + +### KeeperOutstandingRequests + +未処ç†ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æ•°ã€‚ + +### LocalThread + +ローカルスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ローカルスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã‹ã‚‰å–å¾—ã•ã‚Œã¾ã™ã€‚ + +### LocalThreadActive + +ローカルスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### MMappedAllocBytes + +mmappedアロケーションã®åˆè¨ˆãƒã‚¤ãƒˆæ•°ã€‚ + +### MMappedAllocs + +mmappedアロケーションã®ç·æ•°ã€‚ + +### MMappedFileBytes + +mmappedファイル領域ã®åˆè¨ˆã‚µã‚¤ã‚ºã€‚ + +### MMappedFiles + +mmappedファイルã®ç·æ•°ã€‚ + +### MarksLoaderThreads + +マークã®ãƒ­ãƒ¼ãƒ‰ç”¨ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### MarksLoaderThreadsActive + +マークã®ãƒ­ãƒ¼ãƒ‰ç”¨ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### MaxDDLEntryID + +DDLWorkerãŒå‡¦ç†ã—ãŸæœ€å¤§ã®DDLエントリ。 + +### MaxPushedDDLEntryID + +ZooKeeperã«ãƒ—ッシュã•ã‚ŒãŸDDLWorkerã®æœ€å¤§DDLエントリ。 + +### MemoryTracking + +サーãƒã«ã‚ˆã£ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã®ç·é‡ã€‚ + +### Merge + +実行中ã®èƒŒæ™¯ãƒžãƒ¼ã‚¸ã®æ•°ã€‚ + +### MergeTreeAllRangesAnnouncementsSent + +リモートサーãƒã‹ã‚‰èµ·å‹•ã‚µãƒ¼ãƒã¸ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ã‚»ãƒƒãƒˆã«ã¤ã„ã¦é€ä¿¡ä¸­ã®ã‚¢ãƒŠã‚¦ãƒ³ã‚¹ãƒ¡ãƒ³ãƒˆã®ç¾åœ¨æ•°ï¼ˆMergeTreeテーブル用)。リモートサーãƒå´ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ + +### MergeTreeBackgroundExecutorThreads + +MergeTreeBackgroundExecutorスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### MergeTreeBackgroundExecutorThreadsActive + +MergeTreeBackgroundExecutorスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### MergeTreeDataSelectExecutorThreads + +MergeTreeDataSelectExecutorスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### MergeTreeDataSelectExecutorThreadsActive + +MergeTreeDataSelectExecutorスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### MergeTreePartsCleanerThreads + +MergeTreeパーツクリーナースレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### MergeTreePartsCleanerThreadsActive + +MergeTreeパーツクリーナースレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### MergeTreePartsLoaderThreads + +MergeTreeパーツローダースレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### MergeTreePartsLoaderThreadsActive + +MergeTreeパーツローダースレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### MergeTreeReadTaskRequestsSent + +リモートサーãƒå´ã§èª­ã¿å–りタスクをé¸æŠžã™ã‚‹ãŸã‚ã€ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒã‹ã‚‰èµ·å‹•ã‚µãƒ¼ãƒå´ã¸ãƒ•ãƒ©ã‚¤ãƒˆä¸­ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æ•°ï¼ˆMergeTreeテーブル用)。リモートサーãƒå´ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ + +### Move + +ç¾åœ¨å®Ÿè¡Œä¸­ã®ç§»å‹•ã®æ•°ã€‚ + +### MySQLConnection + +MySQLプロトコルを使用ã—ã¦ã„るクライアント接続ã®æ•°ã€‚ + +### NetworkReceive + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å—ä¿¡ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ClickHouse関連ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ç›¸äº’作用ã®ã¿ãŒå«ã¾ã‚Œã€ã‚µãƒ¼ãƒ‰ãƒ‘ーティライブラリã¯å«ã¾ã‚Œã¾ã›ã‚“。 + +### NetworkSend + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ClickHouse関連ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ç›¸äº’作用ã®ã¿ãŒå«ã¾ã‚Œã€ã‚µãƒ¼ãƒ‰ãƒ‘ーティライブラリã¯å«ã¾ã‚Œã¾ã›ã‚“。 + +### OpenFileForRead + +読ã¿å–り用ã«é–‹ã‹ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã€‚ + +### OpenFileForWrite + +書ãè¾¼ã¿ç”¨ã«é–‹ã‹ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ã€‚ + +### ParallelFormattingOutputFormatThreads + +ParallelFormattingOutputFormatThreadsスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### ParallelFormattingOutputFormatThreadsActive + +ParallelFormattingOutputFormatThreadsスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### ParallelParsingInputFormatThreads + +ParallelParsingInputFormatスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### ParallelParsingInputFormatThreadsActive + +ParallelParsingInputFormatスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### PartMutation + +ミューテーション(ALTER DELETE/UPDATE)ã®æ•°ã€‚ + +### PartsActive + +ç¾åœ¨ãŠã‚ˆã³ä»Šå¾Œã®SELECTã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã‚‹ã‚¢ã‚¯ãƒ†ã‚£ãƒ–データパート。 + +### PartsCommitted + +廃止ã•ã‚Œã¾ã—ãŸã€‚PartsActiveã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### PartsCompact + +コンパクトãªãƒ‘ーツ。 + +### PartsDeleteOnDestroy + +別ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«ç§»å‹•ã•ã‚Œã€ç‹¬è‡ªã®ãƒ‡ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã§å‰Šé™¤ã•ã‚Œã‚‹ãƒ‘ート。 + +### PartsDeleting + +アイデンティティå‚照カウンタをæŒã¤éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–データパートã§ã€ç¾åœ¨ã‚¯ãƒªãƒ¼ãƒŠãƒ¼ã«ã‚ˆã£ã¦å‰Šé™¤ä¸­ã€‚ + +### PartsOutdated + +éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–データパートã§ã™ãŒã€ç¾åœ¨ã®SELECTã«ã‚ˆã£ã¦ã®ã¿ä½¿ç”¨å¯èƒ½ã§ã€SELECTãŒçµ‚了ã—ãŸã‚‰å‰Šé™¤å¯èƒ½ã€‚ + +### PartsPreActive + +データパーツã«å­˜åœ¨ã—ã¾ã™ãŒã€SELECTã§ã¯ä½¿ç”¨ã•ã‚Œã¦ã„ãªã„。 + +### PartsPreCommitted + +廃止ã•ã‚Œã¾ã—ãŸã€‚PartsPreActiveã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### PartsTemporary + +ç¾åœ¨ç”Ÿæˆä¸­ã§ã€data_partsリストã«ã¯å­˜åœ¨ã—ã¾ã›ã‚“。 + +### PartsWide + +ワイドパーツ。 + +### PendingAsyncInsert + +フラッシュ待機中ã®éžåŒæœŸæŒ¿å…¥ã®æ•°ã€‚ + +### PostgreSQLConnection + +PostgreSQLプロトコルを使用ã—ã¦ã„るクライアント接続ã®æ•°ã€‚ + +### Query + +実行中ã®ã‚¯ã‚¨ãƒªã®æ•°ã€‚ + +### QueryPreempted + +「priorityã€è¨­å®šã®ãŸã‚ã«åœæ­¢ã—ã€å¾…機中ã®ã‚¯ã‚¨ãƒªã®æ•°ã€‚ + +### QueryThread + +クエリ処ç†ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### RWLockActiveReaders + +テーブルã®RWLockã§èª­ã¿å–りロックをä¿æŒã—ã¦ã„るスレッドã®æ•°ã€‚ + +### RWLockActiveWriters + +テーブルã®RWLockã§æ›¸ãè¾¼ã¿ãƒ­ãƒƒã‚¯ã‚’ä¿æŒã—ã¦ã„るスレッドã®æ•°ã€‚ + +### RWLockWaitingReaders + +テーブルã®RWLockã§èª­ã¿å–り待機中ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### RWLockWaitingWriters + +テーブルã®RWLockã§æ›¸ãè¾¼ã¿å¾…機中ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### Read + +リード(readã€preadã€io_geteventsãªã©ï¼‰ã‚·ã‚¹ãƒ†ãƒ ã‚³ãƒ¼ãƒ«ã®ãƒ•ãƒ©ã‚¤ãƒˆä¸­ã®æ•°ã€‚ + +### ReadTaskRequestsSent + +リモートサーãƒã‹ã‚‰èµ·å‹•ã‚µãƒ¼ãƒã¸ãƒ•ãƒ©ã‚¤ãƒˆä¸­ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æ•°ï¼ˆs3Clusterテーブル関数ãªã©ç”¨ï¼‰ã€‚リモートサーãƒå´ã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ + +### ReadonlyReplica + +ZooKeeperセッションã®å–ªå¤±å¾Œã®å†åˆæœŸåŒ–ã€ã¾ãŸã¯ZooKeeper未設定ã§ã®èµ·å‹•ã«ã‚ˆã‚Šã€ç¾åœ¨readonly状態ã®ãƒ¬ãƒ—リケートテーブルã®æ•°ã€‚ + +### RemoteRead + +リモートリーダーã§ã®ãƒ•ãƒ©ã‚¤ãƒˆä¸­ã®ãƒªãƒ¼ãƒ‰ã®æ•°ã€‚ + +### ReplicatedChecks + +一貫性をãƒã‚§ãƒƒã‚¯ã™ã‚‹ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®æ•°ã€‚ + +### ReplicatedFetch + +レプリカã‹ã‚‰ãƒ•ã‚§ãƒƒãƒä¸­ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®æ•°ã€‚ + +### ReplicatedSend + +レプリカã¸é€ä¿¡ä¸­ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®æ•°ã€‚ + +### RestartReplicaThreads + +RESTART REPLICAスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### RestartReplicaThreadsActive + +RESTART REPLICAスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### RestoreThreads + +RESTORE用スレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### RestoreThreadsActive + +RESTORE用スレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### Revision + +サーãƒã®ãƒªãƒ“ジョン。パッãƒãƒªãƒªãƒ¼ã‚¹ã‚’除ãã€ã™ã¹ã¦ã®ãƒªãƒªãƒ¼ã‚¹ã¾ãŸã¯ãƒªãƒªãƒ¼ã‚¹å€™è£œã§ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•ã‚Œã‚‹æ•°ã€‚ + +### S3Requests + +S3リクエスト。 + +### SendExternalTables + +リモートサーãƒã¸å¤–部テーブルã®ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ä¸­ã®æŽ¥ç¶šæ•°ã€‚外部テーブルã¯ã€åˆ†æ•£ã‚µãƒ–クエリを使用ã—ãŸGLOBAL INãŠã‚ˆã³GLOBAL JOIN演算å­ã‚’実装ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +### SendScalars + +リモートサーãƒã¸ã‚¹ã‚«ãƒ©ãƒ¼ã®ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ä¸­ã®æŽ¥ç¶šæ•°ã€‚ + +### StorageBufferBytes + +Bufferテーブルã®ãƒãƒƒãƒ•ã‚¡å†…ã®ãƒã‚¤ãƒˆæ•°ã€‚ + +### StorageBufferRows + +Bufferテーブルã®ãƒãƒƒãƒ•ã‚¡å†…ã®è¡Œæ•°ã€‚ + +### StorageDistributedThreads + +StorageDistributedスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### StorageDistributedThreadsActive + +StorageDistributedスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### StorageHiveThreads + +StorageHiveスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### StorageHiveThreadsActive + +StorageHiveスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### StorageS3Threads + +StorageS3スレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### StorageS3ThreadsActive + +StorageS3スレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### SystemReplicasThreads + +system.replicasスレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### SystemReplicasThreadsActive + +system.replicasスレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### TCPConnection + +TCPサーãƒã¸ã®æŽ¥ç¶šæ•°ï¼ˆãƒã‚¤ãƒ†ã‚£ãƒ–インターフェースをæŒã¤ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆï¼‰ã€ã‚µãƒ¼ãƒé–“ã®åˆ†æ•£ã‚¯ã‚¨ãƒªæŽ¥ç¶šã‚‚å«ã¾ã‚Œã‚‹ã€‚ + +### TablesToDropQueueSize + +背景ã§ã®ãƒ‡ãƒ¼ã‚¿å‰Šé™¤ã‚’å¾…æ©Ÿã—ã¦ã„る削除テーブルã®æ•°ã€‚ + +### TemporaryFilesForAggregation + +外部集計ã®ãŸã‚ã«ä½œæˆã•ã‚ŒãŸä¸€æ™‚ファイルã®æ•°ã€‚ + +### TemporaryFilesForJoin + +JOINã®ãŸã‚ã«ä½œæˆã•ã‚ŒãŸä¸€æ™‚ファイルã®æ•°ã€‚ + +### TemporaryFilesForSort + +外部ソートã®ãŸã‚ã«ä½œæˆã•ã‚ŒãŸä¸€æ™‚ファイルã®æ•°ã€‚ + +### TemporaryFilesUnknown + +目的ä¸æ˜Žã§ä½œæˆã•ã‚ŒãŸä¸€æ™‚ファイルã®æ•°ã€‚ + +### ThreadPoolFSReaderThreads + +local_filesystem_read_method=threadpool用スレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### ThreadPoolFSReaderThreadsActive + +local_filesystem_read_method=threadpool用スレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### ThreadPoolRemoteFSReaderThreads + +remote_filesystem_read_method=threadpool用スレッドプール内ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ + +### ThreadPoolRemoteFSReaderThreadsActive + +remote_filesystem_read_method=threadpool用スレッドプールã§ã‚¿ã‚¹ã‚¯ã‚’実行ã—ã¦ã„るスレッドã®æ•°ã€‚ + +### ThreadsInOvercommitTracker + +OvercommitTracker内ã§å¾…機中ã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ + +### TotalTemporaryFiles + +作æˆã•ã‚ŒãŸä¸€æ™‚ファイルã®æ•°ã€‚ + +### VersionInteger + +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’基数1000ã®å˜ä¸€æ•´æ•°ã§è¡¨ã—ãŸã‚µãƒ¼ãƒã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚例ãˆã°ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³11.22.33ã¯11022033ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +### Write + +書ãè¾¼ã¿ï¼ˆwriteã€pwriteã€io_geteventsãªã©ï¼‰ã‚·ã‚¹ãƒ†ãƒ ã‚³ãƒ¼ãƒ«ã®ãƒ•ãƒ©ã‚¤ãƒˆä¸­ã®æ•°ã€‚ + +### ZooKeeperRequest + +フライト中ã®ZooKeeperã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆæ•°ã€‚ + +### ZooKeeperSession + +ZooKeeperã¸ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ï¼ˆæŽ¥ç¶šï¼‰æ•°ã€‚ãƒã‚°ã®åŽŸå› ã¨ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ZooKeeperã¸ã®è¤‡æ•°æŽ¥ç¶šã‚’使用ã—ãªã„é™ã‚Šã€1を超ãˆãªã„よã†ã«ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ZooKeeperã®ä¸€è²«æ€§ãƒ¢ãƒ‡ãƒ«ãŒè¨±ã™ç›´ç·šåŒ–性ã®æ¬ å¦‚(å¤ã„読ã¿å–り)ã«ã‚ˆã‚‹ã‚‚ã®ã§ã™ã€‚ + +### ZooKeeperWatch + +ZooKeeperã§ã®ã‚¦ã‚©ãƒƒãƒï¼ˆã‚¤ãƒ™ãƒ³ãƒˆè³¼èª­ï¼‰ã®æ•°ã€‚ + +### ConcurrencyControlAcquired + +å–å¾—ã•ã‚ŒãŸCPUスロットã®ç·æ•°ã€‚ + +### ConcurrencyControlSoftLimit + +CPUスロット数ã®ã‚½ãƒ•ãƒˆãƒªãƒŸãƒƒãƒˆå€¤ã€‚ + +**å‚ç…§** + +- [system.asynchronous_metrics](../../operations/system-tables/asynchronous_metrics.md#system_tables-asynchronous_metrics) — 定期的ã«è¨ˆç®—ã•ã‚Œã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’å«ã¿ã¾ã™ã€‚ +- [system.events](../../operations/system-tables/events.md#system_tables-events) — 発生ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã®æ•°ã‚’å«ã¿ã¾ã™ã€‚ +- [system.metric_log](../../operations/system-tables/metric_log.md#system_tables-metric_log) — テーブル `system.metrics` 㨠`system.events` ã‹ã‚‰ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹å€¤ã®å±¥æ­´ã‚’å«ã¿ã¾ã™ã€‚ +- [モニタリング](../../operations/monitoring.md) — ClickHouseモニタリングã®åŸºæœ¬æ¦‚念。 diff --git a/docs/ja/operations/system-tables/moves.md b/docs/ja/operations/system-tables/moves.md new file mode 100644 index 00000000000..531fe1af5e7 --- /dev/null +++ b/docs/ja/operations/system-tables/moves.md @@ -0,0 +1,42 @@ +--- +slug: /ja/operations/system-tables/moves +--- +# moves + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€[MergeTree](/docs/ja/engines/table-engines/mergetree-family/mergetree.md) テーブルã®é€²è¡Œä¸­ã®[データパート移動](/docs/ja/sql-reference/statements/alter/partition#move-partitionpart)ã«é–¢ã™ã‚‹æƒ…å ±ãŒæ ¼ç´ã•ã‚Œã¦ã„ã¾ã™ã€‚å„データパートã®ç§»å‹•ã¯å˜ä¸€ã®è¡Œã§è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +カラム: + +- `database` ([String](/docs/ja/sql-reference/data-types/string.md)) — データベースã®åå‰ã€‚ + +- `table` ([String](/docs/ja/sql-reference/data-types/string.md)) — データパートãŒç§»å‹•ä¸­ã®ãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚ + +- `elapsed` ([Float64](../../sql-reference/data-types/float.md)) — データパートã®ç§»å‹•ãŒå§‹ã¾ã£ã¦ã‹ã‚‰çµŒéŽã—ãŸæ™‚間(秒)。 + +- `target_disk_name` ([String](disks.md)) — データパートãŒç§»å‹•ã™ã‚‹[ディスク](/docs/ja/operations/system-tables/disks/)ã®åå‰ã€‚ + +- `target_disk_path` ([String](disks.md)) — ファイルシステム内ã®[ディスク](/docs/ja/operations/system-tables/disks/)ã®ãƒžã‚¦ãƒ³ãƒˆãƒã‚¤ãƒ³ãƒˆã¸ã®ãƒ‘ス。 + +- `part_name` ([String](/docs/ja/sql-reference/data-types/string.md)) — 移動中ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ートã®åå‰ã€‚ + +- `part_size` ([UInt64](../../sql-reference/data-types/int-uint.md)) — データパートã®ã‚µã‚¤ã‚ºã€‚ + +- `thread_id` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 移動を行ã£ã¦ã„るスレッドã®è­˜åˆ¥å­ã€‚ + +**例** + +```sql +SELECT * FROM system.moves +``` + +```response +┌─database─┬─table─┬─────elapsed─┬─target_disk_name─┬─target_disk_path─┬─part_name─┬─part_size─┬─thread_id─┠+│ default │ test2 │ 1.668056039 │ s3 │ ./disks/s3/ │ all_3_3_0 │ 136 │ 296146 │ +└──────────┴───────┴─────────────┴──────────────────┴──────────────────┴───────────┴───────────┴───────────┘ +``` + +**関連項目** + +- [MergeTree](/docs/ja/engines/table-engines/mergetree-family/mergetree.md) テーブルエンジン +- [データストレージã®ãŸã‚ã®è¤‡æ•°ã®ãƒ–ロックデãƒã‚¤ã‚¹ã®ä½¿ç”¨](/docs/ja/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-multiple-volumes) +- [ALTER TABLE ... MOVE PART](/docs/ja/sql-reference/statements/alter/partition#move-partitionpart) コマンド diff --git a/docs/ja/operations/system-tables/mutations.md b/docs/ja/operations/system-tables/mutations.md new file mode 100644 index 00000000000..593966e93f5 --- /dev/null +++ b/docs/ja/operations/system-tables/mutations.md @@ -0,0 +1,63 @@ +--- +slug: /ja/operations/system-tables/mutations +--- +# mutations + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€[MergeTree](/docs/ja/engines/table-engines/mergetree-family/mergetree.md)テーブルã®[ミューテーション](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ãã®é€²æ—状æ³ã«é–¢ã™ã‚‹æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚å„ミューテーションコマンドã¯å˜ä¸€ã®è¡Œã§è¡¨ã•ã‚Œã¾ã™ã€‚ + +## カラム: + +- `database` ([String](/docs/ja/sql-reference/data-types/string.md)) — ミューテーションãŒé©ç”¨ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ + +- `table` ([String](/docs/ja/sql-reference/data-types/string.md)) — ミューテーションãŒé©ç”¨ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚ + +- `mutation_id` ([String](/docs/ja/sql-reference/data-types/string.md)) — ミューテーションã®ID。レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€ã“れらã®IDã¯ClickHouse Keeperã®`/mutations/`ディレクトリ内ã®znodeåã«å¯¾å¿œã—ã¾ã™ã€‚éžãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€IDã¯ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…ã®ãƒ•ã‚¡ã‚¤ãƒ«åã«å¯¾å¿œã—ã¾ã™ã€‚ + +- `command` ([String](/docs/ja/sql-reference/data-types/string.md)) — ミューテーションコマンド文字列(`ALTER TABLE [db.]table`ã®å¾Œã®ã‚¯ã‚¨ãƒªéƒ¨åˆ†ï¼‰ã€‚ + +- `create_time` ([DateTime](/docs/ja/sql-reference/data-types/datetime.md)) — ミューテーションコマンドãŒå®Ÿè¡Œã®ãŸã‚ã«é€ä¿¡ã•ã‚ŒãŸæ—¥æ™‚。 + +- `block_numbers.partition_id` ([Array](/docs/ja/sql-reference/data-types/array.md)([String](/docs/ja/sql-reference/data-types/string.md))) — レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®å ´åˆã€é…列ã¯ãƒ‘ーティションã®IDã‚’å«ã¿ã¾ã™ï¼ˆå„パーティションã«1ã¤ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ï¼‰ã€‚éžãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®å ´åˆã€é…列ã¯ç©ºã§ã™ã€‚ + +- `block_numbers.number` ([Array](/docs/ja/sql-reference/data-types/array.md)([Int64](/docs/ja/sql-reference/data-types/int-uint.md))) — レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®å ´åˆã€é…列ã¯å„パーティションã«1ã¤ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’å«ã¿ã€ãã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã«ã‚ˆã£ã¦å–å¾—ã•ã‚ŒãŸãƒ–ロック番å·ã‚’示ã—ã¦ã„ã¾ã™ã€‚ã“ã®ç•ªå·ã‚ˆã‚Šå°ã•ã„番å·ã‚’æŒã¤ãƒ–ロックをå«ã‚€ãƒ‘ーツã®ã¿ãŒãƒ‘ーティションã§ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã•ã‚Œã¾ã™ã€‚ + + éžãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã§ã¯ã€ã™ã¹ã¦ã®ãƒ‘ーティションã§ãƒ–ロック番å·ãŒå˜ä¸€ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’å½¢æˆã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€éžãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®å ´åˆã€ã‚«ãƒ©ãƒ ã¯ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã«ã‚ˆã£ã¦å–å¾—ã•ã‚ŒãŸå˜ä¸€ãƒ–ロック番å·ã‚’æŒã¤1ã¤ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’å«ã¿ã¾ã™ã€‚ + +- `parts_to_do_names` ([Array](/docs/ja/sql-reference/data-types/array.md)([String](/docs/ja/sql-reference/data-types/string.md))) — ミューテーションを完了ã™ã‚‹ãŸã‚ã«ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ãƒˆã™ã‚‹å¿…è¦ã®ã‚るデータパーツã®åå‰ã®é…列。 + +- `parts_to_do` ([Int64](/docs/ja/sql-reference/data-types/int-uint.md)) — ミューテーションを完了ã™ã‚‹ãŸã‚ã«ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ãƒˆãŒå¿…è¦ãªãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®æ•°ã€‚ + +- `is_done` ([UInt8](/docs/ja/sql-reference/data-types/int-uint.md)) — ミューテーションãŒå®Œäº†ã—ã¦ã„ã‚‹ã‹ã©ã†ã‹ã®ãƒ•ãƒ©ã‚°ã€‚å¯èƒ½ãªå€¤ï¼š + - ミューテーションãŒå®Œäº†ã—ã¦ã„ã‚‹å ´åˆã¯`1`〠+ - ミューテーションãŒã¾ã é€²è¡Œä¸­ã®å ´åˆã¯`0`。 + +:::note +`parts_to_do = 0`ã§ã‚ã£ã¦ã‚‚ã€ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãŒã¾ã å®Œäº†ã—ã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãã‚Œã¯ã€æ–°ã—ã„データパーツを作æˆã—ã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ãƒˆãŒå¿…è¦ãªé•·æ™‚間実行ã•ã‚Œã¦ã„ã‚‹`INSERT`クエリã®ãŸã‚ã§ã™ã€‚ +::: + +ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ãƒˆã«å•é¡ŒãŒã‚ã£ãŸå ´åˆã€æ¬¡ã®ã‚«ãƒ©ãƒ ã«è¿½åŠ æƒ…å ±ãŒå«ã¾ã‚Œã¾ã™ï¼š + +- `latest_failed_part` ([String](/docs/ja/sql-reference/data-types/string.md)) — ミューテートã§ããªã‹ã£ãŸæœ€æ–°ã®ãƒ‘ーツã®åå‰ã€‚ + +- `latest_fail_time` ([DateTime](/docs/ja/sql-reference/data-types/datetime.md)) — 最新ã®ãƒ‘ーツミューテーションã®å¤±æ•—日時。 + +- `latest_fail_reason` ([String](/docs/ja/sql-reference/data-types/string.md)) — 最新ã®ãƒ‘ーツミューテーション失敗を引ãèµ·ã“ã—ãŸä¾‹å¤–メッセージ。 + +## ミューテーションã®ç›£è¦– + +`system.mutations`テーブルã§é€²æ—を追跡ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã‚’使用ã—ã¾ã™ - ã“ã‚Œã«ã¯`system.*`テーブルã®èª­ã¿å–り権é™ãŒå¿…è¦ã§ã™ï¼š + +``` sql +SELECT * FROM clusterAllReplicas('cluster_name', 'db', system.mutations) +WHERE is_done=0 AND table='tmp'; +``` + +:::tip +`table='tmp'`ã®`tmp`ã‚’ã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’確èªã—ã¦ã„るテーブルã®åå‰ã«ç½®ãæ›ãˆã¦ãã ã•ã„。 +::: + +**関連情報** + +- [ミューテーション](/docs/ja/sql-reference/statements/alter/index.md#mutations) +- [MergeTree](/docs/ja/engines/table-engines/mergetree-family/mergetree.md)テーブルエンジン +- [ReplicatedMergeTree](/docs/ja/engines/table-engines/mergetree-family/replication.md)ファミリー diff --git a/docs/ja/operations/system-tables/numbers.md b/docs/ja/operations/system-tables/numbers.md new file mode 100644 index 00000000000..7bf5f3de2f1 --- /dev/null +++ b/docs/ja/operations/system-tables/numbers.md @@ -0,0 +1,57 @@ +--- +slug: /ja/operations/system-tables/numbers +--- +# numbers + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ã‚¼ãƒ­ã‹ã‚‰å§‹ã¾ã‚‹ã»ã¼ã™ã¹ã¦ã®è‡ªç„¶æ•°ã‚’å«ã‚€å˜ä¸€ã®UInt64カラム`number`ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ãƒ†ã‚¹ãƒˆç”¨ã€ã¾ãŸã¯ãƒ–ルートフォース検索ãŒå¿…è¦ãªå ´åˆã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®èª­ã¿å–ã‚Šã¯ä¸¦åˆ—化ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +**例** + +```sql +SELECT * FROM system.numbers LIMIT 10; +``` + +```response +┌─number─┠+│ 0 │ +│ 1 │ +│ 2 │ +│ 3 │ +│ 4 │ +│ 5 │ +│ 6 │ +│ 7 │ +│ 8 │ +│ 9 │ +└────────┘ + +10 rows in set. Elapsed: 0.001 sec. +``` + +出力をæ¡ä»¶ã§åˆ¶é™ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +```sql +SELECT * FROM system.numbers < 10; +``` + +```response +┌─number─┠+│ 0 │ +│ 1 │ +│ 2 │ +│ 3 │ +│ 4 │ +│ 5 │ +│ 6 │ +│ 7 │ +│ 8 │ +│ 9 │ +└────────┘ + +10 rows in set. Elapsed: 0.001 sec. +``` + diff --git a/docs/ja/operations/system-tables/numbers_mt.md b/docs/ja/operations/system-tables/numbers_mt.md new file mode 100644 index 00000000000..6cc69afe181 --- /dev/null +++ b/docs/ja/operations/system-tables/numbers_mt.md @@ -0,0 +1,31 @@ +--- +slug: /ja/operations/system-tables/numbers_mt +--- +# numbers_mt + +[system.numbers](../../operations/system-tables/numbers.md) ã¨åŒæ§˜ã§ã™ãŒã€èª­ã¿è¾¼ã¿ãŒä¸¦åˆ—化ã•ã‚Œã¦ã„ã¾ã™ã€‚数値ã¯ä»»æ„ã®é †åºã§è¿”ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +テストã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +```sql +SELECT * FROM system.numbers_mt LIMIT 10; +``` + +```response +┌─number─┠+│ 0 │ +│ 1 │ +│ 2 │ +│ 3 │ +│ 4 │ +│ 5 │ +│ 6 │ +│ 7 │ +│ 8 │ +│ 9 │ +└────────┘ + +10 rows in set. Elapsed: 0.001 sec. +``` diff --git a/docs/ja/operations/system-tables/one.md b/docs/ja/operations/system-tables/one.md new file mode 100644 index 00000000000..ecf8c86e2ee --- /dev/null +++ b/docs/ja/operations/system-tables/one.md @@ -0,0 +1,24 @@ +--- +slug: /ja/operations/system-tables/one +--- +# one + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€å€¤ãŒ0ã®`dummy`ã¨ã„ã†å˜ä¸€ã®UInt8åž‹ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ã€1ã¤ã®è¡Œã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€`SELECT`クエリãŒ`FROM`å¥ã‚’指定ã—ãªã„å ´åˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +ã“ã‚Œã¯ã€ä»–ã®DBMSã«è¦‹ã‚‰ã‚Œã‚‹`DUAL`テーブルã¨ä¼¼ã¦ã„ã¾ã™ã€‚ + +**例** + +```sql +SELECT * FROM system.one LIMIT 10; +``` + +```response +┌─dummy─┠+│ 0 │ +└───────┘ + +1 rows in set. Elapsed: 0.001 sec. +``` diff --git a/docs/ja/operations/system-tables/opentelemetry_span_log.md b/docs/ja/operations/system-tables/opentelemetry_span_log.md new file mode 100644 index 00000000000..8da6a0084af --- /dev/null +++ b/docs/ja/operations/system-tables/opentelemetry_span_log.md @@ -0,0 +1,53 @@ +--- +slug: /ja/operations/system-tables/opentelemetry_span_log +--- +# opentelemetry_span_log + +クエリãŒå®Ÿè¡Œã•ã‚ŒãŸéš›ã®[トレーススパン](https://opentracing.io/docs/overview/spans/)ã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `trace_id` ([UUID](../../sql-reference/data-types/uuid.md)) — 実行ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã®ãƒˆãƒ¬ãƒ¼ã‚¹ID。 +- `span_id` ([UInt64](../../sql-reference/data-types/int-uint.md)) — `トレーススパン`ã®ID。 +- `parent_span_id` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 親ã®`トレーススパン`ã®ID。 +- `operation_name` ([String](../../sql-reference/data-types/string.md)) — æ“作ã®åå‰ã€‚ +- `kind` ([Enum8](../../sql-reference/data-types/enum.md)) — スパンã®[SpanKind](https://opentelemetry.io/docs/reference/specification/trace/api/#spankind)。 + - `INTERNAL` — スパンãŒã‚¢ãƒ—リケーション内ã®å†…部æ“作を表ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ + - `SERVER` — スパンãŒåŒæœŸRPCã¾ãŸã¯ä»–ã®ãƒªãƒ¢ãƒ¼ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ã‚µãƒ¼ãƒãƒ¼å´å‡¦ç†ã‚’ã‚«ãƒãƒ¼ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ + - `CLIENT` — スパンãŒä½•ã‚‰ã‹ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒ“スã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’記述ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ + - `PRODUCER` — スパンãŒéžåŒæœŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã®é–‹å§‹ã‚’記述ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ã“ã®è¦ªã‚¹ãƒ‘ンã¯ã€ã—ã°ã—ã°å¯¾å¿œã™ã‚‹å­CONSUMERスパンãŒå§‹ã¾ã‚‹å‰ã«çµ‚了ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + - `CONSUMER` - スパンãŒéžåŒæœŸPRODUCERリクエストã®å­ã‚’記述ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ +- `start_time_us` ([UInt64](../../sql-reference/data-types/int-uint.md)) — `トレーススパン`ã®é–‹å§‹æ™‚間(マイクロ秒å˜ä½ï¼‰ã€‚ +- `finish_time_us` ([UInt64](../../sql-reference/data-types/int-uint.md)) — `トレーススパン`ã®çµ‚了時間(マイクロ秒å˜ä½ï¼‰ã€‚ +- `finish_date` ([Date](../../sql-reference/data-types/date.md)) — `トレーススパン`ã®çµ‚了日。 +- `attribute.names` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — `トレーススパン`ã«ä¾å­˜ã™ã‚‹[属性](https://opentelemetry.io/docs/go/instrumentation/#attributes)å。`OpenTelemetry`標準ã®æŽ¨å¥¨ã«å¾“ã£ã¦è¨˜å…¥ã•ã‚Œã¾ã™ã€‚ +- `attribute.values` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — `トレーススパン`ã«ä¾å­˜ã™ã‚‹å±žæ€§å€¤ã€‚`OpenTelemetry`標準ã®æŽ¨å¥¨ã«å¾“ã£ã¦è¨˜å…¥ã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT * FROM system.opentelemetry_span_log LIMIT 1 FORMAT Vertical; +``` + +çµæžœ: + +``` text +Row 1: +────── +trace_id: cdab0847-0d62-61d5-4d38-dd65b19a1914 +span_id: 701487461015578150 +parent_span_id: 2991972114672045096 +operation_name: DB::Block DB::InterpreterSelectQuery::getSampleBlockImpl() +kind: INTERNAL +start_time_us: 1612374594529090 +finish_time_us: 1612374594529108 +finish_date: 2021-02-03 +attribute.names: [] +attribute.values: [] +``` + +**関連情報** + +- [OpenTelemetry](../../operations/opentelemetry.md) diff --git a/docs/ja/operations/system-tables/part_log.md b/docs/ja/operations/system-tables/part_log.md new file mode 100644 index 00000000000..d565411680d --- /dev/null +++ b/docs/ja/operations/system-tables/part_log.md @@ -0,0 +1,85 @@ +--- +slug: /ja/operations/system-tables/part_log +--- +# part_log + +`system.part_log`テーブルã¯ã€[part_log](../../operations/server-configuration-parameters/settings.md#part-log)サーãƒãƒ¼è¨­å®šãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã®ã¿ä½œæˆã•ã‚Œã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’追加ã—ãŸã‚Šãƒžãƒ¼ã‚¸ã™ã‚‹ãªã©ã€[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md)ファミリーã®ãƒ†ãƒ¼ãƒ–ルã§[データパーツ](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)ã«ç™ºç”Ÿã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +`system.part_log`テーブルã«ã¯æ¬¡ã®ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ï¼š + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `query_id` ([String](../../sql-reference/data-types/string.md)) — ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを作æˆã—ãŸ`INSERT`クエリã®è­˜åˆ¥å­ã€‚ +- `event_type` ([Enum8](../../sql-reference/data-types/enum.md)) — データパーツã«ç™ºç”Ÿã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã®ã‚¿ã‚¤ãƒ—。次ã®ã„ãšã‚Œã‹ã®å€¤ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ï¼š + - `NewPart` — æ–°ã—ã„データパーツã®æŒ¿å…¥ã€‚ + - `MergePartsStart` — データパーツã®ãƒžãƒ¼ã‚¸ãŒé–‹å§‹ã•ã‚ŒãŸã€‚ + - `MergeParts` — データパーツã®ãƒžãƒ¼ã‚¸ãŒå®Œäº†ã—ãŸã€‚ + - `DownloadPart` — データパーツã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã€‚ + - `RemovePart` — [DETACH PARTITION](../../sql-reference/statements/alter/partition.md#alter_detach-partition)を使用ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®å‰Šé™¤ã¾ãŸã¯ãƒ‡ã‚¿ãƒƒãƒã€‚ + - `MutatePartStart` — データパーツã®å¤‰ç•°ãŒé–‹å§‹ã•ã‚ŒãŸã€‚ + - `MutatePart` — データパーツã®å¤‰ç•°ãŒå®Œäº†ã—ãŸã€‚ + - `MovePart` — データパーツをã‚るディスクã‹ã‚‰åˆ¥ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«ç§»å‹•ã™ã‚‹ã€‚ +- `merge_reason` ([Enum8](../../sql-reference/data-types/enum.md)) — `MERGE_PARTS`タイプã®ã‚¤ãƒ™ãƒ³ãƒˆã®ç†ç”±ã€‚次ã®ã„ãšã‚Œã‹ã®å€¤ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ï¼š + - `NotAMerge` — ç¾åœ¨ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯`MERGE_PARTS`以外ã®ã‚¿ã‚¤ãƒ—ã§ã™ã€‚ + - `RegularMerge` — 通常ã®ãƒžãƒ¼ã‚¸ã€‚ + - `TTLDeleteMerge` — 有効期é™åˆ‡ã‚Œãƒ‡ãƒ¼ã‚¿ã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—。 + - `TTLRecompressMerge` — データパーツã®å†åœ§ç¸®ã€‚ +- `merge_algorithm` ([Enum8](../../sql-reference/data-types/enum.md)) — `MERGE_PARTS`タイプã®ã‚¤ãƒ™ãƒ³ãƒˆã®ãƒžãƒ¼ã‚¸ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã€‚次ã®ã„ãšã‚Œã‹ã®å€¤ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ï¼š + - `Undecided` + - `Horizontal` + - `Vertical` +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — イベントã®æ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — イベントã®æ™‚刻。 +- `event_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒å˜ä½ã®ç²¾åº¦ã§ã®ã‚¤ãƒ™ãƒ³ãƒˆã®æ™‚刻。 +- `duration_ms` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 所è¦æ™‚間。 +- `database` ([String](../../sql-reference/data-types/string.md)) — データパーツãŒå­˜åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `table` ([String](../../sql-reference/data-types/string.md)) — データパーツãŒå­˜åœ¨ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚ +- `part_name` ([String](../../sql-reference/data-types/string.md)) — データパーツã®åå‰ã€‚ +- `partition_id` ([String](../../sql-reference/data-types/string.md)) — データパーツãŒæŒ¿å…¥ã•ã‚ŒãŸãƒ‘ーティションã®ID。パーティショニングãŒ`tuple()`ã®å ´åˆã€ã“ã®ã‚«ãƒ©ãƒ ã¯`all`ã®å€¤ã‚’å–ã‚Šã¾ã™ã€‚ +- `path_on_disk` ([String](../../sql-reference/data-types/string.md)) — データパーツファイルをå«ã‚€ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã¸ã®çµ¶å¯¾ãƒ‘ス。 +- `rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — データパーツ内ã®è¡Œæ•°ã€‚ +- `size_in_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — データパーツã®ãƒã‚¤ãƒˆå˜ä½ã®ã‚µã‚¤ã‚ºã€‚ +- `merged_from` ([Array(String)](../../sql-reference/data-types/array.md)) — ç¾åœ¨ã®ãƒ‘ーツãŒãƒžãƒ¼ã‚¸å¾Œã«ä½œã‚‰ã‚ŒãŸå…ƒã®ãƒ‘ーツã®åå‰ã®é…列。 +- `bytes_uncompressed` ([UInt64](../../sql-reference/data-types/int-uint.md)) — éžåœ§ç¸®ãƒã‚¤ãƒˆã®ã‚µã‚¤ã‚ºã€‚ +- `read_rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — マージ中ã«èª­ã¿å–られãŸè¡Œæ•°ã€‚ +- `read_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — マージ中ã«èª­ã¿å–られãŸãƒã‚¤ãƒˆæ•°ã€‚ +- `peak_memory_usage` ([Int64](../../sql-reference/data-types/int-uint.md)) — ã“ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã®å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã¨è§£æ”¾ã•ã‚ŒãŸãƒ¡ãƒ¢ãƒªã®å·®ã®æœ€å¤§å€¤ã€‚ +- `error` ([UInt16](../../sql-reference/data-types/int-uint.md)) — 発生ã—ãŸã‚¨ãƒ©ãƒ¼ã®ã‚³ãƒ¼ãƒ‰ç•ªå·ã€‚ +- `exception` ([String](../../sql-reference/data-types/string.md)) — 発生ã—ãŸã‚¨ãƒ©ãƒ¼ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€‚ + +`system.part_log`テーブルã¯ã€æœ€åˆã®ãƒ‡ãƒ¼ã‚¿ãŒ`MergeTree`テーブルã«æŒ¿å…¥ã•ã‚ŒãŸå¾Œã«ä½œæˆã•ã‚Œã¾ã™ã€‚ + +**例** + +``` sql +SELECT * FROM system.part_log LIMIT 1 FORMAT Vertical; +``` + +``` text +Row 1: +────── +hostname: clickhouse.eu-central1.internal +query_id: 983ad9c7-28d5-4ae1-844e-603116b7de31 +event_type: NewPart +merge_reason: NotAMerge +merge_algorithm: Undecided +event_date: 2021-02-02 +event_time: 2021-02-02 11:14:28 +event_time_microseconds: 2021-02-02 11:14:28.861919 +duration_ms: 35 +database: default +table: log_mt_2 +part_name: all_1_1_0 +partition_id: all +path_on_disk: db/data/default/log_mt_2/all_1_1_0/ +rows: 115418 +size_in_bytes: 1074311 +merged_from: [] +bytes_uncompressed: 0 +read_rows: 0 +read_bytes: 0 +peak_memory_usage: 0 +error: 0 +exception: +``` diff --git a/docs/ja/operations/system-tables/parts.md b/docs/ja/operations/system-tables/parts.md new file mode 100644 index 00000000000..45c657b1ced --- /dev/null +++ b/docs/ja/operations/system-tables/parts.md @@ -0,0 +1,171 @@ +--- +slug: /ja/operations/system-tables/parts +--- +# parts {#system_tables-parts} + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブルã®ãƒ‘ーツã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +å„è¡ŒãŒä¸€ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを説明ã—ã¾ã™ã€‚ + +カラム: + +- `partition` ([String](../../sql-reference/data-types/string.md)) – パーティションå。パーティションã¨ã¯ä½•ã‹ã‚’知るã«ã¯ã€[ALTER](../../sql-reference/statements/alter/index.md#query_language_queries_alter) クエリã®èª¬æ˜Žã‚’ã”覧ãã ã•ã„。 + + フォーマット: + + - `YYYYMM` 自動的ã«æœˆã”ã¨ã«ãƒ‘ーティション分割ã•ã‚Œã¾ã™ã€‚ + - `any_string` 手動ã§ãƒ‘ーティション分割ã•ã‚ŒãŸå ´åˆã€‚ + +- `name` ([String](../../sql-reference/data-types/string.md)) – データパーツã®åå‰ã€‚ + +- `part_type` ([String](../../sql-reference/data-types/string.md)) — データパーツã®ä¿å­˜ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚ + + 値ã®å¯èƒ½æ€§: + + - `Wide` — å„カラムãŒãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ å†…ã®åˆ¥ã€…ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + - `Compact` — ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ å†…ã®1ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + + データã®ä¿å­˜ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブル㮠`min_bytes_for_wide_part` ãŠã‚ˆã³ `min_rows_for_wide_part` 設定ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ + +- `active` ([UInt8](../../sql-reference/data-types/int-uint.md)) – データパーツãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã‚ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚データパーツãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã‚ã‚Œã°ã€ãƒ†ãƒ¼ãƒ–ルã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚アクティブã§ãªã„å ´åˆã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã¯ãƒžãƒ¼ã‚¸å¾Œã«æ®‹ã‚Šã¾ã™ã€‚ + +- `marks` ([UInt64](../../sql-reference/data-types/int-uint.md)) – マークã®æ•°ã€‚データパーツ内ã®è¡Œæ•°ã‚’ãŠãŠã‚ˆã求ã‚ã‚‹ã«ã¯ã€`marks` ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç²’度(通常8192)を掛ã‘ã¾ã™ï¼ˆã“ã®ãƒ’ントã¯ã‚¢ãƒ€ãƒ—ティブ粒度ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“)。 + +- `rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) – 行数。 + +- `bytes_on_disk` ([UInt64](../../sql-reference/data-types/int-uint.md)) – データパーツファイル全体ã®ãƒã‚¤ãƒˆå˜ä½ã®ã‚µã‚¤ã‚ºã€‚ + +- `data_compressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) – データパーツ内ã®åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ç·ã‚µã‚¤ã‚ºã€‚補助ファイル(例: マーク付ãã®ãƒ•ã‚¡ã‚¤ãƒ«ï¼‰ã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。 + +- `data_uncompressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) – データパーツ内ã®éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ç·ã‚µã‚¤ã‚ºã€‚補助ファイル(例: マーク付ãã®ãƒ•ã‚¡ã‚¤ãƒ«ï¼‰ã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。 + +- `primary_key_size` ([UInt64](../../sql-reference/data-types/int-uint.md)) – ディスク上㮠primary.idx/cidx ファイル内ã§ä¸»ã‚­ãƒ¼å€¤ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¡ãƒ¢ãƒªé‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `marks_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) – マーク付ãファイルã®ã‚µã‚¤ã‚ºã€‚ + +- `secondary_indices_compressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) – データパーツ内ã®ã‚»ã‚«ãƒ³ãƒ€ãƒªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç”¨ã®åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ç·ã‚µã‚¤ã‚ºã€‚補助ファイル(例: マーク付ãã®ãƒ•ã‚¡ã‚¤ãƒ«ï¼‰ã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。 + +- `secondary_indices_uncompressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) – データパーツ内ã®ã‚»ã‚«ãƒ³ãƒ€ãƒªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç”¨ã®éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ç·ã‚µã‚¤ã‚ºã€‚補助ファイル(例: マーク付ãã®ãƒ•ã‚¡ã‚¤ãƒ«ï¼‰ã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。 + +- `secondary_indices_marks_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) – セカンダリインデックス用ã®ãƒžãƒ¼ã‚¯ä»˜ãファイルã®ã‚µã‚¤ã‚ºã€‚ + +- `modification_time` ([DateTime](../../sql-reference/data-types/datetime.md)) – データパーツã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãŒå¤‰æ›´ã•ã‚ŒãŸæ™‚間。通常ã¯ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ä½œæˆæ™‚é–“ã«å¯¾å¿œã—ã¾ã™ã€‚ + +- `remove_time` ([DateTime](../../sql-reference/data-types/datetime.md)) – データパーツãŒéžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«ãªã£ãŸæ™‚間。 + +- `refcount` ([UInt32](../../sql-reference/data-types/int-uint.md)) – データパーツãŒä½¿ç”¨ã•ã‚Œã¦ã„る場所ã®æ•°ã€‚2以上ã®å€¤ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツãŒã‚¯ã‚¨ãƒªã‚„マージã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ + +- `min_date` ([Date](../../sql-reference/data-types/date.md)) – データパーツ内ã®æ—¥ä»˜ã‚­ãƒ¼ã®æœ€å°å€¤ã€‚ + +- `max_date` ([Date](../../sql-reference/data-types/date.md)) – データパーツ内ã®æ—¥ä»˜ã‚­ãƒ¼ã®æœ€å¤§å€¤ã€‚ + +- `min_time` ([DateTime](../../sql-reference/data-types/datetime.md)) – データパーツ内ã®æ—¥ä»˜ã¨æ™‚間キーã®æœ€å°å€¤ã€‚ + +- `max_time` ([DateTime](../../sql-reference/data-types/datetime.md)) – データパーツ内ã®æ—¥ä»˜ã¨æ™‚間キーã®æœ€å¤§å€¤ã€‚ + +- `partition_id` ([String](../../sql-reference/data-types/string.md)) – パーティションã®ID。 + +- `min_block_number` ([UInt64](../../sql-reference/data-types/int-uint.md)) – マージ後ã®ç¾åœ¨ã®ãƒ‘ーツを構æˆã™ã‚‹æœ€å°ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツ数。 + +- `max_block_number` ([UInt64](../../sql-reference/data-types/int-uint.md)) – マージ後ã®ç¾åœ¨ã®ãƒ‘ーツを構æˆã™ã‚‹æœ€å¤§ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツ数。 + +- `level` ([UInt32](../../sql-reference/data-types/int-uint.md)) – マージツリーã®æ·±ã•ã€‚0ã¯ã€ç¾åœ¨ã®ãƒ‘ーツãŒä»–ã®ãƒ‘ーツã¨ã®ãƒžãƒ¼ã‚¸ã§ã¯ãªã挿入ã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +- `data_version` ([UInt64](../../sql-reference/data-types/int-uint.md)) – データパーツã«é©ç”¨ã™ã¹ãミューテーションを判断ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ç•ªå·ï¼ˆ`data_version` より高ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãŒé©ç”¨ã•ã‚Œã‚‹ï¼‰ã€‚ + +- `primary_key_bytes_in_memory` ([UInt64](../../sql-reference/data-types/int-uint.md)) – 主キー値ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `primary_key_bytes_in_memory_allocated` ([UInt64](../../sql-reference/data-types/int-uint.md)) – 主キー値ã®ãŸã‚ã«äºˆç´„ã•ã‚ŒãŸãƒ¡ãƒ¢ãƒªé‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `is_frozen` ([UInt8](../../sql-reference/data-types/int-uint.md)) – パーティションデータã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå­˜åœ¨ã™ã‚‹ã“ã¨ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚1ã¯å­˜åœ¨ã™ã‚‹ã“ã¨ã‚’示ã—ã€0ã¯å­˜åœ¨ã—ãªã„ã“ã¨ã‚’示ã—ã¾ã™ã€‚詳細㯠[FREEZE PARTITION](../../sql-reference/statements/alter/partition.md/#alter_freeze-partition) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +- `database` ([String](../../sql-reference/data-types/string.md)) – データベースã®åå‰ã€‚ + +- `table` ([String](../../sql-reference/data-types/string.md)) – テーブルã®åå‰ã€‚ + +- `engine` ([String](../../sql-reference/data-types/string.md)) – パラメータをå«ã¾ãªã„テーブルエンジンã®åå‰ã€‚ + +- `path` ([String](../../sql-reference/data-types/string.md)) – データパーツファイルã®ãƒ•ã‚©ãƒ«ãƒ€ã¸ã®çµ¶å¯¾ãƒ‘ス。 + +- `disk_name` ([String](../../sql-reference/data-types/string.md)) – データパーツをä¿å­˜ã—ã¦ã„るディスクã®åå‰ã€‚ + +- `hash_of_all_files` ([String](../../sql-reference/data-types/string.md)) – 圧縮ファイル㮠[sipHash128](../../sql-reference/functions/hash-functions.md/#hash_functions-siphash128)。 + +- `hash_of_uncompressed_files` ([String](../../sql-reference/data-types/string.md)) – éžåœ§ç¸®ãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆãƒžãƒ¼ã‚¯ä»˜ãã®ãƒ•ã‚¡ã‚¤ãƒ«ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ãªã©ï¼‰ã® [sipHash128](../../sql-reference/functions/hash-functions.md/#hash_functions-siphash128)。 + +- `uncompressed_hash_of_compressed_files` ([String](../../sql-reference/data-types/string.md)) – 圧縮ファイルãŒéžåœ§ç¸®ã§ã‚ã‚‹ã‹ã®ã‚ˆã†ã«ãƒ‡ãƒ¼ã‚¿å†…ã® [sipHash128](../../sql-reference/functions/hash-functions.md/#hash_functions-siphash128)。 + +- `delete_ttl_info_min` ([DateTime](../../sql-reference/data-types/datetime.md)) — [TTL DELETE ルール](../../engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-ttl)ã®ãŸã‚ã®æ—¥ä»˜ã¨æ™‚間キーã®æœ€å°å€¤ã€‚ + +- `delete_ttl_info_max` ([DateTime](../../sql-reference/data-types/datetime.md)) — [TTL DELETE ルール](../../engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-ttl)ã®ãŸã‚ã®æ—¥ä»˜ã¨æ™‚間キーã®æœ€å¤§å€¤ã€‚ + +- `move_ttl_info.expression` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — å¼ã®é…列。å„å¼ã¯[TLL MOVE ルール](../../engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-ttl)を定義ã—ã¾ã™ã€‚ + +:::note +`move_ttl_info.expression` é…列ã¯ä¸»ã«å¾Œæ–¹äº’æ›æ€§ã®ãŸã‚ã«ä¿æŒã•ã‚Œã¦ã„ã¾ã™ã€‚ç¾åœ¨ã€`TTL MOVE` ルールを確èªã™ã‚‹æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯ `move_ttl_info.min` 㨠`move_ttl_info.max` フィールドを使用ã™ã‚‹ã“ã¨ã§ã™ã€‚ +::: + +- `move_ttl_info.min` ([Array](../../sql-reference/data-types/array.md)([DateTime](../../sql-reference/data-types/datetime.md))) — 日付ã¨æ™‚é–“ã®å€¤ã®é…列。å„è¦ç´ ã¯ [TTL MOVE ルール](../../engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-ttl)ã®ãŸã‚ã®ã‚­ãƒ¼å€¤ã®æœ€å°å€¤ã‚’示ã—ã¾ã™ã€‚ + +- `move_ttl_info.max` ([Array](../../sql-reference/data-types/array.md)([DateTime](../../sql-reference/data-types/datetime.md))) — 日付ã¨æ™‚é–“ã®å€¤ã®é…列。å„è¦ç´ ã¯ [TTL MOVE ルール](../../engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-ttl)ã®ãŸã‚ã®ã‚­ãƒ¼å€¤ã®æœ€å¤§å€¤ã‚’示ã—ã¾ã™ã€‚ + +- `bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) – `bytes_on_disk` ã®åˆ¥å。 + +- `marks_size` ([UInt64](../../sql-reference/data-types/int-uint.md)) – `marks_bytes` ã®åˆ¥å。 + +**例** + +``` sql +SELECT * FROM system.parts LIMIT 1 FORMAT Vertical; +``` + +``` text +Row 1: +────── +partition: tuple() +name: all_1_4_1_6 +part_type: Wide +active: 1 +marks: 2 +rows: 6 +bytes_on_disk: 310 +data_compressed_bytes: 157 +data_uncompressed_bytes: 91 +secondary_indices_compressed_bytes: 58 +secondary_indices_uncompressed_bytes: 6 +secondary_indices_marks_bytes: 48 +marks_bytes: 144 +modification_time: 2020-06-18 13:01:49 +remove_time: 1970-01-01 00:00:00 +refcount: 1 +min_date: 1970-01-01 +max_date: 1970-01-01 +min_time: 1970-01-01 00:00:00 +max_time: 1970-01-01 00:00:00 +partition_id: all +min_block_number: 1 +max_block_number: 4 +level: 1 +data_version: 6 +primary_key_bytes_in_memory: 8 +primary_key_bytes_in_memory_allocated: 64 +is_frozen: 0 +database: default +table: months +engine: MergeTree +disk_name: default +path: /var/lib/clickhouse/data/default/months/all_1_4_1_6/ +hash_of_all_files: 2d0657a16d9430824d35e327fcbd87bf +hash_of_uncompressed_files: 84950cc30ba867c77a408ae21332ba29 +uncompressed_hash_of_compressed_files: 1ad78f1c6843bbfb99a2c931abe7df7d +delete_ttl_info_min: 1970-01-01 00:00:00 +delete_ttl_info_max: 1970-01-01 00:00:00 +move_ttl_info.expression: [] +move_ttl_info.min: [] +move_ttl_info.max: [] +``` + +**関連項目** + +- [MergeTree ファミリー](../../engines/table-engines/mergetree-family/mergetree.md) +- [カラムã¨ãƒ†ãƒ¼ãƒ–ルã®TTL](../../engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-ttl) diff --git a/docs/ja/operations/system-tables/parts_columns.md b/docs/ja/operations/system-tables/parts_columns.md new file mode 100644 index 00000000000..f367368cab8 --- /dev/null +++ b/docs/ja/operations/system-tables/parts_columns.md @@ -0,0 +1,149 @@ +--- +slug: /ja/operations/system-tables/parts_columns +--- +# parts_columns + +[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブルã®ãƒ‘ーツã¨ã‚«ãƒ©ãƒ ã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +å„è¡Œã¯ä¸€ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを示ã—ã¾ã™ã€‚ + +カラム: + +- `partition` ([String](../../sql-reference/data-types/string.md)) — パーティションå。[ALTER](../../sql-reference/statements/alter/index.md#query_language_queries_alter) クエリã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ã€ãƒ‘ーティションãŒä½•ã‹ã‚’学んã§ãã ã•ã„。 + + フォーマット: + + - `YYYYMM` 自動月ã”ã¨ã®ãƒ‘ーティション分割ã®å ´åˆã€‚ + - `any_string` 手動ã§ã®ãƒ‘ーティション分割ã®å ´åˆã€‚ + +- `name` ([String](../../sql-reference/data-types/string.md)) — データパーツã®åå‰ã€‚ + +- `part_type` ([String](../../sql-reference/data-types/string.md)) — データパーツã®ä¿å­˜ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚ + + å¯èƒ½ãªå€¤: + + - `Wide` — å„カラムãŒãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ å†…ã®åˆ¥å€‹ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ + - `Compact` — 全カラムãŒãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ å†…ã®ä¸€ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ + + データä¿å­˜ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブル㮠`min_bytes_for_wide_part` 㨠`min_rows_for_wide_part` 設定ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ + +- `active` ([UInt8](../../sql-reference/data-types/int-uint.md)) — データパーツãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚データパーツãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã‚ã‚Œã°ãƒ†ãƒ¼ãƒ–ルã§ä½¿ç”¨ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°å‰Šé™¤ã•ã‚Œã¾ã™ã€‚éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã¯ãƒžãƒ¼ã‚¸å¾Œã«æ®‹ã‚Šã¾ã™ã€‚ + +- `marks` ([UInt64](../../sql-reference/data-types/int-uint.md)) — マークã®æ•°ã€‚データパーツ内ã®è¡Œæ•°ã‚’概算ã™ã‚‹ãŸã‚ã«ã¯ã€`marks` をインデックス粒度(通常8192)ã¨æŽ›ã‘ã¦ãã ã•ã„(ã“ã®ãƒ’ントã¯é©å¿œçš„ãªç²’度ã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“)。 + +- `rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 行数。 + +- `bytes_on_disk` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツファイルã®åˆè¨ˆã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `data_compressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — データパーツ内ã®åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ç·ã‚µã‚¤ã‚ºã€‚補助ファイル(例ãˆã°ã€ãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ãªã©ï¼‰ã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。 + +- `data_uncompressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — データパーツ内ã®éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ç·ã‚µã‚¤ã‚ºã€‚補助ファイル(例ãˆã°ã€ãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ãªã©ï¼‰ã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。 + +- `marks_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — マークをå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚µã‚¤ã‚ºã€‚ + +- `modification_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — データパーツãŒå«ã¾ã‚Œã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãŒå¤‰æ›´ã•ã‚ŒãŸæ™‚間。ã“ã‚Œã¯é€šå¸¸ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ä½œæˆæ™‚é–“ã«ç›¸å½“ã—ã¾ã™ã€‚ + +- `remove_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — データパーツãŒéžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«ãªã£ãŸæ™‚間。 + +- `refcount` ([UInt32](../../sql-reference/data-types/int-uint.md)) — データパーツãŒä½¿ç”¨ã•ã‚Œã¦ã„る場所ã®æ•°ã€‚2より大ãã„値ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツãŒã‚¯ã‚¨ãƒªã‚„マージã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ + +- `min_date` ([Date](../../sql-reference/data-types/date.md)) — データパーツ内ã®æ—¥ä»˜ã‚­ãƒ¼ã®æœ€å°å€¤ã€‚ + +- `max_date` ([Date](../../sql-reference/data-types/date.md)) — データパーツ内ã®æ—¥ä»˜ã‚­ãƒ¼ã®æœ€å¤§å€¤ã€‚ + +- `partition_id` ([String](../../sql-reference/data-types/string.md)) — パーティションã®ID。 + +- `min_block_number` ([UInt64](../../sql-reference/data-types/int-uint.md)) — マージ後ã«ç¾åœ¨ã®ãƒ‘ーツを構æˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®æœ€å°æ•°ã€‚ + +- `max_block_number` ([UInt64](../../sql-reference/data-types/int-uint.md)) — マージ後ã«ç¾åœ¨ã®ãƒ‘ーツを構æˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®æœ€å¤§æ•°ã€‚ + +- `level` ([UInt32](../../sql-reference/data-types/int-uint.md)) — マージツリーã®æ·±ã•ã€‚ゼロã¯ã€ç¾åœ¨ã®ãƒ‘ーツãŒä»–ã®ãƒ‘ーツã¨åˆä½µã•ã‚ŒãŸã®ã§ã¯ãªãã€æŒ¿å…¥ã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +- `data_version` ([UInt64](../../sql-reference/data-types/int-uint.md)) — データパーツã«é©ç”¨ã•ã‚Œã‚‹ã¹ã変更を決定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ç•ªå·ï¼ˆ`data_version` よりもãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒé«˜ã„変更)。 + +- `primary_key_bytes_in_memory` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 主キー値ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ¡ãƒ¢ãƒªã®é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `primary_key_bytes_in_memory_allocated` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 主キー値ã®ãŸã‚ã«äºˆç´„ã•ã‚Œã¦ã„るメモリã®é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `database` ([String](../../sql-reference/data-types/string.md)) — データベースã®åå‰ã€‚ + +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルã®åå‰ã€‚ + +- `engine` ([String](../../sql-reference/data-types/string.md)) — パラメータãªã—ã®ãƒ†ãƒ¼ãƒ–ルエンジンã®åå‰ã€‚ + +- `disk_name` ([String](../../sql-reference/data-types/string.md)) — データパーツをä¿å­˜ã™ã‚‹ãƒ‡ã‚£ã‚¹ã‚¯å。 + +- `path` ([String](../../sql-reference/data-types/string.md)) — データパーツファイルãŒå«ã¾ã‚Œã‚‹ãƒ•ã‚©ãƒ«ãƒ€ã¸ã®çµ¶å¯¾ãƒ‘ス。 + +- `column` ([String](../../sql-reference/data-types/string.md)) — カラムã®åå‰ã€‚ + +- `type` ([String](../../sql-reference/data-types/string.md)) — カラムタイプ。 + +- `column_position` ([UInt64](../../sql-reference/data-types/int-uint.md)) — テーブル内ã®ã‚«ãƒ©ãƒ ã®åºæ•°ä½ç½®ï¼ˆ1ã‹ã‚‰å§‹ã¾ã‚‹ï¼‰ã€‚ + +- `default_kind` ([String](../../sql-reference/data-types/string.md)) — デフォルト値ã®å¼ã‚¿ã‚¤ãƒ—(`DEFAULT`ã€`MATERIALIZED`ã€`ALIAS`)ã€ã¾ãŸã¯å®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ç©ºæ–‡å­—列。 + +- `default_expression` ([String](../../sql-reference/data-types/string.md)) — デフォルト値ã®å¼ã€ã¾ãŸã¯å®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ç©ºæ–‡å­—列。 + +- `column_bytes_on_disk` ([UInt64](../../sql-reference/data-types/int-uint.md)) — カラムã®åˆè¨ˆã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `column_data_compressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — カラム内ã®åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ç·ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `column_data_uncompressed_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — カラム内ã®éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ç·ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `column_marks_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — マークをå«ã‚€ã‚«ãƒ©ãƒ ã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — `bytes_on_disk` ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ + +- `marks_size` ([UInt64](../../sql-reference/data-types/int-uint.md)) — `marks_bytes` ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ + +**例** + +``` sql +SELECT * FROM system.parts_columns LIMIT 1 FORMAT Vertical; +``` + +``` text +Row 1: +────── +partition: tuple() +name: all_1_2_1 +part_type: Wide +active: 1 +marks: 2 +rows: 2 +bytes_on_disk: 155 +data_compressed_bytes: 56 +data_uncompressed_bytes: 4 +marks_bytes: 96 +modification_time: 2020-09-23 10:13:36 +remove_time: 2106-02-07 06:28:15 +refcount: 1 +min_date: 1970-01-01 +max_date: 1970-01-01 +partition_id: all +min_block_number: 1 +max_block_number: 2 +level: 1 +data_version: 1 +primary_key_bytes_in_memory: 2 +primary_key_bytes_in_memory_allocated: 64 +database: default +table: 53r93yleapyears +engine: MergeTree +disk_name: default +path: /var/lib/clickhouse/data/default/53r93yleapyears/all_1_2_1/ +column: id +type: Int8 +column_position: 1 +default_kind: +default_expression: +column_bytes_on_disk: 76 +column_data_compressed_bytes: 28 +column_data_uncompressed_bytes: 2 +column_marks_bytes: 48 +``` + +**関連項目** + +- [MergeTree ファミリー](../../engines/table-engines/mergetree-family/mergetree.md) diff --git a/docs/ja/operations/system-tables/processes.md b/docs/ja/operations/system-tables/processes.md new file mode 100644 index 00000000000..e41efd3abde --- /dev/null +++ b/docs/ja/operations/system-tables/processes.md @@ -0,0 +1,65 @@ +--- +slug: /ja/operations/system-tables/processes +--- +# processes + +ã“ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã¯ã€`SHOW PROCESSLIST` クエリを実装ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +カラム: + +- `user` (String) – クエリを実行ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã€‚分散処ç†ã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯ `default` ユーザーã§ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ã¯ç‰¹å®šã®ã‚¯ã‚¨ãƒªã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åãŒå«ã¾ã‚Œã€ã“ã®ã‚¯ã‚¨ãƒªãŒèµ·å‹•ã—ãŸã‚¯ã‚¨ãƒªã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¯å«ã¾ã‚Œã¾ã›ã‚“。 +- `address` (String) – リクエストãŒè¡Œã‚ã‚ŒãŸIPアドレス。分散処ç†ã§ã‚‚åŒæ§˜ã§ã™ã€‚分散クエリãŒæœ€åˆã«ã©ã“ã§è¡Œã‚ã‚ŒãŸã‹ã‚’追跡ã™ã‚‹ã«ã¯ã€ã‚¯ã‚¨ãƒªã‚’リクエストã—ãŸã‚µãƒ¼ãƒãƒ¼ã® `system.processes` を確èªã—ã¦ãã ã•ã„。 +- `elapsed` (Float64) – リクエスト実行ãŒé–‹å§‹ã•ã‚Œã¦ã‹ã‚‰ã®çµŒéŽæ™‚間(秒)。 +- `read_rows` (UInt64) – テーブルã‹ã‚‰èª­ã¿å–ã£ãŸè¡Œã®æ•°ã€‚分散処ç†ã®å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ã‚¿ã‚µãƒ¼ãƒãƒ¼ã§ã¯ã€ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã®åˆè¨ˆã¨ãªã‚Šã¾ã™ã€‚ +- `read_bytes` (UInt64) – テーブルã‹ã‚‰èª­ã¿å–ã£ãŸéžåœ§ç¸®ãƒã‚¤ãƒˆæ•°ã€‚分散処ç†ã®å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ã‚¿ã‚µãƒ¼ãƒãƒ¼ã§ã¯ã€ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã®åˆè¨ˆã¨ãªã‚Šã¾ã™ã€‚ +- `total_rows_approx` (UInt64) – 読ã¿å–ã‚‹ã¹ãç·è¡Œæ•°ã®æ¦‚算。分散処ç†ã®å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ã‚¿ã‚µãƒ¼ãƒãƒ¼ã§ã¯ã€ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã®åˆè¨ˆã¨ãªã‚Šã¾ã™ã€‚æ–°ã—ã„処ç†å¯¾è±¡ãŒåˆ¤æ˜Žã—ãŸã¨ãã«ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆå‡¦ç†ä¸­ã«æ›´æ–°ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +- `memory_usage` (Int64) – リクエストãŒä½¿ç”¨ã™ã‚‹RAMã®é‡ã€‚専用メモリã®ä¸€éƒ¨ã®ã‚¿ã‚¤ãƒ—ã¯å«ã¾ã‚Œãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚[max_memory_usage](../../operations/settings/query-complexity.md#settings_max_memory_usage) 設定をå‚ç…§ã—ã¦ãã ã•ã„。 +- `query` (String) – クエリテキスト。`INSERT`ã®å ´åˆã€æŒ¿å…¥ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã¯å«ã¾ã‚Œã¾ã›ã‚“。 +- `query_id` (String) – クエリIDãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã€‚ +- `is_cancelled` (UInt8) – クエリãŒã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚ŒãŸã‹ã©ã†ã‹ã€‚ +- `is_all_data_sent` (UInt8) – クライアントã«ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒé€ä¿¡ã•ã‚ŒãŸã‹ã©ã†ã‹ï¼ˆã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªãŒã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Œäº†ã—ãŸã‹ã©ã†ã‹ï¼‰ã€‚ + +```sql +SELECT * FROM system.processes LIMIT 10 FORMAT Vertical; +``` + +```response +Row 1: +────── +is_initial_query: 1 +user: default +query_id: 35a360fa-3743-441d-8e1f-228c938268da +address: ::ffff:172.23.0.1 +port: 47588 +initial_user: default +initial_query_id: 35a360fa-3743-441d-8e1f-228c938268da +initial_address: ::ffff:172.23.0.1 +initial_port: 47588 +interface: 1 +os_user: bharatnc +client_hostname: tower +client_name: ClickHouse +client_revision: 54437 +client_version_major: 20 +client_version_minor: 7 +client_version_patch: 2 +http_method: 0 +http_user_agent: +quota_key: +elapsed: 0.000582537 +is_cancelled: 0 +is_all_data_sent: 0 +read_rows: 0 +read_bytes: 0 +total_rows_approx: 0 +written_rows: 0 +written_bytes: 0 +memory_usage: 0 +peak_memory_usage: 0 +query: SELECT * from system.processes LIMIT 10 FORMAT Vertical; +thread_ids: [67] +ProfileEvents: {'Query':1,'SelectQuery':1,'ReadCompressedBytes':36,'CompressedReadBufferBlocks':1,'CompressedReadBufferBytes':10,'IOBufferAllocs':1,'IOBufferAllocBytes':89,'ContextLock':15,'RWLockAcquiredReadLocks':1} +Settings: {'background_pool_size':'32','load_balancing':'random','allow_suspicious_low_cardinality_types':'1','distributed_aggregation_memory_efficient':'1','skip_unavailable_shards':'1','log_queries':'1','max_bytes_before_external_group_by':'20000000000','max_bytes_before_external_sort':'20000000000','allow_introspection_functions':'1'} + +1 rows in set. Elapsed: 0.002 sec. +``` diff --git a/docs/ja/operations/system-tables/processors_profile_log.md b/docs/ja/operations/system-tables/processors_profile_log.md new file mode 100644 index 00000000000..c86bebd8fbf --- /dev/null +++ b/docs/ja/operations/system-tables/processors_profile_log.md @@ -0,0 +1,80 @@ +# processors_profile_log + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ãƒ—ロセッサーレベルã®ãƒ—ロファイリングをå«ã‚“ã§ã„ã¾ã™ï¼ˆ[`EXPLAIN PIPELINE`](../../sql-reference/statements/explain.md#explain-pipeline)ã§ç¢ºèªã§ãã¾ã™ï¼‰ã€‚ + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — イベントãŒç™ºç”Ÿã—ãŸæ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — イベントãŒç™ºç”Ÿã—ãŸæ—¥æ™‚。 +- `event_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — イベントãŒç™ºç”Ÿã—ãŸæ—¥æ™‚(マイクロ秒精度)。 +- `id` ([UInt64](../../sql-reference/data-types/int-uint.md)) — プロセッサーã®ID。 +- `parent_ids` ([Array(UInt64)](../../sql-reference/data-types/array.md)) — 親プロセッサーã®ID。 +- `plan_step` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ã“ã®ãƒ—ロセッサーを作æˆã—ãŸã‚¯ã‚¨ãƒªãƒ—ランステップã®ID。プロセッサーãŒä»»æ„ã®ã‚¹ãƒ†ãƒƒãƒ—ã‹ã‚‰è¿½åŠ ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã‚¼ãƒ­ã€‚ +- `plan_group` ([UInt64](../../sql-reference/data-types/int-uint.md)) — クエリプランステップã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸå ´åˆã®ãƒ—ロセッサーã®ã‚°ãƒ«ãƒ¼ãƒ—。åŒã˜ã‚¯ã‚¨ãƒªãƒ—ランステップã‹ã‚‰è¿½åŠ ã•ã‚ŒãŸãƒ—ロセッサーã®è«–ç†çš„ãªåŒºåˆ†ã§ã€ç¾ŽåŒ–ã•ã‚ŒãŸEXPLAIN PIPELINEã®çµæžœã«ä½¿ç”¨ã•ã‚Œã‚‹ã€‚ +- `initial_query_id` ([String](../../sql-reference/data-types/string.md)) — åˆæœŸã‚¯ã‚¨ãƒªã®ID(分散クエリ実行ã®ãŸã‚)。 +- `query_id` ([String](../../sql-reference/data-types/string.md)) — クエリã®ID。 +- `name` ([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md)) — プロセッサーã®åå‰ã€‚ +- `elapsed_us` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ã“ã®ãƒ—ロセッサーãŒå®Ÿè¡Œã•ã‚ŒãŸãƒžã‚¤ã‚¯ãƒ­ç§’ã®æ•°ã€‚ +- `input_wait_elapsed_us` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ä»–ã®ãƒ—ロセッサーã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’å¾…æ©Ÿã—ã¦ã„ãŸãƒžã‚¤ã‚¯ãƒ­ç§’ã®æ•°ã€‚ +- `output_wait_elapsed_us` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 出力ãƒãƒ¼ãƒˆãŒã„ã£ã±ã„ã®ãŸã‚å¾…æ©Ÿã—ã¦ã„ãŸãƒžã‚¤ã‚¯ãƒ­ç§’ã®æ•°ã€‚ +- `input_rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — プロセッサーã«ã‚ˆã£ã¦æ¶ˆè²»ã•ã‚ŒãŸè¡Œã®æ•°ã€‚ +- `input_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — プロセッサーã«ã‚ˆã£ã¦æ¶ˆè²»ã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚ +- `output_rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — プロセッサーã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸè¡Œã®æ•°ã€‚ +- `output_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — プロセッサーã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚ + +**例** + +クエリ: + +``` sql +EXPLAIN PIPELINE +SELECT sleep(1) +┌─explain─────────────────────────┠+│ (Expression) │ +│ ExpressionTransform │ +│ (SettingQuotaAndLimits) │ +│ (ReadFromStorage) │ +│ SourceFromSingleChunk 0 → 1 │ +└─────────────────────────────────┘ + +SELECT sleep(1) +SETTINGS log_processors_profiles = 1 +Query id: feb5ed16-1c24-4227-aa54-78c02b3b27d4 +┌─sleep(1)─┠+│ 0 │ +└──────────┘ +1 rows in set. Elapsed: 1.018 sec. + +SELECT + name, + elapsed_us, + input_wait_elapsed_us, + output_wait_elapsed_us +FROM system.processors_profile_log +WHERE query_id = 'feb5ed16-1c24-4227-aa54-78c02b3b27d4' +ORDER BY name ASC +``` + +çµæžœ: + +``` text +┌─name────────────────────┬─elapsed_us─┬─input_wait_elapsed_us─┬─output_wait_elapsed_us─┠+│ ExpressionTransform │ 1000497 │ 2823 │ 197 │ +│ LazyOutputFormat │ 36 │ 1002188 │ 0 │ +│ LimitsCheckingTransform │ 10 │ 1002994 │ 106 │ +│ NullSource │ 5 │ 1002074 │ 0 │ +│ NullSource │ 1 │ 1002084 │ 0 │ +│ SourceFromSingleChunk │ 45 │ 4736 │ 1000819 │ +└─────────────────────────┴────────────┴───────────────────────┴────────────────────────┘ +``` + +ã“ã“ã§è¦‹ã‚‹ã“ã¨ãŒã§ãã‚‹ã®ã¯: + +- `ExpressionTransform` 㯠`sleep(1)` 関数を実行ã—ã¦ãŠã‚Šã€ãã®ãŸã‚ `work` ã¯1e6ã‚’å–ã‚Šã€`elapsed_us` > 1e6。 +- `SourceFromSingleChunk` ã¯å¾…æ©ŸãŒå¿…è¦ã§ã€`ExpressionTransform` 㯠`sleep(1)` ã®å®Ÿè¡Œä¸­ã«ãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘入れãªã„ãŸã‚ã€`PortFull` 状態ã§1e6 uså¾…æ©Ÿã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€`output_wait_elapsed_us` > 1e6。 +- `LimitsCheckingTransform`/`NullSource`/`LazyOutputFormat` ã¯ã€`ExpressionTransform` ㌠`sleep(1)` を実行ã—ã¦çµæžœã‚’処ç†ã™ã‚‹ã¾ã§å¾…æ©Ÿã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€`input_wait_elapsed_us` > 1e6。 + +**å‚ç…§** + +- [`EXPLAIN PIPELINE`](../../sql-reference/statements/explain.md#explain-pipeline) diff --git a/docs/ja/operations/system-tables/projections.md b/docs/ja/operations/system-tables/projections.md new file mode 100644 index 00000000000..28e4be9708d --- /dev/null +++ b/docs/ja/operations/system-tables/projections.md @@ -0,0 +1,41 @@ +--- +slug: /ja/operations/system-tables/projections +--- +# projections + +ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«ãŠã‘る既存ã®ãƒ—ロジェクションã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `database` ([String](../../sql-reference/data-types/string.md)) — データベースå。 +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 +- `name` ([String](../../sql-reference/data-types/string.md)) — プロジェクションå。 +- `type` ([Enum](../../sql-reference/data-types/enum.md)) — プロジェクションã®ã‚¿ã‚¤ãƒ— ('Normal' = 0, 'Aggregate' = 1)。 +- `sorting_key` ([Array(String)](../../sql-reference/data-types/array.md)) — プロジェクションã®ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã€‚ +- `query` ([String](../../sql-reference/data-types/string.md)) — プロジェクションã®ã‚¯ã‚¨ãƒªã€‚ + +**例** + +```sql +SELECT * FROM system.projections LIMIT 2 FORMAT Vertical; +``` + +```text +Row 1: +────── +database: default +table: landing +name: improved_sorting_key +type: Normal +sorting_key: ['user_id','date'] +query: SELECT * ORDER BY user_id, date + +Row 2: +────── +database: default +table: landing +name: agg_no_key +type: Aggregate +sorting_key: [] +query: SELECT count() +``` diff --git a/docs/ja/operations/system-tables/query_cache.md b/docs/ja/operations/system-tables/query_cache.md new file mode 100644 index 00000000000..86d5bf76a29 --- /dev/null +++ b/docs/ja/operations/system-tables/query_cache.md @@ -0,0 +1,38 @@ +--- +slug: /ja/operations/system-tables/query_cache +--- +# query_cache + +[クエリキャッシュ](../query-cache.md)ã®å†…容を表示ã—ã¾ã™ã€‚ + +カラム: + +- `query` ([String](../../sql-reference/data-types/string.md)) — クエリ文字列。 +- `result_size` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリキャッシュエントリã®ã‚µã‚¤ã‚ºã€‚ +- `tag` ([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md)) — クエリキャッシュエントリã®ã‚¿ã‚°ã€‚ +- `stale` ([UInt8](../../sql-reference/data-types/int-uint.md)) — クエリキャッシュエントリãŒå¤ã„ã‹ã©ã†ã‹ã€‚ +- `shared` ([UInt8](../../sql-reference/data-types/int-uint.md)) — クエリキャッシュエントリãŒè¤‡æ•°ãƒ¦ãƒ¼ã‚¶ãƒ¼é–“ã§å…±æœ‰ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã€‚ +- `compressed` ([UInt8](../../sql-reference/data-types/int-uint.md)) — クエリキャッシュエントリãŒåœ§ç¸®ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã€‚ +- `expires_at` ([DateTime](../../sql-reference/data-types/datetime.md)) — クエリキャッシュエントリãŒå¤ããªã‚‹æ™‚刻。 +- `key_hash` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリ文字列ã®ãƒãƒƒã‚·ãƒ¥ã§ã€ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ³ãƒˆãƒªã‚’見ã¤ã‘ã‚‹ãŸã‚ã®ã‚­ãƒ¼ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹ã€‚ + +**例** + +``` sql +SELECT * FROM system.query_cache FORMAT Vertical; +``` + +``` text +Row 1: +────── +query: SELECT 1 SETTINGS use_query_cache = 1 +result_size: 128 +tag: +stale: 0 +shared: 0 +compressed: 1 +expires_at: 2023-10-13 13:35:45 +key_hash: 12188185624808016954 + +1 row in set. Elapsed: 0.004 sec. +``` diff --git a/docs/ja/operations/system-tables/query_log.md b/docs/ja/operations/system-tables/query_log.md new file mode 100644 index 00000000000..510edb6bccd --- /dev/null +++ b/docs/ja/operations/system-tables/query_log.md @@ -0,0 +1,206 @@ +--- +slug: /ja/operations/system-tables/query_log +--- +# query_log + +実行ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚例ãˆã°ã€é–‹å§‹æ™‚é–“ã€å‡¦ç†ã®æŒç¶šæ™‚é–“ã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãªã©ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +ã“ã®ãƒ†ãƒ¼ãƒ–ル㯠`INSERT` クエリã®æŠ•å…¥ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã¾ã›ã‚“。 +::: + +クエリã®ãƒ­ã‚®ãƒ³ã‚°è¨­å®šã¯ã‚µãƒ¼ãƒãƒ¼æ§‹æˆã®[query_log](../../operations/server-configuration-parameters/settings.md#query-log)セクションã§å¤‰æ›´ã§ãã¾ã™ã€‚ + +クエリã®ãƒ­ã‚®ãƒ³ã‚°ã‚’無効ã«ã™ã‚‹ã«ã¯ã€[log_queries = 0](../../operations/settings/settings.md#log-queries)を設定ã—ã¾ã™ã€‚ã—ã‹ã—ã€å•é¡Œè§£æ±ºã®ãŸã‚ã«ã“ã®ãƒ†ãƒ¼ãƒ–ルã®æƒ…å ±ã¯é‡è¦ã§ã‚ã‚‹ãŸã‚ã€ãƒ­ã‚®ãƒ³ã‚°ã‚’オフã«ã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã—ã¾ã›ã‚“。 + +データã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥æœŸé–“ã¯ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šã®[query_log](../../operations/server-configuration-parameters/settings.md#query-log)セクション㮠`flush_interval_milliseconds` パラメータã§è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚強制的ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹ã«ã¯ã€[SYSTEM FLUSH LOGS](../../sql-reference/statements/system.md#query_language-system-flush_logs) クエリを使用ã—ã¦ãã ã•ã„。 + +ClickHouseã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’自動的ã«å‰Šé™¤ã—ã¾ã›ã‚“。詳細ã¯[å°Žå…¥](../../operations/system-tables/index.md#system-tables-introduction)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +`system.query_log` テーブルã¯2種類ã®ã‚¯ã‚¨ãƒªã‚’登録ã—ã¾ã™ï¼š + +1. クライアントã«ã‚ˆã£ã¦ç›´æŽ¥å®Ÿè¡Œã•ã‚ŒãŸåˆæœŸã‚¯ã‚¨ãƒªã€‚ +2. ä»–ã®ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦é–‹å§‹ã•ã‚ŒãŸå­ã‚¯ã‚¨ãƒªï¼ˆåˆ†æ•£ã‚¯ã‚¨ãƒªå®Ÿè¡Œã®ãŸã‚)。ã“れらã®ã‚¿ã‚¤ãƒ—ã®ã‚¯ã‚¨ãƒªã«ã¤ã„ã¦ã¯ã€è¦ªã‚¯ã‚¨ãƒªã«é–¢ã™ã‚‹æƒ…報㌠`initial_*` カラムã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +å„クエリã¯ã€ãã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ï¼ˆ`type` カラムをå‚照)ã«å¿œã˜ã¦ã€`query_log` テーブルã«1ã¾ãŸã¯2行を生æˆã—ã¾ã™ï¼š + +1. クエリ実行ãŒæˆåŠŸã—ãŸå ´åˆã€`QueryStart` ãŠã‚ˆã³ `QueryFinish` タイプã®2è¡ŒãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ +2. クエリ処ç†ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã€`QueryStart` ãŠã‚ˆã³ `ExceptionWhileProcessing` タイプã®2ã¤ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ +3. クエリ開始å‰ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã€`ExceptionBeforeStart` タイプã®å˜ä¸€ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +[log_queries_probability](../../operations/settings/settings.md#log-queries-probability) 設定を使用ã—ã¦ã€`query_log` テーブルã«ç™»éŒ²ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªæ•°ã‚’減らã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +[log_formatted_queries](../../operations/settings/settings.md#log-formatted-queries) 設定を使用ã—ã¦ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’ `formatted_query` カラムã«ãƒ­ã‚°ã§ãã¾ã™ã€‚ + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `type` ([Enum8](../../sql-reference/data-types/enum.md)) — クエリã®å®Ÿè¡Œæ™‚ã«ç™ºç”Ÿã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã®ã‚¿ã‚¤ãƒ—。値: + - `'QueryStart' = 1` — クエリ実行ã®æˆåŠŸã—ãŸé–‹å§‹ã€‚ + - `'QueryFinish' = 2` — クエリ実行ã®æˆåŠŸã—ãŸçµ‚了。 + - `'ExceptionBeforeStart' = 3` — クエリ実行ã®é–‹å§‹å‰ã«ç™ºç”Ÿã—ãŸä¾‹å¤–。 + - `'ExceptionWhileProcessing' = 4` — クエリ実行中ã«ç™ºç”Ÿã—ãŸä¾‹å¤–。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — クエリã®é–‹å§‹æ—¥ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — クエリã®é–‹å§‹æ™‚間。 +- `event_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒精度ã®ã‚¯ã‚¨ãƒªã®é–‹å§‹æ™‚間。 +- `query_start_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — クエリ実行ã®é–‹å§‹æ™‚間。 +- `query_start_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒精度ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œé–‹å§‹æ™‚間。 +- `query_duration_ms` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリ実行ã®æŒç¶šæ™‚間(ミリ秒)。 +- `read_rows` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリ実行ã«å‚加ã™ã‚‹ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã‹ã‚‰èª­ã¿å–られãŸè¡Œã®åˆè¨ˆæ•°ã€‚通常ã®ã‚µãƒ–クエリã€`IN` ãŠã‚ˆã³ `JOIN` ã®ã‚µãƒ–クエリをå«ã‚€ã€‚分散クエリã«å¯¾ã—㦠`read_rows` ã¯ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§èª­ã¿å–られãŸè¡Œã®åˆè¨ˆæ•°ã‚’å«ã‚€ã€‚å„レプリカ㯠`read_rows` 値をé€ä¿¡ã—ã€ã‚¯ã‚¨ãƒªã®ã‚µãƒ¼ãƒãƒ¼ç™ºä¿¡è€…ã¯ã™ã¹ã¦ã®å—ä¿¡ãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒ«å€¤ã‚’ã¾ã¨ã‚る。キャッシュã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã¯ã“ã®å€¤ã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。 +- `read_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリ実行ã«å‚加ã™ã‚‹ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã‹ã‚‰èª­ã¿å–られãŸãƒã‚¤ãƒˆæ•°ã®åˆè¨ˆã€‚通常ã®ã‚µãƒ–クエリã€`IN` ãŠã‚ˆã³ `JOIN` ã®ã‚µãƒ–クエリをå«ã‚€ã€‚分散クエリã«å¯¾ã—㦠`read_bytes` ã¯ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§èª­ã¿å–られãŸè¡Œã®åˆè¨ˆæ•°ã‚’å«ã‚€ã€‚å„レプリカ㯠`read_bytes` 値をé€ä¿¡ã—ã€ã‚¯ã‚¨ãƒªã®ã‚µãƒ¼ãƒãƒ¼ç™ºä¿¡è€…ã¯ã™ã¹ã¦ã®å—ä¿¡ãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒ«å€¤ã‚’ã¾ã¨ã‚る。キャッシュã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã¯ã“ã®å€¤ã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。 +- `written_rows` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `INSERT` クエリã«å¯¾ã—ã¦ã€æ›¸ãè¾¼ã¾ã‚ŒãŸè¡Œã®æ•°ã€‚ãã®ä»–ã®ã‚¯ã‚¨ãƒªã§ã¯0。 +- `written_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `INSERT` クエリã«å¯¾ã—ã¦ã€æ›¸ãè¾¼ã¾ã‚ŒãŸãƒã‚¤ãƒˆæ•°ï¼ˆæœªåœ§ç¸®ï¼‰ã€‚ãã®ä»–ã®ã‚¯ã‚¨ãƒªã§ã¯0。 +- `result_rows` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `SELECT` クエリã®çµæžœã®è¡Œæ•°ã€ã¾ãŸã¯ `INSERT` クエリã®è¡Œæ•°ã€‚ +- `result_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリçµæžœã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹RAMã®ãƒã‚¤ãƒˆæ•°ã€‚ +- `memory_usage` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリã«ã‚ˆã‚‹ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã€‚ +- `current_database` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `query` ([String](../../sql-reference/data-types/string.md)) — クエリ文字列。 +- `formatted_query` ([String](../../sql-reference/data-types/string.md)) — フォーマットã•ã‚ŒãŸã‚¯ã‚¨ãƒªæ–‡å­—列。 +- `normalized_query_hash` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — é¡žä¼¼ã—ãŸã‚¯ã‚¨ãƒªã®ãƒªãƒ†ãƒ©ãƒ«å€¤ã‚’除ã„ãŸåŒä¸€ã®ãƒãƒƒã‚·ãƒ¥å€¤ã€‚ +- `query_kind` ([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md)) — クエリã®ç¨®é¡žã€‚ +- `databases` ([Array](../../sql-reference/data-types/array.md)([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md))) — クエリã«å­˜åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `tables` ([Array](../../sql-reference/data-types/array.md)([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md))) — クエリã«å­˜åœ¨ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚ +- `columns` ([Array](../../sql-reference/data-types/array.md)([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md))) — クエリã«å­˜åœ¨ã™ã‚‹ã‚«ãƒ©ãƒ ã®åå‰ã€‚ +- `partitions` ([Array](../../sql-reference/data-types/array.md)([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md))) — クエリã«å­˜åœ¨ã™ã‚‹ãƒ‘ーティションã®åå‰ã€‚ +- `projections` ([String](../../sql-reference/data-types/string.md)) — クエリ実行中ã«ä½¿ç”¨ã•ã‚ŒãŸãƒ—ロジェクションã®åå‰ã€‚ +- `views` ([Array](../../sql-reference/data-types/array.md)([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md))) — クエリã«å­˜åœ¨ã™ã‚‹ (マテリアライズドã¾ãŸã¯ãƒ©ã‚¤ãƒ–) ビューã®åå‰ã€‚ +- `exception_code` ([Int32](../../sql-reference/data-types/int-uint.md)) — 例外コード。 +- `exception` ([String](../../sql-reference/data-types/string.md)) — 例外メッセージ。 +- `stack_trace` ([String](../../sql-reference/data-types/string.md)) — [スタックトレース](https://en.wikipedia.org/wiki/Stack_trace)。クエリãŒæ­£å¸¸ã«å®Œäº†ã—ãŸå ´åˆã¯ç©ºæ–‡å­—列。 +- `is_initial_query` ([UInt8](../../sql-reference/data-types/int-uint.md)) — クエリタイプ。å¯èƒ½ãªå€¤ï¼š + - 1 — クライアントã«ã‚ˆã£ã¦é–‹å§‹ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã€‚ + - 0 — ä»–ã®ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦é–‹å§‹ã•ã‚ŒãŸã‚¯ã‚¨ãƒªï¼ˆåˆ†æ•£ã‚¯ã‚¨ãƒªå®Ÿè¡Œã®ä¸€éƒ¨ï¼‰ã€‚ +- `user` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã‚’開始ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®åå‰ã€‚ +- `query_id` ([String](../../sql-reference/data-types/string.md)) — クエリã®ID。 +- `address` ([IPv6](../../sql-reference/data-types/ipv6.md)) — クエリを行ã†ãŸã‚ã«ä½¿ç”¨ã•ã‚ŒãŸIPアドレス。 +- `port` ([UInt16](../../sql-reference/data-types/int-uint.md)) — クエリを行ã†ãŸã‚ã«ä½¿ç”¨ã•ã‚ŒãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒãƒ¼ãƒˆã€‚ +- `initial_user` ([String](../../sql-reference/data-types/string.md)) — åˆæœŸã‚¯ã‚¨ãƒªï¼ˆåˆ†æ•£ã‚¯ã‚¨ãƒªå®Ÿè¡Œï¼‰ã®å®Ÿè¡Œè€…ã§ã‚るユーザーã®åå‰ã€‚ +- `initial_query_id` ([String](../../sql-reference/data-types/string.md)) — åˆæœŸã‚¯ã‚¨ãƒªï¼ˆåˆ†æ•£ã‚¯ã‚¨ãƒªå®Ÿè¡Œï¼‰ã®ID。 +- `initial_address` ([IPv6](../../sql-reference/data-types/ipv6.md)) — 親クエリãŒèµ·å‹•ã•ã‚ŒãŸIPアドレス。 +- `initial_port` ([UInt16](../../sql-reference/data-types/int-uint.md)) — 親クエリを行ã†ãŸã‚ã«ä½¿ç”¨ã•ã‚ŒãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒãƒ¼ãƒˆã€‚ +- `initial_query_start_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — åˆæœŸã‚¯ã‚¨ãƒªã®é–‹å§‹æ™‚間(分散クエリ実行)。 +- `initial_query_start_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒精度ã®åˆæœŸã‚¯ã‚¨ãƒªé–‹å§‹æ™‚間(分散クエリ実行)。 +- `interface` ([UInt8](../../sql-reference/data-types/int-uint.md)) — クエリãŒé–‹å§‹ã•ã‚ŒãŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ã€‚å¯èƒ½ãªå€¤ï¼š + - 1 — TCP。 + - 2 — HTTP。 +- `os_user` ([String](../../sql-reference/data-types/string.md)) — [clickhouse-client](../../interfaces/cli.md)を実行ã™ã‚‹OSユーザーå。 +- `client_hostname` ([String](../../sql-reference/data-types/string.md)) — [clickhouse-client](../../interfaces/cli.md)ã¾ãŸã¯åˆ¥ã®TCPクライアントãŒå®Ÿè¡Œã•ã‚Œã¦ã„るクライアントマシンã®ãƒ›ã‚¹ãƒˆå。 +- `client_name` ([String](../../sql-reference/data-types/string.md)) — [clickhouse-client](../../interfaces/cli.md)ã¾ãŸã¯åˆ¥ã®TCPクライアントã®åå‰ã€‚ +- `client_revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — [clickhouse-client](../../interfaces/cli.md)ã¾ãŸã¯åˆ¥ã®TCPクライアントã®ãƒªãƒ“ジョン。 +- `client_version_major` ([UInt32](../../sql-reference/data-types/int-uint.md)) — [clickhouse-client](../../interfaces/cli.md)ã¾ãŸã¯åˆ¥ã®TCPクライアントã®ä¸»ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +- `client_version_minor` ([UInt32](../../sql-reference/data-types/int-uint.md)) — [clickhouse-client](../../interfaces/cli.md)ã¾ãŸã¯åˆ¥ã®TCPクライアントã®å‰¯ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +- `client_version_patch` ([UInt32](../../sql-reference/data-types/int-uint.md)) — [clickhouse-client](../../interfaces/cli.md)ã¾ãŸã¯åˆ¥ã®TCPクライアントã®ãƒ‘ッãƒãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +- `http_method` (UInt8) — クエリを開始ã—ãŸHTTPメソッド。å¯èƒ½ãªå€¤ï¼š + - 0 — クエリã¯TCPインターフェースã‹ã‚‰èµ·å‹•ã€‚ + - 1 — `GET` メソッドãŒä½¿ç”¨ã•ã‚ŒãŸã€‚ + - 2 — `POST` メソッドãŒä½¿ç”¨ã•ã‚ŒãŸã€‚ +- `http_user_agent` ([String](../../sql-reference/data-types/string.md)) — HTTPクエリã§æ¸¡ã•ã‚ŒãŸHTTPヘッダー `UserAgent`。 +- `http_referer` ([String](../../sql-reference/data-types/string.md)) — HTTPクエリã§æ¸¡ã•ã‚ŒãŸHTTPヘッダー `Referer`(クエリを行ã†ãƒšãƒ¼ã‚¸ã®çµ¶å¯¾ã¾ãŸã¯éƒ¨åˆ†ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’å«ã‚€ï¼‰ã€‚ +- `forwarded_for` ([String](../../sql-reference/data-types/string.md)) — HTTPクエリã§æ¸¡ã•ã‚ŒãŸHTTPヘッダー `X-Forwarded-For`。 +- `quota_key` ([String](../../sql-reference/data-types/string.md)) — [quotas](../../operations/quotas.md) 設定ã§æŒ‡å®šã•ã‚ŒãŸ `quota key`(`keyed` ã‚’å‚照)。 +- `revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — ClickHouseã®ãƒªãƒ“ジョン。 +- `ProfileEvents` ([Map(String, UInt64)](../../sql-reference/data-types/map.md)) — ç•°ãªã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’測定ã™ã‚‹ProfileEvents。ãれらã®èª¬æ˜Žã¯ãƒ†ãƒ¼ãƒ–ル [system.events](../../operations/system-tables/events.md#system_tables-events) ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- `Settings` ([Map(String, String)](../../sql-reference/data-types/map.md)) — クライアントãŒã‚¯ã‚¨ãƒªã‚’実行ã—ãŸã¨ãã«å¤‰æ›´ã•ã‚ŒãŸè¨­å®šã€‚設定ã®å¤‰æ›´ã‚’ログã«è¨˜éŒ²ã™ã‚‹ã«ã¯ã€`log_query_settings` パラメータを1ã«è¨­å®šã—ã¦ãã ã•ã„。 +- `log_comment` ([String](../../sql-reference/data-types/string.md)) — ログコメント。[max_query_size](../../operations/settings/settings.md#max_query_size) より長ããªã„ä»»æ„ã®æ–‡å­—列ã«è¨­å®šã§ãã¾ã™ã€‚定義ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ç©ºæ–‡å­—列。 +- `thread_ids` ([Array(UInt64)](../../sql-reference/data-types/array.md)) — クエリ実行ã«å‚加ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ID。ã“れらã®ã‚¹ãƒ¬ãƒƒãƒ‰ã¯å¿…ãšã—ã‚‚åŒæ™‚ã«å‹•ä½œã—ã¦ã„ãŸã¨ã¯é™ã‚Šã¾ã›ã‚“。 +- `peak_threads_usage` ([UInt64)](../../sql-reference/data-types/int-uint.md)) — クエリを実行ã™ã‚‹åŒæ™‚スレッドã®æœ€å¤§æ•°ã€‚ +- `used_aggregate_functions` ([Array(String)](../../sql-reference/data-types/array.md)) — クエリ実行中ã«ä½¿ç”¨ã•ã‚ŒãŸ `集約関数` ã®æ¨™æº–å。 +- `used_aggregate_function_combinators` ([Array(String)](../../sql-reference/data-types/array.md)) — クエリ実行中ã«ä½¿ç”¨ã•ã‚ŒãŸ `集約関数コンビãƒãƒ¼ã‚¿` ã®æ¨™æº–å。 +- `used_database_engines` ([Array(String)](../../sql-reference/data-types/array.md)) — クエリ実行中ã«ä½¿ç”¨ã•ã‚ŒãŸ `データベースエンジン` ã®æ¨™æº–å。 +- `used_data_type_families` ([Array(String)](../../sql-reference/data-types/array.md)) — クエリ実行中ã«ä½¿ç”¨ã•ã‚ŒãŸ `データタイプファミリー` ã®æ¨™æº–å。 +- `used_dictionaries` ([Array(String)](../../sql-reference/data-types/array.md)) — クエリ実行中ã«ä½¿ç”¨ã•ã‚ŒãŸ `Dictionary` ã®æ¨™æº–å。XMLファイルを使用ã—ã¦è¨­å®šã•ã‚ŒãŸDictionaryã®å ´åˆã€Dictionaryã®åå‰ã¨ãªã‚Šã€SQLæ–‡ã§ä½œæˆã•ã‚ŒãŸDictionaryã®å ´åˆã€æ¨™æº–åã¯å®Œå…¨ä¿®é£¾ã•ã‚ŒãŸã‚ªãƒ–ジェクトåã¨ãªã‚Šã¾ã™ã€‚ +- `used_formats` ([Array(String)](../../sql-reference/data-types/array.md)) — クエリ実行中ã«ä½¿ç”¨ã•ã‚ŒãŸ `フォーマット` ã®æ¨™æº–å。 +- `used_functions` ([Array(String)](../../sql-reference/data-types/array.md)) — クエリ実行中ã«ä½¿ç”¨ã•ã‚ŒãŸ `関数` ã®æ¨™æº–å。 +- `used_storages` ([Array(String)](../../sql-reference/data-types/array.md)) — クエリ実行中ã«ä½¿ç”¨ã•ã‚ŒãŸ `ストレージ` ã®æ¨™æº–å。 +- `used_table_functions` ([Array(String)](../../sql-reference/data-types/array.md)) — クエリ実行中ã«ä½¿ç”¨ã•ã‚ŒãŸ `テーブル関数` ã®æ¨™æº–å。 +- `used_privileges` ([Array(String)](../../sql-reference/data-types/array.md)) - クエリ実行中ã«æ­£å¸¸ã«ãƒã‚§ãƒƒã‚¯ã•ã‚ŒãŸæ¨©é™ã€‚ +- `missing_privileges` ([Array(String)](../../sql-reference/data-types/array.md)) - クエリ実行中ã«ä¸è¶³ã—ã¦ã„る権é™ã€‚ +- `query_cache_usage` ([Enum8](../../sql-reference/data-types/enum.md)) — クエリ実行中ã®[クエリキャッシュ](../query-cache.md)ã®ä½¿ç”¨ã€‚値: + - `'Unknown'` = ステータスä¸æ˜Žã€‚ + - `'None'` = クエリçµæžœãŒã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«æ›¸ãè¾¼ã¾ã‚Œãšã€ã¾ãŸã¯èª­ã¿å‡ºã•ã‚Œãªã„。 + - `'Write'` = クエリçµæžœãŒã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«æ›¸ãè¾¼ã¾ã‚ŒãŸã€‚ + - `'Read'` = クエリçµæžœãŒã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰èª­ã¿å‡ºã•ã‚ŒãŸã€‚ + +**例** + +``` sql +SELECT * FROM system.query_log WHERE type = 'QueryFinish' ORDER BY query_start_time DESC LIMIT 1 FORMAT Vertical; +``` + +``` text +Row 1: +────── +hostname: clickhouse.eu-central1.internal +type: QueryFinish +event_date: 2021-11-03 +event_time: 2021-11-03 16:13:54 +event_time_microseconds: 2021-11-03 16:13:54.953024 +query_start_time: 2021-11-03 16:13:54 +query_start_time_microseconds: 2021-11-03 16:13:54.952325 +query_duration_ms: 0 +read_rows: 69 +read_bytes: 6187 +written_rows: 0 +written_bytes: 0 +result_rows: 69 +result_bytes: 48256 +memory_usage: 0 +current_database: default +query: DESCRIBE TABLE system.query_log +formatted_query: +normalized_query_hash: 8274064835331539124 +query_kind: +databases: [] +tables: [] +columns: [] +projections: [] +views: [] +exception_code: 0 +exception: +stack_trace: +is_initial_query: 1 +user: default +query_id: 7c28bbbb-753b-4eba-98b1-efcbe2b9bdf6 +address: ::ffff:127.0.0.1 +port: 40452 +initial_user: default +initial_query_id: 7c28bbbb-753b-4eba-98b1-efcbe2b9bdf6 +initial_address: ::ffff:127.0.0.1 +initial_port: 40452 +initial_query_start_time: 2021-11-03 16:13:54 +initial_query_start_time_microseconds: 2021-11-03 16:13:54.952325 +interface: 1 +os_user: sevirov +client_hostname: clickhouse.eu-central1.internal +client_name: ClickHouse +client_revision: 54449 +client_version_major: 21 +client_version_minor: 10 +client_version_patch: 1 +http_method: 0 +http_user_agent: +http_referer: +forwarded_for: +quota_key: +revision: 54456 +log_comment: +thread_ids: [30776,31174] +ProfileEvents: {'Query':1,'NetworkSendElapsedMicroseconds':59,'NetworkSendBytes':2643,'SelectedRows':69,'SelectedBytes':6187,'ContextLock':9,'RWLockAcquiredReadLocks':1,'RealTimeMicroseconds':817,'UserTimeMicroseconds':427,'SystemTimeMicroseconds':212,'OSCPUVirtualTimeMicroseconds':639,'OSReadChars':894,'OSWriteChars':319} +Settings: {'load_balancing':'random','max_memory_usage':'10000000000'} +used_aggregate_functions: [] +used_aggregate_function_combinators: [] +used_database_engines: [] +used_data_type_families: [] +used_dictionaries: [] +used_formats: [] +used_functions: [] +used_storages: [] +used_table_functions: [] +used_privileges: [] +missing_privileges: [] +query_cache_usage: None +``` + +**関連項目** + +- [system.query_thread_log](../../operations/system-tables/query_thread_log.md#system_tables-query_thread_log) — å„クエリ実行スレッドã«é–¢ã™ã‚‹æƒ…報をå«ã‚€ãƒ†ãƒ¼ãƒ–ルã§ã™ã€‚ diff --git a/docs/ja/operations/system-tables/query_metric_log.md b/docs/ja/operations/system-tables/query_metric_log.md new file mode 100644 index 00000000000..7759581b729 --- /dev/null +++ b/docs/ja/operations/system-tables/query_metric_log.md @@ -0,0 +1,48 @@ +--- +slug: /ja/operations/system-tables/query_metric_log +--- +# query_metric_log + +個別ã®ã‚¯ã‚¨ãƒªã«é–¢ã™ã‚‹ãƒ¡ãƒ¢ãƒªã¨ãƒ¡ãƒˆãƒªãƒƒã‚¯å€¤ã®å±¥æ­´ã‚’ã€`system.events` テーブルã‹ã‚‰å–å¾—ã—ã€å®šæœŸçš„ã«ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ + +クエリãŒé–‹å§‹ã•ã‚Œã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯ `query_metric_log_interval` ミリ秒ã”ã¨ã®é–“éš”ã§åŽé›†ã•ã‚Œã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯1000ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ï¼‰ã€‚クエリ㌠`query_metric_log_interval` より長ã続ãå ´åˆã€ã‚¯ã‚¨ãƒªçµ‚了時ã«ã‚‚データãŒåŽé›†ã•ã‚Œã¾ã™ã€‚ + +カラム: +- `query_id` ([String](../../sql-reference/data-types/string.md)) — クエリã®ID。 +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — イベントã®æ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — イベントã®æ™‚間。 +- `event_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒å˜ä½ã®è§£åƒåº¦ã‚’æŒã¤ã‚¤ãƒ™ãƒ³ãƒˆæ™‚間。 + +**例** + +``` sql +SELECT * FROM system.query_metric_log LIMIT 1 FORMAT Vertical; +``` + +``` text +Row 1: +────── +query_id: 97c8ba04-b6d4-4bd7-b13e-6201c5c6e49d +hostname: clickhouse.eu-central1.internal +event_date: 2020-09-05 +event_time: 2020-09-05 16:22:33 +event_time_microseconds: 2020-09-05 16:22:33.196807 +memory_usage: 313434219 +peak_memory_usage: 598951986 +ProfileEvent_Query: 0 +ProfileEvent_SelectQuery: 0 +ProfileEvent_InsertQuery: 0 +ProfileEvent_FailedQuery: 0 +ProfileEvent_FailedSelectQuery: 0 +... +``` + +**関連情報** + +- [query_metric_log 設定](../../operations/server-configuration-parameters/settings.md#query_metric_log) — 設定ã®æœ‰åŠ¹åŒ–ã¨ç„¡åŠ¹åŒ–。 +- [query_metric_log_interval](../../operations/settings/settings.md#query_metric_log_interval) +- [system.asynchronous_metrics](../../operations/system-tables/asynchronous_metrics.md) — 定期的ã«è¨ˆç®—ã•ã‚Œã‚‹ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ +- [system.events](../../operations/system-tables/events.md#system_tables-events) — 発生ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã®æ•°ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ +- [system.metrics](../../operations/system-tables/metrics.md) — å³æ™‚ã«è¨ˆç®—ã•ã‚Œã‚‹ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ +- [モニタリング](../../operations/monitoring.md) — ClickHouseモニタリングã®åŸºæœ¬æ¦‚念。 diff --git a/docs/ja/operations/system-tables/query_thread_log.md b/docs/ja/operations/system-tables/query_thread_log.md new file mode 100644 index 00000000000..aa2f65bf1f5 --- /dev/null +++ b/docs/ja/operations/system-tables/query_thread_log.md @@ -0,0 +1,121 @@ +--- +slug: /ja/operations/system-tables/query_thread_log +--- +# query_thread_log + +クエリを実行ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚例ãˆã°ã€ã‚¹ãƒ¬ãƒƒãƒ‰åã€ã‚¹ãƒ¬ãƒƒãƒ‰ã®é–‹å§‹æ™‚é–“ã€ã‚¯ã‚¨ãƒªå‡¦ç†ã®æ‰€è¦æ™‚é–“ãªã©ã§ã™ã€‚ + +ログ記録を開始ã™ã‚‹ã«ã¯ï¼š + +1. [query_thread_log](../../operations/server-configuration-parameters/settings.md#query_thread_log) セクションã§ãƒ‘ラメーターを設定ã—ã¾ã™ã€‚ +2. [log_query_threads](../../operations/settings/settings.md#log-query-threads) ã‚’1ã«è¨­å®šã—ã¾ã™ã€‚ + +データã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥æœŸé–“ã¯ã€[query_thread_log](../../operations/server-configuration-parameters/settings.md#query_thread_log) サーãƒãƒ¼è¨­å®šã‚»ã‚¯ã‚·ãƒ§ãƒ³ã® `flush_interval_milliseconds` パラメーターã§è¨­å®šã—ã¾ã™ã€‚フラッシュを強制ã™ã‚‹ã«ã¯ã€[SYSTEM FLUSH LOGS](../../sql-reference/statements/system.md#query_language-system-flush_logs) クエリを使用ã—ã¾ã™ã€‚ + +ClickHouse ã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’自動的ã«å‰Šé™¤ã—ã¾ã›ã‚“。詳細ã¯[紹介](../../operations/system-tables/index.md#system-tables-introduction)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +`query_thread_log` テーブルã«ç™»éŒ²ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã®æ•°ã‚’減らã™ã«ã¯ã€[log_queries_probability](../../operations/settings/settings.md#log-queries-probability) 設定を使用ã§ãã¾ã™ã€‚ + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — スレッドãŒã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’終了ã—ãŸæ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — スレッドãŒã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’終了ã—ãŸæ—¥æ™‚。 +- `event_time_microseconds` ([DateTime](../../sql-reference/data-types/datetime.md)) — マイクロ秒精度ã§ã‚¹ãƒ¬ãƒƒãƒ‰ãŒã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’終了ã—ãŸæ—¥æ™‚。 +- `query_start_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — クエリ実行ã®é–‹å§‹æ™‚間。 +- `query_start_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒精度ã§ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œã®é–‹å§‹æ™‚間。 +- `query_duration_ms` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリ実行ã®æ‰€è¦æ™‚間。 +- `read_rows` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 読ã¿å–られãŸè¡Œæ•°ã€‚ +- `read_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 読ã¿å–られãŸãƒã‚¤ãƒˆæ•°ã€‚ +- `written_rows` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `INSERT` クエリã®å ´åˆã€æ›¸ãè¾¼ã¾ã‚ŒãŸè¡Œæ•°ã€‚ä»–ã®ã‚¯ã‚¨ãƒªã®å ´åˆã¯ã€ã“ã®ã‚«ãƒ©ãƒ ã®å€¤ã¯0ã§ã™ã€‚ +- `written_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `INSERT` クエリã®å ´åˆã€æ›¸ãè¾¼ã¾ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚ä»–ã®ã‚¯ã‚¨ãƒªã®å ´åˆã¯ã€ã“ã®ã‚«ãƒ©ãƒ ã®å€¤ã¯0ã§ã™ã€‚ +- `memory_usage` ([Int64](../../sql-reference/data-types/int-uint.md)) — ã“ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã¨è§£æ”¾ã•ã‚ŒãŸãƒ¡ãƒ¢ãƒªã®å·®ã€‚ +- `peak_memory_usage` ([Int64](../../sql-reference/data-types/int-uint.md)) — ã“ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã¨è§£æ”¾ã•ã‚ŒãŸãƒ¡ãƒ¢ãƒªã®æœ€å¤§å·®ã€‚ +- `thread_name` ([String](../../sql-reference/data-types/string.md)) — スレッドå。 +- `thread_id` ([UInt64](../../sql-reference/data-types/int-uint.md)) — OSスレッドID。 +- `master_thread_id` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — åˆæœŸã‚¹ãƒ¬ãƒƒãƒ‰ã®OSåˆæœŸID。 +- `query` ([String](../../sql-reference/data-types/string.md)) — クエリ文字列。 +- `is_initial_query` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリタイプ。å¯èƒ½ãªå€¤ï¼š + - 1 — クライアントã«ã‚ˆã£ã¦é–‹å§‹ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã€‚ + - 0 — 分散クエリ実行ã®ãŸã‚ã«åˆ¥ã®ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦é–‹å§‹ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã€‚ +- `user` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã‚’開始ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼å。 +- `query_id` ([String](../../sql-reference/data-types/string.md)) — クエリã®ID。 +- `address` ([IPv6](../../sql-reference/data-types/ipv6.md)) — クエリã®å®Ÿè¡Œã«ä½¿ç”¨ã•ã‚ŒãŸIPアドレス。 +- `port` ([UInt16](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリã®å®Ÿè¡Œã«ä½¿ç”¨ã•ã‚ŒãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒãƒ¼ãƒˆã€‚ +- `initial_user` ([String](../../sql-reference/data-types/string.md)) — åˆæœŸã‚¯ã‚¨ãƒªã‚’実行ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼å(分散クエリ実行ã®å ´åˆï¼‰ã€‚ +- `initial_query_id` ([String](../../sql-reference/data-types/string.md)) — åˆæœŸã‚¯ã‚¨ãƒªã®ID(分散クエリ実行ã®å ´åˆï¼‰ã€‚ +- `initial_address` ([IPv6](../../sql-reference/data-types/ipv6.md)) — 親クエリãŒèµ·å‹•ã•ã‚ŒãŸIPアドレス。 +- `initial_port` ([UInt16](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 親クエリã®å®Ÿè¡Œã«ä½¿ç”¨ã•ã‚ŒãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒãƒ¼ãƒˆã€‚ +- `interface` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリãŒé–‹å§‹ã•ã‚ŒãŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã€‚å¯èƒ½ãªå€¤ï¼š + - 1 — TCP。 + - 2 — HTTP。 +- `os_user` ([String](../../sql-reference/data-types/string.md)) — [clickhouse-client](../../interfaces/cli.md) を実行ã—ã¦ã„ã‚‹OSã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å。 +- `client_hostname` ([String](../../sql-reference/data-types/string.md)) — [clickhouse-client](../../interfaces/cli.md) ã¾ãŸã¯åˆ¥ã®TCPクライアントãŒå®Ÿè¡Œã•ã‚Œã¦ã„るクライアントマシンã®ãƒ›ã‚¹ãƒˆå。 +- `client_name` ([String](../../sql-reference/data-types/string.md)) — [clickhouse-client](../../interfaces/cli.md) ã¾ãŸã¯åˆ¥ã®TCPクライアントå。 +- `client_revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — [clickhouse-client](../../interfaces/cli.md) ã¾ãŸã¯åˆ¥ã®TCPクライアントã®ãƒªãƒ“ジョン。 +- `client_version_major` ([UInt32](../../sql-reference/data-types/int-uint.md)) — [clickhouse-client](../../interfaces/cli.md) ã¾ãŸã¯åˆ¥ã®TCPクライアントã®ãƒ¡ã‚¸ãƒ£ãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +- `client_version_minor` ([UInt32](../../sql-reference/data-types/int-uint.md)) — [clickhouse-client](../../interfaces/cli.md) ã¾ãŸã¯åˆ¥ã®TCPクライアントã®ãƒžã‚¤ãƒŠãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +- `client_version_patch` ([UInt32](../../sql-reference/data-types/int-uint.md)) — [clickhouse-client](../../interfaces/cli.md) ã¾ãŸã¯åˆ¥ã®TCPクライアントã®ãƒ‘ッãƒãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +- `http_method` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — クエリを開始ã—ãŸHTTPメソッド。å¯èƒ½ãªå€¤ï¼š + - 0 — クエリãŒTCPインターフェースã‹ã‚‰é–‹å§‹ã•ã‚Œã¾ã—ãŸã€‚ + - 1 — `GET` メソッドãŒä½¿ç”¨ã•ã‚Œã¾ã—ãŸã€‚ + - 2 — `POST` メソッドãŒä½¿ç”¨ã•ã‚Œã¾ã—ãŸã€‚ +- `http_user_agent` ([String](../../sql-reference/data-types/string.md)) — HTTPリクエストã§æ¸¡ã•ã‚ŒãŸ `UserAgent` ヘッダー。 +- `quota_key` ([String](../../sql-reference/data-types/string.md)) — [quota](../../operations/quotas.md) 設定ã§æŒ‡å®šã•ã‚ŒãŸã€Œã‚¯ã‚ªãƒ¼ã‚¿ã‚­ãƒ¼ã€ï¼ˆ`keyed` ã‚’å‚照)。 +- `revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — ClickHouseã®ãƒªãƒ“ジョン。 +- `ProfileEvents` ([Map(String, UInt64)](../../sql-reference/data-types/array.md)) — ã“ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®ç•°ãªã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’測定ã™ã‚‹ProfileEvents。ã“れらã®èª¬æ˜Žã¯ã€[system.events](#system_tables-events) テーブルã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**例** + +``` sql + SELECT * FROM system.query_thread_log LIMIT 1 \G +``` + +``` text +è¡Œ 1: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2020-09-11 +event_time: 2020-09-11 10:08:17 +event_time_microseconds: 2020-09-11 10:08:17.134042 +query_start_time: 2020-09-11 10:08:17 +query_start_time_microseconds: 2020-09-11 10:08:17.063150 +query_duration_ms: 70 +read_rows: 0 +read_bytes: 0 +written_rows: 1 +written_bytes: 12 +memory_usage: 4300844 +peak_memory_usage: 4300844 +thread_name: TCPHandler +thread_id: 638133 +master_thread_id: 638133 +query: INSERT INTO test1 VALUES +is_initial_query: 1 +user: default +query_id: 50a320fd-85a8-49b8-8761-98a86bcbacef +address: ::ffff:127.0.0.1 +port: 33452 +initial_user: default +initial_query_id: 50a320fd-85a8-49b8-8761-98a86bcbacef +initial_address: ::ffff:127.0.0.1 +initial_port: 33452 +interface: 1 +os_user: bharatnc +client_hostname: tower +client_name: ClickHouse +client_revision: 54437 +client_version_major: 20 +client_version_minor: 7 +client_version_patch: 2 +http_method: 0 +http_user_agent: +quota_key: +revision: 54440 +ProfileEvents: {'Query':1,'SelectQuery':1,'ReadCompressedBytes':36,'CompressedReadBufferBlocks':1,'CompressedReadBufferBytes':10,'IOBufferAllocs':1,'IOBufferAllocBytes':89,'ContextLock':15,'RWLockAcquiredReadLocks':1} +``` + +**関連項目** + +- [system.query_log](../../operations/system-tables/query_log.md#system_tables-query_log) — クエリ実行ã«é–¢ã™ã‚‹ä¸€èˆ¬æƒ…報をå«ã‚€ `query_log` システムテーブルã®èª¬æ˜Žã€‚ +- [system.query_views_log](../../operations/system-tables/query_views_log.md#system_tables-query_views_log) — クエリ中ã«å®Ÿè¡Œã•ã‚ŒãŸå„ビューã«é–¢ã™ã‚‹æƒ…報をå«ã‚€ãƒ†ãƒ¼ãƒ–ル。 diff --git a/docs/ja/operations/system-tables/query_views_log.md b/docs/ja/operations/system-tables/query_views_log.md new file mode 100644 index 00000000000..c4c44fc15ba --- /dev/null +++ b/docs/ja/operations/system-tables/query_views_log.md @@ -0,0 +1,89 @@ +--- +slug: /ja/operations/system-tables/query_views_log +--- +# query_views_log + +クエリを実行ã—ãŸéš›ã«å®Ÿè¡Œã•ã‚ŒãŸä¾å­˜ãƒ“ューã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚例ãˆã°ã€ãƒ“ューã®ç¨®é¡žã‚„実行時間を示ã—ã¾ã™ã€‚ + +ログを開始ã™ã‚‹ã«ã¯æ¬¡ã®æ‰‹é †ã«å¾“ã„ã¾ã™ï¼š + +1. [query_views_log](../../operations/server-configuration-parameters/settings.md#query_views_log) セクションã§ãƒ‘ラメータを設定ã—ã¾ã™ã€‚ +2. [log_query_views](../../operations/settings/settings.md#log-query-views) ã‚’1ã«è¨­å®šã—ã¾ã™ã€‚ + +データã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥é–“éš”ã¯ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šã‚»ã‚¯ã‚·ãƒ§ãƒ³ã® [query_views_log](../../operations/server-configuration-parameters/settings.md#query_views_log) ã® `flush_interval_milliseconds` パラメータã§è¨­å®šã—ã¾ã™ã€‚強制的ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹ã«ã¯ã€[SYSTEM FLUSH LOGS](../../sql-reference/statements/system.md#query_language-system-flush_logs) クエリを使用ã—ã¾ã™ã€‚ + +ClickHouseã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’自動的ã«å‰Šé™¤ã—ã¾ã›ã‚“。詳細ã¯[概è¦](../../operations/system-tables/index.md#system-tables-introduction)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +`query_views_log` テーブルã«ç™»éŒ²ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã®æ•°ã‚’減らã™ã«ã¯ã€[log_queries_probability](../../operations/settings/settings.md#log-queries-probability) 設定を使用ã§ãã¾ã™ã€‚ + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — ビューã®æœ€å¾Œã®ã‚¤ãƒ™ãƒ³ãƒˆãŒç™ºç”Ÿã—ãŸæ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — ビューãŒå®Ÿè¡Œã‚’終了ã—ãŸæ—¥æ™‚。 +- `event_time_microseconds` ([DateTime](../../sql-reference/data-types/datetime.md)) — マイクロ秒精度ã§ãƒ“ューãŒå®Ÿè¡Œã‚’終了ã—ãŸæ—¥æ™‚。 +- `view_duration_ms` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — ビューã®å®Ÿè¡Œæ™‚é–“ (å„ステージã®åˆè¨ˆ) をミリ秒å˜ä½ã§ã€‚ +- `initial_query_id` ([String](../../sql-reference/data-types/string.md)) — åˆæœŸã‚¯ã‚¨ãƒªã®ID (分散クエリ実行ã®ãŸã‚)。 +- `view_name` ([String](../../sql-reference/data-types/string.md)) — ビューã®åå‰ã€‚ +- `view_uuid` ([UUID](../../sql-reference/data-types/uuid.md)) — ビューã®UUID。 +- `view_type` ([Enum8](../../sql-reference/data-types/enum.md)) — ビューã®ç¨®é¡žã€‚値: + - `'Default' = 1` — [デフォルトビュー](../../sql-reference/statements/create/view.md#normal)。ã“ã®ãƒ­ã‚°ã«ã¯è¡¨ç¤ºã•ã‚Œã¾ã›ã‚“。 + - `'Materialized' = 2` — [マテリアライズドビュー](../../sql-reference/statements/create/view.md#materialized)。 + - `'Live' = 3` — [ライブビュー](../../sql-reference/statements/create/view.md#live-view)。 +- `view_query` ([String](../../sql-reference/data-types/string.md)) — ビューãŒå®Ÿè¡Œã—ãŸã‚¯ã‚¨ãƒªã€‚ +- `view_target` ([String](../../sql-reference/data-types/string.md)) — ビューã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚ +- `read_rows` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 読ã¿å–ã£ãŸè¡Œæ•°ã€‚ +- `read_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 読ã¿å–ã£ãŸãƒã‚¤ãƒˆæ•°ã€‚ +- `written_rows` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 書ãè¾¼ã¾ã‚ŒãŸè¡Œæ•°ã€‚ +- `written_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 書ãè¾¼ã¾ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚ +- `peak_memory_usage` ([Int64](../../sql-reference/data-types/int-uint.md)) — ã“ã®ãƒ“ューã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆå†…ã§å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¢ãƒªã¨è§£æ”¾ã•ã‚ŒãŸãƒ¡ãƒ¢ãƒªã®æœ€å¤§å·®ã€‚ +- `ProfileEvents` ([Map(String, UInt64)](../../sql-reference/data-types/array.md)) — ç•°ãªã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’測定ã™ã‚‹ProfileEvents。詳細㯠[system.events](../../operations/system-tables/events.md#system_tables-events) テーブルã§è¦‹ã¤ã‹ã‚Šã¾ã™ã€‚ +- `status` ([Enum8](../../sql-reference/data-types/enum.md)) — ビューã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã€‚値: + - `'QueryStart' = 1` — ビュー実行ã®æˆåŠŸã—ãŸé–‹å§‹ã€‚表示ã•ã‚Œã¾ã›ã‚“。 + - `'QueryFinish' = 2` — ビュー実行ã®æˆåŠŸã—ãŸçµ‚了。 + - `'ExceptionBeforeStart' = 3` — ビュー実行開始å‰ã®ä¾‹å¤–。 + - `'ExceptionWhileProcessing' = 4` — ビュー実行中ã®ä¾‹å¤–。 +- `exception_code` ([Int32](../../sql-reference/data-types/int-uint.md)) — 例外コード。 +- `exception` ([String](../../sql-reference/data-types/string.md)) — 例外メッセージ。 +- `stack_trace` ([String](../../sql-reference/data-types/string.md)) — [スタックトレース](https://en.wikipedia.org/wiki/Stack_trace)。クエリãŒæ­£å¸¸ã«å®Œäº†ã—ãŸå ´åˆã¯ç©ºã€‚ + +**例** + +クエリ: + +``` sql +SELECT * FROM system.query_views_log LIMIT 1 \G; +``` + +çµæžœ: + +``` text +Row 1: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2021-06-22 +event_time: 2021-06-22 13:23:07 +event_time_microseconds: 2021-06-22 13:23:07.738221 +view_duration_ms: 0 +initial_query_id: c3a1ac02-9cad-479b-af54-9e9c0a7afd70 +view_name: default.matview_inner +view_uuid: 00000000-0000-0000-0000-000000000000 +view_type: Materialized +view_query: SELECT * FROM default.table_b +view_target: default.`.inner.matview_inner` +read_rows: 4 +read_bytes: 64 +written_rows: 2 +written_bytes: 32 +peak_memory_usage: 4196188 +ProfileEvents: {'FileOpen':2,'WriteBufferFromFileDescriptorWrite':2,'WriteBufferFromFileDescriptorWriteBytes':187,'IOBufferAllocs':3,'IOBufferAllocBytes':3145773,'FunctionExecute':3,'DiskWriteElapsedMicroseconds':13,'InsertedRows':2,'InsertedBytes':16,'SelectedRows':4,'SelectedBytes':48,'ContextLock':16,'RWLockAcquiredReadLocks':1,'RealTimeMicroseconds':698,'SoftPageFaults':4,'OSReadChars':463} +status: QueryFinish +exception_code: 0 +exception: +stack_trace: +``` + +**å‚ç…§** + +- [system.query_log](../../operations/system-tables/query_log.md#system_tables-query_log) — クエリ実行ã«é–¢ã™ã‚‹ä¸€èˆ¬æƒ…報をå«ã‚€ `query_log` システムテーブルã®èª¬æ˜Žã€‚ +- [system.query_thread_log](../../operations/system-tables/query_thread_log.md#system_tables-query_thread_log) — å„クエリ実行スレッドã«é–¢ã™ã‚‹æƒ…報をå«ã‚€ã“ã®ãƒ†ãƒ¼ãƒ–ル。 diff --git a/docs/ja/operations/system-tables/quota_limits.md b/docs/ja/operations/system-tables/quota_limits.md new file mode 100644 index 00000000000..3df34f09454 --- /dev/null +++ b/docs/ja/operations/system-tables/quota_limits.md @@ -0,0 +1,22 @@ +--- +slug: /ja/operations/system-tables/quota_limits +--- +# quota_limits + +ã™ã¹ã¦ã®ã‚¯ã‚©ãƒ¼ã‚¿ã®ã™ã¹ã¦ã®é–“éš”ã«å¯¾ã™ã‚‹æœ€å¤§å€¤ã®æƒ…報をå«ã¿ã¾ã™ã€‚クォータã«ã¯ã€ä»»æ„ã®æ•°ã¾ãŸã¯ã‚¼ãƒ­ã®è¡ŒãŒå¯¾å¿œã—ã¾ã™ã€‚ + +カラム: +- `quota_name` ([String](../../sql-reference/data-types/string.md)) — クォータå。 +- `duration` ([UInt32](../../sql-reference/data-types/int-uint.md)) — リソース消費を計算ã™ã‚‹ãŸã‚ã®æ™‚é–“é–“éš”ã®é•·ã•ï¼ˆç§’å˜ä½ï¼‰ã€‚ +- `is_randomized_interval` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — è«–ç†å€¤ã€‚ã“ã®é–“éš”ãŒãƒ©ãƒ³ãƒ€ãƒ åŒ–ã•ã‚Œã¦ã„ã‚‹ã‹ã‚’示ã—ã¾ã™ã€‚ランダム化ã•ã‚Œã¦ã„ãªã„å ´åˆã€é–“éš”ã¯å¸¸ã«åŒã˜æ™‚é–“ã«é–‹å§‹ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€1分間ã®é–“éš”ã¯ã€æ•´æ•°ã®åˆ†æ•°ã§å¸¸ã«é–‹å§‹ã•ã‚Œã¾ã™ï¼ˆä¾‹: 11:20:00ã«é–‹å§‹ã™ã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã™ãŒã€11:20:01ã«é–‹å§‹ã™ã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“)。1æ—¥ã®é–“éš”ã¯å¸¸ã«UTCã®åˆå‰0時ã«é–‹å§‹ã•ã‚Œã¾ã™ã€‚ランダム化ã•ã‚Œã¦ã„ã‚‹å ´åˆã€æœ€åˆã®é–“éš”ã¯ãƒ©ãƒ³ãƒ€ãƒ ãªæ™‚é–“ã«é–‹å§‹ã•ã‚Œã€ãã®å¾Œã¯é€£ç¶šã—ã¦é–‹å§‹ã—ã¾ã™ã€‚値: +- `0` — é–“éš”ã¯ãƒ©ãƒ³ãƒ€ãƒ åŒ–ã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- `1` — é–“éš”ã¯ãƒ©ãƒ³ãƒ€ãƒ åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ +- `max_queries` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリã®æœ€å¤§æ•°ã€‚ +- `max_query_selects` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — SELECTクエリã®æœ€å¤§æ•°ã€‚ +- `max_query_inserts` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — INSERTクエリã®æœ€å¤§æ•°ã€‚ +- `max_errors` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — エラーã®æœ€å¤§æ•°ã€‚ +- `max_result_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — çµæžœã®è¡Œã®æœ€å¤§æ•°ã€‚ +- `max_result_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリã®çµæžœã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹RAMボリュームã®æœ€å¤§ãƒã‚¤ãƒˆæ•°ã€‚ +- `max_read_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリã«å‚加ã—ãŸã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã‹ã‚‰èª­ã¿å–られãŸè¡Œã®æœ€å¤§æ•°ã€‚ +- `max_read_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリã«å‚加ã—ãŸã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã‹ã‚‰èª­ã¿å–られãŸãƒã‚¤ãƒˆæ•°ã®æœ€å¤§å€¤ã€‚ +- `max_execution_time` ([Nullable](../../sql-reference/data-types/nullable.md)([Float64](../../sql-reference/data-types/float.md))) — クエリã®å®Ÿè¡Œæ™‚é–“ã®æœ€å¤§å€¤ï¼ˆç§’å˜ä½ï¼‰ã€‚ diff --git a/docs/ja/operations/system-tables/quota_usage.md b/docs/ja/operations/system-tables/quota_usage.md new file mode 100644 index 00000000000..ca004f5dce7 --- /dev/null +++ b/docs/ja/operations/system-tables/quota_usage.md @@ -0,0 +1,35 @@ +--- +slug: /ja/operations/system-tables/quota_usage +--- +# quota_usage + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã‚‹ã‚¯ã‚©ãƒ¼ã‚¿ã®ä½¿ç”¨çŠ¶æ³: 使用é‡ã¨æ®‹ã‚Šã®é‡ã€‚ + +カラム: +- `quota_name` ([String](../../sql-reference/data-types/string.md)) — クォータå。 +- `quota_key`([String](../../sql-reference/data-types/string.md)) — キーã®å€¤ã€‚例ãˆã°ã€keys =\[‘IPアドレス’\]ã®å ´åˆã€`quota_key`ã¯â€˜192.168.1.1’ã®ã‚ˆã†ãªå€¤ã‚’æŒã¤å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +- `start_time`([Nullable](../../sql-reference/data-types/nullable.md)([DateTime](../../sql-reference/data-types/datetime.md))) — リソース消費é‡ã‚’計算ã™ã‚‹ãŸã‚ã®é–‹å§‹æ™‚刻。 +- `end_time`([Nullable](../../sql-reference/data-types/nullable.md)([DateTime](../../sql-reference/data-types/datetime.md))) — リソース消費é‡ã‚’計算ã™ã‚‹ãŸã‚ã®çµ‚了時刻。 +- `duration` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — リソース消費é‡ã‚’計算ã™ã‚‹ãŸã‚ã®æ™‚é–“é–“éš”ã®é•·ã•ï¼ˆç§’)。 +- `queries` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ã“ã®é–“éš”ã§ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ç·æ•°ã€‚ +- `query_selects` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ã“ã®é–“éš”ã§ã®ã‚»ãƒ¬ã‚¯ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ç·æ•°ã€‚ +- `query_inserts` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ã“ã®é–“éš”ã§ã®ã‚¤ãƒ³ã‚µãƒ¼ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ç·æ•°ã€‚ +- `max_queries` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — リクエストã®æœ€å¤§æ•°ã€‚ +- `errors` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — 例外を投ã’ãŸã‚¯ã‚¨ãƒªã®æ•°ã€‚ +- `max_errors` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — エラーã®æœ€å¤§æ•°ã€‚ +- `result_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — çµæžœã¨ã—ã¦å¾—られãŸè¡Œã®ç·æ•°ã€‚ +- `max_result_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — çµæžœè¡Œã®æœ€å¤§æ•°ã€‚ +- `result_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリçµæžœã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚ŒãŸRAMã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ +- `max_result_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリçµæžœã®ä¿å­˜ã«ä½¿ç”¨ã•ã‚ŒãŸæœ€å¤§RAMボリューム(ãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ +- `read_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã§ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ãŸã‚ã«ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–ã£ãŸã‚½ãƒ¼ã‚¹è¡Œã®ç·æ•°ã€‚ +- `max_read_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリã«é–¢ä¸Žã—ãŸã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã‹ã‚‰èª­ã¿å–られãŸè¡Œã®æœ€å¤§æ•°ã€‚ +- `read_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリã«é–¢ä¸Žã—ãŸã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã‹ã‚‰èª­ã¿å–られãŸãƒã‚¤ãƒˆæ•°ã®ç·æ•°ã€‚ +- `max_read_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã‹ã‚‰èª­ã¿å–られãŸãƒã‚¤ãƒˆã®æœ€å¤§æ•°ã€‚ +- `failed_sequential_authentications` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/float.md))) — 連続ã™ã‚‹èªè¨¼å¤±æ•—ã®ç·æ•°ã€‚ユーザー㌠`failed_sequential_authentications` ã®é–¾å€¤ã‚’超ãˆã‚‹å‰ã«æ­£ã—ã„パスワードを入力ã—ãŸå ´åˆã€ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã¯ãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ +- `max_failed_sequential_authentications` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/float.md))) — 連続ã™ã‚‹èªè¨¼å¤±æ•—ã®æœ€å¤§æ•°ã€‚ +- `execution_time` ([Nullable](../../sql-reference/data-types/nullable.md)([Float64](../../sql-reference/data-types/float.md))) — クエリã®ç·å®Ÿè¡Œæ™‚間(秒ã€å®Ÿæ™‚間)。 +- `max_execution_time` ([Nullable](../../sql-reference/data-types/nullable.md)([Float64](../../sql-reference/data-types/float.md))) — クエリ実行時間ã®æœ€å¤§å€¤ã€‚ + +## 関連項目 {#see-also} + +- [SHOW QUOTA](../../sql-reference/statements/show.md#show-quota-statement) diff --git a/docs/ja/operations/system-tables/quotas.md b/docs/ja/operations/system-tables/quotas.md new file mode 100644 index 00000000000..6a842aacbb5 --- /dev/null +++ b/docs/ja/operations/system-tables/quotas.md @@ -0,0 +1,28 @@ +--- +slug: /ja/operations/system-tables/quotas +--- +# quotas + +[クォータ](../../operations/system-tables/quotas.md)ã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: +- `name` ([String](../../sql-reference/data-types/string.md)) — クォータå。 +- `id` ([UUID](../../sql-reference/data-types/uuid.md)) — クォータID。 +- `storage`([String](../../sql-reference/data-types/string.md)) — クォータã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã€‚å¯èƒ½ãªå€¤ã¯ã€users.xmlファイルã§è¨­å®šã•ã‚ŒãŸå ´åˆã¯ã€Œusers.xmlã€ã€SQLクエリã§è¨­å®šã•ã‚ŒãŸå ´åˆã¯ã€Œdiskã€ã§ã™ã€‚ +- `keys` ([Array](../../sql-reference/data-types/array.md)([Enum8](../../sql-reference/data-types/enum.md))) — クォータãŒã©ã®ã‚ˆã†ã«å…±æœ‰ã•ã‚Œã‚‹ã‹ã‚’指定ã™ã‚‹ã‚­ãƒ¼ã€‚åŒã˜ã‚¯ã‚©ãƒ¼ã‚¿ã¨ã‚­ãƒ¼ã‚’使用ã™ã‚‹2ã¤ã®æŽ¥ç¶šã¯ã€åŒã˜ãƒªã‚½ãƒ¼ã‚¹é‡ã‚’共有ã—ã¾ã™ã€‚値: + - `[]` — ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒåŒã˜ã‚¯ã‚©ãƒ¼ã‚¿ã‚’共有ã—ã¾ã™ã€‚ + - `['user_name']` — åŒã˜ãƒ¦ãƒ¼ã‚¶ãƒ¼åã‚’æŒã¤æŽ¥ç¶šã¯åŒã˜ã‚¯ã‚©ãƒ¼ã‚¿ã‚’共有ã—ã¾ã™ã€‚ + - `['ip_address']` — åŒã˜IPã‹ã‚‰ã®æŽ¥ç¶šã¯åŒã˜ã‚¯ã‚©ãƒ¼ã‚¿ã‚’共有ã—ã¾ã™ã€‚ + - `['client_key']` — åŒã˜ã‚­ãƒ¼ã‚’æŒã¤æŽ¥ç¶šã¯åŒã˜ã‚¯ã‚©ãƒ¼ã‚¿ã‚’共有ã—ã¾ã™ã€‚キーã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã£ã¦æ˜Žç¤ºçš„ã«æä¾›ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚[clickhouse-client](../../interfaces/cli.md)を使用ã™ã‚‹å ´åˆã¯ã€`--quota_key`パラメータã§ã‚­ãƒ¼å€¤ã‚’渡ã™ã‹ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆæ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã«`quota_key`パラメータを使用ã—ã¾ã™ã€‚HTTPインターフェースを使用ã™ã‚‹å ´åˆã¯ã€`X-ClickHouse-Quota`ヘッダーを使用ã—ã¾ã™ã€‚ + - `['user_name', 'client_key']` — åŒã˜`client_key`ã‚’æŒã¤æŽ¥ç¶šã¯åŒã˜ã‚¯ã‚©ãƒ¼ã‚¿ã‚’共有ã—ã¾ã™ã€‚キーãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã£ã¦æä¾›ã•ã‚Œãªã„å ´åˆã€ã‚¯ã‚©ãƒ¼ã‚¿ã¯`user_name`ã§è¿½è·¡ã•ã‚Œã¾ã™ã€‚ + - `['client_key', 'ip_address']` — åŒã˜`client_key`ã‚’æŒã¤æŽ¥ç¶šã¯åŒã˜ã‚¯ã‚©ãƒ¼ã‚¿ã‚’共有ã—ã¾ã™ã€‚キーãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã£ã¦æä¾›ã•ã‚Œãªã„å ´åˆã€ã‚¯ã‚©ãƒ¼ã‚¿ã¯`ip_address`ã§è¿½è·¡ã•ã‚Œã¾ã™ã€‚ +- `durations` ([Array](../../sql-reference/data-types/array.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — 秒å˜ä½ã®æ™‚é–“é–“éš”ã®é•·ã•ã€‚ +- `apply_to_all` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — è«–ç†å€¤ã€‚ã“ã®å€¤ã¯ã‚¯ã‚©ãƒ¼ã‚¿ãŒé©ç”¨ã•ã‚Œã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’示ã—ã¾ã™ã€‚値: + - `0` — クォータã¯`apply_to_list`ã«æŒ‡å®šã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + - `1` — クォータã¯`apply_to_except`ã«è¨˜è¼‰ã•ã‚Œã¦ã„ãªã„ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ +- `apply_to_list` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — クォータをé©ç”¨ã™ã¹ãユーザーå/[ロール](../../guides/sre/user-management/index.md#role-management)ã®ãƒªã‚¹ãƒˆã€‚ +- `apply_to_except` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — クォータをé©ç”¨ã—ãªã„ユーザーå/ロールã®ãƒªã‚¹ãƒˆã€‚ + +## å‚ç…§ {#see-also} + +- [SHOW QUOTAS](../../sql-reference/statements/show.md#show-quotas-statement) diff --git a/docs/ja/operations/system-tables/quotas_usage.md b/docs/ja/operations/system-tables/quotas_usage.md new file mode 100644 index 00000000000..37b5d44a2e5 --- /dev/null +++ b/docs/ja/operations/system-tables/quotas_usage.md @@ -0,0 +1,38 @@ +--- +slug: /ja/operations/system-tables/quotas_usage +--- +# quotas_usage + +全ユーザーã®ã‚¯ã‚ªãƒ¼ã‚¿ä½¿ç”¨é‡ã€‚ + +カラム: +- `quota_name` ([String](../../sql-reference/data-types/string.md)) — クオータå。 +- `quota_key` ([String](../../sql-reference/data-types/string.md)) — キーã®å€¤ã€‚ +- `is_current` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¯ã‚ªãƒ¼ã‚¿ä½¿ç”¨é‡ã€‚ +- `start_time` ([Nullable](../../sql-reference/data-types/nullable.md)([DateTime](../../sql-reference/data-types/datetime.md)))) — リソース消費ã®è¨ˆç®—開始時刻。 +- `end_time` ([Nullable](../../sql-reference/data-types/nullable.md)([DateTime](../../sql-reference/data-types/datetime.md)))) — リソース消費ã®è¨ˆç®—終了時刻。 +- `duration` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt32](../../sql-reference/data-types/int-uint.md))) — リソース消費計算ã®ãŸã‚ã®æ™‚é–“é–“éš”ã®é•·ã•ï¼ˆç§’å˜ä½ï¼‰ã€‚ +- `queries` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ã“ã®é–“éš”ã§ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆç·æ•°ã€‚ +- `max_queries` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — リクエストã®æœ€å¤§æ•°ã€‚ +- `query_selects` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ã“ã®é–“éš”ã§ã®SELECTリクエストç·æ•°ã€‚ +- `max_query_selects` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — SELECTリクエストã®æœ€å¤§æ•°ã€‚ +- `query_inserts` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — ã“ã®é–“éš”ã§ã®INSERTリクエストç·æ•°ã€‚ +- `max_query_inserts` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — INSERTリクエストã®æœ€å¤§æ•°ã€‚ +- `errors` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — 例外を発生ã•ã›ãŸã‚¯ã‚¨ãƒªæ•°ã€‚ +- `max_errors` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — エラーã®æœ€å¤§æ•°ã€‚ +- `result_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — çµæžœã¨ã—ã¦è¿”ã•ã‚ŒãŸè¡Œã®ç·æ•°ã€‚ +- `max_result_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — テーブルã‹ã‚‰èª­ã¿å–られãŸã‚½ãƒ¼ã‚¹è¡Œã®æœ€å¤§æ•°ã€‚ +- `result_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリã®çµæžœã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚ŒãŸRAMãƒã‚¤ãƒˆæ•°ã€‚ +- `max_result_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリã®çµæžœã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚ŒãŸRAMã®æœ€å¤§ãƒã‚¤ãƒˆæ•°ã€‚ +- `read_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md)))) — ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ä¸Šã§ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ãŸã‚ã«ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–られãŸã‚½ãƒ¼ã‚¹è¡Œã®ç·æ•°ã€‚ +- `max_read_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリã«é–¢ä¸Žã—ãŸã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã‹ã‚‰èª­ã¿å–られãŸè¡Œã®æœ€å¤§æ•°ã€‚ +- `read_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリã«é–¢ä¸Žã—ãŸã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã‹ã‚‰èª­ã¿å–られãŸãƒã‚¤ãƒˆæ•°ã®ç·æ•°ã€‚ +- `max_read_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — クエリã«é–¢ä¸Žã—ãŸã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ル関数ã‹ã‚‰èª­ã¿å–られãŸãƒã‚¤ãƒˆæ•°ã®æœ€å¤§å€¤ã€‚ +- `failed_sequential_authentications` ([Nullable](../../sql-reference/data-types/nullable.md)([Float64](../../sql-reference/data-types/float.md))) — 連続ã—ãŸèªè¨¼å¤±æ•—ã®ç·æ•°ã€‚ユーザーãŒ`failed_sequential_authentications`ã®ã—ãã„値を超ãˆã‚‹å‰ã«æ­£ã—ã„パスワードを入力ã—ãŸå ´åˆã€ã‚«ã‚¦ãƒ³ã‚¿ã¯ãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ +- `max_failed_sequential_authentications` ([Nullable](../../sql-reference/data-types/nullable.md)([Float64](../../sql-reference/data-types/float.md))) — 連続ã—ãŸèªè¨¼å¤±æ•—ã®æœ€å¤§æ•°ã€‚ +- `execution_time` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/float.md))) — クエリã®ç·å®Ÿè¡Œæ™‚間(秒å˜ä½ã®å£æ™‚計時間)。 +- `max_execution_time` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/float.md))) — クエリã®å®Ÿè¡Œæ™‚é–“ã®æœ€å¤§å€¤ã€‚ + +## å‚ç…§ {#see-also} + +- [SHOW QUOTA](../../sql-reference/statements/show.md#show-quota-statement) diff --git a/docs/ja/operations/system-tables/replicas.md b/docs/ja/operations/system-tables/replicas.md new file mode 100644 index 00000000000..916b3291b28 --- /dev/null +++ b/docs/ja/operations/system-tables/replicas.md @@ -0,0 +1,132 @@ +--- +slug: /ja/operations/system-tables/replicas +--- +# replicas + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«ã‚µãƒ¼ãƒãƒ¼ã«ã‚るレプリケーションã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®æƒ…å ±ã¨ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ç›£è¦–ã«åˆ©ç”¨ã§ãã¾ã™ã€‚テーブルã«ã¯ã™ã¹ã¦ã®Replicated\*テーブルã«ã¤ã„ã¦è¡ŒãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +例: + +``` sql +SELECT * +FROM system.replicas +WHERE table = 'test_table' +FORMAT Vertical +``` + +``` text +クエリID: dc6dcbcb-dc28-4df9-ae27-4354f5b3b13e + +è¡Œ1: +─────── +database: db +table: test_table +engine: ReplicatedMergeTree +is_leader: 1 +can_become_leader: 1 +is_readonly: 0 +is_session_expired: 0 +future_parts: 0 +parts_to_check: 0 +zookeeper_path: /test/test_table +replica_name: r1 +replica_path: /test/test_table/replicas/r1 +columns_version: -1 +queue_size: 27 +inserts_in_queue: 27 +merges_in_queue: 0 +part_mutations_in_queue: 0 +queue_oldest_time: 2021-10-12 14:48:48 +inserts_oldest_time: 2021-10-12 14:48:48 +merges_oldest_time: 1970-01-01 03:00:00 +part_mutations_oldest_time: 1970-01-01 03:00:00 +oldest_part_to_get: 1_17_17_0 +oldest_part_to_merge_to: +oldest_part_to_mutate_to: +log_max_index: 206 +log_pointer: 207 +last_queue_update: 2021-10-12 14:50:08 +absolute_delay: 99 +total_replicas: 5 +active_replicas: 5 +lost_part_count: 0 +last_queue_update_exception: +zookeeper_exception: +replica_is_active: {'r1':1,'r2':1} +``` + +カラム: + +- `database` (`String`) - データベースå +- `table` (`String`) - テーブルå +- `engine` (`String`) - テーブルエンジンå +- `is_leader` (`UInt8`) - レプリカãŒãƒªãƒ¼ãƒ€ãƒ¼ã‹ã©ã†ã‹ã€‚ + 複数ã®ãƒ¬ãƒ—リカãŒåŒæ™‚ã«ãƒªãƒ¼ãƒ€ãƒ¼ã«ãªã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚レプリカãŒãƒªãƒ¼ãƒ€ãƒ¼ã«ãªã‚‹ã®ã‚’防ããŸã‚ã«`merge_tree`設定`replicated_can_become_leader`を使用ã§ãã¾ã™ã€‚リーダーã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã®ãƒžãƒ¼ã‚¸ã‚’スケジュールã™ã‚‹è²¬ä»»ã‚’æŒã¡ã¾ã™ã€‚ + Zookeeperã«ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’æŒã¡åˆ©ç”¨å¯èƒ½ã§ã‚ã‚‹é™ã‚Šã€ãƒªãƒ¼ãƒ€ãƒ¼ã§ã‚ã‚‹ã‹ã©ã†ã‹ã«é–¢ã‚らãšã€ä»»æ„ã®ãƒ¬ãƒ—リカã«æ›¸ãè¾¼ã¿ãŒã§ãã¾ã™ã€‚ +- `can_become_leader` (`UInt8`) - レプリカãŒãƒªãƒ¼ãƒ€ãƒ¼ã«ãªã‚Œã‚‹ã‹ã©ã†ã‹ã€‚ +- `is_readonly` (`UInt8`) - レプリカãŒèª­ã¿å–り専用モードã‹ã©ã†ã‹ã€‚ + ã“ã®ãƒ¢ãƒ¼ãƒ‰ã¯ã€ClickHouse Keeperã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ãŒè¨­å®šã«å­˜åœ¨ã—ãªã„å ´åˆã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’ClickHouse Keeperã§å†åˆæœŸåŒ–ã™ã‚‹éš›ã«æœªçŸ¥ã®ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã€ã¾ãŸã¯ClickHouse Keeperã§ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’å†åˆæœŸåŒ–ã™ã‚‹éš›ã«æœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ +- `is_session_expired` (`UInt8`) - ClickHouse Keeperã¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒæœŸé™åˆ‡ã‚Œã«ãªã£ãŸã‹ã©ã†ã‹ã€‚基本的ã«ã¯`is_readonly`ã¨åŒã˜ã§ã™ã€‚ +- `future_parts` (`UInt32`) - 挿入や未完了ã®ãƒžãƒ¼ã‚¸ã®çµæžœã¨ã—ã¦ç¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®æ•°ã€‚ +- `parts_to_check` (`UInt32`) - 検証中ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®æ•°ã€‚ç ´æã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹å ´åˆã«æ¤œè¨¼ã‚­ãƒ¥ãƒ¼ã«ç™»éŒ²ã•ã‚Œã¾ã™ã€‚ +- `zookeeper_path` (`String`) - ClickHouse Keeperã«ãŠã‘るテーブルデータã¸ã®ãƒ‘ス。 +- `replica_name` (`String`) - ClickHouse Keeperã«ãŠã‘るレプリカå。åŒã˜ãƒ†ãƒ¼ãƒ–ルã®ç•°ãªã‚‹ãƒ¬ãƒ—リカã¯ç•°ãªã‚‹åå‰ã‚’æŒã¡ã¾ã™ã€‚ +- `replica_path` (`String`) - ClickHouse Keeperã«ãŠã‘るレプリカデータã¸ã®ãƒ‘ス。ã“ã‚Œã¯â€˜zookeeper_path/replicas/replica_path’を連çµã—ãŸã‚‚ã®ã¨åŒã˜ã§ã™ã€‚ +- `columns_version` (`Int32`) - テーブル構造ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã€‚ALTERãŒå®Ÿè¡Œã•ã‚ŒãŸå›žæ•°ã‚’示ã—ã¾ã™ã€‚レプリカãŒç•°ãªã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€ä¸€éƒ¨ã®ãƒ¬ãƒ—リカãŒã¾ã ã™ã¹ã¦ã®ALTERã‚’è¡Œã£ã¦ã„ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +- `queue_size` (`UInt32`) - 実行待ã¡ã®æ“作ã®ã‚­ãƒ¥ãƒ¼ã®ã‚µã‚¤ã‚ºã€‚æ“作ã«ã¯ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®æŒ¿å…¥ã€ãƒžãƒ¼ã‚¸ã€ãŠã‚ˆã³ç‰¹å®šã®ä»–ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒå«ã¾ã‚Œã¾ã™ã€‚通常ã¯`future_parts`ã¨ä¸€è‡´ã—ã¾ã™ã€‚ +- `inserts_in_queue` (`UInt32`) - 挿入ã•ã‚Œã‚‹å¿…è¦ã®ã‚るデータブロックã®æŒ¿å…¥æ•°ã€‚挿入ã¯é€šå¸¸ã‹ãªã‚Šè¿…速ã«ãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚ã“ã®æ•°ãŒå¤§ãã„å ´åˆã€ä½•ã‹å•é¡ŒãŒã‚ã‚Šã¾ã™ã€‚ +- `merges_in_queue` (`UInt32`) - 実行待ã¡ã®ãƒžãƒ¼ã‚¸ã®æ•°ã€‚マージã¯æ™‚折長引ããŸã‚ã€ã“ã®å€¤ãŒã—ã°ã‚‰ãゼロを超ãˆã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +- `part_mutations_in_queue` (`UInt32`) - 実行待ã¡ã®å¤‰ç•°ã®æ•°ã€‚ +- `queue_oldest_time` (`DateTime`) - `queue_size`ãŒã‚¼ãƒ­ã‚’超ãˆã‚‹å ´åˆã€æœ€ã‚‚å¤ã„æ“作ãŒã‚­ãƒ¥ãƒ¼ã«è¿½åŠ ã•ã‚ŒãŸæ™‚刻を示ã—ã¾ã™ã€‚ +- `inserts_oldest_time` (`DateTime`) - `queue_oldest_time`ã‚’å‚ç…§ +- `merges_oldest_time` (`DateTime`) - `queue_oldest_time`ã‚’å‚ç…§ +- `part_mutations_oldest_time` (`DateTime`) - `queue_oldest_time`ã‚’å‚ç…§ + +次ã®4ã¤ã®ã‚«ãƒ©ãƒ ã¯ã€Zookeeperã¨ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒã‚ã‚‹å ´åˆã«ã®ã¿éžã‚¼ãƒ­ã®å€¤ã‚’æŒã¡ã¾ã™ã€‚ + +- `log_max_index` (`UInt64`) - 一般活動ã®ãƒ­ã‚°ã«ãŠã‘る最大ã®ã‚¨ãƒ³ãƒˆãƒªç•ªå·ã€‚ +- `log_pointer` (`UInt64`) - レプリカãŒå®Ÿè¡Œã‚­ãƒ¥ãƒ¼ã«ã‚³ãƒ”ーã—ãŸä¸€èˆ¬æ´»å‹•ã®ãƒ­ã‚°ã®æœ€å¤§ã‚¨ãƒ³ãƒˆãƒªç•ªå·ã«1を加ãˆãŸã‚‚ã®ã€‚`log_pointer`ãŒ`log_max_index`よりã¯ã‚‹ã‹ã«å°ã•ã„å ´åˆã€ä½•ã‹ãŒãŠã‹ã—ã„ã§ã™ã€‚ +- `last_queue_update` (`DateTime`) - キューãŒæœ€å¾Œã«æ›´æ–°ã•ã‚ŒãŸæ™‚刻。 +- `absolute_delay` (`UInt64`) - ç¾åœ¨ã®ãƒ¬ãƒ—リカãŒæŒã¤é…延秒数。 +- `total_replicas` (`UInt8`) - ã“ã®ãƒ†ãƒ¼ãƒ–ルã®æ—¢çŸ¥ã®ãƒ¬ãƒ—リカã®ç·æ•°ã€‚ +- `active_replicas` (`UInt8`) - ClickHouse Keeperã«ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®ã‚ã‚‹ã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ¬ãƒ—リカ数(ã¤ã¾ã‚Šã€ç¨¼åƒä¸­ã®ãƒ¬ãƒ—リカã®æ•°ï¼‰ã€‚ +- `lost_part_count` (`UInt64`) - テーブルãŒä½œæˆã•ã‚Œã¦ä»¥æ¥ã€å…¨ãƒ¬ãƒ—リカã§åˆè¨ˆã¨ã—ã¦ãƒ†ãƒ¼ãƒ–ル内ã§å¤±ã‚ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®æ•°ã€‚値ã¯ClickHouse Keeperã«ä¿å­˜ã•ã‚Œå¢—加ã®ã¿ã•ã‚Œã¾ã™ã€‚ +- `last_queue_update_exception` (`String`) - キューã«å£Šã‚ŒãŸã‚¨ãƒ³ãƒˆãƒªãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€‚特ã«ã€ClickHouseãŒãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã§å¾Œæ–¹äº’æ›æ€§ã‚’ç ´ã‚‹éš›ã«é‡è¦ã§ã‚ã‚Šã€æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§æ›¸ã‹ã‚ŒãŸãƒ­ã‚°ã‚¨ãƒ³ãƒˆãƒªãŒå¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§è§£æžã§ããªã„å ´åˆã«ç‰¹ã«æ³¨æ„ã—ã¾ã™ã€‚ +- `zookeeper_exception` (`String`) - ClickHouse Keeperã‹ã‚‰æƒ…報をå–å¾—ã™ã‚‹éš›ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã«å¾—られãŸæœ€å¾Œã®ä¾‹å¤–メッセージ。 +- `replica_is_active` ([Map(String, UInt8)](../../sql-reference/data-types/map.md)) — レプリカåã¨ãƒ¬ãƒ—リカãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã‹ã©ã†ã‹ã®ãƒžãƒƒãƒ—。 + +ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’リクエストã™ã‚‹ã¨ã€å„è¡Œã”ã¨ã«ClickHouse Keeperã‹ã‚‰è¤‡æ•°å›žã®èª­ã¿å–ã‚ŠãŒè¡Œã‚れるãŸã‚ã€ãƒ†ãƒ¼ãƒ–ルã®å‹•ä½œãŒå¤šå°‘é…ããªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚最後ã®4ã¤ã®ã‚«ãƒ©ãƒ ï¼ˆlog_max_index, log_pointer, total_replicas, active_replicas)をリクエストã—ãªã‘ã‚Œã°ã€ãƒ†ãƒ¼ãƒ–ルã¯é€Ÿã動作ã—ã¾ã™ã€‚ + +例ãˆã°ã€ã™ã¹ã¦ãŒæ­£å¸¸ã«å‹•ä½œã—ã¦ã„ã‚‹ã‹ã‚’次ã®ã‚ˆã†ã«ãƒã‚§ãƒƒã‚¯ã§ãã¾ã™: + +``` sql +SELECT + database, + table, + is_leader, + is_readonly, + is_session_expired, + future_parts, + parts_to_check, + columns_version, + queue_size, + inserts_in_queue, + merges_in_queue, + log_max_index, + log_pointer, + total_replicas, + active_replicas +FROM system.replicas +WHERE + is_readonly + OR is_session_expired + OR future_parts > 20 + OR parts_to_check > 10 + OR queue_size > 20 + OR inserts_in_queue > 10 + OR log_max_index - log_pointer > 10 + OR total_replicas < 2 + OR active_replicas < total_replicas +``` + +ã“ã®ã‚¯ã‚¨ãƒªãŒä½•ã‚‚è¿”ã•ãªã‘ã‚Œã°ã€ã™ã¹ã¦ãŒæ­£å¸¸ã§ã™ã€‚ diff --git a/docs/ja/operations/system-tables/replicated_fetches.md b/docs/ja/operations/system-tables/replicated_fetches.md new file mode 100644 index 00000000000..8c66020fc9a --- /dev/null +++ b/docs/ja/operations/system-tables/replicated_fetches.md @@ -0,0 +1,71 @@ +--- +slug: /ja/operations/system-tables/replicated_fetches +--- +# replicated_fetches + +ç¾åœ¨å®Ÿè¡Œä¸­ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ•ã‚§ãƒƒãƒã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `database` ([String](../../sql-reference/data-types/string.md)) — データベースã®åå‰ã€‚ + +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルã®åå‰ã€‚ + +- `elapsed` ([Float64](../../sql-reference/data-types/float.md)) — ç¾åœ¨å®Ÿè¡Œä¸­ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ•ã‚§ãƒƒãƒã®é–‹å§‹ã‹ã‚‰çµŒéŽã—ãŸæ™‚間(秒å˜ä½ï¼‰ã€‚ + +- `progress` ([Float64](../../sql-reference/data-types/float.md)) — 完了ã—ãŸä½œæ¥­ã®å‰²åˆã‚’0ã‹ã‚‰1ã®ç¯„囲ã§ç¤ºã—ã¾ã™ã€‚ + +- `result_part_name` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨å®Ÿè¡Œä¸­ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ•ã‚§ãƒƒãƒã®çµæžœã¨ã—ã¦å½¢æˆã•ã‚Œã‚‹ãƒ‘ートã®åå‰ã€‚ + +- `result_part_path` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨å®Ÿè¡Œä¸­ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ•ã‚§ãƒƒãƒã®çµæžœã¨ã—ã¦å½¢æˆã•ã‚Œã‚‹ãƒ‘ートã¸ã®çµ¶å¯¾ãƒ‘ス。 + +- `partition_id` ([String](../../sql-reference/data-types/string.md)) — パーティションã®ID。 + +- `total_size_bytes_compressed` ([UInt64](../../sql-reference/data-types/int-uint.md)) — çµæžœãƒ‘ート内ã®åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®ç·ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚ + +- `bytes_read_compressed` ([UInt64](../../sql-reference/data-types/int-uint.md)) — çµæžœãƒ‘ートã‹ã‚‰èª­ã¿å–られãŸåœ§ç¸®ãƒã‚¤ãƒˆæ•°ã€‚ + +- `source_replica_path` ([String](../../sql-reference/data-types/string.md)) — ソースレプリカã¸ã®çµ¶å¯¾ãƒ‘ス。 + +- `source_replica_hostname` ([String](../../sql-reference/data-types/string.md)) — ソースレプリカã®ãƒ›ã‚¹ãƒˆå。 + +- `source_replica_port` ([UInt16](../../sql-reference/data-types/int-uint.md)) — ソースレプリカã®ãƒãƒ¼ãƒˆç•ªå·ã€‚ + +- `interserver_scheme` ([String](../../sql-reference/data-types/string.md)) — インターサーãƒãƒ¼ã‚¹ã‚­ãƒ¼ãƒ ã®åå‰ã€‚ + +- `URI` ([String](../../sql-reference/data-types/string.md)) — 統一リソース識別å­ã€‚ + +- `to_detached` ([UInt8](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨å®Ÿè¡Œä¸­ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ•ã‚§ãƒƒãƒãŒ `TO DETACHED` å¼ã‚’使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ + +- `thread_id` ([UInt64](../../sql-reference/data-types/int-uint.md)) — スレッド識別å­ã€‚ + +**例** + +``` sql +SELECT * FROM system.replicated_fetches LIMIT 1 FORMAT Vertical; +``` + +``` text +è¡Œ 1: +────── +database: default +table: t +elapsed: 7.243039876 +progress: 0.41832135995612835 +result_part_name: all_0_0_0 +result_part_path: /var/lib/clickhouse/store/700/70080a04-b2de-4adf-9fa5-9ea210e81766/all_0_0_0/ +partition_id: all +total_size_bytes_compressed: 1052783726 +bytes_read_compressed: 440401920 +source_replica_path: /clickhouse/test/t/replicas/1 +source_replica_hostname: node1 +source_replica_port: 9009 +interserver_scheme: http +URI: http://node1:9009/?endpoint=DataPartsExchange%3A%2Fclickhouse%2Ftest%2Ft%2Freplicas%2F1&part=all_0_0_0&client_protocol_version=4&compress=false +to_detached: 0 +thread_id: 54 +``` + +**å‚ç…§** + +- [ReplicatedMergeTreeテーブルã®ç®¡ç†](../../sql-reference/statements/system.md/#managing-replicatedmergetree-tables) diff --git a/docs/ja/operations/system-tables/replication_queue.md b/docs/ja/operations/system-tables/replication_queue.md new file mode 100644 index 00000000000..18f810f4464 --- /dev/null +++ b/docs/ja/operations/system-tables/replication_queue.md @@ -0,0 +1,92 @@ +--- +slug: /ja/operations/system-tables/replication_queue +--- +# replication_queue + +`ClickHouse Keeper` ã¾ãŸã¯ `ZooKeeper` ã«æ ¼ç´ã•ã‚Œã¦ã„るレプリケーションキューã‹ã‚‰ã®ã‚¿ã‚¹ã‚¯æƒ…報をã€`ReplicatedMergeTree` ファミリーã®ãƒ†ãƒ¼ãƒ–ル用ã«å«ã‚“ã§ã„ã¾ã™ã€‚ + +カラム: + +- `database` ([String](../../sql-reference/data-types/string.md)) — データベースã®åå‰ã€‚ + +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルã®åå‰ã€‚ + +- `replica_name` ([String](../../sql-reference/data-types/string.md)) — ClickHouse Keeper 内ã§ã®ãƒ¬ãƒ—リカã®åå‰ã€‚åŒã˜ãƒ†ãƒ¼ãƒ–ルã®ç•°ãªã‚‹ãƒ¬ãƒ—リカã«ã¯ç•°ãªã‚‹åå‰ãŒã‚ã‚Šã¾ã™ã€‚ + +- `position` ([UInt32](../../sql-reference/data-types/int-uint.md)) — キュー内ã§ã®ã‚¿ã‚¹ã‚¯ã®ä½ç½®ã€‚ + +- `node_name` ([String](../../sql-reference/data-types/string.md)) — ClickHouse Keeper 内ã®ãƒŽãƒ¼ãƒ‰ã®åå‰ã€‚ + +- `type` ([String](../../sql-reference/data-types/string.md)) — キュー内ã®ã‚¿ã‚¹ã‚¯ã®ã‚¿ã‚¤ãƒ—ã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ï¼š + + - `GET_PART` — ä»–ã®ãƒ¬ãƒ—リカã‹ã‚‰ãƒ‘ーツをå–得。 + - `ATTACH_PART` — パーツをアタッãƒã€ãŠãらã自分ã®ãƒ¬ãƒ—リカã‹ã‚‰ï¼ˆ`detached` フォルダー内ã§è¦‹ã¤ã‹ã£ãŸå ´åˆï¼‰ã€‚`GET_PART` ã¨ã»ã¼åŒä¸€ã§ã™ãŒã€ã„ãã¤ã‹ã®æœ€é©åŒ–ãŒã‚ã‚Šã¾ã™ã€‚ + - `MERGE_PARTS` — パーツをマージ。 + - `DROP_RANGE` — 指定ã•ã‚ŒãŸãƒ‘ーティション内ã®æŒ‡å®šã•ã‚ŒãŸç•ªå·ç¯„囲ã®ãƒ‘ーツを削除。 + - `CLEAR_COLUMN` — 注æ„: 廃止予定。指定ã•ã‚ŒãŸãƒ‘ーティションã‹ã‚‰ã®ç‰¹å®šã®ã‚«ãƒ©ãƒ ã‚’削除。 + - `CLEAR_INDEX` — 注æ„: 廃止予定。指定ã•ã‚ŒãŸãƒ‘ーティションã‹ã‚‰ã®ç‰¹å®šã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’削除。 + - `REPLACE_RANGE` — 特定ã®ãƒ‘ーツ範囲を削除ã—ã€æ–°ã—ã„ã‚‚ã®ã¨ç½®ãæ›ãˆã€‚ + - `MUTATE_PART` — パーツã«ä¸€ã¤ã¾ãŸã¯è¤‡æ•°ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’é©ç”¨ã€‚ + - `ALTER_METADATA` — グローãƒãƒ«ãª /metadata ãŠã‚ˆã³ /columns パスã«å¾“ã£ã¦ã‚¢ãƒ«ã‚¿ãƒ¼ãƒ¢ãƒ‡ã‚£ãƒ•ã‚£ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚’é©ç”¨ã€‚ + +- `create_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — タスクãŒå®Ÿè¡Œã®ãŸã‚ã«æ出ã•ã‚ŒãŸæ—¥æ™‚。 + +- `required_quorum` ([UInt32](../../sql-reference/data-types/int-uint.md)) — タスクã®å®Œäº†ç¢ºèªã‚’å¾…ã£ã¦ã„るレプリカã®æ•°ã€‚ã“ã®ã‚«ãƒ©ãƒ ã¯ `GET_PARTS` タスクã«ã®ã¿é–¢é€£ã—ã¾ã™ã€‚ + +- `source_replica` ([String](../../sql-reference/data-types/string.md)) — ソースレプリカã®åå‰ã€‚ + +- `new_part_name` ([String](../../sql-reference/data-types/string.md)) — æ–°ã—ã„パーツã®åå‰ã€‚ + +- `parts_to_merge` ([Array](../../sql-reference/data-types/array.md) ([String](../../sql-reference/data-types/string.md))) — マージã¾ãŸã¯æ›´æ–°ã™ã‚‹ãƒ‘ーツã®åå‰ã€‚ + +- `is_detach` ([UInt8](../../sql-reference/data-types/int-uint.md)) — キュー㫠`DETACH_PARTS` タスクãŒã‚ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ + +- `is_currently_executing` ([UInt8](../../sql-reference/data-types/int-uint.md)) — 特定ã®ã‚¿ã‚¹ã‚¯ãŒç¾åœ¨å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ + +- `num_tries` ([UInt32](../../sql-reference/data-types/int-uint.md)) — タスクã®å®Œäº†ã«å¤±æ•—ã—ãŸè©¦è¡Œå›žæ•°ã€‚ + +- `last_exception` ([String](../../sql-reference/data-types/string.md)) — 発生ã—ãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ã«ã¤ã„ã¦ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ï¼ˆã‚ã‚Œã°ï¼‰ã€‚ + +- `last_attempt_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — タスクãŒæœ€å¾Œã«è©¦ã¿ã‚‰ã‚ŒãŸæ—¥æ™‚。 + +- `num_postponed` ([UInt32](../../sql-reference/data-types/int-uint.md)) — アクションãŒå»¶æœŸã•ã‚ŒãŸå›žæ•°ã€‚ + +- `postpone_reason` ([String](../../sql-reference/data-types/string.md)) — タスクãŒå»¶æœŸã•ã‚ŒãŸç†ç”±ã€‚ + +- `last_postpone_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — タスクãŒæœ€å¾Œã«å»¶æœŸã•ã‚ŒãŸæ—¥æ™‚。 + +- `merge_type` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã®ãƒžãƒ¼ã‚¸ã®ã‚¿ã‚¤ãƒ—。ミューテーションã®å ´åˆã€ç©ºã§ã™ã€‚ + +**例** + +``` sql +SELECT * FROM system.replication_queue LIMIT 1 FORMAT Vertical; +``` + +``` text +Row 1: +────── +database: merge +table: visits_v2 +replica_name: mtgiga001-1t +position: 15 +node_name: queue-0009325559 +type: MERGE_PARTS +create_time: 2020-12-07 14:04:21 +required_quorum: 0 +source_replica: mtgiga001-1t +new_part_name: 20201130_121373_121384_2 +parts_to_merge: ['20201130_121373_121378_1','20201130_121379_121379_0','20201130_121380_121380_0','20201130_121381_121381_0','20201130_121382_121382_0','20201130_121383_121383_0','20201130_121384_121384_0'] +is_detach: 0 +is_currently_executing: 0 +num_tries: 36 +last_exception: Code: 226, e.displayText() = DB::Exception: Marks file '/opt/clickhouse/data/merge/visits_v2/tmp_fetch_20201130_121373_121384_2/CounterID.mrk' does not exist (version 20.8.7.15 (official build)) +last_attempt_time: 2020-12-08 17:35:54 +num_postponed: 0 +postpone_reason: +last_postpone_time: 1970-01-01 03:00:00 +``` + +**å‚ç…§** + +- [ReplicatedMergeTree テーブルã®ç®¡ç†](../../sql-reference/statements/system.md#query-language-system-replicated) diff --git a/docs/ja/operations/system-tables/resources.md b/docs/ja/operations/system-tables/resources.md new file mode 100644 index 00000000000..bb75284f4c8 --- /dev/null +++ b/docs/ja/operations/system-tables/resources.md @@ -0,0 +1,37 @@ +--- +slug: /ja/operations/system-tables/resources +--- +# resources + +ローカルサーãƒãƒ¼ä¸Šã«å­˜åœ¨ã™ã‚‹[リソース](/docs/ja/operations/workload-scheduling.md#workload_entity_storage)ã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯å„リソースã”ã¨ã«è¡ŒãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +例: + +``` sql +SELECT * +FROM system.resources +FORMAT Vertical +``` + +``` text +Row 1: +────── +name: io_read +read_disks: ['s3'] +write_disks: [] +create_query: CREATE RESOURCE io_read (READ DISK s3) + +Row 2: +────── +name: io_write +read_disks: [] +write_disks: ['s3'] +create_query: CREATE RESOURCE io_write (WRITE DISK s3) +``` + +カラム: + +- `name` (`String`) - リソースå。 +- `read_disks` (`Array(String)`) - 読ã¿å–ã‚Šæ“作ã«ã“ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’使用ã™ã‚‹ãƒ‡ã‚£ã‚¹ã‚¯åã®é…列。 +- `write_disks` (`Array(String)`) - 書ãè¾¼ã¿æ“作ã«ã“ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’使用ã™ã‚‹ãƒ‡ã‚£ã‚¹ã‚¯åã®é…列。 +- `create_query` (`String`) - リソースã®å®šç¾©ã€‚ diff --git a/docs/ja/operations/system-tables/role-grants.md b/docs/ja/operations/system-tables/role-grants.md new file mode 100644 index 00000000000..6c56ed07623 --- /dev/null +++ b/docs/ja/operations/system-tables/role-grants.md @@ -0,0 +1,22 @@ +--- +slug: /ja/operations/system-tables/role-grants +--- +# role_grants + +ユーザーã¨ãƒ­ãƒ¼ãƒ«ã®ãŸã‚ã®ãƒ­ãƒ¼ãƒ«ä»˜ä¸Žæƒ…報をå«ã¿ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã‚¨ãƒ³ãƒˆãƒªã‚’追加ã™ã‚‹ã«ã¯ã€`GRANT role TO user`を使用ã—ã¾ã™ã€‚ + +カラム: + +- `user_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ユーザーå。 + +- `role_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ロールå。 + +- `granted_role_name` ([String](../../sql-reference/data-types/string.md)) — `role_name`ロールã«ä»˜ä¸Žã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã®åå‰ã€‚ã‚るロールã«åˆ¥ã®ãƒ­ãƒ¼ãƒ«ã‚’付与ã™ã‚‹ã«ã¯ã€`GRANT role1 TO role2`を使用ã—ã¾ã™ã€‚ + +- `granted_role_is_default` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `granted_role`ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ­ãƒ¼ãƒ«ã§ã‚ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚å¯èƒ½ãªå€¤: + - 1 — `granted_role`ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ­ãƒ¼ãƒ«ã§ã™ã€‚ + - 0 — `granted_role`ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ­ãƒ¼ãƒ«ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +- `with_admin_option` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `granted_role`ãŒ[ADMIN OPTION](../../sql-reference/statements/grant.md#admin-option-privilege)特権をæŒã¤ãƒ­ãƒ¼ãƒ«ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚å¯èƒ½ãªå€¤: + - 1 — ロールã¯`ADMIN OPTION`特権をæŒã¡ã¾ã™ã€‚ + - 0 — ロールã¯`ADMIN OPTION`特権をæŒã¡ã¾ã›ã‚“。 diff --git a/docs/ja/operations/system-tables/roles.md b/docs/ja/operations/system-tables/roles.md new file mode 100644 index 00000000000..8d6fed01a09 --- /dev/null +++ b/docs/ja/operations/system-tables/roles.md @@ -0,0 +1,16 @@ +--- +slug: /ja/operations/system-tables/roles +--- +# roles + +設定ã•ã‚ŒãŸ[ロール](../../guides/sre/user-management/index.md#role-management)ã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `name` ([String](../../sql-reference/data-types/string.md)) — ロールå。 +- `id` ([UUID](../../sql-reference/data-types/uuid.md)) — ロールID。 +- `storage` ([String](../../sql-reference/data-types/string.md)) — ロールã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¸ã®ãƒ‘ス。`access_control_path` パラメータã§è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## å‚ç…§ {#see-also} + +- [SHOW ROLES](../../sql-reference/statements/show.md#show-roles-statement) diff --git a/docs/ja/operations/system-tables/row_policies.md b/docs/ja/operations/system-tables/row_policies.md new file mode 100644 index 00000000000..06fb527fb70 --- /dev/null +++ b/docs/ja/operations/system-tables/row_policies.md @@ -0,0 +1,35 @@ +--- +slug: /ja/operations/system-tables/row_policies +--- +# row_policies + +特定ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¨ã€ã“ã®è¡Œãƒãƒªã‚·ãƒ¼ã‚’使用ã™ã‚‹ã¹ã役割やユーザーã®ãƒªã‚¹ãƒˆã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ + +カラム: +- `name` ([String](../../sql-reference/data-types/string.md)) — è¡Œãƒãƒªã‚·ãƒ¼ã®åå‰ã€‚ + +- `short_name` ([String](../../sql-reference/data-types/string.md)) — è¡Œãƒãƒªã‚·ãƒ¼ã®çŸ­ç¸®å。行ãƒãƒªã‚·ãƒ¼ã®åå‰ã¯è¤‡åˆçš„ã§ã‚ã‚Šã€ä¾‹ãˆã°: myfilter ON mydb.mytable。ã“ã“ã§ã®ã€Œmyfilter ON mydb.mytableã€ãŒè¡Œãƒãƒªã‚·ãƒ¼ã®åå‰ã§ã‚ã‚Šã€ã€Œmyfilterã€ãŒãã®çŸ­ç¸®åã§ã™ã€‚ + +- `database` ([String](../../sql-reference/data-types/string.md)) — データベースå。 + +- `table` ([String](../../sql-reference/data-types/string.md)) — テーブルå。データベースã«å¯¾ã™ã‚‹ãƒãƒªã‚·ãƒ¼ã®å ´åˆã¯ç©ºã€‚ + +- `id` ([UUID](../../sql-reference/data-types/uuid.md)) — è¡Œãƒãƒªã‚·ãƒ¼ID。 + +- `storage` ([String](../../sql-reference/data-types/string.md)) — è¡Œãƒãƒªã‚·ãƒ¼ãŒä¿å­˜ã•ã‚Œã¦ã„るディレクトリã®åå‰ã€‚ + +- `select_filter` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — 行をフィルターã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æ¡ä»¶ã€‚ + +- `is_restrictive` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — è¡Œãƒãƒªã‚·ãƒ¼ãŒè¡Œã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’制é™ã™ã‚‹ã‹ã‚’示ã—ã¾ã™ã€‚[CREATE ROW POLICY](../../sql-reference/statements/create/row-policy.md#create-row-policy-as)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。値: + - `0` — è¡Œãƒãƒªã‚·ãƒ¼ãŒ `AS PERMISSIVE` å¥ã§å®šç¾©ã•ã‚Œã¦ã„る。 + - `1` — è¡Œãƒãƒªã‚·ãƒ¼ãŒ `AS RESTRICTIVE` å¥ã§å®šç¾©ã•ã‚Œã¦ã„る。 + +- `apply_to_all` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — ã™ã¹ã¦ã®å½¹å‰²ãŠã‚ˆã³/ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¨­å®šã•ã‚ŒãŸè¡Œãƒãƒªã‚·ãƒ¼ã‚’示ã—ã¾ã™ã€‚ + +- `apply_to_list` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — è¡Œãƒãƒªã‚·ãƒ¼ãŒé©ç”¨ã•ã‚Œã‚‹å½¹å‰²ãŠã‚ˆã³/ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒªã‚¹ãƒˆã€‚ + +- `apply_to_except` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — 記載ã•ã‚Œã¦ã„る役割ãŠã‚ˆã³/ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’除ãã€è¡Œãƒãƒªã‚·ãƒ¼ãŒé©ç”¨ã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®å½¹å‰²ãŠã‚ˆã³/ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€‚ + +## å‚ç…§ {#see-also} + +- [SHOW POLICIES](../../sql-reference/statements/show.md#show-policies-statement) diff --git a/docs/ja/operations/system-tables/s3_queue_settings.md b/docs/ja/operations/system-tables/s3_queue_settings.md new file mode 100644 index 00000000000..06442dc477c --- /dev/null +++ b/docs/ja/operations/system-tables/s3_queue_settings.md @@ -0,0 +1,19 @@ +--- +slug: /ja/operations/system-tables/s3_queue_settings +--- +# s3_queue_settings + +[S3Queue](../../engines/table-engines/integrations/s3queue.md)テーブルã®è¨­å®šæƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚`24.10`サーãƒãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‹ã‚‰åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +カラム: + +- `database` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 +- `table` ([String](../../sql-reference/data-types/string.md)) — データベースå。 +- `name` ([String](../../sql-reference/data-types/string.md)) — 設定å。 +- `value` ([String](../../sql-reference/data-types/string.md)) — 設定値。 +- `changed` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 設定ãŒè¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã§æ˜Žç¤ºçš„ã«å®šç¾©ã•ã‚ŒãŸã‹ã€ã¾ãŸã¯æ˜Žç¤ºçš„ã«å¤‰æ›´ã•ã‚ŒãŸã‹ã©ã†ã‹ã€‚ +- `description` ([String](../../sql-reference/data-types/string.md)) — 設定ã®èª¬æ˜Žã€‚ +- `alterable` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — `ALTER TABLE ... MODIFY SETTING`を使用ã—ã¦è¨­å®šã‚’変更ã§ãã‚‹ã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚ + - `0` — ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¨­å®šã‚’変更ã§ãる。 + - `1` — ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¨­å®šã‚’変更ã§ããªã„。 +- `type` ([String](../../sql-reference/data-types/string.md)) — 設定ã®ã‚¿ã‚¤ãƒ—(実装固有ã®æ–‡å­—列値)。 diff --git a/docs/ja/operations/system-tables/scheduler.md b/docs/ja/operations/system-tables/scheduler.md new file mode 100644 index 00000000000..507886ec50e --- /dev/null +++ b/docs/ja/operations/system-tables/scheduler.md @@ -0,0 +1,75 @@ +--- +slug: /ja/operations/system-tables/scheduler +--- +# scheduler + +ローカルサーãƒãƒ¼ã«å­˜åœ¨ã™ã‚‹[スケジューリングノード](/docs/ja/operations/workload-scheduling.md/#hierarchy)ã®æƒ…å ±ã¨ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚°ã«åˆ©ç”¨ã§ãã¾ã™ã€‚テーブルã«ã¯å„スケジューリングノードã”ã¨ã«è¡ŒãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +例: + +``` sql +SELECT * +FROM system.scheduler +WHERE resource = 'network_read' AND path = '/prio/fair/prod' +FORMAT Vertical +``` + +``` text +Row 1: +────── +resource: network_read +path: /prio/fair/prod +type: fifo +weight: 5 +priority: 0 +is_active: 0 +active_children: 0 +dequeued_requests: 67 +canceled_requests: 0 +dequeued_cost: 4692272 +canceled_cost: 0 +busy_periods: 63 +vruntime: 938454.1999999989 +system_vruntime: á´ºáµá´¸á´¸ +queue_length: 0 +queue_cost: 0 +budget: -60524 +is_satisfied: á´ºáµá´¸á´¸ +inflight_requests: á´ºáµá´¸á´¸ +inflight_cost: á´ºáµá´¸á´¸ +max_requests: á´ºáµá´¸á´¸ +max_cost: á´ºáµá´¸á´¸ +max_speed: á´ºáµá´¸á´¸ +max_burst: á´ºáµá´¸á´¸ +throttling_us: á´ºáµá´¸á´¸ +tokens: á´ºáµá´¸á´¸ +``` + +カラム: + +- `resource` (`String`) - リソースå +- `path` (`String`) - ã“ã®ãƒªã‚½ãƒ¼ã‚¹ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°éšŽå±¤å†…ã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°ãƒŽãƒ¼ãƒ‰ã¸ã®ãƒ‘ス +- `type` (`String`) - スケジューリングノードã®ã‚¿ã‚¤ãƒ—。 +- `weight` (`Float64`) - `fair`タイプã®è¦ªãƒŽãƒ¼ãƒ‰ã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒŽãƒ¼ãƒ‰ã®é‡ã¿ã€‚ +- `priority` (`Int64`) - 'priority'タイプã®è¦ªãƒŽãƒ¼ãƒ‰ã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒŽãƒ¼ãƒ‰ã®å„ªå…ˆåº¦ï¼ˆå€¤ãŒä½Žã„ã»ã©å„ªå…ˆåº¦ãŒé«˜ã„)。 +- `is_active` (`UInt8`) - ã“ã®ãƒŽãƒ¼ãƒ‰ãŒç¾åœ¨ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã‚ã‚‹ã‹ã©ã†ã‹ï¼ˆãƒªã‚½ãƒ¼ã‚¹è¦æ±‚をデキューã—ã¦åˆ¶ç´„を満ãŸã™ã“ã¨ãŒå¯èƒ½ã‹ï¼‰ã€‚ +- `active_children` (`UInt64`) - アクティブ状態ã®å­ãƒŽãƒ¼ãƒ‰ã®æ•°ã€‚ +- `dequeued_requests` (`UInt64`) - ã“ã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰ãƒ‡ã‚­ãƒ¥ãƒ¼ã•ã‚ŒãŸãƒªã‚½ãƒ¼ã‚¹è¦æ±‚ã®ç·æ•°ã€‚ +- `canceled_requests` (`UInt64`) - ã“ã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚ŒãŸãƒªã‚½ãƒ¼ã‚¹è¦æ±‚ã®ç·æ•°ã€‚ +- `dequeued_cost` (`UInt64`) - ã“ã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰ãƒ‡ã‚­ãƒ¥ãƒ¼ã•ã‚ŒãŸã™ã¹ã¦ã®è¦æ±‚ã®ã‚³ã‚¹ãƒˆï¼ˆä¾‹: ãƒã‚¤ãƒˆå˜ä½ã‚µã‚¤ã‚ºï¼‰ã®åˆè¨ˆã€‚ +- `canceled_cost` (`UInt64`) - ã“ã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚ŒãŸã™ã¹ã¦ã®è¦æ±‚ã®ã‚³ã‚¹ãƒˆï¼ˆä¾‹: ãƒã‚¤ãƒˆå˜ä½ã‚µã‚¤ã‚ºï¼‰ã®åˆè¨ˆã€‚ +- `busy_periods` (`UInt64`) - ã“ã®ãƒŽãƒ¼ãƒ‰ã®éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–化ã®ç·æ•°ã€‚ +- `vruntime` (`Nullable(Float64)`) - `fair`ノードã®å­ãƒŽãƒ¼ãƒ‰ã®ã¿ã€‚最大最å°å…¬å¹³æ–¹å¼ã§æ¬¡ã®å­ãƒŽãƒ¼ãƒ‰ã‚’処ç†ã™ã‚‹ãŸã‚ã«SFQアルゴリズムã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã‚‹ãƒŽãƒ¼ãƒ‰ã®ä»®æƒ³ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã€‚ +- `system_vruntime` (`Nullable(Float64)`) - `fair`ノードã®ã¿ã€‚最後ã«å‡¦ç†ã•ã‚ŒãŸãƒªã‚½ãƒ¼ã‚¹è¦æ±‚ã®`vruntime`を表示ã™ã‚‹ä»®æƒ³ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã€‚å­ãƒŽãƒ¼ãƒ‰ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化時ã«`vruntime`ã®æ–°ã—ã„値ã¨ã—ã¦ä½¿ç”¨ã€‚ +- `queue_length` (`Nullable(UInt64)`) - `fifo`ノードã®ã¿ã€‚キュー内ã«ã‚るリソースè¦æ±‚ã®ç¾åœ¨ã®æ•°ã€‚ +- `queue_cost` (`Nullable(UInt64)`) - `fifo`ノードã®ã¿ã€‚キュー内ã«ã‚ã‚‹ã™ã¹ã¦ã®è¦æ±‚ã®ã‚³ã‚¹ãƒˆï¼ˆä¾‹: ãƒã‚¤ãƒˆå˜ä½ã‚µã‚¤ã‚ºï¼‰ã®åˆè¨ˆã€‚ +- `budget` (`Nullable(Int64)`) - `fifo`ノードã®ã¿ã€‚æ–°ã—ã„リソースè¦æ±‚ã®ãŸã‚ã®åˆ©ç”¨å¯èƒ½ãªã€Œã‚³ã‚¹ãƒˆå˜ä½ã€ã®æ•°ã€‚リソースè¦æ±‚ã®äºˆæƒ³ã¨å®Ÿéš›ã®ã‚³ã‚¹ãƒˆã®ä¸ä¸€è‡´ã®å ´åˆã«ç¾ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ï¼ˆä¾‹: 読ã¿å–ã‚Š/書ãè¾¼ã¿ã‚¨ãƒ©ãƒ¼ã®å¾Œï¼‰ã€‚ +- `is_satisfied` (`Nullable(UInt8)`) - 制約ノードã®ã¿ï¼ˆä¾‹: `inflight_limit`)。ã“ã®ãƒŽãƒ¼ãƒ‰ã®ã™ã¹ã¦ã®åˆ¶ç´„ãŒæº€ãŸã•ã‚Œã¦ã„ã‚‹å ´åˆã«`1`。 +- `inflight_requests` (`Nullable(Int64)`) - `inflight_limit`ノードã®ã¿ã€‚ã“ã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰ãƒ‡ã‚­ãƒ¥ãƒ¼ã•ã‚Œã€ç¾åœ¨æ¶ˆè²»çŠ¶æ…‹ã«ã‚るリソースè¦æ±‚ã®æ•°ã€‚ +- `inflight_cost` (`Nullable(Int64)`) - `inflight_limit`ノードã®ã¿ã€‚ã“ã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰ãƒ‡ã‚­ãƒ¥ãƒ¼ã•ã‚Œã€ç¾åœ¨æ¶ˆè²»çŠ¶æ…‹ã«ã‚ã‚‹ã™ã¹ã¦ã®ãƒªã‚½ãƒ¼ã‚¹è¦æ±‚ã®ã‚³ã‚¹ãƒˆï¼ˆä¾‹: ãƒã‚¤ãƒˆå˜ä½ï¼‰ã®åˆè¨ˆã€‚ +- `max_requests` (`Nullable(Int64)`) - `inflight_limit`ノードã®ã¿ã€‚制約é•åã«ã¤ãªãŒã‚‹`inflight_requests`ã®ä¸Šé™ã€‚ +- `max_cost` (`Nullable(Int64)`) - `inflight_limit`ノードã®ã¿ã€‚制約é•åã«ã¤ãªãŒã‚‹`inflight_cost`ã®ä¸Šé™ã€‚ +- `max_speed` (`Nullable(Float64)`) - `bandwidth_limit`ノードã®ã¿ã€‚1秒ã‚ãŸã‚Šã®ãƒˆãƒ¼ã‚¯ãƒ³ã§ã®å¸¯åŸŸå¹…ã®ä¸Šé™ã€‚ +- `max_burst` (`Nullable(Float64)`) - `bandwidth_limit`ノードã®ã¿ã€‚トークンãƒã‚±ãƒƒãƒˆã‚¹ãƒ­ãƒƒãƒˆãƒªãƒ³ã‚°ã§åˆ©ç”¨å¯èƒ½ãª`tokens`ã®ä¸Šé™ã€‚ +- `throttling_us` (`Nullable(Int64)`) - `bandwidth_limit`ノードã®ã¿ã€‚ã“ã®ãƒŽãƒ¼ãƒ‰ãŒã‚¹ãƒ­ãƒƒãƒˆãƒªãƒ³ã‚°çŠ¶æ…‹ã«ã‚ã£ãŸåˆè¨ˆãƒžã‚¤ã‚¯ãƒ­ç§’数。 +- `tokens` (`Nullable(Float64)`) - `bandwidth_limit`ノードã®ã¿ã€‚トークンãƒã‚±ãƒƒãƒˆã‚¹ãƒ­ãƒƒãƒˆãƒªãƒ³ã‚°ã§ç¾åœ¨åˆ©ç”¨å¯èƒ½ãªãƒˆãƒ¼ã‚¯ãƒ³ã®æ•°ã€‚ diff --git a/docs/ja/operations/system-tables/schema_inference_cache.md b/docs/ja/operations/system-tables/schema_inference_cache.md new file mode 100644 index 00000000000..68cb26c88fd --- /dev/null +++ b/docs/ja/operations/system-tables/schema_inference_cache.md @@ -0,0 +1,67 @@ +--- +slug: /ja/operations/system-tables/schema_inference_cache +--- +# schema_inference_cache + +ã™ã¹ã¦ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚¹ã‚­ãƒ¼ãƒžã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +カラム: +- `storage` ([String](/docs/ja/sql-reference/data-types/string.md)) — ストレージå: Fileã€URLã€S3 ã¾ãŸã¯ HDFS。 +- `source` ([String](/docs/ja/sql-reference/data-types/string.md)) — ファイルソース。 +- `format` ([String](/docs/ja/sql-reference/data-types/string.md)) — フォーマットå。 +- `additional_format_info` ([String](/docs/ja/sql-reference/data-types/string.md)) - スキーマを識別ã™ã‚‹ãŸã‚ã«å¿…è¦ãªè¿½åŠ æƒ…報。例ãˆã°ã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆå›ºæœ‰ã®è¨­å®šã€‚ +- `registration_time` ([DateTime](/docs/ja/sql-reference/data-types/datetime.md)) — スキーマãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«è¿½åŠ ã•ã‚ŒãŸã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。 +- `schema` ([String](/docs/ja/sql-reference/data-types/string.md)) - キャッシュã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã€‚ + +**例** + +例ãˆã°ã€ã“ã®ã‚ˆã†ãªå†…容ã®ãƒ•ã‚¡ã‚¤ãƒ« `data.jsonl` ãŒã‚ã‚‹ã¨ã—ã¾ã—ょã†: +```json +{"id" : 1, "age" : 25, "name" : "Josh", "hobbies" : ["football", "cooking", "music"]} +{"id" : 2, "age" : 19, "name" : "Alan", "hobbies" : ["tennis", "art"]} +{"id" : 3, "age" : 32, "name" : "Lana", "hobbies" : ["fitness", "reading", "shopping"]} +{"id" : 4, "age" : 47, "name" : "Brayan", "hobbies" : ["movies", "skydiving"]} +``` + +:::tip +`data.jsonl` ã‚’ `user_files_path` ディレクトリã«é…ç½®ã—ã¾ã™ã€‚ClickHouse ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’確èªã™ã‚‹ã¨ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: +``` +/var/lib/clickhouse/user_files/ +``` +::: + +`clickhouse-client` ã‚’é–‹ãã€`DESCRIBE` クエリを実行ã—ã¾ã™: + +```sql +DESCRIBE file('data.jsonl') SETTINGS input_format_try_infer_integers=0; +``` + +```response +┌─name────┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ id │ Nullable(Float64) │ │ │ │ │ │ +│ age │ Nullable(Float64) │ │ │ │ │ │ +│ name │ Nullable(String) │ │ │ │ │ │ +│ hobbies │ Array(Nullable(String)) │ │ │ │ │ │ +└─────────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +`system.schema_inference_cache` テーブルã®å†…容を見ã¦ã¿ã¾ã—ょã†: + +```sql +SELECT * +FROM system.schema_inference_cache +FORMAT Vertical +``` +```response +Row 1: +────── +storage: File +source: /home/droscigno/user_files/data.jsonl +format: JSONEachRow +additional_format_info: schema_inference_hints=, max_rows_to_read_for_schema_inference=25000, schema_inference_make_columns_nullable=true, try_infer_integers=false, try_infer_dates=true, try_infer_datetimes=true, try_infer_numbers_from_strings=true, read_bools_as_numbers=true, try_infer_objects=false +registration_time: 2022-12-29 17:49:52 +schema: id Nullable(Float64), age Nullable(Float64), name Nullable(String), hobbies Array(Nullable(String)) +``` + +**関連項目** +- [入力データã‹ã‚‰ã®è‡ªå‹•ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–](/docs/ja/interfaces/schema-inference.md) diff --git a/docs/ja/operations/system-tables/server_settings.md b/docs/ja/operations/system-tables/server_settings.md new file mode 100644 index 00000000000..4ec7ca9bded --- /dev/null +++ b/docs/ja/operations/system-tables/server_settings.md @@ -0,0 +1,64 @@ +--- +slug: /ja/operations/system-tables/server_settings +--- +# server_settings + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€`config.xml`ã§æŒ‡å®šã•ã‚ŒãŸã‚µãƒ¼ãƒãƒ¼ã®ã‚°ãƒ­ãƒ¼ãƒãƒ«è¨­å®šã«é–¢ã™ã‚‹æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ç¾åœ¨ã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯`config.xml`ã®ç¬¬ä¸€éšŽå±¤ã®è¨­å®šã®ã¿ã‚’表示ã—ã¦ãŠã‚Šã€ãƒã‚¹ãƒˆã•ã‚ŒãŸè¨­å®šï¼ˆä¾‹: [logger](../../operations/server-configuration-parameters/settings.md#logger))ã«ã¯å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“。 + +カラム: + +- `name` ([String](../../sql-reference/data-types/string.md)) — サーãƒãƒ¼è¨­å®šã®åå‰ã€‚ +- `value` ([String](../../sql-reference/data-types/string.md)) — サーãƒãƒ¼è¨­å®šã®å€¤ã€‚ +- `default` ([String](../../sql-reference/data-types/string.md)) — サーãƒãƒ¼è¨­å®šã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚ +- `changed` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 設定ãŒ`config.xml`ã§æŒ‡å®šã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚ +- `description` ([String](../../sql-reference/data-types/string.md)) — サーãƒãƒ¼è¨­å®šã®çŸ­ã„説明。 +- `type` ([String](../../sql-reference/data-types/string.md)) — サーãƒãƒ¼è¨­å®šã®å€¤ã®ã‚¿ã‚¤ãƒ—。 +- `changeable_without_restart` ([Enum8](../../sql-reference/data-types/enum.md)) — サーãƒãƒ¼ã®å®Ÿè¡Œä¸­ã«è¨­å®šã‚’変更ã§ãã‚‹ã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚値: + - `'No' ` + - `'IncreaseOnly'` + - `'DecreaseOnly'` + - `'Yes'` +- `is_obsolete` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) - 設定ãŒå»ƒæ­¢ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚ + +**例** + +以下ã®ä¾‹ã¯ã€`thread_pool`ã‚’åå‰ã«å«ã‚€ã‚µãƒ¼ãƒãƒ¼è¨­å®šã«é–¢ã™ã‚‹æƒ…報をå–å¾—ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +``` sql +SELECT * +FROM system.server_settings +WHERE name LIKE '%thread_pool%' +``` + +``` text +┌─name──────────────────────────────────────────┬─value─┬─default─┬─changed─┬─description─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─type───┬─changeable_without_restart─┬─is_obsolete─┠+│ max_thread_pool_size │ 10000 │ 10000 │ 0 │ クエリ実行ã¨ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作ã®ãŸã‚ã«OSã‹ã‚‰å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®æœ€å¤§æ•°ã€‚ │ UInt64 │ No │ 0 │ +│ max_thread_pool_free_size │ 1000 │ 1000 │ 0 │ 一度割り当ã¦ã‚‰ã‚Œã‚‹ã¨ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã«å¸¸ã«æ®‹ã‚Šã€ã‚¿ã‚¹ã‚¯ã®ä¸è¶³æ™‚ã«ã‚¢ã‚¤ãƒ‰ãƒ«çŠ¶æ…‹ã§ã„るスレッドã®æœ€å¤§æ•°ã€‚ │ UInt64 │ No │ 0 │ +│ thread_pool_queue_size │ 10000 │ 10000 │ 0 │ 実行待ã¡ã®ã‚¿ã‚¹ã‚¯ã‚’キューã«ç½®ãã“ã¨ãŒã§ãる最大数。 │ UInt64 │ No │ 0 │ +│ max_io_thread_pool_size │ 100 │ 100 │ 0 │ IOæ“作ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®æœ€å¤§æ•°ã€‚ │ UInt64 │ No │ 0 │ +│ max_io_thread_pool_free_size │ 0 │ 0 │ 0 │ IOスレッドプールã®æœ€å¤§ãƒ•ãƒªãƒ¼ã‚µã‚¤ã‚ºã€‚ │ UInt64 │ No │ 0 │ +│ io_thread_pool_queue_size │ 10000 │ 10000 │ 0 │ IOスレッドプールã®ã‚­ãƒ¥ãƒ¼ã‚µã‚¤ã‚ºã€‚ │ UInt64 │ No │ 0 │ +│ max_active_parts_loading_thread_pool_size │ 64 │ 64 │ 0 │ 起動時ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを読ã¿è¾¼ã‚€ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ │ UInt64 │ No │ 0 │ +│ max_outdated_parts_loading_thread_pool_size │ 32 │ 32 │ 0 │ 起動時ã«éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを読ã¿è¾¼ã‚€ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ │ UInt64 │ No │ 0 │ +│ max_unexpected_parts_loading_thread_pool_size │ 32 │ 32 │ 0 │ 起動時ã«äºˆæœŸã—ãªã„データパーツを読ã¿è¾¼ã‚€ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã€‚ │ UInt64 │ No │ 0 │ +│ max_parts_cleaning_thread_pool_size │ 128 │ 128 │ 0 │ éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ‡ãƒ¼ã‚¿ãƒ‘ーツをåŒæ™‚ã«å‰Šé™¤ã™ã‚‹ãŸã‚ã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ │ UInt64 │ No │ 0 │ +│ max_backups_io_thread_pool_size │ 1000 │ 1000 │ 0 │ BACKUPクエリã®IOæ“作ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã®æœ€å¤§æ•°ã€‚ │ UInt64 │ No │ 0 │ +│ max_backups_io_thread_pool_free_size │ 0 │ 0 │ 0 │ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—IOスレッドプールã®æœ€å¤§ãƒ•ãƒªãƒ¼ã‚µã‚¤ã‚ºã€‚ │ UInt64 │ No │ 0 │ +│ backups_io_thread_pool_queue_size │ 0 │ 0 │ 0 │ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—IOスレッドプールã®ã‚­ãƒ¥ãƒ¼ã‚µã‚¤ã‚ºã€‚ │ UInt64 │ No │ 0 │ +└───────────────────────────────────────────────┴───────┴─────────┴─────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴────────────────────────────┴─────────────┘ + +``` + +`WHERE changed`を使用ã™ã‚‹ã“ã¨ã¯ã€ãŸã¨ãˆã°ã€æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«å†…ã®è¨­å®šãŒæ­£ã—ã読ã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ã‹ã€ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ã‹ã‚’確èªã—ãŸã„å ´åˆã«æœ‰ç”¨ã§ã™ã€‚ + + + +``` sql +SELECT * FROM system.server_settings WHERE changed AND name='max_thread_pool_size' +``` + +**関連項目** + +- [設定](../../operations/system-tables/settings.md) +- [構æˆãƒ•ã‚¡ã‚¤ãƒ«](../../operations/configuration-files.md) +- [サーãƒãƒ¼è¨­å®š](../../operations/server-configuration-parameters/settings.md) diff --git a/docs/ja/operations/system-tables/session_log.md b/docs/ja/operations/system-tables/session_log.md new file mode 100644 index 00000000000..1a974399e90 --- /dev/null +++ b/docs/ja/operations/system-tables/session_log.md @@ -0,0 +1,83 @@ +--- +slug: /ja/operations/system-tables/session_log +--- +# session_log + +ã™ã¹ã¦ã®æˆåŠŸãŠã‚ˆã³å¤±æ•—ã—ãŸãƒ­ã‚°ã‚¤ãƒ³ã¨ãƒ­ã‚°ã‚¢ã‚¦ãƒˆã‚¤ãƒ™ãƒ³ãƒˆã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `type` ([Enum8](../../sql-reference/data-types/enum.md)) — ログイン/ログアウトçµæžœã€‚å¯èƒ½ãªå€¤: + - `LoginFailure` — ログインエラー。 + - `LoginSuccess` — æˆåŠŸã—ãŸãƒ­ã‚°ã‚¤ãƒ³ã€‚ + - `Logout` — システムã‹ã‚‰ã®ãƒ­ã‚°ã‚¢ã‚¦ãƒˆã€‚ +- `auth_id` ([UUID](../../sql-reference/data-types/uuid.md)) — èªè¨¼ID。ユーザーãŒãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ãŸã³ã«è‡ªå‹•ç”Ÿæˆã•ã‚Œã‚‹UUID。 +- `session_id` ([String](../../sql-reference/data-types/string.md)) — クライアントãŒ[HTTP](../../interfaces/http.md)インターフェースを介ã—ã¦æ¸¡ã™ã‚»ãƒƒã‚·ãƒ§ãƒ³ID。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — ログイン/ログアウトã®æ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — ログイン/ログアウトã®æ™‚間。 +- `event_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒精度ã§ã®ãƒ­ã‚°ã‚¤ãƒ³/ログアウト開始時間。 +- `user` ([String](../../sql-reference/data-types/string.md)) — ユーザーå。 +- `auth_type` ([Enum8](../../sql-reference/data-types/enum.md)) — èªè¨¼ã®ç¨®é¡žã€‚å¯èƒ½ãªå€¤: + - `NO_PASSWORD` + - `PLAINTEXT_PASSWORD` + - `SHA256_PASSWORD` + - `DOUBLE_SHA1_PASSWORD` + - `LDAP` + - `KERBEROS` + - `SSL_CERTIFICATE` +- `profiles` ([Array](../../sql-reference/data-types/array.md)([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md))) — ã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ãŠã‚ˆã³/ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¨­å®šã•ã‚ŒãŸãƒ—ロファイルã®ãƒªã‚¹ãƒˆã€‚ +- `roles` ([Array](../../sql-reference/data-types/array.md)([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md))) — プロファイルãŒé©ç”¨ã•ã‚Œã‚‹ãƒ­ãƒ¼ãƒ«ã®ãƒªã‚¹ãƒˆã€‚ +- `settings` ([Array](../../sql-reference/data-types/array.md)([Tuple](../../sql-reference/data-types/tuple.md)([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md), [String](../../sql-reference/data-types/string.md)))) — クライアントãŒãƒ­ã‚°ã‚¤ãƒ³/ログアウトã—ãŸã¨ãã«å¤‰æ›´ã•ã‚ŒãŸè¨­å®šã€‚ +- `client_address` ([IPv6](../../sql-reference/data-types/ipv6.md)) — ログイン/ログアウト時ã«ä½¿ç”¨ã•ã‚ŒãŸIPアドレス。 +- `client_port` ([UInt16](../../sql-reference/data-types/int-uint.md)) — ログイン/ログアウト時ã«ä½¿ç”¨ã•ã‚ŒãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒãƒ¼ãƒˆã€‚ +- `interface` ([Enum8](../../sql-reference/data-types/enum.md)) — ログインãŒé–‹å§‹ã•ã‚ŒãŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã€‚å¯èƒ½ãªå€¤: + - `TCP` + - `HTTP` + - `gRPC` + - `MySQL` + - `PostgreSQL` +- `client_hostname` ([String](../../sql-reference/data-types/string.md)) — [clickhouse-client](../../interfaces/cli.md) ã¾ãŸã¯ä»–ã®TCPクライアントãŒå®Ÿè¡Œã•ã‚Œã¦ã„るクライアントマシンã®ãƒ›ã‚¹ãƒˆå。 +- `client_name` ([String](../../sql-reference/data-types/string.md)) — `clickhouse-client` ã¾ãŸã¯ä»–ã®TCPクライアントå。 +- `client_revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — `clickhouse-client` ã¾ãŸã¯ä»–ã®TCPクライアントã®ãƒªãƒ“ジョン。 +- `client_version_major` ([UInt32](../../sql-reference/data-types/int-uint.md)) — `clickhouse-client` ã¾ãŸã¯ä»–ã®TCPクライアントã®ãƒ¡ã‚¸ãƒ£ãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +- `client_version_minor` ([UInt32](../../sql-reference/data-types/int-uint.md)) — `clickhouse-client` ã¾ãŸã¯ä»–ã®TCPクライアントã®ãƒžã‚¤ãƒŠãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +- `client_version_patch` ([UInt32](../../sql-reference/data-types/int-uint.md)) — `clickhouse-client` ã¾ãŸã¯ä»–ã®TCPクライアントãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ‘ッãƒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã€‚ +- `failure_reason` ([String](../../sql-reference/data-types/string.md)) — ログイン/ログアウト失敗ã®ç†ç”±ã‚’å«ã‚€ä¾‹å¤–メッセージ。 + +**例** + +クエリ: + +``` sql +SELECT * FROM system.session_log LIMIT 1 FORMAT Vertical; +``` + +çµæžœ: + +``` text +Row 1: +────── +hostname: clickhouse.eu-central1.internal +type: LoginSuccess +auth_id: 45e6bd83-b4aa-4a23-85e6-bd83b4aa1a23 +session_id: +event_date: 2021-10-14 +event_time: 2021-10-14 20:33:52 +event_time_microseconds: 2021-10-14 20:33:52.104247 +user: default +auth_type: PLAINTEXT_PASSWORD +profiles: ['default'] +roles: [] +settings: [('load_balancing','random'),('max_memory_usage','10000000000')] +client_address: ::ffff:127.0.0.1 +client_port: 38490 +interface: TCP +client_hostname: +client_name: ClickHouse client +client_revision: 54449 +client_version_major: 21 +client_version_minor: 10 +client_version_patch: 0 +failure_reason: +``` diff --git a/docs/ja/operations/system-tables/settings.md b/docs/ja/operations/system-tables/settings.md new file mode 100644 index 00000000000..18d19642a7e --- /dev/null +++ b/docs/ja/operations/system-tables/settings.md @@ -0,0 +1,144 @@ +--- +slug: /ja/operations/system-tables/settings +--- +# settings + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³è¨­å®šã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +カラム: + +- `name` ([String](../../sql-reference/data-types/string.md)) — 設定å。 +- `value` ([String](../../sql-reference/data-types/string.md)) — 設定値。 +- `changed` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — 設定ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‹ã‚‰å¤‰æ›´ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚ +- `description` ([String](../../sql-reference/data-types/string.md)) — 設定ã®ç°¡å˜ãªèª¬æ˜Žã€‚ +- `min` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — [制約](../../operations/settings/constraints-on-settings.md#constraints-on-settings)を通ã˜ã¦è¨­å®šã•ã‚ŒãŸæœ€å°å€¤ãŒã‚ã‚Œã°ãã®å€¤ã€‚最å°å€¤ãŒãªã„å ´åˆã¯[NULL](../../sql-reference/syntax.md#null-literal)ãŒå«ã¾ã‚Œã¾ã™ã€‚ +- `max` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — [制約](../../operations/settings/constraints-on-settings.md#constraints-on-settings)を通ã˜ã¦è¨­å®šã•ã‚ŒãŸæœ€å¤§å€¤ãŒã‚ã‚Œã°ãã®å€¤ã€‚最大値ãŒãªã„å ´åˆã¯[NULL](../../sql-reference/syntax.md#null-literal)ãŒå«ã¾ã‚Œã¾ã™ã€‚ +- `readonly` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¨­å®šã‚’変更ã§ãã‚‹ã‹ã©ã†ã‹ã‚’示ã—ã¾ã™: + - `0` — ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è¨­å®šã‚’変更ã§ãã¾ã™ã€‚ + - `1` — ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è¨­å®šã‚’変更ã§ãã¾ã›ã‚“。 +- `default` ([String](../../sql-reference/data-types/string.md)) — 設定ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚ +- `is_obsolete` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) - 設定ãŒå»ƒæ­¢ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚ +- `tier` ([Enum8](../../sql-reference/data-types/enum.md)) — ã“ã®æ©Ÿèƒ½ã®ã‚µãƒãƒ¼ãƒˆãƒ¬ãƒ™ãƒ«ã€‚ClickHouseã®æ©Ÿèƒ½ã¯éšŽå±¤ã«çµ„織化ã•ã‚Œã¦ãŠã‚Šã€é–‹ç™ºã®ç¾åœ¨ã®çŠ¶æ³ã¨ä½¿ç”¨æ™‚ã®æœŸå¾…ã«å¿œã˜ã¦å¤‰åŒ–ã—ã¾ã™ã€‚値: + - `'Production'` — 機能ã¯å®‰å®šã—ã¦ãŠã‚Šã€å®‰å…¨ã«ä½¿ç”¨ã§ãã€ä»–ã®**本番用**機能ã¨å•é¡Œãªã相互作用ã—ã¾ã™ã€‚ + - `'Beta'` — 機能ã¯å®‰å®šã—ã¦ãŠã‚Šå®‰å…¨ã§ã™ã€‚ä»–ã®æ©Ÿèƒ½ã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹éš›ã®çµæžœã¯æœªçŸ¥ã§ã‚ã‚Šã€æ­£ç¢ºæ€§ã¯ä¿è¨¼ã•ã‚Œã¾ã›ã‚“。テストや報告ãŒæ­“è¿Žã•ã‚Œã¾ã™ã€‚ + - `'Experimental'` — 機能ã¯é–‹ç™ºä¸­ã§ã™ã€‚開発者やClickHouseã®æ„›å¥½è€…ã®ã¿ãŒå¯¾è±¡ã§ã™ã€‚機能ãŒå‹•ä½œã™ã‚‹ã‹ã©ã†ã‹ã¯ä¸æ˜Žã§ã‚ã‚Šã€ã„ã¤ã§ã‚‚削除ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + - `'Obsolete'` — ã‚‚ã¯ã‚„サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。ã™ã§ã«å‰Šé™¤ã•ã‚Œã¦ã„ã‚‹ã‹ã€å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§å‰Šé™¤ã•ã‚Œã‚‹äºˆå®šã§ã™ã€‚ + +**例** + +次ã®ä¾‹ã¯ã€åå‰ã«`min_i`ã‚’å«ã‚€è¨­å®šã«é–¢ã™ã‚‹æƒ…報をå–å¾—ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +``` sql +SELECT * +FROM system.settings +WHERE name LIKE '%min_insert_block_size_%' +FORMAT Vertical +``` + +``` text +Row 1: +────── +name: min_insert_block_size_rows +value: 1048449 +changed: 0 +description: テーブルã«`INSERT`クエリã«ã‚ˆã£ã¦æŒ¿å…¥ã§ãるブロック内ã®æœ€å°è¡Œæ•°ã‚’設定ã—ã¾ã™ã€‚å°ã•ãªã‚µã‚¤ã‚ºã®ãƒ–ロックã¯å¤§ããªã‚‚ã®ã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 圧縮無効。 +min: á´ºáµá´¸á´¸ +max: á´ºáµá´¸á´¸ +readonly: 0 +type: UInt64 +default: 1048449 +alias_for: +is_obsolete: 0 +tier: Production + +Row 2: +────── +name: min_insert_block_size_bytes +value: 268402944 +changed: 0 +description: テーブルã«`INSERT`クエリã«ã‚ˆã£ã¦æŒ¿å…¥ã§ãるブロック内ã®æœ€å°ãƒã‚¤ãƒˆæ•°ã‚’設定ã—ã¾ã™ã€‚å°ã•ãªã‚µã‚¤ã‚ºã®ãƒ–ロックã¯å¤§ããªã‚‚ã®ã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- æ­£ã®æ•´æ•°ã€‚ +- 0 — 圧縮無効。 +min: á´ºáµá´¸á´¸ +max: á´ºáµá´¸á´¸ +readonly: 0 +type: UInt64 +default: 268402944 +alias_for: +is_obsolete: 0 +tier: Production + +Row 3: +────── +name: min_insert_block_size_rows_for_materialized_views +value: 0 +changed: 0 +description: テーブルã«`INSERT`クエリã«ã‚ˆã£ã¦æŒ¿å…¥ã§ãるブロック内ã®æœ€å°è¡Œæ•°ã‚’設定ã—ã¾ã™ã€‚å°ã•ãªã‚µã‚¤ã‚ºã®ãƒ–ロックã¯å¤§ããªã‚‚ã®ã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã¯[materialized view](../../sql-reference/statements/create/view.md)ã«æŒ¿å…¥ã•ã‚Œã‚‹ãƒ–ロックã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã‚’調整ã™ã‚‹ã“ã¨ã§ã€materialized viewã¸ã®ãƒ—ッシュ中ã®ãƒ–ロック圧縮を制御ã—ã€éŽå‰°ãªãƒ¡ãƒ¢ãƒªä½¿ç”¨ã‚’é¿ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0 — 圧縮無効。 + +**関連項目** + +- [min_insert_block_size_rows](#min-insert-block-size-rows) +min: á´ºáµá´¸á´¸ +max: á´ºáµá´¸á´¸ +readonly: 0 +type: UInt64 +default: 0 +alias_for: +is_obsolete: 0 +tier: Production + +Row 4: +────── +name: min_insert_block_size_bytes_for_materialized_views +value: 0 +changed: 0 +description: テーブルã«`INSERT`クエリã«ã‚ˆã£ã¦æŒ¿å…¥ã§ãるブロック内ã®æœ€å°ãƒã‚¤ãƒˆæ•°ã‚’設定ã—ã¾ã™ã€‚å°ã•ãªã‚µã‚¤ã‚ºã®ãƒ–ロックã¯å¤§ããªã‚‚ã®ã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã¯[materialized view](../../sql-reference/statements/create/view.md)ã«æŒ¿å…¥ã•ã‚Œã‚‹ãƒ–ロックã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®è¨­å®šã‚’調整ã™ã‚‹ã“ã¨ã§ã€materialized viewã¸ã®ãƒ—ッシュ中ã®ãƒ–ロック圧縮を制御ã—ã€éŽå‰°ãªãƒ¡ãƒ¢ãƒªä½¿ç”¨ã‚’é¿ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +å¯èƒ½ãªå€¤: + +- ä»»æ„ã®æ­£ã®æ•´æ•°ã€‚ +- 0 — 圧縮無効。 + +**関連項目** + +- [min_insert_block_size_bytes](#min-insert-block-size-bytes) +min: á´ºáµá´¸á´¸ +max: á´ºáµá´¸á´¸ +readonly: 0 +type: UInt64 +default: 0 +alias_for: +is_obsolete: 0 +tier: Production + ``` + +`WHERE changed`ã®ä½¿ç”¨ã¯ã€ä¾‹ãˆã°ä»¥ä¸‹ã®å†…容を確èªã—ãŸã„ã¨ãã«æœ‰åŠ¹ã§ã™ã€‚ + +- 設定ファイル内ã®è¨­å®šãŒæ­£ã—ã読ã¿è¾¼ã¾ã‚Œã¦ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã€‚ +- ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§å¤‰æ›´ã•ã‚ŒãŸè¨­å®šã€‚ + + + +``` sql +SELECT * FROM system.settings WHERE changed AND name='load_balancing' +``` + +**関連項目** + +- [Settings](../../operations/settings/index.md#session-settings-intro) +- [クエリã®æ¨©é™](../../operations/settings/permissions-for-queries.md#settings_readonly) +- [設定ã«å¯¾ã™ã‚‹åˆ¶ç´„](../../operations/settings/constraints-on-settings.md) +- [SHOW SETTINGS](../../sql-reference/statements/show.md#show-settings) ステートメント diff --git a/docs/ja/operations/system-tables/settings_changes.md b/docs/ja/operations/system-tables/settings_changes.md new file mode 100644 index 00000000000..b390286f2e2 --- /dev/null +++ b/docs/ja/operations/system-tables/settings_changes.md @@ -0,0 +1,32 @@ +--- +slug: /ja/operations/system-tables/settings_changes +--- +# settings_changes + +以å‰ã®ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã®è¨­å®šã®å¤‰æ›´ã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `version` ([String](../../sql-reference/data-types/string.md)) — 設定ãŒå¤‰æ›´ã•ã‚ŒãŸClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³ +- `changes` ([Array](../../sql-reference/data-types/array.md) of [Tuple](../../sql-reference/data-types/tuple.md)) — 設定変更ã®èª¬æ˜Ž: (設定åã€ä»¥å‰ã®å€¤ã€æ–°ã—ã„値ã€å¤‰æ›´ç†ç”±) + +**例** + +``` sql +SELECT * +FROM system.settings_changes +WHERE version = '23.5' +FORMAT Vertical +``` + +``` text +è¡Œ 1: +────── +version: 23.5 +changes: [('input_format_parquet_preserve_order','1','0','ParquetリーダーãŒã‚ˆã‚Šè‰¯ã„並列性ã®ãŸã‚ã«è¡Œã‚’並ã¹æ›¿ãˆã‚‹ã“ã¨ã‚’許å¯ã™ã‚‹ã€‚'),('parallelize_output_from_storages','0','1','ファイル/url/s3/etcã‹ã‚‰èª­ã¿å–るクエリã®å®Ÿè¡Œæ™‚ã«ä¸¦åˆ—性を許å¯ã™ã‚‹ã€‚ã“ã‚Œã«ã‚ˆã‚Šè¡Œã‚’並ã¹æ›¿ãˆã‚‹å¯èƒ½æ€§ãŒã‚る。'),('use_with_fill_by_sorting_prefix','0','1','ORDER BYå¥ã§WITH FILLカラムã®å‰ã«ã‚るカラムã¯ã‚½ãƒ¼ãƒˆãƒ—レフィックスを形æˆã™ã‚‹ã€‚ソートプレフィックスã§ç•°ãªã‚‹å€¤ã‚’æŒã¤è¡Œã¯ç‹¬ç«‹ã—ã¦åŸ‹ã‚られる。'),('output_format_parquet_compliant_nested_types','0','1','出力Parquetファイルスキーマã®å†…部フィールドåを変更ã™ã‚‹ã€‚')] +``` + +**関連項目** + +- [設定](../../operations/settings/index.md#session-settings-intro) +- [system.settings](settings.md) diff --git a/docs/ja/operations/system-tables/settings_profile_elements.md b/docs/ja/operations/system-tables/settings_profile_elements.md new file mode 100644 index 00000000000..54e0eff309c --- /dev/null +++ b/docs/ja/operations/system-tables/settings_profile_elements.md @@ -0,0 +1,31 @@ +--- +slug: /ja/operations/system-tables/settings_profile_elements +--- +# settings_profile_elements + +設定プロファイルã®å†…容を説明ã—ã¾ã™: + +- 制約。 +- 設定ãŒé©ç”¨ã•ã‚Œã‚‹ãƒ­ãƒ¼ãƒ«ãŠã‚ˆã³ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€‚ +- 親設定プロファイル。 + +カラム: +- `profile_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — 設定プロファイルå。 + +- `user_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ユーザーå。 + +- `role_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ロールå。 + +- `index` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 設定プロファイルè¦ç´ ã®é€£ç¶šç•ªå·ã€‚ + +- `setting_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — 設定å。 + +- `value` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — 設定値。 + +- `min` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — 設定ã®æœ€å°å€¤ã€‚設定ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ `NULL`。 + +- `max` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — 設定ã®æœ€å¤§å€¤ã€‚設定ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ NULL。 + +- `writability` ([Nullable](../../sql-reference/data-types/nullable.md)([Enum8](../../sql-reference/data-types/enum.md)('WRITABLE' = 0, 'CONST' = 1, 'CHANGEABLE_IN_READONLY' = 2))) — 設定制約ã®æ›¸ãè¾¼ã¿å¯èƒ½æ€§ã®ç¨®é¡žã‚’設定ã—ã¾ã™ã€‚ + +- `inherit_profile` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — ã“ã®è¨­å®šãƒ—ロファイルã®è¦ªãƒ—ロファイル。設定ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ `NULL`。設定プロファイルã¯è¦ªãƒ—ロファイルã‹ã‚‰ã™ã¹ã¦ã®è¨­å®šå€¤ãŠã‚ˆã³åˆ¶ç´„ (`min`, `max`, `readonly`) を継承ã—ã¾ã™ã€‚ diff --git a/docs/ja/operations/system-tables/settings_profiles.md b/docs/ja/operations/system-tables/settings_profiles.md new file mode 100644 index 00000000000..e537320c8ca --- /dev/null +++ b/docs/ja/operations/system-tables/settings_profiles.md @@ -0,0 +1,25 @@ +--- +slug: /ja/operations/system-tables/settings_profiles +--- +# settings_profiles + +設定プロファイルã®ãƒ—ロパティをå«ã¿ã¾ã™ã€‚ + +カラム: +- `name` ([String](../../sql-reference/data-types/string.md)) — 設定プロファイルå。 + +- `id` ([UUID](../../sql-reference/data-types/uuid.md)) — 設定プロファイルID。 + +- `storage` ([String](../../sql-reference/data-types/string.md)) — 設定プロファイルã®ä¿å­˜å ´æ‰€ã¸ã®ãƒ‘ス。`access_control_path` パラメータã§è¨­å®šã•ã‚Œã¾ã™ã€‚ + +- `num_elements` ([UInt64](../../sql-reference/data-types/int-uint.md)) — `system.settings_profile_elements` テーブル内ã®ã“ã®ãƒ—ロファイルã«å¯¾ã™ã‚‹è¦ç´ ã®æ•°ã€‚ + +- `apply_to_all` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — ã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ãŠã‚ˆã³/ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¨­å®šãƒ—ロファイルãŒé©ç”¨ã•ã‚Œã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ + +- `apply_to_list` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — 設定プロファイルãŒé©ç”¨ã•ã‚Œã‚‹ãƒ­ãƒ¼ãƒ«ãŠã‚ˆã³/ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒªã‚¹ãƒˆã€‚ + +- `apply_to_except` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — ã“ã®ãƒªã‚¹ãƒˆã«è¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã‚’除ãã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ãŠã‚ˆã³/ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¨­å®šãƒ—ロファイルãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ + +## å‚ç…§ {#see-also} + +- [SHOW PROFILES](../../sql-reference/statements/show.md#show-profiles-statement) diff --git a/docs/ja/operations/system-tables/stack_trace.md b/docs/ja/operations/system-tables/stack_trace.md new file mode 100644 index 00000000000..229d30ac542 --- /dev/null +++ b/docs/ja/operations/system-tables/stack_trace.md @@ -0,0 +1,96 @@ +--- +slug: /ja/operations/system-tables/stack_trace +--- +# stack_trace + +ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã‚¹ãƒ¬ãƒƒãƒ‰ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’å«ã¿ã¾ã™ã€‚開発者ãŒã‚µãƒ¼ãƒãƒ¼ã®çŠ¶æ…‹ã‚’調査ã™ã‚‹ã®ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +スタックフレームを解æžã™ã‚‹ã«ã¯ã€`addressToLine`ã€`addressToLineWithInlines`ã€`addressToSymbol` ãã—㦠`demangle` [イントロスペクション関数](../../sql-reference/functions/introspection.md)を使用ã—ã¾ã™ã€‚ + +カラム: + +- `thread_name` ([String](../../sql-reference/data-types/string.md)) — スレッドå。 +- `thread_id` ([UInt64](../../sql-reference/data-types/int-uint.md)) — スレッド識別å­ã€‚ +- `query_id` ([String](../../sql-reference/data-types/string.md)) — [query_log](../system-tables/query_log.md) システムテーブルã‹ã‚‰å®Ÿè¡Œä¸­ã®ã‚¯ã‚¨ãƒªã®è©³ç´°ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãるクエリ識別å­ã€‚ +- `trace` ([Array(UInt64)](../../sql-reference/data-types/array.md)) — メソッドãŒæ ¼ç´ã•ã‚Œã¦ã„る物ç†ã‚¢ãƒ‰ãƒ¬ã‚¹ã®ãƒªã‚¹ãƒˆã‚’表ã™[スタックトレース](https://en.wikipedia.org/wiki/Stack_trace)。 + +:::tip +ã„ãã¤ã‹ã®ä¾¿åˆ©ãªã‚¯ã‚¨ãƒªï¼ˆãŸã¨ãˆã°[ç¾åœ¨å®Ÿè¡Œä¸­ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’確èªã™ã‚‹æ–¹æ³•](https://clickhouse.com/docs/knowledgebase/find-expensive-queries) 㨠[トラブルシューティングã«å½¹ç«‹ã¤ã‚¯ã‚¨ãƒª](https://clickhouse.com/docs/knowledgebase/useful-queries-for-troubleshooting))ã«ã¤ã„ã¦ã¯ã€ãƒŠãƒ¬ãƒƒã‚¸ãƒ™ãƒ¼ã‚¹ã‚’確èªã—ã¦ãã ã•ã„。 +::: + +**例** + +イントロスペクション関数を有効ã«ã™ã‚‹: + +``` sql +SET allow_introspection_functions = 1; +``` + +ClickHouseオブジェクトファイルã‹ã‚‰ã‚·ãƒ³ãƒœãƒ«ã‚’å–å¾—ã™ã‚‹: + +``` sql +WITH arrayMap(x -> demangle(addressToSymbol(x)), trace) AS all SELECT thread_name, thread_id, query_id, arrayStringConcat(all, '\n') AS res FROM system.stack_trace LIMIT 1 \G; +``` + +``` text +Row 1: +────── +thread_name: QueryPipelineEx +thread_id: 743490 +query_id: dc55a564-febb-4e37-95bb-090ef182c6f1 +res: memcpy +large_ralloc +arena_ralloc +do_rallocx +Allocator::realloc(void*, unsigned long, unsigned long, unsigned long) +HashTable, HashTableNoState, PairNoInit>, HashCRC32, HashTableGrowerWithPrecalculation<8ul>, Allocator>::resize(unsigned long, unsigned long) +void DB::Aggregator::executeImplBatch, HashTableNoState, PairNoInit>, HashCRC32, HashTableGrowerWithPrecalculation<8ul>, Allocator>, true, false>>(DB::AggregationMethodOneNumber, HashTableNoState, PairNoInit>, HashCRC32, HashTableGrowerWithPrecalculation<8ul>, Allocator>, true, false>&, DB::AggregationMethodOneNumber, HashTableNoState, PairNoInit>, HashCRC32, HashTableGrowerWithPrecalculation<8ul>, Allocator>, true, false>::State&, DB::Arena*, unsigned long, unsigned long, DB::Aggregator::AggregateFunctionInstruction*, bool, char*) const +DB::Aggregator::executeImpl(DB::AggregatedDataVariants&, unsigned long, unsigned long, std::__1::vector>&, DB::Aggregator::AggregateFunctionInstruction*, bool, bool, char*) const +DB::Aggregator::executeOnBlock(std::__1::vector::immutable_ptr, std::__1::allocator::immutable_ptr>>, unsigned long, unsigned long, DB::AggregatedDataVariants&, std::__1::vector>&, std::__1::vector>, std::__1::allocator>>>&, bool&) const +DB::AggregatingTransform::work() +DB::ExecutionThreadContext::executeTask() +DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic*) +void std::__1::__function::__policy_invoker::__call_impl>(std::__1::__function::__policy_storage const*) +ThreadPoolImpl>::worker(std::__1::__list_iterator, void*>) +void std::__1::__function::__policy_invoker::__call_impl::ThreadFromGlobalPoolImpl>::scheduleImpl(std::__1::function, Priority, std::__1::optional, bool)::'lambda0'()>(void&&)::'lambda'(), void ()>>(std::__1::__function::__policy_storage const*) +void* std::__1::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::__1::function, Priority, std::__1::optional, bool)::'lambda0'()>>(void*) +``` + +ClickHouseソースコード内ã®ãƒ•ã‚¡ã‚¤ãƒ«åã¨è¡Œç•ªå·ã‚’å–å¾—ã™ã‚‹: + +``` sql +WITH arrayMap(x -> addressToLine(x), trace) AS all, arrayFilter(x -> x LIKE '%/dbms/%', all) AS dbms SELECT thread_name, thread_id, query_id, arrayStringConcat(notEmpty(dbms) ? dbms : all, '\n') AS res FROM system.stack_trace LIMIT 1 \G; +``` + +``` text +Row 1: +────── +thread_name: clickhouse-serv + +thread_id: 686 +query_id: cad353e7-1c29-4b2e-949f-93e597ab7a54 +res: /lib/x86_64-linux-gnu/libc-2.27.so +/build/obj-x86_64-linux-gnu/../src/Storages/System/StorageSystemStackTrace.cpp:182 +/build/obj-x86_64-linux-gnu/../contrib/libcxx/include/vector:656 +/build/obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:1338 +/build/obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:751 +/build/obj-x86_64-linux-gnu/../contrib/libcxx/include/optional:224 +/build/obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:192 +/build/obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:384 +/build/obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:643 +/build/obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:251 +/build/obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:1197 +/build/obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerConnection.cpp:57 +/build/obj-x86_64-linux-gnu/../contrib/libcxx/include/atomic:856 +/build/obj-x86_64-linux-gnu/../contrib/poco/Foundation/include/Poco/Mutex_POSIX.h:59 +/build/obj-x86_64-linux-gnu/../contrib/poco/Foundation/include/Poco/AutoPtr.h:223 +/lib/x86_64-linux-gnu/libpthread-2.27.so +/lib/x86_64-linux-gnu/libc-2.27.so +``` + +**関連項目** + +- [イントロスペクション関数](../../sql-reference/functions/introspection.md) — 利用å¯èƒ½ãªã‚¤ãƒ³ãƒˆãƒ­ã‚¹ãƒšã‚¯ã‚·ãƒ§ãƒ³é–¢æ•°ã¨ãã®ä½¿ç”¨æ³•ã«ã¤ã„ã¦ã€‚ +- [system.trace_log](../system-tables/trace_log.md) — サンプリングクエリプロファイラã«ã‚ˆã£ã¦åŽé›†ã•ã‚ŒãŸã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’å«ã‚€ã€‚ +- [arrayMap](../../sql-reference/functions/array-functions.md#array-map) — `arrayMap` 関数ã®èª¬æ˜Žã¨ä½¿ç”¨ä¾‹ã€‚ +- [arrayFilter](../../sql-reference/functions/array-functions.md#array-filter) — `arrayFilter` 関数ã®èª¬æ˜Žã¨ä½¿ç”¨ä¾‹ã€‚ diff --git a/docs/ja/operations/system-tables/storage_policies.md b/docs/ja/operations/system-tables/storage_policies.md new file mode 100644 index 00000000000..cadd9288b68 --- /dev/null +++ b/docs/ja/operations/system-tables/storage_policies.md @@ -0,0 +1,26 @@ +--- +slug: /ja/operations/system-tables/storage_policies +--- +# storage_policies + +[サーãƒãƒ¼è¨­å®š](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-multiple-volumes_configure)ã§å®šç¾©ã•ã‚ŒãŸã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã¨ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«é–¢ã™ã‚‹æƒ…報をå«ã¿ã¾ã™ã€‚ + +カラム: + +- `policy_name` ([String](../../sql-reference/data-types/string.md)) — ストレージãƒãƒªã‚·ãƒ¼ã®åå‰ã€‚ +- `volume_name` ([String](../../sql-reference/data-types/string.md)) — ストレージãƒãƒªã‚·ãƒ¼ã§å®šç¾©ã•ã‚ŒãŸãƒœãƒªãƒ¥ãƒ¼ãƒ ã®åå‰ã€‚ +- `volume_priority` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 設定内ã§ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ é †åºç•ªå·ã€ã“ã®é †åºã«å¾“ã£ã¦ãƒ‡ãƒ¼ã‚¿ãŒãƒœãƒªãƒ¥ãƒ¼ãƒ ã«è¨˜å…¥ã•ã‚Œã¾ã™ã€‚ã™ãªã‚ã¡ã€ãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥ã¨ãƒžãƒ¼ã‚¸æ™‚ã«å„ªå…ˆåº¦ã®ä½Žã„ボリュームã«ãƒ‡ãƒ¼ã‚¿ãŒæ›¸ãè¾¼ã¾ã‚Œã¾ã™ï¼ˆä»–ã®ãƒ«ãƒ¼ãƒ«: æœ‰åŠ¹æœŸé™ (TTL)ã€`max_data_part_size`ã€`move_factor`も考慮)。 +- `disks` ([Array(String)](../../sql-reference/data-types/array.md)) — ストレージãƒãƒªã‚·ãƒ¼ã§å®šç¾©ã•ã‚ŒãŸãƒ‡ã‚£ã‚¹ã‚¯å。 +- `volume_type` ([Enum8](../../sql-reference/data-types/enum.md)) — ボリュームã®ã‚¿ã‚¤ãƒ—。以下ã®å€¤ã®ã„ãšã‚Œã‹ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™: + - `JBOD` + - `SINGLE_DISK` + - `UNKNOWN` +- `max_data_part_size` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ボリュームディスクã«æ ¼ç´å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ãƒ‘ートã®æœ€å¤§ã‚µã‚¤ã‚ºï¼ˆ0 — 制é™ãªã—)。 +- `move_factor` ([Float64](../../sql-reference/data-types/float.md)) — 空ãディスクスペースã®æ¯”率。ã“ã®æ¯”率ãŒè¨­å®šãƒ‘ラメーターã®å€¤ã‚’超ãˆã‚‹ã¨ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’次ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã¸ç§»å‹•ã—始ã‚ã¾ã™ã€‚ +- `prefer_not_to_merge` ([UInt8](../../sql-reference/data-types/int-uint.md)) — `prefer_not_to_merge`設定ã®å€¤ã€‚常ã«falseã§ã‚ã‚‹ã¹ãã§ã™ã€‚ã“ã®è¨­å®šãŒæœ‰åŠ¹ã®å ´åˆã€èª¤ã‚Šã¾ã—ãŸã€‚ +- `perform_ttl_move_on_insert` ([UInt8](../../sql-reference/data-types/int-uint.md)) — `perform_ttl_move_on_insert`設定ã®å€¤ã€‚データパートINSERT時ã®TTL移動を無効化ã—ã¾ã™ã€‚デフォルトã§ã¯ã€TTL移動ルールã«ã‚ˆã£ã¦ã™ã§ã«æœŸé™åˆ‡ã‚Œã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ートを挿入ã™ã‚‹ã¨ã€ãã‚Œã¯å³åº§ã«ç§»å‹•ãƒ«ãƒ¼ãƒ«ã§å®£è¨€ã•ã‚ŒãŸãƒœãƒªãƒ¥ãƒ¼ãƒ /ディスクã«ç§»å‹•ã—ã¾ã™ã€‚移動先ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ /ディスクãŒé…ã„å ´åˆï¼ˆä¾‹ãˆã°S3)ã€ã“ã‚ŒãŒæŒ¿å…¥ã‚’è‘—ã—ãé…ãã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- `load_balancing` ([Enum8](../../sql-reference/data-types/enum.md)) — ディスクãƒãƒ©ãƒ³ã‚¸ãƒ³ã‚°ã®ãƒãƒªã‚·ãƒ¼ã€‚以下ã®å€¤ã®ã„ãšã‚Œã‹ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™: + - `ROUND_ROBIN` + - `LEAST_USED` + +ストレージãƒãƒªã‚·ãƒ¼ã«è¤‡æ•°ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ãŒå«ã¾ã‚Œã‚‹å ´åˆã€å„ボリュームã®æƒ…å ±ã¯ãƒ†ãƒ¼ãƒ–ルã®å€‹åˆ¥ã®è¡Œã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/operations/system-tables/symbols.md b/docs/ja/operations/system-tables/symbols.md new file mode 100644 index 00000000000..3df9e251a9a --- /dev/null +++ b/docs/ja/operations/system-tables/symbols.md @@ -0,0 +1,34 @@ +--- +slug: /ja/operations/system-tables/symbols +--- +# symbols + +`clickhouse` ãƒã‚¤ãƒŠãƒªã®å†…部構造ã®ãŸã‚ã®æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚アクセスã™ã‚‹ã«ã¯ã‚¤ãƒ³ãƒˆãƒ­ã‚¹ãƒšã‚¯ã‚·ãƒ§ãƒ³ç‰¹æ¨©ãŒå¿…è¦ã§ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ル㯠C++ ã®å°‚門家や ClickHouse ã®ã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ã«ã®ã¿å½¹ç«‹ã¡ã¾ã™ã€‚ + +カラム: + +- `symbol` ([String](../../sql-reference/data-types/string.md)) — ãƒã‚¤ãƒŠãƒªå†…ã®ã‚·ãƒ³ãƒœãƒ«åã§ã™ã€‚ã“ã‚Œã¯ãƒžãƒ³ã‚°ãƒ«ã•ã‚Œã¦ã„ã¾ã™ã€‚`demangle(symbol)` ã‚’é©ç”¨ã™ã‚‹ã¨å¯èª­æ€§ã®ã‚ã‚‹åå‰ã‚’å–å¾—ã§ãã¾ã™ã€‚ +- `address_begin` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ãƒã‚¤ãƒŠãƒªå†…ã®ã‚·ãƒ³ãƒœãƒ«ã®é–‹å§‹ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ +- `address_end` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ãƒã‚¤ãƒŠãƒªå†…ã®ã‚·ãƒ³ãƒœãƒ«ã®çµ‚了アドレス。 +- `name` ([String](../../sql-reference/data-types/string.md)) — `event` ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ + +**例** + +``` sql +SELECT address_begin, address_end - address_begin AS size, demangle(symbol) FROM system.symbols ORDER BY size DESC LIMIT 10 +``` + +``` text +┌─address_begin─┬─────size─┬─demangle(symbol)──────────────────────────────────────────────────────────────────┠+│ 25000976 │ 29466000 │ icudt70_dat │ +│ 400605288 │ 2097272 │ arena_emap_global │ +│ 18760592 │ 1048576 │ CLD2::kQuadChrome1015_2 │ +│ 9807152 │ 884808 │ TopLevelDomainLookupHash::isValid(char const*, unsigned long)::wordlist │ +│ 57442432 │ 850608 │ llvm::X86Insts │ +│ 55682944 │ 681360 │ (anonymous namespace)::X86DAGToDAGISel::SelectCode(llvm::SDNode*)::MatcherTable │ +│ 55130368 │ 502840 │ (anonymous namespace)::X86InstructionSelector::getMatchTable() const::MatchTable0 │ +│ 402930616 │ 404032 │ qpl::ml::dispatcher::hw_dispatcher::get_instance()::instance │ +│ 274131872 │ 356795 │ DB::SettingsTraits::Accessor::instance()::$_0::operator()() const │ +│ 58293040 │ 249424 │ llvm::X86InstrNameData │ +└───────────────┴──────────┴───────────────────────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/operations/system-tables/table_engines.md b/docs/ja/operations/system-tables/table_engines.md new file mode 100644 index 00000000000..94cfda67395 --- /dev/null +++ b/docs/ja/operations/system-tables/table_engines.md @@ -0,0 +1,39 @@ +--- +slug: /ja/operations/system-tables/table_engines +--- +# table_engines + +サーãƒãƒ¼ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るテーブルエンジンã®èª¬æ˜Žã¨ã€ãã®æ©Ÿèƒ½ã‚µãƒãƒ¼ãƒˆæƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯æ¬¡ã®ã‚«ãƒ©ãƒ ï¼ˆã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ãŒæ‹¬å¼§å†…ã«ç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼‰ãŒå«ã¾ã‚Œã¦ã„ã¾ã™: + +- `name` (String) — テーブルエンジンã®åå‰ã€‚ +- `supports_settings` (UInt8) — テーブルエンジンãŒ`SETTINGS`å¥ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `supports_skipping_indices` (UInt8) — テーブルエンジンãŒ[スキッピングインデックス](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-data_skipping-indexes)をサãƒãƒ¼ãƒˆã™ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `supports_ttl` (UInt8) — テーブルエンジンãŒ[æœ‰åŠ¹æœŸé™ (TTL)](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-ttl)をサãƒãƒ¼ãƒˆã™ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `supports_sort_order` (UInt8) — テーブルエンジンãŒ`PARTITION_BY`ã€`PRIMARY_KEY`ã€`ORDER_BY`ã€ãŠã‚ˆã³`SAMPLE_BY`å¥ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `supports_replication` (UInt8) — テーブルエンジンãŒ[データレプリケーション](../../engines/table-engines/mergetree-family/replication.md)をサãƒãƒ¼ãƒˆã™ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `supports_deduplication` (UInt8) — テーブルエンジンãŒãƒ‡ãƒ¼ã‚¿ã®é‡è¤‡é™¤åŽ»ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ +- `supports_parallel_insert` (UInt8) — テーブルエンジンãŒä¸¦åˆ—挿入をサãƒãƒ¼ãƒˆã™ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ï¼ˆ[`max_insert_threads`](../../operations/settings/settings.md#max-insert-threads)設定をå‚照)。 + +例: + +``` sql +SELECT * +FROM system.table_engines +WHERE name in ('Kafka', 'MergeTree', 'ReplicatedCollapsingMergeTree') +``` + +``` text +┌─name──────────────────────────┬─supports_settings─┬─supports_skipping_indices─┬─supports_sort_order─┬─supports_ttl─┬─supports_replication─┬─supports_deduplication─┬─supports_parallel_insert─┠+│ MergeTree │ 1 │ 1 │ 1 │ 1 │ 0 │ 0 │ 1 │ +│ Kafka │ 1 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ +│ ReplicatedCollapsingMergeTree │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ +└───────────────────────────────┴───────────────────┴───────────────────────────┴─────────────────────┴──────────────┴──────────────────────┴────────────────────────┴──────────────────────────┘ +``` + +**関連項目** + +- MergeTree ファミリーã®[クエリå¥](../../engines/table-engines/mergetree-family/mergetree.md#mergetree-query-clauses) +- Kafkaã®[設定](../../engines/table-engines/integrations/kafka.md#table_engine-kafka-creating-a-table) +- Joinã®[設定](../../engines/table-engines/special/join.md#join-limitations-and-settings) diff --git a/docs/ja/operations/system-tables/tables.md b/docs/ja/operations/system-tables/tables.md new file mode 100644 index 00000000000..8f26af16045 --- /dev/null +++ b/docs/ja/operations/system-tables/tables.md @@ -0,0 +1,150 @@ +--- +slug: /ja/operations/system-tables/tables +--- +# tables + +サーãƒãƒ¼ãŒèªè­˜ã—ã¦ã„ã‚‹å„テーブルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å«ã¿ã¾ã™ã€‚ + +[Detach](../../sql-reference/statements/detach.md)ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯`system.tables`ã«ã¯è¡¨ç¤ºã•ã‚Œã¾ã›ã‚“。 + +[一時テーブル](../../sql-reference/statements/create/table.md#temporary-tables)ã¯ã€ãã‚ŒãŒä½œæˆã•ã‚ŒãŸã‚»ãƒƒã‚·ãƒ§ãƒ³å†…ã§ã®ã¿`system.tables`ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ãれらã¯ç©ºã®`database`フィールドã¨`is_temporary`フラグãŒã‚ªãƒ³ã®çŠ¶æ…‹ã§ç¤ºã•ã‚Œã¾ã™ã€‚ + +カラム: + +- `database` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒæ‰€å±žã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ + +- `name` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 + +- `uuid` ([UUID](../../sql-reference/data-types/uuid.md)) — テーブルã®UUID(Atomicデータベース)。 + +- `engine` ([String](../../sql-reference/data-types/string.md)) — テーブルエンジンå(パラメータãªã—)。 + +- `is_temporary` ([UInt8](../../sql-reference/data-types/int-uint.md)) - テーブルãŒä¸€æ™‚çš„ã§ã‚ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ + +- `data_paths` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) - ファイルシステム内ã®ãƒ†ãƒ¼ãƒ–ルデータã®ãƒ‘ス。 + +- `metadata_path` ([String](../../sql-reference/data-types/string.md)) - ファイルシステム内ã®ãƒ†ãƒ¼ãƒ–ルメタデータã®ãƒ‘ス。 + +- `metadata_modification_time` ([DateTime](../../sql-reference/data-types/datetime.md)) - テーブルメタデータã®æœ€æ–°ä¿®æ­£æ™‚間。 + +- `metadata_version` ([Int32](../../sql-reference/data-types/int-uint.md)) - ReplicatedMergeTreeテーブルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€éžReplicatedMergeTreeテーブルã®å ´åˆã¯0。 + +- `dependencies_database` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) - データベースã®ä¾å­˜é–¢ä¿‚。 + +- `dependencies_table` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) - テーブルã®ä¾å­˜é–¢ä¿‚(ç¾è¡Œãƒ†ãƒ¼ãƒ–ルã®[Materialized View](../../sql-reference/statements/create/view.md#materialized-view))。 + +- `create_table_query` ([String](../../sql-reference/data-types/string.md)) - テーブルを作æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã€‚ + +- `engine_full` ([String](../../sql-reference/data-types/string.md)) - テーブルエンジンã®ãƒ‘ラメータ。 + +- `as_select` ([String](../../sql-reference/data-types/string.md)) - ビュー用ã®`SELECT`クエリ。 + +- `partition_key` ([String](../../sql-reference/data-types/string.md)) - テーブルã§æŒ‡å®šã•ã‚ŒãŸãƒ‘ーティションキー表ç¾ã€‚ + +- `sorting_key` ([String](../../sql-reference/data-types/string.md)) - テーブルã§æŒ‡å®šã•ã‚ŒãŸã‚½ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚­ãƒ¼è¡¨ç¾ã€‚ + +- `primary_key` ([String](../../sql-reference/data-types/string.md)) - テーブルã§æŒ‡å®šã•ã‚ŒãŸä¸»ã‚­ãƒ¼è¡¨ç¾ã€‚ + +- `sampling_key` ([String](../../sql-reference/data-types/string.md)) - テーブルã§æŒ‡å®šã•ã‚ŒãŸã‚µãƒ³ãƒ—リングキー表ç¾ã€‚ + +- `storage_policy` ([String](../../sql-reference/data-types/string.md)) - ストレージãƒãƒªã‚·ãƒ¼: + + - [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-multiple-volumes) + - [Distributed](../../engines/table-engines/special/distributed.md#distributed) + +- `total_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) - テーブル内ã®æ­£ç¢ºãªè¡Œæ•°ã‚’迅速ã«ç‰¹å®šã§ãã‚‹å ´åˆã€åˆè¨ˆè¡Œæ•°ã€‚ã§ããªã„å ´åˆã¯`NULL`(基礎ã¨ãªã‚‹`Buffer`テーブルをå«ã‚€ï¼‰ã€‚ + +- `total_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) - ストレージ上ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦æ­£ç¢ºãªãƒã‚¤ãƒˆæ•°ã‚’迅速ã«ç‰¹å®šã§ãã‚‹å ´åˆã€åˆè¨ˆãƒã‚¤ãƒˆæ•°ã€‚ã§ããªã„å ´åˆã¯`NULL`(基礎ã¨ãªã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’å«ã¾ãªã„)。 + + - ディスクã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ä½¿ç”¨æ¸ˆã¿ã‚¹ãƒšãƒ¼ã‚¹ï¼ˆåœ§ç¸®çŠ¶æ…‹ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚ + - メモリã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€ãƒ¡ãƒ¢ãƒªã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ãŠãŠã‚ˆãã®ãƒã‚¤ãƒˆæ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +- `total_bytes_uncompressed` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) - ストレージ上ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ãƒ‘ートã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‹ã‚‰æ­£ç¢ºãªãƒã‚¤ãƒˆæ•°ã‚’迅速ã«ç‰¹å®šã§ãã‚‹å ´åˆã®éžåœ§ç¸®ãƒã‚¤ãƒˆç·æ•°ã€‚ã§ããªã„å ´åˆã¯`NULL`(基礎ã¨ãªã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’考慮ã—ãªã„)。 + +- `lifetime_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) - サーãƒèµ·å‹•ä»¥æ¥INSERTã•ã‚ŒãŸè¡Œã®ç·æ•°ï¼ˆ`Buffer`テーブルã®ã¿ï¼‰ã€‚ + +- `lifetime_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) - サーãƒèµ·å‹•ä»¥æ¥INSERTã•ã‚ŒãŸãƒã‚¤ãƒˆã®ç·æ•°ï¼ˆ`Buffer`テーブルã®ã¿ï¼‰ã€‚ + +- `comment` ([String](../../sql-reference/data-types/string.md)) - テーブルã¸ã®ã‚³ãƒ¡ãƒ³ãƒˆã€‚ + +- `has_own_data` ([UInt8](../../sql-reference/data-types/int-uint.md)) — テーブル自身ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã—ã¦ã„ã‚‹ã‹ã€åˆ¥ã®ã‚½ãƒ¼ã‚¹ã«ã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦ã„ã‚‹ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚ + +- `loading_dependencies_database` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) - データベースã®èª­ã¿è¾¼ã¿ä¾å­˜é–¢ä¿‚(ç¾è¡Œã‚ªãƒ–ジェクトã®å‰ã«èª­ã¿è¾¼ã¾ã‚Œã‚‹ã¹ãオブジェクトã®ãƒªã‚¹ãƒˆï¼‰ã€‚ + +- `loading_dependencies_table` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) - テーブルã®èª­ã¿è¾¼ã¿ä¾å­˜é–¢ä¿‚(ç¾è¡Œã‚ªãƒ–ジェクトã®å‰ã«èª­ã¿è¾¼ã¾ã‚Œã‚‹ã¹ãオブジェクトã®ãƒªã‚¹ãƒˆï¼‰ã€‚ + +- `loading_dependent_database` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) - ä¾å­˜ã—ã¦ã„るデータベースã®èª­ã¿è¾¼ã¿ã€‚ + +- `loading_dependent_table` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) - ä¾å­˜ã—ã¦ã„るテーブルã®èª­ã¿è¾¼ã¿ã€‚ + +`system.tables` テーブルã¯`SHOW TABLES`クエリã®å®Ÿè£…ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +```sql +SELECT * FROM system.tables LIMIT 2 FORMAT Vertical; +``` + +```text +Row 1: +────── +database: base +name: t1 +uuid: 81b1c20a-b7c6-4116-a2ce-7583fb6b6736 +engine: MergeTree +is_temporary: 0 +data_paths: ['/var/lib/clickhouse/store/81b/81b1c20a-b7c6-4116-a2ce-7583fb6b6736/'] +metadata_path: /var/lib/clickhouse/store/461/461cf698-fd0b-406d-8c01-5d8fd5748a91/t1.sql +metadata_modification_time: 2021-01-25 19:14:32 +dependencies_database: [] +dependencies_table: [] +create_table_query: CREATE TABLE base.t1 (`n` UInt64) ENGINE = MergeTree ORDER BY n SETTINGS index_granularity = 8192 +engine_full: MergeTree ORDER BY n SETTINGS index_granularity = 8192 +as_select: SELECT database AS table_catalog +partition_key: +sorting_key: n +primary_key: n +sampling_key: +storage_policy: default +total_rows: 1 +total_bytes: 99 +lifetime_rows: á´ºáµá´¸á´¸ +lifetime_bytes: á´ºáµá´¸á´¸ +comment: +has_own_data: 0 +loading_dependencies_database: [] +loading_dependencies_table: [] +loading_dependent_database: [] +loading_dependent_table: [] + +Row 2: +────── +database: default +name: 53r93yleapyears +uuid: 00000000-0000-0000-0000-000000000000 +engine: MergeTree +is_temporary: 0 +data_paths: ['/var/lib/clickhouse/data/default/53r93yleapyears/'] +metadata_path: /var/lib/clickhouse/metadata/default/53r93yleapyears.sql +metadata_modification_time: 2020-09-23 09:05:36 +dependencies_database: [] +dependencies_table: [] +create_table_query: CREATE TABLE default.`53r93yleapyears` (`id` Int8, `febdays` Int8) ENGINE = MergeTree ORDER BY id SETTINGS index_granularity = 8192 +engine_full: MergeTree ORDER BY id SETTINGS index_granularity = 8192 +as_select: SELECT name AS catalog_name +partition_key: +sorting_key: id +primary_key: id +sampling_key: +storage_policy: default +total_rows: 2 +total_bytes: 155 +lifetime_rows: á´ºáµá´¸á´¸ +lifetime_bytes: á´ºáµá´¸á´¸ +comment: +has_own_data: 0 +loading_dependencies_database: [] +loading_dependencies_table: [] +loading_dependent_database: [] +loading_dependent_table: [] +``` diff --git a/docs/ja/operations/system-tables/text_log.md b/docs/ja/operations/system-tables/text_log.md new file mode 100644 index 00000000000..6bc239eb894 --- /dev/null +++ b/docs/ja/operations/system-tables/text_log.md @@ -0,0 +1,78 @@ +--- +slug: /ja/operations/system-tables/text_log +--- +# text_log + +ログエントリをå«ã‚“ã§ã„ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã«å‡ºåŠ›ã•ã‚Œã‚‹ãƒ­ã‚°ãƒ¬ãƒ™ãƒ«ã¯ã€`text_log.level`サーãƒãƒ¼è¨­å®šã§åˆ¶é™ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` (Date) — エントリã®æ—¥ä»˜ã€‚ +- `event_time` (DateTime) — エントリã®æ™‚刻。 +- `event_time_microseconds` (DateTime64) — マイクロ秒å˜ä½ã®ç²¾åº¦ã§ã®ã‚¨ãƒ³ãƒˆãƒªã®æ™‚刻。 +- `microseconds` (UInt32) — エントリã®ãƒžã‚¤ã‚¯ãƒ­ç§’。 +- `thread_name` (String) — ロギングãŒè¡Œã‚ã‚ŒãŸã‚¹ãƒ¬ãƒƒãƒ‰ã®åå‰ã€‚ +- `thread_id` (UInt64) — OSã®ã‚¹ãƒ¬ãƒƒãƒ‰ID。 +- `level` (`Enum8`) — エントリã®ãƒ¬ãƒ™ãƒ«ã€‚å¯èƒ½ãªå€¤: + - `1` ã¾ãŸã¯ `'Fatal'`。 + - `2` ã¾ãŸã¯ `'Critical'`。 + - `3` ã¾ãŸã¯ `'Error'`。 + - `4` ã¾ãŸã¯ `'Warning'`。 + - `5` ã¾ãŸã¯ `'Notice'`。 + - `6` ã¾ãŸã¯ `'Information'`。 + - `7` ã¾ãŸã¯ `'Debug'`。 + - `8` ã¾ãŸã¯ `'Trace'`。 +- `query_id` (String) — クエリã®ID。 +- `logger_name` (LowCardinality(String)) — ロガーã®åå‰ï¼ˆä¾‹: `DDLWorker`)。 +- `message` (String) — メッセージ自体。 +- `revision` (UInt32) — ClickHouseã®ãƒªãƒ“ジョン。 +- `source_file` (LowCardinality(String)) — ロギングãŒè¡Œã‚ã‚ŒãŸã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã€‚ +- `source_line` (UInt64) — ロギングãŒè¡Œã‚ã‚ŒãŸã‚½ãƒ¼ã‚¹è¡Œã€‚ +- `message_format_string` (LowCardinality(String)) — メッセージã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä½¿ç”¨ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列。 +- `value1` (String) - メッセージã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä½¿ç”¨ã•ã‚ŒãŸå¼•æ•°1。 +- `value2` (String) - メッセージã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä½¿ç”¨ã•ã‚ŒãŸå¼•æ•°2。 +- `value3` (String) - メッセージã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä½¿ç”¨ã•ã‚ŒãŸå¼•æ•°3。 +- `value4` (String) - メッセージã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä½¿ç”¨ã•ã‚ŒãŸå¼•æ•°4。 +- `value5` (String) - メッセージã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä½¿ç”¨ã•ã‚ŒãŸå¼•æ•°5。 +- `value6` (String) - メッセージã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä½¿ç”¨ã•ã‚ŒãŸå¼•æ•°6。 +- `value7` (String) - メッセージã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä½¿ç”¨ã•ã‚ŒãŸå¼•æ•°7。 +- `value8` (String) - メッセージã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä½¿ç”¨ã•ã‚ŒãŸå¼•æ•°8。 +- `value9` (String) - メッセージã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä½¿ç”¨ã•ã‚ŒãŸå¼•æ•°9。 +- `value10` (String) - メッセージã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä½¿ç”¨ã•ã‚ŒãŸå¼•æ•°10。 + +**例** + +``` sql +SELECT * FROM system.text_log LIMIT 1 \G +``` + +``` text +Row 1: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2020-09-10 +event_time: 2020-09-10 11:23:07 +event_time_microseconds: 2020-09-10 11:23:07.871397 +microseconds: 871397 +thread_name: clickhouse-serv +thread_id: 564917 +level: Information +query_id: +logger_name: DNSCacheUpdater +message: Update period 15 seconds +revision: 54440 +source_file: /ClickHouse/src/Interpreters/DNSCacheUpdater.cpp; void DB::DNSCacheUpdater::start() +source_line: 45 +message_format_string: Update period {} seconds +value1: 15 +value2: +value3: +value4: +value5: +value6: +value7: +value8: +value9: +value10: +``` diff --git a/docs/ja/operations/system-tables/time_zones.md b/docs/ja/operations/system-tables/time_zones.md new file mode 100644 index 00000000000..13923d92498 --- /dev/null +++ b/docs/ja/operations/system-tables/time_zones.md @@ -0,0 +1,31 @@ +--- +slug: /ja/operations/system-tables/time_zones +title: time_zones +--- + +ClickHouseサーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„るタイムゾーンã®ãƒªã‚¹ãƒˆã‚’å«ã¿ã¾ã™ã€‚ã“ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã®ãƒªã‚¹ãƒˆã¯ã€ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã‚ˆã£ã¦ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +カラム: + +- `time_zone` (String) — サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るタイムゾーンã®ãƒªã‚¹ãƒˆã€‚ + +**例** + +``` sql +SELECT * FROM system.time_zones LIMIT 10 +``` + +``` text +┌─time_zone──────────┠+│ Africa/Abidjan │ +│ Africa/Accra │ +│ Africa/Addis_Ababa │ +│ Africa/Algiers │ +│ Africa/Asmara │ +│ Africa/Asmera │ +│ Africa/Bamako │ +│ Africa/Bangui │ +│ Africa/Banjul │ +│ Africa/Bissau │ +└────────────────────┘ +``` diff --git a/docs/ja/operations/system-tables/trace_log.md b/docs/ja/operations/system-tables/trace_log.md new file mode 100644 index 00000000000..66641a1dea2 --- /dev/null +++ b/docs/ja/operations/system-tables/trace_log.md @@ -0,0 +1,57 @@ +--- +slug: /ja/operations/system-tables/trace_log +--- +# trace_log + +[sampling query profiler](../../operations/optimizing-performance/sampling-query-profiler.md) ã«ã‚ˆã£ã¦åŽé›†ã•ã‚ŒãŸã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€[trace_log](../../operations/server-configuration-parameters/settings.md#trace_log) サーãƒãƒ¼è¨­å®šã‚»ã‚¯ã‚·ãƒ§ãƒ³ãŒã‚»ãƒƒãƒˆã•ã‚Œã‚‹ã¨ ClickHouse ã«ã‚ˆã£ã¦ä½œæˆã•ã‚Œã¾ã™ã€‚設定もå‚ç…§ã—ã¦ãã ã•ã„:[query_profiler_real_time_period_ns](../../operations/settings/settings.md#query_profiler_real_time_period_ns)ã€[query_profiler_cpu_time_period_ns](../../operations/settings/settings.md#query_profiler_cpu_time_period_ns)ã€[memory_profiler_step](../../operations/settings/settings.md#memory_profiler_step)ã€[memory_profiler_sample_probability](../../operations/settings/settings.md#memory_profiler_sample_probability)ã€[trace_profile_events](../../operations/settings/settings.md#trace_profile_events)。 + +ログを解æžã™ã‚‹ã«ã¯ã€`addressToLine`ã€`addressToLineWithInlines`ã€`addressToSymbol`ã€ãŠã‚ˆã³ `demangle` ã®ã‚¤ãƒ³ãƒˆãƒ­ã‚¹ãƒšã‚¯ã‚·ãƒ§ãƒ³é–¢æ•°ã‚’使用ã—ã¾ã™ã€‚ + +カラム: + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — サンプリング時点ã®æ—¥ä»˜ã€‚ +- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — サンプリング時点ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。 +- `event_time_microseconds` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — マイクロ秒精度ã®ã‚µãƒ³ãƒ—リング時点ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。 +- `timestamp_ns` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ナノ秒精度ã®ã‚µãƒ³ãƒ—リング時点ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。 +- `revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — ClickHouse サーãƒãƒ¼ã®ãƒ“ルドリビジョン。 + + `clickhouse-client` ã§ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã¨ã€`Connected to ClickHouse server version 19.18.1.` ã®ã‚ˆã†ãªæ–‡å­—列ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«ã¯ã‚µãƒ¼ãƒãƒ¼ã® `revision` ãŒå«ã¾ã‚Œã¦ãŠã‚Šã€`version` ã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。 + +- `trace_type` ([Enum8](../../sql-reference/data-types/enum.md)) — トレースã®ç¨®é¡ž: + - `Real` ã¯ã€ã‚¦ã‚©ãƒ¼ãƒ«ã‚¯ãƒ­ãƒƒã‚¯æ™‚é–“ã§ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã®åŽé›†ã‚’表ã—ã¾ã™ã€‚ + - `CPU` ã¯ã€CPU時間ã§ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã®åŽé›†ã‚’表ã—ã¾ã™ã€‚ + - `Memory` ã¯ã€ãƒ¡ãƒ¢ãƒªã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ãŒã‚µãƒ–シークエントウォーターマークを超ãˆãŸã¨ãã®ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã¨ãƒ‡ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®åŽé›†ã‚’表ã—ã¾ã™ã€‚ + - `MemorySample` ã¯ã€ãƒ©ãƒ³ãƒ€ãƒ ãªã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã¨ãƒ‡ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®åŽé›†ã‚’表ã—ã¾ã™ã€‚ + - `MemoryPeak` ã¯ã€ãƒ”ークメモリ使用é‡ã®æ›´æ–°ã®åŽé›†ã‚’表ã—ã¾ã™ã€‚ + - `ProfileEvent` ã¯ã€ãƒ—ロフィールイベントã®ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã®åŽé›†ã‚’表ã—ã¾ã™ã€‚ +- `thread_id` ([UInt64](../../sql-reference/data-types/int-uint.md)) — スレッド識別å­ã€‚ +- `query_id` ([String](../../sql-reference/data-types/string.md)) — 実行中ã®ã‚¯ã‚¨ãƒªã®è©³ç´°ã‚’ [query_log](#system_tables-query_log) システムテーブルã‹ã‚‰å–å¾—ã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªè­˜åˆ¥å­ã€‚ +- `trace` ([Array(UInt64)](../../sql-reference/data-types/array.md)) — サンプリング時点ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã€‚å„è¦ç´ ã¯ ClickHouse サーãƒãƒ¼ãƒ—ロセス内ã®ä»®æƒ³ãƒ¡ãƒ¢ãƒªã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã™ã€‚ +- `size` ([Int64](../../sql-reference/data-types/int-uint.md)) - `Memory`ã€`MemorySample` ã¾ãŸã¯ `MemoryPeak` ã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ—ã§ã¯ã‚¢ãƒ­ã‚±ãƒ¼ãƒˆã•ã‚ŒãŸãƒ¡ãƒ¢ãƒªã®é‡ã€ä»–ã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ—ã§ã¯0ã§ã™ã€‚ +- `event` ([LowCardinality(String)](../../sql-reference/data-types/lowcardinality.md)) - `ProfileEvent` ã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ—ã§ã¯æ›´æ–°ã•ã‚ŒãŸãƒ—ロフィールイベントã®åå‰ã€ä»–ã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ—ã§ã¯ç©ºæ–‡å­—列ã§ã™ã€‚ +- `increment` ([UInt64](../../sql-reference/data-types/int-uint.md)) - `ProfileEvent` ã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ—ã§ã¯ãƒ—ロフィールイベントã®å¢—加é‡ã€ä»–ã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ—ã§ã¯0ã§ã™ã€‚ + +**例** + +``` sql +SELECT * FROM system.trace_log LIMIT 1 \G +``` + +``` text +Row 1: +────── +hostname: clickhouse.eu-central1.internal +event_date: 2020-09-10 +event_time: 2020-09-10 11:23:09 +event_time_microseconds: 2020-09-10 11:23:09.872924 +timestamp_ns: 1599762189872924510 +revision: 54440 +trace_type: Memory +thread_id: 564963 +query_id: +trace: [371912858,371912789,371798468,371799717,371801313,371790250,624462773,566365041,566440261,566445834,566460071,566459914,566459842,566459580,566459469,566459389,566459341,566455774,371993941,371988245,372158848,372187428,372187309,372187093,372185478,140222123165193,140222122205443] +size: 5244400 +``` diff --git a/docs/ja/operations/system-tables/user_processes.md b/docs/ja/operations/system-tables/user_processes.md new file mode 100644 index 00000000000..2e6fa7eadec --- /dev/null +++ b/docs/ja/operations/system-tables/user_processes.md @@ -0,0 +1,28 @@ +--- +slug: /ja/operations/system-tables/user_processes +--- +# user_processes + +ã“ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã¨ProfileEventsã®æ¦‚è¦ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«åˆ©ç”¨ã§ãã¾ã™ã€‚ + +カラム: + +- `user` ([String](../../sql-reference/data-types/string.md)) — ユーザーå。 +- `memory_usage` ([Int64](../../sql-reference/data-types/int-uint#int-ranges)) – ユーザーã®å…¨ãƒ—ロセスã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹RAMã®åˆè¨ˆã€‚一部ã®å°‚用メモリã®ã‚¿ã‚¤ãƒ—ã‚’å«ã¾ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚[max_memory_usage](../../operations/settings/query-complexity.md#settings_max_memory_usage) 設定をå‚ç…§ã—ã¦ãã ã•ã„。 +- `peak_memory_usage` ([Int64](../../sql-reference/data-types/int-uint#int-ranges)) — ユーザーã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã®ãƒ”ーク。ã“ã®å€¤ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¯ã‚¨ãƒªãŒå®Ÿè¡Œã•ã‚Œãªã„状態ã§ãƒªã‚»ãƒƒãƒˆã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +- `ProfileEvents` ([Map(String, UInt64)](../../sql-reference/data-types/map)) – ユーザーã®ç•°ãªã‚‹ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã‚’計測ã™ã‚‹ProfileEventsã®æ¦‚è¦ã€‚ãれらã®èª¬æ˜Žã¯ã€ãƒ†ãƒ¼ãƒ–ル[system.events](../../operations/system-tables/events.md#system_tables-events)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +```sql +SELECT * FROM system.user_processes LIMIT 10 FORMAT Vertical; +``` + +```response +Row 1: +────── +user: default +memory_usage: 9832 +peak_memory_usage: 9832 +ProfileEvents: {'Query':5,'SelectQuery':5,'QueriesWithSubqueries':38,'SelectQueriesWithSubqueries':38,'QueryTimeMicroseconds':842048,'SelectQueryTimeMicroseconds':842048,'ReadBufferFromFileDescriptorRead':6,'ReadBufferFromFileDescriptorReadBytes':234,'IOBufferAllocs':3,'IOBufferAllocBytes':98493,'ArenaAllocChunks':283,'ArenaAllocBytes':1482752,'FunctionExecute':670,'TableFunctionExecute':16,'DiskReadElapsedMicroseconds':19,'NetworkSendElapsedMicroseconds':684,'NetworkSendBytes':139498,'SelectedRows':6076,'SelectedBytes':685802,'ContextLock':1140,'RWLockAcquiredReadLocks':193,'RWLockReadersWaitMilliseconds':4,'RealTimeMicroseconds':1585163,'UserTimeMicroseconds':889767,'SystemTimeMicroseconds':13630,'SoftPageFaults':1947,'OSCPUWaitMicroseconds':6,'OSCPUVirtualTimeMicroseconds':903251,'OSReadChars':28631,'OSWriteChars':28888,'QueryProfilerRuns':3,'LogTrace':79,'LogDebug':24} + +1 row in set. Elapsed: 0.010 sec. +``` diff --git a/docs/ja/operations/system-tables/users.md b/docs/ja/operations/system-tables/users.md new file mode 100644 index 00000000000..06a1c42a054 --- /dev/null +++ b/docs/ja/operations/system-tables/users.md @@ -0,0 +1,35 @@ +--- +slug: /ja/operations/system-tables/users +--- +# users + +サーãƒãƒ¼ã§è¨­å®šã•ã‚Œã¦ã„ã‚‹[ユーザーアカウント](../../guides/sre/user-management/index.md#user-account-management)ã®ä¸€è¦§ã‚’å«ã¿ã¾ã™ã€‚ + +カラム: +- `name` ([String](../../sql-reference/data-types/string.md)) — ユーザーå。 + +- `id` ([UUID](../../sql-reference/data-types/uuid.md)) — ユーザー ID。 + +- `storage` ([String](../../sql-reference/data-types/string.md)) — ユーザーã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¸ã®ãƒ‘ス。`access_control_path` パラメーターã§è¨­å®šã•ã‚Œã¾ã™ã€‚ + +- `auth_type` ([Enum8](../../sql-reference/data-types/enum.md)('no_password' = 0, 'plaintext_password' = 1, 'sha256_password' = 2, 'double_sha1_password' = 3, 'ldap' = 4, 'kerberos' = 5, 'ssl_certificate' = 6, 'bcrypt_password' = 7)) — èªè¨¼ã‚¿ã‚¤ãƒ—を示ã—ã¾ã™ã€‚ユーザーèªè¨¼ã«ã¯ã€ãƒ‘スワードãªã—ã€ãƒ—レーンテキストパスワードã€[SHA256](https://en.wikipedia.org/wiki/SHA-2) エンコードã•ã‚ŒãŸãƒ‘スワードã€[ダブルSHA-1](https://en.wikipedia.org/wiki/SHA-1) エンコードã•ã‚ŒãŸãƒ‘スワードã€ã¾ãŸã¯ [bcrypt](https://en.wikipedia.org/wiki/Bcrypt) エンコードã•ã‚ŒãŸãƒ‘スワードã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚ + +- `auth_params` ([String](../../sql-reference/data-types/string.md)) — `auth_type` ã«å¿œã˜ãŸJSONå½¢å¼ã®èªè¨¼ãƒ‘ラメーター。 + +- `host_ip` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ã‚’許å¯ã•ã‚Œã¦ã„るホストã®IPアドレス。 + +- `host_names` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ã‚’許å¯ã•ã‚Œã¦ã„るホストã®åå‰ã€‚ + +- `host_names_regexp` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã“ã¨ã‚’許å¯ã•ã‚Œã¦ã„るホストåã®æ­£è¦è¡¨ç¾ã€‚ + +- `host_names_like` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — LIKE述語を使ã£ã¦è¨­å®šã•ã‚ŒãŸã€ClickHouseサーãƒãƒ¼ã¸ã®æŽ¥ç¶šãŒè¨±å¯ã•ã‚Œã¦ã„るホストã®åå‰ã€‚ + +- `default_roles_all` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — デフォルトã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¨­å®šã•ã‚ŒãŸã™ã¹ã¦ã®ä»˜ä¸Žã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã‚’示ã—ã¾ã™ã€‚ + +- `default_roles_list` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — デフォルトã§æä¾›ã•ã‚Œã‚‹ä»˜ä¸Žã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã®ãƒªã‚¹ãƒˆã€‚ + +- `default_roles_except` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — デフォルトã§è¨­å®šã•ã‚ŒãŸä»˜ä¸Žã•ã‚ŒãŸã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ã€‚ãŸã ã—ã€æŒ‡å®šã•ã‚ŒãŸã‚‚ã®ã‚’除ãã¾ã™ã€‚ + +## See Also {#see-also} + +- [SHOW USERS](../../sql-reference/statements/show.md#show-users-statement) diff --git a/docs/ja/operations/system-tables/view_refreshes.md b/docs/ja/operations/system-tables/view_refreshes.md new file mode 100644 index 00000000000..68aa1e9c822 --- /dev/null +++ b/docs/ja/operations/system-tables/view_refreshes.md @@ -0,0 +1,44 @@ +--- +slug: /ja/operations/system-tables/view_refreshes +--- +# view_refreshes + +[æ›´æ–°å¯èƒ½ãªMaterialized View](../../sql-reference/statements/create/view.md#refreshable-materialized-view)ã«é–¢ã™ã‚‹æƒ…報をæä¾›ã—ã¾ã™ã€‚サーãƒãƒ¼èµ·å‹•æ™‚やテーブル作æˆæ™‚以é™ã€æ›´æ–°ãŒé€²è¡Œä¸­ã‹ã©ã†ã‹ã«é–¢ã‚らãšã€ã™ã¹ã¦ã®æ›´æ–°å¯èƒ½ãªMaterialized ViewãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +カラム: + +- `database` ([String](../../sql-reference/data-types/string.md)) — テーブルãŒæ‰€åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã€‚ +- `view` ([String](../../sql-reference/data-types/string.md)) — テーブルå。 +- `uuid` ([UUID](../../sql-reference/data-types/uuid.md)) — テーブルã®UUID (Atomicデータベース)。 +- `status` ([String](../../sql-reference/data-types/string.md)) — ç¾åœ¨ã®æ›´æ–°ã®çŠ¶æ…‹ã€‚ +- `last_success_time` ([Nullable](../../sql-reference/data-types/nullable.md)([DateTime](../../sql-reference/data-types/datetime.md))) — 最新ã®æˆåŠŸã—ãŸæ›´æ–°ãŒé–‹å§‹ã•ã‚ŒãŸæ™‚間。サーãƒãƒ¼èµ·å‹•ä»¥é™ã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ル作æˆä»¥é™æˆåŠŸã—ãŸæ›´æ–°ãŒãªã‘ã‚Œã°NULL。 +- `last_success_duration_ms` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — 最新ã®æ›´æ–°ã«ã©ã‚Œãらã„時間ãŒã‹ã‹ã£ãŸã‹ã€‚ +- `last_refresh_time` ([Nullable](../../sql-reference/data-types/nullable.md)([DateTime](../../sql-reference/data-types/datetime.md))) — 最新ã®æ›´æ–°ã®è©¦è¡ŒãŒçµ‚了ã—ãŸï¼ˆæ—¢çŸ¥ã®å ´åˆï¼‰ã‹é–‹å§‹ã•ã‚ŒãŸï¼ˆä¸æ˜Žãªå ´åˆã¾ãŸã¯å®Ÿè¡Œä¸­ã®å ´åˆï¼‰æ™‚間。サーãƒãƒ¼èµ·å‹•ä»¥é™ã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ル作æˆä»¥é™æ›´æ–°ã®è©¦è¡ŒãŒãªã‘ã‚Œã°NULL。 +- `last_refresh_replica` ([String](../../sql-reference/data-types/string.md)) — 調整ãŒæœ‰åŠ¹åŒ–ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ç¾åœ¨ã®ï¼ˆå®Ÿè¡Œä¸­ã®å ´åˆï¼‰ã¾ãŸã¯å‰å›žã®ï¼ˆå®Ÿè¡Œä¸­ã§ãªã„å ´åˆã®ï¼‰æ›´æ–°ã®è©¦è¡Œã‚’è¡Œã£ãŸãƒ¬ãƒ—リカã®åå‰ã€‚ +- `next_refresh_time` ([Nullable](../../sql-reference/data-types/nullable.md)([DateTime](../../sql-reference/data-types/datetime.md))) — statusãŒScheduledã®å ´åˆã«ã€æ¬¡ã®æ›´æ–°ãŒé–‹å§‹ã•ã‚Œã‚‹äºˆå®šã®æ™‚間。 +- `exception` ([String](../../sql-reference/data-types/string.md)) — å‰å›žã®è©¦è¡ŒãŒå¤±æ•—ã—ãŸå ´åˆã®ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€‚ +- `retry` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨ã®æ›´æ–°ã«ãŠã„ã¦ã“ã‚Œã¾ã§ã«å¤±æ•—ã—ãŸè©¦è¡Œã®å›žæ•°ã€‚ +- `progress` ([Float64](../../sql-reference/data-types/float.md)) — ç¾åœ¨ã®æ›´æ–°ã®é€²è¡ŒçŠ¶æ³ï¼ˆ0ã‹ã‚‰1ã®é–“)。statusãŒ`RunningOnAnotherReplica`ã®å ´åˆã¯åˆ©ç”¨ä¸å¯ã€‚ +- `read_rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨ã®æ›´æ–°ã§ã“ã‚Œã¾ã§ã«èª­ã¿å–られãŸè¡Œæ•°ã€‚statusãŒ`RunningOnAnotherReplica`ã®å ´åˆã¯åˆ©ç”¨ä¸å¯ã€‚ +- `read_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨ã®æ›´æ–°ä¸­ã«èª­ã¿å–られãŸãƒã‚¤ãƒˆæ•°ã€‚statusãŒ`RunningOnAnotherReplica`ã®å ´åˆã¯åˆ©ç”¨ä¸å¯ã€‚ +- `total_rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨ã®æ›´æ–°ã«å¿…è¦ãªè¡Œã®æŽ¨å®šç·æ•°ã€‚statusãŒ`RunningOnAnotherReplica`ã®å ´åˆã¯åˆ©ç”¨ä¸å¯ã€‚ +- `written_rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨ã®æ›´æ–°ä¸­ã«æ›¸ãè¾¼ã¾ã‚ŒãŸè¡Œæ•°ã€‚statusãŒ`RunningOnAnotherReplica`ã®å ´åˆã¯åˆ©ç”¨ä¸å¯ã€‚ +- `written_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨ã®æ›´æ–°ä¸­ã«æ›¸ãè¾¼ã¾ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã€‚statusãŒ`RunningOnAnotherReplica`ã®å ´åˆã¯åˆ©ç”¨ä¸å¯ã€‚ + +**例** + +```sql +SELECT + database, + view, + status, + last_refresh_result, + last_refresh_time, + next_refresh_time +FROM system.view_refreshes + +┌─database─┬─view───────────────────────┬─status────┬─last_refresh_result─┬───last_refresh_time─┬───next_refresh_time─┠+│ default │ hello_documentation_reader │ Scheduled │ Finished │ 2023-12-01 01:24:00 │ 2023-12-01 01:25:00 │ +└──────────┴────────────────────────────┴───────────┴─────────────────────┴─────────────────────┴─────────────────────┘ +``` + diff --git a/docs/ja/operations/system-tables/workloads.md b/docs/ja/operations/system-tables/workloads.md new file mode 100644 index 00000000000..0ad848a649f --- /dev/null +++ b/docs/ja/operations/system-tables/workloads.md @@ -0,0 +1,40 @@ +--- +slug: /ja/operations/system-tables/workloads +--- +# workloads + +ローカルサーãƒãƒ¼ã«å­˜åœ¨ã™ã‚‹[ワークロード](/docs/ja/operations/workload-scheduling.md#workload_entity_storage)ã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€å„ワークロードã”ã¨ã«è¡ŒãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +例: + +``` sql +SELECT * +FROM system.workloads +FORMAT Vertical +``` + +``` text +Row 1: +────── +name: production +parent: all +create_query: CREATE WORKLOAD production IN `all` SETTINGS weight = 9 + +Row 2: +────── +name: development +parent: all +create_query: CREATE WORKLOAD development IN `all` + +Row 3: +────── +name: all +parent: +create_query: CREATE WORKLOAD `all` +``` + +カラム: + +- `name` (`String`) - ワークロードå。 +- `parent` (`String`) - 親ワークロードå。 +- `create_query` (`String`) - ワークロードã®å®šç¾©ã€‚ diff --git a/docs/ja/operations/system-tables/zookeeper.md b/docs/ja/operations/system-tables/zookeeper.md new file mode 100644 index 00000000000..df2080e93ba --- /dev/null +++ b/docs/ja/operations/system-tables/zookeeper.md @@ -0,0 +1,72 @@ +--- +slug: /ja/operations/system-tables/zookeeper +--- +# zookeeper + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ClickHouse Keeper ã¾ãŸã¯ ZooKeeper ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„é™ã‚Šå­˜åœ¨ã—ã¾ã›ã‚“。`system.zookeeper` テーブルã¯ã€configã§å®šç¾©ã•ã‚ŒãŸ Keeper クラスターã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’公開ã—ã¾ã™ã€‚以下ã«ç¤ºã™ã‚ˆã†ã«ã€ã‚¯ã‚¨ãƒªã«ã¯ `WHERE` æ¡é …㧠`path =` æ¡ä»¶ã¾ãŸã¯ `path IN` æ¡ä»¶ã‚’設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ãŸã„å­ãƒŽãƒ¼ãƒ‰ã®ãƒ‘スã«å¯¾å¿œã—ã¾ã™ã€‚ + +クエリ `SELECT * FROM system.zookeeper WHERE path = '/clickhouse'` ã¯ã€`/clickhouse` ノードã®ã™ã¹ã¦ã®å­ã«é–¢ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’出力ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ«ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã«å¯¾ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’出力ã™ã‚‹ã«ã¯ã€`path = '/'` ã¨æ›¸ãã¾ã™ã€‚`path` ã§æŒ‡å®šã—ãŸãƒ‘スãŒå­˜åœ¨ã—ãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +クエリ `SELECT * FROM system.zookeeper WHERE path IN ('/', '/clickhouse')` ã¯ã€`/` 㨠`/clickhouse` ノードã®ã™ã¹ã¦ã®å­ã«å¯¾ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’出力ã—ã¾ã™ã€‚指定ã—㟠`path` コレクション内ã«å­˜åœ¨ã—ãªã„パスãŒã‚ã‚‹å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€è¤‡æ•°ã® Keeper パス クエリを実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +カラム: + +- `name` (String) — ノードã®åå‰ã€‚ +- `path` (String) — ノードã¸ã®ãƒ‘ス。 +- `value` (String) — ノードã®å€¤ã€‚ +- `dataLength` (Int32) — 値ã®ã‚µã‚¤ã‚ºã€‚ +- `numChildren` (Int32) — å­å­«ã®æ•°ã€‚ +- `czxid` (Int64) — ノードを作æˆã—ãŸãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®ID。 +- `mzxid` (Int64) — 最後ã«ãƒŽãƒ¼ãƒ‰ã‚’変更ã—ãŸãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®ID。 +- `pzxid` (Int64) — 最後ã«å­å­«ã‚’削除ã¾ãŸã¯è¿½åŠ ã—ãŸãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®ID。 +- `ctime` (DateTime) — ノード作æˆã®æ™‚間。 +- `mtime` (DateTime) — ノードã®æœ€å¾Œã®å¤‰æ›´æ™‚間。 +- `version` (Int32) — ノードã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³: ノードãŒå¤‰æ›´ã•ã‚ŒãŸå›žæ•°ã€‚ +- `cversion` (Int32) — 追加ã¾ãŸã¯å‰Šé™¤ã•ã‚ŒãŸå­å­«ã®æ•°ã€‚ +- `aversion` (Int32) — ACLã®å¤‰æ›´å›žæ•°ã€‚ +- `ephemeralOwner` (Int64) — 一時ノードã®å ´åˆã€ã“ã®ãƒŽãƒ¼ãƒ‰ã‚’所有ã™ã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®ID。 + +例: + +``` sql +SELECT * +FROM system.zookeeper +WHERE path = '/clickhouse/tables/01-08/visits/replicas' +FORMAT Vertical +``` + +``` text +è¡Œ 1: +────── +name: example01-08-1 +value: +czxid: 932998691229 +mzxid: 932998691229 +ctime: 2015-03-27 16:49:51 +mtime: 2015-03-27 16:49:51 +version: 0 +cversion: 47 +aversion: 0 +ephemeralOwner: 0 +dataLength: 0 +numChildren: 7 +pzxid: 987021031383 +path: /clickhouse/tables/01-08/visits/replicas + +è¡Œ 2: +────── +name: example01-08-2 +value: +czxid: 933002738135 +mzxid: 933002738135 +ctime: 2015-03-27 16:57:01 +mtime: 2015-03-27 16:57:01 +version: 0 +cversion: 37 +aversion: 0 +ephemeralOwner: 0 +dataLength: 0 +numChildren: 7 +pzxid: 987021252247 +path: /clickhouse/tables/01-08/visits/replicas +``` diff --git a/docs/ja/operations/system-tables/zookeeper_connection.md b/docs/ja/operations/system-tables/zookeeper_connection.md new file mode 100644 index 00000000000..d2dabec2121 --- /dev/null +++ b/docs/ja/operations/system-tables/zookeeper_connection.md @@ -0,0 +1,31 @@ +--- +slug: /ja/operations/system-tables/zookeeper_connection +--- +# zookeeper_connection + +ZooKeeperãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯å­˜åœ¨ã—ã¾ã›ã‚“。`system.zookeeper_connection`テーブルã¯ã€ZooKeeper(補助ZooKeeperã‚’å«ã‚€ï¼‰ã¸ã®ç¾åœ¨ã®æŽ¥ç¶šã‚’表示ã—ã¾ã™ã€‚å„è¡Œã¯1ã¤ã®æŽ¥ç¶šã«é–¢ã™ã‚‹æƒ…報を示ã—ã¾ã™ã€‚ + +カラム: + +- `name` ([String](../../sql-reference/data-types/string.md)) — ZooKeeperクラスタã®åå‰ã€‚ +- `host` ([String](../../sql-reference/data-types/string.md)) — ClickHouseãŒæŽ¥ç¶šã—ãŸZooKeeperノードã®ãƒ›ã‚¹ãƒˆå/IP。 +- `port` ([String](../../sql-reference/data-types/string.md)) — ClickHouseãŒæŽ¥ç¶šã—ãŸZooKeeperノードã®ãƒãƒ¼ãƒˆã€‚ +- `index` ([UInt8](../../sql-reference/data-types/int-uint.md)) — ClickHouseãŒæŽ¥ç¶šã—ãŸZooKeeperノードã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚インデックスã¯ZooKeeperã®è¨­å®šã‹ã‚‰ã®ã‚‚ã®ã§ã™ã€‚ +- `connected_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — 接続ãŒç¢ºç«‹ã•ã‚ŒãŸæ™‚間。 +- `session_uptime_elapsed_seconds` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 接続ãŒç¢ºç«‹ã•ã‚Œã¦ã‹ã‚‰çµŒéŽã—ãŸç§’数。 +- `is_expired` ([UInt8](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨ã®æŽ¥ç¶šãŒæœŸé™åˆ‡ã‚Œã‹ã©ã†ã‹ã€‚ +- `keeper_api_version` ([String](../../sql-reference/data-types/string.md)) — Keeper APIã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +- `client_id` ([UInt64](../../sql-reference/data-types/int-uint.md)) — 接続ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ID。 +- `xid` ([Int32](../../sql-reference/data-types/int-uint.md)) — ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®Xid。 + +例: + +``` sql +SELECT * FROM system.zookeeper_connection; +``` + +``` text +┌─name────┬─host──────┬─port─┬─index─┬──────connected_time─┬─session_uptime_elapsed_seconds─┬─is_expired─┬─keeper_api_version─┬─client_id─┠+│ default │ 127.0.0.1 │ 9181 │ 0 │ 2023-06-15 14:36:01 │ 3058 │ 0 │ 3 │ 5 │ +└─────────┴───────────┴──────┴───────┴─────────────────────┴────────────────────────────────┴────────────┴────────────────────┴───────────┘ +``` diff --git a/docs/ja/operations/system-tables/zookeeper_log.md b/docs/ja/operations/system-tables/zookeeper_log.md new file mode 100644 index 00000000000..c8f01aede25 --- /dev/null +++ b/docs/ja/operations/system-tables/zookeeper_log.md @@ -0,0 +1,134 @@ +--- +slug: /ja/operations/system-tables/zookeeper_log +--- +# zookeeper_log + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ZooKeeperサーãƒãƒ¼ã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ãƒ‘ラメーターã¨ãã“ã‹ã‚‰ã®å¿œç­”ã«é–¢ã™ã‚‹æƒ…報をå«ã‚“ã§ã„ã¾ã™ã€‚ + +リクエストã®å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒ‘ラメーターãŒã‚るカラムã®ã¿ãŒå¡«ã‚られã€æ®‹ã‚Šã®ã‚«ãƒ©ãƒ ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼ˆ`0` ã¾ãŸã¯ `NULL`)ã§åŸ‹ã‚られã¾ã™ã€‚応答ãŒåˆ°ç€ã™ã‚‹ã¨ã€å¿œç­”ã®ãƒ‡ãƒ¼ã‚¿ãŒä»–ã®ã‚«ãƒ©ãƒ ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +リクエストパラメーターをæŒã¤ã‚«ãƒ©ãƒ : + +- `hostname` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) — クエリを実行ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå。 +- `type` ([Enum](../../sql-reference/data-types/enum.md)) — ZooKeeperクライアントã®ã‚¤ãƒ™ãƒ³ãƒˆã‚¿ã‚¤ãƒ—。以下ã®å€¤ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™: + - `Request` — リクエストãŒé€ä¿¡ã•ã‚Œã¾ã—ãŸã€‚ + - `Response` — 応答ãŒå—ä¿¡ã•ã‚Œã¾ã—ãŸã€‚ + - `Finalize` — 接続ãŒå¤±ã‚ã‚Œã€å¿œç­”ãŒå—ä¿¡ã•ã‚Œã¾ã›ã‚“ã§ã—ãŸã€‚ +- `event_date` ([Date](../../sql-reference/data-types/date.md)) — イベントãŒç™ºç”Ÿã—ãŸæ—¥ä»˜ã€‚ +- `event_time` ([DateTime64](../../sql-reference/data-types/datetime64.md)) — イベントãŒç™ºç”Ÿã—ãŸæ—¥æ™‚。 +- `address` ([IPv6](../../sql-reference/data-types/ipv6.md)) — リクエストを行ã£ãŸZooKeeperサーãƒãƒ¼ã®IPアドレス。 +- `port` ([UInt16](../../sql-reference/data-types/int-uint.md)) — リクエストを行ã£ãŸZooKeeperサーãƒãƒ¼ã®ãƒãƒ¼ãƒˆã€‚ +- `session_id` ([Int64](../../sql-reference/data-types/int-uint.md)) — ZooKeeperサーãƒãƒ¼ãŒæŽ¥ç¶šã”ã¨ã«è¨­å®šã™ã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³ID。 +- `xid` ([Int32](../../sql-reference/data-types/int-uint.md)) — セッション内ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ID。通常ã¯é€£ç¶šã—ãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆç•ªå·ã§ã™ã€‚リクエスト行ã¨å¯¾å¿œã™ã‚‹ `response`/`finalize` è¡Œã§åŒã˜ã€‚ +- `has_watch` ([UInt8](../../sql-reference/data-types/int-uint.md)) — [watch](https://zookeeper.apache.org/doc/r3.3.3/zookeeperProgrammers.html#ch_zkWatches)ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã€‚ +- `op_num` ([Enum](../../sql-reference/data-types/enum.md)) — リクエストã¾ãŸã¯å¿œç­”ã®ã‚¿ã‚¤ãƒ—。 +- `path` ([String](../../sql-reference/data-types/string.md)) — リクエストã§æŒ‡å®šã•ã‚ŒãŸZooKeeperノードã®ãƒ‘スã€ã¾ãŸã¯ãƒ‘スã®æŒ‡å®šãŒä¸è¦ãªãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å ´åˆã¯ç©ºæ–‡å­—列。 +- `data` ([String](../../sql-reference/data-types/string.md)) — ZooKeeperノードã¸ã®ãƒ‡ãƒ¼ã‚¿ï¼ˆ`SET`ãŠã‚ˆã³`CREATE`リクエストã®å ´åˆã¯æ›¸ã込もã†ã¨ã—ãŸãƒ‡ãƒ¼ã‚¿ã€`GET`リクエストã¸ã®å¿œç­”ã®å ´åˆã¯èª­ã¿å–られãŸãƒ‡ãƒ¼ã‚¿ï¼‰ã¾ãŸã¯ç©ºæ–‡å­—列。 +- `is_ephemeral` ([UInt8](../../sql-reference/data-types/int-uint.md)) — ZooKeeperノードãŒ[ephemeral](https://zookeeper.apache.org/doc/r3.3.3/zookeeperProgrammers.html#Ephemeral+Nodes)ã¨ã—ã¦ä½œæˆã•ã‚Œã¦ã„ã‚‹ã‹ã€‚ +- `is_sequential` ([UInt8](../../sql-reference/data-types/int-uint.md)) — ZooKeeperノードãŒ[sequential](https://zookeeper.apache.org/doc/r3.3.3/zookeeperProgrammers.html#Sequence+Nodes+--+Unique+Naming)ã¨ã—ã¦ä½œæˆã•ã‚Œã¦ã„ã‚‹ã‹ã€‚ +- `version` ([Nullable(Int32)](../../sql-reference/data-types/nullable.md)) — リクエスト実行時ã«æœŸå¾…ã•ã‚Œã‚‹ZooKeeperノードã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ã“ã®æƒ…å ±ã¯`CHECK`, `SET`, `REMOVE`リクエストã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ï¼ˆãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ãƒã‚§ãƒƒã‚¯ã—ãªã„å ´åˆã¯`-1`ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒã‚§ãƒƒã‚¯ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ä»–ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å ´åˆã¯ `NULL`)。 +- `requests_size` ([UInt32](../../sql-reference/data-types/int-uint.md)) — マルãƒãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å«ã¾ã‚Œã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æ•°ï¼ˆè¤‡æ•°ã®é€£ç¶šã—ãŸé€šå¸¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‹ã‚‰æ§‹æˆã•ã‚Œã€ã“れらを原å­çš„ã«å®Ÿè¡Œã™ã‚‹ç‰¹åˆ¥ãªãƒªã‚¯ã‚¨ã‚¹ãƒˆï¼‰ã€‚マルãƒãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å«ã¾ã‚Œã‚‹ã™ã¹ã¦ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯åŒã˜ `xid` ã‚’æŒã¡ã¾ã™ã€‚ +- `request_idx` ([UInt32](../../sql-reference/data-types/int-uint.md)) — マルãƒãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å«ã¾ã‚Œã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ç•ªå·ï¼ˆãƒžãƒ«ãƒãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å ´åˆ `0`ã€ãã®å¾Œã¯é †ç•ªã«`1`ã‹ã‚‰ï¼‰ã€‚ + +リクエスト応答パラメータをæŒã¤ã‚«ãƒ©ãƒ : + +- `zxid` ([Int64](../../sql-reference/data-types/int-uint.md)) — ZooKeeperトランザクションID。正常ã«å®Ÿè¡Œã•ã‚ŒãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å¿œç­”ã—ã¦ZooKeeperサーãƒãƒ¼ã‹ã‚‰ç™ºè¡Œã•ã‚ŒãŸã‚·ãƒªã‚¢ãƒ«ç•ªå·ï¼ˆãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒå®Ÿè¡Œã•ã‚Œãªã‹ã£ãŸ/エラーãŒè¿”ã•ã‚ŒãŸ/クライアントãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å®Ÿè¡Œã‚’知ã£ã¦ã„ãªã„å ´åˆã¯`0`)。 +- `error` ([Nullable(Enum)](../../sql-reference/data-types/nullable.md)) — エラーコード。多ãã®å€¤ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ãŒã€ä»¥ä¸‹ã¯ãã®ä¸€éƒ¨ã§ã™: + - `ZOK` — リクエストã¯æ­£å¸¸ã«å®Ÿè¡Œã•ã‚Œã¾ã—ãŸã€‚ + - `ZCONNECTIONLOSS` — 接続ãŒå¤±ã‚ã‚Œã¾ã—ãŸã€‚ + - `ZOPERATIONTIMEOUT` — リクエスト実行ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãŒåˆ‡ã‚Œã¾ã—ãŸã€‚ + - `ZSESSIONEXPIRED` — セッションãŒå¤±åŠ¹ã—ã¾ã—ãŸã€‚ + - `NULL` — リクエストã¯å®Œäº†ã—ã¾ã—ãŸã€‚ +- `watch_type` ([Nullable(Enum)](../../sql-reference/data-types/nullable.md)) — `watch`イベントã®ã‚¿ã‚¤ãƒ—(`op_num`ãŒ`Watch`ã®å¿œç­”ã®å ´åˆï¼‰ã€ãれ以外ã®å¿œç­”ã®å ´åˆï¼š`NULL`。 +- `watch_state` ([Nullable(Enum)](../../sql-reference/data-types/nullable.md)) — `watch`イベントã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ï¼ˆ`op_num`ãŒ`Watch`ã®å¿œç­”ã®å ´åˆï¼‰ã€ãれ以外ã®å¿œç­”ã®å ´åˆï¼š`NULL`。 +- `path_created` ([String](../../sql-reference/data-types/string.md)) — 作æˆã•ã‚ŒãŸZooKeeperノードã®ãƒ‘ス(`CREATE`リクエストã¸ã®å¿œç­”ã®å ´åˆï¼‰ã€ãƒŽãƒ¼ãƒ‰ãŒ`sequential`ã¨ã—ã¦ä½œæˆã•ã‚ŒãŸå ´åˆã¯`path`ã¨ç•°ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +- `stat_czxid` ([Int64](../../sql-reference/data-types/int-uint.md)) — ã“ã®ZooKeeperノードã®ä½œæˆã‚’引ãèµ·ã“ã—ãŸå¤‰æ›´ã®`zxid`。 +- `stat_mzxid` ([Int64](../../sql-reference/data-types/int-uint.md)) — ã“ã®ZooKeeperノードã®æœ€å¾Œã®å¤‰æ›´ã‚’è¡Œã£ãŸ`zxid`。 +- `stat_pzxid` ([Int64](../../sql-reference/data-types/int-uint.md)) — ã“ã®ZooKeeperノードã®å­ã®æœ€å¾Œã®å¤‰æ›´ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ID。 +- `stat_version` ([Int32](../../sql-reference/data-types/int-uint.md)) — ã“ã®ZooKeeperノードã®ãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›´å›žæ•°ã€‚ +- `stat_cversion` ([Int32](../../sql-reference/data-types/int-uint.md)) — ã“ã®ZooKeeperノードã®å­ã®å¤‰æ›´å›žæ•°ã€‚ +- `stat_dataLength` ([Int32](../../sql-reference/data-types/int-uint.md)) — ã“ã®ZooKeeperノードã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®é•·ã•ã€‚ +- `stat_numChildren` ([Int32](../../sql-reference/data-types/int-uint.md)) — ã“ã®ZooKeeperノードã®å­ã®æ•°ã€‚ +- `children` ([Array(String)](../../sql-reference/data-types/array.md)) — å­ZooKeeperノードã®ãƒªã‚¹ãƒˆï¼ˆ`LIST`リクエストã¸ã®å¿œç­”ã®å ´åˆï¼‰ã€‚ + +**例** + +クエリ: + +``` sql +SELECT * FROM system.zookeeper_log WHERE (session_id = '106662742089334927') AND (xid = '10858') FORMAT Vertical; +``` + +çµæžœ: + +``` text +Row 1: +────── +hostname: clickhouse.eu-central1.internal +type: Request +event_date: 2021-08-09 +event_time: 2021-08-09 21:38:30.291792 +address: :: +port: 2181 +session_id: 106662742089334927 +xid: 10858 +has_watch: 1 +op_num: List +path: /clickhouse/task_queue/ddl +data: +is_ephemeral: 0 +is_sequential: 0 +version: á´ºáµá´¸á´¸ +requests_size: 0 +request_idx: 0 +zxid: 0 +error: á´ºáµá´¸á´¸ +watch_type: á´ºáµá´¸á´¸ +watch_state: á´ºáµá´¸á´¸ +path_created: +stat_czxid: 0 +stat_mzxid: 0 +stat_pzxid: 0 +stat_version: 0 +stat_cversion: 0 +stat_dataLength: 0 +stat_numChildren: 0 +children: [] + +Row 2: +────── +type: Response +event_date: 2021-08-09 +event_time: 2021-08-09 21:38:30.292086 +address: :: +port: 2181 +session_id: 106662742089334927 +xid: 10858 +has_watch: 1 +op_num: List +path: /clickhouse/task_queue/ddl +data: +is_ephemeral: 0 +is_sequential: 0 +version: á´ºáµá´¸á´¸ +requests_size: 0 +request_idx: 0 +zxid: 16926267 +error: ZOK +watch_type: á´ºáµá´¸á´¸ +watch_state: á´ºáµá´¸á´¸ +path_created: +stat_czxid: 16925469 +stat_mzxid: 16925469 +stat_pzxid: 16926179 +stat_version: 0 +stat_cversion: 7 +stat_dataLength: 0 +stat_numChildren: 7 +children: ['query-0000000006','query-0000000005','query-0000000004','query-0000000003','query-0000000002','query-0000000001','query-0000000000'] +``` + +**関連項目** + +- [ZooKeeper](../../operations/tips.md#zookeeper) +- [ZooKeeperガイド](https://zookeeper.apache.org/doc/r3.3.3/zookeeperProgrammers.html) diff --git a/docs/ja/operations/tips.md b/docs/ja/operations/tips.md new file mode 100644 index 00000000000..056cdb2f784 --- /dev/null +++ b/docs/ja/operations/tips.md @@ -0,0 +1,284 @@ +--- +slug: /ja/operations/tips +sidebar_position: 58 +sidebar_label: 使用推奨事項 +title: "使用推奨事項" +--- +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_automated.md'; + + + +## CPU スケーリングガãƒãƒŠãƒ¼ + +常㫠`performance` スケーリングガãƒãƒŠãƒ¼ã‚’使用ã—ã¦ãã ã•ã„。`on-demand` スケーリングガãƒãƒŠãƒ¼ã¯ã€å¸¸ã«é«˜ã„需è¦ã«å¯¾ã—ã¦ã¯ã‚‹ã‹ã«åŠ£ã£ã¦ã„ã¾ã™ã€‚ + +``` bash +$ echo 'performance' | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor +``` + +## CPU åˆ¶é™ {#cpu-limitations} + +プロセッサã¯éŽç†±ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚`dmesg` を使用ã—ã¦ã€CPUã®ã‚¯ãƒ­ãƒƒã‚¯ãƒ¬ãƒ¼ãƒˆãŒéŽç†±ã«ã‚ˆã‚Šåˆ¶é™ã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚ã“ã®åˆ¶é™ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼ãƒ¬ãƒ™ãƒ«ã§å¤–部ã‹ã‚‰è¨­å®šã•ã‚Œã‚‹ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ã€‚è² è·ä¸‹ã§ `turbostat` を使用ã—ã¦ç›£è¦–ã§ãã¾ã™ã€‚ + +## RAM {#ram} + +å°è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ï¼ˆåœ§ç¸®ã§ç´„200 GBã¾ã§ï¼‰ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã®å®¹é‡ã¨åŒã˜ãらã„ã®ãƒ¡ãƒ¢ãƒªã‚’使用ã™ã‚‹ã®ãŒæœ€é©ã§ã™ã€‚大è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã¨ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–(オンライン)クエリを処ç†ã™ã‚‹å ´åˆã¯ã€åˆç†çš„ãªé‡ã®RAM(128 GB以上)を使用ã—ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«ãƒ›ãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ã®ã‚µãƒ–セットをåŽã‚ã‚‹ã¹ãã§ã™ã€‚サーãƒãƒ¼ã”ã¨ã«ç´„50 TBã®ãƒ‡ãƒ¼ã‚¿ãƒœãƒªãƒ¥ãƒ¼ãƒ ã®å ´åˆã§ã‚‚ã€128 GBã®RAMを使用ã™ã‚‹ã¨ã€64 GBã¨æ¯”較ã—ã¦ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスãŒå¤§å¹…ã«å‘上ã—ã¾ã™ã€‚ + +オーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆã‚’無効ã«ã—ãªã„ã§ãã ã•ã„。`cat /proc/sys/vm/overcommit_memory` ã®å€¤ã¯0ã‹1ã§ã‚ã‚‹ã¹ãã§ã™ã€‚以下を実行ã—ã¾ã™ã€‚ + +``` bash +$ echo 0 | sudo tee /proc/sys/vm/overcommit_memory +``` + +メモリ管ç†ã«ãŠã‘るカーãƒãƒ«ã§ã®æ™‚間を監視ã™ã‚‹ã«ã¯ã€ `perf top` を使用ã—ã¾ã™ã€‚永続的ãªå¤§ããªãƒšãƒ¼ã‚¸ã‚’割り当ã¦ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +### 16GB未満ã®RAMを使用ã™ã‚‹å ´åˆ + +推奨ã•ã‚Œã‚‹RAMã®é‡ã¯32GB以上ã§ã™ã€‚ + +システムãŒ16GB未満ã®RAMã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šãŒã“ã®ãƒ¡ãƒ¢ãƒªé‡ã«ä¸€è‡´ã—ãªã„ãŸã‚ã€æ§˜ã€…ãªãƒ¡ãƒ¢ãƒªã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚最å°ã§2GBã»ã©ã®RAMã‚’æŒã¤ã‚·ã‚¹ãƒ†ãƒ ã§ã‚‚ClickHouseを使用ã§ãã¾ã™ãŒã€ã“ã®ã‚ˆã†ãªã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã§ã¯è¿½åŠ ã®èª¿æ•´ãŒå¿…è¦ã§ã‚ã‚Šã€ä½Žé€Ÿã®ãƒ‡ãƒ¼ã‚¿å–ã‚Šè¾¼ã¿ã—ã‹è¡Œãˆã¾ã›ã‚“。 + +16GB未満ã®RAMã§ClickHouseを使用ã™ã‚‹å ´åˆã€æ¬¡ã‚’推奨ã—ã¾ã™ï¼š + +- `config.xml` 内ã®ãƒžãƒ¼ã‚¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ã‚µã‚¤ã‚ºã‚’下ã’ã¾ã™ã€‚ãã‚Œã¯500 MBã¾ã§ä¸‹ã’ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ã‚¼ãƒ­ã«è¨­å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- クエリ処ç†ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ•°ã‚’ `1` ã¾ã§ä¸‹ã’ã¾ã™ã€‚ +- `max_block_size` ã‚’ `8192` ã«ä¸‹ã’ã¾ã™ã€‚ `1024` ã¾ã§ä¸‹ã’ã¦ã‚‚実用的ã§ã™ã€‚ +- `max_download_threads` ã‚’ `1` ã«ä¸‹ã’ã¾ã™ã€‚ +- `input_format_parallel_parsing` 㨠`output_format_parallel_formatting` ã‚’ `0` ã«è¨­å®šã—ã¾ã™ã€‚ + +追加ã®æ³¨æ„事項: +- メモリアロケーターã«ã‚ˆã£ã¦ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸãƒ¡ãƒ¢ãƒªã‚’フラッシュã™ã‚‹ã«ã¯ã€ `SYSTEM JEMALLOC PURGE` コマンドを実行ã§ãã¾ã™ã€‚ +- メモリãŒå°‘ãªã„マシンã§S3ã‚„Kafkaã®çµ±åˆã‚’使用ã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。ã“れらã¯ãƒãƒƒãƒ•ã‚¡ã«å¤šãã®ãƒ¡ãƒ¢ãƒªã‚’å¿…è¦ã¨ã™ã‚‹ãŸã‚ã§ã™ã€‚ + +## ストレージサブシステム {#storage-subsystem} + +予算ãŒè¨±ã™ãªã‚‰ã€SSDを使ã£ã¦ãã ã•ã„。ãã†ã§ãªã„å ´åˆã¯HDDを使用ã—ã¾ã™ã€‚SATA HDDs 7200 RPMã§å分ã§ã™ã€‚ + +ローカルãƒãƒ¼ãƒ‰ãƒ‰ãƒ©ã‚¤ãƒ–ã‚’æŒã¤å¤šæ•°ã®ã‚µãƒ¼ãƒãƒ¼ã‚’ã€ãƒ‡ã‚£ã‚¹ã‚¯ã‚·ã‚§ãƒ«ãƒ•ãŒä»˜ã„ã¦ã„ã‚‹å°‘æ•°ã®ã‚µãƒ¼ãƒãƒ¼ã‚ˆã‚Šå„ªå…ˆã—ã¦ãã ã•ã„。ãŸã ã—ã€ã¾ã‚Œã«ã‚¯ã‚¨ãƒªãŒå®Ÿè¡Œã•ã‚Œã‚‹ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã‚’ä¿å­˜ã™ã‚‹å ´åˆã¯ã€ã‚·ã‚§ãƒ«ãƒ•ã§ã‚‚å•é¡Œã‚ã‚Šã¾ã›ã‚“。 + +## RAID {#raid} + +HDDを使用ã™ã‚‹å ´åˆã€RAID-10ã€RAID-5ã€RAID-6ã€RAID-50ã§çµåˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚Linuxã®ãŸã‚ã«ã¯ã€ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢RAID(`mdadm`)ãŒã‚ˆã‚Šè‰¯ã„ã§ã™ã€‚RAID-10を作æˆã™ã‚‹å ´åˆã€`far` レイアウトをé¸æŠžã—ã¦ãã ã•ã„。予算ãŒè¨±ã™ãªã‚‰ã°ã€RAID-10ã‚’é¸ã‚“ã§ãã ã•ã„。 + +LVM自体(RAIDã‚„`mdadm`ãªã—)ã¯å•é¡Œã‚ã‚Šã¾ã›ã‚“ãŒã€ãã‚Œã¨çµ„ã¿åˆã‚ã›ã¦RAIDを作æˆã™ã‚‹ã“ã¨ã‚„ã€`mdadm`ã¨çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ã¯ã€ã‚ã¾ã‚ŠæŽ¢ã‚‰ã‚Œã¦ã„ãªã„é¸æŠžè‚¢ã§ã‚ã‚Šã€é–“é•ã£ãŸãƒãƒ£ãƒ³ã‚¯ã‚µã‚¤ã‚ºã®é¸æŠžã€ãƒãƒ£ãƒ³ã‚¯ã®æ•´åˆ—ã®ãƒŸã‚¹ã€é–“é•ã£ãŸRAIDタイプã®é¸æŠžã€ãƒ‡ã‚£ã‚¹ã‚¯ã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—を忘れるãªã©ã®é–“é•ã„ã®å¯èƒ½æ€§ãŒå¢—ã—ã¾ã™ã€‚LVMã®ä½¿ç”¨ã«è‡ªä¿¡ãŒã‚ã‚‹ãªã‚‰ã€ãれを使ã†ã“ã¨ã«å対ã™ã‚‹ç†ç”±ã¯ã‚ã‚Šã¾ã›ã‚“。 + +ã‚‚ã—4ã¤ä»¥ä¸Šã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€RAID-6(推奨)ã¾ãŸã¯RAID-50を使用ã—ã¦ãã ã•ã„。RAID-5を使用ã™ã‚‹ä»£ã‚ã‚Šã«RAID-6ã‚„RAID-50を使用ã™ã‚‹å ´åˆã€ã‚¹ãƒˆãƒ©ã‚¤ãƒ—キャッシュサイズを必ãšå¢—ã‚„ã—ã¦ãã ã•ã„。デフォルトã®å€¤ã¯é€šå¸¸æœ€é©ãªé¸æŠžã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +``` bash +$ echo 4096 | sudo tee /sys/block/md2/md/stripe_cache_size +``` + +正確ãªæ•°å€¤ã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®æ•°ã¨ãƒ–ロックサイズã‹ã‚‰æ¬¡ã®å¼ã‚’使ã£ã¦è¨ˆç®—ã—ã¾ã™ï¼š`2 * num_devices * chunk_size_in_bytes / 4096`。 + +ãŸã„ã¦ã„ã®RAID設定ã«å¯¾ã—ã¦64KBã®ãƒ–ロックサイズã§å分ã§ã™ã€‚å¹³å‡çš„ãªClickHouseサーãƒã®æ›¸ãè¾¼ã¿ã‚µã‚¤ã‚ºã¯ç´„1MB(1024KB)ãªã®ã§ã€æŽ¨å¥¨ã•ã‚Œã‚‹ã‚¹ãƒˆãƒ©ã‚¤ãƒ—サイズも1MBã§ã™ã€‚ブロックサイズã¯å¿…è¦ã«å¿œã˜ã¦æœ€é©åŒ–ã§ãã€éžãƒ‘リティディスクã®æ•°ã§1MBを割ã£ãŸå€¤ã«ã‚»ãƒƒãƒˆã—ã€å„書ãè¾¼ã¿ãŒå…¨ã¦ã®åˆ©ç”¨å¯èƒ½ãªéžãƒ‘リティディスクã«å¯¾ã—ã¦ä¸¦åˆ—化ã•ã‚Œã‚‹ã‚ˆã†ã«ã—ã¾ã™ã€‚ブロックサイズをå°ã•ã™ãŽãŸã‚Šå¤§ãã™ãŽãŸã‚Šã—ãªã„よã†ã«ã—ã¦ãã ã•ã„。 + +SSDã§RAID-0を使用ã§ãã¾ã™ã€‚RAIDã®ä½¿ç”¨ã«ã‹ã‹ã‚らãšã€ãƒ‡ãƒ¼ã‚¿ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã®ãŸã‚ã«å¸¸ã«ãƒ¬ãƒ—リケーションを使用ã—ã¦ãã ã•ã„。 + +HDDã§ã¯mq-deadlineã¾ãŸã¯CFQスケジューラをã€SSDã§ã¯noopã‚’é¸æŠžã—ã€â€˜readahead’設定を減らã•ãªã„ã§ãã ã•ã„。HDDã§ã¯æ›¸ãè¾¼ã¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’有効ã«ã—ã¦ãã ã•ã„。 + +NVMEã¨SSDディスクã«å¯¾ã—ã¦ã€OSã§[`fstrim`](https://en.wikipedia.org/wiki/Trim_(computing))ãŒæœ‰åŠ¹ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„(通常ã€cronjobã¾ãŸã¯systemdサービスを使用ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ï¼‰ã€‚ + +## ファイルシステム {#file-system} + +Ext4ãŒæœ€ã‚‚信頼性ã®ã‚るオプションã§ã™ã€‚マウントオプションã§`noatime`を設定ã—ã¾ã™ã€‚XFSも良好ã«å‹•ä½œã—ã¾ã™ã€‚ä»–ã®ã»ã¨ã‚“ã©ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚‚å•é¡Œãªã動作ã™ã‚‹ã¯ãšã§ã™ã€‚ + +ãƒãƒ¼ãƒ‰ãƒªãƒ³ã‚¯ãŒä¸è¶³ã—ã¦ã„ã‚‹ãŸã‚ã€FAT-32ã¨exFATã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +ClickHouseã¯ç‹¬è‡ªã«åœ§ç¸®ã‚’è¡Œã„ã€ãã‚ŒãŒã‚ˆã‚Šè‰¯ã„ãŸã‚ã€åœ§ç¸®ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚’使用ã—ãªã„ã§ãã ã•ã„。暗å·åŒ–ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚’使用ã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“ãŒã€ClickHouseã®çµ„ã¿è¾¼ã¿ã®æš—å·åŒ–を使用ã™ã‚‹ã“ã¨ãŒã‚ˆã‚Šæœ›ã¾ã—ã„ã§ã™ã€‚ + +ClickHouseã¯NFS上ã§ã‚‚動作ã—ã¾ã™ãŒã€ãã‚Œã¯æœ€è‰¯ã®ã‚¢ã‚¤ãƒ‡ã‚¢ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## Linuxカーãƒãƒ« {#linux-kernel} + +å¤ã„Linuxカーãƒãƒ«ã‚’使用ã—ãªã„ã§ãã ã•ã„。 + +## ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ {#network} + +IPv6を使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€ãƒ«ãƒ¼ãƒˆã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ã‚µã‚¤ã‚ºã‚’増やã—ã¦ãã ã•ã„。Linuxカーãƒãƒ«3.2以å‰ã«ã¯ã€IPv6実装ã«å¤šæ•°ã®å•é¡ŒãŒã‚ã‚Šã¾ã—ãŸã€‚ + +å¯èƒ½ã§ã‚ã‚Œã°å°‘ãªãã¨ã‚‚10 GBã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’使用ã—ã¦ãã ã•ã„。1 Gbも動作ã—ã¾ã™ãŒã€ãƒ†ãƒ©ãƒã‚¤ãƒˆå˜ä½ã®ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤ãƒ¬ãƒ—リカã®ãƒ‘ッãƒé©ç”¨ã‚„ã€å¤§é‡ã®ä¸­é–“データをæŒã¤åˆ†æ•£ã‚¯ã‚¨ãƒªã®å‡¦ç†ã§ã¯å¤§å¹…ã«åŠ£ã‚Šã¾ã™ã€‚ + +## Huge Pages {#huge-pages} + +å¤ã„Linuxカーãƒãƒ«ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€é€éŽçš„ãªå¤§ããªãƒšãƒ¼ã‚¸ã‚’無効ã«ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ã€ãƒ¡ãƒ¢ãƒªã‚¢ãƒ­ã‚±ãƒ¼ã‚¿ãƒ¼ã«å¹²æ¸‰ã—ã€ãƒ‘フォーマンスã®å¤§å¹…ãªä½Žä¸‹ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚æ–°ã—ã„Linuxカーãƒãƒ«ã§ã¯ã€é€éŽçš„ãªå¤§ããªãƒšãƒ¼ã‚¸ã¯å•é¡Œã‚ã‚Šã¾ã›ã‚“。 + +``` bash +$ echo 'madvise' | sudo tee /sys/kernel/mm/transparent_hugepage/enabled +``` + +é€éŽçš„ãªå¤§ããªãƒšãƒ¼ã‚¸è¨­å®šã‚’æ’ä¹…çš„ã«å¤‰æ›´ã—ãŸã„å ´åˆã¯ã€`/etc/default/grub`を編集ã—ã€`GRUB_CMDLINE_LINUX_DEFAULT`オプションã«`transparent_hugepage=madvise`を追加ã—ã¾ã™ï¼š + +```bash +$ GRUB_CMDLINE_LINUX_DEFAULT="transparent_hugepage=madvise ..." +``` + +ãã®å¾Œã€`sudo update-grub`コマンドを実行ã—ã€å†èµ·å‹•ã—ã¦æœ‰åŠ¹ã«ã—ã¾ã™ã€‚ + +## ãƒã‚¤ãƒ‘ーãƒã‚¤ã‚¶ãƒ¼è¨­å®š + +OpenStackを使用ã—ã¦ã„ã‚‹å ´åˆã€`nova.conf`ã«æ¬¡ã‚’設定ã—ã¾ã™ï¼š + +``` +cpu_mode=host-passthrough +``` + +libvirtを使用ã—ã¦ã„ã‚‹å ´åˆã€XML設定ã«æ¬¡ã‚’設定ã—ã¾ã™ï¼š + +``` + +``` + +ã“ã‚Œã¯ã€ClickHouseãŒ`cpuid`命令ã§æ­£ã—ã„情報をå–å¾—ã§ãるよã†ã«ã™ã‚‹ãŸã‚ã«é‡è¦ã§ã™ã€‚ãã†ã—ãªã„ã¨ã€ãƒã‚¤ãƒ‘ーãƒã‚¤ã‚¶ãƒ¼ãŒå¤ã„CPUモデルã§å‹•ä½œã—ã¦ã„ã‚‹ã¨`Illegal instruction`クラッシュãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## ClickHouse Keeperã¨ZooKeeper {#zookeeper} + +ClickHouseクラスタã®ZooKeeperã®ä»£ã‚ã‚Šã«ClickHouse Keeperを使用ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ [ClickHouse Keeper](../guides/sre/keeper/index.md) ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ZooKeeperを使ã„続ã‘ãŸã„å ´åˆã¯ã€ZooKeeperã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆ3.4.9以é™ï¼‰ã‚’使用ã™ã‚‹ã®ãŒæœ€é©ã§ã™ã€‚安定ã—ãŸLinuxディストリビューションã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯å¤ã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ç•°ãªã‚‹ZooKeeperクラスター間ã§ãƒ‡ãƒ¼ã‚¿ã‚’転é€ã™ã‚‹ãŸã‚ã®æ‰‹å‹•ã§æ›¸ã‹ã‚ŒãŸã‚¹ã‚¯ãƒªãƒ—トã¯æ±ºã—ã¦ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。çµæžœãŒé€æ¬¡ãƒŽãƒ¼ãƒ‰ã«å¯¾ã—ã¦æ­£ã—ãã‚ã‚Šã¾ã›ã‚“。åŒã˜ç†ç”±ã§â€œzkcopyâ€ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã‚‚使用ã—ãªã„ã§ãã ã•ã„:https://github.com/ksprojects/zkcopy/issues/15 + +既存ã®ZooKeeperクラスターを二ã¤ã«åˆ†å‰²ã—ãŸã„å ´åˆã¯ã€ãã®æ•°ã‚’増やã—ã¦ã‹ã‚‰äºŒã¤ã®ç‹¬ç«‹ã—ãŸã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã¨ã—ã¦å†æ§‹æˆã™ã‚‹ã®ãŒæ­£ã—ã„方法ã§ã™ã€‚ + +テスト環境ã¾ãŸã¯ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆãƒ¬ãƒ¼ãƒˆãŒä½Žã„環境ã§ã¯ã€ClickHouseã¨åŒã˜ã‚µãƒ¼ãƒãƒ¼ã§ClickHouse Keeperを実行ã§ãã¾ã™ã€‚生産環境ã§ã¯ClickHouseã¨ZooKeeper/Keeperã®ãŸã‚ã«åˆ¥ã€…ã®ã‚µãƒ¼ãƒãƒ¼ã‚’使用ã™ã‚‹ã‹ã€ClickHouseファイルã¨Keeperファイルを別々ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«é…ç½®ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ZooKeeper/Keeperã¯ãƒ‡ã‚£ã‚¹ã‚¯ã®å¾…ã¡æ™‚é–“ã«éžå¸¸ã«æ•æ„Ÿã§ã‚ã‚Šã€ClickHouseãŒä½¿ç”¨å¯èƒ½ãªã‚·ã‚¹ãƒ†ãƒ ãƒªã‚½ãƒ¼ã‚¹ã®å…¨ã¦ã‚’活用ã™ã‚‹å ´åˆãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ + +ZooKeeperã®ã‚¢ãƒ³ã‚µãƒ³ãƒ–ルã«ã‚ªãƒ–ザーãƒãƒ¼ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ãŒã€ClickHouseサーãƒãƒ¼ã¯ã‚ªãƒ–ザーãƒãƒ¼ã¨å¯¾è©±ã—ãªã„ã§ãã ã•ã„。 + +`minSessionTimeout`設定を変更ã—ãªã„ã§ãã ã•ã„。大ããªå€¤ã¯ClickHouseã®å†èµ·å‹•ã®å®‰å®šæ€§ã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +デフォルト設定ã§ã¯ã€ZooKeeperã¯æ™‚é™çˆ†å¼¾ã§ã™ï¼š + +> ZooKeeperサーãƒãƒ¼ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šã®ã¾ã¾ã ã¨å¤ã„スナップショットやログã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’削除ã—ãªã„ãŸã‚(`autopurge`å‚照)ã€ã“ã®è²¬ä»»ã¯é‹ç”¨è€…ã«ã‚ã‚Šã¾ã™ã€‚ + +ã“ã®çˆ†å¼¾ã‚’解除ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +以下ã®ZooKeeper(3.5.1)設定ã¯å¤§è¦æ¨¡ãªç”Ÿç”£ç’°å¢ƒã§ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ï¼š + +zoo.cfg: + +``` bash +# http://hadoop.apache.org/zookeeper/docs/current/zookeeperAdmin.html + +# å„ティックã®ãƒŸãƒªç§’æ•° +tickTime=2000 +# åˆæœŸåŒæœŸãƒ•ã‚§ãƒ¼ã‚ºã«ã‹ã‹ã‚‹ã“ã¨ãŒã§ãるティック数 +# ã“ã®å€¤ã¯ãã‚Œã»ã©å‹•æ©Ÿä»˜ã‘られã¦ã„ãªã„ +initLimit=300 +# è¦æ±‚ã‚’é€ä¿¡ã—ã¦å¿œç­”ã‚’å—ã‘å–ã‚‹ã¾ã§ã«ã‹ã‹ã‚‹ã“ã¨ãŒã§ãるティックã®æ•° +syncLimit=10 + +maxClientCnxns=2000 + +# クライアントãŒè¦æ±‚ã™ã‚‹ã“ã¨ãŒã§ãã€ã‚µãƒ¼ãƒãƒ¼ãŒå—ã‘入れるå¯èƒ½æ€§ãŒã‚る最大値ã§ã™ã€‚ +# サーãƒãƒ¼ã§é«˜ã„maxSessionTimeoutã‚’æŒã¤ã“ã¨ã¯ã€é«˜ã„セッションタイムアウトã§å‹•ä½œã—ãŸã„å ´åˆã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒä½¿ç”¨ã§ãるよã†ã«ã™ã‚‹ãŸã‚ã«å•é¡Œã‚ã‚Šã¾ã›ã‚“。 +# ãŸã ã—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚’30秒(ClickHouseã®è¨­å®šã§session_timeout_msã§å¤‰æ›´å¯èƒ½ï¼‰ã«è¦æ±‚ã—ã¾ã™ã€‚ +maxSessionTimeout=60000000 +# スナップショットãŒä¿å­˜ã•ã‚Œã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã€‚ +dataDir=/opt/zookeeper/{{ '{{' }} cluster['name'] {{ '}}' }}/data +# パフォーマンスå‘上ã®ãŸã‚ã«dataLogDirを別ã®ç‰©ç†ãƒ‡ã‚£ã‚¹ã‚¯ã«é…ç½®ã—ã¾ã™ +dataLogDir=/opt/zookeeper/{{ '{{' }} cluster['name'] {{ '}}' }}/logs + +autopurge.snapRetainCount=10 +autopurge.purgeInterval=1 + +# シークをé¿ã‘ã‚‹ãŸã‚ã«ã€ZooKeeperã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒ—レアロケーションサイズキロãƒã‚¤ãƒˆå˜ä½ã§ã‚¹ãƒšãƒ¼ã‚¹ã‚’確ä¿ã—ã¾ã™ã€‚ +# デフォルトã®ãƒ–ロックサイズã¯64Mã§ã™ã€‚ブロックサイズを変更ã™ã‚‹ä¸€ã¤ã®ç†ç”±ã¯ã€ã‚¹ãƒŠãƒƒãƒ—ショットãŒã‚ˆã‚Šé »ç¹ã«è¡Œã‚れる場åˆã«ãƒ–ロックサイズを減らã™ã“ã¨ã§ã™ã€‚(snapCountã‚‚å‚照) +preAllocSize=131072 + +# クライアントã¯ã€ç‰¹ã«å¤šãã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã„ã‚‹å ´åˆã€ZooKeeperãŒå‡¦ç†ã§ãる速度よりも速ãリクエストをæ出ã§ãã¾ã™ã€‚ +# メモリãŒè¶³ã‚Šãªããªã‚‹ã®ã‚’防ããŸã‚ã«ã€ã‚·ã‚¹ãƒ†ãƒ ã®ã‚°ãƒ­ãƒ¼ãƒãƒ«å‡ºé¡˜åˆ¶é™ã«å¿œã˜ã¦ã€ã‚·ã‚¹ãƒ†ãƒ ã§ã®æœªå‡¦ç†ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒã‚°ãƒ­ãƒ¼ãƒãƒ«å‡ºé¡˜åˆ¶é™ã‚’超ãˆãªã„よã†ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’制é™ã—ã¾ã™ã€‚ +# デフォルトã®åˆ¶é™ã¯1000ã§ã™ã€‚ +# globalOutstandingLimit=1000 + +# ZooKeeperã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’トランザクションログã«è¨˜éŒ²ã—ã¾ã™ã€‚ +# snapCountトランザクションãŒãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ã¨ã‚¹ãƒŠãƒƒãƒ—ショットãŒå§‹ã¾ã‚Šã€æ–°ã—ã„トランザクションログファイルãŒå§‹ã¾ã‚Šã¾ã™ã€‚デフォルトã®snapCountã¯100000ã§ã™ã€‚ +snapCount=3000000 + +# ã“ã®ã‚ªãƒ—ションãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯traceFile.year.month.dayã¨ã„ã†åå‰ã®ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒ­ã‚°ã•ã‚Œã¾ã™ã€‚ +#traceFile= + +# リーダーã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆæŽ¥ç¶šã‚’å—ã‘入れã¾ã™ã€‚デフォルト値ã¯ã€Œyesã€ã§ã™ã€‚リーダーマシンã¯æ›´æ–°ã‚’調整ã—ã¾ã™ã€‚ +# å°‘ã—ã®èª­ã¿å–りスループットã®çŠ ç‰²ã§é«˜ã„更新スループットをå–å¾—ã™ã‚‹ãŸã‚ã«ã€ãƒªãƒ¼ãƒ€ãƒ¼ã‚’クライアントをå—ã‘入れãšã€èª¿æ•´ã«é›†ä¸­ã™ã‚‹ã‚ˆã†ã«æ§‹æˆã§ãã¾ã™ã€‚ +leaderServes=yes + +standaloneEnabled=false +dynamicConfigFile=/etc/zookeeper-{{ '{{' }} cluster['name'] {{ '}}' }}/conf/zoo.cfg.dynamic +``` + +Java ãƒãƒ¼ã‚¸ãƒ§ãƒ³: + +``` text +openjdk 11.0.5-shenandoah 2019-10-15 +OpenJDK Runtime Environment (build 11.0.5-shenandoah+10-adhoc.heretic.src) +OpenJDK 64-Bit Server VM (build 11.0.5-shenandoah+10-adhoc.heretic.src, mixed mode) +``` + +JVM パラメータ: + +``` bash +NAME=zookeeper-{{ '{{' }} cluster['name'] {{ '}}' }} +ZOOCFGDIR=/etc/$NAME/conf + +# TODO this is really ugly +# How to find out, which jars are needed? +# seems, that log4j requires the log4j.properties file to be in the classpath +CLASSPATH="$ZOOCFGDIR:/usr/build/classes:/usr/build/lib/*.jar:/usr/share/zookeeper-3.6.2/lib/audience-annotations-0.5.0.jar:/usr/share/zookeeper-3.6.2/lib/commons-cli-1.2.jar:/usr/share/zookeeper-3.6.2/lib/commons-lang-2.6.jar:/usr/share/zookeeper-3.6.2/lib/jackson-annotations-2.10.3.jar:/usr/share/zookeeper-3.6.2/lib/jackson-core-2.10.3.jar:/usr/share/zookeeper-3.6.2/lib/jackson-databind-2.10.3.jar:/usr/share/zookeeper-3.6.2/lib/javax.servlet-api-3.1.0.jar:/usr/share/zookeeper-3.6.2/lib/jetty-http-9.4.24.v20191120.jar:/usr/share/zookeeper-3.6.2/lib/jetty-io-9.4.24.v20191120.jar:/usr/share/zookeeper-3.6.2/lib/jetty-security-9.4.24.v20191120.jar:/usr/share/zookeeper-3.6.2/lib/jetty-server-9.4.24.v20191120.jar:/usr/share/zookeeper-3.6.2/lib/jetty-servlet-9.4.24.v20191120.jar:/usr/share/zookeeper-3.6.2/lib/jetty-util-9.4.24.v20191120.jar:/usr/share/zookeeper-3.6.2/lib/jline-2.14.6.jar:/usr/share/zookeeper-3.6.2/lib/json-simple-1.1.1.jar:/usr/share/zookeeper-3.6.2/lib/log4j-1.2.17.jar:/usr/share/zookeeper-3.6.2/lib/metrics-core-3.2.5.jar:/usr/share/zookeeper-3.6.2/lib/netty-buffer-4.1.50.Final.jar:/usr/share/zookeeper-3.6.2/lib/netty-codec-4.1.50.Final.jar:/usr/share/zookeeper-3.6.2/lib/netty-common-4.1.50.Final.jar:/usr/share/zookeeper-3.6.2/lib/netty-handler-4.1.50.Final.jar:/usr/share/zookeeper-3.6.2/lib/netty-resolver-4.1.50.Final.jar:/usr/share/zookeeper-3.6.2/lib/netty-transport-4.1.50.Final.jar:/usr/share/zookeeper-3.6.2/lib/netty-transport-native-epoll-4.1.50.Final.jar:/usr/share/zookeeper-3.6.2/lib/netty-transport-native-unix-common-4.1.50.Final.jar:/usr/share/zookeeper-3.6.2/lib/simpleclient-0.6.0.jar:/usr/share/zookeeper-3.6.2/lib/simpleclient_common-0.6.0.jar:/usr/share/zookeeper-3.6.2/lib/simpleclient_hotspot-0.6.0.jar:/usr/share/zookeeper-3.6.2/lib/simpleclient_servlet-0.6.0.jar:/usr/share/zookeeper-3.6.2/lib/slf4j-api-1.7.25.jar:/usr/share/zookeeper-3.6.2/lib/slf4j-log4j12-1.7.25.jar:/usr/share/zookeeper-3.6.2/lib/snappy-java-1.1.7.jar:/usr/share/zookeeper-3.6.2/lib/zookeeper-3.6.2.jar:/usr/share/zookeeper-3.6.2/lib/zookeeper-jute-3.6.2.jar:/usr/share/zookeeper-3.6.2/lib/zookeeper-prometheus-metrics-3.6.2.jar:/usr/share/zookeeper-3.6.2/etc" + +ZOOCFG="$ZOOCFGDIR/zoo.cfg" +ZOO_LOG_DIR=/var/log/$NAME +USER=zookeeper +GROUP=zookeeper +PIDDIR=/var/run/$NAME +PIDFILE=$PIDDIR/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME +JAVA=/usr/local/jdk-11/bin/java +ZOOMAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain" +ZOO_LOG4J_PROP="INFO,ROLLINGFILE" +JMXLOCALONLY=false +JAVA_OPTS="-Xms{{ '{{' }} cluster.get('xms','128M') {{ '}}' }} \ + -Xmx{{ '{{' }} cluster.get('xmx','1G') {{ '}}' }} \ + -Xlog:safepoint,gc*=info,age*=debug:file=/var/log/$NAME/zookeeper-gc.log:time,level,tags:filecount=16,filesize=16M + -verbose:gc \ + -XX:+UseG1GC \ + -Djute.maxbuffer=8388608 \ + -XX:MaxGCPauseMillis=50" +``` + +Saltã®åˆæœŸåŒ–: + +``` text +description "zookeeper-{{ '{{' }} cluster['name'] {{ '}}' }} 中央集権的コーディãƒãƒ¼ã‚·ãƒ§ãƒ³ã‚µãƒ¼ãƒ“ス" + +start on runlevel [2345] +stop on runlevel [!2345] + +respawn + +limit nofile 8192 8192 + +pre-start script + [ -r "/etc/zookeeper-{{ '{{' }} cluster['name'] {{ '}}' }}/conf/environment" ] || exit 0 + . /etc/zookeeper-{{ '{{' }} cluster['name'] {{ '}}' }}/conf/environment + [ -d $ZOO_LOG_DIR ] || mkdir -p $ZOO_LOG_DIR + chown $USER:$GROUP $ZOO_LOG_DIR +end script + +script + . /etc/zookeeper-{{ '{{' }} cluster['name'] {{ '}}' }}/conf/environment + [ -r /etc/default/zookeeper ] && . /etc/default/zookeeper + if [ -z "$JMXDISABLE" ]; then + JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=$JMXLOCALONLY" + fi + exec start-stop-daemon --start -c $USER --exec $JAVA --name zookeeper-{{ '{{' }} cluster['name'] {{ '}}' }} \ + -- -cp $CLASSPATH $JAVA_OPTS -Dzookeeper.log.dir=${ZOO_LOG_DIR} \ + -Dzookeeper.root.logger=${ZOO_LOG4J_PROP} $ZOOMAIN $ZOOCFG +end script +``` + +## アンãƒã‚¦ã‚¤ãƒ«ã‚¹ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ {#antivirus-software} + +アンãƒã‚¦ã‚¤ãƒ«ã‚¹ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€ClickHouseデータファイル(`/var/lib/clickhouse`)ãŒã‚るフォルダをスキップã™ã‚‹ã‚ˆã†ã«è¨­å®šã—ã¦ãã ã•ã„。ãã†ã—ãªã„ã¨ãƒ‘フォーマンスãŒä½Žä¸‹ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆã‚„ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒžãƒ¼ã‚¸ä¸­ã«äºˆæœŸã—ãªã„エラーãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## 関連コンテンツ + +- [ClickHouseã®å§‹ã‚方?13ã®ã€Œè‡´å‘½çš„ãªéŽã¡ã€ã¨ãã®å›žé¿æ–¹æ³•](https://clickhouse.com/blog/common-getting-started-issues-with-clickhouse) diff --git a/docs/ja/operations/update.md b/docs/ja/operations/update.md new file mode 100644 index 00000000000..604bacc980b --- /dev/null +++ b/docs/ja/operations/update.md @@ -0,0 +1,101 @@ +--- +slug: /ja/operations/update +sidebar_title: セルフマãƒãƒ¼ã‚¸ãƒ‰ã‚¢ãƒƒãƒ—グレード +title: セルフマãƒãƒ¼ã‚¸ãƒ‰ã‚¢ãƒƒãƒ—グレード +--- + +## ClickHouseã‚¢ãƒƒãƒ—ã‚°ãƒ¬ãƒ¼ãƒ‰æ¦‚è¦ + +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ã¯ä»¥ä¸‹ãŒå«ã¾ã‚Œã¾ã™ï¼š +- 一般的ãªã‚¬ã‚¤ãƒ‰ãƒ©ã‚¤ãƒ³ +- 推奨ã•ã‚Œã‚‹è¨ˆç”» +- システム上ã®ãƒã‚¤ãƒŠãƒªã‚¢ãƒƒãƒ—グレードã®è©³ç´° + +## 一般的ãªã‚¬ã‚¤ãƒ‰ãƒ©ã‚¤ãƒ³ + +ã“れらã®æ³¨æ„事項ã¯ã€è¨ˆç”»ã‚’ç«‹ã¦ã‚‹ã®ã«å½¹ç«‹ã¡ã€ãªãœå¾Œè¿°ã™ã‚‹ã‚ˆã†ãªæŽ¨å¥¨ã‚’è¡Œã†ã®ã‹ã‚’ç†è§£ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +### ClickHouseサーãƒãƒ¼ã‚’ClickHouse Keeperã¾ãŸã¯ZooKeeperã¨ã¯åˆ¥ã«ã‚¢ãƒƒãƒ—グレード +ClickHouse Keeperã¾ãŸã¯Apache ZooKeeperã«å¯¾ã™ã‚‹ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¿®æ­£ãŒå¿…è¦ã§ãªã„é™ã‚Šã€ClickHouseサーãƒãƒ¼ã‚’アップグレードã™ã‚‹éš›ã«Keeperをアップグレードã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。アップグレード中ã¯Keeperã®å®‰å®šæ€§ãŒå¿…è¦ãªãŸã‚ã€ClickHouseサーãƒãƒ¼ã®ã‚¢ãƒƒãƒ—グレードを完了ã—ã¦ã‹ã‚‰Keeperã®ã‚¢ãƒƒãƒ—グレードを検討ã—ã¦ãã ã•ã„。 + +### マイナーãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¢ãƒƒãƒ—グレードã¯é »ç¹ã«æŽ¡ç”¨ã™ã¹ã +常ã«æœ€æ–°ã®ãƒžã‚¤ãƒŠãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã‚¢ãƒƒãƒ—グレードã™ã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚マイナーリリースã«ã¯ç ´å£Šçš„ãªå¤‰æ›´ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€é‡è¦ãªãƒã‚°ä¿®æ­£ï¼ˆãŠã‚ˆã³ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¿®æ­£ãŒå«ã¾ã‚Œã‚‹å ´åˆã‚‚ã‚ã‚Šã¾ã™ï¼‰ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +### ターゲットãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’実行ã™ã‚‹åˆ¥ã®ClickHouseサーãƒãƒ¼ã§ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã‚’テスト + +エクスペリメンタルãªæ©Ÿèƒ½ã®äº’æ›æ€§ã¯ã€ã„ã¤ã§ã‚‚ã©ã®ã‚ˆã†ã«ã§ã‚‚無効ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚エクスペリメンタルãªæ©Ÿèƒ½ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€å¤‰æ›´å±¥æ­´ã‚’確èªã—ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’インストールã—ãŸåˆ¥ã®ClickHouseサーãƒãƒ¼ã‚’セットアップã—ã€ãã“ã§ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã®ä½¿ç”¨ã‚’テストã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。 + +### ダウングレード +æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒä¾å­˜ã—ã¦ã„る機能ã¨äº’æ›æ€§ãŒãªã„ã¨æ°—付ã„ãŸå ´åˆã€ã¾ã æ–°ã—ã„機能を使用ã—始ã‚ã¦ã„ãªã‘ã‚Œã°ã€æœ€è¿‘ã®ï¼ˆ1年未満ã®ï¼‰ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚æ–°ã—ã„機能を使用ã—始ã‚ã‚‹ã¨ã€ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。 + +### クラスター内ã®è¤‡æ•°ã®ClickHouseサーãƒãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ + +1å¹´ã®äº’æ›æ€§ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ï¼ˆ2ã¤ã®LTSãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å«ã‚€ï¼‰ã‚’維æŒã™ã‚‹åŠªåŠ›ã‚’ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã®å·®ãŒ1年未満ã§ã‚ã‚Œã°ã€ã¾ãŸã¯2ã¤ã®LTSãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®é–“éš”ãŒ1年未満ã§ã‚ã‚Œã°ã€ã©ã®2ã¤ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚‚クラスター内ã§ä¸€ç·’ã«å‹•ä½œã™ã‚‹ã¯ãšã§ã™ã€‚ã—ã‹ã—ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å†…ã®å…¨ãƒ¡ãƒ³ãƒãƒ¼ã‚’ã§ãã‚‹ã ã‘æ—©ãåŒã˜ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã‚¢ãƒƒãƒ—グレードã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚例ãˆã°ã€åˆ†æ•£ã‚¯ã‚¨ãƒªã®é…延ã€ReplicatedMergeTreeã«ãŠã‘る一部ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰æ“作ã§ã®å†è©¦è¡Œå¯èƒ½ãªã‚¨ãƒ©ãƒ¼ãªã©ã€ã„ãã¤ã‹ã®å°ã•ãªå•é¡ŒãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +リリース日ãŒ1年以上ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’åŒã˜ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã¯æ±ºã—ã¦æŽ¨å¥¨ã—ã¾ã›ã‚“。データæ失ã¯äºˆæœŸã—ã¦ã„ã¾ã›ã‚“ãŒã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãŒä½¿ç”¨ä¸èƒ½ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã®å·®ãŒ1年以上ã‚ã‚‹å ´åˆã«äºˆæœŸã•ã‚Œã‚‹å•é¡Œã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +- クラスターãŒå‹•ä½œã—ãªã„å¯èƒ½æ€§ãŒã‚ã‚‹ +- 一部ã¾ãŸã¯ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªãŒä»»æ„ã®ã‚¨ãƒ©ãƒ¼ã§å¤±æ•—ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ +- ä»»æ„ã®ã‚¨ãƒ©ãƒ¼/警告ãŒãƒ­ã‚°ã«è¡¨ç¤ºã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ +- ダウングレードãŒä¸å¯èƒ½ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ + +### インクリメンタルアップグレード + +ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®å·®ãŒ1年以上ã‚ã‚‹å ´åˆã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã‚’推奨ã—ã¾ã™ï¼š +- ダウンタイムを伴ã†ã‚¢ãƒƒãƒ—グレード(ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã‚’åœæ­¢ã—ã€ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã‚’アップグレードã—ã€ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã‚’実行)。 +- ã¾ãŸã¯ä¸­é–“ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’経由ã—ã¦ã‚¢ãƒƒãƒ—グレード(ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚ˆã‚Š1年以上新ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼‰ã€‚ + +## 推奨計画 + +ゼロダウンタイムã®ClickHouseアップグレードã®ãŸã‚ã®æŽ¨å¥¨ã‚¹ãƒ†ãƒƒãƒ—ã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +1. 設定ã®å¤‰æ›´ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®`/etc/clickhouse-server/config.xml`ファイルã§ã¯ãªãã€`/etc/clickhouse-server/config.d/`ã«ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。`/etc/clickhouse-server/config.xml`ã¯ã‚¢ãƒƒãƒ—グレード中ã«ä¸Šæ›¸ãã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +2. 対象リリースã‹ã‚‰ç¾åœ¨ã®ãƒªãƒªãƒ¼ã‚¹ã¾ã§ã®[変更履歴](/docs/ja/whats-new/changelog/index.md)を読んã§ã€ç ´å£Šçš„変更を確èªã—ã¦ãã ã•ã„。 +3. アップグレードå‰ã«å®Ÿæ–½å¯èƒ½ãªç ´å£Šçš„変更ã«åŸºã¥ãæ›´æ–°ã‚’è¡Œã„ã€ã‚¢ãƒƒãƒ—グレード後ã«å¿…è¦ãªå¤‰æ›´ã®ãƒªã‚¹ãƒˆã‚’作æˆã—ã¾ã™ã€‚ +4. å„シャードã®æ®‹ã‚Šã®ãƒ¬ãƒ—リカをアップグレードã™ã‚‹é–“ã«ç¶­æŒã™ã‚‹1ã¤ä»¥ä¸Šã®ãƒ¬ãƒ—リカを特定ã—ã¾ã™ã€‚ +5. アップグレードã™ã‚‹ãƒ¬ãƒ—リカã«ã¤ã„ã¦ã€1ã¤ãšã¤ï¼š + - ClickHouseサーãƒãƒ¼ã‚’シャットダウンã—ã¾ã™ã€‚ + - ターゲットãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã‚µãƒ¼ãƒãƒ¼ã‚’アップグレードã—ã¾ã™ã€‚ + - ClickHouseサーãƒãƒ¼ã‚’ç«‹ã¡ä¸Šã’ã¾ã™ã€‚ + - KeeperメッセージãŒã‚·ã‚¹ãƒ†ãƒ ãŒå®‰å®šã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã™ã¾ã§å¾…ã¡ã¾ã™ã€‚ + - 次ã®ãƒ¬ãƒ—リカã«é€²ã¿ã¾ã™ã€‚ +6. KeeperログãŠã‚ˆã³ClickHouseログã§ã‚¨ãƒ©ãƒ¼ã‚’確èªã—ã¾ã™ã€‚ +7. ステップ4ã§ç‰¹å®šã—ãŸãƒ¬ãƒ—リカを新ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã‚¢ãƒƒãƒ—グレードã—ã¾ã™ã€‚ +8. ステップ1ã‹ã‚‰3ã§è¡Œã£ãŸå¤‰æ›´ã®ãƒªã‚¹ãƒˆã‚’å‚ç…§ã—ã€ã‚¢ãƒƒãƒ—グレード後ã«è¡Œã†å¿…è¦ã®ã‚る変更を行ã„ã¾ã™ã€‚ + +:::note +複数ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ClickHouseãŒãƒ¬ãƒ—リケーション環境ã§å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã®ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒæœŸå¾…ã•ã‚Œã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ¬ãƒ—リカãŒåŒã˜ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã‚¢ãƒƒãƒ—グレードã•ã‚Œã‚‹ã¨ã€ã“れらã®ã‚¨ãƒ©ãƒ¼ã¯ãªããªã‚Šã¾ã™ã€‚ +``` +MergeFromLogEntryTask: Code: 40. DB::Exception: Checksums of parts don't match: +hash of uncompressed files doesn't match. (CHECKSUM_DOESNT_MATCH) Data after merge is not +byte-identical to data on another replicas. +``` +::: + +## ClickHouseサーãƒãƒ¼ãƒã‚¤ãƒŠãƒªã‚¢ãƒƒãƒ—グレードプロセス + +ClickHouseã‚’`deb`パッケージã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãŸå ´åˆã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’サーãƒãƒ¼ã§å®Ÿè¡Œã—ã¾ã™ï¼š + +```bash +$ sudo apt-get update +$ sudo apt-get install clickhouse-client clickhouse-server +$ sudo service clickhouse-server restart +``` + +推奨ã•ã‚Œã‚‹`deb`パッケージ以外ã®æ–¹æ³•ã§ClickHouseをインストールã—ãŸå ´åˆã¯ã€é©åˆ‡ãªæ›´æ–°æ–¹æ³•ã‚’使用ã—ã¦ãã ã•ã„。 + +:::note +シャードã®ã™ã¹ã¦ã®ãƒ¬ãƒ—リカãŒã‚ªãƒ•ãƒ©ã‚¤ãƒ³ã«ãªã‚‹çž¬é–“ãŒãªã„é™ã‚Šã€è¤‡æ•°ã®ã‚µãƒ¼ãƒãƒ¼ã‚’一度ã«æ›´æ–°ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ClickHouseを特定ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã‚¢ãƒƒãƒ—グレードã™ã‚‹æ–¹æ³•ï¼š + +例ã¨ã—ã¦ï¼š + +`xx.yy.a.b`ã¯ç¾åœ¨ã®å®‰å®šãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã™ã€‚最新ã®å®‰å®šãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯[ã“ã“](https://github.com/ClickHouse/ClickHouse/releases)ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```bash +$ sudo apt-get update +$ sudo apt-get install clickhouse-server=xx.yy.a.b clickhouse-client=xx.yy.a.b clickhouse-common-static=xx.yy.a.b +$ sudo service clickhouse-server restart +``` diff --git a/docs/ja/operations/utilities/backupview.md b/docs/ja/operations/utilities/backupview.md new file mode 100644 index 00000000000..f8d51c5c1ba --- /dev/null +++ b/docs/ja/operations/utilities/backupview.md @@ -0,0 +1,49 @@ +--- +slug: /ja/operations/utilities/backupview +title: clickhouse_backupview +--- + +# clickhouse_backupview {#clickhouse_backupview} + +[BACKUP](https://clickhouse.com/docs/ja/operations/backup) コマンドã§ä½œæˆã•ã‚ŒãŸãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を分æžã™ã‚‹ã®ã«å½¹ç«‹ã¤ Python モジュールã§ã™ã€‚ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®ä¸»ãªç›®çš„ã¯ã€å®Ÿéš›ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を復元ã›ãšã«ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã„ãã¤ã‹ã®æƒ…報をå–å¾—ã§ãるよã†ã«ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯ä»¥ä¸‹ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ï¼š +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«å«ã¾ã‚Œã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’列挙ã™ã‚‹ +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿å–ã‚‹ +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«å«ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ‘ーツã«ã¤ã„ã¦äººé–“ãŒèª­ã¿ã‚„ã™ã„å½¢ã§æœ‰ç”¨ãªæƒ…報をå–å¾—ã™ã‚‹ +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®æ•´åˆæ€§ã‚’確èªã™ã‚‹ + +## 例: + +```python +from clickhouse_backupview import open_backup, S3, FileInfo + +# ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’é–‹ãã¾ã™ã€‚ローカルパスも使用ã§ãã¾ã™ï¼š +# backup = open_backup("/backups/my_backup_1/") +backup = open_backup(S3("uri", "access_key_id", "secret_access_key")) + +# ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—内ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã—ã¾ã™ã€‚ +print(backup.get_databases())) + +# ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—内ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã—〠+# å„テーブルã«ã¤ã„ã¦ä½œæˆã‚¯ã‚¨ãƒªã¨ãƒ‘ーツやパーティションã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã—ã¾ã™ã€‚ +for db in backup.get_databases(): + for tbl in backup.get_tables(database=db): + print(backup.get_create_query(database=db, table=tbl)) + print(backup.get_partitions(database=db, table=tbl)) + print(backup.get_parts(database=db, table=tbl)) + +# ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã™ã¹ã¦ã‚’抽出ã—ã¾ã™ã€‚ +backup.extract_all(table="mydb.mytable", out='/tmp/my_backup_1/all/') + +# 特定ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ã‚’抽出ã—ã¾ã™ã€‚ +backup.extract_table_data(table="mydb.mytable", out='/tmp/my_backup_1/mytable/') + +# å˜ä¸€ã®ãƒ‘ーティションを抽出ã—ã¾ã™ã€‚ +backup.extract_table_data(table="mydb.mytable", partition="202201", out='/tmp/my_backup_1/202201/') + +# å˜ä¸€ã®ãƒ‘ートを抽出ã—ã¾ã™ã€‚ +backup.extract_table_data(table="mydb.mytable", part="202201_100_200_3", out='/tmp/my_backup_1/202201_100_200_3/') +``` + +詳細ãªä¾‹ã¯ã€[テスト](https://github.com/ClickHouse/ClickHouse/blob/master/utils/backupview/test/test.py)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/operations/utilities/clickhouse-benchmark.md b/docs/ja/operations/utilities/clickhouse-benchmark.md new file mode 100644 index 00000000000..0985b6bca1f --- /dev/null +++ b/docs/ja/operations/utilities/clickhouse-benchmark.md @@ -0,0 +1,143 @@ +--- +slug: /ja/operations/utilities/clickhouse-benchmark +sidebar_position: 61 +sidebar_label: clickhouse-benchmark +--- + +# clickhouse-benchmark + +ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã—ã€æŒ‡å®šã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’ç¹°ã‚Šè¿”ã—é€ä¿¡ã—ã¾ã™ã€‚ + +**構文** + +``` bash +$ clickhouse-benchmark --query ["single query"] [keys] +``` + +ã¾ãŸã¯ + +``` bash +$ echo "single query" | clickhouse-benchmark [keys] +``` + +ã¾ãŸã¯ + +``` bash +$ clickhouse-benchmark [keys] <<< "single query" +``` + +クエリã®ã‚»ãƒƒãƒˆã‚’é€ä¿¡ã—ãŸã„å ´åˆã¯ã€ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã—ã€ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«å„クエリを個別ã®è¡Œã¨ã—ã¦é…ç½®ã—ã¾ã™ã€‚例: + +``` sql +SELECT * FROM system.numbers LIMIT 10000000; +SELECT 1; +``` + +次ã«ã€ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’`clickhouse-benchmark`ã®æ¨™æº–入力ã«æ¸¡ã—ã¾ã™ï¼š + +``` bash +clickhouse-benchmark [keys] < queries_file; +``` + +## キー {#clickhouse-benchmark-keys} + +- `--query=QUERY` — 実行ã™ã‚‹ã‚¯ã‚¨ãƒªã€‚ã“ã®ãƒ‘ラメーターãŒæ¸¡ã•ã‚Œãªã„å ´åˆã€`clickhouse-benchmark`ã¯æ¨™æº–入力ã‹ã‚‰ã‚¯ã‚¨ãƒªã‚’読ã¿å–ã‚Šã¾ã™ã€‚ +- `-c N`, `--concurrency=N` — `clickhouse-benchmark`ãŒåŒæ™‚ã«é€ä¿¡ã™ã‚‹ã‚¯ã‚¨ãƒªã®æ•°ã€‚デフォルト値: 1。 +- `-d N`, `--delay=N` — 中間レãƒãƒ¼ãƒˆé–“ã®ç§’å˜ä½ã®é–“隔(レãƒãƒ¼ãƒˆã‚’無効ã«ã™ã‚‹ã«ã¯0を設定)。デフォルト値: 1。 +- `-h HOST`, `--host=HOST` — サーãƒãƒ¼ãƒ›ã‚¹ãƒˆã€‚デフォルト値: `localhost`。[比較モード](#clickhouse-benchmark-comparison-mode)ã§ã¯è¤‡æ•°ã®`-h`キーを使用ã§ãã¾ã™ã€‚ +- `-i N`, `--iterations=N` — ç·ã‚¯ã‚¨ãƒªæ•°ã€‚デフォルト値: 0(無é™ã«ç¹°ã‚Šè¿”ã™ï¼‰ã€‚ +- `-r`, `--randomize` — 複数ã®å…¥åŠ›ã‚¯ã‚¨ãƒªãŒã‚ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œã®é †åºã‚’ランダムã«ã—ã¾ã™ã€‚ +- `-s`, `--secure` — `TLS`接続ã®ä½¿ç”¨ã€‚ +- `-t N`, `--timelimit=N` — 秒å˜ä½ã®æ™‚間制é™ã€‚指定ã•ã‚ŒãŸæ™‚間制é™ã«é”ã™ã‚‹ã¨`clickhouse-benchmark`ã¯ã‚¯ã‚¨ãƒªã®é€ä¿¡ã‚’åœæ­¢ã—ã¾ã™ã€‚デフォルト値: 0(時間制é™ãªã—)。 +- `--port=N` — サーãƒãƒ¼ãƒãƒ¼ãƒˆã€‚デフォルト値: 9000。[比較モード](#clickhouse-benchmark-comparison-mode)ã§ã¯è¤‡æ•°ã®`--port`キーを使用ã§ãã¾ã™ã€‚ +- `--confidence=N` — T検定ã®ä¿¡é ¼ãƒ¬ãƒ™ãƒ«ã€‚å¯èƒ½ãªå€¤: 0 (80%), 1 (90%), 2 (95%), 3 (98%), 4 (99%), 5 (99.5%)。デフォルト値: 5。[比較モード](#clickhouse-benchmark-comparison-mode)ã§ã¯ã€`clickhouse-benchmark`ã¯æŒ‡å®šã•ã‚ŒãŸä¿¡é ¼ãƒ¬ãƒ™ãƒ«ã§[独立二標本ã®ã‚¹ãƒãƒ¥ãƒ¼ãƒ‡ãƒ³ãƒˆã®t検定](https://en.wikipedia.org/wiki/Student%27s_t-test#Independent_two-sample_t-test)を実行ã—ã¦ã€2ã¤ã®åˆ†å¸ƒã«é•ã„ãŒãªã„ã‹ã‚’判断ã—ã¾ã™ã€‚ +- `--cumulative` — å„é–“éš”ã®ãƒ‡ãƒ¼ã‚¿ã®ä»£ã‚ã‚Šã«ç´¯ç©ãƒ‡ãƒ¼ã‚¿ã‚’表示ã—ã¾ã™ã€‚ +- `--database=DATABASE_NAME` — ClickHouseデータベースå。デフォルト値: `default`。 +- `--user=USERNAME` — ClickHouseユーザーå。デフォルト値: `default`。 +- `--password=PSWD` — ClickHouseユーザーパスワード。デフォルト値: 空文字列。 +- `--stacktrace` — スタックトレースã®å‡ºåŠ›ã€‚ã“ã®ã‚­ãƒ¼ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`clickhouse-benchmark`ã¯ä¾‹å¤–ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’出力ã—ã¾ã™ã€‚ +- `--stage=WORD` — サーãƒãƒ¼ã§ã®ã‚¯ã‚¨ãƒªå‡¦ç†æ®µéšŽã€‚ClickHouseã¯æŒ‡å®šã•ã‚ŒãŸæ®µéšŽã§ã‚¯ã‚¨ãƒªå‡¦ç†ã‚’åœæ­¢ã—ã€`clickhouse-benchmark`ã«å›žç­”ã‚’è¿”ã—ã¾ã™ã€‚å¯èƒ½ãªå€¤: `complete`, `fetch_columns`, `with_mergeable_state`。デフォルト値: `complete`。 +- `--help` — ヘルプメッセージを表示ã—ã¾ã™ã€‚ + +クエリã«ã„ãã¤ã‹ã®[設定](../../operations/settings/index.md)ã‚’é©ç”¨ã—ãŸã„å ´åˆã¯ã€`--=SETTING_VALUE`ã¨ã„ã†ã‚­ãƒ¼ã¨ã—ã¦ãれらを渡ã—ã¾ã™ã€‚例ãˆã°ã€`--max_memory_usage=1048576`。 + +## 出力 {#clickhouse-benchmark-output} + +デフォルトã§ã¯ã€`clickhouse-benchmark`ã¯å„`--delay`インターãƒãƒ«ã®ãƒ¬ãƒãƒ¼ãƒˆã‚’表示ã—ã¾ã™ã€‚ + +レãƒãƒ¼ãƒˆã®ä¾‹ï¼š + +``` text +Queries executed: 10. + +localhost:9000, queries 10, QPS: 6.772, RPS: 67904487.440, MiB/s: 518.070, result RPS: 67721584.984, result MiB/s: 516.675. + +0.000% 0.145 sec. +10.000% 0.146 sec. +20.000% 0.146 sec. +30.000% 0.146 sec. +40.000% 0.147 sec. +50.000% 0.148 sec. +60.000% 0.148 sec. +70.000% 0.148 sec. +80.000% 0.149 sec. +90.000% 0.150 sec. +95.000% 0.150 sec. +99.000% 0.150 sec. +99.900% 0.150 sec. +99.990% 0.150 sec. +``` + +レãƒãƒ¼ãƒˆã§ã¯ä»¥ä¸‹ãŒç¢ºèªã§ãã¾ã™ï¼š + +- `Queries executed:`フィールドã«ãŠã‘るクエリ数。 + +- ステータス文字列ã«ã¯ä»¥ä¸‹ã®æƒ…å ±ãŒå«ã¾ã‚Œã¾ã™ï¼ˆé †ç•ªã«ï¼‰ï¼š + + - ClickHouseサーãƒãƒ¼ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã€‚ + - 処ç†ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã®æ•°ã€‚ + - QPS: `--delay`引数ã§æŒ‡å®šã•ã‚ŒãŸæœŸé–“中ã€ã‚µãƒ¼ãƒãƒ¼ãŒ1秒ã‚ãŸã‚Šã«å®Ÿè¡Œã—ãŸã‚¯ã‚¨ãƒªæ•°ã€‚ + - RPS: `--delay`引数ã§æŒ‡å®šã•ã‚ŒãŸæœŸé–“中ã€ã‚µãƒ¼ãƒãƒ¼ãŒ1秒ã‚ãŸã‚Šã«èª­ã¿å–ã£ãŸè¡Œæ•°ã€‚ + - MiB/s: `--delay`引数ã§æŒ‡å®šã•ã‚ŒãŸæœŸé–“中ã€ã‚µãƒ¼ãƒãƒ¼ãŒ1秒ã‚ãŸã‚Šã«èª­ã¿å–ã£ãŸMebibytes数。 + - result RPS: `--delay`引数ã§æŒ‡å®šã•ã‚ŒãŸæœŸé–“中ã€ã‚µãƒ¼ãƒãƒ¼ãŒã‚¯ã‚¨ãƒªã®çµæžœã«1秒ã‚ãŸã‚Šã«é…ç½®ã—ãŸè¡Œæ•°ã€‚ + - result MiB/s: `--delay`引数ã§æŒ‡å®šã•ã‚ŒãŸæœŸé–“中ã€ã‚µãƒ¼ãƒãƒ¼ãŒã‚¯ã‚¨ãƒªã®çµæžœã«1秒ã‚ãŸã‚Šã«é…ç½®ã—ãŸMebibytes数。 + +- クエリ実行時間ã®ãƒ‘ーセンタイル。 + +## 比較モード {#clickhouse-benchmark-comparison-mode} + +`clickhouse-benchmark`ã¯2ã¤ã®ç¨¼åƒä¸­ã®ClickHouseサーãƒãƒ¼ã®ãƒ‘フォーマンスを比較ã§ãã¾ã™ã€‚ + +比較モードを使用ã™ã‚‹ã«ã¯ã€ä¸¡æ–¹ã®ã‚µãƒ¼ãƒãƒ¼ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’`--host`ã€`--port`キーã®2組ã§æŒ‡å®šã—ã¾ã™ã€‚キーã¯å¼•æ•°ãƒªã‚¹ãƒˆå†…ã§ã®ä½ç½®ã«ã‚ˆã£ã¦çµ„ã¿åˆã‚ã•ã‚Œã¾ã™ã€‚最åˆã®`--host`ã¯æœ€åˆã®`--port`ã¨çµ„ã¿åˆã‚ã•ã‚Œã‚‹ã€ã¨ã„ã†ã‚ˆã†ã«ã€‚`clickhouse-benchmark`ã¯ä¸¡æ–¹ã®ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã‚’確立ã—ã€ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã—ã¾ã™ã€‚å„クエリã¯ãƒ©ãƒ³ãƒ€ãƒ ã«é¸ã°ã‚ŒãŸã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚çµæžœã¯è¡¨ã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +## 例 {#clickhouse-benchmark-example} + +``` bash +$ echo "SELECT * FROM system.numbers LIMIT 10000000 OFFSET 10000000" | clickhouse-benchmark --host=localhost --port=9001 --host=localhost --port=9000 -i 10 +``` + +``` text +Loaded 1 queries. + +Queries executed: 5. + +localhost:9001, queries 2, QPS: 3.764, RPS: 75446929.370, MiB/s: 575.614, result RPS: 37639659.982, result MiB/s: 287.168. +localhost:9000, queries 3, QPS: 3.815, RPS: 76466659.385, MiB/s: 583.394, result RPS: 38148392.297, result MiB/s: 291.049. + +0.000% 0.258 sec. 0.250 sec. +10.000% 0.258 sec. 0.250 sec. +20.000% 0.258 sec. 0.250 sec. +30.000% 0.258 sec. 0.267 sec. +40.000% 0.258 sec. 0.267 sec. +50.000% 0.273 sec. 0.267 sec. +60.000% 0.273 sec. 0.267 sec. +70.000% 0.273 sec. 0.267 sec. +80.000% 0.273 sec. 0.269 sec. +90.000% 0.273 sec. 0.269 sec. +95.000% 0.273 sec. 0.269 sec. +99.000% 0.273 sec. 0.269 sec. +99.900% 0.273 sec. 0.269 sec. +99.990% 0.273 sec. 0.269 sec. + +No difference proven at 99.5% confidence +``` diff --git a/docs/ja/operations/utilities/clickhouse-compressor.md b/docs/ja/operations/utilities/clickhouse-compressor.md new file mode 100644 index 00000000000..7e3b5673be4 --- /dev/null +++ b/docs/ja/operations/utilities/clickhouse-compressor.md @@ -0,0 +1,30 @@ +--- +slug: /ja/operations/utilities/clickhouse-compressor +title: clickhouse-compressor +--- + +データã®åœ§ç¸®ãŠã‚ˆã³è§£å‡ã®ãŸã‚ã®ã‚·ãƒ³ãƒ—ルãªãƒ—ログラム。 + +### 例 + +LZ4ã§ãƒ‡ãƒ¼ã‚¿ã‚’圧縮ã™ã‚‹: +``` +$ ./clickhouse-compressor < input_file > output_file +``` + +LZ4å½¢å¼ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’解å‡ã™ã‚‹: +``` +$ ./clickhouse-compressor --decompress < input_file > output_file +``` + +レベル5ã§ãƒ‡ãƒ¼ã‚¿ã‚’ZSTDã§åœ§ç¸®ã™ã‚‹: + +``` +$ ./clickhouse-compressor --codec 'ZSTD(5)' < input_file > output_file +``` + +4ãƒã‚¤ãƒˆã®Deltaã¨ZSTDレベル10ã§ãƒ‡ãƒ¼ã‚¿ã‚’圧縮ã™ã‚‹: + +``` +$ ./clickhouse-compressor --codec 'Delta(4)' --codec 'ZSTD(10)' < input_file > output_file +``` diff --git a/docs/ja/operations/utilities/clickhouse-disks.md b/docs/ja/operations/utilities/clickhouse-disks.md new file mode 100644 index 00000000000..cfeafd25a47 --- /dev/null +++ b/docs/ja/operations/utilities/clickhouse-disks.md @@ -0,0 +1,58 @@ +--- +slug: /ja/operations/utilities/clickhouse-disks +sidebar_position: 59 +sidebar_label: clickhouse-disks +--- + +# Clickhouse-disks + +ClickHouse ディスクã®ãŸã‚ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã®ã‚ˆã†ãªæ“作をæä¾›ã™ã‚‹ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã§ã™ã€‚インタラクティブモードã¨éžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã®ä¸¡æ–¹ã§å‹•ä½œã—ã¾ã™ã€‚ + +## プログラム全体ã®ã‚ªãƒ—ション + +* `--config-file, -C` -- ClickHouse ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。デフォルト㯠`/etc/clickhouse-server/config.xml`。 +* `--save-logs` -- 実行ã—ãŸã‚³ãƒžãƒ³ãƒ‰ã®é€²è¡ŒçŠ¶æ³ã‚’ `/var/log/clickhouse-server/clickhouse-disks.log` ã«è¨˜éŒ²ã€‚ +* `--log-level` -- 記録ã™ã‚‹ [イベントã®ã‚¿ã‚¤ãƒ—](../server-configuration-parameters/settings#logger)。デフォルト㯠`none`。 +* `--disk` -- `mkdir, move, read, write, remove` コマンドã§ä½¿ç”¨ã™ã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ã€‚デフォルト㯠`default`。 +* `--query, -q` -- インタラクティブモードを起動ã›ãšã«å®Ÿè¡Œã§ãã‚‹å˜ä¸€ã®ã‚¯ã‚¨ãƒª +* `--help, -h` -- 説明付ãã§å…¨ã¦ã®ã‚ªãƒ—ションã¨ã‚³ãƒžãƒ³ãƒ‰ã‚’表示 + +## デフォルトディスク +起動後ã€2ã¤ã®ãƒ‡ã‚£ã‚¹ã‚¯ãŒåˆæœŸåŒ–ã•ã‚Œã¾ã™ã€‚最åˆã®ãƒ‡ã‚£ã‚¹ã‚¯ã¯ `local` ã§ã€clickhouse-disks ユーティリティãŒèµ·å‹•ã•ã‚ŒãŸãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚’模倣ã™ã‚‹ã“ã¨ã‚’æ„図ã—ã¦ã„ã¾ã™ã€‚2ã¤ç›®ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¯ `default` ã§ã€è¨­å®šã§ãƒ‘ラメーター `clickhouse/path` ã¨ã—ã¦è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãるディレクトリã«ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ãƒžã‚¦ãƒ³ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ `/var/lib/clickhouse`)。 + +## Clickhouse-disks ã®çŠ¶æ…‹ +追加ã•ã‚ŒãŸå„ディスクã«ã¤ã„ã¦ã€ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã¯é€šå¸¸ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã¨åŒæ§˜ã«ç¾åœ¨ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’ä¿æŒã—ã¾ã™ã€‚ユーザーã¯ç¾åœ¨ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’変更ã—ãŸã‚Šã€ãƒ‡ã‚£ã‚¹ã‚¯ã‚’切り替ãˆãŸã‚Šã§ãã¾ã™ã€‚ + +状態ã¯ãƒ—ロンプト "`disk_name`:`path_name`" ã«å映ã•ã‚Œã¾ã™ + +## コマンド + +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãƒ•ã‚¡ã‚¤ãƒ«ã§ã¯ã€ã™ã¹ã¦ã®å¿…é ˆã®ä½ç½®å¼•æ•°ã¯ ``ã€åå‰ä»˜ã引数㯠`[--parameter value]` ã¨ã—ã¦ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ã™ã¹ã¦ã®ä½ç½®æŒ‡å®šãƒ‘ラメータã¯å¯¾å¿œã™ã‚‹åå‰ã®åå‰ä»˜ãパラメータã¨ã—ã¦è¨€åŠã§ãã¾ã™ã€‚ + +* `cd (change-dir, change_dir) [--disk disk] ` + ディスク `disk` ã® `path` ã«ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’変更(デフォルト値ã¯ç¾åœ¨ã®ãƒ‡ã‚£ã‚¹ã‚¯ï¼‰ã€‚ディスクã®åˆ‡ã‚Šæ›¿ãˆã¯è¡Œã‚ã‚Œã¾ã›ã‚“。 +* `copy (cp) [--disk-from disk_1] [--disk-to disk_2] `. + `path-from` ã®ãƒ‡ãƒ¼ã‚¿ã‚’ディスク `disk_1`(デフォルトã§ã¯ç¾åœ¨ã®ãƒ‡ã‚£ã‚¹ã‚¯ï¼ˆéžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã§ã¯ãƒ‘ラメータ `disk`))ã‹ã‚‰å†å¸°çš„ã« `path-to` ã®ãƒ‡ã‚£ã‚¹ã‚¯ `disk_2`(デフォルトã§ã¯ç¾åœ¨ã®ãƒ‡ã‚£ã‚¹ã‚¯ï¼ˆéžã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã§ã¯ãƒ‘ラメータ `disk`))ã«ã‚³ãƒ”ー。 +* `current_disk_with_path (current, current_disk, current_path)` + ç¾åœ¨ã®çŠ¶æ…‹ã‚’以下ã®å½¢å¼ã§è¡¨ç¤ºï¼š + `Disk: "current_disk" Path: "current path on current disk"` +* `help []` + コマンド `command` ã«é–¢ã™ã‚‹ãƒ˜ãƒ«ãƒ—メッセージを表示。`command` ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ã™ã¹ã¦ã®ã‚³ãƒžãƒ³ãƒ‰ã«é–¢ã™ã‚‹æƒ…報を表示。 +* `move (mv) `. + ç¾åœ¨ã®ãƒ‡ã‚£ã‚¹ã‚¯å†…㧠`path-from` ã‹ã‚‰ `path-to` ã¸ãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’移動。 +* `remove (rm, delete) `. + ç¾åœ¨ã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ `path` ã‚’å†å¸°çš„ã«å‰Šé™¤ã€‚ +* `link (ln) `. + ç¾åœ¨ã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ `path-from` ã‹ã‚‰ `path-to` ã¸ã®ãƒãƒ¼ãƒ‰ãƒªãƒ³ã‚¯ã‚’作æˆã€‚ +* `list (ls) [--recursive] ` + ç¾åœ¨ã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ `path` ã«ã‚るファイルをリスト。デフォルトã§ã¯éžå†å¸°çš„。 +* `list-disks (list_disks, ls-disks, ls_disks)`. + ディスクåをリスト。 +* `mkdir [--recursive] ` ç¾åœ¨ã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã€‚ + ディレクトリを作æˆã€‚デフォルトã§ã¯éžå†å¸°çš„。 +* `read (r) [--path-to path]` + `path-from` ã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿è¾¼ã¿ `path` ã«å‡ºåŠ›ï¼ˆæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ `stdout` ã«å‡ºåŠ›ï¼‰ã€‚ +* `switch-disk [--path path] ` + パス `path`(指定ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ãƒ‡ã‚£ã‚¹ã‚¯ `disk` 上ã®ä»¥å‰ã®ãƒ‘スãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ã§ãƒ‡ã‚£ã‚¹ã‚¯ `disk` ã«åˆ‡ã‚Šæ›¿ãˆã€‚ +* `write (w) [--path-from path] `. + `path` ã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã‚’書ãè¾¼ã¿ï¼ˆ`path` ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ `stdin` ã‹ã‚‰èª­ã¿è¾¼ã¿ã€å…¥åŠ›ã¯ Ctrl+D ã§çµ‚了)`path-to` ã«å‡ºåŠ›ã€‚ diff --git a/docs/ja/operations/utilities/clickhouse-format.md b/docs/ja/operations/utilities/clickhouse-format.md new file mode 100644 index 00000000000..4e352f3de75 --- /dev/null +++ b/docs/ja/operations/utilities/clickhouse-format.md @@ -0,0 +1,112 @@ +--- +slug: /ja/operations/utilities/clickhouse-format +title: clickhouse-format +--- + +入力ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’フォーマットã—ã¾ã™ã€‚ + +キー: + +- `--help` ã¾ãŸã¯ `-h` — ヘルプメッセージを生æˆã—ã¾ã™ã€‚ +- `--query` — ä»»æ„ã®é•·ã•ã¨è¤‡é›‘ã•ã®ã‚¯ã‚¨ãƒªã‚’フォーマットã—ã¾ã™ã€‚ +- `--hilite` — ANSI端末ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスを使用ã—ã¦æ§‹æ–‡ã‚’強調表示ã—ã¾ã™ã€‚ +- `--oneline` — 1è¡Œã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã—ã¾ã™ã€‚ +- `--max_line_length` — 指定ã•ã‚ŒãŸé•·ã•ã‚ˆã‚ŠçŸ­ã„クエリを1è¡Œã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã—ã¾ã™ã€‚ +- `--comments` — 出力ã«ã‚³ãƒ¡ãƒ³ãƒˆã‚’ä¿æŒã—ã¾ã™ã€‚ +- `--quiet` ã¾ãŸã¯ `-q` — æˆåŠŸã—ãŸå ´åˆã¯å‡ºåŠ›ã›ãšã«æ§‹æ–‡ã ã‘ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ +- `--multiquery` ã¾ãŸã¯ `-n` — åŒä¸€ãƒ•ã‚¡ã‚¤ãƒ«å†…ã§è¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚’許å¯ã—ã¾ã™ã€‚ +- `--obfuscate` — フォーマットã®ä»£ã‚ã‚Šã«é›£èª­åŒ–ã—ã¾ã™ã€‚ +- `--seed ` — 難読化ã®çµæžœã‚’決定ã™ã‚‹ä»»æ„ã®æ–‡å­—列を設定ã—ã¾ã™ã€‚ +- `--backslash` — フォーマットã•ã‚ŒãŸã‚¯ã‚¨ãƒªã®å„è¡Œã®æœ€å¾Œã«ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’追加ã—ã¾ã™ã€‚Webã‚„ä»–ã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰è¤‡æ•°è¡Œã§ã‚¯ã‚¨ãƒªã‚’コピーã—ã¦ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã§å®Ÿè¡Œã—ãŸã„å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ + +## 例 {#examples} + +1. クエリã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ: + +```bash +$ clickhouse-format --query "select number from numbers(10) where number%2 order by number desc;" +``` + +çµæžœ: + +```bash +SELECT number +FROM numbers(10) +WHERE number % 2 +ORDER BY number DESC +``` + +2. ãƒã‚¤ãƒ©ã‚¤ãƒˆã¨1行表示: + +```bash +$ clickhouse-format --oneline --hilite <<< "SELECT sum(number) FROM numbers(5);" +``` + +çµæžœ: + +```sql +SELECT sum(number) FROM numbers(5) +``` + +3. 複数クエリ: + +```bash +$ clickhouse-format -n <<< "SELECT min(number) FROM numbers(5); SELECT max(number) FROM numbers(5);" +``` + +çµæžœ: + +``` +SELECT min(number) +FROM numbers(5) +; + +SELECT max(number) +FROM numbers(5) +; + +``` + +4. 難読化: + +```bash +$ clickhouse-format --seed Hello --obfuscate <<< "SELECT cost_first_screen BETWEEN a AND b, CASE WHEN x >= 123 THEN y ELSE NULL END;" +``` + +çµæžœ: + +``` +SELECT treasury_mammoth_hazelnut BETWEEN nutmeg AND span, CASE WHEN chive >= 116 THEN switching ELSE ANYTHING END; +``` + +åŒã˜ã‚¯ã‚¨ãƒªã§åˆ¥ã®ã‚·ãƒ¼ãƒ‰æ–‡å­—列ã®å ´åˆ: + +```bash +$ clickhouse-format --seed World --obfuscate <<< "SELECT cost_first_screen BETWEEN a AND b, CASE WHEN x >= 123 THEN y ELSE NULL END;" +``` + +çµæžœ: + +``` +SELECT horse_tape_summer BETWEEN folklore AND moccasins, CASE WHEN intestine >= 116 THEN nonconformist ELSE FORESTRY END; +``` + +5. ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã®è¿½åŠ : + +```bash +$ clickhouse-format --backslash <<< "SELECT * FROM (SELECT 1 AS x UNION ALL SELECT 1 UNION DISTINCT SELECT 3);" +``` + +çµæžœ: + +``` +SELECT * \ +FROM \ +( \ + SELECT 1 AS x \ + UNION ALL \ + SELECT 1 \ + UNION DISTINCT \ + SELECT 3 \ +) +``` diff --git a/docs/ja/operations/utilities/clickhouse-keeper-client.md b/docs/ja/operations/utilities/clickhouse-keeper-client.md new file mode 100644 index 00000000000..dbf8f2b13a0 --- /dev/null +++ b/docs/ja/operations/utilities/clickhouse-keeper-client.md @@ -0,0 +1,68 @@ +--- +slug: /ja/operations/utilities/clickhouse-keeper-client +sidebar_label: clickhouse-keeper-client +--- + +# clickhouse-keeper-client + +ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルを通ã˜ã¦clickhouse-keeperã¨ã‚„ã‚Šã¨ã‚Šã™ã‚‹ãŸã‚ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã§ã™ã€‚ + +## キー {#clickhouse-keeper-client} + +- `-q QUERY`, `--query=QUERY` — 実行ã™ã‚‹ã‚¯ã‚¨ãƒªã€‚ ã“ã®ãƒ‘ラメータãŒæ¸¡ã•ã‚Œãªã„å ´åˆã€`clickhouse-keeper-client`ã¯ã‚¤ãƒ³ã‚¿ãƒ©ã‚¯ãƒ†ã‚£ãƒ–モードã§é–‹å§‹ã•ã‚Œã¾ã™ã€‚ +- `-h HOST`, `--host=HOST` — サーãƒãƒ¼ãƒ›ã‚¹ãƒˆã€‚デフォルト値:`localhost`。 +- `-p N`, `--port=N` — サーãƒãƒ¼ãƒãƒ¼ãƒˆã€‚デフォルト値:9181。 +- `-c FILE_PATH`, `--config-file=FILE_PATH` — 接続文字列をå–å¾—ã™ã‚‹ãŸã‚ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘スを設定ã—ã¾ã™ã€‚デフォルト値:`config.xml`。 +- `--connection-timeout=TIMEOUT` — 接続タイムアウトを秒å˜ä½ã§è¨­å®šã—ã¾ã™ã€‚デフォルト値:10秒。 +- `--session-timeout=TIMEOUT` — セッションタイムアウトを秒å˜ä½ã§è¨­å®šã—ã¾ã™ã€‚デフォルト値:10秒。 +- `--operation-timeout=TIMEOUT` — æ“作タイムアウトを秒å˜ä½ã§è¨­å®šã—ã¾ã™ã€‚デフォルト値:10秒。 +- `--history-file=FILE_PATH` — 履歴ファイルã®ãƒ‘スを設定ã—ã¾ã™ã€‚デフォルト値:`~/.keeper-client-history`。 +- `--log-level=LEVEL` — ログレベルを設定ã—ã¾ã™ã€‚デフォルト値:`information`。 +- `--no-confirmation` — 設定ã™ã‚‹ã¨ã€ã„ãã¤ã‹ã®ã‚³ãƒžãƒ³ãƒ‰ã§ç¢ºèªã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“。インタラクティブã§ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤`false`ã€ã‚¯ã‚¨ãƒªã§ã¯`true`ã§ã™ã€‚ +- `--help` — ヘルプメッセージを表示ã—ã¾ã™ã€‚ + +## 例 {#clickhouse-keeper-client-example} + +```bash +./clickhouse-keeper-client -h localhost -p 9181 --connection-timeout 30 --session-timeout 30 --operation-timeout 30 +Connected to ZooKeeper at [::1]:9181 with session_id 137 +/ :) ls +keeper foo bar +/ :) cd 'keeper' +/keeper :) ls +api_version +/keeper :) cd 'api_version' +/keeper/api_version :) ls + +/keeper/api_version :) cd 'xyz' +Path /keeper/api_version/xyz does not exist +/keeper/api_version :) cd ../../ +/ :) ls +keeper foo bar +/ :) get 'keeper/api_version' +2 +``` + +## コマンド {#clickhouse-keeper-client-commands} + +- `ls '[path]'` -- 指定ã•ã‚ŒãŸãƒ‘スã®ãƒŽãƒ¼ãƒ‰ã‚’一覧表示ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: 作業ディレクトリ)。 +- `cd '[path]'` -- 作業パスを変更ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ `.`)。 +- `cp '' ''` -- 'src'ノードを'dest'パスã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ +- `mv '' ''` -- 'src'ノードを'dest'パスã«ç§»å‹•ã—ã¾ã™ã€‚ +- `exists ''` -- ノードãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯`1`ã‚’è¿”ã—ã€å­˜åœ¨ã—ãªã„å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ +- `set '' [version]` -- ノードã®å€¤ã‚’æ›´æ–°ã—ã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒä¸€è‡´ã™ã‚‹å ´åˆã®ã¿æ›´æ–°ã•ã‚Œã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: -1)。 +- `create '' [mode]` -- 設定ã•ã‚ŒãŸå€¤ã§æ–°ã—ã„ノードを作æˆã—ã¾ã™ã€‚ +- `touch ''` -- ノードを空ã®æ–‡å­—列ã¨ã—ã¦ä½œæˆã—ã¾ã™ã€‚ノードãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã›ã‚“。 +- `get ''` -- ノードã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- `rm '' [version]` -- ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒä¸€è‡´ã™ã‚‹å ´åˆã®ã¿ãƒŽãƒ¼ãƒ‰ã‚’削除ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: -1)。 +- `rmr '' [limit]` -- サブツリーã®ã‚µã‚¤ã‚ºãŒãƒªãƒŸãƒƒãƒˆã‚ˆã‚Šã‚‚å°ã•ã„å ´åˆã«ãƒ‘スをå†å¸°çš„ã«å‰Šé™¤ã—ã¾ã™ã€‚確èªãŒå¿…è¦ã§ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒªãƒŸãƒƒãƒˆ = 100)。 +- `flwc ` -- 4文字コマンドを実行ã—ã¾ã™ã€‚ +- `help` -- ã“ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’プリントã—ã¾ã™ã€‚ +- `get_direct_children_number '[path]'` -- 特定ã®ãƒ‘スã®ç›´ä¸‹ã®å­ãƒŽãƒ¼ãƒ‰ã®æ•°ã‚’å–å¾—ã—ã¾ã™ã€‚ +- `get_all_children_number '[path]'` -- 特定ã®ãƒ‘スã®ã™ã¹ã¦ã®å­ãƒŽãƒ¼ãƒ‰æ•°ã‚’å–å¾—ã—ã¾ã™ã€‚ +- `get_stat '[path]'` -- ノードã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’è¿”ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ `.`)。 +- `find_super_nodes '[path]'` -- 指定ã•ã‚ŒãŸãƒ‘スã§å­ãƒŽãƒ¼ãƒ‰ã®æ•°ãŒã—ãã„値を超ãˆã‚‹ãƒŽãƒ¼ãƒ‰ã‚’探ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ `.`)。 +- `delete_stale_backups` -- éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ä½¿ç”¨ã•ã‚ŒãŸClickHouseノードを削除ã—ã¾ã™ã€‚ +- `find_big_family [path] [n]` -- サブツリーã§æœ€å¤§ã®ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã‚’æŒã¤ãƒˆãƒƒãƒ—nノードを返ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‘ス = `.`ã€n = 10)。 +- `sync ''` -- プロセス間ãŠã‚ˆã³ãƒªãƒ¼ãƒ€ãƒ¼é–“ã§ãƒŽãƒ¼ãƒ‰ã‚’åŒæœŸã—ã¾ã™ã€‚ +- `reconfig "" [version]` -- Keeperクラスタをå†æ§‹æˆã—ã¾ã™ã€‚詳ã—ã㯠https://clickhouse.com/docs/ja/guides/sre/keeper/clickhouse-keeper#reconfiguration ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/operations/utilities/clickhouse-local.md b/docs/ja/operations/utilities/clickhouse-local.md new file mode 100644 index 00000000000..2962e31af3b --- /dev/null +++ b/docs/ja/operations/utilities/clickhouse-local.md @@ -0,0 +1,311 @@ +--- +slug: /ja/operations/utilities/clickhouse-local +sidebar_position: 60 +sidebar_label: clickhouse-local +--- + +# clickhouse-local + +## 関連コンテンツ + +- ブログ: [clickhouse-localを使用ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‡ãƒ¼ã‚¿ã‚’抽出ã€å¤‰æ›ã€ãŠã‚ˆã³ã‚¯ã‚¨ãƒª](https://clickhouse.com/blog/extracting-converting-querying-local-files-with-sql-clickhouse-local) + +## clickhouse-localã¨ClickHouseã®ã©ã¡ã‚‰ã‚’使用ã™ã‚‹ã‹ + +`clickhouse-local` ã¯ã€SQLを使用ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ãŠã‚ˆã³ãƒªãƒ¢ãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’高速ã«å‡¦ç†ã™ã‚‹å¿…è¦ãŒã‚る開発者ã«ã¨ã£ã¦ã€å®Œå…¨ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚µãƒ¼ãƒãƒ¼ã‚’インストールã™ã‚‹ã“ã¨ãªã使用ã§ãã‚‹ã€ç°¡å˜ãªClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã™ã€‚`clickhouse-local` を使用ã™ã‚‹ã“ã¨ã§ã€é–‹ç™ºè€…ã¯ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‹ã‚‰ç›´æŽ¥SQLコマンドを使用ã™ã‚‹ã“ã¨ãŒã§ãã€å®Œå…¨ãªClickHouseã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚’å¿…è¦ã¨ã›ãšã«ClickHouse機能ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã®ç°¡å˜ã§åŠ¹çŽ‡çš„ãªæ–¹æ³•ã‚’æä¾›ã—ã¾ã™ã€‚`clickhouse-local` ã®ä¸»ãªåˆ©ç‚¹ã®ã²ã¨ã¤ã¯ã€[clickhouse-client](https://clickhouse.com/docs/ja/integrations/sql-clients/clickhouse-client-local) をインストールã™ã‚‹éš›ã«ã™ã§ã«å«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã§ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€è¤‡é›‘ãªã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãƒ—ロセスを必è¦ã¨ã›ãšã«ã€é–‹ç™ºè€…ã¯ã™ãã« `clickhouse-local` を使用開始ã§ãã¾ã™ã€‚ + +`clickhouse-local` ã¯é–‹ç™ºã¨ãƒ†ã‚¹ãƒˆç›®çš„ã€ãŠã‚ˆã³ãƒ•ã‚¡ã‚¤ãƒ«å‡¦ç†ã«é–¢ã—ã¦éžå¸¸ã«ä¾¿åˆ©ãªãƒ„ールã§ã™ãŒã€ã‚¨ãƒ³ãƒ‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„アプリケーションå‘ã‘ã®ã‚µãƒ¼ãƒãƒ¼ã¨ã—ã¦ã¯é©ã—ã¦ã„ã¾ã›ã‚“。ã“れらã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€ã‚ªãƒ¼ãƒ—ンソース㮠[ClickHouse](https://clickhouse.com/docs/ja/install) ã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ClickHouseã¯å¤§è¦æ¨¡ãªåˆ†æžãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚’処ç†ã™ã‚‹ã‚ˆã†è¨­è¨ˆã•ã‚ŒãŸå¼·åŠ›ãªOLAPデータベースã§ã‚ã‚Šã€å¤§è¦æ¨¡ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«å¯¾ã™ã‚‹è¤‡é›‘ãªã‚¯ã‚¨ãƒªã®è¿…速ã‹ã¤åŠ¹çŽ‡çš„ãªå‡¦ç†ã‚’æä¾›ã—ã€ãƒã‚¤ãƒ‘フォーマンスãŒé‡è¦ãªæœ¬ç•ªç’°å¢ƒã§ã®ä½¿ç”¨ã«æœ€é©ã§ã™ã€‚ã•ã‚‰ã«ã€ClickHouseã¯ãƒ¬ãƒ—リケーションã€ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€é«˜å¯ç”¨æ€§ãªã©ã€ã‚¢ãƒ—リケーションをサãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—ã™ã‚‹ãŸã‚ã«ä¸å¯æ¬ ãªæ©Ÿèƒ½ã‚’幅広ãæä¾›ã—ã¦ã„ã¾ã™ã€‚より大ããªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’扱ã£ãŸã‚Šã€ã‚¨ãƒ³ãƒ‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„アプリケーションをサãƒãƒ¼ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`clickhouse-local` ã®ä»£ã‚ã‚Šã«ã‚ªãƒ¼ãƒ—ンソースã®ClickHouseを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +以下ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ã€`clickhouse-local` ã®ä½¿ç”¨ä¾‹ï¼ˆ[ローカルファイルã¸ã®ã‚¯ã‚¨ãƒª](#query_data_in_file) ã‚„ [S3ã®Parquetファイルを読ã¿å–ã‚‹](#query-data-in-a-parquet-file-in-aws-s3))をã”覧ãã ã•ã„。 + +## clickhouse-localã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ + +`clickhouse-local` ã¯ClickHouseサーãƒãƒ¼ã¨ `clickhouse-client` を実行ã™ã‚‹åŒã˜ `clickhouse` ãƒã‚¤ãƒŠãƒªã‚’使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚最新ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンロードã™ã‚‹æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +```bash +curl https://clickhouse.com/ | sh +``` + +:::note +ダウンロードã—ãŸã°ã‹ã‚Šã®ãƒã‚¤ãƒŠãƒªã¯ã€ã•ã¾ã–ã¾ãªClickHouseツールã¨ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã‚’実行ã§ãã¾ã™ã€‚データベースサーãƒãƒ¼ã¨ã—ã¦ClickHouseを実行ã—ãŸã„å ´åˆã¯ã€[クイックスタート](../../quick-start.mdx)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## ファイル内ã®ãƒ‡ãƒ¼ã‚¿ã«SQLã§ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ {#query_data_in_file} + +`clickhouse-local` ã®ä¸€èˆ¬çš„ãªä½¿ç”¨æ–¹æ³•ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã—ã¦ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã§ã™ã€‚データをテーブルã«æŒ¿å…¥ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。`clickhouse-local` ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’一時テーブルã«ã‚¹ãƒˆãƒªãƒ¼ãƒ ã—ã€SQLを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ファイル㌠`clickhouse-local` ã¨åŒã˜ãƒžã‚·ãƒ³ä¸Šã«ã‚ã‚‹å ´åˆã€ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’指定ã™ã‚‹ã ã‘ã§æ¸ˆã¿ã¾ã™ã€‚以下㮠`reviews.tsv` ファイルã«ã¯ã€Amazon製å“レビューã®ã‚µãƒ³ãƒ—ルãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +```bash +./clickhouse local -q "SELECT * FROM 'reviews.tsv'" +``` + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã§ã™ã€‚ + +```bash +./clickhouse local -q "SELECT * FROM file('reviews.tsv')" +``` + +ClickHouseã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‹¡å¼µå­ã‹ã‚‰ã‚¿ãƒ–区切り形å¼ã‚’知ã£ã¦ã„ã¾ã™ã€‚å½¢å¼ã‚’明示的ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€[ClickHouseã®å¤šãã®å…¥åŠ›å½¢å¼](../../interfaces/formats.md)ã®ã„ãšã‚Œã‹ã‚’追加ã™ã‚‹ã ã‘ã§æ¸ˆã¿ã¾ã™ã€‚ + +```bash +./clickhouse local -q "SELECT * FROM file('reviews.tsv', 'TabSeparated')" +``` + +`file` テーブル関数ã¯ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€`DESCRIBE` を使用ã—ã¦æŽ¨æ¸¬ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚ + +```bash +./clickhouse local -q "DESCRIBE file('reviews.tsv')" +``` + +:::tip +ファイルåã§ã‚°ãƒ­ãƒ–を使用ã™ã‚‹ã“ã¨ãŒè¨±å¯ã•ã‚Œã¦ã„ã¾ã™ï¼ˆ[グロブã®ç½®æ›](/docs/ja/sql-reference/table-functions/file.md/#globs-in-path) ã‚’å‚照)。 + +例: + +```bash +./clickhouse local -q "SELECT * FROM 'reviews*.jsonl'" +./clickhouse local -q "SELECT * FROM 'review_?.csv'" +./clickhouse local -q "SELECT * FROM 'review_{1..3}.csv'" +``` + +::: + +```response +marketplace Nullable(String) +customer_id Nullable(Int64) +review_id Nullable(String) +product_id Nullable(String) +product_parent Nullable(Int64) +product_title Nullable(String) +product_category Nullable(String) +star_rating Nullable(Int64) +helpful_votes Nullable(Int64) +total_votes Nullable(Int64) +vine Nullable(String) +verified_purchase Nullable(String) +review_headline Nullable(String) +review_body Nullable(String) +review_date Nullable(Date) +``` + +最高評価ã®è£½å“を見ã¤ã‘ã¾ã—ょã†ã€‚ + +```bash +./clickhouse local -q "SELECT + argMax(product_title,star_rating), + max(star_rating) +FROM file('reviews.tsv')" +``` + +```response +Monopoly Junior Board Game 5 +``` + +## AWS S3ã®Parquetファイルã«ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ + +S3ã«ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚‹å ´åˆã€`clickhouse-local` 㨠`s3` テーブル関数を使用ã—ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ClickHouseテーブルã«æŒ¿å…¥ã›ãšã«ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ã€‚イギリスã§å£²ã‚‰ã‚ŒãŸä¸å‹•ç”£ã®ä¾¡æ ¼æƒ…報をå«ã‚€ `house_0.parquet` ã¨ã„ã†åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå…¬é–‹ãƒã‚±ãƒƒãƒˆã«ã‚ã‚Šã¾ã™ã€‚行数を確èªã—ã¦ã¿ã¾ã—ょã†ã€‚ + +```bash +./clickhouse local -q " +SELECT count() +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/house_parquet/house_0.parquet')" +``` + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ã¯270万行ã‚ã‚Šã¾ã™ã€‚ + +```response +2772030 +``` + +ClickHouseãŒãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰æŽ¨æ¸¬ã™ã‚‹ã‚¹ã‚­ãƒ¼ãƒžã‚’見るã“ã¨ã¯å¸¸ã«æœ‰ç”¨ã§ã™ã€‚ + +```bash +./clickhouse local -q "DESCRIBE s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/house_parquet/house_0.parquet')" +``` + +```response +price Nullable(Int64) +date Nullable(UInt16) +postcode1 Nullable(String) +postcode2 Nullable(String) +type Nullable(String) +is_new Nullable(UInt8) +duration Nullable(String) +addr1 Nullable(String) +addr2 Nullable(String) +street Nullable(String) +locality Nullable(String) +town Nullable(String) +district Nullable(String) +county Nullable(String) +``` + +最も高価ãªåœ°åŸŸã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ + +```bash +./clickhouse local -q " +SELECT + town, + district, + count() AS c, + round(avg(price)) AS price, + bar(price, 0, 5000000, 100) +FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/house_parquet/house_0.parquet') +GROUP BY + town, + district +HAVING c >= 100 +ORDER BY price DESC +LIMIT 10" +``` + +```response +LONDON CITY OF LONDON 886 2271305 █████████████████████████████████████████████■+LEATHERHEAD ELMBRIDGE 206 1176680 ███████████████████████▌ +LONDON CITY OF WESTMINSTER 12577 1108221 ██████████████████████■+LONDON KENSINGTON AND CHELSEA 8728 1094496 █████████████████████▉ +HYTHE FOLKESTONE AND HYTHE 130 1023980 ████████████████████■+CHALFONT ST GILES CHILTERN 113 835754 ████████████████▋ +AMERSHAM BUCKINGHAMSHIRE 113 799596 ███████████████▉ +VIRGINIA WATER RUNNYMEDE 356 789301 ███████████████▊ +BARNET ENFIELD 282 740514 ██████████████▊ +NORTHWOOD THREE RIVERS 184 731609 ██████████████▋ +``` + +:::tip +ファイルをClickHouseã«æŒ¿å…¥ã™ã‚‹æº–å‚™ãŒæ•´ã£ãŸã‚‰ã€ClickHouseサーãƒãƒ¼ã‚’èµ·å‹•ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã¨ `s3` テーブル関数ã®çµæžœã‚’ `MergeTree` テーブルã«æŒ¿å…¥ã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[クイックスタート](../../quick-start.mdx)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## フォーマットã®å¤‰æ› + +`clickhouse-local` を使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚’ç•°ãªã‚‹å½¢å¼ã«å¤‰æ›ã§ãã¾ã™ã€‚例: + +``` bash +$ clickhouse-local --input-format JSONLines --output-format CSV --query "SELECT * FROM table" < data.json > data.csv +``` + +å½¢å¼ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‹¡å¼µå­ã‹ã‚‰è‡ªå‹•æ¤œå‡ºã•ã‚Œã¾ã™ï¼š + +``` bash +$ clickhouse-local --query "SELECT * FROM table" < data.json > data.csv +``` + +ショートカットã¨ã—㦠`--copy` 引数を使用ã—ã¦ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +``` bash +$ clickhouse-local --copy < data.json > data.csv +``` + +## 使用法 {#usage} + +デフォルトã§ã¯ã€`clickhouse-local` ã¯åŒã˜ãƒ›ã‚¹ãƒˆä¸Šã®ClickHouseサーãƒãƒ¼ã®ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã€ã‚µãƒ¼ãƒãƒ¼ã®è¨­å®šã«ã¯ä¾å­˜ã—ã¾ã›ã‚“。ã¾ãŸã€`--config-file` 引数を使用ã—ã¦ã‚µãƒ¼ãƒãƒ¼è¨­å®šã‚’読ã¿è¾¼ã‚€ã“ã¨ã‚‚サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚テンãƒãƒ©ãƒªãƒ‡ãƒ¼ã‚¿ã«ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ä¸€æ„ã®ãƒ†ãƒ³ãƒãƒ©ãƒªãƒ‡ãƒ¼ã‚¿ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãŒä½œæˆã•ã‚Œã¾ã™ã€‚ + +基本的ãªä½¿ç”¨æ³• (Linux): + +``` bash +$ clickhouse-local --structure "table_structure" --input-format "format_of_incoming_data" --query "query" +``` + +基本的ãªä½¿ç”¨æ³• (Mac): + +``` bash +$ ./clickhouse local --structure "table_structure" --input-format "format_of_incoming_data" --query "query" +``` + +:::note +`clickhouse-local` ã¯WSL2を介ã—ã¦Windowsã§ã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +引数: + +- `-S`, `--structure` — 入力データã®ãƒ†ãƒ¼ãƒ–ル構造。 +- `--input-format` — 入力フォーマットã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ `TSV`。 +- `-F`, `--file` — データã¸ã®ãƒ‘スã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ `stdin`。 +- `-q`, `--query` — `;` ã§åŒºåˆ‡ã‚‰ã‚Œã‚‹å®Ÿè¡Œã™ã‚‹ã‚¯ã‚¨ãƒªã€‚`--query` ã¯è¤‡æ•°å›žæŒ‡å®šå¯èƒ½ã€ä¾‹: `--query "SELECT 1" --query "SELECT 2"`。`--queries-file`ã¨åŒæ™‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- `--queries-file` - 実行ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’æŒã¤ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘ス。`--queries-file` ã¯è¤‡æ•°å›žæŒ‡å®šå¯èƒ½ã€ä¾‹: `--query queries1.sql --query queries2.sql`。`--query` ã¨åŒæ™‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- `--multiquery, -n` – ã“ã®ã‚ªãƒ—ションãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚»ãƒŸã‚³ãƒ­ãƒ³ã§åŒºåˆ‡ã‚‰ã‚ŒãŸè¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚’ `--query` オプションã®å¾Œã«ãƒªã‚¹ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚便利ãªç‚¹ã¨ã—ã¦ã€`--query` ã‚’çœç•¥ã—ã€`--multiquery` ã®ç›´å¾Œã«ã‚¯ã‚¨ãƒªã‚’直接渡ã™ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ +- `-N`, `--table` — 出力データを置ãテーブルåã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ `table`。 +- `-f`, `--format`, `--output-format` — 出力フォーマットã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ `TSV`。 +- `-d`, `--database` — デフォルトデータベースã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ `_local`。 +- `--stacktrace` — 例外ã®éš›ã«ãƒ‡ãƒãƒƒã‚°å‡ºåŠ›ã‚’ダンプã™ã‚‹ã‹ã©ã†ã‹ã€‚ +- `--echo` — 実行å‰ã«ã‚¯ã‚¨ãƒªã‚’表示。 +- `--verbose` — クエリ実行ã«é–¢ã™ã‚‹è©³ç´°æƒ…報。 +- `--logger.console` — コンソールã¸ã®ãƒ­ã‚°ã€‚ +- `--logger.log` — ログファイルå。 +- `--logger.level` — ログレベル。 +- `--ignore-error` — クエリãŒå¤±æ•—ã—ã¦ã‚‚処ç†ã‚’åœæ­¢ã—ãªã„。 +- `-c`, `--config-file` — ClickHouseサーãƒãƒ¼ç”¨ã®ã‚‚ã®ã¨åŒã˜å½¢å¼ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‘ス。デフォルトã¯è¨­å®šãªã—。 +- `--no-system-tables` — システムテーブルをアタッãƒã—ãªã„。 +- `--help` — `clickhouse-local` ã®å¼•æ•°ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ã€‚ +- `-V`, `--version` — ãƒãƒ¼ã‚¸ãƒ§ãƒ³æƒ…報を表示ã—ã¦çµ‚了。 + +ã¾ãŸã€ã‚ˆã‚Šä¸€èˆ¬çš„ã«ä½¿ç”¨ã•ã‚Œã‚‹ClickHouseã®è¨­å®šå¤‰æ•°ç”¨ã®å¼•æ•°ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +## 例 {#examples} + +``` bash +$ echo -e "1,2\n3,4" | clickhouse-local --structure "a Int64, b Int64" \ + --input-format "CSV" --query "SELECT * FROM table" +Read 2 rows, 32.00 B in 0.000 sec., 5182 rows/sec., 80.97 KiB/sec. +1 2 +3 4 +``` + +å‰è¿°ã®ä¾‹ã¯ä»¥ä¸‹ã¨åŒã˜ã§ã™ã€‚ + +``` bash +$ echo -e "1,2\n3,4" | clickhouse-local -n --query " + CREATE TABLE table (a Int64, b Int64) ENGINE = File(CSV, stdin); + SELECT a, b FROM table; + DROP TABLE table;" +Read 2 rows, 32.00 B in 0.000 sec., 4987 rows/sec., 77.93 KiB/sec. +1 2 +3 4 +``` + +`stdin` ã‚„ `--file` 引数を使用ã™ã‚‹å¿…è¦ã¯ãªãã€[`file` テーブル関数](../../sql-reference/table-functions/file.md)を使用ã—ã¦ä»»æ„ã®æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +``` bash +$ echo 1 | tee 1.tsv +1 + +$ echo 2 | tee 2.tsv +2 + +$ clickhouse-local --query " + select * from file('1.tsv', TSV, 'a int') t1 + cross join file('2.tsv', TSV, 'b int') t2" +1 2 +``` + +次ã«ã€å„Unixユーザーã®ãƒ¡ãƒ¢ãƒªãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’出力ã—ã¦ã¿ã¾ã—ょã†ã€‚ + +クエリ: + +``` bash +$ ps aux | tail -n +2 | awk '{ printf("%s\t%s\n", $1, $4) }' \ + | clickhouse-local --structure "user String, mem Float64" \ + --query "SELECT user, round(sum(mem), 2) as memTotal + FROM table GROUP BY user ORDER BY memTotal DESC FORMAT Pretty" +``` + +çµæžœï¼š + +``` text +Read 186 rows, 4.15 KiB in 0.035 sec., 5302 rows/sec., 118.34 KiB/sec. +â”â”â”â”â”â”â”â”â”â”â”┳â”â”â”â”â”â”â”â”â”â”┓ +┃ user ┃ memTotal ┃ +┡â”â”â”â”â”â”â”â”â”â”╇â”â”â”â”â”â”â”â”â”â”┩ +│ bayonet │ 113.5 │ +├──────────┼──────────┤ +│ root │ 8.8 │ +├──────────┼──────────┤ +... +``` + +## 関連コンテンツ + +- [clickhouse-localを使用ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ‡ãƒ¼ã‚¿ã‚’抽出ã€å¤‰æ›ã€ãŠã‚ˆã³ã‚¯ã‚¨ãƒª](https://clickhouse.com/blog/extracting-converting-querying-local-files-with-sql-clickhouse-local) +- [ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿æŠ•å…¥ - パート1](https://clickhouse.com/blog/getting-data-into-clickhouse-part-1) +- [巨大ãªå®Ÿä¸–ç•Œã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’探索ã™ã‚‹: 100年以上ã®æ°—象記録をClickHouseã§](https://clickhouse.com/blog/real-world-data-noaa-climate-data) diff --git a/docs/ja/operations/utilities/clickhouse-obfuscator.md b/docs/ja/operations/utilities/clickhouse-obfuscator.md new file mode 100644 index 00000000000..08f01f8c82b --- /dev/null +++ b/docs/ja/operations/utilities/clickhouse-obfuscator.md @@ -0,0 +1,43 @@ +--- +slug: /ja/operations/utilities/clickhouse-obfuscator +title: clickhouse-obfuscator +--- + +テーブルデータã®é›£èª­åŒ–ã®ãŸã‚ã®ã‚·ãƒ³ãƒ—ルãªãƒ„ールã§ã™ã€‚ + +ã“ã®ãƒ„ールã¯å…¥åŠ›ãƒ†ãƒ¼ãƒ–ルを読ã¿è¾¼ã¿ã€ä¸€éƒ¨ã®ç‰¹æ€§ã‚’ä¿æŒã—ã¤ã¤ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€å‡ºåŠ›ãƒ†ãƒ¼ãƒ–ルを生æˆã—ã¾ã™ã€‚ +ã“ã®æ–¹æ³•ã¯ã€ãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã«å®Ÿéš›ã®æœ¬ç•ªãƒ‡ãƒ¼ã‚¿ã«è¿‘ã„データを公開ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +ã“ã®ãƒ„ールã¯ä»¥ä¸‹ã®ãƒ‡ãƒ¼ã‚¿ã®ç‰¹æ€§ã‚’ä¿æŒã™ã‚‹ã‚ˆã†ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ï¼š +- å„カラムãŠã‚ˆã³ã‚«ãƒ©ãƒ ã®çµ„ã®å€¤ã®åŸºæ•°ï¼ˆç•°ãªã‚‹å€¤ã®æ•°ï¼‰ +- æ¡ä»¶ä»˜ã基数:別ã®ã‚«ãƒ©ãƒ ã®å€¤ã‚’æ¡ä»¶ã«ã—ãŸå ´åˆã®ã‚るカラムã®ç•°ãªã‚‹å€¤ã®æ•° +- æ•´æ•°ã®çµ¶å¯¾å€¤ã®ç¢ºçŽ‡åˆ†å¸ƒï¼›ç¬¦å·ä»˜ãæ•´æ•°ã®ç¬¦å·ï¼›æµ®å‹•å°æ•°ç‚¹æ•°ã®æŒ‡æ•°ã¨ç¬¦å· +- 文字列ã®é•·ã•ã®ç¢ºçŽ‡åˆ†å¸ƒ +- 数値ã®ã‚¼ãƒ­å€¤ã€ç©ºæ–‡å­—列ã¨é…列ã€`NULL`ã®ç¢ºçŽ‡ + +- LZ77やエントロピー系ã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã§åœ§ç¸®ã•ã‚ŒãŸå ´åˆã®ãƒ‡ãƒ¼ã‚¿åœ§ç¸®çŽ‡ +- テーブル内ã®æ™‚間値ã®é€£ç¶šæ€§ï¼ˆå·®ç•°ã®å¤§ãã•ï¼‰ï¼›æµ®å‹•å°æ•°ç‚¹å€¤ã®é€£ç¶šæ€§ +- `DateTime`値ã®æ—¥ä»˜è¦ç´  + +- 文字列値ã®UTF-8ã®å¦¥å½“性 +- 文字列値ãŒè‡ªç„¶ã«è¦‹ãˆã‚‹ã“㨠+ +上記ã®ç‰¹æ€§ã®å¤šãã¯ãƒ‘フォーマンステストã«æœ‰åŠ¹ã§ã™ï¼š + +データã®èª­ã¿å–ã‚Šã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã€é›†è¨ˆã€ãŠã‚ˆã³ã‚½ãƒ¼ãƒˆã¯ã€åŸºæ•°ã€å¤§å°ã€åœ§ç¸®çŽ‡ãªã©ãŒä¿å­˜ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€å…ƒã®ãƒ‡ãƒ¼ã‚¿ã¨ã»ã¼åŒã˜é€Ÿåº¦ã§å‹•ä½œã—ã¾ã™ã€‚ + +動作ã¯æ±ºå®šçš„ã§ã™ï¼šã‚·ãƒ¼ãƒ‰å€¤ã‚’定義ã—ã€å¤‰æ›ã¯å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã¨ã‚·ãƒ¼ãƒ‰ã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã¾ã™ã€‚ +ã„ãã¤ã‹ã®å¤‰æ›ã¯ä¸€å¯¾ä¸€ã§é€†ã«ã™ã‚‹ã“ã¨ãŒã§ãã‚‹ãŸã‚ã€å¤§ããªã‚·ãƒ¼ãƒ‰ã‚’æŒã¡ã€ãれを秘密ã«ã—ã¦ãŠãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +データを変æ›ã™ã‚‹ãŸã‚ã«ã„ãã¤ã‹ã®æš—å·åŒ–プリミティブを使用ã—ã¦ã„ã¾ã™ãŒã€æš—å·åŒ–ã®è¦³ç‚¹ã‹ã‚‰ã¯é©åˆ‡ã«è¡Œã‚ã‚Œã¦ã„ãªã„ãŸã‚ã€ä»–ã®ç†ç”±ãŒãªã„é™ã‚Šçµæžœã‚’安全ã¨ã¿ãªã™ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。çµæžœã¯å…¬é–‹ã—ãŸããªã„データを一部ä¿æŒã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +0, 1, -1ã®æ•°å€¤ã€æ—¥ä»˜ã€é…列ã®é•·ã•ã€ãƒŒãƒ«ãƒ•ãƒ©ã‚°ã¯å¸¸ã«ã‚½ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ã¨ã¾ã£ãŸãåŒã˜ã«ãªã‚Šã¾ã™ã€‚ +例ãˆã°ã€ãƒ†ãƒ¼ãƒ–ル内ã«`IsMobile`ã¨ã„ã†ã‚«ãƒ©ãƒ ãŒã‚ã‚Šã€å€¤ãŒ0ã¨1ã§ã‚ã‚‹å ´åˆã€å¤‰æ›ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã§ã‚‚åŒã˜å€¤ã‚’ä¿æŒã—ã¾ã™ã€‚ + +ã—ãŸãŒã£ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ­£ç¢ºãªãƒ¢ãƒã‚¤ãƒ«ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®å‰²åˆã‚’カウントã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +別ã®ä¾‹ã‚’示ã—ã¾ã™ã€‚テーブル内ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã®ã‚ˆã†ãªãƒ—ライベートデータãŒã‚ã‚Šã€å˜ä¸€ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’公開ã—ãŸããªã„å ´åˆã€ +テーブルãŒå分ã«å¤§ããã€è¤‡æ•°ã®ç•°ãªã‚‹ãƒ¡ãƒ¼ãƒ«ã‚’å«ã¿ã€ä»–ã®ã™ã¹ã¦ã‚ˆã‚Šã‚‚éžå¸¸ã«é«˜ã„頻度をæŒã¤ãƒ¡ãƒ¼ãƒ«ãŒãªã„å ´åˆã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒåŒ¿å化ã•ã‚Œã¾ã™ã€‚ã—ã‹ã—ã€ã‚«ãƒ©ãƒ å†…ã®ç•°ãªã‚‹å€¤ã®æ•°ãŒå°‘ãªã„å ´åˆã€ã„ãã¤ã‹ã‚’å†ç¾ã™ã‚‹ã“ã¨ãŒã§ãã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã®ãƒ„ールãŒã©ã®ã‚ˆã†ã«å‹•ä½œã™ã‚‹ã‹ã€ãã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’ç†è§£ã—ã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ‘ラメータを詳細ã«èª¿æ•´ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +ã“ã®ãƒ„ールã¯ã€å°‘ãªãã¨ã‚‚中程度ã®ãƒ‡ãƒ¼ã‚¿é‡ï¼ˆå°‘ãªãã¨ã‚‚1000行)ã§ã®ã¿æ­£å¸¸ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ diff --git a/docs/ja/operations/utilities/index.md b/docs/ja/operations/utilities/index.md new file mode 100644 index 00000000000..fc324c26a46 --- /dev/null +++ b/docs/ja/operations/utilities/index.md @@ -0,0 +1,16 @@ +--- +slug: /ja/operations/utilities/ +sidebar_position: 56 +sidebar_label: ツールã¨ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã®ä¸€è¦§ +--- + +# ツールã¨ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã®ä¸€è¦§ + +- [clickhouse-local](../../operations/utilities/clickhouse-local.md) — ClickHouseサーãƒãƒ¼ã‚’èµ·å‹•ã›ãšã«ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦SQLクエリを実行ã§ãるツールã§ã€`awk`ã®ã‚ˆã†ãªå‹•ä½œã‚’ã—ã¾ã™ã€‚ +- [clickhouse-benchmark](../../operations/utilities/clickhouse-benchmark.md) — サーãƒãƒ¼ã«ã‚«ã‚¹ã‚¿ãƒ ã‚¯ã‚¨ãƒªã‚„設定を読ã¿è¾¼ã¾ã›ã¾ã™ã€‚ +- [clickhouse-format](../../operations/utilities/clickhouse-format.md) — 入力クエリã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’æ•´ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- [ClickHouse obfuscator](../../operations/utilities/clickhouse-obfuscator.md) — データを難読化ã—ã¾ã™ã€‚ +- [ClickHouse compressor](../../operations/utilities/clickhouse-compressor.md) — データを圧縮・解å‡ã—ã¾ã™ã€‚ +- [clickhouse-disks](../../operations/utilities/clickhouse-disks.md) — ç•°ãªã‚‹ClickHouseディスク間ã§ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã®ã‚ˆã†ãªæ“作をæä¾›ã—ã¾ã™ã€‚ +- [clickhouse-odbc-bridge](../../operations/utilities/odbc-bridge.md) — ODBCドライãƒãƒ¼ã®ãŸã‚ã®ãƒ—ロキシサーãƒãƒ¼ã§ã™ã€‚ +- [clickhouse_backupview](../../operations/utilities/backupview.md) — ClickHouseã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を分æžã™ã‚‹ãŸã‚ã®Pythonモジュールã§ã™ã€‚ diff --git a/docs/ja/operations/utilities/odbc-bridge.md b/docs/ja/operations/utilities/odbc-bridge.md new file mode 100644 index 00000000000..8f65826b5c9 --- /dev/null +++ b/docs/ja/operations/utilities/odbc-bridge.md @@ -0,0 +1,35 @@ +--- +slug: /ja/operations/utilities/odbc-bridge +title: clickhouse-odbc-bridge +--- + +ODBCドライãƒãƒ¼ã®ãƒ—ロキシã¨ã—ã¦æ©Ÿèƒ½ã™ã‚‹ã‚·ãƒ³ãƒ—ルãªHTTPサーãƒãƒ¼ã§ã™ã€‚主ãªå‹•æ©Ÿã¯ã€ODBC実装ã§å¯èƒ½æ€§ã®ã‚るセグメンテーションフォルトや他ã®ãƒ•ã‚©ãƒ«ãƒˆãŒåŽŸå› ã§ã€clickhouse-serverプロセス全体をクラッシュã•ã›ã‚‹ã“ã¨ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ + +ã“ã®ãƒ„ールã¯HTTP経由ã§å‹•ä½œã—ã€ãƒ‘イプã€å…±æœ‰ãƒ¡ãƒ¢ãƒªã€TCPã§ã¯å‹•ä½œã—ã¾ã›ã‚“。ç†ç”±ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š +- 実装ãŒç°¡å˜ã§ã‚ã‚‹ã“㨠+- デãƒãƒƒã‚°ãŒã—ã‚„ã™ã„ã“㨠+- jdbc-bridgeã‚‚åŒæ§˜ã«å®Ÿè£…ã™ã‚‹ã“ã¨ãŒã§ãã‚‹ã“㨠+ +## 使用方法 + +`clickhouse-server`ã¯ã€ã“ã®ãƒ„ールをODBCテーブル関数ãŠã‚ˆã³StorageODBCã®å†…部ã§ä½¿ç”¨ã—ã¾ã™ã€‚ã—ã‹ã—ãªãŒã‚‰ã€ä»¥ä¸‹ã®ãƒ‘ラメータをPOSTリクエストã®URLã§æŒ‡å®šã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‹ã‚‰ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ãƒ„ールã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š +- `connection_string` -- ODBC接続文字列。 +- `sample_block` -- ClickHouse NamesAndTypesListå½¢å¼ã§ã®ã‚«ãƒ©ãƒ ã®èª¬æ˜Žã€åå‰ã¯ãƒãƒƒã‚¯ã‚¯ã‚©ãƒ¼ãƒˆã€åž‹ã¯æ–‡å­—列ã¨ã—ã¦è¨˜è¿°ã—ã¾ã™ã€‚åå‰ã¨åž‹ã¯ã‚¹ãƒšãƒ¼ã‚¹ã§åŒºåˆ‡ã‚Šã€è¡Œã¯æ”¹è¡Œã§åŒºåˆ‡ã‚Šã¾ã™ã€‚ +- `max_block_size` -- オプションã®ãƒ‘ラメータã§ã€å˜ä¸€ãƒ–ロックã®æœ€å¤§ã‚µã‚¤ã‚ºã‚’設定ã—ã¾ã™ã€‚クエリã¯ãƒã‚¹ãƒˆãƒœãƒ‡ã‚£ã§é€ä¿¡ã•ã‚Œã¾ã™ã€‚レスãƒãƒ³ã‚¹ã¯RowBinaryå½¢å¼ã§è¿”ã•ã‚Œã¾ã™ã€‚ + +## 例: + +```bash +$ clickhouse-odbc-bridge --http-port 9018 --daemon + +$ curl -d "query=SELECT PageID, ImpID, AdType FROM Keys ORDER BY PageID, ImpID" --data-urlencode "connection_string=DSN=ClickHouse;DATABASE=stat" --data-urlencode "sample_block=columns format version: 1 +3 columns: +\`PageID\` String +\`ImpID\` String +\`AdType\` String +" "http://localhost:9018/" > result.txt + +$ cat result.txt +12246623837185725195925621517 +``` + diff --git a/docs/ja/operations/workload-scheduling.md b/docs/ja/operations/workload-scheduling.md new file mode 100644 index 00000000000..4bc467050b6 --- /dev/null +++ b/docs/ja/operations/workload-scheduling.md @@ -0,0 +1,215 @@ +--- +slug: /ja/operations/workload-scheduling +sidebar_position: 69 +sidebar_label: "ワークロードスケジューリング" +title: "ワークロードスケジューリング" +--- + +ClickHouseãŒè¤‡æ•°ã®ã‚¯ã‚¨ãƒªã‚’åŒæ™‚ã«å®Ÿè¡Œã™ã‚‹å ´åˆã€ãれらã¯å…±æœ‰ãƒªã‚½ãƒ¼ã‚¹ï¼ˆä¾‹ï¼šãƒ‡ã‚£ã‚¹ã‚¯ï¼‰ã‚’使用ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚スケジューリング制約ã¨ãƒãƒªã‚·ãƒ¼ã‚’é©ç”¨ã™ã‚‹ã“ã¨ã§ã€ç•°ãªã‚‹ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰é–“ã§ãƒªã‚½ãƒ¼ã‚¹ãŒã©ã®ã‚ˆã†ã«åˆ©ç”¨ã•ã‚Œå…±æœ‰ã•ã‚Œã‚‹ã®ã‹ã‚’調整ã§ãã¾ã™ã€‚å„リソースã«ã¯ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°éšŽå±¤ã‚’設定ã§ãã¾ã™ã€‚階層ã®ãƒ«ãƒ¼ãƒˆã¯ãƒªã‚½ãƒ¼ã‚¹ã‚’表ã—ã€ãƒªãƒ¼ãƒ•ã¯ãƒªã‚½ãƒ¼ã‚¹ã‚­ãƒ£ãƒ‘シティを超ãˆãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’ä¿æŒã™ã‚‹ã‚­ãƒ¥ãƒ¼ã§ã™ã€‚ + +:::note +ç¾åœ¨ã€èª¬æ˜Žã•ã‚ŒãŸæ–¹æ³•ã‚’使用ã—ã¦ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°ã§ãã‚‹ã®ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ã‚£ã‚¹ã‚¯IOã®ã¿ã§ã™ã€‚CPUスケジューリングã«ã¤ã„ã¦ã¯ã€ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ—ールã¨[`concurrent_threads_soft_limit_num`](server-configuration-parameters/settings.md#concurrent_threads_soft_limit_num)ã®è¨­å®šã‚’å‚ç…§ã—ã¦ãã ã•ã„。柔軟ãªãƒ¡ãƒ¢ãƒªåˆ¶é™ã«ã¤ã„ã¦ã¯[メモリオーãƒãƒ¼ã‚³ãƒŸãƒƒãƒˆ](settings/memory-overcommit.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +## ディスク設定 {#disk-config} + +特定ã®ãƒ‡ã‚£ã‚¹ã‚¯ã§IOスケジューリングを有効ã«ã™ã‚‹ã«ã¯ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸è¨­å®šã§`read_resource`ã¾ãŸã¯`write_resource`を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æŒ‡å®šã•ã‚ŒãŸãƒ‡ã‚£ã‚¹ã‚¯ã§ã®èª­ã¿å–ã‚ŠãŠã‚ˆã³æ›¸ãè¾¼ã¿ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å¯¾ã—ã¦ã€ClickHouseãŒã©ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’使用ã™ã‚‹ã¹ãã‹ã‚’示ã—ã¾ã™ã€‚ローカルSSDã‚„HDDã®å ´åˆã€èª­ã¿å–ã‚ŠãŠã‚ˆã³æ›¸ãè¾¼ã¿ãƒªã‚½ãƒ¼ã‚¹ã¯åŒã˜ãƒªã‚½ãƒ¼ã‚¹åã‚’å‚ç…§ã§ãã¾ã™ã€‚リモートディスクã®å ´åˆã‚‚åŒæ§˜ã«ã€è¤‡æ•°ã®ç•°ãªã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ãŒåŒã˜ãƒªã‚½ãƒ¼ã‚¹ã‚’å‚ç…§ã™ã‚‹ã“ã¨ãŒã§ãã€ã€Œãƒ—ロダクションã€ã‚„「開発ã€ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰é–“ã§ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å¸¯åŸŸå¹…ã‚’é©åˆ‡ã«åˆ†é…ã—ãŸã„å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ + +例: +```xml + + + ... + + + s3 + https://clickhouse-public-datasets.s3.amazonaws.com/my-bucket/root-path/ + your_access_key_id + your_secret_access_key + network_read + network_write + + + + + +
    + s3 +
    +
    +
    +
    +
    +
    +``` + +リソースã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ã‚’指定ã™ã‚‹ã‚‚ã†ä¸€ã¤ã®æ–¹æ³•ã¨ã—ã¦SQL構文ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +CREATE RESOURCE resource_name (WRITE DISK disk1, READ DISK disk2) +``` + +リソースã¯ã€èª­ã¿å–ã‚Šã¾ãŸã¯æ›¸ãè¾¼ã¿ã€ã¾ãŸã¯ãã®ä¸¡æ–¹ã®ãŸã‚ã«ä»»æ„ã®æ•°ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«ãƒªã‚½ãƒ¼ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ã‚’表ç¾ã™ã‚‹æ§‹æ–‡ã‚‚ã‚ã‚Šã¾ã™ï¼š + +```sql +CREATE RESOURCE all_io (READ ANY DISK, WRITE ANY DISK); +``` + +サーãƒãƒ¼ã®æ§‹æˆã‚ªãƒ—ションã¯ã€SQLã«ã‚ˆã‚‹ãƒªã‚½ãƒ¼ã‚¹ã®å®šç¾©æ–¹æ³•ã‚ˆã‚Šã‚‚優先ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +## ワークロードマークアップ {#workload_markup} + +クエリã«ã¯è¨­å®š`workload`を使用ã—ã¦ç•°ãªã‚‹ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚’識別ã™ã‚‹ãƒžãƒ¼ã‚¯ã‚’付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`workload`ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã€Œdefaultã€ã®å€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚設定プロファイルを使用ã—ã¦ä»–ã®å€¤ã‚’指定ã§ãã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ユーザーã‹ã‚‰ã®ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‚’`workload`設定ã®å›ºå®šå€¤ã§ãƒžãƒ¼ã‚¯ã—ãŸã„å ´åˆã€è¨­å®šåˆ¶ç´„を使用ã—ã¦`workload`を一定ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¢ã‚¯ãƒ†ã‚£ãƒ“ティã«å¯¾ã—ã¦`workload`設定を割り当ã¦ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚マージã¨ãƒžãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã«ã¯ãã‚Œãžã‚Œ`merge_workload`ã¨`mutation_workload`ã®ã‚µãƒ¼ãƒãƒ¼è¨­å®šãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“れらã®å€¤ã¯ã€ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦`merge_workload`ã¨`mutation_workload`ã®MergeTree設定を使用ã—ã¦ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +ã“ã“ã§ã€ã€Œãƒ—ロダクションã€ã¨ã€Œé–‹ç™ºã€ã¨ã„ã†2ã¤ã®ç•°ãªã‚‹ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚’æŒã¤ã‚·ã‚¹ãƒ†ãƒ ã®ä¾‹ã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +SELECT count() FROM my_table WHERE value = 42 SETTINGS workload = 'production' +SELECT count() FROM my_table WHERE value = 13 SETTINGS workload = 'development' +``` + +## リソースã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°éšŽå±¤ {#hierarchy} + +スケジューリングサブシステムã®è¦³ç‚¹ã‹ã‚‰ã€ãƒªã‚½ãƒ¼ã‚¹ã¯ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°ãƒŽãƒ¼ãƒ‰ã®éšŽå±¤ã‚’表ã—ã¾ã™ã€‚ + +```mermaid +graph TD + subgraph network_read + nr_root(("/")) + -->|100 concurrent requests| nr_fair("fair") + -->|75% bandwidth| nr_prod["prod"] + nr_fair + -->|25% bandwidth| nr_dev["dev"] + end + + subgraph network_write + nw_root(("/")) + -->|100 concurrent requests| nw_fair("fair") + -->|75% bandwidth| nw_prod["prod"] + nw_fair + -->|25% bandwidth| nw_dev["dev"] + end +``` + +**å¯èƒ½ãªãƒŽãƒ¼ãƒ‰ã‚¿ã‚¤ãƒ—:** +* `inflight_limit`(制約) - åŒæ™‚ã«é£›ã‚“ã§ã„るリクエストã®æ•°ãŒ`max_requests`を超ãˆã‚‹ã‹ã€ã¾ãŸã¯ãã®åˆè¨ˆã‚³ã‚¹ãƒˆãŒ`max_cost`を超ãˆã‚‹å ´åˆã«ãƒ–ロックã•ã‚Œã¾ã™ã€‚唯一ã®å­ãƒŽãƒ¼ãƒ‰ã‚’æŒãŸã­ã°ãªã‚Šã¾ã›ã‚“。 +* `bandwidth_limit`(制約) - ç¾åœ¨ã®å¸¯åŸŸå¹…ãŒ`max_speed`(0ã¯ç„¡åˆ¶é™ã‚’æ„味)ã¾ãŸã¯ãƒãƒ¼ã‚¹ãƒˆãŒ`max_burst`(デフォルトã¯`max_speed`ã«ç­‰ã—ã„)を超ãˆã‚‹å ´åˆã«ãƒ–ロックã•ã‚Œã¾ã™ã€‚唯一ã®å­ãƒŽãƒ¼ãƒ‰ã‚’æŒãŸã­ã°ãªã‚Šã¾ã›ã‚“。 +* `fair`(ãƒãƒªã‚·ãƒ¼ï¼‰ - マックスミンフェアãƒã‚¹ã«å¾“ã£ã¦æ¬¡ã«ã‚µãƒ¼ãƒ“スをæä¾›ã™ã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’å­ãƒŽãƒ¼ãƒ‰ã‹ã‚‰é¸æŠžã—ã¾ã™ã€‚å­ãƒŽãƒ¼ãƒ‰ã¯`weight`(デフォルトã¯1)を指定ã§ãã¾ã™ã€‚ +* `priority`(ãƒãƒªã‚·ãƒ¼ï¼‰ - é™çš„ãªå„ªå…ˆé †ä½ï¼ˆå€¤ãŒä½Žã„ã»ã©å„ªå…ˆé †ä½ãŒé«˜ã„)ã«å¾“ã£ã¦æ¬¡ã«ã‚µãƒ¼ãƒ“スをæä¾›ã™ã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’å­ãƒŽãƒ¼ãƒ‰ã‹ã‚‰é¸æŠžã—ã¾ã™ã€‚å­ãƒŽãƒ¼ãƒ‰ã¯`priority`(デフォルトã¯0)を指定ã§ãã¾ã™ã€‚ +* `fifo`(キュー) - リソースキャパシティを超ãˆãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’ä¿æŒã§ãる階層ã®ãƒªãƒ¼ãƒ•ã€‚ + +基礎ã¨ãªã‚‹ãƒªã‚½ãƒ¼ã‚¹ã®ãƒ•ãƒ«ã‚­ãƒ£ãƒ‘シティを使用ã™ã‚‹ãŸã‚ã«ã¯ã€`inflight_limit`を使用ã™ã¹ãã§ã™ã€‚`max_requests`ã‚„`max_cost`ã®å€¤ãŒä½Žã™ãŽã‚‹ã¨ã€ãƒªã‚½ãƒ¼ã‚¹ã®ãƒ•ãƒ«åˆ©ç”¨ãŒãªã•ã‚Œãšã€å対ã«å€¤ãŒé«˜ã™ãŽã‚‹ã¨ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ©ãƒ¼å†…ã®ã‚­ãƒ¥ãƒ¼ãŒç©ºã«ãªã‚Šã€çµæžœã¨ã—ã¦ã‚µãƒ–ツリー内ã§ãƒãƒªã‚·ãƒ¼ãŒç„¡è¦–ã•ã‚Œã‚‹ï¼ˆä¸å…¬å¹³ã¾ãŸã¯å„ªå…ˆé †ä½ã®ç„¡è¦–)ã“ã¨ã«ã¤ãªãŒã‚Šã¾ã™ã€‚一方ã§ã€ãƒªã‚½ãƒ¼ã‚¹ã®éŽåº¦ã®åˆ©ç”¨ã‹ã‚‰ã®ä¿è­·ãŒå¿…è¦ãªå ´åˆã€`bandwidth_limit`を使用ã™ã¹ãã§ã™ã€‚ã“ã‚Œã¯ã€`duration`秒ã§æ¶ˆè²»ã•ã‚Œã‚‹ãƒªã‚½ãƒ¼ã‚¹é‡ãŒ`max_burst + max_speed * duration`ãƒã‚¤ãƒˆã‚’超ãˆãŸå ´åˆã«ã‚¹ãƒ­ãƒƒãƒˆãƒªãƒ³ã‚°ã‚’è¡Œã„ã¾ã™ã€‚åŒä¸€ãƒªã‚½ãƒ¼ã‚¹ä¸Šã«ã‚ã‚‹2ã¤ã®`bandwidth_limit`ノードを使用ã—ã¦ã€çŸ­æœŸé–“ã®ãƒ”ーク帯域幅ã¨é•·æœŸé–“ã®å¹³å‡å¸¯åŸŸå¹…を制é™ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +以下ã®ä¾‹ã¯ã€å›³ã«ç¤ºã•ã‚Œã¦ã„ã‚‹IOスケジューリング階層を定義ã™ã‚‹æ–¹æ³•ã®ä¸€ä¾‹ã§ã™ï¼š + +```xml + + + + + inflight_limit + 100 + + + fair + + + fifo + 3 + + + fifo + + + + + inflight_limit + 100 + + + fair + + + fifo + 3 + + + fifo + + + + +``` + +## ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰åˆ†é¡žå­ {#workload_classifiers} + +ワークロード分類å­ã¯ã€ã‚¯ã‚¨ãƒªã§æŒ‡å®šã•ã‚ŒãŸ`workload`ã‹ã‚‰ç‰¹å®šã®ãƒªã‚½ãƒ¼ã‚¹ã«ä½¿ç”¨ã™ã‚‹ãƒªãƒ¼ãƒ•ã‚­ãƒ¥ãƒ¼ã¸ã®ãƒžãƒƒãƒ”ングを定義ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ç¾æ™‚点ã§ã¯ã€ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰åˆ†é¡žã¯å˜ç´”ã§ã™ï¼šé™çš„マッピングã®ã¿ãŒä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +例: +```xml + + + + /fair/prod + /fair/prod + + + /fair/dev + /fair/dev + + + /fair/dev + /fair/dev + + + +``` + +## ワークロード階層(SQLã®ã¿ï¼‰ {#workloads} + +XMLã§ãƒªã‚½ãƒ¼ã‚¹ã¨åˆ†é¡žå­ã‚’定義ã™ã‚‹ã®ã¯é›£ã—ã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã¯ã‚ˆã‚Šä¾¿åˆ©ãªSQL構文をæä¾›ã—ã¦ã„ã¾ã™ã€‚`CREATE RESOURCE`ã§ä½œæˆã•ã‚ŒãŸã™ã¹ã¦ã®ãƒªã‚½ãƒ¼ã‚¹ã¯åŒã˜æ§‹é€ ã®éšŽå±¤ã‚’共有ã—ã¾ã™ãŒã€ã„ãã¤ã‹ã®ç‚¹ã§ç•°ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚`CREATE WORKLOAD`ã§ä½œæˆã•ã‚ŒãŸå„ワークロードã¯ã€ãã‚Œãžã‚Œã®ãƒªã‚½ãƒ¼ã‚¹ã«å¯¾ã—ã¦ã„ãã¤ã‹ã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°ãƒŽãƒ¼ãƒ‰ã‚’自動的ã«ä¿æŒã—ã¾ã™ã€‚一ã¤ã®è¦ªãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®ä¸­ã«å­ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã¯ã€ä¸Šè¨˜ã®XML設定ã¨å…¨ãåŒã˜éšŽå±¤ã‚’定義ã™ã‚‹ä¾‹ã§ã™ï¼š + +```sql +CREATE RESOURCE network_write (WRITE DISK s3) +CREATE RESOURCE network_read (READ DISK s3) +CREATE WORKLOAD all SETTINGS max_requests = 100 +CREATE WORKLOAD development IN all +CREATE WORKLOAD production IN all SETTINGS weight = 3 +``` + +å­ä¾›ã®ã„ãªã„リーフワークロードã®åå‰ã¯ã€ã‚¯ã‚¨ãƒªè¨­å®šã®`SETTINGS workload = 'name'`ã§ä½¿ç”¨ã§ãã¾ã™ã€‚SQL構文を使用ã™ã‚‹éš›ã€ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰åˆ†é¡žå­ã‚‚自動的ã«ä½œæˆã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +ワークロードをカスタマイズã™ã‚‹ãŸã‚ã«ã¯ã€ä»¥ä¸‹ã®è¨­å®šãŒä½¿ç”¨ã§ãã¾ã™ï¼š +* `priority` - åŒéšŽå±¤ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¯ã€é™çš„優先順ä½å€¤ã«å¾“ã£ã¦ã‚µãƒ¼ãƒ“スã•ã‚Œã¾ã™ï¼ˆå€¤ãŒä½Žã„ã»ã©å„ªå…ˆé †ä½ãŒé«˜ã„)。 +* `weight` - åŒéšŽå±¤ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ãŒåŒã˜é™çš„優先順ä½ã‚’æŒã¤å ´åˆã€ãƒªã‚½ãƒ¼ã‚¹ã¯é‡ã¿ã«åŸºã¥ã„ã¦å…±æœ‰ã•ã‚Œã¾ã™ã€‚ +* `max_requests` - ã“ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã§ã®åŒæ™‚リソースリクエストã®æ•°ã®åˆ¶é™ã€‚ +* `max_cost` - ã“ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã§ã®åŒæ™‚リソースリクエストã®åˆè¨ˆã‚¤ãƒ³ãƒ•ãƒ©ã‚¤ãƒˆãƒã‚¤ãƒˆæ•°ã®åˆ¶é™ã€‚ +* `max_speed` - ã“ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®ãƒã‚¤ãƒˆå‡¦ç†é€Ÿåº¦ã®åˆ¶é™ï¼ˆå„リソースã«å¯¾ã—ã¦ç‹¬ç«‹ã—ã¦ã„ã¾ã™ï¼‰ã€‚ +* `max_burst` - ワークロードãŒã‚¹ãƒ­ãƒƒãƒˆãƒªãƒ³ã‚°ã•ã‚Œã‚‹ã“ã¨ãªã処ç†ã§ãる最大ãƒã‚¤ãƒˆæ•°ï¼ˆå„リソースã«å¯¾ã—ã¦ç‹¬ç«‹ã—ã¦ã„ã¾ã™ï¼‰ã€‚ + +ワークロード設定ã¯ã€é©åˆ‡ãªã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°ãƒŽãƒ¼ãƒ‰ã‚»ãƒƒãƒˆã«å¤‰æ›ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。詳細ã«ã¤ã„ã¦ã¯ã€ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒªãƒ³ã‚°ãƒŽãƒ¼ãƒ‰ã®[タイプã¨ã‚ªãƒ—ション](#hierarchy)ã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ç•°ãªã‚‹ãƒªã‚½ãƒ¼ã‚¹ã«å¯¾ã—ã¦ç•°ãªã‚‹ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã®éšŽå±¤ã‚’指定ã™ã‚‹æ–¹æ³•ã¯ã‚ã‚Šã¾ã›ã‚“。ã—ã‹ã—ã€ç‰¹å®šã®ãƒªã‚½ãƒ¼ã‚¹ã«å¯¾ã—ã¦ç•°ãªã‚‹ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰è¨­å®šå€¤ã‚’指定ã™ã‚‹æ–¹æ³•ã¯ã‚ã‚Šã¾ã™ï¼š + +```sql +CREATE OR REPLACE WORKLOAD all SETTINGS max_requests = 100, max_speed = 1000000 FOR network_read, max_speed = 2000000 FOR network_write +``` + +ã¾ãŸã€ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¾ãŸã¯ãƒªã‚½ãƒ¼ã‚¹ãŒä»–ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã‹ã‚‰å‚ç…§ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯å‰Šé™¤ã§ãã¾ã›ã‚“。ワークロードã®å®šç¾©ã‚’æ›´æ–°ã™ã‚‹ã«ã¯ã€`CREATE OR REPLACE WORKLOAD`クエリを使用ã—ã¦ãã ã•ã„。 + +## ワークロードã¨ãƒªã‚½ãƒ¼ã‚¹ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ {#workload_entity_storage} + +ã™ã¹ã¦ã®ãƒ¯ãƒ¼ã‚¯ãƒ­ãƒ¼ãƒ‰ã¨ãƒªã‚½ãƒ¼ã‚¹ã®å®šç¾©ã¯ã€`CREATE WORKLOAD`ãŠã‚ˆã³`CREATE RESOURCE`クエリã®å½¢å¼ã§æ°¸ç¶šçš„ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ä¿å­˜å…ˆã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®`workload_path`ã¾ãŸã¯ZooKeeper上ã®`workload_zookeeper_path`ã§ã™ã€‚ノード間ã§ã®ä¸€è²«æ€§ã‚’é”æˆã™ã‚‹ãŸã‚ã«ã¯ZooKeeperストレージãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚代ã‚ã‚Šã«`ON CLUSTER`å¥ã‚’ディスクストレージã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +## å‚照先 + - [system.scheduler](/docs/ja/operations/system-tables/scheduler.md) + - [system.workloads](/docs/ja/operations/system-tables/workloads.md) + - [system.resources](/docs/ja/operations/system-tables/resources.md) + - [merge_workload](/docs/ja/operations/settings/merge-tree-settings.md#merge_workload) MergeTree設定 + - [merge_workload](/docs/ja/operations/server-configuration-parameters/settings.md#merge_workload) グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®š + - [mutation_workload](/docs/ja/operations/settings/merge-tree-settings.md#mutation_workload) MergeTree設定 + - [mutation_workload](/docs/ja/operations/server-configuration-parameters/settings.md#mutation_workload) グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®š + - [workload_path](/docs/ja/operations/server-configuration-parameters/settings.md#workload_path) グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®š + - [workload_zookeeper_path](/docs/ja/operations/server-configuration-parameters/settings.md#workload_zookeeper_path) グローãƒãƒ«ã‚µãƒ¼ãƒãƒ¼è¨­å®š diff --git a/docs/ja/quick-start.mdx b/docs/ja/quick-start.mdx new file mode 100644 index 00000000000..2d9cfe49879 --- /dev/null +++ b/docs/ja/quick-start.mdx @@ -0,0 +1,299 @@ +--- +slug: /ja/getting-started/quick-start +sidebar_label: クイックスタート +sidebar_position: 1 +keywords: [clickhouse, インストール, スタートガイド, クイックスタート] +pagination_next: 'en/getting-started/index' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; + +# ClickHouse クイックスタート + +:::tip +ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€ã‚ªãƒ¼ãƒ—ンソースã®ClickHouseを自分ã®ãƒžã‚·ãƒ³ã«ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚最速ã§ClickHouseをデプロイã—ã€å°‚用ã®SQLコンソールã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ–¹æ³•ã¯ã€ClickHouse Cloudを使用ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +æ–°ã—ã„ユーザーã¯ã€$300ã®ç„¡æ–™ãƒˆãƒ©ã‚¤ã‚¢ãƒ«ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚サインアップã¯[ã“ã¡ã‚‰](https://clickhouse.cloud/signUp?loc=docs-quick-start)ã‹ã‚‰ã©ã†ãžã€‚ +::: + +## 1. ãƒã‚¤ãƒŠãƒªã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ + +ClickHouseã¯ã€Linuxã€FreeBSDã€macOSã§ãƒã‚¤ãƒ†ã‚£ãƒ–ã«å‹•ä½œã—ã€Windowsã§ã¯[WSL](https://learn.microsoft.com/en-us/windows/wsl/about)を通ã˜ã¦å‹•ä½œã—ã¾ã™ã€‚ClickHouseをローカルã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã™ã‚‹æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯ã€ä»¥ä¸‹ã®`curl`コマンドを実行ã™ã‚‹ã“ã¨ã§ã™ã€‚ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã€é©åˆ‡ãªClickHouseãƒã‚¤ãƒŠãƒªã‚’ダウンロードã—ã¾ã™ã€‚ + + ```bash + curl https://clickhouse.com/ | sh + ``` + +## 2. サーãƒãƒ¼ã®èµ·å‹• + +ClickHouseサーãƒãƒ¼ã‚’開始ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ + + ```bash + ./clickhouse server + ``` + +## 3. クライアントã®èµ·å‹• + +`clickhouse-client`を使用ã—ã¦ã€ClickHouseサービスã«æŽ¥ç¶šã—ã¾ã™ã€‚æ–°ã—ã„ターミナルを開ãã€`clickhouse`ãƒã‚¤ãƒŠãƒªãŒä¿å­˜ã•ã‚Œã¦ã„るディレクトリã«ç§»å‹•ã—ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¦ãã ã•ã„。 + +```bash +./clickhouse client +``` + +ローカルホストã§å®Ÿè¡Œä¸­ã®ã‚µãƒ¼ãƒ“スã«æŽ¥ç¶šã•ã‚Œã‚‹ã¨ã€ç¬‘é¡”ã®é¡”文字ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + + ```response + my-host :) + ``` + +## 4. テーブルã®ä½œæˆ + +`CREATE TABLE`を使用ã—ã¦æ–°ã—ã„テーブルを定義ã—ã¾ã™ã€‚一般的ãªSQLã®DDLコマンドãŒClickHouseã§ã‚‚機能ã—ã¾ã™ãŒã€ClickHouseã®ãƒ†ãƒ¼ãƒ–ルã«ã¯`ENGINE`å¥ãŒå¿…è¦ã§ã™ã€‚ClickHouseã®ãƒ‘フォーマンスå‘上効果を活用ã™ã‚‹ãŸã‚ã«ã€`MergeTree`を使用ã—ã¾ã™ã€‚ + +```sql +CREATE TABLE my_first_table +( + user_id UInt32, + message String, + timestamp DateTime, + metric Float32 +) +ENGINE = MergeTree +PRIMARY KEY (user_id, timestamp) +``` + +## 5. データã®æŒ¿å…¥ + +ClickHouseã§ã¯ã€`INSERT INTO TABLE`コマンドを使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€`MergeTree`テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ãŸã³ã«**パーツ**(フォルダ)ãŒã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«ä½œæˆã•ã‚Œã‚‹ã“ã¨ã‚’ç†è§£ã—ã¦ãŠãã“ã¨ãŒé‡è¦ã§ã™ã€‚パーツを最å°é™ã«ã™ã‚‹ãŸã‚ã«ã€å¤§é‡ã®è¡Œã‚’一度ã«ãƒãƒ«ã‚¯ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ï¼ˆæ•°ä¸‡è¡Œä»¥ä¸Šã€ã¾ãŸã¯æ•°ç™¾ä¸‡è¡Œï¼‰ã€‚ + +```sql +INSERT INTO my_first_table (user_id, message, timestamp, metric) VALUES + (101, 'Hello, ClickHouse!', now(), -1.0 ), + (102, 'Insert a lot of rows per batch', yesterday(), 1.41421 ), + (102, 'Sort your data based on your commonly-used queries', today(), 2.718 ), + (101, 'Granules are the smallest chunks of data read', now() + 5, 3.14159 ) +``` + +## 6. æ–°ã—ã„テーブルã«ã‚¯ã‚¨ãƒªã‚’実行 + +ä»–ã®SQLデータベースã¨åŒæ§˜ã«ã€`SELECT`クエリを書ãã“ã¨ãŒã§ãã¾ã™ã€‚ + + ```sql + SELECT * + FROM my_first_table + ORDER BY timestamp + ``` + çµæžœã¯ã™ã£ãã‚Šã—ãŸãƒ†ãƒ¼ãƒ–ル形å¼ã§è¿”ã•ã‚Œã¾ã™ã€‚ + ```response + ┌─user_id─┬─message────────────────────────────────────────────┬───────────timestamp─┬──metric─┠+ │ 102 │ Insert a lot of rows per batch │ 2022-03-21 00:00:00 │ 1.41421 │ + │ 102 │ Sort your data based on your commonly-used queries │ 2022-03-22 00:00:00 │ 2.718 │ + │ 101 │ Hello, ClickHouse! │ 2022-03-22 14:04:09 │ -1 │ + │ 101 │ Granules are the smallest chunks of data read │ 2022-03-22 14:04:14 │ 3.14159 │ + └─────────┴────────────────────────────────────────────────────┴─────────────────────┴─────────┘ + + 4 rows in set. Elapsed: 0.008 sec. + ``` + +## 7. 独自ã®ãƒ‡ãƒ¼ã‚¿ã‚’挿入 + +次ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ã€ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«å–り込むã“ã¨ã§ã™ã€‚データをå–り込むãŸã‚ã®[テーブル関数](/docs/ja/sql-reference/table-functions/index.md)ã‚„[çµ±åˆ](/docs/ja/integrations)ãŒå¤šæ•°ã‚ã‚Šã¾ã™ã€‚以下ã®ã‚¿ãƒ–ã«ã„ãã¤ã‹ã®ä¾‹ã‚’示ã—ã¾ã™ãŒã€ClickHouseã¨ã®çµ±åˆã®é•·ã„リストを[çµ±åˆã‚¬ã‚¤ãƒ‰](/docs/ja/integrations)ã§ç¢ºèªã§ãã¾ã™ã€‚ + + + + +[`s3`テーブル関数](/docs/ja/sql-reference/table-functions/s3.md)を使用ã—ã¦ã€S3ã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ãƒ†ãƒ¼ãƒ–ル関数ã§ã™ã€‚ã“ã®ãŸã‚ã€çµæžœã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ + +1. `SELECT`クエリã®ã‚½ãƒ¼ã‚¹ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ï¼ˆã“ã‚Œã«ã‚ˆã‚Šã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ã‚¯ã‚¨ãƒªã‚’実行ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’S3ã«æ®‹ã—ãŸã¾ã¾ã«ã§ãã¾ã™ï¼‰ã€‚ +2. çµæžœã®ãƒ†ãƒ¼ãƒ–ルを`MergeTree`テーブルã«æŒ¿å…¥ã™ã‚‹ï¼ˆãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«ç§»è¡Œã™ã‚‹æº–å‚™ãŒã§ããŸã¨ã)。 + +アドホッククエリã®ä¾‹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ã€‚ + +```sql +SELECT + passenger_count, + avg(toFloat32(total_amount)) +FROM s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_0.gz', + 'TabSeparatedWithNames' +) +GROUP BY passenger_count +ORDER BY passenger_count; +``` + +ClickHouseテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’移行ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«ã—ã¾ã™ã€‚`nyc_taxi`ãŒ`MergeTree`テーブルã®å ´åˆï¼š + +```sql +INSERT INTO nyc_taxi + SELECT * FROM s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_0.gz', + 'TabSeparatedWithNames' +) +SETTINGS input_format_allow_errors_num=25000; +``` + +S3ã‚’ClickHouseã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹ä¾‹ã¨è©³ç´°ã«ã¤ã„ã¦ã¯ã€[AWS S3ドキュメントページã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](/docs/ja/integrations/data-ingestion/s3/index.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + + + +AWS S3ã§ã®ãƒ‡ãƒ¼ã‚¿èª­ã¿å–ã‚Šã«ä½¿ç”¨ã•ã‚Œã‚‹[`s3`テーブル関数](/docs/ja/sql-reference/table-functions/s3.md)ã¯ã€Google Cloud Storageã®ãƒ•ã‚¡ã‚¤ãƒ«ã§ã‚‚動作ã—ã¾ã™ã€‚例ãˆã°ï¼š + +```sql +SELECT + * +FROM s3( + 'https://storage.googleapis.com/my-bucket/trips.parquet', + 'MY_GCS_HMAC_KEY', + 'MY_GCS_HMAC_SECRET_KEY', + 'Parquet' +) +LIMIT 1000 +``` + +詳細ã¯[`s3`テーブル関数ページ](/docs/ja/sql-reference/table-functions/s3.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + + + +[`url`テーブル関数](/docs/ja/sql-reference/table-functions/url)ã¯ã€Webã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãªãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ + +```sql +--デフォルトã§ã¯ã€ClickHouseã¯SSRF攻撃ã‹ã‚‰ä¿è­·ã™ã‚‹ãŸã‚ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã‚’防止ã—ã¾ã™ã€‚ +--以下ã®URLã¯ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã‚’å¿…è¦ã¨ã™ã‚‹ãŸã‚ã€max_http_get_redirects > 0ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +SET max_http_get_redirects=10; + +SELECT * +FROM url( + 'http://prod2.publicdata.landregistry.gov.uk.s3-website-eu-west-1.amazonaws.com/pp-complete.csv', + 'CSV' + ); +``` + +[`url`テーブル関数ページ](/docs/ja/sql-reference/table-functions/url)ã‚’å‚ç…§ã—ã¦è©³ç´°ã‚’ã”覧ãã ã•ã„。 + + + + +[`file`テーブルエンジン](/docs/ja/sql-reference/table-functions/file)を使用ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ç°¡å˜ã®ãŸã‚ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’`user_files`ディレクトリã«ã‚³ãƒ”ーã—ã¾ã™ï¼ˆClickHouseãƒã‚¤ãƒŠãƒªã‚’ダウンロードã—ãŸãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚ã‚Šã¾ã™ï¼‰ã€‚ + +```sql +DESCRIBE TABLE file('comments.tsv') + +Query id: 8ca9b2f9-65a2-4982-954a-890de710a336 + +┌─name──────┬─type────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ id │ Nullable(Int64) │ │ │ │ │ │ +│ type │ Nullable(String) │ │ │ │ │ │ +│ author │ Nullable(String) │ │ │ │ │ │ +│ timestamp │ Nullable(DateTime64(9)) │ │ │ │ │ │ +│ comment │ Nullable(String) │ │ │ │ │ │ +│ children │ Array(Nullable(Int64)) │ │ │ │ │ │ +└───────────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +ClickHouseã¯ã€å¤§é‡ã®è¡Œã‚’分æžã—ã¦ã‚«ãƒ©ãƒ ã®åå‰ã¨ãƒ‡ãƒ¼ã‚¿åž‹ã‚’推測ã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 +ClickHouseãŒãƒ•ã‚¡ã‚¤ãƒ«åã‹ã‚‰ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—を決定ã§ããªã„å ´åˆã€ç¬¬2引数ã¨ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚ + +```sql +SELECT count() +FROM file( + 'comments.tsv', + 'TabSeparatedWithNames' +) +``` + +詳細ã¯[`file`テーブル関数ページ](/docs/ja/sql-reference/table-functions/file)を確èªã—ã¦ãã ã•ã„。 + + + + +[`postgresql`テーブル関数](/ja/sql-reference/table-functions/postgresql)を使用ã—ã¦ã€PostgreSQLã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ + +```sql +SELECT * +FROM + postgresql( + 'localhost:5432', + 'my_database', + 'my_table', + 'postgresql_user', + 'password') +; +``` + +詳細ã¯[`postgresql`テーブル関数ページ](/docs/ja/sql-reference/table-functions/postgresql)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + + + +[`mysql`テーブル関数](/docs/ja/sql-reference/table-functions/mysql)を使用ã—ã¦ã€MySQLã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ + +```sql +SELECT * +FROM + mysql( + 'localhost:3306', + 'my_database', + 'my_table', + 'postgresql_user', + 'password') +; +``` + +詳細ã¯[`mysql`テーブル関数ページ](/docs/ja/sql-reference/table-functions/mysql)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + + + +ClickHouseã¯ã€ä»»æ„ã®ODBCã¾ãŸã¯JDBCデータソースã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +SELECT * +FROM + odbc( + 'DSN=mysqlconn', + 'my_database', + 'my_table' + ); +``` + +詳細ã¯[`odbc`テーブル関数ページ](/docs/ja/sql-reference/table-functions/odbc)ãŠã‚ˆã³[`jdbc`テーブル関数ページ](/docs/ja/sql-reference/table-functions/jdbc)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + + + +メッセージキューã¯ã€å¯¾å¿œã™ã‚‹ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã—ã¦ã€ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’ストリーミングã§ãã¾ã™ã€‚ + +- **Kafka**: [`Kafka`テーブルエンジン](/docs/ja/engines/table-engines/integrations/kafka)を使用ã—ã¦Kafkaã¨çµ±åˆ +- **Amazon MSK**: [Amazon Managed Streaming for Apache Kafka (MSK)](/docs/ja/integrations/kafka/cloud/amazon-msk/)ã¨çµ±åˆ +- **RabbitMQ**: [`RabbitMQ`テーブルエンジン](/docs/ja/engines/table-engines/integrations/rabbitmq)を使用ã—ã¦RabbitMQã¨çµ±åˆ + + + + +ClickHouseã¯ã€ä»¥ä¸‹ã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ル関数を備ãˆã¦ã„ã¾ã™ã€‚ + +- **Hadoop**: [`hdfs`テーブル関数](/docs/ja/sql-reference/table-functions/hdfs)を使用ã—ã¦Apache Hadoopã¨çµ±åˆ +- **Hudi**: [`hudi`テーブル関数](/docs/ja/sql-reference/table-functions/hudi)を使用ã—ã¦S3ã®æ—¢å­˜ã®Apache Hudiテーブルを読ã¿å–ã‚Š +- **Iceberg**: [`iceberg`テーブル関数](/docs/ja/sql-reference/table-functions/iceberg)を使用ã—ã¦S3ã®æ—¢å­˜ã®Apache Icebergテーブルを読ã¿å–ã‚Š +- **DeltaLake**: [`deltaLake`テーブル関数](/docs/ja/sql-reference/table-functions/deltalake)を使用ã—ã¦S3ã®æ—¢å­˜ã®Delta Lakeテーブルを読ã¿å–ã‚Š + + + + +ClickHouseã¨ã®æ—¢å­˜ã®ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã‚„データソースを接続ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[ClickHouseçµ±åˆãƒªã‚¹ãƒˆ](/docs/ja/integrations)を確èªã—ã¦ãã ã•ã„。 + + + + +## 次ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ï¼Ÿ + +- ClickHouseã®ä¸»è¦ãªæ¦‚念ã¨æ©Ÿèƒ½ã‚’ã•ã‚‰ã«è©³ã—ã探求ã™ã‚‹[上級者å‘ã‘ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«](tutorial.md)ã‚’ã”覧ãã ã•ã„ +- [ClickHouseアカデミー](https://learn.clickhouse.com/visitor_class_catalog)ã§ç„¡æ–™ã®ã‚ªãƒ³ãƒ‡ãƒžãƒ³ãƒ‰ãƒˆãƒ¬ãƒ¼ãƒ‹ãƒ³ã‚°ã‚³ãƒ¼ã‚¹ã‚’å—講ã—ã¦å­¦ç¿’を続ã‘ã¾ã—ょㆠ+- [サンプルデータセット](/docs/ja/getting-started/example-datasets/)ã¨ã€ãれらを挿入ã™ã‚‹æ–¹æ³•ã«é–¢ã™ã‚‹èª¬æ˜ŽãŒã‚ã‚Šã¾ã™ +- データãŒå¤–部ソースã‹ã‚‰æ¥ã‚‹å ´åˆã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚­ãƒ¥ãƒ¼ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãƒ‘イプラインãªã©ã¸ã®æŽ¥ç¶šæ–¹æ³•ã«ã¤ã„ã¦[çµ±åˆã‚¬ã‚¤ãƒ‰ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](/docs/ja/integrations/)ã‚’å‚ç…§ã—ã¦ãã ã•ã„ +- UI/BIビジュアライゼーションツールを使用ã—ã¦ã„ã‚‹å ´åˆã€[ClickHouseã«UIを接続ã™ã‚‹ãŸã‚ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¬ã‚¤ãƒ‰](/docs/ja/integrations/data-visualization/)ã‚’å‚ç…§ã—ã¦ãã ã•ã„ +- [主キー](/docs/ja/guides/best-practices/sparse-primary-indexes.md)ã«é–¢ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¬ã‚¤ãƒ‰ã§ã€ä¸»ã‚­ãƒ¼ã«ã¤ã„ã¦çŸ¥ã£ã¦ãŠãã¹ãã™ã¹ã¦ã®æƒ…報を確èªã—ã€å®šç¾©æ–¹æ³•ã‚’ç†è§£ã—ã¾ã—ょㆠdiff --git a/docs/ja/settings/beta-and-experimental-features.md b/docs/ja/settings/beta-and-experimental-features.md new file mode 100644 index 00000000000..d494983244d --- /dev/null +++ b/docs/ja/settings/beta-and-experimental-features.md @@ -0,0 +1,40 @@ +--- +sidebar_position: 1 +sidebar_label: ベータ機能ã¨ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«æ©Ÿèƒ½ +title: ベータãŠã‚ˆã³ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«æ©Ÿèƒ½ +description: "ClickHouseã«ã¯ãƒ™ãƒ¼ã‚¿ç‰ˆãŠã‚ˆã³ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«æ©Ÿèƒ½ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒšãƒ¼ã‚¸ã§ã¯ãã®å®šç¾©ã‚’説明ã—ã¾ã™ã€‚" +slug: /ja/beta-and-experimental-features +--- + +ClickHouseã¯ã‚ªãƒ¼ãƒ—ンソースã§ã‚ã‚‹ãŸã‚ã€ClickHouseã®ç¤¾å“¡ã ã‘ã§ãªãコミュニティã‹ã‚‰ã‚‚多ãã®è²¢çŒ®ã‚’å—ã‘ã¦ã„ã¾ã™ã€‚ã“れらã®è²¢çŒ®ã¯ã—ã°ã—ã°ç•°ãªã‚‹ã‚¹ãƒ”ードã§é–‹ç™ºã•ã‚Œã€ã‚る機能ã¯ä¸€èˆ¬æä¾› (GA) ã¨è¦‹ãªã•ã‚Œã‚‹ã¾ã§ã«ã€é•·ã„試作段階やコミュニティã‹ã‚‰ã®å分ãªãƒ•ã‚£ãƒ¼ãƒ‰ãƒãƒƒã‚¯ã¨å復ãŒå¿…è¦ã§ã™ã€‚ + +機能ãŒä¸€èˆ¬æä¾›ã¨ã—ã¦åˆ†é¡žã•ã‚Œã‚‹æ™‚期ã®ä¸ç¢ºå®Ÿæ€§ã®ãŸã‚ã«ã€æ©Ÿèƒ½ã‚’2ã¤ã®ã‚«ãƒ†ã‚´ãƒªã«åˆ†é¡žã—ã¦ã„ã¾ã™: **ベータ**ã¨**エクスペリメンタル**。 + +**ベータ**機能ã¯ClickHouseãƒãƒ¼ãƒ ã«ã‚ˆã‚Šå…¬å¼ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚**エクスペリメンタル**機能ã¯ClickHouseãƒãƒ¼ãƒ ã¾ãŸã¯ã‚³ãƒŸãƒ¥ãƒ‹ãƒ†ã‚£ã«ã‚ˆã‚‹åˆæœŸã®ãƒ—ロトタイプã§ã€å…¬å¼ã«ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +以下ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€**ベータ**ãŠã‚ˆã³**エクスペリメンタル**機能ã®ç‰¹æ€§ã‚’明確ã«èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ + +## ベータ機能 + +- 一般æä¾› (GA) ã«å‘ã‘ã¦æ´»ç™ºã«é–‹ç™ºä¸­ +- 主ãªæ—¢çŸ¥ã®å•é¡Œã¯GitHubã§è¿½è·¡å¯èƒ½ +- 機能ã¯å°†æ¥çš„ã«å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ã‚ã‚Š +- ClickHouse Cloudã§æœ‰åŠ¹åŒ–ã•ã‚Œã‚‹å¯èƒ½æ€§ã‚ã‚Š +- ClickHouseãƒãƒ¼ãƒ ãŒãƒ™ãƒ¼ã‚¿æ©Ÿèƒ½ã‚’サãƒãƒ¼ãƒˆ + +以下ã®æ©Ÿèƒ½ã¯ã€ClickHouse Cloudã§ãƒ™ãƒ¼ã‚¿ã¨ã¿ãªã•ã‚Œã€ã¾ã ClickHouseã®SETTINGã§```allow_experimental_*```ã¨å付ã‘られã¦ã„ã‚‹ã‚‚ã®ã§ã‚‚ã€ClickHouse Cloud Servicesã§ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +注æ„: 最近導入ã•ã‚ŒãŸæ©Ÿèƒ½ã‚’使用ã™ã‚‹ã«ã¯ã€ClickHouse [互æ›æ€§](https://clickhouse.com/docs/ja/operations/settings/settings#compatibility)設定ã®æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +## エクスペリメンタル機能 + +- GAã«ãªã‚‹ã“ã¨ãŒãªã„ã‹ã‚‚ã—ã‚Œãªã„ +- 削除ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ +- 破壊的変更を導入ã™ã‚‹ã“ã¨ãŒã‚ã‚‹ +- 機能ã¯å°†æ¥çš„ã«å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ +- æ„図的ã«æœ‰åŠ¹åŒ–ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ +- ClickHouseãƒãƒ¼ãƒ ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«æ©Ÿèƒ½ã‚’**サãƒãƒ¼ãƒˆã—ãªã„** +- é‡è¦ãªæ©Ÿèƒ½ã‚„ドキュメントãŒæ¬ å¦‚ã—ã¦ã„ã‚‹ã‹ã‚‚ã—ã‚Œãªã„ +- クラウドã§æœ‰åŠ¹åŒ–ã™ã‚‹ã“ã¨ã¯ã§ããªã„ + +注æ„: 上記ã§ãƒ™ãƒ¼ã‚¿ã¨ã—ã¦ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ä»¥å¤–ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã¯ã€ClickHouse Cloudã§æœ‰åŠ¹åŒ–ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 diff --git a/docs/ja/sql-reference/_category_.yml b/docs/ja/sql-reference/_category_.yml new file mode 100644 index 00000000000..ab8f628709d --- /dev/null +++ b/docs/ja/sql-reference/_category_.yml @@ -0,0 +1,7 @@ +position: 1 +label: 'SQL Reference' +collapsible: true +collapsed: true +link: + type: generated-index + slug: /ja/sql-reference diff --git a/docs/ja/sql-reference/aggregate-functions/_category_.yml b/docs/ja/sql-reference/aggregate-functions/_category_.yml new file mode 100644 index 00000000000..9e289e6c83b --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/_category_.yml @@ -0,0 +1,9 @@ +position: 5 +label: 'Aggregate Functions' +collapsible: true +collapsed: true +link: + type: doc + id: en/sql-reference/aggregate-functions/index +customProps: + description: List of Aggregate Fucntions in ClickHouse diff --git a/docs/ja/sql-reference/aggregate-functions/combinators.md b/docs/ja/sql-reference/aggregate-functions/combinators.md new file mode 100644 index 00000000000..d58a4a0b34c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/combinators.md @@ -0,0 +1,331 @@ +--- +slug: /ja/sql-reference/aggregate-functions/combinators +sidebar_position: 37 +sidebar_label: Combinators +--- + +# 集約関数コンビãƒãƒ¼ã‚¿ + +集約関数ã®åå‰ã«ã¯ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ã‚’付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šé›†ç´„関数ã®å‹•ä½œãŒå¤‰æ›´ã•ã‚Œã¾ã™ã€‚ + +## -If + +サフィックス -If ã¯ä»»æ„ã®é›†ç´„関数ã®åå‰ã«ä»˜ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€é›†ç´„関数ã¯è¿½åŠ ã®å¼•æ•°ã¨ã—ã¦æ¡ä»¶ï¼ˆUint8 型)をå—ã‘å–ã‚Šã¾ã™ã€‚集約関数ã¯æ¡ä»¶ã‚’満ãŸã—ãŸè¡Œã®ã¿ã‚’処ç†ã—ã¾ã™ã€‚æ¡ä»¶ãŒä¸€åº¦ã‚‚満ãŸã•ã‚Œãªã‹ã£ãŸå ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼ˆé€šå¸¸ã¯ã‚¼ãƒ­ã¾ãŸã¯ç©ºã®æ–‡å­—列)を返ã—ã¾ã™ã€‚ + +例: `sumIf(column, cond)`, `countIf(cond)`, `avgIf(x, cond)`, `quantilesTimingIf(level1, level2)(x, cond)`, `argMinIf(arg, val, cond)` ãªã©ã€‚ + +æ¡ä»¶ä»˜ã集約関数を使用ã™ã‚‹ã“ã¨ã§ã€ã‚µãƒ–クエリや `JOIN` を使用ã›ãšã«è¤‡æ•°ã®æ¡ä»¶ã«å¯¾ã—ã¦é›†ç´„を計算ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€æ¡ä»¶ä»˜ã集約関数を使用ã—ã¦ã‚»ã‚°ãƒ¡ãƒ³ãƒˆæ¯”較機能を実装ã§ãã¾ã™ã€‚ + +## -Array + +-Array サフィックスã¯ã€ä»»æ„ã®é›†ç´„関数ã®åå‰ã«ä»˜ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€é›†ç´„関数㯠‘T’ åž‹ã®å¼•æ•°ã§ã¯ãªãã€â€˜Array(T)’ 型(é…列)ã®å¼•æ•°ã‚’å–ã‚Šã¾ã™ã€‚集約関数ãŒè¤‡æ•°ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹å ´åˆã€ã“れらã¯åŒã˜é•·ã•ã®é…列ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。é…列を処ç†ã™ã‚‹éš›ã€é›†ç´„関数ã¯å…ƒã®é›†ç´„関数ãŒå„é…列è¦ç´ ã«å¯¾ã—ã¦å‹•ä½œã™ã‚‹ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +例1: `sumArray(arr)` - ã™ã¹ã¦ã® ‘arr’ é…列ã®è¦ç´ ã‚’åˆè¨ˆã—ã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€ã‚ˆã‚Šç°¡å˜ã« `sum(arraySum(arr))` ã¨æ›¸ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +例2: `uniqArray(arr)` – ã™ã¹ã¦ã® ‘arr’ é…列内ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªè¦ç´ ã®æ•°ã‚’æ•°ãˆã¾ã™ã€‚ã“れ㯠`uniq(arrayJoin(arr))` ã¨ã„ã†æ–¹æ³•ã§ã‚‚è¡Œã†ã“ã¨ãŒã§ãã¾ã™ãŒã€ã‚¯ã‚¨ãƒªã« ‘arrayJoin’ を追加ã§ããªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +-If 㨠-Array ã¯çµ„ã¿åˆã‚ã›å¯èƒ½ã§ã™ã€‚ã—ã‹ã—ãªãŒã‚‰ã€â€˜Array’ ã¯æœ€åˆã«ã€æ¬¡ã«â€˜If’ã®é †åºã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。例: `uniqArrayIf(arr, cond)`, `quantilesTimingArrayIf(level1, level2)(arr, cond)`。ã“ã®é †åºã®ãŸã‚ã€â€˜cond’ 引数ã¯é…列ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## -Map + +-Map サフィックスã¯ã€ä»»æ„ã®é›†ç´„関数ã«ä»˜ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€é›†ç´„関数ã¯å¼•æ•°ã¨ã—㦠Map åž‹ã‚’å–å¾—ã—ã€ãƒžãƒƒãƒ—ã®å„キーã®å€¤ã‚’指定ã•ã‚ŒãŸé›†ç´„関数を使用ã—ã¦å€‹åˆ¥ã«é›†ç´„ã—ã¾ã™ã€‚çµæžœã‚‚ Map åž‹ã¨ãªã‚Šã¾ã™ã€‚ + +**例** + +```sql +CREATE TABLE map_map( + date Date, + timeslot DateTime, + status Map(String, UInt64) +) ENGINE = Log; + +INSERT INTO map_map VALUES + ('2000-01-01', '2000-01-01 00:00:00', (['a', 'b', 'c'], [10, 10, 10])), + ('2000-01-01', '2000-01-01 00:00:00', (['c', 'd', 'e'], [10, 10, 10])), + ('2000-01-01', '2000-01-01 00:01:00', (['d', 'e', 'f'], [10, 10, 10])), + ('2000-01-01', '2000-01-01 00:01:00', (['f', 'g', 'g'], [10, 10, 10])); + +SELECT + timeslot, + sumMap(status), + avgMap(status), + minMap(status) +FROM map_map +GROUP BY timeslot; + +┌────────────timeslot─┬─sumMap(status)───────────────────────┬─avgMap(status)───────────────────────┬─minMap(status)───────────────────────┠+│ 2000-01-01 00:00:00 │ {'a':10,'b':10,'c':20,'d':10,'e':10} │ {'a':10,'b':10,'c':10,'d':10,'e':10} │ {'a':10,'b':10,'c':10,'d':10,'e':10} │ +│ 2000-01-01 00:01:00 │ {'d':10,'e':10,'f':20,'g':20} │ {'d':10,'e':10,'f':10,'g':10} │ {'d':10,'e':10,'f':10,'g':10} │ +└─────────────────────┴──────────────────────────────────────┴──────────────────────────────────────┴──────────────────────────────────────┘ +``` + +## -SimpleState + +ã“ã®ã‚³ãƒ³ãƒ“ãƒãƒ¼ã‚¿ã‚’é©ç”¨ã™ã‚‹ã¨ã€é›†ç´„関数ã¯åŒã˜å€¤ã‚’ç•°ãªã‚‹åž‹ã§è¿”ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€[SimpleAggregateFunction(...)](../../sql-reference/data-types/simpleaggregatefunction.md) ã§ã€[AggregatingMergeTree](../../engines/table-engines/mergetree-family/aggregatingmergetree.md) テーブルã§ä½¿ç”¨ã§ãるよã†ã«ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã§ãã¾ã™ã€‚ + +**構文** + +``` sql +SimpleState(x) +``` + +**引数** + +- `x` — 集約関数ã®ãƒ‘ラメータ。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +`SimpleAggregateFunction(...)` åž‹ã®é›†ç´„関数ã®å€¤ã€‚ + +**例** + +クエリ: + +``` sql +WITH anySimpleState(number) AS c SELECT toTypeName(c), c FROM numbers(1); +``` + +çµæžœ: + +``` text +┌─toTypeName(c)────────────────────────┬─c─┠+│ SimpleAggregateFunction(any, UInt64) │ 0 │ +└──────────────────────────────────────┴───┘ +``` + +## -State + +ã“ã®ã‚³ãƒ³ãƒ“ãƒãƒ¼ã‚¿ã‚’é©ç”¨ã™ã‚‹ã¨ã€é›†ç´„関数ã¯æœ€çµ‚çš„ãªå€¤ï¼ˆä¾‹ãˆã°ã€[uniq](../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq) 関数ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå€¤ã®æ•°ï¼‰ã§ã¯ãªãã€ä¸­é–“ã®é›†ç´„状態を返ã—ã¾ã™ï¼ˆ`uniq` ã®å ´åˆã€ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå€¤ã®æ•°ã‚’計算ã™ã‚‹ãŸã‚ã®ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã§ã™ï¼‰ã€‚ã“ã‚Œã¯ã€å¾Œå‡¦ç†ã«ä½¿ç”¨ã—ãŸã‚Šã€ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã—ã¦å¾Œã§é›†ç´„を完了ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã‚‹ `AggregateFunction(...)` ã§ã™ã€‚ + +:::note +-MapState ã¯ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã™ã‚‹ä¸å¤‰æ€§ã‚’ä¿è¨¼ã—ã¾ã›ã‚“。ã“ã‚Œã¯ä¸­é–“状態ã§ã®ãƒ‡ãƒ¼ã‚¿é †åºãŒå¤‰ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã®å–ã‚Šè¾¼ã¿ã«ã¯å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。 +::: + +ã“れらã®çŠ¶æ…‹ã‚’æ“作ã™ã‚‹ã«ã¯ã€æ¬¡ã‚’使用ã—ã¾ã™: + +- [AggregatingMergeTree](../../engines/table-engines/mergetree-family/aggregatingmergetree.md) テーブルエンジン。 +- [finalizeAggregation](../../sql-reference/functions/other-functions.md#function-finalizeaggregation) 関数。 +- [runningAccumulate](../../sql-reference/functions/other-functions.md#runningaccumulate) 関数。 +- [-Merge](#-merge) コンビãƒãƒ¼ã‚¿ã€‚ +- [-MergeState](#-mergestate) コンビãƒãƒ¼ã‚¿ã€‚ + +## -Merge + +ã“ã®ã‚³ãƒ³ãƒ“ãƒãƒ¼ã‚¿ã‚’é©ç”¨ã™ã‚‹ã¨ã€é›†ç´„関数ã¯ä¸­é–“ã®é›†ç´„状態を引数ã¨ã—ã¦å—ã‘å–ã‚Šã€çŠ¶æ…‹ã‚’çµåˆã—ã¦é›†è¨ˆã‚’完了ã—ã€çµæžœã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +## -MergeState + +-Merge コンビãƒãƒ¼ã‚¿ã¨åŒã˜æ–¹æ³•ã§ä¸­é–“集計状態をマージã—ã¾ã™ã€‚ãŸã ã—ã€çµæžœã®å€¤ã‚’è¿”ã•ãšã€-State コンビãƒãƒ¼ã‚¿ã¨åŒæ§˜ã«ä¸­é–“集約状態を返ã—ã¾ã™ã€‚ + +## -ForEach + +テーブルã®é›†ç´„関数をé…列ã®é›†ç´„関数ã«å¤‰æ›ã—ã€å¯¾å¿œã™ã‚‹é…列ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’集約ã—ã¦çµæžœã®é…列を返ã—ã¾ã™ã€‚例ãˆã°ã€é…列 `[1, 2]`, `[3, 4, 5]`, `[6, 7]` ã«å¯¾ã—㦠`sumForEach` を使ã†ã¨ã€å¯¾å¿œã™ã‚‹é…列ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’加算ã—㦠`[10, 13, 5]` ã¨ã„ã†çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## -Distinct + +ã‚らゆる引数ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªçµ„ã¿åˆã‚ã›ã‚’一度ã ã‘集約ã—ã¾ã™ã€‚ç¹°ã‚Šè¿”ã—ã®å€¤ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚例: `sum(DISTINCT x)` (ã¾ãŸã¯ `sumDistinct(x)`), `groupArray(DISTINCT x)` (ã¾ãŸã¯ `groupArrayDistinct(x)`) , `corrStable(DISTINCT x, y)` (ã¾ãŸã¯ `corrStableDistinct(x, y)`) ãªã©ã€‚ + +## -OrDefault + +集約関数ã®å‹•ä½œã‚’変更ã—ã¾ã™ã€‚ + +集約関数ãŒå…¥åŠ›å€¤ã‚’æŒãŸãªã„å ´åˆã€ã“ã®ã‚³ãƒ³ãƒ“ãƒãƒ¼ã‚¿ã‚’使ã†ã¨ã€é›†ç´„関数ã®æˆ»ã‚Šãƒ‡ãƒ¼ã‚¿åž‹ã«å¯¾ã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚空ã®å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãる集約関数ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +`-OrDefault` ã¯ä»–ã®ã‚³ãƒ³ãƒ“ãƒãƒ¼ã‚¿ã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +``` sql +OrDefault(x) +``` + +**引数** + +- `x` — 集約関数ã®ãƒ‘ラメータ。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +集約ã™ã‚‹ã‚‚ã®ãŒãªã„å ´åˆã€é›†ç´„関数ã®æˆ»ã‚Šåž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +åž‹ã¯ä½¿ç”¨ã™ã‚‹é›†ç´„関数ã«ä¾å­˜ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT avg(number), avgOrDefault(number) FROM numbers(0) +``` + +çµæžœ: + +``` text +┌─avg(number)─┬─avgOrDefault(number)─┠+│ nan │ 0 │ +└─────────────┴──────────────────────┘ +``` + +`-OrDefault` ã¯ä»–ã®ã‚³ãƒ³ãƒ“ãƒãƒ¼ã‚¿ã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã‚Œã¯é›†ç´„関数ãŒç©ºã®å…¥åŠ›ã‚’å—ã‘付ã‘ãªã„å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ + +クエリ: + +``` sql +SELECT avgOrDefaultIf(x, x > 10) +FROM +( + SELECT toDecimal32(1.23, 2) AS x +) +``` + +çµæžœ: + +``` text +┌─avgOrDefaultIf(x, greater(x, 10))─┠+│ 0.00 │ +└───────────────────────────────────┘ +``` + +## -OrNull + +集約関数ã®å‹•ä½œã‚’変更ã—ã¾ã™ã€‚ + +ã“ã®ã‚³ãƒ³ãƒ“ãƒãƒ¼ã‚¿ã¯é›†ç´„関数ã®çµæžœã‚’ [Nullable](../../sql-reference/data-types/nullable.md) データ型ã«å¤‰æ›ã—ã¾ã™ã€‚集約関数ã«å€¤ãŒãªã„å ´åˆã¯ã€[NULL](../../sql-reference/syntax.md#null-literal) ã‚’è¿”ã—ã¾ã™ã€‚ + +`-OrNull` ã¯ä»–ã®ã‚³ãƒ³ãƒ“ãƒãƒ¼ã‚¿ã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +``` sql +OrNull(x) +``` + +**引数** + +- `x` — 集約関数ã®ãƒ‘ラメータ。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 集約関数ã®çµæžœã‚’ `Nullable` データ型ã«å¤‰æ›ã•ã‚ŒãŸã‚‚ã®ã€‚ +- 集約ã™ã‚‹ã‚‚ã®ãŒãªã„å ´åˆã¯ `NULL`。 + +åž‹: `Nullable(集約関数ã®æˆ»ã‚Šåž‹)`。 + +**例** + +集約関数ã®æœ«å°¾ã« `-orNull` を追加ã—ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT sumOrNull(number), toTypeName(sumOrNull(number)) FROM numbers(10) WHERE number > 10 +``` + +çµæžœ: + +``` text +┌─sumOrNull(number)─┬─toTypeName(sumOrNull(number))─┠+│ á´ºáµá´¸á´¸ │ Nullable(UInt64) │ +└───────────────────┴───────────────────────────────┘ +``` + +ã¾ãŸ `-OrNull` ã¯ä»–ã®ã‚³ãƒ³ãƒ“ãƒãƒ¼ã‚¿ã¨ä¸€ç·’ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ã“ã‚Œã¯é›†ç´„関数ãŒç©ºã®å…¥åŠ›ã‚’å—ã‘付ã‘ãªã„å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ + +クエリ: + +``` sql +SELECT avgOrNullIf(x, x > 10) +FROM +( + SELECT toDecimal32(1.23, 2) AS x +) +``` + +çµæžœ: + +``` text +┌─avgOrNullIf(x, greater(x, 10))─┠+│ á´ºáµá´¸á´¸ │ +└────────────────────────────────┘ +``` + +## -Resample + +データをグループã«åˆ†ã‘ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—ã”ã¨ã«ãƒ‡ãƒ¼ã‚¿ã‚’個別ã«é›†ç´„ã§ãã¾ã™ã€‚グループã¯ã€ã²ã¨ã¤ã®ã‚«ãƒ©ãƒ ã®å€¤ã‚’é–“éš”ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ä½œã‚‰ã‚Œã¾ã™ã€‚ + +``` sql +Resample(start, end, step)(, resampling_key) +``` + +**引数** + +- `start` — `resampling_key` 値ã®å…¨ä½“ã®å¿…è¦ãªé–“éš”ã®é–‹å§‹å€¤ã€‚ +- `stop` — `resampling_key` 値ã®å…¨ä½“ã®å¿…è¦ãªé–“éš”ã®çµ‚了値。全体ã®é–“éš”ã«ã¯çµ‚了値 `stop` ãŒå«ã¾ã‚Œã¾ã›ã‚“ `[start, stop)`。 +- `step` — 全体ã®é–“隔をサブ間隔ã«åˆ†ã‘る間隔。`aggFunction` ã¯ã“れらã®ã‚µãƒ–é–“éš”ã”ã¨ã«ç‹¬ç«‹ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +- `resampling_key` — é–“éš”ã«ãƒ‡ãƒ¼ã‚¿ã‚’分ã‘ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã®å€¤ã€‚ +- `aggFunction_params` — `aggFunction` ã®ãƒ‘ラメータ。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å„サブ間隔㮠`aggFunction` ã®çµæžœã®é…列。 + +**例** + +以下ã®ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤ `people` テーブルを考ãˆã¾ã™: + +``` text +┌─name───┬─age─┬─wage─┠+│ John │ 16 │ 10 │ +│ Alice │ 30 │ 15 │ +│ Mary │ 35 │ 8 │ +│ Evelyn │ 48 │ 11.5 │ +│ David │ 62 │ 9.9 │ +│ Brian │ 60 │ 16 │ +└────────┴─────┴──────┘ +``` + +年齢㌠`[30,60)` 㨠`[60,75)` ã®ç¯„囲ã«ã‚る人々ã®åå‰ã‚’å–å¾—ã—ã¾ã™ã€‚年齢を整数表ç¾ã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã€`[30, 59]` 㨠`[60,74]` ã®ç¯„囲ã«ãªã‚Šã¾ã™ã€‚ + +é…列ã«åå‰ã‚’集約ã™ã‚‹ãŸã‚ã«ã€[groupArray](../../sql-reference/aggregate-functions/reference/grouparray.md#agg_function-grouparray) 集約関数を使用ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯1ã¤ã®å¼•æ•°ã‚’å–ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€`name` カラムã§ã™ã€‚`groupArrayResample` 関数㯠`age` カラムを使用ã—ã¦å¹´é½¢ã”ã¨ã«åå‰ã‚’集約ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚å¿…è¦ãªé–“隔を定義ã™ã‚‹ãŸã‚ã«ã€`30, 75, 30` ã®å¼•æ•°ã‚’ `groupArrayResample` 関数ã«æ¸¡ã—ã¾ã™ã€‚ + +``` sql +SELECT groupArrayResample(30, 75, 30)(name, age) FROM people +``` + +``` text +┌─groupArrayResample(30, 75, 30)(name, age)─────┠+│ [['Alice','Mary','Evelyn'],['David','Brian']] │ +└───────────────────────────────────────────────┘ +``` + +çµæžœã‚’考ãˆã¾ã™ã€‚ + +`John` ã¯è‹¥ã™ãŽã‚‹ãŸã‚サンプルã‹ã‚‰é™¤å¤–ã•ã‚Œã¾ã™ã€‚ãã®ä»–ã®äººã€…ã¯æŒ‡å®šã•ã‚ŒãŸå¹´é½¢ã®é–“éš”ã«å¾“ã£ã¦åˆ†é…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +次ã«ã€æŒ‡å®šã•ã‚ŒãŸå¹´é½¢ç¯„囲ã«ãŠã‘ã‚‹ç·äººå£æ•°ã¨å¹³å‡è³ƒé‡‘ã‚’æ•°ãˆã¾ã™ã€‚ + +``` sql +SELECT + countResample(30, 75, 30)(name, age) AS amount, + avgResample(30, 75, 30)(wage, age) AS avg_wage +FROM people +``` + +``` text +┌─amount─┬─avg_wage──────────────────┠+│ [3,2] │ [11.5,12.949999809265137] │ +└────────┴──────────────────────────┘ +``` + +## -ArgMin + +サフィックス -ArgMin ã¯ä»»æ„ã®é›†ç´„関数ã®åå‰ã«ä»˜ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€é›†ç´„関数ã¯è¿½åŠ ã®å¼•æ•°ã¨ã—ã¦ã€ä»»æ„ã®æ¯”較å¯èƒ½ãªå¼ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚集約関数ã¯ç‰¹å®šã®è¿½åŠ å¼ã®æœ€å°å€¤ã‚’æŒã¤è¡Œã®ã¿ã‚’処ç†ã—ã¾ã™ã€‚ + +例: `sumArgMin(column, expr)`, `countArgMin(expr)`, `avgArgMin(x, expr)` ãªã©ã€‚ + +## -ArgMax + +サフィックス -ArgMin ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ç‰¹å®šã®è¿½åŠ å¼ã§æœ€å¤§å€¤ã‚’æŒã¤è¡Œã®ã¿ã‚’処ç†ã—ã¾ã™ã€‚ + +## 関連コンテンツ + +- ブログ: [Using Aggregate Combinators in ClickHouse](https://clickhouse.com/blog/aggregate-functions-combinators-in-clickhouse-for-arrays-maps-and-states) diff --git a/docs/ja/sql-reference/aggregate-functions/grouping_function.md b/docs/ja/sql-reference/aggregate-functions/grouping_function.md new file mode 100644 index 00000000000..8a7cffde219 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/grouping_function.md @@ -0,0 +1,348 @@ +--- +slug: /ja/sql-reference/aggregate-functions/grouping_function +--- + +# GROUPING + +## GROUPING + +[ROLLUP](../statements/select/group-by.md/#rollup-modifier) 㨠[CUBE](../statements/select/group-by.md/#cube-modifier) ã¯ã€GROUP BY ã«å¯¾ã™ã‚‹ä¿®é£¾å­ã§ã™ã€‚ã“れらã®ä¿®é£¾å­ã¯ã€ã„ãšã‚Œã‚‚å°è¨ˆã‚’計算ã—ã¾ã™ã€‚ROLLUP ã¯ã‚«ãƒ©ãƒ ã®ä¸¦ã¹ã‚‰ã‚ŒãŸãƒªã‚¹ãƒˆã€ä¾‹ãˆã° `(day, month, year)` ã‚’å–ã‚Šã€é›†è¨ˆã®å„レベルã§å°è¨ˆã‚’計算ã—ãŸå¾Œã€ç·è¨ˆã‚’算出ã—ã¾ã™ã€‚CUBE ã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å…¨ã¦ã®å¯èƒ½ãªçµ„ã¿åˆã‚ã›ã«ã‚ãŸã£ã¦å°è¨ˆã‚’計算ã—ã¾ã™ã€‚GROUPING ã¯ã€ROLLUP ã¾ãŸã¯ CUBE ã«ã‚ˆã£ã¦æˆ»ã•ã‚ŒãŸè¡ŒãŒã‚¹ãƒ¼ãƒ‘ー集計ã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’識別ã—ã€ä¿®é£¾ã•ã‚Œã¦ã„ãªã„ GROUP BY ã§æˆ»ã•ã‚Œã‚‹è¡Œã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’識別ã—ã¾ã™ã€‚ + +GROUPING 関数ã¯ã€è¤‡æ•°ã®ã‚«ãƒ©ãƒ ã‚’引数ã¨ã—ã¦å—ã‘å–ã‚Šã€ãƒ“ットマスクを返ã—ã¾ã™ã€‚ +- `1` ã¯ã€`GROUP BY` ã«å¯¾ã™ã‚‹ `ROLLUP` ã¾ãŸã¯ `CUBE` 修飾å­ã«ã‚ˆã£ã¦æˆ»ã•ã‚ŒãŸè¡ŒãŒå°è¨ˆã§ã‚ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ +- `0` ã¯ã€`ROLLUP` ã¾ãŸã¯ `CUBE` ã«ã‚ˆã£ã¦æˆ»ã•ã‚ŒãŸè¡ŒãŒå°è¨ˆã§ãªã„ã“ã¨ã‚’示ã—ã¾ã™ + +## GROUPING SETS + +デフォルトã§ã¯ã€CUBE 修飾å­ã¯ã€CUBE ã«æ¸¡ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®ã™ã¹ã¦ã®å¯èƒ½ãªçµ„ã¿åˆã‚ã›ã«å¯¾ã—ã¦å°è¨ˆã‚’計算ã—ã¾ã™ã€‚GROUPING SETS を使用ã™ã‚‹ã¨ã€è¨ˆç®—ã™ã‚‹ç‰¹å®šã®çµ„ã¿åˆã‚ã›ã‚’指定ã§ãã¾ã™ã€‚ + +階層データã®åˆ†æžã«ã¯ã€ROLLUPã€CUBEã€ãŠã‚ˆã³ GROUPING SETS 修飾å­ã‚’使用ã™ã‚‹ã“ã¨ãŒãŠã™ã™ã‚ã§ã™ã€‚ã“ã“ã§ã®ã‚µãƒ³ãƒ—ルã¯ã€2ã¤ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹ Linux ディストリビューションã¨ãã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«é–¢ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ†ãƒ¼ãƒ–ルã§ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’ディストリビューションã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€ãŠã‚ˆã³å ´æ‰€åˆ¥ã§è¦‹ã‚‹ã“ã¨ãŒæœ‰ç›Šã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +### サンプルデータã®ãƒ­ãƒ¼ãƒ‰ + +```sql +CREATE TABLE servers ( datacenter VARCHAR(255), + distro VARCHAR(255) NOT NULL, + version VARCHAR(50) NOT NULL, + quantity INT + ) + ORDER BY (datacenter, distro, version) +``` + +```sql +INSERT INTO servers(datacenter, distro, version, quantity) +VALUES ('Schenectady', 'Arch','2022.08.05',50), + ('Westport', 'Arch','2022.08.05',40), + ('Schenectady','Arch','2021.09.01',30), + ('Westport', 'Arch','2021.09.01',20), + ('Schenectady','Arch','2020.05.01',10), + ('Westport', 'Arch','2020.05.01',5), + ('Schenectady','RHEL','9',60), + ('Westport','RHEL','9',70), + ('Westport','RHEL','7',80), + ('Schenectady','RHEL','7',80) +``` + +```sql +SELECT + * +FROM + servers; +``` +```response +┌─datacenter──┬─distro─┬─version────┬─quantity─┠+│ Schenectady │ Arch │ 2020.05.01 │ 10 │ +│ Schenectady │ Arch │ 2021.09.01 │ 30 │ +│ Schenectady │ Arch │ 2022.08.05 │ 50 │ +│ Schenectady │ RHEL │ 7 │ 80 │ +│ Schenectady │ RHEL │ 9 │ 60 │ +│ Westport │ Arch │ 2020.05.01 │ 5 │ +│ Westport │ Arch │ 2021.09.01 │ 20 │ +│ Westport │ Arch │ 2022.08.05 │ 40 │ +│ Westport │ RHEL │ 7 │ 80 │ +│ Westport │ RHEL │ 9 │ 70 │ +└─────────────┴────────┴────────────┴──────────┘ + +10 rows in set. Elapsed: 0.409 sec. +``` + +### シンプルãªã‚¯ã‚¨ãƒª + +ディストリビューションã”ã¨ã«å„データセンターã®ã‚µãƒ¼ãƒãƒ¼æ•°ã‚’å–å¾—: + +```sql +SELECT + datacenter, + distro, + SUM (quantity) qty +FROM + servers +GROUP BY + datacenter, + distro; +``` +```response +┌─datacenter──┬─distro─┬─qty─┠+│ Schenectady │ RHEL │ 140 │ +│ Westport │ Arch │ 65 │ +│ Schenectady │ Arch │ 90 │ +│ Westport │ RHEL │ 150 │ +└─────────────┴────────┴─────┘ + +4 rows in set. Elapsed: 0.212 sec. +``` + +```sql +SELECT + datacenter, + SUM (quantity) qty +FROM + servers +GROUP BY + datacenter; +``` +```response +┌─datacenter──┬─qty─┠+│ Westport │ 215 │ +│ Schenectady │ 230 │ +└─────────────┴─────┘ + +2 rows in set. Elapsed: 0.277 sec. +``` + +```sql +SELECT + distro, + SUM (quantity) qty +FROM + servers +GROUP BY + distro; +``` + +```response +┌─distro─┬─qty─┠+│ Arch │ 155 │ +│ RHEL │ 290 │ +└────────┴─────┘ + +2 rows in set. Elapsed: 0.352 sec. +``` + +```sql +SELECT + SUM(quantity) qty +FROM + servers; +``` +```response +┌─qty─┠+│ 445 │ +└─────┘ + +1 row in set. Elapsed: 0.244 sec. +``` + +### 複数㮠GROUP BY 文㨠GROUPING SETS ã®æ¯”較 + +CUBEã€ROLLUPã€ã¾ãŸã¯ GROUPING SETS を使用ã›ãšã«ãƒ‡ãƒ¼ã‚¿ã‚’分解: + +```sql +SELECT + datacenter, + distro, + SUM (quantity) qty +FROM + servers +GROUP BY + datacenter, + distro +UNION ALL +SELECT + datacenter, + null, + SUM (quantity) qty +FROM + servers +GROUP BY + datacenter +UNION ALL +SELECT + null, + distro, + SUM (quantity) qty +FROM + servers +GROUP BY + distro +UNION ALL +SELECT + null, + null, + SUM(quantity) qty +FROM + servers; +``` +```response +┌─datacenter─┬─distro─┬─qty─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 445 │ +└────────────┴────────┴─────┘ +┌─datacenter──┬─distro─┬─qty─┠+│ Westport │ á´ºáµá´¸á´¸ │ 215 │ +│ Schenectady │ á´ºáµá´¸á´¸ │ 230 │ +└─────────────┴────────┴─────┘ +┌─datacenter──┬─distro─┬─qty─┠+│ Schenectady │ RHEL │ 140 │ +│ Westport │ Arch │ 65 │ +│ Schenectady │ Arch │ 90 │ +│ Westport │ RHEL │ 150 │ +└─────────────┴────────┴─────┘ +┌─datacenter─┬─distro─┬─qty─┠+│ á´ºáµá´¸á´¸ │ Arch │ 155 │ +│ á´ºáµá´¸á´¸ │ RHEL │ 290 │ +└────────────┴────────┴─────┘ + +9 rows in set. Elapsed: 0.527 sec. +``` + +GROUPING SETS を使用ã—ã¦åŒã˜æƒ…報をå–å¾—: +```sql +SELECT + datacenter, + distro, + SUM (quantity) qty +FROM + servers +GROUP BY + GROUPING SETS( + (datacenter,distro), + (datacenter), + (distro), + () + ) +``` +```response +┌─datacenter──┬─distro─┬─qty─┠+│ Schenectady │ RHEL │ 140 │ +│ Westport │ Arch │ 65 │ +│ Schenectady │ Arch │ 90 │ +│ Westport │ RHEL │ 150 │ +└─────────────┴────────┴─────┘ +┌─datacenter──┬─distro─┬─qty─┠+│ Westport │ │ 215 │ +│ Schenectady │ │ 230 │ +└─────────────┴────────┴─────┘ +┌─datacenter─┬─distro─┬─qty─┠+│ │ │ 445 │ +└────────────┴────────┴─────┘ +┌─datacenter─┬─distro─┬─qty─┠+│ │ Arch │ 155 │ +│ │ RHEL │ 290 │ +└────────────┴────────┴─────┘ + +9 rows in set. Elapsed: 0.427 sec. +``` + +### CUBE 㨠GROUPING SETS ã®æ¯”較 + +次ã®ã‚¯ã‚¨ãƒªã«ãŠã‘ã‚‹ CUBE `CUBE(datacenter,distro,version)` ã¯ã€æ„味をãªã•ãªã„階層をæä¾›ã—ã¦ã„ã¾ã™ã€‚2ã¤ã®ãƒ‡ã‚£ã‚¹ãƒˆãƒªãƒ“ューションã«ã‚ãŸã£ã¦ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’見るã“ã¨ã¯æ„味をãªã•ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“(ãªãœãªã‚‰ Arch 㨠RHEL ã¯åŒã˜ãƒªãƒªãƒ¼ã‚¹ã‚µã‚¤ã‚¯ãƒ«ã‚„ãƒãƒ¼ã‚¸ãƒ§ãƒ³å‘½å標準をæŒã£ã¦ã„ãªã„ãŸã‚ã§ã™ï¼‰ã€‚次ã®ä¾‹ã§ç¤ºã™ã‚ˆã†ã«ã€GROUPING SETS を使用ã™ã‚‹ã¨ã€`distro` 㨠`version` ã‚’åŒã˜ã‚»ãƒƒãƒˆã§ã‚°ãƒ«ãƒ¼ãƒ—化ã™ã‚‹ã“ã¨ãŒã§ãã€ã‚ˆã‚Šé©åˆ‡ã§ã™ã€‚ + +```sql +SELECT + datacenter, + distro, + version, + SUM(quantity) +FROM + servers +GROUP BY + CUBE(datacenter,distro,version) +ORDER BY + datacenter, + distro; +``` +```response +┌─datacenter──┬─distro─┬─version────┬─sum(quantity)─┠+│ │ │ 7 │ 160 │ +│ │ │ 2020.05.01 │ 15 │ +│ │ │ 2021.09.01 │ 50 │ +│ │ │ 2022.08.05 │ 90 │ +│ │ │ 9 │ 130 │ +│ │ │ │ 445 │ +│ │ Arch │ 2021.09.01 │ 50 │ +│ │ Arch │ 2022.08.05 │ 90 │ +│ │ Arch │ 2020.05.01 │ 15 │ +│ │ Arch │ │ 155 │ +│ │ RHEL │ 9 │ 130 │ +│ │ RHEL │ 7 │ 160 │ +│ │ RHEL │ │ 290 │ +│ Schenectady │ │ 9 │ 60 │ +│ Schenectady │ │ 2021.09.01 │ 30 │ +│ Schenectady │ │ 7 │ 80 │ +│ Schenectady │ │ 2022.08.05 │ 50 │ +│ Schenectady │ │ 2020.05.01 │ 10 │ +│ Schenectady │ │ │ 230 │ +│ Schenectady │ Arch │ 2022.08.05 │ 50 │ +│ Schenectady │ Arch │ 2021.09.01 │ 30 │ +│ Schenectady │ Arch │ 2020.05.01 │ 10 │ +│ Schenectady │ Arch │ │ 90 │ +│ Schenectady │ RHEL │ 7 │ 80 │ +│ Schenectady │ RHEL │ 9 │ 60 │ +│ Schenectady │ RHEL │ │ 140 │ +│ Westport │ │ 9 │ 70 │ +│ Westport │ │ 2020.05.01 │ 5 │ +│ Westport │ │ 2022.08.05 │ 40 │ +│ Westport │ │ 7 │ 80 │ +│ Westport │ │ 2021.09.01 │ 20 │ +│ Westport │ │ │ 215 │ +│ Westport │ Arch │ 2020.05.01 │ 5 │ +│ Westport │ Arch │ 2021.09.01 │ 20 │ +│ Westport │ Arch │ 2022.08.05 │ 40 │ +│ Westport │ Arch │ │ 65 │ +│ Westport │ RHEL │ 9 │ 70 │ +│ Westport │ RHEL │ 7 │ 80 │ +│ Westport │ RHEL │ │ 150 │ +└─────────────┴────────┴────────────┴───────────────┘ + +39 rows in set. Elapsed: 0.355 sec. +``` +:::note + +上記ã®ä¾‹ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€distro ã«é–¢é€£ã—ã¦ã„ãªã„å ´åˆã«ã¯æ„味をãªã•ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ã‚«ãƒ¼ãƒãƒ«ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’追跡ã—ã¦ã„ã‚‹å ´åˆã«ã¯æ„味をãªã™ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ãªãœãªã‚‰ã€ã‚«ãƒ¼ãƒãƒ«ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã©ã¡ã‚‰ã®ãƒ‡ã‚£ã‚¹ãƒˆãƒªãƒ“ューションã«ã‚‚関連付ã‘られるå¯èƒ½æ€§ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚次ã®ä¾‹ã®ã‚ˆã†ã« GROUPING SETS を使用ã™ã‚‹æ–¹ãŒé©ã—ã¦ã„ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +::: + +```sql +SELECT + datacenter, + distro, + version, + SUM(quantity) +FROM servers +GROUP BY + GROUPING SETS ( + (datacenter, distro, version), + (datacenter, distro)) +``` +```response +┌─datacenter──┬─distro─┬─version────┬─sum(quantity)─┠+│ Westport │ RHEL │ 9 │ 70 │ +│ Schenectady │ Arch │ 2022.08.05 │ 50 │ +│ Schenectady │ Arch │ 2021.09.01 │ 30 │ +│ Schenectady │ RHEL │ 7 │ 80 │ +│ Westport │ Arch │ 2020.05.01 │ 5 │ +│ Westport │ RHEL │ 7 │ 80 │ +│ Westport │ Arch │ 2021.09.01 │ 20 │ +│ Westport │ Arch │ 2022.08.05 │ 40 │ +│ Schenectady │ RHEL │ 9 │ 60 │ +│ Schenectady │ Arch │ 2020.05.01 │ 10 │ +└─────────────┴────────┴────────────┴───────────────┘ +┌─datacenter──┬─distro─┬─version─┬─sum(quantity)─┠+│ Schenectady │ RHEL │ │ 140 │ +│ Westport │ Arch │ │ 65 │ +│ Schenectady │ Arch │ │ 90 │ +│ Westport │ RHEL │ │ 150 │ +└─────────────┴────────┴─────────┴───────────────┘ + +14 rows in set. Elapsed: 1.036 sec. +``` diff --git a/docs/ja/sql-reference/aggregate-functions/index.md b/docs/ja/sql-reference/aggregate-functions/index.md new file mode 100644 index 00000000000..c5f146cd8fc --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/index.md @@ -0,0 +1,135 @@ +--- +slug: /ja/sql-reference/aggregate-functions/ +sidebar_label: 集約関数 +sidebar_position: 33 +--- + +# 集約関数 + +集約関数ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®å°‚門家ãŒæœŸå¾…ã™ã‚‹[通常](http://www.sql-tutorial.com/sql-aggregate-functions-sql-tutorial)ã®æ–¹æ³•ã§å‹•ä½œã—ã¾ã™ã€‚ + +ClickHouseã¯ä»¥ä¸‹ã‚‚サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: + +- カラムã«åŠ ãˆã¦ä»–ã®ãƒ‘ラメータをå—ã‘入れる[パラメトリック集約関数](../../sql-reference/aggregate-functions/parametric-functions.md#aggregate_functions_parametric)。 +- 集約関数ã®å‹•ä½œã‚’変ãˆã‚‹[コンビãƒãƒ¼ã‚¿](../../sql-reference/aggregate-functions/combinators.md#aggregate_functions_combinators)。 + +## NULL ã®å‡¦ç† + +集約中ã«ã€ã™ã¹ã¦ã® `NULL` 引数ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚集約ã«è¤‡æ•°ã®å¼•æ•°ãŒã‚ã‚‹å ´åˆã€ã„ãšã‚Œã‹ãŒ `NULL` ã®è¡Œã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + +ã“ã®è¦å‰‡ã«ã¯ä¾‹å¤–ãŒã‚ã‚Šã€ãã‚ŒãŒ[`first_value`](../../sql-reference/aggregate-functions/reference/first_value.md)ã€[`last_value`](../../sql-reference/aggregate-functions/reference/last_value.md)ãŠã‚ˆã³ãã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ï¼ˆãã‚Œãžã‚Œ `any` 㨠`anyLast`)ã§ã€ä¿®é£¾å­ `RESPECT NULLS` ãŒç¶šãå ´åˆã§ã™ã€‚例ã¨ã—ã¦ã€`FIRST_VALUE(b) RESPECT NULLS` ãŒã‚ã‚Šã¾ã™ã€‚ + +**例:** + +次ã®ãƒ†ãƒ¼ãƒ–ルを考ãˆã¦ã¿ã¾ã—ょã†: + +``` text +┌─x─┬────y─┠+│ 1 │ 2 │ +│ 2 │ á´ºáµá´¸á´¸ │ +│ 3 │ 2 │ +│ 3 │ 3 │ +│ 3 │ á´ºáµá´¸á´¸ │ +└───┴──────┘ +``` + +`y` カラムã®å€¤ã‚’åˆè¨ˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã¨ã—ã¾ã—ょã†: + +``` sql +SELECT sum(y) FROM t_null_big +``` + +```text +┌─sum(y)─┠+│ 7 │ +└────────┘ +``` + +次ã«ã€`y` カラムã‹ã‚‰é…列を作æˆã™ã‚‹ãŸã‚ã« `groupArray` 関数を使用ã§ãã¾ã™: + +``` sql +SELECT groupArray(y) FROM t_null_big +``` + +``` text +┌─groupArray(y)─┠+│ [2,2,3] │ +└───────────────┘ +``` + +`groupArray` ã¯çµæžœã®é…列㫠`NULL` ã‚’å«ã‚ã¾ã›ã‚“。 + +[COALESCE](../../sql-reference/functions/functions-for-nulls.md#coalesce) を使用ã—㦠`NULL` をユースケースã«åˆã£ãŸå€¤ã«å¤‰æ›´ã§ãã¾ã™ã€‚例ã¨ã—ã¦ã€`avg(COALESCE(column, 0))` を使用ã™ã‚‹ã¨ã€ã‚«ãƒ©ãƒ ã®å€¤ãŒé›†ç´„ã«ä½¿ã‚ã‚Œã€`NULL` ã®å ´åˆã¯ã‚¼ãƒ­ãŒä½¿ã‚ã‚Œã¾ã™: + +``` sql +SELECT + avg(y), + avg(coalesce(y, 0)) +FROM t_null_big +``` + +``` text +┌─────────────avg(y)─┬─avg(coalesce(y, 0))─┠+│ 2.3333333333333335 │ 1.4 │ +└────────────────────┴─────────────────────┘ +``` + +ã¾ãŸã€`Tuple` を使用ã—㦠`NULL` スキップ動作を回é¿ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚`NULL` 値ã®ã¿ã‚’å«ã‚€ `Tuple` 㯠`NULL` ã§ã¯ãªã„ãŸã‚ã€ãã®`NULL` 値ã®ãŸã‚ã«è¡ŒãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã›ã‚“。 + +```sql +SELECT + groupArray(y), + groupArray(tuple(y)).1 +FROM t_null_big; + +┌─groupArray(y)─┬─tupleElement(groupArray(tuple(y)), 1)─┠+│ [2,2,3] │ [2,NULL,2,3,NULL] │ +└───────────────┴───────────────────────────────────────┘ +``` + +列ãŒé›†ç´„関数ã®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€é›†ç´„ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ãƒ‘ラメータãªã—ã® `count()` や定数ã®ã‚‚ã® (`count(1)`) ã¯ãƒ–ロック内ã®ã™ã¹ã¦ã®è¡Œã‚’カウントã—ã¾ã™ï¼ˆã“れ㯠`GROUP BY` カラムã®å€¤ã«ä¾å­˜ã—ãªã„ãŸã‚ã€å¼•æ•°ã§ã¯ãªã„)ãŒã€`count(column)` ã¯åˆ—㌠`NULL` ã§ãªã„è¡Œã®æ•°ã®ã¿ã‚’è¿”ã—ã¾ã™ã€‚ + +```sql +SELECT + v, + count(1), + count(v) +FROM +( + SELECT if(number < 10, NULL, number % 3) AS v + FROM numbers(15) +) +GROUP BY v + +┌────v─┬─count()─┬─count(v)─┠+│ á´ºáµá´¸á´¸ │ 10 │ 0 │ +│ 0 │ 1 │ 1 │ +│ 1 │ 2 │ 2 │ +│ 2 │ 2 │ 2 │ +└──────┴─────────┴──────────┘ +``` + +`RESPECT NULLS` を伴ㆠ`first_value` ã®ä¾‹ã¨ã—ã¦ã€`NULL` 入力ãŒå°Šé‡ã•ã‚Œã€`NULL` ã‹ã©ã†ã‹ã«ã‹ã‹ã‚らãšæœ€åˆã«èª­ã¿å–られãŸå€¤ãŒè¿”ã•ã‚Œã‚‹ã“ã¨ã‚’確èªã§ãã¾ã™: + +```sql +SELECT + col || '_' || ((col + 1) * 5 - 1) as range, + first_value(odd_or_null) as first, + first_value(odd_or_null) IGNORE NULLS as first_ignore_null, + first_value(odd_or_null) RESPECT NULLS as first_respect_nulls +FROM +( + SELECT + intDiv(number, 5) AS col, + if(number % 2 == 0, NULL, number) as odd_or_null + FROM numbers(15) +) +GROUP BY col +ORDER BY col + +┌─range─┬─first─┬─first_ignore_null─┬─first_respect_nulls─┠+│ 0_4 │ 1 │ 1 │ á´ºáµá´¸á´¸ │ +│ 1_9 │ 5 │ 5 │ 5 │ +│ 2_14 │ 11 │ 11 │ á´ºáµá´¸á´¸ │ +└───────┴───────┴───────────────────┴─────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/parametric-functions.md b/docs/ja/sql-reference/aggregate-functions/parametric-functions.md new file mode 100644 index 00000000000..504d8c597d7 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/parametric-functions.md @@ -0,0 +1,875 @@ +--- +slug: /ja/sql-reference/aggregate-functions/parametric-functions +sidebar_position: 38 +sidebar_label: Parametric +--- + +# パラメトリック集計関数 + +ã„ãã¤ã‹ã®é›†è¨ˆé–¢æ•°ã¯ã€å¼•æ•°ã‚«ãƒ©ãƒ ï¼ˆåœ§ç¸®ã®ãŸã‚ã«ä½¿ç”¨ï¼‰ã ã‘ã§ãªãã€åˆæœŸåŒ–ã®ãŸã‚ã®ãƒ‘ラメータã®ã‚»ãƒƒãƒˆã‚’å—ã‘入れるã“ã¨ãŒã§ãã¾ã™ã€‚構文ã¯ã€1組ã§ã¯ãªã2組ã®æ‹¬å¼§ã‚’使用ã—ã¾ã™ã€‚1ã¤ã¯ãƒ‘ラメータ用ã§ã€ã‚‚ã†1ã¤ã¯å¼•æ•°ç”¨ã§ã™ã€‚ + +## histogram + +順応型ヒストグラムを計算ã—ã¾ã™ã€‚正確ãªçµæžœã¯ä¿è¨¼ã•ã‚Œã¾ã›ã‚“。 + +``` sql +histogram(number_of_bins)(values) +``` + +ã“ã®é–¢æ•°ã¯ã€[A Streaming Parallel Decision Tree Algorithm](http://jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf)を使用ã—ã¾ã™ã€‚ヒストグラムã®ãƒ“ンã®å¢ƒç•Œã¯æ–°ã—ã„データãŒé–¢æ•°ã«å…¥ã‚‹ã¨èª¿æ•´ã•ã‚Œã¾ã™ã€‚一般的ãªå ´åˆã€ãƒ“ンã®å¹…ã¯ç­‰ã—ãã‚ã‚Šã¾ã›ã‚“。 + +**引数** + +`values` — 入力値をçµæžœã™ã‚‹[å¼](../../sql-reference/syntax.md#syntax-expressions)。 + +**パラメータ** + +`number_of_bins` — ヒストグラム内ã®ãƒ“ンã®æ•°ã®ä¸Šé™ã€‚関数ã¯è‡ªå‹•çš„ã«ãƒ“ンã®æ•°ã‚’計算ã—ã¾ã™ã€‚指定ã•ã‚ŒãŸãƒ“ンã®æ•°ã«é”ã—よã†ã¨ã—ã¾ã™ãŒã€å¤±æ•—ã—ãŸå ´åˆã¯å°‘ãªã„ビンを使用ã—ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 次ã®å½¢å¼ã®[タプル](../../sql-reference/data-types/tuple.md)ã®[é…列](../../sql-reference/data-types/array.md): + + ``` + [(lower_1, upper_1, height_1), ... (lower_N, upper_N, height_N)] + ``` + + - `lower` — ビンã®ä¸‹é™ã€‚ + - `upper` — ビンã®ä¸Šé™ã€‚ + - `height` — ビンã®è¨ˆç®—ã•ã‚ŒãŸé«˜ã•ã€‚ + +**例** + +``` sql +SELECT histogram(5)(number + 1) +FROM ( + SELECT * + FROM system.numbers + LIMIT 20 +) +``` + +``` text +┌─histogram(5)(plus(number, 1))───────────────────────────────────────────┠+│ [(1,4.5,4),(4.5,8.5,4),(8.5,12.75,4.125),(12.75,17,4.625),(17,20,3.25)] │ +└─────────────────────────────────────────────────────────────────────────┘ +``` + +[bar](../../sql-reference/functions/other-functions.md#function-bar)関数を使用ã—ã¦ãƒ’ストグラムを視覚化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ï¼š + +``` sql +WITH histogram(5)(rand() % 100) AS hist +SELECT + arrayJoin(hist).3 AS height, + bar(height, 0, 6, 5) AS bar +FROM +( + SELECT * + FROM system.numbers + LIMIT 20 +) +``` + +``` text +┌─height─┬─bar───┠+│ 2.125 │ █▋ │ +│ 3.25 │ ██▌ │ +│ 5.625 │ ████■│ +│ 5.625 │ ████■│ +│ 3.375 │ ██▌ │ +└────────┴───────┘ +``` + +ã“ã®å ´åˆã€ãƒ’ストグラムビンã®å¢ƒç•Œã‚’知らãªã„ã“ã¨ã‚’覚ãˆã¦ãŠãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## sequenceMatch + +シーケンスã«ãƒ‘ターンã«ä¸€è‡´ã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆãƒã‚§ãƒ¼ãƒ³ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +**構文** + +``` sql +sequenceMatch(pattern)(timestamp, cond1, cond2, ...) +``` + +:::note +åŒã˜ç§’ã«ç™ºç”Ÿã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€çµæžœã«å½±éŸ¿ã‚’与ãˆã‚‹ä¸æ˜Žãªé †åºã§ã‚·ãƒ¼ã‚±ãƒ³ã‚¹å†…ã«å­˜åœ¨ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**引数** + +- `timestamp` — 時間データをå«ã‚“ã§ã„ã‚‹ã¨è¦‹ãªã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã€‚一般的ãªãƒ‡ãƒ¼ã‚¿åž‹ã¯`Date`ã¨`DateTime`ã§ã™ã€‚ã¾ãŸã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹[UInt](../../sql-reference/data-types/int-uint.md)データ型ã®ã„ãšã‚Œã‹ã‚’使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +- `cond1`, `cond2` — イベントãƒã‚§ãƒ¼ãƒ³ã‚’記述ã™ã‚‹æ¡ä»¶ã€‚データ型:`UInt8`。最大32ã®æ¡ä»¶å¼•æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚関数ã¯ã€ã“れらã®æ¡ä»¶ã§èª¬æ˜Žã•ã‚Œã¦ã„るイベントã®ã¿è€ƒæ…®ã—ã¾ã™ã€‚シーケンスã«æ¡ä»¶ã§èª¬æ˜Žã•ã‚Œã¦ã„ãªã„データãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€é–¢æ•°ã¯ãれらをスキップã—ã¾ã™ã€‚ + +**パラメータ** + +- `pattern` — パターン文字列。[パターン構文](#pattern-syntax)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- パターンãŒä¸€è‡´ã™ã‚‹å ´åˆã¯1。 +- パターンãŒä¸€è‡´ã—ãªã„å ´åˆã¯0。 + +型:`UInt8`。 + +#### パターン構文 + +- `(?N)` — ä½ç½®`N`ã®æ¡ä»¶å¼•æ•°ã«ä¸€è‡´ã—ã¾ã™ã€‚æ¡ä»¶ã¯`[1, 32]`ã®ç¯„囲ã§ç•ªå·ãŒä»˜ã‘られã¦ã„ã¾ã™ã€‚ãŸã¨ãˆã°ã€`(?1)`ã¯`cond1`パラメータã«æ¸¡ã•ã‚ŒãŸå¼•æ•°ã«ä¸€è‡´ã—ã¾ã™ã€‚ + +- `.*` — ä»»æ„ã®æ•°ã®ã‚¤ãƒ™ãƒ³ãƒˆã«ä¸€è‡´ã—ã¾ã™ã€‚ã“ã®ãƒ‘ターンè¦ç´ ã«ä¸€è‡´ã™ã‚‹ãŸã‚ã«æ¡ä»¶å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“。 + +- `(?t operator value)` — 2ã¤ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’éš”ã¦ã‚‹ç§’数を設定ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ‘ターン`(?1)(?t>1800)(?2)`ã¯1800秒以上離れã¦ç™ºç”Ÿã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã«ä¸€è‡´ã—ã¾ã™ã€‚ã“れらã®ã‚¤ãƒ™ãƒ³ãƒˆã®é–“ã«ä»»æ„ã®æ•°ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒå­˜åœ¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`>=`, `>`, `<`, `<=`, `==`演算å­ã‚’使用ã§ãã¾ã™ã€‚ + +**例** + +`t`テーブル内ã®ãƒ‡ãƒ¼ã‚¿ã‚’考ãˆã¾ã™ï¼š + +``` text +┌─time─┬─number─┠+│ 1 │ 1 │ +│ 2 │ 3 │ +│ 3 │ 2 │ +└──────┴────────┘ +``` + +クエリを実行ã—ã¾ã™ï¼š + +``` sql +SELECT sequenceMatch('(?1)(?2)')(time, number = 1, number = 2) FROM t +``` + +``` text +┌─sequenceMatch('(?1)(?2)')(time, equals(number, 1), equals(number, 2))─┠+│ 1 │ +└───────────────────────────────────────────────────────────────────────┘ +``` + +関数ã¯ã€2番目ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒ1ã«ç¶šãイベントãƒã‚§ãƒ¼ãƒ³ã‚’発見ã—ã¾ã—ãŸã€‚ãã®é–“ã®3番ã¯ã‚¤ãƒ™ãƒ³ãƒˆã¨ã—ã¦è¨˜è¿°ã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã—ãŸã€‚例ã§ç¤ºã•ã‚ŒãŸã‚¤ãƒ™ãƒ³ãƒˆãƒã‚§ãƒ¼ãƒ³ã‚’検索ã™ã‚‹ã¨ãã«ã“ã®ç•ªå·ã‚’考慮ã«å…¥ã‚ŒãŸã„å ´åˆã¯ã€ãã®ãŸã‚ã®æ¡ä»¶ã‚’設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` sql +SELECT sequenceMatch('(?1)(?2)')(time, number = 1, number = 2, number = 3) FROM t +``` + +``` text +┌─sequenceMatch('(?1)(?2)')(time, equals(number, 1), equals(number, 2), equals(number, 3))─┠+│ 0 │ +└──────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +ã“ã®å ´åˆã€é–¢æ•°ã¯ãƒ‘ターンã«ä¸€è‡´ã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆãƒã‚§ãƒ¼ãƒ³ã‚’見ã¤ã‘られã¾ã›ã‚“ã§ã—ãŸã€‚ãªãœãªã‚‰ã€3ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒ1ã¨2ã®é–“ã«ç™ºç”Ÿã—ãŸã‹ã‚‰ã§ã™ã€‚åŒã˜å ´åˆã«4ã®ç•ªå·ãŒæ¡ä»¶ã¨ã—ã¦ãƒã‚§ãƒƒã‚¯ã•ã‚ŒãŸå ´åˆã€ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¯ãƒ‘ターンã«ä¸€è‡´ã—ã¾ã™ã€‚ + +``` sql +SELECT sequenceMatch('(?1)(?2)')(time, number = 1, number = 2, number = 4) FROM t +``` + +``` text +┌─sequenceMatch('(?1)(?2)')(time, equals(number, 1), equals(number, 2), equals(number, 4))─┠+│ 1 │ +└──────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [sequenceCount](#sequencecount) + +## sequenceCount + +パターンã«ä¸€è‡´ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆãƒã‚§ãƒ¼ãƒ³ã®æ•°ã‚’カウントã—ã¾ã™ã€‚関数ã¯é‡ãªã‚‰ãªã„イベントãƒã‚§ãƒ¼ãƒ³ã‚’検索ã—ã¾ã™ã€‚ç¾åœ¨ã®ãƒã‚§ãƒ¼ãƒ³ãŒä¸€è‡´ã—ãŸå¾Œã«æ¬¡ã®ãƒã‚§ãƒ¼ãƒ³ã®æ¤œç´¢ã‚’開始ã—ã¾ã™ã€‚ + +:::note +åŒã˜ç§’ã«ç™ºç”Ÿã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€çµæžœã«å½±éŸ¿ã‚’与ãˆã‚‹ä¸æ˜Žãªé †åºã§ã‚·ãƒ¼ã‚±ãƒ³ã‚¹å†…ã«å­˜åœ¨ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**構文** + +``` sql +sequenceCount(pattern)(timestamp, cond1, cond2, ...) +``` + +**引数** + +- `timestamp` — 時間データをå«ã‚“ã§ã„ã‚‹ã¨è¦‹ãªã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã€‚一般的ãªãƒ‡ãƒ¼ã‚¿åž‹ã¯`Date`ã¨`DateTime`ã§ã™ã€‚ã¾ãŸã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹[UInt](../../sql-reference/data-types/int-uint.md)データ型ã®ã„ãšã‚Œã‹ã‚’使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +- `cond1`, `cond2` — イベントãƒã‚§ãƒ¼ãƒ³ã‚’記述ã™ã‚‹æ¡ä»¶ã€‚データ型:`UInt8`。最大32ã®æ¡ä»¶å¼•æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚関数ã¯ã€ã“れらã®æ¡ä»¶ã§èª¬æ˜Žã•ã‚Œã¦ã„るイベントã®ã¿è€ƒæ…®ã—ã¾ã™ã€‚シーケンスã«æ¡ä»¶ã§èª¬æ˜Žã•ã‚Œã¦ã„ãªã„データãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€é–¢æ•°ã¯ãれらをスキップã—ã¾ã™ã€‚ + +**パラメータ** + +- `pattern` — パターン文字列。[パターン構文](#pattern-syntax)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 一致ã—ãŸé‡ãªã‚‰ãªã„イベントãƒã‚§ãƒ¼ãƒ³ã®æ•°ã€‚ + +型:`UInt64` + +**例** + +`t`テーブル内ã®ãƒ‡ãƒ¼ã‚¿ã‚’考ãˆã¾ã™ï¼š + +``` text +┌─time─┬─number─┠+│ 1 │ 1 │ +│ 2 │ 3 │ +│ 3 │ 2 │ +│ 4 │ 1 │ +│ 5 │ 3 │ +│ 6 │ 2 │ +└──────┴────────┘ +``` + +ä»»æ„ã®ä»–ã®ç•ªå·ãŒãれらã®é–“ã«å­˜åœ¨ã—ã¦ã‚‚ã€ç•ªå·1ã®å¾Œã«ç•ªå·2ãŒä½•å›žç™ºç”Ÿã™ã‚‹ã‹ã‚’æ•°ãˆã¾ã™ï¼š + +``` sql +SELECT sequenceCount('(?1).*(?2)')(time, number = 1, number = 2) FROM t +``` + +``` text +┌─sequenceCount('(?1).*(?2)')(time, equals(number, 1), equals(number, 2))─┠+│ 2 │ +└─────────────────────────────────────────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [sequenceMatch](#sequencematch) + +## windowFunnel + +スライディングタイムウィンドウã§ã‚¤ãƒ™ãƒ³ãƒˆãƒã‚§ãƒ¼ãƒ³ã‚’検索ã—ã€ãƒã‚§ãƒ¼ãƒ³ã‹ã‚‰ç™ºç”Ÿã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã®æœ€å¤§æ•°ã‚’計算ã—ã¾ã™ã€‚ + +関数ã¯æ¬¡ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã«å¾“ã£ã¦å‹•ä½œã—ã¾ã™ï¼š + +- 関数ã¯ãƒã‚§ãƒ¼ãƒ³ã®æœ€åˆã®æ¡ä»¶ã‚’トリガーã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’検索ã—ã€ã‚¤ãƒ™ãƒ³ãƒˆã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã‚’1ã«è¨­å®šã—ã¾ã™ã€‚ã“ã‚Œã¯ã‚¹ãƒ©ã‚¤ãƒ‡ã‚£ãƒ³ã‚°ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒå§‹ã¾ã‚‹çž¬é–“ã§ã™ã€‚ + +- ウィンドウ内ã§ãƒã‚§ãƒ¼ãƒ³ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒé †æ¬¡ç™ºç”Ÿã™ã‚‹å ´åˆã€ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã¯ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•ã‚Œã¾ã™ã€‚イベントã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ãŒä¸­æ–­ã•ã‚ŒãŸå ´åˆã€ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã¯ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•ã‚Œã¾ã›ã‚“。 + +- データã«ç•°ãªã‚‹å®Œäº†ç‚¹ã‚’æŒã¤è¤‡æ•°ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒã‚§ãƒ¼ãƒ³ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€é–¢æ•°ã¯æœ€é•·ã®ãƒã‚§ãƒ¼ãƒ³ã®ã‚µã‚¤ã‚ºã®ã¿å‡ºåŠ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +windowFunnel(window, [mode, [mode, ... ]])(timestamp, cond1, cond2, ..., condN) +``` + +**引数** + +- `timestamp` — タイムスタンプをå«ã‚€ã‚«ãƒ©ãƒ ã®åå‰ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型:[Date](../../sql-reference/data-types/date.md)ã€[DateTime](../../sql-reference/data-types/datetime.md#data_type-datetime)ãŠã‚ˆã³ãã®ä»–ã®ç¬¦å·ãªã—整数型(タイムスタンプã¯`UInt64`型をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ãŒã€ãã®å€¤ã¯Int64ã®æœ€å¤§å€¤ï¼ˆ2^63 - 1)を超ãˆãªã„å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ +- `cond` — イベントãƒã‚§ãƒ¼ãƒ³ã‚’記述ã™ã‚‹æ¡ä»¶ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ã€‚[UInt8](../../sql-reference/data-types/int-uint.md)。 + +**パラメータ** + +- `window` — スライディングウィンドウã®é•·ã•ã€ã“ã‚Œã¯æœ€åˆã¨æœ€å¾Œã®æ¡ä»¶ã®é–“ã®æ™‚é–“é–“éš”ã§ã™ã€‚`window`ã®å˜ä½ã¯`timestamp`自体ã«ä¾å­˜ã—ã€ç•°ãªã‚Šã¾ã™ã€‚å¼`timestamp of cond1 <= timestamp of cond2 <= ... <= timestamp of condN <= timestamp of cond1 + window`を使用ã—ã¦æ±ºå®šã•ã‚Œã¾ã™ã€‚ +- `mode` — ã“ã‚Œã¯ã‚ªãƒ—ションã®å¼•æ•°ã§ã™ã€‚1ã¤ä»¥ä¸Šã®ãƒ¢ãƒ¼ãƒ‰ã‚’設定ã§ãã¾ã™ã€‚ + - `'strict_deduplication'` — イベントã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§åŒã˜æ¡ä»¶ãŒæˆç«‹ã—ã¦ã„ã‚‹å ´åˆã€ãã®ã‚ˆã†ãªç¹°ã‚Šè¿”ã—イベントã¯ã•ã‚‰ã«å‡¦ç†ã‚’中断ã—ã¾ã™ã€‚注:複数ã®æ¡ä»¶ãŒåŒã˜ã‚¤ãƒ™ãƒ³ãƒˆã«å¯¾ã—ã¦æˆç«‹ã—ãŸå ´åˆã€äºˆæœŸã—ãªã„動作ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + - `'strict_order'` — ä»–ã®ã‚¤ãƒ™ãƒ³ãƒˆã®ä»‹å…¥ã‚’許å¯ã—ã¾ã›ã‚“。例:`A->B->D->C`ã®å ´åˆã€`A->B->C`を見ã¤ã‘ã‚‹ã®ã‚’`D`ã§æ­¢ã‚ã€æœ€å¤§ã‚¤ãƒ™ãƒ³ãƒˆãƒ¬ãƒ™ãƒ«ã¯2ã§ã™ã€‚ + - `'strict_increase'` — 厳密ã«å¢—加ã™ã‚‹ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã®ã‚¤ãƒ™ãƒ³ãƒˆã«ã®ã¿æ¡ä»¶ã‚’é©ç”¨ã—ã¾ã™ã€‚ + - `'strict_once'` — æ¡ä»¶ã«è¤‡æ•°å›žä¸€è‡´ã—ã¦ã‚‚ã€ãƒã‚§ãƒ¼ãƒ³å†…ã§å„イベントを一度ã ã‘カウントã—ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +スライディングタイムウィンドウ内ã®ãƒã‚§ãƒ¼ãƒ³ã‹ã‚‰é€£ç¶šã—ã¦ãƒˆãƒªã‚¬ãƒ¼ã•ã‚ŒãŸæœ€å¤§æ¡ä»¶æ•°ã€‚ +é¸æŠžå†…ã®ã™ã¹ã¦ã®ãƒã‚§ãƒ¼ãƒ³ãŒåˆ†æžã•ã‚Œã¾ã™ã€‚ + +型:`Integer` + +**例** + +オンラインストアã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒé›»è©±ã‚’2回é¸æŠžã—ã¦è³¼å…¥ã™ã‚‹ã®ã«å分ãªæœŸé–“ãŒã‚ã‚‹ã‹ã©ã†ã‹ã‚’判断ã—ã¾ã™ã€‚ + +次ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒã‚§ãƒ¼ãƒ³ã‚’設定ã—ã¾ã™ï¼š + +1. ユーザーãŒã‚¹ãƒˆã‚¢ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«ãƒ­ã‚°ã‚¤ãƒ³ã—ã¾ã—ãŸï¼ˆ`eventID = 1003`)。 +2. ユーザーãŒé›»è©±ã‚’検索ã—ã¾ã—ãŸï¼ˆ`eventID = 1007, product = 'phone'`)。 +3. ユーザーãŒæ³¨æ–‡ã‚’ã—ã¾ã—ãŸï¼ˆ`eventID = 1009`)。 +4. ユーザーãŒå†åº¦æ³¨æ–‡ã‚’ã—ã¾ã—ãŸï¼ˆ`eventID = 1010`)。 + +入力テーブル: + +``` text +┌─event_date─┬─user_id─┬───────────timestamp─┬─eventID─┬─product─┠+│ 2019-01-28 │ 1 │ 2019-01-29 10:00:00 │ 1003 │ phone │ +└────────────┴─────────┴─────────────────────┴─────────┴─────────┘ +┌─event_date─┬─user_id─┬───────────timestamp─┬─eventID─┬─product─┠+│ 2019-01-31 │ 1 │ 2019-01-31 09:00:00 │ 1007 │ phone │ +└────────────┴─────────┴─────────────────────┴─────────┴─────────┘ +┌─event_date─┬─user_id─┬───────────timestamp─┬─eventID─┬─product─┠+│ 2019-01-30 │ 1 │ 2019-01-30 08:00:00 │ 1009 │ phone │ +└────────────┴─────────┴─────────────────────┴─────────┴─────────┘ +┌─event_date─┬─user_id─┬───────────timestamp─┬─eventID─┬─product─┠+│ 2019-02-01 │ 1 │ 2019-02-01 08:00:00 │ 1010 │ phone │ +└────────────┴─────────┴─────────────────────┴─────────┴─────────┘ +``` + +2019å¹´1月〜2月ã®æœŸé–“ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼`user_id`ãŒã©ã“ã¾ã§ãƒã‚§ãƒ¼ãƒ³ã‚’進むã“ã¨ãŒã§ããŸã‹ã‚’調ã¹ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT + level, + count() AS c +FROM +( + SELECT + user_id, + windowFunnel(6048000000000000)(timestamp, eventID = 1003, eventID = 1009, eventID = 1007, eventID = 1010) AS level + FROM trend + WHERE (event_date >= '2019-01-01') AND (event_date <= '2019-02-02') + GROUP BY user_id +) +GROUP BY level +ORDER BY level ASC; +``` + +çµæžœï¼š + +``` text +┌─level─┬─c─┠+│ 4 │ 1 │ +└───────┴───┘ +``` + +## retention + +ã“ã®é–¢æ•°ã¯ã€ã‚¤ãƒ™ãƒ³ãƒˆã«å¯¾ã—ã¦ç‰¹å®šã®æ¡ä»¶ãŒæº€ãŸã•ã‚ŒãŸã‹ã©ã†ã‹ã‚’示ã™`UInt8`åž‹ã®1ã‹ã‚‰32ã®å¼•æ•°ã‹ã‚‰ãªã‚‹æ¡ä»¶ã®ã‚»ãƒƒãƒˆã‚’引数ã¨ã—ã¦å—ã‘å–ã‚Šã¾ã™ã€‚ +ã©ã‚“ãªæ¡ä»¶ã§ã‚‚引数ã¨ã—ã¦æŒ‡å®šã§ãã¾ã™ï¼ˆ[WHERE](../../sql-reference/statements/select/where.md#select-where)ã®ã‚ˆã†ã«ï¼‰ã€‚ + +最åˆã®æ¡ä»¶ã‚’除ã„ã¦ã€æ¡ä»¶ã¯ãƒšã‚¢ã§é©ç”¨ã•ã‚Œã¾ã™ï¼š2番目ã®çµæžœãŒçœŸã«ãªã‚‹ã®ã¯ã€æœ€åˆã¨2番目ãŒã¨ã‚‚ã«çœŸã®å ´åˆã€3番目ã®å ´åˆã¯æœ€åˆã¨3番目ãŒã¨ã‚‚ã«çœŸã®å ´åˆãªã©ã§ã™ã€‚ + +**構文** + +``` sql +retention(cond1, cond2, ..., cond32); +``` + +**引数** + +- `cond` — `UInt8`ã®çµæžœï¼ˆ1ã¾ãŸã¯0)を返ã™å¼ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +1ã¾ãŸã¯0ã®é…列。 + +- 1 — イベントã«å¯¾ã—ã¦æ¡ä»¶ãŒæº€ãŸã•ã‚ŒãŸã€‚ +- 0 — イベントã«å¯¾ã—ã¦æ¡ä»¶ãŒæº€ãŸã•ã‚Œãªã‹ã£ãŸã€‚ + +型:`UInt8`。 + +**例** + +サイトトラフィックを判断ã™ã‚‹ãŸã‚ã®`retention`関数ã®è¨ˆç®—例を考ãˆã¦ã¿ã¾ã—ょã†ã€‚ + +**1.** 例を示ã™ãŸã‚ã«ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ + +``` sql +CREATE TABLE retention_test(date Date, uid Int32) ENGINE = Memory; + +INSERT INTO retention_test SELECT '2020-01-01', number FROM numbers(5); +INSERT INTO retention_test SELECT '2020-01-02', number FROM numbers(10); +INSERT INTO retention_test SELECT '2020-01-03', number FROM numbers(15); +``` + +入力テーブル: + +クエリ: + +``` sql +SELECT * FROM retention_test +``` + +çµæžœï¼š + +``` text +┌───────date─┬─uid─┠+│ 2020-01-01 │ 0 │ +│ 2020-01-01 │ 1 │ +│ 2020-01-01 │ 2 │ +│ 2020-01-01 │ 3 │ +│ 2020-01-01 │ 4 │ +└────────────┴─────┘ +┌───────date─┬─uid─┠+│ 2020-01-02 │ 0 │ +│ 2020-01-02 │ 1 │ +│ 2020-01-02 │ 2 │ +│ 2020-01-02 │ 3 │ +│ 2020-01-02 │ 4 │ +│ 2020-01-02 │ 5 │ +│ 2020-01-02 │ 6 │ +│ 2020-01-02 │ 7 │ +│ 2020-01-02 │ 8 │ +│ 2020-01-02 │ 9 │ +└────────────┴─────┘ +┌───────date─┬─uid─┠+│ 2020-01-03 │ 0 │ +│ 2020-01-03 │ 1 │ +│ 2020-01-03 │ 2 │ +│ 2020-01-03 │ 3 │ +│ 2020-01-03 │ 4 │ +│ 2020-01-03 │ 5 │ +│ 2020-01-03 │ 6 │ +│ 2020-01-03 │ 7 │ +│ 2020-01-03 │ 8 │ +│ 2020-01-03 │ 9 │ +│ 2020-01-03 │ 10 │ +│ 2020-01-03 │ 11 │ +│ 2020-01-03 │ 12 │ +│ 2020-01-03 │ 13 │ +│ 2020-01-03 │ 14 │ +└────────────┴─────┘ +``` + +**2.** `retention`関数を使用ã—ã¦`uid`をユニークãªãƒ¦ãƒ¼ã‚¶ãƒ¼IDã§ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT + uid, + retention(date = '2020-01-01', date = '2020-01-02', date = '2020-01-03') AS r +FROM retention_test +WHERE date IN ('2020-01-01', '2020-01-02', '2020-01-03') +GROUP BY uid +ORDER BY uid ASC +``` + +çµæžœï¼š + +``` text +┌─uid─┬─r───────┠+│ 0 │ [1,1,1] │ +│ 1 │ [1,1,1] │ +│ 2 │ [1,1,1] │ +│ 3 │ [1,1,1] │ +│ 4 │ [1,1,1] │ +│ 5 │ [0,0,0] │ +│ 6 │ [0,0,0] │ +│ 7 │ [0,0,0] │ +│ 8 │ [0,0,0] │ +│ 9 │ [0,0,0] │ +│ 10 │ [0,0,0] │ +│ 11 │ [0,0,0] │ +│ 12 │ [0,0,0] │ +│ 13 │ [0,0,0] │ +│ 14 │ [0,0,0] │ +└─────┴─────────┘ +``` + +**3.** æ—¥ã”ã¨ã®ã‚µã‚¤ãƒˆè¨ªå•æ•°ã®åˆè¨ˆã‚’計算ã—ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT + sum(r[1]) AS r1, + sum(r[2]) AS r2, + sum(r[3]) AS r3 +FROM +( + SELECT + uid, + retention(date = '2020-01-01', date = '2020-01-02', date = '2020-01-03') AS r + FROM retention_test + WHERE date IN ('2020-01-01', '2020-01-02', '2020-01-03') + GROUP BY uid +) +``` + +çµæžœï¼š + +``` text +┌─r1─┬─r2─┬─r3─┠+│ 5 │ 5 │ 5 │ +└────┴────┴────┘ +``` + +ãã‚Œãžã‚Œï¼š + +- `r1` - 2020-01-01ã«ã‚µã‚¤ãƒˆã‚’訪れãŸãƒ¦ãƒ‹ãƒ¼ã‚¯ãƒ“ジターã®æ•°ï¼ˆ`cond1`æ¡ä»¶ï¼‰ã€‚ +- `r2` - 特定ã®æœŸé–“2020-01-01ã‹ã‚‰2020-01-02ã®é–“ã«ã‚µã‚¤ãƒˆã‚’訪れãŸãƒ¦ãƒ‹ãƒ¼ã‚¯ãƒ“ジターã®æ•°ï¼ˆ`cond1`ãŠã‚ˆã³`cond2`æ¡ä»¶ï¼‰ã€‚ +- `r3` - 特定ã®æœŸé–“2020-01-01ã¨2020-01-03ã«ã‚µã‚¤ãƒˆã‚’訪れãŸãƒ¦ãƒ‹ãƒ¼ã‚¯ãƒ“ジターã®æ•°ï¼ˆ`cond1`ãŠã‚ˆã³`cond3`æ¡ä»¶ï¼‰ã€‚ + +## uniqUpTo(N)(x) + +引数ã®ç•°ãªã‚‹å€¤ã®æ•°ã‚’指定ã•ã‚ŒãŸåˆ¶é™`N`ã¾ã§è¨ˆç®—ã—ã¾ã™ã€‚引数ã®ç•°ãªã‚‹å€¤ã®æ•°ãŒ`N`を超ãˆã‚‹å ´åˆã€ã“ã®é–¢æ•°ã¯`N`+1ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯æ­£ç¢ºãªå€¤ã‚’計算ã—ã¾ã™ã€‚ + +å°ã•ã„`N`(最大10ã¾ã§ï¼‰ã§ã®ä½¿ç”¨ã‚’推奨ã—ã¾ã™ã€‚`N`ã®æœ€å¤§å€¤ã¯100ã§ã™ã€‚ + +集計関数ã®çŠ¶æ…‹ã®ãŸã‚ã€ã“ã®é–¢æ•°ã¯1 + `N` \* ãƒã‚¤ãƒˆã®å€¤ã®ä¸€ã¤ã®ã‚µã‚¤ã‚ºã®ãƒ¡ãƒ¢ãƒªã‚’使用ã—ã¾ã™ã€‚ +文字列を扱ã†å ´åˆã€ã“ã®é–¢æ•°ã¯8ãƒã‚¤ãƒˆã®éžæš—å·åŒ–ãƒãƒƒã‚·ãƒ¥ã‚’ä¿å­˜ã—ã¾ã™ã€‚文字列ã®è¨ˆç®—ã¯è¿‘似的ã«ãªã‚Šã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ã‚ãªãŸã®ã‚¦ã‚§ãƒ–サイトã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦è¡Œã‚ã‚ŒãŸã™ã¹ã¦ã®æ¤œç´¢ã‚¯ã‚¨ãƒªã‚’記録ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルãŒã‚ã£ãŸã¨ã—ã¾ã™ã€‚テーブルã®å„è¡Œã¯å˜ä¸€ã®æ¤œç´¢ã‚¯ã‚¨ãƒªã‚’表ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼IDã€æ¤œç´¢ã‚¯ã‚¨ãƒªã€ã‚¯ã‚¨ãƒªã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã®ã‚«ãƒ©ãƒ ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’使用ã—ã¦ã€å°‘ãªãã¨ã‚‚5人ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒä½¿ç”¨ã—ãŸã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã®ã¿ã‚’表示ã™ã‚‹ãƒ¬ãƒãƒ¼ãƒˆã‚’生æˆã™ã‚‹ãŸã‚ã«`uniqUpTo`を使用ã§ãã¾ã™ã€‚ + +```sql +SELECT SearchPhrase +FROM SearchLog +GROUP BY SearchPhrase +HAVING uniqUpTo(4)(UserID) >= 5 +``` + +`uniqUpTo(4)(UserID)`ã¯å„`SearchPhrase`ã«å¯¾ã™ã‚‹ãƒ¦ãƒ‹ãƒ¼ã‚¯ãª`UserID`値ã®æ•°ã‚’計算ã—ã¾ã™ãŒã€æœ€å¤§4ã¤ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå€¤ã ã‘ã‚’æ•°ãˆã¾ã™ã€‚ã‚‚ã—ã‚ã‚‹`SearchPhrase`ã«å¯¾ã™ã‚‹ãƒ¦ãƒ‹ãƒ¼ã‚¯ãª`UserID`値ãŒ4を超ãˆã‚‹å ´åˆã€ã“ã®é–¢æ•°ã¯5(4 + 1)を返ã—ã¾ã™ã€‚ãã®å¾Œã€`HAVING`å¥ã¯ãƒ¦ãƒ‹ãƒ¼ã‚¯ãª`UserID`値ãŒ5未満ã®`SearchPhrase`値をフィルタリングã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å°‘ãªãã¨ã‚‚5人ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒä½¿ç”¨ã—ãŸæ¤œç´¢ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## sumMapFiltered + +ã“ã®é–¢æ•°ã¯ã€[sumMap](../../sql-reference/aggregate-functions/reference/summap.md#agg_functions-summap)ã¨åŒã˜å‹•ä½œã‚’ã—ã¾ã™ãŒã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã«ä½¿ç”¨ã™ã‚‹ã‚­ãƒ¼ã®é…列をパラメータã¨ã—ã¦å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€é«˜ã„キーã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã‚’扱ã†éš›ã«ç‰¹ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +**構文** + +`sumMapFiltered(keys_to_keep)(keys, values)` + +**パラメータ** + +- `keys_to_keep`: フィルタã™ã‚‹ãŸã‚ã®[é…列](../data-types/array.md)。 +- `keys`: [é…列](../data-types/array.md)。 +- `values`: [é…列](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ソートã•ã‚ŒãŸé †åºã®ã‚­ãƒ¼ã¨ã€å¯¾å¿œã™ã‚‹ã‚­ãƒ¼ã«å¯¾ã—ã¦åˆè¨ˆã•ã‚ŒãŸå€¤ã‚’æŒã¤2ã¤ã®é…列ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +CREATE TABLE sum_map +( + `date` Date, + `timeslot` DateTime, + `statusMap` Nested(status UInt16, requests UInt64) +) +ENGINE = Log + +INSERT INTO sum_map VALUES + ('2000-01-01', '2000-01-01 00:00:00', [1, 2, 3], [10, 10, 10]), + ('2000-01-01', '2000-01-01 00:00:00', [3, 4, 5], [10, 10, 10]), + ('2000-01-01', '2000-01-01 00:01:00', [4, 5, 6], [10, 10, 10]), + ('2000-01-01', '2000-01-01 00:01:00', [6, 7, 8], [10, 10, 10]); +``` + +```sql +SELECT sumMapFiltered([1, 4, 8])(statusMap.status, statusMap.requests) FROM sum_map; +``` + +çµæžœï¼š + +```response + ┌─sumMapFiltered([1, 4, 8])(statusMap.status, statusMap.requests)─┠+1. │ ([1,4,8],[10,20,10]) │ + └─────────────────────────────────────────────────────────────────┘ +``` + +## sumMapFilteredWithOverflow + +ã“ã®é–¢æ•°ã¯ã€[sumMap](../../sql-reference/aggregate-functions/reference/summap.md#agg_functions-summap)ã¨åŒã˜å‹•ä½œã‚’ã—ã¾ã™ãŒã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã«ä½¿ç”¨ã™ã‚‹ã‚­ãƒ¼ã®é…列をパラメータã¨ã—ã¦å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€é«˜ã„キーã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã‚’扱ã†éš›ã«ç‰¹ã«å½¹ç«‹ã¡ã¾ã™ã€‚[sumMapFiltered](#summapfiltered)関数ã¨ã¯ç•°ãªã‚Šã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚’å«ã‚€åŠ ç®—ã‚’è¡Œã„ã¾ã™ - ã¤ã¾ã‚Šã€åŠ ç®—ã®çµæžœã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨ã—ã¦å¼•æ•°ã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +`sumMapFilteredWithOverflow(keys_to_keep)(keys, values)` + +**パラメータ** + +- `keys_to_keep`: フィルタã™ã‚‹ãŸã‚ã®[é…列](../data-types/array.md)。 +- `keys`: [é…列](../data-types/array.md)。 +- `values`: [é…列](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ソートã•ã‚ŒãŸé †åºã®ã‚­ãƒ¼ã¨ã€å¯¾å¿œã™ã‚‹ã‚­ãƒ¼ã«å¯¾ã—ã¦åˆè¨ˆã•ã‚ŒãŸå€¤ã‚’æŒã¤2ã¤ã®é…列ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +**例** + +ã“ã®ä¾‹ã§ã¯ã€ãƒ†ãƒ¼ãƒ–ル`sum_map`を作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¦ã‹ã‚‰`sumMapFilteredWithOverflow`ã¨`sumMapFiltered`ã‚’`toTypeName`関数ã¨å…±ã«æ¯”較ã«ä½¿ç”¨ã—ã¾ã™ã€‚作æˆã—ãŸãƒ†ãƒ¼ãƒ–ルã§`requests`ã¯`UInt8`åž‹ã§ã‚ã£ãŸå ´åˆã€`sumMapFiltered`ã¯ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚’é¿ã‘ã‚‹ãŸã‚ã«åˆè¨ˆã•ã‚ŒãŸå€¤ã®åž‹ã‚’`UInt64`ã«æ˜‡æ ¼ã•ã›ãŸã®ã«å¯¾ã—ã€`sumMapFilteredWithOverflow`ã¯åž‹ã‚’引ã続ã`UInt8`ã¨ã—ã¦ãŠã‚Šã€ã“ã‚Œã¯çµæžœã‚’æ ¼ç´ã™ã‚‹ã«ã¯å分ã§ã¯ã‚ã‚Šã¾ã›ã‚“ - ã¤ã¾ã‚Šã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¦ã„ã¾ã™ã€‚ + +クエリ: + +```sql +CREATE TABLE sum_map +( + `date` Date, + `timeslot` DateTime, + `statusMap` Nested(status UInt8, requests UInt8) +) +ENGINE = Log + +INSERT INTO sum_map VALUES + ('2000-01-01', '2000-01-01 00:00:00', [1, 2, 3], [10, 10, 10]), + ('2000-01-01', '2000-01-01 00:00:00', [3, 4, 5], [10, 10, 10]), + ('2000-01-01', '2000-01-01 00:01:00', [4, 5, 6], [10, 10, 10]), + ('2000-01-01', '2000-01-01 00:01:00', [6, 7, 8], [10, 10, 10]); +``` + +```sql +SELECT sumMapFilteredWithOverflow([1, 4, 8])(statusMap.status, statusMap.requests) as summap_overflow, toTypeName(summap_overflow) FROM sum_map; +``` + +```sql +SELECT sumMapFiltered([1, 4, 8])(statusMap.status, statusMap.requests) as summap, toTypeName(summap) FROM sum_map; +``` + +çµæžœï¼š + +```response + ┌─sum──────────────────┬─toTypeName(sum)───────────────────┠+1. │ ([1,4,8],[10,20,10]) │ Tuple(Array(UInt8), Array(UInt8)) │ + └──────────────────────┴───────────────────────────────────┘ +``` + +```response + ┌─summap───────────────┬─toTypeName(summap)─────────────────┠+1. │ ([1,4,8],[10,20,10]) │ Tuple(Array(UInt8), Array(UInt64)) │ + └──────────────────────┴────────────────────────────────────┘ +``` + +## sequenceNextNode + +一致ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆãƒã‚§ãƒ¼ãƒ³ã®æ¬¡ã®ã‚¤ãƒ™ãƒ³ãƒˆã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +_エクスペリメンタルãªé–¢æ•°ã€`SET allow_experimental_funnel_functions = 1`ã§æœ‰åŠ¹ã«ã—ã¾ã™ã€‚_ + +**構文** + +``` sql +sequenceNextNode(direction, base)(timestamp, event_column, base_condition, event1, event2, event3, ...) +``` + +**パラメータ** + +- `direction` — 移動ã®æ–¹å‘を指定ã—ã¾ã™ã€‚ + - forward — å‰é€²ã€‚ + - backward — 後退。 + +- `base` — 基準点を設定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + - head — 基準点を最åˆã®ã‚¤ãƒ™ãƒ³ãƒˆã«è¨­å®šã—ã¾ã™ã€‚ + - tail — 基準点を最後ã®ã‚¤ãƒ™ãƒ³ãƒˆã«è¨­å®šã—ã¾ã™ã€‚ + - first_match — 基準点を最åˆã«ä¸€è‡´ã—ãŸ`event1`ã«è¨­å®šã—ã¾ã™ã€‚ + - last_match — 基準点を最後ã®ä¸€è‡´ã—ãŸ`event1`ã«è¨­å®šã—ã¾ã™ã€‚ + +**引数** + +- `timestamp` — タイムスタンプをå«ã‚€ã‚«ãƒ©ãƒ ã®åå‰ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型:[Date](../../sql-reference/data-types/date.md)ã€[DateTime](../../sql-reference/data-types/datetime.md#data_type-datetime) ãŠã‚ˆã³ãã®ä»–ã®ç¬¦å·ãªã—整数型。 +- `event_column` — 次ã«è¿”ã•ã‚Œã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã®å€¤ã‚’å«ã‚€ã‚«ãƒ©ãƒ ã®åå‰ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型:[String](../../sql-reference/data-types/string.md) 㨠[Nullable(String)](../../sql-reference/data-types/nullable.md)。 +- `base_condition` — 基準点ãŒæº€ãŸã™ã¹ãæ¡ä»¶ã€‚ +- `event1`, `event2`, ... — イベントãƒã‚§ãƒ¼ãƒ³ã‚’記述ã™ã‚‹æ¡ä»¶ã€‚[UInt8](../../sql-reference/data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `event_column[next_index]` — パターンãŒä¸€è‡´ã—ã€æ¬¡ã®å€¤ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€‚ +- `NULL` - パターンãŒä¸€è‡´ã—ãªã„ã‹æ¬¡ã®å€¤ãŒå­˜åœ¨ã—ãªã„å ´åˆã€‚ + +型:[Nullable(String)](../../sql-reference/data-types/nullable.md)。 + +**例** + +イベントãŒA->B->C->D->Eã§ã‚ã‚‹å ´åˆã€B->Cã«ç¶šãイベントDを知りãŸã„ã¨ãã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +A->Bã®å¾Œã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’検索ã™ã‚‹ã‚¯ã‚¨ãƒªã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆï¼š + +``` sql +CREATE TABLE test_flow ( + dt DateTime, + id int, + page String) +ENGINE = MergeTree() +PARTITION BY toYYYYMMDD(dt) +ORDER BY id; + +INSERT INTO test_flow VALUES (1, 1, 'A') (2, 1, 'B') (3, 1, 'C') (4, 1, 'D') (5, 1, 'E'); + +SELECT id, sequenceNextNode('forward', 'head')(dt, page, page = 'A', page = 'A', page = 'B') as next_flow FROM test_flow GROUP BY id; +``` + +çµæžœï¼š + +``` text +┌─id─┬─next_flow─┠+│ 1 │ C │ +└────┴───────────┘ +``` + +**`forward`ã¨`head`ã®å‹•ä½œ** + +``` sql +ALTER TABLE test_flow DELETE WHERE 1 = 1 settings mutations_sync = 1; + +INSERT INTO test_flow VALUES (1, 1, 'Home') (2, 1, 'Gift') (3, 1, 'Exit'); +INSERT INTO test_flow VALUES (1, 2, 'Home') (2, 2, 'Home') (3, 2, 'Gift') (4, 2, 'Basket'); +INSERT INTO test_flow VALUES (1, 3, 'Gift') (2, 3, 'Home') (3, 3, 'Gift') (4, 3, 'Basket'); +``` + +``` sql +SELECT id, sequenceNextNode('forward', 'head')(dt, page, page = 'Home', page = 'Home', page = 'Gift') FROM test_flow GROUP BY id; + + dt id page + 1970-01-01 09:00:01 1 Home // 基準点ã€ä¸€è‡´ã—ãŸHome + 1970-01-01 09:00:02 1 Gift // Giftã¨ä¸€è‡´ + 1970-01-01 09:00:03 1 Exit // çµæžœ + + 1970-01-01 09:00:01 2 Home // 基準点ã€ä¸€è‡´ã—ãŸHome + 1970-01-01 09:00:02 2 Home // Giftã¨ä¸€è‡´ã—ãªã„ + 1970-01-01 09:00:03 2 Gift + 1970-01-01 09:00:04 2 Basket + + 1970-01-01 09:00:01 3 Gift // 基準点ã€Homeã¨ä¸€è‡´ã—ãªã„ + 1970-01-01 09:00:02 3 Home + 1970-01-01 09:00:03 3 Gift + 1970-01-01 09:00:04 3 Basket +``` + +**`backward`ã¨`tail`ã®å‹•ä½œ** + +``` sql +SELECT id, sequenceNextNode('backward', 'tail')(dt, page, page = 'Basket', page = 'Basket', page = 'Gift') FROM test_flow GROUP BY id; + + dt id page +1970-01-01 09:00:01 1 Home +1970-01-01 09:00:02 1 Gift +1970-01-01 09:00:03 1 Exit // 基準点ã€Basketã¨ä¸€è‡´ã—ãªã„ + +1970-01-01 09:00:01 2 Home +1970-01-01 09:00:02 2 Home // çµæžœ +1970-01-01 09:00:03 2 Gift // Giftã¨ä¸€è‡´ +1970-01-01 09:00:04 2 Basket // 基準点ã€Basketã¨ä¸€è‡´ + +1970-01-01 09:00:01 3 Gift +1970-01-01 09:00:02 3 Home // çµæžœ +1970-01-01 09:00:03 3 Gift // 基準点ã€Giftã¨ä¸€è‡´ +1970-01-01 09:00:04 3 Basket // 基準点ã€Basketã¨ä¸€è‡´ +``` + +**`forward`ã¨`first_match`ã®å‹•ä½œ** + +``` sql +SELECT id, sequenceNextNode('forward', 'first_match')(dt, page, page = 'Gift', page = 'Gift') FROM test_flow GROUP BY id; + + dt id page +1970-01-01 09:00:01 1 Home +1970-01-01 09:00:02 1 Gift // 基準点 +1970-01-01 09:00:03 1 Exit // çµæžœ + +1970-01-01 09:00:01 2 Home +1970-01-01 09:00:02 2 Home +1970-01-01 09:00:03 2 Gift // 基準点 +1970-01-01 09:00:04 2 Basket // çµæžœ + +1970-01-01 09:00:01 3 Gift // 基準点 +1970-01-01 09:00:02 3 Home // çµæžœ +1970-01-01 09:00:03 3 Gift +1970-01-01 09:00:04 3 Basket +``` + +``` sql +SELECT id, sequenceNextNode('forward', 'first_match')(dt, page, page = 'Gift', page = 'Gift', page = 'Home') FROM test_flow GROUP BY id; + + dt id page +1970-01-01 09:00:01 1 Home +1970-01-01 09:00:02 1 Gift // 基準点 +1970-01-01 09:00:03 1 Exit // Homeã¨ä¸€è‡´ã—ãªã„ + +1970-01-01 09:00:01 2 Home +1970-01-01 09:00:02 2 Home +1970-01-01 09:00:03 2 Gift // 基準点 +1970-01-01 09:00:04 2 Basket // Homeã¨ä¸€è‡´ã—ãªã„ + +1970-01-01 09:00:01 3 Gift // 基準点 +1970-01-01 09:00:02 3 Home // Homeã¨ä¸€è‡´ +1970-01-01 09:00:03 3 Gift // çµæžœ +1970-01-01 09:00:04 3 Basket +``` + +**`backward`ã¨`last_match`ã®å‹•ä½œ** + +``` sql +SELECT id, sequenceNextNode('backward', 'last_match')(dt, page, page = 'Gift', page = 'Gift') FROM test_flow GROUP BY id; + + dt id page +1970-01-01 09:00:01 1 Home // çµæžœ +1970-01-01 09:00:02 1 Gift // 基準点 +1970-01-01 09:00:03 1 Exit + +1970-01-01 09:00:01 2 Home +1970-01-01 09:00:02 2 Home // çµæžœ +1970-01-01 09:00:03 2 Gift // 基準点 +1970-01-01 09:00:04 2 Basket + +1970-01-01 09:00:01 3 Gift +1970-01-01 09:00:02 3 Home // çµæžœ +1970-01-01 09:00:03 3 Gift // 基準点 +1970-01-01 09:00:04 3 Basket +``` + +``` sql +SELECT id, sequenceNextNode('backward', 'last_match')(dt, page, page = 'Gift', page = 'Gift', page = 'Home') FROM test_flow GROUP BY id; + + dt id page +1970-01-01 09:00:01 1 Home // Homeã¨ä¸€è‡´ã€çµæžœã¯null +1970-01-01 09:00:02 1 Gift // 基準点 +1970-01-01 09:00:03 1 Exit + +1970-01-01 09:00:01 2 Home // çµæžœ +1970-01-01 09:00:02 2 Home // Homeã¨ä¸€è‡´ +1970-01-01 09:00:03 2 Gift // 基準点 +1970-01-01 09:00:04 2 Basket + +1970-01-01 09:00:01 3 Gift // çµæžœ +1970-01-01 09:00:02 3 Home // Homeã¨ä¸€è‡´ +1970-01-01 09:00:03 3 Gift // 基準点 +1970-01-01 09:00:04 3 Basket +``` + +**`base_condition`ã®å‹•ä½œ** + +``` sql +CREATE TABLE test_flow_basecond +( + `dt` DateTime, + `id` int, + `page` String, + `ref` String +) +ENGINE = MergeTree +PARTITION BY toYYYYMMDD(dt) +ORDER BY id; + +INSERT INTO test_flow_basecond VALUES (1, 1, 'A', 'ref4') (2, 1, 'A', 'ref3') (3, 1, 'B', 'ref2') (4, 1, 'B', 'ref1'); +``` + +``` sql +SELECT id, sequenceNextNode('forward', 'head')(dt, page, ref = 'ref1', page = 'A') FROM test_flow_basecond GROUP BY id; + + dt id page ref + 1970-01-01 09:00:01 1 A ref4 // 基準点をヘッドã«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。refカラムãŒ'ref1'ã¨ä¸€è‡´ã—ãªã„ãŸã‚。 + 1970-01-01 09:00:02 1 A ref3 + 1970-01-01 09:00:03 1 B ref2 + 1970-01-01 09:00:04 1 B ref1 + ``` + +``` sql +SELECT id, sequenceNextNode('backward', 'tail')(dt, page, ref = 'ref4', page = 'B') FROM test_flow_basecond GROUP BY id; + + dt id page ref + 1970-01-01 09:00:01 1 A ref4 + 1970-01-01 09:00:02 1 A ref3 + 1970-01-01 09:00:03 1 B ref2 + 1970-01-01 09:00:04 1 B ref1 // テールを基準点ã«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。refカラムãŒ'ref4'ã¨ä¸€è‡´ã—ãªã„ãŸã‚。 +``` + +``` sql +SELECT id, sequenceNextNode('forward', 'first_match')(dt, page, ref = 'ref3', page = 'A') FROM test_flow_basecond GROUP BY id; + + dt id page ref + 1970-01-01 09:00:01 1 A ref4 // ã“ã®è¡Œã¯åŸºæº–点ã«ã¯ãªã‚Šã¾ã›ã‚“。refカラムãŒ'ref3'ã¨ä¸€è‡´ã—ãªã„ãŸã‚。 + 1970-01-01 09:00:02 1 A ref3 // 基準点 + 1970-01-01 09:00:03 1 B ref2 // çµæžœ + 1970-01-01 09:00:04 1 B ref1 +``` + +``` sql +SELECT id, sequenceNextNode('backward', 'last_match')(dt, page, ref = 'ref2', page = 'B') FROM test_flow_basecond GROUP BY id; + + dt id page ref + 1970-01-01 09:00:01 1 A ref4 + 1970-01-01 09:00:02 1 A ref3 // çµæžœ + 1970-01-01 09:00:03 1 B ref2 // 基準点 + 1970-01-01 09:00:04 1 B ref1 // ã“ã®è¡Œã¯åŸºæº–点ã«ã¯ãªã‚Šã¾ã›ã‚“。refカラムãŒ'ref2'ã¨ä¸€è‡´ã—ãªã„ãŸã‚。 +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/aggthrow.md b/docs/ja/sql-reference/aggregate-functions/reference/aggthrow.md new file mode 100644 index 00000000000..0a6501c6a66 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/aggthrow.md @@ -0,0 +1,37 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/aggthrow +sidebar_position: 101 +--- + +# aggThrow + +ã“ã®é–¢æ•°ã¯ä¾‹å¤–ã®å®‰å…¨æ€§ã‚’テストã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚指定ã•ã‚ŒãŸç¢ºçŽ‡ã§ç”Ÿæˆæ™‚ã«ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +aggThrow(throw_prob) +``` + +**引数** + +- `throw_prob` — 生æˆæ™‚ã«ã‚¹ãƒ­ãƒ¼ã™ã‚‹ç¢ºçŽ‡ã€‚[Float64](../../data-types/float.md)。 + +**戻り値** + +- 例外: `Code: 503. DB::Exception: Aggregate function aggThrow has thrown exception successfully`. + +**例** + +クエリ: + +```sql +SELECT number % 2 AS even, aggThrow(number) FROM numbers(10) GROUP BY even; +``` + +çµæžœ: + +```response +例外をå—ä¿¡: +Code: 503. DB::Exception: Aggregate function aggThrow has thrown exception successfully: While executing AggregatingTransform. (AGGREGATE_FUNCTION_THROW) +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/analysis_of_variance.md b/docs/ja/sql-reference/aggregate-functions/reference/analysis_of_variance.md new file mode 100644 index 00000000000..6f4b1abf6f5 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/analysis_of_variance.md @@ -0,0 +1,45 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/analysis_of_variance +sidebar_position: 101 +--- + +# analysisOfVariance + +一元é…置分散分æžï¼ˆANOVAテスト)を行ã†ãŸã‚ã®çµ±è¨ˆçš„テストをæä¾›ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€è¤‡æ•°ã®æ­£è¦åˆ†å¸ƒã«å¾“ã†è¦³æ¸¬å€¤ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å¯¾ã—ã¦ã€å…¨ã¦ã®ã‚°ãƒ«ãƒ¼ãƒ—ãŒåŒã˜å¹³å‡ã‚’æŒã¤ã‹ã©ã†ã‹ã‚’調ã¹ã‚‹ãƒ†ã‚¹ãƒˆã§ã™ã€‚ + +**構文** + +```sql +analysisOfVariance(val, group_no) +``` + +エイリアス: `anova` + +**パラメータ** +- `val`: 値。 +- `group_no`: `val`ãŒå±žã™ã‚‹ã‚°ãƒ«ãƒ¼ãƒ—番å·ã€‚ + +:::note +グループã¯0ã‹ã‚‰åˆ—挙ã•ã‚Œã€ãƒ†ã‚¹ãƒˆã‚’実行ã™ã‚‹ã«ã¯å°‘ãªãã¨ã‚‚2ã¤ã®ã‚°ãƒ«ãƒ¼ãƒ—ãŒå¿…è¦ã§ã™ã€‚ +観測値ã®æ•°ãŒ1ã¤ä»¥ä¸Šã®ã‚°ãƒ«ãƒ¼ãƒ—ãŒå°‘ãªãã¨ã‚‚1ã¤å­˜åœ¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `(f_statistic, p_value)`。[タプル](../../data-types/tuple.md)([Float64](../../data-types/float.md), [Float64](../../data-types/float.md))。 + +**例** + +クエリ: + +```sql +SELECT analysisOfVariance(number, number % 2) FROM numbers(1048575); +``` + +çµæžœ: + +```response +┌─analysisOfVariance(number, modulo(number, 2))─┠+│ (0,1) │ +└───────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/any.md b/docs/ja/sql-reference/aggregate-functions/reference/any.md new file mode 100644 index 00000000000..2b28946b301 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/any.md @@ -0,0 +1,58 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/any +sidebar_position: 102 +--- + +# any + +`NULL` 値を無視ã—ã€ã‚«ãƒ©ãƒ ã®æœ€åˆã«å‡ºç¾ã™ã‚‹å€¤ã‚’é¸æŠžã—ã¾ã™ã€‚ + +**構文** + +```sql +any(column) [RESPECT NULLS] +``` + +別å: `any_value`, [`first_value`](../reference/first_value.md)。 + +**パラメータ** +- `column`: カラムå。 + +**戻り値** + +:::note +ã“ã®é–¢æ•°åã®å¾Œã« `RESPECT NULLS` 修飾å­ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ä¿®é£¾å­ã‚’使用ã™ã‚‹ã¨ã€é–¢æ•°ã¯ `NULL` ã‹ã©ã†ã‹ã«é–¢ä¿‚ãªãã€æ¸¡ã•ã‚ŒãŸæœ€åˆã®å€¤ã‚’é¸æŠžã—ã¾ã™ã€‚ +::: + +:::note +関数ã®æˆ»ã‚Šå€¤ã®åž‹ã¯ã€å…¥åŠ›ã¨åŒã˜ã§ã™ãŒã€LowCardinality ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€å…¥åŠ›ã¨ã—ã¦è¡ŒãŒãªã„å ´åˆã€ãã®åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼ˆæ•´æ•°ã®å ´åˆã¯0ã€Nullable() カラムã®å ´åˆã¯ Null)を返ã—ã¾ã™ã€‚ã“ã®å‹•ä½œã‚’変更ã™ã‚‹ãŸã‚ã«ã¯ `-OrNull` [コンビãƒãƒ¼ã‚¿](../../../sql-reference/aggregate-functions/combinators.md) を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +:::warning +クエリã¯ä»»æ„ã®é †åºã§ã€ã•ã‚‰ã«ã¯æ¯Žå›žç•°ãªã‚‹é †åºã§å®Ÿè¡Œã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ã“ã®é–¢æ•°ã®çµæžœã¯ä¸ç¢ºå®šã§ã™ã€‚ +確定的ãªçµæžœã‚’å¾—ã‚‹ã«ã¯ã€`any` ã®ä»£ã‚ã‚Šã« [`min`](../reference/min.md) ã¾ãŸã¯ [`max`](../reference/max.md) 関数を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ +::: + +**実装ã®è©³ç´°** + +ã„ãã¤ã‹ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€å®Ÿè¡Œé †åºã«ä¾å­˜ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€`ORDER BY` を使用ã—ãŸã‚µãƒ–クエリã‹ã‚‰ `SELECT` ãŒæ¥ã‚‹å ´åˆã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +`SELECT` クエリ㌠`GROUP BY` å¥ã¾ãŸã¯å°‘ãªãã¨ã‚‚1ã¤ã®é›†ç´„関数をæŒã¤å ´åˆã€ClickHouse ã¯ï¼ˆMySQL ã¨ã¯å¯¾ç…§çš„ã«ï¼‰ `SELECT`ã€`HAVING`ã€ãŠã‚ˆã³ `ORDER BY` å¥ã®ã™ã¹ã¦ã®å¼ãŒã‚­ãƒ¼ã¾ãŸã¯é›†ç´„関数ã‹ã‚‰è¨ˆç®—ã•ã‚Œã‚‹ã“ã¨ã‚’è¦æ±‚ã—ã¾ã™ã€‚言ã„æ›ãˆã‚‹ã¨ã€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰é¸æŠžã•ã‚ŒãŸå„カラムã¯ã€ã‚­ãƒ¼ã¾ãŸã¯é›†ç´„関数内ã§ä½¿ç”¨ã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。MySQL ã®ã‚ˆã†ãªå‹•ä½œã‚’å¾—ã‚‹ã«ã¯ã€ä»–ã®ã‚«ãƒ©ãƒ ã‚’ `any` 集約関数ã«å…¥ã‚Œã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +CREATE TABLE any_nulls (city Nullable(String)) ENGINE=Log; + +INSERT INTO any_nulls (city) VALUES (NULL), ('Amsterdam'), ('New York'), ('Tokyo'), ('Valencia'), (NULL); + +SELECT any(city) FROM any_nulls; +``` + +```response +┌─any(city)─┠+│ Amsterdam │ +└───────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/anyheavy.md b/docs/ja/sql-reference/aggregate-functions/reference/anyheavy.md new file mode 100644 index 00000000000..3ef582ed0b6 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/anyheavy.md @@ -0,0 +1,31 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/anyheavy +sidebar_position: 104 +--- + +# anyHeavy + +[heavy hitters](https://doi.org/10.1145/762471.762473) アルゴリズムを使用ã—ã¦é »ç¹ã«å‡ºç¾ã™ã‚‹å€¤ã‚’é¸æŠžã—ã¾ã™ã€‚クエリã®å„実行スレッドã§åŠåˆ†ä»¥ä¸Šã®ã‚±ãƒ¼ã‚¹ã§ç™ºç”Ÿã™ã‚‹å€¤ãŒã‚ã‚‹å ´åˆã€ãã®å€¤ãŒè¿”ã•ã‚Œã¾ã™ã€‚通常ã€çµæžœã¯éžæ±ºå®šçš„ã§ã™ã€‚ + +``` sql +anyHeavy(column) +``` + +**引数** + +- `column` – カラムå。 + +**例** + +[OnTime](../../../getting-started/example-datasets/ontime.md) データセットを使用ã—ã¦ã€`AirlineID` カラム内ã§é »ç¹ã«å‡ºç¾ã™ã‚‹å€¤ã‚’é¸æŠžã—ã¾ã™ã€‚ + +``` sql +SELECT anyHeavy(AirlineID) AS res +FROM ontime +``` + +``` text +┌───res─┠+│ 19690 │ +└───────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/anylast.md b/docs/ja/sql-reference/aggregate-functions/reference/anylast.md new file mode 100644 index 00000000000..36ac7ff985e --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/anylast.md @@ -0,0 +1,43 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/anylast +sidebar_position: 105 +--- + +# anyLast + +最後ã«é­é‡ã—ãŸå€¤ã‚’é¸æŠžã—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ã„ã‹ãªã‚‹ `NULL` 値も無視ã—ã¾ã™ã€‚çµæžœã¯ [any](../../../sql-reference/aggregate-functions/reference/any.md) 関数ã®å ´åˆã¨åŒæ§˜ã«ä¸ç¢ºå®šã§ã™ã€‚ + +**構文** + +```sql +anyLast(column) [RESPECT NULLS] +``` + +**パラメータ** +- `column`: カラムå。 + +:::note +関数åã®å¾Œã« `RESPECT NULLS` 修飾å­ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã®ä¿®é£¾å­ã‚’使用ã™ã‚‹ã¨ã€`NULL` ã§ã‚ã‚‹ã‹ã©ã†ã‹ã«é–¢ã‚らãšã€æœ€å¾Œã«æ¸¡ã•ã‚ŒãŸå€¤ã‚’確実ã«é¸æŠžã—ã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最後ã«é­é‡ã—ãŸå€¤ã€‚ + +**例** + +クエリ: + +```sql +CREATE TABLE any_last_nulls (city Nullable(String)) ENGINE=Log; + +INSERT INTO any_last_nulls (city) VALUES ('Amsterdam'),(NULL),('New York'),('Tokyo'),('Valencia'),(NULL); + +SELECT anyLast(city) FROM any_last_nulls; +``` + +```response +┌─anyLast(city)─┠+│ Valencia │ +└───────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/approxtopk.md b/docs/ja/sql-reference/aggregate-functions/reference/approxtopk.md new file mode 100644 index 00000000000..acfb7715e9f --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/approxtopk.md @@ -0,0 +1,53 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/approxtopk +sidebar_position: 107 +--- + +# approx_top_k + +指定ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã§æœ€ã‚‚頻度ã®é«˜ã„値ã¨ãã®ã‚«ã‚¦ãƒ³ãƒˆã‚’近似的ã«é…列ã§è¿”ã—ã¾ã™ã€‚çµæžœã®é…列ã¯ã€å€¤è‡ªä½“ã§ã¯ãªãã€å€¤ã®è¿‘似頻度ã®é™é †ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +``` sql +approx_top_k(N)(column) +approx_top_k(N, reserved)(column) +``` + +ã“ã®é–¢æ•°ã¯ä¿è¨¼ã•ã‚ŒãŸçµæžœã‚’æä¾›ã™ã‚‹ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。特定ã®çŠ¶æ³ã§ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã€æœ€ã‚‚頻度ã®é«˜ã„値ã§ã¯ãªã„é »ç¹ãªå€¤ã‚’è¿”ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +`N < 10` ã®å€¤ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚`N` ã®å€¤ãŒå¤§ãã„ã¨ãƒ‘フォーマンスãŒä½Žä¸‹ã—ã¾ã™ã€‚`N` ã®æœ€å¤§å€¤ã¯ 65536 ã§ã™ã€‚ + +**パラメーター** + +- `N` — è¿”ã™è¦ç´ ã®æ•°ã€‚オプション。デフォルト値: 10。 +- `reserved` — 値ã®ãŸã‚ã«äºˆç´„ã•ã‚Œã‚‹ã‚»ãƒ«ã®æ•°ã‚’定義ã—ã¾ã™ã€‚ã‚‚ã— uniq(column) > reserved ã§ã‚ã‚Œã°ã€topK 関数ã®çµæžœã¯è¿‘似的ãªã‚‚ã®ã«ãªã‚Šã¾ã™ã€‚オプション。デフォルト値: N * 3。 + +**引数** + +- `column` — 頻度を計算ã™ã‚‹å€¤ã€‚ + +**例** + +クエリ: + +``` sql +SELECT approx_top_k(2)(k) +FROM VALUES('k Char, w UInt64', ('y', 1), ('y', 1), ('x', 5), ('y', 1), ('z', 10)); +``` + +çµæžœ: + +``` text +┌─approx_top_k(2)(k)────┠+│ [('y',3,0),('x',1,0)] │ +└───────────────────────┘ +``` + +# approx_top_count + +`approx_top_k` 関数ã®åˆ¥åã§ã™ + +**関連項目** + +- [topK](../../../sql-reference/aggregate-functions/reference/topk.md) +- [topKWeighted](../../../sql-reference/aggregate-functions/reference/topkweighted.md) +- [approx_top_sum](../../../sql-reference/aggregate-functions/reference/approxtopsum.md) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/approxtopsum.md b/docs/ja/sql-reference/aggregate-functions/reference/approxtopsum.md new file mode 100644 index 00000000000..83c2868d0de --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/approxtopsum.md @@ -0,0 +1,50 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/approxtopsum +sidebar_position: 108 +--- + +# approx_top_sum + +指定ã•ã‚ŒãŸã‚«ãƒ©ãƒ å†…ã§æœ€ã‚‚頻度ã®é«˜ã„値ã¨ãã®ã‚«ã‚¦ãƒ³ãƒˆã‚’ç´„ç®—ã§è¿”ã—ã¾ã™ã€‚çµæžœã®é…列ã¯ã€å€¤è‡ªä½“ã§ã¯ãªãã€ãã®å€¤ã®é »åº¦ã®é™é †ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ã•ã‚‰ã«ã€å€¤ã®é‡ã¿ã‚‚考慮ã•ã‚Œã¾ã™ã€‚ + +``` sql +approx_top_sum(N)(column, weight) +approx_top_sum(N, reserved)(column, weight) +``` + +ã“ã®é–¢æ•°ã¯ä¿è¨¼ã•ã‚ŒãŸçµæžœã‚’æä¾›ã—ã¾ã›ã‚“。特定ã®çŠ¶æ³ã§ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€æœ€ã‚‚é »ç¹ãªå€¤ã§ã¯ãªã„値を返ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +`N < 10` ã®å€¤ã‚’使用ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚`N` ã®å€¤ãŒå¤§ãã„ã¨ãƒ‘フォーマンスãŒä½Žä¸‹ã—ã¾ã™ã€‚`N` ã®æœ€å¤§å€¤ã¯ 65536 ã§ã™ã€‚ + +**パラメータ** + +- `N` — è¿”ã™è¦ç´ ã®æ•°ã€‚オプション。デフォルト値: 10。 +- `reserved` — 値ã®ãŸã‚ã«äºˆç´„ã•ã‚Œã‚‹ã‚»ãƒ«ã®æ•°ã‚’定義ã—ã¾ã™ã€‚ã‚‚ã— uniq(column) > reserved ã®å ´åˆã€topK 関数ã®çµæžœã¯æ¦‚ç®—ã«ãªã‚Šã¾ã™ã€‚オプション。デフォルト値: N * 3。 + +**引数** + +- `column` — 頻度を計算ã™ã‚‹å€¤ã€‚ +- `weight` — é‡ã¿ã€‚å„値ã¯é »åº¦è¨ˆç®—ã®ãŸã‚ã« `weight` 回考慮ã•ã‚Œã¾ã™ã€‚[UInt64](../../../sql-reference/data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT approx_top_sum(2)(k, w) +FROM VALUES('k Char, w UInt64', ('y', 1), ('y', 1), ('x', 5), ('y', 1), ('z', 10)) +``` + +çµæžœ: + +``` text +┌─approx_top_sum(2)(k, w)─┠+│ [('z',10,0),('x',5,0)] │ +└─────────────────────────┘ +``` + +**関連項目** + +- [topK](../../../sql-reference/aggregate-functions/reference/topk.md) +- [topKWeighted](../../../sql-reference/aggregate-functions/reference/topkweighted.md) +- [approx_top_k](../../../sql-reference/aggregate-functions/reference/approxtopk.md) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/argmax.md b/docs/ja/sql-reference/aggregate-functions/reference/argmax.md new file mode 100644 index 00000000000..92d0285732a --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/argmax.md @@ -0,0 +1,108 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/argmax +sidebar_position: 109 +--- + +# argMax + +`val` ã®æœ€å¤§å€¤ã«å¯¾å¿œã™ã‚‹ `arg` ã®å€¤ã‚’計算ã—ã¾ã™ã€‚åŒã˜ `val` ã§æœ€å¤§å€¤ã‚’æŒã¤è¤‡æ•°ã®è¡ŒãŒã‚ã‚‹å ´åˆã€ã©ã®é–¢é€£ã™ã‚‹ `arg` ãŒè¿”ã•ã‚Œã‚‹ã‹ã¯æ±ºå®šçš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。`arg` 㨠`max` ã®ä¸¡æ–¹ã®éƒ¨åˆ†ã¯[集約関数](/docs/ja/sql-reference/aggregate-functions/index.md)ã¨ã—ã¦å‹•ä½œã—ã€å‡¦ç†ä¸­ã«[`Null` をスキップã—ã¾ã™](/docs/ja/sql-reference/aggregate-functions/index.md#null-processing)ãŒã€`Null` 値ãŒåˆ©ç”¨å¯èƒ½ã§ãªã„å ´åˆã¯ `Null` 以外ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +argMax(arg, val) +``` + +**引数** + +- `arg` — 引数。 +- `val` — 値。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最大㮠`val` ã«å¯¾å¿œã™ã‚‹ `arg` ã®å€¤ã€‚ + +åž‹: `arg` ã®åž‹ã«ä¸€è‡´ã—ã¾ã™ã€‚ + +**例** + +入力テーブル: + +``` text +┌─user─────┬─salary─┠+│ director │ 5000 │ +│ manager │ 3000 │ +│ worker │ 1000 │ +└──────────┴────────┘ +``` + +クエリ: + +``` sql +SELECT argMax(user, salary) FROM salary; +``` + +çµæžœ: + +``` text +┌─argMax(user, salary)─┠+│ director │ +└──────────────────────┘ +``` + +**拡張例** + +```sql +CREATE TABLE test +( + a Nullable(String), + b Nullable(Int64) +) +ENGINE = Memory AS +SELECT * +FROM VALUES(('a', 1), ('b', 2), ('c', 2), (NULL, 3), (NULL, NULL), ('d', NULL)); + +select * from test; +┌─a────┬────b─┠+│ a │ 1 │ +│ b │ 2 │ +│ c │ 2 │ +│ á´ºáµá´¸á´¸ │ 3 │ +│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +│ d │ á´ºáµá´¸á´¸ │ +└──────┴──────┘ + +SELECT argMax(a, b), max(b) FROM test; +┌─argMax(a, b)─┬─max(b)─┠+│ b │ 3 │ -- argMax = 'b' 㯠Null 以外ã®æœ€åˆã®å€¤ã ã‹ã‚‰ã€max(b) ã¯åˆ¥ã®è¡Œã‹ã‚‰ã§ã™ï¼ +└──────────────┴────────┘ + +SELECT argMax(tuple(a), b) FROM test; +┌─argMax(tuple(a), b)─┠+│ (NULL) │ -- `Tuple` 内ã«å”¯ä¸€ `NULL` ã‚’å«ã‚€å ´åˆã€`NULL` ã«ã¯ãªã‚‰ãªã„ã®ã§ã€é›†ç´„関数ã¯ãã® `NULL` ãŒåŽŸå› ã§è¡Œã‚’スキップã—ã¾ã›ã‚“ +└─────────────────────┘ + +SELECT (argMax((a, b), b) as t).1 argMaxA, t.2 argMaxB FROM test; +┌─argMaxA─┬─argMaxB─┠+│ á´ºáµá´¸á´¸ │ 3 │ -- タプルを使用ã—㦠max(b) ã«å¯¾å¿œã™ã‚‹ä¸¡æ–¹ã® (ã™ã¹ã¦ã® - tuple(*)) カラムをå–å¾—ã§ãã¾ã™ +└─────────┴─────────┘ + +SELECT argMax(a, b), max(b) FROM test WHERE a IS NULL AND b IS NULL; +┌─argMax(a, b)─┬─max(b)─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ -- フィルターã«ã‚ˆã‚Šé›†è¨ˆã•ã‚ŒãŸã™ã¹ã¦ã®è¡Œã«å°‘ãªãã¨ã‚‚1ã¤ã® `NULL` ãŒå«ã¾ã‚Œã€ãã®ãŸã‚ã™ã¹ã¦ã®è¡ŒãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã€çµæžœã¯ `NULL` ã«ãªã‚Šã¾ã™ +└──────────────┴────────┘ + +SELECT argMax(a, (b,a)) FROM test; +┌─argMax(a, tuple(b, a))─┠+│ c │ -- b=2 ã®è¡ŒãŒ2ã¤ã‚ã‚Šã€`Max` ã« `Tuple` を使用ã™ã‚‹ã“ã¨ã§æœ€åˆã® `arg` 以外をå–å¾—ã§ãã¾ã™ +└────────────────────────┘ + +SELECT argMax(a, tuple(b)) FROM test; +┌─argMax(a, tuple(b))─┠+│ b │ -- `Tuple` ã‚’ `Max` ã§ä½¿ç”¨ã—ã¦ã€`Max` ã®ä¸­ã§ Null をスキップã—ãªã„よã†ã«ã§ãã¾ã™ +└─────────────────────┘ +``` + +**関連項目** + +- [Tuple](/docs/ja/sql-reference/data-types/tuple.md) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/argmin.md b/docs/ja/sql-reference/aggregate-functions/reference/argmin.md new file mode 100644 index 00000000000..3a02e85329d --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/argmin.md @@ -0,0 +1,113 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/argmin +sidebar_position: 110 +--- + +# argMin + +`val` ã®æœ€å°å€¤ã«å¯¾å¿œã™ã‚‹ `arg` ã®å€¤ã‚’計算ã—ã¾ã™ã€‚最大ã¨ãªã‚‹ `val` ãŒåŒã˜å€¤ã‚’æŒã¤è¤‡æ•°ã®è¡ŒãŒã‚ã‚‹å ´åˆã€è¿”ã•ã‚Œã‚‹ `arg` ã¯éžæ±ºå®šçš„ã§ã™ã€‚`arg` 㨠`min` ã®ä¸¡æ–¹ã¯[集計関数](/docs/ja/sql-reference/aggregate-functions/index.md)ã¨ã—ã¦å‹•ä½œã—ã€å‡¦ç†ä¸­ã«[`Null` をスキップã—ã¾ã™](/docs/ja/sql-reference/aggregate-functions/index.md#null-processing) 。 `Null` ã§ãªã„値ãŒåˆ©ç”¨å¯èƒ½ãªå ´åˆã€`Null` ã§ãªã„値を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +argMin(arg, val) +``` + +**引数** + +- `arg` — 引数。 +- `val` — 値。 + +**戻り値** + +- 最å°ã® `val` 値ã«å¯¾å¿œã™ã‚‹ `arg` 値。 + +型:`arg` ã®åž‹ã¨ä¸€è‡´ã€‚ + +**例** + +入力テーブル: + +``` text +┌─user─────┬─salary─┠+│ director │ 5000 │ +│ manager │ 3000 │ +│ worker │ 1000 │ +└──────────┴────────┘ +``` + +クエリ: + +``` sql +SELECT argMin(user, salary) FROM salary +``` + +çµæžœ: + +``` text +┌─argMin(user, salary)─┠+│ worker │ +└──────────────────────┘ +``` + +**拡張例** + +```sql +CREATE TABLE test +( + a Nullable(String), + b Nullable(Int64) +) +ENGINE = Memory AS +SELECT * +FROM VALUES((NULL, 0), ('a', 1), ('b', 2), ('c', 2), (NULL, NULL), ('d', NULL)); + +select * from test; +┌─a────┬────b─┠+│ á´ºáµá´¸á´¸ │ 0 │ +│ a │ 1 │ +│ b │ 2 │ +│ c │ 2 │ +│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +│ d │ á´ºáµá´¸á´¸ │ +└──────┴──────┘ + +SELECT argMin(a, b), min(b) FROM test; +┌─argMin(a, b)─┬─min(b)─┠+│ a │ 0 │ -- argMin = a ã¯æœ€åˆã® `NULL` ã§ãªã„値ã§ã‚ã‚Šã€min(b) ã¯åˆ¥ã®è¡Œã‹ã‚‰æ¥ã¦ã„ã¾ã™ï¼ +└──────────────┴────────┘ + +SELECT argMin(tuple(a), b) FROM test; +┌─argMin(tuple(a), b)─┠+│ (NULL) │ -- `Tuple` ã«å«ã¾ã‚Œã‚‹å”¯ä¸€ã® `NULL` 値㯠`NULL` ã§ã¯ãªã„ã®ã§ã€é›†è¨ˆé–¢æ•°ã¯ãã® `NULL` 値ã«ã‚ˆã£ã¦ãã®è¡Œã‚’スキップã—ã¾ã›ã‚“ +└─────────────────────┘ + +SELECT (argMin((a, b), b) as t).1 argMinA, t.2 argMinB from test; +┌─argMinA─┬─argMinB─┠+│ á´ºáµá´¸á´¸ │ 0 │ -- `Tuple` を使用ã—ã¦ã€æœ€å¤§ã® b ã«å¯¾å¿œã™ã‚‹ã™ã¹ã¦ã® (ã™ãªã‚ã¡ tuple(*)) カラムをå–å¾—ã§ãã¾ã™ +└─────────┴─────────┘ + +SELECT argMin(a, b), min(b) FROM test WHERE a IS NULL and b IS NULL; +┌─argMin(a, b)─┬─min(b)─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ -- ã™ã¹ã¦ã®é›†ç´„è¡Œã¯ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã®ãŸã‚ã«å°‘ãªãã¨ã‚‚1ã¤ã® `NULL` 値をå«ã‚€ãŸã‚ã€ã™ã¹ã¦ã®è¡ŒãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã€ãã®çµæžœ `NULL` ã«ãªã‚Šã¾ã™ +└──────────────┴────────┘ + +SELECT argMin(a, (b, a)), min(tuple(b, a)) FROM test; +┌─argMin(a, tuple(b, a))─┬─min(tuple(b, a))─┠+│ d │ (NULL,NULL) │ -- 'd' ã¯æœ€å°ã® `NULL` ã§ãªã„値ã§ã™ +└────────────────────────┴──────────────────┘ + +SELECT argMin((a, b), (b, a)), min(tuple(b, a)) FROM test; +┌─argMin(tuple(a, b), tuple(b, a))─┬─min(tuple(b, a))─┠+│ (NULL,NULL) │ (NULL,NULL) │ -- `Tuple` ㌠`NULL` をスキップã—ãªã„よã†ã«è¨±å¯ã™ã‚‹ãŸã‚ã€argMin 㯠(NULL,NULL) ã‚’è¿”ã—ã€min(tuple(b, a)) ã¯ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®æœ€å°å€¤ã«ãªã‚Šã¾ã™ +└──────────────────────────────────┴──────────────────┘ + +SELECT argMin(a, tuple(b)) FROM test; +┌─argMin(a, tuple(b))─┠+│ d │ -- `Tuple` 㯠`NULL` ãªå€¤ã‚’æŒã¤è¡Œã‚’スキップã—ãªã„よã†ã« `min` ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ +└─────────────────────┘ +``` + +**å‚ç…§** + +- [Tuple](/docs/ja/sql-reference/data-types/tuple.md) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/arrayconcatagg.md b/docs/ja/sql-reference/aggregate-functions/reference/arrayconcatagg.md new file mode 100644 index 00000000000..05ed70a2b30 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/arrayconcatagg.md @@ -0,0 +1,32 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/array_concat_agg +sidebar_position: 111 +--- + +# array_concat_agg +- `groupArrayArray`ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã™ã€‚ã“ã®é–¢æ•°ã¯å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +**例** + +```text +SELECT * +FROM t + +┌─a───────┠+│ [1,2,3] │ +│ [4,5] │ +│ [6] │ +└─────────┘ + +``` + +クエリ: + +```sql +SELECT array_concat_agg(a) AS a +FROM t + +┌─a─────────────┠+│ [1,2,3,4,5,6] │ +└───────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/avg.md b/docs/ja/sql-reference/aggregate-functions/reference/avg.md new file mode 100644 index 00000000000..74f2b7eb0df --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/avg.md @@ -0,0 +1,65 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/avg +sidebar_position: 112 +--- + +# avg + +ç®—è¡“å¹³å‡ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +``` sql +avg(x) +``` + +**引数** + +- `x` — 入力値ã§ã€[Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md)ã€ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md) ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**戻り値** + +- ç®—è¡“å¹³å‡ã¯å¸¸ã« [Float64](../../../sql-reference/data-types/float.md) ã¨ã—ã¦è¿”ã•ã‚Œã¾ã™ã€‚ +- 入力パラメータ `x` ãŒç©ºã®å ´åˆã€`NaN` ã¨ãªã‚Šã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT avg(x) FROM values('x Int8', 0, 1, 2, 3, 4, 5); +``` + +çµæžœ: + +``` text +┌─avg(x)─┠+│ 2.5 │ +└────────┘ +``` + +**例** + +一時テーブルを作æˆ: + +クエリ: + +``` sql +CREATE table test (t UInt8) ENGINE = Memory; +``` + +ç®—è¡“å¹³å‡ã‚’å–å¾—: + +クエリ: + +``` +SELECT avg(t) FROM test; +``` + +çµæžœ: + +``` text +┌─avg(x)─┠+│ nan │ +└────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/avgweighted.md b/docs/ja/sql-reference/aggregate-functions/reference/avgweighted.md new file mode 100644 index 00000000000..0bbcf793332 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/avgweighted.md @@ -0,0 +1,98 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/avgweighted +sidebar_position: 113 +--- + +# avgWeighted + +[加é‡ç®—è¡“å¹³å‡](https://en.wikipedia.org/wiki/Weighted_arithmetic_mean)を計算ã—ã¾ã™ã€‚ + +**構文** + +``` sql +avgWeighted(x, weight) +``` + +**引数** + +- `x` — 値。 +- `weight` — 値ã®é‡ã¿ã€‚ + +`x` 㨠`weight` ã®ä¸¡æ–¹ãŒ +[æ•´æ•°](../../../sql-reference/data-types/int-uint.md)ã¾ãŸã¯[浮動å°æ•°ç‚¹](../../../sql-reference/data-types/float.md) +ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒã€ç•°ãªã‚‹åž‹ã‚’æŒã¤ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ã™ã¹ã¦ã®é‡ã¿ãŒ0ã¾ãŸã¯æŒ‡å®šã•ã‚ŒãŸé‡ã¿ãƒ‘ラメータãŒç©ºã®å ´åˆã¯`NaN`。 +- ãれ以外ã®å ´åˆã¯åŠ é‡å¹³å‡ã€‚ + +**戻り値ã®åž‹**ã¯å¸¸ã«[Float64](../../../sql-reference/data-types/float.md)ã§ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT avgWeighted(x, w) +FROM values('x Int8, w Int8', (4, 1), (1, 0), (10, 2)) +``` + +çµæžœ: + +``` text +┌─avgWeighted(x, weight)─┠+│ 8 │ +└────────────────────────┘ +``` + +**例** + +クエリ: + +``` sql +SELECT avgWeighted(x, w) +FROM values('x Int8, w Float64', (4, 1), (1, 0), (10, 2)) +``` + +çµæžœ: + +``` text +┌─avgWeighted(x, weight)─┠+│ 8 │ +└────────────────────────┘ +``` + +**例** + +クエリ: + +``` sql +SELECT avgWeighted(x, w) +FROM values('x Int8, w Int8', (0, 0), (1, 0), (10, 0)) +``` + +çµæžœ: + +``` text +┌─avgWeighted(x, weight)─┠+│ nan │ +└────────────────────────┘ +``` + +**例** + +クエリ: + +``` sql +CREATE table test (t UInt8) ENGINE = Memory; +SELECT avgWeighted(t) FROM test +``` + +çµæžœ: + +``` text +┌─avgWeighted(x, weight)─┠+│ nan │ +└────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/boundrat.md b/docs/ja/sql-reference/aggregate-functions/reference/boundrat.md new file mode 100644 index 00000000000..d92b0951f28 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/boundrat.md @@ -0,0 +1,45 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/boundingRatio +sidebar_position: 114 +title: boundingRatio +--- + +グループã®å€¤ã®ä¸­ã§æœ€ã‚‚å·¦ã¨æœ€ã‚‚å³ã®ç‚¹é–“ã®å‹¾é…を計算ã™ã‚‹é›†è¨ˆé–¢æ•°ã€‚ + +例: + +サンプルデータ: +```sql +SELECT + number, + number * 1.5 +FROM numbers(10) +``` +```response +┌─number─┬─multiply(number, 1.5)─┠+│ 0 │ 0 │ +│ 1 │ 1.5 │ +│ 2 │ 3 │ +│ 3 │ 4.5 │ +│ 4 │ 6 │ +│ 5 │ 7.5 │ +│ 6 │ 9 │ +│ 7 │ 10.5 │ +│ 8 │ 12 │ +│ 9 │ 13.5 │ +└────────┴───────────────────────┘ +``` + +`boundingRatio()` 関数ã¯ã€æœ€ã‚‚å·¦ã®ç‚¹ã¨æœ€ã‚‚å³ã®ç‚¹ã®é–“ã®ç·šã®å‹¾é…ã‚’è¿”ã—ã¾ã™ã€‚上記ã®ãƒ‡ãƒ¼ã‚¿ã§ã®ã“れらã®ç‚¹ã¯ `(0,0)` 㨠`(9,13.5)` ã§ã™ã€‚ + +```sql +SELECT boundingRatio(number, number * 1.5) +FROM numbers(10) +``` +```response +┌─boundingRatio(number, multiply(number, 1.5))─┠+│ 1.5 │ +└──────────────────────────────────────────────┘ +``` + + diff --git a/docs/ja/sql-reference/aggregate-functions/reference/categoricalinformationvalue.md b/docs/ja/sql-reference/aggregate-functions/reference/categoricalinformationvalue.md new file mode 100644 index 00000000000..5829d41cd69 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/categoricalinformationvalue.md @@ -0,0 +1,13 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/categoricalinformationvalue +sidebar_position: 115 +title: categoricalInformationValue +--- + +å„カテゴリーã«å¯¾ã—㦠`(P(tag = 1) - P(tag = 0))(log(P(tag = 1)) - log(P(tag = 0)))` ã®å€¤ã‚’計算ã—ã¾ã™ã€‚ + +``` sql +categoricalInformationValue(category1, category2, ..., tag) +``` + +ã“ã®çµæžœã¯ã€é›¢æ•£çš„(カテゴリカル)フィーãƒãƒ£ãƒ¼ `[category1, category2, ...]` ㌠`tag` ã®å€¤ã‚’予測ã™ã‚‹å­¦ç¿’モデルã«ã©ã®ã‚ˆã†ã«å¯„与ã™ã‚‹ã‹ã‚’示ã—ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/aggregate-functions/reference/contingency.md b/docs/ja/sql-reference/aggregate-functions/reference/contingency.md new file mode 100644 index 00000000000..76307e4b7f5 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/contingency.md @@ -0,0 +1,50 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/contingency +sidebar_position: 116 +--- + +# contingency + +`contingency` 関数ã¯ã€2ã¤ã®ã‚«ãƒ©ãƒ é–“ã®é–¢ä¿‚を測定ã™ã‚‹å€¤ã§ã‚ã‚‹ [連関係数](https://en.wikipedia.org/wiki/Contingency_table#Cram%C3%A9r's_V_and_the_contingency_coefficient_C) を計算ã—ã¾ã™ã€‚ã“ã®è¨ˆç®—㯠[ `cramersV` 関数](./cramersv.md) ã¨é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€å¹³æ–¹æ ¹ã®åˆ†æ¯ãŒç•°ãªã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +contingency(column1, column2) +``` + +**引数** + +- `column1` 㨠`column2` ã¯æ¯”較ã™ã‚‹ã‚«ãƒ©ãƒ ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 0ã‹ã‚‰1ã®ç¯„囲ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚çµæžœãŒå¤§ãã„ã»ã©ã€2ã¤ã®ã‚«ãƒ©ãƒ ã®é–¢ä¿‚ãŒå¯†æŽ¥ã§ã™ã€‚ + +**戻り値ã®åž‹** ã¯å¸¸ã« [Float64](../../../sql-reference/data-types/float.md) ã§ã™ã€‚ + +**例** + +以下ã®ä¾‹ã§ã¯ã€æ¯”較ã—ã¦ã„ã‚‹2ã¤ã®ã‚«ãƒ©ãƒ ãŒãã‚Œãžã‚Œã‚ã¾ã‚Šé–¢ä¿‚ãŒãªã„ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ã¾ãŸã€æ¯”較ã®ãŸã‚ã« `cramersV` ã®çµæžœã‚‚å«ã‚ã¦ã„ã¾ã™ã€‚ + +``` sql +SELECT + cramersV(a, b), + contingency(a ,b) +FROM + ( + SELECT + number % 10 AS a, + number % 4 AS b + FROM + numbers(150) + ); +``` + +çµæžœ: + +```response +┌──────cramersV(a, b)─┬───contingency(a, b)─┠+│ 0.41171788506213564 │ 0.05812725261759165 │ +└─────────────────────┴─────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/corr.md b/docs/ja/sql-reference/aggregate-functions/reference/corr.md new file mode 100644 index 00000000000..73752f94e53 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/corr.md @@ -0,0 +1,60 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/corr +sidebar_position: 117 +--- + +# corr + +[ピアソンç©çŽ‡ç›¸é–¢ä¿‚æ•°](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient)を計算ã—ã¾ã™: + +$$ +\frac{\Sigma{(x - \bar{x})(y - \bar{y})}}{\sqrt{\Sigma{(x - \bar{x})^2} * \Sigma{(y - \bar{y})^2}}} +$$ + +:::note +ã“ã®é–¢æ•°ã¯æ•°å€¤çš„ã«ä¸å®‰å®šãªã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¦ã„ã¾ã™ã€‚計算ã«ãŠã„ã¦[数値的安定性](https://en.wikipedia.org/wiki/Numerical_stability)ãŒå¿…è¦ãªå ´åˆã¯ã€[`corrStable`](../reference/corrstable.md) 関数を使用ã—ã¦ãã ã•ã„。ã“ã¡ã‚‰ã¯é…ã„ã§ã™ãŒã€ã‚ˆã‚Šæ­£ç¢ºãªçµæžœã‚’æä¾›ã—ã¾ã™ã€‚ +::: + +**構文** + +```sql +corr(x, y) +``` + +**引数** + +- `x` — 最åˆã®å¤‰æ•°ã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal](../../data-types/decimal.md)。 +- `y` — 二番目ã®å¤‰æ•°ã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal](../../data-types/decimal.md)。 + +**戻り値** + +- ピアソンç©çŽ‡ç›¸é–¢ä¿‚数。[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS series; +CREATE TABLE series +( + i UInt32, + x_value Float64, + y_value Float64 +) +ENGINE = Memory; +INSERT INTO series(i, x_value, y_value) VALUES (1, 5.6, -4.4),(2, -9.6, 3),(3, -1.3, -4),(4, 5.3, 9.7),(5, 4.4, 0.037),(6, -8.6, -7.8),(7, 5.1, 9.3),(8, 7.9, -3.6),(9, -8.2, 0.62),(10, -3, 7.3); +``` + +```sql +SELECT corr(x_value, y_value) +FROM series; +``` + +çµæžœ: + +```response +┌─corr(x_value, y_value)─┠+│ 0.1730265755453256 │ +└────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/corrmatrix.md b/docs/ja/sql-reference/aggregate-functions/reference/corrmatrix.md new file mode 100644 index 00000000000..facc6f9ba4d --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/corrmatrix.md @@ -0,0 +1,55 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/corrmatrix +sidebar_position: 118 +--- + +# corrMatrix + +N個ã®å¤‰æ•°ã«å¯¾ã™ã‚‹ç›¸é–¢è¡Œåˆ—を計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +corrMatrix(x[, ...]) +``` + +**引数** + +- `x` — å¯å¤‰å€‹ã®ãƒ‘ラメータ。[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal](../../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 相関行列。 [Array](../../data-types/array.md)([Array](../../data-types/array.md)([Float64](../../data-types/float.md)))。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test; +CREATE TABLE test +( + a UInt32, + b Float64, + c Float64, + d Float64 +) +ENGINE = Memory; +INSERT INTO test(a, b, c, d) VALUES (1, 5.6, -4.4, 2.6), (2, -9.6, 3, 3.3), (3, -1.3, -4, 1.2), (4, 5.3, 9.7, 2.3), (5, 4.4, 0.037, 1.222), (6, -8.6, -7.8, 2.1233), (7, 5.1, 9.3, 8.1222), (8, 7.9, -3.6, 9.837), (9, -8.2, 0.62, 8.43555), (10, -3, 7.3, 6.762); +``` + +```sql +SELECT arrayMap(x -> round(x, 3), arrayJoin(corrMatrix(a, b, c, d))) AS corrMatrix +FROM test; +``` + +çµæžœ: + +```response + ┌─corrMatrix─────────────┠+1. │ [1,-0.096,0.243,0.746] │ +2. │ [-0.096,1,0.173,0.106] │ +3. │ [0.243,0.173,1,0.258] │ +4. │ [0.746,0.106,0.258,1] │ + └────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/corrstable.md b/docs/ja/sql-reference/aggregate-functions/reference/corrstable.md new file mode 100644 index 00000000000..cabee97d020 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/corrstable.md @@ -0,0 +1,58 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/corrstable +sidebar_position: 119 +--- + +# corrStable + +[ピアソン相関係数](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient)を計算ã—ã¾ã™: + +$$ +\frac{\Sigma{(x - \bar{x})(y - \bar{y})}}{\sqrt{\Sigma{(x - \bar{x})^2} * \Sigma{(y - \bar{y})^2}}} +$$ + +`corr`関数ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€æ•°å€¤çš„ã«å®‰å®šã—ãŸã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¾ã™ã€‚ãã®çµæžœã€`corrStable`ã¯`corr`よりもé…ã„ã§ã™ãŒã€ã‚ˆã‚Šæ­£ç¢ºãªçµæžœã‚’生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +corrStable(x, y) +``` + +**引数** + +- `x` — 第一変数。[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal](../../data-types/decimal.md)。 +- `y` — 第二変数。[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal](../../data-types/decimal.md)。 + +**戻り値** + +- ピアソン相関係数。[Float64](../../data-types/float.md)。 + +***例** + +クエリ: + +```sql +DROP TABLE IF EXISTS series; +CREATE TABLE series +( + i UInt32, + x_value Float64, + y_value Float64 +) +ENGINE = Memory; +INSERT INTO series(i, x_value, y_value) VALUES (1, 5.6, -4.4),(2, -9.6, 3),(3, -1.3, -4),(4, 5.3, 9.7),(5, 4.4, 0.037),(6, -8.6, -7.8),(7, 5.1, 9.3),(8, 7.9, -3.6),(9, -8.2, 0.62),(10, -3, 7.3); +``` + +```sql +SELECT corrStable(x_value, y_value) +FROM series; +``` + +çµæžœ: + +```response +┌─corrStable(x_value, y_value)─┠+│ 0.17302657554532558 │ +└──────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/count.md b/docs/ja/sql-reference/aggregate-functions/reference/count.md new file mode 100644 index 00000000000..250a241e3ae --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/count.md @@ -0,0 +1,77 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/count +sidebar_position: 120 +--- + +# count + +行数ã¾ãŸã¯NULL以外ã®å€¤ã‚’æ•°ãˆã¾ã™ã€‚ + +ClickHouseã¯`count`ã«å¯¾ã—ã¦ä»¥ä¸‹ã®æ§‹æ–‡ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: + +- `count(expr)` ã¾ãŸã¯ `COUNT(DISTINCT expr)`。 +- `count()` ã¾ãŸã¯ `COUNT(*)`。`count()`構文ã¯ClickHouse固有ã®ã‚‚ã®ã§ã™ã€‚ + +**引数** + +ã“ã®é–¢æ•°ã¯ä»¥ä¸‹ã‚’å—ã‘å–ã‚Œã¾ã™: + +- パラメータを一ã¤ã‚‚å–らãªã„。 +- 一ã¤ã®[å¼](../../../sql-reference/syntax.md#syntax-expressions)。 + +**戻り値** + +- 関数ãŒãƒ‘ラメータãªã—ã§å‘¼ã³å‡ºã•ã‚ŒãŸå ´åˆã€è¡Œæ•°ã‚’æ•°ãˆã¾ã™ã€‚ +- [å¼](../../../sql-reference/syntax.md#syntax-expressions)ãŒæ¸¡ã•ã‚ŒãŸå ´åˆã€ãã®å¼ãŒNULL以外を返ã—ãŸå›žæ•°ã‚’æ•°ãˆã¾ã™ã€‚å¼ãŒ[Nullable](../../../sql-reference/data-types/nullable.md)åž‹ã®å€¤ã‚’è¿”ã™å ´åˆã§ã‚‚ã€`count`ã®çµæžœã¯`Nullable`ã«ã¯ãªã‚Šã¾ã›ã‚“。å¼ãŒã™ã¹ã¦ã®è¡Œã§`NULL`ã‚’è¿”ã—ãŸå ´åˆã€é–¢æ•°ã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +ã„ãšã‚Œã®å ´åˆã‚‚ã€æˆ»ã‚Šå€¤ã®åž‹ã¯[UInt64](../../../sql-reference/data-types/int-uint.md)ã§ã™ã€‚ + +**詳細** + +ClickHouseã¯`COUNT(DISTINCT …)`構文をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ã“ã®æ§‹æ–‡ã®å‹•ä½œã¯ã€[count_distinct_implementation](../../../operations/settings/settings.md#count_distinct_implementation)設定ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€æ“作を実行ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹[uniq\*](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq)関数を定義ã—ã¾ã™ã€‚デフォルトã¯[uniqExact](../../../sql-reference/aggregate-functions/reference/uniqexact.md#agg_function-uniqexact)関数ã§ã™ã€‚ + +`SELECT count() FROM table`クエリã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§MergeTreeã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’使用ã—ã¦æœ€é©åŒ–ã•ã‚Œã¾ã™ã€‚行レベルã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€[optimize_trivial_count_query](../../../operations/settings/settings.md#optimize-trivial-count-query)設定を使用ã—ã¦æœ€é©åŒ–を無効ã«ã—ã¾ã™ã€‚ + +ãŸã ã—ã€`SELECT count(nullable_column) FROM table`クエリã¯ã€[optimize_functions_to_subcolumns](../../../operations/settings/settings.md#optimize-functions-to-subcolumns)設定を有効ã«ã™ã‚‹ã“ã¨ã§æœ€é©åŒ–ã§ãã¾ã™ã€‚`optimize_functions_to_subcolumns = 1`ã®è¨­å®šã§ã¯ã€å…¨ä½“ã®ã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚“ã§å‡¦ç†ã™ã‚‹ã®ã§ã¯ãªãã€[null](../../../sql-reference/data-types/nullable.md#finding-null)サブカラムã®ã¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯`SELECT count(n) FROM table`ã‹ã‚‰`SELECT sum(NOT n.null) FROM table`ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +**COUNT(DISTINCT expr)ã®ãƒ‘フォーマンスå‘上** + +`COUNT(DISTINCT expr)`クエリãŒé…ã„å ´åˆã€ä¸¦åˆ—化を改善ã™ã‚‹ãŸã‚ã«[`GROUP BY`](../../../sql-reference/statements/select/group-by.md)å¥ã‚’追加ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。ã¾ãŸã€[projection](../../../sql-reference/statements/alter/projection.md)を使用ã—ã¦ã€`COUNT(DISTINCT target_col)`ã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹å¯¾è±¡ã‚«ãƒ©ãƒ ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +**例** + +例1: + +``` sql +SELECT count() FROM t +``` + +``` text +┌─count()─┠+│ 5 │ +└─────────┘ +``` + +例2: + +``` sql +SELECT name, value FROM system.settings WHERE name = 'count_distinct_implementation' +``` + +``` text +┌─name──────────────────────────┬─value─────┠+│ count_distinct_implementation │ uniqExact │ +└───────────────────────────────┴───────────┘ +``` + +``` sql +SELECT count(DISTINCT num) FROM t +``` + +``` text +┌─uniqExact(num)─┠+│ 3 │ +└────────────────┘ +``` + +ã“ã®ä¾‹ã¯ã€`count(DISTINCT num)`ãŒ`count_distinct_implementation`設定ã®å€¤ã«å¾“ã£ã¦`uniqExact`関数ã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/aggregate-functions/reference/covarpop.md b/docs/ja/sql-reference/aggregate-functions/reference/covarpop.md new file mode 100644 index 00000000000..b089277837c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/covarpop.md @@ -0,0 +1,54 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/covarpop +sidebar_position: 121 +--- + +# covarPop + +æ¯é›†å›£åˆ†æ•£å…±åˆ†æ•£ã‚’計算ã—ã¾ã™: + +$$ +\frac{\Sigma{(x - \bar{x})(y - \bar{y})}}{n} +$$ + +:::note +ã“ã®é–¢æ•°ã¯æ•°å€¤çš„ã«ä¸å®‰å®šãªã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¾ã™ã€‚計算ã«ãŠã„ã¦[数値的安定性](https://en.wikipedia.org/wiki/Numerical_stability)ãŒå¿…è¦ãªå ´åˆã¯ã€[`covarPopStable`](../reference/covarpopstable.md)関数を使用ã—ã¦ãã ã•ã„。ã“ã‚Œã¯è¨ˆç®—速度ãŒé…ããªã‚Šã¾ã™ãŒã€è¨ˆç®—誤差ãŒå°‘ãªããªã‚Šã¾ã™ã€‚ +::: + +**構文** + +```sql +covarPop(x, y) +``` + +**引数** + +- `x` — 最åˆã®å¤‰æ•°ã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal](../../data-types/decimal.md)。 +- `y` — 2番目ã®å¤‰æ•°ã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal](../../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x` 㨠`y` ã®æ¯é›†å›£å…±åˆ†æ•£ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS series; +CREATE TABLE series(i UInt32, x_value Float64, y_value Float64) ENGINE = Memory; +INSERT INTO series(i, x_value, y_value) VALUES (1, 5.6, -4.4),(2, -9.6, 3),(3, -1.3, -4),(4, 5.3, 9.7),(5, 4.4, 0.037),(6, -8.6, -7.8),(7, 5.1, 9.3),(8, 7.9, -3.6),(9, -8.2, 0.62),(10, -3, 7.3); +``` + +```sql +SELECT covarPop(x_value, y_value) +FROM series; +``` + +çµæžœ: + +```reference +┌─covarPop(x_value, y_value)─┠+│ 6.485648 │ +└────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/covarpopmatrix.md b/docs/ja/sql-reference/aggregate-functions/reference/covarpopmatrix.md new file mode 100644 index 00000000000..8d251b0e37b --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/covarpopmatrix.md @@ -0,0 +1,55 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/covarpopmatrix +sidebar_position: 122 +--- + +# covarPopMatrix + +N個ã®å¤‰æ•°ã«å¯¾ã™ã‚‹æ¯é›†å›£åˆ†æ•£å…±åˆ†æ•£è¡Œåˆ—ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +covarPopMatrix(x[, ...]) +``` + +**引数** + +- `x` — å¯å¤‰å€‹æ•°ã®ãƒ‘ラメータ。[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal](../../data-types/decimal.md)。 + +**戻り値** + +- æ¯é›†å›£åˆ†æ•£å…±åˆ†æ•£è¡Œåˆ—。[Array](../../data-types/array.md)([Array](../../data-types/array.md)([Float64](../../data-types/float.md)))。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test; +CREATE TABLE test +( + a UInt32, + b Float64, + c Float64, + d Float64 +) +ENGINE = Memory; +INSERT INTO test(a, b, c, d) VALUES (1, 5.6, -4.4, 2.6), (2, -9.6, 3, 3.3), (3, -1.3, -4, 1.2), (4, 5.3, 9.7, 2.3), (5, 4.4, 0.037, 1.222), (6, -8.6, -7.8, 2.1233), (7, 5.1, 9.3, 8.1222), (8, 7.9, -3.6, 9.837), (9, -8.2, 0.62, 8.43555), (10, -3, 7.3, 6.762); +``` + +```sql +SELECT arrayMap(x -> round(x, 3), arrayJoin(covarPopMatrix(a, b, c, d))) AS covarPopMatrix +FROM test; +``` + +çµæžœ: + +```reference + ┌─covarPopMatrix────────────┠+1. │ [8.25,-1.76,4.08,6.748] │ +2. │ [-1.76,41.07,6.486,2.132] │ +3. │ [4.08,6.486,34.21,4.755] │ +4. │ [6.748,2.132,4.755,9.93] │ + └───────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/covarpopstable.md b/docs/ja/sql-reference/aggregate-functions/reference/covarpopstable.md new file mode 100644 index 00000000000..504762e174e --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/covarpopstable.md @@ -0,0 +1,58 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/covarpopstable +sidebar_position: 123 +--- + +# covarPopStable + +æ¯é›†å›£å…±åˆ†æ•£ã®å€¤ã‚’計算ã—ã¾ã™: + +$$ +\frac{\Sigma{(x - \bar{x})(y - \bar{y})}}{n} +$$ + +ã“ã‚Œã¯[covarPop](../reference/covarpop.md)関数ã«ä¼¼ã¦ã„ã¾ã™ãŒã€æ•°å€¤çš„ã«å®‰å®šã—ãŸã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¾ã™ã€‚ãã®çµæžœã€`covarPopStable`ã¯`covarPop`よりもé…ã„ã§ã™ãŒã€ã‚ˆã‚Šæ­£ç¢ºãªçµæžœã‚’出ã—ã¾ã™ã€‚ + +**構文** + +```sql +covarPop(x, y) +``` + +**引数** + +- `x` — 最åˆã®å¤‰æ•°ã€‚[(U)Int*](../../data-types/int-uint.md)ã€[Float*](../../data-types/float.md)ã€[Decimal](../../data-types/decimal.md)。 +- `y` — 二番目ã®å¤‰æ•°ã€‚[(U)Int*](../../data-types/int-uint.md)ã€[Float*](../../data-types/float.md)ã€[Decimal](../../data-types/decimal.md)。 + +**戻り値** + +- `x`ã¨`y`ã®é–“ã®æ¯é›†å›£å…±åˆ†æ•£ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS series; +CREATE TABLE series(i UInt32, x_value Float64, y_value Float64) ENGINE = Memory; +INSERT INTO series(i, x_value, y_value) VALUES (1, 5.6,-4.4),(2, -9.6,3),(3, -1.3,-4),(4, 5.3,9.7),(5, 4.4,0.037),(6, -8.6,-7.8),(7, 5.1,9.3),(8, 7.9,-3.6),(9, -8.2,0.62),(10, -3,7.3); +``` + +```sql +SELECT covarPopStable(x_value, y_value) +FROM +( + SELECT + x_value, + y_value + FROM series +); +``` + +çµæžœ: + +```reference +┌─covarPopStable(x_value, y_value)─┠+│ 6.485648 │ +└──────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/covarsamp.md b/docs/ja/sql-reference/aggregate-functions/reference/covarsamp.md new file mode 100644 index 00000000000..bc4da63e465 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/covarsamp.md @@ -0,0 +1,78 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/covarsamp +sidebar_position: 124 +--- + +# covarSamp + +`Σ((x - xÌ…)(y - yÌ…)) / (n - 1)` ã®å€¤ã‚’計算ã—ã¾ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ã¯æ•°å€¤çš„ã«ä¸å®‰å®šãªã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¾ã™ã€‚計算ã«ãŠã‘ã‚‹[数値安定性](https://en.wikipedia.org/wiki/Numerical_stability)ãŒå¿…è¦ãªå ´åˆã¯ã€`covarSampStable` 関数を使用ã—ã¦ãã ã•ã„。ã“ã®é–¢æ•°ã¯å‹•ä½œãŒé…ããªã‚Šã¾ã™ãŒã€è¨ˆç®—誤差を抑ãˆã¾ã™ã€‚ +::: + +**構文** + +```sql +covarSamp(x, y) +``` + +**引数** + +- `x` — 第一ã®å¤‰æ•°ã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal](../../data-types/decimal.md)。 +- `y` — 第二ã®å¤‰æ•°ã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal](../../data-types/decimal.md)。 + +**戻り値** + +- `x` 㨠`y` é–“ã®ã‚µãƒ³ãƒ—ル共分散。`n <= 1` ã®å ´åˆã€`nan` ãŒè¿”ã•ã‚Œã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS series; +CREATE TABLE series(i UInt32, x_value Float64, y_value Float64) ENGINE = Memory; +INSERT INTO series(i, x_value, y_value) VALUES (1, 5.6,-4.4),(2, -9.6,3),(3, -1.3,-4),(4, 5.3,9.7),(5, 4.4,0.037),(6, -8.6,-7.8),(7, 5.1,9.3),(8, 7.9,-3.6),(9, -8.2,0.62),(10, -3,7.3); +``` + +```sql +SELECT covarSamp(x_value, y_value) +FROM +( + SELECT + x_value, + y_value + FROM series +); +``` + +çµæžœ: + +```reference +┌─covarSamp(x_value, y_value)─┠+│ 7.206275555555556 │ +└─────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT covarSamp(x_value, y_value) +FROM +( + SELECT + x_value, + y_value + FROM series LIMIT 1 +); + +``` + +çµæžœ: + +```reference +┌─covarSamp(x_value, y_value)─┠+│ nan │ +└─────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/covarsampmatrix.md b/docs/ja/sql-reference/aggregate-functions/reference/covarsampmatrix.md new file mode 100644 index 00000000000..a5fe5a0d9a1 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/covarsampmatrix.md @@ -0,0 +1,55 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/covarsampmatrix +sidebar_position: 125 +--- + +# covarSampMatrix + +N個ã®å¤‰æ•°ã«å¯¾ã™ã‚‹ã‚µãƒ³ãƒ—ル共分散行列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +covarSampMatrix(x[, ...]) +``` + +**引数** + +- `x` — å¯å¤‰æ•°ã®ãƒ‘ラメータ。[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal](../../data-types/decimal.md)。 + +**戻り値** + +- サンプル共分散行列。[Array](../../data-types/array.md)([Array](../../data-types/array.md)([Float64](../../data-types/float.md)))。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test; +CREATE TABLE test +( + a UInt32, + b Float64, + c Float64, + d Float64 +) +ENGINE = Memory; +INSERT INTO test(a, b, c, d) VALUES (1, 5.6, -4.4, 2.6), (2, -9.6, 3, 3.3), (3, -1.3, -4, 1.2), (4, 5.3, 9.7, 2.3), (5, 4.4, 0.037, 1.222), (6, -8.6, -7.8, 2.1233), (7, 5.1, 9.3, 8.1222), (8, 7.9, -3.6, 9.837), (9, -8.2, 0.62, 8.43555), (10, -3, 7.3, 6.762); +``` + +```sql +SELECT arrayMap(x -> round(x, 3), arrayJoin(covarSampMatrix(a, b, c, d))) AS covarSampMatrix +FROM test; +``` + +çµæžœ: + +```reference + ┌─covarSampMatrix─────────────┠+1. │ [9.167,-1.956,4.534,7.498] │ +2. │ [-1.956,45.634,7.206,2.369] │ +3. │ [4.534,7.206,38.011,5.283] │ +4. │ [7.498,2.369,5.283,11.034] │ + └─────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/covarsampstable.md b/docs/ja/sql-reference/aggregate-functions/reference/covarsampstable.md new file mode 100644 index 00000000000..5c6e38a216c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/covarsampstable.md @@ -0,0 +1,73 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/covarsampstable +sidebar_position: 126 +--- + +# covarSampStable + +`Σ((x - xÌ…)(y - yÌ…)) / (n - 1)` ã®å€¤ã‚’計算ã—ã¾ã™ã€‚ [covarSamp](../reference/covarsamp.md) ã¨é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€è¨ˆç®—誤差を減少ã•ã›ã‚‹ä¸€æ–¹ã§ã€å‹•ä½œé€Ÿåº¦ã¯é…ããªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +covarSampStable(x, y) +``` + +**引数** + +- `x` — 第一ã®å¤‰æ•°ã€‚[(U)Int*](../../data-types/int-uint.md)ã€[Float*](../../data-types/float.md)ã€[Decimal](../../data-types/decimal.md)。 +- `y` — 第二ã®å¤‰æ•°ã€‚[(U)Int*](../../data-types/int-uint.md)ã€[Float*](../../data-types/float.md)ã€[Decimal](../../data-types/decimal.md)。 + +**戻り値** + +- `x`ã¨`y`ã®ã‚µãƒ³ãƒ—ル共分散。`n <= 1`ã®å ´åˆã¯ã€`inf`ãŒè¿”ã•ã‚Œã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS series; +CREATE TABLE series(i UInt32, x_value Float64, y_value Float64) ENGINE = Memory; +INSERT INTO series(i, x_value, y_value) VALUES (1, 5.6,-4.4),(2, -9.6,3),(3, -1.3,-4),(4, 5.3,9.7),(5, 4.4,0.037),(6, -8.6,-7.8),(7, 5.1,9.3),(8, 7.9,-3.6),(9, -8.2,0.62),(10, -3,7.3); +``` + +```sql +SELECT covarSampStable(x_value, y_value) +FROM +( + SELECT + x_value, + y_value + FROM series +); +``` + +çµæžœ: + +```reference +┌─covarSampStable(x_value, y_value)─┠+│ 7.206275555555556 │ +└───────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT covarSampStable(x_value, y_value) +FROM +( + SELECT + x_value, + y_value + FROM series LIMIT 1 +); +``` + +çµæžœ: + +```reference +┌─covarSampStable(x_value, y_value)─┠+│ inf │ +└───────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/cramersv.md b/docs/ja/sql-reference/aggregate-functions/reference/cramersv.md new file mode 100644 index 00000000000..4853a189613 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/cramersv.md @@ -0,0 +1,79 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/cramersv +sidebar_position: 127 +--- + +# cramersV + +[Cramer's V](https://en.wikipedia.org/wiki/Cram%C3%A9r%27s_V)(Cramer's phiã¨ã‚‚呼ã°ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ï¼‰ã¯ã€ãƒ†ãƒ¼ãƒ–ル内ã®2ã¤ã®**カラム**é–“ã®é–¢é€£æ€§ã‚’測定ã™ã‚‹æŒ‡æ¨™ã§ã™ã€‚`cramersV`関数ã®çµæžœã¯ã€ï¼ˆå¤‰æ•°é–“ã«é–¢é€£ãŒãªã„ã“ã¨ã«å¯¾å¿œã™ã‚‹ï¼‰0ã‹ã‚‰1ã¾ã§ã®ç¯„囲をå–ã‚Šã€å„値ãŒä»–ã®å€¤ã«ã‚ˆã£ã¦å®Œå…¨ã«æ±ºå®šã•ã‚Œã‚‹å ´åˆã«ã®ã¿1ã«é”ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€2ã¤ã®å¤‰æ•°é–“ã®é–¢é€£æ€§ã‚’ã€æœ€å¤§å¯èƒ½ãªå¤‰å‹•ã®å‰²åˆã¨ã—ã¦è¦‹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +Cramer's V ã®ãƒã‚¤ã‚¢ã‚¹ä¿®æ­£ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã¤ã„ã¦ã¯ã€[cramersVBiasCorrected](./cramersvbiascorrected.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**構文** + +``` sql +cramersV(column1, column2) +``` + +**パラメータ** + +- `column1`: 比較ã™ã‚‹æœ€åˆã®ã‚«ãƒ©ãƒ ã€‚ +- `column2`: 比較ã™ã‚‹2番目ã®ã‚«ãƒ©ãƒ ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 0(カラムã®å€¤é–“ã«é–¢é€£ãŒãªã„ã“ã¨ã«å¯¾å¿œï¼‰ã‹ã‚‰1(完全ãªé–¢é€£æ€§ï¼‰ã¾ã§ã®å€¤ã€‚ + +タイプ: 常㫠[Float64](../../../sql-reference/data-types/float.md)。 + +**例** + +以下ã®2ã¤ã®**カラム**ã¯äº’ã„ã«é–¢é€£ãŒãªã„ãŸã‚ã€`cramersV`ã®çµæžœã¯0ã§ã™ã€‚ + +クエリ: + +``` sql +SELECT + cramersV(a, b) +FROM + ( + SELECT + number % 3 AS a, + number % 5 AS b + FROM + numbers(150) + ); +``` + +çµæžœ: + +```response +┌─cramersV(a, b)─┠+│ 0 │ +└────────────────┘ +``` + +以下ã®2ã¤ã®**カラム**ã¯ã‹ãªã‚Šå¯†æŽ¥ã«é–¢é€£ã—ã¦ã„ã‚‹ãŸã‚ã€`cramersV`ã®çµæžœã¯é«˜ã„値ã«ãªã‚Šã¾ã™ã€‚ + +```sql +SELECT + cramersV(a, b) +FROM + ( + SELECT + number % 10 AS a, + number % 5 AS b + FROM + numbers(150) + ); +``` + +çµæžœ: + +```response +┌─────cramersV(a, b)─┠+│ 0.8944271909999159 │ +└────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/cramersvbiascorrected.md b/docs/ja/sql-reference/aggregate-functions/reference/cramersvbiascorrected.md new file mode 100644 index 00000000000..b49ac72bb6c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/cramersvbiascorrected.md @@ -0,0 +1,53 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/cramersvbiascorrected +sidebar_position: 128 +--- + +# cramersVBiasCorrected + +Cramer's Vã¯ã€ãƒ†ãƒ¼ãƒ–ル内ã®äºŒã¤ã®ã‚«ãƒ©ãƒ é–“ã®é–¢é€£æ€§ã‚’測定ã™ã‚‹æŒ‡æ¨™ã§ã™ã€‚[`cramersV`関数](./cramersv.md)ã®çµæžœã¯0(変数間ã«é–¢é€£æ€§ãŒãªã„ã“ã¨ã‚’示ã™ï¼‰ã‹ã‚‰1(å„値ãŒä»–æ–¹ã®å€¤ã«ã‚ˆã£ã¦å®Œå…¨ã«æ±ºå®šã•ã‚Œã‚‹å ´åˆï¼‰ã¾ã§ã®ç¯„囲をæŒã¡ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯å¤§ããªãƒã‚¤ã‚¢ã‚¹ã‚’æŒã¤å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®Cramer's Vã§ã¯[ãƒã‚¤ã‚¢ã‚¹è£œæ­£](https://en.wikipedia.org/wiki/Cram%C3%A9r%27s_V#Bias_correction)を使用ã—ã¾ã™ã€‚ + +**構文** + +``` sql +cramersVBiasCorrected(column1, column2) +``` + +**パラメータ** + +- `column1`: 比較ã™ã‚‹æœ€åˆã®ã‚«ãƒ©ãƒ ã€‚ +- `column2`: 比較ã™ã‚‹2番目ã®ã‚«ãƒ©ãƒ ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 0(カラムã®å€¤é–“ã«é–¢é€£æ€§ãŒãªã„ã“ã¨ã‚’示ã™ï¼‰ã‹ã‚‰1(完全ãªé–¢é€£æ€§ï¼‰ã¾ã§ã®å€¤ã€‚ + +åž‹: 常ã«[Float64](../../../sql-reference/data-types/float.md)。 + +**例** + +以下ã®äºŒã¤ã®ã‚«ãƒ©ãƒ ã¯äº’ã„ã«å°ã•ãªé–¢é€£æ€§ã‚’æŒã£ã¦ã„ã¾ã™ã€‚`cramersVBiasCorrected`ã®çµæžœã¯`cramersV`ã®çµæžœã‚ˆã‚Šã‚‚å°ã•ã„ã“ã¨ã«æ³¨ç›®ã—ã¦ãã ã•ã„: + +クエリ: + +``` sql +SELECT + cramersV(a, b), + cramersVBiasCorrected(a ,b) +FROM + ( + SELECT + number % 10 AS a, + number % 4 AS b + FROM + numbers(150) + ); +``` + +çµæžœ: + +```response +┌──────cramersV(a, b)─┬─cramersVBiasCorrected(a, b)─┠+│ 0.41171788506213564 │ 0.33369281784141364 │ +└─────────────────────┴─────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/deltasum.md b/docs/ja/sql-reference/aggregate-functions/reference/deltasum.md new file mode 100644 index 00000000000..3938bc766b2 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/deltasum.md @@ -0,0 +1,74 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/deltasum +sidebar_position: 129 +--- + +# deltaSum + +連続ã™ã‚‹è¡Œã®é–“ã®ç®—術差をåˆè¨ˆã—ã¾ã™ã€‚å·®ãŒè² ã®å ´åˆã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ãŒæ­£ã—ã動作ã™ã‚‹ãŸã‚ã«ã¯ã€åŸºã«ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãŒã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®é–¢æ•°ã‚’[Materialized View](../../../sql-reference/statements/create/view.md#materialized)ã§ä½¿ç”¨ã—ãŸã„å ´åˆã€ä»£ã‚ã‚Šã«[deltaSumTimestamp](../../../sql-reference/aggregate-functions/reference/deltasumtimestamp.md#agg_functions-deltasumtimestamp)メソッドを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ +::: + +**構文** + +``` sql +deltaSum(value) +``` + +**引数** + +- `value` — 入力値。型ã¯[Integer](../../data-types/int-uint.md)ã¾ãŸã¯[Float](../../data-types/float.md)ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ç®—è¡“å·®ã®åˆè¨ˆã§ã€`Integer`ã¾ãŸã¯`Float`åž‹ã§ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT deltaSum(arrayJoin([1, 2, 3])); +``` + +çµæžœ: + +``` text +┌─deltaSum(arrayJoin([1, 2, 3]))─┠+│ 2 │ +└────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT deltaSum(arrayJoin([1, 2, 3, 0, 3, 4, 2, 3])); +``` + +çµæžœ: + +``` text +┌─deltaSum(arrayJoin([1, 2, 3, 0, 3, 4, 2, 3]))─┠+│ 7 │ +└───────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT deltaSum(arrayJoin([2.25, 3, 4.5])); +``` + +çµæžœ: + +``` text +┌─deltaSum(arrayJoin([2.25, 3, 4.5]))─┠+│ 2.25 │ +└─────────────────────────────────────┘ +``` + +## 関連項目 + +- [runningDifference](../../functions/other-functions.md#other_functions-runningdifference) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/deltasumtimestamp.md b/docs/ja/sql-reference/aggregate-functions/reference/deltasumtimestamp.md new file mode 100644 index 00000000000..b6afd1fa3f3 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/deltasumtimestamp.md @@ -0,0 +1,45 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/deltasumtimestamp +sidebar_position: 130 +title: deltaSumTimestamp +--- + +連続ã™ã‚‹è¡Œé–“ã®å·®ã‚’加算ã—ã¾ã™ã€‚å·®ãŒè² ã®å ´åˆã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ä¸»ã«ã€`toStartOfMinute` ãƒã‚±ãƒƒãƒˆã®ã‚ˆã†ãªæ™‚é–“ãƒã‚±ãƒƒãƒˆã«æƒã£ãŸã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã§ãƒ‡ãƒ¼ã‚¿ã‚’é †åºä»˜ã‘ã¦ä¿å­˜ã™ã‚‹[マテリアライズドビュー](../../../sql-reference/statements/create/view.md#materialized)用ã§ã™ã€‚ã“ã®ã‚ˆã†ãªãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ュー内ã®è¡Œã¯å…¨ã¦åŒã˜ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã‚’æŒã¤ãŸã‚ã€å…ƒã®ä¸¸ã‚られã¦ã„ãªã„タイムスタンプ値をä¿å­˜ã›ãšã«æ­£ã—ã„é †åºã§ãƒžãƒ¼ã‚¸ã™ã‚‹ã“ã¨ã¯ä¸å¯èƒ½ã§ã™ã€‚`deltaSumTimestamp` 関数ã¯ã€è¦‹ãŸå€¤ã®å…ƒã® `timestamp` を追跡ã—ã€ãã®ãŸã‚関数ã®å€¤ï¼ˆçŠ¶æ…‹ï¼‰ã¯ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ä¸­ã«æ­£ã—ã計算ã•ã‚Œã¾ã™ã€‚ + +é †åºä»˜ã‘られãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“ã®ãƒ‡ãƒ«ã‚¿ã‚µãƒ ã‚’計算ã™ã‚‹ã«ã¯ã€å˜ã« [deltaSum](../../../sql-reference/aggregate-functions/reference/deltasum.md#agg_functions-deltasum) 関数を使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +``` sql +deltaSumTimestamp(value, timestamp) +``` + +**引数** + +- `value` — 入力値。ã„ãã¤ã‹ã® [Integer](../../data-types/int-uint.md) åž‹ã¾ãŸã¯ [Float](../../data-types/float.md) åž‹ã€ã¾ãŸã¯ [Date](../../data-types/date.md) ã‚‚ã—ã㯠[DateTime](../../data-types/datetime.md) åž‹ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +- `timestamp` — 値を順åºä»˜ã‘ã‚‹ãŸã‚ã®ãƒ‘ラメータ。ã„ãã¤ã‹ã® [Integer](../../data-types/int-uint.md) åž‹ã¾ãŸã¯ [Float](../../data-types/float.md) åž‹ã€ã¾ãŸã¯ [Date](../../data-types/date.md) ã‚‚ã—ã㯠[DateTime](../../data-types/datetime.md) åž‹ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `timestamp` パラメータã§é †åºä»˜ã‘られãŸã€é€£ç¶šã™ã‚‹å€¤é–“ã®ç´¯ç©å·®ã€‚ + +åž‹: [Integer](../../data-types/int-uint.md) ã¾ãŸã¯ [Float](../../data-types/float.md) ã¾ãŸã¯ [Date](../../data-types/date.md) ã¾ãŸã¯ [DateTime](../../data-types/datetime.md)。 + +**例** + +クエリ: + +```sql +SELECT deltaSumTimestamp(value, timestamp) +FROM (SELECT number AS timestamp, [0, 4, 8, 3, 0, 0, 0, 1, 3, 5][number] AS value FROM numbers(1, 10)); +``` + +çµæžœ: + +``` text +┌─deltaSumTimestamp(value, timestamp)─┠+│ 13 │ +└─────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/distinctdynamictypes.md b/docs/ja/sql-reference/aggregate-functions/reference/distinctdynamictypes.md new file mode 100644 index 00000000000..a3344b7feaa --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/distinctdynamictypes.md @@ -0,0 +1,44 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/distinctdynamictypes +sidebar_position: 215 +--- + +# distinctDynamicTypes + +[Dynamic](../../data-types/dynamic.md)カラムã«æ ¼ç´ã•ã‚ŒãŸç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒªã‚¹ãƒˆã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +distinctDynamicTypes(dynamic) +``` + +**引数** + +- `dynamic` — [Dynamic](../../data-types/dynamic.md)カラム。 + +**戻り値** + +- データ型åã®ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸãƒªã‚¹ãƒˆ [Array(String)](../../data-types/array.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test_dynamic; +CREATE TABLE test_dynamic(d Dynamic) ENGINE = Memory; +INSERT INTO test_dynamic VALUES (42), (NULL), ('Hello'), ([1, 2, 3]), ('2020-01-01'), (map(1, 2)), (43), ([4, 5]), (NULL), ('World'), (map(3, 4)) +``` + +```sql +SELECT distinctDynamicTypes(d) FROM test_dynamic; +``` + +çµæžœ: + +```reference +┌─distinctDynamicTypes(d)──────────────────────────────────────┠+│ ['Array(Int64)','Date','Int64','Map(UInt8, UInt8)','String'] │ +└──────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/distinctjsonpaths.md b/docs/ja/sql-reference/aggregate-functions/reference/distinctjsonpaths.md new file mode 100644 index 00000000000..107a752744c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/distinctjsonpaths.md @@ -0,0 +1,125 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/distinctjsonpaths +sidebar_position: 216 +--- + +# distinctJSONPaths + +[JSON](../../data-types/newjson.md) カラムã«æ ¼ç´ã•ã‚Œã¦ã„ã‚‹ç•°ãªã‚‹ãƒ‘スã®ãƒªã‚¹ãƒˆã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +distinctJSONPaths(json) +``` + +**引数** + +- `json` — [JSON](../../data-types/newjson.md) カラム。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ソートã•ã‚ŒãŸãƒ‘スã®ãƒªã‚¹ãƒˆ [Array(String)](../../data-types/array.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test_json; +CREATE TABLE test_json(json JSON) ENGINE = Memory; +INSERT INTO test_json VALUES ('{"a" : 42, "b" : "Hello"}'), ('{"b" : [1, 2, 3], "c" : {"d" : {"e" : "2020-01-01"}}}'), ('{"a" : 43, "c" : {"d" : {"f" : [{"g" : 42}]}}}') +``` + +```sql +SELECT distinctJSONPaths(json) FROM test_json; +``` + +çµæžœ: + +```reference +┌─distinctJSONPaths(json)───┠+│ ['a','b','c.d.e','c.d.f'] │ +└───────────────────────────┘ +``` + +# distinctJSONPathsAndTypes + +[JSON](../../data-types/newjson.md) カラムã«æ ¼ç´ã•ã‚Œã¦ã„ã‚‹ç•°ãªã‚‹ãƒ‘スã¨ãã®åž‹ã®ãƒªã‚¹ãƒˆã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +distinctJSONPathsAndTypes(json) +``` + +**引数** + +- `json` — [JSON](../../data-types/newjson.md) カラム。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ソートã•ã‚ŒãŸãƒ‘スã¨åž‹ã®ãƒžãƒƒãƒ— [Map(String, Array(String))](../../data-types/map.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test_json; +CREATE TABLE test_json(json JSON) ENGINE = Memory; +INSERT INTO test_json VALUES ('{"a" : 42, "b" : "Hello"}'), ('{"b" : [1, 2, 3], "c" : {"d" : {"e" : "2020-01-01"}}}'), ('{"a" : 43, "c" : {"d" : {"f" : [{"g" : 42}]}}}') +``` + +```sql +SELECT distinctJSONPathsAndTypes(json) FROM test_json; +``` + +çµæžœ: + +```reference +┌─distinctJSONPathsAndTypes(json)───────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ {'a':['Int64'],'b':['Array(Nullable(Int64))','String'],'c.d.e':['Date'],'c.d.f':['Array(JSON(max_dynamic_types=16, max_dynamic_paths=256))']} │ +└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +**注æ„** + +JSON 宣言ã«æŒ‡å®šã•ã‚ŒãŸåž‹ã®ãƒ‘スãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã«ã“れらã®ãƒ‘スã®å€¤ãŒå«ã¾ã‚Œã¦ã„ãªãã¦ã‚‚ã€`distinctJSONPaths/distinctJSONPathsAndTypes` 関数ã®çµæžœã«å¸¸ã«å«ã¾ã‚Œã¾ã™ã€‚ + +```sql +DROP TABLE IF EXISTS test_json; +CREATE TABLE test_json(json JSON(a UInt32)) ENGINE = Memory; +INSERT INTO test_json VALUES ('{"b" : "Hello"}'), ('{"b" : "World", "c" : [1, 2, 3]}'); +``` + +```sql +SELECT json FROM test_json; +``` + +```text +┌─json──────────────────────────────────┠+│ {"a":0,"b":"Hello"} │ +│ {"a":0,"b":"World","c":["1","2","3"]} │ +└───────────────────────────────────────┘ +``` + +```sql +SELECT distinctJSONPaths(json) FROM test_json; +``` + +```text +┌─distinctJSONPaths(json)─┠+│ ['a','b','c'] │ +└─────────────────────────┘ +``` + +```sql +SELECT distinctJSONPathsAndTypes(json) FROM test_json; +``` + +```text +┌─distinctJSONPathsAndTypes(json)────────────────────────────────┠+│ {'a':['UInt32'],'b':['String'],'c':['Array(Nullable(Int64))']} │ +└────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/entropy.md b/docs/ja/sql-reference/aggregate-functions/reference/entropy.md new file mode 100644 index 00000000000..8ae164ac1f3 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/entropy.md @@ -0,0 +1,44 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/entropy +sidebar_position: 131 +--- + +# entropy + +カラムã®å€¤ã®[シャノンエントロピー](https://en.wikipedia.org/wiki/Entropy_(information_theory))を計算ã—ã¾ã™ã€‚ + +**構文** + +``` sql +entropy(val) +``` + +**引数** + +- `val` — ä»»æ„ã®åž‹ã®å€¤ã®ã‚«ãƒ©ãƒ ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- シャノンエントロピー。 + +åž‹: [Float64](../../../sql-reference/data-types/float.md)。 + +**例** + +クエリ: + +``` sql +CREATE TABLE entropy (`vals` UInt32,`strings` String) ENGINE = Memory; + +INSERT INTO entropy VALUES (1, 'A'), (1, 'A'), (1, 'A'), (1, 'A'), (2, 'B'), (2, 'B'), (2, 'C'), (2, 'D'); + +SELECT entropy(vals), entropy(strings) FROM entropy; +``` + +çµæžœ: + +``` text +┌─entropy(vals)─┬─entropy(strings)─┠+│ 1 │ 1.75 │ +└───────────────┴──────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md b/docs/ja/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md new file mode 100644 index 00000000000..9969b3c60b9 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md @@ -0,0 +1,205 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/exponentialMovingAverage +sidebar_position: 132 +title: exponentialMovingAverage +--- + +## exponentialMovingAverage + +指定ã•ã‚ŒãŸæ™‚é–“ã®å€¤ã®æŒ‡æ•°ç§»å‹•å¹³å‡ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +exponentialMovingAverage(x)(value, timeunit) +``` + +å„ `value` ã¯ã€æ±ºå®šã•ã‚ŒãŸ `timeunit` ã«å¯¾å¿œã—ã¾ã™ã€‚åŠæ¸›æœŸ `x` ã¯ã€æŒ‡æ•°çš„ãªé‡ã¿ãŒåŠåˆ†ã«æ¸›è¡°ã™ã‚‹æ™‚é–“é…ã‚Œã§ã™ã€‚ã“ã®é–¢æ•°ã¯é‡ã¿ä»˜ã‘ã•ã‚ŒãŸå¹³å‡ã‚’è¿”ã—ã¾ã™ï¼šæ™‚é–“ãŒçµŒã¤ã»ã©ã€å¯¾å¿œã™ã‚‹å€¤ã¯ä½Žã„é‡ã¿ã§è€ƒæ…®ã•ã‚Œã¾ã™ã€‚ + +**引数** + +- `value` — 値。[Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md)ã€ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 +- `timeunit` — 時間å˜ä½ã€‚[Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md)ã€ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。時間å˜ä½ã¯ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—(秒)ã§ã¯ãªãã€æ™‚é–“é–“éš”ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã§ã™ã€‚[intDiv](../../functions/arithmetic-functions.md#intdiva-b)を使用ã—ã¦è¨ˆç®—ã§ãã¾ã™ã€‚ + +**パラメータ** + +- `x` — åŠæ¸›æœŸã€‚[Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md)ã€ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 + +**戻り値** + +- 最新ã®æ™‚点ã§ã®éŽåŽ» `x` 時間ã®[指数平滑移動平å‡](https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average)ã‚’è¿”ã—ã¾ã™ã€‚ + +åž‹: [Float64](../../../sql-reference/data-types/float.md#float32-float64)。 + +**例** + +入力テーブル: + +``` text +┌──temperature─┬─timestamp──┠+│ 95 │ 1 │ +│ 95 │ 2 │ +│ 95 │ 3 │ +│ 96 │ 4 │ +│ 96 │ 5 │ +│ 96 │ 6 │ +│ 96 │ 7 │ +│ 97 │ 8 │ +│ 97 │ 9 │ +│ 97 │ 10 │ +│ 97 │ 11 │ +│ 98 │ 12 │ +│ 98 │ 13 │ +│ 98 │ 14 │ +│ 98 │ 15 │ +│ 99 │ 16 │ +│ 99 │ 17 │ +│ 99 │ 18 │ +│ 100 │ 19 │ +│ 100 │ 20 │ +└──────────────┴────────────┘ +``` + +クエリ: + +```sql +SELECT exponentialMovingAverage(5)(temperature, timestamp); +``` + +çµæžœ: + +``` text +┌──exponentialMovingAverage(5)(temperature, timestamp)──┠+│ 92.25779635374204 │ +└───────────────────────────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT + value, + time, + round(exp_smooth, 3), + bar(exp_smooth, 0, 1, 50) AS bar +FROM +( + SELECT + (number = 0) OR (number >= 25) AS value, + number AS time, + exponentialMovingAverage(10)(value, time) OVER (Rows BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS exp_smooth + FROM numbers(50) +) +``` + +çµæžœ: + +``` text +┌─value─┬─time─┬─round(exp_smooth, 3)─┬─bar────────────────────────────────────────┠+│ 1 │ 0 │ 0.067 │ ███▎ │ +│ 0 │ 1 │ 0.062 │ ███ │ +│ 0 │ 2 │ 0.058 │ ██▊ │ +│ 0 │ 3 │ 0.054 │ ██▋ │ +│ 0 │ 4 │ 0.051 │ ██▌ │ +│ 0 │ 5 │ 0.047 │ ██▎ │ +│ 0 │ 6 │ 0.044 │ ██■│ +│ 0 │ 7 │ 0.041 │ ██ │ +│ 0 │ 8 │ 0.038 │ █▊ │ +│ 0 │ 9 │ 0.036 │ █▋ │ +│ 0 │ 10 │ 0.033 │ █▋ │ +│ 0 │ 11 │ 0.031 │ █▌ │ +│ 0 │ 12 │ 0.029 │ █■│ +│ 0 │ 13 │ 0.027 │ █▎ │ +│ 0 │ 14 │ 0.025 │ █▎ │ +│ 0 │ 15 │ 0.024 │ █■│ +│ 0 │ 16 │ 0.022 │ â–ˆ │ +│ 0 │ 17 │ 0.021 │ â–ˆ │ +│ 0 │ 18 │ 0.019 │ â–Š │ +│ 0 │ 19 │ 0.018 │ â–Š │ +│ 0 │ 20 │ 0.017 │ â–‹ │ +│ 0 │ 21 │ 0.016 │ â–‹ │ +│ 0 │ 22 │ 0.015 │ â–‹ │ +│ 0 │ 23 │ 0.014 │ â–‹ │ +│ 0 │ 24 │ 0.013 │ â–‹ │ +│ 1 │ 25 │ 0.079 │ ███▊ │ +│ 1 │ 26 │ 0.14 │ ███████ │ +│ 1 │ 27 │ 0.198 │ █████████▊ │ +│ 1 │ 28 │ 0.252 │ ████████████▌ │ +│ 1 │ 29 │ 0.302 │ ███████████████ │ +│ 1 │ 30 │ 0.349 │ █████████████████■│ +│ 1 │ 31 │ 0.392 │ ███████████████████▌ │ +│ 1 │ 32 │ 0.433 │ █████████████████████▋ │ +│ 1 │ 33 │ 0.471 │ ███████████████████████▌ │ +│ 1 │ 34 │ 0.506 │ █████████████████████████▎ │ +│ 1 │ 35 │ 0.539 │ ██████████████████████████▊ │ +│ 1 │ 36 │ 0.57 │ ████████████████████████████▌ │ +│ 1 │ 37 │ 0.599 │ █████████████████████████████▊ │ +│ 1 │ 38 │ 0.626 │ ███████████████████████████████▎ │ +│ 1 │ 39 │ 0.651 │ ████████████████████████████████▌ │ +│ 1 │ 40 │ 0.674 │ █████████████████████████████████▋ │ +│ 1 │ 41 │ 0.696 │ ██████████████████████████████████▋ │ +│ 1 │ 42 │ 0.716 │ ███████████████████████████████████▋ │ +│ 1 │ 43 │ 0.735 │ ████████████████████████████████████▋ │ +│ 1 │ 44 │ 0.753 │ █████████████████████████████████████▋ │ +│ 1 │ 45 │ 0.77 │ ██████████████████████████████████████■│ +│ 1 │ 46 │ 0.785 │ ███████████████████████████████████████▎ │ +│ 1 │ 47 │ 0.8 │ ███████████████████████████████████████▊ │ +│ 1 │ 48 │ 0.813 │ ████████████████████████████████████████▋ │ +│ 1 │ 49 │ 0.825 │ █████████████████████████████████████████▎ │ +└───────┴──────┴──────────────────────┴────────────────────────────────────────────┘ +``` + +```sql +CREATE TABLE data +ENGINE = Memory AS +SELECT + 10 AS value, + toDateTime('2020-01-01') + (3600 * number) AS time +FROM numbers_mt(10); + + +-- intDivを使用ã—ã¦timeunitを計算 +SELECT + value, + time, + exponentialMovingAverage(1)(value, intDiv(toUInt32(time), 3600)) OVER (ORDER BY time ASC) AS res, + intDiv(toUInt32(time), 3600) AS timeunit +FROM data +ORDER BY time ASC; + +┌─value─┬────────────────time─┬─────────res─┬─timeunit─┠+│ 10 │ 2020-01-01 00:00:00 │ 5 │ 438288 │ +│ 10 │ 2020-01-01 01:00:00 │ 7.5 │ 438289 │ +│ 10 │ 2020-01-01 02:00:00 │ 8.75 │ 438290 │ +│ 10 │ 2020-01-01 03:00:00 │ 9.375 │ 438291 │ +│ 10 │ 2020-01-01 04:00:00 │ 9.6875 │ 438292 │ +│ 10 │ 2020-01-01 05:00:00 │ 9.84375 │ 438293 │ +│ 10 │ 2020-01-01 06:00:00 │ 9.921875 │ 438294 │ +│ 10 │ 2020-01-01 07:00:00 │ 9.9609375 │ 438295 │ +│ 10 │ 2020-01-01 08:00:00 │ 9.98046875 │ 438296 │ +│ 10 │ 2020-01-01 09:00:00 │ 9.990234375 │ 438297 │ +└───────┴─────────────────────┴─────────────┴──────────┘ + + +-- toRelativeHourNumを使用ã—ã¦timeunitを計算 +SELECT + value, + time, + exponentialMovingAverage(1)(value, toRelativeHourNum(time)) OVER (ORDER BY time ASC) AS res, + toRelativeHourNum(time) AS timeunit +FROM data +ORDER BY time ASC; + +┌─value─┬────────────────time─┬─────────res─┬─timeunit─┠+│ 10 │ 2020-01-01 00:00:00 │ 5 │ 438288 │ +│ 10 │ 2020-01-01 01:00:00 │ 7.5 │ 438289 │ +│ 10 │ 2020-01-01 02:00:00 │ 8.75 │ 438290 │ +│ 10 │ 2020-01-01 03:00:00 │ 9.375 │ 438291 │ +│ 10 │ 2020-01-01 04:00:00 │ 9.6875 │ 438292 │ +│ 10 │ 2020-01-01 05:00:00 │ 9.84375 │ 438293 │ +│ 10 │ 2020-01-01 06:00:00 │ 9.921875 │ 438294 │ +│ 10 │ 2020-01-01 07:00:00 │ 9.9609375 │ 438295 │ +│ 10 │ 2020-01-01 08:00:00 │ 9.98046875 │ 438296 │ +│ 10 │ 2020-01-01 09:00:00 │ 9.990234375 │ 438297 │ +└───────┴─────────────────────┴─────────────┴──────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedavg.md b/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedavg.md new file mode 100644 index 00000000000..5477418f863 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedavg.md @@ -0,0 +1,105 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/exponentialTimeDecayedAvg +sidebar_position: 133 +title: exponentialTimeDecayedAvg +--- + +## exponentialTimeDecayedAvg + +時点 `t` ã§ã®æ™‚系列データã®æŒ‡æ•°å¹³æ»‘加é‡ç§»å‹•å¹³å‡ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +exponentialTimeDecayedAvg(x)(v, t) +``` + +**引数** + +- `v` — 値。 [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 +- `t` — 時間。 [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md), [DateTime](../../data-types/datetime.md), [DateTime64](../../data-types/datetime64.md)。 + +**パラメータ** + +- `x` — åŠæ¸›æœŸã€‚ [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 + +**戻り値** + +- 時点 `t` ã«ãŠã‘る指数平滑加é‡ç§»å‹•å¹³å‡ã‚’è¿”ã—ã¾ã™ã€‚ [Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT + value, + time, + round(exp_smooth, 3), + bar(exp_smooth, 0, 5, 50) AS bar +FROM + ( + SELECT + (number = 0) OR (number >= 25) AS value, + number AS time, + exponentialTimeDecayedAvg(10)(value, time) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS exp_smooth + FROM numbers(50) + ); +``` + +応答: + +```sql + ┌─value─┬─time─┬─round(exp_smooth, 3)─┬─bar────────┠+1. │ 1 │ 0 │ 1 │ ██████████ │ +2. │ 0 │ 1 │ 0.475 │ ████▊ │ +3. │ 0 │ 2 │ 0.301 │ ███ │ +4. │ 0 │ 3 │ 0.214 │ ██■│ +5. │ 0 │ 4 │ 0.162 │ █▌ │ +6. │ 0 │ 5 │ 0.128 │ █▎ │ +7. │ 0 │ 6 │ 0.104 │ â–ˆ │ +8. │ 0 │ 7 │ 0.086 │ â–Š │ +9. │ 0 │ 8 │ 0.072 │ â–‹ │ +0. │ 0 │ 9 │ 0.061 │ â–Œ │ +1. │ 0 │ 10 │ 0.052 │ â–Œ │ +2. │ 0 │ 11 │ 0.045 │ ■│ +3. │ 0 │ 12 │ 0.039 │ ■│ +4. │ 0 │ 13 │ 0.034 │ â–Ž │ +5. │ 0 │ 14 │ 0.03 │ â–Ž │ +6. │ 0 │ 15 │ 0.027 │ â–Ž │ +7. │ 0 │ 16 │ 0.024 │ ■│ +8. │ 0 │ 17 │ 0.021 │ ■│ +9. │ 0 │ 18 │ 0.018 │ ■│ +0. │ 0 │ 19 │ 0.016 │ ■│ +1. │ 0 │ 20 │ 0.015 │ ■│ +2. │ 0 │ 21 │ 0.013 │ ■│ +3. │ 0 │ 22 │ 0.012 │ │ +4. │ 0 │ 23 │ 0.01 │ │ +5. │ 0 │ 24 │ 0.009 │ │ +6. │ 1 │ 25 │ 0.111 │ â–ˆ │ +7. │ 1 │ 26 │ 0.202 │ ██ │ +8. │ 1 │ 27 │ 0.283 │ ██▊ │ +9. │ 1 │ 28 │ 0.355 │ ███▌ │ +0. │ 1 │ 29 │ 0.42 │ ████■│ +1. │ 1 │ 30 │ 0.477 │ ████▊ │ +2. │ 1 │ 31 │ 0.529 │ █████▎ │ +3. │ 1 │ 32 │ 0.576 │ █████▊ │ +4. │ 1 │ 33 │ 0.618 │ ██████■│ +5. │ 1 │ 34 │ 0.655 │ ██████▌ │ +6. │ 1 │ 35 │ 0.689 │ ██████▉ │ +7. │ 1 │ 36 │ 0.719 │ ███████■│ +8. │ 1 │ 37 │ 0.747 │ ███████■│ +9. │ 1 │ 38 │ 0.771 │ ███████▋ │ +0. │ 1 │ 39 │ 0.793 │ ███████▉ │ +1. │ 1 │ 40 │ 0.813 │ ████████■│ +2. │ 1 │ 41 │ 0.831 │ ████████▎ │ +3. │ 1 │ 42 │ 0.848 │ ████████■│ +4. │ 1 │ 43 │ 0.862 │ ████████▌ │ +5. │ 1 │ 44 │ 0.876 │ ████████▊ │ +6. │ 1 │ 45 │ 0.888 │ ████████▉ │ +7. │ 1 │ 46 │ 0.898 │ ████████▉ │ +8. │ 1 │ 47 │ 0.908 │ █████████ │ +9. │ 1 │ 48 │ 0.917 │ █████████■│ +0. │ 1 │ 49 │ 0.925 │ █████████■│ + └───────┴──────┴──────────────────────┴────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedcount.md b/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedcount.md new file mode 100644 index 00000000000..d57a4fdd9f4 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedcount.md @@ -0,0 +1,104 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/exponentialTimeDecayedCount +sidebar_position: 134 +title: exponentialTimeDecayedCount +--- + +## exponentialTimeDecayedCount + +時系列ã«ãŠã„ã¦ã€æ™‚刻ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `t` ã§ã®ç´¯ç©æŒ‡æ•°æ¸›è¡°ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +exponentialTimeDecayedCount(x)(t) +``` + +**引数** + +- `t` — 時間。 [Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)ã€[DateTime](../../data-types/datetime.md)ã€[DateTime64](../../data-types/datetime64.md)。 + +**パラメーター** + +- `x` — åŠæ¸›æœŸã€‚[Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ™‚刻ã«ãŠã‘ã‚‹ç´¯ç©æŒ‡æ•°æ¸›è¡°ã‚’è¿”ã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT + value, + time, + round(exp_smooth, 3), + bar(exp_smooth, 0, 20, 50) AS bar +FROM +( + SELECT + (number % 5) = 0 AS value, + number AS time, + exponentialTimeDecayedCount(10)(time) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS exp_smooth + FROM numbers(50) +); +``` + +çµæžœ: + +```response + ┌─value─┬─time─┬─round(exp_smooth, 3)─┬─bar────────────────────────┠+ 1. │ 1 │ 0 │ 1 │ ██▌ │ + 2. │ 0 │ 1 │ 1.905 │ ████▊ │ + 3. │ 0 │ 2 │ 2.724 │ ██████▊ │ + 4. │ 0 │ 3 │ 3.464 │ ████████▋ │ + 5. │ 0 │ 4 │ 4.135 │ ██████████▎ │ + 6. │ 1 │ 5 │ 4.741 │ ███████████▊ │ + 7. │ 0 │ 6 │ 5.29 │ █████████████■│ + 8. │ 0 │ 7 │ 5.787 │ ██████████████■│ + 9. │ 0 │ 8 │ 6.236 │ ███████████████▌ │ +10. │ 0 │ 9 │ 6.643 │ ████████████████▌ │ +11. │ 1 │ 10 │ 7.01 │ █████████████████▌ │ +12. │ 0 │ 11 │ 7.343 │ ██████████████████▎ │ +13. │ 0 │ 12 │ 7.644 │ ███████████████████ │ +14. │ 0 │ 13 │ 7.917 │ ███████████████████▊ │ +15. │ 0 │ 14 │ 8.164 │ ████████████████████■│ +16. │ 1 │ 15 │ 8.387 │ ████████████████████▉ │ +17. │ 0 │ 16 │ 8.589 │ █████████████████████■│ +18. │ 0 │ 17 │ 8.771 │ █████████████████████▉ │ +19. │ 0 │ 18 │ 8.937 │ ██████████████████████▎ │ +20. │ 0 │ 19 │ 9.086 │ ██████████████████████▋ │ +21. │ 1 │ 20 │ 9.222 │ ███████████████████████ │ +22. │ 0 │ 21 │ 9.344 │ ███████████████████████▎ │ +23. │ 0 │ 22 │ 9.455 │ ███████████████████████▋ │ +24. │ 0 │ 23 │ 9.555 │ ███████████████████████▉ │ +25. │ 0 │ 24 │ 9.646 │ ████████████████████████ │ +26. │ 1 │ 25 │ 9.728 │ ████████████████████████▎ │ +27. │ 0 │ 26 │ 9.802 │ ████████████████████████▌ │ +28. │ 0 │ 27 │ 9.869 │ ████████████████████████▋ │ +29. │ 0 │ 28 │ 9.93 │ ████████████████████████▊ │ +30. │ 0 │ 29 │ 9.985 │ ████████████████████████▉ │ +31. │ 1 │ 30 │ 10.035 │ █████████████████████████ │ +32. │ 0 │ 31 │ 10.08 │ █████████████████████████■│ +33. │ 0 │ 32 │ 10.121 │ █████████████████████████▎ │ +34. │ 0 │ 33 │ 10.158 │ █████████████████████████■│ +35. │ 0 │ 34 │ 10.191 │ █████████████████████████■│ +36. │ 1 │ 35 │ 10.221 │ █████████████████████████▌ │ +37. │ 0 │ 36 │ 10.249 │ █████████████████████████▌ │ +38. │ 0 │ 37 │ 10.273 │ █████████████████████████▋ │ +39. │ 0 │ 38 │ 10.296 │ █████████████████████████▋ │ +40. │ 0 │ 39 │ 10.316 │ █████████████████████████▊ │ +41. │ 1 │ 40 │ 10.334 │ █████████████████████████▊ │ +42. │ 0 │ 41 │ 10.351 │ █████████████████████████▉ │ +43. │ 0 │ 42 │ 10.366 │ █████████████████████████▉ │ +44. │ 0 │ 43 │ 10.379 │ █████████████████████████▉ │ +45. │ 0 │ 44 │ 10.392 │ █████████████████████████▉ │ +46. │ 1 │ 45 │ 10.403 │ ██████████████████████████ │ +47. │ 0 │ 46 │ 10.413 │ ██████████████████████████ │ +48. │ 0 │ 47 │ 10.422 │ ██████████████████████████ │ +49. │ 0 │ 48 │ 10.43 │ ██████████████████████████ │ +50. │ 0 │ 49 │ 10.438 │ ██████████████████████████ │ + └───────┴──────┴──────────────────────┴────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedmax.md b/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedmax.md new file mode 100644 index 00000000000..382a173fc77 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedmax.md @@ -0,0 +1,105 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/exponentialTimeDecayedMax +sidebar_position: 135 +title: exponentialTimeDecayedMax +--- + +## exponentialTimeDecayedMax + +時間ã«ãŠã‘る指数平滑移動平å‡ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `t` ã¨ãã®å‰ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `t-1` ã§æœ€å¤§å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +exponentialTimeDecayedMax(x)(value, timeunit) +``` + +**引数** + +- `value` — 値。 [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 +- `timeunit` — 時間å˜ä½ã€‚ [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)ã€[DateTime](../../data-types/datetime.md)ã€[DateTime64](../../data-types/datetime64.md)。 + +**パラメータ** + +- `x` — åŠæ¸›æœŸã€‚[Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指数平滑加é‡ç§»å‹•å¹³å‡ã® `t` 㨠`t-1` ã§ã®æœ€å¤§å€¤ã‚’è¿”ã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT + value, + time, + round(exp_smooth, 3), + bar(exp_smooth, 0, 5, 50) AS bar +FROM + ( + SELECT + (number = 0) OR (number >= 25) AS value, + number AS time, + exponentialTimeDecayedMax(10)(value, time) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS exp_smooth + FROM numbers(50) + ); +``` + +çµæžœ: + +```response + ┌─value─┬─time─┬─round(exp_smooth, 3)─┬─bar────────┠+ 1. │ 1 │ 0 │ 1 │ ██████████ │ + 2. │ 0 │ 1 │ 0.905 │ █████████ │ + 3. │ 0 │ 2 │ 0.819 │ ████████■│ + 4. │ 0 │ 3 │ 0.741 │ ███████■│ + 5. │ 0 │ 4 │ 0.67 │ ██████▋ │ + 6. │ 0 │ 5 │ 0.607 │ ██████ │ + 7. │ 0 │ 6 │ 0.549 │ █████■│ + 8. │ 0 │ 7 │ 0.497 │ ████▉ │ + 9. │ 0 │ 8 │ 0.449 │ ████■│ +10. │ 0 │ 9 │ 0.407 │ ████ │ +11. │ 0 │ 10 │ 0.368 │ ███▋ │ +12. │ 0 │ 11 │ 0.333 │ ███▎ │ +13. │ 0 │ 12 │ 0.301 │ ███ │ +14. │ 0 │ 13 │ 0.273 │ ██▋ │ +15. │ 0 │ 14 │ 0.247 │ ██■│ +16. │ 0 │ 15 │ 0.223 │ ██■│ +17. │ 0 │ 16 │ 0.202 │ ██ │ +18. │ 0 │ 17 │ 0.183 │ █▊ │ +19. │ 0 │ 18 │ 0.165 │ █▋ │ +20. │ 0 │ 19 │ 0.15 │ █■│ +21. │ 0 │ 20 │ 0.135 │ █▎ │ +22. │ 0 │ 21 │ 0.122 │ █■│ +23. │ 0 │ 22 │ 0.111 │ â–ˆ │ +24. │ 0 │ 23 │ 0.1 │ â–ˆ │ +25. │ 0 │ 24 │ 0.091 │ â–‰ │ +26. │ 1 │ 25 │ 1 │ ██████████ │ +27. │ 1 │ 26 │ 1 │ ██████████ │ +28. │ 1 │ 27 │ 1 │ ██████████ │ +29. │ 1 │ 28 │ 1 │ ██████████ │ +30. │ 1 │ 29 │ 1 │ ██████████ │ +31. │ 1 │ 30 │ 1 │ ██████████ │ +32. │ 1 │ 31 │ 1 │ ██████████ │ +33. │ 1 │ 32 │ 1 │ ██████████ │ +34. │ 1 │ 33 │ 1 │ ██████████ │ +35. │ 1 │ 34 │ 1 │ ██████████ │ +36. │ 1 │ 35 │ 1 │ ██████████ │ +37. │ 1 │ 36 │ 1 │ ██████████ │ +38. │ 1 │ 37 │ 1 │ ██████████ │ +39. │ 1 │ 38 │ 1 │ ██████████ │ +40. │ 1 │ 39 │ 1 │ ██████████ │ +41. │ 1 │ 40 │ 1 │ ██████████ │ +42. │ 1 │ 41 │ 1 │ ██████████ │ +43. │ 1 │ 42 │ 1 │ ██████████ │ +44. │ 1 │ 43 │ 1 │ ██████████ │ +45. │ 1 │ 44 │ 1 │ ██████████ │ +46. │ 1 │ 45 │ 1 │ ██████████ │ +47. │ 1 │ 46 │ 1 │ ██████████ │ +48. │ 1 │ 47 │ 1 │ ██████████ │ +49. │ 1 │ 48 │ 1 │ ██████████ │ +50. │ 1 │ 49 │ 1 │ ██████████ │ + └───────┴──────┴──────────────────────┴────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedsum.md b/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedsum.md new file mode 100644 index 00000000000..a001f630bb8 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/exponentialtimedecayedsum.md @@ -0,0 +1,105 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/exponentialTimeDecayedSum +sidebar_position: 136 +title: exponentialTimeDecayedSum +--- + +## exponentialTimeDecayedSum + +時系列ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `t` ã«ãŠã‘る指数平滑移動平å‡å€¤ã®åˆè¨ˆã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +exponentialTimeDecayedSum(x)(v, t) +``` + +**引数** + +- `v` — 値。 [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 +- `t` — 時間。 [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md), [DateTime](../../data-types/datetime.md), [DateTime64](../../data-types/datetime64.md)。 + +**パラメータ** + +- `x` — åŠæ¸›æœŸã€‚ [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 + +**戻り値** + +- 指定ã•ã‚ŒãŸæ™‚間点ã«ãŠã‘る指数平滑移動平å‡å€¤ã®åˆè¨ˆã‚’è¿”ã—ã¾ã™ã€‚ [Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT + value, + time, + round(exp_smooth, 3), + bar(exp_smooth, 0, 10, 50) AS bar +FROM + ( + SELECT + (number = 0) OR (number >= 25) AS value, + number AS time, + exponentialTimeDecayedSum(10)(value, time) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS exp_smooth + FROM numbers(50) + ); +``` + +çµæžœ: + +```response + ┌─value─┬─time─┬─round(exp_smooth, 3)─┬─bar───────────────────────────────────────────────┠+ 1. │ 1 │ 0 │ 1 │ █████ │ + 2. │ 0 │ 1 │ 0.905 │ ████▌ │ + 3. │ 0 │ 2 │ 0.819 │ ████ │ + 4. │ 0 │ 3 │ 0.741 │ ███▋ │ + 5. │ 0 │ 4 │ 0.67 │ ███▎ │ + 6. │ 0 │ 5 │ 0.607 │ ███ │ + 7. │ 0 │ 6 │ 0.549 │ ██▋ │ + 8. │ 0 │ 7 │ 0.497 │ ██■│ + 9. │ 0 │ 8 │ 0.449 │ ██■│ +10. │ 0 │ 9 │ 0.407 │ ██ │ +11. │ 0 │ 10 │ 0.368 │ █▊ │ +12. │ 0 │ 11 │ 0.333 │ █▋ │ +13. │ 0 │ 12 │ 0.301 │ █▌ │ +14. │ 0 │ 13 │ 0.273 │ █▎ │ +15. │ 0 │ 14 │ 0.247 │ █■│ +16. │ 0 │ 15 │ 0.223 │ â–ˆ │ +17. │ 0 │ 16 │ 0.202 │ â–ˆ │ +18. │ 0 │ 17 │ 0.183 │ â–‰ │ +19. │ 0 │ 18 │ 0.165 │ â–Š │ +20. │ 0 │ 19 │ 0.15 │ â–‹ │ +21. │ 0 │ 20 │ 0.135 │ â–‹ │ +22. │ 0 │ 21 │ 0.122 │ â–Œ │ +23. │ 0 │ 22 │ 0.111 │ â–Œ │ +24. │ 0 │ 23 │ 0.1 │ â–Œ │ +25. │ 0 │ 24 │ 0.091 │ ■│ +26. │ 1 │ 25 │ 1.082 │ █████■│ +27. │ 1 │ 26 │ 1.979 │ █████████▉ │ +28. │ 1 │ 27 │ 2.791 │ █████████████▉ │ +29. │ 1 │ 28 │ 3.525 │ █████████████████▋ │ +30. │ 1 │ 29 │ 4.19 │ ████████████████████▉ │ +31. │ 1 │ 30 │ 4.791 │ ███████████████████████▉ │ +32. │ 1 │ 31 │ 5.335 │ ██████████████████████████▋ │ +33. │ 1 │ 32 │ 5.827 │ █████████████████████████████■│ +34. │ 1 │ 33 │ 6.273 │ ███████████████████████████████▎ │ +35. │ 1 │ 34 │ 6.676 │ █████████████████████████████████■│ +36. │ 1 │ 35 │ 7.041 │ ███████████████████████████████████■│ +37. │ 1 │ 36 │ 7.371 │ ████████████████████████████████████▊ │ +38. │ 1 │ 37 │ 7.669 │ ██████████████████████████████████████▎ │ +39. │ 1 │ 38 │ 7.939 │ ███████████████████████████████████████▋ │ +40. │ 1 │ 39 │ 8.184 │ ████████████████████████████████████████▉ │ +41. │ 1 │ 40 │ 8.405 │ ██████████████████████████████████████████ │ +42. │ 1 │ 41 │ 8.605 │ ███████████████████████████████████████████ │ +43. │ 1 │ 42 │ 8.786 │ ███████████████████████████████████████████▉ │ +44. │ 1 │ 43 │ 8.95 │ ████████████████████████████████████████████▊ │ +45. │ 1 │ 44 │ 9.098 │ █████████████████████████████████████████████■│ +46. │ 1 │ 45 │ 9.233 │ ██████████████████████████████████████████████■│ +47. │ 1 │ 46 │ 9.354 │ ██████████████████████████████████████████████▊ │ +48. │ 1 │ 47 │ 9.464 │ ███████████████████████████████████████████████▎ │ +49. │ 1 │ 48 │ 9.563 │ ███████████████████████████████████████████████▊ │ +50. │ 1 │ 49 │ 9.653 │ ████████████████████████████████████████████████▎ │ + └───────┴──────┴──────────────────────┴───────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/first_value.md b/docs/ja/sql-reference/aggregate-functions/reference/first_value.md new file mode 100644 index 00000000000..f39d4939258 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/first_value.md @@ -0,0 +1,81 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/first_value +sidebar_position: 137 +--- + +# first_value + +ã“ã‚Œã¯ã€[`any`](../../../sql-reference/aggregate-functions/reference/any.md)ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã™ãŒã€[ウィンドウ関数](../../window-functions/index.md)ã¨ã®äº’æ›æ€§ã®ãŸã‚ã«å°Žå…¥ã•ã‚Œã¾ã—ãŸã€‚ã“ã“ã§ã¯ã€`NULL`値を処ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ã€ã™ã¹ã¦ã®ClickHouse集計関数ã¯NULL値を無視ã—ã¾ã™ï¼‰ã€‚ + +ウィンドウ関数ãŠã‚ˆã³é€šå¸¸ã®é›†è¨ˆã®ä¸¡æ–¹ã§NULLã‚’å°Šé‡ã™ã‚‹ä¿®é£¾å­ï¼ˆ`RESPECT NULLS`)を宣言ã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +`any`ã¨åŒæ§˜ã«ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ãªã—ã§ã¯ã‚½ãƒ¼ã‚¹ã‚¹ãƒˆãƒªãƒ¼ãƒ ãŒæ³¨æ–‡ã•ã‚Œã¦ã„ãªã„å ´åˆã€çµæžœã¯ãƒ©ãƒ³ãƒ€ãƒ ã«ãªã‚Šã€æˆ»ã‚Šã®åž‹ã¯å…¥åŠ›ã®åž‹ã¨ä¸€è‡´ã—ã¾ã™ï¼ˆå…¥åŠ›ãŒNullableã¾ãŸã¯-OrNullコンビãƒãƒ¼ã‚¿ãŒè¿½åŠ ã•ã‚Œã¦ã„ã‚‹å ´åˆã®ã¿NullãŒè¿”ã•ã‚Œã¾ã™ï¼‰ã€‚ + +## 例 + +```sql +CREATE TABLE test_data +( + a Int64, + b Nullable(Int64) +) +ENGINE = Memory; + +INSERT INTO test_data (a, b) Values (1,null), (2,3), (4, 5), (6,null); +``` + +### 例1 +デフォルトã§ã¯ã€NULL値ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +```sql +select first_value(b) from test_data; +``` + +```text +┌─any(b)─┠+│ 3 │ +└────────┘ +``` + +### 例2 +NULL値ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +```sql +select first_value(b) ignore nulls from test_data +``` + +```text +┌─any(b) IGNORE NULLS ─┠+│ 3 │ +└──────────────────────┘ +``` + +### 例3 +NULL値ãŒå—ã‘入れられã¾ã™ã€‚ +```sql +select first_value(b) respect nulls from test_data +``` + +```text +┌─any(b) RESPECT NULLS ─┠+│ á´ºáµá´¸á´¸ │ +└───────────────────────┘ +``` + +### 例4 +`ORDER BY`を使用ã—ãŸã‚µãƒ–クエリã§å®‰å®šã—ãŸçµæžœã€‚ +```sql +SELECT + first_value_respect_nulls(b), + first_value(b) +FROM +( + SELECT * + FROM test_data + ORDER BY a ASC +) +``` + +```text +┌─any_respect_nulls(b)─┬─any(b)─┠+│ á´ºáµá´¸á´¸ │ 3 │ +└──────────────────────┴────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/flame_graph.md b/docs/ja/sql-reference/aggregate-functions/reference/flame_graph.md new file mode 100644 index 00000000000..9ce36f607b4 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/flame_graph.md @@ -0,0 +1,94 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/flame_graph +sidebar_position: 138 +--- + +# flameGraph + +スタックトレースã®ãƒªã‚¹ãƒˆã‚’使用ã—ã¦[フレームグラフ](https://www.brendangregg.com/flamegraphs.html)を構築ã™ã‚‹é›†ç´„関数ã§ã™ã€‚フレームグラフã®SVGを生æˆã™ã‚‹ãŸã‚ã«[flamegraph.pl ユーティリティ](https://github.com/brendangregg/FlameGraph)ã§ä½¿ç”¨ã§ãる文字列ã®é…列を出力ã—ã¾ã™ã€‚ + +## 構文 + +```sql +flameGraph(traces, [size], [ptr]) +``` + +## パラメータ + +- `traces` — スタックトレース。[Array](../../data-types/array.md)([UInt64](../../data-types/int-uint.md))。 +- `size` — メモリプロファイリングã®ãŸã‚ã®å‰²ã‚Šå½“ã¦ã‚µã‚¤ã‚ºã€‚(オプション - デフォルトã¯`1`)[UInt64](../../data-types/int-uint.md)。 +- `ptr` — 割り当ã¦ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚(オプション - デフォルトã¯`0`)[UInt64](../../data-types/int-uint.md)。 + +:::note +`ptr != 0`ã®å ´åˆã€flameGraphã¯åŒã˜ã‚µã‚¤ã‚ºã¨ptrã§ã®å‰²ã‚Šå½“ã¦ï¼ˆsize > 0)ãŠã‚ˆã³è§£æ”¾ï¼ˆsize < 0)をマッピングã—ã¾ã™ã€‚解放ã•ã‚Œã¦ã„ãªã„割り当ã¦ã®ã¿ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚マッピングã•ã‚Œã¦ã„ãªã„解放ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +::: + +## 戻り値 + +- [flamegraph.pl ユーティリティ](https://github.com/brendangregg/FlameGraph)ã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã®æ–‡å­—列ã®é…列。[Array](../../data-types/array.md)([String](../../data-types/string.md))。 + +## 使用例 + +### CPUクエリプロファイラã«åŸºã¥ã„ãŸãƒ•ãƒ¬ãƒ¼ãƒ ã‚°ãƒ©ãƒ•ã®æ§‹ç¯‰ + +```sql +SET query_profiler_cpu_time_period_ns=10000000; +SELECT SearchPhrase, COUNT(DISTINCT UserID) AS u FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY u DESC LIMIT 10; +``` + +```text +clickhouse client --allow_introspection_functions=1 -q "select arrayJoin(flameGraph(arrayReverse(trace))) from system.trace_log where trace_type = 'CPU' and query_id = 'xxx'" | ~/dev/FlameGraph/flamegraph.pl > flame_cpu.svg +``` + +### メモリクエリプロファイラã«åŸºã¥ãã€ã™ã¹ã¦ã®å‰²ã‚Šå½“ã¦ã‚’表示ã™ã‚‹ãƒ•ãƒ¬ãƒ¼ãƒ ã‚°ãƒ©ãƒ•ã®æ§‹ç¯‰ + +```sql +SET memory_profiler_sample_probability=1, max_untracked_memory=1; +SELECT SearchPhrase, COUNT(DISTINCT UserID) AS u FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY u DESC LIMIT 10; +``` + +```text +clickhouse client --allow_introspection_functions=1 -q "select arrayJoin(flameGraph(trace, size)) from system.trace_log where trace_type = 'MemorySample' and query_id = 'xxx'" | ~/dev/FlameGraph/flamegraph.pl --countname=bytes --color=mem > flame_mem.svg +``` + +### クエリコンテキストã§è§£æ”¾ã•ã‚Œã¦ã„ãªã„割り当ã¦ã‚’示ã™ãƒ¡ãƒ¢ãƒªã‚¯ã‚¨ãƒªãƒ—ロファイラã«åŸºã¥ã„ãŸãƒ•ãƒ¬ãƒ¼ãƒ ã‚°ãƒ©ãƒ•ã®æ§‹ç¯‰ + +```sql +SET memory_profiler_sample_probability=1, max_untracked_memory=1, use_uncompressed_cache=1, merge_tree_max_rows_to_use_cache=100000000000, merge_tree_max_bytes_to_use_cache=1000000000000; +SELECT SearchPhrase, COUNT(DISTINCT UserID) AS u FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY u DESC LIMIT 10; +``` + +```text +clickhouse client --allow_introspection_functions=1 -q "SELECT arrayJoin(flameGraph(trace, size, ptr)) FROM system.trace_log WHERE trace_type = 'MemorySample' AND query_id = 'xxx'" | ~/dev/FlameGraph/flamegraph.pl --countname=bytes --color=mem > flame_mem_untracked.svg +``` + +### 一定時点ã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–割り当ã¦ã‚’表示ã™ã‚‹ãƒ¡ãƒ¢ãƒªã‚¯ã‚¨ãƒªãƒ—ロファイラã«åŸºã¥ã„ãŸãƒ•ãƒ¬ãƒ¼ãƒ ã‚°ãƒ©ãƒ•ã®æ§‹ç¯‰ + +```sql +SET memory_profiler_sample_probability=1, max_untracked_memory=1; +SELECT SearchPhrase, COUNT(DISTINCT UserID) AS u FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY u DESC LIMIT 10; +``` + +- 1 - 秒å˜ä½ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ + +```sql +SELECT event_time, m, formatReadableSize(max(s) as m) FROM (SELECT event_time, sum(size) OVER (ORDER BY event_time) AS s FROM system.trace_log WHERE query_id = 'xxx' AND trace_type = 'MemorySample') GROUP BY event_time ORDER BY event_time; +``` + +- 2 - 最大メモリ使用é‡ã®æ™‚点を見ã¤ã‘ã‚‹ + +```sql +SELECT argMax(event_time, s), max(s) FROM (SELECT event_time, sum(size) OVER (ORDER BY event_time) AS s FROM system.trace_log WHERE query_id = 'xxx' AND trace_type = 'MemorySample'); +``` + +- 3 - 一定時点ã§ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªå‰²ã‚Šå½“ã¦ã‚’固定ã™ã‚‹ + +```text +clickhouse client --allow_introspection_functions=1 -q "SELECT arrayJoin(flameGraph(trace, size, ptr)) FROM (SELECT * FROM system.trace_log WHERE trace_type = 'MemorySample' AND query_id = 'xxx' AND event_time <= 'yyy' ORDER BY event_time)" | ~/dev/FlameGraph/flamegraph.pl --countname=bytes --color=mem > flame_mem_time_point_pos.svg +``` + +- 4 - 一定時点ã§ã®è§£æ”¾ã‚’見ã¤ã‘ã‚‹ + +```text +clickhouse client --allow_introspection_functions=1 -q "SELECT arrayJoin(flameGraph(trace, -size, ptr)) FROM (SELECT * FROM system.trace_log WHERE trace_type = 'MemorySample' AND query_id = 'xxx' AND event_time > 'yyy' ORDER BY event_time desc)" | ~/dev/FlameGraph/flamegraph.pl --countname=bytes --color=mem > flame_mem_time_point_neg.svg +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparray.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparray.md new file mode 100644 index 00000000000..e058b348071 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparray.md @@ -0,0 +1,47 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/grouparray +sidebar_position: 139 +--- + +# groupArray + +構文: `groupArray(x)` ã¾ãŸã¯ `groupArray(max_size)(x)` + +引数ã®å€¤ã®é…列を作æˆã—ã¾ã™ã€‚値ã¯ä»»æ„ã®ï¼ˆä¸ç¢ºå®šãªï¼‰é †åºã§é…列ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +第2ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆ`max_size`パラメータを使用)ã§ã¯ã€çµæžœã®é…列ã®ã‚µã‚¤ã‚ºã‚’`max_size`è¦ç´ ã«åˆ¶é™ã—ã¾ã™ã€‚例ãˆã°ã€`groupArray(1)(x)`ã¯`[any (x)]`ã¨åŒç­‰ã§ã™ã€‚ + +å ´åˆã«ã‚ˆã£ã¦ã¯ã€å®Ÿè¡Œé †åºã«ä¾å­˜ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã“ã‚Œã¯ã€ã‚µãƒ–クエリçµæžœãŒå分ã«å°ã•ã„å ´åˆã€`ORDER BY`を使用ã™ã‚‹ã‚µãƒ–クエリã‹ã‚‰`SELECT`ãŒæ¥ã‚‹å ´åˆã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +``` text +SELECT * FROM default.ck; + +┌─id─┬─name─────┠+│ 1 │ zhangsan │ +│ 1 │ á´ºáµá´¸á´¸ │ +│ 1 │ lisi │ +│ 2 │ wangwu │ +└────┴──────────┘ + +``` + +クエリ: + +``` sql +select id, groupArray(10)(name) from default.ck group by id; +``` + +çµæžœ: + +``` text +┌─id─┬─groupArray(10)(name)─┠+│ 1 │ ['zhangsan','lisi'] │ +│ 2 │ ['wangwu'] │ +└────┴──────────────────────┘ +``` + +groupArray関数ã¯ã€ä¸Šè¨˜ã®çµæžœã«åŸºã¥ã„ã¦á´ºáµá´¸á´¸å€¤ã‚’削除ã—ã¾ã™ã€‚ + +- エイリアス: `array_agg`. diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparrayinsertat.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparrayinsertat.md new file mode 100644 index 00000000000..ebb96abbddd --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparrayinsertat.md @@ -0,0 +1,92 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/grouparrayinsertat +sidebar_position: 140 +--- + +# groupArrayInsertAt + +指定ã•ã‚ŒãŸä½ç½®ã«å€¤ã‚’é…列ã«æŒ¿å…¥ã—ã¾ã™ã€‚ + +**構文** + +``` sql +groupArrayInsertAt(default_x, size)(x, pos) +``` + +1ã¤ã®ã‚¯ã‚¨ãƒªã§åŒã˜ä½ç½®ã«è¤‡æ•°ã®å€¤ãŒæŒ¿å…¥ã•ã‚ŒãŸå ´åˆã€é–¢æ•°ã¯æ¬¡ã®ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ï¼š + +- クエリãŒå˜ä¸€ã‚¹ãƒ¬ãƒƒãƒ‰ã§å®Ÿè¡Œã•ã‚Œã‚‹å ´åˆã€æŒ¿å…¥ã•ã‚ŒãŸå€¤ã®ã†ã¡æœ€åˆã®ã‚‚ã®ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- クエリãŒè¤‡æ•°ã‚¹ãƒ¬ãƒƒãƒ‰ã§å®Ÿè¡Œã•ã‚Œã‚‹å ´åˆã€çµæžœã¨ã—ã¦å¾—られる値ã¯æŒ¿å…¥ã•ã‚ŒãŸå€¤ã®ä¸­ã‹ã‚‰ä¸ç¢ºå®šã®ã‚‚ã®ã§ã™ã€‚ + +**引数** + +- `x` — 挿入ã•ã‚Œã‚‹å€¤ã€‚[サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型](../../../sql-reference/data-types/index.md)ã®1ã¤ã®[å¼](../../../sql-reference/syntax.md#syntax-expressions)。 +- `pos` — 指定ã•ã‚ŒãŸè¦ç´  `x` を挿入ã™ã‚‹ä½ç½®ã€‚é…列ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã¯ã‚¼ãƒ­ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚[UInt32](../../../sql-reference/data-types/int-uint.md#uint-ranges)。 +- `default_x` — 空ã®ä½ç½®ã«ä»£å…¥ã™ã‚‹ãŸã‚ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚オプションã®ãƒ‘ラメータ。[å¼](../../../sql-reference/syntax.md#syntax-expressions)㧠`x` パラメータã«è¨­å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ã‚’çµæžœã¨ã—ã¾ã™ã€‚`default_x` ãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã€[デフォルト値](../../../sql-reference/statements/create/table.md#create-default-values)ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- `size` — çµæžœã¨ãªã‚‹é…列ã®é•·ã•ã€‚オプションã®ãƒ‘ラメータ。ã“ã®ãƒ‘ラメータを使用ã™ã‚‹å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ `default_x` を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚[UInt32](../../../sql-reference/data-types/int-uint.md#uint-ranges)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 挿入ã•ã‚ŒãŸå€¤ã‚’å«ã‚€é…列。 + +åž‹: [Array](../../../sql-reference/data-types/array.md#data-type-array)。 + +**例** + +クエリ: + +``` sql +SELECT groupArrayInsertAt(toString(number), number * 2) FROM numbers(5); +``` + +çµæžœ: + +``` text +┌─groupArrayInsertAt(toString(number), multiply(number, 2))─┠+│ ['0','','1','','2','','3','','4'] │ +└───────────────────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT groupArrayInsertAt('-')(toString(number), number * 2) FROM numbers(5); +``` + +çµæžœ: + +``` text +┌─groupArrayInsertAt('-')(toString(number), multiply(number, 2))─┠+│ ['0','-','1','-','2','-','3','-','4'] │ +└────────────────────────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT groupArrayInsertAt('-', 5)(toString(number), number * 2) FROM numbers(5); +``` + +çµæžœ: + +``` text +┌─groupArrayInsertAt('-', 5)(toString(number), multiply(number, 2))─┠+│ ['0','-','1','-','2'] │ +└───────────────────────────────────────────────────────────────────┘ +``` + +1ã¤ã®ä½ç½®ã«å¯¾ã™ã‚‹ãƒžãƒ«ãƒã‚¹ãƒ¬ãƒƒãƒ‰æŒ¿å…¥ã€‚ + +クエリ: + +``` sql +SELECT groupArrayInsertAt(number, 0) FROM numbers_mt(10) SETTINGS max_block_size = 1; +``` + +ã“ã®ã‚¯ã‚¨ãƒªã®çµæžœã¨ã—㦠`[0,9]` 範囲ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæ•´æ•°ãŒå¾—られã¾ã™ã€‚例: + +``` text +┌─groupArrayInsertAt(number, 0)─┠+│ [7] │ +└───────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparrayintersect.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparrayintersect.md new file mode 100644 index 00000000000..6bf1e83727a --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparrayintersect.md @@ -0,0 +1,50 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/grouparrayintersect +sidebar_position: 141 +--- + +# groupArrayIntersect + +与ãˆã‚‰ã‚ŒãŸé…列ã®å…±é€šéƒ¨åˆ†ã‚’è¿”ã—ã¾ã™ï¼ˆã™ã¹ã¦ã®é…列ã«å«ã¾ã‚Œã‚‹ã‚¢ã‚¤ãƒ†ãƒ ã‚’è¿”ã—ã¾ã™ï¼‰ã€‚ + +**構文** + +``` sql +groupArrayIntersect(x) +``` + +**引数** + +- `x` — 引数(カラムåã‚„å¼ï¼‰ã€‚ + +**戻り値** + +- ã™ã¹ã¦ã®é…列ã«å«ã¾ã‚Œã‚‹è¦ç´ ã‚’æŒã¤é…列。 + +タイプ: [Array](../../data-types/array.md)。 + +**例** + +テーブル `numbers` を考ãˆã¾ã™: + +``` text +┌─a──────────────┠+│ [1,2,4] │ +│ [1,5,2,8,-1,0] │ +│ [1,5,7,5,8,2] │ +└────────────────┘ +``` + +カラムåを引数ã¨ã—ã¦ä½¿ç”¨ã—ãŸã‚¯ã‚¨ãƒª: + +``` sql +SELECT groupArrayIntersect(a) as intersection FROM numbers; +``` + +çµæžœ: + +```text +┌─intersection──────┠+│ [1, 2] │ +└───────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparraylast.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparraylast.md new file mode 100644 index 00000000000..96d53e88361 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparraylast.md @@ -0,0 +1,41 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/grouparraylast +sidebar_position: 142 +--- + +# groupArrayLast + +構文: `groupArrayLast(max_size)(x)` + +最後ã®å¼•æ•°ã®å€¤ã®é…列を作æˆã—ã¾ã™ã€‚ +例ãˆã°ã€`groupArrayLast(1)(x)` 㯠`[anyLast (x)]` ã«ç›¸å½“ã—ã¾ã™ã€‚ + +å ´åˆã«ã‚ˆã£ã¦ã¯ã€å®Ÿè¡Œé †åºã«ä¾å­˜ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ã“ã‚Œã¯ã€`SELECT` ãŒçµæžœãŒå分ã«å°ã•ã„サブクエリã‹ã‚‰ `ORDER BY` を使用ã—ã¦ã„ã‚‹å ´åˆã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +select groupArrayLast(2)(number+1) numbers from numbers(10) +``` + +çµæžœ: + +```text +┌─numbers─┠+│ [9,10] │ +└─────────┘ +``` + +`groupArray` ã¨æ¯”較ã™ã‚‹ã¨: + +```sql +select groupArray(2)(number+1) numbers from numbers(10) +``` + +```text +┌─numbers─┠+│ [1,2] │ +└─────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingavg.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingavg.md new file mode 100644 index 00000000000..9d96a0f0850 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingavg.md @@ -0,0 +1,79 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/grouparraymovingavg +sidebar_position: 143 +--- + +# groupArrayMovingAvg + +入力値ã®ç§»å‹•å¹³å‡ã‚’計算ã—ã¾ã™ã€‚ + +``` sql +groupArrayMovingAvg(numbers_for_summing) +groupArrayMovingAvg(window_size)(numbers_for_summing) +``` + +ã“ã®é–¢æ•°ã¯ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚µã‚¤ã‚ºã‚’パラメーターã¨ã—ã¦å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚指定ã—ãªã„å ´åˆã€é–¢æ•°ã¯ã‚«ãƒ©ãƒ å†…ã®è¡Œæ•°ã¨åŒã˜ã‚µã‚¤ã‚ºã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’å–ã‚Šã¾ã™ã€‚ + +**引数** + +- `numbers_for_summing` — 数値データ型ã®å€¤ã‚’çµæžœã¨ã™ã‚‹[å¼](../../../sql-reference/syntax.md#syntax-expressions)。 +- `window_size` — 計算ウィンドウã®ã‚µã‚¤ã‚ºã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力データã¨åŒã˜ã‚µã‚¤ã‚ºã¨åž‹ã®é…列。 + +ã“ã®é–¢æ•°ã¯[ゼロã«å‘ã‹ã†ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚çµæžœã®ãƒ‡ãƒ¼ã‚¿åž‹ã«ã¨ã£ã¦é‡è¦ã§ãªã„å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡æ•°ã‚’切りæ¨ã¦ã¾ã™ã€‚ + +**例** + +サンプルテーブル `b`: + +``` sql +CREATE TABLE t +( + `int` UInt8, + `float` Float32, + `dec` Decimal32(2) +) +ENGINE = TinyLog +``` + +``` text +┌─int─┬─float─┬──dec─┠+│ 1 │ 1.1 │ 1.10 │ +│ 2 │ 2.2 │ 2.20 │ +│ 4 │ 4.4 │ 4.40 │ +│ 7 │ 7.77 │ 7.77 │ +└─────┴───────┴──────┘ +``` + +クエリ: + +``` sql +SELECT + groupArrayMovingAvg(int) AS I, + groupArrayMovingAvg(float) AS F, + groupArrayMovingAvg(dec) AS D +FROM t +``` + +``` text +┌─I─────────┬─F───────────────────────────────────┬─D─────────────────────┠+│ [0,0,1,3] │ [0.275,0.82500005,1.9250001,3.8675] │ [0.27,0.82,1.92,3.86] │ +└───────────┴─────────────────────────────────────┴───────────────────────┘ +``` + +``` sql +SELECT + groupArrayMovingAvg(2)(int) AS I, + groupArrayMovingAvg(2)(float) AS F, + groupArrayMovingAvg(2)(dec) AS D +FROM t +``` + +``` text +┌─I─────────┬─F────────────────────────────────┬─D─────────────────────┠+│ [0,1,3,5] │ [0.55,1.6500001,3.3000002,6.085] │ [0.55,1.65,3.30,6.08] │ +└───────────┴──────────────────────────────────┴───────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingsum.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingsum.md new file mode 100644 index 00000000000..9181d465bb5 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingsum.md @@ -0,0 +1,77 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/grouparraymovingsum +sidebar_position: 144 +--- + +# groupArrayMovingSum + +入力値ã®ç§»å‹•åˆè¨ˆã‚’計算ã—ã¾ã™ã€‚ + +``` sql +groupArrayMovingSum(numbers_for_summing) +groupArrayMovingSum(window_size)(numbers_for_summing) +``` + +ã“ã®é–¢æ•°ã¯ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚µã‚¤ã‚ºã‚’パラメータã¨ã—ã¦å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚指定ã—ãªã„å ´åˆã€é–¢æ•°ã¯ã‚«ãƒ©ãƒ ã®è¡Œæ•°ã¨åŒã˜ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚µã‚¤ã‚ºã‚’å–ã‚Šã¾ã™ã€‚ + +**引数** + +- `numbers_for_summing` — 数値データ型ã®å€¤ã‚’生æˆã™ã‚‹[å¼](../../../sql-reference/syntax.md#syntax-expressions)。 +- `window_size` — 計算ウィンドウã®ã‚µã‚¤ã‚ºã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力データã¨åŒã˜ã‚µã‚¤ã‚ºã¨åž‹ã®é…列。 + +**例** + +サンプルテーブル: + +``` sql +CREATE TABLE t +( + `int` UInt8, + `float` Float32, + `dec` Decimal32(2) +) +ENGINE = TinyLog +``` + +``` text +┌─int─┬─float─┬──dec─┠+│ 1 │ 1.1 │ 1.10 │ +│ 2 │ 2.2 │ 2.20 │ +│ 4 │ 4.4 │ 4.40 │ +│ 7 │ 7.77 │ 7.77 │ +└─────┴───────┴──────┘ +``` + +クエリ: + +``` sql +SELECT + groupArrayMovingSum(int) AS I, + groupArrayMovingSum(float) AS F, + groupArrayMovingSum(dec) AS D +FROM t +``` + +``` text +┌─I──────────┬─F───────────────────────────────┬─D──────────────────────┠+│ [1,3,7,14] │ [1.1,3.3000002,7.7000003,15.47] │ [1.10,3.30,7.70,15.47] │ +└────────────┴─────────────────────────────────┴────────────────────────┘ +``` + +``` sql +SELECT + groupArrayMovingSum(2)(int) AS I, + groupArrayMovingSum(2)(float) AS F, + groupArrayMovingSum(2)(dec) AS D +FROM t +``` + +``` text +┌─I──────────┬─F───────────────────────────────┬─D──────────────────────┠+│ [1,3,6,11] │ [1.1,3.3000002,6.6000004,12.17] │ [1.10,3.30,6.60,12.17] │ +└────────────┴─────────────────────────────────┴────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparraysample.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparraysample.md new file mode 100644 index 00000000000..8df22c38761 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparraysample.md @@ -0,0 +1,82 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/grouparraysample +sidebar_position: 145 +--- + +# groupArraySample + +サンプル引数値ã®é…列を作æˆã—ã¾ã™ã€‚生æˆã•ã‚Œã‚‹é…列ã®ã‚µã‚¤ã‚ºã¯ `max_size` è¦ç´ ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚引数値ã¯ãƒ©ãƒ³ãƒ€ãƒ ã«é¸æŠžã•ã‚Œã€é…列ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +groupArraySample(max_size[, seed])(x) +``` + +**引数** + +- `max_size` — 生æˆã•ã‚Œã‚‹é…列ã®æœ€å¤§ã‚µã‚¤ã‚ºã€‚ [UInt64](../../data-types/int-uint.md)。 +- `seed` — 乱数生æˆå™¨ã®ã‚·ãƒ¼ãƒ‰ã€‚オプション。[UInt64](../../data-types/int-uint.md)。デフォルト値: `123456`。 +- `x` — 引数(カラムåã¾ãŸã¯å¼ï¼‰ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ランダムã«é¸ã°ã‚ŒãŸ `x` 引数ã®é…列。 + +åž‹: [Array](../../data-types/array.md)。 + +**例** + +テーブル `colors` を考ãˆã¾ã™: + +``` text +┌─id─┬─color──┠+│ 1 │ red │ +│ 2 │ blue │ +│ 3 │ green │ +│ 4 │ white │ +│ 5 │ orange │ +└────┴────────┘ +``` + +カラムåを引数ã¨ã™ã‚‹ã‚¯ã‚¨ãƒª: + +``` sql +SELECT groupArraySample(3)(color) as newcolors FROM colors; +``` + +çµæžœ: + +```text +┌─newcolors──────────────────┠+│ ['white','blue','green'] │ +└────────────────────────────┘ +``` + +ç•°ãªã‚‹ã‚·ãƒ¼ãƒ‰ã‚’指定ã—ãŸã‚«ãƒ©ãƒ åを引数ã¨ã™ã‚‹ã‚¯ã‚¨ãƒª: + +``` sql +SELECT groupArraySample(3, 987654321)(color) as newcolors FROM colors; +``` + +çµæžœ: + +```text +┌─newcolors──────────────────┠+│ ['red','orange','green'] │ +└────────────────────────────┘ +``` + +å¼ã‚’引数ã¨ã™ã‚‹ã‚¯ã‚¨ãƒª: + +``` sql +SELECT groupArraySample(3)(concat('light-', color)) as newcolors FROM colors; +``` + +çµæžœ: + +```text +┌─newcolors───────────────────────────────────┠+│ ['light-blue','light-orange','light-green'] │ +└─────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparraysorted.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparraysorted.md new file mode 100644 index 00000000000..d669012a2cd --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparraysorted.md @@ -0,0 +1,44 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/grouparraysorted +sidebar_position: 146 +--- + +# groupArraySorted {#groupArraySorted} + +昇順ã§æœ€åˆã®N項目をå«ã‚€é…列を返ã—ã¾ã™ã€‚ + +``` sql +groupArraySorted(N)(column) +``` + +**引数** + +- `N` – è¿”ã™è¦ç´ ã®æ•°ã€‚ + +- `column` – 値(整数ã€æ–‡å­—列ã€æµ®å‹•å°æ•°ç‚¹æ•°ã€ãã®ä»–ã®æ±Žç”¨åž‹ï¼‰ã€‚ + +**例** + +最åˆã®10個ã®æ•°å€¤ã‚’å–å¾—ã—ã¾ã™ã€‚ + +``` sql +SELECT groupArraySorted(10)(number) FROM numbers(100) +``` + +``` text +┌─groupArraySorted(10)(number)─┠+│ [0,1,2,3,4,5,6,7,8,9] │ +└──────────────────────────────┘ +``` + +カラム内ã®ã™ã¹ã¦ã®æ•°å€¤ã®æ–‡å­—列実装をå–å¾—ã—ã¾ã™ï¼š + +``` sql +SELECT groupArraySorted(5)(str) FROM (SELECT toString(number) as str FROM numbers(5)); +``` + +``` text +┌─groupArraySorted(5)(str)─┠+│ ['0','1','2','3','4'] │ +└──────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitand.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitand.md new file mode 100644 index 00000000000..cef00ef8f07 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitand.md @@ -0,0 +1,47 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/groupbitand +sidebar_position: 147 +--- + +# groupBitAnd + +一連ã®æ•°å€¤ã«å¯¾ã—ã¦ãƒ“ットå˜ä½ã®`AND`ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +``` sql +groupBitAnd(expr) +``` + +**引数** + +`expr` – `UInt*`ã¾ãŸã¯`Int*`åž‹ã®çµæžœã¨ãªã‚‹å¼ã€‚ + +**戻り値** + +`UInt*`ã¾ãŸã¯`Int*`åž‹ã®å€¤ã€‚ + +**例** + +テストデータ: + +``` text +binary decimal +00101100 = 44 +00011100 = 28 +00001101 = 13 +01010101 = 85 +``` + +クエリ: + +``` sql +SELECT groupBitAnd(num) FROM t +``` + +ã“ã“ã§ã€`num`ã¯ãƒ†ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ã‚«ãƒ©ãƒ ã§ã™ã€‚ + +çµæžœ: + +``` text +binary decimal +00000100 = 4 +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitmap.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmap.md new file mode 100644 index 00000000000..0821d2b6057 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmap.md @@ -0,0 +1,45 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/groupbitmap +sidebar_position: 148 +--- + +# groupBitmap + +ビットマップã¾ãŸã¯ç¬¦å·ãªã—整数カラムã‹ã‚‰ã®é›†è¨ˆè¨ˆç®—ã‚’è¡Œã„ã€`UInt64`åž‹ã®åŸºæ•°ã‚’è¿”ã—ã¾ã™ã€‚`-State`ã®ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ã‚’追加ã™ã‚‹ã¨ã€[ビットマップオブジェクト](../../../sql-reference/functions/bitmap-functions.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +groupBitmap(expr) +``` + +**引数** + +`expr` – `UInt*` åž‹ã®çµæžœã‚’ã‚‚ãŸã‚‰ã™å¼ã€‚ + +**戻り値** + +`UInt64` åž‹ã®å€¤ã€‚ + +**例** + +テストデータ: + +``` text +UserID +1 +1 +2 +3 +``` + +クエリ: + +``` sql +SELECT groupBitmap(UserID) as num FROM t +``` + +çµæžœ: + +``` text +num +3 +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapand.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapand.md new file mode 100644 index 00000000000..9712f495c27 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapand.md @@ -0,0 +1,47 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/groupbitmapand +sidebar_position: 149 +title: groupBitmapAnd +--- + +ビットマップカラムã®AND計算を行ã„ã€æˆ»ã‚Šå€¤ã¯`UInt64`åž‹ã®åŸºæ•°ã‚’è¿”ã—ã¾ã™ã€‚サフィックス`-State`を付加ã™ã‚‹ã¨ã€[ビットマップオブジェクト](../../../sql-reference/functions/bitmap-functions.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +groupBitmapAnd(expr) +``` + +**引数** + +`expr` – `AggregateFunction(groupBitmap, UInt*)`åž‹ã«ãªã‚‹å¼ã€‚ + +**戻り値** + +`UInt64`åž‹ã®å€¤ã€‚ + +**例** + +``` sql +DROP TABLE IF EXISTS bitmap_column_expr_test2; +CREATE TABLE bitmap_column_expr_test2 +( + tag_id String, + z AggregateFunction(groupBitmap, UInt32) +) +ENGINE = MergeTree +ORDER BY tag_id; + +INSERT INTO bitmap_column_expr_test2 VALUES ('tag1', bitmapBuild(cast([1,2,3,4,5,6,7,8,9,10] as Array(UInt32)))); +INSERT INTO bitmap_column_expr_test2 VALUES ('tag2', bitmapBuild(cast([6,7,8,9,10,11,12,13,14,15] as Array(UInt32)))); +INSERT INTO bitmap_column_expr_test2 VALUES ('tag3', bitmapBuild(cast([2,4,6,8,10,12] as Array(UInt32)))); + +SELECT groupBitmapAnd(z) FROM bitmap_column_expr_test2 WHERE like(tag_id, 'tag%'); +┌─groupBitmapAnd(z)─┠+│ 3 │ +└───────────────────┘ + +SELECT arraySort(bitmapToArray(groupBitmapAndState(z))) FROM bitmap_column_expr_test2 WHERE like(tag_id, 'tag%'); +┌─arraySort(bitmapToArray(groupBitmapAndState(z)))─┠+│ [6,8,10] │ +└──────────────────────────────────────────────────┘ +``` + diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapor.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapor.md new file mode 100644 index 00000000000..d62d4eecb5c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapor.md @@ -0,0 +1,46 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/groupbitmapor +sidebar_position: 150 +title: groupBitmapOr +--- + +ビットマップカラムã®ORを計算ã—ã€`UInt64`åž‹ã®åŸºæ•°ã‚’è¿”ã—ã¾ã™ã€‚`-State`サフィックスを追加ã™ã‚‹ã¨ã€[bitmap object](../../../sql-reference/functions/bitmap-functions.md)ã‚’è¿”ã—ã¾ã™ã€‚ã“ã‚Œã¯`groupBitmapMerge`ã«ç›¸å½“ã—ã¾ã™ã€‚ + +``` sql +groupBitmapOr(expr) +``` + +**引数** + +`expr` – `AggregateFunction(groupBitmap, UInt*)`åž‹ã‚’çµæžœã¨ã—ã¦å¾—ã‚‹å¼ã€‚ + +**戻り値** + +`UInt64`åž‹ã®å€¤ã€‚ + +**例** + +``` sql +DROP TABLE IF EXISTS bitmap_column_expr_test2; +CREATE TABLE bitmap_column_expr_test2 +( + tag_id String, + z AggregateFunction(groupBitmap, UInt32) +) +ENGINE = MergeTree +ORDER BY tag_id; + +INSERT INTO bitmap_column_expr_test2 VALUES ('tag1', bitmapBuild(cast([1,2,3,4,5,6,7,8,9,10] as Array(UInt32)))); +INSERT INTO bitmap_column_expr_test2 VALUES ('tag2', bitmapBuild(cast([6,7,8,9,10,11,12,13,14,15] as Array(UInt32)))); +INSERT INTO bitmap_column_expr_test2 VALUES ('tag3', bitmapBuild(cast([2,4,6,8,10,12] as Array(UInt32)))); + +SELECT groupBitmapOr(z) FROM bitmap_column_expr_test2 WHERE like(tag_id, 'tag%'); +┌─groupBitmapOr(z)─┠+│ 15 │ +└──────────────────┘ + +SELECT arraySort(bitmapToArray(groupBitmapOrState(z))) FROM bitmap_column_expr_test2 WHERE like(tag_id, 'tag%'); +┌─arraySort(bitmapToArray(groupBitmapOrState(z)))─┠+│ [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] │ +└─────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapxor.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapxor.md new file mode 100644 index 00000000000..df7ae63aaf2 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapxor.md @@ -0,0 +1,46 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/groupbitmapxor +sidebar_position: 151 +title: groupBitmapXor +--- + +ビットマップカラムã®XORを計算ã—ã€UInt64åž‹ã®åŸºæ•°ã‚’è¿”ã—ã¾ã™ã€‚サフィックス-Stateを追加ã™ã‚‹ã¨ã€[ビットマップオブジェクト](../../../sql-reference/functions/bitmap-functions.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +groupBitmapOr(expr) +``` + +**引数** + +`expr` – `AggregateFunction(groupBitmap, UInt*)`åž‹ã‚’è¿”ã™å¼ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +`UInt64`åž‹ã®å€¤ã€‚ + +**例** + +``` sql +DROP TABLE IF EXISTS bitmap_column_expr_test2; +CREATE TABLE bitmap_column_expr_test2 +( + tag_id String, + z AggregateFunction(groupBitmap, UInt32) +) +ENGINE = MergeTree +ORDER BY tag_id; + +INSERT INTO bitmap_column_expr_test2 VALUES ('tag1', bitmapBuild(cast([1,2,3,4,5,6,7,8,9,10] as Array(UInt32)))); +INSERT INTO bitmap_column_expr_test2 VALUES ('tag2', bitmapBuild(cast([6,7,8,9,10,11,12,13,14,15] as Array(UInt32)))); +INSERT INTO bitmap_column_expr_test2 VALUES ('tag3', bitmapBuild(cast([2,4,6,8,10,12] as Array(UInt32)))); + +SELECT groupBitmapXor(z) FROM bitmap_column_expr_test2 WHERE like(tag_id, 'tag%'); +┌─groupBitmapXor(z)─┠+│ 10 │ +└───────────────────┘ + +SELECT arraySort(bitmapToArray(groupBitmapXorState(z))) FROM bitmap_column_expr_test2 WHERE like(tag_id, 'tag%'); +┌─arraySort(bitmapToArray(groupBitmapXorState(z)))─┠+│ [1,3,5,6,8,10,11,13,14,15] │ +└──────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitor.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitor.md new file mode 100644 index 00000000000..566914abc29 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitor.md @@ -0,0 +1,47 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/groupbitor +sidebar_position: 152 +--- + +# groupBitOr + +一連ã®æ•°å€¤ã«å¯¾ã—ã¦ãƒ“ットå˜ä½ã®`OR`ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +``` sql +groupBitOr(expr) +``` + +**引数** + +`expr` – çµæžœãŒ`UInt*`ã¾ãŸã¯`Int*`åž‹ã¨ãªã‚‹å¼ã€‚ + +**戻り値** + +`UInt*`ã¾ãŸã¯`Int*`åž‹ã®å€¤ã€‚ + +**例** + +テストデータ: + +``` text +binary decimal +00101100 = 44 +00011100 = 28 +00001101 = 13 +01010101 = 85 +``` + +クエリ: + +``` sql +SELECT groupBitOr(num) FROM t +``` + +ã“ã“ã§ã€`num`ã¯ãƒ†ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ã‚«ãƒ©ãƒ ã§ã™ã€‚ + +çµæžœ: + +``` text +binary decimal +01111101 = 125 +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitxor.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitxor.md new file mode 100644 index 00000000000..c14c98a66cc --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitxor.md @@ -0,0 +1,47 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/groupbitxor +sidebar_position: 153 +--- + +# groupBitXor + +一連ã®æ•°å€¤ã«å¯¾ã—ã¦ãƒ“ットã”ã¨ã®`XOR`ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +``` sql +groupBitXor(expr) +``` + +**引数** + +`expr` – `UInt*`ã¾ãŸã¯`Int*`åž‹ã®çµæžœã‚’ã‚‚ãŸã‚‰ã™å¼ã€‚ + +**戻り値** + +`UInt*`ã¾ãŸã¯`Int*`åž‹ã®å€¤ã€‚ + +**例** + +テストデータ: + +``` text +binary decimal +00101100 = 44 +00011100 = 28 +00001101 = 13 +01010101 = 85 +``` + +クエリ: + +``` sql +SELECT groupBitXor(num) FROM t +``` + +ã“ã“ã§ã€`num`ã¯ãƒ†ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤ã‚«ãƒ©ãƒ ã§ã™ã€‚ + +çµæžœ: + +``` text +binary decimal +01101000 = 104 +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupconcat.md b/docs/ja/sql-reference/aggregate-functions/reference/groupconcat.md new file mode 100644 index 00000000000..89d59bf3123 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupconcat.md @@ -0,0 +1,90 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/groupconcat +sidebar_position: 363 +sidebar_label: groupConcat +title: groupConcat +--- + +文字列ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‹ã‚‰é€£çµã•ã‚ŒãŸæ–‡å­—列を計算ã—ã¾ã™ã€‚区切り文字ã§åŒºåˆ‡ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã€è¦ç´ ã®æœ€å¤§æ•°ã‚’制é™ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +**構文** + +``` sql +groupConcat[(delimiter [, limit])](expression); +``` + +**引数** + +- `expression` — 連çµã•ã‚Œã‚‹æ–‡å­—列を出力ã™ã‚‹å¼ã¾ãŸã¯ã‚«ãƒ©ãƒ å。 +- `delimiter` — 連çµã•ã‚Œã‚‹å€¤ã‚’区切るãŸã‚ã«ä½¿ã‚れる[文字列](../../../sql-reference/data-types/string.md)。ã“ã®ãƒ‘ラメータã¯ã‚ªãƒ—ションã§ã€æŒ‡å®šã—ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨ãªã‚Šã¾ã™ã€‚ +- `limit` — 連çµã™ã‚‹è¦ç´ ã®æœ€å¤§æ•°ã‚’指定ã™ã‚‹æ­£ã®[æ•´æ•°](../../../sql-reference/data-types/int-uint.md)。もã—è¦ç´ ãŒãれ以上ã‚ã‚‹å ´åˆã€è¶…éŽã—ãŸè¦ç´ ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ‘ラメータもオプションã§ã™ã€‚ + +:::note +区切り文字ãŒæŒ‡å®šã•ã‚Œã€limitãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€åŒºåˆ‡ã‚Šæ–‡å­—ã¯æœ€åˆã®ãƒ‘ラメータã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。区切り文字ã¨limitã®ä¸¡æ–¹ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€åŒºåˆ‡ã‚Šæ–‡å­—ã¯limitよりもå‰ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- カラムã¾ãŸã¯å¼ã®é€£çµã•ã‚ŒãŸå€¤ã‹ã‚‰ãªã‚‹[文字列](../../../sql-reference/data-types/string.md)ã‚’è¿”ã—ã¾ã™ã€‚グループã«è¦ç´ ãŒãªã„ã€ã¾ãŸã¯ã™ã¹ã¦ã®è¦ç´ ãŒnullã®å ´åˆã€ã‹ã¤é–¢æ•°ãŒnull値ã®ã¿ã®å‡¦ç†ã‚’指定ã—ã¦ã„ãªã„å ´åˆã€çµæžœã¯null値をæŒã¤nullableãªæ–‡å­—列ã¨ãªã‚Šã¾ã™ã€‚ + +**例** + +入力テーブル: + +``` text +┌─id─┬─name─┠+│ 1 │ John│ +│ 2 │ Jane│ +│ 3 │ Bob│ +└────┴──────┘ +``` + +1. 区切り文字ãªã—ã®åŸºæœ¬çš„ãªä½¿ç”¨æ³•: + +クエリ: + +``` sql +SELECT groupConcat(Name) FROM Employees; +``` + +çµæžœ: + +``` text +JohnJaneBob +``` + +ã™ã¹ã¦ã®åå‰ã‚’区切りãªã—ã§ä¸€ã¤ã®é€£ç¶šã—ãŸæ–‡å­—列ã«é€£çµã—ã¾ã™ã€‚ + + +2. 区切り文字ã¨ã—ã¦ã‚«ãƒ³ãƒžã‚’使用ã™ã‚‹å ´åˆ: + +クエリ: + +``` sql +SELECT groupConcat(', ')(Name) FROM Employees; +``` + +çµæžœ: + +``` text +John, Jane, Bob +``` + +ã“ã®å‡ºåŠ›ã§ã¯ã€ã‚«ãƒ³ãƒžã¨ã‚¹ãƒšãƒ¼ã‚¹ã§åå‰ãŒåŒºåˆ‡ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ + + +3. 連çµã™ã‚‹è¦ç´ æ•°ã®åˆ¶é™ + +クエリ: + +``` sql +SELECT groupConcat(', ', 2)(Name) FROM Employees; +``` + +çµæžœ: + +``` text +John, Jane +``` + +ã“ã®ã‚¯ã‚¨ãƒªã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルã«ã‚‚ã£ã¨åå‰ãŒã‚ã£ã¦ã‚‚ã€æœ€åˆã®2ã¤ã®åå‰ã ã‘ãŒçµæžœã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupuniqarray.md b/docs/ja/sql-reference/aggregate-functions/reference/groupuniqarray.md new file mode 100644 index 00000000000..139b805b7f7 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupuniqarray.md @@ -0,0 +1,12 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/groupuniqarray +sidebar_position: 154 +--- + +# groupUniqArray + +構文: `groupUniqArray(x)` ã¾ãŸã¯ `groupUniqArray(max_size)(x)` + +ç•°ãªã‚‹å¼•æ•°ã®å€¤ã‹ã‚‰é…列を作æˆã—ã¾ã™ã€‚メモリ消費㯠[uniqExact](../../../sql-reference/aggregate-functions/reference/uniqexact.md) 関数ã¨åŒã˜ã§ã™ã€‚ + +第二ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆ`max_size` パラメータ付ã)ã¯ã€çµæžœã®é…列ã®ã‚µã‚¤ã‚ºã‚’ `max_size` è¦ç´ ã«åˆ¶é™ã—ã¾ã™ã€‚例ãˆã°ã€`groupUniqArray(1)(x)` 㯠`[any(x)]` ã¨åŒç­‰ã§ã™ã€‚ diff --git a/docs/ja/sql-reference/aggregate-functions/reference/index.md b/docs/ja/sql-reference/aggregate-functions/reference/index.md new file mode 100644 index 00000000000..7a86030c56f --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/index.md @@ -0,0 +1,125 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/ +toc_folder_title: Reference +sidebar_position: 36 +toc_hidden: true +--- + +# 集約関数ã®ãƒªã‚¹ãƒˆ + +標準ã®é›†ç´„関数: + +- [count](../reference/count.md) +- [min](../reference/min.md) +- [max](../reference/max.md) +- [sum](../reference/sum.md) +- [avg](../reference/avg.md) +- [any](../reference/any.md) +- [stddevPop](../reference/stddevpop.md) +- [stddevPopStable](../reference/stddevpopstable.md) +- [stddevSamp](../reference/stddevsamp.md) +- [stddevSampStable](../reference/stddevsampstable.md) +- [varPop](../reference/varpop.md) +- [varSamp](../reference/varsamp.md) +- [corr](../reference/corr.md) +- [corr](../reference/corrstable.md) +- [corrMatrix](../reference/corrmatrix.md) +- [covarPop](../reference/covarpop.md) +- [covarStable](../reference/covarpopstable.md) +- [covarPopMatrix](../reference/covarpopmatrix.md) +- [covarSamp](../reference/covarsamp.md) +- [covarSampStable](../reference/covarsampstable.md) +- [covarSampMatrix](../reference/covarsampmatrix.md) +- [entropy](../reference/entropy.md) +- [exponentialMovingAverage](../reference/exponentialmovingaverage.md) +- [intervalLengthSum](../reference/intervalLengthSum.md) +- [kolmogorovSmirnovTest](../reference/kolmogorovsmirnovtest.md) +- [mannwhitneyutest](../reference/mannwhitneyutest.md) +- [median](../reference/median.md) +- [rankCorr](../reference/rankCorr.md) +- [sumKahan](../reference/sumkahan.md) +- [studentTTest](../reference/studentttest.md) +- [welchTTest](../reference/welchttest.md) + +ClickHouse特有ã®é›†ç´„関数: + +- [aggThrow](../reference/aggthrow.md) +- [analysisOfVariance](../reference/analysis_of_variance.md) +- [any](../reference/any.md) +- [anyHeavy](../reference/anyheavy.md) +- [anyLast](../reference/anylast.md) +- [boundingRatio](../reference/boundrat.md) +- [first_value](../reference/first_value.md) +- [last_value](../reference/last_value.md) +- [argMin](../reference/argmin.md) +- [argMax](../reference/argmax.md) +- [avgWeighted](../reference/avgweighted.md) +- [topK](../reference/topk.md) +- [topKWeighted](../reference/topkweighted.md) +- [deltaSum](../reference/deltasum.md) +- [deltaSumTimestamp](../reference/deltasumtimestamp.md) +- [flameGraph](../reference/flame_graph.md) +- [groupArray](../reference/grouparray.md) +- [groupArrayLast](../reference/grouparraylast.md) +- [groupUniqArray](../reference/groupuniqarray.md) +- [groupArrayInsertAt](../reference/grouparrayinsertat.md) +- [groupArrayMovingAvg](../reference/grouparraymovingavg.md) +- [groupArrayMovingSum](../reference/grouparraymovingsum.md) +- [groupArraySample](../reference/grouparraysample.md) +- [groupArraySorted](../reference/grouparraysorted.md) +- [groupArrayIntersect](../reference/grouparrayintersect.md) +- [groupBitAnd](../reference/groupbitand.md) +- [groupBitOr](../reference/groupbitor.md) +- [groupBitXor](../reference/groupbitxor.md) +- [groupBitmap](../reference/groupbitmap.md) +- [groupBitmapAnd](../reference/groupbitmapand.md) +- [groupBitmapOr](../reference/groupbitmapor.md) +- [groupBitmapXor](../reference/groupbitmapxor.md) +- [sumWithOverflow](../reference/sumwithoverflow.md) +- [sumMap](../reference/summap.md) +- [sumMapWithOverflow](../reference/summapwithoverflow.md) +- [sumMapFiltered](../parametric-functions.md/#summapfiltered) +- [sumMapFilteredWithOverflow](../parametric-functions.md/#summapfilteredwithoverflow) +- [minMap](../reference/minmap.md) +- [maxMap](../reference/maxmap.md) +- [skewSamp](../reference/skewsamp.md) +- [skewPop](../reference/skewpop.md) +- [kurtSamp](../reference/kurtsamp.md) +- [kurtPop](../reference/kurtpop.md) +- [uniq](../reference/uniq.md) +- [uniqExact](../reference/uniqexact.md) +- [uniqCombined](../reference/uniqcombined.md) +- [uniqCombined64](../reference/uniqcombined64.md) +- [uniqHLL12](../reference/uniqhll12.md) +- [uniqTheta](../reference/uniqthetasketch.md) +- [quantile](../reference/quantile.md) +- [quantiles](../reference/quantiles.md) +- [quantileExact](../reference/quantileexact.md) +- [quantileExactLow](../reference/quantileexact.md#quantileexactlow) +- [quantileExactHigh](../reference/quantileexact.md#quantileexacthigh) +- [quantileExactWeighted](../reference/quantileexactweighted.md) +- [quantileTiming](../reference/quantiletiming.md) +- [quantileTimingWeighted](../reference/quantiletimingweighted.md) +- [quantileDeterministic](../reference/quantiledeterministic.md) +- [quantileTDigest](../reference/quantiletdigest.md) +- [quantileTDigestWeighted](../reference/quantiletdigestweighted.md) +- [quantileBFloat16](../reference/quantilebfloat16.md#quantilebfloat16) +- [quantileBFloat16Weighted](../reference/quantilebfloat16.md#quantilebfloat16weighted) +- [quantileDD](../reference/quantileddsketch.md#quantileddsketch) +- [simpleLinearRegression](../reference/simplelinearregression.md) +- [singleValueOrNull](../reference/singlevalueornull.md) +- [stochasticLinearRegression](../reference/stochasticlinearregression.md) +- [stochasticLogisticRegression](../reference/stochasticlogisticregression.md) +- [categoricalInformationValue](../reference/categoricalinformationvalue.md) +- [contingency](../reference/contingency.md) +- [cramersV](../reference/cramersv.md) +- [cramersVBiasCorrected](../reference/cramersvbiascorrected.md) +- [theilsU](../reference/theilsu.md) +- [maxIntersections](../reference/maxintersections.md) +- [maxIntersectionsPosition](../reference/maxintersectionsposition.md) +- [meanZTest](../reference/meanztest.md) +- [quantileGK](../reference/quantileGK.md) +- [quantileInterpolatedWeighted](../reference/quantileinterpolatedweighted.md) +- [sparkBar](../reference/sparkbar.md) +- [sumCount](../reference/sumcount.md) +- [largestTriangleThreeBuckets](../reference/largestTriangleThreeBuckets.md) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/intervalLengthSum.md b/docs/ja/sql-reference/aggregate-functions/reference/intervalLengthSum.md new file mode 100644 index 00000000000..d7bd7ac1cd7 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/intervalLengthSum.md @@ -0,0 +1,108 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/intervalLengthSum +sidebar_position: 155 +sidebar_label: intervalLengthSum +title: intervalLengthSum +--- + +ã™ã¹ã¦ã®ç¯„囲(数軸上ã®ã‚»ã‚°ãƒ¡ãƒ³ãƒˆï¼‰ã®åˆä½µã®ç·é•·ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +``` sql +intervalLengthSum(start, end) +``` + +**引数** + +- `start` — インターãƒãƒ«ã®é–‹å§‹å€¤ã€‚ [Int32](../../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-int8-int16-int32-int64), [Int64](../../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-int8-int16-int32-int64), [UInt32](../../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-int8-int16-int32-int64), [UInt64](../../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-int8-int16-int32-int64), [Float32](../../../sql-reference/data-types/float.md#float32-float64), [Float64](../../../sql-reference/data-types/float.md#float32-float64), [DateTime](../../../sql-reference/data-types/datetime.md#data_type-datetime) ã¾ãŸã¯ [Date](../../../sql-reference/data-types/date.md#data_type-date)。 +- `end` — インターãƒãƒ«ã®çµ‚了値。[Int32](../../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-int8-int16-int32-int64), [Int64](../../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-int8-int16-int32-int64), [UInt32](../../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-int8-int16-int32-int64), [UInt64](../../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-int8-int16-int32-int64), [Float32](../../../sql-reference/data-types/float.md#float32-float64), [Float64](../../../sql-reference/data-types/float.md#float32-float64), [DateTime](../../../sql-reference/data-types/datetime.md#data_type-datetime) ã¾ãŸã¯ [Date](../../../sql-reference/data-types/date.md#data_type-date)。 + +:::note +引数ã¯åŒã˜ãƒ‡ãƒ¼ã‚¿åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ +::: + +**戻り値** + +- ã™ã¹ã¦ã®ç¯„囲(数軸上ã®ã‚»ã‚°ãƒ¡ãƒ³ãƒˆï¼‰ã®åˆä½µã®ç·é•·ã€‚引数ã®åž‹ã«å¿œã˜ã¦ã€æˆ»ã‚Šå€¤ã¯ [UInt64](../../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-int8-int16-int32-int64) ã¾ãŸã¯ [Float64](../../../sql-reference/data-types/float.md#float32-float64) åž‹ã«ãªã‚Šã¾ã™ã€‚ + +**例** + +1. 入力テーブル: + +``` text +┌─id─┬─start─┬─end─┠+│ a │ 1.1 │ 2.9 │ +│ a │ 2.5 │ 3.2 │ +│ a │ 4 │ 5 │ +└────┴───────┴─────┘ +``` + +ã“ã®ä¾‹ã§ã¯ã€Float32 åž‹ã®å¼•æ•°ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚関数㯠Float64 åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +çµæžœã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ« `[1.1, 3.2]` (`[1.1, 2.9]` 㨠`[2.5, 3.2]` ã®åˆä½µï¼‰ã¨ `[4, 5]` ã®é•·ã•ã®åˆè¨ˆã§ã™ã€‚ + +クエリ: + +``` sql +SELECT id, intervalLengthSum(start, end), toTypeName(intervalLengthSum(start, end)) FROM fl_interval GROUP BY id ORDER BY id; +``` + +çµæžœï¼š + +``` text +┌─id─┬─intervalLengthSum(start, end)─┬─toTypeName(intervalLengthSum(start, end))─┠+│ a │ 3.1 │ Float64 │ +└────┴───────────────────────────────┴───────────────────────────────────────────┘ +``` + +2. 入力テーブル: + +``` text +┌─id─┬───────────────start─┬─────────────────end─┠+│ a │ 2020-01-01 01:12:30 │ 2020-01-01 02:10:10 │ +│ a │ 2020-01-01 02:05:30 │ 2020-01-01 02:50:31 │ +│ a │ 2020-01-01 03:11:22 │ 2020-01-01 03:23:31 │ +└────┴─────────────────────┴─────────────────────┘ +``` + +ã“ã®ä¾‹ã§ã¯ã€DateTime åž‹ã®å¼•æ•°ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚関数ã¯ç§’å˜ä½ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT id, intervalLengthSum(start, end), toTypeName(intervalLengthSum(start, end)) FROM dt_interval GROUP BY id ORDER BY id; +``` + +çµæžœï¼š + +``` text +┌─id─┬─intervalLengthSum(start, end)─┬─toTypeName(intervalLengthSum(start, end))─┠+│ a │ 6610 │ UInt64 │ +└────┴───────────────────────────────┴───────────────────────────────────────────┘ +``` + +3. 入力テーブル: + +``` text +┌─id─┬──────start─┬────────end─┠+│ a │ 2020-01-01 │ 2020-01-04 │ +│ a │ 2020-01-12 │ 2020-01-18 │ +└────┴────────────┴────────────┘ +``` + +ã“ã®ä¾‹ã§ã¯ã€Date åž‹ã®å¼•æ•°ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚関数ã¯æ—¥æ•°å˜ä½ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT id, intervalLengthSum(start, end), toTypeName(intervalLengthSum(start, end)) FROM date_interval GROUP BY id ORDER BY id; +``` + +çµæžœï¼š + +``` text +┌─id─┬─intervalLengthSum(start, end)─┬─toTypeName(intervalLengthSum(start, end))─┠+│ a │ 9 │ UInt64 │ +└────┴───────────────────────────────┴───────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/kolmogorovsmirnovtest.md b/docs/ja/sql-reference/aggregate-functions/reference/kolmogorovsmirnovtest.md new file mode 100644 index 00000000000..b0741890d21 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/kolmogorovsmirnovtest.md @@ -0,0 +1,114 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/kolmogorovsmirnovtest +sidebar_position: 156 +sidebar_label: kolmogorovSmirnovTest +--- + +# kolmogorovSmirnovTest + +2ã¤ã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«ã‚³ãƒ«ãƒ¢ã‚´ãƒ­ãƒ•-スミルノフ検定をé©ç”¨ã—ã¾ã™ã€‚ + +**構文** + +``` sql +kolmogorovSmirnovTest([alternative, computation_method])(sample_data, sample_index) +``` + +両方ã®ã‚µãƒ³ãƒ—ルã®å€¤ã¯ `sample_data` カラムã«ã‚ã‚Šã¾ã™ã€‚`sample_index` ãŒ0ã®å ´åˆã€ãã®è¡Œã®å€¤ã¯æœ€åˆã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å±žã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ã€2番目ã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å±žã—ã¾ã™ã€‚ +サンプルã¯é€£ç¶šã—ãŸä¸€æ¬¡å…ƒã®ç¢ºçŽ‡åˆ†å¸ƒã«å±žã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**引数** + +- `sample_data` — サンプルデータ。 [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 +- `sample_index` — サンプルインデックス。 [Integer](../../../sql-reference/data-types/int-uint.md)。 + +**パラメータ** + +- `alternative` — 代替仮説。(オプションã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: `'two-sided'`。)[String](../../../sql-reference/data-types/string.md)。 + F(x) 㨠G(x) ã‚’ãã‚Œãžã‚Œæœ€åˆã¨2番目ã®åˆ†å¸ƒã®CDFã¨ã—ã¾ã™ã€‚ + - `'two-sided'` + 帰無仮説ã¯ã‚µãƒ³ãƒ—ルãŒåŒã˜åˆ†å¸ƒã‹ã‚‰æ¥ã¦ã„ã‚‹ã“ã¨ã§ã€ã¤ã¾ã‚Š F(x) = G(x) ãŒã™ã¹ã¦ã® x ã«ãŠã„ã¦æˆã‚Šç«‹ã¤ã“ã¨ã§ã™ã€‚ + 代替仮説ã¯åˆ†å¸ƒãŒåŒä¸€ã§ãªã„ã¨ã„ã†ã“ã¨ã§ã™ã€‚ + - `'greater'` + 帰無仮説ã¯ã€æœ€åˆã®ã‚µãƒ³ãƒ—ル内ã®å€¤ãŒ2番目ã®ã‚µãƒ³ãƒ—ルã®ã‚‚ã®ã‚ˆã‚Š*確率的ã«å°ã•ã„*ã¨ã„ã†ã“ã¨ã§ã€ + ã¤ã¾ã‚Šæœ€åˆã®åˆ†å¸ƒã®CDFãŒ2番目ã®ã‚‚ã®ã®ä¸Šå´ï¼ˆã‚ˆã£ã¦å·¦å´ï¼‰ã«ã‚ã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚ + ã“ã‚Œã«ã‚ˆã‚Šã€ã™ã¹ã¦ã® x ã«ãŠã„㦠F(x) >= G(x) ã¨ãªã‚Šã¾ã™ã€‚ã“ã®å ´åˆã®ä»£æ›¿ã¯ F(x) < G(x) ã® x ãŒå°‘ãªãã¨ã‚‚1ã¤å­˜åœ¨ã™ã‚‹ã“ã¨ã§ã™ã€‚ + - `'less'`。 + 帰無仮説ã¯ã€æœ€åˆã®ã‚µãƒ³ãƒ—ル内ã®å€¤ãŒ2番目ã®ã‚µãƒ³ãƒ—ルã®ã‚‚ã®ã‚ˆã‚Š*確率的ã«å¤§ãã„*ã¨ã„ã†ã“ã¨ã§ã€ + ã¤ã¾ã‚Šæœ€åˆã®åˆ†å¸ƒã®CDFãŒ2番目ã®ã‚‚ã®ã®ä¸‹å´ï¼ˆã‚ˆã£ã¦å³å´ï¼‰ã«ã‚ã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚ + ã“ã‚Œã«ã‚ˆã‚Šã€ã™ã¹ã¦ã® x ã«ãŠã„㦠F(x) <= G(x) ã¨ãªã‚Šã¾ã™ã€‚ã“ã®å ´åˆã®ä»£æ›¿ã¯ F(x) > G(x) ã® x ãŒå°‘ãªãã¨ã‚‚1ã¤å­˜åœ¨ã™ã‚‹ã“ã¨ã§ã™ã€‚ +- `computation_method` — p値を計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æ–¹æ³•ã€‚(オプションã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: `'auto'`。)[String](../../../sql-reference/data-types/string.md)。 + - `'exact'` - 検定統計é‡ã®æ­£ç¢ºãªç¢ºçŽ‡åˆ†å¸ƒã‚’使用ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚計算é‡ãŒå¤šãã€å°‘é‡ã®ã‚µãƒ³ãƒ—ル以外ã§ã¯éžåŠ¹çŽ‡ã§ã™ã€‚ + - `'asymp'`(`'asymptotic'`) - è¿‘ä¼¼ã«ã‚ˆã£ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚大サンプルサイズã®å ´åˆã€æ­£ç¢ºp値ã¨æ¼¸è¿‘p値ã¯éžå¸¸ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + - `'auto'` - サンプルã®æœ€å¤§æ•°ãŒ10,000未満ã®å ´åˆã« `'exact'` メソッドを使用ã—ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +2ã¤ã®è¦ç´ ã‚’æŒã¤[Tuple](../../../sql-reference/data-types/tuple.md): + +- 計算ã•ã‚ŒãŸçµ±è¨ˆé‡ã€‚ [Float64](../../../sql-reference/data-types/float.md)。 +- 計算ã•ã‚ŒãŸp値。 [Float64](../../../sql-reference/data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT kolmogorovSmirnovTest('less', 'exact')(value, num) +FROM +( + SELECT + randNormal(0, 10) AS value, + 0 AS num + FROM numbers(10000) + UNION ALL + SELECT + randNormal(0, 10) AS value, + 1 AS num + FROM numbers(10000) +) +``` + +çµæžœ: + +``` text +┌─kolmogorovSmirnovTest('less', 'exact')(value, num)─┠+│ (0.009899999999999996,0.37528595205132287) │ +└────────────────────────────────────────────────────┘ +``` + +注æ„: +p値ãŒ0.05より大ãã„(信頼レベル95%ã®å ´åˆï¼‰ãŸã‚ã€å¸°ç„¡ä»®èª¬ã¯æ£„å´ã•ã‚Œã¾ã›ã‚“。 + +クエリ: + +``` sql +SELECT kolmogorovSmirnovTest('two-sided', 'exact')(value, num) +FROM +( + SELECT + randStudentT(10) AS value, + 0 AS num + FROM numbers(100) + UNION ALL + SELECT + randNormal(0, 10) AS value, + 1 AS num + FROM numbers(100) +) +``` + +çµæžœ: + +``` text +┌─kolmogorovSmirnovTest('two-sided', 'exact')(value, num)─┠+│ (0.4100000000000002,6.61735760482795e-8) │ +└─────────────────────────────────────────────────────────┘ +``` + +注æ„: +p値ãŒ0.05よりå°ã•ã„(信頼レベル95%ã®å ´åˆï¼‰ãŸã‚ã€å¸°ç„¡ä»®èª¬ã¯æ£„å´ã•ã‚Œã¾ã™ã€‚ + +**å‚ç…§** + +- [Kolmogorov-Smirnov'test](https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/kurtpop.md b/docs/ja/sql-reference/aggregate-functions/reference/kurtpop.md new file mode 100644 index 00000000000..d7056da5b95 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/kurtpop.md @@ -0,0 +1,26 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/kurtpop +sidebar_position: 157 +--- + +# kurtPop + +シーケンスã®[尖度](https://en.wikipedia.org/wiki/Kurtosis)を計算ã—ã¾ã™ã€‚ + +``` sql +kurtPop(expr) +``` + +**引数** + +`expr` — 数値を返ã™[å¼](../../../sql-reference/syntax.md#syntax-expressions)。 + +**戻り値** + +与ãˆã‚‰ã‚ŒãŸåˆ†å¸ƒã®å°–度。型 — [Float64](../../../sql-reference/data-types/float.md) + +**例** + +``` sql +SELECT kurtPop(value) FROM series_with_value_column; +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/kurtsamp.md b/docs/ja/sql-reference/aggregate-functions/reference/kurtsamp.md new file mode 100644 index 00000000000..c3227b4b5d8 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/kurtsamp.md @@ -0,0 +1,28 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/kurtsamp +sidebar_position: 158 +--- + +# kurtSamp + +シーケンスã®[標本尖度](https://en.wikipedia.org/wiki/Kurtosis)を計算ã—ã¾ã™ã€‚ + +ã“ã‚Œã¯æ¸¡ã•ã‚ŒãŸå€¤ãŒæ¨™æœ¬ã‚’å½¢æˆã™ã‚‹å ´åˆã€ç¢ºçŽ‡å¤‰æ•°ã®å°–度ã®ç„¡å推定é‡ã‚’表ã—ã¾ã™ã€‚ + +``` sql +kurtSamp(expr) +``` + +**引数** + +`expr` — 数値を返ã™[å¼](../../../sql-reference/syntax.md#syntax-expressions)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +与ãˆã‚‰ã‚ŒãŸåˆ†å¸ƒã®å°–度。型 — [Float64](../../../sql-reference/data-types/float.md)。も㗠`n <= 1`(`n` ã¯æ¨™æœ¬ã®ã‚µã‚¤ã‚ºï¼‰ãªã‚‰ã€é–¢æ•°ã¯ `nan` ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT kurtSamp(value) FROM series_with_value_column; +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/largestTriangleThreeBuckets.md b/docs/ja/sql-reference/aggregate-functions/reference/largestTriangleThreeBuckets.md new file mode 100644 index 00000000000..87069e917cf --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/largestTriangleThreeBuckets.md @@ -0,0 +1,68 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/largestTriangleThreeBuckets +sidebar_position: 159 +sidebar_label: largestTriangleThreeBuckets +--- + +# largestTriangleThreeBuckets + +入力データã«[Largest-Triangle-Three-Buckets](https://skemman.is/bitstream/1946/15343/3/SS_MSthesis.pdf)アルゴリズムをé©ç”¨ã—ã¾ã™ã€‚ +ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ã€æ™‚系列データã®å¯è¦–化ã®ãŸã‚ã®ãƒ€ã‚¦ãƒ³ã‚µãƒ³ãƒ—リングã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚x座標ã§ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸç³»åˆ—ã«å¯¾ã—ã¦å‹•ä½œã™ã‚‹ã‚ˆã†ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +ソートã•ã‚ŒãŸç³»åˆ—ã‚’ãƒã‚±ãƒƒãƒˆã«åˆ†å‰²ã—ã€å„ãƒã‚±ãƒƒãƒˆã§æœ€ã‚‚大ããªä¸‰è§’形を見ã¤ã‘ã‚‹ã“ã¨ã§å‹•ä½œã—ã¾ã™ã€‚ãƒã‚±ãƒƒãƒˆã®æ•°ã¯ã€çµæžœã®ã‚·ãƒªãƒ¼ã‚ºã«å«ã¾ã‚Œã‚‹ãƒã‚¤ãƒ³ãƒˆã®æ•°ã«ç­‰ã—ã„ã§ã™ã€‚ +ã“ã®é–¢æ•°ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’`x`ã§ã‚½ãƒ¼ãƒˆã—ã€ãã®å¾Œã‚½ãƒ¼ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«ãƒ€ã‚¦ãƒ³ã‚µãƒ³ãƒ—リングアルゴリズムをé©ç”¨ã—ã¾ã™ã€‚ + +**構文** + +``` sql +largestTriangleThreeBuckets(n)(x, y) +``` + +エイリアス: `lttb`. + +**引数** + +- `x` — x座標。 [Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md)ã€[Decimal](../../../sql-reference/data-types/decimal.md)ã€[Date](../../../sql-reference/data-types/date.md)ã€[Date32](../../../sql-reference/data-types/date32.md)ã€[DateTime](../../../sql-reference/data-types/datetime.md)ã€[DateTime64](../../../sql-reference/data-types/datetime64.md)。 +- `y` — y座標。 [Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md)ã€[Decimal](../../../sql-reference/data-types/decimal.md)ã€[Date](../../../sql-reference/data-types/date.md)ã€[Date32](../../../sql-reference/data-types/date32.md)ã€[DateTime](../../../sql-reference/data-types/datetime.md)ã€[DateTime64](../../../sql-reference/data-types/datetime64.md)。 + +NaNã¯æä¾›ã•ã‚Œã‚‹ç³»åˆ—ã‹ã‚‰ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€NaN値ã¯åˆ†æžã‹ã‚‰é™¤å¤–ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€é–¢æ•°ãŒæœ‰åŠ¹ãªæ•°å€¤ãƒ‡ãƒ¼ã‚¿ã®ã¿ã«å¯¾ã—ã¦å‹•ä½œã™ã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¾ã™ã€‚ + +**パラメータ** + +- `n` — çµæžœã®ç³»åˆ—ã«å«ã¾ã‚Œã‚‹ãƒã‚¤ãƒ³ãƒˆæ•°ã€‚ [UInt64](../../../sql-reference/data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +[Tuple](../../../sql-reference/data-types/tuple.md)ã¨2ã¤ã®è¦ç´ ã‚’æŒã¤[Array](../../../sql-reference/data-types/array.md)。 + +**例** + +入力テーブル: + +``` text +┌─────x───────┬───────y──────┠+│ 1.000000000 │ 10.000000000 │ +│ 2.000000000 │ 20.000000000 │ +│ 3.000000000 │ 15.000000000 │ +│ 8.000000000 │ 60.000000000 │ +│ 9.000000000 │ 55.000000000 │ +│ 10.00000000 │ 70.000000000 │ +│ 4.000000000 │ 30.000000000 │ +│ 5.000000000 │ 40.000000000 │ +│ 6.000000000 │ 35.000000000 │ +│ 7.000000000 │ 50.000000000 │ +└─────────────┴──────────────┘ +``` + +クエリ: + +``` sql +SELECT largestTriangleThreeBuckets(4)(x, y) FROM largestTriangleThreeBuckets_test; +``` + +çµæžœ: + +``` text +┌────────largestTriangleThreeBuckets(4)(x, y)───────────┠+│ [(1,10),(3,15),(9,55),(10,70)] │ +└───────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/last_value.md b/docs/ja/sql-reference/aggregate-functions/reference/last_value.md new file mode 100644 index 00000000000..bc0c1af3105 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/last_value.md @@ -0,0 +1,79 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/last_value +sidebar_position: 160 +--- + +# last_value + +`anyLast` ã«ä¼¼ãŸæœ€å¾Œã«é­é‡ã—ãŸå€¤ã‚’é¸æŠžã—ã¾ã™ãŒã€NULL ã‚’å—ã‘入れるã“ã¨ãŒã§ãã¾ã™ã€‚ +主ã«[ウィンドウ関数](../../window-functions/index.md)ã¨å…±ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +ウィンドウ関数を使用ã—ãªã„å ´åˆã€ã‚½ãƒ¼ã‚¹ã‚¹ãƒˆãƒªãƒ¼ãƒ ãŒé †åºä»˜ã‘ã•ã‚Œã¦ã„ãªã„å ´åˆã€çµæžœã¯ãƒ©ãƒ³ãƒ€ãƒ ã«ãªã‚Šã¾ã™ã€‚ + +## 例 + +```sql +CREATE TABLE test_data +( + a Int64, + b Nullable(Int64) +) +ENGINE = Memory; + +INSERT INTO test_data (a, b) Values (1,null), (2,3), (4, 5), (6,null) +``` + +### 例1 +デフォルト㧠NULL 値ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +```sql +select last_value(b) from test_data +``` + +```text +┌─last_value_ignore_nulls(b)─┠+│ 5 │ +└────────────────────────────┘ +``` + +### 例2 +NULL 値ãŒç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +```sql +select last_value(b) ignore nulls from test_data +``` + +```text +┌─last_value_ignore_nulls(b)─┠+│ 5 │ +└────────────────────────────┘ +``` + +### 例3 +NULL 値ãŒå—ã‘入れられã¾ã™ã€‚ +```sql +select last_value(b) respect nulls from test_data +``` + +```text +┌─last_value_respect_nulls(b)─┠+│ á´ºáµá´¸á´¸ │ +└─────────────────────────────┘ +``` + +### 例4 +`ORDER BY` を使ã£ãŸã‚µãƒ–クエリã«ã‚ˆã‚‹å®‰å®šåŒ–ã—ãŸçµæžœã€‚ +```sql +SELECT + last_value_respect_nulls(b), + last_value(b) +FROM +( + SELECT * + FROM test_data + ORDER BY a ASC +) +``` + +```text +┌─last_value_respect_nulls(b)─┬─last_value(b)─┠+│ á´ºáµá´¸á´¸ │ 5 │ +└─────────────────────────────┴───────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/mannwhitneyutest.md b/docs/ja/sql-reference/aggregate-functions/reference/mannwhitneyutest.md new file mode 100644 index 00000000000..ffc4b286067 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/mannwhitneyutest.md @@ -0,0 +1,72 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/mannwhitneyutest +sidebar_position: 161 +sidebar_label: mannWhitneyUTest +--- + +# mannWhitneyUTest + +2ã¤ã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å¯¾ã—ã¦Mann-Whitneyé †ä½æ¤œå®šã‚’é©ç”¨ã—ã¾ã™ã€‚ + +**構文** + +``` sql +mannWhitneyUTest[(alternative[, continuity_correction])](sample_data, sample_index) +``` + +両方ã®ã‚µãƒ³ãƒ—ルã®å€¤ã¯`sample_data`カラムã«ã‚ã‚Šã¾ã™ã€‚`sample_index`ãŒ0ã®å ´åˆã€ãã®è¡Œã®å€¤ã¯æœ€åˆã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å±žã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ã€2番目ã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å±žã—ã¾ã™ã€‚帰無仮説ã¯ã€2ã¤ã®æ¯é›†å›£ãŒç¢ºçŽ‡çš„ã«ç­‰ã—ã„ã¨ã„ã†ã‚‚ã®ã§ã™ã€‚ã¾ãŸã€ç‰‡å´ã®ä»®èª¬ã‚’テストã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®ãƒ†ã‚¹ãƒˆã¯ãƒ‡ãƒ¼ã‚¿ãŒæ­£è¦åˆ†å¸ƒã—ã¦ã„ã‚‹ã¨ä»®å®šã—ã¾ã›ã‚“。 + +**引数** + +- `sample_data` — サンプルデータ。 [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 +- `sample_index` — サンプルインデックス。 [Integer](../../../sql-reference/data-types/int-uint.md)。 + +**パラメータ** + +- `alternative` — 対立仮説。(オプションã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: `'two-sided'`。) [String](../../../sql-reference/data-types/string.md)。 + - `'two-sided'`; + - `'greater'`; + - `'less'`。 +- `continuity_correction` — 0ã§ãªã„å ´åˆã€p値ã®æ­£è¦è¿‘ä¼¼ã«ãŠã„ã¦é€£ç¶šæ€§ä¿®æ­£ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚(オプションã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: 1。)[UInt64](../../../sql-reference/data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +2ã¤ã®è¦ç´ ã‚’æŒã¤[Tuple](../../../sql-reference/data-types/tuple.md): + +- 計算ã•ã‚ŒãŸU統計é‡ã€‚ [Float64](../../../sql-reference/data-types/float.md)。 +- 計算ã•ã‚ŒãŸp値。 [Float64](../../../sql-reference/data-types/float.md)。 + + +**例** + +入力テーブル: + +``` text +┌─sample_data─┬─sample_index─┠+│ 10 │ 0 │ +│ 11 │ 0 │ +│ 12 │ 0 │ +│ 1 │ 1 │ +│ 2 │ 1 │ +│ 3 │ 1 │ +└─────────────┴──────────────┘ +``` + +クエリ: + +``` sql +SELECT mannWhitneyUTest('greater')(sample_data, sample_index) FROM mww_ttest; +``` + +çµæžœ: + +``` text +┌─mannWhitneyUTest('greater')(sample_data, sample_index)─┠+│ (9,0.04042779918503192) │ +└────────────────────────────────────────────────────────┘ +``` + +**関連項目** + +- [Mann–Whitney U test](https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test) +- [確率順åº](https://en.wikipedia.org/wiki/Stochastic_ordering) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/max.md b/docs/ja/sql-reference/aggregate-functions/reference/max.md new file mode 100644 index 00000000000..2b9735c0fca --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/max.md @@ -0,0 +1,23 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/max +sidebar_position: 162 +title: max +--- + +値ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‹ã‚‰æœ€å¤§å€¤ã‚’計算ã™ã‚‹é›†è¨ˆé–¢æ•°ã€‚ + +例: + +``` +SELECT max(salary) FROM employees; +``` + +``` +SELECT department, max(salary) FROM employees GROUP BY department; +``` + +集計関数ã§ã¯ãªã„2ã¤ã®å€¤ã®æœ€å¤§ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€`greatest`ã‚’å‚ç…§ã—ã¦ãã ã•ã„: + +``` +SELECT greatest(a, b) FROM table; +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/maxintersections.md b/docs/ja/sql-reference/aggregate-functions/reference/maxintersections.md new file mode 100644 index 00000000000..99be72cdafa --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/maxintersections.md @@ -0,0 +1,64 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/maxintersections +sidebar_position: 163 +title: maxIntersections +--- + +# maxIntersections + +グループ内ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ãŒã©ã‚Œã ã‘多ã交差ã™ã‚‹ã‹ï¼ˆã™ã¹ã¦ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ãŒå°‘ãªãã¨ã‚‚1回交差ã™ã‚‹å ´åˆï¼‰ã®æœ€å¤§æ•°ã‚’計算ã™ã‚‹é›†ç´„関数ã§ã™ã€‚ + +構文ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +```sql +maxIntersections(start_column, end_column) +``` + +**引数** + +- `start_column` – å„インターãƒãƒ«ã®é–‹å§‹ã‚’表ã™æ•°å€¤ã‚«ãƒ©ãƒ ã€‚ã“ã®`start_column`ãŒ`NULL`ã¾ãŸã¯0ã®å ´åˆã€ãã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ + +- `end_column` - å„インターãƒãƒ«ã®çµ‚了を表ã™æ•°å€¤ã‚«ãƒ©ãƒ ã€‚ã“ã®`end_column`ãŒ`NULL`ã¾ãŸã¯0ã®å ´åˆã€ãã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ + +**戻り値** + +交差ã—ã¦ã„るインターãƒãƒ«ã®æœ€å¤§æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +```sql +CREATE TABLE my_events ( + start UInt32, + end UInt32 +) +Engine = MergeTree +ORDER BY tuple(); + +INSERT INTO my_events VALUES + (1, 3), + (1, 6), + (2, 5), + (3, 7); +``` + +ãã‚Œãžã‚Œã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +```response +1 - 3 +1 - - - - 6 + 2 - - 5 + 3 - - - 7 +``` + +ã“れらã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã®ã†ã¡3ã¤ãŒå…±é€šã®å€¤ã‚’æŒã£ã¦ã„ã¾ã™ï¼ˆå€¤ã¯`4`ã§ã™ãŒã€ãã®å…±é€šã®å€¤è‡ªä½“ã¯é‡è¦ã§ã¯ã‚ã‚Šã¾ã›ã‚“。交差ã®å›žæ•°ã‚’測定ã—ã¦ã„ã¾ã™ï¼‰ã€‚インターãƒãƒ«`(1,3)`ã¨`(3,7)`ã¯çµ‚点を共有ã—ã¦ã„ã¾ã™ãŒã€`maxIntersections`関数ã§ã¯äº¤å·®ã—ã¦ã„ã‚‹ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 + +```sql +SELECT maxIntersections(start, end) FROM my_events; +``` + +çµæžœ: +```response +3 +``` + +最大インターãƒãƒ«ãŒè¤‡æ•°å›žå‡ºç¾ã™ã‚‹å ´åˆã¯ã€[`maxIntersectionsPosition`関数](./maxintersectionsposition.md)を使用ã—ã¦ãれらã®å‡ºç¾å›žæ•°ã¨å ´æ‰€ã‚’特定ã§ãã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/aggregate-functions/reference/maxintersectionsposition.md b/docs/ja/sql-reference/aggregate-functions/reference/maxintersectionsposition.md new file mode 100644 index 00000000000..75c93aa8bad --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/maxintersectionsposition.md @@ -0,0 +1,64 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/maxintersectionsposition +sidebar_position: 164 +title: maxIntersectionsPosition +--- + +# maxIntersectionsPosition + +[`maxIntersections` 関数](./maxintersections.md) ã®å‡ºç¾ä½ç½®ã‚’計算ã™ã‚‹é›†ç´„関数ã§ã™ã€‚ + +ã“ã®æ§‹æ–‡ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +```sql +maxIntersectionsPosition(start_column, end_column) +``` + +**引数** + +- `start_column` – å„区間ã®é–‹å§‹ã‚’表ã™æ•°å€¤ã®ã‚«ãƒ©ãƒ ã€‚`start_column` ㌠`NULL` ã¾ãŸã¯ 0 ã®å ´åˆã€ãã®åŒºé–“ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ + +- `end_column` - å„区間ã®çµ‚了を表ã™æ•°å€¤ã®ã‚«ãƒ©ãƒ ã€‚`end_column` ㌠`NULL` ã¾ãŸã¯ 0 ã®å ´åˆã€ãã®åŒºé–“ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +最大数ã®åŒºé–“ãŒé‡ãªã‚‹é–‹å§‹ä½ç½®ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +```sql +CREATE TABLE my_events ( + start UInt32, + end UInt32 +) +Engine = MergeTree +ORDER BY tuple(); + +INSERT INTO my_events VALUES + (1, 3), + (1, 6), + (2, 5), + (3, 7); +``` + +区間ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +```response +1 - 3 +1 - - - - 6 + 2 - - 5 + 3 - - - 7 +``` + +ã“れらã®åŒºé–“ã®ã†ã¡3ã¤ãŒå€¤4を共有ã—ã¦ãŠã‚Šã€ãã‚Œã¯2番目ã®åŒºé–“ã‹ã‚‰å§‹ã¾ã£ã¦ã„ã¾ã™: + +```sql +SELECT maxIntersectionsPosition(start, end) FROM my_events; +``` + +出力: +```response +2 +``` + +言ã„æ›ãˆã‚Œã°ã€`(1,6)` ã®è¡ŒãŒ3ã¤ã®äº¤å·®ã™ã‚‹åŒºé–“ã®é–‹å§‹ã§ã‚ã‚Šã€3ãŒäº¤å·®ã™ã‚‹æœ€å¤§æ•°ã®åŒºé–“ã§ã™ã€‚ diff --git a/docs/ja/sql-reference/aggregate-functions/reference/maxmap.md b/docs/ja/sql-reference/aggregate-functions/reference/maxmap.md new file mode 100644 index 00000000000..6a859c9f449 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/maxmap.md @@ -0,0 +1,51 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/maxmap +sidebar_position: 165 +--- + +# maxMap + +`key` é…列ã§æŒ‡å®šã•ã‚ŒãŸã‚­ãƒ¼ã«åŸºã¥ã„ã¦ã€`value` é…列ã‹ã‚‰ã®æœ€å¤§å€¤ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +maxMap(key, value) +``` +ã¾ãŸã¯ +```sql +maxMap(Tuple(key, value)) +``` + +エイリアス: `maxMappedArrays` + +:::note +- キーã¨å€¤ã®é…列ã®ã‚¿ãƒ—ルを渡ã™ã“ã¨ã¯ã€2ã¤ã®é…列(キーã¨å€¤ï¼‰ã‚’渡ã™ã“ã¨ã¨åŒã˜ã§ã™ã€‚ +- `key` 㨠`value` ã®è¦ç´ æ•°ã¯ã€åˆè¨ˆã•ã‚Œã‚‹å„è¡Œã§åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +::: + +**パラメータ** + +- `key` — キーã®é…列。 [Array](../../data-types/array.md)。 +- `value` — 値ã®é…列。 [Array](../../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ソート順ã®ã‚­ãƒ¼ã®é…列ã¨ã€ãã‚Œã«å¯¾å¿œã™ã‚‹ã‚­ãƒ¼ã«å¯¾ã™ã‚‹è¨ˆç®—値ã®é…列をæŒã¤ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ [Tuple](../../data-types/tuple.md)([Array](../../data-types/array.md), [Array](../../data-types/array.md))。 + +**例** + +クエリ: + +``` sql +SELECT maxMap(a, b) +FROM values('a Array(Char), b Array(Int64)', (['x', 'y'], [2, 2]), (['y', 'z'], [3, 1])) +``` + +çµæžœ: + +``` text +┌─maxMap(a, b)───────────┠+│ [['x','y','z'],[2,3,1]]│ +└────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/meanztest.md b/docs/ja/sql-reference/aggregate-functions/reference/meanztest.md new file mode 100644 index 00000000000..a8295f6f2c6 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/meanztest.md @@ -0,0 +1,66 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/meanztest +sidebar_position: 166 +sidebar_label: meanZTest +--- + +# meanZTest + +2ã¤ã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å¹³å‡z検定をé©ç”¨ã—ã¾ã™ã€‚ + +**構文** + +``` sql +meanZTest(population_variance_x, population_variance_y, confidence_level)(sample_data, sample_index) +``` + +両サンプルã®å€¤ã¯ `sample_data` カラムã«å…¥ã£ã¦ã„ã¾ã™ã€‚`sample_index` ãŒ0ã®å ´åˆã€ãã®è¡Œã®å€¤ã¯æœ€åˆã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å±žã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€2番目ã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å±žã—ã¾ã™ã€‚帰無仮説ã¯æ¯é›†å›£ã®å¹³å‡ãŒç­‰ã—ã„ã¨ã„ã†ã‚‚ã®ã§ã™ã€‚æ­£è¦åˆ†å¸ƒãŒä»®å®šã•ã‚Œã¾ã™ã€‚æ¯é›†å›£ã¯ä¸ç­‰åˆ†æ•£ã‹ã‚‚ã—ã‚Œãšã€åˆ†æ•£ã¯æ—¢çŸ¥ã§ã™ã€‚ + +**引数** + +- `sample_data` — サンプルデータ。 [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../../sql-reference/data-types/decimal.md)。 +- `sample_index` — サンプルインデックス。 [Integer](../../../sql-reference/data-types/int-uint.md)。 + +**パラメータ** + +- `population_variance_x` — æ¯é›†å›£xã®åˆ†æ•£ã€‚ [Float](../../../sql-reference/data-types/float.md)。 +- `population_variance_y` — æ¯é›†å›£yã®åˆ†æ•£ã€‚ [Float](../../../sql-reference/data-types/float.md)。 +- `confidence_level` — 信頼区間を計算ã™ã‚‹ãŸã‚ã®ä¿¡é ¼æ°´æº–。 [Float](../../../sql-reference/data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +4ã¤ã®è¦ç´ ã‚’æŒã¤[Tuple](../../../sql-reference/data-types/tuple.md): + +- 計算ã•ã‚ŒãŸt統計é‡ã€‚ [Float64](../../../sql-reference/data-types/float.md)。 +- 計算ã•ã‚ŒãŸp値。 [Float64](../../../sql-reference/data-types/float.md)。 +- 計算ã•ã‚ŒãŸä¿¡é ¼åŒºé–“下é™ã€‚ [Float64](../../../sql-reference/data-types/float.md)。 +- 計算ã•ã‚ŒãŸä¿¡é ¼åŒºé–“上é™ã€‚ [Float64](../../../sql-reference/data-types/float.md)。 + +**例** + +入力テーブル: + +``` text +┌─sample_data─┬─sample_index─┠+│ 20.3 │ 0 │ +│ 21.9 │ 0 │ +│ 22.1 │ 0 │ +│ 18.9 │ 1 │ +│ 19 │ 1 │ +│ 20.3 │ 1 │ +└─────────────┴──────────────┘ +``` + +クエリ: + +``` sql +SELECT meanZTest(0.7, 0.45, 0.95)(sample_data, sample_index) FROM mean_ztest +``` + +çµæžœ: + +``` text +┌─meanZTest(0.7, 0.45, 0.95)(sample_data, sample_index)────────────────────────────┠+│ (3.2841296025548123,0.0010229786769086013,0.8198428246768334,3.2468238419898365) │ +└──────────────────────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/median.md b/docs/ja/sql-reference/aggregate-functions/reference/median.md new file mode 100644 index 00000000000..3e2ce80d8b0 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/median.md @@ -0,0 +1,48 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/median +sidebar_position: 167 +--- + +# median + +`median*` 関数ã¯ã€å¯¾å¿œã™ã‚‹ `quantile*` 関数ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã™ã€‚ã“れらã¯æ•°å€¤ãƒ‡ãƒ¼ã‚¿ã‚µãƒ³ãƒ—ルã®ä¸­å¤®å€¤ã‚’計算ã—ã¾ã™ã€‚ + +関数: + +- `median` — [quantile](../../../sql-reference/aggregate-functions/reference/quantile.md#quantile) ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ +- `medianDeterministic` — [quantileDeterministic](../../../sql-reference/aggregate-functions/reference/quantiledeterministic.md#quantiledeterministic) ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ +- `medianExact` — [quantileExact](../../../sql-reference/aggregate-functions/reference/quantileexact.md#quantileexact) ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ +- `medianExactWeighted` — [quantileExactWeighted](../../../sql-reference/aggregate-functions/reference/quantileexactweighted.md#quantileexactweighted) ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ +- `medianTiming` — [quantileTiming](../../../sql-reference/aggregate-functions/reference/quantiletiming.md#quantiletiming) ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ +- `medianTimingWeighted` — [quantileTimingWeighted](../../../sql-reference/aggregate-functions/reference/quantiletimingweighted.md#quantiletimingweighted) ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ +- `medianTDigest` — [quantileTDigest](../../../sql-reference/aggregate-functions/reference/quantiletdigest.md#quantiletdigest) ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ +- `medianTDigestWeighted` — [quantileTDigestWeighted](../../../sql-reference/aggregate-functions/reference/quantiletdigestweighted.md#quantiletdigestweighted) ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ +- `medianBFloat16` — [quantileBFloat16](../../../sql-reference/aggregate-functions/reference/quantilebfloat16.md#quantilebfloat16) ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ +- `medianDD` — [quantileDD](../../../sql-reference/aggregate-functions/reference/quantileddsketch.md#quantileddsketch) ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ + +**例** + +入力テーブル: + +``` text +┌─val─┠+│ 1 │ +│ 1 │ +│ 2 │ +│ 3 │ +└─────┘ +``` + +クエリ: + +``` sql +SELECT medianDeterministic(val, 1) FROM t; +``` + +çµæžœ: + +``` text +┌─medianDeterministic(val, 1)─┠+│ 1.5 │ +└─────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/min.md b/docs/ja/sql-reference/aggregate-functions/reference/min.md new file mode 100644 index 00000000000..2d75117bab7 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/min.md @@ -0,0 +1,23 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/min +sidebar_position: 168 +title: min +--- + +グループ内ã®å€¤ã®ä¸­ã‹ã‚‰æœ€å°å€¤ã‚’計算ã™ã‚‹é›†ç´„関数ã§ã™ã€‚ + +例: + +``` +SELECT min(salary) FROM employees; +``` + +``` +SELECT department, min(salary) FROM employees GROUP BY department; +``` + +2ã¤ã®å€¤ã‹ã‚‰æœ€å°å€¤ã‚’é¸æŠžã™ã‚‹éžé›†ç´„関数ãŒå¿…è¦ãªå ´åˆã¯ã€`least`ã‚’å‚ç…§ã—ã¦ãã ã•ã„: + +``` +SELECT least(a, b) FROM table; +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/minmap.md b/docs/ja/sql-reference/aggregate-functions/reference/minmap.md new file mode 100644 index 00000000000..fda0493f083 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/minmap.md @@ -0,0 +1,51 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/minmap +sidebar_position: 169 +--- + +# minMap + +`key` é…列ã§æŒ‡å®šã•ã‚ŒãŸã‚­ãƒ¼ã«åŸºã¥ã„ã¦ã€`value` é…列ã‹ã‚‰æœ€å°å€¤ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +`minMap(key, value)` +``` +ã¾ãŸã¯ +```sql +minMap(Tuple(key, value)) +``` + +別å: `minMappedArrays` + +:::note +- キーã®ã‚¿ãƒ—ルã¨å€¤ã®é…列を渡ã™ã“ã¨ã¯ã€ã‚­ãƒ¼ã®é…列ã¨å€¤ã®é…列を渡ã™ã“ã¨ã¨åŒã˜ã§ã™ã€‚ +- åˆè¨ˆã•ã‚Œã‚‹å„è¡Œã§ã€`key` 㨠`value` ã®è¦ç´ æ•°ã¯åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +::: + +**パラメータ** + +- `key` — キーã®é…列。[Array](../../data-types/array.md)。 +- `value` — 値ã®é…列。[Array](../../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ソート順ã«ä¸¦ã¹ã‚‰ã‚ŒãŸã‚­ãƒ¼ã¨ã€ãã‚Œã«å¯¾å¿œã™ã‚‹ã‚­ãƒ¼ã®ãŸã‚ã«è¨ˆç®—ã•ã‚ŒãŸå€¤ã®2ã¤ã®é…列をæŒã¤ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚[Tuple](../../data-types/tuple.md)([Array](../../data-types/array.md), [Array](../../data-types/array.md))。 + +**例** + +クエリ: + +``` sql +SELECT minMap(a, b) +FROM values('a Array(Int32), b Array(Int64)', ([1, 2], [2, 2]), ([2, 3], [1, 1])) +``` + +çµæžœ: + +``` text +┌─minMap(a, b)──────┠+│ ([1,2,3],[2,1,1]) │ +└───────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantile.md b/docs/ja/sql-reference/aggregate-functions/reference/quantile.md new file mode 100644 index 00000000000..ab1a4d6171c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantile.md @@ -0,0 +1,69 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantile +sidebar_position: 170 +--- + +# quantile + +数値データ列ã®è¿‘ä¼¼[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を計算ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€æœ€å¤§8192ã®ãƒªã‚¶ãƒ¼ãƒãƒ¼ã‚µã‚¤ã‚ºã‚’æŒã¤[リザーãƒãƒ¼ã‚µãƒ³ãƒ—リング](https://en.wikipedia.org/wiki/Reservoir_sampling)ã¨ã‚µãƒ³ãƒ—リング用ã®ä¹±æ•°ç”Ÿæˆå™¨ã‚’é©ç”¨ã—ã¾ã™ã€‚çµæžœã¯éžæ±ºå®šçš„ã§ã™ã€‚正確ãªåˆ†ä½æ•°ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€[quantileExact](../../../sql-reference/aggregate-functions/reference/quantileexact.md#quantileexact)関数を使用ã—ã¦ãã ã•ã„。 + +`クエリ`ã§ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã®è¤‡æ•°ã®`quantile*`関数を使用ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€`クエリ`ã¯æœ¬æ¥å¯èƒ½ãªåŠ¹çŽ‡ã§å‹•ä½œã—ã¾ã›ã‚“)。ã“ã®å ´åˆã¯ã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles)関数を使用ã—ã¦ãã ã•ã„。 + +空ã®æ•°å€¤åˆ—ã®å ´åˆã€`quantile`ã¯NaNã‚’è¿”ã—ã¾ã™ãŒã€`quantile*`ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã¯NaNã¾ãŸã¯åˆ—åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ï¼ˆãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã«ã‚ˆã‚Šã¾ã™ï¼‰ã€‚ + +**構文** + +``` sql +quantile(level)(expr) +``` + +別å: `median`. + +**引数** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメータ。0ã‹ã‚‰1ã¾ã§ã®å®šæ•°ã®æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level`値ã¨ã—ã¦`[0.01, 0.99]`ã®ç¯„囲を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルト値: 0.5。`level=0.5`ã®å ´åˆã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ +- `expr` — 数値型ã€[Date](../../../sql-reference/data-types/date.md)ã¾ãŸã¯[DateTime](../../../sql-reference/data-types/datetime.md)ã®çµæžœã¨ãªã‚‹ã‚«ãƒ©ãƒ å€¤ã¸ã®å¼ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®è¿‘似分ä½æ•°ã€‚ + +åž‹: + +- 数値データ型入力ã®å ´åˆã¯[Float64](../../../sql-reference/data-types/float.md)。 +- 入力値ãŒ`Date`åž‹ã®å ´åˆã¯[Date](../../../sql-reference/data-types/date.md)。 +- 入力値ãŒ`DateTime`åž‹ã®å ´åˆã¯[DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +入力テーブル: + +``` text +┌─val─┠+│ 1 │ +│ 1 │ +│ 2 │ +│ 3 │ +└─────┘ +``` + +クエリ: + +``` sql +SELECT quantile(val) FROM t +``` + +çµæžœ: + +``` text +┌─quantile(val)─┠+│ 1.5 │ +└───────────────┘ +``` + +**å‚ç…§** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantileGK.md b/docs/ja/sql-reference/aggregate-functions/reference/quantileGK.md new file mode 100644 index 00000000000..80533236537 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantileGK.md @@ -0,0 +1,73 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantileGK +sidebar_position: 175 +--- + +# quantileGK + +数値データシーケンスã®[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)ã‚’[Greenwald-Khanna](http://infolab.stanford.edu/~datar/courses/cs361a/papers/quantiles.pdf)アルゴリズムを使用ã—ã¦è¨ˆç®—ã—ã¾ã™ã€‚Greenwald-Khannaアルゴリズムã¯ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒªãƒ¼ãƒ ä¸Šã§åˆ†ä½æ•°ã‚’éžå¸¸ã«åŠ¹çŽ‡çš„ã«è¨ˆç®—ã™ã‚‹ãŸã‚ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã§ã™ã€‚2001å¹´ã«Michael Greenwaldã¨Sanjeev Khannaã«ã‚ˆã£ã¦ç™ºè¡¨ã•ã‚Œã¾ã—ãŸã€‚ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ã€ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒªãƒ¼ãƒ ä¸Šã§æ­£ç¢ºãªåˆ†ä½æ•°ã‚’計算ã™ã‚‹å¿…è¦ãŒã‚るデータベースやビッグデータシステムã§åºƒã使用ã•ã‚Œã¦ã„ã¾ã™ã€‚アルゴリズムã¯éžå¸¸ã«åŠ¹çŽ‡çš„ã§ã€O(log n)ã®ç©ºé–“ã¨O(log log n)ã®æ™‚é–“ã§é …目を処ç†ã—ã¾ã™ï¼ˆã“ã“ã§nã¯å…¥åŠ›ã®ã‚µã‚¤ã‚ºã§ã™ï¼‰ã€‚ã¾ãŸéžå¸¸ã«æ­£ç¢ºã§ã€é«˜ã„確率ã§è¿‘似分ä½æ•°ã®å€¤ã‚’æä¾›ã—ã¾ã™ã€‚ + +`quantileGK`ã¯ã€ClickHouseã®ä»–ã®åˆ†ä½æ•°é–¢æ•°ã¨ã¯ç•°ãªã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¿‘似分ä½æ•°çµæžœã®ç²¾åº¦ã‚’制御ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +``` sql +quantileGK(accuracy, level)(expr) +``` + +エイリアス: `medianGK`. + +**引数** + +- `accuracy` — 分ä½æ•°ã®ç²¾åº¦ã€‚定数ã®æ­£ã®æ•´æ•°ã€‚大ããªç²¾åº¦å€¤ã¯ã‚¨ãƒ©ãƒ¼ãŒå°‘ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚例ãˆã°ã€ç²¾åº¦å¼•æ•°ã‚’100ã«è¨­å®šã™ã‚‹ã¨ã€é«˜ã„確率ã§è¨ˆç®—ã•ã‚ŒãŸåˆ†ä½æ•°ã®ã‚¨ãƒ©ãƒ¼ã¯1%を超ãˆã¾ã›ã‚“。計算ã•ã‚ŒãŸåˆ†ä½æ•°ã®ç²¾åº¦ã¨ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®è¨ˆç®—複雑性ã¨ã®é–“ã«ã¯ãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ãŒã‚ã‚Šã¾ã™ã€‚高ã„精度ã¯ã€åˆ†ä½æ•°ã‚’正確ã«è¨ˆç®—ã™ã‚‹ãŸã‚ã«ã‚ˆã‚Šå¤šãã®ãƒ¡ãƒ¢ãƒªã¨è¨ˆç®—リソースを必è¦ã¨ã—ã¾ã™ãŒã€ä½Žã„精度引数ã¯ã€ã‚ãšã‹ã«ç²¾åº¦ãŒä½Žã„ã‚‚ã®ã®ã€ã‚ˆã‚Šé«˜é€Ÿã§ãƒ¡ãƒ¢ãƒªã‚¨ãƒ•ã‚£ã‚·ã‚§ãƒ³ãƒˆãªè¨ˆç®—ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメータ。0ã‹ã‚‰1ã®ç¯„囲ã®å®šæ•°æµ®å‹•å°æ•°ç‚¹æ•°ã€‚デフォルト値: 0.5。`level=0.5`ã®ã¨ãã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ + +- `expr` — 数値[データ型](../../../sql-reference/data-types/index.md#data_types)ã€[Date](../../../sql-reference/data-types/date.md)ã¾ãŸã¯[DateTime](../../../sql-reference/data-types/datetime.md)ã«ãªã‚‹ã‚«ãƒ©ãƒ å€¤ã«å¯¾ã™ã‚‹å¼ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã—ãŸãƒ¬ãƒ™ãƒ«ã¨ç²¾åº¦ã®åˆ†ä½æ•°ã€‚ + +タイプ: + +- 数値データ型入力ã®å ´åˆã¯[Float64](../../../sql-reference/data-types/float.md)。 +- 入力値ãŒ`Date`åž‹ã®å ´åˆã¯[Date](../../../sql-reference/data-types/date.md)。 +- 入力値ãŒ`DateTime`åž‹ã®å ´åˆã¯[DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +``` sql +SELECT quantileGK(1, 0.25)(number + 1) +FROM numbers(1000) + +┌─quantileGK(1, 0.25)(plus(number, 1))─┠+│ 1 │ +└──────────────────────────────────────┘ + +SELECT quantileGK(10, 0.25)(number + 1) +FROM numbers(1000) + +┌─quantileGK(10, 0.25)(plus(number, 1))─┠+│ 156 │ +└───────────────────────────────────────┘ + +SELECT quantileGK(100, 0.25)(number + 1) +FROM numbers(1000) + +┌─quantileGK(100, 0.25)(plus(number, 1))─┠+│ 251 │ +└────────────────────────────────────────┘ + +SELECT quantileGK(1000, 0.25)(number + 1) +FROM numbers(1000) + +┌─quantileGK(1000, 0.25)(plus(number, 1))─┠+│ 249 │ +└─────────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantilebfloat16.md b/docs/ja/sql-reference/aggregate-functions/reference/quantilebfloat16.md new file mode 100644 index 00000000000..e216a738807 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantilebfloat16.md @@ -0,0 +1,66 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantilebfloat16 +sidebar_position: 171 +title: quantileBFloat16 +--- + +[bfloat16](https://en.wikipedia.org/wiki/Bfloat16_floating-point_format) 数値ã®ã‚µãƒ³ãƒ—ルã‹ã‚‰è¿‘似的ãª[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を計算ã—ã¾ã™ã€‚`bfloat16` ã¯ã€1ビットã®ç¬¦å·ãƒ“ットã€8ビットã®æŒ‡æ•°ãƒ“ットã€ãŠã‚ˆã³7ビットã®ä»®æ•°ãƒ“ットをæŒã¤æµ®å‹•å°æ•°ç‚¹ãƒ‡ãƒ¼ã‚¿åž‹ã§ã™ã€‚関数ã¯å…¥åŠ›å€¤ã‚’32ビット浮動å°æ•°ç‚¹ã«å¤‰æ›ã—ã€æœ€ä¸Šä½ã®16ビットをå–り出ã—ã¾ã™ã€‚次㫠`bfloat16` ã®åˆ†ä½æ•°ã‚’計算ã—ã€çµæžœã‚’64ビットã®æµ®å‹•å°æ•°ç‚¹ã«ã‚¼ãƒ­ãƒ“ットを追加ã—ã¦å¤‰æ›ã—ã¾ã™ã€‚関数ã¯ç›¸å¯¾èª¤å·®ãŒ0.390625%以下ã®é«˜é€Ÿãªåˆ†ä½æ•°æŽ¨å®šå™¨ã§ã™ã€‚ + +**構文** + +``` sql +quantileBFloat16[(level)](expr) +``` + +エイリアス: `medianBFloat16` + +**引数** + +- `expr` — 数値データをæŒã¤ã‚«ãƒ©ãƒ ã€‚[æ•´æ•°](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md)。 + +**パラメータ** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚ä»»æ„項目。å¯èƒ½ãªå€¤ã¯0ã‹ã‚‰1ã¾ã§ã®ç¯„囲ã§ã™ã€‚デフォルト値: 0.5。 [Float](../../../sql-reference/data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®è¿‘似的ãªåˆ†ä½æ•°ã€‚ + +タイプ: [Float64](../../../sql-reference/data-types/float.md#float32-float64)。 + +**例** + +入力テーブルã«ã¯æ•´æ•°ã‚«ãƒ©ãƒ ã¨æµ®å‹•å°æ•°ç‚¹ã‚«ãƒ©ãƒ ãŒã‚ã‚Šã¾ã™: + +``` text +┌─a─┬─────b─┠+│ 1 │ 1.001 │ +│ 2 │ 1.002 │ +│ 3 │ 1.003 │ +│ 4 │ 1.004 │ +└───┴───────┘ +``` + +0.75分ä½æ•°ï¼ˆç¬¬3四分ä½ï¼‰ã‚’計算ã™ã‚‹ã‚¯ã‚¨ãƒª: + +``` sql +SELECT quantileBFloat16(0.75)(a), quantileBFloat16(0.75)(b) FROM example_table; +``` + +çµæžœ: + +``` text +┌─quantileBFloat16(0.75)(a)─┬─quantileBFloat16(0.75)(b)─┠+│ 3 │ 1 │ +└───────────────────────────┴───────────────────────────┘ +``` +例ã§ã¯ã€æµ®å‹•å°æ•°ç‚¹å€¤ãŒã™ã¹ã¦ `bfloat16` ã«å¤‰æ›ã•ã‚Œã‚‹ã¨ãã«1.0ã«åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +# quantileBFloat16Weighted + +`quantileBFloat16` ã«ä¼¼ã¦ã„ã¾ã™ãŒã€ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ãƒ¡ãƒ³ãƒãƒ¼ã®é‡ã¿ã‚’考慮ã—ã¾ã™ã€‚ + +**関連項目** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantileddsketch.md b/docs/ja/sql-reference/aggregate-functions/reference/quantileddsketch.md new file mode 100644 index 00000000000..80db65da015 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantileddsketch.md @@ -0,0 +1,61 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantileddsketch +sidebar_position: 171 +title: quantileDD +--- + +サンプルã®è¿‘ä¼¼[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を相対誤差ä¿è¨¼ä»˜ãã§è¨ˆç®—ã—ã¾ã™ã€‚ã“ã‚Œã¯[DD](https://www.vldb.org/pvldb/vol12/p2195-masson.pdf)を構築ã™ã‚‹ã“ã¨ã§å‹•ä½œã—ã¾ã™ã€‚ + +**構文** + +``` sql +quantileDD(relative_accuracy, [level])(expr) +``` + +**引数** + +- `expr` — 数値データをå«ã‚€ã‚«ãƒ©ãƒ ã€‚ [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md). + +**パラメータ** + +- `relative_accuracy` — 分ä½æ•°ã®ç›¸å¯¾ç²¾åº¦ã€‚å¯èƒ½ãªå€¤ã¯0ã‹ã‚‰1ã®ç¯„囲ã§ã™ã€‚[Float](../../../sql-reference/data-types/float.md)。スケッãƒã®ã‚µã‚¤ã‚ºã¯ãƒ‡ãƒ¼ã‚¿ã®ç¯„囲ã¨ç›¸å¯¾ç²¾åº¦ã«ä¾å­˜ã—ã¾ã™ã€‚範囲ãŒå¤§ãã相対精度ãŒå°ã•ã„ã»ã©ã€ã‚¹ã‚±ãƒƒãƒã¯å¤§ãããªã‚Šã¾ã™ã€‚スケッãƒã®å¤§ã¾ã‹ãªãƒ¡ãƒ¢ãƒªã‚µã‚¤ã‚ºã¯ `log(max_value/min_value)/relative_accuracy` ã§ã™ã€‚推奨値ã¯0.001以上ã§ã™ã€‚ + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ã¯0ã‹ã‚‰1ã®ç¯„囲ã§ã™ã€‚デフォルト値:0.5。[Float](../../../sql-reference/data-types/float.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®è¿‘似分ä½æ•°ã€‚ + +åž‹: [Float64](../../../sql-reference/data-types/float.md#float32-float64). + +**例** + +入力テーブルã¯æ•´æ•°ã‚«ãƒ©ãƒ ã¨æµ®å‹•å°æ•°ç‚¹ã‚«ãƒ©ãƒ ã‚’æŒã¡ã¾ã™: + +``` text +┌─a─┬─────b─┠+│ 1 │ 1.001 │ +│ 2 │ 1.002 │ +│ 3 │ 1.003 │ +│ 4 │ 1.004 │ +└───┴───────┘ +``` + +0.75-分ä½æ•°ï¼ˆç¬¬3四分ä½ï¼‰ã‚’計算ã™ã‚‹ã‚¯ã‚¨ãƒª: + +``` sql +SELECT quantileDD(0.01, 0.75)(a), quantileDD(0.01, 0.75)(b) FROM example_table; +``` + +çµæžœ: + +``` text +┌─quantileDD(0.01, 0.75)(a)─┬─quantileDD(0.01, 0.75)(b)─┠+│ 2.974233423476717 │ 1.01 │ +└─────────────────────────────────┴─────────────────────────────────┘ +``` + +**関連項目** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiledeterministic.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiledeterministic.md new file mode 100644 index 00000000000..c49c552bdb8 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiledeterministic.md @@ -0,0 +1,68 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantiledeterministic +sidebar_position: 172 +--- + +# quantileDeterministic + +数値データシーケンスã®è¿‘似的ãª[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を計算ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€æœ€å¤§8192ã®ãƒªã‚¶ãƒ¼ãƒã‚µã‚¤ã‚ºã‚’æŒã¤[リザーãƒã‚µãƒ³ãƒ—リング](https://en.wikipedia.org/wiki/Reservoir_sampling)ã¨ã‚µãƒ³ãƒ—リングã®æ±ºå®šçš„ãªã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’é©ç”¨ã—ã¾ã™ã€‚çµæžœã¯æ±ºå®šè«–çš„ã§ã™ã€‚正確ãªåˆ†ä½æ•°ã‚’å¾—ã‚‹ã«ã¯ã€[quantileExact](../../../sql-reference/aggregate-functions/reference/quantileexact.md#quantileexact)関数を使用ã—ã¦ãã ã•ã„。 + +クエリã§ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã®è¤‡æ•°ã®`quantile*`関数を使用ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯åŠ¹çŽ‡çš„ã«å‹•ä½œã—ã¾ã›ã‚“)。ã“ã®å ´åˆã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles)関数を使用ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +quantileDeterministic(level)(expr, determinator) +``` + +エイリアス: `medianDeterministic`. + +**引数** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメータ。0ã‹ã‚‰1ã¾ã§ã®å®šæ•°æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level`値㯠`[0.01, 0.99]` ã®ç¯„囲ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルト値: 0.5。`level=0.5`ã§ã¯ã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ +- `expr` — 数値[データ型](../../../sql-reference/data-types/index.md#data_types)ã€[Date](../../../sql-reference/data-types/date.md)ã¾ãŸã¯[DateTime](../../../sql-reference/data-types/datetime.md)ã®ã‚«ãƒ©ãƒ å€¤ã«åŸºã¥ãå¼ã€‚ +- `determinator` — リザーãƒã‚µãƒ³ãƒ—リングアルゴリズムã§ãƒ©ãƒ³ãƒ€ãƒ æ•°ç”Ÿæˆå™¨ã®ä»£ã‚ã‚Šã«ç”¨ã„ã‚‹ãƒãƒƒã‚·ãƒ¥ãŒä½¿ç”¨ã•ã‚Œã‚‹æ•°å€¤ã€‚サンプリングçµæžœã‚’決定論的ã«ã™ã‚‹ãŸã‚ã«åˆ©ç”¨ã•ã‚Œã¾ã™ã€‚ä»»æ„ã®æ±ºå®šè«–çš„ãªæ­£ã®æ•°å€¤ã€ä¾‹ãˆã°ãƒ¦ãƒ¼ã‚¶ãƒ¼IDやイベントIDを使用ã§ãã¾ã™ã€‚åŒã˜`determinator`値ãŒé »ç¹ã«å‡ºç¾ã™ã‚‹å ´åˆã€é–¢æ•°ã¯æ­£ã—ã動作ã—ã¾ã›ã‚“。 + +**戻り値** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®è¿‘似的ãªåˆ†ä½æ•°ã€‚ + +åž‹: + +- 数値データ型入力ã®å ´åˆã¯[Float64](../../../sql-reference/data-types/float.md)。 +- 入力値ãŒ`Date`åž‹ã®å ´åˆã¯[Date](../../../sql-reference/data-types/date.md)。 +- 入力値ãŒ`DateTime`åž‹ã®å ´åˆã¯[DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +入力テーブル: + +``` text +┌─val─┠+│ 1 │ +│ 1 │ +│ 2 │ +│ 3 │ +└─────┘ +``` + +クエリ: + +``` sql +SELECT quantileDeterministic(val, 1) FROM t +``` + +çµæžœ: + +``` text +┌─quantileDeterministic(val, 1)─┠+│ 1.5 │ +└───────────────────────────────┘ +``` + +**関連項目** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantileexact.md b/docs/ja/sql-reference/aggregate-functions/reference/quantileexact.md new file mode 100644 index 00000000000..eee9d86fc6a --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantileexact.md @@ -0,0 +1,271 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantileexact +sidebar_position: 173 +--- + +# quantileExact 関数 + +## quantileExact + +数値データ列ã®[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を正確ã«è¨ˆç®—ã—ã¾ã™ã€‚ + +正確ãªå€¤ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ã€æ¸¡ã•ã‚ŒãŸå…¨ã¦ã®å€¤ã¯é…列ã«çµåˆã•ã‚Œã€éƒ¨åˆ†çš„ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ãã®ãŸã‚ã€é–¢æ•°ã¯ `O(n)` ã®ãƒ¡ãƒ¢ãƒªã‚’消費ã—ã€ã“ã“㧠`n` ã¯æ¸¡ã•ã‚ŒãŸå€¤ã®æ•°ã§ã™ã€‚ãŸã ã—ã€å°‘æ•°ã®å€¤ã®å ´åˆã€ã“ã®é–¢æ•°ã¯éžå¸¸ã«åŠ¹æžœçš„ã§ã™ã€‚ + +ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã®è¤‡æ•°ã® `quantile*` 関数をクエリã§ä½¿ç”¨ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯å¯èƒ½ãªé™ã‚ŠåŠ¹çŽ‡çš„ã«å‹•ä½œã—ã¾ã›ã‚“)。ã“ã®å ´åˆã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) 関数を使用ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +quantileExact(level)(expr) +``` + +エイリアス: `medianExact`。 + +**引数** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメーター。0ã‹ã‚‰1ã¾ã§ã®å®šæ•°ã®æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level` 値を `[0.01, 0.99]` 範囲ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルト値: 0.5。`level=0.5` ã®å ´åˆã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ +- `expr` — 数値型ã®[データタイプ](../../../sql-reference/data-types/index.md#data_types)ã€[Date](../../../sql-reference/data-types/date.md)ã€ã¾ãŸã¯[DateTime](../../../sql-reference/data-types/datetime.md)ã«çµæžœã™ã‚‹ã‚«ãƒ©ãƒ å€¤ã«å¯¾ã™ã‚‹å¼ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½æ•°ã€‚ + +タイプ: + +- 数値データ型入力ã®å ´åˆã¯ [Float64](../../../sql-reference/data-types/float.md)。 +- 入力値㌠`Date` åž‹ã®å ´åˆã¯ [Date](../../../sql-reference/data-types/date.md)。 +- 入力値㌠`DateTime` åž‹ã®å ´åˆã¯ [DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +クエリ: + +``` sql +SELECT quantileExact(number) FROM numbers(10) +``` + +çµæžœ: + +``` text +┌─quantileExact(number)─┠+│ 5 │ +└───────────────────────┘ +``` + +## quantileExactLow + +`quantileExact` ã¨åŒæ§˜ã«ã€æ•°å€¤ãƒ‡ãƒ¼ã‚¿åˆ—ã®æ­£ç¢ºãª[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を計算ã—ã¾ã™ã€‚ + +正確ãªå€¤ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ã€æ¸¡ã•ã‚ŒãŸå…¨ã¦ã®å€¤ã¯é…列ã«çµåˆã•ã‚Œã€å®Œå…¨ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ソート[アルゴリズム](https://en.cppreference.com/w/cpp/algorithm/sort)ã®è¤‡é›‘ã•ã¯ `O(N·log(N))` ã§ã‚ã‚Šã€ã“ã“㧠`N = std::distance(first, last)` 比較ãŒã‚ã‚Šã¾ã™ã€‚ + +è¿”ã•ã‚Œã‚‹å€¤ã¯åˆ†ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã¨é¸æŠžå†…ã®è¦ç´ æ•°ã«ä¾å­˜ã—ã¾ã™ã€‚例ãˆã°ã€ãƒ¬ãƒ™ãƒ«ãŒ0.5ã®å ´åˆã€å¶æ•°å€‹ã®è¦ç´ ã«ã¯ä¸‹ä½ã®ä¸­å¤®å€¤ã‚’è¿”ã—ã€å¥‡æ•°å€‹ã®è¦ç´ ã«ã¯ä¸­å¤®ã®ä¸­å¤®å€¤ã‚’è¿”ã—ã¾ã™ã€‚中央値ã¯ã€pythonã§ä½¿ç”¨ã•ã‚Œã‚‹ [median_low](https://docs.python.org/3/library/statistics.html#statistics.median_low) 実装ã¨åŒæ§˜ã«è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +ä»–ã®å…¨ã¦ã®ãƒ¬ãƒ™ãƒ«ã§ã¯ã€`level * size_of_array` ã®å€¤ã«å¯¾å¿œã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®è¦ç´ ãŒè¿”ã•ã‚Œã¾ã™ã€‚例ãˆã°: + +``` sql +SELECT quantileExactLow(0.1)(number) FROM numbers(10) + +┌─quantileExactLow(0.1)(number)─┠+│ 1 │ +└───────────────────────────────┘ +``` + +ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã®è¤‡æ•°ã® `quantile*` 関数をクエリã§ä½¿ç”¨ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯å¯èƒ½ãªé™ã‚ŠåŠ¹çŽ‡çš„ã«å‹•ä½œã—ã¾ã›ã‚“)。ã“ã®å ´åˆã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) 関数を使用ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +quantileExactLow(level)(expr) +``` + +エイリアス: `medianExactLow`。 + +**引数** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメーター。0ã‹ã‚‰1ã¾ã§ã®å®šæ•°ã®æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level` 値を `[0.01, 0.99]` 範囲ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルト値: 0.5。`level=0.5` ã®å ´åˆã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ +- `expr` — 数値型ã®[データタイプ](../../../sql-reference/data-types/index.md#data_types)ã€[Date](../../../sql-reference/data-types/date.md)ã€ã¾ãŸã¯[DateTime](../../../sql-reference/data-types/datetime.md)ã«çµæžœã™ã‚‹ã‚«ãƒ©ãƒ å€¤ã«å¯¾ã™ã‚‹å¼ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½æ•°ã€‚ + +タイプ: + +- 数値データ型入力ã®å ´åˆã¯ [Float64](../../../sql-reference/data-types/float.md)。 +- 入力値㌠`Date` åž‹ã®å ´åˆã¯ [Date](../../../sql-reference/data-types/date.md)。 +- 入力値㌠`DateTime` åž‹ã®å ´åˆã¯ [DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +クエリ: + +``` sql +SELECT quantileExactLow(number) FROM numbers(10) +``` + +çµæžœ: + +``` text +┌─quantileExactLow(number)─┠+│ 4 │ +└──────────────────────────┘ +``` +## quantileExactHigh + +`quantileExact` ã¨åŒæ§˜ã«ã€æ•°å€¤ãƒ‡ãƒ¼ã‚¿åˆ—ã®æ­£ç¢ºãª[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を計算ã—ã¾ã™ã€‚ + +渡ã•ã‚ŒãŸå…¨ã¦ã®å€¤ã¯é…列ã«çµåˆã•ã‚Œã€æ­£ç¢ºãªå€¤ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«å®Œå…¨ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ソート[アルゴリズム](https://en.cppreference.com/w/cpp/algorithm/sort)ã®è¤‡é›‘ã•ã¯ `O(N·log(N))` ã§ã‚ã‚Šã€ã“ã“㧠`N = std::distance(first, last)` 比較ãŒã‚ã‚Šã¾ã™ã€‚ + +è¿”ã•ã‚Œã‚‹å€¤ã¯åˆ†ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã¨é¸æŠžå†…ã®è¦ç´ æ•°ã«ä¾å­˜ã—ã¾ã™ã€‚例ãˆã°ã€ãƒ¬ãƒ™ãƒ«ãŒ0.5ã®å ´åˆã€å¶æ•°å€‹ã®è¦ç´ ã«ã¯ä¸Šä½ã®ä¸­å¤®å€¤ã‚’è¿”ã—ã€å¥‡æ•°å€‹ã®è¦ç´ ã«ã¯ä¸­å¤®ã®ä¸­å¤®å€¤ã‚’è¿”ã—ã¾ã™ã€‚中央値ã¯ã€pythonã§ä½¿ç”¨ã•ã‚Œã‚‹ [median_high](https://docs.python.org/3/library/statistics.html#statistics.median_high) 実装ã¨åŒæ§˜ã«è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ä»–ã®å…¨ã¦ã®ãƒ¬ãƒ™ãƒ«ã§ã¯ã€`level * size_of_array` ã®å€¤ã«å¯¾å¿œã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®è¦ç´ ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +ã“ã®å®Ÿè£…ã¯ã€ç¾åœ¨ã® `quantileExact` 実装ã¨å®Œå…¨ã«åŒã˜ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ã€‚ + +ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã®è¤‡æ•°ã® `quantile*` 関数をクエリã§ä½¿ç”¨ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯å¯èƒ½ãªé™ã‚ŠåŠ¹çŽ‡çš„ã«å‹•ä½œã—ã¾ã›ã‚“)。ã“ã®å ´åˆã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) 関数を使用ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +quantileExactHigh(level)(expr) +``` + +エイリアス: `medianExactHigh`。 + +**引数** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメーター。0ã‹ã‚‰1ã¾ã§ã®å®šæ•°ã®æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level` 値を `[0.01, 0.99]` 範囲ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルト値: 0.5。`level=0.5` ã®å ´åˆã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ +- `expr` — 数値型ã®[データタイプ](../../../sql-reference/data-types/index.md#data_types)ã€[Date](../../../sql-reference/data-types/date.md)ã€ã¾ãŸã¯[DateTime](../../../sql-reference/data-types/datetime.md)ã«çµæžœã™ã‚‹ã‚«ãƒ©ãƒ å€¤ã«å¯¾ã™ã‚‹å¼ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½æ•°ã€‚ + +タイプ: + +- 数値データ型入力ã®å ´åˆã¯ [Float64](../../../sql-reference/data-types/float.md)。 +- 入力値㌠`Date` åž‹ã®å ´åˆã¯ [Date](../../../sql-reference/data-types/date.md)。 +- 入力値㌠`DateTime` åž‹ã®å ´åˆã¯ [DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +クエリ: + +``` sql +SELECT quantileExactHigh(number) FROM numbers(10) +``` + +çµæžœ: + +``` text +┌─quantileExactHigh(number)─┠+│ 5 │ +└──────────────────────────┘ +``` + +## quantileExactExclusive + +数値データ列ã®[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を正確ã«è¨ˆç®—ã—ã¾ã™ã€‚ + +正確ãªå€¤ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ã€æ¸¡ã•ã‚ŒãŸå…¨ã¦ã®å€¤ã¯é…列ã«çµåˆã•ã‚Œã€éƒ¨åˆ†çš„ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ãã®ãŸã‚ã€é–¢æ•°ã¯ `O(n)` ã®ãƒ¡ãƒ¢ãƒªã‚’消費ã—ã€ã“ã“㧠`n` ã¯æ¸¡ã•ã‚ŒãŸå€¤ã®æ•°ã§ã™ã€‚ãŸã ã—ã€å°‘æ•°ã®å€¤ã®å ´åˆã€ã“ã®é–¢æ•°ã¯éžå¸¸ã«åŠ¹æžœçš„ã§ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€Excel ã® [PERCENTILE.EXC](https://support.microsoft.com/en-us/office/percentile-exc-function-bbaa7204-e9e1-4010-85bf-c31dc5dce4ba) 関数ã¨åŒç­‰ã§ã‚ã‚Šã€ï¼ˆ[タイプ R6](https://en.wikipedia.org/wiki/Quantile#Estimating_quantiles_from_a_sample))ã§ã™ã€‚ + +ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã® `quantileExactExclusive` 関数をクエリã§ä½¿ç”¨ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯å¯èƒ½ãªé™ã‚ŠåŠ¹çŽ‡çš„ã«å‹•ä½œã—ã¾ã›ã‚“)。ã“ã®å ´åˆã€[quantilesExactExclusive](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantilesexactexclusive) 関数を使用ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +quantileExactExclusive(level)(expr) +``` + +**引数** + +- `expr` — 数値型ã®[データタイプ](../../../sql-reference/data-types/index.md#data_types)ã€[Date](../../../sql-reference/data-types/date.md)ã€ã¾ãŸã¯[DateTime](../../../sql-reference/data-types/datetime.md)ã«çµæžœã™ã‚‹ã‚«ãƒ©ãƒ å€¤ã«å¯¾ã™ã‚‹å¼ã€‚ + +**パラメーター** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプション。(0, 1) — 範囲ã¯å«ã¾ã‚Œã¾ã›ã‚“。デフォルト値: 0.5。`level=0.5` ã®å ´åˆã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚[Float](../../../sql-reference/data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½æ•°ã€‚ + +タイプ: + +- 数値データ型入力ã®å ´åˆã¯ [Float64](../../../sql-reference/data-types/float.md)。 +- 入力値㌠`Date` åž‹ã®å ´åˆã¯ [Date](../../../sql-reference/data-types/date.md)。 +- 入力値㌠`DateTime` åž‹ã®å ´åˆã¯ [DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +クエリ: + +``` sql +CREATE TABLE num AS numbers(1000); + +SELECT quantileExactExclusive(0.6)(x) FROM (SELECT number AS x FROM num); +``` + +çµæžœ: + +``` text +┌─quantileExactExclusive(0.6)(x)─┠+│ 599.6 │ +└────────────────────────────────┘ +``` + +## quantileExactInclusive + +数値データ列ã®[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を正確ã«è¨ˆç®—ã—ã¾ã™ã€‚ + +正確ãªå€¤ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ã€æ¸¡ã•ã‚ŒãŸå…¨ã¦ã®å€¤ã¯é…列ã«çµåˆã•ã‚Œã€éƒ¨åˆ†çš„ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ãã®ãŸã‚ã€é–¢æ•°ã¯ `O(n)` ã®ãƒ¡ãƒ¢ãƒªã‚’消費ã—ã€ã“ã“㧠`n` ã¯æ¸¡ã•ã‚ŒãŸå€¤ã®æ•°ã§ã™ã€‚ãŸã ã—ã€å°‘æ•°ã®å€¤ã®å ´åˆã€ã“ã®é–¢æ•°ã¯éžå¸¸ã«åŠ¹æžœçš„ã§ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€Excel ã® [PERCENTILE.INC](https://support.microsoft.com/en-us/office/percentile-inc-function-680f9539-45eb-410b-9a5e-c1355e5fe2ed) 関数ã¨åŒç­‰ã§ã‚ã‚Šã€ï¼ˆ[タイプ R7](https://en.wikipedia.org/wiki/Quantile#Estimating_quantiles_from_a_sample))ã§ã™ã€‚ + +ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã® `quantileExactInclusive` 関数をクエリã§ä½¿ç”¨ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯å¯èƒ½ãªé™ã‚ŠåŠ¹çŽ‡çš„ã«å‹•ä½œã—ã¾ã›ã‚“)。ã“ã®å ´åˆã€[quantilesExactInclusive](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantilesexactinclusive) 関数を使用ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +quantileExactInclusive(level)(expr) +``` + +**引数** + +- `expr` — 数値型ã®[データタイプ](../../../sql-reference/data-types/index.md#data_types)ã€[Date](../../../sql-reference/data-types/date.md)ã€ã¾ãŸã¯[DateTime](../../../sql-reference/data-types/datetime.md)ã«çµæžœã™ã‚‹ã‚«ãƒ©ãƒ å€¤ã«å¯¾ã™ã‚‹å¼ã€‚ + +**パラメーター** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプション。[0, 1] — 範囲ã¯å«ã¾ã‚Œã¾ã™ã€‚デフォルト値: 0.5。`level=0.5` ã®å ´åˆã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚[Float](../../../sql-reference/data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½æ•°ã€‚ + +タイプ: + +- 数値データ型入力ã®å ´åˆã¯ [Float64](../../../sql-reference/data-types/float.md)。 +- 入力値㌠`Date` åž‹ã®å ´åˆã¯ [Date](../../../sql-reference/data-types/date.md)。 +- 入力値㌠`DateTime` åž‹ã®å ´åˆã¯ [DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +クエリ: + +``` sql +CREATE TABLE num AS numbers(1000); + +SELECT quantileExactInclusive(0.6)(x) FROM (SELECT number AS x FROM num); +``` + +çµæžœ: + +``` text +┌─quantileExactInclusive(0.6)(x)─┠+│ 599.4 │ +└────────────────────────────────┘ +``` + +**関連項目** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantileexactweighted.md b/docs/ja/sql-reference/aggregate-functions/reference/quantileexactweighted.md new file mode 100644 index 00000000000..0911ef556cb --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantileexactweighted.md @@ -0,0 +1,68 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantileexactweighted +sidebar_position: 174 +--- + +# quantileExactWeighted + +数値データシーケンスã®[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)ã‚’å„è¦ç´ ã®é‡ã¿ã‚’考慮ã—ã¦æ­£ç¢ºã«è¨ˆç®—ã—ã¾ã™ã€‚ + +正確ãªå€¤ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ã€æ¸¡ã•ã‚ŒãŸã™ã¹ã¦ã®å€¤ã‚’é…列ã«çµåˆã—ã€éƒ¨åˆ†çš„ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚å„値ã¯ãã®é‡ã¿ã¨ã¨ã‚‚ã«ã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã€ã¾ã‚‹ã§ `weight` 回出ç¾ã™ã‚‹ã‹ã®ã‚ˆã†ã«æ‰±ã‚ã‚Œã¾ã™ã€‚アルゴリズムã§ã¯ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®ãŸã‚ã€æ¸¡ã•ã‚ŒãŸå€¤ãŒé »ç¹ã«ç¹°ã‚Šè¿”ã•ã‚Œã‚‹å ´åˆã€é–¢æ•°ã¯ [quantileExact](../../../sql-reference/aggregate-functions/reference/quantileexact.md#quantileexact) よりもRAMã‚’å°‘ãªã消費ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã‚’ `quantileExact` ã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã—ã€é‡ã¿ã‚’1ã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +クエリ内ã§ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã®è¤‡æ•°ã® `quantile*` 関数を使用ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯å¯èƒ½ãªé™ã‚ŠåŠ¹çŽ‡çš„ã«ã¯å‹•ä½œã—ã¾ã›ã‚“)。ãã®å ´åˆã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) 関数を使用ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +quantileExactWeighted(level)(expr, weight) +``` + +別å: `medianExactWeighted`. + +**引数** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメータ。0ã‹ã‚‰1ã¾ã§ã®å®šæ•°æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level` 値㯠`[0.01, 0.99]` ã®ç¯„囲ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚デフォルト値: 0.5。`level=0.5` ã®å ´åˆã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ +- `expr` — 数値[データ型](../../../sql-reference/data-types/index.md#data_types)ã€[日付](../../../sql-reference/data-types/date.md)ã¾ãŸã¯[日時](../../../sql-reference/data-types/datetime.md)ã«çµæžœã‚’æŒã¤ã‚«ãƒ©ãƒ å€¤ã«å¯¾ã™ã‚‹å¼ã€‚ +- `weight` — シーケンスメンãƒãƒ¼ã®é‡ã¿ã‚’æŒã¤ã‚«ãƒ©ãƒ ã€‚é‡ã¿ã¯ [éžè² æ•´æ•°åž‹](../../../sql-reference/data-types/int-uint.md)ã¨ã—ã¦å€¤ã®å‡ºç¾å›žæ•°ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½æ•°ã€‚ + +åž‹: + +- 数値データ型入力ã®å ´åˆã¯ [Float64](../../../sql-reference/data-types/float.md)。 +- 入力㌠`Date` åž‹ã®å ´åˆã¯ [日付](../../../sql-reference/data-types/date.md)。 +- 入力㌠`DateTime` åž‹ã®å ´åˆã¯ [日時](../../../sql-reference/data-types/datetime.md)。 + +**例** + +入力テーブル: + +``` text +┌─n─┬─val─┠+│ 0 │ 3 │ +│ 1 │ 2 │ +│ 2 │ 1 │ +│ 5 │ 4 │ +└───┴─────┘ +``` + +クエリ: + +``` sql +SELECT quantileExactWeighted(n, val) FROM t +``` + +çµæžœ: + +``` text +┌─quantileExactWeighted(n, val)─┠+│ 1 │ +└───────────────────────────────┘ +``` + +**関連項目** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantileexactweightedinterpolated.md b/docs/ja/sql-reference/aggregate-functions/reference/quantileexactweightedinterpolated.md new file mode 100644 index 00000000000..5e484a731d9 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantileexactweightedinterpolated.md @@ -0,0 +1,77 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantileExactWeightedInterpolated +sidebar_position: 176 +--- + +# quantileExactWeightedInterpolated + +数値データシーケンスã®[quantile](https://en.wikipedia.org/wiki/Quantile)を線形補間を用ã„ã¦è¨ˆç®—ã—ã€å„è¦ç´ ã®é‡ã¿ã‚’考慮ã—ã¾ã™ã€‚ + +補間値を得るãŸã‚ã«ã€æ¸¡ã•ã‚ŒãŸã™ã¹ã¦ã®å€¤ãŒé…列ã«çµåˆã•ã‚Œã€ãれらã®å¯¾å¿œã™ã‚‹é‡ã¿ã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ãã®å¾Œã€[加é‡ãƒ‘ーセンタイル法](https://en.wikipedia.org/wiki/Percentile#The_weighted_percentile_method)を使用ã—ã¦é‡ã¿ã«åŸºã¥ãç´¯ç©åˆ†å¸ƒã‚’構築ã—ã€é‡ã¿ã¨å€¤ã‚’用ã„ãŸç·šå½¢è£œé–“ã‚’è¡Œã„ã€ãƒ‘ーセンタイルを計算ã—ã¾ã™ã€‚ + +ç•°ãªã‚‹æ°´æº–ã®è¤‡æ•°ã®`quantile*`関数をクエリ内ã§ä½¿ç”¨ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯å¯èƒ½ãªé™ã‚ŠåŠ¹çŽ‡çš„ã«ã¯å‹•ä½œã—ã¾ã›ã‚“)。ã“ã®å ´åˆã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles)関数を使用ã—ã¦ãã ã•ã„。 + +`quantileInterpolatedWeighted`よりも`quantileExactWeightedInterpolated`ã®æ–¹ãŒæ­£ç¢ºãªã®ã§ã€`quantileExactWeightedInterpolated`を使用ã™ã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚以下ã«ä¾‹ã‚’示ã—ã¾ã™ï¼š + +``` sql +SELECT + quantileExactWeightedInterpolated(0.99)(number, 1), + quantile(0.99)(number), + quantileInterpolatedWeighted(0.99)(number, 1) +FROM numbers(9) + + +┌─quantileExactWeightedInterpolated(0.99)(number, 1)─┬─quantile(0.99)(number)─┬─quantileInterpolatedWeighted(0.99)(number, 1)─┠+│ 7.92 │ 7.92 │ 8 │ +└────────────────────────────────────────────────────┴────────────────────────┴───────────────────────────────────────────────┘ +``` + +**構文** + +``` sql +quantileExactWeightedInterpolated(level)(expr, weight) +``` + +エイリアス: `medianExactWeightedInterpolated`. + +**引数** + +- `level` — パーセンタイルã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメータ。0ã‹ã‚‰1ã®é–“ã®å®šæ•°æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level`ã®å€¤ã«ã¯ `[0.01, 0.99]` ã®ç¯„囲を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルト値:0.5。`level=0.5` ã®å ´åˆã€ã“ã®é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ +- `expr` — 数値[データ型](../../../sql-reference/data-types/index.md#data_types)ã€[Date](../../../sql-reference/data-types/date.md)ã€ã¾ãŸã¯[DateTime](../../../sql-reference/data-types/datetime.md)ã«å¸°çµã™ã‚‹ã‚«ãƒ©ãƒ å€¤ã®å¼ã€‚ +- `weight` — シーケンスメンãƒãƒ¼ã®é‡ã¿ã‚’æŒã¤ã‚«ãƒ©ãƒ ã€‚é‡ã¿ã¯[Unsigned integeråž‹](../../../sql-reference/data-types/int-uint.md)ã®å€¤ã®å‡ºç¾å›žæ•°ã§ã™ã€‚ + +**戻り値** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®ãƒ‘ーセンタイル。 + +åž‹: + +- 数値データ型入力ã®å ´åˆã¯[Float64](../../../sql-reference/data-types/float.md)。 +- 入力値ãŒ`Date`åž‹ã®å ´åˆã¯[Date](../../../sql-reference/data-types/date.md)。 +- 入力値ãŒ`DateTime`åž‹ã®å ´åˆã¯[DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +入力テーブル: + +``` text +┌─n─┬─val─┠+│ 0 │ 3 │ +│ 1 │ 2 │ +│ 2 │ 1 │ +│ 5 │ 4 │ +└───┴─────┘ +``` + +çµæžœï¼š + +``` text +┌─quantileExactWeightedInterpolated(n, val)─┠+│ 1.5 │ +└───────────────────────────────────────────┘ +``` + +**関連項目** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantileinterpolatedweighted.md b/docs/ja/sql-reference/aggregate-functions/reference/quantileinterpolatedweighted.md new file mode 100644 index 00000000000..206f10d695b --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantileinterpolatedweighted.md @@ -0,0 +1,68 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantileInterpolatedWeighted +sidebar_position: 176 +--- + +# quantileInterpolatedWeighted + +数値データシーケンスã®[分ä½](https://en.wikipedia.org/wiki/Quantile)ã‚’ã€å„è¦ç´ ã®é‡ã¿ã‚’考慮ã—ã¦ç·šå½¢è£œé–“を用ã„ã¦è¨ˆç®—ã—ã¾ã™ã€‚ + +補間ã•ã‚ŒãŸå€¤ã‚’å¾—ã‚‹ãŸã‚ã«ã¯ã€æ¸¡ã•ã‚ŒãŸã™ã¹ã¦ã®å€¤ã‚’é…列ã«çµåˆã—ã€ãれらを対応ã™ã‚‹é‡ã¿ã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆã—ã¾ã™ã€‚ãã®å¾Œã€é‡ã¿ã«åŸºã¥ãç´¯ç©åˆ†å¸ƒã‚’構築ã—ã€[é‡ã¿ä»˜ãパーセンタイル法](https://en.wikipedia.org/wiki/Percentile#The_weighted_percentile_method)を使用ã—ã¦åˆ†ä½ã®ç·šå½¢è£œé–“ã‚’è¡Œã„ã¾ã™ã€‚ + +**複数㮠`quantile*` 関数を異ãªã‚‹ãƒ¬ãƒ™ãƒ«ã§ã‚¯ã‚¨ãƒªå†…ã§ä½¿ç”¨ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯åŠ¹çŽ‡çš„ã«å‹•ä½œã—ã¾ã›ã‚“)。ã“ã®å ´åˆã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) 関数を使用ã—ã¦ãã ã•ã„。** + +**構文** + +``` sql +quantileInterpolatedWeighted(level)(expr, weight) +``` + +エイリアス: `medianInterpolatedWeighted`. + +**引数** + +- `level` — 分ä½ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメータ。0ã‹ã‚‰1ã®ç¯„囲ã§ã®å®šæ•°æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level` ã®å€¤ã¯ `[0.01, 0.99]` ã®ç¯„囲ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルト値: 0.5。`level=0.5` ã®å ´åˆã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ +- `expr` — カラム値ã«å¯¾ã™ã‚‹å¼ã§ã€æ•°å€¤[データ型](../../../sql-reference/data-types/index.md#data_types)ã€[Date](../../../sql-reference/data-types/date.md) ã¾ãŸã¯ [DateTime](../../../sql-reference/data-types/datetime.md)ã‚’çµæžœã¨ã—ã¾ã™ã€‚ +- `weight` — シーケンスメンãƒãƒ¼ã®é‡ã¿ã‚’示ã™ã‚«ãƒ©ãƒ ã€‚é‡ã¿ã¯å€¤ã®å‡ºç¾å›žæ•°ã‚’表ã—ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½ã€‚ + +åž‹: + +- 数値データ型入力ã«å¯¾ã—ã¦ã¯ [Float64](../../../sql-reference/data-types/float.md)。 +- 入力値㌠`Date` åž‹ã®å ´åˆã¯ [Date](../../../sql-reference/data-types/date.md)。 +- 入力値㌠`DateTime` åž‹ã®å ´åˆã¯ [DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +入力テーブル: + +``` text +┌─n─┬─val─┠+│ 0 │ 3 │ +│ 1 │ 2 │ +│ 2 │ 1 │ +│ 5 │ 4 │ +└───┴─────┘ +``` + +クエリ: + +``` sql +SELECT quantileInterpolatedWeighted(n, val) FROM t +``` + +çµæžœ: + +``` text +┌─quantileInterpolatedWeighted(n, val)─┠+│ 1 │ +└──────────────────────────────────────┘ +``` + +**関連項目** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiles.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiles.md new file mode 100644 index 00000000000..9d18171bfb8 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiles.md @@ -0,0 +1,171 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantiles +sidebar_position: 177 +--- + +# quantiles 関数 + +## quantiles + +構文: `quantiles(level1, level2, ...)(x)` + +ã™ã¹ã¦ã®åˆ†ä½é–¢æ•°ã«ã¯ã€å¯¾å¿œã™ã‚‹åˆ†ä½é–¢æ•°ã‚‚ã‚ã‚Šã¾ã™: `quantiles`, `quantilesDeterministic`, `quantilesTiming`, `quantilesTimingWeighted`, `quantilesExact`, `quantilesExactWeighted`, `quantileExactWeightedInterpolated`, `quantileInterpolatedWeighted`, `quantilesTDigest`, `quantilesBFloat16`, `quantilesDD`。ã“れらã®é–¢æ•°ã¯ã€æŒ‡å®šã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®ã™ã¹ã¦ã®åˆ†ä½æ•°ã‚’一度ã§è¨ˆç®—ã—ã€çµæžœã®å€¤ã®é…列を返ã—ã¾ã™ã€‚ + +## quantilesExactExclusive + +数値データシーケンスã®[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を正確ã«è¨ˆç®—ã—ã¾ã™ã€‚ + +正確ãªå€¤ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ã€ã™ã¹ã¦ã®æ¸¡ã•ã‚ŒãŸå€¤ã‚’é…列ã«çµåˆã—ã€ãã®å¾Œä¸€éƒ¨ã‚’ソートã—ã¾ã™ã€‚ãã®ãŸã‚ã€ã“ã®é–¢æ•°ã¯æ¸¡ã•ã‚ŒãŸå€¤ã®æ•° `n` ã«æ¯”例ã—㦠`O(n)` ã®ãƒ¡ãƒ¢ãƒªã‚’消費ã—ã¾ã™ã€‚ãŸã ã—ã€å€¤ã®æ•°ãŒå°‘ãªã„å ´åˆã€ã“ã®é–¢æ•°ã¯éžå¸¸ã«åŠ¹æžœçš„ã§ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ Excel ã® [PERCENTILE.EXC](https://support.microsoft.com/en-us/office/percentile-exc-function-bbaa7204-e9e1-4010-85bf-c31dc5dce4ba) 関数ã«ç›¸å½“ã—ã€([åž‹ R6](https://en.wikipedia.org/wiki/Quantile#Estimating_quantiles_from_a_sample)) ã«ç›¸å½“ã—ã¾ã™ã€‚ + +[quantileExactExclusive](../../../sql-reference/aggregate-functions/reference/quantileexact.md#quantileexactexclusive) よりもセットレベルã§åŠ¹çŽ‡çš„ã«å‹•ä½œã—ã¾ã™ã€‚ + +**構文** + +``` sql +quantilesExactExclusive(level1, level2, ...)(expr) +``` + +**引数** + +- `expr` — 数値 [データ型](../../../sql-reference/data-types/index.md#data_types), [Date](../../../sql-reference/data-types/date.md) ã¾ãŸã¯ [DateTime](../../../sql-reference/data-types/datetime.md) çµæžœã‚’ã‚‚ãŸã‚‰ã™ã‚«ãƒ©ãƒ å€¤ã«å¯¾ã™ã‚‹å¼ã€‚ + +**パラメータ** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚å¯èƒ½ãªå€¤: (0, 1) — 境界をå«ã¾ãªã„。 [Float](../../../sql-reference/data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½æ•°ã® [Array](../../../sql-reference/data-types/array.md)。 + +é…列値ã®åž‹: + +- 数値データ型入力ã®å ´åˆã¯ [Float64](../../../sql-reference/data-types/float.md)。 +- 入力値㌠`Date` åž‹ã®å ´åˆã¯ [Date](../../../sql-reference/data-types/date.md)。 +- 入力値㌠`DateTime` åž‹ã®å ´åˆã¯ [DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +クエリ: + +``` sql +CREATE TABLE num AS numbers(1000); + +SELECT quantilesExactExclusive(0.25, 0.5, 0.75, 0.9, 0.95, 0.99, 0.999)(x) FROM (SELECT number AS x FROM num); +``` + +çµæžœ: + +``` text +┌─quantilesExactExclusive(0.25, 0.5, 0.75, 0.9, 0.95, 0.99, 0.999)(x)─┠+│ [249.25,499.5,749.75,899.9,949.9499999999999,989.99,998.999] │ +└─────────────────────────────────────────────────────────────────────┘ +``` + +## quantilesExactInclusive + +数値データシーケンスã®[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を正確ã«è¨ˆç®—ã—ã¾ã™ã€‚ + +正確ãªå€¤ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ã€ã™ã¹ã¦ã®æ¸¡ã•ã‚ŒãŸå€¤ã‚’é…列ã«çµåˆã—ã€ãã®å¾Œä¸€éƒ¨ã‚’ソートã—ã¾ã™ã€‚ãã®ãŸã‚ã€ã“ã®é–¢æ•°ã¯æ¸¡ã•ã‚ŒãŸå€¤ã®æ•° `n` ã«æ¯”例ã—㦠`O(n)` ã®ãƒ¡ãƒ¢ãƒªã‚’消費ã—ã¾ã™ã€‚ãŸã ã—ã€å€¤ã®æ•°ãŒå°‘ãªã„å ´åˆã€ã“ã®é–¢æ•°ã¯éžå¸¸ã«åŠ¹æžœçš„ã§ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ Excel ã® [PERCENTILE.INC](https://support.microsoft.com/en-us/office/percentile-inc-function-680f9539-45eb-410b-9a5e-c1355e5fe2ed) 関数ã«ç›¸å½“ã—ã€([åž‹ R7](https://en.wikipedia.org/wiki/Quantile#Estimating_quantiles_from_a_sample)) ã«ç›¸å½“ã—ã¾ã™ã€‚ + +[quantileExactInclusive](../../../sql-reference/aggregate-functions/reference/quantileexact.md#quantileexactinclusive) よりもセットレベルã§åŠ¹çŽ‡çš„ã«å‹•ä½œã—ã¾ã™ã€‚ + +**構文** + +``` sql +quantilesExactInclusive(level1, level2, ...)(expr) +``` + +**引数** + +- `expr` — 数値 [データ型](../../../sql-reference/data-types/index.md#data_types), [Date](../../../sql-reference/data-types/date.md) ã¾ãŸã¯ [DateTime](../../../sql-reference/data-types/datetime.md) çµæžœã‚’ã‚‚ãŸã‚‰ã™ã‚«ãƒ©ãƒ å€¤ã«å¯¾ã™ã‚‹å¼ã€‚ + +**パラメータ** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚å¯èƒ½ãªå€¤: [0, 1] — 境界をå«ã‚€ã€‚ [Float](../../../sql-reference/data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½æ•°ã® [Array](../../../sql-reference/data-types/array.md)。 + +é…列値ã®åž‹: + +- 数値データ型入力ã®å ´åˆã¯ [Float64](../../../sql-reference/data-types/float.md)。 +- 入力値㌠`Date` åž‹ã®å ´åˆã¯ [Date](../../../sql-reference/data-types/date.md)。 +- 入力値㌠`DateTime` åž‹ã®å ´åˆã¯ [DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +クエリ: + +``` sql +CREATE TABLE num AS numbers(1000); + +SELECT quantilesExactInclusive(0.25, 0.5, 0.75, 0.9, 0.95, 0.99, 0.999)(x) FROM (SELECT number AS x FROM num); +``` + +çµæžœ: + +``` text +┌─quantilesExactInclusive(0.25, 0.5, 0.75, 0.9, 0.95, 0.99, 0.999)(x)─┠+│ [249.75,499.5,749.25,899.1,949.05,989.01,998.001] │ +└─────────────────────────────────────────────────────────────────────┘ +``` + +## quantilesGK + +`quantilesGK` 㯠`quantileGK` ã«ä¼¼ãŸå‹•ä½œã‚’ã—ã€ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã§ã®åˆ†ä½æ•°ã‚’åŒæ™‚ã«è¨ˆç®—ã—ã€é…列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +quantilesGK(accuracy, level1, level2, ...)(expr) +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½æ•°ã® [Array](../../../sql-reference/data-types/array.md)。 + +é…列値ã®åž‹: + +- 数値データ型入力ã®å ´åˆã¯ [Float64](../../../sql-reference/data-types/float.md)。 +- 入力値㌠`Date` åž‹ã®å ´åˆã¯ [Date](../../../sql-reference/data-types/date.md)。 +- 入力値㌠`DateTime` åž‹ã®å ´åˆã¯ [DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +クエリ: + +``` sql +SELECT quantilesGK(1, 0.25, 0.5, 0.75)(number + 1) +FROM numbers(1000) + +┌─quantilesGK(1, 0.25, 0.5, 0.75)(plus(number, 1))─┠+│ [1,1,1] │ +└──────────────────────────────────────────────────┘ + +SELECT quantilesGK(10, 0.25, 0.5, 0.75)(number + 1) +FROM numbers(1000) + +┌─quantilesGK(10, 0.25, 0.5, 0.75)(plus(number, 1))─┠+│ [156,413,659] │ +└───────────────────────────────────────────────────┘ + + +SELECT quantilesGK(100, 0.25, 0.5, 0.75)(number + 1) +FROM numbers(1000) + +┌─quantilesGK(100, 0.25, 0.5, 0.75)(plus(number, 1))─┠+│ [251,498,741] │ +└────────────────────────────────────────────────────┘ + +SELECT quantilesGK(1000, 0.25, 0.5, 0.75)(number + 1) +FROM numbers(1000) + +┌─quantilesGK(1000, 0.25, 0.5, 0.75)(plus(number, 1))─┠+│ [249,499,749] │ +└─────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigest.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigest.md new file mode 100644 index 00000000000..7a495244070 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigest.md @@ -0,0 +1,58 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantiletdigest +sidebar_position: 178 +--- + +# quantileTDigest + +[t-digest](https://github.com/tdunning/t-digest/blob/master/docs/t-digest-paper/histo.pdf)アルゴリズムを使用ã—ã¦ã€æ•°å€¤ãƒ‡ãƒ¼ã‚¿åˆ—ã®è¿‘似的ãª[分ä½](https://en.wikipedia.org/wiki/Quantile)を計算ã—ã¾ã™ã€‚ + +メモリ消費ã¯`log(n)`ã§ã‚ã‚Šã€ã“ã“ã§`n`ã¯å€¤ã®æ•°ã§ã™ã€‚çµæžœã¯ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œé †åºã«ä¾å­˜ã—ã¦ãŠã‚Šã€éžæ±ºå®šçš„ã§ã™ã€‚ + +ã“ã®é–¢æ•°ã®ãƒ‘フォーマンスã¯ã€[quantile](../../../sql-reference/aggregate-functions/reference/quantile.md#quantile)ã‚„[quantileTiming](../../../sql-reference/aggregate-functions/reference/quantiletiming.md#quantiletiming)ã®ãƒ‘フォーマンスよりも低ããªã£ã¦ã„ã¾ã™ã€‚ステートサイズã¨ç²¾åº¦ã®æ¯”率ã®è¦³ç‚¹ã§ã¯ã€ã“ã®é–¢æ•°ã¯`quantile`よりも優れã¦ã„ã¾ã™ã€‚ + +ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã®`quantile*`関数をクエリã§ä½¿ç”¨ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯æœ¬æ¥å¯èƒ½ãªåŠ¹çŽ‡ã‚ˆã‚Šã‚‚低効率ã§å‹•ä½œã—ã¾ã™ï¼‰ã€‚ã“ã®å ´åˆã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles)関数を使用ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +quantileTDigest(level)(expr) +``` + +エイリアス: `medianTDigest`. + +**引数** + +- `level` — 分ä½ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメータã§ã™ã€‚0ã‹ã‚‰1ã¾ã§ã®å®šæ•°æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level`値を`[0.01, 0.99]`ã®ç¯„囲ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルト値ã¯0.5ã§ã™ã€‚`level=0.5`ã®å ´åˆã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ +- `expr` — 数値[データ型](../../../sql-reference/data-types/index.md#data_types)ã€[Date](../../../sql-reference/data-types/date.md)ã¾ãŸã¯[DateTime](../../../sql-reference/data-types/datetime.md)ã‚’çµæžœã¨ã™ã‚‹ã‚«ãƒ©ãƒ å€¤ã«å¯¾ã™ã‚‹å¼ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®è¿‘似的ãªåˆ†ä½ã€‚ + +åž‹: + +- 数値データ型入力ã®å ´åˆ: [Float64](../../../sql-reference/data-types/float.md) +- 入力値ãŒ`Date`åž‹ã®å ´åˆ: [Date](../../../sql-reference/data-types/date.md) +- 入力値ãŒ`DateTime`åž‹ã®å ´åˆ: [DateTime](../../../sql-reference/data-types/datetime.md) + +**例** + +クエリ: + +``` sql +SELECT quantileTDigest(number) FROM numbers(10) +``` + +çµæžœ: + +``` text +┌─quantileTDigest(number)─┠+│ 4.5 │ +└─────────────────────────┘ +``` + +**関連項目** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigestweighted.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigestweighted.md new file mode 100644 index 00000000000..9b0d260c724 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigestweighted.md @@ -0,0 +1,63 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantiletdigestweighted +sidebar_position: 179 +--- + +# quantileTDigestWeighted + +数値データ列ã®è¿‘似的ãª[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)ã‚’[t-digest](https://github.com/tdunning/t-digest/blob/master/docs/t-digest-paper/histo.pdf)アルゴリズムを使用ã—ã¦è¨ˆç®—ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯å„列è¦ç´ ã®é‡ã¿ã‚’考慮ã«å…¥ã‚Œã¾ã™ã€‚最大誤差ã¯1%ã§ã™ã€‚メモリ消費ã¯`log(n)`ã§ã‚ã‚Šã€ã“ã“ã§`n`ã¯å€¤ã®æ•°ã§ã™ã€‚ + +ã“ã®é–¢æ•°ã®ãƒ‘フォーマンスã¯ã€[quantile](../../../sql-reference/aggregate-functions/reference/quantile.md#quantile)ã‚„[quantileTiming](../../../sql-reference/aggregate-functions/reference/quantiletiming.md#quantiletiming)ã®ãƒ‘フォーマンスよりも低ã„ã§ã™ã€‚ãŸã ã—ã€çŠ¶æ…‹ã‚µã‚¤ã‚ºã¨ç²¾åº¦ã®æ¯”率ã«é–¢ã—ã¦ã¯ã€ã“ã®é–¢æ•°ã¯`quantile`よりも優れã¦ã„ã¾ã™ã€‚ + +çµæžœã¯ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹é †åºã«ä¾å­˜ã—ã€éžæ±ºå®šçš„ã§ã™ã€‚ + +ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã®è¤‡æ•°ã®`quantile*`関数をクエリã«ä½¿ç”¨ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯åŠ¹çŽ‡çš„ã«ã¯å‹•ä½œã—ã¾ã›ã‚“)。ã“ã®å ´åˆã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles)関数を使用ã—ã¦ãã ã•ã„。 + +:::note +`quantileTDigestWeighted`ã‚’å°ã•ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯[推奨ã•ã‚Œã¾ã›ã‚“](https://github.com/tdunning/t-digest/issues/167#issuecomment-828650275)ã—ã€é‡å¤§ãªèª¤å·®ã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€[`quantileTDigest`](../../../sql-reference/aggregate-functions/reference/quantiletdigest.md)ã®ä½¿ç”¨ã‚’考慮ã—ã¦ãã ã•ã„。 +::: + +**構文** + +``` sql +quantileTDigestWeighted(level)(expr, weight) +``` + +別å: `medianTDigestWeighted`. + +**引数** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメータã§ã™ã€‚0ã‹ã‚‰1ã¾ã§ã®å®šæ•°ã®æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level`ã®å€¤ã‚’`[0.01, 0.99]`ã®ç¯„囲ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルト値: 0.5。`level=0.5`ã§ã¯ã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ +- `expr` — 数値データ型ã€[Date](../../../sql-reference/data-types/date.md)ã¾ãŸã¯[DateTime](../../../sql-reference/data-types/datetime.md)ã®ã‚«ãƒ©ãƒ å€¤ã®å¼ã€‚ +- `weight` — 列è¦ç´ ã®é‡ã¿ã‚’æŒã¤ã‚«ãƒ©ãƒ ã€‚é‡ã¿ã¯å€¤ã®å‡ºç¾å›žæ•°ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®è¿‘似的ãªåˆ†ä½æ•°ã€‚ + +åž‹: + +- 数値データ型入力ã®å ´åˆã¯[Float64](../../../sql-reference/data-types/float.md)。 +- 入力値ãŒ`Date`åž‹ã®å ´åˆã¯[Date](../../../sql-reference/data-types/date.md)。 +- 入力値ãŒ`DateTime`åž‹ã®å ´åˆã¯[DateTime](../../../sql-reference/data-types/datetime.md)。 + +**例** + +クエリ: + +``` sql +SELECT quantileTDigestWeighted(number, 1) FROM numbers(10) +``` + +çµæžœ: + +``` text +┌─quantileTDigestWeighted(number, 1)─┠+│ 4.5 │ +└────────────────────────────────────┘ +``` + +**関連項目** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiletiming.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiletiming.md new file mode 100644 index 00000000000..1150dfc6cf1 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiletiming.md @@ -0,0 +1,89 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantiletiming +sidebar_position: 180 +--- + +# quantileTiming + +定ã‚られãŸç²¾åº¦ã§æ•°å€¤ãƒ‡ãƒ¼ã‚¿ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を計算ã—ã¾ã™ã€‚ + +çµæžœã¯æ±ºå®šè«–çš„ã§ã™ï¼ˆã‚¯ã‚¨ãƒªå‡¦ç†ã®é †åºã«ã¯ä¾å­˜ã—ã¾ã›ã‚“)。ã“ã®é–¢æ•°ã¯ã€ã‚¦ã‚§ãƒ–ページã®èª­ã¿è¾¼ã¿æ™‚é–“ã‚„ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã®å¿œç­”時間ã®ã‚ˆã†ãªåˆ†å¸ƒã‚’説明ã™ã‚‹ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§ã®å‹•ä½œã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã®è¤‡æ•°ã®`quantile*`関数をクエリã§ä½¿ç”¨ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯å¯èƒ½ãªé™ã‚ŠåŠ¹çŽ‡çš„ã«å‹•ä½œã—ã¾ã›ã‚“)。ã“ã®å ´åˆã¯ã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles)関数を使用ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +quantileTiming(level)(expr) +``` + +エイリアス: `medianTiming`. + +**引数** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメータã§ã™ã€‚0ã‹ã‚‰1ã¾ã§ã®å®šæ•°ã®æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level`ã®å€¤ã¯ `[0.01, 0.99]` ã®ç¯„囲を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚デフォルト値ã¯0.5ã§ã™ã€‚`level=0.5`ã§ã¯ã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ + +- `expr` — [カラム](../../../sql-reference/syntax.md#syntax-expressions)値ã«å¯¾ã™ã‚‹å¼ã§ã€[Float\*](../../../sql-reference/data-types/float.md)-タイプã®æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + + - è² ã®å€¤ãŒé–¢æ•°ã«æ¸¡ã•ã‚ŒãŸå ´åˆã€å‹•ä½œã¯æœªå®šç¾©ã§ã™ã€‚ + - 値ãŒ30,000を超ãˆã‚‹å ´åˆï¼ˆãƒšãƒ¼ã‚¸èª­ã¿è¾¼ã¿æ™‚é–“ãŒ30秒を超ãˆã‚‹å ´åˆï¼‰ã€30,000ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +**精度** + +計算ã¯ä»¥ä¸‹ã®å ´åˆã«æ­£ç¢ºã§ã™ï¼š + +- 値ã®ç·æ•°ãŒ5670を超ãˆãªã„å ´åˆã€‚ +- 値ã®ç·æ•°ãŒ5670を超ãˆã¦ã„ã¦ã‚‚ã€ãƒšãƒ¼ã‚¸èª­ã¿è¾¼ã¿æ™‚é–“ãŒ1024ms未満ã®å ´åˆã€‚ + +ãã†ã§ãªã„å ´åˆã€è¨ˆç®—çµæžœã¯16msã®å€æ•°ã¾ã§ä¸¸ã‚られã¾ã™ã€‚ + +:::note +ページ読ã¿è¾¼ã¿æ™‚é–“ã®åˆ†ä½æ•°ã‚’計算ã™ã‚‹ã«ã¯ã€ã“ã®é–¢æ•°ã¯[quantile](../../../sql-reference/aggregate-functions/reference/quantile.md#quantile)よりも効果的ã‹ã¤æ­£ç¢ºã§ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½æ•°ã€‚ + +タイプ: `Float32`. + +:::note +関数ã«å€¤ãŒæ¸¡ã•ã‚Œãªã„å ´åˆï¼ˆ`quantileTimingIf`を使用ã—ã¦ã„ã‚‹å ´åˆï¼‰ã€[NaN](../../../sql-reference/data-types/float.md#data_type-float-nan-inf)ãŒè¿”ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¼ãƒ­ã«è‡³ã‚‹çµæžœã¨åŒºåˆ¥ã™ã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚`NaN`値ã®ä¸¦ã¹æ›¿ãˆã«é–¢ã™ã‚‹æ³¨æ„事項ã«ã¤ã„ã¦ã¯ã€[ORDER BYå¥](../../../sql-reference/statements/select/order-by.md#select-order-by)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**例** + +入力テーブル: + +``` text +┌─response_time─┠+│ 72 │ +│ 112 │ +│ 126 │ +│ 145 │ +│ 104 │ +│ 242 │ +│ 313 │ +│ 168 │ +│ 108 │ +└───────────────┘ +``` + +クエリ: + +``` sql +SELECT quantileTiming(response_time) FROM t +``` + +çµæžœï¼š + +``` text +┌─quantileTiming(response_time)─┠+│ 126 │ +└───────────────────────────────┘ +``` + +**関連項目** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiletimingweighted.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiletimingweighted.md new file mode 100644 index 00000000000..4335a1a6244 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiletimingweighted.md @@ -0,0 +1,121 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/quantiletimingweighted +sidebar_position: 181 +--- + +# quantileTimingWeighted + +決定ã•ã‚ŒãŸç²¾åº¦ã§ã€ãã‚Œãžã‚Œã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ãƒ¡ãƒ³ãƒãƒ¼ã®é‡ã¿ã«åŸºã¥ã„ã¦ã€æ•°å€¤ãƒ‡ãƒ¼ã‚¿ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®[分ä½æ•°](https://en.wikipedia.org/wiki/Quantile)を計算ã—ã¾ã™ã€‚ + +ã“ã®çµæžœã¯æ±ºå®šè«–的(クエリ処ç†é †åºã«ä¾å­˜ã—ãªã„)ã§ã™ã€‚ã“ã®é–¢æ•°ã¯ã€ã‚¦ã‚§ãƒ–ページã®èª­ã¿è¾¼ã¿æ™‚é–“ã‚„ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã®å¿œç­”時間ã®ã‚ˆã†ãªåˆ†å¸ƒã‚’記述ã™ã‚‹ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§ã®ä½œæ¥­ã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã®è¤‡æ•°ã®`quantile*`関数をクエリã§ä½¿ç”¨ã™ã‚‹å ´åˆã€å†…部状態ã¯çµåˆã•ã‚Œã¾ã›ã‚“(ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªã¯æœ¬æ¥ã®åŠ¹çŽ‡ã‚ˆã‚Šä½Žä¸‹ã—ã¾ã™ï¼‰ã€‚ã“ã®å ´åˆã«ã¯ã€[quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles)関数を使用ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +quantileTimingWeighted(level)(expr, weight) +``` + +別å: `medianTimingWeighted`. + +**引数** + +- `level` — 分ä½æ•°ã®ãƒ¬ãƒ™ãƒ«ã€‚オプションã®ãƒ‘ラメータ。0ã‹ã‚‰1ã®ç¯„囲ã®å®šæ•°ã®æµ®å‹•å°æ•°ç‚¹æ•°ã€‚`level`ã®å€¤ã¯`[0.01, 0.99]`ã®ç¯„囲を推奨ã—ã¾ã™ã€‚デフォルト値:0.5。`level=0.5`ã®å ´åˆã€é–¢æ•°ã¯[中央値](https://en.wikipedia.org/wiki/Median)を計算ã—ã¾ã™ã€‚ + +- `expr` — [カラム](../../../sql-reference/syntax.md#syntax-expressions)値ã«å¯¾ã™ã‚‹å¼ã§ã€[Float\*](../../../sql-reference/data-types/float.md)åž‹ã®ç•ªå·ã‚’è¿”ã—ã¾ã™ã€‚ + + - è² ã®å€¤ãŒé–¢æ•°ã«æ¸¡ã•ã‚ŒãŸå ´åˆã€ãã®å‹•ä½œã¯æœªå®šç¾©ã§ã™ã€‚ + - 値ãŒ30,000(ページ読ã¿è¾¼ã¿æ™‚é–“ãŒ30秒以上)を超ãˆã‚‹å ´åˆã€30,000ã¨ã¿ãªã•ã‚Œã¾ã™ã€‚ + +- `weight` — シーケンスè¦ç´ ã®é‡ã¿ã‚’æŒã¤ã‚«ãƒ©ãƒ ã€‚é‡ã¿ã¯å€¤ã®å‡ºç¾å›žæ•°ã§ã™ã€‚ + +**精度** + +計算ã¯ä»¥ä¸‹ã®å ´åˆã«æ­£ç¢ºã§ã™ï¼š + +- 値ã®ç·æ•°ãŒ5670を超ãˆãªã„å ´åˆã€‚ +- 値ã®ç·æ•°ãŒ5670を超ãˆã‚‹ãŒã€ãƒšãƒ¼ã‚¸èª­ã¿è¾¼ã¿æ™‚é–“ãŒ1024ms未満ã®å ´åˆã€‚ + +ãれ以外ã®å ´åˆã€è¨ˆç®—ã®çµæžœã¯16msã®å€æ•°ã«ä¸¸ã‚られã¾ã™ã€‚ + +:::note +ページ読ã¿è¾¼ã¿æ™‚é–“ã®åˆ†ä½æ•°ã‚’計算ã™ã‚‹ã«ã¯ã€ã“ã®é–¢æ•°ã¯[quantile](../../../sql-reference/aggregate-functions/reference/quantile.md#quantile)よりも効率的ã§æ­£ç¢ºã§ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã®åˆ†ä½æ•°ã€‚ + +タイプ: `Float32`. + +:::note +関数ã«å€¤ãŒæ¸¡ã•ã‚Œãªã„å ´åˆï¼ˆ`quantileTimingIf`を使用ã™ã‚‹å ´åˆï¼‰ã€[NaN](../../../sql-reference/data-types/float.md#data_type-float-nan-inf)ãŒè¿”ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€çµæžœãŒã‚¼ãƒ­ã¨ãªã‚‹å ´åˆã¨åŒºåˆ¥ã™ã‚‹ãŸã‚ã§ã™ã€‚`NaN`値ã®ã‚½ãƒ¼ãƒˆã«é–¢ã—ã¦ã¯ã€[ORDER BYå¥](../../../sql-reference/statements/select/order-by.md#select-order-by)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**例** + +入力テーブル: + +``` text +┌─response_time─┬─weight─┠+│ 68 │ 1 │ +│ 104 │ 2 │ +│ 112 │ 3 │ +│ 126 │ 2 │ +│ 138 │ 1 │ +│ 162 │ 1 │ +└───────────────┴────────┘ +``` + +クエリ: + +``` sql +SELECT quantileTimingWeighted(response_time, weight) FROM t +``` + +çµæžœ: + +``` text +┌─quantileTimingWeighted(response_time, weight)─┠+│ 112 │ +└───────────────────────────────────────────────┘ +``` + +# quantilesTimingWeighted + +`quantileTimingWeighted`ã¨åŒæ§˜ã§ã™ãŒã€åˆ†ä½æ•°ãƒ¬ãƒ™ãƒ«ã®è¤‡æ•°ã®ãƒ‘ラメータをå—ã‘å–ã‚Šã€ãれらã®åˆ†ä½æ•°ã®å¤šãã®å€¤ã§æº€ãŸã•ã‚ŒãŸé…列を返ã—ã¾ã™ã€‚ + +**例** + +入力テーブル: + +``` text +┌─response_time─┬─weight─┠+│ 68 │ 1 │ +│ 104 │ 2 │ +│ 112 │ 3 │ +│ 126 │ 2 │ +│ 138 │ 1 │ +│ 162 │ 1 │ +└───────────────┴────────┘ +``` + +クエリ: + +``` sql +SELECT quantilesTimingWeighted(0,5, 0.99)(response_time, weight) FROM t +``` + +çµæžœ: + +``` text +┌─quantilesTimingWeighted(0.5, 0.99)(response_time, weight)─┠+│ [112,162] │ +└───────────────────────────────────────────────────────────┘ +``` + +**関連項目** + +- [median](../../../sql-reference/aggregate-functions/reference/median.md#median) +- [quantiles](../../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/rankCorr.md b/docs/ja/sql-reference/aggregate-functions/reference/rankCorr.md new file mode 100644 index 00000000000..b96bdb9e20f --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/rankCorr.md @@ -0,0 +1,59 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/rankCorr +sidebar_position: 182 +--- + +# rankCorr + +é †ä½ç›¸é–¢ä¿‚数を計算ã—ã¾ã™ã€‚ + +**構文** + +``` sql +rankCorr(x, y) +``` + +**引数** + +- `x` — ä»»æ„ã®å€¤ã€‚[Float32](../../../sql-reference/data-types/float.md#float32-float64) ã¾ãŸã¯ [Float64](../../../sql-reference/data-types/float.md#float32-float64)。 +- `y` — ä»»æ„ã®å€¤ã€‚[Float32](../../../sql-reference/data-types/float.md#float32-float64) ã¾ãŸã¯ [Float64](../../../sql-reference/data-types/float.md#float32-float64)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x` 㨠`y` ã®ãƒ©ãƒ³ã‚¯ã®é †ä½ç›¸é–¢ä¿‚æ•°ã‚’è¿”ã—ã¾ã™ã€‚相関係数ã®å€¤ã¯ -1 ã‹ã‚‰ +1 ã®ç¯„囲ã§ã™ã€‚2ã¤ä»¥ä¸Šã®å¼•æ•°ãŒæ¸¡ã•ã‚Œãªã„å ´åˆã€é–¢æ•°ã¯ä¾‹å¤–ã‚’è¿”ã—ã¾ã™ã€‚+1 ã«è¿‘ã„値ã¯é«˜ã„線形関係を示ã—ã€ä¸€ã¤ã®ãƒ©ãƒ³ãƒ€ãƒ å¤‰æ•°ãŒå¢—加ã™ã‚‹ã¨ã‚‚ã†ä¸€ã¤ã®ãƒ©ãƒ³ãƒ€ãƒ å¤‰æ•°ã‚‚増加ã—ã¾ã™ã€‚-1 ã«è¿‘ã„値ã¯é«˜ã„線形関係を示ã—ã€ä¸€ã¤ã®ãƒ©ãƒ³ãƒ€ãƒ å¤‰æ•°ãŒå¢—加ã™ã‚‹ã¨ã‚‚ã†ä¸€ã¤ã®ãƒ©ãƒ³ãƒ€ãƒ å¤‰æ•°ãŒæ¸›å°‘ã—ã¾ã™ã€‚0 ã«è¿‘ã„ã¾ãŸã¯ 0 ã®å€¤ã¯ã€2ã¤ã®ãƒ©ãƒ³ãƒ€ãƒ å¤‰æ•°é–“ã«é–¢ä¿‚ãŒãªã„ã“ã¨ã‚’示ã—ã¾ã™ã€‚ + +åž‹: [Float64](../../../sql-reference/data-types/float.md#float32-float64)。 + +**例** + +クエリ: + +``` sql +SELECT rankCorr(number, number) FROM numbers(100); +``` + +çµæžœ: + +``` text +┌─rankCorr(number, number)─┠+│ 1 │ +└──────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT roundBankers(rankCorr(exp(number), sin(number)), 3) FROM numbers(100); +``` + +çµæžœ: + +``` text +┌─roundBankers(rankCorr(exp(number), sin(number)), 3)─┠+│ -0.037 │ +└─────────────────────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [スピアマンã®é †ä½ç›¸é–¢ä¿‚æ•°](https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/simplelinearregression.md b/docs/ja/sql-reference/aggregate-functions/reference/simplelinearregression.md new file mode 100644 index 00000000000..e355ef7151b --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/simplelinearregression.md @@ -0,0 +1,44 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/simplelinearregression +sidebar_position: 183 +--- + +# simpleLinearRegression + +シンプル(一次元)ã®ç·šå½¢å›žå¸°ã‚’実行ã—ã¾ã™ã€‚ + +``` sql +simpleLinearRegression(x, y) +``` + +パラメータ: + +- `x` — 説明変数ã®å€¤ã‚’æŒã¤ã‚«ãƒ©ãƒ ã€‚ +- `y` — 従属変数ã®å€¤ã‚’æŒã¤ã‚«ãƒ©ãƒ ã€‚ + +è¿”ã•ã‚Œã‚‹å€¤: + +çµæžœã®ç›´ç·š `y = k*x + b` ã®å®šæ•° `(k, b)`。 + +**例** + +``` sql +SELECT arrayReduce('simpleLinearRegression', [0, 1, 2, 3], [0, 1, 2, 3]) +``` + +``` text +┌─arrayReduce('simpleLinearRegression', [0, 1, 2, 3], [0, 1, 2, 3])─┠+│ (1,0) │ +└───────────────────────────────────────────────────────────────────┘ +``` + +``` sql +SELECT arrayReduce('simpleLinearRegression', [0, 1, 2, 3], [3, 4, 5, 6]) +``` + +``` text +┌─arrayReduce('simpleLinearRegression', [0, 1, 2, 3], [3, 4, 5, 6])─┠+│ (1,3) │ +└───────────────────────────────────────────────────────────────────┘ +``` + diff --git a/docs/ja/sql-reference/aggregate-functions/reference/singlevalueornull.md b/docs/ja/sql-reference/aggregate-functions/reference/singlevalueornull.md new file mode 100644 index 00000000000..957efed270f --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/singlevalueornull.md @@ -0,0 +1,58 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/singlevalueornull +sidebar_position: 184 +--- + +# singleValueOrNull + +集計関数 `singleValueOrNull` ã¯ã€`x = ALL (SELECT ...)` ã®ã‚ˆã†ãªã‚µãƒ–クエリオペレーターを実装ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚データ内ã«ä¸€æ„ã®éžNULL値ãŒå”¯ä¸€ã‚ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚ +ã‚‚ã—一æ„ã®å€¤ãŒä¸€ã¤ã ã‘ã‚ã‚‹å ´åˆã€ãã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ゼロã¾ãŸã¯å°‘ãªãã¨ã‚‚二ã¤ä»¥ä¸Šã®ç•°ãªã‚‹å€¤ãŒã‚ã‚‹å ´åˆã€NULLã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +singleValueOrNull(x) +``` + +**パラメーター** + +- `x` — ä»»æ„ã®[データ型](../../data-types/index.md)([Map](../../data-types/map.md)ã€[Array](../../data-types/array.md)ã€ã¾ãŸã¯[Tuple](../../data-types/tuple)ã§[Nullable](../../data-types/nullable.md)åž‹ã«ãªã‚Œãªã„ã‚‚ã®ã‚’除ã)ã®ã‚«ãƒ©ãƒ ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 一æ„ã®éžNULL値ãŒä¸€ã¤ã ã‘ã‚ã‚‹å ´åˆã€ãã®å€¤ã€‚ +- ゼロã¾ãŸã¯å°‘ãªãã¨ã‚‚二ã¤ä»¥ä¸Šã®ç•°ãªã‚‹å€¤ãŒã‚ã‚‹å ´åˆã€`NULL`。 + +**例** + +クエリ: + +``` sql +CREATE TABLE test (x UInt8 NULL) ENGINE=Log; +INSERT INTO test (x) VALUES (NULL), (NULL), (5), (NULL), (NULL); +SELECT singleValueOrNull(x) FROM test; +``` + +çµæžœ: + +```response +┌─singleValueOrNull(x)─┠+│ 5 │ +└──────────────────────┘ +``` + +クエリ: + +```sql +INSERT INTO test (x) VALUES (10); +SELECT singleValueOrNull(x) FROM test; +``` + +çµæžœ: + +```response +┌─singleValueOrNull(x)─┠+│ á´ºáµá´¸á´¸ │ +└──────────────────────┘ +``` + diff --git a/docs/ja/sql-reference/aggregate-functions/reference/skewpop.md b/docs/ja/sql-reference/aggregate-functions/reference/skewpop.md new file mode 100644 index 00000000000..913e0b12e70 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/skewpop.md @@ -0,0 +1,27 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/skewpop +sidebar_position: 185 +--- + +# skewPop + +シーケンスã®[歪度](https://en.wikipedia.org/wiki/Skewness)を計算ã—ã¾ã™ã€‚ + +``` sql +skewPop(expr) +``` + +**引数** + +`expr` — 数値を返ã™[å¼](../../../sql-reference/syntax.md#syntax-expressions)。 + +**戻り値** + +与ãˆã‚‰ã‚ŒãŸåˆ†å¸ƒã®æ­ªåº¦ã€‚åž‹ — [Float64](../../../sql-reference/data-types/float.md) + +**例** + +``` sql +SELECT skewPop(value) FROM series_with_value_column; +``` + diff --git a/docs/ja/sql-reference/aggregate-functions/reference/skewsamp.md b/docs/ja/sql-reference/aggregate-functions/reference/skewsamp.md new file mode 100644 index 00000000000..c638abc78c8 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/skewsamp.md @@ -0,0 +1,29 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/skewsamp +sidebar_position: 186 +--- + +# skewSamp + +シーケンスã®[標本歪度](https://en.wikipedia.org/wiki/Skewness)を計算ã—ã¾ã™ã€‚ + +渡ã•ã‚ŒãŸå€¤ãŒãƒ©ãƒ³ãƒ€ãƒ å¤‰æ•°ã®æ¨™æœ¬ã‚’å½¢æˆã™ã‚‹å ´åˆã€ãã®æ­ªåº¦ã®ä¸å推定é‡ã‚’表ã—ã¾ã™ã€‚ + +``` sql +skewSamp(expr) +``` + +**引数** + +`expr` — 数値を返ã™[å¼](../../../sql-reference/syntax.md#syntax-expressions)。 + +**戻り値** + +指定ã•ã‚ŒãŸåˆ†å¸ƒã®æ­ªåº¦ã€‚åž‹ — [Float64](../../../sql-reference/data-types/float.md)。`n <= 1`(`n`ã¯æ¨™æœ¬ã®ã‚µã‚¤ã‚ºï¼‰ã®å ´åˆã€é–¢æ•°ã¯`nan`ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT skewSamp(value) FROM series_with_value_column; +``` + diff --git a/docs/ja/sql-reference/aggregate-functions/reference/sparkbar.md b/docs/ja/sql-reference/aggregate-functions/reference/sparkbar.md new file mode 100644 index 00000000000..eb8856e1477 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/sparkbar.md @@ -0,0 +1,63 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/sparkbar +sidebar_position: 187 +sidebar_label: sparkbar +--- + +# sparkbar + +ã“ã®é–¢æ•°ã¯ã€å€¤ `x` ã¨ã“れらã®å€¤ã®ç¹°ã‚Šè¿”ã—頻度 `y` ã«åŸºã¥ã„ã¦ã€åŒºé–“ `[min_x, max_x]` ã®é »åº¦ãƒ’ストグラムをプロットã—ã¾ã™ã€‚ +åŒã˜ãƒã‚±ãƒƒãƒˆã«å…¥ã‚‹ã™ã¹ã¦ã® `x` ã®ç¹°ã‚Šè¿”ã—ã¯å¹³å‡ã•ã‚Œã‚‹ãŸã‚ã€äº‹å‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’集約ã—ã¦ãŠãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +è² ã®ç¹°ã‚Šè¿”ã—ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + +ã‚‚ã—区間ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€æœ€å°ã® `x` ãŒåŒºé–“ã®é–‹å§‹ã¨ã—ã¦ä½¿ã‚ã‚Œã€æœ€å¤§ã® `x` ãŒåŒºé–“ã®çµ‚了ã¨ã—ã¦ä½¿ã‚ã‚Œã¾ã™ã€‚ +ãれ以外ã®å ´åˆã€åŒºé–“外ã®å€¤ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +sparkbar(buckets[, min_x, max_x])(x, y) +``` + +**パラメータ** + +- `buckets` — セグメント数。型: [Integer](../../../sql-reference/data-types/int-uint.md)。 +- `min_x` — 区間ã®é–‹å§‹ã€‚オプションã®ãƒ‘ラメータ。 +- `max_x` — 区間ã®çµ‚了。オプションã®ãƒ‘ラメータ。 + +**引数** + +- `x` — 値ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã€‚ +- `y` — 値ã®é »åº¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã€‚ + +**戻り値** + +- 頻度ヒストグラム。 + +**例** + +クエリ: + +``` sql +CREATE TABLE spark_bar_data (`value` Int64, `event_date` Date) ENGINE = MergeTree ORDER BY event_date; + +INSERT INTO spark_bar_data VALUES (1,'2020-01-01'), (3,'2020-01-02'), (4,'2020-01-02'), (-3,'2020-01-02'), (5,'2020-01-03'), (2,'2020-01-04'), (3,'2020-01-05'), (7,'2020-01-06'), (6,'2020-01-07'), (8,'2020-01-08'), (2,'2020-01-11'); + +SELECT sparkbar(9)(event_date,cnt) FROM (SELECT sum(value) as cnt, event_date FROM spark_bar_data GROUP BY event_date); + +SELECT sparkbar(9, toDate('2020-01-01'), toDate('2020-01-10'))(event_date,cnt) FROM (SELECT sum(value) as cnt, event_date FROM spark_bar_data GROUP BY event_date); +``` + +çµæžœ: + +``` text +┌─sparkbar(9)(event_date, cnt)─┠+│ ▂▅▂▃▆█ â–‚ │ +└──────────────────────────────┘ + +┌─sparkbar(9, toDate('2020-01-01'), toDate('2020-01-10'))(event_date, cnt)─┠+│ ▂▅▂▃▇▆█ │ +└──────────────────────────────────────────────────────────────────────────┘ +``` + +ã“ã®é–¢æ•°ã®åˆ¥å㯠sparkBar ã§ã™ã€‚ diff --git a/docs/ja/sql-reference/aggregate-functions/reference/stddevpop.md b/docs/ja/sql-reference/aggregate-functions/reference/stddevpop.md new file mode 100644 index 00000000000..0dc069cadb1 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/stddevpop.md @@ -0,0 +1,55 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/stddevpop +sidebar_position: 188 +--- + +# stddevPop + +çµæžœã¯ [varPop](../../../sql-reference/aggregate-functions/reference/varpop.md) ã®å¹³æ–¹æ ¹ã¨ç­‰ã—ã„ã§ã™ã€‚ + +別å: `STD`, `STDDEV_POP`. + +:::note +ã“ã®é–¢æ•°ã¯æ•°å€¤çš„ã«ä¸å®‰å®šãªã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¾ã™ã€‚計算ã«ãŠã„ã¦[数値安定性](https://en.wikipedia.org/wiki/Numerical_stability)ãŒå¿…è¦ãªå ´åˆã¯ã€[`stddevPopStable`](../reference/stddevpopstable.md) 関数を使用ã—ã¦ãã ã•ã„。ã“ã®é–¢æ•°ã¯ã‚ˆã‚Šé…ã動作ã—ã¾ã™ãŒã€è¨ˆç®—誤差ãŒä½Žããªã‚Šã¾ã™ã€‚ +::: + +**構文** + +```sql +stddevPop(x) +``` + +**パラメーター** + +- `x`: 標準å差を求ã‚る値ã®é›†åˆã€‚ [(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal*](../../data-types/decimal.md)。 + +**戻り値** + +- `x` ã®æ¨™æº–åå·®ã®å¹³æ–¹æ ¹ã€‚ [Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test_data; +CREATE TABLE test_data +( + population UInt8, +) +ENGINE = Log; + +INSERT INTO test_data VALUES (3),(3),(3),(4),(4),(5),(5),(7),(11),(15); + +SELECT + stddevPop(population) AS stddev +FROM test_data; +``` + +çµæžœ: + +```response +┌────────────stddev─┠+│ 3.794733192202055 │ +└───────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/stddevpopstable.md b/docs/ja/sql-reference/aggregate-functions/reference/stddevpopstable.md new file mode 100644 index 00000000000..7d861d03413 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/stddevpopstable.md @@ -0,0 +1,49 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/stddevpopstable +sidebar_position: 189 +--- + +# stddevPopStable + +ã“ã®çµæžœã¯ [varPop](../../../sql-reference/aggregate-functions/reference/varpop.md) ã®å¹³æ–¹æ ¹ã«ç­‰ã—ã„ã§ã™ã€‚[`stddevPop`](../reference/stddevpop.md) ã¨ç•°ãªã‚Šã€ã“ã®é–¢æ•°ã¯æ•°å€¤çš„ã«å®‰å®šã—ãŸã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¾ã™ã€‚計算速度ã¯é…ããªã‚Šã¾ã™ãŒã€è¨ˆç®—誤差を少ãªã抑ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +```sql +stddevPopStable(x) +``` + +**パラメータ** + +- `x`: 標準å差を求ã‚る値ã®æ¯é›†å›£ã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal*](../../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +`x` ã®æ¨™æº–åå·®ã®å¹³æ–¹æ ¹ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test_data; +CREATE TABLE test_data +( + population Float64, +) +ENGINE = Log; + +INSERT INTO test_data SELECT randUniform(5.5, 10) FROM numbers(1000000) + +SELECT + stddevPopStable(population) AS stddev +FROM test_data; +``` + +çµæžœ: + +```response +┌─────────────stddev─┠+│ 1.2999977786592576 │ +└────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/stddevsamp.md b/docs/ja/sql-reference/aggregate-functions/reference/stddevsamp.md new file mode 100644 index 00000000000..e3f3f009a1e --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/stddevsamp.md @@ -0,0 +1,55 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/stddevsamp +sidebar_position: 190 +--- + +# stddevSamp + +ã“ã®çµæžœã¯ [varSamp](../../../sql-reference/aggregate-functions/reference/varsamp.md) ã®å¹³æ–¹æ ¹ã«ç­‰ã—ã„ã§ã™ã€‚ + +別å: `STDDEV_SAMP` + +:::note +ã“ã®é–¢æ•°ã¯æ•°å€¤çš„ã«ä¸å®‰å®šãªã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¦ã„ã¾ã™ã€‚計算ã«ãŠã„ã¦[数値的安定性](https://en.wikipedia.org/wiki/Numerical_stability)ãŒå¿…è¦ãªå ´åˆã¯ã€[`stddevSampStable`](../reference/stddevsampstable.md) 関数を使用ã—ã¦ãã ã•ã„。ã“ã®é–¢æ•°ã¯é€Ÿåº¦ãŒé…ããªã‚Šã¾ã™ãŒã€è¨ˆç®—誤差ãŒå°ã•ããªã‚Šã¾ã™ã€‚ +::: + +**構文** + +```sql +stddevSamp(x) +``` + +**パラメーター** + +- `x`: 標本分散ã®å¹³æ–¹æ ¹ã‚’求ã‚ã‚‹ãŸã‚ã®å€¤ã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal*](../../data-types/decimal.md)。 + +**戻り値** + +`x` ã®æ¨™æœ¬åˆ†æ•£ã®å¹³æ–¹æ ¹ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test_data; +CREATE TABLE test_data +( + population UInt8, +) +ENGINE = Log; + +INSERT INTO test_data VALUES (3),(3),(3),(4),(4),(5),(5),(7),(11),(15); + +SELECT + stddevSamp(population) +FROM test_data; +``` + +çµæžœ: + +```response +┌─stddevSamp(population)─┠+│ 4 │ +└────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/stddevsampstable.md b/docs/ja/sql-reference/aggregate-functions/reference/stddevsampstable.md new file mode 100644 index 00000000000..8aea160d2f5 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/stddevsampstable.md @@ -0,0 +1,49 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/stddevsampstable +sidebar_position: 191 +--- + +# stddevSampStable + +çµæžœã¯ [varSamp](../../../sql-reference/aggregate-functions/reference/varsamp.md) ã®å¹³æ–¹æ ¹ã¨ç­‰ã—ã„ã§ã™ã€‚ [`stddevSamp`](../reference/stddevsamp.md) ã¨ã¯ç•°ãªã‚Šã€ã“ã®é–¢æ•°ã¯æ•°å€¤çš„ã«å®‰å®šã—ãŸã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¾ã™ã€‚動作ã¯é…ã„ã§ã™ãŒã€è¨ˆç®—誤差ãŒå°‘ãªã„ã§ã™ã€‚ + +**構文** + +```sql +stddevSampStable(x) +``` + +**パラメータ** + +- `x`: 標本分散ã®å¹³æ–¹æ ¹ã‚’求ã‚る値。[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal*](../../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +`x` ã®æ¨™æœ¬åˆ†æ•£ã®å¹³æ–¹æ ¹ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test_data; +CREATE TABLE test_data +( + population UInt8, +) +ENGINE = Log; + +INSERT INTO test_data VALUES (3),(3),(3),(4),(4),(5),(5),(7),(11),(15); + +SELECT + stddevSampStable(population) +FROM test_data; +``` + +çµæžœ: + +```response +┌─stddevSampStable(population)─┠+│ 4 │ +└──────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/stochasticlinearregression.md b/docs/ja/sql-reference/aggregate-functions/reference/stochasticlinearregression.md new file mode 100644 index 00000000000..a3c6fc9f19d --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/stochasticlinearregression.md @@ -0,0 +1,76 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/stochasticlinearregression +sidebar_position: 192 +--- + +# stochasticLinearRegression {#agg_functions_stochasticlinearregression_parameters} + +ã“ã®é–¢æ•°ã¯ç¢ºçŽ‡çš„線形回帰を実装ã—ã¾ã™ã€‚学習率ã€L2正則化係数ã€ãƒŸãƒ‹ãƒãƒƒãƒã‚µã‚¤ã‚ºã®ã‚«ã‚¹ã‚¿ãƒ ãƒ‘ラメータをサãƒãƒ¼ãƒˆã—ã€é‡ã¿æ›´æ–°ã®ãŸã‚ã«ã„ãã¤ã‹ã®æ–¹æ³•ã‚’æŒã£ã¦ã„ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ä½¿ç”¨ã•ã‚Œã‚‹[Adam](https://en.wikipedia.org/wiki/Stochastic_gradient_descent#Adam)ã€[simple SGD](https://en.wikipedia.org/wiki/Stochastic_gradient_descent)ã€[Momentum](https://en.wikipedia.org/wiki/Stochastic_gradient_descent#Momentum)ã€ãŠã‚ˆã³[Nesterov](https://mipt.ru/upload/medialibrary/d7e/41-91.pdf))。 + +### パラメータ + +4ã¤ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºå¯èƒ½ãªãƒ‘ラメータãŒã‚ã‚Šã¾ã™ã€‚ã“れらã¯é †ç•ªã«é–¢æ•°ã«æ¸¡ã•ã‚Œã¾ã™ãŒã€ã™ã¹ã¦ã‚’渡ã™å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“ - デフォルト値ãŒä½¿ç”¨ã•ã‚Œã¾ã™ãŒã€è‰¯ã„モデルã«ã¯ãƒ‘ラメータã®èª¿æ•´ãŒå¿…è¦ã§ã™ã€‚ + +``` text +stochasticLinearRegression(0.00001, 0.1, 15, 'Adam') +``` + +1. `学習率` ã¯å‹¾é…é™ä¸‹æ³•ã®ã‚¹ãƒ†ãƒƒãƒ—ãŒè¡Œã‚れる際ã®ã‚¹ãƒ†ãƒƒãƒ—é•·ã®ä¿‚æ•°ã§ã™ã€‚学習率ãŒå¤§ãã™ãŽã‚‹ã¨ãƒ¢ãƒ‡ãƒ«ã®é‡ã¿ãŒç„¡é™å¤§ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚デフォルト㯠`0.00001` ã§ã™ã€‚ +2. `L2正則化係数` ã§ã€éŽå­¦ç¿’を防ãã®ã«å½¹ç«‹ã¤ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。デフォルト㯠`0.1` ã§ã™ã€‚ +3. `ミニãƒãƒƒãƒã‚µã‚¤ã‚º` ã¯å‹¾é…ãŒè¨ˆç®—ã•ã‚Œã¦1ステップã®å‹¾é…é™ä¸‹ã‚’実行ã™ã‚‹è¦ç´ ã®æ•°ã‚’設定ã—ã¾ã™ã€‚純粋ãªç¢ºçŽ‡çš„é™ä¸‹ã¯1ã¤ã®è¦ç´ ã‚’使用ã—ã¾ã™ãŒã€å°ã•ãªãƒãƒƒãƒï¼ˆç´„10è¦ç´ ï¼‰ã‚’使用ã™ã‚‹ã“ã¨ã§å‹¾é…ステップãŒã‚ˆã‚Šå®‰å®šã—ã¾ã™ã€‚デフォルト㯠`15` ã§ã™ã€‚ +4. `é‡ã¿æ›´æ–°ã®ãŸã‚ã®æ–¹æ³•` ã¯ã€`Adam`(デフォルト)ã€`SGD`ã€`Momentum`ã€`Nesterov` ã§ã™ã€‚`Momentum`ã¨`Nesterov`ã¯è¨ˆç®—ã¨ãƒ¡ãƒ¢ãƒªãŒå°‘ã—多ãå¿…è¦ã§ã™ãŒã€åŽæŸã®é€Ÿã•ã¨ç¢ºçŽ‡çš„勾é…法ã®å®‰å®šæ€§ã«ãŠã„ã¦æœ‰ç”¨ã§ã‚ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +### 使用法 + +`stochasticLinearRegression`ã¯ã€ãƒ¢ãƒ‡ãƒ«ã®ãƒ•ã‚£ãƒƒãƒ†ã‚£ãƒ³ã‚°ã¨æ–°ã—ã„データã¸ã®äºˆæ¸¬ã®2ã¤ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚モデルをフィットã—ã¦ãã®çŠ¶æ…‹ã‚’後ã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã«ä¿å­˜ã™ã‚‹ã«ã¯ã€`-State` コンビãƒãƒ¼ã‚¿ã‚’使用ã—ã¾ã™ã€‚ã“ã‚Œã¯çŠ¶æ…‹ï¼ˆä¾‹ï¼šãƒ¢ãƒ‡ãƒ«ã®é‡ã¿ï¼‰ã‚’ä¿å­˜ã—ã¾ã™ã€‚ +予測ã™ã‚‹ãŸã‚ã«ã¯ã€[evalMLMethod](../../../sql-reference/functions/machine-learning-functions.md#machine_learning_methods-evalmlmethod)関数を使用ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€äºˆæ¸¬ã™ã‚‹ç‰¹å¾´ã¨ã¨ã‚‚ã«çŠ¶æ…‹ã‚’引数ã¨ã—ã¦å—ã‘å–ã‚Šã¾ã™ã€‚ + + + +**1.** フィッティング + +以下ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +``` sql +CREATE TABLE IF NOT EXISTS train_data +( + param1 Float64, + param2 Float64, + target Float64 +) ENGINE = Memory; + +CREATE TABLE your_model ENGINE = Memory AS SELECT +stochasticLinearRegressionState(0.1, 0.0, 5, 'SGD')(target, param1, param2) +AS state FROM train_data; +``` + +ã“ã“ã§ã¯ã€`train_data` テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚パラメータã®æ•°ã¯å›ºå®šã•ã‚Œã¦ãŠã‚‰ãšã€`linearRegressionState`ã«æ¸¡ã•ã‚Œã‚‹å¼•æ•°ã®æ•°ã«ã®ã¿ä¾å­˜ã—ã¾ã™ã€‚ã™ã¹ã¦æ•°å€¤ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +予測ã—ãŸã„対象値をæŒã¤ã‚«ãƒ©ãƒ ã¯ã€æœ€åˆã®å¼•æ•°ã¨ã—ã¦æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +**2.** 予測 + +テーブルã«çŠ¶æ…‹ã‚’ä¿å­˜ã—ãŸå¾Œã€ãれを複数回使用ã—ã¦äºˆæ¸¬ã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã—ã€ä»–ã®çŠ¶æ…‹ã¨çµåˆã—ã¦æ–°ã—ã„ã€ã•ã‚‰ã«å„ªã‚ŒãŸãƒ¢ãƒ‡ãƒ«ã‚’作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +``` sql +WITH (SELECT state FROM your_model) AS model SELECT +evalMLMethod(model, param1, param2) FROM test_data +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯äºˆæ¸¬å€¤ã®ã‚«ãƒ©ãƒ ã‚’è¿”ã—ã¾ã™ã€‚`evalMLMethod` ã®æœ€åˆã®å¼•æ•°ã¯ `AggregateFunctionState` オブジェクトã§ã‚ã‚Šã€ãã®å¾ŒãŒç‰¹å¾´ã®ã‚«ãƒ©ãƒ ã§ã™ã€‚ + +`test_data`ã¯`train_data`ã¨åŒæ§˜ã®ãƒ†ãƒ¼ãƒ–ルã§ã™ãŒã€å¯¾è±¡å€¤ãŒå«ã¾ã‚Œã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +### æ³¨æ„ + +1. 2ã¤ã®ãƒ¢ãƒ‡ãƒ«ã‚’マージã™ã‚‹ãŸã‚ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã“ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã‚’作æˆã§ãã¾ã™ï¼š + `sql SELECT state1 + state2 FROM your_models` + ã“ã“㧠`your_models` テーブルã¯ä¸¡æ–¹ã®ãƒ¢ãƒ‡ãƒ«ã‚’å«ã¿ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯æ–°ã—ã„ `AggregateFunctionState` オブジェクトを返ã—ã¾ã™ã€‚ + +2. ユーザーã¯ã€`-State` コンビãƒãƒ¼ã‚¿ãŒä½¿ç”¨ã•ã‚Œã¦ã„ãªã„å ´åˆä½œæˆã—ãŸãƒ¢ãƒ‡ãƒ«ã®é‡ã¿ã‚’ä¿å­˜ã›ãšã«å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + `sql SELECT stochasticLinearRegression(0.01)(target, param1, param2) FROM train_data` + ã“ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã¯ãƒ¢ãƒ‡ãƒ«ã‚’フィットã—ã€ãã®é‡ã¿ã‚’è¿”ã—ã¾ã™ - 最åˆã¯ãƒ¢ãƒ‡ãƒ«ã®ãƒ‘ラメータã«å¯¾å¿œã™ã‚‹é‡ã¿ã§ã€æœ€å¾ŒãŒãƒã‚¤ã‚¢ã‚¹ã§ã™ã€‚上記ã®ä¾‹ã§ã¯ã€ã‚¯ã‚¨ãƒªã¯3ã¤ã®å€¤ã‚’æŒã¤ã‚«ãƒ©ãƒ ã‚’è¿”ã—ã¾ã™ã€‚ + +**å‚ç…§** + +- [stochasticLogisticRegression](../../../sql-reference/aggregate-functions/reference/stochasticlogisticregression.md#stochasticlogisticregression) +- [線形回帰ã¨ãƒ­ã‚¸ã‚¹ãƒ†ã‚£ãƒƒã‚¯å›žå¸°ã®é•ã„](https://stackoverflow.com/questions/12146914/what-is-the-difference-between-linear-regression-and-logistic-regression) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/stochasticlogisticregression.md b/docs/ja/sql-reference/aggregate-functions/reference/stochasticlogisticregression.md new file mode 100644 index 00000000000..2c62ac2b2ef --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/stochasticlogisticregression.md @@ -0,0 +1,55 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/stochasticlogisticregression +sidebar_position: 193 +--- + +# stochasticLogisticRegression + +ã“ã®é–¢æ•°ã¯ç¢ºçŽ‡çš„ロジスティック回帰を実装ã—ã¾ã™ã€‚ã“ã‚Œã¯äºŒå€¤åˆ†é¡žå•é¡Œã«ä½¿ç”¨ã§ãã€stochasticLinearRegressionã¨åŒã˜ã‚«ã‚¹ã‚¿ãƒ ãƒ‘ラメータをサãƒãƒ¼ãƒˆã—ã€åŒæ§˜ã«å‹•ä½œã—ã¾ã™ã€‚ + +### パラメータ + +パラメータã¯stochasticLinearRegressionã¨å…¨ãåŒã˜ã§ã™ï¼š +`学習率`ã€`L2正則化係数`ã€`ミニãƒãƒƒãƒã‚µã‚¤ã‚º`ã€`é‡ã¿ã‚’æ›´æ–°ã™ã‚‹æ–¹æ³•`。詳細ã«ã¤ã„ã¦ã¯[パラメータ](../reference/stochasticlinearregression.md/#parameters)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +``` text +stochasticLogisticRegression(1.0, 1.0, 10, 'SGD') +``` + +**1.** フィッティング + + + + `Fitting`セクションã®èª¬æ˜Žã«ã¤ã„ã¦ã¯ã€[stochasticLinearRegression](#stochasticlinearregression-usage-fitting)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + 予測ã•ã‚Œã‚‹ãƒ©ãƒ™ãƒ«ã¯\[-1, 1\]ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**2.** 予測 + + + + ä¿å­˜ã•ã‚ŒãŸçŠ¶æ…‹ã‚’使用ã—ã¦ã€ã‚ªãƒ–ジェクトãŒãƒ©ãƒ™ãƒ«`1`ã‚’æŒã¤ç¢ºçŽ‡ã‚’予測ã§ãã¾ã™ã€‚ + + ``` sql + WITH (SELECT state FROM your_model) AS model SELECT + evalMLMethod(model, param1, param2) FROM test_data + ``` + + クエリã¯ç¢ºçŽ‡ã®ã‚«ãƒ©ãƒ ã‚’è¿”ã—ã¾ã™ã€‚`evalMLMethod`ã®æœ€åˆã®å¼•æ•°ã¯`AggregateFunctionState`オブジェクトã§ã‚ã‚Šã€ãã®æ¬¡ã«ç‰¹å¾´ã®ã‚«ãƒ©ãƒ ãŒç¶šãã¾ã™ã€‚ + + ã¾ãŸã€ç•°ãªã‚‹ãƒ©ãƒ™ãƒ«ã‚’è¦ç´ ã«å‰²ã‚Šå½“ã¦ã‚‹ç¢ºçŽ‡ã®å¢ƒç•Œã‚’設定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + ``` sql + SELECT ans < 1.1 AND ans > 0.5 FROM + (WITH (SELECT state FROM your_model) AS model SELECT + evalMLMethod(model, param1, param2) AS ans FROM test_data) + ``` + + ã“ã‚Œã«ã‚ˆã‚Šã€çµæžœã¯ãƒ©ãƒ™ãƒ«ã«ãªã‚Šã¾ã™ã€‚ + + `test_data`ã¯`train_data`ã®ã‚ˆã†ãªãƒ†ãƒ¼ãƒ–ルã§ã™ãŒã€ç›®æ¨™å€¤ã‚’å«ã¾ãªã„å ´åˆã‚‚ã‚ã‚Šã¾ã™ã€‚ + +**関連項目** + +- [stochasticLinearRegression](../../../sql-reference/aggregate-functions/reference/stochasticlinearregression.md#agg_functions-stochasticlinearregression) +- [線形回帰ã¨ãƒ­ã‚¸ã‚¹ãƒ†ã‚£ãƒƒã‚¯å›žå¸°ã®é•ã„。](https://stackoverflow.com/questions/12146914/what-is-the-difference-between-linear-regression-and-logistic-regression) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/studentttest.md b/docs/ja/sql-reference/aggregate-functions/reference/studentttest.md new file mode 100644 index 00000000000..e04e64f3b33 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/studentttest.md @@ -0,0 +1,71 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/studentttest +sidebar_position: 194 +sidebar_label: studentTTest +--- + +# studentTTest + +2ã¤ã®æ¯é›†å›£ã®ã‚µãƒ³ãƒ—ルã«å¯¾ã—ã¦ã‚¹ãƒãƒ¥ãƒ¼ãƒ‡ãƒ³ãƒˆã®t検定をé©ç”¨ã—ã¾ã™ã€‚ + +**構文** + +``` sql +studentTTest([confidence_level])(sample_data, sample_index) +``` + +両サンプルã®å€¤ã¯`sample_data`カラムã«ã‚ã‚Šã¾ã™ã€‚`sample_index`ãŒ0ã®å ´åˆã€ãã®è¡Œã®å€¤ã¯æœ€åˆã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å±žã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯2番目ã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å±žã—ã¾ã™ã€‚帰無仮説ã¯æ¯é›†å›£ã®å¹³å‡ãŒç­‰ã—ã„ã¨ã—ã¦ã„ã¾ã™ã€‚æ­£è¦åˆ†å¸ƒã§ç­‰ã—ã„分散を仮定ã—ã¾ã™ã€‚ + +**引数** + +- `sample_data` — サンプルデータ。[Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md)ã¾ãŸã¯[Decimal](../../../sql-reference/data-types/decimal.md)。 +- `sample_index` — サンプルインデックス。[Integer](../../../sql-reference/data-types/int-uint.md)。 + +**パラメータ** + +- `confidence_level` — 信頼区間を計算ã™ã‚‹ãŸã‚ã®ä¿¡é ¼æ°´æº–。[Float](../../../sql-reference/data-types/float.md)。 + + +**è¿”ã•ã‚Œã‚‹å€¤** + +2ã¤ã¾ãŸã¯4ã¤ã®è¦ç´ ã‚’æŒã¤[Tuple](../../../sql-reference/data-types/tuple.md)(オプションã®`confidence_level`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼‰: + +- 計算ã•ã‚ŒãŸt統計é‡ã€‚[Float64](../../../sql-reference/data-types/float.md)。 +- 計算ã•ã‚ŒãŸp値。[Float64](../../../sql-reference/data-types/float.md)。 +- [計算ã•ã‚ŒãŸä¿¡é ¼åŒºé–“ã®ä¸‹å´ã€‚[Float64](../../../sql-reference/data-types/float.md)。] +- [計算ã•ã‚ŒãŸä¿¡é ¼åŒºé–“ã®ä¸Šå´ã€‚[Float64](../../../sql-reference/data-types/float.md)。] + + +**例** + +入力テーブル: + +``` text +┌─sample_data─┬─sample_index─┠+│ 20.3 │ 0 │ +│ 21.1 │ 0 │ +│ 21.9 │ 1 │ +│ 21.7 │ 0 │ +│ 19.9 │ 1 │ +│ 21.8 │ 1 │ +└─────────────┴──────────────┘ +``` + +クエリ: + +``` sql +SELECT studentTTest(sample_data, sample_index) FROM student_ttest; +``` + +çµæžœ: + +``` text +┌─studentTTest(sample_data, sample_index)───┠+│ (-0.21739130434783777,0.8385421208415731) │ +└───────────────────────────────────────────┘ +``` + +**関連項目** + +- [スãƒãƒ¥ãƒ¼ãƒ‡ãƒ³ãƒˆã®t検定](https://en.wikipedia.org/wiki/Student%27s_t-test) +- [welchTTest関数](welchttest.md#welchttest) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/sum.md b/docs/ja/sql-reference/aggregate-functions/reference/sum.md new file mode 100644 index 00000000000..fd9c9f4c0e9 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/sum.md @@ -0,0 +1,61 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/sum +sidebar_position: 195 +--- + +# sum + +åˆè¨ˆã‚’計算ã—ã¾ã™ã€‚数値ã«å¯¾ã—ã¦ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +**構文** + +```sql +sum(num) +``` + +**パラメータ** +- `num`: 数値ã®ã‚«ãƒ©ãƒ ã€‚[(U)Int*](../../data-types/int-uint.md)ã€[Float*](../../data-types/float.md)ã€[Decimal*](../../data-types/decimal.md)。 + +**戻り値** + +- 値ã®åˆè¨ˆã€‚[(U)Int*](../../data-types/int-uint.md)ã€[Float*](../../data-types/float.md)ã€[Decimal*](../../data-types/decimal.md)。 + +**例** + +ã¾ãšã€`employees`ã¨ã„ã†ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ã„ãã¤ã‹ã®æž¶ç©ºã®å¾“業員データを挿入ã—ã¾ã™ã€‚ + +クエリ: + +```sql +CREATE TABLE employees +( + `id` UInt32, + `name` String, + `salary` UInt32 +) +ENGINE = Log +``` + +```sql +INSERT INTO employees VALUES + (87432, 'John Smith', 45680), + (59018, 'Jane Smith', 72350), + (20376, 'Ivan Ivanovich', 58900), + (71245, 'Anastasia Ivanovna', 89210); +``` + +`sum`関数を使用ã—ã¦ã€å¾“業員ã®çµ¦ä¸Žã®åˆè¨ˆã‚’求ã‚ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT sum(salary) FROM employees; +``` + +çµæžœ: + +```response + ┌─sum(salary)─┠+1. │ 266140 │ + └─────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/sumcount.md b/docs/ja/sql-reference/aggregate-functions/reference/sumcount.md new file mode 100644 index 00000000000..a81e19ecd59 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/sumcount.md @@ -0,0 +1,46 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/sumcount +sidebar_position: 196 +title: sumCount +--- + +数値ã®åˆè¨ˆã‚’計算ã—ã€åŒæ™‚ã«è¡Œæ•°ã‚’カウントã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ClickHouseã®ã‚¯ã‚¨ãƒªã‚ªãƒ—ティマイザã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚クエリ内ã«è¤‡æ•°ã®`sum`ã€`count`ã€ã¾ãŸã¯`avg`関数ãŒã‚ã‚‹å ´åˆã€ãれらをå˜ä¸€ã®`sumCount`関数ã«ç½®ãæ›ãˆã¦è¨ˆç®—ã‚’å†åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®é–¢æ•°ã‚’明示的ã«ä½¿ç”¨ã™ã‚‹å¿…è¦ã¯ã»ã¨ã‚“ã©ã‚ã‚Šã¾ã›ã‚“。 + +**構文** + +``` sql +sumCount(x) +``` + +**引数** + +- `x` — 入力値。データ型ã¯[Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md)ã€ã¾ãŸã¯[Decimal](../../../sql-reference/data-types/decimal.md)ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**戻り値** + +- タプル `(sum, count)`。ã“ã“ã§`sum`ã¯æ•°å€¤ã®åˆè¨ˆã§ã‚ã‚Šã€`count`ã¯NULLã§ãªã„値をæŒã¤è¡Œã®æ•°ã§ã™ã€‚ + +åž‹: [Tuple](../../../sql-reference/data-types/tuple.md)。 + +**例** + +クエリ: + +``` sql +CREATE TABLE s_table (x Int8) Engine = Log; +INSERT INTO s_table SELECT number FROM numbers(0, 20); +INSERT INTO s_table VALUES (NULL); +SELECT sumCount(x) from s_table; +``` + +çµæžœ: + +``` text +┌─sumCount(x)─┠+│ (190,20) │ +└─────────────┘ +``` + +**関連項目** + +- [optimize_syntax_fuse_functions](../../../operations/settings/settings.md#optimize_syntax_fuse_functions) 設定。 diff --git a/docs/ja/sql-reference/aggregate-functions/reference/sumkahan.md b/docs/ja/sql-reference/aggregate-functions/reference/sumkahan.md new file mode 100644 index 00000000000..3a9a04fd45e --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/sumkahan.md @@ -0,0 +1,39 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/sumkahan +sidebar_position: 197 +title: sumKahan +--- + +[Kahanã®åŠ ç®—アルゴリズム](https://en.wikipedia.org/wiki/Kahan_summation_algorithm)を使用ã—ã¦æ•°å€¤ã®åˆè¨ˆã‚’計算ã—ã¾ã™ã€‚ +[sum](./sum.md) 関数よりもé…ã„ã§ã™ã€‚ +補償ã¯[Float](../../../sql-reference/data-types/float.md)åž‹ã«å¯¾ã—ã¦ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +**構文** + +``` sql +sumKahan(x) +``` + +**引数** + +- `x` — 入力値。型ã¯[Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md)ã€ã¾ãŸã¯[Decimal](../../../sql-reference/data-types/decimal.md)ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 数値ã®åˆè¨ˆã€‚入力引数ã®åž‹ã«å¿œã˜ã¦ã€åž‹ã¯[Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md)ã€ã¾ãŸã¯[Decimal](../../../sql-reference/data-types/decimal.md)ã«ãªã‚Šã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT sum(0.1), sumKahan(0.1) FROM numbers(10); +``` + +çµæžœ: + +``` text +┌───────────sum(0.1)─┬─sumKahan(0.1)─┠+│ 0.9999999999999999 │ 1 │ +└────────────────────┴───────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/summap.md b/docs/ja/sql-reference/aggregate-functions/reference/summap.md new file mode 100644 index 00000000000..56ac2ad03a7 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/summap.md @@ -0,0 +1,82 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/summap +sidebar_position: 198 +--- + +# sumMap + +`key` é…列ã§æŒ‡å®šã•ã‚ŒãŸã‚­ãƒ¼ã«å¾“ã£ã¦ `value` é…列をåˆè¨ˆã—ã¾ã™ã€‚ソートã•ã‚ŒãŸé †ã®ã‚­ãƒ¼ã¨ã€å¯¾å¿œã™ã‚‹ã‚­ãƒ¼ã®åˆè¨ˆå€¤ã‚’オーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã›ãšã«è¿”ã™2ã¤ã®é…列ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +**構文** + +- `sumMap(key , value )` [é…列型](../../data-types/array.md)。 +- `sumMap(Tuple(key , value ))` [タプル型](../../data-types/tuple.md)。 + +エイリアス: `sumMappedArrays`。 + +**引数** + +- `key`: キーã®[é…列](../../data-types/array.md)。 +- `value`: 値ã®[é…列](../../data-types/array.md)。 + +キーã¨å€¤ã®é…列ã®ã‚¿ãƒ—ルを渡ã™ã“ã¨ã¯ã€ã‚­ãƒ¼ã®é…列ã¨å€¤ã®é…列を個別ã«æ¸¡ã™ã“ã¨ã¨åŒç¾©ã§ã™ã€‚ + +:::note +`key` 㨠`value` ã®è¦ç´ æ•°ã¯åˆè¨ˆã•ã‚Œã‚‹å„è¡Œã§åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +::: + +**戻り値** + +- ソートã•ã‚ŒãŸé †ã®ã‚­ãƒ¼ã¨ã€å¯¾å¿œã™ã‚‹ã‚­ãƒ¼ã®åˆè¨ˆå€¤ã‚’å«ã‚€2ã¤ã®é…列ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +**例** + +ã¾ãšã€`sum_map` ã¨ã„ã†ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ã€‚キーã®é…列ã¨å€¤ã®é…列ã¯ã€[Nested](../../data-types/nested-data-structures/index.md) åž‹ã® `statusMap` ã¨ã„ã†ã‚«ãƒ©ãƒ ã«å€‹åˆ¥ã«ä¿å­˜ã•ã‚Œã€ã“ã®é–¢æ•°ã®2ã¤ã®ç•°ãªã‚‹æ§‹æ–‡ã®ä½¿ç”¨æ–¹æ³•ã‚’説明ã™ã‚‹ãŸã‚ã«ã€[タプル](../../data-types/tuple.md) åž‹ã® `statusMapTuple` ã¨ã„ã†ã‚«ãƒ©ãƒ ã«ä¸€ç·’ã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +クエリ: + +``` sql +CREATE TABLE sum_map( + date Date, + timeslot DateTime, + statusMap Nested( + status UInt16, + requests UInt64 + ), + statusMapTuple Tuple(Array(Int32), Array(Int32)) +) ENGINE = Log; +``` +```sql +INSERT INTO sum_map VALUES + ('2000-01-01', '2000-01-01 00:00:00', [1, 2, 3], [10, 10, 10], ([1, 2, 3], [10, 10, 10])), + ('2000-01-01', '2000-01-01 00:00:00', [3, 4, 5], [10, 10, 10], ([3, 4, 5], [10, 10, 10])), + ('2000-01-01', '2000-01-01 00:01:00', [4, 5, 6], [10, 10, 10], ([4, 5, 6], [10, 10, 10])), + ('2000-01-01', '2000-01-01 00:01:00', [6, 7, 8], [10, 10, 10], ([6, 7, 8], [10, 10, 10])); +``` + +次ã«ã€ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—㦠`sumMap` 関数を使ã„ã€é…列ã¨ã‚¿ãƒ—ル型ã®æ§‹æ–‡ã®ä¸¡æ–¹ã‚’利用ã—ã¦ã‚¯ã‚¨ãƒªã‚’è¡Œã„ã¾ã™: + +クエリ: + +``` sql +SELECT + timeslot, + sumMap(statusMap.status, statusMap.requests), + sumMap(statusMapTuple) +FROM sum_map +GROUP BY timeslot +``` + +çµæžœ: + +``` text +┌────────────timeslot─┬─sumMap(statusMap.status, statusMap.requests)─┬─sumMap(statusMapTuple)─────────┠+│ 2000-01-01 00:00:00 │ ([1,2,3,4,5],[10,10,20,10,10]) │ ([1,2,3,4,5],[10,10,20,10,10]) │ +│ 2000-01-01 00:01:00 │ ([4,5,6,7,8],[10,10,20,10,10]) │ ([4,5,6,7,8],[10,10,20,10,10]) │ +└─────────────────────┴──────────────────────────────────────────────┴────────────────────────────────┘ +``` + +**関連情報** + +- [Map データ型ã®ãŸã‚ã® Map コンビãƒãƒ¼ã‚¿ãƒ¼](../combinators.md#-map) +- [sumMapWithOverflow](../reference/summapwithoverflow.md) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/summapwithoverflow.md b/docs/ja/sql-reference/aggregate-functions/reference/summapwithoverflow.md new file mode 100644 index 00000000000..b15d3d93161 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/summapwithoverflow.md @@ -0,0 +1,90 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/summapwithoverflow +sidebar_position: 199 +--- + +# sumMapWithOverflow + +`key` é…列ã§æŒ‡å®šã•ã‚ŒãŸã‚­ãƒ¼ã«åŸºã¥ã„㦠`value` é…列ã®åˆè¨ˆã‚’求ã‚ã¾ã™ã€‚ソートã•ã‚ŒãŸé †åºã§ã®ã‚­ãƒ¼ã¨ã€ãã‚Œã«å¯¾å¿œã™ã‚‹ã‚­ãƒ¼ã®åˆè¨ˆå€¤ã®äºŒã¤ã®é…列ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ [sumMap](../reference/summap.md) 関数ã¨ç•°ãªã‚Šã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã«ã‚ˆã‚‹åŠ ç®—ã‚’è¡Œã„ã¾ã™ã€‚ã¤ã¾ã‚Šã€å¼•æ•°ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨åŒã˜ãƒ‡ãƒ¼ã‚¿åž‹ã§çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +- `sumMapWithOverflow(key , value )` [Array åž‹](../../data-types/array.md)。 +- `sumMapWithOverflow(Tuple(key , value ))` [Tuple åž‹](../../data-types/tuple.md)。 + +**引数** + +- `key`: [Array](../../data-types/array.md) åž‹ã®ã‚­ãƒ¼ã€‚ +- `value`: [Array](../../data-types/array.md) åž‹ã®å€¤ã€‚ + +キーã¨å€¤ã®é…列ã®ã‚¿ãƒ—ルを渡ã™ã“ã¨ã¯ã€ã‚­ãƒ¼ã®é…列ã¨å€¤ã®é…列を別々ã«æ¸¡ã™ã“ã¨ã¨åŒç¾©ã§ã™ã€‚ + +:::note +åˆè¨ˆã•ã‚Œã‚‹å„è¡Œã«ãŠã„ã¦ã€`key` 㨠`value` ã®è¦ç´ æ•°ã¯åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +::: + +**戻り値** + +- ソートã•ã‚ŒãŸé †åºã§ã®ã‚­ãƒ¼ã¨ã€ãã‚Œã«å¯¾å¿œã™ã‚‹ã‚­ãƒ¼ã®åˆè¨ˆå€¤ã®äºŒã¤ã®é…列ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +**例** + +ã¾ãšã€`sum_map` ã¨ã„ã†ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãã“ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ã€‚キーã¨å€¤ã®é…列㯠[Nested](../../data-types/nested-data-structures/index.md) åž‹ã® `statusMap` ã¨ã„ã†ã‚«ãƒ©ãƒ ã¨ã€[tuple](../../data-types/tuple.md) åž‹ã® `statusMapTuple` ã¨ã„ã†ã‚«ãƒ©ãƒ ã«åˆ†ã‘ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€ä¸Šè¨˜ã®ã“ã®é–¢æ•°ã®äºŒã¤ã®ç•°ãªã‚‹æ§‹æ–‡ã®ä½¿ç”¨æ–¹æ³•ã‚’示ã—ã¾ã™ã€‚ + +クエリ: + +``` sql +CREATE TABLE sum_map( + date Date, + timeslot DateTime, + statusMap Nested( + status UInt8, + requests UInt8 + ), + statusMapTuple Tuple(Array(Int8), Array(Int8)) +) ENGINE = Log; +``` +```sql +INSERT INTO sum_map VALUES + ('2000-01-01', '2000-01-01 00:00:00', [1, 2, 3], [10, 10, 10], ([1, 2, 3], [10, 10, 10])), + ('2000-01-01', '2000-01-01 00:00:00', [3, 4, 5], [10, 10, 10], ([3, 4, 5], [10, 10, 10])), + ('2000-01-01', '2000-01-01 00:01:00', [4, 5, 6], [10, 10, 10], ([4, 5, 6], [10, 10, 10])), + ('2000-01-01', '2000-01-01 00:01:00', [6, 7, 8], [10, 10, 10], ([6, 7, 8], [10, 10, 10])); +``` + +`sumMap`ã€`sumMapWithOverflow` ã®é…列型構文ã€ãŠã‚ˆã³ `toTypeName` 関数を使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルをクエリã™ã‚‹ã¨ã€`sumMapWithOverflow` 関数ã®å ´åˆã€åˆè¨ˆã•ã‚ŒãŸå€¤ã®é…列ã®ãƒ‡ãƒ¼ã‚¿åž‹ãŒå¼•æ•°ã®åž‹ã¨åŒã˜ `UInt8` ã§ã‚ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ï¼ˆã¤ã¾ã‚Šã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚’ä¼´ã†åŠ ç®—ãŒè¡Œã‚ã‚Œã¾ã—ãŸï¼‰ã€‚一方ã€`sumMap` ã§ã¯ã€åˆè¨ˆã•ã‚ŒãŸå€¤ã®é…列ã®ãƒ‡ãƒ¼ã‚¿åž‹ãŒ `UInt8` ã‹ã‚‰ `UInt64` ã«å¤‰æ›´ã•ã‚Œã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ãªã„よã†ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT + timeslot, + toTypeName(sumMap(statusMap.status, statusMap.requests)), + toTypeName(sumMapWithOverflow(statusMap.status, statusMap.requests)), +FROM sum_map +GROUP BY timeslot +``` + +åŒã˜çµæžœã‚’å¾—ã‚‹ãŸã‚ã«ã€ã‚¿ãƒ—ル構文を使ã†ã“ã¨ã‚‚ã§ãã¾ã—ãŸã€‚ + +``` sql +SELECT + timeslot, + toTypeName(sumMap(statusMapTuple)), + toTypeName(sumMapWithOverflow(statusMapTuple)), +FROM sum_map +GROUP BY timeslot +``` + +çµæžœ: + +``` text + ┌────────────timeslot─┬─toTypeName(sumMap(statusMap.status, statusMap.requests))─┬─toTypeName(sumMapWithOverflow(statusMap.status, statusMap.requests))─┠+1. │ 2000-01-01 00:01:00 │ Tuple(Array(UInt8), Array(UInt64)) │ Tuple(Array(UInt8), Array(UInt8)) │ +2. │ 2000-01-01 00:00:00 │ Tuple(Array(UInt8), Array(UInt64)) │ Tuple(Array(UInt8), Array(UInt8)) │ + └─────────────────────┴──────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────┘ +``` + +**関連項目** + +- [sumMap](../reference/summap.md) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/sumwithoverflow.md b/docs/ja/sql-reference/aggregate-functions/reference/sumwithoverflow.md new file mode 100644 index 00000000000..006d1129cce --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/sumwithoverflow.md @@ -0,0 +1,69 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/sumwithoverflow +sidebar_position: 200 +--- + +# sumWithOverflow + +数値ã®åˆè¨ˆã‚’計算ã—ã€çµæžœã«ã¯å…¥åŠ›ãƒ‘ラメータã¨åŒã˜ãƒ‡ãƒ¼ã‚¿åž‹ã‚’使用ã—ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®æœ€å¤§å€¤ã‚’超ãˆã‚‹å ´åˆã¯ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼è¨ˆç®—ã‚’è¡Œã„ã¾ã™ã€‚ + +数値ã«å¯¾ã—ã¦ã®ã¿å‹•ä½œã—ã¾ã™ã€‚ + +**構文** + +```sql +sumWithOverflow(num) +``` + +**パラメータ** +- `num`: 数値ã®ã‚«ãƒ©ãƒ ã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal*](../../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 値ã®åˆè¨ˆã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal*](../../data-types/decimal.md)。 + +**例** + +ã¾ãšã€`employees` ã¨ã„ã†ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ã„ãã¤ã‹ã®æž¶ç©ºã®å¾“業員データを挿入ã—ã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€åˆè¨ˆãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ã®ã‚ã‚‹ `UInt16` åž‹ã® `salary` ã‚’é¸æŠžã—ã¾ã™ã€‚ + +クエリ: + +```sql +CREATE TABLE employees +( + `id` UInt32, + `name` String, + `monthly_salary` UInt16 +) +ENGINE = Log +``` + +```sql +SELECT + sum(monthly_salary) AS no_overflow, + sumWithOverflow(monthly_salary) AS overflow, + toTypeName(no_overflow), + toTypeName(overflow) +FROM employees +``` + +`sum` 㨠`sumWithOverflow` 関数を使用ã—ã¦å¾“業員ã®çµ¦æ–™ã®åˆè¨ˆã‚’クエリã—ã€`toTypeName` 関数を使用ã—ã¦ãã®åž‹ã‚’表示ã—ã¾ã™ã€‚`sum` 関数ã§ã¯çµæžœã®åž‹ã¯ `UInt64` ã¨ãªã‚Šã€åˆè¨ˆã‚’åŽã‚ã‚‹ã®ã«å分ãªã‚µã‚¤ã‚ºã§ã™ã€‚一方ã€`sumWithOverflow` ã®çµæžœã®åž‹ã¯ `UInt16` ã®ã¾ã¾ã§ã™ã€‚ + +クエリ: + +```sql +SELECT + sum(monthly_salary) AS no_overflow, + sumWithOverflow(monthly_salary) AS overflow, + toTypeName(no_overflow), + toTypeName(overflow), +FROM employees; +``` + +çµæžœ: + +```response + ┌─no_overflow─┬─overflow─┬─toTypeName(no_overflow)─┬─toTypeName(overflow)─┠+1. │ 118700 │ 53164 │ UInt64 │ UInt16 │ + └─────────────┴──────────┴─────────────────────────┴──────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/theilsu.md b/docs/ja/sql-reference/aggregate-functions/reference/theilsu.md new file mode 100644 index 00000000000..6adb067375d --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/theilsu.md @@ -0,0 +1,49 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/theilsu +sidebar_position: 201 +--- + +# theilsU + +`theilsU` 関数ã¯ã€[Theil's U ä¸ç¢ºå®Ÿæ€§ä¿‚æ•°](https://en.wikipedia.org/wiki/Contingency_table#Uncertainty_coefficient)を計算ã—ã¾ã™ã€‚ã“ã®å€¤ã¯ã€ãƒ†ãƒ¼ãƒ–ル内ã®2ã¤ã®ã‚«ãƒ©ãƒ é–“ã®é–¢é€£æ€§ã‚’測定ã—ã¾ã™ã€‚ã“ã®å€¤ã¯âˆ’1.0(100%ã®è² ã®é–¢é€£æ€§ã€ã¾ãŸã¯å®Œå…¨ãªé€†è»¢ï¼‰ã‹ã‚‰+1.0(100%ã®æ­£ã®é–¢é€£æ€§ã€ã¾ãŸã¯å®Œå…¨ãªä¸€è‡´ï¼‰ã¾ã§ã®ç¯„囲ã§ã™ã€‚0.0 ã®å€¤ã¯é–¢é€£æ€§ãŒãªã„ã“ã¨ã‚’示ã—ã¾ã™ã€‚ + +**構文** + +``` sql +theilsU(column1, column2) +``` + +**引数** + +- `column1` 㨠`column2` ã¯æ¯”較ã™ã‚‹ã‚«ãƒ©ãƒ ã§ã™ + +**戻り値** + +- -1 㨠1 ã®é–“ã®å€¤ + +**戻り値ã®åž‹** ã¯å¸¸ã« [Float64](../../../sql-reference/data-types/float.md) ã§ã™ã€‚ + +**例** + +以下ã®æ¯”較ã•ã‚Œã‚‹2ã¤ã®ã‚«ãƒ©ãƒ ã¯ãŠäº’ã„ã«å°‘ã—ã®é–¢é€£æ€§ã—ã‹ãªã„ãŸã‚ã€`theilsU` ã®å€¤ã¯è² ã«ãªã‚Šã¾ã™ï¼š + +``` sql +SELECT + theilsU(a, b) +FROM + ( + SELECT + number % 10 AS a, + number % 4 AS b + FROM + numbers(150) + ); +``` + +çµæžœï¼š + +```response +┌────────theilsU(a, b)─┠+│ -0.30195720557678846 │ +└──────────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/topk.md b/docs/ja/sql-reference/aggregate-functions/reference/topk.md new file mode 100644 index 00000000000..884d0a10ffb --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/topk.md @@ -0,0 +1,51 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/topk +sidebar_position: 202 +--- + +# topK + +指定ã•ã‚ŒãŸã‚«ãƒ©ãƒ å†…ã§æœ€ã‚‚é »ç¹ã«å‡ºç¾ã™ã‚‹å€¤ã‚’近似的ã«é…列ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚生æˆã•ã‚ŒãŸé…列ã¯ã€å€¤è‡ªä½“ã§ã¯ãªãã€è¿‘似頻度ã®é™é †ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +TopKを分æžã™ã‚‹ãŸã‚ã®[Filtered Space-Saving](https://doi.org/10.1016/j.ins.2010.08.024)アルゴリズムを実装ã—ã¦ãŠã‚Šã€[Parallel Space Saving](https://doi.org/10.1016/j.ins.2015.09.003)ã®reduce-and-combineアルゴリズムã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ + +``` sql +topK(N)(column) +topK(N, load_factor)(column) +topK(N, load_factor, 'counts')(column) +``` + +ã“ã®é–¢æ•°ã¯çµæžœã‚’ä¿è¨¼ã™ã‚‹ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。特定ã®çŠ¶æ³ã§ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã€æœ€ã‚‚é »ç¹ã«å‡ºç¾ã™ã‚‹å€¤ã§ã¯ãªã„値ãŒè¿”ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +`N < 10`ã®å€¤ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚`N`ã®å€¤ãŒå¤§ãã„å ´åˆã€ãƒ‘フォーマンスãŒä½Žä¸‹ã—ã¾ã™ã€‚`N` ã®æœ€å¤§å€¤ã¯ 65536 ã§ã™ã€‚ + +**パラメータ** + +- `N` — è¿”ã™è¦ç´ ã®æ•°ã€‚オプション。デフォルト値: 10。 +- `load_factor` — 値ã®ãŸã‚ã«äºˆç´„ã•ã‚Œã‚‹ã‚»ãƒ«ã®æ•°ã‚’定義ã—ã¾ã™ã€‚uniq(column) > N * load_factorã®å ´åˆã€topK関数ã®çµæžœã¯è¿‘似値ã«ãªã‚Šã¾ã™ã€‚オプション。デフォルト値: 3。 +- `counts` — çµæžœã«è¿‘似的ãªã‚«ã‚¦ãƒ³ãƒˆã¨ã‚¨ãƒ©ãƒ¼å€¤ã‚’å«ã‚ã‚‹ã‹ã©ã†ã‹ã‚’定義ã—ã¾ã™ã€‚ + +**引数** + +- `column` — 頻度を計算ã™ã‚‹ãŸã‚ã®å€¤ã€‚ + +**例** + +[OnTime](../../../getting-started/example-datasets/ontime.md) データセットを使用ã—ã€`AirlineID` カラムã§æœ€ã‚‚é »ç¹ã«å‡ºç¾ã™ã‚‹3ã¤ã®å€¤ã‚’é¸æŠžã—ã¾ã™ã€‚ + +``` sql +SELECT topK(3)(AirlineID) AS res +FROM ontime +``` + +``` text +┌─res─────────────────┠+│ [19393,19790,19805] │ +└─────────────────────┘ +``` + +**関連項目** + +- [topKWeighted](../../../sql-reference/aggregate-functions/reference/topkweighted.md) +- [approx_top_k](../../../sql-reference/aggregate-functions/reference/approxtopk.md) +- [approx_top_sum](../../../sql-reference/aggregate-functions/reference/approxtopsum.md) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/topkweighted.md b/docs/ja/sql-reference/aggregate-functions/reference/topkweighted.md new file mode 100644 index 00000000000..903520222de --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/topkweighted.md @@ -0,0 +1,69 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/topkweighted +sidebar_position: 203 +--- + +# topKWeighted + +指定ã—ãŸã‚«ãƒ©ãƒ å†…ã§ç´„最頻値をå«ã‚€é…列を返ã—ã¾ã™ã€‚çµæžœã®é…列ã¯ã€å€¤ãã®ã‚‚ã®ã§ã¯ãªãã€ç´„頻度ã«åŸºã¥ã„ã¦é™é †ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ã•ã‚‰ã«ã€å€¤ã®é‡ã¿ã‚‚考慮ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +topKWeighted(N)(column, weight) +topKWeighted(N, load_factor)(column, weight) +topKWeighted(N, load_factor, 'counts')(column, weight) +``` + +**パラメータ** + +- `N` — è¿”ã™è¦ç´ ã®æ•°ã€‚オプション。デフォルト値ã¯10ã§ã™ã€‚ +- `load_factor` — 値ã®ãŸã‚ã«äºˆç´„ã•ã‚Œã‚‹ã‚»ãƒ«ã®æ•°ã‚’定義ã—ã¾ã™ã€‚ã‚‚ã— uniq(column) > N * load_factor ãªã‚‰ã€topK関数ã®çµæžœã¯æ¦‚ç®—ã«ãªã‚Šã¾ã™ã€‚オプション。デフォルト値ã¯3ã§ã™ã€‚ +- `counts` — çµæžœã«æ¦‚ç®—ã®ã‚«ã‚¦ãƒ³ãƒˆã¨èª¤å·®å€¤ã‚’å«ã‚ã‚‹ã‹ã‚’定義ã—ã¾ã™ã€‚ + +**引数** + +- `column` — 値を表ã—ã¾ã™ã€‚ +- `weight` — é‡ã¿ã‚’表ã—ã¾ã™ã€‚ã™ã¹ã¦ã®å€¤ã¯ã€é »åº¦è¨ˆç®—ã®ãŸã‚ã«`weight`回考慮ã•ã‚Œã¾ã™ã€‚[UInt64](../../../sql-reference/data-types/int-uint.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +最大ã®é‡ã¿ã®æ¦‚ç®—åˆè¨ˆã‚’æŒã¤å€¤ã®é…列を返ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT topKWeighted(2)(k, w) FROM +VALUES('k Char, w UInt64', ('y', 1), ('y', 1), ('x', 5), ('y', 1), ('z', 10)) +``` + +çµæžœ: + +``` text +┌─topKWeighted(2)(k, w)──┠+│ ['z','x'] │ +└────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT topKWeighted(2, 10, 'counts')(k, w) +FROM VALUES('k Char, w UInt64', ('y', 1), ('y', 1), ('x', 5), ('y', 1), ('z', 10)) +``` + +çµæžœ: + +``` text +┌─topKWeighted(2, 10, 'counts')(k, w)─┠+│ [('z',10,0),('x',5,0)] │ +└─────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [topK](../../../sql-reference/aggregate-functions/reference/topk.md) +- [approx_top_k](../../../sql-reference/aggregate-functions/reference/approxtopk.md) +- [approx_top_sum](../../../sql-reference/aggregate-functions/reference/approxtopsum.md) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniq.md b/docs/ja/sql-reference/aggregate-functions/reference/uniq.md new file mode 100644 index 00000000000..79cede0b245 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniq.md @@ -0,0 +1,40 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/uniq +sidebar_position: 204 +--- + +# uniq + +引数ã®ç•°ãªã‚‹å€¤ã®æ¦‚算数を計算ã—ã¾ã™ã€‚ + +``` sql +uniq(x[, ...]) +``` + +**引数** + +ã“ã®é–¢æ•°ã¯å¯å¤‰æ•°ã®ãƒ‘ラメータをå—ã‘å–ã‚Šã¾ã™ã€‚パラメータ㯠`Tuple`ã€`Array`ã€`Date`ã€`DateTime`ã€`String`ã€ã¾ãŸã¯æ•°å€¤åž‹ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [UInt64](../../../sql-reference/data-types/int-uint.md) åž‹ã®æ•°å€¤ã€‚ + +**実装ã®è©³ç´°** + +ã“ã®é–¢æ•°ã¯ä»¥ä¸‹ã‚’è¡Œã„ã¾ã™ï¼š + +- 集計中ã®ã™ã¹ã¦ã®ãƒ‘ラメータã®ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã€ãれをもã¨ã«è¨ˆç®—ã‚’è¡Œã„ã¾ã™ã€‚ + +- é©å¿œçš„ãªã‚µãƒ³ãƒ—リングアルゴリズムを使用ã—ã¾ã™ã€‚計算状態ã®ãŸã‚ã€æœ€å¤§65536ã®è¦ç´ ãƒãƒƒã‚·ãƒ¥å€¤ã®ã‚µãƒ³ãƒ—ルを使用ã—ã¾ã™ã€‚ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯éžå¸¸ã«æ­£ç¢ºã§ã€CPU上ã§éžå¸¸ã«åŠ¹çŽ‡çš„ã§ã™ã€‚クエリã«è¤‡æ•°ã®ã“ã®é–¢æ•°ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã§ã‚‚ã€`uniq` ã®ä½¿ç”¨ã¯ä»–ã®é›†è¨ˆé–¢æ•°ã‚’使用ã™ã‚‹ã®ã¨ã»ã¼åŒã˜é€Ÿã•ã§ã™ã€‚ + +- çµæžœã‚’決定論的ã«æä¾›ã—ã¾ã™ï¼ˆã‚¯ã‚¨ãƒªå‡¦ç†ã®é †åºã«ä¾å­˜ã—ã¾ã›ã‚“)。 + +ã“ã®é–¢æ•°ã¯ã»ã¨ã‚“ã©ã™ã¹ã¦ã®ã‚·ãƒŠãƒªã‚ªã§ã®ä½¿ç”¨ã‚’推奨ã—ã¾ã™ã€‚ + +**関連項目** + +- [uniqCombined](../../../sql-reference/aggregate-functions/reference/uniqcombined.md#agg_function-uniqcombined) +- [uniqCombined64](../../../sql-reference/aggregate-functions/reference/uniqcombined64.md#agg_function-uniqcombined64) +- [uniqHLL12](../../../sql-reference/aggregate-functions/reference/uniqhll12.md#agg_function-uniqhll12) +- [uniqExact](../../../sql-reference/aggregate-functions/reference/uniqexact.md#agg_function-uniqexact) +- [uniqTheta](../../../sql-reference/aggregate-functions/reference/uniqthetasketch.md#agg_function-uniqthetasketch) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined.md b/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined.md new file mode 100644 index 00000000000..3720b4ff386 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined.md @@ -0,0 +1,70 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/uniqcombined +sidebar_position: 205 +--- + +# uniqCombined + +ç•°ãªã‚‹å¼•æ•°å€¤ã®è¿‘似数を計算ã—ã¾ã™ã€‚ + +``` sql +uniqCombined(HLL_precision)(x[, ...]) +``` + +`uniqCombined`関数ã¯ã€ç•°ãªã‚‹å€¤ã®æ•°ã‚’計算ã™ã‚‹ã®ã«é©ã—ãŸé¸æŠžã§ã™ã€‚ + +**引数** + +- `HLL_precision`: [HyperLogLog](https://en.wikipedia.org/wiki/HyperLogLog) ã®ã‚»ãƒ«æ•°ã®2を底ã¨ã™ã‚‹å¯¾æ•°ã€‚çœç•¥å¯èƒ½ã§ã€`uniqCombined(x[, ...])`ã¨ã—ã¦é–¢æ•°ã‚’使用ã§ãã¾ã™ã€‚`HLL_precision`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯17ã§ã€å®Ÿè³ªçš„ã«ã¯96 KiBã®ã‚¹ãƒšãƒ¼ã‚¹ï¼ˆ2^17セルã€å„セル6ビット)ã§ã™ã€‚ +- `X`: å¯å¤‰å€‹æ•°ã®ãƒ‘ラメータ。パラメータã¯`Tuple`ã€`Array`ã€`Date`ã€`DateTime`ã€`String`ã€ã¾ãŸã¯æ•°å€¤åž‹ã‚’指定ã§ãã¾ã™ã€‚ + +**戻り値** + +- [UInt64](../../../sql-reference/data-types/int-uint.md)åž‹ã®æ•°å€¤ã€‚ + +**実装ã®è©³ç´°** + +`uniqCombined`関数ã¯ä»¥ä¸‹ã‚’è¡Œã„ã¾ã™: + +- 集約内ã®ã™ã¹ã¦ã®ãƒ‘ラメータã«å¯¾ã—ã¦ã€ãƒãƒƒã‚·ãƒ¥ï¼ˆ`String`ã¯64ビットãƒãƒƒã‚·ãƒ¥ã€ãれ以外ã¯32ビット)を計算ã—ã€ãã®ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦è¨ˆç®—ã‚’è¡Œã„ã¾ã™ã€‚ +- é…列ã€ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã€ã‚¨ãƒ©ãƒ¼è£œæ­£ãƒ†ãƒ¼ãƒ–ル付ãHyperLogLogã®3ã¤ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’組ã¿åˆã‚ã›ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + - ç•°ãªã‚‹è¦ç´ ã®æ•°ãŒå°‘ãªã„å ´åˆã¯ã€é…列を使用ã—ã¾ã™ã€‚ + - セットサイズãŒå¤§ãããªã‚‹ã¨ã€ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルを使用ã—ã¾ã™ã€‚ + - より多ãã®è¦ç´ ã®å ´åˆã«ã¯ã€ä¸€å®šé‡ã®ãƒ¡ãƒ¢ãƒªã‚’消費ã™ã‚‹HyperLogLogを使用ã—ã¾ã™ã€‚ +- çµæžœã¯æ±ºå®šè«–çš„ã«æä¾›ã•ã‚Œã¾ã™ï¼ˆã‚¯ã‚¨ãƒªã®å‡¦ç†é †åºã«ä¾å­˜ã—ã¾ã›ã‚“)。 + +:::note +éž`String`åž‹ã«å¯¾ã—ã¦32ビットãƒãƒƒã‚·ãƒ¥ã‚’使用ã™ã‚‹ãŸã‚ã€`UINT_MAX`を大ãã超ãˆã‚‹åŸºæ•°ã®å ´åˆã€çµæžœã®èª¤å·®ãŒéžå¸¸ã«é«˜ããªã‚Šã¾ã™ï¼ˆæ•°åå„„ã®ç•°ãªã‚‹å€¤ã‚’超ãˆãŸã‚ãŸã‚Šã‹ã‚‰èª¤å·®ãŒæ€¥æ¿€ã«ä¸ŠãŒã‚Šã¾ã™ï¼‰ã€‚ã“ã®å ´åˆã¯[uniqCombined64](../../../sql-reference/aggregate-functions/reference/uniqcombined64.md#agg_function-uniqcombined64)を使用ã™ã¹ãã§ã™ã€‚ +::: + +[uniq](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq)関数ã¨æ¯”較ã—ã¦ã€`uniqCombined`関数ã¯ï¼š + +- メモリ消費ãŒæ•°å€å°‘ãªã„ã§ã™ã€‚ +- 精度ãŒæ•°å€é«˜ã計算ã•ã‚Œã¾ã™ã€‚ +- 通常ã€ãƒ‘フォーマンスãŒã‚„や低ã„ã§ã™ã€‚一部ã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€`uniqCombined`ãŒ`uniq`よりも優れãŸãƒ‘フォーマンスを発æ®ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€å¤§é‡ã®é›†ç´„状態をãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯çµŒç”±ã§é€ä¿¡ã™ã‚‹åˆ†æ•£ã‚¯ã‚¨ãƒªã®å ´åˆã§ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT uniqCombined(number) FROM numbers(1e6); +``` + +çµæžœ: + +```response +┌─uniqCombined(number)─┠+│ 1001148 │ -- 1.00百万 +└──────────────────────┘ +``` + +より大ããªå…¥åŠ›ã®ä¾‹ã¨ã—ã¦ã€`uniqCombined`ã¨`uniqCombined64`ã®é•ã„ã«ã¤ã„ã¦ã¯ã€[uniqCombined64](../../../sql-reference/aggregate-functions/reference/uniqcombined64.md#agg_function-uniqcombined64)ã®ä¾‹ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**関連項目** + +- [uniq](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq) +- [uniqCombined64](../../../sql-reference/aggregate-functions/reference/uniqcombined64.md#agg_function-uniqcombined64) +- [uniqHLL12](../../../sql-reference/aggregate-functions/reference/uniqhll12.md#agg_function-uniqhll12) +- [uniqExact](../../../sql-reference/aggregate-functions/reference/uniqexact.md#agg_function-uniqexact) +- [uniqTheta](../../../sql-reference/aggregate-functions/reference/uniqthetasketch.md#agg_function-uniqthetasketch) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined64.md b/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined64.md new file mode 100644 index 00000000000..7b91231595d --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined64.md @@ -0,0 +1,82 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/uniqcombined64 +sidebar_position: 206 +--- + +# uniqCombined64 + +ç•°ãªã‚‹å¼•æ•°å€¤ã®æ¦‚算数を計算ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«å¯¾ã—ã¦64ビットãƒãƒƒã‚·ãƒ¥ã‚’使用ã™ã‚‹ç‚¹ã‚’除ã‘ã°ã€[uniqCombined](../../../sql-reference/aggregate-functions/reference/uniqcombined.md#agg_function-uniqcombined)ã¨åŒã˜ã§ã™ã€‚ + +``` sql +uniqCombined64(HLL_precision)(x[, ...]) +``` + +**パラメータ** + +- `HLL_precision`: [HyperLogLog](https://en.wikipedia.org/wiki/HyperLogLog)ã®ã‚»ãƒ«æ•°ã®2進対数。オプションã¨ã—ã¦ã€é–¢æ•°ã‚’`uniqCombined64(x[, ...])`ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚`HLL_precision`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯17ã§ã€å®Ÿéš›ã«ã¯96 KiBã®ã‚¹ãƒšãƒ¼ã‚¹ï¼ˆ2^17セルã€å„6ビット)ã§ã™ã€‚ +- `X`: å¯å¤‰æ•°ã®ãƒ‘ラメータ。パラメータã«ã¯`Tuple`ã€`Array`ã€`Date`ã€`DateTime`ã€`String`ã€ã¾ãŸã¯æ•°å€¤åž‹ã‚’使用ã§ãã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 数値型[UInt64](../../../sql-reference/data-types/int-uint.md)。 + +**実装ã®è©³ç´°** + +`uniqCombined64`関数ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ï¼š +- 集約内ã®ã™ã¹ã¦ã®ãƒ‘ラメータã«å¯¾ã—ã¦ãƒãƒƒã‚·ãƒ¥ï¼ˆã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«å¯¾ã—ã¦64ビットãƒãƒƒã‚·ãƒ¥ï¼‰ã‚’計算ã—ã€ãれを計算ã«ä½¿ç”¨ã—ã¾ã™ã€‚ +- 3ã¤ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®çµ„ã¿åˆã‚ã›ã‚’使用ã—ã¾ã™ï¼šé…列ã€ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã€ã‚¨ãƒ©ãƒ¼è¨‚正テーブル付ãã®HyperLogLog。 + - 個別ã®è¦ç´ ãŒå°‘æ•°ã®å ´åˆã€é…列を使用ã—ã¾ã™ã€‚ + - セットサイズãŒå¤§ãããªã‚‹ã¨ã€ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルを使用ã—ã¾ã™ã€‚ + - より多ãã®è¦ç´ ãŒã‚ã‚‹å ´åˆã€HyperLogLogãŒä½¿ç”¨ã•ã‚Œã€å›ºå®šé‡ã®ãƒ¡ãƒ¢ãƒªã‚’å æœ‰ã—ã¾ã™ã€‚ +- çµæžœã¯æ±ºå®šè«–çš„ã«æä¾›ã•ã‚Œã¾ã™ï¼ˆã‚¯ã‚¨ãƒªå‡¦ç†ã®é †åºã«ä¾å­˜ã—ã¾ã›ã‚“)。 + +:::note +ã™ã¹ã¦ã®åž‹ã«å¯¾ã—ã¦64ビットãƒãƒƒã‚·ãƒ¥ã‚’使用ã™ã‚‹ãŸã‚ã€[uniqCombined](../../../sql-reference/aggregate-functions/reference/uniqcombined.md)ãŒéž`String`åž‹ã«å¯¾ã—ã¦32ビットãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã®ã‚ˆã†ã«ã€`UINT_MAX`を大幅ã«è¶…ãˆã‚‹ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã«å¯¾ã—ã¦éžå¸¸ã«é«˜ã„誤差ãŒç™ºç”Ÿã™ã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +[uniq](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq)関数ã¨æ¯”較ã—ã¦ã€`uniqCombined64`関数ã¯ï¼š + +- æ•°å€å°‘ãªã„メモリを消費ã—ã¾ã™ã€‚ +- æ•°å€é«˜ã„精度ã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**例** + +以下ã®ä¾‹ã§ã¯ã€`uniqCombined64`ãŒ`1e10`ã®ç•°ãªã‚‹æ•°å€¤ã«å¯¾ã—ã¦å®Ÿè¡Œã•ã‚Œã€ç•°ãªã‚‹å¼•æ•°å€¤ã®æ•°ã«éžå¸¸ã«è¿‘ã„概算を返ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT uniqCombined64(number) FROM numbers(1e10); +``` + +çµæžœ: + +```response +┌─uniqCombined64(number)─┠+│ 9998568925 │ -- 10.00 billion +└────────────────────────┘ +``` + +比較ã™ã‚‹ã¨ã€`uniqCombined`関数ã¯ã“ã®ã‚µã‚¤ã‚ºã®å…¥åŠ›ã«å¯¾ã—ã¦ã‹ãªã‚Šä½Žã„精度ã®æ¦‚ç®—ã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT uniqCombined(number) FROM numbers(1e10); +``` + +çµæžœ: + +```response +┌─uniqCombined(number)─┠+│ 5545308725 │ -- 5.55 billion +└──────────────────────┘ +``` + +**関連項目** + +- [uniq](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq) +- [uniqCombined](../../../sql-reference/aggregate-functions/reference/uniqcombined.md) +- [uniqHLL12](../../../sql-reference/aggregate-functions/reference/uniqhll12.md#agg_function-uniqhll12) +- [uniqExact](../../../sql-reference/aggregate-functions/reference/uniqexact.md#agg_function-uniqexact) +- [uniqTheta](../../../sql-reference/aggregate-functions/reference/uniqthetasketch.md#agg_function-uniqthetasketch) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniqexact.md b/docs/ja/sql-reference/aggregate-functions/reference/uniqexact.md new file mode 100644 index 00000000000..f7e5558f861 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniqexact.md @@ -0,0 +1,27 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/uniqexact +sidebar_position: 207 +--- + +# uniqExact + +ç•°ãªã‚‹å¼•æ•°ã®å€¤ã®æ­£ç¢ºãªæ•°ã‚’計算ã—ã¾ã™ã€‚ + +``` sql +uniqExact(x[, ...]) +``` + +絶対ã«æ­£ç¢ºãªçµæžœãŒå¿…è¦ãªå ´åˆã« `uniqExact` 関数を使用ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ [uniq](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq) 関数を使用ã—ã¦ãã ã•ã„。 + +`uniqExact` 関数ã¯ã€`uniq` よりも多ãã®ãƒ¡ãƒ¢ãƒªã‚’使用ã—ã¾ã™ã€‚ãªãœãªã‚‰ã€ç•°ãªã‚‹å€¤ã®æ•°ãŒå¢—ãˆã‚‹ã«ã¤ã‚Œã¦ã€çŠ¶æ…‹ã®ã‚µã‚¤ã‚ºãŒç„¡åˆ¶é™ã«å¢—大ã™ã‚‹ãŸã‚ã§ã™ã€‚ + +**引数** + +ã“ã®é–¢æ•°ã¯å¯å¤‰å€‹ã®ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚パラメータ㯠`Tuple`ã€`Array`ã€`Date`ã€`DateTime`ã€`String`ã€ã¾ãŸã¯æ•°å€¤åž‹ã§ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**関連項目** + +- [uniq](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq) +- [uniqCombined](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniqcombined) +- [uniqHLL12](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniqhll12) +- [uniqTheta](../../../sql-reference/aggregate-functions/reference/uniqthetasketch.md#agg_function-uniqthetasketch) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniqhll12.md b/docs/ja/sql-reference/aggregate-functions/reference/uniqhll12.md new file mode 100644 index 00000000000..bd713c4ba7d --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniqhll12.md @@ -0,0 +1,41 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/uniqhll12 +sidebar_position: 208 +--- + +# uniqHLL12 + +[HyperLogLog](https://en.wikipedia.org/wiki/HyperLogLog) アルゴリズムを使用ã—ã¦ã€ç•°ãªã‚‹å¼•æ•°å€¤ã®æ¦‚算数を計算ã—ã¾ã™ã€‚ + +``` sql +uniqHLL12(x[, ...]) +``` + +**引数** + +ã“ã®é–¢æ•°ã¯å¯å¤‰æ•°ã®ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚パラメータ㯠`Tuple`ã€`Array`ã€`Date`ã€`DateTime`ã€`String`ã€ã¾ãŸã¯æ•°å€¤åž‹ã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +**戻り値** + +- [UInt64](../../../sql-reference/data-types/int-uint.md)åž‹ã®æ•°å€¤ã€‚ + +**実装ã®è©³ç´°** + +ã“ã®é–¢æ•°ã¯æ¬¡ã®ã‚ˆã†ã«å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ï¼š + +- 集計内ã®ã™ã¹ã¦ã®ãƒ‘ラメータã«å¯¾ã—ãƒãƒƒã‚·ãƒ¥è¨ˆç®—ã‚’è¡Œã„ã€ãれを用ã„ã¦è¨ˆç®—を実行ã—ã¾ã™ã€‚ + +- HyperLogLog アルゴリズムを使用ã—ã¦ã€ç•°ãªã‚‹å¼•æ•°å€¤ã®æ•°ã‚’概算ã—ã¾ã™ã€‚ + + 2^12 ã®5ビットセルãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚状態ã®ã‚µã‚¤ã‚ºã¯ã‚ãšã‹ã«2.5KBを超ãˆã¾ã™ã€‚å°ã•ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆï¼ˆ<10Kè¦ç´ ï¼‰ã®å ´åˆã€çµæžœã¯ã‚ã¾ã‚Šæ­£ç¢ºã§ã¯ã‚ã‚Šã¾ã›ã‚“(最大約10ï¼…ã®èª¤å·®ï¼‰ã€‚ã—ã‹ã—ã€é«˜ã„カーディナリティをæŒã¤ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆï¼ˆ10K-100M)ã®å ´åˆã€çµæžœã¯éžå¸¸ã«æ­£ç¢ºã§ã€æœ€å¤§èª¤å·®ã¯ç´„1.6ï¼…ã§ã™ã€‚100M以上ã§ã¯ã€æŽ¨å®šèª¤å·®ãŒå¢—加ã—ã€éžå¸¸ã«é«˜ã„カーディナリティをæŒã¤ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆï¼ˆ1B+è¦ç´ ï¼‰ã«å¯¾ã—ã¦ã¯éžå¸¸ã«ä¸æ­£ç¢ºãªçµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +- 決定的ãªçµæžœã‚’æä¾›ã—ã¾ã™ï¼ˆã‚¯ã‚¨ãƒªå‡¦ç†ã®é †åºã«ä¾å­˜ã—ãªã„)。 + +ã“ã®é–¢æ•°ã®ä½¿ç”¨ã¯ãŠå‹§ã‚ã—ã¾ã›ã‚“。ã»ã¨ã‚“ã©ã®å ´åˆã€[uniq](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq) ã¾ãŸã¯ [uniqCombined](../../../sql-reference/aggregate-functions/reference/uniqcombined.md#agg_function-uniqcombined) 関数を使用ã—ã¦ãã ã•ã„。 + +**関連項目** + +- [uniq](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq) +- [uniqCombined](../../../sql-reference/aggregate-functions/reference/uniqcombined.md#agg_function-uniqcombined) +- [uniqExact](../../../sql-reference/aggregate-functions/reference/uniqexact.md#agg_function-uniqexact) +- [uniqTheta](../../../sql-reference/aggregate-functions/reference/uniqthetasketch.md#agg_function-uniqthetasketch) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniqthetasketch.md b/docs/ja/sql-reference/aggregate-functions/reference/uniqthetasketch.md new file mode 100644 index 00000000000..c6fde5afd74 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniqthetasketch.md @@ -0,0 +1,39 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/uniqthetasketch +sidebar_position: 209 +title: uniqTheta +--- + +[Theta Sketch Framework](https://datasketches.apache.org/docs/Theta/ThetaSketchFramework.html) を使用ã—ã¦ã€ç•°ãªã‚‹å¼•æ•°å€¤ã®æ¦‚算数を計算ã—ã¾ã™ã€‚ + +``` sql +uniqTheta(x[, ...]) +``` + +**引数** + +ã“ã®é–¢æ•°ã¯å¯å¤‰æ•°ã®ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚パラメータã«ã¯ `Tuple`ã€`Array`ã€`Date`ã€`DateTime`ã€`String`ã€ã¾ãŸã¯æ•°å€¤åž‹ã‚’指定ã§ãã¾ã™ã€‚ + +**戻り値** + +- [UInt64](../../../sql-reference/data-types/int-uint.md) åž‹ã®æ•°å€¤ã€‚ + +**実装ã®è©³ç´°** + +関数: + +- 集計内ã®ã™ã¹ã¦ã®ãƒ‘ラメータã«ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã€ãれを計算ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +- ç•°ãªã‚‹å¼•æ•°å€¤ã®æ•°ã‚’è¿‘ä¼¼ã™ã‚‹ãŸã‚ã« [KMV](https://datasketches.apache.org/docs/Theta/InverseEstimate.html) アルゴリズムを使用ã—ã¾ã™ã€‚ + + 4096(2^12) 個ã®64ビットスケッãƒãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚状態ã®ã‚µã‚¤ã‚ºã¯ç´„41 KBã§ã™ã€‚ + +- 相対誤差ã¯3.125%(95%ã®ä¿¡é ¼åŒºé–“)ã§ã™ã€‚詳細ã¯[相対誤差ã®ãƒ†ãƒ¼ãƒ–ル](https://datasketches.apache.org/docs/Theta/ThetaErrorTable.html)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**関連項目** + +- [uniq](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq) +- [uniqCombined](../../../sql-reference/aggregate-functions/reference/uniqcombined.md#agg_function-uniqcombined) +- [uniqCombined64](../../../sql-reference/aggregate-functions/reference/uniqcombined64.md#agg_function-uniqcombined64) +- [uniqHLL12](../../../sql-reference/aggregate-functions/reference/uniqhll12.md#agg_function-uniqhll12) +- [uniqExact](../../../sql-reference/aggregate-functions/reference/uniqexact.md#agg_function-uniqexact) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/varpop.md b/docs/ja/sql-reference/aggregate-functions/reference/varpop.md new file mode 100644 index 00000000000..2c21f9660fa --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/varpop.md @@ -0,0 +1,52 @@ +--- +title: "varPop" +slug: "/ja/sql-reference/aggregate-functions/reference/varPop" +sidebar_position: 210 +--- + +## varPop + +æ¯åˆ†æ•£ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +varPop(x) +``` + +エイリアス: `VAR_POP`. + +**パラメーター** + +- `x`: æ¯åˆ†æ•£ã‚’求ã‚る値ã®é›†ã¾ã‚Šã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal*](../../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x` ã®æ¯åˆ†æ•£ã‚’è¿”ã—ã¾ã™ã€‚[`Float64`](../../data-types/float.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test_data; +CREATE TABLE test_data +( + x UInt8, +) +ENGINE = Memory; + +INSERT INTO test_data VALUES (3), (3), (3), (4), (4), (5), (5), (7), (11), (15); + +SELECT + varPop(x) AS var_pop +FROM test_data; +``` + +çµæžœ: + +```response +┌─var_pop─┠+│ 14.4 │ +└─────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/varpopstable.md b/docs/ja/sql-reference/aggregate-functions/reference/varpopstable.md new file mode 100644 index 00000000000..f9897966afd --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/varpopstable.md @@ -0,0 +1,52 @@ +--- +title: "varPopStable" +slug: "/ja/sql-reference/aggregate-functions/reference/varpopstable" +sidebar_position: 211 +--- + +## varPopStable + +æ¯é›†å›£åˆ†æ•£ã‚’è¿”ã—ã¾ã™ã€‚[`varPop`](../reference/varpop.md)ã¨ã¯ç•°ãªã‚Šã€ã“ã®é–¢æ•°ã¯[数値的ã«å®‰å®šã—ãŸ](https://en.wikipedia.org/wiki/Numerical_stability)アルゴリズムを使用ã—ã¾ã™ã€‚動作ã¯é…ã„ã§ã™ãŒã€è¨ˆç®—誤差ãŒå°‘ãªã„ã§ã™ã€‚ + +**構文** + +```sql +varPopStable(x) +``` + +エイリアス: `VAR_POP_STABLE`. + +**パラメータ** + +- `x`: æ¯é›†å›£åˆ†æ•£ã‚’求ã‚る値ã®é›†ã¾ã‚Šã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal*](../../data-types/decimal.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x`ã®æ¯é›†å›£åˆ†æ•£ã‚’è¿”ã—ã¾ã™ã€‚[Float64](../../data-types/float.md). + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test_data; +CREATE TABLE test_data +( + x UInt8, +) +ENGINE = Memory; + +INSERT INTO test_data VALUES (3),(3),(3),(4),(4),(5),(5),(7),(11),(15); + +SELECT + varPopStable(x) AS var_pop_stable +FROM test_data; +``` + +çµæžœ: + +```response +┌─var_pop_stable─┠+│ 14.4 │ +└────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/varsamp.md b/docs/ja/sql-reference/aggregate-functions/reference/varsamp.md new file mode 100644 index 00000000000..edc1b7c0a9c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/varsamp.md @@ -0,0 +1,66 @@ +--- +title: "varSamp" +slug: /ja/sql-reference/aggregate-functions/reference/varSamp +sidebar_position: 212 +--- + +## varSamp + +データセットã®æ¨™æœ¬åˆ†æ•£ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +varSamp(x) +``` + +エイリアス: `VAR_SAMP`. + +**パラメータ** + +- `x`: 標本分散を計算ã—ãŸã„æ¯é›†å›£ã€‚[(U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal*](../../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力データセット `x` ã®æ¨™æœ¬åˆ†æ•£ã‚’è¿”ã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**実装ã®è©³ç´°** + +`varSamp` 関数ã¯æ¬¡ã®å…¬å¼ã‚’使用ã—ã¦æ¨™æœ¬åˆ†æ•£ã‚’計算ã—ã¾ã™ï¼š + +$$ +\sum\frac{(x - \text{mean}(x))^2}{(n - 1)} +$$ + +ã“ã“ã§ï¼š + +- `x` ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆå†…ã®å„データãƒã‚¤ãƒ³ãƒˆã§ã™ã€‚ +- `mean(x)` ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ç®—è¡“å¹³å‡ã§ã™ã€‚ +- `n` ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆå†…ã®ãƒ‡ãƒ¼ã‚¿ãƒã‚¤ãƒ³ãƒˆæ•°ã§ã™ã€‚ + +ã“ã®é–¢æ•°ã¯å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒå¤§ããªæ¯é›†å›£ã‹ã‚‰ã®æ¨™æœ¬ã‚’表ã—ã¦ã„ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚全体ã®æ¯é›†å›£ã®åˆ†æ•£ã‚’計算ã—ãŸã„å ´åˆï¼ˆå®Œå…¨ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒã‚ã‚‹å ´åˆï¼‰ã¯ã€ä»£ã‚ã‚Šã« [`varPop`](../reference/varpop.md) を使用ã—ã¦ãã ã•ã„。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test_data; +CREATE TABLE test_data +( + x Float64 +) +ENGINE = Memory; + +INSERT INTO test_data VALUES (10.5), (12.3), (9.8), (11.2), (10.7); + +SELECT round(varSamp(x),3) AS var_samp FROM test_data; +``` + +レスãƒãƒ³ã‚¹: + +```response +┌─var_samp─┠+│ 0.865 │ +└──────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/varsampstable.md b/docs/ja/sql-reference/aggregate-functions/reference/varsampstable.md new file mode 100644 index 00000000000..9cf90b47b1b --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/varsampstable.md @@ -0,0 +1,63 @@ +--- +title: "varSampStable" +slug: /ja/sql-reference/aggregate-functions/reference/varsampstable +sidebar_position: 213 +--- + +## varSampStable + +データセットã®æ¨™æœ¬åˆ†æ•£ã‚’計算ã—ã¾ã™ã€‚[`varSamp`](../reference/varsamp.md)ã¨ã¯ç•°ãªã‚Šã€ã“ã®é–¢æ•°ã¯æ•°å€¤çš„ã«å®‰å®šã—ãŸã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¾ã™ã€‚動作ã¯é…ããªã‚Šã¾ã™ãŒã€è¨ˆç®—誤差を低ã抑ãˆã¾ã™ã€‚ + +**構文** + +```sql +varSampStable(x) +``` + +別å: `VAR_SAMP_STABLE` + +**パラメーター** + +- `x`: 標本分散を計算ã—ãŸã„æ¯é›†å›£ã€‚[ (U)Int*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Decimal*](../../data-types/decimal.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力データセットã®æ¨™æœ¬åˆ†æ•£ã‚’è¿”ã—ã¾ã™ã€‚[Float64](../../data-types/float.md). + +**実装ã®è©³ç´°** + +`varSampStable` 関数ã¯ã€[`varSamp`](../reference/varsamp.md)ã¨åŒã˜æ•°å¼ã‚’使用ã—ã¦æ¨™æœ¬åˆ†æ•£ã‚’計算ã—ã¾ã™ã€‚ + +$$ +\sum\frac{(x - \text{mean}(x))^2}{(n - 1)} +$$ + +ã“ã“ã§ï¼š +- `x` ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®å„個別データãƒã‚¤ãƒ³ãƒˆã§ã™ã€‚ +- `mean(x)` ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ç®—è¡“å¹³å‡ã§ã™ã€‚ +- `n` ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒã‚¤ãƒ³ãƒˆã®æ•°ã§ã™ã€‚ + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test_data; +CREATE TABLE test_data +( + x Float64 +) +ENGINE = Memory; + +INSERT INTO test_data VALUES (10.5), (12.3), (9.8), (11.2), (10.7); + +SELECT round(varSampStable(x),3) AS var_samp_stable FROM test_data; +``` + +レスãƒãƒ³ã‚¹ï¼š + +```response +┌─var_samp_stable─┠+│ 0.865 │ +└─────────────────┘ +``` diff --git a/docs/ja/sql-reference/aggregate-functions/reference/welchttest.md b/docs/ja/sql-reference/aggregate-functions/reference/welchttest.md new file mode 100644 index 00000000000..a4518fc4812 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/welchttest.md @@ -0,0 +1,70 @@ +--- +slug: /ja/sql-reference/aggregate-functions/reference/welchttest +sidebar_position: 214 +sidebar_label: welchTTest +--- + +# welchTTest + +2ã¤ã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«Welchã®t検定をé©ç”¨ã—ã¾ã™ã€‚ + +**構文** + +``` sql +welchTTest([confidence_level])(sample_data, sample_index) +``` + +両方ã®ã‚µãƒ³ãƒ—ルã®å€¤ã¯`sample_data`カラムã«ã‚ã‚Šã¾ã™ã€‚`sample_index`ãŒ0ã®å ´åˆã€ãã®è¡Œã®å€¤ã¯æœ€åˆã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å±žã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ã€2番目ã®æ¯é›†å›£ã‹ã‚‰ã®ã‚µãƒ³ãƒ—ルã«å±žã—ã¾ã™ã€‚帰無仮説ã¯æ¯é›†å›£ã®å¹³å‡ãŒç­‰ã—ã„ã¨ã„ã†ã‚‚ã®ã§ã™ã€‚æ­£è¦åˆ†å¸ƒãŒä»®å®šã•ã‚Œã¾ã™ã€‚æ¯é›†å›£ã¯ç•°ãªã‚‹åˆ†æ•£ã‚’æŒã¤ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +**引数** + +- `sample_data` — サンプルデータ。[Integer](../../../sql-reference/data-types/int-uint.md)ã€[Float](../../../sql-reference/data-types/float.md)ã€ã¾ãŸã¯[Decimal](../../../sql-reference/data-types/decimal.md)。 +- `sample_index` — サンプルインデックス。[Integer](../../../sql-reference/data-types/int-uint.md)。 + +**パラメータ** + +- `confidence_level` — 信頼区間を計算ã™ã‚‹ãŸã‚ã®ä¿¡é ¼æ°´æº–。[Float](../../../sql-reference/data-types/float.md)。 + +**戻り値** + +2ã¤ã¾ãŸã¯4ã¤ã®è¦ç´ ã‚’æŒã¤[Tuple](../../../sql-reference/data-types/tuple.md)(オプションã®`confidence_level`ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆï¼‰ + +- 計算ã•ã‚ŒãŸt統計é‡ã€‚[Float64](../../../sql-reference/data-types/float.md)。 +- 計算ã•ã‚ŒãŸp値。[Float64](../../../sql-reference/data-types/float.md)。 +- 計算ã•ã‚ŒãŸä¿¡é ¼åŒºé–“下é™ã€‚[Float64](../../../sql-reference/data-types/float.md)。 +- 計算ã•ã‚ŒãŸä¿¡é ¼åŒºé–“上é™ã€‚[Float64](../../../sql-reference/data-types/float.md)。 + + +**例** + +入力テーブル: + +``` text +┌─sample_data─┬─sample_index─┠+│ 20.3 │ 0 │ +│ 22.1 │ 0 │ +│ 21.9 │ 0 │ +│ 18.9 │ 1 │ +│ 20.3 │ 1 │ +│ 19 │ 1 │ +└─────────────┴──────────────┘ +``` + +クエリ: + +``` sql +SELECT welchTTest(sample_data, sample_index) FROM welch_ttest; +``` + +çµæžœï¼š + +``` text +┌─welchTTest(sample_data, sample_index)─────┠+│ (2.7988719532211235,0.051807360348581945) │ +└───────────────────────────────────────────┘ +``` + +**関連項目** + +- [Welch's t-test](https://en.wikipedia.org/wiki/Welch%27s_t-test) +- [studentTTest関数](studentttest.md#studentttest) diff --git a/docs/ja/sql-reference/data-types/aggregatefunction.md b/docs/ja/sql-reference/data-types/aggregatefunction.md new file mode 100644 index 00000000000..62e53a4e907 --- /dev/null +++ b/docs/ja/sql-reference/data-types/aggregatefunction.md @@ -0,0 +1,69 @@ +--- +slug: /ja/sql-reference/data-types/aggregatefunction +sidebar_position: 46 +sidebar_label: AggregateFunction +--- + +# AggregateFunction + +集約関数ã¯ã€`AggregateFunction(...)` データ型ã«ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã§ãる実装定義ã®ä¸­é–“状態をæŒã¤ã“ã¨ãŒã§ãã€é€šå¸¸ã¯[マテリアライズドビュー](../../sql-reference/statements/create/view.md)ã«ã‚ˆã£ã¦ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚集約関数ã®çŠ¶æ…‹ã‚’生æˆã™ã‚‹ä¸€èˆ¬çš„ãªæ–¹æ³•ã¯ã€`-State` サフィックスを付ã‘ã¦é›†ç´„関数を呼ã³å‡ºã™ã“ã¨ã§ã™ã€‚å°†æ¥ã€é›†ç´„ã®æœ€çµ‚çµæžœã‚’å¾—ã‚‹ã«ã¯ã€åŒã˜é›†ç´„関数を `-Merge` サフィックスã¨ã¨ã‚‚ã«ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +`AggregateFunction(name, types_of_arguments...)` — パラメトリックデータ型。 + +**パラメータ** + +- 集約関数ã®åå‰ã€‚関数ãŒãƒ‘ラメトリックãªå ´åˆã€ãã®ãƒ‘ラメータも指定ã—ã¾ã™ã€‚ + +- 集約関数引数ã®åž‹ã€‚ + +**例** + +``` sql +CREATE TABLE t +( + column1 AggregateFunction(uniq, UInt64), + column2 AggregateFunction(anyIf, String, UInt8), + column3 AggregateFunction(quantiles(0.5, 0.9), UInt64) +) ENGINE = ... +``` + +[uniq](../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq)ã€anyIf([any](../../sql-reference/aggregate-functions/reference/any.md#agg_function-any)+[If](../../sql-reference/aggregate-functions/combinators.md#agg-functions-combinator-if))ãŠã‚ˆã³ [quantiles](../../sql-reference/aggregate-functions/reference/quantiles.md#quantiles) ã¯ã€ClickHouseã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る集約関数ã§ã™ã€‚ + +## 使用方法 + +### データã®æŒ¿å…¥ + +データを挿入ã™ã‚‹ã«ã¯ã€é›†ç´„ã® `-State`- 関数を使用ã—㦠`INSERT SELECT` を使用ã—ã¾ã™ã€‚ + +**関数ã®ä¾‹** + +``` sql +uniqState(UserID) +quantilesState(0.5, 0.9)(SendTiming) +``` + +対応ã™ã‚‹ `uniq` 㨠`quantiles` 関数ã¨å¯¾ç…§çš„ã«ã€`-State`- 関数ã¯æœ€çµ‚値ã§ã¯ãªã状態を返ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€`AggregateFunction` åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +`SELECT` クエリã®çµæžœã§ã¯ã€`AggregateFunction` åž‹ã®å€¤ã¯ã€ClickHouse ã®ã™ã¹ã¦ã®å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¯¾ã—ã¦å®Ÿè£…固有ã®ãƒã‚¤ãƒŠãƒªè¡¨ç¾ã‚’æŒã£ã¦ã„ã¾ã™ã€‚例ãˆã°ã€`SELECT` クエリ㧠`TabSeparated` フォーマットã«ãƒ€ãƒ³ãƒ—を出力ã—ãŸå ´åˆã€ã“ã®ãƒ€ãƒ³ãƒ—㯠`INSERT` クエリを使用ã—ã¦èª­ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### データã®é¸æŠž + +`AggregatingMergeTree` テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹éš›ã¯ã€`GROUP BY` å¥ã¨ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ãã¨åŒã˜é›†ç´„関数を使用ã—ã¾ã™ãŒã€`-Merge` サフィックスを使用ã—ã¾ã™ã€‚ + +`-Merge` サフィックスをæŒã¤é›†ç´„関数ã¯ã€ä¸€é€£ã®çŠ¶æ…‹ã‚’å–ã‚Šã€ãれらをçµåˆã—ã¦å®Œå…¨ãªãƒ‡ãƒ¼ã‚¿é›†ç´„ã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +例ãˆã°ã€æ¬¡ã®2ã¤ã®ã‚¯ã‚¨ãƒªã¯åŒã˜çµæžœã‚’è¿”ã—ã¾ã™ï¼š + +``` sql +SELECT uniq(UserID) FROM table + +SELECT uniqMerge(state) FROM (SELECT uniqState(UserID) AS state FROM table GROUP BY RegionID) +``` + +## 使用例 + +[AggregatingMergeTree](../../engines/table-engines/mergetree-family/aggregatingmergetree.md) エンジンã®èª¬æ˜Žã‚’å‚照。 + +## 関連コンテンツ + +- ブログ: [ClickHouseã§ã®é›†ç´„コンビãƒãƒ¼ã‚¿ãƒ¼ã®æ´»ç”¨](https://clickhouse.com/blog/aggregate-functions-combinators-in-clickhouse-for-arrays-maps-and-states) diff --git a/docs/ja/sql-reference/data-types/array.md b/docs/ja/sql-reference/data-types/array.md new file mode 100644 index 00000000000..991297ab585 --- /dev/null +++ b/docs/ja/sql-reference/data-types/array.md @@ -0,0 +1,117 @@ +--- +slug: /ja/sql-reference/data-types/array +sidebar_position: 32 +sidebar_label: Array(T) +--- + +# Array(T) + +`T` åž‹ã®é …ç›®ã®é…列ã§ã€é…列ã®é–‹å§‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯1ã§ã™ã€‚`T` ã¯ã€é…列をå«ã‚€ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## é…列ã®ä½œæˆ + +é…列を作æˆã™ã‚‹ãŸã‚ã®é–¢æ•°ã‚’使用ã§ãã¾ã™ï¼š + +``` sql +array(T) +``` + +ã¾ãŸã€è§’括弧を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +``` sql +[] +``` + +é…列を作æˆã™ã‚‹ä¾‹ï¼š + +``` sql +SELECT array(1, 2) AS x, toTypeName(x) +``` + +``` text +┌─x─────┬─toTypeName(array(1, 2))─┠+│ [1,2] │ Array(UInt8) │ +└───────┴─────────────────────────┘ +``` + +``` sql +SELECT [1, 2] AS x, toTypeName(x) +``` + +``` text +┌─x─────┬─toTypeName([1, 2])─┠+│ [1,2] │ Array(UInt8) │ +└───────┴────────────────────┘ +``` + +## データ型ã®æ“作 + +é…列をãã®å ´ã§ä½œæˆã™ã‚‹ã¨ãã€ClickHouseã¯ãƒªã‚¹ãƒˆã•ã‚ŒãŸã™ã¹ã¦ã®å¼•æ•°ã‚’æ ¼ç´ã§ãる最も狭ã„データ型ã¨ã—ã¦å¼•æ•°ã®åž‹ã‚’自動的ã«å®šç¾©ã—ã¾ã™ã€‚[Nullable](../../sql-reference/data-types/nullable.md#data_type-nullable)やリテラルã®[NULL](../../sql-reference/syntax.md#null-literal)値ãŒã‚ã‚‹å ´åˆã€é…列è¦ç´ ã®åž‹ã‚‚[Nullable](../../sql-reference/data-types/nullable.md)ã«ãªã‚Šã¾ã™ã€‚ + +ClickHouseãŒãƒ‡ãƒ¼ã‚¿åž‹ã‚’決定ã§ããªã‹ã£ãŸå ´åˆã¯ã€ä¾‹å¤–を生æˆã—ã¾ã™ã€‚例ãˆã°ã€æ–‡å­—列ã¨æ•°å€¤ã‚’åŒæ™‚ã«ä½¿ç”¨ã—ã¦é…列を作æˆã—よã†ã¨ã—ãŸã¨ã(`SELECT array(1, 'a')`)ã§ã™ã€‚ + +自動データ型検出ã®ä¾‹ï¼š + +``` sql +SELECT array(1, 2, NULL) AS x, toTypeName(x) +``` + +``` text +┌─x──────────┬─toTypeName(array(1, 2, NULL))─┠+│ [1,2,NULL] │ Array(Nullable(UInt8)) │ +└────────────┴───────────────────────────────┘ +``` + +互æ›æ€§ã®ãªã„データ型ã®é…列を作æˆã—よã†ã¨ã™ã‚‹ã¨ã€ClickHouseã¯ä¾‹å¤–を投ã’ã¾ã™ï¼š + +``` sql +SELECT array(1, 'a') +``` + +``` text +Received exception from server (version 1.1.54388): +Code: 386. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception: There is no supertype for types UInt8, String because some of them are String/FixedString and some of them are not. +``` + +## é…列ã®ã‚µã‚¤ã‚º + +全体ã®ã‚«ãƒ©ãƒ ã‚’読ã¿å–らãšã«ã€`size0` サブカラムを使用ã™ã‚‹ã“ã¨ã§é…列ã®ã‚µã‚¤ã‚ºã‚’å–å¾—ã§ãã¾ã™ã€‚多次元é…列ã®å ´åˆã€`sizeN-1` を使用ã§ãã¾ã™ã€‚ã“ã“㧠`N` ã¯æ±‚ã‚る次元ã§ã™ã€‚ + +**例** + +クエリ: + +```sql +CREATE TABLE t_arr (`arr` Array(Array(Array(UInt32)))) ENGINE = MergeTree ORDER BY tuple(); + +INSERT INTO t_arr VALUES ([[[12, 13, 0, 1],[12]]]); + +SELECT arr.size0, arr.size1, arr.size2 FROM t_arr; +``` + +çµæžœï¼š + +``` text +┌─arr.size0─┬─arr.size1─┬─arr.size2─┠+│ 1 │ [2] │ [[4,1]] │ +└───────────┴───────────┴───────────┘ +``` + +## é…列ã‹ã‚‰ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚µãƒ–カラムã®èª­ã¿å–ã‚Š + +ã‚‚ã— `Array` 内ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸåž‹ `T` ãŒã‚µãƒ–カラムをæŒã£ã¦ã„ã‚‹å ´åˆï¼ˆä¾‹ãˆã°ã€ãã‚ŒãŒ[named tuple](./tuple.md)ã®å ´åˆï¼‰ã€åŒã˜ã‚µãƒ–カラムå㧠`Array(T)` åž‹ã‹ã‚‰ã‚µãƒ–カラムを読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚サブカラムã®åž‹ã¯ã€å…ƒã®ã‚µãƒ–カラムã®åž‹ã® `Array` ã«ãªã‚Šã¾ã™ã€‚ + +**例** + +```sql +CREATE TABLE t_arr (arr Array(Tuple(field1 UInt32, field2 String))) ENGINE = MergeTree ORDER BY tuple(); +INSERT INTO t_arr VALUES ([(1, 'Hello'), (2, 'World')]), ([(3, 'This'), (4, 'is'), (5, 'subcolumn')]); +SELECT arr.field1, toTypeName(arr.field1), arr.field2, toTypeName(arr.field2) from t_arr; +``` + +```test +┌─arr.field1─┬─toTypeName(arr.field1)─┬─arr.field2────────────────┬─toTypeName(arr.field2)─┠+│ [1,2] │ Array(UInt32) │ ['Hello','World'] │ Array(String) │ +│ [3,4,5] │ Array(UInt32) │ ['This','is','subcolumn'] │ Array(String) │ +└────────────┴────────────────────────┴───────────────────────────┴────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/data-types/boolean.md b/docs/ja/sql-reference/data-types/boolean.md new file mode 100644 index 00000000000..e78b4173734 --- /dev/null +++ b/docs/ja/sql-reference/data-types/boolean.md @@ -0,0 +1,38 @@ +--- +slug: /ja/sql-reference/data-types/boolean +sidebar_position: 22 +sidebar_label: Bool +--- + +# Bool + +`bool`åž‹ã¯å†…部的ã«ã¯UInt8ã¨ã—ã¦æ ¼ç´ã•ã‚Œã¾ã™ã€‚å¯èƒ½ãªå€¤ã¯`true`(1)ã¨`false`(0)ã§ã™ã€‚ + +```sql +select true as col, toTypeName(col); +┌─col──┬─toTypeName(true)─┠+│ true │ Bool │ +└──────┴──────────────────┘ + +select true == 1 as col, toTypeName(col); +┌─col─┬─toTypeName(equals(true, 1))─┠+│ 1 │ UInt8 │ +└─────┴─────────────────────────────┘ +``` + +```sql +CREATE TABLE test_bool +( + `A` Int64, + `B` Bool +) +ENGINE = Memory; + +INSERT INTO test_bool VALUES (1, true),(2,0); + +SELECT * FROM test_bool; +┌─A─┬─B─────┠+│ 1 │ true │ +│ 2 │ false │ +└───┴───────┘ +``` diff --git a/docs/ja/sql-reference/data-types/data-types-binary-encoding.md b/docs/ja/sql-reference/data-types/data-types-binary-encoding.md new file mode 100644 index 00000000000..f1897f76ac6 --- /dev/null +++ b/docs/ja/sql-reference/data-types/data-types-binary-encoding.md @@ -0,0 +1,116 @@ +--- +slug: /ja/sql-reference/data-types/data-types-binary-encoding +sidebar_position: 56 +sidebar_label: データ型ã®ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ä»•æ§˜ +--- + +# データ型ã®ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ä»•æ§˜ + +ã“ã®ä»•æ§˜ã¯ã€ClickHouseã®ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¨ãƒ‡ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã«ä½¿ç”¨ã§ãã‚‹ãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€`Dynamic`カラムã®[ãƒã‚¤ãƒŠãƒªã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚º](dynamic.md#binary-output-format)ã§ä½¿ç”¨ã•ã‚Œã€å¯¾å¿œã™ã‚‹è¨­å®šã®ä¸‹ã§å…¥åŠ›/出力フォーマット[RowBinaryWithNamesAndTypes](../../interfaces/formats.md#rowbinarywithnamesandtypes)ãŠã‚ˆã³[Native](../../interfaces/formats.md#native)ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +下表ã¯ã€å„データ型ãŒãƒã‚¤ãƒŠãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã©ã®ã‚ˆã†ã«è¡¨ç¾ã•ã‚Œã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚å„データ型ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯ã€åž‹ã‚’示ã™1ãƒã‚¤ãƒˆã¨ã€ã„ãã¤ã‹ã®ã‚ªãƒ—ションã®è¿½åŠ æƒ…å ±ã‹ã‚‰æ§‹æˆã•ã‚Œã¾ã™ã€‚ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®`var_uint`ã¯ã€Variable-Length Quantity圧縮を使用ã—ã¦ã‚µã‚¤ã‚ºãŒã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +| ClickHouse データ型 | ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚° | +|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `Nothing` | `0x00` | +| `UInt8` | `0x01` | +| `UInt16` | `0x02` | +| `UInt32` | `0x03` | +| `UInt64` | `0x04` | +| `UInt128` | `0x05` | +| `UInt256` | `0x06` | +| `Int8` | `0x07` | +| `Int16` | `0x08` | +| `Int32` | `0x09` | +| `Int64` | `0x0A` | +| `Int128` | `0x0B` | +| `Int256` | `0x0C` | +| `Float32` | `0x0D` | +| `Float64` | `0x0E` | +| `Date` | `0x0F` | +| `Date32` | `0x10` | +| `DateTime` | `0x11` | +| `DateTime(time_zone)` | `0x12` | +| `DateTime64(P)` | `0x13` | +| `DateTime64(P, time_zone)` | `0x14` | +| `String` | `0x15` | +| `FixedString(N)` | `0x16` | +| `Enum8` | `0x17...` | +| `Enum16` | `0x18...>` | +| `Decimal32(P, S)` | `0x19` | +| `Decimal64(P, S)` | `0x1A` | +| `Decimal128(P, S)` | `0x1B` | +| `Decimal256(P, S)` | `0x1C` | +| `UUID` | `0x1D` | +| `Array(T)` | `0x1E` | +| `Tuple(T1, ..., TN)` | `0x1F...` | +| `Tuple(name1 T1, ..., nameN TN)` | `0x20...` | +| `Set` | `0x21` | +| `Interval` | `0x22`([間隔種ã®ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°](#interval-kind-binary-encoding)ã‚’å‚照) | +| `Nullable(T)` | `0x23` | +| `Function` | `0x24...` | +| `AggregateFunction(function_name(param_1, ..., param_N), arg_T1, ..., arg_TN)` | `0x25......`([集計関数パラメータã®ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°](#aggregate-function-parameter-binary-encoding)ã‚’å‚照) | +| `LowCardinality(T)` | `0x26` | +| `Map(K, V)` | `0x27` | +| `IPv4` | `0x28` | +| `IPv6` | `0x29` | +| `Variant(T1, ..., TN)` | `0x2A...` | +| `Dynamic(max_types=N)` | `0x2B` | +| `Custom type` (`Ring`, `Polygon`, etc) | `0x2C` | +| `Bool` | `0x2D` | +| `SimpleAggregateFunction(function_name(param_1, ..., param_N), arg_T1, ..., arg_TN)` | `0x2E......`([集計関数パラメータã®ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°](#aggregate-function-parameter-binary-encoding)ã‚’å‚照) | +| `Nested(name1 T1, ..., nameN TN)` | `0x2F...` | +| `JSON(max_dynamic_paths=N, max_dynamic_types=M, path Type, SKIP skip_path, SKIP REGEXP skip_path_regexp)` | `0x30.........` | + +`JSON`åž‹ã®ãƒã‚¤ãƒˆ`uint8_serialization_version`ã¯ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’示ã—ã¾ã™ã€‚ç¾åœ¨ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯å¸¸ã«0ã§ã™ãŒã€å°†æ¥çš„ã«æ–°ã—ã„引数ãŒ`JSON`åž‹ã«å°Žå…¥ã•ã‚ŒãŸå ´åˆã«ã¯å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +### Interval 種ã®ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚° + +下表ã¯ã€`Interval`データ型ã®ç•°ãªã‚‹é–“隔種ãŒã©ã®ã‚ˆã†ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +| Interval 種 | ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚° | +|-------------|-------------------------| +| `Nanosecond` | `0x00` | +| `Microsecond` | `0x01` | +| `Millisecond` | `0x02` | +| `Second` | `0x03` | +| `Minute` | `0x04` | +| `Hour` | `0x05` | +| `Day` | `0x06` | +| `Week` | `0x07` | +| `Month` | `0x08` | +| `Quarter` | `0x09` | +| `Year` | `0x1A` | + +### 集計関数パラメータã®ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚° + +下表ã¯ã€`AggregateFunction`ã¨`SimpleAggregateFunction`ã®ãƒ‘ラメータãŒã©ã®ã‚ˆã†ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ +パラメータã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯ã€ãƒ‘ラメータã®åž‹ã‚’示ã™1ãƒã‚¤ãƒˆã¨å€¤ãã®ã‚‚ã®ã‹ã‚‰æ§‹æˆã•ã‚Œã¾ã™ã€‚ + +| パラメータã®åž‹ | ãƒã‚¤ãƒŠãƒªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚° | +|----------------------|------------------------------------------------------------------------------------------------------------------------------------------| +| `Null` | `0x00` | +| `UInt64` | `0x01` | +| `Int64` | `0x02` | +| `UInt128` | `0x03` | +| `Int128` | `0x04` | +| `UInt128` | `0x05` | +| `Int128` | `0x06` | +| `Float64` | `0x07` | +| `Decimal32` | `0x08` | +| `Decimal64` | `0x09` | +| `Decimal128` | `0x0A` | +| `Decimal256` | `0x0B` | +| `String` | `0x0C` | +| `Array` | `0x0D...` | +| `Tuple` | `0x0E...` | +| `Map` | `0x0F...` | +| `IPv4` | `0x10` | +| `IPv6` | `0x11` | +| `UUID` | `0x12` | +| `Bool` | `0x13` | +| `Object` | `0x14...` | +| `AggregateFunctionState` | `0x15` | +| `Negative infinity` | `0xFE` | +| `Positive infinity` | `0xFF` | + diff --git a/docs/ja/sql-reference/data-types/date.md b/docs/ja/sql-reference/data-types/date.md new file mode 100644 index 00000000000..08adaa58779 --- /dev/null +++ b/docs/ja/sql-reference/data-types/date.md @@ -0,0 +1,50 @@ +--- +slug: /ja/sql-reference/data-types/date +sidebar_position: 12 +sidebar_label: Date +--- + +# Date + +日付。2ãƒã‚¤ãƒˆã§1970-01-01ã‹ã‚‰ã®æ—¥æ•°ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ï¼ˆç¬¦å·ãªã—)。Unixエãƒãƒƒã‚¯ã®é–‹å§‹ç›´å¾Œã‹ã‚‰ã€ã‚³ãƒ³ãƒ‘イル時ã«å®šç¾©ã•ã‚Œã‚‹ä¸Šé™ï¼ˆç¾æ™‚点ã§ã¯2149å¹´ã¾ã§ã€å®Œå…¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る最終年ã¯2148年)ã¾ã§ã®å€¤ã‚’ä¿å­˜ã§ãã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る値ã®ç¯„囲ã¯: \[1970-01-01, 2149-06-06\]ã§ã™ã€‚ + +日付ã®å€¤ã¯ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãªã—ã§ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +**例** + +`Date`åž‹ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹: + +``` sql +CREATE TABLE dt +( + `timestamp` Date, + `event_id` UInt8 +) +ENGINE = TinyLog; +``` + +``` sql +-- æ—¥ä»˜ã‚’è§£æž +-- - 文字列ã‹ã‚‰ã€ +-- - 1970-01-01ã‹ã‚‰ã®æ—¥æ•°ã¨ã—ã¦è§£é‡ˆã•ã‚Œã‚‹ã€Œå°ã•ãªã€æ•´æ•°ã‹ã‚‰ã€ +-- - 1970-01-01ã‹ã‚‰ã®ç§’æ•°ã¨ã—ã¦è§£é‡ˆã•ã‚Œã‚‹ã€Œå¤§ããªã€æ•´æ•°ã‹ã‚‰ã€‚ +INSERT INTO dt VALUES ('2019-01-01', 1), (17897, 2), (1546300800, 3); + +SELECT * FROM dt; +``` + +``` text +┌──timestamp─┬─event_id─┠+│ 2019-01-01 │ 1 │ +│ 2019-01-01 │ 2 │ +│ 2019-01-01 │ 3 │ +└────────────┴──────────┘ +``` + +**関連情報** + +- [日付ã¨æ™‚間を扱ã†é–¢æ•°](../../sql-reference/functions/date-time-functions.md) +- [日付ã¨æ™‚間を扱ã†ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ãƒ¼](../../sql-reference/operators/index.md#operators-datetime) +- [`DateTime` データ型](../../sql-reference/data-types/datetime.md) diff --git a/docs/ja/sql-reference/data-types/date32.md b/docs/ja/sql-reference/data-types/date32.md new file mode 100644 index 00000000000..4d44b31312b --- /dev/null +++ b/docs/ja/sql-reference/data-types/date32.md @@ -0,0 +1,45 @@ +--- +slug: /ja/sql-reference/data-types/date32 +sidebar_position: 14 +sidebar_label: Date32 +--- + +# Date32 + +日付を表ã™ãƒ‡ãƒ¼ã‚¿åž‹ã§ã™ã€‚[DateTime64](../../sql-reference/data-types/datetime64.md)ã¨åŒã˜ç¯„囲ã®æ—¥æ™‚をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚データã¯ãƒã‚¤ãƒ†ã‚£ãƒ–ãƒã‚¤ãƒˆã‚ªãƒ¼ãƒ€ãƒ¼ã§ç¬¦å·ä»˜ã32ビット整数ã¨ã—ã¦ä¿å­˜ã•ã‚Œã€1970-01-01ã‹ã‚‰ã®æ—¥æ•°ã‚’表ç¾ã—ã¦ã„ã¾ã™ï¼ˆ0ã¯1970-01-01を表ã—ã€è² ã®å€¤ã¯1970年以å‰ã®æ—¥æ•°ã‚’表ã—ã¾ã™ï¼‰ã€‚ + +**例** + +`Date32`åž‹ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ä¾‹: + +``` sql +CREATE TABLE dt32 +( + `timestamp` Date32, + `event_id` UInt8 +) +ENGINE = TinyLog; +``` + +``` sql +-- Dateを解æžã™ã‚‹ +-- - 文字列ã‹ã‚‰ã€ +-- - 1970-01-01ã‹ã‚‰ã®æ—¥æ•°ã‚’解釈ã™ã‚‹ã€Œå°ã•ãªã€æ•´æ•°ã‹ã‚‰ã€ +-- - 1970-01-01ã‹ã‚‰ã®ç§’数を解釈ã™ã‚‹ã€Œå¤§ããªã€æ•´æ•°ã‹ã‚‰ã€‚ +INSERT INTO dt32 VALUES ('2100-01-01', 1), (47482, 2), (4102444800, 3); + +SELECT * FROM dt32; +``` + +``` text +┌──timestamp─┬─event_id─┠+│ 2100-01-01 │ 1 │ +│ 2100-01-01 │ 2 │ +└────────────┴──────────┘ +``` + +**関連項目** + +- [toDate32](../../sql-reference/functions/type-conversion-functions.md#todate32) +- [toDate32OrZero](../../sql-reference/functions/type-conversion-functions.md#todate32-or-zero) +- [toDate32OrNull](../../sql-reference/functions/type-conversion-functions.md#todate32-or-null) diff --git a/docs/ja/sql-reference/data-types/datetime.md b/docs/ja/sql-reference/data-types/datetime.md new file mode 100644 index 00000000000..a23eb1055bf --- /dev/null +++ b/docs/ja/sql-reference/data-types/datetime.md @@ -0,0 +1,153 @@ +--- +slug: /ja/sql-reference/data-types/datetime +sidebar_position: 16 +sidebar_label: DateTime +--- + +# DateTime + +日付ã¨æ™‚é–“ã¨ã—ã¦è¡¨ç¾ã§ãる瞬間ã®æ™‚é–“ã‚’ä¿å­˜ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +構文: + +``` sql +DateTime([timezone]) +``` + +対応ã™ã‚‹å€¤ã®ç¯„囲: \[1970-01-01 00:00:00, 2106-02-07 06:28:15\]。 + +解åƒåº¦: 1秒。 + +## スピード + +ã»ã¨ã‚“ã©ã®æ¡ä»¶ä¸‹ã§ã€`Date`データ型ã¯`DateTime`より高速ã§ã™ã€‚ + +`Date`åž‹ã¯2ãƒã‚¤ãƒˆã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’å¿…è¦ã¨ã—ã€`DateTime`ã¯4ãƒã‚¤ãƒˆã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ã—ã‹ã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’圧縮ã™ã‚‹ã¨ã€ã“ã®é•ã„ã¯å¢—å¹…ã•ã‚Œã¾ã™ã€‚ã“ã®å¢—å¹…ã¯ã€`DateTime`ã®åˆ†ã¨ç§’ãŒåœ§ç¸®ã—ã«ãã„ãŸã‚ã§ã™ã€‚`DateTime`よりも`Date`をフィルタリングãŠã‚ˆã³é›†è¨ˆã™ã‚‹æ–¹ãŒé«˜é€Ÿã§ã™ã€‚ + +## 使用上ã®æ³¨æ„ + +時刻ã¯ã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚„å¤æ™‚é–“ã«é–¢ä¿‚ãªãã€[Unixタイムスタンプ](https://en.wikipedia.org/wiki/Unix_time)ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚タイムゾーンã¯ã€ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ã§ã®`DateTime`åž‹ã®å€¤ã®è¡¨ç¤ºæ–¹æ³•ã¨ã€æ–‡å­—列ã¨ã—ã¦æŒ‡å®šã•ã‚ŒãŸå€¤ï¼ˆâ€˜2020-01-01 05:00:01’)ã®è§£æžæ–¹æ³•ã«å½±éŸ¿ã‚’与ãˆã¾ã™ã€‚ + +タイムゾーンã«ä¾å­˜ã—ãªã„Unixタイムスタンプã¯ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ/エクスãƒãƒ¼ãƒˆæ™‚や値ã«å¯¾ã™ã‚‹ã‚«ãƒ¬ãƒ³ãƒ€ãƒ¼è¨ˆç®—ã‚’è¡Œã†éš›ã«ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ã«å¤‰æ›ã•ã‚Œã¾ã™ï¼ˆä¾‹: `toDate`, `toHour`関数ãªã©ï¼‰ã€‚タイムゾーンã¯ãƒ†ãƒ¼ãƒ–ルã®è¡Œï¼ˆã¾ãŸã¯çµæžœã‚»ãƒƒãƒˆï¼‰ã«ã¯ä¿å­˜ã•ã‚Œã¾ã›ã‚“ãŒã€ã‚«ãƒ©ãƒ ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +対応ã™ã‚‹ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã®ãƒªã‚¹ãƒˆã¯ã€[IANA Time Zone Database](https://www.iana.org/time-zones)ã§è¦‹ã¤ã‹ã‚Šã€`SELECT * FROM system.time_zones`ã§ã‚¯ã‚¨ãƒªã§ãã¾ã™ã€‚[ã“ã®ãƒªã‚¹ãƒˆ](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)ã¯Wikipediaã«ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +テーブルを作æˆã™ã‚‹ã¨ãã«`DateTime`åž‹ã®ã‚«ãƒ©ãƒ ã«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’明示的ã«è¨­å®šã§ãã¾ã™ã€‚例: `DateTime('UTC')`。タイムゾーンãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯ã‚µãƒ¼ãƒãƒ¼è¨­å®šã®[timezone](../../operations/server-configuration-parameters/settings.md#timezone)パラメータã®å€¤ã¾ãŸã¯ClickHouseサーãƒãƒ¼é–‹å§‹æ™‚ã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ è¨­å®šã‚’使用ã—ã¾ã™ã€‚ + +[clickhouse-client](../../interfaces/cli.md)ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã“ã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’åˆæœŸåŒ–ã™ã‚‹éš›ã€æ˜Žç¤ºçš„ã«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’é©ç”¨ã—ã¾ã™ã€‚クライアントタイムゾーンを使用ã™ã‚‹ã«ã¯ã€`--use_client_time_zone`パラメータを指定ã—ã¦`clickhouse-client`を実行ã—ã¾ã™ã€‚ + +ClickHouseã¯ã€[date_time_output_format](../../operations/settings/settings-formats.md#date_time_output_format)設定ã®å€¤ã«ä¾å­˜ã—ã¦å€¤ã‚’出力ã—ã¾ã™ã€‚デフォルトã§ã¯ `YYYY-MM-DD hh:mm:ss` å½¢å¼ã§è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã•ã‚‰ã«ã€[formatDateTime](../../sql-reference/functions/date-time-functions.md#formatdatetime)関数を使用ã—ã¦å‡ºåŠ›ã‚’変更ã§ãã¾ã™ã€‚ + +ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹éš›ã¯ã€[date_time_input_format](../../operations/settings/settings-formats.md#date_time_input_format)設定ã®å€¤ã«å¿œã˜ã¦ã€æ§˜ã€…ãªå½¢å¼ã®æ—¥æ™‚文字列を使用ã§ãã¾ã™ã€‚ + +## 例 + +**1.** `DateTime`åž‹ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹: + +``` sql +CREATE TABLE dt +( + `timestamp` DateTime('Asia/Istanbul'), + `event_id` UInt8 +) +ENGINE = TinyLog; +``` + +``` sql +-- DateTimeを解æžã™ã‚‹ +-- - 文字列ã‹ã‚‰ã€ +-- - 1970-01-01ã‹ã‚‰ã®ç§’æ•°ã¨ã—ã¦æ•´æ•°ã‹ã‚‰ã€‚ +INSERT INTO dt VALUES ('2019-01-01 00:00:00', 1), (1546300800, 3); + +SELECT * FROM dt; +``` + +``` text +┌───────────timestamp─┬─event_id─┠+│ 2019-01-01 00:00:00 │ 2 │ +│ 2019-01-01 03:00:00 │ 1 │ +└─────────────────────┴──────────┘ +``` + +- 日時を整数ã¨ã—ã¦æŒ¿å…¥ã™ã‚‹å ´åˆã€ãã‚Œã¯Unix Timestamp (UTC) ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚`1546300800`ã¯UTCã§`'2019-01-01 00:00:00'`を表ã—ã¾ã™ã€‚ã—ã‹ã—ã€`timestamp`カラムã«ã¯`Asia/Istanbul` (UTC+3) タイムゾーンãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€æ–‡å­—列ã¨ã—ã¦å‡ºåŠ›ã™ã‚‹éš›ã«ã¯`'2019-01-01 03:00:00'`ã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ +- 文字列ã®å€¤ã‚’日時ã¨ã—ã¦æŒ¿å…¥ã™ã‚‹éš›ã«ã¯ã€ã‚«ãƒ©ãƒ ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚`'2019-01-01 00:00:00'`ã¯`Asia/Istanbul`タイムゾーンã¨ã—ã¦æ‰±ã‚ã‚Œã€`1546290000`ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +**2.** `DateTime`値ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚° + +``` sql +SELECT * FROM dt WHERE timestamp = toDateTime('2019-01-01 00:00:00', 'Asia/Istanbul') +``` + +``` text +┌───────────timestamp─┬─event_id─┠+│ 2019-01-01 00:00:00 │ 1 │ +└─────────────────────┴──────────┘ +``` + +`DateTime`カラムã®å€¤ã¯ã€`WHERE`述語内ã®æ–‡å­—列値を使用ã—ã¦ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã§ãã¾ã™ã€‚自動的ã«`DateTime`ã«å¤‰æ›ã•ã‚Œã¾ã™: + +``` sql +SELECT * FROM dt WHERE timestamp = '2019-01-01 00:00:00' +``` + +``` text +┌───────────timestamp─┬─event_id─┠+│ 2019-01-01 00:00:00 │ 1 │ +└─────────────────────┴──────────┘ +``` + +**3.** `DateTime`型カラムã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’å–å¾—ã™ã‚‹: + +``` sql +SELECT toDateTime(now(), 'Asia/Istanbul') AS column, toTypeName(column) AS x +``` + +``` text +┌──────────────column─┬─x─────────────────────────┠+│ 2019-10-16 04:12:04 │ DateTime('Asia/Istanbul') │ +└─────────────────────┴───────────────────────────┘ +``` + +**4.** ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å¤‰æ› + +``` sql +SELECT +toDateTime(timestamp, 'Europe/London') as lon_time, +toDateTime(timestamp, 'Asia/Istanbul') as mos_time +FROM dt +``` + +``` text +┌───────────lon_time──┬────────────mos_time─┠+│ 2019-01-01 00:00:00 │ 2019-01-01 03:00:00 │ +│ 2018-12-31 21:00:00 │ 2019-01-01 00:00:00 │ +└─────────────────────┴─────────────────────┘ +``` + +タイムゾーン変æ›ã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’変更ã™ã‚‹ãŸã‚ã€ã“ã®æ“作ã«ã¯è¨ˆç®—コストã¯ã‚ã‚Šã¾ã›ã‚“。 + +## タイムゾーンサãƒãƒ¼ãƒˆã®åˆ¶é™ + +一部ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯å®Œå…¨ã«ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã„ãã¤ã‹ã®ã‚±ãƒ¼ã‚¹ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +UTCã‹ã‚‰ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆãŒ15分ã®å€æ•°ã§ãªã„å ´åˆã€æ™‚ã¨åˆ†ã®è¨ˆç®—ãŒæ­£ç¢ºã§ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€1972å¹´1月7日以å‰ã®ãƒªãƒ™ãƒªã‚¢ã®ãƒ¢ãƒ³ãƒ­ãƒ“ã‚¢ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯ã€UTC -0:44:30ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆãŒã‚ã‚Šã¾ã™ã€‚モンロビアã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§æ­´å²çš„ãªæ™‚é–“ã®è¨ˆç®—ã‚’è¡Œã†å ´åˆã€æ™‚間処ç†é–¢æ•°ãŒæ­£ç¢ºã§ãªã„çµæžœã‚’è¿”ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã—ã‹ã—ã€1972å¹´1月7日以é™ã®çµæžœã¯æ­£ç¢ºã§ã™ã€‚ + +時間ã®è»¢æ›ï¼ˆå¤æ™‚é–“ãªã©ã®ç†ç”±ã§ï¼‰ãŒ15分ã®å€æ•°ã§ãªã„時点ã§è¡Œã‚ã‚ŒãŸå ´åˆã€ãã®ç‰¹å®šã®æ—¥ã«èª¤ã£ãŸçµæžœãŒå‡ºã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +å˜èª¿å¢—加ã§ãªã„カレンダー日付。ãŸã¨ãˆã°ã€ãƒãƒƒãƒ”ーãƒãƒ¬ãƒ¼ - グースベイã§ã¯ã€2010å¹´11月7æ—¥00:01:00(真夜中ã‹ã‚‰1分後)ã«1時間後ã‚ã«ç§»ã™æ™‚é–“ãŒã‚ã‚Šã¾ã—ãŸã€‚ãã®ãŸã‚ã€11月6æ—¥ãŒçµ‚ã‚ã£ãŸå¾Œã€äººã€…ã¯11月7æ—¥ã®1分間を全部観測ã—ã€ãã®å¾Œ11月6æ—¥23:01ã«æˆ»ã‚Šã€59分後ã«11月7æ—¥ãŒå†ã³å§‹ã¾ã‚Šã¾ã—ãŸã€‚ClickHouseã§ã¯ã¾ã ã“ã®ã‚ˆã†ãªç¾è±¡ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。ã“れらã®æ—¥ã«ã¯æ™‚間処ç†é–¢æ•°ã®çµæžœãŒè‹¥å¹²ä¸æ­£ç¢ºã¨ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +åŒæ§˜ã®å•é¡ŒãŒ2010å¹´ã®ã‚±ãƒ¼ã‚·ãƒ¼å—極基地ã«ã‚‚存在ã—ã¾ã™ã€‚2010å¹´3月5æ—¥02:00ã«3時間後ã‚ã«ç§»ã•ã‚Œã¾ã—ãŸã€‚ã‚‚ã—ã‚ãªãŸãŒå—極基地ã«ã„ã‚‹ãªã‚‰ã€ClickHouseを使ã†ã“ã¨ã‚’æã‚Œãªã„ã§ãã ã•ã„。タイムゾーンをUTCã«è¨­å®šã™ã‚‹ã‹ã€èª¤å·®ã‚’æ„è­˜ã—ã¦ãã ã•ã„。 + +複数日ã®æ™‚間シフト。一部ã®å¤ªå¹³æ´‹ã®å³¶ã€…ã¯UTC+14ã‹ã‚‰UTC-12ã«ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’変更ã—ã¾ã—ãŸã€‚ãã‚Œã¯å•é¡Œã‚ã‚Šã¾ã›ã‚“ãŒã€éŽåŽ»ã®æ—¥æ™‚ã§è¨ˆç®—ã‚’è¡Œã†å ´åˆã€å¤‰æ›æ—¥ã®å ´åˆã«ä¸æ­£ç¢ºã•ãŒå­˜åœ¨ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +## 関連項目 + +- [型変æ›é–¢æ•°](../../sql-reference/functions/type-conversion-functions.md) +- [日時をæ“作ã™ã‚‹ãŸã‚ã®é–¢æ•°](../../sql-reference/functions/date-time-functions.md) +- [é…列をæ“作ã™ã‚‹ãŸã‚ã®é–¢æ•°](../../sql-reference/functions/array-functions.md) +- [`date_time_input_format`設定](../../operations/settings/settings-formats.md#date_time_input_format) +- [`date_time_output_format`設定](../../operations/settings/settings-formats.md#date_time_output_format) +- [`timezone`サーãƒãƒ¼æ§‹æˆãƒ‘ラメータ](../../operations/server-configuration-parameters/settings.md#timezone) +- [`session_timezone`設定](../../operations/settings/settings.md#session_timezone) +- [日時をæ“作ã™ã‚‹ãŸã‚ã®æ¼”ç®—å­](../../sql-reference/operators/index.md#operators-datetime) +- [`Date`データ型](../../sql-reference/data-types/date.md) diff --git a/docs/ja/sql-reference/data-types/datetime64.md b/docs/ja/sql-reference/data-types/datetime64.md new file mode 100644 index 00000000000..a66a7964587 --- /dev/null +++ b/docs/ja/sql-reference/data-types/datetime64.md @@ -0,0 +1,125 @@ +--- +slug: /ja/sql-reference/data-types/datetime64 +sidebar_position: 18 +sidebar_label: DateTime64 +--- + +# DateTime64 + +日付ã¨æ™‚刻ã€ãŠã‚ˆã³å®šç¾©ã•ã‚ŒãŸã‚µãƒ–秒精度ã§è¡¨ç¾ã§ãる瞬間を格ç´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãƒãƒƒã‚¯ã‚µã‚¤ã‚ºï¼ˆç²¾åº¦ï¼‰ï¼š10-precision 秒。 有効範囲: [ 0 : 9 ]。 +通常ã¯ã€3(ミリ秒)ã€6(マイクロ秒)ã€9(ナノ秒)ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**構文:** + +``` sql +DateTime64(precision, [timezone]) +``` + +内部的ã«ã¯ã€1970-01-01 00:00:00 UTCã‹ã‚‰ã‚¨ãƒãƒƒã‚¯ã®é–‹å§‹ã¾ã§ã®ã€Œãƒãƒƒã‚¯ã€æ•°ã¨ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ Int64 ã¨ã—ã¦æ ¼ç´ã—ã¾ã™ã€‚ ãƒãƒƒã‚¯ã®è§£åƒåº¦ã¯ç²¾åº¦ãƒ‘ラメータã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã¾ã™ã€‚ã•ã‚‰ã«ã€`DateTime64` åž‹ã¯ã‚«ãƒ©ãƒ å…¨ä½“ã«å¯¾ã—ã¦åŒã˜ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’æ ¼ç´ã™ã‚‹ã“ã¨ãŒã§ãã€ã“ã‚Œã«ã‚ˆã£ã¦ `DateTime64` åž‹ã®å€¤ãŒãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ã§è¡¨ç¤ºã•ã‚Œã‚‹æ–¹æ³•ã‚„ã€æ–‡å­—列ã¨ã—ã¦æŒ‡å®šã•ã‚ŒãŸå€¤ãŒè§£æžã•ã‚Œã‚‹æ–¹æ³•ã«å½±éŸ¿ã—ã¾ã™ï¼ˆâ€˜2020-01-01 05:00:01.000’)。タイムゾーンã¯ãƒ†ãƒ¼ãƒ–ルã®è¡Œï¼ˆã¾ãŸã¯çµæžœã‚»ãƒƒãƒˆï¼‰ã«ã¯æ ¼ç´ã•ã‚Œã¾ã›ã‚“ãŒã€ã‚«ãƒ©ãƒ ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚詳細ã¯[DateTime](../../sql-reference/data-types/datetime.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る値ã®ç¯„囲: \[1900-01-01 00:00:00, 2299-12-31 23:59:59.99999999\] + +注æ„: 最大値ã®ç²¾åº¦ã¯8ã§ã™ã€‚最大精度ã®9æ¡ï¼ˆãƒŠãƒŽç§’)ãŒä½¿ç”¨ã•ã‚ŒãŸå ´åˆã€æœ€å¤§ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹å€¤ã¯ UTC ã«ãŠã„㦠`2262-04-11 23:47:16` ã§ã™ã€‚ + +## 例 + +1. `DateTime64`åž‹ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ä¾‹: + +``` sql +CREATE TABLE dt64 +( + `timestamp` DateTime64(3, 'Asia/Istanbul'), + `event_id` UInt8 +) +ENGINE = TinyLog; +``` + +``` sql +-- DateTime を解æžã™ã‚‹ +-- - 1970-01-01ã‹ã‚‰ã®ç§’æ•°ã¨ã—ã¦ã®æ•´æ•°ã‹ã‚‰ã€‚ +-- - 文字列ã‹ã‚‰ã€‚ +INSERT INTO dt64 VALUES (1546300800123, 1), (1546300800.123, 2), ('2019-01-01 00:00:00', 3); + +SELECT * FROM dt64; +``` + +``` text +┌───────────────timestamp─┬─event_id─┠+│ 2019-01-01 03:00:00.123 │ 1 │ +│ 2019-01-01 03:00:00.123 │ 2 │ +│ 2019-01-01 00:00:00.000 │ 3 │ +└─────────────────────────┴──────────┘ +``` + +- datetimeãŒæ•´æ•°ã¨ã—ã¦æŒ¿å…¥ã•ã‚Œã‚‹å ´åˆã€ãã‚Œã¯é©åˆ‡ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã•ã‚ŒãŸ Unix タイムスタンプ (UTC) ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚`1546300800000` (精度3) 㯠`'2019-01-01 00:00:00'` UTC を表ã—ã¾ã™ã€‚ãŸã ã—ã€`timestamp` カラムã«ã¯ `Asia/Istanbul` (UTC+3) タイムゾーンãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€æ–‡å­—列ã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã‚‹ã¨ `'2019-01-01 03:00:00'` ã¨è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚datetimeã‚’å°æ•°ã¨ã—ã¦æŒ¿å…¥ã™ã‚‹ã¨ã€æ•´æ•°ã¨åŒæ§˜ã«æ‰±ã‚ã‚Œã¾ã™ãŒã€å°æ•°ç‚¹å‰ã®å€¤ãŒ Unix タイムスタンプã®ç§’ã¾ã§ã‚’表ã—ã€å°æ•°ç‚¹å¾Œã®å€¤ã¯ç²¾åº¦ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ +- 文字列値ãŒdatetimeã¨ã—ã¦æŒ¿å…¥ã•ã‚Œã‚‹å ´åˆã€ãã‚Œã¯ã‚«ãƒ©ãƒ ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã«ã‚ã‚‹ã‚‚ã®ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚`'2019-01-01 00:00:00'` 㯠`Asia/Istanbul` タイムゾーンã«ã‚ã‚‹ã‚‚ã®ã¨ã—ã¦æ‰±ã‚ã‚Œã€`1546290000000` ã¨ã—ã¦æ ¼ç´ã•ã‚Œã¾ã™ã€‚ + +2. `DateTime64` 値ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚° + +``` sql +SELECT * FROM dt64 WHERE timestamp = toDateTime64('2019-01-01 00:00:00', 3, 'Asia/Istanbul'); +``` + +``` text +┌───────────────timestamp─┬─event_id─┠+│ 2019-01-01 00:00:00.000 │ 3 │ +└─────────────────────────┴──────────┘ +``` + +`DateTime` ã¨ã¯ç•°ãªã‚Šã€`DateTime64` ã®å€¤ã¯ `String` ã‹ã‚‰è‡ªå‹•çš„ã«å¤‰æ›ã•ã‚Œã¾ã›ã‚“。 + +``` sql +SELECT * FROM dt64 WHERE timestamp = toDateTime64(1546300800.123, 3); +``` + +``` text +┌───────────────timestamp─┬─event_id─┠+│ 2019-01-01 03:00:00.123 │ 1 │ +│ 2019-01-01 03:00:00.123 │ 2 │ +└─────────────────────────┴──────────┘ +``` + +挿入ã¨ã¯é€†ã«ã€`toDateTime64` 関数ã¯ã™ã¹ã¦ã®å€¤ã‚’å°æ•°ãƒãƒªã‚¢ãƒ³ãƒˆã¨ã—ã¦å‡¦ç†ã™ã‚‹ãŸã‚ã€ç²¾åº¦ã¯å°æ•°ç‚¹ã®å¾Œã«ä¸Žãˆã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +3. `DateTime64`åž‹ã®å€¤ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’å–å¾—ã™ã‚‹: + +``` sql +SELECT toDateTime64(now(), 3, 'Asia/Istanbul') AS column, toTypeName(column) AS x; +``` + +``` text +┌──────────────────column─┬─x──────────────────────────────┠+│ 2023-06-05 00:09:52.000 │ DateTime64(3, 'Asia/Istanbul') │ +└─────────────────────────┴────────────────────────────────┘ +``` + +4. ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å¤‰æ› + +``` sql +SELECT +toDateTime64(timestamp, 3, 'Europe/London') as lon_time, +toDateTime64(timestamp, 3, 'Asia/Istanbul') as istanbul_time +FROM dt64; +``` + +``` text +┌────────────────lon_time─┬───────────istanbul_time─┠+│ 2019-01-01 00:00:00.123 │ 2019-01-01 03:00:00.123 │ +│ 2019-01-01 00:00:00.123 │ 2019-01-01 03:00:00.123 │ +│ 2018-12-31 21:00:00.000 │ 2019-01-01 00:00:00.000 │ +└─────────────────────────┴─────────────────────────┘ +``` + +**å‚ç…§** + +- [型変æ›é–¢æ•°](../../sql-reference/functions/type-conversion-functions.md) +- [日付ã¨æ™‚刻を扱ã†é–¢æ•°](../../sql-reference/functions/date-time-functions.md) +- [`date_time_input_format` 設定](../../operations/settings/settings-formats.md#date_time_input_format) +- [`date_time_output_format` 設定](../../operations/settings/settings-formats.md#date_time_output_format) +- [`timezone` サーãƒãƒ¼æ§‹æˆãƒ‘ラメータ](../../operations/server-configuration-parameters/settings.md#timezone) +- [`session_timezone` 設定](../../operations/settings/settings.md#session_timezone) +- [日付ã¨æ™‚刻を扱ã†ãŸã‚ã®æ¼”ç®—å­](../../sql-reference/operators/index.md#operators-for-working-with-dates-and-times) +- [`Date` データ型](../../sql-reference/data-types/date.md) +- [`DateTime` データ型](../../sql-reference/data-types/datetime.md) diff --git a/docs/ja/sql-reference/data-types/decimal.md b/docs/ja/sql-reference/data-types/decimal.md new file mode 100644 index 00000000000..616197fc69c --- /dev/null +++ b/docs/ja/sql-reference/data-types/decimal.md @@ -0,0 +1,119 @@ +--- +slug: /ja/sql-reference/data-types/decimal +sidebar_position: 6 +sidebar_label: Decimal +--- + +# Decimal, Decimal(P), Decimal(P, S), Decimal32(S), Decimal64(S), Decimal128(S), Decimal256(S) + +符å·ä»˜ãã®å›ºå®šå°æ•°ç‚¹æ•°ã§ã€åŠ ç®—ã€æ¸›ç®—ã€ä¹—ç®—ã®éš›ã«ç²¾åº¦ã‚’ä¿æŒã—ã¾ã™ã€‚除算ã§ã¯ã€å°æ•°éƒ¨åˆ†ã®æœ€ä¸‹ä½æ¡ãŒåˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆå››æ¨äº”å…¥ã—ã¾ã›ã‚“)。 + +## パラメータ + +- P - 精度。 有効範囲: \[ 1 : 76 \]。数値ãŒæŒã¤ã“ã¨ãŒã§ãã‚‹10進数ã®æ¡æ•°ï¼ˆå°æ•°éƒ¨ã‚’å«ã‚€ï¼‰ã‚’決定ã—ã¾ã™ã€‚デフォルトã§ã¯ã€ç²¾åº¦ã¯10ã§ã™ã€‚ +- S - スケール。 有効範囲: \[ 0 : P \]。å°æ•°éƒ¨ãŒæŒã¤ã“ã¨ãŒã§ãã‚‹10進数ã®æ¡æ•°ã‚’決定ã—ã¾ã™ã€‚ + +Decimal(P)ã¯Decimal(P, 0)ã¨åŒç­‰ã§ã™ã€‚åŒæ§˜ã«ã€Decimalã¨ã„ã†æ§‹æ–‡ã¯Decimal(10, 0)ã¨åŒç­‰ã§ã™ã€‚ + +Pパラメータ値ã«å¿œã˜ã¦ã€Decimal(P, S)ã¯ä»¥ä¸‹ã®ä»£æ›¿è¡¨è¨˜ãŒã‚ã‚Šã¾ã™: +- P㌠\[ 1 : 9 \] ã®å ´åˆ - Decimal32(S) +- P㌠\[ 10 : 18 \] ã®å ´åˆ - Decimal64(S) +- P㌠\[ 19 : 38 \] ã®å ´åˆ - Decimal128(S) +- P㌠\[ 39 : 76 \] ã®å ´åˆ - Decimal256(S) + +## Decimal 値ã®ç¯„囲 + +- Decimal32(S) - ( -1 \* 10^(9 - S), 1 \* 10^(9 - S) ) +- Decimal64(S) - ( -1 \* 10^(18 - S), 1 \* 10^(18 - S) ) +- Decimal128(S) - ( -1 \* 10^(38 - S), 1 \* 10^(38 - S) ) +- Decimal256(S) - ( -1 \* 10^(76 - S), 1 \* 10^(76 - S) ) + +例ãˆã°ã€Decimal32(4) 㯠-99999.9999 ã‹ã‚‰ 99999.9999 ã¾ã§ã®æ•°å€¤ã‚’0.0001å˜ä½ã§å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## å†…éƒ¨è¡¨ç¾ + +内部的ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯ãã‚Œãžã‚Œã®ãƒ“ット幅をæŒã¤é€šå¸¸ã®ç¬¦å·ä»˜ãæ•´æ•°ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚メモリã«æ ¼ç´å¯èƒ½ãªå®Ÿéš›ã®å€¤ã®ç¯„囲ã¯ä¸Šè¨˜ã‚ˆã‚Šå°‘ã—大ããã€æ–‡å­—列ã‹ã‚‰ã®å¤‰æ›æ™‚ã«ã®ã¿ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ + +ç¾ä»£ã®CPUã¯128ビットã¨256ビットã®æ•´æ•°ã‚’ãƒã‚¤ãƒ†ã‚£ãƒ–ã«ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ãŸã‚ã€Decimal128ãŠã‚ˆã³Decimal256ã®æ“作ã¯ã‚¨ãƒŸãƒ¥ãƒ¬ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€Decimal128ãŠã‚ˆã³Decimal256ã¯Decimal32/Decimal64よりもã‹ãªã‚Šé…ã動作ã—ã¾ã™ã€‚ + +## 演算ã¨çµæžœã®åž‹ + +Decimalã«å¯¾ã™ã‚‹äºŒé …演算ã¯ã€ã‚ˆã‚Šå¹…広ã„çµæžœåž‹ã¨ãªã‚Šã¾ã™ï¼ˆå¼•æ•°ã®é †åºã«ã‹ã‹ã‚らãšï¼‰ã€‚ + +- `Decimal64(S1) Decimal32(S2) -> Decimal64(S)` +- `Decimal128(S1) Decimal32(S2) -> Decimal128(S)` +- `Decimal128(S1) Decimal64(S2) -> Decimal128(S)` +- `Decimal256(S1) Decimal<32|64|128>(S2) -> Decimal256(S)` + +スケールã®ãƒ«ãƒ¼ãƒ«: + +- 加算ã€æ¸›ç®—: S = max(S1, S2)。 +- ä¹—ç®—: S = S1 + S2。 +- 除算: S = S1。 + +Decimalã¨æ•´æ•°ã®é–“ã§ã®é¡žä¼¼æ¼”ç®—ã®å ´åˆã€çµæžœã¯å¼•æ•°ã¨åŒã˜ã‚µã‚¤ã‚ºã®Decimalã«ãªã‚Šã¾ã™ã€‚ + +Decimalã¨Float32/Float64ã®é–“ã®æ¼”ç®—ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。ãれらãŒå¿…è¦ãªå ´åˆã¯ã€toDecimal32ã€toDecimal64ã€toDecimal128 ã‚ã‚‹ã„㯠toFloat32ã€toFloat64ã¨ã„ã†çµ„ã¿è¾¼ã¿é–¢æ•°ã§ã©ã¡ã‚‰ã‹ã®å¼•æ•°ã‚’明示的ã«ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€çµæžœã¯ç²¾åº¦ã‚’失ã„ã€åž‹å¤‰æ›ã¯è¨ˆç®—コストã®é«˜ã„æ“作ã§ã‚ã‚‹ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 + +一部ã®Decimal関数ã®çµæžœã¯Float64ã¨ã—ã¦è¿”ã•ã‚Œã¾ã™ï¼ˆä¾‹ãˆã°ã€varã‚„stddev)。中間計算ã¯ä¾ç„¶ã¨ã—ã¦Decimalã§å®Ÿè¡Œã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€Float64ã¨åŒã˜å€¤ã§Decimal入力を行ã£ãŸå ´åˆã«ç•°ãªã‚‹çµæžœãŒç”Ÿæˆã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +## オーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãƒã‚§ãƒƒã‚¯ + +Decimalã®è¨ˆç®—中ã«æ•´æ•°ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚å°æ•°éƒ¨ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆå››æ¨äº”å…¥ã—ã¾ã›ã‚“)。整数部ã®éŽå‰°ãªæ¡ã¯ä¾‹å¤–を引ãèµ·ã“ã—ã¾ã™ã€‚ + +:::warning +オーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãƒã‚§ãƒƒã‚¯ã¯Decimal128ãŠã‚ˆã³Decimal256ã«å¯¾ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã›ã‚“。オーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã€ä¸æ­£ç¢ºãªçµæžœãŒè¿”ã•ã‚Œã€ä¾‹å¤–ã¯æŠ•ã’られã¾ã›ã‚“。 +::: + +``` sql +SELECT toDecimal32(2, 4) AS x, x / 3 +``` + +``` text +┌──────x─┬─divide(toDecimal32(2, 4), 3)─┠+│ 2.0000 │ 0.6666 │ +└────────┴──────────────────────────────┘ +``` + +``` sql +SELECT toDecimal32(4.2, 8) AS x, x * x +``` + +``` text +DB::Exception: Scale is out of bounds. +``` + +``` sql +SELECT toDecimal32(4.2, 8) AS x, 6 * x +``` + +``` text +DB::Exception: Decimal math overflow. +``` + +オーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãƒã‚§ãƒƒã‚¯ã¯æ¼”ç®—ã®é€Ÿåº¦ã‚’é…ãã—ã¾ã™ã€‚オーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ãªã„ã“ã¨ãŒã‚ã‹ã£ã¦ã„ã‚‹å ´åˆã¯ã€`decimal_check_overflow`設定を使用ã—ã¦ãƒã‚§ãƒƒã‚¯ã‚’無効ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ãƒã‚§ãƒƒã‚¯ã‚’無効ã«ã—ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹ã¨ã€çµæžœã¯ä¸æ­£ç¢ºã«ãªã‚Šã¾ã™ã€‚ + +``` sql +SET decimal_check_overflow = 0; +SELECT toDecimal32(4.2, 8) AS x, 6 * x +``` + +``` text +┌──────────x─┬─multiply(6, toDecimal32(4.2, 8))─┠+│ 4.20000000 │ -17.74967296 │ +└────────────┴──────────────────────────────────┘ +``` + +オーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãƒã‚§ãƒƒã‚¯ã¯ç®—術演算ã ã‘ã§ãªãã€å€¤ã®æ¯”較ã§ã‚‚発生ã—ã¾ã™ã€‚ + +``` sql +SELECT toDecimal32(1, 8) < 100 +``` + +``` text +DB::Exception: Can't compare. +``` + +**関連項目** +- [isDecimalOverflow](../../sql-reference/functions/other-functions.md#is-decimal-overflow) +- [countDigits](../../sql-reference/functions/other-functions.md#count-digits) diff --git a/docs/ja/sql-reference/data-types/domains/index.md b/docs/ja/sql-reference/data-types/domains/index.md new file mode 100644 index 00000000000..dc6a71fbba6 --- /dev/null +++ b/docs/ja/sql-reference/data-types/domains/index.md @@ -0,0 +1,29 @@ +--- +slug: /ja/sql-reference/data-types/domains/ +sidebar_position: 56 +sidebar_label: ドメイン +--- + +# ドメイン + +ドメインã¯ã€æ—¢å­˜ã®åŸºæœ¬åž‹ã«ã„ãã¤ã‹ã®è¿½åŠ æ©Ÿèƒ½ã‚’æŒãŸã›ãŸç‰¹åˆ¥ãªåž‹ã§ã‚ã‚Šã€åŸºç›¤ã¨ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã®ã‚ªãƒ³ãƒ¯ã‚¤ãƒ¤ãŠã‚ˆã³ã‚ªãƒ³ãƒ‡ã‚£ã‚¹ã‚¯å½¢å¼ã‚’ä¿æŒã—ã¾ã™ã€‚ç¾æ™‚点ã§ã€ClickHouseã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©ãƒ‰ãƒ¡ã‚¤ãƒ³ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。 + +ドメインã¯ã€å¯¾å¿œã™ã‚‹åŸºæœ¬åž‹ãŒä½¿ç”¨ã§ãã‚‹ã™ã¹ã¦ã®å ´æ‰€ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ãŸã¨ãˆã°ï¼š + +- ドメイン型ã®ã‚«ãƒ©ãƒ ã‚’ä½œæˆ +- ドメインカラムã‹ã‚‰/ã¸å€¤ã‚’読ã¿æ›¸ã +- 基本型ãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ã—ã¦ä½¿ç”¨ã§ãã‚‹å ´åˆã«ã¯ãれをインデックスã¨ã—ã¦ä½¿ç”¨ +- ドメインカラムã®å€¤ã‚’使ã£ã¦é–¢æ•°ã‚’呼ã³å‡ºã— + +### ドメインã®è¿½åŠ æ©Ÿèƒ½ + +- `SHOW CREATE TABLE` ã¾ãŸã¯ `DESCRIBE TABLE` ã§ã®æ˜Žç¤ºçš„ãªã‚«ãƒ©ãƒ åž‹å +- `INSERT INTO domain_table(domain_column) VALUES(...)` を用ã„ãŸäººé–“ã«å„ªã—ã„フォーマットã‹ã‚‰ã®å…¥åŠ› +- `SELECT domain_column FROM domain_table` ã®ãŸã‚ã®äººé–“ã«å„ªã—ã„フォーマットã¸ã®å‡ºåŠ› +- 外部ソースã‹ã‚‰äººé–“ã«å„ªã—ã„フォーマットã§ãƒ‡ãƒ¼ã‚¿ã‚’ロード: `INSERT INTO domain_table FORMAT CSV ...` + +### 制é™äº‹é … + +- 基本型ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚«ãƒ©ãƒ ã‚’ `ALTER TABLE` ã§ãƒ‰ãƒ¡ã‚¤ãƒ³åž‹ã«å¤‰æ›ã§ãã¾ã›ã‚“。 +- 別ã®ã‚«ãƒ©ãƒ ã‚„テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹éš›ã«ã€æ–‡å­—列値をドメイン値ã«æš—黙的ã«å¤‰æ›ã§ãã¾ã›ã‚“。 +- ドメインã¯ã€ä¿å­˜ã•ã‚ŒãŸå€¤ã«å¯¾ã—ã¦åˆ¶ç´„を追加ã—ã¾ã›ã‚“。 diff --git a/docs/ja/sql-reference/data-types/dynamic.md b/docs/ja/sql-reference/data-types/dynamic.md new file mode 100644 index 00000000000..e04531be596 --- /dev/null +++ b/docs/ja/sql-reference/data-types/dynamic.md @@ -0,0 +1,705 @@ +--- +slug: /ja/sql-reference/data-types/dynamic +sidebar_position: 62 +sidebar_label: Dynamic +--- + +# Dynamic + +ã“ã®åž‹ã¯ã€äº‹å‰ã«ã™ã¹ã¦ã‚’知るã“ã¨ãªãã€ä»»æ„ã®åž‹ã®å€¤ã‚’内部ã«æ ¼ç´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`Dynamic` åž‹ã®ã‚«ãƒ©ãƒ ã‚’宣言ã™ã‚‹ã«ã¯ã€æ¬¡ã®æ§‹æ–‡ã‚’使用ã—ã¾ã™: + +``` sql + Dynamic(max_types=N) +``` + +ã“ã“ã§ã€`N` ã¯ä»»æ„ã®ãƒ‘ラメータã§ã€`0`ã‹ã‚‰`254`ã¾ã§ã®ç¯„囲内ã§æŒ‡å®šã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€`Dynamic` åž‹ã®ã‚«ãƒ©ãƒ å†…ã§ã€åˆ¥ã€…ã«æ ¼ç´ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®å˜ä¸€ãƒ–ロック(例ãˆã°ã€MergeTree テーブルã®å˜ä¸€ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ï¼‰ã«ã‚ãŸã£ã¦ã€ã„ãã¤ã®ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã‚’個別ã®ã‚µãƒ–カラムã¨ã—ã¦æ ¼ç´ã§ãã‚‹ã‹ã‚’示ã—ã¾ã™ã€‚ã“ã®åˆ¶é™ã‚’超ãˆã‚‹ã¨ã€æ–°ã—ã„åž‹ã®ã™ã¹ã¦ã®å€¤ã¯ãƒã‚¤ãƒŠãƒªå½¢å¼ã®ç‰¹åˆ¥ãªå…±æœ‰ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã«ä¸€ç·’ã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚`max_types` ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ `32` ã§ã™ã€‚ + +:::note +Dynamic データ型ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã§ã™ã€‚使用ã™ã‚‹ã«ã¯ã€`allow_experimental_dynamic_type = 1` を設定ã—ã¦ãã ã•ã„。 +::: + +## Dynamicã®ä½œæˆ + +テーブルカラムã®å®šç¾©ã§ `Dynamic` 型を使用ã—ã¾ã™ï¼š + +```sql +CREATE TABLE test (d Dynamic) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('Hello, World!'), ([1, 2, 3]); +SELECT d, dynamicType(d) FROM test; +``` + +```text +┌─d─────────────┬─dynamicType(d)─┠+│ á´ºáµá´¸á´¸ │ None │ +│ 42 │ Int64 │ +│ Hello, World! │ String │ +│ [1,2,3] │ Array(Int64) │ +└───────────────┴────────────────┘ +``` + +通常ã®ã‚«ãƒ©ãƒ ã‹ã‚‰CASTを使用: + +```sql +SELECT 'Hello, World!'::Dynamic as d, dynamicType(d); +``` + +```text +┌─d─────────────┬─dynamicType(d)─┠+│ Hello, World! │ String │ +└───────────────┴────────────────┘ +``` + +`Variant` カラムã‹ã‚‰CASTを使用: + +```sql +SET allow_experimental_variant_type = 1, use_variant_as_common_type = 1; +SELECT multiIf((number % 3) = 0, number, (number % 3) = 1, range(number + 1), NULL)::Dynamic AS d, dynamicType(d) FROM numbers(3) +``` + +```text +┌─d─────┬─dynamicType(d)─┠+│ 0 │ UInt64 │ +│ [0,1] │ Array(UInt64) │ +│ á´ºáµá´¸á´¸ │ None │ +└───────┴────────────────┘ +``` + + +## Dynamicã®ãƒã‚¹ãƒˆã•ã‚ŒãŸåž‹ã‚’サブカラムã¨ã—ã¦èª­ã‚€ + +`Dynamic` åž‹ã¯ã€åž‹åをサブカラムã¨ã—ã¦ä½¿ç”¨ã—ã¦ã€`Dynamic` カラムã‹ã‚‰å˜ä¸€ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸåž‹ã‚’読むã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +ã—ãŸãŒã£ã¦ã€ã‚«ãƒ©ãƒ  `d Dynamic` ãŒã‚ã‚‹å ´åˆã€æœ‰åŠ¹ãªåž‹ `T` ã®ã‚µãƒ–カラムを `d.T` ã¨ã„ã†æ§‹æ–‡ã§èª­ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ +ã“ã®ã‚µãƒ–カラム㯠`Nullable(T)` タイプをæŒã¡ã€`T` ㌠`Nullable` 内ã«ã‚ã‚‹å ´åˆã¯ãã†ã§ã‚ã‚Šã€ä»–ã®å ´åˆã¯ `T` ã§ã™ã€‚ã“ã®ã‚µãƒ–カラムã¯å…ƒã® `Dynamic` カラムã¨åŒã˜ã‚µã‚¤ã‚ºã§ã€ +元㮠`Dynamic` カラムã«åž‹ `T` ãŒãªã„ã™ã¹ã¦ã®è¡Œã« `NULL` 値(ã¾ãŸã¯ `T` ㌠`Nullable` 内ã«ã‚ã‚‹ã“ã¨ãŒã§ããªã„å ´åˆã¯ç©ºã®å€¤ï¼‰ã‚’å«ã¿ã¾ã™ã€‚ + +`Dynamic` サブカラム㯠`dynamicElement(dynamic_column, type_name)` 関数を使用ã—ã¦ã‚‚読むã“ã¨ãŒã§ãã¾ã™ã€‚ + +例: + +```sql +CREATE TABLE test (d Dynamic) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('Hello, World!'), ([1, 2, 3]); +SELECT d, dynamicType(d), d.String, d.Int64, d.`Array(Int64)`, d.Date, d.`Array(String)` FROM test; +``` + +```text +┌─d─────────────┬─dynamicType(d)─┬─d.String──────┬─d.Int64─┬─d.Array(Int64)─┬─d.Date─┬─d.Array(String)─┠+│ á´ºáµá´¸á´¸ │ None │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [] │ á´ºáµá´¸á´¸ │ [] │ +│ 42 │ Int64 │ á´ºáµá´¸á´¸ │ 42 │ [] │ á´ºáµá´¸á´¸ │ [] │ +│ Hello, World! │ String │ Hello, World! │ á´ºáµá´¸á´¸ │ [] │ á´ºáµá´¸á´¸ │ [] │ +│ [1,2,3] │ Array(Int64) │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [1,2,3] │ á´ºáµá´¸á´¸ │ [] │ +└───────────────┴────────────────┴───────────────┴─────────┴────────────────┴────────┴─────────────────┘ +``` + +```sql +SELECT toTypeName(d.String), toTypeName(d.Int64), toTypeName(d.`Array(Int64)`), toTypeName(d.Date), toTypeName(d.`Array(String)`) FROM test LIMIT 1; +``` + +```text +┌─toTypeName(d.String)─┬─toTypeName(d.Int64)─┬─toTypeName(d.Array(Int64))─┬─toTypeName(d.Date)─┬─toTypeName(d.Array(String))─┠+│ Nullable(String) │ Nullable(Int64) │ Array(Int64) │ Nullable(Date) │ Array(String) │ +└──────────────────────┴─────────────────────┴────────────────────────────┴────────────────────┴─────────────────────────────┘ +``` + +```sql +SELECT d, dynamicType(d), dynamicElement(d, 'String'), dynamicElement(d, 'Int64'), dynamicElement(d, 'Array(Int64)'), dynamicElement(d, 'Date'), dynamicElement(d, 'Array(String)') FROM test; +``` + +```text +┌─d─────────────┬─dynamicType(d)─┬─dynamicElement(d, 'String')─┬─dynamicElement(d, 'Int64')─┬─dynamicElement(d, 'Array(Int64)')─┬─dynamicElement(d, 'Date')─┬─dynamicElement(d, 'Array(String)')─┠+│ á´ºáµá´¸á´¸ │ None │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [] │ á´ºáµá´¸á´¸ │ [] │ +│ 42 │ Int64 │ á´ºáµá´¸á´¸ │ 42 │ [] │ á´ºáµá´¸á´¸ │ [] │ +│ Hello, World! │ String │ Hello, World! │ á´ºáµá´¸á´¸ │ [] │ á´ºáµá´¸á´¸ │ [] │ +│ [1,2,3] │ Array(Int64) │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [1,2,3] │ á´ºáµá´¸á´¸ │ [] │ +└───────────────┴────────────────┴─────────────────────────────┴────────────────────────────┴───────────────────────────────────┴───────────────────────────┴────────────────────────────────────┘ +``` + +å„è¡Œã«æ ¼ç´ã•ã‚Œã¦ã„ã‚‹ãƒãƒªã‚¢ãƒ³ãƒˆã‚’知るãŸã‚ã«ã¯ã€é–¢æ•° `dynamicType(dynamic_column)` を使用ã§ãã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€å„è¡Œã®å€¤åž‹åã‚’ `String` ã§è¿”ã—ã¾ã™ï¼ˆè¡ŒãŒ `NULL` ã®å ´åˆã¯ `'None'` ã‚’è¿”ã—ã¾ã™ï¼‰ã€‚ + +例: + +```sql +CREATE TABLE test (d Dynamic) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('Hello, World!'), ([1, 2, 3]); +SELECT dynamicType(d) from test; +``` + +```text +┌─dynamicType(d)─┠+│ None │ +│ Int64 │ +│ String │ +│ Array(Int64) │ +└────────────────┘ +``` + +## Dynamicカラムã¨ä»–ã®ã‚«ãƒ©ãƒ é–“ã®å¤‰æ› + +`Dynamic` カラムã«é–¢ã—ã¦ã¯ã€4ã¤ã®å¯èƒ½ãªå¤‰æ›ãŒã‚ã‚Šã¾ã™ã€‚ + +### 通常ã®ã‚«ãƒ©ãƒ ã‚’Dynamicカラムã«å¤‰æ› + +```sql +SELECT 'Hello, World!'::Dynamic as d, dynamicType(d); +``` + +```text +┌─d─────────────┬─dynamicType(d)─┠+│ Hello, World! │ String │ +└───────────────┴────────────────┘ +``` + +### StringカラムをDynamicカラムã«å¤‰æ›ã—ã¦è§£æž + +`String` カラムã‹ã‚‰ `Dynamic` åž‹ã®å€¤ã‚’解æžã™ã‚‹ã«ã¯ã€`cast_string_to_dynamic_use_inference` を有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```sql +SET cast_string_to_dynamic_use_inference = 1; +SELECT CAST(materialize(map('key1', '42', 'key2', 'true', 'key3', '2020-01-01')), 'Map(String, Dynamic)') as map_of_dynamic, mapApply((k, v) -> (k, dynamicType(v)), map_of_dynamic) as map_of_dynamic_types; +``` + +```text +┌─map_of_dynamic──────────────────────────────┬─map_of_dynamic_types─────────────────────────┠+│ {'key1':42,'key2':true,'key3':'2020-01-01'} │ {'key1':'Int64','key2':'Bool','key3':'Date'} │ +└─────────────────────────────────────────────┴──────────────────────────────────────────────┘ +``` + +### Dynamicカラムを通常ã®ã‚«ãƒ©ãƒ ã«å¤‰æ› + +`Dynamic` カラムを通常ã®ã‚«ãƒ©ãƒ ã«å¤‰æ›ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã“ã®å ´åˆã€ã™ã¹ã¦ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸåž‹ã¯ç›®çš„åž‹ã«å¤‰æ›ã•ã‚Œã¾ã™: + +```sql +CREATE TABLE test (d Dynamic) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('42.42'), (true), ('e10'); +SELECT d::Nullable(Float64) FROM test; +``` + +```text +┌─CAST(d, 'Nullable(Float64)')─┠+│ á´ºáµá´¸á´¸ │ +│ 42 │ +│ 42.42 │ +│ 1 │ +│ 0 │ +└──────────────────────────────┘ +``` + +### VariantカラムをDynamicカラムã«å¤‰æ› + +```sql +CREATE TABLE test (v Variant(UInt64, String, Array(UInt64))) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('String'), ([1, 2, 3]); +SELECT v::Dynamic as d, dynamicType(d) from test; +``` + +```text +┌─d───────┬─dynamicType(d)─┠+│ á´ºáµá´¸á´¸ │ None │ +│ 42 │ UInt64 │ +│ String │ String │ +│ [1,2,3] │ Array(UInt64) │ +└─────────┴────────────────┘ +``` + +### Dynamic(max_types=N)カラムを別ã®Dynamic(max_types=K)ã«å¤‰æ› + +ã‚‚ã— `K >= N` ã®å ´åˆã€å¤‰æ›ä¸­ã«ãƒ‡ãƒ¼ã‚¿ã¯å¤‰ã‚ã‚Šã¾ã›ã‚“: + +```sql +CREATE TABLE test (d Dynamic(max_types=3)) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), (43), ('42.42'), (true); +SELECT d::Dynamic(max_types=5) as d2, dynamicType(d2) FROM test; +``` + +```text +┌─d─────┬─dynamicType(d)─┠+│ á´ºáµá´¸á´¸ │ None │ +│ 42 │ Int64 │ +│ 43 │ Int64 │ +│ 42.42 │ String │ +│ true │ Bool │ +└───────┴────────────────┘ +``` + +ã‚‚ã— `K < N` ã®å ´åˆã€æœ€ã‚‚希少ãªåž‹ã®å€¤ãŒå˜ä¸€ã®ç‰¹åˆ¥ãªã‚µãƒ–カラムã«æŒ¿å…¥ã•ã‚Œã¾ã™ãŒã€ä¾ç„¶ã¨ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ï¼š +```text +CREATE TABLE test (d Dynamic(max_types=4)) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), (43), ('42.42'), (true), ([1, 2, 3]); +SELECT d, dynamicType(d), d::Dynamic(max_types=2) as d2, dynamicType(d2), isDynamicElementInSharedData(d2) FROM test; +``` + +```text +┌─d───────┬─dynamicType(d)─┬─d2──────┬─dynamicType(d2)─┬─isDynamicElementInSharedData(d2)─┠+│ á´ºáµá´¸á´¸ │ None │ á´ºáµá´¸á´¸ │ None │ false │ +│ 42 │ Int64 │ 42 │ Int64 │ false │ +│ 43 │ Int64 │ 43 │ Int64 │ false │ +│ 42.42 │ String │ 42.42 │ String │ false │ +│ true │ Bool │ true │ Bool │ true │ +│ [1,2,3] │ Array(Int64) │ [1,2,3] │ Array(Int64) │ true │ +└─────────┴────────────────┴─────────┴─────────────────┴──────────────────────────────────┘ +``` + +関数 `isDynamicElementInSharedData` 㯠`Dynamic` 内ã«ç‰¹åˆ¥ãªå…±æœ‰ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã§æ ¼ç´ã•ã‚Œã¦ã„ã‚‹è¡Œã«å¯¾ã—ã¦ã¯ `true` ã‚’è¿”ã—ã€çµæžœçš„ã«ã‚«ãƒ©ãƒ ã¯ãƒ‡ãƒ¼ã‚¿æ§‹é€ å†…ã«æ ¼ç´ã•ã‚Œã¦ã„ãªã„2ã¤ã®åž‹ã®ã¿ã‚’å«ã¿ã¾ã™ã€‚ + +ã‚‚ã— `K=0` ã®å ´åˆã€ã™ã¹ã¦ã®åž‹ã¯å˜ä¸€ã®ç‰¹åˆ¥ãªã‚µãƒ–カラムã«æŒ¿å…¥ã•ã‚Œã¾ã™ï¼š + +```text +CREATE TABLE test (d Dynamic(max_types=4)) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), (43), ('42.42'), (true), ([1, 2, 3]); +SELECT d, dynamicType(d), d::Dynamic(max_types=0) as d2, dynamicType(d2), isDynamicElementInSharedData(d2) FROM test; +``` + +```text +┌─d───────┬─dynamicType(d)─┬─d2──────┬─dynamicType(d2)─┬─isDynamicElementInSharedData(d2)─┠+│ á´ºáµá´¸á´¸ │ None │ á´ºáµá´¸á´¸ │ None │ false │ +│ 42 │ Int64 │ 42 │ Int64 │ true │ +│ 43 │ Int64 │ 43 │ Int64 │ true │ +│ 42.42 │ String │ 42.42 │ String │ true │ +│ true │ Bool │ true │ Bool │ true │ +│ [1,2,3] │ Array(Int64) │ [1,2,3] │ Array(Int64) │ true │ +└─────────┴────────────────┴─────────┴─────────────────┴──────────────────────────────────┘ +``` + +## データã‹ã‚‰Dynamic型を読ã¿å–ã‚‹ + +ã™ã¹ã¦ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆï¼ˆTSVã€CSVã€CustomSeparatedã€Valuesã€JSONEachRowãªã©ï¼‰ã¯ã€`Dynamic` åž‹ã®èª­ã¿å–りをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚データ解æžä¸­ã€ClickHouseã¯å„値ã®åž‹ã‚’推測ã—ã€ãれを `Dynamic` カラムã¸ã®æŒ¿å…¥æ™‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +例: + +```sql +SELECT + d, + dynamicType(d), + dynamicElement(d, 'String') AS str, + dynamicElement(d, 'Int64') AS num, + dynamicElement(d, 'Float64') AS float, + dynamicElement(d, 'Date') AS date, + dynamicElement(d, 'Array(Int64)') AS arr +FROM format(JSONEachRow, 'd Dynamic', $$ +{"d" : "Hello, World!"}, +{"d" : 42}, +{"d" : 42.42}, +{"d" : "2020-01-01"}, +{"d" : [1, 2, 3]} +$$) +``` + +```text +┌─d─────────────┬─dynamicType(d)─┬─str───────────┬──num─┬─float─┬───────date─┬─arr─────┠+│ Hello, World! │ String │ Hello, World! │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [] │ +│ 42 │ Int64 │ á´ºáµá´¸á´¸ │ 42 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [] │ +│ 42.42 │ Float64 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 42.42 │ á´ºáµá´¸á´¸ │ [] │ +│ 2020-01-01 │ Date │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 2020-01-01 │ [] │ +│ [1,2,3] │ Array(Int64) │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [1,2,3] │ +└───────────────┴────────────────┴───────────────┴──────┴───────┴────────────┴─────────┘ +``` + +## 関数ã§Dynamic型を使用ã™ã‚‹ + +ã»ã¨ã‚“ã©ã®é–¢æ•°ã¯ `Dynamic` åž‹ã®å¼•æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã®å ´åˆã€é–¢æ•°ã¯ `Dynamic` カラム内ã«æ ¼ç´ã•ã‚Œã¦ã„ã‚‹å„内部データ型ã«å¯¾ã—ã¦å€‹åˆ¥ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +関数ã®çµæžœåž‹ãŒå¼•æ•°åž‹ã«ä¾å­˜ã™ã‚‹å ´åˆã€`Dynamic` 引数ã§å®Ÿè¡Œã•ã‚ŒãŸé–¢æ•°ã®çµæžœã¯ `Dynamic` ã«ãªã‚Šã¾ã™ã€‚関数ã®çµæžœåž‹ãŒå¼•æ•°åž‹ã«ä¾å­˜ã—ãªã„å ´åˆã€çµæžœã¯ã“ã®é–¢æ•°ã®é€šå¸¸ã®çµæžœåž‹ `T` ã® `Nullable(T)` ã«ãªã‚Šã¾ã™ã€‚ + +例: + +```sql +CREATE TABLE test (d Dynamic) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (1::Int8), (2::Int16), (3::Int32), (4::Int64); +``` + +```sql +SELECT d, dynamicType(d) FROM test; +``` + +```text +┌─d────┬─dynamicType(d)─┠+│ á´ºáµá´¸á´¸ │ None │ +│ 1 │ Int8 │ +│ 2 │ Int16 │ +│ 3 │ Int32 │ +│ 4 │ Int64 │ +└──────┴────────────────┘ +``` + +```sql +SELECT d, d + 1 AS res, toTypeName(res), dynamicType(res) FROM test; +``` + +```text +┌─d────┬─res──┬─toTypeName(res)─┬─dynamicType(res)─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ Dynamic │ None │ +│ 1 │ 2 │ Dynamic │ Int16 │ +│ 2 │ 3 │ Dynamic │ Int32 │ +│ 3 │ 4 │ Dynamic │ Int64 │ +│ 4 │ 5 │ Dynamic │ Int64 │ +└──────┴──────┴─────────────────┴──────────────────┘ +``` + +```sql +SELECT d, d + d AS res, toTypeName(res), dynamicType(res) FROM test; +``` + +```text +┌─d────┬─res──┬─toTypeName(res)─┬─dynamicType(res)─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ Dynamic │ None │ +│ 1 │ 2 │ Dynamic │ Int16 │ +│ 2 │ 4 │ Dynamic │ Int32 │ +│ 3 │ 6 │ Dynamic │ Int64 │ +│ 4 │ 8 │ Dynamic │ Int64 │ +└──────┴──────┴─────────────────┴──────────────────┘ +``` + +```sql +SELECT d, d < 3 AS res, toTypeName(res) FROM test; +``` + +```text +┌─d────┬──res─┬─toTypeName(res)─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ Nullable(UInt8) │ +│ 1 │ 1 │ Nullable(UInt8) │ +│ 2 │ 1 │ Nullable(UInt8) │ +│ 3 │ 0 │ Nullable(UInt8) │ +│ 4 │ 0 │ Nullable(UInt8) │ +└──────┴──────┴─────────────────┘ +``` + +```sql +SELECT d, exp2(d) AS res, toTypeName(res) FROM test; +``` + +```sql +┌─d────┬──res─┬─toTypeName(res)───┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ Nullable(Float64) │ +│ 1 │ 2 │ Nullable(Float64) │ +│ 2 │ 4 │ Nullable(Float64) │ +│ 3 │ 8 │ Nullable(Float64) │ +│ 4 │ 16 │ Nullable(Float64) │ +└──────┴──────┴───────────────────┘ +``` + +```sql +TRUNCATE TABLE test; +INSERT INTO test VALUES (NULL), ('str_1'), ('str_2'); +SELECT d, dynamicType(d) FROM test; +``` + +```text +┌─d─────┬─dynamicType(d)─┠+│ á´ºáµá´¸á´¸ │ None │ +│ str_1 │ String │ +│ str_2 │ String │ +└───────┴────────────────┘ +``` + +```sql +SELECT d, upper(d) AS res, toTypeName(res) FROM test; +``` + +```text +┌─d─────┬─res───┬─toTypeName(res)──┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ Nullable(String) │ +│ str_1 │ STR_1 │ Nullable(String) │ +│ str_2 │ STR_2 │ Nullable(String) │ +└───────┴───────┴──────────────────┘ +``` + +```sql +SELECT d, extract(d, '([0-3])') AS res, toTypeName(res) FROM test; +``` + +```text +┌─d─────┬─res──┬─toTypeName(res)──┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ Nullable(String) │ +│ str_1 │ 1 │ Nullable(String) │ +│ str_2 │ 2 │ Nullable(String) │ +└───────┴──────┴──────────────────┘ +``` + +```sql +TRUNCATE TABLE test; +INSERT INTO test VALUES (NULL), ([1, 2]), ([3, 4]); +SELECT d, dynamicType(d) FROM test; +``` + +```text +┌─d─────┬─dynamicType(d)─┠+│ á´ºáµá´¸á´¸ │ None │ +│ [1,2] │ Array(Int64) │ +│ [3,4] │ Array(Int64) │ +└───────┴────────────────┘ +``` + +```sql +SELECT d, d[1] AS res, toTypeName(res), dynamicType(res) FROM test; +``` + +```text +┌─d─────┬─res──┬─toTypeName(res)─┬─dynamicType(res)─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ Dynamic │ None │ +│ [1,2] │ 1 │ Dynamic │ Int64 │ +│ [3,4] │ 3 │ Dynamic │ Int64 │ +└───────┴──────┴─────────────────┴──────────────────┘ +``` + +関数㌠`Dynamic` カラムã®ä¸€éƒ¨ã®åž‹ã§å®Ÿè¡Œã§ããªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ï¼š + +```sql +INSERT INTO test VALUES (42), (43), ('str_1'); +SELECT d, dynamicType(d) FROM test; +``` + +```text +┌─d─────┬─dynamicType(d)─┠+│ 42 │ Int64 │ +│ 43 │ Int64 │ +│ str_1 │ String │ +└───────┴────────────────┘ +``` + +```sql +SELECT d, d + 1 AS res, toTypeName(res), dynamicType(d) FROM test; +``` + +```text +Received exception: +Code: 43. DB::Exception: Illegal types Array(Int64) and UInt8 of arguments of function plus: while executing 'FUNCTION plus(__table1.d : 3, 1_UInt8 :: 1) -> plus(__table1.d, 1_UInt8) Dynamic : 0'. (ILLEGAL_TYPE_OF_ARGUMENT) +``` + +ä¸è¦ãªåž‹ã‚’除外ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +SELECT d, d + 1 AS res, toTypeName(res), dynamicType(res) FROM test WHERE dynamicType(d) NOT IN ('String', 'Array(Int64)', 'None') +``` + +```text +┌─d──┬─res─┬─toTypeName(res)─┬─dynamicType(res)─┠+│ 42 │ 43 │ Dynamic │ Int64 │ +│ 43 │ 44 │ Dynamic │ Int64 │ +└────┴─────┴─────────────────┴──────────────────┘ +``` + +ã¾ãŸã¯å¿…è¦ãªåž‹ã‚’サブカラムã¨ã—ã¦æŠ½å‡ºï¼š + +```sql +SELECT d, d.Int64 + 1 AS res, toTypeName(res) FROM test; +``` + +```text +┌─d─────┬──res─┬─toTypeName(res)─┠+│ 42 │ 43 │ Nullable(Int64) │ +│ 43 │ 44 │ Nullable(Int64) │ +│ str_1 │ á´ºáµá´¸á´¸ │ Nullable(Int64) │ +└───────┴──────┴─────────────────┘ +``` + +## ORDER BY 㨠GROUP BY 㧠Dynamic 型を使用ã™ã‚‹ + +`ORDER BY` 㨠`GROUP BY` 時ã€`Dynamic` åž‹ã®å€¤ã¯ `Variant` åž‹ã®å€¤ã¨åŒæ§˜ã«æ¯”較ã•ã‚Œã¾ã™ï¼š +åž‹ `Dynamic` ã®å€¤ `d1` ã®åŸºç¤Žã¨ãªã‚‹åž‹ `T1` 㨠`d2` ã®åŸºç¤Žã¨ãªã‚‹åž‹ `T2` ã«å¯¾ã™ã‚‹æ¼”ç®—å­ `<` ã®çµæžœã¯æ¬¡ã®ã‚ˆã†ã«å®šç¾©ã•ã‚Œã¾ã™ï¼š +- `T1 = T2 = T` ã®å ´åˆã€çµæžœã¯ `d1.T < d2.T`(基礎値ãŒæ¯”較ã•ã‚Œã¾ã™ï¼‰ã€‚ +- `T1 != T2` ã®å ´åˆã€çµæžœã¯ `T1 < T2`(タイプåãŒæ¯”較ã•ã‚Œã¾ã™ï¼‰ã€‚ + +デフォルトã§ã¯ `Dynamic` 型㯠`GROUP BY`/`ORDER BY` キーã§ã®ä½¿ç”¨ãŒè¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€ç‰¹åˆ¥ãªæ¯”較è¦å‰‡ã‚’考慮ã—ã€è¨­å®š `allow_suspicious_types_in_group_by`/`allow_suspicious_types_in_order_by` を推奨ã•ã‚Œã‚Œã°ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +例: +```sql +CREATE TABLE test (d Dynamic) ENGINE=Memory; +INSERT INTO test VALUES (42), (43), ('abc'), ('abd'), ([1, 2, 3]), ([]), (NULL); +``` + +```sql +SELECT d, dynamicType(d) FROM test; +``` + +```text +┌─d───────┬─dynamicType(d)─┠+│ 42 │ Int64 │ +│ 43 │ Int64 │ +│ abc │ String │ +│ abd │ String │ +│ [1,2,3] │ Array(Int64) │ +│ [] │ Array(Int64) │ +│ á´ºáµá´¸á´¸ │ None │ +└─────────┴────────────────┘ +``` + +```sql +SELECT d, dynamicType(d) FROM test ORDER BY d SETTINGS allow_suspicious_types_in_order_by=1; +``` + +```sql +┌─d───────┬─dynamicType(d)─┠+│ [] │ Array(Int64) │ +│ [1,2,3] │ Array(Int64) │ +│ 42 │ Int64 │ +│ 43 │ Int64 │ +│ abc │ String │ +│ abd │ String │ +│ á´ºáµá´¸á´¸ │ None │ +└─────────┴────────────────┘ +``` + +**注æ„:** ç•°ãªã‚‹æ•°å€¤åž‹ã‚’æŒã¤å‹•çš„åž‹ã®å€¤ã¯ç•°ãªã‚‹å€¤ã¨è¦‹ãªã•ã‚Œã€ãŠäº’ã„ã«æ¯”較ã•ã‚Œã‚‹ã“ã¨ã¯ãªãã€ãã®ã‚¿ã‚¤ãƒ—åãŒæ¯”較ã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +CREATE TABLE test (d Dynamic) ENGINE=Memory; +INSERT INTO test VALUES (1::UInt32), (1::Int64), (100::UInt32), (100::Int64); +SELECT d, dynamicType(d) FROM test ORDER BY d SETTINGS allow_suspicious_types_in_order_by=1; +``` + +```text +┌─v───┬─dynamicType(v)─┠+│ 1 │ Int64 │ +│ 100 │ Int64 │ +│ 1 │ UInt32 │ +│ 100 │ UInt32 │ +└─────┴────────────────┘ +``` + +```sql +SELECT d, dynamicType(d) FROM test GROUP by d SETTINGS allow_suspicious_types_in_group_by=1; +``` + +```text +┌─d───┬─dynamicType(d)─┠+│ 1 │ Int64 │ +│ 100 │ UInt32 │ +│ 1 │ UInt32 │ +│ 100 │ Int64 │ +└─────┴────────────────┘ +``` + +**注æ„:** 記述ã•ã‚ŒãŸæ¯”較è¦å‰‡ã¯ã€`Dynamic` åž‹ã§ã®é–¢æ•°ã®ç‰¹åˆ¥ãªä½œæ¥­ã«ã‚ˆã‚‹æ¯”較関数 `=` ã‚„ `>` ãªã©ã®é–¢æ•°å®Ÿè¡Œæ™‚ã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。 + +## Dynamicã®å†…部ã«ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã‚’æ ¼ç´ã™ã‚‹éš›ã®åˆ¶é™ã«é”ã™ã‚‹ + +`Dynamic` データ型ã¯ã€é™ã‚‰ã‚ŒãŸæ•°ã®ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã‚’別々ã®ã‚µãƒ–カラムã¨ã—ã¦ã®ã¿æ ¼ç´ã§ãã¾ã™ã€‚デフォルトã§ã“ã®åˆ¶é™ã¯32ã§ã™ãŒã€åž‹ã®å®£è¨€ã«ãŠã„㦠`Dynamic(max_types=N)` ã®æ§‹æ–‡ã‚’使用ã—ã¦å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚Nã¯0ã‹ã‚‰254ã®é–“ã§ã™ï¼ˆå®Ÿè£…ã®è©³ç´°ã«ã‚ˆã‚Šã€Dynamic内ã«ã‚µãƒ–カラムã¨ã—ã¦æ ¼ç´å¯èƒ½ãªç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ãŒ254種類以上ã«ãªã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“)。 +制é™ã«é”ã—ãŸå ´åˆã€`Dynamic` カラムã«æŒ¿å…¥ã•ã‚Œã‚‹ã™ã¹ã¦ã®æ–°ã—ã„データ型ã¯ã€ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã‚’ãƒã‚¤ãƒŠãƒªå½¢å¼ã§æ ¼ç´ã™ã‚‹å…±æœ‰ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +制é™ã«é”ã—ãŸéš›ã®ã‚·ãƒŠãƒªã‚ªã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ + +### データ解æžä¸­ã«åˆ¶é™ã«é”ã™ã‚‹ + +`Dynamic` ã®å€¤ã‚’データã‹ã‚‰è§£æžã™ã‚‹éš›ã€ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®åˆ¶é™ã«é”ã—ãŸå ´åˆã€ã™ã¹ã¦ã®æ–°ã—ã„値ã¯å…±æœ‰ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã«æŒ¿å…¥ã•ã‚Œã¾ã™ï¼š + +```sql +SELECT d, dynamicType(d), isDynamicElementInSharedData(d) FROM format(JSONEachRow, 'd Dynamic(max_types=3)', ' +{"d" : 42} +{"d" : [1, 2, 3]} +{"d" : "Hello, World!"} +{"d" : "2020-01-01"} +{"d" : ["str1", "str2", "str3"]} +{"d" : {"a" : 1, "b" : [1, 2, 3]}} +') +``` + +```text +┌─d──────────────────────┬─dynamicType(d)─────────────────┬─isDynamicElementInSharedData(d)─┠+│ 42 │ Int64 │ false │ +│ [1,2,3] │ Array(Int64) │ false │ +│ Hello, World! │ String │ false │ +│ 2020-01-01 │ Date │ true │ +│ ['str1','str2','str3'] │ Array(String) │ true │ +│ (1,[1,2,3]) │ Tuple(a Int64, b Array(Int64)) │ true │ +└────────────────────────┴────────────────────────────────┴─────────────────────────────────┘ +``` + +3種類ã®ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ `Int64`ã€`Array(Int64)`ã€`String` を挿入ã—ãŸå¾Œã«ã€æ–°ã—ã„åž‹ã¯ã™ã¹ã¦ç‰¹åˆ¥ãªå…±æœ‰ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã«æŒ¿å…¥ã•ã‚ŒãŸã“ã¨ãŒç¢ºèªã§ãã¾ã™ã€‚ + +### MergeTree テーブルエンジンã§ã®ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã®ãƒžãƒ¼ã‚¸ä¸­ + +MergeTree テーブルã®ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã®ãƒžãƒ¼ã‚¸ä¸­ã«ã€`Dynamic` カラムãŒåˆ¥ã€…ã®ã‚µãƒ–カラム内ã«æ ¼ç´ã§ãã‚‹ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã®åˆ¶é™ã«é”ã—ã€ã™ã¹ã¦ã®åž‹ã‚’ソース部分ã‹ã‚‰ã‚µãƒ–カラムã¨ã—ã¦æ ¼ç´ã§ããªããªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã®å ´åˆã€ClickHouseã¯ã€ãƒžãƒ¼ã‚¸å¾Œã«ã©ã®åž‹ãŒã‚µãƒ–カラムã¨ã—ã¦æ®‹ã‚Šã€ã©ã®åž‹ãŒå…±æœ‰ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã«æŒ¿å…¥ã•ã‚Œã‚‹ã‹ã‚’é¸æŠžã—ã¾ã™ã€‚ã»ã¨ã‚“ã©ã®å ´åˆã€ClickHouseã¯æœ€ã‚‚é »ç¹ãªåž‹ã‚’ä¿æŒã—ã€æœ€ã‚‚希少ãªåž‹ã‚’共有データ構造ã«æ ¼ç´ã—よã†ã¨ã—ã¾ã™ãŒã€ãã‚Œã¯å®Ÿè£…ã«ä¾å­˜ã—ã¾ã™ã€‚ + +ã“ã®ã‚ˆã†ãªãƒžãƒ¼ã‚¸ã®ä¾‹ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ã¾ãšã€`Dynamic` カラムをæŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹æ•°ã®åˆ¶é™ã‚’ `3` ã«è¨­å®šã—ã€5ã¤ã®ç•°ãªã‚‹åž‹ã®å€¤ã‚’挿入ã—ã¾ã™ï¼š + +```sql +CREATE TABLE test (id UInt64, d Dynamic(max_types=3)) engine=MergeTree ORDER BY id; +SYSTEM STOP MERGES test; +INSERT INTO test SELECT number, number FROM numbers(5); +INSERT INTO test SELECT number, range(number) FROM numbers(4); +INSERT INTO test SELECT number, toDate(number) FROM numbers(3); +INSERT INTO test SELECT number, map(number, number) FROM numbers(2); +INSERT INTO test SELECT number, 'str_' || toString(number) FROM numbers(1); +``` + +å„インサートã¯å˜ä¸€ã®åž‹ã‚’æŒã¤ `Dynamic` カラムをå«ã‚€åˆ¥ã€…ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ートを作æˆã—ã¾ã™ï¼š +```sql +SELECT count(), dynamicType(d), isDynamicElementInSharedData(d), _part FROM test GROUP BY _part, dynamicType(d), isDynamicElementInSharedData(d) ORDER BY _part, count(); +``` + +```text +┌─count()─┬─dynamicType(d)──────┬─isDynamicElementInSharedData(d)─┬─_part─────┠+│ 5 │ UInt64 │ false │ all_1_1_0 │ +│ 4 │ Array(UInt64) │ false │ all_2_2_0 │ +│ 3 │ Date │ false │ all_3_3_0 │ +│ 2 │ Map(UInt64, UInt64) │ false │ all_4_4_0 │ +│ 1 │ String │ false │ all_5_5_0 │ +└─────────┴─────────────────────┴─────────────────────────────────┴───────────┘ +``` + +次ã«ã€ã™ã¹ã¦ã®ãƒ‘ートを一ã¤ã«ãƒžãƒ¼ã‚¸ã—ã€ä½•ãŒèµ·ã“ã‚‹ã‹ã‚’見ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SYSTEM START MERGES test; +OPTIMIZE TABLE test FINAL; +SELECT count(), dynamicType(d), isDynamicElementInSharedData(d), _part FROM test GROUP BY _part, dynamicType(d), isDynamicElementInSharedData(d) ORDER BY _part, count() desc; +``` + +```text +┌─count()─┬─dynamicType(d)──────┬─isDynamicElementInSharedData(d)─┬─_part─────┠+│ 5 │ UInt64 │ false │ all_1_5_2 │ +│ 4 │ Array(UInt64) │ false │ all_1_5_2 │ +│ 3 │ Date │ false │ all_1_5_2 │ +│ 2 │ Map(UInt64, UInt64) │ true │ all_1_5_2 │ +│ 1 │ String │ true │ all_1_5_2 │ +└─────────┴─────────────────────┴─────────────────────────────────┴───────────┘ +``` + +ã“ã®ã‚ˆã†ã«ã€ClickHouseã¯æœ€ã‚‚é »ç¹ãªåž‹ `UInt64` 㨠`Array(UInt64)` をサブカラムã¨ã—ã¦ä¿æŒã—ã€ã™ã¹ã¦ã®ä»–ã®åž‹ã‚’共有データã«æŒ¿å…¥ã—ã¾ã—ãŸã€‚ + +## Dynamicã¨JSONExtract関数 + +ã™ã¹ã¦ã® `JSONExtract*` 関数㯠`Dynamic` 型をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +```sql +SELECT JSONExtract('{"a" : [1, 2, 3]}', 'a', 'Dynamic') AS dynamic, dynamicType(dynamic) AS dynamic_type; +``` + +```text +┌─dynamic─┬─dynamic_type───────────┠+│ [1,2,3] │ Array(Nullable(Int64)) │ +└─────────┴────────────────────────┘ +``` + +```sql +SELECT JSONExtract('{"obj" : {"a" : 42, "b" : "Hello", "c" : [1,2,3]}}', 'obj', 'Map(String, Dynamic)') AS map_of_dynamics, mapApply((k, v) -> (k, dynamicType(v)), map_of_dynamics) AS map_of_dynamic_types; +``` + +```text +┌─map_of_dynamics──────────────────┬─map_of_dynamic_types────────────────────────────────────┠+│ {'a':42,'b':'Hello','c':[1,2,3]} │ {'a':'Int64','b':'String','c':'Array(Nullable(Int64))'} │ +└──────────────────────────────────┴─────────────────────────────────────────────────────────┘ +``` + +```sql +SELECT JSONExtractKeysAndValues('{"a" : 42, "b" : "Hello", "c" : [1,2,3]}', 'Dynamic') AS dynamics, arrayMap(x -> (x.1, dynamicType(x.2)), dynamics) AS dynamic_types; +``` + +```text +┌─dynamics───────────────────────────────┬─dynamic_types─────────────────────────────────────────────────┠+│ [('a',42),('b','Hello'),('c',[1,2,3])] │ [('a','Int64'),('b','String'),('c','Array(Nullable(Int64))')] │ +└────────────────────────────────────────┴───────────────────────────────────────────────────────────────┘ +``` + +### ãƒã‚¤ãƒŠãƒªå‡ºåŠ›å½¢å¼ + +RowBinaryå½¢å¼ã§ã¯ã€`Dynamic` åž‹ã®å€¤ã¯æ¬¡ã®å½¢å¼ã§ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œã¾ã™ï¼š + +```text + +``` + diff --git a/docs/ja/sql-reference/data-types/enum.md b/docs/ja/sql-reference/data-types/enum.md new file mode 100644 index 00000000000..11a3970dde8 --- /dev/null +++ b/docs/ja/sql-reference/data-types/enum.md @@ -0,0 +1,159 @@ +--- +slug: /ja/sql-reference/data-types/enum +sidebar_position: 20 +sidebar_label: Enum +--- + +# Enum + +åå‰ä»˜ã値ã®é›†åˆã‹ã‚‰æˆã‚‹åˆ—挙型ã§ã™ã€‚ + +åå‰ä»˜ã値㯠`'string' = integer` ペアや `'string'` åã¨ã—ã¦å®£è¨€ã§ãã¾ã™ã€‚ClickHouse ã¯æ•°å€¤ã®ã¿ã‚’æ ¼ç´ã—ã¾ã™ãŒã€ãã®åå‰ã‚’通ã˜ã¦å€¤ã‚’æ“作ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +ClickHouse ã¯ä»¥ä¸‹ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™: + +- 8ビット㮠`Enum`。`[-128, 127]` 範囲ã§åˆ—挙ã•ã‚ŒãŸæœ€å¤§256ã®å€¤ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ +- 16ビット㮠`Enum`。`[-32768, 32767]` 範囲ã§åˆ—挙ã•ã‚ŒãŸæœ€å¤§65536ã®å€¤ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouse ã¯ãƒ‡ãƒ¼ã‚¿ãŒæŒ¿å…¥ã•ã‚ŒãŸã¨ãã« `Enum` ã®åž‹ã‚’自動的ã«é¸æŠžã—ã¾ã™ã€‚ã¾ãŸã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ã‚µã‚¤ã‚ºã‚’確実ã«ã™ã‚‹ãŸã‚ã« `Enum8` ã¾ãŸã¯ `Enum16` 型を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## 使用例 + +ã“ã“ã§ã¯ã€`Enum8('hello' = 1, 'world' = 2)` åž‹ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™: + +``` sql +CREATE TABLE t_enum +( + x Enum('hello' = 1, 'world' = 2) +) +ENGINE = TinyLog +``` + +åŒæ§˜ã«ã€ç•ªå·ã‚’çœç•¥ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ClickHouse ã¯é€£ç¶šã™ã‚‹ç•ªå·ã‚’自動的ã«å‰²ã‚Šå½“ã¦ã¾ã™ã€‚デフォルトã§ã¯ 1 ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ + +``` sql +CREATE TABLE t_enum +( + x Enum('hello', 'world') +) +ENGINE = TinyLog +``` + +最åˆã®åå‰ã«å¯¾ã—ã¦è¨±å¯ã•ã‚Œã‚‹é–‹å§‹ç•ªå·ã‚’指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +``` sql +CREATE TABLE t_enum +( + x Enum('hello' = 1, 'world') +) +ENGINE = TinyLog +``` + +``` sql +CREATE TABLE t_enum +( + x Enum8('hello' = -129, 'world') +) +ENGINE = TinyLog +``` + +``` text +Exception on server: +Code: 69. DB::Exception: Value -129 for element 'hello' exceeds range of Enum8. +``` + +カラム `x` ã«ã¯ã€åž‹å®šç¾©ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹ `'hello'` ã¾ãŸã¯ `'world'` ã®ã¿ã‚’ä¿å­˜ã§ãã¾ã™ã€‚ãã®ä»–ã®å€¤ã‚’ä¿å­˜ã—よã†ã¨ã™ã‚‹ã¨ã€ClickHouse ã¯ä¾‹å¤–を発生ã•ã›ã¾ã™ã€‚ã“ã® `Enum` ã®ãŸã‚ã« 8ビットã®ã‚µã‚¤ã‚ºãŒè‡ªå‹•çš„ã«é¸æŠžã•ã‚Œã¾ã™ã€‚ + +``` sql +INSERT INTO t_enum VALUES ('hello'), ('world'), ('hello') +``` + +``` text +Ok. +``` + +``` sql +INSERT INTO t_enum values('a') +``` + +``` text +Exception on client: +Code: 49. DB::Exception: Unknown element 'a' for type Enum('hello' = 1, 'world' = 2) +``` + +テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’クエリã™ã‚‹å ´åˆã€ClickHouse 㯠`Enum` ã‹ã‚‰æ–‡å­—列値を出力ã—ã¾ã™ã€‚ + +``` sql +SELECT * FROM t_enum +``` + +``` text +┌─x─────┠+│ hello │ +│ world │ +│ hello │ +└───────┘ +``` + +è¡Œã®æ•°å€¤ç›¸å½“を確èªã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€`Enum` 値を整数型ã«ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` sql +SELECT CAST(x, 'Int8') FROM t_enum +``` + +``` text +┌─CAST(x, 'Int8')─┠+│ 1 │ +│ 2 │ +│ 1 │ +└─────────────────┘ +``` + +クエリ内㧠Enum 値を作æˆã™ã‚‹ã«ã¯ã€`CAST` を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` sql +SELECT toTypeName(CAST('a', 'Enum(\'a\' = 1, \'b\' = 2)')) +``` + +``` text +┌─toTypeName(CAST('a', 'Enum(\'a\' = 1, \'b\' = 2)'))─┠+│ Enum8('a' = 1, 'b' = 2) │ +└─────────────────────────────────────────────────────┘ +``` + +## 一般的ãªãƒ«ãƒ¼ãƒ«ã¨ä½¿ç”¨æ³• + +å„値ã«ã¯ã€`Enum8` ã®å ´åˆã«ã¯ `-128 ... 127`ã€`Enum16` ã®å ´åˆã«ã¯ `-32768 ... 32767` ã®ç¯„囲ã§ç•ªå·ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ã™ã¹ã¦ã®æ–‡å­—列ã¨æ•°å€¤ã¯ç•°ãªã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚空文字列も許å¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®åž‹ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼ˆãƒ†ãƒ¼ãƒ–ル定義内)ã€æ•°å€¤ã®é †ç•ªã¯ä»»æ„ã§æ§‹ã„ã¾ã›ã‚“。ã—ã‹ã—ã€é †åºã¯é‡è¦ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +`Enum` ã§æ–‡å­—列ã¾ãŸã¯æ•°å€¤ã®å€¤ã¯ [NULL](../../sql-reference/syntax.md) ã«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +`Enum` 㯠[Nullable](../../sql-reference/data-types/nullable.md) åž‹ã«å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã¨ã€ + +``` sql +CREATE TABLE t_enum_nullable +( + x Nullable( Enum8('hello' = 1, 'world' = 2) ) +) +ENGINE = TinyLog +``` + +`'hello'` 㨠`'world'` ã®ã¿ãªã‚‰ãšã€`NULL` ã‚‚ä¿å­˜ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +``` sql +INSERT INTO t_enum_nullable Values('hello'),('world'),(NULL) +``` + +RAM ã§ã¯ã€`Enum` カラムã¯å¯¾å¿œã™ã‚‹æ•°å€¤ã® `Int8` ã¾ãŸã¯ `Int16` ã¨åŒã˜æ–¹æ³•ã§ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +テキスト形å¼ã§èª­ã¿è¾¼ã‚€ã¨ãã€ClickHouse ã¯å€¤ã‚’文字列ã¨ã—ã¦è§£æžã—ã€Enum 値ã®é›†åˆã‹ã‚‰å¯¾å¿œã™ã‚‹æ–‡å­—列を検索ã—ã¾ã™ã€‚ãã‚ŒãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã¯ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚テキスト形å¼ã§æ›¸ã込む際ã«ã¯ã€å€¤ã‚’対応ã™ã‚‹æ–‡å­—列ã¨ã—ã¦å‡ºåŠ›ã—ã¾ã™ã€‚カラムデータã«ã”ã¿ï¼ˆæœ‰åŠ¹ãªé›†åˆã«ãªã„数値)ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ãƒã‚¤ãƒŠãƒªå½¢å¼ã§ã®èª­ã¿æ›¸ãã®éš›ã¯ã€Int8 ãŠã‚ˆã³ Int16 ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨åŒæ§˜ã®æ–¹æ³•ã§å‹•ä½œã—ã¾ã™ã€‚æš—é»™ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯æœ€ã‚‚低ã„番å·ã®å€¤ã§ã™ã€‚ + +`ORDER BY`ã€`GROUP BY`ã€`IN`ã€`DISTINCT` ãªã©ã®éš›ã«ã¯ã€Enum ã¯å¯¾å¿œã™ã‚‹æ•°å€¤ã¨åŒã˜ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ã€‚例ãˆã°ã€ORDER BY ã¯æ•°å€¤çš„ã«ã‚½ãƒ¼ãƒˆã—ã¾ã™ã€‚等価性ãŠã‚ˆã³æ¯”較演算å­ã¯ã€Enum 上ã§åŸºç¤Žã¨ãªã‚‹æ•°å€¤å€¤ã¨åŒã˜ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +Enum 値ã¯æ•°å€¤ã¨æ¯”較ã§ãã¾ã›ã‚“。Enum ã¯å®šæ•°æ–‡å­—列ã¨æ¯”較ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚比較ã—ãŸæ–‡å­—列㌠Enum ã®æœ‰åŠ¹ãªå€¤ã§ãªã„å ´åˆã€ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚Enum を左辺ã«ã€æ–‡å­—列ã®é›†åˆã‚’å³è¾ºã«æŒã¤ `IN` 演算å­ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚文字列ã¯å¯¾å¿œã™ã‚‹ Enum ã®å€¤ã§ã™ã€‚ + +ã»ã¨ã‚“ã©ã®æ•°å€¤ãŠã‚ˆã³æ–‡å­—列æ“作㯠Enum 値ã«ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。例ãˆã°ã€Enum ã«æ•°å€¤ã‚’加算ã—ãŸã‚Šã€Enum ã«æ–‡å­—列を連çµã—ãŸã‚Šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã—ã‹ã—ã€Enum ã«ã¯ãã®æ–‡å­—列値を返ã™è‡ªç„¶ãª `toString` 関数ãŒã‚ã‚Šã¾ã™ã€‚ + +Enum 値ã¯ã€`toT` 関数を使用ã—ã¦æ•°å€¤åž‹ã«å¤‰æ›ã§ãã¾ã™ã€‚ã“ã“㧠T ã¯æ•°å€¤åž‹ã§ã™ã€‚T ㌠enum ã®åŸºç¤Žã¨ãªã‚‹æ•°å€¤åž‹ã¨ä¸€è‡´ã™ã‚‹å ´åˆã€ã“ã®å¤‰æ›ã«ã‚³ã‚¹ãƒˆã¯ã‹ã‹ã‚Šã¾ã›ã‚“。 +ALTER を使用ã—㦠Enum 型を変更ã™ã‚‹ã“ã¨ã¯ã‚³ã‚¹ãƒˆãŒã‹ã‹ã‚‰ãšã«è¡Œãˆã¾ã™ãŒã€å€¤ã®é›†åˆãŒå¤‰æ›´ã•ã‚Œã‚‹å ´åˆã®ã¿ã§ã™ã€‚ALTER を使用ã—㦠Enum ã®ãƒ¡ãƒ³ãƒãƒ¼ã‚’追加ãŠã‚ˆã³å‰Šé™¤ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ï¼ˆå‰Šé™¤ã¯å‰Šé™¤ã™ã‚‹å€¤ãŒãƒ†ãƒ¼ãƒ–ルã§ä¸€åº¦ã‚‚使用ã•ã‚Œã¦ã„ãªã„å ´åˆã®ã¿å®‰å…¨ã§ã™ï¼‰ã€‚安全策ã¨ã—ã¦ã€ä»¥å‰ã«å®šç¾©ã•ã‚ŒãŸ Enum メンãƒãƒ¼ã®æ•°å€¤å€¤ã‚’変更ã™ã‚‹ã¨ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +ALTER を使用ã™ã‚‹ã“ã¨ã§ Enum8 ã‚’ Enum16 ã«ã€ã¾ãŸã¯ Enum16 ã‚’ Enum8 ã«å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れ㯠Int8 ã‚’ Int16 ã«å¤‰æ›´ã™ã‚‹ã®ã¨åŒæ§˜ã§ã™ã€‚ diff --git a/docs/ja/sql-reference/data-types/fixedstring.md b/docs/ja/sql-reference/data-types/fixedstring.md new file mode 100644 index 00000000000..8e661f76f9a --- /dev/null +++ b/docs/ja/sql-reference/data-types/fixedstring.md @@ -0,0 +1,60 @@ +--- +slug: /ja/sql-reference/data-types/fixedstring +sidebar_position: 10 +sidebar_label: FixedString(N) +--- + +# FixedString(N) + +`N`ãƒã‚¤ãƒˆã®å›ºå®šé•·ã®æ–‡å­—列(文字やコードãƒã‚¤ãƒ³ãƒˆã§ã¯ã‚ã‚Šã¾ã›ã‚“)。 + +`FixedString`åž‹ã®ã‚«ãƒ©ãƒ ã‚’宣言ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®æ§‹æ–‡ã‚’使用ã—ã¾ã™ã€‚ + +``` sql + FixedString(N) +``` + +ã“ã“ã§ã€`N`ã¯è‡ªç„¶æ•°ã§ã™ã€‚ + +`FixedString`åž‹ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒæ­£ç¢ºã«`N`ãƒã‚¤ãƒˆã®é•·ã•ã‚’æŒã¤å ´åˆã«åŠ¹çŽ‡çš„ã§ã™ã€‚ãれ以外ã®å ´åˆã€åŠ¹çŽ‡ãŒä½Žä¸‹ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +`FixedString`åž‹ã®ã‚«ãƒ©ãƒ ã«åŠ¹çŽ‡çš„ã«ä¿å­˜ã§ãる値ã®ä¾‹ï¼š + +- IPアドレスã®ãƒã‚¤ãƒŠãƒªè¡¨ç¾ï¼ˆIPv6ã«å¯¾ã—ã¦ã¯`FixedString(16)`)。 +- 言語コード(例: ru_RU, en_US)。 +- 通貨コード(例: USD, RUB)。 +- ãƒãƒƒã‚·ãƒ¥ã®ãƒã‚¤ãƒŠãƒªè¡¨ç¾ï¼ˆMD5ã«å¯¾ã—ã¦ã¯`FixedString(16)`ã€SHA256ã«å¯¾ã—ã¦ã¯`FixedString(32)`)。 + +UUID値をä¿å­˜ã™ã‚‹ãŸã‚ã«ã¯ã€[UUID](../../sql-reference/data-types/uuid.md)データ型を使用ã—ã¦ãã ã•ã„。 + +データを挿入ã™ã‚‹éš›ã€ClickHouseã¯ä»¥ä¸‹ã®å‡¦ç†ã‚’è¡Œã„ã¾ã™ï¼š + +- 文字列ãŒ`N`ãƒã‚¤ãƒˆæœªæº€ã®å ´åˆã€ãƒŒãƒ«ãƒã‚¤ãƒˆã§è£œå®Œã—ã¾ã™ã€‚ +- 文字列ãŒ`N`ãƒã‚¤ãƒˆã‚’超ãˆã‚‹å ´åˆã€`Too large value for FixedString(N)`例外をスローã—ã¾ã™ã€‚ + +データをé¸æŠžã™ã‚‹éš›ã€ClickHouseã¯æ–‡å­—列ã®æœ«å°¾ã«ã‚るヌルãƒã‚¤ãƒˆã‚’削除ã—ã¾ã›ã‚“。`WHERE`å¥ã‚’使用ã™ã‚‹å ´åˆã€`FixedString`値ã«ä¸€è‡´ã•ã›ã‚‹ãŸã‚ã€æ‰‹å‹•ã§ãƒŒãƒ«ãƒã‚¤ãƒˆã‚’追加ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã®ä¾‹ã¯ã€`FixedString`ã¨`WHERE`å¥ã‚’ã©ã®ã‚ˆã†ã«ä½¿ç”¨ã™ã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +次ã®å˜ä¸€ã®`FixedString(2)`カラムをå«ã‚€ãƒ†ãƒ¼ãƒ–ルを考ãˆã¦ã¿ã¾ã—ょã†ã€‚ + +``` text +┌─name──┠+│ b │ +└───────┘ +``` + +クエリ `SELECT * FROM FixedStringTable WHERE a = 'b'` ã¯ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã›ã‚“。フィルタパターンをヌルãƒã‚¤ãƒˆã§è£œå®Œã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` sql +SELECT * FROM FixedStringTable +WHERE a = 'b\0' +``` + +``` text +┌─a─┠+│ b │ +└───┘ +``` + +ã“ã®å‹•ä½œã¯ã€MySQLã®`CHAR`åž‹ã¨ã¯ç•°ãªã‚Šã¾ã™ï¼ˆãã“ã§ã¯æ–‡å­—列ã¯ã‚¹ãƒšãƒ¼ã‚¹ã§ãƒ‘ディングã•ã‚Œã€å‡ºåŠ›ã®éš›ã«ã¯ã‚¹ãƒšãƒ¼ã‚¹ã¯å‰Šé™¤ã•ã‚Œã¾ã™ï¼‰ã€‚ + +`FixedString(N)`ã®å€¤ã®é•·ã•ã¯ä¸€å®šã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。[length](../../sql-reference/functions/array-functions.md#array_functions-length)関数ã¯ã€`FixedString(N)`ã®å€¤ãŒãƒŒãƒ«ãƒã‚¤ãƒˆã®ã¿ã§åŸ‹ã‚られã¦ã„ã¦ã‚‚`N`ã‚’è¿”ã—ã¾ã™ãŒã€[empty](../../sql-reference/functions/string-functions.md#empty)関数ã¯ã“ã®å ´åˆã«`1`ã‚’è¿”ã—ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/data-types/float.md b/docs/ja/sql-reference/data-types/float.md new file mode 100644 index 00000000000..bac5d628519 --- /dev/null +++ b/docs/ja/sql-reference/data-types/float.md @@ -0,0 +1,119 @@ +--- +slug: /ja/sql-reference/data-types/float +sidebar_position: 4 +sidebar_label: Float32, Float64 +--- + +# Float32, Float64 + +:::note +高精度ãŒæ±‚ã‚られる計算ã€ç‰¹ã«é‡‘èžã‚„ビジãƒã‚¹ãƒ‡ãƒ¼ã‚¿ã®å‡¦ç†ã«ã¯ã€[Decimal](../data-types/decimal.md) ã®ä½¿ç”¨ã‚’検討ã—ã¦ãã ã•ã„。 + +[浮動å°æ•°ç‚¹æ•°](https://en.wikipedia.org/wiki/IEEE_754)ã¯ä»¥ä¸‹ã®ä¾‹ã®ã‚ˆã†ã«ä¸æ­£ç¢ºãªçµæžœã‚’æ‹›ãã“ã¨ãŒã‚ã‚Šã¾ã™ï¼š + +```sql +CREATE TABLE IF NOT EXISTS float_vs_decimal +( + my_float Float64, + my_decimal Decimal64(3) +) +Engine=MergeTree +ORDER BY tuple(); + +# 1 000 000 個ã®å°æ•°ç‚¹ä»¥ä¸‹ 2 æ¡ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæ•°å€¤ã‚’生æˆã—ã€float 㨠decimal ã¨ã—ã¦æ ¼ç´ +INSERT INTO float_vs_decimal SELECT round(randCanonical(), 3) AS res, res FROM system.numbers LIMIT 1000000; +``` +``` +SELECT sum(my_float), sum(my_decimal) FROM float_vs_decimal; + +┌──────sum(my_float)─┬─sum(my_decimal)─┠+│ 499693.60500000004 │ 499693.605 │ +└────────────────────┴─────────────────┘ + +SELECT sumKahan(my_float), sumKahan(my_decimal) FROM float_vs_decimal; + +┌─sumKahan(my_float)─┬─sumKahan(my_decimal)─┠+│ 499693.605 │ 499693.605 │ +└────────────────────┴──────────────────────┘ +``` +::: + +ClickHouseã¨Cã§ã®å¯¾å¿œã™ã‚‹åž‹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +- `Float32` — `float` +- `Float64` — `double` + +ClickHouseã«ãŠã‘ã‚‹Floatåž‹ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +- `Float32` — `FLOAT`, `REAL`, `SINGLE` +- `Float64` — `DOUBLE`, `DOUBLE PRECISION` + +テーブル作æˆæ™‚ã«ã€æµ®å‹•å°æ•°ç‚¹æ•°ã®æ•°å€¤ãƒ‘ラメータを設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆä¾‹ï¼š`FLOAT(12)`, `FLOAT(15, 22)`, `DOUBLE(12)`, `DOUBLE(4, 18)`)ãŒã€ClickHouseã¯ãれらを無視ã—ã¾ã™ã€‚ + +## 浮動å°æ•°ç‚¹æ•°ã®ä½¿ç”¨ + +- 浮動å°æ•°ç‚¹æ•°ã‚’利用ã—ãŸè¨ˆç®—ã¯ã€ä¸¸ã‚誤差を生ã˜ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + + + +``` sql +SELECT 1 - 0.9 +``` + +``` text +┌───────minus(1, 0.9)─┠+│ 0.09999999999999998 │ +└─────────────────────┘ +``` + +- 計算çµæžœã¯è¨ˆç®—方法(プロセッサタイプやコンピュータシステムã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ï¼‰ã«ä¾å­˜ã—ã¾ã™ã€‚ +- 浮動å°æ•°ç‚¹è¨ˆç®—ã®çµæžœã¨ã—ã¦ã€ç„¡é™å¤§ï¼ˆ`Inf`)や「数ã§ã¯ãªã„ã€ï¼ˆ`NaN`)ã¨ã„ã£ãŸæ•°å€¤ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“れを計算çµæžœã®å‡¦ç†æ™‚ã«è€ƒæ…®ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- テキストã‹ã‚‰æµ®å‹•å°æ•°ç‚¹æ•°ã‚’パースã™ã‚‹éš›ã€çµæžœãŒæœ€ã‚‚è¿‘ã„機械表ç¾å¯èƒ½ãªæ•°ã«ãªã‚‰ãªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +## NaNã¨Inf + +標準SQLã¨ã¯ç•°ãªã‚Šã€ClickHouseã¯ä»¥ä¸‹ã®æµ®å‹•å°æ•°ç‚¹æ•°ã®ã‚«ãƒ†ã‚´ãƒªãƒ¼ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +- `Inf` – ç„¡é™å¤§ + + + +``` sql +SELECT 0.5 / 0 +``` + +``` text +┌─divide(0.5, 0)─┠+│ inf │ +└────────────────┘ +``` + +- `-Inf` — è² ã®ç„¡é™å¤§ + + + +``` sql +SELECT -0.5 / 0 +``` + +``` text +┌─divide(-0.5, 0)─┠+│ -inf │ +└─────────────────┘ +``` + +- `NaN` — æ•°ã§ã¯ãªã„ + + + +``` sql +SELECT 0 / 0 +``` + +``` text +┌─divide(0, 0)─┠+│ nan │ +└──────────────┘ +``` + +`NaN`ã®ã‚½ãƒ¼ãƒˆé †ã«ã¤ã„ã¦ã¯ã€[ORDER BYå¥](../../sql-reference/statements/select/order-by.md)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/sql-reference/data-types/geo.md b/docs/ja/sql-reference/data-types/geo.md new file mode 100644 index 00000000000..f31dad2b628 --- /dev/null +++ b/docs/ja/sql-reference/data-types/geo.md @@ -0,0 +1,142 @@ +--- +slug: /ja/sql-reference/data-types/geo +sidebar_position: 54 +sidebar_label: Geo +title: "Geometric" +--- + +ClickHouseã¯ã€åœ°ç†çš„オブジェクト(ä½ç½®ã€åœŸåœ°ãªã©ï¼‰ã‚’表ç¾ã™ã‚‹ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +**関連リンク** +- [ç°¡å˜ãªåœ°ç†çš„特徴ã®è¡¨ç¾æ–¹æ³•](https://en.wikipedia.org/wiki/GeoJSON). + +## Point + +`Point` ã¯ã€ãã® X座標㨠Y座標ã§è¡¨ã•ã‚Œã€[Tuple](tuple.md)([Float64](float.md), [Float64](float.md)) ã¨ã—ã¦æ ¼ç´ã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +CREATE TABLE geo_point (p Point) ENGINE = Memory(); +INSERT INTO geo_point VALUES((10, 10)); +SELECT p, toTypeName(p) FROM geo_point; +``` +çµæžœ: + +``` text +┌─p───────┬─toTypeName(p)─┠+│ (10,10) │ Point │ +└─────────┴───────────────┘ +``` + +## Ring + +`Ring` ã¯ç©´ã®ãªã„å˜ç´”ãªå¤šè§’å½¢ã§ã€ãƒã‚¤ãƒ³ãƒˆã®é…列ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™: [Array](array.md)([Point](#point))。 + +**例** + +クエリ: + +```sql +CREATE TABLE geo_ring (r Ring) ENGINE = Memory(); +INSERT INTO geo_ring VALUES([(0, 0), (10, 0), (10, 10), (0, 10)]); +SELECT r, toTypeName(r) FROM geo_ring; +``` +çµæžœ: + +``` text +┌─r─────────────────────────────┬─toTypeName(r)─┠+│ [(0,0),(10,0),(10,10),(0,10)] │ Ring │ +└───────────────────────────────┴───────────────┘ +``` + +## LineString + +`LineString` ã¯ç·šã§ã€ãƒã‚¤ãƒ³ãƒˆã®é…列ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™: [Array](array.md)([Point](#point))。 + +**例** + +クエリ: + +```sql +CREATE TABLE geo_linestring (l LineString) ENGINE = Memory(); +INSERT INTO geo_linestring VALUES([(0, 0), (10, 0), (10, 10), (0, 10)]); +SELECT l, toTypeName(l) FROM geo_linestring; +``` +çµæžœ: + +``` text +┌─r─────────────────────────────┬─toTypeName(r)─┠+│ [(0,0),(10,0),(10,10),(0,10)] │ LineString │ +└───────────────────────────────┴───────────────┘ +``` + +## MultiLineString + +`MultiLineString` ã¯è¤‡æ•°ã®ãƒ©ã‚¤ãƒ³ã§ã€`LineString` ã®é…列ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™: [Array](array.md)([LineString](#linestring))。 + +**例** + +クエリ: + +```sql +CREATE TABLE geo_multilinestring (l MultiLineString) ENGINE = Memory(); +INSERT INTO geo_multilinestring VALUES([[(0, 0), (10, 0), (10, 10), (0, 10)], [(1, 1), (2, 2), (3, 3)]]); +SELECT l, toTypeName(l) FROM geo_multilinestring; +``` +çµæžœ: + +``` text +┌─l───────────────────────────────────────────────────┬─toTypeName(l)───┠+│ [[(0,0),(10,0),(10,10),(0,10)],[(1,1),(2,2),(3,3)]] │ MultiLineString │ +└─────────────────────────────────────────────────────┴─────────────────┘ +``` + +## Polygon + +`Polygon` ã¯ç©´ã‚’æŒã¤å¤šè§’å½¢ã§ã€ãƒªãƒ³ã‚°ã®é…列ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™: [Array](array.md)([Ring](#ring))。外å´ã®é…列ã®æœ€åˆã®è¦ç´ ã¯å¤šè§’å½¢ã®å¤–å´ã®å½¢çŠ¶ã§ã€å¾Œç¶šã®è¦ç´ ã¯ã™ã¹ã¦ç©´ã§ã™ã€‚ + +**例** + +ã“ã‚Œã¯1ã¤ã®ç©´ã‚’æŒã¤å¤šè§’å½¢ã§ã™: + +```sql +CREATE TABLE geo_polygon (pg Polygon) ENGINE = Memory(); +INSERT INTO geo_polygon VALUES([[(20, 20), (50, 20), (50, 50), (20, 50)], [(30, 30), (50, 50), (50, 30)]]); +SELECT pg, toTypeName(pg) FROM geo_polygon; +``` + +çµæžœ: + +``` text +┌─pg────────────────────────────────────────────────────────────┬─toTypeName(pg)─┠+│ [[(20,20),(50,20),(50,50),(20,50)],[(30,30),(50,50),(50,30)]] │ Polygon │ +└───────────────────────────────────────────────────────────────┴────────────────┘ +``` + +## MultiPolygon + +`MultiPolygon` ã¯è¤‡æ•°ã®å¤šè§’å½¢ã‹ã‚‰æˆã‚Šã€ãƒãƒªã‚´ãƒ³ã®é…列ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™: [Array](array.md)([Polygon](#polygon))。 + +**例** + +ã“ã®ãƒžãƒ«ãƒãƒãƒªã‚´ãƒ³ã¯ã€1ã¤ã¯ç©´ã®ãªã„ãƒãƒªã‚´ãƒ³ã€ã‚‚ã†1ã¤ã¯1ã¤ã®ç©´ã‚’æŒã¤2ã¤ã®åˆ¥ã€…ã®ãƒãƒªã‚´ãƒ³ã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™: + +```sql +CREATE TABLE geo_multipolygon (mpg MultiPolygon) ENGINE = Memory(); +INSERT INTO geo_multipolygon VALUES([[[(0, 0), (10, 0), (10, 10), (0, 10)]], [[(20, 20), (50, 20), (50, 50), (20, 50)],[(30, 30), (50, 50), (50, 30)]]]); +SELECT mpg, toTypeName(mpg) FROM geo_multipolygon; +``` +çµæžœ: + +``` text +┌─mpg─────────────────────────────────────────────────────────────────────────────────────────────┬─toTypeName(mpg)─┠+│ [[[(0,0),(10,0),(10,10),(0,10)]],[[(20,20),(50,20),(50,50),(20,50)],[(30,30),(50,50),(50,30)]]] │ MultiPolygon │ +└─────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────┘ +``` + +## 関連コンテンツ + +- [膨大ãªå®Ÿä¸–ç•Œã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®æŽ¢æ±‚: ClickHouseã«ãŠã‘ã‚‹100年以上ã®å¤©æ°—記録](https://clickhouse.com/blog/real-world-data-noaa-climate-data) diff --git a/docs/ja/sql-reference/data-types/index.md b/docs/ja/sql-reference/data-types/index.md new file mode 100644 index 00000000000..7bd03a036d4 --- /dev/null +++ b/docs/ja/sql-reference/data-types/index.md @@ -0,0 +1,34 @@ +--- +slug: /ja/sql-reference/data-types/ +sidebar_label: データ型ã®ä¸€è¦§ +sidebar_position: 1 +--- + +# ClickHouseã®ãƒ‡ãƒ¼ã‚¿åž‹ + +ClickHouseã¯æ§˜ã€…ãªç¨®é¡žã®ãƒ‡ãƒ¼ã‚¿ã‚’テーブルã®ã‚»ãƒ«ã«æ ¼ç´ã§ãã¾ã™ã€‚ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型ã¨ã€ãれを使用ãŠã‚ˆã³/ã¾ãŸã¯å®Ÿè£…ã™ã‚‹éš›ã®ç‰¹åˆ¥ãªè€ƒæ…®äº‹é …ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +:::note +データ型åãŒå¤§æ–‡å­—ã¨å°æ–‡å­—を区別ã™ã‚‹ã‹ã©ã†ã‹ã¯ã€[system.data_type_families](../../operations/system-tables/data_type_families.md#system_tables-data_type_families)テーブルã§ç¢ºèªã§ãã¾ã™ã€‚ +::: + +ClickHouseã®ãƒ‡ãƒ¼ã‚¿åž‹ã«ã¯æ¬¡ã®ã‚‚ã®ãŒã‚ã‚Šã¾ã™ï¼š + +- **æ•´æ•°åž‹**:[符å·ä»˜ããŠã‚ˆã³ç¬¦å·ãªã—æ•´æ•°](./int-uint.md) (`UInt8`, `UInt16`, `UInt32`, `UInt64`, `UInt128`, `UInt256`, `Int8`, `Int16`, `Int32`, `Int64`, `Int128`, `Int256`) +- **浮動å°æ•°ç‚¹æ•°**:[浮動å°æ•°ç‚¹æ•°](./float.md) (`Float32` 㨠`Float64`) 㨠[`Decimal` 値](./decimal.md) +- **ブール型**:ClickHouseã«ã¯[`Boolean`åž‹](./boolean.md)ãŒã‚ã‚Šã¾ã™ +- **文字列**:[文字列型 `String`](./string.md) 㨠[`FixedString`](./fixedstring.md) +- **日付**:日付ã«ã¯[`Date`](./date.md) 㨠[`Date32`](./date32.md)ã‚’ã€æ™‚é–“ã«ã¯[`DateTime`](./datetime.md) 㨠[`DateTime64`](./datetime64.md)を使用 +- **オブジェクト**:[`Object`](./json.md)ã¯1ã¤ã®ã‚«ãƒ©ãƒ ã§JSONドキュメントをä¿å­˜ï¼ˆéžæŽ¨å¥¨ï¼‰ +- **JSON**:[`JSON`オブジェクト](./newjson.md)ã¯1ã¤ã®ã‚«ãƒ©ãƒ ã§JSONドキュメントをä¿å­˜ +- **UUID**:[`UUID`値](./uuid.md)を効率的ã«ä¿å­˜ã™ã‚‹ãŸã‚ã®é¸æŠžè‚¢ +- **低ã„カーディナリティ型**:少数ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå€¤ãŒã‚ã‚‹å ´åˆã¯[`Enum`](./enum.md)ã‚’ã€æœ€å¤§10,000ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªã‚«ãƒ©ãƒ å€¤ãŒã‚ã‚‹å ´åˆã¯[`LowCardinality`](./lowcardinality.md)を使用 +- **é…列**:任æ„ã®ã‚«ãƒ©ãƒ ã¯[`Array` åž‹](./array.md)ã¨ã—ã¦å®šç¾©å¯èƒ½ +- **マップ**:キーã¨å€¤ã®ãƒšã‚¢ã‚’ä¿å­˜ã™ã‚‹ã«ã¯[`Map`](./map.md)を使用 +- **集約関数型**:集約関数ã®ä¸­é–“状態をä¿å­˜ã™ã‚‹ã«ã¯[`SimpleAggregateFunction`](./simpleaggregatefunction.md) 㨠[`AggregateFunction`](./aggregatefunction.md)を使用 +- **ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ **:[`Nested`データ構造](./nested-data-structures/index.md)ã¯ã‚»ãƒ«å†…ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚ˆã†ãªã‚‚ã® +- **タプル**:個別ã®åž‹ã‚’ã‚‚ã¤è¦ç´ ã®[`Tuple`](./tuple.md) +- **Nullable**:値ãŒ"欠ã‘ã¦ã„ã‚‹"å ´åˆã«ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§ã¯ãªã`NULL`ã¨ã—ã¦ä¿å­˜ã™ã‚‹å ´åˆã«[`Nullable`](./nullable.md)を使用 +- **IPアドレス**:IPアドレスを効率的ã«ä¿å­˜ã™ã‚‹ã«ã¯[`IPv4`](./ipv4.md) 㨠[`IPv6`](./ipv6.md)を使用 +- **ジオタイプ**:[地ç†ãƒ‡ãƒ¼ã‚¿](./geo.md)用ã®`Point`, `Ring`, `Polygon`, `MultiPolygon` +- **特別ãªãƒ‡ãƒ¼ã‚¿åž‹**:[`Expression`](./special-data-types/expression.md), [`Set`](./special-data-types/set.md), [`Nothing`](./special-data-types/nothing.md), [`Interval`](./special-data-types/interval.md)ãªã©å«ã‚€ diff --git a/docs/ja/sql-reference/data-types/int-uint.md b/docs/ja/sql-reference/data-types/int-uint.md new file mode 100644 index 00000000000..eff82a245b2 --- /dev/null +++ b/docs/ja/sql-reference/data-types/int-uint.md @@ -0,0 +1,43 @@ +--- +slug: /ja/sql-reference/data-types/int-uint +sidebar_position: 2 +sidebar_label: UInt8, UInt16, UInt32, UInt64, UInt128, UInt256, Int8, Int16, Int32, Int64, Int128, Int256 +--- + +# UInt8, UInt16, UInt32, UInt64, UInt128, UInt256, Int8, Int16, Int32, Int64, Int128, Int256 + +符å·ã‚ã‚Šã¾ãŸã¯ç¬¦å·ãªã—ã®å›ºå®šé•·æ•´æ•°ã€‚ + +テーブルを作æˆã™ã‚‹éš›ã€æ•´æ•°ã«å¯¾ã—ã¦æ•°å€¤ãƒ‘ラメータを設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆä¾‹: `TINYINT(8)`, `SMALLINT(16)`, `INT(32)`, `BIGINT(64)`)ãŒã€ClickHouse ã¯ã“れを無視ã—ã¾ã™ã€‚ + +## Int 範囲 + +- `Int8` — \[-128 : 127\] +- `Int16` — \[-32768 : 32767\] +- `Int32` — \[-2147483648 : 2147483647\] +- `Int64` — \[-9223372036854775808 : 9223372036854775807\] +- `Int128` — \[-170141183460469231731687303715884105728 : 170141183460469231731687303715884105727\] +- `Int256` — \[-57896044618658097711785492504343953926634992332820282019728792003956564819968 : 57896044618658097711785492504343953926634992332820282019728792003956564819967\] + +エイリアス: + +- `Int8` — `TINYINT`, `INT1`, `BYTE`, `TINYINT SIGNED`, `INT1 SIGNED`. +- `Int16` — `SMALLINT`, `SMALLINT SIGNED`. +- `Int32` — `INT`, `INTEGER`, `MEDIUMINT`, `MEDIUMINT SIGNED`, `INT SIGNED`, `INTEGER SIGNED`. +- `Int64` — `BIGINT`, `SIGNED`, `BIGINT SIGNED`, `TIME`. + +## UInt 範囲 + +- `UInt8` — \[0 : 255\] +- `UInt16` — \[0 : 65535\] +- `UInt32` — \[0 : 4294967295\] +- `UInt64` — \[0 : 18446744073709551615\] +- `UInt128` — \[0 : 340282366920938463463374607431768211455\] +- `UInt256` — \[0 : 115792089237316195423570985008687907853269984665640564039457584007913129639935\] + +エイリアス: + +- `UInt8` — `TINYINT UNSIGNED`, `INT1 UNSIGNED`. +- `UInt16` — `SMALLINT UNSIGNED`. +- `UInt32` — `MEDIUMINT UNSIGNED`, `INT UNSIGNED`, `INTEGER UNSIGNED` +- `UInt64` — `UNSIGNED`, `BIGINT UNSIGNED`, `BIT`, `SET` diff --git a/docs/ja/sql-reference/data-types/ipv4.md b/docs/ja/sql-reference/data-types/ipv4.md new file mode 100644 index 00000000000..b2b30a279b4 --- /dev/null +++ b/docs/ja/sql-reference/data-types/ipv4.md @@ -0,0 +1,74 @@ +--- +slug: /ja/sql-reference/data-types/ipv4 +sidebar_position: 28 +sidebar_label: IPv4 +--- + +## IPv4 + +IPv4アドレス。4ãƒã‚¤ãƒˆã§UInt32ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +### 基本的ãªä½¿ç”¨æ³• + +``` sql +CREATE TABLE hits (url String, from IPv4) ENGINE = MergeTree() ORDER BY url; + +DESCRIBE TABLE hits; +``` + +``` text +┌─name─┬─type───┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┠+│ url │ String │ │ │ │ │ +│ from │ IPv4 │ │ │ │ │ +└──────┴────────┴──────────────┴────────────────────┴─────────┴──────────────────┘ +``` + +ã¾ãŸã¯ã€IPv4ドメインをキーã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +``` sql +CREATE TABLE hits (url String, from IPv4) ENGINE = MergeTree() ORDER BY from; +``` + +`IPv4` ドメインã¯IPv4文字列ã¨ã—ã¦ã®ã‚«ã‚¹ã‚¿ãƒ å…¥åŠ›å½¢å¼ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: + +``` sql +INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '116.253.40.133')('https://clickhouse.com', '183.247.232.58')('https://clickhouse.com/docs/ja/', '116.106.34.242'); + +SELECT * FROM hits; +``` + +``` text +┌─url────────────────────────────────┬───────────from─┠+│ https://clickhouse.com/docs/ja/ │ 116.106.34.242 │ +│ https://wikipedia.org │ 116.253.40.133 │ +│ https://clickhouse.com │ 183.247.232.58 │ +└────────────────────────────────────┴────────────────┘ +``` + +値ã¯ã‚³ãƒ³ãƒ‘クトãªãƒã‚¤ãƒŠãƒªå½¢å¼ã§ä¿å­˜ã•ã‚Œã¾ã™: + +``` sql +SELECT toTypeName(from), hex(from) FROM hits LIMIT 1; +``` + +``` text +┌─toTypeName(from)─┬─hex(from)─┠+│ IPv4 │ B7F7E83A │ +└──────────────────┴───────────┘ +``` + +IPv4アドレスã¯IPv6アドレスã¨ç›´æŽ¥æ¯”較ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```sql +SELECT toIPv4('127.0.0.1') = toIPv6('::ffff:127.0.0.1'); +``` + +```text +┌─equals(toIPv4('127.0.0.1'), toIPv6('::ffff:127.0.0.1'))─┠+│ 1 │ +└─────────────────────────────────────────────────────────┘ +``` + +**関連項目** + +- [IPv4ãŠã‚ˆã³IPv6アドレスをæ“作ã™ã‚‹ãŸã‚ã®é–¢æ•°](../functions/ip-address-functions.md) diff --git a/docs/ja/sql-reference/data-types/ipv6.md b/docs/ja/sql-reference/data-types/ipv6.md new file mode 100644 index 00000000000..23bd92f0818 --- /dev/null +++ b/docs/ja/sql-reference/data-types/ipv6.md @@ -0,0 +1,74 @@ +--- +slug: /ja/sql-reference/data-types/ipv6 +sidebar_position: 30 +sidebar_label: IPv6 +--- + +## IPv6 + +IPv6アドレス。16ãƒã‚¤ãƒˆã¨ã—ã¦ä¿å­˜ã•ã‚Œã€UInt128ビッグエンディアンã§ã™ã€‚ + +### 基本的ãªä½¿ç”¨æ³• + +``` sql +CREATE TABLE hits (url String, from IPv6) ENGINE = MergeTree() ORDER BY url; + +DESCRIBE TABLE hits; +``` + +``` text +┌─name─┬─type───┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┠+│ url │ String │ │ │ │ │ +│ from │ IPv6 │ │ │ │ │ +└──────┴────────┴──────────────┴────────────────────┴─────────┴──────────────────┘ +``` + +ã¾ãŸã¯ã€`IPv6`ドメインをキーã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +``` sql +CREATE TABLE hits (url String, from IPv6) ENGINE = MergeTree() ORDER BY from; +``` + +`IPv6`ドメインã¯ã€IPv6文字列ã¨ã—ã¦ã®ã‚«ã‚¹ã‚¿ãƒ å…¥åŠ›ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™: + +``` sql +INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '2a02:aa08:e000:3100::2')('https://clickhouse.com', '2001:44c8:129:2632:33:0:252:2')('https://clickhouse.com/docs/ja/', '2a02:e980:1e::1'); + +SELECT * FROM hits; +``` + +``` text +┌─url────────────────────────────────┬─from──────────────────────────┠+│ https://clickhouse.com │ 2001:44c8:129:2632:33:0:252:2 │ +│ https://clickhouse.com/docs/ja/ │ 2a02:e980:1e::1 │ +│ https://wikipedia.org │ 2a02:aa08:e000:3100::2 │ +└────────────────────────────────────┴───────────────────────────────┘ +``` + +値ã¯ã‚³ãƒ³ãƒ‘クトãªãƒã‚¤ãƒŠãƒªå½¢å¼ã§ä¿å­˜ã•ã‚Œã¾ã™: + +``` sql +SELECT toTypeName(from), hex(from) FROM hits LIMIT 1; +``` + +``` text +┌─toTypeName(from)─┬─hex(from)────────────────────────┠+│ IPv6 │ 200144C8012926320033000002520002 │ +└──────────────────┴──────────────────────────────────┘ +``` + +IPv6アドレスã¯IPv4アドレスã¨ç›´æŽ¥æ¯”較ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```sql +SELECT toIPv4('127.0.0.1') = toIPv6('::ffff:127.0.0.1'); +``` + +```text +┌─equals(toIPv4('127.0.0.1'), toIPv6('::ffff:127.0.0.1'))─┠+│ 1 │ +└─────────────────────────────────────────────────────────┘ +``` + +**関連項目** + +- [IPv4ãŠã‚ˆã³IPv6アドレスをæ“作ã™ã‚‹ãŸã‚ã®é–¢æ•°](../functions/ip-address-functions.md) diff --git a/docs/ja/sql-reference/data-types/json.md b/docs/ja/sql-reference/data-types/json.md new file mode 100644 index 00000000000..eb2493b344b --- /dev/null +++ b/docs/ja/sql-reference/data-types/json.md @@ -0,0 +1,83 @@ +--- +slug: /ja/sql-reference/data-types/object-data-type +sidebar_position: 26 +sidebar_label: Object Data Type +keywords: [object, data type] +--- + +# Object Data Type (éžæŽ¨å¥¨) + +**ã“ã®æ©Ÿèƒ½ã¯æœ¬ç•ªç’°å¢ƒã§åˆ©ç”¨å¯èƒ½ãªçŠ¶æ…‹ã§ã¯ãªãã€ç¾åœ¨éžæŽ¨å¥¨ã§ã™ã€‚** JSON ドキュメントを扱ã†å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€[ã“ã®ã‚¬ã‚¤ãƒ‰](/docs/ja/integrations/data-formats/json/overview)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。JSON オブジェクトをサãƒãƒ¼ãƒˆã™ã‚‹æ–°ã—ã„実装ãŒé€²è¡Œä¸­ã§ã‚ã‚Šã€[ã“ã¡ã‚‰](https://github.com/ClickHouse/ClickHouse/issues/54864)ã§è¿½è·¡ã§ãã¾ã™ã€‚ + +
    + +JavaScript Object Notation (JSON) ドキュメントをå˜ä¸€ã®ã‚«ãƒ©ãƒ ã«æ ¼ç´ã—ã¾ã™ã€‚ + +`JSON` ã¯ã€[use_json_alias_for_old_object_type](../../operations/settings/settings.md#usejsonaliasforoldobjecttype) ãŒæœ‰åŠ¹ã®å ´åˆã€`Object('json')` ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ + +## 例 + +**例 1** + +`JSON` カラムをæŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ä¾‹: + +```sql +CREATE TABLE json +( + o JSON +) +ENGINE = Memory +``` + +```sql +INSERT INTO json VALUES ('{"a": 1, "b": { "c": 2, "d": [1, 2, 3] }}') +``` + +```sql +SELECT o.a, o.b.c, o.b.d[3] FROM json +``` + +```text +┌─o.a─┬─o.b.c─┬─arrayElement(o.b.d, 3)─┠+│ 1 │ 2 │ 3 │ +└─────┴───────┴────────────────────────┘ +``` + +**例 2** + +Ordered㪠`MergeTree` ファミリã®ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ãŸã‚ã«ã¯ã€ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’ãã®ã‚«ãƒ©ãƒ ã«æŠ½å‡ºã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€åœ§ç¸®ã•ã‚ŒãŸ JSON å½¢å¼ã® HTTP アクセスログファイルを挿入ã™ã‚‹ã«ã¯: + +```sql +CREATE TABLE logs +( + timestamp DateTime, + message JSON +) +ENGINE = MergeTree +ORDER BY timestamp +``` + +```sql +INSERT INTO logs +SELECT parseDateTimeBestEffort(JSONExtractString(json, 'timestamp')), json +FROM file('access.json.gz', JSONAsString) +``` + +## JSON カラムã®è¡¨ç¤º + +`JSON` カラムを表示ã™ã‚‹éš›ã€ClickHouse ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å€¤ã®ã¿ã‚’表示ã—ã¾ã™ï¼ˆå†…部的ã«ã¯ã‚¿ãƒ—ルã¨ã—ã¦è¡¨ç¾ã•ã‚Œã‚‹ãŸã‚)。フィールドåも表示ã™ã‚‹ã«ã¯ã€`output_format_json_named_tuples_as_objects = 1` を設定ã—ã¦ãã ã•ã„: + +```sql +SET output_format_json_named_tuples_as_objects = 1 + +SELECT * FROM json FORMAT JSONEachRow +``` + +```text +{"o":{"a":1,"b":{"c":2,"d":[1,2,3]}}} +``` + +## 関連コンテンツ + +- [ClickHouseã§ã®JSON利用](/ja/integrations/data-formats/json/overview) +- [ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿å–å¾— - パート2 - JSONã®è¿‚回](https://clickhouse.com/blog/getting-data-into-clickhouse-part-2-json) diff --git a/docs/ja/sql-reference/data-types/lowcardinality.md b/docs/ja/sql-reference/data-types/lowcardinality.md new file mode 100644 index 00000000000..4112b11418b --- /dev/null +++ b/docs/ja/sql-reference/data-types/lowcardinality.md @@ -0,0 +1,61 @@ +--- +slug: /ja/sql-reference/data-types/lowcardinality +sidebar_position: 42 +sidebar_label: LowCardinality(T) +--- + +# LowCardinality(T) + +ä»–ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®å†…部表ç¾ã‚’Dictionaryエンコードã§å¤‰æ›´ã—ã¾ã™ã€‚ + +## 構文 + +``` sql +LowCardinality(data_type) +``` + +**パラメータ** + +- `data_type` — [String](../../sql-reference/data-types/string.md), [FixedString](../../sql-reference/data-types/fixedstring.md), [Date](../../sql-reference/data-types/date.md), [DateTime](../../sql-reference/data-types/datetime.md)ã€ãŠã‚ˆã³ [Decimal](../../sql-reference/data-types/decimal.md) を除ã数値。 `LowCardinality` ã¯ä¸€éƒ¨ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«ã¯åŠ¹çŽ‡çš„ã§ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚[allow_suspicious_low_cardinality_types](../../operations/settings/settings.md#allow_suspicious_low_cardinality_types) ã®è¨­å®šèª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 説明 + +`LowCardinality` ã¯ãƒ‡ãƒ¼ã‚¿ã®ä¿å­˜æ–¹æ³•ã¨å‡¦ç†ãƒ«ãƒ¼ãƒ«ã‚’変更ã™ã‚‹ä¸Šä½æ§‹é€ ã§ã™ã€‚ClickHouse ã¯`LowCardinality`-カラム㫠[Dictionary コーディング](https://en.wikipedia.org/wiki/Dictionary_coder) ã‚’é©ç”¨ã—ã¾ã™ã€‚Dictionary エンコードã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’æ“作ã™ã‚‹ã¨ã€å¤šãã®ã‚¢ãƒ—リケーション㧠[SELECT](../../sql-reference/statements/select/index.md) クエリã®ãƒ‘フォーマンスãŒå¤§å¹…ã«å‘上ã—ã¾ã™ã€‚ + +`LowCardinality` データ型ã®ä½¿ç”¨åŠ¹çŽ‡ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®å¤šæ§˜æ€§ã«ä¾å­˜ã—ã¾ã™ã€‚Dictionary ã«1万未満ã®ç•°ãªã‚‹å€¤ãŒå«ã¾ã‚Œã‚‹å ´åˆã€ClickHouse ã¯ä¸»ã«ãƒ‡ãƒ¼ã‚¿ã®èª­ã¿å–ã‚Šã¨ä¿å­˜ã®åŠ¹çŽ‡ãŒé«˜ããªã‚Šã¾ã™ã€‚Dictionary ã«10万を超ãˆã‚‹ç•°ãªã‚‹å€¤ãŒå«ã¾ã‚Œã‚‹å ´åˆã€é€šå¸¸ã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’使用ã™ã‚‹æ–¹ãŒæ€§èƒ½ãŒä½Žä¸‹ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +文字列を扱ã†éš›ã«ã¯ã€[Enum](../../sql-reference/data-types/enum.md) ã®ä»£ã‚ã‚Šã« `LowCardinality` ã®ä½¿ç”¨ã‚’検討ã—ã¦ãã ã•ã„。`LowCardinality` ã¯ã‚ˆã‚ŠæŸ”軟ã«ä½¿ç”¨ã§ãã€ã—ã°ã—ã°åŒç­‰ã¾ãŸã¯ãれ以上ã®åŠ¹çŽ‡ã‚’発æ®ã—ã¾ã™ã€‚ + +## 例 + +`LowCardinality`-カラムをæŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™: + +``` sql +CREATE TABLE lc_t +( + `id` UInt16, + `strings` LowCardinality(String) +) +ENGINE = MergeTree() +ORDER BY id +``` + +## 関連ã™ã‚‹è¨­å®šã¨é–¢æ•° + +設定: + +- [low_cardinality_max_dictionary_size](../../operations/settings/settings.md#low_cardinality_max_dictionary_size) +- [low_cardinality_use_single_dictionary_for_part](../../operations/settings/settings.md#low_cardinality_use_single_dictionary_for_part) +- [low_cardinality_allow_in_native_format](../../operations/settings/settings.md#low_cardinality_allow_in_native_format) +- [allow_suspicious_low_cardinality_types](../../operations/settings/settings.md#allow_suspicious_low_cardinality_types) +- [output_format_arrow_low_cardinality_as_dictionary](../../operations/settings/settings.md#output-format-arrow-low-cardinality-as-dictionary) + +関数: + +- [toLowCardinality](../../sql-reference/functions/type-conversion-functions.md#tolowcardinality) + +## 関連コンテンツ + +- ブログ: [スキーマã¨ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã§ClickHouseを最é©åŒ–ã™ã‚‹](https://clickhouse.com/blog/optimize-clickhouse-codecs-compression-schema) +- ブログ: [ClickHouseã§ã‚¿ã‚¤ãƒ ã‚·ãƒªãƒ¼ã‚ºãƒ‡ãƒ¼ã‚¿ã‚’扱ã†](https://clickhouse.com/blog/working-with-time-series-data-and-functions-ClickHouse) +- [文字列最é©åŒ– (ロシア語ã®ãƒ“デオプレゼンテーション)](https://youtu.be/rqf-ILRgBdY?list=PL0Z2YDlm0b3iwXCpEFiOOYmwXzVmjJfEt). [英語ã®ã‚¹ãƒ©ã‚¤ãƒ‰](https://github.com/ClickHouse/clickhouse-presentations/raw/master/meetup19/string_optimization.pdf) diff --git a/docs/ja/sql-reference/data-types/map.md b/docs/ja/sql-reference/data-types/map.md new file mode 100644 index 00000000000..6be263a54f4 --- /dev/null +++ b/docs/ja/sql-reference/data-types/map.md @@ -0,0 +1,123 @@ +--- +slug: /ja/sql-reference/data-types/map +sidebar_position: 36 +sidebar_label: Map(K, V) +--- + +# Map(K, V) + +データ型 `Map(K, V)` ã¯ã‚­ãƒ¼ã¨å€¤ã®ãƒšã‚¢ã‚’æ ¼ç´ã—ã¾ã™ã€‚ + +ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ç•°ãªã‚Šã€ClickHouseã®ãƒžãƒƒãƒ—ã¯ä¸€æ„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã¤ã¾ã‚Šã€ãƒžãƒƒãƒ—ã«ã¯åŒã˜ã‚­ãƒ¼ã‚’æŒã¤2ã¤ã®è¦ç´ ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +(ãã®ç†ç”±ã¯ã€ãƒžãƒƒãƒ—ãŒå†…部的㫠`Array(Tuple(K, V))` ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã§ã™ã€‚) + +マップ `m` ã§ã‚­ãƒ¼ `k` ã®å€¤ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€æ§‹æ–‡ `m[k]` を使用ã§ãã¾ã™ã€‚ +ã¾ãŸã€`m[k]` ã¯ãƒžãƒƒãƒ—をスキャンã™ã‚‹ãŸã‚ã€æ“作ã®ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã¯ãƒžãƒƒãƒ—ã®ã‚µã‚¤ã‚ºã«å¯¾ã—ã¦ç·šå½¢ã§ã™ã€‚ + +**パラメータ** + +- `K` — マップキーã®åž‹ã€‚ä»»æ„ã®åž‹ã€‚ãŸã ã—ã€[Nullable](../../sql-reference/data-types/nullable.md) ãŠã‚ˆã³ [LowCardinality](../../sql-reference/data-types/lowcardinality.md) ㌠[Nullable](../../sql-reference/data-types/nullable.md) åž‹ã¨ãƒã‚¹ãƒˆã•ã‚Œã¦ã„ã‚‹å ´åˆã‚’除ã。 +- `V` — マップ値ã®åž‹ã€‚ä»»æ„ã®åž‹ã€‚ + +**例** + +マップ型ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +``` sql +CREATE TABLE tab (m Map(String, UInt64)) ENGINE=Memory; +INSERT INTO tab VALUES ({'key1':1, 'key2':10}), ({'key1':2,'key2':20}), ({'key1':3,'key2':30}); +``` + +`key2` ã®å€¤ã‚’é¸æŠžã—ã¾ã™ï¼š + +```sql +SELECT m['key2'] FROM tab; +``` + +çµæžœï¼š + +```text +┌─arrayElement(m, 'key2')─┠+│ 10 │ +│ 20 │ +│ 30 │ +└─────────────────────────┘ +``` + +è¦æ±‚ã•ã‚ŒãŸã‚­ãƒ¼ `k` ãŒãƒžãƒƒãƒ—ã«å«ã¾ã‚Œã¦ã„ãªã„å ´åˆã€`m[k]` ã¯åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€ãŸã¨ãˆã°æ•´æ•°åž‹ã®å ´åˆã¯ `0`ã€æ–‡å­—列型ã®å ´åˆã¯ `''` ã‚’è¿”ã—ã¾ã™ã€‚ +マップã«ã‚­ãƒ¼ãŒå­˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹ã‚’確èªã™ã‚‹ã«ã¯ã€é–¢æ•° [mapContains](../../sql-reference/functions/tuple-map-functions#mapcontains) を使用ã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE tab (m Map(String, UInt64)) ENGINE=Memory; +INSERT INTO tab VALUES ({'key1':100}), ({}); +SELECT m['key1'] FROM tab; +``` + +çµæžœï¼š + +```text +┌─arrayElement(m, 'key1')─┠+│ 100 │ +│ 0 │ +└─────────────────────────┘ +``` + +## Tuple ã‚’ Map ã«å¤‰æ›ã™ã‚‹ + +`Tuple()` åž‹ã®å€¤ã‚’ [CAST](../../sql-reference/functions/type-conversion-functions.md#type_conversion_function-cast) 関数を使用ã—㦠`Map()` åž‹ã®å€¤ã«ã‚­ãƒ£ã‚¹ãƒˆã§ãã¾ã™ï¼š + +**例** + +クエリ: + +``` sql +SELECT CAST(([1, 2, 3], ['Ready', 'Steady', 'Go']), 'Map(UInt8, String)') AS map; +``` + +çµæžœï¼š + +``` text +┌─map───────────────────────────┠+│ {1:'Ready',2:'Steady',3:'Go'} │ +└───────────────────────────────┘ +``` + +## マップã®ã‚µãƒ–カラムを読ã¿å–ã‚‹ + +マップ全体を読ã¿å–ã‚‹ã®ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€å ´åˆã«ã‚ˆã£ã¦ã¯ã‚µãƒ–カラム `keys` 㨠`values` を使用ã§ãã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +CREATE TABLE tab (m Map(String, UInt64)) ENGINE = Memory; +INSERT INTO tab VALUES (map('key1', 1, 'key2', 2, 'key3', 3)); + +SELECT m.keys FROM tab; -- mapKeys(m) ã¨åŒã˜ +SELECT m.values FROM tab; -- mapValues(m) ã¨åŒã˜ +``` + +çµæžœï¼š + +``` text +┌─m.keys─────────────────┠+│ ['key1','key2','key3'] │ +└────────────────────────┘ + +┌─m.values─┠+│ [1,2,3] │ +└──────────┘ +``` + +**関連項目** + +- [map()](../../sql-reference/functions/tuple-map-functions.md#function-map) 関数 +- [CAST()](../../sql-reference/functions/type-conversion-functions.md#type_conversion_function-cast) 関数 +- [-Map データ型用ã®ã‚³ãƒ³ãƒ“ãƒãƒ¼ã‚¿](../aggregate-functions/combinators.md#-map) + + +## 関連コンテンツ + +- ブログ: [Building an Observability Solution with ClickHouse - Part 2 - Traces](https://clickhouse.com/blog/storing-traces-and-spans-open-telemetry-in-clickhouse) + diff --git a/docs/ja/sql-reference/data-types/nested-data-structures/index.md b/docs/ja/sql-reference/data-types/nested-data-structures/index.md new file mode 100644 index 00000000000..14b79511dc8 --- /dev/null +++ b/docs/ja/sql-reference/data-types/nested-data-structures/index.md @@ -0,0 +1,105 @@ +--- +slug: /ja/sql-reference/data-types/nested-data-structures/nested +sidebar_position: 57 +sidebar_label: Nested(Name1 Type1, Name2 Type2, ...) +--- + +# Nested + +## Nested(name1 Type1, Name2 Type2, ...) + +ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã¯ã€ã‚»ãƒ«å†…ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚ˆã†ãªã‚‚ã®ã§ã™ã€‚ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®ãƒ‘ラメータã¨ã—ã¦ã€ã‚«ãƒ©ãƒ ã®åå‰ã¨åž‹ãŒã€[CREATE TABLE](../../../sql-reference/statements/create/table.md) クエリã§æŒ‡å®šã™ã‚‹ã®ã¨åŒæ§˜ã«æŒ‡å®šã•ã‚Œã¾ã™ã€‚å„テーブルã®è¡Œã¯ã€ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®ä»»æ„ã®æ•°ã®è¡Œã«å¯¾å¿œã§ãã¾ã™ã€‚ + +例: + +``` sql +CREATE TABLE test.visits +( + CounterID UInt32, + StartDate Date, + Sign Int8, + IsNew UInt8, + VisitID UInt64, + UserID UInt64, + ... + Goals Nested + ( + ID UInt32, + Serial UInt32, + EventTime DateTime, + Price Int64, + OrderID String, + CurrencyID UInt32 + ), + ... +) ENGINE = CollapsingMergeTree(StartDate, intHash32(UserID), (CounterID, StartDate, intHash32(UserID), VisitID), 8192, Sign) +``` + +ã“ã®ä¾‹ã§ã¯ã€`Goals` ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚’宣言ã—ã¦ãŠã‚Šã€ã‚³ãƒ³ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆé”æˆã•ã‚ŒãŸç›®æ¨™ï¼‰ã«é–¢ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚‘visits’ テーブルã®å„è¡Œã¯ã€0 ã‚‚ã—ãã¯ä»»æ„ã®æ•°ã®ã‚³ãƒ³ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«å¯¾å¿œå¯èƒ½ã§ã™ã€‚ + +[flatten_nested](../../../operations/settings/settings.md#flatten-nested) ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ãªã„ `0` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ä»»æ„ã®ãƒã‚¹ãƒˆãƒ¬ãƒ™ãƒ«ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +通常ã€ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚’扱ã†éš›ã«ã¯ã€ãã®ã‚«ãƒ©ãƒ ã¯ãƒ‰ãƒƒãƒˆã§åŒºåˆ‡ã‚‰ã‚ŒãŸã‚«ãƒ©ãƒ åã§æŒ‡å®šã•ã‚Œã¾ã™ã€‚ã“れらã®ã‚«ãƒ©ãƒ ã¯ä¸€è‡´ã™ã‚‹åž‹ã®é…列を構æˆã—ã¦ã„ã¾ã™ã€‚å˜ä¸€ã®ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ é…列ã¯åŒã˜é•·ã•ã‚’æŒã¡ã¾ã™ã€‚ + +例: + +``` sql +SELECT + Goals.ID, + Goals.EventTime +FROM test.visits +WHERE CounterID = 101500 AND length(Goals.ID) < 5 +LIMIT 10 +``` + +``` text +┌─Goals.ID───────────────────────┬─Goals.EventTime───────────────────────────────────────────────────────────────────────────┠+│ [1073752,591325,591325] │ ['2014-03-17 16:38:10','2014-03-17 16:38:48','2014-03-17 16:42:27'] │ +│ [1073752] │ ['2014-03-17 00:28:25'] │ +│ [1073752] │ ['2014-03-17 10:46:20'] │ +│ [1073752,591325,591325,591325] │ ['2014-03-17 13:59:20','2014-03-17 22:17:55','2014-03-17 22:18:07','2014-03-17 22:18:51'] │ +│ [] │ [] │ +│ [1073752,591325,591325] │ ['2014-03-17 11:37:06','2014-03-17 14:07:47','2014-03-17 14:36:21'] │ +│ [] │ [] │ +│ [] │ [] │ +│ [591325,1073752] │ ['2014-03-17 00:46:05','2014-03-17 00:46:05'] │ +│ [1073752,591325,591325,591325] │ ['2014-03-17 13:28:33','2014-03-17 13:30:26','2014-03-17 18:51:21','2014-03-17 18:51:45'] │ +└────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã¯ã€åŒã˜é•·ã•ã®è¤‡æ•°ã®ã‚«ãƒ©ãƒ é…列ã®é›†åˆã¨è€ƒãˆã‚‹ã®ãŒæœ€ã‚‚ç°¡å˜ã§ã™ã€‚ + +SELECT クエリã§ã€å€‹ã€…ã®ã‚«ãƒ©ãƒ ã§ã¯ãªãã€ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ å…¨ä½“ã®åå‰ã‚’指定ã§ãる唯一ã®å ´æ‰€ã¯ ARRAY JOIN å¥ã§ã™ã€‚詳細ã¯ã€ã€ŒARRAY JOIN å¥ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。例: + +``` sql +SELECT + Goal.ID, + Goal.EventTime +FROM test.visits +ARRAY JOIN Goals AS Goal +WHERE CounterID = 101500 AND length(Goals.ID) < 5 +LIMIT 10 +``` + +``` text +┌─Goal.ID─┬──────Goal.EventTime─┠+│ 1073752 │ 2014-03-17 16:38:10 │ +│ 591325 │ 2014-03-17 16:38:48 │ +│ 591325 │ 2014-03-17 16:42:27 │ +│ 1073752 │ 2014-03-17 00:28:25 │ +│ 1073752 │ 2014-03-17 10:46:20 │ +│ 1073752 │ 2014-03-17 13:59:20 │ +│ 591325 │ 2014-03-17 22:17:55 │ +│ 591325 │ 2014-03-17 22:18:07 │ +│ 591325 │ 2014-03-17 22:18:51 │ +│ 1073752 │ 2014-03-17 11:37:06 │ +└─────────┴─────────────────────┘ +``` + +ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ å…¨ä½“ã«å¯¾ã—㦠SELECT を実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã“ã‚Œã«å«ã¾ã‚Œã‚‹å€‹ã€…ã®ã‚«ãƒ©ãƒ ã‚’明示的ã«ãƒªã‚¹ãƒˆã™ã‚‹ã“ã¨ã—ã‹ã§ãã¾ã›ã‚“。 + +INSERT クエリã®å ´åˆã€ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®æ§‹æˆè¦ç´ ã‚«ãƒ©ãƒ é…列を個別ã«ï¼ˆã¾ã‚‹ã§å€‹ã€…ã®ã‚«ãƒ©ãƒ é…列ã§ã‚ã‚‹ã‹ã®ã‚ˆã†ã«ï¼‰æ¸¡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚挿入時ã«ã€ã‚·ã‚¹ãƒ†ãƒ ã¯ã“れらãŒåŒã˜é•·ã•ã§ã‚ã‚‹ã“ã¨ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +DESCRIBE クエリã§ã¯ã€ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ å†…ã®ã‚«ãƒ©ãƒ ã¯åŒæ§˜ã«å€‹åˆ¥ã«ãƒªã‚¹ãƒˆã•ã‚Œã¾ã™ã€‚ + +ãƒã‚¹ãƒˆã—ãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ å†…ã®è¦ç´ ã«å¯¾ã™ã‚‹ ALTER クエリã«ã¯åˆ¶é™ãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/data-types/newjson.md b/docs/ja/sql-reference/data-types/newjson.md new file mode 100644 index 00000000000..5581ee32388 --- /dev/null +++ b/docs/ja/sql-reference/data-types/newjson.md @@ -0,0 +1,696 @@ +--- +slug: /ja/sql-reference/data-types/newjson +sidebar_position: 63 +sidebar_label: JSON +keywords: [json, data type] +--- + +# JSON データ型 + +JavaScript Object Notation (JSON) ドキュメントをå˜ä¸€ã®ã‚«ãƒ©ãƒ ã«ä¿å­˜ã—ã¾ã™ã€‚ + +:::note +ã“ã®æ©Ÿèƒ½ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªã‚‚ã®ã§ã‚ã‚Šã€å®Ÿç¨¼åƒç’°å¢ƒã«ã¯é©ã—ã¦ã„ã¾ã›ã‚“。JSON ドキュメントを扱ã†å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€[ã“ã®ã‚¬ã‚¤ãƒ‰](/docs/ja/integrations/data-formats/json/overview)ã®ä½¿ç”¨ã‚’検討ã—ã¦ãã ã•ã„。 +JSON 型を使用ã™ã‚‹ã«ã¯ã€`allow_experimental_json_type = 1` を設定ã—ã¦ãã ã•ã„。 +::: + +`JSON` åž‹ã®ã‚«ãƒ©ãƒ ã‚’宣言ã™ã‚‹ã«ã¯ã€æ¬¡ã®æ§‹æ–‡ã‚’使用ã—ã¾ã™ï¼š + +``` sql + JSON(max_dynamic_paths=N, max_dynamic_types=M, some.path TypeName, SKIP path.to.skip, SKIP REGEXP 'paths_regexp') +``` +ã“ã“ã§ï¼š +- `max_dynamic_paths` ã¯ã€å˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロック(ãŸã¨ãˆã°ã€MergeTree テーブルã®å˜ä¸€ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ï¼‰ã«æ¸¡ã£ã¦ã‚µãƒ–カラムã¨ã—ã¦åˆ¥ã€…ã«ä¿å­˜ã§ãるパスã®æ•°ã‚’示ã™ä»»æ„ã®ãƒ‘ラメータã§ã™ã€‚ã“ã®åˆ¶é™ã‚’超ãˆã‚‹ã¨ã€ä»–ã®ãƒ‘スã¯ã™ã¹ã¦å˜ä¸€ã®æ§‹é€ ã«ã¾ã¨ã‚ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚`max_dynamic_paths` ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ `1024` ã§ã™ã€‚ +- `max_dynamic_types` ã¯ã€ã‚¿ã‚¤ãƒ— `Dynamic` ã®å˜ä¸€ãƒ‘スカラム内ã«ä¿å­˜ã§ãã‚‹ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã®æ•°ã‚’示㙠`1` ã‹ã‚‰ `255` ã®é–“ã®ä»»æ„ã®ãƒ‘ラメータã§ã™ã€‚ã“ã®åˆ¶é™ã‚’超ãˆã‚‹ã¨ã€æ–°ã—ã„タイプã¯ã™ã¹ã¦ `String` åž‹ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚`max_dynamic_types` ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ `32` ã§ã™ã€‚ +- `some.path TypeName` 㯠JSON 内ã®ç‰¹å®šã®ãƒ‘スã«å¯¾ã™ã‚‹ä»»æ„ã®åž‹ãƒ’ントã§ã™ã€‚ãã®ã‚ˆã†ãªãƒ‘スã¯å¸¸ã«æŒ‡å®šã•ã‚ŒãŸåž‹ã®ã‚µãƒ–カラムã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚ +- `SKIP path.to.skip` ã¯ã€JSON パース中ã«ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã‚‹ã¹ã特定ã®ãƒ‘スã®ãŸã‚ã®ä»»æ„ã®ãƒ’ントã§ã™ã€‚ãã®ã‚ˆã†ãªãƒ‘ス㯠JSON カラムã«ä¿å­˜ã•ã‚Œã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。指定ã•ã‚ŒãŸãƒ‘スãŒãƒã‚¹ãƒˆã•ã‚ŒãŸ JSON オブジェクトã§ã‚ã‚‹å ´åˆã€ãƒã‚¹ãƒˆã•ã‚ŒãŸå…¨ä½“ã®ã‚ªãƒ–ジェクトãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +- `SKIP REGEXP 'path_regexp'` ã¯ã€JSON パース中ã«ãƒ‘スをスキップã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æ­£è¦è¡¨ç¾ã‚’æŒã¤ä»»æ„ã®ãƒ’ントã§ã™ã€‚ã“ã®æ­£è¦è¡¨ç¾ã¨ä¸€è‡´ã™ã‚‹ã™ã¹ã¦ã®ãƒ‘ス㯠JSON カラムã«ä¿å­˜ã•ã‚Œã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## JSON ã®ä½œæˆ + +テーブルカラム定義㧠`JSON` 型を使用ã™ã‚‹ï¼š + +```sql +CREATE TABLE test (json JSON) ENGINE = Memory; +INSERT INTO test VALUES ('{"a" : {"b" : 42}, "c" : [1, 2, 3]}'), ('{"f" : "Hello, World!"}'), ('{"a" : {"b" : 43, "e" : 10}, "c" : [4, 5, 6]}'); +SELECT json FROM test; +``` + +```text +┌─json────────────────────────────────────────┠+│ {"a":{"b":"42"},"c":["1","2","3"]} │ +│ {"f":"Hello, World!"} │ +│ {"a":{"b":"43","e":"10"},"c":["4","5","6"]} │ +└─────────────────────────────────────────────┘ +``` + +```sql +CREATE TABLE test (json JSON(a.b UInt32, SKIP a.e)) ENGINE = Memory; +INSERT INTO test VALUES ('{"a" : {"b" : 42}, "c" : [1, 2, 3]}'), ('{"f" : "Hello, World!"}'), ('{"a" : {"b" : 43, "e" : 10}, "c" : [4, 5, 6]}'); +SELECT json FROM test; +``` + +```text +┌─json──────────────────────────────┠+│ {"a":{"b":42},"c":[1,2,3]} │ +│ {"a":{"b":0},"f":"Hello, World!"} │ +│ {"a":{"b":43},"c":[4,5,6]} │ +└───────────────────────────────────┘ +``` + +`String` ã‹ã‚‰ã® CAST を使用ã™ã‚‹ï¼š + +```sql +SELECT '{"a" : {"b" : 42},"c" : [1, 2, 3], "d" : "Hello, World!"}'::JSON AS json; +``` + +```text +┌─json───────────────────────────────────────────┠+│ {"a":{"b":42},"c":[1,2,3],"d":"Hello, World!"} │ +└────────────────────────────────────────────────┘ +``` + +`Tuple` ã‹ã‚‰ã® CAST を使用ã™ã‚‹ï¼š + +```sql +SELECT (tuple(42 AS b) AS a, [1, 2, 3] AS c, 'Hello, World!' AS d)::JSON AS json; +``` + +```text +┌─json───────────────────────────────────────────┠+│ {"a":{"b":42},"c":[1,2,3],"d":"Hello, World!"} │ +└────────────────────────────────────────────────┘ +``` + +`Map` ã‹ã‚‰ã® CAST を使用ã™ã‚‹ï¼š + +```sql +SELECT map('a', map('b', 42), 'c', [1,2,3], 'd', 'Hello, World!')::JSON AS json; +``` + +```text +┌─json───────────────────────────────────────────┠+│ {"a":{"b":42},"c":[1,2,3],"d":"Hello, World!"} │ +└────────────────────────────────────────────────┘ +``` + +éžæŽ¨å¥¨ã® `Object('json')` ã‹ã‚‰ã® CAST を使用ã™ã‚‹ï¼š + +```sql + SELECT '{"a" : {"b" : 42},"c" : [1, 2, 3], "d" : "Hello, World!"}'::Object('json')::JSON AS json; + ``` + +```text +┌─json───────────────────────────────────────────┠+│ {"a":{"b":42},"c":[1,2,3],"d":"Hello, World!"} │ +└────────────────────────────────────────────────┘ +``` + +:::note +`Tuple`/`Map`/`Object('json')` ã‹ã‚‰ `JSON` ã¸ã® CAST ã¯ã€ã‚«ãƒ©ãƒ ã‚’ `String` カラムã«ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã—㦠JSON オブジェクトをå«ã‚ã€ãれを `JSON` åž‹ã®ã‚«ãƒ©ãƒ ã«ãƒ‡ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã™ã‚‹ã“ã¨ã§å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +ç•°ãªã‚‹å¼•æ•°ã‚’æŒã¤ `JSON` åž‹é–“ã® CAST ã¯å¾Œã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +## サブカラムã¨ã—ã¦ã® JSON パスã®èª­ã¿å–ã‚Š + +JSON åž‹ã¯ã€ã™ã¹ã¦ã®ãƒ‘スを別ã®ã‚µãƒ–カラムã¨ã—ã¦èª­ã‚€ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚JSON åž‹ã®å®£è¨€ã§è¦æ±‚ã•ã‚ŒãŸãƒ‘スã®åž‹ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãã®ãƒ‘スã®ã‚µãƒ–カラムã¯å¸¸ã« [Dynamic](/docs/ja/sql-reference/data-types/dynamic.md) åž‹ã‚’æŒã¡ã¾ã™ã€‚ + +例: + +```sql +CREATE TABLE test (json JSON(a.b UInt32, SKIP a.e)) ENGINE = Memory; +INSERT INTO test VALUES ('{"a" : {"b" : 42, "g" : 42.42}, "c" : [1, 2, 3], "d" : "2020-01-01"}'), ('{"f" : "Hello, World!", "d" : "2020-01-02"}'), ('{"a" : {"b" : 43, "e" : 10, "g" : 43.43}, "c" : [4, 5, 6]}'); +SELECT json FROM test; +``` + +```text +┌─json──────────────────────────────────────────────────┠+│ {"a":{"b":42,"g":42.42},"c":[1,2,3],"d":"2020-01-01"} │ +│ {"a":{"b":0},"d":"2020-01-02","f":"Hello, World!"} │ +│ {"a":{"b":43,"g":43.43},"c":[4,5,6]} │ +└───────────────────────────────────────────────────────┘ +``` + +```sql +SELECT json.a.b, json.a.g, json.c, json.d FROM test; +``` + +```text +┌─json.a.b─┬─json.a.g─┬─json.c──┬─json.d─────┠+│ 42 │ 42.42 │ [1,2,3] │ 2020-01-01 │ +│ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 2020-01-02 │ +│ 43 │ 43.43 │ [4,5,6] │ á´ºáµá´¸á´¸ │ +└──────────┴──────────┴─────────┴────────────┘ +``` + +è¦æ±‚ã•ã‚ŒãŸãƒ‘スãŒãƒ‡ãƒ¼ã‚¿å†…ã«è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ãれ㯠`NULL` 値ã§åŸ‹ã‚られã¾ã™ï¼š + +```sql +SELECT json.non.existing.path FROM test; +``` + +```text +┌─json.non.existing.path─┠+│ á´ºáµá´¸á´¸ │ +│ á´ºáµá´¸á´¸ │ +│ á´ºáµá´¸á´¸ │ +└────────────────────────┘ +``` + +è¿”ã•ã‚ŒãŸã‚µãƒ–カラムã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’確èªã—ã¦ã¿ã¾ã—ょã†ï¼š +```sql +SELECT toTypeName(json.a.b), toTypeName(json.a.g), toTypeName(json.c), toTypeName(json.d) FROM test; +``` + +```text +┌─toTypeName(json.a.b)─┬─toTypeName(json.a.g)─┬─toTypeName(json.c)─┬─toTypeName(json.d)─┠+│ UInt32 │ Dynamic │ Dynamic │ Dynamic │ +│ UInt32 │ Dynamic │ Dynamic │ Dynamic │ +│ UInt32 │ Dynamic │ Dynamic │ Dynamic │ +└──────────────────────┴──────────────────────┴────────────────────┴────────────────────┘ +``` + +ã”覧ã®é€šã‚Šã€`a.b` ã®ã‚¿ã‚¤ãƒ—㯠JSON 型宣言ã§æŒ‡å®šã—㟠`UInt32` ã§ã‚ã‚Šã€ä»–ã®ã‚µãƒ–カラムã®ã‚¿ã‚¤ãƒ—ã¯ã™ã¹ã¦ `Dynamic` ã§ã™ã€‚ + +`Dynamic` 型サブカラムを特別ãªæ§‹æ–‡ `json.some.path.:TypeName` を使ã£ã¦èª­ã¿å–ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼š + +```sql +select json.a.g.:Float64, dynamicType(json.a.g), json.d.:Date, dynamicType(json.d) FROM test; +``` + +```text +┌─json.a.g.:`Float64`─┬─dynamicType(json.a.g)─┬─json.d.:`Date`─┬─dynamicType(json.d)─┠+│ 42.42 │ Float64 │ 2020-01-01 │ Date │ +│ á´ºáµá´¸á´¸ │ None │ 2020-01-02 │ Date │ +│ 43.43 │ Float64 │ á´ºáµá´¸á´¸ │ None │ +└─────────────────────┴───────────────────────┴────────────────┴─────────────────────┘ +``` + +`Dynamic` サブカラムã¯ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«ã‚­ãƒ£ã‚¹ãƒˆå¯èƒ½ã§ã™ã€‚ã“ã®å ´åˆã€`Dynamic` 内部ã®åž‹ãŒè¦æ±‚ã•ã‚ŒãŸåž‹ã«ã‚­ãƒ£ã‚¹ãƒˆã§ããªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ï¼š + +```sql +select json.a.g::UInt64 as uint FROM test; +``` + +```text +┌─uint─┠+│ 42 │ +│ 0 │ +│ 43 │ +└──────┘ +``` + +```sql +select json.a.g::UUID as float FROM test; +``` + +```text +Received exception: +Code: 48. DB::Exception: Conversion between numeric types and UUID is not supported. Probably the passed UUID is unquoted: while executing 'FUNCTION CAST(__table1.json.a.g :: 2, 'UUID'_String :: 1) -> CAST(__table1.json.a.g, 'UUID'_String) UUID : 0'. (NOT_IMPLEMENTED) +``` + +## サブカラムã¨ã—ã¦ã® JSON サブオブジェクトã®èª­ã¿å–ã‚Š + +JSON åž‹ã¯ã€ç‰¹æ®Šãªæ§‹æ–‡ `json.^some.path` を使用ã—ã¦ã€ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚ªãƒ–ジェクトを `JSON` åž‹ã®ã‚µãƒ–カラムã¨ã—ã¦èª­ã‚€ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ï¼š + +```sql +CREATE TABLE test (json JSON) ENGINE = Memory; +INSERT INTO test VALUES ('{"a" : {"b" : {"c" : 42, "g" : 42.42}}, "c" : [1, 2, 3], "d" : {"e" : {"f" : {"g" : "Hello, World", "h" : [1, 2, 3]}}}}'), ('{"f" : "Hello, World!", "d" : {"e" : {"f" : {"h" : [4, 5, 6]}}}}'), ('{"a" : {"b" : {"c" : 43, "e" : 10, "g" : 43.43}}, "c" : [4, 5, 6]}'); +SELECT json FROM test; +``` + +```text +┌─json────────────────────────────────────────────────────────────────────────────────────────┠+│ {"a":{"b":{"c":42,"g":42.42}},"c":[1,2,3],"d":{"e":{"f":{"g":"Hello, World","h":[1,2,3]}}}} │ +│ {"d":{"e":{"f":{"h":[4,5,6]}}},"f":"Hello, World!"} │ +│ {"a":{"b":{"c":43,"e":10,"g":43.43}},"c":[4,5,6]} │ +└─────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +```sql +SELECT json.^a.b, json.^d.e.f FROM test; +``` + +```text +┌─json.^`a`.b───────────────┬─json.^`d`.e.f────────────────────┠+│ {"c":42,"g":42.42} │ {"g":"Hello, World","h":[1,2,3]} │ +│ {} │ {"h":[4,5,6]} │ +│ {"c":43,"e":10,"g":43.43} │ {} │ +└───────────────────────────┴──────────────────────────────────┘ +``` + +:::note +サブオブジェクトをサブカラムã¨ã—ã¦èª­ã¿å–ã‚‹ã“ã¨ã¯éžåŠ¹çŽ‡çš„ã§ã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。JSON データã®ã»ã¼å®Œå…¨ãªã‚¹ã‚­ãƒ£ãƒ³ã‚’å¿…è¦ã¨ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## パスã®åž‹æŽ¨è«– + +JSON パース中ã€ClickHouse ã¯å„ JSON パスã«æœ€é©ãªãƒ‡ãƒ¼ã‚¿åž‹ã‚’検出ã—よã†ã¨ã—ã¾ã™ã€‚ã“れ㯠[入力データã‹ã‚‰ã®è‡ªå‹•ã‚¹ã‚­ãƒ¼ãƒžæŽ¨è«–](/docs/ja/interfaces/schema-inference.md) ã¨åŒæ§˜ã«æ©Ÿèƒ½ã—ã€åŒã˜è¨­å®šã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ï¼š + +- [input_format_try_infer_integers](/docs/ja/interfaces/schema-inference.md#inputformattryinferintegers) +- [input_format_try_infer_dates](/docs/ja/interfaces/schema-inference.md#inputformattryinferdates) +- [input_format_try_infer_datetimes](/docs/ja/interfaces/schema-inference.md#inputformattryinferdatetimes) +- [schema_inference_make_columns_nullable](/docs/ja/interfaces/schema-inference.md#schemainferencemakecolumnsnullable) +- [input_format_json_try_infer_numbers_from_strings](/docs/ja/interfaces/schema-inference.md#inputformatjsontryinfernumbersfromstrings) +- [input_format_json_infer_incomplete_types_as_strings](/docs/ja/interfaces/schema-inference.md#inputformatjsoninferincompletetypesasstrings) +- [input_format_json_read_numbers_as_strings](/docs/ja/interfaces/schema-inference.md#inputformatjsonreadnumbersasstrings) +- [input_format_json_read_bools_as_strings](/docs/ja/interfaces/schema-inference.md#inputformatjsonreadboolsasstrings) +- [input_format_json_read_bools_as_numbers](/docs/ja/interfaces/schema-inference.md#inputformatjsonreadboolsasnumbers) +- [input_format_json_read_arrays_as_strings](/docs/ja/interfaces/schema-inference.md#inputformatjsonreadarraysasstrings) + +ã„ãã¤ã‹ã®ä¾‹ã‚’見ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT JSONAllPathsWithTypes('{"a" : "2020-01-01", "b" : "2020-01-01 10:00:00"}'::JSON) AS paths_with_types settings input_format_try_infer_dates=1, input_format_try_infer_datetimes=1; +``` + +```text +┌─paths_with_types─────────────────┠+│ {'a':'Date','b':'DateTime64(9)'} │ +└──────────────────────────────────┘ +``` + +```sql +SELECT JSONAllPathsWithTypes('{"a" : "2020-01-01", "b" : "2020-01-01 10:00:00"}'::JSON) AS paths_with_types settings input_format_try_infer_dates=0, input_format_try_infer_datetimes=0; +``` + +```text +┌─paths_with_types────────────┠+│ {'a':'String','b':'String'} │ +└─────────────────────────────┘ +``` + +```sql +SELECT JSONAllPathsWithTypes('{"a" : [1, 2, 3]}'::JSON) AS paths_with_types settings schema_inference_make_columns_nullable=1; +``` + +```text +┌─paths_with_types───────────────┠+│ {'a':'Array(Nullable(Int64))'} │ +└────────────────────────────────┘ +``` + +```sql +SELECT JSONAllPathsWithTypes('{"a" : [1, 2, 3]}'::JSON) AS paths_with_types settings schema_inference_make_columns_nullable=0; +``` + +```text +┌─paths_with_types─────┠+│ {'a':'Array(Int64)'} │ +└──────────────────────┘ +``` + +## JSON オブジェクトã®é…列ã®æ‰±ã„ + +オブジェクトã®é…列をå«ã‚€ JSON パス㯠`Array(JSON)` åž‹ã¨ã—ã¦ãƒ‘ースã•ã‚Œã€`Dynamic` カラムã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ã“ã®é…列を読ã¿å–ã‚‹ã«ã¯ã€`Dynamic` カラムã‹ã‚‰ã‚µãƒ–カラムã¨ã—ã¦æŠ½å‡ºã§ãã¾ã™ï¼š + +```sql +CREATE TABLE test (json JSON) ENGINE = Memory; +INSERT INTO test VALUES +('{"a" : {"b" : [{"c" : 42, "d" : "Hello", "f" : [[{"g" : 42.42}]], "k" : {"j" : 1000}}, {"c" : 43}, {"e" : [1, 2, 3], "d" : "My", "f" : [[{"g" : 43.43, "h" : "2020-01-01"}]], "k" : {"j" : 2000}}]}}'), +('{"a" : {"b" : [1, 2, 3]}}'), +('{"a" : {"b" : [{"c" : 44, "f" : [[{"h" : "2020-01-02"}]]}, {"e" : [4, 5, 6], "d" : "World", "f" : [[{"g" : 44.44}]], "k" : {"j" : 3000}}]}}'); +SELECT json FROM test; +``` + +```text3 +┌─json────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ {"a":{"b":[{"c":"42","d":"Hello","f":[[{"g":42.42}]],"k":{"j":"1000"}},{"c":"43"},{"d":"My","e":["1","2","3"],"f":[[{"g":43.43,"h":"2020-01-01"}]],"k":{"j":"2000"}}]}} │ +│ {"a":{"b":["1","2","3"]}} │ +│ {"a":{"b":[{"c":"44","f":[[{"h":"2020-01-02"}]]},{"d":"World","e":["4","5","6"],"f":[[{"g":44.44}]],"k":{"j":"3000"}}]}} │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +```sql +SELECT json.a.b, dynamicType(json.a.b) FROM test; +``` + +```text +┌─json.a.b──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─dynamicType(json.a.b)────────────────────────────────────┠+│ ['{"c":"42","d":"Hello","f":[[{"g":42.42}]],"k":{"j":"1000"}}','{"c":"43"}','{"d":"My","e":["1","2","3"],"f":[[{"g":43.43,"h":"2020-01-01"}]],"k":{"j":"2000"}}'] │ Array(JSON(max_dynamic_types=16, max_dynamic_paths=256)) │ +│ [1,2,3] │ Array(Nullable(Int64)) │ +│ ['{"c":"44","f":[[{"h":"2020-01-02"}]]}','{"d":"World","e":["4","5","6"],"f":[[{"g":44.44}]],"k":{"j":"3000"}}'] │ Array(JSON(max_dynamic_types=16, max_dynamic_paths=256)) │ +└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────┘ +``` + +ã”覧ã®é€šã‚Šã€ãƒã‚¹ãƒˆã•ã‚ŒãŸ `JSON` åž‹ã® `max_dynamic_types/max_dynamic_paths` パラメータã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚ˆã‚Šã‚‚削減ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒã‚¹ãƒˆã•ã‚ŒãŸ JSON オブジェクトã®é…列ã«ãŠã„ã¦ã‚µãƒ–カラムã®æ•°ãŒç„¡åˆ¶å¾¡ã«å¢—加ã™ã‚‹ã®ã‚’防ããŸã‚ã§ã™ã€‚ + +ã“ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸ `JSON` カラムã‹ã‚‰ã‚µãƒ–カラムを読ã¿å–ã£ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT json.a.b.:`Array(JSON)`.c, json.a.b.:`Array(JSON)`.f, json.a.b.:`Array(JSON)`.d FROM test; +``` + +```text +┌─json.a.b.:`Array(JSON)`.c─┬─json.a.b.:`Array(JSON)`.f───────────────────────────────────┬─json.a.b.:`Array(JSON)`.d─┠+│ [42,43,NULL] │ [[['{"g":42.42}']],NULL,[['{"g":43.43,"h":"2020-01-01"}']]] │ ['Hello',NULL,'My'] │ +│ [] │ [] │ [] │ +│ [44,NULL] │ [[['{"h":"2020-01-02"}']],[['{"g":44.44}']]] │ [NULL,'World'] │ +└───────────────────────────┴─────────────────────────────────────────────────────────────┴───────────────────────────┘ +``` + +`Array(JSON)` サブカラムåを書ãã®ã‚’é¿ã‘ã‚‹ãŸã‚ã«ç‰¹åˆ¥ãªæ§‹æ–‡ã‚’使用ã§ãã¾ã™ï¼š + +```sql +SELECT json.a.b[].c, json.a.b[].f, json.a.b[].d FROM test; +``` + +```text +┌─json.a.b.:`Array(JSON)`.c─┬─json.a.b.:`Array(JSON)`.f───────────────────────────────────┬─json.a.b.:`Array(JSON)`.d─┠+│ [42,43,NULL] │ [[['{"g":42.42}']],NULL,[['{"g":43.43,"h":"2020-01-01"}']]] │ ['Hello',NULL,'My'] │ +│ [] │ [] │ [] │ +│ [44,NULL] │ [[['{"h":"2020-01-02"}']],[['{"g":44.44}']]] │ [NULL,'World'] │ +└───────────────────────────┴─────────────────────────────────────────────────────────────┴───────────────────────────┘ +``` + +パスã®å¾Œã«ç¶šã `[]` ã®æ•°ã¯é…列レベルを示ã—ã¾ã™ã€‚`json.path[][]` 㯠`json.path.:Array(Array(JSON))` ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +`Array(JSON)` 内ã®ãƒ‘スã¨ãã®åž‹ã‚’確èªã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT DISTINCT arrayJoin(JSONAllPathsWithTypes(arrayJoin(json.a.b[]))) FROM test; +``` + +```text +┌─arrayJoin(JSONAllPathsWithTypes(arrayJoin(json.a.b.:`Array(JSON)`)))──┠+│ ('c','Int64') │ +│ ('d','String') │ +│ ('f','Array(Array(JSON(max_dynamic_types=8, max_dynamic_paths=64)))') │ +│ ('k.j','Int64') │ +│ ('e','Array(Nullable(Int64))') │ +└───────────────────────────────────────────────────────────────────────┘ +``` + +`Array(JSON)` カラムã‹ã‚‰ã‚µãƒ–カラムを読ã¿å–ã£ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT json.a.b[].c.:Int64, json.a.b[].f[][].g.:Float64, json.a.b[].f[][].h.:Date FROM test; +``` + +```text +┌─json.a.b.:`Array(JSON)`.c.:`Int64`─┬─json.a.b.:`Array(JSON)`.f.:`Array(Array(JSON))`.g.:`Float64`─┬─json.a.b.:`Array(JSON)`.f.:`Array(Array(JSON))`.h.:`Date`─┠+│ [42,43,NULL] │ [[[42.42]],[],[[43.43]]] │ [[[NULL]],[],[['2020-01-01']]] │ +│ [] │ [] │ [] │ +│ [44,NULL] │ [[[NULL]],[[44.44]]] │ [[['2020-01-02']],[[NULL]]] │ +└────────────────────────────────────┴──────────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────────┘ +``` + +ãƒã‚¹ãƒˆã•ã‚ŒãŸ `JSON` カラムã‹ã‚‰ã‚µãƒ–オブジェクトサブカラムを読ã¿å–ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +```sql +SELECT json.a.b[].^k FROM test +``` + +```text +┌─json.a.b.:`Array(JSON)`.^`k`─────────┠+│ ['{"j":"1000"}','{}','{"j":"2000"}'] │ +│ [] │ +│ ['{}','{"j":"3000"}'] │ +└──────────────────────────────────────┘ +``` + +## データã‹ã‚‰ã® JSON åž‹ã®èª­ã¿å–ã‚Š + +ã™ã¹ã¦ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆï¼ˆJSONEachRowã€TSVã€CSVã€CustomSeparatedã€Values ãªã©ï¼‰ã¯ `JSON` åž‹ã®èª­ã¿å–りをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +例: + +```sql +SELECT json FROM format(JSONEachRow, 'json JSON(a.b.c UInt32, SKIP a.b.d, SKIP d.e, SKIP REGEXP \'b.*\')', ' +{"json" : {"a" : {"b" : {"c" : 1, "d" : [0, 1]}}, "b" : "2020-01-01", "c" : 42, "d" : {"e" : {"f" : ["s1", "s2"]}, "i" : [1, 2, 3]}}} +{"json" : {"a" : {"b" : {"c" : 2, "d" : [2, 3]}}, "b" : [1, 2, 3], "c" : null, "d" : {"e" : {"g" : 43}, "i" : [4, 5, 6]}}} +{"json" : {"a" : {"b" : {"c" : 3, "d" : [4, 5]}}, "b" : {"c" : 10}, "e" : "Hello, World!"}} +{"json" : {"a" : {"b" : {"c" : 4, "d" : [6, 7]}}, "c" : 43}} +{"json" : {"a" : {"b" : {"c" : 5, "d" : [8, 9]}}, "b" : {"c" : 11, "j" : [1, 2, 3]}, "d" : {"e" : {"f" : ["s3", "s4"], "g" : 44}, "h" : "2020-02-02 10:00:00"}}} +') +``` + +```text +┌─json──────────────────────────────────────────────────────────┠+│ {"a":{"b":{"c":1}},"c":"42","d":{"i":["1","2","3"]}} │ +│ {"a":{"b":{"c":2}},"d":{"i":["4","5","6"]}} │ +│ {"a":{"b":{"c":3}},"e":"Hello, World!"} │ +│ {"a":{"b":{"c":4}},"c":"43"} │ +│ {"a":{"b":{"c":5}},"d":{"h":"2020-02-02 10:00:00.000000000"}} │ +└───────────────────────────────────────────────────────────────┘ +``` + +CSV/TSV/etc ã®ã‚ˆã†ãªãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯ã€`JSON` 㯠JSON オブジェクトをå«ã‚€æ–‡å­—列ã‹ã‚‰ãƒ‘ースã•ã‚Œã¾ã™ã€‚ + +```sql +SELECT json FROM format(TSV, 'json JSON(a.b.c UInt32, SKIP a.b.d, SKIP REGEXP \'b.*\')', +'{"a" : {"b" : {"c" : 1, "d" : [0, 1]}}, "b" : "2020-01-01", "c" : 42, "d" : {"e" : {"f" : ["s1", "s2"]}, "i" : [1, 2, 3]}} +{"a" : {"b" : {"c" : 2, "d" : [2, 3]}}, "b" : [1, 2, 3], "c" : null, "d" : {"e" : {"g" : 43}, "i" : [4, 5, 6]}} +{"a" : {"b" : {"c" : 3, "d" : [4, 5]}}, "b" : {"c" : 10}, "e" : "Hello, World!"} +{"a" : {"b" : {"c" : 4, "d" : [6, 7]}}, "c" : 43} +{"a" : {"b" : {"c" : 5, "d" : [8, 9]}}, "b" : {"c" : 11, "j" : [1, 2, 3]}, "d" : {"e" : {"f" : ["s3", "s4"], "g" : 44}, "h" : "2020-02-02 10:00:00"}}') +``` + +```text +┌─json──────────────────────────────────────────────────────────┠+│ {"a":{"b":{"c":1}},"c":"42","d":{"i":["1","2","3"]}} │ +│ {"a":{"b":{"c":2}},"d":{"i":["4","5","6"]}} │ +│ {"a":{"b":{"c":3}},"e":"Hello, World!"} │ +│ {"a":{"b":{"c":4}},"c":"43"} │ +│ {"a":{"b":{"c":5}},"d":{"h":"2020-02-02 10:00:00.000000000"}} │ +└───────────────────────────────────────────────────────────────┘ +``` + +## JSON 内ã®å‹•çš„パスã®é™ç•Œã‚’超ãˆã‚‹ + +`JSON` データ型ã¯å†…部ã«æœ‰é™ã®æ•°ã®ãƒ‘スã—ã‹åˆ¥ã€…ã®ã‚µãƒ–カラムã¨ã—ã¦ä¿å­˜ã§ãã¾ã›ã‚“。デフォルトã§ã¯ã€ã“ã®åˆ¶é™ã¯ 1024 ã§ã™ã€‚ã—ã‹ã—ã€ã“ã®åˆ¶é™ã¯åž‹å®£è¨€ã«ãŠã„㦠`max_dynamic_paths` パラメータを使用ã—ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ã“ã®åˆ¶é™ãŒé”æˆã•ã‚Œã‚‹ã¨ã€`JSON` カラムã«æŒ¿å…¥ã•ã‚ŒãŸã™ã¹ã¦ã®æ–°ã—ã„パスã¯å˜ä¸€ã®å…±æœ‰ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“ã®åˆ¶é™ã¯ã€ãƒ†ãƒ¼ãƒ–ルãŒä½¿ç”¨ä¸å¯èƒ½ã«ãªã‚‹ã»ã©ã®è†¨å¤§ãªæ•°ã®ç•°ãªã‚‹ã‚µãƒ–カラムをé¿ã‘ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚ + +ç•°ãªã‚‹ã‚·ãƒŠãƒªã‚ªã§ã“ã®åˆ¶é™ãŒé”æˆã•ã‚ŒãŸã¨ãã«ä½•ãŒèµ·ã“ã‚‹ã‹è¦‹ã¦ã¿ã¾ã—ょã†ã€‚ + +### データパース中ã«åˆ¶é™ã«é”ã™ã‚‹ + +JSON オブジェクトをデータã‹ã‚‰ãƒ‘ースã™ã‚‹é–“ã«ã€ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®åˆ¶é™ã«é”ã™ã‚‹ã¨ã€ã™ã¹ã¦ã®æ–°ã—ã„パスã¯å…±æœ‰ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚内çœé–¢æ•° `JSONDynamicPaths, JSONSharedDataPaths` を使用ã—ã¦ãれを確èªã§ãã¾ã™ï¼š + +```sql +SELECT json, JSONDynamicPaths(json), JSONSharedDataPaths(json) FROM format(JSONEachRow, 'json JSON(max_dynamic_paths=3)', ' +{"json" : {"a" : {"b" : 42}, "c" : [1, 2, 3]}} +{"json" : {"a" : {"b" : 43}, "d" : "2020-01-01"}} +{"json" : {"a" : {"b" : 44}, "c" : [4, 5, 6]}} +{"json" : {"a" : {"b" : 43}, "d" : "2020-01-02", "e" : "Hello", "f" : {"g" : 42.42}}} +{"json" : {"a" : {"b" : 43}, "c" : [7, 8, 9], "f" : {"g" : 43.43}, "h" : "World"}} +') +``` + +```text +┌─json───────────────────────────────────────────────────────────┬─JSONDynamicPaths(json)─┬─JSONSharedDataPaths(json)─┠+│ {"a":{"b":"42"},"c":["1","2","3"]} │ ['a.b','c','d'] │ [] │ +│ {"a":{"b":"43"},"d":"2020-01-01"} │ ['a.b','c','d'] │ [] │ +│ {"a":{"b":"44"},"c":["4","5","6"]} │ ['a.b','c','d'] │ [] │ +│ {"a":{"b":"43"},"d":"2020-01-02","e":"Hello","f":{"g":42.42}} │ ['a.b','c','d'] │ ['e','f.g'] │ +│ {"a":{"b":"43"},"c":["7","8","9"],"f":{"g":43.43},"h":"World"} │ ['a.b','c','d'] │ ['f.g','h'] │ +└────────────────────────────────────────────────────────────────┴────────────────────────┴───────────────────────────┘ +``` + +ã”覧ã®ã¨ãŠã‚Šã€ãƒ‘ス `e` 㨠`f.g` を挿入ã—ãŸå¾Œã€åˆ¶é™ã«é”ã—ã€ãれらを共有データ構造ã«æŒ¿å…¥ã—ã¾ã—ãŸã€‚ + +### MergeTree テーブルエンジンã§ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ä¸­ + +MergeTree テーブルã®ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ãƒžãƒ¼ã‚¸ä¸­ã€ç”Ÿæˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ‘ート㮠`JSON` カラムã¯å‹•çš„パスã®åˆ¶é™ã«é”ã—ã€ã‚µãƒ–カラムã¨ã—ã¦ã™ã¹ã¦ã®ãƒ‘スをä¿å­˜ã§ããªããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ClickHouse ã¯ãƒžãƒ¼ã‚¸å¾Œã«ã‚µãƒ–カラムã¨ã—ã¦æ®‹ã‚‹ãƒ‘スã¨å…±æœ‰ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã«ä¿å­˜ã•ã‚Œã‚‹ãƒ‘スをé¸æŠžã—ã¾ã™ã€‚多ãã®å ´åˆã€ClickHouse ã¯æœ€ã‚‚éžãƒŒãƒ«å€¤ã®å¤šã„パスをä¿æŒã—ã€æœ€ã‚‚希少ãªãƒ‘スを共有データ構造ã«ç§»å‹•ã—よã†ã¨ã—ã¾ã™ãŒã€ã“ã‚Œã¯å®Ÿè£…ã«ã‚ˆã‚Šã¾ã™ã€‚ + +ãã®ã‚ˆã†ãªãƒžãƒ¼ã‚¸ã®ä¾‹ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚最åˆã«ã€`JSON` カラムをå«ã‚€ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€å‹•çš„パスã®åˆ¶é™ã‚’ `3` ã«è¨­å®šã—ã€` 5`ã¤ã®ç•°ãªã‚‹ãƒ‘スをæŒã¤å€¤ã‚’挿入ã—ã¾ã™ï¼š + +```sql +CREATE TABLE test (id UInt64, json JSON(max_dynamic_paths=3)) engine=MergeTree ORDER BY id; +SYSTEM STOP MERGES test; +INSERT INTO test SELECT number, formatRow('JSONEachRow', number as a) FROM numbers(5); +INSERT INTO test SELECT number, formatRow('JSONEachRow', number as b) FROM numbers(4); +INSERT INTO test SELECT number, formatRow('JSONEachRow', number as c) FROM numbers(3); +INSERT INTO test SELECT number, formatRow('JSONEachRow', number as d) FROM numbers(2); +INSERT INTO test SELECT number, formatRow('JSONEachRow', number as e) FROM numbers(1); +``` + +å„挿入㯠`JSON` カラムをå«ã‚€å˜ä¸€ã®ãƒ‘スをæŒã¤åˆ¥ã€…ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ートを作æˆã—ã¾ã™ï¼š +```sql +SELECT count(), JSONDynamicPaths(json) AS dynamic_paths, JSONSharedDataPaths(json) AS shared_data_paths, _part FROM test GROUP BY _part, dynamic_paths, shared_data_paths ORDER BY _part ASC +``` + +```text +┌─count()─┬─dynamic_paths─┬─shared_data_paths─┬─_part─────┠+│ 5 │ ['a'] │ [] │ all_1_1_0 │ +│ 4 │ ['b'] │ [] │ all_2_2_0 │ +│ 3 │ ['c'] │ [] │ all_3_3_0 │ +│ 2 │ ['d'] │ [] │ all_4_4_0 │ +│ 1 │ ['e'] │ [] │ all_5_5_0 │ +└─────────┴───────────────┴───────────────────┴───────────┘ + +``` + +ã•ã¦ã€ã™ã¹ã¦ã®ãƒ‘ートを1ã¤ã«ãƒžãƒ¼ã‚¸ã—ã¦ã€ä½•ãŒèµ·ã“ã‚‹ã‹è¦‹ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SYSTEM START MERGES test; +OPTIMIZE TABLE test FINAL; +SELECT count(), dynamicType(d), _part FROM test GROUP BY _part, dynamicType(d) ORDER BY _part; +``` + +```text +┌─count()─┬─dynamic_paths─┬─shared_data_paths─┬─_part─────┠+│ 1 │ ['a','b','c'] │ ['e'] │ all_1_5_2 │ +│ 2 │ ['a','b','c'] │ ['d'] │ all_1_5_2 │ +│ 12 │ ['a','b','c'] │ [] │ all_1_5_2 │ +└─────────┴───────────────┴───────────────────┘ +``` + +ã”覧ã®ã¨ãŠã‚Šã€ClickHouse ã¯æœ€ã‚‚é »ç¹ã«ç¾ã‚Œã‚‹ãƒ‘ス `a`ã€`b`ã€`c` ã‚’ä¿æŒã—ã€ãƒ‘ス `e` 㨠`d` を共有データ構造ã«ç§»å‹•ã—ã¾ã—ãŸã€‚ + +## 内çœé–¢æ•° + +JSON カラムã®å†…容を調ã¹ã‚‹ã®ã«å½¹ç«‹ã¤ã„ãã¤ã‹ã®é–¢æ•°ãŒã‚ã‚Šã¾ã™ï¼š[JSONAllPaths](../functions/json-functions.md#jsonallpaths)ã€[JSONAllPathsWithTypes](../functions/json-functions.md#jsonallpathswithtypes)ã€[JSONDynamicPaths](../functions/json-functions.md#jsondynamicpaths)ã€[JSONDynamicPathsWithTypes](../functions/json-functions.md#jsondynamicpathswithtypes)ã€[JSONSharedDataPaths](../functions/json-functions.md#jsonshareddatapaths)ã€[JSONSharedDataPathsWithTypes](../functions/json-functions.md#jsonshareddatapathswithtypes)ã€[distinctDynamicTypes](../aggregate-functions/reference/distinctdynamictypes.md)ã€[distinctJSONPaths and distinctJSONPathsAndTypes](../aggregate-functions/reference/distinctjsonpaths.md) + +**例** + +`2020-01-01` 日付㮠[GH Archive](https://www.gharchive.org/) データセットã®å†…容を調査ã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT arrayJoin(distinctJSONPaths(json)) FROM s3('s3://clickhouse-public-datasets/gharchive/original/2020-01-01-*.json.gz', JSONAsObject) +``` + +```text +┌─arrayJoin(distinctJSONPaths(json))─────────────────────────┠+│ actor.avatar_url │ +│ actor.display_login │ +│ actor.gravatar_id │ +│ actor.id │ +│ actor.login │ +│ actor.url │ +│ created_at │ +│ id │ +│ org.avatar_url │ +│ org.gravatar_id │ +│ org.id │ +│ org.login │ +│ org.url │ +│ payload.action │ +│ payload.before │ +│ payload.comment._links.html.href │ +│ payload.comment._links.pull_request.href │ +│ payload.comment._links.self.href │ +│ payload.comment.author_association │ +│ payload.comment.body │ +│ payload.comment.commit_id │ +│ payload.comment.created_at │ +│ payload.comment.diff_hunk │ +│ payload.comment.html_url │ +│ payload.comment.id │ +│ payload.comment.in_reply_to_id │ +│ payload.comment.issue_url │ +│ payload.comment.line │ +│ payload.comment.node_id │ +│ payload.comment.original_commit_id │ +│ payload.comment.original_position │ +│ payload.comment.path │ +│ payload.comment.position │ +│ payload.comment.pull_request_review_id │ +... +│ payload.release.node_id │ +│ payload.release.prerelease │ +│ payload.release.published_at │ +│ payload.release.tag_name │ +│ payload.release.tarball_url │ +│ payload.release.target_commitish │ +│ payload.release.upload_url │ +│ payload.release.url │ +│ payload.release.zipball_url │ +│ payload.size │ +│ public │ +│ repo.id │ +│ repo.name │ +│ repo.url │ +│ type │ +└─arrayJoin(distinctJSONPaths(json))─────────────────────────┘ +``` + +```sql +SELECT arrayJoin(distinctJSONPathsAndTypes(json)) FROM s3('s3://clickhouse-public-datasets/gharchive/original/2020-01-01-*.json.gz', JSONAsObject) SETTINGS date_time_input_format='best_effort' +``` + +```text +┌─arrayJoin(distinctJSONPathsAndTypes(json))──────────────────┠+│ ('actor.avatar_url',['String']) │ +│ ('actor.display_login',['String']) │ +│ ('actor.gravatar_id',['String']) │ +│ ('actor.id',['Int64']) │ +│ ('actor.login',['String']) │ +│ ('actor.url',['String']) │ +│ ('created_at',['DateTime']) │ +│ ('id',['String']) │ +│ ('org.avatar_url',['String']) │ +│ ('org.gravatar_id',['String']) │ +│ ('org.id',['Int64']) │ +│ ('org.login',['String']) │ +│ ('org.url',['String']) │ +│ ('payload.action',['String']) │ +│ ('payload.before',['String']) │ +│ ('payload.comment._links.html.href',['String']) │ +│ ('payload.comment._links.pull_request.href',['String']) │ +│ ('payload.comment._links.self.href',['String']) │ +│ ('payload.comment.author_association',['String']) │ +│ ('payload.comment.body',['String']) │ +│ ('payload.comment.commit_id',['String']) │ +│ ('payload.comment.created_at',['DateTime']) │ +│ ('payload.comment.diff_hunk',['String']) │ +│ ('payload.comment.html_url',['String']) │ +│ ('payload.comment.id',['Int64']) │ +│ ('payload.comment.in_reply_to_id',['Int64']) │ +│ ('payload.comment.issue_url',['String']) │ +│ ('payload.comment.line',['Int64']) │ +│ ('payload.comment.node_id',['String']) │ +│ ('payload.comment.original_commit_id',['String']) │ +│ ('payload.comment.original_position',['Int64']) │ +│ ('payload.comment.path',['String']) │ +│ ('payload.comment.position',['Int64']) │ +│ ('payload.comment.pull_request_review_id',['Int64']) │ +... +│ ('payload.release.node_id',['String']) │ +│ ('payload.release.prerelease',['Bool']) │ +│ ('payload.release.published_at',['DateTime']) │ +│ ('payload.release.tag_name',['String']) │ +│ ('payload.release.tarball_url',['String']) │ +│ ('payload.release.target_commitish',['String']) │ +│ ('payload.release.upload_url',['String']) │ +│ ('payload.release.url',['String']) │ +│ ('payload.release.zipball_url',['String']) │ +│ ('payload.size',['Int64']) │ +│ ('public',['Bool']) │ +│ ('repo.id',['Int64']) │ +│ ('repo.name',['String']) │ +│ ('repo.url',['String']) │ +│ ('type',['String']) │ +└─arrayJoin(distinctJSONPathsAndTypes(json))──────────────────┘ +``` + +## ALTER MODIFY COLUMN ã‚’ JSON åž‹ã« + +既存ã®ãƒ†ãƒ¼ãƒ–ルを変更ã—ã€ã‚«ãƒ©ãƒ ã®åž‹ã‚’æ–°ã—ã„ `JSON` åž‹ã«å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ç¾åœ¨ã®ã¨ã“ã‚ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã®ã¯ `String` åž‹ã‹ã‚‰ã®å¤‰æ›´ã®ã¿ã§ã™ã€‚ + +**例** + +```sql +CREATE TABLE test (json String) ENGINE=MergeTree ORDeR BY tuple(); +INSERT INTO test VALUES ('{"a" : 42}'), ('{"a" : 43, "b" : "Hello"}'), ('{"a" : 44, "b" : [1, 2, 3]}')), ('{"c" : "2020-01-01"}'); +ALTER TABLE test MODIFY COLUMN json JSON; +SELECT json, json.a, json.b, json.c FROM test; +``` + +```text +┌─json─────────────────────────┬─json.a─┬─json.b──┬─json.c─────┠+│ {"a":"42"} │ 42 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +│ {"a":"43","b":"Hello"} │ 43 │ Hello │ á´ºáµá´¸á´¸ │ +│ {"a":"44","b":["1","2","3"]} │ 44 │ [1,2,3] │ á´ºáµá´¸á´¸ │ +│ {"c":"2020-01-01"} │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 2020-01-01 │ +└──────────────────────────────┴────────┴─────────┴────────────┘ +``` + +## JSON åž‹ã®ã‚ˆã‚Šè‰¯ã„使用ã®ãŸã‚ã®ãƒ’ント + +`JSON` カラムを作æˆã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹å‰ã«ã€æ¬¡ã®ãƒ’ントを検討ã—ã¦ãã ã•ã„: + +- データを調査ã—ã€å¯èƒ½ãªé™ã‚Šå¤šãã®ãƒ‘スヒントã¨åž‹ã‚’指定ã—ã¦ãã ã•ã„。ãã‚Œã«ã‚ˆã‚Šã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨èª­ã¿å–ã‚ŠãŒéžå¸¸ã«åŠ¹çŽ‡çš„ã«ãªã‚Šã¾ã™ã€‚ +- å¿…è¦ãªãƒ‘スã¨ä¸è¦ãªãƒ‘スを考ãˆã€å¿…è¦ã®ãªã„パスを SKIP セクションや SKIP REGEXP ã«æŒ‡å®šã—ã¦ãã ã•ã„。ãã‚Œã«ã‚ˆã‚Šã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®åŠ¹çŽ‡ãŒå‘上ã—ã¾ã™ã€‚ +- `max_dynamic_paths` パラメータをéžå¸¸ã«é«˜ã„値ã«è¨­å®šã—ãªã„ã§ãã ã•ã„。ãã‚Œã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨èª­ã¿å–りを効率的ã§ãªãã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/data-types/nullable.md b/docs/ja/sql-reference/data-types/nullable.md new file mode 100644 index 00000000000..44409a41217 --- /dev/null +++ b/docs/ja/sql-reference/data-types/nullable.md @@ -0,0 +1,71 @@ +--- +slug: /ja/sql-reference/data-types/nullable +sidebar_position: 44 +sidebar_label: Nullable(T) +--- + +# Nullable(T) + +`T` ãŒè¨±å¯ã™ã‚‹é€šå¸¸ã®å€¤ã«åŠ ãˆã¦ã€ç‰¹åˆ¥ãªãƒžãƒ¼ã‚«ãƒ¼ ([NULL](../../sql-reference/syntax.md)) ã‚’æ ¼ç´ã§ãるよã†ã«ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€Œæ¬ æ値ã€ã‚’示ã—ã¾ã™ã€‚例ãˆã°ã€`Nullable(Int8)` åž‹ã®ã‚«ãƒ©ãƒ ã¯ `Int8` åž‹ã®å€¤ã‚’æ ¼ç´ã™ã‚‹ã“ã¨ãŒã§ãã€å€¤ã‚’æŒãŸãªã„行㯠`NULL` ã‚’æ ¼ç´ã—ã¾ã™ã€‚ + +`T` ã¯ã€[Array](../../sql-reference/data-types/array.md)ã€[Map](../../sql-reference/data-types/map.md)ã€[Tuple](../../sql-reference/data-types/tuple.md) ã®è¤‡åˆãƒ‡ãƒ¼ã‚¿åž‹ã§ã‚ã£ã¦ã¯ãªã‚‰ãªã„ãŒã€è¤‡åˆãƒ‡ãƒ¼ã‚¿åž‹ã«ã¯ `Nullable` åž‹ã®å€¤ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã° `Array(Nullable(Int8))` ã§ã™ã€‚ + +`Nullable` åž‹ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«å«ã‚ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +`NULL` ã¯ã€ClickHouse サーãƒãƒ¼ã®è¨­å®šã§åˆ¥é€”指定ã•ã‚Œãªã„é™ã‚Šã€ã©ã® `Nullable` åž‹ã«ãŠã„ã¦ã‚‚デフォルトã®å€¤ã§ã™ã€‚ + +## ストレージã®ç‰¹æ€§ + +ClickHouse ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã« `Nullable` åž‹ã®å€¤ã‚’æ ¼ç´ã™ã‚‹ãŸã‚ã«ã€é€šå¸¸ã®å€¤ã‚’æ ¼ç´ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã«åŠ ãˆã¦ `NULL` マスクã®ãŸã‚ã®åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ã¾ã™ã€‚マスクファイルã®ã‚¨ãƒ³ãƒˆãƒªã«ã‚ˆã‚Šã€ClickHouse ã¯å„テーブル行ã®å¯¾å¿œã™ã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¨ `NULL` を区別ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®è¿½åŠ ãƒ•ã‚¡ã‚¤ãƒ«ã®ãŸã‚ã€`Nullable` カラムã¯é¡žä¼¼ã®é€šå¸¸ã®ã‚«ãƒ©ãƒ ã«æ¯”ã¹ã¦è¿½åŠ ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¹ãƒšãƒ¼ã‚¹ã‚’消費ã—ã¾ã™ã€‚ + +:::note +`Nullable` ã®ä½¿ç”¨ã¯ã»ã¨ã‚“ã©å¸¸ã«ãƒ‘フォーマンスã«æ‚ªå½±éŸ¿ã‚’与ãˆã¾ã™ã®ã§ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’設計ã™ã‚‹éš›ã«ã¯ã“れを念頭ã«ç½®ã„ã¦ãã ã•ã„。 +::: + +## NULLã®æ¤œç´¢ + +カラム全体を読ã¿è¾¼ã‚€ã“ã¨ãªãã€`null` サブカラムを使用ã—㦠`NULL` 値を見ã¤ã‘ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚対応ã™ã‚‹å€¤ãŒ `NULL` ã®å ´åˆã¯ `1` ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯ `0` ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +CREATE TABLE nullable (`n` Nullable(UInt32)) ENGINE = MergeTree ORDER BY tuple(); + +INSERT INTO nullable VALUES (1) (NULL) (2) (NULL); + +SELECT n.null FROM nullable; +``` + +çµæžœ: + +``` text +┌─n.null─┠+│ 0 │ +│ 1 │ +│ 0 │ +│ 1 │ +└────────┘ +``` + +## 使用例 + +``` sql +CREATE TABLE t_null(x Int8, y Nullable(Int8)) ENGINE TinyLog +``` + +``` sql +INSERT INTO t_null VALUES (1, NULL), (2, 3) +``` + +``` sql +SELECT x + y FROM t_null +``` + +``` text +┌─plus(x, y)─┠+│ á´ºáµá´¸á´¸ │ +│ 5 │ +└────────────┘ +``` diff --git a/docs/ja/sql-reference/data-types/simpleaggregatefunction.md b/docs/ja/sql-reference/data-types/simpleaggregatefunction.md new file mode 100644 index 00000000000..2f9dabe8bac --- /dev/null +++ b/docs/ja/sql-reference/data-types/simpleaggregatefunction.md @@ -0,0 +1,46 @@ +--- +slug: /ja/sql-reference/data-types/simpleaggregatefunction +sidebar_position: 48 +sidebar_label: SimpleAggregateFunction +--- + +# SimpleAggregateFunction + +`SimpleAggregateFunction(name, types_of_arguments...)` データ型ã¯ã€é›†ç´„関数ã®ç¾åœ¨ã®å€¤ã‚’æ ¼ç´ã—ã€[`AggregateFunction`](../../sql-reference/data-types/aggregatefunction.md) ã®ã‚ˆã†ã«ãã®å®Œå…¨ãªçŠ¶æ…‹ã‚’æ ¼ç´ã—ã¾ã›ã‚“。ã“ã®æœ€é©åŒ–ã¯ã€æ¬¡ã®æ€§è³ªã‚’æŒã¤é–¢æ•°ã«é©ç”¨ã§ãã¾ã™ã€‚ã™ãªã‚ã¡ã€è¡Œã‚»ãƒƒãƒˆ `S1 UNION ALL S2` ã«é–¢æ•° `f` ã‚’é©ç”¨ã—ãŸçµæžœã¯ã€è¡Œã‚»ãƒƒãƒˆã®éƒ¨åˆ†ã«å¯¾ã—ã¦ãã‚Œãžã‚Œ `f` ã‚’é©ç”¨ã—ã€ãã®çµæžœã«å†åº¦ `f` ã‚’é©ç”¨ã™ã‚‹ã“ã¨ã§å¾—られる: `f(S1 UNION ALL S2) = f(f(S1) UNION ALL f(S2))` 。ã“ã®æ€§è³ªã«ã‚ˆã‚Šã€éƒ¨åˆ†çš„ãªé›†è¨ˆçµæžœã§çµåˆçµæžœã‚’計算ã™ã‚‹ã®ã«å分ã§ã‚ã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã‚‹ãŸã‚ã€ä½™åˆ†ãªãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ãŠã‚ˆã³å‡¦ç†ã™ã‚‹å¿…è¦ãŒãªããªã‚Šã¾ã™ã€‚ + +集約関数ã®å€¤ã‚’生æˆã™ã‚‹ä¸€èˆ¬çš„ãªæ–¹æ³•ã¯ã€[-SimpleState](../../sql-reference/aggregate-functions/combinators.md#agg-functions-combinator-simplestate) サフィックスを付ã‘ã¦é›†ç´„関数を呼ã³å‡ºã™ã“ã¨ã§ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る集約関数ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +- [`any`](../../sql-reference/aggregate-functions/reference/any.md#agg_function-any) +- [`anyLast`](../../sql-reference/aggregate-functions/reference/anylast.md#anylastx) +- [`min`](../../sql-reference/aggregate-functions/reference/min.md#agg_function-min) +- [`max`](../../sql-reference/aggregate-functions/reference/max.md#agg_function-max) +- [`sum`](../../sql-reference/aggregate-functions/reference/sum.md#agg_function-sum) +- [`sumWithOverflow`](../../sql-reference/aggregate-functions/reference/sumwithoverflow.md#sumwithoverflowx) +- [`groupBitAnd`](../../sql-reference/aggregate-functions/reference/groupbitand.md#groupbitand) +- [`groupBitOr`](../../sql-reference/aggregate-functions/reference/groupbitor.md#groupbitor) +- [`groupBitXor`](../../sql-reference/aggregate-functions/reference/groupbitxor.md#groupbitxor) +- [`groupArrayArray`](../../sql-reference/aggregate-functions/reference/grouparray.md#agg_function-grouparray) +- [`groupUniqArrayArray`](../../sql-reference/aggregate-functions/reference/groupuniqarray.md) +- [`sumMap`](../../sql-reference/aggregate-functions/reference/summap.md#agg_functions-summap) +- [`minMap`](../../sql-reference/aggregate-functions/reference/minmap.md#agg_functions-minmap) +- [`maxMap`](../../sql-reference/aggregate-functions/reference/maxmap.md#agg_functions-maxmap) + +:::note +`SimpleAggregateFunction(func, Type)` ã®å€¤ã¯ `Type` ã¨åŒã˜ã‚ˆã†ã«è¦‹ãˆã€æ ¼ç´ã•ã‚Œã¾ã™ã®ã§ã€`-Merge`/`-State` サフィックスを付ã‘ãŸé–¢æ•°ã‚’é©ç”¨ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +`SimpleAggregateFunction` ã¯åŒã˜é›†ç´„関数をæŒã¤ `AggregateFunction` よりも性能ãŒè‰¯ããªã‚Šã¾ã™ã€‚ +::: + +**パラメーター** + +- 集約関数ã®åå‰ã€‚ +- 集約関数ã®å¼•æ•°ã®åž‹ã€‚ + +**例** + +``` sql +CREATE TABLE simple (id UInt64, val SimpleAggregateFunction(sum, Double)) ENGINE=AggregatingMergeTree ORDER BY id; +``` + diff --git a/docs/ja/sql-reference/data-types/special-data-types/expression.md b/docs/ja/sql-reference/data-types/special-data-types/expression.md new file mode 100644 index 00000000000..38e01ef98f4 --- /dev/null +++ b/docs/ja/sql-reference/data-types/special-data-types/expression.md @@ -0,0 +1,9 @@ +--- +slug: /ja/sql-reference/data-types/special-data-types/expression +sidebar_position: 58 +sidebar_label: Expression +--- + +# Expression + +Expression ã¯é«˜éšŽé–¢æ•°ã«ãŠã‘るラムダを表ç¾ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/data-types/special-data-types/index.md b/docs/ja/sql-reference/data-types/special-data-types/index.md new file mode 100644 index 00000000000..8da45eea2c0 --- /dev/null +++ b/docs/ja/sql-reference/data-types/special-data-types/index.md @@ -0,0 +1,9 @@ +--- +slug: /ja/sql-reference/data-types/special-data-types/ +sidebar_label: 特殊データ型 +sidebar_position: 55 +--- + +# 特殊データ型 + +特殊ãªãƒ‡ãƒ¼ã‚¿åž‹ã®å€¤ã¯ã€ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã—ãŸã‚Šã€ã‚¯ã‚¨ãƒªçµæžœã«å‡ºåŠ›ã—ãŸã‚Šã™ã‚‹ãŸã‚ã«ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œä¸­ã®ä¸­é–“çµæžœã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/data-types/special-data-types/interval.md b/docs/ja/sql-reference/data-types/special-data-types/interval.md new file mode 100644 index 00000000000..555aed56809 --- /dev/null +++ b/docs/ja/sql-reference/data-types/special-data-types/interval.md @@ -0,0 +1,84 @@ +--- +slug: /ja/sql-reference/data-types/special-data-types/interval +sidebar_position: 61 +sidebar_label: Interval +--- + +# Interval + +時間ãŠã‚ˆã³æ—¥ä»˜ã®é–“隔を表ã™ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã§ã™ã€‚[INTERVAL](../../../sql-reference/operators/index.md#operator-interval) 演算å­ã®çµæžœã¨ã—ã¦å¾—られる型ã§ã™ã€‚ + +構造: + +- 符å·ãªã—整数値ã¨ã—ã¦ã®æ™‚間間隔。 +- é–“éš”ã®ç¨®é¡žã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹é–“éš”ã®ç¨®é¡ž: + +- `NANOSECOND` +- `MICROSECOND` +- `MILLISECOND` +- `SECOND` +- `MINUTE` +- `HOUR` +- `DAY` +- `WEEK` +- `MONTH` +- `QUARTER` +- `YEAR` + +å„é–“éš”ã®ç¨®é¡žã«å¯¾ã—ã¦ã€å€‹åˆ¥ã®ãƒ‡ãƒ¼ã‚¿åž‹ãŒå­˜åœ¨ã—ã¾ã™ã€‚例ãˆã°ã€`DAY` 間隔㯠`IntervalDay` データ型ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ + +``` sql +SELECT toTypeName(INTERVAL 4 DAY) +``` + +``` text +┌─toTypeName(toIntervalDay(4))─┠+│ IntervalDay │ +└──────────────────────────────┘ +``` + +## 使用上ã®æ³¨æ„ + +`Interval` åž‹ã®å€¤ã¯ã€[Date](../../../sql-reference/data-types/date.md) åž‹ãŠã‚ˆã³ [DateTime](../../../sql-reference/data-types/datetime.md) åž‹ã®å€¤ã¨ã®ç®—術演算ã§ä½¿ç”¨ã§ãã¾ã™ã€‚例ãˆã°ã€ç¾åœ¨ã®æ™‚刻ã«4日を加算ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +``` sql +SELECT now() as current_date_time, current_date_time + INTERVAL 4 DAY +``` + +``` text +┌───current_date_time─┬─plus(now(), toIntervalDay(4))─┠+│ 2019-10-23 10:58:45 │ 2019-10-27 10:58:45 │ +└─────────────────────┴───────────────────────────────┘ +``` + +ã¾ãŸã€è¤‡æ•°ã®é–“隔をåŒæ™‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +``` sql +SELECT now() AS current_date_time, current_date_time + (INTERVAL 4 DAY + INTERVAL 3 HOUR) +``` + +``` text +┌───current_date_time─┬─plus(current_date_time, plus(toIntervalDay(4), toIntervalHour(3)))─┠+│ 2024-08-08 18:31:39 │ 2024-08-12 21:31:39 │ +└─────────────────────┴────────────────────────────────────────────────────────────────────┘ +``` + +ã•ã‚‰ã«ã€ç•°ãªã‚‹é–“éš”ã¨ã®æ¯”較もå¯èƒ½ã§ã™ã€‚ + +``` sql +SELECT toIntervalMicrosecond(3600000000) = toIntervalHour(1); +``` + +``` text +┌─less(toIntervalMicrosecond(179999999), toIntervalMinute(3))─┠+│ 1 │ +└─────────────────────────────────────────────────────────────┘ +``` + +## å‚ç…§ + +- [INTERVAL](../../../sql-reference/operators/index.md#operator-interval) æ¼”ç®—å­ +- [toInterval](../../../sql-reference/functions/type-conversion-functions.md#function-tointerval) 型変æ›é–¢æ•° + diff --git a/docs/ja/sql-reference/data-types/special-data-types/nothing.md b/docs/ja/sql-reference/data-types/special-data-types/nothing.md new file mode 100644 index 00000000000..a6d8e52a6a4 --- /dev/null +++ b/docs/ja/sql-reference/data-types/special-data-types/nothing.md @@ -0,0 +1,24 @@ +--- +slug: /ja/sql-reference/data-types/special-data-types/nothing +sidebar_position: 60 +sidebar_label: Nothing +--- + +# Nothing + +ã“ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®å”¯ä¸€ã®ç›®çš„ã¯ã€å€¤ãŒæœŸå¾…ã•ã‚Œãªã„å ´åˆã‚’表ã™ã“ã¨ã§ã™ã€‚ãã®ãŸã‚ã€`Nothing` åž‹ã®å€¤ã‚’作æˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +ãŸã¨ãˆã°ã€ãƒªãƒ†ãƒ©ãƒ« [NULL](../../../sql-reference/syntax.md#null-literal) 㯠`Nullable(Nothing)` åž‹ã‚’æŒã£ã¦ã„ã¾ã™ã€‚[Nullable](../../../sql-reference/data-types/nullable.md) ã«ã¤ã„ã¦è©³ã—ãã¯å‚ç…§ã—ã¦ãã ã•ã„。 + +`Nothing` åž‹ã¯ã€ç©ºã®é…列を示ã™ãŸã‚ã«ã‚‚使用ã•ã‚Œã¾ã™: + +``` sql +SELECT toTypeName(array()) +``` + +``` text +┌─toTypeName(array())─┠+│ Array(Nothing) │ +└─────────────────────┘ +``` + diff --git a/docs/ja/sql-reference/data-types/special-data-types/set.md b/docs/ja/sql-reference/data-types/special-data-types/set.md new file mode 100644 index 00000000000..106e894afc1 --- /dev/null +++ b/docs/ja/sql-reference/data-types/special-data-types/set.md @@ -0,0 +1,9 @@ +--- +slug: /ja/sql-reference/data-types/special-data-types/set +sidebar_position: 59 +sidebar_label: Set +--- + +# Set + +[IN](../../../sql-reference/operators/in.md#select-in-operators) å¼ã®å³å´ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/data-types/string.md b/docs/ja/sql-reference/data-types/string.md new file mode 100644 index 00000000000..e5bd8154813 --- /dev/null +++ b/docs/ja/sql-reference/data-types/string.md @@ -0,0 +1,21 @@ +--- +slug: /ja/sql-reference/data-types/string +sidebar_position: 8 +sidebar_label: String +--- + +# String + +ä»»æ„ã®é•·ã•ã®æ–‡å­—列ã§ã™ã€‚é•·ã•ã«åˆ¶é™ã¯ã‚ã‚Šã¾ã›ã‚“。値ã¯ã€ãƒŒãƒ«ãƒã‚¤ãƒˆã‚’å«ã‚€ä»»æ„ã®ãƒã‚¤ãƒˆã‚»ãƒƒãƒˆã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚Stringåž‹ã¯ã€ä»–ã®DBMSã®VARCHARã€BLOBã€CLOBãªã©ã®åž‹ã‚’ç½®ãæ›ãˆã¾ã™ã€‚ + +テーブルを作æˆã™ã‚‹éš›ã«ã€æ–‡å­—列フィールド用ã«æ•°å€¤ãƒ‘ラメータを設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆä¾‹: `VARCHAR(255)`)。ãŸã ã—ã€ClickHouseã¯ã“れを無視ã—ã¾ã™ã€‚ + +エイリアス: + +- `String` — `LONGTEXT`, `MEDIUMTEXT`, `TINYTEXT`, `TEXT`, `LONGBLOB`, `MEDIUMBLOB`, `TINYBLOB`, `BLOB`, `VARCHAR`, `CHAR`, `CHAR LARGE OBJECT`, `CHAR VARYING`, `CHARACTER LARGE OBJECT`, `CHARACTER VARYING`, `NCHAR LARGE OBJECT`, `NCHAR VARYING`, `NATIONAL CHARACTER LARGE OBJECT`, `NATIONAL CHARACTER VARYING`, `NATIONAL CHAR VARYING`, `NATIONAL CHARACTER`, `NATIONAL CHAR`, `BINARY LARGE OBJECT`, `BINARY VARYING`, + +## エンコーディング + +ClickHouseã«ã¯ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®æ¦‚念ãŒã‚ã‚Šã¾ã›ã‚“。文字列ã¯ä»»æ„ã®ãƒã‚¤ãƒˆã‚»ãƒƒãƒˆã‚’å«ã‚€ã“ã¨ãŒã§ãã€ãれらã¯ãã®ã¾ã¾ä¿å­˜ãŠã‚ˆã³å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚テキストをä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€UTF-8エンコーディングã®ä½¿ç”¨ã‚’推奨ã—ã¾ã™ã€‚å°‘ãªãã¨ã‚‚ã€ã‚ãªãŸã®ç«¯æœ«ãŒUTF-8を使用ã—ã¦ã„ã‚‹ã®ã§ã‚ã‚Œã°ï¼ˆæŽ¨å¥¨ã•ã‚Œã‚‹ã¨ãŠã‚Šï¼‰ã€å€¤ã‚’変æ›ã›ãšã«èª­ã¿æ›¸ãã§ãã¾ã™ã€‚ + +åŒæ§˜ã«ã€æ–‡å­—列æ“作ã®ãŸã‚ã®ç‰¹å®šã®é–¢æ•°ã«ã¯ã€æ–‡å­—列ãŒUTF-8ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’表ã™ãƒã‚¤ãƒˆã‚»ãƒƒãƒˆã§ã‚ã‚‹ã¨ä»®å®šã—ã¦å‹•ä½œã™ã‚‹åˆ¥ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€[length](../functions/string-functions.md#length)関数ã¯ã€æ–‡å­—列ã®é•·ã•ã‚’ãƒã‚¤ãƒˆå˜ä½ã§è¨ˆç®—ã—ã¾ã™ãŒã€[lengthUTF8](../functions/string-functions.md#lengthutf8)関数ã¯ã€å€¤ãŒUTF-8ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹ã¨ä»®å®šã—ã¦Unicodeコードãƒã‚¤ãƒ³ãƒˆå˜ä½ã§æ–‡å­—列ã®é•·ã•ã‚’計算ã—ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/data-types/tuple.md b/docs/ja/sql-reference/data-types/tuple.md new file mode 100644 index 00000000000..bc35f52681f --- /dev/null +++ b/docs/ja/sql-reference/data-types/tuple.md @@ -0,0 +1,183 @@ +--- +slug: /ja/sql-reference/data-types/tuple +sidebar_position: 34 +sidebar_label: Tuple(T1, T2, ...) +--- + +# Tuple(T1, T2, ...) + +è¦ç´ ã®ã‚¿ãƒ—ルã§ã€ãã‚Œãžã‚ŒãŒå€‹åˆ¥ã®[åž‹](../../sql-reference/data-types/index.md#data_types)ã‚’æŒã¡ã¾ã™ã€‚タプルã¯å°‘ãªãã¨ã‚‚1ã¤ã®è¦ç´ ã‚’å«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +タプルã¯ä¸€æ™‚çš„ãªã‚«ãƒ©ãƒ ã®ã‚°ãƒ«ãƒ¼ãƒ—化ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚カラムã¯ã‚¯ã‚¨ãƒªã§INå¼ãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã‚„ã€ãƒ©ãƒ ãƒ€é–¢æ•°ã®ç‰¹å®šã®å½¢å¼ãƒ‘ラメータを指定ã™ã‚‹ãŸã‚ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã§ãã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[IN 演算å­](../../sql-reference/operators/in.md)ãŠã‚ˆã³[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +タプルã¯ã‚¯ã‚¨ãƒªã®çµæžœã¨ã—ã¦å¾—られるã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€JSON以外ã®ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ã§ã¯ã€å€¤ãŒæ‹¬å¼§å†…ã§ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã•ã‚Œã¾ã™ã€‚JSONå½¢å¼ã§ã¯ã€ã‚¿ãƒ—ルã¯é…列(角括弧)ã®å½¢ã§å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +## タプルã®ä½œæˆ + +タプルを作æˆã™ã‚‹ãŸã‚ã«ã¯é–¢æ•°ã‚’使用ã§ãã¾ã™ã€‚ + +``` sql +tuple(T1, T2, ...) +``` + +タプル作æˆã®ä¾‹: + +``` sql +SELECT tuple(1, 'a') AS x, toTypeName(x) +``` + +``` text +┌─x───────┬─toTypeName(tuple(1, 'a'))─┠+│ (1,'a') │ Tuple(UInt8, String) │ +└─────────┴───────────────────────────┘ +``` + +タプルã¯å˜ä¸€ã®è¦ç´ ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ + +例: + +``` sql +SELECT tuple('a') AS x; +``` + +``` text +┌─x─────┠+│ ('a') │ +└───────┘ +``` + +`tuple()` 関数を呼ã³å‡ºã•ãšã«è¤‡æ•°ã®è¦ç´ ã®ã‚¿ãƒ—ルを作æˆã™ã‚‹ãŸã‚ã«ã€æ§‹æ–‡ `(tuple_element1, tuple_element2)` を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +例: + +``` sql +SELECT (1, 'a') AS x, (today(), rand(), 'someString') AS y, ('a') AS not_a_tuple; +``` + +``` text +┌─x───────┬─y──────────────────────────────────────┬─not_a_tuple─┠+│ (1,'a') │ ('2022-09-21',2006973416,'someString') │ a │ +└─────────┴────────────────────────────────────────┴─────────────┘ +``` + +## データ型ã®æ¤œå‡º + +タプルをオンザフライã§ä½œæˆã™ã‚‹å ´åˆã€ClickHouseã¯ã‚¿ãƒ—ルã®å¼•æ•°ã®åž‹ã‚’ã€ä¸Žãˆã‚‰ã‚ŒãŸå¼•æ•°ã®å€¤ã‚’ä¿æŒã§ãる最å°ã®åž‹ã¨ã—ã¦åˆ¤æ–­ã—ã¾ã™ã€‚値ãŒ[NULL](../../sql-reference/syntax.md#null-literal)ã®å ´åˆã€åˆ¤æ–­ã•ã‚Œã‚‹åž‹ã¯[Nullable](../../sql-reference/data-types/nullable.md)ã§ã™ã€‚ + +自動データ型検出ã®ä¾‹: + +``` sql +SELECT tuple(1, NULL) AS x, toTypeName(x) +``` + +``` text +┌─x─────────┬─toTypeName(tuple(1, NULL))──────┠+│ (1, NULL) │ Tuple(UInt8, Nullable(Nothing)) │ +└───────────┴─────────────────────────────────┘ +``` + +## タプルè¦ç´ ã¸ã®å‚ç…§ + +タプルè¦ç´ ã¯åå‰ã¾ãŸã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã§å‚ç…§ã§ãã¾ã™: + +``` sql +CREATE TABLE named_tuples (`a` Tuple(s String, i Int64)) ENGINE = Memory; +INSERT INTO named_tuples VALUES (('y', 10)), (('x',-10)); + +SELECT a.s FROM named_tuples; -- åå‰ã§å‚ç…§ +SELECT a.2 FROM named_tuples; -- インデックスã§å‚ç…§ +``` + +çµæžœ: + +``` text +┌─a.s─┠+│ y │ +│ x │ +└─────┘ + +┌─tupleElement(a, 2)─┠+│ 10 │ +│ -10 │ +└────────────────────┘ +``` + +## タプルã®æ¯”較演算 + +2ã¤ã®ã‚¿ãƒ—ルã¯ã€è¦ç´ ã‚’å·¦ã‹ã‚‰å³ã«é †ç•ªã«æ¯”較ã™ã‚‹ã“ã¨ã§æ¯”較ã•ã‚Œã¾ã™ã€‚最åˆã®ã‚¿ãƒ—ルã®è¦ç´ ãŒ2番目ã®ã‚¿ãƒ—ルã®å¯¾å¿œã™ã‚‹è¦ç´ ã‚ˆã‚Šå¤§ãã„(å°ã•ã„)場åˆã€æœ€åˆã®ã‚¿ãƒ—ルã¯2番目より大ãã„(å°ã•ã„)ã¨ã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã„å ´åˆï¼ˆä¸¡æ–¹ã®è¦ç´ ãŒç­‰ã—ã„å ´åˆï¼‰ã€æ¬¡ã®è¦ç´ ãŒæ¯”較ã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +SELECT (1, 'z') > (1, 'a') c1, (2022, 01, 02) > (2023, 04, 02) c2, (1,2,3) = (3,2,1) c3; +``` + +``` text +┌─c1─┬─c2─┬─c3─┠+│ 1 │ 0 │ 0 │ +└────┴────┴────┘ +``` + +実例: + +```sql +CREATE TABLE test +( + `year` Int16, + `month` Int8, + `day` Int8 +) +ENGINE = Memory AS +SELECT * +FROM values((2022, 12, 31), (2000, 1, 1)); + +SELECT * FROM test; + +┌─year─┬─month─┬─day─┠+│ 2022 │ 12 │ 31 │ +│ 2000 │ 1 │ 1 │ +└──────┴───────┴─────┘ + +SELECT * +FROM test +WHERE (year, month, day) > (2010, 1, 1); + +┌─year─┬─month─┬─day─┠+│ 2022 │ 12 │ 31 │ +└──────┴───────┴─────┘ + + +CREATE TABLE test +( + `key` Int64, + `duration` UInt32, + `value` Float64 +) +ENGINE = Memory AS +SELECT * +FROM values((1, 42, 66.5), (1, 42, 70), (2, 1, 10), (2, 2, 0)); + +SELECT * FROM test; + +┌─key─┬─duration─┬─value─┠+│ 1 │ 42 │ 66.5 │ +│ 1 │ 42 │ 70 │ +│ 2 │ 1 │ 10 │ +│ 2 │ 2 │ 0 │ +└─────┴──────────┴───────┘ + +-- å„キーã«å¯¾ã—ã¦æœ€å¤§ã®ç¶™ç¶šæ™‚é–“ã‚’æŒã¤å€¤ã‚’見ã¤ã‘ã¾ã™ã€‚継続時間ãŒç­‰ã—ã„å ´åˆã€æœ€å¤§ã®å€¤ã‚’é¸æŠžã—ã¾ã™ã€‚ + +SELECT + key, + max(duration), + argMax(value, (duration, value)) +FROM test +GROUP BY key +ORDER BY key ASC; + +┌─key─┬─max(duration)─┬─argMax(value, tuple(duration, value))─┠+│ 1 │ 42 │ 70 │ +│ 2 │ 2 │ 0 │ +└─────┴───────────────┴───────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/data-types/uuid.md b/docs/ja/sql-reference/data-types/uuid.md new file mode 100644 index 00000000000..4616bb87828 --- /dev/null +++ b/docs/ja/sql-reference/data-types/uuid.md @@ -0,0 +1,128 @@ +--- +slug: /ja/sql-reference/data-types/uuid +sidebar_position: 24 +sidebar_label: UUID +--- + +# UUID + +UUID(UUID)ã¯ã€16ãƒã‚¤ãƒˆã®å€¤ã§ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’識別ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚UUIDã«é–¢ã™ã‚‹è©³ç´°ã¯ã€[Wikipedia](https://en.wikipedia.org/wiki/Universally_unique_identifier)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ç•°ãªã‚‹UUIDã®ãƒãƒªã‚¢ãƒ³ãƒˆãŒå­˜åœ¨ã™ã‚‹ä¸€æ–¹ã§ï¼ˆ[ã“ã¡ã‚‰](https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis)ã‚’å‚照)ã€ClickHouseã¯æŒ¿å…¥ã•ã‚ŒãŸUUIDãŒç‰¹å®šã®ãƒãƒªã‚¢ãƒ³ãƒˆã«æº–æ‹ ã—ã¦ã„ã‚‹ã‹ã‚’検証ã—ã¾ã›ã‚“。UUIDã¯å†…部的ã«ã¯16ãƒã‚¤ãƒˆã®ãƒ©ãƒ³ãƒ€ãƒ ãªã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦æ‰±ã‚ã‚Œã€SQLレベルã§ã¯[8-4-4-4-12ã®è¡¨ç¾](https://en.wikipedia.org/wiki/Universally_unique_identifier#Textual_representation)を使用ã—ã¾ã™ã€‚ + +UUID値ã®ä¾‹: + +``` text +61f0c404-5cb3-11e7-907b-a6006ad3dba0 +``` + +デフォルトã®UUIDã¯ã™ã¹ã¦ã‚¼ãƒ­ã§ã™ã€‚ã“ã‚Œã¯ã€ä¾‹ãˆã°æ–°ã—ã„レコードãŒæŒ¿å…¥ã•ã‚Œã‚‹éš›ã«UUIDカラムã«å€¤ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +``` text +00000000-0000-0000-0000-000000000000 +``` + +æ­´å²çš„ãªç†ç”±ã«ã‚ˆã‚Šã€UUIDã¯ãã®å¾ŒåŠéƒ¨åˆ†ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ä¸»ã‚­ãƒ¼ã€ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã€ã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ルã®ãƒ‘ーティションキーã«ç›´æŽ¥UUIDを使用ã™ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +例: + +``` sql +CREATE TABLE tab (uuid UUID) ENGINE = Memory; +INSERT INTO tab SELECT generateUUIDv4() FROM numbers(50); +SELECT * FROM tab ORDER BY uuid; +``` + +çµæžœ: + +``` text +┌─uuid─────────────────────────────────┠+│ 36a0b67c-b74a-4640-803b-e44bb4547e3c │ +│ 3a00aeb8-2605-4eec-8215-08c0ecb51112 │ +│ 3fda7c49-282e-421a-85ab-c5684ef1d350 │ +│ 16ab55a7-45f6-44a8-873c-7a0b44346b3e │ +│ e3776711-6359-4f22-878d-bf290d052c85 │ +│ [...] │ +│ 9eceda2f-6946-40e3-b725-16f2709ca41a │ +│ 03644f74-47ba-4020-b865-be5fd4c8c7ff │ +│ ce3bc93d-ab19-4c74-b8cc-737cb9212099 │ +│ b7ad6c91-23d6-4b5e-b8e4-a52297490b56 │ +│ 06892f64-cc2d-45f3-bf86-f5c5af5768a9 │ +└──────────────────────────────────────┘ +``` + +代替策ã¨ã—ã¦ã€UUIDã‚’ç›´æ„Ÿçš„ãªã‚½ãƒ¼ãƒˆé †åºã‚’æŒã¤åž‹ã«å¤‰æ›ã§ãã¾ã™ã€‚ + +UInt128ã¸ã®å¤‰æ›ã‚’使用ã—ãŸä¾‹: + +``` sql +CREATE TABLE tab (uuid UUID) ENGINE = Memory; +INSERT INTO tab SELECT generateUUIDv4() FROM numbers(50); +SELECT * FROM tab ORDER BY toUInt128(uuid); +``` + +çµæžœ: + +```sql +┌─uuid─────────────────────────────────┠+│ 018b81cd-aca1-4e9c-9e56-a84a074dc1a8 │ +│ 02380033-c96a-438e-913f-a2c67e341def │ +│ 057cf435-7044-456a-893b-9183a4475cea │ +│ 0a3c1d4c-f57d-44cc-8567-60cb0c46f76e │ +│ 0c15bf1c-8633-4414-a084-7017eead9e41 │ +│ [...] │ +│ f808cf05-ea57-4e81-8add-29a195bde63d │ +│ f859fb5d-764b-4a33-81e6-9e4239dae083 │ +│ fb1b7e37-ab7b-421a-910b-80e60e2bf9eb │ +│ fc3174ff-517b-49b5-bfe2-9b369a5c506d │ +│ fece9bf6-3832-449a-b058-cd1d70a02c8b │ +└──────────────────────────────────────┘ +``` + +## UUIDã®ç”Ÿæˆ + +ClickHouseã¯ã€ãƒ©ãƒ³ãƒ€ãƒ ãªUUIDãƒãƒ¼ã‚¸ãƒ§ãƒ³4ã®å€¤ã‚’生æˆã™ã‚‹ãŸã‚ã®[generateUUIDv4](../../sql-reference/functions/uuid-functions.md)関数をæä¾›ã—ã¦ã„ã¾ã™ã€‚ + +## 使用例 + +**例 1** + +ã“ã®ä¾‹ã§ã¯ã€UUIDカラムをæŒã¤ãƒ†ãƒ¼ãƒ–ルã®ä½œæˆã¨ãƒ†ãƒ¼ãƒ–ルã¸ã®å€¤ã®æŒ¿å…¥ã‚’示ã—ã¾ã™ã€‚ + +``` sql +CREATE TABLE t_uuid (x UUID, y String) ENGINE=TinyLog + +INSERT INTO t_uuid SELECT generateUUIDv4(), 'Example 1' + +SELECT * FROM t_uuid +``` + +çµæžœ: + +``` text +┌────────────────────────────────────x─┬─y─────────┠+│ 417ddc5d-e556-4d27-95dd-a34d84e46a50 │ Example 1 │ +└──────────────────────────────────────┴───────────┘ +``` + +**例 2** + +ã“ã®ä¾‹ã§ã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’挿入ã™ã‚‹éš›ã«UUIDカラムã®å€¤ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®UUID値ãŒæŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +``` sql +INSERT INTO t_uuid (y) VALUES ('Example 2') + +SELECT * FROM t_uuid +``` + +``` text +┌────────────────────────────────────x─┬─y─────────┠+│ 417ddc5d-e556-4d27-95dd-a34d84e46a50 │ Example 1 │ +│ 00000000-0000-0000-0000-000000000000 │ Example 2 │ +└──────────────────────────────────────┴───────────┘ +``` + +## 制é™äº‹é … + +UUIDデータ型ã¯ã€[min](../../sql-reference/aggregate-functions/reference/min.md#agg_function-min)ã€[max](../../sql-reference/aggregate-functions/reference/max.md#agg_function-max)ã€ãŠã‚ˆã³[count](../../sql-reference/aggregate-functions/reference/count.md#agg_function-count)ãªã©ã€[String](../../sql-reference/data-types/string.md)データ型ãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹é–¢æ•°ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +UUIDデータ型ã¯ã€[abs](../../sql-reference/functions/arithmetic-functions.md#arithm_func-abs)ãªã©ã®ç®—術演算やã€[sum](../../sql-reference/aggregate-functions/reference/sum.md#agg_function-sum)ã‚„[avg](../../sql-reference/aggregate-functions/reference/avg.md#agg_function-avg)ãªã©ã®é›†è¨ˆé–¢æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。 diff --git a/docs/ja/sql-reference/data-types/variant.md b/docs/ja/sql-reference/data-types/variant.md new file mode 100644 index 00000000000..9bafe0c92b2 --- /dev/null +++ b/docs/ja/sql-reference/data-types/variant.md @@ -0,0 +1,470 @@ +--- +slug: /ja/sql-reference/data-types/variant +sidebar_position: 40 +sidebar_label: Variant(T1, T2, ...) +--- + +# Variant(T1, T2, ...) + +ã“ã®ã‚¿ã‚¤ãƒ—ã¯ä»–ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®ãƒ¦ãƒ‹ã‚ªãƒ³ã‚’表ã—ã¾ã™ã€‚åž‹ `Variant(T1, T2, ..., TN)` ã¯ã€ã“ã®åž‹ã®å„行㌠`T1`ã€`T2` ãªã©ã€ã¾ãŸã¯ãれらã®ã©ã‚Œã§ã‚‚ãªã„(`NULL` 値)ã®ã„ãšã‚Œã‹ã®å€¤ã‚’æŒã¤ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +ãƒã‚¹ãƒˆã•ã‚ŒãŸåž‹ã®é †åºã¯é–¢ä¿‚ã‚ã‚Šã¾ã›ã‚“: Variant(T1, T2) = Variant(T2, T1)。ãƒã‚¹ãƒˆã•ã‚ŒãŸåž‹ã¯ Nullable(...)ã€LowCardinality(Nullable(...)) ãŠã‚ˆã³ Variant(...) 型を除ãä»»æ„ã®åž‹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +é¡žä¼¼ã—ãŸåž‹ã‚’ãƒãƒªã‚¢ãƒ³ãƒˆã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ï¼ˆä¾‹ãˆã°ã€ç•°ãªã‚‹æ•°å€¤ã‚¿ã‚¤ãƒ— `Variant(UInt32, Int64)` ã‚„ç•°ãªã‚‹æ—¥ä»˜ã‚¿ã‚¤ãƒ— `Variant(Date, DateTime)`)ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。ã“れらã®åž‹ã®å€¤ã‚’æ“作ã™ã‚‹ã“ã¨ã§æ›–昧ã•ãŒç”Ÿã˜ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚デフォルトã§ã¯ã€ãã®ã‚ˆã†ãª `Variant` 型を作æˆã™ã‚‹ã¨ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ãŒã€`allow_suspicious_variant_types` を設定ã™ã‚‹ã“ã¨ã§æœ‰åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +:::note +Variantデータ型ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã§ã™ã€‚使用ã™ã‚‹ã«ã¯ã€`allow_experimental_variant_type = 1` を設定ã—ã¦ãã ã•ã„。 +::: + +## Variantã®ä½œæˆ + +テーブルã®ã‚«ãƒ©ãƒ å®šç¾©ã§ `Variant` 型を使用ã™ã‚‹: + +```sql +CREATE TABLE test (v Variant(UInt64, String, Array(UInt64))) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('Hello, World!'), ([1, 2, 3]); +SELECT v FROM test; +``` + +```text +┌─v─────────────┠+│ á´ºáµá´¸á´¸ │ +│ 42 │ +│ Hello, World! │ +│ [1,2,3] │ +└───────────────┘ +``` + +通常ã®ã‚«ãƒ©ãƒ ã‹ã‚‰ã®CASTを使用ã™ã‚‹: + +```sql +SELECT toTypeName(variant) as type_name, 'Hello, World!'::Variant(UInt64, String, Array(UInt64)) as variant; +``` + +```text +┌─type_name──────────────────────────────┬─variant───────┠+│ Variant(Array(UInt64), String, UInt64) │ Hello, World! │ +└────────────────────────────────────────┴───────────────┘ +``` + +引数ã«å…±é€šã®åž‹ãŒãªã„å ´åˆã« `if/multiIf` 関数を使用ã™ã‚‹ï¼ˆè¨­å®š `use_variant_as_common_type` ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰: + +```sql +SET use_variant_as_common_type = 1; +SELECT if(number % 2, number, range(number)) as variant FROM numbers(5); +``` + +```text +┌─variant───┠+│ [] │ +│ 1 │ +│ [0,1] │ +│ 3 │ +│ [0,1,2,3] │ +└───────────┘ +``` + +```sql +SET use_variant_as_common_type = 1; +SELECT multiIf((number % 4) = 0, 42, (number % 4) = 1, [1, 2, 3], (number % 4) = 2, 'Hello, World!', NULL) AS variant FROM numbers(4); +``` + +```text +┌─variant───────┠+│ 42 │ +│ [1,2,3] │ +│ Hello, World! │ +│ á´ºáµá´¸á´¸ │ +└───────────────┘ +``` + +`array/map` 関数を使用ã—ã€é…列è¦ç´ /マップ値ã«å…±é€šã®åž‹ãŒãªã„å ´åˆï¼ˆè¨­å®š `use_variant_as_common_type` ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰: + +```sql +SET use_variant_as_common_type = 1; +SELECT array(range(number), number, 'str_' || toString(number)) as array_of_variants FROM numbers(3); +``` + +```text +┌─array_of_variants─┠+│ [[],0,'str_0'] │ +│ [[0],1,'str_1'] │ +│ [[0,1],2,'str_2'] │ +└───────────────────┘ +``` + +```sql +SET use_variant_as_common_type = 1; +SELECT map('a', range(number), 'b', number, 'c', 'str_' || toString(number)) as map_of_variants FROM numbers(3); +``` + +```text +┌─map_of_variants───────────────┠+│ {'a':[],'b':0,'c':'str_0'} │ +│ {'a':[0],'b':1,'c':'str_1'} │ +│ {'a':[0,1],'b':2,'c':'str_2'} │ +└───────────────────────────────┘ +``` + +## Variantã®ãƒã‚¹ãƒˆã•ã‚ŒãŸåž‹ã‚’サブカラムã¨ã—ã¦èª­ã¿å–ã‚‹ + +Variantåž‹ã¯ã€ã‚µãƒ–カラムã¨ã—ã¦åž‹åを使用ã—ã¦Variantカラムã‹ã‚‰å˜ä¸€ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸåž‹ã‚’読ã¿å–ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚例ãˆã°ã€ã‚«ãƒ©ãƒ `variant Variant(T1, T2, T3)`ãŒã‚ã‚‹å ´åˆã€ã‚µãƒ–カラム`variant.T2`を用ã„ã¦åž‹`T2`を読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ã‚µãƒ–カラムã¯`Nullable(T2)`åž‹ã‚’æŒã¡ã€`Nullable`ã®ä¸­ã«å…¥ã£ã¦ã„ãªã„å ´åˆã¯`T2`ã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã“ã®ã‚µãƒ–カラムã¯ã‚ªãƒªã‚¸ãƒŠãƒ«ã®`Variant`カラムã¨åŒã˜ã‚µã‚¤ã‚ºã§ã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã®`Variant`カラムã«`T2`åž‹ãŒãªã„ã™ã¹ã¦ã®è¡Œã§`NULL`ã®å€¤ï¼ˆã‚ã‚‹ã„ã¯`T2`ãŒ`Nullable`ã«å…¥ã£ã¦ã„ãªã„å ´åˆã¯ç©ºã®å€¤ï¼‰ã‚’å«ã¿ã¾ã™ã€‚ + +Variantã®ã‚µãƒ–カラムã¯ã€é–¢æ•° `variantElement(variant_column, type_name)` を使用ã—ã¦èª­ã‚€ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +例: + +```sql +CREATE TABLE test (v Variant(UInt64, String, Array(UInt64))) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('Hello, World!'), ([1, 2, 3]); +SELECT v, v.String, v.UInt64, v.`Array(UInt64)` FROM test; +``` + +```text +┌─v─────────────┬─v.String──────┬─v.UInt64─┬─v.Array(UInt64)─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [] │ +│ 42 │ á´ºáµá´¸á´¸ │ 42 │ [] │ +│ Hello, World! │ Hello, World! │ á´ºáµá´¸á´¸ │ [] │ +│ [1,2,3] │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [1,2,3] │ +└───────────────┴───────────────┴──────────┴─────────────────┘ +``` + +```sql +SELECT toTypeName(v.String), toTypeName(v.UInt64), toTypeName(v.`Array(UInt64)`) FROM test LIMIT 1; +``` + +```text +┌─toTypeName(v.String)─┬─toTypeName(v.UInt64)─┬─toTypeName(v.Array(UInt64))─┠+│ Nullable(String) │ Nullable(UInt64) │ Array(UInt64) │ +└──────────────────────┴──────────────────────┴─────────────────────────────┘ +``` + +```sql +SELECT v, variantElement(v, 'String'), variantElement(v, 'UInt64'), variantElement(v, 'Array(UInt64)') FROM test; +``` + +```text +┌─v─────────────┬─variantElement(v, 'String')─┬─variantElement(v, 'UInt64')─┬─variantElement(v, 'Array(UInt64)')─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [] │ +│ 42 │ á´ºáµá´¸á´¸ │ 42 │ [] │ +│ Hello, World! │ Hello, World! │ á´ºáµá´¸á´¸ │ [] │ +│ [1,2,3] │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [1,2,3] │ +└───────────────┴─────────────────────────────┴─────────────────────────────┴────────────────────────────────────┘ +``` + +å„è¡Œã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ãƒãƒªã‚¢ãƒ³ãƒˆã‚’知るãŸã‚ã« `variantType(variant_column)` 関数を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã‚Œã¯å„è¡Œã«å¯¾ã™ã‚‹ãƒãƒªã‚¢ãƒ³ãƒˆåž‹åã® `Enum` ã‚’è¿”ã—ã¾ã™ï¼ˆè¡ŒãŒ `NULL` ã®å ´åˆã¯ `'None'`)。 + +例: + +```sql +CREATE TABLE test (v Variant(UInt64, String, Array(UInt64))) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('Hello, World!'), ([1, 2, 3]); +SELECT variantType(v) from test; +``` + +```text +┌─variantType(v)─┠+│ None │ +│ UInt64 │ +│ String │ +│ Array(UInt64) │ +└────────────────┘ +``` + +```sql +SELECT toTypeName(variantType(v)) FROM test LIMIT 1; +``` + +```text +┌─toTypeName(variantType(v))──────────────────────────────────────────┠+│ Enum8('None' = -1, 'Array(UInt64)' = 0, 'String' = 1, 'UInt64' = 2) │ +└─────────────────────────────────────────────────────────────────────┘ +``` + +## Variantカラムã¨ä»–ã®ã‚«ãƒ©ãƒ é–“ã®å¤‰æ› + +`Variant` タイプã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦å®Ÿè¡Œã§ãã‚‹4ã¤ã®å¤‰æ›ãŒã‚ã‚Šã¾ã™ã€‚ + +### StringカラムをVariantカラムã«å¤‰æ›ã™ã‚‹ + +`String`ã‹ã‚‰`Variant`ã¸ã®å¤‰æ›ã¯ã€æ–‡å­—列ã®å€¤ã‹ã‚‰`Variant`åž‹ã®å€¤ã‚’解æžã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦è¡Œã‚ã‚Œã¾ã™: + +```sql +SELECT '42'::Variant(String, UInt64) as variant, variantType(variant) as variant_type +``` + +```text +┌─variant─┬─variant_type─┠+│ 42 │ UInt64 │ +└─────────┴──────────────┘ +``` + +```sql +SELECT '[1, 2, 3]'::Variant(String, Array(UInt64)) as variant, variantType(variant) as variant_type +``` + +```text +┌─variant─┬─variant_type──┠+│ [1,2,3] │ Array(UInt64) │ +└─────────┴───────────────┘ +``` + +```sql +SELECT CAST(map('key1', '42', 'key2', 'true', 'key3', '2020-01-01'), 'Map(String, Variant(UInt64, Bool, Date))') as map_of_variants, mapApply((k, v) -> (k, variantType(v)), map_of_variants) as map_of_variant_types +``` + +```text +┌─map_of_variants─────────────────────────────┬─map_of_variant_types──────────────────────────┠+│ {'key1':42,'key2':true,'key3':'2020-01-01'} │ {'key1':'UInt64','key2':'Bool','key3':'Date'} │ +└─────────────────────────────────────────────┴───────────────────────────────────────────────┘ +``` + +### 通常ã®ã‚«ãƒ©ãƒ ã‚’Variantカラムã«å¤‰æ›ã™ã‚‹ + +通常ã®åž‹`T`ã‚’æŒã¤ã‚«ãƒ©ãƒ ã‚’ã“ã®åž‹ã‚’å«ã‚€`Variant`カラムã«å¤‰æ›ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™: + +```sql +SELECT toTypeName(variant) as type_name, [1,2,3]::Array(UInt64)::Variant(UInt64, String, Array(UInt64)) as variant, variantType(variant) as variant_name + ``` + +```text +┌─type_name──────────────────────────────┬─variant─┬─variant_name──┠+│ Variant(Array(UInt64), String, UInt64) │ [1,2,3] │ Array(UInt64) │ +└────────────────────────────────────────┴─────────┴───────────────┘ +``` + +注æ„: `String`åž‹ã‹ã‚‰ã®å¤‰æ›ã¯å¸¸ã«è§£æžã‚’通ã˜ã¦è¡Œã‚ã‚Œã¾ã™ã€‚`String`カラムを解æžã›ãšã«`Variant`ã®`String`ãƒãƒªã‚¢ãƒ³ãƒˆã«å¤‰æ›ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ä»¥ä¸‹ã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™: +```sql +SELECT '[1, 2, 3]'::Variant(String)::Variant(String, Array(UInt64), UInt64) as variant, variantType(variant) as variant_type +``` + +```sql +┌─variant───┬─variant_type─┠+│ [1, 2, 3] │ String │ +└───────────┴──────────────┘ +``` + +### Variantカラムを通常ã®ã‚«ãƒ©ãƒ ã«å¤‰æ›ã™ã‚‹ + +`Variant`カラムを通常ã®ã‚«ãƒ©ãƒ ã«å¤‰æ›ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã“ã®å ´åˆã€ã™ã¹ã¦ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒãƒªã‚¢ãƒ³ãƒˆãŒå¤‰æ›å…ˆã®ã‚¿ã‚¤ãƒ—ã«å¤‰æ›ã•ã‚Œã¾ã™: + +```sql +CREATE TABLE test (v Variant(UInt64, String)) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('42.42'); +SELECT v::Nullable(Float64) FROM test; +``` + +```text +┌─CAST(v, 'Nullable(Float64)')─┠+│ á´ºáµá´¸á´¸ │ +│ 42 │ +│ 42.42 │ +└──────────────────────────────┘ +``` + +### Variantを別ã®Variantã«å¤‰æ›ã™ã‚‹ + +ã‚ã‚‹`Variant`カラムを別ã®`Variant`カラムã«å¤‰æ›ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ãŒã€å¤‰æ›å…ˆã®`Variant`カラムãŒå…ƒã®`Variant`ã‹ã‚‰ã™ã¹ã¦ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚¿ã‚¤ãƒ—ã‚’å«ã‚“ã§ã„ã‚‹å ´åˆã®ã¿ã§ã™: + +```sql +CREATE TABLE test (v Variant(UInt64, String)) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('String'); +SELECT v::Variant(UInt64, String, Array(UInt64)) FROM test; +``` + +```text +┌─CAST(v, 'Variant(UInt64, String, Array(UInt64))')─┠+│ á´ºáµá´¸á´¸ │ +│ 42 │ +│ String │ +└───────────────────────────────────────────────────┘ +``` + +## データã‹ã‚‰Variant型を読ã¿å–ã‚‹ + +ã™ã¹ã¦ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆï¼ˆTSVã€CSVã€CustomSeparatedã€Valuesã€JSONEachRowãªã©ï¼‰ã¯ `Variant` åž‹ã®èª­ã¿å–りをサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚データã®è§£æžä¸­ã« ClickHouse ã¯æœ€ã‚‚é©åˆ‡ãªãƒãƒªã‚¢ãƒ³ãƒˆåž‹ã«å€¤ã‚’挿入ã—よã†ã¨ã—ã¾ã™ã€‚ + +例: + +```sql +SELECT + v, + variantElement(v, 'String') AS str, + variantElement(v, 'UInt64') AS num, + variantElement(v, 'Float64') AS float, + variantElement(v, 'DateTime') AS date, + variantElement(v, 'Array(UInt64)') AS arr +FROM format(JSONEachRow, 'v Variant(String, UInt64, Float64, DateTime, Array(UInt64))', $$ +{"v" : "Hello, World!"}, +{"v" : 42}, +{"v" : 42.42}, +{"v" : "2020-01-01 00:00:00"}, +{"v" : [1, 2, 3]} +$$) +``` + +```text +┌─v───────────────────┬─str───────────┬──num─┬─float─┬────────────────date─┬─arr─────┠+│ Hello, World! │ Hello, World! │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [] │ +│ 42 │ á´ºáµá´¸á´¸ │ 42 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [] │ +│ 42.42 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 42.42 │ á´ºáµá´¸á´¸ │ [] │ +│ 2020-01-01 00:00:00 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ 2020-01-01 00:00:00 │ [] │ +│ [1,2,3] │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [1,2,3] │ +└─────────────────────┴───────────────┴──────┴───────┴─────────────────────┴─────────┘ +``` + +## Variantåž‹ã®å€¤ã‚’比較ã™ã‚‹ + +`Variant`åž‹ã®å€¤ã¯ã€åŒã˜`Variant`åž‹ã®å€¤ã¨ã ã‘比較ã§ãã¾ã™ã€‚ + +`Variant(..., T1, ... T2, ...)` åž‹ã«å¯¾ã—ã¦ã€åž‹`T1` ã‚’æŒã¤å€¤`v1`ã¨åž‹`T2`ã‚’æŒã¤å€¤`v2`ã«å¯¾ã™ã‚‹æ¼”ç®—å­`<`ã®çµæžœã¯ä»¥ä¸‹ã®ã‚ˆã†ã«å®šç¾©ã•ã‚Œã¾ã™: +- `T1 = T2 = T` ã®å ´åˆã€çµæžœã¯ `v1.T < v2.T` ã«ãªã‚Šã¾ã™ï¼ˆåŸºç¤Žã¨ãªã‚‹å€¤ãŒæ¯”較ã•ã‚Œã¾ã™ï¼‰ã€‚ +- `T1 != T2` ã®å ´åˆã€çµæžœã¯ `T1 < T2` ã«ãªã‚Šã¾ã™ï¼ˆåž‹åãŒæ¯”較ã•ã‚Œã¾ã™ï¼‰ã€‚ + +例: +```sql +CREATE TABLE test (v1 Variant(String, UInt64, Array(UInt32)), v2 Variant(String, UInt64, Array(UInt32))) ENGINE=Memory; +INSERT INTO test VALUES (42, 42), (42, 43), (42, 'abc'), (42, [1, 2, 3]), (42, []), (42, NULL); +``` + +```sql +SELECT v2, variantType(v2) as v2_type from test order by v2; +``` + +```text +┌─v2──────┬─v2_type───────┠+│ [] │ Array(UInt32) │ +│ [1,2,3] │ Array(UInt32) │ +│ abc │ String │ +│ 42 │ UInt64 │ +│ 43 │ UInt64 │ +│ á´ºáµá´¸á´¸ │ None │ +└─────────┴───────────────┘ +``` + +```sql +SELECT v1, variantType(v1) as v1_type, v2, variantType(v2) as v2_type, v1 = v2, v1 < v2, v1 > v2 from test; +``` + +```text +┌─v1─┬─v1_type─┬─v2──────┬─v2_type───────┬─equals(v1, v2)─┬─less(v1, v2)─┬─greater(v1, v2)─┠+│ 42 │ UInt64 │ 42 │ UInt64 │ 1 │ 0 │ 0 │ +│ 42 │ UInt64 │ 43 │ UInt64 │ 0 │ 1 │ 0 │ +│ 42 │ UInt64 │ abc │ String │ 0 │ 0 │ 1 │ +│ 42 │ UInt64 │ [1,2,3] │ Array(UInt32) │ 0 │ 0 │ 1 │ +│ 42 │ UInt64 │ [] │ Array(UInt32) │ 0 │ 0 │ 1 │ +│ 42 │ UInt64 │ á´ºáµá´¸á´¸ │ None │ 0 │ 1 │ 0 │ +└────┴─────────┴─────────┴───────────────┴────────────────┴──────────────┴─────────────────┘ + +``` + +特定ã®`Variant`値をæŒã¤è¡Œã‚’見ã¤ã‘ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™: + +- 値を対応ã™ã‚‹`Variant`åž‹ã«ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹: + +```sql +SELECT * FROM test WHERE v2 == [1,2,3]::Array(UInt32)::Variant(String, UInt64, Array(UInt32)); +``` + +```text +┌─v1─┬─v2──────┠+│ 42 │ [1,2,3] │ +└────┴─────────┘ +``` + +- å¿…è¦ãªåž‹ã‚’æŒã¤`Variant`サブカラムを比較ã™ã‚‹: + +```sql +SELECT * FROM test WHERE v2.`Array(UInt32)` == [1,2,3] -- ã¾ãŸã¯ variantElement(v2, 'Array(UInt32)') を使用 +``` + +```text +┌─v1─┬─v2──────┠+│ 42 │ [1,2,3] │ +└────┴─────────┘ +``` + +複雑ãªåž‹ï¼ˆ`Array/Map/Tuple`ãªã©ï¼‰ã¯`Nullable`内ã«å«ã¾ã‚Œã‚‹ã“ã¨ãŒã§ããšã€ç•°ãªã‚‹åž‹ã‚’æŒã¤è¡Œã§ã¯`NULL`ã®ä»£ã‚ã‚Šã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’æŒã¤ãŸã‚ã€ãƒãƒªã‚¢ãƒ³ãƒˆã‚¿ã‚¤ãƒ—ã«å¯¾ã—ã¦è¿½åŠ ã®ãƒã‚§ãƒƒã‚¯ã‚’è¡Œã†ã®ãŒæœ‰åŠ¹ãªå ´åˆã‚‚ã‚ã‚Šã¾ã™: + +```sql +SELECT v2, v2.`Array(UInt32)`, variantType(v2) FROM test WHERE v2.`Array(UInt32)` == []; +``` + +```text +┌─v2───┬─v2.Array(UInt32)─┬─variantType(v2)─┠+│ 42 │ [] │ UInt64 │ +│ 43 │ [] │ UInt64 │ +│ abc │ [] │ String │ +│ [] │ [] │ Array(UInt32) │ +│ á´ºáµá´¸á´¸ │ [] │ None │ +└──────┴──────────────────┴─────────────────┘ +``` + +```sql +SELECT v2, v2.`Array(UInt32)`, variantType(v2) FROM test WHERE variantType(v2) == 'Array(UInt32)' AND v2.`Array(UInt32)` == []; +``` + +```text +┌─v2─┬─v2.Array(UInt32)─┬─variantType(v2)─┠+│ [] │ [] │ Array(UInt32) │ +└────┴──────────────────┴─────────────────┘ +``` + +**注:** ç•°ãªã‚‹æ•°å€¤ã‚¿ã‚¤ãƒ—ã‚’æŒã¤ãƒãƒªã‚¢ãƒ³ãƒˆã®å€¤ã¯ã€äº’ã„ã«åˆ¥ã®ãƒãƒªã‚¢ãƒ³ãƒˆã¨ã—ã¦è€ƒæ…®ã•ã‚Œã€æ¯”較ã•ã‚Œã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。ãれらã®åž‹åãŒä»£ã‚ã‚Šã«æ¯”較ã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +SET allow_suspicious_variant_types = 1; +CREATE TABLE test (v Variant(UInt32, Int64)) ENGINE=Memory; +INSERT INTO test VALUES (1::UInt32), (1::Int64), (100::UInt32), (100::Int64); +SELECT v, variantType(v) FROM test ORDER by v; +``` + +```text +┌─v───┬─variantType(v)─┠+│ 1 │ Int64 │ +│ 100 │ Int64 │ +│ 1 │ UInt32 │ +│ 100 │ UInt32 │ +└─────┴────────────────┘ +``` + +**注** デフォルトã§ã¯ `Variant` 型㯠`GROUP BY`/`ORDER BY` キーã«ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。使用ã™ã‚‹å ´åˆã¯ãã®ç‰¹åˆ¥ãªæ¯”較ルールを考慮ã—ã€`allow_suspicious_types_in_group_by`/`allow_suspicious_types_in_order_by` 設定を有効ã«ã—ã¦ãã ã•ã„。 + +## Variantを使用ã—ãŸJSONExtract関数 + +ã™ã¹ã¦ã® `JSONExtract*` 関数㯠`Variant` 型をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: + +```sql +SELECT JSONExtract('{"a" : [1, 2, 3]}', 'a', 'Variant(UInt32, String, Array(UInt32))') AS variant, variantType(variant) AS variant_type; +``` + +```text +┌─variant─┬─variant_type──┠+│ [1,2,3] │ Array(UInt32) │ +└─────────┴───────────────┘ +``` + +```sql +SELECT JSONExtract('{"obj" : {"a" : 42, "b" : "Hello", "c" : [1,2,3]}}', 'obj', 'Map(String, Variant(UInt32, String, Array(UInt32)))') AS map_of_variants, mapApply((k, v) -> (k, variantType(v)), map_of_variants) AS map_of_variant_types +``` + +```text +┌─map_of_variants──────────────────┬─map_of_variant_types────────────────────────────┠+│ {'a':42,'b':'Hello','c':[1,2,3]} │ {'a':'UInt32','b':'String','c':'Array(UInt32)'} │ +└──────────────────────────────────┴─────────────────────────────────────────────────┘ +``` + +```sql +SELECT JSONExtractKeysAndValues('{"a" : 42, "b" : "Hello", "c" : [1,2,3]}', 'Variant(UInt32, String, Array(UInt32))') AS variants, arrayMap(x -> (x.1, variantType(x.2)), variants) AS variant_types +``` + +```text +┌─variants───────────────────────────────┬─variant_types─────────────────────────────────────────┠+│ [('a',42),('b','Hello'),('c',[1,2,3])] │ [('a','UInt32'),('b','String'),('c','Array(UInt32)')] │ +└────────────────────────────────────────┴───────────────────────────────────────────────────────┘ +``` + diff --git a/docs/ja/sql-reference/dictionaries/_snippet_dictionary_in_cloud.md b/docs/ja/sql-reference/dictionaries/_snippet_dictionary_in_cloud.md new file mode 100644 index 00000000000..c41ccaa1f75 --- /dev/null +++ b/docs/ja/sql-reference/dictionaries/_snippet_dictionary_in_cloud.md @@ -0,0 +1,3 @@ +:::tip +ClickHouse Cloudを使用ã—ã¦Dictionaryを利用ã™ã‚‹å ´åˆã€DDLクエリオプションを使用ã—ã¦Dictionaryを作æˆã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼`default`ã¨ã—ã¦Dictionaryを作æˆã—ã¦ãã ã•ã„。ã¾ãŸã€[Cloud Compatibility guide](/docs/ja/cloud/reference/cloud-compatibility.md)ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹Dictionaryã®ã‚½ãƒ¼ã‚¹ã®ä¸€è¦§ã‚’確èªã—ã¦ãã ã•ã„。 +::: diff --git a/docs/ja/sql-reference/dictionaries/index.md b/docs/ja/sql-reference/dictionaries/index.md new file mode 100644 index 00000000000..663788c2088 --- /dev/null +++ b/docs/ja/sql-reference/dictionaries/index.md @@ -0,0 +1,2505 @@ +--- +slug: /ja/sql-reference/dictionaries +sidebar_label: ディクショナリ定義 +sidebar_position: 35 +--- + +import SelfManaged from '@site/docs/ja/_snippets/_self_managed_only_no_roadmap.md'; +import CloudDetails from '@site/docs/ja/sql-reference/dictionaries/_snippet_dictionary_in_cloud.md'; + +# ディクショナリ + +ディクショナリã¯ã€ã•ã¾ã–ã¾ãªç¨®é¡žã®å‚照リストã«ä¾¿åˆ©ãªãƒžãƒƒãƒ”ング (`key -> attributes`) ã§ã™ã€‚ + +ClickHouseã¯ã‚¯ã‚¨ãƒªã§ä½¿ç”¨ã§ãるディクショナリをæ“作ã™ã‚‹ãŸã‚ã®ç‰¹åˆ¥ãªé–¢æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚リファレンステーブルã¨ã® `JOIN` よりもã€é–¢æ•°ã‚’使用ã—ã¦ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’使ã†ã»ã†ãŒç°¡å˜ã‹ã¤åŠ¹çŽ‡çš„ã§ã™ã€‚ + +ClickHouseã¯æ¬¡ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: + +- [一連ã®é–¢æ•°](../../sql-reference/functions/ext-dict-functions.md)ã‚’æŒã¤ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã€‚ +- 特定ã®[一連ã®é–¢æ•°](../../sql-reference/functions/ym-dict-functions.md)ã‚’æŒã¤[埋ã‚è¾¼ã¿ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒª](#embedded-dictionaries)。 + +:::tip ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ« +ClickHouseã§ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’始ã‚ã‚‹å ´åˆã«ã¯ã€ãã®ãƒˆãƒ”ックをカãƒãƒ¼ã—ãŸãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ãŒã‚ã‚Šã¾ã™ã€‚[ã“ã¡ã‚‰](/docs/ja/tutorial.md)ã‚’ã”覧ãã ã•ã„。 +::: + +クリックãƒã‚¦ã‚¹ã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã¯ã•ã¾ã–ã¾ãªãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‹ã‚‰è¿½åŠ ã§ãã¾ã™ã€‚ディクショナリã®ã‚½ãƒ¼ã‚¹ã«ã¯ã€ClickHouseテーブルã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã¾ãŸã¯å®Ÿè¡Œãƒ•ã‚¡ã‚¤ãƒ«ã€HTTP(s)リソースã€ã¾ãŸã¯ä»–ã®DBMSを使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ã¯ã€Œ[ディクショナリソース](#dictionary-sources)ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ClickHouse: + +- ディクショナリをRAMã«å®Œå…¨ã¾ãŸã¯éƒ¨åˆ†çš„ã«ä¿å­˜ã—ã¾ã™ã€‚ +- ディクショナリを定期的ã«æ›´æ–°ã—ã€æ¬ ã‘ã¦ã„る値を動的ã«ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã¯å‹•çš„ã«ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ +- xmlファイルã¾ãŸã¯[DDLクエリ](../../sql-reference/statements/create/dictionary.md)ã§ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’作æˆã§ãã¾ã™ã€‚ + +ディクショナリã®è¨­å®šã¯ã€1ã¤ä»¥ä¸Šã®xmlファイルã«é…ç½®ã§ãã¾ã™ã€‚設定ã¸ã®ãƒ‘スã¯ã€[dictionaries_config](../../operations/server-configuration-parameters/settings.md#dictionaries_config)パラメータã§æŒ‡å®šã—ã¾ã™ã€‚ + +ディクショナリã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®èµ·å‹•æ™‚ã¾ãŸã¯æœ€åˆã®ä½¿ç”¨æ™‚ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ãŒã€ãã‚Œã¯[dictionaries_lazy_load](../../operations/server-configuration-parameters/settings.md#dictionaries_lazy_load)設定ã«ä¾å­˜ã—ã¾ã™ã€‚ + +[システムテーブルdictionaries](../../operations/system-tables/dictionaries.md#system_tables-dictionaries)ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã§è¨­å®šã•ã‚ŒãŸãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚å„ディクショナリã«ã¤ã„ã¦ã€æ¬¡ã®æƒ…報を確èªã§ãã¾ã™ï¼š + +- ディクショナリã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã€‚ +- 設定パラメータ。 +- ディクショナリãŒæ­£å¸¸ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã‹ã‚‰ã®RAM使用é‡ã‚„クエリ数ãªã©ã®ãƒ¡ãƒˆãƒªãƒƒã‚¯ã€‚ + + + +## DDLクエリを使用ã—ãŸãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®ä½œæˆ {#creating-a-dictionary-with-a-ddl-query} + +ディクショナリã¯[DDLクエリ](../../sql-reference/statements/create/dictionary.md)を使用ã—ã¦ä½œæˆã§ãã¾ã™ã€‚DDLã§ä½œæˆã—ãŸãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã¯æ¬¡ã®åˆ©ç‚¹ãŒã‚ã‚‹ãŸã‚ã€æŽ¨å¥¨ã•ã‚Œã‚‹æ–¹æ³•ã§ã™: +- サーãƒãƒ¼ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã«è¿½åŠ ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¿½åŠ ã•ã‚Œãªã„ +- ディクショナリã¯ãƒ†ãƒ¼ãƒ–ルやビューã®ã‚ˆã†ã«ç¬¬ä¸€ç´šã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨ã—ã¦æ‰±ãˆã‚‹ +- ディクショナリテーブル関数ã§ã¯ãªãã€SELECTを使用ã—ã¦ç›´æŽ¥ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã“ã¨ãŒã§ãã‚‹ +- ディクショナリã®åå‰ã‚’ç°¡å˜ã«å¤‰æ›´ã§ãã‚‹ + +## 設定ファイルを使用ã—ãŸãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®ä½œæˆ + +:::note +設定ファイルを用ã„ãŸãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®ä½œæˆã¯ã€ClickHouse Cloudã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。上記ã®DDLを使用ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼`default`ã¨ã—ã¦ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’作æˆã—ã¦ãã ã•ã„。 +::: + +ディクショナリã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¯æ¬¡ã®å½¢å¼ã‚’æŒã¡ã¾ã™: + +``` xml + + ä»»æ„ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã‚’æŒã¤ã‚ªãƒ—ションè¦ç´ ã€‚ClickHouseサーãƒãƒ¼ã«ã‚ˆã£ã¦ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + + + /etc/metrika.xml + + + + + + + +``` + +åŒã˜ãƒ•ã‚¡ã‚¤ãƒ«ã§ä»»æ„ã®æ•°ã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’[設定](#configuring-a-dictionary)ã§ãã¾ã™ã€‚ + +:::note +å°ã•ãªãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®å€¤ã‚’`SELECT`クエリã§è¨˜è¿°ã™ã‚‹ã“ã¨ã§å¤‰æ›ã§ãã¾ã™ï¼ˆ[transform](../../sql-reference/functions/other-functions.md)関数をå‚照)。ã“ã®æ©Ÿèƒ½ã¯ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã¨ã¯é–¢ä¿‚ã‚ã‚Šã¾ã›ã‚“。 +::: + +## ディクショナリã®è¨­å®š + + + +ディクショナリãŒxmlファイルã§è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®è¨­å®šã¯æ¬¡ã®æ§‹é€ ã‚’æŒã¡ã¾ã™: + +``` xml + + dict_name + + + + + + + + + + + + + + + + + +``` + +対応ã™ã‚‹[DDLクエリ](../../sql-reference/statements/create/dictionary.md)ã¯æ¬¡ã®æ§‹é€ ã§ã™: + +``` sql +CREATE DICTIONARY dict_name +( + ... -- 属性 +) +PRIMARY KEY ... -- 複åˆã¾ãŸã¯å˜ä¸€ã‚­ãƒ¼ã®è¨­å®š +SOURCE(...) -- ソース設定 +LAYOUT(...) -- メモリレイアウトã®è¨­å®š +LIFETIME(...) -- メモリã«ãŠã‘るディクショナリã®å¯¿å‘½ +``` + +## メモリã«ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’ä¿å­˜ã™ã‚‹æ–¹æ³• + +ディクショナリをメモリã«ä¿å­˜ã™ã‚‹æ–¹æ³•ã¯ã•ã¾ã–ã¾ã§ã™ã€‚ + +最é©ãªå‡¦ç†é€Ÿåº¦ã‚’æä¾›ã™ã‚‹[flat](#flat)ã€[hashed](#hashed)ãŠã‚ˆã³[complex_key_hashed](#complex_key_hashed)ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +キャッシュã¯æ½œåœ¨çš„ãªä½Žãƒ‘フォーマンスã¨æœ€é©ãªãƒ‘ラメータã®é¸æŠžãŒé›£ã—ã„ãŸã‚推奨ã•ã‚Œã¾ã›ã‚“。[cache](#cache)セクションã§è©³ç´°ã‚’読むã“ã¨ãŒã§ãã¾ã™ã€‚ + +ディクショナリã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ã„ãã¤ã‹ã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™: + +- ディクショナリã§æ“作ã™ã‚‹ãŸã‚ã®é–¢æ•°ã‚’`GROUP BY`ã®å¾Œã«å‘¼ã³å‡ºã™ã€‚ +- 抽出ã™ã‚‹å±žæ€§ã‚’全射的ã§ã‚ã‚‹ã¨ãƒžãƒ¼ã‚¯ã—ã¾ã™ã€‚属性ãŒç•°ãªã‚‹ã‚­ãƒ¼ã«å¯¾å¿œã™ã‚‹å ´åˆã€ãれを全射ã¨å‘¼ã³ã¾ã™ã€‚ã¤ã¾ã‚Šã€`GROUP BY`ãŒã‚­ãƒ¼ã§å±žæ€§å€¤ã‚’å–å¾—ã™ã‚‹é–¢æ•°ã‚’使用ã™ã‚‹å ´åˆã€ã“ã®é–¢æ•°ãŒ`GROUP BY`ã‹ã‚‰è‡ªå‹•çš„ã«å–り出ã•ã‚Œã¾ã™ã€‚ + +ClickHouseã¯ã‚¨ãƒ©ãƒ¼ãŒãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã§ç™ºç”Ÿã—ãŸå ´åˆã«ä¾‹å¤–を生æˆã—ã¾ã™ã€‚エラーã®ä¾‹: + +- アクセスã—よã†ã¨ã—ãŸãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªãŒãƒ­ãƒ¼ãƒ‰ã§ããªã‹ã£ãŸã€‚ +- `cached`ディクショナリをクエリã™ã‚‹éš›ã®ã‚¨ãƒ©ãƒ¼ã€‚ + +[system.dictionaries](../../operations/system-tables/dictionaries.md)テーブルã§ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®ãƒªã‚¹ãƒˆã¨ãã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’表示ã§ãã¾ã™ã€‚ + + + +設定ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +``` xml + + + ... + + + + + + ... + + +``` + +対応ã™ã‚‹[DDLクエリ](../../sql-reference/statements/create/dictionary.md)ã¯æ¬¡ã®é€šã‚Šã§ã™: + +``` sql +CREATE DICTIONARY (...) +... +LAYOUT(LAYOUT_TYPE(param value)) -- レイアウト設定 +... +``` + +レイアウトã«`complex-key*`ã¨ã„ã†è¨€è‘‰ãŒå«ã¾ã‚Œã¦ã„ãªã„ディクショナリã¯ã€[UInt64](../../sql-reference/data-types/int-uint.md)åž‹ã®ã‚­ãƒ¼ã‚’æŒã¡ã€`complex-key*`ディクショナリã¯è¤‡åˆã‚­ãƒ¼ï¼ˆä»»æ„ã®åž‹ï¼‰ã‚’æŒã¡ã¾ã™ã€‚ + +XMLディクショナリ内ã®[UInt64](../../sql-reference/data-types/int-uint.md)キーã¯``ã‚¿ã‚°ã§å®šç¾©ã—ã¾ã™ã€‚ + +設定ã®ä¾‹ï¼ˆã‚«ãƒ©ãƒ key_columnãŒUInt64åž‹ã®å ´åˆï¼‰: +```xml +... + + + key_column + +... +``` + +複åˆ`complex`キーã®XMLディクショナリã¯``ã‚¿ã‚°ã§å®šç¾©ã—ã¾ã™ã€‚ + +複åˆã‚­ãƒ¼ã®è¨­å®šä¾‹ï¼ˆã‚­ãƒ¼ãŒ[String](../../sql-reference/data-types/string.md)åž‹ã®1è¦ç´ ã‚’æŒã¤å ´åˆï¼‰: +```xml +... + + + + country_code + String + + +... +``` + +## メモリã«ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’ä¿å­˜ã™ã‚‹æ–¹æ³• + +- [flat](#flat) +- [hashed](#hashed) +- [sparse_hashed](#sparse_hashed) +- [complex_key_hashed](#complex_key_hashed) +- [complex_key_sparse_hashed](#complex_key_sparse_hashed) +- [hashed_array](#hashed_array) +- [complex_key_hashed_array](#complex_key_hashed_array) +- [range_hashed](#range_hashed) +- [complex_key_range_hashed](#complex_key_range_hashed) +- [cache](#cache) +- [complex_key_cache](#complex_key_cache) +- [ssd_cache](#ssd_cache) +- [complex_key_ssd_cache](#complex_key_ssd_cache) +- [direct](#direct) +- [complex_key_direct](#complex_key_direct) +- [ip_trie](#ip_trie) + +### flat + +ディクショナリã¯ãƒ•ãƒ©ãƒƒãƒˆé…列ã®å½¢ã§ãƒ¡ãƒ¢ãƒªã«å®Œå…¨ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ディクショナリã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã¯ã©ã‚Œãらã„ã§ã™ã‹ï¼Ÿãã‚Œã¯æœ€å¤§ã‚µã‚¤ã‚ºã®ã‚­ãƒ¼ã«æ¯”例ã—ã¾ã™ã€‚ + +ディクショナリキーã¯[UInt64](../../sql-reference/data-types/int-uint.md)åž‹ã‚’æŒã¡ã€å€¤ã¯`max_array_size`(デフォルトã¯500,000)ã«åˆ¶é™ã•ã‚Œã¾ã™ã€‚ディクショナリ作æˆæ™‚ã«ã‚ˆã‚Šå¤§ããªã‚­ãƒ¼ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã€ClickHouseã¯ä¾‹å¤–をスローã—ã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’作æˆã—ã¾ã›ã‚“。ディクショナリã®ãƒ•ãƒ©ãƒƒãƒˆé…列åˆæœŸã‚µã‚¤ã‚ºã¯`initial_array_size`設定(デフォルトã¯1024)ã§åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ + +å…¨ã¦ã®ç¨®é¡žã®ã‚½ãƒ¼ã‚¹ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚æ›´æ–°ã™ã‚‹éš›ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ï¼ˆãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ï¼‰ã¯å…¨ä½“ã§èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ + +ã“ã®æ–¹æ³•ã¯ã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã®ã™ã¹ã¦ã®æ–¹æ³•ã®ä¸­ã§æœ€é«˜ã®ãƒ‘フォーマンスをæä¾›ã—ã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + 50000 + 5000000 + + +``` + +ã¾ãŸã¯ + +``` sql +LAYOUT(FLAT(INITIAL_ARRAY_SIZE 50000 MAX_ARRAY_SIZE 5000000)) +``` + +### hashed + +ディクショナリã¯ã€ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®å½¢ã§ãƒ¡ãƒ¢ãƒªã«å®Œå…¨ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ディクショナリã¯ä»»æ„ã®æ•°ã®è¦ç´ ã¨è­˜åˆ¥å­ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚実際ã«ã¯ã€ã‚­ãƒ¼ã®æ•°ã¯ä½•åƒä¸‡ã‚¢ã‚¤ãƒ†ãƒ ã«é”ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ディクショナリキーã¯[UInt64](../../sql-reference/data-types/int-uint.md)åž‹ã‚’æŒã¡ã¾ã™ã€‚ + +å…¨ã¦ã®ç¨®é¡žã®ã‚½ãƒ¼ã‚¹ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚æ›´æ–°ã™ã‚‹éš›ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ï¼ˆãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ï¼‰ãŒå…¨ä½“ã¨ã—ã¦èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + +``` + +ã¾ãŸã¯ + +``` sql +LAYOUT(HASHED()) +``` + +設定ã®ä¾‹: + +``` xml + + + + 10 + + + 10000 + + + 0.5 + + +``` + +ã¾ãŸã¯ + +``` sql +LAYOUT(HASHED([SHARDS 1] [SHARD_LOAD_QUEUE_BACKLOG 10000] [MAX_LOAD_FACTOR 0.5])) +``` + +### sparse_hashed + +`hashed` ã«ä¼¼ã¦ã„ã¾ã™ãŒã€ã‚ˆã‚Šå¤šãã®CPU使用é‡ã«å¯¾ã—ã¦ãƒ¡ãƒ¢ãƒªã‚’å°‘ãªã使用ã—ã¾ã™ã€‚ + +ディクショナリキーã¯[UInt64](../../sql-reference/data-types/int-uint.md)åž‹ã‚’æŒã¡ã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + + + + + +``` + +ã¾ãŸã¯ + +``` sql +LAYOUT(SPARSE_HASHED([SHARDS 1] [SHARD_LOAD_QUEUE_BACKLOG 10000] [MAX_LOAD_FACTOR 0.5])) +``` + +ã“ã®ç¨®é¡žã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã§ã¯ã€`shards`を使用ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã€å†ã³ãã‚Œã¯`hashed`ã«æ¯”ã¹ã¦`sparse_hashed`ã®æ–¹ãŒã‚ˆã‚Šé‡è¦ã§ã™ã€‚ãªãœãªã‚‰ã€`sparse_hashed`ã¯ã‚ˆã‚Šé…ã„ãŸã‚ã§ã™ã€‚ + +### complex_key_hashed + +ã“ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—ã¯ã€è¤‡åˆ[キー](#dictionary-key-and-fields)ã¨å…±ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚`hashed`ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + + + + + +``` + +ã¾ãŸã¯ + +``` sql +LAYOUT(COMPLEX_KEY_HASHED([SHARDS 1] [SHARD_LOAD_QUEUE_BACKLOG 10000] [MAX_LOAD_FACTOR 0.5])) +``` + +### complex_key_sparse_hashed + +ã“ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—ã¯ã€è¤‡åˆ[キー](#dictionary-key-and-fields)ã¨å…±ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚[sparse_hashed](#sparse_hashed)ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + + + + + +``` + +ã¾ãŸã¯ + +``` sql +LAYOUT(COMPLEX_KEY_SPARSE_HASHED([SHARDS 1] [SHARD_LOAD_QUEUE_BACKLOG 10000] [MAX_LOAD_FACTOR 0.5])) +``` + +### hashed_array + +ディクショナリã¯å®Œå…¨ã«ãƒ¡ãƒ¢ãƒªã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚å„属性ã¯é…列ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚キー属性ã¯ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®å½¢å¼ã§ä¿å­˜ã•ã‚Œã€å€¤ã¯å±žæ€§é…列ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã§ã™ã€‚ディクショナリã¯ä»»æ„ã®æ•°ã®è¦ç´ ã¨è­˜åˆ¥å­ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚実際ã«ã¯ã€ã‚­ãƒ¼ã®æ•°ã¯ä½•åƒä¸‡ã‚¢ã‚¤ãƒ†ãƒ ã«é”ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ディクショナリキーã¯[UInt64](../../sql-reference/data-types/int-uint.md)åž‹ã‚’æŒã¡ã¾ã™ã€‚ + +å…¨ã¦ã®ç¨®é¡žã®ã‚½ãƒ¼ã‚¹ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚æ›´æ–°ã™ã‚‹éš›ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ï¼ˆãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ï¼‰ãŒå…¨ä½“ã¨ã—ã¦èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + + +``` + +ã¾ãŸã¯ + +``` sql +LAYOUT(HASHED_ARRAY([SHARDS 1])) +``` + +### complex_key_hashed_array + +ã“ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—ã¯ã€è¤‡åˆ[キー](#dictionary-key-and-fields)ã¨å…±ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚[hashed_array](#hashed_array)ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + +``` + +ã¾ãŸã¯ + +``` sql +LAYOUT(COMPLEX_KEY_HASHED_ARRAY([SHARDS 1])) +``` + +### range_hashed + +ディクショナリã¯ã€ç¯„囲ã¨ãã‚Œã«å¯¾å¿œã™ã‚‹å€¤ã®é †åºä»˜ãé…列をæŒã¤ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®å½¢ã§ãƒ¡ãƒ¢ãƒªã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +ディクショナリキーã¯[UInt64](../../sql-reference/data-types/int-uint.md)åž‹ã‚’æŒã¡ã¾ã™ã€‚ +ã“ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸æ–¹æ³•ã¯ã€`hashed`ã¨åŒæ§˜ã«æ©Ÿèƒ½ã—ã€ã‚­ãƒ¼ã«åŠ ãˆã¦æ—¥ä»˜/時間(任æ„ã®æ•°å€¤åž‹ï¼‰ã®ç¯„囲を使用ã§ãã¾ã™ã€‚ + +例: テーブルã¯å„広告主ã«å¯¾ã™ã‚‹å‰²å¼•ã‚’次ã®å½¢å¼ã§å«ã¿ã¾ã™: + +``` text +┌─advertiser_id─┬─discount_start_date─┬─discount_end_date─┬─amount─┠+│ 123 │ 2015-01-16 │ 2015-01-31 │ 0.25 │ +│ 123 │ 2015-01-01 │ 2015-01-15 │ 0.15 │ +│ 456 │ 2015-01-01 │ 2015-01-15 │ 0.05 │ +└───────────────┴─────────────────────┴───────────────────┴────────┘ +``` + +日付範囲ã®ã‚µãƒ³ãƒ—ルを使用ã™ã‚‹ã«ã¯ã€[structure](#dictionary-key-and-fields)ã§`range_min`ã¨`range_max`è¦ç´ ã‚’定義ã—ã¾ã™ã€‚ã“れらã®è¦ç´ ã¯`name`ã¨`type`(`type`ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆåž‹ã§ã‚ã‚‹DateãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼‰ã®è¦ç´ ã‚’æŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`type`ã¯ä»»æ„ã®æ•°å€¤åž‹ï¼ˆDate / DateTime / UInt64 / Int32 / ãã®ä»–)ãŒå¯èƒ½ã§ã™ã€‚ + +:::note +`range_min`ã¨`range_max`ã®å€¤ã¯`Int64`åž‹ã«åŽã¾ã‚‹ã¹ãã§ã™ã€‚ +::: + +例: + +``` xml + + + + min + + + + + advertiser_id + + + discount_start_date + Date + + + discount_end_date + Date + + ... +``` + +ã¾ãŸã¯ + +``` sql +CREATE DICTIONARY discounts_dict ( + advertiser_id UInt64, + discount_start_date Date, + discount_end_date Date, + amount Float64 +) +PRIMARY KEY id +SOURCE(CLICKHOUSE(TABLE 'discounts')) +LIFETIME(MIN 1 MAX 1000) +LAYOUT(RANGE_HASHED(range_lookup_strategy 'max')) +RANGE(MIN discount_start_date MAX discount_end_date) +``` + +ã“れらã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’æ“作ã™ã‚‹ã«ã¯ã€`dictGet`関数ã«ç¯„囲をé¸æŠžã™ã‚‹ãŸã‚ã®è¿½åŠ ã®å¼•æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™: + +``` sql +dictGet('dict_name', 'attr_name', id, date) +``` + +クエリ例: + +``` sql +SELECT dictGet('discounts_dict', 'amount', 1, '2022-10-20'::Date); +``` + +ã“ã®é–¢æ•°ã¯ã€æŒ‡å®šã•ã‚ŒãŸ`id`ã¨ã€æ¸¡ã•ã‚ŒãŸæ—¥ä»˜ã‚’å«ã‚€æ—¥ä»˜ç¯„囲ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +アルゴリズムã®è©³ç´°: + +- `id`ãŒè¦‹ã¤ã‹ã‚‰ãªã„ã‹ã€`id`ã®ãŸã‚ã®ç¯„囲ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ãã®å±žæ€§ã®åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- é‡è¤‡ã™ã‚‹ç¯„囲ãŒã‚ã‚Šã€`range_lookup_strategy=min`ã§ã‚ã‚‹å ´åˆã€æœ€å°ã®`range_min`ã‚’æŒã¤ä¸€è‡´ã™ã‚‹ç¯„囲を返ã—ã¾ã™ã€‚複数ã®ç¯„囲ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã€æœ€å°ã®`range_max`ã‚’æŒã¤ç¯„囲を返ã—ã¾ã™ã€‚ãã‚Œã§ã‚‚複数ã®ç¯„囲ãŒï¼ˆåŒã˜`range_min`ã¨`range_max`ã‚’æŒã¤è¤‡æ•°ã®ç¯„囲ãŒã‚ã£ãŸå ´åˆï¼‰ã¯ã€ãƒ©ãƒ³ãƒ€ãƒ ã«ãã®ä¸­ã®ä¸€ã¤ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- é‡è¤‡ã™ã‚‹ç¯„囲ãŒã‚ã‚Šã€`range_lookup_strategy=max`ã§ã‚ã‚‹å ´åˆã€æœ€å¤§ã®`range_min`ã‚’æŒã¤ä¸€è‡´ã™ã‚‹ç¯„囲を返ã—ã¾ã™ã€‚複数ã®ç¯„囲ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã€æœ€å¤§ã®`range_max`ã‚’æŒã¤ç¯„囲を返ã—ã¾ã™ã€‚ãã‚Œã§ã‚‚複数ã®ç¯„囲ãŒï¼ˆåŒã˜`range_min`ã¨`range_max`ã‚’æŒã¤è¤‡æ•°ã®ç¯„囲ãŒã‚ã£ãŸå ´åˆï¼‰ã¯ã€ãƒ©ãƒ³ãƒ€ãƒ ã«ãã®ä¸­ã®ä¸€ã¤ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `range_max`ãŒ`NULL`ã®å ´åˆã€ç¯„囲ã¯é–‹ã‹ã‚Œã¦ã„ã¾ã™ã€‚`NULL`ã¯æœ€å¤§å¯èƒ½å€¤ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚`range_min`ã«å¯¾ã—ã¦ã¯ã€`1970-01-01`ã¾ãŸã¯`0`(-MAX_INT)ãŒé–‹ã„ãŸå€¤ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ + +設定例: + +``` xml + + + ... + + + + + + + + Abcdef + + + StartTimeStamp + UInt64 + + + EndTimeStamp + UInt64 + + + XXXType + String + + + + + + +``` + +ã¾ãŸã¯ + +``` sql +CREATE DICTIONARY somedict( + Abcdef UInt64, + StartTimeStamp UInt64, + EndTimeStamp UInt64, + XXXType String DEFAULT '' +) +PRIMARY KEY Abcdef +RANGE(MIN StartTimeStamp MAX EndTimeStamp) +``` + +é‡è¤‡ã™ã‚‹ç¯„囲ã¨é–‹ã„ãŸç¯„囲ã®è¨­å®šä¾‹: + +```sql +CREATE TABLE discounts +( + advertiser_id UInt64, + discount_start_date Date, + discount_end_date Nullable(Date), + amount Float64 +) +ENGINE = Memory; + +INSERT INTO discounts VALUES (1, '2015-01-01', Null, 0.1); +INSERT INTO discounts VALUES (1, '2015-01-15', Null, 0.2); +INSERT INTO discounts VALUES (2, '2015-01-01', '2015-01-15', 0.3); +INSERT INTO discounts VALUES (2, '2015-01-04', '2015-01-10', 0.4); +INSERT INTO discounts VALUES (3, '1970-01-01', '2015-01-15', 0.5); +INSERT INTO discounts VALUES (3, '1970-01-01', '2015-01-10', 0.6); + +SELECT * FROM discounts ORDER BY advertiser_id, discount_start_date; +┌─advertiser_id─┬─discount_start_date─┬─discount_end_date─┬─amount─┠+│ 1 │ 2015-01-01 │ á´ºáµá´¸á´¸ │ 0.1 │ +│ 1 │ 2015-01-15 │ á´ºáµá´¸á´¸ │ 0.2 │ +│ 2 │ 2015-01-01 │ 2015-01-15 │ 0.3 │ +│ 2 │ 2015-01-04 │ 2015-01-10 │ 0.4 │ +│ 3 │ 1970-01-01 │ 2015-01-15 │ 0.5 │ +│ 3 │ 1970-01-01 │ 2015-01-10 │ 0.6 │ +└───────────────┴─────────────────────┴───────────────────┴────────┘ + +-- RANGE_LOOKUP_STRATEGY 'max' + +CREATE DICTIONARY discounts_dict +( + advertiser_id UInt64, + discount_start_date Date, + discount_end_date Nullable(Date), + amount Float64 +) +PRIMARY KEY advertiser_id +SOURCE(CLICKHOUSE(TABLE discounts)) +LIFETIME(MIN 600 MAX 900) +LAYOUT(RANGE_HASHED(RANGE_LOOKUP_STRATEGY 'max')) +RANGE(MIN discount_start_date MAX discount_end_date); + +select dictGet('discounts_dict', 'amount', 1, toDate('2015-01-14')) res; +┌─res─┠+│ 0.1 │ -- 一致ã™ã‚‹ç¯„囲ã¯1ã¤ã®ã¿: 2015-01-01 - Null +└─────┘ + +select dictGet('discounts_dict', 'amount', 1, toDate('2015-01-16')) res; +┌─res─┠+│ 0.2 │ -- 2ã¤ã®ç¯„囲ãŒä¸€è‡´ã€range_min 2015-01-15 (0.2)ãŒ2015-01-01 (0.1)より大ãã„ +└─────┘ + +select dictGet('discounts_dict', 'amount', 2, toDate('2015-01-06')) res; +┌─res─┠+│ 0.4 │ -- 2ã¤ã®ç¯„囲ãŒä¸€è‡´ã€range_min 2015-01-04 (0.4)ãŒ2015-01-01 (0.3)より大ãã„ +└─────┘ + +select dictGet('discounts_dict', 'amount', 3, toDate('2015-01-01')) res; +┌─res─┠+│ 0.5 │ -- 2ã¤ã®ç¯„囲ãŒä¸€è‡´ã€range_minã¯ç­‰ã—ã„ã€2015-01-15 (0.5)ãŒ2015-01-10 (0.6)より大ãã„ +└─────┘ + +DROP DICTIONARY discounts_dict; + +-- RANGE_LOOKUP_STRATEGY 'min' + +CREATE DICTIONARY discounts_dict +( + advertiser_id UInt64, + discount_start_date Date, + discount_end_date Nullable(Date), + amount Float64 +) +PRIMARY KEY advertiser_id +SOURCE(CLICKHOUSE(TABLE discounts)) +LIFETIME(MIN 600 MAX 900) +LAYOUT(RANGE_HASHED(RANGE_LOOKUP_STRATEGY 'min')) +RANGE(MIN discount_start_date MAX discount_end_date); + +select dictGet('discounts_dict', 'amount', 1, toDate('2015-01-14')) res; +┌─res─┠+│ 0.1 │ -- 一致ã™ã‚‹ç¯„囲ã¯1ã¤ã ã‘: 2015-01-01 - Null +└─────┘ + +select dictGet('discounts_dict', 'amount', 1, toDate('2015-01-16')) res; +┌─res─┠+│ 0.1 │ -- 2ã¤ã®ç¯„囲ãŒä¸€è‡´ã€range_min 2015-01-01 (0.1) ãŒ2015-01-15 (0.2)よりå°ã•ã„ +└─────┘ + +select dictGet('discounts_dict', 'amount', 2, toDate('2015-01-06')) res; +┌─res─┠+│ 0.3 │ -- 2ã¤ã®ç¯„囲ãŒä¸€è‡´ã€range_min 2015-01-01 (0.3) ãŒ2015-01-04 (0.4)よりå°ã•ã„ +└─────┘ + +select dictGet('discounts_dict', 'amount', 3, toDate('2015-01-01')) res; +┌─res─┠+│ 0.6 │ -- 2ã¤ã®ç¯„囲ãŒä¸€è‡´ã€range_minã¯ç­‰ã—ã„ã€2015-01-10 (0.6) ãŒ2015-01-15 (0.5)よりå°ã•ã„ +└─────┘ +``` + +### complex_key_range_hashed + +ディクショナリã¯ã€ç¯„囲ã¨ãã‚Œã«å¯¾å¿œã™ã‚‹å€¤ã®é †åºä»˜ãé…列をæŒã¤ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®å½¢ã§ãƒ¡ãƒ¢ãƒªã«ä¿å­˜ã•ã‚Œã¾ã™ï¼ˆ[range_hashed](#range_hashed)ã‚’å‚照)。ã“ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—ã¯è¤‡åˆ[キー](#dictionary-key-and-fields)用ã§ã™ã€‚ + +設定例: + +``` sql +CREATE DICTIONARY range_dictionary +( + CountryID UInt64, + CountryKey String, + StartDate Date, + EndDate Date, + Tax Float64 DEFAULT 0.2 +) +PRIMARY KEY CountryID, CountryKey +SOURCE(CLICKHOUSE(TABLE 'date_table')) +LIFETIME(MIN 1 MAX 1000) +LAYOUT(COMPLEX_KEY_RANGE_HASHED()) +RANGE(MIN StartDate MAX EndDate); +``` + +### cache + +ディクショナリã¯ã€å›ºå®šæ•°ã®ã‚»ãƒ«ã‚’æŒã¤ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“れらã®ã‚»ãƒ«ã«ã¯é »ç¹ã«ä½¿ç”¨ã•ã‚Œã‚‹è¦ç´ ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +ディクショナリキーã¯[UInt64](../../sql-reference/data-types/int-uint.md)åž‹ã‚’æŒã¡ã¾ã™ã€‚ + +ディクショナリを検索ã™ã‚‹éš›ã€ã¾ãšã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒæ¤œç´¢ã•ã‚Œã¾ã™ã€‚データブロックã”ã¨ã«ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«è¦‹ã¤ã‹ã‚‰ãªã„ã€ã¾ãŸã¯æœŸé™åˆ‡ã‚Œã®ã™ã¹ã¦ã®ã‚­ãƒ¼ãŒ`SELECT attrs... FROM db.table WHERE id IN (k1, k2, ...)`を使ã£ã¦ã‚½ãƒ¼ã‚¹ã‹ã‚‰è¦æ±‚ã•ã‚Œã¾ã™ã€‚å—ä¿¡ã—ãŸãƒ‡ãƒ¼ã‚¿ã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +キーãŒãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã«è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥æ›´æ–°ã‚¿ã‚¹ã‚¯ãŒä½œæˆã•ã‚Œã€æ›´æ–°ã‚­ãƒ¥ãƒ¼ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚更新キューã®ç‰¹æ€§ã¯`max_update_queue_size`ã€`update_queue_push_timeout_milliseconds`ã€`query_wait_timeout_milliseconds`ã€`max_threads_for_updates`設定ã«ã‚ˆã£ã¦åˆ¶å¾¡ã§ãã¾ã™ã€‚ + +キャッシュディクショナリã®å ´åˆã€[lifetime](#refreshing-dictionary-data-using-lifetime)ã§ãƒ‡ãƒ¼ã‚¿ã®æœ‰åŠ¹æœŸé™ã‚’設定ã§ãã¾ã™ã€‚セルã«ãƒ‡ãƒ¼ã‚¿ãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã‹ã‚‰`lifetime`を超ãˆã‚‹æ™‚é–“ãŒçµŒéŽã—ãŸå ´åˆã€ã‚»ãƒ«ã®å€¤ã¯ä½¿ç”¨ã•ã‚Œãšã€ã‚­ãƒ¼ãŒæœŸé™åˆ‡ã‚Œã«ãªã‚Šã¾ã™ã€‚ã“ã®ã‚­ãƒ¼ã¯æ¬¡å›žä½¿ç”¨æ™‚ã«å†è¦æ±‚ã•ã‚Œã¾ã™ã€‚ã“ã®å‹•ä½œã¯`allow_read_expired_keys`設定ã§æ§‹æˆã§ãã¾ã™ã€‚ + +ã“ã‚Œã¯ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’ä¿å­˜ã™ã‚‹ã™ã¹ã¦ã®æ–¹æ³•ã®ä¸­ã§æœ€ã‚‚効果ãŒä½Žã„ã‚‚ã®ã§ã™ã€‚キャッシュã®é€Ÿåº¦ã¯ã€è¨­å®šã¨ä½¿ç”¨ã‚·ãƒŠãƒªã‚ªã«å¤§ããä¾å­˜ã—ã¾ã™ã€‚キャッシュタイプã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã¯ã€ãƒ’ット率ãŒå分ã«é«˜ã„å ´åˆã«ã®ã¿è‰¯å¥½ã«å‹•ä½œã—ã¾ã™ï¼ˆæŽ¨å¥¨99%以上)。[system.dictionaries](../../operations/system-tables/dictionaries.md)テーブルã§å¹³å‡ãƒ’ット率を確èªã§ãã¾ã™ã€‚ + +設定`allow_read_expired_keys`ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯0)ã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã¯éžåŒæœŸæ›´æ–°ã‚’サãƒãƒ¼ãƒˆã§ãã¾ã™ã€‚クライアントãŒã‚­ãƒ¼ã‚’è¦æ±‚ã—ã€ã™ã¹ã¦ã®ã‚­ãƒ¼ãŒã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«å­˜åœ¨ã™ã‚‹ãŒã€ä¸€éƒ¨ã®ã‚­ãƒ¼ãŒæœŸé™åˆ‡ã‚Œã«ãªã£ã¦ã„ã‚‹å ´åˆã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«æœŸé™åˆ‡ã‚Œã®ã‚­ãƒ¼ã‚’è¿”ã—ã€ã‚½ãƒ¼ã‚¹ã‹ã‚‰éžåŒæœŸã«è¦æ±‚ã•ã‚Œã¾ã™ã€‚ + +キャッシュã®æ€§èƒ½ã‚’å‘上ã•ã›ã‚‹ã«ã¯ã€`LIMIT`付ãã®ã‚µãƒ–クエリを使用ã—ã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã¨å¤–部ã«é–¢æ•°ã‚’呼ã³å‡ºã—ã¾ã™ã€‚ + +ã™ã¹ã¦ã®ç¨®é¡žã®ã‚½ãƒ¼ã‚¹ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +設定例: + +``` xml + + + + 1000000000 + + 0 + + 100000 + + 10 + + 60000 + + 4 + + +``` + +ã¾ãŸã¯ + +``` sql +LAYOUT(CACHE(SIZE_IN_CELLS 1000000000)) +``` + +å分ãªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºã‚’設定ã—ã¦ãã ã•ã„。セル数をé¸æŠžã™ã‚‹ã«ã¯å®Ÿé¨“ãŒå¿…è¦ã§ã™ï¼š + +1. å„種値を設定ã—ã¾ã™ã€‚ +2. キャッシュãŒå®Œå…¨ã«æº€ãŸã•ã‚Œã‚‹ã¾ã§ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ +3. `system.dictionaries`テーブルを使用ã—ã¦ãƒ¡ãƒ¢ãƒªæ¶ˆè²»é‡ã‚’評価ã—ã¾ã™ã€‚ +4. å¿…è¦ãªãƒ¡ãƒ¢ãƒªæ¶ˆè²»é‡ã«é”ã™ã‚‹ã¾ã§ã‚»ãƒ«æ•°ã‚’増減ã—ã¾ã™ã€‚ + +:::note +ClickHouseをソースã¨ã—ã¦ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。ランダム読ã¿ã«ã‚ˆã‚‹ã‚¯ã‚¨ãƒªå‡¦ç†ãŒé…ã„ãŸã‚ã§ã™ã€‚ +::: + +### complex_key_cache + +ã“ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—ã¯ã€è¤‡åˆ[キー](#dictionary-key-and-fields)ã¨å…±ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚`cache`ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +### ssd_cache + +`s_cache`ã«ä¼¼ã¦ã„ã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã‚’SSDã«ä¿å­˜ã—インデックスをRAMã«ä¿å­˜ã—ã¾ã™ã€‚更新キューã«é–¢é€£ã™ã‚‹ã™ã¹ã¦ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªè¨­å®šã‚‚SSDキャッシュディクショナリã«é©ç”¨ã§ãã¾ã™ã€‚ + +ディクショナリキーã¯[UInt64](../../sql-reference/data-types/int-uint.md)åž‹ã‚’æŒã¡ã¾ã™ã€‚ + +``` xml + + + + 4096 + + 16777216 + + 131072 + + 1048576 + + /var/lib/clickhouse/user_files/test_dict + + +``` + +ã¾ãŸã¯ + +``` sql +LAYOUT(SSD_CACHE(BLOCK_SIZE 4096 FILE_SIZE 16777216 READ_BUFFER_SIZE 1048576 + PATH '/var/lib/clickhouse/user_files/test_dict')) +``` + +### complex_key_ssd_cache + +ã“ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—ã¯ã€è¤‡åˆ[キー](#dictionary-key-and-fields)ã¨å…±ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚`ssd_cache`ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +### direct + +ディクショナリã¯ãƒ¡ãƒ¢ãƒªã«ä¿å­˜ã•ã‚Œãšã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å‡¦ç†ä¸­ã«ã‚½ãƒ¼ã‚¹ ã«ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ + +ディクショナリキーã¯[UInt64](../../sql-reference/data-types/int-uint.md)åž‹ã‚’æŒã¡ã¾ã™ã€‚ + +ローカルファイルを除ãã™ã¹ã¦ã®[ソース](#dictionary-sources)ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +設定例: + +``` xml + + + +``` + +ã¾ãŸã¯ + +``` sql +LAYOUT(DIRECT()) +``` + +### complex_key_direct + +ã“ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—ã¯ã€è¤‡åˆ[キー](#dictionary-key-and-fields)ã¨å…±ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚`direct`ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +### ip_trie + +ã“ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—ã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ—レフィックス(IPアドレス)をASNãªã©ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ãƒžãƒƒãƒ”ングã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ + +**例** + +ClickHouseã«IPプレフィックスã¨ãƒžãƒƒãƒ”ングãŒå«ã¾ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹ã¨ã—ã¾ã™: + +```sql +CREATE TABLE my_ip_addresses ( + prefix String, + asn UInt32, + cca2 String +) +ENGINE = MergeTree +PRIMARY KEY prefix; +``` + +```sql +INSERT INTO my_ip_addresses VALUES + ('202.79.32.0/20', 17501, 'NP'), + ('2620:0:870::/48', 3856, 'US'), + ('2a02:6b8:1::/48', 13238, 'RU'), + ('2001:db8::/32', 65536, 'ZZ') +; +``` + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã®`ip_trie`ディクショナリを定義ã—ã¾ã—ょã†ã€‚`ip_trie`レイアウトã¯è¤‡åˆã‚­ãƒ¼ã‚’å¿…è¦ã¨ã—ã¾ã™: + +``` xml + + + + prefix + String + + + + asn + UInt32 + + + + cca2 + String + ?? + + ... + + + + + + true + + +``` + +ã¾ãŸã¯ + +``` sql +CREATE DICTIONARY my_ip_trie_dictionary ( + prefix String, + asn UInt32, + cca2 String DEFAULT '??' +) +PRIMARY KEY prefix +SOURCE(CLICKHOUSE(TABLE 'my_ip_addresses')) +LAYOUT(IP_TRIE) +LIFETIME(3600); +``` + +キーã¯è¨±å¯ã•ã‚ŒãŸIPプレフィックスをå«ã‚€`String`型属性を一ã¤ã ã‘æŒãŸãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。他ã®åž‹ã¯ã¾ã ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +構文ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +``` sql +dictGetT('dict_name', 'attr_name', ip) +``` + +関数ã¯`UInt32`(IPv4ã®å ´åˆï¼‰ã€ã¾ãŸã¯`FixedString(16)`(IPv6ã®å ´åˆï¼‰ã‚’å–ã‚Šã¾ã™ã€‚例 : + +``` sql +SELECT dictGet('my_ip_trie_dictionary', 'cca2', toIPv4('202.79.32.10')) AS result; + +┌─result─┠+│ NP │ +└────────┘ + + +SELECT dictGet('my_ip_trie_dictionary', 'asn', IPv6StringToNum('2001:db8::1')) AS result; + +┌─result─┠+│ 65536 │ +└────────┘ + + +SELECT dictGet('my_ip_trie_dictionary', ('asn', 'cca2'), IPv6StringToNum('2001:db8::1')) AS result; + +┌─result───────┠+│ (65536,'ZZ') │ +└──────────────┘ +``` + +ä»–ã®åž‹ã¯ã¾ã ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。関数ã¯ã€ã“ã®IPアドレスã«å¯¾å¿œã™ã‚‹ãƒ—レフィックスã®å±žæ€§ã‚’è¿”ã—ã¾ã™ã€‚プレフィックスãŒé‡è¤‡ã™ã‚‹å ´åˆã€æœ€ã‚‚特定ã®ã‚‚ã®ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +データã¯å®Œå…¨ã«RAMã«åŽã¾ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## LIFETIMEを使用ã—ãŸãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã®æ›´æ–° + +ClickHouseã¯ã€`LIFETIME`タグ(秒å˜ä½ã§å®šç¾©ï¼‰ã«åŸºã¥ã„ã¦å®šæœŸçš„ã«ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’æ›´æ–°ã—ã¾ã™ã€‚`LIFETIME`ã¯å®Œå…¨ã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®æ›´æ–°é–“éš”ã§ã‚ã‚Šã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚ŒãŸãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®ç„¡åŠ¹åŒ–é–“éš”ã§ã™ã€‚ +``` +æ›´æ–°ã®é–“ã€å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®Dictionaryã¯ä¾ç„¶ã¨ã—ã¦ã‚¯ã‚¨ãƒªå¯èƒ½ã§ã™ã€‚Dictionaryã®æ›´æ–°ï¼ˆåˆã‚ã¦Dictionaryをロードã™ã‚‹å ´åˆã‚’除ã)ã¯ã‚¯ã‚¨ãƒªã‚’ブロックã—ã¾ã›ã‚“。更新中ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ã¯ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã«è¨˜éŒ²ã•ã‚Œã€ã‚¯ã‚¨ãƒªã¯å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®Dictionaryを使用ã—ã¦ç¶šè¡Œã§ãã¾ã™ã€‚Dictionaryã®æ›´æ–°ãŒæˆåŠŸã—ãŸå ´åˆã€å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®Dictionaryã¯ã‚¢ãƒˆãƒŸãƒƒã‚¯ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +設定ã®ä¾‹: + + + +``` xml + + ... + 300 + ... + +``` + +ã¾ãŸã¯ + +``` sql +CREATE DICTIONARY (...) +... +LIFETIME(300) +... +``` + +`0` (`LIFETIME(0)`) ã®è¨­å®šã¯ã€Dictionaryã®æ›´æ–°ã‚’防ãŽã¾ã™ã€‚ + +æ›´æ–°ã®ãŸã‚ã®æ™‚間間隔を設定ã™ã‚‹ã“ã¨ãŒã§ãã€ClickHouseã¯ã“ã®ç¯„囲内ã§å‡ä¸€ã«ãƒ©ãƒ³ãƒ€ãƒ ãªæ™‚é–“ã‚’é¸ã³ã¾ã™ã€‚ã“ã‚Œã¯ã€å¤šæ•°ã®ã‚µãƒ¼ãƒãƒ¼ã§æ›´æ–°ã™ã‚‹éš›ã«ã€Dictionaryソースã¸ã®è² è·ã‚’分散ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + ... + + 300 + 360 + + ... + +``` + +ã¾ãŸã¯ + +``` sql +LIFETIME(MIN 300 MAX 360) +``` + +ã‚‚ã—`0`ãŠã‚ˆã³`0`ã®å ´åˆã€ClickHouseã¯ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã«ã‚ˆã£ã¦Dictionaryをリロードã—ã¾ã›ã‚“。 +ã“ã®å ´åˆã€Dictionaryã®æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã‚„`SYSTEM RELOAD DICTIONARY`コマンドãŒå®Ÿè¡Œã•ã‚ŒãŸå ´åˆã«ã¯ã€ClickHouseã¯Dictionaryã‚’æ—©ãリロードã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +Dictionaryã‚’æ›´æ–°ã™ã‚‹éš›ã€ClickHouseサーãƒãƒ¼ã¯[ソース](#dictionary-sources)ã®ã‚¿ã‚¤ãƒ—ã«å¿œã˜ã¦ç•°ãªã‚‹ãƒ­ã‚¸ãƒƒã‚¯ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +- テキストファイルã®å ´åˆã€å¤‰æ›´ã•ã‚ŒãŸæ™‚間を確èªã—ã¾ã™ã€‚以å‰ã«è¨˜éŒ²ã•ã‚ŒãŸæ™‚é–“ã¨ç•°ãªã‚‹å ´åˆã¯ã€DictionaryãŒæ›´æ–°ã•ã‚Œã¾ã™ã€‚ +- MySQLソースã®å ´åˆã€`SHOW TABLE STATUS`クエリを使用ã—ã¦å¤‰æ›´ã•ã‚ŒãŸæ™‚é–“ãŒç¢ºèªã•ã‚Œã¾ã™ï¼ˆMySQL 8ã®å ´åˆã€MySQLã§ãƒ¡ã‚¿æƒ…報キャッシュを無効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: `set global information_schema_stats_expiry=0`)。 +- ä»–ã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰ã®Dictionaryã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æ¯Žå›žæ›´æ–°ã•ã‚Œã¾ã™ã€‚ + +ä»–ã®ã‚½ãƒ¼ã‚¹ï¼ˆODBCã€PostgreSQLã€ClickHouseãªã©ï¼‰ã®å ´åˆã€å®Ÿéš›ã«å¤‰æ›´ã•ã‚ŒãŸå ´åˆã«ã®ã¿Dictionaryã‚’æ›´æ–°ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’設定ã§ãã¾ã™ã€‚ã“れを行ã†ã«ã¯ã€æ¬¡ã®æ‰‹é †ã‚’実行ã—ã¾ã™: + +- Dictionaryテーブルã«ã¯ã€ã‚½ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ãŒæ›´æ–°ã•ã‚Œã‚‹ã¨å¸¸ã«å¤‰æ›´ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒå¿…è¦ã§ã™ã€‚ +- ソースã®è¨­å®šã«ã¯ã€å¤‰æ›´ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’å–å¾—ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ClickHouseサーãƒãƒ¼ã¯ã‚¯ã‚¨ãƒªã®çµæžœã‚’è¡Œã¨ã—ã¦è§£é‡ˆã—ã€ã“ã®è¡ŒãŒä»¥å‰ã®çŠ¶æ…‹ã¨ç•°ãªã‚‹å ´åˆã«Dictionaryã‚’æ›´æ–°ã—ã¾ã™ã€‚クエリã¯[ソース](#dictionary-sources)ã®è¨­å®šã®``フィールドã«æŒ‡å®šã—ã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + ... + + ... + SELECT update_time FROM dictionary_source where id = 1 + + ... + +``` + +ã¾ãŸã¯ + +``` sql +... +SOURCE(ODBC(... invalidate_query 'SELECT update_time FROM dictionary_source where id = 1')) +... +``` + +`Cache`ã€`ComplexKeyCache`ã€`SSDCache`ã€ãŠã‚ˆã³ `SSDComplexKeyCache` Dictionaryã¯åŒæœŸãŠã‚ˆã³éžåŒæœŸæ›´æ–°ã®ä¸¡æ–¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +ã¾ãŸã€`Flat`ã€`Hashed`ã€`ComplexKeyHashed` Dictionaryã§ã¯ã€å‰å›žã®æ›´æ–°å¾Œã«å¤‰æ›´ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’リクエストã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚`update_field`ãŒDictionaryソースã®è¨­å®šã®ä¸€éƒ¨ã¨ã—ã¦æŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å‰å›žã®æ›´æ–°æ™‚刻(秒å˜ä½ï¼‰ã®å€¤ãŒãƒ‡ãƒ¼ã‚¿ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ソースタイプ(Executable, HTTP, MySQL, PostgreSQL, ClickHouse, ã¾ãŸã¯ ODBC)ã«å¿œã˜ã¦ã€æ›´æ–°å‰ã«`update_field`ã«ç•°ãªã‚‹ãƒ­ã‚¸ãƒƒã‚¯ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ + +- ソースãŒHTTPã®å ´åˆã€`update_field`ã¯ã‚¯ã‚¨ãƒªãƒ‘ラメータã¨ã—ã¦æœ€å¾Œã®æ›´æ–°æ™‚刻をパラメータ値ã¨ã—ã¦è¿½åŠ ã•ã‚Œã¾ã™ã€‚ +- ソースãŒExecutableã®å ´åˆã€`update_field`ã¯å®Ÿè¡Œå¯èƒ½ã‚¹ã‚¯ãƒªãƒ—トã®å¼•æ•°ã¨ã—ã¦æœ€å¾Œã®æ›´æ–°æ™‚刻を引数値ã¨ã—ã¦è¿½åŠ ã•ã‚Œã¾ã™ã€‚ +- ソースãŒClickHouseã€MySQLã€PostgreSQLã€ODBCã®å ´åˆã€`update_field`ã¯SQLクエリã®æœ€é«˜ãƒ¬ãƒ™ãƒ«ã§ã®`WHERE`æ¡ä»¶ã¨ã—ã¦ã€æœ€å¾Œã®æ›´æ–°æ™‚刻ã¨å¤§ãªã‚Šã¾ãŸã¯ç­‰ã—ã„ã‚‚ã®ã§æ¯”較ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯ã€ã“ã®`WHERE`æ¡ä»¶ã¯SQLクエリã®æœ€ä¸Šä½ã§ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚代替ã¨ã—ã¦ã€ã‚¯ã‚¨ãƒªå†…ã®ä»»æ„ã®ä»–ã®`WHERE`å¥ã§`{condition}`キーワードを使用ã—ã¦æ¡ä»¶ã‚’ãƒã‚§ãƒƒã‚¯ã§ãã¾ã™ã€‚例: + ``` sql + ... + SOURCE(CLICKHOUSE(... + update_field 'added_time' + QUERY ' + SELECT my_arr.1 AS x, my_arr.2 AS y, creation_time + FROM ( + SELECT arrayZip(x_arr, y_arr) AS my_arr, creation_time + FROM dictionary_source + WHERE {condition} + )' + )) + ... + ``` + +`update_field`オプションãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€è¿½åŠ ã®ã‚ªãƒ—ション`update_lag`を設定ã§ãã¾ã™ã€‚`update_lag`オプションã®å€¤ã¯å‰å›žã®æ›´æ–°æ™‚刻ã‹ã‚‰å·®ã—引ã‹ã‚ŒãŸå¾Œã«æ›´æ–°ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã•ã‚Œã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + ... + + ... + added_time + 15 + + ... + +``` + +ã¾ãŸã¯ + +``` sql +... +SOURCE(CLICKHOUSE(... update_field 'added_time' update_lag 15)) +... +``` + +## Dictionary Sources + + + +Dictionaryã¯ã•ã¾ã–ã¾ãªã‚½ãƒ¼ã‚¹ã‹ã‚‰ClickHouseã«æŽ¥ç¶šã§ãã¾ã™ã€‚ + +DictionaryãŒxmlファイルを使用ã—ã¦æ§‹æˆã•ã‚Œã¦ã„ã‚‹å ´åˆã€æ§‹æˆã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +``` xml + + + ... + + + + + + ... + + ... + +``` + +[DDL-query](../../sql-reference/statements/create/dictionary.md)ã®å ´åˆã€ä¸Šè¨˜ã®æ§‹æˆã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +``` sql +CREATE DICTIONARY dict_name (...) +... +SOURCE(SOURCE_TYPE(param1 val1 ... paramN valN)) -- ソースã®è¨­å®š +... +``` + +ソースã¯`source`セクションã§æ§‹æˆã•ã‚Œã¾ã™ã€‚ + +ソースタイプ[ローカルファイル](#local-file)ã€[実行ファイル](#executable-file)ã€[HTTP(S)](#https)ã€[ClickHouse](#clickhouse)ã®ãŸã‚ã®ã‚ªãƒ—ション設定ãŒåˆ©ç”¨å¯èƒ½ã§ã™: + +``` xml + + + /opt/dictionaries/os.tsv + TabSeparated + + + 0 + + +``` + +ã¾ãŸã¯ + +``` sql +SOURCE(FILE(path './user_files/os.tsv' format 'TabSeparated')) +SETTINGS(format_csv_allow_single_quotes = 0) +``` + +ソースã®ç¨®é¡ž (`source_type`): + +- [ローカルファイル](#local-file) +- [実行ファイル](#executable-file) +- [実行プール](#executable-pool) +- [HTTP(S)](#https) +- DBMS + - [ODBC](#odbc) + - [MySQL](#mysql) + - [ClickHouse](#clickhouse) + - [MongoDB](#mongodb) + - [Redis](#redis) + - [Cassandra](#cassandra) + - [PostgreSQL](#postgresql) + +### Local File + +設定ã®ä¾‹: + +``` xml + + + /opt/dictionaries/os.tsv + TabSeparated + + +``` + +ã¾ãŸã¯ + +``` sql +SOURCE(FILE(path './user_files/os.tsv' format 'TabSeparated')) +``` + +設定フィールド: + +- `path` – ファイルã¸ã®çµ¶å¯¾ãƒ‘ス。 +- `format` – ファイルã®å½¢å¼ã€‚[Formats](../../interfaces/formats.md#formats)ã§èª¬æ˜Žã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®å½¢å¼ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +DDLコマンド(`CREATE DICTIONARY ...`)ã§ã‚½ãƒ¼ã‚¹`FILE`ã‚’æŒã¤Dictionaryを作æˆã™ã‚‹éš›ã«ã¯ã€ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’`user_files`ディレクトリã«é…ç½®ã—ã¦ã€ClickHouseノード上ã®ä»»æ„ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã®ã‚’防ãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**関連項目** + +- [Dictionary関数](../../sql-reference/table-functions/dictionary.md#dictionary-function) + +### Executable File + +実行ファイルã®å‡¦ç†ã¯ã€[DictionaryãŒãƒ¡ãƒ¢ãƒªå†…ã«ã©ã®ã‚ˆã†ã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ã‹](#storing-dictionaries-in-memory)ã«ä¾å­˜ã—ã¾ã™ã€‚DictionaryãŒ`cache`ã‚„`complex_key_cache`を使用ã—ã¦ä¿å­˜ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯STDINã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã—ã¦å¿…è¦ãªã‚­ãƒ¼ã‚’リクエストã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€ClickHouseã¯å®Ÿè¡Œãƒ•ã‚¡ã‚¤ãƒ«ã‚’開始ã—ã€ãã®å‡ºåŠ›ã‚’Dictionaryデータã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + cat /opt/dictionaries/os.tsv + TabSeparated + false + + +``` + +設定フィールド: + +- `command` — 実行å¯èƒ½ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®çµ¶å¯¾ãƒ‘スã€ã¾ãŸã¯ã‚³ãƒžãƒ³ãƒ‰ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãŒ`PATH`ã«ã‚ã‚‹å ´åˆã¯ãƒ•ã‚¡ã‚¤ãƒ«å。 +- `format` — ファイルã®å½¢å¼ã€‚[Formats](../../interfaces/formats.md#formats)ã§èª¬æ˜Žã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®å½¢å¼ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +- `command_termination_timeout` — 実行å¯èƒ½ã‚¹ã‚¯ãƒªãƒ—トã¯ãƒ¡ã‚¤ãƒ³ã®èª­æ›¸-書ãè¾¼ã¿ãƒ«ãƒ¼ãƒ—ã‚’å«ã‚€ã¹ãã§ã™ã€‚DictionaryãŒç ´æ£„ã•ã‚ŒãŸå¾Œã€ãƒ‘イプãŒé–‰ã˜ã‚‰ã‚Œã€ClickHouseãŒå­ãƒ—ロセスã«SIGTERMシグナルをé€ä¿¡ã™ã‚‹å‰ã«ã€å®Ÿè¡Œå¯èƒ½ãƒ•ã‚¡ã‚¤ãƒ«ã¯`command_termination_timeout`秒ã§ã‚·ãƒ£ãƒƒãƒˆãƒ€ã‚¦ãƒ³ã•ã›ã‚‰ã‚Œã¾ã™ã€‚デフォルト値ã¯10ã§ã™ã€‚オプションã®ãƒ‘ラメータ。 +- `command_read_timeout` - コマンドã®stdoutã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–るタイムアウトをミリ秒å˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚デフォルト値ã¯10000ã§ã™ã€‚オプションã®ãƒ‘ラメータ。 +- `command_write_timeout` - コマンドã®stdinã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むタイムアウトをミリ秒å˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚デフォルト値ã¯10000ã§ã™ã€‚オプションã®ãƒ‘ラメータ。 +- `implicit_key` — 実行å¯èƒ½ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã¯å€¤ã®ã¿ã‚’è¿”ã™ã“ã¨ãŒã§ãã€è¦æ±‚ã•ã‚ŒãŸã‚­ãƒ¼ã¨ã®å¯¾å¿œã¯ã€çµæžœå†…ã®è¡Œã®é †åºã«ã‚ˆã£ã¦æš—黙的ã«æ±ºå®šã•ã‚Œã¾ã™ã€‚デフォルト値ã¯falseã§ã™ã€‚ +- `execute_direct` - `execute_direct` = `1`ã®å ´åˆã€`command`ã¯[user_scripts_path](../../operations/server-configuration-parameters/settings.md#user_scripts_path)ã§æŒ‡å®šã•ã‚ŒãŸuser_scriptsフォルダ内ã§æ¤œç´¢ã•ã‚Œã¾ã™ã€‚追加ã®ã‚¹ã‚¯ãƒªãƒ—ト引数ã¯ç©ºç™½åŒºåˆ‡ã‚Šã§æŒ‡å®šã§ãã¾ã™ã€‚例: `script_name arg1 arg2`。`execute_direct` = `0`ã®å ´åˆã€`command`ã¯`bin/sh -c`ã®å¼•æ•°ã¨ã—ã¦æ¸¡ã•ã‚Œã¾ã™ã€‚デフォルト値ã¯`0`ã§ã™ã€‚オプションã®ãƒ‘ラメータ。 +- `send_chunk_header` - 処ç†ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒãƒ£ãƒ³ã‚¯ã¸ã®è¡Œæ•°ã‚’é€ä¿¡ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚オプション。デフォルト値ã¯`false`ã§ã™ã€‚ + +ã“ã®Dictionaryソースã¯XML構æˆã§ã®ã¿è¨­å®šã§ãã¾ã™ã€‚DDLを介ã—ã¦å®Ÿè¡Œå¯èƒ½ã‚½ãƒ¼ã‚¹ã‚’æŒã¤Dictionaryを作æˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã•ã‚‚ãªã„ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ClickHouseノードã§ä»»æ„ã®ãƒã‚¤ãƒŠãƒªã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¦ã—ã¾ã„ã¾ã™ã€‚ + +### Executable Pool + +実行プールã¯å¤šãã®ãƒ—ロセスプールã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ã“ã®ã‚½ãƒ¼ã‚¹ã¯ã€ã‚½ãƒ¼ã‚¹ã‹ã‚‰ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹å¿…è¦ãŒã‚ã‚‹Dictionaryレイアウトã§ã¯å‹•ä½œã—ã¾ã›ã‚“。実行プールã¯ã€DictionaryãŒ`cache`ã€`complex_key_cache`ã€`ssd_cache`ã€`complex_key_ssd_cache`ã€`direct`ã€ã¾ãŸã¯`complex_key_direct`レイアウトを使用ã—ã¦ä¿å­˜ã•ã‚Œã¦ã„ã‚‹å ´åˆã«å‹•ä½œã—ã¾ã™ã€‚ + +実行プールã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚³ãƒžãƒ³ãƒ‰ã§ãƒ—ロセスã®ãƒ—ールを開始ã—ã€ãれらãŒçµ‚了ã™ã‚‹ã¾ã§ãれらをä¿æŒã—ã¾ã™ã€‚プログラムã¯ã€åˆ©ç”¨å¯èƒ½ãªé™ã‚ŠSTDINã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã€çµæžœã‚’STDOUTã«å‡ºåŠ›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚次ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックをSTDINã§å¾…ã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã®å‡¦ç†å¾Œã«STDINã‚’é–‰ã˜ã¾ã›ã‚“ãŒã€å¿…è¦ã«å¿œã˜ã¦æ–°ã—ã„データãƒãƒ£ãƒ³ã‚¯ã‚’パイプã—ã¾ã™ã€‚実行å¯èƒ½ã‚¹ã‚¯ãƒªãƒ—トã¯ã€ã“ã®æ–¹æ³•ã§ã®ãƒ‡ãƒ¼ã‚¿å‡¦ç†ã«å¯¾å¿œã§ãるよã†ã«æº–å‚™ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ - STDINã‚’ãƒãƒ¼ãƒªãƒ³ã‚°ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚’早期ã«STDOUTã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + while read key; do printf "$key\tData for key $key\n"; done + TabSeparated + 10 + 10 + false + + +``` + +設定フィールド: + +- `command` — 実行å¯èƒ½ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®çµ¶å¯¾ãƒ‘スã€ã¾ãŸã¯ãƒ—ログラムディレクトリãŒ`PATH`ã«æ›¸ã‹ã‚Œã¦ã„ã‚‹å ´åˆã¯ãƒ•ã‚¡ã‚¤ãƒ«å。 +- `format` — ファイルã®å½¢å¼ã€‚[Formats](../../interfaces/formats.md#formats)ã§èª¬æ˜Žã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®å½¢å¼ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +- `pool_size` — プールã®ã‚µã‚¤ã‚ºã€‚`pool_size`ã¨ã—ã¦0ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ãƒ—ールサイズã®åˆ¶é™ã¯ã‚ã‚Šã¾ã›ã‚“。デフォルト値ã¯`16`ã§ã™ã€‚ +- `command_termination_timeout` — 実行å¯èƒ½ã‚¹ã‚¯ãƒªãƒ—トã¯ãƒ¡ã‚¤ãƒ³èª­å–書込ループをå«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚DictionaryãŒç ´æ£„ã•ã‚ŒãŸå¾Œã€ãƒ‘イプã¯é–‰ã˜ã‚‰ã‚Œã€å®Ÿè¡Œå¯èƒ½ãƒ•ã‚¡ã‚¤ãƒ«ã¯ClickHouseãŒå­ãƒ—ロセスã¸SIGTERMシグナルをé€ä¿¡ã™ã‚‹å‰ã«`command_termination_timeout`秒ã§ã‚·ãƒ£ãƒƒãƒˆãƒ€ã‚¦ãƒ³ã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚秒å˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚デフォルト値ã¯10ã§ã™ã€‚オプションã®ãƒ‘ラメータ。 +- `max_command_execution_time` — データブロックを処ç†ã™ã‚‹ãŸã‚ã®æœ€å¤§å®Ÿè¡Œå¯èƒ½ã‚¹ã‚¯ãƒªãƒ—トコマンド実行時間。秒å˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚デフォルト値ã¯10ã§ã™ã€‚オプションã®ãƒ‘ラメータ。 +- `command_read_timeout` - コマンドstdoutã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–るタイムアウトをミリ秒å˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚デフォルト値ã¯10000ã§ã™ã€‚オプションã®ãƒ‘ラメータ。 +- `command_write_timeout` - コマンドstdinã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むタイムアウトをミリ秒å˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚デフォルト値ã¯10000ã§ã™ã€‚オプションã®ãƒ‘ラメータ。 +- `implicit_key` — 実行å¯èƒ½ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã¯å€¤ã®ã¿ã‚’è¿”ã™ã“ã¨ãŒã§ãã€è¦æ±‚ã•ã‚ŒãŸã‚­ãƒ¼ã¨ã®å¯¾å¿œã¯ã€çµæžœå†…ã®è¡Œã®é †åºã«ã‚ˆã£ã¦æš—黙的ã«æ±ºå®šã•ã‚Œã¾ã™ã€‚デフォルト値ã¯falseã§ã™ã€‚オプションã®ãƒ‘ラメータ。 +- `execute_direct` - `execute_direct` = `1`ã®å ´åˆã€`command`ã¯[user_scripts_path](../../operations/server-configuration-parameters/settings.md#user_scripts_path)ã§æŒ‡å®šã•ã‚ŒãŸuser_scriptsフォルダ内ã§æ¤œç´¢ã•ã‚Œã¾ã™ã€‚追加ã®ã‚¹ã‚¯ãƒªãƒ—ト引数ã¯ç©ºç™½åŒºåˆ‡ã‚Šã§æŒ‡å®šã§ãã¾ã™ã€‚例: `script_name arg1 arg2`。`execute_direct` = `0`ã®å ´åˆã€`command`ã¯`bin/sh -c`ã®å¼•æ•°ã¨ã—ã¦æ¸¡ã•ã‚Œã¾ã™ã€‚デフォルト値ã¯`1`ã§ã™ã€‚オプションã®ãƒ‘ラメータ。 +- `send_chunk_header` - ã©ã®ã‚ˆã†ã«ã—ã¦è¡Œæ•°ã‚’処ç†ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒãƒ£ãƒ³ã‚¯ã«é€ä¿¡ã™ã‚‹ã‹ã‚’制御ã—ã¾ã™ã€‚オプション。デフォルト値ã¯`false`ã§ã™ã€‚ + +ã“ã®Dictionaryソースã¯XML構æˆã§ã®ã¿è¨­å®šã§ãã¾ã™ã€‚DDLを介ã—ã¦å®Ÿè¡Œå¯èƒ½ã‚½ãƒ¼ã‚¹ã‚’æŒã¤Dictionaryを作æˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã•ã‚‚ãªã„ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ClickHouseノードã§ä»»æ„ã®ãƒã‚¤ãƒŠãƒªã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¦ã—ã¾ã„ã¾ã™ã€‚ + +### HTTP(S) + +HTTP(S)サーãƒãƒ¼ã¨ã®ä½œæ¥­ã¯ã€[DictionaryãŒãƒ¡ãƒ¢ãƒªãƒ¼ã«ã©ã®ã‚ˆã†ã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ã‹](#storing-dictionaries-in-memory)ã«ä¾å­˜ã—ã¾ã™ã€‚DictionaryãŒ`cache`ã‚„`complex_key_cache`を使用ã—ã¦ä¿å­˜ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯`POST`メソッドを通ã˜ã¦å¿…è¦ãªã‚­ãƒ¼ã‚’è¦æ±‚ã—ã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + http://[::1]/os.tsv + TabSeparated + + user + password + + +
    + API-KEY + key +
    +
    +
    + +``` + +ã¾ãŸã¯ + +``` sql +SOURCE(HTTP( + url 'http://[::1]/os.tsv' + format 'TabSeparated' + credentials(user 'user' password 'password') + headers(header(name 'API-KEY' value 'key')) +)) +``` + +ClickHouseãŒHTTPSリソースã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ã¯ã€[openSSL](../../operations/server-configuration-parameters/settings.md#openssl)をサーãƒãƒ¼æ§‹æˆã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +設定フィールド: + +- `url` – ソースURL。 +- `format` – ファイルã®å½¢å¼ã€‚[Formats](../../interfaces/formats.md#formats)ã§èª¬æ˜Žã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®å½¢å¼ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +- `credentials` – 基本的ãªHTTPèªè¨¼ã€‚オプションã®ãƒ‘ラメータ。 +- `user` – èªè¨¼ã«å¿…è¦ãªãƒ¦ãƒ¼ã‚¶ãƒ¼å。 +- `password` – èªè¨¼ã«å¿…è¦ãªãƒ‘スワード。 +- `headers` – HTTPリクエストã«ä½¿ç”¨ã™ã‚‹ã™ã¹ã¦ã®ã‚«ã‚¹ã‚¿ãƒ HTTPヘッダエントリ。オプションã®ãƒ‘ラメータ。 +- `header` – å˜ä¸€ã®HTTPヘッダエントリ。 +- `name` – リクエストé€ä¿¡æ™‚ã«ä½¿ç”¨ã™ã‚‹è­˜åˆ¥å­å。 +- `value` – 特定ã®è­˜åˆ¥å­åã«è¨­å®šã•ã‚ŒãŸå€¤ã€‚ + +DDLコマンド(`CREATE DICTIONARY ...`)を使用ã—ã¦Dictionaryを作æˆã™ã‚‹ã¨ã€HTTP Dictionaryã®ãƒªãƒ¢ãƒ¼ãƒˆãƒ›ã‚¹ãƒˆã¯ä»»æ„ã®HTTPサーãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãªã„よã†ã«`remote_url_allow_hosts`セクションã®å†…容ã«å¯¾ã—ã¦ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ + +### DBMS + +#### ODBC + +ODBCドライãƒãŒã‚ã‚‹ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã§ãã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + DatabaseName + ShemaName.TableName
    + DSN=some_parameters + SQL_QUERY + SELECT id, value_1, value_2 FROM ShemaName.TableName +
    + +``` + +ã¾ãŸã¯ + +``` sql +SOURCE(ODBC( + db 'DatabaseName' + table 'SchemaName.TableName' + connection_string 'DSN=some_parameters' + invalidate_query 'SQL_QUERY' + query 'SELECT id, value_1, value_2 FROM db_name.table_name' +)) +``` + +設定フィールド: + +- `db` – データベースã®åå‰ã€‚接続文字列内ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯çœç•¥å¯èƒ½ã€‚ +- `table` – テーブルã®åå‰ã¨ã‚¹ã‚­ãƒ¼ãƒžã€‚ +- `connection_string` – 接続文字列。 +- `invalidate_query` – Dictionaryã®çŠ¶æ…‹ã‚’確èªã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã€‚オプションã®ãƒ‘ラメータ。[Refresh dictionary data using LIFETIME](#refreshing-dictionary-data-using-lifetime)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 +- `query` – カスタムクエリ。オプションã®ãƒ‘ラメータ。 + +:::note +`table`ã¨`query`フィールドã¯ä¸€ç·’ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。ãã—ã¦ã€`table`ã¾ãŸã¯`query`フィールドã®ã©ã¡ã‚‰ã‹ä¸€æ–¹ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +ClickHouseã¯ODBCドライãƒã‹ã‚‰ã‚¯ã‚©ãƒ¼ãƒˆè¨˜å·ã‚’å—ã‘å–ã‚Šã€ãƒ‰ãƒ©ã‚¤ãƒã¸ã®ã‚¯ã‚¨ãƒªå†…ã§è¨­å®šã‚’ã™ã¹ã¦ã‚¯ã‚©ãƒ¼ãƒˆã—ã¾ã™ã®ã§ã€ãƒ†ãƒ¼ãƒ–ルåã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ãƒ†ãƒ¼ãƒ–ルåã®ã‚±ãƒ¼ã‚¹ã«å¿œã˜ã¦è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +Oracle使用時ã«ã¯ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã«å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã€è©²å½“ã™ã‚‹[FAQ](/knowledgebase/oracle-odbc)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +##### ODBCDictionary機能ã®æ—¢çŸ¥ã®è„†å¼±æ€§ + +:::note +ODBCドライãƒã®`Servername`接続パラメータを通ã˜ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šã™ã‚‹éš›ã«ç½®ãæ›ãˆãŒç”Ÿã˜ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€`odbc.ini`ã‹ã‚‰ã®`USERNAME`ã¨`PASSWORD`ã®å€¤ãŒãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã‚‹ãŸã‚ã€ã“れらãŒæ¼æ´©ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**安全ã§ãªã„使用ã®ä¾‹** + +PostgreSQL用ã«unixODBCを設定ã—ã¾ã™ã€‚`/etc/odbc.ini`ã®å†…容: + +``` text +[gregtest] +Driver = /usr/lib/psqlodbca.so +Servername = localhost +PORT = 5432 +DATABASE = test_db +#OPTION = 3 +USERNAME = test +PASSWORD = test +``` + +ã“ã®å¾Œã€æ¬¡ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã¨ + +``` sql +SELECT * FROM odbc('DSN=gregtest;Servername=some-server.com', 'test_db'); +``` + +ODBCドライãƒã¯`odbc.ini`ã®`USERNAME`ã¨`PASSWORD`ã®å€¤ã‚’`some-server.com`ã«é€ä¿¡ã—ã¾ã™ã€‚ + +##### PostgreSQLã¸ã®æŽ¥ç¶šä¾‹ + +Ubuntu OS。 + +unixODBCã¨PostgreSQL用ODBCドライãƒã‚’インストールã—ã¾ã™: + +``` bash +$ sudo apt-get install -y unixodbc odbcinst odbc-postgresql +``` + +`/etc/odbc.ini`(ã¾ãŸã¯ClickHouseを実行ã—ã¦ã„るユーザーã§ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã—ã¦ã„ã‚‹å ´åˆã¯`~/.odbc.ini`)を設定ã—ã¾ã™: + +``` text + [DEFAULT] + Driver = myconnection + + [myconnection] + Description = PostgreSQL connection to my_db + Driver = PostgreSQL Unicode + Database = my_db + Servername = 127.0.0.1 + UserName = username + Password = password + Port = 5432 + Protocol = 9.3 + ReadOnly = No + RowVersioning = No + ShowSystemTables = No + ConnSettings = +``` + +ClickHouseã®Dictionary設定: + +``` xml + + + table_name + + + + + DSN=myconnection + postgresql_table
    +
    + + + 300 + 360 + + + + + + + id + + + some_column + UInt64 + 0 + + +
    +
    +``` + +ã¾ãŸã¯ + +``` sql +CREATE DICTIONARY table_name ( + id UInt64, + some_column UInt64 DEFAULT 0 +) +PRIMARY KEY id +SOURCE(ODBC(connection_string 'DSN=myconnection' table 'postgresql_table')) +LAYOUT(HASHED()) +LIFETIME(MIN 300 MAX 360) +``` + +ドライãƒãŒã‚るライブラリã¸ã®ãƒ•ãƒ«ãƒ‘スを指定ã™ã‚‹ãŸã‚ã«`odbc.ini`を編集ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“:`DRIVER=/usr/local/lib/psqlodbcw.so`。 + +##### MS SQL Serverã¸ã®æŽ¥ç¶šä¾‹ + +Ubuntu OS。 + +MS SQLã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®ODBCドライãƒã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«: + +``` bash +$ sudo apt-get install tdsodbc freetds-bin sqsh +``` + +ドライãƒã®è¨­å®š: + +```bash + $ cat /etc/freetds/freetds.conf + ... + + [MSSQL] + host = 192.168.56.101 + port = 1433 + tds version = 7.0 + client charset = UTF-8 + + # TDS接続ã®ãƒ†ã‚¹ãƒˆ + $ sqsh -S MSSQL -D database -U user -P password + + + $ cat /etc/odbcinst.ini + + [FreeTDS] + Description = FreeTDS + Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so + Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so + FileUsage = 1 + UsageCount = 5 + + $ cat /etc/odbc.ini + # $ cat ~/.odbc.ini # ClickHouseを実行ã—ã¦ã„るユーザーã§ã‚µã‚¤ãƒ³ã‚¤ãƒ³ã—ã¦ã„ã‚‹å ´åˆ + + [MSSQL] + Description = FreeTDS + Driver = FreeTDS + Servername = MSSQL + Database = test + UID = test + PWD = test + Port = 1433 + + + # (オプション)ODBC接続ã®ãƒ†ã‚¹ãƒˆï¼ˆisqlツールを使用ã™ã‚‹ã«ã¯[unixodbc](https://packages.debian.org/sid/unixodbc)パッケージをインストールã—ã¾ã™ï¼‰ + $ isql -v MSSQL "user" "password" +``` + +備考: +- 特定ã®SQL Serverãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹æœ€ã‚‚æ—©ã„TDSãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’確èªã™ã‚‹ã«ã¯ã€è£½å“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã™ã‚‹ã‹ã€[MS-TDS製å“動作](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-tds/135d0ebe-5c4c-4a94-99bf-1811eccb9f4a)を見ã¦ãã ã•ã„。 + +ClickHouseã§ã®Dictionaryã®è¨­å®š: + +``` xml + + + test + + + dict
    + DSN=MSSQL;UID=test;PWD=test +
    + + + + 300 + 360 + + + + + + + + + k + + + s + String + + + +
    +
    +``` + +ã¾ãŸã¯ + +``` sql +CREATE DICTIONARY test ( + k UInt64, + s String DEFAULT '' +) +PRIMARY KEY k +SOURCE(ODBC(table 'dict' connection_string 'DSN=MSSQL;UID=test;PWD=test')) +LAYOUT(FLAT()) +LIFETIME(MIN 300 MAX 360) +``` + +#### MySQL + +設定ã®ä¾‹: + +``` xml + + + 3306 + clickhouse + qwerty + + example01-1 + 1 + + + example01-2 + 1 + + db_name + table_name
    + id=10 + SQL_QUERY + true + SELECT id, value_1, value_2 FROM db_name.table_name +
    + +``` + +ã¾ãŸã¯ + +``` sql +SOURCE(MYSQL( + port 3306 + user 'clickhouse' + password 'qwerty' + replica(host 'example01-1' priority 1) + replica(host 'example01-2' priority 1) + db 'db_name' + table 'table_name' + where 'id=10' + invalidate_query 'SQL_QUERY' + fail_on_connection_loss 'true' + query 'SELECT id, value_1, value_2 FROM db_name.table_name' +)) +``` + +設定フィールド: + +- `port` – MySQLサーãƒãƒ¼ã®ãƒãƒ¼ãƒˆã€‚ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«å¯¾ã—ã¦ã€ã¾ãŸã¯å€‹åˆ¥ã«ï¼ˆ``内)指定ã§ãã¾ã™ã€‚ + +- `user` – MySQLユーザーå。ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«å¯¾ã—ã¦ã€ã¾ãŸã¯å€‹åˆ¥ã«ï¼ˆ``内)指定ã§ãã¾ã™ã€‚ + +- `password` – MySQLユーザーã®ãƒ‘スワード。ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«å¯¾ã—ã¦ã€ã¾ãŸã¯å€‹åˆ¥ã«ï¼ˆ``内)指定ã§ãã¾ã™ã€‚ + +- `replica` – レプリカ構æˆã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã€‚複数ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã§ãã¾ã™ã€‚ + + - `replica/host` – MySQLホスト。 + - `replica/priority` – レプリカã®å„ªå…ˆåº¦ã€‚ClickHouseãŒæŽ¥ç¶šã‚’試ã¿ã‚‹éš›ã¯ã€å„ªå…ˆåº¦ã«åŸºã¥ã„ã¦ãƒ¬ãƒ—リカを巡回ã—ã¾ã™ã€‚æ•°ãŒå°‘ãªã„ã»ã©å„ªå…ˆåº¦ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +- `db` – データベースã®åå‰ã€‚ + +- `table` – テーブルã®åå‰ã€‚ + +- `where` – é¸æŠžæ¡ä»¶ã€‚æ¡ä»¶ã®æ§‹æ–‡ã¯MySQLã®`WHERE`å¥ã¨åŒã˜ã§ã€ãŸã¨ãˆã°`id > 10 AND id < 20`ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚オプションã®ãƒ‘ラメータ。 + +- `invalidate_query` – Dictionaryã®çŠ¶æ…‹ã‚’確èªã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã€‚オプションã®ãƒ‘ラメータ。[Refresh dictionary data using LIFETIME](#refreshing-dictionary-data-using-lifetime)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +- `fail_on_connection_loss` – 接続喪失時ã®ã‚µãƒ¼ãƒãƒ¼ã®å‹•ä½œã‚’制御ã™ã‚‹æ§‹æˆãƒ‘ラメータ。`true`ã®å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¨ã‚µãƒ¼ãƒãƒ¼é–“ã®æŽ¥ç¶šãŒå¤±ã‚ã‚ŒãŸå ´åˆã«å³åº§ã«ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚`false`ã®å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã‚‹å‰ã«ClickHouseサーãƒãƒ¼ã¯ã‚¯ã‚¨ãƒªã‚’3回å†è©¦è¡Œã—ã¾ã™ã€‚å†è©¦è¡Œã«ã‚ˆã‚Šå¿œç­”時間ãŒå¢—加ã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。デフォルト値: `false`。 + +- `query` – カスタムクエリ。オプションã®ãƒ‘ラメータ。 + +:::note +`table`ã¾ãŸã¯`where`フィールドã¯ã€`query`フィールドã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ãã—ã¦ã€`table`ã¾ãŸã¯`query`フィールドã®ã©ã¡ã‚‰ã‹ä¸€æ–¹ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +:::note +明示的ãªãƒ‘ラメータ`secure`ã¯ã‚ã‚Šã¾ã›ã‚“。SSL接続を確立ã™ã‚‹éš›ã¯ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãŒå¿…é ˆã§ã™ã€‚ +::: + +MySQLã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ›ã‚¹ãƒˆä¸Šã§ã‚½ã‚±ãƒƒãƒˆã‚’介ã—ã¦æŽ¥ç¶šã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`host`ã¨`socket`を設定ã—ã¾ã™ã€‚ + +設定ã®ä¾‹: + +``` xml + + + localhost + /path/to/socket/file.sock + clickhouse + qwerty + db_name + table_name
    + id=10 + SQL_QUERY + true + SELECT id, value_1, value_2 FROM db_name.table_name +
    + +``` + +ã¾ãŸã¯ + +``` sql +SOURCE(MYSQL( + host 'localhost' + socket '/path/to/socket/file.sock' + user 'clickhouse' + password 'qwerty' + db 'db_name' + table 'table_name' + where 'id=10' + invalidate_query 'SQL_QUERY' + fail_on_connection_loss 'true' + query 'SELECT id, value_1, value_2 FROM db_name.table_name' +)) +``` + +#### ClickHouse + +設定ã®ä¾‹: + +``` xml + + + example01-01-1 + 9000 + default + + default + ids
    + id=10 + 1 + SELECT id, value_1, value_2 FROM default.ids +
    + +``` + +ã¾ãŸã¯ + +``` sql +SOURCE(CLICKHOUSE( + host 'example01-01-1' + port 9000 + user 'default' + password '' + db 'default' + table 'ids' + where 'id=10' + secure 1 + query 'SELECT id, value_1, value_2 FROM default.ids' +)); +``` + +設定フィールド: + +- `host` – ClickHouseホスト。ローカルホストã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’使用ã›ãšã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚フォールトトレランスをå‘上ã•ã›ã‚‹ãŸã‚ã«ã€[分散テーブル](../../engines/table-engines/special/distributed.md)を作æˆã—ã€ãれを後続ã®è¨­å®šã«å…¥åŠ›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- `port` – ClickHouseサーãƒãƒ¼ã®ãƒãƒ¼ãƒˆã€‚ +- `user` – ClickHouseユーザーã®åå‰ã€‚ +- `password` – ClickHouseユーザーã®ãƒ‘スワード。 +- `db` – データベースã®åå‰ã€‚ +- `table` – テーブルã®åå‰ã€‚ +- `where` – é¸æŠžæ¡ä»¶ã€‚çœç•¥å¯èƒ½ã§ã™ã€‚ +- `invalidate_query` – Dictionaryã®çŠ¶æ…‹ã‚’確èªã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã€‚オプションã®ãƒ‘ラメータ。[Refresh dictionary data using LIFETIME](#refreshing-dictionary-data-using-lifetime)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 +- `secure` - 接続ã«SSLを使用。 +- `query` – カスタムクエリ。オプションã®ãƒ‘ラメータ。 + +:::note +`table`ã¾ãŸã¯`where`フィールドã¯ã€`query`フィールドã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ãã—ã¦ã€`table`ã¾ãŸã¯`query`フィールドã®ã©ã¡ã‚‰ã‹ä¸€æ–¹ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +#### MongoDB + +設定ã®ä¾‹: + +``` xml + + + localhost + 27017 + + + test + dictionary_source + ssl=true + + +``` + +ã¾ãŸã¯ + +``` xml + + + mongodb://localhost:27017/test?ssl=true + dictionary_source + + +``` + +ã¾ãŸã¯ + +``` sql +SOURCE(MONGODB( + host 'localhost' + port 27017 + user '' + password '' + db 'test' + collection 'dictionary_source' + options 'ssl=true' +)) +``` + +設定フィールド: + +- `host` – MongoDBホスト。 +- `port` – MongoDBサーãƒãƒ¼ã®ãƒãƒ¼ãƒˆã€‚ +- `user` – MongoDBユーザーå。 +- `password` – MongoDBユーザーã®ãƒ‘スワード。 +- `db` – データベースã®åå‰ã€‚ +- `collection` – コレクションã®åå‰ã€‚ +- `options` - MongoDB接続文字列オプション(オプションã®ãƒ‘ラメータ)。 + +ã¾ãŸã¯ + +``` sql +SOURCE(MONGODB( + uri 'mongodb://localhost:27017/clickhouse' + collection 'dictionary_source' +)) +``` + +設定フィールド: + +- `uri` - 接続を確立ã™ã‚‹ãŸã‚ã®URI。 +- `collection` – コレクションã®åå‰ã€‚ + +[エンジンã®è©³ç´°æƒ…å ±](../../engines/table-engines/integrations/mongodb.md) + + +#### Redis + +設定ã®ä¾‹: + +``` xml + + + localhost + 6379 + simple + 0 + + +``` + +ã¾ãŸã¯ + +``` sql +SOURCE(REDIS( + host 'localhost' + port 6379 + storage_type 'simple' + db_index 0 +)) +``` + +設定フィールド: + +- `host` – Redisホスト。 +- `port` – Redisサーãƒãƒ¼ã®ãƒãƒ¼ãƒˆã€‚ +- `storage_type` – キーをæ“作ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹å†…部ã®Redisストレージ構造。`simple`ã¯å˜ç´”ãªã‚½ãƒ¼ã‚¹ãŠã‚ˆã³å˜ä¸€ã®ã‚­ãƒ¼ã‚½ãƒ¼ã‚¹ã«ãƒãƒƒã‚·ãƒ¥ã•ã‚ŒãŸã‚‚ã®ã«ã€`hash_map`ã¯2ã¤ã®ã‚­ãƒ¼ã‚’æŒã¤ãƒãƒƒã‚·ãƒ¥ã•ã‚ŒãŸã‚½ãƒ¼ã‚¹ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚範囲指定ã•ã‚ŒãŸã‚½ãƒ¼ã‚¹ã‚„ã€è¤‡é›‘ãªã‚­ãƒ¼ã‚’æŒã¤ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚½ãƒ¼ã‚¹ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。çœç•¥å¯èƒ½ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯`simple`ã§ã™ã€‚ +- `db_index` – 特定ã®æ•°å€¤ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®Redisè«–ç†ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚çœç•¥å¯èƒ½ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯0ã§ã™ã€‚ + +#### Cassandra + +設定ã®ä¾‹: + +``` xml + + + localhost + 9042 + username + qwerty123 + database_name + table_name + 1 +``` +```xml +1 +One +"SomeColumn" = 42 +8 +SELECT id, value_1, value_2 FROM database_name.table_name + + +``` + +設定項目: + +- `host` – Cassandraホストã€ã¾ãŸã¯ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã®ãƒ›ã‚¹ãƒˆãƒªã‚¹ãƒˆã€‚ +- `port` – Cassandraサーãƒãƒ¼ã®ãƒãƒ¼ãƒˆã€‚指定ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒãƒ¼ãƒˆ9042ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- `user` – Cassandraユーザーã®åå‰ã€‚ +- `password` – Cassandraユーザーã®ãƒ‘スワード。 +- `keyspace` – キースペース(データベース)ã®åå‰ã€‚ +- `column_family` – カラムファミリー(テーブル)ã®åå‰ã€‚ +- `allow_filtering` – クラスタリングキーカラムã«å¯¾ã™ã‚‹æ½œåœ¨çš„ã«é«˜ã‚³ã‚¹ãƒˆãªæ¡ä»¶ã‚’許å¯ã™ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚デフォルト値ã¯1ã§ã™ã€‚ +- `partition_key_prefix` – Cassandraテーブルã®ä¸»ã‚­ãƒ¼å†…ã®ãƒ‘ーティションキーカラムã®æ•°ã€‚複åˆã‚­ãƒ¼Dictionaryã«å¿…è¦ã§ã™ã€‚Dictionary定義ã®ã‚­ãƒ¼ã®é †åºã¯Cassandraã¨åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。デフォルト値ã¯1(最åˆã®ã‚­ãƒ¼ã¯ãƒ‘ーティションキーã§ã€ä»–ã®ã‚­ãƒ¼ã¯ã‚¯ãƒ©ã‚¹ã‚¿ãƒªãƒ³ã‚°ã‚­ãƒ¼ï¼‰ã§ã™ã€‚ +- `consistency` – 一貫性レベル。å¯èƒ½ãªå€¤ã¯:`One`, `Two`, `Three`, `All`, `EachQuorum`, `Quorum`, `LocalQuorum`, `LocalOne`, `Serial`, `LocalSerial`ã§ã™ã€‚デフォルト値ã¯`One`ã§ã™ã€‚ +- `where` – オプションã®é¸æŠžæ¡ä»¶ã€‚ +- `max_threads` – 複åˆã‚­ãƒ¼Dictionaryã§è¤‡æ•°ã®ãƒ‘ーティションã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹æœ€å¤§ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã€‚ +- `query` – カスタムクエリ。オプションã®ãƒ‘ラメータ。 + +:::note +`column_family`ã¾ãŸã¯`where`フィールドã¯`query`フィールドã¨ä¸€ç·’ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。ã¾ãŸã€`column_family`ã¾ãŸã¯`query`ã®ã„ãšã‚Œã‹ä¸€æ–¹ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’å¿…ãšå®£è¨€ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +#### PostgreSQL + +設定ã®ä¾‹: + +```xml + + + postgresql-hostname + 5432 + clickhouse + qwerty + db_name + table_name
    + id=10 + SQL_QUERY + SELECT id, value_1, value_2 FROM db_name.table_name +
    + +``` + +ã¾ãŸã¯ + +```sql +SOURCE(POSTGRESQL( + port 5432 + host 'postgresql-hostname' + user 'postgres_user' + password 'postgres_password' + db 'db_name' + table 'table_name' + replica(host 'example01-1' port 5432 priority 1) + replica(host 'example01-2' port 5432 priority 2) + where 'id=10' + invalidate_query 'SQL_QUERY' + query 'SELECT id, value_1, value_2 FROM db_name.table_name' +)) +``` + +設定項目: + +- `host` – PostgreSQLサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆã€‚ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«å¯¾ã—ã¦ã€ã¾ãŸã¯ãã‚Œãžã‚Œå€‹åˆ¥ã«æŒ‡å®šã§ãã¾ã™ï¼ˆ``内)。 +- `port` – PostgreSQLサーãƒãƒ¼ã®ãƒãƒ¼ãƒˆã€‚ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«å¯¾ã—ã¦ã€ã¾ãŸã¯ãã‚Œãžã‚Œå€‹åˆ¥ã«æŒ‡å®šã§ãã¾ã™ï¼ˆ``内)。 +- `user` – PostgreSQLユーザーã®åå‰ã€‚ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«å¯¾ã—ã¦ã€ã¾ãŸã¯ãã‚Œãžã‚Œå€‹åˆ¥ã«æŒ‡å®šã§ãã¾ã™ï¼ˆ``内)。 +- `password` – PostgreSQLユーザーã®ãƒ‘スワード。ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«å¯¾ã—ã¦ã€ã¾ãŸã¯ãã‚Œãžã‚Œå€‹åˆ¥ã«æŒ‡å®šã§ãã¾ã™ï¼ˆ``内)。 +- `replica` – レプリカ設定セクションãŒè¤‡æ•°ã‚ã‚Šã¾ã™: + - `replica/host` – PostgreSQLホスト。 + - `replica/port` – PostgreSQLãƒãƒ¼ãƒˆã€‚ + - `replica/priority` – レプリカã®å„ªå…ˆé †ä½ã€‚接続を試ã¿ã‚‹éš›ã€ClickHouseã¯å„ªå…ˆé †ä½ã®é †ã«ãƒ¬ãƒ—リカを試ã¿ã¾ã™ã€‚æ•°å­—ãŒå°ã•ã„ã»ã©ã€å„ªå…ˆé †ä½ãŒé«˜ããªã‚Šã¾ã™ã€‚ +- `db` – データベースã®åå‰ã€‚ +- `table` – テーブルã®åå‰ã€‚ +- `where` – é¸æŠžåŸºæº–。æ¡ä»¶ã®æ§‹æ–‡ã¯PostgreSQLã®`WHERE`å¥ã¨åŒã˜ã§ã™ã€‚例ãˆã°`id > 10 AND id < 20`。オプションã®ãƒ‘ラメータ。 +- `invalidate_query` – Dictionaryã®çŠ¶æ…‹ã‚’確èªã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã€‚オプションã®ãƒ‘ラメータ。詳細ã¯[Refreshing dictionary data using LIFETIME](#refreshing-dictionary-data-using-lifetime)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 +- `query` – カスタムクエリ。オプションã®ãƒ‘ラメータ。 + +:::note +`table`ã¾ãŸã¯`where`フィールドã¯`query`フィールドã¨ä¸€ç·’ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。ã¾ãŸã€`table`ã¾ãŸã¯`query`ã®ã„ãšã‚Œã‹ä¸€æ–¹ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’å¿…ãšå®£è¨€ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +### Null + +ダミー(空)ã®Dictionaryを作æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãる特別ãªã‚½ãƒ¼ã‚¹ã§ã™ã€‚ã“ã®ã‚ˆã†ãªDictionaryã¯ã€ãƒ†ã‚¹ãƒˆã‚„分散テーブルã®ãƒ‡ãƒ¼ã‚¿ã¨ã‚¯ã‚¨ãƒªãƒŽãƒ¼ãƒ‰ãŒåˆ†é›¢ã•ã‚ŒãŸã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã§å½¹ç«‹ã¡ã¾ã™ã€‚ + +```sql +CREATE DICTIONARY null_dict ( + id UInt64, + val UInt8, + default_val UInt8 DEFAULT 123, + nullable_val Nullable(UInt8) +) +PRIMARY KEY id +SOURCE(NULL()) +LAYOUT(FLAT()) +LIFETIME(0); +``` + +## Dictionary Key and Fields + + + +`structure`å¥ã¯ã‚¯ã‚¨ãƒªç”¨ã®Dictionaryキーã¨ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’記述ã—ã¾ã™ã€‚ + +XMLã®è¨˜è¿°: + +```xml + + + + Id + + + + + + + ... + + + +``` + +属性ã¯ä»¥ä¸‹ã®è¦ç´ ã§è¨˜è¿°ã•ã‚Œã¾ã™: + +- `` — キーカラム +- `` — データカラム: 複数ã®å±žæ€§ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +DDLクエリ: + +```sql +CREATE DICTIONARY dict_name ( + Id UInt64, + -- attributes +) +PRIMARY KEY Id +... +``` + +属性ã¯ã‚¯ã‚¨ãƒªæœ¬æ–‡ã§è¨˜è¿°ã•ã‚Œã¾ã™: + +- `PRIMARY KEY` — キーカラム +- `AttrName AttrType` — データカラム。複数ã®å±žæ€§ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## Key + +ClickHouseã¯ä»¥ä¸‹ã®ã‚¿ã‚¤ãƒ—ã®ã‚­ãƒ¼ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™: + +- 数値キー。`UInt64`。``ã‚¿ã‚°ã¾ãŸã¯`PRIMARY KEY`キーワードã§å®šç¾©ã•ã‚Œã¾ã™ã€‚ +- 複åˆã‚­ãƒ¼ã€‚ç•°ãªã‚‹ã‚¿ã‚¤ãƒ—ã®å€¤ã®é›†åˆã€‚``ã‚¿ã‚°ã¾ãŸã¯`PRIMARY KEY`キーワードã§å®šç¾©ã•ã‚Œã¾ã™ã€‚ + +XML構造ã«ã¯``ã¾ãŸã¯``ã®ã„ãšã‚Œã‹ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚DDLクエリã«ã¯`PRIMARY KEY`ãŒ1ã¤å«ã¾ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +キーを属性ã¨ã—ã¦è¨˜è¿°ã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 +::: + +### Numeric Key + +タイプ: `UInt64`。 + +設定例: + +```xml + + Id + +``` + +設定項目: + +- `name` – キーをæŒã¤ã‚«ãƒ©ãƒ ã®åå‰ã€‚ + +DDLクエリã®ä¾‹: + +```sql +CREATE DICTIONARY ( + Id UInt64, + ... +) +PRIMARY KEY Id +... +``` + +- `PRIMARY KEY` – キーをæŒã¤ã‚«ãƒ©ãƒ ã®åå‰ã€‚ + +### Composite Key + +キーã¯ã‚らゆるタイプã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®`tuple`ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã®[レイアウト](#storing-dictionaries-in-memory)ã¯`complex_key_hashed`ã¾ãŸã¯`complex_key_cache`ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +:::tip +複åˆã‚­ãƒ¼ã¯å˜ä¸€è¦ç´ ã§æ§‹æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ä¾‹ãˆã°æ–‡å­—列をキーã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ +::: + +キー構造ã¯``è¦ç´ ã§è¨­å®šã•ã‚Œã¾ã™ã€‚キー・フィールドã¯Dictionaryã®[attributes](#dictionary-key-and-fields)ã¨åŒã˜å½¢å¼ã§æŒ‡å®šã•ã‚Œã¾ã™ã€‚例: + +```xml + + + + field1 + String + + + field2 + UInt32 + + ... + +... +``` + +ã¾ãŸã¯ + +```sql +CREATE DICTIONARY ( + field1 String, + field2 String + ... +) +PRIMARY KEY field1, field2 +... +``` + +`dictGet*`関数ã«å¯¾ã™ã‚‹ã‚¯ã‚¨ãƒªã§ã¯ã€ã‚­ãƒ¼ã¨ã—ã¦ã‚¿ãƒ—ルãŒæ¸¡ã•ã‚Œã¾ã™ã€‚例: `dictGetString('dict_name', 'attr_name', tuple('string for field1', num_for_field2))`。 + +## Attributes + +設定例: + +```xml + + ... + + Name + ClickHouseDataType + + rand64() + true + true + true + + +``` + +ã¾ãŸã¯ + +```sql +CREATE DICTIONARY somename ( + Name ClickHouseDataType DEFAULT '' EXPRESSION rand64() HIERARCHICAL INJECTIVE IS_OBJECT_ID +) +``` + +設定項目: + +| ã‚¿ã‚° | 説明 | 必須項目 | +|------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------| +| `name` | カラムå。 | ã¯ã„ | +| `type` | ClickHouseデータタイプ: [UInt8](../../sql-reference/data-types/int-uint.md), [UInt16](../../sql-reference/data-types/int-uint.md), [UInt32](../../sql-reference/data-types/int-uint.md), [UInt64](../../sql-reference/data-types/int-uint.md), [Int8](../../sql-reference/data-types/int-uint.md), [Int16](../../sql-reference/data-types/int-uint.md), [Int32](../../sql-reference/data-types/int-uint.md), [Int64](../../sql-reference/data-types/int-uint.md), [Float32](../../sql-reference/data-types/float.md), [Float64](../../sql-reference/data-types/float.md), [UUID](../../sql-reference/data-types/uuid.md), [Decimal32](../../sql-reference/data-types/decimal.md), [Decimal64](../../sql-reference/data-types/decimal.md), [Decimal128](../../sql-reference/data-types/decimal.md), [Decimal256](../../sql-reference/data-types/decimal.md),[Date](../../sql-reference/data-types/date.md), [Date32](../../sql-reference/data-types/date32.md), [DateTime](../../sql-reference/data-types/datetime.md), [DateTime64](../../sql-reference/data-types/datetime64.md), [String](../../sql-reference/data-types/string.md), [Array](../../sql-reference/data-types/array.md)。
    ClickHouseã¯Dictionaryã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã«å€¤ã‚’キャストã—よã†ã¨ã—ã¾ã™ã€‚例ãˆã°ã€MySQLã§ã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯`TEXT`ã€`VARCHAR`ã€ã¾ãŸã¯`BLOB`ã§ã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ClickHouseã§ã¯`String`ã¨ã—ã¦ã‚¢ãƒƒãƒ—ロードã§ãã¾ã™ã€‚
    [Nullable](../../sql-reference/data-types/nullable.md)ã¯ç¾åœ¨ã€[Flat](#flat), [Hashed](#hashed), [ComplexKeyHashed](#complex_key_hashed), [Direct](#direct), [ComplexKeyDirect](#complex_key_direct), [RangeHashed](#range_hashed), Polygon, [Cache](#cache), [ComplexKeyCache](#complex_key_cache), [SSDCache](#ssd_cache), [SSDComplexKeyCache](#complex_key_ssd_cache) Dictionaryã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚[IPTrie](#ip_trie) Dictionaryã§ã¯ `Nullable` タイプã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 | ã¯ã„ | +| `null_value` | 存在ã—ãªã„è¦ç´ ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚
    例ã§ã¯ç©ºã®æ–‡å­—列ã§ã™ã€‚[NULL](../syntax.md#null) 値ã¯`Nullable`タイプã®ã¿ã§ä½¿ç”¨å¯èƒ½ã§ã™ï¼ˆä¸Šè¨˜ã®ã‚¿ã‚¤ãƒ—ã®èª¬æ˜Žã‚’å‚照)。 | ã¯ã„ | +| `expression` | ClickHouseãŒå€¤ã«å¯¾ã—ã¦å®Ÿè¡Œã™ã‚‹[å¼](../../sql-reference/syntax.md#expressions)。
    å¼ã¯ãƒªãƒ¢ãƒ¼ãƒˆSQLデータベースã®ã‚«ãƒ©ãƒ åã§ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ãƒªãƒ¢ãƒ¼ãƒˆã‚«ãƒ©ãƒ ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’作æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚

    デフォルト値: å¼ãªã—。 | ã„ã„㈠| +| `hierarchical` | `true`ã®å ´åˆã€å±žæ€§ã¯ç¾åœ¨ã®ã‚­ãƒ¼ã®è¦ªã‚­ãƒ¼ã®å€¤ã‚’å«ã¿ã¾ã™ã€‚[階層Dictionary](#hierarchical-dictionaries)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。

    デフォルト値: `false`。 | ã„ã„㈠| +| `injective` | `id -> attribute`ã®å†™åƒãŒ[å˜å°„](https://en.wikipedia.org/wiki/Injective_function)ã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚
    `true`ã®å ´åˆã€ClickHouseã¯`GROUP BY`å¥ã®å¾Œã«å˜å°„ã®Dictionaryã¸ã®è¦æ±‚を自動的ã«é…ç½®ã§ãã¾ã™ã€‚通常ã€ã“ã‚Œã«ã‚ˆã‚Šã“ã®ã‚ˆã†ãªè¦æ±‚ã®é‡ãŒå¤§å¹…ã«å‰Šæ¸›ã•ã‚Œã¾ã™ã€‚

    デフォルト値: `false`。 | ã„ã„㈠| +| `is_object_id` | クエリãŒ`ObjectID`ã«ã‚ˆã‚‹MongoDBドキュメントã®å®Ÿè¡Œã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’示ã™ãƒ•ãƒ©ã‚°ã€‚

    デフォルト値: `false`。 + +## 階層Dictionary + +ClickHouseã¯[数値キー](#numeric-key)ã‚’æŒã¤éšŽå±¤Dictionaryをサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +以下ã®ã‚ˆã†ãªéšŽå±¤æ§‹é€ ã‚’考ãˆã¦ã¿ã¾ã—ょã†: + +```text +0 (共通ã®è¦ª) +│ +├── 1 (ロシア) +│ │ +│ └── 2 (モスクワ) +│ │ +│ └── 3 (中心) +│ +└── 4 (イギリス) + │ + └── 5 (ロンドン) +``` + +ã“ã®éšŽå±¤ã¯æ¬¡ã®Dictionaryテーブルã§è¡¨ç¾ã§ãã¾ã™ã€‚ + +| region_id | parent_region | region_name | +|-----------|---------------|--------------| +| 1 | 0 | ロシア | +| 2 | 1 | モスクワ | +| 3 | 2 | 中心 | +| 4 | 0 | イギリス | +| 5 | 4 | ロンドン | + +ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€`parent_region`カラムãŒã‚ã‚Šã€ãã‚Œã¯è¦ç´ ã®æœ€ã‚‚è¿‘ã„親ã®ã‚­ãƒ¼ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ + +ClickHouseã¯å¤–部Dictionary属性ã«å¯¾ã—ã¦éšŽå±¤ãƒ—ロパティをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ—ロパティを使用ã™ã‚‹ã¨ã€ä¸Šè¨˜ã®ã‚ˆã†ã«éšŽå±¤Dictionaryを設定ã§ãã¾ã™ã€‚ + +[dictGetHierarchy](../../sql-reference/functions/ext-dict-functions.md#dictgethierarchy)関数を使用ã™ã‚‹ã¨ã€è¦ç´ ã®è¦ªãƒã‚§ãƒ¼ãƒ³ã‚’å–å¾—ã§ãã¾ã™ã€‚ + +我々ã®ä¾‹ã§ã¯ã€Dictionaryã®æ§‹é€ ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +```xml + + + + region_id + + + + parent_region + UInt64 + 0 + true + + + + region_name + String + + + + + +``` + +## ãƒãƒªã‚´ãƒ³Dictionary {#polygon-dictionaries} + +ãƒãƒªã‚´ãƒ³Dictionaryã¯ã€æŒ‡å®šã•ã‚ŒãŸç‚¹ã‚’å«ã‚€ãƒãƒªã‚´ãƒ³ã®æ¤œç´¢ã‚’効率的ã«è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ +例ãˆã°ã€åœ°ç†åº§æ¨™ã§éƒ½å¸‚地域を定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãƒãƒªã‚´ãƒ³Dictionary設定ã®ä¾‹: + + + +```xml + + + + + key + Array(Array(Array(Array(Float64)))) + + + + + name + String + + + + + value + UInt64 + 0 + + + + + + 1 + + + + ... + +``` + +対応ã™ã‚‹[DDLクエリ](../../sql-reference/statements/create/dictionary.md#create-dictionary-query): + +```sql +CREATE DICTIONARY polygon_dict_name ( + key Array(Array(Array(Array(Float64)))), + name String, + value UInt64 +) +PRIMARY KEY key +LAYOUT(POLYGON(STORE_POLYGON_KEY_COLUMN 1)) +... +``` + +ãƒãƒªã‚´ãƒ³Dictionaryを設定ã™ã‚‹éš›ã€ã‚­ãƒ¼ã¯ä»¥ä¸‹ã®ã‚¿ã‚¤ãƒ—ã®ã„ãšã‚Œã‹ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“: + +- å˜ç´”ãªãƒãƒªã‚´ãƒ³: 点ã®é…列。 +- マルãƒãƒãƒªã‚´ãƒ³: ãƒãƒªã‚´ãƒ³ã®é…列。å„ãƒãƒªã‚´ãƒ³ã¯ç‚¹ã®2次元é…列ã§ã™ã€‚ã“ã®é…列ã®æœ€åˆã®è¦ç´ ãŒãƒãƒªã‚´ãƒ³ã®å¤–部境界ã§ã‚ã‚Šã€å¾Œç¶šã®è¦ç´ ã¯ãã‚Œã‹ã‚‰é™¤å¤–ã•ã‚Œã‚‹é ˜åŸŸã‚’指定ã—ã¾ã™ã€‚ + +点ã¯ã€ãã‚Œãžã‚Œã®åº§æ¨™ã‚’表ã™é…列ã¾ãŸã¯ã‚¿ãƒ—ルã¨ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚ç¾åœ¨ã®å®Ÿè£…ã§ã¯ã€2次元点ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ユーザーã¯ã€ClickHouseãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ç‹¬è‡ªã®ãƒ‡ãƒ¼ã‚¿ã‚’アップロードã§ãã¾ã™ã€‚ + +次ã®3種類ã®[インメモリストレージ](#storing-dictionaries-in-memory)ãŒåˆ©ç”¨å¯èƒ½ã§ã™: + +- `POLYGON_SIMPLE`: クエリã”ã¨ã«ã™ã¹ã¦ã®ãƒãƒªã‚´ãƒ³ã‚’ç·šå½¢ã«é€šéŽã—ã€è¿½åŠ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã›ãšã«ãã‚Œãžã‚Œã®æ‰€å±žã‚’確èªã™ã‚‹ãƒŠã‚¤ãƒ¼ãƒ–ãªå®Ÿè£…ã§ã™ã€‚ + +- `POLYGON_INDEX_EACH`: 地ç†çš„地域å‘ã‘ã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¦ã€ã»ã¨ã‚“ã©ã®å ´åˆã™ã°ã‚„ã所属ãŒç¢ºèªã§ãるよã†ã«ã€å„ãƒãƒªã‚´ãƒ³ã«å€‹åˆ¥ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒæ§‹ç¯‰ã•ã‚Œã¾ã™ã€‚ +ã¾ãŸã€ã‚¨ãƒªã‚¢ã«ã‚°ãƒªãƒƒãƒ‰ãŒé‡ã­ã‚‰ã‚Œã€å€™è£œã¨ãªã‚‹ãƒãƒªã‚´ãƒ³ã®æ•°ã‚’大幅ã«çµžã‚Šè¾¼ã¿ã¾ã™ã€‚ +グリッドã¯ã€ã‚»ãƒ«ã‚’16等分ã«å†å¸°çš„ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã§ä½œæˆã•ã‚Œã€2ã¤ã®ãƒ‘ラメータã§è¨­å®šã•ã‚Œã¾ã™ã€‚ +分割ã¯ã€å†å¸°ã®æ·±ã•ãŒ`MAX_DEPTH`ã«é”ã™ã‚‹ã‹ã€ã‚»ãƒ«ãŒæ¨ªæ–­ã™ã‚‹ãƒãƒªã‚´ãƒ³ã®æ•°ãŒ`MIN_INTERSECTIONS`ã«é”ã™ã‚‹ã¨çµ‚了ã—ã¾ã™ã€‚ +クエリã«å¿œç­”ã™ã‚‹ã«ã¯ã€å¯¾å¿œã™ã‚‹ã‚»ãƒ«ã®ä¸­ã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ãƒãƒªã‚´ãƒ³ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã¾ã™ã€‚ + +- `POLYGON_INDEX_CELL`: 上記ã®ã‚°ãƒªãƒƒãƒ‰ã‚‚作æˆã•ã‚Œã¾ã™ã€‚åŒã˜ã‚ªãƒ—ションãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚å„シートセルã«å¯¾ã—ã¦ã€ãã®ä¸­ã«å…¥ã‚‹ãƒãƒªã‚´ãƒ³ç‰‡ã™ã¹ã¦ã«å¯¾ã—ã¦ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒæ§‹ç¯‰ã•ã‚Œã¦ãŠã‚Šã€ã‚¯ã‚¨ãƒªã«è¿…速ã«å¿œç­”ã§ãã¾ã™ã€‚ + +- `POLYGON`: `POLYGON_INDEX_CELL`ã®åˆ¥åã§ã™ã€‚ + +Dictionaryクエリã¯ã€Dictionaryã‚’æ“作ã™ã‚‹ãŸã‚ã®æ¨™æº–çš„ãª[関数](../../sql-reference/functions/ext-dict-functions.md)を通ã˜ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ +é‡è¦ãªé•ã„ã¯ã€ã“ã“ã§ã¯ã‚­ãƒ¼ãƒã‚¤ãƒ³ãƒˆãŒæŒ‡å®šã•ã‚Œã€æŒ‡å®šã•ã‚ŒãŸç‚¹ã‚’å«ã‚€æœ€å°ã®ãƒãƒªã‚´ãƒ³ãŒè¦‹ã¤ã‹ã‚‹ç‚¹ã§ã™ã€‚ + +**例** + +上ã§å®šç¾©ã•ã‚ŒãŸDictionaryã¨é€£å‹•ã™ã‚‹ä¾‹: + +```sql +CREATE TABLE points ( + x Float64, + y Float64 +) +... +SELECT tuple(x, y) AS key, dictGet(dict_name, 'name', key), dictGet(dict_name, 'value', key) FROM points ORDER BY x, y; +``` + +最後ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ãŸçµæžœã€`points`テーブル内ã®å„ãƒã‚¤ãƒ³ãƒˆã«å¯¾ã—ã¦ã€ãれをå«ã‚€æœ€å°é ˜åŸŸãƒãƒªã‚´ãƒ³ãŒè¦‹ã¤ã‹ã‚Šã€è¦æ±‚ã•ã‚ŒãŸå±žæ€§ãŒå‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +**例** + +ãƒãƒªã‚´ãƒ³Dictionaryã‹ã‚‰SELECTクエリを介ã—ã¦ã‚«ãƒ©ãƒ ã‚’読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚Dictionary設定ã¾ãŸã¯å¯¾å¿œã™ã‚‹DDLクエリã§`store_polygon_key_column = 1`をオンã«ã—ã¦ãã ã•ã„。 + +クエリ: + +```sql +CREATE TABLE polygons_test_table +( + key Array(Array(Array(Tuple(Float64, Float64)))), + name String +) ENGINE = TinyLog; + +INSERT INTO polygons_test_table VALUES ([[[(3, 1), (0, 1), (0, -1), (3, -1)]]], 'Value'); + +CREATE DICTIONARY polygons_test_dictionary +( + key Array(Array(Array(Tuple(Float64, Float64)))), + name String +) +PRIMARY KEY key +SOURCE(CLICKHOUSE(TABLE 'polygons_test_table')) +LAYOUT(POLYGON(STORE_POLYGON_KEY_COLUMN 1)) +LIFETIME(0); + +SELECT * FROM polygons_test_dictionary; +``` + +çµæžœ: + +```text +┌─key─────────────────────────────┬─name──┠+│ [[[(3,1),(0,1),(0,-1),(3,-1)]]] │ Value │ +└─────────────────────────────────┴───────┘ +``` + +## æ­£è¦è¡¨ç¾ãƒ„リーDictionary {#regexp-tree-dictionary} + +æ­£è¦è¡¨ç¾ãƒ„リーDictionaryã¯ã€æ­£è¦è¡¨ç¾ã®ãƒ„リーを使ã£ã¦ã‚­ãƒ¼ã‹ã‚‰å±žæ€§ã¸ã®ãƒžãƒƒãƒ”ングを表ç¾ã™ã‚‹ç‰¹åˆ¥ãªã‚¿ã‚¤ãƒ—ã®Dictionaryã§ã™ã€‚例ãˆã°ã€[ユーザーエージェント](https://en.wikipedia.org/wiki/User_agent)文字列ã®è§£æžã®ã‚ˆã†ãªãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã¯ã€æ­£è¦è¡¨ç¾ãƒ„リーDictionaryã§å„ªé›…ã«è¡¨ç¾ã§ãã¾ã™ã€‚ + +### ClickHouse Open-Sourceã§ã®æ­£è¦è¡¨ç¾ãƒ„リーDictionaryã®ä½¿ç”¨ +æ­£è¦è¡¨ç¾ãƒ„リーディクショナリã¯ã€ClickHouseオープンソースã§ã€æ­£è¦è¡¨ç¾ãƒ„リーをå«ã‚€YAMLファイルã®ãƒ‘スをæä¾›ã™ã‚‹`YAMLRegExpTree`ソースを使用ã—ã¦å®šç¾©ã•ã‚Œã¾ã™ã€‚ + +```sql +CREATE DICTIONARY regexp_dict +( + regexp String, + name String, + version String +) +PRIMARY KEY(regexp) +SOURCE(YAMLRegExpTree(PATH '/var/lib/clickhouse/user_files/regexp_tree.yaml')) +LAYOUT(regexp_tree) +... +``` + +ディクショナリソース`YAMLRegExpTree`ã¯æ­£è¦è¡¨ç¾ãƒ„リーã®æ§‹é€ ã‚’表ã—ã¾ã™ã€‚例ãˆã°ï¼š + +```yaml +- regexp: 'Linux/(\d+[\.\d]*).+tlinux' + name: 'TencentOS' + version: '\1' + +- regexp: '\d+/tclwebkit(?:\d+[\.\d]*)' + name: 'Android' + versions: + - regexp: '33/tclwebkit' + version: '13' + - regexp: '3[12]/tclwebkit' + version: '12' + - regexp: '30/tclwebkit' + version: '11' + - regexp: '29/tclwebkit' + version: '10' +``` + +ã“ã®è¨­å®šã¯æ­£è¦è¡¨ç¾ãƒ„リーノードã®ãƒªã‚¹ãƒˆã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚å„ノードã¯ä»¥ä¸‹ã®æ§‹é€ ã‚’æŒã¡ã¾ã™ï¼š + +- **regexp**: ノードã®æ­£è¦è¡¨ç¾ã€‚ +- **attributes**: ユーザー定義ディクショナリアトリビュートã®ãƒªã‚¹ãƒˆã€‚ã“ã®ä¾‹ã§ã¯ã€2ã¤ã®ã‚¢ãƒˆãƒªãƒ“ュート`name`ã¨`version`ãŒã‚ã‚Šã¾ã™ã€‚最åˆã®ãƒŽãƒ¼ãƒ‰ã¯ä¸¡æ–¹ã®ã‚¢ãƒˆãƒªãƒ“ュートを定義ã—ã¦ã„ã¾ã™ã€‚2番目ã®ãƒŽãƒ¼ãƒ‰ã¯ã‚¢ãƒˆãƒªãƒ“ュート`name`ã®ã¿ã‚’定義ã—ã¦ã„ã¾ã™ã€‚アトリビュート`version`ã¯2番目ã®ãƒŽãƒ¼ãƒ‰ã®å­ãƒŽãƒ¼ãƒ‰ã‹ã‚‰æä¾›ã•ã‚Œã¾ã™ã€‚ + - アトリビュートã®å€¤ã¯ã€**ãƒãƒƒã‚¯ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹**ã‚’å«ã‚€ã“ã¨ãŒã‚ã‚Šã€æ­£è¦è¡¨ç¾ã®ã‚­ãƒ£ãƒ—ãƒãƒ£ã‚°ãƒ«ãƒ¼ãƒ—ã‚’å‚ç…§ã—ã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€æœ€åˆã®ãƒŽãƒ¼ãƒ‰ã®ã‚¢ãƒˆãƒªãƒ“ュート`version`ã®å€¤ã¯ã€æ­£è¦è¡¨ç¾ã®ã‚­ãƒ£ãƒ—ãƒãƒ£ã‚°ãƒ«ãƒ¼ãƒ—`(\d+[\.\d]*)`ã¸ã®ãƒãƒƒã‚¯ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹`\1`ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ãƒãƒƒã‚¯ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ç•ªå·ã¯1ã‹ã‚‰9ã®ç¯„囲ã§ã€`$1`ã¾ãŸã¯`\1`(番å·1ã®å ´åˆï¼‰ã¨ã—ã¦æ›¸ã‹ã‚Œã¾ã™ã€‚ãƒãƒƒã‚¯ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ã¯ã‚¯ã‚¨ãƒªå®Ÿè¡Œä¸­ã®ãƒžãƒƒãƒã—ãŸã‚­ãƒ£ãƒ—ãƒãƒ£ã‚°ãƒ«ãƒ¼ãƒ—ã§ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ +- **child nodes**: æ­£è¦è¡¨ç¾ãƒ„リーノードã®å­ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒç‹¬è‡ªã®ã‚¢ãƒˆãƒªãƒ“ュートã¨ï¼ˆå¯èƒ½ãªé™ã‚Šï¼‰å­ãƒŽãƒ¼ãƒ‰ã‚’æŒã¡ã¾ã™ã€‚文字列ã®ãƒžãƒƒãƒãƒ³ã‚°ã¯æ·±ã•å„ªå…ˆã§é€²è¡Œã—ã¾ã™ã€‚ã‚‚ã—文字列ãŒæ­£è¦è¡¨ç¾ãƒŽãƒ¼ãƒ‰ã¨ä¸€è‡´ã™ã‚‹ã¨ã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã¯ãƒŽãƒ¼ãƒ‰ã®å­ãƒŽãƒ¼ãƒ‰ã¨ã‚‚一致ã™ã‚‹ã‹ç¢ºèªã—ã¾ã™ã€‚ãã®å ´åˆã€æœ€ã‚‚æ·±ãマッãƒã—ãŸãƒŽãƒ¼ãƒ‰ã®ã‚¢ãƒˆãƒªãƒ“ュートãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚å­ãƒŽãƒ¼ãƒ‰ã®ã‚¢ãƒˆãƒªãƒ“ュートã¯è¦ªãƒŽãƒ¼ãƒ‰ã®åŒåアトリビュートを上書ãã—ã¾ã™ã€‚YAMLファイル内ã®å­ãƒŽãƒ¼ãƒ‰åã¯ä»»æ„ã§ã€ä¸Šè¨˜ã®ä¾‹ã§ã¯`versions`ã¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +æ­£è¦è¡¨ç¾ãƒ„リーディクショナリã¯`dictGet`ã€`dictGetOrDefault`ã€ãŠã‚ˆã³`dictGetAll`関数を使用ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã®ã¿è¨±å¯ã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +SELECT dictGet('regexp_dict', ('name', 'version'), '31/tclwebkit1024'); +``` + +çµæžœï¼š + +```text +┌─dictGet('regexp_dict', ('name', 'version'), '31/tclwebkit1024')─┠+│ ('Android','12') │ +└─────────────────────────────────────────────────────────────────┘ +``` + +ã“ã®å ´åˆã€æœ€åˆã«ãƒˆãƒƒãƒ—レイヤーã®2番目ã®ãƒŽãƒ¼ãƒ‰ã®æ­£è¦è¡¨ç¾`\d+/tclwebkit(?:\d+[\.\d]*)`ã¨ä¸€è‡´ã—ã¾ã™ã€‚ディクショナリã¯ã•ã‚‰ã«å­ãƒŽãƒ¼ãƒ‰ã‚’調ã¹ã€æ–‡å­—列ãŒ`3[12]/tclwebkit`ã¨ä¸€è‡´ã™ã‚‹ã“ã¨ã‚‚確èªã—ã¾ã™ã€‚ãã®çµæžœã€ã‚¢ãƒˆãƒªãƒ“ュート`name`ã®å€¤ã¯`Android`(最åˆã®ãƒ¬ã‚¤ãƒ¤ãƒ¼ã§å®šç¾©ï¼‰ã§ã€ã‚¢ãƒˆãƒªãƒ“ュート`version`ã®å€¤ã¯`12`(å­ãƒŽãƒ¼ãƒ‰ã§å®šç¾©ï¼‰ã¨ãªã‚Šã¾ã™ã€‚ + +強力ãªYAML設定ファイルを使用ã™ã‚‹ã“ã¨ã§ã€æ­£è¦è¡¨ç¾ãƒ„リーディクショナリをユーザーエージェント文字列パーサーã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ç§ãŸã¡ã¯[uap-core](https://github.com/ua-parser/uap-core)をサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€æ©Ÿèƒ½ãƒ†ã‚¹ãƒˆ[02504_regexp_dictionary_ua_parser](https://github.com/ClickHouse/ClickHouse/blob/master/tests/queries/0_stateless/02504_regexp_dictionary_ua_parser.sh)ã§ãã®ä½¿ç”¨æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +#### アトリビュート値ã®åŽé›† + +時ã«ã¯ã€ãƒªãƒ¼ãƒ•ãƒŽãƒ¼ãƒ‰ã®å€¤ã ã‘ã§ãªãã€ãƒžãƒƒãƒã—ãŸè¤‡æ•°ã®æ­£è¦è¡¨ç¾ã‹ã‚‰å€¤ã‚’è¿”ã™ã“ã¨ãŒæœ‰ç›Šã§ã™ã€‚ã“ã®ã‚ˆã†ãªå ´åˆã«ã¯ã€ç‰¹æ®ŠåŒ–ã•ã‚ŒãŸ[`dictGetAll`](../../sql-reference/functions/ext-dict-functions.md#dictgetall)関数を使用ã§ãã¾ã™ã€‚ノードã«åž‹`T`ã®ã‚¢ãƒˆãƒªãƒ“ュート値ãŒã‚ã‚‹å ´åˆã€`dictGetAll`ã¯0ã¾ãŸã¯ãれ以上ã®å€¤ã‚’å«ã‚€`Array(T)`ã‚’è¿”ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ã‚­ãƒ¼ã”ã¨ã«è¿”ã•ã‚Œã‚‹ãƒžãƒƒãƒæ•°ã¯åˆ¶é™ã•ã‚Œã¾ã›ã‚“。制é™ã¯ã‚ªãƒ—ションã®ç¬¬4引数ã¨ã—ã¦`dictGetAll`ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚é…列ã¯_トãƒãƒ­ã‚¸ã‚«ãƒ«é †_ã§åŸ‹ã‚られã€å­ãƒŽãƒ¼ãƒ‰ãŒè¦ªãƒŽãƒ¼ãƒ‰ã®å‰ã«æ¥ã¦ã€å…„弟ノードã¯ã‚½ãƒ¼ã‚¹å†…ã®é †åºã«å¾“ã„ã¾ã™ã€‚ + +例: + +```sql +CREATE DICTIONARY regexp_dict +( + regexp String, + tag String, + topological_index Int64, + captured Nullable(String), + parent String +) +PRIMARY KEY(regexp) +SOURCE(YAMLRegExpTree(PATH '/var/lib/clickhouse/user_files/regexp_tree.yaml')) +LAYOUT(regexp_tree) +LIFETIME(0) +``` + +```yaml +# /var/lib/clickhouse/user_files/regexp_tree.yaml +- regexp: 'clickhouse\.com' + tag: 'ClickHouse' + topological_index: 1 + paths: + - regexp: 'clickhouse\.com/docs(.*)' + tag: 'ClickHouse Documentation' + topological_index: 0 + captured: '\1' + parent: 'ClickHouse' + +- regexp: '/docs(/|$)' + tag: 'Documentation' + topological_index: 2 + +- regexp: 'github.com' + tag: 'GitHub' + topological_index: 3 + captured: 'NULL' +``` + +```sql +CREATE TABLE urls (url String) ENGINE=MergeTree ORDER BY url; +INSERT INTO urls VALUES ('clickhouse.com'), ('clickhouse.com/docs/ja'), ('github.com/clickhouse/tree/master/docs'); +SELECT url, dictGetAll('regexp_dict', ('tag', 'topological_index', 'captured', 'parent'), url, 2) FROM urls; +``` + +çµæžœï¼š + +```text +┌─url────────────────────────────────────┬─dictGetAll('regexp_dict', ('tag', 'topological_index', 'captured', 'parent'), url, 2)─┠+│ clickhouse.com │ (['ClickHouse'],[1],[],[]) │ +│ clickhouse.com/docs/ja │ (['ClickHouse Documentation','ClickHouse'],[0,1],['/en'],['ClickHouse']) │ +│ github.com/clickhouse/tree/master/docs │ (['Documentation','GitHub'],[2,3],[NULL],[]) │ +└────────────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────────────┘ +``` + +#### マッãƒãƒ³ã‚°ãƒ¢ãƒ¼ãƒ‰ + +パターンマッãƒãƒ³ã‚°ã®å‹•ä½œã¯ç‰¹å®šã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªè¨­å®šã§å¤‰æ›´ã§ãã¾ã™ï¼š +- `regexp_dict_flag_case_insensitive`: 大文字å°æ–‡å­—を区別ã—ãªã„マッãƒãƒ³ã‚°ã‚’使用(デフォルトã¯`false`)。個々ã®è¡¨ç¾ã§`(?i)`ã¨`(?-i)`ã§ä¸Šæ›¸ãå¯èƒ½ã€‚ +- `regexp_dict_flag_dotall`: `.`を改行文字ã¨ãƒžãƒƒãƒã•ã›ã‚‹ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯`false`)。 + +### ClickHouse Cloudã§ã®æ­£è¦è¡¨ç¾ãƒ„リーディクショナリã®ä½¿ç”¨ + +上記ã®`YAMLRegExpTree`ソースã¯ClickHouseオープンソースã§ã¯å‹•ä½œã—ã¾ã™ãŒã€ClickHouse Cloudã§ã¯å‹•ä½œã—ã¾ã›ã‚“。ClickHouse Cloudã§æ­£è¦è¡¨ç¾ãƒ„リーディクショナリを使用ã™ã‚‹ã«ã¯ã€ã¾ãšãƒ­ãƒ¼ã‚«ãƒ«ã®ClickHouseオープンソースã§YAMLファイルã‹ã‚‰æ­£è¦è¡¨ç¾ãƒ„リーディクショナリを作æˆã—ã€`dictionaries`テーブル関数ã¨[INTO OUTFILE](../statements/select/into-outfile.md)å¥ã‚’使用ã—ã¦ã“ã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’CSVファイルã«ãƒ€ãƒ³ãƒ—ã—ã¾ã™ã€‚ + +```sql +SELECT * FROM dictionary(regexp_dict) INTO OUTFILE('regexp_dict.csv') +``` + +csvファイルã®å†…容ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```text +1,0,"Linux/(\d+[\.\d]*).+tlinux","['version','name']","['\\1','TencentOS']" +2,0,"(\d+)/tclwebkit(\d+[\.\d]*)","['comment','version','name']","['test $1 and $2','$1','Android']" +3,2,"33/tclwebkit","['version']","['13']" +4,2,"3[12]/tclwebkit","['version']","['12']" +5,2,"30/tclwebkit","['version']","['11']" +6,2,"29/tclwebkit","['version']","['10']" +``` + +ダンプã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚¹ã‚­ãƒ¼ãƒžã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +- `id UInt64`: RegexpTreeノードã®ID。 +- `parent_id UInt64`: ノードã®è¦ªã®ID。 +- `regexp String`: æ­£è¦è¡¨ç¾æ–‡å­—列。 +- `keys Array(String)`: ユーザー定義属性ã®åå‰ã€‚ +- `values Array(String)`: ユーザー定義属性ã®å€¤ã€‚ + +ClickHouse Cloudã§ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’作æˆã™ã‚‹ã«ã¯ã€ã¾ãšä»¥ä¸‹ã®ãƒ†ãƒ¼ãƒ–ル構造ã§`regexp_dictionary_source_table`ã¨ã„ã†ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +```sql +CREATE TABLE regexp_dictionary_source_table +( + id UInt64, + parent_id UInt64, + regexp String, + keys Array(String), + values Array(String) +) ENGINE=Memory; +``` + +ãã®å¾Œã€ãƒ­ãƒ¼ã‚«ãƒ«CSVを以下ã®ã‚³ãƒžãƒ³ãƒ‰ã§æ›´æ–°ã—ã¾ã™ï¼š + +```bash +clickhouse client \ + --host MY_HOST \ + --secure \ + --password MY_PASSWORD \ + --query " + INSERT INTO regexp_dictionary_source_table + SELECT * FROM input ('id UInt64, parent_id UInt64, regexp String, keys Array(String), values Array(String)') + FORMAT CSV" < regexp_dict.csv +``` + +ã•ã‚‰ã«è©³ã—ãã¯[ローカルファイルã®æŒ¿å…¥æ–¹æ³•](https://clickhouse.com/docs/ja/integrations/data-ingestion/insert-local-files)ã‚’ã”覧ãã ã•ã„。ソーステーブルをåˆæœŸåŒ–後ã€ãƒ†ãƒ¼ãƒ–ルソースã§æ­£è¦è¡¨ç¾ãƒ„リーを作æˆã§ãã¾ã™ï¼š + +``` sql +CREATE DICTIONARY regexp_dict +( + regexp String, + name String, + version String +PRIMARY KEY(regexp) +SOURCE(CLICKHOUSE(TABLE 'regexp_dictionary_source_table')) +LIFETIME(0) +LAYOUT(regexp_tree); +``` + +## 埋ã‚è¾¼ã¿ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒª + + + +ClickHouseã¯ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹ã‚’æ“作ã™ã‚‹ãŸã‚ã®çµ„ã¿è¾¼ã¿æ©Ÿèƒ½ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ + +ã“ã‚Œã«ã‚ˆã‚Šã€ä»¥ä¸‹ãŒå¯èƒ½ã§ã™ï¼š + +- 地域ã®IDを使用ã—ã¦ã€å¸Œæœ›ã™ã‚‹è¨€èªžã§ãã®åå‰ã‚’å–得。 +- 地域ã®IDを使用ã—ã¦ã€å¸‚ã€åœ°åŸŸã€é€£é‚¦åœ°åŒºã€å›½ã€å¤§é™¸ã®IDã‚’å–得。 +- ã‚る地域ãŒåˆ¥ã®åœ°åŸŸã®ä¸€éƒ¨ã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’確èªã€‚ +- 親地域ã®ãƒã‚§ãƒ¼ãƒ³ã‚’å–得。 + +ã™ã¹ã¦ã®é–¢æ•°ã¯ã€Œãƒˆãƒ©ãƒ³ã‚¹ãƒ­ã‚«ãƒªãƒ†ã‚£ã€ã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€åœ°åŸŸã®æ‰€æœ‰ã«é–¢ã™ã‚‹ç•°ãªã‚‹è¦–点をåŒæ™‚ã«ä½¿ç”¨ã™ã‚‹èƒ½åŠ›ãŒã‚ã‚Šã¾ã™ã€‚詳細ã¯ã€ã€Œweb analyticsディクショナリをæ“作ã™ã‚‹ãŸã‚ã®é–¢æ•°ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +内部ディクショナリã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‘ッケージã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +ãれらを有効ã«ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã§`path_to_regions_hierarchy_file`ãŠã‚ˆã³`path_to_regions_names_files`ã®ãƒ‘ラメータをコメントアウトã—ã¾ã™ã€‚ + +ジオベースã¯ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ + +`regions_hierarchy*.txt`ファイルを`path_to_regions_hierarchy_file`ディレクトリã«é…ç½®ã—ã¾ã™ã€‚ã“ã®æ§‹æˆãƒ‘ラメータã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®åœ°åŸŸéšŽå±¤ã§ã‚ã‚‹`regions_hierarchy.txt`ファイルã¸ã®ãƒ‘スをå«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã€ä»–ã®ãƒ•ã‚¡ã‚¤ãƒ«ï¼ˆ`regions_hierarchy_ua.txt`)ã¯åŒã˜ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«é…ç½®ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +`regions_names_*.txt`ファイルを`path_to_regions_names_files`ディレクトリã«é…ç½®ã—ã¾ã™ã€‚ + +ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’自分ã§ä½œæˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ファイル形å¼ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +`regions_hierarchy*.txt`: TabSeparated(ヘッダーãªã—)ã€ã‚«ãƒ©ãƒ ï¼š + +- 地域ID(`UInt32`) +- 親地域ID(`UInt32`) +- 地域タイプ(`UInt8`):1 - 大陸ã€3 - 国ã€4 - 連邦地区ã€5 - 地域ã€6 - 市; ä»–ã®ã‚¿ã‚¤ãƒ—ã«ã¯å€¤ãŒãªã„ +- 人å£ï¼ˆ`UInt32`)— オプションカラム + +`regions_names_*.txt`: TabSeparated(ヘッダーãªã—)ã€ã‚«ãƒ©ãƒ ï¼š + +- 地域ID(`UInt32`) +- 地域å(`String`)— タブや改行ã€ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚ŒãŸã‚‚ã®ã‚‚å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 + +RAMã«æ ¼ç´ã™ã‚‹ãŸã‚ã«ãƒ•ãƒ©ãƒƒãƒˆãªé…列ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®ãŸã‚ã€IDã¯100万を超ãˆãªã„よã†ã«ã™ã¹ãã§ã™ã€‚ + +ディクショナリã¯ã‚µãƒ¼ãƒãƒ¼ã‚’å†èµ·å‹•ã›ãšã«æ›´æ–°ã§ãã¾ã™ã€‚ãŸã ã—ã€åˆ©ç”¨å¯èƒ½ãªãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã®ã‚»ãƒƒãƒˆã¯æ›´æ–°ã•ã‚Œã¾ã›ã‚“。 +æ›´æ–°ã®ãŸã‚ã«ãƒ•ã‚¡ã‚¤ãƒ«ã®å¤‰æ›´æ™‚é–“ãŒãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ファイルãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã€ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªãŒæ›´æ–°ã•ã‚Œã¾ã™ã€‚ +変更ãƒã‚§ãƒƒã‚¯ã®é–“éš”ã¯`builtin_dictionaries_reload_interval`パラメータã§è¨­å®šã•ã‚Œã¾ã™ã€‚ +ディクショナリã®æ›´æ–°ï¼ˆæœ€åˆã®ä½¿ç”¨ã§ã®èª­ã¿è¾¼ã¿ã‚’除ã)ã¯ã‚¯ã‚¨ãƒªã‚’ブロックã—ã¾ã›ã‚“。更新中ã€ã‚¯ã‚¨ãƒªã¯å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’使用ã—ã¾ã™ã€‚更新中ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ã¯ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã«è¨˜éŒ²ã•ã‚Œã€ã‚¯ã‚¨ãƒªã¯å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’使用ã—ã¦ç¶šè¡Œã—ã¾ã™ã€‚ + +ジオベースを用ã„ã¦ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªã‚’定期的ã«æ›´æ–°ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚更新中ã€æ–°ã—ã„ファイルを生æˆã—ã€ãれらを別ã®å ´æ‰€ã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ã™ã¹ã¦æº–å‚™ãŒæ•´ã£ãŸã‚‰ã€ã‚µãƒ¼ãƒãƒ¼ã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã«åå‰ã‚’変更ã—ã¾ã™ã€‚ + +OS識別å­ã‚„検索エンジンã®æ“作ã®ãŸã‚ã®é–¢æ•°ã‚‚ã‚ã‚Šã¾ã™ãŒã€ä½¿ç”¨ã™ã¹ãã§ã‚ã‚Šã¾ã›ã‚“。 diff --git a/docs/ja/sql-reference/distributed-ddl.md b/docs/ja/sql-reference/distributed-ddl.md new file mode 100644 index 00000000000..cb092a8f837 --- /dev/null +++ b/docs/ja/sql-reference/distributed-ddl.md @@ -0,0 +1,23 @@ +--- +slug: /ja/sql-reference/distributed-ddl +sidebar_position: 3 +sidebar_label: 分散DDL +--- + +# 分散DDLクエリ (ON CLUSTERå¥) + +デフォルトã§ã¯ã€`CREATE`ã€`DROP`ã€`ALTER`ã€ãŠã‚ˆã³`RENAME`クエリã¯ã€ãã®å®Ÿè¡ŒãŒè¡Œã‚ã‚ŒãŸã‚µãƒ¼ãƒãƒ¼ã®ã¿ã«å½±éŸ¿ã—ã¾ã™ã€‚クラスタ設定ã§ã¯ã€`ON CLUSTER`å¥ã‚’用ã„ã¦ã€ã“れらã®ã‚¯ã‚¨ãƒªã‚’分散的ã«å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +例ãˆã°ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã¯ã€`cluster`内ã®å„ホストã«`all_hits`ã¨ã„ã†`分散テーブル`を作æˆã—ã¾ã™ã€‚ + +``` sql +CREATE TABLE IF NOT EXISTS all_hits ON CLUSTER cluster (p Date, i Int32) ENGINE = Distributed(cluster, default, hits) +``` + +ã“れらã®ã‚¯ã‚¨ãƒªã‚’æ­£ã—ã実行ã™ã‚‹ãŸã‚ã«ã¯ã€å„ホストãŒåŒã˜ã‚¯ãƒ©ã‚¹ã‚¿å®šç¾©ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆè¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®åŒæœŸã‚’簡略化ã™ã‚‹ãŸã‚ã«ZooKeeperã®ä»£æ›¿æ©Ÿèƒ½ã‚’使用ã§ãã¾ã™ï¼‰ã€‚ã¾ãŸã€ZooKeeperサーãƒãƒ¼ã¸ã®æŽ¥ç¶šã‚‚å¿…è¦ã§ã™ã€‚ + +クエリã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®å„ホストã§æœ€çµ‚çš„ã«å®Ÿè¡Œã•ã‚Œã¾ã™ãŒã€ãŸã¨ãˆä¸€éƒ¨ã®ãƒ›ã‚¹ãƒˆãŒç¾åœ¨åˆ©ç”¨å¯èƒ½ã§ãªãã¦ã‚‚ã€å¾Œã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +:::important +å˜ä¸€ãƒ›ã‚¹ãƒˆå†…ã§ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œã®é †åºã¯ä¿è¨¼ã•ã‚Œã¾ã™ã€‚ +::: diff --git a/docs/ja/sql-reference/formats.mdx b/docs/ja/sql-reference/formats.mdx new file mode 100644 index 00000000000..426075b064e --- /dev/null +++ b/docs/ja/sql-reference/formats.mdx @@ -0,0 +1,10 @@ +--- +slug: /ja/sql-reference/formats +sidebar_position: 50 +sidebar_label: 入出力フォーマット +title: 入出力データã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ +--- + +import Content from '@site/docs/ja/interfaces/formats.md'; + + diff --git a/docs/ja/sql-reference/functions/_category_.yml b/docs/ja/sql-reference/functions/_category_.yml new file mode 100644 index 00000000000..a360f1bec3b --- /dev/null +++ b/docs/ja/sql-reference/functions/_category_.yml @@ -0,0 +1,7 @@ +position: 4 +label: 'Functions' +collapsible: true +collapsed: true +link: + type: doc + id: en/sql-reference/functions/index diff --git a/docs/ja/sql-reference/functions/arithmetic-functions.md b/docs/ja/sql-reference/functions/arithmetic-functions.md new file mode 100644 index 00000000000..9afaee3725e --- /dev/null +++ b/docs/ja/sql-reference/functions/arithmetic-functions.md @@ -0,0 +1,533 @@ +--- +slug: /ja/sql-reference/functions/arithmetic-functions +sidebar_position: 5 +sidebar_label: 算術関数 +--- + +# 算術関数 + +算術関数ã¯ã€`UInt8`ã€`UInt16`ã€`UInt32`ã€`UInt64`ã€`Int8`ã€`Int16`ã€`Int32`ã€`Int64`ã€`Float32`ã€ã‚‚ã—ã㯠`Float64` åž‹ã®2ã¤ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã«å¯¾å¿œã—ã¾ã™ã€‚ + +演算を実行ã™ã‚‹å‰ã«ã€ä¸¡æ–¹ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã¯çµæžœã®åž‹ã«ã‚­ãƒ£ã‚¹ãƒˆã•ã‚Œã¾ã™ã€‚çµæžœã®åž‹ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«æ±ºå®šã•ã‚Œã¾ã™ï¼ˆä»¥ä¸‹ã®é–¢æ•°ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ç‰¹ã«æŒ‡å®šã•ã‚Œã¦ã„ãªã„é™ã‚Šï¼‰ï¼š +- 両方ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ãŒ32ビット以内ã§ã‚ã‚Œã°ã€çµæžœã®åž‹ã®ã‚µã‚¤ã‚ºã¯ã€ã‚ˆã‚Šå¤§ãã„オペランドã«ç¶šã次ã«å¤§ãã„åž‹ã®ã‚µã‚¤ã‚ºã¨ãªã‚Šã¾ã™ï¼ˆæ•´æ•°ã‚µã‚¤ã‚ºã®æ˜‡æ ¼ï¼‰ã€‚例:`UInt8 + UInt16 = UInt32` ã¾ãŸã¯ `Float32 * Float32 = Float64`。 +- オペランドã®ã†ã¡ã®1ã¤ãŒ64ビット以上ã§ã‚ã‚Œã°ã€çµæžœã®åž‹ã®ã‚µã‚¤ã‚ºã¯2ã¤ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ã†ã¡å¤§ãã„æ–¹ã®ã‚µã‚¤ã‚ºã¨åŒã˜ã«ãªã‚Šã¾ã™ã€‚例:`UInt32 + UInt128 = UInt128` ã¾ãŸã¯ `Float32 * Float64 = Float64`。 +- オペランドã®ã†ã¡1ã¤ãŒç¬¦å·ä»˜ãã®å ´åˆã€çµæžœã®åž‹ã‚‚符å·ä»˜ãã«ãªã‚Šã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã¯ç¬¦å·ä»˜ãã«ãªã‚Šã¾ã™ã€‚例:`UInt32 * Int32 = Int64`。 + +ã“れらã®ãƒ«ãƒ¼ãƒ«ã«ã‚ˆã‚Šã€ã™ã¹ã¦ã®å¯èƒ½ãªçµæžœã‚’表ç¾ã§ãる最å°ã®åž‹ãŒçµæžœã®åž‹ã¨ãªã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯å€¤ã®ç¯„囲境界付近ã§ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã®ãƒªã‚¹ã‚¯ã‚’ä¼´ã„ã¾ã™ãŒã€64ビットã®ãƒã‚¤ãƒ†ã‚£ãƒ–整数幅を使用ã—ã¦è¨ˆç®—ãŒè¿…速ã«è¡Œã‚れるã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ã“ã®æŒ™å‹•ã¯ã€æœ€å¤§æ•´æ•°åž‹ã¨ã—ã¦64ビット整数(BIGINT)をæä¾›ã™ã‚‹å¤šãã®ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã®äº’æ›æ€§ã‚‚ä¿è¨¼ã—ã¾ã™ã€‚ + +例: + +``` sql +SELECT toTypeName(0), toTypeName(0 + 0), toTypeName(0 + 0 + 0), toTypeName(0 + 0 + 0 + 0) +``` + +``` text +┌─toTypeName(0)─┬─toTypeName(plus(0, 0))─┬─toTypeName(plus(plus(0, 0), 0))─┬─toTypeName(plus(plus(plus(0, 0), 0), 0))─┠+│ UInt8 │ UInt16 │ UInt32 │ UInt64 │ +└───────────────┴────────────────────────┴─────────────────────────────────┴──────────────────────────────────────────┘ +``` + +オーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¯C++ã¨åŒæ§˜ã«ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +## plus + +2ã¤ã®å€¤ `a` 㨠`b` ã®åˆè¨ˆã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +plus(a, b) +``` + +æ•´æ•°ã¨æ—¥ä»˜ã¾ãŸã¯æ™‚間付ã日付を加算ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚å‰è€…ã®æ“作ã¯æ—¥ä»˜ã®æ—¥æ•°ã‚’増加ã•ã›ã€å¾Œè€…ã®æ“作ã¯æ™‚間付ã日付ã®ç§’数を増加ã•ã›ã¾ã™ã€‚ + +エイリアス: `a + b` (演算å­) + +## minus + +2ã¤ã®å€¤ `a` 㨠`b` ã®å·®ã‚’計算ã—ã¾ã™ã€‚çµæžœã¯å¸¸ã«ç¬¦å·ä»˜ãã§ã™ã€‚ + +`plus` ã¨åŒæ§˜ã«ã€æ•´æ•°ã‹ã‚‰æ—¥ä»˜ã¾ãŸã¯æ™‚間付ã日付を引ãã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +**構文** + +```sql +minus(a, b) +``` + +エイリアス: `a - b` (演算å­) + +## multiply + +2ã¤ã®å€¤ `a` 㨠`b` ã®ç©ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiply(a, b) +``` + +エイリアス: `a * b` (演算å­) + +## divide + +2ã¤ã®å€¤ `a` 㨠`b` ã®å•†ã‚’計算ã—ã¾ã™ã€‚çµæžœã®åž‹ã¯å¸¸ã« [Float64](../data-types/float.md) ã§ã™ã€‚整数除算㯠`intDiv` 関数ã§æä¾›ã•ã‚Œã¾ã™ã€‚ + +ゼロã§å‰²ã‚‹ã¨ `inf`ã€`-inf`ã€ã¾ãŸã¯ `nan` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +divide(a, b) +``` + +エイリアス: `a / b` (演算å­) + +## intDiv + +2ã¤ã®å€¤ `a` 㨠`b` ã®æ•´æ•°é™¤ç®—ã‚’è¡Œã„ã¾ã™ã€‚ã™ãªã‚ã¡ã€å•†ã‚’次ã«å°ã•ã„æ•´æ•°ã«åˆ‡ã‚Šä¸‹ã’ã¾ã™ã€‚ + +çµæžœã¯è¢«é™¤æ•°ï¼ˆæœ€åˆã®ãƒ‘ラメータ)ã¨åŒã˜å¹…ã§ã™ã€‚ + +ゼロã§å‰²ã‚‹ã¨ãã€å•†ãŒè¢«é™¤æ•°ã®ç¯„囲ã«åŽã¾ã‚‰ãªã„ã¨ãã€ã¾ãŸã¯æœ€å°ã®è² ã®æ•°ã‚’-1ã§å‰²ã‚‹ã¨ãã¯ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +**構文** + +```sql +intDiv(a, b) +``` + +**例** + +クエリ: + +```sql +SELECT + intDiv(toFloat64(1), 0.001) AS res, + toTypeName(res) +``` + +```response +┌──res─┬─toTypeName(intDiv(toFloat64(1), 0.001))─┠+│ 1000 │ Int64 │ +└──────┴─────────────────────────────────────────┘ +``` + +```sql +SELECT + intDiv(1, 0.001) AS res, + toTypeName(res) +``` + +```response +Received exception from server (version 23.2.1): +Code: 153. DB::Exception: Received from localhost:9000. DB::Exception: Cannot perform integer division, because it will produce infinite or too large number: While processing intDiv(1, 0.001) AS res, toTypeName(res). (ILLEGAL_DIVISION) +``` + +## intDivOrZero + +`intDiv` ã¨åŒæ§˜ã§ã™ãŒã€ã‚¼ãƒ­ã§å‰²ã‚‹å ´åˆã‚„最å°ã®è² ã®æ•°ã‚’-1ã§å‰²ã‚‹å ´åˆã¯ã‚¼ãƒ­ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +intDivOrZero(a, b) +``` + +## isFinite + +Float32 ã¾ãŸã¯ Float64 引数ãŒç„¡é™ã§ãªã NaN ã§ã‚‚ãªã„å ´åˆã«1ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€ã“ã®é–¢æ•°ã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +isFinite(x) +``` + +## isInfinite + +Float32 ã¾ãŸã¯ Float64 引数ãŒç„¡é™ã§ã‚ã‚‹å ´åˆã«1ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€ã“ã®é–¢æ•°ã¯0ã‚’è¿”ã—ã¾ã™ã€‚NaN ã«å¯¾ã—ã¦ã¯0ãŒè¿”ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +isInfinite(x) +``` + +## ifNotFinite + +浮動å°æ•°ç‚¹ã®å€¤ãŒæœ‰é™ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +**構文** + +```sql +ifNotFinite(x,y) +``` + +**引数** + +- `x` — ç„¡é™ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹å€¤ã€‚[Float\*](../data-types/float.md)。 +- `y` — フォールãƒãƒƒã‚¯å€¤ã€‚[Float\*](../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x` ãŒæœ‰é™ãªã‚‰ `x`。 +- `x` ãŒæœ‰é™ã§ãªã‘れ㰠`y`。 + +**例** + +クエリ: + + SELECT 1/0 as infimum, ifNotFinite(infimum,42) + +çµæžœï¼š + + ┌─infimum─┬─ifNotFinite(divide(1, 0), 42)─┠+ │ inf │ 42 │ + └─────────┴───────────────────────────────┘ + +åŒæ§˜ã®çµæžœã‚’[三項演算å­](../../sql-reference/functions/conditional-functions.md#ternary-operator)を使用ã—ã¦å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™: `isFinite(x) ? x : y`。 + +## isNaN + +Float32 㨠Float64 引数㌠NaN ã®å ´åˆã«1ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã«ã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +isNaN(x) +``` + +## modulo + +2ã¤ã®å€¤ `a` 㨠`b` を割ã£ãŸä½™ã‚Šã‚’計算ã—ã¾ã™ã€‚ + +両方ã®å…¥åŠ›ãŒæ•´æ•°ã§ã‚ã‚Œã°ã€çµæžœã®åž‹ã¯æ•´æ•°ã§ã™ã€‚入力ã®ç‰‡æ–¹ãŒæµ®å‹•å°æ•°ç‚¹æ•°ã§ã‚ã‚Œã°ã€çµæžœã®åž‹ã¯ [Float64](../data-types/float.md) ã§ã™ã€‚ + +余り㯠C++ ã¨åŒæ§˜ã«è¨ˆç®—ã•ã‚Œã¾ã™ã€‚è² ã®æ•°ã®å ´åˆã€åˆ‡ã‚Šæ¨ã¦é™¤ç®—ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +ゼロã§å‰²ã‚‹å ´åˆã‚„最å°ã®è² ã®æ•°ã‚’-1ã§å‰²ã‚‹å ´åˆã¯ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +**構文** + +```sql +modulo(a, b) +``` + +エイリアス: `a % b` (演算å­) + +## moduloOrZero + +[modulo](#modulo) ã¨åŒæ§˜ã§ã™ãŒã€é™¤æ•°ãŒã‚¼ãƒ­ã®å ´åˆã«ã¯ã‚¼ãƒ­ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +moduloOrZero(a, b) +``` + +## positiveModulo(a, b) + +[modulo](#modulo) ã¨åŒæ§˜ã§ã™ãŒã€å¸¸ã«éžè² ã®æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ `modulo` より4-5å€é…ããªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +positiveModulo(a, b) +``` + +エイリアス: +- `positive_modulo(a, b)` +- `pmod(a, b)` + +**例** + +クエリ: + +```sql +SELECT positiveModulo(-1, 10) +``` + +çµæžœï¼š + +```result +┌─positiveModulo(-1, 10)─┠+│ 9 │ +└────────────────────────┘ +``` + +## negate + +値 `a` ã‚’å転ã—ã¾ã™ã€‚çµæžœã¯å¸¸ã«ç¬¦å·ä»˜ãã§ã™ã€‚ + +**構文** + +```sql +negate(a) +``` + +エイリアス: `-a` + +## abs + +`a` ã®çµ¶å¯¾å€¤ã‚’計算ã—ã¾ã™ã€‚`a` ãŒç¬¦å·ãªã—åž‹ã®å ´åˆã¯ä½•ã®åŠ¹æžœã‚‚ã‚ã‚Šã¾ã›ã‚“。`a` ãŒç¬¦å·ä»˜ãåž‹ã§ã‚ã‚‹å ´åˆã€ç¬¦å·ãªã—æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +abs(a) +``` + +## gcd + +2ã¤ã®å€¤ `a` 㨠`b` ã®æœ€å¤§å…¬ç´„æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +ゼロã§å‰²ã‚‹å ´åˆã‚„最å°ã®è² ã®æ•°ã‚’-1ã§å‰²ã‚‹å ´åˆã¯ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +**構文** + +```sql +gcd(a, b) +``` + +## lcm(a, b) + +2ã¤ã®å€¤ `a` 㨠`b` ã®æœ€å°å…¬å€æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +ゼロã§å‰²ã‚‹å ´åˆã‚„最å°ã®è² ã®æ•°ã‚’-1ã§å‰²ã‚‹å ´åˆã¯ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +**構文** + +```sql +lcm(a, b) +``` + +## max2 + +2ã¤ã®å€¤ `a` 㨠`b` ã®ã†ã¡å¤§ãã„方を返ã—ã¾ã™ã€‚è¿”ã•ã‚Œã‚‹å€¤ã®åž‹ã¯ [Float64](../data-types/float.md) ã§ã™ã€‚ + +**構文** + +```sql +max2(a, b) +``` + +**例** + +クエリ: + +```sql +SELECT max2(-1, 2); +``` + +çµæžœï¼š + +```result +┌─max2(-1, 2)─┠+│ 2 │ +└─────────────┘ +``` + +## min2 + +2ã¤ã®å€¤ `a` 㨠`b` ã®ã†ã¡å°ã•ã„方を返ã—ã¾ã™ã€‚è¿”ã•ã‚Œã‚‹å€¤ã®åž‹ã¯ [Float64](../data-types/float.md) ã§ã™ã€‚ + +**構文** + +```sql +min2(a, b) +``` + +**例** + +クエリ: + +```sql +SELECT min2(-1, 2); +``` + +çµæžœï¼š + +```result +┌─min2(-1, 2)─┠+│ -1 │ +└─────────────┘ +``` + +## multiplyDecimal + +2ã¤ã®10進数 `a` 㨠`b` を掛ã‘ç®—ã—ã¾ã™ã€‚çµæžœã®å€¤ã®åž‹ã¯ [Decimal256](../data-types/decimal.md) ã§ã™ã€‚ + +çµæžœã®ã‚¹ã‚±ãƒ¼ãƒ«ã¯ `result_scale` ã«ã‚ˆã£ã¦æ˜Žç¤ºçš„ã«æŒ‡å®šã§ãã¾ã™ã€‚`result_scale` ãŒæŒ‡å®šã•ã‚Œãªã„å ´åˆã€å…¥åŠ›å€¤ã®æœ€å¤§ã‚¹ã‚±ãƒ¼ãƒ«ãŒä»®å®šã•ã‚Œã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯é€šå¸¸ã® `multiply` よりも大幅ã«é…ã„ã§ã™ã€‚çµæžœã®ç²¾åº¦ã«å¯¾ã™ã‚‹åˆ¶å¾¡ãŒå¿…è¦ãªã„å ´åˆã‚„高速ãªè¨ˆç®—ãŒæœ›ã¾ã—ã„å ´åˆã¯ã€`multiply` ã®ä½¿ç”¨ã‚’検討ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +multiplyDecimal(a, b[, result_scale]) +``` + +**引数** + +- `a` — 最åˆã®å€¤ã€‚[Decimal](../data-types/decimal.md)。 +- `b` — 2番目ã®å€¤ã€‚[Decimal](../data-types/decimal.md)。 +- `result_scale` — çµæžœã®ã‚¹ã‚±ãƒ¼ãƒ«ã€‚[Int/UInt](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 与ãˆã‚‰ã‚ŒãŸã‚¹ã‚±ãƒ¼ãƒ«ã§ã®ä¹—ç®—ã®çµæžœã€‚[Decimal256](../data-types/decimal.md)。 + +**例** + +```result +┌─multiplyDecimal(toDecimal256(-12, 0), toDecimal32(-2.1, 1), 1)─┠+│ 25.2 │ +└────────────────────────────────────────────────────────────────┘ +``` + +**通常ã®ä¹—ç®—ã«æ¯”ã¹ãŸé•ã„:** + +```sql +SELECT toDecimal64(-12.647, 3) * toDecimal32(2.1239, 4); +SELECT toDecimal64(-12.647, 3) as a, toDecimal32(2.1239, 4) as b, multiplyDecimal(a, b); +``` + +çµæžœï¼š + +```result +┌─multiply(toDecimal64(-12.647, 3), toDecimal32(2.1239, 4))─┠+│ -26.8609633 │ +└───────────────────────────────────────────────────────────┘ +┌───────a─┬──────b─┬─multiplyDecimal(toDecimal64(-12.647, 3), toDecimal32(2.1239, 4))─┠+│ -12.647 │ 2.1239 │ -26.8609 │ +└─────────┴────────┴──────────────────────────────────────────────────────────────────┘ +``` + +```sql +SELECT + toDecimal64(-12.647987876, 9) AS a, + toDecimal64(123.967645643, 9) AS b, + multiplyDecimal(a, b); + +SELECT + toDecimal64(-12.647987876, 9) AS a, + toDecimal64(123.967645643, 9) AS b, + a * b; +``` + +çµæžœï¼š + +```result +┌─────────────a─┬─────────────b─┬─multiplyDecimal(toDecimal64(-12.647987876, 9), toDecimal64(123.967645643, 9))─┠+│ -12.647987876 │ 123.967645643 │ -1567.941279108 │ +└───────────────┴───────────────┴───────────────────────────────────────────────────────────────────────────────┘ + +Received exception from server (version 22.11.1): +Code: 407. DB::Exception: Received from localhost:9000. DB::Exception: Decimal math overflow: While processing toDecimal64(-12.647987876, 9) AS a, toDecimal64(123.967645643, 9) AS b, a * b. (DECIMAL_OVERFLOW) +``` + +## divideDecimal + +2ã¤ã®10進数 `a` 㨠`b` を除算ã—ã¾ã™ã€‚çµæžœã®å€¤ã®åž‹ã¯ [Decimal256](../data-types/decimal.md) ã§ã™ã€‚ + +çµæžœã®ã‚¹ã‚±ãƒ¼ãƒ«ã¯ `result_scale` ã«ã‚ˆã£ã¦æ˜Žç¤ºçš„ã«æŒ‡å®šã§ãã¾ã™ã€‚`result_scale` ãŒæŒ‡å®šã•ã‚Œãªã„å ´åˆã€å…¥åŠ›å€¤ã®æœ€å¤§ã‚¹ã‚±ãƒ¼ãƒ«ãŒä»®å®šã•ã‚Œã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯é€šå¸¸ã® `divide` よりも大幅ã«é…ã„ã§ã™ã€‚çµæžœã®ç²¾åº¦ã«å¯¾ã™ã‚‹åˆ¶å¾¡ãŒå¿…è¦ãªã„å ´åˆã‚„高速ãªè¨ˆç®—ãŒæœ›ã¾ã—ã„å ´åˆã¯ã€`divide` ã®ä½¿ç”¨ã‚’検討ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +divideDecimal(a, b[, result_scale]) +``` + +**引数** + +- `a` — 最åˆã®å€¤ï¼š[Decimal](../data-types/decimal.md)。 +- `b` — 2番目ã®å€¤ï¼š[Decimal](../data-types/decimal.md)。 +- `result_scale` — çµæžœã®ã‚¹ã‚±ãƒ¼ãƒ«ï¼š[Int/UInt](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 与ãˆã‚‰ã‚ŒãŸã‚¹ã‚±ãƒ¼ãƒ«ã§ã®é™¤ç®—ã®çµæžœã€‚[Decimal256](../data-types/decimal.md)。 + +**例** + +```result +┌─divideDecimal(toDecimal256(-12, 0), toDecimal32(2.1, 1), 10)─┠+│ -5.7142857142 │ +└──────────────────────────────────────────────────────────────┘ +``` + +**通常ã®é™¤ç®—ã«æ¯”ã¹ãŸé•ã„:** + +```sql +SELECT toDecimal64(-12, 1) / toDecimal32(2.1, 1); +SELECT toDecimal64(-12, 1) as a, toDecimal32(2.1, 1) as b, divideDecimal(a, b, 1), divideDecimal(a, b, 5); +``` + +çµæžœï¼š + +```result +┌─divide(toDecimal64(-12, 1), toDecimal32(2.1, 1))─┠+│ -5.7 │ +└──────────────────────────────────────────────────┘ + +┌───a─┬───b─┬─divideDecimal(toDecimal64(-12, 1), toDecimal32(2.1, 1), 1)─┬─divideDecimal(toDecimal64(-12, 1), toDecimal32(2.1, 1), 5)─┠+│ -12 │ 2.1 │ -5.7 │ -5.71428 │ +└─────┴─────┴────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────┘ +``` + +```sql +SELECT toDecimal64(-12, 0) / toDecimal32(2.1, 1); +SELECT toDecimal64(-12, 0) as a, toDecimal32(2.1, 1) as b, divideDecimal(a, b, 1), divideDecimal(a, b, 5); +``` + +çµæžœï¼š + +```result +DB::Exception: Decimal result's scale is less than argument's one: While processing toDecimal64(-12, 0) / toDecimal32(2.1, 1). (ARGUMENT_OUT_OF_BOUND) + +┌───a─┬───b─┬─divideDecimal(toDecimal64(-12, 0), toDecimal32(2.1, 1), 1)─┬─divideDecimal(toDecimal64(-12, 0), toDecimal32(2.1, 1), 5)─┠+│ -12 │ 2.1 │ -5.7 │ -5.71428 │ +└─────┴─────┴────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────┘ +``` + +## byteSwap + +æ•´æ•°ã®ãƒã‚¤ãƒˆã‚’å転ã—ã¾ã™ã€‚ã™ãªã‚ã¡ã€ãã®[エンディアン](https://en.wikipedia.org/wiki/Endianness)を変更ã—ã¾ã™ã€‚ + +**構文** + +```sql +byteSwap(a) +``` + +**例** + +```sql +byteSwap(3351772109) +``` + +çµæžœï¼š + +```result +┌─byteSwap(3351772109)─┠+│ 3455829959 │ +└──────────────────────┘ +``` + +上記ã®ä¾‹ã¯æ¬¡ã®ã‚ˆã†ã«ã—ã¦å°Žã出ã›ã¾ã™ï¼š +1. 10進数ã®æ•´æ•°ã‚’ビッグエンディアン形å¼ã®16進数形å¼ã«å¤‰æ›ã—ã¾ã™ã€‚例: 3351772109 -> C7 C7 FB CD (4ãƒã‚¤ãƒˆ) +2. ãƒã‚¤ãƒˆã‚’å転ã—ã¾ã™ã€‚例: C7 C7 FB CD -> CD FB C7 C7 +3. çµæžœã‚’ビッグエンディアンを仮定ã—ã¦æ•´æ•°ã«å¤‰æ›ã—ã¾ã™ã€‚例: CD FB C7 C7 -> 3455829959 + +ã“ã®é–¢æ•°ã®ä¸€ã¤ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã¯IPv4ã®å転ã§ã™ï¼š + +```result +┌─toIPv4(byteSwap(toUInt32(toIPv4('205.251.199.199'))))─┠+│ 199.199.251.205 │ +└───────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/array-functions.md b/docs/ja/sql-reference/functions/array-functions.md new file mode 100644 index 00000000000..bc4c9bef05c --- /dev/null +++ b/docs/ja/sql-reference/functions/array-functions.md @@ -0,0 +1,3106 @@ +--- +slug: /ja/sql-reference/functions/array-functions +sidebar_position: 10 +sidebar_label: Arrays +--- + +# Array Functions + +## empty {#empty} + +入力é…列ãŒç©ºã§ã‚ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +**構文** + +``` sql +empty([x]) +``` + +é…列ã¯ã€è¦ç´ ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã«ç©ºã¨ã¿ãªã•ã‚Œã¾ã™ã€‚ + +:::note +[`optimize_functions_to_subcolumns` 設定](../../operations/settings/settings.md#optimize-functions-to-subcolumns) を有効ã«ã™ã‚‹ã“ã¨ã§æœ€é©åŒ–ã§ãã¾ã™ã€‚`optimize_functions_to_subcolumns = 1` ã®å ´åˆã€ã“ã®é–¢æ•°ã¯é…列全体ã®ã‚«ãƒ©ãƒ ã‚’読ã¿è¾¼ã‚“ã§å‡¦ç†ã™ã‚‹ã®ã§ã¯ãªãã€[size0](../data-types/array.md#array-size) サブカラムã®ã¿ã‚’読ã¿è¾¼ã¿ã¾ã™ã€‚クエリ `SELECT empty(arr) FROM TABLE;` 㯠`SELECT arr.size0 = 0 FROM TABLE;` ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ +::: + +ã“ã®é–¢æ•°ã¯ã€[文字列](string-functions.md#empty)ã‚„[UUID](uuid-functions.md#empty)ã«å¯¾ã—ã¦ã‚‚動作ã—ã¾ã™ã€‚ + +**引数** + +- `[x]` — 入力é…列。 [Array](../data-types/array.md)。 + +**戻り値** + +- 空ã®é…列ã«ã¯ `1`ã€éžç©ºã®é…列ã«ã¯ `0` ã‚’è¿”ã—ã¾ã™ã€‚ [UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT empty([]); +``` + +çµæžœ: + +```text +┌─empty(array())─┠+│ 1 │ +└────────────────┘ +``` + +## notEmpty {#notempty} + +入力é…列ãŒç©ºã§ãªã„ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +**構文** + +``` sql +notEmpty([x]) +``` + +é…列ã¯ã€å°‘ãªãã¨ã‚‚1ã¤ã®è¦ç´ ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã«ç©ºã§ãªã„ã¨ã¿ãªã•ã‚Œã¾ã™ã€‚ + +:::note +[optimize_functions_to_subcolumns](../../operations/settings/settings.md#optimize-functions-to-subcolumns) 設定を有効ã«ã™ã‚‹ã“ã¨ã§æœ€é©åŒ–ã§ãã¾ã™ã€‚`optimize_functions_to_subcolumns = 1` ã®å ´åˆã€ã“ã®é–¢æ•°ã¯é…列全体ã®ã‚«ãƒ©ãƒ ã‚’読ã¿è¾¼ã‚“ã§å‡¦ç†ã™ã‚‹ã®ã§ã¯ãªãã€[size0](../data-types/array.md#array-size) サブカラムã®ã¿ã‚’読ã¿è¾¼ã¿ã¾ã™ã€‚クエリ `SELECT notEmpty(arr) FROM table` 㯠`SELECT arr.size0 != 0 FROM TABLE;` ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ +::: + +ã“ã®é–¢æ•°ã¯ã€[文字列](string-functions.md#notempty)ã‚„[UUID](uuid-functions.md#notempty)ã«å¯¾ã—ã¦ã‚‚動作ã—ã¾ã™ã€‚ + +**引数** + +- `[x]` — 入力é…列。 [Array](../data-types/array.md)。 + +**戻り値** + +- éžç©ºã®é…列ã«ã¯ `1`ã€ç©ºã®é…列ã«ã¯ `0` ã‚’è¿”ã—ã¾ã™ã€‚ [UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT notEmpty([1,2]); +``` + +çµæžœ: + +```text +┌─notEmpty([1, 2])─┠+│ 1 │ +└──────────────────┘ +``` + +## length + +é…列ã®é …目数を返ã—ã¾ã™ã€‚ +çµæžœã®åž‹ã¯ UInt64 ã§ã™ã€‚ +文字列ã§ã‚‚動作ã—ã¾ã™ã€‚ + +`optimize_functions_to_subcolumns` 設定を有効ã«ã™ã‚‹ã¨ã€é…列全体ã®ã‚«ãƒ©ãƒ ã‚’読ã¿è¾¼ã‚“ã§å‡¦ç†ã™ã‚‹ä»£ã‚ã‚Šã«ã€[size0](../data-types/array.md#array-size) サブカラムã®ã¿ã‚’読ã¿è¾¼ã¿ã¾ã™ã€‚クエリ `SELECT length(arr) FROM table` 㯠`SELECT arr.size0 FROM TABLE` ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +エイリアス: `OCTET_LENGTH` + +## emptyArrayUInt8 + +空㮠UInt8 é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayUInt8() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayUInt8(); +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayUInt16 + +空㮠UInt16 é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayUInt16() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayUInt16(); + +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayUInt32 + +空㮠UInt32 é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayUInt32() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayUInt32(); +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayUInt64 + +空㮠UInt64 é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayUInt64() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayUInt64(); +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayInt8 + +空㮠Int8 é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayInt8() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayInt8(); +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayInt16 + +空㮠Int16 é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayInt16() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayInt16(); +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayInt32 + +空㮠Int32 é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayInt32() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayInt32(); +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayInt64 + +空㮠Int64 é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayInt64() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayInt64(); +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayFloat32 + +空㮠Float32 é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayFloat32() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayFloat32(); +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayFloat64 + +空㮠Float64 é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayFloat64() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayFloat64(); +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayDate + +空㮠Date é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayDate() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayDate(); +``` + +## emptyArrayDateTime + +空㮠DateTime é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +[] +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayDateTime(); +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayString + +空㮠String é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +emptyArrayString() +``` + +**引数** + +ãªã—。 + +**戻り値** + +空ã®é…列。 + +**例** + +クエリ: + +```sql +SELECT emptyArrayString(); +``` + +çµæžœ: + +```response +[] +``` + +## emptyArrayToSingle + +空ã®é…列をå—ã‘å–ã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¨ç­‰ã—ã„1è¦ç´ ã®é…列を返ã—ã¾ã™ã€‚ + +## range(end), range(\[start, \] end \[, step\]) + +`start`ã‹ã‚‰`end - 1`ã¾ã§ã®æ•°å€¤ã‚’`step`ã§å¢—加ã™ã‚‹é…列を返ã—ã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã‚‹åž‹ã¯[UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64](../data-types/int-uint.md)ã§ã™ã€‚ + +**構文** + +``` sql +range([start, ] end [, step]) +``` + +**引数** + +- `start` — é…列ã®æœ€åˆã®è¦ç´ ã€‚`step`を使用ã™ã‚‹å ´åˆã¯å¿…é ˆã§ã™ã€‚デフォルト値: 0。 +- `end` — é…列ãŒæ§‹ç¯‰ã•ã‚Œã‚‹å‰ã®æ•°ã€‚必須。 +- `step` — é…列内ã®å„è¦ç´ é–“ã®å¢—加ステップを決定ã™ã‚‹ã€‚オプション。デフォルト値: 1。 + +**戻り値** + +- `start`ã‹ã‚‰`end - 1`ã¾ã§ã®æ•°å€¤ã‚’`step`ã§å¢—加ã™ã‚‹é…列。 + +**実装ã®è©³ç´°** + +- ã™ã¹ã¦ã®å¼•æ•°`start`ã€`end`ã€`step`ã¯ä»¥ä¸‹ã®ãƒ‡ãƒ¼ã‚¿åž‹ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“: `UInt8`, `UInt16`, `UInt32`, `UInt64`,`Int8`, `Int16`, `Int32`, `Int64`。返ã•ã‚Œã‚‹é…列ã®è¦ç´ ã®åž‹ã¯ã™ã¹ã¦ã®å¼•æ•°ã®ã‚¹ãƒ¼ãƒ‘ー型ã§ã™ã€‚ +- クエリãŒ[function_range_max_elements_in_block](../../operations/settings/settings.md#function_range_max_elements_in_block)設定ã§æŒ‡å®šã•ã‚ŒãŸä»¥ä¸Šã®è¦ç´ æ•°ã®é…列を返ã™å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ +- ä»»æ„ã®å¼•æ•°ãŒNullable(Nothing)åž‹ã®å ´åˆã€`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ä»»æ„ã®å¼•æ•°ãŒNull値をæŒã¤å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™(Nullable(T)åž‹)。 + +**例** + +クエリ: + +``` sql +SELECT range(5), range(1, 5), range(1, 5, 2), range(-1, 5, 2); +``` + +çµæžœ: + +```txt +┌─range(5)────┬─range(1, 5)─┬─range(1, 5, 2)─┬─range(-1, 5, 2)─┠+│ [0,1,2,3,4] │ [1,2,3,4] │ [1,3] │ [-1,1,3] │ +└─────────────┴─────────────┴────────────────┴─────────────────┘ +``` + +## array(x1, ...), operator \[x1, ...\] + +関数ã®å¼•æ•°ã‹ã‚‰é…列を作æˆã—ã¾ã™ã€‚ +引数ã¯å®šæ•°ã§ã‚ã‚Šã€ã™ã¹ã¦ã®å…±é€šã®åž‹ã‚’æŒã¤ã‚¿ã‚¤ãƒ—ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ã©ã®ã‚¿ã‚¤ãƒ—ã®é…列を作æˆã™ã¹ãã‹ä¸æ˜ŽãªãŸã‚ã€å°‘ãªãã¨ã‚‚1ã¤ã®å¼•æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¤ã¾ã‚Šã€ã“ã®é–¢æ•°ã‚’使用ã—ã¦ç©ºã®é…列を作æˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“(上記ã§èª¬æ˜Žã•ã‚ŒãŸ 'emptyArray\*' 関数を使用ã—ã¦ãã ã•ã„)。 +‘Array(T)’ åž‹ã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ã“ã“㧠‘T’ ã¯æ¸¡ã•ã‚ŒãŸå¼•æ•°ã®æœ€å°å…±é€šåž‹ã§ã™ã€‚ + +## arrayWithConstant(length, elem) + +é•·ã• `length` ã®é…列を生æˆã—ã€å®šæ•° `elem` ã§æº€ãŸã—ã¾ã™ã€‚ + +## arrayConcat + +引数ã¨ã—ã¦æ¸¡ã•ã‚ŒãŸé…列をçµåˆã—ã¾ã™ã€‚ + +``` sql +arrayConcat(arrays) +``` + +**引数** + +- `arrays` – ä»»æ„ã®æ•°ã® [Array](../data-types/array.md) åž‹ã®å¼•æ•°ã€‚ + +**例** + +``` sql +SELECT arrayConcat([1, 2], [3, 4], [5, 6]) AS res +``` + +``` text +┌─res───────────┠+│ [1,2,3,4,5,6] │ +└───────────────┘ +``` + +## arrayElement(arr, n), operator arr\[n\] + +é…列 `arr` ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `n` ã®è¦ç´ ã‚’å–å¾—ã—ã¾ã™ã€‚`n` ã¯ä»»æ„ã®æ•´æ•°åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +é…列ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯1ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ + +è² ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®å ´åˆã€é…列ã®æœ«å°¾ã‹ã‚‰å¯¾å¿œã™ã‚‹è¦ç´ ã‚’é¸æŠžã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€`arr[-1]` ã¯é…列ã®æœ€å¾Œã®é …ç›®ã§ã™ã€‚ + +インデックスãŒé…列ã®ç¯„囲外ã«ãªã‚‹å ´åˆã€éžå®šæ•°é…列ã¨å®šæ•°ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹0ã®å ´åˆã‚’除ã„ã¦ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼ˆæ•°å€¤ã®å ´åˆã¯0ã€æ–‡å­—列ã®å ´åˆã¯ç©ºæ–‡å­—列ãªã©ï¼‰ãŒè¿”ã•ã‚Œã¾ã™ï¼ˆã“ã®å ´åˆã€ã€ŒArray indices are 1-basedã€ã¨ã„ã†ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ï¼‰ã€‚ + +## has(arr, elem) + +`arr` é…列㌠`elem` è¦ç´ ã‚’æŒã£ã¦ã„ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ +é…列ã«è¦ç´ ãŒãªã„å ´åˆã¯0ã€ã‚ã‚‹å ´åˆã¯1ã‚’è¿”ã—ã¾ã™ã€‚ + +`NULL`ã¯å€¤ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +``` sql +SELECT has([1, 2, NULL], NULL) +``` + +``` text +┌─has([1, 2, NULL], NULL)─┠+│ 1 │ +└─────────────────────────┘ +``` + +## arrayElementOrNull(arr, n) + +é…列 `arr` ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `n` ã®è¦ç´ ã‚’å–å¾—ã—ã¾ã™ã€‚`n` ã¯ä»»æ„ã®æ•´æ•°åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +é…列ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯1ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ + +è² ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€ã“ã®å ´åˆã€é…列ã®æœ«å°¾ã‹ã‚‰å¯¾å¿œã™ã‚‹è¦ç´ ã‚’é¸æŠžã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€`arr[-1]` ã¯é…列ã®æœ€å¾Œã®é …ç›®ã§ã™ã€‚ + +インデックスãŒé…列ã®ç¯„囲外ã«ãªã‚‹å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã®ä»£ã‚ã‚Šã« `NULL` ã‚’è¿”ã—ã¾ã™ã€‚ + +### 例 + +``` sql +SELECT arrayElementOrNull([1, 2, 3], 2), arrayElementOrNull([1, 2, 3], 4) +``` + +``` text + ┌─arrayElementOrNull([1, 2, 3], 2)─┬─arrayElementOrNull([1, 2, 3], 4)─┠+ │ 2 │ á´ºáµá´¸á´¸ │ + └──────────────────────────────────┴──────────────────────────────────┘ +``` + +## hasAll {#hasall} + +ã‚ã‚‹é…列ãŒåˆ¥ã®é…列ã®éƒ¨åˆ†é›†åˆã§ã‚ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +``` sql +hasAll(set, subset) +``` + +**引数** + +- `set` – è¦ç´ ã®ã‚»ãƒƒãƒˆã‚’æŒã¤ä»»æ„ã®ã‚¿ã‚¤ãƒ—ã®é…列。 +- `subset` – `set`ã¨ã®å…±é€šã‚¹ãƒ¼ãƒ‘ータイプを共有ã™ã‚‹è¦ç´ ã‚’æŒã¤ä»»æ„ã®ã‚¿ã‚¤ãƒ—ã®é…列ã§ã€`set` ã®éƒ¨åˆ†é›†åˆã§ã‚ã‚‹ã“ã¨ãŒãƒ†ã‚¹ãƒˆã•ã‚Œã‚‹ã¹ãè¦ç´ ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ + +**戻り値** + +- `subset` ã®ã™ã¹ã¦ã®è¦ç´ ãŒ `set` ã«å«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã¯`1`ã‚’è¿”ã—ã¾ã™ã€‚ +- ãれ以外ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +集åˆã¨éƒ¨åˆ†é›†åˆã®è¦ç´ ãŒå…±é€šã‚¹ãƒ¼ãƒ‘ータイプをæŒãŸãªã„å ´åˆã€ä¾‹å¤– `NO_COMMON_TYPE` ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +**特殊特性** + +- 空ã®é…列ã¯ä»»æ„ã®é…列ã®éƒ¨åˆ†é›†åˆã§ã™ã€‚ +- `Null`ã¯å€¤ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚ +- 両方ã®é…列ã«ãŠã‘る値ã®é †åºã¯é–¢ä¿‚ã‚ã‚Šã¾ã›ã‚“。 + +**例** + +`SELECT hasAll([], [])` ã¯1ã‚’è¿”ã—ã¾ã™ã€‚ + +`SELECT hasAll([1, Null], [Null])` ã¯1ã‚’è¿”ã—ã¾ã™ã€‚ + +`SELECT hasAll([1.0, 2, 3, 4], [1, 3])` ã¯1ã‚’è¿”ã—ã¾ã™ã€‚ + +`SELECT hasAll(['a', 'b'], ['a'])` ã¯1ã‚’è¿”ã—ã¾ã™ã€‚ + +`SELECT hasAll([1], ['a'])` ã¯`NO_COMMON_TYPE`例外を発生ã•ã›ã¾ã™ã€‚ + +`SELECT hasAll([[1, 2], [3, 4]], [[1, 2], [3, 5]])` ã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +## hasAny {#hasany} + +2ã¤ã®é…列ãŒã„ãã¤ã‹ã®è¦ç´ ã§äº¤å·®ã—ã¦ã„ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +``` sql +hasAny(array1, array2) +``` + +**引数** + +- `array1` – è¦ç´ ã®ã‚»ãƒƒãƒˆã‚’æŒã¤ä»»æ„ã®ã‚¿ã‚¤ãƒ—ã®é…列。 +- `array2` – `array1`ã¨ã®å…±é€šã‚¹ãƒ¼ãƒ‘ータイプを共有ã™ã‚‹ä»»æ„ã®ã‚¿ã‚¤ãƒ—ã®é…列。 + +**戻り値** + +- `array1` 㨠`array2` ã®é–“ã«å°‘ãªãã¨ã‚‚一ã¤ã®å…±é€šè¦ç´ ãŒã‚ã‚‹å ´åˆã€`1`ã‚’è¿”ã—ã¾ã™ã€‚ +- ãれ以外ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +`array1` 㨠`array2` ã®è¦ç´ ãŒå…±é€šã‚¹ãƒ¼ãƒ‘ータイプを共有ã—ãªã„å ´åˆã€ä¾‹å¤– `NO_COMMON_TYPE` ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +**特殊特性** + +- `Null`ã¯å€¤ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚ +- 両方ã®é…列ã«ãŠã‘る値ã®é †åºã¯é–¢ä¿‚ã‚ã‚Šã¾ã›ã‚“。 + +**例** + +`SELECT hasAny([1], [])` 㯠`0` ã‚’è¿”ã—ã¾ã™ã€‚ + +`SELECT hasAny([Null], [Null, 1])` 㯠`1` ã‚’è¿”ã—ã¾ã™ã€‚ + +`SELECT hasAny([-128, 1., 512], [1])` 㯠`1` ã‚’è¿”ã—ã¾ã™ã€‚ + +`SELECT hasAny([[1, 2], [3, 4]], ['a', 'c'])` 㯠`NO_COMMON_TYPE` 例外を発生ã•ã›ã¾ã™ã€‚ + +`SELECT hasAll([[1, 2], [3, 4]], [[1, 2], [1, 2]])` 㯠`1` ã‚’è¿”ã—ã¾ã™ã€‚ + +## hasSubstr + +array2 ã®å…¨è¦ç´ ãŒ array1 ã«åŒã˜é †åºã§ç¾ã‚Œã‚‹ã‹ã‚’確èªã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€é–¢æ•°ã¯ã€ã‹ã¤ `array1 = prefix + array2 + suffix` ã§ã‚ã‚‹å ´åˆã«ã®ã¿ 1 ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +hasSubstr(array1, array2) +``` + +言ã„æ›ãˆã‚Œã°ã€é–¢æ•°ã¯`array2`ã®ã™ã¹ã¦ã®è¦ç´ ãŒ`array1`ã«å«ã¾ã‚Œã¦ã„ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ã“ã®å ´åˆã€`hasAll` 関数ã®ã‚ˆã†ã«ã€`array1` 㨠`array2` ã®ä¸¡æ–¹ã«ãŠã‘ã‚‹è¦ç´ ã¯åŒã˜é †åºã«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +例: + +- `hasSubstr([1,2,3,4], [2,3])` ã¯1ã‚’è¿”ã—ã¾ã™ãŒã€`hasSubstr([1,2,3,4], [3,2])` ã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ +- `hasSubstr([1,2,3,4], [1,2,3])` ã¯1ã‚’è¿”ã—ã¾ã™ãŒã€`hasSubstr([1,2,3,4], [1,2,4])` ã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**引数** + +- `array1` – è¦ç´ ã®ã‚»ãƒƒãƒˆã‚’æŒã¤ä»»æ„ã®ã‚¿ã‚¤ãƒ—ã®é…列。 +- `array2` – ä»»æ„ã®ã‚¿ã‚¤ãƒ—ã®é…列。 + +**戻り値** + +- `array1` ㌠`array2` ã‚’å«ã‚€å ´åˆã€`1`ã‚’è¿”ã—ã¾ã™ã€‚ +- ãれ以外ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +`array1` 㨠`array2` ã®è¦ç´ ãŒå…±é€šã‚¹ãƒ¼ãƒ‘ータイプを共有ã—ãªã„å ´åˆã€ä¾‹å¤– `NO_COMMON_TYPE` ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +**特殊特性** + +- 関数㯠`array2` ãŒç©ºã®å ´åˆã€`1` ã‚’è¿”ã—ã¾ã™ã€‚ +- `Null`ã¯å€¤ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€`hasSubstr([1, 2, NULL, 3, 4], [2,3])` 㯠`0` ã‚’è¿”ã—ã¾ã™ãŒã€`hasSubstr([1, 2, NULL, 3, 4], [2,NULL,3])` 㯠`1` ã‚’è¿”ã—ã¾ã™ã€‚ +- 両é…列ã®å€¤ã®é †åºã¯é‡è¦ã§ã™ã€‚ + +**例** + +`SELECT hasSubstr([], [])` returns 1. + +`SELECT hasSubstr([1, Null], [Null])` returns 1. + +`SELECT hasSubstr([1.0, 2, 3, 4], [1, 3])` returns 0. + +`SELECT hasSubstr(['a', 'b'], ['a'])` returns 1. + +`SELECT hasSubstr(['a', 'b' , 'c'], ['a', 'b'])` returns 1. + +`SELECT hasSubstr(['a', 'b' , 'c'], ['a', 'c'])` returns 0. + +`SELECT hasSubstr([[1, 2], [3, 4], [5, 6]], [[1, 2], [3, 4]])` returns 1. + +`SELECT hasSubstr([1, 2, NULL, 3, 4], ['a'])` raises a `NO_COMMON_TYPE` exception. + + +## indexOf(arr, x) + +é…列ã«'x'è¦ç´ ãŒå«ã¾ã‚Œã‚‹å ´åˆã€ãã®æœ€åˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’è¿”ã—ã€ãã†ã§ãªã„å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +例: + +``` sql +SELECT indexOf([1, 3, NULL, NULL], NULL) +``` + +``` text +┌─indexOf([1, 3, NULL, NULL], NULL)─┠+│ 3 │ +└───────────────────────────────────┘ +``` + +`NULL` ã«è¨­å®šã•ã‚ŒãŸè¦ç´ ã¯é€šå¸¸ã®å€¤ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ + +## arrayCount(\[func,\] arr1, ...) + +`func(arr1[i], ..., arrN[i])`ãŒ0以外ã®å€¤ã‚’è¿”ã™è¦ç´ ã®æ•°ã‚’è¿”ã—ã¾ã™ã€‚`func` ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€é…列内ã®0以外ã®è¦ç´ ã®æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +`arrayCount`ã¯[高次関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã™ã€‚最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## arrayDotProduct + +2ã¤ã®é…列ã®ãƒ‰ãƒƒãƒˆç©ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +arrayDotProduct(vector1, vector2) +``` + +エイリアス: `scalarProduct`, `dotProduct` + +**パラメータ** + +- `vector1`: 最åˆã®ãƒ™ã‚¯ãƒˆãƒ«ã€‚ [Array](../data-types/array.md) ã¾ãŸã¯ [Tuple](../data-types/tuple.md) ã®æ•°å€¤å€¤ã€‚ +- `vector2`: 二番目ã®ãƒ™ã‚¯ãƒˆãƒ«ã€‚[Array](../data-types/array.md) ã¾ãŸã¯ [Tuple](../data-types/tuple.md) ã®æ•°å€¤å€¤ã€‚ + +:::note +2ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«ã®ã‚µã‚¤ã‚ºã¯ç­‰ã—ããªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。é…列ã¨ã‚¿ãƒ—ルã¯æ··åœ¨ã—ãŸè¦ç´ ã‚¿ã‚¤ãƒ—ã‚’å«ã‚“ã§ã„ã‚‹ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ã€‚ +::: + +**戻り値** + +- 2ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«ã®ãƒ‰ãƒƒãƒˆç©ã€‚ [Numeric](https://clickhouse.com/docs/ja/native-protocol/columns#numeric-types)。 + +:::note +戻りã®åž‹ã¯å¼•æ•°ã®åž‹ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚é…列ã¾ãŸã¯ã‚¿ãƒ—ルãŒæ··åœ¨ã—ãŸè¦ç´ ã‚¿ã‚¤ãƒ—ã‚’å«ã‚€å ´åˆã€çµæžœã®åž‹ã¯ã‚¹ãƒ¼ãƒ‘ータイプã§ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT arrayDotProduct([1, 2, 3], [4, 5, 6]) AS res, toTypeName(res); +``` + +çµæžœ: + +```response +32 UInt16 +``` + +クエリ: + +```sql +SELECT dotProduct((1::UInt16, 2::UInt8, 3::Float32),(4::Int16, 5::Float32, 6::UInt8)) AS res, toTypeName(res); +``` + +çµæžœ: + +```response +32 Float64 +``` + +## countEqual(arr, x) + +é…列内ã®xã¨ç­‰ã—ã„è¦ç´ ã®æ•°ã‚’è¿”ã—ã¾ã™ã€‚`arrayCount (elem -> elem = x, arr)`ã¨ç­‰ä¾¡ã§ã™ã€‚ + +`NULL`è¦ç´ ã¯åˆ¥ã®å€¤ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ + +例: + +``` sql +SELECT countEqual([1, 2, NULL, NULL], NULL) +``` + +``` text +┌─countEqual([1, 2, NULL, NULL], NULL)─┠+│ 2 │ +└──────────────────────────────────────┘ +``` + +## arrayEnumerate(arr) + +é…列\[1, 2, 3, ..., length (arr)\]ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯é€šå¸¸ã€ARRAY JOIN ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ãれ㯠ARRAY JOIN ã‚’é©ç”¨ã—ãŸå¾Œã«å„é…列ã«å¯¾ã—ã¦ã¡ã‚‡ã†ã©ä¸€åº¦ä½•ã‹ã‚’カウントã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚例: + +``` sql +SELECT + count() AS Reaches, + countIf(num = 1) AS Hits +FROM test.hits +ARRAY JOIN + GoalsReached, + arrayEnumerate(GoalsReached) AS num +WHERE CounterID = 160656 +LIMIT 10 +``` + +``` text +┌─Reaches─┬──Hits─┠+│ 95606 │ 31406 │ +└─────────┴───────┘ +``` + +ã“ã®ä¾‹ã§ã¯ã€Reaches ã¯ã‚³ãƒ³ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®æ•°ï¼ˆARRAY JOIN ã‚’é©ç”¨ã—ãŸå¾Œã«å—ã‘å–ã£ãŸæ–‡å­—列)ã€Hits ã¯ãƒšãƒ¼ã‚¸ãƒ“ューã®æ•°ï¼ˆARRAY JOIN ã®å‰ã®æ–‡å­—列)ã§ã™ã€‚ã“ã®ç‰¹å®šã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€æ¬¡ã®ç°¡å˜ãªæ–¹æ³•ã§åŒã˜çµæžœã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +``` sql +SELECT + sum(length(GoalsReached)) AS Reaches, + count() AS Hits +FROM test.hits +WHERE (CounterID = 160656) AND notEmpty(GoalsReached) +``` + +``` text +┌─Reaches─┬──Hits─┠+│ 95606 │ 31406 │ +└─────────┴───────┘ +``` + +ã“ã®é–¢æ•°ã¯é«˜æ¬¡é–¢æ•°ã§ã‚‚使用ã§ãã¾ã™ã€‚例ãˆã°ã€æ¡ä»¶ã«ä¸€è‡´ã™ã‚‹è¦ç´ ã®é…列インデックスをå–å¾—ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +## arrayEnumerateUniq(arr, ...) + +ソースé…列ã¨åŒã˜ã‚µã‚¤ã‚ºã®é…列を返ã—ã€å„è¦ç´ ãŒãã®å€¤ã¨åŒã˜åˆ¥ã®è¦ç´ ã®ä¸­ã§åˆã‚ã¦å‡ºç¾ã™ã‚‹ä½ç½®ã‚’示ã—ã¾ã™ã€‚ +例: arrayEnumerateUniq([10, 20, 10, 30]) = [1, 1, 2, 1]。 + +ã“ã®é–¢æ•°ã¯ ARRAY JOIN ã§ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã¨é…列è¦ç´ ã®ã•ã‚‰ãªã‚‹é›†ç´„ã‚’è¡Œã†éš›ã«å½¹ç«‹ã¡ã¾ã™ã€‚ +例: + +``` sql +SELECT + Goals.ID AS GoalID, + sum(Sign) AS Reaches, + sumIf(Sign, num = 1) AS Visits +FROM test.visits +ARRAY JOIN + Goals, + arrayEnumerateUniq(Goals.ID) AS num +WHERE CounterID = 160656 +GROUP BY GoalID +ORDER BY Reaches DESC +LIMIT 10 +``` + +``` text +┌──GoalID─┬─Reaches─┬─Visits─┠+│ 53225 │ 3214 │ 1097 │ +│ 2825062 │ 3188 │ 1097 │ +│ 56600 │ 2803 │ 488 │ +│ 1989037 │ 2401 │ 365 │ +│ 2830064 │ 2396 │ 910 │ +│ 1113562 │ 2372 │ 373 │ +│ 3270895 │ 2262 │ 812 │ +│ 1084657 │ 2262 │ 345 │ +│ 56599 │ 2260 │ 799 │ +│ 3271094 │ 2256 │ 812 │ +└─────────┴─────────┴────────┘ +``` + +ã“ã®ä¾‹ã§ã¯ã€å„ゴールIDã«ã¤ã„ã¦ã€ã‚³ãƒ³ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®æ•°ï¼ˆãƒã‚¹ãƒˆã•ã‚ŒãŸGoalsデータ構造中ã®å„è¦ç´ ãŒåˆ°é”ã—ãŸã‚´ãƒ¼ãƒ«ã§ã‚ã‚‹ã“ã¨ã‚’示ã™ï¼‰ã€ãŠã‚ˆã³ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æ•°ãŒè¨ˆç®—ã•ã‚Œã¦ã„ã¾ã™ã€‚ARRAY JOIN を使用ã—ãªã„å ´åˆã€sum(Sign) ã¨ã—ã¦ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æ•°ã‚’æ•°ãˆã¾ã™ã€‚ã—ã‹ã—ã€ã“ã®ç‰¹å®šã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ãƒã‚¹ãƒˆã•ã‚ŒãŸ Goals 構造ã«ã‚ˆã£ã¦è¡ŒãŒå¢—å¹…ã•ã‚Œã€ã“れをカウント後ã«ä¸€åº¦è¡Œã†ãŸã‚ã«ã€é–¢æ•° arrayEnumerateUniq(Goals.ID) ã®å€¤ã«æ¡ä»¶ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +The arrayEnumerateUniq function can take multiple arrays of the same size as arguments. In this case, uniqueness is considered for tuples of elements in the same positions in all the arrays. + +``` sql +SELECT arrayEnumerateUniq([1, 1, 1, 2, 2, 2], [1, 1, 2, 1, 1, 2]) AS res +``` + +``` text +┌─res───────────┠+│ [1,2,1,1,2,1] │ +└───────────────┘ +``` + +This is necessary when using ARRAY JOIN with a nested data structure and further aggregation across multiple elements in this structure. + +## arrayEnumerateUniqRanked + +ソースé…列ã¨åŒã˜ã‚µã‚¤ã‚ºã®é…列を返ã—ã€å„è¦ç´ ã®åˆã‚ã¦ã®å‡ºç¾ã‚’è¦ç´ ã®å€¤ã¨åŒã˜ä½ç½®ã®è¦ç´ ã«ãŠã„ã¦ç¤ºã—ã¾ã™ã€‚多次元é…列を列挙ã—ã€é…列ã®ã©ã®æ·±ã•ã¾ã§è¦‹ã¦ã„ãã‹ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +```sql +arrayEnumerateUniqRanked(clear_depth, arr, max_array_depth) +``` + +**パラメータ** + +- `clear_depth`: 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã§è¦ç´ ã‚’個別ã«åˆ—挙ã—ã¾ã™ã€‚`max_arr_depth` 以下ã®æ­£ã®æ•´æ•°ã€‚ +- `arr`: 列挙ã•ã‚Œã‚‹ N 次元é…列。[Array](../data-types/array.md)。 +- `max_array_depth`: 有効ãªæœ€å¤§æ·±åº¦ã€‚`arr` ã®æ·±ã•ä»¥ä¸‹ã®æ­£ã®æ•´æ•°ã€‚ + +**例** + +`clear_depth=1`ãŠã‚ˆã³`max_array_depth=1`ã§ã¯ã€`arrayEnumerateUniq`ã§åŒã˜é…列を指定ã—ãŸå ´åˆã¨åŒã˜çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT arrayEnumerateUniqRanked(1, [1,2,1], 1); +``` + +çµæžœ: + +``` text +[1,1,2] +``` + +ã“ã®ä¾‹ã§ã¯ã€`arrayEnumerateUniqRanked`を使用ã—ã¦ã€å¤šæ¬¡å…ƒé…列ã®å„è¦ç´ ãŒåŒã˜å€¤ã‚’æŒã¤è¦ç´ ã®ä¸­ã§æœ€åˆã«å‡ºç¾ã™ã‚‹ä½ç½®ã‚’示ã™é…列をå–å¾—ã—ã¾ã™ã€‚æä¾›ã•ã‚ŒãŸé…列ã®1行目`[1,2,3]`ã«å¯¾ã—ã¦ã€å¯¾å¿œã™ã‚‹çµæžœã¯`[1,1,1]`ã§ã€ã“ã‚Œã¯`1`,`2`, `3`ãŒåˆã‚ã¦ç™ºè¦‹ã•ã‚ŒãŸã“ã¨ã‚’示ã—ã¾ã™ã€‚æä¾›ã•ã‚ŒãŸé…列ã®2行目`[2,2,1]`ã«å¯¾ã—ã¦ã€çµæžœã®å¯¾å¿œã™ã‚‹çµæžœã¯`[2,3,3]`ã§ã€`2`ãŒäºŒåº¦ç›®ã¨ä¸‰åº¦ç›®ã«å‡ºç¾ã—ãŸã“ã¨ã€`1` ãŒäºŒåº¦ç›®ã«å‡ºç¾ã—ãŸã“ã¨ã‚’示ã—ã¾ã™ã€‚åŒæ§˜ã«ã€æä¾›ã•ã‚ŒãŸé…列ã®ä¸‰è¡Œç›® `[3]` ã«å¯¾ã™ã‚‹çµæžœã¯ `[2]` ã¨ã„ã†çµæžœãŒç¶šãã¾ã™ã€‚ãれ㯠`3` ãŒäºŒåº¦ç›®ã«å‡ºç¾ã—ãŸã“ã¨ã‚’示ã—ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT arrayEnumerateUniqRanked(1, [[1,2,3],[2,2,1],[3]], 2); +``` + +çµæžœ: + +``` text +[[1,1,1],[2,3,2],[2]] +``` + +`clear_depth=2`ã«å¤‰æ›´ã™ã‚‹ã¨ã€å„è¡ŒãŒåˆ¥ã€…ã«åˆ—挙ã•ã‚Œã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT arrayEnumerateUniqRanked(2, [[1,2,3],[2,2,1],[3]], 2); +``` + +çµæžœ: + +``` text +[[1,1,1],[1,2,1],[1]] +``` + +## arrayPopBack + +é…列ã‹ã‚‰æœ€å¾Œã®é …目を削除ã—ã¾ã™ã€‚ + +``` sql +arrayPopBack(array) +``` + +**引数** + +- `array` – é…列。 + +**例** + +``` sql +SELECT arrayPopBack([1, 2, 3]) AS res; +``` + +``` text +┌─res───┠+│ [1,2] │ +└───────┘ +``` + +## arrayPopFront + +é…列ã‹ã‚‰æœ€åˆã®é …目を削除ã—ã¾ã™ã€‚ + +``` sql +arrayPopFront(array) +``` + +**引数** + +- `array` – é…列。 + +**例** + +``` sql +SELECT arrayPopFront([1, 2, 3]) AS res; +``` + +``` text +┌─res───┠+│ [2,3] │ +└───────┘ +``` + +## arrayPushBack + +é…列ã®æœ«å°¾ã«1ã¤ã®é …目を追加ã—ã¾ã™ã€‚ + +``` sql +arrayPushBack(array, single_value) +``` + +**引数** + +- `array` – é…列。 +- `single_value` – 一ã¤ã®å€¤ã€‚é…列ã«æ•°å€¤ãŒã‚ã‚‹å ´åˆã¯æ•°å€¤ã®ã¿ã€æ–‡å­—列ãŒã‚ã‚‹å ´åˆã¯æ–‡å­—列ã®ã¿ã‚’追加ã§ãã¾ã™ã€‚数値を追加ã™ã‚‹éš›ã€ClickHouseã¯è‡ªå‹•çš„ã«`single_value`ã®åž‹ã‚’é…列ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«è¨­å®šã—ã¾ã™ã€‚ClickHouseã«ãŠã‘るデータ型ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€"[データ型](../data-types/index.md#data_types)"ã‚’å‚ç…§ã—ã¦ãã ã•ã„。`NULL` を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®é–¢æ•°ã¯é…列ã«`NULL`è¦ç´ ã‚’追加ã—ã€é…列è¦ç´ ã®åž‹ã‚’`Nullable`ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT arrayPushBack(['a'], 'b') AS res; +``` + +``` text +┌─res───────┠+│ ['a','b'] │ +└───────────┘ +``` + +## arrayPushFront + +é…列ã®å…ˆé ­ã«1ã¤ã®è¦ç´ ã‚’追加ã—ã¾ã™ã€‚ + +``` sql +arrayPushFront(array, single_value) +``` + +**引数** + +- `array` – é…列。 +- `single_value` – 一ã¤ã®å€¤ã€‚é…列ã«æ•°å€¤ãŒã‚ã‚‹å ´åˆã¯æ•°å€¤ã®ã¿ã€æ–‡å­—列ãŒã‚ã‚‹å ´åˆã¯æ–‡å­—列ã®ã¿ã‚’追加ã§ãã¾ã™ã€‚数値を追加ã™ã‚‹éš›ã€ClickHouseã¯è‡ªå‹•çš„ã«`single_value`ã®åž‹ã‚’é…列ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«è¨­å®šã—ã¾ã™ã€‚ClickHouseã«ãŠã‘るデータ型ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€"[データ型](../data-types/index.md#data_types)"ã‚’å‚ç…§ã—ã¦ãã ã•ã„。`NULL` を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®é–¢æ•°ã¯é…列ã«`NULL`è¦ç´ ã‚’追加ã—ã€é…列è¦ç´ ã®åž‹ã‚’`Nullable`ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT arrayPushFront(['b'], 'a') AS res; +``` + +``` text +┌─res───────┠+│ ['a','b'] │ +└───────────┘ +``` + +## arrayResize + +é…列ã®é•·ã•ã‚’変更ã—ã¾ã™ã€‚ + +``` sql +arrayResize(array, size[, extender]) +``` + +**引数:** + +- `array` — é…列。 +- `size` — é…列ã®å¿…è¦ãªé•·ã•ã€‚ + - `size` ãŒå…ƒã®é…列ã®ã‚µã‚¤ã‚ºã‚ˆã‚Šå°ã•ã„å ´åˆã€é…列ã¯å³ã‹ã‚‰åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ã€‚ +- `size` ãŒé…列ã®åˆæœŸã‚µã‚¤ã‚ºã‚ˆã‚Šå¤§ãã„å ´åˆã€é…列ã¯å³ã«`extender`ã®å€¤ã¾ãŸã¯é…列è¦ç´ ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§æ‹¡å¼µã•ã‚Œã¾ã™ã€‚ +- `extender` — é…列を拡張ã™ã‚‹ãŸã‚ã®å€¤ã€‚`NULL` を指定ã§ãã¾ã™ã€‚ + +**戻り値:** + +é•·ã•ãŒ `size` ã®é…列。 + +**例** + +``` sql +SELECT arrayResize([1], 3); +``` + +``` text +┌─arrayResize([1], 3)─┠+│ [1,0,0] │ +└─────────────────────┘ +``` + +``` sql +SELECT arrayResize([1], 3, NULL); +``` + +``` text +┌─arrayResize([1], 3, NULL)─┠+│ [1,NULL,NULL] │ +└───────────────────────────┘ +``` + +## arraySlice + +é…列ã®ã‚¹ãƒ©ã‚¤ã‚¹ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +arraySlice(array, offset[, length]) +``` + +**引数** + +- `array` – データã®é…列。 +- `offset` – é…列ã®ç«¯ã‹ã‚‰ã®ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã€‚æ­£ã®å€¤ã¯å·¦å´ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã€è² ã®å€¤ã¯å³å´ã¸ã®ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã‚’示ã—ã¾ã™ã€‚é…列項目ã®ç•ªå·ä»˜ã‘ã¯1ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ +- `length` – å¿…è¦ãªã‚¹ãƒ©ã‚¤ã‚¹ã®é•·ã•ã€‚è² ã®å€¤ã‚’指定ã™ã‚‹ã¨ã€é–¢æ•°ã¯é–‹ã„ã¦ã„るスライス `[offset, array_length - length]` ã‚’è¿”ã—ã¾ã™ã€‚値をçœç•¥ã™ã‚‹ã¨ã€é–¢æ•°ã¯ã‚¹ãƒ©ã‚¤ã‚¹ `[offset, the_end_of_array]` ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT arraySlice([1, 2, NULL, 4, 5], 2, 3) AS res; +``` + +``` text +┌─res────────┠+│ [2,NULL,4] │ +└────────────┘ +``` + +`NULL` ã«è¨­å®šã•ã‚ŒãŸé…列è¦ç´ ã¯é€šå¸¸ã®å€¤ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ + +## arrayShingles + +入力é…列ã®æŒ‡å®šã•ã‚ŒãŸé•·ã•ã®é€£ç¶šã™ã‚‹ã‚µãƒ–é…列ã‹ã‚‰ãªã‚‹ "shingles" を生æˆã—ã¾ã™ã€‚ + +**構文** + +``` sql +arrayShingles(array, length) +``` + +**引数** + +- `array` — 入力é…列 [Array](../data-types/array.md)。 +- `length` — å„シングルã®é•·ã•ã€‚ + +**戻り値** + +- 生æˆã•ã‚ŒãŸã‚·ãƒ³ã‚°ãƒ«ã®é…列。[Array](../data-types/array.md)。 + +**例** + +クエリ: + +``` sql +SELECT arrayShingles([1,2,3,4], 3) as res; +``` + +çµæžœ: + +``` text +┌─res───────────────┠+│ [[1,2,3],[2,3,4]] │ +└───────────────────┘ +``` + +## arraySort(\[func,\] arr, ...) {#sort} + +`arr` é…列ã®è¦ç´ ã‚’昇順ã«ã‚½ãƒ¼ãƒˆã—ã¾ã™ã€‚`func` 関数ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€é…列ã®è¦ç´ ã«é©ç”¨ã•ã‚ŒãŸ `func` 関数ã®çµæžœã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆé †ãŒæ±ºã¾ã‚Šã¾ã™ã€‚`func` ãŒè¤‡æ•°ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹å ´åˆã€`arraySort` 関数ã«ã¯ `func` ã®å¼•æ•°ãŒå¯¾å¿œã™ã‚‹è¤‡æ•°ã®é…列ãŒæ¸¡ã•ã‚Œã¾ã™ã€‚`arraySort` ã®èª¬æ˜Žã®çµ‚ã‚ã‚Šã«è©³ç´°ãªä¾‹ãŒç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ + +整数値をソートã™ã‚‹ä¾‹: + +``` sql +SELECT arraySort([1, 3, 3, 0]); +``` + +``` text +┌─arraySort([1, 3, 3, 0])─┠+│ [0,1,3,3] │ +└─────────────────────────┘ +``` + +文字列値をソートã™ã‚‹ä¾‹: + +``` sql +SELECT arraySort(['hello', 'world', '!']); +``` + +``` text +┌─arraySort(['hello', 'world', '!'])─┠+│ ['!','hello','world'] │ +└────────────────────────────────────┘ +``` + +`NULL`, `NaN` ãŠã‚ˆã³ `Inf` 値ã®ã‚½ãƒ¼ãƒˆé †ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +``` sql +SELECT arraySort([1, nan, 2, NULL, 3, nan, -4, NULL, inf, -inf]); +``` + +``` text +┌─arraySort([1, nan, 2, NULL, 3, nan, -4, NULL, inf, -inf])─┠+│ [-inf,-4,1,2,3,inf,nan,nan,NULL,NULL] │ +└───────────────────────────────────────────────────────────┘ +``` + +- `-Inf` 値ã¯é…列ã®æœ€åˆã«ä½ç½®ã—ã¾ã™ã€‚ +- `NULL` 値ã¯é…列ã®æœ€å¾Œã«ä½ç½®ã—ã¾ã™ã€‚ +- `NaN` 値㯠`NULL` ã®ç›´å‰ã«ä½ç½®ã—ã¾ã™ã€‚ +- `Inf` 値㯠`NaN` ã®ç›´å‰ã«ä½ç½®ã—ã¾ã™ã€‚ + +`arraySort` ã¯[高次ã®é–¢æ•°](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ©ãƒ ãƒ€é–¢æ•°ã®è¦ç´ ã«æ–½ã•ã‚ŒãŸçµæžœã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆé †ãŒæ±ºã¾ã‚Šã¾ã™ã€‚ + +以下ã®ä¾‹ã‚’考ãˆã¦ã¿ã¾ã—ょã†: + +``` sql +SELECT arraySort((x) -> -x, [1, 2, 3]) as res; +``` + +``` text +┌─res─────┠+│ [3,2,1] │ +└─────────┘ +``` + +ソースé…列ã®å„è¦ç´ ã«å¯¾ã—ã¦ã€ãƒ©ãƒ ãƒ€é–¢æ•°ãŒã‚½ãƒ¼ãƒˆç”¨ã®ã‚­ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€\[1 -> -1, 2 -> -2, 3 -> -3\] ã§ã™ã€‚`arraySort` 関数ã¯ã‚­ãƒ¼ã‚’昇順ã§ã‚½ãƒ¼ãƒˆã™ã‚‹ãŸã‚ã€çµæžœã¯ \[3, 2, 1\] ã¨ãªã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€`(x) -> -x` ラムダ関数ãŒ[é™é †](#arrayreversesort)ã®ã‚½ãƒ¼ãƒˆã‚’設定ã—ã¾ã™ã€‚ + +ラムダ関数ã¯è¤‡æ•°ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`arraySort` 関数ã«å¯¾ã—ã¦ã€ãƒ©ãƒ ãƒ€é–¢æ•°ã®å¼•æ•°ãŒå¯¾å¿œã™ã‚‹åŒã˜é•·ã•ã®è¤‡æ•°ã®é…列を渡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚çµæžœã®é…列ã¯æœ€åˆã®å…¥åŠ›é…列ã®è¦ç´ ã§æ§‹æˆã•ã‚Œã€æ¬¡ã®å…¥åŠ›é…列ã®è¦ç´ ãŒã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’指定ã—ã¾ã™ã€‚例: + +``` sql +SELECT arraySort((x, y) -> y, ['hello', 'world'], [2, 1]) as res; +``` + +``` text +┌─res────────────────┠+│ ['world', 'hello'] │ +└────────────────────┘ +``` + +ã“ã“ã§ã€2番目ã®é…列ã«æ¸¡ã•ã‚ŒãŸè¦ç´ ï¼ˆ\[2, 1\])ãŒã€ã‚½ãƒ¼ã‚¹é…列ã®å¯¾å¿œã™ã‚‹è¦ç´ ï¼ˆ\[‘hello’, ‘world’\])ã«å¯¾ã™ã‚‹ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’定義ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€\[‘hello’ -> 2, ‘world’ -> 1\] ã§ã™ã€‚ラムダ関数㯠`x` を使用ã—ãªã„ãŸã‚ã€ã‚½ãƒ¼ã‚¹é…列ã®å®Ÿéš›ã®å€¤ã¯çµæžœã®é †åºã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。ãã®ãŸã‚ã€â€˜hello’ ã¯çµæžœã®2番目ã®è¦ç´ ã«ãªã‚Šã€â€˜world’ ã¯æœ€åˆã®è¦ç´ ã«ãªã‚Šã¾ã™ã€‚ + +ãã®ä»–ã®ä¾‹ã‚’以下ã«ç¤ºã—ã¾ã™ã€‚ + +``` sql +SELECT arraySort((x, y) -> y, [0, 1, 2], ['c', 'b', 'a']) as res; +``` + +``` text +┌─res─────┠+│ [2,1,0] │ +└─────────┘ +``` + +``` sql +SELECT arraySort((x, y) -> -y, [0, 1, 2], [1, 2, 3]) as res; +``` + +``` text +┌─res─────┠+│ [2,1,0] │ +└─────────┘ +``` + +:::note +ソート効率をå‘上ã•ã›ã‚‹ãŸã‚ã€[Schwartzian transform](https://en.wikipedia.org/wiki/Schwartzian_transform)ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +## arrayPartialSort(\[func,\] limit, arr, ...) + +`arraySort` ã¨åŒæ§˜ã§ã™ãŒã€éƒ¨åˆ†ã‚½ãƒ¼ãƒˆã‚’許å¯ã™ã‚‹ãŸã‚ã«è¿½åŠ ã® `limit` 引数ãŒã‚ã‚Šã¾ã™ã€‚戻り値ã¯å…ƒã®é…列ã¨åŒã˜ã‚µã‚¤ã‚ºã®é…列ã§ã€ç¯„囲 `[1..limit]` ã®è¦ç´ ã¯æ˜‡é †ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚残りã®è¦ç´  `(limit..N]` ã«ã¯æœªæŒ‡å®šã®é †åºã®è¦ç´ ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +## arrayReverseSort + +`arr` é…列ã®è¦ç´ ã‚’é™é †ã«ã‚½ãƒ¼ãƒˆã—ã¾ã™ã€‚`func` 関数ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€é…列ã®è¦ç´ ã«é©ç”¨ã•ã‚ŒãŸ `func` 関数ã®çµæžœã«ã‚ˆã£ã¦ `arr` ãŒã‚½ãƒ¼ãƒˆã•ã‚Œã€æ¬¡ã«ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸé…列ãŒé€†é †ã«ãªã‚Šã¾ã™ã€‚`func` ãŒè¤‡æ•°ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹å ´åˆã€`arrayReverseSort` 関数ã«ã¯ `func` ã®å¼•æ•°ãŒå¯¾å¿œã™ã‚‹è¤‡æ•°ã®é…列ãŒæ¸¡ã•ã‚Œã¾ã™ã€‚`arrayReverseSort` ã®èª¬æ˜Žã®çµ‚ã‚ã‚Šã«è©³ç´°ãªä¾‹ãŒç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +arrayReverseSort([func,] arr, ...) +``` +整数値をソートã™ã‚‹ä¾‹: + +``` sql +SELECT arrayReverseSort([1, 3, 3, 0]); +``` + +``` text +┌─arrayReverseSort([1, 3, 3, 0])─┠+│ [3,3,1,0] │ +└────────────────────────────────┘ +``` + +文字列値をソートã™ã‚‹ä¾‹: + +``` sql +SELECT arrayReverseSort(['hello', 'world', '!']); +``` + +``` text +┌─arrayReverseSort(['hello', 'world', '!'])─┠+│ ['world','hello','!'] │ +└───────────────────────────────────────────┘ +``` + +`NULL`, `NaN` ãŠã‚ˆã³ `Inf` 値ã®ã‚½ãƒ¼ãƒˆé †ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +``` sql +SELECT arrayReverseSort([1, nan, 2, NULL, 3, nan, -4, NULL, inf, -inf]) as res; +``` + +``` text +┌─res───────────────────────────────────┠+│ [inf,3,2,1,-4,-inf,nan,nan,NULL,NULL] │ +└───────────────────────────────────────┘ +``` + +- `Inf` 値ã¯é…列ã®æœ€åˆã«ä½ç½®ã—ã¾ã™ã€‚ +- `NULL` 値ã¯é…列ã®æœ€å¾Œã«ä½ç½®ã—ã¾ã™ã€‚ +- `NaN` 値㯠`NULL` ã®ç›´å‰ã«ä½ç½®ã—ã¾ã™ã€‚ +- `-Inf` 値㯠`NaN` ã®ç›´å‰ã«ä½ç½®ã—ã¾ã™ã€‚ + +`arrayReverseSort` ã¯[高次ã®é–¢æ•°](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚例を以下ã«ç¤ºã—ã¾ã™ã€‚ + +``` sql +SELECT arrayReverseSort((x) -> -x, [1, 2, 3]) as res; +``` + +``` text +┌─res─────┠+│ [1,2,3] │ +└─────────┘ +``` + +ã“ã®é…列ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™: + +1. 最åˆã«ã€ã‚½ãƒ¼ã‚¹é…列(\[1, 2, 3\])ãŒé…列ã®è¦ç´ ã«é©ç”¨ã•ã‚ŒãŸãƒ©ãƒ ãƒ€é–¢æ•°ã®çµæžœã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚çµæžœã¯é…列 \[3, 2, 1\] ã§ã™ã€‚ +2. å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã§å¾—られãŸé…列を逆順ã«ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€æœ€çµ‚çš„ãªçµæžœã¯ \[1, 2, 3\] ã§ã™ã€‚ + +ラムダ関数ã¯è¤‡æ•°ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`arrayReverseSort` 関数ã«å¯¾ã—ã¦ã€ãƒ©ãƒ ãƒ€é–¢æ•°ã®å¼•æ•°ãŒå¯¾å¿œã™ã‚‹åŒã˜é•·ã•ã®è¤‡æ•°ã®é…列を渡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚çµæžœã®é…列ã¯æœ€åˆã®å…¥åŠ›é…列ã®è¦ç´ ã§æ§‹æˆã•ã‚Œã€æ¬¡ã®å…¥åŠ›é…列ã®è¦ç´ ãŒã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’指定ã—ã¾ã™ã€‚例: + +``` sql +SELECT arrayReverseSort((x, y) -> y, ['hello', 'world'], [2, 1]) as res; +``` + +``` text +┌─res───────────────┠+│ ['hello','world'] │ +└───────────────────┘ +``` + +ã“ã®ä¾‹ã§ã¯ã€é…列ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™: + +1. 最åˆã«ã€ã‚½ãƒ¼ã‚¹é…列(\[‘hello’, ‘world’\])ãŒé…列ã®è¦ç´ ã«é©ç”¨ã•ã‚ŒãŸãƒ©ãƒ ãƒ€é–¢æ•°ã®çµæžœã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚2 番目ã®é…列ã«æ¸¡ã•ã‚ŒãŸè¦ç´ ï¼ˆ\[2, 1\])ãŒã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã‚’対応ã™ã‚‹ã‚½ãƒ¼ã‚¹é…列ã®è¦ç´ ã«å®šç¾©ã—ã¾ã™ã€‚çµæžœã¯é…列 \[‘world’, ‘hello’\] ã§ã™ã€‚ +2. å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸé…列を逆順ã«ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€æœ€çµ‚çš„ãªçµæžœã¯ \[‘hello’, ‘world’\] ã§ã™ã€‚ + +以下ã«ä»–ã®ä¾‹ã‚’示ã—ã¾ã™ã€‚ + +``` sql +SELECT arrayReverseSort((x, y) -> y, [4, 3, 5], ['a', 'b', 'c']) AS res; +``` + +``` text +┌─res─────┠+│ [5,3,4] │ +└─────────┘ +``` + +``` sql +SELECT arrayReverseSort((x, y) -> -y, [4, 3, 5], [1, 2, 3]) AS res; +``` + +``` text +┌─res─────┠+│ [4,3,5] │ +└─────────┘ +``` + +## arrayPartialReverseSort(\[func,\] limit, arr, ...) + +`arrayReverseSort`ã¨åŒæ§˜ã§ã™ãŒã€éƒ¨åˆ†ã‚½ãƒ¼ãƒˆã‚’許å¯ã™ã‚‹ãŸã‚ã«è¿½åŠ ã® `limit` 引数ãŒã‚ã‚Šã¾ã™ã€‚戻りã¯å…ƒã®é…列ã¨åŒã˜ã‚µã‚¤ã‚ºã®é…列ã§ã‚ã‚Šã€ç¯„囲 `[1..limit]` ã®è¦ç´ ã¯é™é †ã«ã‚½ãƒ¼ãƒˆã•ã‚Œã€æ®‹ã‚Šã®è¦ç´ ã¯æœªæŒ‡å®šã®é †åºã§å«ã¾ã‚Œã¾ã™ã€‚ + +## arrayShuffle + +å…ƒã®é…列ã¨åŒã˜ã‚µã‚¤ã‚ºã®é…列を返ã—ã€è¦ç´ ãŒã‚·ãƒ£ãƒƒãƒ•ãƒ«ã•ã‚ŒãŸé †åºã§æ ¼ç´ã•ã‚Œã¾ã™ã€‚ +å„å¯èƒ½ãªè¦ç´ ã®ä¸¦ã³æ›¿ãˆãŒå‡ºç¾ã™ã‚‹ç¢ºçŽ‡ãŒç­‰ã—ããªã‚‹ã‚ˆã†ã«è¦ç´ ãŒä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +arrayShuffle(arr[, seed]) +``` + +**パラメータ** + +- `arr`: 部分的ã«ã‚·ãƒ£ãƒƒãƒ•ãƒ«ã•ã‚Œã‚‹é…列。[Array](../data-types/array.md)。 +- `seed`(オプション): 乱数生æˆã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚·ãƒ¼ãƒ‰ã€‚指定ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ãƒ©ãƒ³ãƒ€ãƒ ãªã‚‚ã®ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚[UInt ã¾ãŸã¯ Int](../data-types/int-uint.md)。 + +**戻り値** + +- シャッフルã•ã‚ŒãŸè¦ç´ ã‚’æŒã¤é…列。 + +**実装ã®è©³ç´°** + +:::note +ã“ã®é–¢æ•°ã¯å®šæ•°ã‚’具体化ã—ã¾ã›ã‚“。 +::: + +**例** + +ã“ã®ä¾‹ã§ã¯ã€`arrayShuffle`ã‚’`seed`を指定ã›ãšã«ä½¿ç”¨ã—ã¦ã„ã¾ã™ã€‚ãã®ãŸã‚ã€ãƒ©ãƒ³ãƒ€ãƒ ã«ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +クエリ: + +```sql +SELECT arrayShuffle([1, 2, 3, 4]); +``` + +注æ„: [ClickHouse Fiddle](https://fiddle.clickhouse.com/)を使用ã™ã‚‹å ´åˆã€é–¢æ•°ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæ€§è³ªã«ã‚ˆã‚Šæ­£ç¢ºãªå¿œç­”ãŒç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +çµæžœ: + +```response +[1,4,2,3] +``` + +ã“ã®ä¾‹ã§ã¯ã€`arrayShuffle`ã«`seed`ãŒæŒ‡å®šã•ã‚Œã¦ãŠã‚Šã€å®‰å®šã—ãŸçµæžœãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +クエリ: + +```sql +SELECT arrayShuffle([1, 2, 3, 4], 41); +``` + +çµæžœ: + +```response +[3,2,1,4] +``` + +## arrayPartialShuffle + +カードã®å¤§ãã• `N` ã®å…¥åŠ›é…列を与ãˆã‚‰ã‚ŒãŸå ´åˆã€ç¯„囲 `[1...limit]` ã®è¦ç´ ãŒã‚·ãƒ£ãƒƒãƒ•ãƒ«ã•ã‚Œã€æ®‹ã‚Šã®è¦ç´ ï¼ˆç¯„囲 `(limit...n]`) ã¯ã‚·ãƒ£ãƒƒãƒ•ãƒ«ã•ã‚Œãªã„é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +arrayPartialShuffle(arr[, limit[, seed]]) +``` + +**パラメータ** + +- `arr`: 部分的ã«ã‚·ãƒ£ãƒƒãƒ•ãƒ«ã•ã‚Œã‚‹é…列。[Array](../data-types/array.md)。 +- `limit`(オプション): è¦ç´ ã®äº¤æ›ã‚’制é™ã™ã‚‹ãŸã‚ã®æ•°ã€‚[UInt ã¾ãŸã¯ Int](../data-types/int-uint.md)。 +- `seed`(オプション): 乱数生æˆã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚·ãƒ¼ãƒ‰å€¤ã€‚指定ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ãƒ©ãƒ³ãƒ€ãƒ ãªã‚‚ã®ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚[UInt ã¾ãŸã¯ Int](../data-types/int-uint.md)。 + +**戻り値** + +- 部分的ã«ã‚·ãƒ£ãƒƒãƒ•ãƒ«ã•ã‚ŒãŸè¦ç´ ã‚’æŒã¤é…列。 + +**実装ã®è©³ç´°** + +:::note +ã“ã®é–¢æ•°ã¯å®šæ•°ã‚’具体化ã—ã¾ã›ã‚“。 + +`limit` ã®å€¤ã¯ `[1..N]` 範囲内ã«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ç¯„囲外ã®å€¤ã¯ã€å®Œå…¨ãª [arrayShuffle](#arrayshuffle) を実行ã™ã‚‹ã®ã¨åŒç­‰ã§ã™ã€‚ +::: + +**例** + +注æ„: [ClickHouse Fiddle](https://fiddle.clickhouse.com/)を使用ã™ã‚‹å ´åˆã€é–¢æ•°ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæ€§è³ªã«ã‚ˆã‚Šæ­£ç¢ºãªå¿œç­”ãŒç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +クエリ: + +```sql +SELECT arrayPartialShuffle([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 1) +``` + +çµæžœ: + +è¦ç´ ã®é †åºã¯ (`[2,3,4,5], [7,8,9,10]`) ã®ã¾ã¾ã§ã€ã‚·ãƒ£ãƒƒãƒ•ãƒ«ã•ã‚ŒãŸ2ã¤ã®è¦ç´  `[1, 6]` を除ãã¾ã™ã€‚`seed` ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„ãŸã‚ã€é–¢æ•°ã¯ãƒ©ãƒ³ãƒ€ãƒ ã«é¸ã³ã¾ã™ã€‚ + +```response +[6,2,3,4,5,1,7,8,9,10] +``` + +ã“ã®ä¾‹ã§ã¯ã€`limit` ㌠`2` ã«å¢—加ã—ã€`seed` 値ãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT arrayPartialShuffle([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 2); +``` + +è¦ç´ ã®é †åºã¯ (`[4, 5, 6, 7, 8], [10]`) ã®ã¾ã¾ã§ã€ã‚·ãƒ£ãƒƒãƒ•ãƒ«ã•ã‚ŒãŸ4ã¤ã®è¦ç´  `[1, 2, 3, 9]` を除ãã¾ã™ã€‚ + +çµæžœ: +```response +[3,9,1,4,5,6,7,8,2,10] +``` + +## arrayUniq(arr, ...) + +1ã¤ã®å¼•æ•°ãŒæ¸¡ã•ã‚ŒãŸå ´åˆã€é…列内ã®ç•°ãªã‚‹è¦ç´ ã®æ•°ã‚’カウントã—ã¾ã™ã€‚ +複数ã®å¼•æ•°ãŒæ¸¡ã•ã‚ŒãŸå ´åˆã€è¤‡æ•°ã®é…列内ã®å¯¾å¿œã™ã‚‹ä½ç½®ã®è¦ç´ ã®ç•°ãªã‚‹çµ„ã¿åˆã‚ã›ã®æ•°ã‚’カウントã—ã¾ã™ã€‚ + +é…列内ã®ä¸€æ„ã®ã‚¢ã‚¤ãƒ†ãƒ ã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã™ã‚‹å ´åˆã€`arrayReduce('groupUniqArray', arr)`を使用ã§ãã¾ã™ã€‚ + +## arrayJoin(arr) + +特別ãªé–¢æ•°ã€‚[「arrayJoin関数ã€](../../sql-reference/functions/array-join.md#functions_arrayjoin) セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +## arrayDifference + +隣接ã™ã‚‹é…列è¦ç´ é–“ã®å·®åˆ†ã®é…列を計算ã—ã¾ã™ã€‚çµæžœé…列ã®æœ€åˆã®è¦ç´ ã¯0ã€2番目ã¯`a[1] - a[0]`ã€3番目ã¯`a[2] - a[1]` ãªã©ã§ã™ã€‚çµæžœé…列ã®è¦ç´ ã®åž‹ã¯æ¸›ç®—ã®åž‹æŽ¨è«–ルールã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ï¼ˆä¾‹: `UInt8` - `UInt8` = `Int16`)。 + +**構文** + +``` sql +arrayDifference(array) +``` + +**引数** + +- `array` – [Array](https://clickhouse.com/docs/ja/data_types/array/)。 + +**戻り値** + +隣接ã™ã‚‹é…列è¦ç´ é–“ã®å·®åˆ†ã®é…列を返ã—ã¾ã™ã€‚[UInt\*](https://clickhouse.com/docs/ja/data_types/int_uint/#uint-ranges)ã€[Int\*](https://clickhouse.com/docs/ja/data_types/int_uint/#int-ranges)ã€[Float\*](https://clickhouse.com/docs/ja/data_types/float/)。 + +**例** + +クエリ: + +``` sql +SELECT arrayDifference([1, 2, 3, 4]); +``` + +çµæžœ: + +``` text +┌─arrayDifference([1, 2, 3, 4])─┠+│ [0,1,1,1] │ +└───────────────────────────────┘ +``` + +Int64 ã«ã‚ˆã‚‹ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã®ä¾‹: + +クエリ: + +``` sql +SELECT arrayDifference([0, 10000000000000000000]); +``` + +çµæžœ: + +``` text +┌─arrayDifference([0, 10000000000000000000])─┠+│ [0,-8446744073709551616] │ +└────────────────────────────────────────────┘ +``` + +## arrayDistinct + +é…列をå–ã‚Šã€ä¸€æ„ã®è¦ç´ ã®ã¿ã‚’å«ã‚€é…列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +arrayDistinct(array) +``` + +**引数** + +- `array` – [Array](https://clickhouse.com/docs/ja/data_types/array/)。 + +**戻り値** + +一æ„ã®è¦ç´ ã‚’å«ã‚€é…列を返ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT arrayDistinct([1, 2, 2, 3, 1]); +``` + +çµæžœ: + +``` text +┌─arrayDistinct([1, 2, 2, 3, 1])─┠+│ [1,2,3] │ +└────────────────────────────────┘ +``` + +## arrayEnumerateDense + +é…列ã¨åŒã˜ã‚µã‚¤ã‚ºã®é…列を返ã—ã€å„è¦ç´ ã®ã‚½ãƒ¼ã‚¹é…列ã«ãŠã‘る最åˆã®å‡ºç¾ä½ç½®ã‚’示ã—ã¾ã™ã€‚ + +**構文** + +```sql +arrayEnumerateDense(arr) +``` + +**例** + +クエリ: + +``` sql +SELECT arrayEnumerateDense([10, 20, 10, 30]) +``` + +çµæžœ: + +``` text +┌─arrayEnumerateDense([10, 20, 10, 30])─┠+│ [1,2,1,3] │ +└───────────────────────────────────────┘ +``` +## arrayEnumerateDenseRanked + +é…列ã¨åŒã˜ã‚µã‚¤ã‚ºã®é…列を返ã—ã€å„è¦ç´ ã®æœ€åˆã®å‡ºç¾å ´æ‰€ã‚’ソースé…列ã«ãŠã„ã¦ç¤ºã—ã¾ã™ã€‚多次元é…列を列挙ã—ã€é…列ã®ã©ã®æ·±ã•ã¾ã§è¦‹ã¦ã„ãã‹ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +```sql +arrayEnumerateDenseRanked(clear_depth, arr, max_array_depth) +``` + +**パラメータ** + +- `clear_depth`: 指定ã•ã‚ŒãŸãƒ¬ãƒ™ãƒ«ã§è¦ç´ ã‚’個別ã«åˆ—挙ã—ã¾ã™ã€‚`max_arr_depth`以下ã®æ­£ã®æ•´æ•°ã€‚ +- `arr`: 列挙ã•ã‚Œã‚‹N次元é…列。[Array](../data-types/array.md)。 +- `max_array_depth`: 有効ãªæœ€å¤§æ·±åº¦ã€‚`arr` ã®æ·±ã•ä»¥ä¸‹ã®æ­£ã®æ•´æ•°ã€‚ + +**例** + +`clear_depth=1`ãŠã‚ˆã³`max_array_depth=1`ã§ã¯ã€[arrayEnumerateDense](#arrayenumeratedense) ã¨åŒã˜çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT arrayEnumerateDenseRanked(1,[10, 20, 10, 30],1); +``` + +çµæžœ: + +``` text +[1,2,1,3] +``` + +ã“ã®ä¾‹ã§ã¯ã€`arrayEnumerateDenseRanked` を使用ã—ã¦ã€å¤šæ¬¡å…ƒé…列ã®å„è¦ç´ ãŒåŒã˜å€¤ã‚’æŒã¤åˆ¥ã®è¦ç´ ã®ä¸­ã§æœ€åˆã«å‡ºç¾ã™ã‚‹ä½ç½®ã‚’示ã™é…列をå–å¾—ã—ã¾ã™ã€‚最åˆã®è¡ŒãŒã‚½ãƒ¼ã‚¹é…列ã®`[10,10,30,20]`ã§ã‚ã‚‹å ´åˆã€ã“ã®è¡Œã«å¯¾å¿œã™ã‚‹çµæžœã¯ `[1,1,2,3]` ã§ã‚ã‚Šã€`10`ãŒåˆã‚ã¦ç™ºè¦‹ã•ã‚ŒãŸä½ç½®ã¯ä½ç½®1ã¨2ã§ã‚ã‚‹ã“ã¨ã€`30`ã¯åˆ¥ã®ç™ºè¦‹ã•ã‚ŒãŸè¦ç´ ã§ã‚ã‚‹ä½ç½® 3ã€`20`ã¯ã•ã‚‰ã«åˆ¥ã®ç™ºè¦‹ã•ã‚ŒãŸè¦ç´ ã§ã‚ã‚‹ä½ç½®4。第2ã®è¡ŒãŒ `[40, 50, 10, 30]` ã§ã‚ã‚‹ã¨ãã€çµæžœã®ç¬¬2行㯠`[4,5,1,2]` ã§ã‚ã‚Šã€`40`ã¨`50`ãŒ4番目ã¨5番目ã§ã‚ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã“ã®è¡Œã®ä½ç½®1ã¨2ã®è¦ç´ ã¨ã—ã¦ã€åˆ¥ã®`10`(最åˆã«è¦‹ã¤ã‹ã£ãŸæ•°ï¼‰ãŒä½ç½®3ã«ã€`30`(2番目ã®æ•°ï¼‰ãŒæœ€å¾Œã®ä½ç½®ã«ã‚ã‚Šã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT arrayEnumerateDenseRanked(1,[[10,10,30,20],[40,50,10,30]],2); +``` + +çµæžœ: + +``` text +[[1,1,2,3],[4,5,1,2]] +``` + +`clear_depth=2`ã«å¤‰æ›´ã™ã‚‹ã¨ã€å„è¡ŒãŒåˆ¥ã€…ã«åˆ—挙ã•ã‚Œã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT arrayEnumerateDenseRanked(2,[[10,10,30,20],[40,50,10,30]],2); +``` + +çµæžœ: + +``` text +[[1,1,2,3],[1,2,3,4]] +``` + +## arrayUnion(arr) + +複数ã®é…列をå–ã‚Šã€ã‚½ãƒ¼ã‚¹é…列ã®ã„ãšã‚Œã‹ã«å­˜åœ¨ã™ã‚‹ã™ã¹ã¦ã®è¦ç´ ã‚’å«ã‚€é…列を返ã—ã¾ã™ã€‚ + +例: +```sql +SELECT + arrayUnion([-2, 1], [10, 1], [-2], []) as num_example, + arrayUnion(['hi'], [], ['hello', 'hi']) as str_example, + arrayUnion([1, 3, NULL], [2, 3, NULL]) as null_example +``` + +```text +┌─num_example─┬─str_example────┬─null_example─┠+│ [10,-2,1] │ ['hello','hi'] │ [3,2,1,NULL] │ +└─────────────┴────────────────┴──────────────┘ +``` + +## arrayIntersect(arr) + +複数ã®é…列をå–ã‚Šã€ã™ã¹ã¦ã®ã‚½ãƒ¼ã‚¹é…列ã«å­˜åœ¨ã™ã‚‹è¦ç´ ã‚’æŒã¤é…列を返ã—ã¾ã™ã€‚ + +例: + +``` sql +SELECT + arrayIntersect([1, 2], [1, 3], [2, 3]) AS no_intersect, + arrayIntersect([1, 2], [1, 3], [1, 4]) AS intersect +``` + +``` text +┌─no_intersect─┬─intersect─┠+│ [] │ [1] │ +└──────────────┴───────────┘ +``` + +## arrayJaccardIndex + +2ã¤ã®é…列ã®[ジャッカード係数](https://en.wikipedia.org/wiki/Jaccard_index)ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: +``` sql +SELECT arrayJaccardIndex([1, 2], [2, 3]) AS res +``` + +çµæžœ: +``` text +┌─res────────────────┠+│ 0.3333333333333333 │ +└────────────────────┘ +``` + +## arrayReduce + +集約関数をé…列è¦ç´ ã«é©ç”¨ã—ã€ãã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚集約関数ã®åå‰ã¯ã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚©ãƒ¼ãƒˆã§å›²ã¾ã‚ŒãŸæ–‡å­—列 `'max'`, `'sum'` ã¨ã—ã¦æ¸¡ã•ã‚Œã¾ã™ã€‚パラメトリック集計関数を使用ã™ã‚‹å ´åˆã€é–¢æ•°åã®å¾Œæ‹¬å¼§ã§å›²ã‚“ã§ãƒ‘ラメータを指定ã—ã¾ã™ `'uniqUpTo(6)'`。 + +**構文** + +``` sql +arrayReduce(agg_func, arr1, arr2, ..., arrN) +``` + +**引数** + +- `agg_func` — 集約関数ã®åå‰ã§ã€å®šæ•°[文字列](../data-types/string.md)ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +- `arr` — アイテムã¨ã—ã¦é›†ç´„関数ã®ãƒ‘ラメータã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹ä»»æ„ã®æ•°ã®[Array](../data-types/array.md)åž‹ã®ã‚«ãƒ©ãƒ ã€‚ + +**戻り値** + +集約関数ã§æŒ‡å®šã•ã‚ŒãŸç¯„囲内ã®çµæžœã‚’å«ã‚€é…列。[Array](../data-types/array.md)。 + +**例** + +クエリ: + +``` sql +SELECT arrayReduce('max', [1, 2, 3]); +``` + +çµæžœ: + +``` text +┌─arrayReduce('max', [1, 2, 3])─┠+│ 3 │ +└───────────────────────────────┘ +``` + +集約関数ãŒè¤‡æ•°ã®å¼•æ•°ã‚’ã¨ã‚‹å ´åˆã€ã“ã®é–¢æ•°ã¯åŒã˜ã‚µã‚¤ã‚ºã®è¤‡æ•°ã®é…列ã«å¯¾ã—ã¦é©ç”¨ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT arrayReduce('maxIf', [3, 5], [1, 0]); +``` + +çµæžœ: + +``` text +┌─arrayReduce('maxIf', [3, 5], [1, 0])─┠+│ 3 │ +└──────────────────────────────────────┘ +``` + +パラメトリック集計関数ã®ä¾‹: + +クエリ: + +``` sql +SELECT arrayReduce('uniqUpTo(3)', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); +``` + +çµæžœ: + +``` text +┌─arrayReduce('uniqUpTo(3)', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])─┠+│ 4 │ +└─────────────────────────────────────────────────────────────┘ +``` + +**関連項目** + +- [arrayFold](#arrayfold) + +## arrayReduceInRanges + +集約関数を指定ã•ã‚ŒãŸç¯„囲内ã®é…列è¦ç´ ã«é©ç”¨ã—ã€å„範囲ã«å¯¾å¿œã™ã‚‹çµæžœã‚’å«ã‚€é…列を返ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯è¤‡æ•°ã® `arrayReduce(agg_func, arraySlice(arr1, index, length), ...)` ã¨åŒæ§˜ã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +arrayReduceInRanges(agg_func, ranges, arr1, arr2, ..., arrN) +``` + +**引数** + +- `agg_func` — 集約関数ã®åå‰ã§ã€å®šæ•°[文字列](../data-types/string.md)ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +- `ranges` — 集約ã•ã‚Œã‚‹ç¯„囲ã§ã€å„範囲ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨é•·ã•ã‚’å«ã‚€[タプル](../data-types/tuple.md)ã®é…列[Array](../data-types/array.md)ã§ã™ã€‚ +- `arr` — 集約関数ã®ãƒ‘ラメータã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹ä»»æ„ã®æ•°ã®[Array](../data-types/array.md)åž‹ã®ã‚«ãƒ©ãƒ ã€‚ + +**戻り値** + +- 指定ã•ã‚ŒãŸç¯„囲内ã®é›†ç´„関数ã®çµæžœã‚’å«ã‚€é…列。[Array](../data-types/array.md)。 + +**例** + +クエリ: + +``` sql +SELECT arrayReduceInRanges( + 'sum', + [(1, 5), (2, 3), (3, 4), (4, 4)], + [1000000, 200000, 30000, 4000, 500, 60, 7] +) AS res +``` + +çµæžœ: + +``` text +┌─res─────────────────────────┠+│ [1234500,234000,34560,4567] │ +└─────────────────────────────┘ +``` + +## arrayFold + +ラムダ関数をåŒã‚µã‚¤ã‚ºã®1ã¤ã¾ãŸã¯è¤‡æ•°ã®é…列ã«é©ç”¨ã—ã€çµæžœã‚’アキュムレータã«é›†ã‚ã¾ã™ã€‚ + +**構文** + +``` sql +arrayFold(lambda_function, arr1, arr2, ..., accumulator) +``` + +**例** + +クエリ: + +``` sql +SELECT arrayFold( acc,x -> acc + x*2, [1, 2, 3, 4], toInt64(3)) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ 23 │ +└─────┘ +``` + +**フィボナッãƒæ•°åˆ—ã®ä¾‹** + +```sql +SELECT arrayFold( acc,x -> (acc.2, acc.2 + acc.1), range(number), (1::Int64, 0::Int64)).1 AS fibonacci +FROM numbers(1,10); + +┌─fibonacci─┠+│ 0 │ +│ 1 │ +│ 1 │ +│ 2 │ +│ 3 │ +│ 5 │ +│ 8 │ +│ 13 │ +│ 21 │ +│ 34 │ +└───────────┘ +``` + +**関連項目** + +- [arrayReduce](#arrayreduce) + +## arrayReverse + +å…ƒã®é…列ã¨åŒã˜ã‚µã‚¤ã‚ºã®é…列を返ã—ã€é †ç•ªãŒé€†ã«ãªã£ãŸè¦ç´ ã‚’å«ã¿ã¾ã™ã€‚ + +**構文** + +```sql +arrayReverse(arr) +``` + +例: + +``` sql +SELECT arrayReverse([1, 2, 3]) +``` + +``` text +┌─arrayReverse([1, 2, 3])─┠+│ [3,2,1] │ +└─────────────────────────┘ +``` + +## reverse(arr) + +「[arrayReverse](#arrayreverse)ã€ã®åŒç¾©èªž + +## arrayFlatten + +é…列ã®é…列をフラットãªé…列ã«å¤‰æ›ã—ã¾ã™ã€‚ + +関数: + +- ãƒã‚¹ãƒˆã•ã‚ŒãŸé…列ã®ä»»æ„ã®æ·±ã•ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ +- ã™ã§ã«ãƒ•ãƒ©ãƒƒãƒˆã§ã‚ã‚‹é…列ã¯å¤‰æ›´ã—ã¾ã›ã‚“。 + +フラット化ã—ãŸé…列ã«ã¯ã€ã™ã¹ã¦ã®ã‚½ãƒ¼ã‚¹é…列ã®ã™ã¹ã¦ã®è¦ç´ ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +flatten(array_of_arrays) +``` + +エイリアス: `flatten`. + +**パラメータ** + +- `array_of_arrays` — [Array](../data-types/array.md) ã®é…列。例ãˆã°ã€`[[1,2,3], [4,5]]`. + +**例** + +``` sql +SELECT flatten([[[1]], [[2], [3]]]); +``` + +``` text +┌─flatten(array(array([1]), array([2], [3])))─┠+│ [1,2,3] │ +└─────────────────────────────────────────────┘ +``` + +## arrayCompact + +é…列ã‹ã‚‰é€£ç¶šã™ã‚‹é‡è¤‡è¦ç´ ã‚’削除ã—ã¾ã™ã€‚å…ƒã®é…列中ã®ã‚ªãƒ¼ãƒ€ãƒ¼ã«ã‚ˆã£ã¦ã€çµæžœã®å€¤ã®é †åºãŒæ±ºã¾ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +arrayCompact(arr) +``` + +**引数** + +`arr` — ãƒã‚§ãƒƒã‚¯ã•ã‚Œã‚‹[Array](../data-types/array.md)ã§ã™ã€‚ + +**戻り値** + +é‡è¤‡ã‚’å–り除ã„ãŸé…列。[Array](../data-types/array.md)ã§ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT arrayCompact([1, 1, nan, nan, 2, 3, 3, 3]); +``` + +çµæžœ: + +``` text +┌─arrayCompact([1, 1, nan, nan, 2, 3, 3, 3])─┠+│ [1,nan,nan,2,3] │ +└────────────────────────────────────────────┘ +``` + +## arrayZip + +複数ã®é…列を1ã¤ã®é…列ã«çµåˆã—ã¾ã™ã€‚çµæžœã®é…列ã«ã¯ã€ã‚½ãƒ¼ã‚¹é…列対応ã™ã‚‹è¦ç´ ãŒå¼•æ•°ã®é †åºã§ã‚¿ãƒ—ルã«ã¾ã¨ã‚られã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +arrayZip(arr1, arr2, ..., arrN) +``` + +**引数** + +- `arrN` — [Array](../data-types/array.md). + +ã“ã®æ©Ÿèƒ½ã¯ç•°ãªã‚‹åž‹ã®ä»»æ„ã®æ•°ã®é…列をå—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã™ã¹ã¦ã®å…¥åŠ›é…列ã¯åŒã˜ã‚µã‚¤ã‚ºã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**戻り値** + +- ソースé…列ã®è¦ç´ ã‚’[タプル](../data-types/tuple.md)ã«ã¾ã¨ã‚ãŸé…列ã§ã™ã€‚タプル内ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯ã€å…¥åŠ›é…列ã®åž‹ã¨åŒã˜ã§ã€æ¸¡ã•ã‚ŒãŸé…列ã®é †åºã«å¾“ã„ã¾ã™ã€‚[Array](../data-types/array.md)ã§ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT arrayZip(['a', 'b', 'c'], [5, 2, 1]); +``` + +çµæžœ: + +``` text +┌─arrayZip(['a', 'b', 'c'], [5, 2, 1])─┠+│ [('a',5),('b',2),('c',1)] │ +└──────────────────────────────────────┘ +``` + +## arrayZipUnaligned + +ズレã®ã‚ã‚‹é…列を考慮ã—ã¦è¤‡æ•°ã®é…列を1ã¤ã«çµåˆã—ã¾ã™ã€‚çµæžœã®é…列ã«ã¯ã€ã‚½ãƒ¼ã‚¹é…列ã®å¯¾å¿œã™ã‚‹è¦ç´ ãŒå¼•æ•°ã®ãƒªã‚¹ãƒˆã•ã‚ŒãŸé †åºã§ã‚¿ãƒ—ルã«ã¾ã¨ã‚られã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +arrayZipUnaligned(arr1, arr2, ..., arrN) +``` + +**引数** + +- `arrN` — [Array](../data-types/array.md). + +ã“ã®æ©Ÿèƒ½ã¯ç•°ãªã‚‹åž‹ã®ä»»æ„ã®æ•°ã®é…列をå—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**戻り値** + +- ソースé…列ã‹ã‚‰ã®è¦ç´ ã‚’[ã‚¿ +`func(arr1[i], ..., arrN[i])`ã‚’å„è¦ç´ ã«é©ç”¨ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€å…ƒã®é…列ã‹ã‚‰æ–°ãŸãªé…列をå–å¾—ã—ã¾ã™ã€‚é…列 `arr1` ... `arrN` ã¯åŒã˜æ•°ã®è¦ç´ ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +例: + +``` sql +SELECT arrayMap(x -> (x + 2), [1, 2, 3]) as res; +``` + +``` text +┌─res─────┠+│ [3,4,5] │ +└─────────┘ +``` + +次ã®ä¾‹ã¯ã€ç•°ãªã‚‹é…列ã®è¦ç´ ã‹ã‚‰ã‚¿ãƒ—ルを作æˆã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™: + +``` sql +SELECT arrayMap((x, y) -> (x, y), [1, 2, 3], [4, 5, 6]) AS res +``` + +``` text +┌─res─────────────────┠+│ [(1,4),(2,5),(3,6)] │ +└─────────────────────┘ +``` + +`arrayMap`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã€çœç•¥ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## arrayFilter(func, arr1, ...) + +`func(arr1[i], ..., arrN[i])`ãŒ0以外を返ã™`arr1`ã®è¦ç´ ã®ã¿ã‚’å«ã‚€é…列を返ã—ã¾ã™ã€‚ + +例: + +``` sql +SELECT arrayFilter(x -> x LIKE '%World%', ['Hello', 'abc World']) AS res +``` + +``` text +┌─res───────────┠+│ ['abc World'] │ +└───────────────┘ +``` + +``` sql +SELECT + arrayFilter( + (i, x) -> x LIKE '%World%', + arrayEnumerate(arr), + ['Hello', 'abc World'] AS arr) + AS res +``` + +``` text +┌─res─┠+│ [2] │ +└─────┘ +``` + +`arrayFilter`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã€çœç•¥ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## arrayFill(func, arr1, ...) + +`arr1`を最åˆã®è¦ç´ ã‹ã‚‰æœ€å¾Œã®è¦ç´ ã¾ã§ã‚¹ã‚­ãƒ£ãƒ³ã—ã€`func(arr1[i], ..., arrN[i])`ãŒ0ã‚’è¿”ã™å ´åˆã¯`arr1[i - 1]`ã§`arr1[i]`ã‚’ç½®ãæ›ãˆã¾ã™ã€‚`arr1`ã®æœ€åˆã®è¦ç´ ã¯ç½®ãæ›ãˆã‚‰ã‚Œã¾ã›ã‚“。 + +例: + +``` sql +SELECT arrayFill(x -> not isNull(x), [1, null, 3, 11, 12, null, null, 5, 6, 14, null, null]) AS res +``` + +``` text +┌─res──────────────────────────────┠+│ [1,1,3,11,12,12,12,5,6,14,14,14] │ +└──────────────────────────────────┘ +``` + +`arrayFill`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã€çœç•¥ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## arrayReverseFill(func, arr1, ...) + +`arr1`を最後ã®è¦ç´ ã‹ã‚‰æœ€åˆã®è¦ç´ ã¾ã§ã‚¹ã‚­ãƒ£ãƒ³ã—ã€`func(arr1[i], ..., arrN[i])`ãŒ0ã‚’è¿”ã™å ´åˆã¯`arr1[i + 1]`ã§`arr1[i]`ã‚’ç½®ãæ›ãˆã¾ã™ã€‚`arr1`ã®æœ€å¾Œã®è¦ç´ ã¯ç½®ãæ›ãˆã‚‰ã‚Œã¾ã›ã‚“。 + +例: + +``` sql +SELECT arrayReverseFill(x -> not isNull(x), [1, null, 3, 11, 12, null, null, 5, 6, 14, null, null]) AS res +``` + +``` text +┌─res────────────────────────────────┠+│ [1,3,3,11,12,5,5,5,6,14,NULL,NULL] │ +└────────────────────────────────────┘ +``` + +`arrayReverseFill`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã€çœç•¥ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## arraySplit(func, arr1, ...) + +`arr1`を複数ã®é…列ã«åˆ†å‰²ã—ã¾ã™ã€‚`func(arr1[i], ..., arrN[i])`ãŒ0以外を返ã™å ´åˆã€é…列ã¯ãã®è¦ç´ ã®å·¦å´ã§åˆ†å‰²ã•ã‚Œã¾ã™ã€‚é…列ã¯æœ€åˆã®è¦ç´ ã®å‰ã§åˆ†å‰²ã•ã‚Œã¾ã›ã‚“。 + +例: + +``` sql +SELECT arraySplit((x, y) -> y, [1, 2, 3, 4, 5], [1, 0, 0, 1, 0]) AS res +``` + +``` text +┌─res─────────────┠+│ [[1,2,3],[4,5]] │ +└─────────────────┘ +``` + +`arraySplit`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã€çœç•¥ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## arrayReverseSplit(func, arr1, ...) + +`arr1`を複数ã®é…列ã«åˆ†å‰²ã—ã¾ã™ã€‚`func(arr1[i], ..., arrN[i])`ãŒ0以外を返ã™å ´åˆã€é…列ã¯ãã®è¦ç´ ã®å³å´ã§åˆ†å‰²ã•ã‚Œã¾ã™ã€‚é…列ã¯æœ€å¾Œã®è¦ç´ ã®å¾Œã§ã¯åˆ†å‰²ã•ã‚Œã¾ã›ã‚“。 + +例: + +``` sql +SELECT arrayReverseSplit((x, y) -> y, [1, 2, 3, 4, 5], [1, 0, 0, 1, 0]) AS res +``` + +``` text +┌─res───────────────┠+│ [[1],[2,3,4],[5]] │ +└───────────────────┘ +``` + +`arrayReverseSplit`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã€çœç•¥ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## arrayExists(\[func,\] arr1, ...) + +`func(arr1[i], ..., arrN[i])`ãŒ0以外を返ã™è¦ç´ ãŒå°‘ãªãã¨ã‚‚1ã¤å­˜åœ¨ã™ã‚‹å ´åˆã¯1ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +`arrayExists`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## arrayAll(\[func,\] arr1, ...) + +`func(arr1[i], ..., arrN[i])`ãŒã™ã¹ã¦ã®è¦ç´ ã«å¯¾ã—ã¦0以外を返ã™å ´åˆã¯1ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +`arrayAll`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## arrayFirst(func, arr1, ...) + +`func(arr1[i], ..., arrN[i])`ãŒ0以外を返ã™æœ€åˆã®è¦ç´ ã‚’`arr1`é…列ã‹ã‚‰è¿”ã—ã¾ã™ã€‚ + +## arrayFirstOrNull + +`func(arr1[i], ..., arrN[i])`ãŒ0以外を返ã™æœ€åˆã®è¦ç´ ã‚’`arr1`é…列ã‹ã‚‰è¿”ã—ã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +arrayFirstOrNull(func, arr1, ...) +``` + +**パラメータ** + +- `func`: ラムダ関数。[ラムダ関数](../functions/#higher-order-functions---operator-and-lambdaparams-expr-function)。 +- `arr1`: æ“作対象ã®é…列。[é…列](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 渡ã•ã‚ŒãŸé…列ã®æœ€åˆã®è¦ç´ ã€‚ +- ãã†ã§ãªã„å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ + +**実装ã®è©³ç´°** + +`arrayFirstOrNull`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã€çœç•¥ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +**例** + +クエリ: + +```sql +SELECT arrayFirstOrNull(x -> x >= 2, [1, 2, 3]); +``` + +çµæžœ: + +```response +2 +``` + +クエリ: + +```sql +SELECT arrayFirstOrNull(x -> x >= 2, emptyArrayUInt8()); +``` + +çµæžœ: + +```response +\N +``` + +クエリ: + +```sql +SELECT arrayLastOrNull((x,f) -> f, [1,2,3,NULL], [0,1,0,1]); +``` + +çµæžœ: + +```response +\N +``` + +## arrayLast(func, arr1, ...) + +`func(arr1[i], ..., arrN[i])`ãŒ0以外を返ã™æœ€å¾Œã®è¦ç´ ã‚’`arr1`é…列ã‹ã‚‰è¿”ã—ã¾ã™ã€‚ + +`arrayLast`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã€çœç•¥ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## arrayLastOrNull + +`func(arr1[i], ..., arrN[i])`ãŒ0以外を返ã™æœ€å¾Œã®è¦ç´ ã‚’`arr1`é…列ã‹ã‚‰è¿”ã—ã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +arrayLastOrNull(func, arr1, ...) +``` + +**パラメータ** + +- `func`: ラムダ関数。[ラムダ関数](../functions/#higher-order-functions---operator-and-lambdaparams-expr-function)。 +- `arr1`: æ“作対象ã®é…列。[é…列](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 渡ã•ã‚ŒãŸé…列ã®æœ€å¾Œã®è¦ç´ ã€‚ +- ãã†ã§ãªã„å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ + +**実装ã®è©³ç´°** + +`arrayLastOrNull`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã€çœç•¥ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +**例** + +クエリ: + +```sql +SELECT arrayLastOrNull(x -> x >= 2, [1, 2, 3]); +``` + +çµæžœ: + +```response +3 +``` + +クエリ: + +```sql +SELECT arrayLastOrNull(x -> x >= 2, emptyArrayUInt8()); +``` + +çµæžœ: + +```response +\N +``` + +## arrayFirstIndex(func, arr1, ...) + +`func(arr1[i], ..., arrN[i])`ãŒ0以外を返ã™æœ€åˆã®è¦ç´ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’`arr1`é…列ã‹ã‚‰è¿”ã—ã¾ã™ã€‚ + +`arrayFirstIndex`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã€çœç•¥ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## arrayLastIndex(func, arr1, ...) + +`func(arr1[i], ..., arrN[i])`ãŒ0以外を返ã™æœ€å¾Œã®è¦ç´ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’`arr1`é…列ã‹ã‚‰è¿”ã—ã¾ã™ã€‚ + +`arrayLastIndex`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™å¿…è¦ãŒã‚ã‚Šã€çœç•¥ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## arrayMin + +å…ƒã®é…列内ã®è¦ç´ ã®æœ€å°å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +`func`関数ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ã“ã®é–¢æ•°ã«ã‚ˆã£ã¦å¤‰æ›ã•ã‚ŒãŸè¦ç´ ã®æœ€å°å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +`arrayMin`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +```sql +arrayMin([func,] arr) +``` + +**引数** + +- `func` — 関数。[Expression](../data-types/special-data-types/expression.md)。 +- `arr` — é…列。[é…列](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 関数値ã®æœ€å°å€¤ï¼ˆã¾ãŸã¯é…列ã®æœ€å°å€¤ï¼‰ã€‚ + +:::note +`func`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€æˆ»ã‚Šå€¤ã®åž‹ã¯`func`ã®æˆ»ã‚Šå€¤ã®åž‹ã¨ä¸€è‡´ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯é…列ã®è¦ç´ ã®åž‹ã¨ä¸€è‡´ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT arrayMin([1, 2, 4]) AS res; +``` + +çµæžœ: + +```text +┌─res─┠+│ 1 │ +└─────┘ +``` + +クエリ: + +```sql +SELECT arrayMin(x -> (-x), [1, 2, 4]) AS res; +``` + +çµæžœ: + +```text +┌─res─┠+│ -4 │ +└─────┘ +``` + +## arrayMax + +å…ƒã®é…列内ã®è¦ç´ ã®æœ€å¤§å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +`func`関数ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ã“ã®é–¢æ•°ã«ã‚ˆã£ã¦å¤‰æ›ã•ã‚ŒãŸè¦ç´ ã®æœ€å¤§å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +`arrayMax`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +```sql +arrayMax([func,] arr) +``` + +**引数** + +- `func` — 関数。[Expression](../data-types/special-data-types/expression.md)。 +- `arr` — é…列。[é…列](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 関数値ã®æœ€å¤§å€¤ï¼ˆã¾ãŸã¯é…列ã®æœ€å¤§å€¤ï¼‰ã€‚ + +:::note +`func`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€æˆ»ã‚Šå€¤ã®åž‹ã¯`func`ã®æˆ»ã‚Šå€¤ã®åž‹ã¨ä¸€è‡´ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯é…列ã®è¦ç´ ã®åž‹ã¨ä¸€è‡´ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT arrayMax([1, 2, 4]) AS res; +``` + +çµæžœ: + +```text +┌─res─┠+│ 4 │ +└─────┘ +``` + +クエリ: + +```sql +SELECT arrayMax(x -> (-x), [1, 2, 4]) AS res; +``` + +çµæžœ: + +```text +┌─res─┠+│ -1 │ +└─────┘ +``` + +## arraySum + +å…ƒã®é…列内ã®è¦ç´ ã®åˆè¨ˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +`func`関数ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ã“ã®é–¢æ•°ã«ã‚ˆã£ã¦å¤‰æ›ã•ã‚ŒãŸè¦ç´ ã®åˆè¨ˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +`arraySum`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +```sql +arraySum([func,] arr) +``` + +**引数** + +- `func` — 関数。[Expression](../data-types/special-data-types/expression.md)。 +- `arr` — é…列。[é…列](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 関数値ã®åˆè¨ˆå€¤ï¼ˆã¾ãŸã¯é…列ã®åˆè¨ˆå€¤ï¼‰ã€‚ + +:::note +戻り値ã®åž‹: + +- å…ƒã®é…列(ã¾ãŸã¯`func`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯å¤‰æ›ã•ã‚ŒãŸå€¤ï¼‰ã®å°æ•°ã®å ´åˆ — [Decimal128](../data-types/decimal.md)。 +- 浮動å°æ•°ç‚¹æ•°ã®å ´åˆ — [Float64](../data-types/float.md)。 +- 符å·ãªã—æ•´æ•°ã®å ´åˆ — [UInt64](../data-types/int-uint.md)。 +- 符å·ä»˜ãæ•´æ•°ã®å ´åˆ — [Int64](../data-types/int-uint.md)。 +::: + +**例** + +クエリ: + +```sql +SELECT arraySum([2, 3]) AS res; +``` + +çµæžœ: + +```text +┌─res─┠+│ 5 │ +└─────┘ +``` + +クエリ: + +```sql +SELECT arraySum(x -> x*x, [2, 3]) AS res; +``` + +çµæžœ: + +```text +┌─res─┠+│ 13 │ +└─────┘ +``` + +## arrayAvg + +å…ƒã®é…列内ã®è¦ç´ ã®å¹³å‡ã‚’è¿”ã—ã¾ã™ã€‚ + +`func`関数ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ã“ã®é–¢æ•°ã«ã‚ˆã£ã¦å¤‰æ›ã•ã‚ŒãŸè¦ç´ ã®å¹³å‡ã‚’è¿”ã—ã¾ã™ã€‚ + +`arrayAvg`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +```sql +arrayAvg([func,] arr) +``` + +**引数** + +- `func` — 関数。[Expression](../data-types/special-data-types/expression.md)。 +- `arr` — é…列。[é…列](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 関数値ã®å¹³å‡å€¤ï¼ˆã¾ãŸã¯é…列ã®å¹³å‡å€¤ï¼‰ã€‚[Float64](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT arrayAvg([1, 2, 4]) AS res; +``` + +çµæžœ: + +```text +┌────────────────res─┠+│ 2.3333333333333335 │ +└────────────────────┘ +``` + +クエリ: + +```sql +SELECT arrayAvg(x -> (x * x), [2, 4]) AS res; +``` + +çµæžœ: + +```text +┌─res─┠+│ 10 │ +└─────┘ +``` + +## arrayCumSum(\[func,\] arr1, ...) + +å…ƒã®é…列`arr1`ã®è¦ç´ ã®éƒ¨åˆ†ï¼ˆãƒ©ãƒ³ãƒ‹ãƒ³ã‚°ï¼‰åˆè¨ˆã‚’è¿”ã—ã¾ã™ã€‚`func`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€åˆè¨ˆã¯`func`ã‚’`arr1`ã€`arr2`ã€...ã€`arrN`ã«é©ç”¨ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šè¨ˆç®—ã•ã‚Œã¾ã™ã€‚ã™ãªã‚ã¡ã€`func(arr1[i], ..., arrN[i])`ã§ã™ã€‚ + +**構文** + +``` sql +arrayCumSum(arr) +``` + +**引数** + +- `arr` — 数値ã®[é…列](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å…ƒã®é…列ã®è¦ç´ ã®éƒ¨åˆ†åˆè¨ˆã®é…列を返ã—ã¾ã™ã€‚[UInt\*](https://clickhouse.com/docs/ja/data_types/int_uint/#uint-ranges)ã€[Int\*](https://clickhouse.com/docs/ja/data_types/int_uint/#int-ranges)ã€[Float\*](https://clickhouse.com/docs/ja/data_types/float/)。 + +**例** + +``` sql +SELECT arrayCumSum([1, 1, 1, 1]) AS res +``` + +``` text +┌─res──────────┠+│ [1, 2, 3, 4] │ +└──────────────┘ +``` + +`arrayCumSum`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## arrayCumSumNonNegative(\[func,\] arr1, ...) + +`arrayCumSum`ã¨åŒæ§˜ã«ã€å…ƒã®é…列ã®è¦ç´ ã®éƒ¨åˆ†ï¼ˆãƒ©ãƒ³ãƒ‹ãƒ³ã‚°ï¼‰åˆè¨ˆã‚’è¿”ã—ã¾ã™ã€‚`func`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€åˆè¨ˆã¯`func`ã‚’`arr1`ã€`arr2`ã€...ã€`arrN`ã«é©ç”¨ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šè¨ˆç®—ã•ã‚Œã¾ã™ã€‚ã™ãªã‚ã¡ã€`func(arr1[i], ..., arrN[i])`ã§ã™ã€‚`arrayCumSum`ã¨ã¯ç•°ãªã‚Šã€ç¾åœ¨ã®ãƒ©ãƒ³ãƒ‹ãƒ³ã‚°åˆè¨ˆãŒ0未満ã®å ´åˆã€ãã‚Œã¯0ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +arrayCumSumNonNegative(arr) +``` + +**引数** + +- `arr` — 数値ã®[é…列](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å…ƒã®é…列ã®è¦ç´ ã®éžè² éƒ¨åˆ†åˆè¨ˆã®é…列を返ã—ã¾ã™ã€‚[UInt\*](https://clickhouse.com/docs/ja/data_types/int_uint/#uint-ranges)ã€[Int\*](https://clickhouse.com/docs/ja/data_types/int_uint/#int-ranges)ã€[Float\*](https://clickhouse.com/docs/ja/data_types/float/)。 + +**例** + +``` sql +SELECT arrayCumSumNonNegative([1, 1, -4, 1]) AS res +``` + +``` text +┌─res───────┠+│ [1,2,0,1] │ +└───────────┘ +``` + +`arraySumNonNegative`ã¯[高階関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## arrayProduct + +[é…列](../data-types/array.md)ã®è¦ç´ ã‚’ä¹—ç®—ã—ã¾ã™ã€‚ + +**構文** + +``` sql +arrayProduct(arr) +``` + +**引数** + +- `arr` — 数値ã®[é…列](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é…列ã®è¦ç´ ã®ç©ã€‚[Float64](../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT arrayProduct([1,2,3,4,5,6]) as res; +``` + +çµæžœ: + +``` text +┌─res───┠+│ 720 │ +└───────┘ +``` + +クエリ: + +``` sql +SELECT arrayProduct([toDecimal64(1,8), toDecimal64(2,8), toDecimal64(3,8)]) as res, toTypeName(res); +``` + +戻り値ã®åž‹ã¯å¸¸ã«[Float64](../data-types/float.md)ã§ã™ã€‚çµæžœ: + +``` text +┌─res─┬─toTypeName(arrayProduct(array(toDecimal64(1, 8), toDecimal64(2, 8), toDecimal64(3, 8))))─┠+│ 6 │ Float64 │ +└─────┴──────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## arrayRotateLeft + +[é…列](../data-types/array.md)を指定ã—ãŸè¦ç´ æ•°ã ã‘å·¦ã«å›žè»¢ã•ã›ã¾ã™ã€‚ +è¦ç´ æ•°ãŒè² ã®å ´åˆã¯ã€é…列ã¯å³ã«å›žè»¢ã—ã¾ã™ã€‚ + +**構文** + +``` sql +arrayRotateLeft(arr, n) +``` + +**引数** + +- `arr` — [é…列](../data-types/array.md)。 +- `n` — 回転ã•ã›ã‚‹è¦ç´ ã®æ•°ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸè¦ç´ æ•°ã ã‘å·¦ã«å›žè»¢ã•ã›ãŸé…列。[é…列](../data-types/array.md)。 + +**例** + +クエリ: + +``` sql +SELECT arrayRotateLeft([1,2,3,4,5,6], 2) as res; +``` + +çµæžœ: + +``` text +┌─res───────────┠+│ [3,4,5,6,1,2] │ +└───────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayRotateLeft([1,2,3,4,5,6], -2) as res; +``` + +çµæžœ: + +``` text +┌─res───────────┠+│ [5,6,1,2,3,4] │ +└───────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayRotateLeft(['a','b','c','d','e'], 3) as res; +``` + +çµæžœ: + +``` text +┌─res───────────────────┠+│ ['d','e','a','b','c'] │ +└───────────────────────┘ +``` + +## arrayRotateRight + +[é…列](../data-types/array.md)を指定ã—ãŸè¦ç´ æ•°ã ã‘å³ã«å›žè»¢ã•ã›ã¾ã™ã€‚ +è¦ç´ æ•°ãŒè² ã®å ´åˆã¯ã€é…列ã¯å·¦ã«å›žè»¢ã—ã¾ã™ã€‚ + +**構文** + +``` sql +arrayRotateRight(arr, n) +``` + +**引数** + +- `arr` — [é…列](../data-types/array.md)。 +- `n` — 回転ã•ã›ã‚‹è¦ç´ ã®æ•°ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸè¦ç´ æ•°ã ã‘å³ã«å›žè»¢ã•ã›ãŸé…列。[é…列](../data-types/array.md)。 + +**例** + +クエリ: + +``` sql +SELECT arrayRotateRight([1,2,3,4,5,6], 2) as res; +``` + +çµæžœ: + +``` text +┌─res───────────┠+│ [5,6,1,2,3,4] │ +└───────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayRotateRight([1,2,3,4,5,6], -2) as res; +``` + +çµæžœ: + +``` text +┌─res───────────┠+│ [3,4,5,6,1,2] │ +└───────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayRotateRight(['a','b','c','d','e'], 3) as res; +``` + +çµæžœ: + +``` text +┌─res───────────────────┠+│ ['c','d','e','a','b'] │ +└───────────────────────┘ +``` + +## arrayShiftLeft + +[é…列](../data-types/array.md)を指定ã—ãŸè¦ç´ æ•°ã ã‘å·¦ã«ã‚·ãƒ•ãƒˆã—ã¾ã™ã€‚ +æ–°ã—ã„è¦ç´ ã¯æä¾›ã•ã‚ŒãŸå¼•æ•°ã¾ãŸã¯é…列è¦ç´ åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§åŸ‹ã‚られã¾ã™ã€‚ +è¦ç´ æ•°ãŒè² ã®å ´åˆã¯ã€é…列ã¯å³ã«ã‚·ãƒ•ãƒˆã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +arrayShiftLeft(arr, n[, default]) +``` + +**引数** + +- `arr` — [é…列](../data-types/array.md)。 +- `n` — シフトã•ã›ã‚‹è¦ç´ ã®æ•°ã€‚ +- `default` — オプション。新ã—ã„è¦ç´ ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸè¦ç´ æ•°ã ã‘å·¦ã«ã‚·ãƒ•ãƒˆã•ã›ãŸé…列。[é…列](../data-types/array.md)。 + +**例** + +クエリ: + +``` sql +SELECT arrayShiftLeft([1,2,3,4,5,6], 2) as res; +``` + +çµæžœ: + +``` text +┌─res───────────┠+│ [3,4,5,6,0,0] │ +└───────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayShiftLeft([1,2,3,4,5,6], -2) as res; +``` + +çµæžœ: + +``` text +┌─res───────────┠+│ [0,0,1,2,3,4] │ +└───────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayShiftLeft([1,2,3,4,5,6], 2, 42) as res; +``` + +çµæžœ: + +``` text +┌─res─────────────┠+│ [3,4,5,6,42,42] │ +└─────────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayShiftLeft(['a','b','c','d','e','f'], 3, 'foo') as res; +``` + +çµæžœ: + +``` text +┌─res─────────────────────────────┠+│ ['d','e','f','foo','foo','foo'] │ +└─────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayShiftLeft([1,2,3,4,5,6] :: Array(UInt16), 2, 4242) as res; +``` + +çµæžœ: + +``` text +┌─res─────────────────┠+│ [3,4,5,6,4242,4242] │ +└─────────────────────┘ +``` + +## arrayShiftRight + +[é…列](../data-types/array.md)を指定ã—ãŸè¦ç´ æ•°ã ã‘å³ã«ã‚·ãƒ•ãƒˆã—ã¾ã™ã€‚ +æ–°ã—ã„è¦ç´ ã¯æä¾›ã•ã‚ŒãŸå¼•æ•°ã¾ãŸã¯é…列è¦ç´ åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§åŸ‹ã‚られã¾ã™ã€‚ +è¦ç´ æ•°ãŒè² ã®å ´åˆã¯ã€é…列ã¯å·¦ã«ã‚·ãƒ•ãƒˆã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +arrayShiftRight(arr, n[, default]) +``` + +**引数** + +- `arr` — [é…列](../data-types/array.md)。 +- `n` — シフトã•ã›ã‚‹è¦ç´ ã®æ•°ã€‚ +- `default` — オプション。新ã—ã„è¦ç´ ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸè¦ç´ æ•°ã ã‘å³ã«ã‚·ãƒ•ãƒˆã•ã›ãŸé…列。[é…列](../data-types/array.md)。 + +**例** + +クエリ: + +``` sql +SELECT arrayShiftRight([1,2,3,4,5,6], 2) as res; +``` + +çµæžœ: + +``` text +┌─res───────────┠+│ [0,0,1,2,3,4] │ +└───────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayShiftRight([1,2,3,4,5,6], -2) as res; +``` + +çµæžœ: + +``` text +┌─res───────────┠+│ [3,4,5,6,0,0] │ +└───────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayShiftRight([1,2,3,4,5,6], 2, 42) as res; +``` + +çµæžœ: + +``` text +┌─res─────────────┠+│ [42,42,1,2,3,4] │ +└─────────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayShiftRight(['a','b','c','d','e','f'], 3, 'foo') as res; +``` + +çµæžœ: + +``` text +┌─res─────────────────────────────┠+│ ['foo','foo','foo','a','b','c'] │ +└─────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT arrayShiftRight([1,2,3,4,5,6] :: Array(UInt16), 2, 4242) as res; +``` + +çµæžœ: + +``` text +┌─res─────────────────┠+│ [4242,4242,1,2,3,4] │ +└─────────────────────┘ +``` + +## arrayRandomSample + +関数`arrayRandomSample`ã¯ã€å…¥åŠ›é…列ã‹ã‚‰ãƒ©ãƒ³ãƒ€ãƒ ã«`samples`個ã®è¦ç´ ã®ã‚µãƒ–セットを返ã—ã¾ã™ã€‚`samples`ãŒå…¥åŠ›é…列ã®ã‚µã‚¤ã‚ºã‚’超ãˆã‚‹å ´åˆã€ã‚µãƒ³ãƒ—ルサイズã¯é…列ã®ã‚µã‚¤ã‚ºã«åˆ¶é™ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€ã™ã¹ã¦ã®é…列è¦ç´ ãŒè¿”ã•ã‚Œã¾ã™ãŒã€é †åºã¯ä¿è¨¼ã•ã‚Œã¾ã›ã‚“。ã“ã®é–¢æ•°ã¯ãƒ•ãƒ©ãƒƒãƒˆãªé…列ã¨ãƒã‚¹ãƒˆã•ã‚ŒãŸé…列ã®ä¸¡æ–¹ã‚’処ç†ã§ãã¾ã™ã€‚ + +**構文** + +```sql +arrayRandomSample(arr, samples) +``` + +**引数** + +- `arr` — サンプルè¦ç´ ã‚’抽出ã™ã‚‹å…¥åŠ›é…列。([Array(T)](../data-types/array.md)) +- `samples` — ランダムサンプルã«å«ã‚ã‚‹è¦ç´ ã®æ•° ([UInt*](../data-types/int-uint.md)) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力é…列ã‹ã‚‰ãƒ©ãƒ³ãƒ€ãƒ ã«ã‚µãƒ³ãƒ—ルã—ãŸè¦ç´ ã®é…列。[é…列](../data-types/array.md)。 + +**例** + +クエリ: + +```sql +SELECT arrayRandomSample(['apple', 'banana', 'cherry', 'date'], 2) as res; +``` + +çµæžœ: + +``` +┌─res────────────────┠+│ ['cherry','apple'] │ +└────────────────────┘ +``` + +クエリ: + +```sql +SELECT arrayRandomSample([[1, 2], [3, 4], [5, 6]], 2) as res; +``` + +çµæžœ: + +``` +┌─res───────────┠+│ [[3,4],[5,6]] │ +└───────────────┘ +``` + +クエリ: + +```sql +SELECT arrayRandomSample([1, 2, 3], 5) as res; +``` + +çµæžœ: + +``` +┌─res─────┠+│ [3,1,2] │ +└─────────┘ +``` + +## è·é›¢é–¢æ•° + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®é–¢æ•°ã¯ã€[è·é›¢é–¢æ•°ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](../../sql-reference/functions/distance-functions.md)ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/functions/array-join.md b/docs/ja/sql-reference/functions/array-join.md new file mode 100644 index 00000000000..1315f1fa1a2 --- /dev/null +++ b/docs/ja/sql-reference/functions/array-join.md @@ -0,0 +1,153 @@ +--- +slug: /ja/sql-reference/functions/array-join +sidebar_position: 15 +sidebar_label: arrayJoin +--- + +# arrayJoin 関数 + +ã“ã‚Œã¯éžå¸¸ã«ç‰¹æ®Šãªé–¢æ•°ã§ã™ã€‚ + +通常ã®é–¢æ•°ã¯è¡Œã®é›†åˆã‚’変ãˆãšã«ã€å„è¡Œã®å€¤ã ã‘を変更ã—ã¾ã™ï¼ˆãƒžãƒƒãƒ—)。 +集計関数ã¯è¡Œã®é›†åˆã‚’圧縮ã—ã¾ã™ï¼ˆãƒ•ã‚©ãƒ¼ãƒ«ãƒ‰ã¾ãŸã¯ãƒªãƒ‡ãƒ¥ãƒ¼ã‚¹ï¼‰ã€‚ +`arrayJoin` 関数ã¯å„行をå–ã‚Šã€è¡Œã®é›†åˆã‚’生æˆã—ã¾ã™ï¼ˆã‚¢ãƒ³ãƒ•ã‚©ãƒ¼ãƒ«ãƒ‰ï¼‰ã€‚ + +ã“ã®é–¢æ•°ã¯é…列を引数ã«å–ã‚Šã€é…列ã®è¦ç´ æ•°ã«å¿œã˜ã¦å…ƒã®è¡Œã‚’複数ã®è¡Œã«å±•é–‹ã—ã¾ã™ã€‚ +ã“ã®é–¢æ•°ãŒé©ç”¨ã•ã‚ŒãŸã‚«ãƒ©ãƒ ä»¥å¤–ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã®å€¤ã¯å˜ç´”ã«ã‚³ãƒ”ーã•ã‚Œã€é©ç”¨ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å€¤ã¯å¯¾å¿œã™ã‚‹é…列ã®å€¤ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +例: + +``` sql +SELECT arrayJoin([1, 2, 3] AS src) AS dst, 'Hello', src +``` + +``` text +┌─dst─┬─\'Hello\'─┬─src─────┠+│ 1 │ Hello │ [1,2,3] │ +│ 2 │ Hello │ [1,2,3] │ +│ 3 │ Hello │ [1,2,3] │ +└─────┴───────────┴─────────┘ +``` + +`arrayJoin` 関数㯠`WHERE` セクションをå«ã‚€ã‚¯ã‚¨ãƒªã®ã™ã¹ã¦ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«å½±éŸ¿ã‚’与ãˆã¾ã™ã€‚サブクエリãŒ1行を返ã—ãŸã«ã‚‚ã‹ã‹ã‚らãšã€çµæžœãŒ2を示ã—ã¦ã„る点ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +例: + +```sql +SELECT sum(1) AS impressions +FROM +( + SELECT ['Istanbul', 'Berlin', 'Bobruisk'] AS cities +) +WHERE arrayJoin(cities) IN ['Istanbul', 'Berlin']; +``` + +``` text +┌─impressions─┠+│ 2 │ +└─────────────┘ +``` + +クエリã¯è¤‡æ•°ã® `arrayJoin` 関数を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€å¤‰æ›ãŒè¤‡æ•°å›žè¡Œã‚ã‚Œã€è¡ŒãŒå¢—ãˆã¾ã™ã€‚ + +例: + +```sql +SELECT + sum(1) AS impressions, + arrayJoin(cities) AS city, + arrayJoin(browsers) AS browser +FROM +( + SELECT + ['Istanbul', 'Berlin', 'Bobruisk'] AS cities, + ['Firefox', 'Chrome', 'Chrome'] AS browsers +) +GROUP BY + 2, + 3 +``` + +``` text +┌─impressions─┬─city─────┬─browser─┠+│ 2 │ Istanbul │ Chrome │ +│ 1 │ Istanbul │ Firefox │ +│ 2 │ Berlin │ Chrome │ +│ 1 │ Berlin │ Firefox │ +│ 2 │ Bobruisk │ Chrome │ +│ 1 │ Bobruisk │ Firefox │ +└─────────────┴──────────┴─────────┘ +``` +### é‡è¦ãªæ³¨æ„ç‚¹ï¼ +åŒã˜å¼ã§è¤‡æ•°ã® `arrayJoin` を使用ã™ã‚‹ã¨ã€æœ€é©åŒ–ã®ãŸã‚ã«æœŸå¾…ã•ã‚Œã‚‹çµæžœãŒå¾—られãªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ãã®å ´åˆã€çµåˆçµæžœã«å½±éŸ¿ã—ãªã„追加ã®æ“作ã§ç¹°ã‚Šè¿”ã•ã‚Œã‚‹é…列å¼ã‚’修正ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„ - 例: `arrayJoin(arraySort(arr))`, `arrayJoin(arrayConcat(arr, []))` + +例: +```sql +SELECT + arrayJoin(dice) as first_throw, + /* arrayJoin(dice) as second_throw */ -- 技術的ã«ã¯æ­£ã—ã„ã§ã™ãŒã€çµæžœã‚»ãƒƒãƒˆã‚’消ã—ã¦ã—ã¾ã„ã¾ã™ + arrayJoin(arrayConcat(dice, [])) as second_throw -- æ„図的ã«è¡¨ç¾ã‚’変更ã—ã¦å†è©•ä¾¡ã‚’強制 +FROM ( + SELECT [1, 2, 3, 4, 5, 6] as dice +); +``` + +SELECT クエリ㮠[ARRAY JOIN](../statements/select/array-join.md) 構文ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€ã‚ˆã‚Šåºƒã„å¯èƒ½æ€§ãŒæä¾›ã•ã‚Œã¾ã™ã€‚ +`ARRAY JOIN` ã¯ã€åŒã˜æ•°ã®è¦ç´ ã‚’æŒã¤è¤‡æ•°ã®é…列を一度ã«å¤‰æ›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +例: + +```sql +SELECT + sum(1) AS impressions, + city, + browser +FROM +( + SELECT + ['Istanbul', 'Berlin', 'Bobruisk'] AS cities, + ['Firefox', 'Chrome', 'Chrome'] AS browsers +) +ARRAY JOIN + cities AS city, + browsers AS browser +GROUP BY + 2, + 3 +``` + +``` text +┌─impressions─┬─city─────┬─browser─┠+│ 1 │ Istanbul │ Firefox │ +│ 1 │ Berlin │ Chrome │ +│ 1 │ Bobruisk │ Chrome │ +└─────────────┴──────────┴─────────┘ +``` + +ã¾ãŸã¯ [Tuple](../data-types/tuple.md) を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +例: + +```sql +SELECT + sum(1) AS impressions, + (arrayJoin(arrayZip(cities, browsers)) AS t).1 AS city, + t.2 AS browser +FROM +( + SELECT + ['Istanbul', 'Berlin', 'Bobruisk'] AS cities, + ['Firefox', 'Chrome', 'Chrome'] AS browsers +) +GROUP BY + 2, + 3 +``` + +``` text +┌─impressions─┬─city─────┬─browser─┠+│ 1 │ Istanbul │ Firefox │ +│ 1 │ Berlin │ Chrome │ +│ 1 │ Bobruisk │ Chrome │ +└─────────────┴──────────┴─────────┘ +``` diff --git a/docs/ja/sql-reference/functions/bit-functions.md b/docs/ja/sql-reference/functions/bit-functions.md new file mode 100644 index 00000000000..fb8037231da --- /dev/null +++ b/docs/ja/sql-reference/functions/bit-functions.md @@ -0,0 +1,439 @@ +--- +slug: /ja/sql-reference/functions/bit-functions +sidebar_position: 20 +sidebar_label: Bit +--- + +# ビット関数 + +ビット関数ã¯ã€`UInt8`ã€`UInt16`ã€`UInt32`ã€`UInt64`ã€`Int8`ã€`Int16`ã€`Int32`ã€`Int64`ã€`Float32`ã€`Float64`ã®ä»»æ„ã®ãƒšã‚¢ã®åž‹ã«å¯¾ã—ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚一部ã®é–¢æ•°ã¯`String`ãŠã‚ˆã³`FixedString`型もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +çµæžœã®åž‹ã¯ã€ãã®å¼•æ•°ã®æœ€å¤§ãƒ“ット数ã«ç­‰ã—ã„æ•´æ•°ã§ã™ã€‚å°‘ãªãã¨ã‚‚一ã¤ã®å¼•æ•°ãŒç¬¦å·ä»˜ãã§ã‚ã‚‹å ´åˆã€çµæžœã¯ç¬¦å·ä»˜ãæ•°ã«ãªã‚Šã¾ã™ã€‚引数ãŒæµ®å‹•å°æ•°ç‚¹æ•°ã®å ´åˆã€ãã‚Œã¯Int64ã«ã‚­ãƒ£ã‚¹ãƒˆã•ã‚Œã¾ã™ã€‚ + +## bitAnd(a, b) + +## bitOr(a, b) + +## bitXor(a, b) + +## bitNot(a) + +## bitShiftLeft(a, b) + +値ã®ãƒã‚¤ãƒŠãƒªè¡¨ç¾ã‚’指定ã•ã‚ŒãŸãƒ“ットä½ç½®æ•°ã ã‘å·¦ã«ã‚·ãƒ•ãƒˆã—ã¾ã™ã€‚ + +`FixedString`ã¾ãŸã¯`String`ã¯å˜ä¸€ã®ãƒžãƒ«ãƒãƒã‚¤ãƒˆå€¤ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ + +`FixedString`値ã®ãƒ“ットã¯ã‚·ãƒ•ãƒˆã‚¢ã‚¦ãƒˆã•ã‚Œã‚‹ã¨å¤±ã‚ã‚Œã¾ã™ã€‚一方ã€`String`値ã¯è¿½åŠ ã®ãƒã‚¤ãƒˆã§æ‹¡å¼µã•ã‚Œã‚‹ãŸã‚ã€ãƒ“ットã¯å¤±ã‚ã‚Œã¾ã›ã‚“。 + +**構文** + +``` sql +bitShiftLeft(a, b) +``` + +**引数** + +- `a` — シフトã™ã‚‹å€¤ã§ã™ã€‚[æ•´æ•°åž‹](../data-types/int-uint.md)ã€[String](../data-types/string.md)ã€ã¾ãŸã¯[FixedString](../data-types/fixedstring.md)。 +- `b` — シフトä½ç½®ã®æ•°ã§ã™ã€‚[符å·ãªã—æ•´æ•°åž‹](../data-types/int-uint.md)ã€64ビット型以下ãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- シフトã•ã‚ŒãŸå€¤ã€‚ + +è¿”ã•ã‚Œã‚‹å€¤ã®åž‹ã¯ã€å…¥åŠ›å€¤ã®åž‹ã¨åŒã˜ã§ã™ã€‚ + +**例** + +以下ã®ã‚¯ã‚¨ãƒªã§ã¯ã€ã‚·ãƒ•ãƒˆã•ã‚ŒãŸå€¤ã®ãƒ“ットを表示ã™ã‚‹ãŸã‚ã«[bin](encoding-functions.md#bin)ãŠã‚ˆã³[hex](encoding-functions.md#hex)関数ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +``` sql +SELECT 99 AS a, bin(a), bitShiftLeft(a, 2) AS a_shifted, bin(a_shifted); +SELECT 'abc' AS a, hex(a), bitShiftLeft(a, 4) AS a_shifted, hex(a_shifted); +SELECT toFixedString('abc', 3) AS a, hex(a), bitShiftLeft(a, 4) AS a_shifted, hex(a_shifted); +``` + +çµæžœ: + +``` text +┌──a─┬─bin(99)──┬─a_shifted─┬─bin(bitShiftLeft(99, 2))─┠+│ 99 │ 01100011 │ 140 │ 10001100 │ +└────┴──────────┴───────────┴──────────────────────────┘ +┌─a───┬─hex('abc')─┬─a_shifted─┬─hex(bitShiftLeft('abc', 4))─┠+│ abc │ 616263 │ &0 │ 06162630 │ +└─────┴────────────┴───────────┴─────────────────────────────┘ +┌─a───┬─hex(toFixedString('abc', 3))─┬─a_shifted─┬─hex(bitShiftLeft(toFixedString('abc', 3), 4))─┠+│ abc │ 616263 │ &0 │ 162630 │ +└─────┴──────────────────────────────┴───────────┴───────────────────────────────────────────────┘ +``` + +## bitShiftRight(a, b) + +値ã®ãƒã‚¤ãƒŠãƒªè¡¨ç¾ã‚’指定ã•ã‚ŒãŸãƒ“ットä½ç½®æ•°ã ã‘å³ã«ã‚·ãƒ•ãƒˆã—ã¾ã™ã€‚ + +`FixedString`ã¾ãŸã¯`String`ã¯å˜ä¸€ã®ãƒžãƒ«ãƒãƒã‚¤ãƒˆå€¤ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚`String`値ã®é•·ã•ã¯ãƒ“ットãŒã‚·ãƒ•ãƒˆã‚¢ã‚¦ãƒˆã•ã‚Œã‚‹ã¨æ¸›å°‘ã—ã¾ã™ã®ã§æ³¨æ„ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +bitShiftRight(a, b) +``` + +**引数** + +- `a` — シフトã™ã‚‹å€¤ã§ã™ã€‚[æ•´æ•°åž‹](../data-types/int-uint.md)ã€[String](../data-types/string.md)ã€ã¾ãŸã¯[FixedString](../data-types/fixedstring.md)。 +- `b` — シフトä½ç½®ã®æ•°ã§ã™ã€‚[符å·ãªã—æ•´æ•°åž‹](../data-types/int-uint.md)ã€64ビット型以下ãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- シフトã•ã‚ŒãŸå€¤ã€‚ + +è¿”ã•ã‚Œã‚‹å€¤ã®åž‹ã¯ã€å…¥åŠ›å€¤ã®åž‹ã¨åŒã˜ã§ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT 101 AS a, bin(a), bitShiftRight(a, 2) AS a_shifted, bin(a_shifted); +SELECT 'abc' AS a, hex(a), bitShiftRight(a, 12) AS a_shifted, hex(a_shifted); +SELECT toFixedString('abc', 3) AS a, hex(a), bitShiftRight(a, 12) AS a_shifted, hex(a_shifted); +``` + +çµæžœ: + +``` text +┌───a─┬─bin(101)─┬─a_shifted─┬─bin(bitShiftRight(101, 2))─┠+│ 101 │ 01100101 │ 25 │ 00011001 │ +└─────┴──────────┴───────────┴────────────────────────────┘ +┌─a───┬─hex('abc')─┬─a_shifted─┬─hex(bitShiftRight('abc', 12))─┠+│ abc │ 616263 │ │ 0616 │ +└─────┴────────────┴───────────┴───────────────────────────────┘ +┌─a───┬─hex(toFixedString('abc', 3))─┬─a_shifted─┬─hex(bitShiftRight(toFixedString('abc', 3), 12))─┠+│ abc │ 616263 │ │ 000616 │ +└─────┴──────────────────────────────┴───────────┴─────────────────────────────────────────────────┘ +``` + +## bitRotateLeft(a, b) + +## bitRotateRight(a, b) + +## bitSlice(s, offset, length) + +‘offset’インデックスã‹ã‚‰å§‹ã¾ã‚‹â€˜length’ビットã®ãƒ“ットサブストリングを返ã—ã¾ã™ã€‚ビットã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯1ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +bitSlice(s, offset[, length]) +``` + +**引数** + +- `s` — sã¯[String](../data-types/string.md)ã¾ãŸã¯[FixedString](../data-types/fixedstring.md)。 +- `offset` — ビットã®é–‹å§‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚æ­£ã®å€¤ã¯å·¦ã‹ã‚‰ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’示ã—ã€è² ã®å€¤ã¯å³ã‹ã‚‰ã®ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã‚’示ã—ã¾ã™ã€‚ビットã®ç•ªå·ä»˜ã‘ã¯1ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ +- `length` — ビットã®ã‚µãƒ–ストリングã®é•·ã•ã€‚è² ã®å€¤ã‚’指定ã™ã‚‹ã¨ã€é–¢æ•°ã¯é–‹ã„ãŸã‚µãƒ–ストリング\[offset, array_length - length\]ã‚’è¿”ã—ã¾ã™ã€‚値をçœç•¥ã™ã‚‹ã¨ã€é–¢æ•°ã¯ã‚µãƒ–ストリング\[offset, the_end_string\]ã‚’è¿”ã—ã¾ã™ã€‚lengthãŒsを超ãˆã‚‹ã¨åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ã€‚lengthãŒ8ã®å€æ•°ã§ãªã„å ´åˆã€å³ã«0を埋ã‚ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- サブストリング。[String](../data-types/string.md) + +**例** + +クエリ: + +``` sql +select bin('Hello'), bin(bitSlice('Hello', 1, 8)) +select bin('Hello'), bin(bitSlice('Hello', 1, 2)) +select bin('Hello'), bin(bitSlice('Hello', 1, 9)) +select bin('Hello'), bin(bitSlice('Hello', -4, 8)) +``` + +çµæžœ: + +``` text +┌─bin('Hello')─────────────────────────────┬─bin(bitSlice('Hello', 1, 8))─┠+│ 0100100001100101011011000110110001101111 │ 01001000 │ +└──────────────────────────────────────────┴──────────────────────────────┘ +┌─bin('Hello')─────────────────────────────┬─bin(bitSlice('Hello', 1, 2))─┠+│ 0100100001100101011011000110110001101111 │ 01000000 │ +└──────────────────────────────────────────┴──────────────────────────────┘ +┌─bin('Hello')─────────────────────────────┬─bin(bitSlice('Hello', 1, 9))─┠+│ 0100100001100101011011000110110001101111 │ 0100100000000000 │ +└──────────────────────────────────────────┴──────────────────────────────┘ +┌─bin('Hello')─────────────────────────────┬─bin(bitSlice('Hello', -4, 8))─┠+│ 0100100001100101011011000110110001101111 │ 11110000 │ +└──────────────────────────────────────────┴───────────────────────────────┘ +``` + +## byteSlice(s, offset, length) + +関数[substring](string-functions.md#substring)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## bitTest + +ä»»æ„ã®æ•´æ•°ã‚’[2進法](https://en.wikipedia.org/wiki/Binary_number)ã«å¤‰æ›ã—ã€æŒ‡å®šã•ã‚ŒãŸä½ç½®ã«ã‚るビットã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚カウントã¯å³ã‹ã‚‰å·¦ã¸0ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +SELECT bitTest(number, index) +``` + +**引数** + +- `number` – 整数。 +- `index` – ビットã®ä½ç½®ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸä½ç½®ã«ã‚るビットã®å€¤ã€‚[UInt8](../data-types/int-uint.md)。 + +**例** + +例ãˆã°ã€10進数ã§43ã®æ•°ã¯2進数ã§101011ã§ã™ã€‚ + +クエリ: + +``` sql +SELECT bitTest(43, 1); +``` + +çµæžœ: + +``` text +┌─bitTest(43, 1)─┠+│ 1 │ +└────────────────┘ +``` + +別ã®ä¾‹: + +クエリ: + +``` sql +SELECT bitTest(43, 2); +``` + +çµæžœ: + +``` text +┌─bitTest(43, 2)─┠+│ 0 │ +└────────────────┘ +``` + +## bitTestAll + +指定ã•ã‚ŒãŸä½ç½®ã®ã™ã¹ã¦ã®ãƒ“ットã®[è«–ç†ç©](https://en.wikipedia.org/wiki/Logical_conjunction)(AND演算å­ï¼‰ã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚カウントã¯å³ã‹ã‚‰å·¦ã¸ã€0ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ + +ビットå˜ä½ã®æ¼”ç®—ã§ã®ç©: + +0 AND 0 = 0 + +0 AND 1 = 0 + +1 AND 0 = 0 + +1 AND 1 = 1 + +**構文** + +``` sql +SELECT bitTestAll(number, index1, index2, index3, index4, ...) +``` + +**引数** + +- `number` – 整数。 +- `index1`, `index2`, `index3`, `index4` – ビットã®ä½ç½®ã€‚例ãˆã°ã€ä½ç½®ã®ã‚»ãƒƒãƒˆ (`index1`, `index2`, `index3`, `index4`) ãŒã™ã¹ã¦çœŸã§ã‚ã‚‹å ´åˆï¼ˆ`index1` â‹€ `index2` â‹€ `index3` â‹€ `index4`)ã«ã®ã¿çœŸã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- è«–ç†ç©ã®çµæžœã€‚[UInt8](../data-types/int-uint.md)。 + +**例** + +例ãˆã°ã€10進数ã§43ã®æ•°ã¯2進数ã§101011ã§ã™ã€‚ + +クエリ: + +``` sql +SELECT bitTestAll(43, 0, 1, 3, 5); +``` + +çµæžœ: + +``` text +┌─bitTestAll(43, 0, 1, 3, 5)─┠+│ 1 │ +└────────────────────────────┘ +``` + +別ã®ä¾‹: + +クエリ: + +``` sql +SELECT bitTestAll(43, 0, 1, 3, 5, 2); +``` + +çµæžœ: + +``` text +┌─bitTestAll(43, 0, 1, 3, 5, 2)─┠+│ 0 │ +└───────────────────────────────┘ +``` + +## bitTestAny + +指定ã•ã‚ŒãŸä½ç½®ã®ã™ã¹ã¦ã®ãƒ“ットã®[è«–ç†å’Œ](https://en.wikipedia.org/wiki/Logical_disjunction)(OR演算å­ï¼‰ã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚カウントã¯å³ã‹ã‚‰å·¦ã¸ã€0ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ + +ビットå˜ä½ã®æ¼”ç®—ã§ã®å’Œ: + +0 OR 0 = 0 + +0 OR 1 = 1 + +1 OR 0 = 1 + +1 OR 1 = 1 + +**構文** + +``` sql +SELECT bitTestAny(number, index1, index2, index3, index4, ...) +``` + +**引数** + +- `number` – 整数。 +- `index1`, `index2`, `index3`, `index4` – ビットã®ä½ç½®ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- è«–ç†å’Œã®çµæžœã€‚[UInt8](../data-types/int-uint.md)。 + +**例** + +例ãˆã°ã€10進数ã§43ã®æ•°ã¯2進数ã§101011ã§ã™ã€‚ + +クエリ: + +``` sql +SELECT bitTestAny(43, 0, 2); +``` + +çµæžœ: + +``` text +┌─bitTestAny(43, 0, 2)─┠+│ 1 │ +└──────────────────────┘ +``` + +別ã®ä¾‹: + +クエリ: + +``` sql +SELECT bitTestAny(43, 4, 2); +``` + +çµæžœ: + +``` text +┌─bitTestAny(43, 4, 2)─┠+│ 0 │ +└──────────────────────┘ +``` + +## bitCount + +æ•°ã®2進表ç¾ã§1ã«è¨­å®šã•ã‚ŒãŸãƒ“ットã®æ•°ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitCount(x) +``` + +**引数** + +- `x` — [æ•´æ•°](../data-types/int-uint.md)ã¾ãŸã¯[浮動å°æ•°ç‚¹](../data-types/float.md)数。関数ã¯ãƒ¡ãƒ¢ãƒªå†…ã§ã®å€¤è¡¨ç¾ã‚’使用ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æµ®å‹•å°æ•°ç‚¹æ•°ã®ã‚µãƒãƒ¼ãƒˆãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力数ã§1ã«è¨­å®šã•ã‚ŒãŸãƒ“ットã®æ•°ã€‚[UInt8](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯ã€å…¥åŠ›å€¤ã‚’より大ããªåž‹ã«å¤‰æ›ã—ã¾ã›ã‚“([符å·æ‹¡å¼µ](https://en.wikipedia.org/wiki/Sign_extension))。例ãˆã°ã€`bitCount(toUInt8(-1)) = 8`ã§ã™ã€‚ +::: + +**例** + +例ãˆã°ã€æ•°å€¤333ã‚’å–り上ã’ã¾ã™ã€‚ãã®2進表ç¾: 0000000101001101。 + +クエリ: + +``` sql +SELECT bitCount(333); +``` + +çµæžœ: + +``` text +┌─bitCount(333)─┠+│ 5 │ +└───────────────┘ +``` + +## bitHammingDistance + +2ã¤ã®æ•´æ•°å€¤ã®ãƒ“ット表ç¾é–“ã®[ãƒãƒŸãƒ³ã‚°è·é›¢](https://en.wikipedia.org/wiki/Hamming_distance)ã‚’è¿”ã—ã¾ã™ã€‚[SimHash](../../sql-reference/functions/hash-functions.md#ngramsimhash)関数ã¨çµ„ã¿åˆã‚ã›ã¦ã€åŠé‡è¤‡æ–‡å­—列ã®æ¤œå‡ºã«ä½¿ç”¨ã§ãã¾ã™ã€‚è·é›¢ãŒå°ã•ã„ã»ã©ã€ãれらã®æ–‡å­—列ãŒåŒã˜ã§ã‚ã‚‹å¯èƒ½æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +bitHammingDistance(int1, int2) +``` + +**引数** + +- `int1` — åˆã®æ•´æ•°å€¤ã€‚[Int64](../data-types/int-uint.md)。 +- `int2` — 次ã®æ•´æ•°å€¤ã€‚[Int64](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒŸãƒ³ã‚°è·é›¢ã€‚[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT bitHammingDistance(111, 121); +``` + +çµæžœ: + +``` text +┌─bitHammingDistance(111, 121)─┠+│ 3 │ +└──────────────────────────────┘ +``` + +[SimHash](../../sql-reference/functions/hash-functions.md#ngramsimhash)ã¨ä¸€ç·’ã«: + +``` sql +SELECT bitHammingDistance(ngramSimHash('cat ate rat'), ngramSimHash('rat ate cat')); +``` + +çµæžœ: + +``` text +┌─bitHammingDistance(ngramSimHash('cat ate rat'), ngramSimHash('rat ate cat'))─┠+│ 5 │ +└──────────────────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/bitmap-functions.md b/docs/ja/sql-reference/functions/bitmap-functions.md new file mode 100644 index 00000000000..1b9719397f0 --- /dev/null +++ b/docs/ja/sql-reference/functions/bitmap-functions.md @@ -0,0 +1,587 @@ +--- +slug: /ja/sql-reference/functions/bitmap-functions +sidebar_position: 25 +sidebar_label: Bitmap +--- + +# Bitmap関数 + +ビットマップã¯2ã¤ã®æ–¹æ³•ã§æ§‹ç¯‰ã§ãã¾ã™ã€‚1ã¤ç›®ã¯é›†è¨ˆé–¢æ•°groupBitmapã¨`-State`を用ã„ã¦æ§‹ç¯‰ã™ã‚‹æ–¹æ³•ã§ã€ã‚‚ã†1ã¤ã¯é…列オブジェクトã‹ã‚‰ãƒ“ットマップを構築ã™ã‚‹æ–¹æ³•ã§ã™ã€‚ + +## bitmapBuild + +符å·ãªã—æ•´æ•°é…列ã‹ã‚‰ãƒ“ットマップを構築ã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitmapBuild(array) +``` + +**引数** + +- `array` – 符å·ãªã—æ•´æ•°é…列。 + +**例** + +``` sql +SELECT bitmapBuild([1, 2, 3, 4, 5]) AS res, toTypeName(res); +``` + +``` text +┌─res─┬─toTypeName(bitmapBuild([1, 2, 3, 4, 5]))─────┠+│ │ AggregateFunction(groupBitmap, UInt8) │ +└─────┴──────────────────────────────────────────────┘ +``` + +## bitmapToArray + +ビットマップを整数é…列ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitmapToArray(bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapToArray(bitmapBuild([1, 2, 3, 4, 5])) AS res; +``` + +çµæžœ: + +``` text +┌─res─────────┠+│ [1,2,3,4,5] │ +└─────────────┘ +``` + +## bitmapSubsetInRange + +値ã®ç¯„囲内ã®ãƒ“ットをæŒã¤ãƒ“ットマップã®ã‚µãƒ–セットを返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitmapSubsetInRange(bitmap, range_start, range_end) +``` + +**引数** + +- `bitmap` – [ビットマップオブジェクト](#bitmapbuild)。 +- `range_start` – 範囲ã®é–‹å§‹ç‚¹ï¼ˆå«ã‚€ï¼‰ã€‚[UInt32](../data-types/int-uint.md)。 +- `range_end` – 範囲ã®çµ‚了点(排他的)。[UInt32](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT bitmapToArray(bitmapSubsetInRange(bitmapBuild([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,100,200,500]), toUInt32(30), toUInt32(200))) AS res; +``` + +çµæžœ: + +``` text +┌─res───────────────┠+│ [30,31,32,33,100] │ +└───────────────────┘ +``` + +## bitmapSubsetLimit + +最å°ã®ãƒ“ット値`range_start`ã‚’æŒã¡ã€æœ€å¤§`cardinality_limit`個ã®è¦ç´ ã‚’æŒã¤ãƒ“ットマップã®ã‚µãƒ–セットを返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitmapSubsetLimit(bitmap, range_start, cardinality_limit) +``` + +**引数** + +- `bitmap` – [ビットマップオブジェクト](#bitmapbuild)。 +- `range_start` – 範囲ã®é–‹å§‹ç‚¹ï¼ˆå«ã‚€ï¼‰ã€‚[UInt32](../data-types/int-uint.md)。 +- `cardinality_limit` – サブセットã®æœ€å¤§ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã€‚[UInt32](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT bitmapToArray(bitmapSubsetLimit(bitmapBuild([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,100,200,500]), toUInt32(30), toUInt32(200))) AS res; +``` + +çµæžœ: + +``` text +┌─res───────────────────────┠+│ [30,31,32,33,100,200,500] │ +└───────────────────────────┘ +``` + +## subBitmap + +指定ã—ãŸä½ç½®`offset`ã‹ã‚‰å§‹ã¾ã‚‹ãƒ“ットマップã®ã‚µãƒ–セットを返ã—ã¾ã™ã€‚è¿”ã•ã‚Œã‚‹ãƒ“ットマップã®æœ€å¤§ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã¯`cardinality_limit`ã§ã™ã€‚ + +**構文** + +``` sql +subBitmap(bitmap, offset, cardinality_limit) +``` + +**引数** + +- `bitmap` – ビットマップ。[ビットマップオブジェクト](#bitmapbuild)。 +- `offset` – サブセットã®æœ€åˆã®è¦ç´ ã®ä½ç½®ã€‚[UInt32](../data-types/int-uint.md)。 +- `cardinality_limit` – サブセット内ã®è¦ç´ ã®æœ€å¤§æ•°ã€‚[UInt32](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT bitmapToArray(subBitmap(bitmapBuild([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,100,200,500]), toUInt32(10), toUInt32(10))) AS res; +``` + +çµæžœ: + +``` text +┌─res─────────────────────────────┠+│ [10,11,12,13,14,15,16,17,18,19] │ +└─────────────────────────────────┘ +``` + +## bitmapContains + +ビットマップã«è¦ç´ ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã‹ç¢ºèªã—ã¾ã™ã€‚ + +``` sql +bitmapContains(bitmap, needle) +``` + +**引数** + +- `bitmap` – [ビットマップオブジェクト](#bitmapbuild)。 +- `needle` – 検索ã™ã‚‹ãƒ“ット値。[UInt32](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 0 — `bitmap`ãŒ`needle`ã‚’å«ã¾ãªã„å ´åˆã€‚[UInt8](../data-types/int-uint.md)。 +- 1 — `bitmap`ãŒ`needle`ã‚’å«ã‚€å ´åˆã€‚[UInt8](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT bitmapContains(bitmapBuild([1,5,7,9]), toUInt32(9)) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ 1 │ +└─────┘ +``` + +## bitmapHasAny + +2ã¤ã®ãƒ“ットマップãŒäº¤å·®ã—ã¦ã„ã‚‹ã‹ç¢ºèªã—ã¾ã™ã€‚ + +`bitmap2`ãŒæ­£ç¢ºã«1ã¤ã®è¦ç´ ã‚’å«ã‚€å ´åˆã€[bitmapContains](#bitmapcontains)を使用ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ã¿ã¦ãã ã•ã„。より効率的ã«å‹•ä½œã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitmapHasAny(bitmap1, bitmap2) +``` + +**引数** + +- `bitmap1` – ビットマップオブジェクト1。 +- `bitmap2` – ビットマップオブジェクト2。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `1` - `bitmap1`ã¨`bitmap2`ãŒå°‘ãªãã¨ã‚‚1ã¤ã®å…±æœ‰è¦ç´ ã‚’æŒã¤å ´åˆã€‚ +- `0` - ãれ以外ã®å ´åˆã€‚ + +**例** + +``` sql +SELECT bitmapHasAny(bitmapBuild([1,2,3]),bitmapBuild([3,4,5])) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ 1 │ +└─────┘ +``` + +## bitmapHasAll + +最åˆã®ãƒ“ットマップãŒ2番目ã®ãƒ“ットマップã®ã™ã¹ã¦ã®è¦ç´ ã‚’å«ã‚€å ´åˆã¯1ã‚’è¿”ã—ã€ãã†ã§ãªã„å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ 2番目ã®ãƒ“ットマップãŒç©ºã§ã‚ã‚Œã°ã€1ã‚’è¿”ã—ã¾ã™ã€‚ + +`hasAll(array, array)`ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +bitmapHasAll(bitmap1, bitmap2) +``` + +**引数** + +- `bitmap1` – ビットマップオブジェクト1。 +- `bitmap2` – ビットマップオブジェクト2。 + +**例** + +``` sql +SELECT bitmapHasAll(bitmapBuild([1,2,3]),bitmapBuild([3,4,5])) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ 0 │ +└─────┘ +``` + +## bitmapCardinality + +ビットマップã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitmapCardinality(bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapCardinality(bitmapBuild([1, 2, 3, 4, 5])) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ 5 │ +└─────┘ +``` + +## bitmapMin + +ビットマップã§è¨­å®šã•ã‚Œã¦ã„る最å°ã®ãƒ“ットを算出ã—ã€ãƒ“ットマップãŒç©ºã®å ´åˆã¯UINT32_MAXã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +bitmapMin(bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapMin(bitmapBuild([1, 2, 3, 4, 5])) AS res; +``` + +çµæžœ: + +``` text + ┌─res─┠+ │ 1 │ + └─────┘ +``` + +## bitmapMax + +ビットマップã§è¨­å®šã•ã‚Œã¦ã„る最大ã®ãƒ“ットを算出ã—ã€ãƒ“ットマップãŒç©ºã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +bitmapMax(bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapMax(bitmapBuild([1, 2, 3, 4, 5])) AS res; +``` + +çµæžœ: + +``` text + ┌─res─┠+ │ 5 │ + └─────┘ +``` + +## bitmapTransform + +ビットマップ内ã®ãƒ“ットを最大N個置ãæ›ãˆã¾ã™ã€‚ç½®ãæ›ãˆã‚‰ã‚Œã‚‹ãƒ“ットã®å¤ã„値ã¨æ–°ã—ã„値ã¯ã€ãã‚Œãžã‚Œ`from_array[i]`ã¨`to_array[i]`ã§æŒ‡å®šã•ã‚Œã¾ã™ã€‚ + +`from_array`ã¨`to_array`ã®é…列ã®é †åºã«ã‚ˆã£ã¦çµæžœãŒç•°ãªã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +bitmapTransform(bitmap, from_array, to_array) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 +- `from_array` – UInt32é…列。範囲\[0, from_array.size())内ã®idxã«ã¤ã„ã¦ã€ãƒ“ットマップãŒfrom_array\[idx\]ã‚’å«ã‚€å ´åˆã€ãれをto_array\[idx\]ã§ç½®ãæ›ãˆã¾ã™ã€‚ +- `to_array` – `from_array`ã¨åŒã˜ã‚µã‚¤ã‚ºã®UInt32é…列。 + +**例** + +``` sql +SELECT bitmapToArray(bitmapTransform(bitmapBuild([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), cast([5,999,2] as Array(UInt32)), cast([2,888,20] as Array(UInt32)))) AS res; +``` + +çµæžœ: + +``` text + ┌─res───────────────────┠+ │ [1,3,4,6,7,8,9,10,20] │ + └───────────────────────┘ +``` + +## bitmapAnd + +2ã¤ã®ãƒ“ットマップã®è«–ç†ç©ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitmapAnd(bitmap,bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapToArray(bitmapAnd(bitmapBuild([1,2,3]),bitmapBuild([3,4,5]))) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ [3] │ +└─────┘ +``` + +## bitmapOr + +2ã¤ã®ãƒ“ットマップã®è«–ç†å’Œã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitmapOr(bitmap,bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapToArray(bitmapOr(bitmapBuild([1,2,3]),bitmapBuild([3,4,5]))) AS res; +``` + +çµæžœ: + +``` text +┌─res─────────┠+│ [1,2,3,4,5] │ +└─────────────┘ +``` + +## bitmapXor + +2ã¤ã®ãƒ“ットマップã®æŽ’ä»–çš„è«–ç†å’Œã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitmapXor(bitmap,bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapToArray(bitmapXor(bitmapBuild([1,2,3]),bitmapBuild([3,4,5]))) AS res; +``` + +çµæžœ: + +``` text +┌─res───────┠+│ [1,2,4,5] │ +└───────────┘ +``` + +## bitmapAndnot + +2ã¤ã®ãƒ“ットマップã®è«–ç†ç©ã‚’計算ã—ã¦çµæžœã‚’å¦å®šã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitmapAndnot(bitmap,bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapToArray(bitmapAndnot(bitmapBuild([1,2,3]),bitmapBuild([3,4,5]))) AS res; +``` + +çµæžœ: + +``` text +┌─res───┠+│ [1,2] │ +└───────┘ +``` + +## bitmapAndCardinality + +2ã¤ã®ãƒ“ットマップã®è«–ç†ç©ã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +bitmapAndCardinality(bitmap,bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapAndCardinality(bitmapBuild([1,2,3]),bitmapBuild([3,4,5])) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ 1 │ +└─────┘ +``` + +## bitmapOrCardinality + +2ã¤ã®ãƒ“ットマップã®è«–ç†å’Œã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +bitmapOrCardinality(bitmap,bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapOrCardinality(bitmapBuild([1,2,3]),bitmapBuild([3,4,5])) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ 5 │ +└─────┘ +``` + +## bitmapXorCardinality + +2ã¤ã®ãƒ“ットマップã®æŽ’ä»–çš„è«–ç†å’Œã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +bitmapXorCardinality(bitmap,bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapXorCardinality(bitmapBuild([1,2,3]),bitmapBuild([3,4,5])) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ 4 │ +└─────┘ +``` + +## bitmapAndnotCardinality + +2ã¤ã®ãƒ“ットマップã®AND-NOTæ“作ã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +bitmapAndnotCardinality(bitmap,bitmap) +``` + +**引数** + +- `bitmap` – ビットマップオブジェクト。 + +**例** + +``` sql +SELECT bitmapAndnotCardinality(bitmapBuild([1,2,3]),bitmapBuild([3,4,5])) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ 2 │ +└─────┘ +``` + diff --git a/docs/ja/sql-reference/functions/comparison-functions.md b/docs/ja/sql-reference/functions/comparison-functions.md new file mode 100644 index 00000000000..7f989f24f97 --- /dev/null +++ b/docs/ja/sql-reference/functions/comparison-functions.md @@ -0,0 +1,89 @@ +--- +slug: /ja/sql-reference/functions/comparison-functions +sidebar_position: 35 +sidebar_label: 比較 +--- + +# 比較関数 + +以下ã®æ¯”較関数㯠Uint8 ã¨ã—㦠0 ã¾ãŸã¯ 1 ã‚’è¿”ã—ã¾ã™ã€‚ + +次ã®ã‚¿ã‚¤ãƒ—ãŒæ¯”較ã§ãã¾ã™: +- 数値 +- 文字列ã¨å›ºå®šé•·æ–‡å­—列 +- 日付 +- 時間をå«ã‚€æ—¥ä»˜ + +åŒã˜ã‚°ãƒ«ãƒ¼ãƒ—内ã®å€¤ã®ã¿ãŒæ¯”較å¯èƒ½ã§ã™ï¼ˆä¾‹ï¼šUInt16 㨠UInt64)。ã—ã‹ã—ã€ç•°ãªã‚‹ã‚°ãƒ«ãƒ¼ãƒ—é–“ã§ã¯æ¯”較ã§ãã¾ã›ã‚“(例:UInt16 㨠DateTime)。 + +文字列ã¯ãƒã‚¤ãƒˆå˜ä½ã§æ¯”較ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ä¸€æ–¹ã®æ–‡å­—列ãŒUTF-8エンコードã•ã‚ŒãŸãƒžãƒ«ãƒãƒã‚¤ãƒˆæ–‡å­—ã‚’å«ã‚€å ´åˆã€äºˆæœŸã—ãªã„çµæžœã‚’æ‹›ãã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +文字列 S1 ãŒåˆ¥ã®æ–‡å­—列 S2 をプレフィックスã¨ã—ã¦æŒã¤å ´åˆã€S1 㯠S2 よりも長ã„ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +## equals, `=`, `==` æ¼”ç®—å­ {#equals} + +**構文** + +```sql +equals(a, b) +``` + +エイリアス: +- `a = b` (演算å­) +- `a == b` (演算å­) + +## notEquals, `!=`, `<>` æ¼”ç®—å­ {#notequals} + +**構文** + +```sql +notEquals(a, b) +``` + +エイリアス: +- `a != b` (演算å­) +- `a <> b` (演算å­) + +## less, `<` æ¼”ç®—å­ {#less} + +**構文** + +```sql +less(a, b) +``` + +エイリアス: +- `a < b` (演算å­) + +## greater, `>` æ¼”ç®—å­ {#greater} + +**構文** + +```sql +greater(a, b) +``` + +エイリアス: +- `a > b` (演算å­) + +## lessOrEquals, `<=` æ¼”ç®—å­ {#lessorequals} + +**構文** + +```sql +lessOrEquals(a, b) +``` + +エイリアス: +- `a <= b` (演算å­) + +## greaterOrEquals, `>=` æ¼”ç®—å­ {#greaterorequals} + +**構文** + +```sql +greaterOrEquals(a, b) +``` + +エイリアス: +- `a >= b` (演算å­) diff --git a/docs/ja/sql-reference/functions/conditional-functions.md b/docs/ja/sql-reference/functions/conditional-functions.md new file mode 100644 index 00000000000..9bdc74beb38 --- /dev/null +++ b/docs/ja/sql-reference/functions/conditional-functions.md @@ -0,0 +1,267 @@ +--- +slug: /ja/sql-reference/functions/conditional-functions +sidebar_position: 40 +sidebar_label: æ¡ä»¶ä»˜ã +--- + +# æ¡ä»¶ä»˜ã関数 + +## if + +æ¡ä»¶åˆ†å²ã‚’実行ã—ã¾ã™ã€‚ + +æ¡ä»¶ `cond` ãŒéžã‚¼ãƒ­å€¤ã‚’評価ã™ã‚‹å ´åˆã€é–¢æ•°ã¯å¼ `then` ã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ã‚‚ã— `cond` ãŒã‚¼ãƒ­ã¾ãŸã¯ `NULL` を評価ã™ã‚‹å ´åˆã€`else` å¼ã®çµæžœãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +[short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation) を設定ã™ã‚‹ã“ã¨ã§ã‚·ãƒ§ãƒ¼ãƒˆã‚µãƒ¼ã‚­ãƒƒãƒˆè©•ä¾¡ãŒä½¿ç”¨ã•ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚有効ã«ã™ã‚‹ã¨ã€`then` å¼ã¯ `cond` ㌠`true` ã®è¡Œã§ã®ã¿è©•ä¾¡ã•ã‚Œã€`else` å¼ã¯ `cond` ㌠`false` ã®è¡Œã§ã®ã¿è©•ä¾¡ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ã‚·ãƒ§ãƒ¼ãƒˆã‚µãƒ¼ã‚­ãƒƒãƒˆè©•ä¾¡ã‚’使用ã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒª `SELECT if(number = 0, 0, intDiv(42, number)) FROM numbers(10)` を実行ã™ã‚‹éš›ã«ã‚¼ãƒ­é™¤ç®—例外ãŒç™ºç”Ÿã—ã¾ã›ã‚“。 + +`then` 㨠`else` ã¯ä¼¼ãŸåž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +if(cond, then, else) +``` +エイリアス: `cond ? then : else` (三項演算å­) + +**引数** + +- `cond` – 評価ã•ã‚Œã‚‹æ¡ä»¶ã€‚UInt8, Nullable(UInt8) ã¾ãŸã¯ NULL。 +- `then` – `condition` ãŒçœŸã§ã‚ã‚‹ã¨ãã«è¿”ã•ã‚Œã‚‹å¼ã€‚ +- `else` – `condition` ãŒå½ã¾ãŸã¯ NULL ã®ã¨ãã«è¿”ã•ã‚Œã‚‹å¼ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +æ¡ä»¶ `cond` ã«ä¾å­˜ã—ã¦ã€`then` ã¾ãŸã¯ `else` å¼ã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT if(1, plus(2, 2), plus(2, 6)); +``` + +çµæžœ: + +``` text +┌─plus(2, 2)─┠+│ 4 │ +└────────────┘ +``` + +## multiIf + +クエリ内㧠[CASE](../../sql-reference/operators/index.md#conditional-expression) 演算å­ã‚’よりコンパクトã«è¨˜è¿°ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +``` sql +multiIf(cond_1, then_1, cond_2, then_2, ..., else) +``` + +[short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation) を設定ã™ã‚‹ã“ã¨ã§ã‚·ãƒ§ãƒ¼ãƒˆã‚µãƒ¼ã‚­ãƒƒãƒˆè©•ä¾¡ãŒä½¿ç”¨ã•ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚有効ã«ã™ã‚‹ã¨ã€`then_i` å¼ã¯ `((NOT cond_1) AND (NOT cond_2) AND ... AND (NOT cond_{i-1}) AND cond_i)` ㌠`true` ã®è¡Œã§ã®ã¿è©•ä¾¡ã•ã‚Œã€`cond_i` 㯠`((NOT cond_1) AND (NOT cond_2) AND ... AND (NOT cond_{i-1}))` ㌠`true` ã®è¡Œã§ã®ã¿è©•ä¾¡ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ã‚·ãƒ§ãƒ¼ãƒˆã‚µãƒ¼ã‚­ãƒƒãƒˆè©•ä¾¡ã‚’使用ã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒª `SELECT multiIf(number = 2, intDiv(1, number), number = 5) FROM numbers(10)` を実行ã™ã‚‹éš›ã«ã‚¼ãƒ­é™¤ç®—例外ãŒç™ºç”Ÿã—ã¾ã›ã‚“。 + +**引数** + +ã“ã®é–¢æ•°ã¯ `2N+1` ã®ãƒ‘ラメーターをå—ã‘å–ã‚Šã¾ã™: +- `cond_N` — `then_N` ãŒè¿”ã•ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’制御ã™ã‚‹ N 番目ã®è©•ä¾¡æ¡ä»¶ã€‚ +- `then_N` — `cond_N` ãŒçœŸã§ã‚ã‚‹ã¨ãã®é–¢æ•°ã®çµæžœã€‚ +- `else` — ã„ãšã‚Œã®æ¡ä»¶ã‚‚真ã§ãªã„å ´åˆã®é–¢æ•°ã®çµæžœã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +æ¡ä»¶ `cond_N` ã«ä¾å­˜ã—ã¦ã€`then_N` ã¾ãŸã¯ `else` å¼ã®ã„ãšã‚Œã‹ã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +以下ã®ãƒ†ãƒ¼ãƒ–ルを想定ã—ã¾ã™: + +``` text +┌─left─┬─right─┠+│ á´ºáµá´¸á´¸ │ 4 │ +│ 1 │ 3 │ +│ 2 │ 2 │ +│ 3 │ 1 │ +│ 4 │ á´ºáµá´¸á´¸ │ +└──────┴───────┘ +``` + +``` sql +SELECT + left, + right, + multiIf(left < right, 'left is smaller', left > right, 'left is greater', left = right, 'Both equal', 'Null value') AS result +FROM LEFT_RIGHT + +┌─left─┬─right─┬─result──────────┠+│ á´ºáµá´¸á´¸ │ 4 │ Null value │ +│ 1 │ 3 │ left is smaller │ +│ 2 │ 2 │ Both equal │ +│ 3 │ 1 │ left is greater │ +│ 4 │ á´ºáµá´¸á´¸ │ Null value │ +└──────┴───────┴─────────────────┘ +``` + +## æ¡ä»¶ä»˜ãçµæžœã‚’直接使用ã™ã‚‹ + +æ¡ä»¶å¼ã¯å¸¸ã« `0`, `1` ã¾ãŸã¯ `NULL` ã«è©•ä¾¡ã•ã‚Œã¾ã™ã€‚ãã®ãŸã‚ã€æ¡ä»¶å¼ã®çµæžœã‚’直接使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +``` sql +SELECT left < right AS is_small +FROM LEFT_RIGHT + +┌─is_small─┠+│ á´ºáµá´¸á´¸ │ +│ 1 │ +│ 0 │ +│ 0 │ +│ á´ºáµá´¸á´¸ │ +└──────────┘ +``` + +## æ¡ä»¶å¼ã«ãŠã‘ã‚‹ NULL 値 + +æ¡ä»¶å¼ã« `NULL` 値ãŒé–¢ä¸Žã™ã‚‹å ´åˆã€çµæžœã‚‚ `NULL` ã«ãªã‚Šã¾ã™ã€‚ + +``` sql +SELECT + NULL < 1, + 2 < NULL, + NULL < NULL, + NULL = NULL + +┌─less(NULL, 1)─┬─less(2, NULL)─┬─less(NULL, NULL)─┬─equals(NULL, NULL)─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +└───────────────┴───────────────┴──────────────────┴────────────────────┘ +``` + +ãã®ãŸã‚ã€åž‹ãŒ `Nullable` ã®å ´åˆã¯ã‚¯ã‚¨ãƒªã‚’æ…Žé‡ã«æ§‹ç¯‰ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +以下ã®ä¾‹ã§ã¯ã€`multiIf` ã«ç­‰ã—ã„æ¡ä»¶ã‚’追加ã—ãªã„ã“ã¨ã§ã‚¨ãƒ©ãƒ¼ã‚’示ã—ã¾ã™ã€‚ + +``` sql +SELECT + left, + right, + multiIf(left < right, 'left is smaller', left > right, 'right is smaller', 'Both equal') AS faulty_result +FROM LEFT_RIGHT + +┌─left─┬─right─┬─faulty_result────┠+│ á´ºáµá´¸á´¸ │ 4 │ Both equal │ +│ 1 │ 3 │ left is smaller │ +│ 2 │ 2 │ Both equal │ +│ 3 │ 1 │ right is smaller │ +│ 4 │ á´ºáµá´¸á´¸ │ Both equal │ +└──────┴───────┴──────────────────┘ +``` + +## greatest + +値ã®ãƒªã‚¹ãƒˆã‹ã‚‰æœ€å¤§ã®ã‚‚ã®ã‚’è¿”ã—ã¾ã™ã€‚リストã®ãƒ¡ãƒ³ãƒãƒ¼ã¯ã™ã¹ã¦æ¯”較å¯èƒ½ãªåž‹ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +例: + +```sql +SELECT greatest(1, 2, toUInt8(3), 3.) result, toTypeName(result) type; +``` +```response +┌─result─┬─type────┠+│ 3 │ Float64 │ +└────────┴─────────┘ +``` + +:::note +è¿”ã•ã‚Œã‚‹åž‹ã¯ Float64 ã§ã‚ã‚Šã€UInt8 ã¯æ¯”較ã®ãŸã‚ã« 64 ビットã«æ˜‡æ ¼ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ãŸã‚ã§ã™ã€‚ +::: + +```sql +SELECT greatest(['hello'], ['there'], ['world']) +``` +```response +┌─greatest(['hello'], ['there'], ['world'])─┠+│ ['world'] │ +└───────────────────────────────────────────┘ +``` + +```sql +SELECT greatest(toDateTime32(now() + toIntervalDay(1)), toDateTime64(now(), 3)) +``` +```response +┌─greatest(toDateTime32(plus(now(), toIntervalDay(1))), toDateTime64(now(), 3))─┠+│ 2023-05-12 01:16:59.000 │ +└──---──────────────────────────────────────────────────────────────────────────┘ +``` + +:::note +è¿”ã•ã‚Œã‚‹åž‹ã¯ DateTime64 ã§ã‚ã‚Šã€DataTime32 ã¯æ¯”較ã®ãŸã‚ã« 64 ビットã«æ˜‡æ ¼ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ãŸã‚ã§ã™ã€‚ +::: + +## least + +値ã®ãƒªã‚¹ãƒˆã‹ã‚‰æœ€å°ã®ã‚‚ã®ã‚’è¿”ã—ã¾ã™ã€‚リストã®ãƒ¡ãƒ³ãƒãƒ¼ã¯ã™ã¹ã¦æ¯”較å¯èƒ½ãªåž‹ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +例: + +```sql +SELECT least(1, 2, toUInt8(3), 3.) result, toTypeName(result) type; +``` +```response +┌─result─┬─type────┠+│ 1 │ Float64 │ +└────────┴─────────┘ +``` + +:::note +è¿”ã•ã‚Œã‚‹åž‹ã¯ Float64 ã§ã‚ã‚Šã€UInt8 ã¯æ¯”較ã®ãŸã‚ã« 64 ビットã«æ˜‡æ ¼ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ãŸã‚ã§ã™ã€‚ +::: + +```sql +SELECT least(['hello'], ['there'], ['world']) +``` +```response +┌─least(['hello'], ['there'], ['world'])─┠+│ ['hello'] │ +└────────────────────────────────────────┘ +``` + +```sql +SELECT least(toDateTime32(now() + toIntervalDay(1)), toDateTime64(now(), 3)) +``` +```response +┌─least(toDateTime32(plus(now(), toIntervalDay(1))), toDateTime64(now(), 3))─┠+│ 2023-05-12 01:16:59.000 │ +└────────────────────────────────────────────────────────────────────────────┘ +``` + +:::note +è¿”ã•ã‚Œã‚‹åž‹ã¯ DateTime64 ã§ã‚ã‚Šã€DataTime32 ã¯æ¯”較ã®ãŸã‚ã« 64 ビットã«æ˜‡æ ¼ã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ãŸã‚ã§ã™ã€‚ +::: + +## clamp + +è¿”ã•ã‚Œã‚‹å€¤ã‚’ A 㨠B ã®é–“ã«åˆ¶ç´„ã—ã¾ã™ã€‚ + +**構文** + +``` sql +clamp(value, min, max) +``` + +**引数** + +- `value` – 入力値。 +- `min` – 下é™ã®åˆ¶é™ã€‚ +- `max` – 上é™ã®åˆ¶é™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +値ãŒæœ€å°å€¤ã‚ˆã‚Šå°ã•ã„å ´åˆã€æœ€å°å€¤ã‚’è¿”ã—ã€æœ€å¤§å€¤ã‚ˆã‚Šå¤§ãã„å ´åˆã€æœ€å¤§å€¤ã‚’è¿”ã—ã¾ã™ã€‚ã•ã‚‚ãªã‘ã‚Œã°ã€ç¾åœ¨ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +例: + +```sql +SELECT clamp(1, 2, 3) result, toTypeName(result) type; +``` +```response +┌─result─┬─type────┠+│ 2 │ Float64 │ +└────────┴─────────┘ +``` diff --git a/docs/ja/sql-reference/functions/date-time-functions.md b/docs/ja/sql-reference/functions/date-time-functions.md new file mode 100644 index 00000000000..b180666a986 --- /dev/null +++ b/docs/ja/sql-reference/functions/date-time-functions.md @@ -0,0 +1,4890 @@ +--- +slug: /ja/sql-reference/functions/date-time-functions +sidebar_position: 45 +sidebar_label: 日付ã¨æ™‚刻 +--- + +# 日付ã¨æ™‚刻をæ“作ã™ã‚‹ãŸã‚ã®é–¢æ•° + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®ã»ã¨ã‚“ã©ã®é–¢æ•°ã¯ã€ã‚ªãƒ—ションã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å¼•æ•°ã‚’å—ã‘入れã¾ã™ã€‚例: `Europe/Amsterdam`。ã“ã®å ´åˆã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯æŒ‡å®šã•ã‚ŒãŸã‚‚ã®ã§ã‚ã‚Šã€ãƒ­ãƒ¼ã‚«ãƒ«ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ã®ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +**例** + +```sql +SELECT + toDateTime('2016-06-15 23:00:00') AS time, + toDate(time) AS date_local, + toDate(time, 'Asia/Yekaterinburg') AS date_yekat, + toString(time, 'US/Samoa') AS time_samoa +``` + +```text +┌────────────────time─┬─date_local─┬─date_yekat─┬─time_samoa──────────┠+│ 2016-06-15 23:00:00 │ 2016-06-15 │ 2016-06-16 │ 2016-06-15 09:00:00 │ +└─────────────────────┴────────────┴────────────┴─────────────────────┘ +``` + +## makeDate + +[Date](../data-types/date.md)を作æˆã—ã¾ã™ã€‚ +- å¹´ã€æœˆã€æ—¥ã‚’引数ã¨ã—ã¦æŒ‡å®šã™ã‚‹å ´åˆã€ã¾ãŸã¯ +- å¹´ã¨å¹´å†…ã®æ—¥ã‚’引数ã¨ã—ã¦æŒ‡å®šã™ã‚‹å ´åˆã€‚ + +**構文** + +```sql +makeDate(year, month, day); +makeDate(year, day_of_year); +``` + +エイリアス: +- `MAKEDATE(year, month, day);` +- `MAKEDATE(year, day_of_year);` + +**引数** + +- `year` — 年。[Integer](../data-types/int-uint.md)ã€[Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 +- `month` — 月。[Integer](../data-types/int-uint.md)ã€[Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 +- `day` — 日。[Integer](../data-types/int-uint.md)ã€[Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 +- `day_of_year` — 年内ã®æ—¥ã€‚[Integer](../data-types/int-uint.md)ã€[Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã‹ã‚‰ä½œæˆã•ã‚ŒãŸæ—¥ä»˜ã€‚[Date](../data-types/date.md)。 + +**例** + +å¹´ã€æœˆã€æ—¥ã‹ã‚‰Dateを作æˆã—ã¾ã™ï¼š + +```sql +SELECT makeDate(2023, 2, 28) AS Date; +``` + +çµæžœï¼š + +```text +┌───────date─┠+│ 2023-02-28 │ +└────────────┘ +``` + +å¹´ã¨å¹´å†…ã®æ—¥ã‚’引数ã¨ã—ã¦Dateを作æˆã—ã¾ã™ï¼š + +```sql +SELECT makeDate(2023, 42) AS Date; +``` + +çµæžœï¼š + +```text +┌───────date─┠+│ 2023-02-11 │ +└────────────┘ +``` + +## makeDate32 + +å¹´ã€æœˆã€æ—¥ï¼ˆã¾ãŸã¯ã‚ªãƒ—ションã¨ã—ã¦å¹´ã¨æ—¥ï¼‰ã‹ã‚‰[Date32](../../sql-reference/data-types/date32.md)åž‹ã®æ—¥ä»˜ã‚’作æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +makeDate32(year, [month,] day) +``` + +**引数** + +- `year` — 年。[Integer](../../sql-reference/data-types/int-uint.md)ã€[Float](../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../sql-reference/data-types/decimal.md)。 +- `month` — 月(オプション)。[Integer](../../sql-reference/data-types/int-uint.md)ã€[Float](../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../sql-reference/data-types/decimal.md)。 +- `day` — 日。[Integer](../../sql-reference/data-types/int-uint.md)ã€[Float](../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../sql-reference/data-types/decimal.md)。 + +:::note +`month`ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€`day`ã¯`1`ã‹ã‚‰`365`ã®å€¤ã‚’å–ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°ã€`1`ã‹ã‚‰`31`ã®å€¤ã‚’å–ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã‹ã‚‰ä½œæˆã•ã‚ŒãŸæ—¥ä»˜ã€‚[Date32](../../sql-reference/data-types/date32.md)。 + +**例** + +å¹´ã€æœˆã€æ—¥ã‹ã‚‰æ—¥ä»˜ã‚’作æˆã—ã¾ã™ï¼š + +クエリ: + +```sql +SELECT makeDate32(2024, 1, 1); +``` + +çµæžœï¼š + +```response +2024-01-01 +``` + +å¹´ã¨å¹´å†…ã®æ—¥ã‹ã‚‰Dateを作æˆã—ã¾ã™ï¼š + +クエリ: + +```sql +SELECT makeDate32(2024, 100); +``` + +çµæžœï¼š + +```response +2024-04-09 +``` + +## makeDateTime + +å¹´ã€æœˆã€æ—¥ã€æ™‚ã€åˆ†ã€ç§’ã®å¼•æ•°ã‹ã‚‰[DateTime](../data-types/datetime.md)を作æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +makeDateTime(year, month, day, hour, minute, second[, timezone]) +``` + +**引数** + +- `year` — 年。[Integer](../data-types/int-uint.md)ã€[Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 +- `month` — 月。[Integer](../data-types/int-uint.md)ã€[Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 +- `day` — 日。[Integer](../data-types/int-uint.md)ã€[Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 +- `hour` — 時。[Integer](../data-types/int-uint.md)ã€[Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 +- `minute` — 分。[Integer](../data-types/int-uint.md)ã€[Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 +- `second` — 秒。[Integer](../data-types/int-uint.md)ã€[Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 +- `timezone` — è¿”ã•ã‚Œã‚‹å€¤ã®[タイムゾーン](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã‹ã‚‰ä½œæˆã•ã‚ŒãŸæ—¥ä»˜ã¨æ™‚刻。[DateTime](../data-types/datetime.md)。 + +**例** + +```sql +SELECT makeDateTime(2023, 2, 28, 17, 12, 33) AS DateTime; +``` + +çµæžœï¼š + +```text +┌────────────DateTime─┠+│ 2023-02-28 17:12:33 │ +└─────────────────────┘ +``` + +## makeDateTime64 + +コンãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰[DateTime64](../../sql-reference/data-types/datetime64.md)ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®å€¤ã‚’作æˆã—ã¾ã™ï¼šå¹´ã€æœˆã€æ—¥ã€æ™‚ã€åˆ†ã€ç§’。オプションã§å°æ•°ç‚¹ä»¥ä¸‹ã®ç²¾åº¦ã‚’æŒã¡ã¾ã™ã€‚ + +**構文** + +```sql +makeDateTime64(year, month, day, hour, minute, second[, precision]) +``` + +**引数** + +- `year` — 年(0-9999)。[Integer](../../sql-reference/data-types/int-uint.md)ã€[Float](../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../sql-reference/data-types/decimal.md)。 +- `month` — 月(1-12)。[Integer](../../sql-reference/data-types/int-uint.md)ã€[Float](../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../sql-reference/data-types/decimal.md)。 +- `day` — 日(1-31)。[Integer](../../sql-reference/data-types/int-uint.md)ã€[Float](../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../sql-reference/data-types/decimal.md)。 +- `hour` — 時(0-23)。[Integer](../../sql-reference/data-types/int-uint.md)ã€[Float](../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../sql-reference/data-types/decimal.md)。 +- `minute` — 分(0-59)。[Integer](../../sql-reference/data-types/int-uint.md)ã€[Float](../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../sql-reference/data-types/decimal.md)。 +- `second` — 秒(0-59)。[Integer](../../sql-reference/data-types/int-uint.md)ã€[Float](../../sql-reference/data-types/float.md) ã¾ãŸã¯ [Decimal](../../sql-reference/data-types/decimal.md)。 +- `precision` — å°æ•°ç‚¹ä»¥ä¸‹ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚ªãƒ—ションã®ç²¾åº¦ï¼ˆ0-9)。[Integer](../../sql-reference/data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã‹ã‚‰ä½œæˆã•ã‚ŒãŸæ—¥ä»˜ã¨æ™‚刻。[DateTime64](../../sql-reference/data-types/datetime64.md)。 + +**例** + +```sql +SELECT makeDateTime64(2023, 5, 15, 10, 30, 45, 779, 5); +``` + +```response +┌─makeDateTime64(2023, 5, 15, 10, 30, 45, 779, 5)─┠+│ 2023-05-15 10:30:45.00779 │ +└─────────────────────────────────────────────────┘ +``` + +## timestamp + +最åˆã®å¼•æ•°'expr'ã‚’[DateTime64(6)](../data-types/datetime64.md)åž‹ã«å¤‰æ›ã—ã¾ã™ã€‚ +2番目ã®å¼•æ•°'expr_time'ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å¤‰æ›ã•ã‚ŒãŸå€¤ã«æŒ‡å®šã•ã‚ŒãŸæ™‚間を加ãˆã¾ã™ã€‚ + +**構文** + +```sql +timestamp(expr[, expr_time]) +``` + +エイリアス: `TIMESTAMP` + +**引数** + +- `expr` - 日付ã¾ãŸã¯æ—¥æ™‚。[String](../data-types/string.md)。 +- `expr_time` - オプションã®ãƒ‘ラメータ。加ãˆã‚‹æ™‚間。[String](../data-types/string.md)。 + +**例** + +```sql +SELECT timestamp('2023-12-31') as ts; +``` + +çµæžœï¼š + +```text +┌─────────────────────────ts─┠+│ 2023-12-31 00:00:00.000000 │ +└────────────────────────────┘ +``` + +```sql +SELECT timestamp('2023-12-31 12:00:00', '12:00:00.11') as ts; +``` + +çµæžœï¼š + +```text +┌─────────────────────────ts─┠+│ 2024-01-01 00:00:00.110000 │ +└────────────────────────────┘ +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [DateTime64](../data-types/datetime64.md)(6) + +## timeZone + +ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã€ã™ãªã‚ã¡è¨­å®šã®å€¤[session_timezone](../../operations/settings/settings.md#session_timezone)ã‚’è¿”ã—ã¾ã™ã€‚ +分散テーブルã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§é–¢æ•°ãŒå®Ÿè¡Œã•ã‚Œã‚‹ã¨ã€å„シャードã«é–¢é€£ã™ã‚‹å€¤ã‚’æŒã¤é€šå¸¸ã®ã‚«ãƒ©ãƒ ãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°å®šæ•°å€¤ãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +timeZone() +``` + +エイリアス: `timezone`. + +**è¿”ã•ã‚Œã‚‹å€¤** + +- タイムゾーン。[String](../data-types/string.md)。 + +**例** + +```sql +SELECT timezone() +``` + +çµæžœï¼š + +```response +┌─timezone()─────┠+│ America/Denver │ +└────────────────┘ +``` + +**å‚ç…§** + +- [serverTimeZone](#servertimezone) + +## serverTimeZone + +サーãƒã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã€ã™ãªã‚ã¡è¨­å®šã®å€¤[timezone](../../operations/server-configuration-parameters/settings.md#timezone)ã‚’è¿”ã—ã¾ã™ã€‚ +分散テーブルã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§é–¢æ•°ãŒå®Ÿè¡Œã•ã‚Œã‚‹ã¨ã€å„シャードã«é–¢é€£ã™ã‚‹å€¤ã‚’æŒã¤é€šå¸¸ã®ã‚«ãƒ©ãƒ ãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°å®šæ•°å€¤ãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +serverTimeZone() +``` + +エイリアス: `serverTimezone`. + +**è¿”ã•ã‚Œã‚‹å€¤** + +- タイムゾーン。[String](../data-types/string.md)。 + +**例** + +```sql +SELECT serverTimeZone() +``` + +çµæžœï¼š + +```response +┌─serverTimeZone()─┠+│ UTC │ +└──────────────────┘ +``` + +**å‚ç…§** + +- [timeZone](#timezone) + +## toTimeZone + +日付ã¾ãŸã¯æ—¥æ™‚を指定ã•ã‚ŒãŸã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã«å¤‰æ›ã—ã¾ã™ã€‚データã®å†…部値(Unix秒ã®æ•°ï¼‰ã¯å¤‰æ›´ã›ãšã€å€¤ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å±žæ€§ã¨å€¤ã®æ–‡å­—列表ç¾ã®ã¿ãŒå¤‰æ›´ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toTimezone(value, timezone) +``` + +エイリアス: `toTimezone`. + +**引数** + +- `value` — 時刻ã¾ãŸã¯æ—¥ä»˜ã¨æ™‚刻。[DateTime64](../data-types/datetime64.md)。 +- `timezone` — è¿”ã•ã‚Œã‚‹å€¤ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã€‚[String](../data-types/string.md)。ã“ã®å¼•æ•°ã¯å®šæ•°ã§ã™ã€‚`toTimezone`ã¯ã‚«ãƒ©ãƒ ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’変更ã™ã‚‹ãŸã‚(タイムゾーンã¯`DateTime*`åž‹ã®å±žæ€§ã§ã™ï¼‰ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 日付ã¨æ™‚刻。[DateTime](../data-types/datetime.md)。 + +**例** + +```sql +SELECT toDateTime('2019-01-01 00:00:00', 'UTC') AS time_utc, + toTypeName(time_utc) AS type_utc, + toInt32(time_utc) AS int32utc, + toTimeZone(time_utc, 'Asia/Yekaterinburg') AS time_yekat, + toTypeName(time_yekat) AS type_yekat, + toInt32(time_yekat) AS int32yekat, + toTimeZone(time_utc, 'US/Samoa') AS time_samoa, + toTypeName(time_samoa) AS type_samoa, + toInt32(time_samoa) AS int32samoa +FORMAT Vertical; +``` + +çµæžœï¼š + +```text +Row 1: +────── +time_utc: 2019-01-01 00:00:00 +type_utc: DateTime('UTC') +int32utc: 1546300800 +time_yekat: 2019-01-01 05:00:00 +type_yekat: DateTime('Asia/Yekaterinburg') +int32yekat: 1546300800 +time_samoa: 2018-12-31 13:00:00 +type_samoa: DateTime('US/Samoa') +int32samoa: 1546300800 +``` + +**å‚ç…§** + +- [formatDateTime](#formatdatetime) - éžå®šæ•°ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +- [toString](type-conversion-functions.md#tostring) - éžå®šæ•°ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +## timeZoneOf + +[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)データ型ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³åã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +timeZoneOf(value) +``` + +エイリアス: `timezoneOf`. + +**引数** + +- `value` — 日付ã¨æ™‚刻。[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- タイムゾーンå。[String](../data-types/string.md)。 + +**例** + +```sql +SELECT timezoneOf(now()); +``` + +çµæžœï¼š +```text +┌─timezoneOf(now())─┠+│ Etc/UTC │ +└───────────────────┘ +``` + +## timeZoneOffset + +[UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)ã‹ã‚‰ã®ç§’å˜ä½ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’è¿”ã—ã¾ã™ã€‚ +関数ã¯æŒ‡å®šã•ã‚ŒãŸæ—¥æ™‚ã«ãŠã‘ã‚‹[å¤æ™‚é–“](https://en.wikipedia.org/wiki/Daylight_saving_time)ãŠã‚ˆã³éŽåŽ»ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã®å¤‰åŒ–を考慮ã—ã¾ã™ã€‚ +オフセットを計算ã™ã‚‹ãŸã‚ã«[IANAタイムゾーンデータベース](https://www.iana.org/time-zones)ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +timeZoneOffset(value) +``` + +エイリアス: `timezoneOffset`. + +**引数** + +- `value` — 日付ã¨æ™‚刻。[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- UTCã‹ã‚‰ã®ç§’å˜ä½ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã€‚[Int32](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT toDateTime('2021-04-21 10:20:30', 'America/New_York') AS Time, toTypeName(Time) AS Type, + timeZoneOffset(Time) AS Offset_in_seconds, (Offset_in_seconds / 3600) AS Offset_in_hours; +``` + +çµæžœï¼š + +```text +┌────────────────Time─┬─Type─────────────────────────┬─Offset_in_seconds─┬─Offset_in_hours─┠+│ 2021-04-21 10:20:30 │ DateTime('America/New_York') │ -14400 │ -4 │ +└─────────────────────┴──────────────────────────────┴───────────────────┴─────────────────┘ +``` + +## toYear + +日付ã¾ãŸã¯æ—¥æ™‚ã®å¹´æˆåˆ†ï¼ˆè¥¿æš¦ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toYear(value) +``` + +エイリアス: `YEAR` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®å¹´ã€‚[UInt16](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT toYear(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toYear(toDateTime('2023-04-21 10:20:30'))─┠+│ 2023 │ +└───────────────────────────────────────────┘ +``` + +## toQuarter + +日付ã¾ãŸã¯æ—¥æ™‚ã®å››åŠæœŸï¼ˆ1-4)を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toQuarter(value) +``` + +エイリアス: `QUARTER` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®å››åŠæœŸï¼ˆ1ã€2ã€3ã¾ãŸã¯4)。[UInt8](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT toQuarter(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toQuarter(toDateTime('2023-04-21 10:20:30'))─┠+│ 2 │ +└──────────────────────────────────────────────┘ +``` + +## toMonth + +日付ã¾ãŸã¯æ—¥æ™‚ã®æœˆæˆåˆ†ï¼ˆ1-12)を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toMonth(value) +``` + +エイリアス: `MONTH` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®æœˆï¼ˆ1-12)。[UInt8](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT toMonth(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toMonth(toDateTime('2023-04-21 10:20:30'))─┠+│ 4 │ +└────────────────────────────────────────────┘ +``` + +## toDayOfYear + +日付ã¾ãŸã¯æ—¥æ™‚ã®å¹´å†…ã®æ—¥ã®æ•°ï¼ˆ1-366)を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toDayOfYear(value) +``` + +エイリアス: `DAYOFYEAR` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®å¹´å†…ã®æ—¥ï¼ˆ1-366)。[UInt16](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT toDayOfYear(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toDayOfYear(toDateTime('2023-04-21 10:20:30'))─┠+│ 111 │ +└────────────────────────────────────────────────┘ +``` + +## toDayOfMonth + +日付ã¾ãŸã¯æ—¥æ™‚ã®æœˆå†…ã®æ—¥ã®æ•°ï¼ˆ1-31)を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toDayOfMonth(value) +``` + +エイリアス: `DAYOFMONTH`, `DAY` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®æœˆå†…ã®æ—¥ï¼ˆ1-31)。[UInt8](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT toDayOfMonth(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toDayOfMonth(toDateTime('2023-04-21 10:20:30'))─┠+│ 21 │ +└─────────────────────────────────────────────────┘ +``` + +## toDayOfWeek + +日付ã¾ãŸã¯æ—¥æ™‚ã®é€±å†…ã®æ—¥ã®æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +`toDayOfWeek()`ã®2引数形å¼ã«ã‚ˆã‚Šã€é€±ã®å§‹ã¾ã‚ŠãŒæœˆæ›œæ—¥ã‹æ—¥æ›œæ—¥ã‹ã€è¿”ã•ã‚Œã‚‹å€¤ãŒ0ã‹ã‚‰6ã®ç¯„囲ã‹1ã‹ã‚‰7ã®ç¯„囲ã‹ã‚’指定ã§ãã¾ã™ã€‚モード引数ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ¢ãƒ¼ãƒ‰ã¯0ã§ã™ã€‚日付ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯ã€3番目ã®å¼•æ•°ã¨ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚ + +| モード | 週ã®å§‹ã¾ã‚Š | 範囲 | +|------|-------------------|------------------------------------------------| +| 0 | 月曜日 | 1-7: 月曜日 = 1, ç«æ›œæ—¥ = 2, ..., 日曜日 = 7 | +| 1 | 月曜日 | 0-6: 月曜日 = 0, ç«æ›œæ—¥ = 1, ..., 日曜日 = 6 | +| 2 | 日曜日 | 0-6: 日曜日 = 0, 月曜日 = 1, ..., 土曜日 = 6 | +| 3 | 日曜日 | 1-7: 日曜日 = 1, 月曜日 = 2, ..., 土曜日 = 7 | + +**構文** + +```sql +toDayOfWeek(t[, mode[, timezone]]) +``` + +エイリアス: `DAYOFWEEK`. + +**引数** + +- `t` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 +- `mode` - 週ã®æœ€åˆã®æ—¥ã‚’決定ã—ã¾ã™ã€‚å¯èƒ½ãªå€¤ã¯0ã€1ã€2ã¾ãŸã¯3ã§ã™ã€‚上記ã®è¡¨ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- `timezone` - オプションã®ãƒ‘ラメータã§ã‚ã‚Šã€ä»–ã®å¤‰æ›é–¢æ•°ã¨åŒæ§˜ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +最åˆã®å¼•æ•°ã¯ã€[parseDateTime64BestEffort()](type-conversion-functions.md#parsedatetime64besteffort)ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹å½¢å¼ã®[String](../data-types/string.md)ã¨ã—ã¦ã‚‚指定ã§ãã¾ã™ã€‚文字列引数ã®ã‚µãƒãƒ¼ãƒˆã¯ã€ç‰¹å®šã®ã‚µãƒ¼ãƒ‰ãƒ‘ーティツールãŒæœŸå¾…ã™ã‚‹MySQLã¨ã®äº’æ›æ€§ã®ãŸã‚ã«å­˜åœ¨ã—ã¾ã™ã€‚å°†æ¥çš„ã«æ–‡å­—列引数ã®ã‚µãƒãƒ¼ãƒˆãŒæ–°ã—ã„MySQL互æ›è¨­å®šã«ä¾å­˜ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€æ–‡å­—列ã®è§£æžã¯ä¸€èˆ¬çš„ã«é…ã„ãŸã‚ã€ä½¿ç”¨ã—ãªã„ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®é€±ã®æ›œæ—¥ï¼ˆ1-7)ã€é¸æŠžã—ãŸãƒ¢ãƒ¼ãƒ‰ã«å¿œã˜ã¦ã€‚ + +**例** + +以下ã®æ—¥ä»˜ã¯2023å¹´4月21æ—¥ã§ã€é‡‘曜日ã§ã—ãŸï¼š + +```sql +SELECT + toDayOfWeek(toDateTime('2023-04-21')), + toDayOfWeek(toDateTime('2023-04-21'), 1) +``` + +çµæžœï¼š + +```response +┌─toDayOfWeek(toDateTime('2023-04-21'))─┬─toDayOfWeek(toDateTime('2023-04-21'), 1)─┠+│ 5 │ 4 │ +└───────────────────────────────────────┴──────────────────────────────────────────┘ +``` + +## toHour + +日付時刻ã®æ™‚é–“æˆåˆ†ï¼ˆ0-24)を返ã—ã¾ã™ã€‚ + +時計ãŒé€²ã‚られる場åˆã€1時間進むã¨2時ã«ç™ºç”Ÿã—ã€æ™‚計ãŒæˆ»ã•ã‚Œã‚‹å ´åˆã€1時間戻るã¨3時ã«ç™ºç”Ÿã™ã‚‹ã“ã¨ãŒå‰æã¨ã•ã‚Œã¾ã™ï¼ˆã“ã‚Œã¯å¸¸ã«æ­£ç¢ºã«ãªã‚‹ã‚ã‘ã§ã¯ãªãã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ï¼‰ã€‚ + +**構文** + +```sql +toHour(value) +``` + +エイリアス: `HOUR` + +**引数** + +- `value` - [DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®æ™‚間(0-23)。[UInt8](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT toHour(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toHour(toDateTime('2023-04-21 10:20:30'))─┠+│ 10 │ +└───────────────────────────────────────────┘ +``` + +## toMinute + +日時ã®åˆ†æˆåˆ†ï¼ˆ0-59)を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toMinute(value) +``` + +エイリアス: `MINUTE` + +**引数** + +- `value` - [DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®æ™‚é–“ã®åˆ†ï¼ˆ0-59)。[UInt8](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT toMinute(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toMinute(toDateTime('2023-04-21 10:20:30'))─┠+│ 20 │ +└─────────────────────────────────────────────┘ +``` + +## toSecond + +日時ã®ç§’æˆåˆ†ï¼ˆ0-59)を返ã—ã¾ã™ã€‚ã†ã‚‹ã†ç§’ã¯è€ƒæ…®ã•ã‚Œã¾ã›ã‚“。 + +**構文** + +```sql +toSecond(value) +``` + +エイリアス: `SECOND` + +**引数** + +- `value` - [DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®åˆ†ã®ç§’(0-59)。[UInt8](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT toSecond(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toSecond(toDateTime('2023-04-21 10:20:30'))─┠+│ 30 │ +└─────────────────────────────────────────────┘ +``` + +## toMillisecond + +日時ã®ãƒŸãƒªç§’æˆåˆ†ï¼ˆ0-999)を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toMillisecond(value) +``` + +**引数** + +- `value` - [DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +エイリアス: `MILLISECOND` + +```sql +SELECT toMillisecond(toDateTime64('2023-04-21 10:20:30.456', 3)) +``` + +çµæžœï¼š + +```response +┌──toMillisecond(toDateTime64('2023-04-21 10:20:30.456', 3))─┠+│ 456 │ +└────────────────────────────────────────────────────────────┘ +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®åˆ†ã®ãƒŸãƒªç§’(0-999)。[UInt16](../data-types/int-uint.md)。 + +## toUnixTimestamp + +文字列ã€æ—¥ä»˜ã€ã¾ãŸã¯æ—¥æ™‚ã‚’[Unixタイムスタンプ](https://en.wikipedia.org/wiki/Unix_time)ã«å¤‰æ›ã—ã€`UInt32`表ç¾ã§è¿”ã—ã¾ã™ã€‚ + +関数ãŒæ–‡å­—列ã¨ã—ã¦å‘¼ã³å‡ºã•ã‚Œã‚‹ã¨ã€ã‚ªãƒ—ションã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å¼•æ•°ã‚’å—ã‘入れã¾ã™ã€‚ + +**構文** + +```sql +toUnixTimestamp(date) +toUnixTimestamp(str, [timezone]) +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Unixタイムスタンプを返ã—ã¾ã™ã€‚[UInt32](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT + '2017-11-05 08:07:47' AS dt_str, + toUnixTimestamp(dt_str) AS from_str, + toUnixTimestamp(dt_str, 'Asia/Tokyo') AS from_str_tokyo, + toUnixTimestamp(toDateTime(dt_str)) AS from_datetime, + toUnixTimestamp(toDateTime64(dt_str, 0)) AS from_datetime64, + toUnixTimestamp(toDate(dt_str)) AS from_date, + toUnixTimestamp(toDate32(dt_str)) AS from_date32 +FORMAT Vertical; +``` + +çµæžœï¼š + +```text +Row 1: +────── +dt_str: 2017-11-05 08:07:47 +from_str: 1509869267 +from_str_tokyo: 1509836867 +from_datetime: 1509869267 +from_datetime64: 1509869267 +from_date: 1509840000 +from_date32: 1509840000 +``` + +:::note +`toStartOf*`ã€`toLastDayOf*`ã€`toMonday`ã€`timeSlot`関数ã®è¿”り値ã®åž‹ã¯ã€æ§‹æˆãƒ‘ラメータ[enable_extended_results_for_datetime_functions](../../operations/settings/settings.md#enable-extended-results-for-datetime-functions)ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚ã“ã®ãƒ‘ラメータã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`0`ã§ã™ã€‚ + +動作ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š +* `enable_extended_results_for_datetime_functions = 0`ã®å ´åˆï¼š + * `toStartOfYear`ã€`toStartOfISOYear`ã€`toStartOfQuarter`ã€`toStartOfMonth`ã€`toStartOfWeek`ã€`toLastDayOfWeek`ã€`toLastDayOfMonth`ã€`toMonday`ã¯ã€å¼•æ•°ãŒ`Date`ã¾ãŸã¯`DateTime`ã§ã‚ã‚Œã°`Date`ã¾ãŸã¯`DateTime`ã‚’è¿”ã—ã€å¼•æ•°ãŒ`Date32`ã¾ãŸã¯`DateTime64`ã§ã‚ã‚Œã°`Date32`ã¾ãŸã¯`DateTime64`ã‚’è¿”ã—ã¾ã™ã€‚ + * `toStartOfDay`ã€`toStartOfHour`ã€`toStartOfFifteenMinutes`ã€`toStartOfTenMinutes`ã€`toStartOfFiveMinutes`ã€`toStartOfMinute`ã€`timeSlot`ã¯ã€å¼•æ•°ãŒ`Date`ã¾ãŸã¯`DateTime`ã§ã‚ã‚Œã°`DateTime`ã‚’è¿”ã—ã€å¼•æ•°ãŒ`Date32`ã¾ãŸã¯`DateTime64`ã§ã‚ã‚Œã°`DateTime64`ã‚’è¿”ã—ã¾ã™ã€‚ +::: + +## toStartOfYear + +日付ã¾ãŸã¯æ—¥æ™‚ã‚’å¹´ã®æœ€åˆã®æ—¥ã«åˆ‡ã‚Šæ¨ã¦ã¾ã™ã€‚日付を`Date`オブジェクトã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toStartOfYear(value) +``` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®å¹´ã®æœ€åˆã®æ—¥ã€‚[Date](../data-types/date.md)。 + +**例** + +```sql +SELECT toStartOfYear(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toStartOfYear(toDateTime('2023-04-21 10:20:30'))─┠+│ 2023-01-01 │ +└──────────────────────────────────────────────────┘ +``` + +## toStartOfISOYear + +日付ã¾ãŸã¯æ—¥æ™‚ã‚’ISOå¹´ã®æœ€åˆã®æ—¥ã«åˆ‡ã‚Šæ¨ã¦ã¾ã™ã€‚ã“ã‚Œã¯ã€Œé€šå¸¸ã€ã®å¹´ã¨ã¯ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚(å‚ç…§: [https://en.wikipedia.org/wiki/ISO_week_date](https://en.wikipedia.org/wiki/ISO_week_date))。 + +**構文** + +```sql +toStartOfISOYear(value) +``` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®å¹´ã®æœ€åˆã®æ—¥ã€‚[Date](../data-types/date.md)。 + +**例** + +```sql +SELECT toStartOfISOYear(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toStartOfISOYear(toDateTime('2023-04-21 10:20:30'))─┠+│ 2023-01-02 │ +└─────────────────────────────────────────────────────┘ +``` + +## toStartOfQuarter + +日付ã¾ãŸã¯æ—¥æ™‚ã‚’å››åŠæœŸã®æœ€åˆã®æ—¥ã«åˆ‡ã‚Šæ¨ã¦ã¾ã™ã€‚å››åŠæœŸã®æœ€åˆã®æ—¥ã¯ã€1月1æ—¥ã€4月1æ—¥ã€7月1æ—¥ã€ã¾ãŸã¯10月1æ—¥ã§ã™ã€‚ +日付を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toStartOfQuarter(value) +``` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®å››åŠæœŸã®æœ€åˆã®æ—¥ã€‚[Date](../data-types/date.md)。 + +**例** + +```sql +SELECT toStartOfQuarter(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toStartOfQuarter(toDateTime('2023-04-21 10:20:30'))─┠+│ 2023-04-01 │ +└─────────────────────────────────────────────────────┘ +``` + +## toStartOfMonth + +日付ã¾ãŸã¯æ—¥æ™‚を月ã®æœ€åˆã®æ—¥ã«åˆ‡ã‚Šæ¨ã¦ã¾ã™ã€‚日付を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toStartOfMonth(value) +``` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®æœˆã®æœ€åˆã®æ—¥ã€‚[Date](../data-types/date.md)。 + +**例** + +```sql +SELECT toStartOfMonth(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toStartOfMonth(toDateTime('2023-04-21 10:20:30'))─┠+│ 2023-04-01 │ +└───────────────────────────────────────────────────┘ +``` + +:::note +ä¸æ­£ãªæ—¥ä»˜ã‚’解æžã™ã‚‹éš›ã®å‹•ä½œã¯å®Ÿè£…ã«ç‰¹æœ‰ã§ã™ã€‚ClickHouseã¯ã‚¼ãƒ­ã®æ—¥ä»˜ã‚’è¿”ã™ã‹ã€ä¾‹å¤–をスローã™ã‚‹ã‹ã€ã€Œè‡ªç„¶ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚’è¡Œã†å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## toLastDayOfMonth + +日付ã¾ãŸã¯æ—¥æ™‚を月ã®æœ€çµ‚æ—¥ã«åˆ‡ã‚Šä¸Šã’ã¾ã™ã€‚日付を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toLastDayOfMonth(value) +``` + +エイリアス: `LAST_DAY` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®æœˆã®æœ€çµ‚日。[Date](../data-types/date.md)。 + +**例** + +```sql +SELECT toLastDayOfMonth(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœï¼š + +```response +┌─toLastDayOfMonth(toDateTime('2023-04-21 10:20:30'))─┠+│ 2023-04-30 │ +└─────────────────────────────────────────────────────┘ +``` + +## toMonday + +日付ã¾ãŸã¯æ—¥æ™‚を最寄りã®æœˆæ›œæ—¥ã«åˆ‡ã‚Šæ¨ã¦ã¾ã™ã€‚日付を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toMonday(value) +``` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時刻ã®æœ€å¯„ã‚Šã®æ—¥ä»˜ï¼ˆã¾ãŸã¯ãれ以å‰ï¼‰ã®æœˆæ›œæ—¥ã€‚[Date](../data-types/date.md)。 + +**例** + +```sql +SELECT + toMonday(toDateTime('2023-04-21 10:20:30')), /* 金曜日 */ + toMonday(toDate('2023-04-24')), /* ã™ã§ã«æœˆæ›œæ—¥ */ +``` + +çµæžœï¼š + +```response +┌─toMonday(toDateTime('2023-04-21 10:20:30'))─┬─toMonday(toDate('2023-04-24'))─┠+│ 2023-04-17 │ 2023-04-24 │ +└─────────────────────────────────────────────┴────────────────────────────────┘ +``` + +## toStartOfWeek + +日付ã¾ãŸã¯æ—¥æ™‚を最寄りã®æ—¥æ›œæ—¥ã¾ãŸã¯æœˆæ›œæ—¥ã«åˆ‡ã‚Šæ¨ã¦ã¾ã™ã€‚日付を返ã—ã¾ã™ã€‚モード引数ã¯`toWeek()`関数ã®ãƒ¢ãƒ¼ãƒ‰å¼•æ•°ã¨åŒã˜ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚モードãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯0ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +toStartOfWeek(t[, mode[, timezone]]) +``` + +**引数** + +- `t` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md)ã¾ãŸã¯[DateTime64](../data-types/datetime64.md)。 +- `mode` - 最åˆã®æ—¥ã‚’決定ã—ã¾ã™ã€‚`toWeek()`関数ã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- `timezone` - オプションã®ãƒ‘ラメータã§ã‚ã‚Šã€ä»–ã®å¤‰æ›é–¢æ•°ã¨åŒæ§˜ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜ã«å¯¾ã™ã‚‹æ—¥æ›œæ—¥ã¾ãŸã¯æœˆæ›œæ—¥ã®æ—¥ä»˜ï¼ˆã¾ãŸã¯ãれ以å‰ã®æ—¥ä»˜ï¼‰ã€‚[Date](../data-types/date.md)。 + +**例** + +```sql +SELECT + toStartOfWeek(toDateTime('2023-04-21 10:20:30')), /* 金曜日 */ + toStartOfWeek(toDateTime('2023-04-21 10:20:30'), 1), /* 金曜日 */ + toStartOfWeek(toDate('2023-04-24')), /* 月曜日 */ + toStartOfWeek(toDate('2023-04-24'), 1) /* 月曜日 */ +FORMAT Vertical +``` + +çµæžœï¼š + +```response +Row 1: +────── +toStartOfWeek(toDateTime('2023-04-21 10:20:30')): 2023-04-16 +toStartOfWeek(toDateTime('2023-04-21 10:20:30'), 1): 2023-04-17 +toStartOfWeek(toDate('2023-04-24')): 2023-04-23 +toStartOfWeek(toDate('2023-04-24'), 1): 2023-04-24 +``` +``` + +**引数** + +- `t` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) +- `mode` - [toWeek](#toweek) 関数ã§èª¬æ˜Žã•ã‚Œã¦ã„る通りã€é€±ã®æœ€å¾Œã®æ—¥ã‚’決定ã—ã¾ã™ +- `timezone` - オプションã®ãƒ‘ラメータã§ã€ä»–ã®å¤‰æ›é–¢æ•°ã¨åŒæ§˜ã«å‹•ä½œã—ã¾ã™ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜ã«åŸºã¥ãã€æœ€ã‚‚è¿‘ã„日曜日ã¾ãŸã¯æœˆæ›œæ—¥ã®æ—¥ä»˜ã€‚ [Date](../data-types/date.md)。 + +**例** + +```sql +SELECT + toLastDayOfWeek(toDateTime('2023-04-21 10:20:30')), /* 金曜日 */ + toLastDayOfWeek(toDateTime('2023-04-21 10:20:30'), 1), /* 金曜日 */ + toLastDayOfWeek(toDate('2023-04-22')), /* 土曜日 */ + toLastDayOfWeek(toDate('2023-04-22'), 1) /* 土曜日 */ +FORMAT Vertical +``` + +çµæžœ: + +```response +è¡Œ 1: +────── +toLastDayOfWeek(toDateTime('2023-04-21 10:20:30')): 2023-04-22 +toLastDayOfWeek(toDateTime('2023-04-21 10:20:30'), 1): 2023-04-23 +toLastDayOfWeek(toDate('2023-04-22')): 2023-04-22 +toLastDayOfWeek(toDate('2023-04-22'), 1): 2023-04-23 +``` + +## toStartOfDay + +時間をå«ã‚€æ—¥ä»˜ã‚’ã€æ—¥ä»˜ã®é–‹å§‹æ™‚刻ã«åˆ‡ã‚Šä¸‹ã’ã¾ã™ã€‚ + +**構文** + +```sql +toStartOfDay(value) +``` + +**引数** + +- `value` - [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時間ã®é–‹å§‹æ™‚刻。 [DateTime](../data-types/datetime.md)。 + +**例** + +```sql +SELECT toStartOfDay(toDateTime('2023-04-21 10:20:30')) +``` + +çµæžœ: + +```response +┌─toStartOfDay(toDateTime('2023-04-21 10:20:30'))─┠+│ 2023-04-21 00:00:00 │ +└─────────────────────────────────────────────────┘ +``` + +## toStartOfHour + +時間をå«ã‚€æ—¥ä»˜ã‚’ã€æ™‚刻ã®é–‹å§‹ã«åˆ‡ã‚Šä¸‹ã’ã¾ã™ã€‚ + +**構文** + +```sql +toStartOfHour(value) +``` + +**引数** + +- `value` - [DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時間ã®é–‹å§‹æ™‚刻。 [DateTime](../data-types/datetime.md)。 + +**例** + +```sql +SELECT + toStartOfHour(toDateTime('2023-04-21 10:20:30')), + toStartOfHour(toDateTime64('2023-04-21', 6)) +``` + +çµæžœ: + +```response +┌─toStartOfHour(toDateTime('2023-04-21 10:20:30'))─┬─toStartOfHour(toDateTime64('2023-04-21', 6))─┠+│ 2023-04-21 10:00:00 │ 2023-04-21 00:00:00 │ +└──────────────────────────────────────────────────┴──────────────────────────────────────────────┘ +``` + +## toStartOfMinute + +時間をå«ã‚€æ—¥ä»˜ã‚’ã€åˆ†ã®é–‹å§‹ã«åˆ‡ã‚Šä¸‹ã’ã¾ã™ã€‚ + +**構文** + +```sql +toStartOfMinute(value) +``` + +**引数** + +- `value` - [DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時間ã®é–‹å§‹æ™‚刻。 [DateTime](../data-types/datetime.md)。 + +**例** + +```sql +SELECT + toStartOfMinute(toDateTime('2023-04-21 10:20:30')), + toStartOfMinute(toDateTime64('2023-04-21 10:20:30.5300', 8)) +FORMAT Vertical +``` + +çµæžœ: + +```response +è¡Œ 1: +────── +toStartOfMinute(toDateTime('2023-04-21 10:20:30')): 2023-04-21 10:20:00 +toStartOfMinute(toDateTime64('2023-04-21 10:20:30.5300', 8)): 2023-04-21 10:20:00 +``` + +## toStartOfSecond + +サブ秒を切りæ¨ã¦ã¾ã™ã€‚ + +**構文** + +``` sql +toStartOfSecond(value, [timezone]) +``` + +**引数** + +- `value` — 日付ã¨æ™‚刻。[DateTime64](../data-types/datetime64.md)。 +- `timezone` — è¿”ã•ã‚Œã‚‹å€¤ã® [Timezone](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ã“ã®é–¢æ•°ã¯ `value` パラメータã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’使用ã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- サブ秒をæŒãŸãªã„入力値。[DateTime64](../data-types/datetime64.md)。 + +**例** + +タイムゾーンãªã—ã®ã‚¯ã‚¨ãƒª: + +``` sql +WITH toDateTime64('2020-01-01 10:20:30.999', 3) AS dt64 +SELECT toStartOfSecond(dt64); +``` + +çµæžœ: + +``` text +┌───toStartOfSecond(dt64)─┠+│ 2020-01-01 10:20:30.000 │ +└─────────────────────────┘ +``` + +タイムゾーンã‚ã‚Šã®ã‚¯ã‚¨ãƒª: + +``` sql +WITH toDateTime64('2020-01-01 10:20:30.999', 3) AS dt64 +SELECT toStartOfSecond(dt64, 'Asia/Istanbul'); +``` + +çµæžœ: + +``` text +┌─toStartOfSecond(dt64, 'Asia/Istanbul')─┠+│ 2020-01-01 13:20:30.000 │ +└────────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [Timezone](../../operations/server-configuration-parameters/settings.md#timezone) サーãƒãƒ¼æ§‹æˆãƒ‘ラメータ。 + +## toStartOfMillisecond + +時間をå«ã‚€æ—¥ä»˜ã‚’ã€ãƒŸãƒªç§’ã®é–‹å§‹ã«åˆ‡ã‚Šä¸‹ã’ã¾ã™ã€‚ + +**構文** + +``` sql +toStartOfMillisecond(value, [timezone]) +``` + +**引数** + +- `value` — 日付ã¨æ™‚刻。[DateTime64](../../sql-reference/data-types/datetime64.md)。 +- `timezone` — è¿”ã•ã‚Œã‚‹å€¤ã® [Timezone](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ã“ã®é–¢æ•°ã¯ `value` パラメータã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’使用ã—ã¾ã™ã€‚[String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- サブミリ秒をæŒã¤å…¥åŠ›å€¤ã€‚[DateTime64](../../sql-reference/data-types/datetime64.md)。 + +**例** + +タイムゾーンãªã—ã®ã‚¯ã‚¨ãƒª: + +``` sql +WITH toDateTime64('2020-01-01 10:20:30.999999999', 9) AS dt64 +SELECT toStartOfMillisecond(dt64); +``` + +çµæžœ: + +``` text +┌────toStartOfMillisecond(dt64)─┠+│ 2020-01-01 10:20:30.999000000 │ +└───────────────────────────────┘ +``` + +タイムゾーンã‚ã‚Šã®ã‚¯ã‚¨ãƒª: + +``` sql +WITH toDateTime64('2020-01-01 10:20:30.999999999', 9) AS dt64 +SELECT toStartOfMillisecond(dt64, 'Asia/Istanbul'); +``` + +çµæžœ: + +``` text +┌─toStartOfMillisecond(dt64, 'Asia/Istanbul')─┠+│ 2020-01-01 12:20:30.999000000 │ +└─────────────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [Timezone](../../operations/server-configuration-parameters/settings.md#timezone) サーãƒãƒ¼æ§‹æˆãƒ‘ラメータ。 + +## toStartOfMicrosecond + +時間をå«ã‚€æ—¥ä»˜ã‚’ã€ãƒžã‚¤ã‚¯ãƒ­ç§’ã®é–‹å§‹ã«åˆ‡ã‚Šä¸‹ã’ã¾ã™ã€‚ + +**構文** + +``` sql +toStartOfMicrosecond(value, [timezone]) +``` + +**引数** + +- `value` — 日付ã¨æ™‚刻。[DateTime64](../../sql-reference/data-types/datetime64.md)。 +- `timezone` — è¿”ã•ã‚Œã‚‹å€¤ã® [Timezone](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ã“ã®é–¢æ•°ã¯ `value` パラメータã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’使用ã—ã¾ã™ã€‚[String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- サブマイクロ秒をæŒã¤å…¥åŠ›å€¤ã€‚[DateTime64](../../sql-reference/data-types/datetime64.md)。 + +**例** + +タイムゾーンãªã—ã®ã‚¯ã‚¨ãƒª: + +``` sql +WITH toDateTime64('2020-01-01 10:20:30.999999999', 9) AS dt64 +SELECT toStartOfMicrosecond(dt64); +``` + +çµæžœ: + +``` text +┌────toStartOfMicrosecond(dt64)─┠+│ 2020-01-01 10:20:30.999999000 │ +└───────────────────────────────┘ +``` + +タイムゾーンã‚ã‚Šã®ã‚¯ã‚¨ãƒª: + +``` sql +WITH toDateTime64('2020-01-01 10:20:30.999999999', 9) AS dt64 +SELECT toStartOfMicrosecond(dt64, 'Asia/Istanbul'); +``` + +çµæžœ: + +``` text +┌─toStartOfMicrosecond(dt64, 'Asia/Istanbul')─┠+│ 2020-01-01 12:20:30.999999000 │ +└─────────────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [Timezone](../../operations/server-configuration-parameters/settings.md#timezone) サーãƒãƒ¼æ§‹æˆãƒ‘ラメータ。 + +## toStartOfNanosecond + +時間をå«ã‚€æ—¥ä»˜ã‚’ã€ãƒŠãƒŽç§’ã®é–‹å§‹ã«åˆ‡ã‚Šä¸‹ã’ã¾ã™ã€‚ + +**構文** + +``` sql +toStartOfNanosecond(value, [timezone]) +``` + +**引数** + +- `value` — 日付ã¨æ™‚刻。[DateTime64](../../sql-reference/data-types/datetime64.md)。 +- `timezone` — è¿”ã•ã‚Œã‚‹å€¤ã® [Timezone](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€ã“ã®é–¢æ•°ã¯ `value` パラメータã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’使用ã—ã¾ã™ã€‚[String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ナノ秒をæŒã¤å…¥åŠ›å€¤ã€‚[DateTime64](../../sql-reference/data-types/datetime64.md)。 + +**例** + +タイムゾーンãªã—ã®ã‚¯ã‚¨ãƒª: + +``` sql +WITH toDateTime64('2020-01-01 10:20:30.999999999', 9) AS dt64 +SELECT toStartOfNanosecond(dt64); +``` + +çµæžœ: + +``` text +┌─────toStartOfNanosecond(dt64)─┠+│ 2020-01-01 10:20:30.999999999 │ +└───────────────────────────────┘ +``` + +タイムゾーンã‚ã‚Šã®ã‚¯ã‚¨ãƒª: + +``` sql +WITH toDateTime64('2020-01-01 10:20:30.999999999', 9) AS dt64 +SELECT toStartOfNanosecond(dt64, 'Asia/Istanbul'); +``` + +çµæžœ: + +``` text +┌─toStartOfNanosecond(dt64, 'Asia/Istanbul')─┠+│ 2020-01-01 12:20:30.999999999 │ +└────────────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [Timezone](../../operations/server-configuration-parameters/settings.md#timezone) サーãƒãƒ¼æ§‹æˆãƒ‘ラメータ。 + +## toStartOfFiveMinutes + +時間をå«ã‚€æ—¥ä»˜ã‚’ã€5分ã®é–‹å§‹ã«åˆ‡ã‚Šä¸‹ã’ã¾ã™ã€‚ + +**構文** + +```sql +toStartOfFiveMinutes(value) +``` + +**引数** + +- `value` - [DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時間ã®5分ã®é–‹å§‹æ™‚刻。 [DateTime](../data-types/datetime.md)。 + +**例** + +```sql +SELECT + toStartOfFiveMinutes(toDateTime('2023-04-21 10:17:00')), + toStartOfFiveMinutes(toDateTime('2023-04-21 10:20:00')), + toStartOfFiveMinutes(toDateTime('2023-04-21 10:23:00')) +FORMAT Vertical +``` + +çµæžœ: + +```response +è¡Œ 1: +────── +toStartOfFiveMinutes(toDateTime('2023-04-21 10:17:00')): 2023-04-21 10:15:00 +toStartOfFiveMinutes(toDateTime('2023-04-21 10:20:00')): 2023-04-21 10:20:00 +toStartOfFiveMinutes(toDateTime('2023-04-21 10:23:00')): 2023-04-21 10:20:00 +``` + +## toStartOfTenMinutes + +時間をå«ã‚€æ—¥ä»˜ã‚’ã€10分ã®é–‹å§‹ã«åˆ‡ã‚Šä¸‹ã’ã¾ã™ã€‚ + +**構文** + +```sql +toStartOfTenMinutes(value) +``` + +**引数** + +- `value` - [DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時間ã®10分ã®é–‹å§‹æ™‚刻。 [DateTime](../data-types/datetime.md)。 + +**例** + +```sql +SELECT + toStartOfTenMinutes(toDateTime('2023-04-21 10:17:00')), + toStartOfTenMinutes(toDateTime('2023-04-21 10:20:00')), + toStartOfTenMinutes(toDateTime('2023-04-21 10:23:00')) +FORMAT Vertical +``` + +çµæžœ: + +```response +è¡Œ 1: +────── +toStartOfTenMinutes(toDateTime('2023-04-21 10:17:00')): 2023-04-21 10:10:00 +toStartOfTenMinutes(toDateTime('2023-04-21 10:20:00')): 2023-04-21 10:20:00 +toStartOfTenMinutes(toDateTime('2023-04-21 10:23:00')): 2023-04-21 10:20:00 +``` + +## toStartOfFifteenMinutes + +時間をå«ã‚€æ—¥ä»˜ã‚’ã€15分ã®é–‹å§‹ã«åˆ‡ã‚Šä¸‹ã’ã¾ã™ã€‚ + +**構文** + +```sql +toStartOfFifteenMinutes(value) +``` + +**引数** + +- `value` - [DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜/時間ã®15分ã®é–‹å§‹æ™‚刻。 [DateTime](../data-types/datetime.md)。 + +**例** + +```sql +SELECT + toStartOfFifteenMinutes(toDateTime('2023-04-21 10:17:00')), + toStartOfFifteenMinutes(toDateTime('2023-04-21 10:20:00')), + toStartOfFifteenMinutes(toDateTime('2023-04-21 10:23:00')) +FORMAT Vertical +``` + +çµæžœ: + +```response +è¡Œ 1: +────── +toStartOfFifteenMinutes(toDateTime('2023-04-21 10:17:00')): 2023-04-21 10:15:00 +toStartOfFifteenMinutes(toDateTime('2023-04-21 10:20:00')): 2023-04-21 10:15:00 +toStartOfFifteenMinutes(toDateTime('2023-04-21 10:23:00')): 2023-04-21 10:15:00 +``` + +## toStartOfInterval + +ã“ã®é–¢æ•°ã¯ `toStartOf*()` 関数を一般化ã—〠`toStartOfInterval(date_or_date_with_time, INTERVAL x unit [, time_zone])` 構文を使用ã—ã¾ã™ã€‚ +例ãˆã°ã€ +- `toStartOfInterval(t, INTERVAL 1 YEAR)` 㯠`toStartOfYear(t)` ã¨åŒã˜çµæžœã‚’è¿”ã—ã¾ã™ +- `toStartOfInterval(t, INTERVAL 1 MONTH)` 㯠`toStartOfMonth(t)` ã¨åŒã˜çµæžœã‚’è¿”ã—ã¾ã™ +- `toStartOfInterval(t, INTERVAL 1 DAY)` 㯠`toStartOfDay(t)` ã¨åŒã˜çµæžœã‚’è¿”ã—ã¾ã™ +- `toStartOfInterval(t, INTERVAL 15 MINUTE)` 㯠`toStartOfFifteenMinutes(t)` ã¨åŒã˜çµæžœã‚’è¿”ã—ã¾ã™ + +計算ã¯ç‰¹å®šã®æ™‚点ã«å¯¾ã—ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ + +| インターãƒãƒ« | 開始 | +|-------------|--------------------------| +| YEAR | å¹´ 0 | +| QUARTER | 1900年第1å››åŠæœŸ | +| MONTH | 1900å¹´1月 | +| WEEK | 1970年第1週(01-05) | +| DAY | 1970-01-01 | +| HOUR | (*) | +| MINUTE | 1970-01-01 00:00:00 | +| SECOND | 1970-01-01 00:00:00 | +| MILLISECOND | 1970-01-01 00:00:00 | +| MICROSECOND | 1970-01-01 00:00:00 | +| NANOSECOND | 1970-01-01 00:00:00 | + +(*) 時間インターãƒãƒ«ã¯ç‰¹åˆ¥ã§ã™: 計算ã¯å¸¸ã«ç¾åœ¨ã®æ—¥ã®00:00:00(真夜中)を基準ã«è¡Œã‚ã‚Œã¾ã™ã€‚ãã®ãŸã‚ã€1時ã‹ã‚‰23時ã®é–“ã®æ™‚間値ã®ã¿ãŒæœ‰ç”¨ã§ã™ã€‚ + +ã‚‚ã— `WEEK` å˜ä½ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€`toStartOfInterval` ã¯é€±ã®å§‹ã¾ã‚Šã‚’月曜日ã¨ä»®å®šã—ã¾ã™ã€‚ã“ã®å‹•ä½œã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æ—¥æ›œæ—¥ã‹ã‚‰å§‹ã¾ã‚‹ `toStartOfWeek` 関数ã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +toStartOfInterval(value, INTERVAL x unit[, time_zone]) +toStartOfInterval(value, INTERVAL x unit[, origin[, time_zone]]) +``` +エイリアス: `time_bucket`, `date_bin`. + +2番目ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ã¯ã€TimescaleDBã® `time_bucket()` ãŠã‚ˆã³ PostgreSQLã® `date_bin()` 関数をエミュレートã—ã¾ã™ã€‚例ãˆã°ã€ + +``` SQL +SELECT toStartOfInterval(toDateTime('2023-01-01 14:45:00'), INTERVAL 1 MINUTE, toDateTime('2023-01-01 14:35:30')); +``` + +çµæžœ: + +``` reference +┌───toStartOfInterval(...)─┠+│ 2023-01-01 14:44:30 │ +└──────────────────────────┘ +``` + +**å‚ç…§** +- [date_trunc](#date_trunc) + +## toTime + +時間をä¿æŒã—ãªãŒã‚‰ã€æ—¥æ™‚を特定ã®å›ºå®šæ—¥ä»˜ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +toTime(date[,timezone]) +``` + +**引数** + +- `date` — 時間ã«å¤‰æ›ã™ã‚‹æ—¥ä»˜ã€‚ [Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 +- `timezone`(オプション) — è¿”ã•ã‚Œã‚‹å€¤ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã€‚[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 日付を `1970-01-02` ã«ç­‰ã—ãã—ãªãŒã‚‰ã€æ™‚é–“ã‚’ä¿æŒã—㟠DateTime。[DateTime](../data-types/datetime.md)。 + +:::note +`date` 入力引数ãŒã‚µãƒ–秒ã®æˆåˆ†ã‚’å«ã‚“ã§ã„ãŸå ´åˆã€ãれらã¯è¿”ã•ã‚Œã‚‹ `DateTime` 値ã«ãŠã„ã¦ç§’精度ã§å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT toTime(toDateTime64('1970-12-10 01:20:30.3000',3)) AS result, toTypeName(result); +``` + +çµæžœ: + +```response +┌──────────────result─┬─toTypeName(result)─┠+│ 1970-01-02 01:20:30 │ DateTime │ +└─────────────────────┴────────────────────┘ +``` + +## toRelativeYearNum + +日時をã€éŽåŽ»ã®ç‰¹å®šã®å›ºå®šç‚¹ã‹ã‚‰çµŒéŽã—ãŸå¹´æ•°ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +toRelativeYearNum(date) +``` + +**引数** + +- `date` — 日付ã¾ãŸã¯æ—¥æ™‚。[Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- éŽåŽ»ã®å›ºå®šå‚照点ã‹ã‚‰ã®å¹´æ•°ã€‚ [UInt16](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toRelativeYearNum(toDate('2002-12-08')) AS y1, + toRelativeYearNum(toDate('2010-10-26')) AS y2 +``` + +çµæžœ: + +```response +┌───y1─┬───y2─┠+│ 2002 │ 2010 │ +└──────┴──────┘ +``` + +## toRelativeQuarterNum + +日時をã€éŽåŽ»ã®ç‰¹å®šã®å›ºå®šç‚¹ã‹ã‚‰çµŒéŽã—ãŸå››åŠæœŸæ•°ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +toRelativeQuarterNum(date) +``` + +**引数** + +- `date` — 日付ã¾ãŸã¯æ—¥æ™‚。[Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- éŽåŽ»ã®å›ºå®šå‚照点ã‹ã‚‰ã®å››åŠæœŸæ•°ã€‚ [UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toRelativeQuarterNum(toDate('1993-11-25')) AS q1, + toRelativeQuarterNum(toDate('2005-01-05')) AS q2 +``` + +çµæžœ: + +```response +┌───q1─┬───q2─┠+│ 7975 │ 8020 │ +└──────┴──────┘ +``` + +## toRelativeMonthNum + +日時をã€éŽåŽ»ã®ç‰¹å®šã®å›ºå®šç‚¹ã‹ã‚‰çµŒéŽã—ãŸæœˆæ•°ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +toRelativeMonthNum(date) +``` + +**引数** + +- `date` — 日付ã¾ãŸã¯æ—¥æ™‚。[Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- éŽåŽ»ã®å›ºå®šå‚照点ã‹ã‚‰ã®æœˆæ•°ã€‚ [UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toRelativeMonthNum(toDate('2001-04-25')) AS m1, + toRelativeMonthNum(toDate('2009-07-08')) AS m2 +``` + +çµæžœ: + +```response +┌────m1─┬────m2─┠+│ 24016 │ 24115 │ +└───────┴───────┘ +``` + +## toRelativeWeekNum + +日時をã€éŽåŽ»ã®ç‰¹å®šã®å›ºå®šç‚¹ã‹ã‚‰çµŒéŽã—ãŸé€±æ•°ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +toRelativeWeekNum(date) +``` + +**引数** + +- `date` — 日付ã¾ãŸã¯æ—¥æ™‚。[Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- éŽåŽ»ã®å›ºå®šå‚照点ã‹ã‚‰ã®é€±æ•°ã€‚ [UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toRelativeWeekNum(toDate('2000-02-29')) AS w1, + toRelativeWeekNum(toDate('2001-01-12')) AS w2 +``` + +çµæžœ: + +```response +┌───w1─┬───w2─┠+│ 1574 │ 1619 │ +└──────┴──────┘ +``` + +## toRelativeDayNum + +日時をã€éŽåŽ»ã®ç‰¹å®šã®å›ºå®šç‚¹ã‹ã‚‰çµŒéŽã—ãŸæ—¥æ•°ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +toRelativeDayNum(date) +``` + +**引数** + +- `date` — 日付ã¾ãŸã¯æ—¥æ™‚。[Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- éŽåŽ»ã®å›ºå®šå‚照点ã‹ã‚‰ã®æ—¥æ•°ã€‚ [UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toRelativeDayNum(toDate('1993-10-05')) AS d1, + toRelativeDayNum(toDate('2000-09-20')) AS d2 +``` + +çµæžœ: + +```response +┌───d1─┬────d2─┠+│ 8678 │ 11220 │ +└──────┴───────┘ +``` + +## toRelativeHourNum + +日時をã€éŽåŽ»ã®ç‰¹å®šã®å›ºå®šç‚¹ã‹ã‚‰çµŒéŽã—ãŸæ™‚é–“æ•°ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +toRelativeHourNum(date) +``` + +**引数** + +- `date` — 日付ã¾ãŸã¯æ—¥æ™‚。[Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- éŽåŽ»ã®å›ºå®šå‚照点ã‹ã‚‰ã®æ™‚間数。 [UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toRelativeHourNum(toDateTime('1993-10-05 05:20:36')) AS h1, + toRelativeHourNum(toDateTime('2000-09-20 14:11:29')) AS h2 +``` + +çµæžœ: + +```response +┌─────h1─┬─────h2─┠+│ 208276 │ 269292 │ +└────────┴────────┘ +``` + +## toRelativeMinuteNum + +日時をã€éŽåŽ»ã®ç‰¹å®šã®å›ºå®šç‚¹ã‹ã‚‰çµŒéŽã—ãŸåˆ†æ•°ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +toRelativeMinuteNum(date) +``` + +**引数** + +- `date` — 日付ã¾ãŸã¯æ—¥æ™‚。[Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- éŽåŽ»ã®å›ºå®šå‚照点ã‹ã‚‰ã®åˆ†æ•°ã€‚ [UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toRelativeMinuteNum(toDateTime('1993-10-05 05:20:36')) AS m1, + toRelativeMinuteNum(toDateTime('2000-09-20 14:11:29')) AS m2 +``` + +çµæžœ: + +```response +┌───────m1─┬───────m2─┠+│ 12496580 │ 16157531 │ +└──────────┴──────────┘ +``` + +## toRelativeSecondNum + +日時をã€éŽåŽ»ã®ç‰¹å®šã®å›ºå®šç‚¹ã‹ã‚‰çµŒéŽã—ãŸç§’æ•°ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +toRelativeSecondNum(date) +``` + +**引数** + +- `date` — 日付ã¾ãŸã¯æ—¥æ™‚。[Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- éŽåŽ»ã®å›ºå®šå‚照点ã‹ã‚‰ã®ç§’数。 [UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toRelativeSecondNum(toDateTime('1993-10-05 05:20:36')) AS s1, + toRelativeSecondNum(toDateTime('2000-09-20 14:11:29')) AS s2 +``` + +çµæžœ: + +```response +┌────────s1─┬────────s2─┠+│ 749794836 │ 969451889 │ +└───────────┴───────────┘ +``` + +## toISOYear + +日時をã€ISOå¹´ã‚’ UInt16 数値ã¨ã—ã¦å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +toISOYear(value) +``` + +**引数** + +- `value` — 日付ã¾ãŸã¯æ—¥æ™‚。 [Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力値をISO年番å·ã«å¤‰æ›ã—ãŸã‚‚ã®ã€‚ [UInt16](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toISOYear(toDate('2024/10/02')) as year1, + toISOYear(toDateTime('2024-10-02 01:30:00')) as year2 +``` + +çµæžœ: + +```response +┌─year1─┬─year2─┠+│ 2024 │ 2024 │ +└───────┴───────┘ +``` + +## toISOWeek + +日時をã€ISO週番å·ã‚’å«ã‚€ UInt8 数値ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +toISOWeek(value) +``` + +**引数** + +- `value` — 日付ã¾ãŸã¯æ—¥æ™‚ã«é–¢é€£ã™ã‚‹å€¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `value`ã‚’ç¾åœ¨ã®ISO週番å·ã«å¤‰æ›ã—ãŸã‚‚ã®ã€‚ [UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toISOWeek(toDate('2024/10/02')) AS week1, + toISOWeek(toDateTime('2024/10/02 01:30:00')) AS week2 +``` + +çµæžœ: + +```response +┌─week1─┬─week2─┠+│ 40 │ 40 │ +└───────┴───────┘ +``` + +## toWeek + +ã“ã®é–¢æ•°ã¯æ—¥æ™‚ã¾ãŸã¯æ—¥ä»˜ã®é€±ç•ªå·ã‚’è¿”ã—ã¾ã™ã€‚ `toWeek()` ã®2引数形å¼ã§ã¯ã€é€±ã®å§‹ã¾ã‚Šã‚’日曜日ã¾ãŸã¯æœˆæ›œæ—¥ã«æŒ‡å®šã§ãã€è¿”ã•ã‚Œã‚‹å€¤ãŒ0ã‹ã‚‰53ã®ç¯„囲ã‹1ã‹ã‚‰53ã®ç¯„囲ã«ã™ã‚‹ã‹ã‚’指定ã—ã¾ã™ã€‚mode引数ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®modeã¯0ã§ã™ã€‚ + +`toISOWeek()` ã¯ã€`toWeek(date,3)` ã«ç›¸å½“ã™ã‚‹äº’æ›æ€§é–¢æ•°ã§ã™ã€‚ + +以下ã®è¡¨ã¯mode引数ã®å‹•ä½œã‚’説明ã—ã¾ã™ã€‚ + +| モード | 週ã®åˆæ—¥ | 範囲 | 週1ã¯æœ€åˆã®é€± ... | +|------|-------|-------|------------------------| +| 0 | 日曜日 | 0-53 | 当年ã«æ—¥æ›œæ—¥ã‚’å«ã‚€é€± | +| 1 | 月曜日 | 0-53 | 当年ã«4日以上をå«ã‚€é€± | +| 2 | 日曜日 | 1-53 | 当年ã«æ—¥æ›œæ—¥ã‚’å«ã‚€é€± | +| 3 | 月曜日 | 1-53 | 当年ã«4日以上をå«ã‚€é€± | +| 4 | 日曜日 | 0-53 | 当年ã«4日以上をå«ã‚€é€± | +| 5 | 月曜日 | 0-53 | 当年ã«æœˆæ›œæ—¥ã‚’å«ã‚€é€± | +| 6 | 日曜日 | 1-53 | 当年ã«4日以上をå«ã‚€é€± | +| 7 | 月曜日 | 1-53 | 当年ã«æœˆæ›œæ—¥ã‚’å«ã‚€é€± | +| 8 | 日曜日 | 1-53 | 1月1日をå«ã‚€é€± | +| 9 | 月曜日 | 1-53 | 1月1日をå«ã‚€é€± | + +「当年ã«4日以上をå«ã‚€ã€ã¨æ„味ã™ã‚‹mode値ã®å ´åˆã€é€±ã¯ISO 8601:1988ã«å¾“ã£ã¦ç•ªå·ãŒä»˜ã‘られã¾ã™ï¼š + +- 1月1日をå«ã‚€é€±ãŒ4日以上ã‚ã‚‹å ´åˆã€ãã‚Œã¯é€±1ã§ã™ã€‚ + +- ãã†ã§ãªã„å ´åˆã€å‰ã®å¹´ã®æœ€å¾Œã®é€±ã«ãªã‚Šã€æ¬¡ã®é€±ãŒé€±1ã§ã™ã€‚ + +「1月1日をå«ã‚€ã€ã¨æ„味ã™ã‚‹mode値ã®å ´åˆã€1月1日をå«ã‚€é€±ãŒé€±1ã§ã™ã€‚ +æ–°å¹´ã«ä½•æ—¥ã‚ã£ãŸã‹ã¯é–¢ä¿‚ã‚ã‚Šã¾ã›ã‚“。一日ã ã‘ã§ã‚‚構ã„ã¾ã›ã‚“。 +ã¤ã¾ã‚Šã€12月ã®æœ€å¾Œã®é€±ãŒç¿Œå¹´ã®1月1日をå«ã‚€å ´åˆã€ãã‚Œã¯ç¿Œå¹´ã®é€±1ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +toWeek(t[, mode[, time_zone]]) +``` + +エイリアス: `WEEK` + +**引数** + +- `t` – 日付ã¾ãŸã¯æ—¥æ™‚。 +- `mode` – オプションã®ãƒ‘ラメータ。値ã®ç¯„囲㯠\[0,9\]ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯0ã§ã™ã€‚ +- `timezone` – オプションã®ãƒ‘ラメータã§ã€ä»–ã®å¤‰æ›é–¢æ•°ã¨åŒæ§˜ã«å‹•ä½œã—ã¾ã™ã€‚ + +最åˆã®å¼•æ•°ã¯ã€[parseDateTime64BestEffort()](type-conversion-functions.md#parsedatetime64besteffort)ã§ã‚µãƒãƒ¼ãƒˆã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®[文字列](../data-types/string.md)ã¨ã—ã¦æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚文字列引数ã®ã‚µãƒãƒ¼ãƒˆã¯ã€ç‰¹å®šã®3rdパーティツールã«ã‚ˆã£ã¦æœŸå¾…ã•ã‚Œã‚‹MySQLã¨ã®äº’æ›æ€§ã‚’ç†ç”±ã«å­˜åœ¨ã—ã¦ã„ã¾ã™ã€‚文字列引数ã®ã‚µãƒãƒ¼ãƒˆã¯ã€å°†æ¥çš„ã«ã¯æ–°ã—ã„MySQL互æ›æ€§è¨­å®šã«ä¾å­˜ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€æ–‡å­—列解æžã¯ä¸€èˆ¬çš„ã«é…ã„ãŸã‚使用ã—ãªã„ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT toDate('2016-12-27') AS date, toWeek(date) AS week0, toWeek(date,1) AS week1, toWeek(date,9) AS week9; +``` + +``` text +┌───────date─┬─week0─┬─week1─┬─week9─┠+│ 2016-12-27 │ 52 │ 52 │ 1 │ +└────────────┴───────┴───────┴───────┘ +``` + +## toYearWeek + +日付ã®å¹´ã¨é€±ã‚’è¿”ã—ã¾ã™ã€‚çµæžœã®å¹´ã¯ã€å¹´ã®æœ€åˆã®é€±ã¨æœ€å¾Œã®é€±ã§æ—¥ä»˜å¼•æ•°ã®å¹´ã¨ã¯ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +mode引数㯠`toWeek()` ã®mode引数ã¨åŒæ§˜ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚å˜ä¸€å¼•æ•°ã®æ§‹æ–‡ã®å ´åˆã€mode値0ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +`toISOYear()` ã¯ã€`intDiv(toYearWeek(date,3),100)` ã«ç›¸å½“ã™ã‚‹äº’æ›æ€§é–¢æ•°ã§ã™ã€‚ + +:::warning +`toYearWeek()` ã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹é€±ç•ªå·ã¯ã€`toWeek()` ãŒè¿”ã™ã‚‚ã®ã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚`toWeek()` ã¯å¸¸ã«æŒ‡å®šã•ã‚ŒãŸå¹´ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§é€±ç•ªå·ã‚’è¿”ã—ã€`toWeek()` ㌠`0` ã‚’è¿”ã™å ´åˆã€`toYearWeek()` ã¯å‰å¹´åº¦ã®æœ€å¾Œã®é€±ã«å¯¾å¿œã™ã‚‹å€¤ã‚’è¿”ã—ã¾ã™ã€‚以下ã®ä¾‹ã® `prev_yearWeek` ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**構文** + +``` sql +toYearWeek(t[, mode[, timezone]]) +``` + +エイリアス: `YEARWEEK` + +最åˆã®å¼•æ•°ã¯ã€[parseDateTime64BestEffort()](type-conversion-functions.md#parsedatetime64besteffort) ã§ã‚µãƒãƒ¼ãƒˆã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®[文字列](../data-types/string.md)ã¨ã—ã¦æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚文字列引数ã®ã‚µãƒãƒ¼ãƒˆã¯ã€ç‰¹å®šã®3rdパーティツールã«ã‚ˆã£ã¦æœŸå¾…ã•ã‚Œã‚‹MySQLã¨ã®äº’æ›æ€§ã‚’ç†ç”±ã«å­˜åœ¨ã—ã¦ã„ã¾ã™ã€‚文字列引数ã®ã‚µãƒãƒ¼ãƒˆã¯ã€å°†æ¥çš„ã«ã¯æ–°ã—ã„MySQL互æ›æ€§è¨­å®šã«ä¾å­˜ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€æ–‡å­—列解æžã¯ä¸€èˆ¬çš„ã«é…ã„ãŸã‚使用ã—ãªã„ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT toDate('2016-12-27') AS date, toYearWeek(date) AS yearWeek0, toYearWeek(date,1) AS yearWeek1, toYearWeek(date,9) AS yearWeek9, toYearWeek(toDate('2022-01-01')) AS prev_yearWeek; +``` + +``` text +┌───────date─┬─yearWeek0─┬─yearWeek1─┬─yearWeek9─┬─prev_yearWeek─┠+│ 2016-12-27 │ 201652 │ 201652 │ 201701 │ 202152 │ +└────────────┴───────────┴───────────┴───────────┴───────────────┘ +``` + +## toDaysSinceYearZero + +指定ã•ã‚ŒãŸæ—¥ä»˜ã‹ã‚‰[0000å¹´1月1æ—¥](https://en.wikipedia.org/wiki/Year_zero)ã¾ã§ã®çµŒéŽæ—¥æ•°ã‚’è¿”ã—ã¾ã™ã€‚[ISO 8601](https://en.wikipedia.org/wiki/Gregorian_calendar#Proleptic_Gregorian_calendar)ã§å®šç¾©ã•ã‚Œã‚‹å…ˆå–りグレゴリオ暦ã«åŸºã¥ãã¾ã™ã€‚計算ã¯MySQLã®[`TO_DAYS()`](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_to-days)関数ã¨åŒæ§˜ã§ã™ã€‚ + +**構文** + +``` sql +toDaysSinceYearZero(date[, time_zone]) +``` + +エイリアス: `TO_DAYS` + +**引数** + +- `date` — 年ゼロã‹ã‚‰çµŒéŽã—ãŸæ—¥æ•°ã‚’計算ã™ã‚‹æ—¥ä»˜ã€‚[Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 +- `time_zone` — タイムゾーンを表ã™æ–‡å­—列型ã®å®šæ•°å€¤ã¾ãŸã¯å¼ã€‚[String types](../data-types/string.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +0000-01-01ã‹ã‚‰ã®æ—¥æ•°ã€‚[UInt32](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT toDaysSinceYearZero(toDate('2023-09-08')); +``` + +çµæžœ: + +``` text +┌─toDaysSinceYearZero(toDate('2023-09-08')))─┠+│ 713569 │ +└────────────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [fromDaysSinceYearZero](#fromdayssinceyearzero) + +## fromDaysSinceYearZero + +指定ã•ã‚ŒãŸæ—¥æ•°ã‹ã‚‰[0000å¹´1月1æ—¥](https://en.wikipedia.org/wiki/Year_zero)ã‚’éŽãŽãŸå¯¾å¿œã™ã‚‹æ—¥ä»˜ã‚’è¿”ã—ã¾ã™ã€‚[ISO 8601](https://en.wikipedia.org/wiki/Gregorian_calendar#Proleptic_Gregorian_calendar)ã§å®šç¾©ã•ã‚Œã‚‹å…ˆå–りグレゴリオ暦ã«åŸºã¥ãã¾ã™ã€‚計算ã¯MySQLã®[`FROM_DAYS()`](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_from-days)関数ã¨åŒæ§˜ã§ã™ã€‚ + +çµæžœãŒ[Date](../data-types/date.md)åž‹ã®ç¯„囲内ã«åŽã¾ã‚‰ãªã„å ´åˆã€æœªå®šç¾©ã§ã™ã€‚ + +**構文** + +``` sql +fromDaysSinceYearZero(days) +``` + +エイリアス: `FROM_DAYS` + +**引数** + +- `days` — 年ゼロã‹ã‚‰çµŒéŽã—ãŸæ—¥æ•°ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +年ゼロã‹ã‚‰çµŒéŽã—ãŸæ—¥æ•°ã«å¯¾å¿œã™ã‚‹æ—¥ä»˜ã€‚[Date](../data-types/date.md)。 + +**例** + +``` sql +SELECT fromDaysSinceYearZero(739136), fromDaysSinceYearZero(toDaysSinceYearZero(toDate('2023-09-08'))); +``` + +çµæžœ: + +``` text +┌─fromDaysSinceYearZero(739136)─┬─fromDaysSinceYearZero(toDaysSinceYearZero(toDate('2023-09-08')))─┠+│ 2023-09-08 │ 2023-09-08 │ +└───────────────────────────────┴──────────────────────────────────────────────────────────────────┘ +``` + +**å‚ç…§** + +- [toDaysSinceYearZero](#todayssinceyearzero) + +## fromDaysSinceYearZero32 + +[FromDaysSinceYearZero](#fromdayssinceyearzero) ã¨åŒæ§˜ã§ã™ãŒã€[Date32](../data-types/date32.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +## age + +`startdate` 㨠`enddate` ã®é–“ã® `unit` コンãƒãƒ¼ãƒãƒ³ãƒˆã®å·®ã‚’è¿”ã—ã¾ã™ã€‚å·®ã¯1ナノ秒ã®ç²¾åº¦ã§è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ +例ãˆã°ã€`2021-12-29` 㨠`2022-01-01` ã®é–“ã®å·®ã¯ã€`day` å˜ä½ã§3æ—¥ã€`month` å˜ä½ã§0ヶ月ã€`year` å˜ä½ã§0å¹´ã§ã™ã€‚ + +`age` ã®ä»£æ›¿ã¨ã—ã¦ã€`date_diff` 関数ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +age('unit', startdate, enddate, [timezone]) +``` + +**引数** + +- `unit` — çµæžœã®ãŸã‚ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã‚¿ã‚¤ãƒ—。[String](../data-types/string.md)。 + å¯èƒ½ãªå€¤: + + - `nanosecond`, `nanoseconds`, `ns` + - `microsecond`, `microseconds`, `us`, `u` + - `millisecond`, `milliseconds`, `ms` + - `second`, `seconds`, `ss`, `s` + - `minute`, `minutes`, `mi`, `n` + - `hour`, `hours`, `hh`, `h` + - `day`, `days`, `dd`, `d` + - `week`, `weeks`, `wk`, `ww` + - `month`, `months`, `mm`, `m` + - `quarter`, `quarters`, `qq`, `q` + - `year`, `years`, `yyyy`, `yy` + +- `startdate` — 引ãç®—ã®æœ€åˆã®æ™‚間値(被減数)。[Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +- `enddate` — 引ãç®—ã®2番目ã®æ™‚間値(減数)。[Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +``` +```html +- `timezone` — [タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone) (オプション)。指定ã•ã‚ŒãŸå ´åˆã€`startdate` 㨠`enddate` ã®ä¸¡æ–¹ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚指定ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€`startdate` 㨠`enddate` ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ãれらãŒç•°ãªã‚‹å ´åˆã€çµæžœã¯æœªå®šç¾©ã¨ãªã‚Šã¾ã™ã€‚[文字列](../data-types/string.md)。 + +**戻り値** + +`enddate` 㨠`startdate` ã®é–“ã®å·®ã‚’ `unit` ã§è¡¨ç¾ã—ãŸã‚‚ã®ã€‚[æ•´æ•°](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT age('hour', toDateTime('2018-01-01 22:30:00'), toDateTime('2018-01-02 23:00:00')); +``` + +çµæžœ: + +``` text +┌─age('hour', toDateTime('2018-01-01 22:30:00'), toDateTime('2018-01-02 23:00:00'))─┠+│ 24 │ +└───────────────────────────────────────────────────────────────────────────────────┘ +``` + +``` sql +SELECT + toDate('2022-01-01') AS e, + toDate('2021-12-29') AS s, + age('day', s, e) AS day_age, + age('month', s, e) AS month__age, + age('year', s, e) AS year_age; +``` + +çµæžœ: + +``` text +┌──────────e─┬──────────s─┬─day_age─┬─month__age─┬─year_age─┠+│ 2022-01-01 │ 2021-12-29 │ 3 │ 0 │ 0 │ +└────────────┴────────────┴─────────┴────────────┴──────────┘ +``` + + +## date_diff + +`startdate` 㨠`enddate` ã®é–“ã§äº¤å·®ã—ãŸç‰¹å®šã® `unit` 境界ã®æ•°ã‚’è¿”ã—ã¾ã™ã€‚ +å·®ã¯ç›¸å¯¾å˜ä½ã‚’使用ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€`2021-12-29` 㨠`2022-01-01` ã®å·®ã¯å˜ä½ `day` 㧠3 日([toRelativeDayNum](#torelativedaynum) ã‚’å‚照)ã€å˜ä½ `month` 㧠1 ヶ月([toRelativeMonthNum](#torelativemonthnum) ã‚’å‚照)ã€å˜ä½ `year` 㧠1 年([toRelativeYearNum](#torelativeyearnum) ã‚’å‚照)ã§ã™ã€‚ + +å˜ä½ `week` ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€`date_diff` ã¯é€±ãŒæœˆæ›œæ—¥ã‹ã‚‰å§‹ã¾ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ã“ã®æŒ™å‹•ã¯ã€é€±ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æ—¥æ›œæ—¥ã‹ã‚‰å§‹ã¾ã‚‹é–¢æ•° `toWeek()` ã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ + +`date_diff` ã«ä»£ã‚る関数ã«ã¤ã„ã¦ã¯ã€é–¢æ•° `age` ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +date_diff('unit', startdate, enddate, [timezone]) +``` + +別å: `dateDiff`, `DATE_DIFF`, `timestampDiff`, `timestamp_diff`, `TIMESTAMP_DIFF`. + +**引数** + +- `unit` — çµæžœã®é–“éš”ã®ç¨®é¡žã€‚[文字列](../data-types/string.md)。 + å¯èƒ½ãªå€¤: + + - `nanosecond`, `nanoseconds`, `ns` + - `microsecond`, `microseconds`, `us`, `u` + - `millisecond`, `milliseconds`, `ms` + - `second`, `seconds`, `ss`, `s` + - `minute`, `minutes`, `mi`, `n` + - `hour`, `hours`, `hh`, `h` + - `day`, `days`, `dd`, `d` + - `week`, `weeks`, `wk`, `ww` + - `month`, `months`, `mm`, `m` + - `quarter`, `quarters`, `qq`, `q` + - `year`, `years`, `yyyy`, `yy` + +- `startdate` — 引ãç®—ã™ã‚‹æœ€åˆã®æ—¥æ™‚(被減数)。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +- `enddate` — 引ãç®—ã•ã‚Œã‚‹ç¬¬äºŒã®æ—¥æ™‚(減数)。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +- `timezone` — [タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone) (オプション)。指定ã•ã‚ŒãŸå ´åˆã€`startdate` 㨠`enddate` ã®ä¸¡æ–¹ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚指定ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€`startdate` 㨠`enddate` ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ãれらãŒç•°ãªã‚‹å ´åˆã€çµæžœã¯æœªå®šç¾©ã¨ãªã‚Šã¾ã™ã€‚[文字列](../data-types/string.md)。 + +**戻り値** + +`enddate` 㨠`startdate` ã®é–“ã®å·®ã‚’ `unit` ã§è¡¨ç¾ã—ãŸã‚‚ã®ã€‚[æ•´æ•°](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT dateDiff('hour', toDateTime('2018-01-01 22:00:00'), toDateTime('2018-01-02 23:00:00')); +``` + +çµæžœ: + +``` text +┌─dateDiff('hour', toDateTime('2018-01-01 22:00:00'), toDateTime('2018-01-02 23:00:00'))─┠+│ 25 │ +└────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +``` sql +SELECT + toDate('2022-01-01') AS e, + toDate('2021-12-29') AS s, + dateDiff('day', s, e) AS day_diff, + dateDiff('month', s, e) AS month__diff, + dateDiff('year', s, e) AS year_diff; +``` + +çµæžœ: + +``` text +┌──────────e─┬──────────s─┬─day_diff─┬─month__diff─┬─year_diff─┠+│ 2022-01-01 │ 2021-12-29 │ 3 │ 1 │ 1 │ +└────────────┴────────────┴──────────┴─────────────┴───────────┘ +``` + +## date\_trunc + +日付ã¨æ™‚刻ã®ãƒ‡ãƒ¼ã‚¿ã‚’指定ã•ã‚ŒãŸæ—¥ä»˜ã®éƒ¨åˆ†ã«åˆ‡ã‚Šæ¨ã¦ã¾ã™ã€‚ + +**構文** + +``` sql +date_trunc(unit, value[, timezone]) +``` + +別å: `dateTrunc`. + +**引数** + +- `unit` — çµæžœã‚’切りæ¨ã¦ã‚‹é–“éš”ã®ç¨®é¡žã€‚[文字列リテラル](../syntax.md#syntax-string-literal)。 + å¯èƒ½ãªå€¤: + + - `nanosecond` - DateTime64 ã®ã¿äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ + - `microsecond` - DateTime64 ã®ã¿äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ + - `milisecond` - DateTime64 ã®ã¿äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ + - `second` + - `minute` + - `hour` + - `day` + - `week` + - `month` + - `quarter` + - `year` + + `unit` 引数ã¯å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +- `value` — 日付ã¨æ™‚刻。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 +- `timezone` — 戻り値㮠[タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone) (オプション)。指定ã•ã‚Œã¦ã„ãªã„å ´åˆã€é–¢æ•°ã¯ `value` パラメータã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’使用ã—ã¾ã™ã€‚[文字列](../data-types/string.md)。 + +**戻り値** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜ã®éƒ¨åˆ†ã«åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚ŒãŸå€¤ã€‚[日時](../data-types/datetime.md)。 + +**例** + +タイムゾーンãªã—ã®ã‚¯ã‚¨ãƒª: + +``` sql +SELECT now(), date_trunc('hour', now()); +``` + +çµæžœ: + +``` text +┌───────────────now()─┬─date_trunc('hour', now())─┠+│ 2020-09-28 10:40:45 │ 2020-09-28 10:00:00 │ +└─────────────────────┴───────────────────────────┘ +``` + +指定ã•ã‚ŒãŸã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§ã®ã‚¯ã‚¨ãƒª: + +```sql +SELECT now(), date_trunc('hour', now(), 'Asia/Istanbul'); +``` + +çµæžœ: + +```text +┌───────────────now()─┬─date_trunc('hour', now(), 'Asia/Istanbul')─┠+│ 2020-09-28 10:46:26 │ 2020-09-28 13:00:00 │ +└─────────────────────┴────────────────────────────────────────────┘ +``` + +**å‚ç…§ã—ã¦ãã ã•ã„** + +- [toStartOfInterval](#tostartofinterval) + +## date\_add + +指定ã•ã‚ŒãŸæ—¥æ•°ã¾ãŸã¯æ—¥æ™‚ã«æ™‚é–“é–“éš”ã¾ãŸã¯æ—¥ä»˜é–“隔を追加ã—ã¾ã™ã€‚ + +加算ã®çµæžœãŒãƒ‡ãƒ¼ã‚¿åž‹ã®ç¯„囲外ã®å€¤ã«ãªã‚‹å ´åˆã€çµæžœã¯æœªå®šç¾©ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +date_add(unit, value, date) +``` + +代替構文: + +``` sql +date_add(date, INTERVAL value unit) +``` + +別å: `dateAdd`, `DATE_ADD`. + +**引数** + +- `unit` — 追加ã™ã‚‹é–“éš”ã®ç¨®é¡žã€‚注: ã“れ㯠[文字列](../data-types/string.md) ã§ã¯ãªãã€å¼•ç”¨ã•ã‚Œãªã„å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + å¯èƒ½ãªå€¤: + + - `second` + - `minute` + - `hour` + - `day` + - `week` + - `month` + - `quarter` + - `year` + +- `value` — 追加ã™ã‚‹é–“éš”ã®å€¤ã€‚[æ•´æ•°](../data-types/int-uint.md)。 +- `date` — `value` ãŒè¿½åŠ ã•ã‚Œã‚‹æ—¥ä»˜ã¾ãŸã¯æ—¥ä»˜ã¨æ™‚刻。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +**戻り値** + +`date` ã« `value` を追加ã—ãŸçµæžœã®æ—¥ä»˜ã¾ãŸã¯æ—¥ä»˜ã¨æ™‚刻。 [日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +SELECT date_add(YEAR, 3, toDate('2018-01-01')); +``` + +çµæžœ: + +```text +┌─plus(toDate('2018-01-01'), toIntervalYear(3))─┠+│ 2021-01-01 │ +└───────────────────────────────────────────────┘ +``` + +```sql +SELECT date_add(toDate('2018-01-01'), INTERVAL 3 YEAR); +``` + +çµæžœ: + +```text +┌─plus(toDate('2018-01-01'), toIntervalYear(3))─┠+│ 2021-01-01 │ +└───────────────────────────────────────────────┘ +``` + + + +**å‚ç…§ã—ã¦ãã ã•ã„** + +- [addDate](#adddate) + +## date\_sub + +指定ã•ã‚ŒãŸæ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚ã‹ã‚‰æ™‚é–“é–“éš”ã¾ãŸã¯æ—¥ä»˜é–“隔を引ãç®—ã—ã¾ã™ã€‚ + +減算ã®çµæžœãŒãƒ‡ãƒ¼ã‚¿åž‹ã®ç¯„囲外ã®å€¤ã«ãªã‚‹å ´åˆã€çµæžœã¯æœªå®šç¾©ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +date_sub(unit, value, date) +``` + +代替構文: + +``` sql +date_sub(date, INTERVAL value unit) +``` + + +別å: `dateSub`, `DATE_SUB`. + +**引数** + +- `unit` — 減算ã™ã‚‹é–“éš”ã®ç¨®é¡žã€‚注: ã“れ㯠[文字列](../data-types/string.md) ã§ã¯ãªãã€å¼•ç”¨ã•ã‚Œãªã„å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + + å¯èƒ½ãªå€¤: + + - `second` + - `minute` + - `hour` + - `day` + - `week` + - `month` + - `quarter` + - `year` + +- `value` — 減算ã™ã‚‹é–“éš”ã®å€¤ã€‚[æ•´æ•°](../data-types/int-uint.md)。 +- `date` — `value` ãŒå¼•ã‹ã‚Œã‚‹æ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +**戻り値** + +`date` ã‹ã‚‰ `value` を引ã„ãŸçµæžœã®æ—¥ä»˜ã¾ãŸã¯æ—¥ä»˜ã¨æ™‚刻。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +**例** + +``` sql +SELECT date_sub(YEAR, 3, toDate('2018-01-01')); +``` + +çµæžœ: + +``` text +┌─minus(toDate('2018-01-01'), toIntervalYear(3))─┠+│ 2015-01-01 │ +└────────────────────────────────────────────────┘ +``` + +``` sql +SELECT date_sub(toDate('2018-01-01'), INTERVAL 3 YEAR); +``` + +çµæžœ: + +``` text +┌─minus(toDate('2018-01-01'), toIntervalYear(3))─┠+│ 2015-01-01 │ +└────────────────────────────────────────────────┘ +``` + + +**å‚ç…§ã—ã¦ãã ã•ã„** + +- [subDate](#subdate) + +## timestamp\_add + +指定ã•ã‚ŒãŸæ—¥æ™‚ã¨æä¾›ã•ã‚ŒãŸæ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚を加算ã—ã¾ã™ã€‚ + +加算ã®çµæžœãŒãƒ‡ãƒ¼ã‚¿åž‹ã®ç¯„囲外ã®å€¤ã«ãªã‚‹å ´åˆã€çµæžœã¯æœªå®šç¾©ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +timestamp_add(date, INTERVAL value unit) +``` + +別å: `timeStampAdd`, `TIMESTAMP_ADD`. + +**引数** + +- `date` — 日付ã¾ãŸã¯æ—¥æ™‚。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 +- `value` — 追加ã™ã‚‹é–“éš”ã®å€¤ã€‚[æ•´æ•°](../data-types/int-uint.md)。 +- `unit` — 追加ã™ã‚‹é–“éš”ã®ç¨®é¡žã€‚[文字列](../data-types/string.md)。 + å¯èƒ½ãªå€¤: + + - `second` + - `minute` + - `hour` + - `day` + - `week` + - `month` + - `quarter` + - `year` + +**戻り値** + +指定ã•ã‚ŒãŸ `value` ã‚’ `unit` ã§æ—¥ä»˜ã«è¿½åŠ ã—ãŸçµæžœã®æ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +select timestamp_add(toDate('2018-01-01'), INTERVAL 3 MONTH); +``` + +çµæžœ: + +```text +┌─plus(toDate('2018-01-01'), toIntervalMonth(3))─┠+│ 2018-04-01 │ +└────────────────────────────────────────────────┘ +``` + +## timestamp\_sub + +æä¾›ã•ã‚ŒãŸæ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚ã‹ã‚‰æ™‚間間隔を引ãç®—ã—ã¾ã™ã€‚ + +引ãç®—ã®çµæžœãŒãƒ‡ãƒ¼ã‚¿åž‹ã®ç¯„囲外ã®å€¤ã«ãªã‚‹å ´åˆã€çµæžœã¯æœªå®šç¾©ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +timestamp_sub(unit, value, date) +``` + +別å: `timeStampSub`, `TIMESTAMP_SUB`. + +**引数** + +- `unit` — 減算ã™ã‚‹é–“éš”ã®ç¨®é¡žã€‚[文字列](../data-types/string.md)。 + å¯èƒ½ãªå€¤: + + - `second` + - `minute` + - `hour` + - `day` + - `week` + - `month` + - `quarter` + - `year` + +- `value` — 減算ã™ã‚‹é–“éš”ã®å€¤ã€‚[æ•´æ•°](../data-types/int-uint.md)。 +- `date` — 日付ã¾ãŸã¯æ—¥æ™‚。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +**戻り値** + +指定ã•ã‚ŒãŸ `value` ã‚’ `unit` ã§æ—¥ä»˜ã‹ã‚‰å¼•ã„ãŸçµæžœã®æ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +select timestamp_sub(MONTH, 5, toDateTime('2018-12-18 01:02:03')); +``` + +çµæžœ: + +```text +┌─minus(toDateTime('2018-12-18 01:02:03'), toIntervalMonth(5))─┠+│ 2018-07-18 01:02:03 │ +└──────────────────────────────────────────────────────────────┘ +``` + +## addDate + +指定ã•ã‚ŒãŸæ—¥ä»˜ã€æ—¥æ™‚ã€ã¾ãŸã¯æ–‡å­—列形å¼ã®æ—¥ä»˜/日時ã«æ™‚間間隔を追加ã—ã¾ã™ã€‚ + +加算ã®çµæžœãŒãƒ‡ãƒ¼ã‚¿åž‹ã®ç¯„囲外ã®å€¤ã«ãªã‚‹å ´åˆã€çµæžœã¯æœªå®šç¾©ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +addDate(date, interval) +``` + +**引数** + +- `date` — 指定ã•ã‚ŒãŸé–“éš”ãŒè¿½åŠ ã•ã‚Œã‚‹æ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md)ã€[DateTime64](../data-types/datetime64.md)ã€ã¾ãŸã¯ [文字列](../data-types/string.md) +- `interval` — 加ãˆã‚‹é–“隔。[é–“éš”](../data-types/special-data-types/interval.md)。 + +**戻り値** + +`date` ã« `interval` を追加ã—ãŸçµæžœã®æ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +SELECT addDate(toDate('2018-01-01'), INTERVAL 3 YEAR); +``` + +çµæžœ: + +```text +┌─addDate(toDate('2018-01-01'), toIntervalYear(3))─┠+│ 2021-01-01 │ +└──────────────────────────────────────────────────┘ +``` + +別å: `ADDDATE` + +**å‚ç…§ã—ã¦ãã ã•ã„** + +- [date_add](#date_add) + +## subDate + +指定ã•ã‚ŒãŸæ—¥ä»˜ã€æ—¥æ™‚ã€ã¾ãŸã¯æ–‡å­—列形å¼ã®æ—¥ä»˜/日時ã‹ã‚‰æ™‚間間隔を引ãç®—ã—ã¾ã™ã€‚ + +減算ã®çµæžœãŒãƒ‡ãƒ¼ã‚¿åž‹ã®ç¯„囲外ã®å€¤ã«ãªã‚‹å ´åˆã€çµæžœã¯æœªå®šç¾©ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +subDate(date, interval) +``` + +**引数** + +- `date` — `interval` ãŒå¼•ã‹ã‚Œã‚‹æ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md)ã€[DateTime64](../data-types/datetime64.md)ã€ã¾ãŸã¯ [文字列](../data-types/string.md) +- `interval` — 引ã間隔。[é–“éš”](../data-types/special-data-types/interval.md)。 + +**戻り値** + +`date` ã‹ã‚‰ `interval` を引ã„ãŸçµæžœã®æ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚。[日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +SELECT subDate(toDate('2018-01-01'), INTERVAL 3 YEAR); +``` + +çµæžœ: + +```text +┌─subDate(toDate('2018-01-01'), toIntervalYear(3))─┠+│ 2015-01-01 │ +└──────────────────────────────────────────────────┘ +``` + +別å: `SUBDATE` + +**å‚ç…§ã—ã¦ãã ã•ã„** + +- [date_sub](#date_sub) + +## now + +クエリ解æžã®çž¬é–“ã®ç¾åœ¨ã®æ—¥ä»˜ã¨æ™‚刻を返ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯å®šæ•°å¼ã§ã™ã€‚ + +別å: `current_timestamp`. + +**構文** + +``` sql +now([timezone]) +``` + +**引数** + +- `timezone` — 戻り値㮠[タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone) (オプション)。 [文字列](../data-types/string.md)。 + +**戻り値** + +- ç¾åœ¨ã®æ—¥ä»˜ã¨æ™‚刻。[日時](../data-types/datetime.md)。 + +**例** + +タイムゾーンãªã—ã®ã‚¯ã‚¨ãƒª: + +``` sql +SELECT now(); +``` + +çµæžœ: + +``` text +┌───────────────now()─┠+│ 2020-10-17 07:42:09 │ +└─────────────────────┘ +``` + +指定ã•ã‚ŒãŸã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§ã®ã‚¯ã‚¨ãƒª: + +``` sql +SELECT now('Asia/Istanbul'); +``` + +çµæžœ: + +``` text +┌─now('Asia/Istanbul')─┠+│ 2020-10-17 10:42:23 │ +└──────────────────────┘ +``` + +## now64 + +クエリ解æžã®çž¬é–“ã®ç¾åœ¨ã®æ—¥ä»˜ã¨æ™‚刻をサブ秒精度ã§è¿”ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯å®šæ•°å¼ã§ã™ã€‚ + +**構文** + +``` sql +now64([scale], [timezone]) +``` + +**引数** + +- `scale` - ãƒãƒƒã‚¯ã‚µã‚¤ã‚ºï¼ˆç²¾åº¦ï¼‰ï¼š10-精度 秒。妥当ãªç¯„囲: [0 : 9]。典型的ã«ã¯ - 3 (デフォルト) (ミリ秒)ã€6 (マイクロ秒)ã€9 (ナノ秒) ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +- `timezone` — 戻り値㮠[タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone) (オプション)。 [文字列](../data-types/string.md)。 + +**戻り値** + +- サブ秒精度ã§ã®ç¾åœ¨ã®æ—¥ä»˜ã¨æ™‚刻。[DateTime64](../data-types/datetime64.md)。 + +**例** + +``` sql +SELECT now64(), now64(9, 'Asia/Istanbul'); +``` + +çµæžœ: + +``` text +┌─────────────────now64()─┬─────now64(9, 'Asia/Istanbul')─┠+│ 2022-08-21 19:34:26.196 │ 2022-08-21 22:34:26.196542766 │ +└─────────────────────────┴───────────────────────────────┘ +``` + +## nowInBlock {#nowInBlock} + +データã®å„ブロックを処ç†ã™ã‚‹çž¬é–“ã®ç¾åœ¨ã®æ—¥ä»˜ã¨æ™‚刻を返ã—ã¾ã™ã€‚[now](#now) ã®é–¢æ•°ã¨ã¯ç•°ãªã‚Šã€ã“ã‚Œã¯å®šæ•°å¼ã§ã¯ãªãã€é•·æ™‚間実行ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã®å ´åˆã€ç•°ãªã‚‹ãƒ–ロックã§è¿”ã•ã‚Œã‚‹å€¤ãŒç•°ãªã‚Šã¾ã™ã€‚ + +長時間実行ã•ã‚Œã‚‹ INSERT SELECT クエリã§ç¾åœ¨ã®æ™‚刻を生æˆã™ã‚‹ãŸã‚ã«ã“ã®é–¢æ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒæ„味ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +nowInBlock([timezone]) +``` + +**引数** + +- `timezone` — 戻り値㮠[タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone) (オプション)。 [文字列](../data-types/string.md)。 + +**戻り値** + +- å„データブロックã®å‡¦ç†ã®çž¬é–“ã®ç¾åœ¨ã®æ—¥ä»˜ã¨æ™‚刻。[日時](../data-types/datetime.md)。 + +**例** + +``` sql +SELECT + now(), + nowInBlock(), + sleep(1) +FROM numbers(3) +SETTINGS max_block_size = 1 +FORMAT PrettyCompactMonoBlock +``` + +çµæžœ: + +``` text +┌───────────────now()─┬────────nowInBlock()─┬─sleep(1)─┠+│ 2022-08-21 19:41:19 │ 2022-08-21 19:41:19 │ 0 │ +│ 2022-08-21 19:41:19 │ 2022-08-21 19:41:20 │ 0 │ +│ 2022-08-21 19:41:19 │ 2022-08-21 19:41:21 │ 0 │ +└─────────────────────┴─────────────────────┴──────────┘ +``` + +## today {#today} + +クエリ解æžã®çž¬é–“ã®ç¾åœ¨ã®æ—¥ä»˜ã‚’è¿”ã—ã¾ã™ã€‚ã“れ㯠`toDate(now())` ã¨åŒã˜ã§ã‚ã‚Šã€ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¨ã—㦠`curdate`, `current_date` ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +today() +``` + +**引数** + +- ãªã— + +**戻り値** + +- ç¾åœ¨ã®æ—¥ä»˜ã€‚[日付](../data-types/date.md)。 + +**例** + +クエリ: + +```sql +SELECT today() AS today, curdate() AS curdate, current_date() AS current_date FORMAT Pretty +``` + +**çµæžœ**: + +2024å¹´3月3æ—¥ã«ä¸Šè¨˜ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã¨ã€æ¬¡ã®å¿œç­”ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +```response +â”â”â”â”â”â”â”â”â”â”â”â”â”┳â”â”â”â”â”â”â”â”â”â”â”â”┳â”â”â”â”â”â”â”â”â”â”â”â”â”â”┓ +┃ today ┃ curdate ┃ current_date ┃ +┡â”â”â”â”â”â”â”â”â”â”â”â”╇â”â”â”â”â”â”â”â”â”â”â”â”╇â”â”â”â”â”â”â”â”â”â”â”â”â”â”┩ +│ 2024-03-03 │ 2024-03-03 │ 2024-03-03 │ +└────────────┴────────────┴──────────────┘ +``` + +## yesterday {#yesterday} + +引数をå—ã‘付ã‘ãšã€ã‚¯ã‚¨ãƒªè§£æžã®ã„ãšã‚Œã‹ã®çž¬é–“ã§æ˜¨æ—¥ã®æ—¥ä»˜ã‚’è¿”ã—ã¾ã™ã€‚ +`today() - 1` ã¨åŒã˜ã§ã™ã€‚ + +## timeSlot + +時間を30分間隔ã®é–‹å§‹æ™‚刻ã«ä¸¸ã‚ã¾ã™ã€‚ + +**構文** + +```sql +timeSlot(time[, time_zone]) +``` + +**引数** + +- `time` — 30分間隔ã®é–‹å§‹æ™‚刻ã«ä¸¸ã‚る時間。[日時](../data-types/datetime.md)/[Date32](../data-types/date32.md)/[DateTime64](../data-types/datetime64.md)。 +- `time_zone` — タイムゾーンを表ã™æ–‡å­—列型ã®å®šæ•°å€¤ã¾ãŸã¯å¼ã€‚[文字列](../data-types/string.md)。 + +:::note +ã“ã®é–¢æ•°ã¯æ‹¡å¼µã•ã‚ŒãŸã‚¿ã‚¤ãƒ— `Date32` 㨠`DateTime64` ã®å€¤ã‚’引数ã¨ã—ã¦å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€é€šå¸¸ã®ç¯„囲(年 1970 ã‹ã‚‰ 2149 ã¾ã§ã® `Date` / 2106 ã¾ã§ã® `DateTime`)を超ãˆã‚‹æ™‚間を渡ã™ã¨ã€èª¤ã£ãŸçµæžœãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ +::: + +**戻り値ã®åž‹** + +- 30分間隔ã®é–‹å§‹æ™‚刻ã«ä¸¸ã‚られãŸæ™‚é–“ã‚’è¿”ã—ã¾ã™ã€‚[日時](../data-types/datetime.md)。 + +**例** + +クエリ: + +```sql +SELECT timeSlot(toDateTime('2000-01-02 03:04:05', 'UTC')); +``` + +çµæžœ: + +```response +┌─timeSlot(toDateTime('2000-01-02 03:04:05', 'UTC'))─┠+│ 2000-01-02 03:00:00 │ +└────────────────────────────────────────────────────┘ +``` + +## toYYYYMM + +日付ã¾ãŸã¯æ—¥ä»˜ã¨æ™‚刻を年ã¨æœˆã®æ•°ï¼ˆYYYY \* 100 + MM)をå«ã‚€ UInt32 æ•°ã«å¤‰æ›ã—ã¾ã™ã€‚第二ã®ã‚ªãƒ—ションã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å¼•æ•°ã‚’å—ã‘付ã‘ã¾ã™ã€‚æä¾›ã•ã‚ŒãŸå ´åˆã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯æ–‡å­—列定数ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +ã“ã®é–¢æ•°ã¯é–¢æ•° `YYYYMMDDToDate()` ã®é€†ã§ã™ã€‚ + +**例** + +``` sql +SELECT + toYYYYMM(now(), 'US/Eastern') +``` + +çµæžœ: + +``` text +┌─toYYYYMM(now(), 'US/Eastern')─┠+│ 202303 │ +└───────────────────────────────┘ +``` + +## toYYYYMMDD + +日付ã¾ãŸã¯æ—¥ä»˜ã¨æ™‚刻を年ã€æœˆã€æ—¥ã‚’å«ã‚€ UInt32 数(YYYY \* 10000 + MM \* 100 + DD)ã«å¤‰æ›ã—ã¾ã™ã€‚第二ã®ã‚ªãƒ—ションã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å¼•æ•°ã‚’å—ã‘付ã‘ã¾ã™ã€‚æä¾›ã•ã‚ŒãŸå ´åˆã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯æ–‡å­—列定数ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**例** + +```sql +SELECT toYYYYMMDD(now(), 'US/Eastern') +``` + +çµæžœ: + +```response +┌─toYYYYMMDD(now(), 'US/Eastern')─┠+│ 20230302 │ +└─────────────────────────────────┘ +``` + +## toYYYYMMDDhhmmss + +日付ã¾ãŸã¯æ—¥ä»˜ã¨æ™‚刻を年ã€æœˆã€æ—¥ã€æ™‚ã€åˆ†ã€ç§’ã‚’å«ã‚€ UInt64 数(YYYY \* 10000000000 + MM \* 100000000 + DD \* 1000000 + hh \* 10000 + mm \* 100 + ss)ã«å¤‰æ›ã—ã¾ã™ã€‚第二ã®ã‚ªãƒ—ションã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å¼•æ•°ã‚’å—ã‘付ã‘ã¾ã™ã€‚æä¾›ã•ã‚ŒãŸå ´åˆã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯æ–‡å­—列定数ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**例** + +```sql +SELECT toYYYYMMDDhhmmss(now(), 'US/Eastern') +``` + +çµæžœ: + +```response +┌─toYYYYMMDDhhmmss(now(), 'US/Eastern')─┠+│ 20230302112209 │ +└───────────────────────────────────────┘ +``` + +## YYYYMMDDToDate + +å¹´ã€æœˆã€æ—¥ã‚’å«ã‚€æ•°å€¤ã‚’ [日付](../data-types/date.md) ã«å¤‰æ›ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯é–¢æ•° `toYYYYMMDD()` ã®é€†ã§ã™ã€‚ + +入力ãŒæœ‰åŠ¹ãªæ—¥ä»˜å€¤ã‚’エンコードã—ãªã„å ´åˆã€å‡ºåŠ›ã¯æœªå®šç¾©ã§ã™ã€‚ + +**構文** + +```sql +YYYYMMDDToDate(yyyymmdd); +``` + +**引数** + +- `yyyymmdd` - å¹´ã€æœˆã€ãŠã‚ˆã³æ—¥ã‚’表ã™æ•°å€¤ã€‚[æ•´æ•°](../data-types/int-uint.md)ã€[浮動å°æ•°ç‚¹](../data-types/float.md)ã¾ãŸã¯ [å°æ•°](../data-types/decimal.md)。 + +**戻り値** + +- 引数ã‹ã‚‰ä½œæˆã•ã‚ŒãŸæ—¥ä»˜ã€‚[日付](../data-types/date.md)。 + +**例** + +```sql +SELECT YYYYMMDDToDate(20230911); +``` + +çµæžœ: + +```response +┌─toYYYYMMDD(20230911)─┠+│ 2023-09-11 │ +└──────────────────────┘ +``` + +## YYYYMMDDToDate32 + +関数 `YYYYMMDDToDate()` ã¨åŒæ§˜ã§ã™ãŒã€[Date32](../data-types/date32.md) を生æˆã—ã¾ã™ã€‚ + +## YYYYMMDDhhmmssToDateTime + +å¹´ã€æœˆã€æ—¥ã€æ™‚ã€åˆ†ã€ç§’ã‚’å«ã‚€æ•°å€¤ã‚’ [日時](../data-types/datetime.md) ã«å¤‰æ›ã—ã¾ã™ã€‚ + +入力ãŒæœ‰åŠ¹ãªæ—¥æ™‚値をエンコードã—ãªã„å ´åˆã€å‡ºåŠ›ã¯æœªå®šç¾©ã§ã™ã€‚ + +ã“ã®é–¢æ•°ã¯é–¢æ•° `toYYYYMMDDhhmmss()` ã®é€†ã§ã™ã€‚ + +**構文** + +```sql +YYYYMMDDhhmmssToDateTime(yyyymmddhhmmss[, timezone]); +``` + +**引数** + +- `yyyymmddhhmmss` - å¹´ã€æœˆã€æ—¥ã‚’表ã™æ•°å€¤ã€‚[æ•´æ•°](../data-types/int-uint.md)ã€[浮動å°æ•°ç‚¹](../data-types/float.md)ã¾ãŸã¯ [å°æ•°](../data-types/decimal.md)。 +- `timezone` - 戻り値㮠[タイムゾーン](../../operations/server-configuration-parameters/settings.md#timezone) (オプション)。 + +**戻り値** + +- 引数ã‹ã‚‰ä½œæˆã•ã‚ŒãŸæ—¥æ™‚。[日時](../data-types/datetime.md)。 + +**例** + +```sql +SELECT YYYYMMDDToDateTime(20230911131415); +``` + +çµæžœ: + +```response +┌──────YYYYMMDDhhmmssToDateTime(20230911131415)─┠+│ 2023-09-11 13:14:15 │ +└───────────────────────────────────────────────┘ +``` + +## YYYYMMDDhhmmssToDateTime64 + +関数 `YYYYMMDDhhmmssToDate()` ã¨åŒæ§˜ã§ã™ãŒã€[DateTime64](../data-types/datetime64.md) を生æˆã—ã¾ã™ã€‚ + +å¿…è¦ã«å¿œã˜ã¦ `timezone` パラメータã®å¾Œã«è¿½åŠ ã®ã‚ªãƒ—ション㮠`precision` パラメータをå—ã‘å–ã‚Šã¾ã™ã€‚ + +## changeYear + +日付ã¾ãŸã¯æ—¥æ™‚ã®å¹´ã®éƒ¨åˆ†ã‚’変更ã—ã¾ã™ã€‚ + +**構文** +``` sql + +changeYear(date_or_datetime, value) +``` + +**引数** + +- `date_or_datetime` - [日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) +- `value` - å¹´ã®æ–°ã—ã„値。[æ•´æ•°](../../sql-reference/data-types/int-uint.md)。 + +**戻り値** + +- `date_or_datetime` ã¨åŒã˜åž‹ã€‚ + +**例** + +``` sql +SELECT changeYear(toDate('1999-01-01'), 2000), changeYear(toDateTime64('1999-01-01 00:00:00.000', 3), 2000); +``` + +çµæžœ: + +``` +┌─changeYear(toDate('1999-01-01'), 2000)─┬─changeYear(toDateTime64('1999-01-01 00:00:00.000', 3), 2000)─┠+│ 2000-01-01 │ 2000-01-01 00:00:00.000 │ +└────────────────────────────────────────┴──────────────────────────────────────────────────────────────┘ +``` + +## changeMonth + +日付ã¾ãŸã¯æ—¥æ™‚ã®æœˆã®éƒ¨åˆ†ã‚’変更ã—ã¾ã™ã€‚ + +**構文** + +``` sql +changeMonth(date_or_datetime, value) +``` + +**引数** + +- `date_or_datetime` - [日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) +- `value` - 月ã®æ–°ã—ã„値。[æ•´æ•°](../../sql-reference/data-types/int-uint.md)。 + +**戻り値** + +- `date_or_datetime` ã¨åŒã˜åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT changeMonth(toDate('1999-01-01'), 2), changeMonth(toDateTime64('1999-01-01 00:00:00.000', 3), 2); +``` + +çµæžœ: + +``` +┌─changeMonth(toDate('1999-01-01'), 2)─┬─changeMonth(toDateTime64('1999-01-01 00:00:00.000', 3), 2)─┠+│ 1999-02-01 │ 1999-02-01 00:00:00.000 │ +└──────────────────────────────────────┴────────────────────────────────────────────────────────────┘ +``` + +## changeDay + +日付ã¾ãŸã¯æ—¥æ™‚ã®æ—¥ã®éƒ¨åˆ†ã‚’変更ã—ã¾ã™ã€‚ + +**構文** + +``` sql +changeDay(date_or_datetime, value) +``` + +**引数** + +- `date_or_datetime` - [日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) +- `value` - æ—¥ã®æ–°ã—ã„値。[æ•´æ•°](../../sql-reference/data-types/int-uint.md)。 + +**戻り値** + +- `date_or_datetime` ã¨åŒã˜åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT changeDay(toDate('1999-01-01'), 5), changeDay(toDateTime64('1999-01-01 00:00:00.000', 3), 5); +``` + +çµæžœ: + +``` +┌─changeDay(toDate('1999-01-01'), 5)─┬─changeDay(toDateTime64('1999-01-01 00:00:00.000', 3), 5)─┠+│ 1999-01-05 │ 1999-01-05 00:00:00.000 │ +└────────────────────────────────────┴──────────────────────────────────────────────────────────┘ +``` + +## changeHour + +日付ã¾ãŸã¯æ—¥æ™‚ã®æ™‚é–“ã®éƒ¨åˆ†ã‚’変更ã—ã¾ã™ã€‚ + +**構文** + +``` sql +changeHour(date_or_datetime, value) +``` + +**引数** + +- `date_or_datetime` - [日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) +- `value` - 時間ã®æ–°ã—ã„値。[æ•´æ•°](../../sql-reference/data-types/int-uint.md)。 + +**戻り値** + +- `date_or_datetime` ã¨åŒã˜åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚入力㌠[日付](../data-types/date.md) ã®å ´åˆã€[日時](../data-types/datetime.md) ãŒè¿”ã•ã‚Œã¾ã™ã€‚入力㌠[Date32](../data-types/date32.md) ã®å ´åˆã€[DateTime64](../data-types/datetime64.md) ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**例** + +``` sql +SELECT changeHour(toDate('1999-01-01'), 14), changeHour(toDateTime64('1999-01-01 00:00:00.000', 3), 14); +``` + +çµæžœ: + +``` +┌─changeHour(toDate('1999-01-01'), 14)─┬─changeHour(toDateTime64('1999-01-01 00:00:00.000', 3), 14)─┠+│ 1999-01-01 14:00:00 │ 1999-01-01 14:00:00.000 │ +└──────────────────────────────────────┴────────────────────────────────────────────────────────────┘ +``` + +## changeMinute + +日付ã¾ãŸã¯æ—¥æ™‚ã®åˆ†ã®éƒ¨åˆ†ã‚’変更ã—ã¾ã™ã€‚ + +**構文** + +``` sql +changeMinute(date_or_datetime, value) +``` + +**引数** + +- `date_or_datetime` - [日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) +- `value` - 分ã®æ–°ã—ã„値。[æ•´æ•°](../../sql-reference/data-types/int-uint.md)。 + +**戻り値** + +- `date_or_datetime` ã¨åŒã˜åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚入力㌠[日付](../data-types/date.md) ã®å ´åˆã€[日時](../data-types/datetime.md) ãŒè¿”ã•ã‚Œã¾ã™ã€‚入力㌠[Date32](../data-types/date32.md) ã®å ´åˆã€[DateTime64](../data-types/datetime64.md) ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**例** + +``` sql + SELECT changeMinute(toDate('1999-01-01'), 15), changeMinute(toDateTime64('1999-01-01 00:00:00.000', 3), 15); +``` + +çµæžœ: + +``` +┌─changeMinute(toDate('1999-01-01'), 15)─┬─changeMinute(toDateTime64('1999-01-01 00:00:00.000', 3), 15)─┠+│ 1999-01-01 00:15:00 │ 1999-01-01 00:15:00.000 │ +└────────────────────────────────────────┴──────────────────────────────────────────────────────────────┘ +``` + +## changeSecond + +日付ã¾ãŸã¯æ—¥æ™‚ã®ç§’ã®éƒ¨åˆ†ã‚’変更ã—ã¾ã™ã€‚ + +**構文** + +``` sql +changeSecond(date_or_datetime, value) +``` + +**引数** + +- `date_or_datetime` - [日付](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[日時](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) +- `value` - 秒ã®æ–°ã—ã„値。[æ•´æ•°](../../sql-reference/data-types/int-uint.md)。 + +**戻り値** + +- `date_or_datetime` ã¨åŒã˜åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚入力㌠[日付](../data-types/date.md) ã®å ´åˆã€[日時](../data-types/datetime.md) ãŒè¿”ã•ã‚Œã¾ã™ã€‚入力㌠[Date32](../data-types/date32.md) ã®å ´åˆã€[DateTime64](../data-types/datetime64.md) ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**例** + +``` sql +SELECT changeSecond(toDate('1999-01-01'), 15), changeSecond(toDateTime64('1999-01-01 00:00:00.000', 3), 15); +``` + +çµæžœ: + +``` +┌─changeSecond(toDate('1999-01-01'), 15)─┬─changeSecond(toDateTime64('1999-01-01 00:00:00.000', 3), 15)─┠+│ 1999-01-01 00:00:15 │ 1999-01-01 00:00:15.000 │ +└────────────────────────────────────────┴──────────────────────────────────────────────────────────────┘ +``` + +## addYears + +日付ã€æ—¥æ™‚ã€ã¾ãŸã¯æ–‡å­—列形å¼ã®æ—¥ä»˜/日時ã«æŒ‡å®šã•ã‚ŒãŸå¹´ã®æ•°ã‚’追加ã—ã¾ã™ã€‚ + +**構文** + +```sql +addYears(date, num) +``` + +**引数** + +- `date`: 指定ã•ã‚ŒãŸå¹´ã®æ•°ã‚’追加ã™ã‚‹æ—¥ä»˜/日時。[日付](../data-types/date.md) / [Date32](../data-types/date32.md) / [日時](../data-types/datetime.md) / [DateTime64](../data-types/datetime64.md)ã€[文字列](../data-types/string.md)。 +- `num`: 追加ã™ã‚‹å¹´ã®æ•°ã€‚[(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**戻り値** +``` +```html +- `date` ã« `num` 年を加ãˆã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + addYears(date, 1) AS add_years_with_date, + addYears(date_time, 1) AS add_years_with_date_time, + addYears(date_time_string, 1) AS add_years_with_date_time_string +``` + +```response +┌─add_years_with_date─┬─add_years_with_date_time─┬─add_years_with_date_time_string─┠+│ 2025-01-01 │ 2025-01-01 00:00:00 │ 2025-01-01 00:00:00.000 │ +└─────────────────────┴──────────────────────────┴─────────────────────────────────┘ +``` + +## addQuarters + +指定ã•ã‚ŒãŸæ•°ã®å››åŠæœŸã‚’日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã«åŠ ãˆã¾ã™ã€‚ + +**構文** + +```sql +addQuarters(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®å››åŠæœŸã‚’加ãˆã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 加ãˆã‚‹å››åŠæœŸã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã« `num` å››åŠæœŸã‚’加ãˆã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + addQuarters(date, 1) AS add_quarters_with_date, + addQuarters(date_time, 1) AS add_quarters_with_date_time, + addQuarters(date_time_string, 1) AS add_quarters_with_date_time_string +``` + +```response +┌─add_quarters_with_date─┬─add_quarters_with_date_time─┬─add_quarters_with_date_time_string─┠+│ 2024-04-01 │ 2024-04-01 00:00:00 │ 2024-04-01 00:00:00.000 │ +└────────────────────────┴─────────────────────────────┴────────────────────────────────────┘ +``` + +## addMonths + +指定ã•ã‚ŒãŸæ•°ã®æœˆã‚’日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã«åŠ ãˆã¾ã™ã€‚ + +**構文** + +```sql +addMonths(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®æœˆã‚’加ãˆã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 加ãˆã‚‹æœˆã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã« `num` 月を加ãˆã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + addMonths(date, 6) AS add_months_with_date, + addMonths(date_time, 6) AS add_months_with_date_time, + addMonths(date_time_string, 6) AS add_months_with_date_time_string +``` + +```response +┌─add_months_with_date─┬─add_months_with_date_time─┬─add_months_with_date_time_string─┠+│ 2024-07-01 │ 2024-07-01 00:00:00 │ 2024-07-01 00:00:00.000 │ +└──────────────────────┴───────────────────────────┴──────────────────────────────────┘ +``` + +## addWeeks + +指定ã•ã‚ŒãŸæ•°ã®é€±ã‚’日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã«åŠ ãˆã¾ã™ã€‚ + +**構文** + +```sql +addWeeks(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®é€±ã‚’加ãˆã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 加ãˆã‚‹é€±ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã« `num` 週間を加ãˆã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + addWeeks(date, 5) AS add_weeks_with_date, + addWeeks(date_time, 5) AS add_weeks_with_date_time, + addWeeks(date_time_string, 5) AS add_weeks_with_date_time_string +``` + +```response +┌─add_weeks_with_date─┬─add_weeks_with_date_time─┬─add_weeks_with_date_time_string─┠+│ 2024-02-05 │ 2024-02-05 00:00:00 │ 2024-02-05 00:00:00.000 │ +└─────────────────────┴──────────────────────────┴─────────────────────────────────┘ +``` + +## addDays + +指定ã•ã‚ŒãŸæ•°ã®æ—¥ã‚’日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã«åŠ ãˆã¾ã™ã€‚ + +**構文** + +```sql +addDays(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®æ—¥ã‚’加ãˆã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 加ãˆã‚‹æ—¥ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã« `num` 日を加ãˆã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + addDays(date, 5) AS add_days_with_date, + addDays(date_time, 5) AS add_days_with_date_time, + addDays(date_time_string, 5) AS add_days_with_date_time_string +``` + +```response +┌─add_days_with_date─┬─add_days_with_date_time─┬─add_days_with_date_time_string─┠+│ 2024-01-06 │ 2024-01-06 00:00:00 │ 2024-01-06 00:00:00.000 │ +└────────────────────┴─────────────────────────┴────────────────────────────────┘ +``` + +## addHours + +指定ã•ã‚ŒãŸæ•°ã®æ™‚間を日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã«åŠ ãˆã¾ã™ã€‚ + +**構文** + +```sql +addHours(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®æ™‚間を加ãˆã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 加ãˆã‚‹æ™‚é–“ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã« `num` 時間を加ãˆã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + addHours(date, 12) AS add_hours_with_date, + addHours(date_time, 12) AS add_hours_with_date_time, + addHours(date_time_string, 12) AS add_hours_with_date_time_string +``` + +```response +┌─add_hours_with_date─┬─add_hours_with_date_time─┬─add_hours_with_date_time_string─┠+│ 2024-01-01 12:00:00 │ 2024-01-01 12:00:00 │ 2024-01-01 12:00:00.000 │ +└─────────────────────┴──────────────────────────┴─────────────────────────────────┘ +``` + +## addMinutes + +指定ã•ã‚ŒãŸæ•°ã®åˆ†ã‚’日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã«åŠ ãˆã¾ã™ã€‚ + +**構文** + +```sql +addMinutes(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®åˆ†ã‚’加ãˆã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 加ãˆã‚‹åˆ†ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã« `num` 分を加ãˆã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + addMinutes(date, 20) AS add_minutes_with_date, + addMinutes(date_time, 20) AS add_minutes_with_date_time, + addMinutes(date_time_string, 20) AS add_minutes_with_date_time_string +``` + +```response +┌─add_minutes_with_date─┬─add_minutes_with_date_time─┬─add_minutes_with_date_time_string─┠+│ 2024-01-01 00:20:00 │ 2024-01-01 00:20:00 │ 2024-01-01 00:20:00.000 │ +└───────────────────────┴────────────────────────────┴───────────────────────────────────┘ +``` + +## addSeconds + +指定ã•ã‚ŒãŸæ•°ã®ç§’を日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã«åŠ ãˆã¾ã™ã€‚ + +**構文** + +```sql +addSeconds(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®ç§’を加ãˆã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 加ãˆã‚‹ç§’ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã« `num` 秒を加ãˆã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + addSeconds(date, 30) AS add_seconds_with_date, + addSeconds(date_time, 30) AS add_seconds_with_date_time, + addSeconds(date_time_string, 30) AS add_seconds_with_date_time_string +``` + +```response +┌─add_seconds_with_date─┬─add_seconds_with_date_time─┬─add_seconds_with_date_time_string─┠+│ 2024-01-01 00:00:30 │ 2024-01-01 00:00:30 │ 2024-01-01 00:00:30.000 │ +└───────────────────────┴────────────────────────────┴───────────────────────────────────┘ +``` + +## addMilliseconds + +指定ã•ã‚ŒãŸæ•°ã®ãƒŸãƒªç§’を時刻付ãã®æ—¥ä»˜ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ™‚刻付ãã®æ—¥ä»˜ã«åŠ ãˆã¾ã™ã€‚ + +**構文** + +```sql +addMilliseconds(date_time, num) +``` + +**パラメーター** + +- `date_time`: 指定ã•ã‚ŒãŸæ•°ã®ãƒŸãƒªç§’を加ãˆã‚‹æ™‚刻付ã日付。 [DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 加ãˆã‚‹ãƒŸãƒªç§’ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date_time` ã« `num` ミリ秒を加ãˆã¾ã™ã€‚ [DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + addMilliseconds(date_time, 1000) AS add_milliseconds_with_date_time, + addMilliseconds(date_time_string, 1000) AS add_milliseconds_with_date_time_string +``` + +```response +┌─add_milliseconds_with_date_time─┬─add_milliseconds_with_date_time_string─┠+│ 2024-01-01 00:00:01.000 │ 2024-01-01 00:00:01.000 │ +└─────────────────────────────────┴────────────────────────────────────────┘ +``` + +## addMicroseconds + +指定ã•ã‚ŒãŸæ•°ã®ãƒžã‚¤ã‚¯ãƒ­ç§’を時刻付ãã®æ—¥ä»˜ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ™‚刻付ãã®æ—¥ä»˜ã«åŠ ãˆã¾ã™ã€‚ + +**構文** + +```sql +addMicroseconds(date_time, num) +``` + +**パラメーター** + +- `date_time`: 指定ã•ã‚ŒãŸæ•°ã®ãƒžã‚¤ã‚¯ãƒ­ç§’を加ãˆã‚‹æ™‚刻付ã日付。 [DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 加ãˆã‚‹ãƒžã‚¤ã‚¯ãƒ­ç§’ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date_time` ã« `num` マイクロ秒を加ãˆã¾ã™ã€‚ [DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + addMicroseconds(date_time, 1000000) AS add_microseconds_with_date_time, + addMicroseconds(date_time_string, 1000000) AS add_microseconds_with_date_time_string +``` + +```response +┌─add_microseconds_with_date_time─┬─add_microseconds_with_date_time_string─┠+│ 2024-01-01 00:00:01.000000 │ 2024-01-01 00:00:01.000000 │ +└─────────────────────────────────┴────────────────────────────────────────┘ +``` + +## addNanoseconds + +指定ã•ã‚ŒãŸæ•°ã®ãƒŠãƒŽç§’を時刻付ãã®æ—¥ä»˜ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ™‚刻付ãã®æ—¥ä»˜ã«åŠ ãˆã¾ã™ã€‚ + +**構文** + +```sql +addNanoseconds(date_time, num) +``` + +**パラメーター** + +- `date_time`: 指定ã•ã‚ŒãŸæ•°ã®ãƒŠãƒŽç§’を加ãˆã‚‹æ™‚刻付ã日付。 [DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 加ãˆã‚‹ãƒŠãƒŽç§’ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date_time` ã« `num` ナノ秒を加ãˆã¾ã™ã€‚ [DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + addNanoseconds(date_time, 1000) AS add_nanoseconds_with_date_time, + addNanoseconds(date_time_string, 1000) AS add_nanoseconds_with_date_time_string +``` + +```response +┌─add_nanoseconds_with_date_time─┬─add_nanoseconds_with_date_time_string─┠+│ 2024-01-01 00:00:00.000001000 │ 2024-01-01 00:00:00.000001000 │ +└────────────────────────────────┴───────────────────────────────────────┘ +``` + +## addInterval + +別ã®é–“éš”ã¾ãŸã¯é–“éš”ã®ã‚¿ãƒ—ルを追加ã—ã¾ã™ã€‚ + +**構文** + +```sql +addInterval(interval_1, interval_2) +``` + +**パラメーター** + +- `interval_1`: 最åˆã®é–“éš”ã¾ãŸã¯é–“éš”ã®ã‚¿ãƒ—ル。 [interval](../data-types/special-data-types/interval.md)ã€[tuple](../data-types/tuple.md)([interval](../data-types/special-data-types/interval.md))。 +- `interval_2`: 追加ã•ã‚Œã‚‹2番目ã®é–“隔。 [interval](../data-types/special-data-types/interval.md)。 + +**è¿”å´å€¤** + +- é–“éš”ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ [tuple](../data-types/tuple.md)([interval](../data-types/special-data-types/interval.md))。 + +:::note +åŒã˜ã‚¿ã‚¤ãƒ—ã®é–“éš”ã¯ã€å˜ä¸€ã®é–“éš”ã«ã¾ã¨ã‚られã¾ã™ã€‚ãŸã¨ãˆã°ã€`toIntervalDay(1)` 㨠`toIntervalDay(2)` ãŒæ¸¡ã•ã‚Œã‚‹ã¨ã€çµæžœã¯ `(3)` ã«ãªã‚Šã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT addInterval(INTERVAL 1 DAY, INTERVAL 1 MONTH); +SELECT addInterval((INTERVAL 1 DAY, INTERVAL 1 YEAR), INTERVAL 1 MONTH); +SELECT addInterval(INTERVAL 2 DAY, INTERVAL 1 DAY); +``` + +çµæžœï¼š + +```response +┌─addInterval(toIntervalDay(1), toIntervalMonth(1))─┠+│ (1,1) │ +└───────────────────────────────────────────────────┘ +┌─addInterval((toIntervalDay(1), toIntervalYear(1)), toIntervalMonth(1))─┠+│ (1,1,1) │ +└────────────────────────────────────────────────────────────────────────┘ +┌─addInterval(toIntervalDay(2), toIntervalDay(1))─┠+│ (3) │ +└─────────────────────────────────────────────────┘ +``` + +## addTupleOfIntervals + +é–“éš”ã®ã‚¿ãƒ—ルを連続ã—ã¦æ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚ã«åŠ ãˆã¾ã™ã€‚ + +**構文** + +```sql +addTupleOfIntervals(interval_1, interval_2) +``` + +**パラメーター** + +- `date`: 最åˆã®é–“éš”ã¾ãŸã¯é–“éš”ã®ã‚¿ãƒ—ル。 [date](../data-types/date.md)/[date32](../data-types/date32.md)/[datetime](../data-types/datetime.md)/[datetime64](../data-types/datetime64.md)。 +- `intervals`: `date` ã«åŠ ãˆã‚‹é–“éš”ã®ã‚¿ãƒ—ル。 [tuple](../data-types/tuple.md)([interval](../data-types/special-data-types/interval.md))。 + +**è¿”å´å€¤** + +- `intervals` を加ãˆãŸ `date` ã‚’è¿”ã—ã¾ã™ã€‚ [date](../data-types/date.md)/[date32](../data-types/date32.md)/[datetime](../data-types/datetime.md)/[datetime64](../data-types/datetime64.md)。 + +**例** + +クエリ: + +```sql +WITH toDate('2018-01-01') AS date +SELECT addTupleOfIntervals(date, (INTERVAL 1 DAY, INTERVAL 1 MONTH, INTERVAL 1 YEAR)) +``` + +çµæžœï¼š + +```response +┌─addTupleOfIntervals(date, (toIntervalDay(1), toIntervalMonth(1), toIntervalYear(1)))─┠+│ 2019-02-02 │ +└──────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## subtractYears + +指定ã•ã‚ŒãŸæ•°ã®å¹´ã‚’日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã‹ã‚‰æ¸›ç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractYears(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®å¹´ã‚’減算ã™ã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 減算ã™ã‚‹å¹´ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã‹ã‚‰ `num` 年を減算ã—ã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + subtractYears(date, 1) AS subtract_years_with_date, + subtractYears(date_time, 1) AS subtract_years_with_date_time, + subtractYears(date_time_string, 1) AS subtract_years_with_date_time_string +``` + +```response +┌─subtract_years_with_date─┬─subtract_years_with_date_time─┬─subtract_years_with_date_time_string─┠+│ 2023-01-01 │ 2023-01-01 00:00:00 │ 2023-01-01 00:00:00.000 │ +└──────────────────────────┴───────────────────────────────┴──────────────────────────────────────┘ +``` + +## subtractQuarters + +指定ã•ã‚ŒãŸæ•°ã®å››åŠæœŸã‚’日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã‹ã‚‰æ¸›ç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractQuarters(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®å››åŠæœŸã‚’減算ã™ã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 減算ã™ã‚‹å››åŠæœŸã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã‹ã‚‰ `num` å››åŠæœŸã‚’減算ã—ã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + subtractQuarters(date, 1) AS subtract_quarters_with_date, + subtractQuarters(date_time, 1) AS subtract_quarters_with_date_time, + subtractQuarters(date_time_string, 1) AS subtract_quarters_with_date_time_string +``` + +```response +┌─subtract_quarters_with_date─┬─subtract_quarters_with_date_time─┬─subtract_quarters_with_date_time_string─┠+│ 2023-10-01 │ 2023-10-01 00:00:00 │ 2023-10-01 00:00:00.000 │ +└─────────────────────────────┴──────────────────────────────────┴─────────────────────────────────────────┘ +``` + +## subtractMonths + +指定ã•ã‚ŒãŸæ•°ã®æœˆã‚’日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã‹ã‚‰æ¸›ç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractMonths(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®æœˆã‚’減算ã™ã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 減算ã™ã‚‹æœˆã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã‹ã‚‰ `num` 月を減算ã—ã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + subtractMonths(date, 1) AS subtract_months_with_date, + subtractMonths(date_time, 1) AS subtract_months_with_date_time, + subtractMonths(date_time_string, 1) AS subtract_months_with_date_time_string +``` + +```response +┌─subtract_months_with_date─┬─subtract_months_with_date_time─┬─subtract_months_with_date_time_string─┠+│ 2023-12-01 │ 2023-12-01 00:00:00 │ 2023-12-01 00:00:00.000 │ +└───────────────────────────┴────────────────────────────────┴───────────────────────────────────────┘ +``` + +## subtractWeeks + +指定ã•ã‚ŒãŸæ•°ã®é€±ã‚’日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã‹ã‚‰æ¸›ç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractWeeks(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®é€±ã‚’減算ã™ã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 減算ã™ã‚‹é€±ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã‹ã‚‰ `num` 週間を減算ã—ã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + subtractWeeks(date, 1) AS subtract_weeks_with_date, + subtractWeeks(date_time, 1) AS subtract_weeks_with_date_time, + subtractWeeks(date_time_string, 1) AS subtract_weeks_with_date_time_string +``` + +```response + ┌─subtract_weeks_with_date─┬─subtract_weeks_with_date_time─┬─subtract_weeks_with_date_time_string─┠+ │ 2023-12-25 │ 2023-12-25 00:00:00 │ 2023-12-25 00:00:00.000 │ + └──────────────────────────┴───────────────────────────────┴──────────────────────────────────────┘ +``` + +## subtractDays + +指定ã•ã‚ŒãŸæ•°ã®æ—¥ã‚’日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã‹ã‚‰æ¸›ç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractDays(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®æ—¥ã‚’減算ã™ã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 減算ã™ã‚‹æ—¥ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã‹ã‚‰ `num` 日を減算ã—ã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + subtractDays(date, 31) AS subtract_days_with_date, + subtractDays(date_time, 31) AS subtract_days_with_date_time, + subtractDays(date_time_string, 31) AS subtract_days_with_date_time_string +``` + +```response +┌─subtract_days_with_date─┬─subtract_days_with_date_time─┬─subtract_days_with_date_time_string─┠+│ 2023-12-01 │ 2023-12-01 00:00:00 │ 2023-12-01 00:00:00.000 │ +└─────────────────────────┴──────────────────────────────┴─────────────────────────────────────┘ +``` + +## subtractHours + +指定ã•ã‚ŒãŸæ•°ã®æ™‚間を日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã‹ã‚‰æ¸›ç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractHours(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®æ™‚間を減算ã™ã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[Datetime](../data-types/datetime.md)/[Datetime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 減算ã™ã‚‹æ™‚é–“ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã‹ã‚‰ `num` 時間を減算ã—ã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[Datetime](../data-types/datetime.md)/[Datetime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + subtractHours(date, 12) AS subtract_hours_with_date, + subtractHours(date_time, 12) AS subtract_hours_with_date_time, + subtractHours(date_time_string, 12) AS subtract_hours_with_date_time_string +``` + +```response +┌─subtract_hours_with_date─┬─subtract_hours_with_date_time─┬─subtract_hours_with_date_time_string─┠+│ 2023-12-31 12:00:00 │ 2023-12-31 12:00:00 │ 2023-12-31 12:00:00.000 │ +└──────────────────────────┴───────────────────────────────┴──────────────────────────────────────┘ +``` + +## subtractMinutes + +指定ã•ã‚ŒãŸæ•°ã®åˆ†ã‚’日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã‹ã‚‰æ¸›ç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractMinutes(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®åˆ†ã‚’減算ã™ã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 減算ã™ã‚‹åˆ†ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã‹ã‚‰ `num` 分を減算ã—ã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + subtractMinutes(date, 30) AS subtract_minutes_with_date, + subtractMinutes(date_time, 30) AS subtract_minutes_with_date_time, + subtractMinutes(date_time_string, 30) AS subtract_minutes_with_date_time_string +``` + +```response +┌─subtract_minutes_with_date─┬─subtract_minutes_with_date_time─┬─subtract_minutes_with_date_time_string─┠+│ 2023-12-31 23:30:00 │ 2023-12-31 23:30:00 │ 2023-12-31 23:30:00.000 │ +└────────────────────────────┴─────────────────────────────────┴────────────────────────────────────────┘ +``` + +## subtractSeconds + +指定ã•ã‚ŒãŸæ•°ã®ç§’を日付ã€æ™‚刻付ãã®æ—¥ä»˜ã€ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ—¥ä»˜ / 時刻付ãã®æ—¥ä»˜ã‹ã‚‰æ¸›ç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractSeconds(date, num) +``` + +**パラメーター** + +- `date`: 指定ã•ã‚ŒãŸæ•°ã®ç§’を減算ã™ã‚‹æ—¥ä»˜ / 時刻付ã日付。 [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 減算ã™ã‚‹ç§’ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date` ã‹ã‚‰ `num` 秒を減算ã—ã¾ã™ã€‚ [Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDate('2024-01-01') AS date, + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + subtractSeconds(date, 60) AS subtract_seconds_with_date, + subtractSeconds(date_time, 60) AS subtract_seconds_with_date_time, + subtractSeconds(date_time_string, 60) AS subtract_seconds_with_date_time_string +``` + +```response +┌─subtract_seconds_with_date─┬─subtract_seconds_with_date_time─┬─subtract_seconds_with_date_time_string─┠+│ 2023-12-31 23:59:00 │ 2023-12-31 23:59:00 │ 2023-12-31 23:59:00.000 │ +└────────────────────────────┴─────────────────────────────────┴────────────────────────────────────────┘ +``` + +## subtractMilliseconds + +指定ã•ã‚ŒãŸæ•°ã®ãƒŸãƒªç§’を時刻付ãã®æ—¥ä»˜ã¾ãŸã¯æ–‡å­—列エンコードã•ã‚ŒãŸæ™‚刻付ãã®æ—¥ä»˜ã‹ã‚‰æ¸›ç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractMilliseconds(date_time, num) +``` + +**パラメーター** + +- `date_time`: 指定ã•ã‚ŒãŸæ•°ã®ãƒŸãƒªç§’を減算ã™ã‚‹æ™‚刻付ã日付。 [DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 減算ã™ã‚‹ãƒŸãƒªç§’ã®æ•°ã€‚ [(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”å´å€¤** + +- `date_time` ã‹ã‚‰ `num` ミリ秒を減算ã—ã¾ã™ã€‚ [DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + subtractMilliseconds(date_time, 1000) AS subtract_milliseconds_with_date_time, + subtractMilliseconds(date_time_string, 1000) AS subtract_milliseconds_with_date_time_string +``` + +```response +┌─subtract_milliseconds_with_date_time─┬─subtract_milliseconds_with_date_time_string─┠+│ 2023-12-31 23:59:59.000 │ 2023-12-31 23:59:59.000 │ +└──────────────────────────────────────┴─────────────────────────────────────────────┘ +``` +- `num`: 引ãç®—ã™ã‚‹ãƒžã‚¤ã‚¯ãƒ­ç§’ã®æ•°ã€‚[(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `date_time` ã‹ã‚‰ `num` マイクロ秒を引ã„ãŸçµæžœã‚’è¿”ã—ã¾ã™ã€‚ [DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + subtractMicroseconds(date_time, 1000000) AS subtract_microseconds_with_date_time, + subtractMicroseconds(date_time_string, 1000000) AS subtract_microseconds_with_date_time_string +``` + +```response +┌─subtract_microseconds_with_date_time─┬─subtract_microseconds_with_date_time_string─┠+│ 2023-12-31 23:59:59.000000 │ 2023-12-31 23:59:59.000000 │ +└──────────────────────────────────────┴─────────────────────────────────────────────┘ +``` + +## subtractNanoseconds + +指定ã—ãŸãƒŠãƒŽç§’数を日付ã¨æ™‚刻ã€ã¾ãŸã¯æ–‡å­—列ã§è¡¨ç¾ã•ã‚ŒãŸæ—¥ä»˜ã¨æ™‚刻ã‹ã‚‰å¼•ãç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractNanoseconds(date_time, num) +``` + +**パラメータ** + +- `date_time`: ナノ秒数を引ãç®—ã™ã‚‹å¯¾è±¡ã®æ—¥ä»˜ã¨æ™‚刻。[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)ã€[String](../data-types/string.md)。 +- `num`: 引ãç®—ã™ã‚‹ãƒŠãƒŽç§’ã®æ•°ã€‚[(U)Int*](../data-types/int-uint.md)ã€[Float*](../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `date_time` ã‹ã‚‰ `num` ナノ秒を引ã„ãŸçµæžœã‚’è¿”ã—ã¾ã™ã€‚ [DateTime64](../data-types/datetime64.md)。 + +**例** + +```sql +WITH + toDateTime('2024-01-01 00:00:00') AS date_time, + '2024-01-01 00:00:00' AS date_time_string +SELECT + subtractNanoseconds(date_time, 1000) AS subtract_nanoseconds_with_date_time, + subtractNanoseconds(date_time_string, 1000) AS subtract_nanoseconds_with_date_time_string +``` + +```response +┌─subtract_nanoseconds_with_date_time─┬─subtract_nanoseconds_with_date_time_string─┠+│ 2023-12-31 23:59:59.999999000 │ 2023-12-31 23:59:59.999999000 │ +└─────────────────────────────────────┴────────────────────────────────────────────┘ +``` + +## subtractInterval + +別ã®é–“隔や間隔ã®ã‚¿ãƒ—ルã«å¯¾ã—ã¦ã€ãƒã‚¬ãƒ†ã‚£ãƒ–ãªé–“隔を追加ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractInterval(interval_1, interval_2) +``` + +**パラメータ** + +- `interval_1`: 最åˆã®é–“éš”ã¾ãŸã¯ã‚¿ãƒ—ルã®é–“隔。[interval](../data-types/special-data-types/interval.md)ã€[tuple](../data-types/tuple.md)([interval](../data-types/special-data-types/interval.md))。 +- `interval_2`: ãƒã‚¬ãƒ†ã‚£ãƒ–ã«ã™ã‚‹ç¬¬2ã®é–“隔。[interval](../data-types/special-data-types/interval.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é–“éš”ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚[tuple](../data-types/tuple.md)([interval](../data-types/special-data-types/interval.md))。 + +:::note +åŒã˜ã‚¿ã‚¤ãƒ—ã®é–“éš”ã¯ã€å˜ä¸€ã®é–“éš”ã«çµåˆã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€ `toIntervalDay(2)` 㨠`toIntervalDay(1)` ãŒæ¸¡ã•ã‚ŒãŸå ´åˆã€çµæžœã¯ `(1)` ã«ãªã‚Šã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT subtractInterval(INTERVAL 1 DAY, INTERVAL 1 MONTH); +SELECT subtractInterval((INTERVAL 1 DAY, INTERVAL 1 YEAR), INTERVAL 1 MONTH); +SELECT subtractInterval(INTERVAL 2 DAY, INTERVAL 1 DAY); +``` + +çµæžœ: + +```response +┌─subtractInterval(toIntervalDay(1), toIntervalMonth(1))─┠+│ (1,-1) │ +└────────────────────────────────────────────────────────┘ +┌─subtractInterval((toIntervalDay(1), toIntervalYear(1)), toIntervalMonth(1))─┠+│ (1,1,-1) │ +└─────────────────────────────────────────────────────────────────────────────┘ +┌─subtractInterval(toIntervalDay(2), toIntervalDay(1))─┠+│ (1) │ +└──────────────────────────────────────────────────────┘ +``` + +## subtractTupleOfIntervals + +日付ã¾ãŸã¯æ—¥ä»˜æ™‚刻ã‹ã‚‰ã‚¿ãƒ—ルã®é–“隔を順次引ãç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +subtractTupleOfIntervals(interval_1, interval_2) +``` + +**パラメータ** + +- `date`: 最åˆã®é–“éš”ã¾ãŸã¯ã‚¿ãƒ—ルã®é–“隔。[Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 +- `intervals`: `date` ã‹ã‚‰å¼•ãé–“éš”ã®ã‚¿ãƒ—ル。[tuple](../data-types/tuple.md)([interval](../data-types/special-data-types/interval.md))。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引ã‹ã‚ŒãŸ `intervals` ã‚’æŒã¤ `date` ã‚’è¿”ã—ã¾ã™ã€‚[Date](../data-types/date.md)/[Date32](../data-types/date32.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md)。 + +**例** + +クエリ: + +```sql +WITH toDate('2018-01-01') AS date SELECT subtractTupleOfIntervals(date, (INTERVAL 1 DAY, INTERVAL 1 YEAR)) +``` + +çµæžœ: + +```response +┌─subtractTupleOfIntervals(date, (toIntervalDay(1), toIntervalYear(1)))─┠+│ 2016-12-31 │ +└───────────────────────────────────────────────────────────────────────┘ +``` + +## timeSlots + +‘StartTime’ ã‹ã‚‰å§‹ã¾ã‚Š ‘Duration’ 秒続ã時間間隔ã«ãŠã„ã¦ã€ã“ã®é–“隔内ã®æ™‚é–“ã®çž¬é–“ã‚’ã€â€™Size’ 秒å˜ä½ã«åˆ‡ã‚Šæ¨ã¦ãŸç‚¹ã®é…列を返ã—ã¾ã™ã€‚’Size’ ã¯ã‚ªãƒ—ションã®ãƒ‘ラメータã§ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ 1800(30分)ã§ã™ã€‚ +ã“ã‚Œã¯ã€å¯¾å¿œã™ã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³å†…ã®ãƒšãƒ¼ã‚¸ãƒ“ューを検索ã™ã‚‹éš›ã«å¿…è¦ã§ã™ã€‚ +‘StartTime’ 引数ã«ã¯ DateTime ãŠã‚ˆã³ DateTime64 ã‚’å—ã‘付ã‘ã¾ã™ã€‚DateTime ã§ã¯ã€â€™Duration’ 㨠’Size’ 引数㯠`UInt32` ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。’DateTime64’ ã§ã¯ã€ã“れら㯠`Decimal64` ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +DateTime/DateTime64 ã®é…列を返ã—ã¾ã™ï¼ˆæˆ»ã‚Šå€¤ã®åž‹ã¯ ’StartTime’ ã®åž‹ã«ä¸€è‡´ã—ã¾ã™ï¼‰ã€‚DateTime64 ã®å ´åˆã€æˆ»ã‚Šå€¤ã®ã‚¹ã‚±ãƒ¼ãƒ«ã¯ ’StartTime’ ã®ã‚¹ã‚±ãƒ¼ãƒ«ã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ --- ã™ã¹ã¦ã®æŒ‡å®šã•ã‚ŒãŸå¼•æ•°ã®ä¸­ã§æœ€ã‚‚高ã„スケールãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +timeSlots(StartTime, Duration,\[, Size\]) +``` + +**例** + +```sql +SELECT timeSlots(toDateTime('2012-01-01 12:20:00'), toUInt32(600)); +SELECT timeSlots(toDateTime('1980-12-12 21:01:02', 'UTC'), toUInt32(600), 299); +SELECT timeSlots(toDateTime64('1980-12-12 21:01:02.1234', 4, 'UTC'), toDecimal64(600.1, 1), toDecimal64(299, 0)); +``` + +çµæžœ: + +``` text +┌─timeSlots(toDateTime('2012-01-01 12:20:00'), toUInt32(600))─┠+│ ['2012-01-01 12:00:00','2012-01-01 12:30:00'] │ +└─────────────────────────────────────────────────────────────┘ +┌─timeSlots(toDateTime('1980-12-12 21:01:02', 'UTC'), toUInt32(600), 299)─┠+│ ['1980-12-12 20:56:13','1980-12-12 21:01:12','1980-12-12 21:06:11'] │ +└─────────────────────────────────────────────────────────────────────────┘ +┌─timeSlots(toDateTime64('1980-12-12 21:01:02.1234', 4, 'UTC'), toDecimal64(600.1, 1), toDecimal64(299, 0))─┠+│ ['1980-12-12 20:56:13.0000','1980-12-12 21:01:12.0000','1980-12-12 21:06:11.0000'] │ +└───────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## formatDateTime + +指定ã•ã‚ŒãŸå½¢å¼ã®æ–‡å­—列ã«å¾“ã£ã¦æ™‚刻をフォーマットã—ã¾ã™ã€‚å½¢å¼ã¯å®šæ•°å¼ãªã®ã§ã€å˜ä¸€ã®çµæžœåˆ—ã«å¯¾ã—ã¦è¤‡æ•°ã®å½¢å¼ã‚’使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +formatDateTime 㯠MySQL ã®æ—¥ä»˜ã¨æ™‚刻ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚¹ã‚¿ã‚¤ãƒ«ã‚’使用ã—ã¾ã™ã€‚詳細㯠https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-format ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®é–¢æ•°ã®é€†æ“作㯠[parseDateTime](../functions/type-conversion-functions.md#type_conversion_functions-parseDateTime) ã§ã™ã€‚ + +エイリアス: `DATE_FORMAT`。 + +**構文** + +``` sql +formatDateTime(Time, Format[, Timezone]) +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸå½¢å¼ã«å¾“ã„ã€æ—¥æ™‚ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**ç½®æ›ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰** + +ç½®æ›ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’使用ã—ã¦ã€çµæžœã®æ–‡å­—列ã®ãƒ‘ターンを定義ã§ãã¾ã™ã€‚“例†列㯠`2018-01-02 22:33:44` ã«å¯¾ã™ã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒ†ã‚£ãƒ³ã‚°çµæžœã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +| プレースホルダー | 説明 | 例 | +|----------|-------------------------------------------------|------------| +| %a | 短縮形ã®æ›œæ—¥å (月-æ—¥) | Mon | +| %b | 短縮形ã®æœˆå (1月-12月) | Jan | +| %c | æœˆã‚’æ•´æ•°ç•ªå· (01-12) ã§è¡¨ã™ã€‚’ノート3’をå‚ç…§ | 01 | +| %C | 100å¹´ã§å‰²ã£ãŸå¾Œã€æ•´æ•°ã«åˆ‡ã‚Šæ¨ã¦ï¼ˆ00-99) | 20 | +| %d | 月ã®æ—¥ã‚’0è©°ã‚(01-31) | 02 | +| %D | 短縮形ã®MM/DD/YYã®æ—¥ä»˜ï¼ˆ%m/%d/%yã¨åŒç­‰ï¼‰ | 01/02/18 | +| %e | 月ã®æ—¥ã‚’空白詰ã‚(1-31) |   2 | +| %f | å°æ•°ç‚¹ä»¥ä¸‹ã®ç§’ã€â€™ãƒŽãƒ¼ãƒˆ1’をå‚ç…§ | 1234560 | +| %F | 短縮形ã®YYYY-MM-DDã®æ—¥ä»˜ï¼ˆ%Y-%m-%dã¨åŒç­‰ï¼‰ | 2018-01-02 | +| %g | ISO 8601ã«æ•´åˆ—ã—ãŸ2æ¡ã®å¹´å½¢å¼ã€4æ¡ã®è¡¨è¨˜ã‹ã‚‰çŸ­ç¸®åŒ– | 18 | +| %G | ISO 週番å·ç”¨ã®4æ¡ã®å¹´å½¢å¼ã€é€±ãƒ™ãƒ¼ã‚¹ã®å¹´ã‹ã‚‰è¨ˆç®— | 2018 | +| %h | 12時間形å¼ã®æ™‚(01-12) | 09 | +| %H | 24時間形å¼ã®æ™‚(00-23) | 22 | +| %i | 分(00-59) | 33 | +| %I | 12時間形å¼ã®æ™‚(01-12) | 10 | +| %j | å¹´ã®æ—¥ï¼ˆ001-366) | 002 | +| %k | 24時間形å¼ã®æ™‚(00-23)ã€â€™ãƒŽãƒ¼ãƒˆ3’をå‚ç…§ | 14 | +| %l | 12時間形å¼ã®æ™‚(01-12)ã€â€™ãƒŽãƒ¼ãƒˆ3’をå‚ç…§ | 09 | +| %m | æœˆã‚’æ•´æ•°ç•ªå· (01-12) ã§è¡¨ã™ | 01 | +| %M | 完全ãªæœˆå (1月-12月)ã€â€™ãƒŽãƒ¼ãƒˆ2’をå‚ç…§ | January | +| %n | 改行文字 (‘’) | | +| %p | AM ã¾ãŸã¯ PM ã®æŒ‡å®š | PM | +| %Q | å››åŠæœŸï¼ˆ1-4) | 1 | +| %r | 12時間HH:MM AM/PMå½¢å¼ã€%h:%i %pã¨åŒç­‰ | 10:30 PM | +| %R | 24時間HH:MMå½¢å¼ã€%H:%iã¨åŒç­‰ | 22:33 | +| %s | 秒(00-59) | 44 | +| %S | 秒(00-59) | 44 | +| %t | 横タブ文字(’) | | +| %T | ISO 8601å½¢å¼ã®æ™‚刻 (HH:MM:SS)ã€%H:%i:%Sã¨åŒç­‰ | 22:33:44 | +| %u | 月曜日を1ã¨ã™ã‚‹ISO 8601ã®æ›œæ—¥ç•ªå·ï¼ˆ1-7) | 2 | +| %V | ISO 8601週番å·ï¼ˆ01-53) | 01 | +| %w | 日曜日を0ã¨ã™ã‚‹æ•´æ•°å½¢å¼ã®æ›œæ—¥ï¼ˆ0-6) | 2 | +| %W | 完全ãªæ›œæ—¥å(月曜日-日曜日) | Monday | +| %y | å¹´ã®æœ€çµ‚2æ¡ï¼ˆ00-99) | 18 | +| %Y | å¹´ | 2018 | +| %z | UTCã¨ã®æ™‚間オフセットを+HHMMã¾ãŸã¯-HHMMå½¢å¼ã§è¡¨ç¤º | -0500 | +| %% | % è¨˜å· | % | + +ノート1: ClickHouse ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒ v23.4 より以å‰ã®ã‚‚ã®ã§ã‚ã‚‹å ´åˆã€`%f` ã¯æ—¥ä»˜ã€Date32ã€ã¾ãŸã¯æ—¥ä»˜æ™‚刻(ã“れらã¯å°æ•°ç‚¹ä»¥ä¸‹ã®ç§’ã‚’æŒãŸãªã„)や DateTime64 ã®ç²¾åº¦ãŒ 0 ã®å ´åˆã€å˜ä¸€ã®ã‚¼ãƒ­ (0) ã‚’å°åˆ·ã—ã¾ã™ã€‚以å‰ã®å‹•ä½œã¯ã€è¨­å®š `formatdatetime_f_prints_single_zero = 1` を使用ã™ã‚‹ã“ã¨ã§å¾©å…ƒã§ãã¾ã™ã€‚ + +ノート2: ClickHouse ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒ v23.4 より以å‰ã®ã‚‚ã®ã§ã‚ã‚‹å ´åˆã€`%M` ã¯å®Œå…¨ãªæœˆå(1月-12月)ã§ã¯ãªãã€åˆ†ã‚’å°åˆ·ã—ã¾ã™ï¼ˆ00-59)。以å‰ã®å‹•ä½œã¯ã€è¨­å®š `formatdatetime_parsedatetime_m_is_month_name = 0` を使用ã™ã‚‹ã“ã¨ã§å¾©å…ƒã§ãã¾ã™ã€‚ + +ノート3: ClickHouse ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒ v23.11 より以å‰ã®ã‚‚ã®ã§ã‚ã‚‹å ´åˆã€é–¢æ•° `parseDateTime()` ã¯ãƒ•ã‚©ãƒ¼ãƒžãƒƒã‚¿ `%c`(月)ãŠã‚ˆã³ `%l` / `%k`(時)ã«å…ˆé ­ã®ã‚¼ãƒ­ã‚’å¿…è¦ã¨ã—ã¦ã„ã¾ã—ãŸã€‚例: `07`。後ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ã€å…ˆé ­ã®ã‚¼ãƒ­ã¯çœç•¥ã§ãã¾ã™ã€ä¾‹: `7`。以å‰ã®å‹•ä½œã¯ã€è¨­å®š `parsedatetime_parse_without_leading_zeros = 0` を使用ã™ã‚‹ã“ã¨ã§å¾©å…ƒã§ãã¾ã™ã€‚関数 `formatDateTime()` ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ä¾ç„¶ã¨ã—㦠`%c` ãŠã‚ˆã³ `%l` / `%k` ã«å…ˆé ­ã®ã‚¼ãƒ­ã‚’å°åˆ·ã—ã€æ—¢å­˜ã®ä½¿ç”¨ä¾‹ã‚’壊ã•ãªã„よã†ã«ã—ã¾ã™ã€‚ã“ã®å‹•ä½œã¯ã€è¨­å®š `formatdatetime_format_without_leading_zeros = 1` ã«ã‚ˆã£ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ + +**例** + +``` sql +SELECT formatDateTime(toDate('2010-01-04'), '%g') +``` + +çµæžœ: + +``` +┌─formatDateTime(toDate('2010-01-04'), '%g')─┠+│ 10 │ +└────────────────────────────────────────────┘ +``` + +``` sql +SELECT formatDateTime(toDateTime64('2010-01-04 12:34:56.123456', 7), '%f') +``` + +çµæžœ: + +``` +┌─formatDateTime(toDateTime64('2010-01-04 12:34:56.123456', 7), '%f')─┠+│ 1234560 │ +└─────────────────────────────────────────────────────────────────────┘ +``` + +ã•ã‚‰ã«ã€`formatDateTime` 関数ã¯ã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã®åå‰ã‚’å«ã‚€ç¬¬3ã®æ–‡å­—列引数をå–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例: `Asia/Istanbul`。ã“ã®å ´åˆã€æŒ‡å®šã•ã‚ŒãŸã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã«å¾“ã£ã¦æ™‚刻ãŒãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +**例** + +```sql +SELECT + now() AS ts, + time_zone, + formatDateTime(ts, '%T', time_zone) AS str_tz_time +FROM system.time_zones +WHERE time_zone LIKE 'Europe%' +LIMIT 10 + +┌──────────────────ts─┬─time_zone─────────┬─str_tz_time─┠+│ 2023-09-08 19:13:40 │ Europe/Amsterdam │ 21:13:40 │ +│ 2023-09-08 19:13:40 │ Europe/Andorra │ 21:13:40 │ +│ 2023-09-08 19:13:40 │ Europe/Astrakhan │ 23:13:40 │ +│ 2023-09-08 19:13:40 │ Europe/Athens │ 22:13:40 │ +│ 2023-09-08 19:13:40 │ Europe/Belfast │ 20:13:40 │ +│ 2023-09-08 19:13:40 │ Europe/Belgrade │ 21:13:40 │ +│ 2023-09-08 19:13:40 │ Europe/Berlin │ 21:13:40 │ +│ 2023-09-08 19:13:40 │ Europe/Bratislava │ 21:13:40 │ +│ 2023-09-08 19:13:40 │ Europe/Brussels │ 21:13:40 │ +│ 2023-09-08 19:13:40 │ Europe/Bucharest │ 22:13:40 │ +└─────────────────────┴───────────────────┴─────────────┘ +``` + +**関連情報** + +- [formatDateTimeInJodaSyntax](#formatdatetimeinjodasyntax) + +## formatDateTimeInJodaSyntax + +formatDateTime ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€MySQL スタイルã®ä»£ã‚ã‚Šã« Joda スタイルã§æ—¥ä»˜æ™‚刻をフォーマットã—ã¾ã™ã€‚詳細㯠https://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®é–¢æ•°ã®é€†æ“作㯠[parseDateTimeInJodaSyntax](../functions/type-conversion-functions.md#type_conversion_functions-parseDateTimeInJodaSyntax) ã§ã™ã€‚ + +**ç½®æ›ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰** + +ç½®æ›ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’使用ã—ã¦ã€çµæžœã®æ–‡å­—列ã®ãƒ‘ターンを定義ã§ãã¾ã™ã€‚ + +| プレースホルダー | 説明 | プレゼンテーション | 例 | +| ----------- | ---------------------------------- | ------------- | ------------------------------ | +| G | 年代 | テキスト | AD | +| C | 年代ã®ä¸–ç´€ (>=0) | æ•°å­— | 20 | +| Y | 年代ã®å¹´ (>=0) | å¹´ | 1996 | +| x | 週年(未対応) | å¹´ | 1996 | +| w | 週年ã®é€±ï¼ˆæœªå¯¾å¿œï¼‰ | æ•°å­— | 27 | +| e | 曜日 | æ•°å­— | 2 | +| E | 曜日 | テキスト | Tuesday; Tue | +| y | å¹´ | å¹´ | 1996 | +| D | å¹´ã®æ—¥ | æ•°å­— | 189 | +| M | å¹´ã®æœˆ | 月 | July; Jul; 07 | +| d | 月ã®æ—¥ | æ•°å­— | 10 | +| a | æ—¥ã®åŠåˆ† | テキスト | PM | +| K | åŠæ—¥ã®æ™‚刻 (0〜11) | æ•°å­— | 0 | +| h | åŠæ—¥ã®æ™‚刻 (1〜12) | æ•°å­— | 12 | +| H | 一日ã®æ™‚刻 (0〜23) | æ•°å­— | 0 | +| k | 一日ã®æ™‚刻 (1〜24) | æ•°å­— | 24 | +| m | 時間ã®åˆ† | æ•°å­— | 30 | +| s | 分ã®ç§’ | æ•°å­— | 55 | +| S | 秒ã®å°æ•°ç‚¹ä»¥ä¸‹ï¼ˆæœªå¯¾å¿œï¼‰ | æ•°å­— | 978 | +| z | タイムゾーン(短縮åã¯æœªå¯¾å¿œï¼‰ | テキスト | 太平洋標準時; PST | +| Z | タイムゾーンオフセット/ID(未対応) | ゾーン | -0800; -08:00; America/Los_Angeles | +| ' | テキストã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ— | 区切り | | +| '' | å˜ä¸€å¼•ç”¨ç¬¦ | リテラル | ' | + +**例** + +``` sql +SELECT formatDateTimeInJodaSyntax(toDateTime('2010-01-04 12:34:56'), 'yyyy-MM-dd HH:mm:ss') +``` + +çµæžœ: + +``` +┌─formatDateTimeInJodaSyntax(toDateTime('2010-01-04 12:34:56'), 'yyyy-MM-dd HH:mm:ss')─┠+│ 2010-01-04 12:34:56 │ +└─────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## dateName + +指定ã•ã‚ŒãŸæ—¥ä»˜ã®éƒ¨åˆ†ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +dateName(date_part, date) +``` + +**引数** + +- `date_part` — 日付ã®éƒ¨åˆ†ã€‚å¯èƒ½ãªå€¤: 'year', 'quarter', 'month', 'week', 'dayofyear', 'day', 'weekday', 'hour', 'minute', 'second'。[String](../data-types/string.md)。 +- `date` — 日付。[Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 +- `timezone` — タイムゾーン。オプション。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸæ—¥ä»˜ã®éƒ¨åˆ†ã€‚[String](../data-types/string.md#string) + +**例** + +```sql +WITH toDateTime('2021-04-14 11:22:33') AS date_value +SELECT + dateName('year', date_value), + dateName('month', date_value), + dateName('day', date_value); +``` + +çµæžœ: + +```text +┌─dateName('year', date_value)─┬─dateName('month', date_value)─┬─dateName('day', date_value)─┠+│ 2021 │ April │ 14 │ +└──────────────────────────────┴───────────────────────────────┴─────────────────────────────┘ +``` + +## monthName + +月ã®åå‰ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +monthName(date) +``` + +**引数** + +- `date` — 日付ã¾ãŸã¯æ™‚刻付ãã®æ—¥ä»˜ã€‚[Date](../data-types/date.md)ã€[DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 月ã®åå‰ã€‚[String](../data-types/string.md#string) + +**例** + +```sql +WITH toDateTime('2021-04-14 11:22:33') AS date_value +SELECT monthName(date_value); +``` + +çµæžœ: + +```text +┌─monthName(date_value)─┠+│ April │ +└───────────────────────┘ +``` + +## fromUnixTimestamp + +ã“ã®é–¢æ•°ã¯Unixタイムスタンプをカレンダー日付ã¨ä¸€æ—¥ä¸­ã®æ™‚é–“ã«å¤‰æ›ã—ã¾ã™ã€‚ + +二ã¤ã®æ–¹æ³•ã§å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ï¼š + +å˜ä¸€ã®å¼•æ•°ã¨ã—㦠[Integer](../data-types/int-uint.md) 型を渡ã™ã¨ã€[DateTime](../data-types/datetime.md) åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ã™ãªã‚ã¡ã€[toDateTime](../../sql-reference/functions/type-conversion-functions.md#todatetime) ã®ã‚ˆã†ã«æŒ¯èˆžã„ã¾ã™ã€‚ + +エイリアス: `FROM_UNIXTIME`。 + +**例:** + +```sql +SELECT fromUnixTimestamp(423543535); +``` + +çµæžœ: + +```text +┌─fromUnixTimestamp(423543535)─┠+│ 1983-06-04 10:58:55 │ +└──────────────────────────────┘ +``` + +二ã¤ã¾ãŸã¯ä¸‰ã¤ã®å¼•æ•°ã‚’与ãˆã€æœ€åˆã®å¼•æ•°ã« [Integer](../data-types/int-uint.md)ã€[Date](../data-types/date.md)ã€[Date32](../data-types/date32.md)ã€[DateTime](../data-types/datetime.md) ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md) ã®å€¤ã‚’渡ã™ã¨ã€ç¬¬äºŒã®å¼•æ•°ãŒå®šæ•°å½¢å¼ã®æ–‡å­—列ã€ç¬¬ä¸‰ã®å¼•æ•°ãŒã‚ªãƒ—ションã®å®šæ•°ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã®æ–‡å­—列ã«ãªã‚‹å ´åˆã€ã“ã®é–¢æ•°ã¯[String](../data-types/string.md#string) åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ã™ãªã‚ã¡ã€[formatDateTime](#formatdatetime) ã®ã‚ˆã†ã«æŒ¯èˆžã„ã¾ã™ã€‚ã“ã®å ´åˆã€[MySQL ã®æ—¥ä»˜ã¨æ™‚刻ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚¹ã‚¿ã‚¤ãƒ«](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-format) ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例:** + +```sql +SELECT fromUnixTimestamp(1234334543, '%Y-%m-%d %R:%S') AS DateTime; +``` + +çµæžœ: + +```text +┌─DateTime────────────┠+│ 2009-02-11 14:42:23 │ +└─────────────────────┘ +``` + +**関連情報** + +- [fromUnixTimestampInJodaSyntax](#fromunixtimestampinjodasyntax) + +## fromUnixTimestampInJodaSyntax + +[fromUnixTimestamp](#fromunixtimestamp)ã¨åŒæ§˜ã§ã™ãŒã€äºŒã¤ã¾ãŸã¯ä¸‰ã¤ã®å¼•æ•°ã§å‘¼ã³å‡ºã™éš›ã«ã¯ã€æ—¥ä»˜ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒ[MySQLスタイル](https://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html)ã§ã¯ãªãJodaスタイルã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +**例:** + +``` sql +SELECT fromUnixTimestampInJodaSyntax(1234334543, 'yyyy-MM-dd HH:mm:ss', 'UTC') AS DateTime; +``` + +çµæžœ: + +``` +┌─DateTime────────────┠+│ 2009-02-11 06:42:23 │ +└─────────────────────┘ +``` + +## toModifiedJulianDay + +[プロレプティックグレゴリオ暦](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar)ã®æ—¥ä»˜ã‚’ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ `YYYY-MM-DD`ã‹ã‚‰[修正ユリウス日](https://en.wikipedia.org/wiki/Julian_day#Variants)番å·ã«å¤‰æ›ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ `0000-01-01` ã‹ã‚‰ `9999-12-31` ã¾ã§ã®æ—¥ä»˜ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚引数ãŒæ—¥ä»˜ã¨ã—ã¦è§£æžã§ããªã„å ´åˆã‚„無効ãªæ—¥ä»˜ã®å ´åˆã¯ä¾‹å¤–を発生ã•ã›ã¾ã™ã€‚ + +**構文** + +``` sql +toModifiedJulianDay(date) +``` + +**引数** + +- `date` — テキスト形å¼ã®æ—¥ä»˜ã€‚[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 修正ユリウス日番å·ã€‚[Int32](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT toModifiedJulianDay('2020-01-01'); +``` + +çµæžœ: + +``` text +┌─toModifiedJulianDay('2020-01-01')─┠+│ 58849 │ +└───────────────────────────────────┘ +``` + +## toModifiedJulianDayOrNull + +[toModifiedJulianDay()](#tomodifiedjulianday) よりも似ã¦ã„ã¾ã™ãŒã€ä¾‹å¤–を発生ã•ã›ã‚‹ä»£ã‚ã‚Šã« `NULL` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toModifiedJulianDayOrNull(date) +``` + +**引数** + +- `date` — テキスト形å¼ã®æ—¥ä»˜ã€‚[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 修正ユリウス日番å·ã€‚[Nullable(Int32)](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT toModifiedJulianDayOrNull('2020-01-01'); +``` + +çµæžœ: + +``` text +┌─toModifiedJulianDayOrNull('2020-01-01')─┠+│ 58849 │ +└─────────────────────────────────────────┘ +``` + +## fromModifiedJulianDay + +修正ユリウス日番å·ã‚’[プロレプティックグレゴリオ暦](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar)ã®æ—¥ä»˜å½¢å¼ `YYYY-MM-DD` ã«å¤‰æ›ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€`-678941` ã‹ã‚‰ `2973483` ã¾ã§ã®æ•´æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ï¼ˆã“ã‚Œã«ã‚ˆã‚Š `0000-01-01` 㨠`9999-12-31` を表ã—ã¾ã™ï¼‰ã€‚日数ãŒã‚µãƒãƒ¼ãƒˆã•ã‚ŒãŸç¯„囲外ã®å ´åˆã¯ä¾‹å¤–を発生ã•ã›ã¾ã™ã€‚ + +**構文** + +``` sql +fromModifiedJulianDay(day) +``` + +**引数** + +- `day` — 修正ユリウス日番å·ã€‚[ä»»æ„ã®æ•´æ•°åž‹](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- テキスト形å¼ã®æ—¥ä»˜ã€‚[String](../data-types/string.md) + +**例** + +``` sql +SELECT fromModifiedJulianDay(58849); +``` + +çµæžœ: + +``` text +┌─fromModifiedJulianDay(58849)─┠+│ 2020-01-01 │ +└──────────────────────────────┘ +``` + +## fromModifiedJulianDayOrNull + +[fromModifiedJulianDayOrNull()](#frommodifiedjuliandayornull) ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ä¾‹å¤–を発生ã•ã›ã‚‹ä»£ã‚ã‚Šã« `NULL` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +fromModifiedJulianDayOrNull(day) +``` + +**引数** + +- `day` — 修正ユリウス日番å·ã€‚[ä»»æ„ã®æ•´æ•°åž‹](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- テキスト形å¼ã®æ—¥ä»˜ã€‚[Nullable(String)](../data-types/string.md) + +**例** + +``` sql +SELECT fromModifiedJulianDayOrNull(58849); +``` + +çµæžœ: + +``` text +┌─fromModifiedJulianDayOrNull(58849)─┠+│ 2020-01-01 │ +└────────────────────────────────────┘ +``` + +## toUTCTimestamp + +ä»–ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‹ã‚‰UTCタイムスタンプã«DateTime/DateTime64åž‹ã®å€¤ã‚’変æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toUTCTimestamp(time_val, time_zone) +``` + +**引数** + +- `time_val` — DateTime/DateTime64åž‹ã®å®šæ•°å€¤ã¾ãŸã¯å¼ã€‚[DateTime/DateTime64åž‹](../data-types/datetime.md) +- `time_zone` — タイムゾーンを表ã™å®šæ•°ã®æ–‡å­—列値ã¾ãŸã¯å¼ã€‚[Stringåž‹](../data-types/string.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- テキスト形å¼ã®DateTime/DateTime64 + +**例** + +``` sql +SELECT toUTCTimestamp(toDateTime('2023-03-16'), 'Asia/Shanghai'); +``` + +çµæžœ: + +``` text +┌─toUTCTimestamp(toDateTime('2023-03-16'),'Asia/Shanghai')â” +│ 2023-03-15 16:00:00 │ +└─────────────────────────────────────────────────────────┘ +``` + +## fromUTCTimestamp + +UTCタイムゾーンã‹ã‚‰ä»–ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã«DateTime/DateTime64åž‹ã®å€¤ã‚’変æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +fromUTCTimestamp(time_val, time_zone) +``` + +**引数** + +- `time_val` — DateTime/DateTime64åž‹ã®å®šæ•°å€¤ã¾ãŸã¯å¼ã€‚[DateTime/DateTime64åž‹](../data-types/datetime.md) +- `time_zone` — タイムゾーンを表ã™å®šæ•°ã®æ–‡å­—列値ã¾ãŸã¯å¼ã€‚[Stringåž‹](../data-types/string.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- テキスト形å¼ã®DateTime/DateTime64 + +**例** + +``` sql +SELECT fromUTCTimestamp(toDateTime64('2023-03-16 10:00:00', 3), 'Asia/Shanghai'); +``` + +çµæžœ: + +``` text +┌─fromUTCTimestamp(toDateTime64('2023-03-16 10:00:00',3),'Asia/Shanghai')─┠+│ 2023-03-16 18:00:00.000 │ +└─────────────────────────────────────────────────────────────────────────┘ +``` + +## UTCTimestamp + +クエリ分æžã®çž¬é–“ã«ãŠã‘ã‚‹ç¾åœ¨ã®æ—¥ä»˜ã¨æ™‚刻を返ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯å®šæ•°å¼ã§ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ã¯ `now('UTC')` ã¨åŒã˜çµæžœã‚’è¿”ã—ã¾ã™ã€‚MySQLサãƒãƒ¼ãƒˆã®ãŸã‚ã«è¿½åŠ ã•ã‚ŒãŸã‚‚ã®ã§ã‚ã‚Šã€[`now`](#now) ãŒæŽ¨å¥¨ã•ã‚Œã‚‹ä½¿ç”¨æ³•ã§ã™ã€‚ +::: + +**構文** + +```sql +UTCTimestamp() +``` + +エイリアス: `UTC_timestamp`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- クエリ分æžã®çž¬é–“ã«ãŠã‘ã‚‹ç¾åœ¨ã®æ—¥ä»˜ã¨æ™‚刻を返ã—ã¾ã™ã€‚[DateTime](../data-types/datetime.md)。 + +**例** + +クエリ: + +```sql +SELECT UTCTimestamp(); +``` + +çµæžœ: + +```response +┌──────UTCTimestamp()─┠+│ 2024-05-28 08:32:09 │ +└─────────────────────┘ +``` + +## timeDiff + +二ã¤ã®æ—¥ä»˜ã¾ãŸã¯æ—¥ä»˜æ™‚刻値ã®å·®ã‚’è¿”ã—ã¾ã™ã€‚å·®ã¯ç§’å˜ä½ã§è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ã“れ㯠`dateDiff` ã¨åŒã˜ã§ã‚ã‚Šã€MySQLサãƒãƒ¼ãƒˆã®ãŸã‚ã«è¿½åŠ ã•ã‚Œã¾ã—ãŸã€‚`dateDiff` ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +timeDiff(first_datetime, second_datetime) +``` + +**引数** + +- `first_datetime` — DateTime/DateTime64åž‹ã®å®šæ•°å€¤ã¾ãŸã¯å¼ã€‚[DateTime/DateTime64åž‹](../data-types/datetime.md) +- `second_datetime` — DateTime/DateTime64åž‹ã®å®šæ•°å€¤ã¾ãŸã¯å¼ã€‚[DateTime/DateTime64åž‹](../data-types/datetime.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +二ã¤ã®æ—¥ä»˜ã¾ãŸã¯æ—¥ä»˜æ™‚刻ã®å€¤ã®ç§’æ•°ã®å·®ã€‚ + +**例** + +クエリ: + +```sql +timeDiff(toDateTime64('1927-01-01 00:00:00', 3), toDate32('1927-01-02')); +``` + +**çµæžœ**: + +```response +┌─timeDiff(toDateTime64('1927-01-01 00:00:00', 3), toDate32('1927-01-02'))─┠+│ 86400 │ +└──────────────────────────────────────────────────────────────────────────┘ +``` + +## 関連コンテンツ + +- ブログ: [ClickHouseã§ã®æ™‚系列データã®æ“作](https://clickhouse.com/blog/working-with-time-series-data-and-functions-ClickHouse) diff --git a/docs/ja/sql-reference/functions/distance-functions.md b/docs/ja/sql-reference/functions/distance-functions.md new file mode 100644 index 00000000000..65f3cc5eeae --- /dev/null +++ b/docs/ja/sql-reference/functions/distance-functions.md @@ -0,0 +1,555 @@ +--- +slug: /ja/sql-reference/functions/distance-functions +sidebar_position: 55 +sidebar_label: è·é›¢ +--- + +# è·é›¢é–¢æ•° + +## L1Norm + +ベクトルã®çµ¶å¯¾å€¤ã®åˆè¨ˆã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +L1Norm(vector) +``` + +別å: `normL1`. + +**引数** + +- `vector` — [Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- L1-ノルムã¾ãŸã¯[タクシー幾何学](https://en.wikipedia.org/wiki/Taxicab_geometry)è·é›¢ã€‚[UInt](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã¾ãŸã¯[Decimal](../data-types/decimal.md)。 + +**例** + +クエリ: + +```sql +SELECT L1Norm((1, 2)); +``` + +çµæžœ: + +```text +┌─L1Norm((1, 2))─┠+│ 3 │ +└────────────────┘ +``` + +## L2Norm + +ベクトル値ã®å¹³æ–¹å’Œã®å¹³æ–¹æ ¹ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +L2Norm(vector) +``` + +別å: `normL2`. + +**引数** + +- `vector` — [Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- L2-ノルムã¾ãŸã¯[ユークリッドè·é›¢](https://en.wikipedia.org/wiki/Euclidean_distance)。[Float](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT L2Norm((1, 2)); +``` + +çµæžœ: + +```text +┌───L2Norm((1, 2))─┠+│ 2.23606797749979 │ +└──────────────────┘ +``` + +## L2SquaredNorm + +ベクトル値ã®å¹³æ–¹å’Œã®å¹³æ–¹æ ¹ï¼ˆ[L2Norm](#l2norm))ã®å¹³æ–¹ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +L2SquaredNorm(vector) +``` + +別å: `normL2Squared`. + +***引数** + +- `vector` — [Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- L2-ノルムã®å¹³æ–¹ã€‚[Float](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT L2SquaredNorm((1, 2)); +``` + +çµæžœ: + +```text +┌─L2SquaredNorm((1, 2))─┠+│ 5 │ +└───────────────────────┘ +``` + +## LinfNorm + +ベクトルã®çµ¶å¯¾å€¤ã®æœ€å¤§å€¤ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +LinfNorm(vector) +``` + +別å: `normLinf`. + +**引数** + +- `vector` — [Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Linf-ノルムã¾ãŸã¯çµ¶å¯¾å€¤ã®æœ€å¤§å€¤ã€‚[Float](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT LinfNorm((1, -2)); +``` + +çµæžœ: + +```text +┌─LinfNorm((1, -2))─┠+│ 2 │ +└───────────────────┘ +``` + +## LpNorm + +ベクトル内ã®çµ¶å¯¾å€¤ã®åˆè¨ˆã‚’ `p` ä¹—ã—ãŸã‚‚ã®ã® `p` 乗根を計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +LpNorm(vector, p) +``` + +別å: `normLp`. + +**引数** + +- `vector` — [Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 +- `p` — 指数。å¯èƒ½ãªå€¤: [1; inf) ã®ç¯„囲ã®å®Ÿæ•°ã€‚[UInt](../data-types/int-uint.md) ã¾ãŸã¯ [Float](../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [Lp-ノルム](https://en.wikipedia.org/wiki/Norm_(mathematics)#p-norm)。[Float](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT LpNorm((1, -2), 2); +``` + +çµæžœ: + +```text +┌─LpNorm((1, -2), 2)─┠+│ 2.23606797749979 │ +└────────────────────┘ +``` + +## L1Distance + +2点間ã®è·é›¢ã‚’ `L1` 空間(1-ノルムã€[タクシー幾何学](https://en.wikipedia.org/wiki/Taxicab_geometry)è·é›¢ï¼‰ã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +L1Distance(vector1, vector2) +``` + +別å: `distanceL1`. + +**引数** + +- `vector1` — 第1ベクトル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 +- `vector2` — 第2ベクトル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 1-ノルムè·é›¢ã€‚[Float](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT L1Distance((1, 2), (2, 3)); +``` + +çµæžœ: + +```text +┌─L1Distance((1, 2), (2, 3))─┠+│ 2 │ +└────────────────────────────┘ +``` + +## L2Distance + +2点間ã®è·é›¢ã‚’ユークリッド空間([ユークリッドè·é›¢](https://en.wikipedia.org/wiki/Euclidean_distance))ã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +L2Distance(vector1, vector2) +``` + +別å: `distanceL2`. + +**引数** + +- `vector1` — 第1ベクトル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 +- `vector2` — 第2ベクトル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2-ノルムè·é›¢ã€‚[Float](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT L2Distance((1, 2), (2, 3)); +``` + +çµæžœ: + +```text +┌─L2Distance((1, 2), (2, 3))─┠+│ 1.4142135623730951 │ +└────────────────────────────┘ +``` + +## L2SquaredDistance + +2ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«ã®å¯¾å¿œã™ã‚‹è¦ç´ é–“ã®å·®ã®å¹³æ–¹å’Œã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +L2SquaredDistance(vector1, vector2) +``` + +別å: `distanceL2Squared`. + +**引数** + +- `vector1` — 第1ベクトル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 +- `vector2` — 第2ベクトル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«ã®å¯¾å¿œã™ã‚‹è¦ç´ é–“ã®å·®ã®å¹³æ–¹å’Œã€‚[Float](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT L2SquaredDistance([1, 2, 3], [0, 0, 0]) +``` + +çµæžœ: + +```response +┌─L2SquaredDistance([1, 2, 3], [0, 0, 0])─┠+│ 14 │ +└─────────────────────────────────────────┘ +``` + +## LinfDistance + +2点間ã®è·é›¢ã‚’ `L_{inf}` 空間([最大ノルム](https://en.wikipedia.org/wiki/Norm_(mathematics)#Maximum_norm_(special_case_of:_infinity_norm,_uniform_norm,_or_supremum_norm)))ã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +LinfDistance(vector1, vector2) +``` + +別å: `distanceLinf`. + +**引数** + +- `vector1` — 第1ベクトル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 +- `vector2` — 第2ベクトル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ç„¡é™ãƒŽãƒ«ãƒ è·é›¢ã€‚[Float](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT LinfDistance((1, 2), (2, 3)); +``` + +çµæžœ: + +```text +┌─LinfDistance((1, 2), (2, 3))─┠+│ 1 │ +└──────────────────────────────┘ +``` + +## LpDistance + +2点間ã®è·é›¢ã‚’ `Lp` 空間([p-ノルムè·é›¢](https://en.wikipedia.org/wiki/Norm_(mathematics)#p-norm))ã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +LpDistance(vector1, vector2, p) +``` + +別å: `distanceLp`. + +**引数** + +- `vector1` — 第1ベクトル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 +- `vector2` — 第2ベクトル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 +- `p` — 指数。å¯èƒ½ãªå€¤: [1;inf) ã®ç¯„囲ã®ä»»æ„ã®æ•°ã€‚[UInt](../data-types/int-uint.md) ã¾ãŸã¯ [Float](../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- p-ノルムè·é›¢ã€‚[Float](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT LpDistance((1, 2), (2, 3), 3); +``` + +çµæžœ: + +```text +┌─LpDistance((1, 2), (2, 3), 3)─┠+│ 1.2599210498948732 │ +└───────────────────────────────┘ +``` + +## L1Normalize + +指定ã•ã‚ŒãŸãƒ™ã‚¯ãƒˆãƒ«ã®å˜ä½ãƒ™ã‚¯ãƒˆãƒ«ã‚’ `L1` 空間([タクシー幾何学](https://en.wikipedia.org/wiki/Taxicab_geometry))ã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +L1Normalize(tuple) +``` + +別å: `normalizeL1`. + +**引数** + +- `tuple` — [Tuple](../data-types/tuple.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å˜ä½ãƒ™ã‚¯ãƒˆãƒ«ã€‚[Float](../data-types/float.md)ã®[Tuple](../data-types/tuple.md)。 + +**例** + +クエリ: + +```sql +SELECT L1Normalize((1, 2)); +``` + +çµæžœ: + +```text +┌─L1Normalize((1, 2))─────────────────────┠+│ (0.3333333333333333,0.6666666666666666) │ +└─────────────────────────────────────────┘ +``` + +## L2Normalize + +指定ã•ã‚ŒãŸãƒ™ã‚¯ãƒˆãƒ«ã®å˜ä½ãƒ™ã‚¯ãƒˆãƒ«ã‚’ユークリッド空間([ユークリッドè·é›¢](https://en.wikipedia.org/wiki/Euclidean_distance)を使用)ã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +L2Normalize(tuple) +``` + +別å: `normalizeL1`. + +**引数** + +- `tuple` — [Tuple](../data-types/tuple.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å˜ä½ãƒ™ã‚¯ãƒˆãƒ«ã€‚[Float](../data-types/float.md)ã®[Tuple](../data-types/tuple.md)。 + +**例** + +クエリ: + +```sql +SELECT L2Normalize((3, 4)); +``` + +çµæžœ: + +```text +┌─L2Normalize((3, 4))─┠+│ (0.6,0.8) │ +└─────────────────────┘ +``` + +## LinfNormalize + +指定ã•ã‚ŒãŸãƒ™ã‚¯ãƒˆãƒ«ã®å˜ä½ãƒ™ã‚¯ãƒˆãƒ«ã‚’ `L_{inf}` 空間([最大ノルム](https://en.wikipedia.org/wiki/Norm_(mathematics)#Maximum_norm_(special_case_of:_infinity_norm,_uniform_norm,_or_supremum_norm)を使用)ã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +LinfNormalize(tuple) +``` + +別å: `normalizeLinf `. + +**引数** + +- `tuple` — [Tuple](../data-types/tuple.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å˜ä½ãƒ™ã‚¯ãƒˆãƒ«ã€‚[Float](../data-types/float.md)ã®[Tuple](../data-types/tuple.md)。 + +**例** + +クエリ: + +```sql +SELECT LinfNormalize((3, 4)); +``` + +çµæžœ: + +```text +┌─LinfNormalize((3, 4))─┠+│ (0.75,1) │ +└───────────────────────┘ +``` + +## LpNormalize + +指定ã•ã‚ŒãŸãƒ™ã‚¯ãƒˆãƒ«ã®å˜ä½ãƒ™ã‚¯ãƒˆãƒ«ã‚’ `Lp` 空間([p-ノルム](https://en.wikipedia.org/wiki/Norm_(mathematics)#p-norm)を使用)ã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**構文** + +```sql +LpNormalize(tuple, p) +``` + +別å: `normalizeLp `. + +**引数** + +- `tuple` — [Tuple](../data-types/tuple.md)。 +- `p` — 指数。å¯èƒ½ãªå€¤: [1;inf) ã®ç¯„囲ã®ä»»æ„ã®æ•°ã€‚[UInt](../data-types/int-uint.md) ã¾ãŸã¯ [Float](../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å˜ä½ãƒ™ã‚¯ãƒˆãƒ«ã€‚[Float](../data-types/float.md)ã®[Tuple](../data-types/tuple.md)。 + +**例** + +クエリ: + +```sql +SELECT LpNormalize((3, 4),5); +``` + +çµæžœ: + +```text +┌─LpNormalize((3, 4), 5)──────────────────┠+│ (0.7187302630182624,0.9583070173576831) │ +└─────────────────────────────────────────┘ +``` + +## cosineDistance + +2ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«é–“ã®ã‚³ã‚µã‚¤ãƒ³è·é›¢ã‚’計算ã—ã¾ã™ï¼ˆã‚¿ãƒ—ルã®å€¤ã¯åº§æ¨™ã§ã™ï¼‰ã€‚è¿”ã•ã‚Œã‚‹å€¤ãŒå°ã•ã„ã»ã©ã€ãƒ™ã‚¯ãƒˆãƒ«ã¯é¡žä¼¼ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +cosineDistance(vector1, vector2) +``` + +**引数** + +- `vector1` — 第1タプル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 +- `vector2` — 第2タプル。[Tuple](../data-types/tuple.md) ã¾ãŸã¯ [Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2ã¤ã®ãƒ™ã‚¯ãƒˆãƒ«é–“ã®è§’度ã®ä½™å¼¦ã‚’1ã‹ã‚‰æ¸›ã˜ãŸã‚‚ã®ã€‚[Float](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT cosineDistance((1, 2), (2, 3)); +``` + +çµæžœ: + +```text +┌─cosineDistance((1, 2), (2, 3))─┠+│ 0.007722123286332261 │ +└────────────────────────────────┘ +``` + diff --git a/docs/ja/sql-reference/functions/encoding-functions.md b/docs/ja/sql-reference/functions/encoding-functions.md new file mode 100644 index 00000000000..b747069ac72 --- /dev/null +++ b/docs/ja/sql-reference/functions/encoding-functions.md @@ -0,0 +1,960 @@ +--- +slug: /ja/sql-reference/functions/encoding-functions +sidebar_position: 65 +sidebar_label: エンコーディング +--- + +# エンコーディング関数 + +## char + +渡ã•ã‚ŒãŸå¼•æ•°ã®æ•°ã‚’é•·ã•ã¨ã—ã€ãã‚Œãžã‚Œã®å¼•æ•°ã«å¯¾å¿œã™ã‚‹ãƒã‚¤ãƒˆå€¤ã‚’æŒã¤æ–‡å­—列を返ã—ã¾ã™ã€‚数値型ã®å¼•æ•°ã‚’複数å—ã‘å–ã‚Šã¾ã™ã€‚引数ã®å€¤ãŒ UInt8 データ型ã®ç¯„囲外ã§ã‚ã‚‹å ´åˆã¯ã€ä¸¸ã‚やオーãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€UInt8 ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +char(number_1, [number_2, ..., number_n]); +``` + +**引数** + +- `number_1, number_2, ..., number_n` — æ•´æ•°ã¨ã—ã¦è§£é‡ˆã•ã‚Œã‚‹æ•°å€¤å¼•æ•°ã€‚åž‹: [Int](../data-types/int-uint.md), [Float](../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒã‚¤ãƒˆã®æ–‡å­—列。[String](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT char(104.1, 101, 108.9, 108.9, 111) AS hello; +``` + +çµæžœ: + +``` text +┌─hello─┠+│ hello │ +└───────┘ +``` + +対応ã™ã‚‹ãƒã‚¤ãƒˆã‚’渡ã—ã¦ä»»æ„ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®æ–‡å­—列を構築ã§ãã¾ã™ã€‚UTF-8ã®ä¾‹ãŒã“ã“ã«ã‚ã‚Šã¾ã™: + +クエリ: + +``` sql +SELECT char(0xD0, 0xBF, 0xD1, 0x80, 0xD0, 0xB8, 0xD0, 0xB2, 0xD0, 0xB5, 0xD1, 0x82) AS hello; +``` + +çµæžœ: + +``` text +┌─hello──┠+│ привет │ +└────────┘ +``` + +クエリ: + +``` sql +SELECT char(0xE4, 0xBD, 0xA0, 0xE5, 0xA5, 0xBD) AS hello; +``` + +çµæžœ: + +``` text +┌─hello─┠+│ 你好 │ +└───────┘ +``` + +## hex + +引数ã®16進数表ç¾ã‚’å«ã‚€æ–‡å­—列を返ã—ã¾ã™ã€‚ + +別å: `HEX`. + +**構文** + +``` sql +hex(arg) +``` + +ã“ã®é–¢æ•°ã¯å¤§æ–‡å­—ã® `A-F` を使用ã—ã€æŽ¥é ­è¾žï¼ˆä¾‹ãˆã° `0x`)や接尾辞(例ãˆã° `h`)ã¯ä½¿ç”¨ã—ã¾ã›ã‚“。 + +整数引数ã®å ´åˆã€é‡å¤§ãªæ¡ã‹ã‚‰æœ€å°æ¡ã¾ã§ã®16進数ã®æ•°å­—("ニブル")をå°åˆ·ã—ã¾ã™ï¼ˆãƒ“ッグエンディアンã¾ãŸã¯ã€Œäººé–“ãŒèª­ã‚ã‚‹ã€é †åºï¼‰ã€‚最もé‡è¦ãªéžã‚¼ãƒ­ãƒã‚¤ãƒˆã‹ã‚‰å§‹ã‚ã¾ã™ï¼ˆãƒªãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚¼ãƒ­ãƒã‚¤ãƒˆã¯çœç•¥ã•ã‚Œã¾ã™ï¼‰ãŒã€å„ãƒã‚¤ãƒˆã®å…ˆè¡Œã‚¼ãƒ­ã®æ¡ãŒã‚¼ãƒ­ã§ã‚ã£ã¦ã‚‚常ã«ä¸¡æ–¹ã®æ¡ã‚’å°åˆ·ã—ã¾ã™ã€‚ + +åž‹ [Date](../data-types/date.md) ãŠã‚ˆã³ [DateTime](../data-types/datetime.md) ã®å€¤ã¯ã€å¯¾å¿œã™ã‚‹æ•´æ•°ã¨ã—ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¾ã™ï¼ˆDate ã®å ´åˆã¯ã‚¨ãƒãƒƒã‚¯ä»¥é™ã®æ—¥æ•°ã€DateTime ã®å ´åˆã¯Unix タイムスタンプã®å€¤ï¼‰ã€‚ + +[String](../data-types/string.md) ãŠã‚ˆã³ [FixedString](../data-types/fixedstring.md) ã®å ´åˆã€ã™ã¹ã¦ã®ãƒã‚¤ãƒˆãŒ2ã¤ã®16進数ã¨ã—ã¦å˜ç´”ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ゼロãƒã‚¤ãƒˆã¯çœç•¥ã•ã‚Œã¾ã›ã‚“。 + +åž‹ [Float](../data-types/float.md) ãŠã‚ˆã³ [Decimal](../data-types/decimal.md) ã®å€¤ã¯ã€ãƒ¡ãƒ¢ãƒªå†…ã§ã®è¡¨ç¾ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚リトルエンディアンアーキテクãƒãƒ£ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹ãŸã‚ã€ãƒªãƒˆãƒ«ã‚¨ãƒ³ãƒ‡ã‚£ã‚¢ãƒ³ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ゼロã®ãƒªãƒ¼ãƒ‡ã‚£ãƒ³ã‚°/トレーリングãƒã‚¤ãƒˆã¯çœç•¥ã•ã‚Œã¾ã›ã‚“。 + +åž‹ [UUID](../data-types/uuid.md) ã®å€¤ã¯ã€ãƒ“ッグエンディアン順åºã®æ–‡å­—列ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +**引数** + +- `arg` — 16進数ã«å¤‰æ›ã™ã‚‹å€¤ã€‚åž‹: [String](../data-types/string.md), [UInt](../data-types/int-uint.md), [Float](../data-types/float.md), [Decimal](../data-types/decimal.md), [Date](../data-types/date.md) ã‚‚ã—ã㯠[DateTime](../data-types/datetime.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®16進数表ç¾ã‚’æŒã¤æ–‡å­—列。[String](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT hex(1); +``` + +çµæžœ: + +``` text +01 +``` + +クエリ: + +``` sql +SELECT hex(toFloat32(number)) AS hex_presentation FROM numbers(15, 2); +``` + +çµæžœ: + +``` text +┌─hex_presentation─┠+│ 00007041 │ +│ 00008041 │ +└──────────────────┘ +``` + +クエリ: + +``` sql +SELECT hex(toFloat64(number)) AS hex_presentation FROM numbers(15, 2); +``` + +çµæžœ: + +``` text +┌─hex_presentation─┠+│ 0000000000002E40 │ +│ 0000000000003040 │ +└──────────────────┘ +``` + +クエリ: + +``` sql +SELECT lower(hex(toUUID('61f0c404-5cb3-11e7-907b-a6006ad3dba0'))) as uuid_hex +``` + +çµæžœ: + +``` text +┌─uuid_hex─────────────────────────┠+│ 61f0c4045cb311e7907ba6006ad3dba0 │ +└──────────────────────────────────┘ +``` + +## unhex + +[hex](#hex) ã®å対ã®æ“作を行ã„ã¾ã™ã€‚引数内ã®å„ペアã®16進数ã®æ•°å­—を数値ã¨ã—ã¦è§£é‡ˆã—ã€ãã®æ•°å€¤ã‚’表ã™ãƒã‚¤ãƒˆã«å¤‰æ›ã—ã¾ã™ã€‚è¿”ã•ã‚Œã‚‹å€¤ã¯ãƒã‚¤ãƒŠãƒªæ–‡å­—列(BLOB)ã§ã™ã€‚ + +çµæžœã‚’数値ã«å¤‰æ›ã—ãŸã„å ´åˆã¯ã€[reverse](../../sql-reference/functions/string-functions.md#reverse) ãŠã‚ˆã³ [reinterpretAs<Type>](../../sql-reference/functions/type-conversion-functions.md#type-conversion-functions) 関数を使用ã§ãã¾ã™ã€‚ + +:::note +`unhex`ãŒ`clickhouse-client`内ã‹ã‚‰å‘¼ã³å‡ºã•ã‚ŒãŸå ´åˆã€ãƒã‚¤ãƒŠãƒªæ–‡å­—列ã¯UTF-8を使用ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ +::: + +別å: `UNHEX`. + +**構文** + +``` sql +unhex(arg) +``` + +**引数** + +- `arg` — 16進数ã®æ•°å­—ã‚’å«ã‚€æ–‡å­—列。[String](../data-types/string.md), [FixedString](../data-types/fixedstring.md)。 + +大文字ã¨å°æ–‡å­—ã®ä¸¡æ–¹ã®`A-F`をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚16進数ã®æ¡æ•°ã¯å¶æ•°ã§ã‚ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。奇数ã®å ´åˆã€æœ€å¾Œã®æ¡ã¯`00-0F`ãƒã‚¤ãƒˆã®æœ€ä¸‹ä½åŠåˆ†ã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚引数文字列ã«16進数ã®æ•°å­—以外ã®ã‚‚ã®ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€å®Ÿè£…定義ã®çµæžœãŒè¿”ã•ã‚Œã¾ã™ï¼ˆä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã›ã‚“)。数値引数ã®å ´åˆã€hex(N)ã®é€†ã¯unhex()ã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã¾ã›ã‚“。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒã‚¤ãƒŠãƒªæ–‡å­—列(BLOB)。[String](../data-types/string.md)。 + +**例** + +クエリ: +``` sql +SELECT unhex('303132'), UNHEX('4D7953514C'); +``` + +çµæžœ: +``` text +┌─unhex('303132')─┬─unhex('4D7953514C')─┠+│ 012 │ MySQL │ +└─────────────────┴─────────────────────┘ +``` + +クエリ: + +``` sql +SELECT reinterpretAsUInt64(reverse(unhex('FFF'))) AS num; +``` + +çµæžœ: + +``` text +┌──num─┠+│ 4095 │ +└──────┘ +``` + +## bin + +引数ã®ãƒã‚¤ãƒŠãƒªè¡¨ç¾ã‚’å«ã‚€æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +bin(arg) +``` + +別å: `BIN`. + +整数引数ã®å ´åˆã€é‡å¤§ãªæ¡ã‹ã‚‰æœ€å°æ¡ã¾ã§ã®binã®æ•°å­—ã‚’å°åˆ·ã—ã¾ã™ï¼ˆãƒ“ッグエンディアンã¾ãŸã¯ã€Œäººé–“ãŒèª­ã‚ã‚‹ã€é †åºï¼‰ã€‚最もé‡è¦ãªéžã‚¼ãƒ­ãƒã‚¤ãƒˆã‹ã‚‰å§‹ã‚ã¾ã™ï¼ˆãƒªãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚¼ãƒ­ãƒã‚¤ãƒˆã¯çœç•¥ã•ã‚Œã¾ã™ï¼‰ãŒã€å„ãƒã‚¤ãƒˆã®å…ˆè¡Œã‚¼ãƒ­ã®æ¡ãŒã‚¼ãƒ­ã§ã‚ã£ã¦ã‚‚常ã«8æ¡ã‚’å°åˆ·ã—ã¾ã™ã€‚ + +åž‹ [Date](../data-types/date.md) ãŠã‚ˆã³ [DateTime](../data-types/datetime.md) ã®å€¤ã¯ã€å¯¾å¿œã™ã‚‹æ•´æ•°ã¨ã—ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¾ã™ï¼ˆDate ã®å ´åˆã¯ã‚¨ãƒãƒƒã‚¯ä»¥é™ã®æ—¥æ•°ã€DateTime ã®å ´åˆã¯ Unix タイムスタンプã®å€¤ï¼‰ã€‚ + +[String](../data-types/string.md) ãŠã‚ˆã³ [FixedString](../data-types/fixedstring.md) ã®å ´åˆã€ã™ã¹ã¦ã®ãƒã‚¤ãƒˆãŒ8ã¤ã®ãƒã‚¤ãƒŠãƒªæ•°å€¤ã¨ã—ã¦å˜ç´”ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ゼロãƒã‚¤ãƒˆã¯çœç•¥ã•ã‚Œã¾ã›ã‚“。 + +åž‹ [Float](../data-types/float.md) ãŠã‚ˆã³ [Decimal](../data-types/decimal.md) ã®å€¤ã¯ã€ãƒ¡ãƒ¢ãƒªå†…ã§ã®è¡¨ç¾ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚リトルエンディアンアーキテクãƒãƒ£ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹ãŸã‚ã€ãƒªãƒˆãƒ«ã‚¨ãƒ³ãƒ‡ã‚£ã‚¢ãƒ³ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ゼロã®ãƒªãƒ¼ãƒ‡ã‚£ãƒ³ã‚°/トレーリングãƒã‚¤ãƒˆã¯çœç•¥ã•ã‚Œã¾ã›ã‚“。 + +åž‹ [UUID](../data-types/uuid.md) ã®å€¤ã¯ã€ãƒ“ッグエンディアン順åºã®æ–‡å­—列ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +**引数** + +- `arg` — ãƒã‚¤ãƒŠãƒªã«å¤‰æ›ã™ã‚‹å€¤ã€‚[String](../data-types/string.md), [FixedString](../data-types/fixedstring.md), [UInt](../data-types/int-uint.md), [Float](../data-types/float.md), [Decimal](../data-types/decimal.md), [Date](../data-types/date.md) ã‚‚ã—ã㯠[DateTime](../data-types/datetime.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®ãƒã‚¤ãƒŠãƒªè¡¨ç¾ã‚’æŒã¤æ–‡å­—列。[String](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT bin(14); +``` + +çµæžœ: + +``` text +┌─bin(14)──┠+│ 00001110 │ +└──────────┘ +``` + +クエリ: + +``` sql +SELECT bin(toFloat32(number)) AS bin_presentation FROM numbers(15, 2); +``` + +çµæžœ: + +``` text +┌─bin_presentation─────────────────┠+│ 00000000000000000111000001000001 │ +│ 00000000000000001000000001000001 │ +└──────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT bin(toFloat64(number)) AS bin_presentation FROM numbers(15, 2); +``` + +çµæžœ: + +``` text +┌─bin_presentation─────────────────────────────────────────────────┠+│ 0000000000000000000000000000000000000000000000000010111001000000 │ +│ 0000000000000000000000000000000000000000000000000011000001000000 │ +└──────────────────────────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT bin(toUUID('61f0c404-5cb3-11e7-907b-a6006ad3dba0')) as bin_uuid +``` + +çµæžœ: + +``` text +┌─bin_uuid─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ 01100001111100001100010000000100010111001011001100010001111001111001000001111011101001100000000001101010110100111101101110100000 │ +└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## unbin + +引数内ã®å„ペアã®ãƒã‚¤ãƒŠãƒªæ•°å­—を数値ã¨ã—ã¦è§£é‡ˆã—ã€ãã®æ•°å€¤ã‚’表ã™ãƒã‚¤ãƒˆã«å¤‰æ›ã—ã¾ã™ã€‚関数㯠[bin](#bin) ã®é€†ã®æ“作を行ã„ã¾ã™ã€‚ + +**構文** + +``` sql +unbin(arg) +``` + +別å: `UNBIN`. + +数値引数ã«ã¤ã„㦠`unbin()` 㯠`bin()` ã®é€†ã‚’è¿”ã—ã¾ã›ã‚“。çµæžœã‚’数値ã«å¤‰æ›ã—ãŸã„å ´åˆã¯ã€[reverse](../../sql-reference/functions/string-functions.md#reverse) ãŠã‚ˆã³ [reinterpretAs<Type>](../../sql-reference/functions/type-conversion-functions.md#reinterpretasuint8163264) 関数を使用ã§ãã¾ã™ã€‚ + +:::note +`unbin`ãŒ`clickhouse-client`内ã‹ã‚‰å‘¼ã³å‡ºã•ã‚ŒãŸå ´åˆã€ãƒã‚¤ãƒŠãƒªæ–‡å­—列ã¯UTF-8を使用ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ +::: + +ãƒã‚¤ãƒŠãƒªæ•°å­—`0`ã¨`1`をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ãƒã‚¤ãƒŠãƒªæ•°å­—ã®æ•°ãŒ8ã®å€æ•°ã§ã‚ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。引数文字列ã«ãƒã‚¤ãƒŠãƒªæ•°å­—以外ã®ã‚‚ã®ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€å®Ÿè£…定義ã®çµæžœãŒè¿”ã•ã‚Œã¾ã™ï¼ˆä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã›ã‚“)。 + +**引数** + +- `arg` — ãƒã‚¤ãƒŠãƒªæ•°å­—ã‚’å«ã‚€æ–‡å­—列。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒã‚¤ãƒŠãƒªæ–‡å­—列(BLOB)。[String](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT UNBIN('001100000011000100110010'), UNBIN('0100110101111001010100110101000101001100'); +``` + +çµæžœ: + +``` text +┌─unbin('001100000011000100110010')─┬─unbin('0100110101111001010100110101000101001100')─┠+│ 012 │ MySQL │ +└───────────────────────────────────┴───────────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT reinterpretAsUInt64(reverse(unbin('1110'))) AS num; +``` + +çµæžœ: + +``` text +┌─num─┠+│ 14 │ +└─────┘ +``` + +## bitmaskToList(num) + +æ•´æ•°ã‚’å—ã‘å–ã‚Šã€å…ƒã®æ•°å€¤ã‚’åˆè¨ˆã—ãŸã¨ãã«æ§‹æˆã™ã‚‹2ã®ç´¯ä¹—ã®ä¸€è¦§ã‚’å«ã‚€æ–‡å­—列を返ã—ã¾ã™ã€‚コンマã§åŒºåˆ‡ã‚‰ã‚Œã¦ã‚¹ãƒšãƒ¼ã‚¹ãŒãªãã€ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ã§ã¯æ˜‡é †ã§ã™ã€‚ + +## bitmaskToArray(num) + +æ•´æ•°ã‚’å—ã‘å–ã‚Šã€å…ƒã®æ•°å€¤ã‚’åˆè¨ˆã—ãŸã¨ãã«æ§‹æˆã™ã‚‹2ã®ç´¯ä¹—ã®ä¸€è¦§ã‚’å«ã‚€ `UInt64` 数値ã®é…列を返ã—ã¾ã™ã€‚é…列内ã®æ•°å€¤ã¯æ˜‡é †ã§ã™ã€‚ + +## bitPositionsToArray(num) + +æ•´æ•°ã‚’å—ã‘å–ã‚Šã€ãれを符å·ãªã—æ•´æ•°ã«å¤‰æ›ã—ã¾ã™ã€‚`arg`ã®ãƒ“ットã®ä½ç½®ã§`1`ã¨ç­‰ã—ã„ã‚‚ã®ã®ä¸€è¦§ã‚’å«ã‚€`UInt64` 数値ã®é…列を昇順ã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +bitPositionsToArray(arg) +``` + +**引数** + +- `arg` — 整数値。[Int/UInt](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `1`ã¨ç­‰ã—ã„ビットã®ä½ç½®ã®ä¸€è¦§ã‚’å«ã‚€é…列をã€æ˜‡é †ã§ã€‚[Array](../data-types/array.md)([UInt64](../data-types/int-uint.md))。 + +**例** + +クエリ: + +``` sql +SELECT bitPositionsToArray(toInt8(1)) AS bit_positions; +``` + +çµæžœ: + +``` text +┌─bit_positions─┠+│ [0] │ +└───────────────┘ +``` + +クエリ: + +``` sql +SELECT bitPositionsToArray(toInt8(-1)) AS bit_positions; +``` + +çµæžœ: + +``` text +┌─bit_positions─────┠+│ [0,1,2,3,4,5,6,7] │ +└───────────────────┘ +``` + +## mortonEncode + +符å·ãªã—æ•´æ•°ã®ãƒªã‚¹ãƒˆã«å¯¾ã—ã¦ãƒ¢ãƒ¼ãƒˆãƒ³ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ï¼ˆZCurve)を計算ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã«ã¯2ã¤ã®æ“作モードãŒã‚ã‚Šã¾ã™: +- シンプル +- æ‹¡å¼µ + +### シンプルモード + +引数ã¨ã—ã¦æœ€å¤§8ã¤ã®ç¬¦å·ãªã—æ•´æ•°ã‚’å—ã‘å–ã‚Šã€`UInt64` コードを生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +mortonEncode(args) +``` + +**パラメータ** + +- `args`: 最大8ã¤ã®[符å·ãªã—æ•´æ•°](../data-types/int-uint.md)ã¾ãŸã¯ãã‚Œã«é–¢é€£ã™ã‚‹åž‹ã®ã‚«ãƒ©ãƒ ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `UInt64` コード。[UInt64](../data-types/int-uint.md) + +**例** + +クエリ: + +```sql +SELECT mortonEncode(1, 2, 3); +``` + +çµæžœ: + +```response +53 +``` + +### 拡張モード + +最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ¬ãƒ³ã‚¸ãƒžã‚¹ã‚¯ï¼ˆ[タプル](../data-types/tuple.md))をå—ã‘å–ã‚Šã€ä»–ã®å¼•æ•°ã¨ã—ã¦æœ€å¤§8ã¤ã®[符å·ãªã—æ•´æ•°](../data-types/int-uint.md)ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ + +マスク内ã®å„数値ã¯ã€ç¯„囲展開ã®é‡ã‚’設定ã—ã¾ã™:
    +1 - æ‹¡å¼µãªã—
    +2 - 2å€æ‹¡å¼µ
    +3 - 3å€æ‹¡å¼µ
    +...
    +最大8å€æ‹¡å¼µã€‚
    + +**構文** + +```sql +mortonEncode(range_mask, args) +``` + +**パラメータ** +- `range_mask`: 1-8。 +- `args`: 最大8ã¤ã®[符å·ãªã—æ•´æ•°](../data-types/int-uint.md)ã¾ãŸã¯ãã‚Œã«é–¢é€£ã™ã‚‹åž‹ã®ã‚«ãƒ©ãƒ ã€‚ + +注: `args`ã«ã‚«ãƒ©ãƒ ã‚’使用ã™ã‚‹å ´åˆã€æä¾›ã•ã‚ŒãŸ`range_mask`タプルã¯ä¾ç„¶ã¨ã—ã¦å®šæ•°ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `UInt64` コード。[UInt64](../data-types/int-uint.md) + +**例** + +例ãˆã°ã€ç•°ãªã‚‹ç¯„囲やカーディナリティをæŒã¤å¼•æ•°ã«å¯¾ã—ã¦ã€é¡žä¼¼ã®åˆ†å¸ƒãŒå¿…è¦ãªå ´åˆã«ç¯„囲拡張ãŒæœ‰ç”¨ã§ã™ã€‚ 例ãˆã°ã€'IPアドレス' (0...FFFFFFFF) 㨠'国コード' (0...FF) ã®å ´åˆã€‚ + +クエリ: + +```sql +SELECT mortonEncode((1,2), 1024, 16); +``` + +çµæžœ: + +```response +1572864 +``` + +注: タプルã®ã‚µã‚¤ã‚ºã¯ä»–ã®å¼•æ•°ã®æ•°ã¨ç­‰ã—ããªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**例** + +1ã¤ã®å¼•æ•°ã«å¯¾ã™ã‚‹ãƒ¢ãƒ¼ãƒˆãƒ³ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã¯å¸¸ã«è‡ªèº«ã¨ãªã‚Šã¾ã™ï¼š + +クエリ: + +```sql +SELECT mortonEncode(1); +``` + +çµæžœ: + +```response +1 +``` + +**例** + +一ã¤ã®å¼•æ•°ã‚’æ‹¡å¼µã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +クエリ: + +```sql +SELECT mortonEncode(tuple(2), 128); +``` + +çµæžœ: + +```response +32768 +``` + +**例** + +関数内ã§ã‚«ãƒ©ãƒ åを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +クエリ: + +ã¾ãšãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ã€‚ + +```sql +create table morton_numbers( + n1 UInt32, + n2 UInt32, + n3 UInt16, + n4 UInt16, + n5 UInt8, + n6 UInt8, + n7 UInt8, + n8 UInt8 +) +Engine=MergeTree() +ORDER BY n1 SETTINGS index_granularity = 8192, index_granularity_bytes = '10Mi'; +insert into morton_numbers (*) values(1,2,3,4,5,6,7,8); +``` +カラムåを使用ã—ã¦`mortonEncode`ã®é–¢æ•°å¼•æ•°ã¨ã—ã¦å®šæ•°ã®ä»£ã‚ã‚Šã«ä½¿ç”¨ + +クエリ: + +```sql +SELECT mortonEncode(n1, n2, n3, n4, n5, n6, n7, n8) FROM morton_numbers; +``` + +çµæžœ: + +```response +2155374165 +``` + +**実装ã®è©³ç´°** + +`UInt64`ã®ãƒ¢ãƒ¼ãƒˆãƒ³ã‚³ãƒ¼ãƒ‰ã«ã¯æƒ…å ±ã®ãƒ“ット数ãŒåˆ¶é™ã•ã‚Œã¾ã™ã€‚2ã¤ã®å¼•æ•°ã¯å„引数ã®æœ€å¤§ç¯„囲ãŒ2^32(64/2)ã§ã™ã€‚3ã¤ã®å¼•æ•°ã«ã¯æœ€å¤§ç¯„囲ãŒ2^21(64/3)ã§ã™ã€‚ã™ã¹ã¦ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¯ã‚¼ãƒ­ã«ã‚¯ãƒªãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ + +## mortonDecode + +モートンエンコーディング(ZCurve)を符å·ãªã—æ•´æ•°ã®çµ„ã«ãƒ‡ã‚³ãƒ¼ãƒ‰ã—ã€å¯¾å¿œã™ã‚‹åº§æ¨™ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã«ã‚‚ `mortonEncode` 関数ã¨åŒæ§˜ã«2ã¤ã®æ“作モードãŒã‚ã‚Šã¾ã™: +- シンプル +- æ‹¡å¼µ + +### シンプルモード + +最åˆã®å¼•æ•°ã¨ã—ã¦çµæžœã®ã‚¿ãƒ—ルサイズをå—ã‘å–ã‚Šã€ç¬¬2引数ã¨ã—ã¦ã‚³ãƒ¼ãƒ‰ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +mortonDecode(tuple_size, code) +``` + +**パラメータ** +- `tuple_size`: 8以下ã®æ•´æ•°å€¤ã€‚ +- `code`: [UInt64](../data-types/int-uint.md) コード。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸã‚µã‚¤ã‚ºã®[タプル](../data-types/tuple.md)。[UInt64](../data-types/int-uint.md) + +**例** + +クエリ: + +```sql +SELECT mortonDecode(3, 53); +``` + +çµæžœ: + +```response +["1","2","3"] +``` + +### 拡張モード + +最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ¬ãƒ³ã‚¸ãƒžã‚¹ã‚¯ï¼ˆã‚¿ãƒ—ル)をå—ã‘å–ã‚Šã€ç¬¬2引数ã¨ã—ã¦ã‚³ãƒ¼ãƒ‰ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ +マスク内ã®å„数値ã¯ã€å¯¾å¿œã™ã‚‹å¼•æ•°ã‚’範囲内ã§å®Ÿè³ªçš„ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã™ã‚‹ãŸã‚ã«å·¦ã‚·ãƒ•ãƒˆã•ã‚Œã‚‹ãƒ“ット数を設定ã—ã¾ã™ã€‚ + +ä¼¼ãŸã‚ˆã†ãªç¯„囲やカーディナリティをæŒã¤å¼•æ•°ã«å¯¾ã—ã¦ã¯ã€ç¯„囲拡張ãŒæœ‰ç›Šã§ã™ã€‚ +ãŸã¨ãˆã°ã€'IPアドレス' (0...FFFFFFFF) ãŠã‚ˆã³ '国コード' (0...FF)。 +エンコード関数ã¨åŒæ§˜ã«ã€æœ€å¤§8ã¤ã®æ•°å€¤ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**例** + +1ã¤ã®å¼•æ•°ã«å¯¾ã™ã‚‹ãƒ¢ãƒ¼ãƒˆãƒ³ã‚³ãƒ¼ãƒ‰ã¯å¸¸ã«è‡ªèº«ã®å¼•æ•°ã¨ãªã‚Šã¾ã™ï¼ˆã‚¿ãƒ—ル)。 + +クエリ: + +```sql +SELECT mortonDecode(1, 1); +``` + +çµæžœ: + +```response +["1"] +``` + +**例** + +1ã¤ã®å¼•æ•°ãŒãƒ“ットシフトを指定ã™ã‚‹ã‚¿ãƒ—ルã¨ä¸€ç·’ã«æä¾›ã•ã‚ŒãŸå ´åˆã€é–¢æ•°ã¯ã“ã®å¼•æ•°ã‚’指定ã•ã‚ŒãŸãƒ“ット数ã ã‘å³ã‚·ãƒ•ãƒˆã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT mortonDecode(tuple(2), 32768); +``` + +çµæžœ: + +```response +["128"] +``` + +**例** + +関数ã¯ã‚»ã‚«ãƒ³ãƒ‰å¼•æ•°ã¨ã—ã¦ã‚³ãƒ¼ãƒ‰ã®ã‚«ãƒ©ãƒ ã‚’å—ã‘付ã‘ã¾ã™: + +ã¾ãšãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ã€‚ + +クエリ: +```sql +create table morton_numbers( + n1 UInt32, + n2 UInt32, + n3 UInt16, + n4 UInt16, + n5 UInt8, + n6 UInt8, + n7 UInt8, + n8 UInt8 +) +Engine=MergeTree() +ORDER BY n1 SETTINGS index_granularity = 8192, index_granularity_bytes = '10Mi'; +insert into morton_numbers (*) values(1,2,3,4,5,6,7,8); +``` +カラムåを使用ã—ã¦`mortonDecode`ã®é–¢æ•°å¼•æ•°ã¨ã—ã¦å®šæ•°ã®ä»£ã‚ã‚Šã«ä½¿ç”¨ + +クエリ: + +```sql +select untuple(mortonDecode(8, mortonEncode(n1, n2, n3, n4, n5, n6, n7, n8))) from morton_numbers; +``` + +çµæžœ: + +```response +1 2 3 4 5 6 7 8 +``` + +## hilbertEncode + +ヒルベルト曲線ã®ã‚³ãƒ¼ãƒ‰ã‚’符å·ãªã—æ•´æ•°ã®ãƒªã‚¹ãƒˆã«å¯¾ã—ã¦è¨ˆç®—ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯2ã¤ã®æ“作モードをæŒã¡ã¾ã™: +- シンプル +- æ‹¡å¼µ + +### シンプルモード + +引数ã¨ã—ã¦æœ€å¤§2ã¤ã®ç¬¦å·ãªã—æ•´æ•°ã‚’å—ã‘å–ã‚Šã€`UInt64` コードを生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +hilbertEncode(args) +``` + +**パラメータ** + +- `args`: 最大2ã¤ã®[符å·ãªã—æ•´æ•°](../../sql-reference/data-types/int-uint.md)ã¾ãŸã¯ãã‚Œã«é–¢é€£ã™ã‚‹åž‹ã®ã‚«ãƒ©ãƒ ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `UInt64` コード + +åž‹: [UInt64](../../sql-reference/data-types/int-uint.md) + +**例** + +クエリ: + +```sql +SELECT hilbertEncode(3, 4); +``` +çµæžœ: + +```response +31 +``` + +### 拡張モード + +最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ¬ãƒ³ã‚¸ãƒžã‚¹ã‚¯ï¼ˆ[タプル](../../sql-reference/data-types/tuple.md))をå—ã‘å–ã‚Šã€ä»–ã®å¼•æ•°ã¨ã—ã¦æœ€å¤§2ã¤ã®[符å·ãªã—æ•´æ•°](../../sql-reference/data-types/int-uint.md)ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ + +マスク内ã®å„数値ã¯ã€å¯¾å¿œã™ã‚‹å¼•æ•°ã‚’å·¦ã«ã‚·ãƒ•ãƒˆã™ã‚‹ãƒ“ット数を設定ã—ã€å®Ÿè³ªçš„ã«ãã®ç¯„囲内ã§å¼•æ•°ã‚’スケーリングã—ã¾ã™ã€‚ + +**構文** + +```sql +hilbertEncode(range_mask, args) +``` + +**パラメータ** +- `range_mask`: ([タプル](../../sql-reference/data-types/tuple.md)) +- `args`: 最大2ã¤ã®[符å·ãªã—æ•´æ•°](../../sql-reference/data-types/int-uint.md)ã¾ãŸã¯ãã‚Œã«é–¢é€£ã™ã‚‹åž‹ã®ã‚«ãƒ©ãƒ ã€‚ + +注: `args`ã«ã‚«ãƒ©ãƒ ã‚’使用ã™ã‚‹å ´åˆã€æä¾›ã•ã‚ŒãŸ`range_mask`タプルã¯ä¾ç„¶ã¨ã—ã¦å®šæ•°ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `UInt64` コード + +åž‹: [UInt64](../../sql-reference/data-types/int-uint.md) + +**例** + +例ãˆã°ã€ç•°ãªã‚‹ç¯„囲やカーディナリティをæŒã¤å¼•æ•°ã«å¯¾ã—ã¦ã€é¡žä¼¼ã®åˆ†å¸ƒãŒå¿…è¦ãªå ´åˆã«ç¯„囲拡張ãŒæœ‰ç”¨ã§ã™ã€‚ 例ãˆã°ã€'IPアドレス' (0...FFFFFFFF) 㨠'国コード' (0...FF) ã®å ´åˆã€‚ + +クエリ: + +```sql +SELECT hilbertEncode((10,6), 1024, 16); +``` + +çµæžœ: + +```response +4031541586602 +``` + +注: タプルã®ã‚µã‚¤ã‚ºã¯ä»–ã®å¼•æ•°ã®æ•°ã¨ç­‰ã—ããªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**例** + +å˜ä¸€ã®å¼•æ•°ã«å¯¾ã—ã¦ã‚¿ãƒ—ルを指定ã—ãªã„å ´åˆã€é–¢æ•°ã¯ãƒ’ルベルトインデックスã¨ã—ã¦è‡ªèº«ã®å¼•æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT hilbertEncode(1); +``` + +çµæžœ: + +```response +1 +``` + +**例** + +å˜ä¸€ã®å¼•æ•°ãŒãƒ“ットシフトを指定ã™ã‚‹ã‚¿ãƒ—ルã¨å…±ã«æä¾›ã•ã‚ŒãŸå ´åˆã€é–¢æ•°ã¯ã“ã®å¼•æ•°ã‚’指定ã•ã‚ŒãŸãƒ“ット数ã ã‘左シフトã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT hilbertEncode(tuple(2), 128); +``` + +çµæžœ: + +```response +512 +``` + +**例** + +ã“ã®é–¢æ•°ã¯ã‚«ãƒ©ãƒ ã¨ã—ã¦ã®å¼•æ•°ã‚‚å—ã‘入れã¾ã™: + +クエリ: + +ã¾ãšãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ã€‚ + +```sql +create table hilbert_numbers( + n1 UInt32, + n2 UInt32 +) +Engine=MergeTree() +ORDER BY n1 SETTINGS index_granularity = 8192, index_granularity_bytes = '10Mi'; +insert into hilbert_numbers (*) values(1,2); +``` +カラムåを使用ã—ã¦`hilbertEncode`ã®é–¢æ•°å¼•æ•°ã¨ã—ã¦å®šæ•°ã®ä»£ã‚ã‚Šã«ä½¿ç”¨ + +クエリ: + +```sql +SELECT hilbertEncode(n1, n2) FROM hilbert_numbers; +``` + +çµæžœ: + +```response +13 +``` + +**実装ã®è©³ç´°** + +`UInt64` ã® Hilbert コードã«ã¯æƒ…å ±ã®ãƒ“ット数ãŒåˆ¶é™ã•ã‚Œã¾ã™ã€‚2ã¤ã®å¼•æ•°ã¯å„引数ã®æœ€å¤§ç¯„囲ãŒ2^32(64/2)ã§ã™ã€‚ã™ã¹ã¦ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¯ã‚¼ãƒ­ã«ã‚¯ãƒªãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ + +## hilbertDecode + +ヒルベルト曲線インデックスを符å·ãªã—æ•´æ•°ã®ã‚¿ãƒ—ルã«ãƒ‡ã‚³ãƒ¼ãƒ‰ã—ã€ãƒžãƒ«ãƒæ¬¡å…ƒç©ºé–“ã®åº§æ¨™ã‚’表ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã«ã‚‚ `hilbertEncode` 関数ã¨åŒæ§˜ã«2ã¤ã®æ“作モードãŒã‚ã‚Šã¾ã™: +- シンプル +- æ‹¡å¼µ + +### シンプルモード + +最大2ã¤ã®ç¬¦å·ãªã—整数を引数ã¨ã—ã¦å—ã‘å–ã‚Šã€`UInt64` コードを生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +hilbertDecode(tuple_size, code) +``` + +**パラメータ** +- `tuple_size`: 2以下ã®æ•´æ•°å€¤ã€‚ +- `code`: [UInt64](../../sql-reference/data-types/int-uint.md) コード。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸã‚µã‚¤ã‚ºã®[タプル](../../sql-reference/data-types/tuple.md)。 + +åž‹: [UInt64](../../sql-reference/data-types/int-uint.md) + +**例** + +クエリ: + +```sql +SELECT hilbertDecode(2, 31); +``` + +çµæžœ: + +```response +["3", "4"] +``` + +### 拡張モード + +最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ¬ãƒ³ã‚¸ãƒžã‚¹ã‚¯ï¼ˆã‚¿ãƒ—ル)をå—ã‘å–ã‚Šã€æœ€å¤§2ã¤ã®ç¬¦å·ãªã—æ•´æ•°ã®ä»–ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ +マスク内ã®å„数値ã¯ã€å¯¾å¿œã™ã‚‹å¼•æ•°ã‚’å·¦ã«ã‚·ãƒ•ãƒˆã™ã‚‹ãƒ“ット数を設定ã—ã€å®Ÿè³ªçš„ã«ãã®ç¯„囲内ã§å¼•æ•°ã‚’スケーリングã—ã¾ã™ã€‚ + +ä¼¼ãŸã‚ˆã†ãªç¯„囲やカーディナリティをæŒã¤å¼•æ•°ã«å¯¾ã—ã¦ã¯ã€ç¯„囲拡張ãŒæœ‰ç›Šã§ã™ã€‚ +ãŸã¨ãˆã°ã€'IPアドレス' (0...FFFFFFFF) ãŠã‚ˆã³ '国コード' (0...FF)。 +エンコード関数ã¨åŒæ§˜ã«ã€æœ€å¤§8ã¤ã®æ•°å€¤ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**例** + +1ã¤ã®å¼•æ•°ã«å¯¾ã™ã‚‹ãƒ’ルベルトコードã¯å¸¸ã«è‡ªèº«ã®å¼•æ•°ï¼ˆã‚¿ãƒ—ル)ã¨ãªã‚Šã¾ã™ã€‚ + +クエリ: + +```sql +SELECT hilbertDecode(1, 1); +``` + +çµæžœ: + +```response +["1"] +``` + +**例** + +1ã¤ã®å¼•æ•°ãŒãƒ“ットシフトを指定ã™ã‚‹ã‚¿ãƒ—ルã¨å…±ã«æä¾›ã•ã‚ŒãŸå ´åˆã€ã“ã®å¼•æ•°ã¯æŒ‡å®šã•ã‚ŒãŸãƒ“ット数ã ã‘å³ã‚·ãƒ•ãƒˆã•ã‚Œã¾ã™ã€‚ + +クエリ: + +```sql +SELECT hilbertDecode(tuple(2), 32768); +``` + +çµæžœ: + +```response +["128"] +``` + +**例** + +関数ã¯ç¬¬2引数ã¨ã—ã¦ã®ã‚«ãƒ©ãƒ ã®ã‚³ãƒ¼ãƒ‰ã‚‚å—ã‘入れã¾ã™: + +ã¾ãšãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ã€‚ + +クエリ: +```sql +create table hilbert_numbers( + n1 UInt32, + n2 UInt32 +) +Engine=MergeTree() +ORDER BY n1 SETTINGS index_granularity = 8192, index_granularity_bytes = '10Mi'; +insert into hilbert_numbers (*) values(1,2); +``` +カラムåを使用ã—ã¦`hilbertDecode`ã®é–¢æ•°å¼•æ•°ã¨ã—ã¦å®šæ•°ã®ä»£ã‚ã‚Šã«ä½¿ç”¨ + +クエリ: + +```sql +select untuple(hilbertDecode(2, hilbertEncode(n1, n2))) from hilbert_numbers; +``` + +çµæžœ: + +```response +1 2 +``` + diff --git a/docs/ja/sql-reference/functions/encryption-functions.md b/docs/ja/sql-reference/functions/encryption-functions.md new file mode 100644 index 00000000000..02f52435314 --- /dev/null +++ b/docs/ja/sql-reference/functions/encryption-functions.md @@ -0,0 +1,402 @@ +--- +slug: /ja/sql-reference/functions/encryption-functions +sidebar_position: 70 +sidebar_label: æš—å·åŒ– +--- + +ã“れらã®é–¢æ•°ã¯ã€AES(Advanced Encryption Standard)アルゴリズムを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã®æš—å·åŒ–ãŠã‚ˆã³å¾©å·åŒ–を実装ã—ã¾ã™ã€‚ + +キーã®é•·ã•ã¯æš—å·åŒ–モードã«ä¾å­˜ã—ã¾ã™ã€‚`-128-`モードã¯16ãƒã‚¤ãƒˆã€`-196-`モードã¯24ãƒã‚¤ãƒˆã€`-256-`モードã¯32ãƒã‚¤ãƒˆã®é•·ã•ã§ã™ã€‚ + +åˆæœŸåŒ–ベクトルã®é•·ã•ã¯å¸¸ã«16ãƒã‚¤ãƒˆã§ã™ï¼ˆä½™åˆ†ãªãƒã‚¤ãƒˆã¯ç„¡è¦–ã•ã‚Œã¾ã™ï¼‰ã€‚ + +ã“れらã®é–¢æ•°ã¯ClickHouse 21.1ã¾ã§ã¯å‹•ä½œãŒé…ã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +## encrypt + +ã“ã®é–¢æ•°ã¯ä»¥ä¸‹ã®ãƒ¢ãƒ¼ãƒ‰ã§ãƒ‡ãƒ¼ã‚¿ã‚’æš—å·åŒ–ã—ã¾ã™ï¼š + +- aes-128-ecb, aes-192-ecb, aes-256-ecb +- aes-128-cbc, aes-192-cbc, aes-256-cbc +- aes-128-ofb, aes-192-ofb, aes-256-ofb +- aes-128-gcm, aes-192-gcm, aes-256-gcm +- aes-128-ctr, aes-192-ctr, aes-256-ctr + +**構文** + +``` sql +encrypt('mode', 'plaintext', 'key' [, iv, aad]) +``` + +**引数** + +- `mode` — æš—å·åŒ–モード。[String](../data-types/string.md#string)。 +- `plaintext` — æš—å·åŒ–ã•ã‚Œã‚‹ã¹ãテキスト。[String](../data-types/string.md#string)。 +- `key` — æš—å·åŒ–キー。[String](../data-types/string.md#string)。 +- `iv` — åˆæœŸåŒ–ベクトル。`-gcm`モードã§å¿…è¦ã€ä»–ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã‚ªãƒ—ション。[String](../data-types/string.md#string)。 +- `aad` — 追加ã®èªè¨¼ãƒ‡ãƒ¼ã‚¿ã€‚æš—å·åŒ–ã¯ã•ã‚Œã¾ã›ã‚“ãŒã€å¾©å·åŒ–ã«å½±éŸ¿ã—ã¾ã™ã€‚`-gcm`モードã§ã®ã¿å‹•ä½œã—ã€ä»–ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚[String](../data-types/string.md#string)。 + +**戻り値** + +- æš—å·æ–‡ãƒã‚¤ãƒŠãƒªæ–‡å­—列。[String](../data-types/string.md#string)。 + +**例** + +ã“ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ï¼š + +クエリ: + +``` sql +CREATE TABLE encryption_test +( + `comment` String, + `secret` String +) +ENGINE = Memory; +``` + +データを挿入ã—ã¾ã™ï¼ˆã‚­ãƒ¼ã‚„IVをデータベースã«ä¿å­˜ã™ã‚‹ã“ã¨ã¯æš—å·åŒ–ã®æ¦‚念をæãªã†ãŸã‚é¿ã‘ã¦ãã ã•ã„ã€ã¾ãŸ'ヒント'ã‚’ä¿å­˜ã™ã‚‹ã®ã‚‚安全ã§ã¯ãªãã€ã“ã“ã§ã¯èª¬æ˜Žã®ãŸã‚ã ã‘ã«ä½¿ã‚ã‚Œã¾ã™ï¼‰ï¼š + +クエリ: + +``` sql +INSERT INTO encryption_test VALUES('aes-256-ofb no IV', encrypt('aes-256-ofb', 'Secret', '12345678910121314151617181920212')),\ +('aes-256-ofb no IV, different key', encrypt('aes-256-ofb', 'Secret', 'keykeykeykeykeykeykeykeykeykeyke')),\ +('aes-256-ofb with IV', encrypt('aes-256-ofb', 'Secret', '12345678910121314151617181920212', 'iviviviviviviviv')),\ +('aes-256-cbc no IV', encrypt('aes-256-cbc', 'Secret', '12345678910121314151617181920212')); +``` + +クエリ: + +``` sql +SELECT comment, hex(secret) FROM encryption_test; +``` + +çµæžœï¼š + +``` text +┌─comment──────────────────────────┬─hex(secret)──────────────────────┠+│ aes-256-ofb no IV │ B4972BDC4459 │ +│ aes-256-ofb no IV, different key │ 2FF57C092DC9 │ +│ aes-256-ofb with IV │ 5E6CB398F653 │ +│ aes-256-cbc no IV │ 1BC0629A92450D9E73A00E7D02CF4142 │ +└──────────────────────────────────┴──────────────────────────────────┘ +``` + +`-gcm`ã§ã®ä¾‹ï¼š + +クエリ: + +``` sql +INSERT INTO encryption_test VALUES('aes-256-gcm', encrypt('aes-256-gcm', 'Secret', '12345678910121314151617181920212', 'iviviviviviviviv')), \ +('aes-256-gcm with AAD', encrypt('aes-256-gcm', 'Secret', '12345678910121314151617181920212', 'iviviviviviviviv', 'aad')); + +SELECT comment, hex(secret) FROM encryption_test WHERE comment LIKE '%gcm%'; +``` + +çµæžœï¼š + +``` text +┌─comment──────────────┬─hex(secret)──────────────────────────────────┠+│ aes-256-gcm │ A8A3CCBC6426CFEEB60E4EAE03D3E94204C1B09E0254 │ +│ aes-256-gcm with AAD │ A8A3CCBC6426D9A1017A0A932322F1852260A4AD6837 │ +└──────────────────────┴──────────────────────────────────────────────┘ +``` + +## aes_encrypt_mysql + +MySQLã®æš—å·åŒ–ã¨äº’æ›ãŒã‚ã‚Šã€çµæžœã¨ã—ã¦å¾—られる暗å·æ–‡ã¯[AES_DECRYPT](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_aes-decrypt)関数ã§å¾©å·åŒ–ã§ãã¾ã™ã€‚ + +åŒã˜å…¥åŠ›ã§`encrypt`ã¨åŒã˜æš—å·æ–‡ã‚’生æˆã—ã¾ã™ã€‚ãŸã ã—ã€`key`ã¾ãŸã¯`iv`ãŒé€šå¸¸ã‚ˆã‚Šã‚‚é•·ã„å ´åˆã€`aes_encrypt_mysql`ã¯MySQLã®`aes_encrypt`ã«å¾“ã„ã€`key`を折りãŸãŸã‚“ã§ä½™åˆ†ãªãƒ“ットを無視ã—ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹æš—å·åŒ–モード: + +- aes-128-ecb, aes-192-ecb, aes-256-ecb +- aes-128-cbc, aes-192-cbc, aes-256-cbc +- aes-128-ofb, aes-192-ofb, aes-256-ofb + +**構文** + +``` sql +aes_encrypt_mysql('mode', 'plaintext', 'key' [, iv]) +``` + +**引数** + +- `mode` — æš—å·åŒ–モード。[String](../data-types/string.md#string)。 +- `plaintext` — æš—å·åŒ–ã•ã‚Œã‚‹ã¹ãテキスト。[String](../data-types/string.md#string)。 +- `key` — æš—å·åŒ–キー。モードãŒè¦æ±‚ã™ã‚‹ã‚ˆã‚Šã‚‚é•·ã„å ´åˆã€MySQL固有ã®ã‚­ãƒ¼ã®æŠ˜ã‚ŠãŸãŸã¿ãŒè¡Œã‚ã‚Œã¾ã™ã€‚[String](../data-types/string.md#string)。 +- `iv` — åˆæœŸåŒ–ベクトル。オプションã§ã€æœ€åˆã®16ãƒã‚¤ãƒˆã®ã¿ãŒè€ƒæ…®ã•ã‚Œã¾ã™ã€‚[String](../data-types/string.md#string)。 + +**戻り値** + +- æš—å·æ–‡ãƒã‚¤ãƒŠãƒªæ–‡å­—列。[String](../data-types/string.md#string)。 + +**例** + +ç­‰ã—ã„入力ã§`encrypt`ã¨`aes_encrypt_mysql`ã¯åŒã˜æš—å·æ–‡ã‚’生æˆã—ã¾ã™ï¼š + +クエリ: + +``` sql +SELECT encrypt('aes-256-ofb', 'Secret', '12345678910121314151617181920212', 'iviviviviviviviv') = aes_encrypt_mysql('aes-256-ofb', 'Secret', '12345678910121314151617181920212', 'iviviviviviviviv') AS ciphertexts_equal; +``` + +çµæžœï¼š + +``` +┌─ciphertexts_equal─┠+│ 1 │ +└───────────────────┘ +``` + +ã—ã‹ã—ã€`encrypt`ã¯`key`ã¾ãŸã¯`iv`ãŒäºˆæƒ³ã‚ˆã‚Šã‚‚é•·ã„å ´åˆã«å¤±æ•—ã—ã¾ã™ï¼š + +クエリ: + +``` sql +SELECT encrypt('aes-256-ofb', 'Secret', '123456789101213141516171819202122', 'iviviviviviviviv123'); +``` + +çµæžœï¼š + +``` text +Received exception from server (version 22.6.1): +Code: 36. DB::Exception: Received from localhost:9000. DB::Exception: Invalid key size: 33 expected 32: While processing encrypt('aes-256-ofb', 'Secret', '123456789101213141516171819202122', 'iviviviviviviviv123'). +``` + +一方ã€`aes_encrypt_mysql`ã¯MySQL互æ›ã®å‡ºåŠ›ã‚’生æˆã—ã¾ã™ï¼š + +クエリ: + +``` sql +SELECT hex(aes_encrypt_mysql('aes-256-ofb', 'Secret', '123456789101213141516171819202122', 'iviviviviviviviv123')) AS ciphertext; +``` + +çµæžœï¼š + +```text +┌─ciphertext───┠+│ 24E9E4966469 │ +└──────────────┘ +``` + +ã•ã‚‰ã«é•·ã„`IV`ã‚’æä¾›ã—ã¦ã‚‚åŒã˜çµæžœãŒå¾—られるã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +クエリ: + +``` sql +SELECT hex(aes_encrypt_mysql('aes-256-ofb', 'Secret', '123456789101213141516171819202122', 'iviviviviviviviv123456')) AS ciphertext +``` + +çµæžœï¼š + +``` text +┌─ciphertext───┠+│ 24E9E4966469 │ +└──────────────┘ +``` + +ã“ã‚Œã¯ã€åŒã˜å…¥åŠ›ã§MySQLãŒç”Ÿæˆã™ã‚‹ã‚‚ã®ã¨ãƒã‚¤ãƒŠãƒªã§ç­‰ã—ã„ã§ã™ï¼š + +``` sql +mysql> SET block_encryption_mode='aes-256-ofb'; +Query OK, 0 rows affected (0.00 sec) + +mysql> SELECT aes_encrypt('Secret', '123456789101213141516171819202122', 'iviviviviviviviv123456') as ciphertext; ++------------------------+ +| ciphertext | ++------------------------+ +| 0x24E9E4966469 | ++------------------------+ +1 row in set (0.00 sec) +``` + +## decrypt + +ã“ã®é–¢æ•°ã¯ã€ä»¥ä¸‹ã®ãƒ¢ãƒ¼ãƒ‰ã§æš—å·æ–‡ã‚’平文ã«å¾©å·ã—ã¾ã™ï¼š + +- aes-128-ecb, aes-192-ecb, aes-256-ecb +- aes-128-cbc, aes-192-cbc, aes-256-cbc +- aes-128-ofb, aes-192-ofb, aes-256-ofb +- aes-128-gcm, aes-192-gcm, aes-256-gcm +- aes-128-ctr, aes-192-ctr, aes-256-ctr + +**構文** + +``` sql +decrypt('mode', 'ciphertext', 'key' [, iv, aad]) +``` + +**引数** + +- `mode` — 復å·åŒ–モード。[String](../data-types/string.md#string)。 +- `ciphertext` — 復å·åŒ–ã•ã‚Œã‚‹ã¹ãæš—å·åŒ–テキスト。[String](../data-types/string.md#string)。 +- `key` — 復å·åŒ–キー。[String](../data-types/string.md#string)。 +- `iv` — åˆæœŸåŒ–ベクトル。`-gcm`モードã§å¿…è¦ã€ä»–ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã‚ªãƒ—ション。[String](../data-types/string.md#string)。 +- `aad` — 追加ã®èªè¨¼ãƒ‡ãƒ¼ã‚¿ã€‚ã“ã®å€¤ãŒæ­£ã—ããªã„ã¨å¾©å·åŒ–ã§ãã¾ã›ã‚“。`-gcm`モードã§ã®ã¿å‹•ä½œã—ã€ä»–ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚[String](../data-types/string.md#string)。 + +**戻り値** + +- 復å·åŒ–ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md#string)。 + +**例** + +[encrypt](#encrypt)ã®ãƒ†ãƒ¼ãƒ–ルをå†åˆ©ç”¨ã—ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT comment, hex(secret) FROM encryption_test; +``` + +çµæžœï¼š + +``` text +┌─comment──────────────┬─hex(secret)──────────────────────────────────┠+│ aes-256-gcm │ A8A3CCBC6426CFEEB60E4EAE03D3E94204C1B09E0254 │ +│ aes-256-gcm with AAD │ A8A3CCBC6426D9A1017A0A932322F1852260A4AD6837 │ +└──────────────────────┴──────────────────────────────────────────────┘ +┌─comment──────────────────────────┬─hex(secret)──────────────────────┠+│ aes-256-ofb no IV │ B4972BDC4459 │ +│ aes-256-ofb no IV, different key │ 2FF57C092DC9 │ +│ aes-256-ofb with IV │ 5E6CB398F653 │ +│ aes-256-cbc no IV │ 1BC0629A92450D9E73A00E7D02CF4142 │ +└──────────────────────────────────┴──────────────────────────────────┘ +``` + +次ã«ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’ã™ã¹ã¦å¾©å·åŒ–ã—ã¦ã¿ã¾ã—ょã†ã€‚ + +クエリ: + +``` sql +SELECT comment, decrypt('aes-256-cfb128', secret, '12345678910121314151617181920212') as plaintext FROM encryption_test +``` + +çµæžœï¼š + +``` text +┌─comment──────────────┬─plaintext──┠+│ aes-256-gcm │ OQ�E + �t�7T�\���\� │ +│ aes-256-gcm with AAD │ OQ�E + �\��si����;�o�� │ +└──────────────────────┴────────────┘ +┌─comment──────────────────────────┬─plaintext─┠+│ aes-256-ofb no IV │ Secret │ +│ aes-256-ofb no IV, different key │ �4� + � │ +│ aes-256-ofb with IV │ ���6�~ │ + │aes-256-cbc no IV │ �2*4�h3c�4w��@ +└──────────────────────────────────┴───────────┘ +``` + +モードã€ã‚­ãƒ¼ã€ã¾ãŸã¯IVãŒæš—å·åŒ–時ã«ç•°ãªã£ã¦ã„ãŸãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ã®ä¸€éƒ¨ã®ã¿ãŒé©åˆ‡ã«å¾©å·åŒ–ã•ã‚Œã€æ®‹ã‚Šã¯æ„味ä¸æ˜Žãªæ–‡å­—ã¨ãªã£ã¦ã„ã¾ã™ã€‚ + +## tryDecrypt + +`decrypt`ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ä¸æ­£ãªã‚­ãƒ¼ã‚’使用ã—ãŸãŸã‚ã«å¾©å·åŒ–ã«å¤±æ•—ã—ãŸå ´åˆã€NULLã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +`user_id`ãŒãƒ¦ãƒ‹ãƒ¼ã‚¯ãªãƒ¦ãƒ¼ã‚¶ãƒ¼IDã§ã‚ã‚Šã€`encrypted`ãŒæš—å·åŒ–ã•ã‚ŒãŸæ–‡å­—列フィールドã€`iv`ãŒæš—å·åŒ–・復å·åŒ–ã®åˆæœŸãƒ™ã‚¯ãƒˆãƒ«ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¦ã¿ã¾ã—ょã†ã€‚ユーザーã¯è‡ªåˆ†ã®IDã¨æš—å·åŒ–ã•ã‚ŒãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’復å·åŒ–ã™ã‚‹ãŸã‚ã®ã‚­ãƒ¼ã‚’知ã£ã¦ã„ã‚‹ã¨ä»®å®šã—ã¾ã™ï¼š + +```sql +CREATE TABLE decrypt_null ( + dt DateTime, + user_id UInt32, + encrypted String, + iv String +) ENGINE = Memory; +``` + +データã®æŒ¿å…¥ï¼š + +```sql +INSERT INTO decrypt_null VALUES + ('2022-08-02 00:00:00', 1, encrypt('aes-256-gcm', 'value1', 'keykeykeykeykeykeykeykeykeykey01', 'iv1'), 'iv1'), + ('2022-09-02 00:00:00', 2, encrypt('aes-256-gcm', 'value2', 'keykeykeykeykeykeykeykeykeykey02', 'iv2'), 'iv2'), + ('2022-09-02 00:00:01', 3, encrypt('aes-256-gcm', 'value3', 'keykeykeykeykeykeykeykeykeykey03', 'iv3'), 'iv3'); +``` + +クエリ: + +```sql +SELECT + dt, + user_id, + tryDecrypt('aes-256-gcm', encrypted, 'keykeykeykeykeykeykeykeykeykey02', iv) AS value +FROM decrypt_null +ORDER BY user_id ASC +``` + +çµæžœï¼š + +``` +┌──────────────────dt─┬─user_id─┬─value──┠+│ 2022-08-02 00:00:00 │ 1 │ á´ºáµá´¸á´¸ │ +│ 2022-09-02 00:00:00 │ 2 │ value2 │ +│ 2022-09-02 00:00:01 │ 3 │ á´ºáµá´¸á´¸ │ +└─────────────────────┴─────────┴────────┘ +``` + +## aes_decrypt_mysql + +MySQLã®æš—å·åŒ–ã¨äº’æ›æ€§ãŒã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’[AES_ENCRYPT](https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_aes-encrypt)ã§æš—å·åŒ–ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’復å·åŒ–ã—ã¾ã™ã€‚ + +ç­‰ã—ã„入力ã§`decrypt`ã¨åŒã˜å¹³æ–‡ã‚’生æˆã—ã¾ã™ã€‚ãŸã ã—ã€`key`ã¾ãŸã¯`iv`ãŒé€šå¸¸ã‚ˆã‚Šã‚‚é•·ã„å ´åˆã€`aes_decrypt_mysql`ã¯MySQLã®`aes_decrypt`ã«å¾“ã„ã€`key`を折りãŸãŸã‚“ã§ä½™åˆ†ãªãƒ“ットを無視ã—ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る復å·åŒ–モード: + +- aes-128-ecb, aes-192-ecb, aes-256-ecb +- aes-128-cbc, aes-192-cbc, aes-256-cbc +- aes-128-cfb128 +- aes-128-ofb, aes-192-ofb, aes-256-ofb + +**構文** + +``` sql +aes_decrypt_mysql('mode', 'ciphertext', 'key' [, iv]) +``` + +**引数** + +- `mode` — 復å·åŒ–モード。[String](../data-types/string.md#string)。 +- `ciphertext` — 復å·åŒ–ã•ã‚Œã‚‹ã¹ãæš—å·åŒ–テキスト。[String](../data-types/string.md#string)。 +- `key` — 復å·åŒ–キー。[String](../data-types/string.md#string)。 +- `iv` — åˆæœŸåŒ–ベクトル。オプション。[String](../data-types/string.md#string)。 + +**戻り値** + +- 復å·åŒ–ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md#string)。 + +**例** + +以å‰MySQLã§æš—å·åŒ–ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’復å·åŒ–ã—ã¦ã¿ã¾ã—ょã†ï¼š + +``` sql +mysql> SET block_encryption_mode='aes-256-ofb'; +Query OK, 0 rows affected (0.00 sec) + +mysql> SELECT aes_encrypt('Secret', '123456789101213141516171819202122', 'iviviviviviviviv123456') as ciphertext; ++------------------------+ +| ciphertext | ++------------------------+ +| 0x24E9E4966469 | ++------------------------+ +1 row in set (0.00 sec) +``` + +クエリ: + +``` sql +SELECT aes_decrypt_mysql('aes-256-ofb', unhex('24E9E4966469'), '123456789101213141516171819202122', 'iviviviviviviviv123456') AS plaintext +``` + +çµæžœï¼š + +``` text +┌─plaintext─┠+│ Secret │ +└───────────┘ +``` diff --git a/docs/ja/sql-reference/functions/ext-dict-functions.md b/docs/ja/sql-reference/functions/ext-dict-functions.md new file mode 100644 index 00000000000..e225dcc742c --- /dev/null +++ b/docs/ja/sql-reference/functions/ext-dict-functions.md @@ -0,0 +1,514 @@ +--- +slug: /ja/sql-reference/functions/ext-dict-functions +sidebar_position: 50 +sidebar_label: Dictionary +--- + +# ダイナミックDictionaryã«å¯¾ã™ã‚‹æ“作ã®é–¢æ•° + +:::note +[DDLクエリ](../../sql-reference/statements/create/dictionary.md)ã§ä½œæˆã•ã‚ŒãŸDictionaryã«ã¤ã„ã¦ã¯ã€`dict_name`パラメータを`.`ã®å½¢ã§å®Œå…¨ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +Dictionaryã®æŽ¥ç¶šãŠã‚ˆã³è¨­å®šã«é–¢ã™ã‚‹æƒ…å ±ã¯ã€[Dictionary](../../sql-reference/dictionaries/index.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## dictGet, dictGetOrDefault, dictGetOrNull + +Dictionaryã‹ã‚‰å€¤ã‚’å–å¾—ã—ã¾ã™ã€‚ + +```sql +dictGet('dict_name', attr_names, id_expr) +dictGetOrDefault('dict_name', attr_names, id_expr, default_value_expr) +dictGetOrNull('dict_name', attr_name, id_expr) +``` + +**引数** + +- `dict_name` — Dictionaryã®åå‰ã€‚[文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal)。 +- `attr_names` — Dictionaryã®ã‚«ãƒ©ãƒ å。[文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal)ã€ã¾ãŸã¯ã‚«ãƒ©ãƒ åã®ã‚¿ãƒ—ル。[タプル](../data-types/tuple.md)([文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal))。 +- `id_expr` — キーã®å€¤ã€‚[å¼](../../sql-reference/syntax.md#syntax-expressions)ã§ã€Dictionary設定ã«å¿œã˜ãŸã‚­ãƒ¼ã‚¿ã‚¤ãƒ—ã®å€¤ã¾ãŸã¯[タプル](../data-types/tuple.md)åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- `default_value_expr` — Dictionaryã«`id_expr`キーã®è¡ŒãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã«è¿”ã•ã‚Œã‚‹å€¤ã€‚[å¼](../../sql-reference/syntax.md#syntax-expressions)ã¾ãŸã¯[タプル](../data-types/tuple.md)([å¼](../../sql-reference/syntax.md#syntax-expressions))ã§ã€`attr_names`属性ã«è¨­å®šã•ã‚ŒãŸåž‹ã§å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**返り値** + +- ClickHouseãŒå±žæ€§ã‚’[属性ã®ãƒ‡ãƒ¼ã‚¿åž‹](../../sql-reference/dictionaries/index.md#dictionary-key-and-fields#ext_dict_structure-attributes)ã§æ­£å¸¸ã«è§£æžã™ã‚‹ã¨ã€é–¢æ•°ã¯`id_expr`ã«å¯¾å¿œã™ã‚‹Dictionary属性ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +- Dictionaryã«`id_expr`ã«å¯¾å¿œã™ã‚‹ã‚­ãƒ¼ãŒãªã„å ´åˆï¼š + + - `dictGet`ã¯ã€Dictionary設定ã§å±žæ€§ã«æŒ‡å®šã•ã‚ŒãŸ``è¦ç´ ã®å†…容を返ã—ã¾ã™ã€‚ + - `dictGetOrDefault`ã¯ã€`default_value_expr`パラメータã¨ã—ã¦æ¸¡ã•ã‚ŒãŸå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + - `dictGetOrNull`ã¯ã€ã‚­ãƒ¼ãŒDictionaryã§è¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã€`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +ClickHouseã¯ã€å±žæ€§ã®å€¤ã‚’解æžã§ããªã„å ´åˆã‚„ã€å€¤ãŒå±žæ€§ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨ä¸€è‡´ã—ãªã„å ´åˆã«ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +**シンプルキーDictionaryã®ä¾‹** + +以下ã®å†…容ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«`ext-dict-test.csv`を作æˆã—ã¾ã™ï¼š + +```text +1,1 +2,2 +``` + +最åˆã®ã‚«ãƒ©ãƒ ã¯`id`ã€2番目ã®ã‚«ãƒ©ãƒ ã¯`c1`ã§ã™ã€‚ + +Dictionaryを設定ã—ã¾ã™ï¼š + +```xml + + + ext-dict-test + + + /path-to/ext-dict-test.csv + CSV + + + + + + + + id + + + c1 + UInt32 + + + + 0 + + +``` + +クエリを実行ã—ã¾ã™ï¼š + +```sql +SELECT + dictGetOrDefault('ext-dict-test', 'c1', number + 1, toUInt32(number * 10)) AS val, + toTypeName(val) AS type +FROM system.numbers +LIMIT 3; +``` + +```text +┌─val─┬─type───┠+│ 1 │ UInt32 │ +│ 2 │ UInt32 │ +│ 20 │ UInt32 │ +└─────┴────────┘ +``` + +**複雑ãªã‚­ãƒ¼Dictionaryã®ä¾‹** + +以下ã®å†…容ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«`ext-dict-mult.csv`を作æˆã—ã¾ã™ï¼š + +```text +1,1,'1' +2,2,'2' +3,3,'3' +``` + +最åˆã®ã‚«ãƒ©ãƒ ã¯`id`ã€2番目ã¯`c1`ã€3番目ã¯`c2`ã§ã™ã€‚ + +Dictionaryを設定ã—ã¾ã™ï¼š + +```xml + + + ext-dict-mult + + + /path-to/ext-dict-mult.csv + CSV + + + + + + + + id + + + c1 + UInt32 + + + + c2 + String + + + + 0 + + +``` + +クエリを実行ã—ã¾ã™ï¼š + +```sql +SELECT + dictGet('ext-dict-mult', ('c1','c2'), number + 1) AS val, + toTypeName(val) AS type +FROM system.numbers +LIMIT 3; +``` + +```text +┌─val─────┬─type──────────────────┠+│ (1,'1') │ Tuple(UInt8, String) │ +│ (2,'2') │ Tuple(UInt8, String) │ +│ (3,'3') │ Tuple(UInt8, String) │ +└─────────┴───────────────────────┘ +``` + +**範囲キーDictionaryã®ä¾‹** + +入力テーブル: + +```sql +CREATE TABLE range_key_dictionary_source_table +( + key UInt64, + start_date Date, + end_date Date, + value String, + value_nullable Nullable(String) +) +ENGINE = TinyLog(); + +INSERT INTO range_key_dictionary_source_table VALUES(1, toDate('2019-05-20'), toDate('2019-05-20'), 'First', 'First'); +INSERT INTO range_key_dictionary_source_table VALUES(2, toDate('2019-05-20'), toDate('2019-05-20'), 'Second', NULL); +INSERT INTO range_key_dictionary_source_table VALUES(3, toDate('2019-05-20'), toDate('2019-05-20'), 'Third', 'Third'); +``` + +Dictionaryを作æˆã—ã¾ã™ï¼š + +```sql +CREATE DICTIONARY range_key_dictionary +( + key UInt64, + start_date Date, + end_date Date, + value String, + value_nullable Nullable(String) +) +PRIMARY KEY key +SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() TABLE 'range_key_dictionary_source_table')) +LIFETIME(MIN 1 MAX 1000) +LAYOUT(RANGE_HASHED()) +RANGE(MIN start_date MAX end_date); +``` + +クエリを実行ã—ã¾ã™ï¼š + +```sql +SELECT + (number, toDate('2019-05-20')), + dictHas('range_key_dictionary', number, toDate('2019-05-20')), + dictGetOrNull('range_key_dictionary', 'value', number, toDate('2019-05-20')), + dictGetOrNull('range_key_dictionary', 'value_nullable', number, toDate('2019-05-20')), + dictGetOrNull('range_key_dictionary', ('value', 'value_nullable'), number, toDate('2019-05-20')) +FROM system.numbers LIMIT 5 FORMAT TabSeparated; +``` +çµæžœï¼š + +```text +(0,'2019-05-20') 0 \N \N (NULL,NULL) +(1,'2019-05-20') 1 First First ('First','First') +(2,'2019-05-20') 1 Second \N ('Second',NULL) +(3,'2019-05-20') 1 Third Third ('Third','Third') +(4,'2019-05-20') 0 \N \N (NULL,NULL) +``` + +**関連項目** + +- [Dictionaries](../../sql-reference/dictionaries/index.md) + +## dictHas + +キーãŒDictionaryã«å­˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +```sql +dictHas('dict_name', id_expr) +``` + +**引数** + +- `dict_name` — Dictionaryã®åå‰ã€‚[文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal)。 +- `id_expr` — キーã®å€¤ã€‚[å¼](../../sql-reference/syntax.md#syntax-expressions)ã§ã€Dictionary設定ã«å¿œã˜ãŸã‚­ãƒ¼ã‚¿ã‚¤ãƒ—ã®å€¤ã¾ãŸã¯[タプル](../data-types/tuple.md)åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**返り値** + +- キーãŒå­˜åœ¨ã—ãªã„å ´åˆã¯0。[UInt8](../data-types/int-uint.md)。 +- キーãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯1。[UInt8](../data-types/int-uint.md)。 + +## dictGetHierarchy + +[階層型 Dictionary](../../sql-reference/dictionaries/index.md#hierarchical-dictionaries)内ã®ã‚­ãƒ¼ã®ã™ã¹ã¦ã®è¦ªã‚’å«ã‚€é…列を作æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +dictGetHierarchy('dict_name', key) +``` + +**引数** + +- `dict_name` — Dictionaryã®åå‰ã€‚[文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal)。 +- `key` — キーã®å€¤ã€‚[å¼](../../sql-reference/syntax.md#syntax-expressions)ã§[UInt64](../data-types/int-uint.md)åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**返り値** + +- キーã®è¦ªã€‚[Array(UInt64)](../data-types/array.md)。 + +## dictIsIn + +Dictionary内ã®éšŽå±¤å…¨ä½“を通ã—ã¦ã€ã‚­ãƒ¼ã®å…ˆç¥–ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +```sql +dictIsIn('dict_name', child_id_expr, ancestor_id_expr) +``` + +**引数** + +- `dict_name` — Dictionaryã®åå‰ã€‚[文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal)。 +- `child_id_expr` — ãƒã‚§ãƒƒã‚¯ã•ã‚Œã‚‹ã‚­ãƒ¼ã€‚[å¼](../../sql-reference/syntax.md#syntax-expressions)ã§[UInt64](../data-types/int-uint.md)åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- `ancestor_id_expr` — `child_id_expr`キーã®ä»®å®šã•ã‚ŒãŸå…ˆç¥–。[å¼](../../sql-reference/syntax.md#syntax-expressions)ã§[UInt64](../data-types/int-uint.md)åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**返り値** + +- `child_id_expr`ãŒ`ancestor_id_expr`ã®å­ã§ãªã„å ´åˆã¯0。[UInt8](../data-types/int-uint.md)。 +- `child_id_expr`ãŒ`ancestor_id_expr`ã®å­ã¾ãŸã¯`ancestor_id_expr`自体ã§ã‚ã‚‹å ´åˆã¯1。[UInt8](../data-types/int-uint.md)。 + +## dictGetChildren + +第一レベルã®å­ã‚’インデックスã®é…列ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚[dictGetHierarchy](#dictgethierarchy) ã®é€†ã®å¤‰æ›ã§ã™ã€‚ + +**構文** + +```sql +dictGetChildren(dict_name, key) +``` + +**引数** + +- `dict_name` — Dictionaryã®åå‰ã€‚[文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal)。 +- `key` — キーã®å€¤ã€‚[å¼](../../sql-reference/syntax.md#syntax-expressions)ã§[UInt64](../data-types/int-uint.md)åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**返り値** + +- キーã®ç¬¬ä¸€ãƒ¬ãƒ™ãƒ«ã®å­ã€‚[Array](../data-types/array.md)([UInt64](../data-types/int-uint.md))。 + +**例** + +階層型ã®Dictionaryを考慮ã—ã¾ã™ï¼š + +```text +┌─id─┬─parent_id─┠+│ 1 │ 0 │ +│ 2 │ 1 │ +│ 3 │ 1 │ +│ 4 │ 2 │ +└────┴───────────┘ +``` + +第一レベルã®å­ï¼š + +```sql +SELECT dictGetChildren('hierarchy_flat_dictionary', number) FROM system.numbers LIMIT 4; +``` + +```text +┌─dictGetChildren('hierarchy_flat_dictionary', number)─┠+│ [1] │ +│ [2,3] │ +│ [4] │ +│ [] │ +└──────────────────────────────────────────────────────┘ +``` + +## dictGetDescendant + +å…¨ã¦ã®å­å­«ã‚’[dictGetChildren](#dictgetchildren)関数ãŒ`level`回ã®å†å¸°ã§é©ç”¨ã•ã‚ŒãŸã‹ã®ã‚ˆã†ã«è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +dictGetDescendants(dict_name, key, level) +``` + +**引数** + +- `dict_name` — Dictionaryã®åå‰ã€‚[文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal)。 +- `key` — キーã®å€¤ã€‚[å¼](../../sql-reference/syntax.md#syntax-expressions)ã§[UInt64](../data-types/int-uint.md)åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- `level` — 階層レベル。`level = 0`ã®å ´åˆã€æœ€å¾Œã¾ã§ã®å…¨ã¦ã®å­å­«ã‚’è¿”ã—ã¾ã™ã€‚[UInt8](../data-types/int-uint.md)。 + +**返り値** + +- キーã®å­å­«ã€‚[Array](../data-types/array.md)([UInt64](../data-types/int-uint.md))。 + +**例** + +階層型ã®Dictionaryを考慮ã—ã¾ã™ï¼š + +```text +┌─id─┬─parent_id─┠+│ 1 │ 0 │ +│ 2 │ 1 │ +│ 3 │ 1 │ +│ 4 │ 2 │ +└────┴───────────┘ +``` +å…¨ã¦ã®å­å­«ï¼š + +```sql +SELECT dictGetDescendants('hierarchy_flat_dictionary', number) FROM system.numbers LIMIT 4; +``` + +```text +┌─dictGetDescendants('hierarchy_flat_dictionary', number)─┠+│ [1,2,3,4] │ +│ [2,3,4] │ +│ [4] │ +│ [] │ +└─────────────────────────────────────────────────────────┘ +``` + +第一レベルã®å­å­«ï¼š + +```sql +SELECT dictGetDescendants('hierarchy_flat_dictionary', number, 1) FROM system.numbers LIMIT 4; +``` + +```text +┌─dictGetDescendants('hierarchy_flat_dictionary', number, 1)─┠+│ [1] │ +│ [2,3] │ +│ [4] │ +│ [] │ +└────────────────────────────────────────────────────────────┘ +``` + + +## dictGetAll + +[æ­£è¦è¡¨ç¾ãƒ„リーDictionary](../../sql-reference/dictionaries/index.md#regexp-tree-dictionary)ã§å„キーã«ä¸€è‡´ã—ãŸã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã®å±žæ€§å€¤ã‚’å–å¾—ã—ã¾ã™ã€‚ + +`Array(T)`åž‹ã®å€¤ã‚’è¿”ã™ç‚¹ã‚’除ãã€[`dictGet`](#dictget-dictgetordefault-dictgetornull)ã¨åŒæ§˜ã«å‹•ä½œã—ã¾ã™ã€‚ + +**構文** + +```sql +dictGetAll('dict_name', attr_names, id_expr[, limit]) +``` + +**引数** + +- `dict_name` — Dictionaryã®åå‰ã€‚[文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal)。 +- `attr_names` — Dictionaryã®ã‚«ãƒ©ãƒ å。[文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal)ã¾ãŸã¯ã€ã‚«ãƒ©ãƒ åã®ã‚¿ãƒ—ル。[タプル](../data-types/tuple.md)([文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal))。 +- `id_expr` — キーã®å€¤ã€‚[å¼](../../sql-reference/syntax.md#syntax-expressions)ã§ã€Dictionary設定ã«å¿œã˜ãŸã‚­ãƒ¼ã‚¿ã‚¤ãƒ—ã®å€¤ã®é…列ã¾ãŸã¯[タプル](../data-types/tuple.md)åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- `limit` - è¿”ã•ã‚Œã‚‹å„値é…列ã®æœ€å¤§é•·ã€‚切り詰ã‚ã‚‹å ´åˆã€å­ãƒŽãƒ¼ãƒ‰ãŒè¦ªãƒŽãƒ¼ãƒ‰ã‚ˆã‚Šå„ªå…ˆã•ã‚Œã€ãれ以外ã®å ´åˆã¯æ­£è¦è¡¨ç¾ãƒ„リーDictionaryã§å®šç¾©ã•ã‚ŒãŸãƒªã‚¹ãƒˆã®é †åºãŒå°Šé‡ã•ã‚Œã¾ã™ã€‚指定ã—ãªã„å ´åˆã€é…列ã®é•·ã•ã«åˆ¶é™ã¯ã‚ã‚Šã¾ã›ã‚“。 + +**返り値** + +- ClickHouseãŒå±žæ€§ã‚’正常ã«è§£æžã—ã€Dictionaryã§å®šç¾©ã•ã‚ŒãŸå±žæ€§ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨ã—ã¦ã€å„`attr_names`ã§æŒ‡å®šã•ã‚ŒãŸå±žæ€§ã«å¯¾ã™ã‚‹`id_expr`ã«å¯¾å¿œã™ã‚‹Dictionary属性値ã®é…列を返ã—ã¾ã™ã€‚ + +- Dictionaryã«`id_expr`ã«å¯¾å¿œã™ã‚‹ã‚­ãƒ¼ãŒãªã„å ´åˆã€ç©ºã®é…列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +ClickHouseã¯ã€å±žæ€§ã®å€¤ã‚’解æžã§ããªã„å ´åˆã‚„ã€å€¤ãŒå±žæ€§ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨ä¸€è‡´ã—ãªã„å ´åˆã«ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**例** + +以下ã®ã‚ˆã†ãªæ­£è¦è¡¨ç¾ãƒ„リーDictionaryを考慮ã—ã¾ã™ï¼š + +```sql +CREATE DICTIONARY regexp_dict +( + regexp String, + tag String +) +PRIMARY KEY(regexp) +SOURCE(YAMLRegExpTree(PATH '/var/lib/clickhouse/user_files/regexp_tree.yaml')) +LAYOUT(regexp_tree) +... +``` + +```yaml +# /var/lib/clickhouse/user_files/regexp_tree.yaml +- regexp: 'foo' + tag: 'foo_attr' +- regexp: 'bar' + tag: 'bar_attr' +- regexp: 'baz' + tag: 'baz_attr' +``` + +ã™ã¹ã¦ã®ä¸€è‡´ã™ã‚‹å€¤ã‚’å–得: + +```sql +SELECT dictGetAll('regexp_dict', 'tag', 'foobarbaz'); +``` + +```text +┌─dictGetAll('regexp_dict', 'tag', 'foobarbaz')─┠+│ ['foo_attr','bar_attr','baz_attr'] │ +└───────────────────────────────────────────────┘ +``` + +最大2ã¤ã®ä¸€è‡´ã™ã‚‹å€¤ã‚’å–得: + +```sql +SELECT dictGetAll('regexp_dict', 'tag', 'foobarbaz', 2); +``` + +```text +┌─dictGetAll('regexp_dict', 'tag', 'foobarbaz', 2)─┠+│ ['foo_attr','bar_attr'] │ +└──────────────────────────────────────────────────┘ +``` + +## ãã®ä»–ã®é–¢æ•° + +ClickHouseã¯ã€Dictionaryã®è¨­å®šã«é–¢ä¿‚ãªãã€Dictionaryã®å±žæ€§å€¤ã‚’特定ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«å¤‰æ›ã™ã‚‹å°‚é–€ã®é–¢æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +関数: + +- `dictGetInt8`, `dictGetInt16`, `dictGetInt32`, `dictGetInt64` +- `dictGetUInt8`, `dictGetUInt16`, `dictGetUInt32`, `dictGetUInt64` +- `dictGetFloat32`, `dictGetFloat64` +- `dictGetDate` +- `dictGetDateTime` +- `dictGetUUID` +- `dictGetString` +- `dictGetIPv4`, `dictGetIPv6` + +ã“れらã®é–¢æ•°ã¯ã™ã¹ã¦`OrDefault`ã®ä¿®é£¾ãŒå¯èƒ½ã§ã™ã€‚例ãˆã°ã€`dictGetDateOrDefault`ã®ã‚ˆã†ã«ã€‚ + +構文: + +```sql +dictGet[Type]('dict_name', 'attr_name', id_expr) +dictGet[Type]OrDefault('dict_name', 'attr_name', id_expr, default_value_expr) +``` + +**引数** + +- `dict_name` — Dictionaryã®åå‰ã€‚[文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal)。 +- `attr_name` — Dictionaryã®ã‚«ãƒ©ãƒ å。[文字列リテラル](../../sql-reference/syntax.md#syntax-string-literal)。 +- `id_expr` — キーã®å€¤ã€‚[å¼](../../sql-reference/syntax.md#syntax-expressions)ã§ã€[UInt64](../data-types/int-uint.md)ã¾ãŸã¯[タプル](../data-types/tuple.md)åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- `default_value_expr` — Dictionaryã«`id_expr`キーã®è¡ŒãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã«è¿”ã•ã‚Œã‚‹å€¤ã€‚[å¼](../../sql-reference/syntax.md#syntax-expressions)ã§ã€`attr_name`ã«è¨­å®šã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ã§å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**返り値** + +- ClickHouseãŒå±žæ€§ã‚’[属性ã®ãƒ‡ãƒ¼ã‚¿åž‹](../../sql-reference/dictionaries/index.md#dictionary-key-and-fields#ext_dict_structure-attributes)ã§æ­£å¸¸ã«è§£æžã™ã‚‹ã¨ã€é–¢æ•°ã¯`id_expr`ã«å¯¾å¿œã™ã‚‹Dictionary属性ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +- Dictionaryã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã•ã‚ŒãŸ`id_expr`ãŒãªã„å ´åˆï¼š + + - `dictGet[Type]`ã¯ã€Dictionary設定ã§å±žæ€§ã«æŒ‡å®šã•ã‚ŒãŸ``è¦ç´ ã®å†…容を返ã—ã¾ã™ã€‚ + - `dictGet[Type]OrDefault`ã¯ã€`default_value_expr`パラメータã¨ã—ã¦æ¸¡ã•ã‚ŒãŸå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +ClickHouseã¯ã€å±žæ€§ã®å€¤ã‚’解æžã§ããªã„å ´åˆã‚„ã€å€¤ãŒå±žæ€§ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨ä¸€è‡´ã—ãªã„å ´åˆã«ä¾‹å¤–をスローã—ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/functions/files.md b/docs/ja/sql-reference/functions/files.md new file mode 100644 index 00000000000..6b4d82e2d42 --- /dev/null +++ b/docs/ja/sql-reference/functions/files.md @@ -0,0 +1,31 @@ +--- +slug: /ja/sql-reference/functions/files +sidebar_position: 75 +sidebar_label: Files +--- + +## file + +ファイルを文字列ã¨ã—ã¦èª­ã¿è¾¼ã¿ã€æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã«ãƒ‡ãƒ¼ã‚¿ã‚’ロードã—ã¾ã™ã€‚ファイルã®å†…容ã¯è§£é‡ˆã•ã‚Œã¾ã›ã‚“。 + +テーブル関数 [file](../table-functions/file.md) ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +file(path[, default]) +``` + +**引数** + +- `path` — [user_files_path](../../operations/server-configuration-parameters/settings.md#user_files_path) ã«å¯¾ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®ç›¸å¯¾ãƒ‘ス。ワイルドカード `*`, `**`, `?`, `{abc,def}` ãŠã‚ˆã³ `{N..M}` ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€`N` 㨠`M` ã¯æ•°å€¤ã€`'abc', 'def'` ã¯æ–‡å­—列ã§ã™ã€‚ +- `default` — ファイルãŒå­˜åœ¨ã—ãªã„ã‹ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã„å ´åˆã«è¿”ã•ã‚Œã‚‹å€¤ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—㯠[String](../data-types/string.md) ãŠã‚ˆã³ [NULL](../../sql-reference/syntax.md#null-literal) ã§ã™ã€‚ + +**例** + +ファイル a.txt ãŠã‚ˆã³ b.txt ã®ãƒ‡ãƒ¼ã‚¿ã‚’文字列ã¨ã—ã¦ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹ä¾‹: + +``` sql +INSERT INTO table SELECT file('a.txt'), file('b.txt'); +``` + diff --git a/docs/ja/sql-reference/functions/functions-for-nulls.md b/docs/ja/sql-reference/functions/functions-for-nulls.md new file mode 100644 index 00000000000..3753d3eaae7 --- /dev/null +++ b/docs/ja/sql-reference/functions/functions-for-nulls.md @@ -0,0 +1,453 @@ +--- +slug: /ja/sql-reference/functions/functions-for-nulls +sidebar_position: 135 +sidebar_label: Nullable +--- + +# Nullable 値を扱ã†é–¢æ•° + +## isNull + +引数㌠[NULL](../../sql-reference/syntax.md#null) ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +æ¼”ç®—å­ [`IS NULL`](../operators/index.md#is_null) ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +isNull(x) +``` + +別å: `ISNULL`. + +**引数** + +- `x` — éžè¤‡åˆãƒ‡ãƒ¼ã‚¿åž‹ã®å€¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x` ㌠`NULL` ã®å ´åˆã¯ `1`。 +- `x` ㌠`NULL` ã§ãªã„å ´åˆã¯ `0`。 + +**例** + +テーブル: + +``` text +┌─x─┬────y─┠+│ 1 │ á´ºáµá´¸á´¸ │ +│ 2 │ 3 │ +└───┴──────┘ +``` + +クエリ: + +``` sql +SELECT x FROM t_null WHERE isNull(y); +``` + +çµæžœ: + +``` text +┌─x─┠+│ 1 │ +└───┘ +``` + +## isNullable + +カラム㌠[Nullable](../data-types/nullable.md) ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚Nullable 㯠`NULL` 値を許å¯ã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +**構文** + +``` sql +isNullable(x) +``` + +**引数** + +- `x` — カラム。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x` ㌠`NULL` 値を許å¯ã™ã‚‹å ´åˆã¯ `1`。 [UInt8](../data-types/int-uint.md). +- `x` ㌠`NULL` 値を許å¯ã—ãªã„å ´åˆã¯ `0`。 [UInt8](../data-types/int-uint.md). + +**例** + +クエリ: + +``` sql +CREATE TABLE tab (ordinary_col UInt32, nullable_col Nullable(UInt32)) ENGINE = Log; +INSERT INTO tab (ordinary_col, nullable_col) VALUES (1,1), (2, 2), (3,3); +SELECT isNullable(ordinary_col), isNullable(nullable_col) FROM tab; +``` + +çµæžœ: + +``` text + ┌───isNullable(ordinary_col)──┬───isNullable(nullable_col)──┠+1. │ 0 │ 1 │ +2. │ 0 │ 1 │ +3. │ 0 │ 1 │ + └─────────────────────────────┴─────────────────────────────┘ +``` + +## isNotNull + +引数㌠[NULL](../../sql-reference/syntax.md#null-literal) ã§ãªã„ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +æ¼”ç®—å­ [`IS NOT NULL`](../operators/index.md#is_not_null) ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +``` sql +isNotNull(x) +``` + +**引数:** + +- `x` — éžè¤‡åˆãƒ‡ãƒ¼ã‚¿åž‹ã®å€¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x` ㌠`NULL` ã§ãªã„å ´åˆã¯ `1`。 +- `x` ㌠`NULL` ã®å ´åˆã¯ `0`。 + +**例** + +テーブル: + +``` text +┌─x─┬────y─┠+│ 1 │ á´ºáµá´¸á´¸ │ +│ 2 │ 3 │ +└───┴──────┘ +``` + +クエリ: + +``` sql +SELECT x FROM t_null WHERE isNotNull(y); +``` + +çµæžœ: + +``` text +┌─x─┠+│ 2 │ +└───┘ +``` + +## isNotDistinctFrom + +NULL セーフãªæ¯”較を行ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€JOIN ON セクション㧠NULL 値をå«ã‚€ JOIN キーを比較ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ 2 ã¤ã® `NULL` 値をåŒä¸€ã¨ã¿ãªã—ã€é€šå¸¸ã®ç­‰å·ã®å‹•ä½œã¨ã¯ç•°ãªã‚Šã€2 ã¤ã® `NULL` 値を比較ã™ã‚‹ã¨ `NULL` ã‚’è¿”ã—ã¾ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ã¯ JOIN ON ã®å®Ÿè£…ã«ä½¿ç”¨ã•ã‚Œã‚‹å†…部関数ã§ã™ã€‚クエリã§æ‰‹å‹•ã§ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。 +::: + +**構文** + +``` sql +isNotDistinctFrom(x, y) +``` + +**引数** + +- `x` — 第1ã® JOIN キー。 +- `y` — 第2ã® JOIN キー。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x` 㨠`y` ãŒä¸¡æ–¹ã¨ã‚‚ `NULL` ã®å ´åˆã¯ `true`。 +- ãれ以外ã®å ´åˆã¯ `false`。 + +**例** + +完全ãªä¾‹ã«ã¤ã„ã¦ã¯ã€[JOIN キーã«ãŠã‘ã‚‹ NULL 値](../../sql-reference/statements/select/join#null-values-in-join-keys)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## isZeroOrNull + +引数㌠0(ゼロ)ã¾ãŸã¯ [NULL](../../sql-reference/syntax.md#null-literal) ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +isZeroOrNull(x) +``` + +**引数:** + +- `x` — éžè¤‡åˆãƒ‡ãƒ¼ã‚¿åž‹ã®å€¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x` ㌠0(ゼロ)ã¾ãŸã¯ `NULL` ã®å ´åˆã¯ `1`。 +- ãれ以外㯠`0`。 + +**例** + +テーブル: + +``` text +┌─x─┬────y─┠+│ 1 │ á´ºáµá´¸á´¸ │ +│ 2 │ 0 │ +│ 3 │ 3 │ +└───┴──────┘ +``` + +クエリ: + +``` sql +SELECT x FROM t_null WHERE isZeroOrNull(y); +``` + +çµæžœ: + +``` text +┌─x─┠+│ 1 │ +│ 2 │ +└───┘ +``` + +## coalesce + +最も左ã«ã‚ã‚‹`NULL` ã§ãªã„引数を返ã—ã¾ã™ã€‚ + +``` sql +coalesce(x,...) +``` + +**引数:** + +- 複åˆåž‹ã§ãªã„ä»»æ„ã®æ•°ã®ãƒ‘ラメータ。ã™ã¹ã¦ã®ãƒ‘ラメータã¯äº’ã„ã«äº’æ›æ€§ã®ã‚るデータ型ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最åˆã® `NULL` ã§ãªã„引数 +- ã™ã¹ã¦ã®å¼•æ•°ãŒ `NULL` ã®å ´åˆã€`NULL`。 + +**例** + +顧客ã«é€£çµ¡ã™ã‚‹ãŸã‚ã®è¤‡æ•°ã®æ–¹æ³•ã‚’示ã™é€£çµ¡å…ˆã®ãƒªã‚¹ãƒˆã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚ + +``` text +┌─name─────┬─mail─┬─phone─────┬──telegram─┠+│ client 1 │ á´ºáµá´¸á´¸ │ 123-45-67 │ 123 │ +│ client 2 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +└──────────┴──────┴───────────┴───────────┘ +``` + +`mail` 㨠`phone` フィールド㯠String ã®åž‹ã§ã™ãŒã€`telegram` フィールド㯠`UInt32` ãªã®ã§ `String` ã«å¤‰æ›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +顧客ã®ãŸã‚ã«æœ€åˆã«åˆ©ç”¨å¯èƒ½ãªé€£çµ¡æ–¹æ³•ã‚’連絡先リストã‹ã‚‰å–å¾—ã—ã¾ã™: + +``` sql +SELECT name, coalesce(mail, phone, CAST(telegram,'Nullable(String)')) FROM aBook; +``` + +``` text +┌─name─────┬─coalesce(mail, phone, CAST(telegram, 'Nullable(String)'))─┠+│ client 1 │ 123-45-67 │ +│ client 2 │ á´ºáµá´¸á´¸ │ +└──────────┴───────────────────────────────────────────────────────────┘ +``` + +## ifNull + +引数㌠`NULL` ã§ã‚ã‚‹å ´åˆã«ä»£æ›¿å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +ifNull(x, alt) +``` + +**引数:** + +- `x` — `NULL` ã‹ã©ã†ã‹ã‚’確èªã™ã‚‹å€¤ã€‚ +- `alt` — `x` ㌠`NULL` ã§ã‚ã‚‹å ´åˆã«é–¢æ•°ãŒè¿”ã™å€¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x` ㌠`NULL` ã§ãªã„å ´åˆã€`x`。 +- `x` ㌠`NULL` ã®å ´åˆã€`alt`。 + +**例** + +クエリ: + +``` sql +SELECT ifNull('a', 'b'); +``` + +çµæžœ: + +``` text +┌─ifNull('a', 'b')─┠+│ a │ +└──────────────────┘ +``` + +クエリ: + +``` sql +SELECT ifNull(NULL, 'b'); +``` + +çµæžœ: + +``` text +┌─ifNull(NULL, 'b')─┠+│ b │ +└───────────────────┘ +``` + +## nullIf + +2ã¤ã®å¼•æ•°ãŒç­‰ã—ã„å ´åˆã€`NULL` ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +nullIf(x, y) +``` + +**引数:** + +`x`, `y` — 比較ã™ã‚‹å€¤ã€‚互æ›æ€§ã®ã‚ã‚‹åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ãŒç­‰ã—ã„å ´åˆã€`NULL`。 +- 引数ãŒç­‰ã—ããªã„å ´åˆã€`x`。 + +**例** + +クエリ: + +``` sql +SELECT nullIf(1, 1); +``` + +çµæžœ: + +``` text +┌─nullIf(1, 1)─┠+│ á´ºáµá´¸á´¸ │ +└──────────────┘ +``` + +クエリ: + +``` sql +SELECT nullIf(1, 2); +``` + +çµæžœ: + +``` text +┌─nullIf(1, 2)─┠+│ 1 │ +└──────────────┘ +``` + +## assumeNotNull + +[Nullable](../data-types/nullable.md) åž‹ã®å€¤ã«å¯¾ã—ã¦ã€å¯¾å¿œã™ã‚‹éž `Nullable` 値を返ã—ã¾ã™ã€‚å…ƒã®å€¤ãŒ `NULL` ã®å ´åˆã€ä»»æ„ã®çµæžœãŒè¿”ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚関数 `ifNull` ãŠã‚ˆã³ `coalesce` ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +``` sql +assumeNotNull(x) +``` + +**引数:** + +- `x` — å…ƒã®å€¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 値㌠`NULL` ã§ãªã„å ´åˆã€å…¥åŠ›å€¤ã‚’éž `Nullable` åž‹ã§è¿”ã—ã¾ã™ã€‚ +- 入力値㌠`NULL` ã®å ´åˆã€ä»»æ„ã®å€¤ã€‚ + +**例** + +テーブル: + +``` text + +┌─x─┬────y─┠+│ 1 │ á´ºáµá´¸á´¸ │ +│ 2 │ 3 │ +└───┴──────┘ +``` + +クエリ: + +``` sql +SELECT assumeNotNull(y) FROM table; +``` + +çµæžœ: + +``` text +┌─assumeNotNull(y)─┠+│ 0 │ +│ 3 │ +└──────────────────┘ +``` + +クエリ: + +``` sql +SELECT toTypeName(assumeNotNull(y)) FROM t_null; +``` + +çµæžœ: + +``` text +┌─toTypeName(assumeNotNull(y))─┠+│ Int8 │ +│ Int8 │ +└──────────────────────────────┘ +``` + +## toNullable + +引数ã®åž‹ã‚’ `Nullable` ã«å¤‰æ›ã—ã¾ã™ã€‚ + +``` sql +toNullable(x) +``` + +**引数:** + +- `x` — éžè¤‡åˆåž‹ã®å€¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力値を `Nullable` åž‹ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT toTypeName(10); +``` + +çµæžœ: + +``` text +┌─toTypeName(10)─┠+│ UInt8 │ +└────────────────┘ +``` + +クエリ: + +``` sql +SELECT toTypeName(toNullable(10)); +``` + +çµæžœ: + +``` text +┌─toTypeName(toNullable(10))─┠+│ Nullable(UInt8) │ +└────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/geo/coordinates.md b/docs/ja/sql-reference/functions/geo/coordinates.md new file mode 100644 index 00000000000..37dd91bf37e --- /dev/null +++ b/docs/ja/sql-reference/functions/geo/coordinates.md @@ -0,0 +1,173 @@ +--- +slug: /ja/sql-reference/functions/geo/coordinates +sidebar_label: 地ç†åº§æ¨™ +sidebar_position: 62 +title: "地ç†åº§æ¨™ã‚’扱ã†ãŸã‚ã®é–¢æ•°" +--- + +## greatCircleDistance + +[大åœè·é›¢ã®å…¬å¼](https://en.wikipedia.org/wiki/Great-circle_distance)を使用ã—ã¦ã€åœ°çƒè¡¨é¢ã®2点間ã®è·é›¢ã‚’計算ã—ã¾ã™ã€‚ + +``` sql +greatCircleDistance(lon1Deg, lat1Deg, lon2Deg, lat2Deg) +``` + +**入力パラメータ** + +- `lon1Deg` — 最åˆã®ç‚¹ã®çµŒåº¦ï¼ˆåº¦ï¼‰ã€‚範囲: `[-180°, 180°]`。 +- `lat1Deg` — 最åˆã®ç‚¹ã®ç·¯åº¦ï¼ˆåº¦ï¼‰ã€‚範囲: `[-90°, 90°]`。 +- `lon2Deg` — 2番目ã®ç‚¹ã®çµŒåº¦ï¼ˆåº¦ï¼‰ã€‚範囲: `[-180°, 180°]`。 +- `lat2Deg` — 2番目ã®ç‚¹ã®ç·¯åº¦ï¼ˆåº¦ï¼‰ã€‚範囲: `[-90°, 90°]`。 + +æ­£ã®å€¤ã¯åŒ—ç·¯ãŠã‚ˆã³æ±çµŒã‚’示ã—ã€è² ã®å€¤ã¯å—ç·¯ãŠã‚ˆã³è¥¿çµŒã‚’示ã—ã¾ã™ã€‚ + +**戻り値** + +地çƒè¡¨é¢ä¸Šã®2点間ã®è·é›¢ï¼ˆãƒ¡ãƒ¼ãƒˆãƒ«å˜ä½ï¼‰ã€‚ + +入力パラメータã®å€¤ãŒç¯„囲外ã®å ´åˆã€ä¾‹å¤–ãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +**例** + +``` sql +SELECT greatCircleDistance(55.755831, 37.617673, -55.755831, -37.617673) AS greatCircleDistance +``` + +``` text +┌─greatCircleDistance─┠+│ 14128352 │ +└─────────────────────┘ +``` + +## geoDistance + +`greatCircleDistance`ã«ä¼¼ã¦ã„ã¾ã™ãŒã€çƒä½“ã®ä»£ã‚ã‚Šã«WGS-84楕円体上ã§ã®è·é›¢ã‚’計算ã—ã¾ã™ã€‚ã“ã‚Œã¯åœ°çƒã®ã‚¸ã‚ªã‚¤ãƒ‰ã®ã‚ˆã‚Šæ­£ç¢ºãªè¿‘ä¼¼ã§ã™ã€‚パフォーマンスã¯`greatCircleDistance`ã¨åŒã˜ï¼ˆãƒ‘フォーマンスã®ä½Žä¸‹ã¯ãªã—)。地çƒä¸Šã®è·é›¢ã‚’計算ã™ã‚‹ãŸã‚ã«ã¯`geoDistance`を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +技術的ãªæ³¨è¨˜: å分ã«è¿‘ã„点ã®å ´åˆã€åº§æ¨™ã®ä¸­ç‚¹ã§ã®æŽ¥å¹³é¢ä¸Šã®ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’用ã„ã¦å¹³é¢è¿‘似を使用ã—ã¦ã„ã¾ã™ã€‚ + +``` sql +geoDistance(lon1Deg, lat1Deg, lon2Deg, lat2Deg) +``` + +**入力パラメータ** + +- `lon1Deg` — 最åˆã®ç‚¹ã®çµŒåº¦ï¼ˆåº¦ï¼‰ã€‚範囲: `[-180°, 180°]`。 +- `lat1Deg` — 最åˆã®ç‚¹ã®ç·¯åº¦ï¼ˆåº¦ï¼‰ã€‚範囲: `[-90°, 90°]`。 +- `lon2Deg` — 2番目ã®ç‚¹ã®çµŒåº¦ï¼ˆåº¦ï¼‰ã€‚範囲: `[-180°, 180°]`。 +- `lat2Deg` — 2番目ã®ç‚¹ã®ç·¯åº¦ï¼ˆåº¦ï¼‰ã€‚範囲: `[-90°, 90°]`。 + +æ­£ã®å€¤ã¯åŒ—ç·¯ãŠã‚ˆã³æ±çµŒã‚’示ã—ã€è² ã®å€¤ã¯å—ç·¯ãŠã‚ˆã³è¥¿çµŒã‚’示ã—ã¾ã™ã€‚ + +**戻り値** + +地çƒè¡¨é¢ä¸Šã®2点間ã®è·é›¢ï¼ˆãƒ¡ãƒ¼ãƒˆãƒ«å˜ä½ï¼‰ã€‚ + +入力パラメータã®å€¤ãŒç¯„囲外ã®å ´åˆã€ä¾‹å¤–ãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +**例** + +``` sql +SELECT geoDistance(38.8976, -77.0366, 39.9496, -75.1503) AS geoDistance +``` + +``` text +┌─geoDistance─┠+│ 212458.73 │ +└─────────────┘ +``` + +## greatCircleAngle + +[大åœè·é›¢ã®å…¬å¼](https://en.wikipedia.org/wiki/Great-circle_distance)を使用ã—ã¦ã€åœ°çƒè¡¨é¢ã®2点間ã®ä¸­å¿ƒè§’を計算ã—ã¾ã™ã€‚ + +``` sql +greatCircleAngle(lon1Deg, lat1Deg, lon2Deg, lat2Deg) +``` + +**入力パラメータ** + +- `lon1Deg` — 最åˆã®ç‚¹ã®çµŒåº¦ï¼ˆåº¦ï¼‰ã€‚ +- `lat1Deg` — 最åˆã®ç‚¹ã®ç·¯åº¦ï¼ˆåº¦ï¼‰ã€‚ +- `lon2Deg` — 2番目ã®ç‚¹ã®çµŒåº¦ï¼ˆåº¦ï¼‰ã€‚ +- `lat2Deg` — 2番目ã®ç‚¹ã®ç·¯åº¦ï¼ˆåº¦ï¼‰ã€‚ + +**戻り値** + +2点間ã®ä¸­å¿ƒè§’(度å˜ä½ï¼‰ã€‚ + +**例** + +``` sql +SELECT greatCircleAngle(0, 0, 45, 0) AS arc +``` + +``` text +┌─arc─┠+│ 45 │ +└─────┘ +``` + +## pointInEllipses + +点ãŒå°‘ãªãã¨ã‚‚1ã¤ã®æ¥•å††ã«å±žã—ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ +座標ã¯ç›´äº¤åº§æ¨™ç³»ã§å¹¾ä½•çš„ãªã‚‚ã®ã§ã‚ã‚Šã¾ã™ã€‚ + +``` sql +pointInEllipses(x, y, xâ‚€, yâ‚€, aâ‚€, bâ‚€,...,xâ‚™, yâ‚™, aâ‚™, bâ‚™) +``` + +**入力パラメータ** + +- `x, y` — å¹³é¢ä¸Šã®ç‚¹ã®åº§æ¨™ã€‚ +- `xáµ¢, yáµ¢` — `i`番目ã®æ¥•å††ã®ä¸­å¿ƒã®åº§æ¨™ã€‚ +- `aáµ¢, báµ¢` — `i`番目ã®æ¥•å††ã®x, y座標å˜ä½ã®é•·è»¸ã€‚ + +入力パラメータ㯠`2+4â‹…n` ã§ãªã‘ã‚Œã°ãªã‚‰ãšã€ã“ã“㧠`n` ã¯æ¥•å††ã®æ•°ã§ã™ã€‚ + +**戻り値** + +点ãŒå°‘ãªãã¨ã‚‚1ã¤ã®æ¥•å††ã®å†…部ã«ã‚ã‚‹å ´åˆã¯ `1` ã€ãã†ã§ãªã„å ´åˆã¯ `0` 。 + +**例** + +``` sql +SELECT pointInEllipses(10., 10., 10., 9.1, 1., 0.9999) +``` + +``` text +┌─pointInEllipses(10., 10., 10., 9.1, 1., 0.9999)─┠+│ 1 │ +└─────────────────────────────────────────────────┘ +``` + +## pointInPolygon + +点ãŒå¹³é¢ä¸Šã®å¤šè§’å½¢ã«å±žã—ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +``` sql +pointInPolygon((x, y), [(a, b), (c, d) ...], ...) +``` + +**入力値** + +- `(x, y)` — å¹³é¢ä¸Šã®ç‚¹ã®åº§æ¨™ã€‚データタイプ — [Tuple](../../data-types/tuple.md) — 2ã¤ã®æ•°ã®ã‚¿ãƒ—ル。 +- `[(a, b), (c, d) ...]` — 多角形ã®é ‚点。データタイプ — [Array](../../data-types/array.md)。å„頂点ã¯åº§æ¨™ã®ãƒšã‚¢ `(a, b)` ã§è¡¨ã•ã‚Œã¾ã™ã€‚頂点ã¯æ™‚計回りã¾ãŸã¯å時計回りã®é †åºã§æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚頂点ã®æœ€å°æ•°ã¯ 3 ã§ã™ã€‚多角形ã¯å®šæ•°ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +- ã“ã®é–¢æ•°ã¯ã€ç©´ã®ã‚る多角形(切りå–られãŸéƒ¨åˆ†ï¼‰ã‚‚サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ã“ã®å ´åˆã€åˆ‡ã‚Šå–られãŸéƒ¨åˆ†ã‚’定義ã™ã‚‹å¤šè§’形を追加ã®å¼•æ•°ã§æ¸¡ã—ã¾ã™ã€‚éžå˜é€£çµãªå¤šè§’å½¢ã¯ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。 + +**戻り値** + +点ãŒå¤šè§’å½¢ã®å†…部ã«ã‚ã‚‹å ´åˆã¯ `1` ã€ãã†ã§ãªã„å ´åˆã¯ `0` 。 +点ãŒå¤šè§’å½¢ã®å¢ƒç•Œä¸Šã«ã‚ã‚‹å ´åˆã€é–¢æ•°ã¯0ã¾ãŸã¯1ã©ã¡ã‚‰ã‹ã‚’è¿”ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** + +``` sql +SELECT pointInPolygon((3., 3.), [(6, 0), (8, 4), (5, 8), (0, 2)]) AS res +``` + +``` text +┌─res─┠+│ 1 │ +└─────┘ +``` diff --git a/docs/ja/sql-reference/functions/geo/geohash.md b/docs/ja/sql-reference/functions/geo/geohash.md new file mode 100644 index 00000000000..b2030efd13e --- /dev/null +++ b/docs/ja/sql-reference/functions/geo/geohash.md @@ -0,0 +1,129 @@ +--- +slug: /ja/sql-reference/functions/geo/geohash +sidebar_label: Geohash +title: "Geohashを扱ã†ãŸã‚ã®é–¢æ•°" +--- + +## Geohash + +[Geohash](https://en.wikipedia.org/wiki/Geohash)ã¯ã€åœ°çƒã®è¡¨é¢ã‚’æ ¼å­çŠ¶ã®ãƒã‚±ãƒ„ã«åˆ†å‰²ã—ã€å„セルを短ã„文字ã¨æ•°å­—ã®æ–‡å­—列ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹ã‚¸ã‚ªã‚³ãƒ¼ãƒ‰ã‚·ã‚¹ãƒ†ãƒ ã§ã™ã€‚ã“ã‚Œã¯éšŽå±¤çš„ãªãƒ‡ãƒ¼ã‚¿æ§‹é€ ã§ã‚ã‚Šã€geohash文字列ãŒé•·ã‘ã‚Œã°é•·ã„ã»ã©ã€ã‚ˆã‚Šæ­£ç¢ºãªåœ°ç†çš„ä½ç½®ã‚’表ã—ã¾ã™ã€‚ + +地ç†åº§æ¨™ã‚’手動ã§geohash文字列ã«å¤‰æ›ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€[geohash.org](http://geohash.org/)を使用ã§ãã¾ã™ã€‚ + +## geohashEncode + +緯度ã¨çµŒåº¦ã‚’[geohash](#geohash)文字列ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ + +**構文** + +``` sql +geohashEncode(longitude, latitude, [precision]) +``` + +**入力値** + +- `longitude` — エンコードã—ãŸã„座標ã®çµŒåº¦éƒ¨åˆ†ã€‚範囲`[-180°, 180°]`ã®æµ®å‹•å°æ•°ç‚¹ã€‚[Float](../../data-types/float.md)。 +- `latitude` — エンコードã—ãŸã„座標ã®ç·¯åº¦éƒ¨åˆ†ã€‚範囲 `[-90°, 90°]`ã®æµ®å‹•å°æ•°ç‚¹ã€‚[Float](../../data-types/float.md)。 +- `precision` (オプション) — çµæžœã¨ã—ã¦å¾—られるエンコードã•ã‚ŒãŸæ–‡å­—列ã®é•·ã•ã€‚デフォルトã¯`12`。整数ã§ç¯„囲 `[1, 12]`。[Int8](../../data-types/int-uint.md)。 + +:::note +- ã™ã¹ã¦ã®åº§æ¨™ãƒ‘ラメータã¯åŒã˜åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: `Float32`ã¾ãŸã¯`Float64`。 +- `precision`パラメータã§ã¯ã€`1`未満ã¾ãŸã¯`12`を超ãˆã‚‹å€¤ã¯é»™ã£ã¦`12`ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- エンコードã•ã‚ŒãŸåº§æ¨™ã®è‹±æ•°å­—文字列(base32エンコーディングアルファベットã®ä¿®æ­£ç‰ˆãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼‰ã€‚[String](../../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT geohashEncode(-5.60302734375, 42.593994140625, 0) AS res; +``` + +çµæžœ: + +``` text +┌─res──────────┠+│ ezs42d000000 │ +└──────────────┘ +``` + +## geohashDecode + +ä»»æ„ã®[geohash](#geohash)エンコーディングã•ã‚ŒãŸæ–‡å­—列を経度ã¨ç·¯åº¦ã«ãƒ‡ã‚³ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ + +**構文** + +```sql +geohashDecode(hash_str) +``` + +**入力値** + +- `hash_str` — Geohashエンコードã•ã‚ŒãŸæ–‡å­—列。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 経度ã¨ç·¯åº¦ã®`Float64`値ã®ã‚¿ãƒ—ル`(longitude, latitude)`。[Tuple](../../data-types/tuple.md)([Float64](../../data-types/float.md)) + +**例** + +``` sql +SELECT geohashDecode('ezs42') AS res; +``` + +``` text +┌─res─────────────────────────────┠+│ (-5.60302734375,42.60498046875) │ +└─────────────────────────────────┘ +``` + +## geohashesInBox + +指定ã•ã‚ŒãŸç²¾åº¦ã®[geohash](#geohash)エンコードã•ã‚ŒãŸæ–‡å­—列ã®é…列を返ã—ã¾ã™ã€‚ã“ã®é…列ã«å«ã¾ã‚Œã‚‹æ–‡å­—列ã¯ã€æŒ‡å®šã•ã‚ŒãŸãƒœãƒƒã‚¯ã‚¹ã®å¢ƒç•Œå†…ã«å­˜åœ¨ã—ã€äº¤å·®ã—ã¾ã™ã€‚基本的ã«ã¯2Dグリッドをé…列ã«å¹³å¦åŒ–ã—ãŸã‚‚ã®ã§ã™ã€‚ + +**構文** + +``` sql +geohashesInBox(longitude_min, latitude_min, longitude_max, latitude_max, precision) +``` + +**引数** + +- `longitude_min` — 最å°çµŒåº¦ã€‚範囲: `[-180°, 180°]`。[Float](../../data-types/float.md)。 +- `latitude_min` — 最å°ç·¯åº¦ã€‚範囲: `[-90°, 90°]`。[Float](../../data-types/float.md)。 +- `longitude_max` — 最大経度。範囲: `[-180°, 180°]`。[Float](../../data-types/float.md)。 +- `latitude_max` — 最大緯度。範囲: `[-90°, 90°]`。[Float](../../data-types/float.md)。 +- `precision` — Geohashã®ç²¾åº¦ã€‚範囲: `[1, 12]`。[UInt8](../../data-types/int-uint.md)。 + +:::note +ã™ã¹ã¦ã®åº§æ¨™ãƒ‘ラメータã¯åŒã˜åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: `Float32`ã¾ãŸã¯`Float64`。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸã‚¨ãƒªã‚¢ã‚’ã‚«ãƒãƒ¼ã™ã‚‹ geohashボックスã®é…列ã§ã€ãã®é †åºã«ä¾å­˜ã™ã‚‹ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。[Array](../../data-types/array.md)([String](../../data-types/string.md))。 +- `[]` - 最å°ã®ç·¯åº¦ãŠã‚ˆã³çµŒåº¦ã®å€¤ãŒã€ãã‚Œãžã‚Œã®æœ€å¤§å€¤ã‚’下回らãªã„å ´åˆã¯ç©ºã®é…列。 + +:::note +関数ã¯ã€çµæžœã®é…列ãŒ10,000,000項目を超ãˆã‚‹ã¨ä¾‹å¤–を投ã’ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT geohashesInBox(24.48, 40.56, 24.785, 40.81, 4) AS thasos; +``` + +çµæžœ: + +``` text +┌─thasos──────────────────────────────────────┠+│ ['sx1q','sx1r','sx32','sx1w','sx1x','sx38'] │ +└─────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/geo/h3.md b/docs/ja/sql-reference/functions/geo/h3.md new file mode 100644 index 00000000000..bcd707240d2 --- /dev/null +++ b/docs/ja/sql-reference/functions/geo/h3.md @@ -0,0 +1,1509 @@ +--- +slug: /ja/sql-reference/functions/geo/h3 +sidebar_label: H3 Indexes +title: "H3 インデックスをæ“作ã™ã‚‹é–¢æ•°" +--- + +## H3 インデックス + +[H3](https://eng.uber.com/h3/) ã¯åœ°çƒã®è¡¨é¢ã‚’å‡ä¸€ãªå…­è§’å½¢ã®ã‚»ãƒ«ã®ã‚°ãƒªãƒƒãƒ‰ã«åˆ†å‰²ã™ã‚‹åœ°ç†çš„インデックスシステムã§ã™ã€‚ã“ã®ã‚·ã‚¹ãƒ†ãƒ ã¯éšŽå±¤çš„ã§ã‚ã‚Šã€æœ€ä¸Šä½ã®å…­è§’形(「親ã€ï¼‰ã‚’7ã¤ã®åŒæ§˜ã§ã‚ˆã‚Šå°ã•ã„六角形(「å­ã€ï¼‰ã«åˆ†å‰²ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +階層ã®ãƒ¬ãƒ™ãƒ«ã¯ `resolution` ã¨å‘¼ã°ã‚Œã€`0` ã‹ã‚‰ `15` ã¾ã§ã®å€¤ã‚’å–ã‚Šã¾ã™ã€‚`0` ãŒæœ€ã‚‚大ããã€æœ€ã‚‚ç²—ã„セルをæŒã¤ `base` レベルã§ã™ã€‚ + +緯度ã¨çµŒåº¦ã®ãƒšã‚¢ã¯64ビットã®H3インデックスã«å¤‰æ›ã•ã‚Œã€ã‚°ãƒªãƒƒãƒ‰ã‚»ãƒ«ã‚’特定ã—ã¾ã™ã€‚ + +H3インデックスã¯ä¸»ã«ä½ç½®ã®ãƒã‚±ãƒƒãƒ†ã‚£ãƒ³ã‚°ã‚„ä»–ã®åœ°ç†ç©ºé–“æ“作ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +H3システムã®è©³ç´°ã¯[Uber Engineeringã®ã‚µã‚¤ãƒˆ](https://eng.uber.com/h3/)ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +## h3IsValid + +数値ãŒæœ‰åŠ¹ãª [H3](#h3-index) インデックスã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’検証ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3IsValid(h3index) +``` + +**パラメータ** + +- `h3index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 1 — æ•°å­—ãŒæœ‰åŠ¹ãªH3インデックス。[UInt8](../../data-types/int-uint.md)。 +- 0 — æ•°å­—ãŒæœ‰åŠ¹ãªH3インデックスã§ã¯ã‚ã‚Šã¾ã›ã‚“。[UInt8](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3IsValid(630814730351855103) AS h3IsValid; +``` + +çµæžœ: + +``` text +┌─h3IsValid─┠+│ 1 │ +└───────────┘ +``` + +## h3GetResolution + +指定ã•ã‚ŒãŸ [H3](#h3-index) インデックスã®è§£åƒåº¦ã‚’定義ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetResolution(h3index) +``` + +**パラメータ** + +- `h3index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- インデックスã®è§£åƒåº¦ã€‚範囲: `[0, 15]`。[UInt8](../../data-types/int-uint.md)。 +- インデックスãŒç„¡åŠ¹ãªå ´åˆã€é–¢æ•°ã¯ãƒ©ãƒ³ãƒ€ãƒ ãªå€¤ã‚’è¿”ã—ã¾ã™ã€‚インデックスを確èªã™ã‚‹ãŸã‚ã«[h3IsValid](#h3isvalid)を使用ã—ã¦ãã ã•ã„。[UInt8](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3GetResolution(639821929606596015) AS resolution; +``` + +çµæžœ: + +``` text +┌─resolution─┠+│ 14 │ +└────────────┘ +``` + +## h3EdgeAngle + +[H3](#h3-index) 六角形エッジã®å¹³å‡é•·ã‚’グレードã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3EdgeAngle(resolution) +``` + +**パラメータ** + +- `resolution` — インデックスã®è§£åƒåº¦ã€‚[UInt8](../../data-types/int-uint.md)。範囲: `[0, 15]`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [H3](#h3-index) 六角形エッジã®å¹³å‡é•·ã‚’グレードã§ç¤ºã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3EdgeAngle(10) AS edgeAngle; +``` + +çµæžœ: + +``` text +┌───────h3EdgeAngle(10)─┠+│ 0.0005927224846720883 │ +└───────────────────────┘ +``` + +## h3EdgeLengthM + +[H3](#h3-index) 六角形エッジã®å¹³å‡é•·ã‚’メートルã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3EdgeLengthM(resolution) +``` + +**パラメータ** + +- `resolution` — インデックスã®è§£åƒåº¦ã€‚[UInt8](../../data-types/int-uint.md)。範囲: `[0, 15]`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [H3](#h3-index) 六角形エッジã®å¹³å‡é•·ã‚’メートルã§ç¤ºã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3EdgeLengthM(15) AS edgeLengthM; +``` + +çµæžœ: + +``` text +┌─edgeLengthM─┠+│ 0.509713273 │ +└─────────────┘ +``` + +## h3EdgeLengthKm + +[H3](#h3-index) 六角形エッジã®å¹³å‡é•·ã‚’キロメートルã§è¨ˆç®—ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3EdgeLengthKm(resolution) +``` + +**パラメータ** + +- `resolution` — インデックスã®è§£åƒåº¦ã€‚[UInt8](../../data-types/int-uint.md)。範囲: `[0, 15]`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [H3](#h3-index) 六角形エッジã®å¹³å‡é•·ã‚’キロメートルã§ç¤ºã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3EdgeLengthKm(15) AS edgeLengthKm; +``` + +çµæžœ: + +``` text +┌─edgeLengthKm─┠+│ 0.000509713 │ +└──────────────┘ +``` + +## geoToH3 + +指定ã•ã‚ŒãŸè§£åƒåº¦ã§`(lon, lat)`ã‚’æŒã¤[H3](#h3-index)ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +geoToH3(lon, lat, resolution) +``` + +**引数** + +- `lon` — 経度。[Float64](../../data-types/float.md)。 +- `lat` — 緯度。[Float64](../../data-types/float.md)。 +- `resolution` — インデックスã®è§£åƒåº¦ã€‚範囲: `[0, 15]`。[UInt8](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 六角形インデックス番å·ã€‚[UInt64](../../data-types/int-uint.md)。 +- エラーã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚[UInt64](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT geoToH3(37.79506683, 55.71290588, 15) AS h3Index; +``` + +çµæžœ: + +``` text +┌────────────h3Index─┠+│ 644325524701193974 │ +└────────────────────┘ +``` + +## h3ToGeo + +指定ã•ã‚ŒãŸ[H3](#h3-index)インデックスã«å¯¾å¿œã™ã‚‹ä¸­å¿ƒã®çµŒåº¦ã¨ç·¯åº¦ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3ToGeo(h3Index) +``` + +**引数** + +- `h3Index` — H3インデックス。[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 二ã¤ã®å€¤ã§æ§‹æˆã•ã‚Œã‚‹ã‚¿ãƒ—ル: `tuple(lon,lat)`。 `lon` — 経度。[Float64](../../data-types/float.md)。 `lat` — 緯度。[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3ToGeo(644325524701193974) AS coordinates; +``` + +çµæžœ: + +``` text +┌─coordinates───────────────────────────┠+│ (37.79506616830252,55.71290243145668) │ +└───────────────────────────────────────┘ +``` + +## h3ToGeoBoundary + +指定ã•ã‚ŒãŸH3インデックスã®å¢ƒç•Œã«å¯¾å¿œã™ã‚‹`(lon, lat)`ã®ãƒšã‚¢ã®é…列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3ToGeoBoundary(h3Index) +``` + +**引数** + +- `h3Index` — H3インデックス。[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `(lon, lat)`ペアã®é…列。[Array](../../data-types/array.md)([Float64](../../data-types/float.md), [Float64](../../data-types/float.md))。 + +**例** + +クエリ: + +``` sql +SELECT h3ToGeoBoundary(644325524701193974) AS coordinates; +``` + +çµæžœ: + +``` text +┌─h3ToGeoBoundary(599686042433355775)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ [(37.2713558667319,-121.91508032705622),(37.353926450852256,-121.8622232890249),(37.42834118609435,-121.92354999630156),(37.42012867767779,-122.03773496427027),(37.33755608435299,-122.090428929044),(37.26319797461824,-122.02910130919001)] │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## h3kRing + +指定ã•ã‚ŒãŸå…­è§’å½¢ã‹ã‚‰åŠå¾„ `k` ã®ä¸­ã®ã™ã¹ã¦ã® [H3](#h3-index) 六角形をランダムãªé †åºã§ãƒªã‚¹ãƒˆã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3kRing(h3index, k) +``` + +**引数** + +- `h3index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 +- `k` — åŠå¾„。[integer](../../data-types/int-uint.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- H3インデックスã®é…列。[Array](../../data-types/array.md)([UInt64](../../data-types/int-uint.md))。 + +**例** + +クエリ: + +``` sql +SELECT arrayJoin(h3kRing(644325529233966508, 1)) AS h3index; +``` + +çµæžœ: + +``` text +┌────────────h3index─┠+│ 644325529233966508 │ +│ 644325529233966497 │ +│ 644325529233966510 │ +│ 644325529233966504 │ +│ 644325529233966509 │ +│ 644325529233966355 │ +│ 644325529233966354 │ +└────────────────────┘ +``` + +## h3GetBaseCell + +指定ã•ã‚ŒãŸ [H3](#h3-index) インデックスã®åŸºæœ¬ã‚»ãƒ«ç•ªå·ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetBaseCell(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 六角形基本セル番å·ã€‚[UInt8](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3GetBaseCell(612916788725809151) AS basecell; +``` + +çµæžœ: + +``` text +┌─basecell─┠+│ 12 │ +└──────────┘ +``` + +## h3HexAreaM2 + +指定ã•ã‚ŒãŸè§£åƒåº¦ã§ã®å…­è§’å½¢ã®å¹³å‡é¢ç©ã‚’平方メートルã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3HexAreaM2(resolution) +``` + +**パラメータ** + +- `resolution` — インデックスã®è§£åƒåº¦ã€‚範囲: `[0, 15]`。[UInt8](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 平方メートルã®é¢ç©ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3HexAreaM2(13) AS area; +``` + +çµæžœ: + +``` text +┌─area─┠+│ 43.9 │ +└──────┘ +``` + +## h3HexAreaKm2 + +指定ã•ã‚ŒãŸè§£åƒåº¦ã§ã®å…­è§’å½¢ã®å¹³å‡é¢ç©ã‚’平方キロメートルã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3HexAreaKm2(resolution) +``` + +**パラメータ** + +- `resolution` — インデックスã®è§£åƒåº¦ã€‚範囲: `[0, 15]`。[UInt8](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 平方キロメートルã®é¢ç©ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3HexAreaKm2(13) AS area; +``` + +çµæžœ: + +``` text +┌──────area─┠+│ 0.0000439 │ +└───────────┘ +``` + +## h3IndexesAreNeighbors + +æä¾›ã•ã‚ŒãŸ [H3](#h3-index) インデックスãŒéš£æŽ¥ã—ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3IndexesAreNeighbors(index1, index2) +``` + +**引数** + +- `index1` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 +- `index2` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `1` — インデックスãŒéš£æŽ¥ã—ã¦ã„ã¾ã™ã€‚[UInt8](../../data-types/int-uint.md)。 +- `0` — インデックスãŒéš£æŽ¥ã—ã¦ã„ã¾ã›ã‚“。[UInt8](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3IndexesAreNeighbors(617420388351344639, 617420388352655359) AS n; +``` + +çµæžœ: + +``` text +┌─n─┠+│ 1 │ +└───┘ +``` + +## h3ToChildren + +指定ã•ã‚ŒãŸ [H3](#h3-index) インデックスã®å­ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®é…列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3ToChildren(index, resolution) +``` + +**引数** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 +- `resolution` — インデックスã®è§£åƒåº¦ã€‚範囲: `[0, 15]`。[UInt8](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å­H3インデックスã®é…列。[Array](../../data-types/array.md)([UInt64](../../data-types/int-uint.md))。 + +**例** + +クエリ: + +``` sql +SELECT h3ToChildren(599405990164561919, 6) AS children; +``` + +çµæžœ: + +``` text +┌─children───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ [603909588852408319,603909588986626047,603909589120843775,603909589255061503,603909589389279231,603909589523496959,603909589657714687] │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## h3ToParent + +指定ã•ã‚ŒãŸ [H3](#h3-index) インデックスをå«ã‚€è¦ªï¼ˆç²—ã„)インデックスを返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3ToParent(index, resolution) +``` + +**引数** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 +- `resolution` — インデックスã®è§£åƒåº¦ã€‚範囲: `[0, 15]`。[UInt8](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 親H3インデックス。[UInt64](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3ToParent(599405990164561919, 3) AS parent; +``` + +çµæžœ: + +``` text +┌─────────────parent─┠+│ 590398848891879423 │ +└────────────────────┘ +``` + +## h3ToString + +`H3Index` インデックスã®è¡¨ç¾ã‚’文字列表ç¾ã«å¤‰æ›ã—ã¾ã™ã€‚ + +``` sql +h3ToString(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- H3インデックスã®æ–‡å­—列表ç¾ã€‚[String](../../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3ToString(617420388352917503) AS h3_string; +``` + +çµæžœ: + +``` text +┌─h3_string───────┠+│ 89184926cdbffff │ +└─────────────────┘ +``` + +## stringToH3 + +文字列表ç¾ã‚’ `H3Index` (UInt64) 表ç¾ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +stringToH3(index_str) +``` + +**パラメータ** + +- `index_str` — H3インデックスã®æ–‡å­—列表ç¾ã€‚[String](../../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚エラーã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚[UInt64](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT stringToH3('89184926cc3ffff') AS index; +``` + +çµæžœ: + +``` text +┌──────────────index─┠+│ 617420388351344639 │ +└────────────────────┘ +``` + +## h3GetResolution + +[H3](#h3-index) インデックスã®è§£åƒåº¦ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetResolution(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- インデックスã®è§£åƒåº¦ã€‚範囲: `[0, 15]`。[UInt8](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3GetResolution(617420388352917503) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ 9 │ +└─────┘ +``` + +## h3IsResClassIII + +[H3](#h3-index) インデックスãŒã‚¯ãƒ©ã‚¹IIIå‘ã‘ã®è§£åƒåº¦ã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3IsResClassIII(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `1` — インデックスãŒã‚¯ãƒ©ã‚¹IIIå‘ã‘ã®è§£åƒåº¦ã‚’æŒã£ã¦ã„ã¾ã™ã€‚[UInt8](../../data-types/int-uint.md)。 +- `0` — インデックスãŒã‚¯ãƒ©ã‚¹IIIå‘ã‘ã®è§£åƒåº¦ã‚’æŒã£ã¦ã„ã¾ã›ã‚“。[UInt8](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3IsResClassIII(617420388352917503) AS res; +``` + +çµæžœ: + +``` text +┌─res─┠+│ 1 │ +└─────┘ +``` + +## h3IsPentagon + +ã“ã® [H3](#h3-index) インデックスãŒäº”角形ã®ã‚»ãƒ«ã‚’表ã—ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3IsPentagon(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `1` — インデックスãŒäº”角形ã®ã‚»ãƒ«ã‚’表ã—ã¦ã„ã¾ã™ã€‚[UInt8](../../data-types/int-uint.md)。 +- `0` — インデックスãŒäº”角形ã®ã‚»ãƒ«ã‚’表ã—ã¦ã„ã¾ã›ã‚“。[UInt8](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3IsPentagon(644721767722457330) AS pentagon; +``` + +çµæžœ: + +``` text +┌─pentagon─┠+│ 0 │ +└──────────┘ +``` + +## h3GetFaces + +指定ã•ã‚ŒãŸ [H3](#h3-index) インデックスã«äº¤å·®ã™ã‚‹äºŒåé¢ä½“é¢ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetFaces(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸH3インデックスã«äº¤å·®ã™ã‚‹äºŒåé¢ä½“é¢ã®é…列。[Array](../../data-types/array.md)([UInt64](../../data-types/int-uint.md))。 + +**例** + +クエリ: + +``` sql +SELECT h3GetFaces(599686042433355775) AS faces; +``` + +çµæžœ: + +``` text +┌─faces─┠+│ [7] │ +└───────┘ +``` + +## h3CellAreaM2 + +指定ã•ã‚ŒãŸå…¥åŠ›H3インデックスã«å¯¾å¿œã™ã‚‹ç‰¹å®šã®ã‚»ãƒ«ã®æ­£ç¢ºãªé¢ç©ã‚’平方メートルã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3CellAreaM2(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- セルã®é¢ç©ã‚’平方メートルã§ç¤ºã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3CellAreaM2(579205133326352383) AS area; +``` + +çµæžœ: + +``` text +┌───────────────area─┠+│ 4106166334463.9233 │ +└────────────────────┘ +``` + +## h3CellAreaRads2 + +指定ã•ã‚ŒãŸå…¥åŠ›H3インデックスã«å¯¾å¿œã™ã‚‹ç‰¹å®šã®ã‚»ãƒ«ã®æ­£ç¢ºãªé¢ç©ã‚’平方ラジアンã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3CellAreaRads2(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- セルã®é¢ç©ã‚’平方ラジアンã§ç¤ºã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3CellAreaRads2(579205133326352383) AS area; +``` + +çµæžœ: + +``` text +┌────────────────area─┠+│ 0.10116268528089567 │ +└─────────────────────┘ +``` + +## h3ToCenterChild + +指定ã•ã‚ŒãŸ[H3](#h3-index)ã®è§£åƒåº¦ã§å«ã¾ã‚Œã‚‹ä¸­å¿ƒã®[H3](#h3-index)å­ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3ToCenterChild(index, resolution) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 +- `resolution` — インデックスã®è§£åƒåº¦ã€‚範囲: `[0, 15]`。[UInt8](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸ[H3](#h3-index)ã®è§£åƒåº¦ã§å«ã¾ã‚Œã‚‹ä¸­å¿ƒã®[H3](#h3-index)å­ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3ToCenterChild(577023702256844799,1) AS centerToChild; +``` + +çµæžœ: + +``` text +┌──────centerToChild─┠+│ 581496515558637567 │ +└────────────────────┘ +``` + +## h3ExactEdgeLengthM + +入力ã•ã‚ŒãŸh3インデックスã«ã‚ˆã£ã¦è¡¨ã•ã‚Œã‚‹ä¸€æ–¹å‘ã®ã‚¨ãƒƒã‚¸ã®æ­£ç¢ºãªé•·ã•ã‚’メートルå˜ä½ã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3ExactEdgeLengthM(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 正確ãªã‚¨ãƒƒã‚¸ã®é•·ã•ã‚’メートルã§ç¤ºã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3ExactEdgeLengthM(1310277011704381439) AS exactEdgeLengthM;; +``` + +çµæžœ: + +``` text +┌───exactEdgeLengthM─┠+│ 195449.63163407316 │ +└────────────────────┘ +``` + +## h3ExactEdgeLengthKm + +入力ã•ã‚ŒãŸh3インデックスã«ã‚ˆã£ã¦è¡¨ã•ã‚Œã‚‹ä¸€æ–¹å‘ã®ã‚¨ãƒƒã‚¸ã®æ­£ç¢ºãªé•·ã•ã‚’キロメートルå˜ä½ã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3ExactEdgeLengthKm(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 正確ãªã‚¨ãƒƒã‚¸ã®é•·ã•ã‚’キロメートルã§ç¤ºã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3ExactEdgeLengthKm(1310277011704381439) AS exactEdgeLengthKm;; +``` + +çµæžœ: + +``` text +┌──exactEdgeLengthKm─┠+│ 195.44963163407317 │ +└────────────────────┘ +``` + +## h3ExactEdgeLengthRads + +入力ã•ã‚ŒãŸh3インデックスã«ã‚ˆã£ã¦è¡¨ã•ã‚Œã‚‹ä¸€æ–¹å‘ã®ã‚¨ãƒƒã‚¸ã®æ­£ç¢ºãªé•·ã•ã‚’ラジアンå˜ä½ã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3ExactEdgeLengthRads(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 正確ãªã‚¨ãƒƒã‚¸ã®é•·ã•ã‚’ラジアンã§ç¤ºã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3ExactEdgeLengthRads(1310277011704381439) AS exactEdgeLengthRads;; +``` + +çµæžœ: + +``` text +┌──exactEdgeLengthRads─┠+│ 0.030677980118976447 │ +└──────────────────────┘ +``` + +## h3NumHexagons + +指定ã•ã‚ŒãŸè§£åƒåº¦ã§ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªH3インデックスã®æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3NumHexagons(resolution) +``` + +**パラメータ** + +- `resolution` — インデックスã®è§£åƒåº¦ã€‚範囲: `[0, 15]`。[UInt8](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- H3インデックスã®æ•°ã€‚[Int64](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT h3NumHexagons(3) AS numHexagons; +``` + +çµæžœ: + +``` text +┌─numHexagons─┠+│ 41162 │ +└─────────────┘ +``` + +## h3PointDistM + +緯度/経度ペアã®é–“ã®ã€Œå¤§å††ã€ã¾ãŸã¯ã€Œãƒãƒãƒ¼ã‚¹ã€è·é›¢ã‚’メートルã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3PointDistM(lat1, lon1, lat2, lon2) +``` + +**引数** + +- `lat1`, `lon1` — 度å˜ä½ã§ç¤ºã•ã‚Œã‚‹ç‚¹1ã®ç·¯åº¦ã¨çµŒåº¦ã€‚[Float64](../../data-types/float.md)。 +- `lat2`, `lon2` — 度å˜ä½ã§ç¤ºã•ã‚Œã‚‹ç‚¹2ã®ç·¯åº¦ã¨çµŒåº¦ã€‚[Float64](../../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒãƒ¼ã‚¹ã¾ãŸã¯å¤§å††è·é›¢ã‚’メートルã§ç¤ºã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +select h3PointDistM(-10.0 ,0.0, 10.0, 0.0) as h3PointDistM; +``` + +çµæžœ: + +``` text +┌──────h3PointDistM─┠+│ 2223901.039504589 │ +└───────────────────┘ +``` + +## h3PointDistKm + +緯度/経度ペアã®é–“ã®ã€Œå¤§å††ã€ã¾ãŸã¯ã€Œãƒãƒãƒ¼ã‚¹ã€è·é›¢ã‚’キロメートルã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3PointDistKm(lat1, lon1, lat2, lon2) +``` + +**引数** + +- `lat1`, `lon1` — 度å˜ä½ã§ç¤ºã•ã‚Œã‚‹ç‚¹1ã®ç·¯åº¦ã¨çµŒåº¦ã€‚[Float64](../../data-types/float.md)。 +- `lat2`, `lon2` — 度å˜ä½ã§ç¤ºã•ã‚Œã‚‹ç‚¹2ã®ç·¯åº¦ã¨çµŒåº¦ã€‚[Float64](../../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒãƒ¼ã‚¹ã¾ãŸã¯å¤§å††è·é›¢ã‚’キロメートルã§ç¤ºã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +select h3PointDistKm(-10.0 ,0.0, 10.0, 0.0) as h3PointDistKm; +``` + +çµæžœ: + +``` text +┌─────h3PointDistKm─┠+│ 2223.901039504589 │ +└───────────────────┘ +``` + +## h3PointDistRads + +緯度/経度ペアã®é–“ã®ã€Œå¤§å††ã€ã¾ãŸã¯ã€Œãƒãƒãƒ¼ã‚¹ã€è·é›¢ã‚’ラジアンã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3PointDistRads(lat1, lon1, lat2, lon2) +``` + +**引数** + +- `lat1`, `lon1` — 度å˜ä½ã§ç¤ºã•ã‚Œã‚‹ç‚¹1ã®ç·¯åº¦ã¨çµŒåº¦ã€‚[Float64](../../data-types/float.md)。 +- `lat2`, `lon2` — 度å˜ä½ã§ç¤ºã•ã‚Œã‚‹ç‚¹2ã®ç·¯åº¦ã¨çµŒåº¦ã€‚[Float64](../../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒãƒ¼ã‚¹ã¾ãŸã¯å¤§å††è·é›¢ã‚’ラジアンã§ç¤ºã—ã¾ã™ã€‚[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +select h3PointDistRads(-10.0 ,0.0, 10.0, 0.0) as h3PointDistRads; +``` + +çµæžœ: + +``` text +┌────h3PointDistRads─┠+│ 0.3490658503988659 │ +└────────────────────┘ +``` + +## h3GetRes0Indexes + +解åƒåº¦0ã®ã™ã¹ã¦ã®H3インデックスã®é…列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetRes0Indexes() +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 解åƒåº¦0ã®ã™ã¹ã¦ã®H3インデックスã®é…列。[Array](../../data-types/array.md)([UInt64](../../data-types/int-uint.md))。 + +**例** + +クエリ: + +``` sql +select h3GetRes0Indexes as indexes ; +``` + +çµæžœ: + +``` text +┌─indexes─────────────────────────────────────┠+│ [576495936675512319,576531121047601151,....]│ +└─────────────────────────────────────────────┘ +``` + +## h3GetPentagonIndexes + +指定ã•ã‚ŒãŸè§£åƒåº¦ã§ã®ã™ã¹ã¦ã®äº”角形H3インデックスを返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetPentagonIndexes(resolution) +``` + +**パラメータ** + +- `resolution` — インデックスã®è§£åƒåº¦ã€‚範囲: `[0, 15]`。[UInt8](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ã™ã¹ã¦ã®äº”角形H3インデックスã®é…列。[Array](../../data-types/array.md)([UInt64](../../data-types/int-uint.md))。 + +**例** + +クエリ: + +``` sql +SELECT h3GetPentagonIndexes(3) AS indexes; +``` + +çµæžœ: + +``` text +┌─indexes────────────────────────────────────────────────────────┠+│ [590112357393367039,590464201114255359,590816044835143679,...] │ +└────────────────────────────────────────────────────────────────┘ +``` + +## h3Line + +æä¾›ã•ã‚ŒãŸäºŒã¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹é–“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ç·šã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3Line(start,end) +``` + +**パラメータ** + +- `start` — 開始点を表ã™å…­è§’å½¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 +- `end` — 終了点を表ã™å…­è§’å½¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +æä¾›ã•ã‚ŒãŸäºŒã¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹é–“ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ç·šã‚’表ã™H3インデックスã®é…列。[Array](../../data-types/array.md)([UInt64](../../data-types/int-uint.md))。 + +**例** + +クエリ: + +``` sql + SELECT h3Line(590080540275638271,590103561300344831) as indexes; +``` + +çµæžœ: + +``` text +┌─indexes────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ [590080540275638271,590080471556161535,590080883873021951,590106516237844479,590104385934065663,590103630019821567,590103561300344831] │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## h3Distance + +æä¾›ã•ã‚ŒãŸäºŒã¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹é–“ã®ã‚°ãƒªãƒƒãƒ‰ã‚»ãƒ«ã§ã®è·é›¢ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3Distance(start,end) +``` + +**パラメータ** + +- `start` — 開始点を表ã™å…­è§’å½¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 +- `end` — 終了点を表ã™å…­è§’å½¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- グリッドセルã®æ•°ã€‚[Int64](../../data-types/int-uint.md)。 + +è·é›¢ã®è¨ˆç®—ãŒå¤±æ•—ã—ãŸå ´åˆã€è² ã®æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql + SELECT h3Distance(590080540275638271,590103561300344831) as distance; +``` + +çµæžœ: + +``` text +┌─distance─┠+│ 7 │ +└──────────┘ +``` + +## h3HexRing + +指定ã•ã‚ŒãŸoriginã®h3Indexを中心ã¨ã™ã‚‹å…­è§’å½¢ã®ãƒªãƒ³ã‚°ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’kã®é•·ã•ã§è¿”ã—ã¾ã™ã€‚ + +五角形ã®æ­ªã¿ãŒãªã‹ã£ãŸå ´åˆã€0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3HexRing(index, k) +``` + +**パラメータ** + +- `index` — 起点を表ã™å…­è§’å½¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 +- `k` — è·é›¢ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- H3インデックスã®é…列。[Array](../../data-types/array.md)([UInt64](../../data-types/int-uint.md))。 + +**例** + +クエリ: + +``` sql + SELECT h3HexRing(590080540275638271, toUInt16(1)) AS hexRing; +``` + +çµæžœ: + +``` text +┌─hexRing─────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ [590080815153545215,590080471556161535,590080677714591743,590077585338138623,590077447899185151,590079509483487231] │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## h3GetUnidirectionalEdge + +æä¾›ã•ã‚ŒãŸå§‹ç‚¹ã¨çµ‚点ã«åŸºã¥ã„ã¦ä¸€æ–¹å‘エッジã®H3インデックスを返ã—ã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetUnidirectionalEdge(originIndex, destinationIndex) +``` + +**パラメータ** + +- `originIndex` — 始点ã®å…­è§’形インデックス番å·ã€‚[UInt64](../../data-types/int-uint.md)。 +- `destinationIndex` — 終点ã®å…­è§’形インデックス番å·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 一方å‘エッジã®å…­è§’形インデックス番å·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql + SELECT h3GetUnidirectionalEdge(599686042433355775, 599686043507097599) as edge; +``` + +çµæžœ: + +``` text +┌────────────────edge─┠+│ 1248204388774707199 │ +└─────────────────────┘ +``` + +## h3UnidirectionalEdgeIsValid + +æä¾›ã•ã‚ŒãŸH3インデックスãŒæœ‰åŠ¹ãªä¸€æ–¹å‘エッジインデックスã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’判断ã—ã¾ã™ã€‚一方å‘エッジã§ã‚ã‚‹å ´åˆã¯1ã‚’ã€ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3UnidirectionalEdgeisValid(index) +``` + +**パラメータ** + +- `index` — 六角形ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 1 — H3インデックスãŒæœ‰åŠ¹ãªä¸€æ–¹å‘エッジã§ã™ã€‚[UInt8](../../data-types/int-uint.md)。 +- 0 — H3インデックスãŒæœ‰åŠ¹ãªä¸€æ–¹å‘エッジã§ã¯ã‚ã‚Šã¾ã›ã‚“。[UInt8](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql + SELECT h3UnidirectionalEdgeIsValid(1248204388774707199) as validOrNot; +``` + +çµæžœ: + +``` text +┌─validOrNot─┠+│ 1 │ +└────────────┘ +``` + +## h3GetOriginIndexFromUnidirectionalEdge + +一方å‘エッジ H3インデックスã‹ã‚‰å§‹ç‚¹ã®å…­è§’形インデックスを返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetOriginIndexFromUnidirectionalEdge(edge) +``` + +**パラメータ** + +- `edge` — 一方å‘エッジを表ã™å…­è§’å½¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 始点ã®å…­è§’形インデックス番å·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql + SELECT h3GetOriginIndexFromUnidirectionalEdge(1248204388774707197) as origin; +``` + +çµæžœ: + +``` text +┌─────────────origin─┠+│ 599686042433355773 │ +└────────────────────┘ +``` + +## h3GetDestinationIndexFromUnidirectionalEdge + +一方å‘エッジ H3インデックスã‹ã‚‰çµ‚点ã®å…­è§’形インデックスを返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetDestinationIndexFromUnidirectionalEdge(edge) +``` + +**パラメータ** + +- `edge` — 一方å‘エッジを表ã™å…­è§’å½¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 終点ã®å…­è§’形インデックス番å·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql + SELECT h3GetDestinationIndexFromUnidirectionalEdge(1248204388774707197) as destination; +``` + +çµæžœ: + +``` text +┌────────destination─┠+│ 599686043507097597 │ +└────────────────────┘ +``` + +## h3GetIndexesFromUnidirectionalEdge + +指定ã•ã‚ŒãŸä¸€æ–¹å‘エッジH3インデックスã‹ã‚‰å§‹ç‚¹ãŠã‚ˆã³çµ‚点ã®å…­è§’形インデックスを返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetIndexesFromUnidirectionalEdge(edge) +``` + +**パラメータ** + +- `edge` — 一方å‘エッジを表ã™å…­è§’å½¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +始点ã¨çµ‚点ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’å«ã‚€ã‚¿ãƒ—ル`tuple(origin,destination)`: + +- `origin` — 始点ã®å…­è§’形インデックス番å·ã€‚[UInt64](../../data-types/int-uint.md)。 +- `destination` — 終点ã®å…­è§’形インデックス番å·ã€‚[UInt64](../../data-types/int-uint.md)。 + +入力ãŒæœ‰åŠ¹ã§ãªã„å ´åˆã¯`(0,0)`ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql + SELECT h3GetIndexesFromUnidirectionalEdge(1248204388774707199) as indexes; +``` + +çµæžœ: + +``` text +┌─indexes─────────────────────────────────┠+│ (599686042433355775,599686043507097599) │ +└─────────────────────────────────────────┘ +``` + +## h3GetUnidirectionalEdgesFromHexagon + +æä¾›ã•ã‚ŒãŸH3インデックスã‹ã‚‰ã®ã™ã¹ã¦ã®ä¸€æ–¹å‘エッジをæä¾›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetUnidirectionalEdgesFromHexagon(index) +``` + +**パラメータ** + +- `index` — 一方å‘エッジを表ã™å…­è§’å½¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +ãã‚Œãžã‚Œã®ä¸€æ–¹å‘エッジを表ã™H3インデックスã®é…列。[Array](../../data-types/array.md)([UInt64](../../data-types/int-uint.md))。 + +**例** + +クエリ: + +``` sql + SELECT h3GetUnidirectionalEdgesFromHexagon(1248204388774707199) as edges; +``` + +çµæžœ: + +``` text +┌─edges─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ [1248204388774707199,1320261982812635135,1392319576850563071,1464377170888491007,1536434764926418943,1608492358964346879] │ +└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## h3GetUnidirectionalEdgeBoundary + +一方å‘エッジを定義ã™ã‚‹åº§æ¨™ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +h3GetUnidirectionalEdgeBoundary(index) +``` + +**パラメータ** + +- `index` — 一方å‘エッジを表ã™å…­è§’å½¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `(lon, lat)`ペアã®é…列。[Array](../../data-types/array.md)([Float64](../../data-types/float.md), [Float64](../../data-types/float.md))。 + +**例** + +クエリ: + +``` sql + SELECT h3GetUnidirectionalEdgeBoundary(1248204388774707199) as boundary; +``` + +çµæžœ: + +``` text +┌─boundary────────────────────────────────────────────────────────────────────────┠+│ [(37.42012867767779,-122.03773496427027),(37.33755608435299,-122.090428929044)] │ +└─────────────────────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/geo/index.md b/docs/ja/sql-reference/functions/geo/index.md new file mode 100644 index 00000000000..84ee7ab7172 --- /dev/null +++ b/docs/ja/sql-reference/functions/geo/index.md @@ -0,0 +1,74 @@ +--- +slug: /ja/sql-reference/functions/geo/ +sidebar_label: Geo +sidebar_position: 62 +title: "地ç†é–¢æ•°" +--- + +## 地ç†åº§æ¨™é–¢æ•° + +- [greatCircleDistance](./coordinates.md#greatcircledistance) +- [geoDistance](./coordinates.md#geodistance) +- [greatCircleAngle](./coordinates.md#greatcircleangle) +- [pointInEllipses](./coordinates.md#pointinellipses) +- [pointInPolygon](./coordinates.md#pointinpolygon) + +## ジオãƒãƒƒã‚·ãƒ¥é–¢æ•° + +- [geohashEncode](./geohash.md#geohashencode) +- [geohashDecode](./geohash.md#geohashdecode) +- [geohashesInBox](./geohash.md#geohashesinbox) + +## H3インデックス関数 + +- [h3IsValid](./h3.md#h3isvalid) +- [h3GetResolution](./h3.md#h3getresolution) +- [h3EdgeAngle](./h3.md#h3edgeangle) +- [h3EdgeLengthM](./h3.md#h3edgelengthm) +- [h3EdgeLengthKm](./h3.md#h3edgelengthkm) +- [geoToH3](./h3.md#geotoh3) +- [h3ToGeo](./h3.md#h3togeo) +- [h3ToGeoBoundary](./h3.md#h3togeoboundary) +- [h3kRing](./h3.md#h3kring) +- [h3GetBaseCell](./h3.md#h3getbasecell) +- [h3HexAreaM2](./h3.md#h3hexaream2) +- [h3HexAreaKm2](./h3.md#h3hexareakm2) +- [h3IndexesAreNeighbors](./h3.md#h3indexesareneighbors) +- [h3ToChildren](./h3.md#h3tochildren) +- [h3ToParent](./h3.md#h3toparent) +- [h3ToString](./h3.md#h3tostring) +- [stringToH3](./h3.md#stringtoh3) +- [h3GetResolution](./h3.md#h3getresolution) +- [h3IsResClassIII](./h3.md#h3isresclassiii) +- [h3IsPentagon](./h3.md#h3ispentagon) +- [h3GetFaces](./h3.md#h3getfaces) +- [h3CellAreaM2](./h3.md#h3cellaream2) +- [h3CellAreaRads2](./h3.md#h3cellarearads2) +- [h3ToCenterChild](./h3.md#h3tocenterchild) +- [h3ExactEdgeLengthM](./h3.md#h3exactedgelengthm) +- [h3ExactEdgeLengthKm](./h3.md#h3exactedgelengthkm) +- [h3ExactEdgeLengthRads](./h3.md#h3exactedgelengthrads) +- [h3NumHexagons](./h3.md#h3numhexagons) +- [h3Line](./h3.md#h3line) +- [h3Distance](./h3.md#h3distance) +- [h3HexRing](./h3.md#h3hexring) +- [h3GetUnidirectionalEdge](./h3.md#h3getunidirectionaledge) +- [h3UnidirectionalEdgeIsValid](./h3.md#h3unidirectionaledgeisvalid) +- [h3GetOriginIndexFromUnidirectionalEdge](./h3.md#h3getoriginindexfromunidirectionaledge) +- [h3GetDestinationIndexFromUnidirectionalEdge](./h3.md#h3getdestinationindexfromunidirectionaledge) +- [h3GetIndexesFromUnidirectionalEdge](./h3.md#h3getindexesfromunidirectionaledge) +- [h3GetUnidirectionalEdgesFromHexagon](./h3.md#h3getunidirectionaledgesfromhexagon) +- [h3GetUnidirectionalEdgeBoundary](./h3.md#h3getunidirectionaledgeboundary) + +## S2インデックス関数 + +- [geoToS2](./s2.md#geotos2) +- [s2ToGeo](./s2.md#s2togeo) +- [s2GetNeighbors](./s2.md#s2getneighbors) +- [s2CellsIntersect](./s2.md#s2cellsintersect) +- [s2CapContains](./s2.md#s2capcontains) +- [s2CapUnion](./s2.md#s2capunion) +- [s2RectAdd](./s2.md#s2rectadd) +- [s2RectContains](./s2.md#s2rectcontains) +- [s2RectUnion](./s2.md#s2rectunion) +- [s2RectIntersection](./s2.md#s2rectintersection) diff --git a/docs/ja/sql-reference/functions/geo/polygon.md b/docs/ja/sql-reference/functions/geo/polygon.md new file mode 100644 index 00000000000..88206c21296 --- /dev/null +++ b/docs/ja/sql-reference/functions/geo/polygon.md @@ -0,0 +1,479 @@ +--- +slug: /ja/sql-reference/functions/geo/polygons +sidebar_label: Polygons +title: "多角形をæ“作ã™ã‚‹ãŸã‚ã®é–¢æ•°" +--- + +## WKT + +ã•ã¾ã–ã¾ãª[地ç†ãƒ‡ãƒ¼ã‚¿åž‹](../../data-types/geo.md)ã‹ã‚‰WKT (Well Known Text) 地ç†ã‚ªãƒ–ジェクトを返ã—ã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹WKTオブジェクトã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +- POINT +- POLYGON +- MULTIPOLYGON +- LINESTRING +- MULTILINESTRING + +**構文** + +```sql +WKT(geo_data) +``` + +**パラメータ** + +`geo_data`ã¯ã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã®[地ç†ãƒ‡ãƒ¼ã‚¿åž‹](../../data-types/geo.md)ã¾ãŸã¯ãã®åŸºç¤Žçš„ãªãƒ—リミティブ型ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +- [Point](../../data-types/geo.md#point) +- [Ring](../../data-types/geo.md#ring) +- [Polygon](../../data-types/geo.md#polygon) +- [MultiPolygon](../../data-types/geo.md#multipolygon) +- [LineString](../../data-types/geo.md#linestring) +- [MultiLineString](../../data-types/geo.md#multilinestring) + +**戻り値** + +- WKT地ç†ã‚ªãƒ–ジェクトã®`POINT`ã¯Pointã®å ´åˆã«è¿”ã•ã‚Œã¾ã™ã€‚ +- WKT地ç†ã‚ªãƒ–ジェクトã®`POLYGON`ã¯Polygonã®å ´åˆã«è¿”ã•ã‚Œã¾ã™ã€‚ +- WKT地ç†ã‚ªãƒ–ジェクトã®`MULTIPOLYGON`ã¯MultiPolygonã®å ´åˆã«è¿”ã•ã‚Œã¾ã™ã€‚ +- WKT地ç†ã‚ªãƒ–ジェクトã®`LINESTRING`ã¯LineStringã®å ´åˆã«è¿”ã•ã‚Œã¾ã™ã€‚ +- WKT地ç†ã‚ªãƒ–ジェクトã®`MULTILINESTRING`ã¯MultiLineStringã®å ´åˆã«è¿”ã•ã‚Œã¾ã™ã€‚ + +**例** + +タプルã‹ã‚‰POINTを得る: + +```sql +SELECT wkt((0., 0.)); +``` + +```response +POINT(0 0) +``` + +タプルé…列ã¾ãŸã¯ã‚¿ãƒ—ルé…列ã®é…列ã‹ã‚‰POLYGONを得る: + +```sql +SELECT wkt([(0., 0.), (10., 0.), (10., 10.), (0., 10.)]); +``` + +```response +POLYGON((0 0,10 0,10 10,0 10)) +``` + +多次元タプルé…列ã‹ã‚‰MULTIPOLYGONを得る: + +```sql +SELECT wkt([[[(0., 0.), (10., 0.), (10., 10.), (0., 10.)], [(4., 4.), (5., 4.), (5., 5.), (4., 5.)]], [[(-10., -10.), (-10., -9.), (-9., 10.)]]]); +``` + +```response +MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(4 4,5 4,5 5,4 5,4 4)),((-10 -10,-10 -9,-9 10,-10 -10))) +``` + +## readWKTMultiPolygon + +WKT (Well Known Text) ã®MultiPolygonã‚’MultiPolygonåž‹ã«å¤‰æ›ã—ã¾ã™ã€‚ + +### 例 + +``` sql +SELECT + toTypeName(readWKTMultiPolygon('MULTIPOLYGON(((2 0,10 0,10 10,0 10,2 0),(4 4,5 4,5 5,4 5,4 4)),((-10 -10,-10 -9,-9 10,-10 -10)))')) AS type, + readWKTMultiPolygon('MULTIPOLYGON(((2 0,10 0,10 10,0 10,2 0),(4 4,5 4,5 5,4 5,4 4)),((-10 -10,-10 -9,-9 10,-10 -10)))') AS output FORMAT Markdown + +``` +| type | output | +|:-|:-| +| MultiPolygon | [[[(2,0),(10,0),(10,10),(0,10),(2,0)],[(4,4),(5,4),(5,5),(4,5),(4,4)]],[[(-10,-10),(-10,-9),(-9,10),(-10,-10)]]] | + + +### 入力パラメータ + +`MULTIPOLYGON`ã§å§‹ã¾ã‚‹æ–‡å­—列 + +### 戻り値 + +MultiPolygon + +## readWKTPolygon + +WKT (Well Known Text) ã®MultiPolygonã‚’Polygonåž‹ã«å¤‰æ›ã—ã¾ã™ã€‚ + +### 例 + +``` sql +SELECT + toTypeName(readWKTPolygon('POLYGON((2 0,10 0,10 10,0 10,2 0))')) AS type, + readWKTPolygon('POLYGON((2 0,10 0,10 10,0 10,2 0))') AS output +FORMAT Markdown +``` +| type | output | +|:-|:-| +| Polygon | [[(2,0),(10,0),(10,10),(0,10),(2,0)]] | + +### 入力パラメータ + +`POLYGON`ã§å§‹ã¾ã‚‹æ–‡å­—列 + +### 戻り値 + +Polygon + +## readWKTPoint + +ClickHouseã®`readWKTPoint`関数ã¯ã€Well-Known Text (WKT) 表記ã®Pointジオメトリを解æžã—ã€ClickHouseã®å†…部フォーマットã§ãƒã‚¤ãƒ³ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +### 構文 + +```sql +readWKTPoint(wkt_string) +``` + +### 引数 + +- `wkt_string`: Pointジオメトリを表ã™å…¥åŠ›WKT文字列。 + +### 戻り値 + +関数ã¯ClickHouse内部表ç¾ã®Pointジオメトリを返ã—ã¾ã™ã€‚ + +### 例 + +```sql +SELECT readWKTPoint('POINT (1.2 3.4)'); +``` + +```response +(1.2,3.4) +``` + +## readWKTLineString + +Well-Known Text (WKT) 表記ã®LineStringジオメトリを解æžã—ã€ClickHouseã®å†…部フォーマットã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +### 構文 + +```sql +readWKTLineString(wkt_string) +``` + +### 引数 + +- `wkt_string`: LineStringジオメトリを表ã™å…¥åŠ›WKT文字列。 + +### 戻り値 + +関数ã¯ClickHouse内部表ç¾ã®linestringジオメトリを返ã—ã¾ã™ã€‚ + +### 例 + +```sql +SELECT readWKTLineString('LINESTRING (1 1, 2 2, 3 3, 1 1)'); +``` + +```response +[(1,1),(2,2),(3,3),(1,1)] +``` + +## readWKTMultiLineString + +Well-Known Text (WKT) 表記ã®MultiLineStringジオメトリを解æžã—ã€ClickHouseã®å†…部フォーマットã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +### 構文 + +```sql +readWKTMultiLineString(wkt_string) +``` + +### 引数 + +- `wkt_string`: MultiLineStringジオメトリを表ã™å…¥åŠ›WKT文字列。 + +### 戻り値 + +関数ã¯ClickHouse内部表ç¾ã®multilinestringジオメトリを返ã—ã¾ã™ã€‚ + +### 例 + +```sql +SELECT readWKTMultiLineString('MULTILINESTRING ((1 1, 2 2, 3 3), (4 4, 5 5, 6 6))'); +``` + +```response +[[(1,1),(2,2),(3,3)],[(4,4),(5,5),(6,6)]] +``` + +## readWKTRing + +Well-Known Text (WKT) 表記ã®Polygonジオメトリを解æžã—ã€ClickHouseã®å†…部フォーマットã¨ã—ã¦ãƒªãƒ³ã‚°ï¼ˆé–‰ã˜ãŸãƒ©ã‚¤ãƒ³ã‚¹ãƒˆãƒªãƒ³ã‚°ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚ + +### 構文 + +```sql +readWKTRing(wkt_string) +``` + +### 引数 + +- `wkt_string`: Polygonジオメトリを表ã™å…¥åŠ›WKT文字列。 + +### 戻り値 + +関数ã¯ClickHouse内部表ç¾ã®ãƒªãƒ³ã‚°ï¼ˆé–‰ã˜ãŸãƒ©ã‚¤ãƒ³ã‚¹ãƒˆãƒªãƒ³ã‚°ï¼‰ã‚¸ã‚ªãƒ¡ãƒˆãƒªã‚’è¿”ã—ã¾ã™ã€‚ + +### 例 + +```sql +SELECT readWKTRing('POLYGON ((1 1, 2 2, 3 3, 1 1))'); +``` + +```response +[(1,1),(2,2),(3,3),(1,1)] +``` + +## polygonsWithinSpherical + +一ã¤ã®å¤šè§’å½¢ãŒã‚‚ã†ä¸€ã¤ã®å¤šè§’å½¢ã®ä¸­ã«å®Œå…¨ã«åŽã¾ã£ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’判定ã—ã¦ã€trueã¾ãŸã¯falseã‚’è¿”ã—ã¾ã™ã€‚å‚ç…§: https://www.boost.org/doc/libs/1_62_0/libs/geometry/doc/html/geometry/reference/algorithms/within/within_2.html + +### 例 + +```sql +select polygonsWithinSpherical([[[(4.3613577, 50.8651821), (4.349556, 50.8535879), (4.3602419, 50.8435626), (4.3830299, 50.8428851), (4.3904543, 50.8564867), (4.3613148, 50.8651279)]]], [[[(4.346693, 50.858306), (4.367945, 50.852455), (4.366227, 50.840809), (4.344961, 50.833264), (4.338074, 50.848677), (4.346693, 50.858306)]]]); +``` +```response +0 +``` + +### 入力パラメータ + +### 戻り値 + +UInt8, 0ã¯falseã€1ã¯true + +## polygonsDistanceSpherical + +一方ã®å¤šè§’å½¢ã«å±žã™ã‚‹ãƒã‚¤ãƒ³ãƒˆã¨ã‚‚ã†ä¸€æ–¹ã®å¤šè§’å½¢ã«å±žã™ã‚‹ãƒã‚¤ãƒ³ãƒˆã¨ã®æœ€å°è·é›¢ã‚’計算ã—ã¾ã™ã€‚çƒé¢ã¨ã¯ã€åº§æ¨™ãŒç´”粋ã‹ã¤ç†æƒ³çš„ãªçƒä¸Šã®åº§æ¨™ã¨ã—ã¦è§£é‡ˆã•ã‚Œã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚地çƒã«ã¨ã£ã¦ã¯ã“ã‚Œã¯æ­£ç¢ºã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®ã‚¿ã‚¤ãƒ—ã®åº§æ¨™ç³»ã‚’使用ã™ã‚‹ã¨ã€å®Ÿè¡ŒãŒé€Ÿã¾ã‚Šã¾ã™ãŒã€ã‚‚ã¡ã‚ん精度ã¯ä½Žä¸‹ã—ã¾ã™ã€‚ + +### 例 + +```sql +SELECT polygonsDistanceSpherical([[[(0, 0), (0, 0.1), (0.1, 0.1), (0.1, 0)]]], [[[(10., 10.), (10., 40.), (40., 40.), (40., 10.), (10., 10.)]]]) +``` +```response +0.24372872211133834 +``` + +### 入力パラメータ + +2ã¤ã®å¤šè§’å½¢ + +### 戻り値 + +Float64 + +## polygonsDistanceCartesian + +2ã¤ã®å¤šè§’形間ã®è·é›¢ã‚’計算ã—ã¾ã™ã€‚ + +### 例 + +```sql +SELECT polygonsDistanceCartesian([[[(0, 0), (0, 0.1), (0.1, 0.1), (0.1, 0)]]], [[[(10., 10.), (10., 40.), (40., 40.), (40., 10.), (10., 10.)]]]) +``` +```response +14.000714267493642 +``` + +### 入力パラメータ + +2ã¤ã®å¤šè§’å½¢ + +### 戻り値 + +Float64 + +## polygonsEqualsCartesian + +2ã¤ã®å¤šè§’å½¢ãŒç­‰ã—ã„å ´åˆã«trueã‚’è¿”ã—ã¾ã™ã€‚ + +### 例 + +```sql +SELECT polygonsEqualsCartesian([[[(1., 1.), (1., 4.), (4., 4.), (4., 1.)]]], [[[(1., 1.), (1., 4.), (4., 4.), (4., 1.), (1., 1.)]]]) +``` +```response +1 +``` + +### 入力パラメータ + +2ã¤ã®å¤šè§’å½¢ + +### 戻り値 + +UInt8, 0ã¯falseã€1ã¯true + +## polygonsSymDifferenceSpherical + +2ã¤ã®å¤šè§’形間ã®ç©ºé–“集åˆç†è«–çš„ãªå¯¾ç§°å·®ï¼ˆXOR)を計算ã—ã¾ã™ã€‚ + +### 例 + +```sql +SELECT wkt(arraySort(polygonsSymDifferenceSpherical([[(50., 50.), (50., -50.), (-50., -50.), (-50., 50.), (50., 50.)], [(10., 10.), (10., 40.), (40., 40.), (40., 10.), (10., 10.)], [(-10., -10.), (-10., -40.), (-40., -40.), (-40., -10.), (-10., -10.)]], [[(-20., -20.), (-20., 20.), (20., 20.), (20., -20.), (-20., -20.)]]))); +``` +```response +MULTIPOLYGON(((-20 -10.3067,-10 -10,-10 -20.8791,-20 -20,-20 -10.3067)),((10 20.8791,20 20,20 10.3067,10 10,10 20.8791)),((50 50,50 -50,-50 -50,-50 50,50 50),(20 10.3067,40 10,40 40,10 40,10 20.8791,-20 20,-20 -10.3067,-40 -10,-40 -40,-10 -40,-10 -20.8791,20 -20,20 10.3067))) +``` + +### 入力パラメータ + +多角形 + +### 戻り値 + +MultiPolygon + +## polygonsSymDifferenceCartesian + +`polygonsSymDifferenceSpherical`ã¨åŒæ§˜ã§ã™ãŒã€åº§æ¨™ç³»ã¯Cartesian座標系ã§ã™ã€‚ã“ã‚Œã¯å®Ÿéš›ã®åœ°çƒã®ãƒ¢ãƒ‡ãƒ«ã«ã‚ˆã‚Šè¿‘ã„ã§ã™ã€‚ + +### 例 + +```sql +SELECT wkt(polygonsSymDifferenceCartesian([[[(0, 0), (0, 3), (1, 2.9), (2, 2.6), (2.6, 2), (2.9, 1), (3, 0), (0, 0)]]], [[[(1., 1.), (1., 4.), (4., 4.), (4., 1.), (1., 1.)]]])) +``` +```response +MULTIPOLYGON(((1 2.9,1 1,2.9 1,3 0,0 0,0 3,1 2.9)),((1 2.9,1 4,4 4,4 1,2.9 1,2.6 2,2 2.6,1 2.9))) +``` + +### 入力パラメータ + +多角形 + +### 戻り値 + +MultiPolygon + +## polygonsIntersectionSpherical + +多角形間ã®äº¤å·®ï¼ˆAND)を計算ã—ã€åº§æ¨™ã¯çƒé¢ã§ã™ã€‚ + +### 例 + +```sql +SELECT wkt(arrayMap(a -> arrayMap(b -> arrayMap(c -> (round(c.1, 6), round(c.2, 6)), b), a), polygonsIntersectionSpherical([[[(4.3613577, 50.8651821), (4.349556, 50.8535879), (4.3602419, 50.8435626), (4.3830299, 50.8428851), (4.3904543, 50.8564867), (4.3613148, 50.8651279)]]], [[[(4.346693, 50.858306), (4.367945, 50.852455), (4.366227, 50.840809), (4.344961, 50.833264), (4.338074, 50.848677), (4.346693, 50.858306)]]]))) +``` +```response +MULTIPOLYGON(((4.3666 50.8434,4.36024 50.8436,4.34956 50.8536,4.35268 50.8567,4.36794 50.8525,4.3666 50.8434))) +``` + +### 入力パラメータ + +多角形 + +### 戻り値 + +MultiPolygon + +## polygonsWithinCartesian + +2番目ã®å¤šè§’å½¢ãŒæœ€åˆã®å¤šè§’å½¢ã®ä¸­ã«ã‚ã‚‹å ´åˆã«trueã‚’è¿”ã—ã¾ã™ã€‚ + +### 例 + +```sql +SELECT polygonsWithinCartesian([[[(2., 2.), (2., 3.), (3., 3.), (3., 2.)]]], [[[(1., 1.), (1., 4.), (4., 4.), (4., 1.), (1., 1.)]]]) +``` +```response +1 +``` + +### 入力パラメータ + +2ã¤ã®å¤šè§’å½¢ + +### 戻り値 + +UInt8, 0ã¯falseã€1ã¯true + +## polygonConvexHullCartesian + +凸包を計算ã—ã¾ã™ã€‚[å‚考資料](https://www.boost.org/doc/libs/1_61_0/libs/geometry/doc/html/geometry/reference/algorithms/convex_hull.html) + +座標ã¯Cartesian座標系ã§ã™ã€‚ + +### 例 + +```sql +SELECT wkt(polygonConvexHullCartesian([[[(0., 0.), (0., 5.), (5., 5.), (5., 0.), (2., 3.)]]])) +``` +```response +POLYGON((0 0,0 5,5 5,5 0,0 0)) +``` + +### 入力パラメータ + +MultiPolygon + +### 戻り値 + +Polygon + +## polygonAreaSpherical + +多角形ã®è¡¨é¢ç©ã‚’計算ã—ã¾ã™ã€‚ + +### 例 + +```sql +SELECT round(polygonAreaSpherical([[[(4.346693, 50.858306), (4.367945, 50.852455), (4.366227, 50.840809), (4.344961, 50.833264), (4.338074, 50.848677), (4.346693, 50.858306)]]]), 14) +``` +```response +9.387704e-8 +``` + +### 入力パラメータ + +多角形 + +### 戻り値 + +Float + +## polygonsUnionSpherical + +和集åˆï¼ˆOR)を計算ã—ã¾ã™ã€‚ + +### 例 + +```sql +SELECT wkt(polygonsUnionSpherical([[[(4.3613577, 50.8651821), (4.349556, 50.8535879), (4.3602419, 50.8435626), (4.3830299, 50.8428851), (4.3904543, 50.8564867), (4.3613148, 50.8651279)]]], [[[(4.346693, 50.858306), (4.367945, 50.852455), (4.366227, 50.840809), (4.344961, 50.833264), (4.338074, 50.848677), (4.346693, 50.858306)]]])) +``` +```response +MULTIPOLYGON(((4.36661 50.8434,4.36623 50.8408,4.34496 50.8333,4.33807 50.8487,4.34669 50.8583,4.35268 50.8567,4.36136 50.8652,4.36131 50.8651,4.39045 50.8565,4.38303 50.8429,4.36661 50.8434))) +``` + +### 入力パラメータ + +多角形 + +### 戻り値 + +MultiPolygon + +## polygonPerimeterSpherical + +多角形ã®å‘¨å›²é•·ã‚’計算ã—ã¾ã™ã€‚ + +### 例 + +ã“ã¡ã‚‰ã¯ã‚¸ãƒ³ãƒãƒ–エを表ã™å¤šè§’å½¢ã§ã™ï¼š + +``` +POLYGON((30.0107 -15.6462,30.0502 -15.6401,30.09 -15.6294,30.1301 -15.6237,30.1699 -15.6322,30.1956 -15.6491,30.2072 -15.6532,30.2231 -15.6497,30.231 -15.6447,30.2461 -15.6321,30.2549 -15.6289,30.2801 -15.6323,30.2962 -15.639,30.3281 -15.6524,30.3567 -15.6515,30.3963 -15.636,30.3977 -15.7168,30.3993 -15.812,30.4013 -15.9317,30.4026 -16.0012,30.5148 -16.0004,30.5866 -16,30.7497 -15.9989,30.8574 -15.9981,30.9019 -16.0071,30.9422 -16.0345,30.9583 -16.0511,30.9731 -16.062,30.9898 -16.0643,31.012 -16.0549,31.0237 -16.0452,31.0422 -16.0249,31.0569 -16.0176,31.0654 -16.0196,31.0733 -16.0255,31.0809 -16.0259,31.089 -16.0119,31.1141 -15.9969,31.1585 -16.0002,31.26 -16.0235,31.2789 -16.0303,31.2953 -16.0417,31.3096 -16.059,31.3284 -16.0928,31.3409 -16.1067,31.3603 -16.1169,31.3703 -16.1237,31.3746 -16.1329,31.3778 -16.1422,31.384 -16.1488,31.3877 -16.1496,31.3956 -16.1477,31.3996 -16.1473,31.4043 -16.1499,31.4041 -16.1545,31.4027 -16.1594,31.4046 -16.1623,31.4241 -16.1647,31.4457 -16.165,31.4657 -16.1677,31.4806 -16.178,31.5192 -16.1965,31.6861 -16.2072,31.7107 -16.2179,31.7382 -16.2398,31.7988 -16.3037,31.8181 -16.3196,31.8601 -16.3408,31.8719 -16.3504,31.8807 -16.368,31.8856 -16.4063,31.8944 -16.4215,31.9103 -16.4289,32.0141 -16.4449,32.2118 -16.4402,32.2905 -16.4518,32.3937 -16.4918,32.5521 -16.5534,32.6718 -16.5998,32.6831 -16.6099,32.6879 -16.6243,32.6886 -16.6473,32.6987 -16.6868,32.7252 -16.7064,32.7309 -16.7087,32.7313 -16.7088,32.7399 -16.7032,32.7538 -16.6979,32.7693 -16.6955,32.8007 -16.6973,32.862 -16.7105,32.8934 -16.7124,32.9096 -16.7081,32.9396 -16.6898,32.9562 -16.6831,32.9685 -16.6816,32.9616 -16.7103,32.9334 -16.8158,32.9162 -16.8479,32.9005 -16.8678,32.8288 -16.9351,32.8301 -16.9415,32.8868 -17.0382,32.9285 -17.1095,32.9541 -17.1672,32.9678 -17.2289,32.9691 -17.2661,32.9694 -17.2761,32.9732 -17.2979,32.9836 -17.3178,32.9924 -17.3247,33.0147 -17.3367,33.0216 -17.3456,33.0225 -17.3615,33.0163 -17.3772,33.0117 -17.384,32.9974 -17.405,32.9582 -17.4785,32.9517 -17.4862,32.943 -17.4916,32.9366 -17.4983,32.9367 -17.5094,32.9472 -17.5432,32.9517 -17.5514,32.9691 -17.5646,33.0066 -17.581,33.0204 -17.5986,33.0245 -17.6192,33.0206 -17.6385,33.0041 -17.6756,33.0002 -17.7139,33.0032 -17.7577,32.9991 -17.7943,32.9736 -17.8106,32.957 -17.818,32.9461 -17.8347,32.9397 -17.8555,32.9369 -17.875,32.9384 -17.8946,32.9503 -17.9226,32.9521 -17.9402,32.9481 -17.9533,32.9404 -17.96,32.9324 -17.9649,32.9274 -17.9729,32.929 -17.9823,32.9412 -17.9963,32.9403 -18.0048,32.9349 -18.0246,32.9371 -18.0471,32.9723 -18.1503,32.9755 -18.1833,32.9749 -18.1908,32.9659 -18.2122,32.9582 -18.2254,32.9523 -18.233,32.9505 -18.2413,32.955 -18.2563,32.9702 -18.2775,33.0169 -18.3137,33.035 -18.3329,33.0428 -18.352,33.0381 -18.3631,33.0092 -18.3839,32.9882 -18.4132,32.9854 -18.4125,32.9868 -18.4223,32.9995 -18.4367,33.003 -18.4469,32.9964 -18.4671,32.9786 -18.4801,32.9566 -18.4899,32.9371 -18.501,32.9193 -18.51,32.9003 -18.5153,32.8831 -18.5221,32.8707 -18.5358,32.8683 -18.5526,32.8717 -18.5732,32.8845 -18.609,32.9146 -18.6659,32.9223 -18.6932,32.9202 -18.7262,32.9133 -18.753,32.9025 -18.7745,32.8852 -18.7878,32.8589 -18.79,32.8179 -18.787,32.7876 -18.7913,32.6914 -18.8343,32.6899 -18.8432,32.6968 -18.8972,32.7032 -18.9119,32.7158 -18.9198,32.7051 -18.9275,32.6922 -18.9343,32.6825 -18.9427,32.6811 -18.955,32.6886 -18.9773,32.6903 -18.9882,32.6886 -19.001,32.6911 -19.0143,32.699 -19.0222,32.7103 -19.026,32.7239 -19.0266,32.786 -19.0177,32.8034 -19.0196,32.8142 -19.0238,32.82 -19.0283,32.823 -19.0352,32.8253 -19.0468,32.8302 -19.0591,32.8381 -19.0669,32.8475 -19.0739,32.8559 -19.0837,32.8623 -19.1181,32.8332 -19.242,32.8322 -19.2667,32.8287 -19.2846,32.8207 -19.3013,32.8061 -19.3234,32.7688 -19.3636,32.7665 -19.3734,32.7685 -19.4028,32.7622 -19.4434,32.7634 -19.464,32.7739 -19.4759,32.7931 -19.4767,32.8113 -19.4745,32.8254 -19.4792,32.8322 -19.5009,32.8325 -19.5193,32.8254 -19.5916,32.8257 -19.6008,32.8282 -19.6106,32.8296 -19.6237,32.8254 -19.6333,32.8195 -19.642,32.8163 -19.6521,32.8196 -19.6743,32.831 -19.6852,32.8491 -19.6891,32.8722 -19.6902,32.8947 -19.6843,32.9246 -19.6553,32.9432 -19.6493,32.961 -19.6588,32.9624 -19.6791,32.9541 -19.7178,32.9624 -19.7354,32.9791 -19.7514,33.0006 -19.7643,33.0228 -19.7731,33.0328 -19.7842,33.0296 -19.8034,33.0229 -19.8269,33.0213 -19.8681,33.002 -19.927,32.9984 -20.0009,33.0044 -20.0243,33.0073 -20.032,32.9537 -20.0302,32.9401 -20.0415,32.9343 -20.0721,32.9265 -20.0865,32.9107 -20.0911,32.8944 -20.094,32.8853 -20.103,32.8779 -20.1517,32.8729 -20.1672,32.8593 -20.1909,32.8571 -20.2006,32.8583 -20.2075,32.8651 -20.2209,32.8656 -20.2289,32.8584 -20.2595,32.853 -20.2739,32.8452 -20.2867,32.8008 -20.3386,32.7359 -20.4142,32.7044 -20.4718,32.6718 -20.5318,32.6465 -20.558,32.6037 -20.5648,32.5565 -20.5593,32.5131 -20.5646,32.4816 -20.603,32.4711 -20.6455,32.4691 -20.6868,32.4835 -20.7942,32.4972 -20.8981,32.491 -20.9363,32.4677 -20.9802,32.4171 -21.0409,32.3398 -21.1341,32.3453 -21.1428,32.3599 -21.1514,32.3689 -21.163,32.3734 -21.1636,32.3777 -21.1634,32.3806 -21.1655,32.3805 -21.1722,32.3769 -21.1785,32.373 -21.184,32.3717 -21.1879,32.4446 -21.3047,32.4458 -21.309,32.4472 -21.3137,32.4085 -21.2903,32.373 -21.3279,32.3245 -21.3782,32.2722 -21.4325,32.2197 -21.4869,32.1673 -21.5413,32.1148 -21.5956,32.0624 -21.65,32.01 -21.7045,31.9576 -21.7588,31.9052 -21.8132,31.8527 -21.8676,31.8003 -21.922,31.7478 -21.9764,31.6955 -22.0307,31.6431 -22.0852,31.5907 -22.1396,31.5382 -22.1939,31.4858 -22.2483,31.4338 -22.302,31.3687 -22.345,31.2889 -22.3973,31.2656 -22.3655,31.2556 -22.358,31.2457 -22.3575,31.2296 -22.364,31.2215 -22.3649,31.2135 -22.3619,31.1979 -22.3526,31.1907 -22.3506,31.1837 -22.3456,31.1633 -22.3226,31.1526 -22.3164,31.1377 -22.3185,31.1045 -22.3334,31.097 -22.3349,31.0876 -22.3369,31.0703 -22.3337,31.0361 -22.3196,30.9272 -22.2957,30.8671 -22.2896,30.8379 -22.2823,30.8053 -22.2945,30.6939 -22.3028,30.6743 -22.3086,30.6474 -22.3264,30.6324 -22.3307,30.6256 -22.3286,30.6103 -22.3187,30.6011 -22.3164,30.5722 -22.3166,30.5074 -22.3096,30.4885 -22.3102,30.4692 -22.3151,30.4317 -22.3312,30.4127 -22.3369,30.3721 -22.3435,30.335 -22.3447,30.3008 -22.337,30.2693 -22.3164,30.2553 -22.3047,30.2404 -22.2962,30.2217 -22.2909,30.197 -22.2891,30.1527 -22.2948,30.1351 -22.2936,30.1111 -22.2823,30.0826 -22.2629,30.0679 -22.2571,30.0381 -22.2538,30.0359 -22.2506,30.0345 -22.2461,30.0155 -22.227,30.0053 -22.2223,29.9838 -22.2177,29.974 -22.214,29.9467 -22.1983,29.9321 -22.1944,29.896 -22.1914,29.8715 -22.1793,29.8373 -22.1724,29.7792 -22.1364,29.7589 -22.1309,29.6914 -22.1341,29.6796 -22.1383,29.6614 -22.1265,29.6411 -22.1292,29.604 -22.1451,29.5702 -22.142,29.551 -22.146,29.5425 -22.1625,29.5318 -22.1724,29.5069 -22.1701,29.4569 -22.1588,29.4361 -22.1631,29.3995 -22.1822,29.378 -22.1929,29.3633 -22.1923,29.3569 -22.1909,29.3501 -22.1867,29.2736 -22.1251,29.2673 -22.1158,29.2596 -22.0961,29.2541 -22.0871,29.2444 -22.0757,29.2393 -22.0726,29.1449 -22.0753,29.108 -22.0692,29.0708 -22.051,29.0405 -22.0209,29.0216 -21.9828,29.0138 -21.9404,29.0179 -21.8981,29.0289 -21.8766,29.0454 -21.8526,29.0576 -21.8292,29.0553 -21.81,29.0387 -21.7979,28.9987 -21.786,28.9808 -21.7748,28.9519 -21.7683,28.891 -21.7649,28.8609 -21.7574,28.7142 -21.6935,28.6684 -21.68,28.6297 -21.6513,28.6157 -21.6471,28.5859 -21.6444,28.554 -21.6366,28.5429 -21.6383,28.5325 -21.6431,28.4973 -21.6515,28.4814 -21.6574,28.4646 -21.6603,28.4431 -21.6558,28.3618 -21.6163,28.3219 -21.6035,28.2849 -21.5969,28.1657 -21.5952,28.0908 -21.5813,28.0329 -21.5779,28.0166 -21.5729,28.0026 -21.5642,27.9904 -21.5519,27.9847 -21.5429,27.9757 -21.5226,27.9706 -21.5144,27.9637 -21.5105,27.9581 -21.5115,27.9532 -21.5105,27.9493 -21.5008,27.9544 -21.4878,27.9504 -21.482,27.9433 -21.4799,27.9399 -21.478,27.9419 -21.4685,27.9496 -21.4565,27.953 -21.4487,27.9502 -21.4383,27.9205 -21.3812,27.9042 -21.3647,27.8978 -21.3554,27.8962 -21.3479,27.8967 -21.3324,27.8944 -21.3243,27.885 -21.3102,27.8491 -21.2697,27.8236 -21.2317,27.7938 -21.1974,27.7244 -21.1497,27.7092 -21.1345,27.6748 -21.0901,27.6666 -21.0712,27.6668 -21.0538,27.679 -21.0007,27.6804 -20.9796,27.6727 -20.9235,27.6726 -20.9137,27.6751 -20.8913,27.6748 -20.8799,27.676 -20.8667,27.6818 -20.8576,27.689 -20.849,27.6944 -20.8377,27.7096 -20.7567,27.7073 -20.7167,27.6825 -20.6373,27.6904 -20.6015,27.7026 -20.5661,27.7056 -20.5267,27.6981 -20.5091,27.6838 -20.4961,27.666 -20.4891,27.6258 -20.4886,27.5909 -20.4733,27.5341 -20.483,27.4539 -20.4733,27.3407 -20.473,27.306 -20.4774,27.2684 -20.4958,27.284 -20.3515,27.266 -20.2342,27.2149 -20.1105,27.2018 -20.093,27.1837 -20.0823,27.1629 -20.0766,27.1419 -20.0733,27.1297 -20.0729,27.1198 -20.0739,27.1096 -20.0732,27.0973 -20.0689,27.0865 -20.0605,27.0692 -20.0374,27.0601 -20.0276,27.0267 -20.0101,26.9943 -20.0068,26.9611 -20.0072,26.9251 -20.0009,26.8119 -19.9464,26.7745 -19.9398,26.7508 -19.9396,26.731 -19.9359,26.7139 -19.9274,26.6986 -19.9125,26.6848 -19.8945,26.6772 -19.8868,26.6738 -19.8834,26.6594 -19.8757,26.6141 -19.8634,26.5956 -19.8556,26.5819 -19.8421,26.5748 -19.8195,26.5663 -19.8008,26.5493 -19.7841,26.5089 -19.7593,26.4897 -19.7519,26.4503 -19.7433,26.4319 -19.7365,26.4128 -19.7196,26.3852 -19.6791,26.3627 -19.6676,26.3323 -19.6624,26.3244 -19.6591,26.3122 -19.6514,26.3125 -19.6496,26.3191 -19.6463,26.3263 -19.6339,26.3335 -19.613,26.331 -19.605,26.3211 -19.592,26.3132 -19.5842,26.3035 -19.5773,26.2926 -19.5725,26.2391 -19.5715,26.1945 -19.5602,26.1555 -19.5372,26.1303 -19.5011,26.0344 -19.2437,26.0114 -19.1998,25.9811 -19.1618,25.9565 -19.1221,25.9486 -19.1033,25.9449 -19.0792,25.9481 -19.0587,25.9644 -19.0216,25.9678 -19.001,25.9674 -18.9999,25.9407 -18.9213,25.8153 -18.814,25.7795 -18.7388,25.7734 -18.6656,25.7619 -18.6303,25.7369 -18.6087,25.6983 -18.5902,25.6695 -18.566,25.6221 -18.5011,25.6084 -18.4877,25.5744 -18.4657,25.5085 -18.3991,25.4956 -18.3789,25.4905 -18.3655,25.4812 -18.3234,25.4732 -18.3034,25.4409 -18.2532,25.4088 -18.176,25.3875 -18.139,25.3574 -18.1158,25.3234 -18.0966,25.2964 -18.0686,25.255 -18.0011,25.2261 -17.9319,25.2194 -17.908,25.2194 -17.8798,25.2598 -17.7941,25.2667 -17.8009,25.2854 -17.8093,25.3159 -17.8321,25.3355 -17.8412,25.3453 -17.8426,25.3765 -17.8412,25.4095 -17.853,25.4203 -17.8549,25.4956 -17.8549,25.5007 -17.856,25.5102 -17.8612,25.5165 -17.8623,25.5221 -17.8601,25.5309 -17.851,25.5368 -17.8487,25.604 -17.8362,25.657 -17.8139,25.6814 -17.8115,25.6942 -17.8194,25.7064 -17.8299,25.7438 -17.8394,25.766 -17.8498,25.786 -17.8622,25.7947 -17.8727,25.8044 -17.8882,25.8497 -17.9067,25.8636 -17.9238,25.8475 -17.9294,25.8462 -17.9437,25.8535 -17.96,25.8636 -17.9716,25.9245 -17.999,25.967 -18.0005,25.9785 -17.999,26.0337 -17.9716,26.0406 -17.9785,26.0466 -17.9663,26.0625 -17.9629,26.0812 -17.9624,26.0952 -17.9585,26.0962 -17.9546,26.0942 -17.9419,26.0952 -17.9381,26.1012 -17.9358,26.1186 -17.9316,26.1354 -17.9226,26.1586 -17.9183,26.1675 -17.9136,26.203 -17.8872,26.2119 -17.8828,26.2211 -17.8863,26.2282 -17.8947,26.2339 -17.904,26.2392 -17.9102,26.2483 -17.9134,26.2943 -17.9185,26.3038 -17.9228,26.312 -17.9284,26.3183 -17.9344,26.3255 -17.936,26.3627 -17.9306,26.4086 -17.939,26.4855 -17.9793,26.5271 -17.992,26.5536 -17.9965,26.5702 -18.0029,26.5834 -18.0132,26.5989 -18.03,26.6127 -18.0412,26.6288 -18.0492,26.6857 -18.0668,26.7 -18.0692,26.7119 -18.0658,26.7406 -18.0405,26.7536 -18.033,26.7697 -18.029,26.794 -18.0262,26.8883 -17.9846,26.912 -17.992,26.9487 -17.9689,26.9592 -17.9647,27.0063 -17.9627,27.0213 -17.9585,27.0485 -17.9443,27.0782 -17.917,27.1154 -17.8822,27.149 -17.8425,27.1465 -17.8189,27.1453 -17.7941,27.147 -17.7839,27.1571 -17.7693,27.4221 -17.5048,27.5243 -17.4151,27.5773 -17.3631,27.6045 -17.3128,27.6249 -17.2333,27.6412 -17.1985,27.7773 -17.0012,27.8169 -16.9596,27.8686 -16.9297,28.023 -16.8654,28.1139 -16.8276,28.2125 -16.7486,28.2801 -16.7065,28.6433 -16.5688,28.6907 -16.5603,28.7188 -16.5603,28.7328 -16.5581,28.7414 -16.5507,28.7611 -16.5323,28.7693 -16.5152,28.8089 -16.4863,28.8225 -16.4708,28.8291 -16.4346,28.8331 -16.4264,28.8572 -16.3882,28.857 -16.3655,28.8405 -16.3236,28.8368 -16.3063,28.8403 -16.2847,28.8642 -16.2312,28.8471 -16.2027,28.8525 -16.1628,28.8654 -16.1212,28.871 -16.0872,28.8685 -16.0822,28.8638 -16.0766,28.8593 -16.0696,28.8572 -16.0605,28.8603 -16.0494,28.8741 -16.0289,28.8772 -16.022,28.8989 -15.9955,28.9324 -15.9637,28.9469 -15.9572,28.9513 -15.9553,28.9728 -15.9514,29.0181 -15.9506,29.0423 -15.9463,29.0551 -15.9344,29.0763 -15.8954,29.0862 -15.8846,29.1022 -15.8709,29.1217 -15.8593,29.1419 -15.8545,29.151 -15.8488,29.1863 -15.8128,29.407 -15.7142,29.4221 -15.711,29.5085 -15.7036,29.5262 -15.6928,29.5634 -15.6621,29.5872 -15.6557,29.6086 -15.6584,29.628 -15.6636,29.6485 -15.6666,29.6728 -15.6633,29.73 -15.6447,29.7733 -15.6381,29.8143 -15.6197,29.8373 -15.6148,29.8818 -15.6188,29.9675 -15.6415,30.0107 -15.6462)) +``` + +```sql +SELECT round(polygonPerimeterSpherical([(30.010654, -15.646227), (30.050238, -15.640129), (30.090029, -15.629381), (30.130129, -15.623696), (30.16992, -15.632171), (30.195552, -15.649121), (30.207231, -15.653152), (30.223147, -15.649741), (30.231002, -15.644677), (30.246091, -15.632068), (30.254876, -15.628864), (30.280094, -15.632275), (30.296196, -15.639042), (30.32805, -15.652428), (30.356679, -15.651498), (30.396263, -15.635995), (30.39771, -15.716817), (30.39926, -15.812005), (30.401327, -15.931688), (30.402568, -16.001244), (30.514809, -16.000418), (30.586587, -16.000004), (30.74973, -15.998867), (30.857424, -15.998144), (30.901865, -16.007136), (30.942173, -16.034524), (30.958296, -16.05106), (30.973075, -16.062016), (30.989767, -16.06429), (31.012039, -16.054885), (31.023718, -16.045169), (31.042218, -16.024912), (31.056895, -16.017574), (31.065421, -16.019641), (31.073328, -16.025532), (31.080872, -16.025946), (31.089037, -16.01189), (31.1141, -15.996904), (31.15849, -16.000211), (31.259983, -16.023465), (31.278897, -16.030287), (31.29533, -16.041655), (31.309592, -16.059019), (31.328351, -16.092815), (31.340908, -16.106664), (31.360339, -16.116896), (31.37026, -16.123718), (31.374601, -16.132916), (31.377754, -16.142218), (31.384006, -16.148832), (31.387727, -16.149556), (31.395582, -16.147695), (31.399613, -16.147282), (31.404315, -16.149866), (31.404057, -16.154517), (31.402713, -16.159374), (31.404574, -16.162268), (31.424107, -16.164749), (31.445708, -16.164955), (31.465655, -16.167746), (31.480641, -16.177978), (31.519192, -16.196478), (31.686107, -16.207227), (31.710705, -16.217872), (31.738197, -16.239783), (31.798761, -16.303655), (31.818088, -16.319571), (31.86005, -16.340759), (31.871935, -16.35037), (31.88072, -16.368044), (31.88563, -16.406284), (31.894363, -16.421477), (31.910279, -16.428919), (32.014149, -16.444938), (32.211759, -16.440184), (32.290463, -16.45176), (32.393661, -16.491757), (32.5521, -16.553355), (32.671783, -16.599761), (32.6831, -16.609889), (32.687906, -16.624255), (32.68863, -16.647303), (32.698655, -16.686784), (32.725217, -16.706421), (32.73095, -16.708656), (32.731314, -16.708798), (32.739893, -16.703217), (32.753845, -16.697946), (32.769348, -16.695466), (32.800664, -16.697326), (32.862004, -16.710452), (32.893372, -16.712415), (32.909598, -16.708075), (32.93957, -16.689781), (32.95621, -16.683063), (32.968509, -16.681615999999998), (32.961585, -16.710348), (32.933369, -16.815768), (32.916213, -16.847911), (32.900503, -16.867755), (32.828776, -16.935141), (32.83012, -16.941549), (32.886757, -17.038184), (32.928512, -17.109497), (32.954143, -17.167168), (32.967786, -17.22887), (32.96909, -17.266115), (32.969439, -17.276102), (32.973212, -17.297909), (32.983599, -17.317753), (32.992384, -17.324678), (33.014656, -17.336667), (33.021633, -17.345555), (33.022459, -17.361471), (33.016258, -17.377181), (33.011651, -17.383991), (32.997448, -17.404983), (32.958174, -17.478467), (32.951663, -17.486218), (32.942981, -17.491593), (32.936573, -17.498311), (32.936676, -17.509369), (32.947218, -17.543166), (32.951663, -17.551434), (32.969129, -17.56456), (33.006646, -17.580993), (33.020392, -17.598563), (33.024526, -17.619233), (33.020599, -17.638457), (33.004063, -17.675561), (33.000238, -17.713905), (33.003184, -17.757726), (32.999102, -17.794313), (32.973573, -17.810643), (32.957037, -17.817981), (32.946082, -17.834724), (32.939674, -17.855498), (32.936883, -17.875032), (32.938433, -17.894566), (32.950267, -17.922574), (32.952128, -17.940247), (32.948149, -17.95327), (32.940397, -17.959988), (32.932439, -17.964949), (32.927375, -17.972907), (32.928977, -17.982312), (32.941224, -17.996265), (32.940294, -18.004843), (32.934919, -18.024583), (32.93709, -18.047114), (32.972282, -18.150261), (32.975537, -18.183333), (32.974865, -18.190775), (32.965925, -18.212169), (32.958174, -18.225398), (32.952283, -18.233046), (32.950525999999996, -18.241314), (32.95497, -18.256301), (32.970163, -18.277488), (33.016878, -18.313661), (33.034965, -18.332885), (33.042768, -18.352005), (33.038066, -18.363064), (33.00923, -18.383941), (32.988198, -18.41319), (32.985356, -18.412467), (32.986803, -18.422285), (32.999515, -18.436651), (33.003029, -18.446883), (32.996414, -18.46714), (32.978586, -18.48006), (32.956624, -18.489878), (32.937142, -18.50104), (32.919313, -18.510032), (32.900296, -18.515303), (32.88314, -18.522124), (32.870737, -18.535767), (32.868257, -18.552613), (32.871668, -18.57318), (32.884483, -18.609044), (32.914559, -18.665888), (32.92231, -18.693173), (32.920243, -18.726246), (32.913267, -18.753014), (32.902518, -18.774512), (32.885207, -18.787844), (32.858852, -18.790015), (32.817924, -18.787018), (32.787642, -18.791255), (32.69142, -18.83425), (32.68987, -18.843241), (32.696794, -18.897192), (32.703202, -18.911868), (32.71576, -18.919826), (32.705063, -18.927474), (32.692247, -18.934295), (32.682532, -18.942667), (32.681085, -18.954966), (32.68863, -18.97729), (32.690283, -18.988246), (32.68863, -19.000958), (32.691058, -19.01429), (32.698965, -19.022249), (32.710282, -19.025969), (32.723873, -19.026589), (32.785988, -19.017701), (32.803351, -19.019561), (32.814203, -19.023799), (32.819991, -19.028346), (32.822988, -19.035168), (32.825262, -19.046847), (32.830223, -19.059146), (32.83813, -19.066897), (32.847483, -19.073925), (32.855906, -19.083744), (32.862262, -19.118057), (32.83322, -19.241977), (32.832187, -19.266678), (32.828673, -19.284558), (32.820715, -19.301301), (32.806142, -19.323419), (32.768831, -19.363623), (32.766454, -19.373442), (32.768521, -19.402794), (32.762217, -19.443412), (32.763354, -19.463979), (32.773947, -19.475864), (32.793119, -19.476691), (32.811309, -19.474521), (32.825365, -19.479172), (32.832187, -19.500876), (32.832497000000004, -19.519273), (32.825365, -19.59162), (32.825675, -19.600818), (32.828156, -19.610636), (32.829603, -19.623659), (32.825365, -19.633271), (32.819474, -19.641952), (32.81627, -19.652081), (32.819629, -19.674302), (32.83105, -19.685154), (32.849137, -19.689081), (32.872184, -19.690218), (32.894715, -19.684327), (32.924584, -19.655285), (32.943188, -19.64929), (32.960964, -19.658799), (32.962411, -19.679056), (32.954143, -19.717813), (32.962411, -19.735383), (32.979051, -19.751403), (33.0006, -19.764322), (33.022769, -19.773107), (33.032795, -19.784166), (33.029642, -19.80339), (33.022873, -19.826851), (33.021322, -19.868088), (33.001995, -19.927), (32.998378, -20.000897), (33.004373, -20.024255), (33.007266, -20.032006), (32.95373, -20.030249), (32.940087, -20.041515), (32.934299, -20.072107), (32.926548, -20.086473), (32.910683, -20.091124), (32.894405, -20.094018), (32.88531, -20.10301), (32.877869, -20.151689), (32.872908, -20.167192), (32.859265, -20.190859), (32.857095, -20.200575), (32.858335, -20.207499), (32.865053, -20.220935), (32.86557, -20.228893), (32.858438, -20.259486), (32.852961, -20.273852), (32.845209, -20.286668), (32.800767, -20.338551), (32.735862, -20.414205), (32.704443, -20.471773), (32.671783, -20.531821), (32.646462, -20.557969), (32.603674, -20.56479), (32.556545, -20.559312), (32.513136, -20.564583), (32.481614, -20.603031), (32.471072, -20.645509), (32.469108, -20.68685), (32.483474, -20.794233), (32.49722, -20.898103), (32.491019, -20.936344), (32.467661, -20.980165), (32.417122, -21.040937), (32.339814, -21.134058), (32.345343, -21.142843), (32.359864, -21.151421), (32.368856, -21.162997), (32.373352, -21.163617), (32.377744, -21.16341), (32.380638, -21.165477), (32.380535, -21.172195), (32.376866, -21.178499), (32.37299, -21.183977), (32.37175, -21.187905), (32.444613, -21.304693), (32.445849, -21.308994), (32.447197, -21.313685), (32.408543, -21.290327), (32.37299, -21.327948), (32.324517, -21.378177), (32.272221, -21.432541), (32.219718, -21.486904), (32.167318, -21.541268), (32.114814, -21.595632), (32.062415, -21.649995), (32.010015, -21.704462), (31.957615, -21.758826), (31.905215, -21.813189), (31.852712, -21.867553), (31.800312, -21.92202), (31.747808, -21.976384), (31.695512, -22.030747), (31.643112, -22.085214), (31.590712, -22.139578), (31.538209, -22.193941), (31.485809, -22.248305), (31.433822, -22.302048), (31.36871, -22.345043), (31.288922, -22.39734), (31.265616, -22.365507), (31.255642, -22.357962), (31.24572, -22.357549), (31.229597, -22.363957), (31.221536, -22.364887), (31.213474, -22.36189), (31.197868, -22.352588), (31.190685, -22.350624), (31.183657, -22.34556), (31.163348, -22.322616), (31.152599, -22.316414), (31.137717, -22.318482), (31.10454, -22.333364), (31.097048, -22.334922), (31.087642, -22.336878), (31.07033, -22.333674), (31.036121, -22.319618), (30.927187, -22.295744), (30.867087, -22.289646), (30.83789, -22.282308), (30.805282, -22.294504), (30.693919, -22.302772), (30.674282, -22.30856), (30.647410999999998, -22.32644), (30.632424, -22.330677), (30.625551, -22.32861), (30.610307, -22.318688), (30.601108, -22.316414), (30.57217, -22.316621), (30.507367, -22.309593), (30.488454, -22.310213), (30.46923, -22.315071), (30.431713, -22.331194), (30.412696, -22.336878), (30.372078, -22.343493), (30.334975, -22.344733), (30.300765, -22.336982), (30.269346, -22.316414), (30.25529, -22.304736), diff --git a/docs/ja/sql-reference/functions/geo/s2.md b/docs/ja/sql-reference/functions/geo/s2.md new file mode 100644 index 00000000000..665baec51a6 --- /dev/null +++ b/docs/ja/sql-reference/functions/geo/s2.md @@ -0,0 +1,371 @@ +--- +slug: /ja/sql-reference/functions/geo/s2 +sidebar_label: S2 Geometry +--- + +# S2インデックスを扱ã†ãŸã‚ã®é–¢æ•° + +## S2Index + +[S2](https://s2geometry.io/)ã¯ã€ã™ã¹ã¦ã®åœ°ç†ãƒ‡ãƒ¼ã‚¿ãŒä¸‰æ¬¡å…ƒã®çƒï¼ˆåœ°çƒå„€ã®ã‚ˆã†ãªã‚‚ã®ï¼‰ä¸Šã§è¡¨ç¾ã•ã‚Œã‚‹åœ°ç†çš„インデックスシステムã§ã™ã€‚ + +S2ライブラリã§ã¯ã€ãƒã‚¤ãƒ³ãƒˆã¯S2インデックスã¨ã—ã¦è¡¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€ä¼çµ±çš„ãªï¼ˆç·¯åº¦ã€çµŒåº¦ï¼‰ã®ãƒšã‚¢ã¨ã¯ç•°ãªã‚Šã€å˜ä½çƒã®è¡¨é¢ä¸Šã®ãƒã‚¤ãƒ³ãƒˆã‚’内部的ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹ç‰¹å®šã®æ•°å€¤ã§ã™ã€‚指定ã•ã‚ŒãŸå½¢å¼ï¼ˆç·¯åº¦ã€çµŒåº¦ï¼‰ã§æŒ‡å®šã•ã‚ŒãŸãƒã‚¤ãƒ³ãƒˆã«å¯¾ã—ã¦S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€[geoToS2](#geotos2)関数を使用ã—ã¾ã™ã€‚ã¾ãŸã€æŒ‡å®šã•ã‚ŒãŸS2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«å¯¾å¿œã™ã‚‹åœ°ç†åº§æ¨™ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€[s2ToGeo](#s2togeo)関数を使用ã§ãã¾ã™ã€‚ + +## geoToS2 + +æä¾›ã•ã‚ŒãŸåº§æ¨™ `(経度ã€ç·¯åº¦)` ã«å¯¾å¿œã™ã‚‹ [S2](#s2index) ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +geoToS2(lon, lat) +``` + +**引数** + +- `lon` — 経度。[Float64](../../data-types/float.md)。 +- `lat` — 緯度。[Float64](../../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT geoToS2(37.79506683, 55.71290588) AS s2Index; +``` + +çµæžœ: + +``` text +┌─────────────s2Index─┠+│ 4704772434919038107 │ +└─────────────────────┘ +``` + +## s2ToGeo + +æä¾›ã•ã‚ŒãŸ [S2](#s2index) ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«å¯¾å¿œã™ã‚‹åœ°ç†åº§æ¨™ `(経度ã€ç·¯åº¦)` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +s2ToGeo(s2index) +``` + +**引数** + +- `s2index` — S2インデックス。[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2ã¤ã®å€¤ã‚’æŒã¤[タプル](../../data-types/tuple.md): + - `lon`。 [Float64](../../data-types/float.md)。 + - `lat`。 [Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT s2ToGeo(4704772434919038107) AS s2Coodrinates; +``` + +çµæžœ: + +``` text +┌─s2Coodrinates────────────────────────┠+│ (37.79506681471008,55.7129059052841) │ +└──────────────────────────────────────┘ +``` + +## s2GetNeighbors + +æä¾›ã•ã‚ŒãŸ [S2](#s2index) ã«å¯¾å¿œã™ã‚‹S2è¿‘å‚インデックスを返ã—ã¾ã™ã€‚S2システムã§ã¯ã€å„セルã¯4ã¤ã®æ¸¬åœ°ç·šã«å›²ã¾ã‚ŒãŸå››è¾ºå½¢ã§ã™ã€‚ãã®ãŸã‚ã€å„セルã«ã¯4ã¤ã®éš£æŽ¥ã‚»ãƒ«ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +s2GetNeighbors(s2index) +``` + +**引数** + +- `s2index` — S2インデックス。[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 4ã¤ã®è¿‘å‚インデックスã‹ã‚‰ãªã‚‹é…列: `array[s2index1, s2index3, s2index2, s2index4]`。[Array](../../data-types/array.md)([UInt64](../../data-types/int-uint.md))。 + +**例** + +クエリ: + +``` sql +SELECT s2GetNeighbors(5074766849661468672) AS s2Neighbors; +``` + +çµæžœ: + +``` text +┌─s2Neighbors───────────────────────────────────────────────────────────────────────┠+│ [5074766987100422144,5074766712222515200,5074767536856236032,5074767261978329088] │ +└───────────────────────────────────────────────────────────────────────────────────┘ +``` + +## s2CellsIntersect + +2ã¤ã®æä¾›ã•ã‚ŒãŸ [S2](#s2index) セルãŒäº¤å·®ã—ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’判断ã—ã¾ã™ã€‚ + +**構文** + +``` sql +s2CellsIntersect(s2index1, s2index2) +``` + +**引数** + +- `s2index1`, `s2index2` — S2インデックス。[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `1` — セルãŒäº¤å·®ã—ã¦ã„ã‚‹å ´åˆã€‚[UInt8](../../data-types/int-uint.md)。 +- `0` — セルãŒäº¤å·®ã—ã¦ã„ãªã„å ´åˆã€‚[UInt8](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT s2CellsIntersect(9926595209846587392, 9926594385212866560) AS intersect; +``` + +çµæžœ: + +``` text +┌─intersect─┠+│ 1 │ +└───────────┘ +``` + +## s2CapContains + +キャップãŒS2ãƒã‚¤ãƒ³ãƒˆã‚’å«ã‚€ã‹ã©ã†ã‹ã‚’判断ã—ã¾ã™ã€‚キャップã¯ã€çƒé¢ä¸Šã«å¹³é¢ã«ã‚ˆã£ã¦åˆ‡ã‚Šå–られãŸéƒ¨åˆ†ã‚’表ã—ã¾ã™ã€‚ãã‚Œã¯çƒé¢ä¸Šã®ç‚¹ã¨åº¦æ•°ã§ã®åŠå¾„ã§å®šç¾©ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +s2CapContains(center, degrees, point) +``` + +**引数** + +- `center` — キャップã«å¯¾å¿œã™ã‚‹S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 +- `degrees` — キャップã®åŠå¾„(度数)。[Float64](../../data-types/float.md)。 +- `point` — S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `1` — キャップãŒS2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’å«ã‚€å ´åˆã€‚[UInt8](../../data-types/int-uint.md)。 +- `0` — キャップãŒS2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’å«ã¾ãªã„å ´åˆã€‚[UInt8](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT s2CapContains(1157339245694594829, 1.0, 1157347770437378819) AS capContains; +``` + +çµæžœ: + +``` text +┌─capContains─┠+│ 1 │ +└─────────────┘ +``` + +## s2CapUnion + +与ãˆã‚‰ã‚ŒãŸ2ã¤ã®å…¥åŠ›ã‚­ãƒ£ãƒƒãƒ—ã‚’å«ã‚€æœ€å°ã®ã‚­ãƒ£ãƒƒãƒ—を決定ã—ã¾ã™ã€‚キャップã¯ã€çƒé¢ä¸Šã«å¹³é¢ã«ã‚ˆã£ã¦åˆ‡ã‚Šå–られãŸéƒ¨åˆ†ã‚’表ã—ã¾ã™ã€‚ãã‚Œã¯çƒé¢ä¸Šã®ç‚¹ã¨åº¦æ•°ã§ã®åŠå¾„ã§å®šç¾©ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +s2CapUnion(center1, radius1, center2, radius2) +``` + +**引数** + +- `center1`, `center2` — 2ã¤ã®å…¥åŠ›ã‚­ãƒ£ãƒƒãƒ—ã«å¯¾å¿œã™ã‚‹S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 +- `radius1`, `radius2` — 2ã¤ã®å…¥åŠ›ã‚­ãƒ£ãƒƒãƒ—ã®åŠå¾„(度数)。[Float64](../../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `center` — 2ã¤ã®å…¥åŠ›ã‚­ãƒ£ãƒƒãƒ—ã‚’å«ã‚€æœ€å°ã‚­ãƒ£ãƒƒãƒ—ã®ä¸­å¿ƒã«å¯¾å¿œã™ã‚‹S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 +- `radius` — 2ã¤ã®å…¥åŠ›ã‚­ãƒ£ãƒƒãƒ—ã‚’å«ã‚€æœ€å°ã‚­ãƒ£ãƒƒãƒ—ã®åŠå¾„。[Float64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT s2CapUnion(3814912406305146967, 1.0, 1157347770437378819, 1.0) AS capUnion; +``` + +çµæžœ: + +``` text +┌─capUnion───────────────────────────────┠+│ (4534655147792050737,60.2088283994957) │ +└────────────────────────────────────────┘ +``` + +## s2RectAdd + +指定ã•ã‚ŒãŸS2ãƒã‚¤ãƒ³ãƒˆã‚’å«ã‚€ã‚ˆã†ã«ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°çŸ©å½¢ã®ã‚µã‚¤ã‚ºã‚’拡大ã—ã¾ã™ã€‚S2システムã§ã¯ã€çŸ©å½¢ã¯ç·¯åº¦çµŒåº¦ç©ºé–“内ã®çŸ©å½¢ã‚’表ã™`S2LatLngRect`ã¨å‘¼ã°ã‚Œã‚‹ã‚¿ã‚¤ãƒ—ã®S2Regionã«ã‚ˆã£ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +s2RectAdd(s2pointLow, s2pointHigh, s2Point) +``` + +**引数** + +- `s2PointLow` — 矩形ã«å¯¾å¿œã™ã‚‹ä½ŽS2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 +- `s2PointHigh` — 矩形ã«å¯¾å¿œã™ã‚‹é«˜S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 +- `s2Point` — ãƒã‚¦ãƒ³ãƒ‰çŸ©å½¢ã«å«ã¾ã‚Œã‚‹ã¹ãターゲットS2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `s2PointLow` — 拡大ã•ã‚ŒãŸçŸ©å½¢ã«å¯¾å¿œã™ã‚‹ä½ŽS2セルID。[UInt64](../../data-types/int-uint.md)。 +- `s2PointHigh` — 拡大ã•ã‚ŒãŸçŸ©å½¢ã«å¯¾å¿œã™ã‚‹é«˜S2セルID。[UInt64](../../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT s2RectAdd(5178914411069187297, 5177056748191934217, 5179056748191934217) AS rectAdd; +``` + +çµæžœ: + +``` text +┌─rectAdd───────────────────────────────────┠+│ (5179062030687166815,5177056748191934217) │ +└───────────────────────────────────────────┘ +``` + +## s2RectContains + +指定ã•ã‚ŒãŸçŸ©å½¢ãŒS2ãƒã‚¤ãƒ³ãƒˆã‚’å«ã‚€ã‹ã©ã†ã‹ã‚’判断ã—ã¾ã™ã€‚S2システムã§ã¯ã€çŸ©å½¢ã¯ç·¯åº¦çµŒåº¦ç©ºé–“内ã®çŸ©å½¢ã‚’表ã™`S2LatLngRect`ã¨å‘¼ã°ã‚Œã‚‹ã‚¿ã‚¤ãƒ—ã®S2Regionã«ã‚ˆã£ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +s2RectContains(s2PointLow, s2PointHi, s2Point) +``` + +**引数** + +- `s2PointLow` — 矩形ã«å¯¾å¿œã™ã‚‹ä½ŽS2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 +- `s2PointHigh` — 矩形ã«å¯¾å¿œã™ã‚‹é«˜S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 +- `s2Point` — ターゲットS2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `1` — 矩形ãŒæŒ‡å®šã•ã‚ŒãŸS2ãƒã‚¤ãƒ³ãƒˆã‚’å«ã‚€å ´åˆã€‚ +- `0` — 矩形ãŒæŒ‡å®šã•ã‚ŒãŸS2ãƒã‚¤ãƒ³ãƒˆã‚’å«ã¾ãªã„å ´åˆã€‚ + +**例** + +クエリ: + +``` sql +SELECT s2RectContains(5179062030687166815, 5177056748191934217, 5177914411069187297) AS rectContains; +``` + +çµæžœ: + +``` text +┌─rectContains─┠+│ 0 │ +└──────────────┘ +``` + +## s2RectUnion + +ã“ã®çŸ©å½¢ã¨æŒ‡å®šã•ã‚ŒãŸçŸ©å½¢ã®å’Œã‚’å«ã‚€æœ€å°ã®çŸ©å½¢ã‚’è¿”ã—ã¾ã™ã€‚S2システムã§ã¯ã€çŸ©å½¢ã¯ç·¯åº¦çµŒåº¦ç©ºé–“内ã®çŸ©å½¢ã‚’表ã™`S2LatLngRect`ã¨å‘¼ã°ã‚Œã‚‹ã‚¿ã‚¤ãƒ—ã®S2Regionã«ã‚ˆã£ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +s2RectUnion(s2Rect1PointLow, s2Rect1PointHi, s2Rect2PointLow, s2Rect2PointHi) +``` + +**引数** + +- `s2Rect1PointLow`, `s2Rect1PointHi` — 最åˆã®çŸ©å½¢ã«å¯¾å¿œã™ã‚‹ä½ŽãŠã‚ˆã³é«˜S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 +- `s2Rect2PointLow`, `s2Rect2PointHi` — 2番目ã®çŸ©å½¢ã«å¯¾å¿œã™ã‚‹ä½ŽãŠã‚ˆã³é«˜S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `s2UnionRect2PointLow` — 和矩形ã«å¯¾å¿œã™ã‚‹ä½ŽS2セルID。[UInt64](../../data-types/int-uint.md)。 +- `s2UnionRect2PointHi` — 和矩形ã«å¯¾å¿œã™ã‚‹é«˜S2セルID。[UInt64](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT s2RectUnion(5178914411069187297, 5177056748191934217, 5179062030687166815, 5177056748191934217) AS rectUnion; +``` + +çµæžœ: + +``` text +┌─rectUnion─────────────────────────────────┠+│ (5179062030687166815,5177056748191934217) │ +└───────────────────────────────────────────┘ +``` + +## s2RectIntersection + +ã“ã®çŸ©å½¢ã¨æŒ‡å®šã•ã‚ŒãŸçŸ©å½¢ã®äº¤ç‚¹ã‚’å«ã‚€æœ€å°ã®çŸ©å½¢ã‚’è¿”ã—ã¾ã™ã€‚S2システムã§ã¯ã€çŸ©å½¢ã¯ç·¯åº¦çµŒåº¦ç©ºé–“内ã®çŸ©å½¢ã‚’表ã™`S2LatLngRect`ã¨å‘¼ã°ã‚Œã‚‹ã‚¿ã‚¤ãƒ—ã®S2Regionã«ã‚ˆã£ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +s2RectIntersection(s2Rect1PointLow, s2Rect1PointHi, s2Rect2PointLow, s2Rect2PointHi) +``` + +**引数** + +- `s2Rect1PointLow`, `s2Rect1PointHi` — 最åˆã®çŸ©å½¢ã«å¯¾å¿œã™ã‚‹ä½ŽãŠã‚ˆã³é«˜S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 +- `s2Rect2PointLow`, `s2Rect2PointHi` — 2番目ã®çŸ©å½¢ã«å¯¾å¿œã™ã‚‹ä½ŽãŠã‚ˆã³é«˜S2ãƒã‚¤ãƒ³ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚[UInt64](../../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `s2UnionRect2PointLow` — 指定ã•ã‚ŒãŸçŸ©å½¢ã®äº¤ç‚¹ã‚’å«ã‚€çŸ©å½¢ã«å¯¾å¿œã™ã‚‹ä½ŽS2セルID。[UInt64](../../data-types/int-uint.md)。 +- `s2UnionRect2PointHi` — 指定ã•ã‚ŒãŸçŸ©å½¢ã®äº¤ç‚¹ã‚’å«ã‚€çŸ©å½¢ã«å¯¾å¿œã™ã‚‹é«˜S2セルID。[UInt64](../../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT s2RectIntersection(5178914411069187297, 5177056748191934217, 5179062030687166815, 5177056748191934217) AS rectIntersection; +``` + +çµæžœ: + +``` text +┌─rectIntersection──────────────────────────┠+│ (5178914411069187297,5177056748191934217) │ +└──────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/geo/svg.md b/docs/ja/sql-reference/functions/geo/svg.md new file mode 100644 index 00000000000..12b628884d3 --- /dev/null +++ b/docs/ja/sql-reference/functions/geo/svg.md @@ -0,0 +1,75 @@ +--- +slug: /ja/sql-reference/functions/geo/svg +sidebar_label: SVG +title: "Geoデータã‹ã‚‰SVGç”»åƒã‚’生æˆã™ã‚‹é–¢æ•°" +--- + +## Svg + +Geoデータã‹ã‚‰é¸æŠžã•ã‚ŒãŸSVGè¦ç´ ã‚¿ã‚°ã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +Svg(geometry,[style]) +``` + +エイリアス: `SVG`, `svg` + +**パラメータ** + +- `geometry` — Geoデータ。[Geo](../../data-types/geo)。 +- `style` — オプションã®ã‚¹ã‚¿ã‚¤ãƒ«å。[String](../../data-types/string)。 + +**戻り値** + +- ジオメトリã®SVG表ç¾ã€‚[String](../../data-types/string)。 + - SVG circle + - SVG polygon + - SVG path + +**例** + +**サークル** + +クエリ: + +```sql +SELECT SVG((0., 0.)) +``` + +çµæžœ: + +```response + +``` + +**ãƒãƒªã‚´ãƒ³** + +クエリ: + +```sql +SELECT SVG([(0., 0.), (10, 0), (10, 10), (0, 10)]) +``` + +çµæžœ: + +```response + +``` + +**パス** + +クエリ: + +```sql +SELECT SVG([[(0., 0.), (10, 0), (10, 10), (0, 10)], [(4., 4.), (5, 4), (5, 5), (4, 5)]]) +``` + +çµæžœ: + +```response + +``` + + diff --git a/docs/ja/sql-reference/functions/hash-functions.md b/docs/ja/sql-reference/functions/hash-functions.md new file mode 100644 index 00000000000..3832cb3206a --- /dev/null +++ b/docs/ja/sql-reference/functions/hash-functions.md @@ -0,0 +1,1948 @@ +--- +slug: /ja/sql-reference/functions/hash-functions +sidebar_position: 85 +sidebar_label: Hash +--- + +# ãƒãƒƒã‚·ãƒ¥é–¢æ•° + +ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã¯ã€è¦ç´ ã®æ±ºå®šçš„ãªæ“¬ä¼¼ãƒ©ãƒ³ãƒ€ãƒ ã‚·ãƒ£ãƒƒãƒ•ãƒ«ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +Simhashã¯ã€é¡žä¼¼ã—ãŸå¼•æ•°ã«å¯¾ã—ã¦è¿‘ã„ãƒãƒƒã‚·ãƒ¥å€¤ã‚’è¿”ã™ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã§ã™ã€‚ + +## halfMD5 + +ã™ã¹ã¦ã®å…¥åŠ›ãƒ‘ラメータを文字列ã¨ã—ã¦[解釈](../functions/type-conversion-functions.md/#type_conversion_functions-reinterpretAsString)ã—ã€ãã‚Œãžã‚Œã«å¯¾ã—ã¦[MD5](https://en.wikipedia.org/wiki/MD5)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã¾ã™ã€‚ãã®å¾Œã€ãƒãƒƒã‚·ãƒ¥ã‚’çµåˆã—ã€çµæžœã®æ–‡å­—列ã®ãƒãƒƒã‚·ãƒ¥ã®æœ€åˆã®8ãƒã‚¤ãƒˆã‚’å–り出ã—ã¦ã€ãƒ“ッグエンディアンãƒã‚¤ãƒˆã‚ªãƒ¼ãƒ€ãƒ¼ã§`UInt64`ã¨ã—ã¦è§£é‡ˆã—ã¾ã™ã€‚ + +```sql +halfMD5(par1, ...) +``` + +ã“ã®é–¢æ•°ã¯æ¯”較的é…ã„ã§ã™ï¼ˆ1秒ã‚ãŸã‚Š500万ã®çŸ­ã„文字列をプロセッサコアã”ã¨ã«å‡¦ç†ã—ã¾ã™ï¼‰ã€‚ +代ã‚ã‚Šã«[sipHash64](#siphash64)関数ã®ä½¿ç”¨ã‚’検討ã—ã¦ãã ã•ã„。 + +**引数** + +ã“ã®é–¢æ•°ã¯å¯å¤‰æ•°ã®å…¥åŠ›ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚引数ã¯[サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型](../data-types/index.md)ã®ã„ãšã‚Œã‹ã§ã‚ã‚Šå¾—ã¾ã™ã€‚ç•°ãªã‚‹åž‹ã®å¼•æ•°ã§ã‚‚ã€åŒã˜å€¤ã«å¯¾ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®å€¤ãŒåŒã˜ã«ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆç•°ãªã‚‹ã‚µã‚¤ã‚ºã®æ•´æ•°ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤åå‰ä»˜ããŠã‚ˆã³åå‰ãªã—ã®`Tuple`ã€å¯¾å¿œã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤`Map`ãŠã‚ˆã³`Array(Tuple(key, value))`åž‹ãªã©ï¼‰ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +[UInt64](../data-types/int-uint.md)データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã€‚ + +**例** + +```sql +SELECT halfMD5(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00')) AS halfMD5hash, toTypeName(halfMD5hash) AS type; +``` + +```response +┌────────halfMD5hash─┬─type───┠+│ 186182704141653334 │ UInt64 │ +└────────────────────┴────────┘ +``` + +## MD4 + +文字列ã‹ã‚‰MD4を計算ã—ã€çµæžœã®ãƒã‚¤ãƒˆã‚»ãƒƒãƒˆã‚’FixedString(16)ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +## MD5 + +文字列ã‹ã‚‰MD5を計算ã—ã€çµæžœã®ãƒã‚¤ãƒˆã‚»ãƒƒãƒˆã‚’FixedString(16)ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ +特定ã®MD5ãŒå¿…è¦ã§ãªã„å ´åˆã€æš—å·åŒ–çš„ã«ç¢ºã‹ãª128ビットãƒãƒƒã‚·ãƒ¥ãŒå¿…è¦ãªå ´åˆã«ã¯ã€ä»£ã‚ã‚Šã«â€˜sipHash128’関数を使用ã—ã¦ãã ã•ã„。 +md5sumユーティリティã¨åŒã˜çµæžœã‚’å¾—ãŸã„å ´åˆã¯ã€lower(hex(MD5(s)))を使用ã—ã¦ãã ã•ã„。 + +## RIPEMD160 + +[RIPEMD-160](https://en.wikipedia.org/wiki/RIPEMD)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +RIPEMD160(input) +``` + +**パラメータ** + +- `input`: 入力文字列。[String](../data-types/string.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 160ビットã®`RIPEMD-160` ãƒãƒƒã‚·ãƒ¥å€¤ã€[FixedString(20)](../data-types/fixedstring.md)型。 + +**例** + +çµæžœã‚’16進エンコードã•ã‚ŒãŸæ–‡å­—列ã¨ã—ã¦è¡¨ã™ã«ã¯ã€[hex](../functions/encoding-functions.md/#hex)関数を使用ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT HEX(RIPEMD160('The quick brown fox jumps over the lazy dog')); +``` + +```response +┌─HEX(RIPEMD160('The quick brown fox jumps over the lazy dog'))─┠+│ 37F332F68DB77BD9D7EDD4969571AD671CF9DD3B │ +└───────────────────────────────────────────────────────────────┘ +``` + +## sipHash64 + +64ビットã®[SipHash](https://en.wikipedia.org/wiki/SipHash)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +```sql +sipHash64(par1,...) +``` + +ã“ã‚Œã¯æš—å·åŒ–ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã§ã™ã€‚å°‘ãªãã¨ã‚‚[MD5](#md5)ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®3å€ã®é€Ÿã•ã§å‹•ä½œã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã™ã¹ã¦ã®å…¥åŠ›ãƒ‘ラメータを文字列ã¨ã—ã¦[解釈](../functions/type-conversion-functions.md/#type_conversion_functions-reinterpretAsString)ã—ã€å„パラメータã”ã¨ã«ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã¾ã™ã€‚次ã«ã€ä»¥ä¸‹ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã§ãƒãƒƒã‚·ãƒ¥ã‚’çµåˆã—ã¾ã™ã€‚ + +1. 最åˆã¨äºŒç•ªç›®ã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’連çµã—ã€çµæžœã‚’ãƒãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +2. å‰å›žè¨ˆç®—ã•ã‚ŒãŸãƒãƒƒã‚·ãƒ¥å€¤ã¨ç¬¬ä¸‰ã®å…¥åŠ›ãƒ‘ラメータã®ãƒãƒƒã‚·ãƒ¥ã‚’åŒæ§˜ã«ãƒãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ +3. ã“ã®è¨ˆç®—ã‚’å…ƒã®å…¥åŠ›ã®æ®‹ã‚Šã®ã™ã¹ã¦ã®ãƒãƒƒã‚·ãƒ¥å€¤ã«å¯¾ã—ã¦ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ + +**引数** + +ã“ã®é–¢æ•°ã¯ä»»æ„ã®[サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型](../data-types/index.md)ã®å¯å¤‰æ•°ã®å…¥åŠ›ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +[UInt64](../data-types/int-uint.md)データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã€‚ + +åŒã˜å…¥åŠ›å€¤ã§ã‚‚ç•°ãªã‚‹å¼•æ•°åž‹ã®å ´åˆã€è¨ˆç®—ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥å€¤ãŒç­‰ã—ã„å ´åˆãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。例ãˆã°ã€ç•°ãªã‚‹ã‚µã‚¤ã‚ºã®æ•´æ•°ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤åå‰ã‚り・ãªã—ã®`Tuple`ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤`Map`ã¨å¯¾å¿œã™ã‚‹`Array(Tuple(key, value))`åž‹ã§ã™ã€‚ + +**例** + +```sql +SELECT sipHash64(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00')) AS SipHash, toTypeName(SipHash) AS type; +``` + +```response +┌──────────────SipHash─┬─type───┠+│ 11400366955626497465 │ UInt64 │ +└──────────────────────┴────────┘ +``` + +## sipHash64Keyed + +[sipHash64](#siphash64)ã¨åŒæ§˜ã§ã™ãŒã€å›ºå®šã‚­ãƒ¼ã‚’使ã†ä»£ã‚ã‚Šã«æ˜Žç¤ºçš„ãªã‚­ãƒ¼å¼•æ•°ã‚’追加ã§å–ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +sipHash64Keyed((k0, k1), par1,...) +``` + +**引数** + +[sipHash64](#siphash64)ã¨åŒæ§˜ã§ã™ãŒã€æœ€åˆã®å¼•æ•°ã¯ã‚­ãƒ¼ã‚’表ã™äºŒã¤ã®`UInt64`値ã®ã‚¿ãƒ—ルã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +[UInt64](../data-types/int-uint.md)データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã€‚ + +**例** + +クエリ: + +```sql +SELECT sipHash64Keyed((506097522914230528, 1084818905618843912), array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00')) AS SipHash, toTypeName(SipHash) AS type; +``` + +```response +┌─────────────SipHash─┬─type───┠+│ 8017656310194184311 │ UInt64 │ +└─────────────────────┴────────┘ +``` + +## sipHash128 + +[sipHash64](#siphash64)ã¨åŒæ§˜ã§ã™ãŒã€128ビットã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’生æˆã—ã¾ã™ã€‚最終的ãªxor折りãŸãŸã¿çŠ¶æ…‹ã¯128ビットã¾ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +:::note +ã“ã®128ビットã®ãƒãƒªã‚¢ãƒ³ãƒˆã¯ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹å®Ÿè£…ã¨ã¯ç•°ãªã‚Šã€å¼±ã„ã§ã™ã€‚ +ã“ã‚Œã¯ã€æ›¸ã‹ã‚ŒãŸå½“時ã€SipHashã®å…¬å¼ãª128ビット拡張ãŒå­˜åœ¨ã—ãªã‹ã£ãŸãŸã‚ã§ã™ã€‚ +æ–°ã—ã„プロジェクトã§ã¯ãŠãらã[sipHash128Reference](#siphash128reference)を使用ã™ã¹ãã§ã™ã€‚ +::: + +**構文** + +```sql +sipHash128(par1,...) +``` + +**引数** + +[sipHash64](#siphash64)ã¨åŒæ§˜ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +128ビットã®`SipHash`ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[FixedString(16)](../data-types/fixedstring.md)型。 + +**例** + +クエリ: + +```sql +SELECT hex(sipHash128('foo', '\x01', 3)); +``` + +çµæžœ: + +```response +┌─hex(sipHash128('foo', '', 3))────┠+│ 9DE516A64A414D4B1B609415E4523F24 │ +└──────────────────────────────────┘ +``` + +## sipHash128Keyed + +[sipHash128](#siphash128)ã¨åŒæ§˜ã§ã™ãŒã€å›ºå®šã‚­ãƒ¼ã‚’使用ã™ã‚‹ä»£ã‚ã‚Šã«æ˜Žç¤ºçš„ãªã‚­ãƒ¼å¼•æ•°ã‚’追加ã§å–ã‚Šã¾ã™ã€‚ + +:::note +ã“ã®128ビットã®ãƒãƒªã‚¢ãƒ³ãƒˆã¯ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹å®Ÿè£…ã¨ã¯ç•°ãªã‚Šã€å¼±ã„ã§ã™ã€‚ +ã“ã‚Œã¯ã€æ›¸ã‹ã‚ŒãŸå½“時ã€SipHashã®å…¬å¼ãª128ビット拡張ãŒå­˜åœ¨ã—ãªã‹ã£ãŸãŸã‚ã§ã™ã€‚ +æ–°ã—ã„プロジェクトã§ã¯ãŠãらã[sipHash128ReferenceKeyed](#siphash128referencekeyed)を使用ã™ã¹ãã§ã™ã€‚ +::: + +**構文** + +```sql +sipHash128Keyed((k0, k1), par1,...) +``` + +**引数** + +[sipHash128](#siphash128)ã¨åŒæ§˜ã§ã™ãŒã€æœ€åˆã®å¼•æ•°ã¯ã‚­ãƒ¼ã‚’表ã™äºŒã¤ã®`UInt64`値ã®ã‚¿ãƒ—ルã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +128ビットã®`SipHash`ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[FixedString(16)](../data-types/fixedstring.md)型。 + +**例** + +クエリ: + +```sql +SELECT hex(sipHash128Keyed((506097522914230528, 1084818905618843912),'foo', '\x01', 3)); +``` + +çµæžœ: + +```response +┌─hex(sipHash128Keyed((506097522914230528, 1084818905618843912), 'foo', '', 3))─┠+│ B8467F65C8B4CFD9A5F8BD733917D9BF │ +└───────────────────────────────────────────────────────────────────────────────┘ +``` + +## sipHash128Reference + +[sipHash128](#siphash128)ã¨åŒæ§˜ã§ã™ãŒã€SipHashã®ã‚ªãƒªã‚¸ãƒŠãƒ«ä½œè€…ã«ã‚ˆã‚‹128ビットアルゴリズムを実装ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +sipHash128Reference(par1,...) +``` + +**引数** + +[sipHash128](#siphash128)ã¨åŒæ§˜ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +128ビットã®`SipHash`ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[FixedString(16)](../data-types/fixedstring.md)型。 + +**例** + +クエリ: + +```sql +SELECT hex(sipHash128Reference('foo', '\x01', 3)); +``` + +çµæžœ: + +```response +┌─hex(sipHash128Reference('foo', '', 3))─┠+│ 4D1BE1A22D7F5933C0873E1698426260 │ +└────────────────────────────────────────┘ +``` + +## sipHash128ReferenceKeyed + +[sipHash128Reference](#siphash128reference)ã¨åŒæ§˜ã§ã™ãŒã€å›ºå®šã‚­ãƒ¼ã‚’使用ã™ã‚‹ä»£ã‚ã‚Šã«æ˜Žç¤ºçš„ãªã‚­ãƒ¼å¼•æ•°ã‚’追加ã§å–ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +sipHash128ReferenceKeyed((k0, k1), par1,...) +``` + +**引数** + +[sipHash128Reference](#siphash128reference)ã¨åŒæ§˜ã§ã™ãŒã€æœ€åˆã®å¼•æ•°ã¯ã‚­ãƒ¼ã‚’表ã™äºŒã¤ã®`UInt64`値ã®ã‚¿ãƒ—ルã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +128ビットã®`SipHash`ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[FixedString(16)](../data-types/fixedstring.md)型。 + +**例** + +クエリ: + +```sql +SELECT hex(sipHash128ReferenceKeyed((506097522914230528, 1084818905618843912),'foo', '\x01', 3)); +``` + +çµæžœ: + +```response +┌─hex(sipHash128ReferenceKeyed((506097522914230528, 1084818905618843912), 'foo', '', 3))─┠+│ 630133C9722DC08646156B8130C4CDC8 │ +└────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## cityHash64 + +64ビットã®[CityHash](https://github.com/google/cityhash)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +```sql +cityHash64(par1,...) +``` + +ã“ã‚Œã¯é«˜é€Ÿãªéžæš—å·åŒ–ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã§ã™ã€‚文字列パラメータã«ã¯CityHashアルゴリズムを使用ã—ã€ä»–ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒ‘ラメータã«ã¯å®Ÿè£…固有ã®é«˜é€Ÿéžæš—å·åŒ–ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã‚’使用ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯CityHashã®ã‚³ãƒ³ãƒ“ãƒãƒ¼ã‚¿ã‚’使用ã—ã¦æœ€çµ‚çµæžœã‚’å¾—ã¾ã™ã€‚ + +GoogleãŒCityHashã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’ClickHouseã«è¿½åŠ ã•ã‚ŒãŸå¾Œã«å¤‰æ›´ã—ãŸã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã¤ã¾ã‚Šã€ClickHouseã®cityHash64ã¨Googleã®ä¸Šæµã®CityHashã¯ç•°ãªã‚‹çµæžœã‚’生æˆã—ã¾ã™ã€‚ClickHouseã®cityHash64ã¯CityHash v1.0.2ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ + +**引数** + +ã“ã®é–¢æ•°ã¯å¯å¤‰æ•°ã®å…¥åŠ›ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚引数ã¯[サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型](../data-types/index.md)ã®ã„ãšã‚Œã‹ã§ã‚ã‚Šå¾—ã¾ã™ã€‚ç•°ãªã‚‹åž‹ã®å¼•æ•°ã§ã‚‚ã€åŒã˜å€¤ã«å¯¾ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®å€¤ãŒåŒã˜ã«ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆç•°ãªã‚‹ã‚µã‚¤ã‚ºã®æ•´æ•°ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤åå‰ä»˜ããŠã‚ˆã³åå‰ãªã—ã®`Tuple`ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤`Map`ãŠã‚ˆã³å¯¾å¿œã™ã‚‹`Array(Tuple(key, value))`型)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +[UInt64](../data-types/int-uint.md)データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã€‚ + +**例** + +呼ã³å‡ºã—例: + +```sql +SELECT cityHash64(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00')) AS CityHash, toTypeName(CityHash) AS type; +``` + +```response +┌─────────────CityHash─┬─type───┠+│ 12072650598913549138 │ UInt64 │ +└──────────────────────┴────────┘ +``` + +次ã®ä¾‹ã¯ã€è¡Œé †åºã¾ã§ã®ç²¾åº¦ã§ãƒ†ãƒ¼ãƒ–ル全体ã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’計算ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™: + +```sql +SELECT groupBitXor(cityHash64(*)) FROM table +``` + +## intHash32 + +ä»»æ„ã®åž‹ã®æ•´æ•°ã‹ã‚‰32ビットã®ãƒãƒƒã‚·ãƒ¥ã‚³ãƒ¼ãƒ‰ã‚’計算ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã€æ•°å€¤ç”¨ã®å¹³å‡çš„ãªå“質ã®é«˜é€Ÿãªéžæš—å·åŒ–ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã§ã™ã€‚ + +**構文** + +```sql +intHash32(int) +``` + +**引数** + +- `int` — ãƒãƒƒã‚·ãƒ¥åŒ–ã™ã‚‹æ•´æ•°ã€‚[(U)Int*](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 32ビットã®ãƒãƒƒã‚·ãƒ¥ã‚³ãƒ¼ãƒ‰ã€‚[UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT intHash32(42); +``` + +çµæžœ: + +```response +┌─intHash32(42)─┠+│ 1228623923 │ +└───────────────┘ +``` + +## intHash64 + +ä»»æ„ã®åž‹ã®æ•´æ•°ã‹ã‚‰64ビットã®ãƒãƒƒã‚·ãƒ¥ã‚³ãƒ¼ãƒ‰ã‚’計算ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã€æ•°å€¤ç”¨ã®å¹³å‡çš„ãªå“質ã®é«˜é€Ÿãªéžæš—å·åŒ–ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã§ã™ã€‚ +[intHash32](#inthash32)よりも高速ã«å‹•ä½œã—ã¾ã™ã€‚ + +**構文** + +```sql +intHash64(int) +``` + +**引数** + +- `int` — ãƒãƒƒã‚·ãƒ¥åŒ–ã™ã‚‹æ•´æ•°ã€‚[(U)Int*](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 64ビットã®ãƒãƒƒã‚·ãƒ¥ã‚³ãƒ¼ãƒ‰ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT intHash64(42); +``` + +çµæžœ: + +```response +┌────────intHash64(42)─┠+│ 11490350930367293593 │ +└──────────────────────┘ +``` + +## SHA1, SHA224, SHA256, SHA512, SHA512_256 + +文字列ã‹ã‚‰SHA-1, SHA-224, SHA-256, SHA-512, SHA-512-256ã®ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã€çµæžœã®ãƒã‚¤ãƒˆã‚»ãƒƒãƒˆã‚’[FixedString](../data-types/fixedstring.md)ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +SHA1('s') +... +SHA512('s') +``` + +ã“ã®é–¢æ•°ã¯æ¯”較的é…ã„ã§ã™ï¼ˆSHA-1ã¯1秒ã‚ãŸã‚Š500万ã®çŸ­ã„文字列をプロセッサコアã”ã¨ã«å‡¦ç†ã—ã€SHA-224ã¨SHA-256ã¯ç´„220万を処ç†ã—ã¾ã™ï¼‰ã€‚ +ã“ã®é–¢æ•°ã‚’使用ã™ã‚‹ã®ã¯ã€ç‰¹å®šã®ãƒãƒƒã‚·ãƒ¥é–¢æ•°ãŒå¿…è¦ã§ã‚ã‚Šã€é¸æŠžãŒã§ããªã„å ´åˆã®ã¿ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ +ã“ã®ã‚ˆã†ãªå ´åˆã§ã‚‚ã€ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹éš›ã«ã‚ªãƒ•ãƒ©ã‚¤ãƒ³ã§é–¢æ•°ã‚’é©ç”¨ã—ã€å€¤ã‚’事å‰ã«è¨ˆç®—ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +**引数** + +- `s` — SHAãƒãƒƒã‚·ãƒ¥è¨ˆç®—ã®ãŸã‚ã®å…¥åŠ›æ–‡å­—列。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- SHAãƒãƒƒã‚·ãƒ¥ã‚’16進数éžã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸFixedStringã¨ã—ã¦è¿”ã—ã¾ã™ã€‚SHA-1ã¯FixedString(20)ã¨ã—ã¦ã€SHA-224ã¯FixedString(28)ã€SHA-256ã¯FixedString(32)ã€SHA-512ã¯FixedString(64)ã§ã™ã€‚[FixedString](../data-types/fixedstring.md)。 + +**例** + +çµæžœã‚’16進エンコードã•ã‚ŒãŸæ–‡å­—列ã¨ã—ã¦è¡¨ã™ã«ã¯ã€[hex](../functions/encoding-functions.md/#hex)関数を使用ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT hex(SHA1('abc')); +``` + +çµæžœ: + +```response +┌─hex(SHA1('abc'))─────────────────────────┠+│ A9993E364706816ABA3E25717850C26C9CD0D89D │ +└──────────────────────────────────────────┘ +``` + +## BLAKE3 + +BLAKE3ãƒãƒƒã‚·ãƒ¥æ–‡å­—列を計算ã—ã€çµæžœã®ãƒã‚¤ãƒˆã‚»ãƒƒãƒˆã‚’[FixedString](../data-types/fixedstring.md)ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +BLAKE3('s') +``` + +ã“ã®æš—å·åŒ–ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã¯BLAKE3 Rustライブラリã¨çµ±åˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã‹ãªã‚Šé€Ÿãã€SHA-2ã¨æ¯”較ã—ã¦ç´„2å€ã®æ€§èƒ½ã‚’示ã—ã€SHA-256ã¨åŒã˜é•·ã•ã®ãƒãƒƒã‚·ãƒ¥ã‚’生æˆã—ã¾ã™ã€‚ + +**引数** + +- s - BLAKE3ãƒãƒƒã‚·ãƒ¥è¨ˆç®—ã®ãŸã‚ã®å…¥åŠ›æ–‡å­—列。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- BLAKE3ãƒãƒƒã‚·ãƒ¥ã‚’åž‹FixedString(32)ã®ãƒã‚¤ãƒˆé…列ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚[FixedString](../data-types/fixedstring.md)。 + +**例** + +çµæžœã‚’16進エンコードã•ã‚ŒãŸæ–‡å­—列ã¨ã—ã¦è¡¨ã™ã«ã¯ã€[hex](../functions/encoding-functions.md/#hex)関数を使用ã—ã¾ã™ã€‚ + +クエリ: +```sql +SELECT hex(BLAKE3('ABC')) +``` + +çµæžœ: +```sql +┌─hex(BLAKE3('ABC'))───────────────────────────────────────────────┠+│ D1717274597CF0289694F75D96D444B992A096F1AFD8E7BBFA6EBB1D360FEDFC │ +└──────────────────────────────────────────────────────────────────┘ +``` + +## URLHash(url\[, N\]) + +文字列をURLã‹ã‚‰å–å¾—ã—ã€ã‚る種ã®æ­£è¦åŒ–ã‚’è¡Œã£ãŸå¾Œã€é«˜é€Ÿã§è³ªã®è‰¯ã„éžæš—å·åŒ–ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã‚’計算ã—ã¾ã™ã€‚ +`URLHash(s)` – 終ã‚ã‚Šã«`/`ã€`?`ã€`#`ã®ã„ãšã‚Œã‹ã®è¿½åŠ å…¥åŠ›ã‚·ãƒ³ãƒœãƒ«ãŒã‚ã‚‹å ´åˆã€ãれを除ã„ãŸçŠ¶æ…‹ã§æ–‡å­—列ã‹ã‚‰ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã¾ã™ã€‚ +`URLHash(s, N)` – 終ã‚ã‚Šã«`/`ã€`?`ã€`#`ã®ã„ãšã‚Œã‹ã®è¿½åŠ å…¥åŠ›ã‚·ãƒ³ãƒœãƒ«ãŒã‚ã‚‹å ´åˆã€ãれを除ã„ãŸçŠ¶æ…‹ã§URL階層ã®Nレベルã¾ã§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã¾ã™ã€‚ +レベルã¯URLHierarchyã¨åŒã˜ã§ã™ã€‚ + +## farmFingerprint64 + +## farmHash64 + +64ビットã®[FarmHash](https://github.com/google/farmhash)ã¾ãŸã¯Fingerprint値を生æˆã—ã¾ã™ã€‚`farmFingerprint64`ã¯ã€å®‰å®šã—ã¦ã„ã¦ãƒãƒ¼ã‚¿ãƒ–ルãªå€¤ãŒå¥½ã¾ã—ã„å ´åˆã«ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +```sql +farmFingerprint64(par1, ...) +farmHash64(par1, ...) +``` + +ã“れらã®é–¢æ•°ã¯ã€[使用å¯èƒ½ãªã™ã¹ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰](https://github.com/google/farmhash/blob/master/src/farmhash.h)ã‹ã‚‰ã€ãã‚Œãžã‚Œ`Fingerprint64`ã¨`Hash64`メソッドを使用ã—ã¾ã™ã€‚ + +**引数** + +ã“ã®é–¢æ•°ã¯å¯å¤‰æ•°ã®å…¥åŠ›ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚引数ã¯[サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型](../data-types/index.md)ã®ã„ãšã‚Œã‹ã§ã‚ã‚Šå¾—ã¾ã™ã€‚ç•°ãªã‚‹åž‹ã®å¼•æ•°ã§ã‚‚ã€åŒã˜å€¤ã«å¯¾ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®å€¤ãŒåŒã˜ã«ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆç•°ãªã‚‹ã‚µã‚¤ã‚ºã®æ•´æ•°ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤åå‰ä»˜ããŠã‚ˆã³åå‰ãªã—ã®`Tuple`ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤`Map`ãŠã‚ˆã³å¯¾å¿œã™ã‚‹`Array(Tuple(key, value))`型)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +[UInt64](../data-types/int-uint.md)データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã€‚ + +**例** + +```sql +SELECT farmHash64(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00')) AS FarmHash, toTypeName(FarmHash) AS type; +``` + +```response +┌─────────────FarmHash─┬─type───┠+│ 17790458267262532859 │ UInt64 │ +└──────────────────────┴────────┘ +``` + +## javaHash + +Javaã®[String](http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/478a4add975b/src/share/classes/java/lang/String.java#l1452)ã‹ã‚‰JavaHashを計算ã—ã¾ã™, +[Byte](https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/478a4add975b/src/share/classes/java/lang/Byte.java#l405), +[Short](https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/478a4add975b/src/share/classes/java/lang/Short.java#l410), +[Integer](https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/478a4add975b/src/share/classes/java/lang/Integer.java#l959), +[Long](https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/478a4add975b/src/share/classes/java/lang/Long.java#l1060). +ã“ã®ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã¯é€Ÿãã‚‚ãªãã€é«˜å“質ã§ã‚‚ã‚ã‚Šã¾ã›ã‚“。ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ãŒä»–ã®ã‚·ã‚¹ãƒ†ãƒ ã§æ—¢ã«ä½¿ç”¨ã•ã‚Œã¦ã„ã¦ã€å…¨ãåŒã˜çµæžœã‚’計算ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«ã®ã¿ä½¿ã†ç†ç”±ãŒã‚ã‚Šã¾ã™ã€‚ + +Javaã¯ç¬¦å·ä»˜ãæ•´æ•°ã®ãƒãƒƒã‚·ãƒ¥ã—ã‹è¨ˆç®—をサãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。符å·ãªã—æ•´æ•°ã®ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ãŸã„å ´åˆã¯ã€é©åˆ‡ãªç¬¦å·ä»˜ãClickHouseåž‹ã«ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +SELECT javaHash('') +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +`Int32`データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã€‚ + +**例** + +クエリ: + +```sql +SELECT javaHash(toInt32(123)); +``` + +çµæžœ: + +```response +┌─javaHash(toInt32(123))─┠+│ 123 │ +└────────────────────────┘ +``` + +クエリ: + +```sql +SELECT javaHash('Hello, world!'); +``` + +çµæžœ: + +```response +┌─javaHash('Hello, world!')─┠+│ -1880044555 │ +└───────────────────────────┘ +``` + +## javaHashUTF16LE + +文字列ã‹ã‚‰JavaHashを計算ã—ã€ãã‚ŒãŒUTF-16LEエンコーディングã§ã‚ã‚‹ãƒã‚¤ãƒˆã‚’æŒã¤ã¨ä»®å®šã—ã¾ã™ã€‚ + +**構文** + +```sql +javaHashUTF16LE(stringUtf16le) +``` + +**引数** + +- `stringUtf16le` — UTF-16LEエンコーディングã•ã‚ŒãŸæ–‡å­—列。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +`Int32`データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã€‚ + +**例** + +UTF-16LEエンコードã•ã‚ŒãŸæ–‡å­—列を用ã„ãŸæ­£ã—ã„クエリ。 + +クエリ: + +```sql +SELECT javaHashUTF16LE(convertCharset('test', 'utf-8', 'utf-16le')); +``` + +çµæžœ: + +```response +┌─javaHashUTF16LE(convertCharset('test', 'utf-8', 'utf-16le'))─┠+│ 3556498 │ +└──────────────────────────────────────────────────────────────┘ +``` + +## hiveHash + +文字列ã‹ã‚‰`HiveHash`を計算ã—ã¾ã™ã€‚ + +```sql +SELECT hiveHash('') +``` + +ã“ã‚Œã¯ã€ç¬¦å·ãƒ“ットをゼロ化ã—ãŸãŸã ã®[JavaHash](#javahash)ã§ã™ã€‚ã“ã®é–¢æ•°ã¯ã€[Apache Hive](https://en.wikipedia.org/wiki/Apache_Hive)ãƒãƒ¼ã‚¸ãƒ§ãƒ³3.0以å‰ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã¯é€Ÿãも高å“質ã§ã‚‚ã‚ã‚Šã¾ã›ã‚“。ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ãŒä»–ã®ã‚·ã‚¹ãƒ†ãƒ ã§ã™ã§ã«ä½¿ç”¨ã•ã‚Œã¦ã„ã¦ã€å®Œå…¨ã«åŒã˜çµæžœã‚’計算ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«ã®ã¿ä½¿ç”¨ã™ã‚‹ç†ç”±ãŒã‚ã‚Šã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `hiveHash`ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[Int32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT hiveHash('Hello, world!'); +``` + +çµæžœ: + +```response +┌─hiveHash('Hello, world!')─┠+│ 267439093 │ +└───────────────────────────┘ +``` + +## metroHash64 + +64ビットã®[MetroHash](http://www.jandrewrogers.com/2015/05/27/metrohash/)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +```sql +metroHash64(par1, ...) +``` + +**引数** + +ã“ã®é–¢æ•°ã¯å¯å¤‰æ•°ã®å…¥åŠ›ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚引数ã¯[サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型](../data-types/index.md)ã®ã„ãšã‚Œã‹ã§ã‚ã‚Šå¾—ã¾ã™ã€‚ç•°ãªã‚‹åž‹ã®å¼•æ•°ã§ã‚‚ã€åŒã˜å€¤ã«å¯¾ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®å€¤ãŒåŒã˜ã«ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆç•°ãªã‚‹ã‚µã‚¤ã‚ºã®æ•´æ•°ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤åå‰ä»˜ããŠã‚ˆã³åå‰ãªã—ã®`Tuple`ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤`Map`ãŠã‚ˆã³å¯¾å¿œã™ã‚‹`Array(Tuple(key, value))`型)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +[UInt64](../data-types/int-uint.md)データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã€‚ + +**例** + +```sql +SELECT metroHash64(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00')) AS MetroHash, toTypeName(MetroHash) AS type; +``` + +```response +┌────────────MetroHash─┬─type───┠+│ 14235658766382344533 │ UInt64 │ +└──────────────────────┴────────┘ +``` + +## jumpConsistentHash + +UInt64ã‹ã‚‰JumpConsistentHashを計算ã—ã¾ã™ã€‚ +2ã¤ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã™: `UInt64`åž‹ã®ã‚­ãƒ¼ã¨ãƒã‚±ãƒƒãƒˆæ•°ã€‚è¿”ã•ã‚Œã‚‹ã®ã¯`Int32`ã§ã™ã€‚ +詳細ã¯ã€ãƒªãƒ³ã‚¯ã‚’ã”覧ãã ã•ã„: [JumpConsistentHash](https://arxiv.org/pdf/1406.2294.pdf) + +## kostikConsistentHash + +Konstantin 'kostik' Oblakovã«ã‚ˆã‚‹O(1)時間ãŠã‚ˆã³ç©ºé–“ã®ä¸€è²«æ€§ãƒãƒƒã‚·ãƒ¥ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã€‚以å‰ã¯`yandexConsistentHash`。 + +**構文** + +```sql +kostikConsistentHash(input, n) +``` + +別å: `yandexConsistentHash`(後方互æ›æ€§ã®ãŸã‚ã«æ®‹ã•ã‚Œã¦ã„ã¾ã™ï¼‰ã€‚ + +**パラメータ** + +- `input`: `UInt64`åž‹ã®ã‚­ãƒ¼ã€‚[UInt64](../data-types/int-uint.md)。 +- `n`: ãƒã‚±ãƒƒãƒˆæ•°ã€‚[UInt16](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [UInt16](../data-types/int-uint.md)データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã€‚ + +**実装ã®ç´°éƒ¨** + +n <= 32768ã®å ´åˆã«ã®ã¿åŠ¹çŽ‡çš„ã§ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT kostikConsistentHash(16045690984833335023, 2); +``` + +```response +┌─kostikConsistentHash(16045690984833335023, 2)─┠+│ 1 │ +└───────────────────────────────────────────────┘ +``` + +## murmurHash2_32, murmurHash2_64 + +[MurmurHash2](https://github.com/aappleby/smhasher)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +```sql +murmurHash2_32(par1, ...) +murmurHash2_64(par1, ...) +``` + +**引数** + +両方ã®é–¢æ•°ã¯å¯å¤‰æ•°ã®å…¥åŠ›ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚引数ã¯[サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型](../data-types/index.md)ã®ã„ãšã‚Œã‹ã§ã‚ã‚Šå¾—ã¾ã™ã€‚ç•°ãªã‚‹åž‹ã®å¼•æ•°ã§ã‚‚ã€åŒã˜å€¤ã«å¯¾ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®å€¤ãŒåŒã˜ã«ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆç•°ãªã‚‹ã‚µã‚¤ã‚ºã®æ•´æ•°ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤åå‰ä»˜ããŠã‚ˆã³åå‰ãªã—ã®`Tuple`ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤`Map`ãŠã‚ˆã³å¯¾å¿œã™ã‚‹`Array(Tuple(key, value))`型)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `murmurHash2_32`関数ã¯[UInt32](../data-types/int-uint.md)データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- `murmurHash2_64`関数ã¯[UInt64](../data-types/int-uint.md)データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +```sql +SELECT murmurHash2_64(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00')) AS MurmurHash2, toTypeName(MurmurHash2) AS type; +``` + +```response +┌──────────MurmurHash2─┬─type───┠+│ 11832096901709403633 │ UInt64 │ +└──────────────────────┴────────┘ +``` + +## gccMurmurHash + +[gcc](https://github.com/gcc-mirror/gcc/blob/41d6b10e96a1de98e90a7c0378437c3255814b16/libstdc%2B%2B-v3/include/bits/functional_hash.h#L191)ã¨åŒã˜ãƒãƒƒã‚·ãƒ¥ã‚·ãƒ¼ãƒ‰ã‚’使用ã—ã¦64ビットã®[MurmurHash2](https://github.com/aappleby/smhasher)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã¾ã™ã€‚Clangã¨GCCã®ãƒ“ルド間ã§äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +gccMurmurHash(par1, ...) +``` + +**引数** + +- `par1, ...` — [サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型](../data-types/index.md/#data_types)ã®ã„ãšã‚Œã‹ã§ã‚ã‚‹å¯å¤‰æ•°ã®ãƒ‘ラメータ。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 計算ã•ã‚ŒãŸãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + gccMurmurHash(1, 2, 3) AS res1, + gccMurmurHash(('a', [1, 2, 3], 4, (4, ['foo', 'bar'], 1, (1, 2)))) AS res2 +``` + +çµæžœ: + +```response +┌─────────────────res1─┬────────────────res2─┠+│ 12384823029245979431 │ 1188926775431157506 │ +└──────────────────────┴─────────────────────┘ +``` + +## kafkaMurmurHash + +[Kafka](https://github.com/apache/kafka/blob/461c5cfe056db0951d9b74f5adc45973670404d7/clients/src/main/java/org/apache/kafka/common/utils/Utils.java#L482)ã¨åŒã˜ãƒãƒƒã‚·ãƒ¥ã‚·ãƒ¼ãƒ‰ã‚’使用ã—ã¦32ビットã®[MurmurHash2](https://github.com/aappleby/smhasher)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã€[Default Partitioner](https://github.com/apache/kafka/blob/139f7709bd3f5926901a21e55043388728ccca78/clients/src/main/java/org/apache/kafka/clients/producer/internals/BuiltInPartitioner.java#L328)ã¨äº’æ›æ€§ãŒã‚るよã†ã«æœ€ä¸Šä½ãƒ“ットをæŒã¡ã¾ã›ã‚“。 + +**構文** + +```sql +MurmurHash(par1, ...) +``` + +**引数** + +- `par1, ...` — [サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型](../data-types/index.md/#data_types)ã®ã„ãšã‚Œã‹ã§ã‚ã‚‹å¯å¤‰æ•°ã®ãƒ‘ラメータ。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 計算ã•ã‚ŒãŸãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + kafkaMurmurHash('foobar') AS res1, + kafkaMurmurHash(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00')) AS res2 +``` + +çµæžœ: + +```response +┌───────res1─┬─────res2─┠+│ 1357151166 │ 85479775 │ +└────────────┴──────────┘ +``` + +## murmurHash3_32, murmurHash3_64 + +[MurmurHash3](https://github.com/aappleby/smhasher)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +```sql +murmurHash3_32(par1, ...) +murmurHash3_64(par1, ...) +``` + +**引数** + +両方ã®é–¢æ•°ã¯å¯å¤‰æ•°ã®å…¥åŠ›ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚引数ã¯[サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型](../data-types/index.md)ã®ã„ãšã‚Œã‹ã§ã‚ã‚Šå¾—ã¾ã™ã€‚ç•°ãªã‚‹åž‹ã®å¼•æ•°ã§ã‚‚ã€åŒã˜å€¤ã«å¯¾ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®å€¤ãŒåŒã˜ã«ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆç•°ãªã‚‹ã‚µã‚¤ã‚ºã®æ•´æ•°ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤åå‰ä»˜ããŠã‚ˆã³åå‰ãªã—ã®`Tuple`ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤`Map`ãŠã‚ˆã³å¯¾å¿œã™ã‚‹`Array(Tuple(key, value))`型)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `murmurHash3_32`関数ã¯[UInt32](../data-types/int-uint.md)データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- `murmurHash3_64`関数ã¯[UInt64](../data-types/int-uint.md)データ型ã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +```sql +SELECT murmurHash3_32(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00')) AS MurmurHash3, toTypeName(MurmurHash3) AS type; +``` + +```response +┌─MurmurHash3─┬─type───┠+│ 2152717 │ UInt32 │ +└─────────────┴────────┘ +``` + +## murmurHash3_128 + +128ビットã®[MurmurHash3](https://github.com/aappleby/smhasher)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +murmurHash3_128(expr) +``` + +**引数** + +- `expr` — [å¼](../syntax.md/#syntax-expressions)ã®ãƒªã‚¹ãƒˆã€‚[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +128ビットã®`MurmurHash3`ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[FixedString(16)](../data-types/fixedstring.md)。 + +**例** + +クエリ: + +```sql +SELECT hex(murmurHash3_128('foo', 'foo', 'foo')); +``` + +çµæžœ: + +```response +┌─hex(murmurHash3_128('foo', 'foo', 'foo'))─┠+│ F8F7AD9B6CD4CF117A71E277E2EC2931 │ +└───────────────────────────────────────────┘ +``` + +## xxh3 + +64ビットã®[xxh3](https://github.com/Cyan4973/xxHash)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +xxh3(expr) +``` + +**引数** + +- `expr` — ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®[å¼](../syntax.md/#syntax-expressions)ã®ãƒªã‚¹ãƒˆã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +64ビットã®`xxh3`ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT xxh3('Hello', 'world') +``` + +çµæžœ: + +```response +┌─xxh3('Hello', 'world')─┠+│ 5607458076371731292 │ +└────────────────────────┘ +``` + +## xxHash32, xxHash64 + +文字列ã‹ã‚‰`xxHash`を計算ã—ã¾ã™ã€‚32ビットã¨64ビットã®2ã¤ã®ãƒ•ãƒ¬ãƒ¼ãƒãƒ¼ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +SELECT xxHash32('') + +OR + +SELECT xxHash64('') +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt32/64](../data-types/int-uint.md)。 + +:::note +戻り型ã¯`xxHash32`ã®å ´åˆ`UInt32`ã€`xxHash64`ã®å ´åˆ`UInt64`ã«ãªã‚Šã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT xxHash32('Hello, world!'); +``` + +çµæžœ: + +```response +┌─xxHash32('Hello, world!')─┠+│ 834093149 │ +└───────────────────────────┘ +``` + +**関連項目** + +- [xxHash](http://cyan4973.github.io/xxHash/)。 + +## ngramSimHash + +ASCII文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€n-gramã®`simhash`ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +[bitHammingDistance](../functions/bit-functions.md/#bithammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚計算ã•ã‚ŒãŸ2ã¤ã®æ–‡å­—列ã®`simhashes`ã®[ãƒãƒŸãƒ³ã‚°è·é›¢](https://en.wikipedia.org/wiki/Hamming_distance)ãŒå°ã•ã„ã»ã©ã€ãれらã®æ–‡å­—列ã¯åŒã˜å¯èƒ½æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +ngramSimHash(string[, ngramsize]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT ngramSimHash('ClickHouse') AS Hash; +``` + +çµæžœ: + +```response +┌───────Hash─┠+│ 1627567969 │ +└────────────┘ +``` + +## ngramSimHashCaseInsensitive + +ASCII文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€n-gramã®`simhash`ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +[bitHammingDistance](../functions/bit-functions.md/#bithammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚計算ã•ã‚ŒãŸ2ã¤ã®æ–‡å­—列ã®`simhashes`ã®[ãƒãƒŸãƒ³ã‚°è·é›¢](https://en.wikipedia.org/wiki/Hamming_distance)ãŒå°ã•ã„ã»ã©ã€ãれらã®æ–‡å­—列ã¯åŒã˜å¯èƒ½æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +ngramSimHashCaseInsensitive(string[, ngramsize]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT ngramSimHashCaseInsensitive('ClickHouse') AS Hash; +``` + +çµæžœ: + +```response +┌──────Hash─┠+│ 562180645 │ +└───────────┘ +``` + +## ngramSimHashUTF8 + +UTF-8文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€n-gramã®`simhash`ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +[bitHammingDistance](../functions/bit-functions.md/#bithammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚計算ã•ã‚ŒãŸ2ã¤ã®æ–‡å­—列ã®`simhashes`ã®[ãƒãƒŸãƒ³ã‚°è·é›¢](https://en.wikipedia.org/wiki/Hamming_distance)ãŒå°ã•ã„ã»ã©ã€ãれらã®æ–‡å­—列ã¯åŒã˜å¯èƒ½æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +ngramSimHashUTF8(string[, ngramsize]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT ngramSimHashUTF8('ClickHouse') AS Hash; +``` + +çµæžœ: + +```response +┌───────Hash─┠+│ 1628157797 │ +└────────────┘ +``` + +## ngramSimHashCaseInsensitiveUTF8 + +UTF-8文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€n-gramã®`simhash`ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +[bitHammingDistance](../functions/bit-functions.md/#bithammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚計算ã•ã‚ŒãŸ2ã¤ã®æ–‡å­—列ã®`simhashes`ã®[ãƒãƒŸãƒ³ã‚°è·é›¢](https://en.wikipedia.org/wiki/Hamming_distance)ãŒå°ã•ã„ã»ã©ã€ãれらã®æ–‡å­—列ã¯åŒã˜å¯èƒ½æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +ngramSimHashCaseInsensitiveUTF8(string[, ngramsize]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT ngramSimHashCaseInsensitiveUTF8('ClickHouse') AS Hash; +``` + +çµæžœ: + +```response +┌───────Hash─┠+│ 1636742693 │ +└────────────┘ +``` + +## wordShingleSimHash + +ASCII文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã¦ã€å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®`simhash`ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +[bitHammingDistance](../functions/bit-functions.md/#bithammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚計算ã•ã‚ŒãŸ2ã¤ã®æ–‡å­—列ã®`simhashes`ã®[ãƒãƒŸãƒ³ã‚°è·é›¢](https://en.wikipedia.org/wiki/Hamming_distance)ãŒå°ã•ã„ã»ã©ã€ãれらã®æ–‡å­—列ã¯åŒã˜å¯èƒ½æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +wordShingleSimHash(string[, shinglesize]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT wordShingleSimHash('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).') AS Hash; +``` + +çµæžœ: + +```response +┌───────Hash─┠+│ 2328277067 │ +└────────────┘ +``` + +## wordShingleSimHashCaseInsensitive + +ASCII文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã¦ã€å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®`simhash`ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +[bitHammingDistance](../functions/bit-functions.md/#bithammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚計算ã•ã‚ŒãŸ2ã¤ã®æ–‡å­—列ã®`simhashes`ã®[ãƒãƒŸãƒ³ã‚°è·é›¢](https://en.wikipedia.org/wiki/Hamming_distance)ãŒå°ã•ã„ã»ã©ã€ãれらã®æ–‡å­—列ã¯åŒã˜å¯èƒ½æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +wordShingleSimHashCaseInsensitive(string[, shinglesize]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT wordShingleSimHashCaseInsensitive('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).') AS Hash; +``` + +çµæžœ: + +```response +┌───────Hash─┠+│ 2194812424 │ +└────────────┘ +``` + +## wordShingleSimHashUTF8 + +UTF-8文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã¦ã€å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®`simhash`ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +[bitHammingDistance](../functions/bit-functions.md/#bithammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚計算ã•ã‚ŒãŸ2ã¤ã®æ–‡å­—列ã®`simhashes`ã®[ãƒãƒŸãƒ³ã‚°è·é›¢](https://en.wikipedia.org/wiki/Hamming_distance)ãŒå°ã•ã„ã»ã©ã€ãれらã®æ–‡å­—列ã¯åŒã˜å¯èƒ½æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +wordShingleSimHashUTF8(string[, shinglesize]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT wordShingleSimHashUTF8('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).') AS Hash; +``` + +çµæžœ: + +```response +┌───────Hash─┠+│ 2328277067 │ +└────────────┘ +``` + +## wordShingleSimHashCaseInsensitiveUTF8 + +UTF-8文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã¦ã€å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®`simhash`ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +[bitHammingDistance](../functions/bit-functions.md/#bithammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚計算ã•ã‚ŒãŸ2ã¤ã®æ–‡å­—列ã®`simhashes`ã®[ãƒãƒŸãƒ³ã‚°è·é›¢](https://en.wikipedia.org/wiki/Hamming_distance)ãŒå°ã•ã„ã»ã©ã€ãれらã®æ–‡å­—列ã¯åŒã˜å¯èƒ½æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +wordShingleSimHashCaseInsensitiveUTF8(string[, shinglesize]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT wordShingleSimHashCaseInsensitiveUTF8('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).') AS Hash; +``` + +çµæžœ: + +```response +┌───────Hash─┠+│ 2194812424 │ +└────────────┘ +``` + +## wyHash64 + +64ビットã®[wyHash64](https://github.com/wangyi-fudan/wyhash)ãƒãƒƒã‚·ãƒ¥å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +wyHash64(string) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT wyHash64('ClickHouse') AS Hash; +``` + +çµæžœ: + +```response +┌─────────────────Hash─┠+│ 12336419557878201794 │ +└──────────────────────┘ +``` + +## ngramMinHash + +ASCII文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€å„n-gramã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã¾ã™ã€‚`hashnum`個ã®æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã€`hashnum`個ã®æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã¾ã™ã€‚ã“れらã®ãƒãƒƒã‚·ãƒ¥ã‚’å«ã‚€ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +[tupleHammingDistance](../functions/tuple-functions.md/#tuplehammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚2ã¤ã®æ–‡å­—列ã®å ´åˆ: è¿”ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥ã®ã„ãšã‚Œã‹ãŒä¸¡æ–¹ã®æ–‡å­—列ã§åŒã˜ã§ã‚ã‚‹å ´åˆã€ãれらã®æ–‡å­—列ã¯åŒã˜ã§ã‚ã‚‹ã¨è€ƒãˆã¾ã™ã€‚ + +**構文** + +```sql +ngramMinHash(string[, ngramsize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã®è¨ˆç®—ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2ã¤ã®ãƒãƒƒã‚·ãƒ¥ã‚’æŒã¤ã‚¿ãƒ—ル — 最å°ã¨æœ€å¤§ã€‚[Tuple](../data-types/tuple.md)([UInt64](../data-types/int-uint.md), [UInt64](../data-types/int-uint.md))。 + +**例** + +クエリ: + +```sql +SELECT ngramMinHash('ClickHouse') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple──────────────────────────────────────┠+│ (18333312859352735453,9054248444481805918) │ +└────────────────────────────────────────────┘ +``` + +## ngramMinHashCaseInsensitive + +ASCII文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€å„n-gramã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã¾ã™ã€‚`hashnum`個ã®æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã€`hashnum`個ã®æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã¾ã™ã€‚ã“れらã®ãƒãƒƒã‚·ãƒ¥ã‚’å«ã‚€ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +[tupleHammingDistance](../functions/tuple-functions.md/#tuplehammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚2ã¤ã®æ–‡å­—列ã®å ´åˆ: è¿”ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥ã®ã„ãšã‚Œã‹ãŒä¸¡æ–¹ã®æ–‡å­—列ã§åŒã˜ã§ã‚ã‚‹å ´åˆã€ãれらã®æ–‡å­—列ã¯åŒã˜ã§ã‚ã‚‹ã¨è€ƒãˆã¾ã™ã€‚ + +**構文** + +```sql +ngramMinHashCaseInsensitive(string[, ngramsize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã®è¨ˆç®—ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2ã¤ã®ãƒãƒƒã‚·ãƒ¥ã‚’æŒã¤ã‚¿ãƒ—ル — 最å°ã¨æœ€å¤§ã€‚[Tuple](../data-types/tuple.md)([UInt64](../data-types/int-uint.md), [UInt64](../data-types/int-uint.md))。 + +**例** + +クエリ: + +```sql +SELECT ngramMinHashCaseInsensitive('ClickHouse') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple──────────────────────────────────────┠+│ (2106263556442004574,13203602793651726206) │ +└────────────────────────────────────────────┘ +``` + +## ngramMinHashUTF8 + +UTF-8文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€å„n-gramã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã¾ã™ã€‚`hashnum`個ã®æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã€`hashnum`個ã®æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã¾ã™ã€‚ã“れらã®ãƒãƒƒã‚·ãƒ¥ã‚’å«ã‚€ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +[tupleHammingDistance](../functions/tuple-functions.md/#tuplehammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚2ã¤ã®æ–‡å­—列ã®å ´åˆ: è¿”ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥ã®ã„ãšã‚Œã‹ãŒä¸¡æ–¹ã®æ–‡å­—列ã§åŒã˜ã§ã‚ã‚‹å ´åˆã€ãれらã®æ–‡å­—列ã¯åŒã˜ã§ã‚ã‚‹ã¨è€ƒãˆã¾ã™ã€‚ + +**構文** + +```sql +ngramMinHashUTF8(string[, ngramsize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã®è¨ˆç®—ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2ã¤ã®ãƒãƒƒã‚·ãƒ¥ã‚’æŒã¤ã‚¿ãƒ—ル — 最å°ã¨æœ€å¤§ã€‚[Tuple](../data-types/tuple.md)([UInt64](../data-types/int-uint.md), [UInt64](../data-types/int-uint.md))。 + +**例** + +クエリ: + +```sql +SELECT ngramMinHashUTF8('ClickHouse') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple──────────────────────────────────────┠+│ (18333312859352735453,6742163577938632877) │ +└────────────────────────────────────────────┘ +``` + +## ngramMinHashCaseInsensitiveUTF8 + +UTF-8文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€å„n-gramã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã¾ã™ã€‚`hashnum`個ã®æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã€`hashnum`個ã®æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã¾ã™ã€‚ã“れらã®ãƒãƒƒã‚·ãƒ¥ã‚’å«ã‚€ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +[tupleHammingDistance](../functions/tuple-functions.md/#tuplehammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚2ã¤ã®æ–‡å­—列ã®å ´åˆ: è¿”ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥ã®ã„ãšã‚Œã‹ãŒä¸¡æ–¹ã®æ–‡å­—列ã§åŒã˜ã§ã‚ã‚‹å ´åˆã€ãれらã®æ–‡å­—列ã¯åŒã˜ã§ã‚ã‚‹ã¨è€ƒãˆã¾ã™ã€‚ + +**構文** + +```sql +ngramMinHashCaseInsensitiveUTF8(string [, ngramsize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã®è¨ˆç®—ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2ã¤ã®ãƒãƒƒã‚·ãƒ¥ã‚’æŒã¤ã‚¿ãƒ—ル — 最å°ã¨æœ€å¤§ã€‚[Tuple](../data-types/tuple.md)([UInt64](../data-types/int-uint.md), [UInt64](../data-types/int-uint.md))。 + +**例** + +クエリ: + +```sql +SELECT ngramMinHashCaseInsensitiveUTF8('ClickHouse') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple───────────────────────────────────────┠+│ (12493625717655877135,13203602793651726206) │ +└─────────────────────────────────────────────┘ +``` + +## ngramMinHashArg + +ASCII文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã™ã‚‹[ngramMinHash](#ngramminhash)関数ã§åŒã˜å…¥åŠ›ã‚’用ã„ã¦è¨ˆç®—ã•ã‚ŒãŸn-gramsã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +**構文** + +```sql +ngramMinHashArg(string[, ngramsize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã®è¨ˆç®—ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å„`hashnum`個ã®n-gramsã‚’æŒã¤2ã¤ã®ã‚¿ãƒ—ルをå«ã‚€ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)([Tuple](../data-types/tuple.md)([String](../data-types/string.md)), [Tuple](../data-types/tuple.md)([String](../data-types/string.md)))。 + +**例** + +クエリ: + +```sql +SELECT ngramMinHashArg('ClickHouse') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple─────────────────────────────────────────────────────────────────────────┠+│ (('ous','ick','lic','Hou','kHo','use'),('Hou','lic','ick','ous','ckH','Cli')) │ +└───────────────────────────────────────────────────────────────────────────────┘ +``` + +## ngramMinHashArgCaseInsensitive + +ASCII文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã™ã‚‹[ngramMinHashCaseInsensitive](#ngramminhashcaseinsensitive)関数ã§åŒã˜å…¥åŠ›ã‚’用ã„ã¦è¨ˆç®—ã•ã‚ŒãŸn-gramsã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +**構文** + +```sql +ngramMinHashArgCaseInsensitive(string[, ngramsize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã®è¨ˆç®—ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å„`hashnum`個ã®n-gramsã‚’æŒã¤2ã¤ã®ã‚¿ãƒ—ルをå«ã‚€ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)([Tuple](../data-types/tuple.md)([String](../data-types/string.md)), [Tuple](../data-types/tuple.md)([String](../data-types/string.md)))。 + +**例** + +クエリ: + +```sql +SELECT ngramMinHashArgCaseInsensitive('ClickHouse') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple─────────────────────────────────────────────────────────────────────────┠+│ (('ous','ick','lic','kHo','use','Cli'),('kHo','lic','ick','ous','ckH','Hou')) │ +└───────────────────────────────────────────────────────────────────────────────┘ +``` + +## ngramMinHashArgUTF8 + +UTF-8文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã™ã‚‹[ngramMinHashUTF8](#ngramminhashutf8)関数ã§åŒã˜å…¥åŠ›ã‚’用ã„ã¦è¨ˆç®—ã•ã‚ŒãŸn-gramsã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +**構文** + +```sql +ngramMinHashArgUTF8(string[, ngramsize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã®è¨ˆç®—ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å„`hashnum`個ã®n-gramsã‚’æŒã¤2ã¤ã®ã‚¿ãƒ—ルをå«ã‚€ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)([Tuple](../data-types/tuple.md)([String](../data-types/string.md)), [Tuple](../data-types/tuple.md)([String](../data-types/string.md)))。 + +**例** + +クエリ: + +```sql +SELECT ngramMinHashArgUTF8('ClickHouse') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple─────────────────────────────────────────────────────────────────────────┠+│ (('ous','ick','lic','Hou','kHo','use'),('kHo','Hou','lic','ick','ous','ckH')) │ +└───────────────────────────────────────────────────────────────────────────────┘ +``` + +## ngramMinHashArgCaseInsensitiveUTF8 + +UTF-8文字列を`ngramsize`シンボルã®n-gramã«åˆ†å‰²ã—ã€æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã™ã‚‹[ngramMinHashCaseInsensitiveUTF8](#ngramminhashcaseinsensitiveutf8)関数ã§åŒã˜å…¥åŠ›ã‚’用ã„ã¦è¨ˆç®—ã•ã‚ŒãŸn-gramsã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +**構文** + +```sql +ngramMinHashArgCaseInsensitiveUTF8(string[, ngramsize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã®è¨ˆç®—ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å„`hashnum`個ã®n-gramsã‚’æŒã¤2ã¤ã®ã‚¿ãƒ—ルをå«ã‚€ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)([Tuple](../data-types/tuple.md)([String](../data-types/string.md)), [Tuple](../data-types/tuple.md)([String](../data-types/string.md)))。 + +**例** + +クエリ: + +```sql +SELECT ngramMinHashArgCaseInsensitiveUTF8('ClickHouse') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple─────────────────────────────────────────────────────────────────────────┠+│ (('ckH','ous','ick','lic','kHo','use'),('kHo','lic','ick','ous','ckH','Hou')) │ +└───────────────────────────────────────────────────────────────────────────────┘ +``` + +## wordShingleMinHash + +ASCII文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã¦ã€å„å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã¾ã™ã€‚`hashnum`個ã®æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã€`hashnum`個ã®æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã¾ã™ã€‚ã“れらã®ãƒãƒƒã‚·ãƒ¥ã‚’å«ã‚€ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +[tupleHammingDistance](../functions/tuple-functions.md/#tuplehammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚2ã¤ã®æ–‡å­—列ã®å ´åˆ: è¿”ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥ã®ã„ãšã‚Œã‹ãŒä¸¡æ–¹ã®æ–‡å­—列ã§åŒã˜ã§ã‚ã‚‹å ´åˆã€ãれらã®æ–‡å­—列ã¯åŒã˜ã§ã‚ã‚‹ã¨è€ƒãˆã¾ã™ã€‚ + +**構文** + +```sql +wordShingleMinHash(string[, shinglesize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã®è¨ˆç®—ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2ã¤ã®ãƒãƒƒã‚·ãƒ¥ã‚’æŒã¤ã‚¿ãƒ—ル — 最å°ã¨æœ€å¤§ã€‚[Tuple](../data-types/tuple.md)([UInt64](../data-types/int-uint.md), [UInt64](../data-types/int-uint.md))。 + +**例** + +クエリ: + +```sql +SELECT wordShingleMinHash('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple──────────────────────────────────────┠+│ (16452112859864147620,5844417301642981317) │ +└────────────────────────────────────────────┘ +``` + +## wordShingleMinHashCaseInsensitive + +ASCII文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã¦ã€å„å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã¾ã™ã€‚`hashnum`個ã®æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã€`hashnum`個ã®æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã¾ã™ã€‚ã“れらã®ãƒãƒƒã‚·ãƒ¥ã‚’å«ã‚€ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +[tupleHammingDistance](../functions/tuple-functions.md/#tuplehammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列を検出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚2ã¤ã®æ–‡å­—列ã®å ´åˆ: è¿”ã•ã‚Œã‚‹ãƒãƒƒã‚·ãƒ¥ã®ã„ãšã‚Œã‹ãŒä¸¡æ–¹ã®æ–‡å­—列ã§åŒã˜ã§ã‚ã‚‹å ´åˆã€ãれらã®æ–‡å­—列ã¯åŒã˜ã§ã‚ã‚‹ã¨è€ƒãˆã¾ã™ã€‚ + +**構文** + +```sql +wordShingleMinHashCaseInsensitive(string[, shinglesize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã®è¨ˆç®—ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚オプション。å¯èƒ½ãªå€¤ã¯`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値: `6`。[UInt8](../data-types/int-uint.md)। + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2ã¤ã®ãƒãƒƒã‚·ãƒ¥ã‚’æŒã¤ã‚¿ãƒ—ル — 最å°ã¨æœ€å¤§ã€‚[Tuple](../data-types/tuple.md)([UInt64](../data-types/int-uint.md), [UInt64](../data-types/int-uint.md))。 + +**例** + +クエリ: + +```sql +SELECT wordShingleMinHashCaseInsensitive('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple─────────────────────────────────────┠+│ (3065874883688416519,1634050779997673240) │ +└───────────────────────────────────────────┘ +``` + +## wordShingleMinHashUTF8 + +UTF-8文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã¦ã€å„å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã¾ã™ã€‚`hashnum`個ã®æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã€`hashnum`個ã®æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã¾ã™ã€‚ã“れらã®ãƒãƒƒã‚·ãƒ¥ã‚’å«ã‚€ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ +ã¯[tupleHammingDistance](../functions/tuple-functions.md/#tuplehammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列ã®æ¤œå‡ºã«ä½¿ç”¨ã§ãã¾ã™ã€‚2ã¤ã®æ–‡å­—列ã«å¯¾ã—ã¦ã€è¿”ã•ã‚ŒãŸãƒãƒƒã‚·ãƒ¥ã®1ã¤ãŒä¸¡æ–¹ã®æ–‡å­—列ã§åŒã˜ã§ã‚ã‚Œã°ã€ãれらã®æ–‡å­—列ã¯åŒã˜ã§ã‚ã‚‹ã¨è€ƒãˆã¾ã™ã€‚ + +**構文** + +```sql +wordShingleMinHashUTF8(string[, shinglesize, hashnum]) +``` + +**引数** + +- `string` — 文字列。 [String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`3`。 [UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã‚’計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`6`。 [UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2ã¤ã®ãƒãƒƒã‚·ãƒ¥ï¼ˆæœ€å°ãŠã‚ˆã³æœ€å¤§ï¼‰ã®ã‚¿ãƒ—ル。 [Tuple](../data-types/tuple.md)([UInt64](../data-types/int-uint.md), [UInt64](../data-types/int-uint.md))。 + +**例** + +クエリ: + +```sql +SELECT wordShingleMinHashUTF8('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple──────────────────────────────────────┠+│ (16452112859864147620,5844417301642981317) │ +└────────────────────────────────────────────┘ +``` + +## wordShingleMinHashCaseInsensitiveUTF8 + +UTF-8文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã€å„å˜èªžã‚·ãƒ³ã‚°ãƒ«ã«å¯¾ã™ã‚‹ãƒãƒƒã‚·ãƒ¥å€¤ã‚’計算ã—ã¾ã™ã€‚`hashnum`ã®æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å°ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã€`hashnum`ã®æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã‚’計算ã—ã¾ã™ã€‚ã“れらã®ãƒãƒƒã‚·ãƒ¥ã‚’å«ã‚€ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +ã¯[tupleHammingDistance](../functions/tuple-functions.md/#tuplehammingdistance)を使用ã—ã¦ã€åŠé‡è¤‡æ–‡å­—列ã®æ¤œå‡ºã«ä½¿ç”¨ã§ãã¾ã™ã€‚2ã¤ã®æ–‡å­—列ã«å¯¾ã—ã¦ã€è¿”ã•ã‚ŒãŸãƒãƒƒã‚·ãƒ¥ã®1ã¤ãŒä¸¡æ–¹ã®æ–‡å­—列ã§åŒã˜ã§ã‚ã‚Œã°ã€ãれらã®æ–‡å­—列ã¯åŒã˜ã§ã‚ã‚‹ã¨è€ƒãˆã¾ã™ã€‚ + +**構文** + +```sql +wordShingleMinHashCaseInsensitiveUTF8(string[, shinglesize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã‚’計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 2ã¤ã®ãƒãƒƒã‚·ãƒ¥ï¼ˆæœ€å°ãŠã‚ˆã³æœ€å¤§ï¼‰ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)([UInt64](../data-types/int-uint.md), [UInt64](../data-types/int-uint.md))。 + +**例** + +クエリ: + +```sql +SELECT wordShingleMinHashCaseInsensitiveUTF8('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).') AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple─────────────────────────────────────┠+│ (3065874883688416519,1634050779997673240) │ +└───────────────────────────────────────────┘ +``` + +## wordShingleMinHashArg + +ASCII文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã€åŒã˜å…¥åŠ›ã§[wordshingleMinHash](#wordshingleminhash)関数ã«ã‚ˆã£ã¦è¨ˆç®—ã•ã‚ŒãŸæœ€å°ãŠã‚ˆã³æœ€å¤§ãƒ¯ãƒ¼ãƒ‰ãƒãƒƒã‚·ãƒ¥ã‚’æŒã¤ã‚·ãƒ³ã‚°ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +**構文** + +```sql +wordShingleMinHashArg(string[, shinglesize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã‚’計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `hashnum`ワードシングルをå«ã‚€2ã¤ã®ã‚¿ãƒ—ル。 [Tuple](../data-types/tuple.md)([Tuple](../data-types/tuple.md)([String](../data-types/string.md)), [Tuple](../data-types/tuple.md)([String](../data-types/string.md)))。 + +**例** + +クエリ: + +```sql +SELECT wordShingleMinHashArg('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).', 1, 3) AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple─────────────────────────────────────────────────────────────────┠+│ (('OLAP','database','analytical'),('online','oriented','processing')) │ +└───────────────────────────────────────────────────────────────────────┘ +``` + +## wordShingleMinHashArgCaseInsensitive + +ASCII文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã€åŒã˜å…¥åŠ›ã§[wordShingleMinHashCaseInsensitive](#wordshingleminhashcaseinsensitive)関数ã«ã‚ˆã£ã¦è¨ˆç®—ã•ã‚ŒãŸæœ€å°ãŠã‚ˆã³æœ€å¤§ãƒ¯ãƒ¼ãƒ‰ãƒãƒƒã‚·ãƒ¥ã‚’æŒã¤ã‚·ãƒ³ã‚°ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +**構文** + +```sql +wordShingleMinHashArgCaseInsensitive(string[, shinglesize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã‚’計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `hashnum`ワードシングルをå«ã‚€2ã¤ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)([Tuple](../data-types/tuple.md)([String](../data-types/string.md)), [Tuple](../data-types/tuple.md)([String](../data-types/string.md)))。 + +**例** + +クエリ: + +```sql +SELECT wordShingleMinHashArgCaseInsensitive('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).', 1, 3) AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple──────────────────────────────────────────────────────────────────┠+│ (('queries','database','analytical'),('oriented','processing','DBMS')) │ +└────────────────────────────────────────────────────────────────────────┘ +``` + +## wordShingleMinHashArgUTF8 + +UTF-8文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã€åŒã˜å…¥åŠ›ã§[wordShingleMinHashUTF8](#wordshingleminhashutf8)関数ã«ã‚ˆã£ã¦è¨ˆç®—ã•ã‚ŒãŸæœ€å°ãŠã‚ˆã³æœ€å¤§ãƒ¯ãƒ¼ãƒ‰ãƒãƒƒã‚·ãƒ¥ã‚’æŒã¤ã‚·ãƒ³ã‚°ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã™ã€‚ + +**構文** + +```sql +wordShingleMinHashArgUTF8(string[, shinglesize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã‚’計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `hashnum`ワードシングルをå«ã‚€2ã¤ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)([Tuple](../data-types/tuple.md)([String](../data-types/string.md)), [Tuple](../data-types/tuple.md)([String](../data-types/string.md)))。 + +**例** + +クエリ: + +```sql +SELECT wordShingleMinHashArgUTF8('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).', 1, 3) AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple─────────────────────────────────────────────────────────────────┠+│ (('OLAP','database','analytical'),('online','oriented','processing')) │ +└───────────────────────────────────────────────────────────────────────┘ +``` + +## wordShingleMinHashArgCaseInsensitiveUTF8 + +UTF-8文字列を`shinglesize`å˜èªžã®éƒ¨åˆ†ï¼ˆã‚·ãƒ³ã‚°ãƒ«ï¼‰ã«åˆ†å‰²ã—ã€åŒã˜å…¥åŠ›ã§[wordShingleMinHashCaseInsensitiveUTF8](#wordshingleminhashcaseinsensitiveutf8)関数ã«ã‚ˆã£ã¦è¨ˆç®—ã•ã‚ŒãŸæœ€å°ãŠã‚ˆã³æœ€å¤§ãƒ¯ãƒ¼ãƒ‰ãƒãƒƒã‚·ãƒ¥ã‚’æŒã¤ã‚·ãƒ³ã‚°ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +**構文** + +```sql +wordShingleMinHashArgCaseInsensitiveUTF8(string[, shinglesize, hashnum]) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md)。 +- `shinglesize` — å˜èªžã‚·ãƒ³ã‚°ãƒ«ã®ã‚µã‚¤ã‚ºã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`3`。[UInt8](../data-types/int-uint.md)。 +- `hashnum` — çµæžœã‚’計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒãƒƒã‚·ãƒ¥ã®æ•°ã€‚çœç•¥å¯èƒ½ã€‚å¯èƒ½ãªå€¤ï¼š`1`ã‹ã‚‰`25`ã¾ã§ã®ä»»æ„ã®æ•°ã€‚デフォルト値:`6`。[UInt8](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `hashnum`ワードシングルをå«ã‚€2ã¤ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)([Tuple](../data-types/tuple.md)([String](../data-types/string.md)), [Tuple](../data-types/tuple.md)([String](../data-types/string.md)))。 + +**例** + +クエリ: + +```sql +SELECT wordShingleMinHashArgCaseInsensitiveUTF8('ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).', 1, 3) AS Tuple; +``` + +çµæžœ: + +```response +┌─Tuple──────────────────────────────────────────────────────────────────┠+│ (('queries','database','analytical'),('oriented','processing','DBMS')) │ +└────────────────────────────────────────────────────────────────────────┘ +``` + +## sqidEncode + +番å·ã‚’[Sqid](https://sqids.org/)ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ã“ã‚Œã¯YouTubeã®ã‚ˆã†ãªID文字列ã§ã™ã€‚ +出力アルファベット㯠`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789` ã§ã™ã€‚ +ãƒãƒƒã‚·ãƒ¥ã®ãŸã‚ã«ã“ã®é–¢æ•°ã‚’使用ã—ãªã„ã§ãã ã•ã„ - 生æˆã•ã‚ŒãŸIDã¯å…ƒã®ç•ªå·ã«ãƒ‡ã‚³ãƒ¼ãƒ‰å¯èƒ½ã§ã™ã€‚ + +**構文** + +```sql +sqidEncode(number1, ...) +``` + +エイリアス: `sqid` + +**引数** + +- å¯å¤‰å€‹æ•°ã®UInt8, UInt16, UInt32ã¾ãŸã¯UInt64ã®ç•ªå·ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +sqid [String](../data-types/string.md)。 + +**例** + +```sql +SELECT sqidEncode(1, 2, 3, 4, 5); +``` + +```response +┌─sqidEncode(1, 2, 3, 4, 5)─┠+│ gXHfJ1C6dN │ +└───────────────────────────┘ +``` + +## sqidDecode + +[Sqid](https://sqids.org/)ã‚’å…ƒã®ç•ªå·ã«ãƒ‡ã‚³ãƒ¼ãƒ‰ã—ã¾ã™ã€‚入力文字列ãŒæœ‰åŠ¹ãªsqidã§ãªã„å ´åˆã¯ã€ç©ºã®é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +sqidDecode(sqid) +``` + +**引数** + +- sqid - [String](../data-types/string.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +数値ã«å¤‰æ›ã•ã‚ŒãŸsqid [Array(UInt64)](../data-types/array.md)。 + +**例** + +```sql +SELECT sqidDecode('gXHfJ1C6dN'); +``` + +```response +┌─sqidDecode('gXHfJ1C6dN')─┠+│ [1,2,3,4,5] │ +└──────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/in-functions.md b/docs/ja/sql-reference/functions/in-functions.md new file mode 100644 index 00000000000..c13cba1ebbe --- /dev/null +++ b/docs/ja/sql-reference/functions/in-functions.md @@ -0,0 +1,11 @@ +--- +slug: /ja/sql-reference/functions/in-functions +sidebar_position: 90 +sidebar_label: IN オペレーター +--- + +# IN オペレーターを実装ã™ã‚‹ãŸã‚ã®é–¢æ•° + +## in, notIn, globalIn, globalNotIn + +[IN オペレーター](../../sql-reference/operators/in.md#select-in-operators)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/sql-reference/functions/index.md b/docs/ja/sql-reference/functions/index.md new file mode 100644 index 00000000000..7263348bd58 --- /dev/null +++ b/docs/ja/sql-reference/functions/index.md @@ -0,0 +1,63 @@ +--- +slug: /ja/sql-reference/functions/ +sidebar_position: 1 +sidebar_label: æ¦‚è¦ +--- + +# 通常ã®é–¢æ•° + +å°‘ãªãã¨ã‚‚\* 2ã¤ã®ã‚¿ã‚¤ãƒ—ã®é–¢æ•°ãŒã‚ã‚Šã¾ã™ - 通常ã®é–¢æ•°ï¼ˆå˜ã«ã€Œé–¢æ•°ã€ã¨ã‚‚呼ã°ã‚Œã¾ã™ï¼‰ã¨é›†ç´„関数ã§ã™ã€‚ã“れらã¯å…¨ãç•°ãªã‚‹æ¦‚念ã§ã™ã€‚通常ã®é–¢æ•°ã¯å„è¡Œã«å€‹åˆ¥ã«é©ç”¨ã•ã‚Œã‚‹ã‹ã®ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ï¼ˆå„è¡Œã”ã¨ã«ã€é–¢æ•°ã®çµæžœã¯ä»–ã®è¡Œã«ä¾å­˜ã—ã¾ã›ã‚“)。集約関数ã¯ã•ã¾ã–ã¾ãªè¡Œã‹ã‚‰å€¤ã®ã‚»ãƒƒãƒˆã‚’ç´¯ç©ã—ã¾ã™ï¼ˆã¤ã¾ã‚Šã€è¡Œã®å…¨ä½“セットã«ä¾å­˜ã—ã¾ã™ï¼‰ã€‚ + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯é€šå¸¸ã®é–¢æ•°ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚集約関数ã«ã¤ã„ã¦ã¯ã€ã€Œé›†ç´„関数ã€ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’ã”覧ãã ã•ã„。 + +:::note +[‘arrayJoin’ 関数](../functions/array-join.md)ãŒå±žã™ã‚‹ã€3番目ã®ã‚¿ã‚¤ãƒ—ã®é–¢æ•°ãŒã‚ã‚Šã¾ã™ã€‚ãã—ã¦ã€[テーブル関数](../table-functions/index.md)も別途言åŠã§ãã¾ã™ã€‚ +::: + +## å¼·ã„型付㑠+ +標準SQLã¨ã¯å¯¾ç…§çš„ã«ã€ClickHouseã¯å¼·ã„型付ã‘ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ã¤ã¾ã‚Šã€åž‹é–“ã§ã®æš—é»™ã®å¤‰æ›ã¯è¡Œã„ã¾ã›ã‚“。å„関数ã¯ç‰¹å®šã®åž‹ã‚»ãƒƒãƒˆã«å¯¾ã—ã¦å‹•ä½œã—ã¾ã™ã€‚ã“ã‚Œã¯ã€åž‹å¤‰æ›é–¢æ•°ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆãŒã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +## 共通部分å¼ã®å‰Šé™¤ + +クエリ内ã®ã™ã¹ã¦ã®å¼ãŒåŒã˜AST(åŒã˜è¨˜éŒ²ã¾ãŸã¯æ§‹æ–‡è§£æžã®åŒã˜çµæžœï¼‰ã‚’æŒã¤ã¨ãã€ãれらã¯åŒä¸€ã®å€¤ã‚’æŒã¤ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ãã®ã‚ˆã†ãªå¼ã¯é€£çµã•ã‚Œã€1回ã ã‘実行ã•ã‚Œã¾ã™ã€‚åŒä¸€ã®ã‚µãƒ–クエリもã“ã®æ–¹æ³•ã§å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +## çµæžœã®ã‚¿ã‚¤ãƒ— + +ã™ã¹ã¦ã®é–¢æ•°ã¯çµæžœã¨ã—ã¦å˜ä¸€ã®æˆ»ã‚Šå€¤ã‚’è¿”ã—ã¾ã™ï¼ˆè¤‡æ•°ã®å€¤ã§ã‚‚ãªãã€ã‚¼ãƒ­å€¤ã§ã‚‚ã‚ã‚Šã¾ã›ã‚“)。çµæžœã®ã‚¿ã‚¤ãƒ—ã¯é€šå¸¸ã€å€¤ã§ã¯ãªã引数ã®åž‹ã«ã‚ˆã£ã¦ã®ã¿å®šç¾©ã•ã‚Œã¾ã™ã€‚例外ã¯ã€tupleElement関数(a.N演算å­ï¼‰ã¨toFixedString関数ã§ã™ã€‚ + +## 定数 + +簡便性ã®ãŸã‚ã€ç‰¹å®šã®é–¢æ•°ã¯ä¸€éƒ¨ã®å¼•æ•°ã«å¯¾ã—ã¦ã®ã¿å®šæ•°ã§å‹•ä½œã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€LIKE演算å­ã®å³å´ã®å¼•æ•°ã¯å®šæ•°ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ã»ã¨ã‚“ã©ã®é–¢æ•°ã¯å®šæ•°å¼•æ•°ã«å¯¾ã—ã¦å®šæ•°ã‚’è¿”ã—ã¾ã™ã€‚例外ã¯ä¹±æ•°ã‚’生æˆã™ã‚‹é–¢æ•°ã§ã™ã€‚「nowã€é–¢æ•°ã¯ã€ç•°ãªã‚‹æ™‚é–“ã«å®Ÿè¡Œã•ã‚ŒãŸã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ç•°ãªã‚‹å€¤ã‚’è¿”ã—ã¾ã™ãŒã€å˜ä¸€ã®ã‚¯ã‚¨ãƒªå†…ã§ã®ã¿å®šæ•°æ€§ãŒé‡è¦ã§ã‚ã‚‹ãŸã‚ã€ãã®çµæžœã¯å®šæ•°ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚定数å¼ã‚‚定数ã¨è¦‹ãªã•ã‚Œã¾ã™ï¼ˆãŸã¨ãˆã°ã€LIKE演算å­ã®å³åŠåˆ†ã¯è¤‡æ•°ã®å®šæ•°ã‹ã‚‰æ§‹ç¯‰ã§ãã¾ã™ï¼‰ã€‚ + +関数ã¯å®šæ•°å¼•æ•°ã¨éžå®šæ•°å¼•æ•°ã«å¯¾ã—ã¦ç•°ãªã‚‹æ–¹æ³•ã§å®Ÿè£…ã•ã‚Œã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆç•°ãªã‚‹ã‚³ãƒ¼ãƒ‰ãŒå®Ÿè¡Œã•ã‚Œã¾ã™ï¼‰ã€‚ã—ã‹ã—ã€å®šæ•°ã¨åŒã˜å€¤ã ã‘ã‚’æŒã¤çœŸã®ã‚«ãƒ©ãƒ ã®çµæžœã¯ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## NULL å‡¦ç† + +関数ã«ã¯æ¬¡ã®å‹•ä½œãŒã‚ã‚Šã¾ã™ï¼š + +- å°‘ãªãã¨ã‚‚1ã¤ã®å¼•æ•°ãŒ `NULL` ã®å ´åˆã€é–¢æ•°ã®çµæžœã‚‚ `NULL` ã§ã™ã€‚ +- 特別ãªå‹•ä½œãŒå„関数ã®èª¬æ˜Žã«å€‹åˆ¥ã«æŒ‡å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ClickHouseã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã§ã¯ã€ã“れらã®é–¢æ•°ã¯ `UseDefaultImplementationForNulls=false` ã§ãƒžãƒ¼ã‚¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## ä¸å¤‰æ€§ + +関数ã¯å¼•æ•°ã®å€¤ã‚’変更ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ - ã™ã¹ã¦ã®å¤‰æ›´ã¯çµæžœã¨ã—ã¦è¿”ã•ã‚Œã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€å€‹ã€…ã®é–¢æ•°ã‚’計算ã—ãŸçµæžœã¯ã€ã‚¯ã‚¨ãƒªå†…ã§é–¢æ•°ãŒè¨˜è¿°ã•ã‚Œã‚‹é †åºã«ä¾å­˜ã—ã¾ã›ã‚“。 + +## 高階関数ã€`->` 演算å­ã¨ lambda(params, expr) 関数 + +高階関数ã¯ã€ãƒ©ãƒ ãƒ€é–¢æ•°ã®ã¿ã‚’ãã®æ©Ÿèƒ½å¼•æ•°ã¨ã—ã¦å—ã‘入れるã“ã¨ãŒã§ãã¾ã™ã€‚ラムダ関数を高階関数ã«æ¸¡ã™ã«ã¯ã€`->` 演算å­ã‚’使用ã—ã¾ã™ã€‚矢å°ã®å·¦å´ã¯å½¢å¼ä¸Šã®ãƒ‘ラメータã§ã‚ã‚Šã€ã“ã‚Œã¯ä»»æ„ã®IDã€ã¾ãŸã¯ã‚¿ãƒ—ル内ã®ä»»æ„ã®IDã«ãªã‚Šã¾ã™ã€‚矢å°ã®å³å´ã«ã¯ã€ã“れらã®å½¢å¼ä¸Šã®ãƒ‘ラメータã€ãŠã‚ˆã³ä»»æ„ã®ãƒ†ãƒ¼ãƒ–ルカラムを使用ã§ãã‚‹å¼ãŒã‚ã‚Šã¾ã™ã€‚ + +例: + +``` +x -> 2 * x +str -> str != Referer +``` + +複数ã®å¼•æ•°ã‚’å—ã‘入れるラムダ関数も高階関数ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€é«˜éšŽé–¢æ•°ã«ã¯åŒã˜é•·ã•ã®è¤‡æ•°ã®é…列ãŒæ¸¡ã•ã‚Œã€ã“れらã®å¼•æ•°ãŒå¯¾å¿œã—ã¾ã™ã€‚ + +一部ã®é–¢æ•°ã§ã¯ã€æœ€åˆã®å¼•æ•°ï¼ˆãƒ©ãƒ ãƒ€é–¢æ•°ï¼‰ã‚’çœç•¥ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€åŒä¸€ã®ãƒžãƒƒãƒ”ングãŒä»®å®šã•ã‚Œã¾ã™ã€‚ + +## ユーザー定義関数(UDFs) + +ClickHouseã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚[UDFs](../functions/udf.md)ã‚’ã”覧ãã ã•ã„。 diff --git a/docs/ja/sql-reference/functions/introspection.md b/docs/ja/sql-reference/functions/introspection.md new file mode 100644 index 00000000000..d7586a93346 --- /dev/null +++ b/docs/ja/sql-reference/functions/introspection.md @@ -0,0 +1,466 @@ +--- +slug: /ja/sql-reference/functions/introspection +sidebar_position: 100 +sidebar_label: インスペクション +--- + +# インスペクション関数 + +ã“ã®ç« ã§èª¬æ˜Žã•ã‚Œã¦ã„る関数を使用ã—ã¦ã€[ELF](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) ãŠã‚ˆã³ [DWARF](https://en.wikipedia.org/wiki/DWARF) をクエリプロファイリングã®ãŸã‚ã«ã‚¤ãƒ³ã‚¹ãƒšã‚¯ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +ã“れらã®é–¢æ•°ã¯é…ãã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šã®è€ƒæ…®ãŒå¿…è¦ãªå ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +::: + +インスペクション関数を正ã—ãæ“作ã™ã‚‹ã«ã¯æ¬¡ã®è¦ä»¶ãŒã‚ã‚Šã¾ã™ï¼š + +- `clickhouse-common-static-dbg` パッケージをインストールã—ã¾ã™ã€‚ + +- [allow_introspection_functions](../../operations/settings/settings.md#allow_introspection_functions) 設定を1ã«è¨­å®šã—ã¾ã™ã€‚ + + セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€ã‚¤ãƒ³ã‚¹ãƒšã‚¯ã‚·ãƒ§ãƒ³é–¢æ•°ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +ClickHouse ã¯ãƒ—ロファイラーレãƒãƒ¼ãƒˆã‚’ [trace_log](../../operations/system-tables/trace_log.md#system_tables-trace_log) システムテーブルã«ä¿å­˜ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¨ãƒ—ロファイラーãŒé©åˆ‡ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +## addressToLine + +ClickHouseサーãƒãƒ¼ãƒ—ロセス内ã®ä»®æƒ³ãƒ¡ãƒ¢ãƒªã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’ã€ClickHouseソースコードã®ãƒ•ã‚¡ã‚¤ãƒ«åã¨è¡Œç•ªå·ã«å¤‰æ›ã—ã¾ã™ã€‚ + +å…¬å¼ã®ClickHouseパッケージを使用ã—ã¦ã„ã‚‹å ´åˆã€`clickhouse-common-static-dbg` パッケージをインストールã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +addressToLine(address_of_binary_instruction) +``` + +**引数** + +- `address_of_binary_instruction` ([UInt64](../data-types/int-uint.md)) — 実行中ã®ãƒ—ロセス内ã®å‘½ä»¤ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ + +**戻り値** + +- ソースコードã®ãƒ•ã‚¡ã‚¤ãƒ«åã¨ã€ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®è¡Œç•ªå·ã‚’コロンã§åŒºåˆ‡ã£ãŸã‚‚ã®ã€‚ + 例ãˆã°ã€`/build/obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:199` ã®ã‚ˆã†ã« `199` ã¯è¡Œç•ªå·ã§ã™ã€‚ +- デãƒãƒƒã‚°æƒ…å ±ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã¯ãƒã‚¤ãƒŠãƒªå。 +- アドレスãŒç„¡åŠ¹ãªå ´åˆã¯ç©ºæ–‡å­—列。 + +タイプ: [String](../../sql-reference/data-types/string.md)。 + +**例** + +インスペクション関数ã®æœ‰åŠ¹åŒ–: + +``` sql +SET allow_introspection_functions=1; +``` + +`trace_log` システムテーブルã‹ã‚‰æœ€åˆã®è¡Œã‚’é¸æŠž: + +``` sql +SELECT * FROM system.trace_log LIMIT 1 \G; +``` + +``` text +Row 1: +────── +event_date: 2019-11-19 +event_time: 2019-11-19 18:57:23 +revision: 54429 +timer_type: Real +thread_number: 48 +query_id: 421b6855-1858-45a5-8f37-f383409d6d72 +trace: [140658411141617,94784174532828,94784076370703,94784076372094,94784076361020,94784175007680,140658411116251,140658403895439] +``` + +`trace` フィールドã«ã¯ã‚µãƒ³ãƒ—リング時ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +å˜ä¸€ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã«å¯¾ã—ã¦ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®ãƒ•ã‚¡ã‚¤ãƒ«åã¨è¡Œç•ªå·ã‚’å–å¾—: + +``` sql +SELECT addressToLine(94784076370703) \G; +``` + +``` text +Row 1: +────── +addressToLine(94784076370703): /build/obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:199 +``` + +スタックトレース全体ã«é–¢æ•°ã‚’é©ç”¨: + +``` sql +SELECT + arrayStringConcat(arrayMap(x -> addressToLine(x), trace), '\n') AS trace_source_code_lines +FROM system.trace_log +LIMIT 1 +\G +``` + +[arrayMap](../../sql-reference/functions/array-functions.md#array-map) 関数を使用ã™ã‚‹ã¨ã€`trace` é…列ã®å„è¦ç´ ã‚’ `addressToLine` 関数ã§å‡¦ç†ã§ãã¾ã™ã€‚ã“ã®å‡¦ç†çµæžœã¯å‡ºåŠ›ã® `trace_source_code_lines` 列ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +``` text +Row 1: +────── +trace_source_code_lines: /lib/x86_64-linux-gnu/libpthread-2.27.so +/usr/lib/debug/usr/bin/clickhouse +/build/obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:199 +/build/obj-x86_64-linux-gnu/../src/Common/ThreadPool.h:155 +/usr/include/c++/9/bits/atomic_base.h:551 +/usr/lib/debug/usr/bin/clickhouse +/lib/x86_64-linux-gnu/libpthread-2.27.so +/build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97 +``` + +## addressToLineWithInlines + +`addressToLine` ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ã™ã¹ã¦ã®ã‚¤ãƒ³ãƒ©ã‚¤ãƒ³é–¢æ•°ã‚’å«ã‚€é…列を返ã—ã¾ã™ã€‚ãã®ãŸã‚ã€`addressToLine` よりもé…ã„ã§ã™ã€‚ + +:::note +å…¬å¼ã®ClickHouseパッケージを使用ã—ã¦ã„ã‚‹å ´åˆã€`clickhouse-common-static-dbg` パッケージをインストールã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**構文** + +``` sql +addressToLineWithInlines(address_of_binary_instruction) +``` + +**引数** + +- `address_of_binary_instruction` ([UInt64](../data-types/int-uint.md)) — 実行中ã®ãƒ—ロセス内ã®å‘½ä»¤ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ + +**戻り値** + +- 最åˆã®è¦ç´ ãŒã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®ãƒ•ã‚¡ã‚¤ãƒ«åã¨ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®è¡Œç•ªå·ã‚’コロンã§åŒºåˆ‡ã£ãŸé…列。2番目以é™ã®è¦ç´ ã¯ã€ã‚¤ãƒ³ãƒ©ã‚¤ãƒ³é–¢æ•°ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®ãƒ•ã‚¡ã‚¤ãƒ«åã€è¡Œç•ªå·ã€ãŠã‚ˆã³é–¢æ•°åã®ãƒªã‚¹ãƒˆã€‚デãƒãƒƒã‚°æƒ…å ±ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã¯ã€ãƒã‚¤ãƒŠãƒªåã¨ç­‰ã—ã„å˜ä¸€è¦ç´ ã‚’æŒã¤é…列ãŒè¿”ã•ã‚Œã€ã‚¢ãƒ‰ãƒ¬ã‚¹ãŒç„¡åŠ¹ãªå ´åˆã¯ç©ºã®é…列ãŒè¿”ã•ã‚Œã¾ã™ã€‚[Array(String)](../data-types/array.md)。 + +**例** + +インスペクション関数ã®æœ‰åŠ¹åŒ–: + +``` sql +SET allow_introspection_functions=1; +``` + +アドレスã«é–¢æ•°ã‚’é©ç”¨: + +```sql +SELECT addressToLineWithInlines(531055181::UInt64); +``` + +``` text +┌─addressToLineWithInlines(CAST('531055181', 'UInt64'))────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ ['./src/Functions/addressToLineWithInlines.cpp:98','./build_normal_debug/./src/Functions/addressToLineWithInlines.cpp:176:DB::(anonymous namespace)::FunctionAddressToLineWithInlines::implCached(unsigned long) const'] │ +└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +スタックトレース全体ã«é–¢æ•°ã‚’é©ç”¨: + +``` sql +SELECT + ta, addressToLineWithInlines(arrayJoin(trace) as ta) +FROM system.trace_log +WHERE + query_id = '5e173544-2020-45de-b645-5deebe2aae54'; +``` + +[arrayJoin](../../sql-reference/functions/array-functions.md#array-functions-join) 関数ã¯é…列を行ã«åˆ†å‰²ã—ã¾ã™ã€‚ + +``` text +┌────────ta─┬─addressToLineWithInlines(arrayJoin(trace))───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ 365497529 │ ['./build_normal_debug/./contrib/libcxx/include/string_view:252'] │ +│ 365593602 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:191'] │ +│ 365593866 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:0'] │ +│ 365592528 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:0'] │ +│ 365591003 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:477'] │ +│ 365590479 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:442'] │ +│ 365590600 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:457'] │ +│ 365598941 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:0'] │ +│ 365607098 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:0'] │ +│ 365590571 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:451'] │ +│ 365598941 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:0'] │ +│ 365607098 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:0'] │ +│ 365590571 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:451'] │ +│ 365598941 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:0'] │ +│ 365607098 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:0'] │ +│ 365590571 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:451'] │ +│ 365598941 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:0'] │ +│ 365597289 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:807'] │ +│ 365599840 │ ['./build_normal_debug/./src/Common/Dwarf.cpp:1118'] │ +│ 531058145 │ ['./build_normal_debug/./src/Functions/addressToLineWithInlines.cpp:152'] │ +│ 531055181 │ ['./src/Functions/addressToLineWithInlines.cpp:98','./build_normal_debug/./src/Functions/addressToLineWithInlines.cpp:176:DB::(anonymous namespace)::FunctionAddressToLineWithInlines::implCached(unsigned long) const'] │ +│ 422333613 │ ['./build_normal_debug/./src/Functions/IFunctionAdaptors.h:21'] │ +│ 586866022 │ ['./build_normal_debug/./src/Functions/IFunction.cpp:216'] │ +│ 586869053 │ ['./build_normal_debug/./src/Functions/IFunction.cpp:264'] │ +│ 586873237 │ ['./build_normal_debug/./src/Functions/IFunction.cpp:334'] │ +│ 597901620 │ ['./build_normal_debug/./src/Interpreters/ExpressionActions.cpp:601'] │ +│ 597898534 │ ['./build_normal_debug/./src/Interpreters/ExpressionActions.cpp:718'] │ +│ 630442912 │ ['./build_normal_debug/./src/Processors/Transforms/ExpressionTransform.cpp:23'] │ +│ 546354050 │ ['./build_normal_debug/./src/Processors/ISimpleTransform.h:38'] │ +│ 626026993 │ ['./build_normal_debug/./src/Processors/ISimpleTransform.cpp:89'] │ +│ 626294022 │ ['./build_normal_debug/./src/Processors/Executors/ExecutionThreadContext.cpp:45'] │ +│ 626293730 │ ['./build_normal_debug/./src/Processors/Executors/ExecutionThreadContext.cpp:63'] │ +│ 626169525 │ ['./build_normal_debug/./src/Processors/Executors/PipelineExecutor.cpp:213'] │ +│ 626170308 │ ['./build_normal_debug/./src/Processors/Executors/PipelineExecutor.cpp:178'] │ +│ 626166348 │ ['./build_normal_debug/./src/Processors/Executors/PipelineExecutor.cpp:329'] │ +│ 626163461 │ ['./build_normal_debug/./src/Processors/Executors/PipelineExecutor.cpp:84'] │ +│ 626323536 │ ['./build_normal_debug/./src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:85'] │ +│ 626323277 │ ['./build_normal_debug/./src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:112'] │ +│ 626323133 │ ['./build_normal_debug/./contrib/libcxx/include/type_traits:3682'] │ +│ 626323041 │ ['./build_normal_debug/./contrib/libcxx/include/tuple:1415'] │ +└───────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ + +``` + +## addressToSymbol + +ClickHouseサーãƒãƒ¼ãƒ—ロセス内ã®ä»®æƒ³ãƒ¡ãƒ¢ãƒªã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’ã€ClickHouseオブジェクトファイルã‹ã‚‰ã®ã‚·ãƒ³ãƒœãƒ«ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +addressToSymbol(address_of_binary_instruction) +``` + +**引数** + +- `address_of_binary_instruction` ([UInt64](../data-types/int-uint.md)) — 実行中ã®ãƒ—ロセス内ã®å‘½ä»¤ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ + +**戻り値** + +- ClickHouseオブジェクトファイルã‹ã‚‰ã®ã‚·ãƒ³ãƒœãƒ«ã€‚[String](../data-types/string.md)。 +- アドレスãŒç„¡åŠ¹ãªå ´åˆã¯ç©ºæ–‡å­—列。[String](../data-types/string.md)。 + +**例** + +インスペクション関数ã®æœ‰åŠ¹åŒ–: + +``` sql +SET allow_introspection_functions=1; +``` + +`trace_log` システムテーブルã‹ã‚‰æœ€åˆã®è¡Œã‚’é¸æŠž: + +``` sql +SELECT * FROM system.trace_log LIMIT 1 \G; +``` + +``` text +Row 1: +────── +event_date: 2019-11-20 +event_time: 2019-11-20 16:57:59 +revision: 54429 +timer_type: Real +thread_number: 48 +query_id: 724028bf-f550-45aa-910d-2af6212b94ac +trace: [94138803686098,94138815010911,94138815096522,94138815101224,94138815102091,94138814222988,94138806823642,94138814457211,94138806823642,94138814457211,94138806823642,94138806795179,94138806796144,94138753770094,94138753771646,94138753760572,94138852407232,140399185266395,140399178045583] +``` + +`trace` フィールドã«ã¯ã‚µãƒ³ãƒ—リング時ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +å˜ä¸€ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã«å¯¾ã—ã¦ã‚·ãƒ³ãƒœãƒ«ã‚’å–å¾—: + +``` sql +SELECT addressToSymbol(94138803686098) \G; +``` + +``` text +Row 1: +────── +addressToSymbol(94138803686098): _ZNK2DB24IAggregateFunctionHelperINS_20AggregateFunctionSumImmNS_24AggregateFunctionSumDataImEEEEE19addBatchSinglePlaceEmPcPPKNS_7IColumnEPNS_5ArenaE +``` + +スタックトレース全体ã«é–¢æ•°ã‚’é©ç”¨: + +``` sql +SELECT + arrayStringConcat(arrayMap(x -> addressToSymbol(x), trace), '\n') AS trace_symbols +FROM system.trace_log +LIMIT 1 +\G +``` + +[arrayMap](../../sql-reference/functions/array-functions.md#array-map) 関数を使用ã™ã‚‹ã¨ã€`trace` é…列ã®å„è¦ç´ ã‚’ `addressToSymbols` 関数ã§å‡¦ç†ã§ãã¾ã™ã€‚ã“ã®å‡¦ç†çµæžœã¯å‡ºåŠ›ã® `trace_symbols` 列ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +``` text +Row 1: +────── +trace_symbols: _ZNK2DB24IAggregateFunctionHelperINS_20AggregateFunctionSumImmNS_24AggregateFunctionSumDataImEEEEE19addBatchSinglePlaceEmPcPPKNS_7IColumnEPNS_5ArenaE +_ZNK2DB10Aggregator21executeWithoutKeyImplERPcmPNS0_28AggregateFunctionInstructionEPNS_5ArenaE +_ZN2DB10Aggregator14executeOnBlockESt6vectorIN3COWINS_7IColumnEE13immutable_ptrIS3_EESaIS6_EEmRNS_22AggregatedDataVariantsERS1_IPKS3_SaISC_EERS1_ISE_SaISE_EERb +_ZN2DB10Aggregator14executeOnBlockERKNS_5BlockERNS_22AggregatedDataVariantsERSt6vectorIPKNS_7IColumnESaIS9_EERS6_ISB_SaISB_EERb +_ZN2DB10Aggregator7executeERKSt10shared_ptrINS_17IBlockInputStreamEERNS_22AggregatedDataVariantsE +_ZN2DB27AggregatingBlockInputStream8readImplEv +_ZN2DB17IBlockInputStream4readEv +_ZN2DB26ExpressionBlockInputStream8readImplEv +_ZN2DB17IBlockInputStream4readEv +_ZN2DB26ExpressionBlockInputStream8readImplEv +_ZN2DB17IBlockInputStream4readEv +_ZN2DB28AsynchronousBlockInputStream9calculateEv +_ZNSt17_Function_handlerIFvvEZN2DB28AsynchronousBlockInputStream4nextEvEUlvE_E9_M_invokeERKSt9_Any_data +_ZN14ThreadPoolImplI20ThreadFromGlobalPoolE6workerESt14_List_iteratorIS0_E +_ZZN20ThreadFromGlobalPoolC4IZN14ThreadPoolImplIS_E12scheduleImplIvEET_St8functionIFvvEEiSt8optionalImEEUlvE1_JEEEOS4_DpOT0_ENKUlvE_clEv +_ZN14ThreadPoolImplISt6threadE6workerESt14_List_iteratorIS0_E +execute_native_thread_routine +start_thread +clone +``` + +## demangle + +[addressToSymbol](#addresstosymbol) 関数を使用ã—ã¦å–å¾—ã§ãるシンボルを C++ 関数åã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +demangle(symbol) +``` + +**引数** + +- `symbol` ([String](../data-types/string.md)) — オブジェクトファイルã‹ã‚‰ã®ã‚·ãƒ³ãƒœãƒ«ã€‚ + +**戻り値** + +- C++ 関数ã®åå‰ã€ã¾ãŸã¯ã‚·ãƒ³ãƒœãƒ«ãŒç„¡åŠ¹ãªå ´åˆã¯ç©ºæ–‡å­—列。[String](../data-types/string.md)。 + +**例** + +インスペクション関数ã®æœ‰åŠ¹åŒ–: + +``` sql +SET allow_introspection_functions=1; +``` + +`trace_log` システムテーブルã‹ã‚‰æœ€åˆã®è¡Œã‚’é¸æŠž: + +``` sql +SELECT * FROM system.trace_log LIMIT 1 \G; +``` + +``` text +Row 1: +────── +event_date: 2019-11-20 +event_time: 2019-11-20 16:57:59 +revision: 54429 +timer_type: Real +thread_number: 48 +query_id: 724028bf-f550-45aa-910d-2af6212b94ac +trace: [94138803686098,94138815010911,94138815096522,94138815101224,94138815102091,94138814222988,94138806823642,94138814457211,94138806823642,94138814457211,94138806823642,94138806795179,94138806796144,94138753770094,94138753771646,94138753760572,94138852407232,140399185266395,140399178045583] +``` + +`trace` フィールドã«ã¯ã‚µãƒ³ãƒ—リング時ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +å˜ä¸€ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã«å¯¾ã—ã¦é–¢æ•°åã‚’å–å¾—: + +``` sql +SELECT demangle(addressToSymbol(94138803686098)) \G; +``` + +``` text +Row 1: +────── +demangle(addressToSymbol(94138803686098)): DB::IAggregateFunctionHelper > >::addBatchSinglePlace(unsigned long, char*, DB::IColumn const**, DB::Arena*) const +``` + +スタックトレース全体ã«é–¢æ•°ã‚’é©ç”¨: + +``` sql +SELECT + arrayStringConcat(arrayMap(x -> demangle(addressToSymbol(x)), trace), '\n') AS trace_functions +FROM system.trace_log +LIMIT 1 +\G +``` + +[arrayMap](../../sql-reference/functions/array-functions.md#array-map) 関数を使用ã™ã‚‹ã¨ã€`trace` é…列ã®å„è¦ç´ ã‚’ `demangle` 関数ã§å‡¦ç†ã§ãã¾ã™ã€‚ã“ã®å‡¦ç†çµæžœã¯å‡ºåŠ›ã® `trace_functions` 列ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +``` text +Row 1: +────── +trace_functions: DB::IAggregateFunctionHelper > >::addBatchSinglePlace(unsigned long, char*, DB::IColumn const**, DB::Arena*) const +DB::Aggregator::executeWithoutKeyImpl(char*&, unsigned long, DB::Aggregator::AggregateFunctionInstruction*, DB::Arena*) const +DB::Aggregator::executeOnBlock(std::vector::immutable_ptr, std::allocator::immutable_ptr > >, unsigned long, DB::AggregatedDataVariants&, std::vector >&, std::vector >, std::allocator > > >&, bool&) +DB::Aggregator::executeOnBlock(DB::Block const&, DB::AggregatedDataVariants&, std::vector >&, std::vector >, std::allocator > > >&, bool&) +DB::Aggregator::execute(std::shared_ptr const&, DB::AggregatedDataVariants&) +DB::AggregatingBlockInputStream::readImpl() +DB::IBlockInputStream::read() +DB::ExpressionBlockInputStream::readImpl() +DB::IBlockInputStream::read() +DB::ExpressionBlockInputStream::readImpl() +DB::IBlockInputStream::read() +DB::AsynchronousBlockInputStream::calculate() +std::_Function_handler::_M_invoke(std::_Any_data const&) +ThreadPoolImpl::worker(std::_List_iterator) +ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function, int, std::optional)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function, int, std::optional)::{lambda()#3}&&)::{lambda()#1}::operator()() const +ThreadPoolImpl::worker(std::_List_iterator) +execute_native_thread_routine +start_thread +clone +``` + +## tid + +ç¾åœ¨ã® [Block](https://clickhouse.com/docs/ja/development/architecture/#block) ãŒå‡¦ç†ã•ã‚Œã¦ã„るスレッドã®IDã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +tid() +``` + +**戻り値** + +- ç¾åœ¨ã®ã‚¹ãƒ¬ãƒƒãƒ‰ID。[Uint64](../data-types/int-uint.md#uint-ranges)。 + +**例** + +クエリ: + +``` sql +SELECT tid(); +``` + +çµæžœ: + +``` text +┌─tid()─┠+│ 3878 │ +└───────┘ +``` + +## logTrace + +å„ [Block](https://clickhouse.com/docs/ja/development/architecture/#block) ã«å¯¾ã—ã¦ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ã«ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ­ã‚°ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’記録ã—ã¾ã™ã€‚ + +**構文** + +``` sql +logTrace('message') +``` + +**引数** + +- `message` — サーãƒãƒ¼ãƒ­ã‚°ã«è¨˜éŒ²ã•ã‚Œã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€‚[String](../data-types/string.md#string)。 + +**戻り値** + +- 常ã«0ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT logTrace('logTrace message'); +``` + +çµæžœ: + +``` text +┌─logTrace('logTrace message')─┠+│ 0 │ +└──────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/ip-address-functions.md b/docs/ja/sql-reference/functions/ip-address-functions.md new file mode 100644 index 00000000000..a181db6c71f --- /dev/null +++ b/docs/ja/sql-reference/functions/ip-address-functions.md @@ -0,0 +1,719 @@ +--- +slug: /ja/sql-reference/functions/ip-address-functions +sidebar_position: 95 +sidebar_label: IPアドレス +--- + +# IPv4 ãŠã‚ˆã³ IPv6 アドレスを扱ã†ãŸã‚ã®é–¢æ•° + +## IPv4NumToString(num) + +UInt32 数値をå—ã‘å–ã‚Šã€ãƒ“ッグエンディアン形å¼ã® IPv4 アドレスã¨ã—ã¦è§£é‡ˆã—ã¾ã™ã€‚対応ã™ã‚‹ IPv4 アドレスを A.B.C.d(ドットã§åŒºåˆ‡ã‚‰ã‚ŒãŸ 10 進数形å¼ï¼‰ã®æ–‡å­—列ã§è¿”ã—ã¾ã™ã€‚ + +エイリアス: `INET_NTOA`. + +## IPv4StringToNum(s) + +IPv4NumToString ã®é€†é–¢æ•°ã§ã™ã€‚IPv4 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +エイリアス: `INET_ATON`. + +## IPv4StringToNumOrDefault(s) + +`IPv4StringToNum` ã¨åŒæ§˜ã§ã™ãŒã€IPv4 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€0 ã‚’è¿”ã—ã¾ã™ã€‚ + +## IPv4StringToNumOrNull(s) + +`IPv4StringToNum` ã¨åŒæ§˜ã§ã™ãŒã€IPv4 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€null ã‚’è¿”ã—ã¾ã™ã€‚ + +## IPv4NumToStringClassC(num) + +IPv4NumToString ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€æœ€å¾Œã®ã‚ªã‚¯ãƒ†ãƒƒãƒˆã‚’ xxx ã«ç½®ãæ›ãˆã¾ã™ã€‚ + +例: + +``` sql +SELECT + IPv4NumToStringClassC(ClientIP) AS k, + count() AS c +FROM test.hits +GROUP BY k +ORDER BY c DESC +LIMIT 10 +``` + +``` text +┌─k──────────────┬─────c─┠+│ 83.149.9.xxx │ 26238 │ +│ 217.118.81.xxx │ 26074 │ +│ 213.87.129.xxx │ 25481 │ +│ 83.149.8.xxx │ 24984 │ +│ 217.118.83.xxx │ 22797 │ +│ 78.25.120.xxx │ 22354 │ +│ 213.87.131.xxx │ 21285 │ +│ 78.25.121.xxx │ 20887 │ +│ 188.162.65.xxx │ 19694 │ +│ 83.149.48.xxx │ 17406 │ +└────────────────┴───────┘ +``` + +'xxx' ã®ä½¿ç”¨ã¯éžå¸¸ã«çã—ã„ãŸã‚ã€å°†æ¥çš„ã«å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å½¢å¼ã«ä¾å­˜ã—ãªã„ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +### IPv6NumToString(x) + +ãƒã‚¤ãƒŠãƒªå½¢å¼ã® IPv6 アドレスをå«ã‚€ FixedString(16) 値をå—ã‘å–ã‚Šã¾ã™ã€‚ã“ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’テキスト形å¼ã§è¿”ã—ã¾ã™ã€‚IPv4 アドレス㌠IPv6 ã«ãƒžãƒƒãƒ—ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€::ffff:111.222.33.44 ã®å½¢å¼ã§å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +エイリアス: `INET6_NTOA`. + +例: + +``` sql +SELECT IPv6NumToString(toFixedString(unhex('2A0206B8000000000000000000000011'), 16)) AS addr; +``` + +``` text +┌─addr─────────┠+│ 2a02:6b8::11 │ +└──────────────┘ +``` + +``` sql +SELECT + IPv6NumToString(ClientIP6 AS k), + count() AS c +FROM hits_all +WHERE EventDate = today() AND substring(ClientIP6, 1, 12) != unhex('00000000000000000000FFFF') +GROUP BY k +ORDER BY c DESC +LIMIT 10 +``` + +``` text +┌─IPv6NumToString(ClientIP6)──────────────┬─────c─┠+│ 2a02:2168:aaa:bbbb::2 │ 24695 │ +│ 2a02:2698:abcd:abcd:abcd:abcd:8888:5555 │ 22408 │ +│ 2a02:6b8:0:fff::ff │ 16389 │ +│ 2a01:4f8:111:6666::2 │ 16016 │ +│ 2a02:2168:888:222::1 │ 15896 │ +│ 2a01:7e00::ffff:ffff:ffff:222 │ 14774 │ +│ 2a02:8109:eee:ee:eeee:eeee:eeee:eeee │ 14443 │ +│ 2a02:810b:8888:888:8888:8888:8888:8888 │ 14345 │ +│ 2a02:6b8:0:444:4444:4444:4444:4444 │ 14279 │ +│ 2a01:7e00::ffff:ffff:ffff:ffff │ 13880 │ +└─────────────────────────────────────────┴───────┘ +``` + +``` sql +SELECT + IPv6NumToString(ClientIP6 AS k), + count() AS c +FROM hits_all +WHERE EventDate = today() +GROUP BY k +ORDER BY c DESC +LIMIT 10 +``` + +``` text +┌─IPv6NumToString(ClientIP6)─┬──────c─┠+│ ::ffff:94.26.111.111 │ 747440 │ +│ ::ffff:37.143.222.4 │ 529483 │ +│ ::ffff:5.166.111.99 │ 317707 │ +│ ::ffff:46.38.11.77 │ 263086 │ +│ ::ffff:79.105.111.111 │ 186611 │ +│ ::ffff:93.92.111.88 │ 176773 │ +│ ::ffff:84.53.111.33 │ 158709 │ +│ ::ffff:217.118.11.22 │ 154004 │ +│ ::ffff:217.118.11.33 │ 148449 │ +│ ::ffff:217.118.11.44 │ 148243 │ +└────────────────────────────┴────────┘ +``` + +## IPv6StringToNum + +[IPv6NumToString](#ipv6numtostringx)ã®é€†é–¢æ•°ã§ã™ã€‚IPv6 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +入力文字列ã«æœ‰åŠ¹ãª IPv4 アドレスãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ãã® IPv6 等価を返ã—ã¾ã™ã€‚ +HEX ã¯å¤§æ–‡å­—ã§ã‚‚å°æ–‡å­—ã§ã‚‚ã‹ã¾ã„ã¾ã›ã‚“。 + +エイリアス: `INET6_ATON`. + +**構文** + +``` sql +IPv6StringToNum(string) +``` + +**引数** + +- `string` — IP アドレス。 [String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒã‚¤ãƒŠãƒªå½¢å¼ã® IPv6 アドレス。[FixedString(16)](../data-types/fixedstring.md)。 + +**例** + +クエリ: + +``` sql +SELECT addr, cutIPv6(IPv6StringToNum(addr), 0, 0) FROM (SELECT ['notaddress', '127.0.0.1', '1111::ffff'] AS addr) ARRAY JOIN addr; +``` + +çµæžœ: + +``` text +┌─addr───────┬─cutIPv6(IPv6StringToNum(addr), 0, 0)─┠+│ notaddress │ :: │ +│ 127.0.0.1 │ ::ffff:127.0.0.1 │ +│ 1111::ffff │ 1111::ffff │ +└────────────┴──────────────────────────────────────┘ +``` + +**関連項目** + +- [cutIPv6](#cutipv6x-bytestocutforipv6-bytestocutforipv4). + +## IPv6StringToNumOrDefault(s) + +`IPv6StringToNum` ã¨åŒæ§˜ã§ã™ãŒã€IPv6 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€0 ã‚’è¿”ã—ã¾ã™ã€‚ + +## IPv6StringToNumOrNull(s) + +`IPv6StringToNum` ã¨åŒæ§˜ã§ã™ãŒã€IPv6 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€null ã‚’è¿”ã—ã¾ã™ã€‚ + +## IPv4ToIPv6(x) + +`UInt32` 数値をå—ã‘å–ã‚Šã€ãƒ“ッグエンディアン形å¼ã® IPv4 アドレスã¨ã—ã¦è§£é‡ˆã—ã¾ã™ã€‚ãƒã‚¤ãƒŠãƒªå½¢å¼ã§ IPv6 アドレスをå«ã‚€ `FixedString(16)` 値を返ã—ã¾ã™ã€‚例: + +``` sql +SELECT IPv6NumToString(IPv4ToIPv6(IPv4StringToNum('192.168.0.1'))) AS addr; +``` + +``` text +┌─addr───────────────┠+│ ::ffff:192.168.0.1 │ +└────────────────────┘ +``` + +## cutIPv6(x, bytesToCutForIPv6, bytesToCutForIPv4) + +ãƒã‚¤ãƒŠãƒªå½¢å¼ã® IPv6 アドレスをå«ã‚€ FixedString(16) 値をå—ã‘å–ã‚Šã¾ã™ã€‚指定ã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°åˆ†å‰Šé™¤ã—ãŸã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’テキスト形å¼ã§è¿”ã—ã¾ã™ã€‚例: + +``` sql +WITH + IPv6StringToNum('2001:0DB8:AC10:FE01:FEED:BABE:CAFE:F00D') AS ipv6, + IPv4ToIPv6(IPv4StringToNum('192.168.0.1')) AS ipv4 +SELECT + cutIPv6(ipv6, 2, 0), + cutIPv6(ipv4, 0, 2) +``` + +``` text +┌─cutIPv6(ipv6, 2, 0)─────────────────┬─cutIPv6(ipv4, 0, 2)─┠+│ 2001:db8:ac10:fe01:feed:babe:cafe:0 │ ::ffff:192.168.0.0 │ +└─────────────────────────────────────┴─────────────────────┘ +``` + +## IPv4CIDRToRange(ipv4, Cidr), + +IPv4 㨠CIDR ã‚’å«ã‚€ UInt8 値をå—ã‘å–ã‚Šã¾ã™ã€‚サブãƒãƒƒãƒˆã®ä¸‹é™ã¨ä¸Šé™ã®ç¯„囲をå«ã‚€ 2 ã¤ã® IPv4 ã‚’æŒã¤ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +``` sql +SELECT IPv4CIDRToRange(toIPv4('192.168.5.2'), 16); +``` + +``` text +┌─IPv4CIDRToRange(toIPv4('192.168.5.2'), 16)─┠+│ ('192.168.0.0','192.168.255.255') │ +└────────────────────────────────────────────┘ +``` + +## IPv6CIDRToRange(ipv6, Cidr), + +IPv6 㨠CIDR ã‚’å«ã‚€ UInt8 値をå—ã‘å–ã‚Šã¾ã™ã€‚サブãƒãƒƒãƒˆã®ä¸‹é™ã¨ä¸Šé™ã®ç¯„囲をå«ã‚€ 2 ã¤ã® IPv6 ã‚’æŒã¤ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +``` sql +SELECT IPv6CIDRToRange(toIPv6('2001:0db8:0000:85a3:0000:0000:ac1f:8001'), 32); +``` + +``` text +┌─IPv6CIDRToRange(toIPv6('2001:0db8:0000:85a3:0000:0000:ac1f:8001'), 32)─┠+│ ('2001:db8::','2001:db8:ffff:ffff:ffff:ffff:ffff:ffff') │ +└────────────────────────────────────────────────────────────────────────┘ +``` + +## toIPv4 + +[`IPv4StringToNum`](##IPv4NumToString(num)) ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€IPv4 アドレスã®æ–‡å­—列形å¼ã‚’å—ã‘å–ã‚Šã€[IPv4](../data-types/ipv4.md) åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toIPv4(string) +``` + +**引数** + +- `string` — IPv4 アドレス。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `string` ㌠IPv4 アドレスã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚[IPv4](../data-types/ipv4.md)。 + +**例** + +クエリ: + +``` sql +SELECT toIPv4('171.225.130.45'); +``` + +çµæžœ: + +``` text +┌─toIPv4('171.225.130.45')─┠+│ 171.225.130.45 │ +└──────────────────────────┘ +``` + +クエリ: + +``` sql +WITH + '171.225.130.45' as IPv4_string +SELECT + hex(IPv4StringToNum(IPv4_string)), + hex(toIPv4(IPv4_string)) +``` + +çµæžœ: + +``` text +┌─hex(IPv4StringToNum(IPv4_string))─┬─hex(toIPv4(IPv4_string))─┠+│ ABE1822D │ ABE1822D │ +└───────────────────────────────────┴──────────────────────────┘ +``` + +## toIPv4OrDefault + +`toIPv4` ã¨åŒæ§˜ã§ã™ãŒã€IPv4 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€`0.0.0.0` (0 IPv4) ã¾ãŸã¯æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ IPv4 ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toIPv4OrDefault(string[, default]) +``` + +**引数** + +- `value` — IP アドレス。[String](../data-types/string.md)。 +- `default` (オプション) — `string` ãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã«è¿”ã™å€¤ã€‚[IPv4](../data-types/ipv4.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `string` ãŒç¾åœ¨ã® IPv4 アドレスã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚[String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +WITH + '::ffff:127.0.0.1' AS valid_IPv6_string, + 'fe80:2030:31:24' AS invalid_IPv6_string +SELECT + toIPv4OrDefault(valid_IPv6_string) AS valid, + toIPv4OrDefault(invalid_IPv6_string) AS default, + toIPv4OrDefault(invalid_IPv6_string, toIPv4('1.1.1.1')) AS provided_default; +``` + +çµæžœ: + +```response +┌─valid───┬─default─┬─provided_default─┠+│ 0.0.0.0 │ 0.0.0.0 │ 1.1.1.1 │ +└─────────┴─────────┴──────────────────┘ +``` + +## toIPv4OrNull + +[`toIPv4`](#toipv4) ã¨åŒæ§˜ã§ã™ãŒã€IPv4 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€null ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toIPv4OrNull(string) +``` + +**引数** + +- `string` — IP アドレス。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `string` ãŒç¾åœ¨ã® IPv4 アドレスã«å¤‰æ›ã•ã‚Œã‚‹ã‹ã€`string` ãŒç„¡åŠ¹ãªã‚¢ãƒ‰ãƒ¬ã‚¹ã®å ´åˆã¯ null。[String](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +WITH 'fe80:2030:31:24' AS invalid_IPv6_string +SELECT toIPv4OrNull(invalid_IPv6_string); +``` + +çµæžœ: + +``` text +┌─toIPv4OrNull(invalid_IPv6_string)─┠+│ á´ºáµá´¸á´¸ │ +└───────────────────────────────────┘ +``` + +## toIPv4OrZero + +[`toIPv4`](#toipv4) ã¨åŒæ§˜ã§ã™ãŒã€IPv4 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€`0.0.0.0` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toIPv4OrZero(string) +``` + +**引数** + +- `string` — IP アドレス。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `string` ãŒç¾åœ¨ã® IPv4 アドレスã«å¤‰æ›ã•ã‚Œã‚‹ã‹ã€`string` ãŒç„¡åŠ¹ãªã‚¢ãƒ‰ãƒ¬ã‚¹ã®å ´åˆã¯ `0.0.0.0`。[String](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +WITH 'Not an IP address' AS invalid_IPv6_string +SELECT toIPv4OrZero(invalid_IPv6_string); +``` + +çµæžœ: + +``` text +┌─toIPv4OrZero(invalid_IPv6_string)─┠+│ 0.0.0.0 │ +└───────────────────────────────────┘ +``` + +## toIPv6 + +IPv6 アドレスã®æ–‡å­—列形å¼ã‚’ [IPv6](../data-types/ipv6.md) åž‹ã«å¤‰æ›ã—ã¾ã™ã€‚IPv6 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€ç©ºã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +IPv6 アドレスをãƒã‚¤ãƒŠãƒªå½¢å¼ã«å¤‰æ›ã™ã‚‹ [IPv6StringToNum](#ipv6stringtonum) 関数ã¨ä¼¼ã¦ã„ã¾ã™ã€‚ + +入力文字列ã«æœ‰åŠ¹ãª IPv4 アドレスãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ãã® IPv4 アドレス㮠IPv6 等価ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toIPv6(string) +``` + +**引数** + +- `string` — IP アドレス。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- IP アドレス。[IPv6](../data-types/ipv6.md)。 + +**例** + +クエリ: + +``` sql +WITH '2001:438:ffff::407d:1bc1' AS IPv6_string +SELECT + hex(IPv6StringToNum(IPv6_string)), + hex(toIPv6(IPv6_string)); +``` + +çµæžœ: + +``` text +┌─hex(IPv6StringToNum(IPv6_string))─┬─hex(toIPv6(IPv6_string))─────────┠+│ 20010438FFFF000000000000407D1BC1 │ 20010438FFFF000000000000407D1BC1 │ +└───────────────────────────────────┴──────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT toIPv6('127.0.0.1'); +``` + +çµæžœ: + +``` text +┌─toIPv6('127.0.0.1')─┠+│ ::ffff:127.0.0.1 │ +└─────────────────────┘ +``` + +## toIPv6OrDefault + +[`toIPv6`](#toipv6) ã¨åŒæ§˜ã§ã™ãŒã€IPv6 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€`::` (0 IPv6) ã¾ãŸã¯æŒ‡å®šã•ã‚ŒãŸ IPv6 デフォルトを返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toIPv6OrDefault(string[, default]) +``` + +**引数** + +- `string` — IP アドレス。[String](../data-types/string.md)。 +- `default` (オプション) — `string` ãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã«è¿”ã™å€¤ã€‚[IPv6](../data-types/ipv6.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- IPv6 アドレス [IPv6](../data-types/ipv6.md)ã€ãã†ã§ãªã„å ´åˆã¯ `::` ã¾ãŸã¯ã‚ªãƒ—ションã§æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãŒ `string` ãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã«è¿”ã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +WITH + '127.0.0.1' AS valid_IPv4_string, + '127.0.0.1.6' AS invalid_IPv4_string +SELECT + toIPv6OrDefault(valid_IPv4_string) AS valid, + toIPv6OrDefault(invalid_IPv4_string) AS default, + toIPv6OrDefault(invalid_IPv4_string, toIPv6('1.1.1.1')) AS provided_default +``` + +çµæžœ: + +``` text +┌─valid────────────┬─default─┬─provided_default─┠+│ ::ffff:127.0.0.1 │ :: │ ::ffff:1.1.1.1 │ +└──────────────────┴─────────┴──────────────────┘ +``` + +## toIPv6OrNull + +[`toIPv6`](#toipv6) ã¨åŒæ§˜ã§ã™ãŒã€IPv6 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€null ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toIPv6OrNull(string) +``` + +**引数** + +- `string` — IP アドレス。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- IP アドレス。[IPv6](../data-types/ipv6.md)ã€ã¾ãŸã¯ `string` ãŒæœ‰åŠ¹ãªå½¢å¼ã§ãªã„å ´åˆã¯ null。 + +**例** + +クエリ: + +``` sql +WITH '127.0.0.1.6' AS invalid_IPv4_string +SELECT toIPv6OrNull(invalid_IPv4_string); +``` + +çµæžœ: + +``` text +┌─toIPv6OrNull(invalid_IPv4_string)─┠+│ á´ºáµá´¸á´¸ │ +└───────────────────────────────────┘ +``` + +## toIPv6OrZero + +[`toIPv6`](#toipv6) ã¨åŒæ§˜ã§ã™ãŒã€IPv6 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€`::` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toIPv6OrZero(string) +``` + +**引数** + +- `string` — IP アドレス。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- IP アドレス。[IPv6](../data-types/ipv6.md)ã€ã¾ãŸã¯ `string` ãŒæœ‰åŠ¹ãªå½¢å¼ã§ãªã„å ´åˆã¯ `::`。 + +**例** + +クエリ: + +``` sql +WITH '127.0.0.1.6' AS invalid_IPv4_string +SELECT toIPv6OrZero(invalid_IPv4_string); +``` + +çµæžœ: + +``` text +┌─toIPv6OrZero(invalid_IPv4_string)─┠+│ :: │ +└───────────────────────────────────┘ +``` + +## IPv6StringToNumOrDefault(s) + +`toIPv6` ã¨åŒæ§˜ã§ã™ãŒã€IPv6 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€0 ã‚’è¿”ã—ã¾ã™ã€‚ + +## IPv6StringToNumOrNull(s) + +`toIPv6` ã¨åŒæ§˜ã§ã™ãŒã€IPv6 アドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€null ã‚’è¿”ã—ã¾ã™ã€‚ + +## isIPv4String + +入力文字列㌠IPv4 アドレスã‹ã©ã†ã‹ã‚’判定ã—ã¾ã™ã€‚`string` ㌠IPv6 アドレスã®å ´åˆã€`0` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +isIPv4String(string) +``` + +**引数** + +- `string` — IP アドレス。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `string` ㌠IPv4 アドレスã®å ´åˆã¯ `1`ã€ãれ以外ã®å ´åˆã¯ `0`。[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT addr, isIPv4String(addr) FROM ( SELECT ['0.0.0.0', '127.0.0.1', '::ffff:127.0.0.1'] AS addr ) ARRAY JOIN addr; +``` + +çµæžœ: + +``` text +┌─addr─────────────┬─isIPv4String(addr)─┠+│ 0.0.0.0 │ 1 │ +│ 127.0.0.1 │ 1 │ +│ ::ffff:127.0.0.1 │ 0 │ +└──────────────────┴────────────────────┘ +``` + +## isIPv6String + +入力文字列㌠IPv6 アドレスã‹ã©ã†ã‹ã‚’判定ã—ã¾ã™ã€‚`string` ㌠IPv4 アドレスã®å ´åˆã€`0` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +isIPv6String(string) +``` + +**引数** + +- `string` — IP アドレス。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `string` ㌠IPv6 アドレスã®å ´åˆã¯ `1`ã€ãれ以外ã®å ´åˆã¯ `0`。[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT addr, isIPv6String(addr) FROM ( SELECT ['::', '1111::ffff', '::ffff:127.0.0.1', '127.0.0.1'] AS addr ) ARRAY JOIN addr; +``` + +çµæžœ: + +``` text +┌─addr─────────────┬─isIPv6String(addr)─┠+│ :: │ 1 │ +│ 1111::ffff │ 1 │ +│ ::ffff:127.0.0.1 │ 1 │ +│ 127.0.0.1 │ 0 │ +└──────────────────┴────────────────────┘ +``` + +## isIPAddressInRange + +IP アドレス㌠[CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 表記ã§è¡¨ã•ã‚Œã‚‹ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«å«ã¾ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’判定ã—ã¾ã™ã€‚å«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã¯ `1` ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯ `0` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +isIPAddressInRange(address, prefix) +``` + +ã“ã®é–¢æ•°ã¯æ–‡å­—列ã¨ã—ã¦è¡¨ã•ã‚Œã‚‹ IPv4 ãŠã‚ˆã³ IPv6 アドレス(ãŠã‚ˆã³ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ï¼‰ã®ä¸¡æ–¹ã‚’å—ã‘入れã¾ã™ã€‚アドレス㨠CIDR ã® IP ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒä¸€è‡´ã—ãªã„å ´åˆã€`0` ã‚’è¿”ã—ã¾ã™ã€‚ + +**引数** + +- `address` — IPv4 ã¾ãŸã¯ IPv6 アドレス。[String](../data-types/string.md)。 +- `prefix` — CIDR å½¢å¼ã® IPv4 ã¾ãŸã¯ IPv6 ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ プリフィックス。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `1` ã¾ãŸã¯ `0`。[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT isIPAddressInRange('127.0.0.1', '127.0.0.0/8'); +``` + +çµæžœ: + +``` text +┌─isIPAddressInRange('127.0.0.1', '127.0.0.0/8')─┠+│ 1 │ +└────────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT isIPAddressInRange('127.0.0.1', 'ffff::/16'); +``` + +çµæžœ: + +``` text +┌─isIPAddressInRange('127.0.0.1', 'ffff::/16')─┠+│ 0 │ +└──────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT isIPAddressInRange('::ffff:192.168.0.1', '::ffff:192.168.0.4/128'); +``` + +çµæžœ: + +``` text +┌─isIPAddressInRange('::ffff:192.168.0.1', '::ffff:192.168.0.4/128')─┠+│ 0 │ +└────────────────────────────────────────────────────────────────────┘ +``` + diff --git a/docs/ja/sql-reference/functions/json-functions.md b/docs/ja/sql-reference/functions/json-functions.md new file mode 100644 index 00000000000..a0c55300feb --- /dev/null +++ b/docs/ja/sql-reference/functions/json-functions.md @@ -0,0 +1,1361 @@ +--- +slug: /ja/sql-reference/functions/json-functions +sidebar_position: 105 +sidebar_label: JSON +--- + +JSONを解æžã™ã‚‹ãŸã‚ã®é–¢æ•°ã¯2ã¤ã®ã‚»ãƒƒãƒˆãŒã‚ã‚Šã¾ã™ï¼š + - é™å®šã•ã‚Œã¦ã„るサブセットã®JSONを極ã‚ã¦é«˜é€Ÿã«è§£æžã™ã‚‹ãŸã‚ã®[`simpleJSON*` (`visitParam*`)](#simplejson-visitparam-functions)。 + - 通常ã®JSONを解æžã™ã‚‹ãŸã‚ã®[`JSONExtract*`](#jsonextract-functions)。 + +## simpleJSON (visitParam) 関数 + +ClickHouseã«ã¯ã€ç°¡æ˜“化ã•ã‚ŒãŸJSONã‚’æ“作ã™ã‚‹ãŸã‚ã®ç‰¹åˆ¥ãªé–¢æ•°ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®JSON関数ã¯ã€JSONãŒã©ã®ã‚ˆã†ãªã‚‚ã®ã§ã‚ã‚‹ã‹ã«ã¤ã„ã¦å¼·åŠ›ãªä»®å®šã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚å¯èƒ½ãªé™ã‚Šå°‘ãªã„労力ã§ã€ã§ãã‚‹ã ã‘æ—©ã作業を完了ã™ã‚‹ã“ã¨ã‚’目指ã—ã¦ã„ã¾ã™ã€‚ + +次ã®ä»®å®šãŒã•ã‚Œã¦ã„ã¾ã™ï¼š + +1. フィールドå(関数ã®å¼•æ•°ï¼‰ã¯å®šæ•°ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +2. フィールドåã¯ã€JSONã§æ¨™æº–çš„ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€`simpleJSONHas('{"abc":"def"}', 'abc') = 1` ã§ã™ãŒã€`simpleJSONHas('{"\\u0061\\u0062\\u0063":"def"}', 'abc') = 0` +3. フィールドã¯ã€ã©ã®ãƒã‚¹ãƒˆãƒ¬ãƒ™ãƒ«ã§ã‚‚無差別ã«æ¤œç´¢ã•ã‚Œã¾ã™ã€‚複数ã®ä¸€è‡´ã™ã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒã‚ã‚‹å ´åˆã€æœ€åˆã®å‡ºç¾ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +4. JSONã¯æ–‡å­—列リテラル外ã«ã‚¹ãƒšãƒ¼ã‚¹æ–‡å­—ã‚’æŒã¡ã¾ã›ã‚“。 + +### simpleJSONHas + +`field_name`ã¨ã„ã†åå‰ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒã‚ã‚‹ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚çµæžœã¯`UInt8`ã§ã™ã€‚ + +**構文** + +```sql +simpleJSONHas(json, field_name) +``` + +別å: `visitParamHas`. + +**パラメータ** + +- `json` — フィールドãŒæ¤œç´¢ã•ã‚Œã‚‹JSON。[String](../data-types/string.md#string) +- `field_name` — 検索ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®åå‰ã€‚[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- フィールドãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯`1`ã‚’è¿”ã—ã€å­˜åœ¨ã—ãªã„å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +CREATE TABLE jsons +( + `json` String +) +ENGINE = Memory; + +INSERT INTO jsons VALUES ('{"foo":"true","qux":1}'); + +SELECT simpleJSONHas(json, 'foo') FROM jsons; +SELECT simpleJSONHas(json, 'bar') FROM jsons; +``` + +çµæžœ: + +```response +1 +0 +``` +### simpleJSONExtractUInt + +`field_name`ã¨ã„ã†åå‰ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®å€¤ã‹ã‚‰`UInt64`を解æžã—ã¾ã™ã€‚文字列フィールドã®å ´åˆã€æ–‡å­—列ã®å…ˆé ­ã‹ã‚‰æ•°å€¤ã‚’解æžã—よã†ã¨ã—ã¾ã™ã€‚フィールドãŒå­˜åœ¨ã—ãªã„å ´åˆã€ã¾ãŸã¯æ•°å€¤ã‚’å«ã¾ãªã„å ´åˆã€`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +simpleJSONExtractUInt(json, field_name) +``` + +別å: `visitParamExtractUInt`. + +**パラメータ** + +- `json` — フィールドãŒæ¤œç´¢ã•ã‚Œã‚‹JSON。[String](../data-types/string.md#string) +- `field_name` — 検索ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®åå‰ã€‚[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- フィールドãŒå­˜åœ¨ã—ã€æ•°å€¤ã‚’å«ã‚€å ´åˆã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‹ã‚‰è§£æžã•ã‚ŒãŸæ•°ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +CREATE TABLE jsons +( + `json` String +) +ENGINE = Memory; + +INSERT INTO jsons VALUES ('{"foo":"4e3"}'); +INSERT INTO jsons VALUES ('{"foo":3.4}'); +INSERT INTO jsons VALUES ('{"foo":5}'); +INSERT INTO jsons VALUES ('{"foo":"not1number"}'); +INSERT INTO jsons VALUES ('{"baz":2}'); + +SELECT simpleJSONExtractUInt(json, 'foo') FROM jsons ORDER BY json; +``` + +çµæžœ: + +```response +0 +4 +0 +3 +5 +``` + +### simpleJSONExtractInt + +`field_name`ã¨ã„ã†åå‰ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®å€¤ã‹ã‚‰`Int64`を解æžã—ã¾ã™ã€‚文字列フィールドã®å ´åˆã¯ã€æ–‡å­—列ã®å…ˆé ­ã‹ã‚‰æ•°å€¤ã‚’解æžã—よã†ã¨ã—ã¾ã™ã€‚フィールドãŒå­˜åœ¨ã—ãªã„å ´åˆã€ã¾ãŸã¯æ•°å€¤ã‚’å«ã¾ãªã„å ´åˆã€`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +simpleJSONExtractInt(json, field_name) +``` + +別å: `visitParamExtractInt`. + +**パラメータ** + +- `json` — フィールドãŒæ¤œç´¢ã•ã‚Œã‚‹JSON。[String](../data-types/string.md#string) +- `field_name` — 検索ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®åå‰ã€‚[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- フィールドãŒå­˜åœ¨ã—ã€æ•°å€¤ã‚’å«ã‚€å ´åˆã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‹ã‚‰è§£æžã•ã‚ŒãŸæ•°ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚[Int64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +CREATE TABLE jsons +( + `json` String +) +ENGINE = Memory; + +INSERT INTO jsons VALUES ('{"foo":"-4e3"}'); +INSERT INTO jsons VALUES ('{"foo":-3.4}'); +INSERT INTO jsons VALUES ('{"foo":5}'); +INSERT INTO jsons VALUES ('{"foo":"not1number"}'); +INSERT INTO jsons VALUES ('{"baz":2}'); + +SELECT simpleJSONExtractInt(json, 'foo') FROM jsons ORDER BY json; +``` + +çµæžœ: + +```response +0 +-4 +0 +-3 +5 +``` + +### simpleJSONExtractFloat + +`field_name`ã¨ã„ã†åå‰ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®å€¤ã‹ã‚‰`Float64`を解æžã—ã¾ã™ã€‚文字列フィールドã®å ´åˆã¯ã€æ–‡å­—列ã®å…ˆé ­ã‹ã‚‰æ•°å€¤ã‚’解æžã—よã†ã¨ã—ã¾ã™ã€‚フィールドãŒå­˜åœ¨ã—ãªã„å ´åˆã€ã¾ãŸã¯æ•°å€¤ã‚’å«ã¾ãªã„å ´åˆã€`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +simpleJSONExtractFloat(json, field_name) +``` + +別å: `visitParamExtractFloat`. + +**パラメータ** + +- `json` — フィールドãŒæ¤œç´¢ã•ã‚Œã‚‹JSON。[String](../data-types/string.md#string) +- `field_name` — 検索ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®åå‰ã€‚[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- フィールドãŒå­˜åœ¨ã—ã€æ•°å€¤ã‚’å«ã‚€å ´åˆã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‹ã‚‰è§£æžã•ã‚ŒãŸæ•°ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚[Float64](../data-types/float.md/#float32-float64)。 + +**例** + +クエリ: + +```sql +CREATE TABLE jsons +( + `json` String +) +ENGINE = Memory; + +INSERT INTO jsons VALUES ('{"foo":"-4e3"}'); +INSERT INTO jsons VALUES ('{"foo":-3.4}'); +INSERT INTO jsons VALUES ('{"foo":5}'); +INSERT INTO jsons VALUES ('{"foo":"not1number"}'); +INSERT INTO jsons VALUES ('{"baz":2}'); + +SELECT simpleJSONExtractFloat(json, 'foo') FROM jsons ORDER BY json; +``` + +çµæžœ: + +```response +0 +-4000 +0 +-3.4 +5 +``` + +### simpleJSONExtractBool + +`field_name`ã¨ã„ã†åå‰ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®å€¤ã‹ã‚‰çœŸå½å€¤ã‚’解æžã—ã¾ã™ã€‚çµæžœã¯`UInt8`ã§ã™ã€‚ + +**構文** + +```sql +simpleJSONExtractBool(json, field_name) +``` + +別å: `visitParamExtractBool`. + +**パラメータ** + +- `json` — フィールドãŒæ¤œç´¢ã•ã‚Œã‚‹JSON。[String](../data-types/string.md#string) +- `field_name` — 検索ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®åå‰ã€‚[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +フィールドã®å€¤ãŒ`true`ã®å ´åˆã¯`1`ã‚’ã€ãれ以外ã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€æ¬¡ã®å ´åˆã‚’å«ã‚(ã“れらã«é™å®šã•ã‚Œãªã„)ã“ã®é–¢æ•°ã¯`0`ã‚’è¿”ã—ã¾ã™ï¼š + - フィールドãŒå­˜åœ¨ã—ãªã„å ´åˆã€‚ + - フィールドãŒæ–‡å­—列ã¨ã—ã¦`true`ã‚’å«ã‚€å ´åˆã€ä¾‹: `{"field":"true"}`。 + - フィールドãŒæ•°å€¤å€¤ã¨ã—ã¦`1`ã‚’å«ã‚€å ´åˆã€‚ + +**例** + +クエリ: + +```sql +CREATE TABLE jsons +( + `json` String +) +ENGINE = Memory; + +INSERT INTO jsons VALUES ('{"foo":false,"bar":true}'); +INSERT INTO jsons VALUES ('{"foo":"true","qux":1}'); + +SELECT simpleJSONExtractBool(json, 'bar') FROM jsons ORDER BY json; +SELECT simpleJSONExtractBool(json, 'foo') FROM jsons ORDER BY json; +``` + +çµæžœ: + +```response +0 +1 +0 +0 +``` + +### simpleJSONExtractRaw + +`field_name`ã¨ã„ã†åå‰ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®å€¤ã‚’セパレータをå«ã‚€`String`ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +simpleJSONExtractRaw(json, field_name) +``` + +別å: `visitParamExtractRaw`. + +**パラメータ** + +- `json` — フィールドãŒæ¤œç´¢ã•ã‚Œã‚‹JSON。[String](../data-types/string.md#string) +- `field_name` — 検索ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®åå‰ã€‚[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- フィールドãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯å€¤ã‚’セパレータをå«ã‚€æ–‡å­—列ã¨ã—ã¦è¿”ã—ã€å­˜åœ¨ã—ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚[`String`](../data-types/string.md#string) + +**例** + +クエリ: + +```sql +CREATE TABLE jsons +( + `json` String +) +ENGINE = Memory; + +INSERT INTO jsons VALUES ('{"foo":"-4e3"}'); +INSERT INTO jsons VALUES ('{"foo":-3.4}'); +INSERT INTO jsons VALUES ('{"foo":5}'); +INSERT INTO jsons VALUES ('{"foo":{"def":[1,2,3]}}'); +INSERT INTO jsons VALUES ('{"baz":2}'); + +SELECT simpleJSONExtractRaw(json, 'foo') FROM jsons ORDER BY json; +``` + +çµæžœ: + +```response + +"-4e3" +-3.4 +5 +{"def":[1,2,3]} +``` + +### simpleJSONExtractString + +ダブルクォート付ãã®`String`ã‚’`field_name`ã¨ã„ã†åå‰ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®å€¤ã‹ã‚‰è§£æžã—ã¾ã™ã€‚ + +**構文** + +```sql +simpleJSONExtractString(json, field_name) +``` + +別å: `visitParamExtractString`. + +**パラメータ** + +- `json` — フィールドãŒæ¤œç´¢ã•ã‚Œã‚‹JSON。[String](../data-types/string.md#string) +- `field_name` — 検索ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®åå‰ã€‚[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- フィールドã®å€¤ã‚’セパレータをå«ã‚ã¦æ–‡å­—列ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚フィールドãŒãƒ€ãƒ–ルクォート付ã文字列をå«ã¾ãªã„å ´åˆã€ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã«å¤±æ•—ã—ãŸå ´åˆã€ã¾ãŸã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**実装ã®è©³ç´°** + +ç¾åœ¨ã€åŸºæœ¬å¤šè¨€èªžé¢ã«å«ã¾ã‚Œãªã„å½¢å¼ã®`\\uXXXX\\uYYYY`ã«å¯¾å¿œã™ã‚‹ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆã®ã‚µãƒãƒ¼ãƒˆã¯ã‚ã‚Šã¾ã›ã‚“(CESU-8ã«å¤‰æ›ã•ã‚Œã¾ã™ãŒã€UTF-8ã«ã¯å¤‰æ›ã•ã‚Œã¾ã›ã‚“)。 + +**例** + +クエリ: + +```sql +CREATE TABLE jsons +( + `json` String +) +ENGINE = Memory; + +INSERT INTO jsons VALUES ('{"foo":"\\n\\u0000"}'); +INSERT INTO jsons VALUES ('{"foo":"\\u263"}'); +INSERT INTO jsons VALUES ('{"foo":"\\u263a"}'); +INSERT INTO jsons VALUES ('{"foo":"hello}'); + +SELECT simpleJSONExtractString(json, 'foo') FROM jsons ORDER BY json; +``` + +çµæžœ: + +```response +\n\0 + +☺ + +``` + +## JSONExtract 関数 + +次ã®é–¢æ•°ã¯[simdjson](https://github.com/lemire/simdjson)ã«åŸºã¥ã„ã¦ãŠã‚Šã€ã‚ˆã‚Šè¤‡é›‘ãªJSONã®è§£æžè¦ä»¶ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ + +### isValidJSON + +渡ã•ã‚ŒãŸæ–‡å­—列ãŒæœ‰åŠ¹ãªJSONã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +**構文** + +```sql +isValidJSON(json) +``` + +**例** + +``` sql +SELECT isValidJSON('{"a": "hello", "b": [-100, 200.0, 300]}') = 1 +SELECT isValidJSON('not a json') = 0 +``` + +### JSONHas + +JSONドキュメントã«å€¤ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯`1`ã‚’è¿”ã—ã¾ã™ã€‚値ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +JSONHas(json [, indices_or_keys]...) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md)。 + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `json`ã«å€¤ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯`1`ã€ãれ以外ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT JSONHas('{"a": "hello", "b": [-100, 200.0, 300]}', 'b') = 1 +SELECT JSONHas('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', 4) = 0 +``` + +è¦ç´ ã®æœ€å°ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯1ã§ã™ã€‚ãã®ãŸã‚ã€è¦ç´ 0ã¯å­˜åœ¨ã—ã¾ã›ã‚“。整数を使ã£ã¦JSONé…列ãŠã‚ˆã³JSONオブジェクトã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚例ãˆã°ï¼š + +``` sql +SELECT JSONExtractKey('{"a": "hello", "b": [-100, 200.0, 300]}', 1) = 'a' +SELECT JSONExtractKey('{"a": "hello", "b": [-100, 200.0, 300]}', 2) = 'b' +SELECT JSONExtractKey('{"a": "hello", "b": [-100, 200.0, 300]}', -1) = 'b' +SELECT JSONExtractKey('{"a": "hello", "b": [-100, 200.0, 300]}', -2) = 'a' +SELECT JSONExtractString('{"a": "hello", "b": [-100, 200.0, 300]}', 1) = 'hello' +``` + +### JSONLength + +JSONé…列ã¾ãŸã¯JSONオブジェクトã®é•·ã•ã‚’è¿”ã—ã¾ã™ã€‚値ãŒå­˜åœ¨ã—ãªã„ã€ã¾ãŸã¯é–“é•ã£ãŸåž‹ã®å ´åˆã€`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +JSONLength(json [, indices_or_keys]...) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md)。 + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- JSONé…列ã¾ãŸã¯JSONオブジェクトã®é•·ã•ã‚’è¿”ã—ã¾ã™ã€‚値ãŒå­˜åœ¨ã—ãªã„ã€ã¾ãŸã¯ä¸æ­£ãªåž‹ã®å ´åˆã€`0`ã‚’è¿”ã—ã¾ã™ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT JSONLength('{"a": "hello", "b": [-100, 200.0, 300]}', 'b') = 3 +SELECT JSONLength('{"a": "hello", "b": [-100, 200.0, 300]}') = 2 +``` + +### JSONType + +JSON値ã®åž‹ã‚’è¿”ã—ã¾ã™ã€‚値ãŒå­˜åœ¨ã—ãªã„å ´åˆã€`Null`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +JSONType(json [, indices_or_keys]...) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md)。 + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- JSON値ã®åž‹ã‚’文字列ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚値ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯`Null`ã‚’è¿”ã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**例** + +``` sql +SELECT JSONType('{"a": "hello", "b": [-100, 200.0, 300]}') = 'Object' +SELECT JSONType('{"a": "hello", "b": [-100, 200.0, 300]}', 'a') = 'String' +SELECT JSONType('{"a": "hello", "b": [-100, 200.0, 300]}', 'b') = 'Array' +``` + +### JSONExtractUInt + +JSONを解æžã—ã¦UIntåž‹ã®å€¤ã‚’抽出ã—ã¾ã™ã€‚ + +**構文** + +```sql +JSONExtractUInt(json [, indices_or_keys]...) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md)。 + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- UInt値ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ãれを返ã—ã€å­˜åœ¨ã—ãªã„å ´åˆã¯`Null`ã‚’è¿”ã—ã¾ã™ã€‚[UInt64](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT JSONExtractUInt('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', -1) as x, toTypeName(x); +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┠+│ 300 │ UInt64 │ +└─────┴───────────────┘ +``` + +### JSONExtractInt + +JSONを解æžã—ã¦Intåž‹ã®å€¤ã‚’抽出ã—ã¾ã™ã€‚ + +**構文** + +```sql +JSONExtractInt(json [, indices_or_keys]...) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md)。 + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Int値ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ãれを返ã—ã€å­˜åœ¨ã—ãªã„å ´åˆã¯`Null`ã‚’è¿”ã—ã¾ã™ã€‚[Int64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT JSONExtractInt('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', -1) as x, toTypeName(x); +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┠+│ 300 │ Int64 │ +└─────┴───────────────┘ +``` + +### JSONExtractFloat + +JSONを解æžã—ã¦Intåž‹ã®å€¤ã‚’抽出ã—ã¾ã™ã€‚ + +**構文** + +```sql +JSONExtractFloat(json [, indices_or_keys]...) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md)。 + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Float値ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ãれを返ã—ã€å­˜åœ¨ã—ãªã„å ´åˆã¯`Null`ã‚’è¿”ã—ã¾ã™ã€‚[Float64](../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT JSONExtractFloat('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', 2) as x, toTypeName(x); +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┠+│ 200 │ Float64 │ +└─────┴───────────────┘ +``` + +### JSONExtractBool + +JSONを解æžã—ã¦ãƒ–ール値を抽出ã—ã¾ã™ã€‚値ãŒå­˜åœ¨ã—ãªã„ã‹é–“é•ã£ãŸåž‹ã®å ´åˆã€`0`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +JSONExtractBool(json\[, indices_or_keys\]...) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md)。 + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ブール値ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ãれを返ã—ã€å­˜åœ¨ã—ãªã„å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚[Bool](../data-types/boolean.md)。 + +**例** + +クエリ: + +``` sql +SELECT JSONExtractBool('{"passed": true}', 'passed'); +``` + +çµæžœ: + +```response +┌─JSONExtractBool('{"passed": true}', 'passed')─┠+│ 1 │ +└───────────────────────────────────────────────┘ +``` + +### JSONExtractString + +JSONを解æžã—ã¦æ–‡å­—列を抽出ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯[`visitParamExtractString`](#simplejsonextractstring)関数ã¨ä¼¼ã¦ã„ã¾ã™ã€‚値ãŒå­˜åœ¨ã—ãªã„ã‹é–“é•ã£ãŸåž‹ã®å ´åˆã€ç©ºã®æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +JSONExtractString(json [, indices_or_keys]...) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md). + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `json`ã‹ã‚‰ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—解除ã•ã‚ŒãŸæ–‡å­—列を返ã—ã¾ã™ã€‚エスケープ解除ã«å¤±æ•—ã—ãŸå ´åˆã€å€¤ãŒå­˜åœ¨ã—ãªã„ã‹é–“é•ã£ãŸåž‹ã®å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**例** + +``` sql +SELECT JSONExtractString('{"a": "hello", "b": [-100, 200.0, 300]}', 'a') = 'hello' +SELECT JSONExtractString('{"abc":"\\n\\u0000"}', 'abc') = '\n\0' +SELECT JSONExtractString('{"abc":"\\u263a"}', 'abc') = '☺' +SELECT JSONExtractString('{"abc":"\\u263"}', 'abc') = '' +SELECT JSONExtractString('{"abc":"hello}', 'abc') = '' +``` + +### JSONExtract + +解æžã•ã‚ŒãŸJSONã‹ã‚‰æŒ‡å®šã—ãŸClickHouseã®ãƒ‡ãƒ¼ã‚¿åž‹ã®å€¤ã‚’抽出ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ä»¥å‰ã®`JSONExtract`関数ã®ä¸€èˆ¬åŒ–ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã™ã€‚ã¤ã¾ã‚Šï¼š + +`JSONExtract(..., 'String')` 㯠`JSONExtractString()`ã¨å…¨ãåŒã˜ã‚‚ã®ã‚’è¿”ã—ã¾ã™ã€‚ +`JSONExtract(..., 'Float64')` 㯠`JSONExtractFloat()`ã¨å…¨ãåŒã˜ã‚‚ã®ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +JSONExtract(json [, indices_or_keys...], return_type) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md). +- `return_type` — 抽出ã™ã‚‹å€¤ã®åž‹ã‚’指定ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md)。 + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸè¿”å´åž‹ã®å€¤ãŒå­˜åœ¨ã™ã‚Œã°ãれを返ã—ã€å­˜åœ¨ã—ãªã„å ´åˆã¯æŒ‡å®šã•ã‚ŒãŸè¿”å´åž‹ã«å¿œã˜ã¦`0`ã€`Null`ã€ã¾ãŸã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ [UInt64](../data-types/int-uint.md), [Int64](../data-types/int-uint.md), [Float64](../data-types/float.md), [Bool](../data-types/boolean.md)ã¾ãŸã¯[String](../data-types/string.md)。 + +**例** + +``` sql +SELECT JSONExtract('{"a": "hello", "b": [-100, 200.0, 300]}', 'Tuple(String, Array(Float64))') = ('hello',[-100,200,300]) +SELECT JSONExtract('{"a": "hello", "b": [-100, 200.0, 300]}', 'Tuple(b Array(Float64), a String)') = ([-100,200,300],'hello') +SELECT JSONExtract('{"a": "hello", "b": "world"}', 'Map(String, String)') = map('a', 'hello', 'b', 'world'); +SELECT JSONExtract('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', 'Array(Nullable(Int8))') = [-100, NULL, NULL] +SELECT JSONExtract('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', 4, 'Nullable(Int64)') = NULL +SELECT JSONExtract('{"passed": true}', 'passed', 'UInt8') = 1 +SELECT JSONExtract('{"day": "Thursday"}', 'day', 'Enum8(\'Sunday\' = 0, \'Monday\' = 1, \'Tuesday\' = 2, \'Wednesday\' = 3, \'Thursday\' = 4, \'Friday\' = 5, \'Saturday\' = 6)') = 'Thursday' +SELECT JSONExtract('{"day": 5}', 'day', 'Enum8(\'Sunday\' = 0, \'Monday\' = 1, \'Tuesday\' = 2, \'Wednesday\' = 3, \'Thursday\' = 4, \'Friday\' = 5, \'Saturday\' = 6)') = 'Friday' +``` + +### JSONExtractKeysAndValues + +与ãˆã‚‰ã‚ŒãŸClickHouseデータ型ã®å€¤ã‚’æŒã¤ã‚­ãƒ¼-値ペアをJSONã‹ã‚‰è§£æžã—ã¾ã™ã€‚ + +**構文** + +```sql +JSONExtractKeysAndValues(json [, indices_or_keys...], value_type) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md). +- `value_type` — 抽出ã™ã‚‹å€¤ã®åž‹ã‚’指定ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md)。 + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 解æžã•ã‚ŒãŸã‚­ãƒ¼-値ペアã®é…列を返ã—ã¾ã™ã€‚[Array](../data-types/array.md)([Tuple](../data-types/tuple.md)(`value_type`))。 + +**例** + +``` sql +SELECT JSONExtractKeysAndValues('{"x": {"a": 5, "b": 7, "c": 11}}', 'x', 'Int8') = [('a',5),('b',7),('c',11)]; +``` + +### JSONExtractKeys + +JSON文字列を解æžã—ã¦ã‚­ãƒ¼ã‚’抽出ã—ã¾ã™ã€‚ + +**構文** + +``` sql +JSONExtractKeys(json[, a, b, c...]) +``` + +**パラメータ** + +- `json` — 有効ãªJSONã‚’å«ã‚€[String](../data-types/string.md)。 +- `a, b, c...` — ãƒã‚¹ãƒˆã•ã‚ŒãŸJSONオブジェクト内ã§å†…å´ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¸ã®ãƒ‘スを指定ã™ã‚‹ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¾ãŸã¯ã‚­ãƒ¼ã€‚å„引数ã¯ã€ã‚­ãƒ¼ã«ã‚ˆã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å–å¾—ã«ä½¿ã†[String](../data-types/string.md)ã¾ãŸã¯N番目ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å–å¾—ã«ä½¿ã†[Integer](../data-types/int-uint.md)。指定ã—ãªã„å ´åˆã¯ã€å…¨ä½“ã®JSONãŒãƒˆãƒƒãƒ—レベルオブジェクトã¨ã—ã¦è§£æžã•ã‚Œã¾ã™ã€‚オプションã®ãƒ‘ラメータ。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- JSONã®ã‚­ãƒ¼ã®é…列を返ã—ã¾ã™ã€‚[Array](../data-types/array.md)([String](../data-types/string.md))。 + +**例** + +クエリ: + +```sql +SELECT JSONExtractKeys('{"a": "hello", "b": [-100, 200.0, 300]}'); +``` + +çµæžœ: + +``` +text +┌─JSONExtractKeys('{"a": "hello", "b": [-100, 200.0, 300]}')─┠+│ ['a','b'] │ +└────────────────────────────────────────────────────────────┘ +``` + +### JSONExtractRaw + +未解æžã®æ–‡å­—列ã¨ã—ã¦JSONã®ä¸€éƒ¨ã‚’è¿”ã—ã¾ã™ã€‚部分ãŒå­˜åœ¨ã—ãªã„ã‹é–“é•ã£ãŸåž‹ã®å ´åˆã€ç©ºã®æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +JSONExtractRaw(json [, indices_or_keys]...) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md]. + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 未解æžã®æ–‡å­—列ã¨ã—ã¦JSONã®ä¸€éƒ¨ã‚’è¿”ã—ã¾ã™ã€‚部分ãŒå­˜åœ¨ã—ãªã„ã‹é–“é•ã£ãŸåž‹ã®å ´åˆã€ç©ºã®æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚[String](../data-types/string.md)。 + +**例** + +``` sql +SELECT JSONExtractRaw('{"a": "hello", "b": [-100, 200.0, 300]}', 'b') = '[-100, 200.0, 300]'; +``` + +### JSONExtractArrayRaw + +JSONé…列ã®å„è¦ç´ ã‚’未解æžã®æ–‡å­—列ã¨ã—ã¦æŒã¤é…列を返ã—ã¾ã™ã€‚部分ãŒå­˜åœ¨ã—ãªã„ã‹é…列ã§ãªã„å ´åˆã¯ã€ç©ºã®é…列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +JSONExtractArrayRaw(json [, indices_or_keys...]) +``` + +**パラメータ** + +- `json` — 解æžã™ã‚‹JSON文字列。[String](../data-types/string.md)。 +- `indices_or_keys` — ゼロã¾ãŸã¯ãれ以上ã®å¼•æ•°ã®ãƒªã‚¹ãƒˆã§ã€ãã‚Œãžã‚ŒãŒæ–‡å­—列ã¾ãŸã¯æ•´æ•°ã§ã™ã€‚[String](../data-types/string.md), [Int*](../data-types/int-uint.md]. + +`indices_or_keys` ã®ã‚¿ã‚¤ãƒ—: +- 文字列 = キーã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトメンãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- æ­£ã®æ•´æ•° = 開始ã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ +- è² ã®æ•´æ•° = 終ã‚ã‚Šã‹ã‚‰n番目ã®ãƒ¡ãƒ³ãƒãƒ¼/キーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å„è¦ç´ ãŒæœªè§£æžã®æ–‡å­—列ã¨ã—ã¦è¡¨ã•ã‚Œã‚‹JSONé…列ã®è¦ç´ ã‚’æŒã¤é…列を返ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ã€éƒ¨åˆ†ãŒå­˜åœ¨ã—ãªã„ã‹é…列ã§ãªã„å ´åˆã¯ç©ºã®é…列を返ã—ã¾ã™ã€‚[Array](../data-types/array.md)([String](../data-types/string.md))。 + +**例** + +```sql +SELECT JSONExtractArrayRaw('{"a": "hello", "b": [-100, 200.0, "hello"]}', 'b') = ['-100', '200.0', '"hello"']; +``` + +### JSONExtractKeysAndValuesRaw + +JSONオブジェクトã‹ã‚‰ã®ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚’抽出ã—ã¾ã™ã€‚ + +**構文** + +``` sql +JSONExtractKeysAndValuesRaw(json[, p, a, t, h]) +``` + +**引数** + +- `json` — 有効ãªJSONã‚’å«ã‚€[String](../data-types/string.md)。 +- `p, a, t, h` — ãƒã‚¹ãƒˆã•ã‚ŒãŸJSONオブジェクト内ã§å†…å´ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¸ã®ãƒ‘スを指定ã™ã‚‹ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¾ãŸã¯ã‚­ãƒ¼ã€‚å„引数ã¯ã€ã‚­ãƒ¼ã«ã‚ˆã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å–å¾—ã«ä½¿ã†[string](../data-types/string.md)ã¾ãŸã¯N番目ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å–å¾—ã«ä½¿ã†[integer](../data-types/int-uint.md)。指定ã—ãªã„å ´åˆã¯ã€å…¨ä½“ã®JSONãŒãƒˆãƒƒãƒ—レベルオブジェクトã¨ã—ã¦è§£æžã•ã‚Œã¾ã™ã€‚オプションã®ãƒ‘ラメータ。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `('key', 'value')`タプルã®é…列。タプルã®ä¸¡è¦ç´ ã¯æ–‡å­—列ã§ã™ã€‚[Array](../data-types/array.md)([Tuple](../data-types/tuple.md)([String](../data-types/string.md), [String](../data-types/string.md))。 +- è¦æ±‚ã•ã‚ŒãŸã‚ªãƒ–ジェクトãŒå­˜åœ¨ã—ãªã„å ´åˆã€ã¾ãŸã¯å…¥åŠ›JSONãŒç„¡åŠ¹ãªå ´åˆã¯ç©ºã®é…列。[Array](../data-types/array.md)([Tuple](../data-types/tuple.md)([String](../data-types/string.md), [String](../data-types/string.md))。 + +**例** + +クエリ: + +``` sql +SELECT JSONExtractKeysAndValuesRaw('{"a": [-100, 200.0], "b":{"c": {"d": "hello", "f": "world"}}}'); +``` + +çµæžœ: + +``` text +┌─JSONExtractKeysAndValuesRaw('{"a": [-100, 200.0], "b":{"c": {"d": "hello", "f": "world"}}}')─┠+│ [('a','[-100,200]'),('b','{"c":{"d":"hello","f":"world"}}')] │ +└──────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT JSONExtractKeysAndValuesRaw('{"a": [-100, 200.0], "b":{"c": {"d": "hello", "f": "world"}}}', 'b'); +``` + +çµæžœ: + +``` text +┌─JSONExtractKeysAndValuesRaw('{"a": [-100, 200.0], "b":{"c": {"d": "hello", "f": "world"}}}', 'b')─┠+│ [('c','{"d":"hello","f":"world"}')] │ +└───────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT JSONExtractKeysAndValuesRaw('{"a": [-100, 200.0], "b":{"c": {"d": "hello", "f": "world"}}}', -1, 'c'); +``` + +çµæžœ: + +``` text +┌─JSONExtractKeysAndValuesRaw('{"a": [-100, 200.0], "b":{"c": {"d": "hello", "f": "world"}}}', -1, 'c')─┠+│ [('d','"hello"'),('f','"world"')] │ +└───────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +### JSON_EXISTS + +JSONドキュメントã«å€¤ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯`1`ã‚’è¿”ã—ã¾ã™ã€‚値ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +JSON_EXISTS(json, path) +``` + +**パラメータ** + +- `json` — 有効ãªJSONã‚’å«ã‚€æ–‡å­—列。[String](../data-types/string.md)。 +- `path` — パスを表ã™æ–‡å­—列。[String](../data-types/string.md)。 + +:::note +ãƒãƒ¼ã‚¸ãƒ§ãƒ³21.11よりå‰ã ã¨å¼•æ•°ã®é †åºãŒèª¤ã£ã¦ã„ã¾ã—ãŸã€‚ã¤ã¾ã‚Šã€JSON_EXISTS(path, json) +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- JSONドキュメントã«å€¤ãŒå­˜åœ¨ã™ã‚Œã°`1`ã€ãれ以外ã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT JSON_EXISTS('{"hello":1}', '$.hello'); +SELECT JSON_EXISTS('{"hello":{"world":1}}', '$.hello.world'); +SELECT JSON_EXISTS('{"hello":["world"]}', '$.hello[*]'); +SELECT JSON_EXISTS('{"hello":["world"]}', '$.hello[0]'); +``` + +### JSON_QUERY + +JSONを解æžã—ã¦JSONé…列ã¾ãŸã¯JSONオブジェクトã¨ã—ã¦å€¤ã‚’抽出ã—ã¾ã™ã€‚値ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã€ç©ºã®æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +JSON_QUERY(json, path) +``` + +**パラメータ** + +- `json` — 有効ãªJSONã‚’å«ã‚€æ–‡å­—列。[String](../data-types/string.md)。 +- `path` — パスを表ã™æ–‡å­—列。[String](../data-types/string.md)。 + +:::note +ãƒãƒ¼ã‚¸ãƒ§ãƒ³21.11よりå‰ã ã¨å¼•æ•°ã®é †åºãŒèª¤ã£ã¦ã„ã¾ã—ãŸã€‚ã¤ã¾ã‚Šã€JSON_EXISTS(path, json) +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 抽出ã•ã‚ŒãŸå€¤ã‚’JSONé…列ã¾ãŸã¯JSONオブジェクトã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€å€¤ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT JSON_QUERY('{"hello":"world"}', '$.hello'); +SELECT JSON_QUERY('{"array":[[0, 1, 2, 3, 4, 5], [0, -1, -2, -3, -4, -5]]}', '$.array[*][0 to 2, 4]'); +SELECT JSON_QUERY('{"hello":2}', '$.hello'); +SELECT toTypeName(JSON_QUERY('{"hello":2}', '$.hello')); +``` + +çµæžœ: + +``` text +["world"] +[0, 1, 4, 0, -1, -4] +[2] +String +``` + +### JSON_VALUE + +JSONを解æžã—ã¦JSONスカラーã¨ã—ã¦å€¤ã‚’抽出ã—ã¾ã™ã€‚値ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç©ºã®æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯æ¬¡ã®è¨­å®šã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ï¼š + +- `function_json_value_return_type_allow_nullable` ã‚’ `true`ã«è¨­å®šã™ã‚‹ã“ã¨ã§ã€`NULL`ãŒè¿”ã•ã‚Œã¾ã™ã€‚値ãŒè¤‡é›‘型(構造体ã€é…列ã€ãƒžãƒƒãƒ—ã®ã‚ˆã†ãªï¼‰ã®å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç©ºã®æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `function_json_value_return_type_allow_complex` ã‚’ `true`ã«è¨­å®šã™ã‚‹ã“ã¨ã§ã€è¤‡é›‘ãªå€¤ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +JSON_VALUE(json, path) +``` + +**パラメータ** + +- `json` — 有効ãªJSONã‚’å«ã‚€æ–‡å­—列。[String](../data-types/string.md)。 +- `path` — パスを表ã™æ–‡å­—列。[String](../data-types/string.md)。 + +:::note +ãƒãƒ¼ã‚¸ãƒ§ãƒ³21.11よりå‰ã ã¨å¼•æ•°ã®é †åºãŒèª¤ã£ã¦ã„ã¾ã—ãŸã€‚ã¤ã¾ã‚Šã€JSON_EXISTS(path, json) +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- JSONスカラーã¨ã—ã¦æŠ½å‡ºã•ã‚ŒãŸå€¤ã‚’è¿”ã—ã¾ã™ã€‚存在ã—ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT JSON_VALUE('{"hello":"world"}', '$.hello'); +SELECT JSON_VALUE('{"array":[[0, 1, 2, 3, 4, 5], [0, -1, -2, -3, -4, -5]]}', '$.array[*][0 to 2, 4]'); +SELECT JSON_VALUE('{"hello":2}', '$.hello'); +SELECT toTypeName(JSON_VALUE('{"hello":2}', '$.hello')); +select JSON_VALUE('{"hello":"world"}', '$.b') settings function_json_value_return_type_allow_nullable=true; +select JSON_VALUE('{"hello":{"world":"!"}}', '$.hello') settings function_json_value_return_type_allow_complex=true; +``` + +çµæžœ: + +``` text +world +0 +2 +String +``` + +### toJSONString + +値をãã®JSON表ç¾ã«ã‚·ãƒªã‚¢ãƒ«åŒ–ã—ã¾ã™ã€‚ã•ã¾ã–ã¾ãªãƒ‡ãƒ¼ã‚¿åž‹ã‚„ãƒã‚¹ãƒˆã•ã‚ŒãŸæ§‹é€ ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ +デフォルトã§ã€64ビットã®[æ•´æ•°](../data-types/int-uint.md)以上ã®ã‚‚ã®ï¼ˆä¾‹ï¼š `UInt64` ã¾ãŸã¯ `Int128`)ã¯å¼•ç”¨ç¬¦ã§å›²ã¾ã‚Œã¾ã™ã€‚[output_format_json_quote_64bit_integers](../../operations/settings/settings.md#session_settings-output_format_json_quote_64bit_integers)ãŒã“ã®å‹•ä½œã‚’制御ã—ã¾ã™ã€‚ +特別ãªå€¤`NaN` 㨠`inf` 㯠`null` ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ã“れを表示ã™ã‚‹ã«ã¯ã€[output_format_json_quote_denormals](../../operations/settings/settings.md#settings-output_format_json_quote_denormals)設定を有効ã«ã—ã¾ã™ã€‚ +[Enum](../data-types/enum.md)値をシリアル化ã™ã‚‹ã¨ã€ãã®åå‰ãŒå‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +toJSONString(value) +``` + +**引数** + +- `value` — シリアル化ã™ã‚‹å€¤ã€‚値ã¯ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿åž‹ã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 値ã®JSON表ç¾ã€‚[String](../data-types/string.md)。 + +**例** + +最åˆã®ä¾‹ã¯[Map](../data-types/map.md)ã®ã‚·ãƒªã‚¢ãƒ«åŒ–を示ã—ã¦ã„ã¾ã™ã€‚ +2ã¤ç›®ã®ä¾‹ã¯ã€[Tuple](../data-types/tuple.md)ã«ãƒ©ãƒƒãƒ—ã•ã‚ŒãŸç‰¹åˆ¥ãªå€¤ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT toJSONString(map('key1', 1, 'key2', 2)); +SELECT toJSONString(tuple(1.25, NULL, NaN, +inf, -inf, [])) SETTINGS output_format_json_quote_denormals = 1; +``` + +çµæžœ: + +``` text +{"key1":1,"key2":2} +[1.25,null,"nan","inf","-inf",[]] +``` + +**関連リンク** + +- [output_format_json_quote_64bit_integers](../../operations/settings/settings.md#session_settings-output_format_json_quote_64bit_integers) +- [output_format_json_quote_denormals](../../operations/settings/settings.md#settings-output_format_json_quote_denormals) + + +### JSONArrayLength + +最も外å´ã®JSONé…列ã®è¦ç´ æ•°ã‚’è¿”ã—ã¾ã™ã€‚入力ã•ã‚ŒãŸJSON文字列ãŒç„¡åŠ¹ãªå ´åˆã€é–¢æ•°ã¯NULLã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +JSONArrayLength(json) +``` + +別å: `JSON_ARRAY_LENGTH(json)`。 + +**引数** + +- `json` — 有効ãªJSONã‚’å«ã‚€[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `json`ãŒæœ‰åŠ¹ãªJSONé…列文字列ã§ã‚ã‚Œã°ã€é…列è¦ç´ ã®æ•°ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯NULLã‚’è¿”ã—ã¾ã™ã€‚[Nullable(UInt64)](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT + JSONArrayLength(''), + JSONArrayLength('[1,2,3]') + +┌─JSONArrayLength('')─┬─JSONArrayLength('[1,2,3]')─┠+│ á´ºáµá´¸á´¸ │ 3 │ +└─────────────────────┴────────────────────────────┘ +``` + + +### jsonMergePatch + +複数ã®JSONオブジェクトをマージã—ã¦å½¢æˆã•ã‚ŒãŸãƒžãƒ¼ã‚¸æ¸ˆã¿ã®JSONオブジェクト文字列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +jsonMergePatch(json1, json2, ...) +``` + +**引数** + +- `json` — 有効ãªJSONã‚’å«ã‚€[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- JSONオブジェクト文字列ãŒæœ‰åŠ¹ã§ã‚ã‚Œã°ã€ãƒžãƒ¼ã‚¸æ¸ˆã¿ã®JSONオブジェクト文字列を返ã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**例** + +``` sql +SELECT jsonMergePatch('{"a":1}', '{"name": "joey"}', '{"name": "tom"}', '{"name": "zoey"}') AS res + +┌─res───────────────────┠+│ {"a":1,"name":"zoey"} │ +└───────────────────────┘ +``` + +### JSONAllPaths + +[JSON](../data-types/newjson.md)カラム内ã®å„è¡Œã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ãƒ‘スã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +JSONAllPaths(json) +``` + +**引数** + +- `json` — [JSON](../data-types/newjson.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- パスã®é…列。[Array(String)](../data-types/array.md)。 + +**例** + +``` sql +CREATE TABLE test (json JSON(max_dynamic_paths=1)) ENGINE = Memory; +INSERT INTO test FORMAT JSONEachRow {"json" : {"a" : 42}}, {"json" : {"b" : "Hello"}}, {"json" : {"a" : [1, 2, 3], "c" : "2020-01-01"}} +SELECT json, JSONAllPaths(json) FROM test; +``` + +```text +┌─json─────────────────────────────────┬─JSONAllPaths(json)─┠+│ {"a":"42"} │ ['a'] │ +│ {"b":"Hello"} │ ['b'] │ +│ {"a":["1","2","3"],"c":"2020-01-01"} │ ['a','c'] │ +└──────────────────────────────────────┴────────────────────┘ +``` + +### JSONAllPathsWithTypes + +[JSON](../data-types/newjson.md)カラム内ã®å„è¡Œã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ãƒ‘スã¨ãれらã®ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒžãƒƒãƒ—ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +JSONAllPathsWithTypes(json) +``` + +**引数** + +- `json` — [JSON](../data-types/newjson.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- パスã®é…列。[Map(String, String)](../data-types/array.md)。 + +**例** + +``` sql +CREATE TABLE test (json JSON(max_dynamic_paths=1)) ENGINE = Memory; +INSERT INTO test FORMAT JSONEachRow {"json" : {"a" : 42}}, {"json" : {"b" : "Hello"}}, {"json" : {"a" : [1, 2, 3], "c" : "2020-01-01"}} +SELECT json, JSONAllPathsWithTypes(json) FROM test; +``` + +```text +┌─json─────────────────────────────────┬─JSONAllPathsWithTypes(json)───────────────┠+│ {"a":"42"} │ {'a':'Int64'} │ +│ {"b":"Hello"} │ {'b':'String'} │ +│ {"a":["1","2","3"],"c":"2020-01-01"} │ {'a':'Array(Nullable(Int64))','c':'Date'} │ +└──────────────────────────────────────┴───────────────────────────────────────────┘ +``` + +### JSONDynamicPaths + +[JSON](../data-types/newjson.md)カラム内ã«åˆ¥ã€…ã®ã‚µãƒ–カラムã¨ã—ã¦æ ¼ç´ã•ã‚Œã¦ã„る動的パスã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +JSONDynamicPaths(json) +``` + +**引数** + +- `json` — [JSON](../data-types/newjson.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- パスã®é…列。[Array(String)](../data-types/array.md)。 + +**例** + +``` sql +CREATE TABLE test (json JSON(max_dynamic_paths=1)) ENGINE = Memory; +INSERT INTO test FORMAT JSONEachRow {"json" : {"a" : 42}}, {"json" : {"b" : "Hello"}}, {"json" : {"a" : [1, 2, 3], "c" : "2020-01-01"}} +SELECT json, JSONDynamicPaths(json) FROM test; +``` + +```text +┌─json─────────────────────────────────┬─JSONDynamicPaths(json)─┠+| {"a":"42"} │ ['a'] │ +│ {"b":"Hello"} │ [] │ +│ {"a":["1","2","3"],"c":"2020-01-01"} │ ['a'] │ +└──────────────────────────────────────┴────────────────────────┘ +``` + +### JSONDynamicPathsWithTypes + +[JSON](../data-types/newjson.md)カラム内ã§åˆ¥ã€…ã®ã‚µãƒ–カラムã¨ã—ã¦æ ¼ç´ã•ã‚Œã‚‹å‹•çš„パスã¨ãã®åž‹ã®ãƒžãƒƒãƒ—ã‚’å„è¡Œã«è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +JSONAllPathsWithTypes(json) +``` + +**引数** + +- `json` — [JSON](../data-types/newjson.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- パスã®é…列。[Map(String, String)](../data-types/array.md)。 + +**例** + +``` sql +CREATE TABLE test (json JSON(max_dynamic_paths=1)) ENGINE = Memory; +INSERT INTO test FORMAT JSONEachRow {"json" : {"a" : 42}}, {"json" : {"b" : "Hello"}}, {"json" : {"a" : [1, 2, 3], "c" : "2020-01-01"}} +SELECT json, JSONDynamicPathsWithTypes(json) FROM test; +``` + +```text +┌─json─────────────────────────────────┬─JSONDynamicPathsWithTypes(json)─┠+│ {"a":"42"} │ {'a':'Int64'} │ +│ {"b":"Hello"} │ {} │ +│ {"a":["1","2","3"],"c":"2020-01-01"} │ {'a':'Array(Nullable(Int64))'} │ +└──────────────────────────────────────┴─────────────────────────────────┘ +``` + +### JSONSharedDataPaths + +[JSON](../data-types/newjson.md)カラム内ã®å…±æœ‰ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã«ä¿å­˜ã•ã‚Œã¦ã„るパスã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +JSONSharedDataPaths(json) +``` + +**引数** + +- `json` — [JSON](../data-types/newjson.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- パスã®é…列。[Array(String)](../data-types/array.md)。 + +**例** + +``` sql +CREATE TABLE test (json JSON(max_dynamic_paths=1)) ENGINE = Memory; +INSERT INTO test FORMAT JSONEachRow {"json" : {"a" : 42}}, {"json" : {"b" : "Hello"}}, {"json" : {"a" : [1, 2, 3], "c" : "2020-01-01"}} +SELECT json, JSONSharedDataPaths(json) FROM test; +``` + +```text +┌─json─────────────────────────────────┬─JSONSharedDataPaths(json)─┠+│ {"a":"42"} │ [] │ +│ {"b":"Hello"} │ ['b'] │ +│ {"a":["1","2","3"],"c":"2020-01-01"} │ ['c'] │ +└──────────────────────────────────────┴───────────────────────────┘ +``` + +### JSONSharedDataPathsWithTypes + +[JSON](../data-types/newjson.md)カラム内ã§å…±æœ‰ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã«ä¿å­˜ã•ã‚Œã¦ã„るパスã¨ãã®åž‹ã®ãƒžãƒƒãƒ—ã‚’å„è¡Œã«è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +JSONSharedDataPathsWithTypes(json) +``` + +**引数** + +- `json` — [JSON](../data-types/newjson.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- パスã®é…列。[Map(String, String)](../data-types/array.md)。 + +**例** + +``` sql +CREATE TABLE test (json JSON(max_dynamic_paths=1)) ENGINE = Memory; +INSERT INTO test FORMAT JSONEachRow {"json" : {"a" : 42}}, {"json" : {"b" : "Hello"}}, {"json" : {"a" : [1, 2, 3], "c" : "2020-01-01"}} +SELECT json, JSONSharedDataPathsWithTypes(json) FROM test; +``` + +```text +┌─json─────────────────────────────────┬─JSONSharedDataPathsWithTypes(json)─┠+│ {"a":"42"} │ {} │ +│ {"b":"Hello"} │ {'b':'String'} │ +│ {"a":["1","2","3"],"c":"2020-01-01"} │ {'c':'Date'} │ +└──────────────────────────────────────┴────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/logical-functions.md b/docs/ja/sql-reference/functions/logical-functions.md new file mode 100644 index 00000000000..6cefb17a67e --- /dev/null +++ b/docs/ja/sql-reference/functions/logical-functions.md @@ -0,0 +1,193 @@ +--- +slug: /ja/sql-reference/functions/logical-functions +sidebar_position: 110 +sidebar_label: è«–ç† +--- + +# è«–ç†é–¢æ•° + +以下ã®é–¢æ•°ã¯ä»»æ„ã®æ•°å€¤åž‹ã®å¼•æ•°ã«å¯¾ã—ã¦è«–ç†æ¼”ç®—ã‚’è¡Œã„ã¾ã™ã€‚ãれら㯠[UInt8](../data-types/int-uint.md) ã¾ãŸã¯å ´åˆã«ã‚ˆã£ã¦ã¯ `NULL` ã¨ã—㦠0 ã¾ãŸã¯ 1 ã‚’è¿”ã—ã¾ã™ã€‚ + +引数ã¨ã—ã¦ã®ã‚¼ãƒ­ã¯ `false` ã¨ã¿ãªã•ã‚Œã€ã‚¼ãƒ­ä»¥å¤–ã®å€¤ã¯ `true` ã¨ã¿ãªã•ã‚Œã¾ã™ã€‚ + +## and + +二ã¤ä»¥ä¸Šã®å€¤ã®è«–ç†ç©ã‚’計算ã—ã¾ã™ã€‚ + +[short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation) を設定ã™ã‚‹ã“ã¨ã§ã€çŸ­çµ¡è©•ä¾¡ã‚’使用ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚ 有効ã«ãªã£ã¦ã„ã‚‹å ´åˆã€`val_i` 㯠`(val_1 AND val_2 AND ... AND val_{i-1})` ㌠`true` ã®å ´åˆã«ã®ã¿è©•ä¾¡ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€çŸ­çµ¡è©•ä¾¡ã‚’使用ã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒª `SELECT and(number = 2, intDiv(1, number)) FROM numbers(5)` を実行ã—ã¦ã‚‚ゼロ除算例外ã¯ç™ºç”Ÿã—ã¾ã›ã‚“。 + +**構文** + +``` sql +and(val1, val2...) +``` + +別å: [AND 演算å­](../../sql-reference/operators/index.md#logical-and-operator)。 + +**引数** + +- `val1, val2, ...` — å°‘ãªãã¨ã‚‚二ã¤ã®å€¤ã®ãƒªã‚¹ãƒˆã€‚[Int](../data-types/int-uint.md), [UInt](../data-types/int-uint.md), [Float](../data-types/float.md) ã¾ãŸã¯ [Nullable](../data-types/nullable.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å°‘ãªãã¨ã‚‚一ã¤ã®å¼•æ•°ãŒ `false` ã®å ´åˆã¯ `0`〠+- 引数ãŒå…¨ã¦ `false` ã§ãªãå°‘ãªãã¨ã‚‚一ã¤ãŒ `NULL` ã®å ´åˆã¯ `NULL`〠+- ãれ以外ã®å ´åˆã¯ `1`。 + +åž‹: [UInt8](../../sql-reference/data-types/int-uint.md) ã¾ãŸã¯ [Nullable](../../sql-reference/data-types/nullable.md)([UInt8](../../sql-reference/data-types/int-uint.md))。 + +**例** + +``` sql +SELECT and(0, 1, -2); +``` + +çµæžœ: + +``` text +┌─and(0, 1, -2)─┠+│ 0 │ +└───────────────┘ +``` + +`NULL` ã‚’å«ã‚ãŸå ´åˆ: + +``` sql +SELECT and(NULL, 1, 10, -2); +``` + +çµæžœ: + +``` text +┌─and(NULL, 1, 10, -2)─┠+│ á´ºáµá´¸á´¸ │ +└──────────────────────┘ +``` + +## or + +二ã¤ä»¥ä¸Šã®å€¤ã®è«–ç†å’Œã‚’計算ã—ã¾ã™ã€‚ + +[short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation) を設定ã™ã‚‹ã“ã¨ã§ã€çŸ­çµ¡è©•ä¾¡ã‚’使用ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚有効ã«ãªã£ã¦ã„ã‚‹å ´åˆã€`val_i` 㯠`((NOT val_1) AND (NOT val_2) AND ... AND (NOT val_{i-1}))` ㌠`true` ã®å ´åˆã«ã®ã¿è©•ä¾¡ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€çŸ­çµ¡è©•ä¾¡ã‚’使用ã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒª `SELECT or(number = 0, intDiv(1, number) != 0) FROM numbers(5)` を実行ã—ã¦ã‚‚ゼロ除算例外ã¯ç™ºç”Ÿã—ã¾ã›ã‚“。 + +**構文** + +``` sql +or(val1, val2...) +``` + +別å: [OR 演算å­](../../sql-reference/operators/index.md#logical-or-operator)。 + +**引数** + +- `val1, val2, ...` — å°‘ãªãã¨ã‚‚二ã¤ã®å€¤ã®ãƒªã‚¹ãƒˆã€‚[Int](../data-types/int-uint.md), [UInt](../data-types/int-uint.md), [Float](../data-types/float.md) ã¾ãŸã¯ [Nullable](../data-types/nullable.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å°‘ãªãã¨ã‚‚一ã¤ã®å¼•æ•°ãŒ `true` ã®å ´åˆã¯ `1`〠+- 引数ãŒå…¨ã¦ `false` ã®å ´åˆã¯ `0`〠+- 引数ãŒå…¨ã¦ `false` ã§å°‘ãªãã¨ã‚‚一ã¤ãŒ `NULL` ã®å ´åˆã¯ `NULL`。 + +åž‹: [UInt8](../../sql-reference/data-types/int-uint.md) ã¾ãŸã¯ [Nullable](../../sql-reference/data-types/nullable.md)([UInt8](../../sql-reference/data-types/int-uint.md))。 + +**例** + +``` sql +SELECT or(1, 0, 0, 2, NULL); +``` + +çµæžœ: + +``` text +┌─or(1, 0, 0, 2, NULL)─┠+│ 1 │ +└──────────────────────┘ +``` + +`NULL` ã‚’å«ã‚ãŸå ´åˆ: + +``` sql +SELECT or(0, NULL); +``` + +çµæžœ: + +``` text +┌─or(0, NULL)─┠+│ á´ºáµá´¸á´¸ │ +└─────────────┘ +``` + +## not + +値ã®è«–ç†å¦å®šã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +``` sql +not(val); +``` + +別å: [å¦å®šæ¼”ç®—å­](../../sql-reference/operators/index.md#logical-negation-operator)。 + +**引数** + +- `val` — 値。[Int](../data-types/int-uint.md), [UInt](../data-types/int-uint.md), [Float](../data-types/float.md) ã¾ãŸã¯ [Nullable](../data-types/nullable.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `val` ㌠`false` ã®å ´åˆã¯ `1`〠+- `val` ㌠`true` ã®å ´åˆã¯ `0`〠+- `val` ㌠`NULL` ã®å ´åˆã¯ `NULL`。 + +åž‹: [UInt8](../../sql-reference/data-types/int-uint.md) ã¾ãŸã¯ [Nullable](../../sql-reference/data-types/nullable.md)([UInt8](../../sql-reference/data-types/int-uint.md))。 + +**例** + +``` sql +SELECT NOT(1); +``` + +çµæžœ: + +``` test +┌─not(1)─┠+│ 0 │ +└────────┘ +``` + +## xor + +二ã¤ä»¥ä¸Šã®å€¤ã®æŽ’ä»–çš„è«–ç†å’Œã‚’計算ã—ã¾ã™ã€‚二ã¤ä»¥ä¸Šã®å…¥åŠ›å€¤ã«ã¤ã„ã¦ã¯ã€ã¾ãšæœ€åˆã®äºŒã¤ã®å€¤ã«å¯¾ã—㦠xor ã‚’è¡Œã„ã€æ¬¡ã«ãã®çµæžœã¨ä¸‰ã¤ç›®ã®å€¤ã«ã¤ã„㦠xor ã‚’è¡Œã†ã¨ã„ã†ã‚ˆã†ã«é€²ã‚ã¾ã™ã€‚ + +**構文** + +``` sql +xor(val1, val2...) +``` + +**引数** + +- `val1, val2, ...` — å°‘ãªãã¨ã‚‚二ã¤ã®å€¤ã®ãƒªã‚¹ãƒˆã€‚[Int](../data-types/int-uint.md), [UInt](../data-types/int-uint.md), [Float](../data-types/float.md) ã¾ãŸã¯ [Nullable](../data-types/nullable.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 二ã¤ã®å€¤ã«ã¤ã„ã¦ã€ä¸€æ–¹ãŒ `false` ã§ä»–方㌠`true` ã®å ´åˆã¯ `1`〠+- 二ã¤ã®å€¤ãŒã©ã¡ã‚‰ã‚‚ `false` ã¾ãŸã¯ `true` ã®å ´åˆã¯ `0`〠+- å°‘ãªãã¨ã‚‚一ã¤ã®å…¥åŠ›ãŒ `NULL` ã®å ´åˆã¯ `NULL`。 + +åž‹: [UInt8](../../sql-reference/data-types/int-uint.md) ã¾ãŸã¯ [Nullable](../../sql-reference/data-types/nullable.md)([UInt8](../../sql-reference/data-types/int-uint.md))。 + +**例** + +``` sql +SELECT xor(0, 1, 1); +``` + +çµæžœ: + +``` text +┌─xor(0, 1, 1)─┠+│ 0 │ +└──────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/machine-learning-functions.md b/docs/ja/sql-reference/functions/machine-learning-functions.md new file mode 100644 index 00000000000..e162ff989d8 --- /dev/null +++ b/docs/ja/sql-reference/functions/machine-learning-functions.md @@ -0,0 +1,19 @@ +--- +slug: /ja/sql-reference/functions/machine-learning-functions +sidebar_position: 115 +sidebar_label: 機械学習 +--- + +# 機械学習関数 + +## evalMLMethod + +フィットã—ãŸå›žå¸°ãƒ¢ãƒ‡ãƒ«ã‚’使用ã—ãŸäºˆæ¸¬ã«ã¯ã€`evalMLMethod` 関数を使用ã—ã¾ã™ã€‚`linearRegression` ã®ãƒªãƒ³ã‚¯ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## stochasticLinearRegression + +[stochasticLinearRegression](../../sql-reference/aggregate-functions/reference/stochasticlinearregression.md#agg_functions-stochasticlinearregression) 集約関数ã¯ã€ç·šå½¢ãƒ¢ãƒ‡ãƒ«ã¨å¹³å‡äºŒä¹—誤差(MSE)æ失関数を使用ã—ãŸç¢ºçŽ‡çš„勾é…é™ä¸‹æ³•ã‚’実装ã—ã¾ã™ã€‚æ–°ã—ã„データã«å¯¾ã—ã¦äºˆæ¸¬ã‚’è¡Œã†éš›ã«ã¯ `evalMLMethod` を使用ã—ã¾ã™ã€‚ + +## stochasticLogisticRegression + +[stochasticLogisticRegression](../../sql-reference/aggregate-functions/reference/stochasticlogisticregression.md#agg_functions-stochasticlogisticregression) 集約関数ã¯ã€ãƒã‚¤ãƒŠãƒªåˆ†é¡žå•é¡Œã®ãŸã‚ã®ç¢ºçŽ‡çš„勾é…é™ä¸‹æ³•ã‚’実装ã—ã¾ã™ã€‚æ–°ã—ã„データã«å¯¾ã—ã¦äºˆæ¸¬ã‚’è¡Œã†éš›ã«ã¯ `evalMLMethod` を使用ã—ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/functions/math-functions.md b/docs/ja/sql-reference/functions/math-functions.md new file mode 100644 index 00000000000..aecf75bb9e8 --- /dev/null +++ b/docs/ja/sql-reference/functions/math-functions.md @@ -0,0 +1,1011 @@ +--- +slug: /ja/sql-reference/functions/math-functions +sidebar_position: 125 +sidebar_label: 数学関数 +--- + +# 数学関数 + +## e + +$e$([オイラー数](https://en.wikipedia.org/wiki/Euler%27s_constant))を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +e() +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float64](../data-types/float.md)。 + +## pi + +$\pi$([パイ](https://en.wikipedia.org/wiki/Pi))を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +pi() +``` +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float64](../data-types/float.md)。 + +## exp + +$x$を指定ã—ãŸå¼•æ•°ã¨ã—ã¦ã€$e^{x}$ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +exp(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**例** + +クエリ: + +```sql +SELECT round(exp(-1), 4); +``` + +çµæžœ: + +```response +┌─round(exp(-1), 4)─┠+│ 0.3679 │ +└───────────────────┘ +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## log + +引数ã®è‡ªç„¶å¯¾æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +log(x) +``` + +別å: `ln(x)` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## exp2 + +指定ã—ãŸå¼•æ•°ã®2ã®ã¹ãä¹—ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +exp2(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## intExp2 + +[`exp`](#exp) ã®ã‚ˆã†ã«æŒ™å‹•ã—ã¾ã™ãŒã€UInt64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +intExp2(x) +``` + +## log2 + +引数ã®äºŒé€²å¯¾æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +log2(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## exp10 + +指定ã—ãŸå¼•æ•°ã®10ã®ã¹ãä¹—ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +exp10(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## intExp10 + +[`exp10`](#exp10) ã®ã‚ˆã†ã«æŒ™å‹•ã—ã¾ã™ãŒã€UInt64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +intExp10(x) +``` + +## log10 + +引数ã®å進対数を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +log10(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## sqrt + +引数ã®å¹³æ–¹æ ¹ã‚’è¿”ã—ã¾ã™ã€‚ + +```sql +sqrt(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## cbrt + +引数ã®ç«‹æ–¹æ ¹ã‚’è¿”ã—ã¾ã™ã€‚ + +```sql +cbrt(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## erf + +`x` ãŒéžè² ã§ã‚ã‚‹å ´åˆã€$erf(\frac{x}{\sigma\sqrt{2}})$ ã¯ã€æ¨™æº–åå·® $\sigma$ ã‚’æŒã¤æ­£è¦åˆ†å¸ƒã«ãŠã„ã¦ã€æœŸå¾…値ã‹ã‚‰ `x` を超ãˆã‚‹å€¤ã‚’å–る確率ã§ã™ã€‚ + +**構文** + +```sql +erf(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +**例** + +(3 sigma ルール) + +``` sql +SELECT erf(3 / sqrt(2)); +``` + +```result +┌─erf(divide(3, sqrt(2)))─┠+│ 0.9973002039367398 │ +└─────────────────────────┘ +``` + +## erfc + +大ã㪠`x` 値ã«å¯¾ã—ã¦ç²¾åº¦ã‚’失ã†ã“ã¨ãªã $1-erf(x)$ ã«è¿‘ã„数値を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +erfc(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## lgamma + +ガンマ関数ã®å¯¾æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +lgamma(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## tgamma + +ガンマ関数を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +gamma(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## sin + +引数ã®æ­£å¼¦ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +sin(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT sin(1.23); +``` + +```response +0.9424888019316975 +``` + +## cos + +引数ã®ä½™å¼¦ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +cos(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## tan + +引数ã®æ­£æŽ¥ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +tan(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## asin + +引数ã®é€†æ­£å¼¦ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +asin(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## acos + +引数ã®é€†ä½™å¼¦ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +acos(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## atan + +引数ã®é€†æ­£æŽ¥ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +atan(x) +``` + +**引数** + +- `x` - [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float*](../data-types/float.md)。 + +## pow + +$x^y$ ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +pow(x, y) +``` + +別å: `power(x, y)` + +**引数** + +- `x` - [(U)Int8/16/32/64](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md) +- `y` - [(U)Int8/16/32/64](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +åž‹: [Float64](../data-types/float.md)。 + +## cosh + +引数ã®[åŒæ›²ç·šä½™å¼¦](https://in.mathworks.com/help/matlab/ref/cosh.html)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +cosh(x) +``` + +**引数** + +- `x` — 角度(ラジアン)。区間ã®å€¤: $-\infty \lt x \lt +\infty$。[ (U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 区間: $1 \le cosh(x) \lt +\infty$。 + +åž‹: [Float64](../data-types/float.md#float32-float64)。 + +**例** + +``` sql +SELECT cosh(0); +``` + +çµæžœ: + +```result +┌─cosh(0)──┠+│ 1 │ +└──────────┘ +``` + +## acosh + +[inverse hyperbolic 余弦](https://www.mathworks.com/help/matlab/ref/acosh.html)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +acosh(x) +``` + +**引数** + +- `x` — 角度ã®åŒæ›²ç·šä½™å¼¦ã€‚区間ã®å€¤: $1 \le x \lt +\infty$。[ (U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 角度(ラジアン)。区間ã®å€¤: $0 \le acosh(x) \lt +\infty$。 + +åž‹: [Float64](../data-types/float.md#float32-float64)。 + +**例** + +``` sql +SELECT acosh(1); +``` + +çµæžœ: + +```result +┌─acosh(1)─┠+│ 0 │ +└──────────┘ +``` + +## sinh + +[åŒæ›²ç·šæ­£å¼¦](https://www.mathworks.com/help/matlab/ref/sinh.html)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +sinh(x) +``` + +**引数** + +- `x` — 角度(ラジアン)。区間ã®å€¤: $-\infty \lt x \lt +\infty$。[ (U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 区間ã®å€¤: $-\infty \lt sinh(x) \lt +\infty$。 + +åž‹: [Float64](../data-types/float.md#float32-float64)。 + +**例** + +``` sql +SELECT sinh(0); +``` + +çµæžœ: + +```result +┌─sinh(0)──┠+│ 0 │ +└──────────┘ +``` + +## asinh + +[逆åŒæ›²ç·šæ­£å¼¦](https://www.mathworks.com/help/matlab/ref/asinh.html)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +asinh(x) +``` + +**引数** + +- `x` — 角度ã®åŒæ›²ç·šæ­£å¼¦ã€‚区間ã®å€¤: $-\infty \lt x \lt +\infty$。[ (U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 角度(ラジアン)。区間ã®å€¤: $-\infty \lt asinh(x) \lt +\infty$。 + +åž‹: [Float64](../data-types/float.md#float32-float64)。 + +**例** + +``` sql +SELECT asinh(0); +``` + +çµæžœ: + +```result +┌─asinh(0)─┠+│ 0 │ +└──────────┘ +``` + +## tanh + +[åŒæ›²ç·šæ­£æŽ¥](https://www.mathworks.com/help/matlab/ref/tanh.html)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +tanh(x) +``` + +**引数** + +- `x` — 角度(ラジアン)。区間ã®å€¤: $-\infty \lt x \lt +\infty$。[ (U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 区間ã®å€¤: $-1 \lt tanh(x) \lt 1$。 + +åž‹: [Float*](../data-types/float.md#float32-float64)。 + +**例** + +``` sql +SELECT tanh(0); +``` + +çµæžœ: + +```result +0 +``` + +## atanh + +[逆åŒæ›²ç·šæ­£æŽ¥](https://www.mathworks.com/help/matlab/ref/atanh.html)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +atanh(x) +``` + +**引数** + +- `x` — 角度ã®åŒæ›²ç·šæ­£æŽ¥ã€‚区間ã®å€¤: $-1 \lt x \lt 1$。[ (U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 角度(ラジアン)。区間ã®å€¤: $-\infty \lt atanh(x) \lt +\infty$。 + +åž‹: [Float64](../data-types/float.md#float32-float64)。 + +**例** + +``` sql +SELECT atanh(0); +``` + +çµæžœ: + +```result +┌─atanh(0)─┠+│ 0 │ +└──────────┘ +``` + +## atan2 + +[atan2](https://en.wikipedia.org/wiki/Atan2) ã‚’ã€ãƒ¦ãƒ¼ã‚¯ãƒªãƒƒãƒ‰å¹³é¢ã«ãŠã‘る角度ã¨ã—ã¦è¿”ã—ã€ãƒ©ã‚¸ã‚¢ãƒ³ã§è¡¨ã•ã‚Œã¾ã™ãŒã€æ­£ã® x 軸ã¨ç‚¹ `(x, y) ≠ (0, 0)` ã¸ã®å…‰ç·šã¨ã®é–“ã®ã‚‚ã®ã§ã™ã€‚ + +**構文** + +``` sql +atan2(y, x) +``` + +**引数** + +- `y` — 光線ãŒé€šéŽã™ã‚‹ç‚¹ã® y 座標。 [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 +- `x` — 光線ãŒé€šéŽã™ã‚‹ç‚¹ã® x 座標。 [(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 角度 `θ` ã®å€¤ã¨ã—ã¦ã€$-\pi \lt 0 \le \pi$ ã®åŒºé–“ã§ã€ãƒ©ã‚¸ã‚¢ãƒ³ã§è¡¨ã•ã‚Œã¾ã™ã€‚ + +åž‹: [Float64](../data-types/float.md#float32-float64)。 + +**例** + +``` sql +SELECT atan2(1, 1); +``` + +çµæžœ: + +```result +┌────────atan2(1, 1)─┠+│ 0.7853981633974483 │ +└────────────────────┘ +``` + +## hypot + +直角三角形ã®æ–œè¾ºã®é•·ã•ã‚’è¿”ã—ã¾ã™ã€‚[Hypot](https://en.wikipedia.org/wiki/Hypot) ã¯éžå¸¸ã«å¤§ããªæ•°ã‚„éžå¸¸ã«å°ã•ãªæ•°ã‚’平方ã™ã‚‹éš›ã®å•é¡Œã‚’回é¿ã—ã¾ã™ã€‚ + +**構文** + +``` sql +hypot(x, y) +``` + +**引数** + +- `x` — 直角三角形ã®ä¸€ã¤ã®ã‚«ãƒ†ãƒ¼ãƒˆã€‚[(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 +- `y` — 直角三角形ã®ã‚‚ã†ä¸€ã¤ã®ã‚«ãƒ†ãƒ¼ãƒˆã€‚[(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 直角三角形ã®æ–œè¾ºã®é•·ã•ã€‚ + +åž‹: [Float64](../data-types/float.md#float32-float64)。 + +**例** + +``` sql +SELECT hypot(1, 1); +``` + +çµæžœ: + +```result +┌────────hypot(1, 1)─┠+│ 1.4142135623730951 │ +└────────────────────┘ +``` + +## log1p + +`log(1+x)` を計算ã—ã¾ã™ã€‚ [計算](https://en.wikipedia.org/wiki/Natural_logarithm#lnp1) `log1p(x)` ã¯ã€å°ã•ãªå€¤ã® x ã«å¯¾ã—㦠`log(1+x)` よりも精度ãŒé«˜ã„ã§ã™ã€‚ + +**構文** + +``` sql +log1p(x) +``` + +**引数** + +- `x` — 値ã®ç¯„囲: $-1 \lt x \lt +\infty$。[(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md) ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 値ã®ç¯„囲: $-\infty < log1p(x) \lt +\infty$。 + +åž‹: [Float64](../data-types/float.md#float32-float64)。 + +**例** + +``` sql +SELECT log1p(0); +``` + +çµæžœ: + +```result +┌─log1p(0)─┠+│ 0 │ +└──────────┘ +``` + +## sign + +実数ã®ç¬¦å·ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +sign(x) +``` + +**引数** + +- `x` — 値㯠$-\infty$ ã‹ã‚‰ $+\infty$ ã¾ã§ã€‚ClickHouse ã®ã™ã¹ã¦ã®æ•°å€¤åž‹ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x < 0` ã®å ´åˆã¯ -1 +- `x = 0` ã®å ´åˆã¯ 0 +- `x > 0` ã®å ´åˆã¯ 1 + +åž‹: [Int8](../data-types/int-uint.md)。 + +**例** + +ゼロ値ã®ç¬¦å·: + +``` sql +SELECT sign(0); +``` + +çµæžœ: + +```result +┌─sign(0)─┠+│ 0 │ +└─────────┘ +``` + +æ­£ã®å€¤ã®ç¬¦å·: + +``` sql +SELECT sign(1); +``` + +çµæžœ: + +```result +┌─sign(1)─┠+│ 1 │ +└─────────┘ +``` + +è² ã®å€¤ã®ç¬¦å·: + +``` sql +SELECT sign(-1); +``` + +çµæžœ: + +```result +┌─sign(-1)─┠+│ -1 │ +└──────────┘ +``` + +## sigmoid + +[sigmoid 関数](https://en.wikipedia.org/wiki/Sigmoid_function)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +sigmoid(x) +``` + +**パラメータ** + +- `x` — 入力値。範囲㯠$-\infty \lt x \lt +\infty$。[(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md), ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 0ã‹ã‚‰1ã®é–“ã® sigmoid 曲線ã«æ²¿ã£ãŸå¯¾å¿œã™ã‚‹å€¤ã€‚[Float64](../data-types/float.md)。 + +**例** + +クエリ: + +``` sql +SELECT round(sigmoid(x), 5) FROM (SELECT arrayJoin([-1, 0, 1]) AS x); +``` + +çµæžœ: + +```result +0.26894 +0.5 +0.73106 +``` + +## degrees + +ラジアンを度ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +degrees(x) +``` + +**引数** + +- `x` — 入力値(ラジアン)。[(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md), ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 +- `x` — 入力値(ラジアン)。[(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md), ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 度ã§è¡¨ã•ã‚ŒãŸå€¤ã€‚[Float64](../data-types/float.md#float32-float64)。 + +**例** + +``` sql +SELECT degrees(3.141592653589793); +``` + +çµæžœ: + +```result +┌─degrees(3.141592653589793)─┠+│ 180 │ +└────────────────────────────┘ +``` + +## radians + +度をラジアンã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +radians(x) +``` + +**引数** + +- `x` — 入力値(度)。[(U)Int*](../data-types/int-uint.md), [Float*](../data-types/float.md), ã¾ãŸã¯ [Decimal*](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ラジアンã§è¡¨ã•ã‚ŒãŸå€¤ã€‚ + +åž‹: [Float64](../data-types/float.md#float32-float64)。 + +**例** + +``` sql +SELECT radians(180); +``` + +çµæžœ: + +```result +┌──────radians(180)─┠+│ 3.141592653589793 │ +└───────────────────┘ +``` + +## factorial + +整数値ã®éšŽä¹—を計算ã—ã¾ã™ã€‚UInt(8|16|32|64) ãŠã‚ˆã³ Int(8|16|32|64) ã‚’å«ã‚€ä»»æ„ã®ãƒã‚¤ãƒ†ã‚£ãƒ–æ•´æ•°åž‹ã§å‹•ä½œã—ã¾ã™ã€‚戻りã®åž‹ã¯ UInt64 ã§ã™ã€‚ + +0 ã®éšŽä¹—㯠1 ã§ã™ã€‚åŒæ§˜ã«ã€`factorial()` 関数ã¯ä»»æ„ã®è² ã®å€¤ã«å¯¾ã—㦠1 ã‚’è¿”ã—ã¾ã™ã€‚入力引数ã®æœ€å¤§æ­£ã®å€¤ã¯ 20 ã§ã€21 以上ã®å€¤ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +``` sql +factorial(n) +``` + +**例** + +``` sql +SELECT factorial(10); +``` + +çµæžœ: + +```result +┌─factorial(10)─┠+│ 3628800 │ +└───────────────┘ +``` + +## width_bucket + +ヒストグラムã«ãŠã„ã¦ã€`operand` ㌠`low` ã‹ã‚‰ `high` ã¾ã§ã®ç¯„囲ã«åˆ†å‰²ã•ã‚ŒãŸ `count` 等幅ã®ãƒã‚±ãƒƒãƒˆã®ã†ã¡ã€ã©ã®ãƒã‚±ãƒƒãƒˆã«å±žã™ã‚‹ã‹ã‚’è¿”ã—ã¾ã™ã€‚`operand < low` ã®å ´åˆã¯ `0` ã‚’è¿”ã—ã€`operand >= high` ã®å ´åˆã¯ `count+1` ã‚’è¿”ã—ã¾ã™ã€‚ + +`operand`ã€`low`ã€`high` ã¯ä»»æ„ã®ãƒã‚¤ãƒ†ã‚£ãƒ–数値型ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `count` ã¯ç¬¦å·ãªã—ã®ãƒã‚¤ãƒ†ã‚£ãƒ–æ•´æ•°åž‹ã«ã™ã‚‹ã“ã¨ãŒã§ãã€ãã®å€¤ã¯ã‚¼ãƒ­ã§ã‚ã£ã¦ã¯ãªã‚Šã¾ã›ã‚“。 + +**構文** + +```sql +widthBucket(operand, low, high, count) +``` +別å: `WIDTH_BUCKET` + +**例** + +``` sql +SELECT widthBucket(10.15, -8.6, 23, 18); +``` + +çµæžœ: + +```result +┌─widthBucket(10.15, -8.6, 23, 18)─┠+│ 11 │ +└──────────────────────────────────┘ +``` + +## proportionsZTest + +二ã¤ã®æ¯é›†å›£ `x` 㨠`y` ã®æ¯”率を比較ã™ã‚‹ãŸã‚ã®çµ±è¨ˆçš„検定ã§ã‚ã‚‹2比率Z検定ã®çµ±è¨ˆé‡ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +proportionsZTest(successes_x, successes_y, trials_x, trials_y, conf_level, pool_type) +``` + +**引数** + +- `successes_x`: æ¯é›†å›£ `x` ã«ãŠã‘ã‚‹æˆåŠŸã®æ•°ã€‚ [UInt64](../data-types/int-uint.md)。 +- `successes_y`: æ¯é›†å›£ `y` ã«ãŠã‘ã‚‹æˆåŠŸã®æ•°ã€‚ [UInt64](../data-types/int-uint.md)。 +- `trials_x`: æ¯é›†å›£ `x` ã«ãŠã‘る試行ã®æ•°ã€‚ [UInt64](../data-types/int-uint.md)。 +- `trials_y`: æ¯é›†å›£ `y` ã«ãŠã‘る試行ã®æ•°ã€‚ [UInt64](../data-types/int-uint.md)。 +- `conf_level`: 検定ã«ãŠã‘る信頼水準。 [Float64](../data-types/float.md)。 +- `pool_type`: プール方å¼ï¼ˆæ¨™æº–誤差ã®æŽ¨å®šæ–¹å¼ï¼‰ã€‚`unpooled` ã¾ãŸã¯ `pooled` ã®ã„ãšã‚Œã‹ã€‚ [String](../data-types/string.md)。 + +:::note +引数 `pool_type` ã«é–¢ã—ã¦: プールã•ã‚ŒãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ã€2ã¤ã®æ¯”率ãŒå¹³å‡ã•ã‚Œã€1ã¤ã®æ¯”率ã ã‘ãŒæ¨™æº–誤差を推定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚プールã•ã‚Œã¦ã„ãªã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ã€2ã¤ã®æ¯”率ãŒåˆ¥ã€…ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `z_stat`: Z 統計é‡ã€‚ [Float64](../data-types/float.md)。 +- `p_val`: P 値。 [Float64](../data-types/float.md)。 +- `ci_low`: 下å´ã®ä¿¡é ¼åŒºé–“。 [Float64](../data-types/float.md)。 +- `ci_high`: 上å´ã®ä¿¡é ¼åŒºé–“。 [Float64](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT proportionsZTest(10, 11, 100, 101, 0.95, 'unpooled'); +``` + +çµæžœ: + +```response +┌─proportionsZTest(10, 11, 100, 101, 0.95, 'unpooled')───────────────────────────────┠+│ (-0.20656724435948853,0.8363478437079654,-0.09345975390115283,0.07563797172293502) │ +└────────────────────────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/nlp-functions.md b/docs/ja/sql-reference/functions/nlp-functions.md new file mode 100644 index 00000000000..4267653375c --- /dev/null +++ b/docs/ja/sql-reference/functions/nlp-functions.md @@ -0,0 +1,393 @@ +--- +slug: /ja/sql-reference/functions/nlp-functions +sidebar_position: 130 +sidebar_label: NLP (エクスペリメンタル) +--- + +# è‡ªç„¶è¨€èªžå‡¦ç† (NLP) 関数 + +:::warning +ã“ã‚Œã¯ç¾åœ¨é–‹ç™ºä¸­ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã§ã‚ã‚Šã€ä¸€èˆ¬çš„ãªåˆ©ç”¨ã«ã¯ã¾ã æº–å‚™ãŒæ•´ã£ã¦ã„ã¾ã›ã‚“。将æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§ã¯äºˆæ¸¬ä¸å¯èƒ½ãªäº’æ›æ€§ã®ãªã„変更ãŒè¡Œã‚れるã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚有効ã«ã™ã‚‹ã«ã¯ `allow_experimental_nlp_functions = 1` を設定ã—ã¦ãã ã•ã„。 +::: + +## detectCharset + +`detectCharset` 関数ã¯éžUTF8エンコードã®å…¥åŠ›æ–‡å­—列ã®æ–‡å­—セットを検出ã—ã¾ã™ã€‚ + +*構文* + +``` sql +detectCharset('text_to_be_analyzed') +``` + +*引数* + +- `text_to_be_analyzed` — 分æžã™ã‚‹æ–‡å­—列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ï¼ˆã¾ãŸã¯æ–‡ï¼‰ã€‚[String](../data-types/string.md#string). + +*è¿”ã•ã‚Œã‚‹å€¤* + +- 検出ã•ã‚ŒãŸæ–‡å­—セットã®ã‚³ãƒ¼ãƒ‰ã‚’å«ã‚€ `String` + +*例* + +クエリ: + +```sql +SELECT detectCharset('Ich bleibe für ein paar Tage.'); +``` + +çµæžœ: + +```response +┌─detectCharset('Ich bleibe für ein paar Tage.')─┠+│ WINDOWS-1252 │ +└────────────────────────────────────────────────┘ +``` + +## detectLanguage + +UTF8エンコードã•ã‚ŒãŸå…¥åŠ›æ–‡å­—列ã®è¨€èªžã‚’検出ã—ã¾ã™ã€‚関数ã¯æ¤œå‡ºã«[CLD2ライブラリ](https://github.com/CLD2Owners/cld2)を使用ã—ã€2文字ã®ISO言語コードを返ã—ã¾ã™ã€‚ + +`detectLanguage` 関数ã¯ã€å…¥åŠ›æ–‡å­—列内ã«200文字以上をæä¾›ã™ã‚‹ã¨æœ€é©ã«å‹•ä½œã—ã¾ã™ã€‚ + +*構文* + +``` sql +detectLanguage('text_to_be_analyzed') +``` + +*引数* + +- `text_to_be_analyzed` — 分æžã™ã‚‹æ–‡å­—列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ï¼ˆã¾ãŸã¯æ–‡ï¼‰ã€‚[String](../data-types/string.md#string). + +*è¿”ã•ã‚Œã‚‹å€¤* + +- 検出ã•ã‚ŒãŸè¨€èªžã®2文字ã®ISOコード + +ãã®ä»–ã®å¯èƒ½ãªçµæžœ: + +- `un` = ä¸æ˜Žã€è¨€èªžã‚’検出ã§ããªã„。 +- `other` = 検出ã•ã‚ŒãŸè¨€èªžã«2文字ã®ã‚³ãƒ¼ãƒ‰ãŒãªã„。 + +*例* + +クエリ: + +```sql +SELECT detectLanguage('Je pense que je ne parviendrai jamais à parler français comme un natif. Where there’s a will, there’s a way.'); +``` + +çµæžœ: + +```response +fr +``` + +## detectLanguageMixed + +`detectLanguage` 関数ã«ä¼¼ã¦ã„ã¾ã™ãŒã€`detectLanguageMixed` ã¯ç‰¹å®šã®è¨€èªžã®å‰²åˆãŒãƒ†ã‚­ã‚¹ãƒˆå†…ã§ã©ã‚Œã ã‘存在ã™ã‚‹ã‹ã‚’示ã™2文字ã®è¨€èªžã‚³ãƒ¼ãƒ‰ã® `Map` ã‚’è¿”ã—ã¾ã™ã€‚ + +*構文* + +``` sql +detectLanguageMixed('text_to_be_analyzed') +``` + +*引数* + +- `text_to_be_analyzed` — 分æžã™ã‚‹æ–‡å­—列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ï¼ˆã¾ãŸã¯æ–‡ï¼‰ã€‚[String](../data-types/string.md#string). + +*è¿”ã•ã‚Œã‚‹å€¤* + +- `Map(String, Float32)`: キーãŒ2文字ã®ISOコードã§ã€å€¤ãŒãã®è¨€èªžã®ãƒ†ã‚­ã‚¹ãƒˆå†…ã®å‰²åˆ + +*例* + +クエリ: + +```sql +SELECT detectLanguageMixed('二兎を追ã†è€…ã¯ä¸€å…Žã‚’ã‚‚å¾—ãšäºŒå…Žã‚’追ã†è€…ã¯ä¸€å…Žã‚’ã‚‚å¾—ãš A vaincre sans peril, on triomphe sans gloire.'); +``` + +çµæžœ: + +```response +┌─detectLanguageMixed()─┠+│ {'ja':0.62,'fr':0.36 │ +└───────────────────────┘ +``` + +## detectProgrammingLanguage + +ソースコードã‹ã‚‰ãƒ—ログラミング言語を判別ã—ã¾ã™ã€‚ソースコード内ã®ã‚³ãƒžãƒ³ãƒ‰ã®ãƒ¦ãƒ‹ã‚°ãƒ©ãƒ ã¨ãƒã‚¤ã‚°ãƒ©ãƒ ã‚’ã™ã¹ã¦è¨ˆç®—ã—ã¾ã™ã€‚ãã®å¾Œã€ã•ã¾ã–ã¾ãªãƒ—ログラミング言語ã®ã‚³ãƒžãƒ³ãƒ‰ã®ãƒ¦ãƒ‹ã‚°ãƒ©ãƒ ã¨ãƒã‚¤ã‚°ãƒ©ãƒ ã®é‡ã¿ã‚’æŒã¤ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã•ã‚ŒãŸDictionaryを使用ã—ã¦ã€æœ€ã‚‚é‡ã¿ã®ã‚るプログラミング言語を見ã¤ã‘ã¦è¿”ã—ã¾ã™ã€‚ + +*構文* + +``` sql +detectProgrammingLanguage('source_code') +``` + +*引数* + +- `source_code` — 分æžã™ã‚‹ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md#string). + +*è¿”ã•ã‚Œã‚‹å€¤* + +- プログラミング言語。[String](../data-types/string.md). + +*例* + +クエリ: + +```sql +SELECT detectProgrammingLanguage('#include '); +``` + +çµæžœ: + +```response +┌─detectProgrammingLanguage('#include ')─┠+│ C++ │ +└──────────────────────────────────────────────────┘ +``` + +## detectLanguageUnknown + +`detectLanguage` 関数ã«ä¼¼ã¦ã„ã¾ã™ãŒã€`detectLanguageUnknown` 関数ã¯éžUTF8エンコードã®æ–‡å­—列ã§å‹•ä½œã—ã¾ã™ã€‚文字セットãŒUTF-16ã¾ãŸã¯UTF-32ã®å ´åˆã€ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¦ãã ã•ã„。 + +*構文* + +``` sql +detectLanguageUnknown('text_to_be_analyzed') +``` + +*引数* + +- `text_to_be_analyzed` — 分æžã™ã‚‹æ–‡å­—列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ï¼ˆã¾ãŸã¯æ–‡ï¼‰ã€‚[String](../data-types/string.md#string). + +*è¿”ã•ã‚Œã‚‹å€¤* + +- 検出ã•ã‚ŒãŸè¨€èªžã®2文字ã®ISOコード + +ãã®ä»–ã®å¯èƒ½ãªçµæžœ: + +- `un` = ä¸æ˜Žã€è¨€èªžã‚’検出ã§ããªã„。 +- `other` = 検出ã•ã‚ŒãŸè¨€èªžã«2文字ã®ã‚³ãƒ¼ãƒ‰ãŒãªã„。 + +*例* + +クエリ: + +```sql +SELECT detectLanguageUnknown('Ich bleibe für ein paar Tage.'); +``` + +çµæžœ: + +```response +┌─detectLanguageUnknown('Ich bleibe für ein paar Tage.')─┠+│ de │ +└────────────────────────────────────────────────────────┘ +``` + +## detectTonality + +テキストデータã®æ„Ÿæƒ…を判定ã—ã¾ã™ã€‚マークアップã•ã‚ŒãŸæ„Ÿæƒ…Dictionaryを使用ã—ã€å„å˜èªžã«ã¯ `-12` ã‹ã‚‰ `6` ã¾ã§ã®ãƒˆãƒŠãƒªãƒ†ã‚£ãŒã‚ã‚Šã¾ã™ã€‚å„テキストã«ã¤ã„ã¦ã€ãã®å˜èªžã®å¹³å‡æ„Ÿæƒ…値を計算ã—ã€ç¯„囲 `[-1,1]` ã§ãれを返ã—ã¾ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ã¯ç¾æ®µéšŽã§ã¯åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚ç¾åœ¨ã¯ `/contrib/nlp-data/tonality_ru.zst` ã«åŸ‹ã‚è¾¼ã¾ã‚ŒãŸæ„Ÿæƒ…Dictionaryを使用ã—ã€ãƒ­ã‚·ã‚¢èªžã®ã¿ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ +::: + +*構文* + +``` sql +detectTonality(text) +``` + +*引数* + +- `text` — 分æžã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆã€‚[String](../data-types/string.md#string). + +*è¿”ã•ã‚Œã‚‹å€¤* + +- `text` 内ã®å˜èªžã®å¹³å‡æ„Ÿæƒ…値。[Float32](../data-types/float.md). + +*例* + +クエリ: + +```sql +SELECT detectTonality('Шарик - хороший пёÑ'), -- シャリクã¯è‰¯ã„犬ã§ã™ + detectTonality('Шарик - пёÑ'), -- シャリクã¯çŠ¬ã§ã™ + detectTonality('Шарик - плохой пёÑ'); -- シャリクã¯æ‚ªã„犬ã§ã™ +``` + +çµæžœ: + +```response +┌─detectTonality('Шарик - хороший пёÑ')─┬─detectTonality('Шарик - пёÑ')─┬─detectTonality('Шарик - плохой пёÑ')─┠+│ 0.44445 │ 0 │ -0.3 │ +└───────────────────────────────────────┴───────────────────────────────┴──────────────────────────────────────┘ +``` +## lemmatize + +与ãˆã‚‰ã‚ŒãŸå˜èªžã®ãƒ¬ãƒ³ãƒžã‚¿ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‚’è¡Œã„ã¾ã™ã€‚動作ã«ã¯DictionariesãŒå¿…è¦ã§ã‚ã‚Šã€[ã“ã¡ã‚‰](https://github.com/vpodpecan/lemmagen3/tree/master/src/lemmagen3/models)ã‹ã‚‰å…¥æ‰‹ã§ãã¾ã™ã€‚ + +*構文* + +``` sql +lemmatize('language', word) +``` + +*引数* + +- `language` — é©ç”¨ã™ã‚‹ãƒ«ãƒ¼ãƒ«ã®è¨€èªžã€‚[String](../data-types/string.md#string). +- `word` — レンマ化ã™ã‚‹å¿…è¦ã®ã‚ã‚‹å˜èªžã€‚å°æ–‡å­—ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚[String](../data-types/string.md#string). + +*例* + +クエリ: + +``` sql +SELECT lemmatize('en', 'wolves'); +``` + +çµæžœ: + +``` text +┌─lemmatize("wolves")─┠+│ "wolf" │ +└─────────────────────┘ +``` + +*設定* + +ã“ã®è¨­å®šã¯ã€è‹±èªžï¼ˆ`en`)ã®å˜èªžã®ãƒ¬ãƒ³ãƒžã‚¿ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã« `en.bin` ã®Dictionaryを使用ã™ã‚‹ã“ã¨ã‚’指定ã—ã¾ã™ã€‚ `.bin` ファイルã¯[ã“ã¡ã‚‰](https://github.com/vpodpecan/lemmagen3/tree/master/src/lemmagen3/models)ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ã€‚ + +``` xml + + + + en + en.bin + + + +``` + +## stem + +与ãˆã‚‰ã‚ŒãŸå˜èªžã®ã‚¹ãƒ†ãƒŸãƒ³ã‚°ã‚’è¡Œã„ã¾ã™ã€‚ + +*構文* + +``` sql +stem('language', word) +``` + +*引数* + +- `language` — é©ç”¨ã™ã‚‹ãƒ«ãƒ¼ãƒ«ã®è¨€èªžã€‚2文字ã®[ISO 639-1コード](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)を使用ã—ã¾ã™ã€‚ +- `word` — ステミングã™ã‚‹å¿…è¦ã®ã‚ã‚‹å˜èªžã€‚å°æ–‡å­—ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚[String](../data-types/string.md#string). + +*例* + +クエリ: + +``` sql +SELECT arrayMap(x -> stem('en', x), ['I', 'think', 'it', 'is', 'a', 'blessing', 'in', 'disguise']) as res; +``` + +çµæžœ: + +``` text +┌─res────────────────────────────────────────────────┠+│ ['I','think','it','is','a','bless','in','disguis'] │ +└────────────────────────────────────────────────────┘ +``` +*stem()ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る言語* + +:::note +stem() 関数㯠[Snowballステミング](https://snowballstem.org/) ライブラリを使用ã—ã¾ã™ã€‚最新ã®è¨€èªžæƒ…å ±ãªã©ã¯Snowballã®ã‚¦ã‚§ãƒ–サイトをå‚ç…§ã—ã¦ãã ã•ã„。 +::: + +- アラビア語 +- アルメニア語 +- ãƒã‚¹ã‚¯èªž +- カタルーニャ語 +- デンマーク語 +- オランダ語 +- 英語 +- フィンランド語 +- フランス語 +- ドイツ語 +- ギリシャ語 +- ヒンディー語 +- ãƒãƒ³ã‚¬ãƒªãƒ¼èªž +- インドãƒã‚·ã‚¢èªž +- アイルランド語 +- イタリア語 +- リトアニア語 +- ãƒãƒ‘ール語 +- ノルウェー語 +- ãƒãƒ¼ã‚¿ãƒ¼ +- ãƒãƒ«ãƒˆã‚¬ãƒ«èªž +- ルーマニア語 +- ロシア語 +- セルビア語 +- スペイン語 +- スウェーデン語 +- タミル語 +- トルコ語 +- イディッシュ語 + +## synonyms + +指定ã•ã‚ŒãŸå˜èªžã®åŒç¾©èªžã‚’見ã¤ã‘ã¾ã™ã€‚`plain` 㨠`wordnet` ã®2種類ã®åŒç¾©èªžæ‹¡å¼µãŒã‚ã‚Šã¾ã™ã€‚ + +`plain` 拡張タイプã§ã¯ã€ã‚·ãƒ³ãƒ—ルãªãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘スをæä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®å„è¡Œã¯ç‰¹å®šã®åŒç¾©èªžã‚»ãƒƒãƒˆã«å¯¾å¿œã—ã€ãã®è¡Œå†…ã®å˜èªžã¯ã‚¹ãƒšãƒ¼ã‚¹ã¾ãŸã¯ã‚¿ãƒ–文字ã§åŒºåˆ‡ã‚‰ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +`wordnet` 拡張タイプã§ã¯ã€WordNetシソーラスãŒå«ã¾ã‚Œã¦ã„るディレクトリã¸ã®ãƒ‘スをæä¾›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚シソーラスã«ã¯WordNetã®ã‚»ãƒ³ã‚¹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒå«ã¾ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +*構文* + +``` sql +synonyms('extension_name', word) +``` + +*引数* + +- `extension_name` — 検索ãŒå®Ÿè¡Œã•ã‚Œã‚‹æ‹¡å¼µå­ã®åå‰ã€‚[String](../data-types/string.md#string). +- `word` — æ‹¡å¼µå­å†…ã§æ¤œç´¢ã•ã‚Œã‚‹å˜èªžã€‚[String](../data-types/string.md#string). + +*例* + +クエリ: + +``` sql +SELECT synonyms('list', 'important'); +``` + +çµæžœ: + +``` text +┌─synonyms('list', 'important')────────────┠+│ ['important','big','critical','crucial'] │ +└──────────────────────────────────────────┘ +``` + +*設定* +``` xml + + + en + plain + en.txt + + + en + wordnet + en/ + + +``` diff --git a/docs/ja/sql-reference/functions/other-functions.md b/docs/ja/sql-reference/functions/other-functions.md new file mode 100644 index 00000000000..0d45b77e387 --- /dev/null +++ b/docs/ja/sql-reference/functions/other-functions.md @@ -0,0 +1,4423 @@ +--- +slug: /ja/sql-reference/functions/other-functions +sidebar_position: 140 +sidebar_label: Other +--- + +# ãã®ä»–ã®é–¢æ•° + +## hostName + +ã“ã®é–¢æ•°ãŒå®Ÿè¡Œã•ã‚ŒãŸãƒ›ã‚¹ãƒˆåã‚’è¿”ã—ã¾ã™ã€‚関数ãŒãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã‚‹å ´åˆï¼ˆåˆ†æ•£å‡¦ç†ï¼‰ã«ã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã®åå‰ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +関数ãŒåˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å®Ÿè¡Œã•ã‚ŒãŸå ´åˆã€å„シャードã«é–¢é€£ã™ã‚‹å€¤ã‚’æŒã¤é€šå¸¸ã®ã‚«ãƒ©ãƒ ã‚’生æˆã—ã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã¯å®šæ•°å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +hostName() +``` + +**戻り値** + +- ホストå。[String](../data-types/string.md)。 + +## getMacro {#getMacro} + +サーãƒãƒ¼æ§‹æˆã®[マクロ](../../operations/server-configuration-parameters/settings.md#macros)セクションã‹ã‚‰åå‰ä»˜ãã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +getMacro(name); +``` + +**引数** + +- `name` — ``セクションã‹ã‚‰å–å¾—ã™ã‚‹ãƒžã‚¯ãƒ­å。[String](../data-types/string.md#string)。 + +**戻り値** + +- 指定ã•ã‚ŒãŸãƒžã‚¯ãƒ­ã®å€¤ã€‚[String](../data-types/string.md)。 + +**例** + +サーãƒãƒ¼æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«å†…ã®``セクションã®ä¾‹ï¼š + +```xml + + Value + +``` + +クエリ: + +```sql +SELECT getMacro('test'); +``` + +çµæžœï¼š + +```text +┌─getMacro('test')─┠+│ Value │ +└──────────────────┘ +``` + +åŒã˜å€¤ã‚’以下ã®ã‚¯ã‚¨ãƒªã§ã‚‚å–å¾—ã§ãã¾ã™ï¼š + +```sql +SELECT * FROM system.macros +WHERE macro = 'test'; +``` + +```text +┌─macro─┬─substitution─┠+│ test │ Value │ +└───────┴──────────────┘ +``` + +## fqdn + +ClickHouseサーãƒãƒ¼ã®å®Œå…¨ä¿®é£¾ãƒ‰ãƒ¡ã‚¤ãƒ³åã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +fqdn(); +``` + +別å: `fullHostName`, `FQDN`. + +**戻り値** + +- 完全修飾ドメインåã®æ–‡å­—列。[String](../data-types/string.md)。 + +**例** + +```sql +SELECT FQDN(); +``` + +çµæžœï¼š + +```text +┌─FQDN()──────────────────────────┠+│ clickhouse.ru-central1.internal │ +└─────────────────────────────────┘ +``` + +## basename + +文字列ã®æœ€å¾Œã®ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã¾ãŸã¯ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã®å¾Œã‚ã®éƒ¨åˆ†ã‚’抽出ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯é€šå¸¸ã€ãƒ‘スã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«åを抽出ã™ã‚‹ã®ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +```sql +basename(expr) +``` + +**引数** + +- `expr` — [String](../data-types/string.md)åž‹ã®å€¤ã€‚ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã¯ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**戻り値** + +入力文字列ã®æœ€å¾Œã®ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã¾ãŸã¯ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã®å¾Œã®éƒ¨åˆ†ã‚’å«ã‚€æ–‡å­—列。入力文字列ãŒã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã¾ãŸã¯ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã§çµ‚ã‚ã£ã¦ã„ã‚‹å ´åˆï¼ˆä¾‹ï¼š`/`ã‚„`c:\`)ã€é–¢æ•°ã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚スラッシュやãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒãªã„å ´åˆã¯å…ƒã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT 'some/long/path/to/file' AS a, basename(a) +``` + +çµæžœï¼š + +```text +┌─a──────────────────────┬─basename('some\\long\\path\\to\\file')─┠+│ some\long\path\to\file │ file │ +└────────────────────────┴────────────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT 'some\\long\\path\\to\\file' AS a, basename(a) +``` + +çµæžœï¼š + +```text +┌─a──────────────────────┬─basename('some\\long\\path\\to\\file')─┠+│ some\long\path\to\file │ file │ +└────────────────────────┴────────────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT 'some-file-name' AS a, basename(a) +``` + +çµæžœï¼š + +```text +┌─a──────────────┬─basename('some-file-name')─┠+│ some-file-name │ some-file-name │ +└────────────────┴────────────────────────────┘ +``` + +## visibleWidth + +テキスト形å¼ï¼ˆã‚¿ãƒ–区切り)ã§å€¤ã‚’コンソールã«å‡ºåŠ›ã™ã‚‹ã¨ãã®å¹…ã‚’ãŠãŠã‚ˆã計算ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã‚·ã‚¹ãƒ†ãƒ ã«ã‚ˆã£ã¦[Prettyフォーマット](../../interfaces/formats.md)を実装ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +`NULL`ã¯`Pretty`フォーマットã§ã®`NULL`ã«å¯¾å¿œã™ã‚‹æ–‡å­—列ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +visibleWidth(x) +``` + +**例** + +クエリ: + +```sql +SELECT visibleWidth(NULL) +``` + +çµæžœï¼š + +```text +┌─visibleWidth(NULL)─┠+│ 4 │ +└────────────────────┘ +``` + +## toTypeName + +渡ã•ã‚ŒãŸå¼•æ•°ã®åž‹åã‚’è¿”ã—ã¾ã™ã€‚ + +`NULL`ãŒæ¸¡ã•ã‚ŒãŸå ´åˆã€é–¢æ•°ã¯ClickHouseã®å†…部`NULL`表ç¾ã«å¯¾å¿œã™ã‚‹`Nullable(Nothing)`åž‹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toTypeName(value) +``` + +**引数** + +- `value` — ä»»æ„ã®åž‹ã®å€¤ã€‚ + +**戻り値** + +- 入力値ã®ãƒ‡ãƒ¼ã‚¿åž‹å。[String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT toTypeName(123); +``` + +çµæžœï¼š + +```response +┌─toTypeName(123)─┠+│ UInt8 │ +└─────────────────┘ +``` + +## blockSize {#blockSize} + +ClickHouseã§ã¯ã€[ブロック](../../development/architecture.md/#block-block)(ãƒãƒ£ãƒ³ã‚¯ï¼‰ã§ã‚¯ã‚¨ãƒªãŒå‡¦ç†ã•ã‚Œã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€é–¢æ•°ãŒå‘¼ã³å‡ºã•ã‚ŒãŸãƒ–ロックã®ã‚µã‚¤ã‚ºï¼ˆè¡Œæ•°ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +blockSize() +``` + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test; +CREATE TABLE test (n UInt8) ENGINE = Memory; + +INSERT INTO test +SELECT * FROM system.numbers LIMIT 5; + +SELECT blockSize() +FROM test; +``` + +çµæžœï¼š + +```response + ┌─blockSize()─┠+1. │ 5 │ +2. │ 5 │ +3. │ 5 │ +4. │ 5 │ +5. │ 5 │ + └─────────────┘ +``` + +## byteSize + +引数ã®éžåœ§ç¸®ãƒã‚¤ãƒˆã‚µã‚¤ã‚ºã®æŽ¨å®šå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +byteSize(argument [, ...]) +``` + +**引数** + +- `argument` — 値。 + +**戻り値** + +- メモリ内ã®å¼•æ•°ã®ãƒã‚¤ãƒˆã‚µã‚¤ã‚ºã®æŽ¨å®šå€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +[String](../data-types/string.md)引数ã®å ´åˆã€é–¢æ•°ã¯æ–‡å­—列ã®é•·ã•+9(終了ゼロ+é•·ã•ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT byteSize('string'); +``` + +çµæžœï¼š + +```text +┌─byteSize('string')─┠+│ 15 │ +└────────────────────┘ +``` + +クエリ: + +```sql +CREATE TABLE test +( + `key` Int32, + `u8` UInt8, + `u16` UInt16, + `u32` UInt32, + `u64` UInt64, + `i8` Int8, + `i16` Int16, + `i32` Int32, + `i64` Int64, + `f32` Float32, + `f64` Float64 +) +ENGINE = MergeTree +ORDER BY key; + +INSERT INTO test VALUES(1, 8, 16, 32, 64, -8, -16, -32, -64, 32.32, 64.64); + +SELECT key, byteSize(u8) AS `byteSize(UInt8)`, byteSize(u16) AS `byteSize(UInt16)`, byteSize(u32) AS `byteSize(UInt32)`, byteSize(u64) AS `byteSize(UInt64)`, byteSize(i8) AS `byteSize(Int8)`, byteSize(i16) AS `byteSize(Int16)`, byteSize(i32) AS `byteSize(Int32)`, byteSize(i64) AS `byteSize(Int64)`, byteSize(f32) AS `byteSize(Float32)`, byteSize(f64) AS `byteSize(Float64)` FROM test ORDER BY key ASC FORMAT Vertical; +``` + +çµæžœï¼š + +```text +Row 1: +────── +key: 1 +byteSize(UInt8): 1 +byteSize(UInt16): 2 +byteSize(UInt32): 4 +byteSize(UInt64): 8 +byteSize(Int8): 1 +byteSize(Int16): 2 +byteSize(Int32): 4 +byteSize(Int64): 8 +byteSize(Float32): 4 +byteSize(Float64): 8 +``` + +関数ã«è¤‡æ•°ã®å¼•æ•°ãŒã‚ã‚‹å ´åˆã€é–¢æ•°ã¯ãれらã®ãƒã‚¤ãƒˆã‚µã‚¤ã‚ºã‚’ç´¯ç©ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT byteSize(NULL, 1, 0.3, ''); +``` + +çµæžœï¼š + +```text +┌─byteSize(NULL, 1, 0.3, '')─┠+│ 19 │ +└────────────────────────────┘ +``` + +## materialize + +定数をå˜ä¸€ã®å€¤ã‚’å«ã‚€å®Œå…¨ãªã‚«ãƒ©ãƒ ã«å¤‰æ›ã—ã¾ã™ã€‚完全ãªã‚«ãƒ©ãƒ ã¨å®šæ•°ã¯ãƒ¡ãƒ¢ãƒªå†…ã§ç•°ãªã‚‹å½¢ã§è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ +通常ã€é–¢æ•°ã¯é€šå¸¸ã®å¼•æ•°ã¨å®šæ•°å¼•æ•°ã«å¯¾ã—ã¦ç•°ãªã‚‹ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¾ã™ãŒã€çµæžœã¯é€šå¸¸åŒã˜ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ +ã“ã®é–¢æ•°ã¯ã“ã®å‹•ä½œã‚’デãƒãƒƒã‚°ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**構文** + +```sql +materialize(x) +``` + +**パラメータ** + +- `x` — 定数。[Constant](../functions/index.md/#constants)。 + +**戻り値** + +- å˜ä¸€å€¤`x`ã‚’å«ã‚€ã‚«ãƒ©ãƒ ã€‚ + +**例** + +以下ã®ä¾‹ã§ã¯ã€`countMatches`関数ã¯å®šæ•°ã®ç¬¬2引数を期待ã—ã¦ã„ã¾ã™ã€‚ã“ã®å‹•ä½œã¯ã€å®šæ•°ã‚’完全ãªã‚«ãƒ©ãƒ ã«å¤‰æ›ã™ã‚‹`materialize`関数を使用ã—ã¦ãƒ‡ãƒãƒƒã‚°ã§ãã¾ã™ã€‚ã“ã®é–¢æ•°ã¯å®šæ•°ã§ãªã„引数ã«å¯¾ã—ã¦ã‚¨ãƒ©ãƒ¼ã‚’投ã’ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT countMatches('foobarfoo', 'foo'); +SELECT countMatches('foobarfoo', materialize('foo')); +``` + +çµæžœï¼š + +```response +2 +Code: 44. DB::Exception: Received from localhost:9000. DB::Exception: Illegal type of argument #2 'pattern' of function countMatches, expected constant String, got String +``` + +## ignore + +ä»»æ„ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã€ç„¡æ¡ä»¶ã«`0`ã‚’è¿”ã—ã¾ã™ã€‚引数ã¯å†…部的ã«è©•ä¾¡ã•ã‚Œç¶šã‘ã‚‹ãŸã‚ã€ãŸã¨ãˆã°ãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +**構文** + +```sql +ignore([arg1[, arg2[, ...]]) +``` + +**引数** + +- ä»»æ„ã®åž‹ã€`NULL`ã‚’å«ã‚€ä»»æ„ã®å¤šæ•°ã®å¼•æ•°ã‚’å—ã‘入れるã“ã¨ãŒã§ãã¾ã™ã€‚ + +**戻り値** + +- `0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT ignore(0, 'ClickHouse', NULL); +``` + +çµæžœï¼š + +```response +┌─ignore(0, 'ClickHouse', NULL)─┠+│ 0 │ +└───────────────────────────────┘ +``` + +## sleep + +クエリã®å®Ÿè¡Œã«é…延や一時åœæ­¢ã‚’å°Žå…¥ã™ã‚‹ãŸã‚ã«ä½¿ã‚ã‚Œã¾ã™ã€‚主ã«ãƒ†ã‚¹ãƒˆã‚„デãƒãƒƒã‚°ã®ç›®çš„ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +sleep(seconds) +``` + +**引数** + +- `seconds`: [UInt*](../data-types/int-uint.md) ã¾ãŸã¯ [Float](../data-types/float.md) クエリ実行を一時åœæ­¢ã™ã‚‹ç§’数。最大3秒。å°æ•°ç§’を指定ã™ã‚‹ãŸã‚ã«æµ®å‹•å°æ•°ç‚¹å€¤ã‚’使用ã§ãã¾ã™ã€‚ + +**戻り値** + +ã“ã®é–¢æ•°ã¯å€¤ã‚’è¿”ã—ã¾ã›ã‚“。 + +**例** + +```sql +SELECT sleep(2); +``` + +ã“ã®é–¢æ•°ã¯å€¤ã‚’è¿”ã—ã¾ã›ã‚“。ã—ã‹ã—ã€`clickhouse client`ã§é–¢æ•°ã‚’実行ã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚ˆã†ãªæƒ…å ±ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ï¼š + +```response +SELECT sleep(2) + +Query id: 8aa9943e-a686-45e1-8317-6e8e3a5596ac + +┌─sleep(2)─┠+│ 0 │ +└──────────┘ + +1 row in set. Elapsed: 2.012 sec. +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯2秒間ã®ä¸€æ™‚åœæ­¢ã®å¾Œã«å®Œäº†ã—ã¾ã™ã€‚ã“ã®é–“ã€çµæžœã¯è¿”ã•ã‚Œãšã€ã‚¯ã‚¨ãƒªã¯åœæ­¢ã—ã¦ã„ã‚‹ã‹éžå¿œç­”ã§ã‚るよã†ã«è¦‹ãˆã¾ã™ã€‚ + +**実装ã®è©³ç´°** + +`sleep()`関数ã¯é€šå¸¸ã€ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスやシステムã®å¿œç­”性ã«æ‚ªå½±éŸ¿ã‚’åŠã¼ã™ãŸã‚ã€æœ¬ç•ªç’°å¢ƒã§ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。ã—ã‹ã—ã€ä»¥ä¸‹ã®ã‚ˆã†ãªå ´åˆã«å½¹ç«‹ã¤ã“ã¨ãŒã‚ã‚Šã¾ã™ï¼š + +1. **テスト**:ClickHouseをテストやベンãƒãƒžãƒ¼ã‚¯ã™ã‚‹éš›ã«ã€é…延をシミュレーションã—ãŸã‚Šã€ä¸€æ™‚åœæ­¢ã‚’å°Žå…¥ã—ã¦ã‚·ã‚¹ãƒ†ãƒ ãŒç‰¹å®šã®æ¡ä»¶ä¸‹ã§ã©ã®ã‚ˆã†ã«å‹•ä½œã™ã‚‹ã‹ã‚’観察ã§ãã¾ã™ã€‚ +2. **デãƒãƒƒã‚°**:システムã®çŠ¶æ…‹ã‚„クエリã®å®Ÿè¡Œã‚’特定ã®æ™‚点ã§èª¿ã¹ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€`sleep()`を使ã£ã¦ä¸€æ™‚åœæ­¢ã‚’å°Žå…¥ã—ã€é–¢é€£æƒ…報を調ã¹ãŸã‚ŠåŽé›†ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +3. **シミュレーション**:ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯é…延や外部システムä¾å­˜ãªã©ã€æœ¬ç•ªç’°å¢ƒã§ã®é…延や一時åœæ­¢ã‚’シミュレートã—ãŸã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +ClickHouseシステムã®å…¨ä½“çš„ãªãƒ‘フォーマンスや応答性ã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€`sleep()`関数ã¯å¿…è¦ãªå ´åˆã«ã®ã¿ã€æ…Žé‡ã«ä½¿ç”¨ã—ã¦ãã ã•ã„。 + +## sleepEachRow + +å„è¡Œã®çµæžœã‚»ãƒƒãƒˆã«å¯¾ã—ã¦æŒ‡å®šã—ãŸç§’æ•°ã ã‘クエリã®å®Ÿè¡Œã‚’一時åœæ­¢ã—ã¾ã™ã€‚ + +**構文** + +```sql +sleepEachRow(seconds) +``` + +**引数** + +- `seconds`: [UInt*](../data-types/int-uint.md) ã¾ãŸã¯ [Float*](../data-types/float.md) å„è¡Œã®çµæžœã‚»ãƒƒãƒˆã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚’一時åœæ­¢ã™ã‚‹ç§’数。最大3秒。å°æ•°ç§’を指定ã™ã‚‹ãŸã‚ã«æµ®å‹•å°æ•°ç‚¹å€¤ã‚’使用ã§ãã¾ã™ã€‚ + +**戻り値** + +ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’変更ã›ãšã«ãã®ã¾ã¾è¿”ã—ã¾ã™ã€‚ + +**例** + +```sql +SELECT number, sleepEachRow(0.5) FROM system.numbers LIMIT 5; +``` + +```response +┌─number─┬─sleepEachRow(0.5)─┠+│ 0 │ 0 │ +│ 1 │ 0 │ +│ 2 │ 0 │ +│ 3 │ 0 │ +│ 4 │ 0 │ +└────────┴───────────────────┘ +``` + +ãŸã ã—ã€å‡ºåŠ›ã¯å„è¡Œã”ã¨ã«0.5秒ã®é…延付ãã§è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +`sleepEachRow()`関数ã¯ã€ä¸»ã«`sleep()`関数ã¨åŒæ§˜ã«ãƒ†ã‚¹ãƒˆã‚„デãƒãƒƒã‚°ã®ç›®çš„ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +å„è¡Œã®å‡¦ç†ã«é…延や一時åœæ­¢ã‚’シミュレーションã™ã‚‹ã“ã¨ãŒã§ãã€æ¬¡ã®ã‚ˆã†ãªã‚·ãƒŠãƒªã‚ªã§å½¹ç«‹ã¡ã¾ã™ï¼š + +1. **テスト**:特定ã®æ¡ä»¶ä¸‹ã§ã®ClickHouseã®ãƒ‘フォーマンスをテストã¾ãŸã¯ãƒ™ãƒ³ãƒãƒžãƒ¼ã‚¯ã™ã‚‹éš›ã«ã€`sleepEachRow()`を使用ã—ã¦å„行処ç†ã«é…延や一時åœæ­¢ã‚’シミュレーションã§ãã¾ã™ã€‚ +2. **デãƒãƒƒã‚°**:å„行処ç†æ™‚ã®ã‚·ã‚¹ãƒ†ãƒ ã®çŠ¶æ…‹ã‚„クエリã®å®Ÿè¡Œã‚’確èªã™ã‚‹éš›ã«ã€`sleepEachRow()`を使用ã—ã¦ä¸€æ™‚åœæ­¢ã‚’挿入ã—ã€é–¢é€£æƒ…報を調ã¹ãŸã‚ŠåŽé›†ã—ãŸã‚Šã§ãã¾ã™ã€‚ +3. **シミュレーション**:外部システムやãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯é…延ãªã©ã€å„行処ç†æ™‚ã®é…延やåœæ­¢ã‚’シミュレートã—ãŸã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +[`sleep()`関数](#sleep)ã¨åŒæ§˜ã«ã€ç‰¹ã«å¤§ããªçµæžœã‚»ãƒƒãƒˆã‚’扱ã†å ´åˆClickHouseシステムã®ãƒ‘フォーマンスや応答性ã«å¤§ãã影響ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€`sleepEachRow()`ã®ä½¿ç”¨ã«ã¯æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ + + +## currentDatabase + +ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã‚’è¿”ã—ã¾ã™ã€‚ +`CREATE TABLE`クエリã®ãƒ†ãƒ¼ãƒ–ルエンジンã®ãƒ‘ラメータã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ + +**構文** + +```sql +currentDatabase() +``` + +**戻り値** + +- ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®åå‰ã‚’è¿”ã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT currentDatabase() +``` + +çµæžœï¼š + +```response +┌─currentDatabase()─┠+│ default │ +└───────────────────┘ +``` + +## currentUser {#currentUser} + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®åå‰ã‚’è¿”ã—ã¾ã™ã€‚分散クエリã®å ´åˆã€ã‚¯ã‚¨ãƒªã‚’開始ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®åå‰ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +currentUser() +``` + +別å: `user()`, `USER()`, `current_user()`。別åã¯å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +**戻り値** + +- ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®åå‰ã€‚[String](../data-types/string.md)。 +- 分散クエリã®å ´åˆã€ã‚¯ã‚¨ãƒªã‚’開始ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ­ã‚°ã‚¤ãƒ³ã€‚[String](../data-types/string.md)。 + +**例** + +```sql +SELECT currentUser(); +``` + +çµæžœï¼š + +```text +┌─currentUser()─┠+│ default │ +└───────────────┘ +``` + +## currentSchemas + +ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ã‚­ãƒ¼ãƒžã®åå‰ã‚’å«ã‚€å˜ä¸€è¦ç´ ã®é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +currentSchemas(bool) +``` + +別å: `current_schemas`. + +**引数** + +- `bool`: ブール値。[Bool](../data-types/boolean.md)。 + +:::note +ブール引数ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€PostgreSQLã§ã®[実装](https://www.postgresql.org/docs/7.3/functions-misc.html)ã¨ã®äº’æ›æ€§ã®ãŸã‚ã«å­˜åœ¨ã—ã¾ã™ã€‚ +::: + +**戻り値** + +- ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã‚’å«ã‚€å˜ä¸€è¦ç´ ã®é…列を返ã—ã¾ã™ã€‚ + +**例** + +```sql +SELECT currentSchemas(true); +``` + +çµæžœï¼š + +```response +['default'] +``` + +## isConstant + +引数ãŒå®šæ•°å¼ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +定数å¼ã¨ã¯ã‚¯ã‚¨ãƒªè§£æžä¸­ã€ã¤ã¾ã‚Šå®Ÿè¡Œå‰ã«çµæžœãŒåˆ¤æ˜Žã—ã¦ã„ã‚‹å¼ã‚’指ã—ã¾ã™ã€‚ +例ãˆã°ã€[リテラル](../../sql-reference/syntax.md#literals)ã«é–¢ã™ã‚‹å¼ã¯å®šæ•°å¼ã§ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ä¸»ã«é–‹ç™ºã€ãƒ‡ãƒãƒƒã‚°ã€ãŠã‚ˆã³ãƒ‡ãƒ¢ãƒ³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +isConstant(x) +``` + +**引数** + +- `x` — ãƒã‚§ãƒƒã‚¯ã™ã‚‹å¼ã€‚ + +**戻り値** + +- `x`ãŒå®šæ•°ã§ã‚ã‚Œã°`1`。[UInt8](../data-types/int-uint.md)。 +- `x`ãŒéžå®šæ•°ã§ã‚ã‚Œã°`0`。[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT isConstant(x + 1) FROM (SELECT 43 AS x) +``` + +çµæžœï¼š + +```text +┌─isConstant(plus(x, 1))─┠+│ 1 │ +└────────────────────────┘ +``` + +クエリ: + +```sql +WITH 3.14 AS pi SELECT isConstant(cos(pi)) +``` + +çµæžœï¼š + +```text +┌─isConstant(cos(pi))─┠+│ 1 │ +└─────────────────────┘ +``` + +クエリ: + +```sql +SELECT isConstant(number) FROM numbers(1) +``` + +çµæžœï¼š + +```text +┌─isConstant(number)─┠+│ 0 │ +└────────────────────┘ +``` + +## hasColumnInTable + +データベースåã€ãƒ†ãƒ¼ãƒ–ルåã€ã‚«ãƒ©ãƒ åを定数文字列ã¨ã—ã¦æŒ‡å®šã™ã‚‹ã¨ã€æŒ‡å®šã‚«ãƒ©ãƒ ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯1ã€å­˜åœ¨ã—ãªã„å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +hasColumnInTable(\[‘hostname’\[, ‘username’\[, ‘password’\]\],\] ‘database’, ‘table’, ‘column’) +``` + +**パラメータ** + +- `database` : データベースå。[文字列リテラル](../syntax#syntax-string-literal) +- `table` : テーブルå。[文字列リテラル](../syntax#syntax-string-literal) +- `column` : カラムå。[文字列リテラル](../syntax#syntax-string-literal) +- `hostname` : ãƒã‚§ãƒƒã‚¯ã‚’è¡Œã†ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã®åå‰ã€‚[文字列リテラル](../syntax#syntax-string-literal) +- `username` : リモートサーãƒãƒ¼ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å。[文字列リテラル](../syntax#syntax-string-literal) +- `password` : リモートサーãƒãƒ¼ã®ãƒ‘スワード。[文字列リテラル](../syntax#syntax-string-literal) + +**戻り値** + +- 指定カラムãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯`1`。 +- ãã†ã§ãªã„å ´åˆã¯`0`。 + +**実装ã®è©³ç´°** + +ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®è¦ç´ ã®å ´åˆã€é–¢æ•°ã¯ã‚«ãƒ©ãƒ ã®å­˜åœ¨ã‚’確èªã—ã¾ã™ã€‚ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ãã®ã‚‚ã®ã«ã¤ã„ã¦ã¯ã€é–¢æ•°ã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT hasColumnInTable('system','metrics','metric') +``` + +```response +1 +``` + +```sql +SELECT hasColumnInTable('system','metrics','non-existing_column') +``` + +```response +0 +``` + +## hasThreadFuzzer + +スレッドファザーãŒæœ‰åŠ¹ã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚テストã§å®Ÿè¡ŒãŒé•·ããªã‚Šã™ãŽã‚‹ã®ã‚’防ããŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**構文** + +```sql +hasThreadFuzzer(); +``` + +## bar + +棒グラフを構築ã—ã¾ã™ã€‚ + +`bar(x, min, max, width)`ã¯ã€å¹…ãŒ`(x - min)`ã«æ¯”例ã—ã€`x = max`ã®ã¨ãã«`width`文字ã¨ãªã‚‹ãƒãƒ¼ã‚’æç”»ã—ã¾ã™ã€‚ + +**引数** + +- `x` — 表示ã™ã‚‹ã‚µã‚¤ã‚ºã€‚ +- `min, max` — æ•´æ•°ã®å®šæ•°ã€‚値ã¯`Int64`ã«åŽã¾ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +- `width` — 定数ã®æ­£ã®æ•´æ•°ã§ã‚ã‚Šã€åˆ†æ•°å€¤ã‚’指定ã§ãã¾ã™ã€‚ + +ãƒãƒ¼ã¯ã‚·ãƒ³ãƒœãƒ«ã®1/8ã®ç²¾åº¦ã§æç”»ã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +SELECT + toHour(EventTime) AS h, + count() AS c, + bar(c, 0, 600000, 20) AS bar +FROM test.hits +GROUP BY h +ORDER BY h ASC +``` + +```text +┌──h─┬──────c─┬─bar────────────────┠+│ 0 │ 292907 │ █████████▋ │ +│ 1 │ 180563 │ ██████ │ +│ 2 │ 114861 │ ███▋ │ +│ 3 │ 85069 │ ██▋ │ +│ 4 │ 68543 │ ██▎ │ +│ 5 │ 78116 │ ██▌ │ +│ 6 │ 113474 │ ███▋ │ +│ 7 │ 170678 │ █████▋ │ +│ 8 │ 278380 │ █████████▎ │ +│ 9 │ 391053 │ █████████████ │ +│ 10 │ 457681 │ ███████████████▎ │ +│ 11 │ 493667 │ ████████████████■│ +│ 12 │ 509641 │ ████████████████▊ │ +│ 13 │ 522947 │ █████████████████■│ +│ 14 │ 539954 │ █████████████████▊ │ +│ 15 │ 528460 │ █████████████████▌ │ +│ 16 │ 539201 │ █████████████████▊ │ +│ 17 │ 523539 │ █████████████████■│ +│ 18 │ 506467 │ ████████████████▊ │ +│ 19 │ 520915 │ █████████████████▎ │ +│ 20 │ 521665 │ █████████████████■│ +│ 21 │ 542078 │ ██████████████████ │ +│ 22 │ 493642 │ ████████████████■│ +│ 23 │ 400397 │ █████████████▎ │ +└────┴────────┴────────────────────┘ +``` + +## transform + +è¦ç´ ã®ã„ãã¤ã‹ã‚’ä»–ã®ã‚‚ã®ã«æ˜Žç¤ºçš„ã«å®šç¾©ã•ã‚ŒãŸãƒžãƒƒãƒ”ングã«å¾“ã£ã¦ã€å€¤ã‚’変æ›ã—ã¾ã™ã€‚ +ã“ã®é–¢æ•°ã«ã¯2ã¤ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒã‚ã‚Šã¾ã™ï¼š + +### transform(x, array_from, array_to, default) + +`x` – 変æ›å¯¾è±¡ã€‚ + +`array_from` – 変æ›ã™ã‚‹å€¤ã®å®šæ•°é…列。 + +`array_to` – `from`ã®å€¤ã‚’変æ›ã™ã‚‹ãŸã‚ã®å®šæ•°é…列。 + +`default` – `x`ãŒ`from`内ã®ã„ãšã‚Œã®å€¤ã¨ã‚‚ç­‰ã—ããªã„å ´åˆã«ä½¿ç”¨ã™ã‚‹å€¤ã€‚ + +`array_from`ã¨`array_to`ã¯åŒã˜æ•°ã®è¦ç´ ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ã‚·ã‚°ãƒãƒãƒ£ï¼š + +`x`ãŒ`array_from`ã®è¦ç´ ã®ä¸€ã¤ã«ç­‰ã—ã„å ´åˆã€é–¢æ•°ã¯`array_to`ã®å¯¾å¿œã™ã‚‹è¦ç´ ã‚’è¿”ã—ã¾ã™ã€‚ +ã™ãªã‚ã¡ã€åŒã˜é…列インデックスã®è¦ç´ ã§ã™ã€‚ãã†ã§ãªã„å ´åˆã€`default`ã‚’è¿”ã—ã¾ã™ã€‚`array_from`ã«è¤‡æ•°ã®ä¸€è‡´ã™ã‚‹è¦ç´ ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€æœ€åˆã®è¦ç´ ã«å¯¾å¿œã™ã‚‹ã‚‚ã®ã‚’è¿”ã—ã¾ã™ã€‚ + +`transform(T, Array(T), Array(U), U) -> U` + +`T`ã¨`U`ã¯æ•°å€¤åž‹ã€æ–‡å­—列型ã€ã¾ãŸã¯Dateã‚„DateTimeåž‹ã®ã„ãšã‚Œã‹ã§ã™ã€‚ åŒã˜æ–‡å­—(Tã¾ãŸã¯U)ã¨ã¯ã€åž‹ãŒç›¸äº’ã«äº’æ›æ€§ãŒã‚ã‚‹ãŒã€å¿…ãšã—ã‚‚ç­‰ã—ã„ã‚ã‘ã§ã¯ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +例ã¨ã—ã¦ã€æœ€åˆã®å¼•æ•°ãŒ`Int64`åž‹ã§ã€2番目ã®å¼•æ•°ãŒ`Array(UInt16)`åž‹ã§ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +例: + +```sql +SELECT + transform(SearchEngineID, [2, 3], ['Yandex', 'Google'], 'Other') AS title, + count() AS c +FROM test.hits +WHERE SearchEngineID != 0 +GROUP BY title +ORDER BY c DESC +``` + +```text +┌─title─────┬──────c─┠+│ Yandex │ 498635 │ +│ Google │ 229872 │ +│ Other │ 104472 │ +└───────────┴────────┘ +``` + +### transform(x, array_from, array_to) + +`default`引数ãŒãªã„ã“ã¨ã‚’除ã„ã¦ä»–ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã¨é¡žä¼¼ã—ã¦ã„ã¾ã™ã€‚一致ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€`x`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +SELECT + transform(domain(Referer), ['yandex.ru', 'google.ru', 'vkontakte.ru'], ['www.yandex', 'example.com', 'vk.com']) AS s, + count() AS c +FROM test.hits +GROUP BY domain(Referer) +ORDER BY count() DESC +LIMIT 10 +``` + +```text +┌─s──────────────┬───────c─┠+│ │ 2906259 │ +│ www.yandex │ 867767 │ +│ ███████.ru │ 313599 │ +│ mail.yandex.ru │ 107147 │ +│ ██████.ru │ 100355 │ +│ █████████.ru │ 65040 │ +│ news.yandex.ru │ 64515 │ +│ ██████.net │ 59141 │ +│ example.com │ 57316 │ +└────────────────┴─────────┘ +``` + +## formatReadableDecimalSize + +サイズ(ãƒã‚¤ãƒˆæ•°ï¼‰ã‚’指定ã™ã‚‹ã¨ã€ã“ã®é–¢æ•°ã¯å°æ•°ã‚µã‚¤ã‚ºã‚’æŒã¤èª­ã¿ã‚„ã™ã„サイズを文字列ã¨ã—ã¦è¿”ã—ã¾ã™ï¼ˆKBã€MBãªã©ã®å˜ä½ä»˜ã)。 + +ã“ã®é–¢æ•°ã®é€†æ“作ã¯[parseReadableSize](#parsereadablesize)ã€[parseReadableSizeOrZero](#parsereadablesizeorzero)ã€ãŠã‚ˆã³[parseReadableSizeOrNull](#parsereadablesizeornull)ã§ã™ã€‚ + +**構文** + +```sql +formatReadableDecimalSize(x) +``` + +**例** + +クエリ: + +```sql +SELECT + arrayJoin([1, 1024, 1024*1024, 192851925]) AS filesize_bytes, + formatReadableDecimalSize(filesize_bytes) AS filesize +``` + +çµæžœï¼š + +```text +┌─filesize_bytes─┬─filesize───┠+│ 1 │ 1.00 B │ +│ 1024 │ 1.02 KB │ +│ 1048576 │ 1.05 MB │ +│ 192851925 │ 192.85 MB │ +└────────────────┴────────────┘ +``` + +## formatReadableSize + +サイズ(ãƒã‚¤ãƒˆæ•°ï¼‰ã‚’指定ã™ã‚‹ã¨ã€ã“ã®é–¢æ•°ã¯èª­ã¿ã‚„ã™ã丸ã‚られãŸã‚µã‚¤ã‚ºã‚’文字列ã¨ã—ã¦è¿”ã—ã¾ã™ï¼ˆKiBã€MiBãªã©ã®å˜ä½ä»˜ã)。 + +ã“ã®é–¢æ•°ã®é€†æ“作ã¯[parseReadableSize](#parsereadablesize)ã€[parseReadableSizeOrZero](#parsereadablesizeorzero)ã€ãŠã‚ˆã³[parseReadableSizeOrNull](#parsereadablesizeornull)ã§ã™ã€‚ + +**構文** + +```sql +formatReadableSize(x) +``` +別å: `FORMAT_BYTES`. + +**例** + +クエリ: + +```sql +SELECT + arrayJoin([1, 1024, 1024*1024, 192851925]) AS filesize_bytes, + formatReadableSize(filesize_bytes) AS filesize +``` + +çµæžœï¼š + +```text +┌─filesize_bytes─┬─filesize───┠+│ 1 │ 1.00 B │ +│ 1024 │ 1.00 KiB │ +│ 1048576 │ 1.00 MiB │ +│ 192851925 │ 183.92 MiB │ +└────────────────┴────────────┘ +``` + +## formatReadableQuantity + +数を指定ã™ã‚‹ã¨ã€ã“ã®é–¢æ•°ã¯ä¸¸ã‚られãŸæ•°ã‚’文字列ã¨ã—ã¦è¿”ã—ã¾ã™ï¼ˆåƒã€ç™¾ä¸‡ã€åå„„ãªã©ã®æŽ¥å°¾è¾žä»˜ã)。 + +**構文** + +```sql +formatReadableQuantity(x) +``` + +**例** + +クエリ: + +```sql +SELECT + arrayJoin([1024, 1234 * 1000, (4567 * 1000) * 1000, 98765432101234]) AS number, + formatReadableQuantity(number) AS number_for_humans +``` + +çµæžœï¼š + +```text +┌─────────number─┬─number_for_humans─┠+│ 1024 │ 1.02 thousand │ +│ 1234000 │ 1.23 million │ +│ 4567000000 │ 4.57 billion │ +│ 98765432101234 │ 98.77 trillion │ +└────────────────┴───────────────────┘ +``` + +## formatReadableTimeDelta + +秒å˜ä½ã®æ™‚間間隔(デルタ)を指定ã™ã‚‹ã¨ã€ã“ã®é–¢æ•°ã¯å¹´/月/æ—¥/時/分/秒/ミリ秒/マイクロ秒/ナノ秒ã¨ã—ã¦æ™‚間デルタを文字列ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +formatReadableTimeDelta(column[, maximum_unit, minimum_unit]) +``` + +**引数** + +- `column` — 数値ã®æ™‚間デルタをæŒã¤ã‚«ãƒ©ãƒ ã€‚ +- `maximum_unit` — ä»»æ„。最大表示å˜ä½ã€‚ + - å—ã‘入れられる値:`nanoseconds`, `microseconds`, `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `months`, `years`. + - デフォルト値:`years`. +- `minimum_unit` — ä»»æ„。最å°è¡¨ç¤ºå˜ä½ã€‚よりå°ã•ã„å˜ä½ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ã€‚ + - å—ã‘入れられる値:`nanoseconds`, `microseconds`, `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `months`, `years`. + - 明示的ã«æŒ‡å®šã•ã‚ŒãŸå€¤ãŒ`maximum_unit`より大ãã„å ´åˆã€ä¾‹å¤–ãŒæŠ•ã’られã¾ã™ã€‚ + - デフォルト値:`maximum_unit`ãŒ`seconds`以上ã®å ´åˆã¯`seconds`, ãれ以外ã®å ´åˆã¯`nanoseconds`. + +**例** + +```sql +SELECT + arrayJoin([100, 12345, 432546534]) AS elapsed, + formatReadableTimeDelta(elapsed) AS time_delta +``` + +```text +┌────elapsed─┬─time_delta ─────────────────────────────────────────────────────┠+│ 100 │ 1 minute and 40 seconds │ +│ 12345 │ 3 hours, 25 minutes and 45 seconds │ +│ 432546534 │ 13 years, 8 months, 17 days, 7 hours, 48 minutes and 54 seconds │ +└────────────┴─────────────────────────────────────────────────────────────────┘ +``` + +```sql +SELECT + arrayJoin([100, 12345, 432546534]) AS elapsed, + formatReadableTimeDelta(elapsed, 'minutes') AS time_delta +``` + +```text +┌────elapsed─┬─time_delta ─────────────────────────────────────────────────────┠+│ 100 │ 1 minute and 40 seconds │ +│ 12345 │ 205 minutes and 45 seconds │ +│ 432546534 │ 7209108 minutes and 54 seconds │ +└────────────┴─────────────────────────────────────────────────────────────────┘ +``` + +```sql +SELECT + arrayJoin([100, 12345, 432546534.00000006]) AS elapsed, + formatReadableTimeDelta(elapsed, 'minutes', 'nanoseconds') AS time_delta +``` + +```text +┌────────────elapsed─┬─time_delta─────────────────────────────────────┠+│ 100 │ 1 minute and 40 seconds │ +│ 12345 │ 205 minutes and 45 seconds │ +│ 432546534.00000006 │ 7209108 minutes, 54 seconds and 60 nanoseconds │ +└────────────────────┴────────────────────────────────────────────────┘ +``` + +## parseReadableSize + +ãƒã‚¤ãƒˆã‚µã‚¤ã‚ºã¨`B`ã€`KiB`ã€`KB`ã€`MiB`ã€`MB`ãªã©ã®å˜ä½ï¼ˆä¾‹ï¼š[ISO/IEC 80000-13](https://en.wikipedia.org/wiki/ISO/IEC_80000) ã¾ãŸã¯å°æ•°ãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’å«ã‚€æ–‡å­—列を指定ã™ã‚‹ã¨ã€ã“ã®é–¢æ•°ã¯å¯¾å¿œã™ã‚‹ãƒã‚¤ãƒˆæ•°ã‚’è¿”ã—ã¾ã™ã€‚ +入力値を解æžã§ããªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã®é€†æ“作ã¯[formatReadableSize](#formatreadablesize) 㨠[formatReadableDecimalSize](#formatreadabledecimalsize)ã§ã™ã€‚ + +**構文** + +```sql +parseReadableSize(x) +``` + +**引数** + +- `x` : ISO/IEC 80000-13ã¾ãŸã¯å°æ•°ãƒã‚¤ãƒˆå˜ä½ã§ã®èª­ã¿ã‚„ã™ã„サイズ ([String](../../sql-reference/data-types/string.md))。 + +**戻り値** + +- ãƒã‚¤ãƒˆæ•°ã€æœ€ã‚‚è¿‘ã„æ•´æ•°ã«åˆ‡ã‚Šä¸Šã’られる ([UInt64](../../sql-reference/data-types/int-uint.md))。 + +**例** + +```sql +SELECT + arrayJoin(['1 B', '1 KiB', '3 MB', '5.314 KiB']) AS readable_sizes, + parseReadableSize(readable_sizes) AS sizes; +``` + +```text +┌─readable_sizes─┬───sizes─┠+│ 1 B │ 1 │ +│ 1 KiB │ 1024 │ +│ 3 MB │ 3000000 │ +│ 5.314 KiB │ 5442 │ +└────────────────┴─────────┘ +``` + +## parseReadableSizeOrNull + +ãƒã‚¤ãƒˆã‚µã‚¤ã‚ºã¨`B`ã€`KiB`ã€`KB`ã€`MiB`ã€`MB`ãªã©ã®å˜ä½ï¼ˆä¾‹ï¼š[ISO/IEC 80000-13](https://en.wikipedia.org/wiki/ISO/IEC_80000) 或ã„ã¯å°æ•°ãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’å«ã‚€æ–‡å­—列を指定ã™ã‚‹ã¨ã€ã“ã®é–¢æ•°ã¯å¯¾å¿œã™ã‚‹ãƒã‚¤ãƒˆæ•°ã‚’è¿”ã—ã¾ã™ã€‚ +入力値を解æžã§ããªã„å ´åˆã€`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã®é€†æ“作ã¯[formatReadableSize](#formatreadablesize) ã¨[formatReadableDecimalSize](#formatreadabledecimalsize)ã§ã™ã€‚ + +**構文** + +```sql +parseReadableSizeOrNull(x) +``` + +**引数** + +- `x` : ISO/IEC 80000-13或ã„ã¯å°æ•°ãƒã‚¤ãƒˆå˜ä½ã§ã®èª­ã¿ã‚„ã™ã„サイズ ([String](../../sql-reference/data-types/string.md))。 + +**戻り値** + +- ãƒã‚¤ãƒˆæ•°ï¼Œæœ€ã‚‚è¿‘ã„æ•´æ•°ã«åˆ‡ã‚Šä¸Šã’られる,ã‚ã‚‹ã„ã¯å…¥åŠ›ã‚’解æžã§ããªã„å ´åˆã¯NULL(Nullable([UInt64](../../sql-reference/data-types/int-uint.md)))。 + +**例** + +```sql +SELECT + arrayJoin(['1 B', '1 KiB', '3 MB', '5.314 KiB', 'invalid']) AS readable_sizes, + parseReadableSizeOrNull(readable_sizes) AS sizes; +``` + +```text +┌─readable_sizes─┬───sizes─┠+│ 1 B │ 1 │ +│ 1 KiB │ 1024 │ +│ 3 MB │ 3000000 │ +│ 5.314 KiB │ 5442 │ +│ invalid │ á´ºáµá´¸á´¸ │ +└────────────────┴─────────┘ +``` + +## parseReadableSizeOrZero + +ãƒã‚¤ãƒˆã‚µã‚¤ã‚ºã¨`B`ã€`KiB`ã€`KB`ã€`MiB`ã€`MB`ãªã©ã®å˜ä½ï¼ˆä¾‹ï¼š[ISO/IEC 80000-13](https://en.wikipedia.org/wiki/ISO/IEC_80000) ã¾ãŸã¯å°æ•°ãƒã‚¤ãƒˆå˜ä½ï¼‰ã‚’å«ã‚€æ–‡å­—列を指定ã™ã‚‹ã¨ã€ã“ã®é–¢æ•°ã¯å¯¾å¿œã™ã‚‹ãƒã‚¤ãƒˆæ•°ã‚’è¿”ã—ã¾ã™ã€‚入力値を解æžã§ããªã„å ´åˆã€`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã®é€†æ“作ã¯[formatReadableSize](#formatreadablesize)ã¨[formatReadableDecimalSize](#formatreadabledecimalsize)ã§ã™ã€‚ + + +**構文** + +```sql +parseReadableSizeOrZero(x) +``` + +**引数** + +- `x` : ISO/IEC 80000-13ã¾ãŸã¯å°æ•°ãƒã‚¤ãƒˆå˜ä½ã§ã®èª­ã¿ã‚„ã™ã„サイズ ([String](../../sql-reference/data-types/string.md))。 + +**戻り値** + +- ãƒã‚¤ãƒˆæ•°ã€æœ€ã‚‚è¿‘ã„æ•´æ•°ã«åˆ‡ã‚Šä¸Šã’られるã€ã¾ãŸã¯å…¥åŠ›ã‚’解æžã§ããªã„å ´åˆã¯0 ([UInt64](../../sql-reference/data-types/int-uint.md))。 + +**例** + +```sql +SELECT + arrayJoin(['1 B', '1 KiB', '3 MB', '5.314 KiB', 'invalid']) AS readable_sizes, + parseReadableSizeOrZero(readable_sizes) AS sizes; +``` + +```text +┌─readable_sizes─┬───sizes─┠+│ 1 B │ 1 │ +│ 1 KiB │ 1024 │ +│ 3 MB │ 3000000 │ +│ 5.314 KiB │ 5442 │ +│ invalid │ 0 │ +└────────────────┴─────────┘ +``` + +## parseTimeDelta + +æ•°å­—ã®é€£ç¶šã—ãŸã‚‚ã®ã¨ã€æ™‚é–“ã®å˜ä½ã«ä¼¼ãŸã‚‚ã®ã‚’解æžã—ã¾ã™ã€‚ + +**構文** + +```sql +parseTimeDelta(timestr) +``` + +**引数** + +- `timestr` — æ•°å­—ã®é€£ç¶šã—ãŸã‚‚ã®ã¨ã€æ™‚é–“ã®å˜ä½ã«ä¼¼ãŸã‚‚ã®ã€‚ + +**戻り値** + +- 浮動å°æ•°ç‚¹æ•°ã§è¡¨ã•ã‚Œã‚‹ç§’数。 + +**例** + +```sql +SELECT parseTimeDelta('11s+22min') +``` + +```text +┌─parseTimeDelta('11s+22min')─┠+│ 1331 │ +└─────────────────────────────┘ +``` + +```sql +SELECT parseTimeDelta('1yr2mo') +``` + +```text +┌─parseTimeDelta('1yr2mo')─┠+│ 36806400 │ +└──────────────────────────┘ +``` + +## least + +aã¨bã®ã†ã¡ã€å°ã•ã„値を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +least(a, b) +``` + +## greatest + +aã¨bã®ã†ã¡ã€å¤§ãã„値を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +greatest(a, b) +``` + +## uptime + +サーãƒãƒ¼ã®ç¨¼åƒæ™‚間を秒å˜ä½ã§è¿”ã—ã¾ã™ã€‚ +関数ãŒåˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å®Ÿè¡Œã•ã‚ŒãŸå ´åˆã€å„シャードã«é–¢é€£ã™ã‚‹å€¤ã‚’æŒã¤é€šå¸¸ã®ã‚«ãƒ©ãƒ ã‚’生æˆã—ã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°å®šæ•°å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +**構文** + +``` sql +uptime() +``` + +**戻り値** + +- 秒数ã®æ™‚間値。[UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT uptime() as Uptime; +``` + +çµæžœï¼š + +``` response +┌─Uptime─┠+│ 55867 │ +└────────┘ +``` + +## version + +ClickHouseã®ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’以下ã®å½¢å¼ã§æ–‡å­—列ã¨ã—ã¦è¿”ã—ã¾ã™ï¼š + +- メジャーãƒãƒ¼ã‚¸ãƒ§ãƒ³ +- マイナーãƒãƒ¼ã‚¸ãƒ§ãƒ³ +- パッãƒãƒãƒ¼ã‚¸ãƒ§ãƒ³ +- å‰ã®å®‰å®šãƒªãƒªãƒ¼ã‚¹ã‹ã‚‰ã®ã‚³ãƒŸãƒƒãƒˆæ•° + +```plaintext +メジャーãƒãƒ¼ã‚¸ãƒ§ãƒ³.マイナーãƒãƒ¼ã‚¸ãƒ§ãƒ³.パッãƒãƒãƒ¼ã‚¸ãƒ§ãƒ³.å‰ã®å®‰å®šãƒªãƒªãƒ¼ã‚¹ã‹ã‚‰ã®ã‚³ãƒŸãƒƒãƒˆæ•° +``` + +関数ãŒåˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å®Ÿè¡Œã•ã‚ŒãŸå ´åˆã€å„シャードã«é–¢é€£ã™ã‚‹å€¤ã‚’æŒã¤é€šå¸¸ã®ã‚«ãƒ©ãƒ ã‚’生æˆã—ã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°å®šæ•°å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +version() +``` + +**引数** + +ãªã—。 + +**戻り値** + +- ClickHouseã®ç¾åœ¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚[String](../data-types/string)。 + +**実装ã®è©³ç´°** + +ãªã—。 + +**例** + +クエリ: + +```sql +SELECT version() +``` + +**çµæžœ**: + +```response +┌─version()─┠+│ 24.2.1.1 │ +└───────────┘ +``` + +## buildId + +ç¾åœ¨å‹•ä½œã—ã¦ã„ã‚‹ClickHouseサーãƒãƒ¼ãƒã‚¤ãƒŠãƒªã®ã‚³ãƒ³ãƒ‘イラã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸãƒ“ルドIDã‚’è¿”ã—ã¾ã™ã€‚ +分散テーブルã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å®Ÿè¡Œã•ã‚ŒãŸå ´åˆã€å„シャードã«é–¢é€£ã™ã‚‹å€¤ã‚’æŒã¤é€šå¸¸ã®ã‚«ãƒ©ãƒ ã‚’生æˆã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯å®šæ•°å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +buildId() +``` + +## blockNumber + +[ブロック](../../development/architecture.md#block) ã®è¡Œã‚’å«ã‚€å˜èª¿ã«å¢—加ã™ã‚‹ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå·ã‚’è¿”ã—ã¾ã™ã€‚ +è¿”ã•ã‚Œã‚‹ãƒ–ロック番å·ã¯ãƒ™ã‚¹ãƒˆã‚¨ãƒ•ã‚©ãƒ¼ãƒˆãƒ™ãƒ¼ã‚¹ã§æ›´æ–°ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€å®Œå…¨ã«æ­£ç¢ºã§ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +blockNumber() +``` + +**戻り値** + +- è¡ŒãŒå­˜åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå·ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT blockNumber() +FROM +( + SELECT * + FROM system.numbers + LIMIT 10 +) SETTINGS max_block_size = 2 +``` + +çµæžœï¼š + +```response +┌─blockNumber()─┠+│ 7 │ +│ 7 │ +└───────────────┘ +┌─blockNumber()─┠+│ 8 │ +│ 8 │ +└───────────────┘ +┌─blockNumber()─┠+│ 9 │ +│ 9 │ +└───────────────┘ +┌─blockNumber()─┠+│ 10 │ +│ 10 │ +└───────────────┘ +┌─blockNumber()─┠+│ 11 │ +│ 11 │ +└───────────────┘ +``` + +## rowNumberInBlock {#rowNumberInBlock} + +å„処ç†ã•ã‚ŒãŸ[ブロック](../../development/architecture.md#block)ã«å¯¾ã—ã¦ã€ç¾åœ¨ã®è¡Œã®ç•ªå·ã‚’è¿”ã—ã¾ã™ã€‚ã“ã®ç•ªå·ã¯å„ブロックã§0ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +rowNumberInBlock() +``` + +**戻り値** + +- データブロックã®è¡Œã®åºæ•°ã§0ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT rowNumberInBlock() +FROM +( + SELECT * + FROM system.numbers_mt + LIMIT 10 +) SETTINGS max_block_size = 2 +``` + +çµæžœï¼š + +```response +┌─rowNumberInBlock()─┠+│ 0 │ +│ 1 │ +└────────────────────┘ +┌─rowNumberInBlock()─┠+│ 0 │ +│ 1 │ +└────────────────────┘ +┌─rowNumberInBlock()─┠+│ 0 │ +│ 1 │ +└────────────────────┘ +┌─rowNumberInBlock()─┠+│ 0 │ +│ 1 │ +└────────────────────┘ +┌─rowNumberInBlock()─┠+│ 0 │ +│ 1 │ +└────────────────────┘ +``` + +## rowNumberInAllBlocks + +`rowNumberInAllBlocks`ã«ã‚ˆã£ã¦å‡¦ç†ã•ã‚ŒãŸå„è¡Œã«å¯¾ã—ã¦ä¸€æ„ã®è¡Œç•ªå·ã‚’è¿”ã—ã¾ã™ã€‚è¿”ã•ã‚Œã‚‹ç•ªå·ã¯0ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +rowNumberInAllBlocks() +``` + +**戻り値** + +- データブロックã®è¡Œã®åºæ•°ã§0ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT rowNumberInAllBlocks() +FROM +( + SELECT * + FROM system.numbers_mt + LIMIT 10 +) +SETTINGS max_block_size = 2 +``` + +çµæžœï¼š + +```response +┌─rowNumberInAllBlocks()─┠+│ 0 │ +│ 1 │ +└────────────────────────┘ +┌─rowNumberInAllBlocks()─┠+│ 4 │ +│ 5 │ +└────────────────────────┘ +┌─rowNumberInAllBlocks()─┠+│ 2 │ +│ 3 │ +└────────────────────────┘ +┌─rowNumberInAllBlocks()─┠+│ 6 │ +│ 7 │ +└────────────────────────┘ +┌─rowNumberInAllBlocks()─┠+│ 8 │ +│ 9 │ +└────────────────────────┘ +``` + +## neighbor + +指定ã•ã‚ŒãŸã‚ªãƒ•ã‚»ãƒƒãƒˆå‰ã¾ãŸã¯å¾Œã®è¡Œã‚’特定ã®ã‚«ãƒ©ãƒ ã‹ã‚‰å–å¾—ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã§ã™ã€‚ + +**構文** + +```sql +neighbor(column, offset[, default_value]) +``` + +関数ã®çµæžœã¯å½±éŸ¿ã‚’å—ã‘るデータブロックã¨ãƒ–ロック内ã®ãƒ‡ãƒ¼ã‚¿ã®é †åºã«ã‚ˆã‚Šã¾ã™ã€‚ + +:::note +ç¾åœ¨å‡¦ç†ã—ã¦ã„るデータブロックã®ä¸­ã§ã®ã¿è¿‘å‚ã‚’è¿”ã—ã¾ã™ã€‚誤りやã™ã„動作ã®ãŸã‚ã€é–¢æ•°ã¯éžæŽ¨å¥¨ã§ã™ã€‚ +é©åˆ‡ãªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã‚’使用ã—ã¦ãã ã•ã„。 +::: + +`neighbor()`ã®è¨ˆç®—中ã®è¡Œã®é †åºã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¿”ã•ã‚Œã‚‹è¡Œã®é †åºã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +ã“れを防ããŸã‚ã«ã¯ã€[ORDER BY](../../sql-reference/statements/select/order-by.md)を使用ã—ã¦ã‚µãƒ–クエリを作æˆã—ã€ã‚µãƒ–クエリã®å¤–部ã‹ã‚‰é–¢æ•°ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**引数** + +- `column` — カラムåã¾ãŸã¯ã‚¹ã‚«ãƒ©ãƒ¼å¼ã€‚ +- `offset` — `column`内ã§ç¾åœ¨ã®è¡Œã‹ã‚‰å‰ã¾ãŸã¯å…ˆã®è¡Œã‚’探ã™è¡Œæ•°ã€‚[Int64](../data-types/int-uint.md)。 +- `default_value` — ä»»æ„。オフセットãŒãƒ–ロック境界を超ãˆãŸå ´åˆã®è¿”ã•ã‚Œã‚‹å€¤ã€‚影響をå—ã‘ãŸãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®åž‹ã€‚ + +**戻り値** + +- オフセットãŒãƒ–ロック境界を超ãˆãªã‘ã‚Œã°ã€ç¾åœ¨ã®è¡Œã‹ã‚‰ã‚ªãƒ•ã‚»ãƒƒãƒˆè·é›¢ã®`column`ã®å€¤ã€‚ +- オフセットãŒãƒ–ロック境界を超ãˆã‚‹ã¨ãã®`column`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¾ãŸã¯`default_value`(指定ã•ã‚Œã¦ã„ã‚‹å ´åˆï¼‰ã€‚ + +:::note +戻り値ã®åž‹ã¯å½±éŸ¿ã‚’å—ã‘ãŸãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®åž‹ã¾ãŸã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã®åž‹ã§ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT number, neighbor(number, 2) FROM system.numbers LIMIT 10; +``` + +çµæžœï¼š + +```text +┌─number─┬─neighbor(number, 2)─┠+│ 0 │ 2 │ +│ 1 │ 3 │ +│ 2 │ 4 │ +│ 3 │ 5 │ +│ 4 │ 6 │ +│ 5 │ 7 │ +│ 6 │ 8 │ +│ 7 │ 9 │ +│ 8 │ 0 │ +│ 9 │ 0 │ +└────────┴─────────────────────┘ +``` + +クエリ: + +```sql +SELECT number, neighbor(number, 2, 999) FROM system.numbers LIMIT 10; +``` + +çµæžœï¼š + +```text +┌─number─┬─neighbor(number, 2, 999)─┠+│ 0 │ 2 │ +│ 1 │ 3 │ +│ 2 │ 4 │ +│ 3 │ 5 │ +│ 4 │ 6 │ +│ 5 │ 7 │ +│ 6 │ 8 │ +│ 7 │ 9 │ +│ 8 │ 999 │ +│ 9 │ 999 │ +└────────┴──────────────────────────┘ +``` + +ã“ã®é–¢æ•°ã¯å¹´ã€…ã®ãƒ¡ãƒˆãƒªã‚¯ã‚¹å€¤ã‚’計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ï¼š + +クエリ: + +```sql +WITH toDate('2018-01-01') AS start_date +SELECT + toStartOfMonth(start_date + (number * 32)) AS month, + toInt32(month) % 100 AS money, + neighbor(money, -12) AS prev_year, + round(prev_year / money, 2) AS year_over_year +FROM numbers(16) +``` + +çµæžœï¼š + +```text +┌──────month─┬─money─┬─prev_year─┬─year_over_year─┠+│ 2018-01-01 │ 32 │ 0 │ 0 │ +│ 2018-02-01 │ 63 │ 0 │ 0 │ +│ 2018-03-01 │ 91 │ 0 │ 0 │ +│ 2018-04-01 │ 22 │ 0 │ 0 │ +│ 2018-05-01 │ 52 │ 0 │ 0 │ +│ 2018-06-01 │ 83 │ 0 │ 0 │ +│ 2018-07-01 │ 13 │ 0 │ 0 │ +│ 2018-08-01 │ 44 │ 0 │ 0 │ +│ 2018-09-01 │ 75 │ 0 │ 0 │ +│ 2018-10-01 │ 5 │ 0 │ 0 │ +│ 2018-11-01 │ 36 │ 0 │ 0 │ +│ 2018-12-01 │ 66 │ 0 │ 0 │ +│ 2019-01-01 │ 97 │ 32 │ 0.33 │ +│ 2019-02-01 │ 28 │ 63 │ 2.25 │ +│ 2019-03-01 │ 56 │ 91 │ 1.62 │ +│ 2019-04-01 │ 87 │ 22 │ 0.25 │ +└────────────┴───────┴───────────┴────────────────┘ +``` + +## runningDifference {#runningDifference} + +データブロック内ã®2ã¤ã®é€£ç¶šã™ã‚‹è¡Œã®å€¤ã®å·®ã‚’計算ã—ã¾ã™ã€‚ +最åˆã®è¡Œã«ã¯0ã‚’è¿”ã—ã€ä»¥é™ã®è¡Œã«ã¯1ã¤å‰ã®è¡Œã¨ã®å·®ã‚’è¿”ã—ã¾ã™ã€‚ + +:::note +ç¾åœ¨å‡¦ç†ã—ã¦ã„るデータブロックã®ä¸­ã§ã®ã¿å·®åˆ†ã‚’è¿”ã—ã¾ã™ã€‚ +誤りやã™ã„動作ã®ãŸã‚ã€é–¢æ•°ã¯éžæŽ¨å¥¨ã§ã™ã€‚é©åˆ‡ãªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã‚’使用ã—ã¦ãã ã•ã„。 +::: + +関数ã®çµæžœã¯å½±éŸ¿ã‚’å—ã‘るデータブロックã¨ãƒ–ロック内ã®ãƒ‡ãƒ¼ã‚¿ã®é †åºã«ã‚ˆã‚Šã¾ã™ã€‚ + +`runningDifference()`ã®è¨ˆç®—中ã®è¡Œã®é †åºã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¿”ã•ã‚Œã‚‹è¡Œã®é †åºã¨ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +ã“れを防ããŸã‚ã«ã¯ã€[ORDER BY](../../sql-reference/statements/select/order-by.md)を使用ã—ã¦ã‚µãƒ–クエリを作æˆã—ã€ã‚µãƒ–クエリã®å¤–部ã‹ã‚‰é–¢æ•°ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +```sql +runningDifference(x) +``` + +**例** + +クエリ: + +```sql +SELECT + EventID, + EventTime, + runningDifference(EventTime) AS delta +FROM +( + SELECT + EventID, + EventTime + FROM events + WHERE EventDate = '2016-11-24' + ORDER BY EventTime ASC + LIMIT 5 +) +``` + +çµæžœï¼š + +```text +┌─EventID─┬───────────EventTime─┬─delta─┠+│ 1106 │ 2016-11-24 00:00:04 │ 0 │ +│ 1107 │ 2016-11-24 00:00:05 │ 1 │ +│ 1108 │ 2016-11-24 00:00:05 │ 0 │ +│ 1109 │ 2016-11-24 00:00:09 │ 4 │ +│ 1110 │ 2016-11-24 00:00:10 │ 1 │ +└─────────┴─────────────────────┴───────┘ +``` + +ブロックサイズãŒçµæžœã«å½±éŸ¿ã‚’与ãˆã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 +`runningDifference`ã®å†…部状態ã¯æ–°ã—ã„ブロックã”ã¨ã«ãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +クエリ: + +```sql +SELECT + number, + runningDifference(number + 1) AS diff +FROM numbers(100000) +WHERE diff != 1 +``` + +çµæžœï¼š + +```text +┌─number─┬─diff─┠+│ 0 │ 0 │ +└────────┴──────┘ +┌─number─┬─diff─┠+│ 65536 │ 0 │ +└────────┴──────┘ +``` + +クエリ: + +```sql +set max_block_size=100000 -- デフォルト値ã¯65536ã§ã™ï¼ + +SELECT + number, + runningDifference(number + 1) AS diff +FROM numbers(100000) +WHERE diff != 1 +``` + +çµæžœï¼š + +```text +┌─number─┬─diff─┠+│ 0 │ 0 │ +└────────┴──────┘ +``` + +## runningDifferenceStartingWithFirstValue + +:::note +ã“ã®é–¢æ•°ã¯DEPRECATEDã§ã™ï¼ˆ`runningDifference`ã®æ³¨é‡ˆã‚’å‚照)。 +::: + +最åˆã®è¡Œã®å€¤ã‚’最åˆã®è¡Œã«è¿”ã™ä»¥å¤–ã¯ã€[runningDifference](./other-functions.md#other_functions-runningdifference)ã¨åŒã˜ã§ã™ã€‚ + +## runningConcurrency + +åŒæ™‚ã«ç™ºç”Ÿã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã®æ•°ã‚’計算ã—ã¾ã™ã€‚ +å„イベントã«ã¯é–‹å§‹æ™‚é–“ã¨çµ‚了時間ãŒã‚ã‚Šã¾ã™ã€‚ +開始時間ã¯ã‚¤ãƒ™ãƒ³ãƒˆã«å«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€çµ‚了時間ã¯é™¤å¤–ã•ã‚Œã¦ã„ã¾ã™ã€‚列ã®é–‹å§‹æ™‚é–“ã¨çµ‚了時間ã¯åŒã˜ãƒ‡ãƒ¼ã‚¿åž‹ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +関数ã¯ã€å„イベントã®é–‹å§‹æ™‚é–“ã«å¯¾ã—ã¦ã‚¢ã‚¯ãƒ†ã‚£ãƒ–(並行)ã®ã‚¤ãƒ™ãƒ³ãƒˆã®ç·æ•°ã‚’計算ã—ã¾ã™ã€‚ + +:::tip +イベントã¯é–‹å§‹æ™‚é–“ã§æ˜‡é †ã«ä¸¦ã¹ã‚‰ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®è¦ä»¶ãŒæº€ãŸã•ã‚Œãªã„å ´åˆã€é–¢æ•°ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ +ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã¯åˆ¥ã€…ã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã‹ã‚‰ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒé‡ãªã‚‹å ´åˆã€ãれらã¯æ­£ã—ã処ç†ã•ã‚Œã¾ã›ã‚“。 +::: + +**構文** + +```sql +runningConcurrency(start, end) +``` + +**引数** + +- `start` — イベントã®é–‹å§‹æ™‚é–“ã‚’æŒã¤ã‚«ãƒ©ãƒ ã€‚[Date](../data-types/date.md), [DateTime](../data-types/datetime.md), ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 +- `end` — イベントã®çµ‚了時間をæŒã¤ã‚«ãƒ©ãƒ ã€‚[Date](../data-types/date.md), [DateTime](../data-types/datetime.md), ã¾ãŸã¯ [DateTime64](../data-types/datetime64.md)。 + +**戻り値** + +- å„イベントã®é–‹å§‹æ™‚é–“ã«ãŠã‘ã‚‹åŒæ™‚ã«ç™ºç”Ÿã—ã¦ã„るイベントã®æ•°ã€‚[UInt32](../data-types/int-uint.md) + +**例** + +表ã¯ï¼š + +```text +┌──────start─┬────────end─┠+│ 2021-03-03 │ 2021-03-11 │ +│ 2021-03-06 │ 2021-03-12 │ +│ 2021-03-07 │ 2021-03-08 │ +│ 2021-03-11 │ 2021-03-12 │ +└────────────┴────────────┘ +``` + +クエリ: + +```sql +SELECT start, runningConcurrency(start, end) FROM example_table; +``` + +çµæžœï¼š + +```text +┌──────start─┬─runningConcurrency(start, end)─┠+│ 2021-03-03 │ 1 │ +│ 2021-03-06 │ 2 │ +│ 2021-03-07 │ 3 │ +│ 2021-03-11 │ 2 │ +└────────────┴────────────────────────────────┘ +``` + +## MACNumToString + +UInt64数値をビッグエンディアン形å¼ã®MACアドレスã¨ã—ã¦è§£é‡ˆã—ã¾ã™ã€‚ +対応ã™ã‚‹MACアドレスをAA:BB:CC:DD:EE:FF(コロンã§åŒºåˆ‡ã£ãŸ16進数)形å¼ã§æ–‡å­—列ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +MACNumToString(num) +``` + +## MACStringToNum + +MACNumToStringã®é€†é–¢æ•°ã§ã™ã€‚MACアドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +MACStringToNum(s) +``` + +## MACStringToOUI + +MACアドレスをAA:BB:CC:DD:EE:FF(コロンã§åŒºåˆ‡ã£ãŸ16進数)形å¼ã§æŒ‡å®šã™ã‚‹ã¨ã€æœ€åˆã®3オクテットをUInt64数値ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ +MACアドレスãŒç„¡åŠ¹ãªå½¢å¼ã®å ´åˆã€0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +MACStringToOUI(s) +``` + +## getSizeOfEnumType + +[Enum](../data-types/enum.md)åž‹ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®æ•°ã‚’è¿”ã—ã¾ã™ã€‚ +åž‹ãŒ`Enum`ã§ãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +getSizeOfEnumType(value) +``` + +**引数:** + +- `value` — `Enum`åž‹ã®å€¤ã€‚ + +**戻り値** + +- `Enum`型入力値ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +```sql +SELECT getSizeOfEnumType( CAST('a' AS Enum8('a' = 1, 'b' = 2) ) ) AS x +``` + +```text +┌─x─┠+│ 2 │ +└───┘ +``` + +## blockSerializedSize + +圧縮を考慮ã›ãšã«ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ã‚µã‚¤ã‚ºã‚’è¿”ã—ã¾ã™ã€‚ + +```sql +blockSerializedSize(value[, value[, ...]]) +``` + +**引数** + +- `value` — ä»»æ„ã®å€¤ã€‚ + +**戻り値** + +- ブロックã®å€¤ã‚’書ã込むãŸã‚ã«ãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ãƒã‚¤ãƒˆæ•°ã‚’è¿”ã—ã¾ã™ã€‚ãŸã ã—ã€åœ§ç¸®ã‚’考慮ã—ã¾ã›ã‚“。 + +**例** + +クエリ: + +```sql +SELECT blockSerializedSize(maxState(1)) as x +``` + +çµæžœï¼š + +```text +┌─x─┠+│ 2 │ +└───┘ +``` + +## toColumnTypeName + +値を表ã—ã¦ã„るデータ型ã®å†…部åã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toColumnTypeName(value) +``` + +**引数:** + +- `value` — ä»»æ„ã®åž‹ã®å€¤ã€‚ + +**戻り値** + +- `value`を表ã™ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹å†…部データ型å。 + +**例** + +`toTypeName`ã¨`toColumnTypeName`ã®é•ã„: + +```sql +SELECT toTypeName(CAST('2018-01-01 01:02:03' AS DateTime)) +``` + +çµæžœï¼š + +```text +┌─toTypeName(CAST('2018-01-01 01:02:03', 'DateTime'))─┠+│ DateTime │ +└─────────────────────────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT toColumnTypeName(CAST('2018-01-01 01:02:03' AS DateTime)) +``` + +çµæžœï¼š + +```text +┌─toColumnTypeName(CAST('2018-01-01 01:02:03', 'DateTime'))─┠+│ Const(UInt32) │ +└───────────────────────────────────────────────────────────┘ +``` + +例ã¯`DateTime`データ型ãŒå†…部的ã«`Const(UInt32)`ã¨ã—ã¦æ ¼ç´ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +## dumpColumnStructure + +RAM内ã®ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®è©³ç´°ãªèª¬æ˜Žã‚’出力ã—ã¾ã™ã€‚ + +```sql +dumpColumnStructure(value) +``` + +**引数:** + +- `value` — ä»»æ„ã®åž‹ã®å€¤ã€‚ + +**戻り値** + +- `value`を表ã™ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ æ§‹é€ ã®èª¬æ˜Žã€‚ + +**例** + +```sql +SELECT dumpColumnStructure(CAST('2018-01-01 01:02:03', 'DateTime')) +``` + +```text +┌─dumpColumnStructure(CAST('2018-01-01 01:02:03', 'DateTime'))─┠+│ DateTime, Const(size = 1, UInt32(size = 1)) │ +└──────────────────────────────────────────────────────────────┘ +``` + +## defaultValueOfArgumentType + +指定ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ã«å¯¾ã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +ユーザーãŒè¨­å®šã—ãŸã‚«ã‚¹ã‚¿ãƒ ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯å«ã¾ã‚Œã¾ã›ã‚“。 + +**構文** + +```sql +defaultValueOfArgumentType(expression) +``` + +**引数:** + +- `expression` — ä»»æ„ã®åž‹ã‹ä»»æ„ã®åž‹ã®å€¤ã‚’çµæžœã¨ã™ã‚‹å¼ã€‚ + +**戻り値** + +- 数値ã®å ´åˆã¯`0`。 +- 文字列ã®å ´åˆã¯ç©ºæ–‡å­—列。 +- [Nullable](../data-types/nullable.md)ã®å ´åˆã¯`á´ºáµá´¸á´¸`。 + +**例** + +クエリ: + +```sql +SELECT defaultValueOfArgumentType( CAST(1 AS Int8) ) +``` + +çµæžœï¼š + +```text +┌─defaultValueOfArgumentType(CAST(1, 'Int8'))─┠+│ 0 │ +└─────────────────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT defaultValueOfArgumentType( CAST(1 AS Nullable(Int8) ) ) +``` + +çµæžœï¼š + +```text +┌─defaultValueOfArgumentType(CAST(1, 'Nullable(Int8)'))─┠+│ á´ºáµá´¸á´¸ │ +└───────────────────────────────────────────────────────┘ +``` + +## defaultValueOfTypeName + +指定ã•ã‚ŒãŸåž‹åã«å¯¾ã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +ユーザーãŒè¨­å®šã—ãŸã‚«ã‚¹ã‚¿ãƒ ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯å«ã¾ã‚Œã¾ã›ã‚“。 + +```sql +defaultValueOfTypeName(type) +``` + +**引数:** + +- `type` — åž‹åを表ã™æ–‡å­—列。 + +**戻り値** + +- 数値ã®å ´åˆã¯`0`。 +- 文字列ã®å ´åˆã¯ç©ºæ–‡å­—列。 +- [Nullable](../data-types/nullable.md)ã®å ´åˆã¯`á´ºáµá´¸á´¸`。 + +**例** + +クエリ: + +```sql +SELECT defaultValueOfTypeName('Int8') +``` + +çµæžœï¼š + +```text +┌─defaultValueOfTypeName('Int8')─┠+│ 0 │ +└────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT defaultValueOfTypeName('Nullable(Int8)') +``` + +çµæžœï¼š + +```text +┌─defaultValueOfTypeName('Nullable(Int8)')─┠+│ á´ºáµá´¸á´¸ │ +└──────────────────────────────────────────┘ +``` + +## indexHint + +ã“ã®é–¢æ•°ã¯ãƒ‡ãƒãƒƒã‚°ã¨ã‚¤ãƒ³ãƒˆãƒ­ã‚¹ãƒšã‚¯ã‚·ãƒ§ãƒ³ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚引数を無視ã—ã¦å¸¸ã«1ã‚’è¿”ã—ã¾ã™ã€‚引数ã¯è©•ä¾¡ã•ã‚Œã¾ã›ã‚“。 + +ãŸã ã—ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹åˆ†æžä¸­ã«ã“ã®é–¢æ•°ã®å¼•æ•°ã¯`indexHint`ã§ãƒ©ãƒƒãƒ—ã•ã‚Œã¦ã„ãªã„ã¨ä»®å®šã•ã‚Œã¾ã™ã€‚ +ã“ã‚Œã«ã‚ˆã‚Šã€å¯¾å¿œã™ã‚‹æ¡ä»¶ã§ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç¯„囲ã®ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã§ãã¾ã™ãŒã€ãã®æ¡ä»¶ã«ã‚ˆã‚‹ã•ã‚‰ãªã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¯è¡Œã„ã¾ã›ã‚“。ClickHouseã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã‚¹ãƒ‘ースã§ã‚ã‚Šã€`indexHint`を使用ã™ã‚‹ã¨ã€åŒã˜æ¡ä»¶ã‚’直接指定ã—ãŸå ´åˆã‚ˆã‚Šã‚‚多ãã®ãƒ‡ãƒ¼ã‚¿ãŒå¾—られã¾ã™ã€‚ + +**構文** + +```sql +SELECT * FROM table WHERE indexHint() +``` + +**戻り値** + +- `1`。[Uint8](../data-types/int-uint.md)。 + +**例** + +次ã¯ã€ãƒ†ãƒ¼ãƒ–ル[ontime](../../getting-started/example-datasets/ontime.md)ã®ãƒ†ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã®ä¾‹ã§ã™ã€‚ + +テーブル: + +```sql +SELECT count() FROM ontime +``` + +```text +┌─count()─┠+│ 4276457 │ +└─────────┘ +``` + +テーブルã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰`(FlightDate, (Year, FlightDate))`ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ + +インデックスを使用ã—ãªã„クエリを作æˆã—ã¾ã™ï¼š + +```sql +SELECT FlightDate AS k, count() FROM ontime GROUP BY k ORDER BY k +``` + +ClickHouseã¯ãƒ†ãƒ¼ãƒ–ル全体を処ç†ã—ã¾ã™ï¼ˆ`ç´„428万行処ç†æ¸ˆã¿`)。 + +çµæžœï¼š + +```text +┌──────────k─┬─count()─┠+│ 2017-01-01 │ 13970 │ +│ 2017-01-02 │ 15882 │ +........................ +│ 2017-09-28 │ 16411 │ +│ 2017-09-29 │ 16384 │ +│ 2017-09-30 │ 12520 │ +└────────────┴─────────┘ +``` + +インデックスをé©ç”¨ã™ã‚‹ã«ã¯ã€ç‰¹å®šã®æ—¥ä»˜ã‚’é¸æŠžã—ã¾ã™ï¼š + +```sql +SELECT FlightDate AS k, count() FROM ontime WHERE k = '2017-09-15' GROUP BY k ORDER BY k +``` + +ClickHouseç¾åœ¨ã§ã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’利用ã—ã€ã¯ã‚‹ã‹ã«å°‘ãªã„行数(`32,740行処ç†æ¸ˆã¿`)を処ç†ã—ã¾ã™ã€‚ + +çµæžœï¼š + +```text +┌──────────k─┬─count()─┠+│ 2017-09-15 │ 16428 │ +└────────────┴─────────┘ +``` + +今ã€å¼`k = '2017-09-15'`を関数`indexHint`ã§ãƒ©ãƒƒãƒ—ã—ã¾ã™ï¼š + +クエリ: + +```sql +SELECT + FlightDate AS k, + count() +FROM ontime +WHERE indexHint(k = '2017-09-15') +GROUP BY k +ORDER BY k ASC +``` + +ClickHouseã¯å‰å›žã¨åŒæ§˜ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¾ã—ãŸï¼ˆ`32,740行処ç†æ¸ˆã¿`)。 +çµæžœã‚’生æˆã™ã‚‹éš›ã«`k = '2017-09-15'`ã®å¼ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“ã§ã—ãŸã€‚例ã§ã¯ã€`indexHint`関数を使用ã—ã¦éš£æŽ¥ã™ã‚‹æ—¥ä»˜ã‚’確èªã§ãã¾ã™ã€‚ + +çµæžœï¼š + +```text +┌──────────k─┬─count()─┠+│ 2017-09-14 │ 7071 │ +│ 2017-09-15 │ 16428 │ +│ 2017-09-16 │ 1077 │ +│ 2017-09-30 │ 8167 │ +└────────────┴─────────┘ +``` + +## replicate + +å˜ä¸€ã®å€¤ã‚’æŒã¤é…列を作æˆã—ã¾ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ã¯[é…列çµåˆ](../../sql-reference/functions/array-join.md#functions_arrayjoin)ã®å†…部実装ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +**構文** + +```sql +replicate(x, arr) +``` + +**引数** + +- `x` — çµæžœé…列を埋ã‚る値。 +- `arr` — é…列。[Array](../data-types/array.md)。 + +**戻り値** + +`arr`ã¨åŒã˜é•·ã•ã§å€¤`x`ã§æº€ãŸã•ã‚ŒãŸé…列。[Array](../data-types/array.md)。 + +**例** + +クエリ: + +```sql +SELECT replicate(1, ['a', 'b', 'c']); +``` + +çµæžœï¼š + +```text +┌─replicate(1, ['a', 'b', 'c'])─┠+│ [1,1,1] │ +└───────────────────────────────┘ +``` + +## revision + +ç¾åœ¨ã®ClickHouse [サーãƒãƒªãƒ“ジョン](../../operations/system-tables/metrics#revision)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +revision() +``` + +**戻り値** + +- ç¾åœ¨ã®ClickHouseサーãƒãƒ¼ãƒªãƒ“ジョン。[UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT revision(); +``` + +çµæžœï¼š + +```response +┌─revision()─┠+│ 54485 │ +└────────────┘ +``` + + +## filesystemAvailable + +データベースã®æ°¸ç¶šåŒ–をホスティングã—ã¦ã„るファイルシステムã®ç©ºãスペースを返ã—ã¾ã™ã€‚è¿”ã•ã‚Œã‚‹å€¤ã¯ã€ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã®ãŸã‚ã«äºˆç´„ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€å¸¸ã«åˆè¨ˆã®ç©ºãスペース ([filesystemFree](#filesystemfree)) よりもå°ã•ããªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +filesystemAvailable() +``` + +**返り値** + +- ãƒã‚¤ãƒˆå˜ä½ã§ã®æ®‹ã‚Šã®ç©ºãスペースã®é‡ã§ã™ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT formatReadableSize(filesystemAvailable()) AS "Available space"; +``` + +çµæžœ: + +```text +┌─Available space─┠+│ 30.75 GiB │ +└─────────────────┘ +``` + +## filesystemUnreserved + +データベースã®æ°¸ç¶šåŒ–をホスティングã—ã¦ã„るファイルシステムã®åˆè¨ˆç©ºãスペースを返ã—ã¾ã™ã€‚(以å‰ã¯ `filesystemFree`)。[`filesystemAvailable`](#filesystemavailable) ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +filesystemUnreserved() +``` + +**返り値** + +- 空ãスペースã®é‡ï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã§ã™ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT formatReadableSize(filesystemUnreserved()) AS "Free space"; +``` + +çµæžœ: + +```text +┌─Free space─┠+│ 32.39 GiB │ +└────────────┘ +``` + +## filesystemCapacity + +ファイルシステムã®å®¹é‡ã‚’ãƒã‚¤ãƒˆå˜ä½ã§è¿”ã—ã¾ã™ã€‚データディレクトリã®[パス](../../operations/server-configuration-parameters/settings.md#path)を設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +filesystemCapacity() +``` + +**返り値** + +- ãƒã‚¤ãƒˆå˜ä½ã§ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã®å®¹é‡ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT formatReadableSize(filesystemCapacity()) AS "Capacity"; +``` + +çµæžœ: + +```text +┌─Capacity──┠+│ 39.32 GiB │ +└───────────┘ +``` + +## initializeAggregation + +å˜ä¸€ã®å€¤ã«åŸºã¥ã„ã¦é›†è¨ˆé–¢æ•°ã®çµæžœã‚’計算ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€[-State](../../sql-reference/aggregate-functions/combinators.md#agg-functions-combinator-state) コンビãƒãƒ¼ã‚¿ã‚’使用ã—ã¦é›†è¨ˆé–¢æ•°ã‚’åˆæœŸåŒ–ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚集計関数ã®çŠ¶æ…‹ã‚’作æˆã—ã€ãれらを [AggregateFunction](../data-types/aggregatefunction.md#data-type-aggregatefunction) åž‹ã®ã‚«ãƒ©ãƒ ã«æŒ¿å…¥ã™ã‚‹ã‹ã€åˆæœŸåŒ–ã•ã‚ŒãŸé›†è¨ˆã‚’デフォルト値ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**構文** + +```sql +initializeAggregation (aggregate_function, arg1, arg2, ..., argN) +``` + +**引数** + +- `aggregate_function` — åˆæœŸåŒ–ã™ã‚‹é›†è¨ˆé–¢æ•°ã®åå‰ã€‚[String](../data-types/string.md)。 +- `arg` — 集計関数ã®å¼•æ•°ã€‚ + +**返り値** + +- 関数ã«æ¸¡ã•ã‚ŒãŸå„è¡Œã«å¯¾ã™ã‚‹é›†è¨ˆã®çµæžœã€‚ + +返り値ã®åž‹ã¯ã€æœ€åˆã®å¼•æ•°ã¨ã—㦠`initializeAggregation` ãŒå–る関数ã®è¿”り値ã®åž‹ã¨åŒã˜ã§ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT uniqMerge(state) FROM (SELECT initializeAggregation('uniqState', number % 3) AS state FROM numbers(10000)); +``` + +çµæžœ: + +```text +┌─uniqMerge(state)─┠+│ 3 │ +└──────────────────┘ +``` + +クエリ: + +```sql +SELECT finalizeAggregation(state), toTypeName(state) FROM (SELECT initializeAggregation('sumState', number % 3) AS state FROM numbers(5)); +``` + +çµæžœ: + +```text +┌─finalizeAggregation(state)─┬─toTypeName(state)─────────────┠+│ 0 │ AggregateFunction(sum, UInt8) │ +│ 1 │ AggregateFunction(sum, UInt8) │ +│ 2 │ AggregateFunction(sum, UInt8) │ +│ 0 │ AggregateFunction(sum, UInt8) │ +│ 1 │ AggregateFunction(sum, UInt8) │ +└────────────────────────────┴───────────────────────────────┘ +``` + +`AggregatingMergeTree` テーブルエンジン㨠`AggregateFunction` カラムを使用ã—ãŸä¾‹: + +```sql +CREATE TABLE metrics +( + key UInt64, + value AggregateFunction(sum, UInt64) DEFAULT initializeAggregation('sumState', toUInt64(0)) +) +ENGINE = AggregatingMergeTree +ORDER BY key +``` + +```sql +INSERT INTO metrics VALUES (0, initializeAggregation('sumState', toUInt64(42))) +``` + +**関連情報** + +- [arrayReduce](../../sql-reference/functions/array-functions.md#arrayreduce) + +## finalizeAggregation + +集計関数ã®çŠ¶æ…‹ã‚’与ãˆã‚‹ã¨ã€ã“ã®é–¢æ•°ã¯é›†è¨ˆã®çµæžœï¼ˆã¾ãŸã¯ [-State](../../sql-reference/aggregate-functions/combinators.md#agg-functions-combinator-state) コンビãƒãƒ¼ã‚¿ã‚’使用ã™ã‚‹éš›ã®æœ€çµ‚化ã•ã‚ŒãŸçŠ¶æ…‹ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +finalizeAggregation(state) +``` + +**引数** + +- `state` — 集計ã®çŠ¶æ…‹ã€‚[AggregateFunction](../data-types/aggregatefunction.md#data-type-aggregatefunction)。 + +**返り値** + +- 集計ã•ã‚ŒãŸå€¤/値。 + +:::note +返り値ã®åž‹ã¯é›†è¨ˆã•ã‚ŒãŸä»»æ„ã®åž‹ã¨ç­‰ã—ã„ã§ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT finalizeAggregation(( SELECT countState(number) FROM numbers(10))); +``` + +çµæžœ: + +```text +┌─finalizeAggregation(_subquery16)─┠+│ 10 │ +└──────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT finalizeAggregation(( SELECT sumState(number) FROM numbers(10))); +``` + +çµæžœ: + +```text +┌─finalizeAggregation(_subquery20)─┠+│ 45 │ +└──────────────────────────────────┘ +``` + +`NULL` 値ã¯ç„¡è¦–ã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +クエリ: + +```sql +SELECT finalizeAggregation(arrayReduce('anyState', [NULL, 2, 3])); +``` + +çµæžœ: + +```text +┌─finalizeAggregation(arrayReduce('anyState', [NULL, 2, 3]))─┠+│ 2 │ +└────────────────────────────────────────────────────────────┘ +``` + +複åˆçš„ãªä¾‹: + +クエリ: + +```sql +WITH initializeAggregation('sumState', number) AS one_row_sum_state +SELECT + number, + finalizeAggregation(one_row_sum_state) AS one_row_sum, + runningAccumulate(one_row_sum_state) AS cumulative_sum +FROM numbers(10); +``` + +çµæžœ: + +```text +┌─number─┬─one_row_sum─┬─cumulative_sum─┠+│ 0 │ 0 │ 0 │ +│ 1 │ 1 │ 1 │ +│ 2 │ 2 │ 3 │ +│ 3 │ 3 │ 6 │ +│ 4 │ 4 │ 10 │ +│ 5 │ 5 │ 15 │ +│ 6 │ 6 │ 21 │ +│ 7 │ 7 │ 28 │ +│ 8 │ 8 │ 36 │ +│ 9 │ 9 │ 45 │ +└────────┴─────────────┴────────────────┘ +``` + +**関連情報** + +- [arrayReduce](../../sql-reference/functions/array-functions.md#arrayreduce) +- [initializeAggregation](#initializeaggregation) + +## runningAccumulate + +データブロックã®å„è¡Œã«å¯¾ã™ã‚‹é›†è¨ˆé–¢æ•°ã®çŠ¶æ…‹ã‚’ç´¯ç©ã—ã¾ã™ã€‚ + +:::note +状態ã¯æ–°ã—ã„データブロックã”ã¨ã«ãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ +ã“ã®èª¤ã‚Šã‚„ã™ã„動作ã®ãŸã‚ã€ã“ã®é–¢æ•°ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。代ã‚ã‚Šã«é©åˆ‡ãªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã‚’使用ã—ã¦ãã ã•ã„。 +::: + +**構文** + +```sql +runningAccumulate(agg_state[, grouping]); +``` + +**引数** + +- `agg_state` — 集計関数ã®çŠ¶æ…‹ã€‚[AggregateFunction](../data-types/aggregatefunction.md#data-type-aggregatefunction)。 +- `grouping` — グルーピングキー。オプション。`grouping` ã®å€¤ãŒå¤‰ã‚ã‚‹ã¨é–¢æ•°ã®çŠ¶æ…‹ãŒãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るデータ型ã®ä¸­ã§ç­‰ä¾¡æ¼”ç®—å­ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã‚’使用ã§ãã¾ã™ã€‚ + +**返り値** + +- çµæžœã®å„è¡Œã«ã¯ã€å…¥åŠ›è¡Œã®0ã‹ã‚‰ç¾åœ¨ã®ä½ç½®ã¾ã§ã®ã™ã¹ã¦ã®è¡Œã«å¯¾ã™ã‚‹é›†è¨ˆé–¢æ•°ã®çµæžœãŒå«ã¾ã‚Œã¾ã™ã€‚`runningAccumulate` ã¯ã€å„æ–°ã—ã„データブロックã¾ãŸã¯ `grouping` 値ãŒå¤‰ã‚ã£ãŸã¨ãã«çŠ¶æ…‹ã‚’リセットã—ã¾ã™ã€‚ + +åž‹ã¯ä½¿ç”¨ã•ã‚ŒãŸé›†è¨ˆé–¢æ•°ã«ä¾å­˜ã—ã¾ã™ã€‚ + +**例** + +グルーピングを使用ã›ãšã«æ•°å€¤ã®ç´¯ç©åˆè¨ˆã‚’求ã‚る方法ã¨ã€ã‚°ãƒ«ãƒ¼ãƒ”ングを使用ã™ã‚‹æ–¹æ³•ã‚’考ãˆã¦ã¿ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT k, runningAccumulate(sum_k) AS res FROM (SELECT number as k, sumState(k) AS sum_k FROM numbers(10) GROUP BY k ORDER BY k); +``` + +çµæžœ: + +```text +┌─k─┬─res─┠+│ 0 │ 0 │ +│ 1 │ 1 │ +│ 2 │ 3 │ +│ 3 │ 6 │ +│ 4 │ 10 │ +│ 5 │ 15 │ +│ 6 │ 21 │ +│ 7 │ 28 │ +│ 8 │ 36 │ +│ 9 │ 45 │ +└───┴─────┘ +``` + +サブクエリã¯ã€`0` ã‹ã‚‰ `9` ã¾ã§ã®å„数値ã«é–¢ã—㦠`sumState` を生æˆã—ã¾ã™ã€‚`sumState` ã¯ã€å˜ä¸€ã®æ•°ã®åˆè¨ˆã‚’å«ã‚€ [sum](../../sql-reference/aggregate-functions/reference/sum.md) 関数ã®çŠ¶æ…‹ã‚’è¿”ã—ã¾ã™ã€‚ + +全体ã®ã‚¯ã‚¨ãƒªã¯æ¬¡ã®ã“ã¨ã‚’è¡Œã„ã¾ã™: + +1. 最åˆã®è¡Œã§ã¯ã€`runningAccumulate` 㯠`sumState(0)` ã‚’å–å¾—ã— `0` ã‚’è¿”ã—ã¾ã™ã€‚ +2. 2番目ã®è¡Œã§ã¯ã€é–¢æ•°ã¯ `sumState(0)` 㨠`sumState(1)` をマージã—ã€`sumState(0 + 1)` を生æˆã—ã€çµæžœã¨ã—㦠`1` ã‚’è¿”ã—ã¾ã™ã€‚ +3. 3番目ã®è¡Œã§ã¯ã€é–¢æ•°ã¯ `sumState(0 + 1)` 㨠`sumState(2)` をマージã—ã€`sumState(0 + 1 + 2)` を生æˆã—ã€çµæžœã¨ã—㦠`3` ã‚’è¿”ã—ã¾ã™ã€‚ +4. ブロックãŒçµ‚了ã™ã‚‹ã¾ã§ã“れらã®æ“作ãŒç¹°ã‚Šè¿”ã•ã‚Œã¾ã™ã€‚ + +以下ã®ä¾‹ã¯ã€`grouping` パラメータã®ä½¿ç”¨æ³•ã‚’示ã—ã¦ã„ã¾ã™: + +クエリ: + +```sql +SELECT + grouping, + item, + runningAccumulate(state, grouping) AS res +FROM +( + SELECT + toInt8(number / 4) AS grouping, + number AS item, + sumState(number) AS state + FROM numbers(15) + GROUP BY item + ORDER BY item ASC +); +``` + +çµæžœ: + +```text +┌─grouping─┬─item─┬─res─┠+│ 0 │ 0 │ 0 │ +│ 0 │ 1 │ 1 │ +│ 0 │ 2 │ 3 │ +│ 0 │ 3 │ 6 │ +│ 1 │ 4 │ 4 │ +│ 1 │ 5 │ 9 │ +│ 1 │ 6 │ 15 │ +│ 1 │ 7 │ 22 │ +│ 2 │ 8 │ 8 │ +│ 2 │ 9 │ 17 │ +│ 2 │ 10 │ 27 │ +│ 2 │ 11 │ 38 │ +│ 3 │ 12 │ 12 │ +│ 3 │ 13 │ 25 │ +│ 3 │ 14 │ 39 │ +└──────────┴──────┴─────┘ +``` + +ã”覧ã®ã¨ãŠã‚Šã€`runningAccumulate` ã¯å„è¡Œã®ã‚°ãƒ«ãƒ¼ãƒ—ã”ã¨ã«çŠ¶æ…‹ã‚’çµåˆã—ã¾ã™ã€‚ + +## joinGet + +関数ã¯[Dictionary](../../sql-reference/dictionaries/index.md)ã®ã‚ˆã†ã«ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’抽出ã—ã¾ã™ã€‚指定ã•ã‚ŒãŸçµåˆã‚­ãƒ¼ã‚’使用ã—ã¦[Join](../../engines/table-engines/special/join.md#creating-a-table)テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ã¾ã™ã€‚ + +:::note +`ENGINE = Join(ANY, LEFT, )` ステートメントã§ä½œæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +::: + +**構文** + +```sql +joinGet(join_storage_table_name, `value_column`, join_keys) +``` + +**引数** + +- `join_storage_table_name` — 検索ãŒå®Ÿè¡Œã•ã‚Œã‚‹å ´æ‰€ã‚’示ã™[識別å­](../../sql-reference/syntax.md#syntax-identifiers)。 +- `value_column` — å¿…è¦ãªãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ å。 +- `join_keys` — キーã®ãƒªã‚¹ãƒˆã€‚ + +:::note +識別å­ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ï¼ˆã‚³ãƒ³ãƒ•ã‚£ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã® `default_database` 設定をå‚照)ã§æ¤œç´¢ã•ã‚Œã¾ã™ã€‚デフォルトデータベースを上書ãã™ã‚‹ãŸã‚ã«ã¯ã€`USE db_name`ã¾ãŸã¯`db_name.db_table`ã®å½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルを指定ã—ã¾ã™ã€‚ +::: + +**返り値** + +- キーã®ãƒªã‚¹ãƒˆã«å¯¾å¿œã™ã‚‹å€¤ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +:::note +ã‚るキーãŒã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã«å­˜åœ¨ã—ãªã„å ´åˆã€ãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã®[join_use_nulls](../../operations/settings/settings.md#join_use_nulls)設定ã«åŸºã¥ã„ã¦`0`ã¾ãŸã¯`null`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +`join_use_nulls`ã®è©³ç´°ã«ã¤ã„ã¦ã¯[Join operation](../../engines/table-engines/special/join.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**例** + +入力テーブル: + +```sql +CREATE DATABASE db_test; +CREATE TABLE db_test.id_val(`id` UInt32, `val` UInt32) ENGINE = Join(ANY, LEFT, id); +INSERT INTO db_test.id_val VALUES (1, 11)(2, 12)(4, 13); +SELECT * FROM db_test.id_val; +``` + +```text +┌─id─┬─val─┠+│ 4 │ 13 │ +│ 2 │ 12 │ +│ 1 │ 11 │ +└────┴─────┘ +``` + +クエリ: + +```sql +SELECT number, joinGet(db_test.id_val, 'val', toUInt32(number)) from numbers(4); +``` + +çµæžœ: + +```text + ┌─number─┬─joinGet('db_test.id_val', 'val', toUInt32(number))─┠+1. │ 0 │ 0 │ +2. │ 1 │ 11 │ +3. │ 2 │ 12 │ +4. │ 3 │ 0 │ + └────────┴────────────────────────────────────────────────────┘ +``` + +`join_use_nulls` を使用ã—ã¦ã€ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã«ã‚­ãƒ¼ãŒå­˜åœ¨ã—ãªã„å ´åˆã«è¿”ã•ã‚Œã‚‹å‹•ä½œã‚’変更ã§ãã¾ã™ã€‚ + +```sql +CREATE DATABASE db_test; +CREATE TABLE db_test.id_val_nulls(`id` UInt32, `val` UInt32) ENGINE = Join(ANY, LEFT, id) SETTINGS join_use_nulls=1; +INSERT INTO db_test.id_val_nulls VALUES (1, 11)(2, 12)(4, 13); +SELECT * FROM db_test.id_val_nulls; +``` + +```text +┌─id─┬─val─┠+│ 4 │ 13 │ +│ 2 │ 12 │ +│ 1 │ 11 │ +└────┴─────┘ +``` + +クエリ: + +```sql +SELECT number, joinGet(db_test.id_val_nulls, 'val', toUInt32(number)) from numbers(4); +``` + +çµæžœ: + +```text + ┌─number─┬─joinGet('db_test.id_val_nulls', 'val', toUInt32(number))─┠+1. │ 0 │ á´ºáµá´¸á´¸ │ +2. │ 1 │ 11 │ +3. │ 2 │ 12 │ +4. │ 3 │ á´ºáµá´¸á´¸ │ + └────────┴──────────────────────────────────────────────────────────┘ +``` + +## joinGetOrNull + +[joinGet](#joinget) ã¨åŒæ§˜ã§ã™ãŒã€ã‚­ãƒ¼ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã™ä»£ã‚ã‚Šã« `NULL` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +joinGetOrNull(join_storage_table_name, `value_column`, join_keys) +``` + +**引数** + +- `join_storage_table_name` — 検索ãŒå®Ÿè¡Œã•ã‚Œã‚‹å ´æ‰€ã‚’示ã™[識別å­](../../sql-reference/syntax.md#syntax-identifiers)。 +- `value_column` — å¿…è¦ãªãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ å。 +- `join_keys` — キーã®ãƒªã‚¹ãƒˆã€‚ + +:::note +識別å­ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ï¼ˆã‚³ãƒ³ãƒ•ã‚£ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã® `default_database` 設定をå‚照)ã§æ¤œç´¢ã•ã‚Œã¾ã™ã€‚デフォルトデータベースを上書ãã™ã‚‹ãŸã‚ã«ã¯ã€`USE db_name`ã¾ãŸã¯`db_name.db_table`ã®å½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルを指定ã—ã¾ã™ã€‚ +::: + +**返り値** + +- キーã®ãƒªã‚¹ãƒˆã«å¯¾å¿œã™ã‚‹å€¤ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +:::note +ソーステーブルã«ç‰¹å®šã®ã‚­ãƒ¼ãŒå­˜åœ¨ã—ãªã„å ´åˆã€ãã®ã‚­ãƒ¼ã«å¯¾ã—㦠`NULL` ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +::: + +**例** + +入力テーブル: + +```sql +CREATE DATABASE db_test; +CREATE TABLE db_test.id_val(`id` UInt32, `val` UInt32) ENGINE = Join(ANY, LEFT, id); +INSERT INTO db_test.id_val VALUES (1, 11)(2, 12)(4, 13); +SELECT * FROM db_test.id_val; +``` + +```text +┌─id─┬─val─┠+│ 4 │ 13 │ +│ 2 │ 12 │ +│ 1 │ 11 │ +└────┴─────┘ +``` + +クエリ: + +```sql +SELECT number, joinGetOrNull(db_test.id_val, 'val', toUInt32(number)) from numbers(4); +``` + +çµæžœ: + +```text + ┌─number─┬─joinGetOrNull('db_test.id_val', 'val', toUInt32(number))─┠+1. │ 0 │ á´ºáµá´¸á´¸ │ +2. │ 1 │ 11 │ +3. │ 2 │ 12 │ +4. │ 3 │ á´ºáµá´¸á´¸ │ + └────────┴──────────────────────────────────────────────────────────┘ +``` + +## catboostEvaluate + +:::note +ã“ã®é–¢æ•°ã¯ ClickHouse Cloud ã§ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 +::: + +外部㮠catboost モデルを評価ã—ã¾ã™ã€‚[CatBoost](https://catboost.ai) ã¯ã€Yandex ã«ã‚ˆã‚Šé–‹ç™ºã•ã‚ŒãŸæ©Ÿæ¢°å­¦ç¿’ã®ãŸã‚ã®ã‚ªãƒ¼ãƒ—ンソースã®å‹¾é…ブースティングライブラリã§ã™ã€‚ +catboost モデルã¸ã®ãƒ‘スã¨ãƒ¢ãƒ‡ãƒ«ã®å¼•æ•°ï¼ˆç‰¹å¾´é‡ï¼‰ã‚’å—ã‘å–ã‚Šã€Float64 ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +catboostEvaluate(path_to_model, feature_1, feature_2, ..., feature_n) +``` + +**例** + +```sql +SELECT feat1, ..., feat_n, catboostEvaluate('/path/to/model.bin', feat_1, ..., feat_n) AS prediction +FROM data_table +``` + +**å‰ææ¡ä»¶** + +1. catboost 評価ライブラリをビルドã™ã‚‹ + +catboost モデルを評価ã™ã‚‹å‰ã«ã€`libcatboostmodel.` ライブラリを利用å¯èƒ½ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚コンパイル方法ã«ã¤ã„ã¦ã¯ [CatBoost ドキュメンテーション](https://catboost.ai/docs/concepts/c-plus-plus-api_dynamic-c-pluplus-wrapper.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +次ã«ã€clickhouse 設定㫠`libcatboostmodel.` ã®ãƒ‘スを指定ã—ã¦ãã ã•ã„: + +```xml + +... + /path/to/libcatboostmodel.so +... + +``` + +セキュリティãŠã‚ˆã³éš”離ã®ãŸã‚ã€ãƒ¢ãƒ‡ãƒ«è©•ä¾¡ã¯ã‚µãƒ¼ãƒãƒ¼ãƒ—ロセスã§ã¯ãªã clickhouse-library-bridge プロセスã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +`catboostEvaluate()` ã®æœ€åˆã®å®Ÿè¡Œæ™‚ã«ã€ã‚µãƒ¼ãƒãƒ¼ã¯ library bridge プロセスãŒã™ã§ã«å®Ÿè¡Œã•ã‚Œã¦ã„ãªã„å ´åˆã«ã“れを開始ã—ã¾ã™ã€‚両プロセス㯠HTTP インターフェースを使用ã—ã¦é€šä¿¡ã—ã¾ã™ã€‚デフォルトã§ã¯ã€ãƒãƒ¼ãƒˆ `9012` ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ãƒãƒ¼ãƒˆ `9012` ãŒä»–ã®ã‚µãƒ¼ãƒ“スã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã‚‹å ´åˆã«åˆ¥ã®ãƒãƒ¼ãƒˆã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```xml + + 9019 + +``` + +2. libcatboost を使用ã—㟠catboost モデルã®ãƒˆãƒ¬ãƒ¼ãƒ‹ãƒ³ã‚° + +トレーニングデータセットã‹ã‚‰ catboost モデルをトレーニングã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[モデルã®ãƒˆãƒ¬ãƒ¼ãƒ‹ãƒ³ã‚°ã¨é©ç”¨](https://catboost.ai/docs/features/training.html#training)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## throwIf + +引数 `x` ãŒæ­£ã—ã‘ã‚Œã°ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +throwIf(x[, message[, error_code]]) +``` + +**引数** + +- `x` - ãƒã‚§ãƒƒã‚¯ã™ã‚‹æ¡ä»¶ã€‚ +- `message` - カスタムエラーメッセージをæä¾›ã™ã‚‹å®šæ•°æ–‡å­—列。オプション。 +- `error_code` - カスタムエラーコードをæä¾›ã™ã‚‹å®šæ•°æ•´æ•°ã€‚オプション。 + +`error_code` 引数を使用ã™ã‚‹ã«ã¯ã€æ§‹æˆãƒ‘ラメータ `allow_custom_error_code_in_throwif` を有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** + +```sql +SELECT throwIf(number = 3, 'Too many') FROM numbers(10); +``` + +çµæžœ: + +```text +↙ Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.) Received exception from server (version 19.14.1): +Code: 395. DB::Exception: Received from localhost:9000. DB::Exception: Too many. +``` + +## identity + +引数をãã®ã¾ã¾è¿”ã—ã¾ã™ã€‚デãƒãƒƒã‚°ãŠã‚ˆã³ãƒ†ã‚¹ãƒˆã‚’目的ã¨ã—ã¾ã™ã€‚インデックスを使ã‚ãªã„ã“ã¨ã‚„全検索ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œæ€§èƒ½ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚クエリãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ä½¿ç”¨å¯èƒ½æ€§ã«ã¤ã„ã¦åˆ†æžã•ã‚Œã‚‹éš›ã«ã€åˆ†æžè€…㯠`identity` 関数内ã®ã™ã¹ã¦ã®ã‚‚ã®ã‚’無視ã—ã¾ã™ã€‚ã¾ãŸã€å®šæ•°å±•é–‹ã‚’無効ã«ã—ã¾ã™ã€‚ + +**構文** + +```sql +identity(x) +``` + +**例** + +クエリ: + +```sql +SELECT identity(42); +``` + +çµæžœ: + +```text +┌─identity(42)─┠+│ 42 │ +└──────────────┘ +``` + +## getSetting + +[カスタム設定](../../operations/settings/index.md#custom_settings)ã®ç¾åœ¨ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +getSetting('custom_setting'); +``` + +**パラメータ** + +- `custom_setting` — 設定å。[String](../data-types/string.md)。 + +**返り値** + +- 設定ã®ç¾åœ¨ã®å€¤ã€‚ + +**例** + +```sql +SET custom_a = 123; +SELECT getSetting('custom_a'); +``` + +çµæžœ: + +``` +123 +``` + +**関連情報** + +- [カスタム設定](../../operations/settings/index.md#custom_settings) + +## getSettingOrDefault + +[カスタム設定](../../operations/settings/index.md#custom_settings)ã®ç¾åœ¨ã®å€¤ã¾ãŸã¯ã‚«ã‚¹ã‚¿ãƒ è¨­å®šãŒç¾åœ¨ã®ãƒ—ロファイルã«è¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã«ç¬¬2引数ã§æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +getSettingOrDefault('custom_setting', default_value); +``` + +**パラメータ** + +- `custom_setting` — 設定å。[String](../data-types/string.md)。 +- `default_value` — カスタム設定ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã«è¿”ã•ã‚Œã‚‹å€¤ã€‚ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¾ãŸã¯ Null ã®å€¤ã¨ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +**返り値** + +- 設定ã®ç¾åœ¨ã®å€¤ã¾ãŸã¯è¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã® default_value。 + +**例** + +```sql +SELECT getSettingOrDefault('custom_undef1', 'my_value'); +SELECT getSettingOrDefault('custom_undef2', 100); +SELECT getSettingOrDefault('custom_undef3', NULL); +``` + +çµæžœ: + +``` +my_value +100 +NULL +``` + +**関連情報** + +- [カスタム設定](../../operations/settings/index.md#custom_settings) + +## isDecimalOverflow + +[Decimal](../data-types/decimal.md) 値ãŒãã®ç²¾åº¦ã‚’超ãˆã¦ã„ã‚‹ã‹ã€æŒ‡å®šã•ã‚ŒãŸç²¾åº¦ã‚’超ãˆã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +**構文** + +```sql +isDecimalOverflow(d, [p]) +``` + +**引数** + +- `d` — 値。[Decimal](../data-types/decimal.md)。 +- `p` — 精度。オプション。çœç•¥ã—ãŸå ´åˆã€æœ€åˆã®å¼•æ•°ã®åˆæœŸç²¾åº¦ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¾ãŸã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰/ã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚’移行ã™ã‚‹å ´åˆã«æœ‰ç”¨ã§ã™ã€‚[UInt8](../data-types/int-uint.md#uint-ranges)。 + +**返り値** + +- `1` — Decimal 値ãŒãã®ç²¾åº¦ã«ã‚ˆã£ã¦è¨±å¯ã•ã‚Œã‚‹æ¡æ•°ã‚’超ãˆã¦ã„ã‚‹ã“ã¨ã€‚ +- `0` — Decimal 値ãŒæŒ‡å®šã•ã‚ŒãŸç²¾åº¦ã‚’満ãŸã—ã¦ã„ã‚‹ã“ã¨ã€‚ + +**例** + +クエリ: + +```sql +SELECT isDecimalOverflow(toDecimal32(1000000000, 0), 9), + isDecimalOverflow(toDecimal32(1000000000, 0)), + isDecimalOverflow(toDecimal32(-1000000000, 0), 9), + isDecimalOverflow(toDecimal32(-1000000000, 0)); +``` + +çµæžœ: + +```text +1 1 1 1 +``` + +## countDigits + +値を表ç¾ã™ã‚‹ã®ã«å¿…è¦ãª10進数ã®æ¡æ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +countDigits(x) +``` + +**引数** + +- `x` — [Int](../data-types/int-uint.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md) ã®å€¤ã€‚ + +**返り値** + +- æ¡æ•°ã€‚[UInt8](../data-types/int-uint.md#uint-ranges)。 + +:::note +`Decimal` 値ã¯ãれらã®ã‚¹ã‚±ãƒ¼ãƒ«ã‚’考慮ã—ã¾ã™: ãã®åŸºç¤Žã¨ãªã‚‹æ•´æ•°åž‹ `value * scale` を計算ã—ã¾ã™ã€‚例ãˆã°ï¼š`countDigits(42) = 2`, `countDigits(42.000) = 5`, `countDigits(0.04200) = 4`。ã¤ã¾ã‚Šã€`Decimal64` ã®å°æ•°ç‚¹ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã‚’ `countDigits(x) > 18` ã§ãƒã‚§ãƒƒã‚¯ã§ãã¾ã™ã€‚ã“れ㯠[isDecimalOverflow](#isdecimaloverflow) ã®é…ã„ãƒãƒªã‚¢ãƒ³ãƒˆã§ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT countDigits(toDecimal32(1, 9)), countDigits(toDecimal32(-1, 9)), + countDigits(toDecimal64(1, 18)), countDigits(toDecimal64(-1, 18)), + countDigits(toDecimal128(1, 38)), countDigits(toDecimal128(-1, 38)); +``` + +çµæžœ: + +```text +10 10 19 19 39 39 +``` + +## errorCodeToName + +- エラーコードã®ãƒ†ã‚­ã‚¹ãƒˆå。[LowCardinality(String)](../data-types/lowcardinality.md)。 + +**構文** + +```sql +errorCodeToName(1) +``` + +çµæžœ: + +```text +UNSUPPORTED_METHOD +``` + +## tcpPort + +ã“ã®ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ãƒªãƒƒã‚¹ãƒ³ã•ã‚Œã¦ã„ã‚‹[native インターフェース](../../interfaces/tcp.md)ã® TCP ãƒãƒ¼ãƒˆç•ªå·ã‚’è¿”ã—ã¾ã™ã€‚ +分散テーブルã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å®Ÿè¡Œã•ã‚Œã‚‹å ´åˆã€ã“ã®é–¢æ•°ã¯å„シャードã«é–¢é€£ã™ã‚‹é€šå¸¸ã®ã‚«ãƒ©ãƒ ã‚’生æˆã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€å®šæ•°å€¤ã‚’生æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +tcpPort() +``` + +**引数** + +- ãªã—。 + +**返り値** + +- TCP ãƒãƒ¼ãƒˆç•ªå·ã€‚[UInt16](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT tcpPort(); +``` + +çµæžœ: + +```text +┌─tcpPort()─┠+│ 9000 │ +└───────────┘ +``` + +**関連情報** + +- [tcp_port](../../operations/server-configuration-parameters/settings.md#tcp_port) + +## currentProfiles + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®[設定プロファイル](../../guides/sre/user-management/index.md#settings-profiles-management)ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +ç¾åœ¨ã®è¨­å®šãƒ—ロファイルを変更ã™ã‚‹ã«ã¯ã€[SET PROFILE](../../sql-reference/statements/set.md#query-set) コマンドを使用ã§ãã¾ã™ã€‚`SET PROFILE` コマンドãŒä½¿ç”¨ã•ã‚Œã¦ã„ãªã„å ´åˆã€ã“ã®é–¢æ•°ã¯ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©ã§æŒ‡å®šã•ã‚ŒãŸãƒ—ロファイルを返ã—ã¾ã™ï¼ˆ[CREATE USER](../../sql-reference/statements/create/user.md#create-user-statement) å‚照)。 + +**構文** + +```sql +currentProfiles() +``` + +**返り値** + +- ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ—ロファイルã®ãƒªã‚¹ãƒˆã€‚[Array](../data-types/array.md)([String](../data-types/string.md))。 + +## enabledProfiles + +明示的ãŠã‚ˆã³æš—黙的ã«ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸè¨­å®šãƒ—ロファイルを返ã—ã¾ã™ã€‚明示的ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ—ロファイル㯠[currentProfiles](#currentprofiles) 関数ã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹ã‚‚ã®ã¨åŒã˜ã§ã™ã€‚暗黙的ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ—ロファイルã«ã¯ã€ä»–ã®å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ—ロファイルã€ä»˜ä¸Žã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã‚’介ã—ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ—ロファイルã€ãれ自体ã®è¨­å®šã‚’介ã—ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ—ロファイルã€ãƒ¡ã‚¤ãƒ³ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ—ロファイル(メインサーãƒãƒ¼è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã® `default_profile` セクションå‚照)ã®è¦ªãƒ—ロファイルãŒå«ã¾ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +enabledProfiles() +``` + +**返り値** + +- 有効ã«ãªã£ã¦ã„る設定プロファイルã®ãƒªã‚¹ãƒˆã€‚[Array](../data-types/array.md)([String](../data-types/string.md))。 + +## defaultProfiles + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©ã§æŒ‡å®šã•ã‚ŒãŸã™ã¹ã¦ã®ãƒ—ロファイルを返ã—ã¾ã™ï¼ˆ[CREATE USER](../../sql-reference/statements/create/user.md#create-user-statement) ステートメントå‚照)。 + +**構文** + +```sql +defaultProfiles() +``` + +**返り値** + +- デフォルト設定プロファイルã®ãƒªã‚¹ãƒˆã€‚[Array](../data-types/array.md)([String](../data-types/string.md))。 + +## currentRoles + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚ロール㯠[SET ROLE](../../sql-reference/statements/set-role.md#set-role-statement) ステートメントã«ã‚ˆã£ã¦å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`SET ROLE` ステートメントãŒåˆ©ç”¨ã•ã‚Œã¦ã„ãªã„å ´åˆã€é–¢æ•° `currentRoles` 㯠`defaultRoles` ã¨åŒã˜ã‚‚ã®ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +currentRoles() +``` + +**返り値** + +- ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã™ã‚‹ç¾åœ¨ã®ãƒ­ãƒ¼ãƒ«ã®ãƒªã‚¹ãƒˆã€‚[Array](../data-types/array.md)([String](../data-types/string.md))。 + +## enabledRoles + +ç¾åœ¨ã®ãƒ­ãƒ¼ãƒ«ã¨ç¾åœ¨ã®ãƒ­ãƒ¼ãƒ«ã«ä»˜ä¸Žã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã®åå‰ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +enabledRoles() +``` + +**返り値** + +- ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã™ã‚‹æœ‰åŠ¹ãªãƒ­ãƒ¼ãƒ«ã®ãƒªã‚¹ãƒˆã€‚[Array](../data-types/array.md)([String](../data-types/string.md))。 + +## defaultRoles + +ログイン時ã«ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã«ã•ã‚Œã‚‹ãƒ­ãƒ¼ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚ã“れらã¯é€šå¸¸ã€ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ä»˜ä¸Žã•ã‚ŒãŸã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ã§ã™ãŒï¼ˆ[GRANT](../../sql-reference/statements/grant.md#select) å‚照)ã€[SET DEFAULT ROLE](../../sql-reference/statements/set-role.md#set-default-role-statement) ステートメントã§å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +```sql +defaultRoles() +``` + +**返り値** + +- ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ­ãƒ¼ãƒ«ã®ãƒªã‚¹ãƒˆã€‚[Array](../data-types/array.md)([String](../data-types/string.md))。 + +## getServerPort + +サーãƒãƒ¼ã®ãƒãƒ¼ãƒˆç•ªå·ã‚’è¿”ã—ã¾ã™ã€‚ãƒãƒ¼ãƒˆãŒã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã¦ã„ãªã„å ´åˆã€ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +getServerPort(port_name) +``` + +**引数** + +- `port_name` — サーãƒãƒ¼ãƒãƒ¼ãƒˆå。[String](../data-types/string.md#string)。å¯èƒ½ãªå€¤: + + - 'tcp_port' + - 'tcp_port_secure' + - 'http_port' + - 'https_port' + - 'interserver_http_port' + - 'interserver_https_port' + - 'mysql_port' + - 'postgresql_port' + - 'grpc_port' + - 'prometheus.port' + +**返り値** + +- サーãƒãƒ¼ãƒãƒ¼ãƒˆã®ç•ªå·ã€‚[UInt16](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT getServerPort('tcp_port'); +``` + +çµæžœ: + +```text +┌─getServerPort('tcp_port')─┠+│ 9000 │ +└───────────────────────────┘ +``` + +## queryID + +ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã® ID ã‚’è¿”ã—ã¾ã™ã€‚ä»–ã®ã‚¯ã‚¨ãƒªã®ãƒ‘ラメータã¯ã€`query_id` を使用ã—㦠[system.query_log](../../operations/system-tables/query_log.md) テーブルã‹ã‚‰å–å¾—ã§ãã¾ã™ã€‚ + +[initialQueryID](#initialqueryid) 関数ã¨ã¯ç•°ãªã‚Šã€`queryID` ã¯ç•°ãªã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã§ç•°ãªã‚‹çµæžœã‚’è¿”ã™ã“ã¨ãŒã§ãã¾ã™ã€‚(例をå‚照) + +**構文** + +```sql +queryID() +``` + +**返り値** + +- ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã® ID。[String](../data-types/string.md) + +**例** + +クエリ: + +```sql +CREATE TABLE tmp (str String) ENGINE = Log; +INSERT INTO tmp (*) VALUES ('a'); +SELECT count(DISTINCT t) FROM (SELECT queryID() AS t FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') GROUP BY queryID()); +``` + +çµæžœ: + +```text +┌─count()─┠+│ 3 │ +└─────────┘ +``` + +## initialQueryID + +åˆæœŸã®ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã® ID ã‚’è¿”ã—ã¾ã™ã€‚ä»–ã®ã‚¯ã‚¨ãƒªã®ãƒ‘ラメータã¯ã€`initial_query_id` を使用ã—㦠[system.query_log](../../operations/system-tables/query_log.md) テーブルã‹ã‚‰å–å¾—ã§ãã¾ã™ã€‚ + +[queryID](#queryid) 関数ã¨ã¯ç•°ãªã‚Šã€`initialQueryID` ã¯ç•°ãªã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã§åŒã˜çµæžœã‚’è¿”ã—ã¾ã™ã€‚(例をå‚照) + +**構文** + +```sql +initialQueryID() +``` + +**返り値** + +- åˆæœŸã®ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã® ID。[String](../data-types/string.md) + +**例** + +クエリ: + +```sql +CREATE TABLE tmp (str String) ENGINE = Log; +INSERT INTO tmp (*) VALUES ('a'); +SELECT count(DISTINCT t) FROM (SELECT initialQueryID() AS t FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') GROUP BY queryID()); +``` + +çµæžœ: + +```text +┌─count()─┠+│ 1 │ +└─────────┘ +``` + +## partitionID + +[パーティション ID](../../engines/table-engines/mergetree-family/custom-partitioning-key.md)を計算ã—ã¾ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ã¯é…ã„ãŸã‚ã€å¤šæ•°ã®è¡Œã«å¯¾ã—ã¦å‘¼ã³å‡ºã™ã¹ãã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +**構文** + +```sql +partitionID(x[, y, ...]); +``` + +**引数** + +- `x` — パーティション ID ã‚’è¿”ã™ã‚«ãƒ©ãƒ ã€‚ +- `y, ...` — パーティション ID ã‚’è¿”ã™æ®‹ã‚Šã® N 個ã®ã‚«ãƒ©ãƒ ï¼ˆã‚ªãƒ—ション)。 + +**返り値** + +- è¡ŒãŒå±žã™ã‚‹ãƒ‘ーティション ID。[String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS tab; + +CREATE TABLE tab +( + i int, + j int +) +ENGINE = MergeTree +PARTITION BY i +ORDER BY tuple(); + +INSERT INTO tab VALUES (1, 1), (1, 2), (1, 3), (2, 4), (2, 5), (2, 6); + +SELECT i, j, partitionID(i), _partition_id FROM tab ORDER BY i, j; +``` + +çµæžœ: + +```response +┌─i─┬─j─┬─partitionID(i)─┬─_partition_id─┠+│ 1 │ 1 │ 1 │ 1 │ +│ 1 │ 2 │ 1 │ 1 │ +│ 1 │ 3 │ 1 │ 1 │ +└───┴───┴────────────────┴───────────────┘ +┌─i─┬─j─┬─partitionID(i)─┬─_partition_id─┠+│ 2 │ 4 │ 2 │ 2 │ +│ 2 │ 5 │ 2 │ 2 │ +│ 2 │ 6 │ 2 │ 2 │ +└───┴───┴────────────────┴───────────────┘ +``` + +## shardNum + +分散クエリã§åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ã®ä¸€éƒ¨ã‚’処ç†ã™ã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’è¿”ã—ã¾ã™ã€‚インデックス㯠`1` ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ +クエリãŒåˆ†æ•£ã•ã‚Œã¦ã„ãªã„å ´åˆã€å®šæ•°å€¤ `0` ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +shardNum() +``` + +**返り値** + +- シャードインデックスã¾ãŸã¯å®šæ•° `0`。[UInt32](../data-types/int-uint.md)。 + +**例** + +以下ã®ä¾‹ã§ã¯ã€2ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’使用ã—ãŸæ§‹æˆã‚’使用ã—ã¾ã™ã€‚クエリã¯å„シャード㮠[system.one](../../operations/system-tables/one.md) テーブルã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +クエリ: + +```sql +CREATE TABLE shard_num_example (dummy UInt8) + ENGINE=Distributed(test_cluster_two_shards_localhost, system, one, dummy); +SELECT dummy, shardNum(), shardCount() FROM shard_num_example; +``` + +çµæžœ: + +```text +┌─dummy─┬─shardNum()─┬─shardCount()─┠+│ 0 │ 2 │ 2 │ +│ 0 │ 1 │ 2 │ +└───────┴────────────┴──────────────┘ +``` + +**関連情報** + +- [分散テーブルエンジン](../../engines/table-engines/special/distributed.md) + +## shardCount + +分散クエリã«å¯¾ã™ã‚‹ã‚·ãƒ£ãƒ¼ãƒ‰ã®ç·æ•°ã‚’è¿”ã—ã¾ã™ã€‚ +クエリãŒåˆ†æ•£ã•ã‚Œã¦ã„ãªã„å ´åˆã€å®šæ•° `0` ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +shardCount() +``` + +**返り値** + +- シャードã®ç·æ•°ã¾ãŸã¯ `0`。[UInt32](../data-types/int-uint.md)。 + +**関連情報** + +- [shardNum()](#shardnum) 関数ã®ä¾‹ã«ã‚‚ `shardCount()` 関数呼ã³å‡ºã—ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +## getOSKernelVersion + +ç¾åœ¨ã® OS カーãƒãƒ«ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’文字列ã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +getOSKernelVersion() +``` + +**引数** + +- ãªã—。 + +**返り値** + +- ç¾åœ¨ã® OS カーãƒãƒ«ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚[String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT getOSKernelVersion(); +``` + +çµæžœ: + +```text +┌─getOSKernelVersion()────┠+│ Linux 4.15.0-55-generic │ +└─────────────────────────┘ +``` + +## zookeeperSessionUptime + +ç¾åœ¨ã® ZooKeeper セッションã®ã‚¢ãƒƒãƒ—タイムを秒å˜ä½ã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +zookeeperSessionUptime() +``` + +**引数** + +- ãªã—。 + +**返り値** + +- ç¾åœ¨ã® ZooKeeper セッションã®ã‚¢ãƒƒãƒ—タイム(秒å˜ä½ï¼‰ã€‚[UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT zookeeperSessionUptime(); +``` + +çµæžœ: + +```text +┌─zookeeperSessionUptime()─┠+│ 286 │ +└──────────────────────────┘ +``` + +## generateRandomStructure + +テーブル構造を `column1_name column1_type, column2_name column2_type, ...` ã®å½¢å¼ã§ãƒ©ãƒ³ãƒ€ãƒ ã«ç”Ÿæˆã—ã¾ã™ã€‚ + +**構文** + +```sql +generateRandomStructure([number_of_columns, seed]) +``` + +**引数** + +- `number_of_columns` — çµæžœã®ãƒ†ãƒ¼ãƒ–ル構造ã§ã®å¸Œæœ›ã™ã‚‹ã‚«ãƒ©ãƒ æ•°ã€‚0 ã¾ãŸã¯ `Null` ã«è¨­å®šã—ãŸå ´åˆã€1 ã‹ã‚‰ 128 ã®ç¯„囲ã§ãƒ©ãƒ³ãƒ€ãƒ ã®ã‚«ãƒ©ãƒ æ•°ã«ãªã‚Šã¾ã™ã€‚デフォルト値: `Null`。 +- `seed` - 安定ã—ãŸçµæžœã‚’生æˆã™ã‚‹ãŸã‚ã®ãƒ©ãƒ³ãƒ€ãƒ ã‚·ãƒ¼ãƒ‰ã€‚シードãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„ã‹ `Null` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ©ãƒ³ãƒ€ãƒ ã«ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +ã™ã¹ã¦ã®å¼•æ•°ã¯å®šæ•°ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**返り値** + +- ランダムã«ç”Ÿæˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ル構造。[String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT generateRandomStructure() +``` + +çµæžœ: + +```text +┌─generateRandomStructure()─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ c1 Decimal32(5), c2 Date, c3 Tuple(LowCardinality(String), Int128, UInt64, UInt16, UInt8, IPv6), c4 Array(UInt128), c5 UInt32, c6 IPv4, c7 Decimal256(64), c8 Decimal128(3), c9 UInt256, c10 UInt64, c11 DateTime │ +└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT generateRandomStructure(1) +``` + +çµæžœ: + +```text +┌─generateRandomStructure(1)─┠+│ c1 Map(UInt256, UInt16) │ +└────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT generateRandomStructure(NULL, 33) +``` + +çµæžœ: + +```text +┌─generateRandomStructure(NULL, 33)─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ c1 DateTime, c2 Enum8('c2V0' = 0, 'c2V1' = 1, 'c2V2' = 2, 'c2V3' = 3), c3 LowCardinality(Nullable(FixedString(30))), c4 Int16, c5 Enum8('c5V0' = 0, 'c5V1' = 1, 'c5V2' = 2, 'c5V3' = 3), c6 Nullable(UInt8), c7 String, c8 Nested(e1 IPv4, e2 UInt8, e3 UInt16, e4 UInt16, e5 Int32, e6 Map(Date, Decimal256(70))) │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +**注**: 複雑ãªåž‹ï¼ˆArrayã€Tupleã€Mapã€Nested)ã®æœ€å¤§ãƒã‚¹ãƒˆæ·±åº¦ã¯ 16 ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€[generateRandom](../../sql-reference/table-functions/generate.md) ã¨ä¸€ç·’ã«ä½¿ç”¨ã—ã¦å®Œå…¨ã«ãƒ©ãƒ³ãƒ€ãƒ ãªãƒ†ãƒ¼ãƒ–ルを生æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## structureToCapnProtoSchema {#structure_to_capn_proto_schema} + +ClickHouse ã®ãƒ†ãƒ¼ãƒ–ル構造を CapnProto スキーマã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +structureToCapnProtoSchema(structure) +``` + +**引数** + +- `structure` — `column1_name column1_type, column2_name column2_type, ...` ã®å½¢å¼ã§ã®ãƒ†ãƒ¼ãƒ–ル構造。 +- `root_struct_name` — CapnProto スキーマã®ãƒ«ãƒ¼ãƒˆæ§‹é€ ã®åå‰ã€‚デフォルト値 - `Message`; + +**返り値** + +- CapnProto スキーマ。[String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT structureToCapnProtoSchema('column1 String, column2 UInt32, column3 Array(String)') FORMAT RawBLOB +``` + +çµæžœ: + +```text +@0xf96402dd754d0eb7; + +struct Message +{ + column1 @0 : Data; + column2 @1 : UInt32; + column3 @2 : List(Data); +} +``` + +クエリ: + +```sql +SELECT structureToCapnProtoSchema('column1 Nullable(String), column2 Tuple(element1 UInt32, element2 Array(String)), column3 Map(String, String)') FORMAT RawBLOB +``` + +çµæžœ: + +```text +@0xd1c8320fecad2b7f; + +struct Message +{ + struct Column1 + { + union + { + value @0 : Data; + null @1 : Void; + } + } + column1 @0 : Column1; + struct Column2 + { + element1 @0 : UInt32; + element2 @1 : List(Data); + } + column2 @1 : Column2; + struct Column3 + { + struct Entry + { + key @0 : Data; + value @1 : Data; + } + entries @0 : List(Entry); + } + column3 @2 : Column3; +} +``` + +クエリ: + +```sql +SELECT structureToCapnProtoSchema('column1 String, column2 UInt32', 'Root') FORMAT RawBLOB +``` + +çµæžœ: + +```text +@0x96ab2d4ab133c6e1; + +struct Root +{ + column1 @0 : Data; + column2 @1 : UInt32; +} +``` + +## structureToProtobufSchema {#structure_to_protobuf_schema} + +ClickHouse ã®ãƒ†ãƒ¼ãƒ–ル構造を Protobuf スキーマã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +structureToProtobufSchema(structure) +``` + +**引数** + +- `structure` — `column1_name column1_type, column2_name column2_type, ...` ã®å½¢å¼ã§ã®ãƒ†ãƒ¼ãƒ–ル構造。 +- `root_message_name` — Protobuf スキーマã®ãƒ«ãƒ¼ãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®åå‰ã€‚デフォルト値 - `Message`; + +**返り値** + +- Protobuf スキーマ。[String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT structureToProtobufSchema('column1 String, column2 UInt32, column3 Array(String)') FORMAT RawBLOB +``` + +çµæžœ: + +```text +syntax = "proto3"; + +message Message +{ + bytes column1 = 1; + uint32 column2 = 2; + repeated bytes column3 = 3; +} +``` + +クエリ: + +```sql +SELECT structureToProtobufSchema('column1 Nullable(String), column2 Tuple(element1 UInt32, element2 Array(String)), column3 Map(String, String)') FORMAT RawBLOB +``` + +çµæžœ: + +```text +syntax = "proto3"; + +message Message +{ + bytes column1 = 1; + message Column2 + { + uint32 element1 = 1; + repeated bytes element2 = 2; + } + Column2 column2 = 2; + map column3 = 3; +} +``` + +クエリ: + +```sql +SELECT structureToProtobufSchema('column1 String, column2 UInt32', 'Root') FORMAT RawBLOB +``` + +çµæžœ: + +```text +syntax = "proto3"; + +message Root +{ + bytes column1 = 1; + uint32 column2 = 2; +} +``` + +## formatQuery + +与ãˆã‚‰ã‚ŒãŸ SQL クエリã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸï¼ˆè¤‡æ•°è¡Œã‚’å«ã‚€å¯èƒ½æ€§ã®ã‚る)ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ + +クエリãŒæ§‹æ–‡çš„ã«æ­£ã—ããªã„å ´åˆã€ä¾‹å¤–をスローã—ã¾ã™ã€‚代ã‚ã‚Šã« `NULL` ã‚’è¿”ã™ã«ã¯ã€`formatQueryOrNull()` 関数を使用ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +formatQuery(query) +formatQueryOrNull(query) +``` + +**引数** + +- `query` - フォーマット対象㮠SQL クエリ。[String](../data-types/string.md) + +**返り値** + +- フォーマットã•ã‚ŒãŸã‚¯ã‚¨ãƒªã€‚[String](../data-types/string.md)。 + +**例** + +```sql +SELECT formatQuery('select a, b FRom tab WHERE a > 3 and b < 3'); +``` + +çµæžœ: + +```result +┌─formatQuery('select a, b FRom tab WHERE a > 3 and b < 3')─┠+│ SELECT + a, + b +FROM tab +WHERE (a > 3) AND (b < 3) │ +└───────────────────────────────────────────────────────────────┘ +``` + +## formatQuerySingleLine + +`formatQuery()` ã¨åŒæ§˜ã§ã™ãŒã€è¿”ã•ã‚Œã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚ŒãŸæ–‡å­—列ã«ã¯æ”¹è¡ŒãŒå«ã¾ã‚Œã¾ã›ã‚“。 + +クエリãŒæ§‹æ–‡çš„ã«æ­£ã—ããªã„å ´åˆã€ä¾‹å¤–をスローã—ã¾ã™ã€‚代ã‚ã‚Šã« `NULL` ã‚’è¿”ã™ã«ã¯ã€`formatQuerySingleLineOrNull()` 関数を利用ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +formatQuerySingleLine(query) +formatQuerySingleLineOrNull(query) +``` + +**引数** + +- `query` - フォーマット対象㮠SQL クエリ。[String](../data-types/string.md) + +**返り値** + +- フォーマットã•ã‚ŒãŸã‚¯ã‚¨ãƒªã€‚[String](../data-types/string.md)。 + +**例** + +```sql +SELECT formatQuerySingleLine('select a, b FRom tab WHERE a > 3 and b < 3'); +``` + +çµæžœ: + +```result +┌─formatQuerySingleLine('select a, b FRom tab WHERE a > 3 and b < 3')─┠+│ SELECT a, b FROM tab WHERE (a > 3) AND (b < 3) │ +└─────────────────────────────────────────────────────────────────────────┘ +``` + +## variantElement + +`Variant` カラムã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸåž‹ã®ã‚«ãƒ©ãƒ ã‚’抽出ã—ã¾ã™ã€‚ + +**構文** + +```sql +variantElement(variant, type_name, [, default_value]) +``` + +**引数** + +- `variant` — Variant カラム。[Variant](../data-types/variant.md)。 +- `type_name` — 抽出ã™ã‚‹ Variant åž‹ã®åå‰ã€‚[String](../data-types/string.md)。 +- `default_value` - 指定ã•ã‚ŒãŸåž‹ã® Variant ãŒå­˜åœ¨ã—ãªã„å ´åˆã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚ä»»æ„ã®åž‹ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚オプション。 + +**返り値** + +- 指定ã•ã‚ŒãŸåž‹ã‚’æŒã¤ `Variant` カラムã®ã‚µãƒ–カラム。 + +**例** + +```sql +CREATE TABLE test (v Variant(UInt64, String, Array(UInt64))) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('Hello, World!'), ([1, 2, 3]); +SELECT v, variantElement(v, 'String'), variantElement(v, 'UInt64'), variantElement(v, 'Array(UInt64)') FROM test; +``` + +```text +┌─v─────────────┬─variantElement(v, 'String')─┬─variantElement(v, 'UInt64')─┬─variantElement(v, 'Array(UInt64)')─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [] │ +│ 42 │ á´ºáµá´¸á´¸ │ 42 │ [] │ +│ Hello, World! │ Hello, World! │ á´ºáµá´¸á´¸ │ [] │ +│ [1,2,3] │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ [1,2,3] │ +└───────────────┴─────────────────────────────┴─────────────────────────────┴────────────────────────────────────┘ +``` + +## variantType + +`Variant` カラムã®å„è¡Œã«å¯¾ã—ã¦ãã® Variant åž‹åã‚’è¿”ã—ã¾ã™ã€‚行㌠NULL ã‚’å«ã‚€å ´åˆã€ãã®è¡Œã«å¯¾ã—㦠`'None'` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +variantType(variant) +``` + +**引数** + +- `variant` — Variant カラム。[Variant](../data-types/variant.md)。 + +**返り値** + +- å„行㮠Variant åž‹åã‚’æŒã¤ Enum8 カラム。 + +**例** + +```sql +CREATE TABLE test (v Variant(UInt64, String, Array(UInt64))) ENGINE = Memory; +INSERT INTO test VALUES (NULL), (42), ('Hello, World!'), ([1, 2, 3]); +SELECT variantType(v) FROM test; +``` + +```text +┌─variantType(v)─┠+│ None │ +│ UInt64 │ +│ String │ +│ Array(UInt64) │ +└────────────────┘ +``` + +```sql +SELECT toTypeName(variantType(v)) FROM test LIMIT 1; +``` + +```text +┌─toTypeName(variantType(v))──────────────────────────────────────────┠+│ Enum8('None' = -1, 'Array(UInt64)' = 0, 'String' = 1, 'UInt64' = 2) │ +└─────────────────────────────────────────────────────────────────────┘ +``` + +## minSampleSizeConversion + +2ã¤ã®ã‚µãƒ³ãƒ—ルã«ãŠã‘る変æ›çŽ‡ï¼ˆå‰²åˆï¼‰ã‚’比較ã™ã‚‹ A/B テストã®ãŸã‚ã®æœ€å°å¿…è¦ã‚µãƒ³ãƒ—ルサイズを計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +minSampleSizeConversion(baseline, mde, power, alpha) +``` + +[ã“ã¡ã‚‰ã®è¨˜äº‹](https://towardsdatascience.com/required-sample-size-for-a-b-testing-6f6608dd330a)ã§èª¬æ˜Žã•ã‚Œã¦ã„ã‚‹å¼ã‚’使用ã—ã¾ã™ã€‚治療群ã¨å¯¾ç…§ç¾¤ãŒåŒã˜ã‚µã‚¤ã‚ºã§ã‚ã‚‹ã“ã¨ã‚’想定ã—ã¾ã™ã€‚è¿”ã•ã‚Œã‚‹å€¤ã¯ä¸€ã¤ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å¿…è¦ãªã‚µãƒ³ãƒ—ルサイズ(ã¤ã¾ã‚Šã€å®Ÿé¨“全体ã«å¿…è¦ãªã‚µãƒ³ãƒ—ルサイズã¯è¿”ã•ã‚Œã‚‹å€¤ã®2å€ï¼‰ã§ã™ã€‚ + +**引数** + +- `baseline` — 基準変æ›çŽ‡ã€‚[Float](../data-types/float.md)。 +- `mde` — 検出å¯èƒ½æœ€ä½ŽåŠ¹æžœï¼ˆMDE)ã¯ãƒ‘ーセンテージãƒã‚¤ãƒ³ãƒˆã§ï¼ˆä¾‹ï¼šåŸºæº–変æ›çŽ‡ 0.25 ã® MDE ㌠0.03 ã®å ´åˆã€0.25 ± 0.03 ã¸ã®å¤‰åŒ–ãŒäºˆæƒ³ã•ã‚Œã¾ã™ï¼‰ã€‚[Float](../data-types/float.md)。 +- `power` — テストã®å¿…è¦ãªçµ±è¨ˆåŠ›ï¼ˆ1-タイプIIエラーã®ç¢ºçŽ‡ï¼‰ã€‚[Float](../data-types/float.md)。 +- `alpha` — テストã®å¿…è¦ãªæœ‰æ„水準(タイプIエラーã®ç¢ºçŽ‡ï¼‰ã€‚[Float](../data-types/float.md)。 + +**返り値** + +3ã¤ã®è¦ç´ ã‚’æŒã¤åå‰ã¤ã [Tuple](../data-types/tuple.md): + +- `"minimum_sample_size"` — å¿…è¦ãªã‚µãƒ³ãƒ—ルサイズ。[Float64](../data-types/float.md)。 +- `"detect_range_lower"` — 指定ã•ã‚ŒãŸã‚µãƒ³ãƒ—ルサイズã§ã¯æ¤œå‡ºã§ããªã„範囲ã®ä¸‹é™ï¼ˆã¤ã¾ã‚Šã€`alpha` 㨠`power` ãŒæä¾›ã•ã‚ŒãŸå ´åˆã€`"detect_range_lower"` 以下ã®ã™ã¹ã¦ã®å€¤ã¯æ¤œå‡ºå¯èƒ½ã§ã™ï¼‰ã€‚`baseline - mde` ã¨ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚[Float64](../data-types/float.md)。 +- `"detect_range_upper"` — 指定ã•ã‚ŒãŸã‚µãƒ³ãƒ—ルサイズã§ã¯æ¤œå‡ºã§ããªã„範囲ã®ä¸Šé™ï¼ˆã¤ã¾ã‚Šã€`alpha` 㨠`power` ãŒæä¾›ã•ã‚ŒãŸå ´åˆã€`"detect_range_upper"` 以上ã®ã™ã¹ã¦ã®å€¤ã¯æ¤œå‡ºå¯èƒ½ã§ã™ï¼‰ã€‚`baseline + mde` ã¨ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚[Float64](../data-types/float.md)。 + +**例** + +以下ã®ã‚¯ã‚¨ãƒªã¯ã€åŸºæº–変æ›çŽ‡ãŒ 25%ã€MDE ㌠3%ã€æœ‰æ„水準㌠5%ã€æœ›ã¾ã—ã„統計力㌠80% ã® A/B テストã«å¯¾ã™ã‚‹å¿…è¦ãªã‚µãƒ³ãƒ—ルサイズを計算ã—ã¾ã™ï¼š + +```sql +SELECT minSampleSizeConversion(0.25, 0.03, 0.80, 0.05) AS sample_size; +``` + +çµæžœ: + +```text +┌─sample_size───────────────────┠+│ (3396.077603219163,0.22,0.28) │ +└───────────────────────────────┘ +``` + +## minSampleSizeContinuous + +2ã¤ã®ã‚µãƒ³ãƒ—ルã«ãŠã‘る連続ã—ãŸãƒ¡ãƒˆãƒªãƒƒã‚¯ã®å¹³å‡ã‚’比較ã™ã‚‹ A/B テストã®ãŸã‚ã®æœ€å°å¿…è¦ã‚µãƒ³ãƒ—ルサイズを計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +minSampleSizeContinous(baseline, sigma, mde, power, alpha) +``` + +エイリアス: `minSampleSizeContinous` + +[ã“ã¡ã‚‰ã®è¨˜äº‹](https://towardsdatascience.com/required-sample-size-for-a-b-testing-6f6608dd330a)ã§èª¬æ˜Žã•ã‚Œã¦ã„ã‚‹å¼ã‚’使用ã—ã¾ã™ã€‚治療群ã¨å¯¾ç…§ç¾¤ãŒåŒã˜ã‚µã‚¤ã‚ºã§ã‚ã‚‹ã“ã¨ã‚’想定ã—ã¾ã™ã€‚è¿”ã•ã‚Œã‚‹å€¤ã¯ä¸€ã¤ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å¿…è¦ãªã‚µãƒ³ãƒ—ルサイズ(ã¤ã¾ã‚Šã€å®Ÿé¨“全体ã«å¿…è¦ãªã‚µãƒ³ãƒ—ルサイズã¯è¿”ã•ã‚Œã‚‹å€¤ã®2å€ï¼‰ã§ã™ã€‚ã¾ãŸã€ãƒ†ã‚¹ãƒˆãƒ¡ãƒˆãƒªãƒƒã‚¯ã®æ²»ç™‚群ã¨å¯¾ç…§ç¾¤ã®æ¨™æº–åå·®ãŒåŒã˜ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ + +**引数** + +- `baseline` — メトリックã®åŸºæº–値。[Integer](../data-types/int-uint.md) ã¾ãŸã¯ [Float](../data-types/float.md)。 +- `sigma` — メトリックã®åŸºæº–標準å差。[Integer](../data-types/int-uint.md) ã¾ãŸã¯ [Float](../data-types/float.md)。 +- `mde` — 基準値ã®ãƒ‘ーセンテージã¨ã—ã¦ã®æ¤œå‡ºå¯èƒ½æœ€ä½ŽåŠ¹æžœ (MDE) (例:基準値 112.25 ã® MDE 㯠0.03 ã“ã‚Œã¯ã€112.25 ± 112.25*0.03 ã¸ã®å¤‰åŒ–ã‚’æ„味ã—ã¾ã™)。[Integer](../data-types/int-uint.md) ã¾ãŸã¯ [Float](../data-types/float.md)。 +- `power` — テストã®å¿…è¦ãªçµ±è¨ˆåŠ›ï¼ˆ1-タイプIIエラーã®ç¢ºçŽ‡ï¼‰ã€‚[Integer](../data-types/int-uint.md) ã¾ãŸã¯ [Float](../data-types/float.md)。 +- `alpha` — テストã®å¿…è¦ãªæœ‰æ„水準(タイプIエラーã®ç¢ºçŽ‡ï¼‰ã€‚[Integer](../data-types/int-uint.md) ã¾ãŸã¯ [Float](../data-types/float.md)。 + +**返り値** + +3ã¤ã®è¦ç´ ã‚’æŒã¤åå‰ã¤ã [Tuple](../data-types/tuple.md): + +- `"minimum_sample_size"` — å¿…è¦ãªã‚µãƒ³ãƒ—ルサイズ。[Float64](../data-types/float.md)。 +- `"detect_range_lower"` — 指定ã•ã‚ŒãŸã‚µãƒ³ãƒ—ルサイズã§ã¯æ¤œå‡ºã§ããªã„範囲ã®ä¸‹é™ï¼ˆã¤ã¾ã‚Šã€`alpha` 㨠`power` ãŒæä¾›ã•ã‚ŒãŸå ´åˆã€`"detect_range_lower"` 以下ã®ã™ã¹ã¦ã®å€¤ã¯æ¤œå‡ºå¯èƒ½ã§ã™ï¼‰ã€‚`baseline * (1 - mde)` ã¨ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚[Float64](../data-types/float.md)。 +- `"detect_range_upper"` — 指定ã•ã‚ŒãŸã‚µãƒ³ãƒ—ルサイズã§ã¯æ¤œå‡ºã§ããªã„範囲ã®ä¸Šé™ï¼ˆã¤ã¾ã‚Šã€`alpha` 㨠`power` ãŒæä¾›ã•ã‚ŒãŸå ´åˆã€`"detect_range_upper"` 以上ã®ã™ã¹ã¦ã®å€¤ã¯æ¤œå‡ºå¯èƒ½ã§ã™ï¼‰ã€‚`baseline * (1 + mde)` ã¨ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚[Float64](../data-types/float.md)。 + +**例** + +以下ã®ã‚¯ã‚¨ãƒªã¯ã€åŸºæº–値 112.25ã€æ¨™æº–åå·® 21.1ã€MDE 3%ã€æœ‰æ„水準 5%ã€æœ›ã¾ã—ã„統計力 80% ã®ãƒ¡ãƒˆãƒªãƒƒã‚¯ã«å¯¾ã™ã‚‹ A/B テストã§å¿…è¦ãªã‚µãƒ³ãƒ—ルサイズを計算ã—ã¾ã™ï¼š + +```sql +SELECT minSampleSizeContinous(112.25, 21.1, 0.03, 0.80, 0.05) AS sample_size; +``` + +çµæžœ: + +```text +┌─sample_size───────────────────────────┠+│ (616.2931945826209,108.8825,115.6175) │ +└───────────────────────────────────────┘ +``` + +## connectionId + +ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã—ãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®æŽ¥ç¶š ID ã‚’ UInt64 æ•´æ•°ã¨ã—ã¦å–å¾—ã—ã€è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +connectionId() +``` + +エイリアス: `connection_id`. + +**パラメータ** + +ãªã—。 + +**返り値** + +ç¾åœ¨ã®æŽ¥ç¶š ID。[UInt64](../data-types/int-uint.md)。 + +**実装ã®è©³ç´°** + +ã“ã®é–¢æ•°ã¯ã€ãƒ‡ãƒãƒƒã‚°ã‚·ãƒŠãƒªã‚ªã‚„ MySQL ãƒãƒ³ãƒ‰ãƒ©å†…ã§ã®å†…部目的ã§å½¹ç«‹ã¡ã¾ã™ã€‚[MySQL ã® `CONNECTION_ID` 関数](https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_connection-id) ã¨äº’æ›æ€§ãŒã‚ã‚Šã€é€šå¸¸ã€ãƒ—ロダクションクエリã§ã¯ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。 + +**例** + +クエリ: + +```sql +SELECT connectionId(); +``` + +```response +0 +``` + +## getClientHTTPHeader + +HTTP ヘッダーã®å€¤ã‚’å–å¾—ã—ã¾ã™ã€‚ + +ãã®ã‚ˆã†ãªãƒ˜ãƒƒãƒ€ãƒ¼ãŒå­˜åœ¨ã—ãªã„ã‹ã€ç¾åœ¨ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒ HTTP インターフェース経由ã§è¡Œã‚ã‚Œã¦ã„ãªã„å ´åˆã€ã“ã®é–¢æ•°ã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ +特定㮠HTTP ヘッダー(例:`Authentication` ãŠã‚ˆã³ `X-ClickHouse-*`)ã¯åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã‚’使用ã™ã‚‹ã«ã¯ã€è¨­å®š `allow_get_client_http_header` を有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯æœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã›ã‚“。一部ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã€ä¾‹ãˆã° `Cookie` ã¯æ©Ÿå¯†æƒ…報をå«ã‚€å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ + +ã“ã®é–¢æ•°ã«ãŠã‘ã‚‹ HTTP ヘッダーã¯ã‚±ãƒ¼ã‚¹ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ã§ã™ã€‚ + +関数ãŒåˆ†æ•£ã‚¯ã‚¨ãƒªã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€ãã‚Œã¯ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒŽãƒ¼ãƒ‰ã§ã®ã¿éžç©ºçµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +## showCertificate + +設定ã•ã‚Œã¦ã„ã‚‹ç¾åœ¨ã®ã‚µãƒ¼ãƒãƒ¼ã® SSL 証明書ã«é–¢ã™ã‚‹æƒ…報を表示ã—ã¾ã™ã€‚OpenSSL 証明書を使用ã—ã¦æŽ¥ç¶šã‚’検証ã™ã‚‹ã‚ˆã† ClickHouse を設定ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[SSL-TLS ã®è¨­å®š](https://clickhouse.com/docs/ja/guides/sre/configuring-ssl)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +showCertificate() +``` + +**返り値** + +- 設定ã•ã‚ŒãŸ SSL 証明書ã«é–¢é€£ã™ã‚‹ã‚­ãƒ¼ã¨å€¤ã®ãƒšã‚¢ã®ãƒžãƒƒãƒ—。[Map](../data-types/map.md)([String](../data-types/string.md), [String](../data-types/string.md))。 + +**例** + +クエリ: + +```sql +SELECT showCertificate() FORMAT LineAsString; +``` + +çµæžœ: + +```response +{'version':'1','serial_number':'2D9071D64530052D48308473922C7ADAFA85D6C5','signature_algo':'sha256WithRSAEncryption','issuer':'/CN=marsnet.local CA','not_before':'May 7 17:01:21 2024 GMT','not_after':'May 7 17:01:21 2025 GMT','subject':'/CN=chnode1','pkey_algo':'rsaEncryption'} +``` + +## lowCardinalityIndices + +[LowCardinality](../data-types/lowcardinality.md) カラムã®Dictionary内ã§ã®å€¤ã®ä½ç½®ã‚’è¿”ã—ã¾ã™ã€‚ä½ç½®ã¯ 1 ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚LowCardinality ã¯ãƒ‘ートã”ã¨ã«Dictionaryã‚’æŒã£ã¦ã„ã‚‹ãŸã‚ã€ã“ã®é–¢æ•°ã¯ç•°ãªã‚‹ãƒ‘ートã§åŒã˜å€¤ã«å¯¾ã—ã¦ç•°ãªã‚‹ä½ç½®ã‚’è¿”ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +lowCardinalityIndices(col) +``` + +**引数** + +- `col` — 低カーディナリティカラム。[LowCardinality](../data-types/lowcardinality.md)。 + +**返り値** + +- ç¾åœ¨ã®ãƒ‘ートã®Dictionary内ã§ã®å€¤ã®ä½ç½®ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test; +CREATE TABLE test (s LowCardinality(String)) ENGINE = Memory; + +-- 二ã¤ã®ãƒ‘ートを作æˆã—ã¾ã™: + +INSERT INTO test VALUES ('ab'), ('cd'), ('ab'), ('ab'), ('df'); +INSERT INTO test VALUES ('ef'), ('cd'), ('ab'), ('cd'), ('ef'); + +SELECT s, lowCardinalityIndices(s) FROM test; +``` + +çµæžœ: + +```response + ┌─s──┬─lowCardinalityIndices(s)─┠+1. │ ab │ 1 │ +2. │ cd │ 2 │ +3. │ ab │ 1 │ +4. │ ab │ 1 │ +5. │ df │ 3 │ + └────┴──────────────────────────┘ + ┌─s──┬─lowCardinalityIndices(s)─┠+ 6. │ ef │ 1 │ + 7. │ cd │ 2 │ + 8. │ ab │ 3 │ + 9. │ cd │ 2 │ +10. │ ef │ 1 │ + └────┴──────────────────────────┘ +``` +## lowCardinalityKeys + +[LowCardinality](../data-types/lowcardinality.md) カラムã®Dictionaryã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ブロックãŒDictionaryã®ã‚µã‚¤ã‚ºã‚ˆã‚Šå°ã•ã„ã¾ãŸã¯å¤§ãã„å ´åˆã€çµæžœã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§åˆ‡ã‚Šè©°ã‚ã¾ãŸã¯æ‹¡å¼µã•ã‚Œã¾ã™ã€‚LowCardinalityã¯ãƒ‘ートã”ã¨ã«ç•°ãªã‚‹Dictionaryã‚’æŒã£ã¦ã„ã‚‹ãŸã‚ã€ã“ã®é–¢æ•°ã¯ç•°ãªã‚‹ãƒ‘ートã§ç•°ãªã‚‹Dictionaryã®å€¤ã‚’è¿”ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +lowCardinalityIndices(col) +``` + +**引数** + +- `col` — 低カーディナリティカラム。[LowCardinality](../data-types/lowcardinality.md)。 + +**返り値** + +- Dictionaryã®ã‚­ãƒ¼ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test; +CREATE TABLE test (s LowCardinality(String)) ENGINE = Memory; + +-- 二ã¤ã®ãƒ‘ートを作æˆã—ã¾ã™: + +INSERT INTO test VALUES ('ab'), ('cd'), ('ab'), ('ab'), ('df'); +INSERT INTO test VALUES ('ef'), ('cd'), ('ab'), ('cd'), ('ef'); + +SELECT s, lowCardinalityKeys(s) FROM test; +``` + +çµæžœ: + +```response + ┌─s──┬─lowCardinalityKeys(s)─┠+1. │ ef │ │ +2. │ cd │ ef │ +3. │ ab │ cd │ +4. │ cd │ ab │ +5. │ ef │ │ + └────┴───────────────────────┘ +```plaintext + ┌─s──┬─lowCardinalityKeys(s)─┠+ 6. │ ab │ │ + 7. │ cd │ ab │ + 8. │ ab │ cd │ + 9. │ ab │ df │ +10. │ df │ │ + └────┴───────────────────────┘ +``` + +## displayName + +[config](../../operations/configuration-files.md/#configuration-files) ã® `display_name` ã®å€¤ã€ã¾ãŸã¯è¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã‚µãƒ¼ãƒãƒ¼ã®å®Œå…¨ä¿®é£¾ãƒ‰ãƒ¡ã‚¤ãƒ³å (FQDN) ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +displayName() +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 設定ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ config ã® `display_name` ã®å€¤ã€ã¾ãŸã¯è¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã‚µãƒ¼ãƒãƒ¼ã® FQDN。[String](../data-types/string.md)。 + +**例** + +`display_name` 㯠`config.xml` ã§è¨­å®šã§ãã¾ã™ã€‚例ãˆã°ã€`display_name` ㌠'production' ã«è¨­å®šã•ã‚Œã¦ã„るサーãƒãƒ¼ã®å ´åˆï¼š + +```xml + +production +``` + +クエリ: + +```sql +SELECT displayName(); +``` + +çµæžœ: + +```response +┌─displayName()─┠+│ production │ +└───────────────┘ +``` + +## transactionID + +[トランザクション](https://clickhouse.com/docs/ja/guides/developer/transactional#transactions-commit-and-rollback) ã®IDã‚’è¿”ã—ã¾ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã‚»ãƒƒãƒˆã®ä¸€éƒ¨ã§ã™ã€‚設定ã«ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚µãƒãƒ¼ãƒˆã‚’有効ã«ã™ã‚‹ãŸã‚ã®è¨­å®šã‚’追加ã—ã¾ã™ï¼š + +``` + + 1 + +``` + +詳細ã«ã¤ã„ã¦ã¯ [トランザクション (ACID) サãƒãƒ¼ãƒˆ](https://clickhouse.com/docs/ja/guides/developer/transactional#transactions-commit-and-rollback) ã®ãƒšãƒ¼ã‚¸ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**構文** + +```sql +transactionID() +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `start_csn`ã€`local_tid` ãŠã‚ˆã³ `host_id` ã‹ã‚‰æˆã‚‹ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚[Tuple](../data-types/tuple.md)。 + +- `start_csn`: ã“ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãŒé–‹å§‹ã•ã‚ŒãŸã¨ãã«è¦‹ã‚‰ã‚ŒãŸæœ€æ–°ã®ã‚³ãƒŸãƒƒãƒˆã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã§ã‚るグローãƒãƒ«ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ç•ªå·ã€‚[UInt64](../data-types/int-uint.md)。 +- `local_tid`: ã“ã®ãƒ›ã‚¹ãƒˆãŒç‰¹å®šã® `start_csn` 内ã§é–‹å§‹ã—ãŸå„トランザクションã«ãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ã‚るローカルシーケンシャル番å·ã€‚[UInt64](../data-types/int-uint.md)。 +- `host_id`: ã“ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’開始ã—ãŸãƒ›ã‚¹ãƒˆã® UUID。[UUID](../data-types/uuid.md)。 + +**例** + +クエリ: + +```sql +BEGIN TRANSACTION; +SELECT transactionID(); +ROLLBACK; +``` + +çµæžœ: + +```response +┌─transactionID()────────────────────────────────┠+│ (32,34,'0ee8b069-f2bb-4748-9eae-069c85b5252b') │ +└────────────────────────────────────────────────┘ +``` + +## transactionLatestSnapshot + +読ã¿å–ã‚Šå¯èƒ½ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€æ–°ã®ã‚¹ãƒŠãƒƒãƒ—ショット(コマンドシーケンシャル番å·ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã‚»ãƒƒãƒˆã®ä¸€éƒ¨ã§ã™ã€‚設定ã«ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚µãƒãƒ¼ãƒˆã‚’有効ã«ã™ã‚‹ãŸã‚ã®è¨­å®šã‚’追加ã—ã¾ã™ï¼š + +``` + + 1 + +``` + +詳細ã«ã¤ã„ã¦ã¯ [トランザクション (ACID) サãƒãƒ¼ãƒˆ](https://clickhouse.com/docs/ja/guides/developer/transactional#transactions-commit-and-rollback) ã®ãƒšãƒ¼ã‚¸ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**構文** + +```sql +transactionLatestSnapshot() +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +- トランザクションã®æœ€æ–°ã‚¹ãƒŠãƒƒãƒ—ショット (CSN) ã‚’è¿”ã—ã¾ã™ã€‚[UInt64](../data-types/int-uint.md) + +**例** + +クエリ: + +```sql +BEGIN TRANSACTION; +SELECT transactionLatestSnapshot(); +ROLLBACK; +``` + +çµæžœ: + +```response +┌─transactionLatestSnapshot()─┠+│ 32 │ +└─────────────────────────────┘ +``` + +## transactionOldestSnapshot + +ã‚る実行中㮠[トランザクション](https://clickhouse.com/docs/ja/guides/developer/transactional#transactions-commit-and-rollback) ã«å¯¾ã—ã¦è¡¨ç¤ºå¯èƒ½ãªæœ€å¤ã®ã‚¹ãƒŠãƒƒãƒ—ショット(コマンドシーケンス番å·ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã‚»ãƒƒãƒˆã®ä¸€éƒ¨ã§ã™ã€‚設定ã«ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚µãƒãƒ¼ãƒˆã‚’有効ã«ã™ã‚‹ãŸã‚ã®è¨­å®šã‚’追加ã—ã¾ã™ï¼š + +``` + + 1 + +``` + +詳細ã«ã¤ã„ã¦ã¯ [トランザクション (ACID) サãƒãƒ¼ãƒˆ](https://clickhouse.com/docs/ja/guides/developer/transactional#transactions-commit-and-rollback) ã®ãƒšãƒ¼ã‚¸ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**構文** + +```sql +transactionOldestSnapshot() +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +- トランザクションã®æœ€å¤ã®ã‚¹ãƒŠãƒƒãƒ—ショット (CSN) ã‚’è¿”ã—ã¾ã™ã€‚[UInt64](../data-types/int-uint.md) + +**例** + +クエリ: + +```sql +BEGIN TRANSACTION; +SELECT transactionOldestSnapshot(); +ROLLBACK; +``` + +çµæžœ: + +```response +┌─transactionOldestSnapshot()─┠+│ 32 │ +└─────────────────────────────┘ +``` + +## getSubcolumn + +テーブルã®å¼ã¾ãŸã¯è­˜åˆ¥å­ã¨ã‚µãƒ–カラムã®åå‰ã‚’æŒã¤å®šæ•°æ–‡å­—列をå–ã‚Šã€å¼ã‹ã‚‰æŠ½å‡ºã•ã‚ŒãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã•ã‚ŒãŸã‚µãƒ–カラムを返ã—ã¾ã™ã€‚ + +**構文** + +```sql +getSubcolumn(col_name, subcol_name) +``` + +**引数** + +- `col_name` — テーブルã®å¼ã¾ãŸã¯è­˜åˆ¥å­ã€‚[Expression](../syntax.md/#expressions)ã€[Identifier](../syntax.md/#identifiers)。 +- `subcol_name` — サブカラムã®åå‰ã€‚[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 抽出ã•ã‚ŒãŸã‚µãƒ–カラムを返ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +CREATE TABLE t_arr (arr Array(Tuple(subcolumn1 UInt32, subcolumn2 String))) ENGINE = MergeTree ORDER BY tuple(); +INSERT INTO t_arr VALUES ([(1, 'Hello'), (2, 'World')]), ([(3, 'This'), (4, 'is'), (5, 'subcolumn')]); +SELECT getSubcolumn(arr, 'subcolumn1'), getSubcolumn(arr, 'subcolumn2') FROM t_arr; +``` + +çµæžœ: + +```response + ┌─getSubcolumn(arr, 'subcolumn1')─┬─getSubcolumn(arr, 'subcolumn2')─┠+1. │ [1,2] │ ['Hello','World'] │ +2. │ [3,4,5] │ ['This','is','subcolumn'] │ + └─────────────────────────────────┴─────────────────────────────────┘ +``` + +## getTypeSerializationStreams + +データ型ã®ã‚¹ãƒˆãƒªãƒ¼ãƒ ãƒ‘スを列挙ã—ã¾ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ã¯é–‹ç™ºè€…å‘ã‘ã«æ„図ã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +**構文** + +```sql +getTypeSerializationStreams(col) +``` + +**引数** + +- `col` — データタイプãŒæ¤œå‡ºã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®æ–‡å­—列表ç¾ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- シリアル化ã•ã‚ŒãŸã‚µãƒ–ストリームパスã®ã™ã¹ã¦ã‚’å«ã‚€é…列を返ã—ã¾ã™ã€‚[Array](../data-types/array.md)([String](../data-types/string.md))。 + +**例** + +クエリ: + +```sql +SELECT getTypeSerializationStreams(tuple('a', 1, 'b', 2)); +``` + +çµæžœ: + +```response + ┌─getTypeSerializationStreams(('a', 1, 'b', 2))─────────────────────────────────────────────────────────────────────────┠+1. │ ['{TupleElement(1), Regular}','{TupleElement(2), Regular}','{TupleElement(3), Regular}','{TupleElement(4), Regular}'] │ + └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT getTypeSerializationStreams('Map(String, Int64)'); +``` + +çµæžœ: + +```response + ┌─getTypeSerializationStreams('Map(String, Int64)')────────────────────────────────────────────────────────────────┠+1. │ ['{ArraySizes}','{ArrayElements, TupleElement(keys), Regular}','{ArrayElements, TupleElement(values), Regular}'] │ + └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## globalVariable + +定数文字列引数をå–ã‚Šã€ãã®åå‰ã®ã‚°ãƒ­ãƒ¼ãƒãƒ«å¤‰æ•°ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯MySQLã¨ã®äº’æ›æ€§ã®ãŸã‚ã«æ„図ã•ã‚Œã¦ãŠã‚Šã€ClickHouseã®é€šå¸¸ã®æ“作ã«ã¯å¿…è¦ã§ã¯ã‚ã‚Šã¾ã›ã‚“。定義ã•ã‚Œã¦ã„ã‚‹ã®ã¯å°‘æ•°ã®ãƒ€ãƒŸãƒ¼ã®ã‚°ãƒ­ãƒ¼ãƒãƒ«å¤‰æ•°ã®ã¿ã§ã™ã€‚ + +**構文** + +```sql +globalVariable(name) +``` + +**引数** + +- `name` — グローãƒãƒ«å¤‰æ•°å。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 変数 `name` ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT globalVariable('max_allowed_packet'); +``` + +çµæžœ: + +```response +┌─globalVariable('max_allowed_packet')─┠+│ 67108864 │ +└──────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/random-functions.md b/docs/ja/sql-reference/functions/random-functions.md new file mode 100644 index 00000000000..31282a5476a --- /dev/null +++ b/docs/ja/sql-reference/functions/random-functions.md @@ -0,0 +1,730 @@ +--- +slug: /ja/sql-reference/functions/random-functions +sidebar_position: 145 +sidebar_label: ランダム数 +--- + +# ランダム数生æˆé–¢æ•° + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®ã™ã¹ã¦ã®é–¢æ•°ã¯ã€0ã¾ãŸã¯1ã¤ã®å¼•æ•°ã‚’å—ã‘付ã‘ã¾ã™ã€‚引数ãŒæä¾›ã•ã‚ŒãŸå ´åˆã€ãã®å”¯ä¸€ã®ä½¿ç”¨ç›®çš„ã¯ã€åŒã˜ãƒ©ãƒ³ãƒ€ãƒ é–¢æ•°ã®è¡Œå†…ã§ã®ç•°ãªã‚‹å®Ÿè¡Œã«ç•°ãªã‚‹ãƒ©ãƒ³ãƒ€ãƒ å€¤ã‚’è¿”ã™ã‚ˆã†ã«ã€[共通部分å¼ã®é™¤åŽ»](../../sql-reference/functions/index.md#common-subexpression-elimination)を防ãã“ã¨ã§ã™ã€‚ + +関連コンテンツ + +- ブログ: [ClickHouseã§ã®ãƒ©ãƒ³ãƒ€ãƒ ãƒ‡ãƒ¼ã‚¿ç”Ÿæˆ](https://clickhouse.com/blog/generating-random-test-distribution-data-for-clickhouse) + +:::note +ランダム数ã¯æš—å·åŒ–を目的ã¨ã—ãªã„アルゴリズムã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ +::: + +## rand + +å‡ç­‰ãªåˆ†å¸ƒã§ãƒ©ãƒ³ãƒ€ãƒ ãªUInt32ã®æ•°å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +ç·šå½¢åˆåŒæ³•ç”Ÿæˆå™¨ã‚’使用ã—ã€ã‚·ã‚¹ãƒ†ãƒ ã‹ã‚‰å–å¾—ã—ãŸåˆæœŸçŠ¶æ…‹ã‚’用ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ©ãƒ³ãƒ€ãƒ ã«è¦‹ãˆã¾ã™ãŒã€å®Ÿéš›ã«ã¯åˆæœŸçŠ¶æ…‹ãŒçŸ¥ã‚‰ã‚Œã¦ã„ã‚‹å ´åˆã«ã¯äºˆæ¸¬å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚真ã«ãƒ©ãƒ³ãƒ€ãƒ ã§ã‚ã‚‹ã“ã¨ãŒé‡è¦ãªã‚·ãƒŠãƒªã‚ªã§ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ¬ãƒ™ãƒ«ã®å‘¼ã³å‡ºã—や外部ライブラリã¨ã®çµ±åˆãªã©ã®ä»£æ›¿æ‰‹æ³•ã‚’検討ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +rand() +``` + +別å: `rand32` + +**引数** + +ãªã—。 + +**戻り値** + +UInt32åž‹ã®æ•°å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +```sql +SELECT rand(); +``` + +```response +1569354847 -- 注æ„: 実際ã®å‡ºåŠ›ã¯ã“ã®ä¾‹ã«ç¤ºã•ã‚ŒãŸç‰¹å®šã®æ•°å€¤ã§ã¯ãªãã€ãƒ©ãƒ³ãƒ€ãƒ ãªæ•°å€¤ã«ãªã‚Šã¾ã™ +``` + +## rand64 + +ランダムãªUInt64ã®æ•´æ•°ï¼ˆUInt64)を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +rand64() +``` + +**引数** + +ãªã—。 + +**戻り値** + +å‡ç­‰ãªåˆ†å¸ƒã§ã®ãƒ©ãƒ³ãƒ€ãƒ ãªUInt64ã®æ•°å€¤ã€‚ + +ç·šå½¢åˆåŒæ³•ç”Ÿæˆå™¨ã‚’使用ã—ã€ã‚·ã‚¹ãƒ†ãƒ ã‹ã‚‰å–å¾—ã—ãŸåˆæœŸçŠ¶æ…‹ã‚’用ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ©ãƒ³ãƒ€ãƒ ã«è¦‹ãˆã¾ã™ãŒã€å®Ÿéš›ã«ã¯åˆæœŸçŠ¶æ…‹ãŒçŸ¥ã‚‰ã‚Œã¦ã„ã‚‹å ´åˆã«ã¯äºˆæ¸¬å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚真ã«ãƒ©ãƒ³ãƒ€ãƒ ã§ã‚ã‚‹ã“ã¨ãŒé‡è¦ãªã‚·ãƒŠãƒªã‚ªã§ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ¬ãƒ™ãƒ«ã®å‘¼ã³å‡ºã—や外部ライブラリã¨ã®çµ±åˆãªã©ã®ä»£æ›¿æ‰‹æ³•ã‚’検討ã—ã¦ãã ã•ã„。 + +**例** + +```sql +SELECT rand64(); +``` + +```response +15030268859237645412 -- 注æ„: 実際ã®å‡ºåŠ›ã¯ã“ã®ä¾‹ã«ç¤ºã•ã‚ŒãŸç‰¹å®šã®æ•°å€¤ã§ã¯ãªãã€ãƒ©ãƒ³ãƒ€ãƒ ãªæ•°å€¤ã«ãªã‚Šã¾ã™ã€‚ +``` + +## randCanonical + +ランダムãªFloat64ã®æ•°å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +randCanonical() +``` + +**引数** + +ãªã—。 + +**戻り値** + +0(å«ã‚€ï¼‰ã¨1(å«ã¾ãªã„)ã¨ã®é–“ã®Float64ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +```sql +SELECT randCanonical(); +``` + +```response +0.3452178901234567 - 注æ„: 実際ã®å‡ºåŠ›ã¯ã“ã®ä¾‹ã«ç¤ºã•ã‚ŒãŸç‰¹å®šã®æ•°å€¤ã§ã¯ãªãã€0ã¨1ã®é–“ã®ãƒ©ãƒ³ãƒ€ãƒ ãªFloat64ã®æ•°å€¤ã«ãªã‚Šã¾ã™ã€‚ +``` + +## randConstant + +å˜ä¸€ã®ãƒ©ãƒ³ãƒ€ãƒ ãªå€¤ã§æº€ãŸã•ã‚ŒãŸä¸€å®šã®ã‚«ãƒ©ãƒ ã‚’生æˆã—ã¾ã™ã€‚`rand`ã¨ç•°ãªã‚Šã€ã“ã®é–¢æ•°ã¯ç”Ÿæˆã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å„è¡Œã«åŒã˜ãƒ©ãƒ³ãƒ€ãƒ å€¤ã‚’表示ã—ã¾ã™ã€‚å˜ä¸€ã®ã‚¯ã‚¨ãƒªå†…ã®è¡Œã«å¯¾ã—ã¦ä¸€è²«ã—ãŸãƒ©ãƒ³ãƒ€ãƒ ãªã‚·ãƒ¼ãƒ‰ãŒå¿…è¦ãªã‚·ãƒŠãƒªã‚ªã§æœ‰ç”¨ã§ã™ã€‚ + +**構文** + +```sql +randConstant([x]); +``` + +**引数** + +- **[x] (オプション):** 生æˆã•ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ å€¤ã«å½±éŸ¿ã‚’与ãˆã‚‹ã‚ªãƒ—ションã®å¼ã§ã™ã€‚与ãˆã‚‰ã‚Œã¦ã‚‚ã€çµæžœã®å€¤ã¯åŒã˜ã‚¯ã‚¨ãƒªå®Ÿè¡Œå†…ã§ä¸€å®šã®ã¾ã¾ã§ã™ã€‚åŒã˜å¼ã‚’使用ã™ã‚‹ç•°ãªã‚‹ã‚¯ã‚¨ãƒªã§ã¯ã€ç•°ãªã‚‹ä¸€å®šå€¤ãŒç”Ÿæˆã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +**戻り値** + +å„è¡Œã«åŒã˜ãƒ©ãƒ³ãƒ€ãƒ å€¤ã‚’å«ã‚€UInt32åž‹ã®ã‚«ãƒ©ãƒ ã‚’è¿”ã—ã¾ã™ã€‚ + +**実装ã®è©³ç´°** + +オプションã®å¼ãŒåŒã˜å ´åˆã§ã‚‚ã€å®Ÿéš›ã®å‡ºåŠ›ã¯ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã”ã¨ã«ç•°ãªã‚Šã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションã®ãƒ‘ラメーターã¯ã€`randConstant`ã‚’å˜ç‹¬ã§ä½¿ç”¨ã™ã‚‹ã®ã¨æ¯”較ã—ã¦ç”Ÿæˆã•ã‚ŒãŸå€¤ã«å¤§ããªå¤‰æ›´ã‚’加ãˆã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +**例** + +```sql +SELECT randConstant() AS random_value; +``` + +```response +| random_value | +|--------------| +| 1234567890 | +``` + +```sql +SELECT randConstant(10) AS random_value; +``` + +```response +| random_value | +|--------------| +| 9876543210 | +``` + +## randUniform + +[`min`, `max`]ã®ç¯„囲ã‹ã‚‰å‡ç­‰ã«å¼•ã‹ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãªFloat64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +randUniform(min, max) +``` + +**引数** + +- `min` - `Float64` - 範囲ã®å·¦å¢ƒç•Œ, +- `max` - `Float64` - 範囲ã®å³å¢ƒç•Œ. + +**戻り値** + +[Float64](../data-types/float.md)åž‹ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæ•°å€¤ã€‚ + +**例** + +```sql +SELECT randUniform(5.5, 10) FROM numbers(5) +``` + +```response +┌─randUniform(5.5, 10)─┠+│ 8.094978491443102 │ +│ 7.3181248914450885 │ +│ 7.177741903868262 │ +│ 6.483347380953762 │ +│ 6.122286382885112 │ +└──────────────────────┘ +``` + +## randNormal + +[æ­£è¦åˆ†å¸ƒ](https://en.wikipedia.org/wiki/Normal_distribution)ã‹ã‚‰å¼•ã‹ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãªFloat64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +randNormal(mean, variance) +``` + +**引数** + +- `mean` - `Float64` - 分布ã®å¹³å‡, +- `variance` - `Float64` - 分布ã®[分散](https://en.wikipedia.org/wiki/Variance)。 + +**戻り値** + +- ランダム数。[Float64](../data-types/float.md)。 + +**例** + +```sql +SELECT randNormal(10, 2) FROM numbers(5) +``` + +çµæžœ: + +```result +┌──randNormal(10, 2)─┠+│ 13.389228911709653 │ +│ 8.622949707401295 │ +│ 10.801887062682981 │ +│ 4.5220192605895315 │ +│ 10.901239123982567 │ +└────────────────────┘ +``` + +## randLogNormal + +[対数正è¦åˆ†å¸ƒ](https://en.wikipedia.org/wiki/Log-normal_distribution)ã‹ã‚‰å¼•ã‹ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãªFloat64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +randLogNormal(mean, variance) +``` + +**引数** + +- `mean` - `Float64` - 分布ã®å¹³å‡, +- `variance` - `Float64` - 分布ã®[分散](https://en.wikipedia.org/wiki/Variance)。 + +**戻り値** + +- ランダム数。[Float64](../data-types/float.md)。 + +**例** + +```sql +SELECT randLogNormal(100, 5) FROM numbers(5) +``` + +çµæžœ: + +```result +┌─randLogNormal(100, 5)─┠+│ 1.295699673937363e48 │ +│ 9.719869109186684e39 │ +│ 6.110868203189557e42 │ +│ 9.912675872925529e39 │ +│ 2.3564708490552458e42 │ +└───────────────────────┘ +``` + +## randBinomial + +[二項分布](https://en.wikipedia.org/wiki/Binomial_distribution)ã‹ã‚‰å¼•ã‹ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãªUInt64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +randBinomial(experiments, probability) +``` + +**引数** + +- `experiments` - `UInt64` - 実験ã®å›žæ•°, +- `probability` - `Float64` - å„実験ã«ãŠã‘ã‚‹æˆåŠŸã®ç¢ºçŽ‡, 0ã‹ã‚‰1ã®é–“ã®å€¤ã€‚ + +**戻り値** + +- ランダム数。[UInt64](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT randBinomial(100, .75) FROM numbers(5) +``` + +çµæžœ: + +```result +┌─randBinomial(100, 0.75)─┠+│ 74 │ +│ 78 │ +│ 76 │ +│ 77 │ +│ 80 │ +└─────────────────────────┘ +``` + +## randNegativeBinomial + +[è² ã®äºŒé …分布](https://en.wikipedia.org/wiki/Negative_binomial_distribution)ã‹ã‚‰å¼•ã‹ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãªUInt64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +randNegativeBinomial(experiments, probability) +``` + +**引数** + +- `experiments` - `UInt64` - 実験ã®å›žæ•°, +- `probability` - `Float64` - å„実験ã«ãŠã‘る失敗ã®ç¢ºçŽ‡, 0ã‹ã‚‰1ã®é–“ã®å€¤ã€‚ + +**戻り値** + +- ランダム数。[UInt64](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT randNegativeBinomial(100, .75) FROM numbers(5) +``` + +çµæžœ: + +```result +┌─randNegativeBinomial(100, 0.75)─┠+│ 33 │ +│ 32 │ +│ 39 │ +│ 40 │ +│ 50 │ +└─────────────────────────────────┘ +``` + +## randPoisson + +[ãƒã‚¢ã‚½ãƒ³åˆ†å¸ƒ](https://en.wikipedia.org/wiki/Poisson_distribution)ã‹ã‚‰å¼•ã‹ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãªUInt64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +randPoisson(n) +``` + +**引数** + +- `n` - `UInt64` - 発生ã®å¹³å‡æ•°ã€‚ + +**戻り値** + +- ランダム数。[UInt64](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT randPoisson(10) FROM numbers(5) +``` + +çµæžœ: + +```result +┌─randPoisson(10)─┠+│ 8 │ +│ 8 │ +│ 7 │ +│ 10 │ +│ 6 │ +└─────────────────┘ +``` + +## randBernoulli + +[ベルヌーイ分布](https://en.wikipedia.org/wiki/Bernoulli_distribution)ã‹ã‚‰å¼•ã‹ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãªUInt64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +randBernoulli(probability) +``` + +**引数** + +- `probability` - `Float64` - æˆåŠŸã®ç¢ºçŽ‡ã€0ã‹ã‚‰1ã®é–“ã®å€¤ã€‚ + +**戻り値** + +- ランダム数。[UInt64](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT randBernoulli(.75) FROM numbers(5) +``` + +çµæžœ: + +```result +┌─randBernoulli(0.75)─┠+│ 1 │ +│ 1 │ +│ 0 │ +│ 1 │ +│ 1 │ +└─────────────────────┘ +``` + +## randExponential + +[指数分布](https://en.wikipedia.org/wiki/Exponential_distribution)ã‹ã‚‰å¼•ã‹ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãªFloat64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +randExponential(lambda) +``` + +**引数** + +- `lambda` - `Float64` - ラムダ値。 + +**戻り値** + +- ランダム数。[Float64](../data-types/float.md)。 + +**例** + +```sql +SELECT randExponential(1/10) FROM numbers(5) +``` + +çµæžœ: + +```result +┌─randExponential(divide(1, 10))─┠+│ 44.71628934340778 │ +│ 4.211013337903262 │ +│ 10.809402553207766 │ +│ 15.63959406553284 │ +│ 1.8148392319860158 │ +└────────────────────────────────┘ +``` + +## randChiSquared + +[カイ二乗分布](https://en.wikipedia.org/wiki/Chi-squared_distribution)ã‹ã‚‰å¼•ã‹ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãªFloat64ã‚’è¿”ã—ã¾ã™ã€‚ã“ã®åˆ†å¸ƒã¯ã€`k`個ã®ç‹¬ç«‹ã—ãŸæ¨™æº–æ­£è¦ä¹±æ•°å¤‰æ•°ã®å¹³æ–¹å’Œã®åˆ†å¸ƒã§ã™ã€‚ + +**構文** + +```sql +randChiSquared(degree_of_freedom) +``` + +**引数** + +- `degree_of_freedom` - `Float64` - 自由度。 + +**戻り値** + +- ランダム数。[Float64](../data-types/float.md)。 + +**例** + +```sql +SELECT randChiSquared(10) FROM numbers(5) +``` + +çµæžœ: + +```result +┌─randChiSquared(10)─┠+│ 10.015463656521543 │ +│ 9.621799919882768 │ +│ 2.71785015634699 │ +│ 11.128188665931908 │ +│ 4.902063104425469 │ +└────────────────────┘ +``` + +## randStudentT + +[スãƒãƒ¥ãƒ¼ãƒ‡ãƒ³ãƒˆã®t分布](https://en.wikipedia.org/wiki/Student%27s_t-distribution)ã‹ã‚‰å¼•ã‹ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãªFloat64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +randStudentT(degree_of_freedom) +``` + +**引数** + +- `degree_of_freedom` - `Float64` - 自由度。 + +**戻り値** + +- ランダム数。[Float64](../data-types/float.md)。 + +**例** + +```sql +SELECT randStudentT(10) FROM numbers(5) +``` + +çµæžœ: + +```result +┌─────randStudentT(10)─┠+│ 1.2217309938538725 │ +│ 1.7941971681200541 │ +│ -0.28192176076784664 │ +│ 0.2508897721303792 │ +│ -2.7858432909761186 │ +└──────────────────────┘ +``` + +## randFisherF + +[F分布](https://en.wikipedia.org/wiki/F-distribution)ã‹ã‚‰å¼•ã‹ã‚ŒãŸãƒ©ãƒ³ãƒ€ãƒ ãªFloat64ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +randFisherF(d1, d2) +``` + +**引数** + +- `d1` - `Float64` - `X = (S1 / d1) / (S2 / d2)`ã«ãŠã‘ã‚‹d1ã®è‡ªç”±åº¦, +- `d2` - `Float64` - `X = (S1 / d1) / (S2 / d2)`ã«ãŠã‘ã‚‹d2ã®è‡ªç”±åº¦, + +**戻り値** + +- ランダム数。[Float64](../data-types/float.md)。 + +**例** + +```sql +SELECT randFisherF(10, 3) FROM numbers(5) +``` + +çµæžœ: + +```result +┌──randFisherF(10, 3)─┠+│ 7.286287504216609 │ +│ 0.26590779413050386 │ +│ 0.22207610901168987 │ +│ 0.7953362728449572 │ +│ 0.19278885985221572 │ +└─────────────────────┘ +``` + +## randomString {#randomString} + +指定ã•ã‚ŒãŸé•·ã•ã®ãƒ©ãƒ³ãƒ€ãƒ ãªãƒã‚¤ãƒˆï¼ˆã‚¼ãƒ­ãƒã‚¤ãƒˆã‚’å«ã‚€ï¼‰ã§æº€ãŸã•ã‚ŒãŸæ–‡å­—列を生æˆã—ã¾ã™ã€‚ã™ã¹ã¦ã®æ–‡å­—ãŒå°åˆ·å¯èƒ½ã§ã‚ã‚‹ã¨ã¯é™ã‚Šã¾ã›ã‚“。 + +**構文** + +```sql +randomString(length) +``` + +**引数** + +- `length` — 文字列ã®ãƒã‚¤ãƒˆé•·ã€‚æ­£ã®æ•´æ•°ã€‚ + +**戻り値** + +- ランダムãªãƒã‚¤ãƒˆã§æº€ãŸã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT randomString(30) AS str, length(str) AS len FROM numbers(2) FORMAT Vertical; +``` + +çµæžœ: + +```text +Row 1: +────── +str: 3 G : pT ?w Ñ‚i k aV f6 +len: 30 + +Row 2: +────── +str: 9 ,] ^ ) ]?? 8 +len: 30 +``` + +## randomFixedString + +指定ã•ã‚ŒãŸé•·ã•ã®ãƒ©ãƒ³ãƒ€ãƒ ãªãƒã‚¤ãƒˆï¼ˆã‚¼ãƒ­ãƒã‚¤ãƒˆã‚’å«ã‚€ï¼‰ã§æº€ãŸã•ã‚ŒãŸãƒã‚¤ãƒŠãƒªæ–‡å­—列を生æˆã—ã¾ã™ã€‚ã™ã¹ã¦ã®æ–‡å­—ãŒå°åˆ·å¯èƒ½ã§ã‚ã‚‹ã¨ã¯é™ã‚Šã¾ã›ã‚“。 + +**構文** + +```sql +randomFixedString(length); +``` + +**引数** + +- `length` — 文字列ã®ãƒã‚¤ãƒˆé•·ã€‚[UInt64](../data-types/int-uint.md)。 + +**戻り値** + +- ランダムãªãƒã‚¤ãƒˆã§æº€ãŸã•ã‚ŒãŸæ–‡å­—列。[FixedString](../data-types/fixedstring.md)。 + +**例** + +クエリ: + +```sql +SELECT randomFixedString(13) as rnd, toTypeName(rnd) +``` + +çµæžœ: + +```text +┌─rnd──────┬─toTypeName(randomFixedString(13))─┠+│ jâ–’hã‹–HɨZ'â–’ │ FixedString(13) │ +└──────────┴───────────────────────────────────┘ +``` + +## randomPrintableASCII + +ランダムãª[ASCII](https://en.wikipedia.org/wiki/ASCII#Printable_characters)文字ã®é›†åˆã‚’æŒã¤æ–‡å­—列を生æˆã—ã¾ã™ã€‚ã™ã¹ã¦ã®æ–‡å­—ãŒå°åˆ·å¯èƒ½ã§ã™ã€‚ +`length < 0`を渡ã™ã¨ã€ã“ã®é–¢æ•°ã®å‹•ä½œã¯æœªå®šç¾©ã§ã™ã€‚ + +**構文** + +```sql +randomPrintableASCII(length) +``` + +**引数** + +- `length` — 文字列ã®ãƒã‚¤ãƒˆé•·ã€‚æ­£ã®æ•´æ•°ã€‚ + +**戻り値** + +- ランダムãª[ASCII](https://en.wikipedia.org/wiki/ASCII#Printable_characters)å°åˆ·å¯èƒ½æ–‡å­—ã®é›†åˆã‚’æŒã¤æ–‡å­—列。[String](../data-types/string.md) + +**例** + +```sql +SELECT number, randomPrintableASCII(30) as str, length(str) FROM system.numbers LIMIT 3 +``` + +```text +┌─number─┬─str────────────────────────────┬─length(randomPrintableASCII(30))─┠+│ 0 │ SuiCOSTvC0csfABSw=UcSzp2.`rv8x │ 30 │ +│ 1 │ 1Ag NlJ &RCN:*>HVPG;PE-nO"SUFD │ 30 │ +│ 2 │ /"+<"wUTh:=LjJ Vm!c&hI*m#XTfzz │ 30 │ +└────────┴────────────────────────────────┴──────────────────────────────────┘ +``` + +## randomStringUTF8 + +指定ã•ã‚ŒãŸé•·ã•ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæ–‡å­—列を生æˆã—ã¾ã™ã€‚çµæžœã®æ–‡å­—列ã¯æœ‰åŠ¹ãªUTF-8コードãƒã‚¤ãƒ³ãƒˆã‚’å«ã¿ã¾ã™ã€‚コードãƒã‚¤ãƒ³ãƒˆã®å€¤ã¯ã€Unicodeã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„る範囲外ã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +randomStringUTF8(length); +``` + +**引数** + +- `length` — コードãƒã‚¤ãƒ³ãƒˆã§ã®æ–‡å­—列ã®é•·ã•ã€‚[UInt64](../data-types/int-uint.md)。 + +**戻り値** + +- UTF-8ã®ãƒ©ãƒ³ãƒ€ãƒ æ–‡å­—列。[String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT randomStringUTF8(13) +``` + +çµæžœ: + +```text +┌─randomStringUTF8(13)─┠+│ 𘤗ð™‰Ð´å… åº‡ó¡…´ó±±Žó¦ªî–¥ô‚•Œî˜™ð”Š¹ð“°› │ +└──────────────────────┘ +``` + +## fuzzBits {#fuzzBits} + +**構文** + +Stringã¾ãŸã¯FixedString `s`ã®ãƒ“ットをã²ã£ãã‚Šè¿”ã—ã¾ã™ã€‚ãã‚Œãžã‚Œã®ãƒ“ットã¯ç¢ºçŽ‡`prob`ã§å¤‰æ›´ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +fuzzBits(s, prob) +``` + +**引数** + +- `s` - `String`ã¾ãŸã¯`FixedString`, +- `prob` - 0.0ã‹ã‚‰1.0ã®é–“ã®å®šæ•°`Float32/64`。 + +**戻り値** + +`åŒã‚¿ã‚¤ãƒ—ã®` s`ã¨åŒã˜ã‚¿ã‚¤ãƒ—ã®ãƒ•ã‚¡ã‚ºã•ã‚ŒãŸæ–‡å­—列。 + +**例** + +```sql +SELECT fuzzBits(materialize('abacaba'), 0.1) +FROM numbers(3) +``` + +çµæžœ: + +```result +┌─fuzzBits(materialize('abacaba'), 0.1)─┠+│ abaaaja │ +│ a*cjab+ │ +│ aeca2A │ +└───────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/rounding-functions.md b/docs/ja/sql-reference/functions/rounding-functions.md new file mode 100644 index 00000000000..c6ee204a03b --- /dev/null +++ b/docs/ja/sql-reference/functions/rounding-functions.md @@ -0,0 +1,447 @@ +--- +slug: /ja/sql-reference/functions/rounding-functions +sidebar_position: 155 +sidebar_label: 丸゠+--- + +# 丸ã‚関数 + +## floor + +`x` 以下ã®æœ€å¤§ã®åˆ‡ã‚Šæ¨ã¦æ•°å€¤ã‚’è¿”ã—ã¾ã™ã€‚切りæ¨ã¦æ•°å€¤ã¯ 1 / 10 * N ã®å€æ•°ã§ã‚ã‚Šã€1 / 10 * N ãŒæ­£ç¢ºã§ãªã„å ´åˆã€é©åˆ‡ãªãƒ‡ãƒ¼ã‚¿åž‹ã«æœ€ã‚‚è¿‘ã„数値ã§ã™ã€‚ + +æ•´æ•°ã®å¼•æ•°ã¯è² ã® `N` 引数ã§ä¸¸ã‚られã€éžè² ã® `N` ã®å ´åˆã€é–¢æ•°ã¯ `x` ã‚’è¿”ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ä½•ã‚‚ã—ã¾ã›ã‚“。 + +丸ã‚ã«ã‚ˆã‚Šã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆï¼ˆä¾‹: `floor(-128, -1)`)ã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +**構文** + +``` sql +floor(x[, N]) +``` + +**パラメーター** + +- `x` - 丸ã‚る値。[Float*](../data-types/float.md)ã€[Decimal*](../data-types/decimal.md)ã€ã¾ãŸã¯ [(U)Int*](../data-types/int-uint.md)。 +- `N` . [(U)Int*](../data-types/int-uint.md)。デフォルトã¯ã‚¼ãƒ­ã§ã€æ•´æ•°ã¸ã®ä¸¸ã‚ã‚’æ„味ã—ã¾ã™ã€‚è² ã«ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +`x` ã¨åŒã˜åž‹ã®åˆ‡ã‚Šæ¨ã¦æ•°å€¤ã€‚ + +**例** + +クエリ: + +```sql +SELECT floor(123.45, 1) AS rounded +``` + +çµæžœ: + +``` +┌─rounded─┠+│ 123.4 │ +└─────────┘ +``` + +クエリ: + +```sql +SELECT floor(123.45, -1) +``` + +çµæžœ: + +``` +┌─rounded─┠+│ 120 │ +└─────────┘ +``` + +## ceiling + +`floor` ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€`x` 以上ã®æœ€å°ã®åˆ‡ã‚Šä¸Šã’数値を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +ceiling(x[, N]) +``` + +別å: `ceil` + +## truncate + +`floor` ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€`x` ã®çµ¶å¯¾å€¤ä»¥ä¸‹ã®æœ€å¤§çµ¶å¯¾å€¤ã‚’æŒã¤åˆ‡ã‚Šæ¨ã¦æ•°å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +truncate(x[, N]) +``` + +別å: `trunc`. + +**例** + +クエリ: + +```sql +SELECT truncate(123.499, 1) as res; +``` + +```response +┌───res─┠+│ 123.4 │ +└───────┘ +``` + +## round + +指定ã•ã‚ŒãŸå°æ•°ç‚¹ä»¥ä¸‹ã®æ¡æ•°ã«å€¤ã‚’丸ã‚ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚ªãƒ¼ãƒ€ãƒ¼ã®æœ€ã‚‚è¿‘ã„数値を返ã—ã¾ã™ã€‚入力値ãŒéš£æŽ¥ã™ã‚‹2ã¤ã®æ•°å€¤ã«ç­‰ã—ã„è·é›¢ã®å ´åˆã€ã“ã®é–¢æ•°ã¯ [Float*](../data-types/float.md) 入力ã«å¯¾ã—ã¦ã¯ãƒãƒ³ã‚«ãƒ¼ã‚ºãƒ»ãƒ©ã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’使用ã—ã€ä»–ã®åž‹ï¼ˆ[Decimal*](../data-types/decimal.md))ã«å¯¾ã—ã¦ã¯é›¶ã‹ã‚‰é ã–ã‘ã¦ä¸¸ã‚ã¾ã™ã€‚ + +**構文** + +``` sql +round(x[, N]) +``` + +**引数** + +- `x` — 丸ã‚る数値。[Float*](../data-types/float.md)ã€[Decimal*](../data-types/decimal.md)ã€ã¾ãŸã¯ [(U)Int*](../data-types/int-uint.md)。 +- `N` — 丸ã‚ã‚‹å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡æ•°ã€‚整数。デフォルト㯠`0`。 + - `N > 0` ã®å ´åˆã€é–¢æ•°ã¯å°æ•°ç‚¹ä»¥ä¸‹ã‚’丸ã‚ã¾ã™ã€‚ + - `N < 0` ã®å ´åˆã€é–¢æ•°ã¯å°æ•°ç‚¹ã®å·¦ã‚’丸ã‚ã¾ã™ã€‚ + - `N = 0` ã®å ´åˆã€é–¢æ•°ã¯æ¬¡ã®æ•´æ•°ã«ä¸¸ã‚ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤:** + +`x` ã¨åŒã˜åž‹ã®åˆ‡ã‚Šæ¨ã¦æ•°å€¤ã€‚ + +**例** + +`Float` 入力ã®å ´åˆã®ä¾‹: + +```sql +SELECT number / 2 AS x, round(x) FROM system.numbers LIMIT 3; +``` + +``` +┌───x─┬─round(divide(number, 2))─┠+│ 0 │ 0 │ +│ 0.5 │ 0 │ +│ 1 │ 1 │ +└─────┴──────────────────────────┘ +``` + +`Decimal` 入力ã®å ´åˆã®ä¾‹: + +```sql +SELECT cast(number / 2 AS Decimal(10,4)) AS x, round(x) FROM system.numbers LIMIT 3; +``` + +``` +┌───x─┬─round(CAST(divide(number, 2), 'Decimal(10, 4)'))─┠+│ 0 │ 0 │ +│ 0.5 │ 1 │ +│ 1 │ 1 │ +└─────┴──────────────────────────────────────────────────┘ +``` + +末尾ã®ã‚¼ãƒ­ã‚’ä¿æŒã™ã‚‹ã«ã¯ã€è¨­å®š `output_format_decimal_trailing_zeros` を有効ã«ã—ã¾ã™: + +```sql +SELECT cast(number / 2 AS Decimal(10,4)) AS x, round(x) FROM system.numbers LIMIT 3 settings output_format_decimal_trailing_zeros=1; + +``` + +``` +┌──────x─┬─round(CAST(divide(number, 2), 'Decimal(10, 4)'))─┠+│ 0.0000 │ 0.0000 │ +│ 0.5000 │ 1.0000 │ +│ 1.0000 │ 1.0000 │ +└────────┴──────────────────────────────────────────────────┘ +``` + +最も近ã„数値ã¸ã®ä¸¸ã‚ã®ä¾‹: + +``` text +round(3.2, 0) = 3 +round(4.1267, 2) = 4.13 +round(22,-1) = 20 +round(467,-2) = 500 +round(-467,-2) = -500 +``` + +ãƒãƒ³ã‚«ãƒ¼ã‚ºãƒ»ãƒ©ã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã€‚ + +``` text +round(3.5) = 4 +round(4.5) = 4 +round(3.55, 1) = 3.6 +round(3.65, 1) = 3.6 +``` + +**関連項目** + +- [roundBankers](#roundbankers) + +## roundBankers + +指定ã•ã‚ŒãŸå°æ•°ä½ç½®ã«æ•°å€¤ã‚’丸ã‚ã¾ã™ã€‚ + +丸ã‚る数値ãŒ2ã¤ã®æ•°å€¤ã®ä¸­é–“ã«ã‚ã‚‹å ´åˆã€ã“ã®é–¢æ•°ã¯ãƒãƒ³ã‚«ãƒ¼ã‚ºãƒ»ãƒ©ã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’使用ã—ã¾ã™ã€‚ãƒãƒ³ã‚«ãƒ¼ã‚ºãƒ»ãƒ©ã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã¯ã€æ•°å€¤ã‚’丸ã‚る方法ã§ã€æ•°å€¤ãŒä¸­é–“ã«ã‚ã‚‹å ´åˆã€æŒ‡å®šã•ã‚ŒãŸå°æ•°ä½ç½®ã§æœ€ã‚‚è¿‘ã„å¶æ•°ã«ä¸¸ã‚られã¾ã™ã€‚例ãˆã°: 3.5ã¯4ã«ä¸¸ã‚られã€2.5ã¯2ã«ä¸¸ã‚られã¾ã™ã€‚ã“ã‚Œã¯ã€[IEEE 754](https://en.wikipedia.org/wiki/IEEE_754#Roundings_to_nearest)ã§å®šç¾©ã•ã‚ŒãŸæµ®å‹•å°æ•°ç‚¹æ•°ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ä¸¸ã‚方法ã§ã™ã€‚[round](#round) 関数もåŒã˜ä¸¸ã‚を浮動å°æ•°ç‚¹æ•°ã«å¯¾ã—ã¦è¡Œã„ã¾ã™ã€‚`roundBankers` 関数も整数をåŒã˜æ–¹æ³•ã§ä¸¸ã‚ã¾ã™ã€‚例ãˆã°ã€ `roundBankers(45, -1) = 40`。 + +ä»–ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€é–¢æ•°ã¯æ•°å€¤ã‚’最も近ã„æ•´æ•°ã«ä¸¸ã‚ã¾ã™ã€‚ + +ãƒãƒ³ã‚«ãƒ¼ã‚ºãƒ»ãƒ©ã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’使用ã™ã‚‹ã“ã¨ã§ã€ã“ã®æ•°å€¤ã‚’åˆè¨ˆã¾ãŸã¯æ¸›ç®—ã™ã‚‹çµæžœã«å¯¾ã™ã‚‹ä¸¸ã‚数値ã®å½±éŸ¿ã‚’減少ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +例ãˆã°ã€1.5ã€2.5ã€3.5ã€4.5ã‚’ç•°ãªã‚‹ä¸¸ã‚ã§åˆè¨ˆã—ã¾ã™: + +- 丸ã‚ãªã—: 1.5 + 2.5 + 3.5 + 4.5 = 12. +- ãƒãƒ³ã‚«ãƒ¼ã‚ºãƒ»ãƒ©ã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°: 2 + 2 + 4 + 4 = 12. +- 最も近ã„æ•´æ•°ã¸ã®ä¸¸ã‚: 2 + 3 + 4 + 5 = 14. + +**構文** + +``` sql +roundBankers(x [, N]) +``` + +**引数** + + - `N > 0` — 関数ã¯å°æ•°ç‚¹ä»¥ä¸‹ã®å³å´ã«ã‚る指定ã•ã‚ŒãŸä½ç½®ã«æ•°å€¤ã‚’丸ã‚ã¾ã™ã€‚例: `roundBankers(3.55, 1) = 3.6`。 + - `N < 0` — 関数ã¯å°æ•°ç‚¹å·¦å´ã®æŒ‡å®šã•ã‚ŒãŸä½ç½®ã«æ•°å€¤ã‚’丸ã‚ã¾ã™ã€‚例: `roundBankers(24.55, -1) = 20`。 + - `N = 0` — 関数ã¯æ•°å€¤ã‚’æ•´æ•°ã«ä¸¸ã‚ã¾ã™ã€‚ã“ã®å ´åˆã€å¼•æ•°ã¯çœç•¥å¯èƒ½ã§ã™ã€‚例: `roundBankers(2.5) = 2`。 + +- `x` — 丸ã‚る数値。[Float*](../data-types/float.md)ã€[Decimal*](../data-types/decimal.md)ã€ã¾ãŸã¯ [(U)Int*](../data-types/int-uint.md)。 +- `N` — 丸ã‚ã‚‹å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡æ•°ã€‚整数。デフォルト㯠`0`。 + - `N > 0` ã®å ´åˆã€é–¢æ•°ã¯å°æ•°ç‚¹ä»¥ä¸‹ã‚’丸ã‚ã¾ã™ã€‚ + - `N < 0` ã®å ´åˆã€é–¢æ•°ã¯å°æ•°ç‚¹ã®å·¦ã‚’丸ã‚ã¾ã™ã€‚ + - `N = 0` ã®å ´åˆã€é–¢æ•°ã¯æ¬¡ã®æ•´æ•°ã«ä¸¸ã‚ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +ãƒãƒ³ã‚«ãƒ¼ã‚ºãƒ»ãƒ©ã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°æ³•ã§ä¸¸ã‚ã‚ŒãŸå€¤ã€‚ + +**例** + +クエリ: + +```sql + SELECT number / 2 AS x, roundBankers(x, 0) AS b fROM system.numbers limit 10 +``` + +çµæžœ: + +``` +┌───x─┬─b─┠+│ 0 │ 0 │ +│ 0.5 │ 0 │ +│ 1 │ 1 │ +│ 1.5 │ 2 │ +│ 2 │ 2 │ +│ 2.5 │ 2 │ +│ 3 │ 3 │ +│ 3.5 │ 4 │ +│ 4 │ 4 │ +│ 4.5 │ 4 │ +└─────┴───┘ +``` + +ãƒãƒ³ã‚«ãƒ¼ã‚ºãƒ»ãƒ©ã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã®ä¾‹: + +``` +roundBankers(0.4) = 0 +roundBankers(-3.5) = -4 +roundBankers(4.5) = 4 +roundBankers(3.55, 1) = 3.6 +roundBankers(3.65, 1) = 3.6 +roundBankers(10.35, 1) = 10.4 +roundBankers(10.755, 2) = 10.76 +``` + +**関連項目** + +- [round](#round) + +## roundToExp2 + +数値をå—ã‘å–ã‚Šã€ãã®æ•°å€¤ãŒ1未満ã®å ´åˆã€`0` ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ã€æœ€ã‚‚è¿‘ã„2ã®æŒ‡æ•°ã«ä¸¸ã‚ã¾ã™ã€‚ + +**構文** + +```sql +roundToExp2(num) +``` + +**パラメーター** + +- `num`: 丸ã‚る数値。[UInt](../data-types/int-uint.md)/[Float](../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `num` ãŒ1未満ã®å ´åˆ `0`。[UInt8](../data-types/int-uint.md)。 +- `num` を最も近ã„2ã®æŒ‡æ•°ã«ä¸¸ã‚ã¾ã™ã€‚[UInt](../data-types/int-uint.md)/[Float](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT *, roundToExp2(*) FROM system.numbers WHERE number IN (0, 2, 5, 10, 19, 50) +``` + +çµæžœ: + +```response +┌─number─┬─roundToExp2(number)─┠+│ 0 │ 0 │ +│ 2 │ 2 │ +│ 5 │ 4 │ +│ 10 │ 8 │ +│ 19 │ 16 │ +│ 50 │ 32 │ +└────────┴─────────────────────┘ +``` + +## roundDuration + +数値をå—ã‘å–ã‚Šã€ãã®æ•°å€¤ãŒ1未満ã®å ´åˆã€`0` ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ã€ã‚ˆã使ã‚れる期間ã®ã‚»ãƒƒãƒˆã‹ã‚‰æœ€ã‚‚è¿‘ã„数値ã«ä¸¸ã‚ã¾ã™: `1, 10, 30, 60, 120, 180, 240, 300, 600, 1200, 1800, 3600, 7200, 18000, 36000`。 + +**構文** + +```sql +roundDuration(num) +``` + +**パラメーター** + +- `num`: よã使ã‚れる期間セットã®ä¸€ã¤ã«ä¸¸ã‚る数値。[UInt](../data-types/int-uint.md)/[Float](../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `num` ãŒ1未満ã®å ´åˆ `0`。 +- ãれ以外ã®å ´åˆ: `1, 10, 30, 60, 120, 180, 240, 300, 600, 1200, 1800, 3600, 7200, 18000, 36000` ã®ä¸€ã¤ã€‚[UInt16](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT *, roundDuration(*) FROM system.numbers WHERE number IN (0, 9, 19, 47, 101, 149, 205, 271, 421, 789, 1423, 2345, 4567, 9876, 24680, 42573) +``` + +çµæžœ: + +```response +┌─number─┬─roundDuration(number)─┠+│ 0 │ 0 │ +│ 9 │ 1 │ +│ 19 │ 10 │ +│ 47 │ 30 │ +│ 101 │ 60 │ +│ 149 │ 120 │ +│ 205 │ 180 │ +│ 271 │ 240 │ +│ 421 │ 300 │ +│ 789 │ 600 │ +│ 1423 │ 1200 │ +│ 2345 │ 1800 │ +│ 4567 │ 3600 │ +│ 9876 │ 7200 │ +│ 24680 │ 18000 │ +│ 42573 │ 36000 │ +└────────┴───────────────────────┘ +``` + +## roundAge + +ã•ã¾ã–ã¾ãªä¸€èˆ¬çš„ãªäººé–“ã®å¹´é½¢ç¯„囲内ã§æ•°å€¤ã‚’å—å–ã‚Šã€ãã®ç¯„囲内ã®æœ€å¤§ã¾ãŸã¯æœ€å°å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +roundAge(num) +``` + +**パラメーター** + +- `age`: 年齢を表ã™æ•°å€¤ï¼ˆå¹´å˜ä½ï¼‰ã€‚[UInt](../data-types/int-uint.md)/[Float](../data-types/float.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `age` ãŒ1未満ã®å ´åˆ `0` ã‚’è¿”ã—ã¾ã™ã€‚ +- `1 <= age <= 17` ã®å ´åˆ `17` ã‚’è¿”ã—ã¾ã™ã€‚ +- `18 <= age <= 24` ã®å ´åˆ `18` ã‚’è¿”ã—ã¾ã™ã€‚ +- `25 <= age <= 34` ã®å ´åˆ `25` ã‚’è¿”ã—ã¾ã™ã€‚ +- `35 <= age <= 44` ã®å ´åˆ `35` ã‚’è¿”ã—ã¾ã™ã€‚ +- `45 <= age <= 54` ã®å ´åˆ `45` ã‚’è¿”ã—ã¾ã™ã€‚ +- `age >= 55` ã®å ´åˆ `55` ã‚’è¿”ã—ã¾ã™ã€‚ + +åž‹: [UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT *, roundAge(*) FROM system.numbers WHERE number IN (0, 5, 20, 31, 37, 54, 72); +``` + +çµæžœ: + +```response +┌─number─┬─roundAge(number)─┠+│ 0 │ 0 │ +│ 5 │ 17 │ +│ 20 │ 18 │ +│ 31 │ 25 │ +│ 37 │ 35 │ +│ 54 │ 45 │ +│ 72 │ 55 │ +└────────┴──────────────────┘ +``` + +## roundDown + +数値をå—ã‘å–ã‚Šã€æŒ‡å®šã•ã‚ŒãŸé…列内ã®è¦ç´ ã«å¯¾ã—ã¦åˆ‡ã‚Šæ¨ã¦ã‚’è¡Œã„ã¾ã™ã€‚値ãŒæœ€ã‚‚低ã„境界よりもå°ã•ã„å ´åˆã€æœ€ã‚‚低ã„境界ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +roundDown(num, arr) +``` + +**パラメーター** + +- `num`: 切りæ¨ã¦ã™ã‚‹æ•°å€¤ã€‚[Numeric](../data-types/int-uint.md)。 +- `arr`: `age` を切りæ¨ã¦ã™ã‚‹ãŸã‚ã®è¦ç´ ã®é…列。[Array](../data-types/array.md)ã®[UInt](../data-types/int-uint.md)/[Float](../data-types/float.md)型。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é…列`arr` ã®è¦ç´ ã«åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚ŒãŸæ•°å€¤ã€‚値ãŒæœ€ã‚‚低ã„境界よりå°ã•ã„å ´åˆã€æœ€ã‚‚低ã„境界ãŒè¿”ã•ã‚Œã¾ã™ã€‚[UInt](../data-types/int-uint.md)/[Float](../data-types/float.md)åž‹ã¯`arr`ã®åž‹ã«ã‚ˆã‚Šæ±ºå®šã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT *, roundDown(*, [3, 4, 5]) FROM system.numbers WHERE number IN (0, 1, 2, 3, 4, 5) +``` + +çµæžœ: + +```response +┌─number─┬─roundDown(number, [3, 4, 5])─┠+│ 0 │ 3 │ +│ 1 │ 3 │ +│ 2 │ 3 │ +│ 3 │ 3 │ +│ 4 │ 4 │ +│ 5 │ 5 │ +└────────┴──────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/splitting-merging-functions.md b/docs/ja/sql-reference/functions/splitting-merging-functions.md new file mode 100644 index 00000000000..ccc1b23af80 --- /dev/null +++ b/docs/ja/sql-reference/functions/splitting-merging-functions.md @@ -0,0 +1,398 @@ +--- +slug: /ja/sql-reference/functions/splitting-merging-functions +sidebar_position: 165 +sidebar_label: 文字列ã®åˆ†å‰² +--- + +# 文字列を分割ã™ã‚‹ãŸã‚ã®é–¢æ•° + +## splitByChar + +特定ã®æ–‡å­—ã§æ–‡å­—列を分割ã—ã¦ã‚µãƒ–文字列を生æˆã—ã¾ã™ã€‚1文字ã‹ã‚‰ãªã‚‹å®šæ•°æ–‡å­—列 `separator` を使用ã—ã¾ã™ã€‚é¸æŠžã•ã‚ŒãŸã‚µãƒ–文字列ã®é…列を返ã—ã¾ã™ã€‚文字列ã®å…ˆé ­ã‚„末尾ã«åŒºåˆ‡ã‚Šæ–‡å­—ãŒã‚ã‚‹å ´åˆã‚„ã€é€£ç¶šã—ã¦åŒºåˆ‡ã‚Šæ–‡å­—ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ã€ç©ºã®ã‚µãƒ–文字列もé¸æŠžã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +splitByChar(separator, s[, max_substrings])) +``` + +**引数** + +- `separator` — 1文字ã‹ã‚‰ãªã‚‹åŒºåˆ‡ã‚Šæ–‡å­—。[String](../data-types/string.md)。 +- `s` — 分割ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md)。 +- `max_substrings` — ä»»æ„ã® `Int64`。デフォルトã¯0ã§ã™ã€‚`max_substrings` > 0 ã®å ´åˆã€è¿”ã•ã‚Œã‚‹é…列ã«ã¯æœ€å¤§ã§ `max_substrings` ã®ã‚µãƒ–文字列ãŒå«ã¾ã‚Œã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€å¯èƒ½ãªé™ã‚Šå¤šãã®ã‚µãƒ–文字列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é¸æŠžã•ã‚ŒãŸã‚µãƒ–文字列ã®é…列。[Array](../data-types/array.md)([String](../data-types/string.md))。 + +空ã®ã‚µãƒ–文字列ãŒé¸æŠžã•ã‚Œã‚‹çŠ¶æ³: + +- 文字列ã®å…ˆé ­ã¾ãŸã¯æœ«å°¾ã«åŒºåˆ‡ã‚Šæ–‡å­—ãŒã‚ã‚‹å ´åˆ; +- 連続ã—ã¦è¤‡æ•°ã®åŒºåˆ‡ã‚Šæ–‡å­—ãŒã‚ã‚‹å ´åˆ; +- å…ƒã®æ–‡å­—列 `s` ãŒç©ºã§ã‚ã‚‹å ´åˆã€‚ + +:::note +ClickHouse v22.11 以é™ã€ãƒ‘ラメータ `max_substrings` ã®å‹•ä½œãŒå¤‰æ›´ã•ã‚Œã¾ã—ãŸã€‚ãれ以å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ã€`max_substrings > 0` 㯠`max_substring` 回ã®åˆ†å‰²ãŒè¡Œã‚ã‚Œã€æ–‡å­—列ã®æ®‹ã‚Šã¯ãƒªã‚¹ãƒˆã®æœ€å¾Œã®è¦ç´ ã¨ã—ã¦è¿”ã•ã‚Œã¦ã„ã¾ã—ãŸã€‚ +例ãˆã°ã€ +- v22.10 ã§ã¯: `SELECT splitByChar('=', 'a=b=c=d', 2);` 㯠`['a','b','c=d']` ã‚’è¿”ã—ã¾ã—㟠+- v22.11 ã§ã¯: `SELECT splitByChar('=', 'a=b=c=d', 2);` 㯠`['a','b']` ã‚’è¿”ã—ã¾ã—㟠+ +ClickHouseã®v22.11以å‰ã®ã‚ˆã†ãªå‹•ä½œã‚’å¾—ã‚‹ã«ã¯ã€[splitby_max_substrings_includes_remaining_string](../../operations/settings/settings.md#splitby_max_substrings_includes_remaining_string) を設定ã—ã¦ãã ã•ã„。 +`SELECT splitByChar('=', 'a=b=c=d', 2) SETTINGS splitby_max_substrings_includes_remaining_string = 1 -- ['a', 'b=c=d']` +::: + +**例** + +``` sql +SELECT splitByChar(',', '1,2,3,abcde'); +``` + +çµæžœ: + +``` text +┌─splitByChar(',', '1,2,3,abcde')─┠+│ ['1','2','3','abcde'] │ +└─────────────────────────────────┘ +``` + +## splitByString + +文字列を特定ã®æ–‡å­—列ã§åˆ†å‰²ã—ã¾ã™ã€‚複数文字ã‹ã‚‰ãªã‚‹å®šæ•°æ–‡å­—列 `separator` を区切り文字ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚文字列 `separator` ãŒç©ºã®å ´åˆã€æ–‡å­—列 `s` ã‚’å˜ä¸€æ–‡å­—ã®é…列ã«åˆ†å‰²ã—ã¾ã™ã€‚ + +**構文** + +``` sql +splitByString(separator, s[, max_substrings])) +``` + +**引数** + +- `separator` — 区切り文字。[String](../data-types/string.md)。 +- `s` — 分割ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md)。 +- `max_substrings` — ä»»æ„ã® `Int64`。デフォルトã¯0ã§ã™ã€‚`max_substrings` > 0 ã®å ´åˆã€è¿”ã•ã‚Œã‚‹ã‚µãƒ–文字列ã¯æœ€å¤§ã§ `max_substrings` ã«ãªã‚Šã€ãれ以外ã¯å¯èƒ½ãªé™ã‚Šå¤šãã®ã‚µãƒ–文字列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é¸æŠžã•ã‚ŒãŸã‚µãƒ–文字列ã®é…列。[Array](../data-types/array.md)([String](../data-types/string.md))。 + +空ã®ã‚µãƒ–文字列ãŒé¸æŠžã•ã‚Œã‚‹çŠ¶æ³: + +- éžç©ºã®åŒºåˆ‡ã‚Šæ–‡å­—ãŒæ–‡å­—列ã®å…ˆé ­ã‚„末尾ã«ã‚ã‚‹å ´åˆ; +- éžç©ºã®åŒºåˆ‡ã‚Šæ–‡å­—ãŒé€£ç¶šã—ã¦ã„ã‚‹å ´åˆ; +- å…ƒã®æ–‡å­—列 `s` ãŒç©ºã§åŒºåˆ‡ã‚Šæ–‡å­—ãŒç©ºã§ã¯ãªã„å ´åˆã€‚ + +:::note +[splitby_max_substrings_includes_remaining_string](../../operations/settings/settings.md#splitby_max_substrings_includes_remaining_string) を設定ã™ã‚‹ã¨ã€`max_substrings` > 0 ã®å ´åˆã«æ®‹ã‚Šã®æ–‡å­—列ãŒçµæžœé…列ã®æœ€å¾Œã®è¦ç´ ã«å«ã¾ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: 0)。 +::: + +**例** + +``` sql +SELECT splitByString(', ', '1, 2 3, 4,5, abcde'); +``` + +çµæžœ: + +``` text +┌─splitByString(', ', '1, 2 3, 4,5, abcde')─┠+│ ['1','2 3','4,5','abcde'] │ +└───────────────────────────────────────────┘ +``` + +``` sql +SELECT splitByString('', 'abcde'); +``` + +çµæžœ: + +``` text +┌─splitByString('', 'abcde')─┠+│ ['a','b','c','d','e'] │ +└────────────────────────────┘ +``` + +## splitByRegexp + +æ­£è¦è¡¨ç¾ã§æŒ‡å®šã—ãŸãƒ‘ターンを区切りã¨ã—ã¦æ–‡å­—列を分割ã—ã¾ã™ã€‚æ­£è¦è¡¨ç¾æ–‡å­—列 `regexp` を区切り文字ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚`regexp` ãŒç©ºã®å ´åˆã€æ–‡å­—列 `s` ã‚’1文字ãšã¤ã®é…列ã«åˆ†å‰²ã—ã¾ã™ã€‚ã“ã®æ­£è¦è¡¨ç¾ã¨ä¸€è‡´ã™ã‚‹éƒ¨åˆ†ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€æ–‡å­—列 `s` ã¯åˆ†å‰²ã•ã‚Œã¾ã›ã‚“。 + +**構文** + +``` sql +splitByRegexp(regexp, s[, max_substrings])) +``` + +**引数** + +- `regexp` — æ­£è¦è¡¨ç¾ã€‚定数。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 +- `s` — 分割ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md)。 +- `max_substrings` — ä»»æ„ã® `Int64`。デフォルトã¯0ã§ã™ã€‚`max_substrings` > 0 ã®å ´åˆã€è¿”ã•ã‚Œã‚‹ã‚µãƒ–文字列ã¯æœ€å¤§ã§ `max_substrings` ã«ãªã‚Šã¾ã™ã€‚ãれ以外ã¯ã€å¯èƒ½ãªé™ã‚Šå¤šãã®ã‚µãƒ–文字列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é¸æŠžã•ã‚ŒãŸã‚µãƒ–文字列ã®é…列。[Array](../data-types/array.md)([String](../data-types/string.md))。 + +空ã®ã‚µãƒ–文字列ãŒé¸æŠžã•ã‚Œã‚‹çŠ¶æ³: + +- éžç©ºã®æ­£è¦è¡¨ç¾ã®ä¸€è‡´ãŒæ–‡å­—列ã®å…ˆé ­ã¾ãŸã¯æœ«å°¾ã«ã‚ã‚‹å ´åˆ; +- éžç©ºã®æ­£è¦è¡¨ç¾ã®ä¸€è‡´ãŒé€£ç¶šã—ã¦ã„ã‚‹å ´åˆ; +- å…ƒã®æ–‡å­—列 `s` ãŒç©ºã§æ­£è¦è¡¨ç¾ãŒç©ºã§ã¯ãªã„å ´åˆã€‚ + +:::note +[splitby_max_substrings_includes_remaining_string](../../operations/settings/settings.md#splitby_max_substrings_includes_remaining_string) を設定ã™ã‚‹ã¨ã€`max_substrings` > 0 ã®å ´åˆã«æ®‹ã‚Šã®æ–‡å­—列ãŒçµæžœé…列ã®æœ€å¾Œã®è¦ç´ ã«å«ã¾ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: 0)。 +::: + +**例** + +``` sql +SELECT splitByRegexp('\\d+', 'a12bc23de345f'); +``` + +çµæžœ: + +``` text +┌─splitByRegexp('\\d+', 'a12bc23de345f')─┠+│ ['a','bc','de','f'] │ +└────────────────────────────────────────┘ +``` + +``` sql +SELECT splitByRegexp('', 'abcde'); +``` + +çµæžœ: + +``` text +┌─splitByRegexp('', 'abcde')─┠+│ ['a','b','c','d','e'] │ +└────────────────────────────┘ +``` + +## splitByWhitespace + +空白文字ã§æ–‡å­—列を分割ã—ã¾ã™ã€‚é¸æŠžã•ã‚ŒãŸã‚µãƒ–文字列ã®é…列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +splitByWhitespace(s[, max_substrings])) +``` + +**引数** + +- `s` — 分割ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md)。 +- `max_substrings` — ä»»æ„ã® `Int64`。デフォルトã¯0ã§ã™ã€‚`max_substrings` > 0 ã®å ´åˆã€è¿”ã•ã‚Œã‚‹ã‚µãƒ–文字列ã¯æœ€å¤§ã§ `max_substrings` ã«ãªã‚Šã¾ã™ã€‚ãれ以外ã¯ã€å¯èƒ½ãªé™ã‚Šå¤šãã®ã‚µãƒ–文字列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é¸æŠžã•ã‚ŒãŸã‚µãƒ–文字列ã®é…列。[Array](../data-types/array.md)([String](../data-types/string.md))。 + +:::note +[splitby_max_substrings_includes_remaining_string](../../operations/settings/settings.md#splitby_max_substrings_includes_remaining_string) を設定ã™ã‚‹ã¨ã€`max_substrings` > 0 ã®å ´åˆã«æ®‹ã‚Šã®æ–‡å­—列ãŒçµæžœé…列ã®æœ€å¾Œã®è¦ç´ ã«å«ã¾ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: 0)。 +::: + +**例** + +``` sql +SELECT splitByWhitespace(' 1! a, b. '); +``` + +çµæžœ: + +``` text +┌─splitByWhitespace(' 1! a, b. ')─┠+│ ['1!','a,','b.'] │ +└─────────────────────────────────────┘ +``` + +## splitByNonAlpha + +空白ã¾ãŸã¯å¥èª­ç‚¹ã§æ–‡å­—列を分割ã—ã¾ã™ã€‚é¸æŠžã•ã‚ŒãŸã‚µãƒ–文字列ã®é…列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +splitByNonAlpha(s[, max_substrings])) +``` + +**引数** + +- `s` — 分割ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md)。 +- `max_substrings` — ä»»æ„ã® `Int64`。デフォルトã¯0ã§ã™ã€‚`max_substrings` > 0 ã®å ´åˆã€è¿”ã•ã‚Œã‚‹ã‚µãƒ–文字列ã¯æœ€å¤§ã§ `max_substrings` ã«ãªã‚Šã¾ã™ã€‚ãれ以外ã¯ã€å¯èƒ½ãªé™ã‚Šå¤šãã®ã‚µãƒ–文字列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é¸æŠžã•ã‚ŒãŸã‚µãƒ–文字列ã®é…列。[Array](../data-types/array.md)([String](../data-types/string.md))。 + +:::note +[splitby_max_substrings_includes_remaining_string](../../operations/settings/settings.md#splitby_max_substrings_includes_remaining_string) を設定ã™ã‚‹ã¨ã€`max_substrings` > 0 ã®å ´åˆã«æ®‹ã‚Šã®æ–‡å­—列ãŒçµæžœé…列ã®æœ€å¾Œã®è¦ç´ ã«å«ã¾ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: 0)。 +::: + +**例** + +``` sql +SELECT splitByNonAlpha(' 1! a, b. '); +``` + +çµæžœ: + +``` text +┌─splitByNonAlpha(' 1! a, b. ')─┠+│ ['1','a','b'] │ +└───────────────────────────────────┘ +``` + +## arrayStringConcat + +é…列内ã®å€¤ã‚’区切り文字ã§çµåˆã—ã¦æ–‡å­—列を返ã—ã¾ã™ã€‚`separator` ã¯ã‚ªãƒ—ションã®ãƒ‘ラメータã§ã‚ã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ç©ºæ–‡å­—列ã¨ã—ã¦è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +arrayStringConcat(arr\[, separator\]) +``` + +**例** + +``` sql +SELECT arrayStringConcat(['12/05/2021', '12:50:00'], ' ') AS DateString; +``` + +çµæžœ: + +```text +┌─DateString──────────┠+│ 12/05/2021 12:50:00 │ +└─────────────────────┘ +``` + +## alphaTokens + +a-z ãŠã‚ˆã³ A-Z ã®ç¯„囲ã®é€£ç¶šã—ãŸãƒã‚¤ãƒˆåˆ—ã®ã‚µãƒ–文字列をé¸æŠžã—ã¾ã™ã€‚サブ文字列ã®é…列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +alphaTokens(s[, max_substrings])) +``` + +エイリアス: `splitByAlpha` + +**引数** + +- `s` — 分割ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md)。 +- `max_substrings` — ä»»æ„ã® `Int64`。デフォルトã¯0ã§ã™ã€‚`max_substrings` > 0 ã®å ´åˆã€è¿”ã•ã‚Œã‚‹ã‚µãƒ–文字列ã¯æœ€å¤§ã§ `max_substrings` ã«ãªã‚Šã¾ã™ã€‚ãれ以外ã¯ã€å¯èƒ½ãªé™ã‚Šå¤šãã®ã‚µãƒ–文字列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é¸æŠžã•ã‚ŒãŸã‚µãƒ–文字列ã®é…列。[Array](../data-types/array.md)([String](../data-types/string.md))。 + +:::note +[splitby_max_substrings_includes_remaining_string](../../operations/settings/settings.md#splitby_max_substrings_includes_remaining_string) を設定ã™ã‚‹ã¨ã€`max_substrings` > 0 ã®å ´åˆã«æ®‹ã‚Šã®æ–‡å­—列ãŒçµæžœé…列ã®æœ€å¾Œã®è¦ç´ ã«å«ã¾ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ: 0)。 +::: + +**例** + +``` sql +SELECT alphaTokens('abca1abc'); +``` + +çµæžœ: + +``` text +┌─alphaTokens('abca1abc')─┠+│ ['abca','abc'] │ +└─────────────────────────┘ +``` + +## extractAllGroups + +æ­£è¦è¡¨ç¾ã§ä¸€è‡´ã™ã‚‹éžé‡è¤‡ã‚µãƒ–文字列ã‹ã‚‰ã™ã¹ã¦ã®ã‚°ãƒ«ãƒ¼ãƒ—を抽出ã—ã¾ã™ã€‚ + +**構文** + +``` sql +extractAllGroups(text, regexp) +``` + +**引数** + +- `text` — [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 +- `regexp` — æ­£è¦è¡¨ç¾ã€‚定数。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å°‘ãªãã¨ã‚‚1ã¤ã®ä¸€è‡´ã™ã‚‹ã‚°ãƒ«ãƒ¼ãƒ—ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã€`Array(Array(String))` をグループID(1ã‹ã‚‰Nã€`regexp`内ã®ã‚­ãƒ£ãƒ—ãƒãƒ£ã‚°ãƒ«ãƒ¼ãƒ—ã®æ•°N)ã§ã‚¯ãƒ©ã‚¹ã‚¿ãƒªãƒ³ã‚°ã—ã¦è¿”ã—ã¾ã™ã€‚一致ã™ã‚‹ã‚°ãƒ«ãƒ¼ãƒ—ãŒãªã„å ´åˆã€ç©ºã®é…列を返ã—ã¾ã™ã€‚[Array](../data-types/array.md) 。 + +**例** + +``` sql +SELECT extractAllGroups('abc=123, 8="hkl"', '("[^"]+"|\\w+)=("[^"]+"|\\w+)'); +``` + +çµæžœ: + +``` text +┌─extractAllGroups('abc=123, 8="hkl"', '("[^"]+"|\\w+)=("[^"]+"|\\w+)')─┠+│ [['abc','123'],['8','"hkl"']] │ +└───────────────────────────────────────────────────────────────────────┘ +``` + +## ngrams + +UTF-8文字列を `ngramsize` 記å·ã®n-gramã«åˆ†å‰²ã—ã¾ã™ã€‚ + +**構文** + +``` sql +ngrams(string, ngramsize) +``` + +**引数** + +- `string` — 文字列。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 +- `ngramsize` — n-gramã®ã‚µã‚¤ã‚ºã€‚[UInt](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- n-gramã®é…列。[Array](../data-types/array.md)([String](../data-types/string.md))。 + +**例** + +``` sql +SELECT ngrams('ClickHouse', 3); +``` + +çµæžœ: + +``` text +┌─ngrams('ClickHouse', 3)───────────────────────────┠+│ ['Cli','lic','ick','ckH','kHo','Hou','ous','use'] │ +└───────────────────────────────────────────────────┘ +``` + +## tokens + +ASCIIã®éžè‹±æ•°å­—文字をセパレータã¨ã—ã¦ä½¿ç”¨ã—ã¦æ–‡å­—列をトークンã«åˆ†å‰²ã—ã¾ã™ã€‚ + +**引数** + +- `input_string` — [String](../data-types/string.md)データ型オブジェクトã§è¡¨ã•ã‚ŒãŸä»»æ„ã®ãƒã‚¤ãƒˆã‚»ãƒƒãƒˆã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力文字列ã‹ã‚‰ã®ãƒˆãƒ¼ã‚¯ãƒ³é…列。[Array](../data-types/array.md)。 + +**例** + +``` sql +SELECT tokens('test1,;\\ test2,;\\ test3,;\\ test4') AS tokens; +``` + +çµæžœ: + +``` text +┌─tokens────────────────────────────┠+│ ['test1','test2','test3','test4'] │ +└───────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/string-functions.md b/docs/ja/sql-reference/functions/string-functions.md new file mode 100644 index 00000000000..4f76715de43 --- /dev/null +++ b/docs/ja/sql-reference/functions/string-functions.md @@ -0,0 +1,2527 @@ +--- +slug: /ja/sql-reference/functions/string-functions +sidebar_position: 170 +sidebar_label: Strings +--- + +import VersionBadge from '@theme/badges/VersionBadge'; + +# 文字列をæ“作ã™ã‚‹ãŸã‚ã®é–¢æ•° + +文字列ã®[検索](string-search-functions.md)ã‚„[ç½®æ›](string-replace-functions.md)ã®é–¢æ•°ã¯åˆ¥é€”説明ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## empty + +入力文字列ãŒç©ºã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚文字列ã¯ã€ãŸã¨ãˆã“ã®ãƒã‚¤ãƒˆãŒã‚¹ãƒšãƒ¼ã‚¹ã‚„ヌルãƒã‚¤ãƒˆã§ã‚ã£ã¦ã‚‚ã€å°‘ãªãã¨ã‚‚1ãƒã‚¤ãƒˆå«ã‚“ã§ã„ã‚‹å ´åˆã¯ç©ºã§ã¯ãªã„ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯[é…列](array-functions.md#function-empty)ã‚„[UUIDs](uuid-functions.md#empty)ã§ã‚‚使用ã§ãã¾ã™ã€‚ + +**構文** + +``` sql +empty(x) +``` + +**引数** + +- `x` — 入力値。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 空文字列ã®å ´åˆã¯ `1`ã€ç©ºã§ãªã„文字列ã®å ´åˆã¯ `0` ã‚’è¿”ã—ã¾ã™ã€‚[UInt8](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT empty(''); +``` + +çµæžœï¼š + +```result +┌─empty('')─┠+│ 1 │ +└───────────┘ +``` + +## notEmpty + +入力文字列ãŒç©ºã§ãªã„ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚文字列ã¯ã€ãŸã¨ãˆã“ã®ãƒã‚¤ãƒˆãŒã‚¹ãƒšãƒ¼ã‚¹ã‚„ヌルãƒã‚¤ãƒˆã§ã‚ã£ã¦ã‚‚ã€å°‘ãªãã¨ã‚‚1ãƒã‚¤ãƒˆå«ã‚“ã§ã„ã‚‹å ´åˆã¯ç©ºã§ã¯ãªã„ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯[é…列](array-functions.md#function-notempty)ã‚„[UUIDs](uuid-functions.md#notempty)ã§ã‚‚使用ã§ãã¾ã™ã€‚ + +**構文** + +``` sql +notEmpty(x) +``` + +**引数** + +- `x` — 入力値。[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 空ã§ãªã„文字列ã®å ´åˆã¯ `1`ã€ç©ºæ–‡å­—列ã®å ´åˆã¯ `0` ã‚’è¿”ã—ã¾ã™ã€‚[UInt8](../data-types/int-uint.md)。 + +**例** + +```sql +SELECT notEmpty('text'); +``` + +çµæžœï¼š + +```result +┌─notEmpty('text')─┠+│ 1 │ +└──────────────────┘ +``` + +## length + +文字列ã®é•·ã•ã‚’文字やUnicodeコードãƒã‚¤ãƒ³ãƒˆã§ã¯ãªããƒã‚¤ãƒˆã§è¿”ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯é…列ã«ã‚‚使用ã§ãã¾ã™ã€‚ + +別å: `OCTET_LENGTH` + +**構文** + +```sql +length(s) +``` + +**パラメータ** + +- `s` — 入力文字列ã¾ãŸã¯é…列。[String](../data-types/string)/[Array](../data-types/array). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 文字列ã¾ãŸã¯é…列 `s` ã®é•·ã•ã‚’ãƒã‚¤ãƒˆã§è¿”ã—ã¾ã™ã€‚[UInt64](../data-types/int-uint). + +**例** + +クエリ: + +```sql +SELECT length('Hello, world!'); +``` + +çµæžœ: + +```response +┌─length('Hello, world!')─┠+│ 13 │ +└─────────────────────────┘ +``` + +クエリ: + +```sql +SELECT length([1, 2, 3, 4]); +``` + +çµæžœ: + +```response +┌─length([1, 2, 3, 4])─┠+│ 4 │ +└──────────────────────┘ +``` + +## lengthUTF8 + +文字列ã®é•·ã•ã‚’Unicodeコードãƒã‚¤ãƒ³ãƒˆã§è¿”ã—ã¾ã™ã€‚UTF-8エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã§ã‚ã‚‹ã“ã¨ã‚’å‰æã«ã—ã¦ã„ã¾ã™ã€‚ã“ã®å‰æãŒèª¤ã£ã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +別å: +- `CHAR_LENGTH` +- `CHARACTER_LENGTH` + +**構文** + +```sql +lengthUTF8(s) +``` + +**パラメータ** + +- `s` — 有効ãªUTF-8エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€æ–‡å­—列。[String](../data-types/string). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 文字列 `s` ã®é•·ã•ã‚’Unicodeコードãƒã‚¤ãƒ³ãƒˆã§è¿”ã—ã¾ã™ã€‚[UInt64](../data-types/int-uint.md). + +**例** + +クエリ: + +```sql +SELECT lengthUTF8('ЗдравÑтвуй, мир!'); +``` + +çµæžœ: + +```response +┌─lengthUTF8('ЗдравÑтвуй, мир!')─┠+│ 16 │ +└────────────────────────────────┘ +``` + +## left + +å·¦ã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸ `offset` ã®ä½ç½®ã‹ã‚‰å§‹ã¾ã‚‹æ–‡å­—列 `s` ã®éƒ¨åˆ†æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +left(s, offset) +``` + +**パラメータ** + +- `s` — 部分文字列を計算ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md). +- `offset` — オフセットã®ãƒã‚¤ãƒˆæ•°ã€‚[UInt*](../data-types/int-uint). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 正㮠`offset` ã®å ´åˆï¼šæ–‡å­—列ã®å·¦ã‹ã‚‰å§‹ã¾ã‚‹ã€`offset` ãƒã‚¤ãƒˆæ•°ã®éƒ¨åˆ†æ–‡å­—列。 +- è² ã® `offset` ã®å ´åˆï¼šæ–‡å­—列ã®å·¦ã‹ã‚‰å§‹ã¾ã‚‹ã€`length(s) - |offset|` ãƒã‚¤ãƒˆæ•°ã®éƒ¨åˆ†æ–‡å­—列。 +- `length` ãŒ0ã®å ´åˆã¯ç©ºæ–‡å­—列。 + +**例** + +クエリ: + +```sql +SELECT left('Hello', 3); +``` + +çµæžœ: + +```response +Hel +``` + +クエリ: + +```sql +SELECT left('Hello', -3); +``` + +çµæžœ: + +```response +He +``` + +## leftUTF8 + +å·¦ã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸ `offset` ã®ä½ç½®ã‹ã‚‰å§‹ã¾ã‚‹UTF-8エンコードã•ã‚ŒãŸæ–‡å­—列 `s` ã®éƒ¨åˆ†æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +leftUTF8(s, offset) +``` + +**パラメータ** + +- `s` — 部分文字列を計算ã™ã‚‹UTF-8エンコードã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md). +- `offset` — オフセットã®ãƒã‚¤ãƒˆæ•°ã€‚[UInt*](../data-types/int-uint). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 正㮠`offset` ã®å ´åˆï¼šæ–‡å­—列ã®å·¦ã‹ã‚‰å§‹ã¾ã‚‹ã€`offset` ãƒã‚¤ãƒˆæ•°ã®éƒ¨åˆ†æ–‡å­—列。 +- è² ã® `offset` ã®å ´åˆï¼šæ–‡å­—列ã®å·¦ã‹ã‚‰å§‹ã¾ã‚‹ã€`length(s) - |offset|` ãƒã‚¤ãƒˆæ•°ã®éƒ¨åˆ†æ–‡å­—列。 +- `length` ãŒ0ã®å ´åˆã¯ç©ºæ–‡å­—列。 + +**例** + +クエリ: + +```sql +SELECT leftUTF8('Привет', 4); +``` + +çµæžœ: + +```response +Прив +``` + +クエリ: + +```sql +SELECT leftUTF8('Привет', -4); +``` + +çµæžœ: + +```response +Пр +``` + +## leftPad + +文字列を左ã‹ã‚‰ã‚¹ãƒšãƒ¼ã‚¹ã¾ãŸã¯æŒ‡å®šã•ã‚ŒãŸæ–‡å­—列(必è¦ã§ã‚ã‚Œã°è¤‡æ•°å›žï¼‰ã§ã€çµæžœã®æ–‡å­—列ãŒæŒ‡å®šã•ã‚ŒãŸ `length` ã«é”ã™ã‚‹ã¾ã§åŸ‹ã‚ã¾ã™ã€‚ + +**構文** + +``` sql +leftPad(string, length[, pad_string]) +``` + +別å: `LPAD` + +**引数** + +- `string` — 埋ã‚ã‚‹ã¹ã入力文字列。[String](../data-types/string.md). +- `length` — çµæžœã®æ–‡å­—列ã®é•·ã•ã€‚[UInt ã¾ãŸã¯ Int](../data-types/int-uint.md)。入力文字列ã®é•·ã•ã‚ˆã‚Šã‚‚å°ã•ã„å ´åˆã€å…¥åŠ›æ–‡å­—列㯠`length` 文字ã«çŸ­ç¸®ã•ã‚Œã¾ã™ã€‚ +- `pad_string` — 入力文字列を埋ã‚ã‚‹ãŸã‚ã®æ–‡å­—列。[String](../data-types/string.md). オプション。指定ã—ãªã„å ´åˆã€å…¥åŠ›æ–‡å­—列ã¯ã‚¹ãƒšãƒ¼ã‚¹ã§åŸ‹ã‚られã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸé•·ã•ã®å·¦å¯„ã›ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT leftPad('abc', 7, '*'), leftPad('def', 7); +``` + +çµæžœ: + +```result +┌─leftPad('abc', 7, '*')─┬─leftPad('def', 7)─┠+│ ****abc │ def │ +└────────────────────────┴───────────────────┘ +``` + +## leftPadUTF8 + +UTF-8文字列を左ã‹ã‚‰ã‚¹ãƒšãƒ¼ã‚¹ã¾ãŸã¯æŒ‡å®šã—ãŸæ–‡å­—列ã§åŸ‹ã‚ã¾ã™ï¼ˆå¿…è¦ã§ã‚ã‚Œã°è¤‡æ•°å›žï¼‰ã€çµæžœã®æ–‡å­—列ãŒæŒ‡å®šã—ãŸé•·ã•ã«é”ã™ã‚‹ã¾ã§ã€‚文字列ã®é•·ã•ã¯ãƒã‚¤ãƒˆã§ã¯ãªãコードãƒã‚¤ãƒ³ãƒˆã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +leftPadUTF8(string, length[, pad_string]) +``` + +**引数** + +- `string` — 埋ã‚ã‚‹ã¹ã入力文字列。[String](../data-types/string.md). +- `length` — çµæžœã®æ–‡å­—列ã®é•·ã•ã€‚[UInt ã¾ãŸã¯ Int](../data-types/int-uint.md)。入力文字列ã®é•·ã•ã‚ˆã‚Šã‚‚å°ã•ã„å ´åˆã€å…¥åŠ›æ–‡å­—列㯠`length` 文字ã«çŸ­ç¸®ã•ã‚Œã¾ã™ã€‚ +- `pad_string` — 入力文字列を埋ã‚ã‚‹ãŸã‚ã®æ–‡å­—列。[String](../data-types/string.md). オプション。指定ã—ãªã„å ´åˆã€å…¥åŠ›æ–‡å­—列ã¯ã‚¹ãƒšãƒ¼ã‚¹ã§åŸ‹ã‚られã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸé•·ã•ã®å·¦å¯„ã›ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT leftPadUTF8('абвг', 7, '*'), leftPadUTF8('дежз', 7); +``` + +çµæžœ: + +```result +┌─leftPadUTF8('абвг', 7, '*')─┬─leftPadUTF8('дежз', 7)─┠+│ ***абвг │ дежз │ +└─────────────────────────────┴────────────────────────┘ +``` + +## right + +å³ã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸ `offset` ã®ä½ç½®ã‹ã‚‰å§‹ã¾ã‚‹æ–‡å­—列 `s` ã®éƒ¨åˆ†æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +right(s, offset) +``` + +**パラメータ** + +- `s` — 部分文字列を計算ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md). +- `offset` — オフセットã®ãƒã‚¤ãƒˆæ•°ã€‚[UInt*](../data-types/int-uint). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 正㮠`offset` ã®å ´åˆï¼šæ–‡å­—列ã®å³ã‹ã‚‰å§‹ã¾ã‚‹ã€`offset` ãƒã‚¤ãƒˆæ•°ã®éƒ¨åˆ†æ–‡å­—列。 +- è² ã® `offset` ã®å ´åˆï¼šæ–‡å­—列ã®å³ã‹ã‚‰å§‹ã¾ã‚‹ã€`length(s) - |offset|` ãƒã‚¤ãƒˆæ•°ã®éƒ¨åˆ†æ–‡å­—列。 +- `length` ãŒ0ã®å ´åˆã¯ç©ºæ–‡å­—列。 + +**例** + +クエリ: + +```sql +SELECT right('Hello', 3); +``` + +çµæžœ: + +```response +llo +``` + +クエリ: + +```sql +SELECT right('Hello', -3); +``` + +çµæžœ: + +```response +lo +``` + +## rightUTF8 + +å³ã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸ `offset` ã®ä½ç½®ã‹ã‚‰å§‹ã¾ã‚‹UTF-8エンコードã•ã‚ŒãŸæ–‡å­—列 `s` ã®éƒ¨åˆ†æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +rightUTF8(s, offset) +``` + +**パラメータ** + +- `s` — 部分文字列を計算ã™ã‚‹UTF-8エンコードã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md). +- `offset` — オフセットã®ãƒã‚¤ãƒˆæ•°ã€‚[UInt*](../data-types/int-uint). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 正㮠`offset` ã®å ´åˆï¼šæ–‡å­—列ã®å³ã‹ã‚‰å§‹ã¾ã‚‹ã€`offset` ãƒã‚¤ãƒˆæ•°ã®éƒ¨åˆ†æ–‡å­—列。 +- è² ã® `offset` ã®å ´åˆï¼šæ–‡å­—列ã®å³ã‹ã‚‰å§‹ã¾ã‚‹ã€`length(s) - |offset|` ãƒã‚¤ãƒˆæ•°ã®éƒ¨åˆ†æ–‡å­—列。 +- `length` ãŒ0ã®å ´åˆã¯ç©ºæ–‡å­—列。 + +**例** + +クエリ: + +```sql +SELECT rightUTF8('Привет', 4); +``` + +çµæžœ: + +```response +ивет +``` + +クエリ: + +```sql +SELECT rightUTF8('Привет', -4); +``` + +çµæžœ: + +```response +ет +``` + +## rightPad + +文字列をå³ã‹ã‚‰ã‚¹ãƒšãƒ¼ã‚¹ã¾ãŸã¯æŒ‡å®šã•ã‚ŒãŸæ–‡å­—列(必è¦ã§ã‚ã‚Œã°è¤‡æ•°å›žï¼‰ã§ã€çµæžœã®æ–‡å­—列ãŒæŒ‡å®šã•ã‚ŒãŸ `length` ã«é”ã™ã‚‹ã¾ã§åŸ‹ã‚ã¾ã™ã€‚ + +**構文** + +``` sql +rightPad(string, length[, pad_string]) +``` + +別å: `RPAD` + +**引数** + +- `string` — 埋ã‚ã‚‹ã¹ã入力文字列。[String](../data-types/string.md). +- `length` — çµæžœã®æ–‡å­—列ã®é•·ã•ã€‚[UInt ã¾ãŸã¯ Int](../data-types/int-uint.md)。入力文字列ã®é•·ã•ã‚ˆã‚Šã‚‚å°ã•ã„å ´åˆã€å…¥åŠ›æ–‡å­—列㯠`length` 文字ã«çŸ­ç¸®ã•ã‚Œã¾ã™ã€‚ +- `pad_string` — 入力文字列を埋ã‚ã‚‹ãŸã‚ã®æ–‡å­—列。[String](../data-types/string.md). オプション。指定ã—ãªã„å ´åˆã€å…¥åŠ›æ–‡å­—列ã¯ã‚¹ãƒšãƒ¼ã‚¹ã§åŸ‹ã‚られã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸé•·ã•ã®å³å¯„ã›ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT rightPad('abc', 7, '*'), rightPad('abc', 7); +``` + +çµæžœ: + +```result +┌─rightPad('abc', 7, '*')─┬─rightPad('abc', 7)─┠+│ abc**** │ abc │ +└─────────────────────────┴────────────────────┘ +``` + +## rightPadUTF8 + +UTF-8文字列をå³ã‹ã‚‰ã‚¹ãƒšãƒ¼ã‚¹ã¾ãŸã¯æŒ‡å®šã—ãŸæ–‡å­—列ã§åŸ‹ã‚ã¾ã™ï¼ˆå¿…è¦ã§ã‚ã‚Œã°è¤‡æ•°å›žï¼‰ã€çµæžœã®æ–‡å­—列ãŒæŒ‡å®šã—ãŸé•·ã•ã«é”ã™ã‚‹ã¾ã§ã€‚文字列ã®é•·ã•ã¯ãƒã‚¤ãƒˆã§ã¯ãªãコードãƒã‚¤ãƒ³ãƒˆã§æ¸¬å®šã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +rightPadUTF8(string, length[, pad_string]) +``` + +**引数** + +- `string` — 埋ã‚ã‚‹ã¹ã入力文字列。[String](../data-types/string.md). +- `length` — çµæžœã®æ–‡å­—列ã®é•·ã•ã€‚[UInt ã¾ãŸã¯ Int](../data-types/int-uint.md)。入力文字列ã®é•·ã•ã‚ˆã‚Šã‚‚å°ã•ã„å ´åˆã€å…¥åŠ›æ–‡å­—列㯠`length` 文字ã«çŸ­ç¸®ã•ã‚Œã¾ã™ã€‚ +- `pad_string` — 入力文字列を埋ã‚ã‚‹ãŸã‚ã®æ–‡å­—列。[String](../data-types/string.md). オプション。指定ã—ãªã„å ´åˆã€å…¥åŠ›æ–‡å­—列ã¯ã‚¹ãƒšãƒ¼ã‚¹ã§åŸ‹ã‚られã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚Œé•·ã•ã®çµµæ–‡å­—列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT rightPadUTF8('абвг', 7, '*'), rightPadUTF8('абвг', 7); +``` + +çµæžœ: + +```result +┌─rightPadUTF8('абвг', 7, '*')─┬─rightPadUTF8('абвг', 7)─┠+│ абвг*** │ абвг │ +└──────────────────────────────┴─────────────────────────┘ +``` + +## lower + +文字列内ã®ASCIIラテンシンボルをå°æ–‡å­—ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +lower(input) +``` + +別å: `lcase` + +**パラメータ** + +- `input`: 文字列ã®ã‚¿ã‚¤ãƒ— [String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [String](../data-types/string.md) データタイプã®å€¤ã€‚ + +**例** + +クエリ: + +```sql +SELECT lower('CLICKHOUSE'); +``` + +```response +┌─lower('CLICKHOUSE')─┠+│ clickhouse │ +└─────────────────────┘ +``` + +## upper + +文字列内ã®ASCIIラテンシンボルを大文字ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +upper(input) +``` + +別å: `ucase` + +**パラメータ** + +- `input` — 文字列ã®ã‚¿ã‚¤ãƒ— [String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [String](../data-types/string.md) データタイプã®å€¤ã€‚ + +**例** + +クエリ: + +``` sql +SELECT upper('clickhouse'); +``` + +``` response +┌─upper('clickhouse')─┠+│ CLICKHOUSE │ +└─────────────────────┘ +``` + +## lowerUTF8 + +文字列をå°æ–‡å­—ã«å¤‰æ›ã—ã¾ã™ã€‚文字列ãŒæœ‰åŠ¹ãªUTF-8エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ã“ã®ä»®å®šãŒèª¤ã£ã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +:::note +言語を検出ã—ã¾ã›ã‚“。ãŸã¨ãˆã°ã€ãƒˆãƒ«ã‚³èªžã®å ´åˆã€çµæžœã¯å®Œå…¨ã«æ­£ç¢ºã§ã¯ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ (i/Ä° vs. i/I)。ã‚るコードãƒã‚¤ãƒ³ãƒˆã®UTF-8ãƒã‚¤ãƒˆã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®é•·ã•ãŒå¤§æ–‡å­—ã¨å°æ–‡å­—ã§ç•°ãªã‚‹å ´åˆï¼ˆä¾‹ï¼š `ẞ` 㨠`ß`)ã€ã“ã®ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆã«å¯¾ã™ã‚‹çµæžœã¯æ­£ã—ããªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**構文** + +```sql +lowerUTF8(input) +``` + +**パラメータ** + +- `input` — 文字列ã®ã‚¿ã‚¤ãƒ— [String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [String](../data-types/string.md) データタイプã®å€¤ã€‚ + +**例** + +クエリ: + +``` sql +SELECT lowerUTF8('MÃœNCHEN') as Lowerutf8; +``` + +çµæžœ: + +``` response +┌─Lowerutf8─┠+│ münchen │ +└───────────┘ +``` + +## upperUTF8 + +文字列を大文字ã«å¤‰æ›ã—ã¾ã™ã€‚文字列ãŒæœ‰åŠ¹ãªUTF-8エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ã“ã®ä»®å®šãŒèª¤ã£ã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +:::note +言語を検出ã—ã¾ã›ã‚“。ãŸã¨ãˆã°ã€ãƒˆãƒ«ã‚³èªžã®å ´åˆã€çµæžœã¯å®Œå…¨ã«æ­£ç¢ºã§ã¯ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ (i/Ä° vs. i/I)。ã‚るコードãƒã‚¤ãƒ³ãƒˆã®UTF-8ãƒã‚¤ãƒˆã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®é•·ã•ãŒå¤§æ–‡å­—ã¨å°æ–‡å­—ã§ç•°ãªã‚‹å ´åˆï¼ˆä¾‹ï¼š `ẞ` 㨠`ß`)ã€ã“ã®ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆã«å¯¾ã™ã‚‹çµæžœã¯æ­£ã—ããªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**構文** + +```sql +upperUTF8(input) +``` + +**パラメータ** + +- `input` — 文字列ã®ã‚¿ã‚¤ãƒ— [String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [String](../data-types/string.md) データタイプã®å€¤ã€‚ + +**例** + +クエリ: + +``` sql +SELECT upperUTF8('München') as Upperutf8; +``` + +çµæžœ: + +``` response +┌─Upperutf8─┠+│ MÃœNCHEN │ +└───────────┘ +``` + +## isValidUTF8 + +ãƒã‚¤ãƒˆã‚»ãƒƒãƒˆãŒæœ‰åŠ¹ãªUTF-8ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’構æˆã—ã¦ã„ã‚‹å ´åˆã«1ã‚’è¿”ã—ã€ãã†ã§ãªã„å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +isValidUTF8(input) +``` + +**パラメータ** + +- `input` — 文字列ã®ã‚¿ã‚¤ãƒ— [String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 有効ãªUTF-8ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’構æˆã—ã¦ã„ã‚‹å ´åˆã¯ `1` ã‚’ã€ãれ以外ã®å ´åˆã¯ `0` ã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT isValidUTF8('\xc3\xb1') AS valid, isValidUTF8('\xc3\x28') AS invalid; +``` + +çµæžœ: + +``` response +┌─valid─┬─invalid─┠+│ 1 │ 0 │ +└───────┴─────────┘ +``` + +## toValidUTF8 + +無効ãªUTF-8文字を `�` (U+FFFD) 文字ã«ç½®ãæ›ãˆã¾ã™ã€‚連続ã™ã‚‹ç„¡åŠ¹ãªæ–‡å­—ã¯ã€1ã¤ã®ç½®æ›æ–‡å­—ã«ã¾ã¨ã‚られã¾ã™ã€‚ + +**構文** + +``` sql +toValidUTF8(input_string) +``` + +**引数** + +- `input_string` — ãƒã‚¤ãƒˆã‚»ãƒƒãƒˆã¨ã—ã¦è¡¨ç¾ã•ã‚ŒãŸ[String](../data-types/string.md)データタイプã®ã‚ªãƒ–ジェクト。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 有効ãªUTF-8文字列。 + +**例** + +``` sql +SELECT toValidUTF8('\x61\xF0\x80\x80\x80b'); +``` + +```result +┌─toValidUTF8('a����b')─┠+│ a�b │ +└───────────────────────┘ +``` + +## repeat + +指定ã•ã‚ŒãŸå›žæ•°ã ã‘文字列を自分自身ã¨é€£çµã—ã¾ã™ã€‚ + +**構文** + +``` sql +repeat(s, n) +``` + +別å: `REPEAT` + +**引数** + +- `s` — ç¹°ã‚Šè¿”ã™æ–‡å­—列。[String](../data-types/string.md)。 +- `n` — 文字列を繰り返ã™å›žæ•°ã€‚[UInt* ã¾ãŸã¯ Int*](../data-types/int-uint.md) 。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +`n` 回繰り返ã•ã‚ŒãŸæ–‡å­—列 `s` ã‚’å«ã‚€æ–‡å­—列。`n` ≤ 0ã®å ´åˆã€é–¢æ•°ã¯ç©ºæ–‡å­—列を返ã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**例** + +``` sql +SELECT repeat('abc', 10); +``` + +çµæžœ: + +```result +┌─repeat('abc', 10)──────────────┠+│ abcabcabcabcabcabcabcabcabcabc │ +└────────────────────────────────┘ +``` + +## space + +スペース(` `)を指定ã•ã‚ŒãŸå›žæ•°ã ã‘自分自身ã¨é€£çµã—ã¾ã™ã€‚ + +**構文** + +``` sql +space(n) +``` + +別å: `SPACE`. + +**引数** + +- `n` — スペースを繰り返ã™å›žæ•°ã€‚[UInt* ã¾ãŸã¯ Int*](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +`n` 回繰り返ã•ã‚ŒãŸæ–‡å­—列 ` ` ã‚’å«ã‚€æ–‡å­—列。`n` ≤ 0ã®å ´åˆã€é–¢æ•°ã¯ç©ºæ–‡å­—列を返ã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT space(3); +``` + +çµæžœ: + +```text +┌─space(3) ────┠+│ │ +└──────────────┘ +``` + +## reverse + +文字列内ã®ãƒã‚¤ãƒˆã®é †åºã‚’å転ã—ã¾ã™ã€‚ + +## reverseUTF8 + +文字列内ã®Unicodeコードãƒã‚¤ãƒ³ãƒˆã®é †åºã‚’å転ã—ã¾ã™ã€‚文字列ãŒæœ‰åŠ¹ãªUTF-8エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ã“ã®ä»®å®šãŒèª¤ã£ã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +## concat + +指定ã•ã‚ŒãŸå¼•æ•°ã‚’連çµã—ã¾ã™ã€‚ + +**構文** + +``` sql +concat(s1, s2, ...) +``` + +**引数** + +ä»»æ„ã®åž‹ã®å€¤ã€‚ + +[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md) ã§ãªã„引数ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‚’使用ã—ã¦æ–‡å­—列ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ãƒ‘フォーマンスを低下ã•ã›ã‚‹ãŸã‚ã€éžString/FixedString引数ã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +引数を連çµã—ã¦ä½œæˆã•ã‚ŒãŸæ–‡å­—列。 + +引数ã®ã„ãšã‚Œã‹ãŒ `NULL` ã®å ´åˆã€é–¢æ•°ã¯ `NULL` ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT concat('Hello, ', 'World!'); +``` + +çµæžœ: + +```result +┌─concat('Hello, ', 'World!')─┠+│ Hello, World! │ +└─────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT concat(42, 144); +``` + +çµæžœ: + +```result +┌─concat(42, 144)─┠+│ 42144 │ +└─────────────────┘ +``` + +## concatAssumeInjective + +[concat](#concat) ã®ã‚ˆã†ã§ã™ãŒã€`concat(s1, s2, ...) → sn` ãŒå˜å°„ã§ã‚ã‚‹ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚GROUP BYã®æœ€é©åŒ–ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ã‚る関数ãŒå˜å°„ã¨å‘¼ã°ã‚Œã‚‹ã®ã¯ã€ãã‚ŒãŒç•°ãªã‚‹å¼•æ•°ã«å¯¾ã—ã¦ç•°ãªã‚‹çµæžœã‚’è¿”ã™å ´åˆã§ã™ã€‚別ã®è¨€ã„方をã™ã‚‹ã¨ï¼šç•°ãªã‚‹å¼•æ•°ãŒåŒä¸€ã®çµæžœã‚’決ã—ã¦ç”Ÿæˆã—ãªã„ã“ã¨ã§ã™ã€‚ + +**構文** + +``` sql +concatAssumeInjective(s1, s2, ...) +``` + +**引数** + +Stringã¾ãŸã¯FixedStringåž‹ã®å€¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +引数を連çµã—ã¦ä½œæˆã•ã‚ŒãŸæ–‡å­—列。 + +引数ã®ã„ãšã‚Œã‹ã®å€¤ãŒ `NULL` ã®å ´åˆã€é–¢æ•°ã¯ `NULL` ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +入力テーブル: + +``` sql +CREATE TABLE key_val(`key1` String, `key2` String, `value` UInt32) ENGINE = TinyLog; +INSERT INTO key_val VALUES ('Hello, ','World',1), ('Hello, ','World',2), ('Hello, ','World!',3), ('Hello',', World!',2); +SELECT * from key_val; +``` + +```result +┌─key1────┬─key2─────┬─value─┠+│ Hello, │ World │ 1 │ +│ Hello, │ World │ 2 │ +│ Hello, │ World! │ 3 │ +│ Hello │ , World! │ 2 │ +└─────────┴──────────┴───────┘ +``` + +``` sql +SELECT concat(key1, key2), sum(value) FROM key_val GROUP BY concatAssumeInjective(key1, key2); +``` + +çµæžœ: + +```result +┌─concat(key1, key2)─┬─sum(value)─┠+│ Hello, World! │ 3 │ +│ Hello, World! │ 2 │ +│ Hello, World │ 3 │ +└────────────────────┴────────────┘ +``` + +## concatWithSeparator + +指定ã•ã‚ŒãŸåŒºåˆ‡ã‚Šæ–‡å­—ã§ã€ä¸Žãˆã‚‰ã‚ŒãŸæ–‡å­—列を連çµã—ã¾ã™ã€‚ + +**構文** + +``` sql +concatWithSeparator(sep, expr1, expr2, expr3...) +``` + +別å: `concat_ws` + +**引数** + +- sep — 区切り文字。定数[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 +- exprN — 連çµã®å¯¾è±¡ã¨ãªã‚‹å¼ã€‚[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md) åž‹ã§ã¯ãªã„引数ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ã‚’使用ã—ã¦æ–‡å­—列ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ãƒ‘フォーマンスを低下ã•ã›ã‚‹ãŸã‚ã€éžString/FixedString引数ã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +引数を連çµã—ã¦ä½œæˆã•ã‚ŒãŸæ–‡å­—列。 + +引数ã®ã„ãšã‚Œã‹ã®å€¤ãŒ `NULL` ã®å ´åˆã€é–¢æ•°ã¯ `NULL` ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +``` sql +SELECT concatWithSeparator('a', '1', '2', '3', '4') +``` + +çµæžœ: + +```result +┌─concatWithSeparator('a', '1', '2', '3', '4')─┠+│ 1a2a3a4 │ +└──────────────────────────────────────────────┘ +``` + +## concatWithSeparatorAssumeInjective + +`concatWithSeparator` ã®ã‚ˆã†ã§ã™ãŒã€`concatWithSeparator(sep, expr1, expr2, expr3...) → result` ãŒå˜å°„ã§ã‚ã‚‹ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚GROUP BYã®æœ€é©åŒ–ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ã‚る関数ãŒå˜å°„ã¨å‘¼ã°ã‚Œã‚‹ã®ã¯ã€ãã‚ŒãŒç•°ãªã‚‹å¼•æ•°ã«å¯¾ã—ã¦ç•°ãªã‚‹çµæžœã‚’è¿”ã™å ´åˆã§ã™ã€‚別ã®è¨€ã„方をã™ã‚‹ã¨ï¼šç•°ãªã‚‹å¼•æ•°ãŒåŒä¸€ã®çµæžœã‚’決ã—ã¦ç”Ÿæˆã—ãªã„ã“ã¨ã§ã™ã€‚ + +## substring + +指定ã•ã‚ŒãŸãƒã‚¤ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `offset` ã‹ã‚‰å§‹ã¾ã‚‹æ–‡å­—列 `s` ã®éƒ¨åˆ†æ–‡å­—列を返ã—ã¾ã™ã€‚ãƒã‚¤ãƒˆã‚«ã‚¦ãƒ³ãƒˆã¯1ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚`offset` ãŒ0ã®å ´åˆã€ç©ºæ–‡å­—列を返ã—ã¾ã™ã€‚`offset` ãŒè² ã®å ´åˆã€æ–‡å­—列ã®å§‹ã‚ã‹ã‚‰ã§ã¯ãªãã€æ–‡å­—列ã®çµ‚ã‚ã‚Šã‹ã‚‰ `pos` 文字ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚オプションã®å¼•æ•° `length` ã¯ã€è¿”ã•ã‚Œã‚‹éƒ¨åˆ†æ–‡å­—列ã®æœ€å¤§ãƒã‚¤ãƒˆæ•°ã‚’指定ã—ã¾ã™ã€‚ + +**構文** + +```sql +substring(s, offset[, length]) +``` + +別å: +- `substr` +- `mid` +- `byteSlice` + +**引数** + +- `s` — 部分文字列を計算ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md), [FixedString](../data-types/fixedstring.md) ã¾ãŸã¯ [Enum](../data-types/enum.md) +- `offset` — 部分文字列㮠`s` 内ã®é–‹å§‹ä½ç½®ã€‚[(U)Int*](../data-types/int-uint.md)。 +- `length` — 部分文字列ã®æœ€å¤§é•·ã€‚[(U)Int*](../data-types/int-uint.md)。オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +`offset` ã®ä½ç½®ã‹ã‚‰å§‹ã¾ã‚‹ `length` ãƒã‚¤ãƒˆã®éƒ¨åˆ†æ–‡å­—列。 [String](../data-types/string.md)。 + +**例** + +``` sql +SELECT 'database' AS db, substr(db, 5), substr(db, 5, 1) +``` + +çµæžœ: + +```result +┌─db───────┬─substring('database', 5)─┬─substring('database', 5, 1)─┠+│ database │ base │ b │ +└──────────┴──────────────────────────┴─────────────────────────────┘ +``` + +## substringUTF8 + +指定ã•ã‚ŒãŸãƒã‚¤ãƒˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `offset` ã«åŸºã¥ã„ã¦Unicodeコードãƒã‚¤ãƒ³ãƒˆã®æ–‡å­—列 `s` ã®éƒ¨åˆ†æ–‡å­—列を返ã—ã¾ã™ã€‚ãƒã‚¤ãƒˆã‚«ã‚¦ãƒ³ãƒˆã¯ `1` ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚`offset` ㌠`0` ã®å ´åˆã€ç©ºæ–‡å­—列を返ã—ã¾ã™ã€‚`offset` ãŒè² ã®å ´åˆã€æ–‡å­—列ã®å§‹ã‚ã‹ã‚‰ã§ã¯ãªãã€æ–‡å­—列ã®çµ‚ã‚ã‚Šã‹ã‚‰ `pos` 文字ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚オプションã®å¼•æ•° `length` ã¯ã€è¿”ã•ã‚Œã‚‹éƒ¨åˆ†æ–‡å­—列ã®æœ€å¤§ãƒã‚¤ãƒˆæ•°ã‚’指定ã—ã¾ã™ã€‚ + +文字列ãŒæœ‰åŠ¹ãªUTF-8エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ã“ã®ä»®å®šãŒèª¤ã£ã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +**構文** + +```sql +substringUTF8(s, offset[, length]) +``` + +**引数** + +- `s` — 部分文字列を計算ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md), [FixedString](../data-types/fixedstring.md) ã¾ãŸã¯ [Enum](../data-types/enum.md) +- `offset` — 部分文字列㮠`s` 内ã®é–‹å§‹ä½ç½®ã€‚[(U)Int*](../data-types/int-uint.md)。 +- `length` — 部分文字列ã®æœ€å¤§é•·ã€‚[(U)Int*](../data-types/int-uint.md)。オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +`offset` ã®ä½ç½®ã‹ã‚‰å§‹ã¾ã‚‹ `length` ãƒã‚¤ãƒˆã®éƒ¨åˆ†æ–‡å­—列。 + +**実装ã®è©³ç´°** + +文字列ãŒæœ‰åŠ¹ãªUTF-8エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ã“ã®ä»®å®šãŒèª¤ã£ã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +**例** + +```sql +SELECT 'Täglich grüßt das Murmeltier.' AS str, + substringUTF8(str, 9), + substringUTF8(str, 9, 5) +``` + +```response +Täglich grüßt das Murmeltier. grüßt das Murmeltier. grüßt +``` + +## substringIndex + +Sparkã¾ãŸã¯MySQLã®ã‚ˆã†ã«ã€`delim` ã® `count` 回ã®å‡ºç¾ã®å‰ã® `s` ã®éƒ¨åˆ†æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +substringIndex(s, delim, count) +``` +別å: `SUBSTRING_INDEX` + +**引数** + +- s — 部分文字列を抽出ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md)。 +- delim — 分割ã™ã‚‹æ–‡å­—。[String](../data-types/string.md)。 +- count — 部分文字列を抽出ã™ã‚‹å‰ã«ã‚«ã‚¦ãƒ³ãƒˆã™ã‚‹ãƒ‡ãƒªãƒŸã‚¿ã®å‡ºç¾å›žæ•°ã€‚count ãŒæ­£ã®å ´åˆã€ï¼ˆå·¦ã‹ã‚‰ã‚«ã‚¦ãƒ³ãƒˆã—ã¦ï¼‰æœ€å¾Œã®ãƒ‡ãƒªãƒŸã‚¿ã®å·¦å´ã®ã™ã¹ã¦ãŒè¿”ã•ã‚Œã¾ã™ã€‚count ãŒè² ã®å ´åˆã€ï¼ˆå³ã‹ã‚‰ã‚«ã‚¦ãƒ³ãƒˆã—ã¦ï¼‰æœ€å¾Œã®ãƒ‡ãƒªãƒŸã‚¿ã®å³å´ã®ã™ã¹ã¦ãŒè¿”ã•ã‚Œã¾ã™ã€‚[UInt ã¾ãŸã¯ Int](../data-types/int-uint.md) + +**例** + +``` sql +SELECT substringIndex('www.clickhouse.com', '.', 2) +``` + +çµæžœ: +``` +┌─substringIndex('www.clickhouse.com', '.', 2)─┠+│ www.clickhouse │ +└──────────────────────────────────────────────┘ +``` + +## substringIndexUTF8 + +Unicodeコードãƒã‚¤ãƒ³ãƒˆå°‚用ã«ã€`delim` ã® `count` 回ã®å‡ºç¾ã®å‰ã® `s` ã®éƒ¨åˆ†æ–‡å­—列を返ã—ã¾ã™ã€‚ + +文字列ãŒæœ‰åŠ¹ãªUTF-8エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ã“ã®ä»®å®šãŒèª¤ã£ã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +**構文** + +```sql +substringIndexUTF8(s, delim, count) +``` + +**引数** + +- `s` — 部分文字列を抽出ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md)。 +- `delim` — 分割ã™ã‚‹æ–‡å­—。[String](../data-types/string.md)。 +- `count` — 部分文字列を抽出ã™ã‚‹å‰ã«ã‚«ã‚¦ãƒ³ãƒˆã™ã‚‹ãƒ‡ãƒªãƒŸã‚¿ã®å‡ºç¾å›žæ•°ã€‚count ãŒæ­£ã®å ´åˆã€ï¼ˆå·¦ã‹ã‚‰ã‚«ã‚¦ãƒ³ãƒˆã—ã¦ï¼‰æœ€å¾Œã®ãƒ‡ãƒªãƒŸã‚¿ã®å·¦å´ã®ã™ã¹ã¦ãŒè¿”ã•ã‚Œã¾ã™ã€‚count ãŒè² ã®å ´åˆã€ï¼ˆå³ã‹ã‚‰ã‚«ã‚¦ãƒ³ãƒˆã—ã¦ï¼‰æœ€å¾Œã®ãƒ‡ãƒªãƒŸã‚¿ã®å³å´ã®ã™ã¹ã¦ãŒè¿”ã•ã‚Œã¾ã™ã€‚[UInt ã¾ãŸã¯ Int](../data-types/int-uint.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +`delim` ã® `count` 回ã®å‡ºç¾ã®å‰ã® `s` ã®éƒ¨åˆ†æ–‡å­—列 [String](../data-types/string.md)。 + +**実装ã®è©³ç´°** + +文字列ãŒæœ‰åŠ¹ãªUTF-8エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ã“ã®ä»®å®šãŒèª¤ã£ã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +**例** + +```sql +SELECT substringIndexUTF8('www.straßen-in-europa.de', '.', 2) +``` + +```response +www.straßen-in-europa +``` + +## appendTrailingCharIfAbsent + +文字列 `s` ãŒç©ºã§ãªãã€æ–‡å­— `c` ã§çµ‚ã‚らãªã„å ´åˆã€æ–‡å­— `c` を末尾ã«è¿½åŠ ã—ã¾ã™ã€‚ + +**構文** + +```sql +appendTrailingCharIfAbsent(s, c) +``` + +## convertCharset + +エンコーディング `from` ã‹ã‚‰ `to` ã«å¤‰æ›ã•ã‚ŒãŸæ–‡å­—列 `s` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +convertCharset(s, from, to) +``` + +## base58Encode + +"Bitcoin" アルファベット㧠[Base58](https://datatracker.ietf.org/doc/html/draft-msporny-base58) を使用ã—ã¦æ–‡å­—列をエンコードã—ã¾ã™ã€‚ + +**構文** + +```sql +base58Encode(plaintext) +``` + +**引数** + +- `plaintext` — [String](../data-types/string.md) カラムã¾ãŸã¯å®šæ•°ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã‚’å«ã‚€æ–‡å­—列。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**例** + +``` sql +SELECT base58Encode('Encoded'); +``` + +çµæžœ: + +```result +┌─base58Encode('Encoded')─┠+│ 3dc8KtHrwM │ +└─────────────────────────┘ +``` + +## base58Decode + +"Bitcoin" アルファベットを使用ã—㦠[Base58](https://datatracker.ietf.org/doc/html/draft-msporny-base58) エンコーディングスキームを使用ã—ã¦æ–‡å­—列をデコードã—ã¾ã™ã€‚ + +**構文** + +```sql +base58Decode(encoded) +``` + +**引数** + +- `encoded` — [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。文字列ãŒæœ‰åŠ¹ãªBase58ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã§ãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®ãƒ‡ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã‚’å«ã‚€æ–‡å­—列。[String](../data-types/string.md)。 + +**例** + +``` sql +SELECT base58Decode('3dc8KtHrwM'); +``` + +çµæžœ: + +```result +┌─base58Decode('3dc8KtHrwM')─┠+│ Encoded │ +└────────────────────────────┘ +``` + +## tryBase58Decode + +`base58Decode` ã®ã‚ˆã†ã§ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +tryBase58Decode(encoded) +``` + +**パラメータ** + +- `encoded`: [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。文字列ãŒæœ‰åŠ¹ãªBase58ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼æ™‚ã«ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®ãƒ‡ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã‚’å«ã‚€æ–‡å­—列。 + +**例** + +クエリ: + +```sql +SELECT tryBase58Decode('3dc8KtHrwM') as res, tryBase58Decode('invalid') as res_invalid; +``` + +```response +┌─res─────┬─res_invalid─┠+│ Encoded │ │ +└─────────┴─────────────┘ +``` + +## base64Encode + +[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md) ã‚’[RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648#section-4) ã«å¾“ã£ã¦base64ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ + +別å: `TO_BASE64`. + +**構文** + +```sql +base64Encode(plaintext) +``` + +**引数** + +- `plaintext` — [String](../data-types/string.md) カラムã¾ãŸã¯å®šæ•°ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã‚’å«ã‚€æ–‡å­—列。 + +**例** + +``` sql +SELECT base64Encode('clickhouse'); +``` + +çµæžœ: + +```result +┌─base64Encode('clickhouse')─┠+│ Y2xpY2tob3VzZQ== │ +└────────────────────────────┘ +``` + +## base64URLEncode + +[RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648#section-5)ã«å¾“ã£ã¦ã€URL (String ã¾ãŸã¯ FixedString) ã‚’URL専用ã®å¤‰æ›´ã§base64ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ + +**構文** + +```sql +base64URLEncode(url) +``` + +**引数** + +- `url` — [String](../data-types/string.md) カラムã¾ãŸã¯å®šæ•°ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã‚’å«ã‚€æ–‡å­—列。 + +**例** + +``` sql +SELECT base64URLEncode('https://clickhouse.com'); +``` + +çµæžœ: + +```result +┌─base64URLEncode('https://clickhouse.com')─┠+│ aHR0cDovL2NsaWNraG91c2UuY29t │ +└───────────────────────────────────────────┘ +``` + +## base64Decode + +[RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648#section-4)ã«å¾“ã„ã€Stringã‚’base64ã‹ã‚‰ãƒ‡ã‚³ãƒ¼ãƒ‰ã—ã¾ã™ã€‚エラーã®å ´åˆã¯ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +別å: `FROM_BASE64`. + +**構文** + +```sql +base64Decode(encoded) +``` + +**引数** + +- `encoded` — [String](../data-types/string.md) カラムã¾ãŸã¯å®šæ•°ã€‚文字列ãŒæœ‰åŠ¹ãªBase64ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã§ãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®ãƒ‡ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã‚’å«ã‚€æ–‡å­—列。 + +**例** + +``` sql +SELECT base64Decode('Y2xpY2tob3VzZQ=='); +``` + +çµæžœ: + +```result +┌─base64Decode('Y2xpY2tob3VzZQ==')─┠+│ clickhouse │ +└──────────────────────────────────┘ +``` + +## base64URLDecode + +[RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648#section-5)ã«å¾“ã„ã€URL専用ã®å¤‰æ›´ã‚’ä¼´ã†base64ã‹ã‚‰URLをデコードã—ã¾ã™ã€‚エラーã®å ´åˆã¯ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +base64URLDecode(encodedUrl) +``` + +**引数** + +- `encodedURL` — [String](../data-types/string.md) カラムã¾ãŸã¯å®šæ•°ã€‚文字列ãŒæœ‰åŠ¹ãªBase64ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸã€URL専用ã®å¤‰æ›´ã‚’ä¼´ã†å€¤ã§ãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®ãƒ‡ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã‚’å«ã‚€æ–‡å­—列。 + +**例** + +``` sql +SELECT base64URLDecode('aHR0cDovL2NsaWNraG91c2UuY29t'); +``` + +çµæžœ: + +```result +┌─base64URLDecode('aHR0cDovL2NsaWNraG91c2UuY29t')─┠+│ https://clickhouse.com │ +└─────────────────────────────────────────────────┘ +``` + +## tryBase64Decode + +`base64Decode` ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +tryBase64Decode(encoded) +``` + +**引数** + +- `encoded` — [String](../data-types/string.md) カラムã¾ãŸã¯å®šæ•°ã€‚文字列ãŒæœ‰åŠ¹ãªBase64ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã§ãªã„å ´åˆã€ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®ãƒ‡ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã‚’å«ã‚€æ–‡å­—列。 + +**例** + +クエリ: + +```sql +SELECT tryBase64Decode('RW5jb2RlZA==') as res, tryBase64Decode('invalid') as res_invalid; +``` + +```response +┌─res────────┬─res_invalid─┠+│ clickhouse │ │ +└────────────┴─────────────┘ +``` + +## tryBase64URLDecode + +`base64URLDecode` ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +tryBase64URLDecode(encodedUrl) +``` + +**パラメータ** + +- `encodedURL` — [String](../data-types/string.md) カラムã¾ãŸã¯å®šæ•°ã€‚文字列ãŒæœ‰åŠ¹ãªBase64ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸã€URL専用ã®å¤‰æ›´ã‚’ä¼´ã†å€¤ã§ãªã„å ´åˆã€ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®ãƒ‡ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸå€¤ã‚’å«ã‚€æ–‡å­—列。 + +**例** + +クエリ: + +```sql +SELECT tryBase64URLDecode('aHR0cDovL2NsaWNraG91c2UuY29t') as res, tryBase64Decode('aHR0cHM6Ly9jbGlja') as res_invalid; +``` + +```response +┌─res────────────────────┬─res_invalid─┠+│ https://clickhouse.com │ │ +└────────────────────────┴─────────────┘ +``` + +## endsWith {#endswith} + +文字列 `str` ㌠`suffix` ã§çµ‚ã‚ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +endsWith(str, suffix) +``` + +## endsWithUTF8 + +文字列 `str` ㌠`suffix` ã§çµ‚ã‚ã‚‹ã‹ã‚’è¿”ã—ã¾ã™ã€‚`endsWithUTF8` 㨠`endsWith` ã®é•ã„ã¯ã€`endsWithUTF8` ㌠`str` 㨠`suffix` ã‚’UTF-8文字ã§ä¸€è‡´ã•ã›ã‚‹ã“ã¨ã§ã™ã€‚ + +**構文** + +```sql +endsWithUTF8(str, suffix) +``` + +**例** + +``` sql +SELECT endsWithUTF8('中国', '\xbd'), endsWith('中国', '\xbd') +``` + +çµæžœ: + +```result +┌─endsWithUTF8('中国', '½')─┬─endsWith('中国', '½')─┠+│ 0 │ 1 │ +└──────────────────────────┴──────────────────────┘ +``` + +## startsWith {#startswith} + +文字列 `str` ㌠`prefix` ã§å§‹ã¾ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +startsWith(str, prefix) +``` + +**例** + +``` sql +SELECT startsWith('Spider-Man', 'Spi'); +``` + +## startsWithUTF8 + + + +文字列 `str` ㌠`prefix` ã§å§‹ã¾ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚`startsWithUTF8` 㨠`startsWith` ã®é•ã„ã¯ã€`startsWithUTF8` ㌠`str` 㨠`suffix` ã‚’UTF-8文字ã§ä¸€è‡´ã•ã›ã‚‹ã“ã¨ã§ã™ã€‚ + +**例** + +``` sql +SELECT startsWithUTF8('中国', '\xe4'), startsWith('中国', '\xe4') +``` + +çµæžœ: + +```result +┌─startsWithUTF8('中国', '⥩─┬─startsWith('中国', '⥩─┠+│ 0 │ 1 │ +└────────────────────────────┴────────────────────────┘ +``` + +## trim + +文字列ã®å§‹ã‚ã¾ãŸã¯çµ‚ã‚ã‚Šã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸæ–‡å­—を削除ã—ã¾ã™ã€‚特ã«æŒ‡å®šãŒãªã„é™ã‚Šã€é–¢æ•°ã¯ãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ï¼ˆASCII文字32)を削除ã—ã¾ã™ã€‚ + +**構文** + +``` sql +trim([[LEADING|TRAILING|BOTH] trim_character FROM] input_string) +``` + +**引数** + +- `trim_character` — トリムã™ã‚‹ãŸã‚ã«æŒ‡å®šã•ã‚ŒãŸæ–‡å­—。[String](../data-types/string.md). +- `input_string` — トリムã™ã‚‹æ–‡å­—列。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +先頭ãŠã‚ˆã³/ã¾ãŸã¯æœ«å°¾ã«æŒ‡å®šã•ã‚ŒãŸæ–‡å­—ãŒãªã„文字列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT trim(BOTH ' ()' FROM '( Hello, world! )'); +``` + +çµæžœ: + +```result +┌─trim(BOTH ' ()' FROM '( Hello, world! )')─┠+│ Hello, world! │ +└───────────────────────────────────────────────┘ +``` + +## trimLeft + +文字列ã®å§‹ã‚ã‹ã‚‰é€£ç¶šã™ã‚‹ãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ (ASCII文字32) を削除ã—ã¾ã™ã€‚ + +**構文** + +``` sql +trimLeft(input_string) +``` + +別å: `ltrim(input_string)`. + +**引数** + +- `input_string` — トリムã™ã‚‹æ–‡å­—列。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +先頭ã®ä¸€èˆ¬çš„ãªãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ãŒãªã„文字列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT trimLeft(' Hello, world! '); +``` + +çµæžœ: + +```result +┌─trimLeft(' Hello, world! ')─┠+│ Hello, world! │ +└─────────────────────────────────────┘ +``` + +## trimRight + +文字列ã®çµ‚ã‚ã‚Šã‹ã‚‰é€£ç¶šã™ã‚‹ãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ (ASCII文字32) を削除ã—ã¾ã™ã€‚ + +**構文** + +``` sql +trimRight(input_string) +``` + +別å: `rtrim(input_string)`. + +**引数** + +- `input_string` — トリムã™ã‚‹æ–‡å­—列。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +末尾ã®ä¸€èˆ¬çš„ãªãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ãŒãªã„文字列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT trimRight(' Hello, world! '); +``` + +çµæžœ: + +```result +┌─trimRight(' Hello, world! ')─┠+│ Hello, world! │ +└──────────────────────────────────────┘ +``` + +## trimBoth + +文字列ã®ä¸¡ç«¯ã‹ã‚‰é€£ç¶šã™ã‚‹ãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ (ASCII文字32) を削除ã—ã¾ã™ã€‚ + +**構文** + +``` sql +trimBoth(input_string) +``` + +別å: `trim(input_string)`. + +**引数** + +- `input_string` — トリムã™ã‚‹æ–‡å­—列。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +先頭ãŠã‚ˆã³æœ«å°¾ã®ä¸€èˆ¬çš„ãªãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ãŒãªã„文字列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT trimBoth(' Hello, world! '); +``` + +çµæžœ: + +```result +┌─trimBoth(' Hello, world! ')─┠+│ Hello, world! │ +└─────────────────────────────────────┘ +``` + +## CRC32 + +CRC-32-IEEE 802.3 ã®å¤šé …å¼ã¨åˆæœŸå€¤ `0xffffffff`(zlibã®å®Ÿè£…)を使用ã—ã¦æ–‡å­—列ã®CRC32ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’è¿”ã—ã¾ã™ã€‚ + +çµæžœã®åž‹ã¯ UInt32 ã§ã™ã€‚ + +## CRC32IEEE + +CRC-32-IEEE 802.3 ã®å¤šé …å¼ã‚’使用ã—ã¦æ–‡å­—列ã®CRC32ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’è¿”ã—ã¾ã™ã€‚ + +çµæžœã®åž‹ã¯ UInt32 ã§ã™ã€‚ + +## CRC64 + +CRC-64-ECMA ã®å¤šé …å¼ã‚’使用ã—ã¦æ–‡å­—列ã®CRC64ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’è¿”ã—ã¾ã™ã€‚ + +çµæžœã®åž‹ã¯ UInt64 ã§ã™ã€‚ + +## normalizeQuery + +リテラルã€ãƒªãƒ†ãƒ©ãƒ«ã®é€£ç¶šã€è¤‡é›‘ãªã‚¨ã‚¤ãƒªã‚¢ã‚¹ï¼ˆãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ã‚’å«ã‚€ã‚‚ã®ã€2æ¡ä»¥ä¸Šã¾ãŸã¯36ãƒã‚¤ãƒˆä»¥ä¸Šã®é•·ã•ã®ã‚‚ã®ã§ã‚ã‚‹UUIDãªã©ï¼‰ã‚’プレースホルダー `?` ã«ç½®ãæ›ãˆã¾ã™ã€‚ + +**構文** + +``` sql +normalizeQuery(x) +``` + +**引数** + +- `x` — 文字ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€‚[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- プレースホルダーをæŒã¤æ–‡å­—ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€‚[String](../data-types/string.md). + +**例** + +クエリ: + +``` sql +SELECT normalizeQuery('[1, 2, 3, x]') AS query; +``` + +çµæžœ: + +```result +┌─query────┠+│ [?.., x] │ +└──────────┘ +``` + +## normalizeQueryKeepNames + +リテラルã€ãƒªãƒ†ãƒ©ãƒ«ã®é€£ç¶šã‚’プレースホルダー `?` ã«ç½®ãæ›ãˆã¾ã™ãŒã€è¤‡é›‘ãªã‚¨ã‚¤ãƒªã‚¢ã‚¹ï¼ˆãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ã‚’å«ã‚€ã‚‚ã®ã€2æ¡ä»¥ä¸Šã¾ãŸã¯36ãƒã‚¤ãƒˆä»¥ä¸Šã®ã‚‚ã®ã€ä¾‹ãˆã°UUID)ã¯ç½®ãæ›ãˆã¾ã›ã‚“。ã“ã‚Œã«ã‚ˆã‚Šã€è¤‡é›‘ãªã‚¯ã‚¨ãƒªãƒ­ã‚°ã‚’より良ã分æžã§ãã¾ã™ã€‚ + +**構文** + +``` sql +normalizeQueryKeepNames(x) +``` + +**引数** + +- `x` — 文字ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€‚[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- プレースホルダーをæŒã¤æ–‡å­—ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€‚[String](../data-types/string.md). + +**例** + +クエリ: + +``` sql +SELECT normalizeQuery('SELECT 1 AS aComplexName123'), normalizeQueryKeepNames('SELECT 1 AS aComplexName123'); +``` + +çµæžœ: + +```result +┌─normalizeQuery('SELECT 1 AS aComplexName123')─┬─normalizeQueryKeepNames('SELECT 1 AS aComplexName123')─┠+│ SELECT ? AS `?` │ SELECT ? AS aComplexName123 │ +└───────────────────────────────────────────────┴────────────────────────────────────────────────────────┘ +``` + +## normalizedQueryHash + +リテラルã®å€¤ã‚’æŒãŸãªã„ã€é¡žä¼¼ã—ãŸã‚¯ã‚¨ãƒªã®åŒã˜64ビットã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’è¿”ã—ã¾ã™ã€‚クエリログを分æžã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +**構文** + +``` sql +normalizedQueryHash(x) +``` + +**引数** + +- `x` — 文字ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€‚[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md#uint-ranges). + +**例** + +クエリ: + +``` sql +SELECT normalizedQueryHash('SELECT 1 AS `xyz`') != normalizedQueryHash('SELECT 1 AS `abc`') AS res; +``` + +çµæžœ: + +```result +┌─res─┠+│ 1 │ +└─────┘ +``` + +## normalizedQueryHashKeepNames + +[normalizedQueryHash](#normalizedqueryhash) ã®ã‚ˆã†ã§ã™ãŒã€è¤‡é›‘ãªã‚¨ã‚¤ãƒªã‚¢ã‚¹ï¼ˆãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ã‚’å«ã‚€ã€2æ¡ä»¥ä¸Šã‚ã‚‹ã„ã¯36ãƒã‚¤ãƒˆä»¥ä¸Šã®ã‚‚ã®ã€ä¾‹ãˆã°UUID)を置ãæ›ãˆãšã«åŒã˜64ビットã®ãƒãƒƒã‚·ãƒ¥å€¤ã‚’è¿”ã—ã¾ã™ã€‚クエリログを分æžã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +**構文** + +``` sql +normalizedQueryHashKeepNames(x) +``` + +**引数** + +- `x` — 文字ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€‚[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒƒã‚·ãƒ¥å€¤ã€‚[UInt64](../data-types/int-uint.md#uint-ranges). + +**例** + +``` sql +SELECT normalizedQueryHash('SELECT 1 AS `xyz123`') != normalizedQueryHash('SELECT 1 AS `abc123`') AS normalizedQueryHash; +SELECT normalizedQueryHashKeepNames('SELECT 1 AS `xyz123`') != normalizedQueryHashKeepNames('SELECT 1 AS `abc123`') AS normalizedQueryHashKeepNames; +``` + +çµæžœ: + +```result +┌─normalizedQueryHash─┠+│ 0 │ +└─────────────────────┘ +┌─normalizedQueryHashKeepNames─┠+│ 1 │ +└──────────────────────────────┘ +``` + +## normalizeUTF8NFC + +[NFC標準化形å¼](https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms)ã®æ–‡å­—列ã«å¤‰æ›ã—ã¾ã™ã€‚文字列ãŒæœ‰åŠ¹ãªUTF8-エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +normalizeUTF8NFC(words) +``` + +**引数** + +- `words` — UTF8-エンコードã•ã‚ŒãŸå…¥åŠ›æ–‡å­—列。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- NFC標準化形å¼ã«å¤‰æ›ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT length('â'), normalizeUTF8NFC('â') AS nfc, length(nfc) AS nfc_len; +``` + +çµæžœ: + +```result +┌─length('â')─┬─nfc─┬─nfc_len─┠+│ 2 │ â │ 2 │ +└─────────────┴─────┴─────────┘ +``` + +## normalizeUTF8NFD + +[NFD標準化形å¼](https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms)ã®æ–‡å­—列ã«å¤‰æ›ã—ã¾ã™ã€‚文字列ãŒæœ‰åŠ¹ãªUTF8-エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +normalizeUTF8NFD(words) +``` + +**引数** + +- `words` — UTF8-エンコードã•ã‚ŒãŸå…¥åŠ›æ–‡å­—列。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- NFD標準化形å¼ã«å¤‰æ›ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT length('â'), normalizeUTF8NFD('â') AS nfd, length(nfd) AS nfd_len; +``` + +çµæžœ: + +```result +┌─length('â')─┬─nfd─┬─nfd_len─┠+│ 2 │ aÌ‚ │ 3 │ +└─────────────┴─────┴─────────┘ +``` + +## normalizeUTF8NFKC + +[NFKC標準化形å¼](https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms)ã®æ–‡å­—列ã«å¤‰æ›ã—ã¾ã™ã€‚文字列ãŒæœ‰åŠ¹ãªUTF8-エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +normalizeUTF8NFKC(words) +``` + +**引数** + +- `words` — UTF8-エンコードã•ã‚ŒãŸå…¥åŠ›æ–‡å­—列。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- NFKC標準化形å¼ã«å¤‰æ›ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT length('â'), normalizeUTF8NFKC('â') AS nfkc, length(nfkc) AS nfkc_len; +``` + +çµæžœ: + +```result +┌─length('â')─┬─nfkc─┬─nfkc_len─┠+│ 2 │ â │ 2 │ +└─────────────┴──────┴──────────┘ +``` + +## normalizeUTF8NFKD + +[NFKD標準化形å¼](https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms)ã®æ–‡å­—列ã«å¤‰æ›ã—ã¾ã™ã€‚文字列ãŒæœ‰åŠ¹ãªUTF8-エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã¨ä»®å®šã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +normalizeUTF8NFKD(words) +``` + +**引数** + +- `words` — UTF8-エンコードã•ã‚ŒãŸå…¥åŠ›æ–‡å­—列。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- NFKD標準化形å¼ã«å¤‰æ›ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT length('â'), normalizeUTF8NFKD('â') AS nfkd, length(nfkd) AS nfkd_len; +``` + +çµæžœ: + +```result +┌─length('â')─┬─nfkd─┬─nfkd_len─┠+│ 2 │ aÌ‚ │ 3 │ +└─────────────┴──────┴──────────┘ +``` + +## encodeXMLComponent + +XMLã®ãƒ†ã‚­ã‚¹ãƒˆãƒŽãƒ¼ãƒ‰ã¾ãŸã¯å±žæ€§ã«ãã®å¾Œé…ç½®ã§ãるよã†ã«ã€XMLã§ç‰¹åˆ¥ãªæ„味をæŒã¤æ–‡å­—をエスケープã—ã¾ã™ã€‚ + +次ã®æ–‡å­—ãŒç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ï¼š `<`, `&`, `>`, `"`, `'`. +[XMLãŠã‚ˆã³HTMLã®æ–‡å­—エンティティå‚ç…§ã®ãƒªã‚¹ãƒˆ](https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references)ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +encodeXMLComponent(x) +``` + +**引数** + +- `x` — 入力文字列。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- エスケープã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT encodeXMLComponent('Hello, "world"!'); +SELECT encodeXMLComponent('<123>'); +SELECT encodeXMLComponent('&clickhouse'); +SELECT encodeXMLComponent('\'foo\''); +``` + +çµæžœ: + +```result +Hello, "world"! +<123> +&clickhouse +'foo' +``` + +## decodeXMLComponent + +XMLã§ç‰¹åˆ¥ãªæ„味をæŒã¤éƒ¨åˆ†æ–‡å­—列をエスケープ解除ã—ã¾ã™ã€‚ã“れらã®éƒ¨åˆ†æ–‡å­—列ã¯ï¼š `"` `&` `'` `>` `<` + +ã“ã®é–¢æ•°ã¯ã€æ•°å€¤æ–‡å­—å‚照もUnicode文字ã«ç½®ãæ›ãˆã¾ã™ã€‚10進数(`✓` ã®ã‚ˆã†ãªã‚‚ã®ï¼‰ã¨16進数(`✓` ã®ã‚ˆã†ãªã‚‚ã®ï¼‰ã®ä¸¡æ–¹ã®å½¢å¼ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +decodeXMLComponent(x) +``` + +**引数** + +- `x` — 入力文字列。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- エスケープ解除ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT decodeXMLComponent(''foo''); +SELECT decodeXMLComponent('< Σ >'); +``` + +çµæžœ: + +```result +'foo' +< Σ > +``` + +## decodeHTMLComponent + +HTMLã§ç‰¹åˆ¥ãªæ„味をæŒã¤éƒ¨åˆ†æ–‡å­—列をエスケープ解除ã—ã¾ã™ã€‚例ãˆã°ï¼š `ℏ` `>` `♦` `♥` `<` ãªã©ã€‚ + +ã“ã®é–¢æ•°ã¯ã€æ•°å€¤æ–‡å­—å‚照もUnicode文字ã«ç½®ãæ›ãˆã¾ã™ã€‚10進数(`✓` ã®ã‚ˆã†ãªã‚‚ã®ï¼‰ã¨16進数(`✓` ã®ã‚ˆã†ãªã‚‚ã®ï¼‰ã®ä¸¡æ–¹ã®å½¢å¼ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +decodeHTMLComponent(x) +``` + +**引数** + +- `x` — 入力文字列。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- エスケープ解除ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md). + +**例** + +``` sql +SELECT decodeHTMLComponent(''CH'); +SELECT decodeHTMLComponent('I♥ClickHouse'); +``` + +çµæžœ: + +```result +'CH' +I♥ClickHouse' +``` + +## extractTextFromHTML + +ã“ã®é–¢æ•°ã¯ã€HTMLã¾ãŸã¯XHTMLã‹ã‚‰ãƒ—レーンテキストを抽出ã—ã¾ã™ã€‚ + +HTMLã€XMLã¾ãŸã¯XHTML仕様ã«100%準拠ã—ã¦ã„ã¾ã›ã‚“ãŒã€å®Ÿè£…ã¯åˆç†çš„ã«æ­£ç¢ºã§é«˜é€Ÿã§ã™ã€‚ルールã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +1. コメントã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚例: ``。コメント㯠`-->` ã§çµ‚了ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚³ãƒ¡ãƒ³ãƒˆã¯ç¦æ­¢ã•ã‚Œã¦ã„ã¾ã™ã€‚ +注æ„: `` ã‚„ `` ã®ã‚ˆã†ãªæ§‹é€ ã¯HTMLã§ã¯æœ‰åŠ¹ãªã‚³ãƒ¡ãƒ³ãƒˆã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€ä»–ã®ãƒ«ãƒ¼ãƒ«ã«ã‚ˆã£ã¦ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚ +2. CDATAã¯ãã®ã¾ã¾è²¼ã‚Šä»˜ã‘られã¾ã™ã€‚注æ„: CDATAã¯XML/XHTML固有ã®ã‚‚ã®ã§ã‚ã‚Šã€ã€Œãƒ™ã‚¹ãƒˆã‚¨ãƒ•ã‚©ãƒ¼ãƒˆã€ãƒ™ãƒ¼ã‚¹ã§å‡¦ç†ã•ã‚Œã¾ã™ã€‚ +3. `script` ãŠã‚ˆã³ `style` è¦ç´ ã¯ã€ãã®ã™ã¹ã¦ã®å†…容ã¨å…±ã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚注æ„: é–‰ã˜ã‚¿ã‚°ã¯å†…容内ã«ç¾ã‚Œã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。例ãˆã°ã€JS文字列リテラル㯠`"<\/script>"` ã®ã‚ˆã†ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +注æ„: コメントãŠã‚ˆã³CDATA㯠`script` ã¾ãŸã¯ `style` 内ã§ã‚‚å¯èƒ½ã§ã‚ã‚Šã€CDATA内ã§ã¯é–‰ã˜ã‚¿ã‚°ã¯æ¤œç´¢ã•ã‚Œã¾ã›ã‚“。例: `]]>` 。ã—ã‹ã—ã€ãれらã¯ã‚³ãƒ¡ãƒ³ãƒˆå†…ã§ã¯ä¾ç„¶ã¨ã—ã¦æ¤œç´¢ã•ã‚Œã¾ã™ã€‚時ã«ã¯ã“ã‚ŒãŒè¤‡é›‘ã«ãªã‚Šã¾ã™ï¼š ` var y = "-->"; alert(x + y);` +注æ„: `script` ãŠã‚ˆã³ `style` ã¯XMLåå‰ç©ºé–“ã®åå‰ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã€ãã®å ´åˆã€é€šå¸¸ã®`script`ã¾ãŸã¯`style`è¦ç´ ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã›ã‚“。例: `Hello`。 +注æ„: ã‚¿ã‚°åã®å¾Œã«ãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ãŒã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼š `` ã—ã‹ã—ã€å‰ã«ã¯ã‚ã‚Šã¾ã›ã‚“: `< / script>`。 +4. ãã®ä»–ã®ã‚¿ã‚°ã¾ãŸã¯ã‚¿ã‚°ã®ã‚ˆã†ãªè¦ç´ ã¯ã€å†…部内容ãªã—ã§ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚例: `.` +注æ„: ã“ã®HTMLã¯ä¸æ­£ã¨æœŸå¾…ã•ã‚Œã¾ã™ï¼š `` +注æ„: ã‚¿ã‚°ã®ã‚ˆã†ãªã‚‚ã®ã‚‚スキップã•ã‚Œã¾ã™ï¼š `<>`ã€`` ãªã©ã€‚ +注æ„: 終端ã®ãªã„ã‚¿ã‚°ã¯å…¥åŠ›ã®æœ€å¾Œã¾ã§ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ï¼š`world`ã€`Helloworld` - HTMLã«ã¯ãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹ãŒã‚ã‚Šã¾ã›ã‚“ãŒã€é–¢æ•°ã¯ã“れを挿入ã—ã¾ã™ã€‚ã¾ãŸã€`Hello

    world

    `ã€`Hello
    world`も考ãˆã¦ãã ã•ã„。ã“ã®æŒ¯ã‚‹èˆžã„ã¯ã€HTMLã‚’å˜èªžã®ãƒãƒƒã‚°ã«å¤‰æ›ã™ã‚‹ã‚ˆã†ãªãƒ‡ãƒ¼ã‚¿è§£æžã«ã¨ã£ã¦åˆç†çš„ã§ã™ã€‚ +7. ホワイトスペースã®æ­£ã—ã„処ç†ã«ã¯ã€`
    `ãŠã‚ˆã³CSSã®`display`ãŠã‚ˆã³`white-space`プロパティã®ã‚µãƒãƒ¼ãƒˆãŒå¿…è¦ã§ã™ã€‚
    +
    +**構文**
    +
    +``` sql
    +extractTextFromHTML(x)
    +```
    +
    +**引数**
    +
    +- `x` — 入力テキスト。[String](../data-types/string.md).
    +
    +**è¿”ã•ã‚Œã‚‹å€¤**
    +
    +- 抽出ã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã€‚[String](../data-types/string.md).
    +
    +**例**
    +
    +最åˆã®ä¾‹ã«ã¯ã„ãã¤ã‹ã®ã‚¿ã‚°ã¨ã‚³ãƒ¡ãƒ³ãƒˆãŒå«ã¾ã‚Œã¦ãŠã‚Šã€ãƒ›ãƒ¯ã‚¤ãƒˆã‚¹ãƒšãƒ¼ã‚¹å‡¦ç†ã‚‚示ã—ã¦ã„ã¾ã™ã€‚
    +2ã¤ç›®ã®ä¾‹ã¯ã€CDATAã¨scriptã‚¿ã‚°ã®å‡¦ç†ã‚’示ã—ã¦ã„ã¾ã™ã€‚
    +3ã¤ç›®ã®ä¾‹ã§ã¯ã€[url](../../sql-reference/table-functions/url.md) 関数ã§å—ã‘å–ã£ãŸå®Œå…¨ãªHTMLレスãƒãƒ³ã‚¹ã‹ã‚‰ãƒ†ã‚­ã‚¹ãƒˆã‚’抽出ã—ã¦ã„ã¾ã™ã€‚
    +
    +``` sql
    +SELECT extractTextFromHTML(' 

    A text withtags.

    '); +SELECT extractTextFromHTML('CDATA]]> '); +SELECT extractTextFromHTML(html) FROM url('http://www.donothingfor2minutes.com/', RawBLOB, 'html String'); +``` + +çµæžœ: + +```result +A text with tags . +The content within CDATA +Do Nothing for 2 Minutes 2:00   +``` + +## ascii {#ascii} + +文字列 `s` ã®æœ€åˆã®æ–‡å­—ã®ASCIIコードãƒã‚¤ãƒ³ãƒˆï¼ˆInt32ã¨ã—ã¦ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚ + +`s` ãŒç©ºã®å ´åˆã€çµæžœã¯0ã§ã™ã€‚最åˆã®æ–‡å­—ãŒéžASCII文字ã¾ãŸã¯UTF-16ã®Latin-1ã®è£œé›†åˆç¯„囲ã®ä¸€éƒ¨ã§ãªã„å ´åˆã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +**構文** + +```sql +ascii(s) +``` + +## soundex + +文字列ã®[Soundexコード](https://en.wikipedia.org/wiki/Soundex)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +soundex(val) +``` + +**引数** + +- `val` — 入力値。[String](../data-types/string.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力値ã®Soundexコード。[String](../data-types/string.md) + +**例** + +``` sql +select soundex('aksel'); +``` + +çµæžœ: + +```result +┌─soundex('aksel')─┠+│ A240 │ +└──────────────────┘ +``` + +## punycodeEncode + +文字列ã®[Punycode](https://en.wikipedia.org/wiki/Punycode)表ç¾ã‚’è¿”ã—ã¾ã™ã€‚ +文字列ã¯UTF8ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€å‹•ä½œã¯æœªå®šç¾©ã§ã™ã€‚ + +**構文** + +``` sql +punycodeEncode(val) +``` + +**引数** + +- `val` — 入力値。[String](../data-types/string.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力値ã®Punycode表ç¾ã€‚[String](../data-types/string.md) + +**例** + +``` sql +select punycodeEncode('München'); +``` + +çµæžœ: + +```result +┌─punycodeEncode('München')─┠+│ Mnchen-3ya │ +└───────────────────────────┘ +``` + +## punycodeDecode + +[Punycode](https://en.wikipedia.org/wiki/Punycode)ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸæ–‡å­—列ã®UTF8ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ—レーンテキストを返ã—ã¾ã™ã€‚ +有効ãªPunycodeã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸæ–‡å­—列ãŒä¸Žãˆã‚‰ã‚Œãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +punycodeEncode(val) +``` + +**引数** + +- `val` — Punycodeã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸæ–‡å­—列。[String](../data-types/string.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力値ã®ãƒ—レーンテキスト。[String](../data-types/string.md) + +**例** + +``` sql +select punycodeDecode('Mnchen-3ya'); +``` + +çµæžœ: + +```result +┌─punycodeDecode('Mnchen-3ya')─┠+│ München │ +└──────────────────────────────┘ +``` + +## tryPunycodeDecode + +`punycodeDecode` ã®ã‚ˆã†ã§ã™ãŒã€ç„¡åŠ¹ãªPunycodeエンコードã•ã‚ŒãŸæ–‡å­—列ãŒä¸Žãˆã‚‰ã‚ŒãŸå ´åˆã€ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +## idnaEncode + +[Internationalized Domain Names in Applications](https://en.wikipedia.org/wiki/Internationalized_domain_name#Internationalizing_Domain_Names_in_Applications) (IDNA) ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã«å¾“ã£ã¦ã€ãƒ‰ãƒ¡ã‚¤ãƒ³åã®ASCII表ç¾ï¼ˆToASCIIアルゴリズム)を返ã—ã¾ã™ã€‚ +入力文字列ã¯UTFã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã€ASCII文字列ã«å¤‰æ›å¯èƒ½ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ +注æ„: パーセントデコードやタブã€ã‚¹ãƒšãƒ¼ã‚¹ã€åˆ¶å¾¡æ–‡å­—ã®ãƒˆãƒªãƒŸãƒ³ã‚°ã¯è¡Œã„ã¾ã›ã‚“。 + +**構文** + +```sql +idnaEncode(val) +``` + +**引数** + +- `val` — 入力値。[String](../data-types/string.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力値ã®IDNAメカニズムã«å¾“ã£ãŸASCII表ç¾ã€‚[String](../data-types/string.md) + +**例** + +``` sql +select idnaEncode('straße.münchen.de'); +``` + +çµæžœ: + +```result +┌─idnaEncode('straße.münchen.de')─────┠+│ xn--strae-oqa.xn--mnchen-3ya.de │ +└─────────────────────────────────────┘ +``` + +## tryIdnaEncode + +`idnaEncode` ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ä¾‹å¤–をスローã™ã‚‹ä»£ã‚ã‚Šã«ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +## idnaDecode + +[Internationalized Domain Names in Applications](https://en.wikipedia.org/wiki/Internationalized_domain_name#Internationalizing_Domain_Names_in_Applications) (IDNA) ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã«å¾“ã£ãŸãƒ‰ãƒ¡ã‚¤ãƒ³åã®Unicode (UTF-8)表ç¾ï¼ˆToUnicodeアルゴリズム)を返ã—ã¾ã™ã€‚ +エラーã®å ´åˆï¼ˆä¾‹ãˆã°å…¥åŠ›ãŒç„¡åŠ¹ãªå ´åˆï¼‰ã€å…¥åŠ›æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +`idnaEncode()`ã¨`idnaDecode()`ã‚’ç¹°ã‚Šè¿”ã—é©ç”¨ã™ã‚‹ã¨ã€ã‚±ãƒ¼ã‚¹ã®æ­£è¦åŒ–ã«ã‚ˆã‚Šå…ƒã®æ–‡å­—列ãŒå¿…ãšã—も戻るã¨ã¯é™ã‚‰ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +idnaDecode(val) +``` + +**引数** + +- `val` — 入力値。 [String](../data-types/string.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力値ã®IDNAメカニズムã«ã‚ˆã‚‹Unicode (UTF-8)表ç¾ã€‚[String](../data-types/string.md) + +**例** + +``` sql +select idnaDecode('xn--strae-oqa.xn--mnchen-3ya.de'); +``` + +çµæžœ: + +```result +┌─idnaDecode('xn--strae-oqa.xn--mnchen-3ya.de')─┠+│ straße.münchen.de │ +└───────────────────────────────────────────────┘ +``` + +## byteHammingDistance + +2ã¤ã®ãƒã‚¤ãƒˆæ–‡å­—列間ã®[hamming distance](https://en.wikipedia.org/wiki/Hamming_distance)を計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +byteHammingDistance(string1, string2) +``` + +**例** + +``` sql +SELECT byteHammingDistance('karolin', 'kathrin'); +``` + +çµæžœ: + +``` text +┌─byteHammingDistance('karolin', 'kathrin')─┠+│ 3 │ +└───────────────────────────────────────────┘ +``` + +別å: `mismatches` + +## stringJaccardIndex + +2ã¤ã®ãƒã‚¤ãƒˆæ–‡å­—列間ã®[Jaccard類似度指数](https://en.wikipedia.org/wiki/Jaccard_index)を計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +stringJaccardIndex(string1, string2) +``` + +**例** + +``` sql +SELECT stringJaccardIndex('clickhouse', 'mouse'); +``` + +çµæžœ: + +``` text +┌─stringJaccardIndex('clickhouse', 'mouse')─┠+│ 0.4 │ +└───────────────────────────────────────────┘ +``` + +## stringJaccardIndexUTF8 + +[stringJaccardIndex](#stringjaccardindex)ã¨åŒæ§˜ã§ã™ãŒã€UTF8エンコードã•ã‚ŒãŸæ–‡å­—列用ã§ã™ã€‚ + +## editDistance + +2ã¤ã®ãƒã‚¤ãƒˆæ–‡å­—列間ã®[編集è·é›¢](https://en.wikipedia.org/wiki/Edit_distance)を計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +editDistance(string1, string2) +``` + +**例** + +``` sql +SELECT editDistance('clickhouse', 'mouse'); +``` + +çµæžœ: + +``` text +┌─editDistance('clickhouse', 'mouse')─┠+│ 6 │ +└─────────────────────────────────────┘ +``` + +別å: `levenshteinDistance` + +## editDistanceUTF8 + +2ã¤ã®UTF8文字列間ã®[編集è·é›¢](https://en.wikipedia.org/wiki/Edit_distance)を計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +editDistanceUTF8(string1, string2) +``` + +**例** + +``` sql +SELECT editDistanceUTF8('我是è°', '我是我'); +``` + +çµæžœ: + +``` text +┌─editDistanceUTF8('我是è°', '我是我')──┠+│ 1 │ +└─────────────────────────────────────┘ +``` + +別å: `levenshteinDistanceUTF8` + +## damerauLevenshteinDistance + +2ã¤ã®ãƒã‚¤ãƒˆæ–‡å­—列間ã®[Damerau-Levenshteinè·é›¢](https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance)を計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +damerauLevenshteinDistance(string1, string2) +``` + +**例** + +``` sql +SELECT damerauLevenshteinDistance('clickhouse', 'mouse'); +``` + +çµæžœ: + +``` text +┌─damerauLevenshteinDistance('clickhouse', 'mouse')─┠+│ 6 │ +└───────────────────────────────────────────────────┘ +``` + +## jaroSimilarity + +2ã¤ã®ãƒã‚¤ãƒˆæ–‡å­—列間ã®[Jaro類似度](https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance#Jaro_similarity)を計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +jaroSimilarity(string1, string2) +``` + +**例** + +``` sql +SELECT jaroSimilarity('clickhouse', 'click'); +``` + +çµæžœ: + +``` text +┌─jaroSimilarity('clickhouse', 'click')─┠+│ 0.8333333333333333 │ +└───────────────────────────────────────┘ +``` + +## jaroWinklerSimilarity + +2ã¤ã®ãƒã‚¤ãƒˆæ–‡å­—列間ã®[Jaro-Winkler類似度](https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance#Jaro%E2%80%93Winkler_similarity)を計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +jaroWinklerSimilarity(string1, string2) +``` + +**例** + +``` sql +SELECT jaroWinklerSimilarity('clickhouse', 'click'); +``` + +çµæžœ: + +``` text +┌─jaroWinklerSimilarity('clickhouse', 'click')─┠+│ 0.8999999999999999 │ +└──────────────────────────────────────────────┘ +``` + +## initcap + +å„å˜èªžã®æœ€åˆã®æ–‡å­—を大文字ã«å¤‰æ›ã—ã€æ®‹ã‚Šã‚’å°æ–‡å­—ã«å¤‰æ›ã—ã¾ã™ã€‚å˜èªžã¯éžè‹±æ•°å­—ã«ã‚ˆã£ã¦åŒºåˆ‡ã‚‰ã‚ŒãŸè‹±æ•°å­—ã®é€£ç¶šã§ã™ã€‚ + +:::note +`initCap`ã¯å˜èªžã®æœ€åˆã®æ–‡å­—ã®ã¿ã‚’大文字ã«å¤‰æ›ã™ã‚‹ãŸã‚ã€ã‚¢ãƒã‚¹ãƒˆãƒ­ãƒ•ã‚£ã‚„大文字をå«ã‚€å˜èªžã§äºˆæœŸã—ãªã„動作をã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°: + +```sql +SELECT initCap('mother''s daughter'), initCap('joe McAdam'); +``` + +ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«è¿”ã•ã‚Œã¾ã™ + +```response +┌─initCap('mother\'s daughter')─┬─initCap('joe McAdam')─┠+│ Mother'S Daughter │ Joe Mcadam │ +└───────────────────────────────┴───────────────────────┘ +``` + +ã“ã‚Œã¯æ—¢çŸ¥ã®å‹•ä½œã§ã‚ã‚Šã€ç¾åœ¨ã®ã¨ã“ã‚修正予定ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: + +**構文** + +```sql +initcap(val) +``` + +**引数** + +- `val` — 入力値。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å„å˜èªžã®æœ€åˆã®æ–‡å­—ãŒå¤§æ–‡å­—ã«å¤‰æ›ã•ã‚ŒãŸ`val`。[String](../data-types/string.md). + +**例** + +クエリ: + +```sql +SELECT initcap('building for fast'); +``` + +çµæžœ: + +```text +┌─initcap('building for fast')─┠+│ Building For Fast │ +└──────────────────────────────┘ +``` + +## initcapUTF8 + +[initcap](#initcap)ã¨åŒæ§˜ã«ã€`initcapUTF8`ã¯å„å˜èªžã®æœ€åˆã®æ–‡å­—を大文字ã«å¤‰æ›ã—ã€æ®‹ã‚Šã‚’å°æ–‡å­—ã«å¤‰æ›ã—ã¾ã™ã€‚ +文字列ãŒæœ‰åŠ¹ãªUTF-8エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ã“ã®å‰æãŒé•åã•ã‚ŒãŸå ´åˆã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ã¯è¨€èªžã‚’検出ã—ã¾ã›ã‚“。例ãˆã°ãƒˆãƒ«ã‚³èªžã®å ´åˆã€çµæžœã¯æ­£ç¢ºã§ã¯ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ (i/Ä° vs. i/I)。コードãƒã‚¤ãƒ³ãƒˆã®å¤§æ–‡å­—ã¨å°æ–‡å­—ã®UTF-8ãƒã‚¤ãƒˆã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®é•·ã•ãŒç•°ãªã‚‹å ´åˆã€ã“ã®ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆã«å¯¾ã™ã‚‹çµæžœã¯æ­£ã—ããªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**構文** + +```sql +initcapUTF8(val) +``` + +**引数** + +- `val` — 入力値。[String](../data-types/string.md). + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å„å˜èªžã®æœ€åˆã®æ–‡å­—ãŒå¤§æ–‡å­—ã«å¤‰æ›ã•ã‚ŒãŸ`val`。[String](../data-types/string.md). + +**例** + +クエリ: + +```sql +SELECT initcapUTF8('не тормозит'); +``` + +çµæžœ: + +```text +┌─initcapUTF8('не тормозит')─┠+│ Ðе Тормозит │ +└────────────────────────────┘ +``` + +## firstLine + +複数行ã®æ–‡å­—列ã‹ã‚‰æœ€åˆã®è¡Œã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +firstLine(val) +``` + +**引数** + +- `val` — 入力値。[String](../data-types/string.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力値ã®æœ€åˆã®è¡Œã¾ãŸã¯æ”¹è¡ŒãŒãªã„å ´åˆã¯å…¨ä½“。[String](../data-types/string.md) + +**例** + +```sql +select firstLine('foo\nbar\nbaz'); +``` + +çµæžœ: + +```result +┌─firstLine('foo\nbar\nbaz')─┠+│ foo │ +└────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/string-replace-functions.md b/docs/ja/sql-reference/functions/string-replace-functions.md new file mode 100644 index 00000000000..8c604c97a78 --- /dev/null +++ b/docs/ja/sql-reference/functions/string-replace-functions.md @@ -0,0 +1,333 @@ +--- +slug: /ja/sql-reference/functions/string-replace-functions +sidebar_position: 150 +sidebar_label: 文字列ã®ç½®æ›é–¢æ•° +--- + +# 文字列ã®ç½®æ›é–¢æ•° + +[一般的ãªæ–‡å­—列関数](string-functions.md)ãŠã‚ˆã³[文字列ã®æ¤œç´¢é–¢æ•°](string-search-functions.md)ã¯åˆ¥ã€…ã«èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## overlay + +1ã‹ã‚‰å§‹ã¾ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹`offset`ã§ã€æ–‡å­—列`input`ã®ä¸€éƒ¨ã‚’別ã®æ–‡å­—列`replace`ã§ç½®æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +overlay(s, replace, offset[, length]) +``` + +**パラメータ** + +- `s`: 文字列型 [String](../data-types/string.md)。 +- `replace`: 文字列型 [String](../data-types/string.md)。 +- `offset`: æ•´æ•°åž‹ [Int](../data-types/int-uint.md) (1-based)。`offset` ãŒè² ã®å ´åˆã€ãã‚Œã¯æ–‡å­—列 `s` ã®æœ«å°¾ã‹ã‚‰æ•°ãˆã¾ã™ã€‚ +- `length`: オプション。整数型 [Int](../data-types/int-uint.md)。`length` ã¯ã€å…¥åŠ›æ–‡å­—列 `s` 内ã§ç½®æ›ã•ã‚Œã‚‹éƒ¨åˆ†ã®é•·ã•ã‚’指定ã—ã¾ã™ã€‚`length` ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`s` ã‹ã‚‰å‰Šé™¤ã•ã‚Œã‚‹ãƒã‚¤ãƒˆæ•°ã¯ `replace` ã®é•·ã•ã¨åŒã˜ã§ã™ã€‚指定ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ `length` ãƒã‚¤ãƒˆãŒå‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [String](../data-types/string.md) データ型ã®å€¤ã€‚ + +**例** + +```sql +SELECT overlay('My father is from Mexico.', 'mother', 4) AS res; +``` + +çµæžœ: + +```text +┌─res──────────────────────┠+│ My mother is from Mexico.│ +└──────────────────────────┘ +``` + +```sql +SELECT overlay('My father is from Mexico.', 'dad', 4, 6) AS res; +``` + +çµæžœ: + +```text +┌─res───────────────────┠+│ My dad is from Mexico.│ +└───────────────────────┘ +``` + +## overlayUTF8 + +1ã‹ã‚‰å§‹ã¾ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹`offset`ã§ã€æ–‡å­—列`input`ã®ä¸€éƒ¨ã‚’別ã®æ–‡å­—列`replace`ã§ç½®æ›ã—ã¾ã™ã€‚ + +文字列ãŒæœ‰åŠ¹ãªUTF-8ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚€ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ã“ã®å‰æãŒç ´ã‚‰ã‚ŒãŸå ´åˆã€ä¾‹å¤–ã¯æŠ•ã’られãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚ + +**構文** + +```sql +overlayUTF8(s, replace, offset[, length]) +``` + +**パラメータ** + +- `s`: 文字列型 [String](../data-types/string.md)。 +- `replace`: 文字列型 [String](../data-types/string.md)。 +- `offset`: æ•´æ•°åž‹ [Int](../data-types/int-uint.md) (1-based)。`offset` ãŒè² ã®å ´åˆã€ãã‚Œã¯å…¥åŠ›æ–‡å­—列 `s` ã®æœ«å°¾ã‹ã‚‰æ•°ãˆã¾ã™ã€‚ +- `length`: オプション。整数型 [Int](../data-types/int-uint.md)。`length` ã¯ã€å…¥åŠ›æ–‡å­—列 `s` 内ã§ç½®æ›ã•ã‚Œã‚‹éƒ¨åˆ†ã®é•·ã•ã‚’指定ã—ã¾ã™ã€‚`length` ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`s` ã‹ã‚‰å‰Šé™¤ã•ã‚Œã‚‹æ–‡å­—数㯠`replace` ã®é•·ã•ã¨åŒã˜ã§ã™ã€‚指定ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ `length` 文字ãŒå‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [String](../data-types/string.md) データ型ã®å€¤ã€‚ + +**例** + +```sql +SELECT overlay('Mein Vater ist aus Österreich.', 'der Türkei', 20) AS res; +``` + +çµæžœ: + +```text +┌─res───────────────────────────┠+│ Mein Vater ist aus der Türkei.│ +└───────────────────────────────┘ +``` + +## replaceOne + +`haystack` 中ã®æœ€åˆã®ã‚µãƒ–ストリング `pattern` ã‚’ `replacement` 文字列ã§ç½®æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +replaceOne(haystack, pattern, replacement) +``` + +## replaceAll + +`haystack` 中ã®ã™ã¹ã¦ã®ã‚µãƒ–ストリング `pattern` ã‚’ `replacement` 文字列ã§ç½®æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +replaceAll(haystack, pattern, replacement) +``` + +別å: `replace`. + +## replaceRegexpOne + +æ­£è¦è¡¨ç¾ `pattern` ( [re2 syntax](https://github.com/google/re2/wiki/Syntax) ã§) ã«ä¸€è‡´ã™ã‚‹æœ€åˆã®ã‚µãƒ–ストリングを `haystack` ã‹ã‚‰ `replacement` 文字列ã§ç½®æ›ã—ã¾ã™ã€‚ + +`replacement` ã«ã¯ç½®æ› `\0-\9` ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +ç½®æ› `\1-\9` ã¯1ã‹ã‚‰9ã¾ã§ã®ã‚­ãƒ£ãƒ—ãƒãƒ£ã‚°ãƒ«ãƒ¼ãƒ— (サブマッãƒ) ã«å¯¾å¿œã—ã€ç½®æ› `\0` ã¯å…¨ä½“ã®ãƒžãƒƒãƒã«å¯¾å¿œã—ã¾ã™ã€‚ + +`pattern` ã¾ãŸã¯ `replacement` 文字列ã«é€èªžçš„㪠`\` 文字を使用ã™ã‚‹ã«ã¯ã€ `\` を使用ã—ã¦ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã—ã¾ã™ã€‚ +文字列リテラルã¯è¿½åŠ ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ãŒå¿…è¦ã§ã‚ã‚‹ã“ã¨ã«ã‚‚注æ„ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +replaceRegexpOne(haystack, pattern, replacement) +``` + +**例** + +ISOå½¢å¼ã®æ—¥ä»˜ã‚’アメリカã®å½¢å¼ã«å¤‰æ›ã™ã‚‹: + +``` sql +SELECT DISTINCT + EventDate, + replaceRegexpOne(toString(EventDate), '(\\d{4})-(\\d{2})-(\\d{2})', '\\2/\\3/\\1') AS res +FROM test.hits +LIMIT 7 +FORMAT TabSeparated +``` + +çµæžœ: + +``` text +2014-03-17 03/17/2014 +2014-03-18 03/18/2014 +2014-03-19 03/19/2014 +2014-03-20 03/20/2014 +2014-03-21 03/21/2014 +2014-03-22 03/22/2014 +2014-03-23 03/23/2014 +``` + +文字列を10回コピーã™ã‚‹: + +``` sql +SELECT replaceRegexpOne('Hello, World!', '.*', '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0') AS res +``` + +çµæžœ: + +``` text +┌─res────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!Hello, World! │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## replaceRegexpAll + +`replaceRegexpOne` ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ãƒ‘ターンã®ã™ã¹ã¦ã®å‡ºç¾ã‚’ç½®æ›ã—ã¾ã™ã€‚ + +別å: `REGEXP_REPLACE`. + +**例** + +``` sql +SELECT replaceRegexpAll('Hello, World!', '.', '\\0\\0') AS res +``` + +çµæžœ: + +``` text +┌─res────────────────────────┠+│ HHeelllloo,, WWoorrlldd!! │ +└────────────────────────────┘ +``` + +例外ã¨ã—ã¦ã€æ­£è¦è¡¨ç¾ãŒç©ºã®ã‚µãƒ–ストリングã§æ©Ÿèƒ½ã—ãŸå ´åˆã€ç½®æ›ã¯ä¸€åº¦ã ã‘è¡Œã‚ã‚Œã€æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +``` sql +SELECT replaceRegexpAll('Hello, World!', '^', 'here: ') AS res +``` + +çµæžœ: + +``` text +┌─res─────────────────┠+│ here: Hello, World! │ +└─────────────────────┘ +``` + +## regexpQuoteMeta + +æ­£è¦è¡¨ç¾ã§ç‰¹åˆ¥ãªæ„味をæŒã¤æ¬¡ã®æ–‡å­—ã®å‰ã«ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’追加ã—ã¾ã™: `\0`, `\\`, `|`, `(`, `)`, `^`, `$`, `.`, `[`, `]`, `?`, `*`, `+`, `{`, `:`, `-`. + +ã“ã®å®Ÿè£…㯠re2::RE2::QuoteMeta ã¨ã¯è‹¥å¹²ç•°ãªã‚Šã¾ã™ã€‚ゼロãƒã‚¤ãƒˆã‚’ `\x00` ã§ã¯ãªã `\0` ã¨ã—ã¦ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã—ã€å¿…è¦ãªæ–‡å­—ã®ã¿ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã—ã¾ã™ã€‚ +詳細ã«ã¤ã„ã¦ã¯ã€[RE2](https://github.com/google/re2/blob/master/re2/re2.cc#L473) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +regexpQuoteMeta(s) +``` + +## format + +`pattern` 文字列を引数ã«ãƒªã‚¹ãƒˆã•ã‚ŒãŸå€¤ï¼ˆæ–‡å­—列ã€æ•´æ•°ãªã©ï¼‰ã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã—ã¾ã™ã€‚Pythonã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ä¼¼ã¦ã„ã¾ã™ã€‚`pattern` 文字列ã«ã¯ã€ä¸­æ‹¬å¼§ `{}` ã§å›²ã¾ã‚ŒãŸç½®æ›ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚中括弧ã«å«ã¾ã‚Œã¦ã„ãªã„ã‚‚ã®ã¯ã€ãƒªãƒ†ãƒ©ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã¨è¦‹ãªã•ã‚Œã€å‡ºåŠ›ã«ãã®ã¾ã¾ã‚³ãƒ”ーã•ã‚Œã¾ã™ã€‚リテラル中括弧ã¯äºŒé‡ä¸­æ‹¬å¼§ `{{ '{{' }}` ãŠã‚ˆã³ `{{ '}}' }}` ã§ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã§ãã¾ã™ã€‚フィールドåã¯0ã‹ã‚‰å§‹ã¾ã‚‹æ•°å­—ã¾ãŸã¯ç©ºç™½ã«ã§ãã€ç©ºã®å ´åˆã¯å˜èª¿ã«å¢—加ã™ã‚‹ç•ªå·ãŒæš—黙的ã«ä¸Žãˆã‚‰ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +format(pattern, s0, s1, ...) +``` + +**例** + +``` sql +SELECT format('{1} {0} {1}', 'World', 'Hello') +``` + +```result +┌─format('{1} {0} {1}', 'World', 'Hello')─┠+│ Hello World Hello │ +└─────────────────────────────────────────┘ +``` + +æš—é»™ã®ç•ªå·ã‚’使用ã—ãŸå ´åˆ: + +``` sql +SELECT format('{} {}', 'Hello', 'World') +``` + +```result +┌─format('{} {}', 'Hello', 'World')─┠+│ Hello World │ +└───────────────────────────────────┘ +``` + +## translate + +文字列 `s` 内ã®æ–‡å­—ã‚’ã€`from` ãŠã‚ˆã³ `to` 文字列ã§å®šç¾©ã•ã‚ŒãŸä¸€å¯¾ä¸€ã®æ–‡å­—マッピングを使用ã—ã¦ç½®æ›ã—ã¾ã™ã€‚`from` ãŠã‚ˆã³ `to` ã¯åŒã˜ã‚µã‚¤ã‚ºã®å®šæ•°ASCII文字列ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。元ã®æ–‡å­—列ã®éžASCII文字ã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。 + +**構文** + +```sql +translate(s, from, to) +``` + +**例** + +``` sql +SELECT translate('Hello, World!', 'delor', 'DELOR') AS res +``` + +çµæžœ: + +``` text +┌─res───────────┠+│ HELLO, WORLD! │ +└───────────────┘ +``` + +## translateUTF8 + +[translate](#translate) ã¨åŒæ§˜ã§ã™ãŒã€`s`, `from`, `to` ãŒUTF-8ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +translateUTF8(s, from, to) +``` + +**パラメータ** + +- `s`: 文字列型 [String](../data-types/string.md)。 +- `from`: 文字列型 [String](../data-types/string.md)。 +- `to`: 文字列型 [String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- [String](../data-types/string.md) データ型ã®å€¤ã€‚ + +**例** + +クエリ: + +``` sql +SELECT translateUTF8('Münchener Straße', 'üß', 'us') AS res; +``` + +``` response +┌─res──────────────┠+│ Munchener Strase │ +└──────────────────┘ +``` + +## printf + +`printf` 関数ã¯ã€ä¸Žãˆã‚‰ã‚ŒãŸæ–‡å­—列を引数ã«ãƒªã‚¹ãƒˆã•ã‚ŒãŸå€¤ï¼ˆæ–‡å­—列ã€æ•´æ•°ã€æµ®å‹•å°æ•°ç‚¹æ•°ãªã©ï¼‰ã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã—ã€C++ ã® printf 関数ã«ä¼¼ã¦ã„ã¾ã™ã€‚フォーマット文字列ã«ã¯ `%` 文字ã‹ã‚‰å§‹ã¾ã‚‹ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæŒ‡å®šå­ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`%` ãŠã‚ˆã³ãã®å¾Œã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæŒ‡å®šå­ã«å«ã¾ã‚Œã¦ã„ãªã„ã‚‚ã®ã¯ãƒªãƒ†ãƒ©ãƒ«ãƒ†ã‚­ã‚¹ãƒˆã¨è¦‹ãªã•ã‚Œã€å‡ºåŠ›ã«ãã®ã¾ã¾ã‚³ãƒ”ーã•ã‚Œã¾ã™ã€‚リテラル `%` 文字㯠`%%` ã§ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã§ãã¾ã™ã€‚ + +**構文** + +``` sql +printf(format, arg1, arg2, ...) +``` + +**例** + +クエリ: + +``` sql +select printf('%%%s %s %d', 'Hello', 'World', 2024); +``` + +``` response +┌─printf('%%%s %s %d', 'Hello', 'World', 2024)─┠+│ %Hello World 2024 │ +└──────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/string-search-functions.md b/docs/ja/sql-reference/functions/string-search-functions.md new file mode 100644 index 00000000000..bd7d29373e6 --- /dev/null +++ b/docs/ja/sql-reference/functions/string-search-functions.md @@ -0,0 +1,1947 @@ +--- +slug: /ja/sql-reference/functions/string-search-functions +sidebar_position: 160 +sidebar_label: 文字列ã®æ¤œç´¢ +--- + +# 文字列検索ã®ãŸã‚ã®é–¢æ•° + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®ã™ã¹ã¦ã®é–¢æ•°ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚±ãƒ¼ã‚¹ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ã«æ¤œç´¢ã—ã¾ã™ã€‚ケースインセンシティブãªæ¤œç´¢ã¯é€šå¸¸ã€åˆ¥ã®é–¢æ•°ãƒãƒªã‚¢ãƒ³ãƒˆã§æä¾›ã•ã‚Œã¾ã™ã€‚ + +:::note +ケースインセンシティブãªæ¤œç´¢ã¯ã€è‹±èªžã®å°æ–‡å­—-大文字ã®ãƒ«ãƒ¼ãƒ«ã«å¾“ã„ã¾ã™ã€‚ãŸã¨ãˆã°ã€è‹±èªžã§ã¯å¤§æ–‡å­—ã® `i` 㯠`I` ã§ã™ãŒã€ãƒˆãƒ«ã‚³èªžã§ã¯ `Ä°` ã§ã™ã€‚ã—ãŸãŒã£ã¦ã€è‹±èªžä»¥å¤–ã®è¨€èªžã®çµæžœã¯äºˆæœŸã›ã¬ã‚‚ã®ã«ãªã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +::: + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®é–¢æ•°ã¯ã€æ¤œç´¢ã•ã‚Œã‚‹æ–‡å­—列(ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ `haystack` ã¨å‘¼ã³ã¾ã™ï¼‰ãŠã‚ˆã³æ¤œç´¢æ–‡å­—列(ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ `needle` ã¨å‘¼ã³ã¾ã™ï¼‰ãŒã‚·ãƒ³ã‚°ãƒ«ãƒã‚¤ãƒˆã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ã“ã®å‰æãŒæº€ãŸã•ã‚Œãªã„å ´åˆã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã®æ¤œç´¢ã¯é€šå¸¸ã€åˆ¥ã®é–¢æ•°ãƒãƒªã‚¢ãƒ³ãƒˆã§æä¾›ã•ã‚Œã¾ã™ã€‚åŒæ§˜ã«ã€UTF-8 関数ãƒãƒªã‚¢ãƒ³ãƒˆã‚’使用ã—ã¦ã„ã¦å…¥åŠ›æ–‡å­—列㌠UTF-8 エンコードã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã§ãªã„å ´åˆã‚‚ã€ä¾‹å¤–ã¯ã‚¹ãƒ­ãƒ¼ã•ã‚Œãšã€çµæžœã¯æœªå®šç¾©ã§ã™ã€‚自動的㪠Unicode æ­£è¦åŒ–ã¯è¡Œã‚ã‚Œã¾ã›ã‚“ãŒã€[normalizeUTF8*()](https://clickhouse.com../functions/string-functions/) 関数を使用ã—ã¦ãれを実行ã§ãã¾ã™ã€‚ + +[一般的ãªæ–‡å­—列関数](string-functions.md)ãŠã‚ˆã³[文字列ã®ç½®æ›é–¢æ•°](string-replace-functions.md)ã¯åˆ¥é€”説明ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## position + +文字列 `haystack` 内ã®ã‚µãƒ–文字列 `needle` ã®ä½ç½®ï¼ˆãƒã‚¤ãƒˆå˜ä½ã€1ã‹ã‚‰é–‹å§‹ï¼‰ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +position(haystack, needle[, start_pos]) +``` + +エイリアス: +- `position(needle IN haystack)` + +**引数** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `start_pos` – 検索開始ä½ç½® (`haystack` ã®1ベースã®ä½ç½®)。[UInt](../data-types/int-uint.md)。オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- サブ文字列ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã®é–‹å§‹ä½ç½®ã‚’ãƒã‚¤ãƒˆå˜ä½ã§è¿”ã—ã€1ã‹ã‚‰ã‚«ã‚¦ãƒ³ãƒˆã—ã¾ã™ã€‚[UInt64](../data-types/int-uint.md)。 +- サブ文字列ãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚[UInt64](../data-types/int-uint.md)。 + +サブ文字列 `needle` ãŒç©ºã®å ´åˆã€æ¬¡ã®ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•ã‚Œã¾ã™: +- `start_pos` ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆï¼š`1` を返㙠+- `start_pos = 0` ã®å ´åˆï¼š`1` を返㙠+- `start_pos >= 1` ã‹ã¤ `start_pos <= length(haystack) + 1` ã®å ´åˆï¼š`start_pos` を返㙠+- ãれ以外ã®å ´åˆï¼š`0` を返㙠+ +åŒã˜ãƒ«ãƒ¼ãƒ«ã¯ã€é–¢æ•° `locate`ã€`positionCaseInsensitive`ã€`positionUTF8`ã€ãŠã‚ˆã³ `positionCaseInsensitiveUTF8` ã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT position('Hello, world!', '!'); +``` + +çµæžœ: + +``` text +┌─position('Hello, world!', '!')─┠+│ 13 │ +└────────────────────────────────┘ +``` + +`start_pos` 引数を使用ã—ãŸä¾‹: + +クエリ: + +``` sql +SELECT + position('Hello, world!', 'o', 1), + position('Hello, world!', 'o', 7) +``` + +çµæžœ: + +``` text +┌─position('Hello, world!', 'o', 1)─┬─position('Hello, world!', 'o', 7)─┠+│ 5 │ 9 │ +└───────────────────────────────────┴───────────────────────────────────┘ +``` + +`needle IN haystack` 構文ã®ä¾‹: + +クエリ: + +```sql +SELECT 6 = position('/' IN s) FROM (SELECT 'Hello/World' AS s); +``` + +çµæžœ: + +```text +┌─equals(6, position(s, '/'))─┠+│ 1 │ +└─────────────────────────────┘ +``` + +空㮠`needle` サブ文字列を使用ã—ãŸä¾‹: + +クエリ: + +``` sql +SELECT + position('abc', ''), + position('abc', '', 0), + position('abc', '', 1), + position('abc', '', 2), + position('abc', '', 3), + position('abc', '', 4), + position('abc', '', 5) +``` + +çµæžœ: + +``` text +┌─position('abc', '')─┬─position('abc', '', 0)─┬─position('abc', '', 1)─┬─position('abc', '', 2)─┬─position('abc', '', 3)─┬─position('abc', '', 4)─┬─position('abc', '', 5)─┠+│ 1 │ 1 │ 1 │ 2 │ 3 │ 4 │ 0 │ +└─────────────────────┴────────────────────────┴────────────────────────┴────────────────────────┴────────────────────────┴────────────────────────┴────────────────────────┘ +``` + +## locate + +[ä½ç½®](#position) ã¨åŒæ§˜ã§ã™ãŒã€å¼•æ•° `haystack` 㨠`needle` ãŒå…¥ã‚Œæ›¿ã‚ã£ã¦ã„ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã®æŒ™å‹•ã¯ ClickHouse ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ä¾å­˜ã—ã¾ã™: +- ãƒãƒ¼ã‚¸ãƒ§ãƒ³ < v24.3 ã§ã¯ã€`locate` ã¯é–¢æ•° `position` ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã‚ã‚Šã€å¼•æ•° `(haystack, needle[, start_pos])` ã‚’å—ã‘付ã‘ã¦ã„ã¾ã—ãŸã€‚ +- ãƒãƒ¼ã‚¸ãƒ§ãƒ³ >= 24.3 ã§ã¯ã€`locate` ã¯å€‹åˆ¥ã®é–¢æ•°ã§ã‚ã‚Š (MySQL ã¨ã®äº’æ›æ€§ã‚’å‘上ã•ã›ã‚‹ãŸã‚)ã€å¼•æ•° `(needle, haystack[, start_pos])` ã‚’å—ã‘付ã‘ã¾ã™ã€‚以å‰ã®æŒ™å‹•ã¯ã€è¨­å®š [function_locate_has_mysql_compatible_argument_order = false](../../operations/settings/settings.md#function-locate-has-mysql-compatible-argument-order) ã§å¾©å…ƒã§ãã¾ã™ã€‚ + +**構文** + +``` sql +locate(needle, haystack[, start_pos]) +``` + +## positionCaseInsensitive + +[ä½ç½®](#position) ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãªãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ + +**例** + +クエリ: + +``` sql +SELECT positionCaseInsensitive('Hello, world!', 'hello'); +``` + +çµæžœ: + +``` text +┌─positionCaseInsensitive('Hello, world!', 'hello')─┠+│ 1 │ +└───────────────────────────────────────────────────┘ +``` + +## positionUTF8 + +[ä½ç½®](#position) ã¨åŒæ§˜ã§ã™ãŒã€`haystack` 㨠`needle` ㌠UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¾ã™ã€‚ + +**例** + +関数 `positionUTF8` ã¯ã€æ–‡å­— `ö`(2 ãƒã‚¤ãƒ³ãƒˆã§è¡¨ã•ã‚Œã‚‹ï¼‰ã‚’æ­£ã—ãå˜ä¸€ã® Unicode コードãƒã‚¤ãƒ³ãƒˆã¨ã—ã¦ã‚«ã‚¦ãƒ³ãƒˆã—ã¾ã™ã€‚ + +クエリ: + +``` sql +SELECT positionUTF8('Motörhead', 'r'); +``` + +çµæžœ: + +``` text +┌─position('Motörhead', 'r')─┠+│ 5 │ +└────────────────────────────┘ +``` + +## positionCaseInsensitiveUTF8 + +[ä½ç½®UTF8](#positionutf8) ã¨åŒæ§˜ã§ã™ãŒã€ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ã«æ¤œç´¢ã—ã¾ã™ã€‚ + +## multiSearchAllPositions + +[ä½ç½®](#position) ã¨åŒæ§˜ã§ã™ãŒã€`haystack` 文字列ã®è¤‡æ•°ã® `needle` サブ文字列ã®ä½ç½®ã‚’ãƒã‚¤ãƒˆå˜ä½ã§é…列ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +:::note +ã™ã¹ã¦ã® `multiSearch*()` 関数ã¯æœ€å¤§ 28 個ã®é¸æŠžè‚¢ã—ã‹ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。 +::: + +**構文** + +``` sql +multiSearchAllPositions(haystack, [needle1, needle2, ..., needleN]) +``` + +**引数** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- サブ文字列ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã®é–‹å§‹ä½ç½®ã‚’ãƒã‚¤ãƒˆå˜ä½ã§é…列ã¨ã—ã¦è¿”ã—ã€1ã‹ã‚‰ã‚«ã‚¦ãƒ³ãƒˆã—ã¾ã™ã€‚ +- サブ文字列ãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT multiSearchAllPositions('Hello, World!', ['hello', '!', 'world']); +``` + +çµæžœ: + +``` text +┌─multiSearchAllPositions('Hello, World!', ['hello', '!', 'world'])─┠+│ [0,13,0] │ +└───────────────────────────────────────────────────────────────────┘ +``` +## multiSearchAllPositionsCaseInsensitive + +[multiSearchAllPositions](#multisearchallpositions) ã¨åŒæ§˜ã§ã™ãŒã€ã‚±ãƒ¼ã‚¹ã‚’無視ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchAllPositionsCaseInsensitive(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- サブ文字列ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã®é–‹å§‹ä½ç½®ã‚’ãƒã‚¤ãƒˆå˜ä½ã§é…列ã¨ã—ã¦è¿”ã—ã€1ã‹ã‚‰ã‚«ã‚¦ãƒ³ãƒˆã—ã¾ã™ã€‚ +- サブ文字列ãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT multiSearchAllPositionsCaseInsensitive('ClickHouse',['c','h']); +``` + +çµæžœ: + +```response +["1","6"] +``` + +## multiSearchAllPositionsUTF8 + +[multiSearchAllPositions](#multisearchallpositions) ã¨åŒæ§˜ã§ã™ãŒã€`haystack` 㨠`needle` サブ文字列㌠UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchAllPositionsUTF8(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ UTF-8 サブ文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- サブ文字列ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã®é–‹å§‹ä½ç½®ã‚’ãƒã‚¤ãƒˆå˜ä½ã§é…列ã¨ã—ã¦è¿”ã—ã€1ã‹ã‚‰ã‚«ã‚¦ãƒ³ãƒˆã—ã¾ã™ã€‚ +- サブ文字列ãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +与ãˆã‚‰ã‚ŒãŸ `ClickHouse` ã‚’ UTF-8 文字列ã¨ã—ã€`C` (`\x43`) 㨠`H` (`\x48`) ã®ä½ç½®ã‚’見ã¤ã‘る。 + +クエリ: + +```sql +SELECT multiSearchAllPositionsUTF8('\x43\x6c\x69\x63\x6b\x48\x6f\x75\x73\x65',['\x43','\x48']); +``` + +çµæžœ: + +```response +["1","6"] +``` + +## multiSearchAllPositionsCaseInsensitiveUTF8 + +[multiSearchAllPositionsUTF8](#multisearchallpositionsutf8) ã¨åŒæ§˜ã§ã™ãŒã€ã‚±ãƒ¼ã‚¹ã‚’無視ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchAllPositionsCaseInsensitiveUTF8(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ UTF-8 サブ文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- サブ文字列ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã®é–‹å§‹ä½ç½®ã‚’ãƒã‚¤ãƒˆå˜ä½ã§é…列ã¨ã—ã¦è¿”ã—ã€1ã‹ã‚‰ã‚«ã‚¦ãƒ³ãƒˆã—ã¾ã™ã€‚ +- サブ文字列ãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +与ãˆã‚‰ã‚ŒãŸ `ClickHouse` ã‚’ UTF-8 文字列ã¨ã—ã€`h` (`\x68`) ã®æ–‡å­—ãŒå˜èªžã«å«ã¾ã‚Œã¦ã„ã‚‹ã‹ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT multiSearchAllPositionsCaseInsensitiveUTF8('\x43\x6c\x69\x63\x6b\x48\x6f\x75\x73\x65',['\x68']); +``` + +çµæžœ: + +```response +["1","6"] +``` + +## multiSearchFirstPosition + +[`position`](#position) ã¨åŒæ§˜ã§ã™ãŒã€`haystack` 文字列ã§è¤‡æ•°ã® `needle` 文字列ã®ã„ãšã‚Œã‹ã«ä¸€è‡´ã™ã‚‹æœ€ã‚‚å·¦ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +関数 [`multiSearchFirstPositionCaseInsensitive`](#multisearchfirstpositioncaseinsensitive)ã€[`multiSearchFirstPositionUTF8`](#multisearchfirstpositionutf8)ã€ãŠã‚ˆã³ [`multiSearchFirstPositionCaseInsensitiveUTF8`](#multisearchfirstpositioncaseinsensitiveutf8) ã¯ã€ã“ã®é–¢æ•°ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãŠã‚ˆã³/ã¾ãŸã¯ UTF-8 ãƒãƒªã‚¢ãƒ³ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchFirstPosition(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `haystack` 文字列ã§è¤‡æ•°ã® `needle` 文字列ã®ã„ãšã‚Œã‹ã«ä¸€è‡´ã™ã‚‹æœ€ã‚‚å·¦ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã€‚ +- 一致ãŒãªã‹ã£ãŸå ´åˆã¯0。 + +**例** + +クエリ: + +```sql +SELECT multiSearchFirstPosition('Hello World',['llo', 'Wor', 'ld']); +``` + +çµæžœ: + +```response +3 +``` + +## multiSearchFirstPositionCaseInsensitive + +[`multiSearchFirstPosition`](#multisearchfirstposition) ã¨åŒæ§˜ã§ã™ãŒã€ã‚±ãƒ¼ã‚¹ã‚’無視ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchFirstPositionCaseInsensitive(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `haystack` 文字列ã§è¤‡æ•°ã® `needle` 文字列ã®ã„ãšã‚Œã‹ã«ä¸€è‡´ã™ã‚‹æœ€ã‚‚å·¦ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã€‚ +- 一致ãŒãªã‹ã£ãŸå ´åˆã¯0。 + +**例** + +クエリ: + +```sql +SELECT multiSearchFirstPositionCaseInsensitive('HELLO WORLD',['wor', 'ld', 'ello']); +``` + +çµæžœ: + +```response +2 +``` + +## multiSearchFirstPositionUTF8 + +[`multiSearchFirstPosition`](#multisearchfirstposition) ã¨åŒæ§˜ã§ã™ãŒã€`haystack` 㨠`needle` ㌠UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchFirstPositionUTF8(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ UTF-8 サブ文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `haystack` 文字列ã§è¤‡æ•°ã® `needle` 文字列ã®ã„ãšã‚Œã‹ã«ä¸€è‡´ã™ã‚‹æœ€ã‚‚å·¦ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã€‚ +- 一致ãŒãªã‹ã£ãŸå ´åˆã¯0。 + +**例** + +UTF-8 文字列 `hello world` ã«ãŠã„ã¦ã€ä¸Žãˆã‚‰ã‚ŒãŸé¸æŠžè‚¢ã®ã„ãšã‚Œã‹ã«ä¸€è‡´ã™ã‚‹å·¦ç«¯ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’見ã¤ã‘ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT multiSearchFirstPositionUTF8('\x68\x65\x6c\x6c\x6f\x20\x77\x6f\x72\x6c\x64',['wor', 'ld', 'ello']); +``` + +çµæžœ: + +```response +2 +``` + +## multiSearchFirstPositionCaseInsensitiveUTF8 + +[`multiSearchFirstPosition`](#multisearchfirstposition) ã¨åŒæ§˜ã§ã™ãŒã€`haystack` 㨠`needle` ㌠UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚Šã€ã‚±ãƒ¼ã‚¹ã‚’無視ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchFirstPositionCaseInsensitiveUTF8(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ UTF-8 サブ文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ケースを無視ã—ã€`haystack` 文字列ã§è¤‡æ•°ã® `needle` 文字列ã®ã„ãšã‚Œã‹ã«ä¸€è‡´ã™ã‚‹æœ€ã‚‚å·¦ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã€‚ +- 一致ãŒãªã‹ã£ãŸå ´åˆã¯0。 + +**例** + +UTF-8 文字列 `HELLO WORLD` ã«ãŠã„ã¦ã€ä¸Žãˆã‚‰ã‚ŒãŸé¸æŠžè‚¢ã®ã„ãšã‚Œã‹ã«ä¸€è‡´ã™ã‚‹å·¦ç«¯ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã‚’見ã¤ã‘ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT multiSearchFirstPositionCaseInsensitiveUTF8('\x48\x45\x4c\x4c\x4f\x20\x57\x4f\x52\x4c\x44',['wor', 'ld', 'ello']); +``` + +çµæžœ: + +```response +2 +``` + +## multiSearchFirstIndex + +文字列 `haystack` 内ã§ã€æœ€ã‚‚左端ã«è¦‹ã¤ã‹ã£ãŸ `needlei` ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `i`(1ã‹ã‚‰é–‹å§‹ï¼‰ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +関数 [`multiSearchFirstIndexCaseInsensitive`](#multisearchfirstindexcaseinsensitive)ã€[`multiSearchFirstIndexUTF8`](#multisearchfirstindexutf8)ã€ãŠã‚ˆã³ [`multiSearchFirstIndexCaseInsensitiveUTF8`](#multisearchfirstindexcaseinsensitiveutf8) ã¯ã€ã“ã®é–¢æ•°ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãŠã‚ˆã³/ã¾ãŸã¯ UTF-8 ãƒãƒªã‚¢ãƒ³ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchFirstIndex(haystack, [needle1, needle2, ..., needleN]) +``` +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最も左端ã«è¦‹ã¤ã‹ã£ãŸé¸æŠžè‚¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ï¼ˆ1ã‹ã‚‰é–‹å§‹ï¼‰ã€‚一致ãŒãªã‹ã£ãŸå ´åˆã¯0。[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT multiSearchFirstIndex('Hello World',['World','Hello']); +``` + +çµæžœ: + +```response +1 +``` + +## multiSearchFirstIndexCaseInsensitive + +文字列 `haystack` 内ã§ã€æœ€ã‚‚左端ã«è¦‹ã¤ã‹ã£ãŸ `needlei` ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `i`(1ã‹ã‚‰é–‹å§‹ï¼‰ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ケースを無視ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchFirstIndexCaseInsensitive(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最も左端ã«è¦‹ã¤ã‹ã£ãŸé¸æŠžè‚¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ï¼ˆ1ã‹ã‚‰é–‹å§‹ï¼‰ã€‚一致ãŒãªã‹ã£ãŸå ´åˆã¯0。[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT multiSearchFirstIndexCaseInsensitive('hElLo WoRlD',['World','Hello']); +``` + +çµæžœ: + +```response +1 +``` + +## multiSearchFirstIndexUTF8 + +文字列 `haystack` 内ã§ã€æœ€ã‚‚左端ã«è¦‹ã¤ã‹ã£ãŸ `needlei` ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `i`(1ã‹ã‚‰é–‹å§‹ï¼‰ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚`haystack` 㨠`needle` ㌠UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchFirstIndexUTF8(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ UTF-8 サブ文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最も左端ã«è¦‹ã¤ã‹ã£ãŸé¸æŠžè‚¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ï¼ˆ1ã‹ã‚‰é–‹å§‹ï¼‰ã€‚一致ãŒãªã‹ã£ãŸå ´åˆã¯0。[UInt8](../data-types/int-uint.md)。 + +**例** + +UTF-8 文字列 `Hello World` を与ãˆã€UTF-8 文字列 `Hello` 㨠`World` ã®æœ€åˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’見ã¤ã‘ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT multiSearchFirstIndexUTF8('\x48\x65\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64',['\x57\x6f\x72\x6c\x64','\x48\x65\x6c\x6c\x6f']); +``` + +çµæžœ: + +```response +1 +``` + +## multiSearchFirstIndexCaseInsensitiveUTF8 + +文字列 `haystack` 内ã§ã€æœ€ã‚‚左端ã«è¦‹ã¤ã‹ã£ãŸ `needlei` ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `i`(1ã‹ã‚‰é–‹å§‹ï¼‰ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚`haystack` 㨠`needle` ㌠UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚Šã€ã‚±ãƒ¼ã‚¹ã‚’無視ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchFirstIndexCaseInsensitiveUTF8(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ UTF-8 サブ文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最も左端ã«è¦‹ã¤ã‹ã£ãŸé¸æŠžè‚¢ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ï¼ˆ1ã‹ã‚‰é–‹å§‹ï¼‰ã€‚一致ãŒãªã‹ã£ãŸå ´åˆã¯0。[UInt8](../data-types/int-uint.md)。 + +**例** + +UTF-8 文字列 `HELLO WORLD` を与ãˆã€UTF-8 文字列 `hello` 㨠`world` ã®æœ€åˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’見ã¤ã‘ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT multiSearchFirstIndexCaseInsensitiveUTF8('\x48\x45\x4c\x4c\x4f\x20\x57\x4f\x52\x4c\x44',['\x68\x65\x6c\x6c\x6f','\x77\x6f\x72\x6c\x64']); +``` + +çµæžœ: + +```response +1 +``` + +## multiSearchAny + +å°‘ãªãã¨ã‚‚1ã¤ã®æ–‡å­—列 `needlei` ãŒæ–‡å­—列 `haystack` ã«ä¸€è‡´ã™ã‚‹å ´åˆã¯1ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +関数 [`multiSearchAnyCaseInsensitive`](#multisearchanycaseinsensitive)ã€[`multiSearchAnyUTF8`](#multisearchanyutf8)ã€ãŠã‚ˆã³ [`multiSearchAnyCaseInsensitiveUTF8`](#multisearchanycaseinsensitiveutf8) ã¯ã€ã“ã®é–¢æ•°ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãŠã‚ˆã³/ã¾ãŸã¯ UTF-8 ãƒãƒªã‚¢ãƒ³ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchAny(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å°‘ãªãã¨ã‚‚1ã¤ã®ä¸€è‡´ãŒã‚ã£ãŸå ´åˆã¯1。 +- å°‘ãªãã¨ã‚‚1ã¤ã®ä¸€è‡´ãŒãªã‹ã£ãŸå ´åˆã¯0。 + +**例** + +クエリ: + +```sql +SELECT multiSearchAny('ClickHouse',['C','H']); +``` + +çµæžœ: + +```response +1 +``` + +## multiSearchAnyCaseInsensitive + +[multiSearchAny](#multisearchany) ã¨åŒæ§˜ã§ã™ãŒã€ã‚±ãƒ¼ã‚¹ã‚’無視ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchAnyCaseInsensitive(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å°‘ãªãã¨ã‚‚1ã¤ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãªä¸€è‡´ãŒã‚ã£ãŸå ´åˆã¯1。 +- å°‘ãªãã¨ã‚‚1ã¤ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãªä¸€è‡´ãŒãªã‹ã£ãŸå ´åˆã¯0。 + +**例** + +クエリ: + +```sql +SELECT multiSearchAnyCaseInsensitive('ClickHouse',['c','h']); +``` + +çµæžœ: + +```response +1 +``` + +## multiSearchAnyUTF8 + +[multiSearchAny](#multisearchany) ã¨åŒæ§˜ã§ã™ãŒã€`haystack` 㨠`needle` サブ文字列㌠UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchAnyUTF8(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ UTF-8 サブ文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å°‘ãªãã¨ã‚‚1ã¤ã®ä¸€è‡´ãŒã‚ã£ãŸå ´åˆã¯1。 +- å°‘ãªãã¨ã‚‚1ã¤ã®ä¸€è‡´ãŒãªã‹ã£ãŸå ´åˆã¯0。 + +**例** + +与ãˆã‚‰ã‚ŒãŸ `ClickHouse` ã‚’ UTF-8 文字列ã¨ã—ã€`C` (`\x43`) ã‚„ `H` (`\x48`) ã®æ–‡å­—ãŒå˜èªžã«å«ã¾ã‚Œã¦ã„ã‚‹ã‹ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT multiSearchAnyUTF8('\x43\x6c\x69\x63\x6b\x48\x6f\x75\x73\x65',['\x43','\x48']); +``` + +çµæžœ: + +```response +1 +``` + +## multiSearchAnyCaseInsensitiveUTF8 + +[multiSearchAnyUTF8](#multisearchanyutf8) ã¨åŒæ§˜ã§ã™ãŒã€ã‚±ãƒ¼ã‚¹ã‚’無視ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiSearchAnyCaseInsensitiveUTF8(haystack, [needle1, needle2, ..., needleN]) +``` + +**パラメータ** + +- `haystack` — 検索ãŒè¡Œã‚れる UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ UTF-8 サブ文字列。[Array](../data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å°‘ãªãã¨ã‚‚1ã¤ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãªä¸€è‡´ãŒã‚ã£ãŸå ´åˆã¯1。 +- å°‘ãªãã¨ã‚‚1ã¤ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãªä¸€è‡´ãŒãªã‹ã£ãŸå ´åˆã¯0。 + +**例** + +与ãˆã‚‰ã‚ŒãŸ `ClickHouse` ã‚’ UTF-8 文字列ã¨ã—ã€`h` (`\x68`) ã®æ–‡å­—ãŒå˜èªžã«å«ã¾ã‚Œã¦ã„ã‚‹ã‹ã‚±ãƒ¼ã‚¹ã‚’無視ã—ã¦ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT multiSearchAnyCaseInsensitiveUTF8('\x43\x6c\x69\x63\x6b\x48\x6f\x75\x73\x65',['\x68']); +``` + +çµæžœ: + +```response +1 +``` + +## match {#match} + +文字列 `haystack` ㌠[re2 æ­£è¦è¡¨ç¾æ§‹æ–‡](https://github.com/google/re2/wiki/Syntax) ã®æ­£è¦è¡¨ç¾ `pattern` ã«ä¸€è‡´ã™ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +一致㯠UTF-8 ã«åŸºã¥ã„ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€`.` 㯠Unicode コードãƒã‚¤ãƒ³ãƒˆ `Â¥` ã«ä¸€è‡´ã—ã€ã“ã®ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆã¯ UTF-8 ã§ã¯2ãƒã‚¤ãƒˆã§è¡¨ã•ã‚Œã¾ã™ã€‚æ­£è¦è¡¨ç¾ã«ã¯ null ãƒã‚¤ãƒˆã‚’å«ã‚ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。`haystack` ã¾ãŸã¯ `pattern` ãŒæœ‰åŠ¹ãª UTF-8 ã§ãªã„å ´åˆã€å‹•ä½œã¯æœªå®šç¾©ã§ã™ã€‚ + +re2 ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå‹•ä½œã¨ã¯ç•°ãªã‚Šã€`.` ã¯æ”¹è¡Œã‚’å«ã‚€ã™ã¹ã¦ã®æ–‡å­—ã«ä¸€è‡´ã—ã¾ã™ã€‚ã“れを無効ã«ã™ã‚‹ã«ã¯ã€ãƒ‘ターンã®å…ˆé ­ã« `(?-s)` を追加ã—ã¦ãã ã•ã„。 + +文字列ã®éƒ¨åˆ†æ–‡å­—列を検索ã—ãŸã„ã ã‘ãªã‚‰ã€[like](#like) ã‚„ [position](#position) 関数を使用ã§ãã¾ã™ã€‚ã“れらã®é–¢æ•°ã¯ã“ã®é–¢æ•°ã‚ˆã‚Šã‚‚ã¯ã‚‹ã‹ã«é«˜é€Ÿã«å‹•ä½œã—ã¾ã™ã€‚ + +**構文** + +```sql +match(haystack, pattern) +``` + +エイリアス: `haystack REGEXP pattern` æ¼”ç®—å­ + +## multiMatchAny + +`match` ã¨åŒæ§˜ã§ã™ãŒã€å°‘ãªãã¨ã‚‚1ã¤ã®ãƒ‘ターンãŒä¸€è‡´ã™ã‚‹å ´åˆã¯1ã‚’è¿”ã—ã€ãã†ã§ãªã„å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +:::note +`multi[Fuzzy]Match*()` ファミリーã®é–¢æ•°ã¯ã€(Vectorscan)[https://github.com/VectorCamp/vectorscan] ライブラリを使用ã—ã¾ã™ã€‚ãã®ãŸã‚ã€vectorscan をサãƒãƒ¼ãƒˆã™ã‚‹ã‚ˆã†ã« ClickHouse ãŒã‚³ãƒ³ãƒ‘イルã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã®ã¿æœ‰åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +ã™ã¹ã¦ã® hyperscan を使用ã™ã‚‹é–¢æ•°ã‚’オフã«ã™ã‚‹ã«ã¯ã€è¨­å®š `SET allow_hyperscan = 0;` を使用ã—ã¾ã™ã€‚ + +vectorscan ã®åˆ¶é™ã«ã‚ˆã‚Šã€`haystack` 文字列ã®é•·ã•ã¯ 232 ãƒã‚¤ãƒˆæœªæº€ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +Hyperscan ã¯ä¸€èˆ¬çš„ã«æ­£è¦è¡¨ç¾æ‹’å¦ã‚µãƒ¼ãƒ“ス(ReDoS)攻撃ã«å¯¾ã—ã¦è„†å¼±ã§ã™ï¼ˆä¾‹: ã“ã“(here)[https://www.usenix.org/conference/usenixsecurity22/presentation/turonova]ã‚„ã“ã“(here)[https://doi.org/10.1007/s10664-021-10033-1]ãŠã‚ˆã³ã“ã“(here)[https://doi.org/10.1145/3236024.3236027]ã‚’å‚照)。æä¾›ã•ã‚Œã‚‹ãƒ‘ターンを慎é‡ã«ç¢ºèªã™ã‚‹ã“ã¨ã‚’ユーザーã«æŽ¨å¥¨ã—ã¾ã™ã€‚ +::: + +ã‚‚ã—複数ã®éƒ¨åˆ†æ–‡å­—列を文字列ã§æ¤œç´¢ã—ãŸã„ã ã‘ãªã‚‰ã€[multiSearchAny](#multisearchany) 関数を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã“ã®é–¢æ•°ã‚ˆã‚Šã‚‚ã¯ã‚‹ã‹ã«é«˜é€Ÿã«å‹•ä½œã—ã¾ã™ã€‚ + +**構文** + +```sql +multiMatchAny(haystack, \[pattern1, pattern2, ..., patternn\]) +``` + +## multiMatchAnyIndex + +`multiMatchAny` ã¨åŒæ§˜ã§ã™ãŒã€haystack ã«ä¸€è‡´ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã„ãšã‚Œã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiMatchAnyIndex(haystack, \[pattern1, pattern2, ..., patternn\]) +``` + +## multiMatchAllIndices + +`multiMatchAny` ã¨åŒæ§˜ã§ã™ãŒã€ä»»æ„ã®é †åºã§ã™ã¹ã¦ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒ haystack ã«ä¸€è‡´ã™ã‚‹é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiMatchAllIndices(haystack, \[pattern1, pattern2, ..., patternn\]) +``` + +## multiFuzzyMatchAny + +`multiMatchAny` ã¨åŒæ§˜ã§ã™ãŒã€å®šæ•°ã®[編集è·é›¢](https://en.wikipedia.org/wiki/Edit_distance)㧠haystack を満ãŸã™ãƒ‘ターンãŒã‚ã‚‹å ´åˆã«1ã‚’è¿”ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ [hyperscan](https://intel.github.io/hyperscan/dev-reference/compilation.html#approximate-matching) ライブラリã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã«ä¾å­˜ã—ã¦ãŠã‚Šã€ã„ãã¤ã‹ã®ã‚³ãƒ¼ãƒŠãƒ¼ã‚±ãƒ¼ã‚¹ã§ã¯é…ããªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚パフォーマンスã¯ç·¨é›†è·é›¢ã®å€¤ã¨ä½¿ç”¨ã•ã‚ŒãŸãƒ‘ターンã«ä¾å­˜ã—ã¾ã™ãŒã€å¸¸ã«éžãƒ•ã‚¡ã‚¸ãƒ¼ãƒãƒªã‚¢ãƒ³ãƒˆã‚ˆã‚Šã‚‚高ã„コストãŒã‹ã‹ã‚Šã¾ã™ã€‚ + +:::note +`multiFuzzyMatch*()` 関数ファミリー㯠UTF-8 æ­£è¦è¡¨ç¾ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“(ãれらをãƒã‚¤ãƒˆã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¨ã—ã¦å‡¦ç†ã—ã¾ã™ï¼‰ã“れ㯠hyperscan ã®åˆ¶é™ã«ã‚ˆã‚‹ã‚‚ã®ã§ã™ã€‚ +::: + +**構文** + +```sql +multiFuzzyMatchAny(haystack, distance, \[pattern1, pattern2, ..., patternn\]) +``` + +## multiFuzzyMatchAnyIndex + +`multiFuzzyMatchAny` ã¨åŒæ§˜ã§ã™ãŒã€å›ºå®šã®ç·¨é›†è·é›¢å†…㧠haystack ã«ä¸€è‡´ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã„ãšã‚Œã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiFuzzyMatchAnyIndex(haystack, distance, \[pattern1, pattern2, ..., patternn\]) +``` + +## multiFuzzyMatchAllIndices + +`multiFuzzyMatchAny` ã¨åŒæ§˜ã§ã™ãŒã€å®šæ•°ã®ç·¨é›†è·é›¢å†…ã§ä¸€è‡´ã™ã‚‹ã™ã¹ã¦ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’ä»»æ„ã®é †åºã§è¿”ã™é…列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +multiFuzzyMatchAllIndices(haystack, distance, \[pattern1, pattern2, ..., patternn\]) +``` + +## extract + +文字列ã®æ­£è¦è¡¨ç¾ã«ä¸€è‡´ã™ã‚‹æœ€åˆã®éƒ¨åˆ†æ–‡å­—列を返ã—ã¾ã™ã€‚ +`haystack` ㌠`pattern` æ­£è¦è¡¨ç¾ã«ä¸€è‡´ã—ãªã„å ´åˆã€ç©ºã®æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +æ­£è¦è¡¨ç¾ã«ã‚­ãƒ£ãƒ—ãƒãƒ£ã‚°ãƒ«ãƒ¼ãƒ—ãŒã‚ã‚‹å ´åˆã€ã“ã®é–¢æ•°ã¯å…¥åŠ›æ–‡å­—列を最åˆã®ã‚­ãƒ£ãƒ—ãƒãƒ£ã‚°ãƒ«ãƒ¼ãƒ—ã«å¯¾ã—ã¦ä¸€è‡´ã•ã›ã¾ã™ã€‚ + +**構文** + +```sql +extract(haystack, pattern) +``` + +**引数** + +- `haystack` — 入力文字列。[String](../data-types/string.md)。 +- `pattern` — [re2 æ­£è¦è¡¨ç¾æ§‹æ–‡](https://github.com/google/re2/wiki/Syntax)を使用ã—ãŸæ­£è¦è¡¨ç¾ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- haystack 文字列ã®æ­£è¦è¡¨ç¾ã®æœ€åˆã®ä¸€è‡´ã€‚[String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT extract('number: 1, number: 2, number: 3', '\\d+') AS result; +``` + +çµæžœ: + +```response +┌─result─┠+│ 1 │ +└────────┘ +``` + +## extractAll + +文字列ã®æ­£è¦è¡¨ç¾ã®ã™ã¹ã¦ã®ä¸€è‡´ã‚’å«ã‚€é…列を返ã—ã¾ã™ã€‚`haystack` ㌠`pattern` æ­£è¦è¡¨ç¾ã«ä¸€è‡´ã—ãªã„å ´åˆã€ç©ºã®æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +サブパターンã«é–¢ã™ã‚‹å‹•ä½œã¯ã€é–¢æ•°[`extract`](#extract)ã¨åŒã˜ã§ã™ã€‚ + +**構文** + +```sql +extractAll(haystack, pattern) +``` + +**引数** + +- `haystack` — 入力文字列。[String](../data-types/string.md)。 +- `pattern` — [re2 æ­£è¦è¡¨ç¾æ§‹æ–‡](https://github.com/google/re2/wiki/Syntax)を使用ã—ãŸæ­£è¦è¡¨ç¾ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- haystack 文字列ã®æ­£è¦è¡¨ç¾ã®ä¸€è‡´ã®é…列。[Array](../data-types/array.md)([String](../data-types/string.md))。 + +**例** + +クエリ: + +```sql +SELECT extractAll('number: 1, number: 2, number: 3', '\\d+') AS result; +``` + +çµæžœ: + +```response +┌─result────────┠+│ ['1','2','3'] │ +└───────────────┘ +``` + +## extractAllGroupsHorizontal + +`haystack` 文字列ã®ã™ã¹ã¦ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’æ­£è¦è¡¨ç¾ `pattern` を使用ã—ã¦ãƒžãƒƒãƒãƒ³ã‚°ã—ã€ã™ã¹ã¦ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«ä¸€è‡´ã™ã‚‹ãƒ•ãƒ©ã‚°ãƒ¡ãƒ³ãƒˆã‚’é…列ã§è¿”ã—ã¾ã™ã€‚é…列ã®æœ€åˆã®è¦ç´ ã¯ã€æœ€åˆã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ã™ã¹ã¦ã®ä¸€è‡´ã‚’å«ã¿ã€äºŒã¤ç›®ã®é…列ã¯äºŒç•ªç›®ã®ã‚°ãƒ«ãƒ¼ãƒ—ãŒä¸€è‡´ã—ãŸãƒ•ãƒ©ã‚°ãƒ¡ãƒ³ãƒˆã‚’ã€ãã‚Œãžã‚Œã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ãƒ•ãƒ©ã‚°ãƒ¡ãƒ³ãƒˆãŒå«ã¾ã‚Œã¦ã„る。 + +ã“ã®é–¢æ•°ã¯ [extractAllGroupsVertical](#extractallgroupsvertical) よりもé…ã„ã§ã™ã€‚ + +**構文** + +``` sql +extractAllGroupsHorizontal(haystack, pattern) +``` + +**引数** + +- `haystack` — 入力文字列。[String](../data-types/string.md)。 +- `pattern` — [re2 æ­£è¦è¡¨ç¾æ§‹æ–‡](https://github.com/google/re2/wiki/Syntax)を使用ã—ãŸæ­£è¦è¡¨ç¾ã€‚括弧ã§å›²ã¾ã‚ŒãŸã‚°ãƒ«ãƒ¼ãƒ—ã‚’å«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`pattern` ã«ã‚°ãƒ«ãƒ¼ãƒ—ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 一致ã®é…列ã®é…列。[Array](../data-types/array.md)。 + +:::note +`haystack` ㌠`pattern` æ­£è¦è¡¨ç¾ã«ä¸€è‡´ã—ãªã„å ´åˆã€ç©ºã®é…列ã®é…列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +::: + +**例** + +``` sql +SELECT extractAllGroupsHorizontal('abc=111, def=222, ghi=333', '("[^"]+"|\\w+)=("[^"]+"|\\w+)'); +``` + +çµæžœ: + +``` text +┌─extractAllGroupsHorizontal('abc=111, def=222, ghi=333', '("[^"]+"|\\w+)=("[^"]+"|\\w+)')─┠+│ [['abc','def','ghi'],['111','222','333']] │ +└──────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## extractGroups + +指定ã•ã‚ŒãŸå…¥åŠ›æ–‡å­—列を与ãˆã‚‰ã‚ŒãŸæ­£è¦è¡¨ç¾ã§ãƒžãƒƒãƒãƒ³ã‚°ã—ã€ä¸€è‡´ã™ã‚‹é…列ã®é…列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +extractGroups(haystack, pattern) +``` + +**引数** + +- `haystack` — 入力文字列。[String](../data-types/string.md)。 +- `pattern` — [re2 æ­£è¦è¡¨ç¾æ§‹æ–‡](https://github.com/google/re2/wiki/Syntax)を使用ã—ãŸæ­£è¦è¡¨ç¾ã€‚括弧ã§å›²ã¾ã‚ŒãŸã‚°ãƒ«ãƒ¼ãƒ—ã‚’å«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`pattern` ã«ã‚°ãƒ«ãƒ¼ãƒ—ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 一致ã®é…列ã®é…列。[Array](../data-types/array.md)。 + +**例** + +``` sql +SELECT extractGroups('hello abc=111 world', '("[^"]+"|\\w+)=("[^"]+"|\\w+)') AS result; +``` + +çµæžœ: + +``` text +┌─result────────┠+│ ['abc','111'] │ +└───────────────┘ +``` + +## extractAllGroupsVertical + +`haystack` 文字列ã®ã™ã¹ã¦ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’æ­£è¦è¡¨ç¾ `pattern` を使用ã—ã¦ãƒžãƒƒãƒãƒ³ã‚°ã—ã€é…列ã§è¿”ã—ã¾ã™ã€‚ã“ã®é…列ã®å„è¦ç´ ã«ã¯ã€`haystack` ã«å‡ºç¾é †ãŒå«ã¾ã‚Œã¦ã„ã‚‹å„グループã«ç”±æ¥ã™ã‚‹ãƒ•ãƒ©ã‚°ãƒ¡ãƒ³ãƒˆãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +extractAllGroupsVertical(haystack, pattern) +``` + +**引数** + +- `haystack` — 入力文字列。[String](../data-types/string.md)。 +- `pattern` — [re2 æ­£è¦è¡¨ç¾æ§‹æ–‡](https://github.com/google/re2/wiki/Syntax)を使用ã—ãŸæ­£è¦è¡¨ç¾ã€‚括弧ã§å›²ã¾ã‚ŒãŸã‚°ãƒ«ãƒ¼ãƒ—ã‚’å«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`pattern` ã«ã‚°ãƒ«ãƒ¼ãƒ—ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 一致ã®é…列ã®é…列。[Array](../data-types/array.md)。 + +:::note +`haystack` ㌠`pattern` æ­£è¦è¡¨ç¾ã«ä¸€è‡´ã—ãªã„å ´åˆã€ç©ºã®é…列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +::: + +**例** + +``` sql +SELECT extractAllGroupsVertical('abc=111, def=222, ghi=333', '("[^"]+"|\\w+)=("[^"]+"|\\w+)'); +``` + +çµæžœ: + +``` text +┌─extractAllGroupsVertical('abc=111, def=222, ghi=333', '("[^"]+"|\\w+)=("[^"]+"|\\w+)')─┠+│ [['abc','111'],['def','222'],['ghi','333']] │ +└────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## like + +文字列 `haystack` ㌠LIKE å¼ `pattern` ã«ä¸€è‡´ã™ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +LIKE å¼ã¯ã€é€šå¸¸ã®æ–‡å­—ã¨æ¬¡ã®ãƒ¡ã‚¿ã‚·ãƒ³ãƒœãƒ«ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- `%` ã¯ä»»æ„ã®æ•°ã®ãŠã‚ˆã³ä»»æ„ã®æ–‡å­—を示ã—ã¾ã™ï¼ˆ0文字をå«ã‚€ï¼‰ã€‚ +- `_` ã¯1ã¤ã®ä»»æ„ã®æ–‡å­—を示ã—ã¾ã™ã€‚ +- `\` ã¯ãƒªãƒ†ãƒ©ãƒ« `%`ã€`_` ãŠã‚ˆã³ `\` をエスケープã—ã¾ã™ã€‚ + +一致㯠UTF-8 ã«åŸºã¥ã„ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€`_` 㯠Unicode コードãƒã‚¤ãƒ³ãƒˆ `Â¥` ã«ä¸€è‡´ã—ã€ã“ã®ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆã¯ UTF-8 ã§ã¯2ãƒã‚¤ãƒˆã§è¡¨ã•ã‚Œã¾ã™ã€‚ + +`haystack` ã¾ãŸã¯ LIKE å¼ãŒæœ‰åŠ¹ãª UTF-8 ã§ãªã„å ´åˆã€å‹•ä½œã¯æœªå®šç¾©ã§ã™ã€‚ + +自動的㪠Unicode æ­£è¦åŒ–ã¯è¡Œã‚ã‚Œã¾ã›ã‚“ã€[normalizeUTF8*()](https://clickhouse.com../functions/string-functions/) 関数を使用ã—ã¦ãã ã•ã„。 + +リテラル `%`ã€`_` ãŠã‚ˆã³ `\`(LIKE メタ文字)ã«å¯¾ã—ã¦ã¯ã€ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ï¼š`\%`ã€`\_` ãŠã‚ˆã³ `\\` ã‚’å‰ç½®ã—ã¾ã™ã€‚ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã¯ã€`%`ã€`_` ã¾ãŸã¯ `\` 以外ã®æ–‡å­—ã«å‰ç½®ã•ã‚Œã‚‹å ´åˆã€ãã®ç‰¹åˆ¥ãªæ„味を失ã„ã¾ã™ï¼ˆã¤ã¾ã‚Šã€æ–‡å­—通りã«è§£é‡ˆã•ã‚Œã¾ã™ï¼‰ã€‚クリックãƒã‚¦ã‚¹ã§ã¯ã€[文字列ã®](../syntax.md#string)ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’引用ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„ã€ãã®ãŸã‚実際㫠`\\%`ã€`\\_` ãŠã‚ˆã³ `\\` を書ãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +LIKE å¼ãŒ `%needle%` ã®å½¢å¼ã®å ´åˆã€é–¢æ•°ã¯ `position` 関数ã¨åŒã˜ã‚¹ãƒ”ードã§å‹•ä½œã—ã¾ã™ã€‚ä»–ã®ã™ã¹ã¦ã® LIKE å¼ã¯ã€å†…部的ã«æ­£è¦è¡¨ç¾ã«å¤‰æ›ã•ã‚Œã€`match` 関数ã¨åŒæ§˜ã®é€Ÿåº¦ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +like(haystack, pattern) +``` + +エイリアス: `haystack LIKE pattern`(演算å­ï¼‰ + +## notLike {#notlike} + +`like` ã¨åŒæ§˜ã§ã™ãŒã€çµæžœã‚’å¦å®šã—ã¾ã™ã€‚ + +エイリアス: `haystack NOT LIKE pattern`(演算å­ï¼‰ + +## ilike + +`like` ã¨åŒæ§˜ã§ã™ãŒã€ã‚±ãƒ¼ã‚¹ã‚’無視ã—ã¾ã™ã€‚ + +エイリアス: `haystack ILIKE pattern`(演算å­ï¼‰ + +## notILike + +`ilike` ã¨åŒæ§˜ã§ã™ãŒã€çµæžœã‚’å¦å®šã—ã¾ã™ã€‚ + +エイリアス: `haystack NOT ILIKE pattern`(演算å­ï¼‰ + +## ngramDistance + +`haystack` 文字列㨠`needle` 文字列㮠4-gram è·é›¢ã‚’計算ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€äºŒã¤ã®4-gram マルãƒã‚»ãƒƒãƒˆã®å¯¾ç§°å·®ã‚’カウントã—ã€ãれをãれらã®çµ„ã®å’Œã§æ­£è¦åŒ–ã—ã¾ã™ã€‚[Float32](../data-types/float.md/#float32-float64) ã‚’è¿”ã—ã¾ã™ã€‚値ã¯0ã‹ã‚‰1ã¾ã§ã§ã™ã€‚çµæžœãŒå°ã•ã‘ã‚Œã°å°ã•ã„ã»ã©ã€æ–‡å­—列ã¯äº’ã„ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +関数 [`ngramDistanceCaseInsensitive`](#ngramdistancecaseinsensitive)ã€[`ngramDistanceUTF8`](#ngramdistanceutf8)ã€[`ngramDistanceCaseInsensitiveUTF8`](#ngramdistancecaseinsensitiveutf8) ã¯ã€ã“ã®é–¢æ•°ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãŠã‚ˆã³/ã¾ãŸã¯ UTF-8 ãƒãƒªã‚¢ãƒ³ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚ + +**構文** + +```sql +ngramDistance(haystack, needle) +``` + +**パラメータ** + +- `haystack`: 第一ã®æ¯”較文字列。[String literal](../syntax#string) +- `needle`: 第二ã®æ¯”較文字列。[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 二ã¤ã®æ–‡å­—列間ã®é¡žä¼¼åº¦ã‚’表ã™å€¤ã€0ã‹ã‚‰1ã®é–“。[Float32](../data-types/float.md/#float32-float64) + +**実装ã®è©³ç´°** + +ã“ã®é–¢æ•°ã¯ã€å®šæ•° `needle` ã¾ãŸã¯ `haystack` ã®å¼•æ•°ãŒ32Kbを超ãˆã‚‹å ´åˆã€ä¾‹å¤–をスローã—ã¾ã™ã€‚éžå®šæ•° `haystack` ã¾ãŸã¯ `needle` ã®å¼•æ•°ãŒ32Kbを超ãˆã‚‹å ´åˆã€è·é›¢ã¯å¸¸ã«1ã«ãªã‚Šã¾ã™ã€‚ + +**例** + +二ã¤ã®æ–‡å­—列ãŒäº’ã„ã«ä¼¼ã¦ã„ã‚Œã°ä¼¼ã¦ã„ã‚‹ã»ã©ã€çµæžœã¯0ã«è¿‘ããªã‚Šã¾ã™ï¼ˆåŒä¸€ã®å ´åˆï¼‰ã€‚ + +クエリ: + +```sql +SELECT ngramDistance('ClickHouse','ClickHouse!'); +``` + +çµæžœ: + +```response +0.06666667 +``` + +二ã¤ã®æ–‡å­—列ãŒäº’ã„ã«ä¼¼ã¦ã„ãªã‘ã‚Œã°ä¼¼ã¦ã„ãªã„ã»ã©ã€çµæžœã¯å¤§ãããªã‚Šã¾ã™ã€‚ + +クエリ: + +```sql +SELECT ngramDistance('ClickHouse','House'); +``` + +çµæžœ: + +```response +0.5555556 +``` + +## ngramDistanceCaseInsensitive + +[ngramDistance](#ngramdistance) ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æä¾›ã—ã¾ã™ã€‚ + +**構文** + +```sql +ngramDistanceCaseInsensitive(haystack, needle) +``` + +**パラメータ** + +- `haystack`: 第一ã®æ¯”較文字列。[String literal](../syntax#string) +- `needle`: 第二ã®æ¯”較文字列。[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 二ã¤ã®æ–‡å­—列間ã®é¡žä¼¼åº¦ã‚’表ã™å€¤ã€0ã‹ã‚‰1ã®é–“。[Float32](../data-types/float.md/#float32-float64) + +**例** + +[ngramDistance](#ngramdistance) を使用ã™ã‚‹ã¨ã€ã‚±ãƒ¼ã‚¹ã®é•ã„ãŒé¡žä¼¼åº¦ã®å€¤ã«å½±éŸ¿ã—ã¾ã™: + +クエリ: + +```sql +SELECT ngramDistance('ClickHouse','clickhouse'); +``` + +çµæžœ: + +```response +0.71428573 +``` + +[ngramDistanceCaseInsensitive](#ngramdistancecaseinsensitive) を使用ã™ã‚‹ã¨ã€ã‚±ãƒ¼ã‚¹ã¯ç„¡è¦–ã•ã‚Œã‚‹ãŸã‚ã€ã‚±ãƒ¼ã‚¹ã ã‘ãŒç•°ãªã‚‹åŒä¸€ã®æ–‡å­—列ã¯ä½Žã„類似度値を返ã—ã¾ã™: + +クエリ: + +```sql +SELECT ngramDistanceCaseInsensitive('ClickHouse','clickhouse'); +``` + +çµæžœ: + +```response +0 +``` + +## ngramDistanceUTF8 + +[ngramDistance](#ngramdistance) ã® UTF-8 ãƒãƒªã‚¢ãƒ³ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚`needle` 㨠`haystack` 文字列㌠UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +ngramDistanceUTF8(haystack, needle) +``` + +**パラメータ** + +- `haystack`: 第一㮠UTF-8 エンコードã•ã‚ŒãŸæ¯”較文字列。[String literal](../syntax#string) +- `needle`: 第二㮠UTF-8 エンコードã•ã‚ŒãŸæ¯”較文字列。[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 二ã¤ã®æ–‡å­—列間ã®é¡žä¼¼åº¦ã‚’表ã™å€¤ã€0ã‹ã‚‰1ã®é–“。[Float32](../data-types/float.md/#float32-float64) + +**例** + +クエリ: + +```sql +SELECT ngramDistanceUTF8('abcde','cde'); +``` + +çµæžœ: + +```response +0.5 +``` + +## ngramDistanceCaseInsensitiveUTF8 + +[ngramDistanceUTF8](#ngramdistanceutf8) ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æä¾›ã—ã¾ã™ã€‚ + +**構文** + +```sql +ngramDistanceCaseInsensitiveUTF8(haystack, needle) +``` + +**パラメータ** + +- `haystack`: 第一㮠UTF-8 エンコードã•ã‚ŒãŸæ¯”較文字列。[String literal](../syntax#string) +- `needle`: 第二㮠UTF-8 エンコードã•ã‚ŒãŸæ¯”較文字列。[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 二ã¤ã®æ–‡å­—列間ã®é¡žä¼¼åº¦ã‚’表ã™å€¤ã€0ã‹ã‚‰1ã®é–“。[Float32](../data-types/float.md/#float32-float64) + +**例** + +クエリ: + +```sql +SELECT ngramDistanceCaseInsensitiveUTF8('abcde','CDE'); +``` + +çµæžœ: + +```response +0.5 +``` + +## ngramSearch + +`ngramDistance` ã«ä¼¼ã¦ã„ã¾ã™ãŒã€`needle` 文字列㨠`haystack` 文字列ã®éžå¯¾ç§°å·®ã‚’計算ã—ã¾ã™ã€‚ã™ãªã‚ã¡ã€needle ã® n-gram ã®æ•°ã‹ã‚‰å…±é€šã® n-gram ã®æ•°ã‚’引ãã€`needle` n-gram ã®æ•°ã§æ­£è¦åŒ–ã—ã¾ã™ã€‚[Float32](../data-types/float.md/#float32-float64) ã‚’è¿”ã—ã¾ã™ã€‚値ã¯0ã‹ã‚‰1ã®é–“ã§ã™ã€‚çµæžœãŒå¤§ãã„ã»ã©ã€`needle` ㌠`haystack` ã«å«ã¾ã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ãƒ•ã‚¡ã‚¸ãƒ¼æ–‡å­—列検索ã«ä¾¿åˆ©ã§ã™ã€‚ã¾ãŸã€[`soundex`](../../sql-reference/functions/string-functions#soundex) 関数もå‚ç…§ã—ã¦ãã ã•ã„。 + +関数 [`ngramSearchCaseInsensitive`](#ngramsearchcaseinsensitive)ã€[`ngramSearchUTF8`](#ngramsearchutf8)ã€[`ngramSearchCaseInsensitiveUTF8`](#ngramsearchcaseinsensitiveutf8) ã¯ã€ã“ã®é–¢æ•°ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãŠã‚ˆã³/ã¾ãŸã¯ UTF-8 ãƒãƒªã‚¢ãƒ³ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚ + +**構文** + +```sql +ngramSearch(haystack, needle) +``` + +**パラメータ** + +- `haystack`: 第一ã®æ¯”較文字列。[String literal](../syntax#string) +- `needle`: 第二ã®æ¯”較文字列。[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `needle` ㌠`haystack` ã«å«ã¾ã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ã‚’表ã™å€¤ã€0ã‹ã‚‰1ã®é–“。[Float32](../data-types/float.md/#float32-float64) + +**実装ã®è©³ç´°** + +:::note +UTF-8 ãƒãƒªã‚¢ãƒ³ãƒˆã¯3-gramè·é›¢ã‚’使用ã—ã¾ã™ã€‚ã“れらã¯å®Œå…¨ã«å…¬å¹³ãªn-gramè·é›¢ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ç§ãŸã¡ã¯ n-gram ã‚’ãƒãƒƒã‚·ãƒ¥ã™ã‚‹ãŸã‚ã«2ãƒã‚¤ãƒˆé•·ã®ãƒãƒƒã‚·ãƒ¥ã‚’使ã„ã€ãã‚Œã‹ã‚‰ã“れらã®ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ル間ã®ï¼ˆéžï¼‰å¯¾ç§°å·®ã‚’計算ã—ã¾ã™ - è¡çªãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚UTF-8ケースインセンシティブフォーマットã§ã¯ã€`tolower` 関数を公正ã«ä½¿ç”¨ã—ã¦ã„ã¾ã›ã‚“ - å„コードãƒã‚¤ãƒ³ãƒˆãƒã‚¤ãƒˆã®5番目ビット(0ã‹ã‚‰ã‚¹ã‚¿ãƒ¼ãƒˆï¼‰ã‚’ã€ãƒã‚¤ãƒˆãŒ1ã¤ä»¥ä¸Šã‚ã‚‹å ´åˆã€0ã‹ã‚‰å§‹ã¾ã‚‹ãƒ“ットをゼロã«ã—ã¾ã™ - ã“ã‚Œã¯ãƒ©ãƒ†ãƒ³èªžã¨ã»ã¨ã‚“ã©ã™ã¹ã¦ã®ã‚­ãƒªãƒ«æ–‡å­—ã«å¯¾ã—ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT ngramSearch('Hello World','World Hello'); +``` + +çµæžœ: + +```response +0.5 +``` + +## ngramSearchCaseInsensitive + +[ngramSearch](#ngramsearch) ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æä¾›ã—ã¾ã™ã€‚ + +**構文** + +```sql +ngramSearchCaseInsensitive(haystack, needle) +``` + +**パラメータ** + +- `haystack`: 第一ã®æ¯”較文字列。[String literal](../syntax#string) +- `needle`: 第二ã®æ¯”較文字列。[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `needle` ㌠`haystack` ã«å«ã¾ã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ã‚’表ã™å€¤ã€0ã‹ã‚‰1ã®é–“。[Float32](../data-types/float.md/#float32-float64) + +The bigger the result is, the more likely `needle` is in the `haystack`. + +**例** + +クエリ: + +```sql +SELECT ngramSearchCaseInsensitive('Hello World','hello'); +``` + +çµæžœ: + +```response +1 +``` + +## ngramSearchUTF8 + +[ngramSearch](#ngramsearch) ã® UTF-8 ãƒãƒªã‚¢ãƒ³ãƒˆã‚’æä¾›ã—ã€`needle` 㨠`haystack` ㌠UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +ngramSearchUTF8(haystack, needle) +``` + +**パラメータ** + +- `haystack`: 第一㮠UTF-8 エンコードã•ã‚ŒãŸæ¯”較文字列。[String literal](../syntax#string) +- `needle`: 第二㮠UTF-8 エンコードã•ã‚ŒãŸæ¯”較文字列。[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `needle` ㌠`haystack` ã«å«ã¾ã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ã‚’表ã™å€¤ã€0ã‹ã‚‰1ã®é–“。[Float32](../data-types/float.md/#float32-float64) + +The bigger the result is, the more likely `needle` is in the `haystack`. + +**例** + +クエリ: + +```sql +SELECT ngramSearchUTF8('абвгдеёжз', 'гдеёзд'); +``` + +çµæžœ: + +```response +0.5 +``` + +## ngramSearchCaseInsensitiveUTF8 + +[ngramSearchUTF8](#ngramsearchutf8) ã®ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æä¾›ã—ã€`needle` 㨠`haystack` ㌠UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +ngramSearchCaseInsensitiveUTF8(haystack, needle) +``` + +**パラメータ** + +- `haystack`: 第一㮠UTF-8 エンコードã•ã‚ŒãŸæ¯”較文字列。[String literal](../syntax#string) +- `needle`: 第二㮠UTF-8 エンコードã•ã‚ŒãŸæ¯”較文字列。[String literal](../syntax#string) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `needle` ㌠`haystack` ã«å«ã¾ã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ã‚’表ã™å€¤ã€0ã‹ã‚‰1ã®é–“。[Float32](../data-types/float.md/#float32-float64) + +The bigger the result is, the more likely `needle` is in the `haystack`. + +**例** + +クエリ: + +```sql +SELECT ngramSearchCaseInsensitiveUTF8('абвГДЕёжз', 'ÐбвгдЕÐжз'); +``` + +çµæžœ: + +```response +0.57142854 +``` + +## countSubstrings + +サブ文字列 `needle` ãŒæ–‡å­—列 `haystack` ã«ã©ã‚Œã»ã©é »ç¹ã«å‡ºç¾ã™ã‚‹ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +関数 [`countSubstringsCaseInsensitive`](#countsubstringscaseinsensitive) ãŠã‚ˆã³ [`countSubstringsCaseInsensitiveUTF8`](#countsubstringscaseinsensitiveutf8) ã¯ã€ãã‚Œãžã‚Œã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ãŠã‚ˆã³ã‚±ãƒ¼ã‚¹ã‚¤ãƒ³ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ– + UTF-8 ãƒãƒªã‚¢ãƒ³ãƒˆã‚’æä¾›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +countSubstrings(haystack, needle[, start_pos]) +``` + +**引数** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `start_pos` – 検索開始ä½ç½® (`haystack` ã®1ベースã®ä½ç½®)。[UInt](../data-types/int-uint.md)。オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 出ç¾å›žæ•°ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT countSubstrings('aaaa', 'aa'); +``` + +çµæžœ: + +``` text +┌─countSubstrings('aaaa', 'aa')─┠+│ 2 │ +└───────────────────────────────┘ +``` + +`start_pos` 引数を使用ã—ãŸä¾‹: + +```sql +SELECT countSubstrings('abc___abc', 'abc', 4); +``` + +çµæžœ: + +``` text +┌─countSubstrings('abc___abc', 'abc', 4)─┠+│ 1 │ +└────────────────────────────────────────┘ +``` +## countSubstringsCaseInsensitive + +サブ文字列 `needle` ãŒæ–‡å­—列 `haystack` ã«ã©ã‚Œã»ã©é »ç¹ã«å‡ºç¾ã™ã‚‹ã‹ã‚’è¿”ã—ã¾ã™ã€‚ケースを無視ã—ã¾ã™ã€‚ + +**構文** + +``` sql +countSubstringsCaseInsensitive(haystack, needle[, start_pos]) +``` + +**引数** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `start_pos` – 検索開始ä½ç½® (`haystack` ã®1ベースã®ä½ç½®)。[UInt](../data-types/int-uint.md)。オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 出ç¾å›žæ•°ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT countSubstringsCaseInsensitive('AAAA', 'aa'); +``` + +çµæžœ: + +``` text +┌─countSubstringsCaseInsensitive('AAAA', 'aa')─┠+│ 2 │ +└──────────────────────────────────────────────┘ +``` + +`start_pos` 引数を使用ã—ãŸä¾‹: + +クエリ: + +```sql +SELECT countSubstringsCaseInsensitive('abc___ABC___abc', 'abc', 4); +``` + +çµæžœ: + +``` text +┌─countSubstringsCaseInsensitive('abc___ABC___abc', 'abc', 4)─┠+│ 2 │ +└─────────────────────────────────────────────────────────────┘ +``` + +## countSubstringsCaseInsensitiveUTF8 + +サブ文字列 `needle` ãŒæ–‡å­—列 `haystack` ã«ã©ã‚Œã»ã©é »ç¹ã«å‡ºç¾ã™ã‚‹ã‹ã‚’è¿”ã—ã¾ã™ã€‚ケースを無視ã—ã€`haystack` ㌠UTF-8 文字列ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¾ã™ã€‚ + +**構文** + +``` sql +countSubstringsCaseInsensitiveUTF8(haystack, needle[, start_pos]) +``` + +**引数** + +- `haystack` — UTF-8 文字列ã§è¡Œã‚れる検索。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹ã‚µãƒ–文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `start_pos` – 検索開始ä½ç½® (`haystack` ã®1ベースã®ä½ç½®)。[UInt](../data-types/int-uint.md)。オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 出ç¾å›žæ•°ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT countSubstringsCaseInsensitiveUTF8('ложка, кошка, картошка', 'КÐ'); +``` + +çµæžœ: + +``` text +┌─countSubstringsCaseInsensitiveUTF8('ложка, кошка, картошка', 'КÐ')─┠+│ 4 │ +└────────────────────────────────────────────────────────────────────┘ +``` + +`start_pos` 引数を使用ã—ãŸä¾‹: + +クエリ: + +```sql +SELECT countSubstringsCaseInsensitiveUTF8('ложка, кошка, картошка', 'КÐ', 13); +``` + +çµæžœ: + +``` text +┌─countSubstringsCaseInsensitiveUTF8('ложка, кошка, картошка', 'КÐ', 13)─┠+│ 2 │ +└────────────────────────────────────────────────────────────────────────┘ +``` + +## countMatches + +`haystack` ã§æ­£è¦è¡¨ç¾ `pattern` ãŒä¸€è‡´ã™ã‚‹å›žæ•°ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +countMatches(haystack, pattern) +``` + +**引数** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `pattern` — [re2 æ­£è¦è¡¨ç¾æ§‹æ–‡](https://github.com/google/re2/wiki/Syntax) を使用ã—ãŸæ­£è¦è¡¨ç¾ã€‚[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 一致ã®å›žæ•°ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +``` sql +SELECT countMatches('foobar.com', 'o+'); +``` + +çµæžœ: + +``` text +┌─countMatches('foobar.com', 'o+')─┠+│ 2 │ +└──────────────────────────────────┘ +``` + +``` sql +SELECT countMatches('aaaa', 'aa'); +``` + +çµæžœ: + +``` text +┌─countMatches('aaaa', 'aa')────┠+│ 2 │ +└───────────────────────────────┘ +``` + +## countMatchesCaseInsensitive + +æ­£è¦è¡¨ç¾ `pattern` ㌠`haystack` ã«ä¸€è‡´ã™ã‚‹å›žæ•°ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—ã®åŒºåˆ¥ã¯ã—ã¾ã›ã‚“。 + +**構文** + +``` sql +countMatchesCaseInsensitive(haystack, pattern) +``` + +**引数** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `pattern` — [re2 æ­£è¦è¡¨ç¾æ§‹æ–‡](https://github.com/google/re2/wiki/Syntax) を使用ã—ãŸæ­£è¦è¡¨ç¾ã€‚[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 一致ã®å›žæ•°ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT countMatchesCaseInsensitive('AAAA', 'aa'); +``` + +çµæžœ: + +``` text +┌─countMatchesCaseInsensitive('AAAA', 'aa')────┠+│ 2 │ +└──────────────────────────────────────────────┘ +``` + +## regexpExtract + +`haystack` ã§æ­£è¦è¡¨ç¾ãƒ‘ターンã«ä¸€è‡´ã™ã‚‹æœ€åˆã®æ–‡å­—列を抽出ã—ã€æ­£è¦è¡¨ç¾ã‚°ãƒ«ãƒ¼ãƒ—インデックスã«å¯¾å¿œã—ã¾ã™ã€‚ + +**構文** + +``` sql +regexpExtract(haystack, pattern[, index]) +``` + +エイリアス: `REGEXP_EXTRACT(haystack, pattern[, index])`。 + +**引数** + +- `haystack` — æ­£è¦è¡¨ç¾ãƒ‘ターンãŒä¸€è‡´ã™ã‚‹æ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `pattern` — æ­£è¦è¡¨ç¾å¼ã®æ–‡å­—列ã€å®šæ•°ã§ãªã‘ã‚Œã°ãªã‚‰ãªã„。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `index` – 0以上ã®æ•´æ•°ã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯1ã§ã™ã€‚抽出ã™ã‚‹æ­£è¦è¡¨ç¾ã‚°ãƒ«ãƒ¼ãƒ—を表ã—ã¾ã™ã€‚[UInt ã¾ãŸã¯ Int](../data-types/int-uint.md)。オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +`pattern` ã¯è¤‡æ•°ã®æ­£è¦è¡¨ç¾ã‚°ãƒ«ãƒ¼ãƒ—ã‚’å«ã‚€ã“ã¨ãŒã§ãã€`index` ã¯æŠ½å‡ºã™ã‚‹æ­£è¦è¡¨ç¾ã‚°ãƒ«ãƒ¼ãƒ—を示ã—ã¾ã™ã€‚インデックスãŒ0ã®å ´åˆã€æ­£è¦è¡¨ç¾å…¨ä½“ã«ä¸€è‡´ã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**例** + +``` sql +SELECT + regexpExtract('100-200', '(\\d+)-(\\d+)', 1), + regexpExtract('100-200', '(\\d+)-(\\d+)', 2), + regexpExtract('100-200', '(\\d+)-(\\d+)', 0), + regexpExtract('100-200', '(\\d+)-(\\d+)'); +``` + +çµæžœ: + +``` text +┌─regexpExtract('100-200', '(\\d+)-(\\d+)', 1)─┬─regexpExtract('100-200', '(\\d+)-(\\d+)', 2)─┬─regexpExtract('100-200', '(\\d+)-(\\d+)', 0)─┬─regexpExtract('100-200', '(\\d+)-(\\d+)')─┠+│ 100 │ 200 │ 100-200 │ 100 │ +└──────────────────────────────────────────────┴──────────────────────────────────────────────┴──────────────────────────────────────────────┴───────────────────────────────────────────┘ +``` + +## hasSubsequence + +`needle` ㌠`haystack` ã®éƒ¨åˆ†åˆ—ã§ã‚ã‚‹å ´åˆã¯1ã‚’ã€ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ +文字列ã®éƒ¨åˆ†åˆ—ã¯ã€ä¸Žãˆã‚‰ã‚ŒãŸæ–‡å­—列ã‹ã‚‰0個以上ã®è¦ç´ ã‚’削除ã™ã‚‹ã“ã¨ã§å°Žã出ã•ã‚Œã‚‹ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§ã™ã€‚ + +**構文** + +``` sql +hasSubsequence(haystack, needle) +``` + +**引数** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹éƒ¨åˆ†åˆ—。[String](../../sql-reference/syntax.md#syntax-string-literal)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 1ãŒéƒ¨åˆ†åˆ—ã§ã‚ã‚‹å ´åˆã¯ `haystack`ã€ãã†ã§ãªã„å ´åˆã¯ `needle`。[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT hasSubsequence('garbage', 'arg'); +``` + +çµæžœ: + +``` text +┌─hasSubsequence('garbage', 'arg')─┠+│ 1 │ +└──────────────────────────────────┘ +``` + +## hasSubsequenceCaseInsensitive + +[hasSubsequence](#hassubsequence) ã¨åŒæ§˜ã§ã™ãŒã€å¤§æ–‡å­—å°æ–‡å­—ã®åŒºåˆ¥ã‚’無視ã—ã¦æ¤œç´¢ã—ã¾ã™ã€‚ + +**構文** + +``` sql +hasSubsequenceCaseInsensitive(haystack, needle) +``` + +**引数** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹éƒ¨åˆ†åˆ—。[String](../../sql-reference/syntax.md#syntax-string-literal)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 1ãŒéƒ¨åˆ†åˆ—ã§ã‚れ㰠`haystack`ã€ã•ã‚‚ãªãã° `needle`。[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +SELECT hasSubsequenceCaseInsensitive('garbage', 'ARG'); +``` + +çµæžœ: + +``` text +┌─hasSubsequenceCaseInsensitive('garbage', 'ARG')─┠+│ 1 │ +└─────────────────────────────────────────────────┘ +``` + +## hasSubsequenceUTF8 + +[hasSubsequence](#hassubsequence) ã¨åŒæ§˜ã§ã™ãŒã€`haystack` 㨠`needle` ㌠UTF-8 エンコードã•ã‚ŒãŸæ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¾ã™ã€‚ + +**構文** + +``` sql +hasSubsequenceUTF8(haystack, needle) +``` + +**引数** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。UTF-8 エンコードã•ã‚ŒãŸ [String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹éƒ¨åˆ†åˆ—。UTF-8 エンコードã•ã‚ŒãŸ [String](../../sql-reference/syntax.md#syntax-string-literal)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 1ãŒéƒ¨åˆ†åˆ—ã§ã‚れ㰠`haystack`ã€ã•ã‚‚ãªãã° `needle`。[UInt8](../data-types/int-uint.md)。 + +クエリ: + +**例** + +``` sql +select hasSubsequenceUTF8('ClickHouse - ÑÑ‚Ð¾Ð»Ð±Ñ†Ð¾Ð²Ð°Ñ ÑиÑтема ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð±Ð°Ð·Ð°Ð¼Ð¸ данных', 'ÑиÑтема'); +``` + +çµæžœ: + +``` text +┌─hasSubsequenceUTF8('ClickHouse - ÑÑ‚Ð¾Ð»Ð±Ñ†Ð¾Ð²Ð°Ñ ÑиÑтема ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð±Ð°Ð·Ð°Ð¼Ð¸ данных', 'ÑиÑтема')─┠+│ 1 │ +└───────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## hasSubsequenceCaseInsensitiveUTF8 + +[hasSubsequenceUTF8](#hassubsequenceutf8) ã¨åŒæ§˜ã§ã™ãŒã€å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +**構文** + +``` sql +hasSubsequenceCaseInsensitiveUTF8(haystack, needle) +``` + +**引数** + +- `haystack` — 検索ãŒè¡Œã‚れる文字列。UTF-8 エンコードã•ã‚ŒãŸ [String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `needle` — 検索ã•ã‚Œã‚‹éƒ¨åˆ†åˆ—。UTF-8 エンコードã•ã‚ŒãŸ [String](../../sql-reference/syntax.md#syntax-string-literal)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 1ãŒéƒ¨åˆ†åˆ—ã§ã‚れ㰠`haystack`ã€ã•ã‚‚ãªãã° `needle`。[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +``` sql +select hasSubsequenceCaseInsensitiveUTF8('ClickHouse - ÑÑ‚Ð¾Ð»Ð±Ñ†Ð¾Ð²Ð°Ñ ÑиÑтема ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð±Ð°Ð·Ð°Ð¼Ð¸ данных', 'СИСТЕМÐ'); +``` + +çµæžœ: + +``` text +┌─hasSubsequenceCaseInsensitiveUTF8('ClickHouse - ÑÑ‚Ð¾Ð»Ð±Ñ†Ð¾Ð²Ð°Ñ ÑиÑтема ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð±Ð°Ð·Ð°Ð¼Ð¸ данных', 'СИСТЕМÐ')─┠+│ 1 │ +└──────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## hasToken + +指定ã•ã‚ŒãŸãƒˆãƒ¼ã‚¯ãƒ³ãŒ haystack ã«å­˜åœ¨ã™ã‚‹å ´åˆã¯1ã‚’ã€ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +hasToken(haystack, token) +``` + + +**パラメータ** + +- `haystack`: 検索を行ã†æ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `token`: 2ã¤ã®éžè‹±æ•°å­—ASCII文字(ã¾ãŸã¯haystackã®å¢ƒç•Œï¼‰ã®é–“ã®æœ€å¤§é•·ã‚µãƒ–ストリング。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- tokenãŒhaystackã«å­˜åœ¨ã™ã‚‹å ´åˆã¯1ã€ãã†ã§ãªã„å ´åˆã¯0。[UInt8](../data-types/int-uint.md)。 + +**実装ã®è©³ç´°** + +tokenã¯å®šæ•°æ–‡å­—列ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。tokenbf_v1 インデックスã®ç‰¹æ®ŠåŒ–ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT hasToken('Hello World','Hello'); +``` + +```response +1 +``` + +## hasTokenOrNull + +指定ã•ã‚ŒãŸtokenãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯1ã‚’è¿”ã—ã€å­˜åœ¨ã—ãªã„å ´åˆã¯0ã‚’è¿”ã—ã€tokenãŒä¸æ­£ãªå½¢å¼ã®å ´åˆã¯nullã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +hasTokenOrNull(haystack, token) +``` + +**パラメータ** + +- `haystack`: 検索を行ã†æ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `token`: 2ã¤ã®éžè‹±æ•°å­—ASCII文字(ã¾ãŸã¯haystackã®å¢ƒç•Œï¼‰ã®é–“ã®æœ€å¤§é•·ã‚µãƒ–ストリング。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- tokenãŒhaystackã«å­˜åœ¨ã™ã‚‹å ´åˆã¯1ã€å­˜åœ¨ã—ãªã„å ´åˆã¯0ã€ä¸æ­£ãªå½¢å¼ã®tokenã®å ´åˆã¯null。 + +**実装ã®è©³ç´°** + +tokenã¯å®šæ•°æ–‡å­—列ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。tokenbf_v1 インデックスã®ç‰¹æ®ŠåŒ–ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**例** + +`hasToken`ã¯ä¸æ­£ãªå½¢å¼ã®tokenã«å¯¾ã—ã¦ã‚¨ãƒ©ãƒ¼ã‚’投ã’ã¾ã™ãŒã€`hasTokenOrNull`ã¯ä¸æ­£ãªå½¢å¼ã®tokenã«å¯¾ã—ã¦`null`ã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT hasTokenOrNull('Hello World','Hello,World'); +``` + +```response +null +``` + +## hasTokenCaseInsensitive + +指定ã•ã‚ŒãŸtokenãŒhaystackã«å­˜åœ¨ã™ã‚‹å ´åˆã¯1ã‚’è¿”ã—ã€ãã†ã§ãªã„å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を無視ã—ã¾ã™ã€‚ + +**構文** + +```sql +hasTokenCaseInsensitive(haystack, token) +``` + +**パラメータ** + +- `haystack`: 検索を行ã†æ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `token`: 2ã¤ã®éžè‹±æ•°å­—ASCII文字(ã¾ãŸã¯haystackã®å¢ƒç•Œï¼‰ã®é–“ã®æœ€å¤§é•·ã‚µãƒ–ストリング。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- tokenãŒhaystackã«å­˜åœ¨ã™ã‚‹å ´åˆã¯1ã€ãã†ã§ãªã„å ´åˆã¯0。[UInt8](../data-types/int-uint.md)。 + +**実装ã®è©³ç´°** + +tokenã¯å®šæ•°æ–‡å­—列ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。tokenbf_v1 インデックスã®ç‰¹æ®ŠåŒ–ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT hasTokenCaseInsensitive('Hello World','hello'); +``` + +```response +1 +``` + +## hasTokenCaseInsensitiveOrNull + +指定ã•ã‚ŒãŸtokenãŒhaystackã«å­˜åœ¨ã™ã‚‹å ´åˆã¯1ã‚’è¿”ã—ã€ãã†ã§ãªã„å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚大文字å°æ–‡å­—を無視ã—ã€ä¸æ­£ãªå½¢å¼ã®tokenã®å ´åˆã¯nullã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +hasTokenCaseInsensitiveOrNull(haystack, token) +``` + +**パラメータ** + +- `haystack`: 検索を行ã†æ–‡å­—列。[String](../../sql-reference/syntax.md#syntax-string-literal)。 +- `token`: 2ã¤ã®éžè‹±æ•°å­—ASCII文字(ã¾ãŸã¯haystackã®å¢ƒç•Œï¼‰ã®é–“ã®æœ€å¤§é•·ã‚µãƒ–ストリング。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- tokenãŒhaystackã«å­˜åœ¨ã™ã‚‹å ´åˆã¯1ã€å­˜åœ¨ã—ãªã„å ´åˆã¯0ã€ä¸æ­£ãªå½¢å¼ã®tokenã®å ´åˆã¯[`null`](../data-types/nullable.md)。[UInt8](../data-types/int-uint.md)。 + +**実装ã®è©³ç´°** + +tokenã¯å®šæ•°æ–‡å­—列ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。tokenbf_v1 インデックスã®ç‰¹æ®ŠåŒ–ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**例** + +`hasTokenCaseInsensitive`ã¯ä¸æ­£ãªå½¢å¼ã®tokenã«å¯¾ã—ã¦ã‚¨ãƒ©ãƒ¼ã‚’投ã’ã¾ã™ãŒã€`hasTokenCaseInsensitiveOrNull`ã¯ä¸æ­£ãªå½¢å¼ã®tokenã«å¯¾ã—ã¦`null`ã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT hasTokenCaseInsensitiveOrNull('Hello World','hello,world'); +``` + +```response +null +``` diff --git a/docs/ja/sql-reference/functions/time-series-functions.md b/docs/ja/sql-reference/functions/time-series-functions.md new file mode 100644 index 00000000000..1e8b0d3659b --- /dev/null +++ b/docs/ja/sql-reference/functions/time-series-functions.md @@ -0,0 +1,164 @@ +--- +slug: /ja/sql-reference/functions/time-series-functions +sidebar_position: 172 +sidebar_label: タイムシリーズ +--- + +# タイムシリーズ関数 + +以下ã®é–¢æ•°ã¯ã€ã‚·ãƒªãƒ¼ã‚ºãƒ‡ãƒ¼ã‚¿ã®åˆ†æžã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +## seriesOutliersDetectTukey + +[Tukey Fences](https://en.wikipedia.org/wiki/Outlier#Tukey%27s_fences) を用ã„ã¦ã‚·ãƒªãƒ¼ã‚ºãƒ‡ãƒ¼ã‚¿ã®å¤–れ値を検出ã—ã¾ã™ã€‚ + +**構文** + +``` sql +seriesOutliersDetectTukey(series); +seriesOutliersDetectTukey(series, min_percentile, max_percentile, K); +``` + +**引数** + +- `series` - 数値ã®é…列。 +- `min_percentile` - 四分ä½ç¯„囲 [(IQR)](https://en.wikipedia.org/wiki/Interquartile_range) を計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å°ãƒ‘ーセンタイル。値㯠[0.02,0.98] ã®ç¯„囲ã§æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚デフォルト㯠0.25 ã§ã™ã€‚ +- `max_percentile` - 四分ä½ç¯„囲 (IQR) を計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹æœ€å¤§ãƒ‘ーセンタイル。値㯠[0.02,0.98] ã®ç¯„囲ã§æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚デフォルト㯠0.75 ã§ã™ã€‚ +- `K` - 軽度ã¾ãŸã¯å¼·ã„外れ値を検出ã™ã‚‹ãŸã‚ã®éžè² å®šæ•°å€¤ã€‚デフォルト値㯠1.5 ã§ã™ã€‚ + +外れ値を検出ã™ã‚‹ãŸã‚ã«ã¯ã€`series` ã«å°‘ãªãã¨ã‚‚4ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒã‚¤ãƒ³ãƒˆãŒå¿…è¦ã§ã™ã€‚ + +**戻り値** + +- シリーズ内ã®å„è¦ç´ ã«å¯¾å¿œã™ã‚‹å¯èƒ½æ€§ã®ã‚る異常ã®ã‚¹ã‚³ã‚¢ã‚’表ã™ã€å…ƒã®å…¥åŠ›é…列ã¨åŒã˜é•·ã•ã®é…列を返ã—ã¾ã™ã€‚éžã‚¼ãƒ­ã®ã‚¹ã‚³ã‚¢ã¯ç•°å¸¸ã®å¯èƒ½æ€§ã‚’示ã—ã¾ã™ã€‚[Array](../data-types/array.md)。 + +**例** + +クエリ: + +``` sql +SELECT seriesOutliersDetectTukey([-3, 2, 15, 3, 5, 6, 4, 5, 12, 45, 12, 3, 3, 4, 5, 6]) AS print_0; +``` + +çµæžœ: + +``` text +┌───────────print_0─────────────────┠+│[0,0,0,0,0,0,0,0,0,27,0,0,0,0,0,0] │ +└───────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT seriesOutliersDetectTukey([-3, 2, 15, 3, 5, 6, 4.50, 5, 12, 45, 12, 3.40, 3, 4, 5, 6], 0.2, 0.8, 1.5) AS print_0; +``` + +çµæžœ: + +``` text +┌─print_0──────────────────────────────┠+│ [0,0,0,0,0,0,0,0,0,19.5,0,0,0,0,0,0] │ +└──────────────────────────────────────┘ +``` + +## seriesPeriodDetectFFT + +FFT を用ã„ã¦ä¸Žãˆã‚‰ã‚ŒãŸã‚·ãƒªãƒ¼ã‚ºãƒ‡ãƒ¼ã‚¿ã®å‘¨æœŸã‚’見ã¤ã‘ã¾ã™ã€‚ +FFT - [高速フーリエ変æ›](https://en.wikipedia.org/wiki/Fast_Fourier_transform) + +**構文** + +``` sql +seriesPeriodDetectFFT(series); +``` + +**引数** + +- `series` - 数値ã®é…列 + +**戻り値** + +- シリーズデータã®å‘¨æœŸã«ç­‰ã—ã„実数値を返ã—ã¾ã™ã€‚データãƒã‚¤ãƒ³ãƒˆãŒ4ã¤æœªæº€ã®å ´åˆã¯ NaN ã‚’è¿”ã—ã¾ã™ã€‚[Float64](../data-types/float.md). + +**例** + +クエリ: + +``` sql +SELECT seriesPeriodDetectFFT([1, 4, 6, 1, 4, 6, 1, 4, 6, 1, 4, 6, 1, 4, 6, 1, 4, 6, 1, 4, 6]) AS print_0; +``` + +çµæžœ: + +``` text +┌───────────print_0──────┠+│ 3 │ +└────────────────────────┘ +``` + +``` sql +SELECT seriesPeriodDetectFFT(arrayMap(x -> abs((x % 6) - 3), range(1000))) AS print_0; +``` + +çµæžœ: + +``` text +┌─print_0─┠+│ 6 │ +└─────────┘ +``` + +## seriesDecomposeSTL + +STL [(ローカルウエイト回帰を用ã„ãŸå­£ç¯€ãƒˆãƒ¬ãƒ³ãƒ‰åˆ†è§£æ‰‹æ³•)](https://www.wessa.net/download/stl.pdf) を使用ã—ã¦ã‚·ãƒªãƒ¼ã‚ºãƒ‡ãƒ¼ã‚¿ã‚’季節ã€ãƒˆãƒ¬ãƒ³ãƒ‰ã€ãŠã‚ˆã³æ®‹å·®æˆåˆ†ã«åˆ†è§£ã—ã¾ã™ã€‚ + +**構文** + +``` sql +seriesDecomposeSTL(series, period); +``` + +**引数** + +- `series` - 数値ã®é…列 +- `period` - æ­£ã®æ•´æ•° + +`series` ã«ã¯ `period` ã®2å€ä»¥ä¸Šã®ãƒ‡ãƒ¼ã‚¿ãƒã‚¤ãƒ³ãƒˆãŒã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**戻り値** + +- 4ã¤ã®é…列をå«ã‚€é…列を返ã—ã¾ã™ã€‚最åˆã®é…列ã¯å­£ç¯€æˆåˆ†ã€2番目ã®é…列ã¯ãƒˆãƒ¬ãƒ³ãƒ‰ã€3番目ã®é…列ã¯æ®‹å·®æˆåˆ†ã€4番目ã®é…列ã¯ãƒ™ãƒ¼ã‚¹ãƒ©ã‚¤ãƒ³ï¼ˆå­£ç¯€+トレンド)æˆåˆ†ã§ã™ã€‚[Array](../data-types/array.md)。 + +**例** + +クエリ: + +``` sql +SELECT seriesDecomposeSTL([10.1, 20.45, 40.34, 10.1, 20.45, 40.34, 10.1, 20.45, 40.34, 10.1, 20.45, 40.34, 10.1, 20.45, 40.34, 10.1, 20.45, 40.34, 10.1, 20.45, 40.34, 10.1, 20.45, 40.34], 3) AS print_0; +``` + +çµæžœ: + +``` text +┌───────────print_0──────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ [[ + -13.529999, -3.1799996, 16.71, -13.53, -3.1799996, 16.71, -13.53, -3.1799996, + 16.71, -13.530001, -3.18, 16.710001, -13.530001, -3.1800003, 16.710001, -13.530001, + -3.1800003, 16.710001, -13.530001, -3.1799994, 16.71, -13.529999, -3.1799994, 16.709997 + ], + [ + 23.63, 23.63, 23.630003, 23.630001, 23.630001, 23.630001, 23.630001, 23.630001, + 23.630001, 23.630001, 23.630001, 23.63, 23.630001, 23.630001, 23.63, 23.630001, + 23.630001, 23.63, 23.630001, 23.630001, 23.630001, 23.630001, 23.630001, 23.630003 + ], + [ + 0, 0.0000019073486, -0.0000019073486, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.0000019073486, 0, + 0 + ], + [ + 10.1, 20.449999, 40.340004, 10.100001, 20.45, 40.34, 10.100001, 20.45, 40.34, 10.1, 20.45, 40.34, + 10.1, 20.45, 40.34, 10.1, 20.45, 40.34, 10.1, 20.45, 40.34, 10.100002, 20.45, 40.34 + ]] │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/time-window-functions.md b/docs/ja/sql-reference/functions/time-window-functions.md new file mode 100644 index 00000000000..3a969a5be8b --- /dev/null +++ b/docs/ja/sql-reference/functions/time-window-functions.md @@ -0,0 +1,248 @@ +--- +slug: /ja/sql-reference/functions/time-window-functions +sidebar_position: 175 +sidebar_label: タイムウィンドウ +--- + +# Time Window Functions + +タイムウィンドウ関数ã¯ã€å¯¾å¿œã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æŽ’他的上é™ã¨åŒ…括的下é™ã‚’è¿”ã—ã¾ã™ã€‚[WindowView](../statements/create/view.md/#window-view-experimental)ã§ä½œæ¥­ã™ã‚‹ãŸã‚ã®é–¢æ•°ã¯ä»¥ä¸‹ã«ç¤ºã•ã‚Œã¾ã™ã€‚ + +## tumble + +タンブルタイムウィンドウã¯ã€å›ºå®šã•ã‚ŒãŸæœŸé–“(`interval`)ã§éžé‡è¤‡ã‹ã¤é€£ç¶šã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’割り当ã¦ã¾ã™ã€‚ + +**構文** + +``` sql +tumble(time_attr, interval [, timezone]) +``` + +**引数** +- `time_attr` — 日付ã¨æ™‚間。[DateTime](../data-types/datetime.md)。 +- `interval` — ウィンドウã®é–“éš” [Interval](../data-types/special-data-types/interval.md)。 +- `timezone` — [タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 対応ã™ã‚‹ã‚¿ãƒ³ãƒ–ルウィンドウã®åŒ…括的下é™ã¨æŽ’他的上é™ã€‚[Tuple](../data-types/tuple.md)([DateTime](../data-types/datetime.md), [DateTime](../data-types/datetime.md))。 + +**例** + +クエリ: + +``` sql +SELECT tumble(now(), toIntervalDay('1')); +``` + +çµæžœ: + +``` text +┌─tumble(now(), toIntervalDay('1'))─────────────┠+│ ('2024-07-04 00:00:00','2024-07-05 00:00:00') │ +└───────────────────────────────────────────────┘ +``` + +## tumbleStart + +対応ã™ã‚‹[タンブルウィンドウ](#tumble)ã®åŒ…括的下é™ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +tumbleStart(time_attr, interval [, timezone]); +``` + +**引数** + +- `time_attr` — 日付ã¨æ™‚間。[DateTime](../data-types/datetime.md)。 +- `interval` — ウィンドウã®é–“éš” [Interval](../data-types/special-data-types/interval.md)。 +- `timezone` — [タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。 + +上記ã®ãƒ‘ラメータã¯[tuple](../data-types/tuple.md)ã¨ã—ã¦ã‚‚関数ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 対応ã™ã‚‹ã‚¿ãƒ³ãƒ–ルウィンドウã®åŒ…括的下é™ã€‚[DateTime](../data-types/datetime.md), [Tuple](../data-types/tuple.md)ã¾ãŸã¯[UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT tumbleStart(now(), toIntervalDay('1')); +``` + +çµæžœ: + +```response +┌─tumbleStart(now(), toIntervalDay('1'))─┠+│ 2024-07-04 00:00:00 │ +└────────────────────────────────────────┘ +``` + +## tumbleEnd + +対応ã™ã‚‹[タンブルウィンドウ](#tumble)ã®æŽ’他的上é™ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +tumbleEnd(time_attr, interval [, timezone]); +``` + +**引数** + +- `time_attr` — 日付ã¨æ™‚間。[DateTime](../data-types/datetime.md)。 +- `interval` — ウィンドウã®é–“éš” [Interval](../data-types/special-data-types/interval.md)。 +- `timezone` — [タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。 + +上記ã®ãƒ‘ラメータã¯[tuple](../data-types/tuple.md)ã¨ã—ã¦ã‚‚関数ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 対応ã™ã‚‹ã‚¿ãƒ³ãƒ–ルウィンドウã®æŽ’他的上é™ã€‚[DateTime](../data-types/datetime.md), [Tuple](../data-types/tuple.md)ã¾ãŸã¯[UInt32](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT tumbleEnd(now(), toIntervalDay('1')); +``` + +çµæžœ: + +```response +┌─tumbleEnd(now(), toIntervalDay('1'))─┠+│ 2024-07-05 00:00:00 │ +└──────────────────────────────────────┘ +``` + +## hop + +ホッピングタイムウィンドウã¯å›ºå®šã•ã‚ŒãŸæœŸé–“(`window_interval`)をæŒã¡ã€æŒ‡å®šã•ã‚ŒãŸãƒ›ãƒƒãƒ—間隔(`hop_interval`)ã§ç§»å‹•ã—ã¾ã™ã€‚`hop_interval`ãŒ`window_interval`よりå°ã•ã„å ´åˆã€ãƒ›ãƒƒãƒ”ングウィンドウã¯é‡è¤‡ã—ã¦ã„ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯è¤‡æ•°ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +``` sql +hop(time_attr, hop_interval, window_interval [, timezone]) +``` + +**引数** + +- `time_attr` — 日付ã¨æ™‚間。[DateTime](../data-types/datetime.md)。 +- `hop_interval` — æ­£ã®ãƒ›ãƒƒãƒ—間隔。[Interval](../data-types/special-data-types/interval.md)。 +- `window_interval` — æ­£ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–“隔。[Interval](../data-types/special-data-types/interval.md)。 +- `timezone` — [タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 対応ã™ã‚‹ãƒ›ãƒƒãƒ”ングウィンドウã®åŒ…括的下é™ã¨æŽ’他的上é™ã€‚[Tuple](../data-types/tuple.md)([DateTime](../data-types/datetime.md), [DateTime](../data-types/datetime.md))。 + +:::note +一ã¤ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¤‡æ•°ã®ãƒ›ãƒƒãƒ—ウィンドウã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ãŸã‚ã€hop関数ãŒ`WINDOW VIEW`ãªã—ã§ä½¿ç”¨ã•ã‚Œã‚‹ã¨ãã€é–¢æ•°ã¯**最åˆã®**ウィンドウã®å¢ƒç•Œã®ã¿ã‚’è¿”ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT hop(now(), INTERVAL '1' DAY, INTERVAL '2' DAY); +``` + +çµæžœ: + +``` text +┌─hop(now(), toIntervalDay('1'), toIntervalDay('2'))─┠+│ ('2024-07-03 00:00:00','2024-07-05 00:00:00') │ +└────────────────────────────────────────────────────┘ +``` + +## hopStart + +対応ã™ã‚‹[ホッピングウィンドウ](#hop)ã®åŒ…括的下é™ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +hopStart(time_attr, hop_interval, window_interval [, timezone]); +``` +**引数** + +- `time_attr` — 日付ã¨æ™‚間。[DateTime](../data-types/datetime.md)。 +- `hop_interval` — æ­£ã®ãƒ›ãƒƒãƒ—間隔。[Interval](../data-types/special-data-types/interval.md)。 +- `window_interval` — æ­£ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–“隔。[Interval](../data-types/special-data-types/interval.md)。 +- `timezone` — [タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。 + +上記ã®ãƒ‘ラメータã¯[tuple](../data-types/tuple.md)ã¨ã—ã¦ã‚‚関数ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 対応ã™ã‚‹ãƒ›ãƒƒãƒ”ングウィンドウã®åŒ…括的下é™ã€‚[DateTime](../data-types/datetime.md), [Tuple](../data-types/tuple.md)ã¾ãŸã¯[UInt32](../data-types/int-uint.md)。 + +:::note +一ã¤ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¤‡æ•°ã®ãƒ›ãƒƒãƒ—ウィンドウã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ãŸã‚ã€hop関数ãŒ`WINDOW VIEW`ãªã—ã§ä½¿ç”¨ã•ã‚Œã‚‹ã¨ãã€é–¢æ•°ã¯**最åˆã®**ウィンドウã®å¢ƒç•Œã®ã¿ã‚’è¿”ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT hopStart(now(), INTERVAL '1' DAY, INTERVAL '2' DAY); +``` + +çµæžœ: + +``` text +┌─hopStart(now(), toIntervalDay('1'), toIntervalDay('2'))─┠+│ 2024-07-03 00:00:00 │ +└─────────────────────────────────────────────────────────┘ +``` + +## hopEnd + +対応ã™ã‚‹[ホッピングウィンドウ](#hop)ã®æŽ’他的上é™ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +hopEnd(time_attr, hop_interval, window_interval [, timezone]); +``` +**引数** + +- `time_attr` — 日付ã¨æ™‚間。[DateTime](../data-types/datetime.md)。 +- `hop_interval` — æ­£ã®ãƒ›ãƒƒãƒ—間隔。[Interval](../data-types/special-data-types/interval.md)。 +- `window_interval` — æ­£ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–“隔。[Interval](../data-types/special-data-types/interval.md)。 +- `timezone` — [タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。 + +上記ã®ãƒ‘ラメータã¯[tuple](../data-types/tuple.md)ã¨ã—ã¦ã‚‚関数ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 対応ã™ã‚‹ãƒ›ãƒƒãƒ”ングウィンドウã®æŽ’他的上é™ã€‚[DateTime](../data-types/datetime.md), [Tuple](../data-types/tuple.md)ã¾ãŸã¯[UInt32](../data-types/int-uint.md)。 + +:::note +一ã¤ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¤‡æ•°ã®ãƒ›ãƒƒãƒ—ウィンドウã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ãŸã‚ã€hop関数ãŒ`WINDOW VIEW`ãªã—ã§ä½¿ç”¨ã•ã‚Œã‚‹ã¨ãã€é–¢æ•°ã¯**最åˆã®**ウィンドウã®å¢ƒç•Œã®ã¿ã‚’è¿”ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT hopEnd(now(), INTERVAL '1' DAY, INTERVAL '2' DAY); +``` + +çµæžœ: + +``` text +┌─hopEnd(now(), toIntervalDay('1'), toIntervalDay('2'))─┠+│ 2024-07-05 00:00:00 │ +└───────────────────────────────────────────────────────┘ + +``` + +## 関連コンテンツ + +- ブログ: [ClickHouseã§ã®æ™‚系列データã®å‡¦ç†](https://clickhouse.com/blog/working-with-time-series-data-and-functions-ClickHouse) diff --git a/docs/ja/sql-reference/functions/tuple-functions.md b/docs/ja/sql-reference/functions/tuple-functions.md new file mode 100644 index 00000000000..d9ad7f3e06f --- /dev/null +++ b/docs/ja/sql-reference/functions/tuple-functions.md @@ -0,0 +1,896 @@ +--- +slug: /ja/sql-reference/functions/tuple-functions +sidebar_position: 180 +sidebar_label: タプル +--- + +## tuple + +複数ã®ã‚«ãƒ©ãƒ ã‚’グループ化ã™ã‚‹ãŸã‚ã®é–¢æ•°ã§ã™ã€‚ +タイプ T1, T2, ... ã‚’æŒã¤ã‚«ãƒ©ãƒ  C1, C2, ... ã«å¯¾ã—ã¦ã€ãれらã®åå‰ãŒãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ã‚¢ãƒ³ã‚³ãƒ¼ãƒ†ãƒƒãƒ‰è­˜åˆ¥å­ã¨ã—ã¦æ‰±ãˆã‚‹å ´åˆã€`Tuple(C1 T1, C2 T2, ...)` åž‹ã®åå‰ä»˜ãタプルを返ã—ã€ãã†ã§ãªã„å ´åˆã¯ `Tuple(T1, T2, ...)` ã‚’è¿”ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã‚’実行ã™ã‚‹éš›ã®ã‚³ã‚¹ãƒˆã¯ã‚ã‚Šã¾ã›ã‚“。 +通常ã€ã‚¿ãƒ—ルã¯IN演算å­ã®å¼•æ•°ã¨ã—ã¦ã®ä¸­é–“値ã€ã¾ãŸã¯ãƒ©ãƒ ãƒ€é–¢æ•°ã®å½¢å¼ãƒ‘ラメータリストを作æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚タプルã¯ãƒ†ãƒ¼ãƒ–ルã«æ›¸ã込むã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +ã“ã®é–¢æ•°ã¯æ¼”ç®—å­ `(x, y, ...)` を実装ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +tuple(x, y, ...) +``` + +## tupleElement + +タプルã‹ã‚‰ã‚«ãƒ©ãƒ ã‚’å–å¾—ã™ã‚‹ãŸã‚ã®é–¢æ•°ã§ã™ã€‚ + +第2引数ãŒæ•°å€¤ `index` ã®å ´åˆã€ãã‚Œã¯1ã‹ã‚‰å§‹ã¾ã‚‹ã‚«ãƒ©ãƒ ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã§ã™ã€‚第2引数ãŒæ–‡å­—列 `name` ã®å ´åˆã€ãã‚Œã¯è¦ç´ ã®åå‰ã‚’表ã—ã¾ã™ã€‚ã¾ãŸã€ç¬¬2引数ãŒç¯„囲外ã®å ´åˆã‚„åå‰ã«å¯¾å¿œã™ã‚‹è¦ç´ ãŒå­˜åœ¨ã—ãªã„å ´åˆã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã™ç¬¬3ã®ã‚ªãƒ—ション引数を指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚æä¾›ã•ã‚ŒãŸå ´åˆã€ç¬¬2ãŠã‚ˆã³ç¬¬3ã®å¼•æ•°ã¯å®šæ•°ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ã“ã®é–¢æ•°ã‚’実行ã™ã‚‹ã‚³ã‚¹ãƒˆã¯ã‚ã‚Šã¾ã›ã‚“。 + +ã“ã®é–¢æ•°ã¯ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ `x.index` ãŠã‚ˆã³ `x.name` を実装ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +tupleElement(tuple, index, [, default_value]) +tupleElement(tuple, name, [, default_value]) +``` + +## untuple + +[tuple](../data-types/tuple.md#tuplet1-t2)è¦ç´ ã‚’呼ã³å‡ºã—ä½ç½®ã§ã®æ–‡æ³•ç½®æ›ã‚’è¡Œã„ã¾ã™ã€‚ + +çµæžœã®ã‚«ãƒ©ãƒ ã®åå‰ã¯å®Ÿè£…固有ã§ã‚ã‚Šã€å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚`untuple`ã®å¾Œã«ç‰¹å®šã®ã‚«ãƒ©ãƒ åを仮定ã—ãªã„ã§ãã ã•ã„。 + +**構文** + +``` sql +untuple(x) +``` + +`EXCEPT` å¼ã‚’使用ã—ã¦ã€ã‚¯ã‚¨ãƒªã®çµæžœã¨ã—ã¦ã‚«ãƒ©ãƒ ã‚’スキップã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**引数** + +- `x` — `tuple` 関数ã€ã‚«ãƒ©ãƒ ã€ã¾ãŸã¯è¦ç´ ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãªã—。 + +**例** + +入力テーブル: + +``` text +┌─key─┬─v1─┬─v2─┬─v3─┬─v4─┬─v5─┬─v6────────┠+│ 1 │ 10 │ 20 │ 40 │ 30 │ 15 │ (33,'ab') │ +│ 2 │ 25 │ 65 │ 70 │ 40 │ 6 │ (44,'cd') │ +│ 3 │ 57 │ 30 │ 20 │ 10 │ 5 │ (55,'ef') │ +│ 4 │ 55 │ 12 │ 7 │ 80 │ 90 │ (66,'gh') │ +│ 5 │ 30 │ 50 │ 70 │ 25 │ 55 │ (77,'kl') │ +└─────┴────┴────┴────┴────┴────┴───────────┘ +``` + +`Tuple` 型カラムを `untuple` 関数ã®ãƒ‘ラメータã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ä¾‹: + +クエリ: + +``` sql +SELECT untuple(v6) FROM kv; +``` + +çµæžœ: + +``` text +┌─_ut_1─┬─_ut_2─┠+│ 33 │ ab │ +│ 44 │ cd │ +│ 55 │ ef │ +│ 66 │ gh │ +│ 77 │ kl │ +└───────┴───────┘ +``` + +`EXCEPT` å¼ã®ä½¿ç”¨ä¾‹: + +クエリ: + +``` sql +SELECT untuple((* EXCEPT (v2, v3),)) FROM kv; +``` + +çµæžœ: + +``` text +┌─key─┬─v1─┬─v4─┬─v5─┬─v6────────┠+│ 1 │ 10 │ 30 │ 15 │ (33,'ab') │ +│ 2 │ 25 │ 40 │ 6 │ (44,'cd') │ +│ 3 │ 57 │ 10 │ 5 │ (55,'ef') │ +│ 4 │ 55 │ 80 │ 90 │ (66,'gh') │ +│ 5 │ 30 │ 25 │ 55 │ (77,'kl') │ +└─────┴────┴────┴────┴───────────┘ +``` + +**å‚ç…§** + +- [Tuple](../data-types/tuple.md) + +## tupleHammingDistance + +2ã¤ã®åŒã‚µã‚¤ã‚ºã®ã‚¿ãƒ—ル間ã®[ãƒãƒŸãƒ³ã‚°è·é›¢](https://en.wikipedia.org/wiki/Hamming_distance)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +tupleHammingDistance(tuple1, tuple2) +``` + +**引数** + +- `tuple1` — 最åˆã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 +- `tuple2` — 2ã¤ç›®ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +タプルã¯åŒæ§˜ã®åž‹ã®è¦ç´ ã‚’æŒãŸãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãƒãƒŸãƒ³ã‚°è·é›¢ã€‚ + +:::note +çµæžœã‚¿ã‚¤ãƒ—ã¯[算術関数](../../sql-reference/functions/arithmetic-functions.md)ã®å ´åˆã¨åŒæ§˜ã«ã€å…¥åŠ›ã‚¿ãƒ—ルã®è¦ç´ æ•°ã«åŸºã¥ã„ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ +::: + +``` sql +SELECT + toTypeName(tupleHammingDistance(tuple(0), tuple(0))) AS t1, + toTypeName(tupleHammingDistance((0, 0), (0, 0))) AS t2, + toTypeName(tupleHammingDistance((0, 0, 0), (0, 0, 0))) AS t3, + toTypeName(tupleHammingDistance((0, 0, 0, 0), (0, 0, 0, 0))) AS t4, + toTypeName(tupleHammingDistance((0, 0, 0, 0, 0), (0, 0, 0, 0, 0))) AS t5 +``` + +``` text +┌─t1────┬─t2─────┬─t3─────┬─t4─────┬─t5─────┠+│ UInt8 │ UInt16 │ UInt32 │ UInt64 │ UInt64 │ +└───────┴────────┴────────┴────────┴────────┘ +``` + +**例** + +クエリ: + +``` sql +SELECT tupleHammingDistance((1, 2, 3), (3, 2, 1)) AS HammingDistance; +``` + +çµæžœ: + +``` text +┌─HammingDistance─┠+│ 2 │ +└─────────────────┘ +``` + +[MinHash](../../sql-reference/functions/hash-functions.md#ngramminhash) 関数ã¨å…±ã«åŠé‡è¤‡æ–‡å­—列ã®æ¤œå‡ºã«ä½¿ç”¨ã§ãã¾ã™: + +``` sql +SELECT tupleHammingDistance(wordShingleMinHash(string), wordShingleMinHashCaseInsensitive(string)) AS HammingDistance +FROM (SELECT 'ClickHouse is a column-oriented database management system for online analytical processing of queries.' AS string); +``` + +çµæžœ: + +``` text +┌─HammingDistance─┠+│ 2 │ +└─────────────────┘ +``` + +## tupleToNameValuePairs + +åå‰ä»˜ãタプルを(åå‰, 値)ペアã®é…列ã«å¤‰æ›ã—ã¾ã™ã€‚`Tuple(a T, b T, ..., c T)` ã«å¯¾ã—ã¦ã¯ã€`Array(Tuple(String, T), ...)` ã‚’è¿”ã—ã¾ã™ã€‚ã“ã“㧠`Strings` ã¯ã‚¿ãƒ—ルã®åå‰ä»˜ãフィールドを表ã—ã€`T` ã¯ãれらã®åå‰ã«é–¢é€£ä»˜ã‘られãŸå€¤ã§ã™ã€‚タプル内ã®ã™ã¹ã¦ã®å€¤ã¯åŒã˜ã‚¿ã‚¤ãƒ—ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**構文** + +``` sql +tupleToNameValuePairs(tuple) +``` + +**引数** + +- `tuple` — åå‰ä»˜ãタプル。[Tuple](../data-types/tuple.md) åž‹ã§ã€ä»»æ„ã®ã‚¿ã‚¤ãƒ—ã®å€¤ã‚’æŒã¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- (åå‰, 値)ペアã®é…列。[Array](../data-types/array.md)([Tuple](../data-types/tuple.md)([String](../data-types/string.md), ...))。 + +**例** + +クエリ: + +``` sql +CREATE TABLE tupletest (col Tuple(user_ID UInt64, session_ID UInt64)) ENGINE = Memory; + +INSERT INTO tupletest VALUES (tuple( 100, 2502)), (tuple(1,100)); + +SELECT tupleToNameValuePairs(col) FROM tupletest; +``` + +çµæžœ: + +``` text +┌─tupleToNameValuePairs(col)────────────┠+│ [('user_ID',100),('session_ID',2502)] │ +│ [('user_ID',1),('session_ID',100)] │ +└───────────────────────────────────────┘ +``` + +ã“ã®é–¢æ•°ã‚’使用ã—ã¦ã‚«ãƒ©ãƒ ã‚’è¡Œã«å¤‰æ›ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™: + +``` sql +CREATE TABLE tupletest (col Tuple(CPU Float64, Memory Float64, Disk Float64)) ENGINE = Memory; + +INSERT INTO tupletest VALUES(tuple(3.3, 5.5, 6.6)); + +SELECT arrayJoin(tupleToNameValuePairs(col)) FROM tupletest; +``` + +çµæžœ: + +``` text +┌─arrayJoin(tupleToNameValuePairs(col))─┠+│ ('CPU',3.3) │ +│ ('Memory',5.5) │ +│ ('Disk',6.6) │ +└───────────────────────────────────────┘ +``` + +å˜ç´”ãªã‚¿ãƒ—ルを関数ã«æ¸¡ã™ã¨ã€ClickHouseã¯å€¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’ãã®åå‰ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™: + +``` sql +SELECT tupleToNameValuePairs(tuple(3, 2, 1)); +``` + +çµæžœ: + +``` text +┌─tupleToNameValuePairs(tuple(3, 2, 1))─┠+│ [('1',3),('2',2),('3',1)] │ +└───────────────────────────────────────┘ +``` + +## tupleNames + +タプルをカラムåã®é…列ã«å¤‰æ›ã—ã¾ã™ã€‚`Tuple(a T, b T, ...)` å½¢å¼ã®ã‚¿ãƒ—ルã«å¯¾ã—ã¦ã¯ã€ã‚¿ãƒ—ルã®åå‰ä»˜ãカラムを表ã™æ–‡å­—列ã®é…列を返ã—ã¾ã™ã€‚タプルã®è¦ç´ ã«æ˜Žç¤ºçš„ãªåå‰ãŒãªã„å ´åˆã€ãã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒã‚«ãƒ©ãƒ åã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +tupleNames(tuple) +``` + +**引数** + +- `tuple` — åå‰ä»˜ãタプル。[Tuple](../../sql-reference/data-types/tuple.md) åž‹ã§ã€ä»»æ„ã®ã‚¿ã‚¤ãƒ—ã®å€¤ã‚’æŒã¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 文字列ã®é…列。 + +åž‹: [Array](../../sql-reference/data-types/array.md)([Tuple](../../sql-reference/data-types/tuple.md)([String](../../sql-reference/data-types/string.md), ...))。 + +**例** + +クエリ: + +``` sql +CREATE TABLE tupletest (col Tuple(user_ID UInt64, session_ID UInt64)) ENGINE = Memory; + +INSERT INTO tupletest VALUES (tuple(1, 2)); + +SELECT tupleNames(col) FROM tupletest; +``` + +çµæžœ: + +``` text +┌─tupleNames(col)──────────┠+│ ['user_ID','session_ID'] │ +└──────────────────────────┘ +``` + +å˜ç´”ãªã‚¿ãƒ—ルを関数ã«æ¸¡ã™ã¨ã€ClickHouseã¯ã‚«ãƒ©ãƒ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’ãã®åå‰ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™: + +``` sql +SELECT tupleNames(tuple(3, 2, 1)); +``` + +çµæžœ: + +``` text +┌─tupleNames((3, 2, 1))─┠+│ ['1','2','3'] │ +└───────────────────────┘ +``` + +## tuplePlus + +åŒã‚µã‚¤ã‚ºã®2ã¤ã®ã‚¿ãƒ—ルã®å¯¾å¿œã™ã‚‹å€¤ã‚’足ã—ãŸå€¤ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +tuplePlus(tuple1, tuple2) +``` + +別å: `vectorSum`. + +**引数** + +- `tuple1` — 最åˆã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 +- `tuple2` — 2ã¤ç›®ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- åˆè¨ˆã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**例** + +クエリ: + +```sql +SELECT tuplePlus((1, 2), (2, 3)); +``` + +çµæžœ: + +```text +┌─tuplePlus((1, 2), (2, 3))─┠+│ (3,5) │ +└───────────────────────────┘ +``` + +## tupleMinus + +åŒã‚µã‚¤ã‚ºã®2ã¤ã®ã‚¿ãƒ—ルã®å¯¾å¿œã™ã‚‹å€¤ã‹ã‚‰å¼•ãç®—ã—ãŸå€¤ã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +tupleMinus(tuple1, tuple2) +``` + +別å: `vectorDifference`. + +**引数** + +- `tuple1` — 最åˆã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 +- `tuple2` — 2ã¤ç›®ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引ãç®—ã®çµæžœã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**例** + +クエリ: + +```sql +SELECT tupleMinus((1, 2), (2, 3)); +``` + +çµæžœ: + +```text +┌─tupleMinus((1, 2), (2, 3))─┠+│ (-1,-1) │ +└────────────────────────────┘ +``` + +## tupleMultiply + +åŒã‚µã‚¤ã‚ºã®2ã¤ã®ã‚¿ãƒ—ルã®å¯¾å¿œã™ã‚‹å€¤ã®æŽ›ã‘算を計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +tupleMultiply(tuple1, tuple2) +``` + +**引数** + +- `tuple1` — 最åˆã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 +- `tuple2` — 2ã¤ç›®ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 掛ã‘ç®—ã®çµæžœã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**例** + +クエリ: + +```sql +SELECT tupleMultiply((1, 2), (2, 3)); +``` + +çµæžœ: + +```text +┌─tupleMultiply((1, 2), (2, 3))─┠+│ (2,6) │ +└───────────────────────────────┘ +``` + +## tupleDivide + +åŒã‚µã‚¤ã‚ºã®2ã¤ã®ã‚¿ãƒ—ルã®å¯¾å¿œã™ã‚‹å€¤ã®å‰²ã‚Šç®—を計算ã—ã¾ã™ã€‚ゼロã§ã®å‰²ã‚Šç®—ã¯`inf`ã‚’è¿”ã™ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +tupleDivide(tuple1, tuple2) +``` + +**引数** + +- `tuple1` — 最åˆã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 +- `tuple2` — 2ã¤ç›®ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 割り算ã®çµæžœã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**例** + +クエリ: + +```sql +SELECT tupleDivide((1, 2), (2, 3)); +``` + +çµæžœ: + +```text +┌─tupleDivide((1, 2), (2, 3))─┠+│ (0.5,0.6666666666666666) │ +└─────────────────────────────┘ +``` + +## tupleNegate + +タプルã®å€¤ã®å¦å®šã‚’計算ã—ã¾ã™ã€‚ + +**構文** + +```sql +tupleNegate(tuple) +``` + +**引数** + +- `tuple` — [Tuple](../data-types/tuple.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å¦å®šã®çµæžœã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**例** + +クエリ: + +```sql +SELECT tupleNegate((1, 2)); +``` + +çµæžœ: + +```text +┌─tupleNegate((1, 2))─┠+│ (-1,-2) │ +└─────────────────────┘ +``` + +## tupleMultiplyByNumber + +å…¨ã¦ã®å€¤ã‚’数値ã§æŽ›ã‘ãŸçµæžœã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +**構文** + +```sql +tupleMultiplyByNumber(tuple, number) +``` + +**引数** + +- `tuple` — [Tuple](../data-types/tuple.md)。 +- `number` — 乗数。[Int/UInt](../data-types/int-uint.md), [Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 掛ã‘ç®—ã®çµæžœã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**例** + +クエリ: + +```sql +SELECT tupleMultiplyByNumber((1, 2), -2.1); +``` + +çµæžœ: + +```text +┌─tupleMultiplyByNumber((1, 2), -2.1)─┠+│ (-2.1,-4.2) │ +└─────────────────────────────────────┘ +``` + +## tupleDivideByNumber + +å…¨ã¦ã®å€¤ã‚’数値ã§å‰²ã£ãŸçµæžœã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ゼロã§ã®å‰²ã‚Šç®—ã¯`inf`ã‚’è¿”ã™ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +tupleDivideByNumber(tuple, number) +``` + +**引数** + +- `tuple` — [Tuple](../data-types/tuple.md)。 +- `number` — 除数。[Int/UInt](../data-types/int-uint.md), [Float](../data-types/float.md) ã¾ãŸã¯ [Decimal](../data-types/decimal.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 割り算ã®çµæžœã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple.md)。 + +**例** + +クエリ: + +```sql +SELECT tupleDivideByNumber((1, 2), 0.5); +``` + +çµæžœ: + +```text +┌─tupleDivideByNumber((1, 2), 0.5)─┠+│ (2,4) │ +└──────────────────────────────────┘ +``` + +## tupleConcat + +渡ã•ã‚ŒãŸã‚¿ãƒ—ルをçµåˆã—ã¾ã™ã€‚ + +``` sql +tupleConcat(tuples) +``` + +**引数** + +- `tuples` – ä»»æ„ã®æ•°ã®[Tuple](../data-types/tuple.md) åž‹ã®å¼•æ•°ã€‚ + +**例** + +``` sql +SELECT tupleConcat((1, 2), (3, 4), (true, false)) AS res +``` + +``` text +┌─res──────────────────┠+│ (1,2,3,4,true,false) │ +└──────────────────────┘ +``` + +## tupleIntDiv + +タプルã®åˆ†å­ã¨ã‚¿ãƒ—ルã®é™¤æ•°ã®æ•´æ•°éƒ¨ã®å‰²ã‚Šç®—ã‚’è¡Œã„ã€å•†ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +**構文** + +```sql +tupleIntDiv(tuple_num, tuple_div) +``` + +**パラメータ** + +- `tuple_num`: 分å­ã®å€¤ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple) of numeric type。 +- `tuple_div`: 除数ã®å€¤ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple) of numeric type。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `tuple_num` 㨠`tuple_div` ã®å•†ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple) of integer values。 + +**実装ã®è©³ç´°** + +- `tuple_num` ã¾ãŸã¯ `tuple_div` ã®ã„ãšã‚Œã‹ãŒéžæ•´æ•°å€¤ã‚’å«ã‚€å ´åˆã€çµæžœã¯å„éžæ•´æ•°ã®åˆ†å­ã¾ãŸã¯é™¤æ•°ã‚’最も近ã„æ•´æ•°ã«ä¸¸ã‚ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ +- ゼロ除算ã«ã¯ã‚¨ãƒ©ãƒ¼ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT tupleIntDiv((15, 10, 5), (5, 5, 5)); +``` + +çµæžœ: + +``` text +┌─tupleIntDiv((15, 10, 5), (5, 5, 5))─┠+│ (3,2,1) │ +└─────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT tupleIntDiv((15, 10, 5), (5.5, 5.5, 5.5)); +``` + +çµæžœ: + +``` text +┌─tupleIntDiv((15, 10, 5), (5.5, 5.5, 5.5))─┠+│ (2,1,0) │ +└───────────────────────────────────────────┘ +``` + +## tupleIntDivOrZero + +[tupleIntDiv](#tupleintdiv)ã¨åŒæ§˜ã«ã€ã‚¿ãƒ—ルã®åˆ†å­ã¨ã‚¿ãƒ—ルã®é™¤æ•°ã®æ•´æ•°éƒ¨ã®å‰²ã‚Šç®—ã‚’è¡Œã„ã€å•†ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚0ã®é™¤æ•°ã«å¯¾ã—ã¦ã‚¨ãƒ©ãƒ¼ã‚’スローã™ã‚‹ã®ã§ã¯ãªãã€å•†ã¨ã—ã¦0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +tupleIntDivOrZero(tuple_num, tuple_div) +``` + +- `tuple_num`: 分å­ã®å€¤ã®ã‚¿ãƒ—ル。 [Tuple](../data-types/tuple) of numeric type。 +- `tuple_div`: 除数ã®å€¤ã®ã‚¿ãƒ—ル。 [Tuple](../data-types/tuple) of numeric type。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `tuple_num` 㨠`tuple_div` ã®å•†ã®ã‚¿ãƒ—ル。 [Tuple](../data-types/tuple) of integer values。 +- 除数ãŒ0ã®å ´åˆã€å•†ã¨ã—ã¦0ã‚’è¿”ã—ã¾ã™ã€‚ + +**実装ã®è©³ç´°** + +- `tuple_num`ã¾ãŸã¯`tuple_div`ã®ã„ãšã‚Œã‹ãŒéžæ•´æ•°å€¤ã‚’å«ã‚€å ´åˆã€[tupleIntDiv](#tupleintdiv)ã®ã‚ˆã†ã«ã€å„éžæ•´æ•°ã®åˆ†å­ã¾ãŸã¯é™¤æ•°ã‚’最も近ã„æ•´æ•°ã«ä¸¸ã‚ã¦çµæžœã‚’計算ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT tupleIntDivOrZero((5, 10, 15), (0, 0, 0)); +``` + +çµæžœ: + +``` text +┌─tupleIntDivOrZero((5, 10, 15), (0, 0, 0))─┠+│ (0,0,0) │ +└───────────────────────────────────────────┘ +``` + +## tupleIntDivByNumber + +分å­ã‚¿ãƒ—ルを指定ã•ã‚ŒãŸé™¤æ•°ã§æ•´æ•°é™¤ç®—ã—ã€å•†ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +**構文** + +```sql +tupleIntDivByNumber(tuple_num, div) +``` + +**パラメータ** + +- `tuple_num`: 分å­ã®å€¤ã®ã‚¿ãƒ—ル。 [Tuple](../data-types/tuple) of numeric type。 +- `div`: 除数ã®å€¤ã€‚ [Numeric](../data-types/int-uint.md) type。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `tuple_num` 㨠`div`ã®å•†ã®ã‚¿ãƒ—ル。 [Tuple](../data-types/tuple) of integer values。 + +**実装ã®è©³ç´°** + +- `tuple_num`ã¾ãŸã¯`div`ã®ã„ãšã‚Œã‹ãŒéžæ•´æ•°å€¤ã‚’å«ã‚€å ´åˆã€çµæžœã¯å„éžæ•´æ•°ã®åˆ†å­ã¾ãŸã¯é™¤æ•°ã‚’最も近ã„æ•´æ•°ã«ä¸¸ã‚ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ +- 0ã§ã®é™¤ç®—ã«ã¯ã‚¨ãƒ©ãƒ¼ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT tupleIntDivByNumber((15, 10, 5), 5); +``` + +çµæžœ: + +``` text +┌─tupleIntDivByNumber((15, 10, 5), 5)─┠+│ (3,2,1) │ +└─────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT tupleIntDivByNumber((15.2, 10.7, 5.5), 5.8); +``` + +çµæžœ: + +``` text +┌─tupleIntDivByNumber((15.2, 10.7, 5.5), 5.8)─┠+│ (2,1,0) │ +└─────────────────────────────────────────────┘ +``` + +## tupleIntDivOrZeroByNumber + +[tupleIntDivByNumber](#tupleintdivbynumber)ã¨åŒæ§˜ã«ã€åˆ†å­ã‚¿ãƒ—ルを指定ã•ã‚ŒãŸé™¤æ•°ã§æ•´æ•°é™¤ç®—ã—ã€å•†ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚0ã®é™¤æ•°ã«å¯¾ã—ã¦ã‚¨ãƒ©ãƒ¼ã‚’スローã™ã‚‹ã®ã§ã¯ãªãã€å•†ã¨ã—ã¦0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +tupleIntDivOrZeroByNumber(tuple_num, div) +``` + +**パラメータ** + +- `tuple_num`: 分å­ã®å€¤ã®ã‚¿ãƒ—ル。 [Tuple](../data-types/tuple) of numeric type。 +- `div`: 除数ã®å€¤ã€‚ [Numeric](../data-types/int-uint.md) type。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `tuple_num` 㨠`div`ã®å•†ã®ã‚¿ãƒ—ル。 [Tuple](../data-types/tuple) of integer values。 +- 除数ãŒ0ã®å ´åˆã€å•†ã¨ã—ã¦0ã‚’è¿”ã—ã¾ã™ã€‚ + +**実装ã®è©³ç´°** + +- `tuple_num`ã¾ãŸã¯`div`ã®ã„ãšã‚Œã‹ãŒéžæ•´æ•°å€¤ã‚’å«ã‚€å ´åˆã€[tupleIntDivByNumber](#tupleintdivbynumber)ã®ã‚ˆã†ã«ã€å„éžæ•´æ•°ã®åˆ†å­ã¾ãŸã¯é™¤æ•°ã‚’最も近ã„æ•´æ•°ã«ä¸¸ã‚ã¦çµæžœã‚’計算ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT tupleIntDivOrZeroByNumber((15, 10, 5), 5); +``` + +çµæžœ: + +``` text +┌─tupleIntDivOrZeroByNumber((15, 10, 5), 5)─┠+│ (3,2,1) │ +└───────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT tupleIntDivOrZeroByNumber((15, 10, 5), 0) +``` + +çµæžœ: + +``` text +┌─tupleIntDivOrZeroByNumber((15, 10, 5), 0)─┠+│ (0,0,0) │ +└───────────────────────────────────────────┘ +``` + +## tupleModulo + +2ã¤ã®ã‚¿ãƒ—ルã®é™¤ç®—æ“作ã®å‰°ä½™ï¼ˆä½™ã‚Šï¼‰ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +**構文** + +```sql +tupleModulo(tuple_num, tuple_mod) +``` + +**パラメータ** + +- `tuple_num`: 分å­ã®å€¤ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple) of numeric type。 +- `tuple_div`: 剰余ã®å€¤ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple) of numeric type。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `tuple_num` 㨠`tuple_div`ã®ä½™ã‚Šã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple) of non-zero integer values。 +- ゼロã§ã®é™¤ç®—ã«ã¯ã‚¨ãƒ©ãƒ¼ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT tupleModulo((15, 10, 5), (5, 3, 2)); +``` + +çµæžœ: + +``` text +┌─tupleModulo((15, 10, 5), (5, 3, 2))─┠+│ (0,1,1) │ +└─────────────────────────────────────┘ +``` + +## tupleModuloByNumber + +指定ã•ã‚ŒãŸé™¤æ•°ã§ã‚¿ãƒ—ルã®é™¤ç®—æ“作ã®å‰°ä½™ï¼ˆä½™ã‚Šï¼‰ã®ã‚¿ãƒ—ルを返ã—ã¾ã™ã€‚ + +**構文** + +```sql +tupleModuloByNumber(tuple_num, div) +``` + +**パラメータ** + +- `tuple_num`: 分å­ã®å€¤ã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple) of numeric type。 +- `div`: 除数ã®å€¤ã€‚ [Numeric](../data-types/int-uint.md) type。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `tuple_num` 㨠`div`ã®ä½™ã‚Šã®ã‚¿ãƒ—ル。[Tuple](../data-types/tuple) of non-zero integer values。 +- ゼロã§ã®é™¤ç®—ã«ã¯ã‚¨ãƒ©ãƒ¼ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT tupleModuloByNumber((15, 10, 5), 2); +``` + +çµæžœ: + +``` text +┌─tupleModuloByNumber((15, 10, 5), 2)─┠+│ (1,0,1) │ +└─────────────────────────────────────┘ +``` + +## flattenTuple + +ãƒã‚¹ãƒˆã•ã‚ŒãŸåå‰ä»˜ã `input` タプルã‹ã‚‰å¹³å¦åŒ–ã•ã‚ŒãŸ `output` タプルを返ã—ã¾ã™ã€‚`output` タプルã®è¦ç´ ã¯å…ƒã® `input` タプルã‹ã‚‰ã®ãƒ‘スã§ã™ã€‚例: `Tuple(a Int, Tuple(b Int, c Int)) -> Tuple(a Int, b Int, c Int)`。`flattenTuple` を使用ã—ã¦ã€`Object` タイプã‹ã‚‰ã®ã™ã¹ã¦ã®ãƒ‘スを別々ã®ã‚«ãƒ©ãƒ ã¨ã—ã¦é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +```sql +flattenTuple(input) +``` + +**パラメータ** + +- `input`: å¹³å¦åŒ–ã™ã‚‹ãƒã‚¹ãƒˆã•ã‚ŒãŸåå‰ä»˜ãタプル。[Tuple](../data-types/tuple)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 元㮠`input` ã‹ã‚‰ã®ãƒ‘スãŒè¦ç´ ã¨ãªã‚‹ `output` タプル。[Tuple](../data-types/tuple)。 + +**例** + +クエリ: + +``` sql +CREATE TABLE t_flatten_tuple(t Tuple(t1 Nested(a UInt32, s String), b UInt32, t2 Tuple(k String, v UInt32))) ENGINE = Memory; +INSERT INTO t_flatten_tuple VALUES (([(1, 'a'), (2, 'b')], 3, ('c', 4))); +SELECT flattenTuple(t) FROM t_flatten_tuple; +``` + +çµæžœ: + +``` text +┌─flattenTuple(t)───────────┠+│ ([1,2],['a','b'],3,'c',4) │ +└───────────────────────────┘ +``` + +## è·é›¢é–¢æ•° + +ã™ã¹ã¦ã®ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る関数ã¯[è·é›¢é–¢æ•°ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](../../sql-reference/functions/distance-functions.md)ã§èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/functions/tuple-map-functions.md b/docs/ja/sql-reference/functions/tuple-map-functions.md new file mode 100644 index 00000000000..1d467d2433e --- /dev/null +++ b/docs/ja/sql-reference/functions/tuple-map-functions.md @@ -0,0 +1,937 @@ +--- +slug: /ja/sql-reference/functions/tuple-map-functions +sidebar_position: 120 +sidebar_label: マップ +--- + +## map + +キーã¨å€¤ã®ãƒšã‚¢ã‹ã‚‰[Map(key, value)](../data-types/map.md)åž‹ã®å€¤ã‚’作æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +map(key1, value1[, key2, value2, ...]) +``` + +**引数** + +- `key_n` — マップエントリã®ã‚­ãƒ¼ã€‚[Map](../data-types/map.md)ã®ã‚­ãƒ¼åž‹ã¨ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ä»»æ„ã®åž‹ã€‚ +- `value_n` — マップエントリã®å€¤ã€‚[Map](../data-types/map.md)ã®å€¤åž‹ã¨ã—ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ä»»æ„ã®åž‹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `key:value`ペアをå«ã‚€ãƒžãƒƒãƒ—。[Map(key, value)](../data-types/map.md)。 + +**例** + +クエリ: + +```sql +SELECT map('key1', number, 'key2', number * 2) FROM numbers(3); +``` + +çµæžœ: + +``` text +┌─map('key1', number, 'key2', multiply(number, 2))─┠+│ {'key1':0,'key2':0} │ +│ {'key1':1,'key2':2} │ +│ {'key1':2,'key2':4} │ +└──────────────────────────────────────────────────┘ +``` + +## mapFromArrays + +キーã®é…列ã¾ãŸã¯ãƒžãƒƒãƒ—ã¨å€¤ã®é…列ã¾ãŸã¯ãƒžãƒƒãƒ—ã‹ã‚‰ãƒžãƒƒãƒ—を作æˆã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€æ§‹æ–‡ `CAST([...], 'Map(key_type, value_type)')` ã®ä¾¿åˆ©ãªä»£æ›¿ã§ã™ã€‚ +例ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ã代ã‚ã‚Šã« +- `CAST((['aa', 'bb'], [4, 5]), 'Map(String, UInt32)')`ã€ã¾ãŸã¯ +- `CAST([('aa',4), ('bb',5)], 'Map(String, UInt32)')` + +`mapFromArrays(['aa', 'bb'], [4, 5])` ã¨æ›¸ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +```sql +mapFromArrays(keys, values) +``` + +別å: `MAP_FROM_ARRAYS(keys, values)` + +**引数** + +- `keys` — キーã®é…列ã¾ãŸã¯ãƒžãƒƒãƒ— [Array](../data-types/array.md) ã¾ãŸã¯ [Map](../data-types/map.md)。`keys`ãŒé…列ã®å ´åˆã¯ã€ãã®åž‹ã¨ã—㦠`Array(Nullable(T))` ã¾ãŸã¯ `Array(LowCardinality(Nullable(T)))` を許容ã—ã¾ã™ãŒã€NULL値ã¯å«ã‚ã¾ã›ã‚“。 +- `values` — 値ã®é…列ã¾ãŸã¯ãƒžãƒƒãƒ— [Array](../data-types/array.md) ã¾ãŸã¯ [Map](../data-types/map.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- キーé…列ã¨å€¤é…列/マップã‹ã‚‰æ§‹æˆã•ã‚ŒãŸã‚­ãƒ¼ã¨å€¤ã‚’æŒã¤ãƒžãƒƒãƒ—。 + +**例** + +クエリ: + +```sql +select mapFromArrays(['a', 'b', 'c'], [1, 2, 3]) +``` + +çµæžœ: + +``` +┌─mapFromArrays(['a', 'b', 'c'], [1, 2, 3])─┠+│ {'a':1,'b':2,'c':3} │ +└───────────────────────────────────────────┘ +``` + +`mapFromArrays` 㯠[Map](../data-types/map.md) åž‹ã®å¼•æ•°ã‚‚å—ã‘入れã¾ã™ã€‚ã“れらã¯å®Ÿè¡Œä¸­ã«ã‚¿ãƒ—ルã®é…列ã«ã‚­ãƒ£ã‚¹ãƒˆã•ã‚Œã¾ã™ã€‚ + +```sql +SELECT mapFromArrays([1, 2, 3], map('a', 1, 'b', 2, 'c', 3)) +``` + +çµæžœ: + +``` +┌─mapFromArrays([1, 2, 3], map('a', 1, 'b', 2, 'c', 3))─┠+│ {1:('a',1),2:('b',2),3:('c',3)} │ +└───────────────────────────────────────────────────────┘ +``` + +```sql +SELECT mapFromArrays(map('a', 1, 'b', 2, 'c', 3), [1, 2, 3]) +``` + +çµæžœ: + +``` +┌─mapFromArrays(map('a', 1, 'b', 2, 'c', 3), [1, 2, 3])─┠+│ {('a',1):1,('b',2):2,('c',3):3} │ +└───────────────────────────────────────────────────────┘ +``` + +## extractKeyValuePairs + +キーã¨å€¤ã®ãƒšã‚¢ã‚’å«ã‚€æ–‡å­—列を[Map(String, String)](../data-types/map.md)ã«å¤‰æ›ã—ã¾ã™ã€‚ +解æžã¯ãƒŽã‚¤ã‚ºï¼ˆä¾‹: ログファイル)ã«å¯¾ã—ã¦å¯›å®¹ã§ã™ã€‚ +入力文字列ã®ã‚­ãƒ¼ã¨å€¤ã®ãƒšã‚¢ã¯ã€ã‚­ãƒ¼ã€ã‚­ãƒ¼ã¨å€¤ã®åŒºåˆ‡ã‚Šæ–‡å­—ã€å€¤ã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +キーã¨å€¤ã®ãƒšã‚¢ã¯ãƒšã‚¢åŒºåˆ‡ã‚Šæ–‡å­—ã§åŒºåˆ‡ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ +キーã¨å€¤ã¯å¼•ç”¨ç¬¦ã§å›²ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +``` sql +extractKeyValuePairs(data[, key_value_delimiter[, pair_delimiter[, quoting_character]]]) +``` + +別å: +- `str_to_map` +- `mapFromString` + +**引数** + +- `data` - キーã¨å€¤ã®ãƒšã‚¢ã‚’抽出ã™ã‚‹ãŸã‚ã®æ–‡å­—列。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 +- `key_value_delimiter` - キーã¨å€¤ã‚’区切るå˜ä¸€æ–‡å­—。デフォルト㯠`:`。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 +- `pair_delimiters` - ペアを区切る文字ã®ã‚»ãƒƒãƒˆã€‚デフォルト㯠` `, `,` ãŠã‚ˆã³ `;`。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 +- `quoting_character` - 引用符ã¨ã—ã¦ä½¿ã†å˜ä¸€æ–‡å­—。デフォルト㯠`"`。[String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- キーã¨å€¤ã®ãƒšã‚¢ã€‚[Map(String, String)](../data-types/map.md)åž‹ + +**例** + +クエリ + +``` sql +SELECT extractKeyValuePairs('name:neymar, age:31 team:psg,nationality:brazil') as kv +``` + +çµæžœ: + +``` result: +┌─kv──────────────────────────────────────────────────────────────────────┠+│ {'name':'neymar','age':'31','team':'psg','nationality':'brazil'} │ +└─────────────────────────────────────────────────────────────────────────┘ +``` + +å˜ä¸€å¼•ç”¨ç¬¦ `'` を引用符ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å ´åˆ: + +``` sql +SELECT extractKeyValuePairs('name:\'neymar\';\'age\':31;team:psg;nationality:brazil,last_key:last_value', ':', ';,', '\'') as kv +``` + +çµæžœ: + +``` text +┌─kv───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ {'name':'neymar','age':'31','team':'psg','nationality':'brazil','last_key':'last_value'} │ +└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +エスケープシーケンスをサãƒãƒ¼ãƒˆã—ãªã„å ´åˆ: + +``` sql +SELECT extractKeyValuePairs('age:a\\x0A\\n\\0') AS kv +``` + +çµæžœ: + +``` text +┌─kv─────────────────────┠+│ {'age':'a\\x0A\\n\\0'} │ +└────────────────────────┘ +``` + +`toString`ã§ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚ŒãŸãƒžãƒƒãƒ—文字列ã®ã‚­ãƒ¼ã¨å€¤ã®ãƒšã‚¢ã‚’復元ã™ã‚‹ã«ã¯: + +```sql +SELECT + map('John', '33', 'Paula', '31') AS m, + toString(m) as map_serialized, + extractKeyValuePairs(map_serialized, ':', ',', '\'') AS map_restored +FORMAT Vertical; +``` + +çµæžœ: + +``` +Row 1: +────── +m: {'John':'33','Paula':'31'} +map_serialized: {'John':'33','Paula':'31'} +map_restored: {'John':'33','Paula':'31'} +``` + +## extractKeyValuePairsWithEscaping + +`extractKeyValuePairs`ã¨åŒã˜ã§ã™ãŒã€ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るエスケープシーケンス: `\x`, `\N`, `\a`, `\b`, `\e`, `\f`, `\n`, `\r`, `\t`, `\v` ãŠã‚ˆã³ `\0`。 +éžæ¨™æº–ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスã¯ã€ãã®ã¾ã¾ï¼ˆãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’å«ã‚€ï¼‰è¿”ã•ã‚Œã¾ã™ãŒã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã‚’除ãã¾ã™ï¼š`\\`, `'`, `"`, `backtick`, `/`, `=` ã¾ãŸã¯ ASCII制御文字(c <= 31)。 + +ã“ã®é–¢æ•°ã¯ã€ãƒ—リエスケープやãƒã‚¹ãƒˆã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ãŒé©åˆ‡ã§ãªã„ケースを満ãŸã—ã¾ã™ã€‚例ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªå…¥åŠ›æ–‡å­—列ãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š`a: "aaaa\"bbb"`。期待ã•ã‚Œã‚‹å‡ºåŠ›ã¯ï¼š`a: aaaa\"bbbb`。 +- プリエスケープ: プリエスケープã™ã‚‹ã¨ã€`a: "aaaa"bbb"` ã¨ãªã‚Šã€`extractKeyValuePairs` ã¯ãã®å¾Œ `a: aaaa` を出力ã—ã¾ã™ã€‚ +- ãƒã‚¹ãƒˆã‚¨ã‚¹ã‚±ãƒ¼ãƒ—: `extractKeyValuePairs` 㯠`a: aaaa\` を出力ã—ã€ãƒã‚¹ãƒˆã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã¯ãã®ã¾ã¾ä¿æŒã—ã¾ã™ã€‚ + +キーã®å‰ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã€å€¤ã«ã¯ç„¡åŠ¹ã¨ã¿ãªã•ã‚Œã¾ã™ã€‚ + +**例** + +エスケープシーケンスã«å¯¾ã™ã‚‹ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスサãƒãƒ¼ãƒˆã‚’有効ã«ã—ãŸå ´åˆ: + +``` sql +SELECT extractKeyValuePairsWithEscaping('age:a\\x0A\\n\\0') AS kv +``` + +çµæžœ: + +``` result +┌─kv────────────────┠+│ {'age':'a\n\n\0'} │ +└───────────────────┘ +``` + +## mapAdd + +ã™ã¹ã¦ã®ã‚­ãƒ¼ã‚’åŽé›†ã—ã€å¯¾å¿œã™ã‚‹å€¤ã‚’åˆè¨ˆã—ã¾ã™ã€‚ + +**構文** + +```sql +mapAdd(arg1, arg2 [, ...]) +``` + +**引数** + +引数ã¯2ã¤ã®[é…列](../data-types/array.md#data-type-array)ã®[タプル](../data-types/tuple.md#tuplet1-t2)ã¾ãŸã¯[マップ](../data-types/map.md)ã§ã€æœ€åˆã®é…列ã®ã‚¢ã‚¤ãƒ†ãƒ ãŒã‚­ãƒ¼ã‚’表ã—ã€2ã¤ç›®ã®é…列ãŒå„キーã®å€¤ã‚’å«ã¿ã¾ã™ã€‚ã™ã¹ã¦ã®ã‚­ãƒ¼é…列ã¯åŒã˜åž‹ã‚’æŒã¡ã€ã™ã¹ã¦ã®å€¤é…列ã¯ã€1ã¤ã®åž‹ ([Int64](../data-types/int-uint.md#int-ranges)ã€[UInt64](../data-types/int-uint.md#uint-ranges) ã¾ãŸã¯ [Float64](../data-types/float.md#float32-float64)) ã«æ˜‡æ ¼ã•ã‚Œã‚‹é …目をå«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚共通ã®æ˜‡æ ¼åž‹ãŒçµæžœé…列ã®åž‹ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã«å¿œã˜ã¦ã€1ã¤ã®[マップ](../data-types/map.md)ã‹ã€ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸã‚­ãƒ¼ã‚’å«ã‚€æœ€åˆã®é…列ã¨ã€ãã®ã‚­ãƒ¼ã«å¯¾å¿œã™ã‚‹å€¤ã‚’å«ã‚€2ã¤ç›®ã®é…列をæŒã¤[タプル](../data-types/tuple.md#tuplet1-t2)ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**例** + +`Map`型を使ã£ãŸã‚¯ã‚¨ãƒª: + +```sql +SELECT mapAdd(map(1,1), map(1,1)); +``` + +çµæžœ: + +```text +┌─mapAdd(map(1, 1), map(1, 1))─┠+│ {1:2} │ +└──────────────────────────────┘ +``` + +タプルを使ã£ãŸã‚¯ã‚¨ãƒª: + +```sql +SELECT mapAdd(([toUInt8(1), 2], [1, 1]), ([toUInt8(1), 2], [1, 1])) as res, toTypeName(res) as type; +``` + +çµæžœ: + +```text +┌─res───────────┬─type───────────────────────────────┠+│ ([1,2],[2,2]) │ Tuple(Array(UInt8), Array(UInt64)) │ +└───────────────┴────────────────────────────────────┘ +``` + +## mapSubtract + +ã™ã¹ã¦ã®ã‚­ãƒ¼ã‚’åŽé›†ã—ã€å¯¾å¿œã™ã‚‹å€¤ã‚’減算ã—ã¾ã™ã€‚ + +**構文** + +```sql +mapSubtract(Tuple(Array, Array), Tuple(Array, Array) [, ...]) +``` + +**引数** + +引数ã¯2ã¤ã®[é…列](../data-types/array.md#data-type-array)ã®[タプル](../data-types/tuple.md#tuplet1-t2)ã¾ãŸã¯[マップ](../data-types/map.md)ã§ã€æœ€åˆã®é…列ã®ã‚¢ã‚¤ãƒ†ãƒ ãŒã‚­ãƒ¼ã‚’表ã—ã€2ã¤ç›®ã®é…列ãŒå„キーã®å€¤ã‚’å«ã¿ã¾ã™ã€‚ã™ã¹ã¦ã®ã‚­ãƒ¼é…列ã¯åŒã˜åž‹ã‚’æŒã¡ã€ã™ã¹ã¦ã®å€¤é…列ã¯ã€1ã¤ã®åž‹ ([Int64](../data-types/int-uint.md#int-ranges)ã€[UInt64](../data-types/int-uint.md#uint-ranges) ã¾ãŸã¯ [Float64](../data-types/float.md#float32-float64)) ã«æ˜‡æ ¼ã•ã‚Œã‚‹é …目をå«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚共通ã®æ˜‡æ ¼åž‹ãŒçµæžœé…列ã®åž‹ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã«å¿œã˜ã¦ã€1ã¤ã®[マップ](../data-types/map.md)ã‹ã€ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸã‚­ãƒ¼ã‚’å«ã‚€æœ€åˆã®é…列ã¨ã€ãã®ã‚­ãƒ¼ã«å¯¾å¿œã™ã‚‹å€¤ã‚’å«ã‚€2ã¤ç›®ã®é…列をæŒã¤[タプル](../data-types/tuple.md#tuplet1-t2)ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**例** + +`Map`型を使ã£ãŸã‚¯ã‚¨ãƒª: + +```sql +SELECT mapSubtract(map(1,1), map(1,1)); +``` + +çµæžœ: + +```text +┌─mapSubtract(map(1, 1), map(1, 1))─┠+│ {1:0} │ +└───────────────────────────────────┘ +``` + +タプルマップを使ã£ãŸã‚¯ã‚¨ãƒª: + +```sql +SELECT mapSubtract(([toUInt8(1), 2], [toInt32(1), 1]), ([toUInt8(1), 2], [toInt32(2), 1])) as res, toTypeName(res) as type; +``` + +çµæžœ: + +```text +┌─res────────────┬─type──────────────────────────────┠+│ ([1,2],[-1,0]) │ Tuple(Array(UInt8), Array(Int64)) │ +└────────────────┴───────────────────────────────────┘ +``` + +## mapPopulateSeries + +整数キーをæŒã¤ãƒžãƒƒãƒ—ã®æ¬ è½ã—ã¦ã„るキーã¨å€¤ã®ãƒšã‚¢ã‚’埋ã‚ã¾ã™ã€‚ +最大キーを指定ã™ã‚‹ã“ã¨ã§ã€ã‚­ãƒ¼ã‚’最大値を超ãˆã¦æ‹¡å¼µã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +具体的ã«ã¯ã€ã“ã®é–¢æ•°ã¯ãƒžãƒƒãƒ—ã®ã‚­ãƒ¼ã‚’ã€æœ€å°ã‹ã‚‰æœ€å¤§ã¾ã§ã®å€¤ï¼ˆã¾ãŸã¯æŒ‡å®šã•ã‚ŒãŸ `max` 引数)ã«1ã®ã‚¹ãƒ†ãƒƒãƒ—サイズã§å½¢æˆã—ã€å¯¾å¿œã™ã‚‹å€¤ã‚’æŒã¤ãƒžãƒƒãƒ—ã‚’è¿”ã—ã¾ã™ã€‚ +値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„キーã®å ´åˆã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +キーãŒé‡è¤‡ã™ã‚‹å ´åˆã¯ã€æœ€åˆã®å€¤ï¼ˆå‡ºç¾é †ã«ï¼‰ã ã‘ãŒãã®ã‚­ãƒ¼ã«é–¢é€£ä»˜ã‘られã¾ã™ã€‚ + +**構文** + +```sql +mapPopulateSeries(map[, max]) +mapPopulateSeries(keys, values[, max]) +``` + +é…列ã®å¼•æ•°ã«ã¤ã„ã¦ã¯ã€`keys` 㨠`values` ã®å„行内ã®è¦ç´ æ•°ã¯åŒã˜ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**引数** + +引数ã¯ã€æ•´æ•°ã‚­ãƒ¼ã‚’æŒã¤[マップ](../data-types/map.md)ã¾ãŸã¯2ã¤ã®[é…列](../data-types/array.md#data-type-array)ã§ã€æœ€åˆã¨2番目ã®é…列ãŒå„キーã®ã‚­ãƒ¼ã¨å€¤ã‚’å«ã¿ã¾ã™ã€‚ + +マップã•ã‚ŒãŸé…列: + +- `map` — 整数キーをæŒã¤ãƒžãƒƒãƒ—。[Map](../data-types/map.md)。 + +ã¾ãŸã¯ + +- `keys` — キーã®é…列。[Array](../data-types/array.md#data-type-array)([Int](../data-types/int-uint.md#uint-ranges))。 +- `values` — 値ã®é…列。[Array](../data-types/array.md#data-type-array)([Int](../data-types/int-uint.md#uint-ranges))。 +- `max` — 最大キー値。オプション。[Int8, Int16, Int32, Int64, Int128, Int256](../data-types/int-uint.md#int-ranges)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã«å¿œã˜ã¦ã€ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸé †åºã«ã‚るキーをå«ã‚€[Map](../data-types/map.md)ã¾ãŸã¯2ã¤ã®[é…列](../data-types/array.md#data-type-array)ã‚’æŒã¤[タプル](../data-types/tuple.md#tuplet1-t2): キーã«å¯¾å¿œã™ã‚‹å€¤ã‚’æŒã¤ã€‚ + +**例** + +`Map`型を使ã£ãŸã‚¯ã‚¨ãƒª: + +```sql +SELECT mapPopulateSeries(map(1, 10, 5, 20), 6); +``` + +çµæžœ: + +```text +┌─mapPopulateSeries(map(1, 10, 5, 20), 6)─┠+│ {1:10,2:0,3:0,4:0,5:20,6:0} │ +└─────────────────────────────────────────┘ +``` + +マップã•ã‚ŒãŸé…列を使ã£ãŸã‚¯ã‚¨ãƒª: + +```sql +SELECT mapPopulateSeries([1,2,4], [11,22,44], 5) AS res, toTypeName(res) AS type; +``` + +çµæžœ: + +```text +┌─res──────────────────────────┬─type──────────────────────────────┠+│ ([1,2,3,4,5],[11,22,0,44,0]) │ Tuple(Array(UInt8), Array(UInt8)) │ +└──────────────────────────────┴───────────────────────────────────┘ +``` + +## mapContains + +指定ã•ã‚ŒãŸã‚­ãƒ¼ãŒæŒ‡å®šã•ã‚ŒãŸãƒžãƒƒãƒ—ã«å«ã¾ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +mapContains(map, key) +``` + +**引数** + +- `map` — マップ。[Map](../data-types/map.md)。 +- `key` — キー。`map` ã®ã‚­ãƒ¼åž‹ã¨ä¸€è‡´ã™ã‚‹åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `map` ㌠`key` ã‚’å«ã‚€å ´åˆã¯ `1`ã€å«ã¾ãªã„å ´åˆã¯ `0`。[UInt8](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +CREATE TABLE tab (a Map(String, String)) ENGINE = Memory; + +INSERT INTO tab VALUES ({'name':'eleven','age':'11'}), ({'number':'twelve','position':'6.0'}); + +SELECT mapContains(a, 'name') FROM tab; + +``` + +çµæžœ: + +```text +┌─mapContains(a, 'name')─┠+│ 1 │ +│ 0 │ +└────────────────────────┘ +``` + +## mapKeys + +指定ã•ã‚ŒãŸãƒžãƒƒãƒ—ã®ã‚­ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€è¨­å®š [optimize_functions_to_subcolumns](../../operations/settings/settings.md#optimize-functions-to-subcolumns) を有効ã«ã™ã‚‹ã“ã¨ã§æœ€é©åŒ–ã§ãã¾ã™ã€‚ +設定を有効ã«ã™ã‚‹ã¨ã€é–¢æ•°ã¯ãƒžãƒƒãƒ—全体ã®ä»£ã‚ã‚Šã« [keys](../data-types/map.md#map-subcolumns) サブカラムã®ã¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ +クエリ `SELECT mapKeys(m) FROM table` 㯠`SELECT m.keys FROM table` ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +mapKeys(map) +``` + +**引数** + +- `map` — マップ。[Map](../data-types/map.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `map` ã‹ã‚‰ã™ã¹ã¦ã®ã‚­ãƒ¼ã‚’å«ã‚€é…列。[Array](../data-types/array.md)。 + +**例** + +クエリ: + +```sql +CREATE TABLE tab (a Map(String, String)) ENGINE = Memory; + +INSERT INTO tab VALUES ({'name':'eleven','age':'11'}), ({'number':'twelve','position':'6.0'}); + +SELECT mapKeys(a) FROM tab; +``` + +çµæžœ: + +```text +┌─mapKeys(a)────────────┠+│ ['name','age'] │ +│ ['number','position'] │ +└───────────────────────┘ +``` + +## mapValues + +指定ã•ã‚ŒãŸãƒžãƒƒãƒ—ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€è¨­å®š [optimize_functions_to_subcolumns](../../operations/settings/settings.md#optimize-functions-to-subcolumns) を有効ã«ã™ã‚‹ã“ã¨ã§æœ€é©åŒ–ã§ãã¾ã™ã€‚ +設定を有効ã«ã™ã‚‹ã¨ã€é–¢æ•°ã¯ãƒžãƒƒãƒ—全体ã®ä»£ã‚ã‚Šã« [values](../data-types/map.md#map-subcolumns) サブカラムã®ã¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ +クエリ `SELECT mapValues(m) FROM table` 㯠`SELECT m.values FROM table` ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +mapValues(map) +``` + +**引数** + +- `map` — マップ。[Map](../data-types/map.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `map` ã‹ã‚‰ã™ã¹ã¦ã®å€¤ã‚’å«ã‚€é…列。[Array](../data-types/array.md)。 + +**例** + +クエリ: + +```sql +CREATE TABLE tab (a Map(String, String)) ENGINE = Memory; + +INSERT INTO tab VALUES ({'name':'eleven','age':'11'}), ({'number':'twelve','position':'6.0'}); + +SELECT mapValues(a) FROM tab; +``` + +çµæžœ: + +```text +┌─mapValues(a)─────┠+│ ['eleven','11'] │ +│ ['twelve','6.0'] │ +└──────────────────┘ +``` + +## mapContainsKeyLike + +**構文** + +```sql +mapContainsKeyLike(map, pattern) +``` + +**引数** +- `map` — マップ。[Map](../data-types/map.md)。 +- `pattern` - マッãƒãƒ³ã‚°ã™ã‚‹æ–‡å­—列パターン。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã—ãŸãƒ‘ターンã«ãƒžãƒƒãƒã™ã‚‹ `key` ㌠`map` ã«å«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã¯ `1`ã€ãã†ã§ãªã„å ´åˆã¯ `0`。 + +**例** + +クエリ: + +```sql +CREATE TABLE tab (a Map(String, String)) ENGINE = Memory; + +INSERT INTO tab VALUES ({'abc':'abc','def':'def'}), ({'hij':'hij','klm':'klm'}); + +SELECT mapContainsKeyLike(a, 'a%') FROM tab; +``` + +çµæžœ: + +```text +┌─mapContainsKeyLike(a, 'a%')─┠+│ 1 │ +│ 0 │ +└─────────────────────────────┘ +``` + +## mapExtractKeyLike + +文字列キーをæŒã¤ãƒžãƒƒãƒ—ã¨LIKEパターンを与ãˆã‚‹ã¨ã€ã“ã®é–¢æ•°ã¯ã‚­ãƒ¼ãŒãƒ‘ターンã¨ä¸€è‡´ã™ã‚‹è¦ç´ ã‚’æŒã¤ãƒžãƒƒãƒ—ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +mapExtractKeyLike(map, pattern) +``` + +**引数** + +- `map` — マップ。[Map](../data-types/map.md)。 +- `pattern` - マッãƒãƒ³ã‚°ã™ã‚‹æ–‡å­—列パターン。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã—ãŸãƒ‘ターンã«ä¸€è‡´ã™ã‚‹ã‚­ãƒ¼ã‚’æŒã¤è¦ç´ ã‚’å«ã‚€ãƒžãƒƒãƒ—。一致ã™ã‚‹è¦ç´ ãŒãªã„å ´åˆã¯ã€ç©ºã®ãƒžãƒƒãƒ—ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +CREATE TABLE tab (a Map(String, String)) ENGINE = Memory; + +INSERT INTO tab VALUES ({'abc':'abc','def':'def'}), ({'hij':'hij','klm':'klm'}); + +SELECT mapExtractKeyLike(a, 'a%') FROM tab; +``` + +çµæžœ: + +```text +┌─mapExtractKeyLike(a, 'a%')─┠+│ {'abc':'abc'} │ +│ {} │ +└────────────────────────────┘ +``` + +## mapApply + +マップã®å„è¦ç´ ã«é–¢æ•°ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +**構文** + +```sql +mapApply(func, map) +``` + +**引数** + +- `func` — [ラムダ関数](../../sql-reference/functions/index.md#higher-order-functions---operator-and-lambdaparams-expr-function)。 +- `map` — [マップ](../data-types/map.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å„è¦ç´ ã« `func(map1[i], ..., mapN[i])` ã‚’é©ç”¨ã—ã¦å¾—られるオリジナルã®ãƒžãƒƒãƒ—ã‹ã‚‰ãƒžãƒƒãƒ—ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT mapApply((k, v) -> (k, v * 10), _map) AS r +FROM +( + SELECT map('key1', number, 'key2', number * 2) AS _map + FROM numbers(3) +) +``` + +çµæžœ: + +```text +┌─r─────────────────────┠+│ {'key1':0,'key2':0} │ +│ {'key1':10,'key2':20} │ +│ {'key1':20,'key2':40} │ +└───────────────────────┘ +``` + +## mapFilter + +マップã®å„è¦ç´ ã«é–¢æ•°ã‚’é©ç”¨ã—ã¦ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ã¾ã™ã€‚ + +**構文** + +```sql +mapFilter(func, map) +``` + +**引数** + +- `func` - [ラムダ関数](../../sql-reference/functions/index.md#higher-order-functions---operator-and-lambdaparams-expr-function)。 +- `map` — [マップ](../data-types/map.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `func(map1[i], ..., mapN[i])` ãŒ0以外ã®ã‚‚ã®ã‚’è¿”ã™`map`内ã®è¦ç´ ã®ã¿ã‚’å«ã‚€ãƒžãƒƒãƒ—ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT mapFilter((k, v) -> ((v % 2) = 0), _map) AS r +FROM +( + SELECT map('key1', number, 'key2', number * 2) AS _map + FROM numbers(3) +) +``` + +çµæžœ: + +```text +┌─r───────────────────┠+│ {'key1':0,'key2':0} │ +│ {'key2':2} │ +│ {'key1':2,'key2':4} │ +└─────────────────────┘ +``` + +## mapUpdate + +**構文** + +```sql +mapUpdate(map1, map2) +``` + +**引数** + +- `map1` [マップ](../data-types/map.md)。 +- `map2` [マップ](../data-types/map.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- map2ã®å¯¾å¿œã‚­ãƒ¼ã«å¯¾ã™ã‚‹å€¤ãŒæ›´æ–°ã•ã‚ŒãŸmap1ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT mapUpdate(map('key1', 0, 'key3', 0), map('key1', 10, 'key2', 10)) AS map; +``` + +çµæžœ: + +```text +┌─map────────────────────────────┠+│ {'key3':0,'key1':10,'key2':10} │ +└────────────────────────────────┘ +``` + +## mapConcat + +キーã®ç­‰ä¾¡æ€§ã«åŸºã¥ã„ã¦è¤‡æ•°ã®ãƒžãƒƒãƒ—を連çµã—ã¾ã™ã€‚ +åŒã˜ã‚­ãƒ¼ã‚’æŒã¤è¦ç´ ãŒè¤‡æ•°ã®å…¥åŠ›ãƒžãƒƒãƒ—ã«å­˜åœ¨ã™ã‚‹å ´åˆã€ã™ã¹ã¦ã®è¦ç´ ãŒçµæžœãƒžãƒƒãƒ—ã«è¿½åŠ ã•ã‚Œã¾ã™ãŒã€æ¼”ç®—å­ `[]` を介ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã®ã¯æœ€åˆã®è¦ç´ ã ã‘ã§ã™ã€‚ + +**構文** + +```sql +mapConcat(maps) +``` + +**引数** + +- `maps` – ä»»æ„ã®æ•°ã®[マップ](../data-types/map.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã¨ã—ã¦æ¸¡ã•ã‚ŒãŸãƒžãƒƒãƒ—を連çµã—ãŸãƒžãƒƒãƒ—ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT mapConcat(map('key1', 1, 'key3', 3), map('key2', 2)) AS map; +``` + +çµæžœ: + +```text +┌─map──────────────────────────┠+│ {'key1':1,'key3':3,'key2':2} │ +└──────────────────────────────┘ +``` + +クエリ: + +```sql +SELECT mapConcat(map('key1', 1, 'key2', 2), map('key1', 3)) AS map, map['key1']; +``` + +çµæžœ: + +```text +┌─map──────────────────────────┬─elem─┠+│ {'key1':1,'key2':2,'key1':3} │ 1 │ +└──────────────────────────────┴──────┘ +``` + +## mapExists(\[func,\], map) + +`map`ã®å°‘ãªãã¨ã‚‚1ã¤ã®ã‚­ãƒ¼-値ã®ãƒšã‚¢ãŒå­˜åœ¨ã—ã€`func(key, value)` ãŒ0以外を返ã™å ´åˆã«1ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +:::note +`mapExists` 㯠[高次関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã™ã€‚ +最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT mapExists((k, v) -> (v = 1), map('k1', 1, 'k2', 2)) AS res +``` + +çµæžœ: + +``` +┌─res─┠+│ 1 │ +└─────┘ +``` + +## mapAll(\[func,\] map) + +`map`ã®ã™ã¹ã¦ã®ã‚­ãƒ¼-値ã®ãƒšã‚¢ã«å¯¾ã—ã¦`func(key, value)`ãŒ0以外を返ã™å ´åˆã«1ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +:::note +`mapAll` 㯠[高次関数](../../sql-reference/functions/index.md#higher-order-functions)ã§ã™ã€‚ +最åˆã®å¼•æ•°ã¨ã—ã¦ãƒ©ãƒ ãƒ€é–¢æ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT mapAll((k, v) -> (v = 1), map('k1', 1, 'k2', 2)) AS res +``` + +çµæžœ: + +``` +┌─res─┠+│ 0 │ +└─────┘ +``` + +## mapSort(\[func,\], map) + +マップã®è¦ç´ ã‚’昇順ã«ã‚½ãƒ¼ãƒˆã—ã¾ã™ã€‚ +`func` 関数ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ãƒžãƒƒãƒ—ã®ã‚­ãƒ¼ã¨å€¤ã«é©ç”¨ã•ã‚ŒãŸ`func`関数ã®çµæžœã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆé †ãŒæ±ºã¾ã‚Šã¾ã™ã€‚ + +**例** + +``` sql +SELECT mapSort(map('key2', 2, 'key3', 1, 'key1', 3)) AS map; +``` + +``` text +┌─map──────────────────────────┠+│ {'key1':3,'key2':2,'key3':1} │ +└──────────────────────────────┘ +``` + +``` sql +SELECT mapSort((k, v) -> v, map('key2', 2, 'key3', 1, 'key1', 3)) AS map; +``` + +``` text +┌─map──────────────────────────┠+│ {'key3':1,'key2':2,'key1':3} │ +└──────────────────────────────┘ +``` + +詳細㯠`arraySort` 関数ã®[リファレンス](../../sql-reference/functions/array-functions.md#array_functions-sort)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## mapPartialSort + +部分的ãªã‚½ãƒ¼ãƒˆã‚’許å¯ã™ã‚‹ `limit` 引数を追加ã—ã¦ã€æ˜‡é †ã«ãƒžãƒƒãƒ—ã®è¦ç´ ã‚’ソートã—ã¾ã™ã€‚ +`func` 関数ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ãƒžãƒƒãƒ—ã®ã‚­ãƒ¼ã¨å€¤ã«é©ç”¨ã•ã‚ŒãŸ`func`関数ã®çµæžœã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆé †ãŒæ±ºã¾ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +mapPartialSort([func,] limit, map) +``` +**引数** + +- `func` – マップã®ã‚­ãƒ¼ã¨å€¤ã«é©ç”¨ã™ã‚‹ã‚ªãƒ—ションã®é–¢æ•°ã€‚[ラムダ関数](../../sql-reference/functions/index.md#higher-order-functions---operator-and-lambdaparams-expr-function)。 +- `limit` – ソートã•ã‚Œã‚‹è¦ç´ ã®ç¯„囲 [1..limit]。[(U)Int](../data-types/int-uint.md)。 +- `map` – ソートã™ã‚‹ãƒžãƒƒãƒ—。[Map](../data-types/map.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 部分的ã«ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸãƒžãƒƒãƒ—。[Map](../data-types/map.md)。 + +**例** + +``` sql +SELECT mapPartialSort((k, v) -> v, 2, map('k1', 3, 'k2', 1, 'k3', 2)); +``` + +``` text +┌─mapPartialSort(lambda(tuple(k, v), v), 2, map('k1', 3, 'k2', 1, 'k3', 2))─┠+│ {'k2':1,'k3':2,'k1':3} │ +└───────────────────────────────────────────────────────────────────────────┘ +``` + +## mapReverseSort(\[func,\], map) + +マップã®è¦ç´ ã‚’é™é †ã«ã‚½ãƒ¼ãƒˆã—ã¾ã™ã€‚ +`func` 関数ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ãƒžãƒƒãƒ—ã®ã‚­ãƒ¼ã¨å€¤ã«é©ç”¨ã•ã‚ŒãŸ`func`関数ã®çµæžœã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆé †ãŒæ±ºã¾ã‚Šã¾ã™ã€‚ + +**例** + +``` sql +SELECT mapReverseSort(map('key2', 2, 'key3', 1, 'key1', 3)) AS map; +``` + +``` text +┌─map──────────────────────────┠+│ {'key3':1,'key2':2,'key1':3} │ +└──────────────────────────────┘ +``` + +``` sql +SELECT mapReverseSort((k, v) -> v, map('key2', 2, 'key3', 1, 'key1', 3)) AS map; +``` + +``` text +┌─map──────────────────────────┠+│ {'key1':3,'key2':2,'key3':1} │ +└──────────────────────────────┘ +``` + +詳細㯠`arrayReverseSort` 関数ã®[リファレンス](../../sql-reference/functions/array-functions.md#array_functions-reverse-sort)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## mapPartialReverseSort + +追加ã®`limit`引数をæŒã¤éƒ¨åˆ†çš„ãªã‚½ãƒ¼ãƒˆã‚’許å¯ã—ãŸä¸Šã§ã€é™é †ã«ãƒžãƒƒãƒ—ã®è¦ç´ ã‚’ソートã—ã¾ã™ã€‚ +`func` 関数ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ãƒžãƒƒãƒ—ã®ã‚­ãƒ¼ã¨å€¤ã«é©ç”¨ã•ã‚ŒãŸ`func`関数ã®çµæžœã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆé †ãŒæ±ºã¾ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +mapPartialReverseSort([func,] limit, map) +``` +**引数** + +- `func` – マップã®ã‚­ãƒ¼ã¨å€¤ã«é©ç”¨ã™ã‚‹ã‚ªãƒ—ションã®é–¢æ•°ã€‚[ラムダ関数](../../sql-reference/functions/index.md#higher-order-functions---operator-and-lambdaparams-expr-function)。 +- `limit` – ソートã•ã‚Œã‚‹è¦ç´ ã®ç¯„囲 [1..limit]。[(U)Int](../data-types/int-uint.md)。 +- `map` – ソートã™ã‚‹ãƒžãƒƒãƒ—。[Map](../data-types/map.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 部分的ã«ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸãƒžãƒƒãƒ—。[Map](../data-types/map.md)。 + +**例** + +``` sql +SELECT mapPartialReverseSort((k, v) -> v, 2, map('k1', 3, 'k2', 1, 'k3', 2)); +``` + +``` text +┌─mapPartialReverseSort(lambda(tuple(k, v), v), 2, map('k1', 3, 'k2', 1, 'k3', 2))─┠+│ {'k1':3,'k3':2,'k2':1} │ +└──────────────────────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/type-conversion-functions.md b/docs/ja/sql-reference/functions/type-conversion-functions.md new file mode 100644 index 00000000000..ac13c9bb644 --- /dev/null +++ b/docs/ja/sql-reference/functions/type-conversion-functions.md @@ -0,0 +1,7261 @@ +--- +slug: /ja/sql-reference/functions/type-conversion-functions +sidebar_position: 185 +sidebar_label: åž‹å¤‰æ› +--- + +# 型変æ›é–¢æ•° + +## データ変æ›ã®ä¸€èˆ¬çš„ãªå•é¡Œ + +ClickHouseã¯ä¸€èˆ¬çš„ã«[C++ã®ãƒ—ログラムã¨åŒã˜æŒ¯ã‚‹èˆžã„](https://en.cppreference.com/w/cpp/language/implicit_conversion)ã‚’ã—ã¾ã™ã€‚ + +`to` 関数㨠[cast](#cast) ã¯ã€ã„ãã¤ã‹ã®ã‚±ãƒ¼ã‚¹ã§ç•°ãªã‚‹å‹•ä½œã‚’ã—ã¾ã™ã€‚例ãˆã°ã€[LowCardinality](../data-types/lowcardinality.md) ã®å ´åˆï¼š[cast](#cast) 㯠[LowCardinality](../data-types/lowcardinality.md)特性を削除ã—ã¾ã™ãŒã€`to` 関数ã¯ã—ã¾ã›ã‚“。åŒæ§˜ã« [Nullable](../data-types/nullable.md) ã®å ´åˆã€ã“ã®å‹•ä½œã¯SQL標準ã¨ã¯äº’æ›æ€§ãŒãªãã€[cast_keep_nullable](../../operations/settings/settings.md/#cast_keep_nullable)設定を使用ã—ã¦å¤‰æ›´å¯èƒ½ã§ã™ã€‚ + +:::note +データ型ã®å€¤ãŒå°ã•ã„データ型(例:`Int64` ã‹ã‚‰ `Int32` )ã«å¤‰æ›ã•ã‚Œã‚‹å ´åˆã‚„ã€äº’æ›æ€§ã®ãªã„データ型(例:`String` ã‹ã‚‰ `Int` )ã®é–“ã§ã®å¤‰æ›ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ­ã‚¹ã®å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。çµæžœãŒæœŸå¾…ã—ãŸé€šã‚Šã§ã‚ã‚‹ã‹ã‚’注æ„æ·±ã確èªã—ã¦ãã ã•ã„。 +::: + +例: + +```sql +SELECT + toTypeName(toLowCardinality('') AS val) AS source_type, + toTypeName(toString(val)) AS to_type_result_type, + toTypeName(CAST(val, 'String')) AS cast_result_type + +┌─source_type────────────┬─to_type_result_type────┬─cast_result_type─┠+│ LowCardinality(String) │ LowCardinality(String) │ String │ +└────────────────────────┴────────────────────────┴──────────────────┘ + +SELECT + toTypeName(toNullable('') AS val) AS source_type, + toTypeName(toString(val)) AS to_type_result_type, + toTypeName(CAST(val, 'String')) AS cast_result_type + +┌─source_type──────┬─to_type_result_type─┬─cast_result_type─┠+│ Nullable(String) │ Nullable(String) │ String │ +└──────────────────┴─────────────────────┴──────────────────┘ + +SELECT + toTypeName(toNullable('') AS val) AS source_type, + toTypeName(toString(val)) AS to_type_result_type, + toTypeName(CAST(val, 'String')) AS cast_result_type +SETTINGS cast_keep_nullable = 1 + +┌─source_type──────┬─to_type_result_type─┬─cast_result_type─┠+│ Nullable(String) │ Nullable(String) │ Nullable(String) │ +└──────────────────┴─────────────────────┴──────────────────┘ +``` + +## toBool + +入力値を[`Bool`](../data-types/boolean.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーãŒç™ºç”Ÿã—ãŸå ´åˆã¯ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +**構文** + +```sql +toBool(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ–‡å­—列を返ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256 åž‹ã®å€¤ã€‚ +- Float32/64 åž‹ã®å€¤ã€‚ +- 文字列 `true` ã¾ãŸã¯ `false`(大文字å°æ–‡å­—を区別ã—ãªã„)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 引数ã®è©•ä¾¡ã«åŸºã¥ã„㦠`true` ã¾ãŸã¯ `false` ã‚’è¿”ã—ã¾ã™ã€‚[Bool](../data-types/boolean.md)。 + +**例** + +クエリ: + +```sql +SELECT + toBool(toUInt8(1)), + toBool(toInt8(-1)), + toBool(toFloat32(1.01)), + toBool('true'), + toBool('false'), + toBool('FALSE') +FORMAT Vertical +``` + +çµæžœï¼š + +```response +toBool(toUInt8(1)): true +toBool(toInt8(-1)): true +toBool(toFloat32(1.01)): true +toBool('true'): true +toBool('false'): false +toBool('FALSE'): false +``` + +## toInt8 + +入力値を[`Int8`](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーãŒç™ºç”Ÿã—ãŸå ´åˆã¯ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +**構文** + +```sql +toInt8(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256 åž‹ã®å€¤ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€‚ +- Float32/64 åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt8('0xc0fe');`。 + +:::note +入力値ãŒ[Int8](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +例:`SELECT toInt8(128) == -128;`。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 8ビット整数値。[Int8](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toInt8(-8), + toInt8(-8.8), + toInt8('-8') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt8(-8): -8 +toInt8(-8.8): -8 +toInt8('-8'): -8 +``` + +**å‚ç…§** + +- [`toInt8OrZero`](#toint8orzero). +- [`toInt8OrNull`](#toint8ornull). +- [`toInt8OrDefault`](#toint8ordefault). + +## toInt8OrZero + +[`toInt8`](#toint8)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int8](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt8OrZero(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`0`ã‚’è¿”ã™ï¼‰: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt8OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[Int8](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 8ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°`0`。[Int8](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt8OrZero('-8'), + toInt8OrZero('abc') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt8OrZero('-8'): -8 +toInt8OrZero('abc'): 0 +``` + +**å‚ç…§** + +- [`toInt8`](#toint8). +- [`toInt8OrNull`](#toint8ornull). +- [`toInt8OrDefault`](#toint8ordefault). + +## toInt8OrNull + +[`toInt8`](#toint8)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int8](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt8OrNull(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`\N`ã‚’è¿”ã™ï¼‰: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt8OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[Int8](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 8ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°`NULL`。[Int8](../data-types/int-uint.md) / [NULL](../data-types/nullable.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt8OrNull('-8'), + toInt8OrNull('abc') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt8OrNull('-8'): -8 +toInt8OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**å‚ç…§** + +- [`toInt8`](#toint8). +- [`toInt8OrZero`](#toint8orzero). +- [`toInt8OrDefault`](#toint8ordefault). + +## toInt8OrDefault + +[`toInt8`](#toint8)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int8](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +デフォルト値ãŒæ¸¡ã•ã‚Œãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯`0`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toInt8OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md)。 +- `default` (オプション) — `Int8`åž‹ã¸ã®è§£æžãŒå¤±æ•—ã—ãŸå ´åˆã«è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[Int8](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256 ã®å€¤ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€‚ +- Float32/64 ã®å€¤ã€‚ + +デフォルト値を返ã™å¼•æ•°: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt8OrDefault('0xc0fe', CAST('-1', 'Int8'));`。 + +:::note +入力値ãŒ[Int8](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 8ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒè¿”ã•ã‚Œï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæ¸¡ã•ã‚Œãªã„å ´åˆã¯`0`ãŒè¿”ã•ã‚Œã¾ã™ï¼‰ã€‚[Int8](../data-types/int-uint.md)。 + +:::note +- ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯å¤‰æ›å…ˆã®åž‹ã¨åŒã˜ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt8OrDefault('-8', CAST('-1', 'Int8')), + toInt8OrDefault('abc', CAST('-1', 'Int8')) +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt8OrDefault('-8', CAST('-1', 'Int8')): -8 +toInt8OrDefault('abc', CAST('-1', 'Int8')): -1 +``` + +**å‚ç…§** + +- [`toInt8`](#toint8). +- [`toInt8OrZero`](#toint8orzero). +- [`toInt8OrNull`](#toint8ornull). + +## toInt16 + +入力値を[`Int16`](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーãŒç™ºç”Ÿã—ãŸå ´åˆã¯ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +**構文** + +```sql +toInt16(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256 åž‹ã®å€¤ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€‚ +- Float32/64 åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt16('0xc0fe');`。 + +:::note +入力値ãŒ[Int16](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +例:`SELECT toInt16(32768) == -32768;`。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 16ビット整数値。[Int16](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toInt16(-16), + toInt16(-16.16), + toInt16('-16') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt16(-16): -16 +toInt16(-16.16): -16 +toInt16('-16'): -16 +``` + +**å‚ç…§** + +- [`toInt16OrZero`](#toint16orzero). +- [`toInt16OrNull`](#toint16ornull). +- [`toInt16OrDefault`](#toint16ordefault). + +## toInt16OrZero + +[`toInt16`](#toint16)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int16](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt16OrZero(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`0`ã‚’è¿”ã™ï¼‰: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt16OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[Int16](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã—ã¦ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 16ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°`0`。[Int16](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt16OrZero('-16'), + toInt16OrZero('abc') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt16OrZero('-16'): -16 +toInt16OrZero('abc'): 0 +``` + +**å‚ç…§** + +- [`toInt16`](#toint16). +- [`toInt16OrNull`](#toint16ornull). +- [`toInt16OrDefault`](#toint16ordefault). + +## toInt16OrNull + +[`toInt16`](#toint16)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int16](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt16OrNull(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`\N`ã‚’è¿”ã™ï¼‰: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt16OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[Int16](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 16ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°`NULL`。[Int16](../data-types/int-uint.md) / [NULL](../data-types/nullable.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt16OrNull('-16'), + toInt16OrNull('abc') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt16OrNull('-16'): -16 +toInt16OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**å‚ç…§** + +- [`toInt16`](#toint16). +- [`toInt16OrZero`](#toint16orzero). +- [`toInt16OrDefault`](#toint16ordefault). + +## toInt16OrDefault + +[`toInt16`](#toint16)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int16](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +デフォルト値ãŒæ¸¡ã•ã‚Œãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯`0`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toInt16OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md)。 +- `default` (オプション) — `Int16`åž‹ã¸ã®è§£æžãŒå¤±æ•—ã—ãŸå ´åˆã«è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[Int16](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256 ã®å€¤ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€‚ +- Float32/64 ã®å€¤ã€‚ + +デフォルト値を返ã™å¼•æ•°: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt16OrDefault('0xc0fe', CAST('-1', 'Int16'));`。 + +:::note +入力値ãŒ[Int16](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 16ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒè¿”ã•ã‚Œï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæ¸¡ã•ã‚Œãªã„å ´åˆã¯`0`ãŒè¿”ã•ã‚Œã¾ã™ï¼‰ã€‚[Int16](../data-types/int-uint.md)。 + +:::note +- ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯å¤‰æ›å…ˆã®åž‹ã¨åŒã˜ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt16OrDefault('-16', CAST('-1', 'Int16')), + toInt16OrDefault('abc', CAST('-1', 'Int16')) +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt16OrDefault('-16', CAST('-1', 'Int16')): -16 +toInt16OrDefault('abc', CAST('-1', 'Int16')): -1 +``` + +**å‚ç…§** + +- [`toInt16`](#toint16). +- [`toInt16OrZero`](#toint16orzero). +- [`toInt16OrNull`](#toint16ornull). + +## toInt32 + +入力値を[`Int32`](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーãŒç™ºç”Ÿã—ãŸå ´åˆã¯ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +**構文** + +```sql +toInt32(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256 åž‹ã®å€¤ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€‚ +- Float32/64 åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt32('0xc0fe');`。 + +:::note +入力値ãŒ[Int32](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +例:`SELECT toInt32(2147483648) == -2147483648;` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 32ビット整数値。[Int32](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toInt32(-32), + toInt32(-32.32), + toInt32('-32') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt32(-32): -32 +toInt32(-32.32): -32 +toInt32('-32'): -32 +``` + +**å‚ç…§** + +- [`toInt32OrZero`](#toint32orzero). +- [`toInt32OrNull`](#toint32ornull). +- [`toInt32OrDefault`](#toint32ordefault). + +## toInt32OrZero + +[`toInt32`](#toint32)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int32](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt32OrZero(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`0`ã‚’è¿”ã™ï¼‰: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt32OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[Int32](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 32ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°`0`。[Int32](../data-types/int-uint.md) + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt32OrZero('-32'), + toInt32OrZero('abc') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt32OrZero('-32'): -32 +toInt32OrZero('abc'): 0 +``` +**å‚ç…§** + +- [`toInt32`](#toint32). +- [`toInt32OrNull`](#toint32ornull). +- [`toInt32OrDefault`](#toint32ordefault). + +## toInt32OrNull + +[`toInt32`](#toint32)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int32](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt32OrNull(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`\N`ã‚’è¿”ã™ï¼‰: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt32OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[Int32](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 32ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°`NULL`。[Int32](../data-types/int-uint.md) / [NULL](../data-types/nullable.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt32OrNull('-32'), + toInt32OrNull('abc') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt32OrNull('-32'): -32 +toInt32OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**å‚ç…§** + +- [`toInt32`](#toint32). +- [`toInt32OrZero`](#toint32orzero). +- [`toInt32OrDefault`](#toint32ordefault). + +## toInt32OrDefault + +[`toInt32`](#toint32)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int32](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +デフォルト値ãŒæ¸¡ã•ã‚Œãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯`0`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toInt32OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md)。 +- `default` (オプション) — `Int32`åž‹ã¸ã®è§£æžãŒå¤±æ•—ã—ãŸå ´åˆã«è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[Int32](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256 ã®å€¤ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€‚ +- Float32/64 ã®å€¤ã€‚ + +デフォルト値を返ã™å¼•æ•°: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt32OrDefault('0xc0fe', CAST('-1', 'Int32'));`。 + +:::note +入力値ãŒ[Int32](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 32ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒè¿”ã•ã‚Œï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæ¸¡ã•ã‚Œãªã„å ´åˆã¯`0`ãŒè¿”ã•ã‚Œã¾ã™ï¼‰ã€‚[Int32](../data-types/int-uint.md)。 + +:::note +- ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯å¤‰æ›å…ˆã®åž‹ã¨åŒã˜ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt32OrDefault('-32', CAST('-1', 'Int32')), + toInt32OrDefault('abc', CAST('-1', 'Int32')) +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt32OrDefault('-32', CAST('-1', 'Int32')): -32 +toInt32OrDefault('abc', CAST('-1', 'Int32')): -1 +``` + +**å‚ç…§** + +- [`toInt32`](#toint32). +- [`toInt32OrZero`](#toint32orzero). +- [`toInt32OrNull`](#toint32ornull). + +## toInt64 + +入力値を[`Int64`](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーãŒç™ºç”Ÿã—ãŸå ´åˆã¯ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +**構文** + +```sql +toInt64(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256 åž‹ã®å€¤ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€‚ +- Float32/64 åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„タイプ: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt64('0xc0fe');`。 + +:::note +入力値ãŒ[Int64](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã—ã¦ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +例:`SELECT toInt64(9223372036854775808) == -9223372036854775808;` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 64ビット整数値。[Int64](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toInt64(-64), + toInt64(-64.64), + toInt64('-64') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt64(-64): -64 +toInt64(-64.64): -64 +toInt64('-64'): -64 +``` + +**å‚ç…§** + +- [`toInt64OrZero`](#toint64orzero). +- [`toInt64OrNull`](#toint64ornull). +- [`toInt64OrDefault`](#toint64ordefault). + +## toInt64OrZero + +[`toInt64`](#toint64)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int64](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt64OrZero(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`0`ã‚’è¿”ã™ï¼‰: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt64OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[Int64](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã—ã¦ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 64ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°`0`。[Int64](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt64OrZero('-64'), + toInt64OrZero('abc') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt64OrZero('-64'): -64 +toInt64OrZero('abc'): 0 +``` + +**å‚ç…§** + +- [`toInt64`](#toint64). +- [`toInt64OrNull`](#toint64ornull). +- [`toInt64OrDefault`](#toint64ordefault). + +## toInt64OrNull + +[`toInt64`](#toint64)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int64](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt64OrNull(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`\N`ã‚’è¿”ã™ï¼‰: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt64OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[Int64](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 64ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°`NULL`。[Int64](../data-types/int-uint.md) / [NULL](../data-types/nullable.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt64OrNull('-64'), + toInt64OrNull('abc') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt64OrNull('-64'): -64 +toInt64OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**å‚ç…§** + +- [`toInt64`](#toint64). +- [`toInt64OrZero`](#toint64orzero). +- [`toInt64OrDefault`](#toint64ordefault). + +## toInt64OrDefault + +[`toInt64`](#toint64)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int64](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +デフォルト値ãŒæ¸¡ã•ã‚Œãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯`0`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toInt64OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md)。 +- `default` (オプション) — `Int64`åž‹ã¸ã®è§£æžãŒå¤±æ•—ã—ãŸå ´åˆã«è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[Int64](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256 ã®å€¤ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€‚ +- Float32/64 ã®å€¤ã€‚ + +デフォルト値を返ã™å¼•æ•°: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt64OrDefault('0xc0fe', CAST('-1', 'Int64'));`。 + +:::note +入力値ãŒ[Int64](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 64ビット整数値ã¨ã—ã¦æˆåŠŸã™ã‚Œã°è¿”ã•ã‚Œã€ãã†ã§ãªã‘ã‚Œã°ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒè¿”ã•ã‚Œï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæ¸¡ã•ã‚Œãªã„å ´åˆã¯`0`ãŒè¿”ã•ã‚Œã¾ã™ï¼‰ã€‚[Int64](../data-types/int-uint.md)。 + +:::note +- ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯å¤‰æ›å…ˆã®åž‹ã¨åŒã˜ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt64OrDefault('-64', CAST('-1', 'Int64')), + toInt64OrDefault('abc', CAST('-1', 'Int64')) +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt64OrDefault('-64', CAST('-1', 'Int64')): -64 +toInt64OrDefault('abc', CAST('-1', 'Int64')): -1 +``` + +**å‚ç…§** + +- [`toInt64`](#toint64). +- [`toInt64OrZero`](#toint64orzero). +- [`toInt64OrNull`](#toint64ornull). + +## toInt128 + +入力値を[`Int128`](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーãŒç™ºç”Ÿã—ãŸå ´åˆã¯ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +**構文** + +```sql +toInt128(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256 åž‹ã®å€¤ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€‚ +- Float32/64 åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- NaN ã‚„ Inf ã‚’å«ã‚€ Float32/64 値ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€‚例:`SELECT toInt128('0xc0fe');`。 + +:::note +入力値ãŒ[Int128](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã—ã¦ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 128ビット整数値。[Int128](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€æ•°å€¤ã®å°æ•°æ¡ã‚’切りæ¨ã¦ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toInt128(-128), + toInt128(-128.8), + toInt128('-128') +FORMAT Vertical; +``` + +çµæžœï¼š + +```response +Row 1: +────── +toInt128(-128): -128 +toInt128(-128.8): -128 +toInt128('-128'): -128 +``` + +**å‚ç…§** + +- [`toInt128OrZero`](#toint128orzero). +- [`toInt128OrNull`](#toint128ornull). +- [`toInt128OrDefault`](#toint128ordefault). + +## toInt128OrZero + +[`toInt128`](#toint128)ã®ã‚ˆã†ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int128](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt128OrZero(expr) +``` + +**引数** + + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions) / [文字列](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`0`ã‚’è¿”ã™ï¼‰: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toInt128OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[Int128](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°128ビット整数値ã€ãれ以外ã®å ´åˆã¯`0`。[Int128](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt128OrZero('-128'), + toInt128OrZero('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toInt128OrZero('-128'): -128 +toInt128OrZero('abc'): 0 +``` + +**関連項目** + +- [`toInt128`](#toint128). +- [`toInt128OrNull`](#toint128ornull). +- [`toInt128OrDefault`](#toint128ordefault). + +## toInt128OrNull + +[`toInt128`](#toint128)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int128](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt128OrNull(x) +``` + +**引数** + +- `x` — 数値ã®æ–‡å­—列表ç¾ã€‚[å¼](../syntax.md/#syntax-expressions) / [文字列](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`\N`ã‚’è¿”ã™ï¼‰ +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toInt128OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[Int128](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°128ビット整数値ã€ãれ以外ã®å ´åˆã¯`NULL`。[Int128](../data-types/int-uint.md) / [NULL](../data-types/nullable.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt128OrNull('-128'), + toInt128OrNull('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toInt128OrNull('-128'): -128 +toInt128OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**関連項目** + +- [`toInt128`](#toint128). +- [`toInt128OrZero`](#toint128orzero). +- [`toInt128OrDefault`](#toint128ordefault). + +## toInt128OrDefault + +[`toInt128`](#toint128)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int128](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +`default`値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ã‚¨ãƒ©ãƒ¼æ™‚ã«`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt128OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions) / [文字列](../data-types/string.md). +- `default`(オプション)— åž‹`Int128`ã¸ã®è§£æžãŒæˆåŠŸã—ãªã‹ã£ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[Int128](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256。 +- Float32/64。 +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +デフォルト値ãŒè¿”ã•ã‚Œã‚‹å¼•æ•°: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toInt128OrDefault('0xc0fe', CAST('-1', 'Int128'));`。 + +:::note +入力値ãŒ[Int128](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°128ビット整数値ã€ãれ以外ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’指定ã—ãŸå ´åˆãれを返ã—ã€æŒ‡å®šã—ã¦ã„ãªã„å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚[Int128](../data-types/int-uint.md)。 + +:::note +- ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹åž‹ã¨åŒã˜ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt128OrDefault('-128', CAST('-1', 'Int128')), + toInt128OrDefault('abc', CAST('-1', 'Int128')) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toInt128OrDefault('-128', CAST('-1', 'Int128')): -128 +toInt128OrDefault('abc', CAST('-1', 'Int128')): -1 +``` + +**関連項目** + +- [`toInt128`](#toint128). +- [`toInt128OrZero`](#toint128orzero). +- [`toInt128OrNull`](#toint128ornull). + +## toInt256 + +入力値を[`Int256`](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーã®å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt256(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toInt256('0xc0fe');`。 + +:::note +入力値ãŒ[Int256](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 256ビット整数値。[Int256](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toInt256(-256), + toInt256(-256.256), + toInt256('-256') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toInt256(-256): -256 +toInt256(-256.256): -256 +toInt256('-256'): -256 +``` + +**関連項目** + +- [`toInt256OrZero`](#toint256orzero). +- [`toInt256OrNull`](#toint256ornull). +- [`toInt256OrDefault`](#toint256ordefault). + +## toInt256OrZero + +[`toInt256`](#toint256)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int256](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt256OrZero(x) +``` + +**引数** + +- `x` — 数値ã®æ–‡å­—列表ç¾ã€‚[文字列](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`0`ã‚’è¿”ã™ï¼‰: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toInt256OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[Int256](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°256ビット整数値ã€ãれ以外ã®å ´åˆã¯`0`。[Int256](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt256OrZero('-256'), + toInt256OrZero('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toInt256OrZero('-256'): -256 +toInt256OrZero('abc'): 0 +``` + +**関連項目** + +- [`toInt256`](#toint256). +- [`toInt256OrNull`](#toint256ornull). +- [`toInt256OrDefault`](#toint256ordefault). + +## toInt256OrNull + +[`toInt256`](#toint256)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int256](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt256OrNull(x) +``` + +**引数** + +- `x` — 数値ã®æ–‡å­—列表ç¾ã€‚[文字列](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`\N`ã‚’è¿”ã™ï¼‰ +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toInt256OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[Int256](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°256ビット整数値ã€ãれ以外ã®å ´åˆã¯`NULL`。[Int256](../data-types/int-uint.md) / [NULL](../data-types/nullable.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt256OrNull('-256'), + toInt256OrNull('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toInt256OrNull('-256'): -256 +toInt256OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**関連項目** + +- [`toInt256`](#toint256). +- [`toInt256OrZero`](#toint256orzero). +- [`toInt256OrDefault`](#toint256ordefault). + +## toInt256OrDefault + +[`toInt256`](#toint256)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Int256](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +`default`値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ã‚¨ãƒ©ãƒ¼æ™‚ã«`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toInt256OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions) / [文字列](../data-types/string.md). +- `default`(オプション)— åž‹`Int256`ã¸ã®è§£æžãŒæˆåŠŸã—ãªã‹ã£ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[Int256](../data-types/int-uint.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +デフォルト値ãŒè¿”ã•ã‚Œã‚‹å¼•æ•°: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toInt256OrDefault('0xc0fe', CAST('-1', 'Int256'));` + +:::note +入力値ãŒ[Int256](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°256ビット整数値ã€ãれ以外ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’指定ã—ãŸå ´åˆãれを返ã—ã€æŒ‡å®šã—ã¦ã„ãªã„å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚[Int256](../data-types/int-uint.md)。 + +:::note +- ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹åž‹ã¨åŒã˜ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toInt256OrDefault('-256', CAST('-1', 'Int256')), + toInt256OrDefault('abc', CAST('-1', 'Int256')) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toInt256OrDefault('-256', CAST('-1', 'Int256')): -256 +toInt256OrDefault('abc', CAST('-1', 'Int256')): -1 +``` + +**関連項目** + +- [`toInt256`](#toint256). +- [`toInt256OrZero`](#toint256orzero). +- [`toInt256OrNull`](#toint256ornull). + +## toUInt8 + +入力値を[`UInt8`](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーã®å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt8(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt8('0xc0fe');`。 + +:::note +入力値ãŒ[UInt8](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +例: `SELECT toUInt8(256) == 0;`。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 8ビット符å·ãªã—整数値。[UInt8](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt8(8), + toUInt8(8.8), + toUInt8('8') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt8(8): 8 +toUInt8(8.8): 8 +toUInt8('8'): 8 +``` + +**関連項目** + +- [`toUInt8OrZero`](#touint8orzero). +- [`toUInt8OrNull`](#touint8ornull). +- [`toUInt8OrDefault`](#touint8ordefault). + +## toUInt8OrZero + +[`toUInt8`](#touint8)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[UInt8](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt8OrZero(x) +``` + +**引数** + +- `x` — 数値ã®æ–‡å­—列表ç¾ã€‚[文字列](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`0`ã‚’è¿”ã™ï¼‰: +- 通常ã®Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt8OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[UInt8](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°8ビット符å·ãªã—整数値ã€ãれ以外ã®å ´åˆã¯`0`。[UInt8](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toUInt8OrZero('-8'), + toUInt8OrZero('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt8OrZero('-8'): 0 +toUInt8OrZero('abc'): 0 +``` + +**関連項目** + +- [`toUInt8`](#touint8). +- [`toUInt8OrNull`](#touint8ornull). +- [`toUInt8OrDefault`](#touint8ordefault). + +## toUInt8OrNull + +[`toUInt8`](#touint8)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[UInt8](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt8OrNull(x) +``` + +**引数** + +- `x` — 数値ã®æ–‡å­—列表ç¾ã€‚[文字列](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`\N`ã‚’è¿”ã™ï¼‰ +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt8OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[UInt8](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°8ビット符å·ãªã—整数値ã€ãれ以外ã®å ´åˆã¯`NULL`。[UInt8](../data-types/int-uint.md) / [NULL](../data-types/nullable.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toUInt8OrNull('8'), + toUInt8OrNull('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt8OrNull('8'): 8 +toUInt8OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**関連項目** + +- [`toUInt8`](#touint8). +- [`toUInt8OrZero`](#touint8orzero). +- [`toUInt8OrDefault`](#touint8ordefault). + +## toUInt8OrDefault + +[`toUInt8`](#touint8)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[UInt8](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +`default`値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ã‚¨ãƒ©ãƒ¼æ™‚ã«`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt8OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions) / [文字列](../data-types/string.md). +- `default`(オプション)— åž‹`UInt8`ã¸ã®è§£æžãŒæˆåŠŸã—ãªã‹ã£ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[UInt8](../data-types/int-uint.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +デフォルト値ãŒè¿”ã•ã‚Œã‚‹å¼•æ•°: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt8OrDefault('0xc0fe', CAST('0', 'UInt8'));`。 + +:::note +入力値ãŒ[UInt8](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°8ビット符å·ãªã—整数値ã€ãれ以外ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’指定ã—ãŸå ´åˆãれを返ã—ã€æŒ‡å®šã—ã¦ã„ãªã„å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚[UInt8](../data-types/int-uint.md). + +:::note +- ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹åž‹ã¨åŒã˜ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toUInt8OrDefault('8', CAST('0', 'UInt8')), + toUInt8OrDefault('abc', CAST('0', 'UInt8')) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt8OrDefault('8', CAST('0', 'UInt8')): 8 +toUInt8OrDefault('abc', CAST('0', 'UInt8')): 0 +``` + +**関連項目** + +- [`toUInt8`](#touint8). +- [`toUInt8OrZero`](#touint8orzero). +- [`toUInt8OrNull`](#touint8ornull). + +## toUInt16 + +入力値を[`UInt16`](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーã®å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt16(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt16('0xc0fe');`。 + +:::note +入力値ãŒ[UInt16](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +例: `SELECT toUInt16(65536) == 0;`。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 16ビット符å·ãªã—整数値。[UInt16](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt16(16), + toUInt16(16.16), + toUInt16('16') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt16(16): 16 +toUInt16(16.16): 16 +toUInt16('16'): 16 +``` + +**関連項目** + +- [`toUInt16OrZero`](#touint16orzero). +- [`toUInt16OrNull`](#touint16ornull). +- [`toUInt16OrDefault`](#touint16ordefault). + +## toUInt16OrZero + +[`toUInt16`](#touint16)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[UInt16](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt16OrZero(x) +``` + +**引数** + +- `x` — 数値ã®æ–‡å­—列表ç¾ã€‚[文字列](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`0`ã‚’è¿”ã™ï¼‰: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt16OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[UInt16](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°16ビット符å·ãªã—整数値ã€ãれ以外ã®å ´åˆã¯`0`。[UInt16](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toUInt16OrZero('16'), + toUInt16OrZero('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt16OrZero('16'): 16 +toUInt16OrZero('abc'): 0 +``` + +**関連項目** + +- [`toUInt16`](#touint16). +- [`toUInt16OrNull`](#touint16ornull). +- [`toUInt16OrDefault`](#touint16ordefault). + +## toUInt16OrNull + +[`toUInt16`](#touint16)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[UInt16](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt16OrNull(x) +``` + +**引数** + +- `x` — 数値ã®æ–‡å­—列表ç¾ã€‚[文字列](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`\N`ã‚’è¿”ã™ï¼‰ +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt16OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[UInt16](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°16ビット符å·ãªã—整数値ã€ãれ以外ã®å ´åˆã¯`NULL`。[UInt16](../data-types/int-uint.md) / [NULL](../data-types/nullable.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toUInt16OrNull('16'), + toUInt16OrNull('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt16OrNull('16'): 16 +toUInt16OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**関連項目** + +- [`toUInt16`](#touint16). +- [`toUInt16OrZero`](#touint16orzero). +- [`toUInt16OrDefault`](#touint16ordefault). + +## toUInt16OrDefault + +[`toUInt16`](#touint16)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[UInt16](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +`default`値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ã‚¨ãƒ©ãƒ¼æ™‚ã«`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt16OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions) / [文字列](../data-types/string.md). +- `default`(オプション)— åž‹`UInt16`ã¸ã®è§£æžãŒæˆåŠŸã—ãªã‹ã£ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[UInt16](../data-types/int-uint.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +デフォルト値ãŒè¿”ã•ã‚Œã‚‹å¼•æ•°: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt16OrDefault('0xc0fe', CAST('0', 'UInt16'));`。 + +:::note +入力値ãŒ[UInt16](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°16ビット符å·ãªã—整数値ã€ãれ以外ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’指定ã—ãŸå ´åˆãれを返ã—ã€æŒ‡å®šã—ã¦ã„ãªã„å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚[UInt16](../data-types/int-uint.md). + +:::note +- ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹åž‹ã¨åŒã˜ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toUInt16OrDefault('16', CAST('0', 'UInt16')), + toUInt16OrDefault('abc', CAST('0', 'UInt16')) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt16OrDefault('16', CAST('0', 'UInt16')): 16 +toUInt16OrDefault('abc', CAST('0', 'UInt16')): 0 +``` + +**関連項目** + +- [`toUInt16`](#touint16). +- [`toUInt16OrZero`](#touint16orzero). +- [`toUInt16OrNull`](#touint16ornull). + +## toUInt32 + +入力値を[`UInt32`](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーã®å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt32(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt32('0xc0fe');`。 + +:::note +入力値ãŒ[UInt32](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +例: `SELECT toUInt32(4294967296) == 0;` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 32ビット符å·ãªã—整数値。[UInt32](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt32(32), + toUInt32(32.32), + toUInt32('32') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt32(32): 32 +toUInt32(32.32): 32 +toUInt32('32'): 32 +``` + +**関連項目** + +- [`toUInt32OrZero`](#touint32orzero). +- [`toUInt32OrNull`](#touint32ornull). +- [`toUInt32OrDefault`](#touint32ordefault). + +## toUInt32OrZero + +[`toUInt32`](#touint32)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[UInt32](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt32OrZero(x) +``` + +**引数** + +- `x` — 数値ã®æ–‡å­—列表ç¾ã€‚[文字列](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`0`ã‚’è¿”ã™ï¼‰: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt32OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[UInt32](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°32ビット符å·ãªã—整数値ã€ãれ以外ã®å ´åˆã¯`0`。[UInt32](../data-types/int-uint.md) + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toUInt32OrZero('32'), + toUInt32OrZero('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt32OrZero('32'): 32 +toUInt32OrZero('abc'): 0 +``` +**関連項目** + +- [`toUInt32`](#touint32). +- [`toUInt32OrNull`](#touint32ornull). +- [`toUInt32OrDefault`](#touint32ordefault). + +## toUInt32OrNull + +[`toUInt32`](#touint32)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[UInt32](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt32OrNull(x) +``` + +**引数** + +- `x` — 数値ã®æ–‡å­—列表ç¾ã€‚[文字列](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数(`\N`ã‚’è¿”ã™ï¼‰ +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt32OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[UInt32](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°32ビット符å·ãªã—整数値ã€ãれ以外ã®å ´åˆã¯`NULL`。[UInt32](../data-types/int-uint.md) / [NULL](../data-types/nullable.md). + +:::note +ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toUInt32OrNull('32'), + toUInt32OrNull('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt32OrNull('32'): 32 +toUInt32OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**関連項目** + +- [`toUInt32`](#touint32). +- [`toUInt32OrZero`](#touint32orzero). +- [`toUInt32OrDefault`](#touint32ordefault). + +## toUInt32OrDefault + +[`toUInt32`](#touint32)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[UInt32](../data-types/int-uint.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +`default`値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ã‚¨ãƒ©ãƒ¼æ™‚ã«`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt32OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[å¼](../syntax.md/#syntax-expressions) / [文字列](../data-types/string.md). +- `default`(オプション)— åž‹`UInt32`ã¸ã®è§£æžãŒæˆåŠŸã—ãªã‹ã£ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[UInt32](../data-types/int-uint.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +デフォルト値ãŒè¿”ã•ã‚Œã‚‹å¼•æ•°: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ï¼ˆ`NaN`ãŠã‚ˆã³`Inf`ã‚’å«ã‚€ï¼‰ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt32OrDefault('0xc0fe', CAST('0', 'UInt32'));`. + +:::note +入力値ãŒ[UInt32](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¯è¦‹ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã™ã‚Œã°32ビット符å·ãªã—整数値ã€ãれ以外ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’指定ã—ãŸå ´åˆãれを返ã—ã€æŒ‡å®šã—ã¦ã„ãªã„å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚[UInt32](../data-types/int-uint.md)。 + +:::note +- ã“ã®é–¢æ•°ã¯[ゼロã¸ã®ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã€æ•°å€¤ã®å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’切りæ¨ã¦ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹åž‹ã¨åŒã˜ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ +::: + +**例** + +クエリ: + +``` sql +SELECT + toUInt32OrDefault('32', CAST('0', 'UInt32')), + toUInt32OrDefault('abc', CAST('0', 'UInt32')) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt32OrDefault('32', CAST('0', 'UInt32')): 32 +toUInt32OrDefault('abc', CAST('0', 'UInt32')): 0 +``` + +**関連項目** + +- [`toUInt32`](#touint32). +- [`toUInt32OrZero`](#touint32orzero). +- [`toUInt32OrNull`](#touint32ornull). + +## toUInt64 + +入力値を型[`UInt64`](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーã®å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt64(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列を返ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„åž‹: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt64('0xc0fe');`。 + +:::note +入力値ãŒ[UInt64](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +例: `SELECT toUInt64(18446744073709551616) == 0;` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 64ビットã®ç¬¦å·ãªã—整数値。[UInt64](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt64(64), + toUInt64(64.64), + toUInt64('64') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt64(64): 64 +toUInt64(64.64): 64 +toUInt64('64'): 64 +``` + +**関連項目** + +- [`toUInt64OrZero`](#touint64orzero). +- [`toUInt64OrNull`](#touint64ornull). +- [`toUInt64OrDefault`](#touint64ordefault). + +## toUInt64OrZero + +[`toUInt64`](#touint64)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[UInt64](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt64OrZero(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数(`0`ãŒè¿”ã•ã‚Œã‚‹ï¼‰: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt64OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[UInt64](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ64ビットã®ç¬¦å·ãªã—整数値ã€å¤±æ•—ã—ãŸå ´åˆã¯`0`。[UInt64](../data-types/int-uint.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt64OrZero('64'), + toUInt64OrZero('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt64OrZero('64'): 64 +toUInt64OrZero('abc'): 0 +``` + +**関連項目** + +- [`toUInt64`](#touint64). +- [`toUInt64OrNull`](#touint64ornull). +- [`toUInt64OrDefault`](#touint64ordefault). + +## toUInt64OrNull + +[`toUInt64`](#touint64)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[UInt64](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt64OrNull(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数(`\N`ãŒè¿”ã•ã‚Œã‚‹ï¼‰: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt64OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[UInt64](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ64ビットã®ç¬¦å·ãªã—整数値ã€å¤±æ•—ã—ãŸå ´åˆã¯`NULL`。[UInt64](../data-types/int-uint.md) / [NULL](../data-types/nullable.md)。 + +:::note +ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt64OrNull('64'), + toUInt64OrNull('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt64OrNull('64'): 64 +toUInt64OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**関連項目** + +- [`toUInt64`](#touint64). +- [`toUInt64OrZero`](#touint64orzero). +- [`toUInt64OrDefault`](#touint64ordefault). + +## toUInt64OrDefault + +[`toUInt64`](#touint64)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[UInt64](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +デフォルト値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã«ãªã‚‹ã¨`0`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toUInt64OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列を返ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md). +- `default` (optional) — åž‹`UInt64`ã¸ã®å¤‰æ›ãŒå¤±æ•—ã—ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[UInt64](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +デフォルト値ãŒè¿”ã•ã‚Œã‚‹å¼•æ•°: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt64OrDefault('0xc0fe', CAST('0', 'UInt64'));`。 + +:::note +入力値ãŒ[UInt64](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ64ビットã®ç¬¦å·ãªã—整数値ã€å¤±æ•—ã—ãŸå ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæ¸¡ã•ã‚ŒãŸå ´åˆãれを返ã—ã€æ¸¡ã•ã‚Œã¦ã„ãªã„å ´åˆã¯`0`ã‚’è¿”ã™ã€‚[UInt64](../data-types/int-uint.md). + +:::note +- ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯å¤‰æ›ã•ã‚Œã‚‹åž‹ã¨ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt64OrDefault('64', CAST('0', 'UInt64')), + toUInt64OrDefault('abc', CAST('0', 'UInt64')) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt64OrDefault('64', CAST('0', 'UInt64')): 64 +toUInt64OrDefault('abc', CAST('0', 'UInt64')): 0 +``` + +**関連項目** + +- [`toUInt64`](#touint64). +- [`toUInt64OrZero`](#touint64orzero). +- [`toUInt64OrNull`](#touint64ornull). + +## toUInt128 + +入力値を型[`UInt128`](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーã®å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt128(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列を返ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt128('0xc0fe');`。 + +:::note +入力値ãŒ[UInt128](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 128ビットã®ç¬¦å·ãªã—整数値。[UInt128](../data-types/int-uint.md). + +:::note +ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt128(128), + toUInt128(128.8), + toUInt128('128') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt128(128): 128 +toUInt128(128.8): 128 +toUInt128('128'): 128 +``` + +**関連項目** + +- [`toUInt128OrZero`](#touint128orzero). +- [`toUInt128OrNull`](#touint128ornull). +- [`toUInt128OrDefault`](#touint128ordefault). + +## toUInt128OrZero + +[`toUInt128`](#touint128)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[UInt128](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt128OrZero(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列を返ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数(`0`ãŒè¿”ã•ã‚Œã‚‹ï¼‰: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt128OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[UInt128](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ128ビットã®ç¬¦å·ãªã—整数値ã€å¤±æ•—ã—ãŸå ´åˆã¯`0`。[UInt128](../data-types/int-uint.md). + +:::note +ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt128OrZero('128'), + toUInt128OrZero('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt128OrZero('128'): 128 +toUInt128OrZero('abc'): 0 +``` + +**関連項目** + +- [`toUInt128`](#touint128). +- [`toUInt128OrNull`](#touint128ornull). +- [`toUInt128OrDefault`](#touint128ordefault). + +## toUInt128OrNull + +[`toUInt128`](#touint128)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[UInt128](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt128OrNull(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数(`\N`ãŒè¿”ã•ã‚Œã‚‹ï¼‰: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt128OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[UInt128](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ128ビットã®ç¬¦å·ãªã—整数値ã€å¤±æ•—ã—ãŸå ´åˆã¯`NULL`。[UInt128](../data-types/int-uint.md) / [NULL](../data-types/nullable.md). + +:::note +ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt128OrNull('128'), + toUInt128OrNull('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt128OrNull('128'): 128 +toUInt128OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**関連項目** + +- [`toUInt128`](#touint128). +- [`toUInt128OrZero`](#touint128orzero). +- [`toUInt128OrDefault`](#touint128ordefault). + +## toUInt128OrDefault + +[`toUInt128`](#toint128)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[UInt128](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +デフォルト値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã«ãªã‚‹ã¨`0`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toUInt128OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列を返ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md). +- `default` (optional) — åž‹`UInt128`ã¸ã®å¤‰æ›ãŒå¤±æ•—ã—ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[UInt128](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/64/128/256. +- Float32/64. +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +デフォルト値ãŒè¿”ã•ã‚Œã‚‹å¼•æ•°: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt128OrDefault('0xc0fe', CAST('0', 'UInt128'));`。 + +:::note +入力値ãŒ[UInt128](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ128ビットã®ç¬¦å·ãªã—整数値ã€å¤±æ•—ã—ãŸå ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæ¸¡ã•ã‚ŒãŸå ´åˆãれを返ã—ã€æ¸¡ã•ã‚Œã¦ã„ãªã„å ´åˆã¯`0`ã‚’è¿”ã™ã€‚[UInt128](../data-types/int-uint.md)。 + +:::note +- ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯å¤‰æ›ã•ã‚Œã‚‹åž‹ã¨ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt128OrDefault('128', CAST('0', 'UInt128')), + toUInt128OrDefault('abc', CAST('0', 'UInt128')) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt128OrDefault('128', CAST('0', 'UInt128')): 128 +toUInt128OrDefault('abc', CAST('0', 'UInt128')): 0 +``` + +**関連項目** + +- [`toUInt128`](#touint128). +- [`toUInt128OrZero`](#touint128orzero). +- [`toUInt128OrNull`](#touint128ornull). + +## toUInt256 + +入力値を型[`UInt256`](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーã®å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt256(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列を返ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt256('0xc0fe');`。 + +:::note +入力値ãŒ[UInt256](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 256ビットã®ç¬¦å·ãªã—整数値。[Int256](../data-types/int-uint.md). + +:::note +ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt256(256), + toUInt256(256.256), + toUInt256('256') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt256(256): 256 +toUInt256(256.256): 256 +toUInt256('256'): 256 +``` + +**関連項目** + +- [`toUInt256OrZero`](#touint256orzero). +- [`toUInt256OrNull`](#touint256ornull). +- [`toUInt256OrDefault`](#touint256ordefault). + +## toUInt256OrZero + +[`toUInt256`](#touint256)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[UInt256](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt256OrZero(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数(`0`ãŒè¿”ã•ã‚Œã‚‹ï¼‰: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt256OrZero('0xc0fe');`。 + +:::note +入力値ãŒ[UInt256](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ256ビットã®ç¬¦å·ãªã—整数値ã€å¤±æ•—ã—ãŸå ´åˆã¯`0`。[UInt256](../data-types/int-uint.md). + +:::note +ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt256OrZero('256'), + toUInt256OrZero('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt256OrZero('256'): 256 +toUInt256OrZero('abc'): 0 +``` + +**関連項目** + +- [`toUInt256`](#touint256). +- [`toUInt256OrNull`](#touint256ornull). +- [`toUInt256OrDefault`](#touint256ordefault). + +## toUInt256OrNull + +[`toUInt256`](#touint256)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[UInt256](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toUInt256OrNull(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数(`\N`ãŒè¿”ã•ã‚Œã‚‹ï¼‰: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt256OrNull('0xc0fe');`。 + +:::note +入力値ãŒ[UInt256](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ256ビットã®ç¬¦å·ãªã—整数値ã€å¤±æ•—ã—ãŸå ´åˆã¯`NULL`。[UInt256](../data-types/int-uint.md) / [NULL](../data-types/nullable.md). + +:::note +ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt256OrNull('256'), + toUInt256OrNull('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt256OrNull('256'): 256 +toUInt256OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**関連項目** + +- [`toUInt256`](#touint256). +- [`toUInt256OrZero`](#touint256orzero). +- [`toUInt256OrDefault`](#touint256ordefault). + +## toUInt256OrDefault + +[`toUInt256`](#touint256)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[UInt256](../data-types/int-uint.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +デフォルト値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã«ãªã‚‹ã¨`0`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toUInt256OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列を返ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md). +- `default` (optional) — åž‹`UInt256`ã¸ã®å¤‰æ›ãŒå¤±æ•—ã—ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[UInt256](../data-types/int-uint.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€‚ + +デフォルト値ãŒè¿”ã•ã‚Œã‚‹å¼•æ•°: +- Float32/64ã®å€¤ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toUInt256OrDefault('0xc0fe', CAST('0', 'UInt256'));`。 + +:::note +入力値ãŒ[UInt256](../data-types/int-uint.md)ã®ç¯„囲内ã§è¡¨ç¾ã§ããªã„å ´åˆã€çµæžœãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚ +ã“ã‚Œã¯ã‚¨ãƒ©ãƒ¼ã¨ã¿ãªã•ã‚Œã¾ã›ã‚“。 +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ256ビットã®ç¬¦å·ãªã—整数値ã€å¤±æ•—ã—ãŸå ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæ¸¡ã•ã‚ŒãŸå ´åˆãれを返ã—ã€æ¸¡ã•ã‚Œã¦ã„ãªã„å ´åˆã¯`0`ã‚’è¿”ã™ã€‚[UInt256](../data-types/int-uint.md). + +:::note +- ã“ã®é–¢æ•°ã¯[0ã«å‘ã‹ã£ã¦åˆ‡ã‚Šæ¨ã¦ä¸¸ã‚](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero)を使用ã—ã¦ãŠã‚Šã€æ•°å€¤ã®å°æ•°éƒ¨åˆ†ã‚’切りæ¨ã¦ã¾ã™ã€‚ +- デフォルト値ã®åž‹ã¯å¤‰æ›ã•ã‚Œã‚‹åž‹ã¨ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + toUInt256OrDefault('-256', CAST('0', 'UInt256')), + toUInt256OrDefault('abc', CAST('0', 'UInt256')) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toUInt256OrDefault('-256', CAST('0', 'UInt256')): 0 +toUInt256OrDefault('abc', CAST('0', 'UInt256')): 0 +``` + +**関連項目** + +- [`toUInt256`](#touint256). +- [`toUInt256OrZero`](#touint256orzero). +- [`toUInt256OrNull`](#touint256ornull). + +## toFloat32 + +入力値を型[`Float32`](../data-types/float.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーã®å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toFloat32(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列を返ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã€‚ +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- Float32/64ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`(大文字å°æ–‡å­—を区別ã—ãªã„)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数: +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toFloat32('0xc0fe');`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 32ビットã®æµ®å‹•å°æ•°ç‚¹æ•°å€¤ã€‚[Float32](../data-types/float.md). + +**例** + +クエリ: + +```sql +SELECT + toFloat32(42.7), + toFloat32('42.7'), + toFloat32('NaN') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toFloat32(42.7): 42.7 +toFloat32('42.7'): 42.7 +toFloat32('NaN'): nan +``` + +**関連項目** + +- [`toFloat32OrZero`](#tofloat32orzero). +- [`toFloat32OrNull`](#tofloat32ornull). +- [`toFloat32OrDefault`](#tofloat32ordefault). + +## toFloat32OrZero + +[`toFloat32`](#tofloat32)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[Float32](../data-types/float.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toFloat32OrZero(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/128/256, Float32/64ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数(`0`ãŒè¿”ã•ã‚Œã‚‹ï¼‰: +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toFloat32OrZero('0xc0fe');`. + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ32ビットã®æµ®å‹•å°æ•°ç‚¹æ•°å€¤ã€å¤±æ•—ã—ãŸå ´åˆã¯`0`。[Float32](../data-types/float.md). + +**例** + +クエリ: + +```sql +SELECT + toFloat32OrZero('42.7'), + toFloat32OrZero('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toFloat32OrZero('42.7'): 42.7 +toFloat32OrZero('abc'): 0 +``` + +**関連項目** + +- [`toFloat32`](#tofloat32). +- [`toFloat32OrNull`](#tofloat32ornull). +- [`toFloat32OrDefault`](#tofloat32ordefault). + +## toFloat32OrNull + +[`toFloat32`](#tofloat32)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[Float32](../data-types/float.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toFloat32OrNull(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/128/256, Float32/64ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数(`\N`ãŒè¿”ã•ã‚Œã‚‹ï¼‰: +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toFloat32OrNull('0xc0fe');`. + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ32ビットã®æµ®å‹•å°æ•°ç‚¹æ•°å€¤ã€å¤±æ•—ã—ãŸå ´åˆã¯`\N`。[Float32](../data-types/float.md). + +**例** + +クエリ: + +```sql +SELECT + toFloat32OrNull('42.7'), + toFloat32OrNull('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toFloat32OrNull('42.7'): 42.7 +toFloat32OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**関連項目** + +- [`toFloat32`](#tofloat32). +- [`toFloat32OrZero`](#tofloat32orzero). +- [`toFloat32OrDefault`](#tofloat32ordefault). + +## toFloat32OrDefault + +[`toFloat32`](#tofloat32)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[Float32](../data-types/float.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +デフォルト値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã«ãªã‚‹ã¨`0`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toFloat32OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列を返ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md). +- `default` (optional) — åž‹`Float32`ã¸ã®å¤‰æ›ãŒå¤±æ•—ã—ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[Float32](../data-types/float.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã€‚ +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- Float32/64ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`(大文字å°æ–‡å­—を区別ã—ãªã„)。 + +デフォルト値ãŒè¿”ã•ã‚Œã‚‹å¼•æ•°: +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toFloat32OrDefault('0xc0fe', CAST('0', 'Float32'));`. + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ32ビットã®æµ®å‹•å°æ•°ç‚¹æ•°å€¤ã€å¤±æ•—ã—ãŸå ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæ¸¡ã•ã‚ŒãŸå ´åˆãれを返ã—ã€æ¸¡ã•ã‚Œã¦ã„ãªã„å ´åˆã¯`0`ã‚’è¿”ã™ã€‚[Float32](../data-types/float.md). + +**例** + +クエリ: + +```sql +SELECT + toFloat32OrDefault('8', CAST('0', 'Float32')), + toFloat32OrDefault('abc', CAST('0', 'Float32')) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toFloat32OrDefault('8', CAST('0', 'Float32')): 8 +toFloat32OrDefault('abc', CAST('0', 'Float32')): 0 +``` + +**関連項目** + +- [`toFloat32`](#tofloat32). +- [`toFloat32OrZero`](#tofloat32orzero). +- [`toFloat32OrNull`](#tofloat32ornull). + +## toFloat64 + +入力値を型[`Float64`](../data-types/float.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーã®å ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toFloat64(expr) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列を返ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã€‚ +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- Float32/64ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`(大文字å°æ–‡å­—を区別ã—ãªã„)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数: +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toFloat64('0xc0fe');`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 64ビットã®æµ®å‹•å°æ•°ç‚¹æ•°å€¤ã€‚[Float64](../data-types/float.md). + +**例** + +クエリ: + +```sql +SELECT + toFloat64(42.7), + toFloat64('42.7'), + toFloat64('NaN') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toFloat64(42.7): 42.7 +toFloat64('42.7'): 42.7 +toFloat64('NaN'): nan +``` + +**関連項目** + +- [`toFloat64OrZero`](#tofloat64orzero). +- [`toFloat64OrNull`](#tofloat64ornull). +- [`toFloat64OrDefault`](#tofloat64ordefault). + +## toFloat64OrZero + +[`toFloat64`](#tofloat64)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[Float64](../data-types/float.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toFloat64OrZero(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/128/256, Float32/64ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数(`0`ãŒè¿”ã•ã‚Œã‚‹ï¼‰: +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toFloat64OrZero('0xc0fe');`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ64ビットã®æµ®å‹•å°æ•°ç‚¹æ•°å€¤ã€å¤±æ•—ã—ãŸå ´åˆã¯`0`。[Float64](../data-types/float.md). + +**例** + +クエリ: + +```sql +SELECT + toFloat64OrZero('42.7'), + toFloat64OrZero('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toFloat64OrZero('42.7'): 42.7 +toFloat64OrZero('abc'): 0 +``` + +**関連項目** + +- [`toFloat64`](#tofloat64). +- [`toFloat64OrNull`](#tofloat64ornull). +- [`toFloat64OrDefault`](#tofloat64ordefault). + +## toFloat64OrNull + +[`toFloat64`](#tofloat64)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[Float64](../data-types/float.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toFloat64OrNull(x) +``` + +**引数** + +- `x` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/128/256, Float32/64ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数(`\N`ãŒè¿”ã•ã‚Œã‚‹ï¼‰: +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toFloat64OrNull('0xc0fe');`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ64ビットã®æµ®å‹•å°æ•°ç‚¹æ•°å€¤ã€å¤±æ•—ã—ãŸå ´åˆã¯`\N`。[Float64](../data-types/float.md). + +**例** + +クエリ: + +```sql +SELECT + toFloat64OrNull('42.7'), + toFloat64OrNull('abc') +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toFloat64OrNull('42.7'): 42.7 +toFloat64OrNull('abc'): á´ºáµá´¸á´¸ +``` + +**関連項目** + +- [`toFloat64`](#tofloat64). +- [`toFloat64OrZero`](#tofloat64orzero). +- [`toFloat64OrDefault`](#tofloat64ordefault). + +## toFloat64OrDefault + +[`toFloat64`](#tofloat64)ã¨åŒæ§˜ã«ã€å…¥åŠ›å€¤ã‚’åž‹[Float64](../data-types/float.md)ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +デフォルト値ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã«ãªã‚‹ã¨`0`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toFloat64OrDefault(expr[, default]) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列を返ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions) / [String](../data-types/string.md). +- `default` (optional) — åž‹`Float64`ã¸ã®å¤‰æ›ãŒå¤±æ•—ã—ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[Float64](../data-types/float.md). + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る引数: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã€‚ +- (U)Int8/16/32/128/256ã®æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã€`NaN`ã‚„`Inf`ã‚’å«ã‚€ã€‚ +- Float32/64ã®æ–‡å­—列表ç¾ã€`NaN`ã‚„`Inf`(大文字å°æ–‡å­—を区別ã—ãªã„)。 + +デフォルト値ãŒè¿”ã•ã‚Œã‚‹å¼•æ•°: +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toFloat64OrDefault('0xc0fe', CAST('0', 'Float64'));`. + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆ64ビットã®æµ®å‹•å°æ•°ç‚¹æ•°å€¤ã€å¤±æ•—ã—ãŸå ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæ¸¡ã•ã‚ŒãŸå ´åˆãれを返ã—ã€æ¸¡ã•ã‚Œã¦ã„ãªã„å ´åˆã¯`0`ã‚’è¿”ã™ã€‚[Float64](../data-types/float.md). + +**例** + +クエリ: + +```sql +SELECT + toFloat64OrDefault('8', CAST('0', 'Float64')), + toFloat64OrDefault('abc', CAST('0', 'Float64')) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +toFloat64OrDefault('8', CAST('0', 'Float64')): 8 +toFloat64OrDefault('abc', CAST('0', 'Float64')): 0 +``` + +**関連項目** + +- [`toFloat64`](#tofloat64). +- [`toFloat64OrZero`](#tofloat64orzero). +- [`toFloat64OrNull`](#tofloat64ornull). + +## toDate + +引数を[Date](../data-types/date.md)データ型ã«å¤‰æ›ã—ã¾ã™ã€‚ + +引数ãŒ[DateTime](../data-types/datetime.md)ã‚„[DateTime64](../data-types/datetime64.md)ã®å ´åˆã€ãれを切りæ¨ã¦ã¦DateTimeã®æ—¥ä»˜ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’残ã—ã¾ã™ã€‚ + +```sql +SELECT + now() AS x, + toDate(x) +``` + +```response +┌───────────────────x─┬─toDate(now())─┠+│ 2022-12-30 13:44:17 │ 2022-12-30 │ +└─────────────────────┴───────────────┘ +``` + +引数ãŒ[String](../data-types/string.md)ã®å ´åˆã€[Date](../data-types/date.md)ã‚„[DateTime](../data-types/datetime.md)ã¨ã—ã¦è§£æžã•ã‚Œã¾ã™ã€‚[DateTime](../data-types/datetime.md)ã¨ã—ã¦è§£æžã•ã‚ŒãŸå ´åˆã€æ—¥ä»˜ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +```sql +SELECT + toDate('2022-12-30') AS x, + toTypeName(x) +``` + +```response +┌──────────x─┬─toTypeName(toDate('2022-12-30'))─┠+│ 2022-12-30 │ Date │ +└────────────┴──────────────────────────────────┘ + +1 row in set. Elapsed: 0.001 sec. +``` +```sql +SELECT + toDate('2022-12-30 01:02:03') AS x, + toTypeName(x) +``` + +```response +┌──────────x─┬─toTypeName(toDate('2022-12-30 01:02:03'))─┠+│ 2022-12-30 │ Date │ +└────────────┴───────────────────────────────────────────┘ +``` + +引数ãŒæ•°å€¤ã§ã‚ã‚Šã€UNIXタイムスタンプã®ã‚ˆã†ã«è¦‹ãˆã‚‹å ´åˆï¼ˆ65535より大ãã„å ´åˆï¼‰ã€ç¾åœ°ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§åˆ‡ã‚Šè©°ã‚られãŸ[DateTime](../data-types/datetime.md)ã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚タイムゾーン引数ã¯é–¢æ•°ã®ç¬¬äºŒå¼•æ•°ã¨ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚切り詰ã‚ã¯ã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã«ä¾å­˜ã—ã¾ã™ã€‚ + +```sql +SELECT + now() AS current_time, + toUnixTimestamp(current_time) AS ts, + toDateTime(ts) AS time_Amsterdam, + toDateTime(ts, 'Pacific/Apia') AS time_Samoa, + toDate(time_Amsterdam) AS date_Amsterdam, + toDate(time_Samoa) AS date_Samoa, + toDate(ts) AS date_Amsterdam_2, + toDate(ts, 'Pacific/Apia') AS date_Samoa_2 +``` + +```response +Row 1: +────── +current_time: 2022-12-30 13:51:54 +ts: 1672404714 +time_Amsterdam: 2022-12-30 13:51:54 +time_Samoa: 2022-12-31 01:51:54 +date_Amsterdam: 2022-12-30 +date_Samoa: 2022-12-31 +date_Amsterdam_2: 2022-12-30 +date_Samoa_2: 2022-12-31 +``` + +上記ã®ä¾‹ã¯ã€åŒã˜UNIXタイムスタンプãŒç•°ãªã‚‹ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§ç•°ãªã‚‹æ—¥ä»˜ã¨ã—ã¦è§£é‡ˆã•ã‚Œã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +引数ãŒæ•°å€¤ã§ã‚ã‚Šã€65536よりå°ã•ã„å ´åˆã€ãã‚Œã¯1970-01-01(最åˆã®UNIX日)ã‹ã‚‰ã®çµŒéŽæ—¥æ•°ã¨ã—ã¦è§£é‡ˆã•ã‚Œã€[Date](../data-types/date.md)ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€`Date`データ型ã®å†…部数値表ç¾ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚例: + +```sql +SELECT toDate(12345) +``` +```response +┌─toDate(12345)─┠+│ 2003-10-20 │ +└───────────────┘ +``` + +ã“ã®å¤‰æ›ã¯ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã«ã¯ä¾å­˜ã—ã¾ã›ã‚“。 + +引数ãŒDateåž‹ã®ç¯„囲ã«åŽã¾ã‚‰ãªã„å ´åˆã€ãã‚Œã¯å®Ÿè£…定義ã®æŒ¯ã‚‹èˆžã„を引ãèµ·ã“ã—ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹æœ€å¤§æ—¥ä»˜ã¾ã§é£½å’Œã™ã‚‹ã‹ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ï¼š +```sql +SELECT toDate(10000000000.) +``` +```response +┌─toDate(10000000000.)─┠+│ 2106-02-07 │ +└──────────────────────┘ +``` + +`toDate`関数ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ä»–ã®å½¢å¼ã§ã‚‚記述ã§ãã¾ã™ï¼š + +```sql +SELECT + now() AS time, + toDate(time), + DATE(time), + CAST(time, 'Date') +``` +```response +┌────────────────time─┬─toDate(now())─┬─DATE(now())─┬─CAST(now(), 'Date')─┠+│ 2022-12-30 13:54:58 │ 2022-12-30 │ 2022-12-30 │ 2022-12-30 │ +└─────────────────────┴───────────────┴─────────────┴─────────────────────┘ +``` + + +## toDateOrZero + +[toDate](#todate)ã¨åŒã˜ã§ã™ãŒã€ç„¡åŠ¹ãªå¼•æ•°ãŒå—ã‘å–られるã¨[Date](../data-types/date.md)ã®ä¸‹é™ã‚’è¿”ã—ã¾ã™ã€‚引数ã¨ã—ã¦ã¯[String](../data-types/string.md)ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT toDateOrZero('2022-12-30'), toDateOrZero(''); +``` + +çµæžœ: + +```response +┌─toDateOrZero('2022-12-30')─┬─toDateOrZero('')─┠+│ 2022-12-30 │ 1970-01-01 │ +└────────────────────────────┴──────────────────┘ +``` + + +## toDateOrNull + +[toDate](#todate)ã¨åŒã˜ã§ã™ãŒã€ç„¡åŠ¹ãªå¼•æ•°ãŒå—ã‘å–られるã¨`NULL`ã‚’è¿”ã—ã¾ã™ã€‚引数ã¨ã—ã¦ã¯[String](../data-types/string.md)ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT toDateOrNull('2022-12-30'), toDateOrNull(''); +``` + +çµæžœ: + +```response +┌─toDateOrNull('2022-12-30')─┬─toDateOrNull('')─┠+│ 2022-12-30 │ á´ºáµá´¸á´¸ │ +└────────────────────────────┴──────────────────┘ +``` + + +## toDateOrDefault + +[toDate](#todate)ã¨åŒæ§˜ã§ã™ãŒã€å¤±æ•—ã—ãŸå ´åˆã«ã¯ã€2番目ã®å¼•æ•°ï¼ˆæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼‰ã¾ãŸã¯[Date](../data-types/date.md)ã®ä¸‹é™ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toDateOrDefault(expr [, default_value]) +``` + +**例** + +クエリ: + +``` sql +SELECT toDateOrDefault('2022-12-30'), toDateOrDefault('', '2023-01-01'::Date); +``` + +çµæžœ: + +```response +┌─toDateOrDefault('2022-12-30')─┬─toDateOrDefault('', CAST('2023-01-01', 'Date'))─┠+│ 2022-12-30 │ 2023-01-01 │ +└───────────────────────────────┴─────────────────────────────────────────────────┘ +``` + + +## toDateTime + +入力値を[DateTime](../data-types/datetime.md)ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toDateTime(expr[, time_zone ]) +``` + +**引数** + +- `expr` — 値。[String](../data-types/string.md)ã€[Int](../data-types/int-uint.md)ã€[Date](../data-types/date.md)ã€ã¾ãŸã¯[DateTime](../data-types/datetime.md)。 +- `time_zone` — タイムゾーン。[String](../data-types/string.md)。 + +:::note +`expr`ãŒæ•°å€¤ã®å ´åˆã€Unixエãƒãƒƒã‚¯ã®é–‹å§‹ã‹ã‚‰ã®ç§’数(Unixタイムスタンプã¨ã—ã¦ï¼‰ã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚ +`expr`ãŒ[String](../data-types/string.md)ã®å ´åˆã€Unixタイムスタンプã¨ã—ã¦ã€ã¾ãŸã¯æ—¥ä»˜/時刻ã®æ–‡å­—列表ç¾ã¨ã—ã¦è§£é‡ˆã•ã‚Œå¾—ã¾ã™ã€‚ +ã—ãŸãŒã£ã¦ã€çŸ­ã„数値列ã®æ–‡å­—列表ç¾ï¼ˆ4æ¡ä»¥ä¸‹ï¼‰ã¯ã‚ã„ã¾ã„ã•ã®ãŸã‚明示的ã«ç„¡åŠ¹åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚例ãˆã°ã€æ–‡å­—列`'1999'`ã¯å¹´ï¼ˆDate/DateTimeã®ä¸å®Œå…¨ãªæ–‡å­—列表ç¾ï¼‰ã¾ãŸã¯Unixタイムスタンプã®ã„ãšã‚Œã‹ã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚より長ã„数値文字列ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 日付時間。[DateTime](../data-types/datetime.md) + +**例** + +クエリ: + +``` sql +SELECT toDateTime('2022-12-30 13:44:17'), toDateTime(1685457500, 'UTC'); +``` + +çµæžœ: + +```response +┌─toDateTime('2022-12-30 13:44:17')─┬─toDateTime(1685457500, 'UTC')─┠+│ 2022-12-30 13:44:17 │ 2023-05-30 14:38:20 │ +└───────────────────────────────────┴───────────────────────────────┘ +``` + + +## toDateTimeOrZero + +[toDateTime](#todatetime)ã¨åŒæ§˜ã§ã™ãŒã€ç„¡åŠ¹ãªå¼•æ•°ãŒå—ã‘å–られるã¨[DateTime](../data-types/datetime.md)ã®ä¸‹é™ã‚’è¿”ã—ã¾ã™ã€‚引数ã¨ã—ã¦ã¯[String](../data-types/string.md)ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT toDateTimeOrZero('2022-12-30 13:44:17'), toDateTimeOrZero(''); +``` + +çµæžœ: + +```response +┌─toDateTimeOrZero('2022-12-30 13:44:17')─┬─toDateTimeOrZero('')─┠+│ 2022-12-30 13:44:17 │ 1970-01-01 00:00:00 │ +└─────────────────────────────────────────┴──────────────────────┘ +``` + + +## toDateTimeOrNull + +[toDateTime](#todatetime)ã¨åŒæ§˜ã§ã™ãŒã€ç„¡åŠ¹ãªå¼•æ•°ãŒå—ã‘å–られるã¨`NULL`ã‚’è¿”ã—ã¾ã™ã€‚引数ã¨ã—ã¦ã¯[String](../data-types/string.md)ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT toDateTimeOrNull('2022-12-30 13:44:17'), toDateTimeOrNull(''); +``` + +çµæžœ: + +```response +┌─toDateTimeOrNull('2022-12-30 13:44:17')─┬─toDateTimeOrNull('')─┠+│ 2022-12-30 13:44:17 │ á´ºáµá´¸á´¸ │ +└─────────────────────────────────────────┴──────────────────────┘ +``` + + +## toDateTimeOrDefault + +[toDateTime](#todatetime)ã®ã‚ˆã†ã«ã—ã¾ã™ãŒã€å¤±æ•—ã—ãŸå ´åˆã«ã¯ã€ç¬¬ä¸‰ã®å¼•æ•°ï¼ˆæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼‰ã€ã¾ãŸã¯[DateTime](../data-types/datetime.md)ã®ä¸‹é™ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toDateTimeOrDefault(expr [, time_zone [, default_value]]) +``` + +**例** + +クエリ: + +``` sql +SELECT toDateTimeOrDefault('2022-12-30 13:44:17'), toDateTimeOrDefault('', 'UTC', '2023-01-01'::DateTime('UTC')); +``` + +çµæžœ: + +```response +┌─toDateTimeOrDefault('2022-12-30 13:44:17')─┬─toDateTimeOrDefault('', 'UTC', CAST('2023-01-01', 'DateTime(\'UTC\')'))─┠+│ 2022-12-30 13:44:17 │ 2023-01-01 00:00:00 │ +└────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────┘ +``` + + +## toDate32 + +引数を[Date32](../data-types/date32.md)データ型ã«å¤‰æ›ã—ã¾ã™ã€‚値ãŒç¯„囲外ã®å ´åˆã€`toDate32`ã¯[Date32](../data-types/date32.md)ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¢ƒç•Œå€¤ã‚’è¿”ã—ã¾ã™ã€‚引数ãŒ[Date](../data-types/date.md)åž‹ã®å ´åˆã€ãã®å¢ƒç•ŒãŒè€ƒæ…®ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +toDate32(expr) +``` + +**引数** + +- `expr` — 値。[String](../data-types/string.md)ã€[UInt32](../data-types/int-uint.md)ã¾ãŸã¯[Date](../data-types/date.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- カレンダーã®æ—¥ä»˜ã€‚åž‹[Date32](../data-types/date32.md)。 + +**例** + +1. 値ãŒç¯„囲内ã®å ´åˆ: + +``` sql +SELECT toDate32('1955-01-01') AS value, toTypeName(value); +``` + +```response +┌──────value─┬─toTypeName(toDate32('1925-01-01'))─┠+│ 1955-01-01 │ Date32 │ +└────────────┴────────────────────────────────────┘ +``` + +2. 値ãŒç¯„囲外ã®å ´åˆ: + +``` sql +SELECT toDate32('1899-01-01') AS value, toTypeName(value); +``` + +```response +┌──────value─┬─toTypeName(toDate32('1899-01-01'))─┠+│ 1900-01-01 │ Date32 │ +└────────────┴────────────────────────────────────┘ +``` + +3. [Date](../data-types/date.md)引数ã®å ´åˆ: + +``` sql +SELECT toDate32(toDate('1899-01-01')) AS value, toTypeName(value); +``` + +```response +┌──────value─┬─toTypeName(toDate32(toDate('1899-01-01')))─┠+│ 1970-01-01 │ Date32 │ +└────────────┴────────────────────────────────────────────┘ +``` + +## toDate32OrZero + +[toDate32](#todate32)ã¨åŒæ§˜ã§ã™ãŒã€ç„¡åŠ¹ãªå¼•æ•°ãŒå—ã‘å–られるã¨[Date32](../data-types/date32.md)ã®æœ€å°å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT toDate32OrZero('1899-01-01'), toDate32OrZero(''); +``` + +çµæžœ: + +```response +┌─toDate32OrZero('1899-01-01')─┬─toDate32OrZero('')─┠+│ 1900-01-01 │ 1900-01-01 │ +└──────────────────────────────┴────────────────────┘ +``` + +## toDate32OrNull + +[toDate32](#todate32)ã¨åŒæ§˜ã§ã™ãŒã€ç„¡åŠ¹ãªå¼•æ•°ãŒå—ã‘å–られるã¨`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT toDate32OrNull('1955-01-01'), toDate32OrNull(''); +``` + +çµæžœ: + +```response +┌─toDate32OrNull('1955-01-01')─┬─toDate32OrNull('')─┠+│ 1955-01-01 │ á´ºáµá´¸á´¸ │ +└──────────────────────────────┴────────────────────┘ +``` + +## toDate32OrDefault + +引数を[Date32](../data-types/date32.md)データ型ã«å¤‰æ›ã—ã¾ã™ã€‚値ãŒç¯„囲外ã®å ´åˆã€`toDate32OrDefault`ã¯[Date32](../data-types/date32.md)ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ä¸‹å´ã®å¢ƒç•Œå€¤ã‚’è¿”ã—ã¾ã™ã€‚引数ãŒ[Date](../data-types/date.md)åž‹ã®å ´åˆã€ãã®å¢ƒç•ŒãŒè€ƒæ…®ã•ã‚Œã¾ã™ã€‚無効ãªå¼•æ•°ãŒå—ã‘å–られるã¨ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT + toDate32OrDefault('1930-01-01', toDate32('2020-01-01')), + toDate32OrDefault('xx1930-01-01', toDate32('2020-01-01')); +``` + +çµæžœ: + +```response +┌─toDate32OrDefault('1930-01-01', toDate32('2020-01-01'))─┬─toDate32OrDefault('xx1930-01-01', toDate32('2020-01-01'))─┠+│ 1930-01-01 │ 2020-01-01 │ +└─────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────────┘ +``` + +## toDateTime64 + +入力値を[DateTime64](../data-types/datetime64.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toDateTime64(expr, scale, [timezone]) +``` + +**引数** + +- `expr` — 値。[String](../data-types/string.md)ã€[UInt32](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã¾ãŸã¯[DateTime](../data-types/datetime.md)。 +- `scale` - ティックサイズ(精度): 10-精度秒。有効範囲: [ 0 : 9 ]。 +- `timezone`(オプション)- 指定ã—ãŸdatetime64オブジェクトã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- カレンダーã®æ—¥ä»˜ã¨æ™‚刻ã€ã‚µãƒ–秒精度ã‚り。[DateTime64](../data-types/datetime64.md)。 + +**例** + +1. 値ãŒç¯„囲内ã®å ´åˆ: + +``` sql +SELECT toDateTime64('1955-01-01 00:00:00.000', 3) AS value, toTypeName(value); +``` + +```response +┌───────────────────value─┬─toTypeName(toDateTime64('1955-01-01 00:00:00.000', 3))─┠+│ 1955-01-01 00:00:00.000 │ DateTime64(3) │ +└─────────────────────────┴────────────────────────────────────────────────────────┘ +``` + +2. 精度をæŒã¤å°æ•°ã¨ã—ã¦: + +``` sql +SELECT toDateTime64(1546300800.000, 3) AS value, toTypeName(value); +``` + +```response +┌───────────────────value─┬─toTypeName(toDateTime64(1546300800., 3))─┠+│ 2019-01-01 00:00:00.000 │ DateTime64(3) │ +└─────────────────────────┴──────────────────────────────────────────┘ +``` + +å°æ•°ç‚¹ãªã—ã§ã¯ã€å€¤ã¯ç§’å˜ä½ã®Unixタイムスタンプã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™: + +``` sql +SELECT toDateTime64(1546300800000, 3) AS value, toTypeName(value); +``` + +```response +┌───────────────────value─┬─toTypeName(toDateTime64(1546300800000, 3))─┠+│ 2282-12-31 00:00:00.000 │ DateTime64(3) │ +└─────────────────────────┴────────────────────────────────────────────┘ +``` + +3. `timezone`付ã: + +``` sql +SELECT toDateTime64('2019-01-01 00:00:00', 3, 'Asia/Istanbul') AS value, toTypeName(value); +``` + +```response +┌───────────────────value─┬─toTypeName(toDateTime64('2019-01-01 00:00:00', 3, 'Asia/Istanbul'))─┠+│ 2019-01-01 00:00:00.000 │ DateTime64(3, 'Asia/Istanbul') │ +└─────────────────────────┴─────────────────────────────────────────────────────────────────────┘ +``` + +## toDateTime64OrZero + +[toDateTime64](#todatetime64)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[DateTime64](../data-types/datetime64.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ç„¡åŠ¹ãªå¼•æ•°ãŒå—ã‘å–られるã¨[DateTime64](../data-types/datetime64.md)ã®æœ€å°å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toDateTime64OrZero(expr, scale, [timezone]) +``` + +**引数** + +- `expr` — 値。[String](../data-types/string.md)ã€[UInt32](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã¾ãŸã¯[DateTime](../data-types/datetime.md)。 +- `scale` - ティックサイズ(精度): 10-精度秒。有効範囲: [ 0 : 9 ]。 +- `timezone`(オプション)- 指定ã—ãŸDateTime64オブジェクトã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- カレンダーã®æ—¥ä»˜ã¨æ™‚刻ã€ã‚µãƒ–秒精度ã‚ã‚Šã€ãれ以外ã¯`DateTime64`ã®æœ€å°å€¤: `1970-01-01 01:00:00.000`。[DateTime64](../data-types/datetime64.md)。 + +**例** + +クエリ: + +```sql +SELECT toDateTime64OrZero('2008-10-12 00:00:00 00:30:30', 3) AS invalid_arg +``` + +çµæžœ: + +```response +┌─────────────invalid_arg─┠+│ 1970-01-01 01:00:00.000 │ +└─────────────────────────┘ +``` + +**å‚ç…§** + +- [toDateTime64](#todatetime64). +- [toDateTime64OrNull](#todatetime64ornull). +- [toDateTime64OrDefault](#todatetime64ordefault). + +## toDateTime64OrNull + +[toDateTime64](#todatetime64)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[DateTime64](../data-types/datetime64.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ç„¡åŠ¹ãªå¼•æ•°ãŒå—ã‘å–られるã¨`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toDateTime64OrNull(expr, scale, [timezone]) +``` + +**引数** + +- `expr` — 値。[String](../data-types/string.md)ã€[UInt32](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã¾ãŸã¯[DateTime](../data-types/datetime.md)。 +- `scale` - ティックサイズ(精度): 10-精度秒。有効範囲: [ 0 : 9 ]。 +- `timezone`(オプション)- 指定ã—ãŸDateTime64オブジェクトã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- カレンダーã®æ—¥ä»˜ã¨æ™‚刻ã€ã‚µãƒ–秒精度ã‚ã‚Šã€ãれ以外ã¯`NULL`。[DateTime64](../data-types/datetime64.md)/[NULL](../data-types/nullable.md)。 + +**例** + +クエリ: + +```sql +SELECT + toDateTime64OrNull('1976-10-18 00:00:00.30', 3) AS valid_arg, + toDateTime64OrNull('1976-10-18 00:00:00 30', 3) AS invalid_arg +``` + +çµæžœ: + +```response +┌───────────────valid_arg─┬─invalid_arg─┠+│ 1976-10-18 00:00:00.300 │ á´ºáµá´¸á´¸ │ +└─────────────────────────┴─────────────┘ +``` + +**å‚ç…§** + +- [toDateTime64](#todatetime64). +- [toDateTime64OrZero](#todatetime64orzero). +- [toDateTime64OrDefault](#todatetime64ordefault). + +## toDateTime64OrDefault + +[toDateTime64](#todatetime64)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[DateTime64](../data-types/datetime64.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ +無効ãªå¼•æ•°ãŒå—ã‘å–られるã¨ã€[DateTime64](../data-types/datetime64.md)ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¾ãŸã¯æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toDateTime64OrNull(expr, scale, [timezone, default]) +``` + +**引数** + +- `expr` — 値。[String](../data-types/string.md)ã€[UInt32](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã¾ãŸã¯[DateTime](../data-types/datetime.md)。 +- `scale` - ティックサイズ(精度): 10-精度秒。有効範囲: [ 0 : 9 ]。 +- `timezone`(オプション)- 指定ã—ãŸDateTime64オブジェクトã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã€‚ +- `default`(オプション)- 無効ãªå¼•æ•°ãŒå—ã‘å–られãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[DateTime64](../data-types/datetime64.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- カレンダーã®æ—¥ä»˜ã¨æ™‚刻ã€ã‚µãƒ–秒精度ã‚ã‚Šã€ãれ以外ã¯`DateTime64`ã®æœ€å°å€¤ã¾ãŸã¯æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[DateTime64](../data-types/datetime64.md)。 + +**例** + +クエリ: + +```sql +SELECT + toDateTime64OrDefault('1976-10-18 00:00:00 30', 3) AS invalid_arg, + toDateTime64OrDefault('1976-10-18 00:00:00 30', 3, 'UTC', toDateTime64('2001-01-01 00:00:00.00',3)) AS invalid_arg_with_default +``` + +çµæžœ: + +```response +┌─────────────invalid_arg─┬─invalid_arg_with_default─┠+│ 1970-01-01 01:00:00.000 │ 2000-12-31 23:00:00.000 │ +└─────────────────────────┴──────────────────────────┘ +``` + +**å‚ç…§** + +- [toDateTime64](#todatetime64). +- [toDateTime64OrZero](#todatetime64orzero). +- [toDateTime64OrNull](#todatetime64ornull). + +## toDecimal32 + +入力値を[`Decimal(9, S)`](../data-types/decimal.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ã€‚エラーãŒç™ºç”Ÿã—ãŸå ´åˆã«ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal32(expr, S) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions)。 +- `S` — å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡æ•°ã‚’指定ã—ã¾ã™ã€‚[UInt8](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数: +- Float32/64ã®`NaN`ãŠã‚ˆã³`Inf`ã®æ–‡å­—列表ç¾ï¼ˆå¤§æ–‡å­—å°æ–‡å­—を区別ã—ãªã„)。 +- 2進数ãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹ï¼š`SELECT toDecimal32('0xc0fe', 1);`。 + +:::note +`expr`ã®å€¤ãŒ`Decimal32`ã®ç¯„囲を超ãˆã‚‹ã¨ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(9 - S), 1 * 10^(9 - S) )`。 +å°æ•°ç‚¹ä»¥ä¸‹ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆå››æ¨äº”å…¥ã—ã¾ã›ã‚“)。 +整数部ã®éŽå‰°ãªæ¡ã¯ä¾‹å¤–を引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +:::warning +変æ›ã¯ä½™åˆ†ãªæ¡ã‚’切りæ¨ã¦ã€Float32/Float64入力ã§äºˆæœŸã—ãªã„動作をã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯æµ®å‹•å°æ•°ç‚¹æ¼”算を使用ã—ã¦ã„ã‚‹ãŸã‚ã§ã™ã€‚ +例:`toDecimal32(1.15, 2)`ã¯`1.14`ã¨ãªã‚Šã¾ã™ã€‚ãªãœãªã‚‰1.15 * 100ã¯æµ®å‹•å°æ•°ç‚¹ã§ã¯114.99ã¨ãªã‚‹ãŸã‚ã§ã™ã€‚ +内部整数型を使用ã™ã‚‹ãŸã‚ã«æ–‡å­—列入力を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š`toDecimal32('1.15', 2) = 1.15` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `Decimal(9, S)`åž‹ã®å€¤ã€‚[Decimal32(S)](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toDecimal32(2, 1) AS a, toTypeName(a) AS type_a, + toDecimal32(4.2, 2) AS b, toTypeName(b) AS type_b, + toDecimal32('4.2', 3) AS c, toTypeName(c) AS type_c +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: 2 +type_a: Decimal(9, 1) +b: 4.2 +type_b: Decimal(9, 2) +c: 4.2 +type_c: Decimal(9, 3) +``` + +**å‚ç…§** + +- [`toDecimal32OrZero`](#todecimal32orzero). +- [`toDecimal32OrNull`](#todecimal32ornull). +- [`toDecimal32OrDefault`](#todecimal32ordefault). + +## toDecimal32OrZero + +[`toDecimal32`](#todecimal32)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Decimal(9, S)](../data-types/decimal.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal32OrZero(expr, S) +``` + +**引数** + +- `expr` — 数値ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 +- `S` — å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡æ•°ã‚’指定ã—ã¾ã™ã€‚[UInt8](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256åž‹ã®æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数: +- Float32/64ã®`NaN`ãŠã‚ˆã³`Inf`ã®æ–‡å­—列表ç¾ã€‚ +- 2進数ãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹ï¼š`SELECT toDecimal32OrZero('0xc0fe', 1);`。 + +:::note +`expr`ã®å€¤ãŒ`Decimal32`ã®ç¯„囲を超ãˆã‚‹ã¨ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(9 - S), 1 * 10^(9 - S) )`。 +å°æ•°ç‚¹ä»¥ä¸‹ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆå››æ¨äº”å…¥ã—ã¾ã›ã‚“)。 +整数部ã®éŽå‰°ãªæ¡ã¯ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆã¯`Decimal(9, S)`åž‹ã®å€¤ã€ãれ以外ã®å ´åˆã¯`S`å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡ã‚’æŒã¤`0`。[Decimal32(S)](../data-types/decimal.md)。 + +**例** + +クエリ: + +``` sql +SELECT + toDecimal32OrZero(toString(-1.111), 5) AS a, + toTypeName(a), + toDecimal32OrZero(toString('Inf'), 5) as b, + toTypeName(b) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: -1.111 +toTypeName(a): Decimal(9, 5) +b: 0 +toTypeName(b): Decimal(9, 5) +``` + +**å‚ç…§** + +- [`toDecimal32`](#todecimal32). +- [`toDecimal32OrNull`](#todecimal32ornull). +- [`toDecimal32OrDefault`](#todecimal32ordefault). + +## toDecimal32OrNull + +[`toDecimal32`](#todecimal32)ã¨åŒæ§˜ã«ã€ã“ã®é–¢æ•°ã¯å…¥åŠ›å€¤ã‚’[Nullable(Decimal(9, S))](../data-types/decimal.md)åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã¯`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal32OrNull(expr, S) +``` + +**引数** + +- `expr` — 数値ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 +- `S` — å°æ•°ç‚¹ä»¥ä¸‹ã®æ¡æ•°ã‚’指定ã—ã¾ã™ã€‚[UInt8](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- (U)Int8/16/32/64/128/256åž‹ã®æ–‡å­—列表ç¾ã€‚ +- Float32/64åž‹ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„引数: +- Float32/64ã®`NaN`ãŠã‚ˆã³`Inf`ã®æ–‡å­—列表ç¾ã€‚ +- 2進数ãŠã‚ˆã³16進数ã®æ–‡å­—列表ç¾ã€ä¾‹ï¼š`SELECT toDecimal32OrNull('0xc0fe', 1);`。 + +:::note +`expr`ã®å€¤ãŒ`Decimal32`ã®ç¯„囲を超ãˆã‚‹ã¨ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(9 - S), 1 * 10^(9 - S) )`。 +å°æ•°ç‚¹ä»¥ä¸‹ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆå››æ¨äº”å…¥ã—ã¾ã›ã‚“)。 +整数部ã®éŽå‰°ãªæ¡ã¯ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸã—ãŸå ´åˆã¯`Nullable(Decimal(9, S))`åž‹ã®å€¤ã€ãれ以外ã®å ´åˆã¯åŒã˜åž‹ã®`NULL`。[Decimal32(S)](../data-types/decimal.md)。 + +**例** + +クエリ: + +``` sql +SELECT +``` +```sql +toDecimal64OrNull(toString(0.0001), 18) AS a, +toTypeName(a), +toDecimal64OrNull(toString('Inf'), 18) as b, +toTypeName(b) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: 0.0001 +toTypeName(a): Nullable(Decimal(18, 18)) +b: á´ºáµá´¸á´¸ +toTypeName(b): Nullable(Decimal(18, 18)) +``` + +**関連項目** + +- [`toDecimal64`](#todecimal64). +- [`toDecimal64OrZero`](#todecimal64orzero). +- [`toDecimal64OrDefault`](#todecimal64ordefault). + +## toDecimal64OrDefault + +[`toDecimal64`](#todecimal64) ã¨ä¼¼ã¦ãŠã‚Šã€ã“ã®é–¢æ•°ã¯ã€å…¥åŠ›å€¤ã‚’ [Decimal(18, S)](../data-types/decimal.md) åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal64OrDefault(expr, S[, default]) +``` + +**引数** + +- `expr` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 +- `S` — å°æ•°éƒ¨åˆ†ã®æœ€å¤§æ¡æ•°ã‚’指定ã™ã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ãƒ‘ラメータ。0ã‹ã‚‰18ã®ç¯„囲。[UInt8](../data-types/int-uint.md)。 +- `default` (オプション) — `Decimal64(S)` ã¸ã®å¤‰æ›ã«å¤±æ•—ã—ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[Decimal64(S)](../data-types/decimal.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- åž‹ (U)Int8/16/32/64/128/256 ã®æ–‡å­—列表ç¾ã€‚ +- åž‹ Float32/64 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- Float32/64 値 `NaN` ãŠã‚ˆã³ `Inf` ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toDecimal64OrDefault('0xc0fe', 1);`。 + +:::note +`expr` ã®å€¤ãŒ `Decimal64` ã®ç¯„囲を超ãˆã‚‹ã¨ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(18 - S), 1 * 10^(18 - S) )`。 +分数部分ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆä¸¸ã‚られã¾ã›ã‚“)。 +整数部分ã®éŽå‰°ãªæ¡ã¯ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +:::warning +変æ›ã¯ä½™åˆ†ãªæ¡ã‚’切りæ¨ã¦ã€Float32/Float64 入力ã§ä½œæ¥­ã™ã‚‹éš›ã«æœŸå¾…ã—ãªã„動作をã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚æ“作ã¯æµ®å‹•å°æ•°ç‚¹å‘½ä»¤ã‚’使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +例: `toDecimal64OrDefault(1.15, 2)` 㯠`1.14` ã«ç­‰ã—ããªã‚Šã¾ã™ã€‚ãªãœãªã‚‰ã€1.15 * 100 ã¯æµ®å‹•å°æ•°ç‚¹ã§ 114.99 ã ã‹ã‚‰ã§ã™ã€‚ +文字列入力を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€æ“作ãŒåŸºç›¤ã¨ãªã‚‹æ•´æ•°åž‹ã‚’使用ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™: `toDecimal64OrDefault('1.15', 2) = 1.15` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸæ™‚ã«ã¯ `Decimal(18, S)` åž‹ã®å€¤ã€å¤±æ•—時ã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚Œã°ãã®å€¤ã€æŒ‡å®šã•ã‚Œã¦ã„ãªã‘れ㰠`0`。 [Decimal64(S)](../data-types/decimal.md)。 + +**例** + +クエリ: + +```sql +SELECT + toDecimal64OrDefault(toString(0.0001), 18) AS a, + toTypeName(a), + toDecimal64OrDefault('Inf', 0, CAST('-1', 'Decimal64(0)')) AS b, + toTypeName(b) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: 0.0001 +toTypeName(a): Decimal(18, 18) +b: -1 +toTypeName(b): Decimal(18, 0) +``` + +**関連項目** + +- [`toDecimal64`](#todecimal64). +- [`toDecimal64OrZero`](#todecimal64orzero). +- [`toDecimal64OrNull`](#todecimal64ornull). + +## toDecimal128 + +入力値を [`Decimal(38, S)`](../data-types/decimal.md) åž‹ã«å¤‰æ›ã—ã€ã‚¹ã‚±ãƒ¼ãƒ« `S` ã‚’æŒã¤å€¤ã«ã—ã¾ã™ã€‚エラーã®å ´åˆã«ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal128(expr, S) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions)。 +- `S` — å°æ•°éƒ¨åˆ†ã®æœ€å¤§æ¡æ•°ã‚’指定ã™ã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ãƒ‘ラメータ。0ã‹ã‚‰38ã®ç¯„囲。[UInt8](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- åž‹ (U)Int8/16/32/64/128/256 ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- åž‹ Float32/64 ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- 値ã¾ãŸã¯æ–‡å­—列表ç¾ã® Float32/64 値 `NaN` ãŠã‚ˆã³ `Inf`(大文字å°æ–‡å­—を区別ã—ãªã„)。 +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toDecimal128('0xc0fe', 1);`。 + +:::note +`expr` ã®å€¤ãŒ `Decimal128` ã®ç¯„囲を超ãˆã‚‹ã¨ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(38 - S), 1 * 10^(38 - S) )`。 +分数部分ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆä¸¸ã‚られã¾ã›ã‚“)。 +整数部分ã®éŽå‰°ãªæ¡ã¯ä¾‹å¤–を引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +:::warning +変æ›ã¯ä½™åˆ†ãªæ¡ã‚’切りæ¨ã¦ã€Float32/Float64 入力ã§ä½œæ¥­ã™ã‚‹éš›ã«æœŸå¾…ã—ãªã„動作をã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚æ“作ã¯æµ®å‹•å°æ•°ç‚¹å‘½ä»¤ã‚’使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +例: `toDecimal128(1.15, 2)` 㯠`1.14` ã«ç­‰ã—ããªã‚Šã¾ã™ã€‚ãªãœãªã‚‰ã€1.15 * 100 ã¯æµ®å‹•å°æ•°ç‚¹ã§ 114.99 ã ã‹ã‚‰ã§ã™ã€‚ +文字列入力を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€æ“作ãŒåŸºç›¤ã¨ãªã‚‹æ•´æ•°åž‹ã‚’使用ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™: `toDecimal128('1.15', 2) = 1.15` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- åž‹ `Decimal(38, S)` ã®å€¤ã€‚[Decimal128(S)](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toDecimal128(99, 1) AS a, toTypeName(a) AS type_a, + toDecimal128(99.67, 2) AS b, toTypeName(b) AS type_b, + toDecimal128('99.67', 3) AS c, toTypeName(c) AS type_c +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: 99 +type_a: Decimal(38, 1) +b: 99.67 +type_b: Decimal(38, 2) +c: 99.67 +type_c: Decimal(38, 3) +``` + +**関連項目** + +- [`toDecimal128OrZero`](#todecimal128orzero). +- [`toDecimal128OrNull`](#todecimal128ornull). +- [`toDecimal128OrDefault`](#todecimal128ordefault). + +## toDecimal128OrZero + +[`toDecimal128`](#todecimal128) ã¨ä¼¼ã¦ãŠã‚Šã€ã“ã®é–¢æ•°ã¯ã€å…¥åŠ›å€¤ã‚’ [Decimal(38, S)](../data-types/decimal.md) åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯ `0` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal128OrZero(expr, S) +``` + +**引数** + +- `expr` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 +- `S` — å°æ•°éƒ¨åˆ†ã®æœ€å¤§æ¡æ•°ã‚’指定ã™ã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ãƒ‘ラメータ。0ã‹ã‚‰38ã®ç¯„囲。[UInt8](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- åž‹ (U)Int8/16/32/64/128/256 ã®æ–‡å­—列表ç¾ã€‚ +- åž‹ Float32/64 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- Float32/64 値 `NaN` ãŠã‚ˆã³ `Inf` ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toDecimal128OrZero('0xc0fe', 1);`。 + +:::note +`expr` ã®å€¤ãŒ `Decimal128` ã®ç¯„囲を超ãˆã‚‹ã¨ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(38 - S), 1 * 10^(38 - S) )`。 +分数部分ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆä¸¸ã‚られã¾ã›ã‚“)。 +整数部分ã®éŽå‰°ãªæ¡ã¯ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸæ™‚ã«ã¯åž‹ `Decimal(38, S)` ã®å€¤ã€å¤±æ•—時ã«ã¯ `S` å°æ•°ç‚¹ã‚’æŒã¤ `0`。[Decimal128(S)](../data-types/decimal.md). + +**例** + +クエリ: + +```sql +SELECT + toDecimal128OrZero(toString(0.0001), 38) AS a, + toTypeName(a), + toDecimal128OrZero(toString('Inf'), 38) as b, + toTypeName(b) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: 0.0001 +toTypeName(a): Decimal(38, 38) +b: 0 +toTypeName(b): Decimal(38, 38) +``` + +**関連項目** + +- [`toDecimal128`](#todecimal128). +- [`toDecimal128OrNull`](#todecimal128ornull). +- [`toDecimal128OrDefault`](#todecimal128ordefault). + +## toDecimal128OrNull + +[`toDecimal128`](#todecimal128) ã¨ä¼¼ã¦ãŠã‚Šã€ã“ã®é–¢æ•°ã¯ã€å…¥åŠ›å€¤ã‚’ [Nullable(Decimal(38, S))](../data-types/decimal.md) åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯ `NULL` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal128OrNull(expr, S) +``` + +**引数** + +- `expr` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 +- `S` — å°æ•°éƒ¨åˆ†ã®æœ€å¤§æ¡æ•°ã‚’指定ã™ã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ãƒ‘ラメータ。0ã‹ã‚‰38ã®ç¯„囲。[UInt8](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- åž‹ (U)Int8/16/32/64/128/256 ã®æ–‡å­—列表ç¾ã€‚ +- åž‹ Float32/64 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- Float32/64 値 `NaN` ãŠã‚ˆã³ `Inf` ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toDecimal128OrNull('0xc0fe', 1);`。 + +:::note +`expr` ã®å€¤ãŒ `Decimal128` ã®ç¯„囲を超ãˆã‚‹ã¨ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(38 - S), 1 * 10^(38 - S) )`。 +分数部分ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆä¸¸ã‚られã¾ã›ã‚“)。 +整数部分ã®éŽå‰°ãªæ¡ã¯ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸæ™‚ã«ã¯ `Nullable(Decimal(38, S))` åž‹ã®å€¤ã€å¤±æ•—時ã«ã¯åŒã˜åž‹ã® `NULL`。[Decimal128(S)](../data-types/decimal.md)。 + +**例** + +クエリ: + +```sql +SELECT + toDecimal128OrNull(toString(1/42), 38) AS a, + toTypeName(a), + toDecimal128OrNull(toString('Inf'), 38) as b, + toTypeName(b) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: 0.023809523809523808 +toTypeName(a): Nullable(Decimal(38, 38)) +b: á´ºáµá´¸á´¸ +toTypeName(b): Nullable(Decimal(38, 38)) +``` + +**関連項目** + +- [`toDecimal128`](#todecimal128). +- [`toDecimal128OrZero`](#todecimal128orzero). +- [`toDecimal128OrDefault`](#todecimal128ordefault). + +## toDecimal128OrDefault + +[`toDecimal128`](#todecimal128) ã¨ä¼¼ã¦ãŠã‚Šã€ã“ã®é–¢æ•°ã¯ã€å…¥åŠ›å€¤ã‚’ [Decimal(38, S)](../data-types/decimal.md) åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal128OrDefault(expr, S[, default]) +``` + +**引数** + +- `expr` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 +- `S` — å°æ•°éƒ¨åˆ†ã®æœ€å¤§æ¡æ•°ã‚’指定ã™ã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ãƒ‘ラメータ。0ã‹ã‚‰38ã®ç¯„囲。[UInt8](../data-types/int-uint.md)。 +- `default` (オプション) — `Decimal128(S)` åž‹ã¸ã®å¤‰æ›ã«å¤±æ•—ã—ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[Decimal128(S)](../data-types/decimal.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- åž‹ (U)Int8/16/32/64/128/256 ã®æ–‡å­—列表ç¾ã€‚ +- åž‹ Float32/64 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- Float32/64 値 `NaN` ãŠã‚ˆã³ `Inf` ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toDecimal128OrDefault('0xc0fe', 1);`。 + +:::note +`expr` ã®å€¤ãŒ `Decimal128` ã®ç¯„囲を超ãˆã‚‹ã¨ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(38 - S), 1 * 10^(38 - S) )`。 +分数部分ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆä¸¸ã‚られã¾ã›ã‚“)。 +整数部分ã®éŽå‰°ãªæ¡ã¯ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +:::warning +変æ›ã¯ä½™åˆ†ãªæ¡ã‚’切りæ¨ã¦ã€Float32/Float64 入力ã§ä½œæ¥­ã™ã‚‹éš›ã«æœŸå¾…ã—ãªã„動作をã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚æ“作ã¯æµ®å‹•å°æ•°ç‚¹å‘½ä»¤ã‚’使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +例: `toDecimal128OrDefault(1.15, 2)` 㯠`1.14` ã«ç­‰ã—ããªã‚Šã¾ã™ã€‚ãªãœãªã‚‰ã€1.15 * 100 ã¯æµ®å‹•å°æ•°ç‚¹ã§ 114.99 ã ã‹ã‚‰ã§ã™ã€‚ +文字列入力を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€æ“作ãŒåŸºç›¤ã¨ãªã‚‹æ•´æ•°åž‹ã‚’使用ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™: `toDecimal128OrDefault('1.15', 2) = 1.15` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸæ™‚ã«ã¯ `Decimal(38, S)` åž‹ã®å€¤ã€å¤±æ•—時ã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚Œã°ãã®å€¤ã€æŒ‡å®šã•ã‚Œã¦ã„ãªã‘れ㰠`0`。[Decimal128(S)](../data-types/decimal.md)。 + +**例** + +クエリ: + +```sql +SELECT + toDecimal128OrDefault(toString(1/42), 18) AS a, + toTypeName(a), + toDecimal128OrDefault('Inf', 0, CAST('-1', 'Decimal128(0)')) AS b, + toTypeName(b) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: 0.023809523809523808 +toTypeName(a): Decimal(38, 18) +b: -1 +toTypeName(b): Decimal(38, 0) +``` + +**関連項目** + +- [`toDecimal128`](#todecimal128). +- [`toDecimal128OrZero`](#todecimal128orzero). +- [`toDecimal128OrNull`](#todecimal128ornull). + +## toDecimal256 + +入力値を [`Decimal(76, S)`](../data-types/decimal.md) åž‹ã«å¤‰æ›ã—ã€ã‚¹ã‚±ãƒ¼ãƒ« `S` ã‚’æŒã¤å€¤ã«ã—ã¾ã™ã€‚エラーã®å ´åˆã«ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal256(expr, S) +``` + +**引数** + +- `expr` — 数値ã¾ãŸã¯æ•°å€¤ã®æ–‡å­—列表ç¾ã‚’è¿”ã™å¼ã€‚[Expression](../syntax.md/#syntax-expressions)。 +- `S` — å°æ•°éƒ¨åˆ†ã®æœ€å¤§æ¡æ•°ã‚’指定ã™ã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ãƒ‘ラメータ。0ã‹ã‚‰76ã®ç¯„囲。[UInt8](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- åž‹ (U)Int8/16/32/64/128/256 ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ +- åž‹ Float32/64 ã®å€¤ã¾ãŸã¯æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- 値ã¾ãŸã¯æ–‡å­—列表ç¾ã® Float32/64 値 `NaN` ãŠã‚ˆã³ `Inf`(大文字å°æ–‡å­—を区別ã—ãªã„)。 +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toDecimal256('0xc0fe', 1);`。 + +:::note +`expr` ã®å€¤ãŒ `Decimal256` ã®ç¯„囲を超ãˆã‚‹ã¨ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(76 - S), 1 * 10^(76 - S) )`。 +分数部分ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆä¸¸ã‚られã¾ã›ã‚“)。 +整数部分ã®éŽå‰°ãªæ¡ã¯ä¾‹å¤–を引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +:::warning +変æ›ã¯ä½™åˆ†ãªæ¡ã‚’切りæ¨ã¦ã€Float32/Float64 入力ã§ä½œæ¥­ã™ã‚‹éš›ã«æœŸå¾…ã—ãªã„動作をã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚æ“作ã¯æµ®å‹•å°æ•°ç‚¹å‘½ä»¤ã‚’使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +例: `toDecimal256(1.15, 2)` 㯠`1.14` ã«ç­‰ã—ããªã‚Šã¾ã™ã€‚ãªãœãªã‚‰ã€1.15 * 100 ã¯æµ®å‹•å°æ•°ç‚¹ã§ 114.99 ã ã‹ã‚‰ã§ã™ã€‚ +文字列入力を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€æ“作ãŒåŸºç›¤ã¨ãªã‚‹æ•´æ•°åž‹ã‚’使用ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™: `toDecimal256('1.15', 2) = 1.15` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- åž‹ `Decimal(76, S)` ã®å€¤ã€‚[Decimal256(S)](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + toDecimal256(99, 1) AS a, toTypeName(a) AS type_a, + toDecimal256(99.67, 2) AS b, toTypeName(b) AS type_b, + toDecimal256('99.67', 3) AS c, toTypeName(c) AS type_c +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: 99 +type_a: Decimal(76, 1) +b: 99.67 +type_b: Decimal(76, 2) +c: 99.67 +type_c: Decimal(76, 3) +``` + +**関連項目** + +- [`toDecimal256OrZero`](#todecimal256orzero). +- [`toDecimal256OrNull`](#todecimal256ornull). +- [`toDecimal256OrDefault`](#todecimal256ordefault). + +## toDecimal256OrZero + +[`toDecimal256`](#todecimal256) ã¨ä¼¼ã¦ãŠã‚Šã€ã“ã®é–¢æ•°ã¯ã€å…¥åŠ›å€¤ã‚’ [Decimal(76, S)](../data-types/decimal.md) åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯ `0` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal256OrZero(expr, S) +``` + +**引数** + +- `expr` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 +- `S` — å°æ•°éƒ¨åˆ†ã®æœ€å¤§æ¡æ•°ã‚’指定ã™ã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ãƒ‘ラメータ。0ã‹ã‚‰76ã®ç¯„囲。[UInt8](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- åž‹ (U)Int8/16/32/64/128/256 ã®æ–‡å­—列表ç¾ã€‚ +- åž‹ Float32/64 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- Float32/64 値 `NaN` ãŠã‚ˆã³ `Inf` ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toDecimal256OrZero('0xc0fe', 1);`。 + +:::note +`expr` ã®å€¤ãŒ `Decimal256` ã®ç¯„囲を超ãˆã‚‹ã¨ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(76 - S), 1 * 10^(76 - S) )`。 +分数部分ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆä¸¸ã‚られã¾ã›ã‚“)。 +整数部分ã®éŽå‰°ãªæ¡ã¯ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸæ™‚ã«ã¯åž‹ `Decimal(76, S)` ã®å€¤ã€å¤±æ•—時ã«ã¯ `S` å°æ•°ç‚¹ã‚’æŒã¤ `0`。[Decimal256(S)](../data-types/decimal.md). + +**例** + +クエリ: + +```sql +SELECT + toDecimal256OrZero(toString(0.0001), 76) AS a, + toTypeName(a), + toDecimal256OrZero(toString('Inf'), 76) as b, + toTypeName(b) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: 0.0001 +toTypeName(a): Decimal(76, 76) +b: 0 +toTypeName(b): Decimal(76, 76) +``` + +**関連項目** + +- [`toDecimal256`](#todecimal256). +- [`toDecimal256OrNull`](#todecimal256ornull). +- [`toDecimal256OrDefault`](#todecimal256ordefault). + +## toDecimal256OrNull + +[`toDecimal256`](#todecimal256) ã¨ä¼¼ã¦ãŠã‚Šã€ã“ã®é–¢æ•°ã¯ã€å…¥åŠ›å€¤ã‚’ [Nullable(Decimal(76, S))](../data-types/decimal.md) åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯ `NULL` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal256OrNull(expr, S) +``` + +**引数** + +- `expr` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 +- `S` — å°æ•°éƒ¨åˆ†ã®æœ€å¤§æ¡æ•°ã‚’指定ã™ã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ãƒ‘ラメータ。0ã‹ã‚‰76ã®ç¯„囲。[UInt8](../data-types/int-uint.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- åž‹ (U)Int8/16/32/64/128/256 ã®æ–‡å­—列表ç¾ã€‚ +- åž‹ Float32/64 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- Float32/64 値 `NaN` ãŠã‚ˆã³ `Inf` ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toDecimal256OrNull('0xc0fe', 1);`。 + +:::note +`expr` ã®å€¤ãŒ `Decimal256` ã®ç¯„囲を超ãˆã‚‹ã¨ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(76 - S), 1 * 10^(76 - S) )`。 +分数部分ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆä¸¸ã‚られã¾ã›ã‚“)。 +整数部分ã®éŽå‰°ãªæ¡ã¯ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸæ™‚ã«ã¯ `Nullable(Decimal(76, S))` åž‹ã®å€¤ã€å¤±æ•—時ã«ã¯åŒã˜åž‹ã® `NULL`。[Decimal256(S)](../data-types/decimal.md)。 + +**例** + +クエリ: + +```sql +SELECT + toDecimal256OrNull(toString(1/42), 76) AS a, + toTypeName(a), + toDecimal256OrNull(toString('Inf'), 76) as b, + toTypeName(b) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: 0.023809523809523808 +toTypeName(a): Nullable(Decimal(76, 76)) +b: á´ºáµá´¸á´¸ +toTypeName(b): Nullable(Decimal(76, 76)) +``` + +**関連項目** + +- [`toDecimal256`](#todecimal256). +- [`toDecimal256OrZero`](#todecimal256orzero). +- [`toDecimal256OrDefault`](#todecimal256ordefault). + +## toDecimal256OrDefault + +[`toDecimal256`](#todecimal256) ã¨ä¼¼ã¦ãŠã‚Šã€ã“ã®é–¢æ•°ã¯ã€å…¥åŠ›å€¤ã‚’ [Decimal(76, S)](../data-types/decimal.md) åž‹ã®å€¤ã«å¤‰æ›ã—ã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +toDecimal256OrDefault(expr, S[, default]) +``` + +**引数** + +- `expr` — æ•°å­—ã®æ–‡å­—列表ç¾ã€‚[String](../data-types/string.md)。 +- `S` — å°æ•°éƒ¨åˆ†ã®æœ€å¤§æ¡æ•°ã‚’指定ã™ã‚‹ã‚¹ã‚±ãƒ¼ãƒ«ãƒ‘ラメータ。0ã‹ã‚‰76ã®ç¯„囲。[UInt8](../data-types/int-uint.md)。 +- `default` (オプション) — `Decimal256(S)` åž‹ã¸ã®å¤‰æ›ã«å¤±æ•—ã—ãŸå ´åˆã«è¿”ã™ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚[Decimal256(S)](../data-types/decimal.md)。 + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å¼•æ•°: +- åž‹ (U)Int8/16/32/64/128/256 ã®æ–‡å­—列表ç¾ã€‚ +- åž‹ Float32/64 ã®æ–‡å­—列表ç¾ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œãªã„引数: +- Float32/64 値 `NaN` ãŠã‚ˆã³ `Inf` ã®æ–‡å­—列表ç¾ã€‚ +- ãƒã‚¤ãƒŠãƒªãŠã‚ˆã³16進数値ã®æ–‡å­—列表ç¾ã€ä¾‹: `SELECT toDecimal256OrDefault('0xc0fe', 1);`。 + +:::note +`expr` ã®å€¤ãŒ `Decimal256` ã®ç¯„囲を超ãˆã‚‹ã¨ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™: `( -1 * 10^(76 - S), 1 * 10^(76 - S) )`。 +分数部分ã®éŽå‰°ãªæ¡ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ˆä¸¸ã‚られã¾ã›ã‚“)。 +整数部分ã®éŽå‰°ãªæ¡ã¯ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚ +::: + +:::warning +変æ›ã¯ä½™åˆ†ãªæ¡ã‚’切りæ¨ã¦ã€Float32/Float64 入力ã§ä½œæ¥­ã™ã‚‹éš›ã«æœŸå¾…ã—ãªã„動作をã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚æ“作ã¯æµ®å‹•å°æ•°ç‚¹å‘½ä»¤ã‚’使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +例: `toDecimal256OrDefault(1.15, 2)` 㯠`1.14` ã«ç­‰ã—ããªã‚Šã¾ã™ã€‚ãªãœãªã‚‰ã€1.15 * 100 ã¯æµ®å‹•å°æ•°ç‚¹ã§ 114.99 ã ã‹ã‚‰ã§ã™ã€‚ +文字列入力を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€æ“作ãŒåŸºç›¤ã¨ãªã‚‹æ•´æ•°åž‹ã‚’使用ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™: `toDecimal256OrDefault('1.15', 2) = 1.15` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- æˆåŠŸæ™‚ã«ã¯ `Decimal(76, S)` åž‹ã®å€¤ã€å¤±æ•—時ã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚Œã°ãã®å€¤ã€æŒ‡å®šã•ã‚Œã¦ã„ãªã‘れ㰠`0`。[Decimal256(S)](../data-types/decimal.md)。 + +**例** + +クエリ: + +```sql +SELECT + toDecimal256OrDefault(toString(1/42), 76) AS a, + toTypeName(a), + toDecimal256OrDefault('Inf', 0, CAST('-1', 'Decimal256(0)')) AS b, + toTypeName(b) +FORMAT Vertical; +``` + +çµæžœ: + +```response +Row 1: +────── +a: 0.023809523809523808 +toTypeName(a): Decimal(76, 76) +b: -1 +toTypeName(b): Decimal(76, 0) +``` + +**関連項目** + +- [`toDecimal256`](#todecimal256). +- [`toDecimal256OrZero`](#todecimal256orzero). +- [`toDecimal256OrNull`](#todecimal256ornull). + +## toString + +数値ã€æ–‡å­—列(固定文字列ã§ã¯ãªã„)ã€æ—¥ä»˜ã€ãŠã‚ˆã³æ—¥æ™‚é–“ã®é–“ã§å¤‰æ›ã™ã‚‹ãŸã‚ã®é–¢æ•°ã€‚ +ã“れらã®ã™ã¹ã¦ã®é–¢æ•°ã¯1ã¤ã®å¼•æ•°ã‚’å—ã‘入れã¾ã™ã€‚ + +文字列ã¸ã®å¤‰æ›ã€ã¾ãŸã¯æ–‡å­—列ã‹ã‚‰å¤‰æ›ã™ã‚‹å ´åˆã€å€¤ã¯ TabSeparated å½¢å¼ï¼ˆãŠã‚ˆã³ã»ã¼ã™ã¹ã¦ã®ä»–ã®ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ï¼‰ã®è¦å‰‡ã‚’使用ã—ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¾ãŸã¯ãƒ‘ースã•ã‚Œã¾ã™ã€‚文字列ãŒãƒ‘ースã§ããªã„å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚Œã¾ã™ã€‚ + +日付を数値ã«å¤‰æ›ã™ã‚‹éš›ã€ã¾ãŸã¯ãã®é€†ã®å ´åˆã€æ—¥ä»˜ã¯Unixエãƒãƒƒã‚¯ã®é–‹å§‹ä»¥é™ã®æ—¥æ•°ã«å¯¾å¿œã—ã¾ã™ã€‚ +日時間を数値ã«å¤‰æ›ã™ã‚‹éš›ã€ã¾ãŸã¯ãã®é€†ã®å ´åˆã€æ—¥æ™‚é–“ã¯Unixエãƒãƒƒã‚¯ã®é–‹å§‹ä»¥é™ã®ç§’æ•°ã«å¯¾å¿œã—ã¾ã™ã€‚ + +toDate/toDateTime 関数ã®ãŸã‚ã®æ—¥ä»˜ã¨æ—¥æ™‚é–“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯æ¬¡ã®ã‚ˆã†ã«å®šç¾©ã•ã‚Œã¦ã„ã¾ã™: + +```response +YYYY-MM-DD +YYYY-MM-DD hh:mm:ss +``` + +例外ã¨ã—ã¦ã€Date ã« UInt32ã€Int32ã€UInt64ã€ã¾ãŸã¯ Int64 åž‹ã‹ã‚‰å¤‰æ›ã—ã€æ•°ãŒ65536以上ã®å ´åˆã€æ•°å€¤ã¯UNIXタイムスタンプã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ï¼ˆãã—ã¦æ—¥æ•°ã¨ã—ã¦ã¯è§£é‡ˆã•ã‚Œã¾ã›ã‚“)ãã—ã¦ã€æ—¥ä»˜ã«ä¸¸ã‚られã¾ã™ã€‚ã“ã‚Œã¯ã€ `toDate(unix_timestamp)` を書ãã¨ã„ã†ä¸€èˆ¬çš„ãªäº‹ä¾‹ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã•ã‚‚ãªã‘ã‚Œã°ã‚¨ãƒ©ãƒ¼ã¨ãªã‚Šã€ã‚ˆã‚Šé¢å€’㪠`toDate(toDateTime(unix_timestamp))` を書ã‹ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +日付ã¨æ—¥æ™‚é–“ã®é–“ã®å¤‰æ›ã¯è‡ªç„¶ãªæ–¹æ³•ã§è¡Œã‚ã‚Œã¾ã™: null 時間を追加ã™ã‚‹ã‹æ™‚間をドロップã—ã¾ã™ã€‚ + +数値型間ã®å¤‰æ›ã¯ C++ ã«ãŠã‘ã‚‹ç•°ãªã‚‹æ•°å€¤åž‹é–“ã®ä»£å…¥ã®è¦å‰‡ã¨åŒã˜ã‚‚ã®ã‚’使用ã—ã¾ã™ã€‚ + +ã•ã‚‰ã«ã€DateTime引数㮠toString 関数ã¯ã€ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã®åå‰ã‚’å«ã‚“ã ç¬¬äºŒã®æ–‡å­—列引数をå–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例: `Asia/Yekaterinburg` ã“ã®å ´åˆã€æ™‚é–“ã¯æŒ‡å®šã•ã‚ŒãŸã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã«å¾“ã£ã¦ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT + now() AS ts, + time_zone, + toString(ts, time_zone) AS str_tz_datetime +FROM system.time_zones +WHERE time_zone LIKE 'Europe%' +LIMIT 10 +``` + +çµæžœ: + +```response +┌──────────────────ts─┬─time_zone─────────┬─str_tz_datetime─────┠+│ 2023-09-08 19:14:59 │ Europe/Amsterdam │ 2023-09-08 21:14:59 │ +│ 2023-09-08 19:14:59 │ Europe/Andorra │ 2023-09-08 21:14:59 │ +│ 2023-09-08 19:14:59 │ Europe/Astrakhan │ 2023-09-08 23:14:59 │ +│ 2023-09-08 19:14:59 │ Europe/Athens │ 2023-09-08 22:14:59 │ +│ 2023-09-08 19:14:59 │ Europe/Belfast │ 2023-09-08 20:14:59 │ +│ 2023-09-08 19:14:59 │ Europe/Belgrade │ 2023-09-08 21:14:59 │ +│ 2023-09-08 19:14:59 │ Europe/Berlin │ 2023-09-08 21:14:59 │ +│ 2023-09-08 19:14:59 │ Europe/Bratislava │ 2023-09-08 21:14:59 │ +│ 2023-09-08 19:14:59 │ Europe/Brussels │ 2023-09-08 21:14:59 │ +│ 2023-09-08 19:14:59 │ Europe/Bucharest │ 2023-09-08 22:14:59 │ +└─────────────────────┴───────────────────┴─────────────────────┘ +``` + +ã¾ãŸã€`toUnixTimestamp` 関数もå‚ç…§ã—ã¦ãã ã•ã„。 + +## toFixedString + +[String](../data-types/string.md) åž‹ã®å¼•æ•°ã‚’ [FixedString(N)](../data-types/fixedstring.md) 型(固定長 N ã®æ–‡å­—列)ã«å¤‰æ›ã—ã¾ã™ã€‚ +文字列㌠N ãƒã‚¤ãƒˆæœªæº€ã®å ´åˆã€å³å´ã«nullãƒã‚¤ãƒˆãŒè¿½åŠ ã•ã‚Œã¾ã™ã€‚文字列㌠N ãƒã‚¤ãƒˆã‚’超ãˆã‚‹å ´åˆã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +toFixedString(s, N) +``` + +**引数** + +- `s` — 固定文字列ã«å¤‰æ›ã™ã‚‹æ–‡å­—列。[String](../data-types/string.md)。 +- `N` — é•·ã• N。[UInt8](../data-types/int-uint.md) + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é•·ã• N ã® `s` ã®å›ºå®šæ–‡å­—列。[FixedString](../data-types/fixedstring.md). + +**例** + +クエリ: + +``` sql +SELECT toFixedString('foo', 8) AS s; +``` + +çµæžœ: + +```response +┌─s─────────────┠+│ foo\0\0\0\0\0 │ +└───────────────┘ +``` + +## toStringCutToZero + +String ã¾ãŸã¯ FixedString 引数をå—ã‘付ã‘ã¾ã™ã€‚最åˆã«è¦‹ã¤ã‹ã£ãŸã‚¼ãƒ­ãƒã‚¤ãƒˆã§å†…容を切りå–ã£ãŸæ–‡å­—列を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +toStringCutToZero(s) +``` + +**例** + +クエリ: + +``` sql +SELECT toFixedString('foo', 8) AS s, toStringCutToZero(s) AS s_cut; +``` + +çµæžœ: + +```response +┌─s─────────────┬─s_cut─┠+│ foo\0\0\0\0\0 │ foo │ +└───────────────┴───────┘ +``` + +クエリ: + +``` sql +SELECT toFixedString('foo\0bar', 8) AS s, toStringCutToZero(s) AS s_cut; +``` + +çµæžœ: + +```response +┌─s──────────┬─s_cut─┠+│ foo\0bar\0 │ foo │ +└────────────┴───────┘ +``` + +## toDecimalString + +数値を指定ã•ã‚ŒãŸå°æ•°æ¡æ•°ã§ String ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toDecimalString(number, scale) +``` + +**引数** + +- `number` — String ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã‚‹å€¤ã€‚[Int, UInt](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã€[Decimal](../data-types/decimal.md)。 +- `scale` — å°æ•°æ¡æ•°ã€‚[UInt8](../data-types/int-uint.md)。 + * [Decimal](../data-types/decimal.md) ãŠã‚ˆã³ [Int, UInt](../data-types/int-uint.md) åž‹ã®æœ€å¤§ã‚¹ã‚±ãƒ¼ãƒ«ã¯ 77 ã§ã™ï¼ˆDecimal ã®æœ‰åŠ¹æ¡æ•°ã®æœ€å¤§å¯èƒ½æ•°ã§ã™ï¼‰ã€‚ + * [Float](../data-types/float.md) ã®æœ€å¤§ã‚¹ã‚±ãƒ¼ãƒ«ã¯ 60 ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã—ãŸæ¡æ•°ï¼ˆã‚¹ã‚±ãƒ¼ãƒ«ï¼‰ã§å…¥åŠ›å€¤ã‚’ [String](../data-types/string.md) ã¨ã—ã¦è¡¨ç¾ã—ãŸã‚‚ã®ã€‚ + è¦æ±‚ã•ã‚ŒãŸã‚¹ã‚±ãƒ¼ãƒ«ãŒå…ƒã®æ•°å€¤ã®ã‚¹ã‚±ãƒ¼ãƒ«ã‚ˆã‚Šå°ã•ã„å ´åˆã€é€šå¸¸ã®ç®—è¡“ã«å¾“ã£ã¦å››æ¨äº”å…¥ã•ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT toDecimalString(CAST('64.32', 'Float64'), 5); +``` + +çµæžœ: + +```response +┌toDecimalString(CAST('64.32', 'Float64'), 5)─┠+│ 64.32000 │ +└─────────────────────────────────────────────┘ +``` + +## reinterpretAsUInt8 + +入力値をUInt8åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã«ã‚ˆã‚‹ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’実行ã—ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€ã“ã®é–¢æ•°ã¯å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã›ãšã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆåž‹ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã§ã™ã€‚ + +**構文** + +```sql +reinterpretAsUInt8(x) +``` + +**パラメータ** + +- `x`: UInt8 ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã€[Date](../data-types/date.md)ã€[DateTime](../data-types/datetime.md)ã€[UUID](../data-types/uuid.md)ã€[String](../data-types/string.md)ã€ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- UInt8 ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[UInt8](../data-types/int-uint.md/#uint8-uint16-uint32-uint64-uint128-uint256-int8-int16-int32-int64-int128-int256). + +**例** + +クエリ: + +```sql +SELECT + toInt8(257) AS x, + toTypeName(x), + reinterpretAsUInt8(x) AS res, + toTypeName(res); +``` + +çµæžœ: + +```response +┌─x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 1 │ Int8 │ 1 │ UInt8 │ +└───┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsUInt16 + +入力値をUInt16åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã«ã‚ˆã‚‹ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’実行ã—ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€ã“ã®é–¢æ•°ã¯å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã›ãšã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆåž‹ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã§ã™ã€‚ + +**構文** + +```sql +reinterpretAsUInt16(x) +``` + +**パラメータ** + +- `x`: UInt16 ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã€[Date](../data-types/date.md)ã€[DateTime](../data-types/datetime.md)ã€[UUID](../data-types/uuid.md)ã€[String](../data-types/string.md)ã€ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- UInt16 ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[UInt16](../data-types/int-uint.md/#uint8-uint16-uint32-uint64-uint128-uint256-int8-int16-int32-int64-int128-int256). + +**例** + +クエリ: + +```sql +SELECT + toUInt8(257) AS x, + toTypeName(x), + reinterpretAsUInt16(x) AS res, + toTypeName(res); +``` + +çµæžœ: + +```response +┌─x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 1 │ UInt8 │ 1 │ UInt16 │ +└───┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsUInt32 + +入力値をUInt32åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã«ã‚ˆã‚‹ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’実行ã—ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€ã“ã®é–¢æ•°ã¯å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã›ãšã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆåž‹ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã§ã™ã€‚ + +**構文** + +```sql +reinterpretAsUInt32(x) +``` + +**パラメータ** + +- `x`: UInt32 ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã€[Date](../data-types/date.md)ã€[DateTime](../data-types/datetime.md)ã€[UUID](../data-types/uuid.md)ã€[String](../data-types/string.md)ã€ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- UInt32 ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[UInt32](../data-types/int-uint.md/#uint8-uint16-uint32-uint64-uint128-uint256-int8-int16-int32-int64-int128-int256). + +**例** + +クエリ: + +```sql +SELECT + toUInt16(257) AS x, + toTypeName(x), + reinterpretAsUInt32(x) AS res, + toTypeName(res) +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 257 │ UInt16 │ 257 │ UInt32 │ +└─────┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsUInt64 + +入力値をUInt64åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã«ã‚ˆã‚‹ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’実行ã—ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€ã“ã®é–¢æ•°ã¯å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã›ãšã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆåž‹ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã§ã™ã€‚ + +**構文** + +```sql +reinterpretAsUInt64(x) +``` + +**パラメータ** + +- `x`: UInt64 ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã€[Date](../data-types/date.md)ã€[DateTime](../data-types/datetime.md)ã€[UUID](../data-types/uuid.md)ã€[String](../data-types/string.md)ã€ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- UInt64 ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[UInt64](../data-types/int-uint.md/#uint8-uint16-uint32-uint64-uint128-uint256-int8-int16-int32-int64-int128-int256). + +**例** + +クエリ: + +```sql +SELECT + toUInt32(257) AS x, + toTypeName(x), + reinterpretAsUInt64(x) AS res, + toTypeName(res) +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 257 │ UInt32 │ 257 │ UInt64 │ +└─────┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsUInt128 + +入力値をUInt128åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã«ã‚ˆã‚‹ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’実行ã—ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€ã“ã®é–¢æ•°ã¯å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã›ãšã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆåž‹ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã§ã™ã€‚ + +**構文** + +```sql +reinterpretAsUInt128(x) +``` + +**パラメータ** + +- `x`: UInt128 ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã€[Date](../data-types/date.md)ã€[DateTime](../data-types/datetime.md)ã€[UUID](../data-types/uuid.md)ã€[String](../data-types/string.md)ã€ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- UInt128 ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[UInt128](../data-types/int-uint.md/#uint8-uint16-uint32-uint64-uint128-uint256-int8-int16-int32-int64-int128-int256). + +**例** + +クエリ: + +```sql +SELECT + toUInt64(257) AS x, + toTypeName(x), + reinterpretAsUInt128(x) AS res, + toTypeName(res) +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 257 │ UInt64 │ 257 │ UInt128 │ +└─────┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsUInt256 + +入力値をUInt256åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã«ã‚ˆã‚‹ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’実行ã—ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€ã“ã®é–¢æ•°ã¯å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã›ãšã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆåž‹ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã§ã™ã€‚ + +**構文** + +```sql +reinterpretAsUInt256(x) +``` + +**パラメータ** + +- `x`: UInt256 ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md)ã€[Float](../data-types/float.md)ã€[Date](../data-types/date.md)ã€[DateTime](../data-types/datetime.md)ã€[UUID](../data-types/uuid.md)ã€[String](../data-types/string.md)ã€ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- UInt256 ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[UInt256](../data-types/int-uint.md/#uint8-uint16-uint32-uint64-uint128-uint256-int8-int16-int32-int64-int128-int256). + +**例** + +クエリ: + +```sql +SELECT + toUInt128(257) AS x, + toTypeName(x), + reinterpretAsUInt256(x) AS res, + toTypeName(res) +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 257 │ UInt128 │ 257 │ UInt256 │ +└─────┴───────────────┴─────┴─────────────────┘ +``` + +入力値をUInt256åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã§ãƒã‚¤ãƒˆã®å†è§£é‡ˆã‚’è¡Œã„ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã¯ã—ã¾ã›ã‚“。ターゲット型ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +reinterpretAsUInt256(x) +``` + +**パラメータ** + +- `x`: UInt256ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md), [UUID](../data-types/uuid.md), [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- UInt256ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。 [UInt256](../data-types/int-uint.md/#uint8-uint16-uint32-uint64-uint128-uint256-int8-int16-int32-int64-int128-int256)。 + +**例** + +クエリ: + +```sql +SELECT + toUInt128(257) AS x, + toTypeName(x), + reinterpretAsUInt256(x) AS res, + toTypeName(res) +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 257 │ UInt128 │ 257 │ UInt256 │ +└─────┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsInt8 + +入力値をInt8åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã§ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’è¡Œã„ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã¯ã—ã¾ã›ã‚“。ターゲット型ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +reinterpretAsInt8(x) +``` + +**パラメータ** + +- `x`: Int8ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md), [UUID](../data-types/uuid.md), [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Int8ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[Int8](../data-types/int-uint.md/#int-ranges)。 + +**例** + +クエリ: + +```sql +SELECT + toUInt8(257) AS x, + toTypeName(x), + reinterpretAsInt8(x) AS res, + toTypeName(res); +``` + +çµæžœ: + +```response +┌─x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 1 │ UInt8 │ 1 │ Int8 │ +└───┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsInt16 + +入力値をInt16åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã§ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’è¡Œã„ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã¯ã—ã¾ã›ã‚“。ターゲット型ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +reinterpretAsInt16(x) +``` + +**パラメータ** + +- `x`: Int16ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md), [UUID](../data-types/uuid.md), [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Int16ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[Int16](../data-types/int-uint.md/#int-ranges)。 + +**例** + +クエリ: + +```sql +SELECT + toInt8(257) AS x, + toTypeName(x), + reinterpretAsInt16(x) AS res, + toTypeName(res); +``` + +çµæžœ: + +```response +┌─x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 1 │ Int8 │ 1 │ Int16 │ +└───┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsInt32 + +入力値をInt32åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã§ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’è¡Œã„ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã¯ã—ã¾ã›ã‚“。ターゲット型ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +reinterpretAsInt32(x) +``` + +**パラメータ** + +- `x`: Int32ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md), [UUID](../data-types/uuid.md), [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Int32ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[Int32](../data-types/int-uint.md/#int-ranges)。 + +**例** + +クエリ: + +```sql +SELECT + toInt16(257) AS x, + toTypeName(x), + reinterpretAsInt32(x) AS res, + toTypeName(res); +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 257 │ Int16 │ 257 │ Int32 │ +└─────┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsInt64 + +入力値をInt64åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã§ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’è¡Œã„ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã¯ã—ã¾ã›ã‚“。ターゲット型ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +reinterpretAsInt64(x) +``` + +**パラメータ** + +- `x`: Int64ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md), [UUID](../data-types/uuid.md), [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Int64ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[Int64](../data-types/int-uint.md/#int-ranges)。 + +**例** + +クエリ: + +```sql +SELECT + toInt32(257) AS x, + toTypeName(x), + reinterpretAsInt64(x) AS res, + toTypeName(res); +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 257 │ Int32 │ 257 │ Int64 │ +└─────┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsInt128 + +入力値をInt128åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã§ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’è¡Œã„ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã¯ã—ã¾ã›ã‚“。ターゲット型ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +reinterpretAsInt128(x) +``` + +**パラメータ** + +- `x`: Int128ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md), [UUID](../data-types/uuid.md), [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Int128ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[Int128](../data-types/int-uint.md/#int-ranges)。 + +**例** + +クエリ: + +```sql +SELECT + toInt64(257) AS x, + toTypeName(x), + reinterpretAsInt128(x) AS res, + toTypeName(res); +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 257 │ Int64 │ 257 │ Int128 │ +└─────┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsInt256 + +入力値をInt256åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã§ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’è¡Œã„ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã¯ã—ã¾ã›ã‚“。ターゲット型ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +reinterpretAsInt256(x) +``` + +**パラメータ** + +- `x`: Int256ã¨ã—ã¦ãƒã‚¤ãƒˆå†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md), [UUID](../data-types/uuid.md), [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Int256ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[Int256](../data-types/int-uint.md/#int-ranges)。 + +**例** + +クエリ: + +```sql +SELECT + toInt128(257) AS x, + toTypeName(x), + reinterpretAsInt256(x) AS res, + toTypeName(res); +``` + +çµæžœ: + +```response +┌───x─┬─toTypeName(x)─┬─res─┬─toTypeName(res)─┠+│ 257 │ Int128 │ 257 │ Int256 │ +└─────┴───────────────┴─────┴─────────────────┘ +``` + +## reinterpretAsFloat32 + +入力値をFloat32åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã§ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’è¡Œã„ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã¯ã—ã¾ã›ã‚“。ターゲット型ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +reinterpretAsFloat32(x) +``` + +**パラメータ** + +- `x`: Float32ã¨ã—ã¦å†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md), [UUID](../data-types/uuid.md), [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Float32ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[Float32](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT reinterpretAsUInt32(toFloat32(0.2)) as x, reinterpretAsFloat32(x); +``` + +çµæžœ: + +```response +┌──────────x─┬─reinterpretAsFloat32(x)─┠+│ 1045220557 │ 0.2 │ +└────────────┴─────────────────────────┘ +``` + +## reinterpretAsFloat64 + +入力値をFloat64åž‹ã®å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ã§ãƒã‚¤ãƒˆå†è§£é‡ˆã‚’è¡Œã„ã¾ã™ã€‚[`CAST`](#cast)ã¨ã¯ç•°ãªã‚Šã€å…ƒã®å€¤ã‚’ä¿æŒã—よã†ã¨ã¯ã—ã¾ã›ã‚“。ターゲット型ãŒå…¥åŠ›åž‹ã‚’表ç¾ã§ããªã„å ´åˆã€å‡ºåŠ›ã¯ç„¡æ„味ã«ãªã‚Šã¾ã™ã€‚ + +**構文** + +```sql +reinterpretAsFloat64(x) +``` + +**パラメータ** + +- `x`: Float64ã¨ã—ã¦å†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md), [UUID](../data-types/uuid.md), [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- Float64ã¨ã—ã¦å†è§£é‡ˆã•ã‚ŒãŸå€¤ `x`。[Float64](../data-types/float.md)。 + +**例** + +クエリ: + +```sql +SELECT reinterpretAsUInt64(toFloat64(0.2)) as x, reinterpretAsFloat64(x); +``` + +çµæžœ: + +```response +┌───────────────────x─┬─reinterpretAsFloat64(x)─┠+│ 4596373779694328218 │ 0.2 │ +└─────────────────────┴─────────────────────────┘ +``` + +## reinterpretAsDate + +文字列ã€å›ºå®šæ–‡å­—列ã¾ãŸã¯æ•°å€¤ã‚’å—ã‘å–ã‚Šã€ãƒã‚¤ãƒˆã‚’ホスト順(リトルエンディアン)ã§ã®æ•°å€¤ã¨ã—ã¦è§£é‡ˆã—ã¾ã™ã€‚解釈ã•ã‚ŒãŸæ•°å€¤ã‹ã‚‰Unixエãƒãƒƒã‚¯ã®å§‹ã¾ã‚Šã‹ã‚‰ã®æ—¥æ•°ã¨ã—ã¦æ—¥ä»˜ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +reinterpretAsDate(x) +``` + +**パラメータ** + +- `x`: Unixエãƒãƒƒã‚¯ã®å§‹ã¾ã‚Šã‹ã‚‰ã®æ—¥æ•°ã€‚[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md), [UUID](../data-types/uuid.md), [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 日付。[Date](../data-types/date.md)。 + +**実装ã®è©³ç´°** + +:::note +指定ã•ã‚ŒãŸæ–‡å­—列ãŒå分ãªé•·ã•ã§ãªã„å ´åˆã€å¿…è¦ãªæ•°ã®ãƒŒãƒ«ãƒã‚¤ãƒˆã§ãƒ‘ディングã•ã‚ŒãŸã‹ã®ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ã€‚文字列ãŒå¿…è¦ãªé•·ã•ã‚’超ãˆã¦ã„ã‚‹å ´åˆã€ä½™åˆ†ãªãƒã‚¤ãƒˆã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT reinterpretAsDate(65), reinterpretAsDate('A'); +``` + +çµæžœ: + +```response +┌─reinterpretAsDate(65)─┬─reinterpretAsDate('A')─┠+│ 1970-03-07 │ 1970-03-07 │ +└───────────────────────┴────────────────────────┘ +``` + +## reinterpretAsDateTime + +ã“れらã®é–¢æ•°ã¯æ–‡å­—列をå—ã‘å–ã‚Šã€æ–‡å­—列ã®å…ˆé ­ã«é…ç½®ã•ã‚ŒãŸãƒã‚¤ãƒˆã‚’ホスト順(リトルエンディアン)ã§ã®æ•°å€¤ã¨ã—ã¦è§£é‡ˆã—ã¾ã™ã€‚Unixエãƒãƒƒã‚¯ã®å§‹ã¾ã‚Šã‹ã‚‰ã®ç§’æ•°ã¨ã—ã¦è§£é‡ˆã•ã‚ŒãŸæ—¥æ™‚ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +reinterpretAsDateTime(x) +``` + +**パラメータ** + +- `x`: Unixエãƒãƒƒã‚¯ã®å§‹ã¾ã‚Šã‹ã‚‰ã®ç§’数。[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md), [UUID](../data-types/uuid.md), [String](../data-types/string.md) ã¾ãŸã¯ [FixedString](../data-types/fixedstring.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 日付ã¨æ™‚刻。[DateTime](../data-types/datetime.md)。 + +**実装ã®è©³ç´°** + +:::note +指定ã•ã‚ŒãŸæ–‡å­—列ãŒå分ãªé•·ã•ã§ãªã„å ´åˆã€å¿…è¦ãªæ•°ã®ãƒŒãƒ«ãƒã‚¤ãƒˆã§ãƒ‘ディングã•ã‚ŒãŸã‹ã®ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ã€‚文字列ãŒå¿…è¦ãªé•·ã•ã‚’超ãˆã¦ã„ã‚‹å ´åˆã€ä½™åˆ†ãªãƒã‚¤ãƒˆã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT reinterpretAsDateTime(65), reinterpretAsDateTime('A'); +``` + +çµæžœ: + +```response +┌─reinterpretAsDateTime(65)─┬─reinterpretAsDateTime('A')─┠+│ 1970-01-01 01:01:05 │ 1970-01-01 01:01:05 │ +└───────────────────────────┴────────────────────────────┘ +``` + +## reinterpretAsString + +ã“ã®é–¢æ•°ã¯æ•°å€¤ã€æ—¥ä»˜ã¾ãŸã¯æ™‚刻ã®ã‚る日付をå—ã‘å–ã‚Šã€ãƒ›ã‚¹ãƒˆé †ï¼ˆãƒªãƒˆãƒ«ã‚¨ãƒ³ãƒ‡ã‚£ã‚¢ãƒ³ï¼‰ã§å¯¾å¿œã™ã‚‹å€¤ã‚’表ã™ãƒã‚¤ãƒˆã‚’å«ã‚€æ–‡å­—列を返ã—ã¾ã™ã€‚末尾ã®ãƒŒãƒ«ãƒã‚¤ãƒˆã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€UInt32åž‹ã®å€¤255ã¯1ãƒã‚¤ãƒˆé•·ã®æ–‡å­—列ã§ã™ã€‚ + +**構文** + +```sql +reinterpretAsString(x) +``` + +**パラメータ** + +- `x`: 文字列ã¨ã—ã¦å†è§£é‡ˆã™ã‚‹å€¤ã€‚[(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x`を表ã™ãƒã‚¤ãƒˆã‚’å«ã‚€æ–‡å­—列。[String](../data-types/fixedstring.md)。 + +**例** + +クエリ: + +```sql +SELECT + reinterpretAsString(toDateTime('1970-01-01 01:01:05')), + reinterpretAsString(toDate('1970-03-07')); +``` + +çµæžœ: + +```response +┌─reinterpretAsString(toDateTime('1970-01-01 01:01:05'))─┬─reinterpretAsString(toDate('1970-03-07'))─┠+│ A │ A │ +└────────────────────────────────────────────────────────┴───────────────────────────────────────────┘ +``` + +## reinterpretAsFixedString + +ã“ã®é–¢æ•°ã¯æ•°å€¤ã€æ—¥ä»˜ã¾ãŸã¯æ™‚刻ã®ã‚る日付をå—ã‘å–ã‚Šã€ãƒ›ã‚¹ãƒˆé †ï¼ˆãƒªãƒˆãƒ«ã‚¨ãƒ³ãƒ‡ã‚£ã‚¢ãƒ³ï¼‰ã§å¯¾å¿œã™ã‚‹å€¤ã‚’表ã™ãƒã‚¤ãƒˆã‚’å«ã‚€FixedStringã‚’è¿”ã—ã¾ã™ã€‚末尾ã®ãƒŒãƒ«ãƒã‚¤ãƒˆã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€UInt32åž‹ã®å€¤255ã¯1ãƒã‚¤ãƒˆé•·ã®FixedStringã§ã™ã€‚ + +**構文** + +```sql +reinterpretAsFixedString(x) +``` + +**パラメータ** + +- `x`: 文字列ã¨ã—ã¦å†è§£é‡ˆã™ã‚‹å€¤ã€‚ [(U)Int*](../data-types/int-uint.md), [Float](../data-types/float.md), [Date](../data-types/date.md), [DateTime](../data-types/datetime.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `x`を表ã™ãƒã‚¤ãƒˆã‚’å«ã‚€å›ºå®šé•·æ–‡å­—列。[FixedString](../data-types/fixedstring.md)。 + +**例** + +クエリ: + +```sql +SELECT + reinterpretAsFixedString(toDateTime('1970-01-01 01:01:05')), + reinterpretAsFixedString(toDate('1970-03-07')); +``` + +çµæžœ: + +```response +┌─reinterpretAsFixedString(toDateTime('1970-01-01 01:01:05'))─┬─reinterpretAsFixedString(toDate('1970-03-07'))─┠+│ A │ A │ +└─────────────────────────────────────────────────────────────┴────────────────────────────────────────────────┘ +``` + +## reinterpretAsUUID + +:::note +ã“ã“ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹UUID関数ã«åŠ ãˆã¦ã€å°‚用ã®[UUID関数ドキュメント](../functions/uuid-functions.md)ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +16ãƒã‚¤ãƒˆã®æ–‡å­—列をå—ã‘å–ã‚Šã€å¯¾è±¡ã®å€¤ã‚’ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒã‚¤ãƒˆã‚ªãƒ¼ãƒ€ãƒ¼ï¼ˆãƒ“ッグエンディアン)ã§è¡¨ã™ãƒã‚¤ãƒˆã‚’å«ã‚€UUIDã‚’è¿”ã—ã¾ã™ã€‚文字列ãŒå分ãªé•·ã•ã§ãªã„å ´åˆã€å¿…è¦ãªæ•°ã®ãƒŒãƒ«ãƒã‚¤ãƒˆã§ãƒ‘ディングã—ãŸã‹ã®ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚文字列ãŒ16ãƒã‚¤ãƒˆã‚’超ãˆã‚‹å ´åˆã€ä½™åˆ†ãªãƒã‚¤ãƒˆã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +reinterpretAsUUID(fixed_string) +``` + +**引数** + +- `fixed_string` — ビッグエンディアンã®ãƒã‚¤ãƒˆåˆ—。[FixedString](../data-types/fixedstring.md/#fixedstring)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- UUIDåž‹ã®å€¤ã€‚[UUID](../data-types/uuid.md/#uuid-data-type)。 + +**例** + +文字列をUUIDã«å¤‰æ›ã€‚ + +クエリ: + +``` sql +SELECT reinterpretAsUUID(reverse(unhex('000102030405060708090a0b0c0d0e0f'))); +``` + +çµæžœ: + +```response +┌─reinterpretAsUUID(reverse(unhex('000102030405060708090a0b0c0d0e0f')))─┠+│ 08090a0b-0c0d-0e0f-0001-020304050607 │ +└───────────────────────────────────────────────────────────────────────┘ +``` + +文字列ã¨UUIDé–“ã§å¤‰æ›ã€‚ + +クエリ: + +``` sql +WITH + generateUUIDv4() AS uuid, + identity(lower(hex(reverse(reinterpretAsString(uuid))))) AS str, + reinterpretAsUUID(reverse(unhex(str))) AS uuid2 +SELECT uuid = uuid2; +``` + +çµæžœ: + +```response +┌─equals(uuid, uuid2)─┠+│ 1 │ +└─────────────────────┘ +``` + +## reinterpret + +`x`ã®å€¤ã«å¯¾ã—ã¦åŒã˜ã‚½ãƒ¼ã‚¹ã®ã‚¤ãƒ³ãƒ¡ãƒ¢ãƒªãƒã‚¤ãƒˆåˆ—を使用ã—ã€ãれを目的ã®åž‹ã«å†è§£é‡ˆã—ã¾ã™ã€‚ + +**構文** + +``` sql +reinterpret(x, type) +``` + +**引数** + +- `x` — ä»»æ„ã®åž‹ã€‚ +- `type` — 目的ã®åž‹ã€‚[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 目的ã®åž‹ã®å€¤ã€‚ + +**例** + +クエリ: +```sql +SELECT reinterpret(toInt8(-1), 'UInt8') as int_to_uint, + reinterpret(toInt8(1), 'Float32') as int_to_float, + reinterpret('1', 'UInt32') as string_to_int; +``` + +çµæžœ: + +``` +┌─int_to_uint─┬─int_to_float─┬─string_to_int─┠+│ 255 │ 1e-45 │ 49 │ +└─────────────┴──────────────┴───────────────┘ +``` + +## CAST + +入力値を指定ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ã«å¤‰æ›ã—ã¾ã™ã€‚[reinterpret](#reinterpret)関数ã¨ã¯ç•°ãªã‚Šã€`CAST`ã¯æ–°ã—ã„データ型を使用ã—ã¦åŒã˜å€¤ã‚’表ç¾ã—よã†ã¨ã—ã¾ã™ã€‚変æ›ãŒã§ããªã„å ´åˆã€ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +複数ã®æ§‹æ–‡ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +CAST(x, T) +CAST(x AS t) +x::t +``` + +**引数** + +- `x` — 変æ›ã™ã‚‹å€¤ã€‚ä»»æ„ã®åž‹ã®å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- `T` — ターゲットデータ型ã®åå‰ã€‚[String](../data-types/string.md)。 +- `t` — ターゲットデータ型。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 変æ›ã•ã‚ŒãŸå€¤ã€‚ + +:::note +入力値ãŒã‚¿ãƒ¼ã‚²ãƒƒãƒˆåž‹ã®ç¯„囲ã«åŽã¾ã‚‰ãªã„å ´åˆã€çµæžœã¯ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¾ã™ã€‚例ãˆã°ã€`CAST(-1, 'UInt8')`ã¯`255`ã‚’è¿”ã—ã¾ã™ã€‚ +::: + +**例** + +クエリ: + +```sql +SELECT + CAST(toInt8(-1), 'UInt8') AS cast_int_to_uint, + CAST(1.5 AS Decimal(3,2)) AS cast_float_to_decimal, + '1'::Int32 AS cast_string_to_int; +``` + +çµæžœ: + +``` +┌─cast_int_to_uint─┬─cast_float_to_decimal─┬─cast_string_to_int─┠+│ 255 │ 1.50 │ 1 │ +└──────────────────┴───────────────────────┴────────────────────┘ +``` + +クエリ: + +``` sql +SELECT + '2016-06-15 23:00:00' AS timestamp, + CAST(timestamp AS DateTime) AS datetime, + CAST(timestamp AS Date) AS date, + CAST(timestamp, 'String') AS string, + CAST(timestamp, 'FixedString(22)') AS fixed_string; +``` + +çµæžœ: + +```response +┌─timestamp───────────┬────────────datetime─┬───────date─┬─string──────────────┬─fixed_string──────────────┠+│ 2016-06-15 23:00:00 │ 2016-06-15 23:00:00 │ 2016-06-15 │ 2016-06-15 23:00:00 │ 2016-06-15 23:00:00\0\0\0 │ +└─────────────────────┴─────────────────────┴────────────┴─────────────────────┴───────────────────────────┘ +``` + +[FixedString (N)](../data-types/fixedstring.md)ã¸ã®å¤‰æ›ã¯ã€[String](../data-types/string.md)ã¾ãŸã¯[FixedString](../data-types/fixedstring.md)åž‹ã®å¼•æ•°ã«å¯¾ã—ã¦ã®ã¿å‹•ä½œã—ã¾ã™ã€‚ + +[Nullable](../data-types/nullable.md)åž‹ã¸ã®å¤‰æ›ã‚„ãã®é€†ã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT toTypeName(x) FROM t_null; +``` + +çµæžœ: + +```response +┌─toTypeName(x)─┠+│ Int8 │ +│ Int8 │ +└───────────────┘ +``` + +クエリ: + +``` sql +SELECT toTypeName(CAST(x, 'Nullable(UInt16)')) FROM t_null; +``` + +çµæžœ: + +```response +┌─toTypeName(CAST(x, 'Nullable(UInt16)'))─┠+│ Nullable(UInt16) │ +│ Nullable(UInt16) │ +└─────────────────────────────────────────┘ +``` + +**関連項目** + +- [cast_keep_nullable](../../operations/settings/settings.md/#cast_keep_nullable) 設定 + +## accurateCast(x, T) + +`x`ã‚’`T`データ型ã«å¤‰æ›ã—ã¾ã™ã€‚ + +[cast](#cast)ã¨ã®é•ã„ã¯ã€`accurateCast`ã¯åž‹`T`ã®ç¯„囲内ã«åŽã¾ã‚‰ãªã„数値型ã®ã‚­ãƒ£ã‚¹ãƒˆã‚’許å¯ã—ãªã„ã“ã¨ã§ã™ã€‚ãŸã¨ãˆã°ã€`accurateCast(-1, 'UInt8')`ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT cast(-1, 'UInt8') as uint8; +``` + +çµæžœ: + +```response +┌─uint8─┠+│ 255 │ +└───────┘ +``` + +クエリ: + +```sql +SELECT accurateCast(-1, 'UInt8') as uint8; +``` + +çµæžœ: + +```response +Code: 70. DB::Exception: Received from localhost:9000. DB::Exception: Value in column Int8 cannot be safely converted into type UInt8: While processing accurateCast(-1, 'UInt8') AS uint8. +``` + +## accurateCastOrNull(x, T) + +入力値 `x` を指定ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ `T` ã«å¤‰æ›ã—ã¾ã™ã€‚常ã«[Nullable](../data-types/nullable.md)åž‹ã‚’è¿”ã—ã€ã‚­ãƒ£ã‚¹ãƒˆã•ã‚ŒãŸå€¤ãŒã‚¿ãƒ¼ã‚²ãƒƒãƒˆåž‹ã§è¡¨ç¾ã§ããªã„å ´åˆã¯[NULL](../syntax.md/#null-literal)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +accurateCastOrNull(x, T) +``` + +**引数** + +- `x` — 入力値。 +- `T` — è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã®åå‰ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ `T` ã«å¤‰æ›ã•ã‚ŒãŸå€¤ã€‚ + +**例** + +クエリ: + +``` sql +SELECT toTypeName(accurateCastOrNull(5, 'UInt8')); +``` + +çµæžœ: + +```response +┌─toTypeName(accurateCastOrNull(5, 'UInt8'))─┠+│ Nullable(UInt8) │ +└────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT + accurateCastOrNull(-1, 'UInt8') as uint8, + accurateCastOrNull(128, 'Int8') as int8, + accurateCastOrNull('Test', 'FixedString(2)') as fixed_string; +``` + +çµæžœ: + +```response +┌─uint8─┬─int8─┬─fixed_string─┠+│ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ +└───────┴──────┴──────────────┘ +``` + +## accurateCastOrDefault(x, T[, default_value]) + +入力値 `x` を指定ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ `T` ã«å¤‰æ›ã—ã¾ã™ã€‚キャストã•ã‚ŒãŸå€¤ãŒã‚¿ãƒ¼ã‚²ãƒƒãƒˆåž‹ã§è¡¨ç¾ã§ããªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆåž‹ã®å€¤ã¾ãŸã¯æŒ‡å®šã•ã‚ŒãŸ`default_value`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +accurateCastOrDefault(x, T) +``` + +**引数** + +- `x` — 入力値。 +- `T` — è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã®åå‰ã€‚ +- `default_value` — è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿åž‹ `T` ã«å¤‰æ›ã•ã‚ŒãŸå€¤ã€‚ + +**例** + +クエリ: + +``` sql +SELECT toTypeName(accurateCastOrDefault(5, 'UInt8')); +``` + +çµæžœ: + +```response +┌─toTypeName(accurateCastOrDefault(5, 'UInt8'))─┠+│ UInt8 │ +└───────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT + accurateCastOrDefault(-1, 'UInt8') as uint8, + accurateCastOrDefault(-1, 'UInt8', 5) as uint8_default, + accurateCastOrDefault(128, 'Int8') as int8, + accurateCastOrDefault(128, 'Int8', 5) as int8_default, + accurateCastOrDefault('Test', 'FixedString(2)') as fixed_string, + accurateCastOrDefault('Test', 'FixedString(2)', 'Te') as fixed_string_default; +``` + +çµæžœ: + +```response +┌─uint8─┬─uint8_default─┬─int8─┬─int8_default─┬─fixed_string─┬─fixed_string_default─┠+│ 0 │ 5 │ 0 │ 5 │ │ Te │ +└───────┴───────────────┴──────┴──────────────┴──────────────┴──────────────────────┘ +``` + +## toIntervalYear + +`n`å¹´ã®ãƒ‡ãƒ¼ã‚¿åž‹[IntervalYear](../data-types/special-data-types/interval.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toIntervalYear(n) +``` + +**引数** + +- `n` — å¹´ã®æ•°ã€‚æ•´æ•°ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€ãŠã‚ˆã³æµ®å‹•å°æ•°ç‚¹æ•°ã€‚[(U)Int*](../data-types/int-uint.md)/[Float*](../data-types/float.md)/[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `n`å¹´ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã€‚[IntervalYear](../data-types/special-data-types/interval.md)。 + +**例** + +クエリ: + +``` sql +WITH + toDate('2024-06-15') AS date, + toIntervalYear(1) AS interval_to_year +SELECT date + interval_to_year AS result +``` + +çµæžœ: + +```response +┌─────result─┠+│ 2025-06-15 │ +└────────────┘ +``` + +## toIntervalQuarter + +`n`å››åŠæœŸã®ãƒ‡ãƒ¼ã‚¿åž‹[IntervalQuarter](../data-types/special-data-types/interval.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toIntervalQuarter(n) +``` + +**引数** + +- `n` — å››åŠæœŸã®æ•°ã€‚æ•´æ•°ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€ãŠã‚ˆã³æµ®å‹•å°æ•°ç‚¹æ•°ã€‚[(U)Int*](../data-types/int-uint.md)/[Float*](../data-types/float.md)/[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `n`å››åŠæœŸã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã€‚[IntervalQuarter](../data-types/special-data-types/interval.md)。 + +**例** + +クエリ: + +``` sql +WITH + toDate('2024-06-15') AS date, + toIntervalQuarter(1) AS interval_to_quarter +SELECT date + interval_to_quarter AS result +``` + +çµæžœ: + +```response +┌─────result─┠+│ 2024-09-15 │ +└────────────┘ +``` + +## toIntervalMonth + +`n`ヶ月ã®ãƒ‡ãƒ¼ã‚¿åž‹[IntervalMonth](../data-types/special-data-types/interval.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toIntervalMonth(n) +``` + +**引数** + +- `n` — 月数。整数ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€ãŠã‚ˆã³æµ®å‹•å°æ•°ç‚¹æ•°ã€‚[(U)Int*](../data-types/int-uint.md)/[Float*](../data-types/float.md)/[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `n`ヶ月ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã€‚[IntervalMonth](../data-types/special-data-types/interval.md)。 + +**例** + +クエリ: + +``` sql +WITH + toDate('2024-06-15') AS date, + toIntervalMonth(1) AS interval_to_month +SELECT date + interval_to_month AS result +``` + +çµæžœ: + +```response +┌─────result─┠+│ 2024-07-15 │ +└────────────┘ +``` + +## toIntervalWeek + +`n`週ã®ãƒ‡ãƒ¼ã‚¿åž‹[IntervalWeek](../data-types/special-data-types/interval.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toIntervalWeek(n) +``` + +**引数** + +- `n` — 週ã®æ•°ã€‚æ•´æ•°ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€ãŠã‚ˆã³æµ®å‹•å°æ•°ç‚¹æ•°ã€‚[(U)Int*](../data-types/int-uint.md)/[Float*](../data-types/float.md)/[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `n`週ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã€‚[IntervalWeek](../data-types/special-data-types/interval.md)。 + +**例** + +クエリ: + +``` sql +WITH + toDate('2024-06-15') AS date, + toIntervalWeek(1) AS interval_to_week +SELECT date + interval_to_week AS result +``` + +çµæžœ: + +```response +┌─────result─┠+│ 2024-06-22 │ +└────────────┘ +``` + +## toIntervalDay + +`n`æ—¥ã®ãƒ‡ãƒ¼ã‚¿åž‹[IntervalDay](../data-types/special-data-types/interval.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toIntervalDay(n) +``` + +**引数** + +- `n` — 日数。整数ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€ãŠã‚ˆã³æµ®å‹•å°æ•°ç‚¹æ•°ã€‚[(U)Int*](../data-types/int-uint.md)/[Float*](../data-types/float.md)/[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `n`æ—¥ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã€‚[IntervalDay](../data-types/special-data-types/interval.md)。 + +**例** + +クエリ: + +``` sql +WITH + toDate('2024-06-15') AS date, + toIntervalDay(5) AS interval_to_days +SELECT date + interval_to_days AS result +``` + +çµæžœ: + +```response +┌─────result─┠+│ 2024-06-20 │ +└────────────┘ +``` + +## toIntervalHour + +`n`時間ã®ãƒ‡ãƒ¼ã‚¿åž‹[IntervalHour](../data-types/special-data-types/interval.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toIntervalHour(n) +``` + +**引数** + +- `n` — 時間ã®æ•°ã€‚æ•´æ•°ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€ãŠã‚ˆã³æµ®å‹•å°æ•°ç‚¹æ•°ã€‚[(U)Int*](../data-types/int-uint.md)/[Float*](../data-types/float.md)/[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `n`時間ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã€‚[IntervalHour](../data-types/special-data-types/interval.md)。 + +**例** + +クエリ: + +``` sql +WITH + toDate('2024-06-15') AS date, + toIntervalHour(12) AS interval_to_hours +SELECT date + interval_to_hours AS result +``` + +çµæžœ: + +```response +┌──────────────result─┠+│ 2024-06-15 12:00:00 │ +└─────────────────────┘ +``` + +## toIntervalMinute + +`n`分ã®ãƒ‡ãƒ¼ã‚¿åž‹[IntervalMinute](../data-types/special-data-types/interval.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toIntervalMinute(n) +``` + +**引数** + +- `n` — 分ã®æ•°ã€‚æ•´æ•°ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€ãŠã‚ˆã³æµ®å‹•å°æ•°ç‚¹æ•°ã€‚[(U)Int*](../data-types/int-uint.md)/[Float*](../data-types/float.md)/[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `n`分ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã€‚[IntervalMinute](../data-types/special-data-types/interval.md)。 + +**例** + +クエリ: + +``` sql +WITH + toDate('2024-06-15') AS date, + toIntervalMinute(12) AS interval_to_minutes +SELECT date + interval_to_minutes AS result +``` + +çµæžœ: + +```response +┌──────────────result─┠+│ 2024-06-15 00:12:00 │ +└─────────────────────┘ +``` + +## toIntervalSecond + +`n`秒ã®ãƒ‡ãƒ¼ã‚¿åž‹[IntervalSecond](../data-types/special-data-types/interval.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toIntervalSecond(n) +``` + +**引数** + +- `n` — 秒ã®æ•°ã€‚æ•´æ•°ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€ãŠã‚ˆã³æµ®å‹•å°æ•°ç‚¹æ•°ã€‚[(U)Int*](../data-types/int-uint.md)/[Float*](../data-types/float.md)/[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `n`秒ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã€‚[IntervalSecond](../data-types/special-data-types/interval.md)。 + +**例** + +クエリ: + +``` sql +WITH + toDate('2024-06-15') AS date, + toIntervalSecond(30) AS interval_to_seconds +SELECT date + interval_to_seconds AS result +``` + +çµæžœ: + +```response +┌──────────────result─┠+│ 2024-06-15 00:00:30 │ +└─────────────────────┘ +``` + +## toIntervalMillisecond + +`n`ミリ秒ã®ãƒ‡ãƒ¼ã‚¿åž‹[IntervalMillisecond](../data-types/special-data-types/interval.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toIntervalMillisecond(n) +``` + +**引数** + +- `n` — ミリ秒ã®æ•°ã€‚æ•´æ•°ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€ãŠã‚ˆã³æµ®å‹•å°æ•°ç‚¹æ•°ã€‚[(U)Int*](../data-types/int-uint.md)/[Float*](../data-types/float.md)/[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `n`ミリ秒ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã€‚[IntervalMilliseconds](../data-types/special-data-types/interval.md)。 + +**例** + +クエリ: + +``` sql +WITH + toDateTime('2024-06-15') AS date, + toIntervalMillisecond(30) AS interval_to_milliseconds +SELECT date + interval_to_milliseconds AS result +``` + +çµæžœ: + +```response +┌──────────────────result─┠+│ 2024-06-15 00:00:00.030 │ +└─────────────────────────┘ +``` + +## toIntervalMicrosecond + +`n`マイクロ秒ã®ãƒ‡ãƒ¼ã‚¿åž‹[IntervalMicrosecond](../data-types/special-data-types/interval.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toIntervalMicrosecond(n) +``` + +**引数** + +- `n` — マイクロ秒ã®æ•°ã€‚æ•´æ•°ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€ãŠã‚ˆã³æµ®å‹•å°æ•°ç‚¹æ•°ã€‚[(U)Int*](../data-types/int-uint.md)/[Float*](../data-types/float.md)/[String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `n`マイクロ秒ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã€‚[IntervalMicrosecond](../data-types/special-data-types/interval.md)。 + +**例** + +クエリ: + +``` sql +WITH + toDateTime('2024-06-15') AS date, + toIntervalMicrosecond(30) AS interval_to_microseconds +SELECT date + interval_to_microseconds AS result +``` + +çµæžœ: + +```response +┌─────────────────────result─┠+│ 2024-06-15 00:00:00.000030 │ +└────────────────────────────┘ +``` + +## toIntervalNanosecond + +`n`ナノ秒ã®ãƒ‡ãƒ¼ã‚¿åž‹[IntervalNanosecond](../data-types/special-data-types/interval.md)ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +``` sql +toIntervalNanosecond(n) +``` + +**引数** +- `n` — ナノ秒ã®æ•°ã€‚整数値ã¾ãŸã¯ãã®æ–‡å­—列表ç¾ã€ãŠã‚ˆã³æµ®å‹•å°æ•°ç‚¹æ•°ã€‚[(U)Int*](../data-types/int-uint.md)/[Float*](../data-types/float.md)/[String](../data-types/string.md)。 + +**戻り値** + +- `n` ナノ秒ã®é–“隔。[IntervalNanosecond](../data-types/special-data-types/interval.md)。 + +**例** + +クエリ: + +``` sql +WITH + toDateTime('2024-06-15') AS date, + toIntervalNanosecond(30) AS interval_to_nanoseconds +SELECT date + interval_to_nanoseconds AS result +``` + +çµæžœ: + +```response +┌────────────────────────result─┠+│ 2024-06-15 00:00:00.000000030 │ +└───────────────────────────────┘ +``` + +## parseDateTime + +[MySQL å½¢å¼ã®æ–‡å­—列](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-format)ã«å¾“ã£ã¦[String](../data-types/string.md)ã‚’[DateTime](../data-types/datetime.md)ã«å¤‰æ›ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯[formatDateTime](../functions/date-time-functions.md#date_time_functions-formatDateTime)関数ã®å対ã®æ“作を行ã„ã¾ã™ã€‚ + +**構文** + +``` sql +parseDateTime(str[, format[, timezone]]) +``` + +**引数** + +- `str` — 解æžã•ã‚Œã‚‹æ–‡å­—列 +- `format` — フォーマット文字列。çœç•¥å¯èƒ½ã€‚指定ã—ãªã„å ´åˆ `%Y-%m-%d %H:%i:%s`。 +- `timezone` — [タイムゾーン](/docs/ja/operations/server-configuration-parameters/settings.md#timezone)。çœç•¥å¯èƒ½ã€‚ + +**戻り値** + +MySQL å½¢å¼ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列ã«å¾“ã£ã¦å…¥åŠ›æ–‡å­—列ã‹ã‚‰è§£æžã•ã‚ŒãŸ DateTime 値を返ã—ã¾ã™ã€‚ + +**対応フォーマット指定å­** + +[formatDateTime](../functions/date-time-functions.md#date_time_functions-formatDateTime)ã«è¨˜è¼‰ã•ã‚ŒãŸã™ã¹ã¦ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæŒ‡å®šå­ã«å¯¾å¿œã€‚ãŸã ã—以下を除ã: +- %Q: å››åŠæœŸ (1-4) + +**例** + +``` sql +SELECT parseDateTime('2021-01-04+23:00:00', '%Y-%m-%d+%H:%i:%s') + +┌─parseDateTime('2021-01-04+23:00:00', '%Y-%m-%d+%H:%i:%s')─┠+│ 2021-01-04 23:00:00 │ +└───────────────────────────────────────────────────────────┘ +``` + +別å: `TO_TIMESTAMP`. + +## parseDateTimeOrZero + +[parseDateTime](#parsedatetime)ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã€ã‚¼ãƒ­æ—¥ä»˜ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTimeOrNull + +[parseDateTime](#parsedatetime)ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã€`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +別å: `str_to_date`. + +## parseDateTimeInJodaSyntax + +[parseDateTime](#parsedatetime)ã«é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæ–‡å­—列ãŒMySQL構文ã§ã¯ãªã[Joda](https://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html)ã§ã‚る点ãŒç•°ãªã‚Šã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯[formatDateTimeInJodaSyntax](../functions/date-time-functions.md#date_time_functions-formatDateTimeInJodaSyntax)関数ã®å対ã®æ“作を行ã„ã¾ã™ã€‚ + +**構文** + +``` sql +parseDateTimeInJodaSyntax(str[, format[, timezone]]) +``` + +**引数** + +- `str` — 解æžã•ã‚Œã‚‹æ–‡å­—列 +- `format` — フォーマット文字列。çœç•¥å¯èƒ½ã€‚指定ã—ãªã„å ´åˆã€`yyyy-MM-dd HH:mm:ss`。 +- `timezone` — [タイムゾーン](/docs/ja/operations/server-configuration-parameters/settings.md#timezone)。çœç•¥å¯èƒ½ã€‚ + +**戻り値** + +Joda スタイルã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¾“ã£ã¦å…¥åŠ›æ–‡å­—列ã‹ã‚‰è§£æžã•ã‚ŒãŸ DateTime 値を返ã—ã¾ã™ã€‚ + +**対応フォーマット指定å­** + +[formatDateTimeInJoda](../functions/date-time-functions.md#date_time_functions-formatDateTime)ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆæŒ‡å®šå­ã«å¯¾å¿œã€‚ãŸã ã—以下を除ã: +- S: 秒ã®å°æ•°éƒ¨åˆ† +- z: タイムゾーン +- Z: タイムゾーンオフセット/ID + +**例** + +``` sql +SELECT parseDateTimeInJodaSyntax('2023-02-24 14:53:31', 'yyyy-MM-dd HH:mm:ss', 'Europe/Minsk') + +┌─parseDateTimeInJodaSyntax('2023-02-24 14:53:31', 'yyyy-MM-dd HH:mm:ss', 'Europe/Minsk')─┠+│ 2023-02-24 14:53:31 │ +└─────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## parseDateTimeInJodaSyntaxOrZero + +[parseDateTimeInJodaSyntax](#parsedatetimeinjodasyntax)ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã€ã‚¼ãƒ­æ—¥ä»˜ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTimeInJodaSyntaxOrNull + +[parseDateTimeInJodaSyntax](#parsedatetimeinjodasyntax)ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã€`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTime64InJodaSyntax + +[parseDateTimeInJodaSyntax](#parsedatetimeinjodasyntax)ã«é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€åž‹[DateTime64](../data-types/datetime64.md)ã®å€¤ã‚’è¿”ã™ç‚¹ãŒç•°ãªã‚Šã¾ã™ã€‚ + +## parseDateTime64InJodaSyntaxOrZero + +[parseDateTime64InJodaSyntax](#parsedatetime64injodasyntax)ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã€ã‚¼ãƒ­æ—¥ä»˜ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTime64InJodaSyntaxOrNull + +[parseDateTime64InJodaSyntax](#parsedatetime64injodasyntax)ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã€`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTimeBestEffort +## parseDateTime32BestEffort + +[String](../data-types/string.md)ã®è¡¨ç¾ã«ã‚る日付ã¨æ™‚刻を[DateTime](../data-types/datetime.md/#data_type-datetime)データ型ã«å¤‰æ›ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)ã€[RFC 1123 - 5.2.14 RFC-822 日付ã¨æ™‚刻ã®ä»•æ§˜](https://tools.ietf.org/html/rfc1123#page-55)ã€ClickHouseã€ãŠã‚ˆã³ãã®ä»–ã®ã„ãã¤ã‹ã®æ—¥ä»˜ã¨æ™‚刻ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’解æžã—ã¾ã™ã€‚ + +**構文** + +``` sql +parseDateTimeBestEffort(time_string [, time_zone]) +``` + +**引数** + +- `time_string` — 変æ›ã™ã‚‹æ—¥æ™‚ã‚’å«ã‚€æ–‡å­—列。[String](../data-types/string.md)。 +- `time_zone` — タイムゾーン。関数㯠`time_string` をタイムゾーンã«å¾“ã£ã¦è§£æžã—ã¾ã™ã€‚[String](../data-types/string.md)。 + +**対応ã™ã‚‹éžæ¨™æº–フォーマット** + +- 9..10 æ¡ã®[UNIXタイムスタンプ](https://en.wikipedia.org/wiki/Unix_time)ã‚’å«ã‚€æ–‡å­—列。 +- 日時コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’å«ã‚€æ–‡å­—列: `YYYYMMDDhhmmss`, `DD/MM/YYYY hh:mm:ss`, `DD-MM-YY hh:mm`, `YYYY-MM-DD hh:mm:ss`, ãªã©ã€‚ +- 日付ã®ã¿ã§æ™‚間コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’å«ã¾ãªã„文字列: `YYYY`, `YYYYMM`, `YYYY*MM`, `DD/MM/YYYY`, `DD-MM-YY` ãªã©ã€‚ +- æ—¥ã¨æ™‚é–“ã‚’å«ã‚€æ–‡å­—列: `DD`, `DD hh`, `DD hh:mm`。ã“ã®å ´åˆã€`MM` 㯠`01` ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ +- 日付ã¨æ™‚刻ã«åŠ ãˆã¦ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚ªãƒ•ã‚»ãƒƒãƒˆæƒ…報をå«ã‚€æ–‡å­—列: `YYYY-MM-DD hh:mm:ss ±h:mm`, ãªã©ã€‚例: `2020-12-12 17:36:00 -5:00`. +- [syslog タイムスタンプ](https://datatracker.ietf.org/doc/html/rfc3164#section-4.1.2): `Mmm dd hh:mm:ss`。例: `Jun 9 14:20:32`. + +セパレータã®ã‚ã‚‹ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«ã¤ã„ã¦ã€é–¢æ•°ã¯æœˆã®åå‰ã‚’月ã®ãƒ•ãƒ«ãƒãƒ¼ãƒ ã¾ãŸã¯æœˆã®åå‰ã®æœ€åˆã®ä¸‰æ–‡å­—ã§è¡¨ç¾ã—ãŸã‚‚ã®ã‚’解æžã—ã¾ã™ã€‚例: `24/DEC/18`, `24-Dec-18`, `01-September-2018`。 +å¹´ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ç¾åœ¨ã®å¹´ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚çµæžœã® DateTime ãŒæœªæ¥ã®æ™‚é–“ã§ã‚ã£ãŸå ´åˆï¼ˆãŸã¨ãˆç¾åœ¨æ™‚刻より1秒後ã§ã‚ã£ã¦ã‚‚)ã€å‰å¹´ãŒç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +**戻り値** + +- `time_string` を変æ›ã—㟠[DateTime](../data-types/datetime.md) データ型。 + +**例** + +クエリ: + +``` sql +SELECT parseDateTimeBestEffort('23/10/2020 12:12:57') +AS parseDateTimeBestEffort; +``` + +çµæžœ: + +```response +┌─parseDateTimeBestEffort─┠+│ 2020-10-23 12:12:57 │ +└─────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT parseDateTimeBestEffort('Sat, 18 Aug 2018 07:22:16 GMT', 'Asia/Istanbul') +AS parseDateTimeBestEffort; +``` + +çµæžœ: + +```response +┌─parseDateTimeBestEffort─┠+│ 2018-08-18 10:22:16 │ +└─────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT parseDateTimeBestEffort('1284101485') +AS parseDateTimeBestEffort; +``` + +çµæžœ: + +```response +┌─parseDateTimeBestEffort─┠+│ 2015-07-07 12:04:41 │ +└─────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT parseDateTimeBestEffort('2018-10-23 10:12:12') +AS parseDateTimeBestEffort; +``` + +çµæžœ: + +```response +┌─parseDateTimeBestEffort─┠+│ 2018-10-23 10:12:12 │ +└─────────────────────────┘ +``` + +クエリ: + +``` sql +SELECT toYear(now()) as year, parseDateTimeBestEffort('10 20:19'); +``` + +çµæžœ: + +```response +┌─year─┬─parseDateTimeBestEffort('10 20:19')─┠+│ 2023 │ 2023-01-10 20:19:00 │ +└──────┴─────────────────────────────────────┘ +``` + +クエリ: + +``` sql +WITH + now() AS ts_now, + formatDateTime(ts_around, '%b %e %T') AS syslog_arg +SELECT + ts_now, + syslog_arg, + parseDateTimeBestEffort(syslog_arg) +FROM (SELECT arrayJoin([ts_now - 30, ts_now + 30]) AS ts_around); +``` + +çµæžœ: + +```response +┌──────────────ts_now─┬─syslog_arg──────┬─parseDateTimeBestEffort(syslog_arg)─┠+│ 2023-06-30 23:59:30 │ Jun 30 23:59:00 │ 2023-06-30 23:59:00 │ +│ 2023-06-30 23:59:30 │ Jul 1 00:00:00 │ 2022-07-01 00:00:00 │ +└─────────────────────┴─────────────────┴─────────────────────────────────────┘ +``` + +**関連事項** + +- [RFC 1123](https://datatracker.ietf.org/doc/html/rfc1123) +- [toDate](#todate) +- [toDateTime](#todatetime) +- [ISO 8601 announcement by @xkcd](https://xkcd.com/1179/) +- [RFC 3164](https://datatracker.ietf.org/doc/html/rfc3164#section-4.1.2) + +## parseDateTimeBestEffortUS + +ã“ã®é–¢æ•°ã¯ã€[parseDateTimeBestEffort](#parsedatetimebesteffort)ã¨åŒæ§˜ã« ISO 日付形å¼ã€ãŸã¨ãˆã°`YYYY-MM-DD hh:mm:ss`ã€ãŠã‚ˆã³å¹´æœˆæ—¥ãŒæ˜Žç¢ºã«æŠ½å‡ºå¯èƒ½ãªä»–ã®æ—¥ä»˜å½¢å¼ã«å¯¾ã—ã¦å‹•ä½œã—ã¾ã™ã€‚ã—ã‹ã—ã€å¹´æœˆæ—¥ãŒã‚ã„ã¾ã„ã§æŠ½å‡ºã§ããªã„å½¢å¼ï¼ˆä¾‹: `MM/DD/YYYY`, `MM-DD-YYYY`, `MM-DD-YY`)ã§ã¯ã€`DD/MM/YYYY`, `DD-MM-YYYY`, `DD-MM-YY` ã®ä»£ã‚ã‚Šã«US日付形å¼ã‚’優先ã—ã¾ã™ã€‚例外ã¨ã—ã¦ã€æœˆãŒ12より大ããã€31以下ã§ã‚ã‚‹å ´åˆã€ã“ã®é–¢æ•°ã¯[parseDateTimeBestEffort](#parsedatetimebesteffort)ã®å‹•ä½œã«ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ã¾ã™ã€‚例ãˆã°ã€`15/08/2020` 㯠`2020-08-15` ã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚ + +## parseDateTimeBestEffortOrNull +## parseDateTime32BestEffortOrNull + +[parseDateTimeBestEffort](#parsedatetimebesteffort)ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã€`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTimeBestEffortOrZero +## parseDateTime32BestEffortOrZero + +[parseDateTimeBestEffort](#parsedatetimebesteffort)ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã«ã‚¼ãƒ­æ—¥ä»˜ã¾ãŸã¯ã‚¼ãƒ­æ—¥æ™‚ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTimeBestEffortUSOrNull + +[parseDateTimeBestEffortUS](#parsedatetimebesteffortus) ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã€`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTimeBestEffortUSOrZero + +[parseDateTimeBestEffortUS](#parsedatetimebesteffortus) ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã€ã‚¼ãƒ­æ—¥ä»˜ (`1970-01-01`) ã¾ãŸã¯ã‚¼ãƒ­æ—¥ä»˜ã¨æ™‚é–“ (`1970-01-01 00:00:00`) ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTime64BestEffort + +[parseDateTimeBestEffort](#parsedatetimebesteffort) 関数ã¨åŒæ§˜ã§ã™ãŒã€ãƒŸãƒªç§’ãŠã‚ˆã³ãƒžã‚¤ã‚¯ãƒ­ç§’も解æžã—ã€[DateTime](../functions/type-conversion-functions.md/#data_type-datetime) データ型を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +parseDateTime64BestEffort(time_string [, precision [, time_zone]]) +``` + +**引数** + +- `time_string` — 変æ›ã™ã‚‹æ—¥ä»˜ã¾ãŸã¯æ—¥æ™‚ã‚’å«ã‚€æ–‡å­—列。[String](../data-types/string.md)。 +- `precision` — å¿…è¦ãªç²¾åº¦ã€‚`3` — ミリ秒用ã€`6` — マイクロ秒用。デフォルトã¯`3`。çœç•¥å¯èƒ½ã€‚[UInt8](../data-types/int-uint.md)。 +- `time_zone` — [タイムゾーン](/docs/ja/operations/server-configuration-parameters/settings.md#timezone)。関数㯠`time_string` をタイムゾーンã«å¾“ã£ã¦è§£æžã—ã¾ã™ã€‚çœç•¥å¯èƒ½ã€‚[String](../data-types/string.md)。 + +**戻り値** + +- `time_string` を変æ›ã—㟠[DateTime](../data-types/datetime.md) データ型。 + +**例** + +クエリ: + +```sql +SELECT parseDateTime64BestEffort('2021-01-01') AS a, toTypeName(a) AS t +UNION ALL +SELECT parseDateTime64BestEffort('2021-01-01 01:01:00.12346') AS a, toTypeName(a) AS t +UNION ALL +SELECT parseDateTime64BestEffort('2021-01-01 01:01:00.12346',6) AS a, toTypeName(a) AS t +UNION ALL +SELECT parseDateTime64BestEffort('2021-01-01 01:01:00.12346',3,'Asia/Istanbul') AS a, toTypeName(a) AS t +FORMAT PrettyCompactMonoBlock; +``` + +çµæžœ: + +``` +┌──────────────────────────a─┬─t──────────────────────────────┠+│ 2021-01-01 01:01:00.123000 │ DateTime64(3) │ +│ 2021-01-01 00:00:00.000000 │ DateTime64(3) │ +│ 2021-01-01 01:01:00.123460 │ DateTime64(6) │ +│ 2020-12-31 22:01:00.123000 │ DateTime64(3, 'Asia/Istanbul') │ +└────────────────────────────┴────────────────────────────────┘ +``` + +## parseDateTime64BestEffortUS + +[parseDateTime64BestEffort](#parsedatetime64besteffort)ã¨åŒæ§˜ã§ã™ãŒã€ã“ã®é–¢æ•°ã¯ã‚ã„ã¾ã„ãªå ´åˆã«USæ—¥æ™‚å½¢å¼ (`MM/DD/YYYY` ãªã©) を優先ã—ã¾ã™ã€‚ + +## parseDateTime64BestEffortOrNull + +[parseDateTime64BestEffort](#parsedatetime64besteffort)ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã€`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTime64BestEffortOrZero + +[parseDateTime64BestEffort](#parsedatetime64besteffort)ã¨åŒæ§˜ã§ã™ãŒã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã«ã‚¼ãƒ­æ—¥ä»˜ã¾ãŸã¯ã‚¼ãƒ­æ—¥æ™‚ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTime64BestEffortUSOrNull + +[parseDateTime64BestEffort](#parsedatetime64besteffort)ã¨åŒæ§˜ã§ã™ãŒã€ã‚ã„ã¾ã„ãªå ´åˆã«US日時形å¼ã‚’優先ã—ã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã€`NULL`ã‚’è¿”ã—ã¾ã™ã€‚ + +## parseDateTime64BestEffortUSOrZero + +[parseDateTime64BestEffort](#parsedatetime64besteffort)ã¨åŒæ§˜ã§ã™ãŒã€ã‚ã„ã¾ã„ãªå ´åˆã«US日時形å¼ã‚’優先ã—ã€å‡¦ç†ã§ããªã„日付フォーマットã«é­é‡ã—ãŸå ´åˆã«ã‚¼ãƒ­æ—¥ä»˜ã¾ãŸã¯ã‚¼ãƒ­æ—¥æ™‚ã‚’è¿”ã—ã¾ã™ã€‚ + +## toLowCardinality + +入力パラメータをåŒã˜ãƒ‡ãƒ¼ã‚¿åž‹ã®[LowCardinality](../data-types/lowcardinality.md)ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«å¤‰æ›ã—ã¾ã™ã€‚ + +`LowCardinality` データ型ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã™ã‚‹ã«ã¯ [CAST](#cast) 関数を使用ã—ã¾ã™ã€‚例: `CAST(x as String)`。 + +**構文** + +```sql +toLowCardinality(expr) +``` + +**引数** + +- `expr` — 一ã¤ã® [対応データ型](../data-types/index.md/#data_types) ã‚’çµæžœã¨ã™ã‚‹[å¼](../syntax.md/#syntax-expressions)。 + +**戻り値** + +- `expr` ã®çµæžœã€‚[LowCardinality](../data-types/lowcardinality.md) ã® `expr` ã®åž‹ã®çµæžœã€‚ + +**例** + +クエリ: + +```sql +SELECT toLowCardinality('1'); +``` + +çµæžœ: + +```response +┌─toLowCardinality('1')─┠+│ 1 │ +└───────────────────────┘ +``` + +## toUnixTimestamp64Milli + +`DateTime64` を固定ã®ãƒŸãƒªç§’精度㧠`Int64` 値ã«å¤‰æ›ã—ã¾ã™ã€‚入力値ã¯ãã®ç²¾åº¦ã«å¿œã˜ã¦é©åˆ‡ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +:::note +出力値㯠`DateTime64` ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§ã¯ãªãã€UTCã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã§ã™ã€‚ +::: + +**構文** + +```sql +toUnixTimestamp64Milli(value) +``` + +**引数** + +- `value` — ä»»æ„ã®ç²¾åº¦ã® DateTime64 値。[DateTime64](../data-types/datetime64.md)。 + +**戻り値** + +- `Int64` データ型ã«å¤‰æ›ã•ã‚ŒãŸ `value`。[Int64](../data-types/int-uint.md). + +**例** + +クエリ: + +```sql +WITH toDateTime64('2009-02-13 23:31:31.011', 3, 'UTC') AS dt64 +SELECT toUnixTimestamp64Milli(dt64); +``` + +çµæžœ: + +```response +┌─toUnixTimestamp64Milli(dt64)─┠+│ 1234567891011 │ +└──────────────────────────────┘ +``` + +## toUnixTimestamp64Micro + +`DateTime64` を固定ã®ãƒžã‚¤ã‚¯ãƒ­ç§’精度㧠`Int64` 値ã«å¤‰æ›ã—ã¾ã™ã€‚入力値ã¯ãã®ç²¾åº¦ã«å¿œã˜ã¦é©åˆ‡ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +:::note +出力値㯠`DateTime64` ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§ã¯ãªãã€UTCã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã§ã™ã€‚ +::: + +**構文** + +```sql +toUnixTimestamp64Micro(value) +``` + +**引数** + +- `value` — ä»»æ„ã®ç²¾åº¦ã® DateTime64 値。[DateTime64](../data-types/datetime64.md)。 + +**戻り値** + +- `Int64` データ型ã«å¤‰æ›ã•ã‚ŒãŸ `value`。[Int64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +WITH toDateTime64('1970-01-15 06:56:07.891011', 6, 'UTC') AS dt64 +SELECT toUnixTimestamp64Micro(dt64); +``` + +çµæžœ: + +```response +┌─toUnixTimestamp64Micro(dt64)─┠+│ 1234567891011 │ +└──────────────────────────────┘ +``` + +## toUnixTimestamp64Nano + +`DateTime64` を固定ã®ãƒŠãƒŽç§’精度㧠`Int64` 値ã«å¤‰æ›ã—ã¾ã™ã€‚入力値ã¯ãã®ç²¾åº¦ã«å¿œã˜ã¦é©åˆ‡ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +:::note +出力値㯠`DateTime64` ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§ã¯ãªãã€UTCã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã§ã™ã€‚ +::: + +**構文** + +```sql +toUnixTimestamp64Nano(value) +``` + +**引数** + +- `value` — ä»»æ„ã®ç²¾åº¦ã® DateTime64 値。[DateTime64](../data-types/datetime64.md)。 + +**戻り値** + +- `Int64` データ型ã«å¤‰æ›ã•ã‚ŒãŸ `value`。[Int64](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +WITH toDateTime64('1970-01-01 00:20:34.567891011', 9, 'UTC') AS dt64 +SELECT toUnixTimestamp64Nano(dt64); +``` + +çµæžœ: + +```response +┌─toUnixTimestamp64Nano(dt64)─┠+│ 1234567891011 │ +└─────────────────────────────┘ +``` + +## fromUnixTimestamp64Milli + +`Int64` を固定ã®ãƒŸãƒªç§’精度ã¨ä»»æ„ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’æŒã¤ `DateTime64` 値ã«å¤‰æ›ã—ã¾ã™ã€‚入力値ã¯ãã®ç²¾åº¦ã«å¿œã˜ã¦é©åˆ‡ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +:::note +入力値ã¯æŒ‡å®šã•ã‚ŒãŸï¼ˆã¾ãŸã¯æš—é»™ã®ï¼‰ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§ã¯ãªãã€UTCã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ +::: + +**構文** + +``` sql +fromUnixTimestamp64Milli(value[, timezone]) +``` + +**引数** + +- `value` — ä»»æ„ã®ç²¾åº¦ã®å€¤ã€‚[Int64](../data-types/int-uint.md)。 +- `timezone` — (オプション)çµæžœã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å。[String](../data-types/string.md)。 + +**戻り値** + +- `3` ã®ç²¾åº¦ã‚’æŒã¤ DateTime64 ã«å¤‰æ›ã•ã‚ŒãŸ `value`。[DateTime64](../data-types/datetime64.md)。 + +**例** + +クエリ: + +``` sql +WITH CAST(1234567891011, 'Int64') AS i64 +SELECT + fromUnixTimestamp64Milli(i64, 'UTC') AS x, + toTypeName(x); +``` + +çµæžœ: + +```response +┌───────────────────────x─┬─toTypeName(x)────────┠+│ 2009-02-13 23:31:31.011 │ DateTime64(3, 'UTC') │ +└─────────────────────────┴──────────────────────┘ +``` + +## fromUnixTimestamp64Micro + +`Int64` を固定ã®ãƒžã‚¤ã‚¯ãƒ­ç§’精度ã¨ä»»æ„ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’æŒã¤ `DateTime64` 値ã«å¤‰æ›ã—ã¾ã™ã€‚入力値ã¯ãã®ç²¾åº¦ã«å¿œã˜ã¦é©åˆ‡ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +:::note +入力値ã¯æŒ‡å®šã•ã‚ŒãŸï¼ˆã¾ãŸã¯æš—é»™ã®ï¼‰ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§ã¯ãªãã€UTCã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ +::: + +**構文** + +``` sql +fromUnixTimestamp64Micro(value[, timezone]) +``` + +**引数** + +- `value` — ä»»æ„ã®ç²¾åº¦ã®å€¤ã€‚[Int64](../data-types/int-uint.md)。 +- `timezone` — (オプション)çµæžœã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å。[String](../data-types/string.md)。 + +**戻り値** + +- `6` ã®ç²¾åº¦ã‚’æŒã¤ DateTime64 ã«å¤‰æ›ã•ã‚ŒãŸ `value`。[DateTime64](../data-types/datetime64.md)。 + +**例** + +クエリ: + +``` sql +WITH CAST(1234567891011, 'Int64') AS i64 +SELECT + fromUnixTimestamp64Micro(i64, 'UTC') AS x, + toTypeName(x); +``` + +çµæžœ: + +```response +┌──────────────────────────x─┬─toTypeName(x)────────┠+│ 1970-01-15 06:56:07.891011 │ DateTime64(6, 'UTC') │ +└────────────────────────────┴──────────────────────┘ +``` + +## fromUnixTimestamp64Nano + +`Int64` を固定ã®ãƒŠãƒŽç§’精度ã¨ä»»æ„ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’æŒã¤ `DateTime64` 値ã«å¤‰æ›ã—ã¾ã™ã€‚入力値ã¯ãã®ç²¾åº¦ã«å¿œã˜ã¦é©åˆ‡ã«ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +:::note +入力値ã¯æŒ‡å®šã•ã‚ŒãŸï¼ˆã¾ãŸã¯æš—é»™ã®ï¼‰ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã§ã¯ãªãã€UTCã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ +::: + +**構文** + +``` sql +fromUnixTimestamp64Nano(value[, timezone]) +``` + +**引数** + +- `value` — ä»»æ„ã®ç²¾åº¦ã®å€¤ã€‚[Int64](../data-types/int-uint.md)。 +- `timezone` — (オプション)çµæžœã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³å。[String](../data-types/string.md)。 + +**戻り値** + +- `9` ã®ç²¾åº¦ã‚’æŒã¤ DateTime64 ã«å¤‰æ›ã•ã‚ŒãŸ `value`。[DateTime64](../data-types/datetime64.md)。 + +**例** + +クエリ: + +``` sql +WITH CAST(1234567891011, 'Int64') AS i64 +SELECT + fromUnixTimestamp64Nano(i64, 'UTC') AS x, + toTypeName(x); +``` + +çµæžœ: + +```response +┌─────────────────────────────x─┬─toTypeName(x)────────┠+│ 1970-01-01 00:20:34.567891011 │ DateTime64(9, 'UTC') │ +└───────────────────────────────┴──────────────────────┘ +``` + +## formatRow + +ä»»æ„ã®å¼ã‚’指定ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’使ã£ã¦æ–‡å­—列ã«å¤‰æ›ã—ã¾ã™ã€‚ + +**構文** + +``` sql +formatRow(format, x, y, ...) +``` + +**引数** + +- `format` — テキストフォーマット。例: [CSV](/docs/ja/interfaces/formats.md/#csv), [TSV](/docs/ja/interfaces/formats.md/#tabseparated)。 +- `x`,`y`, ... — å¼ã€‚ + +**戻り値** + +- フォーマットã•ã‚ŒãŸæ–‡å­—列。(テキストフォーマットã®å ´åˆã€é€šå¸¸ã¯æ”¹è¡Œæ–‡å­—ã§çµ‚ã‚ã‚Šã¾ã™ï¼‰ã€‚ + +**例** + +クエリ: + +``` sql +SELECT formatRow('CSV', number, 'good') +FROM numbers(3); +``` + +çµæžœ: + +```response +┌─formatRow('CSV', number, 'good')─┠+│ 0,"good" + │ +│ 1,"good" + │ +│ 2,"good" + │ +└──────────────────────────────────┘ +``` + +**注æ„**: フォーマットã«æŽ¥å°¾è¾ž/接頭辞ãŒå«ã¾ã‚Œã‚‹å ´åˆã€ãã‚Œã¯å„è¡Œã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT formatRow('CustomSeparated', number, 'good') +FROM numbers(3) +SETTINGS format_custom_result_before_delimiter='\n', format_custom_result_after_delimiter='' +``` + +çµæžœ: + +```response +┌─formatRow('CustomSeparated', number, 'good')─┠+│ +0 good + │ +│ +1 good + │ +│ +2 good + │ +└──────────────────────────────────────────────┘ +``` + +注: ã“ã®é–¢æ•°ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã®ã¯ã€è¡Œãƒ™ãƒ¼ã‚¹ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®ã¿ã§ã™ã€‚ + +## formatRowNoNewline + +ä»»æ„ã®å¼ã‚’指定ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’使ã£ã¦æ–‡å­—列ã«å¤‰æ›ã—ã¾ã™ã€‚formatRow ã¨ã®é•ã„ã¯ã€ã“ã®é–¢æ•°ãŒæœ€å¾Œã® `\n` ã‚’å–り除ãã“ã¨ã§ã™ã€‚ + +**構文** + +``` sql +formatRowNoNewline(format, x, y, ...) +``` + +**引数** + +- `format` — テキストフォーマット。例: [CSV](/docs/ja/interfaces/formats.md/#csv), [TSV](/docs/ja/interfaces/formats.md/#tabseparated)。 +- `x`,`y`, ... — å¼ã€‚ + +**戻り値** + +- フォーマットã•ã‚ŒãŸæ–‡å­—列。 + +**例** + +クエリ: + +``` sql +SELECT formatRowNoNewline('CSV', number, 'good') +FROM numbers(3); +``` + +çµæžœ: + +```response +┌─formatRowNoNewline('CSV', number, 'good')─┠+│ 0,"good" │ +│ 1,"good" │ +│ 2,"good" │ +└───────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/udf.md b/docs/ja/sql-reference/functions/udf.md new file mode 100644 index 00000000000..f3ec0bdb9df --- /dev/null +++ b/docs/ja/sql-reference/functions/udf.md @@ -0,0 +1,247 @@ +--- +slug: /ja/sql-reference/functions/udf +sidebar_position: 15 +sidebar_label: UDF +--- + +# UDF ユーザー定義関数 + +## 実行å¯èƒ½ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•° +ClickHouseã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã™ã‚‹ãŸã‚ã«ä»»æ„ã®å¤–部実行å¯èƒ½ãƒ—ログラムやスクリプトを呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +実行å¯èƒ½ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°ã®è¨­å®šã¯ã€1ã¤ä»¥ä¸Šã®xmlファイルã«è¨˜è¿°ã§ãã¾ã™ã€‚設定ã¸ã®ãƒ‘スã¯ã€[user_defined_executable_functions_config](../../operations/server-configuration-parameters/settings.md#user_defined_executable_functions_config) パラメータã§æŒ‡å®šã—ã¾ã™ã€‚ + +関数設定ã«ã¯ä»¥ä¸‹ã®è¨­å®šãŒå«ã¾ã‚Œã¾ã™: + +- `name` - 関数å。 +- `command` - 実行ã™ã‚‹ã‚¹ã‚¯ãƒªãƒ—トåã¾ãŸã¯`execute_direct`ãŒfalseã®å ´åˆã¯ã‚³ãƒžãƒ³ãƒ‰ã€‚ +- `argument` - 引数ã®èª¬æ˜Žã«ã¯ã€`type`ã¨ã‚ªãƒ—ションã®å¼•æ•°`name`ãŒå«ã¾ã‚Œã¾ã™ã€‚引数ã¯ãã‚Œãžã‚Œå€‹åˆ¥ã«è¨˜è¿°ã—ã¾ã™ã€‚[Native](../../interfaces/formats.md#native) ã¾ãŸã¯ [JSONEachRow](../../interfaces/formats.md#jsoneachrow) ã®ã‚ˆã†ãªãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°å½¢å¼ã®ã‚·ãƒªã‚¢ãƒ«åŒ–ã®ä¸€éƒ¨ã§ã‚ã‚‹å ´åˆã€åå‰ã®æŒ‡å®šãŒå¿…è¦ã§ã™ã€‚デフォルトã®å¼•æ•°åã®å€¤ã¯ `c` + 引数番å·ã§ã™ã€‚ +- `format` - コマンドã«æ¸¡ã™å¼•æ•°ã®[å½¢å¼](../../interfaces/formats.md)ã§ã™ã€‚ +- `return_type` - è¿”ã•ã‚Œã‚‹å€¤ã®åž‹ã€‚ +- `return_name` - è¿”ã•ã‚Œã‚‹å€¤ã®åå‰ã€‚[Native](../../interfaces/formats.md#native)ã‚„[JSONEachRow](../../interfaces/formats.md#jsoneachrow)ã¨ã„ã£ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°å½¢å¼ã®ã‚·ãƒªã‚¢ãƒ«åŒ–ã®ä¸€éƒ¨ã§ã‚ã‚‹å ´åˆã€è¿”ã•ã‚Œã‚‹åå‰ã®æŒ‡å®šãŒå¿…è¦ã§ã™ã€‚オプション。デフォルト値㯠`result` ã§ã™ã€‚ +- `type` - 実行å¯èƒ½ãªã‚¿ã‚¤ãƒ—。`type`㌠`executable` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å˜ä¸€ã®ã‚³ãƒžãƒ³ãƒ‰ãŒé–‹å§‹ã•ã‚Œã¾ã™ã€‚`executable_pool` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚³ãƒžãƒ³ãƒ‰ã®ãƒ—ールãŒä½œæˆã•ã‚Œã¾ã™ã€‚ +- `max_command_execution_time` - データブロックを処ç†ã™ã‚‹ãŸã‚ã®æœ€å¤§å®Ÿè¡Œæ™‚間(秒)。ã“ã®è¨­å®šã¯ `executable_pool` コマンドã«å¯¾ã—ã¦ã®ã¿æœ‰åŠ¹ã§ã™ã€‚オプション。デフォルト値㯠`10` ã§ã™ã€‚ +- `command_termination_timeout` - パイプãŒé–‰ã˜ãŸå¾Œã€ã‚³ãƒžãƒ³ãƒ‰ãŒçµ‚了ã™ã‚‹ã¾ã§ã®æ™‚間(秒)。ãã®å¾Œã€ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ãƒ—ロセス㫠`SIGTERM` ãŒé€ä¿¡ã•ã‚Œã¾ã™ã€‚オプション。デフォルト値㯠`10` ã§ã™ã€‚ +- `command_read_timeout` - コマンドã®æ¨™æº–出力ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆãƒŸãƒªç§’)。デフォルト値㯠10000。オプション。 +- `command_write_timeout` - コマンドã®æ¨™æº–入力ã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むタイムアウト(ミリ秒)。デフォルト値㯠10000。オプション。 +- `pool_size` - コマンドプールã®ã‚µã‚¤ã‚ºã€‚オプション。デフォルト値㯠`16`。 +- `send_chunk_header` - 処ç†ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒãƒ£ãƒ³ã‚¯ã‚’é€ä¿¡ã™ã‚‹å‰ã«è¡Œæ•°ã‚’é€ä¿¡ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚オプション。デフォルト値㯠`false`。 +- `execute_direct` - `execute_direct` = `1` ã®å ´åˆã€`command` 㯠[user_scripts_path](../../operations/server-configuration-parameters/settings.md#user_scripts_path) ã§æŒ‡å®šã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¹ã‚¯ãƒªãƒ—トフォルダー内ã§æ¤œç´¢ã•ã‚Œã¾ã™ã€‚追加ã®ã‚¹ã‚¯ãƒªãƒ—ト引数ã¯ç©ºç™½åŒºåˆ‡ã‚Šã§æŒ‡å®šã§ãã¾ã™ã€‚例: `script_name arg1 arg2`。`execute_direct` = `0` ã®å ´åˆã€`command` 㯠`bin/sh -c` ã®å¼•æ•°ã¨ã—ã¦æ¸¡ã•ã‚Œã¾ã™ã€‚デフォルト値㯠`1`。オプション。 +- `lifetime` - 関数ã®ãƒªãƒ­ãƒ¼ãƒ‰é–“隔(秒)。`0` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€é–¢æ•°ã¯ãƒªãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã›ã‚“。デフォルト値㯠`0`。オプション。 + +コマンド㯠`STDIN` ã‹ã‚‰å¼•æ•°ã‚’読ã¿å–ã‚Šã€`STDOUT` ã«çµæžœã‚’出力ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚コマンドã¯å¼•æ•°ã‚’å復処ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã¤ã¾ã‚Šã€å¼•æ•°ã®ãƒãƒ£ãƒ³ã‚¯ã‚’処ç†ã—ãŸå¾Œã€æ¬¡ã®ãƒãƒ£ãƒ³ã‚¯ã‚’å¾…ãŸãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +**例** + +XML設定を使用ã—㦠`test_function` を作æˆã—ã¾ã™ã€‚ +ファイル `test_function.xml`(デフォルトパス設定ã®å ´åˆ `/etc/clickhouse-server/test_function.xml`)。 +```xml + + + executable + test_function_python + String + + UInt64 + value + + TabSeparated + test_function.py + + +``` + +`user_scripts` フォルダー内ã®ã‚¹ã‚¯ãƒªãƒ—トファイル `test_function.py`(デフォルトパス設定ã®å ´åˆ `/var/lib/clickhouse/user_scripts/test_function.py`)。 + +```python +#!/usr/bin/python3 + +import sys + +if __name__ == '__main__': + for line in sys.stdin: + print("Value " + line, end='') + sys.stdout.flush() +``` + +クエリ: + +``` sql +SELECT test_function_python(toUInt64(2)); +``` + +çµæžœ: + +``` text +┌─test_function_python(2)─┠+│ Value 2 │ +└─────────────────────────┘ +``` + +手動㧠`execute_direct` ã‚’ `0` ã«æŒ‡å®šã—㦠`test_function_sum` を作æˆã—ã¾ã™ã€‚ +ファイル `test_function.xml`(デフォルトパス設定ã®å ´åˆ `/etc/clickhouse-server/test_function.xml`)。 +```xml + + + executable + test_function_sum + UInt64 + + UInt64 + lhs + + + UInt64 + rhs + + TabSeparated + cd /; clickhouse-local --input-format TabSeparated --output-format TabSeparated --structure 'x UInt64, y UInt64' --query "SELECT x + y FROM table" + 0 + + +``` + +クエリ: + +``` sql +SELECT test_function_sum(2, 2); +``` + +çµæžœ: + +``` text +┌─test_function_sum(2, 2)─┠+│ 4 │ +└─────────────────────────┘ +``` + +XML設定を使用ã—ã€åå‰ä»˜ã引数ã¨å½¢å¼ [JSONEachRow](../../interfaces/formats.md#jsoneachrow) 㧠`test_function_sum_json` を作æˆã—ã¾ã™ã€‚ +ファイル `test_function.xml`(デフォルトパス設定ã®å ´åˆ `/etc/clickhouse-server/test_function.xml`)。 +```xml + + + executable + test_function_sum_json + UInt64 + result_name + + UInt64 + argument_1 + + + UInt64 + argument_2 + + JSONEachRow + test_function_sum_json.py + + +``` + +`user_scripts` フォルダー内ã®ã‚¹ã‚¯ãƒªãƒ—トファイル `test_function_sum_json.py`(デフォルトパス設定ã®å ´åˆ `/var/lib/clickhouse/user_scripts/test_function_sum_json.py`)。 + +```python +#!/usr/bin/python3 + +import sys +import json + +if __name__ == '__main__': + for line in sys.stdin: + value = json.loads(line) + first_arg = int(value['argument_1']) + second_arg = int(value['argument_2']) + result = {'result_name': first_arg + second_arg} + print(json.dumps(result), end='\n') + sys.stdout.flush() +``` + +クエリ: + +``` sql +SELECT test_function_sum_json(2, 2); +``` + +çµæžœ: + +``` text +┌─test_function_sum_json(2, 2)─┠+│ 4 │ +└──────────────────────────────┘ +``` + +実行å¯èƒ½ãªãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°ã¯ã€ã‚³ãƒžãƒ³ãƒ‰è¨­å®šã§æ§‹æˆã•ã‚ŒãŸå®šæ•°ãƒ‘ラメータをå—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆ`executable` タイプã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°ã®ã¿ã§ä½¿ç”¨å¯èƒ½ï¼‰ã€‚ã¾ãŸã€`execute_direct` オプションãŒå¿…è¦ã§ã™ï¼ˆã‚·ã‚§ãƒ«å¼•æ•°å±•é–‹ã®è„†å¼±æ€§ã‚’防ããŸã‚)。 +ファイル `test_function_parameter_python.xml`(デフォルトパス設定ã®å ´åˆ `/etc/clickhouse-server/test_function_parameter_python.xml`)。 +```xml + + + executable + true + test_function_parameter_python + String + + UInt64 + + TabSeparated + test_function_parameter_python.py {test_parameter:UInt64} + + +``` + +`user_scripts` フォルダー内ã®ã‚¹ã‚¯ãƒªãƒ—トファイル `test_function_parameter_python.py`(デフォルトパス設定ã®å ´åˆ `/var/lib/clickhouse/user_scripts/test_function_parameter_python.py`)。 + +```python +#!/usr/bin/python3 + +import sys + +if __name__ == "__main__": + for line in sys.stdin: + print("Parameter " + str(sys.argv[1]) + " value " + str(line), end="") + sys.stdout.flush() +``` + +クエリ: + +``` sql +SELECT test_function_parameter_python(1)(2); +``` + +çµæžœ: + +``` text +┌─test_function_parameter_python(1)(2)─┠+│ Parameter 1 value 2 │ +└──────────────────────────────────────┘ +``` + +## ã‚¨ãƒ©ãƒ¼å‡¦ç† + +ã„ãã¤ã‹ã®é–¢æ•°ã¯ãƒ‡ãƒ¼ã‚¿ãŒç„¡åŠ¹ãªå ´åˆã€ä¾‹å¤–を投ã’ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚Œã€ã‚¨ãƒ©ãƒ¼ãƒ†ã‚­ã‚¹ãƒˆãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«è¿”ã•ã‚Œã¾ã™ã€‚分散処ç†ã®å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã®1ã¤ã§ä¾‹å¤–ãŒç™ºç”Ÿã™ã‚‹ã¨ã€ä»–ã®ã‚µãƒ¼ãƒãƒ¼ã‚‚クエリを中止ã—よã†ã¨ã—ã¾ã™ã€‚ + +## 引数å¼ã®è©•ä¾¡ + +ã»ã¨ã‚“ã©ã®ãƒ—ログラミング言語ã§ã¯ã€ç‰¹å®šã®æ¼”ç®—å­ã«å¯¾ã—ã¦å¼•æ•°ã®1ã¤ãŒè©•ä¾¡ã•ã‚Œãªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã€æ¼”ç®—å­ `&&`ã€`||`ã€ãŠã‚ˆã³ `?:` ã§ã™ã€‚ã—ã‹ã—ã€ClickHouseã§ã¯é–¢æ•°ï¼ˆæ¼”ç®—å­ï¼‰ã®å¼•æ•°ã¯å¸¸ã«è©•ä¾¡ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€å„行を個別ã«è¨ˆç®—ã™ã‚‹ä»£ã‚ã‚Šã«ã€ã‚«ãƒ©ãƒ ã®å…¨ä½“を一度ã«è©•ä¾¡ã™ã‚‹ãŸã‚ã§ã™ã€‚ + +## 分散クエリ処ç†ç”¨ã®é–¢æ•°ã®å®Ÿè¡Œ + +分散クエリ処ç†ã®å ´åˆã€å¯èƒ½ãªé™ã‚Šå¤šãã®ã‚¯ã‚¨ãƒªå‡¦ç†æ®µéšŽãŒãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã€æ®‹ã‚Šã®æ®µéšŽï¼ˆä¸­é–“çµæžœã®ãƒžãƒ¼ã‚¸ãŠã‚ˆã³ãれ以é™ã™ã¹ã¦ï¼‰ã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +ã“ã‚Œã¯ã€é–¢æ•°ãŒç•°ãªã‚‹ã‚µãƒ¼ãƒãƒ¼ã§å®Ÿè¡Œã•ã‚Œã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +例ã¨ã—ã¦ã€ã‚¯ã‚¨ãƒª `SELECT f(sum(g(x))) FROM distributed_table GROUP BY h(y),` + +- `distributed_table` ã«å°‘ãªãã¨ã‚‚2ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ãŒã‚ã‚‹å ´åˆã€é–¢æ•°ã€Œgã€ã¨ã€Œhã€ã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã€ã€Œfã€ã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +- `distributed_table` ã«1ã¤ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã—ã‹ãªã„å ´åˆã€ã™ã¹ã¦ã®ã€Œfã€ã€ã€Œgã€ã€ãŠã‚ˆã³ã€Œhã€é–¢æ•°ã¯ã“ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã®ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +関数ã®çµæžœã¯é€šå¸¸ã€å®Ÿè¡Œã•ã‚Œã‚‹ã‚µãƒ¼ãƒãƒ¼ã«ä¾å­˜ã—ã¾ã›ã‚“。ã—ã‹ã—ã€æ™‚ã«ã¯ã“ã‚Œã¯é‡è¦ã§ã™ã€‚ +ãŸã¨ãˆã°Dictionaryã‚’æ“作ã™ã‚‹é–¢æ•°ã¯ã€ãã‚ŒãŒå®Ÿè¡Œã•ã‚Œã¦ã„るサーãƒãƒ¼ä¸Šã«å­˜åœ¨ã™ã‚‹Dictionaryを使用ã—ã¾ã™ã€‚別ã®ä¾‹ã¯ã€`hostName` 関数ã§ã€ã“れ㯠`SELECT` クエリã§ã‚µãƒ¼ãƒãƒ¼ã”ã¨ã« `GROUP BY` ã‚’è¡Œã†ãŸã‚ã«å®Ÿè¡Œã•ã‚Œã¦ã„るサーãƒãƒ¼ã®åå‰ã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ内ã®é–¢æ•°ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹ãŒã€ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€`any` 集約関数ã§ãƒ©ãƒƒãƒ—ã—ãŸã‚Šã€`GROUP BY` ã®ã‚­ãƒ¼ã«è¿½åŠ ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## SQL ユーザー定義関数 + +ラムダå¼ã‹ã‚‰ã‚«ã‚¹ã‚¿ãƒ é–¢æ•°ã‚’作æˆã™ã‚‹ã«ã¯ã€[CREATE FUNCTION](../statements/create/function.md) ステートメントを使用ã—ã¾ã™ã€‚ã“れらã®é–¢æ•°ã‚’削除ã™ã‚‹ã«ã¯ã€[DROP FUNCTION](../statements/drop.md#drop-function) ステートメントを使用ã—ã¾ã™ã€‚ + +## 関連コンテンツ + +### [ClickHouse Cloudã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°ã«é–¢ã™ã‚‹è¨˜äº‹](https://clickhouse.com/blog/user-defined-functions-clickhouse-udfs) diff --git a/docs/ja/sql-reference/functions/ulid-functions.md b/docs/ja/sql-reference/functions/ulid-functions.md new file mode 100644 index 00000000000..7014e9fd4f7 --- /dev/null +++ b/docs/ja/sql-reference/functions/ulid-functions.md @@ -0,0 +1,84 @@ +--- +slug: /ja/sql-reference/functions/ulid-functions +sidebar_position: 190 +sidebar_label: ULID +--- + +# ULIDを扱ã†ãŸã‚ã®é–¢æ•° + +## generateULID + +[ULID](https://github.com/ulid/spec)を生æˆã—ã¾ã™ã€‚ + +**構文** + +``` sql +generateULID([x]) +``` + +**引数** + +- `x` — [サãƒãƒ¼ãƒˆã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿åž‹](../data-types/index.md#data_types)ã®ã„ãšã‚Œã‹ã‚’çµæžœã¨ã™ã‚‹[å¼](../../sql-reference/syntax.md#syntax-expressions)。çµæžœã®å€¤ã¯ç ´æ£„ã•ã‚Œã¾ã™ãŒã€é–¢æ•°ãŒ1ã¤ã®ã‚¯ã‚¨ãƒªå†…ã§è¤‡æ•°å›žå‘¼ã³å‡ºã•ã‚ŒãŸã¨ãã«[共通部分å¼é™¤åŽ» (CSE)](../../sql-reference/functions/index.md#common-subexpression-elimination)ã‚’ãƒã‚¤ãƒ‘スã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚オプションã®å¼•æ•°ã§ã™ã€‚ + +**戻り値** + +[FixedString](../data-types/fixedstring.md)åž‹ã®å€¤ã€‚ + +**使用例** + +``` sql +SELECT generateULID() +``` + +``` text +┌─generateULID()─────────────┠+│ 01GNB2S2FGN2P93QPXDNB4EN2R │ +└────────────────────────────┘ +``` + +**1è¡Œã«è¤‡æ•°ã®å€¤ã‚’生æˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã®ä½¿ç”¨ä¾‹** + +```sql +SELECT generateULID(1), generateULID(2) +``` + +``` text +┌─generateULID(1)────────────┬─generateULID(2)────────────┠+│ 01GNB2SGG4RHKVNT9ZGA4FFMNP │ 01GNB2SGG4V0HMQVH4VBVPSSRB │ +└────────────────────────────┴────────────────────────────┘ +``` + +## ULIDStringToDateTime + +ã“ã®é–¢æ•°ã¯ULIDã‹ã‚‰ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—を抽出ã—ã¾ã™ã€‚ + +**構文** + +``` sql +ULIDStringToDateTime(ulid[, timezone]) +``` + +**引数** + +- `ulid` — 入力ULID。[String](../data-types/string.md)ã¾ãŸã¯[FixedString(26)](../data-types/fixedstring.md)。 +- `timezone` — è¿”ã•ã‚Œã‚‹å€¤ã®ãŸã‚ã®[タイムゾーンå](../../operations/server-configuration-parameters/settings.md#timezone)(オプション)。[String](../data-types/string.md)。 + +**戻り値** + +- ミリ秒精度ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—。[DateTime64(3)](../data-types/datetime64.md)。 + +**使用例** + +``` sql +SELECT ULIDStringToDateTime('01GNB2S2FGN2P93QPXDNB4EN2R') +``` + +``` text +┌─ULIDStringToDateTime('01GNB2S2FGN2P93QPXDNB4EN2R')─┠+│ 2022-12-28 00:40:37.616 │ +└────────────────────────────────────────────────────┘ +``` + +## 関連項目 + +- [UUID](../../sql-reference/functions/uuid-functions.md) diff --git a/docs/ja/sql-reference/functions/uniqtheta-functions.md b/docs/ja/sql-reference/functions/uniqtheta-functions.md new file mode 100644 index 00000000000..8147c0d55d9 --- /dev/null +++ b/docs/ja/sql-reference/functions/uniqtheta-functions.md @@ -0,0 +1,96 @@ +--- +slug: /ja/sql-reference/functions/uniqtheta-functions +sidebar_position: 210 +sidebar_label: uniqTheta +--- + +# uniqTheta 関数 + +uniqTheta 関数ã¯ã€2ã¤ã® uniqThetaSketch オブジェクトã«å¯¾ã—ã¦é›†åˆæ“作計算(∪ / ∩ / × ã®ã‚ˆã†ãªæ“作)を実行ã—ã€ãã®çµæžœã‚’å«ã‚€æ–°ã—ã„ uniqThetaSketch オブジェクトを返ã—ã¾ã™ã€‚ + +uniqThetaSketch オブジェクトã¯ã€-State ã‚’ä¼´ã†é›†ç´„関数 uniqTheta ã«ã‚ˆã£ã¦æ§‹ç¯‰ã•ã‚Œã¾ã™ã€‚ + +UniqThetaSketch ã¯è¿‘似値セットã®ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã§ã™ã€‚ +RoaringBitmap ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[Theta Sketch Framework](https://datasketches.apache.org/docs/Theta/ThetaSketchFramework.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## uniqThetaUnion + +2ã¤ã® uniqThetaSketch オブジェクトã«å¯¾ã—㦠union 計算(集åˆæ“作 ∪)を実行ã—ã€ãã®çµæžœã¯æ–°ã—ã„ uniqThetaSketch ã§ã™ã€‚ + +``` sql +uniqThetaUnion(uniqThetaSketch,uniqThetaSketch) +``` + +**引数** + +- `uniqThetaSketch` – uniqThetaSketch オブジェクト。 + +**例** + +``` sql +select finalizeAggregation(uniqThetaUnion(a, b)) as a_union_b, finalizeAggregation(a) as a_cardinality, finalizeAggregation(b) as b_cardinality +from +(select arrayReduce('uniqThetaState',[1,2]) as a, arrayReduce('uniqThetaState',[2,3,4]) as b ); +``` + +``` text +┌─a_union_b─┬─a_cardinality─┬─b_cardinality─┠+│ 4 │ 2 │ 3 │ +└───────────┴───────────────┴───────────────┘ +``` + +## uniqThetaIntersect + +2ã¤ã® uniqThetaSketch オブジェクトã«å¯¾ã—㦠intersect 計算(集åˆæ“作 ∩)を実行ã—ã€ãã®çµæžœã¯æ–°ã—ã„ uniqThetaSketch ã§ã™ã€‚ + +``` sql +uniqThetaIntersect(uniqThetaSketch,uniqThetaSketch) +``` + +**引数** + +- `uniqThetaSketch` – uniqThetaSketch オブジェクト。 + +**例** + +``` sql +select finalizeAggregation(uniqThetaIntersect(a, b)) as a_intersect_b, finalizeAggregation(a) as a_cardinality, finalizeAggregation(b) as b_cardinality +from +(select arrayReduce('uniqThetaState',[1,2]) as a, arrayReduce('uniqThetaState',[2,3,4]) as b ); +``` + +``` text +┌─a_intersect_b─┬─a_cardinality─┬─b_cardinality─┠+│ 1 │ 2 │ 3 │ +└───────────────┴───────────────┴───────────────┘ +``` + +## uniqThetaNot + +2ã¤ã® uniqThetaSketch オブジェクトã«å¯¾ã—㦠a_not_b 計算(集åˆæ“作 ×)を実行ã—ã€ãã®çµæžœã¯æ–°ã—ã„ uniqThetaSketch ã§ã™ã€‚ + +``` sql +uniqThetaNot(uniqThetaSketch,uniqThetaSketch) +``` + +**引数** + +- `uniqThetaSketch` – uniqThetaSketch オブジェクト。 + +**例** + +``` sql +select finalizeAggregation(uniqThetaNot(a, b)) as a_not_b, finalizeAggregation(a) as a_cardinality, finalizeAggregation(b) as b_cardinality +from +(select arrayReduce('uniqThetaState',[2,3,4]) as a, arrayReduce('uniqThetaState',[1,2]) as b ); +``` + +``` text +┌─a_not_b─┬─a_cardinality─┬─b_cardinality─┠+│ 2 │ 3 │ 2 │ +└─────────┴───────────────┴───────────────┘ +``` + +**å‚ç…§** + +- [uniqThetaSketch](../../sql-reference/aggregate-functions/reference/uniqthetasketch.md#agg_function-uniqthetasketch) diff --git a/docs/ja/sql-reference/functions/url-functions.md b/docs/ja/sql-reference/functions/url-functions.md new file mode 100644 index 00000000000..07222ed2d78 --- /dev/null +++ b/docs/ja/sql-reference/functions/url-functions.md @@ -0,0 +1,1056 @@ +--- +slug: /ja/sql-reference/functions/url-functions +sidebar_position: 200 +sidebar_label: URLs +--- + +# URLを扱ã†é–¢æ•° + +:::note +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§è¨€åŠã—ã¦ã„る関数ã¯ã€æœ€å¤§ã®ãƒ‘フォーマンスã®ãŸã‚ã«æœ€é©åŒ–ã•ã‚Œã¦ãŠã‚Šã€ã»ã¨ã‚“ã©ã®å ´åˆã€RFC-3986標準ã«å¾“ã„ã¾ã›ã‚“。RFC-3986を実装ã—ã¦ã„る関数ã«ã¯ã€é–¢æ•°åã®æœ«å°¾ã«`RFC`ãŒä»˜ã„ã¦ãŠã‚Šã€ä¸€èˆ¬çš„ã«å‹•ä½œã¯é…ããªã‚Šã¾ã™ã€‚ +::: + +一般ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼æ–‡å­—列や`@`記å·ã‚’å«ã¾ãªã„公的ã«ç™»éŒ²ã•ã‚ŒãŸãƒ‰ãƒ¡ã‚¤ãƒ³ã‚’扱ã†å ´åˆã€`RFC`ã§ãªã„関数ã®å¤‰ç¨®ã‚’使用ã§ãã¾ã™ã€‚以下ã®è¡¨ã¯ã€å„`RFC`ãŠã‚ˆã³éž`RFC`変種ã«ã‚ˆã£ã¦URL内ã®ã©ã®ã‚·ãƒ³ãƒœãƒ«ã‚’解æžã§ãる(`✔`)ã‹ã€ã¾ãŸã¯ã§ããªã„(`✗`)ã‹ã‚’示ã—ã¦ã„ã¾ã™ï¼š + +|è¨˜å· | éž`RFC` | `RFC` | +|-------|----------|-------| +| ' ' | ✗ |✗ | +| \t | ✗ |✗ | +| < | ✗ |✗ | +| > | ✗ |✗ | +| % | ✗ |✔* | +| { | ✗ |✗ | +| } | ✗ |✗ | +| \| | ✗ |✗ | +| \\\ | ✗ |✗ | +| ^ | ✗ |✗ | +| ~ | ✗ |✔* | +| [ | ✗ |✗ | +| ] | ✗ |✔ | +| ; | ✗ |✔* | +| = | ✗ |✔* | +| & | ✗ |✔* | + +`*`ãŒä»˜ã„ã¦ã„るシンボルã¯ã€RFC 3986ã«ãŠã‘るサブデリミタã§ã‚ã‚Šã€`@`記å·ã«ç¶šãユーザー情報ã«è¨±å¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## URLã®ä¸€éƒ¨ã‚’抽出ã™ã‚‹é–¢æ•° + +URLã«é–¢é€£ã™ã‚‹éƒ¨åˆ†ãŒå­˜åœ¨ã—ãªã„å ´åˆã€ç©ºã®æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +### protocol + +URLã‹ã‚‰ãƒ—ロトコルを抽出ã—ã¾ã™ã€‚ + +一般的ã«è¿”ã•ã‚Œã‚‹å€¤ã®ä¾‹ï¼š http, https, ftp, mailto, tel, magnet。 + +### domain + +URLã‹ã‚‰ãƒ›ã‚¹ãƒˆåを抽出ã—ã¾ã™ã€‚ + +**構文** + +``` sql +domain(url) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 + +プロトコルをã¤ã‘ã¦ã‚‚ã¤ã‘ãªãã¦ã‚‚指定ã§ãã¾ã™ã€‚例: + +``` text +svn+ssh://some.svn-hosting.com:80/repo/trunk +some.svn-hosting.com:80/repo/trunk +https://clickhouse.com/time/ +``` + +ã“れらã®ä¾‹ã«å¯¾ã—ã¦ã€`domain`関数ã¯ä»¥ä¸‹ã®çµæžœã‚’è¿”ã—ã¾ã™ï¼š + +``` text +some.svn-hosting.com +some.svn-hosting.com +clickhouse.com +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力文字列ãŒURLã¨ã—ã¦è§£æžã§ãã‚‹å ´åˆã¯ãƒ›ã‚¹ãƒˆåã€ãã†ã§ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列。 [String](../data-types/string.md)。 + +**例** + +``` sql +SELECT domain('svn+ssh://some.svn-hosting.com:80/repo/trunk'); +``` + +``` text +┌─domain('svn+ssh://some.svn-hosting.com:80/repo/trunk')─┠+│ some.svn-hosting.com │ +└────────────────────────────────────────────────────────┘ +``` + +### domainRFC + +URLã‹ã‚‰ãƒ›ã‚¹ãƒˆåを抽出ã—ã¾ã™ã€‚[domain](#domain)ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€RFC 3986ã«æº–æ‹ ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +domainRFC(url) +``` + +**引数** + +- `url` — URL。 [String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力文字列ãŒURLã¨ã—ã¦è§£æžã§ãã‚‹å ´åˆã¯ãƒ›ã‚¹ãƒˆåã€ãã†ã§ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列。 [String](../data-types/string.md)。 + +**例** + +``` sql +SELECT + domain('http://user:password@example.com:8080/path?query=value#fragment'), + domainRFC('http://user:password@example.com:8080/path?query=value#fragment'); +``` + +``` text +┌─domain('http://user:password@example.com:8080/path?query=value#fragment')─┬─domainRFC('http://user:password@example.com:8080/path?query=value#fragment')─┠+│ │ example.com │ +└───────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────┘ +``` + +### domainWithoutWWW + +先頭ã®`www.`を除ã„ãŸãƒ‰ãƒ¡ã‚¤ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +domainWithoutWWW(url) +``` + +**引数** + +- `url` — URL。 [String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力文字列ãŒURLã¨ã—ã¦è§£æžã§ãã‚‹å ´åˆã¯ãƒ‰ãƒ¡ã‚¤ãƒ³å(先頭ã®`www.`を除ã)ã€ãã†ã§ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列。 [String](../data-types/string.md)。 + +**例** + +``` sql +SELECT domainWithoutWWW('http://paul@www.example.com:80/'); +``` + +``` text +┌─domainWithoutWWW('http://paul@www.example.com:80/')─┠+│ example.com │ +└─────────────────────────────────────────────────────┘ +``` + +### domainWithoutWWWRFC + +先頭ã®`www.`を除ã„ãŸãƒ‰ãƒ¡ã‚¤ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚[domainWithoutWWW](#domainwithoutwww)ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€RFC 3986ã«æº–æ‹ ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +domainWithoutWWWRFC(url) +``` + +**引数** + +- `url` — URL。 [String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力文字列ãŒURLã¨ã—ã¦è§£æžã§ãã‚‹å ´åˆã¯ãƒ‰ãƒ¡ã‚¤ãƒ³å(先頭ã®`www.`を除ã)ã€ãã†ã§ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列。 [String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT + domainWithoutWWW('http://user:password@www.example.com:8080/path?query=value#fragment'), + domainWithoutWWWRFC('http://user:password@www.example.com:8080/path?query=value#fragment'); +``` + +çµæžœ: + +```response +┌─domainWithoutWWW('http://user:password@www.example.com:8080/path?query=value#fragment')─┬─domainWithoutWWWRFC('http://user:password@www.example.com:8080/path?query=value#fragment')─┠+│ │ example.com │ +└─────────────────────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +### topLevelDomain + +URLã‹ã‚‰ãƒˆãƒƒãƒ—レベルドメインを抽出ã—ã¾ã™ã€‚ + +``` sql +topLevelDomain(url) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 + +:::note +プロトコルをã¤ã‘ã¦ã‚‚ã¤ã‘ãªãã¦ã‚‚指定ã§ãã¾ã™ã€‚例: + +``` text +svn+ssh://some.svn-hosting.com:80/repo/trunk +some.svn-hosting.com:80/repo/trunk +https://clickhouse.com/time/ +``` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力文字列ãŒURLã¨ã—ã¦è§£æžã§ãã‚‹å ´åˆã¯ãƒ‰ãƒ¡ã‚¤ãƒ³å。ãã†ã§ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列。 [String](../../sql-reference/data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT topLevelDomain('svn+ssh://www.some.svn-hosting.com:80/repo/trunk'); +``` + +çµæžœ: + +``` text +┌─topLevelDomain('svn+ssh://www.some.svn-hosting.com:80/repo/trunk')─┠+│ com │ +└────────────────────────────────────────────────────────────────────┘ +``` + +### topLevelDomainRFC + +URLã‹ã‚‰ãƒˆãƒƒãƒ—レベルドメインを抽出ã—ã¾ã™ã€‚[topLevelDomain](#topleveldomain)ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€RFC 3986ã«æº–æ‹ ã—ã¦ã„ã¾ã™ã€‚ + +``` sql +topLevelDomainRFC(url) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 + +:::note +プロトコルをã¤ã‘ã¦ã‚‚ã¤ã‘ãªãã¦ã‚‚指定ã§ãã¾ã™ã€‚例: + +``` text +svn+ssh://some.svn-hosting.com:80/repo/trunk +some.svn-hosting.com:80/repo/trunk +https://clickhouse.com/time/ +``` +::: + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 入力文字列ãŒURLã¨ã—ã¦è§£æžã§ãã‚‹å ´åˆã¯ãƒ‰ãƒ¡ã‚¤ãƒ³å。ãã†ã§ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列。 [String](../../sql-reference/data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT topLevelDomain('http://foo:foo%41bar@foo.com'), topLevelDomainRFC('http://foo:foo%41bar@foo.com'); +``` + +çµæžœ: + +``` text +┌─topLevelDomain('http://foo:foo%41bar@foo.com')─┬─topLevelDomainRFC('http://foo:foo%41bar@foo.com')─┠+│ │ com │ +└────────────────────────────────────────────────┴───────────────────────────────────────────────────┘ +``` + +### firstSignificantSubdomain + +「最åˆã®é‡è¦ãªã‚µãƒ–ドメインã€ã‚’è¿”ã—ã¾ã™ã€‚ +「最åˆã®é‡è¦ãªã‚µãƒ–ドメインã€ã¯ã€`com`ã€`net`ã€`org`ã€ã¾ãŸã¯`co`ã®å ´åˆã¯ç¬¬äºŒãƒ¬ãƒ™ãƒ«ãƒ‰ãƒ¡ã‚¤ãƒ³ã€ãã®ä»–ã®å ´åˆã¯ç¬¬ä¸‰ãƒ¬ãƒ™ãƒ«ãƒ‰ãƒ¡ã‚¤ãƒ³ã§ã™ã€‚ +例ãˆã°ã€`firstSignificantSubdomain ('https://news.clickhouse.com/') = 'clickhouse'ã€firstSignificantSubdomain ('https://news.clickhouse.com.tr/') = 'clickhouse'`。 +「é‡è¦ã§ãªã„ã€ç¬¬äºŒãƒ¬ãƒ™ãƒ«ãƒ‰ãƒ¡ã‚¤ãƒ³ã‚„ãã®ä»–ã®å®Ÿè£…ã®è©³ç´°ã¯å°†æ¥å¤‰æ›´ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +firstSignificantSubdomain(url) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最åˆã®é‡è¦ãªã‚µãƒ–ドメイン。 [String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT firstSignificantSubdomain('http://www.example.com/a/b/c?a=b') +``` + +çµæžœ: + +```reference +┌─firstSignificantSubdomain('http://www.example.com/a/b/c?a=b')─┠+│ example │ +└───────────────────────────────────────────────────────────────┘ +``` + +### firstSignificantSubdomainRFC + +「最åˆã®é‡è¦ãªã‚µãƒ–ドメインã€ã‚’è¿”ã—ã¾ã™ã€‚ +「最åˆã®é‡è¦ãªã‚µãƒ–ドメインã€ã¯ã€`com`ã€`net`ã€`org`ã€ã¾ãŸã¯`co`ã®å ´åˆã¯ç¬¬äºŒãƒ¬ãƒ™ãƒ«ãƒ‰ãƒ¡ã‚¤ãƒ³ã€ãã®ä»–ã®å ´åˆã¯ç¬¬ä¸‰ãƒ¬ãƒ™ãƒ«ãƒ‰ãƒ¡ã‚¤ãƒ³ã§ã™ã€‚ +例ãˆã°ã€`firstSignificantSubdomain (‘https://news.clickhouse.com/’) = ‘clickhouse’, firstSignificantSubdomain (‘https://news.clickhouse.com.tr/’) = ‘clickhouse’`。 +「é‡è¦ã§ãªã„ã€ç¬¬äºŒãƒ¬ãƒ™ãƒ«ãƒ‰ãƒ¡ã‚¤ãƒ³ã‚„ãã®ä»–ã®å®Ÿè£…ã®è©³ç´°ã¯å°†æ¥å¤‰æ›´ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +[firstSignficantSubdomain](#firstsignificantsubdomain)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€RFC 1034ã«æº–æ‹ ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +firstSignificantSubdomainRFC(url) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最åˆã®é‡è¦ãªã‚µãƒ–ドメイン。 [String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT + firstSignificantSubdomain('http://user:password@example.com:8080/path?query=value#fragment'), + firstSignificantSubdomainRFC('http://user:password@example.com:8080/path?query=value#fragment'); +``` + +çµæžœ: + +```reference +┌─firstSignificantSubdomain('http://user:password@example.com:8080/path?query=value#fragment')─┬─firstSignificantSubdomainRFC('http://user:password@example.com:8080/path?query=value#fragment')─┠+│ │ example │ +└──────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +### cutToFirstSignificantSubdomain + +「最åˆã®é‡è¦ãªã‚µãƒ–ドメインã€ã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®éƒ¨åˆ†ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +cutToFirstSignificantSubdomain(url) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å¯èƒ½ã§ã‚ã‚Œã°æœ€åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ã®ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®ä¸€éƒ¨ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ [String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT + cutToFirstSignificantSubdomain('https://news.clickhouse.com.tr/'), + cutToFirstSignificantSubdomain('www.tr'), + cutToFirstSignificantSubdomain('tr'); +``` + +çµæžœ: + +```response +┌─cutToFirstSignificantSubdomain('https://news.clickhouse.com.tr/')─┬─cutToFirstSignificantSubdomain('www.tr')─┬─cutToFirstSignificantSubdomain('tr')─┠+│ clickhouse.com.tr │ tr │ │ +└───────────────────────────────────────────────────────────────────┴──────────────────────────────────────────┴──────────────────────────────────────┘ +``` + +### cutToFirstSignificantSubdomainRFC + +「最åˆã®é‡è¦ãªã‚µãƒ–ドメインã€ã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®éƒ¨åˆ†ã‚’è¿”ã—ã¾ã™ã€‚ +[cutToFirstSignificantSubdomain](#cuttofirstsignificantsubdomain)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€RFC 3986ã«æº–æ‹ ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +cutToFirstSignificantSubdomainRFC(url) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å¯èƒ½ã§ã‚ã‚Œã°æœ€åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ã®ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®ä¸€éƒ¨ã‚’è¿”ã—ã€ãれ以外ã®å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ [String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT + cutToFirstSignificantSubdomain('http://user:password@example.com:8080'), + cutToFirstSignificantSubdomainRFC('http://user:password@example.com:8080'); +``` + +çµæžœ: + +```response +┌─cutToFirstSignificantSubdomain('http://user:password@example.com:8080')─┬─cutToFirstSignificantSubdomainRFC('http://user:password@example.com:8080')─┠+│ │ example.com │ +└─────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────┘ +``` + +### cutToFirstSignificantSubdomainWithWWW + +「最åˆã®é‡è¦ãªã‚µãƒ–ドメインã€ã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®éƒ¨åˆ†ã‚’è¿”ã—ã€`www`ã¯å‰Šé™¤ã—ã¾ã›ã‚“。 + +**構文** + +```sql +cutToFirstSignificantSubdomainWithWWW(url) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å¯èƒ½ã§ã‚ã‚Œã°æœ€åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ã®ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®ä¸€éƒ¨ã‚’è¿”ã—(`www`ã‚’å«ã‚€ï¼‰ã€ãれ以外ã®å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ [String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT + cutToFirstSignificantSubdomainWithWWW('https://news.clickhouse.com.tr/'), + cutToFirstSignificantSubdomainWithWWW('www.tr'), + cutToFirstSignificantSubdomainWithWWW('tr'); +``` + +çµæžœ: + +```response +┌─cutToFirstSignificantSubdomainWithWWW('https://news.clickhouse.com.tr/')─┬─cutToFirstSignificantSubdomainWithWWW('www.tr')─┬─cutToFirstSignificantSubdomainWithWWW('tr')─┠+│ clickhouse.com.tr │ www.tr │ │ +└──────────────────────────────────────────────────────────────────────────┴─────────────────────────────────────────────────┴─────────────────────────────────────────────┘ +``` + +### cutToFirstSignificantSubdomainWithWWWRFC + +「最åˆã®é‡è¦ãªã‚µãƒ–ドメインã€ã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®éƒ¨åˆ†ã‚’è¿”ã—ã€`www`ã¯å‰Šé™¤ã—ã¾ã›ã‚“。 +[cutToFirstSignificantSubdomainWithWWW](#cuttofirstsignificantsubdomaincustomwithwww)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€RFC 3986ã«æº–æ‹ ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +cutToFirstSignificantSubdomainWithWWW(url) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- å¯èƒ½ã§ã‚ã‚Œã°æœ€åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ã®ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®ä¸€éƒ¨ã‚’è¿”ã—("www"ã‚’å«ã‚€ï¼‰ã€ãれ以外ã®å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ [String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT + cutToFirstSignificantSubdomainWithWWW('http:%2F%2Fwwwww.nova@mail.ru/economicheskiy'), + cutToFirstSignificantSubdomainWithWWWRFC('http:%2F%2Fwwwww.nova@mail.ru/economicheskiy'); +``` + +çµæžœ: + +```response +┌─cutToFirstSignificantSubdomainWithWWW('http:%2F%2Fwwwww.nova@mail.ru/economicheskiy')─┬─cutToFirstSignificantSubdomainWithWWWRFC('http:%2F%2Fwwwww.nova@mail.ru/economicheskiy')─┠+│ │ mail.ru │ +└───────────────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +### cutToFirstSignificantSubdomainCustom + +最åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®éƒ¨åˆ†ã‚’è¿”ã—ã¾ã™ã€‚ +カスタムã®[TLDリスト](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains)åã‚’å—ã‘入れã¾ã™ã€‚ +æ–°ã—ã„TLDリストãŒå¿…è¦ãªå ´åˆã‚„カスタムリストãŒã‚ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ + +**設定例** + +```xml + + + + public_suffix_list.dat + + +``` + +**構文** + +``` sql +cutToFirstSignificantSubdomain(url, tld) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 +- `tld` — カスタムTLDリストå。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®ä¸€éƒ¨ã€‚ [String](../../sql-reference/data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT cutToFirstSignificantSubdomainCustom('bar.foo.there-is-no-such-domain', 'public_suffix_list'); +``` + +çµæžœ: + +```text +┌─cutToFirstSignificantSubdomainCustom('bar.foo.there-is-no-such-domain', 'public_suffix_list')─┠+│ foo.there-is-no-such-domain │ +└───────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +**関連項目** + +- [firstSignificantSubdomain](#firstsignificantsubdomain)。 + +### cutToFirstSignificantSubdomainCustomRFC + +最åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®éƒ¨åˆ†ã‚’è¿”ã—ã¾ã™ã€‚ +カスタム[TLDリスト](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains)åã‚’å—ã‘入れã¾ã™ã€‚ +æ–°ã—ã„TLDリストãŒå¿…è¦ãªå ´åˆã‚„カスタムリストãŒã‚ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ +[cutToFirstSignificantSubdomainCustom](#cuttofirstsignificantsubdomaincustom)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€RFC 3986ã«æº–æ‹ ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +cutToFirstSignificantSubdomainRFC(url, tld) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 +- `tld` — カスタムTLDリストå。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®ä¸€éƒ¨ã€‚ [String](../../sql-reference/data-types/string.md)。 + +**関連項目** + +- [firstSignificantSubdomain](#firstsignificantsubdomain)。 + +### cutToFirstSignificantSubdomainCustomWithWWW + +最åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®éƒ¨åˆ†ã‚’è¿”ã—ã€`www`ã¯å‰Šé™¤ã—ã¾ã›ã‚“。 +カスタムã®TLDリストåã‚’å—ã‘入れã¾ã™ã€‚ +æ–°ã—ã„TLDリストãŒå¿…è¦ãªå ´åˆã‚„カスタムリストãŒã‚ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ + +**設定例** + +```xml + + + + public_suffix_list.dat + + +``` + +**構文** + +```sql +cutToFirstSignificantSubdomainCustomWithWWW(url, tld) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 +- `tld` — カスタムTLDリストå。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®ä¸€éƒ¨ï¼ˆ`www`ã‚’å«ã‚€ï¼‰ã€‚ [String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT cutToFirstSignificantSubdomainCustomWithWWW('www.foo', 'public_suffix_list'); +``` + +çµæžœ: + +```text +┌─cutToFirstSignificantSubdomainCustomWithWWW('www.foo', 'public_suffix_list')─┠+│ www.foo │ +└──────────────────────────────────────────────────────────────────────────────┘ +``` + +**関連項目** + +- [firstSignificantSubdomain](#firstsignificantsubdomain)。 + +### cutToFirstSignificantSubdomainCustomWithWWWRFC + +最åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®éƒ¨åˆ†ã‚’è¿”ã—ã€`www`ã¯å‰Šé™¤ã—ã¾ã›ã‚“。 +カスタムã®TLDリストåã‚’å—ã‘入れã¾ã™ã€‚ +æ–°ã—ã„TLDリストãŒå¿…è¦ãªå ´åˆã‚„カスタムリストãŒã‚ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ +[cutToFirstSignificantSubdomainCustomWithWWW](#cuttofirstsignificantsubdomaincustomwithwww)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€RFC 3986ã«æº–æ‹ ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +cutToFirstSignificantSubdomainCustomWithWWWRFC(url, tld) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 +- `tld` — カスタムTLDリストå。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最åˆã®é‡è¦ãªã‚µãƒ–ドメインã¾ã§ãƒˆãƒƒãƒ—レベルã®ã‚µãƒ–ドメインをå«ã‚€ãƒ‰ãƒ¡ã‚¤ãƒ³ã®ä¸€éƒ¨ï¼ˆ`www`ã‚’å«ã‚€ï¼‰ã€‚ [String](../../sql-reference/data-types/string.md)。 + +**関連項目** + +- [firstSignificantSubdomain](#firstsignificantsubdomain)。 + +### firstSignificantSubdomainCustom + +最åˆã®é‡è¦ãªã‚µãƒ–ドメインを返ã—ã¾ã™ã€‚ +カスタムTLDリストåã‚’å—ã‘入れã¾ã™ã€‚ +æ–°ã—ã„TLDリストãŒå¿…è¦ãªå ´åˆã‚„カスタムリストãŒã‚ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ + +設定例: + +```xml + + + + public_suffix_list.dat + + +``` + +**構文** + +```sql +firstSignificantSubdomainCustom(url, tld) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 +- `tld` — カスタムTLDリストå。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最åˆã®é‡è¦ãªã‚µãƒ–ドメイン。 [String](../../sql-reference/data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT firstSignificantSubdomainCustom('bar.foo.there-is-no-such-domain', 'public_suffix_list'); +``` + +çµæžœ: + +```text +┌─firstSignificantSubdomainCustom('bar.foo.there-is-no-such-domain', 'public_suffix_list')─┠+│ foo │ +└──────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +**関連項目** + +- [firstSignificantSubdomain](#firstsignificantsubdomain)。 + +### firstSignificantSubdomainCustomRFC + +最åˆã®é‡è¦ãªã‚µãƒ–ドメインを返ã—ã¾ã™ã€‚ +カスタムTLDリストåã‚’å—ã‘入れã¾ã™ã€‚ +æ–°ã—ã„TLDリストãŒå¿…è¦ãªå ´åˆã‚„カスタムリストãŒã‚ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ +[firstSignificantSubdomainCustom](#firstsignificantsubdomaincustom)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€RFC 3986ã«æº–æ‹ ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +firstSignificantSubdomainCustomRFC(url, tld) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 +- `tld` — カスタムTLDリストå。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 最åˆã®é‡è¦ãªã‚µãƒ–ドメイン。 [String](../../sql-reference/data-types/string.md)。 + +**関連項目** + +- [firstSignificantSubdomain](#firstsignificantsubdomain)。 + +### port + +ãƒãƒ¼ãƒˆã‚’è¿”ã™ã‹ã€URLã«ãƒãƒ¼ãƒˆãŒå«ã¾ã‚Œã¦ã„ãªã„ã‹è§£æžã§ããªã„å ´åˆã¯`default_port`ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +port(url [, default_port = 0]) +``` + +**引数** + +- `url` — URL。 [String](../data-types/string.md)。 +- `default_port` — è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒãƒ¼ãƒˆç•ªå·ã€‚ [UInt16](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- URLã«ãƒãƒ¼ãƒˆãŒãªã„å ´åˆã€ã¾ãŸã¯æ¤œè¨¼ã‚¨ãƒ©ãƒ¼ãŒã‚ã‚‹å ´åˆã«ã¯ãƒãƒ¼ãƒˆã¾ãŸã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒãƒ¼ãƒˆã€‚ [UInt16](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT port('http://paul@www.example.com:80/'); +``` + +çµæžœ: + +```response +┌─port('http://paul@www.example.com:80/')─┠+│ 80 │ +└─────────────────────────────────────────┘ +``` + +### portRFC + +ãƒãƒ¼ãƒˆã‚’è¿”ã™ã‹ã€URLã«ãƒãƒ¼ãƒˆãŒå«ã¾ã‚Œã¦ã„ãªã„ã‹è§£æžã§ããªã„å ´åˆã¯`default_port`ã‚’è¿”ã—ã¾ã™ã€‚ +[port](#port)ã«ä¼¼ã¦ã„ã¾ã™ãŒã€RFC 3986ã«æº–æ‹ ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +portRFC(url [, default_port = 0]) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 +- `default_port` — è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒãƒ¼ãƒˆç•ªå·ã€‚ [UInt16](../data-types/int-uint.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- URLã«ãƒãƒ¼ãƒˆãŒãªã„å ´åˆã€ã¾ãŸã¯æ¤œè¨¼ã‚¨ãƒ©ãƒ¼ãŒã‚ã‚‹å ´åˆã«ã¯ãƒãƒ¼ãƒˆã¾ãŸã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒãƒ¼ãƒˆã€‚ [UInt16](../data-types/int-uint.md)。 + +**例** + +クエリ: + +```sql +SELECT + port('http://user:password@example.com:8080'), + portRFC('http://user:password@example.com:8080'); +``` + +çµæžœ: + +```resposne +┌─port('http://user:password@example.com:8080')─┬─portRFC('http://user:password@example.com:8080')─┠+│ 0 │ 8080 │ +└───────────────────────────────────────────────┴──────────────────────────────────────────────────┘ +``` + +### path + +クエリ文字列をå«ã¾ãªã„パスを返ã—ã¾ã™ã€‚ + +例: `/top/news.html`。 + +### pathFull + +上記ã¨åŒã˜ã§ã™ãŒã€ã‚¯ã‚¨ãƒªæ–‡å­—列ã¨ãƒ•ãƒ©ã‚°ãƒ¡ãƒ³ãƒˆã‚’å«ã¿ã¾ã™ã€‚ + +例: `/top/news.html?page=2#comments`。 + +### protocol + +URLã‹ã‚‰ãƒ—ロトコルを抽出ã—ã¾ã™ã€‚ + +**構文** + +```sql +protocol(url) +``` + +**引数** + +- `url` — プロトコルを抽出ã™ã‚‹URL。 [String](../data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- プロトコルã€ã¾ãŸã¯ç‰¹å®šã§ããªã„å ´åˆã¯ç©ºã®æ–‡å­—列。 [String](../data-types/string.md)。 + +**例** + +クエリ: + +```sql +SELECT protocol('https://clickhouse.com/'); +``` + +çµæžœ: + +```response +┌─protocol('https://clickhouse.com/')─┠+│ https │ +└─────────────────────────────────────┘ +``` + +### queryString + +先頭ã®è³ªå•ç¬¦ã‚„`#`ãŠã‚ˆã³ãれ以é™ã‚’除ã„ãŸã‚¯ã‚¨ãƒªæ–‡å­—列を返ã—ã¾ã™ã€‚ + +例: `page=1&lr=213`。 + +### fragment + +先頭ã®ãƒãƒƒã‚·ãƒ¥è¨˜å·ã‚’除ã„ãŸãƒ•ãƒ©ã‚°ãƒ¡ãƒ³ãƒˆè­˜åˆ¥å­ã‚’è¿”ã—ã¾ã™ã€‚ + +### queryStringAndFragment + +クエリ文字列ã¨ãƒ•ãƒ©ã‚°ãƒ¡ãƒ³ãƒˆè­˜åˆ¥å­ã‚’è¿”ã—ã¾ã™ã€‚ + +例: `page=1#29390`。 + +### extractURLParameter(url, name) + +URLã«`name`ã¨ã„ã†åå‰ã®ãƒ‘ラメータãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ãã®å€¤ã‚’è¿”ã—ã€å­˜åœ¨ã—ãªã„å ´åˆã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ +åŒã˜åå‰ã®ãƒ‘ラメータãŒè¤‡æ•°ã‚ã‚‹å ´åˆã¯ã€æœ€åˆã®å‡ºç¾ã‚’è¿”ã—ã¾ã™ã€‚ +ã“ã®é–¢æ•°ã¯ã€`url`パラメータ内ã®ãƒ‘ラメータãŒ`name`引数ã¨åŒã˜æ–¹æ³•ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ + +### extractURLParameters(url) + +URLパラメータã«å¯¾å¿œã™ã‚‹`name=value`文字列ã®é…列を返ã—ã¾ã™ã€‚ +値ã¯ãƒ‡ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã›ã‚“。 + +### extractURLParameterNames(url) + +URLパラメータã®åå‰ã«å¯¾å¿œã™ã‚‹åå‰æ–‡å­—列ã®é…列を返ã—ã¾ã™ã€‚ +値ã¯ãƒ‡ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã›ã‚“。 + +### URLHierarchy(url) + +パスã¨ã‚¯ã‚¨ãƒªæ–‡å­—列ã®ä¸­ã§URLを後方ã‹ã‚‰`/`ã€`?`ã§åˆ‡ã‚Šè©°ã‚ãŸé…列を返ã—ã¾ã™ã€‚ +連続ã—ãŸåŒºåˆ‡ã‚Šæ–‡å­—ã¯ä¸€ã¤ã¨ã—ã¦ã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã™ã€‚ +切りå–ã‚Šã¯é€£ç¶šã™ã‚‹åŒºåˆ‡ã‚Šæ–‡å­—ã®å¾Œã®ä½ç½®ã§è¡Œã‚ã‚Œã¾ã™ã€‚ + +### URLPathHierarchy(url) + +上記ã¨åŒã˜ã§ã™ãŒã€çµæžœã«ã¯ãƒ—ロトコルã¨ãƒ›ã‚¹ãƒˆãŒå«ã¾ã‚Œã¾ã›ã‚“。 `/`è¦ç´ ï¼ˆãƒ«ãƒ¼ãƒˆï¼‰ã¯å«ã¾ã‚Œã¾ã›ã‚“。 + +``` text +URLPathHierarchy('https://example.com/browse/CONV-6788') = +[ + '/browse/', + '/browse/CONV-6788' +] +``` + +### encodeURLComponent(url) + +エンコードã•ã‚ŒãŸURLã‚’è¿”ã—ã¾ã™ã€‚ + +例: + +``` sql +SELECT encodeURLComponent('http://127.0.0.1:8123/?query=SELECT 1;') AS EncodedURL; +``` + +``` text +┌─EncodedURL───────────────────────────────────────────────┠+│ http%3A%2F%2F127.0.0.1%3A8123%2F%3Fquery%3DSELECT%201%3B │ +└──────────────────────────────────────────────────────────┘ +``` + +### decodeURLComponent(url) + +デコードã•ã‚ŒãŸURLã‚’è¿”ã—ã¾ã™ã€‚ + +例: + +``` sql +SELECT decodeURLComponent('http://127.0.0.1:8123/?query=SELECT%201%3B') AS DecodedURL; +``` + +``` text +┌─DecodedURL─────────────────────────────┠+│ http://127.0.0.1:8123/?query=SELECT 1; │ +└────────────────────────────────────────┘ +``` + +### encodeURLFormComponent(url) + +エンコードã•ã‚ŒãŸURLã‚’è¿”ã—ã¾ã™ã€‚rfc-1866ã«å¾“ã„ã€ç©ºç™½(` `)ãŒãƒ—ラス(`+`)ã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +例: + +``` sql +SELECT encodeURLFormComponent('http://127.0.0.1:8123/?query=SELECT 1 2+3') AS EncodedURL; +``` + +``` text +┌─EncodedURL────────────────────────────────────────────────┠+│ http%3A%2F%2F127.0.0.1%3A8123%2F%3Fquery%3DSELECT+1+2%2B3 │ +└───────────────────────────────────────────────────────────┘ +``` + +### decodeURLFormComponent(url) + +デコードã•ã‚ŒãŸURLã‚’è¿”ã—ã¾ã™ã€‚rfc-1866ã«å¾“ã„ã€é€šå¸¸ã®ãƒ—ラス(`+`)ãŒç©ºç™½(` `)ã¨ã—ã¦ãƒ‡ã‚³ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +例: + +``` sql +SELECT decodeURLFormComponent('http://127.0.0.1:8123/?query=SELECT%201+2%2B3') AS DecodedURL; +``` + +``` text +┌─DecodedURL────────────────────────────────┠+│ http://127.0.0.1:8123/?query=SELECT 1 2+3 │ +└───────────────────────────────────────────┘ +``` + +### netloc + +URLã‹ã‚‰ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ­ã‚±ãƒªãƒ†ã‚£ï¼ˆ`username:password@host:port`)を抽出ã—ã¾ã™ã€‚ + +**構文** + +``` sql +netloc(url) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `username:password@host:port`。 [String](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT netloc('http://paul@www.example.com:80/'); +``` + +çµæžœ: + +``` text +┌─netloc('http://paul@www.example.com:80/')─┠+│ paul@www.example.com:80 │ +└───────────────────────────────────────────┘ +``` + +## URLã®ä¸€éƒ¨ã‚’削除ã™ã‚‹é–¢æ•° + +URLã«é¡žä¼¼ã™ã‚‹ã‚‚ã®ãŒãªã„å ´åˆã€URLã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。 + +### cutWWW + +URLã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã‹ã‚‰`www.`を削除ã—ã¾ã™ï¼ˆå­˜åœ¨ã™ã‚‹å ´åˆï¼‰ã€‚ + +### cutQueryString + +クエリ文字列をå«ã‚€è³ªå•ç¬¦ã‚’削除ã—ã¾ã™ã€‚ + +### cutFragment + +フラグメント識別å­ã‚’å«ã‚€ç•ªå·è¨˜å·ã‚’削除ã—ã¾ã™ã€‚ + +### cutQueryStringAndFragment + +クエリ文字列ã¨ãƒ•ãƒ©ã‚°ãƒ¡ãƒ³ãƒˆè­˜åˆ¥å­ã‚’å«ã‚€è³ªå•ç¬¦ã¨ç•ªå·è¨˜å·ã‚’削除ã—ã¾ã™ã€‚ + +### cutURLParameter(url, name) + +URLã‹ã‚‰`name`ã¨ã„ã†ãƒ‘ラメータを削除ã—ã¾ã™ï¼ˆå­˜åœ¨ã™ã‚‹å ´åˆï¼‰ã€‚ +ã“ã®é–¢æ•°ã¯ã€ãƒ‘ラメータåã®æ–‡å­—をエンコードã¾ãŸã¯ãƒ‡ã‚³ãƒ¼ãƒ‰ã—ã¾ã›ã‚“。例ãˆã°ã€`Client ID`ã¨`Client%20ID`ã¯ç•°ãªã‚‹ãƒ‘ラメータåã¨ã—ã¦æ‰±ã‚ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +cutURLParameter(url, name) +``` + +**引数** + +- `url` — URL。 [String](../../sql-reference/data-types/string.md)。 +- `name` — URLパラメータã®åå‰ã€‚ [String](../../sql-reference/data-types/string.md)ã¾ãŸã¯Stringsã®[Array](../../sql-reference/data-types/array.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `name` URLパラメータを削除ã—ãŸURL。 [String](../data-types/string.md)。 + +**例** + +クエリ: + +``` sql +SELECT + cutURLParameter('http://bigmir.net/?a=b&c=d&e=f#g', 'a') as url_without_a, + cutURLParameter('http://bigmir.net/?a=b&c=d&e=f#g', ['c', 'e']) as url_without_c_and_e; +``` + +çµæžœ: + +``` text +┌─url_without_a────────────────┬─url_without_c_and_e──────┠+│ http://bigmir.net/?c=d&e=f#g │ http://bigmir.net/?a=b#g │ +└──────────────────────────────┴──────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/functions/uuid-functions.md b/docs/ja/sql-reference/functions/uuid-functions.md new file mode 100644 index 00000000000..f43151c2d77 --- /dev/null +++ b/docs/ja/sql-reference/functions/uuid-functions.md @@ -0,0 +1,926 @@ +--- +slug: /ja/sql-reference/functions/uuid-functions +sidebar_position: 205 +sidebar_label: UUIDs +--- + +# UUID を扱ã†é–¢æ•° + +## generateUUIDv4 + +[ãƒãƒ¼ã‚¸ãƒ§ãƒ³4](https://tools.ietf.org/html/rfc4122#section-4.4)ã®[UUID](../data-types/uuid.md)を生æˆã—ã¾ã™ã€‚ + +**構文** + +``` sql +generateUUIDv4([expr]) +``` + +**引数** + +- `expr` — クエリ内ã§é–¢æ•°ãŒè¤‡æ•°å›žå‘¼ã°ã‚Œã‚‹å ´åˆã«[共通部分å¼ã®é™¤åŽ»](../functions/index.md#common-subexpression-elimination)を回é¿ã™ã‚‹ãŸã‚ã®ä»»æ„ã®[å¼](../syntax.md#syntax-expressions)。å¼ã®å€¤ã¯è¿”ã•ã‚Œã‚‹UUIDã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。çœç•¥å¯èƒ½ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +UUIDv4 åž‹ã®å€¤ã€‚ + +**例** + +ã¾ãšã€UUIDåž‹ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãã®ãƒ†ãƒ¼ãƒ–ルã«ç”Ÿæˆã•ã‚ŒãŸUUIDv4を挿入ã—ã¾ã™ã€‚ + +``` sql +CREATE TABLE tab (uuid UUID) ENGINE = Memory; + +INSERT INTO tab SELECT generateUUIDv4(); + +SELECT * FROM tab; +``` + +çµæžœ: + +```response +┌─────────────────────────────────uuid─┠+│ f4bf890f-f9dc-4332-ad5c-0c18e73f28e9 │ +└──────────────────────────────────────┘ +``` + +**è¡Œã”ã¨ã«è¤‡æ•°ã®UUIDを生æˆã™ã‚‹ä¾‹** + +```sql +SELECT generateUUIDv4(1), generateUUIDv4(2); + +┌─generateUUIDv4(1)────────────────────┬─generateUUIDv4(2)────────────────────┠+│ 2d49dc6e-ddce-4cd0-afb8-790956df54c1 │ 8abf8c13-7dea-4fdf-af3e-0e18767770e6 │ +└──────────────────────────────────────┴──────────────────────────────────────┘ +``` + +## generateUUIDv7 {#generateUUIDv7} + +[ãƒãƒ¼ã‚¸ãƒ§ãƒ³7](https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-04)ã®[UUID](../data-types/uuid.md)を生æˆã—ã¾ã™ã€‚ + +生æˆã•ã‚ŒãŸUUIDã¯ã€ãƒŸãƒªç§’å˜ä½ã®ç¾åœ¨ã®Unixタイムスタンプ(48ビット)ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€Œ7ã€ï¼ˆ4ビット)ã€ãƒŸãƒªç§’内ã§UUIDを区別ã™ã‚‹ãŸã‚ã®ã‚«ã‚¦ãƒ³ã‚¿ï¼ˆ42ビット)ã€ãŠã‚ˆã³ãƒ©ãƒ³ãƒ€ãƒ ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ï¼ˆ32ビット)をå«ã¿ã¾ã™ã€‚ +特定ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—(unix_ts_ms)ã®å ´åˆã€ã‚«ã‚¦ãƒ³ã‚¿ã¯ãƒ©ãƒ³ãƒ€ãƒ ãªå€¤ã‹ã‚‰å§‹ã¾ã‚Šã€æ–°ã—ã„UUIDã”ã¨ã«1ãšã¤å¢—加ã—ã¾ã™ã€‚ +カウンタãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã—ãŸå ´åˆã€ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—フィールドã¯1増加ã—ã€ã‚«ã‚¦ãƒ³ã‚¿ã¯ãƒ©ãƒ³ãƒ€ãƒ ãªæ–°ã—ã„開始値ã«ãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +関数`generateUUIDv7`ã¯ã€ä¸¦è¡Œã—ã¦å®Ÿè¡Œã•ã‚Œã¦ã„るスレッドãŠã‚ˆã³ã‚¯ã‚¨ãƒªé–“ã§ã€ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—内ã®ã‚«ã‚¦ãƒ³ã‚¿ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒå˜èª¿ã«å¢—加ã™ã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ + +``` + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ +| unix_ts_ms | +├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ +| unix_ts_ms | ver | counter_high_bits | +├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ +|var| counter_low_bits | +├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ +| rand_b | +└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ +``` + +:::note +2024å¹´4月時点ã§ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³7ã®UUIDã¯ãƒ‰ãƒ©ãƒ•ãƒˆã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã§ã‚ã‚Šã€å°†æ¥ãã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆãŒå¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +**構文** + +``` sql +generateUUIDv7([expr]) +``` + +**引数** + +- `expr` — クエリ内ã§é–¢æ•°ãŒè¤‡æ•°å›žå‘¼ã°ã‚Œã‚‹å ´åˆã«[共通部分å¼ã®é™¤åŽ»](../functions/index.md#common-subexpression-elimination)を回é¿ã™ã‚‹ãŸã‚ã®ä»»æ„ã®[å¼](../syntax.md#syntax-expressions)。å¼ã®å€¤ã¯è¿”ã•ã‚Œã‚‹UUIDã«å½±éŸ¿ã‚’与ãˆã¾ã›ã‚“。çœç•¥å¯èƒ½ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +UUIDv7 åž‹ã®å€¤ã€‚ + +**例** + +ã¾ãšã€UUIDåž‹ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãã®ãƒ†ãƒ¼ãƒ–ルã«ç”Ÿæˆã•ã‚ŒãŸUUIDv7を挿入ã—ã¾ã™ã€‚ + +``` sql +CREATE TABLE tab (uuid UUID) ENGINE = Memory; + +INSERT INTO tab SELECT generateUUIDv7(); + +SELECT * FROM tab; +``` + +çµæžœ: + +```response +┌─────────────────────────────────uuid─┠+│ 018f05af-f4a8-778f-beee-1bedbc95c93b │ +└──────────────────────────────────────┘ +``` + +**è¡Œã”ã¨ã«è¤‡æ•°ã®UUIDを生æˆã™ã‚‹ä¾‹** + +```sql +SELECT generateUUIDv7(1), generateUUIDv7(2); + +┌─generateUUIDv7(1)────────────────────┬─generateUUIDv7(2)────────────────────┠+│ 018f05c9-4ab8-7b86-b64e-c9f03fbd45d1 │ 018f05c9-4ab8-7b86-b64e-c9f12efb7e16 │ +└──────────────────────────────────────┴──────────────────────────────────────┘ +``` + +## empty + +入力UUIDãŒç©ºã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚ + +**構文** + +```sql +empty(UUID) +``` + +UUIDã¯ã™ã¹ã¦ã®ãƒ“ットãŒã‚¼ãƒ­ï¼ˆã‚¼ãƒ­UUID)ã§ã‚ã‚‹ã¨ãã«ç©ºã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯[Arrays](array-functions.md#function-empty)ã‚„[Strings](string-functions.md#empty)ã«å¯¾ã—ã¦ã‚‚機能ã—ã¾ã™ã€‚ + +**引数** + +- `x` — UUID。 [UUID](../data-types/uuid.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 空ã®UUIDã®å ´åˆã¯`1`ã€ç©ºã§ãªã„UUIDã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ [UInt8](../data-types/int-uint.md)。 + +**例** + +UUID値を生æˆã™ã‚‹ãŸã‚ã«ã€ClickHouseã¯[generateUUIDv4](#generateuuidv4)関数をæä¾›ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT empty(generateUUIDv4()); +``` + +çµæžœ: + +```response +┌─empty(generateUUIDv4())─┠+│ 0 │ +└─────────────────────────┘ +``` + +## notEmpty + +入力UUIDãŒç©ºã§ãªã„ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚ + +**構文** + +```sql +notEmpty(UUID) +``` + +UUIDã¯ã™ã¹ã¦ã®ãƒ“ットãŒã‚¼ãƒ­ï¼ˆã‚¼ãƒ­UUID)ã§ã‚ã‚‹ã¨ãã«ç©ºã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯[Arrays](array-functions.md#function-notempty)ã‚„[Strings](string-functions.md#notempty)ã«å¯¾ã—ã¦ã‚‚機能ã—ã¾ã™ã€‚ + +**引数** + +- `x` — UUID。 [UUID](../data-types/uuid.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 空ã§ãªã„UUIDã®å ´åˆã¯`1`ã€ç©ºã®UUIDã®å ´åˆã¯`0`ã‚’è¿”ã—ã¾ã™ã€‚ [UInt8](../data-types/int-uint.md)。 + +**例** + +UUID値を生æˆã™ã‚‹ãŸã‚ã«ã€ClickHouseã¯[generateUUIDv4](#generateuuidv4)関数をæä¾›ã—ã¾ã™ã€‚ + +クエリ: + +```sql +SELECT notEmpty(generateUUIDv4()); +``` + +çµæžœ: + +```response +┌─notEmpty(generateUUIDv4())─┠+│ 1 │ +└────────────────────────────┘ +``` + +## toUUID + +文字列型ã®å€¤ã‚’UUIDã«å¤‰æ›ã—ã¾ã™ã€‚ + +``` sql +toUUID(string) +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +UUIDåž‹ã®å€¤ã€‚ + +**使用例** + +``` sql +SELECT toUUID('61f0c404-5cb3-11e7-907b-a6006ad3dba0') AS uuid +``` + +çµæžœ: + +```response +┌─────────────────────────────────uuid─┠+│ 61f0c404-5cb3-11e7-907b-a6006ad3dba0 │ +└──────────────────────────────────────┘ +``` + +## toUUIDOrDefault + +**引数** + +- `string` — 36文字ã®æ–‡å­—列ã¾ãŸã¯FixedString(36)。 [String](../syntax.md#string)。 +- `default` — 最åˆã®å¼•æ•°ãŒUUIDåž‹ã«å¤‰æ›ã§ããªã„å ´åˆã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®UUID。 [UUID](../data-types/uuid.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +UUID + +``` sql +toUUIDOrDefault(string, default) +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +UUIDåž‹ã®å€¤ã€‚ + +**使用例** + +最åˆã®ä¾‹ã¯ã€å¤‰æ›å¯èƒ½ãªå ´åˆã€æœ€åˆã®å¼•æ•°ã‚’UUIDåž‹ã«å¤‰æ›ã—ã¦è¿”ã—ã¾ã™ã€‚ + +``` sql +SELECT toUUIDOrDefault('61f0c404-5cb3-11e7-907b-a6006ad3dba0', cast('59f0c404-5cb3-11e7-907b-a6006ad3dba0' as UUID)); +``` + +çµæžœ: + +```response +┌─toUUIDOrDefault('61f0c404-5cb3-11e7-907b-a6006ad3dba0', CAST('59f0c404-5cb3-11e7-907b-a6006ad3dba0', 'UUID'))─┠+│ 61f0c404-5cb3-11e7-907b-a6006ad3dba0 │ +└───────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +2ã¤ç›®ã®ä¾‹ã§ã¯ã€æœ€åˆã®å¼•æ•°ãŒUUIDåž‹ã«å¤‰æ›ã§ããªã„å ´åˆã€2ã¤ç›®ã®å¼•æ•°ï¼ˆæä¾›ã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®UUID)を返ã—ã¾ã™ã€‚ + +```sql +SELECT toUUIDOrDefault('-----61f0c404-5cb3-11e7-907b-a6006ad3dba0', cast('59f0c404-5cb3-11e7-907b-a6006ad3dba0' as UUID)); +``` + +çµæžœ: + +```response +┌─toUUIDOrDefault('-----61f0c404-5cb3-11e7-907b-a6006ad3dba0', CAST('59f0c404-5cb3-11e7-907b-a6006ad3dba0', 'UUID'))─┠+│ 59f0c404-5cb3-11e7-907b-a6006ad3dba0 │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +## toUUIDOrNull + +文字列型ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã€UUIDã¸ã®å¤‰æ›ã‚’試ã¿ã¾ã™ã€‚失敗ã—ãŸå ´åˆã€NULLã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +toUUIDOrNull(string) +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +Nullable(UUID)åž‹ã®å€¤ã€‚ + +**使用例** + +``` sql +SELECT toUUIDOrNull('61f0c404-5cb3-11e7-907b-a6006ad3dba0T') AS uuid +``` + +çµæžœ: + +```response +┌─uuid─┠+│ á´ºáµá´¸á´¸ │ +└──────┘ +``` + +## toUUIDOrZero + +文字列型ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã€UUIDã¸ã®å¤‰æ›ã‚’試ã¿ã¾ã™ã€‚失敗ã—ãŸå ´åˆã€ã‚¼ãƒ­UUIDã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +toUUIDOrZero(string) +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +UUIDåž‹ã®å€¤ã€‚ + +**使用例** + +``` sql +SELECT toUUIDOrZero('61f0c404-5cb3-11e7-907b-a6006ad3dba0T') AS uuid +``` + +çµæžœ: + +```response +┌─────────────────────────────────uuid─┠+│ 00000000-0000-0000-0000-000000000000 │ +└──────────────────────────────────────┘ +``` + +## UUIDStringToNum + +36文字ã®å½¢å¼`xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`ã‚’å«ã‚€`string`ã‚’å—ã‘å–ã‚Šã€ãã®ãƒã‚¤ãƒŠãƒªè¡¨ç¾ã¨ã—ã¦[FixedString(16)](../data-types/fixedstring.md)ã‚’è¿”ã—ã¾ã™ã€‚å½¢å¼ã¯ã‚ªãƒ—ションã§`variant` (`ビッグエンディアン`ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ)ã§æŒ‡å®šå¯èƒ½ã§ã™ã€‚ + +**構文** + +``` sql +UUIDStringToNum(string[, variant = 1]) +``` + +**引数** + +- `string` — 36文字ã®[String](../syntax.md#syntax-string-literal)ã¾ãŸã¯[FixedString](../syntax.md#syntax-string-literal)。 +- `variant` — [RFC4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.1)ã«åŸºã¥ããƒãƒªã‚¢ãƒ³ãƒˆã‚’表ã™æ•´æ•°ã€‚1 = `ビッグエンディアン` (デフォルト), 2 = `マイクロソフト`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +FixedString(16) + +**使用例** + +``` sql +SELECT + '612f3c40-5d3b-217e-707b-6a546a3d7b29' AS uuid, + UUIDStringToNum(uuid) AS bytes +``` + +çµæžœ: + +```response +┌─uuid─────────────────────────────────┬─bytes────────────┠+│ 612f3c40-5d3b-217e-707b-6a546a3d7b29 │ a/<@];!~p{jTj={) │ +└──────────────────────────────────────┴──────────────────┘ +``` + +``` sql +SELECT + '612f3c40-5d3b-217e-707b-6a546a3d7b29' AS uuid, + UUIDStringToNum(uuid, 2) AS bytes +``` + +çµæžœ: + +```response +┌─uuid─────────────────────────────────┬─bytes────────────┠+│ 612f3c40-5d3b-217e-707b-6a546a3d7b29 │ @/opt/geo/regions_hierarchy.txt``` + +ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åŠ ãˆã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«åã« `_` 記å·ã¨ä»»æ„ã®ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ãŒä»˜ã‘られãŸã€æ‹¡å¼µå­ã®å‰ã«é…ç½®ã•ã‚ŒãŸè¿‘ãã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚‚検索ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€`/opt/geo/regions_hierarchy_ua.txt` ã¨ã„ã†ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ãã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚‚見ã¤ã‘られã¾ã™ã€‚ã“ã“㧠`ua` ã¯Dictionaryキーã¨å‘¼ã°ã‚Œã¾ã™ã€‚サフィックスã®ãªã„Dictionaryã«ã¤ã„ã¦ã¯ã€ã‚­ãƒ¼ã¯ç©ºæ–‡å­—列ã«ãªã‚Šã¾ã™ã€‚ + +ã™ã¹ã¦ã®Dictionaryã¯ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ä¸­ã«å†èª­ã¿è¾¼ã¿ã•ã‚Œã¾ã™ï¼ˆ[`builtin_dictionaries_reload_interval`](../../operations/server-configuration-parameters/settings#builtin-dictionaries-reload-interval) 設定パラメータã§å®šç¾©ã•ã‚ŒãŸç§’æ•°ã¾ãŸã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§1時間ã«ä¸€åº¦ï¼‰ã€‚ãŸã ã—ã€åˆ©ç”¨å¯èƒ½ãªDictionaryã®ãƒªã‚¹ãƒˆã¯ã‚µãƒ¼ãƒãƒ¼ãŒé–‹å§‹ã•ã‚ŒãŸæ™‚点ã§ä¸€åº¦å®šç¾©ã•ã‚Œã¾ã™ã€‚ + +地域を扱ã†ã™ã¹ã¦ã®é–¢æ•°ã«ã¯ã€æœ€å¾Œã«Dictionaryキーã¨ã—ã¦å‚ç…§ã•ã‚Œã‚‹ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹ã¨ã„ã†ã‚ªãƒ—ションã®å¼•æ•°ãŒã‚ã‚Šã¾ã™ã€‚ + +例: + +``` sql +regionToCountry(RegionID) – デフォルトDictionaryを使用: /opt/geo/regions_hierarchy.txt +regionToCountry(RegionID, '') – デフォルトDictionaryを使用: /opt/geo/regions_hierarchy.txt +regionToCountry(RegionID, 'ua') – 'ua' キーã®Dictionaryを使用: /opt/geo/regions_hierarchy_ua.txt +``` + +### regionToName + +地域IDã¨ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹ã‚’å—ã‘å–ã‚Šã€å¯¾å¿œã™ã‚‹è¨€èªžã§åœ°åŸŸã®å称を返ã—ã¾ã™ã€‚指定ã•ã‚ŒãŸIDã®åœ°åŸŸãŒå­˜åœ¨ã—ãªã„å ´åˆã€ç©ºã®æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +regionToName(id\[, lang\]) +``` +**パラメータ** + +- `id` — ジオベースã®åœ°åŸŸID。[UInt32](../data-types/int-uint). +- `geobase` — Dictionaryキー。[複数ã®ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹](#multiple-geobases)ã‚’å‚照。[String](../data-types/string). オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- `geobase` ã§æŒ‡å®šã•ã‚ŒãŸè¨€èªžã®åœ°åŸŸå。[String](../data-types/string). +- ãれ以外ã®å ´åˆã¯ç©ºã®æ–‡å­—列。 + +**例** + +クエリ: + +``` sql +SELECT regionToName(number::UInt32,'en') FROM numbers(0,5); +``` + +çµæžœ: + +``` text +┌─regionToName(CAST(number, 'UInt32'), 'en')─┠+│ │ +│ World │ +│ USA │ +│ Colorado │ +│ Boulder County │ +└────────────────────────────────────────────┘ +``` + +### regionToCity + +ジオベースã‹ã‚‰åœ°åŸŸIDã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ã“ã®åœ°åŸŸãŒéƒ½å¸‚ã¾ãŸã¯éƒ½å¸‚ã®ä¸€éƒ¨ã§ã‚ã‚‹å ´åˆã€é©åˆ‡ãªéƒ½å¸‚ã®åœ°åŸŸIDã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +regionToCity(id [, geobase]) +``` + +**パラメータ** + +- `id` — ジオベースã®åœ°åŸŸID。[UInt32](../data-types/int-uint). +- `geobase` — Dictionaryキー。[複数ã®ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹](#multiple-geobases)ã‚’å‚照。[String](../data-types/string). オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é©åˆ‡ãªéƒ½å¸‚ã®åœ°åŸŸIDãŒã‚ã‚Œã°ã€‚[UInt32](../data-types/int-uint). +- ãã†ã§ãªã‘ã‚Œã°0。 + +**例** + +クエリ: + +```sql +SELECT regionToName(number::UInt32, 'en'), regionToCity(number::UInt32) AS id, regionToName(id, 'en') FROM numbers(13); +``` + +çµæžœ: + +```response +┌─regionToName(CAST(number, 'UInt32'), 'en')─┬─id─┬─regionToName(regionToCity(CAST(number, 'UInt32')), 'en')─┠+│ │ 0 │ │ +│ World │ 0 │ │ +│ USA │ 0 │ │ +│ Colorado │ 0 │ │ +│ Boulder County │ 0 │ │ +│ Boulder │ 5 │ Boulder │ +│ China │ 0 │ │ +│ Sichuan │ 0 │ │ +│ Chengdu │ 8 │ Chengdu │ +│ America │ 0 │ │ +│ North America │ 0 │ │ +│ Eurasia │ 0 │ │ +│ Asia │ 0 │ │ +└────────────────────────────────────────────┴────┴──────────────────────────────────────────────────────────┘ +``` + +### regionToArea + +地域をエリア(ジオベース内ã®ã‚¿ã‚¤ãƒ—5)ã«å¤‰æ›ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€[‘regionToCity’](#regiontocity)ã¨åŒæ§˜ã§ã™ã€‚ + +**構文** + +```sql +regionToArea(id [, geobase]) +``` + +**パラメータ** + +- `id` — ジオベースã®åœ°åŸŸID。[UInt32](../data-types/int-uint). +- `geobase` — Dictionaryキー。[複数ã®ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹](#multiple-geobases)ã‚’å‚照。[String](../data-types/string). オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é©åˆ‡ãªã‚¨ãƒªã‚¢ã®åœ°åŸŸIDãŒã‚ã‚Œã°ã€‚[UInt32](../data-types/int-uint). +- ãã†ã§ãªã‘ã‚Œã°0。 + +**例** + +クエリ: + +``` sql +SELECT DISTINCT regionToName(regionToArea(toUInt32(number), 'ua')) +FROM system.numbers +LIMIT 15 +``` + +çµæžœ: + +``` text +┌─regionToName(regionToArea(toUInt32(number), \'ua\'))─┠+│ │ +│ Moscow and Moscow region │ +│ St. Petersburg and Leningrad region │ +│ Belgorod region │ +│ Ivanovsk region │ +│ Kaluga region │ +│ Kostroma region │ +│ Kursk region │ +│ Lipetsk region │ +│ Orlov region │ +│ Ryazan region │ +│ Smolensk region │ +│ Tambov region │ +│ Tver region │ +│ Tula region │ +└──────────────────────────────────────────────────────┘ +``` + +### regionToDistrict + +地域を連邦区(ジオベース内ã®ã‚¿ã‚¤ãƒ—4)ã«å¤‰æ›ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€â€˜regionToCity’ã¨åŒæ§˜ã§ã™ã€‚ + +**構文** + +```sql +regionToDistrict(id [, geobase]) +``` + +**パラメータ** + +- `id` — ジオベースã®åœ°åŸŸID。[UInt32](../data-types/int-uint). +- `geobase` — Dictionaryキー。[複数ã®ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹](#multiple-geobases)ã‚’å‚照。[String](../data-types/string). オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é©åˆ‡ãªéƒ½å¸‚ã®åœ°åŸŸIDãŒã‚ã‚Œã°ã€‚[UInt32](../data-types/int-uint). +- ãã†ã§ãªã‘ã‚Œã°0。 + +**例** + +クエリ: + +``` sql +SELECT DISTINCT regionToName(regionToDistrict(toUInt32(number), 'ua')) +FROM system.numbers +LIMIT 15 +``` + +çµæžœ: + +``` text +┌─regionToName(regionToDistrict(toUInt32(number), \'ua\'))─┠+│ │ +│ Central federal district │ +│ Northwest federal district │ +│ South federal district │ +│ North Caucases federal district │ +│ Privolga federal district │ +│ Ural federal district │ +│ Siberian federal district │ +│ Far East federal district │ +│ Scotland │ +│ Faroe Islands │ +│ Flemish region │ +│ Brussels capital region │ +│ Wallonia │ +│ Federation of Bosnia and Herzegovina │ +└──────────────────────────────────────────────────────────┘ +``` + +### regionToCountry + +地域を国(ジオベース内ã®ã‚¿ã‚¤ãƒ—3)ã«å¤‰æ›ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€â€˜regionToCity’ã¨åŒæ§˜ã§ã™ã€‚ + +**構文** + +```sql +regionToCountry(id [, geobase]) +``` + +**パラメータ** + +- `id` — ジオベースã®åœ°åŸŸID。[UInt32](../data-types/int-uint). +- `geobase` — Dictionaryキー。[複数ã®ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹](#multiple-geobases)ã‚’å‚照。[String](../data-types/string). オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é©åˆ‡ãªå›½ã®åœ°åŸŸIDãŒã‚ã‚Œã°ã€‚[UInt32](../data-types/int-uint). +- ãã†ã§ãªã‘ã‚Œã°0。 + +**例** + +クエリ: + +``` sql +SELECT regionToName(number::UInt32, 'en'), regionToCountry(number::UInt32) AS id, regionToName(id, 'en') FROM numbers(13); +``` + +çµæžœ: + +``` text +┌─regionToName(CAST(number, 'UInt32'), 'en')─┬─id─┬─regionToName(regionToCountry(CAST(number, 'UInt32')), 'en')─┠+│ │ 0 │ │ +│ World │ 0 │ │ +│ USA │ 2 │ USA │ +│ Colorado │ 2 │ USA │ +│ Boulder County │ 2 │ USA │ +│ Boulder │ 2 │ USA │ +│ China │ 6 │ China │ +│ Sichuan │ 6 │ China │ +│ Chengdu │ 6 │ China │ +│ America │ 0 │ │ +│ North America │ 0 │ │ +│ Eurasia │ 0 │ │ +│ Asia │ 0 │ │ +└────────────────────────────────────────────┴────┴─────────────────────────────────────────────────────────────┘ +``` + +### regionToContinent + +地域を大陸(ジオベース内ã®ã‚¿ã‚¤ãƒ—1)ã«å¤‰æ›ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€â€˜regionToCity’ã¨åŒæ§˜ã§ã™ã€‚ + +**構文** + +```sql +regionToContinent(id [, geobase]) +``` + +**パラメータ** + +- `id` — ジオベースã®åœ°åŸŸID。[UInt32](../data-types/int-uint). +- `geobase` — Dictionaryキー。[複数ã®ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹](#multiple-geobases)ã‚’å‚照。[String](../data-types/string). オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é©åˆ‡ãªå¤§é™¸ã®åœ°åŸŸIDãŒã‚ã‚Œã°ã€‚[UInt32](../data-types/int-uint). +- ãã†ã§ãªã‘ã‚Œã°0。 + +**例** + +クエリ: + +``` sql +SELECT regionToName(number::UInt32, 'en'), regionToContinent(number::UInt32) AS id, regionToName(id, 'en') FROM numbers(13); +``` + +çµæžœ: + +``` text +┌─regionToName(CAST(number, 'UInt32'), 'en')─┬─id─┬─regionToName(regionToContinent(CAST(number, 'UInt32')), 'en')─┠+│ │ 0 │ │ +│ World │ 0 │ │ +│ USA │ 10 │ North America │ +│ Colorado │ 10 │ North America │ +│ Boulder County │ 10 │ North America │ +│ Boulder │ 10 │ North America │ +│ China │ 12 │ Asia │ +│ Sichuan │ 12 │ Asia │ +│ Chengdu │ 12 │ Asia │ +│ America │ 9 │ America │ +│ North America │ 10 │ North America │ +│ Eurasia │ 11 │ Eurasia │ +│ Asia │ 12 │ Asia │ +└────────────────────────────────────────────┴────┴───────────────────────────────────────────────────────────────┘ +``` + +### regionToTopContinent + +地域ã®éšŽå±¤ã§æœ€ä¸Šä½ã®å¤§é™¸ã‚’見ã¤ã‘ã¾ã™ã€‚ + +**構文** + +``` sql +regionToTopContinent(id[, geobase]) +``` + +**パラメータ** + +- `id` — ジオベースã®åœ°åŸŸID。[UInt32](../data-types/int-uint). +- `geobase` — Dictionaryキー。[複数ã®ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹](#multiple-geobases)ã‚’å‚照。[String](../data-types/string). オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 領域ã®éšŽå±¤ã‚’ç™»ã£ãŸã¨ãã®æœ€ä¸Šä½ã®å¤§é™¸ã®è­˜åˆ¥å­ã€‚[UInt32](../data-types/int-uint). +- ãã†ã§ãªã‘ã‚Œã°0。 + +**例** + +クエリ: + +``` sql +SELECT regionToName(number::UInt32, 'en'), regionToTopContinent(number::UInt32) AS id, regionToName(id, 'en') FROM numbers(13); +``` + +çµæžœ: + +``` text +┌─regionToName(CAST(number, 'UInt32'), 'en')─┬─id─┬─regionToName(regionToTopContinent(CAST(number, 'UInt32')), 'en')─┠+│ │ 0 │ │ +│ World │ 0 │ │ +│ USA │ 9 │ America │ +│ Colorado │ 9 │ America │ +│ Boulder County │ 9 │ America │ +│ Boulder │ 9 │ America │ +│ China │ 11 │ Eurasia │ +│ Sichuan │ 11 │ Eurasia │ +│ Chengdu │ 11 │ Eurasia │ +│ America │ 9 │ America │ +│ North America │ 9 │ America │ +│ Eurasia │ 11 │ Eurasia │ +│ Asia │ 11 │ Eurasia │ +└────────────────────────────────────────────┴────┴──────────────────────────────────────────────────────────────────┘ +``` + +### regionToPopulation + +地域ã®äººå£ã‚’å–å¾—ã—ã¾ã™ã€‚人å£ã¯ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«è¨˜éŒ²ã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚[「Dictionaryã€](../dictionaries#embedded-dictionaries)セクションをå‚ç…§ã—ã¦ãã ã•ã„。地域ã®äººå£ãŒè¨˜éŒ²ã•ã‚Œã¦ã„ãªã„å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ジオベースã§ã¯ã€å­åœ°åŸŸã®äººå£ã¯è¨˜éŒ²ã•ã‚Œã¦ã„ã‚‹ãŒè¦ªåœ°åŸŸã«ã¯è¨˜éŒ²ã•ã‚Œã¦ã„ãªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +regionToPopulation(id[, geobase]) +``` + +**パラメータ** + +- `id` — ジオベースã®åœ°åŸŸID。[UInt32](../data-types/int-uint). +- `geobase` — Dictionaryキー。[複数ã®ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹](#multiple-geobases)ã‚’å‚照。[String](../data-types/string). オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 地域ã®äººå£ã€‚[UInt32](../data-types/int-uint). +- ãã†ã§ãªã‘ã‚Œã°0。 + +**例** + +クエリ: + +``` sql +SELECT regionToName(number::UInt32, 'en'), regionToPopulation(number::UInt32) AS id, regionToName(id, 'en') FROM numbers(13); +``` + +çµæžœ: + +``` text +┌─regionToName(CAST(number, 'UInt32'), 'en')─┬─population─┠+│ │ 0 │ +│ World │ 4294967295 │ +│ USA │ 330000000 │ +│ Colorado │ 5700000 │ +│ Boulder County │ 330000 │ +│ Boulder │ 100000 │ +│ China │ 1500000000 │ +│ Sichuan │ 83000000 │ +│ Chengdu │ 20000000 │ +│ America │ 1000000000 │ +│ North America │ 600000000 │ +│ Eurasia │ 4294967295 │ +│ Asia │ 4294967295 │ +└────────────────────────────────────────────┴────────────┘ +``` + +### regionIn + +`lhs` 地域㌠`rhs` 地域ã«å±žã™ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚属ã™ã‚‹å ´åˆã¯1ã€å±žã•ãªã„å ´åˆã¯0ã®UInt8値を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +regionIn(lhs, rhs\[, geobase\]) +``` + +**パラメータ** + +- `lhs` — ジオベースã®lhs地域ID。[UInt32](../data-types/int-uint). +- `rhs` — ジオベースã®rhs地域ID。[UInt32](../data-types/int-uint). +- `geobase` — Dictionaryキー。[複数ã®ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹](#multiple-geobases)ã‚’å‚照。[String](../data-types/string). オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 属ã™ã‚‹å ´åˆã¯1。[UInt8](../data-types/int-uint). +- 属ã•ãªã„å ´åˆã¯0。 + +**実装ã®è©³ç´°** + +ã“ã®é–¢ä¿‚ã¯åå°„çš„ã§ã™ã€‚ã™ãªã‚ã¡ã€ã©ã®åœ°åŸŸã‚‚自分自身ã«å±žã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT regionToName(n1.number::UInt32, 'en') || (regionIn(n1.number::UInt32, n2.number::UInt32) ? ' is in ' : ' is not in ') || regionToName(n2.number::UInt32, 'en') FROM numbers(1,2) AS n1 CROSS JOIN numbers(1,5) AS n2; +``` + +çµæžœ: + +``` text +World is in World +World is not in USA +World is not in Colorado +World is not in Boulder County +World is not in Boulder +USA is in World +USA is in USA +USA is not in Colorado +USA is not in Boulder County +USA is not in Boulder +``` + +### regionHierarchy + +ジオベースã®åœ°åŸŸIDã§ã‚ã‚‹UInt32数値をå—ã‘å–ã‚Šã¾ã™ã€‚渡ã•ã‚ŒãŸåœ°åŸŸã¨ãã®æ²¿ç·šã®ã™ã¹ã¦ã®è¦ªåœ°åŸŸã‹ã‚‰ãªã‚‹åœ°åŸŸIDã®é…列を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +regionHierarchy(id\[, geobase\]) +``` + +**パラメータ** + +- `id` — ジオベースã®åœ°åŸŸID。[UInt32](../data-types/int-uint). +- `geobase` — Dictionaryキー。[複数ã®ã‚¸ã‚ªãƒ™ãƒ¼ã‚¹](#multiple-geobases)ã‚’å‚照。[String](../data-types/string). オプション。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 渡ã•ã‚ŒãŸåœ°åŸŸã¨ãã®æ²¿ç·šã®ã™ã¹ã¦ã®è¦ªåœ°åŸŸã‹ã‚‰ãªã‚‹åœ°åŸŸIDã®é…列。[Array](../data-types/array)([UInt32](../data-types/int-uint)). + +**例** + +クエリ: + +``` sql +SELECT regionHierarchy(number::UInt32) AS arr, arrayMap(id -> regionToName(id, 'en'), arr) FROM numbers(5); +``` + +çµæžœ: + +``` text +┌─arr────────────┬─arrayMap(lambda(tuple(id), regionToName(id, 'en')), regionHierarchy(CAST(number, 'UInt32')))─┠+│ [] │ [] │ +│ [1] │ ['World'] │ +│ [2,10,9,1] │ ['USA','North America','America','World'] │ +│ [3,2,10,9,1] │ ['Colorado','USA','North America','America','World'] │ +│ [4,3,2,10,9,1] │ ['Boulder County','Colorado','USA','North America','America','World'] │ +└────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/index.md b/docs/ja/sql-reference/index.md new file mode 100644 index 00000000000..50fa427d76b --- /dev/null +++ b/docs/ja/sql-reference/index.md @@ -0,0 +1,22 @@ +--- +keywords: [clickhouse, docs, sqlリファレンス, sqlステートメント, sql, 構文] +title: SQLリファレンス +--- + +import { TwoColumnList } from '/src/components/two_column_list' +import { ClickableSquare } from '/src/components/clickable_square' +import { HorizontalDivide } from '/src/components/horizontal_divide' +import { ViewAllLink } from '/src/components/view_all_link' +import { VideoContainer } from '/src/components/video_container' + +import LinksDeployment from './sql-reference-links.json' + +# ClickHouse SQLリファレンス + +ClickHouseã¯ã€å¤šãã®å ´åˆã«ANSI SQL標準ã¨åŒä¸€ã®SQLã«åŸºã¥ã宣言型クエリ言語をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るクエリã«ã¯ã€GROUP BYã€ORDER BYã€FROM内ã®ã‚µãƒ–クエリã€JOINå¥ã€IN演算å­ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã€ã‚¹ã‚«ãƒ©ãƒ¼ã‚µãƒ–クエリãŒå«ã¾ã‚Œã¾ã™ã€‚ + + + + diff --git a/docs/ja/sql-reference/operators/exists.md b/docs/ja/sql-reference/operators/exists.md new file mode 100644 index 00000000000..378d84a9ae4 --- /dev/null +++ b/docs/ja/sql-reference/operators/exists.md @@ -0,0 +1,62 @@ +--- +slug: /ja/sql-reference/operators/exists +--- +# EXISTS + +`EXISTS` 演算å­ã¯ã‚µãƒ–クエリã®çµæžœã«ä½•ä»¶ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒã‚ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚çµæžœãŒç©ºã§ã‚ã‚Œã°ã€ã“ã®æ¼”ç®—å­ã¯ `0` ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ `1` ã‚’è¿”ã—ã¾ã™ã€‚ + +`EXISTS` 㯠[WHERE](../../sql-reference/statements/select/where.md) å¥ã§ã‚‚使用ã§ãã¾ã™ã€‚ + +:::tip +サブクエリ内ã§ãƒ¡ã‚¤ãƒ³ã‚¯ã‚¨ãƒªã®ãƒ†ãƒ¼ãƒ–ルやカラムã¸ã®å‚ç…§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: + +**構文** + +``` sql +EXISTS(subquery) +``` + +**例** + +サブクエリ内ã®å€¤ã®å­˜åœ¨ã‚’確èªã™ã‚‹ã‚¯ã‚¨ãƒª: + +``` sql +SELECT EXISTS(SELECT * FROM numbers(10) WHERE number > 8), EXISTS(SELECT * FROM numbers(10) WHERE number > 11) +``` + +çµæžœ: + +``` text +┌─in(1, _subquery1)─┬─in(1, _subquery2)─┠+│ 1 │ 0 │ +└───────────────────┴───────────────────┘ +``` + +複数ã®è¡Œã‚’è¿”ã™ã‚µãƒ–クエリを使用ã—ãŸã‚¯ã‚¨ãƒª: + +``` sql +SELECT count() FROM numbers(10) WHERE EXISTS(SELECT number FROM numbers(10) WHERE number > 8); +``` + +çµæžœ: + +``` text +┌─count()─┠+│ 10 │ +└─────────┘ +``` + +空ã®çµæžœã‚’è¿”ã™ã‚µãƒ–クエリを使用ã—ãŸã‚¯ã‚¨ãƒª: + +``` sql +SELECT count() FROM numbers(10) WHERE EXISTS(SELECT number FROM numbers(10) WHERE number > 11); +``` + +çµæžœ: + +``` text +┌─count()─┠+│ 0 │ +└─────────┘ +``` diff --git a/docs/ja/sql-reference/operators/in.md b/docs/ja/sql-reference/operators/in.md new file mode 100644 index 00000000000..957c7bf8ff0 --- /dev/null +++ b/docs/ja/sql-reference/operators/in.md @@ -0,0 +1,262 @@ +--- +slug: /ja/sql-reference/operators/in +--- +# IN æ¼”ç®—å­ + +`IN`ã€`NOT IN`ã€`GLOBAL IN`ã€`GLOBAL NOT IN` 演算å­ã¯ã€ãã®æ©Ÿèƒ½ãŒéžå¸¸ã«è±Šå¯Œã§ã‚ã‚‹ãŸã‚ã€å€‹åˆ¥ã«èª¬æ˜Žã•ã‚Œã¾ã™ã€‚ + +演算å­ã®å·¦å´ã¯å˜ä¸€ã®ã‚«ãƒ©ãƒ ã¾ãŸã¯ã‚¿ãƒ—ルã§ã™ã€‚ + +例: + +``` sql +SELECT UserID IN (123, 456) FROM ... +SELECT (CounterID, UserID) IN ((34, 123), (101500, 456)) FROM ... +``` + +å·¦å´ãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ã‚ã‚‹å˜ä¸€ã®ã‚«ãƒ©ãƒ ã§ã€å³å´ãŒå®šæ•°ã®é›†åˆã§ã‚ã‚‹å ´åˆã€ã‚·ã‚¹ãƒ†ãƒ ã¯ã‚¯ã‚¨ãƒªã®å‡¦ç†ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¾ã™ã€‚ + +ã‚ã¾ã‚Šã«ã‚‚多ãã®å€¤ã‚’明示的ã«ãƒªã‚¹ãƒˆã—ãªã„ã§ãã ã•ã„(例ãˆã°ã€æ•°ç™¾ä¸‡ï¼‰ã€‚データセットãŒå¤§ãã„å ´åˆã¯ã€ä¸€æ™‚テーブルã«ç½®ãã¾ã™ï¼ˆä¾‹ãˆã°ã€[クエリ処ç†ã®ãŸã‚ã®å¤–部データ](../../engines/table-engines/special/external-data.md)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚照)ã€ãã—ã¦ã‚µãƒ–クエリを使用ã—ã¾ã™ã€‚ + +演算å­ã®å³å´ã¯ã€å®šæ•°å¼ã®é›†åˆã€å®šæ•°å¼ã‚’æŒã¤ã‚¿ãƒ—ルã®é›†åˆï¼ˆä¸Šè¨˜ã®ä¾‹ã«ç¤ºã•ã‚Œã‚‹ï¼‰ã€ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ†ãƒ¼ãƒ–ルåや括弧内ã®`SELECT`サブクエリã§ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouseã¯ã€`IN`サブクエリã®å·¦å´ã¨å³å´ã®åž‹ãŒç•°ãªã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ã“ã®å ´åˆã€å·¦å´ã®å€¤ã‚’å³å´ã®åž‹ã«å¤‰æ›ã—ã¾ã™ã€‚[accurateCastOrNull](../functions/type-conversion-functions.md#type_conversion_function-accurate-cast_or_null)関数ãŒé©ç”¨ã•ã‚Œã‚‹ã‹ã®ã‚ˆã†ã«ã§ã™ã€‚ã¤ã¾ã‚Šã€ãƒ‡ãƒ¼ã‚¿åž‹ã¯[Nullable](../../sql-reference/data-types/nullable.md)ã¨ãªã‚Šã€å¤‰æ›ãŒå®Ÿè¡Œã§ããªã„å ´åˆã¯[NULL](../../sql-reference/syntax.md#null-literal)ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +クエリ: + +``` sql +SELECT '1' IN (SELECT 1); +``` + +çµæžœ: + +``` text +┌─in('1', _subquery49)─┠+│ 1 │ +└──────────────────────┘ +``` + +演算å­ã®å³å´ãŒãƒ†ãƒ¼ãƒ–ルåã®å ´åˆï¼ˆä¾‹ãˆã°ã€`UserID IN users`)ã€ã“ã‚Œã¯ã‚µãƒ–クエリ `UserID IN (SELECT * FROM users)` ã¨åŒç­‰ã§ã™ã€‚クエリã¨ä¸€ç·’ã«é€ä¿¡ã•ã‚Œã‚‹å¤–部データを扱ã†ã¨ãã«ã“れを使用ã—ã¾ã™ã€‚例ãˆã°ã€ã‚¯ã‚¨ãƒªã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®IDセットを一時テーブルã®ã€Œusersã€ã«èª­ã¿è¾¼ã‚“ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ + +演算å­ã®å³å´ãŒã€å¸¸ã«RAMã«å­˜åœ¨ã™ã‚‹æº–備済ã¿ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’æŒã¤SetエンジンをæŒã¤ãƒ†ãƒ¼ãƒ–ルåã§ã‚ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯å„クエリã®ãŸã‚ã«å†ä½œæˆã•ã‚Œã¾ã›ã‚“。 + +サブクエリã¯ã€ã‚¿ãƒ—ルをフィルタリングã™ã‚‹ãŸã‚ã«è¤‡æ•°ã®ã‚«ãƒ©ãƒ ã‚’指定ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +例: + +``` sql +SELECT (CounterID, UserID) IN (SELECT CounterID, UserID FROM ...) FROM ... +``` + +`IN`演算å­ã®å·¦å´ã¨å³å´ã®ã‚«ãƒ©ãƒ ã¯åŒã˜åž‹ã‚’æŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +`IN`演算å­ã¨ã‚µãƒ–クエリã¯ã€ã‚¯ã‚¨ãƒªã®ä»»æ„ã®éƒ¨åˆ†ï¼ˆé›†ç´„関数やラムダ関数もå«ã‚€ï¼‰ã«å‡ºç¾ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +例: + +``` sql +SELECT + EventDate, + avg(UserID IN + ( + SELECT UserID + FROM test.hits + WHERE EventDate = toDate('2014-03-17') + )) AS ratio +FROM test.hits +GROUP BY EventDate +ORDER BY EventDate ASC +``` + +``` text +┌──EventDate─┬────ratio─┠+│ 2014-03-17 │ 1 │ +│ 2014-03-18 │ 0.807696 │ +│ 2014-03-19 │ 0.755406 │ +│ 2014-03-20 │ 0.723218 │ +│ 2014-03-21 │ 0.697021 │ +│ 2014-03-22 │ 0.647851 │ +│ 2014-03-23 │ 0.648416 │ +└────────────┴──────────┘ +``` + +3月17日以é™ã®å„日付ã«ã¤ã„ã¦ã€ãã®æ—¥ã«ã“ã®ã‚µã‚¤ãƒˆã‚’訪れãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã‚‹ãƒšãƒ¼ã‚¸ãƒ“ューã®å‰²åˆã‚’計算ã—ã¾ã™ã€‚ +`IN`å¥å†…ã®ã‚µãƒ–クエリã¯ã€å˜ä¸€ã®ã‚µãƒ¼ãƒãƒ¼ä¸Šã§ä¸€åº¦ã ã‘実行ã•ã‚Œã¾ã™ã€‚ä¾å­˜ã‚µãƒ–クエリã¯ã‚ã‚Šã¾ã›ã‚“。 + +## NULL å‡¦ç† + +リクエスト処ç†ä¸­ã€`IN`演算å­ã¯ã€[NULL](../../sql-reference/syntax.md#null-literal) ã¨ã®æ“作çµæžœãŒå¸¸ã« `0` ã«ç­‰ã—ã„ã¨ä»®å®šã—ã¾ã™ã€‚演算å­ã®å³å´ã¾ãŸã¯å·¦å´ã« `NULL` ãŒã‚ã£ã¦ã‚‚関連ã—ã¾ã›ã‚“。`NULL` 値ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«å«ã¾ã‚Œãšã€ç›¸äº’ã«å¯¾å¿œã›ãšã€[transform_null_in = 0](../../operations/settings/settings.md#transform_null_in) ã®å ´åˆã«æ¯”較ã•ã‚Œã¾ã›ã‚“。 + +`t_null` テーブルを使用ã—ãŸä¾‹ã‚’示ã—ã¾ã™: + +``` text +┌─x─┬────y─┠+│ 1 │ á´ºáµá´¸á´¸ │ +│ 2 │ 3 │ +└───┴──────┘ +``` + +クエリ `SELECT x FROM t_null WHERE y IN (NULL,3)` を実行ã™ã‚‹ã¨ã€æ¬¡ã®çµæžœãŒå¾—られã¾ã™: + +``` text +┌─x─┠+│ 2 │ +└───┘ +``` + +`y = NULL` ã®è¡ŒãŒã‚¯ã‚¨ãƒªçµæžœã‹ã‚‰é™¤å¤–ã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€ClickHouse ãŒ`(NULL,3)` 集åˆã« `NULL` ãŒå«ã¾ã‚Œã‚‹ã‹ã©ã†ã‹ã‚’決定ã§ããšã€æ“作ã®çµæžœã¨ã—㦠`0` ã‚’è¿”ã—ã€`SELECT` ãŒã“ã®è¡Œã‚’最終出力ã‹ã‚‰é™¤å¤–ã—ãŸãŸã‚ã§ã™ã€‚ + +``` sql +SELECT y IN (NULL, 3) +FROM t_null +``` + +``` text +┌─in(y, tuple(NULL, 3))─┠+│ 0 │ +│ 1 │ +└───────────────────────┘ +``` + +## 分散サブクエリ + +`IN`演算å­ã¨ã‚µãƒ–クエリã«ã¯ã€`JOIN`演算å­ã«ä¼¼ãŸ2ã¤ã®ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚ãã‚Œã¯é€šå¸¸ã®`IN` / `JOIN` 㨠`GLOBAL IN` / `GLOBAL JOIN` ã§ã™ã€‚ã“れらã¯ã€åˆ†æ•£ã‚¯ã‚¨ãƒªå‡¦ç†ã®æ–¹æ³•ãŒç•°ãªã‚Šã¾ã™ã€‚ + +:::note +以下ã«èª¬æ˜Žã™ã‚‹ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ã€[設定](../../operations/settings/settings.md) `distributed_product_mode` ã«ä¾å­˜ã—ã¦ã€ç•°ãªã‚‹å‹•ä½œã‚’ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +通常ã®`IN`を使用ã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã€ãã‚Œãžã‚ŒãŒ`IN`ã¾ãŸã¯`JOIN`å¥ã®ã‚µãƒ–クエリを実行ã—ã¾ã™ã€‚ + +`GLOBAL IN` / `GLOBAL JOIN` を使用ã™ã‚‹ã¨ã€ã¾ãšå…¨ã¦ã®`GLOBAL IN` / `GLOBAL JOIN`用ã®ã‚µãƒ–クエリãŒå®Ÿè¡Œã•ã‚Œã€ãã®çµæžœãŒä¸€æ™‚テーブルã«åŽé›†ã•ã‚Œã¾ã™ã€‚ãã®å¾Œã€ä¸€æ™‚テーブルã¯å„リモートサーãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã€ã‚¯ã‚¨ãƒªã¯ã“ã®ä¸€æ™‚データを使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +分散クエリã§ãªã„å ´åˆã¯ã€é€šå¸¸ã®`IN` / `JOIN`を使用ã—ã¾ã™ã€‚ + +分散クエリ処ç†ã®ãŸã‚ã«`IN` / `JOIN`å¥å†…ã®ã‚µãƒ–クエリを使用ã™ã‚‹éš›ã¯æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ + +例を見ã¦ã¿ã¾ã—ょã†ã€‚クラスター内ã®å„サーãƒãƒ¼ã«ã¯é€šå¸¸ã® **local_table** ãŒã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚å„サーãƒãƒ¼ã«ã‚‚クラスター内ã®å…¨ã‚µãƒ¼ãƒãƒ¼ã‚’対象ã¨ã—ãŸ**Distributed**åž‹ã® **distributed_table** テーブルãŒã‚ã‚Šã¾ã™ã€‚ + +**distributed_table** ã«å¯¾ã™ã‚‹ã‚¯ã‚¨ãƒªã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã€ãれら㧠**local_table** を使用ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +例ãˆã°ã€ã‚¯ã‚¨ãƒª + +``` sql +SELECT uniq(UserID) FROM distributed_table +``` + +ã¯ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã« + +``` sql +SELECT uniq(UserID) FROM local_table +``` + +ã¨ã—ã¦é€ä¿¡ã•ã‚Œã€ãã‚Œãžã‚Œã§ä¸¦è¡Œã—ã¦å®Ÿè¡Œã•ã‚Œã€ä¸­é–“çµæžœãŒçµåˆã§ãるステージã«é”ã™ã‚‹ã¾ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ãã®å¾Œã€ä¸­é–“çµæžœã¯è¦æ±‚元サーãƒãƒ¼ã«è¿”ã•ã‚Œã€ãã“ã§ãƒžãƒ¼ã‚¸ã•ã‚Œã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«æœ€çµ‚çµæžœãŒé€ã‚‰ã‚Œã¾ã™ã€‚ + +`IN` を使用ã—ãŸã‚¯ã‚¨ãƒªã‚’見ã¦ã¿ã¾ã—ょã†: + +``` sql +SELECT uniq(UserID) FROM distributed_table WHERE CounterID = 101500 AND UserID IN (SELECT UserID FROM local_table WHERE CounterID = 34) +``` + +- 2ã¤ã®ã‚µã‚¤ãƒˆã®ã‚ªãƒ¼ãƒ‡ã‚£ã‚¨ãƒ³ã‚¹ã®äº¤å·®ã®è¨ˆç®—。 + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«æ¬¡ã®ã‚ˆã†ã«é€ä¿¡ã•ã‚Œã¾ã™ + +``` sql +SELECT uniq(UserID) FROM local_table WHERE CounterID = 101500 AND UserID IN (SELECT UserID FROM local_table WHERE CounterID = 34) +``` + +ã¤ã¾ã‚Šã€`IN`å¥å†…ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã¯ã€å„サーãƒãƒ¼ã«æ ¼ç´ã•ã‚Œã¦ã„るローカルデータã®ã¿ã‚’対象ã«ã—ã¦ã€å„サーãƒãƒ¼ã«ç‹¬ç«‹ã—ã¦åŽé›†ã•ã‚Œã¾ã™ã€‚ + +ã“ã‚Œã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ã‚µãƒ¼ãƒãƒ¼å…¨ä½“ã§ãƒ‡ãƒ¼ã‚¿ã‚’ユーザーIDã”ã¨ã«å˜ä¸€ã®ã‚µãƒ¼ãƒãƒ¼ã«å®Œå…¨ã«å­˜åœ¨ã™ã‚‹ã‚ˆã†ã«ãƒ‡ãƒ¼ã‚¿ã‚’分散ã—ãŸå ´åˆã€æ­£ç¢ºã‹ã¤æœ€é©ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ã“ã®å ´åˆã€å¿…è¦ãªãƒ‡ãƒ¼ã‚¿ã¯ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã§ãƒ­ãƒ¼ã‚«ãƒ«ã«åˆ©ç”¨å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€çµæžœã¯ä¸æ­£ç¢ºã«ãªã‚Šã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã®å¤‰å½¢ã‚’「ローカルINã€ã¨å‘¼ã³ã¾ã™ã€‚ + +クラスタサーãƒãƒ¼å…¨ä½“ã«ãƒ‡ãƒ¼ã‚¿ãŒãƒ©ãƒ³ãƒ€ãƒ ã«åˆ†æ•£ã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã€ã‚¯ã‚¨ãƒªã®å‹•ä½œã‚’修正ã™ã‚‹ã«ã¯ã€ã‚µãƒ–クエリ内㫠**distributed_table** を指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚クエリã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +``` sql +SELECT uniq(UserID) FROM distributed_table WHERE CounterID = 101500 AND UserID IN (SELECT UserID FROM distributed_table WHERE CounterID = 34) +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«æ¬¡ã®ã‚ˆã†ã«é€ä¿¡ã•ã‚Œã¾ã™ + +``` sql +SELECT uniq(UserID) FROM local_table WHERE CounterID = 101500 AND UserID IN (SELECT UserID FROM distributed_table WHERE CounterID = 34) +``` + +サブクエリã¯å„リモートサーãƒãƒ¼ä¸Šã§é–‹å§‹ã•ã‚Œã¾ã™ã€‚サブクエリãŒåˆ†æ•£ãƒ†ãƒ¼ãƒ–ルを使用ã—ã¦ã„ã‚‹ãŸã‚ã€å„リモートサーãƒãƒ¼ä¸Šã®ã‚µãƒ–クエリã¯ã€æ¬¡ã®ã‚ˆã†ã«å„リモートサーãƒãƒ¼ã«å†é€ä¿¡ã•ã‚Œã¾ã™: + +``` sql +SELECT UserID FROM local_table WHERE CounterID = 34 +``` + +例ãˆã°ã€100å°ã®ã‚µãƒ¼ãƒãƒ¼ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ãŒã‚ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªå…¨ä½“を実行ã™ã‚‹ã«ã¯10,000ã®åŸºæœ¬çš„ãªãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒå¿…è¦ã§ã‚ã‚Šã€ã“ã‚Œã¯ä¸€èˆ¬ã«ã¯è¨±å®¹ã•ã‚Œã¾ã›ã‚“。 + +ã“ã®ã‚ˆã†ãªå ´åˆã€é€šå¸¸ã® `IN` ã®ä»£ã‚ã‚Šã«å¸¸ã« `GLOBAL IN` を使用ã™ã¹ãã§ã™ã€‚クエリã®å‹•ä½œã‚’見ã¦ã¿ã¾ã—ょã†: + +``` sql +SELECT uniq(UserID) FROM distributed_table WHERE CounterID = 101500 AND UserID GLOBAL IN (SELECT UserID FROM distributed_table WHERE CounterID = 34) +``` + +è¦æ±‚元サーãƒãƒ¼ã¯ã‚µãƒ–クエリを実行ã—ã¾ã™: + +``` sql +SELECT UserID FROM distributed_table WHERE CounterID = 34 +``` + +ãã®çµæžœã¯RAMã«ã‚る一時テーブルã«æ ¼ç´ã•ã‚Œã¾ã™ã€‚ãã®å¾Œã€ã‚¯ã‚¨ãƒªã¯å„リモートサーãƒãƒ¼ã«æ¬¡ã®ã‚ˆã†ã«é€ä¿¡ã•ã‚Œã¾ã™: + +``` sql +SELECT uniq(UserID) FROM local_table WHERE CounterID = 101500 AND UserID GLOBAL IN _data1 +``` + +一時テーブル `_data1` ã¯ã‚¯ã‚¨ãƒªã¨å…±ã«å„リモートサーãƒãƒ¼ã«é€ã‚‰ã‚Œã¾ã™ï¼ˆä¸€æ™‚テーブルã®åå‰ã¯å®Ÿè£…定義ã§ã™ï¼‰ã€‚ + +ã“ã‚Œã¯é€šå¸¸ã® `IN` を使用ã™ã‚‹ã‚ˆã‚Šã‚‚最é©ã§ã™ãŒã€ä»¥ä¸‹ã®ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„: + +1. 一時テーブルを作æˆã™ã‚‹éš›ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯ä¸€æ„ã«ã¯ã•ã‚Œã¾ã›ã‚“。ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä¸Šã§é€ä¿¡ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®é‡ã‚’減らã™ãŸã‚ã«ã€ã‚µãƒ–クエリã§DISTINCTを指定ã—ã¦ãã ã•ã„。(通常ã®`IN`ã®å ´åˆã¯ã“れを行ã†å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。) +2. 一時テーブルã¯ã™ã¹ã¦ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«é€ã‚‰ã‚Œã¾ã™ã€‚ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒˆãƒãƒ­ã‚¸ã¯è€ƒæ…®ã•ã‚Œã¾ã›ã‚“。例ãˆã°ã€10å°ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ãŒè¦æ±‚元サーãƒãƒ¼ã«å¯¾ã—ã¦éžå¸¸ã«é ãã«ã‚るデータセンターã«ã‚ã‚‹å ´åˆã€ãã®ãƒ‡ãƒ¼ã‚¿ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼ã¸ã®ãƒãƒ£ãƒãƒ«ã‚’10回é€ä¿¡ã•ã‚Œã¾ã™ã€‚`GLOBAL IN`を使用ã™ã‚‹éš›ã¯ã€å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’é¿ã‘ã¦ãã ã•ã„。 +3. リモートサーãƒãƒ¼ã¸ã®ãƒ‡ãƒ¼ã‚¿è»¢é€æ™‚ã«ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®å¸¯åŸŸå¹…制é™ã¯æ§‹æˆå¯èƒ½ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’éŽè² è·ã«ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +4. `GLOBAL IN`を定期的ã«ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒãªã„よã†ã«ã€ã‚µãƒ¼ãƒãƒ¼é–“ã§ãƒ‡ãƒ¼ã‚¿ã‚’分散ã—ã¦ãã ã•ã„。 +5. `GLOBAL IN`ã‚’é »ç¹ã«ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ClickHouseクラスターã®å ´æ‰€ã‚’計画ã—ã€å˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼å†…ã§å˜ä¸€ã®ãƒ¬ãƒ—リカグループãŒå­˜åœ¨ã—ã€è¿…速ãªãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãŒç¢ºä¿ã•ã‚Œã€ã‚¯ã‚¨ãƒªãŒå˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼å†…ã§å®Œå…¨ã«å‡¦ç†ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +è¦æ±‚元サーãƒãƒ¼ã«ã®ã¿åˆ©ç”¨å¯èƒ½ãªãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚Šã€ãれをリモートサーãƒãƒ¼ã§ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«ã¯ã€`GLOBAL IN`å¥å†…ã§ãƒ­ãƒ¼ã‚«ãƒ«ãƒ†ãƒ¼ãƒ–ルを指定ã™ã‚‹ã®ã‚‚æ„味ãŒã‚ã‚Šã¾ã™ã€‚ + +### 分散サブクエリ㨠max_rows_in_set + +[`max_rows_in_set`](../../operations/settings/query-complexity.md#max-rows-in-set) 㨠[`max_bytes_in_set`](../../operations/settings/query-complexity.md#max-rows-in-set) を使用ã—ã¦ã€åˆ†æ•£ã‚¯ã‚¨ãƒªä¸­ã«è»¢é€ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿é‡ã‚’制御ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +特ã«ã€`GLOBAL IN` クエリãŒå¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã™å ´åˆãŒé‡è¦ã§ã™ã€‚次ã®SQLを考ãˆã¦ã¿ã¾ã—ょã†: + +```sql +select * from table1 where col1 global in (select col1 from table2 where ) +``` + +`some_predicate` ãŒå分ã«é¸æŠžçš„ã§ãªã„å ´åˆã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¦ãƒ‘フォーマンスã®å•é¡Œã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚ˆã†ãªå ´åˆã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã®ãƒ‡ãƒ¼ã‚¿è»¢é€ã‚’制é™ã™ã‚‹ã“ã¨ãŒè³¢æ˜Žã§ã™ã€‚ã¾ãŸã€[`set_overflow_mode`](../../operations/settings/query-complexity.md#set_overflow_mode) ㌠`throw` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ãŸã‚(デフォルト)ã€ã“れらã®ã—ãã„値ã«é”ã—ãŸæ™‚ã«ä¾‹å¤–ãŒç™ºç”Ÿã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +### 分散サブクエリ㨠max_parallel_replicas + +[max_parallel_replicas](#distributed-subqueries-and-max_parallel_replicas) ãŒ1より大ãã„å ´åˆã€åˆ†æ•£ã‚¯ã‚¨ãƒªã¯ã•ã‚‰ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +例を示ã—ã¾ã™: + +```sql +SELECT CounterID, count() FROM distributed_table_1 WHERE UserID IN (SELECT UserID FROM local_table_2 WHERE CounterID < 100) +SETTINGS max_parallel_replicas=3 +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯å„サーãƒãƒ¼ä¸Šã§ä»¥ä¸‹ã®ã‚ˆã†ã«å¤‰æ›ã•ã‚Œã¾ã™: + +```sql +SELECT CounterID, count() FROM local_table_1 WHERE UserID IN (SELECT UserID FROM local_table_2 WHERE CounterID < 100) +SETTINGS parallel_replicas_count=3, parallel_replicas_offset=M +``` + +ã“ã“ã§ã€`M` ã¯ãƒ­ãƒ¼ã‚«ãƒ«ã‚¯ã‚¨ãƒªãŒå®Ÿè¡Œã•ã‚Œã¦ã„るレプリカã«å¿œã˜ã¦ `1` ã‹ã‚‰ `3` ã®é–“ã§ã™ã€‚ + +ã“れらã®è¨­å®šã¯ã‚¯ã‚¨ãƒªå†…ã®ã™ã¹ã¦ã®MergeTreeファミリーã®ãƒ†ãƒ¼ãƒ–ルã«å½±éŸ¿ã‚’与ãˆã€å„テーブルã«`SAMPLE 1/3 OFFSET (M-1)/3`ã‚’é©ç”¨ã™ã‚‹ã®ã¨åŒã˜åŠ¹æžœãŒã‚ã‚Šã¾ã™ã€‚ + +ãã®ãŸã‚ã€[max_parallel_replicas](#distributed-subqueries-and-max_parallel_replicas)設定を追加ã™ã‚‹ã“ã¨ã§ã€ä¸¡æ–¹ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ãƒ¬ãƒ—リケーションスキームをæŒã¡ã€UserIDã¾ãŸã¯ãã®éƒ¨åˆ†ã‚­ãƒ¼ã«ã‚ˆã£ã¦ã‚µãƒ³ãƒ—リングã•ã‚Œã‚‹å ´åˆã®ã¿ã€æ­£ã—ã„çµæžœãŒå¾—られã¾ã™ã€‚特ã«ã€`local_table_2`ã«ã‚µãƒ³ãƒ—リングキーãŒãªã„å ´åˆã€ä¸æ­£ãªçµæžœãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚åŒã˜ãƒ«ãƒ¼ãƒ«ãŒ`JOIN`ã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +`local_table_2`ãŒè¦ä»¶ã‚’満ãŸã•ãªã„å ´åˆã®å›žé¿ç­–ã¨ã—ã¦ã€`GLOBAL IN`ã¾ãŸã¯`GLOBAL JOIN`を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +テーブルã«ã‚µãƒ³ãƒ—リングキーãŒãªã„å ´åˆã€[parallel_replicas_custom_key](#settings-parallel_replicas_custom_key)ã®ã‚ˆã‚ŠæŸ”軟ãªã‚ªãƒ—ションを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ç•°ãªã‚‹ã€ã‚ˆã‚Šæœ€é©ãªå‹•ä½œã‚’生æˆã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/operators/index.md b/docs/ja/sql-reference/operators/index.md new file mode 100644 index 00000000000..cbb7f0fc13b --- /dev/null +++ b/docs/ja/sql-reference/operators/index.md @@ -0,0 +1,388 @@ +--- +slug: /ja/sql-reference/operators/ +sidebar_position: 38 +sidebar_label: Operators +--- + +# Operators + +ClickHouseã¯ã€æ¼”ç®—å­ã‚’ãã®å„ªå…ˆåº¦ã€çµåˆæ€§ã€çµã³ã¤ãを考慮ã—ã¦ã‚¯ã‚¨ãƒªè§£æžæ™‚ã«å¯¾å¿œã™ã‚‹é–¢æ•°ã«å¤‰æ›ã—ã¾ã™ã€‚ + +## ã‚¢ã‚¯ã‚»ã‚¹æ¼”ç®—å­ + +`a[N]` – é…列è¦ç´ ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚`arrayElement(a, N)`関数。 + +`a.N` – タプルè¦ç´ ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã€‚`tupleElement(a, N)`関数。 + +## 数値ã®å¦å®šæ¼”ç®—å­ + +`-a` – `negate(a)`関数。 + +タプルã®å¦å®šã«ã¤ã„ã¦ã¯ï¼š[tupleNegate](../../sql-reference/functions/tuple-functions.md#tuplenegate)。 + +## ä¹—ç®—ã¨é™¤ç®—æ¼”ç®—å­ + +`a * b` – `multiply(a, b)`関数。 + +タプルã«æ•°å€¤ã‚’ä¹—ã˜ã‚‹å ´åˆï¼š[tupleMultiplyByNumber](../../sql-reference/functions/tuple-functions.md#tuplemultiplybynumber)ã€ã‚¹ã‚«ãƒ©ãƒ¼ç©ã®å ´åˆï¼š[dotProduct](../../sql-reference/functions/tuple-functions.md#dotproduct)。 + +`a / b` – `divide(a, b)`関数。 + +タプルを数値ã§é™¤ç®—ã™ã‚‹å ´åˆï¼š[tupleDivideByNumber](../../sql-reference/functions/tuple-functions.md#tupledividebynumber)。 + +`a % b` – `modulo(a, b)`関数。 + +## 加算ã¨æ¸›ç®—æ¼”ç®—å­ + +`a + b` – `plus(a, b)`関数。 + +タプルã®åŠ ç®—ã«ã¤ã„ã¦ã¯ï¼š[tuplePlus](../../sql-reference/functions/tuple-functions.md#tupleplus)。 + +`a - b` – `minus(a, b)`関数。 + +タプルã®æ¸›ç®—ã«ã¤ã„ã¦ã¯ï¼š[tupleMinus](../../sql-reference/functions/tuple-functions.md#tupleminus)。 + +## æ¯”è¼ƒæ¼”ç®—å­ + +### equals関数 +`a = b` – `equals(a, b)`関数。 + +`a == b` – `equals(a, b)`関数。 + +### notEquals関数 +`a != b` – `notEquals(a, b)`関数。 + +`a <> b` – `notEquals(a, b)`関数。 + +### lessOrEquals関数 +`a <= b` – `lessOrEquals(a, b)`関数。 + +### greaterOrEquals関数 +`a >= b` – `greaterOrEquals(a, b)`関数。 + +### less関数 +`a < b` – `less(a, b)`関数。 + +### greater関数 +`a > b` – `greater(a, b)`関数。 + +### like関数 +`a LIKE s` – `like(a, b)`関数。 + +### notLike関数 +`a NOT LIKE s` – `notLike(a, b)`関数。 + +### ilike関数 +`a ILIKE s` – `ilike(a, b)`関数。 + +### BETWEEN関数 +`a BETWEEN b AND c` – `a >= b AND a <= c`ã¨åŒã˜ã€‚ + +`a NOT BETWEEN b AND c` – `a < b OR a > c`ã¨åŒã˜ã€‚ + +## データセットæ“ä½œç”¨æ¼”ç®—å­ + +[IN演算å­](../../sql-reference/operators/in.md)ãŠã‚ˆã³[EXISTS](../../sql-reference/operators/exists.md)演算å­ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### in関数 +`a IN ...` – `in(a, b)`関数。 + +### notIn関数 +`a NOT IN ...` – `notIn(a, b)`関数。 + +### globalIn関数 +`a GLOBAL IN ...` – `globalIn(a, b)`関数。 + +### globalNotIn関数 +`a GLOBAL NOT IN ...` – `globalNotIn(a, b)`関数。 + +### inサブクエリ関数 +`a = ANY (subquery)` – `in(a, subquery)`関数。 + +### notInサブクエリ関数 +`a != ANY (subquery)` – `a NOT IN (SELECT singleValueOrNull(*) FROM subquery)`ã¨åŒã˜ã€‚ + +### inサブクエリ関数 +`a = ALL (subquery)` – `a IN (SELECT singleValueOrNull(*) FROM subquery)`ã¨åŒã˜ã€‚ + +### notInサブクエリ関数 +`a != ALL (subquery)` – `notIn(a, subquery)`関数。 + +**例** + +ALLを使用ã—ãŸã‚¯ã‚¨ãƒª: + +```sql +SELECT number AS a FROM numbers(10) WHERE a > ALL (SELECT number FROM numbers(3, 3)); +``` + +çµæžœ: + +```text +┌─a─┠+│ 6 │ +│ 7 │ +│ 8 │ +│ 9 │ +└───┘ +``` + +ANYを使用ã—ãŸã‚¯ã‚¨ãƒª: + +```sql +SELECT number AS a FROM numbers(10) WHERE a > ANY (SELECT number FROM numbers(3, 3)); +``` + +çµæžœ: + +```text +┌─a─┠+│ 4 │ +│ 5 │ +│ 6 │ +│ 7 │ +│ 8 │ +│ 9 │ +└───┘ +``` + +## 日付ãŠã‚ˆã³æ™‚刻ã®æ“ä½œç”¨æ¼”ç®—å­ + +### EXTRACT + +```sql +EXTRACT(part FROM date); +``` + +日付ã‹ã‚‰éƒ¨åˆ†ã‚’抽出ã—ã¾ã™ã€‚例ãˆã°ã€ä¸Žãˆã‚‰ã‚ŒãŸæ—¥ä»˜ã‹ã‚‰æœˆã‚’å–å¾—ã—ãŸã‚Šã€æ™‚刻ã‹ã‚‰ç§’ã‚’å–å¾—ã§ãã¾ã™ã€‚ + +`part`パラメーターã¯ã€å–å¾—ã—ãŸã„日付ã®éƒ¨åˆ†ã‚’指定ã—ã¾ã™ã€‚以下ã®å€¤ãŒåˆ©ç”¨å¯èƒ½ã§ã™ï¼š + +- `DAY` — 月ã®æ—¥ã€‚å¯èƒ½ãªå€¤ï¼š1〜31。 +- `MONTH` — 月。å¯èƒ½ãªå€¤ï¼š1〜12。 +- `YEAR` — 年。 +- `SECOND` — 秒。å¯èƒ½ãªå€¤ï¼š0〜59。 +- `MINUTE` — 分。å¯èƒ½ãªå€¤ï¼š0〜59。 +- `HOUR` — 時。å¯èƒ½ãªå€¤ï¼š0〜23。 + +`part`パラメーターã¯å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +`date`パラメーターã¯ã€å‡¦ç†å¯¾è±¡ã®æ—¥ä»˜ã¾ãŸã¯æ™‚刻を指定ã—ã¾ã™ã€‚[Date](../../sql-reference/data-types/date.md)ã¾ãŸã¯[DateTime](../../sql-reference/data-types/datetime.md)åž‹ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +SELECT EXTRACT(DAY FROM toDate('2017-06-15')); +SELECT EXTRACT(MONTH FROM toDate('2017-06-15')); +SELECT EXTRACT(YEAR FROM toDate('2017-06-15')); +``` + +次ã®ä¾‹ã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãã®ãƒ†ãƒ¼ãƒ–ルã«`DateTime`タイプã®å€¤ã‚’挿入ã—ã¦ã„ã¾ã™ã€‚ + +```sql +CREATE TABLE test.Orders +( + OrderId UInt64, + OrderName String, + OrderDate DateTime +) +ENGINE = Log; +``` + +```sql +INSERT INTO test.Orders VALUES (1, 'Jarlsberg Cheese', toDateTime('2008-10-11 13:23:44')); +``` + +```sql +SELECT + toYear(OrderDate) AS OrderYear, + toMonth(OrderDate) AS OrderMonth, + toDayOfMonth(OrderDate) AS OrderDay, + toHour(OrderDate) AS OrderHour, + toMinute(OrderDate) AS OrderMinute, + toSecond(OrderDate) AS OrderSecond +FROM test.Orders; +``` + +```text +┌─OrderYear─┬─OrderMonth─┬─OrderDay─┬─OrderHour─┬─OrderMinute─┬─OrderSecond─┠+│ 2008 │ 10 │ 11 │ 13 │ 23 │ 44 │ +└───────────┴────────────┴──────────┴───────────┴─────────────┴─────────────┘ +``` + +追加ã®ä¾‹ã¯[テスト](https://github.com/ClickHouse/ClickHouse/blob/master/tests/queries/0_stateless/00619_extract.sql)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +### INTERVAL + +[Date](../../sql-reference/data-types/date.md)ãŠã‚ˆã³[DateTime](../../sql-reference/data-types/datetime.md)タイプã¨ã®ç®—è¡“æ“作ã§ä½¿ç”¨ã•ã‚Œã‚‹[Interval](../../sql-reference/data-types/special-data-types/interval.md)タイプã®å€¤ã‚’作æˆã—ã¾ã™ã€‚ + +インターãƒãƒ«ã®ç¨®é¡žï¼š +- `SECOND` +- `MINUTE` +- `HOUR` +- `DAY` +- `WEEK` +- `MONTH` +- `QUARTER` +- `YEAR` + +`INTERVAL`ã®å€¤ã‚’設定ã™ã‚‹éš›ã«æ–‡å­—列リテラルも使用ã§ãã¾ã™ã€‚例ãˆã°ã€`INTERVAL 1 HOUR`ã¯`INTERVAL '1 hour'`ã¾ãŸã¯`INTERVAL '1' hour`ã¨åŒä¸€ã§ã™ã€‚ + +:::tip +ç•°ãªã‚‹ã‚¿ã‚¤ãƒ—ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ã¯çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。`INTERVAL 4 DAY 1 HOUR`ã®ã‚ˆã†ãªå¼ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。インターãƒãƒ«ã‚’指定ã™ã‚‹éš›ã«ã¯ã€æœ€å°ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒ«ãƒ¦ãƒ‹ãƒƒãƒˆã¨åŒç­‰ã¾ãŸã¯ãれよりå°ã•ã„å˜ä½ã‚’使用ã—ã¦ãã ã•ã„。例ãˆã°`INTERVAL 25 HOUR`ãªã©ã€‚以下ã®ä¾‹ã®ã‚ˆã†ã«é€æ¬¡çš„ãªæ“作を行ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +例: + +```sql +SELECT now() AS current_date_time, current_date_time + INTERVAL 4 DAY + INTERVAL 3 HOUR; +``` + +```text +┌───current_date_time─┬─plus(plus(now(), toIntervalDay(4)), toIntervalHour(3))─┠+│ 2020-11-03 22:09:50 │ 2020-11-08 01:09:50 │ +└─────────────────────┴────────────────────────────────────────────────────────┘ +``` + +```sql +SELECT now() AS current_date_time, current_date_time + INTERVAL '4 day' + INTERVAL '3 hour'; +``` + +```text +┌───current_date_time─┬─plus(plus(now(), toIntervalDay(4)), toIntervalHour(3))─┠+│ 2020-11-03 22:12:10 │ 2020-11-08 01:12:10 │ +└─────────────────────┴────────────────────────────────────────────────────────┘ +``` + +```sql +SELECT now() AS current_date_time, current_date_time + INTERVAL '4' day + INTERVAL '3' hour; +``` + +```text +┌───current_date_time─┬─plus(plus(now(), toIntervalDay('4')), toIntervalHour('3'))─┠+│ 2020-11-03 22:33:19 │ 2020-11-08 01:33:19 │ +└─────────────────────┴────────────────────────────────────────────────────────────┘ +``` + +:::note +`INTERVAL`構文ã¾ãŸã¯`addDays`関数ã¯å¸¸ã«å„ªå…ˆã•ã‚Œã¾ã™ã€‚å˜ç´”ãªåŠ ç®—ã¾ãŸã¯æ¸›ç®—(例:`now() + ...`ã®ã‚ˆã†ãªæ§‹æ–‡ï¼‰ã¯ã€æ™‚é–“ã®è¨­å®šã‚’考慮ã—ã¾ã›ã‚“。例ãˆã°ã€å¤æ™‚é–“ãªã©ã€‚ +::: + +例: + +```sql +SELECT toDateTime('2014-10-26 00:00:00', 'Asia/Istanbul') AS time, time + 60 * 60 * 24 AS time_plus_24_hours, time + toIntervalDay(1) AS time_plus_1_day; +``` + +```text +┌────────────────time─┬──time_plus_24_hours─┬─────time_plus_1_day─┠+│ 2014-10-26 00:00:00 │ 2014-10-26 23:00:00 │ 2014-10-27 00:00:00 │ +└─────────────────────┴─────────────────────┴─────────────────────┘ +``` + +**関連項目** + +- [Interval](../../sql-reference/data-types/special-data-types/interval.md)データタイプ +- [toInterval](../../sql-reference/functions/type-conversion-functions.md#function-tointerval)タイプ変æ›é–¢æ•° + +## è«–ç†ANDæ¼”ç®—å­ + +構文 `SELECT a AND b` — `a`ã¨`b`ã®è«–ç†ç©ã‚’計算ã™ã‚‹é–¢æ•°[and](../../sql-reference/functions/logical-functions.md#logical-and-function)。 + +## è«–ç†ORæ¼”ç®—å­ + +構文 `SELECT a OR b` — `a`ã¨`b`ã®è«–ç†å’Œã‚’計算ã™ã‚‹é–¢æ•°[or](../../sql-reference/functions/logical-functions.md#logical-or-function)。 + +## è«–ç†å¦å®šæ¼”ç®—å­ + +構文 `SELECT NOT a` — `a`ã®è«–ç†å¦å®šã‚’計算ã™ã‚‹é–¢æ•°[not](../../sql-reference/functions/logical-functions.md#logical-not-function)。 + +## æ¡ä»¶æ¼”ç®—å­ + +`a ? b : c` – `if(a, b, c)`関数。 + +注æ„: + +æ¡ä»¶æ¼”ç®—å­ã¯ã€bã¨cã®å€¤ã‚’計算ã—ãŸå¾Œã€æ¡ä»¶aãŒæº€ãŸã•ã‚Œã¦ã„ã‚‹ã‹ã‚’確èªã—ã€å¯¾å¿œã™ã‚‹å€¤ã‚’è¿”ã—ã¾ã™ã€‚`b`ã¾ãŸã¯`c`ãŒ[arrayJoin()](../../sql-reference/functions/array-join.md#functions_arrayjoin)関数ã§ã‚ã‚‹ã¨ãã€aæ¡ä»¶ã«é–¢ã‚らãšå„è¡ŒãŒè¤‡è£½ã•ã‚Œã¾ã™ã€‚ + +## æ¡ä»¶å¼ + +```sql +CASE [x] + WHEN a THEN b + [WHEN ... THEN ...] + [ELSE c] +END +``` + +`x`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`transform(x, [a, ...], [b, ...], c)`関数ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°`multiIf(a, b, ..., c)`。 + +å¼ä¸­ã«`ELSE c`å¥ãŒãªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯`NULL`ã§ã™ã€‚ + +`transform`関数ã¯`NULL`を扱ã„ã¾ã›ã‚“。 + +## 連çµæ¼”ç®—å­ + +`s1 || s2` – `concat(s1, s2)関数。` + +## ラムダ生æˆæ¼”ç®—å­ + +`x -> expr` – `lambda(x, expr)`関数。 + +以下ã®æ¼”ç®—å­ã¯å„ªå…ˆåº¦ã‚’æŒãŸãšã€æ‹¬å¼§ã§ã™ï¼š + +## é…列生æˆæ¼”ç®—å­ + +`[x1, ...]` – `array(x1, ...)`関数。 + +## タプル生æˆæ¼”ç®—å­ + +`(x1, x2, ...)` – `tuple(x1, x2, ...)`関数。 + +## çµåˆæ€§ + +å…¨ã¦ã®äºŒé …演算å­ã¯å·¦çµåˆæ€§ã‚’æŒã¡ã¾ã™ã€‚例ãˆã°ã€`1 + 2 + 3`ã¯`plus(plus(1, 2), 3)`ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ã“ã®ãŸã‚ã€æ™‚ã«ã¯äºˆæƒ³é€šã‚Šã«å‹•ä½œã—ãªã„ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€`SELECT 4 > 2 > 3`ã¯0ã‚’è¿”ã—ã¾ã™ã€‚ + +効率化ã®ãŸã‚ã€`and`ã‚„`or`関数ã¯ä»»æ„ã®æ•°ã®å¼•æ•°ã‚’å—ã‘付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚対応ã™ã‚‹`AND`ã¨`OR`演算å­ã®ãƒã‚§ãƒ¼ãƒ³ã¯ã“れらã®é–¢æ•°ã®å˜ä¸€ã®å‘¼ã³å‡ºã—ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +## `NULL`ã®ç¢ºèª + +ClickHouseã¯`IS NULL`ã¨`IS NOT NULL`演算å­ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### IS NULL {#is_null} + +- [Nullable](../../sql-reference/data-types/nullable.md)åž‹ã®å€¤ã®å ´åˆã€`IS NULL`演算å­ã¯ä»¥ä¸‹ã‚’è¿”ã—ã¾ã™ï¼š + - 値ãŒ`NULL`ã®å ´åˆã¯`1`。 + - ãれ以外ã®å ´åˆã¯`0`。 +- ãã®ä»–ã®å€¤ã®å ´åˆã€`IS NULL`演算å­ã¯å¸¸ã«`0`ã‚’è¿”ã—ã¾ã™ã€‚ + +[optimize_functions_to_subcolumns](../../operations/settings/settings.md#optimize-functions-to-subcolumns)設定を有効ã«ã™ã‚‹ã“ã¨ã§æœ€é©åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`optimize_functions_to_subcolumns = 1`ã®å ´åˆã€é–¢æ•°ã¯å…¨ã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã®ã§ã¯ãªãã€[null](../../sql-reference/data-types/nullable.md#finding-null)サブカラムã®ã¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚クエリ`SELECT n IS NULL FROM table`ã¯`SELECT n.null FROM TABLE`ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +```sql +SELECT x+100 FROM t_null WHERE y IS NULL +``` + +```text +┌─plus(x, 100)─┠+│ 101 │ +└──────────────┘ +``` + +### IS NOT NULL {#is_not_null} + +- [Nullable](../../sql-reference/data-types/nullable.md)åž‹ã®å€¤ã®å ´åˆã€`IS NOT NULL`演算å­ã¯ä»¥ä¸‹ã‚’è¿”ã—ã¾ã™ï¼š + - 値ãŒ`NULL`ã®å ´åˆã¯`0`。 + - ãれ以外ã®å ´åˆã¯`1`。 +- ãã®ä»–ã®å€¤ã®å ´åˆã€`IS NOT NULL`演算å­ã¯å¸¸ã«`1`ã‚’è¿”ã—ã¾ã™ã€‚ + +```sql +SELECT * FROM t_null WHERE y IS NOT NULL +``` + +```text +┌─x─┬─y─┠+│ 2 │ 3 │ +└───┴───┘ +``` + +[optimize_functions_to_subcolumns](../../operations/settings/settings.md#optimize-functions-to-subcolumns)設定を有効ã«ã™ã‚‹ã“ã¨ã§æœ€é©åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`optimize_functions_to_subcolumns = 1`ã®å ´åˆã€é–¢æ•°ã¯å…¨ã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã®ã§ã¯ãªãã€[null](../../sql-reference/data-types/nullable.md#finding-null)サブカラムã®ã¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚クエリ`SELECT n IS NOT NULL FROM table`ã¯`SELECT NOT n.null FROM TABLE`ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/sql-reference-links.json b/docs/ja/sql-reference/sql-reference-links.json new file mode 100644 index 00000000000..cd31c4fd53e --- /dev/null +++ b/docs/ja/sql-reference/sql-reference-links.json @@ -0,0 +1,12 @@ +[ + { + "title": "Statements", + "description": "A list of available SQL statements in ClickHouse", + "url": "/docs/ja/sql-reference/statements/" + }, + { + "title": "Database and Table Engines", + "description": "Engines determine where and how your data is stored", + "url": "/docs/ja/engines/table-engines" + } +] diff --git a/docs/ja/sql-reference/statements/_category_.yml b/docs/ja/sql-reference/statements/_category_.yml new file mode 100644 index 00000000000..6b7277a69ae --- /dev/null +++ b/docs/ja/sql-reference/statements/_category_.yml @@ -0,0 +1,7 @@ +position: 1 +label: 'Statements' +collapsible: true +collapsed: true +link: + type: doc + id: en/sql-reference/statements/index diff --git a/docs/ja/sql-reference/statements/alter/apply-deleted-mask.md b/docs/ja/sql-reference/statements/alter/apply-deleted-mask.md new file mode 100644 index 00000000000..5e115b1f406 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/apply-deleted-mask.md @@ -0,0 +1,22 @@ +--- +slug: /ja/sql-reference/statements/alter/apply-deleted-mask +sidebar_position: 46 +sidebar_label: APPLY DELETED MASK +--- + +# 削除ã•ã‚ŒãŸè¡Œã®ãƒžã‚¹ã‚¯ã‚’é©ç”¨ + +``` sql +ALTER TABLE [db].name [ON CLUSTER cluster] APPLY DELETED MASK [IN PARTITION partition_id] +``` + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€[è«–ç†å‰Šé™¤](/docs/ja/sql-reference/statements/delete)ã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸãƒžã‚¹ã‚¯ã‚’é©ç”¨ã—ã€å‰Šé™¤ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚ŒãŸè¡Œã‚’ディスクã‹ã‚‰å¼·åˆ¶çš„ã«å‰Šé™¤ã—ã¾ã™ã€‚ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯é‡é‡ç´šã®å¤‰æ›ã§ã‚ã‚Šã€ãã®æ„味論的ã«ã¯ã‚¯ã‚¨ãƒª ```ALTER TABLE [db].name DELETE WHERE _row_exists = 0``` ã«ç­‰ã—ã„ã§ã™ã€‚ + +:::note +ã“ã®æ©Ÿèƒ½ã¯ã€[`MergeTree`](../../../engines/table-engines/mergetree-family/mergetree.md) ファミリーã®ãƒ†ãƒ¼ãƒ–ル([レプリケーションã•ã‚ŒãŸ](../../../engines/table-engines/mergetree-family/replication.md)テーブルをå«ã‚€ï¼‰ã®ã¿ã§æ©Ÿèƒ½ã—ã¾ã™ã€‚ +::: + +**関連項目** + +- [è«–ç†å‰Šé™¤](/docs/ja/sql-reference/statements/delete) +- [物ç†å‰Šé™¤](/docs/ja/sql-reference/statements/alter/delete.md) diff --git a/docs/ja/sql-reference/statements/alter/column.md b/docs/ja/sql-reference/statements/alter/column.md new file mode 100644 index 00000000000..b42a42e2621 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/column.md @@ -0,0 +1,339 @@ +--- +slug: /ja/sql-reference/statements/alter/column +sidebar_position: 37 +sidebar_label: COLUMN +title: "カラムæ“作" +--- + +テーブル構造を変更ã™ã‚‹ãŸã‚ã®ä¸€é€£ã®ã‚¯ã‚¨ãƒªã€‚ + +構文: + +``` sql +ALTER [TEMPORARY] TABLE [db].name [ON CLUSTER cluster] ADD|DROP|RENAME|CLEAR|COMMENT|{MODIFY|ALTER}|MATERIALIZE COLUMN ... +``` + +クエリã§ã¯ã€ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã£ãŸã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®ãƒªã‚¹ãƒˆã‚’指定ã—ã¾ã™ã€‚ å„アクションã¯ã‚«ãƒ©ãƒ ã¸ã®æ“作ã§ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るアクションã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +- [ADD COLUMN](#add-column) — æ–°ã—ã„カラムをテーブルã«è¿½åŠ ã—ã¾ã™ã€‚ +- [DROP COLUMN](#drop-column) — カラムを削除ã—ã¾ã™ã€‚ +- [RENAME COLUMN](#rename-column) — 既存ã®ã‚«ãƒ©ãƒ ã®åå‰ã‚’変更ã—ã¾ã™ã€‚ +- [CLEAR COLUMN](#clear-column) — カラムã®å€¤ã‚’リセットã—ã¾ã™ã€‚ +- [COMMENT COLUMN](#comment-column) — カラムã«ãƒ†ã‚­ã‚¹ãƒˆã‚³ãƒ¡ãƒ³ãƒˆã‚’追加ã—ã¾ã™ã€‚ +- [MODIFY COLUMN](#modify-column) — カラムã®ã‚¿ã‚¤ãƒ—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¡¨ç¾ã€æœ‰åŠ¹æœŸé™ (TTL)ã€ã‚«ãƒ©ãƒ è¨­å®šã‚’変更ã—ã¾ã™ã€‚ +- [MODIFY COLUMN REMOVE](#modify-column-remove) — カラムã®ãƒ—ロパティã®ã†ã¡ã®1ã¤ã‚’削除ã—ã¾ã™ã€‚ +- [MODIFY COLUMN MODIFY SETTING](#modify-column-modify-setting) - カラム設定を変更ã—ã¾ã™ã€‚ +- [MODIFY COLUMN RESET SETTING](#modify-column-reset-setting) - カラム設定をリセットã—ã¾ã™ã€‚ +- [MATERIALIZE COLUMN](#materialize-column) — カラムãŒæ¬ è½ã—ã¦ã„る部分ã§ã‚«ãƒ©ãƒ ã‚’物ç†åŒ–ã—ã¾ã™ã€‚ +ã“れらã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã¯ã€ä»¥ä¸‹ã§è©³ã—ã説明ã—ã¾ã™ã€‚ + +## ADD COLUMN + +``` sql +ADD COLUMN [IF NOT EXISTS] name [type] [default_expr] [codec] [AFTER name_after | FIRST] +``` + +指定ã•ã‚ŒãŸ`name`ã€`type`ã€[`codec`](../create/table.md/#column_compression_codec)ã€ãŠã‚ˆã³`default_expr`ã§æ–°ã—ã„カラムをテーブルã«è¿½åŠ ã—ã¾ã™ï¼ˆ[デフォルト表ç¾](/docs/ja/sql-reference/statements/create/table.md/#create-default-values)ã‚’å‚照)。 + +`IF NOT EXISTS`å¥ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚«ãƒ©ãƒ ãŒã™ã§ã«å­˜åœ¨ã—ã¦ã„ã¦ã‚‚クエリã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã›ã‚“。`AFTER name_after`(他ã®ã‚«ãƒ©ãƒ ã®åå‰ï¼‰ã‚’指定ã—ãŸå ´åˆã€ãã®ã‚«ãƒ©ãƒ ã¯ãƒ†ãƒ¼ãƒ–ルカラムã®ãƒªã‚¹ãƒˆã«ãŠã‘る指定ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å¾Œã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚テーブルã®å…ˆé ­ã«ã‚«ãƒ©ãƒ ã‚’追加ã—ãŸã„å ´åˆã¯ã€`FIRST`å¥ã‚’使用ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€ã‚«ãƒ©ãƒ ã¯ãƒ†ãƒ¼ãƒ–ルã®æœ«å°¾ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚アクションã®ãƒã‚§ãƒ¼ãƒ³ã§ã¯ã€`name_after`ã¯å‰ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã§è¿½åŠ ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®åå‰ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +カラムを追加ã™ã‚‹ã“ã¨ã¯ã€ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ä½•ã‚‰ã‹ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¡Œã†ã“ã¨ãªãテーブル構造を変更ã™ã‚‹ã ã‘ã§ã™ã€‚`ALTER`ã®å¾Œã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ç¾ã‚Œã¾ã›ã‚“。テーブルã‹ã‚‰èª­ã¿è¾¼ã‚€éš›ã«ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ¼ã‚¿ãŒæ¬ è½ã—ã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼ˆã‚‚ã—ã‚ã‚Œã°ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¡¨ç¾ã®å®Ÿè¡Œã«ã‚ˆã£ã¦ã€ã¾ãŸã¯ã‚¼ãƒ­ã‚„空文字列を使用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ï¼‰ãŒåŸ‹ã‚è¾¼ã¾ã‚Œã¾ã™ã€‚ã“ã®ã‚«ãƒ©ãƒ ã¯ã€ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†ã‚’マージã—ãŸå¾Œã«ãƒ‡ã‚£ã‚¹ã‚¯ã«ç¾ã‚Œã¾ã™ï¼ˆ[MergeTree](/docs/ja/engines/table-engines/mergetree-family/mergetree.md)ã‚’å‚照)。 + +ã“ã®ã‚¢ãƒ—ローãƒã«ã‚ˆã‚Šã€`ALTER`クエリをå³åº§ã«å®Œäº†ã•ã›ã€å¤ã„データã®é‡ã‚’増やã•ãªã„よã†ã«ã—ã¦ã„ã¾ã™ã€‚ + +例: + +``` sql +ALTER TABLE alter_test ADD COLUMN Added1 UInt32 FIRST; +ALTER TABLE alter_test ADD COLUMN Added2 UInt32 AFTER NestedColumn; +ALTER TABLE alter_test ADD COLUMN Added3 UInt32 AFTER ToDrop; +DESC alter_test FORMAT TSV; +``` + +``` text +Added1 UInt32 +CounterID UInt32 +StartDate Date +UserID UInt32 +VisitID UInt32 +NestedColumn.A Array(UInt8) +NestedColumn.S Array(String) +Added2 UInt32 +ToDrop UInt32 +Added3 UInt32 +``` + +## DROP COLUMN + +``` sql +DROP COLUMN [IF EXISTS] name +``` + +`name`ã¨ã„ã†åå‰ã®ã‚«ãƒ©ãƒ ã‚’削除ã—ã¾ã™ã€‚`IF EXISTS`å¥ã‚’指定ã—ãŸå ´åˆã€ã‚«ãƒ©ãƒ ãŒå­˜åœ¨ã—ãªãã¦ã‚‚クエリã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã›ã‚“。 + +ファイルシステムã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚’丸ã”ã¨å‰Šé™¤ã™ã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªã¯ã»ã¼å³åº§ã«å®Œäº†ã—ã¾ã™ã€‚ + +:::tip +[Materialized View](/docs/ja/sql-reference/statements/create/view.md/#materialized)ã§å‚ç…§ã•ã‚Œã¦ã„るカラムã¯å‰Šé™¤ã§ãã¾ã›ã‚“。ãれ以外ã®å ´åˆã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ +::: + +例: + +``` sql +ALTER TABLE visits DROP COLUMN browser +``` + +## RENAME COLUMN + +``` sql +RENAME COLUMN [IF EXISTS] name to new_name +``` + +カラム`name`ã‚’`new_name`ã«åå‰å¤‰æ›´ã—ã¾ã™ã€‚`IF EXISTS`å¥ã‚’指定ã—ãŸå ´åˆã€ã‚«ãƒ©ãƒ ãŒå­˜åœ¨ã—ãªãã¦ã‚‚クエリã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã›ã‚“。åå‰å¤‰æ›´ã¯åŸºã¨ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã«å½±éŸ¿ã—ãªã„ãŸã‚ã€ã‚¯ã‚¨ãƒªã¯ã»ã¼å³åº§ã«å®Œäº†ã—ã¾ã™ã€‚ + +**注æ„**: テーブルã®ã‚­ãƒ¼è¡¨ç¾ã«æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ï¼ˆ`ORDER BY`ã¾ãŸã¯`PRIMARY KEY`ã§æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ï¼‰ã¯åå‰å¤‰æ›´ã§ãã¾ã›ã‚“。ã“れらã®ã‚«ãƒ©ãƒ ã‚’変更ã—よã†ã¨ã™ã‚‹ã¨ã€`SQL Error [524]`ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +例: + +``` sql +ALTER TABLE visits RENAME COLUMN webBrowser TO browser +``` + +## CLEAR COLUMN + +``` sql +CLEAR COLUMN [IF EXISTS] name IN PARTITION partition_name +``` + +指定ã•ã‚ŒãŸãƒ‘ーティションã®ã‚«ãƒ©ãƒ å†…ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’リセットã—ã¾ã™ã€‚[パーティション表ç¾ã®è¨­å®šæ–¹æ³•](../alter/partition.md/#how-to-set-partition-expression)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ãƒ‘ーティションåã®è¨­å®šã«ã¤ã„ã¦è©³ã—ã説明ã—ã¦ã„ã¾ã™ã€‚ + +`IF EXISTS`å¥ã‚’指定ã—ãŸå ´åˆã€ã‚«ãƒ©ãƒ ãŒå­˜åœ¨ã—ãªãã¦ã‚‚クエリã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã›ã‚“。 + +例: + +``` sql +ALTER TABLE visits CLEAR COLUMN browser IN PARTITION tuple() +``` + +## COMMENT COLUMN + +``` sql +COMMENT COLUMN [IF EXISTS] name 'テキストコメント' +``` + +カラムã«ã‚³ãƒ¡ãƒ³ãƒˆã‚’追加ã—ã¾ã™ã€‚`IF EXISTS`å¥ã‚’指定ã—ãŸå ´åˆã€ã‚«ãƒ©ãƒ ãŒå­˜åœ¨ã—ãªãã¦ã‚‚クエリã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã›ã‚“。 + +å„カラムã«ã¯1ã¤ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚カラムã«æ—¢ã«ã‚³ãƒ¡ãƒ³ãƒˆãŒå­˜åœ¨ã™ã‚‹å ´åˆã€æ–°ã—ã„コメントãŒä»¥å‰ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’上書ãã—ã¾ã™ã€‚ + +コメントã¯ã€[DESCRIBE TABLE](/docs/ja/sql-reference/statements/describe-table.md)クエリã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹`comment_expression`カラムã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +例: + +``` sql +ALTER TABLE visits COMMENT COLUMN browser 'This column shows the browser used for accessing the site.' +``` + +## MODIFY COLUMN + +``` sql +MODIFY COLUMN [IF EXISTS] name [type] [default_expr] [codec] [TTL] [settings] [AFTER name_after | FIRST] +ALTER COLUMN [IF EXISTS] name TYPE [type] [default_expr] [codec] [TTL] [settings] [AFTER name_after | FIRST] +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€`name`カラムã®ãƒ—ロパティを変更ã—ã¾ã™: + +- タイプ + +- ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¡¨ç¾ + +- 圧縮コーデック + +- æœ‰åŠ¹æœŸé™ (TTL) + +- カラムレベルã®è¨­å®š + +カラム圧縮コーデックã®å¤‰æ›´ä¾‹ã«ã¤ã„ã¦ã¯ã€[カラム圧縮コーデック](../create/table.md/#column_compression_codec)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +カラムTTLã®å¤‰æ›´ä¾‹ã«ã¤ã„ã¦ã¯ã€[カラムTTL](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#mergetree-column-ttl)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +カラムレベル設定ã®å¤‰æ›´ä¾‹ã«ã¤ã„ã¦ã¯ã€[カラムレベル設定](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#column-level-settings)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +`IF EXISTS`å¥ã‚’指定ã—ãŸå ´åˆã€ã‚«ãƒ©ãƒ ãŒå­˜åœ¨ã—ãªãã¦ã‚‚クエリã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã›ã‚“。 + +タイプを変更ã™ã‚‹éš›ã«ã¯ã€[toType](/docs/ja/sql-reference/functions/type-conversion-functions.md)関数ãŒé©ç”¨ã•ã‚ŒãŸã‹ã®ã‚ˆã†ã«å€¤ãŒå¤‰æ›ã•ã‚Œã¾ã™ã€‚デフォルト表ç¾ã®ã¿ã‚’変更ã™ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã¯è¤‡é›‘ãªæ“作を行ã‚ãšã€ã»ã¼å³åº§ã«å®Œäº†ã—ã¾ã™ã€‚ + +例: + +``` sql +ALTER TABLE visits MODIFY COLUMN browser Array(String) +``` + +カラムタイプã®å¤‰æ›´ã¯å”¯ä¸€ã®è¤‡é›‘ãªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã®å†…容を変更ã—ã¾ã™ã€‚大è¦æ¨¡ãªãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€ã“ã®æ“作ã«ã¯é•·æ™‚é–“ã‹ã‹ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +クエリã¯`FIRST | AFTER`å¥ã‚’使用ã—ã¦ã‚«ãƒ©ãƒ ã®é †åºã‚’変更ã™ã‚‹ã“ã¨ã‚‚ã§ãã€è©³ç´°ã¯[ADD COLUMN](#add-column)ã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。ãŸã ã—ã€ã“ã®å ´åˆã€ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã¯å¿…é ˆã§ã™ã€‚ + +例: + +```sql +CREATE TABLE users ( + c1 Int16, + c2 String +) ENGINE = MergeTree +ORDER BY c1; + +DESCRIBE users; +┌─name─┬─type───┬ +│ c1 │ Int16 │ +│ c2 │ String │ +└──────┴────────┴ + +ALTER TABLE users MODIFY COLUMN c2 String FIRST; + +DESCRIBE users; +┌─name─┬─type───┬ +│ c2 │ String │ +│ c1 │ Int16 │ +└──────┴────────┴ + +ALTER TABLE users ALTER COLUMN c2 TYPE String AFTER c1; + +DESCRIBE users; +┌─name─┬─type───┬ +│ c1 │ Int16 │ +│ c2 │ String │ +└──────┴────────┴ +``` + +`ALTER`クエリã¯åŽŸå­çš„ã§ã™ã€‚MergeTreeテーブルã«å¯¾ã—ã¦ã‚‚ロックフリーã§ã™ã€‚ + +カラムを変更ã™ã‚‹ãŸã‚ã®`ALTER`クエリã¯ãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚指示ã¯ZooKeeperã«ä¿å­˜ã•ã‚Œã€ãã®å¾Œå„レプリカãŒãれをé©ç”¨ã—ã¾ã™ã€‚ã™ã¹ã¦ã®`ALTER`クエリã¯åŒã˜é †åºã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚クエリã¯ã€ä»–ã®ãƒ¬ãƒ—リカ上ã§é©åˆ‡ãªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ã¡ã¾ã™ã€‚ã—ã‹ã—ã€ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã§ã‚«ãƒ©ãƒ ã‚’変更ã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã¯ä¸­æ–­å¯èƒ½ã§ã€ã™ã¹ã¦ã®æ“作ã¯éžåŒæœŸã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +## MODIFY COLUMN REMOVE + +カラムã®ãƒ—ロパティã®ã†ã¡ã®1ã¤ã‚’削除ã—ã¾ã™: `DEFAULT`, `ALIAS`, `MATERIALIZED`, `CODEC`, `COMMENT`, `TTL`, `SETTINGS`. + +構文: + +```sql +ALTER TABLE table_name MODIFY COLUMN column_name REMOVE property; +``` + +**例** + +TTLã®å‰Šé™¤: + +```sql +ALTER TABLE table_with_ttl MODIFY COLUMN column_ttl REMOVE TTL; +``` + +**関連項目** + +- [REMOVE TTL](ttl.md). + +## MODIFY COLUMN MODIFY SETTING + +カラム設定を変更ã—ã¾ã™ã€‚ + +構文: + +```sql +ALTER TABLE table_name MODIFY COLUMN column_name MODIFY SETTING name=value,...; +``` + +**例** + +カラムã®`max_compress_block_size`ã‚’`1MB`ã«å¤‰æ›´: + +```sql +ALTER TABLE table_name MODIFY COLUMN column_name MODIFY SETTING max_compress_block_size = 1048576; +``` + +## MODIFY COLUMN RESET SETTING + +カラム設定をリセットã—ã€ãƒ†ãƒ¼ãƒ–ルã®CREATEクエリã®ã‚«ãƒ©ãƒ å¼ã«å®£è¨€ã•ã‚Œã¦ã„る設定を削除ã—ã¾ã™ã€‚ + +構文: + +```sql +ALTER TABLE table_name MODIFY COLUMN column_name RESET SETTING name,...; +``` + +**例** + +カラム設定`max_compress_block_size`をデフォルト値ã«ãƒªã‚»ãƒƒãƒˆ: + +```sql +ALTER TABLE table_name MODIFY COLUMN column_name RESET SETTING max_compress_block_size; +``` + +## MATERIALIZE COLUMN + +`DEFAULT`ã¾ãŸã¯`MATERIALIZED`値表ç¾ã‚’æŒã¤ã‚«ãƒ©ãƒ ã‚’物ç†åŒ–ã—ã¾ã™ã€‚`ALTER TABLE table_name ADD COLUMN column_name MATERIALIZED`を使用ã—ã¦ç‰©ç†åŒ–ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã‚’追加ã™ã‚‹éš›ã€æ—¢å­˜ã®è¡Œã«ç‰©ç†åŒ–ã•ã‚ŒãŸå€¤ãŒè‡ªå‹•çš„ã«åŸ‹ã‚è¾¼ã¾ã‚Œã¾ã›ã‚“。`MATERIALIZE COLUMN`æ–‡ã¯ã€`DEFAULT`ã¾ãŸã¯`MATERIALIZED`表ç¾ãŒè¿½åŠ ã¾ãŸã¯æ›´æ–°ã•ã‚ŒãŸå¾Œã«æ—¢å­˜ã®ã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ã‚’書ãæ›ãˆã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ï¼ˆæ—¢å­˜ã®ãƒ‡ãƒ¼ã‚¿ã‚’変更ã™ã‚‹ã“ã¨ãªãメタデータã®ã¿ã‚’æ›´æ–°ã—ã¾ã™ï¼‰ã€‚ +ã“ã‚Œã¯[mutation](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +æ–°ã—ã追加ã¾ãŸã¯æ›´æ–°ã•ã‚ŒãŸ`MATERIALIZED`値表ç¾ã‚’æŒã¤ã‚«ãƒ©ãƒ ã®å ´åˆã€ã™ã¹ã¦ã®æ—¢å­˜è¡ŒãŒæ›¸ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +æ–°ã—ã追加ã¾ãŸã¯æ›´æ–°ã•ã‚ŒãŸ`DEFAULT`値表ç¾ã‚’æŒã¤ã‚«ãƒ©ãƒ ã®å ´åˆã€æŒ™å‹•ã¯ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ä¾å­˜ã—ã¾ã™: +- ClickHouse < v24.2ã§ã¯ã€ã™ã¹ã¦ã®æ—¢å­˜è¡ŒãŒæ›¸ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ +- ClickHouse >= v24.2ã§ã¯ã€ã‚¯ãƒªãƒƒã‚¯ãƒã‚¦ã‚¹ãŒæŒ¿å…¥æ™‚ã«è¡Œã®å€¤ãŒæ˜Žç¤ºçš„ã«æŒ‡å®šã•ã‚ŒãŸã‹ã€ã¾ãŸã¯`DEFAULT`値表ç¾ã‹ã‚‰è¨ˆç®—ã•ã‚ŒãŸã‹ã‚’区別ã—ã¾ã™ã€‚値ãŒæ˜Žç¤ºçš„ã«æŒ‡å®šã•ã‚ŒãŸå ´åˆã€ClickHouseã¯ãã®ã¾ã¾ä¿æŒã—ã¾ã™ã€‚計算ã•ã‚ŒãŸå ´åˆã€æ–°ã—ã追加ã¾ãŸã¯æ›´æ–°ã•ã‚ŒãŸ`MATERIALIZED`値表ç¾ã«å¤‰æ›´ã—ã¾ã™ã€‚ + +構文: + +```sql +ALTER TABLE [db.]table [ON CLUSTER cluster] MATERIALIZE COLUMN col [IN PARTITION partition | IN PARTITION ID 'partition_id']; +``` +- パーティションを指定ã—ãŸå ´åˆã€ãã®ãƒ‘ーティションã®ã¿ãŒç‰©ç†åŒ–ã•ã‚Œã¾ã™ã€‚ + +**例** + +```sql +DROP TABLE IF EXISTS tmp; +SET mutations_sync = 2; +CREATE TABLE tmp (x Int64) ENGINE = MergeTree() ORDER BY tuple() PARTITION BY tuple(); +INSERT INTO tmp SELECT * FROM system.numbers LIMIT 5; +ALTER TABLE tmp ADD COLUMN s String MATERIALIZED toString(x); + +ALTER TABLE tmp MATERIALIZE COLUMN s; + +SELECT groupArray(x), groupArray(s) FROM (select x,s from tmp order by x); + +┌─groupArray(x)─┬─groupArray(s)─────────┠+│ [0,1,2,3,4] │ ['0','1','2','3','4'] │ +└───────────────┴───────────────────────┘ + +ALTER TABLE tmp MODIFY COLUMN s String MATERIALIZED toString(round(100/x)); + +INSERT INTO tmp SELECT * FROM system.numbers LIMIT 5,5; + +SELECT groupArray(x), groupArray(s) FROM tmp; + +┌─groupArray(x)─────────┬─groupArray(s)──────────────────────────────────┠+│ [0,1,2,3,4,5,6,7,8,9] │ ['0','1','2','3','4','20','17','14','12','11'] │ +└───────────────────────┴────────────────────────────────────────────────┘ + +ALTER TABLE tmp MATERIALIZE COLUMN s; + +SELECT groupArray(x), groupArray(s) FROM tmp; + +┌─groupArray(x)─────────┬─groupArray(s)─────────────────────────────────────────┠+│ [0,1,2,3,4,5,6,7,8,9] │ ['inf','100','50','33','25','20','17','14','12','11'] │ +└───────────────────────┴───────────────────────────────────────────────────────┘ +``` + +**関連項目** + +- [MATERIALIZED](/docs/ja/sql-reference/statements/create/table.md/#materialized). + +## 制é™äº‹é … + +`ALTER`クエリã¯ã€ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ å†…ã®å€‹ã€…ã®è¦ç´ ï¼ˆã‚«ãƒ©ãƒ ï¼‰ã‚’作æˆãŠã‚ˆã³å‰Šé™¤ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ãŒã€å…¨ä½“ã®ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚’æ“作ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã‚’追加ã™ã‚‹ã«ã¯ã€`name.nested_name`ã®ã‚ˆã†ãªåå‰ã¨`Array(T)`タイプã§ã‚«ãƒ©ãƒ ã‚’追加ã§ãã¾ã™ã€‚ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã¯ã€ãƒ‰ãƒƒãƒˆã®å‰ã«åŒã˜ãƒ—レフィックスをæŒã¤è¤‡æ•°ã®é…列カラムã¨ç­‰ä¾¡ã§ã™ã€‚ + +主キーやサンプリングキー(`ENGINE`å¼ã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ï¼‰ã®ã‚«ãƒ©ãƒ ã‚’削除ã™ã‚‹ã‚µãƒãƒ¼ãƒˆã¯ã‚ã‚Šã¾ã›ã‚“。主キーã«å«ã¾ã‚Œã‚‹ã‚«ãƒ©ãƒ ã®ã‚¿ã‚¤ãƒ—を変更ã™ã‚‹ã®ã¯ã€ã“ã®å¤‰æ›´ãŒãƒ‡ãƒ¼ã‚¿ã‚’変更ã—ãªã„å ´åˆã«é™ã‚Šå¯èƒ½ã§ã™ï¼ˆä¾‹ãˆã°ã€Enumã®å€¤ã‚’追加ã—ãŸã‚Šã€`DateTime`ã‹ã‚‰`UInt32`ã«åž‹ã‚’変更ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ï¼‰ã€‚ + +`ALTER`クエリã§å¿…è¦ãªãƒ†ãƒ¼ãƒ–ル変更ãŒå分ã§ãªã„å ´åˆã€æ–°ã—ã„テーブルを作æˆã—ã€[INSERT SELECT](/docs/ja/sql-reference/statements/insert-into.md/#inserting-the-results-of-select)クエリを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’コピーã—ã€[RENAME](/docs/ja/sql-reference/statements/rename.md/#rename-table)クエリを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを切り替ãˆã€å¤ã„テーブルを削除ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`ALTER`クエリã¯ãƒ†ãƒ¼ãƒ–ルã®ã™ã¹ã¦ã®èª­ã¿å–ã‚ŠãŠã‚ˆã³æ›¸ãè¾¼ã¿ã‚’ブロックã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€`ALTER`クエリã®æ™‚ã«é•·æ™‚é–“ã®`SELECT`ãŒå®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹å ´åˆã€`ALTER`クエリã¯å®Œäº†ã‚’å¾…ã¡ã¾ã™ã€‚åŒæ™‚ã«ã€åŒã˜ãƒ†ãƒ¼ãƒ–ルã¸ã®ã™ã¹ã¦ã®æ–°ã—ã„クエリã¯`ALTER`ãŒå®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹é–“ã€å¾…æ©Ÿã—ã¾ã™ã€‚ + +データを自体ã§ä¿å­˜ã—ã¦ã„ãªã„テーブル(例ãˆã°[Merge](/docs/ja/sql-reference/statements/alter/index.md) ã‚„ [分散テーブル](/docs/ja/sql-reference/statements/alter/index.md)ãªã©ï¼‰ã«å¯¾ã™ã‚‹`ALTER`ã¯å˜ã«ãƒ†ãƒ¼ãƒ–ル構造を変更ã™ã‚‹ã ã‘ã§ã‚ã‚Šã€å¾“属ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã‚’変更ã—ã¾ã›ã‚“。例ãˆã°ã€`分散テーブル`ã«å¯¾ã—ã¦`ALTER`を実行ã™ã‚‹å ´åˆã€ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ä¸Šã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ã‚‚`ALTER`を実行ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/alter/comment.md b/docs/ja/sql-reference/statements/alter/comment.md new file mode 100644 index 00000000000..eeb8e2c4b9e --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/comment.md @@ -0,0 +1,65 @@ +--- +slug: /ja/sql-reference/statements/alter/comment +sidebar_position: 51 +sidebar_label: COMMENT +--- + +# ALTER TABLE ... MODIFY COMMENT + +コメントãŒè¨­å®šã•ã‚Œã¦ã„ãŸã‹ã©ã†ã‹ã«é–¢ã‚らãšã€ãƒ†ãƒ¼ãƒ–ルã«ã‚³ãƒ¡ãƒ³ãƒˆã‚’追加ã€ä¿®æ­£ã€ã¾ãŸã¯å‰Šé™¤ã—ã¾ã™ã€‚コメントã®å¤‰æ›´ã¯ã€[system.tables](../../../operations/system-tables/tables.md)ã¨`SHOW CREATE TABLE`クエリã®ä¸¡æ–¹ã§å映ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +ALTER TABLE [db].name [ON CLUSTER cluster] MODIFY COMMENT 'Comment' +``` + +**例** + +コメント付ãã®ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ï¼ˆè©³ç´°ã¯[COMMENT](../../../sql-reference/statements/create/table.md#comment-table)å¥ã‚’å‚照): + +``` sql +CREATE TABLE table_with_comment +( + `k` UInt64, + `s` String +) +ENGINE = Memory() +COMMENT 'The temporary table'; +``` + +テーブルコメントを修正ã™ã‚‹: + +``` sql +ALTER TABLE table_with_comment MODIFY COMMENT 'new comment on a table'; +SELECT comment FROM system.tables WHERE database = currentDatabase() AND name = 'table_with_comment'; +``` + +æ–°ã—ã„コメントã®å‡ºåŠ›: + +```text +┌─comment────────────────┠+│ new comment on a table │ +└────────────────────────┘ +``` + +テーブルコメントを削除ã™ã‚‹: + +``` sql +ALTER TABLE table_with_comment MODIFY COMMENT ''; +SELECT comment FROM system.tables WHERE database = currentDatabase() AND name = 'table_with_comment'; +``` + +削除ã•ã‚ŒãŸã‚³ãƒ¡ãƒ³ãƒˆã®å‡ºåŠ›: + +```text +┌─comment─┠+│ │ +└─────────┘ +``` + +**注æ„点** + +Replicated テーブルã®å ´åˆã€ã‚³ãƒ¡ãƒ³ãƒˆã¯ç•°ãªã‚‹ãƒ¬ãƒ—リカã§ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚コメントã®ä¿®æ­£ã¯å˜ä¸€ã®ãƒ¬ãƒ—リカã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã¯ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 23.9 以é™ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚以å‰ã® ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯å‹•ä½œã—ã¾ã›ã‚“。 diff --git a/docs/ja/sql-reference/statements/alter/constraint.md b/docs/ja/sql-reference/statements/alter/constraint.md new file mode 100644 index 00000000000..56d42ab74b1 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/constraint.md @@ -0,0 +1,24 @@ +--- +slug: /ja/sql-reference/statements/alter/constraint +sidebar_position: 43 +sidebar_label: CONSTRAINT +--- + +# Constraintã®æ“作 + +制約ã¯æ¬¡ã®æ§‹æ–‡ã‚’使用ã—ã¦è¿½åŠ ã¾ãŸã¯å‰Šé™¤ã§ãã¾ã™ã€‚ + +``` sql +ALTER TABLE [db].name [ON CLUSTER cluster] ADD CONSTRAINT [IF NOT EXISTS] constraint_name CHECK expression; +ALTER TABLE [db].name [ON CLUSTER cluster] DROP CONSTRAINT [IF EXISTS] constraint_name; +``` + +詳細ã¯[制約](../../../sql-reference/statements/create/table.md#constraints)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +クエリã¯ãƒ†ãƒ¼ãƒ–ルã®åˆ¶ç´„ã«é–¢ã™ã‚‹ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’追加ã¾ãŸã¯å‰Šé™¤ã—ã¾ã™ã®ã§ã€ãれらã¯å³åº§ã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +:::tip +制約ãƒã‚§ãƒƒã‚¯ã¯ã€è¿½åŠ ã•ã‚ŒãŸå ´åˆã§ã‚‚**既存ã®ãƒ‡ãƒ¼ã‚¿ã«ã¯å®Ÿè¡Œã•ã‚Œã¾ã›ã‚“**。 +::: + +レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹ã™ã¹ã¦ã®å¤‰æ›´ã¯ZooKeeperã«é€šçŸ¥ã•ã‚Œã€ä»–ã®ãƒ¬ãƒ—リカã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/alter/delete.md b/docs/ja/sql-reference/statements/alter/delete.md new file mode 100644 index 00000000000..2365e3ce4b3 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/delete.md @@ -0,0 +1,33 @@ +--- +slug: /ja/sql-reference/statements/alter/delete +sidebar_position: 39 +sidebar_label: DELETE +--- + +# ALTER TABLE ... DELETE ステートメント + +``` sql +ALTER TABLE [db.]table [ON CLUSTER cluster] DELETE WHERE filter_expr +``` + +指定ã•ã‚ŒãŸãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°å¼ã«ä¸€è‡´ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚ã“ã‚Œã¯[ミューテーション](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +:::note +`ALTER TABLE` プレフィックスã¯ã€SQLをサãƒãƒ¼ãƒˆã™ã‚‹ä»–ã®å¤šãã®ã‚·ã‚¹ãƒ†ãƒ ã¨ã“ã®æ§‹æ–‡ã‚’ç•°ãªã‚‰ã›ã¾ã™ã€‚ã“ã‚Œã¯ã€OLTPデータベースã®é¡žä¼¼ã®ã‚¯ã‚¨ãƒªã¨ã¯ç•°ãªã‚Šã€é »ç¹ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’æ„図ã—ã¦ã„ãªã„é‡ã„æ“作ã§ã‚ã‚‹ã“ã¨ã‚’示ã™ãŸã‚ã§ã™ã€‚`ALTER TABLE` ã¯ã€åŸºç¤Žãƒ‡ãƒ¼ã‚¿ãŒå‰Šé™¤ã•ã‚Œã‚‹å‰ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚‹é‡ã„æ“作ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚MergeTree テーブルã®å ´åˆã¯ã€è«–ç†å‰Šé™¤ã‚’è¡Œã„ã€ã‹ãªã‚Šé€Ÿãæ“作ã§ãã‚‹ [`DELETE FROM` クエリ](/docs/ja/sql-reference/statements/delete.md) ã®ä½¿ç”¨ã‚’検討ã—ã¦ãã ã•ã„。 +::: + +`filter_expr` 㯠`UInt8` åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å¼ãŒã‚¼ãƒ­ä»¥å¤–ã®å€¤ã‚’å–るテーブルã®è¡Œã‚’削除ã—ã¾ã™ã€‚ + +1ã¤ã®ã‚¯ã‚¨ãƒªã«ã¯ã€ã‚³ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚ŒãŸè¤‡æ•°ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +クエリ処ç†ã®åŒæœŸæ€§ã¯ã€[mutations_sync](/docs/ja/operations/settings/settings.md/#mutations_sync) 設定ã«ã‚ˆã£ã¦å®šç¾©ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯éžåŒæœŸã§ã™ã€‚ + +**関連情報** + +- [ミューテーション](/docs/ja/sql-reference/statements/alter/index.md#mutations) +- [ALTER クエリã®åŒæœŸæ€§](/docs/ja/sql-reference/statements/alter/index.md#synchronicity-of-alter-queries) +- [mutations_sync](/docs/ja/operations/settings/settings.md/#mutations_sync) 設定 + +## 関連コンテンツ + +- ブログ: [Handling Updates and Deletes in ClickHouse](https://clickhouse.com/blog/handling-updates-and-deletes-in-clickhouse) diff --git a/docs/ja/sql-reference/statements/alter/index.md b/docs/ja/sql-reference/statements/alter/index.md new file mode 100644 index 00000000000..ff40cadbd41 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/index.md @@ -0,0 +1,71 @@ +--- +slug: /ja/sql-reference/statements/alter/ +sidebar_position: 35 +sidebar_label: ALTER +--- + +# ALTER + +ã»ã¨ã‚“ã©ã®`ALTER TABLE`クエリã¯ãƒ†ãƒ¼ãƒ–ルã®è¨­å®šã‚„データを変更ã—ã¾ã™: + +- [カラム](/docs/ja/sql-reference/statements/alter/column.md) +- [パーティション](/docs/ja/sql-reference/statements/alter/partition.md) +- [DELETE](/docs/ja/sql-reference/statements/alter/delete.md) +- [UPDATE](/docs/ja/sql-reference/statements/alter/update.md) +- [ORDER BY](/docs/ja/sql-reference/statements/alter/order-by.md) +- [インデックス](/docs/ja/sql-reference/statements/alter/skipping-index.md) +- [制約](/docs/ja/sql-reference/statements/alter/constraint.md) +- [æœ‰åŠ¹æœŸé™ (TTL)](/docs/ja/sql-reference/statements/alter/ttl.md) +- [統計](/docs/ja/sql-reference/statements/alter/statistics.md) +- [DELETED MASKã®é©ç”¨](/docs/ja/sql-reference/statements/alter/apply-deleted-mask.md) + +:::note +ã»ã¨ã‚“ã©ã®`ALTER TABLE`クエリã¯ã€[\*MergeTree](/docs/ja/engines/table-engines/mergetree-family/index.md)テーブルã€[Merge](/docs/ja/engines/table-engines/special/merge.md)ãŠã‚ˆã³[分散テーブル](/docs/ja/engines/table-engines/special/distributed.md)ã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +ã“れらã®`ALTER`ステートメントã¯ãƒ“ューをæ“作ã—ã¾ã™ï¼š + +- [ALTER TABLE ... MODIFY QUERY](/docs/ja/sql-reference/statements/alter/view.md) — [Materialized View](/docs/ja/sql-reference/statements/create/view.md/#materialized)構造を変更ã—ã¾ã™ã€‚ +- [ALTER LIVE VIEW](/docs/ja/sql-reference/statements/alter/view.md/#alter-live-view) — [Live View](/docs/ja/sql-reference/statements/create/view.md/#live-view)ã‚’æ›´æ–°ã—ã¾ã™ã€‚ + +ã“れらã®`ALTER`ステートメントã¯ã€ãƒ­ãƒ¼ãƒ«ãƒ™ãƒ¼ã‚¹ã®ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã«é–¢é€£ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’修正ã—ã¾ã™ï¼š + +- [USER](/docs/ja/sql-reference/statements/alter/user.md) +- [ROLE](/docs/ja/sql-reference/statements/alter/role.md) +- [QUOTA](/docs/ja/sql-reference/statements/alter/quota.md) +- [è¡Œã®ãƒãƒªã‚·ãƒ¼](/docs/ja/sql-reference/statements/alter/row-policy.md) +- [設定プロファイル](/docs/ja/sql-reference/statements/alter/settings-profile.md) + +[ALTER TABLE ... MODIFY COMMENT](/docs/ja/sql-reference/statements/alter/comment.md)ステートメントã¯ã€ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—コメントを追加ã€ä¿®æ­£ã€ã¾ãŸã¯å‰Šé™¤ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ä»¥å‰ã«è¨­å®šã•ã‚Œã¦ã„ãŸã‹ã©ã†ã‹ã«é–¢ä¿‚ãªãè¡Œã‚ã‚Œã¾ã™ã€‚ + +[ALTER NAMED COLLECTION](/docs/ja/sql-reference/statements/alter/named-collection.md)ステートメントã¯[Named Collections](/docs/ja/operations/named-collections.md)を修正ã—ã¾ã™ã€‚ + +## 変異(Mutations) + +テーブルデータをæ“作ã™ã‚‹ã“ã¨ã‚’æ„図ã—ãŸ`ALTER`クエリã¯ã€ã€Œå¤‰ç•°ã€ã¨å‘¼ã°ã‚Œã‚‹ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã§å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚代表的ãªã‚‚ã®ã«ã€[ALTER TABLE ... DELETE](/docs/ja/sql-reference/statements/alter/delete.md)ã‚„[ALTER TABLE ... UPDATE](/docs/ja/sql-reference/statements/alter/update.md)ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã¯[MergeTree](/docs/ja/engines/table-engines/mergetree-family/index.md)テーブルã®ãƒžãƒ¼ã‚¸ã«ä¼¼ãŸéžåŒæœŸã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセスã§ã€æ–°ã—ã„「変化ã—ãŸã€ãƒ‘ーツã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’生æˆã—ã¾ã™ã€‚ + +`*MergeTree`テーブルã§ã¯ã€å¤‰ç•°ã¯**データ全体ã®ãƒ‘ーツを書ãæ›ãˆã‚‹ã“ã¨**ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚アトミシティã¯ãªãã€ãƒ‘ーツã¯å¤‰ç•°ã•ã‚ŒãŸéƒ¨åˆ†ãŒæº–å‚™ãŒã§ã次第ã€å…¥ã‚Œæ›¿ãˆã‚‰ã‚Œã€å¤‰ç•°ä¸­ã«é–‹å§‹ã•ã‚ŒãŸ`SELECT`クエリã¯æ—¢ã«å¤‰ç•°ã•ã‚ŒãŸãƒ‘ーツã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã¨ã€ã¾ã å¤‰ç•°ã•ã‚Œã¦ã„ãªã„パーツã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®ä¸¡æ–¹ã‚’å‚ç…§ã—ã¾ã™ã€‚ + +変異ã¯ãã®ä½œæˆé †ã«å®Œå…¨ã«é †åºä»˜ã‘られã€ãã®é †ã§å„パーツã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ã¾ãŸã€å¤‰ç•°ã¯`INSERT INTO`クエリã¨éƒ¨åˆ†çš„ã«é †åºä»˜ã‘られã¾ã™ï¼šå¤‰ç•°ãŒæ出ã•ã‚Œã‚‹å‰ã«ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯å¤‰ç•°ã•ã‚Œã€å¾Œã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯å¤‰ç•°ã•ã‚Œã¾ã›ã‚“。ãªãŠã€å¤‰ç•°ã¯ã‚¤ãƒ³ã‚µãƒ¼ãƒˆã‚’一切ブロックã—ã¾ã›ã‚“。 + +変異クエリã¯ã€å¤‰ç•°ã‚¨ãƒ³ãƒˆãƒªãŒè¿½åŠ ã•ã‚Œã‚‹ã¨ã™ãã«ï¼ˆãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®å ´åˆã¯ZooKeeperã€éžãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®å ´åˆã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ï¼‰å¿œç­”ã‚’è¿”ã—ã¾ã™ã€‚変異自体ã¯ã‚·ã‚¹ãƒ†ãƒ ã®ãƒ—ロファイル設定を使用ã—ã¦éžåŒæœŸã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚変異ã®é€²è¡ŒçŠ¶æ³ã‚’追跡ã™ã‚‹ãŸã‚ã«ã¯ã€[`system.mutations`](/docs/ja/operations/system-tables/mutations.md/#system_tables-mutations)テーブルを使用ã§ãã¾ã™ã€‚正常ã«æ出ã•ã‚ŒãŸå¤‰ç•°ã¯ã€ClickHouseサーãƒãƒ¼ãŒå†èµ·å‹•ã•ã‚Œã¦ã‚‚実行を続ã‘ã¾ã™ã€‚変異ãŒä¸€åº¦æ出ã•ã‚Œã‚‹ã¨å·»ã戻ã™æ–¹æ³•ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€ä½•ã‚‰ã‹ã®ç†ç”±ã§å¤‰ç•°ãŒè©°ã¾ã£ãŸå ´åˆã¯ã€[`KILL MUTATION`](/docs/ja/sql-reference/statements/kill.md/#kill-mutation)クエリã§ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã§ãã¾ã™ã€‚ + +終了ã—ãŸå¤‰ç•°ã®ã‚¨ãƒ³ãƒˆãƒªã¯ã™ãã«å‰Šé™¤ã•ã‚Œã‚‹ã“ã¨ã¯ãªãã€ä¿å­˜ã•ã‚Œã‚‹ã‚¨ãƒ³ãƒˆãƒªæ•°ã¯`finished_mutations_to_keep`ストレージエンジンパラメータã§æ±ºå®šã•ã‚Œã¾ã™ã€‚å¤ã„変異エントリã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +## ALTERクエリã®åŒæœŸæ€§ï¼ˆSynchronicity) + +éžãƒ¬ãƒ—リケートテーブルã§ã¯ã€ã™ã¹ã¦ã®`ALTER`クエリã¯åŒæœŸçš„ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚レプリケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã§ã¯ã€ã‚¯ã‚¨ãƒªã¯é©åˆ‡ãªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«å¯¾ã™ã‚‹æŒ‡ç¤ºã‚’`ZooKeeper`ã«è¿½åŠ ã™ã‚‹ã ã‘ã§ã€ãã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³è‡ªä½“ã¯ã§ãã‚‹ã ã‘æ—©ã実行ã•ã‚Œã¾ã™ã€‚ãŸã ã—ã€ã‚¯ã‚¨ãƒªã¯ã“れらã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§å®Œäº†ã™ã‚‹ã®ã‚’å¾…ã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +変異を作æˆã™ã‚‹`ALTER`クエリ(例:`UPDATE`ã€`DELETE`ã€`MATERIALIZE INDEX`ã€`MATERIALIZE PROJECTION`ã€`MATERIALIZE COLUMN`ã€`APPLY DELETED MASK`ã€`CLEAR STATISTIC`ã€`MATERIALIZE STATISTIC`ã‚’å«ã‚€ãŒã“ã‚Œã«é™å®šã•ã‚Œãªã„)ã®åŒæœŸæ€§ã¯ã€[mutations_sync](/docs/ja/operations/settings/settings.md/#mutations_sync)設定ã§å®šç¾©ã•ã‚Œã¾ã™ã€‚ + +メタデータã®ã¿ã‚’修正ã™ã‚‹ãã®ä»–ã®`ALTER`クエリã«ã¤ã„ã¦ã¯ã€[alter_sync](/docs/ja/operations/settings/settings.md/#alter-sync)設定を使用ã—ã¦å¾…機を設定ã§ãã¾ã™ã€‚ + +éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リカãŒã™ã¹ã¦ã®`ALTER`クエリを実行ã™ã‚‹ã®ã‚’å¾…æ©Ÿã™ã‚‹æ™‚間(秒)を指定ã™ã‚‹ã«ã¯ã€[replication_wait_for_inactive_replica_timeout](/docs/ja/operations/settings/settings.md/#replication-wait-for-inactive-replica-timeout)設定を使用ã§ãã¾ã™ã€‚ + +:::note +ã™ã¹ã¦ã®`ALTER`クエリã§ã€`alter_sync = 2`ã‹ã¤`replication_wait_for_inactive_replica_timeout`設定ã§æŒ‡å®šã•ã‚ŒãŸæ™‚間を超ãˆã¦éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リカãŒã‚ã‚‹å ´åˆã€ä¾‹å¤–`UNFINISHED`ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ +::: + +## 関連コンテンツ + +- ブログ: [ClickHouseã«ãŠã‘ã‚‹æ›´æ–°ã¨å‰Šé™¤ã®å‡¦ç†](https://clickhouse.com/blog/handling-updates-and-deletes-in-clickhouse) diff --git a/docs/ja/sql-reference/statements/alter/named-collection.md b/docs/ja/sql-reference/statements/alter/named-collection.md new file mode 100644 index 00000000000..1a0f63acd34 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/named-collection.md @@ -0,0 +1,34 @@ +--- +slug: /ja/sql-reference/statements/alter/named-collection +sidebar_label: NAMED COLLECTION +--- + +import CloudNotSupportedBadge from '@theme/badges/CloudNotSupportedBadge'; + + + +# ALTER NAMED COLLECTION + +ã“ã®ã‚¯ã‚¨ãƒªã¯æ—¢å­˜ã®åå‰ä»˜ãコレクションを変更ã™ã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +ALTER NAMED COLLECTION [IF EXISTS] name [ON CLUSTER cluster] +[ SET +key_name1 = 'some value' [[NOT] OVERRIDABLE], +key_name2 = 'some value' [[NOT] OVERRIDABLE], +key_name3 = 'some value' [[NOT] OVERRIDABLE], +... ] | +[ DELETE key_name4, key_name5, ... ] +``` + +**例** + +```sql +CREATE NAMED COLLECTION foobar AS a = '1' NOT OVERRIDABLE, b = '2'; + +ALTER NAMED COLLECTION foobar SET a = '2' OVERRIDABLE, c = '3'; + +ALTER NAMED COLLECTION foobar DELETE b; +``` diff --git a/docs/ja/sql-reference/statements/alter/order-by.md b/docs/ja/sql-reference/statements/alter/order-by.md new file mode 100644 index 00000000000..a24756cea13 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/order-by.md @@ -0,0 +1,19 @@ +--- +slug: /ja/sql-reference/statements/alter/order-by +sidebar_position: 41 +sidebar_label: ORDER BY +--- + +# キーå¼ã®æ“作 + +``` sql +ALTER TABLE [db].name [ON CLUSTER cluster] MODIFY ORDER BY new_expression +``` + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®[ソートキー](../../../engines/table-engines/mergetree-family/mergetree.md)ã‚’`new_expression`(å¼ã¾ãŸã¯å¼ã®ã‚¿ãƒ—ル)ã«å¤‰æ›´ã—ã¾ã™ã€‚主キーã¯åŒã˜ã¾ã¾ã§ã™ã€‚ + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯è»½é‡ã§ã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’変更ã—ã¾ã™ã€‚データ部分ã®è¡ŒãŒã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã®å¼ã§æ•´åˆ—ã•ã‚Œã‚‹ã¨ã„ã†ç‰¹æ€§ã‚’ä¿æŒã™ã‚‹ãŸã‚ã«ã€æ—¢å­˜ã®ã‚«ãƒ©ãƒ ã‚’å«ã‚€å¼ã‚’ソートキーã«è¿½åŠ ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“(デフォルトã®ã‚«ãƒ©ãƒ å€¤ãªã—ã§ã€åŒã˜`ALTER`クエリ内ã§`ADD COLUMN`コマンドã«ã‚ˆã£ã¦è¿½åŠ ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®ã¿ï¼‰ã€‚ + +:::note +ã“ã‚Œã¯[`MergeTree`](../../../engines/table-engines/mergetree-family/mergetree.md)ファミリーã®ãƒ†ãƒ¼ãƒ–ル([レプリケーション](../../../engines/table-engines/mergetree-family/replication.md)ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルをå«ã‚€ï¼‰ã§ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ +::: diff --git a/docs/ja/sql-reference/statements/alter/partition.md b/docs/ja/sql-reference/statements/alter/partition.md new file mode 100644 index 00000000000..54f5a67471d --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/partition.md @@ -0,0 +1,362 @@ +--- +slug: /ja/sql-reference/statements/alter/partition +sidebar_position: 38 +sidebar_label: PARTITION +title: "パーティションã¨ãƒ‘ーツã®æ“作" +--- + +[パーティション](/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key.md)ã«å¯¾ã™ã‚‹ä»¥ä¸‹ã®æ“作ãŒå¯èƒ½ã§ã™ï¼š + +- [DETACH PARTITION\|PART](#detach-partitionpart) — パーティションã¾ãŸã¯ãƒ‘ーツを`detached`ディレクトリã«ç§»å‹•ã—ã€å¿˜ã‚Œã¾ã™ã€‚ +- [DROP PARTITION\|PART](#drop-partitionpart) — パーティションã¾ãŸã¯ãƒ‘ーツを削除ã—ã¾ã™ã€‚ +- [DROP DETACHED PARTITION\|PART](#drop-detached-partitionpart) - `detached`ã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸãƒ‘ートã¾ãŸã¯ã™ã¹ã¦ã®ãƒ‘ーティションã®ãƒ‘ーツを削除ã—ã¾ã™ã€‚ +- [FORGET PARTITION](#forget-partition) — パーティションãŒç©ºã®å ´åˆã€ZooKeeperã‹ã‚‰ãã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚ +- [ATTACH PARTITION\|PART](#attach-partitionpart) — `detached`ディレクトリã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‘ーティションã¾ãŸã¯ãƒ‘ーツを追加ã—ã¾ã™ã€‚ +- [ATTACH PARTITION FROM](#attach-partition-from) — データパーティションを他ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã‚³ãƒ”ーã—ã¦è¿½åŠ ã—ã¾ã™ã€‚ +- [REPLACE PARTITION](#replace-partition) — データパーティションを他ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã‚³ãƒ”ーã—ã€ç½®ãæ›ãˆã¾ã™ã€‚ +- [MOVE PARTITION TO TABLE](#move-partition-to-table) — データパーティションを他ã®ãƒ†ãƒ¼ãƒ–ルã«ç§»å‹•ã—ã¾ã™ã€‚ +- [CLEAR COLUMN IN PARTITION](#clear-column-in-partition) — パーティション内ã®æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å€¤ã‚’リセットã—ã¾ã™ã€‚ +- [CLEAR INDEX IN PARTITION](#clear-index-in-partition) — パーティション内ã®æŒ‡å®šã•ã‚ŒãŸã‚»ã‚«ãƒ³ãƒ€ãƒªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’リセットã—ã¾ã™ã€‚ +- [FREEZE PARTITION](#freeze-partition) — パーティションã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を作æˆã—ã¾ã™ã€‚ +- [UNFREEZE PARTITION](#unfreeze-partition) — パーティションã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を削除ã—ã¾ã™ã€‚ +- [FETCH PARTITION\|PART](#fetch-partitionpart) — ä»–ã®ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ãƒ‘ーツã¾ãŸã¯ãƒ‘ーティションをダウンロードã—ã¾ã™ã€‚ +- [MOVE PARTITION\|PART](#move-partitionpart) — パーティションã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを他ã®ãƒ‡ã‚£ã‚¹ã‚¯ã¾ãŸã¯ãƒœãƒªãƒ¥ãƒ¼ãƒ ã«ç§»å‹•ã—ã¾ã™ã€‚ +- [UPDATE IN PARTITION](#update-in-partition) — パーティション内ã®ãƒ‡ãƒ¼ã‚¿ã‚’æ¡ä»¶ã«åŸºã¥ã„ã¦æ›´æ–°ã—ã¾ã™ã€‚ +- [DELETE IN PARTITION](#delete-in-partition) — パーティション内ã®ãƒ‡ãƒ¼ã‚¿ã‚’æ¡ä»¶ã«åŸºã¥ã„ã¦å‰Šé™¤ã—ã¾ã™ã€‚ + +## DETACH PARTITION\|PART + +``` sql +ALTER TABLE table_name [ON CLUSTER cluster] DETACH PARTITION|PART partition_expr +``` + +指定ã•ã‚ŒãŸãƒ‘ーティションã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’`detached`ディレクトリã«ç§»å‹•ã—ã¾ã™ã€‚サーãƒãƒ¼ã¯ã€ã“ã®ãƒ‡ã‚¿ãƒƒãƒã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ‘ーティションを存在ã—ãªã„ã‚‚ã®ã¨ã—ã¦å¿˜ã‚Œã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã«ã¤ã„ã¦ã‚µãƒ¼ãƒãƒ¼ã¯ã€[ATTACH](#attach-partitionpart)クエリを行ã†ã¾ã§èªè­˜ã—ã¾ã›ã‚“。 + +例: + +``` sql +ALTER TABLE mt DETACH PARTITION '2020-11-21'; +ALTER TABLE mt DETACH PART 'all_2_2_0'; +``` + +パーティションå¼ã®è¨­å®šã«ã¤ã„ã¦ã¯ã€[パーティションå¼ã®è¨­å®šæ–¹æ³•](#how-to-set-partition-expression)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +クエリãŒå®Ÿè¡Œã•ã‚ŒãŸå¾Œã€`detached`ディレクトリã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦å¥½ããªæ“作を行ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ファイルシステムã‹ã‚‰å‰Šé™¤ã™ã‚‹ã‹ã€ãã®ã¾ã¾ã«ã—ã¦ãŠãã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +ã“ã®ã‚¯ã‚¨ãƒªã¯ãƒ¬ãƒ—リケートã•ã‚Œã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§ãƒ‡ãƒ¼ã‚¿ã‚’`detached`ディレクトリã«ç§»å‹•ã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã‚’実行ã§ãã‚‹ã®ã¯ã€ãƒªãƒ¼ãƒ€ãƒ¼ãƒ¬ãƒ—リカ上ã®ã¿ã§ã™ã€‚レプリカãŒãƒªãƒ¼ãƒ€ãƒ¼ã‹ã©ã†ã‹ã‚’確èªã™ã‚‹ã«ã¯ã€[system.replicas](/docs/ja/operations/system-tables/replicas.md/#system_tables-replicas)テーブルã¸ã®`SELECT`クエリを実行ã—ã¾ã™ã€‚ã‚ã‚‹ã„ã¯ã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§`DETACH`クエリを実行ã™ã‚‹ã®ãŒç°¡å˜ã§ã€ãƒªãƒ¼ãƒ€ãƒ¼ãƒ¬ãƒ—リカ以外ã®ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã¯ä¾‹å¤–を投ã’ã¾ã™ï¼ˆè¤‡æ•°ã®ãƒªãƒ¼ãƒ€ãƒ¼ã‚’許å¯ã™ã‚‹ã¨ã¯è¨€ãˆã€ãƒªãƒ¼ãƒ€ãƒ¼ãƒ¬ãƒ—リカã®ã¿ãŒã‚¯ã‚¨ãƒªã‚’処ç†ã—ã¾ã™ï¼‰ã€‚ + +## DROP PARTITION\|PART + +``` sql +ALTER TABLE table_name [ON CLUSTER cluster] DROP PARTITION|PART partition_expr +``` + +指定ã•ã‚ŒãŸãƒ‘ーティションをテーブルã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯ãƒ‘ーティションをéžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã¨ã—ã¦ã‚¿ã‚°ä»˜ã‘ã—ã€ç´„10分ã§ãƒ‡ãƒ¼ã‚¿ã‚’完全ã«å‰Šé™¤ã—ã¾ã™ã€‚ + +パーティションå¼ã®è¨­å®šã«ã¤ã„ã¦ã¯ã€[パーティションå¼ã®è¨­å®šæ–¹æ³•](#how-to-set-partition-expression)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®ã‚¯ã‚¨ãƒªã¯ãƒ¬ãƒ—リケートã•ã‚Œã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚ + +例: + +``` sql +ALTER TABLE mt DROP PARTITION '2020-11-21'; +ALTER TABLE mt DROP PART 'all_4_4_0'; +``` + +## DROP DETACHED PARTITION\|PART + +``` sql +ALTER TABLE table_name [ON CLUSTER cluster] DROP DETACHED PARTITION|PART ALL|partition_expr +``` + +`detached`ã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸãƒ‘ーツã¾ãŸã¯æŒ‡å®šã•ã‚ŒãŸãƒ‘ーティションã®ã™ã¹ã¦ã®ãƒ‘ーツを削除ã—ã¾ã™ã€‚ +パーティションå¼ã®è¨­å®šã«ã¤ã„ã¦ã¯ã€[パーティションå¼ã®è¨­å®šæ–¹æ³•](#how-to-set-partition-expression)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +## FORGET PARTITION + +``` sql +ALTER TABLE table_name FORGET PARTITION partition_expr +``` + +ZooKeeperã‹ã‚‰ç©ºã®ãƒ‘ーティションã«é–¢ã™ã‚‹ã™ã¹ã¦ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚パーティションãŒç©ºã§ãªã„ã‹ã€ä¸æ˜Žãªå ´åˆã¯ã‚¯ã‚¨ãƒªãŒå¤±æ•—ã—ã¾ã™ã€‚å†åˆ©ç”¨ã•ã‚Œãªã„パーティションã«å¯¾ã—ã¦ã®ã¿å®Ÿè¡Œã—ã¦ãã ã•ã„。 + +パーティションå¼ã®è¨­å®šã«ã¤ã„ã¦ã¯ã€[パーティションå¼ã®è¨­å®šæ–¹æ³•](#how-to-set-partition-expression)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +例: + +``` sql +ALTER TABLE mt FORGET PARTITION '20201121'; +``` + +## ATTACH PARTITION\|PART + +``` sql +ALTER TABLE table_name [ON CLUSTER cluster] ATTACH PARTITION|PART partition_expr +``` + +`detached`ディレクトリã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã—ã¾ã™ã€‚全体ã®ãƒ‘ーティションã¾ãŸã¯å€‹åˆ¥ã®ãƒ‘ーツã«ã¤ã„ã¦ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例: + +``` sql +ALTER TABLE visits ATTACH PARTITION 201901; +ALTER TABLE visits ATTACH PART 201901_2_2_0; +``` + +パーティションå¼ã®è¨­å®šã«ã¤ã„ã¦ã¯ã€[パーティションå¼ã®è¨­å®šæ–¹æ³•](#how-to-set-partition-expression)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®ã‚¯ã‚¨ãƒªã¯ãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚レプリカ・イニシエーターã¯`detached`ディレクトリã«ãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚‹ã‹ç¢ºèªã—ã€ãƒ‡ãƒ¼ã‚¿ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ãã®æ•´åˆæ€§ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ã™ã¹ã¦ãŒæ­£ã—ã‘ã‚Œã°ã€ãƒ‡ãƒ¼ã‚¿ã‚’テーブルã«è¿½åŠ ã—ã¾ã™ã€‚ + +éžã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ã®ãƒ¬ãƒ—リカãŒæ·»ä»˜ã‚³ãƒžãƒ³ãƒ‰ã‚’å—ã‘å–ã£ãŸéš›ã«ã€æ­£ã—ã„ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’æŒã¤ãƒ‘ーツãŒè‡ªèº«ã®`detached`フォルダã«è¦‹ã¤ã‹ã‚Œã°ã€ä»–ã®ãƒ¬ãƒ—リカã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã›ãšã«ãƒ‡ãƒ¼ã‚¿ã‚’添付ã—ã¾ã™ã€‚ +パーツãŒæ­£ã—ã„ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’æŒã¤å ´åˆã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯è©²å½“パーツをæŒã¤ä»»æ„ã®ãƒ¬ãƒ—リカã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚ + +データを1ã¤ã®ãƒ¬ãƒ—リカã®`detached`ディレクトリã«é…ç½®ã—ã€`ALTER ... ATTACH`クエリを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã®ãƒ†ãƒ¼ãƒ–ルã«è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## ATTACH PARTITION FROM + +``` sql +ALTER TABLE table2 [ON CLUSTER cluster] ATTACH PARTITION partition_expr FROM table1 +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€`table1`ã‹ã‚‰`table2`ã«ãƒ‡ãƒ¼ã‚¿ãƒ‘ーティションをコピーã—ã¾ã™ã€‚ + +注æ„点: + +- `table1`ã‚„`table2`ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã¯å‰Šé™¤ã•ã‚Œã¾ã›ã‚“。 +- `table1`ã¯ä¸€æ™‚テーブルã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +クエリをæˆåŠŸã•ã›ã‚‹ãŸã‚ã«ã¯ã€æ¬¡ã®æ¡ä»¶ã‚’満ãŸã™å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜æ§‹é€ ã§ãªã‘ã‚Œã°ãªã‚‰ãªã„。 +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ãƒ‘ーティションキーã€ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã€ä¸»ã‚­ãƒ¼ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚る。 +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ãƒ—ロジェクションをæŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚る。 +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚る。 + +## REPLACE PARTITION + +``` sql +ALTER TABLE table2 [ON CLUSTER cluster] REPLACE PARTITION partition_expr FROM table1 +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€`table1`ã‹ã‚‰`table2`ã«ãƒ‡ãƒ¼ã‚¿ãƒ‘ーティションをコピーã—ã€`table2`ã®æ—¢å­˜ã®ãƒ‘ーティションを置ãæ›ãˆã¾ã™ã€‚æ“作ã¯ã‚¢ãƒˆãƒŸãƒƒã‚¯ã§ã™ã€‚ + +注æ„点: + +- `table1`ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã¯å‰Šé™¤ã•ã‚Œã¾ã›ã‚“。 +- `table1`ã¯ä¸€æ™‚テーブルã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +クエリをæˆåŠŸã•ã›ã‚‹ãŸã‚ã«ã¯ã€æ¬¡ã®æ¡ä»¶ã‚’満ãŸã™å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜æ§‹é€ ã§ãªã‘ã‚Œã°ãªã‚‰ãªã„。 +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ãƒ‘ーティションキーã€ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã€ä¸»ã‚­ãƒ¼ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚る。 +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ãƒ—ロジェクションをæŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚る。 +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚る。 + +## MOVE PARTITION TO TABLE + +``` sql +ALTER TABLE table_source [ON CLUSTER cluster] MOVE PARTITION partition_expr TO TABLE table_dest +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€`table_source`ã‹ã‚‰`table_dest`ã«ãƒ‡ãƒ¼ã‚¿ãƒ‘ーティションを移動ã—ã€`table_source`ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚ + +クエリをæˆåŠŸã•ã›ã‚‹ãŸã‚ã«ã¯ã€æ¬¡ã®æ¡ä»¶ã‚’満ãŸã™å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜æ§‹é€ ã§ãªã‘ã‚Œã°ãªã‚‰ãªã„。 +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ãƒ‘ーティションキーã€ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã€ä¸»ã‚­ãƒ¼ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚る。 +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ãƒ—ロジェクションをæŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚る。 +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã‚’æŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚る。 +- 両方ã®ãƒ†ãƒ¼ãƒ–ルãŒåŒã˜ã‚¨ãƒ³ã‚¸ãƒ³ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã§ãªã‘ã‚Œã°ãªã‚‰ãªã„(レプリケートã¾ãŸã¯éžãƒ¬ãƒ—リケート)。 + +## CLEAR COLUMN IN PARTITION + +``` sql +ALTER TABLE table_name [ON CLUSTER cluster] CLEAR COLUMN column_name IN PARTITION partition_expr +``` + +指定ã•ã‚ŒãŸãƒ‘ーティション内ã®ç‰¹å®šã®ã‚«ãƒ©ãƒ ã®ã™ã¹ã¦ã®å€¤ã‚’リセットã—ã¾ã™ã€‚テーブル作æˆæ™‚ã«`DEFAULT`å¥ãŒæŒ‡å®šã•ã‚Œã¦ã„ãŸå ´åˆã€ã“ã®ã‚¯ã‚¨ãƒªã¯ã‚«ãƒ©ãƒ ã®å€¤ã‚’指定ã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«è¨­å®šã—ã¾ã™ã€‚ + +例: + +``` sql +ALTER TABLE visits CLEAR COLUMN hour in PARTITION 201902 +``` + +## FREEZE PARTITION + +``` sql +ALTER TABLE table_name [ON CLUSTER cluster] FREEZE [PARTITION partition_expr] [WITH NAME 'backup_name'] +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€æŒ‡å®šã•ã‚ŒãŸãƒ‘ーティションã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を作æˆã—ã¾ã™ã€‚`PARTITION`å¥ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€ã™ã¹ã¦ã®ãƒ‘ーティションã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒä¸€åº¦ã«ä½œæˆã•ã‚Œã¾ã™ã€‚ + +:::note +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—プロセス全体ãŒã‚µãƒ¼ãƒãƒ¼ã‚’åœæ­¢ã›ãšã«è¡Œã‚ã‚Œã¾ã™ã€‚ +::: + +åå‰ãŒæŒ‡å®šã•ã‚ŒãŸãƒ‘ーティションã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を削除ã—ã¾ã™ã€‚`PARTITION`å¥ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€ã™ã¹ã¦ã®ãƒ‘ーティションã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒä¸€åº¦ã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +:::note +データストレージ用ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚»ãƒƒãƒˆã‚’テーブルã«ä½¿ç”¨ã™ã‚‹å ´åˆã€`PARTITION`å¼ã«ä¸€è‡´ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを格ç´ã™ã‚‹`shadow/N`ディレクトリãŒå„ディスクã«ä½œæˆã•ã‚Œã¾ã™ã€‚ +::: + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—作æˆæ™‚é–“ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒŠãƒƒãƒ—ショット用ã«ã€ãƒ†ãƒ¼ãƒ–ルデータã«ãƒãƒ¼ãƒ‰ãƒªãƒ³ã‚¯ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ãƒãƒ¼ãƒ‰ãƒªãƒ³ã‚¯ã¯ã€`/var/lib/clickhouse/shadow/N/...`ディレクトリã«é…ç½®ã•ã‚Œã€ã“ã“ã§ï¼š + +- `/var/lib/clickhouse/`ã¯è¨­å®šã§æŒ‡å®šã•ã‚ŒãŸClickHouseã®ä½œæ¥­ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã™ã€‚ +- `N`ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ç•ªå·ã§ã™ã€‚ +- `WITH NAME`パラメータãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ç•ªå·ã®ä»£ã‚ã‚Šã«`'backup_name'`パラメータã®å€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +ã“ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã»ã¼çž¬æ™‚ã«ä½œæˆã•ã‚Œã¾ã™ï¼ˆãŸã ã—ã€ã¾ãšå¯¾å¿œã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã«ç¾åœ¨ã®ã‚¯ã‚¨ãƒªãŒçµ‚了ã™ã‚‹ã®ã‚’å¾…æ©Ÿã—ã¾ã™ï¼‰ã€‚ + +`ALTER TABLE t FREEZE PARTITION`ã¯ãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’コピーã—ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯ã‚³ãƒ”ーã—ã¾ã›ã‚“。テーブルメタデータã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’å–ã‚‹ã«ã¯ã€`/var/lib/clickhouse/metadata/database/table.sql`ファイルをコピーã—ã¾ã™ã€‚ + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’復元ã™ã‚‹ã«ã¯ã€æ¬¡ã®æ“作を行ã„ã¾ã™ï¼š + +1. テーブルãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ä½œæˆã—ã¾ã™ã€‚クエリを見るã«ã¯ã€`.sql`ファイルを使用ã—ã¾ã™ï¼ˆ`ATTACH`ã‚’`CREATE`ã«ç½®ãæ›ãˆã¾ã™ï¼‰ã€‚ +2. ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—内ã®`data/database/table/`ディレクトリã‹ã‚‰`/var/lib/clickhouse/data/database/table/detached/`ディレクトリã«ãƒ‡ãƒ¼ã‚¿ã‚’コピーã—ã¾ã™ã€‚ +3. `ALTER TABLE t ATTACH PARTITION`クエリを実行ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚’テーブルã«è¿½åŠ ã—ã¾ã™ã€‚ + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã®å¾©å…ƒã¯ã‚µãƒ¼ãƒãƒ¼ã®åœæ­¢ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“。 + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿å¾©å…ƒã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[データãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—](/docs/ja/operations/backup.md)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +## UNFREEZE PARTITION + +``` sql +ALTER TABLE table_name [ON CLUSTER cluster] UNFREEZE [PARTITION 'part_expr'] WITH NAME 'backup_name' +``` + +指定ã•ã‚ŒãŸåå‰ã‚’æŒã¤`freezed`パーティションをディスクã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã€‚`PARTITION`å¥ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€ã™ã¹ã¦ã®ãƒ‘ーティションã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒä¸€åº¦ã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +## CLEAR INDEX IN PARTITION + +``` sql +ALTER TABLE table_name [ON CLUSTER cluster] CLEAR INDEX index_name IN PARTITION partition_expr +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€`CLEAR COLUMN`ã¨åŒæ§˜ã«æ©Ÿèƒ½ã—ã¾ã™ãŒã€ã‚«ãƒ©ãƒ ãƒ‡ãƒ¼ã‚¿ã®ä»£ã‚ã‚Šã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’リセットã—ã¾ã™ã€‚ + +## FETCH PARTITION|PART + +``` sql +ALTER TABLE table_name [ON CLUSTER cluster] FETCH PARTITION|PART partition_expr FROM 'path-in-zookeeper' +``` + +ä»–ã®ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ãƒ‘ーティションをダウンロードã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯ãƒ¬ãƒ—リケートã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã§ã®ã¿å‹•ä½œã—ã¾ã™ã€‚ + +ã“ã®ã‚¯ã‚¨ãƒªã¯æ¬¡ã®å‹•ä½œã‚’è¡Œã„ã¾ã™ï¼š + +1. 指定ã•ã‚ŒãŸã‚·ãƒ£ãƒ¼ãƒ‰ã‹ã‚‰ãƒ‘ーティション|パートをダウンロードã—ã¾ã™ã€‚'path-in-zookeeper'ã«ã¯ã€ZooKeeper内ã§ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã¸ã®ãƒ‘スを指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +2. 次ã«ã€ã‚¯ã‚¨ãƒªã¯ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’`table_name`テーブルã®`detached`ディレクトリã«é…ç½®ã—ã¾ã™ã€‚[ATTACH PARTITION\|PART](#attach-partitionpart)クエリを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’テーブルã«è¿½åŠ ã—ã¾ã™ã€‚ + +例: + +1. FETCH PARTITION +``` sql +ALTER TABLE users FETCH PARTITION 201902 FROM '/clickhouse/tables/01-01/visits'; +ALTER TABLE users ATTACH PARTITION 201902; +``` +2. FETCH PART +``` sql +ALTER TABLE users FETCH PART 201901_2_2_0 FROM '/clickhouse/tables/01-01/visits'; +ALTER TABLE users ATTACH PART 201901_2_2_0; +``` + +注æ„点: + +- `ALTER ... FETCH PARTITION|PART`クエリã¯ãƒ¬ãƒ—リケートã•ã‚Œã¾ã›ã‚“。ãã‚Œã¯ãƒ‡ãƒ¼ã‚¿ã¾ãŸã¯ãƒ‘ーティションをローカルサーãƒãƒ¼ã®`detached`ディレクトリã«ã®ã¿é…ç½®ã—ã¾ã™ã€‚ +- `ALTER TABLE ... ATTACH`クエリã¯ãƒ¬ãƒ—リケートã•ã‚Œã¾ã™ã€‚ãã‚Œã¯ãƒ‡ãƒ¼ã‚¿ã‚’ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã«è¿½åŠ ã—ã¾ã™ã€‚データã¯`detached`ディレクトリã‹ã‚‰1ã¤ã®ãƒ¬ãƒ—リカã«è¿½åŠ ã•ã‚Œã€ä»–ã®ãƒ¬ãƒ—リカã«ã¯éš£æŽ¥ã™ã‚‹ãƒ¬ãƒ—リカã‹ã‚‰è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +ダウンロードã™ã‚‹å‰ã«ã€ã‚·ã‚¹ãƒ†ãƒ ã¯ãƒ‘ーティションãŒå­˜åœ¨ã—ã€ãƒ†ãƒ¼ãƒ–ル構造ãŒä¸€è‡´ã™ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚最もé©åˆ‡ãªãƒ¬ãƒ—リカã¯ã€å¥å…¨ãªãƒ¬ãƒ—リカã‹ã‚‰è‡ªå‹•çš„ã«é¸æŠžã•ã‚Œã¾ã™ã€‚ + +ã“ã®ã‚¯ã‚¨ãƒªã¯`ALTER TABLE`ã¨å‘¼ã°ã‚Œã¦ã„ã¾ã™ãŒã€ãƒ†ãƒ¼ãƒ–ル構造を変更ã—ãŸã‚Šã€å³åº§ã«ãƒ†ãƒ¼ãƒ–ル内ã®åˆ©ç”¨å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ã‚’変更ã™ã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## MOVE PARTITION\|PART + +`MergeTree`エンジンテーブルã®ãƒ‘ーティションã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを別ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ ã¾ãŸã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ç§»å‹•ã—ã¾ã™ã€‚詳細ã¯[データストレージ用ã«è¤‡æ•°ã®ãƒ–ロックデãƒã‚¤ã‚¹ã‚’使用ã™ã‚‹](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-multiple-volumes)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +``` sql +ALTER TABLE table_name [ON CLUSTER cluster] MOVE PARTITION|PART partition_expr TO DISK|VOLUME 'disk_name' +``` + +`ALTER TABLE t MOVE`クエリ: + +- レプリケートã•ã‚Œã¾ã›ã‚“。異ãªã‚‹ãƒ¬ãƒ—リカã¯ç•°ãªã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã‚’æŒã¤ã“ã¨ãŒã§ãã‚‹ãŸã‚ã§ã™ã€‚ +- 指定ã•ã‚ŒãŸãƒ‡ã‚£ã‚¹ã‚¯ã¾ãŸã¯ãƒœãƒªãƒ¥ãƒ¼ãƒ ãŒæ§‹æˆã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ã¾ãŸã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã§æŒ‡å®šã•ã‚ŒãŸç§»å‹•æ¡ä»¶ãŒé©ç”¨ã§ããªã„å ´åˆã«ã‚‚エラーを返ã—ã¾ã™ã€‚ +- データãŒæ—¢ã«ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセスã«ã‚ˆã£ã¦ç§»å‹•ã—ã¦ã„ã‚‹ã€åŒæ™‚ã®`ALTER TABLE t MOVE`クエリã¾ãŸã¯ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ‡ãƒ¼ã‚¿ãƒžãƒ¼ã‚¸ã®çµæžœã¨ã—ã¦ç§»å‹•ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è¿½åŠ ã®æ“作を行ã†å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +例: + +``` sql +ALTER TABLE hits MOVE PART '20190301_14343_16206_438' TO VOLUME 'slow' +ALTER TABLE hits MOVE PARTITION '2019-09-01' TO DISK 'fast_ssd' +``` + +## UPDATE IN PARTITION + +指定ã•ã‚ŒãŸãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°å¼ã«ãƒžãƒƒãƒã™ã‚‹ãƒ‘ーティション内ã®ãƒ‡ãƒ¼ã‚¿ã‚’æ“作ã—ã¾ã™ã€‚ã“ã‚Œã¯[mutation](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +構文: + +``` sql +ALTER TABLE [db.]table [ON CLUSTER cluster] UPDATE column1 = expr1 [, ...] [IN PARTITION partition_expr] WHERE filter_expr +``` + +### 例 + +``` sql +-- パーティションåを使用 +ALTER TABLE mt UPDATE x = x + 1 IN PARTITION 2 WHERE p = 2; + +-- パーティションIDを使用 +ALTER TABLE mt UPDATE x = x + 1 IN PARTITION ID '2' WHERE p = 2; +``` + +### 関連項目 + +- [UPDATE](/docs/ja/sql-reference/statements/alter/update.md/#alter-table-update-statements) + +## DELETE IN PARTITION + +指定ã•ã‚ŒãŸãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°å¼ã«ãƒžãƒƒãƒã™ã‚‹ãƒ‘ーティション内ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚ã“ã‚Œã¯[mutation](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +構文: + +``` sql +ALTER TABLE [db.]table [ON CLUSTER cluster] DELETE [IN PARTITION partition_expr] WHERE filter_expr +``` + +### 例 + +``` sql +-- パーティションåを使用 +ALTER TABLE mt DELETE IN PARTITION 2 WHERE p = 2; + +-- パーティションIDを使用 +ALTER TABLE mt DELETE IN PARTITION ID '2' WHERE p = 2; +``` + +### 関連項目 + +- [DELETE](/docs/ja/sql-reference/statements/alter/delete.md/#alter-mutations) + +## パーティションå¼ã®è¨­å®šæ–¹æ³• + +`ALTER ... PARTITION`クエリã§ãƒ‘ーティションå¼ã‚’設定ã™ã‚‹ã«ã¯ã€ã•ã¾ã–ã¾ãªæ–¹æ³•ãŒã‚ã‚Šã¾ã™ï¼š + +- `system.parts`テーブルã®`partition`カラムã®å€¤ã¨ã—ã¦æŒ‡å®šã—ã¾ã™ã€‚例:`ALTER TABLE visits DETACH PARTITION 201901`。 +- キーワード`ALL`を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯DROP/DETACH/ATTACH/ATTACH FROMã§ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚例:`ALTER TABLE visits ATTACH PARTITION ALL`。 +- テーブルã®ãƒ‘ーティションキーã®ã‚¿ãƒ—ルã¨åž‹ãŒä¸€è‡´ã™ã‚‹å¼ã‚„定数ã®ã‚¿ãƒ—ルã¨ã—ã¦æŒ‡å®šã—ã¾ã™ã€‚å˜ä¸€è¦ç´ ã®ãƒ‘ーティションキーã®å ´åˆã€å¼ã‚’`tuple(...)`関数ã§åŒ…む必è¦ãŒã‚ã‚Šã¾ã™ã€‚例:`ALTER TABLE visits DETACH PARTITION tuple(toYYYYMM(toDate('2019-01-25')))`。 +- パーティションIDを使用ã—ã¾ã™ã€‚パーティションIDã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚„ZooKeeperã§ãƒ‘ーティションã®åå‰ã¨ã—ã¦ä½¿ã‚れる(å¯èƒ½ã§ã‚ã‚Œã°äººé–“ãŒèª­ã‚る文字列ã®ï¼‰è­˜åˆ¥å­ã§ã™ã€‚パーティションIDã¯`PARTITION ID`å¥ã§å¼•ç”¨ç¬¦å†…ã«æŒ‡å®šã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。例:`ALTER TABLE visits DETACH PARTITION ID '201901'`。 +- [ALTER ATTACH PART](#attach-partitionpart)ãŠã‚ˆã³[DROP DETACHED PART](#drop-detached-partitionpart)クエリã§ã¯ã€`system.detached_parts`テーブルã®`name`カラムã‹ã‚‰ã®å€¤ã‚’使用ã—ã¦ã€ãƒ‘ーツã®åå‰ã‚’文字列リテラルã§æŒ‡å®šã—ã¾ã™ã€‚例:`ALTER TABLE visits ATTACH PART '201901_1_1_0'`。 + +パーティションを指定ã™ã‚‹éš›ã®å¼•ç”¨ç¬¦ã®ä½¿ç”¨ã¯ã€ãƒ‘ーティションå¼ã®ã‚¿ã‚¤ãƒ—ã«ä¾å­˜ã—ã¾ã™ã€‚例ãˆã°ã€`String`タイプã®å ´åˆã€ãã®åå‰ã‚’引用符(`'`)ã§å›²ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`Date`ã‚„`Int*`タイプã®å ´åˆã€å¼•ç”¨ç¬¦ã¯ä¸è¦ã§ã™ã€‚ + +上記ã®è¦å‰‡ã¯ã€[OPTIMIZE](/docs/ja/sql-reference/statements/optimize.md)クエリã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚パーティション化ã•ã‚Œã¦ã„ãªã„テーブルを最é©åŒ–ã™ã‚‹éš›ã«ç‰¹å®šã®ãƒ‘ーティションã®ã¿ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€å¼ã‚’`PARTITION tuple()`ã¨è¨­å®šã—ã¦ãã ã•ã„。例: + +``` sql +OPTIMIZE TABLE table_not_partitioned PARTITION tuple() FINAL; +``` + +`IN PARTITION`ã¯ã€`ALTER TABLE`クエリã®çµæžœã¨ã—ã¦`UPDATE`ã¾ãŸã¯`DELETE`å¼ãŒé©ç”¨ã•ã‚Œã‚‹ãƒ‘ーティションを指定ã—ã¾ã™ã€‚指定ã•ã‚ŒãŸãƒ‘ーティションã‹ã‚‰ã®ã¿æ–°ã—ã„パーツãŒä½œæˆã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‘ーティションãŒå¤šã分ã‹ã‚Œã¦ã„ã‚‹å ´åˆã§ã‚‚ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’æ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãƒã‚¤ãƒ³ãƒˆã ã‘ã«ãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã™ã‚‹è² è·ã‚’減らã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`ALTER ... PARTITION`クエリã®ä¾‹ã¯ã€ãƒ†ã‚¹ãƒˆ[`00502_custom_partitioning_local`](https://github.com/ClickHouse/ClickHouse/blob/master/tests/queries/0_stateless/00502_custom_partitioning_local.sql)ãŠã‚ˆã³[`00502_custom_partitioning_replicated_zookeeper`](https://github.com/ClickHouse/ClickHouse/blob/master/tests/queries/0_stateless/00502_custom_partitioning_replicated_zookeeper.sql)ã§ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/alter/projection.md b/docs/ja/sql-reference/statements/alter/projection.md new file mode 100644 index 00000000000..44aed317645 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/projection.md @@ -0,0 +1,164 @@ +--- +slug: /ja/sql-reference/statements/alter/projection +sidebar_position: 49 +sidebar_label: PROJECTION +title: "プロジェクション" +--- + +プロジェクションã¯ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚’最é©åŒ–ã™ã‚‹å½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã—ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯æ¬¡ã®ç”¨é€”ã«ä¾¿åˆ©ã§ã™ï¼š +- 主キーã®ä¸€éƒ¨ã§ãªã„カラムã«å¯¾ã™ã‚‹ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œ +- カラムã®äº‹å‰é›†è¨ˆã«ã‚ˆã‚Šã€è¨ˆç®—ã¨IOã®ä¸¡æ–¹ã‚’削減 + +テーブルã«å¯¾ã—ã¦1ã¤ä»¥ä¸Šã®ãƒ—ロジェクションを定義ã™ã‚‹ã“ã¨ãŒã§ãã€ã‚¯ã‚¨ãƒªè§£æžæ™‚ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®æŒ‡å®šã—ãŸã‚¯ã‚¨ãƒªã‚’変更ã›ãšã«ã€ã‚¹ã‚­ãƒ£ãƒ³ã™ã¹ãデータãŒæœ€å°ã®ãƒ—ロジェクションをClickHouseãŒé¸æŠžã—ã¾ã™ã€‚ + +:::note ãƒ‡ã‚£ã‚¹ã‚¯ä½¿ç”¨é‡ + +プロジェクションã¯å†…部ã§æ–°ã—ã„éš ã—テーブルを作æˆã™ã‚‹ãŸã‚ã€ã‚ˆã‚Šå¤šãã®IOã¨ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚ +例ã¨ã—ã¦ã€ç•°ãªã‚‹ä¸»ã‚­ãƒ¼ã‚’定義ã—ãŸãƒ—ロジェクションãŒã‚ã‚‹å ´åˆã€å…ƒã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒè¤‡è£½ã•ã‚Œã¾ã™ã€‚ +::: + +プロジェクションã®å†…部動作ã«é–¢ã™ã‚‹æŠ€è¡“çš„ãªè©³ç´°ã¯ã“ã®[ページ](/docs/ja/guides/best-practices/sparse-primary-indexes.md/#option-3-projections)ã‚’ã”覧ãã ã•ã„。 + +## 主キーを使用ã›ãšã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ä¾‹ + +テーブルã®ä½œæˆï¼š +```sql +CREATE TABLE visits_order +( + `user_id` UInt64, + `user_name` String, + `pages_visited` Nullable(Float64), + `user_agent` String +) +ENGINE = MergeTree() +PRIMARY KEY user_agent +``` +`ALTER TABLE`を使ã£ã¦æ—¢å­˜ã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ—ロジェクションを追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š +```sql +ALTER TABLE visits_order ADD PROJECTION user_name_projection ( +SELECT +* +ORDER BY user_name +) + +ALTER TABLE visits_order MATERIALIZE PROJECTION user_name_projection +``` +データã®æŒ¿å…¥ï¼š +```sql +INSERT INTO visits_order SELECT + number, + 'test', + 1.5 * (number / 2), + 'Android' +FROM numbers(1, 100); +``` + +プロジェクションを使用ã™ã‚‹ã“ã¨ã§ã€å…ƒã®ãƒ†ãƒ¼ãƒ–ルã§`user_name`ãŒ`PRIMARY_KEY`ã¨ã—ã¦å®šç¾©ã•ã‚Œã¦ã„ãªãã¦ã‚‚ã€`user_name`ã§ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’ç´ æ—©ãè¡Œãˆã¾ã™ã€‚クエリ時ã«ClickHouseã¯ã€ãƒ—ロジェクションを使用ã™ã‚‹ã“ã¨ã§ãƒ‡ãƒ¼ã‚¿ã®å‡¦ç†é‡ãŒå°‘ãªããªã‚‹ã¨åˆ¤æ–­ã—ã¾ã™ã€‚ãªãœãªã‚‰ã€ãƒ‡ãƒ¼ã‚¿ãŒ`user_name`ã§ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã‹ã‚‰ã§ã™ã€‚ +```sql +SELECT + * +FROM visits_order +WHERE user_name='test' +LIMIT 2 +``` + +クエリãŒãƒ—ロジェクションを使用ã—ã¦ã„ã‚‹ã‹ç¢ºèªã™ã‚‹ã«ã¯ã€`system.query_log`テーブルを確èªã—ã¾ã™ã€‚`projections`フィールドã«ã¯ä½¿ç”¨ã•ã‚ŒãŸãƒ—ロジェクションã®åå‰ãŒå…¥ã‚Šã€æœªä½¿ç”¨ã®å ´åˆã¯ç©ºã«ãªã‚Šã¾ã™ï¼š +```sql +SELECT query, projections FROM system.query_log WHERE query_id='' +``` + +## 集計å‰ã®ã‚¯ã‚¨ãƒªã®ä¾‹ + +プロジェクションを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆï¼š +```sql +CREATE TABLE visits +( + `user_id` UInt64, + `user_name` String, + `pages_visited` Nullable(Float64), + `user_agent` String, + PROJECTION projection_visits_by_user + ( + SELECT + user_agent, + sum(pages_visited) + GROUP BY user_id, user_agent + ) +) +ENGINE = MergeTree() +ORDER BY user_agent +``` +データã®æŒ¿å…¥ï¼š +```sql +INSERT INTO visits SELECT + number, + 'test', + 1.5 * (number / 2), + 'Android' +FROM numbers(1, 100); +``` +```sql +INSERT INTO visits SELECT + number, + 'test', + 1. * (number / 2), + 'IOS' +FROM numbers(100, 500); +``` +`user_agent`フィールドを使ã£ãŸ`GROUP BY`クエリを最åˆã«å®Ÿè¡Œã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯äº‹å‰é›†è¨ˆãŒä¸€è‡´ã—ãªã„ãŸã‚ã€å®šç¾©ã•ã‚ŒãŸãƒ—ロジェクションを使用ã—ã¾ã›ã‚“。 +```sql +SELECT + user_agent, + count(DISTINCT user_id) +FROM visits +GROUP BY user_agent +``` + +プロジェクションを使用ã™ã‚‹ãŸã‚ã«ã¯ã€äº‹å‰é›†è¨ˆã¾ãŸã¯`GROUP BY`フィールドã®ä¸€éƒ¨ã¾ãŸã¯ã™ã¹ã¦ã‚’é¸æŠžã™ã‚‹ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ +```sql +SELECT + user_agent +FROM visits +WHERE user_id > 50 AND user_id < 150 +GROUP BY user_agent +``` +``` +SELECT + user_agent, + sum(pages_visited) +FROM visits +GROUP BY user_agent +``` + +å‰è¿°ã®ã‚ˆã†ã«ã€`system.query_log`テーブルを確èªã§ãã¾ã™ã€‚`projections`フィールドã«ã¯ä½¿ç”¨ã•ã‚ŒãŸãƒ—ロジェクションã®åå‰ãŒå…¥ã‚Šã€æœªä½¿ç”¨ã®å ´åˆã¯ç©ºã«ãªã‚Šã¾ã™ï¼š +```sql +SELECT query, projections FROM system.query_log WHERE query_id='' +``` + +# プロジェクションã®æ“作 + +次ã®æ“作ãŒ[プロジェクション](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#projections)ã§åˆ©ç”¨å¯èƒ½ã§ã™ï¼š + +## ADD PROJECTION + +`ALTER TABLE [db.]name [ON CLUSTER cluster] ADD PROJECTION [IF NOT EXISTS] name ( SELECT [GROUP BY] [ORDER BY] )` - テーブルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ãƒ—ロジェクションã®èª¬æ˜Žã‚’追加ã—ã¾ã™ã€‚ + +## DROP PROJECTION + +`ALTER TABLE [db.]name [ON CLUSTER cluster] DROP PROJECTION [IF EXISTS] name` - テーブルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰ãƒ—ロジェクションã®èª¬æ˜Žã‚’削除ã—ã€ãƒ—ロジェクションã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ディスクã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã€‚[ミューテーション](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## MATERIALIZE PROJECTION + +`ALTER TABLE [db.]table [ON CLUSTER cluster] MATERIALIZE PROJECTION [IF EXISTS] name [IN PARTITION partition_name]` - 指定ã•ã‚ŒãŸãƒ‘ーティション`partition_name`内ã®ãƒ—ロジェクション`name`ã‚’å†æ§‹ç¯‰ã—ã¾ã™ã€‚[ミューテーション](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## CLEAR PROJECTION + +`ALTER TABLE [db.]table [ON CLUSTER cluster] CLEAR PROJECTION [IF EXISTS] name [IN PARTITION partition_name]` - 説明を削除ã›ãšã«ãƒ—ロジェクションã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ディスクã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã€‚[ミューテーション](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +`ADD`ã€`DROP`ã€`CLEAR`コマンドã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›´ã‚„ファイルã®å‰Šé™¤ã®ã¿ã‚’è¡Œã†è»½é‡ãªæ“作ã§ã™ã€‚ + +ã¾ãŸã€ã“れらã¯ClickHouse Keeperã¾ãŸã¯ZooKeeperを介ã—ã¦ãƒ—ロジェクションã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’åŒæœŸã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šãƒ¬ãƒ—リケーションã•ã‚Œã¾ã™ã€‚ + +:::note +プロジェクションã®æ“作ã¯[`*MergeTree`](/docs/ja/engines/table-engines/mergetree-family/mergetree.md)エンジン([レプリケート](/docs/ja/engines/table-engines/mergetree-family/replication.md)ã•ã‚ŒãŸãƒãƒªã‚¢ãƒ³ãƒˆã‚’å«ã‚€ï¼‰ã®ãƒ†ãƒ¼ãƒ–ルã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: diff --git a/docs/ja/sql-reference/statements/alter/quota.md b/docs/ja/sql-reference/statements/alter/quota.md new file mode 100644 index 00000000000..360f6b3bfdb --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/quota.md @@ -0,0 +1,40 @@ +--- +slug: /ja/sql-reference/statements/alter/quota +sidebar_position: 46 +sidebar_label: QUOTA +title: "ALTER QUOTA" +--- + +クオータを変更ã—ã¾ã™ã€‚ + +構文: + +``` sql +ALTER QUOTA [IF EXISTS] name [ON CLUSTER cluster_name] + [RENAME TO new_name] + [KEYED BY {user_name | ip_address | client_key | client_key,user_name | client_key,ip_address} | NOT KEYED] + [FOR [RANDOMIZED] INTERVAL number {second | minute | hour | day | week | month | quarter | year} + {MAX { {queries | query_selects | query_inserts | errors | result_rows | result_bytes | read_rows | read_bytes | execution_time} = number } [,...] | + NO LIMITS | TRACKING ONLY} [,...]] + [TO {role [,...] | ALL | ALL EXCEPT role [,...]}] +``` +`user_name`ã€`ip_address`ã€`client_key`ã€`client_key, user_name`ã€`client_key, ip_address`ã¯ã€[system.quotas](../../../operations/system-tables/quotas.md)テーブルã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ + +`queries`ã€`query_selects`ã€'query_inserts'ã€`errors`ã€`result_rows`ã€`result_bytes`ã€`read_rows`ã€`read_bytes`ã€`execution_time`ã¯ã€[system.quotas_usage](../../../operations/system-tables/quotas_usage.md)テーブルã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ + +`ON CLUSTER`å¥ã¯ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ä¸Šã§ã‚¯ã‚ªãƒ¼ã‚¿ã‚’作æˆã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚詳細ã¯[分散DDL](../../../sql-reference/distributed-ddl.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**例** + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦15ヶ月ã§123ã®ã‚¯ã‚¨ãƒªã®æœ€å¤§æ•°ã‚’制é™ã™ã‚‹ä¾‹: + +``` sql +ALTER QUOTA IF EXISTS qA FOR INTERVAL 15 month MAX queries = 123 TO CURRENT_USER; +``` + +デフォルトユーザーã«å¯¾ã—ã¦ã€30分ã§0.5秒ã®æœ€å¤§å®Ÿè¡Œæ™‚間を制é™ã—ã€5å››åŠæœŸã§ã‚¯ã‚¨ãƒªã®æœ€å¤§æ•°ã‚’321ã€ã‚¨ãƒ©ãƒ¼ã®æœ€å¤§æ•°ã‚’10ã«åˆ¶é™ã™ã‚‹ä¾‹: + +``` sql +ALTER QUOTA IF EXISTS qB FOR INTERVAL 30 minute MAX execution_time = 0.5, FOR INTERVAL 5 quarter MAX queries = 321, errors = 10 TO default; +``` + diff --git a/docs/ja/sql-reference/statements/alter/role.md b/docs/ja/sql-reference/statements/alter/role.md new file mode 100644 index 00000000000..459d7d6efb8 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/role.md @@ -0,0 +1,18 @@ +--- +slug: /ja/sql-reference/statements/alter/role +sidebar_position: 46 +sidebar_label: ROLE +--- + +## ALTER ROLE + +ロールを変更ã—ã¾ã™ã€‚ + +構文: + +``` sql +ALTER ROLE [IF EXISTS] name1 [RENAME TO new_name |, name2 [,...]] + [ON CLUSTER cluster_name] + [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [CONST|READONLY|WRITABLE|CHANGEABLE_IN_READONLY] | PROFILE 'profile_name'] [,...] +``` + diff --git a/docs/ja/sql-reference/statements/alter/row-policy.md b/docs/ja/sql-reference/statements/alter/row-policy.md new file mode 100644 index 00000000000..c23c81b7289 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/row-policy.md @@ -0,0 +1,20 @@ +--- +slug: /ja/sql-reference/statements/alter/row-policy +sidebar_position: 47 +sidebar_label: ROW POLICY +--- + +# ALTER ROW POLICY + +è¡Œãƒãƒªã‚·ãƒ¼ã‚’変更ã—ã¾ã™ã€‚ + +構文: + +``` sql +ALTER [ROW] POLICY [IF EXISTS] name1 [ON CLUSTER cluster_name1] ON [database1.]table1 [RENAME TO new_name1] + [, name2 [ON CLUSTER cluster_name2] ON [database2.]table2 [RENAME TO new_name2] ...] + [AS {PERMISSIVE | RESTRICTIVE}] + [FOR SELECT] + [USING {condition | NONE}][,...] + [TO {role [,...] | ALL | ALL EXCEPT role [,...]}] +``` diff --git a/docs/ja/sql-reference/statements/alter/sample-by.md b/docs/ja/sql-reference/statements/alter/sample-by.md new file mode 100644 index 00000000000..84f07892611 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/sample-by.md @@ -0,0 +1,32 @@ +--- +slug: /ja/sql-reference/statements/alter/sample-by +sidebar_position: 41 +sidebar_label: SAMPLE BY +title: "SAMPLE BYå¼ã®æ“作" +--- + +# SAMPLE BYå¼ã®æ“作 + +以下ã®æ“作ãŒåˆ©ç”¨å¯èƒ½ã§ã™ï¼š + +## 変更 + +``` sql +ALTER TABLE [db].name [ON CLUSTER cluster] MODIFY SAMPLE BY new_expression +``` + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®[サンプリングキー](../../../engines/table-engines/mergetree-family/mergetree.md)ã‚’`new_expression`(å¼ã¾ãŸã¯å¼ã®ã‚¿ãƒ—ル)ã«å¤‰æ›´ã—ã¾ã™ã€‚主キーã¯æ–°ã—ã„サンプルキーをå«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## 削除 + +``` sql +ALTER TABLE [db].name [ON CLUSTER cluster] REMOVE SAMPLE BY +``` + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®[サンプリングキー](../../../engines/table-engines/mergetree-family/mergetree.md)を削除ã—ã¾ã™ã€‚ + +`MODIFY`ãŠã‚ˆã³`REMOVE`コマンドã¯ã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›´ã¾ãŸã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®å‰Šé™¤ã«é™å®šã•ã‚Œã‚‹ãŸã‚ã€è»½é‡ã§ã™ã€‚ + +:::note +ã“ã®æ©Ÿèƒ½ã¯[MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md)ファミリーã®ãƒ†ãƒ¼ãƒ–ル([レプリケート](../../../engines/table-engines/mergetree-family/replication.md)テーブルをå«ã‚€ï¼‰ã®ã¿ã§å‹•ä½œã—ã¾ã™ã€‚ +::: diff --git a/docs/ja/sql-reference/statements/alter/setting.md b/docs/ja/sql-reference/statements/alter/setting.md new file mode 100644 index 00000000000..217a9d57682 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/setting.md @@ -0,0 +1,60 @@ +--- +slug: /ja/sql-reference/statements/alter/setting +sidebar_position: 38 +sidebar_label: SETTING +--- + +# テーブル設定ã®æ“作 + +テーブル設定を変更ã™ã‚‹ãŸã‚ã®ä¸€é€£ã®ã‚¯ã‚¨ãƒªãŒã‚ã‚Šã¾ã™ã€‚設定を変更ã—ãŸã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«ãƒªã‚»ãƒƒãƒˆã—ãŸã‚Šã§ãã¾ã™ã€‚一ã¤ã®ã‚¯ã‚¨ãƒªã§è¤‡æ•°ã®è¨­å®šã‚’一度ã«å¤‰æ›´ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚指定ã•ã‚ŒãŸåå‰ã®è¨­å®šãŒå­˜åœ¨ã—ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªã¯ä¾‹å¤–を発生ã•ã›ã¾ã™ã€‚ + +**構文** + +``` sql +ALTER TABLE [db].name [ON CLUSTER cluster] MODIFY|RESET SETTING ... +``` + +:::note +ã“れらã®ã‚¯ã‚¨ãƒªã¯ã€[MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md) テーブルã®ã¿ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +## MODIFY SETTING + +テーブルã®è¨­å®šã‚’変更ã—ã¾ã™ã€‚ + +**構文** + +```sql +MODIFY SETTING setting_name=value [, ...] +``` + +**例** + +```sql +CREATE TABLE example_table (id UInt32, data String) ENGINE=MergeTree() ORDER BY id; + +ALTER TABLE example_table MODIFY SETTING max_part_loading_threads=8, max_parts_in_total=50000; +``` + +## RESET SETTING + +テーブルã®è¨­å®šã‚’デフォルト値ã«ãƒªã‚»ãƒƒãƒˆã—ã¾ã™ã€‚設定ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®çŠ¶æ…‹ã«ã‚ã‚‹å ´åˆã¯ã€ä½•ã‚‚è¡Œã‚ã‚Œã¾ã›ã‚“。 + +**構文** + +```sql +RESET SETTING setting_name [, ...] +``` + +**例** + +```sql +CREATE TABLE example_table (id UInt32, data String) ENGINE=MergeTree() ORDER BY id + SETTINGS max_part_loading_threads=8; + +ALTER TABLE example_table RESET SETTING max_part_loading_threads; +``` + +**å‚ç…§** + +- [MergeTree settings](../../../operations/settings/merge-tree-settings.md) diff --git a/docs/ja/sql-reference/statements/alter/settings-profile.md b/docs/ja/sql-reference/statements/alter/settings-profile.md new file mode 100644 index 00000000000..190406cf810 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/settings-profile.md @@ -0,0 +1,18 @@ +--- +slug: /ja/sql-reference/statements/alter/settings-profile +sidebar_position: 48 +sidebar_label: SETTINGS PROFILE +--- + +## ALTER SETTINGS PROFILE + +設定プロファイルを変更ã—ã¾ã™ã€‚ + +構文: + +``` sql +ALTER SETTINGS PROFILE [IF EXISTS] name1 [RENAME TO new_name |, name2 [,...]] + [ON CLUSTER cluster_name] + [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [CONST|READONLY|WRITABLE|CHANGEABLE_IN_READONLY] | INHERIT 'profile_name'] [,...] + [TO {{role1 | user1 [, role2 | user2 ...]} | NONE | ALL | ALL EXCEPT {role1 | user1 [, role2 | user2 ...]}}] +``` diff --git a/docs/ja/sql-reference/statements/alter/skipping-index.md b/docs/ja/sql-reference/statements/alter/skipping-index.md new file mode 100644 index 00000000000..b41749a7ae8 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/skipping-index.md @@ -0,0 +1,33 @@ +--- +slug: /ja/sql-reference/statements/alter/skipping-index + +toc_hidden_folder: true +sidebar_position: 42 +sidebar_label: INDEX +--- + +# データスキップインデックスã®æ“作 + +以下ã®æ“作ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +## ADD INDEX + +`ALTER TABLE [db.]table_name [ON CLUSTER cluster] ADD INDEX [IF NOT EXISTS] name expression TYPE type [GRANULARITY value] [FIRST|AFTER name]` - テーブルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®èª¬æ˜Žã‚’追加ã—ã¾ã™ã€‚ + +## DROP INDEX + +`ALTER TABLE [db.]table_name [ON CLUSTER cluster] DROP INDEX [IF EXISTS] name` - テーブルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®èª¬æ˜Žã‚’削除ã—ã€ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’削除ã—ã¾ã™ã€‚[ミューテーション](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## MATERIALIZE INDEX + +`ALTER TABLE [db.]table_name [ON CLUSTER cluster] MATERIALIZE INDEX [IF EXISTS] name [IN PARTITION partition_name]` - 指定ã•ã‚ŒãŸ`partition_name`ã«å¯¾ã—ã¦äºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹`name`ã‚’å†æ§‹ç¯‰ã—ã¾ã™ã€‚[ミューテーション](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚`IN PARTITION`部分ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€ãƒ†ãƒ¼ãƒ–ル全体ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’å†æ§‹ç¯‰ã—ã¾ã™ã€‚ + +## CLEAR INDEX + +`ALTER TABLE [db.]table_name [ON CLUSTER cluster] CLEAR INDEX [IF EXISTS] name [IN PARTITION partition_name]` - ディスクã‹ã‚‰äºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’削除ã—ã¾ã™ãŒã€èª¬æ˜Žã¯å‰Šé™¤ã—ã¾ã›ã‚“。[ミューテーション](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +コマンド`ADD`ã€`DROP`ã€`CLEAR`ã¯è»½é‡ã§ã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›´ã‚„ファイルã®å‰Šé™¤ã®ã¿ã‚’è¡Œã„ã¾ã™ã€‚ã¾ãŸã€ã“れらã¯ãƒ¬ãƒ—リケートã•ã‚Œã¦ãŠã‚Šã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’ClickHouse Keeperã‚„ZooKeeperを通ã˜ã¦åŒæœŸã—ã¾ã™ã€‚ + +:::note +インデックスæ“作ã¯ã€[`*MergeTree`](/docs/ja/engines/table-engines/mergetree-family/mergetree.md)エンジン([replicated](/docs/ja/engines/table-engines/mergetree-family/replication.md)ãƒãƒªã‚¢ãƒ³ãƒˆã‚’å«ã‚€ï¼‰ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: diff --git a/docs/ja/sql-reference/statements/alter/statistics.md b/docs/ja/sql-reference/statements/alter/statistics.md new file mode 100644 index 00000000000..e02c59645cf --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/statistics.md @@ -0,0 +1,36 @@ +--- +slug: /ja/sql-reference/statements/alter/statistics +sidebar_position: 45 +sidebar_label: STATISTICS +--- + +# カラム統計ã®æ“作 + +以下ã®æ“作ãŒåˆ©ç”¨å¯èƒ½ã§ã™: + +- `ALTER TABLE [db].table ADD STATISTICS [IF NOT EXISTS] (カラムリスト) TYPE (種類リスト)` - 統計ã®èª¬æ˜Žã‚’テーブルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«è¿½åŠ ã—ã¾ã™ã€‚ + +- `ALTER TABLE [db].table MODIFY STATISTICS (カラムリスト) TYPE (種類リスト)` - 統計ã®èª¬æ˜Žã‚’テーブルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«å¤‰æ›´ã—ã¾ã™ã€‚ + +- `ALTER TABLE [db].table DROP STATISTICS [IF EXISTS] (カラムリスト)` - 指定ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰çµ±è¨ˆã‚’削除ã—ã€æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å…¨ãƒ‘ーツã®çµ±è¨ˆã‚ªãƒ–ジェクトをã™ã¹ã¦å‰Šé™¤ã—ã¾ã™ã€‚ + +- `ALTER TABLE [db].table CLEAR STATISTICS [IF EXISTS] (カラムリスト)` - 指定ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å…¨ãƒ‘ーツã®çµ±è¨ˆã‚ªãƒ–ジェクトをã™ã¹ã¦å‰Šé™¤ã—ã¾ã™ã€‚統計オブジェクト㯠`ALTER TABLE MATERIALIZE STATISTICS` を使用ã—ã¦å†æ§‹ç¯‰ã§ãã¾ã™ã€‚ + +- `ALTER TABLE [db.]table MATERIALIZE STATISTICS [IF EXISTS] (カラムリスト)` - カラムã®çµ±è¨ˆã‚’å†æ§‹ç¯‰ã—ã¾ã™ã€‚[ミューテーション](../../../sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +最åˆã®2ã¤ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›´ã‚„ファイルã®å‰Šé™¤ã®ã¿ã‚’è¡Œã†ãŸã‚ã€è»½é‡ã§ã™ã€‚ + +ã¾ãŸã€ã“れらã¯ZooKeeperを介ã—ã¦çµ±è¨ˆãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’åŒæœŸã™ã‚‹ãƒ¬ãƒ—リケーションãŒè¡Œã‚ã‚Œã¾ã™ã€‚ + +## 例: + +2ã¤ã®çµ±è¨ˆã‚¿ã‚¤ãƒ—ã‚’2ã¤ã®ã‚«ãƒ©ãƒ ã«è¿½åŠ ã™ã‚‹ä¾‹: + +``` +ALTER TABLE t1 MODIFY STATISTICS c, d TYPE TDigest, Uniq; +``` + +:::note +統計ã¯ã€é«˜åº¦ãª*MergeTree([レプリケート](../../../engines/table-engines/mergetree-family/replication.md)ãƒãƒªã‚¢ãƒ³ãƒˆã‚’å«ã‚€ï¼‰ã‚¨ãƒ³ã‚¸ãƒ³ãƒ†ãƒ¼ãƒ–ルã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +::: + diff --git a/docs/ja/sql-reference/statements/alter/ttl.md b/docs/ja/sql-reference/statements/alter/ttl.md new file mode 100644 index 00000000000..1d40590a5fa --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/ttl.md @@ -0,0 +1,90 @@ +--- +slug: /ja/sql-reference/statements/alter/ttl +sidebar_position: 44 +sidebar_label: TTL +--- + +# テーブルã®TTLæ“作 + +:::note +å¤ã„データを管ç†ã™ã‚‹ãŸã‚ã®TTLã®ä½¿ç”¨ã«é–¢ã™ã‚‹è©³ç´°ã‚’ãŠæŽ¢ã—ã®å ´åˆã¯ã€[TTLã§ãƒ‡ãƒ¼ã‚¿ã‚’管ç†ã™ã‚‹](/docs/ja/guides/developer/ttl.md)ユーザーガイドをå‚ç…§ã—ã¦ãã ã•ã„。以下ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯ã€æ—¢å­˜ã®TTLルールを変更ã¾ãŸã¯å‰Šé™¤ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚ +::: + +## MODIFY TTL + +[テーブルTTL](../../../engines/table-engines/mergetree-family/mergetree.md#mergetree-table-ttl)を以下ã®å½¢å¼ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§å¤‰æ›´ã§ãã¾ã™: + +``` sql +ALTER TABLE [db.]table_name [ON CLUSTER cluster] MODIFY TTL ttl_expression; +``` + +## REMOVE TTL + +テーブルã‹ã‚‰TTLプロパティを削除ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¾ã™: + +```sql +ALTER TABLE [db.]table_name [ON CLUSTER cluster] REMOVE TTL +``` + +**例** + +テーブル`TTL`ãŒã‚ã‚‹å ´åˆ: + +```sql +CREATE TABLE table_with_ttl +( + event_time DateTime, + UserID UInt64, + Comment String +) +ENGINE MergeTree() +ORDER BY tuple() +TTL event_time + INTERVAL 3 MONTH +SETTINGS min_bytes_for_wide_part = 0; + +INSERT INTO table_with_ttl VALUES (now(), 1, 'username1'); + +INSERT INTO table_with_ttl VALUES (now() - INTERVAL 4 MONTH, 2, 'username2'); +``` + +`OPTIMIZE`を実行ã—ã¦`TTL`ã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—を強制ã™ã‚‹: + +```sql +OPTIMIZE TABLE table_with_ttl FINAL; +SELECT * FROM table_with_ttl FORMAT PrettyCompact; +``` +2行目ã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰å‰Šé™¤ã•ã‚Œã¾ã—ãŸã€‚ + +```text +┌─────────event_time────┬──UserID─┬─────Comment──┠+│ 2020-12-11 12:44:57 │ 1 │ username1 │ +└───────────────────────┴─────────┴──────────────┘ +``` + +以下ã®ã‚¯ã‚¨ãƒªã§ãƒ†ãƒ¼ãƒ–ル`TTL`を削除ã—ã¾ã™: + +```sql +ALTER TABLE table_with_ttl REMOVE TTL; +``` + +削除ã•ã‚ŒãŸè¡Œã‚’å†æŒ¿å…¥ã—ã€`OPTIMIZE`ã§å†åº¦`TTL`ã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—を強制ã—ã¾ã™: + +```sql +INSERT INTO table_with_ttl VALUES (now() - INTERVAL 4 MONTH, 2, 'username2'); +OPTIMIZE TABLE table_with_ttl FINAL; +SELECT * FROM table_with_ttl FORMAT PrettyCompact; +``` + +`TTL`ã¯ã‚‚ã†å­˜åœ¨ã—ãªã„ãŸã‚ã€2行目ã¯å‰Šé™¤ã•ã‚Œã¾ã›ã‚“: + +```text +┌─────────event_time────┬──UserID─┬─────Comment──┠+│ 2020-12-11 12:44:57 │ 1 │ username1 │ +│ 2020-08-11 12:44:57 │ 2 │ username2 │ +└───────────────────────┴─────────┴──────────────┘ +``` + +**関連項目** + +- [TTLå¼](../../../sql-reference/statements/create/table.md#ttl-expression)ã®è©³ç´°ã€‚ +- [TTL付ã](../../../sql-reference/statements/alter/column.md#alter_modify-column)ã§ã‚«ãƒ©ãƒ ã‚’修正。 diff --git a/docs/ja/sql-reference/statements/alter/update.md b/docs/ja/sql-reference/statements/alter/update.md new file mode 100644 index 00000000000..fd6676f64f3 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/update.md @@ -0,0 +1,34 @@ +--- +slug: /ja/sql-reference/statements/alter/update +sidebar_position: 40 +sidebar_label: UPDATE +--- + +# ALTER TABLE ... UPDATE æ–‡ + +``` sql +ALTER TABLE [db.]table [ON CLUSTER cluster] UPDATE column1 = expr1 [, ...] [IN PARTITION partition_id] WHERE filter_expr +``` + +指定ã•ã‚ŒãŸãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°å¼ã«ä¸€è‡´ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’æ“作ã—ã¾ã™ã€‚ã“ã‚Œã¯[mutation](/docs/ja/sql-reference/statements/alter/index.md#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +:::note +`ALTER TABLE`ã¨ã„ã†ãƒ—レフィックスãŒä»˜ã„ã¦ã„ã‚‹ã“ã¨ã§ã€SQLをサãƒãƒ¼ãƒˆã™ã‚‹ä»–ã®å¤šãã®ã‚·ã‚¹ãƒ†ãƒ ã¨ã¯ç•°ãªã‚‹æ§‹æ–‡ã¨ãªã£ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€OLTPデータベースã®é¡žä¼¼ã—ãŸã‚¯ã‚¨ãƒªã¨ç•°ãªã‚Šã€é »ç¹ãªä½¿ç”¨ã‚’目的ã¨ã—ãªã„é‡ã„æ“作ã§ã‚ã‚‹ã“ã¨ã‚’示ã™ãŸã‚ã«æ„図ã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +`filter_expr`ã¯åž‹`UInt8`ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯ã€`filter_expr`ãŒã‚¼ãƒ­ä»¥å¤–ã®å€¤ã‚’å–ã‚‹è¡Œã®æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®å€¤ã‚’対応ã™ã‚‹å¼ã®å€¤ã«æ›´æ–°ã—ã¾ã™ã€‚値ã¯`CAST`演算å­ã‚’使用ã—ã¦ã‚«ãƒ©ãƒ åž‹ã«ã‚­ãƒ£ã‚¹ãƒˆã•ã‚Œã¾ã™ã€‚主キーã¾ãŸã¯ãƒ‘ーティションキーã®è¨ˆç®—ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã‚’æ›´æ–°ã™ã‚‹ã“ã¨ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +1ã¤ã®ã‚¯ã‚¨ãƒªã«ã¯ã€ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚ŒãŸè¤‡æ•°ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +クエリ処ç†ã®åŒæœŸæ€§ã¯ã€[mutations_sync](/docs/ja/operations/settings/settings.md/#mutations_sync)設定ã«ã‚ˆã£ã¦å®šç¾©ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯éžåŒæœŸã§ã™ã€‚ + +**関連情報** + +- [Mutations](/docs/ja/sql-reference/statements/alter/index.md#mutations) +- [ALTER クエリã®åŒæœŸæ€§](/docs/ja/sql-reference/statements/alter/index.md#synchronicity-of-alter-queries) +- [mutations_sync](/docs/ja/operations/settings/settings.md/#mutations_sync) 設定 + + +## 関連コンテンツ + +- ブログ: [ClickHouseã§ã®æ›´æ–°ã¨å‰Šé™¤ã®å‡¦ç†](https://clickhouse.com/blog/handling-updates-and-deletes-in-clickhouse) diff --git a/docs/ja/sql-reference/statements/alter/user.md b/docs/ja/sql-reference/statements/alter/user.md new file mode 100644 index 00000000000..991b2d9f10b --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/user.md @@ -0,0 +1,104 @@ +--- +slug: /ja/sql-reference/statements/alter/user +sidebar_position: 45 +sidebar_label: USER +title: "ALTER USER" +--- + +ClickHouseユーザーアカウントを変更ã—ã¾ã™ã€‚ + +構文: + +``` sql +ALTER USER [IF EXISTS] name1 [RENAME TO new_name |, name2 [,...]] + [ON CLUSTER cluster_name] + [NOT IDENTIFIED | RESET AUTHENTICATION METHODS TO NEW | {IDENTIFIED | ADD IDENTIFIED} {[WITH {plaintext_password | sha256_password | sha256_hash | double_sha1_password | double_sha1_hash}] BY {'password' | 'hash'}} | WITH NO_PASSWORD | {WITH ldap SERVER 'server_name'} | {WITH kerberos [REALM 'realm']} | {WITH ssl_certificate CN 'common_name' | SAN 'TYPE:subject_alt_name'} | {WITH ssh_key BY KEY 'public_key' TYPE 'ssh-rsa|...'} | {WITH http SERVER 'server_name' [SCHEME 'Basic']} [VALID UNTIL datetime] + [, {[{plaintext_password | sha256_password | sha256_hash | ...}] BY {'password' | 'hash'}} | {ldap SERVER 'server_name'} | {...} | ... [,...]]] + [[ADD | DROP] HOST {LOCAL | NAME 'name' | REGEXP 'name_regexp' | IP 'address' | LIKE 'pattern'} [,...] | ANY | NONE] + [VALID UNTIL datetime] + [DEFAULT ROLE role [,...] | ALL | ALL EXCEPT role [,...] ] + [GRANTEES {user | role | ANY | NONE} [,...] [EXCEPT {user | role} [,...]]] + [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY | WRITABLE] | PROFILE 'profile_name'] [,...] +``` + +`ALTER USER`を使用ã™ã‚‹ã«ã¯ã€[ALTER USER](../../../sql-reference/statements/grant.md#access-management)権é™ãŒå¿…è¦ã§ã™ã€‚ + +## GRANTEESå¥ + +ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¿…è¦ãªã™ã¹ã¦ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’[GRANT OPTION](../../../sql-reference/statements/grant.md#granting-privilege-syntax)ã§ä»˜ä¸Žã•ã‚ŒãŸæ¡ä»¶ä¸‹ã§ã€ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰[特権](../../../sql-reference/statements/grant.md#privileges)ã‚’å—ã‘å–ã‚‹ã“ã¨ã‚’許å¯ã•ã‚Œã¦ã„るユーザーã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã‚’指定ã—ã¾ã™ã€‚`GRANTEES`å¥ã®ã‚ªãƒ—ションã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +- `user` — ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒç‰¹æ¨©ã‚’付与ã§ãるユーザーを指定ã—ã¾ã™ã€‚ +- `role` — ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒç‰¹æ¨©ã‚’付与ã§ãるロールを指定ã—ã¾ã™ã€‚ +- `ANY` — ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯èª°ã«ã§ã‚‚特権を付与ã§ãã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šã§ã™ã€‚ +- `NONE` — ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯èª°ã«ã‚‚特権を付与ã§ãã¾ã›ã‚“。 + +`EXCEPT`å¼ã‚’使用ã™ã‚‹ã“ã¨ã§ã€ä»»æ„ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã‚’除外ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例:`ALTER USER user1 GRANTEES ANY EXCEPT user2`。ã“ã‚Œã¯ã€`user1`ãŒ`GRANT OPTION`ã§ä»˜ä¸Žã•ã‚ŒãŸç‰¹æ¨©ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€ãã®ç‰¹æ¨©ã‚’`user2`を除ã誰ã«ã§ã‚‚付与ã§ãã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +## 例 + +割り当ã¦ã‚‰ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã‚’デフォルトã«è¨­å®š: + +``` sql +ALTER USER user DEFAULT ROLE role1, role2 +``` + +ユーザーã«ãƒ­ãƒ¼ãƒ«ãŒä»¥å‰ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +割り当ã¦ã‚‰ã‚ŒãŸã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ã‚’デフォルトã«è¨­å®š: + +``` sql +ALTER USER user DEFAULT ROLE ALL +``` + +å°†æ¥ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ãƒ­ãƒ¼ãƒ«ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹å ´åˆã€ãã‚Œã¯è‡ªå‹•çš„ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã«ãªã‚Šã¾ã™ã€‚ + +`role1`ãŠã‚ˆã³`role2`を除ãã™ã¹ã¦ã®å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã‚’デフォルトã«è¨­å®š: + +``` sql +ALTER USER user DEFAULT ROLE ALL EXCEPT role1, role2 +``` + +`john`アカウントをæŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ`jack`アカウントをæŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ç‰¹æ¨©ã‚’付与ã™ã‚‹ã“ã¨ã‚’許å¯: + +``` sql +ALTER USER john GRANTEES jack; +``` + +既存ã®èªè¨¼æ–¹æ³•ã‚’ä¿æŒã—ãªãŒã‚‰ã€æ–°ã—ã„èªè¨¼æ–¹æ³•ã‚’ユーザーã«è¿½åŠ : + +``` sql +ALTER USER user1 ADD IDENTIFIED WITH plaintext_password by '1', bcrypt_password by '2', plaintext_password by '3' +``` + +注æ„事項: +1. å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ClickHouseã¯è¤‡æ•°ã®èªè¨¼æ–¹æ³•ã®æ§‹æ–‡ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãã®ãŸã‚ã€ClickHouseサーãƒãƒ¼ã«ãã®ã‚ˆã†ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå«ã¾ã‚Œã¦ã„ã¦ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã•ã‚ŒãŸå ´åˆã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä½¿ç”¨ä¸èƒ½ã«ãªã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼é–¢é€£ã®æ“作ãŒä¸€éƒ¨å¤±æ•—ã—ã¾ã™ã€‚スムーズã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰å‰ã«ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’å˜ä¸€ã®èªè¨¼æ–¹æ³•ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã‚ã‚‹ã„ã¯ã€é©åˆ‡ãªæ‰‹ç¶šãを経ãšã«ã‚µãƒ¼ãƒãƒ¼ãŒãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã•ã‚ŒãŸå ´åˆã€å•é¡Œã®ã‚るユーザーを削除ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +2. セキュリティã®ç†ç”±ã‹ã‚‰ã€`no_password`ã¯ä»–ã®èªè¨¼æ–¹æ³•ã¨å…±å­˜ã§ãã¾ã›ã‚“。ãã®ãŸã‚ã€`no_password`èªè¨¼æ–¹æ³•ã‚’`ADD`ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。以下ã®ã‚¯ã‚¨ãƒªã¯ã‚¨ãƒ©ãƒ¼ã‚’スローã—ã¾ã™ï¼š + +``` sql +ALTER USER user1 ADD IDENTIFIED WITH no_password +``` + +ユーザーã®èªè¨¼æ–¹æ³•ã‚’削除ã—ã¦`no_password`ã«ä¾å­˜ã™ã‚‹å ´åˆã¯ã€ä¸‹è¨˜ã®ç½®æ›å½¢å¼ã§æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +èªè¨¼æ–¹æ³•ã‚’リセットã—ã€ã‚¯ã‚¨ãƒªã§æŒ‡å®šã•ã‚ŒãŸã‚‚ã®ã‚’追加(ADDキーワードãªã—ã§ã®IDENTIFIEDã®åŠ¹æžœï¼‰: + +``` sql +ALTER USER user1 IDENTIFIED WITH plaintext_password by '1', bcrypt_password by '2', plaintext_password by '3' +``` + +èªè¨¼æ–¹æ³•ã‚’リセットã—ã€æœ€æ–°ã®è¿½åŠ ã‚’ä¿æŒ: + +``` sql +ALTER USER user1 RESET AUTHENTICATION METHODS TO NEW +``` + +## VALID UNTILå¥ + +èªè¨¼æ–¹æ³•ã«æœ‰åŠ¹æœŸé™ã®æ—¥ä»˜ã€ãŠã‚ˆã³ã‚ªãƒ—ションã§æ™‚刻を指定ã§ãã¾ã™ã€‚パラメータã¨ã—ã¦æ–‡å­—列をå—ã‘入れã¾ã™ã€‚日時ã®å½¢å¼ã«ã¯`YYYY-MM-DD [hh:mm:ss] [timezone]`ã®ä½¿ç”¨ã‚’推奨ã—ã¾ã™ã€‚デフォルトã§ã¯ã€ã“ã®ãƒ‘ラメータã¯`'infinity'`ã§ã™ã€‚`VALID UNTIL`å¥ã¯ã€ã‚¯ã‚¨ãƒªã§èªè¨¼æ–¹æ³•ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã‚’除ã„ã¦ã€èªè¨¼æ–¹æ³•ã¨ã¨ã‚‚ã«ã®ã¿æŒ‡å®šã§ãã¾ã™ã€‚ã“ã®ã‚·ãƒŠãƒªã‚ªã§ã¯ã€`VALID UNTIL`å¥ã¯æ—¢å­˜ã®ã™ã¹ã¦ã®èªè¨¼æ–¹æ³•ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +例: + +- `ALTER USER name1 VALID UNTIL '2025-01-01'` +- `ALTER USER name1 VALID UNTIL '2025-01-01 12:00:00 UTC'` +- `ALTER USER name1 VALID UNTIL 'infinity'` +- `ALTER USER name1 IDENTIFIED WITH plaintext_password BY 'no_expiration', bcrypt_password BY 'expiration_set' VALID UNTIL '2025-01-01'` diff --git a/docs/ja/sql-reference/statements/alter/view.md b/docs/ja/sql-reference/statements/alter/view.md new file mode 100644 index 00000000000..575407ef52c --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/view.md @@ -0,0 +1,199 @@ +--- +slug: /ja/sql-reference/statements/alter/view +sidebar_position: 50 +sidebar_label: VIEW +--- + +# ALTER TABLE ... MODIFY QUERY ステートメント + +`ALTER TABLE ... MODIFY QUERY` ステートメントを使用ã—ã¦ã€[マテリアライズドビュー](../create/view.md#materialized)ãŒä½œæˆã•ã‚ŒãŸã¨ãã«æŒ‡å®šã•ã‚ŒãŸ `SELECT` クエリをã€ãƒ‡ãƒ¼ã‚¿ã®å–ã‚Šè¾¼ã¿ãƒ—ロセスを中断ã™ã‚‹ã“ã¨ãªã変更ã§ãã¾ã™ã€‚ + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€`TO [db.]name` å¥ã§ä½œæˆã•ã‚ŒãŸãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを変更ã™ã‚‹ãŸã‚ã«ä½œæˆã•ã‚Œã¾ã—ãŸã€‚ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã§ã¯ã€åŸºã¨ãªã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ†ãƒ¼ãƒ–ルã®æ§‹é€ ã‚„ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®ã‚«ãƒ©ãƒ å®šç¾©ã‚’変更ã—ã¾ã›ã‚“。ãã®ãŸã‚ã€`TO [db.]name` å¥ã‚’使用ã›ãšã«ä½œæˆã•ã‚ŒãŸãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã«å¯¾ã—ã¦ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã®é©ç”¨ã¯éžå¸¸ã«é™å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**TO テーブルを使用ã—ãŸä¾‹** + +```sql +CREATE TABLE events (ts DateTime, event_type String) +ENGINE = MergeTree ORDER BY (event_type, ts); + +CREATE TABLE events_by_day (ts DateTime, event_type String, events_cnt UInt64) +ENGINE = SummingMergeTree ORDER BY (event_type, ts); + +CREATE MATERIALIZED VIEW mv TO events_by_day AS +SELECT toStartOfDay(ts) ts, event_type, count() events_cnt +FROM events +GROUP BY ts, event_type; + +INSERT INTO events +SELECT Date '2020-01-01' + interval number * 900 second, + ['imp', 'click'][number%2+1] +FROM numbers(100); + +SELECT ts, event_type, sum(events_cnt) +FROM events_by_day +GROUP BY ts, event_type +ORDER BY ts, event_type; + +┌──────────────────ts─┬─event_type─┬─sum(events_cnt)─┠+│ 2020-01-01 00:00:00 │ click │ 48 │ +│ 2020-01-01 00:00:00 │ imp │ 48 │ +│ 2020-01-02 00:00:00 │ click │ 2 │ +│ 2020-01-02 00:00:00 │ imp │ 2 │ +└─────────────────────┴────────────┴─────────────────┘ + +-- æ–°ã—ã„測定項目 `cost` ã¨æ–°ã—ã„次元 `browser` を追加ã—ã¾ã™ã€‚ + +ALTER TABLE events + ADD COLUMN browser String, + ADD COLUMN cost Float64; + +-- カラムã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¨TO +-- (移動先テーブル)ã§ä¸€è‡´ã™ã‚‹å¿…è¦ã¯ãªã„ãŸã‚ã€æ¬¡ã®ã‚¢ãƒ«ã‚¿ãƒ¼ã¯æŒ¿å…¥ã‚’壊ã—ã¾ã›ã‚“。 + +ALTER TABLE events_by_day + ADD COLUMN cost Float64, + ADD COLUMN browser String after event_type, + MODIFY ORDER BY (event_type, ts, browser); + +INSERT INTO events +SELECT Date '2020-01-02' + interval number * 900 second, + ['imp', 'click'][number%2+1], + ['firefox', 'safary', 'chrome'][number%3+1], + 10/(number+1)%33 +FROM numbers(100); + +-- æ–°ã—ã„カラム `browser` 㨠`cost` ã¯ã¾ã ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã§å¤‰æ›´ã—ã¦ã„ãªã„ãŸã‚空ã§ã™ã€‚ + +SELECT ts, event_type, browser, sum(events_cnt) events_cnt, round(sum(cost),2) cost +FROM events_by_day +GROUP BY ts, event_type, browser +ORDER BY ts, event_type; + +┌──────────────────ts─┬─event_type─┬─browser─┬─events_cnt─┬─cost─┠+│ 2020-01-01 00:00:00 │ click │ │ 48 │ 0 │ +│ 2020-01-01 00:00:00 │ imp │ │ 48 │ 0 │ +│ 2020-01-02 00:00:00 │ click │ │ 50 │ 0 │ +│ 2020-01-02 00:00:00 │ imp │ │ 50 │ 0 │ +│ 2020-01-03 00:00:00 │ click │ │ 2 │ 0 │ +│ 2020-01-03 00:00:00 │ imp │ │ 2 │ 0 │ +└─────────────────────┴────────────┴─────────┴────────────┴──────┘ + +ALTER TABLE mv MODIFY QUERY + SELECT toStartOfDay(ts) ts, event_type, browser, + count() events_cnt, + sum(cost) cost + FROM events + GROUP BY ts, event_type, browser; + +INSERT INTO events +SELECT Date '2020-01-03' + interval number * 900 second, + ['imp', 'click'][number%2+1], + ['firefox', 'safary', 'chrome'][number%3+1], + 10/(number+1)%33 +FROM numbers(100); + +SELECT ts, event_type, browser, sum(events_cnt) events_cnt, round(sum(cost),2) cost +FROM events_by_day +GROUP BY ts, event_type, browser +ORDER BY ts, event_type; + +┌──────────────────ts─┬─event_type─┬─browser─┬─events_cnt─┬──cost─┠+│ 2020-01-01 00:00:00 │ click │ │ 48 │ 0 │ +│ 2020-01-01 00:00:00 │ imp │ │ 48 │ 0 │ +│ 2020-01-02 00:00:00 │ click │ │ 50 │ 0 │ +│ 2020-01-02 00:00:00 │ imp │ │ 50 │ 0 │ +│ 2020-01-03 00:00:00 │ click │ firefox │ 16 │ 6.84 │ +│ 2020-01-03 00:00:00 │ click │ │ 2 │ 0 │ +│ 2020-01-03 00:00:00 │ click │ safary │ 16 │ 9.82 │ +│ 2020-01-03 00:00:00 │ click │ chrome │ 16 │ 5.63 │ +│ 2020-01-03 00:00:00 │ imp │ │ 2 │ 0 │ +│ 2020-01-03 00:00:00 │ imp │ firefox │ 16 │ 15.14 │ +│ 2020-01-03 00:00:00 │ imp │ safary │ 16 │ 6.14 │ +│ 2020-01-03 00:00:00 │ imp │ chrome │ 16 │ 7.89 │ +│ 2020-01-04 00:00:00 │ click │ safary │ 1 │ 0.1 │ +│ 2020-01-04 00:00:00 │ click │ firefox │ 1 │ 0.1 │ +│ 2020-01-04 00:00:00 │ imp │ firefox │ 1 │ 0.1 │ +│ 2020-01-04 00:00:00 │ imp │ chrome │ 1 │ 0.1 │ +└─────────────────────┴────────────┴─────────┴────────────┴───────┘ + +-- !!! `MODIFY ORDER BY` ã«ã‚ˆã£ã¦ã€ä¸»ã‚­ãƒ¼ãŒæš—黙的ã«å°Žå…¥ã•ã‚Œã¾ã—ãŸã€‚ + +SHOW CREATE TABLE events_by_day FORMAT TSVRaw + +CREATE TABLE test.events_by_day +( + `ts` DateTime, + `event_type` String, + `browser` String, + `events_cnt` UInt64, + `cost` Float64 +) +ENGINE = SummingMergeTree +PRIMARY KEY (event_type, ts) +ORDER BY (event_type, ts, browser) +SETTINGS index_granularity = 8192 + +-- !!! カラムã®å®šç¾©ã¯å¤‰æ›´ã•ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€ãã‚Œã¯å•é¡Œã§ã¯ã‚ã‚Šã¾ã›ã‚“。クエリを発行ã™ã‚‹ã®ã¯ +-- マテリアライズドビューã§ã¯ãªãã€TO(ストレージ)テーブルã§ã™ã€‚ +-- SELECT セクションãŒæ›´æ–°ã•ã‚Œã¾ã—ãŸã€‚ + +SHOW CREATE TABLE mv FORMAT TSVRaw; + +CREATE MATERIALIZED VIEW test.mv TO test.events_by_day +( + `ts` DateTime, + `event_type` String, + `events_cnt` UInt64 +) AS +SELECT + toStartOfDay(ts) AS ts, + event_type, + browser, + count() AS events_cnt, + sum(cost) AS cost +FROM test.events +GROUP BY + ts, + event_type, + browser +``` + +**TO テーブルを使用ã—ãªã„å ´åˆã®ä¾‹** + +使用ã¯éžå¸¸ã«é™å®šçš„ã§ã‚ã‚Šã€æ–°ã—ã„カラムを追加ã™ã‚‹ã“ã¨ãªã `SELECT` セクションã ã‘を変更ã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE src_table (`a` UInt32) ENGINE = MergeTree ORDER BY a; +CREATE MATERIALIZED VIEW mv (`a` UInt32) ENGINE = MergeTree ORDER BY a AS SELECT a FROM src_table; +INSERT INTO src_table (a) VALUES (1), (2); +SELECT * FROM mv; +``` +```text +┌─a─┠+│ 1 │ +│ 2 │ +└───┘ +``` +```sql +ALTER TABLE mv MODIFY QUERY SELECT a * 2 as a FROM src_table; +INSERT INTO src_table (a) VALUES (3), (4); +SELECT * FROM mv; +``` +```text +┌─a─┠+│ 6 │ +│ 8 │ +└───┘ +┌─a─┠+│ 1 │ +│ 2 │ +└───┘ +``` + +## ALTER LIVE VIEW ステートメント + +`ALTER LIVE VIEW ... REFRESH` ステートメントã¯ã€[ライブビュー](../create/view.md#live-view)ã‚’æ›´æ–°ã—ã¾ã™ã€‚詳細ã¯[ライブビューã®å¼·åˆ¶æ›´æ–°](../create/view.md#live-view-alter-refresh)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## ALTER TABLE ... MODIFY REFRESH ステートメント + +`ALTER TABLE ... MODIFY REFRESH` ステートメントã¯ã€[リフレッシュå¯èƒ½ãªãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ュー](../create/view.md#refreshable-materialized-view)ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ãƒ‘ラメータを変更ã—ã¾ã™ã€‚詳細ã¯[リフレッシュパラメータã®å¤‰æ›´](../create/view.md#changing-refresh-parameters)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/sql-reference/statements/attach.md b/docs/ja/sql-reference/statements/attach.md new file mode 100644 index 00000000000..35ff65e61c7 --- /dev/null +++ b/docs/ja/sql-reference/statements/attach.md @@ -0,0 +1,90 @@ +--- +slug: /ja/sql-reference/statements/attach +sidebar_position: 40 +sidebar_label: ATTACH +title: "ATTACH ステートメント" +--- + +データベースを別ã®ã‚µãƒ¼ãƒãƒ¼ã«ç§»å‹•ã™ã‚‹å ´åˆãªã©ã«ã€ãƒ†ãƒ¼ãƒ–ルやDictionaryをアタッãƒã—ã¾ã™ã€‚ + +**構文** + +``` sql +ATTACH TABLE|DICTIONARY|DATABASE [IF NOT EXISTS] [db.]name [ON CLUSTER cluster] ... +``` + +クエリã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ãƒ‡ãƒ¼ã‚¿ã‚’作æˆã›ãšã€ãƒ‡ãƒ¼ã‚¿ãŒé©åˆ‡ãªå ´æ‰€ã«æ—¢ã«ã‚ã‚‹ã¨ä»®å®šã—ã¦ã€æŒ‡å®šã—ãŸãƒ†ãƒ¼ãƒ–ルã€Dictionaryã€ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«é–¢ã™ã‚‹æƒ…報をサーãƒãƒ¼ã«è¿½åŠ ã—ã¾ã™ã€‚`ATTACH`クエリを実行ã—ãŸå¾Œã€ã‚µãƒ¼ãƒãƒ¼ã¯ãã®ãƒ†ãƒ¼ãƒ–ルã€Dictionaryã€ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®å­˜åœ¨ã‚’èªè­˜ã—ã¾ã™ã€‚ + +テーブルãŒä»¥å‰ã«åˆ‡ã‚Šé›¢ã•ã‚Œã¦ã„ãŸå ´åˆï¼ˆ[DETACH](../../sql-reference/statements/detach.md)クエリ)ã€ãã®æ§‹é€ ãŒæ—¢çŸ¥ã§ã‚ã‚‹ã“ã¨ã‚’æ„味ã™ã‚‹ã®ã§ã€æ§‹é€ ã‚’定義ã›ãšã«çœç•¥å½¢ã‚’使用ã§ãã¾ã™ã€‚ + +## 既存ã®ãƒ†ãƒ¼ãƒ–ルをアタッム+ +**構文** + +``` sql +ATTACH TABLE [IF NOT EXISTS] [db.]name [ON CLUSTER cluster] +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã‚µãƒ¼ãƒãƒ¼ã‚’開始ã™ã‚‹éš›ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚サーãƒãƒ¼ã¯ãƒ†ãƒ¼ãƒ–ルメタデータを`ATTACH`クエリã¨ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã¨ã—ã¦ä¿å­˜ã—ã€èµ·å‹•æ™‚ã«å˜ã«å®Ÿè¡Œã—ã¾ã™ï¼ˆã‚µãƒ¼ãƒãƒ¼ä¸Šã§æ˜Žç¤ºçš„ã«ä½œæˆã•ã‚Œã‚‹ä¸€éƒ¨ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルを除ã)。 + +テーブルãŒæ°¸ä¹…ã«åˆ‡ã‚Šé›¢ã•ã‚Œã¦ã„ãŸå ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã®èµ·å‹•æ™‚ã«ã¯å†ã‚¢ã‚¿ãƒƒãƒã•ã‚Œãªã„ãŸã‚ã€`ATTACH`クエリを明示的ã«ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## æ–°ã—ã„テーブルを作æˆã—データをアタッム+ +### テーブルデータã¸ã®æŒ‡å®šã•ã‚ŒãŸãƒ‘スを使用ã™ã‚‹å ´åˆ + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€æä¾›ã•ã‚ŒãŸæ§‹é€ ã§æ–°ã—ã„テーブルを作æˆã—ã€`user_files`ã«ã‚る指定ã•ã‚ŒãŸãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルデータをアタッãƒã—ã¾ã™ã€‚ + +**構文** + +```sql +ATTACH TABLE name FROM 'path/to/data/' (col1 Type1, ...) +``` + +**例** + +クエリ: + +```sql +DROP TABLE IF EXISTS test; +INSERT INTO TABLE FUNCTION file('01188_attach/test/data.TSV', 'TSV', 's String, n UInt8') VALUES ('test', 42); +ATTACH TABLE test FROM '01188_attach/test' (s String, n UInt8) ENGINE = File(TSV); +SELECT * FROM test; +``` +çµæžœ: + +```sql +┌─s────┬──n─┠+│ test │ 42 │ +└──────┴────┘ +``` + +### 指定ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルUUIDを使用ã™ã‚‹å ´åˆ + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€æä¾›ã•ã‚ŒãŸæ§‹é€ ã§æ–°ã—ã„テーブルを作æˆã—ã€æŒ‡å®šã•ã‚ŒãŸUUIDã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’アタッãƒã—ã¾ã™ã€‚ã“ã‚Œã¯[Atomic](../../engines/database-engines/atomic.md)データベースエンジンã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**構文** + +```sql +ATTACH TABLE name UUID '' (col1 Type1, ...) +``` + +## 既存ã®Dictionaryをアタッム+ +以å‰ã«åˆ‡ã‚Šé›¢ã•ã‚ŒãŸDictionaryをアタッãƒã—ã¾ã™ã€‚ + +**構文** + +``` sql +ATTACH DICTIONARY [IF NOT EXISTS] [db.]name [ON CLUSTER cluster] +``` + +## 既存ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’アタッム+ +以å‰ã«åˆ‡ã‚Šé›¢ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’アタッãƒã—ã¾ã™ã€‚ + +**構文** + +``` sql +ATTACH DATABASE [IF NOT EXISTS] name [ENGINE=] [ON CLUSTER cluster] +``` diff --git a/docs/ja/sql-reference/statements/check-table.md b/docs/ja/sql-reference/statements/check-table.md new file mode 100644 index 00000000000..ee42e282d72 --- /dev/null +++ b/docs/ja/sql-reference/statements/check-table.md @@ -0,0 +1,170 @@ +--- +slug: /ja/sql-reference/statements/check-table +sidebar_position: 41 +sidebar_label: CHECK TABLE +title: "CHECK TABLE ステートメント" +--- + +ClickHouse ã® `CHECK TABLE` クエリã¯ã€ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルã¾ãŸã¯ãã®ãƒ‘ーティションã«å¯¾ã—ã¦æ¤œè¨¼ã‚’è¡Œã†ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚„ãã®ä»–ã®å†…部データ構造を確èªã—ã¦ãƒ‡ãƒ¼ã‚¿ã®æ•´åˆæ€§ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ + +特ã«ã€å®Ÿéš›ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚µã‚¤ã‚ºã¨ã‚µãƒ¼ãƒãƒ¼ã«ä¿å­˜ã•ã‚Œã¦ã„る期待値を比較ã—ã¾ã™ã€‚ファイルサイズãŒä¿å­˜ã•ã‚Œã¦ã„る値ã¨ä¸€è‡´ã—ãªã„å ´åˆã€ãã‚Œã¯ãƒ‡ãƒ¼ã‚¿ãŒç ´æã—ã¦ã„ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œä¸­ã«ã‚·ã‚¹ãƒ†ãƒ ãŒã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹ãªã©ã®åŽŸå› ã§ç™ºç”Ÿã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +`CHECK TABLE` クエリã¯ãƒ†ãƒ¼ãƒ–ル内ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€å¯èƒ½æ€§ãŒã‚ã‚Šã€ãƒªã‚½ãƒ¼ã‚¹ã‚’å æœ‰ã™ã‚‹ãŸã‚ã€éžå¸¸ã«ãƒªã‚½ãƒ¼ã‚¹ã‚’消費ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹å‰ã«ãƒ‘フォーマンスãŠã‚ˆã³ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨çŽ‡ã¸ã®å½±éŸ¿ã‚’考慮ã—ã¦ãã ã•ã„。 +::: + +## 構文 + +クエリã®åŸºæœ¬çš„ãªæ§‹æ–‡ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```sql +CHECK TABLE table_name [PARTITION partition_expression | PART part_name] [FORMAT format] [SETTINGS check_query_single_value_result = (0|1) [, other_settings]] +``` + +- `table_name`: ãƒã‚§ãƒƒã‚¯ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®åå‰ã‚’指定ã—ã¾ã™ã€‚ +- `partition_expression`: (オプション) テーブルã®ç‰¹å®šã®ãƒ‘ーティションをãƒã‚§ãƒƒã‚¯ã—ãŸã„å ´åˆã€ã“ã®å¼ã‚’使用ã—ã¦ãƒ‘ーティションを指定ã—ã¾ã™ã€‚ +- `part_name`: (オプション) テーブル内ã®ç‰¹å®šã®ãƒ‘ートをãƒã‚§ãƒƒã‚¯ã—ãŸã„å ´åˆã€æ–‡å­—列リテラルを追加ã—ã¦ãƒ‘ートåを指定ã—ã¾ã™ã€‚ +- `FORMAT format`: (オプション) çµæžœã®å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’指定ã§ãã¾ã™ã€‚ +- `SETTINGS`: (オプション) 追加ã®è¨­å®šã‚’許å¯ã—ã¾ã™ã€‚ + - **`check_query_single_value_result`**: (オプション) 詳細ãªçµæžœ (`0`) ã¾ãŸã¯è¦ç´„ã•ã‚ŒãŸçµæžœ (`1`) を切り替ãˆã‚‹ãŸã‚ã®è¨­å®šã€‚ + - ä»–ã®è¨­å®šã‚‚é©ç”¨ã§ãã¾ã™ã€‚çµæžœã®é †åºã‚’予測å¯èƒ½ã«ã™ã‚‹å¿…è¦ãŒãªã„å ´åˆã€`max_threads` ã‚’1以上ã«è¨­å®šã—ã¦ã‚¯ã‚¨ãƒªã‚’高速化ã§ãã¾ã™ã€‚ + +クエリã®å¿œç­”ã¯ã€`check_query_single_value_result` 設定ã®å€¤ã«ä¾å­˜ã—ã¾ã™ã€‚ +`check_query_single_value_result = 1` ã®å ´åˆã€`result` カラムã«1è¡Œã®ã¿ãŒè¿”ã•ã‚Œã¾ã™ã€‚ã“ã®è¡Œã®å€¤ã¯ã€æ•´åˆæ€§ãƒã‚§ãƒƒã‚¯ã«åˆæ ¼ã—ãŸå ´åˆã¯ `1` ã§ã‚ã‚Šã€ãƒ‡ãƒ¼ã‚¿ãŒç ´æã—ã¦ã„ã‚‹å ´åˆã¯ `0` ã§ã™ã€‚ + +`check_query_single_value_result = 0` ã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯ä»¥ä¸‹ã®ã‚«ãƒ©ãƒ ã‚’è¿”ã—ã¾ã™ï¼š +- `part_path`: データパートã¾ãŸã¯ãƒ•ã‚¡ã‚¤ãƒ«åã¸ã®ãƒ‘スを示ã—ã¾ã™ã€‚ +- `is_passed`: ã“ã®ãƒ‘ートã®ãƒã‚§ãƒƒã‚¯ãŒæˆåŠŸã—ãŸå ´åˆã¯1ã€ãã†ã§ãªã„å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ã€‚ +- `message`: エラーやæˆåŠŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãªã©ã€ãƒã‚§ãƒƒã‚¯ã«é–¢é€£ã™ã‚‹è¿½åŠ ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€‚ + +`CHECK TABLE` クエリã¯ä»¥ä¸‹ã®ãƒ†ãƒ¼ãƒ–ルエンジンをサãƒãƒ¼ãƒˆã—ã¾ã™ï¼š + +- [Log](../../engines/table-engines/log-family/log.md) +- [TinyLog](../../engines/table-engines/log-family/tinylog.md) +- [StripeLog](../../engines/table-engines/log-family/stripelog.md) +- [MergeTree ファミリー](../../engines/table-engines/mergetree-family/mergetree.md) + +別ã®ãƒ†ãƒ¼ãƒ–ルエンジンをæŒã¤ãƒ†ãƒ¼ãƒ–ルã§å®Ÿè¡Œã™ã‚‹ã¨ã€`NOT_IMPLEMENTED` 例外ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +`*Log` ファミリーã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€éšœå®³æ™‚ã®è‡ªå‹•ãƒ‡ãƒ¼ã‚¿å›žå¾©ã‚’æä¾›ã—ã¾ã›ã‚“。`CHECK TABLE` クエリを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿æ失をタイムリーã«è¿½è·¡ã—ã¦ãã ã•ã„。 + +## 例 + +デフォルトã§ã¯ã€`CHECK TABLE` クエリã¯ãƒ†ãƒ¼ãƒ–ルã®ä¸€èˆ¬çš„ãªãƒã‚§ãƒƒã‚¯çŠ¶æ³ã‚’表示ã—ã¾ã™ï¼š + +```sql +CHECK TABLE test_table; +``` + +```text +┌─result─┠+│ 1 │ +└────────┘ +``` + +個々ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ートã”ã¨ã®ãƒã‚§ãƒƒã‚¯çŠ¶æ³ã‚’確èªã—ãŸã„å ´åˆã€`check_query_single_value_result` 設定を使用ã§ãã¾ã™ã€‚ + +ã¾ãŸã€ãƒ†ãƒ¼ãƒ–ルã®ç‰¹å®šã®ãƒ‘ーティションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã«ã¯ã€`PARTITION` キーワードを使用ã§ãã¾ã™ã€‚ + +```sql +CHECK TABLE t0 PARTITION ID '201003' +FORMAT PrettyCompactMonoBlock +SETTINGS check_query_single_value_result = 0 +``` + +出力: + +```text +┌─part_path────┬─is_passed─┬─message─┠+│ 201003_7_7_0 │ 1 │ │ +│ 201003_3_3_0 │ 1 │ │ +└──────────────┴───────────┴─────────┘ +``` + +åŒæ§˜ã«ã€ç‰¹å®šã®ãƒ‘ートをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã«ã¯ã€`PART` キーワードを使用ã—ã¾ã™ã€‚ + +```sql +CHECK TABLE t0 PART '201003_7_7_0' +FORMAT PrettyCompactMonoBlock +SETTINGS check_query_single_value_result = 0 +``` + +出力: + +```text +┌─part_path────┬─is_passed─┬─message─┠+│ 201003_7_7_0 │ 1 │ │ +└──────────────┴───────────┴─────────┘ +``` + +パートãŒå­˜åœ¨ã—ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ï¼š + +```sql +CHECK TABLE t0 PART '201003_111_222_0' +``` + +```text +DB::Exception: No such data part '201003_111_222_0' to check in table 'default.t0'. (NO_SUCH_DATA_PART) +``` + +### 'Corrupted' çµæžœã®å—ä¿¡ + +:::warning +å…責事項: ã“ã“ã§èª¬æ˜Žã™ã‚‹æ‰‹é †ã€ç‰¹ã«ãƒ‡ãƒ¼ã‚¿ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰ã®ç›´æŽ¥çš„ãªãƒ•ã‚¡ã‚¤ãƒ«ã®æ“作や削除ã¯ã€å®Ÿé¨“ã¾ãŸã¯é–‹ç™ºç’°å¢ƒã®ã¿ã‚’対象ã¨ã—ã¦ã„ã¾ã™ã€‚生産サーãƒãƒ¼ã§ã“れを行ã†ã¨ã€ãƒ‡ãƒ¼ã‚¿æ失やãã®ä»–ã®äºˆæœŸã›ã¬çµæžœã‚’æ‹›ãå¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€çµ¶å¯¾ã«è¡Œã‚ãªã„ã§ãã ã•ã„。 +::: + +既存ã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ ãƒ•ã‚¡ã‚¤ãƒ«ã‚’削除: + +```bash +rm /var/lib/clickhouse-server/data/default/t0/201003_3_3_0/checksums.txt +``` + +```sql +CHECK TABLE t0 PARTITION ID '201003' +FORMAT PrettyCompactMonoBlock +SETTINGS check_query_single_value_result = 0 +``` + +出力: + +```text +┌─part_path────┬─is_passed─┬─message──────────────────────────────────┠+│ 201003_7_7_0 │ 1 │ │ +│ 201003_3_3_0 │ 1 │ Checksums recounted and written to disk. │ +└──────────────┴───────────┴──────────────────────────────────────────┘ +``` + +checksums.txt ファイルãŒå­˜åœ¨ã—ãªã„å ´åˆã€ãれを復元ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ç‰¹å®šã®ãƒ‘ーティションã«å¯¾ã™ã‚‹ `CHECK TABLE` コマンドã®å®Ÿè¡Œä¸­ã«å†è¨ˆç®—ã•ã‚Œã€å†æ›¸ãè¾¼ã¿ã•ã‚Œã€ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã¯ 'is_passed = 1' ã¨ã—ã¦å ±å‘Šã•ã‚Œç¶šã‘ã¾ã™ã€‚ + +`(Replicated)MergeTree` テーブルをã™ã¹ã¦ä¸€åº¦ã«ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã«ã¯ã€`CHECK ALL TABLES` クエリを使用ã—ã¾ã™ã€‚ + +```sql +CHECK ALL TABLES +FORMAT PrettyCompactMonoBlock +SETTINGS check_query_single_value_result = 0 +``` + +```text +┌─database─┬─table────┬─part_path───┬─is_passed─┬─message─┠+│ default │ t2 │ all_1_95_3 │ 1 │ │ +│ db1 │ table_01 │ all_39_39_0 │ 1 │ │ +│ default │ t1 │ all_39_39_0 │ 1 │ │ +│ db1 │ t1 │ all_39_39_0 │ 1 │ │ +│ db1 │ table_01 │ all_1_6_1 │ 1 │ │ +│ default │ t1 │ all_1_6_1 │ 1 │ │ +│ db1 │ t1 │ all_1_6_1 │ 1 │ │ +│ db1 │ table_01 │ all_7_38_2 │ 1 │ │ +│ db1 │ t1 │ all_7_38_2 │ 1 │ │ +│ default │ t1 │ all_7_38_2 │ 1 │ │ +└──────────┴──────────┴─────────────┴───────────┴─────────┘ +``` + +## データãŒç ´æã—ã¦ã„ã‚‹å ´åˆ + +テーブルãŒç ´æã—ã¦ã„ã‚‹å ´åˆã€ç ´æã—ã¦ã„ãªã„データを別ã®ãƒ†ãƒ¼ãƒ–ルã«ã‚³ãƒ”ーã§ãã¾ã™ã€‚ã“れを行ã†ã«ã¯ï¼š + +1. æå‚·ã—ãŸãƒ†ãƒ¼ãƒ–ルã¨åŒã˜æ§‹é€ ã®æ–°ã—ã„テーブルを作æˆã—ã¾ã™ã€‚ã“ã®ãŸã‚ã«ã€ã‚¯ã‚¨ãƒª `CREATE TABLE AS ` を実行ã—ã¾ã™ã€‚ +2. 次ã®ã‚¯ã‚¨ãƒªã‚’å˜ä¸€ã‚¹ãƒ¬ãƒƒãƒ‰ã§å‡¦ç†ã™ã‚‹ãŸã‚ã« `max_threads` ã®å€¤ã‚’1ã«è¨­å®šã—ã¾ã™ã€‚ã“れを行ã†ãŸã‚ã«ã€ã‚¯ã‚¨ãƒª `SET max_threads = 1` を実行ã—ã¾ã™ã€‚ +3. クエリ `INSERT INTO SELECT * FROM ` を実行ã—ã¾ã™ã€‚ã“ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯æå‚·ã—ãŸãƒ†ãƒ¼ãƒ–ルã‹ã‚‰åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã«ç ´æã—ã¦ã„ãªã„データをコピーã—ã¾ã™ã€‚ç ´æ部分ã®å‰ã®ãƒ‡ãƒ¼ã‚¿ã®ã¿ãŒã‚³ãƒ”ーã•ã‚Œã¾ã™ã€‚ +4. `clickhouse-client` ã‚’å†èµ·å‹•ã—㦠`max_threads` ã®å€¤ã‚’リセットã—ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/create/database.md b/docs/ja/sql-reference/statements/create/database.md new file mode 100644 index 00000000000..01231d71f13 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/database.md @@ -0,0 +1,59 @@ +--- +slug: /ja/sql-reference/statements/create/database +sidebar_position: 35 +sidebar_label: DATABASE +--- + +# CREATE DATABASE + +æ–°ã—ã„データベースを作æˆã—ã¾ã™ã€‚ + +``` sql +CREATE DATABASE [IF NOT EXISTS] db_name [ON CLUSTER cluster] [ENGINE = engine(...)] [COMMENT 'Comment'] +``` + +## å¥ + +### IF NOT EXISTS + +`db_name` データベースãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€ClickHouseã¯æ–°ã—ã„データベースを作æˆã›ãšã«ä»¥ä¸‹ã®ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ã€‚ + +- ã“ã®å¥ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–を投ã’ã¾ã›ã‚“。 +- ã“ã®å¥ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ä¾‹å¤–を投ã’ã¾ã™ã€‚ + +### ON CLUSTER + +ClickHouseã¯ã€æŒ‡å®šã•ã‚ŒãŸã‚¯ãƒ©ã‚¹ã‚¿å†…ã®ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ä¸Šã« `db_name` データベースを作æˆã—ã¾ã™ã€‚詳細ã¯[分散DDL](../../../sql-reference/distributed-ddl.md)ã®è¨˜äº‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### ENGINE + +デフォルトã§ã¯ã€ClickHouseã¯è‡ªèº«ã®[Atomic](../../../engines/database-engines/atomic.md)データベースエンジンを使用ã—ã¾ã™ã€‚ä»–ã«ã‚‚[Lazy](../../../engines/database-engines/lazy.md)ã€[MySQL](../../../engines/database-engines/mysql.md)ã€[PostgresSQL](../../../engines/database-engines/postgresql.md)ã€[MaterializedMySQL](../../../engines/database-engines/materialized-mysql.md)ã€[MaterializedPostgreSQL](../../../engines/database-engines/materialized-postgresql.md)ã€[Replicated](../../../engines/database-engines/replicated.md)ã€[SQLite](../../../engines/database-engines/sqlite.md)ãŒã‚ã‚Šã¾ã™ã€‚ + +### COMMENT + +データベースを作æˆã™ã‚‹ã¨ãã«ã‚³ãƒ¡ãƒ³ãƒˆã‚’追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +コメントã¯ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +CREATE DATABASE db_name ENGINE = engine(...) COMMENT 'Comment' +``` + +**例** + +クエリ: + +``` sql +CREATE DATABASE db_comment ENGINE = Memory COMMENT 'The temporary database'; +SELECT name, comment FROM system.databases WHERE name = 'db_comment'; +``` + +çµæžœ: + +```text +┌─name───────┬─comment────────────────┠+│ db_comment │ The temporary database │ +└────────────┴────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/statements/create/dictionary.md b/docs/ja/sql-reference/statements/create/dictionary.md new file mode 100644 index 00000000000..46de420b491 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/dictionary.md @@ -0,0 +1,162 @@ +--- +slug: /ja/sql-reference/statements/create/dictionary +sidebar_position: 38 +sidebar_label: DICTIONARY +title: "CREATE DICTIONARY" +--- + +指定ã•ã‚ŒãŸ[構造](../../../sql-reference/dictionaries/index.md#dictionary-key-and-fields)ã€[ソース](../../../sql-reference/dictionaries/index.md#dictionary-sources)ã€[レイアウト](../../../sql-reference/dictionaries/index.md#storig-dictionaries-in-memory)ã€ãŠã‚ˆã³[有効期間](../../../sql-reference/dictionaries/index.md#dictionary-updates)ã‚’æŒã¤æ–°ã—ã„[Dictionary](../../../sql-reference/dictionaries/index.md)を作æˆã—ã¾ã™ã€‚ + +## 文法 + +``` sql +CREATE [OR REPLACE] DICTIONARY [IF NOT EXISTS] [db.]dictionary_name [ON CLUSTER cluster] +( + key1 type1 [DEFAULT|EXPRESSION expr1] [IS_OBJECT_ID], + key2 type2 [DEFAULT|EXPRESSION expr2], + attr1 type2 [DEFAULT|EXPRESSION expr3] [HIERARCHICAL|INJECTIVE], + attr2 type2 [DEFAULT|EXPRESSION expr4] [HIERARCHICAL|INJECTIVE] +) +PRIMARY KEY key1, key2 +SOURCE(SOURCE_NAME([param1 value1 ... paramN valueN])) +LAYOUT(LAYOUT_NAME([param_name param_value])) +LIFETIME({MIN min_val MAX max_val | max_val}) +SETTINGS(setting_name = setting_value, setting_name = setting_value, ...) +COMMENT 'Comment' +``` + +Dictionaryã®æ§‹é€ ã¯å±žæ€§ã§æ§‹æˆã•ã‚Œã¾ã™ã€‚Dictionaryã®å±žæ€§ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«é¡žä¼¼ã—ã¦æŒ‡å®šã•ã‚Œã¾ã™ã€‚唯一必è¦ãªã®ã¯ãã®ã‚¿ã‚¤ãƒ—ã§ã€ä»–ã®ãƒ—ロパティã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`ON CLUSTER`å¥ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ä¸Šã§Dictionaryを作æˆã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚詳細ã¯[分散DDL](../../../sql-reference/distributed-ddl.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +Dictionaryã®[レイアウト](../../../sql-reference/dictionaries/index.md#storig-dictionaries-in-memory)ã«å¿œã˜ã¦ã€1ã¤ã¾ãŸã¯è¤‡æ•°ã®å±žæ€§ã‚’Dictionaryã®ã‚­ãƒ¼ã¨ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚ + +## SOURCE + +Dictionaryã®ã‚½ãƒ¼ã‚¹ã¯ä»¥ä¸‹ã®ã‚‚ã®ãŒå¯èƒ½ã§ã™: +- ç¾åœ¨ã®ClickHouseサービス内ã®ãƒ†ãƒ¼ãƒ–ル +- リモートClickHouseサービス内ã®ãƒ†ãƒ¼ãƒ–ル +- HTTP(S)ã§ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãªãƒ•ã‚¡ã‚¤ãƒ« +- ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ + +### ç¾åœ¨ã®ClickHouseサービス内ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰Dictionaryを作æˆã™ã‚‹ + +入力テーブル `source_table`: + +``` text +┌─id─┬─value──┠+│ 1 │ First │ +│ 2 │ Second │ +└────┴────────┘ +``` + +Dictionaryã®ä½œæˆ: + +``` sql +CREATE DICTIONARY id_value_dictionary +( + id UInt64, + value String +) +PRIMARY KEY id +SOURCE(CLICKHOUSE(TABLE 'source_table')) +LAYOUT(FLAT()) +LIFETIME(MIN 0 MAX 1000) +``` + +Dictionaryを出力ã™ã‚‹: + +``` sql +SHOW CREATE DICTIONARY id_value_dictionary; +``` + +```response +CREATE DICTIONARY default.id_value_dictionary +( + `id` UInt64, + `value` String +) +PRIMARY KEY id +SOURCE(CLICKHOUSE(TABLE 'source_table')) +LIFETIME(MIN 0 MAX 1000) +LAYOUT(FLAT()) +``` + +:::note +[ClickHouse Cloud](https://clickhouse.com)ã§SQLコンソールを使用ã™ã‚‹éš›ã«ã¯ã€Dictionaryを作æˆã™ã‚‹éš›ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼ˆ`default`ã¾ãŸã¯å½¹å‰²`default_role`ã‚’æŒã¤ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼‰ã¨ãƒ‘スワードを指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +:::note + +```sql +CREATE USER IF NOT EXISTS clickhouse_admin +IDENTIFIED WITH sha256_password BY 'passworD43$x'; + +GRANT default_role TO clickhouse_admin; + +CREATE DATABASE foo_db; + +CREATE TABLE foo_db.source_table ( + id UInt64, + value String +) ENGINE = MergeTree +PRIMARY KEY id; + +CREATE DICTIONARY foo_db.id_value_dictionary +( + id UInt64, + value String +) +PRIMARY KEY id +SOURCE(CLICKHOUSE(TABLE 'source_table' USER 'clickhouse_admin' PASSWORD 'passworD43$x' DB 'foo_db' )) +LAYOUT(FLAT()) +LIFETIME(MIN 0 MAX 1000); +``` + +### リモートClickHouseサービスã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰Dictionaryを作æˆã™ã‚‹ + +入力テーブル(リモートClickHouseサービス内)`source_table`: + +``` text +┌─id─┬─value──┠+│ 1 │ First │ +│ 2 │ Second │ +└────┴────────┘ +``` + +Dictionaryã®ä½œæˆ: + +``` sql +CREATE DICTIONARY id_value_dictionary +( + id UInt64, + value String +) +PRIMARY KEY id +SOURCE(CLICKHOUSE(HOST 'HOSTNAME' PORT 9000 USER 'default' PASSWORD 'PASSWORD' TABLE 'source_table' DB 'default')) +LAYOUT(FLAT()) +LIFETIME(MIN 0 MAX 1000) +``` + +### HTTP(S)ã§ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãªãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰Dictionaryを作æˆã™ã‚‹ + +```sql +CREATE DICTIONARY default.taxi_zone_dictionary +( + `LocationID` UInt16 DEFAULT 0, + `Borough` String, + `Zone` String, + `service_zone` String +) +PRIMARY KEY LocationID +SOURCE(HTTP(URL 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/taxi_zone_lookup.csv' FORMAT 'CSVWithNames')) +LIFETIME(MIN 0 MAX 0) +LAYOUT(HASHED()) +``` + +### ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰Dictionaryを作æˆã™ã‚‹ + +詳細ã¯[Dictionary ソース](/docs/ja/sql-reference/dictionaries/index.md#dictionary-sources/#dbms)ã‚’ã”å‚ç…§ãã ã•ã„。 + +**関連情報** + +- 詳細ã«ã¤ã„ã¦ã¯ã€[Dictionaries](../../../sql-reference/dictionaries/index.md)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’ã”覧ãã ã•ã„。 +- [system.dictionaries](../../../operations/system-tables/dictionaries.md) — ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯[Dictionary](../../../sql-reference/dictionaries/index.md)ã«é–¢ã™ã‚‹æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/create/function.md b/docs/ja/sql-reference/statements/create/function.md new file mode 100644 index 00000000000..0726099e66e --- /dev/null +++ b/docs/ja/sql-reference/statements/create/function.md @@ -0,0 +1,65 @@ +--- +slug: /ja/sql-reference/statements/create/function +sidebar_position: 38 +sidebar_label: FUNCTION +title: "CREATE FUNCTION - ユーザー定義関数 (UDF)" +--- + +ラムダå¼ã‹ã‚‰ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•° (UDF) を作æˆã—ã¾ã™ã€‚å¼ã¯é–¢æ•°ã®ãƒ‘ラメーターã€å®šæ•°ã€æ¼”ç®—å­ã€ã¾ãŸã¯ä»–ã®é–¢æ•°å‘¼ã³å‡ºã—ã§æ§‹æˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +```sql +CREATE FUNCTION name [ON CLUSTER cluster] AS (parameter0, ...) -> expression +``` +関数ã¯ä»»æ„ã®æ•°ã®ãƒ‘ラメーターをæŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã„ãã¤ã‹ã®åˆ¶ç´„事項ãŒã‚ã‚Šã¾ã™ï¼š + +- 関数ã®åå‰ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°ãŠã‚ˆã³ã‚·ã‚¹ãƒ†ãƒ é–¢æ•°ã®ä¸­ã§ä¸€æ„ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +- å†å¸°é–¢æ•°ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。 +- 関数ãŒä½¿ç”¨ã™ã‚‹ã™ã¹ã¦ã®å¤‰æ•°ã¯ã€ãã®ãƒ‘ラメーターリストã«æŒ‡å®šã•ã‚Œãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +ã„ãšã‚Œã‹ã®åˆ¶ç´„ãŒé•åã•ã‚ŒãŸå ´åˆã€ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +CREATE FUNCTION linear_equation AS (x, k, b) -> k*x + b; +SELECT number, linear_equation(number, 2, 1) FROM numbers(3); +``` + +çµæžœ: + +``` text +┌─number─┬─plus(multiply(2, number), 1)─┠+│ 0 │ 1 │ +│ 1 │ 3 │ +│ 2 │ 5 │ +└────────┴──────────────────────────────┘ +``` + +以下ã®ã‚¯ã‚¨ãƒªã§ã¯ã€[æ¡ä»¶é–¢æ•°](../../../sql-reference/functions/conditional-functions.md) ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°å†…ã§å‘¼ã³å‡ºã•ã‚Œã¾ã™ï¼š + +```sql +CREATE FUNCTION parity_str AS (n) -> if(n % 2, 'odd', 'even'); +SELECT number, parity_str(number) FROM numbers(3); +``` + +çµæžœ: + +``` text +┌─number─┬─if(modulo(number, 2), 'odd', 'even')─┠+│ 0 │ even │ +│ 1 │ odd │ +│ 2 │ even │ +└────────┴──────────────────────────────────────┘ +``` + +## 関連コンテンツ + +### [実行å¯èƒ½ãªUDFs](/docs/ja/sql-reference/functions/udf.md). + +### [ClickHouse Cloudã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°](https://clickhouse.com/blog/user-defined-functions-clickhouse-udfs) diff --git a/docs/ja/sql-reference/statements/create/index.md b/docs/ja/sql-reference/statements/create/index.md new file mode 100644 index 00000000000..75c0562c597 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/index.md @@ -0,0 +1,21 @@ +--- +slug: /ja/sql-reference/statements/create/ +sidebar_position: 34 +sidebar_label: CREATE +--- + +# CREATE クエリ + +CREATEクエリã¯ã€æ¬¡ã®ã„ãšã‚Œã‹ã®ç¨®é¡žã®æ–°ã—ã„エンティティを作æˆã—ã¾ã™ã€‚ + +- [データベース](/docs/ja/sql-reference/statements/create/database.md) +- [テーブル](/docs/ja/sql-reference/statements/create/table.md) +- [ビュー](/docs/ja/sql-reference/statements/create/view.md) +- [Dictionary](/docs/ja/sql-reference/statements/create/dictionary.md) +- [関数](/docs/ja/sql-reference/statements/create/function.md) +- [ユーザー](/docs/ja/sql-reference/statements/create/user.md) +- [役割](/docs/ja/sql-reference/statements/create/role.md) +- [è¡Œãƒãƒªã‚·ãƒ¼](/docs/ja/sql-reference/statements/create/row-policy.md) +- [クオータ](/docs/ja/sql-reference/statements/create/quota.md) +- [設定プロファイル](/docs/ja/sql-reference/statements/create/settings-profile.md) +- [åå‰ä»˜ãコレクション](/docs/ja/sql-reference/statements/create/named-collection.md) diff --git a/docs/ja/sql-reference/statements/create/named-collection.md b/docs/ja/sql-reference/statements/create/named-collection.md new file mode 100644 index 00000000000..285fafd9f98 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/named-collection.md @@ -0,0 +1,38 @@ +--- +slug: /ja/sql-reference/statements/create/named-collection +sidebar_label: NAMED COLLECTION +--- + +import CloudNotSupportedBadge from '@theme/badges/CloudNotSupportedBadge'; + + + +# NAMED COLLECTIONã®ä½œæˆ + +æ–°ã—ã„Named Collectionを作æˆã—ã¾ã™ã€‚ + +**構文** + +```sql +CREATE NAMED COLLECTION [IF NOT EXISTS] name [ON CLUSTER cluster] AS +key_name1 = 'some value' [[NOT] OVERRIDABLE], +key_name2 = 'some value' [[NOT] OVERRIDABLE], +key_name3 = 'some value' [[NOT] OVERRIDABLE], +... +``` + +**例** + +```sql +CREATE NAMED COLLECTION foobar AS a = '1', b = '2' OVERRIDABLE; +``` + +**関連ステートメント** + +- [NAMED COLLECTIONã®ä½œæˆ](https://clickhouse.com/docs/ja/sql-reference/statements/alter/named-collection) +- [NAMED COLLECTIONã®å‰Šé™¤](https://clickhouse.com/docs/ja/sql-reference/statements/drop#drop-function) + + +**関連項目** + +- [Named collectionsガイド](/docs/ja/operations/named-collections.md) diff --git a/docs/ja/sql-reference/statements/create/quota.md b/docs/ja/sql-reference/statements/create/quota.md new file mode 100644 index 00000000000..6270382b0ed --- /dev/null +++ b/docs/ja/sql-reference/statements/create/quota.md @@ -0,0 +1,40 @@ +--- +slug: /ja/sql-reference/statements/create/quota +sidebar_position: 42 +sidebar_label: QUOTA +title: "CREATE QUOTA" +--- + +ユーザーã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã‚‹[quota](../../../guides/sre/user-management/index.md#quotas-management)を作æˆã—ã¾ã™ã€‚ + +構文: + +``` sql +CREATE QUOTA [IF NOT EXISTS | OR REPLACE] name [ON CLUSTER cluster_name] + [IN access_storage_type] + [KEYED BY {user_name | ip_address | client_key | client_key,user_name | client_key,ip_address} | NOT KEYED] + [FOR [RANDOMIZED] INTERVAL number {second | minute | hour | day | week | month | quarter | year} + {MAX { {queries | query_selects | query_inserts | errors | result_rows | result_bytes | read_rows | read_bytes | execution_time} = number } [,...] | + NO LIMITS | TRACKING ONLY} [,...]] + [TO {role [,...] | ALL | ALL EXCEPT role [,...]}] +``` + +`user_name`ã€`ip_address`ã€`client_key`ã€`client_key, user_name`ã€`client_key, ip_address`キーã¯ã€[system.quotas](../../../operations/system-tables/quotas.md)テーブルã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«å¯¾å¿œã—ã¾ã™ã€‚ + +`queries`ã€`query_selects`ã€`query_inserts`ã€`errors`ã€`result_rows`ã€`result_bytes`ã€`read_rows`ã€`read_bytes`ã€`execution_time`ã€`failed_sequential_authentications`パラメータã¯ã€[system.quotas_usage](../../../operations/system-tables/quotas_usage.md)テーブルã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«å¯¾å¿œã—ã¾ã™ã€‚ + +`ON CLUSTER`å¥ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã«ã‚¯ã‚ªãƒ¼ã‚¿ã‚’作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚[分散DDL](../../../sql-reference/distributed-ddl.md)å‚照。 + +**例** + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ã€æœ€å¤§ã‚¯ã‚¨ãƒªæ•°ã‚’15ヶ月ã§123クエリã«åˆ¶é™ã™ã‚‹: + +``` sql +CREATE QUOTA qA FOR INTERVAL 15 month MAX queries = 123 TO CURRENT_USER; +``` + +デフォルトユーザーã«å¯¾ã—ã¦ã€æœ€å¤§å®Ÿè¡Œæ™‚é–“ã‚’30分ã§0.5秒ã«åˆ¶é™ã—ã€æœ€å¤§ã‚¯ã‚¨ãƒªæ•°ã‚’5å››åŠæœŸã§321クエリã€æœ€å¤§ã‚¨ãƒ©ãƒ¼æ•°ã‚’10ã«åˆ¶é™ã™ã‚‹: + +``` sql +CREATE QUOTA qB FOR INTERVAL 30 minute MAX execution_time = 0.5, FOR INTERVAL 5 quarter MAX queries = 321, errors = 10 TO default; +``` diff --git a/docs/ja/sql-reference/statements/create/role.md b/docs/ja/sql-reference/statements/create/role.md new file mode 100644 index 00000000000..2b07fdd1ed3 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/role.md @@ -0,0 +1,48 @@ +--- +slug: /ja/sql-reference/statements/create/role +sidebar_position: 40 +sidebar_label: ROLE +title: "CREATE ROLE" +--- + +æ–°ã—ã„[ロール](../../../guides/sre/user-management/index.md#role-management)を作æˆã—ã¾ã™ã€‚ロールã¯ã€[特権](../../../sql-reference/statements/grant.md#grant-privileges)ã®é›†åˆã§ã™ã€‚ロールã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸ[ユーザー](../../../sql-reference/statements/create/user.md)ã¯ã€ãã®ãƒ­ãƒ¼ãƒ«ã®ã™ã¹ã¦ã®ç‰¹æ¨©ã‚’å–å¾—ã—ã¾ã™ã€‚ + +構文: + +``` sql +CREATE ROLE [IF NOT EXISTS | OR REPLACE] name1 [, name2 [,...]] [ON CLUSTER cluster_name] + [IN access_storage_type] + [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [CONST|READONLY|WRITABLE|CHANGEABLE_IN_READONLY] | PROFILE 'profile_name'] [,...] +``` + +## ロールã®ç®¡ç† + +ユーザーã«ã¯è¤‡æ•°ã®ãƒ­ãƒ¼ãƒ«ã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ユーザーã¯ã€[SET ROLE](../../../sql-reference/statements/set-role.md)文を使用ã—ã¦ã€å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã‚’ä»»æ„ã®çµ„ã¿åˆã‚ã›ã§é©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚最終的ãªç‰¹æ¨©ã®ç¯„囲ã¯ã€é©ç”¨ã•ã‚ŒãŸã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ã®ã™ã¹ã¦ã®ç‰¹æ¨©ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã«ãªã‚Šã¾ã™ã€‚ユーザーアカウントã«ç›´æŽ¥ä»˜ä¸Žã•ã‚ŒãŸç‰¹æ¨©ãŒã‚ã‚‹å ´åˆã€ãれもロールã«ã‚ˆã£ã¦ä»˜ä¸Žã•ã‚ŒãŸç‰¹æ¨©ã¨çµ„ã¿åˆã‚ã•ã‚Œã¾ã™ã€‚ + +ユーザーã¯ãƒ­ã‚°ã‚¤ãƒ³æ™‚ã«é©ç”¨ã•ã‚Œã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ­ãƒ¼ãƒ«ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚デフォルトã®ãƒ­ãƒ¼ãƒ«ã‚’設定ã™ã‚‹ã«ã¯ã€[SET DEFAULT ROLE](../../../sql-reference/statements/set-role.md#set-default-role-statement)æ–‡ã¾ãŸã¯[ALTER USER](../../../sql-reference/statements/alter/user.md#alter-user-statement)文を使用ã—ã¾ã™ã€‚ + +ロールをå–り消ã™ã«ã¯ã€[REVOKE](../../../sql-reference/statements/revoke.md)文を使用ã—ã¾ã™ã€‚ + +ロールを削除ã™ã‚‹ã«ã¯ã€[DROP ROLE](../../../sql-reference/statements/drop.md#drop-role-statement)文を使用ã—ã¾ã™ã€‚削除ã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã¯ã€å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ãŸã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŠã‚ˆã³ãƒ­ãƒ¼ãƒ«ã‹ã‚‰è‡ªå‹•çš„ã«å–り消ã•ã‚Œã¾ã™ã€‚ + +## 例 + +``` sql +CREATE ROLE accountant; +GRANT SELECT ON db.* TO accountant; +``` + +ã“ã®ä¸€é€£ã®ã‚¯ã‚¨ãƒªã¯ã€`db` データベースã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–る特権をæŒã¤ãƒ­ãƒ¼ãƒ« `accountant` を作æˆã—ã¾ã™ã€‚ + +ユーザー `mira` ã«ãƒ­ãƒ¼ãƒ«ã‚’割り当ã¦ã‚‹ã«ã¯: + +``` sql +GRANT accountant TO mira; +``` + +ロールãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸå¾Œã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãã®ãƒ­ãƒ¼ãƒ«ã‚’é©ç”¨ã—ã€è¨±å¯ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã™ã€‚例ãˆã°: + +``` sql +SET ROLE accountant; +SELECT * FROM db.*; +``` diff --git a/docs/ja/sql-reference/statements/create/row-policy.md b/docs/ja/sql-reference/statements/create/row-policy.md new file mode 100644 index 00000000000..32d532fcf01 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/row-policy.md @@ -0,0 +1,103 @@ +--- +slug: /ja/sql-reference/statements/create/row-policy +sidebar_position: 41 +sidebar_label: ROW POLICY +title: "CREATE ROW POLICY" +--- + +[è¡Œãƒãƒªã‚·ãƒ¼](../../../guides/sre/user-management/index.md#row-policy-management)を作æˆã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãる行を決定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã§ã™ã€‚ + +:::tip +è¡Œãƒãƒªã‚·ãƒ¼ã¯ã€èª­ã¿å–り専用アクセスをæŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ã®ã¿æ„味ãŒã‚ã‚Šã¾ã™ã€‚ユーザーãŒãƒ†ãƒ¼ãƒ–ルを変更ã—ãŸã‚Šã€ãƒ†ãƒ¼ãƒ–ル間ã§ãƒ‘ーティションをコピーã—ãŸã‚Šã§ãã‚‹å ´åˆã€è¡Œãƒãƒªã‚·ãƒ¼ã®åˆ¶é™ã¯ç„¡åŠ¹ã«ãªã‚Šã¾ã™ã€‚ +::: + +構文: + +``` sql +CREATE [ROW] POLICY [IF NOT EXISTS | OR REPLACE] policy_name1 [ON CLUSTER cluster_name1] ON [db1.]table1|db1.* + [, policy_name2 [ON CLUSTER cluster_name2] ON [db2.]table2|db2.* ...] + [IN access_storage_type] + [FOR SELECT] USING condition + [AS {PERMISSIVE | RESTRICTIVE}] + [TO {role1 [, role2 ...] | ALL | ALL EXCEPT role1 [, role2 ...]}] +``` + +## USING å¥ + +行をフィルタリングã™ã‚‹æ¡ä»¶ã‚’指定ã§ãã¾ã™ã€‚ã‚ã‚‹è¡Œã«å¯¾ã—ã¦æ¡ä»¶ãŒéžã‚¼ãƒ­ã«è¨ˆç®—ã•ã‚ŒãŸå ´åˆã€ãã®è¡Œã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +## TO å¥ + +`TO` セクションã§ã¯ã€ã“ã®ãƒãƒªã‚·ãƒ¼ãŒé©ç”¨ã•ã‚Œã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„ロールã®ãƒªã‚¹ãƒˆã‚’指定ã§ãã¾ã™ã€‚例ãˆã°ã€`CREATE ROW POLICY ... TO accountant, john@localhost` ã®ã‚ˆã†ã«ã—ã¾ã™ã€‚ + +キーワード `ALL` ã¯ã€ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’å«ã‚€ã™ã¹ã¦ã® ClickHouse ユーザーをæ„味ã—ã¾ã™ã€‚キーワード `ALL EXCEPT` を使用ã™ã‚‹ã¨ã€ç‰¹å®šã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’除外ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€`CREATE ROW POLICY ... TO ALL EXCEPT accountant, john@localhost` + +:::note +テーブルã«å®šç¾©ã•ã‚Œã¦ã„ã‚‹è¡Œãƒãƒªã‚·ãƒ¼ãŒãªã„å ´åˆã€ä»»æ„ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã™ã¹ã¦ã®è¡Œã‚’ `SELECT` ã§ãã¾ã™ã€‚テーブルã«1ã¤ä»¥ä¸Šã®è¡Œãƒãƒªã‚·ãƒ¼ã‚’定義ã™ã‚‹ã¨ã€ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é–¢ä¿‚ãªãã€ãã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯è¡Œãƒãƒªã‚·ãƒ¼ã«ä¾å­˜ã™ã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚例ãˆã°ã€ä»¥ä¸‹ã®ãƒãƒªã‚·ãƒ¼: + +`CREATE ROW POLICY pol1 ON mydb.table1 USING b=1 TO mira, peter` + +ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ `mira` 㨠`peter` ㌠`b != 1` ã®è¡Œã‚’見るã“ã¨ã‚’ç¦æ­¢ã—ã¾ã™ãŒã€è¨€åŠã•ã‚Œã¦ã„ãªã„ユーザー (例: ユーザー `paul`) 㯠`mydb.table1` ã®è¡Œã‚’å…¨ã見るã“ã¨ãŒã§ãã¾ã›ã‚“。 + +ãã‚ŒãŒæœ›ã¾ã—ããªã„å ´åˆã€ä»¥ä¸‹ã®ã‚ˆã†ãªã‚‚ã†1ã¤ã®è¡Œãƒãƒªã‚·ãƒ¼ã‚’追加ã™ã‚‹ã“ã¨ã§ä¿®æ­£ã§ãã¾ã™: + +`CREATE ROW POLICY pol2 ON mydb.table1 USING 1 TO ALL EXCEPT mira, peter` +::: + +## AS å¥ + +åŒã˜ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ã€åŒã˜ãƒ†ãƒ¼ãƒ–ルã§è¤‡æ•°ã®ãƒãƒªã‚·ãƒ¼ã‚’åŒæ™‚ã«æœ‰åŠ¹åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã®ãŸã‚ã€è¤‡æ•°ã®ãƒãƒªã‚·ãƒ¼ã«åŸºã¥ãæ¡ä»¶ã‚’çµåˆã™ã‚‹æ–¹æ³•ãŒå¿…è¦ã§ã™ã€‚ + +デフォルトã§ã¯ã€ãƒãƒªã‚·ãƒ¼ã¯è«–ç†æ¼”ç®—å­ `OR` を使用ã—ã¦çµåˆã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ä»¥ä¸‹ã®ãƒãƒªã‚·ãƒ¼: + +``` sql +CREATE ROW POLICY pol1 ON mydb.table1 USING b=1 TO mira, peter +CREATE ROW POLICY pol2 ON mydb.table1 USING c=2 TO peter, antonio +``` + +ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ `peter` ㌠`b=1` ã¾ãŸã¯ `c=2` ã®ã„ãšã‚Œã‹ã®è¡Œã‚’閲覧ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +`AS` å¥ã¯ã€ãƒãƒªã‚·ãƒ¼ã‚’ä»–ã®ãƒãƒªã‚·ãƒ¼ã¨ã©ã®ã‚ˆã†ã«çµ„ã¿åˆã‚ã›ã‚‹ã‹ã‚’指定ã—ã¾ã™ã€‚ãƒãƒªã‚·ãƒ¼ã¯[許å¯çš„](PERMISSIVE)ã¾ãŸã¯[制é™çš„](RESTRICTIVE)ã«ã§ãã¾ã™ã€‚デフォルトã§ã¯ã€ãƒãƒªã‚·ãƒ¼ã¯è¨±å¯çš„ã§ã€è«–ç†æ¼”ç®—å­ `OR` を使ã£ã¦çµåˆã•ã‚Œã¾ã™ã€‚ + +代替ã¨ã—ã¦ãƒãƒªã‚·ãƒ¼ã‚’制é™çš„ã«å®šç¾©ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚制é™çš„ãƒãƒªã‚·ãƒ¼ã¯è«–ç†æ¼”ç®—å­ `AND` を使ã£ã¦çµåˆã•ã‚Œã¾ã™ã€‚ + +一般的ãªå…¬å¼ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +``` +row_is_visible = (1ã¤ä»¥ä¸Šã®è¨±å¯çš„ãªãƒãƒªã‚·ãƒ¼ã®æ¡ä»¶ãŒéžã‚¼ãƒ­) AND + (ã™ã¹ã¦ã®åˆ¶é™çš„ãªãƒãƒªã‚·ãƒ¼ã®æ¡ä»¶ãŒéžã‚¼ãƒ­) +``` + +例ãˆã°ã€ä»¥ä¸‹ã®ãƒãƒªã‚·ãƒ¼: + +``` sql +CREATE ROW POLICY pol1 ON mydb.table1 USING b=1 TO mira, peter +CREATE ROW POLICY pol2 ON mydb.table1 USING c=2 AS RESTRICTIVE TO peter, antonio +``` + +ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ `peter` ㌠`b=1` ã‹ã¤ `c=2` ã®è¡Œã®ã¿ã‚’見るã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +データベースãƒãƒªã‚·ãƒ¼ã¯ãƒ†ãƒ¼ãƒ–ルãƒãƒªã‚·ãƒ¼ã¨çµåˆã•ã‚Œã¾ã™ã€‚ + +例ãˆã°ã€ä»¥ä¸‹ã®ãƒãƒªã‚·ãƒ¼: + +``` sql +CREATE ROW POLICY pol1 ON mydb.* USING b=1 TO mira, peter +CREATE ROW POLICY pol2 ON mydb.table1 USING c=2 AS RESTRICTIVE TO peter, antonio +``` + +ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ `peter` ㌠`b=1` ã‹ã¤ `c=2` ã®å ´åˆã®ã¿ table1 ã®è¡Œã‚’見るã“ã¨ãŒã§ãã¾ã™ãŒã€mydb 内ã®ä»–ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ `b=1` ãƒãƒªã‚·ãƒ¼ã®ã¿ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ + +## ON CLUSTER å¥ + +クラスターã«è¡Œãƒãƒªã‚·ãƒ¼ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚[分散DDL](../../../sql-reference/distributed-ddl.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 例 + +`CREATE ROW POLICY filter1 ON mydb.mytable USING a<1000 TO accountant, john@localhost` + +`CREATE ROW POLICY filter2 ON mydb.mytable USING a<1000 AND b=5 TO ALL EXCEPT mira` + +`CREATE ROW POLICY filter3 ON mydb.mytable USING 1 TO admin` + +`CREATE ROW POLICY filter4 ON mydb.* USING 1 TO admin` diff --git a/docs/ja/sql-reference/statements/create/settings-profile.md b/docs/ja/sql-reference/statements/create/settings-profile.md new file mode 100644 index 00000000000..30bf1bbc9b7 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/settings-profile.md @@ -0,0 +1,35 @@ +--- +slug: /ja/sql-reference/statements/create/settings-profile +sidebar_position: 43 +sidebar_label: SETTINGS PROFILE +title: "CREATE SETTINGS PROFILE" +--- + +ユーザーã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã‚‹[設定プロファイル](../../../guides/sre/user-management/index.md#settings-profiles-management)を作æˆã—ã¾ã™ã€‚ + +構文: + +``` sql +CREATE SETTINGS PROFILE [IF NOT EXISTS | OR REPLACE] name1 [, name2 [,...]] + [ON CLUSTER cluster_name] + [IN access_storage_type] + [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [CONST|READONLY|WRITABLE|CHANGEABLE_IN_READONLY] | INHERIT 'profile_name'] [,...] + [TO {{role1 | user1 [, role2 | user2 ...]} | NONE | ALL | ALL EXCEPT {role1 | user1 [, role2 | user2 ...]}}] +``` + +`ON CLUSTER`å¥ã‚’使用ã™ã‚‹ã¨ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ä¸Šã§è¨­å®šãƒ—ロファイルを作æˆã§ãã¾ã™ã€‚[分散DDL](../../../sql-reference/distributed-ddl.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 例 + +ユーザーを作æˆã—ã¾ã™: +```sql +CREATE USER robin IDENTIFIED BY 'password'; +``` + +`max_memory_usage_profile`ã¨ã„ã†è¨­å®šãƒ—ロファイルを`max_memory_usage`設定ã®å€¤ã¨åˆ¶ç´„ã‚’å«ã‚ã¦ä½œæˆã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼`robin`ã«å‰²ã‚Šå½“ã¦ã¾ã™: + +``` sql +CREATE +SETTINGS PROFILE max_memory_usage_profile SETTINGS max_memory_usage = 100000001 MIN 90000000 MAX 110000000 +TO robin +``` diff --git a/docs/ja/sql-reference/statements/create/table.md b/docs/ja/sql-reference/statements/create/table.md new file mode 100644 index 00000000000..d4343513fc3 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/table.md @@ -0,0 +1,656 @@ +--- +slug: /ja/sql-reference/statements/create/table +sidebar_position: 36 +sidebar_label: TABLE +title: "CREATE TABLE" +keywords: [compression, codec, schema, DDL] +--- + +æ–°ã—ã„テーブルを作æˆã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯ã€ä½¿ç”¨ã‚±ãƒ¼ã‚¹ã«å¿œã˜ã¦ã•ã¾ã–ã¾ãªæ§‹æ–‡å½¢å¼ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +デフォルトã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルã¯ç¾åœ¨ã®ã‚µãƒ¼ãƒãƒ¼ã®ã¿ã«ä½œæˆã•ã‚Œã¾ã™ã€‚分散DDLクエリ㯠`ON CLUSTER` å¥ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ãŠã‚Šã€[別途説明ã•ã‚Œã¦ã„ã¾ã™](../../../sql-reference/distributed-ddl.md)。 + +## æ§‹æ–‡å½¢å¼ + +### 明示的ãªã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã™ã‚‹å ´åˆ + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [NULL|NOT NULL] [DEFAULT|MATERIALIZED|EPHEMERAL|ALIAS expr1] [COMMENT 'カラムã®ã‚³ãƒ¡ãƒ³ãƒˆ'] [compression_codec] [TTL expr1], + name2 [type2] [NULL|NOT NULL] [DEFAULT|MATERIALIZED|EPHEMERAL|ALIAS expr2] [COMMENT 'カラムã®ã‚³ãƒ¡ãƒ³ãƒˆ'] [compression_codec] [TTL expr2], + ... +) ENGINE = engine + [COMMENT 'テーブルã®ã‚³ãƒ¡ãƒ³ãƒˆ'] +``` + +`table_name` ã¨ã„ã†åå‰ã®ãƒ†ãƒ¼ãƒ–ルを `db` データベースã€ã¾ãŸã¯ `db` ãŒè¨­å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ä½œæˆã—ã€æ‹¬å¼§å†…ã«æŒ‡å®šã•ã‚ŒãŸæ§‹é€ ã¨ `engine` エンジンã§ä½œæˆã—ã¾ã™ã€‚ +テーブルã®æ§‹é€ ã¯ã‚«ãƒ©ãƒ ã®è¨˜è¿°ã€äºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€åˆ¶ç´„ã®ãƒªã‚¹ãƒˆã§ã™ã€‚エンジンãŒ[主キー](#primary-key)をサãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹å ´åˆã€ãƒ†ãƒ¼ãƒ–ルエンジンã®ãƒ‘ラメータã¨ã—ã¦ç¤ºã•ã‚Œã¾ã™ã€‚ + +カラムã®è¨˜è¿°ã¯ã€æœ€ã‚‚å˜ç´”ãªå ´åˆã«ã¯ `name type` ã§ã™ã€‚例:`RegionID UInt32`。 + +デフォルト値ã®ãŸã‚ã®å¼ã‚‚定義ã§ãã¾ã™ï¼ˆä»¥ä¸‹ã‚’å‚照)。 + +å¿…è¦ã«å¿œã˜ã¦ã€ä¸€ã¤ã¾ãŸã¯è¤‡æ•°ã®ã‚­ãƒ¼å¼ã‚’指定ã—ã¦ä¸»ã‚­ãƒ¼ã‚’指定ã§ãã¾ã™ã€‚ + +カラムã¨ãƒ†ãƒ¼ãƒ–ルã«ã‚³ãƒ¡ãƒ³ãƒˆã‚’追加ã§ãã¾ã™ã€‚ + +### 別ã®ãƒ†ãƒ¼ãƒ–ルã«é¡žä¼¼ã—ãŸã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã™ã‚‹å ´åˆ + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name AS [db2.]name2 [ENGINE = engine] +``` + +別ã®ãƒ†ãƒ¼ãƒ–ルã¨åŒã˜æ§‹é€ ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚テーブルã«ç•°ãªã‚‹ã‚¨ãƒ³ã‚¸ãƒ³ã‚’指定ã§ãã¾ã™ã€‚エンジンãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`db2.name2` テーブルã¨åŒã˜ã‚¨ãƒ³ã‚¸ãƒ³ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +### 別ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã‚¹ã‚­ãƒ¼ãƒžã¨ãƒ‡ãƒ¼ã‚¿ã‚’クローンã™ã‚‹å ´åˆ + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name CLONE AS [db2.]name2 [ENGINE = engine] +``` + +別ã®ãƒ†ãƒ¼ãƒ–ルã¨åŒã˜æ§‹é€ ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚テーブルã«ç•°ãªã‚‹ã‚¨ãƒ³ã‚¸ãƒ³ã‚’指定ã§ãã¾ã™ã€‚エンジンãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`db2.name2` テーブルã¨åŒã˜ã‚¨ãƒ³ã‚¸ãƒ³ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚æ–°ã—ã„テーブルãŒä½œæˆã•ã‚ŒãŸå¾Œã€`db2.name2` ã‹ã‚‰ã®ã™ã¹ã¦ã®ãƒ‘ーティションãŒãã‚Œã«æ·»ä»˜ã•ã‚Œã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€`db2.name2` ã®ãƒ‡ãƒ¼ã‚¿ã¯ä½œæˆæ™‚ã« `db.table_name` ã«ã‚¯ãƒ­ãƒ¼ãƒ³ã•ã‚Œã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯æ¬¡ã®ã‚‚ã®ã¨åŒç­‰ã§ã™ï¼š + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name AS [db2.]name2 [ENGINE = engine]; +ALTER TABLE [db.]table_name ATTACH PARTITION ALL FROM [db2].name2; +``` + +### テーブル関数ã‹ã‚‰ä½œæˆã™ã‚‹å ´åˆ + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name AS table_function() +``` + +指定ã•ã‚ŒãŸ[テーブル関数](../../../sql-reference/table-functions/index.md#table-functions)ã¨åŒã˜çµæžœã®ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚作æˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯ã€æŒ‡å®šã•ã‚ŒãŸå¯¾å¿œã™ã‚‹ãƒ†ãƒ¼ãƒ–ル関数ã¨åŒæ§˜ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +### SELECT クエリã‹ã‚‰ä½œæˆã™ã‚‹å ´åˆ + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name[(name1 [type1], name2 [type2], ...)] ENGINE = engine AS SELECT ... +``` + +`SELECT` クエリã®çµæžœã«ä¼¼ãŸæ§‹é€ ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚’ `SELECT` ã‹ã‚‰å–å¾—ã—㦠`engine` エンジンã§ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ã¾ãŸã€ã‚«ãƒ©ãƒ ã®èª¬æ˜Žã‚’明示的ã«æŒ‡å®šã§ãã¾ã™ã€‚ + +テーブルãŒã™ã§ã«å­˜åœ¨ã—ã€`IF NOT EXISTS` ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã¯ä½•ã‚‚è¡Œã„ã¾ã›ã‚“。 + +クエリ内㮠`ENGINE` å¥ã®å¾Œã«ä»–ã®å¥ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚テーブル作æˆã®è©³ç´°ãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ã¤ã„ã¦ã¯ã€[テーブルエンジン](../../../engines/table-engines/index.md#table_engines)ã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +:::tip +ClickHouse Cloud ã§ã¯ã€ä»¥ä¸‹ã®2ã¤ã®ã‚¹ãƒ†ãƒƒãƒ—ã«åˆ†ã‘ã¦ãã ã•ã„: +1. テーブル構造ã®ä½œæˆ + + ```sql + CREATE TABLE t1 + ENGINE = MergeTree + ORDER BY ... + # highlight-next-line + EMPTY AS + SELECT ... + ``` + +2. テーブルã¸ã®ãƒ‡ãƒ¼ã‚¿æŠ•å…¥ + + ```sql + INSERT INTO t1 + SELECT ... + ``` + +::: + +**例** + +クエリ: + +``` sql +CREATE TABLE t1 (x String) ENGINE = Memory AS SELECT 1; +SELECT x, toTypeName(x) FROM t1; +``` + +çµæžœ: + +```text +┌─x─┬─toTypeName(x)─┠+│ 1 │ String │ +└───┴───────────────┘ +``` + +## NULL ã¾ãŸã¯ NOT NULL ä¿®é£¾å­ + +カラム定義後ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«ç¶šã `NULL` ãŠã‚ˆã³ `NOT NULL` ä¿®é£¾å­ ã¯ã€ãれ㌠[Nullable](../../../sql-reference/data-types/nullable.md#data_type-nullable) を許å¯ã™ã‚‹ã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚ + +型㌠`Nullable` ã§ãªã„å ´åˆã€`NULL` ãŒæŒ‡å®šã•ã‚Œã‚‹ã¨ãれ㯠`Nullable` ã¨ã—ã¦æ‰±ã‚ã‚Œã€`NOT NULL` ãŒæŒ‡å®šã•ã‚Œã‚‹ã¨ãã†ã§ã¯ã‚ã‚Šã¾ã›ã‚“。例ãˆã°ã€`INT NULL` 㯠`Nullable(INT)` ã¨åŒã˜ã§ã™ã€‚型㌠`Nullable` ã§ã€`NULL` ã¾ãŸã¯ `NOT NULL` 修飾å­ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +ã¾ãŸã€[data_type_default_nullable](../../../operations/settings/settings.md#data_type_default_nullable) 設定もå‚ç…§ã—ã¦ãã ã•ã„。 + +## デフォルト値 {#default_values} + +カラムã®è¨˜è¿°ã¯ `DEFAULT expr`ã€`MATERIALIZED expr`ã€ã¾ãŸã¯ `ALIAS expr` ã®å½¢å¼ã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã®å¼ã‚’指定ã§ãã¾ã™ã€‚例: `URLDomain String DEFAULT domain(URL)`。 + +å¼ `expr` ã¯çœç•¥å¯èƒ½ã§ã™ã€‚çœç•¥ã•ã‚ŒãŸå ´åˆã€ã‚«ãƒ©ãƒ ã®åž‹ã¯æ˜Žç¤ºçš„ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯æ•°å€¤ã‚«ãƒ©ãƒ ã®å ´åˆã¯ `0`ã€æ–‡å­—列カラムã®å ´åˆã¯ `''`(空ã®æ–‡å­—列)ã€é…列カラムã®å ´åˆã¯ `[]`(空ã®é…列)ã€æ—¥ä»˜ã‚«ãƒ©ãƒ ã®å ´åˆã¯ `1970-01-01`ã€Nullable カラムã®å ´åˆã¯ `NULL` ã§ã™ã€‚ + +デフォルト値カラムã®åž‹ã¯çœç•¥å¯èƒ½ã§ã‚ã‚Šã€ãã®å ´åˆã¯ `expr` ã®åž‹ã‹ã‚‰æŽ¨æ¸¬ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ã‚«ãƒ©ãƒ  `EventDate DEFAULT toDate(EventTime)` ã¯æ—¥ä»˜åž‹ã«ãªã‚Šã¾ã™ã€‚ + +データ型ã¨ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã®å¼ã®ä¸¡æ–¹ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å¼ã‚’指定ã•ã‚ŒãŸåž‹ã«å¤‰æ›ã™ã‚‹æš—é»™ã®åž‹ã‚­ãƒ£ã‚¹ãƒˆé–¢æ•°ãŒæŒ¿å…¥ã•ã‚Œã¾ã™ã€‚例: `Hits UInt32 DEFAULT 0` ã¯å†…部的ã«ã¯ `Hits UInt32 DEFAULT toUInt32(0)` ã¨ã—ã¦è¡¨ç¾ã•ã‚Œã¾ã™ã€‚ + +デフォルト値ã®å¼ `expr` ã¯ä»»æ„ã®ãƒ†ãƒ¼ãƒ–ルカラムや定数をå‚ç…§ã§ãã¾ã™ã€‚ClickHouse ã¯ã€ãƒ†ãƒ¼ãƒ–ル構造ã®å¤‰æ›´ãŒå¼ã®è¨ˆç®—ã«ãƒ«ãƒ¼ãƒ—ã‚’å°Žå…¥ã—ãªã„ã“ã¨ã‚’確èªã—ã¾ã™ã€‚INSERTã®éš›ã«ã¯ã€å¼ãŒè§£æ±ºå¯èƒ½ã§ã‚ã‚‹ã“ã¨ã€ã™ãªã‚ã¡è¨ˆç®—ã«ä½¿ã‚れるã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒæ¸¡ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +### DEFAULT + +`DEFAULT expr` + +通常ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã€‚ã“ã®ã‚ˆã†ãªã‚«ãƒ©ãƒ ã®å€¤ãŒINSERTクエリã§æŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`expr` ã‹ã‚‰è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +CREATE OR REPLACE TABLE test +( + id UInt64, + updated_at DateTime DEFAULT now(), + updated_at_date Date DEFAULT toDate(updated_at) +) +ENGINE = MergeTree +ORDER BY id; + +INSERT INTO test (id) Values (1); + +SELECT * FROM test; +┌─id─┬──────────updated_at─┬─updated_at_date─┠+│ 1 │ 2023-02-24 17:06:46 │ 2023-02-24 │ +└────┴─────────────────────┴─────────────────┘ +``` + +### MATERIALIZED + +`MATERIALIZED expr` + +マテリアライズドå¼ã€‚ã“ã®ã‚ˆã†ãªã‚«ãƒ©ãƒ ã®å€¤ã¯è¡ŒãŒæŒ¿å…¥ã•ã‚Œã‚‹ã¨ãã«æŒ‡å®šã•ã‚ŒãŸãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰å¼ã«å¾“ã£ã¦è‡ªå‹•çš„ã«è¨ˆç®—ã•ã‚Œã¾ã™ã€‚値㯠`INSERT` ã®éš›ã«æ˜Žç¤ºçš„ã«æŒ‡å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +ã¾ãŸã€ã“ã®ã‚¿ã‚¤ãƒ—ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚«ãƒ©ãƒ ã¯ `SELECT *` ã®çµæžœã«ã¯å«ã¾ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ã€`SELECT *` ã®çµæžœã‚’常㫠`INSERT` を使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルã«å†æŒ¿å…¥ã§ãã‚‹ã¨ã„ã†ä¸å¤‰æ€§ã‚’維æŒã™ã‚‹ãŸã‚ã§ã™ã€‚ã“ã®å‹•ä½œã¯ `asterisk_include_materialized_columns` 設定を使ã£ã¦ç„¡åŠ¹ã«ã§ãã¾ã™ã€‚ + +例: + +```sql +CREATE OR REPLACE TABLE test +( + id UInt64, + updated_at DateTime MATERIALIZED now(), + updated_at_date Date MATERIALIZED toDate(updated_at) +) +ENGINE = MergeTree +ORDER BY id; + +INSERT INTO test Values (1); + +SELECT * FROM test; +┌─id─┠+│ 1 │ +└────┘ + +SELECT id, updated_at, updated_at_date FROM test; +┌─id─┬──────────updated_at─┬─updated_at_date─┠+│ 1 │ 2023-02-24 17:08:08 │ 2023-02-24 │ +└────┴─────────────────────┴─────────────────┘ + +SELECT * FROM test SETTINGS asterisk_include_materialized_columns=1; +┌─id─┬──────────updated_at─┬─updated_at_date─┠+│ 1 │ 2023-02-24 17:08:08 │ 2023-02-24 │ +└────┴─────────────────────┴─────────────────┘ +``` + +### EPHEMERAL + +`EPHEMERAL [expr]` + +エフェメラルカラム。ã“ã®ã‚¿ã‚¤ãƒ—ã®ã‚«ãƒ©ãƒ ã¯ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã•ã‚Œãšã€SELECTã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã›ã‚“。エフェメラルカラムã®å”¯ä¸€ã®ç›®çš„ã¯ã€ä»–ã®ã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤å¼ã‚’ãã‚Œã‹ã‚‰æ§‹ç¯‰ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +明示的ã«æŒ‡å®šã•ã‚Œã¦ã„ãªã„カラムãªã—ã§ã®æŒ¿å…¥ã¯ã€ã“ã®ã‚¿ã‚¤ãƒ—ã®ã‚«ãƒ©ãƒ ã‚’スキップã—ã¾ã™ã€‚ã“ã‚Œã¯ã€`SELECT *` ã®çµæžœã‚’常㫠`INSERT` を使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルã«å†æŒ¿å…¥ã§ãã‚‹ã¨ã„ã†ä¸å¤‰æ€§ã‚’維æŒã™ã‚‹ãŸã‚ã§ã™ã€‚ + +例: + +```sql +CREATE OR REPLACE TABLE test +( + id UInt64, + unhexed String EPHEMERAL, + hexed FixedString(4) DEFAULT unhex(unhexed) +) +ENGINE = MergeTree +ORDER BY id; + +INSERT INTO test (id, unhexed) Values (1, '5a90b714'); + +SELECT + id, + hexed, + hex(hexed) +FROM test +FORMAT Vertical; + +Row 1: +────── +id: 1 +hexed: Z�� +hex(hexed): 5A90B714 +``` + +### ALIAS + +`ALIAS expr` + +計算カラム(別å)。ã“ã®ã‚¿ã‚¤ãƒ—ã®ã‚«ãƒ©ãƒ ã¯ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã•ã‚Œãšã€INSERT値を挿入ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã›ã‚“。 + +SELECTクエリãŒã“ã®ã‚¿ã‚¤ãƒ—ã®ã‚«ãƒ©ãƒ ã‚’明示的ã«å‚ç…§ã™ã‚‹ã¨ã€å€¤ã¯ `expr` ã‹ã‚‰ã‚¯ã‚¨ãƒªæ™‚ã«è¨ˆç®—ã•ã‚Œã¾ã™ã€‚デフォルトã§ã¯ã€`SELECT *` ã¯ALIASカラムを除外ã—ã¾ã™ã€‚ã“ã®å‹•ä½œã¯è¨­å®š `asterisk_include_alias_columns` ã§ç„¡åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ALTERクエリを使用ã—ã¦æ–°ã—ã„カラムを追加ã™ã‚‹ã¨ã€ã“れらã®ã‚«ãƒ©ãƒ ã®å¤ã„データã¯æ›¸ãè¾¼ã¾ã‚Œã¾ã›ã‚“。代ã‚ã‚Šã«ã€å¤ã„データを読ã¿å–ã‚‹ã¨ãã«ã€æ–°ã—ã„カラムã®å€¤ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ä¿å­˜ã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§å¼ãŒã‚ªãƒ³ã‚¶ãƒ•ãƒ©ã‚¤ã§è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ãŸã ã—ã€å¼ã®å®Ÿè¡Œã«ç•°ãªã‚‹ã‚«ãƒ©ãƒ ãŒå¿…è¦ã§ã€ã‚¯ã‚¨ãƒªã«ç¤ºã•ã‚Œã¦ã„ãªã„å ´åˆã€å¿…è¦ãªãƒ‡ãƒ¼ã‚¿ãƒ–ロックã«å¯¾ã—ã¦ã ã‘追加ã§ã“れらã®ã‚«ãƒ©ãƒ ãŒèª­ã¿å–られã¾ã™ã€‚ + +æ–°ã—ã„カラムをテーブルã«è¿½åŠ ã—ã¦ã‚‚ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå¼ã‚’後ã§å¤‰æ›´ã—ãŸå ´åˆã€å¤ã„データã«ä½¿ç”¨ã•ã‚Œã‚‹å€¤ã¯å¤‰æ›´ã•ã‚Œã¾ã™ï¼ˆãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å€¤ãŒä¿å­˜ã•ã‚Œã¦ã„ãªã‹ã£ãŸãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ï¼‰ã€‚ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ã®ãƒžãƒ¼ã‚¸ã®å®Ÿè¡Œæ™‚ã«ã¯ã€çµåˆã•ã‚Œã¦ã„る部分ã®1ã¤ã§å€¤ãŒæ¬ ã‘ã¦ã„るカラムã®ãƒ‡ãƒ¼ã‚¿ãŒçµåˆã•ã‚ŒãŸéƒ¨åˆ†ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®è¦ç´ ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’設定ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +```sql +CREATE OR REPLACE TABLE test +( + id UInt64, + size_bytes Int64, + size String ALIAS formatReadableSize(size_bytes) +) +ENGINE = MergeTree +ORDER BY id; + +INSERT INTO test VALUES (1, 4678899); + +SELECT id, size_bytes, size FROM test; +┌─id─┬─size_bytes─┬─size─────┠+│ 1 │ 4678899 │ 4.46 MiB │ +└────┴────────────┴──────────┘ + +SELECT * FROM test SETTINGS asterisk_include_alias_columns=1; +┌─id─┬─size_bytes─┬─size─────┠+│ 1 │ 4678899 │ 4.46 MiB │ +└────┴────────────┴──────────┘ +``` + +## 主キー + +テーブルを作æˆã™ã‚‹ã¨ãã«[主キー](../../../engines/table-engines/mergetree-family/mergetree.md#primary-keys-and-indexes-in-queries)を定義ã§ãã¾ã™ã€‚主キーã¯2ã¤ã®æ–¹æ³•ã§æŒ‡å®šã§ãã¾ã™: + +- カラムリスト内 + +``` sql +CREATE TABLE db.table_name +( + name1 type1, name2 type2, ..., + PRIMARY KEY(expr1[, expr2,...]) +) +ENGINE = engine; +``` + +- カラムリスト外 + +``` sql +CREATE TABLE db.table_name +( + name1 type1, name2 type2, ... +) +ENGINE = engine +PRIMARY KEY(expr1[, expr2,...]); +``` + +:::tip +1ã¤ã®ã‚¯ã‚¨ãƒªã§ä¸¡æ–¹ã®æ–¹æ³•ã‚’組ã¿åˆã‚ã›ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +::: + +## 制約 + +カラムã®è¨˜è¿°ã¨ã¨ã‚‚ã«åˆ¶ç´„を定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +### CONSTRAINT + +``` sql +CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1] [compression_codec] [TTL expr1], + ... + CONSTRAINT constraint_name_1 CHECK boolean_expr_1, + ... +) ENGINE = engine +``` + +`boolean_expr_1` ã¯ä»»æ„ã®ãƒ–ールå¼ã«ã§ãã¾ã™ã€‚テーブルã«åˆ¶ç´„ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã€å„行㮠`INSERT` クエリã”ã¨ã«ãれらãŒãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ã©ã®åˆ¶ç´„も満ãŸã•ã‚Œãªã„å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯åˆ¶ç´„åã¨ãƒã‚§ãƒƒã‚¯å¯¾è±¡ã®å¼ã§ä¾‹å¤–を発生ã•ã›ã¾ã™ã€‚ + +大é‡ã®åˆ¶ç´„を追加ã™ã‚‹ã¨ã€å¤§è¦æ¨¡ãª `INSERT` クエリã®ãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +### ASSUME + +`ASSUME` å¥ã¯ã€ãƒ†ãƒ¼ãƒ–ル上ã«å¸¸ã«çœŸã§ã‚ã‚‹ã¨ä»®å®šã™ã‚‹ `CONSTRAINT` を定義ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®åˆ¶ç´„ã¯ã€SQLクエリã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ãŸã‚ã«ã‚ªãƒ—ティマイザーã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +ã“ã®ä¾‹ã§ã¯ã€`ASSUME CONSTRAINT` ㌠`users_a` テーブルã®ä½œæˆã§ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™: + +```sql +CREATE TABLE users_a ( + uid Int16, + name String, + age Int16, + name_len UInt8 MATERIALIZED length(name), + CONSTRAINT c1 ASSUME length(name) = name_len +) +ENGINE=MergeTree +ORDER BY (name_len, name); +``` + +ã“ã“ã§ã€`ASSUME CONSTRAINT` ã¯ã€`length(name)` 関数ãŒå¸¸ã« `name_len` カラムã®å€¤ã¨ç­‰ã—ã„ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ã¤ã¾ã‚Šã€`length(name)` ãŒã‚¯ã‚¨ãƒªã§å‘¼ã³å‡ºã•ã‚Œã‚‹ãŸã³ã«ã€ClickHouseã¯ãれを `name_len` ã§ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã‚‹ãŸã‚ã€`length()` 関数を呼ã³å‡ºã™ã“ã¨ã‚’é¿ã‘ã‚‹ãŸã‚ã«é«˜é€Ÿã«ãªã‚Šã¾ã™ã€‚ + +次ã«ã€ã‚¯ã‚¨ãƒª `SELECT name FROM users_a WHERE length(name) < 5;` を実行ã™ã‚‹ã¨ã€ClickHouseã¯`ASSUME CONSTRAINT` ã«ã‚ˆã£ã¦ `SELECT name FROM users_a WHERE name_len < 5;` ã«æœ€é©åŒ–ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å„行㮠`name` ã®é•·ã•ã‚’計算ã™ã‚‹ã“ã¨ã‚’é¿ã‘ã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªãŒé«˜é€Ÿã«ãªã‚Šã¾ã™ã€‚ + +`ASSUME CONSTRAINT` ã¯åˆ¶ç´„を強制ã™ã‚‹ã‚‚ã®ã§ã¯ãªãã€å˜ã«ã‚ªãƒ—ティマイザーã«åˆ¶ç´„ãŒçœŸã§ã‚ã‚‹ã“ã¨ã‚’知らã›ã‚‹ã‚‚ã®ã§ã™ã€‚制約ãŒå®Ÿéš›ã«çœŸã§ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªã®çµæžœãŒä¸æ­£ç¢ºã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€åˆ¶ç´„ãŒçœŸã§ã‚ã‚‹ã¨ç¢ºä¿¡ã—ã¦ã„ã‚‹å ´åˆã«ã®ã¿ `ASSUME CONSTRAINT` を使用ã™ã‚‹ã¹ãã§ã™ã€‚ + +## æœ‰åŠ¹æœŸé™ (TTL) å¼ + +値ã®ä¿å­˜æœŸé–“を定義ã—ã¾ã™ã€‚MergeTreeファミリーã®ãƒ†ãƒ¼ãƒ–ルã§ã®ã¿æŒ‡å®šå¯èƒ½ã§ã™ã€‚詳細ãªèª¬æ˜Žã«ã¤ã„ã¦ã¯ã€[カラムã¨ãƒ†ãƒ¼ãƒ–ルã®TTL](../../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-ttl)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## カラム圧縮コーデック {#column_compression_codec} + +デフォルトã§ã¯ã€ã‚»ãƒ«ãƒ•ãƒžãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseã§ã¯ `lz4` 圧縮をé©ç”¨ã—ã€ClickHouse Cloudã§ã¯ `zstd` ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +`MergeTree`エンジンファミリーã®å ´åˆã€ã‚µãƒ¼ãƒæ§‹æˆã®[compression](../../../operations/server-configuration-parameters/settings.md#server-settings-compression)セクションã§ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®åœ§ç¸®æ–¹æ³•ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã¾ãŸã€`CREATE TABLE` クエリ内ã§å„カラムã®åœ§ç¸®æ–¹æ³•ã‚’定義ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +``` sql +CREATE TABLE codec_example +( + dt Date CODEC(ZSTD), + ts DateTime CODEC(LZ4HC), + float_value Float32 CODEC(NONE), + double_value Float64 CODEC(LZ4HC(9)), + value Float32 CODEC(Delta, ZSTD) +) +ENGINE = +... +``` + +デフォルト圧縮をå‚ç…§ã™ã‚‹ã«ã¯ `Default` コーデックを指定ã§ãã¾ã™ã€‚実行時ã«ç•°ãªã‚‹è¨­å®šï¼ˆãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ã®ãƒ—ロパティ)ã«ä¾å­˜ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +例: `value UInt64 CODEC(Default)` — コーデック指定ãŒãªã„å ´åˆã¨åŒã˜ã§ã™ã€‚ + +ã¾ãŸã€ã‚«ãƒ©ãƒ ã‹ã‚‰ç¾åœ¨ã®CODECを削除ã—ã€config.xmlã‹ã‚‰ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆåœ§ç¸®ã‚’使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +``` sql +ALTER TABLE codec_example MODIFY COLUMN float_value CODEC(Default); +``` + +コードをパイプラインã§çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚例: `CODEC(Delta, Default)`。 + +:::tip +ClickHouseデータベースファイルを外部ユーティリティã§ã‚ã‚‹ `lz4` ãªã©ã§è§£å‡ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。代ã‚ã‚Šã«ã€ç‰¹åˆ¥ãª [clickhouse-compressor](https://github.com/ClickHouse/ClickHouse/tree/master/programs/compressor) ユーティリティを使用ã—ã¦ãã ã•ã„。 +::: + +圧縮ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るテーブルエンジン: + +- [MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md) ファミリー。カラム圧縮コーデックをサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€åœ§ç¸®è¨­å®šã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆåœ§ç¸®æ–¹æ³•ã‚’é¸æŠžã§ãã¾ã™ã€‚ +- [Log](../../../engines/table-engines/log-family/index.md) ファミリー。デフォルト㧠`lz4` 圧縮方法を使用ã—ã€ã‚«ãƒ©ãƒ åœ§ç¸®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ +- [Set](../../../engines/table-engines/special/set.md)。デフォルト圧縮ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +- [Join](../../../engines/table-engines/special/join.md)。デフォルト圧縮ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ClickHouseã¯æ±Žç”¨ã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¨å°‚用ã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### 汎用コーデック + +#### NONE + +`NONE` — 圧縮ãªã—。 + +#### LZ4 + +`LZ4` — デフォルトã§ä½¿ç”¨ã•ã‚Œã‚‹ãƒ­ã‚¹ãƒ¬ã‚¹ãª [データ圧縮アルゴリズム](https://github.com/lz4/lz4) ã§ã™ã€‚LZ4ã®é«˜é€Ÿåœ§ç¸®ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +#### LZ4HC + +`LZ4HC[(level)]` — LZ4 HC(高圧縮)アルゴリズムã§ã€levelを設定å¯èƒ½ã§ã™ã€‚デフォルトレベル: 9。`level <= 0` ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ¬ãƒ™ãƒ«ã‚’é©ç”¨ã—ã¾ã™ã€‚å¯èƒ½ãªãƒ¬ãƒ™ãƒ«: \[1, 12\]。推奨レベル範囲: \[4, 9\]。 + +#### ZSTD + +`ZSTD[(level)]` — [ZSTD 圧縮アルゴリズム](https://en.wikipedia.org/wiki/Zstandard) ã§ã€`level` を設定å¯èƒ½ã§ã™ã€‚å¯èƒ½ãªãƒ¬ãƒ™ãƒ«: \[1, 22\]。デフォルトレベル: 1。 + +高圧縮レベルã¯ã€éžå¯¾ç§°ã‚·ãƒŠãƒªã‚ªã€ãŸã¨ãˆã°ä¸€åº¦åœ§ç¸®ã—ã¦ä½•åº¦ã‚‚解å‡ã™ã‚‹å ´åˆã«æœ‰åŠ¹ã§ã™ã€‚高レベルã¯ã‚ˆã‚Šè‰¯ã„圧縮ã¨é«˜ã„CPU使用率をæ„味ã—ã¾ã™ã€‚ + +#### ZSTD_QAT + +`ZSTD_QAT[(level)]` — [ZSTD 圧縮アルゴリズム](https://en.wikipedia.org/wiki/Zstandard) ã§ã€levelを設定å¯èƒ½ã€[Intel® QATlib](https://github.com/intel/qatlib) 㨠[Intel® QAT ZSTD Plugin](https://github.com/intel/QAT-ZSTD-Plugin) ã«ã‚ˆã£ã¦å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚å¯èƒ½ãªãƒ¬ãƒ™ãƒ«: \[1, 12\]。デフォルトレベル: 1。推奨レベル範囲: \[6, 12\]。ã„ãã¤ã‹ã®åˆ¶é™ãŒã‚ã‚Šã¾ã™: + +- ZSTD_QAT ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ç„¡åŠ¹ã«ãªã£ã¦ãŠã‚Šã€è¨­å®š [enable_zstd_qat_codec](../../../operations/settings/settings.md#enable_zstd_qat_codec) を有効ã«ã—ãŸå¾Œã«ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚ +- 圧縮ã™ã‚‹ãŸã‚ã«ã€ZSTD_QAT 㯠Intel® QAT オフロードデãƒã‚¤ã‚¹ ([QuickAssist Technology](https://www.intel.com/content/www/us/en/developer/topic-technology/open/quick-assist-technology/overview.html)) を使用ã—よã†ã¨ã—ã¾ã™ã€‚ãã®ã‚ˆã†ãªãƒ‡ãƒã‚¤ã‚¹ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã§ã®ZSTD圧縮ã«ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ã¾ã™ã€‚ +- 解å‡ã¯å¸¸ã«ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã§è¡Œã‚ã‚Œã¾ã™ã€‚ + +:::note +ZSTD_QAT 㯠ClickHouse Cloud ã§ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 +::: + +### 専用コーデック + +ã“れらã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®ç‰¹å®šã®ç‰¹å¾´ã‚’活用ã—ã¦åœ§ç¸®ã‚’より効果的ã«ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ã“れらã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã®ä¸­ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿è‡ªä½“を圧縮ã™ã‚‹ã‚‚ã®ã§ã¯ãªãã€ãƒ‡ãƒ¼ã‚¿ã‚’準備ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã€æ¬¡ã®ä¸€èˆ¬ç›®çš„コーデックを使ã£ãŸåœ§ç¸®çŽ‡ã‚’高ã‚ã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚ + +#### Delta + +`Delta(delta_bytes)` — å…ƒã®å€¤ã‚’隣接ã™ã‚‹2ã¤ã®å€¤ã®å·®ã«ç½®æ›ã™ã‚‹åœ§ç¸®æ–¹å¼ã€‚ãŸã ã—ã€æœ€åˆã®å€¤ã¯ãã®ã¾ã¾ã§ã™ã€‚最大 `delta_bytes` ãŒãƒ‡ãƒ«ã‚¿å€¤ã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã€ã—ãŸãŒã£ã¦ `delta_bytes` ã¯å…ƒã®å€¤ã®æœ€å¤§ã‚µã‚¤ã‚ºã§ã™ã€‚å¯èƒ½ãª `delta_bytes` ã®å€¤: 1, 2, 4, 8。デフォルト㮠`delta_bytes` 値ã¯ã€1, 2, 4, ã¾ãŸã¯ 8 ã®ã„ãšã‚Œã‹ã§ã‚ã‚‹å ´åˆã¯ `sizeof(type)` ã€ãã®ä»–ã®å ´åˆã¯ 1 ã§ã™ã€‚Delta ã¯ãƒ‡ãƒ¼ã‚¿æº–備コーデックã§ã‚ã‚Šã€å˜ç‹¬ã§ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 + +#### DoubleDelta + +`DoubleDelta(bytes_size)` — 二é‡ã®ãƒ‡ãƒ«ã‚¿ã‚’計算ã—ã€ã‚³ãƒ³ãƒ‘クトãªãƒã‚¤ãƒŠãƒªå½¢å¼ã§æ›¸ãè¾¼ã¿ã¾ã™ã€‚å¯èƒ½ãª `bytes_size` ã®å€¤: 1, 2, 4, 8。デフォルトã¯ã€1, 2, 4, ã¾ãŸã¯ 8 ã®ã„ãšã‚Œã‹ã®å ´åˆã¯ `sizeof(type)` ã§ã™ã€‚ãã®ä»–ã®å ´åˆã¯ 1 ã§ã™ã€‚一定ã®é–“隔をæŒã¤å˜èª¿å¢—加ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã€ä¾‹ãˆã°æ™‚系列データã§æœ€é©ãªåœ§ç¸®çŽ‡ãŒé”æˆã•ã‚Œã¾ã™ã€‚ã‚らゆる固定幅型ã§ä½¿ç”¨å¯èƒ½ã€‚Gorilla TSDBã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’実装ã—ã¦ãŠã‚Šã€ã“れを64ビット型ã«æ‹¡å¼µã—ã¦ã„ã¾ã™ã€‚32ビットã®ãƒ‡ãƒ«ã‚¿ã«ã¯1ビット余分ã«ä½¿ç”¨ã•ã‚Œã¾ã™ï¼š5ビットプレフィックス(4ビットプレフィックスã§ã¯ãªã)。詳細ã¯[Gorilla: A Fast, Scalable, In-Memory Time Series Database](http://www.vldb.org/pvldb/vol8/p1816-teller.pdf)ã®ã€Œã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã®åœ§ç¸®ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。DoubleDelta ã¯ãƒ‡ãƒ¼ã‚¿æº–備コーデックã§ã‚ã‚Šã€å˜ç‹¬ã§ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 + +#### GCD + +`GCD()` — カラム内ã®å€¤ã®æœ€å¤§å…¬ç´„æ•° (GCD) を計算ã—ã€å„値をGCDã§é™¤ç®—ã—ã¾ã™ã€‚æ•´æ•°åž‹ã€å°æ•°åž‹ã€æ—¥ä»˜/時間型ã®ã‚«ãƒ©ãƒ ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ã“ã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¯GCDã®å€æ•°ã§å¤‰åŒ–(増加ã¾ãŸã¯æ¸›å°‘)ã™ã‚‹å€¤ã‚’æŒã¤ã‚«ãƒ©ãƒ ã«é©ã—ã¦ã„ã¾ã™ã€‚例:24, 28, 16, 24, 8, 24(GCD = 4)。GCDã¯ãƒ‡ãƒ¼ã‚¿æº–備コーデックã§ã‚ã‚Šã€å˜ç‹¬ã§ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 + +#### Gorilla + +`Gorilla(bytes_size)` — ç¾åœ¨ã®æµ®å‹•å°æ•°ç‚¹å€¤ã¨å‰ã®å€¤ã®é–“ã®XORを計算ã—ã€ãれをコンパクトãªãƒã‚¤ãƒŠãƒªå½¢å¼ã§æ›¸ãè¾¼ã¿ã¾ã™ã€‚連続ã—ãŸå€¤ã®é•ã„ãŒå°ã•ã(ã™ãªã‚ã¡ã€ã‚·ãƒªãƒ¼ã‚ºã®å€¤ãŒã‚†ã£ãã‚Šã¨å¤‰åŒ–ã™ã‚‹å ´åˆï¼‰ã€åœ§ç¸®çŽ‡ãŒå‘上ã—ã¾ã™ã€‚Gorilla TSDBã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’実装ã—ã¦ãŠã‚Šã€ã“れを64ビット型ã«æ‹¡å¼µã—ã¦ã„ã¾ã™ã€‚å¯èƒ½ãª `bytes_size` ã®å€¤: 1, 2, 4, 8。デフォルトã¯ã€1, 2, 4, ã¾ãŸã¯ 8 ã®ã„ãšã‚Œã‹ã®å ´åˆã¯ `sizeof(type)` ã§ã™ã€‚ãã®ä»–ã®å ´åˆã¯ 1 ã§ã™ã€‚ã•ã‚‰ãªã‚‹æƒ…å ±ã«ã¤ã„ã¦ã¯ã€[Gorilla: A Fast, Scalable, In-Memory Time Series Database](https://doi.org/10.14778/2824032.2824078)ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³4.1ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### FPC + +`FPC(level, float_size)` - 2ã¤ã®äºˆæ¸¬å­ã®ã†ã¡ã‚ˆã‚Šå„ªã‚ŒãŸæ–¹ã‚’使ã£ã¦ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®æ¬¡ã®æµ®å‹•å°æ•°ç‚¹å€¤ã‚’ç¹°ã‚Šè¿”ã—予測ã—ã€å®Ÿéš›ã®å€¤ã¨äºˆæ¸¬ã•ã‚ŒãŸå€¤ã‚’XORã—ã€ãã®çµæžœã‚’先行ゼロ圧縮ã—ã¾ã™ã€‚Gorillaã«ä¼¼ã¦ãŠã‚Šã€æµ®å‹•å°æ•°ç‚¹å€¤ã®ã‚·ãƒªãƒ¼ã‚ºã‚’ゆã£ãã‚Šã¨å¤‰åŒ–ã•ã›ã‚‹éš›ã«åŠ¹çŽ‡çš„ã§ã™ã€‚64ビット値(å€ç²¾åº¦æµ®å‹•å°æ•°ç‚¹æ•°ï¼‰ã«å¯¾ã—ã¦ã€FPCã¯Gorillaよりも速ã„ã§ã™ãŒã€32ビット値ã«å¯¾ã—ã¦ã¯ç•°ãªã‚‹çµæžœãŒå¾—られる場åˆãŒã‚ã‚Šã¾ã™ã€‚å¯èƒ½ãª `level` ã®å€¤: 1-28ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯12。å¯èƒ½ãª `float_size` ã®å€¤: 4, 8ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ `sizeof(type)` ã§ã™ãŒã€ã‚¿ã‚¤ãƒ—ãŒFloatã§ã‚ã‚‹å ´åˆã§ã™ã€‚ãれ以外ã®å ´åˆã¯4ã§ã™ã€‚アルゴリズムã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[High Throughput Compression of Double-Precision Floating-Point Data](https://userweb.cs.txstate.edu/~burtscher/papers/dcc07a.pdf)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### T64 + +`T64` — 整数データ型(`Enum`ã€`Date` ãŠã‚ˆã³ `DateTime` ã‚’å«ã‚€ï¼‰ã®å€¤ã®ä¸è¦ãªé«˜ãƒ“ットを切りè½ã¨ã™åœ§ç¸®æ–¹å¼ã§ã™ã€‚アルゴリズムã®ãã‚Œãžã‚Œã®ã‚¹ãƒ†ãƒƒãƒ—ã§ã€ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¯64個ã®å€¤ã®ãƒ–ロックをå–ã‚Šã€64×64ビットã®ãƒžãƒˆãƒªãƒƒã‚¯ã‚¹ã«å…¥ã‚Œã€è»¢ç½®ã—ã€å€¤ã®ä¸è¦ãªãƒ“ットを切りæ¨ã¦ã€æ®‹ã‚Šã‚’シーケンスã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ä¸è¦ãªãƒ“ットã¯ã€åœ§ç¸®ã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿éƒ¨åˆ†å…¨ä½“ã§æœ€å¤§å€¤ã¨æœ€å°å€¤ã®é–“ã§ç•°ãªã‚‰ãªã„ビットã§ã™ã€‚ + +`DoubleDelta` åŠã³ `Gorilla` コーデックã¯Gorilla TSDBã«ãŠã„ã¦ã€ãã®åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚Gorillaアプローãƒã¯ã€ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã‚’æŒã¤ã‚†ã£ãã‚Šã¨å¤‰åŒ–ã™ã‚‹å€¤ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚·ãƒŠãƒªã‚ªã§åŠ¹æžœçš„ã§ã™ã€‚タイムスタンプ㯠`DoubleDelta` コーデックã«ã‚ˆã£ã¦åŠ¹æžœçš„ã«åœ§ç¸®ã•ã‚Œã€å€¤ã¯ `Gorilla` コーデックã«ã‚ˆã£ã¦åŠ¹æžœçš„ã«åœ§ç¸®ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€åŠ¹æžœçš„ã«ä¿å­˜ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを得るã«ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ãªæ§‹æˆã§ãƒ†ãƒ¼ãƒ–ルを作æˆã§ãã¾ã™ã€‚ + +``` sql +CREATE TABLE codec_example +( + timestamp DateTime CODEC(DoubleDelta), + slow_values Float32 CODEC(Gorilla) +) +ENGINE = MergeTree() +``` + +### æš—å·åŒ–コーデック + +ã“れらã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¯å®Ÿéš›ã«ã¯ãƒ‡ãƒ¼ã‚¿ã‚’圧縮ã—ãªã„ãŒã€ä»£ã‚ã‚Šã«ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ‡ãƒ¼ã‚¿ã‚’æš—å·åŒ–ã—ã¾ã™ã€‚ã“れらã¯ã€[encryption](../../../operations/server-configuration-parameters/settings.md#server-settings-encryption) 設定ã«ã‚ˆã£ã¦æš—å·åŒ–キーãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ãªãŠã€æš—å·åŒ–ã¯é€šå¸¸ã€ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ãƒ‘イプラインã®æœ€å¾Œã«æ„味をãªã—ã¾ã™ã€‚ãªãœãªã‚‰ã€æš—å·åŒ–ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯é€šå¸¸ã€æ„味ã®ã‚る方法ã§åœ§ç¸®ã™ã‚‹ã“ã¨ãŒã§ããªã„ãŸã‚ã§ã™ã€‚ + +æš—å·åŒ–コーデック: + +#### AES_128_GCM_SIV + +`CODEC('AES-128-GCM-SIV')` — RFC 8452](https://tools.ietf.org/html/rfc8452) GCM-SIV モード㧠AES-128 を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’æš—å·åŒ–ã—ã¾ã™ã€‚ + +#### AES-256-GCM-SIV + +`CODEC('AES-256-GCM-SIV')` — GCM-SIV モード㧠AES-256 を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’æš—å·åŒ–ã—ã¾ã™ã€‚ + +ã“れらã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¯å›ºå®šãƒŽãƒ³ã‚¹ã‚’使用ã—ã€æš—å·åŒ–ã¯æ±ºå®šçš„ã§ã‚ã‚‹ãŸã‚ã€[ReplicatedMergeTree](../../../engines/table-engines/mergetree-family/replication.md) ãªã©ã®é‡è¤‡æŽ’除エンジンã¨äº’æ›æ€§ãŒã‚ã‚Šã¾ã™ãŒæ¬ ç‚¹ãŒã‚ã‚Šã¾ã™ï¼šåŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ–ロックãŒ2回暗å·åŒ–ã•ã‚Œã‚‹ã¨ã€ç”Ÿæˆã•ã‚Œã‚‹æš—å·æ–‡ã¯ã¾ã£ãŸãåŒã˜ã«ãªã‚Šã¾ã™ã®ã§ã€ãƒ‡ã‚£ã‚¹ã‚¯ã‚’読ã¿å–ã‚‹ã“ã¨ãŒã§ãる攻撃者ã¯ã“ã®ç­‰ä¾¡æ€§ã‚’確èªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆã‚³ãƒ³ãƒ†ãƒ³ãƒ„自体ã§ã¯ãªã„ãŒï¼‰ã€‚ + +:::note +"\*MergeTree"ファミリーをå«ã‚€ã»ã¨ã‚“ã©ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã‚’é©ç”¨ã›ãšã«ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æš—å·åŒ–ã•ã‚ŒãŸã‚«ãƒ©ãƒ ãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹åŒ–ã•ã‚Œã‚‹ã¨ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ãƒ—レーンテキストãŒç¾ã‚Œã¾ã™ã€‚ +::: + +:::note +特定ã®å€¤ã‚’æš—å·åŒ–ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã§è¨€åŠã™ã‚‹å…·ä½“çš„ãªå€¤ã‚’å«ã‚€SELECTクエリを実行ã—ãŸå ´åˆï¼ˆä¾‹ï¼šWHEREå¥å†…)ã€ãã®å€¤ãŒ[system.query_log](../../../operations/system-tables/query_log.md) ã«è¡¨ç¤ºã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ログã®è¨˜éŒ²ã‚’無効ã«ã™ã‚‹ã“ã¨ãŒè€ƒæ…®ã•ã‚Œã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +::: + +**例** + +```sql +CREATE TABLE mytable +( + x String CODEC(AES_128_GCM_SIV) +) +ENGINE = MergeTree ORDER BY x; +``` + +:::note +圧縮をé©ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€æ˜Žç¤ºçš„ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã«ã¯æš—å·åŒ–ã®ã¿ãŒé©ç”¨ã•ã‚Œã¾ã™ã€‚ +::: + +**例** + +```sql +CREATE TABLE mytable +( + x String Codec(Delta, LZ4, AES_128_GCM_SIV) +) +ENGINE = MergeTree ORDER BY x; +``` + +## 一時テーブル + +:::note +一時テーブルã¯ãƒ¬ãƒ—リケートã•ã‚Œã¦ã„ãªã„ã“ã¨ã«ã”注æ„ãã ã•ã„。ã—ãŸãŒã£ã¦ã€ä¸€æ™‚テーブルã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒä»–ã®ãƒ¬ãƒ—リカã§ä½¿ç”¨å¯èƒ½ã§ã‚ã‚‹ä¿è¨¼ã¯ã‚ã‚Šã¾ã›ã‚“。一時テーブルãŒä¾¿åˆ©ãªä¸»ãªåˆ©ç”¨ã‚±ãƒ¼ã‚¹ã¯ã€å˜ä¸€ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ä¸­ã«å°ã•ãªå¤–部データセットをクエリã¾ãŸã¯çµåˆã™ã‚‹å ´åˆã§ã™ã€‚ +::: + +ClickHouseã¯æ¬¡ã®ç‰¹å¾´ã‚’æŒã¤ä¸€æ™‚テーブルをサãƒãƒ¼ãƒˆã—ã¦ã„る: + +- 一時テーブルã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒçµ‚了ã—ãŸã¨ãã«æ¶ˆå¤±ã—ã¾ã™ã€‚接続ãŒå¤±ã‚ã‚ŒãŸå ´åˆã‚‚å«ã¾ã‚Œã¾ã™ã€‚ +- エンジンãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ä¸€æ™‚テーブルã¯Memoryテーブルエンジンを使用ã—ã€`Replicated`ã¨`KeeperMap`エンジンを除ãä»»æ„ã®ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã§ãã¾ã™ã€‚ +- 一時テーブルã«DBを指定ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。データベース外ã«ä½œæˆã•ã‚Œã¾ã™ã€‚ +- 分散クエリ処ç†ã§ã¯ã€Memoryエンジンを使用ã—ã¦ã„るクエリã§å‚ç…§ã•ã‚Œã‚‹ä¸€æ™‚テーブルãŒãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«æ¸¡ã•ã‚Œã¾ã™ã€‚ + +一時テーブルを作æˆã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®æ§‹æ–‡ã‚’使用ã—ã¾ã™ï¼š + +``` sql +CREATE TEMPORARY TABLE [IF NOT EXISTS] table_name +( + name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], + name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + ... +) [ENGINE = engine] +``` + +ã»ã¨ã‚“ã©ã®å ´åˆã€ä¸€æ™‚テーブルã¯æ‰‹å‹•ã§ä½œæˆã•ã‚Œã‚‹ã®ã§ã¯ãªãã€ã‚¯ã‚¨ãƒªã®å¤–部データを使用ã™ã‚‹å ´åˆã‚„ã€åˆ†æ•£ã—㟠`(GLOBAL) IN` ã®ã¨ãã«ä½œæˆã•ã‚Œã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯è©²å½“ã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„ + +エンジン㫠[ENGINE = Memory](../../../engines/table-engines/special/memory.md) を使用ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルを一時テーブルã®ä»£ã‚ã‚Šã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## REPLACE TABLE + +'REPLACE' クエリã¯ãƒ†ãƒ¼ãƒ–ルを原å­çš„ã«æ›´æ–°ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +:::note +ã“ã®ã‚¯ã‚¨ãƒªã¯[Atomic](../../../engines/database-engines/atomic.md)データベースエンジンã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€æ–°ã—ã„テーブルを作æˆã—ã¦ã€ä¸è¦ãªãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ãªã„ `SELECT` ステートメントã§ãれを埋ã‚ã€å¤ã„テーブルを削除ã—ã€æ–°ã—ã„ã‚‚ã®ã‚’リãƒãƒ¼ãƒ ã—ã¾ã™ï¼š + +```sql +CREATE TABLE myNewTable AS myOldTable; +INSERT INTO myNewTable SELECT * FROM myOldTable WHERE CounterID <12345; +DROP TABLE myOldTable; +RENAME TABLE myNewTable TO myOldTable; +``` + +上記ã®ä»£ã‚ã‚Šã«ä»¥ä¸‹ã‚’使用ã§ãã¾ã™ï¼š + +```sql +REPLACE TABLE myOldTable ENGINE = MergeTree() ORDER BY CounterID AS SELECT * FROM myOldTable WHERE CounterID <12345; +``` + +### 構文 + +``` sql +{CREATE [OR REPLACE] | REPLACE} TABLE [db.]table_name +``` + +`CREATE` クエリã®ã™ã¹ã¦ã®æ§‹æ–‡å½¢å¼ã¯ã“ã®ã‚¯ã‚¨ãƒªã§ã‚‚機能ã—ã¾ã™ã€‚存在ã—ãªã„テーブルã«å¯¾ã™ã‚‹ `REPLACE` ã¯ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã—ã¾ã™ã€‚ + +### 例 + +次ã®ãƒ†ãƒ¼ãƒ–ルを考慮ã—ã¾ã™ï¼š + +```sql +CREATE DATABASE base ENGINE = Atomic; +CREATE OR REPLACE TABLE base.t1 (n UInt64, s String) ENGINE = MergeTree ORDER BY n; +INSERT INTO base.t1 VALUES (1, 'test'); +SELECT * FROM base.t1; +``` + +```text +┌─n─┬─s────┠+│ 1 │ test │ +└───┴──────┘ +``` + +`REPLACE` クエリを使用ã—ã¦ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’クリア: + +```sql +CREATE OR REPLACE TABLE base.t1 (n UInt64, s Nullable(String)) ENGINE = MergeTree ORDER BY n; +INSERT INTO base.t1 VALUES (2, null); +SELECT * FROM base.t1; +``` + +```text +┌─n─┬─s──┠+│ 2 │ \N │ +└───┴────┘ +``` + +`REPLACE` クエリを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ル構造を変更: + +```sql +REPLACE TABLE base.t1 (n UInt64) ENGINE = MergeTree ORDER BY n; +INSERT INTO base.t1 VALUES (3); +SELECT * FROM base.t1; +``` + +```text +┌─n─┠+│ 3 │ +└───┘ +``` + +## COMMENT å¥ + +テーブルを作æˆã™ã‚‹ã¨ãã«ã‚³ãƒ¡ãƒ³ãƒˆã‚’追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +``` sql +CREATE TABLE db.table_name +( + name1 type1, name2 type2, ... +) +ENGINE = engine +COMMENT 'コメント' +``` + +**例** + +クエリ: + +``` sql +CREATE TABLE t1 (x String) ENGINE = Memory COMMENT '一時的ãªãƒ†ãƒ¼ãƒ–ル'; +SELECT name, comment FROM system.tables WHERE name = 't1'; +``` + +çµæžœ: + +```text +┌─name─┬─comment─────────────┠+│ t1 │ 一時的ãªãƒ†ãƒ¼ãƒ–ル │ +└──────┴─────────────────────┘ +``` + +## 関連コンテンツ + +- ブログ: [Optimizing ClickHouse with Schemas and Codecs](https://clickhouse.com/blog/optimize-clickhouse-codecs-compression-schema) +- ブログ: [Working with time series data in ClickHouse](https://clickhouse.com/blog/working-with-time-series-data-and-functions-ClickHouse) diff --git a/docs/ja/sql-reference/statements/create/user.md b/docs/ja/sql-reference/statements/create/user.md new file mode 100644 index 00000000000..7827078a1d2 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/user.md @@ -0,0 +1,236 @@ +--- +slug: /ja/sql-reference/statements/create/user +sidebar_position: 39 +sidebar_label: USER +title: "CREATE USER" +--- + +[ユーザーアカウント](../../../guides/sre/user-management/index.md#user-account-management)を作æˆã—ã¾ã™ã€‚ + +構文: + +``` sql +CREATE USER [IF NOT EXISTS | OR REPLACE] name1 [, name2 [,...]] [ON CLUSTER cluster_name] + [NOT IDENTIFIED | IDENTIFIED {[WITH {plaintext_password | sha256_password | sha256_hash | double_sha1_password | double_sha1_hash}] BY {'password' | 'hash'}} | WITH NO_PASSWORD | {WITH ldap SERVER 'server_name'} | {WITH kerberos [REALM 'realm']} | {WITH ssl_certificate CN 'common_name' | SAN 'TYPE:subject_alt_name'} | {WITH ssh_key BY KEY 'public_key' TYPE 'ssh-rsa|...'} | {WITH http SERVER 'server_name' [SCHEME 'Basic']} [VALID UNTIL datetime] + [, {[{plaintext_password | sha256_password | sha256_hash | ...}] BY {'password' | 'hash'}} | {ldap SERVER 'server_name'} | {...} | ... [,...]]] + [HOST {LOCAL | NAME 'name' | REGEXP 'name_regexp' | IP 'address' | LIKE 'pattern'} [,...] | ANY | NONE] + [VALID UNTIL datetime] + [IN access_storage_type] + [DEFAULT ROLE role [,...]] + [DEFAULT DATABASE database | NONE] + [GRANTEES {user | role | ANY | NONE} [,...] [EXCEPT {user | role} [,...]]] + [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY | WRITABLE] | PROFILE 'profile_name'] [,...] +``` + +`ON CLUSTER`å¥ã¯ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ä¸Šã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚[分散DDL](../../../sql-reference/distributed-ddl.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 識別 + +ユーザーã®è­˜åˆ¥ã«ã¯è¤‡æ•°ã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™: + +- `IDENTIFIED WITH no_password` +- `IDENTIFIED WITH plaintext_password BY 'qwerty'` +- `IDENTIFIED WITH sha256_password BY 'qwerty'` ã¾ãŸã¯ `IDENTIFIED BY 'password'` +- `IDENTIFIED WITH sha256_hash BY 'hash'` ã¾ãŸã¯ `IDENTIFIED WITH sha256_hash BY 'hash' SALT 'salt'` +- `IDENTIFIED WITH double_sha1_password BY 'qwerty'` +- `IDENTIFIED WITH double_sha1_hash BY 'hash'` +- `IDENTIFIED WITH bcrypt_password BY 'qwerty'` +- `IDENTIFIED WITH bcrypt_hash BY 'hash'` +- `IDENTIFIED WITH ldap SERVER 'server_name'` +- `IDENTIFIED WITH kerberos` ã¾ãŸã¯ `IDENTIFIED WITH kerberos REALM 'realm'` +- `IDENTIFIED WITH ssl_certificate CN 'mysite.com:user'` +- `IDENTIFIED WITH ssh_key BY KEY 'public_key' TYPE 'ssh-rsa', KEY 'another_public_key' TYPE 'ssh-ed25519'` +- `IDENTIFIED WITH http SERVER 'http_server'` ã¾ãŸã¯ `IDENTIFIED WITH http SERVER 'http_server' SCHEME 'basic'` +- `IDENTIFIED BY 'qwerty'` + +パスワードã®è¤‡é›‘ã•ã®è¦ä»¶ã¯[config.xml](/docs/ja/operations/configuration-files)ã§ç·¨é›†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã¯ã€ãƒ‘スワードã«å°‘ãªãã¨ã‚‚12文字をè¦æ±‚ã—ã€1ã¤ã®æ•°å­—ã‚’å«ã‚€å¿…è¦ãŒã‚る例ã§ã™ã€‚å„パスワードã®è¤‡é›‘ã•ãƒ«ãƒ¼ãƒ«ã¯ã€ãƒ‘スワードã¨ä¸€è‡´ã™ã‚‹æ­£è¦è¡¨ç¾ã¨ãƒ«ãƒ¼ãƒ«ã®èª¬æ˜ŽãŒå¿…è¦ã§ã™ã€‚ + +```xml + + + + .{12} + å°‘ãªãã¨ã‚‚12文字ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ + + + \p{N} + å°‘ãªãã¨ã‚‚1ã¤ã®æ•°å­—ã‚’å«ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ + + + +``` + +:::note +ClickHouse Cloudã§ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ãƒ‘スワードã¯æ¬¡ã®è¤‡é›‘ã•è¦ä»¶ã‚’満ãŸã™å¿…è¦ãŒã‚ã‚Šã¾ã™: +- å°‘ãªãã¨ã‚‚12文字ã§ã‚ã‚‹ +- å°‘ãªãã¨ã‚‚1ã¤ã®æ•°å­—ã‚’å«ã‚€ +- å°‘ãªãã¨ã‚‚1ã¤ã®å¤§æ–‡å­—ã‚’å«ã‚€ +- å°‘ãªãã¨ã‚‚1ã¤ã®å°æ–‡å­—ã‚’å«ã‚€ +- å°‘ãªãã¨ã‚‚1ã¤ã®ç‰¹æ®Šæ–‡å­—ã‚’å«ã‚€ +::: + +## 例 + +1. 次ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¯`name1`ã§ã€ãƒ‘スワードã¯ä¸è¦ã§ã™ - ã“ã‚Œã¯æ˜Žã‚‰ã‹ã«ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’æä¾›ã—ã¾ã›ã‚“: + + ```sql + CREATE USER name1 NOT IDENTIFIED + ``` + +2. 平文パスワードを指定ã™ã‚‹ã«ã¯: + + ```sql + CREATE USER name2 IDENTIFIED WITH plaintext_password BY 'my_password' + ``` + + :::tip + パスワードã¯SQLテキストファイルã«`/var/lib/clickhouse/access`ã«ä¿å­˜ã•ã‚Œã‚‹ã®ã§ã€`plaintext_password`を使用ã™ã‚‹ã®ã¯è‰¯ã„考ãˆã§ã¯ã‚ã‚Šã¾ã›ã‚“。代ã‚ã‚Šã«æ¬¡ã®ä¾‹ã§ç¤ºã™ã‚ˆã†ã«`sha256_password`を試ã—ã¦ãã ã•ã„... + ::: + +3. 最も一般的ãªã‚ªãƒ—ションã¯ã€SHA-256を使用ã—ã¦ãƒãƒƒã‚·ãƒ¥ã•ã‚ŒãŸãƒ‘スワードを使用ã™ã‚‹ã“ã¨ã§ã™ã€‚`IDENTIFIED WITH sha256_password`を指定ã™ã‚‹ã¨ã€ClickHouseã¯ãƒ‘スワードをãƒãƒƒã‚·ãƒ¥ã—ã¦ãã‚Œã¾ã™ã€‚ãŸã¨ãˆã°: + + ```sql + CREATE USER name3 IDENTIFIED WITH sha256_password BY 'my_password' + ``` + + `name3`ユーザーã¯ä»Š `my_password`を使ã£ã¦ãƒ­ã‚°ã‚¤ãƒ³ã§ãã€ãƒ‘スワードã¯ä¸Šè¨˜ã®ãƒãƒƒã‚·ãƒ¥ã•ã‚ŒãŸå€¤ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚次ã®SQLファイルãŒ`/var/lib/clickhouse/access`ã«ä½œæˆã•ã‚Œã€ã‚µãƒ¼ãƒãƒ¼èµ·å‹•æ™‚ã«å®Ÿè¡Œã•ã‚Œã¾ã™: + + ```bash + /var/lib/clickhouse/access $ cat 3843f510-6ebd-a52d-72ac-e021686d8a93.sql + ATTACH USER name3 IDENTIFIED WITH sha256_hash BY '0C268556C1680BEF0640AAC1E7187566704208398DA31F03D18C74F5C5BE5053' SALT '4FB16307F5E10048196966DD7E6876AE53DE6A1D1F625488482C75F14A5097C7'; + ``` + + :::tip + ユーザーåã«å¯¾ã—ã¦æ—¢ã«ãƒãƒƒã‚·ãƒ¥å€¤ã¨å¯¾å¿œã™ã‚‹ã‚½ãƒ«ãƒˆå€¤ã‚’作æˆã—ã¦ã„ã‚‹å ´åˆã€`IDENTIFIED WITH sha256_hash BY 'hash'`ã‚„`IDENTIFIED WITH sha256_hash BY 'hash' SALT 'salt'`を使用ã§ãã¾ã™ã€‚`sha256_hash`ã®è­˜åˆ¥ã«`SALT`を使用ã™ã‚‹å ´åˆ - ãƒãƒƒã‚·ãƒ¥ã¯'password'ã¨'salt'ã®çµåˆã‹ã‚‰è¨ˆç®—ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + ::: + +4. `double_sha1_password`ã¯é€šå¸¸å¿…è¦ã‚ã‚Šã¾ã›ã‚“ãŒã€MySQLインターフェースã®ã‚ˆã†ã«ãれを必è¦ã¨ã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã§ä½œæ¥­ã™ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™: + + ```sql + CREATE USER name4 IDENTIFIED WITH double_sha1_password BY 'my_password' + ``` + + ClickHouseã¯æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’生æˆã—実行ã—ã¾ã™: + + ```response + CREATE USER name4 IDENTIFIED WITH double_sha1_hash BY 'CCD3A959D6A004B9C3807B728BC2E55B67E10518' + ``` + +5. `bcrypt_password`ã¯ãƒ‘スワードをä¿å­˜ã™ã‚‹æœ€ã‚‚安全ãªã‚ªãƒ—ションã§ã™ã€‚ã“ã‚Œã¯ã€[bcrypt](https://en.wikipedia.org/wiki/Bcrypt)アルゴリズムを使用ã—ã¦ãŠã‚Šã€ãƒ‘スワードãƒãƒƒã‚·ãƒ¥ãŒä¾µå®³ã•ã‚ŒãŸå ´åˆã§ã‚‚ブルートフォース攻撃ã«å¯¾ã—ã¦è€æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + + ```sql + CREATE USER name5 IDENTIFIED WITH bcrypt_password BY 'my_password' + ``` + + ã“ã®æ–¹æ³•ã§ã¯ãƒ‘スワードã®é•·ã•ã¯72文字ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚bcryptã®ãƒ¯ãƒ¼ã‚¯ãƒ•ã‚¡ã‚¯ã‚¿ãƒ¼ãƒ‘ラメーターã¯ã€ãƒãƒƒã‚·ãƒ¥ã®è¨ˆç®—ã¨ãƒ‘スワードã®æ¤œè¨¼ã«å¿…è¦ãªè¨ˆç®—ã¨æ™‚é–“ã®é‡ã‚’定義ã—ã¦ãŠã‚Šã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šã§å¤‰æ›´ã§ãã¾ã™: + + ```xml + 12 + ``` + + ワークファクターã¯4ã‹ã‚‰31ã®é–“ã§ãªã‘ã‚Œã°ãªã‚‰ãšã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯12ã§ã™ã€‚ + +6. パスワードã®ç¨®é¡žã‚’çœç•¥ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + + ```sql + CREATE USER name6 IDENTIFIED BY 'my_password' + ``` + + ã“ã®å ´åˆã€ClickHouseã¯ã‚µãƒ¼ãƒãƒ¼è¨­å®šã§æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‘スワードタイプを使用ã—ã¾ã™: + + ```xml + sha256_password + ``` + + 利用å¯èƒ½ãªãƒ‘スワードタイプã¯ã€`plaintext_password`ã€`sha256_password`ã€`double_sha1_password`ã§ã™ã€‚ + +7. 複数ã®èªè¨¼æ–¹æ³•ã‚’指定ã§ãã¾ã™: + + ```sql + CREATE USER user1 IDENTIFIED WITH plaintext_password by '1', bcrypt_password by '2', plaintext_password by '3'' + ``` + +注æ„事項: +1. å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ClickHouseã§ã¯ã€è¤‡æ•°ã®èªè¨¼æ–¹æ³•ã®æ§‹æ–‡ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ClickHouseサーãƒãƒ¼ã«ãã®ã‚ˆã†ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå­˜åœ¨ã—ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã•ã‚ŒãŸå ´åˆã€ãã®ã‚ˆã†ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä½¿ç”¨ä¸èƒ½ã«ãªã‚Šã€ä¸€éƒ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼é–¢é€£æ“作ãŒå£Šã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ダウングレードã™ã‚‹ã«ã¯ã€äº‹å‰ã«ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’1ã¤ã®èªè¨¼æ–¹æ³•ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚代替案ã¨ã—ã¦ã€ã‚µãƒ¼ãƒãƒ¼ãŒé©åˆ‡ãªæ‰‹é †ãªã—ã§ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã•ã‚ŒãŸå ´åˆã€å•é¡Œã®ã‚るユーザーを削除ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +2. セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€`no_password`ã¯ä»–ã®èªè¨¼æ–¹æ³•ã¨å…±å­˜ã§ãã¾ã›ã‚“。ã—ãŸãŒã£ã¦ã€ã‚¯ã‚¨ãƒªã§èªè¨¼æ–¹æ³•ãŒå”¯ä¸€ã®å ´åˆã«ã®ã¿`no_password`を指定ã§ãã¾ã™ã€‚ + +## ユーザーホスト + +ユーザーホストã¯ã€ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã‚’確立ã§ãるホストã§ã™ã€‚ホストã¯`HOST`クエリセクションã§æ¬¡ã®æ–¹æ³•ã§æŒ‡å®šã§ãã¾ã™: + +- `HOST IP 'ip_address_or_subnetwork'` — 指定ã•ã‚ŒãŸIPアドレスã¾ãŸã¯[サブãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯](https://en.wikipedia.org/wiki/Subnetwork)ã‹ã‚‰ã®ã¿ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ClickHouseサーãƒãƒ¼ã«æŽ¥ç¶šã§ãã¾ã™ã€‚例: `HOST IP '192.168.0.0/16'`, `HOST IP '2001:DB8::/32'`。本番環境ã§ã®ä½¿ç”¨ã«ã¯ã€`HOST IP`è¦ç´ ï¼ˆIPアドレスã¨ãã®ãƒžã‚¹ã‚¯ï¼‰ã®ã¿ã‚’指定ã—ã¦ãã ã•ã„。`host`ã‚„`host_regexp`を使用ã™ã‚‹ã¨ä½™è¨ˆãªé…延ãŒç”Ÿã˜ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ +- `HOST ANY` — ユーザーã¯ã©ã“ã‹ã‚‰ã§ã‚‚接続ã§ãã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚ªãƒ—ションã§ã™ã€‚ +- `HOST LOCAL` — ユーザーã¯ãƒ­ãƒ¼ã‚«ãƒ«ã®ã¿æŽ¥ç¶šã§ãã¾ã™ã€‚ +- `HOST NAME 'fqdn'` — ユーザーホストã¯FQDNã¨ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€`HOST NAME 'mysite.com'`。 +- `HOST REGEXP 'regexp'` — ユーザーホストを指定ã™ã‚‹éš›ã«[pcre](http://www.pcre.org/)æ­£è¦è¡¨ç¾ã‚’使用ã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€`HOST REGEXP '.*\.mysite\.com'`。 +- `HOST LIKE 'template'` — ユーザーホストをフィルターã™ã‚‹ãŸã‚ã«[LIKE](../../../sql-reference/functions/string-search-functions.md#function-like)演算å­ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€`HOST LIKE '%'`ã¯`HOST ANY`ã¨åŒã˜æ„味ã«ãªã‚Šã¾ã™ã€‚`HOST LIKE '%.mysite.com'`ã¯`mysite.com`ドメイン内ã®ã™ã¹ã¦ã®ãƒ›ã‚¹ãƒˆã‚’フィルタリングã—ã¾ã™ã€‚ + +ホストを指定ã™ã‚‹åˆ¥ã®æ–¹æ³•ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã®å¾Œã«`@`構文を使用ã™ã‚‹ã“ã¨ã§ã™ã€‚例: + +- `CREATE USER mira@'127.0.0.1'` — `HOST IP`構文ã¨åŒç­‰ã§ã™ã€‚ +- `CREATE USER mira@'localhost'` — `HOST LOCAL`構文ã¨åŒç­‰ã§ã™ã€‚ +- `CREATE USER mira@'192.168.%.%'` — `HOST LIKE`構文ã¨åŒç­‰ã§ã™ã€‚ + +:::tip +ClickHouseã¯`user_name@'address'`を一ã¤ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ãã®ãŸã‚ã€æŠ€è¡“çš„ã«ã¯ã€åŒã˜`user_name`ã¨`@`ã®å¾Œã®ç•°ãªã‚‹æ§‹æˆã‚’æŒã¤è¤‡æ•°ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã—ã‹ã—ã€ãれを行ã†ã“ã¨ã¯ãŠå‹§ã‚ã—ã¾ã›ã‚“。 +::: + +## VALID UNTILå¥ + +èªè¨¼æ–¹æ³•ã®æœ‰åŠ¹æœŸé™ã¨ã€ã‚ªãƒ—ションã§ãã®æ™‚刻を指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚文字列をパラメータã¨ã—ã¦å—ã‘å–ã‚Šã¾ã™ã€‚日付ã¨æ™‚刻ã«ã¯`YYYY-MM-DD [hh:mm:ss] [timezone]`å½¢å¼ã‚’使用ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚既定ã§ã¯ã€ã“ã®ãƒ‘ラメータã¯`'infinity'`ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ +`VALID UNTIL`å¥ã¯ã€ã‚¯ã‚¨ãƒªã§èªè¨¼æ–¹æ³•ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã«é™ã‚ŠæŒ‡å®šå¯èƒ½ã§ã™ã€‚èªè¨¼æ–¹æ³•ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`VALID UNTIL`å¥ã¯æ—¢å­˜ã®ã™ã¹ã¦ã®èªè¨¼æ–¹æ³•ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +例: + +- `CREATE USER name1 VALID UNTIL '2025-01-01'` +- `CREATE USER name1 VALID UNTIL '2025-01-01 12:00:00 UTC'` +- `CREATE USER name1 VALID UNTIL 'infinity'` +- ```CREATE USER name1 VALID UNTIL '2025-01-01 12:00:00 `Asia/Tokyo`'``` +- `CREATE USER name1 IDENTIFIED WITH plaintext_password BY 'no_expiration', bcrypt_password BY 'expiration_set' VALID UNTIL '2025-01-01''` + +## GRANTEESå¥ + +ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæŒã¤[権é™](../../../sql-reference/statements/grant.md#privileges)を付与ã§ãるユーザーã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã‚’指定ã—ã¾ã™ã€‚ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚‚ã¾ãŸã€[GRANT OPTION](../../../sql-reference/statements/grant.md#granting-privilege-syntax)ã§ä»˜ä¸Žã•ã‚ŒãŸã™ã¹ã¦ã®å¿…è¦ãªã‚¢ã‚¯ã‚»ã‚¹ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã«ã®ã¿ã§ã™ã€‚`GRANTEES`å¥ã®ã‚ªãƒ—ション: + +- `user` — ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ¨©é™ã‚’付与ã§ãるユーザーを指定ã—ã¾ã™ã€‚ +- `role` — ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ¨©é™ã‚’付与ã§ãるロールを指定ã—ã¾ã™ã€‚ +- `ANY` — ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯èª°ã«ã§ã‚‚権é™ã‚’付与ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆè¨­å®šã§ã™ã€‚ +- `NONE` — ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯èª°ã«ã‚‚権é™ã‚’付与ã§ãã¾ã›ã‚“。 + +`EXCEPT`å¼ã‚’使用ã—ã¦ã€ä»»æ„ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã‚’除外ã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€`CREATE USER user1 GRANTEES ANY EXCEPT user2`ã¨è¨€ãˆã°ã€`user1`ãŒ`GRANT OPTION`付ãã§ã„ãã¤ã‹ã®æ¨©é™ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€ãれらã®æ¨©é™ã‚’`user2`を除ã誰ã«ã§ã‚‚付与ã§ãã‚‹ã¨ã„ã†æ„味ã§ã™ã€‚ + +## 例 + +`qwerty`ã¨ã„ã†ãƒ‘スワードã§ä¿è­·ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆ`mira`を作æˆã—ã¾ã™: + +``` sql +CREATE USER mira HOST IP '127.0.0.1' IDENTIFIED WITH sha256_password BY 'qwerty'; +``` + +`mira`ã¯ClickHouseサーãƒãƒ¼ãŒç¨¼åƒã—ã¦ã„るホストã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションを起動ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ユーザーアカウント`john`を作æˆã—ã€ãƒ­ãƒ¼ãƒ«ã‚’割り当ã¦ã€ãれらをデフォルトã«ã—ã¾ã™: + +``` sql +CREATE USER john DEFAULT ROLE role1, role2; +``` + +å°†æ¥ã®ã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ã‚’デフォルトã«ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆ`john`を作æˆã—ã¾ã™: + +``` sql +CREATE USER john DEFAULT ROLE ALL; +``` + +å°†æ¥çš„ã«`john`ã«ãƒ­ãƒ¼ãƒ«ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ã¨ã€ãã‚ŒãŒè‡ªå‹•çš„ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã«ãªã‚Šã¾ã™ã€‚ + +ユーザーアカウント`john`を作æˆã—ã€`role1`ã¨`role2`を除ãå°†æ¥ã®ã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ã‚’デフォルトã«ã—: + +``` sql +CREATE USER john DEFAULT ROLE ALL EXCEPT role1, role2; +``` + +ユーザーアカウント`john`を作æˆã—ã€è‡ªåˆ†ã®æ¨©é™ã‚’`jack`アカウントをæŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ä»˜ä¸Žã§ãるよã†ã«ã—ã¾ã™: + +``` sql +CREATE USER john GRANTEES jack; +``` diff --git a/docs/ja/sql-reference/statements/create/view.md b/docs/ja/sql-reference/statements/create/view.md new file mode 100644 index 00000000000..8b4365ceeb0 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/view.md @@ -0,0 +1,421 @@ +--- +slug: /ja/sql-reference/statements/create/view +sidebar_position: 37 +sidebar_label: VIEW +--- + +# CREATE VIEW + +æ–°ã—ã„ビューを作æˆã—ã¾ã™ã€‚ビューã¯[通常ã®ãƒ“ュー](#normal-view)ã€[Materialized View](#materialized-view)ã€[リフレッシュå¯èƒ½ãªMaterialized View](#refreshable-materialized-view)ã€ãŠã‚ˆã³[ウィンドウビュー](#window-view-experimental)(リフレッシュå¯èƒ½ãªMaterialized Viewã¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ“ューã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«æ©Ÿèƒ½ã§ã™ï¼‰ã§ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 通常ã®ãƒ“ュー + +構文: + +``` sql +CREATE [OR REPLACE] VIEW [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster_name] +[DEFINER = { user | CURRENT_USER }] [SQL SECURITY { DEFINER | INVOKER | NONE }] +AS SELECT ... +[COMMENT 'comment'] +``` + +通常ã®ãƒ“ューã¯ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã—ã¾ã›ã‚“。アクセスã™ã‚‹ãŸã³ã«ä»–ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®èª­ã¿å–りを実行ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€é€šå¸¸ã®ãƒ“ューã¯ä¿å­˜ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã«ã™ãŽã¾ã›ã‚“。ビューã‹ã‚‰èª­ã¿å–ã‚‹ã¨ã€ã“ã®ä¿å­˜ã•ã‚ŒãŸã‚¯ã‚¨ãƒªãŒ[FROM](../../../sql-reference/statements/select/from.md)å¥å†…ã®ã‚µãƒ–クエリã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +例ã¨ã—ã¦ã€æ¬¡ã®ãƒ“ューを作æˆã—ãŸã¨ã—ã¾ã™ã€‚ + +``` sql +CREATE VIEW view AS SELECT ... +``` + +ãã—ã¦ã€ã‚¯ã‚¨ãƒªã‚’記述ã—ã¾ã—ãŸã€‚ + +``` sql +SELECT a, b, c FROM view +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€æ¬¡ã®ã‚µãƒ–クエリを使用ã™ã‚‹ã®ã¨å®Œå…¨ã«åŒç­‰ã§ã™ã€‚ + +``` sql +SELECT a, b, c FROM (SELECT ...) +``` + +## パラメータ化ビュー + +パラメータ化ビューã¯é€šå¸¸ã®ãƒ“ューã«ä¼¼ã¦ã„ã¾ã™ãŒã€ã™ãã«ã¯è§£æ±ºã•ã‚Œãªã„パラメータをæŒã£ã¦ä½œæˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã®ãƒ“ューã¯ã€ãƒ“ューã®åå‰ã‚’関数åã¨ã—ã¦ã€ãƒ‘ラメータã®å€¤ã‚’引数ã¨ã—ã¦æŒ‡å®šã™ã‚‹ãƒ†ãƒ¼ãƒ–ル関数ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +``` sql +CREATE VIEW view AS SELECT * FROM TABLE WHERE Column1={column1:datatype1} and Column2={column2:datatype2} ... +``` + +上記ã¯ã€ä¸‹è¨˜ã®ã‚ˆã†ã«ãƒ‘ラメータを代入ã™ã‚‹ã“ã¨ã§ãƒ†ãƒ¼ãƒ–ル関数ã¨ã—ã¦ä½¿ç”¨ã§ãるテーブルã®ãƒ“ューを作æˆã—ã¾ã™ã€‚ + +``` sql +SELECT * FROM view(column1=value1, column2=value2 ...) +``` + +## マテリアライズドビュー + +``` sql +CREATE MATERIALIZED VIEW [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster_name] [TO[db.]name] [ENGINE = engine] [POPULATE] +[DEFINER = { user | CURRENT_USER }] [SQL SECURITY { DEFINER | INVOKER | NONE }] +AS SELECT ... +[COMMENT 'comment'] +``` + +:::tip +[Materialized View](docs/en/guides/developer/cascading-materialized-views.md)を使用ã™ã‚‹ã‚¹ãƒ†ãƒƒãƒ—ãƒã‚¤ã‚¹ãƒ†ãƒƒãƒ—ガイドã¯ã“ã¡ã‚‰ã§ã™ã€‚ +::: + +Materialized Viewã¯ã€å¯¾å¿œã™ã‚‹[SELECT](../../../sql-reference/statements/select/index.md)クエリã«ã‚ˆã£ã¦å¤‰æ›ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã—ã¾ã™ã€‚ + +`TO [db].[table]`ãªã—ã§Materialized Viewを作æˆã™ã‚‹å ´åˆã¯ã€ãƒ‡ãƒ¼ã‚¿æ ¼ç´ã®ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルエンジン`ENGINE`を指定ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +`TO [db].[table]`ã§Materialized Viewを作æˆã™ã‚‹å ´åˆã€`POPULATE`ã‚’åŒæ™‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +Materialized Viewã¯æ¬¡ã®ã‚ˆã†ã«å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™: `SELECT`ã§æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ã€æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ä¸€éƒ¨ãŒã“ã®`SELECT`クエリã«ã‚ˆã£ã¦å¤‰æ›ã•ã‚Œã€ãã®çµæžœãŒãƒ“ューã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +:::note +ClickHouseã®Materialized Viewã¯æŒ¿å…¥å…ˆãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥æ™‚ã«**カラムå**を使用ã—ã¾ã™ã€‚`SELECT`クエリçµæžœã«å­˜åœ¨ã—ãªã„カラムåãŒã‚ã‚‹å ´åˆã€ãŸã¨ãˆã‚«ãƒ©ãƒ ãŒ[Nullable](../../data-types/nullable.md)ã§ãªãã¦ã‚‚ã€ClickHouseã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’使用ã—ã¾ã™ã€‚Materialized Viewを使用ã™ã‚‹éš›ã«ã¯ã€å…¨ã¦ã®ã‚«ãƒ©ãƒ ã«åˆ¥åを付ã‘ã‚‹ã“ã¨ãŒå®‰å…¨ãªãƒ—ラクティスã¨ã•ã‚Œã¾ã™ã€‚ + +ClickHouseã®Materialized Viewã¯ã€ä¸»ã«æŒ¿å…¥ãƒˆãƒªã‚¬ãƒ¼ã®ã‚ˆã†ã«å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã™ã€‚ビュークエリã«é›†ç´„ãŒã‚ã‚‹å ´åˆã€ãã‚Œã¯æ–°ã—ã挿入ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒãƒƒãƒã«ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚ソーステーブルã®æ—¢å­˜ãƒ‡ãƒ¼ã‚¿ã¸ã®å¤‰æ›´ï¼ˆä¾‹ãˆã°ã€æ›´æ–°ã€å‰Šé™¤ã€ãƒ‘ーティション削除ãªã©ï¼‰ã¯ã€Materialized Viewを変更ã—ã¾ã›ã‚“。 + +エラー発生時ã«ClickHouseã®Materialized Viewã¯æ±ºå®šçš„ãªæŒ¯ã‚‹èˆžã„ã‚’æŒã¡ã¾ã›ã‚“。ã¤ã¾ã‚Šã€ã™ã§ã«æ›¸ãè¾¼ã¾ã‚ŒãŸãƒ–ロックã¯ä¿å­˜ã•ã‚Œã¾ã™ãŒã€ã‚¨ãƒ©ãƒ¼å¾Œã®å…¨ã¦ã®ãƒ–ロックã¯ä¿å­˜ã•ã‚Œã¾ã›ã‚“。 + +デフォルトã§ã¯ä¸€ã¤ã®ãƒ“ューã¸ã®ãƒ—ッシュãŒå¤±æ•—ã—ãŸå ´åˆã€INSERTクエリも失敗ã—ã€ã„ãã¤ã‹ã®ãƒ–ロックã¯ãƒ‡ãƒ¼ã‚¿æ ¼ç´å…ˆãƒ†ãƒ¼ãƒ–ルã«æ›¸ãè¾¼ã¾ã‚Œãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯`materialized_views_ignore_errors`設定を使用ã—ã¦å¤‰æ›´ã§ãã¾ã™ï¼ˆã“ã‚Œã¯`INSERT`クエリã®ãŸã‚ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚`materialized_views_ignore_errors=true`ã«è¨­å®šã™ã‚‹ã¨ã€ãƒ“ューã¸ã®ãƒ—ッシュ時ã®å…¨ã¦ã®ã‚¨ãƒ©ãƒ¼ã¯ç„¡è¦–ã•ã‚Œã€å…¨ã¦ã®ãƒ–ロックã¯ãƒ‡ãƒ¼ã‚¿æ ¼ç´å…ˆãƒ†ãƒ¼ãƒ–ルã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +ã¾ãŸã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§`system.*_log`テーブルã«ã¯`materialized_views_ignore_errors`ãŒ`true`ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +`POPULATE`を指定ã™ã‚‹ã¨ã€æ—¢å­˜ã®ãƒ†ãƒ¼ãƒ–ルデータãŒãƒ“ュー作æˆæ™‚ã«ãƒ“ューã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ãã‚Œã¯ã¡ã‚‡ã†ã©`CREATE TABLE ... AS SELECT ...`を実行ã™ã‚‹ã‚ˆã†ãªã‚‚ã®ã§ã™ã€‚ãれ以外ã®å ´åˆã€ãƒ“ューãŒä½œæˆã•ã‚ŒãŸå¾Œã«ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’クエリã—ã¾ã™ã€‚ビュー作æˆä¸­ã«ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒãƒ“ューã«æŒ¿å…¥ã•ã‚Œãªã„ãŸã‚ã€`POPULATE`ã®ä½¿ç”¨ã‚’**ãŠã™ã™ã‚ã—ã¾ã›ã‚“**。 + +:::note +`POPULATE`ãŒ`CREATE TABLE ... AS SELECT ...`ã®ã‚ˆã†ã«æ©Ÿèƒ½ã™ã‚‹ã“ã¨ã‚’考ãˆã‚‹ã¨ã€ã„ãã¤ã‹ã®åˆ¶é™ãŒã‚ã‚Šã¾ã™: +- レプリケートã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã®ã‚µãƒãƒ¼ãƒˆã¯ã‚ã‚Šã¾ã›ã‚“ +- ClickHouseクラウドã§ã®ã‚µãƒãƒ¼ãƒˆã¯ã‚ã‚Šã¾ã›ã‚“ + +代ã‚ã‚Šã«å€‹åˆ¥ã®`INSERT ... SELECT`を使用ã§ãã¾ã™ã€‚ +::: + +`SELECT`クエリã«ã¯`DISTINCT`ã€`GROUP BY`ã€`ORDER BY`ã€`LIMIT`ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚但ã—ã€å¯¾å¿œã™ã‚‹å¤‰æ›ã¯æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®å„ブロックã”ã¨ã«ç‹¬ç«‹ã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。例ãˆã°ã€`GROUP BY`ãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯æŒ¿å…¥ä¸­ã«é›†ç´„ã•ã‚Œã¾ã™ãŒã€æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ãƒ‘ケット内ã§ã®ã¿é©ç”¨ã•ã‚Œã¾ã™ã€‚データã¯ãれ以上集約ã•ã‚Œã¾ã›ã‚“。ãŸã ã—ã€ç‹¬ç«‹ã—ã¦ãƒ‡ãƒ¼ã‚¿é›†ç´„ã‚’è¡Œã†`SummingMergeTree`ã®ã‚ˆã†ãªã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã™ã‚‹å ´åˆã¯ä¾‹å¤–ã§ã™ã€‚ + +[ALTER](/docs/ja/sql-reference/statements/alter/view.md)クエリをMaterialized Viewã«å¯¾ã—ã¦å®Ÿè¡Œã™ã‚‹ã“ã¨ã«ã¯é™ç•ŒãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€`SELECT`クエリを更新ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ã®ã§ã€ã“ã‚ŒãŒä¸ä¾¿ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚Materialized ViewãŒ`TO [db.]name`ã®æ§‹æ–‡ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã€ãƒ“ューを`DETACH`ã—ã¦ã‹ã‚‰ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦`ALTER`を実行ã—ã€ãã®å¾Œã«ä»¥å‰ã«`DETACH`ã—ãŸãƒ“ューを`ATTACH`ã§ãã¾ã™ã€‚ + +Materialized Viewã¯[optimize_on_insert](../../../operations/settings/settings.md#optimize-on-insert)設定ã«ã‚ˆã£ã¦å½±éŸ¿ã‚’å—ã‘ã¾ã™ã€‚データã¯ãƒ“ューã¸ã®æŒ¿å…¥å‰ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚ + +ビューã¯é€šå¸¸ã®ãƒ†ãƒ¼ãƒ–ルã¨åŒæ§˜ã«è¦‹ãˆã¾ã™ã€‚例ãˆã°ã€`SHOW TABLES`クエリã®çµæžœã«ãƒªã‚¹ãƒˆã•ã‚Œã¾ã™ã€‚ + +ビューを削除ã™ã‚‹ã«ã¯ã€[DROP VIEW](../../../sql-reference/statements/drop.md#drop-view)を使用ã—ã¾ã™ã€‚ãŸã ã—ã€`DROP TABLE`もビューã«å¯¾ã—ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +## SQLセキュリティ {#sql_security} + +`DEFINER`ã¨`SQL SECURITY`ã«ã‚ˆã‚Šã€ãƒ“ューã®åŸºç¤Žã¨ãªã‚‹ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã¨ãã«ä½¿ç”¨ã™ã‚‹ClickHouseユーザーを指定ã§ãã¾ã™ã€‚`SQL SECURITY`ã«ã¯ã€`DEFINER`ã€`INVOKER`ã€`NONE`ã®3ã¤ã®åˆæ³•ãªå€¤ãŒã‚ã‚Šã¾ã™ã€‚`DEFINER`å¥ã«ã¯ã€ä»»æ„ã®æ—¢å­˜ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¾ãŸã¯`CURRENT_USER`を指定ã§ãã¾ã™ã€‚ + +以下ã®è¡¨ã¯ã€ã©ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ“ューã‹ã‚‰é¸æŠžã™ã‚‹æ¨©é™ãŒå¿…è¦ã‹ã‚’説明ã—ã¾ã™ã€‚SQLセキュリティオプションã«é–¢ä¿‚ãªãã€ãƒ“ューã‹ã‚‰èª­ã¿å–ã‚‹ãŸã‚ã«ã¯`GRANT SELECT ON `ãŒå¿…è¦ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +| SQLセキュリティオプション | ビュー | マテリアライズドビュー | +|-------------------------|--------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| +| `DEFINER alice` | `alice`ã¯ãƒ“ューã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹`SELECT`権é™ãŒå¿…è¦ã§ã™ã€‚| `alice`ã¯ãƒ“ューã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹`SELECT`権é™ã¨ãƒ“ューã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹`INSERT`権é™ãŒå¿…è¦ã§ã™ã€‚ | +| `INVOKER` | ユーザーã¯ãƒ“ューã®ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹`SELECT`権é™ãŒå¿…è¦ã§ã™ã€‚| Materialized Viewã«ã¯`SQL SECURITY INVOKER`を指定ã§ãã¾ã›ã‚“。 | +| `NONE` | - | - | + +:::note +`SQL SECURITY NONE`ã¯å»ƒæ­¢äºˆå®šã®ã‚ªãƒ—ションã§ã™ã€‚ã“ã®ã‚ªãƒ—ションã§ãƒ“ューを作æˆã™ã‚‹æ¨©é™ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ä»»æ„ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ã“ã®ã‚ªãƒ—ションã§ãƒ“ューを作æˆã™ã‚‹ãŸã‚ã«ã¯ã€`GRANT ALLOW SQL SECURITY NONE TO `ãŒå¿…è¦ã§ã™ã€‚ +::: + +`DEFINER`/`SQL SECURITY`ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒä½¿ç”¨ã•ã‚Œã¾ã™: +- `SQL SECURITY`: 通常ã®ãƒ“ューã«ã¯`INVOKER`ã€Materialized Viewã«ã¯`DEFINER`([設定ã§è¨­å®šå¯èƒ½](../../../operations/settings/settings.md#default_normal_view_sql_security)) +- `DEFINER`: `CURRENT_USER`([設定ã§è¨­å®šå¯èƒ½](../../../operations/settings/settings.md#default_view_definer)) + +`DEFINER`/`SQL SECURITY`ãŒæŒ‡å®šã•ã‚Œãšã«ãƒ“ューãŒã‚¢ã‚¿ãƒƒãƒã•ã‚ŒãŸå ´åˆã€Materialized Viewã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¨ã—ã¦`SQL SECURITY NONE`ã€é€šå¸¸ã®ãƒ“ューã«ã¯`SQL SECURITY INVOKER`ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +既存ã®ãƒ“ューã®SQLセキュリティを変更ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã‚’使用ã—ã¾ã™ã€‚ +```sql +ALTER TABLE MODIFY SQL SECURITY { DEFINER | INVOKER | NONE } [DEFINER = { user | CURRENT_USER }] +``` + +### 例 +```sql +CREATE VIEW test_view +DEFINER = alice SQL SECURITY DEFINER +AS SELECT ... +``` + +```sql +CREATE VIEW test_view +SQL SECURITY INVOKER +AS SELECT ... +``` + +## ライブビュー [廃止予定] + +ã“ã®æ©Ÿèƒ½ã¯å»ƒæ­¢äºˆå®šã§ã‚ã‚Šã€å°†æ¥çš„ã«å‰Šé™¤ã•ã‚Œã‚‹äºˆå®šã§ã™ã€‚ + +利便性ã®ãŸã‚ã€å¤ã„ドキュメントã¯[ã“ã¡ã‚‰](https://pastila.nl/?00f32652/fdf07272a7b54bda7e13b919264e449f.md)ã«ã‚ã‚Šã¾ã™ã€‚ + +## リフレッシュå¯èƒ½ãªMaterialized View [エクスペリメンタル] {#refreshable-materialized-view} + +```sql +CREATE MATERIALIZED VIEW [IF NOT EXISTS] [db.]table_name +REFRESH EVERY|AFTER interval [OFFSET interval] +RANDOMIZE FOR interval +DEPENDS ON [db.]name [, [db.]name [, ...]] +SETTINGS name = value [, name = value [, ...]] +[APPEND] +[TO[db.]name] [(columns)] [ENGINE = engine] [EMPTY] +AS SELECT ... +[COMMENT 'comment'] +``` + +ã“ã“ã§`interval`ã¯å˜ç´”ãªé–“éš”ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã§ã™: + +```sql +number SECOND|MINUTE|HOUR|DAY|WEEK|MONTH|YEAR +``` + +定期的ã«å¯¾å¿œã™ã‚‹ã‚¯ã‚¨ãƒªã‚’実行ã—ã€ãã®çµæžœã‚’テーブルã«æ ¼ç´ã—ã¾ã™ã€‚ + * クエリã«`APPEND`ãŒæ›¸ã‹ã‚Œã¦ã„ã‚‹å ´åˆã€å„リフレッシュã§ã¯æ—¢å­˜ã®è¡Œã‚’削除ã›ãšã«è¡Œã‚’テーブルã«æŒ¿å…¥ã—ã¾ã™ã€‚通常ã®INSERT SELECTã¨åŒæ§˜ã€æŒ¿å…¥ã¯ã‚¢ãƒˆãƒŸãƒƒã‚¯ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + * ãれ以外ã®å ´åˆã€å„リフレッシュã¯ãƒ†ãƒ¼ãƒ–ルã®ä»¥å‰ã®å†…容をアトミックã«ç½®ãæ›ãˆã¾ã™ã€‚ + +通常ã®éžãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªMaterialized Viewã¨ã®é•ã„: + * 挿入トリガーãŒã‚ã‚Šã¾ã›ã‚“。ã™ãªã‚ã¡ã€SELECTã§æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«æ–°ã—ã„データãŒæŒ¿å…¥ã•ã‚Œã¦ã‚‚ã€ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªMaterialized Viewã«ã¯è‡ªå‹•çš„ã«ã¯ãƒ—ッシュã•ã‚Œã¾ã›ã‚“。定期的ãªãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ãŒã‚¯ã‚¨ãƒªå…¨ä½“を実行ã—ã¾ã™ã€‚ + * SELECTクエリã«åˆ¶é™ãŒã‚ã‚Šã¾ã›ã‚“。テーブル関数(例ãˆã°`url()`)ã€ãƒ“ューã€UNIONã€JOINãŒã™ã¹ã¦è¨±å¯ã•ã‚Œã¾ã™ã€‚ + +:::note +クエリã®`REFRESH ... SETTINGS`部分ã«ã‚る設定ã¯ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥è¨­å®šï¼ˆä¾‹: `refresh_retries`)ã§ã‚ã‚Šã€é€šå¸¸ã®è¨­å®šï¼ˆä¾‹: `max_threads`)ã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚通常ã®è¨­å®šã¯ã€ã‚¯ã‚¨ãƒªã®çµ‚了部分ã«ã‚ã‚‹`SETTINGS`を使用ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚ +::: + +### リフレッシュスケジュール + +リフレッシュスケジュールã®ä¾‹: +```sql +REFRESH EVERY 1 DAY -- 毎日ã€åˆå‰0時(UTC) +REFRESH EVERY 1 MONTH -- 毎月1æ—¥ã€åˆå‰0時㫠+REFRESH EVERY 1 MONTH OFFSET 5 DAY 2 HOUR -- 毎月6æ—¥ã€åˆå‰2時㫠+REFRESH EVERY 2 WEEK OFFSET 5 DAY 15 HOUR 10 MINUTE -- 2週間ã”ã¨ã«åœŸæ›œæ—¥ã€åˆå¾Œ3:10ã« +REFRESH EVERY 30 MINUTE -- 00:00ã€00:30ã€01:00ã€01:30ã€ãªã©ã§ +REFRESH AFTER 30 MINUTE -- å‰ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ãŒå®Œäº†ã—ã¦ã‹ã‚‰30分後ã€æ—¥ä»˜ã«åˆã‚ã›ã¦èª¿æ•´ã•ã‚Œã¾ã›ã‚“ +-- REFRESH AFTER 1 HOUR OFFSET 1 MINUTE -- AFTERã§ã¯OFFSETã¯è¨±å¯ã•ã‚Œã¦ã„ãªã„ãŸã‚ã€æ§‹æ–‡ã‚¨ãƒ©ãƒ¼ +REFRESH EVERY 1 WEEK 2 DAYS -- 9æ—¥ã”ã¨ã€ç‰¹å®šã®æ›œæ—¥ã‚„月ã«åˆ¶ç´„ãªã—; + -- 特ã«ã€1969-12-29以é™ã®æ—¥æ•°ãŒ9ã§å‰²ã‚Šåˆ‡ã‚Œã‚‹ã¨ã +REFRESH EVERY 5 MONTHS -- 毎5ヶ月ã€æ¯Žå¹´ç•°ãªã‚‹æœˆï¼ˆ12ã¯5ã§å‰²ã‚Šåˆ‡ã‚Œãªã„ãŸã‚); + -- 特ã«ã€1970-01以é™ã®æœˆæ•°ãŒ5ã§å‰²ã‚Šåˆ‡ã‚Œã‚‹ã¨ã +``` + +`RANDOMIZE FOR`ã¯å„リフレッシュã®æ™‚間をランダムã«èª¿æ•´ã—ã¾ã™ã€‚例: +```sql +REFRESH EVERY 1 DAY OFFSET 2 HOUR RANDOMIZE FOR 1 HOUR -- 毎日åˆå‰1:30ã‹ã‚‰2:30ã®é–“ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæ™‚é–“ +``` + +特定ã®ãƒ“ューã«ã¤ã„ã¦ã€åŒæ™‚ã«ä¸€ã¤ã®ã¿ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã‚’実行å¯èƒ½ã§ã™ã€‚例: `REFRESH EVERY 1 MINUTE`ã®ãƒ“ューãŒãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã«2分ã‹ã‹ã‚‹å ´åˆã€2分ã”ã¨ã«ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ãã®å¾Œã€10秒ã§ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ãŒå®Œäº†ã™ã‚‹å ´åˆã€1分ã”ã¨ã«æˆ»ã‚Šã¾ã™ã€‚(特ã«ã€ãƒãƒƒã‚¯ãƒ­ã‚°ã®ã™ã¹ã¦ã‚’ã‚«ãƒãƒ¼ã™ã‚‹ãŸã‚ã«10秒ã”ã¨ã«ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“ - ãã®ã‚ˆã†ãªãƒãƒƒã‚¯ãƒ­ã‚°ã¯ã‚ã‚Šã¾ã›ã‚“。) + +ã•ã‚‰ã«ã€`CREATE`クエリã§ä½œæˆã•ã‚Œã‚‹ã¨ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã¯ç›´ã¡ã«é–‹å§‹ã•ã‚Œã¾ã™ãŒã€`EMPTY`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯æœ€åˆã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã¯ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã«å¾“ã£ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ + +### レプリケートデータベースã§ã®å‹•ä½œ + +リフレッシュå¯èƒ½ãªMaterialized ViewãŒ[レプリケートデータベース](../../../engines/database-engines/replicated.md)ã«ã‚ã‚‹å ´åˆã€ãƒ¬ãƒ—リカåŒå£«ã§èª¿æ•´ã—ã¦ã€ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚ŒãŸæ™‚é–“ã«1ã¤ã®ãƒ¬ãƒ—リカã®ã¿ãŒãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã‚’実行ã™ã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚[ReplicatedMergeTree](../../../engines/table-engines/mergetree-family/replication.md)テーブルエンジンãŒå¿…è¦ã§ã™ã®ã§ã€å…¨ã¦ã®ãƒ¬ãƒ—リカãŒãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’å‚ç…§ã§ãã¾ã™ã€‚ + +`APPEND`モードã§ã¯ã€`SETTINGSå…¨ã¦ã®ãƒ¬ãƒ—リカ=1`を使用ã—ã¦èª¿æ•´ã‚’無効ã«ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¬ãƒ—リカã¯äº’ã„ã«ç‹¬ç«‹ã—ã¦ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã‚’実行ã—ã¾ã™ã€‚ã“ã®å ´åˆã€ReplicatedMergeTreeã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 + +éž`APPEND`モードã§ã¯ã€èª¿æ•´ã•ã‚ŒãŸãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚éžèª¿æ•´ã•ã‚ŒãŸãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã«ã¯ã€`Atomic`データベースã¨`CREATE ... ON CLUSTER`クエリを使用ã—ã¦ã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªMaterialized Viewを作æˆã—ã¾ã™ã€‚ + +調整ã¯Keeperã«ã‚ˆã£ã¦è¡Œã‚ã‚Œã¾ã™ã€‚znodeパスã¯[default_replica_path](../../../operations/server-configuration-parameters/settings.md#default_replica_path)サーãƒãƒ¼è¨­å®šã«ã‚ˆã£ã¦æ±ºå®šã•ã‚Œã¾ã™ã€‚ + +### ä¾å­˜é–¢ä¿‚ {#refresh-dependencies} + +`DEPENDS ON`ã¯ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã‚’åŒæœŸã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€æ¬¡ã®ã‚ˆã†ãª2ã¤ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªMaterialized Viewã®ãƒã‚§ãƒ¼ãƒ³ãŒã‚ã‚‹ã¨ã—ã¾ã™: +```sql +CREATE MATERIALIZED VIEW source REFRESH EVERY 1 DAY AS SELECT * FROM url(...) +CREATE MATERIALIZED VIEW destination REFRESH EVERY 1 DAY AS SELECT ... FROM source +``` +`DEPENDS ON`ãªã—ã§ã¯ã€ä¸¡æ–¹ã®ãƒ“ューãŒçœŸå¤œä¸­ã«ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã‚’開始ã—ã€`destination`ã¯é€šå¸¸ã€`source`ã®æ˜¨æ—¥ã®ãƒ‡ãƒ¼ã‚¿ã‚’å‚ç…§ã—ã¾ã™ã€‚ä¾å­˜é–¢ä¿‚を追加ã™ã‚‹ã¨: +``` +CREATE MATERIALIZED VIEW destination REFRESH EVERY 1 DAY DEPENDS ON source AS SELECT ... FROM source +``` +`destination`ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã¯ã€`source`ã®åŒæ—¥ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ãŒå®Œäº†ã—ãŸå¾Œã«ã®ã¿é–‹å§‹ã•ã‚Œã‚‹ã®ã§ã€`destination`ã¯æ–°é®®ãªãƒ‡ãƒ¼ã‚¿ã«åŸºã¥ãã“ã¨ã«ãªã‚Šã¾ã™ã€‚ + +ã¾ãŸã¯ã€åŒã˜çµæžœã‚’以下ã§é”æˆã§ãã¾ã™: +``` +CREATE MATERIALIZED VIEW destination REFRESH AFTER 1 HOUR DEPENDS ON source AS SELECT ... FROM source +``` +ã“ã“ã§ã®`1 HOUR`ã¯`source`ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥æœŸé–“より短ã‘ã‚Œã°ä»»æ„ã®é•·ã•ã«è¨­å®šã§ãã¾ã™ã€‚ä¾å­˜ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã¯ã€ä¾å­˜ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥çŽ‡ã‚ˆã‚Šé »ç¹ã«ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯ã€ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªãƒ“ューã®ãƒã‚§ãƒ¼ãƒ³ã‚’実際ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥æœŸé–“を指定ã™ã‚‹ã“ã¨ãªã設定ã™ã‚‹ãŸã‚ã®æœ‰åŠ¹ãªæ–¹æ³•ã§ã™ã€‚ + +ã„ãã¤ã‹ã®ã•ã‚‰ãªã‚‹ä¾‹: + * `REFRESH EVERY 1 DAY OFFSET 10 MINUTE`(`destination`)ãŒ`REFRESH EVERY 1 DAY`(`source`)ã«ä¾å­˜
    + `source`ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ãŒ10分以上ã‹ã‹ã‚‹å ´åˆã€`destination`ã¯å¾…æ©Ÿã—ã¾ã™ã€‚ + * `REFRESH EVERY 1 DAY OFFSET 1 HOUR`ãŒ`REFRESH EVERY 1 DAY OFFSET 23 HOUR`ã«ä¾å­˜
    + 上記ã¨åŒæ§˜ã«ã€å¯¾å¿œã™ã‚‹ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ãŒç•°ãªã‚‹ã‚«ãƒ¬ãƒ³ãƒ€ãƒ¼æ—¥ã«èµ·ã“ã‚‹ã«ã‚‚ã‹ã‹ã‚らãšã€‚ + `destination`ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã¯æ—¥X+1ã®æ—¥ã«å§‹ã¾ã‚Šã€`source`ã®æ—¥Xã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã‚’(ãã‚ŒãŒ2時間以上ã‹ã‹ã‚‹å ´åˆï¼‰å¾…æ©Ÿã—ã¾ã™ã€‚ + * `REFRESH EVERY 2 HOUR`ãŒ`REFRESH EVERY 1 HOUR`ã«ä¾å­˜
    + 2時間ã”ã¨ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã¯ã€ä¸€æ™‚é–“ã”ã¨ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã®å¾Œã«è¡Œã‚ã‚Œã¾ã™ã€‚例ãˆã°ã€çœŸå¤œä¸­ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã®å¾Œã€æ¬¡ã«åˆå‰2時ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã®å¾Œç­‰ã€‚ + * `REFRESH EVERY 1 MINUTE`ãŒ`REFRESH EVERY 2 HOUR`ã«ä¾å­˜
    + `REFRESH AFTER 1 MINUTE`ãŒ`REFRESH EVERY 2 HOUR`ã«ä¾å­˜
    + `REFRESH AFTER 1 MINUTE`ãŒ`REFRESH AFTER 2 HOUR`ã«ä¾å­˜
    + `destination`ã¯`source`ã®å„リフレッシュ後ã«ä¸€åº¦ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚ã™ãªã‚ã¡ã€2時間ã”ã¨ã€‚`1 MINUTE`ã¯å®Ÿè³ªçš„ã«ç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + * `REFRESH AFTER 1 HOUR`ãŒ`REFRESH AFTER 1 HOUR`ã«ä¾å­˜
    + ç¾åœ¨ã€ã“ã‚Œã¯æŽ¨å¥¨ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +:::note +`DEPENDS ON`ã¯ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªMaterialized Viewé–“ã§ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚通常ã®ãƒ†ãƒ¼ãƒ–ルを`DEPENDS ON`リストã«è¨˜è¼‰ã™ã‚‹ã¨ã€ãƒ“ューãŒä¸€åˆ‡ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã•ã‚Œãªããªã‚Šã¾ã™ï¼ˆä¾å­˜é–¢ä¿‚ã¯`ALTER`ã§å‰Šé™¤ã§ãã¾ã™ã€ä¸‹è¨˜å‚照)。 +::: + +### 設定 + +利用å¯èƒ½ãªãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥è¨­å®š: + * `refresh_retries` - リフレッシュクエリãŒä¾‹å¤–ã‚’ä¼´ã£ã¦å¤±æ•—ã—ãŸå ´åˆã«å†è©¦è¡Œã™ã‚‹å›žæ•°ã€‚ã™ã¹ã¦ã®å†è©¦è¡Œã«å¤±æ•—ã—ãŸå ´åˆã€æ¬¡ã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚ŒãŸãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥æ™‚é–“ã«ã‚¹ã‚­ãƒƒãƒ—ã—ã¾ã™ã€‚0ã¯å†è©¦è¡Œãªã—ã‚’æ„味ã—ã€-1ã¯ç„¡é™ã®å†è©¦è¡Œã‚’æ„味ã—ã¾ã™ã€‚デフォルト: 0。 + * `refresh_retry_initial_backoff_ms` - `refresh_retries`ãŒã‚¼ãƒ­ã§ãªã„å ´åˆã€æœ€åˆã®å†è©¦è¡Œå‰ã®é…延。å„å†è©¦è¡Œã”ã¨ã«é…延ãŒå€å¢—ã—ã€`refresh_retry_max_backoff_ms`ã¾ã§ç¶šãã¾ã™ã€‚デフォルト: 100 ms。 + * `refresh_retry_max_backoff_ms` - リフレッシュ試行間ã®é…延ã®æŒ‡æ•°å¢—加ã®é™ç•Œã€‚デフォルト: 60000 ms(1分)。 + +### リフレッシュパラメータã®å¤‰æ›´ {#changing-refresh-parameters} + +リフレッシュパラメータを変更ã™ã‚‹ã«ã¯: +``` +ALTER TABLE [db.]name MODIFY REFRESH EVERY|AFTER ... [RANDOMIZE FOR ...] [DEPENDS ON ...] [SETTINGS ...] +``` + +:::note +ã“ã‚Œã¯å…¨ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ãƒ‘ラメータã€ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã€ä¾å­˜é–¢ä¿‚ã€è¨­å®šã€ãŠã‚ˆã³APPEND性を一度ã«ç½®ãæ›ãˆã¾ã™ã€‚例: テーブルã«`DEPENDS ON`ãŒã‚ã£ãŸå ´åˆã€`MODIFY REFRESH`ã‚’`DEPENDS ON`ãªã—ã§å®Ÿè¡Œã™ã‚‹ã¨ä¾å­˜é–¢ä¿‚ãŒå‰Šé™¤ã•ã‚Œã¾ã™ã€‚ +::: + +### ãã®ä»–ã®æ“作 + +ã™ã¹ã¦ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªMaterialized Viewã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã¯ã€[`system.view_refreshes`](../../../operations/system-tables/view_refreshes.md)テーブルã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚具体的ã«ã¯ã€ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã®é€²è¡ŒçŠ¶æ³ï¼ˆå®Ÿè¡Œä¸­ã®å ´åˆï¼‰ã€æœ€å¾Œã¨æ¬¡å›žã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥æ™‚é–“ã€å¤±æ•—ã—ãŸå ´åˆã®ä¾‹å¤–メッセージãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +リフレッシュを手動ã§åœæ­¢ã€é–‹å§‹ã€ãƒˆãƒªã‚¬ãƒ¼ã€ã¾ãŸã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã™ã‚‹ã«ã¯ã€[`SYSTEM STOP|START|REFRESH|CANCEL VIEW`](../system.md#refreshable-materialized-views)を使用ã—ã¾ã™ã€‚ + +リフレッシュãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ã¤ã«ã¯ã€[`SYSTEM WAIT VIEW`](../system.md#refreshable-materialized-views)を使用ã—ã¾ã™ã€‚特ã«ã€ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªMaterialized Viewを作æˆã—ãŸå¾Œã®åˆæœŸãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ã‚’å¾…æ©Ÿã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã™ã€‚ + +:::note +豆知識: リフレッシュã•ã‚Œã¦ã„るビューã‹ã‚‰å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã“ã¨ãŒè¨±å¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã§ã€ã‚³ãƒ³ã‚¦ã‚§ã‚¤ã®ãƒ©ã‚¤ãƒ•ã‚²ãƒ¼ãƒ ã‚’実装ã§ãã¾ã™: https://pastila.nl/?00021a4b/d6156ff819c83d490ad2dcec05676865#O0LGWTO7maUQIA4AcGUtlA== +::: + +## ウィンドウビュー [エクスペリメンタル] + +:::info +ã“ã‚Œã¯å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§å¾Œæ–¹äº’æ›æ€§ãŒãªã„å½¢ã§å¤‰æ›´ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚るエクスペリメンタルãªæ©Ÿèƒ½ã§ã™ã€‚ウィンドウビューã¨`WATCH`クエリã®ä½¿ç”¨ã‚’許å¯ã™ã‚‹ã«ã¯ã€[allow_experimental_window_view](../../../operations/settings/settings.md#allow-experimental-window-view)設定を使用ã—ã¦`set allow_experimental_window_view = 1`を入力ã—ã¦ãã ã•ã„。 +::: + +``` sql +CREATE WINDOW VIEW [IF NOT EXISTS] [db.]table_name [TO [db.]table_name] [INNER ENGINE engine] [ENGINE engine] [WATERMARK strategy] [ALLOWED_LATENESS interval_function] [POPULATE] +AS SELECT ... +GROUP BY time_window_function +[COMMENT 'comment'] +``` + +ウィンドウビューã¯ãƒ‡ãƒ¼ã‚¿ã‚’時間ウィンドウ別ã«é›†ç´„ã—ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒæº–å‚™ãŒæ•´ã£ãŸã¨ãã«çµæžœã‚’出力ã§ãã¾ã™ã€‚中間集計çµæžœã‚’内部 (ã‚‚ã—ãã¯æŒ‡å®šã—ãŸ) テーブルã«ä¿å­˜ã—ã¦ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ã‚’削減ã—ã€æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒ—ッシュや`WATCH`クエリを使用ã—ã¦é€šçŸ¥ã‚’プッシュã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ウィンドウビューã®ä½œæˆã¯`MATERIALIZED VIEW`ã®ä½œæˆã«ä¼¼ã¦ã„ã¾ã™ã€‚ウィンドウビューã¯ä¸­é–“データをä¿å­˜ã™ã‚‹ãŸã‚ã«å†…部ストレージエンジンを必è¦ã¨ã—ã¾ã™ã€‚内部ストレージã¯`INNER ENGINE`å¥ã‚’使用ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚ウィンドウビューã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å†…部エンジンã¨ã—ã¦`AggregatingMergeTree`を使用ã—ã¾ã™ã€‚ + +`TO [db].[table]`ãªã—ã§ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ“ューを作æˆã™ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルエンジン`ENGINE`を指定ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +### 時間ウィンドウ関数 + +[時間ウィンドウ関数](../../functions/time-window-functions.md)ã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ä¸‹é™ã¨ä¸Šé™ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ウィンドウビューã¯æ™‚間ウィンドウ関数ã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### タイムアトリビュート + +ウィンドウビューã¯**処ç†æ™‚é–“**ã¨**イベント時間**ã®ãƒ—ロセスをサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +**処ç†æ™‚é–“**ã¯ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ“ューãŒãƒ­ãƒ¼ã‚«ãƒ«ã®ãƒžã‚·ãƒ³ã®æ™‚é–“ã«åŸºã¥ã„ã¦çµæžœã‚’生æˆã§ãるよã†ã«ã—ã¾ã™ã€‚ã“ã‚Œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ä½¿ç”¨ã•ã‚Œã€æœ€ã‚‚基本的ãªæ™‚間概念ã§ã™ãŒã€æ±ºå®šæ€§ã‚’æä¾›ã—ã¾ã›ã‚“。処ç†æ™‚間アトリビュートã¯ã€æ™‚間ウィンドウ関数ã®`time_attr`をテーブルカラムã«è¨­å®šã™ã‚‹ã‹ã€ã¾ãŸã¯é–¢æ•°`now()`を使用ã—ã¦å®šç¾©ã§ãã¾ã™ã€‚次ã®ã‚¯ã‚¨ãƒªã¯å‡¦ç†æ™‚間を使用ã—ãŸã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ“ューを作æˆã—ã¾ã™ã€‚ + +``` sql +CREATE WINDOW VIEW wv AS SELECT count(number), tumbleStart(w_id) as w_start from date GROUP BY tumble(now(), INTERVAL '5' SECOND) as w_id +``` + +**イベント時間**ã¯ã€å„イベントãŒãã®åˆ¶ä½œè£…ç½®ã§ç™ºç”Ÿã—ãŸæ™‚é–“ã§ã™ã€‚ã“ã®æ™‚é–“ã¯ã€é€šå¸¸ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒç”Ÿæˆã•ã‚ŒãŸã¨ãã«ãã®ä¸­ã«åŸ‹ã‚è¾¼ã¾ã‚Œã¦ã„ã¾ã™ã€‚イベント時間処ç†ã¯ã€é †åºãŒä¹±ã‚ŒãŸã‚¤ãƒ™ãƒ³ãƒˆã‚„é…延イベントã§ã‚‚一貫ã—ãŸçµæžœã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ウィンドウビューã¯ã€`WATERMARK`構文を使用ã—ã¦ã‚¤ãƒ™ãƒ³ãƒˆæ™‚間処ç†ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +ウィンドウビューã¯ã€3ã¤ã®ã‚¦ã‚©ãƒ¼ã‚¿ãƒ¼ãƒžãƒ¼ã‚¯æˆ¦ç•¥ã‚’æä¾›ã—ã¾ã™: + +* `STRICTLY_ASCENDING`: ã“ã‚Œã¾ã§ã«è¦³å¯Ÿã•ã‚ŒãŸæœ€å¤§ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã®ã‚¦ã‚©ãƒ¼ã‚¿ãƒ¼ãƒžãƒ¼ã‚¯ã‚’発行ã—ã¾ã™ã€‚最大タイムスタンプよりå°ã•ã„タイムスタンプをæŒã¤è¡Œã¯é…ã‚Œã¦ã„ã¾ã›ã‚“。 +* `ASCENDING`: ã“ã‚Œã¾ã§ã«è¦³å¯Ÿã•ã‚ŒãŸæœ€å¤§ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã‹ã‚‰1を引ã„ãŸã‚¦ã‚©ãƒ¼ã‚¿ãƒ¼ãƒžãƒ¼ã‚¯ã‚’発行ã—ã¾ã™ã€‚最大タイムスタンプã¨ç­‰ã—ã„ã‹å°ã•ã„タイムスタンプをæŒã¤è¡Œã¯é…ã‚Œã¦ã„ã¾ã›ã‚“。 +* `BOUNDED`: WATERMARK=INTERVAL。指定ã•ã‚ŒãŸé…延を引ã„ãŸæœ€å¤§ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã®ã‚¦ã‚©ãƒ¼ã‚¿ãƒ¼ãƒžãƒ¼ã‚¯ã‚’発行ã—ã¾ã™ã€‚ + +以下ã®ã‚¯ã‚¨ãƒªã¯ã€`WATERMARK`を使用ã—ã¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ“ューを作æˆã™ã‚‹ä¾‹ã§ã™: + +``` sql +CREATE WINDOW VIEW wv WATERMARK=STRICTLY_ASCENDING AS SELECT count(number) FROM date GROUP BY tumble(timestamp, INTERVAL '5' SECOND); +CREATE WINDOW VIEW wv WATERMARK=ASCENDING AS SELECT count(number) FROM date GROUP BY tumble(timestamp, INTERVAL '5' SECOND); +CREATE WINDOW VIEW wv WATERMARK=INTERVAL '3' SECOND AS SELECT count(number) FROM date GROUP BY tumble(timestamp, INTERVAL '5' SECOND); +``` + +デフォルトã§ã¯ã€ã‚¦ã‚©ãƒ¼ã‚¿ãƒ¼ãƒžãƒ¼ã‚¯ãŒåˆ°é”ã™ã‚‹ã¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒç™ºç”Ÿã—ã¾ã™ãŒã€ã‚¦ã‚©ãƒ¼ã‚¿ãƒ¼ãƒžãƒ¼ã‚¯ã‚’éŽãŽã¦åˆ°ç€ã—ãŸè¦ç´ ã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ウィンドウビューã¯`ALLOWED_LATENESS=INTERVAL`を設定ã—ã¦é…ã‚ŒãŸã‚¤ãƒ™ãƒ³ãƒˆã®å‡¦ç†ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚é…延処ç†ã®ä¾‹ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +``` sql +CREATE WINDOW VIEW test.wv TO test.dst WATERMARK=ASCENDING ALLOWED_LATENESS=INTERVAL '2' SECOND AS SELECT count(a) AS count, tumbleEnd(wid) AS w_end FROM test.mt GROUP BY tumble(timestamp, INTERVAL '5' SECOND) AS wid; +``` + +é…延ã§ç™ºè¡Œã•ã‚ŒãŸè¦ç´ ã¯ã€ä»¥å‰ã®è¨ˆç®—ã®æ›´æ–°çµæžœã¨ã—ã¦æ‰±ã‚れるã¹ãã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ウィンドウãŒçµ‚了ã—ãŸã¨ãã§ã¯ãªãã€é…延ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆãŒåˆ°ç€ã—ãŸã¨ãã«ã™ãã«ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒç™ºç”Ÿã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€åŒã˜ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«å¯¾ã—ã¦è¤‡æ•°ã®å‡ºåŠ›ãŒç”Ÿã˜ã¾ã™ã€‚ユーザーã¯ã“れらã®é‡è¤‡ã—ãŸçµæžœã‚’考慮ã™ã‚‹ã‹ã€é‡è¤‡ã‚’排除ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ウィンドウビューã§æŒ‡å®šã•ã‚ŒãŸ`SELECT`クエリを`ALTER TABLE ... MODIFY QUERY`文を使用ã—ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ビューをウィンドウビューã¨ã¨ã‚‚ã«ä½¿ç”¨ã™ã‚‹å ´åˆã€ã¾ãŸã¯`TO [db.]name`å¥ã¨ã¨ã‚‚ã«ä½¿ç”¨ã™ã‚‹å ´åˆã€æ–°ã—ã„`SELECT`クエリã®çµæžœã¨ãªã‚‹ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã¯å…ƒã®`SELECT`クエリã¨åŒã˜ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ç¾åœ¨ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å†…ã®ãƒ‡ãƒ¼ã‚¿ã¯å¤±ã‚ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ä¸­é–“状態をå†åˆ©ç”¨ã§ããªã„ãŸã‚ã§ã™ã€‚ + +### æ–°ã—ã„ウィンドウã®ç›£è¦– + +ウィンドウビューã¯ã€[WATCH](../../../sql-reference/statements/watch.md)クエリをサãƒãƒ¼ãƒˆã—ã¦å¤‰æ›´ã‚’監視ã™ã‚‹ã‹ã€`TO`構文を使用ã—ã¦çµæžœã‚’テーブルã«å‡ºåŠ›ã—ã¾ã™ã€‚ + +``` sql +WATCH [db.]window_view +[EVENTS] +[LIMIT n] +[FORMAT format] +``` + +`WATCH`クエリã¯`LIVE VIEW`ã¨åŒæ§˜ã«å‹•ä½œã—ã¾ã™ã€‚`LIMIT`を指定ã™ã‚‹ã“ã¨ã§ã€ã‚¯ã‚¨ãƒªã‚’終了ã™ã‚‹å‰ã«å—ä¿¡ã™ã‚‹æ›´æ–°ã®æ•°ã‚’設定ã§ãã¾ã™ã€‚`EVENTS`å¥ã‚’使用ã—ã¦`WATCH`クエリã®çŸ­ã„å½¢å¼ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã€ã‚¯ã‚¨ãƒªçµæžœã®ä»£ã‚ã‚Šã«æœ€æ–°ã®ã‚¯ã‚¨ãƒªã‚¦ã‚©ãƒ¼ã‚¿ãƒ¼ãƒžãƒ¼ã‚¯ã‚’å–å¾—ã—ã¾ã™ã€‚ + +### 設定 + +- `window_view_clean_interval`: å¤ããªã£ãŸãƒ‡ãƒ¼ã‚¿ã‚’解放ã™ã‚‹ãŸã‚ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ“ューã®ã‚¯ãƒªãƒ¼ãƒ‹ãƒ³ã‚°é–“隔(秒)。システムã¯ã‚·ã‚¹ãƒ†ãƒ æ™‚é–“ã‚„`WATERMARK`設定ã«å¾“ã£ã¦å®Œå…¨ã«ãƒˆãƒªã‚¬ãƒ¼ã•ã‚Œã¦ã„ãªã„ウィンドウをä¿æŒã—ã€ä»–ã®ãƒ‡ãƒ¼ã‚¿ã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ +- `window_view_heartbeat_interval`: ウォッãƒã‚¯ã‚¨ãƒªãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã‚ã‚‹ã“ã¨ã‚’示ã™å¿ƒæ‹é–“隔(秒)。 +- `wait_for_window_view_fire_signal_timeout`: イベント時間処ç†ä¸­ã«ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ“ューã®ç™ºç«ã‚·ã‚°ãƒŠãƒ«ã‚’å¾…æ©Ÿã™ã‚‹ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã€‚ + +### 例 + +例ãˆã°ã€`data`ã¨ã„ã†ãƒ­ã‚°ãƒ†ãƒ¼ãƒ–ルã§10秒ã”ã¨ã«ã‚¯ãƒªãƒƒã‚¯ãƒ­ã‚°ã®æ•°ã‚’カウントã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã¨ã—ã¾ã™ã€‚ãã®ãƒ†ãƒ¼ãƒ–ル構造ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ã€‚ + +``` sql +CREATE TABLE data ( `id` UInt64, `timestamp` DateTime) ENGINE = Memory; +``` + +ã¾ãšã€10秒間隔ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’æŒã¤ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ“ューを作æˆã—ã¾ã™ã€‚ + +``` sql +CREATE WINDOW VIEW wv as select count(id), tumbleStart(w_id) as window_start from data group by tumble(timestamp, INTERVAL '10' SECOND) as w_id +``` + +次ã«ã€`WATCH`クエリを使ã£ã¦çµæžœã‚’å–å¾—ã—ã¾ã™ã€‚ + +``` sql +WATCH wv +``` + +ログãŒãƒ†ãƒ¼ãƒ–ル`data`ã«æŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€ + +``` sql +INSERT INTO data VALUES(1,now()) +``` + +`WATCH`クエリã¯æ¬¡ã®ã‚ˆã†ã«çµæžœã‚’表示ã™ã‚‹ã¯ãšã§ã™ã€‚ + +``` text +┌─count(id)─┬────────window_start─┠+│ 1 │ 2020-01-14 16:56:40 │ +└───────────┴─────────────────────┘ +``` + +ã¾ãŸã¯ã€`TO`構文を使用ã—ã¦å‡ºåŠ›ã‚’別ã®ãƒ†ãƒ¼ãƒ–ルã«é–¢é€£ä»˜ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +``` sql +CREATE WINDOW VIEW wv TO dst AS SELECT count(id), tumbleStart(w_id) as window_start FROM data GROUP BY tumble(timestamp, INTERVAL '10' SECOND) as w_id +``` + +追加ã®ä¾‹ã¯ã€ClickHouseã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ•ãƒ«ãƒ†ã‚¹ãƒˆã®ä¸­ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ˆãれらã¯`*window_view*`ã¨ã•ã‚Œã¦ã„ã¾ã™ï¼‰ã€‚ + +### ウィンドウビューã®ä½¿ç”¨ + +ウィンドウビューã¯ä»¥ä¸‹ã®ã‚·ãƒŠãƒªã‚ªã§ä¾¿åˆ©ã§ã™: + +* **監視**: 時間å˜ä½ã§ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãƒ­ã‚°ã‚’集約・計算ã—ã€çµæžœã‚’ターゲットテーブルã«å‡ºåŠ›ã—ã¾ã™ã€‚ダッシュボードã¯ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルをソーステーブルã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ +* **分æž**: 時間ウィンドウã§ãƒ‡ãƒ¼ã‚¿ã‚’自動的ã«é›†ç´„ã—ã€å‰å‡¦ç†ã™ã‚‹ã€‚ã“ã®å‡¦ç†ã¯å¤§é‡ã®ãƒ­ã‚°ã‚’分æžã™ã‚‹éš›ã«å½¹ç«‹ã¡ã¾ã™ã€‚å‰å‡¦ç†ã«ã‚ˆã£ã¦è¤‡æ•°ã®ã‚¯ã‚¨ãƒªã§ã®å復計算ãŒæŽ’除ã•ã‚Œã€ã‚¯ã‚¨ãƒªã®é…延ãŒæ¸›å°‘ã—ã¾ã™ã€‚ + +## 関連コンテンツ + +- ブログ: [ClickHouseã§æ™‚系列データを扱ã†](https://clickhouse.com/blog/working-with-time-series-data-and-functions-ClickHouse) +- ブログ: [ClickHouseを使ã£ãŸè¦³æ¸¬æ€§ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã®æ§‹ç¯‰ - Part 2 - トレース](https://clickhouse.com/blog/storing-traces-and-spans-open-telemetry-in-clickhouse) diff --git a/docs/ja/sql-reference/statements/delete.md b/docs/ja/sql-reference/statements/delete.md new file mode 100644 index 00000000000..d98f1efcba3 --- /dev/null +++ b/docs/ja/sql-reference/statements/delete.md @@ -0,0 +1,97 @@ +--- +slug: /ja/sql-reference/statements/delete +sidebar_position: 36 +sidebar_label: DELETE +description: è«–ç†å‰Šé™¤ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹ãƒ—ロセスを簡素化ã—ã¾ã™ã€‚ +keywords: [delete] +title: è«–ç† DELETE æ–‡ +--- + +è«–ç†å‰Šé™¤ã¯ã€*MergeTree テーブルエンジンファミリ*ã«ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã€å¼ `expr` ã«ä¸€è‡´ã™ã‚‹ `[db.]table` ã‹ã‚‰è¡Œã‚’削除ã—ã¾ã™ã€‚ + +``` sql +DELETE FROM [db.]table [ON CLUSTER cluster] [IN PARTITION partition_expr] WHERE expr; +``` + +ã“ã‚Œã¯ã€[ALTER TABLE ... DELETE](/ja/sql-reference/statements/alter/delete) コマンドã¨ã®å¯¾æ¯”ã§ã€Œè«–ç† `削除`ã€ã¨å‘¼ã°ã‚Œã¦ã„ã¾ã™ãŒã€ALTER コマンドã¯é‡ã„プロセスã§ã™ã€‚ + +## 例 + +```sql +-- `Title` カラム㌠`hello` ã‚’å«ã‚€ `hits` テーブルã‹ã‚‰ã™ã¹ã¦ã®è¡Œã‚’削除 +DELETE FROM hits WHERE Title LIKE '%hello%'; +``` + +## è«–ç†å‰Šé™¤ã¯ãƒ‡ãƒ¼ã‚¿ã‚’å³åº§ã«å‰Šé™¤ã—ãªã„ + +è«–ç† `DELETE` ã¯ã€è¡Œã‚’削除済ã¿ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã™ã‚‹[ミューテーション](/ja/sql-reference/statements/alter#mutations)ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ãŠã‚Šã€ç‰©ç†çš„ã«å³åº§ã«å‰Šé™¤ã•ã‚Œã¾ã›ã‚“。 + +デフォルトã§ã¯ã€`DELETE` æ–‡ã¯ã€è¡ŒãŒå‰Šé™¤æ¸ˆã¿ã¨ã—ã¦ãƒžãƒ¼ã‚¯ã•ã‚Œã‚‹ã¾ã§å¾…æ©Ÿã—ã¦ã‹ã‚‰æˆ»ã‚Šã¾ã™ã€‚データé‡ãŒå¤§ãã„å ´åˆã€ã“ã‚Œã«ã¯é•·æ™‚é–“ã‹ã‹ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚代ã‚ã‚Šã«ã€è¨­å®š [`lightweight_deletes_sync`](/ja/operations/settings/settings#lightweight_deletes_sync) を使用ã—ã¦ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§éžåŒæœŸã«å®Ÿè¡Œã§ãã¾ã™ã€‚無効ã«ã™ã‚‹ã¨ã€`DELETE` æ–‡ã¯å³åº§ã«æˆ»ã‚Šã¾ã™ãŒã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãŒçµ‚了ã™ã‚‹ã¾ã§ã‚¯ã‚¨ãƒªã«å¯¾ã—ã¦ãƒ‡ãƒ¼ã‚¿ãŒè¡¨ç¤ºã•ã‚Œç¶šã‘ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +ã“ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã€å‰Šé™¤æ¸ˆã¿ã¨ãƒžãƒ¼ã‚¯ã•ã‚ŒãŸè¡Œã‚’物ç†çš„ã«å‰Šé™¤ã—ã¾ã›ã‚“。ã“ã‚Œã¯æ¬¡ã®ãƒžãƒ¼ã‚¸ã®éš›ã«ã®ã¿ç™ºç”Ÿã—ã¾ã™ã€‚ãã®çµæžœã€ãƒ‡ãƒ¼ã‚¿ãŒã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‹ã‚‰å®Ÿéš›ã«å‰Šé™¤ã•ã‚Œã¦ãŠã‚‰ãšã€å‰Šé™¤æ¸ˆã¿ã¨ãƒžãƒ¼ã‚¯ã•ã‚Œã¦ã„ã‚‹ã ã‘ã®ä¸ç‰¹å®šã®æœŸé–“ãŒå­˜åœ¨ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +予測å¯èƒ½ãªæœŸé–“内ã«ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ãŒå‰Šé™¤ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ãƒ†ãƒ¼ãƒ–ル設定 [`min_age_to_force_merge_seconds`](https://clickhouse.com/docs/ja/operations/settings/merge-tree-settings#min_age_to_force_merge_seconds) ã®ä½¿ç”¨ã‚’検討ã—ã¦ãã ã•ã„。ã¾ãŸã¯ã€[ALTER TABLE ... DELETE](/ja/sql-reference/statements/alter/delete) コマンドを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚`ALTER TABLE ... DELETE` を使用ã—ãŸãƒ‡ãƒ¼ã‚¿ã®å‰Šé™¤ã¯ã€ã™ã¹ã¦ã®å½±éŸ¿ã‚’å—ã‘るパーツをå†ä½œæˆã™ã‚‹ãŸã‚ã€å¤šãã®ãƒªã‚½ãƒ¼ã‚¹ã‚’消費ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +## 大é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹ + +大é‡ã®å‰Šé™¤ã¯ ClickHouse ã®ãƒ‘フォーマンスã«æ‚ªå½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚テーブルã®ã™ã¹ã¦ã®è¡Œã‚’削除ã—よã†ã¨ã—ã¦ã„ã‚‹å ´åˆã¯ã€[`TRUNCATE TABLE`](/ja/sql-reference/statements/truncate) コマンドã®ä½¿ç”¨ã‚’検討ã—ã¦ãã ã•ã„。 + +é »ç¹ãªå‰Šé™¤ãŒäºˆæƒ³ã•ã‚Œã‚‹å ´åˆã¯ã€[カスタムパーティションキー](/ja/engines/table-engines/mergetree-family/custom-partitioning-key) ã®ä½¿ç”¨ã‚’検討ã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã£ã¦ã€[`ALTER TABLE ... DROP PARTITION`](/ja/sql-reference/statements/alter/partition#drop-partitionpart) コマンドを使用ã—ã¦ã€ãã®ãƒ‘ーティションã«é–¢é€£ã™ã‚‹ã™ã¹ã¦ã®è¡Œã‚’ã™ã°ã‚„ã削除ã§ãã¾ã™ã€‚ + +## è«–ç†å‰Šé™¤ã®åˆ¶é™ + +### プロジェクションをæŒã¤è«–ç† `DELETE` + +デフォルトã§ã¯ã€`DELETE` ã¯ãƒ—ロジェクションをæŒã¤ãƒ†ãƒ¼ãƒ–ルã«ã¯å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“。ã“ã‚Œã¯ã€ãƒ—ロジェクション内ã®è¡ŒãŒ `DELETE` æ“作ã«ã‚ˆã£ã¦å½±éŸ¿ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚ã—ã‹ã—ã€ã“ã®å‹•ä½œã‚’変更ã™ã‚‹ [MergeTree 設定](https://clickhouse.com/docs/ja/operations/settings/merge-tree-settings) `lightweight_mutation_projection_mode` ãŒã‚ã‚Šã¾ã™ã€‚ + +## è«–ç†å‰Šé™¤ã‚’使用ã™ã‚‹éš›ã®ãƒ‘フォーマンス考慮事項 + +**è«–ç†`DELETE`文を使用ã—ã¦å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹ã¨ã€SELECT クエリã®ãƒ‘フォーマンスã«æ‚ªå½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚** + +次ã®ç‚¹ã‚‚è«–ç† `DELETE` ã®ãƒ‘フォーマンスã«ãƒžã‚¤ãƒŠã‚¹ã®å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼š + +- `DELETE` クエリã§é‡ã„ `WHERE` æ¡ä»¶ãŒã‚る。 +- ミューテーションキューãŒä»–ã®å¤šãã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã§æº€ãŸã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã®ã™ã¹ã¦ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯é †ã«å®Ÿè¡Œã•ã‚Œã‚‹ãŸã‚ã€ãƒ‘フォーマンスã®å•é¡Œã«ã¤ãªãŒã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- 影響をå—ã‘ãŸãƒ†ãƒ¼ãƒ–ルã«éžå¸¸ã«å¤šãã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツãŒã‚る。 +- コンパクトパーツã«å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚‹å ´åˆã€‚コンパクトパーツã§ã¯ã€ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒ1ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ + +## 削除ã®æ¨©é™ + +`DELETE` ã«ã¯ `ALTER DELETE` 権é™ãŒå¿…è¦ã§ã™ã€‚指定ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ル㧠`DELETE` 文を有効ã«ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + +```sql +GRANT ALTER DELETE ON db.table to username; +``` + +## ClickHouse 内部ã§ã®è«–ç†å‰Šé™¤ã®å‹•ä½œ + +1. **影響をå—ã‘ãŸè¡Œã«ã€Œãƒžã‚¹ã‚¯ã€ãŒé©ç”¨ã•ã‚Œã‚‹** + + `DELETE FROM table ...` クエリãŒå®Ÿè¡Œã•ã‚Œã‚‹ã¨ã€ClickHouse ã¯å„行㫠“existing†㨠“deleted†ã®ã„ãšã‚Œã‹ã§ãƒžãƒ¼ã‚¯ã•ã‚ŒãŸãƒžã‚¹ã‚¯ã‚’ä¿å­˜ã—ã¾ã™ã€‚ã“れら㮠“deleted†行ã¯ã€å¾Œç¶šã®ã‚¯ã‚¨ãƒªã§ã¯çœç•¥ã•ã‚Œã¾ã™ã€‚ã—ã‹ã—ã€è¡Œã¯å®Ÿéš›ã«ã¯å¾Œç¶šã®ãƒžãƒ¼ã‚¸ã«ã‚ˆã£ã¦ã®ã¿å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒžã‚¹ã‚¯ã®æ›¸ãè¾¼ã¿ã¯ã€`ALTER TABLE ... DELETE` クエリãŒè¡Œã†ã‚‚ã®ã‚ˆã‚Šã‚‚軽é‡ã§ã™ã€‚ + + ã“ã®ãƒžã‚¹ã‚¯ã¯ã€éš ã•ã‚ŒãŸ `_row_exists` システムカラムã¨ã—ã¦å®Ÿè£…ã•ã‚Œã€ã™ã¹ã¦ã®è¡¨ç¤ºè¡Œã«å¯¾ã—㦠`True` ã‚’ã€å‰Šé™¤ã•ã‚ŒãŸè¡Œã«å¯¾ã—ã¦ã¯ `False` ã‚’æ ¼ç´ã—ã¾ã™ã€‚ã“ã®ã‚«ãƒ©ãƒ ã¯ã€ãƒ‘ーツ内ã§ä¸€éƒ¨ã®è¡ŒãŒå‰Šé™¤ã•ã‚ŒãŸå ´åˆã«ã®ã¿å­˜åœ¨ã—ã¾ã™ã€‚ã“ã®ã‚«ãƒ©ãƒ ã¯ã€ã™ã¹ã¦ã®å€¤ãŒ `True` ã§ã‚ã‚‹å ´åˆã«ã¯å­˜åœ¨ã—ã¾ã›ã‚“。 + +2. **`SELECT` クエリã¯ãƒžã‚¹ã‚¯ã‚’組ã¿è¾¼ã‚€ã‚ˆã†ã«å¤‰æ›ã•ã‚Œã‚‹** + + マスクã•ã‚ŒãŸã‚«ãƒ©ãƒ ãŒã‚¯ã‚¨ãƒªã§ä½¿ç”¨ã•ã‚Œã‚‹ã¨ã€`SELECT ... FROM table WHERE condition` クエリã¯å†…部的㫠`_row_exists` ã«å¯¾ã™ã‚‹è¿°èªžã§æ‹¡å¼µã•ã‚Œã€æ¬¡ã®ã‚ˆã†ã«å¤‰æ›ã•ã‚Œã¾ã™ï¼š + ```sql + SELECT ... FROM table PREWHERE _row_exists WHERE condition + ``` + 実行時ã«ã€ã‚«ãƒ©ãƒ  `_row_exists` ãŒèª­ã¿å–られã€ã©ã®è¡Œã‚’è¿”ã•ãªã„ã‹ãŒæ±ºå®šã•ã‚Œã¾ã™ã€‚大é‡ã®å‰Šé™¤æ¸ˆè¡ŒãŒã‚ã‚‹å ´åˆã€ClickHouse ã¯ä»–ã®ã‚«ãƒ©ãƒ ã‚’読ã¿å–ã‚‹éš›ã«ã‚¹ã‚­ãƒƒãƒ—ã§ãるグラニュールを特定ã§ãã¾ã™ã€‚ + +3. **`DELETE` クエリ㯠`ALTER TABLE ... UPDATE` クエリã«å¤‰æ›ã•ã‚Œã‚‹** + + `DELETE FROM table WHERE condition` ã¯ã€`ALTER TABLE table UPDATE _row_exists = 0 WHERE condition` ミューテーションã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + + 内部的ã«ã€ã“ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯2段階ã§å®Ÿè¡Œã•ã‚Œã¾ã™ï¼š + + 1. å„個別パーツã«å¯¾ã—ã¦ã€ãƒ‘ーツãŒå½±éŸ¿ã‚’å—ã‘ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’判断ã™ã‚‹ãŸã‚ã«ã€`SELECT count() FROM table WHERE condition` コマンドãŒå®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + + 2. 上記ã®ã‚³ãƒžãƒ³ãƒ‰ã«åŸºã¥ã„ã¦ã€å½±éŸ¿ã‚’å—ã‘ãŸãƒ‘ーツã¯ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ãƒˆã•ã‚Œã€å½±éŸ¿ã‚’å—ã‘ã¦ã„ãªã„パーツã«ã¯ãƒãƒ¼ãƒ‰ãƒªãƒ³ã‚¯ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ワイドパーツã®å ´åˆã€å„行㮠`_row_exists` カラムãŒæ›´æ–°ã•ã‚Œã€ä»–ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ãƒãƒ¼ãƒ‰ãƒªãƒ³ã‚¯ã•ã‚Œã¾ã™ã€‚コンパクトパーツã®å ´åˆã€ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒä¸€ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ä¸€ç·’ã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒå†æ›¸ãè¾¼ã¿ã•ã‚Œã¾ã™ã€‚ + + 上記ã®æ‰‹é †ã‹ã‚‰ã€ãƒžã‚¹ã‚­ãƒ³ã‚°æŠ€è¡“を使用ã—ãŸè«–ç† `DELETE` ã¯ã€å½±éŸ¿ã‚’å—ã‘ãŸãƒ‘ーツã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†æ›¸ãè¾¼ã¿ã—ãªã„ãŸã‚ã€å¾“æ¥ã® `ALTER TABLE ... DELETE` ã«æ¯”ã¹ã¦ãƒ‘フォーマンスを改善ã—ã¦ã„ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ + +## 関連コンテンツ + +- ブログ: [Handling Updates and Deletes in ClickHouse](https://clickhouse.com/blog/handling-updates-and-deletes-in-clickhouse) + diff --git a/docs/ja/sql-reference/statements/describe-table.md b/docs/ja/sql-reference/statements/describe-table.md new file mode 100644 index 00000000000..806cbf1a91b --- /dev/null +++ b/docs/ja/sql-reference/statements/describe-table.md @@ -0,0 +1,69 @@ +--- +slug: /ja/sql-reference/statements/describe-table +sidebar_position: 42 +sidebar_label: DESCRIBE TABLE +title: "DESCRIBE TABLE" +--- + +テーブルã®ã‚«ãƒ©ãƒ ã«é–¢ã™ã‚‹æƒ…報を返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +DESC|DESCRIBE TABLE [db.]table [INTO OUTFILE filename] [FORMAT format] +``` + +`DESCRIBE` ステートメントã¯ã€å„テーブルカラムã«å¯¾ã—ã¦ä»¥ä¸‹ã® [String](../../sql-reference/data-types/string.md) 値をæŒã¤è¡Œã‚’è¿”ã—ã¾ã™: + +- `name` — カラムå。 +- `type` — カラムã®åž‹ã€‚ +- `default_type` — カラムã®[デフォルトå¼](../../sql-reference/statements/create/table.md#create-default-values)ã§ä½¿ç”¨ã•ã‚Œã‚‹å¥ï¼š`DEFAULT`ã€`MATERIALIZED`ã€ã¾ãŸã¯ `ALIAS`。デフォルトå¼ãŒãªã„å ´åˆã¯ç©ºæ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `default_expression` — `DEFAULT`å¥ã®å¾Œã«æŒ‡å®šã•ã‚ŒãŸå¼ã€‚ +- `comment` — [カラムコメント](../../sql-reference/statements/alter/column.md#alter_comment-column)。 +- `codec_expression` — カラムã«é©ç”¨ã•ã‚ŒãŸ[コーデック](../../sql-reference/statements/create/table.md#codecs)。 +- `ttl_expression` — [æœ‰åŠ¹æœŸé™ (TTL)](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-ttl)å¼ã€‚ +- `is_subcolumn` — 内部サブカラムã®å ´åˆã¯ `1` ã¨ãªã‚‹ãƒ•ãƒ©ã‚°ã€‚[describe_include_subcolumns](../../operations/settings/settings.md#describe_include_subcolumns) 設定ã§ã‚µãƒ–カラムã®è¨˜è¿°ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã®ã¿çµæžœã«å«ã¾ã‚Œã¾ã™ã€‚ + +[ãƒã‚¹ãƒˆã•ã‚ŒãŸ](../../sql-reference/data-types/nested-data-structures/index.md)データ構造内ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã¯å€‹åˆ¥ã«è¨˜è¿°ã•ã‚Œã¾ã™ã€‚å„カラムã®åå‰ã¯è¦ªã‚«ãƒ©ãƒ åã¨ãƒ‰ãƒƒãƒˆã§æŽ¥é ­è¾žã‚’付ã‘られã¾ã™ã€‚ + +ä»–ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®å†…部サブカラムを表示ã™ã‚‹ã«ã¯ã€[describe_include_subcolumns](../../operations/settings/settings.md#describe_include_subcolumns) 設定を使用ã—ã¦ãã ã•ã„。 + +**例** + +クエリ: + +``` sql +CREATE TABLE describe_example ( + id UInt64, text String DEFAULT 'unknown' CODEC(ZSTD), + user Tuple (name String, age UInt8) +) ENGINE = MergeTree() ORDER BY id; + +DESCRIBE TABLE describe_example; +DESCRIBE TABLE describe_example SETTINGS describe_include_subcolumns=1; +``` + +çµæžœ: + +``` text +┌─name─┬─type──────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ id │ UInt64 │ │ │ │ │ │ +│ text │ String │ DEFAULT │ 'unknown' │ │ ZSTD(1) │ │ +│ user │ Tuple(name String, age UInt8) │ │ │ │ │ │ +└──────┴───────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +2番目ã®ã‚¯ã‚¨ãƒªã¯ã•ã‚‰ã«ã‚µãƒ–カラムを表示ã—ã¾ã™: + +``` text +┌─name──────┬─type──────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┬─is_subcolumn─┠+│ id │ UInt64 │ │ │ │ │ │ 0 │ +│ text │ String │ DEFAULT │ 'unknown' │ │ ZSTD(1) │ │ 0 │ +│ user │ Tuple(name String, age UInt8) │ │ │ │ │ │ 0 │ +│ user.name │ String │ │ │ │ │ │ 1 │ +│ user.age │ UInt8 │ │ │ │ │ │ 1 │ +└───────────┴───────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┴──────────────┘ +``` + +**関連項目** + +- [describe_include_subcolumns](../../operations/settings/settings.md#describe_include_subcolumns) 設定。 diff --git a/docs/ja/sql-reference/statements/detach.md b/docs/ja/sql-reference/statements/detach.md new file mode 100644 index 00000000000..29b29e3de38 --- /dev/null +++ b/docs/ja/sql-reference/statements/detach.md @@ -0,0 +1,75 @@ +--- +slug: /ja/sql-reference/statements/detach +sidebar_position: 43 +sidebar_label: DETACH +title: "DETACH ステートメント" +--- + +テーブルã€Materialized Viewã€Dictionaryã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®å­˜åœ¨ã‚’サーãƒãƒ¼ã«ã€Œå¿˜ã‚Œã•ã›ã‚‹ã€ãŸã‚ã®ã‚³ãƒžãƒ³ãƒ‰ã§ã™ã€‚ + +**構文** + +``` sql +DETACH TABLE|VIEW|DICTIONARY|DATABASE [IF EXISTS] [db.]name [ON CLUSTER cluster] [PERMANENTLY] [SYNC] +``` + +DETACHã¯ãƒ†ãƒ¼ãƒ–ルã€Materialized Viewã€Dictionaryã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‡ãƒ¼ã‚¿ã‚„メタデータを削除ã—ã¾ã›ã‚“。エンティティãŒ`PERMANENTLY`ã§ãªã„å ´åˆã€æ¬¡å›žã‚µãƒ¼ãƒãƒ¼èµ·å‹•æ™‚ã«ã‚µãƒ¼ãƒãƒ¼ã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã€å†ã³ãƒ†ãƒ¼ãƒ–ル/View/Dictionary/データベースをèªè­˜ã—ã¾ã™ã€‚エンティティãŒ`PERMANENTLY`ã§DETACHã•ã‚ŒãŸå ´åˆã¯è‡ªå‹•çš„ã«èªè­˜ã•ã‚Œã¾ã›ã‚“。 + +テーブルã€Dictionaryã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒæ’ä¹…çš„ã«DETACHã•ã‚ŒãŸã‹å¦ã‹ã«ã‹ã‹ã‚らãšã€[ATTACH](../../sql-reference/statements/attach.md)クエリを使用ã—ã¦å†ã‚¢ã‚¿ãƒƒãƒã§ãã¾ã™ã€‚システムログテーブル(例: `query_log`, `text_log`ãªã©ï¼‰ã‚‚å†ã‚¢ã‚¿ãƒƒãƒå¯èƒ½ã§ã™ã€‚ä»–ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã¯å†ã‚¢ã‚¿ãƒƒãƒã§ãã¾ã›ã‚“ãŒã€æ¬¡å›žã‚µãƒ¼ãƒãƒ¼èµ·å‹•æ™‚ã«ã‚µãƒ¼ãƒãƒ¼ã¯ã“れらã®ãƒ†ãƒ¼ãƒ–ルをå†èªè­˜ã—ã¾ã™ã€‚ + +`ATTACH MATERIALIZED VIEW`ã¯çŸ­ã„構文(`SELECT`ãªã—)ã§ã¯å‹•ä½œã—ã¾ã›ã‚“ãŒã€`ATTACH TABLE`クエリを使用ã—ã¦ã‚¢ã‚¿ãƒƒãƒã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +æ—¢ã«ä¸€æ™‚çš„ã«DETACHã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルをæ’ä¹…çš„ã«DETACHã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ãŸã ã—ã€ä¸€æ—¦ã‚¢ã‚¿ãƒƒãƒãƒãƒƒã‚¯ã—ã¦ã‹ã‚‰å†åº¦æ’ä¹…çš„ã«DETACHã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ + +ã¾ãŸã€DETACHã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを[DROP](../../sql-reference/statements/drop.md#drop-table)ã—ãŸã‚Šã€åŒåã®ãƒ†ãƒ¼ãƒ–ルを[CREATE TABLE](../../sql-reference/statements/create/table.md)ã§ä½œæˆã—ãŸã‚Šã€[RENAME TABLE](../../sql-reference/statements/rename.md)クエリã§ä»–ã®ãƒ†ãƒ¼ãƒ–ルã«ç½®ãæ›ãˆã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +`SYNC`修飾å­ã‚’使用ã™ã‚‹ã¨ã€ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’é…延ãªã実行ã—ã¾ã™ã€‚ + +**例** + +テーブルを作æˆã™ã‚‹: + +クエリ: + +``` sql +CREATE TABLE test ENGINE = Log AS SELECT * FROM numbers(10); +SELECT * FROM test; +``` + +çµæžœ: + +``` text +┌─number─┠+│ 0 │ +│ 1 │ +│ 2 │ +│ 3 │ +│ 4 │ +│ 5 │ +│ 6 │ +│ 7 │ +│ 8 │ +│ 9 │ +└────────┘ +``` + +テーブルをDETACHã™ã‚‹: + +クエリ: + +``` sql +DETACH TABLE test; +SELECT * FROM test; +``` + +çµæžœ: + +``` text +Received exception from server (version 21.4.1): +Code: 60. DB::Exception: Received from localhost:9000. DB::Exception: Table default.test does not exist. +``` + +**関連情報** + +- [Materialized View](../../sql-reference/statements/create/view.md#materialized) +- [Dictionaries](../../sql-reference/dictionaries/index.md) diff --git a/docs/ja/sql-reference/statements/drop.md b/docs/ja/sql-reference/statements/drop.md new file mode 100644 index 00000000000..edab5e0c563 --- /dev/null +++ b/docs/ja/sql-reference/statements/drop.md @@ -0,0 +1,141 @@ +--- +slug: /ja/sql-reference/statements/drop +sidebar_position: 44 +sidebar_label: DROP +--- + +# DROP ステートメント + +既存ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’削除ã—ã¾ã™ã€‚`IF EXISTS` æ¡é …ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå­˜åœ¨ã—ãªã„ã¨ãã«ã“れらã®ã‚¯ã‚¨ãƒªã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã›ã‚“。`SYNC` 修飾å­ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯é…延ãªã削除ã•ã‚Œã¾ã™ã€‚ + +## DROP DATABASE + +`db` データベース内ã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルを削除ã—ã€ãã®å¾Œ `db` データベース自体を削除ã—ã¾ã™ã€‚ + +構文: + +``` sql +DROP DATABASE [IF EXISTS] db [ON CLUSTER cluster] [SYNC] +``` + +## DROP TABLE + +1ã¤ä»¥ä¸Šã®ãƒ†ãƒ¼ãƒ–ルを削除ã—ã¾ã™ã€‚ + +:::tip +テーブルã®å‰Šé™¤ã‚’å…ƒã«æˆ»ã™ã«ã¯ã€[UNDROP TABLE](/docs/ja/sql-reference/statements/undrop.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +構文: + +``` sql +DROP [TEMPORARY] TABLE [IF EXISTS] [IF EMPTY] [db1.]name_1[, [db2.]name_2, ...] [ON CLUSTER cluster] [SYNC] +``` + +制é™äº‹é …: +- `IF EMPTY` æ¡é …ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯ã‚¯ã‚¨ãƒªã‚’å—ã‘å–ã£ãŸãƒ¬ãƒ—リカ上ã§ã®ã¿ãƒ†ãƒ¼ãƒ–ルã®ç©ºã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ +- 複数ã®ãƒ†ãƒ¼ãƒ–ルを一度ã«å‰Šé™¤ã™ã‚‹ã“ã¨ã¯ã€åŽŸå­çš„ãªæ“作ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã¤ã¾ã‚Šã€ã‚るテーブルã®å‰Šé™¤ãŒå¤±æ•—ã—ãŸå ´åˆã€å¾Œç¶šã®ãƒ†ãƒ¼ãƒ–ルã¯å‰Šé™¤ã•ã‚Œã¾ã›ã‚“。 + +## DROP DICTIONARY + +Dictionary を削除ã—ã¾ã™ã€‚ + +構文: + +``` sql +DROP DICTIONARY [IF EXISTS] [db.]name [SYNC] +``` + +## DROP USER + +ユーザーを削除ã—ã¾ã™ã€‚ + +構文: + +``` sql +DROP USER [IF EXISTS] name [,...] [ON CLUSTER cluster_name] [FROM access_storage_type] +``` + +## DROP ROLE + +ロールを削除ã—ã¾ã™ã€‚削除ã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã¯ã€ãã‚ŒãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ãŸã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‹ã‚‰å–り消ã•ã‚Œã¾ã™ã€‚ + +構文: + +``` sql +DROP ROLE [IF EXISTS] name [,...] [ON CLUSTER cluster_name] [FROM access_storage_type] +``` + +## DROP ROW POLICY + +è¡Œãƒãƒªã‚·ãƒ¼ã‚’削除ã—ã¾ã™ã€‚削除ã•ã‚ŒãŸè¡Œãƒãƒªã‚·ãƒ¼ã¯ã€ãã‚ŒãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ãŸã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‹ã‚‰å–り消ã•ã‚Œã¾ã™ã€‚ + +構文: + +``` sql +DROP [ROW] POLICY [IF EXISTS] name [,...] ON [database.]table [,...] [ON CLUSTER cluster_name] [FROM access_storage_type] +``` + +## DROP QUOTA + +クォータを削除ã—ã¾ã™ã€‚削除ã•ã‚ŒãŸã‚¯ã‚©ãƒ¼ã‚¿ã¯ã€ãã‚ŒãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ãŸã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‹ã‚‰å–り消ã•ã‚Œã¾ã™ã€‚ + +構文: + +``` sql +DROP QUOTA [IF EXISTS] name [,...] [ON CLUSTER cluster_name] [FROM access_storage_type] +``` + +## DROP SETTINGS PROFILE + +設定プロファイルを削除ã—ã¾ã™ã€‚削除ã•ã‚ŒãŸè¨­å®šãƒ—ロファイルã¯ã€ãã‚ŒãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ãŸã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‹ã‚‰å–り消ã•ã‚Œã¾ã™ã€‚ + +構文: + +``` sql +DROP [SETTINGS] PROFILE [IF EXISTS] name [,...] [ON CLUSTER cluster_name] [FROM access_storage_type] +``` + +## DROP VIEW + +ビューを削除ã—ã¾ã™ã€‚ビュー㯠`DROP TABLE` コマンドã§ã‚‚削除ã§ãã¾ã™ãŒã€`DROP VIEW` 㯠`[db.]name` ãŒãƒ“ューã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + +構文: + +``` sql +DROP VIEW [IF EXISTS] [db.]name [ON CLUSTER cluster] [SYNC] +``` + +## DROP FUNCTION + +[CREATE FUNCTION](./create/function.md) ã§ä½œæˆã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°ã‚’削除ã—ã¾ã™ã€‚システム関数ã¯å‰Šé™¤ã§ãã¾ã›ã‚“。 + +**構文** + +``` sql +DROP FUNCTION [IF EXISTS] function_name [on CLUSTER cluster] +``` + +**例** + +``` sql +CREATE FUNCTION linear_equation AS (x, k, b) -> k*x + b; +DROP FUNCTION linear_equation; +``` + +## DROP NAMED COLLECTION + +åå‰ä»˜ãコレクションを削除ã—ã¾ã™ã€‚ + +**構文** + +``` sql +DROP NAMED COLLECTION [IF EXISTS] name [on CLUSTER cluster] +``` + +**例** + +``` sql +CREATE NAMED COLLECTION foobar AS a = '1', b = '2'; +DROP NAMED COLLECTION foobar; +``` diff --git a/docs/ja/sql-reference/statements/exchange.md b/docs/ja/sql-reference/statements/exchange.md new file mode 100644 index 00000000000..c05907efe73 --- /dev/null +++ b/docs/ja/sql-reference/statements/exchange.md @@ -0,0 +1,44 @@ +--- +slug: /ja/sql-reference/statements/exchange +sidebar_position: 49 +sidebar_label: EXCHANGE +--- + +# EXCHANGE ステートメント + +2ã¤ã®ãƒ†ãƒ¼ãƒ–ルã¾ãŸã¯Dictionaryã®åå‰ã‚’アトミックã«äº¤æ›ã—ã¾ã™ã€‚ +ã“ã®æ“作ã¯ä¸€æ™‚çš„ãªåå‰ã‚’使用ã—ãŸ[RENAME](./rename.md)クエリã§ã‚‚é”æˆã§ãã¾ã™ãŒã€ãã®å ´åˆæ“作ã¯ã‚¢ãƒˆãƒŸãƒƒã‚¯ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +:::note +`EXCHANGE`クエリã¯[Atomic](../../engines/database-engines/atomic.md)データベースエンジンã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +**構文** + +```sql +EXCHANGE TABLES|DICTIONARIES [db0.]name_A AND [db1.]name_B [ON CLUSTER cluster] +``` + +## EXCHANGE TABLES + +2ã¤ã®ãƒ†ãƒ¼ãƒ–ルã®åå‰ã‚’交æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +EXCHANGE TABLES [db0.]table_A AND [db1.]table_B [ON CLUSTER cluster] +``` + +## EXCHANGE DICTIONARIES + +2ã¤ã®Dictionaryã®åå‰ã‚’交æ›ã—ã¾ã™ã€‚ + +**構文** + +```sql +EXCHANGE DICTIONARIES [db0.]dict_A AND [db1.]dict_B [ON CLUSTER cluster] +``` + +**関連項目** + +- [Dictionary](../../sql-reference/dictionaries/index.md) diff --git a/docs/ja/sql-reference/statements/exists.md b/docs/ja/sql-reference/statements/exists.md new file mode 100644 index 00000000000..f22f76028c6 --- /dev/null +++ b/docs/ja/sql-reference/statements/exists.md @@ -0,0 +1,13 @@ +--- +slug: /ja/sql-reference/statements/exists +sidebar_position: 45 +sidebar_label: EXISTS +--- + +# EXISTS ステートメント + +``` sql +EXISTS [TEMPORARY] [TABLE|DICTIONARY|DATABASE] [db.]name [INTO OUTFILE filename] [FORMAT format] +``` + +ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ `UInt8` åž‹ã®å˜ä¸€ã‚«ãƒ©ãƒ ã‚’è¿”ã—ã¾ã™ã€‚指定ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãƒ†ãƒ¼ãƒ–ルã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯å€¤ `0` ãŒã€å­˜åœ¨ã™ã‚‹å ´åˆã¯å€¤ `1` ãŒæ ¼ç´ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/explain.md b/docs/ja/sql-reference/statements/explain.md new file mode 100644 index 00000000000..2fbc4bcd60f --- /dev/null +++ b/docs/ja/sql-reference/statements/explain.md @@ -0,0 +1,478 @@ +--- +slug: /ja/sql-reference/statements/explain +sidebar_position: 39 +sidebar_label: EXPLAIN +title: "EXPLAIN ステートメント" +--- + +ステートメントã®å®Ÿè¡Œè¨ˆç”»ã‚’表示ã—ã¾ã™ã€‚ + +
    + +
    + +構文: + +```sql +EXPLAIN [AST | SYNTAX | QUERY TREE | PLAN | PIPELINE | ESTIMATE | TABLE OVERRIDE] [setting = value, ...] + [ + SELECT ... | + tableFunction(...) [COLUMNS (...)] [ORDER BY ...] [PARTITION BY ...] [PRIMARY KEY] [SAMPLE BY ...] [TTL ...] + ] + [FORMAT ...] +``` + +例: + +```sql +EXPLAIN SELECT sum(number) FROM numbers(10) UNION ALL SELECT sum(number) FROM numbers(10) ORDER BY sum(number) ASC FORMAT TSV; +``` + +```sql +Union + Expression (Projection) + Expression (Before ORDER BY and SELECT) + Aggregating + Expression (Before GROUP BY) + SettingQuotaAndLimits (Set limits and quota after reading from storage) + ReadFromStorage (SystemNumbers) + Expression (Projection) + MergingSorted (Merge sorted streams for ORDER BY) + MergeSorting (Merge sorted blocks for ORDER BY) + PartialSorting (Sort each block for ORDER BY) + Expression (Before ORDER BY and SELECT) + Aggregating + Expression (Before GROUP BY) + SettingQuotaAndLimits (Set limits and quota after reading from storage) + ReadFromStorage (SystemNumbers) +``` + +## EXPLAIN タイプ + +- `AST` — 抽象構文木。 +- `SYNTAX` — ASTレベルã®æœ€é©åŒ–後ã®ã‚¯ã‚¨ãƒªãƒ†ã‚­ã‚¹ãƒˆã€‚ +- `QUERY TREE` — クエリツリーã®æœ€é©åŒ–後。 +- `PLAN` — クエリ実行計画。 +- `PIPELINE` — クエリ実行パイプライン。 + +### EXPLAIN AST + +クエリASTã®ãƒ€ãƒ³ãƒ—。`SELECT`以外ã®ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—をサãƒãƒ¼ãƒˆã€‚ + +例: + +```sql +EXPLAIN AST SELECT 1; +``` + +```sql +SelectWithUnionQuery (children 1) + ExpressionList (children 1) + SelectQuery (children 1) + ExpressionList (children 1) + Literal UInt64_1 +``` + +```sql +EXPLAIN AST ALTER TABLE t1 DELETE WHERE date = today(); +``` + +```sql + explain + AlterQuery t1 (children 1) + ExpressionList (children 1) + AlterCommand 27 (children 1) + Function equals (children 1) + ExpressionList (children 2) + Identifier date + Function today (children 1) + ExpressionList +``` + +### EXPLAIN SYNTAX + +構文最é©åŒ–後ã®ã‚¯ã‚¨ãƒªã‚’è¿”ã—ã¾ã™ã€‚ + +例: + +```sql +EXPLAIN SYNTAX SELECT * FROM system.numbers AS a, system.numbers AS b, system.numbers AS c; +``` + +```sql +SELECT + `--a.number` AS `a.number`, + `--b.number` AS `b.number`, + number AS `c.number` +FROM +( + SELECT + number AS `--a.number`, + b.number AS `--b.number` + FROM system.numbers AS a + CROSS JOIN system.numbers AS b +) AS `--.s` +CROSS JOIN system.numbers AS c +``` + +### EXPLAIN QUERY TREE + +設定: + +- `run_passes` — クエリツリーパスをã™ã¹ã¦å®Ÿè¡Œã—ã¦ã‹ã‚‰ã‚¯ã‚¨ãƒªãƒ„リーをダンプã—ã¾ã™ã€‚デフォルト: `1`。 +- `dump_passes` — クエリツリーをダンプã™ã‚‹å‰ã«ä½¿ç”¨ã—ãŸãƒ‘ス情報をダンプã—ã¾ã™ã€‚デフォルト: `0`。 +- `passes` — 実行ã™ã‚‹ãƒ‘スã®æ•°ã‚’指定ã—ã¾ã™ã€‚`-1`ã«è¨­å®šã™ã‚‹ã¨ã€ã™ã¹ã¦ã®ãƒ‘スãŒå®Ÿè¡Œã•ã‚Œã¾ã™ã€‚デフォルト: `-1`。 + +例: +```sql +EXPLAIN QUERY TREE SELECT id, value FROM test_table; +``` + +``` +QUERY id: 0 + PROJECTION COLUMNS + id UInt64 + value String + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: id, result_type: UInt64, source_id: 3 + COLUMN id: 4, column_name: value, result_type: String, source_id: 3 + JOIN TREE + TABLE id: 3, table_name: default.test_table +``` + +### EXPLAIN PLAN + +クエリプランステップをダンプã—ã¾ã™ã€‚ + +設定: + +- `header` — ステップã®å‡ºåŠ›ãƒ˜ãƒƒãƒ€ã‚’プリントã—ã¾ã™ã€‚デフォルト: 0。 +- `description` — ステップã®èª¬æ˜Žã‚’プリントã—ã¾ã™ã€‚デフォルト: 1。 +- `indexes` — 使用ã•ã‚Œã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ã€å„インデックスãŒé©ç”¨ã•ã‚ŒãŸã¨ãã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚ŒãŸãƒ‘ーツãŠã‚ˆã³ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã®æ•°ã‚’表示ã—ã¾ã™ã€‚デフォルト: 0。 [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブルã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ +- `actions` — ステップアクションã«é–¢ã™ã‚‹è©³ç´°æƒ…報をプリントã—ã¾ã™ã€‚デフォルト: 0。 +- `json` — クエリプランステップを [JSON](../../interfaces/formats.md#json) å½¢å¼ã®è¡Œã¨ã—ã¦ãƒ—リントã—ã¾ã™ã€‚デフォルト: 0。[TSVRaw](../../interfaces/formats.md#tabseparatedraw) å½¢å¼ã‚’使用ã™ã‚‹ã¨ä¸è¦ãªã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã‚’é¿ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +例: + +```sql +EXPLAIN SELECT sum(number) FROM numbers(10) GROUP BY number % 4; +``` + +```sql +Union + Expression (Projection) + Expression (Before ORDER BY and SELECT) + Aggregating + Expression (Before GROUP BY) + SettingQuotaAndLimits (Set limits and quota after reading from storage) + ReadFromStorage (SystemNumbers) +``` + +:::note +ステップãŠã‚ˆã³ã‚¯ã‚¨ãƒªã‚³ã‚¹ãƒˆã®æŽ¨å®šã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: + +`json = 1`ã®ã¨ãã€ã‚¯ã‚¨ãƒªãƒ—ランã¯JSONå½¢å¼ã§è¡¨ç¾ã•ã‚Œã¾ã™ã€‚å„ノードã¯å¸¸ã« `Node Type` 㨠`Plans` ã¨ã„ã†ã‚­ãƒ¼ã‚’æŒã¤Dictionaryã§ã™ã€‚`Node Type`ã¯ã‚¹ãƒ†ãƒƒãƒ—åã‚’æŒã¤æ–‡å­—列ã§ã™ã€‚`Plans`ã¯å­ã‚¹ãƒ†ãƒƒãƒ—ã®èª¬æ˜Žã‚’å«ã‚€é…列ã§ã™ã€‚ä»–ã®ã‚ªãƒ—ションã®ã‚­ãƒ¼ã¯ã€ãƒŽãƒ¼ãƒ‰ã‚¿ã‚¤ãƒ—ã¨è¨­å®šã«å¿œã˜ã¦è¿½åŠ ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +例: + +```sql +EXPLAIN json = 1, description = 0 SELECT 1 UNION ALL SELECT 2 FORMAT TSVRaw; +``` + +```json +[ + { + "Plan": { + "Node Type": "Union", + "Plans": [ + { + "Node Type": "Expression", + "Plans": [ + { + "Node Type": "SettingQuotaAndLimits", + "Plans": [ + { + "Node Type": "ReadFromStorage" + } + ] + } + ] + }, + { + "Node Type": "Expression", + "Plans": [ + { + "Node Type": "SettingQuotaAndLimits", + "Plans": [ + { + "Node Type": "ReadFromStorage" + } + ] + } + ] + } + ] + } + } +] +``` + +`description` = 1 ã®å ´åˆã€`Description` キーãŒã‚¹ãƒ†ãƒƒãƒ—ã«è¿½åŠ ã•ã‚Œã¾ã™: + +```json +{ + "Node Type": "ReadFromStorage", + "Description": "SystemOne" +} +``` + +`header` = 1 ã®å ´åˆã€`Header` キーãŒã‚«ãƒ©ãƒ ã®é…列ã¨ã—ã¦ã‚¹ãƒ†ãƒƒãƒ—ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +例: + +```sql +EXPLAIN json = 1, description = 0, header = 1 SELECT 1, 2 + dummy; +``` + +```json +[ + { + "Plan": { + "Node Type": "Expression", + "Header": [ + { + "Name": "1", + "Type": "UInt8" + }, + { + "Name": "plus(2, dummy)", + "Type": "UInt16" + } + ], + "Plans": [ + { + "Node Type": "SettingQuotaAndLimits", + "Header": [ + { + "Name": "dummy", + "Type": "UInt8" + } + ], + "Plans": [ + { + "Node Type": "ReadFromStorage", + "Header": [ + { + "Name": "dummy", + "Type": "UInt8" + } + ] + } + ] + } + ] + } + } +] +``` + +`indexes` = 1 ã®å ´åˆã€`Indexes` キーãŒè¿½åŠ ã•ã‚Œã¾ã™ã€‚使用ã•ã‚Œã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®é…列ãŒå«ã¾ã‚Œã¾ã™ã€‚å„インデックス㯠`Type` キー (文字列 `MinMax`ã€`Partition`ã€`PrimaryKey`ã€ã¾ãŸã¯ `Skip`) ã¨ã‚ªãƒ—ションã®ã‚­ãƒ¼ã‚’æŒã¤JSONã§è¨˜è¿°ã•ã‚Œã¾ã™: + +- `Name` — インデックスå (`Skip` インデックスã§ã®ã¿ä½¿ç”¨ã•ã‚Œã¾ã™)。 +- `Keys` — インデックスã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã®é…列。 +- `Condition` — 使用ã•ã‚Œã‚‹æ¡ä»¶ã€‚ +- `Description` — インデックスã®èª¬æ˜Ž (`Skip` インデックスã§ã®ã¿ä½¿ç”¨ã•ã‚Œã¾ã™)。 +- `Parts` — インデックスé©ç”¨å‰/後ã®ãƒ‘ーツ数。 +- `Granules` — インデックスé©ç”¨å‰/後ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«æ•°ã€‚ + +例: + +```json +"Node Type": "ReadFromMergeTree", +"Indexes": [ + { + "Type": "MinMax", + "Keys": ["y"], + "Condition": "(y in [1, +inf))", + "Parts": 5/4, + "Granules": 12/11 + }, + { + "Type": "Partition", + "Keys": ["y", "bitAnd(z, 3)"], + "Condition": "and((bitAnd(z, 3) not in [1, 1]), and((y in [1, +inf)), (bitAnd(z, 3) not in [1, 1])))", + "Parts": 4/3, + "Granules": 11/10 + }, + { + "Type": "PrimaryKey", + "Keys": ["x", "y"], + "Condition": "and((x in [11, +inf)), (y in [1, +inf)))", + "Parts": 3/2, + "Granules": 10/6 + }, + { + "Type": "Skip", + "Name": "t_minmax", + "Description": "minmax GRANULARITY 2", + "Parts": 2/1, + "Granules": 6/2 + }, + { + "Type": "Skip", + "Name": "t_set", + "Description": "set GRANULARITY 2", + "": 1/1, + "Granules": 2/1 + } +] +``` + +`actions` = 1 ã®å ´åˆã€è¿½åŠ ã•ã‚Œã‚‹ã‚­ãƒ¼ã¯ã‚¹ãƒ†ãƒƒãƒ—ã®ã‚¿ã‚¤ãƒ—ã«ã‚ˆã‚Šã¾ã™ã€‚ + +例: + +```sql +EXPLAIN json = 1, actions = 1, description = 0 SELECT 1 FORMAT TSVRaw; +``` + +```json +[ + { + "Plan": { + "Node Type": "Expression", + "Expression": { + "Inputs": [], + "Actions": [ + { + "Node Type": "Column", + "Result Type": "UInt8", + "Result Type": "Column", + "Column": "Const(UInt8)", + "Arguments": [], + "Removed Arguments": [], + "Result": 0 + } + ], + "Outputs": [ + { + "Name": "1", + "Type": "UInt8" + } + ], + "Positions": [0], + "Project Input": true + }, + "Plans": [ + { + "Node Type": "SettingQuotaAndLimits", + "Plans": [ + { + "Node Type": "ReadFromStorage" + } + ] + } + ] + } + } +] +``` + +### EXPLAIN PIPELINE + +設定: + +- `header` — å„出力ãƒãƒ¼ãƒˆã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’プリントã—ã¾ã™ã€‚デフォルト: 0。 +- `graph` — [DOT](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) グラフ記述言語ã§è¨˜è¿°ã•ã‚ŒãŸã‚°ãƒ©ãƒ•ã‚’プリントã—ã¾ã™ã€‚デフォルト: 0。 +- `compact` — `graph` 設定ãŒæœ‰åŠ¹ãªå ´åˆã«ã‚³ãƒ³ãƒ‘クトモードã§ã‚°ãƒ©ãƒ•ã‚’プリントã—ã¾ã™ã€‚デフォルト: 1。 + +例: + +```sql +EXPLAIN PIPELINE SELECT sum(number) FROM numbers_mt(100000) GROUP BY number % 4; +``` + +```sql +(Union) +(Expression) +ExpressionTransform + (Expression) + ExpressionTransform + (Aggregating) + Resize 2 → 1 + AggregatingTransform × 2 + (Expression) + ExpressionTransform × 2 + (SettingQuotaAndLimits) + (ReadFromStorage) + NumbersRange × 2 0 → 1 +``` +### EXPLAIN ESTIMATE + +クエリを処ç†ã™ã‚‹éš›ã«ã€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å–ã‚‹è¡Œã€ãƒžãƒ¼ã‚¯ã€ãŠã‚ˆã³ãƒ‘ーツã®æŽ¨å®šæ•°ã‚’表示ã—ã¾ã™ã€‚[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md#table_engines-mergetree) ファミリーã®ãƒ†ãƒ¼ãƒ–ルã§å‹•ä½œã—ã¾ã™ã€‚ + +**例** + +テーブルを作æˆ: + +```sql +CREATE TABLE ttt (i Int64) ENGINE = MergeTree() ORDER BY i SETTINGS index_granularity = 16, write_final_mark = 0; +INSERT INTO ttt SELECT number FROM numbers(128); +OPTIMIZE TABLE ttt; +``` + +クエリ: + +```sql +EXPLAIN ESTIMATE SELECT * FROM ttt; +``` + +çµæžœ: + +```text +┌─database─┬─table─┬─parts─┬─rows─┬─marks─┠+│ default │ ttt │ 1 │ 128 │ 8 │ +└──────────┴───────┴───────┴──────┴───────┘ +``` + +### EXPLAIN TABLE OVERRIDE + +テーブル関数を介ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルスキーマã«å¯¾ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルオーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã®çµæžœã‚’表示ã—ã¾ã™ã€‚ã¾ãŸã€ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ãŒä½•ã‚‰ã‹ã®å¤±æ•—を引ãèµ·ã“ã™å ´åˆã«ä¾‹å¤–をスローã—ã¦ã€ã„ãã¤ã‹ã®æ¤œè¨¼ã‚’è¡Œã„ã¾ã™ã€‚ + +**例** + +リモートMySQLテーブルãŒä»¥ä¸‹ã®ã‚ˆã†ã«ã‚ã‚‹ã¨ã—ã¾ã™: + +```sql +CREATE TABLE db.tbl ( + id INT PRIMARY KEY, + created DATETIME DEFAULT now() +) +``` + +```sql +EXPLAIN TABLE OVERRIDE mysql('127.0.0.1:3306', 'db', 'tbl', 'root', 'clickhouse') +PARTITION BY toYYYYMM(assumeNotNull(created)) +``` + +çµæžœ: + +```text +┌─explain─────────────────────────────────────────────────┠+│ PARTITION BY uses columns: `created` Nullable(DateTime) │ +└─────────────────────────────────────────────────────────┘ +``` + +:::note +検証ã¯å®Œå…¨ã§ã¯ãªã„ãŸã‚ã€æˆåŠŸã—ãŸã‚¯ã‚¨ãƒªã§ã‚ã£ã¦ã‚‚オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ãŒå•é¡Œã‚’引ãèµ·ã“ã•ãªã„ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 +::: diff --git a/docs/ja/sql-reference/statements/grant.md b/docs/ja/sql-reference/statements/grant.md new file mode 100644 index 00000000000..1d02bd93a8f --- /dev/null +++ b/docs/ja/sql-reference/statements/grant.md @@ -0,0 +1,603 @@ +--- +slug: /ja/sql-reference/statements/grant +sidebar_position: 38 +sidebar_label: GRANT +--- + +# GRANT ステートメント + +- ClickHouseユーザーアカウントã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã«[権é™](#privileges)を付与ã—ã¾ã™ã€‚ +- ユーザーアカウントã«ãƒ­ãƒ¼ãƒ«ã‚’割り当ã¦ãŸã‚Šã€ä»–ã®ãƒ­ãƒ¼ãƒ«ã«å‰²ã‚Šå½“ã¦ãŸã‚Šã—ã¾ã™ã€‚ + +権é™ã‚’å–り消ã™ã«ã¯ã€[REVOKE](../../sql-reference/statements/revoke.md)ステートメントを使用ã—ã¾ã™ã€‚ã¾ãŸã€[SHOW GRANTS](../../sql-reference/statements/show.md#show-grants)ステートメントを使用ã—ã¦ä»˜ä¸Žã•ã‚ŒãŸæ¨©é™ã‚’一覧表示ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## 権é™ã®ä»˜ä¸Žæ§‹æ–‡ + +``` sql +GRANT [ON CLUSTER cluster_name] privilege[(column_name [,...])] [,...] ON {db.table[*]|db[*].*|*.*|table[*]|*} TO {user | role | CURRENT_USER} [,...] [WITH GRANT OPTION] [WITH REPLACE OPTION] +``` + +- `privilege` — 権é™ã®ç¨®é¡žã€‚ +- `role` — ClickHouseユーザーロール。 +- `user` — ClickHouseユーザーアカウント。 + +`WITH GRANT OPTION`å¥ã¯ã€`user`ã¾ãŸã¯`role`ã«`GRANT`クエリを実行ã™ã‚‹æ¨©é™ã‚’付与ã—ã¾ã™ã€‚ユーザーã¯è‡ªåˆ†ãŒæŒã¤ç¯„囲ã¨ãれ以下ã®æ¨©é™ã‚’付与ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`WITH REPLACE OPTION`å¥ã¯ã€æŒ‡å®šã—ãªã„å ´åˆã€æ–°ã—ã„権é™ã§å¤ã„権é™ã‚’`user`ã¾ãŸã¯`role`ã«ç½®æ›ã—ã€ä»˜ä¸Žã•ã‚Œã‚‹æ¨©é™ã‚’追加ã—ã¾ã™ã€‚ + +## ロールを割り当ã¦ã‚‹æ§‹æ–‡ + +``` sql +GRANT [ON CLUSTER cluster_name] role [,...] TO {user | another_role | CURRENT_USER} [,...] [WITH ADMIN OPTION] [WITH REPLACE OPTION] +``` + +- `role` — ClickHouseユーザーロール。 +- `user` — ClickHouseユーザーアカウント。 + +`WITH ADMIN OPTION`å¥ã¯ã€`user`ã¾ãŸã¯`role`ã«[ADMIN OPTION](#admin-option)権é™ã‚’付与ã—ã¾ã™ã€‚`WITH REPLACE OPTION`å¥ã¯ã€æŒ‡å®šã—ãªã„å ´åˆã€æ–°ã—ã„ロールã§å¤ã„ロールを`user`ã¾ãŸã¯`role`ã«ç½®æ›ã—ã€è¿½åŠ ã—ã¾ã™ã€‚ + +## ç¾åœ¨ã®æ¨©é™ã‚’付与ã™ã‚‹æ§‹æ–‡ +``` sql +GRANT CURRENT GRANTS{(privilege[(column_name [,...])] [,...] ON {db.table|db.*|*.*|table|*}) | ON {db.table|db.*|*.*|table|*}} TO {user | role | CURRENT_USER} [,...] [WITH GRANT OPTION] [WITH REPLACE OPTION] +``` + +- `privilege` — 権é™ã®ç¨®é¡žã€‚ +- `role` — ClickHouseユーザーロール。 +- `user` — ClickHouseユーザーアカウント。 + +`CURRENT GRANTS`ステートメントを使用ã™ã‚‹ã¨ã€æŒ‡å®šã—ãŸå…¨ã¦ã®æ¨©é™ã‚’ユーザーã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã«ä»˜ä¸Žã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚権é™ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€æŒ‡å®šã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã¯`CURRENT_USER`ã®åˆ©ç”¨å¯èƒ½ãªã™ã¹ã¦ã®æ¨©é™ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚ + +## 使用法 + +`GRANT`を使用ã™ã‚‹ãŸã‚ã«ã¯ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«`GRANT OPTION`権é™ãŒå¿…è¦ã§ã™ã€‚自分ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆæ¨©é™ã®ç¯„囲内ã§ã®ã¿æ¨©é™ã‚’付与ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ç®¡ç†è€…ãŒ`john`アカウントã«æ¬¡ã®ã‚¯ã‚¨ãƒªã§æ¨©é™ã‚’付与ã—ãŸã¨ã—ã¾ã™ï¼š + +``` sql +GRANT SELECT(x,y) ON db.table TO john WITH GRANT OPTION +``` + +ã“ã‚Œã¯ã€`john`ãŒæ¬¡ã®æ“作を行ã†ãŸã‚ã®è¨±å¯ã‚’å—ã‘ãŸã“ã¨ã‚’æ„味ã—ã¾ã™ï¼š + +- `SELECT x,y FROM db.table` +- `SELECT x FROM db.table` +- `SELECT y FROM db.table` + +`john`ã¯`SELECT z FROM db.table`を実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã¾ãŸã€`SELECT * FROM db.table`も利用ã§ãã¾ã›ã‚“。ã“ã®ã‚¯ã‚¨ãƒªã‚’処ç†ã™ã‚‹éš›ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã•ãšã€`x`ã‚„`y`ã‚‚è¿”ã•ã‚Œã¾ã›ã‚“。唯一ã®ä¾‹å¤–ã¯ãƒ†ãƒ¼ãƒ–ルãŒ`x`ã¨`y`カラムã®ã¿ã‚’å«ã‚€å ´åˆã§ã‚ã‚Šã€ã“ã®å ´åˆã€ClickHouseã¯ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ã€‚ + +ã¾ãŸã€`john`ã¯`GRANT OPTION`権é™ã‚’æŒã£ã¦ã„ã‚‹ãŸã‚ã€ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦åŒã˜ã¾ãŸã¯å°‘ãªã„範囲ã®æ¨©é™ã‚’付与ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`system`データベースã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯å¸¸ã«è¨±å¯ã•ã‚Œã¦ã„ã¾ã™ï¼ˆã‚¯ã‚¨ãƒªå‡¦ç†ã®ãŸã‚ã«ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼‰ã€‚ + +1ã¤ã®ã‚¯ã‚¨ãƒªã§è¤‡æ•°ã®æ¨©é™ã‚’複数ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«ä»˜ä¸Žã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚クエリ`GRANT SELECT, INSERT ON *.* TO john, robin`ã¯ã€`john`ãŠã‚ˆã³`robin`アカウントãŒã‚µãƒ¼ãƒãƒ¼ä¸Šã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦`INSERT`ãŠã‚ˆã³`SELECT`クエリを実行ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +## ワイルドカード付与 + +権é™ã‚’指定ã™ã‚‹éš›ã«ã€ãƒ†ãƒ¼ãƒ–ルã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã®ä»£ã‚ã‚Šã«ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ï¼ˆ`*`)を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€`GRANT SELECT ON db.* TO john`クエリã¯`john`ãŒ`db`データベース内ã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦`SELECT`クエリを実行ã§ãるよã†ã«ã—ã¾ã™ã€‚ã¾ãŸã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã‚’çœç•¥ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«å¯¾ã—ã¦æ¨©é™ãŒä»˜ä¸Žã•ã‚Œã¾ã™ã€‚例ãˆã°ã€`GRANT SELECT ON * TO john`ã¯ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹æ¨©é™ã‚’付与ã—ã€`GRANT SELECT ON mytable TO john`ã¯ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®`mytable`テーブルã«å¯¾ã™ã‚‹æ¨©é™ã‚’付与ã—ã¾ã™ã€‚ + +:::note +以下ã§èª¬æ˜Žã™ã‚‹æ©Ÿèƒ½ã¯ClickHouseã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³24.10ã‹ã‚‰åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ +::: + +テーブルã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã®æœ«å°¾ã«ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ã‚’付ã‘ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ‘スã®æŠ½è±¡çš„ãªãƒ—レフィックスã«å¯¾ã—ã¦æ¨©é™ã‚’付与ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例:`GRANT SELECT ON db.my_tables* TO john`。ã“ã®ã‚¯ã‚¨ãƒªã¯ã€`db`データベースã®ã™ã¹ã¦ã®`my_tables`プレフィックスをæŒã¤ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦`john`ãŒ`SELECT`クエリを実行ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +ã‚‚ã£ã¨ä¾‹ã‚’挙ã’ã‚‹ã¨ï¼š + +`GRANT SELECT ON db.my_tables* TO john` +```sql +SELECT * FROM db.my_tables -- granted +SELECT * FROM db.my_tables_0 -- granted +SELECT * FROM db.my_tables_1 -- granted + +SELECT * FROM db.other_table -- not_granted +SELECT * FROM db2.my_tables -- not_granted +``` + +`GRANT SELECT ON db*.* TO john` +```sql +SELECT * FROM db.my_tables -- granted +SELECT * FROM db.my_tables_0 -- granted +SELECT * FROM db.my_tables_1 -- granted +SELECT * FROM db.other_table -- granted +SELECT * FROM db2.my_tables -- granted +``` + +付与ã•ã‚ŒãŸãƒ‘ス内ã®æ–°ã—ã作æˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯ã™ã¹ã¦ã€è¦ªã‹ã‚‰ã™ã¹ã¦ã®æ¨©é™ã‚’自動的ã«ç¶™æ‰¿ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€`GRANT SELECT ON db.* TO john`クエリを実行ã—ã€ãã®å¾Œæ–°ã—ã„テーブル`db.new_table`を作æˆã—ãŸå ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼`john`ã¯`SELECT * FROM db.new_table`クエリを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +プレフィックスã®ã¿ã«å¯¾ã—ã¦ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ã‚’指定ã§ãã¾ã™ï¼š +```sql +GRANT SELECT ON db.* TO john -- correct +GRANT SELECT ON db*.* TO john -- correct + +GRANT SELECT ON *.my_table TO john -- wrong +GRANT SELECT ON foo*bar TO john -- wrong +GRANT SELECT ON *suffix TO john -- wrong +GRANT SELECT(foo) ON db.table* TO john -- wrong +``` + +## æ¨©é™ + +権é™ã¨ã¯ã€ç‰¹å®šã®ç¨®é¡žã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹è¨±å¯ã§ã™ã€‚ + +権é™ã«ã¯éšŽå±¤çš„構造ãŒã‚ã‚Šã¾ã™ã€‚許å¯ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã®ã‚»ãƒƒãƒˆã¯æ¨©é™ã®ã‚¹ã‚³ãƒ¼ãƒ—ã«ä¾å­˜ã—ã¾ã™ã€‚ + +権é™ã®éšŽå±¤: + +- [SELECT](#select) +- [INSERT](#insert) +- [ALTER](#alter) + - `ALTER TABLE` + - `ALTER UPDATE` + - `ALTER DELETE` + - `ALTER COLUMN` + - `ALTER ADD COLUMN` + - `ALTER DROP COLUMN` + - `ALTER MODIFY COLUMN` + - `ALTER COMMENT COLUMN` + - `ALTER CLEAR COLUMN` + - `ALTER RENAME COLUMN` + - `ALTER INDEX` + - `ALTER ORDER BY` + - `ALTER SAMPLE BY` + - `ALTER ADD INDEX` + - `ALTER DROP INDEX` + - `ALTER MATERIALIZE INDEX` + - `ALTER CLEAR INDEX` + - `ALTER CONSTRAINT` + - `ALTER ADD CONSTRAINT` + - `ALTER DROP CONSTRAINT` + - `ALTER TTL` + - `ALTER MATERIALIZE TTL` + - `ALTER SETTINGS` + - `ALTER MOVE PARTITION` + - `ALTER FETCH PARTITION` + - `ALTER FREEZE PARTITION` + - `ALTER VIEW` + - `ALTER VIEW REFRESH` + - `ALTER VIEW MODIFY QUERY` + - `ALTER VIEW MODIFY SQL SECURITY` +- [CREATE](#create) + - `CREATE DATABASE` + - `CREATE TABLE` + - `CREATE ARBITRARY TEMPORARY TABLE` + - `CREATE TEMPORARY TABLE` + - `CREATE VIEW` + - `CREATE DICTIONARY` + - `CREATE FUNCTION` +- [DROP](#drop) + - `DROP DATABASE` + - `DROP TABLE` + - `DROP VIEW` + - `DROP DICTIONARY` + - `DROP FUNCTION` +- [TRUNCATE](#truncate) +- [OPTIMIZE](#optimize) +- [SHOW](#show) + - `SHOW DATABASES` + - `SHOW TABLES` + - `SHOW COLUMNS` + - `SHOW DICTIONARIES` +- [KILL QUERY](#kill-query) +- [ACCESS MANAGEMENT](#access-management) + - `CREATE USER` + - `ALTER USER` + - `DROP USER` + - `CREATE ROLE` + - `ALTER ROLE` + - `DROP ROLE` + - `CREATE ROW POLICY` + - `ALTER ROW POLICY` + - `DROP ROW POLICY` + - `CREATE QUOTA` + - `ALTER QUOTA` + - `DROP QUOTA` + - `CREATE SETTINGS PROFILE` + - `ALTER SETTINGS PROFILE` + - `DROP SETTINGS PROFILE` + - `SHOW ACCESS` + - `SHOW_USERS` + - `SHOW_ROLES` + - `SHOW_ROW_POLICIES` + - `SHOW_QUOTAS` + - `SHOW_SETTINGS_PROFILES` + - `ROLE ADMIN` +- [SYSTEM](#system) + - `SYSTEM SHUTDOWN` + - `SYSTEM DROP CACHE` + - `SYSTEM DROP DNS CACHE` + - `SYSTEM DROP MARK CACHE` + - `SYSTEM DROP UNCOMPRESSED CACHE` + - `SYSTEM RELOAD` + - `SYSTEM RELOAD CONFIG` + - `SYSTEM RELOAD DICTIONARY` + - `SYSTEM RELOAD EMBEDDED DICTIONARIES` + - `SYSTEM RELOAD FUNCTION` + - `SYSTEM RELOAD FUNCTIONS` + - `SYSTEM MERGES` + - `SYSTEM TTL MERGES` + - `SYSTEM FETCHES` + - `SYSTEM MOVES` + - `SYSTEM SENDS` + - `SYSTEM DISTRIBUTED SENDS` + - `SYSTEM REPLICATED SENDS` + - `SYSTEM REPLICATION QUEUES` + - `SYSTEM SYNC REPLICA` + - `SYSTEM RESTART REPLICA` + - `SYSTEM FLUSH` + - `SYSTEM FLUSH DISTRIBUTED` + - `SYSTEM FLUSH LOGS` + - `CLUSTER`(`access_control_improvements.on_cluster_queries_require_cluster_grant`構æˆæŒ‡ä»¤ã‚‚å‚照) +- [INTROSPECTION](#introspection) + - `addressToLine` + - `addressToLineWithInlines` + - `addressToSymbol` + - `demangle` +- [SOURCES](#sources) + - `AZURE` + - `FILE` + - `HDFS` + - `HIVE` + - `JDBC` + - `KAFKA` + - `MONGO` + - `MYSQL` + - `NATS` + - `ODBC` + - `POSTGRES` + - `RABBITMQ` + - `REDIS` + - `REMOTE` + - `S3` + - `SQLITE` + - `URL` +- [dictGet](#dictget) +- [displaySecretsInShowAndSelect](#displaysecretsinshowandselect) +- [NAMED COLLECTION ADMIN](#named-collection-admin) + - `CREATE NAMED COLLECTION` + - `DROP NAMED COLLECTION` + - `ALTER NAMED COLLECTION` + - `SHOW NAMED COLLECTIONS` + - `SHOW NAMED COLLECTIONS SECRETS` + - `NAMED COLLECTION` +- [TABLE ENGINE](#table-engine) + +ã“ã®éšŽå±¤ãŒã©ã®ã‚ˆã†ã«æ‰±ã‚れるã‹ã®ä¾‹: + +- `ALTER`権é™ã¯ä»–ã®ã™ã¹ã¦ã®`ALTER*`権é™ã‚’å«ã¿ã¾ã™ã€‚ +- `ALTER CONSTRAINT`ã«ã¯ã€`ALTER ADD CONSTRAINT`ãŠã‚ˆã³`ALTER DROP CONSTRAINT`権é™ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +権é™ã¯ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã§é©ç”¨ã•ã‚Œã¾ã™ã€‚レベルを知るã“ã¨ã¯ã€æ¨©é™ã®ãŸã‚ã«åˆ©ç”¨å¯èƒ½ãªæ§‹æ–‡ã‚’示唆ã—ã¾ã™ã€‚ + +レベル(低ã„é †ã‹ã‚‰é«˜ã„順): + +- `COLUMN` — カラムã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ã¾ãŸã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã«æ¨©é™ã‚’付与ã§ãã¾ã™ã€‚ +- `TABLE` — テーブルã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ã¾ãŸã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã«æ¨©é™ã‚’付与ã§ãã¾ã™ã€‚ +- `VIEW` — ビューã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ã¾ãŸã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã«æ¨©é™ã‚’付与ã§ãã¾ã™ã€‚ +- `DICTIONARY` — Dictionaryã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ã¾ãŸã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã«æ¨©é™ã‚’付与ã§ãã¾ã™ã€‚ +- `DATABASE` — データベースã¾ãŸã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã«æ¨©é™ã‚’付与ã§ãã¾ã™ã€‚ +- `GLOBAL` — グローãƒãƒ«ã«ã®ã¿æ¨©é™ã‚’付与ã§ãã¾ã™ã€‚ +- `GROUP` — ç•°ãªã‚‹ãƒ¬ãƒ™ãƒ«ã®æ¨©é™ã‚’グループ化ã—ã¾ã™ã€‚`GROUP`レベルã®æ¨©é™ãŒä»˜ä¸Žã•ã‚Œã‚‹ã¨ã€ä½¿ç”¨ã•ã‚ŒãŸæ§‹æ–‡ã«å¯¾å¿œã™ã‚‹ã‚°ãƒ«ãƒ¼ãƒ—ã‹ã‚‰ã®æ¨©é™ã®ã¿ãŒä»˜ä¸Žã•ã‚Œã¾ã™ã€‚ + +許å¯ã•ã‚Œã‚‹æ§‹æ–‡ã®ä¾‹ï¼š + +- `GRANT SELECT(x) ON db.table TO user` +- `GRANT SELECT ON db.* TO user` + +許å¯ã•ã‚Œãªã„構文ã®ä¾‹ï¼š + +- `GRANT CREATE USER(x) ON db.table TO user` +- `GRANT CREATE USER ON db.* TO user` + +特別ãªæ¨©é™[ALL](#all)ã¯ã€å…¨ã¦ã®æ¨©é™ã‚’ユーザーアカウントã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã«ä»˜ä¸Žã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã«ã¯æ¨©é™ãŒã‚ã‚Šã¾ã›ã‚“。 + +ユーザーã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ãŒæ¨©é™ã‚’æŒãŸãªã„å ´åˆã€[NONE](#none)権é™ã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +ã„ãã¤ã‹ã®ã‚¯ã‚¨ãƒªã¯ãã®å®Ÿè£…上ã€æ¨©é™ã®ã‚»ãƒƒãƒˆã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€[RENAME](../../sql-reference/statements/optimize.md)クエリを実行ã™ã‚‹ã«ã¯ã€`SELECT`ã€`CREATE TABLE`ã€`INSERT`ã€ãŠã‚ˆã³`DROP TABLE`権é™ãŒå¿…è¦ã§ã™ã€‚ + +### SELECT + +[SELECT](../../sql-reference/statements/select/index.md)クエリã®å®Ÿè¡Œã‚’許å¯ã—ã¾ã™ã€‚ + +権é™ãƒ¬ãƒ™ãƒ«ï¼š`COLUMN`。 + +**説明** + +ã“ã®æ¨©é™ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦`SELECT`クエリを実行ã§ãã¾ã™ã€‚ユーザーãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„カラムをå«ã‚ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªã¯ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã›ã‚“。 + +以下ã®æ¨©é™ã‚’考慮ã—ã¦ãã ã•ã„: + +``` sql +GRANT SELECT(x,y) ON db.table TO john +``` + +ã“ã®æ¨©é™ã¯ã€`john`ãŒ`db.table`ã®`x`ãŠã‚ˆã³/ã¾ãŸã¯`y`カラムã«é–¢ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ä»»æ„ã®`SELECT`クエリを実行ã§ãるよã†ã«ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€`SELECT x FROM db.table`。`john`ã¯`SELECT z FROM db.table`を実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。`SELECT * FROM db.table`も利用ã§ãã¾ã›ã‚“。ã“ã®ã‚¯ã‚¨ãƒªã‚’処ç†ã™ã‚‹éš›ã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã•ãšã€`x`ã‚„`y`ã‚‚è¿”ã•ã‚Œã¾ã›ã‚“。唯一ã®ä¾‹å¤–ã¯ãƒ†ãƒ¼ãƒ–ルãŒ`x`ã¨`y`カラムã®ã¿ã‚’å«ã‚€å ´åˆã§ã‚ã‚Šã€ã“ã®å ´åˆã€ClickHouseã¯ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ã€‚ + +### INSERT + +[INSERT](../../sql-reference/statements/insert-into.md)クエリã®å®Ÿè¡Œã‚’許å¯ã—ã¾ã™ã€‚ + +権é™ãƒ¬ãƒ™ãƒ«ï¼š`COLUMN`。 + +**説明** + +ã“ã®æ¨©é™ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦`INSERT`クエリを実行ã§ãã¾ã™ã€‚ユーザーãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„カラムをå«ã‚ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªã¯ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã›ã‚“。 + +**例** + +``` sql +GRANT INSERT(x,y) ON db.table TO john +``` + +付与ã•ã‚ŒãŸæ¨©é™ã¯ã€`john`ãŒ`db.table`ã®`x`ãŠã‚ˆã³/ã¾ãŸã¯`y`カラムã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +### ALTER + +[ALTER](../../sql-reference/statements/alter/index.md)クエリã®å®Ÿè¡Œã‚’ã€ä»¥ä¸‹ã®æ¨©é™ã®éšŽå±¤ã«å¾“ã£ã¦è¨±å¯ã—ã¾ã™ï¼š + +- `ALTER`. レベル: `COLUMN`. + - `ALTER TABLE`. レベル: `GROUP` + - `ALTER UPDATE`. レベル: `COLUMN`. 別å: `UPDATE` + - `ALTER DELETE`. レベル: `COLUMN`. 別å: `DELETE` + - `ALTER COLUMN`. レベル: `GROUP` + - `ALTER ADD COLUMN`. レベル: `COLUMN`. 別å: `ADD COLUMN` + - `ALTER DROP COLUMN`. レベル: `COLUMN`. 別å: `DROP COLUMN` + - `ALTER MODIFY COLUMN`. レベル: `COLUMN`. 別å: `MODIFY COLUMN` + - `ALTER COMMENT COLUMN`. レベル: `COLUMN`. 別å: `COMMENT COLUMN` + - `ALTER CLEAR COLUMN`. レベル: `COLUMN`. 別å: `CLEAR COLUMN` + - `ALTER RENAME COLUMN`. レベル: `COLUMN`. 別å: `RENAME COLUMN` + - `ALTER INDEX`. レベル: `GROUP`. 別å: `INDEX` + - `ALTER ORDER BY`. レベル: `TABLE`. 別å: `ALTER MODIFY ORDER BY`, `MODIFY ORDER BY` + - `ALTER SAMPLE BY`. レベル: `TABLE`. 別å: `ALTER MODIFY SAMPLE BY`, `MODIFY SAMPLE BY` + - `ALTER ADD INDEX`. レベル: `TABLE`. 別å: `ADD INDEX` + - `ALTER DROP INDEX`. レベル: `TABLE`. 別å: `DROP INDEX` + - `ALTER MATERIALIZE INDEX`. レベル: `TABLE`. 別å: `MATERIALIZE INDEX` + - `ALTER CLEAR INDEX`. レベル: `TABLE`. 別å: `CLEAR INDEX` + - `ALTER CONSTRAINT`. レベル: `GROUP`. 別å: `CONSTRAINT` + - `ALTER ADD CONSTRAINT`. レベル: `TABLE`. 別å: `ADD CONSTRAINT` + - `ALTER DROP CONSTRAINT`. レベル: `TABLE`. 別å: `DROP CONSTRAINT` + - `ALTER TTL`. レベル: `TABLE`. 別å: `ALTER MODIFY TTL`, `MODIFY TTL` + - `ALTER MATERIALIZE TTL`. レベル: `TABLE`. 別å: `MATERIALIZE TTL` + - `ALTER SETTINGS`. レベル: `TABLE`. 別å: `ALTER SETTING`, `ALTER MODIFY SETTING`, `MODIFY SETTING` + - `ALTER MOVE PARTITION`. レベル: `TABLE`. 別å: `ALTER MOVE PART`, `MOVE PARTITION`, `MOVE PART` + - `ALTER FETCH PARTITION`. レベル: `TABLE`. 別å: `ALTER FETCH PART`, `FETCH PARTITION`, `FETCH PART` + - `ALTER FREEZE PARTITION`. レベル: `TABLE`. 別å: `FREEZE PARTITION` + - `ALTER VIEW` レベル: `GROUP` + - `ALTER VIEW REFRESH`. レベル: `VIEW`. 別å: `ALTER LIVE VIEW REFRESH`, `REFRESH VIEW` + - `ALTER VIEW MODIFY QUERY`. レベル: `VIEW`. 別å: `ALTER TABLE MODIFY QUERY` + - `ALTER VIEW MODIFY SQL SECURITY`. レベル: `VIEW`. 別å: `ALTER TABLE MODIFY SQL SECURITY` + +ã“ã®éšŽå±¤ãŒã©ã®ã‚ˆã†ã«æ‰±ã‚れるã‹ã®ä¾‹: + +- `ALTER`権é™ã¯ä»–ã®ã™ã¹ã¦ã®`ALTER*`権é™ã‚’å«ã¿ã¾ã™ã€‚ +- `ALTER CONSTRAINT`ã«ã¯`ALTER ADD CONSTRAINT`ãŠã‚ˆã³`ALTER DROP CONSTRAINT`権é™ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +**注æ„事項** + +- `MODIFY SETTING`権é™ã¯ãƒ†ãƒ¼ãƒ–ルエンジン設定ã®å¤‰æ›´ã‚’許å¯ã—ã¾ã™ã€‚設定ã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼æ§‹æˆãƒ‘ラメータã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 +- `ATTACH`æ“作ã«ã¯[CREATE](#create)権é™ãŒå¿…è¦ã§ã™ã€‚ +- `DETACH`æ“作ã«ã¯[DROP](#drop)権é™ãŒå¿…è¦ã§ã™ã€‚ +- [KILL MUTATION](../../sql-reference/statements/kill.md#kill-mutation)クエリã§ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’åœæ­¢ã™ã‚‹ã«ã¯ã€ã“ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’開始ã™ã‚‹æ¨©é™ãŒå¿…è¦ã§ã™ã€‚例ãˆã°ã€`ALTER UPDATE`クエリをåœæ­¢ã™ã‚‹å ´åˆã€`ALTER UPDATE`ã€`ALTER TABLE`ã€ã¾ãŸã¯`ALTER`権é™ãŒå¿…è¦ã§ã™ã€‚ + +### CREATE + +[CREATE](../../sql-reference/statements/create/index.md)ãŠã‚ˆã³[ATTACH](../../sql-reference/statements/attach.md)DDLクエリã®å®Ÿè¡Œã‚’以下ã®æ¨©é™ã®éšŽå±¤ã«å¾“ã£ã¦è¨±å¯ã—ã¾ã™ï¼š + +- `CREATE`. レベル: `GROUP` + - `CREATE DATABASE`. レベル: `DATABASE` + - `CREATE TABLE`. レベル: `TABLE` + - `CREATE ARBITRARY TEMPORARY TABLE`. レベル: `GLOBAL` + - `CREATE TEMPORARY TABLE`. レベル: `GLOBAL` + - `CREATE VIEW`. レベル: `VIEW` + - `CREATE DICTIONARY`. レベル: `DICTIONARY` + +**注æ„事項** + +- 作æˆã—ãŸãƒ†ãƒ¼ãƒ–ルを削除ã™ã‚‹ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯[DROP](#drop)権é™ãŒå¿…è¦ã§ã™ã€‚ + +### DROP + +[DROP](../../sql-reference/statements/drop.md)ãŠã‚ˆã³[DETACH](../../sql-reference/statements/detach.md)クエリã®å®Ÿè¡Œã‚’以下ã®æ¨©é™ã®éšŽå±¤ã«å¾“ã£ã¦è¨±å¯ã—ã¾ã™ï¼š + +- `DROP`. レベル: `GROUP` + - `DROP DATABASE`. レベル: `DATABASE` + - `DROP TABLE`. レベル: `TABLE` + - `DROP VIEW`. レベル: `VIEW` + - `DROP DICTIONARY`. レベル: `DICTIONARY` + +### TRUNCATE + +[TRUNCATE](../../sql-reference/statements/truncate.md)クエリã®å®Ÿè¡Œã‚’許å¯ã—ã¾ã™ã€‚ + +権é™ãƒ¬ãƒ™ãƒ«: `TABLE`. + +### OPTIMIZE + +[OPTIMIZE TABLE](../../sql-reference/statements/optimize.md)クエリã®å®Ÿè¡Œã‚’許å¯ã—ã¾ã™ã€‚ + +権é™ãƒ¬ãƒ™ãƒ«: `TABLE`. + +### SHOW + +`SHOW`ã€`DESCRIBE`ã€`USE`ãŠã‚ˆã³`EXISTS`クエリã®å®Ÿè¡Œã‚’以下ã®æ¨©é™ã®éšŽå±¤ã«å¾“ã£ã¦è¨±å¯ã—ã¾ã™ï¼š + +- `SHOW`. レベル: `GROUP` + - `SHOW DATABASES`. レベル: `DATABASE`. `SHOW DATABASES`ã€`SHOW CREATE DATABASE`ã€`USE `クエリを実行å¯èƒ½ã«ã—ã¾ã™ã€‚ + - `SHOW TABLES`. レベル: `TABLE`. `SHOW TABLES`ã€`EXISTS `ã€`CHECK
    `クエリを実行å¯èƒ½ã«ã—ã¾ã™ã€‚ + - `SHOW COLUMNS`. レベル: `COLUMN`. `SHOW CREATE TABLE`ã€`DESCRIBE`クエリを実行å¯èƒ½ã«ã—ã¾ã™ã€‚ + - `SHOW DICTIONARIES`. レベル: `DICTIONARY`. `SHOW DICTIONARIES`ã€`SHOW CREATE DICTIONARY`ã€`EXISTS `クエリを実行å¯èƒ½ã«ã—ã¾ã™ã€‚ + +**注æ„事項** + +ユーザーã¯æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã€Dictionaryã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«é–¢ã™ã‚‹ä»–ã®æ¨©é™ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€`SHOW`権é™ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ + +### KILL QUERY + +[KILL](../../sql-reference/statements/kill.md#kill-query)クエリã®å®Ÿè¡Œã‚’以下ã®æ¨©é™ã®éšŽå±¤ã«å¾“ã£ã¦è¨±å¯ã—ã¾ã™ï¼š + +権é™ãƒ¬ãƒ™ãƒ«: `GLOBAL`. + +**注æ„事項** + +`KILL QUERY`権é™ã¯ã€ã‚るユーザーãŒä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¯ã‚¨ãƒªã‚’åœæ­¢ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +### ACCESS MANAGEMENT + +ユーザーãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ãƒ­ãƒ¼ãƒ«ã€ãŠã‚ˆã³è¡Œãƒãƒªã‚·ãƒ¼ã‚’管ç†ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +- `ACCESS MANAGEMENT`. レベル: `GROUP` + - `CREATE USER`. レベル: `GLOBAL` + - `ALTER USER`. レベル: `GLOBAL` + - `DROP USER`. レベル: `GLOBAL` + - `CREATE ROLE`. レベル: `GLOBAL` + - `ALTER ROLE`. レベル: `GLOBAL` + - `DROP ROLE`. レベル: `GLOBAL` + - `ROLE ADMIN`. レベル: `GLOBAL` + - `CREATE ROW POLICY`. レベル: `GLOBAL`. 別å: `CREATE POLICY` + - `ALTER ROW POLICY`. レベル: `GLOBAL`. 別å: `ALTER POLICY` + - `DROP ROW POLICY`. レベル: `GLOBAL`. 別å: `DROP POLICY` + - `CREATE QUOTA`. レベル: `GLOBAL` + - `ALTER QUOTA`. レベル: `GLOBAL` + - `DROP QUOTA`. レベル: `GLOBAL` + - `CREATE SETTINGS PROFILE`. レベル: `GLOBAL`. 別å: `CREATE PROFILE` + - `ALTER SETTINGS PROFILE`. レベル: `GLOBAL`. 別å: `ALTER PROFILE` + - `DROP SETTINGS PROFILE`. レベル: `GLOBAL`. 別å: `DROP PROFILE` + - `SHOW ACCESS`. レベル: `GROUP` + - `SHOW_USERS`. レベル: `GLOBAL`. 別å: `SHOW CREATE USER` + - `SHOW_ROLES`. レベル: `GLOBAL`. 別å: `SHOW CREATE ROLE` + - `SHOW_ROW_POLICIES`. レベル: `GLOBAL`. 別å: `SHOW POLICIES`, `SHOW CREATE ROW POLICY`, `SHOW CREATE POLICY` + - `SHOW_QUOTAS`. レベル: `GLOBAL`. 別å: `SHOW CREATE QUOTA` + - `SHOW_SETTINGS_PROFILES`. レベル: `GLOBAL`. 別å: `SHOW PROFILES`, `SHOW CREATE SETTINGS PROFILE`, `SHOW CREATE PROFILE` + - `ALLOW SQL SECURITY NONE`. レベル: `GLOBAL`. 別å: `CREATE SQL SECURITY NONE`, `SQL SECURITY NONE`, `SECURITY NONE` + +`ROLE ADMIN`権é™ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ä»˜ä¸Žã•ã‚Œã¦ã„ãªã„管ç†ã‚ªãƒ—ションをå«ã‚€ã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ã‚’割り当ã¦ãŠã‚ˆã³å–り消ã™ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +### SYSTEM + +ユーザーãŒ[SYSTEM](../../sql-reference/statements/system.md)クエリを次ã®æ¨©é™ã®éšŽå±¤ã«å¾“ã£ã¦å®Ÿè¡Œã§ãるよã†ã«ã—ã¾ã™ã€‚ + +- `SYSTEM`. レベル: `GROUP` + - `SYSTEM SHUTDOWN`. レベル: `GLOBAL`. 別å: `SYSTEM KILL`, `SHUTDOWN` + - `SYSTEM DROP CACHE`. 別å: `DROP CACHE` + - `SYSTEM DROP DNS CACHE`. レベル: `GLOBAL`. 別å: `SYSTEM DROP DNS`, `DROP DNS CACHE`, `DROP DNS` + - `SYSTEM DROP MARK CACHE`. レベル: `GLOBAL`. 別å: `SYSTEM DROP MARK`, `DROP MARK CACHE`, `DROP MARKS` + - `SYSTEM DROP UNCOMPRESSED CACHE`. レベル: `GLOBAL`. 別å: `SYSTEM DROP UNCOMPRESSED`, `DROP UNCOMPRESSED CACHE`, `DROP UNCOMPRESSED` + - `SYSTEM RELOAD`. レベル: `GROUP` + - `SYSTEM RELOAD CONFIG`. レベル: `GLOBAL`. 別å: `RELOAD CONFIG` + - `SYSTEM RELOAD DICTIONARY`. レベル: `GLOBAL`. 別å: `SYSTEM RELOAD DICTIONARIES`, `RELOAD DICTIONARY`, `RELOAD DICTIONARIES` + - `SYSTEM RELOAD EMBEDDED DICTIONARIES`. レベル: `GLOBAL`. 別å: `RELOAD EMBEDDED DICTIONARIES` + - `SYSTEM MERGES`. レベル: `TABLE`. 別å: `SYSTEM STOP MERGES`, `SYSTEM START MERGES`, `STOP MERGES`, `START MERGES` + - `SYSTEM TTL MERGES`. レベル: `TABLE`. 別å: `SYSTEM STOP TTL MERGES`, `SYSTEM START TTL MERGES`, `STOP TTL MERGES`, `START TTL MERGES` + - `SYSTEM FETCHES`. レベル: `TABLE`. 別å: `SYSTEM STOP FETCHES`, `SYSTEM START FETCHES`, `STOP FETCHES`, `START FETCHES` + - `SYSTEM MOVES`. レベル: `TABLE`. 別å: `SYSTEM STOP MOVES`, `SYSTEM START MOVES`, `STOP MOVES`, `START MOVES` + - `SYSTEM SENDS`. レベル: `GROUP`. 別å: `SYSTEM STOP SENDS`, `SYSTEM START SENDS`, `STOP SENDS`, `START SENDS` + - `SYSTEM DISTRIBUTED SENDS`. レベル: `TABLE`. 別å: `SYSTEM STOP DISTRIBUTED SENDS`, `SYSTEM START DISTRIBUTED SENDS`, `STOP DISTRIBUTED SENDS`, `START DISTRIBUTED SENDS` + - `SYSTEM REPLICATED SENDS`. レベル: `TABLE`. 別å: `SYSTEM STOP REPLICATED SENDS`, `SYSTEM START REPLICATED SENDS`, `STOP REPLICATED SENDS`, `START REPLICATED SENDS` + - `SYSTEM REPLICATION QUEUES`. レベル: `TABLE`. 別å: `SYSTEM STOP REPLICATION QUEUES`, `SYSTEM START REPLICATION QUEUES`, `STOP REPLICATION QUEUES`, `START REPLICATION QUEUES` + - `SYSTEM SYNC REPLICA`. レベル: `TABLE`. 別å: `SYNC REPLICA` + - `SYSTEM RESTART REPLICA`. レベル: `TABLE`. 別å: `RESTART REPLICA` + - `SYSTEM FLUSH`. レベル: `GROUP` + - `SYSTEM FLUSH DISTRIBUTED`. レベル: `TABLE`. 別å: `FLUSH DISTRIBUTED` + - `SYSTEM FLUSH LOGS`. レベル: `GLOBAL`. 別å: `FLUSH LOGS` + +`SYSTEM RELOAD EMBEDDED DICTIONARIES`権é™ã¯ã€`SYSTEM RELOAD DICTIONARY ON *.*`権é™ã§æš—黙的ã«ä»˜ä¸Žã•ã‚Œã¾ã™ã€‚ + +### INTROSPECTION + +[introspection](../../operations/optimizing-performance/sampling-query-profiler.md)関数ã®ä½¿ç”¨ã‚’許å¯ã—ã¾ã™ã€‚ + +- `INTROSPECTION`. レベル: `GROUP`. 別å: `INTROSPECTION FUNCTIONS` + - `addressToLine`. レベル: `GLOBAL` + - `addressToLineWithInlines`. レベル: `GLOBAL` + - `addressToSymbol`. レベル: `GLOBAL` + - `demangle`. レベル: `GLOBAL` + +### SOURCES + +外部データソースã®ä½¿ç”¨ã‚’許å¯ã—ã¾ã™ã€‚[テーブルエンジン](../../engines/table-engines/index.md)ãŠã‚ˆã³[テーブル関数](../../sql-reference/table-functions/index.md#table-functions)ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +- `SOURCES`. レベル: `GROUP` + - `AZURE`. レベル: `GLOBAL` + - `FILE`. レベル: `GLOBAL` + - `HDFS`. レベル: `GLOBAL` + - `HIVE`. レベル: `GLOBAL` + - `JDBC`. レベル: `GLOBAL` + - `KAFKA`. レベル: `GLOBAL` + - `MONGO`. レベル: `GLOBAL` + - `MYSQL`. レベル: `GLOBAL` + - `NATS`. レベル: `GLOBAL` + - `ODBC`. レベル: `GLOBAL` + - `POSTGRES`. レベル: `GLOBAL` + - `RABBITMQ`. レベル: `GLOBAL` + - `REDIS`. レベル: `GLOBAL` + - `REMOTE`. レベル: `GLOBAL` + - `S3`. レベル: `GLOBAL` + - `SQLITE`. レベル: `GLOBAL` + - `URL`. レベル: `GLOBAL` + +`SOURCES`権é™ã¯ã€ã™ã¹ã¦ã®ã‚½ãƒ¼ã‚¹ã®ä½¿ç”¨ã‚’許å¯ã—ã¾ã™ã€‚ã¾ãŸã€å„ソースã«å¯¾ã—ã¦å€‹åˆ¥ã«æ¨©é™ã‚’付与ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ソースを使用ã™ã‚‹ã«ã¯ã€è¿½åŠ ã®æ¨©é™ãŒå¿…è¦ã§ã™ã€‚ + +例: + +- [MySQLテーブルエンジン](../../engines/table-engines/integrations/mysql.md)を使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã«ã¯ã€`CREATE TABLE (ON db.table_name)`ãŠã‚ˆã³`MYSQL`権é™ãŒå¿…è¦ã§ã™ã€‚ +- [mysqlテーブル関数](../../sql-reference/table-functions/mysql.md)を使用ã™ã‚‹ã«ã¯ã€`CREATE TEMPORARY TABLE`ãŠã‚ˆã³`MYSQL`権é™ãŒå¿…è¦ã§ã™ã€‚ + +### dictGet + +- `dictGet`. 別å: `dictHas`, `dictGetHierarchy`, `dictIsIn` + +ユーザーãŒ[dictGet](../../sql-reference/functions/ext-dict-functions.md#dictget)ã€[dictHas](../../sql-reference/functions/ext-dict-functions.md#dicthas)ã€[dictGetHierarchy](../../sql-reference/functions/ext-dict-functions.md#dictgethierarchy)ã€[dictIsIn](../../sql-reference/functions/ext-dict-functions.md#dictisin)関数を実行ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +権é™ãƒ¬ãƒ™ãƒ«: `DICTIONARY`. + +**例** + +- `GRANT dictGet ON mydb.mydictionary TO john` +- `GRANT dictGet ON mydictionary TO john` + +### displaySecretsInShowAndSelect + +`SHOW`ãŠã‚ˆã³`SELECT`クエリ内ã§ç§˜å¯†ã‚’表示ã™ã‚‹ã“ã¨ã‚’ユーザーã«è¨±å¯ã—ã¾ã™ã€‚ +[`display_secrets_in_show_and_select`サーãƒãƒ¼è¨­å®š](../../operations/server-configuration-parameters/settings#display_secrets_in_show_and_select) +ãŠã‚ˆã³ +[`format_display_secrets_in_show_and_select`フォーマット設定](../../operations/settings/formats#format_display_secrets_in_show_and_select) +ã®ä¸¡æ–¹ãŒã‚ªãƒ³ã«ãªã£ã¦ã„ã‚‹å ´åˆã€‚ + +### NAMED COLLECTION ADMIN + +指定ã•ã‚ŒãŸå‘½åコレクションã«å¯¾ã™ã‚‹ç‰¹å®šã®æ“作を許å¯ã—ã¾ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³23.7以å‰ã§ã¯NAMED COLLECTION CONTROLã¨å‘¼ã°ã‚Œã¦ã„ã¾ã—ãŸãŒã€23.7以é™ã«ã¯NAMED COLLECTION ADMINãŒè¿½åŠ ã•ã‚Œã€NAMED COLLECTION CONTROLã¯ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¨ã—ã¦ä¿æŒã•ã‚Œã¦ã„ã¾ã™ã€‚ + +- `NAMED COLLECTION ADMIN`. レベル: `NAMED_COLLECTION`. 別å: `NAMED COLLECTION CONTROL` + - `CREATE NAMED COLLECTION`. レベル: `NAMED_COLLECTION` + - `DROP NAMED COLLECTION`. レベル: `NAMED_COLLECTION` + - `ALTER NAMED COLLECTION`. レベル: `NAMED_COLLECTION` + - `SHOW NAMED COLLECTIONS`. レベル: `NAMED_COLLECTION`. 別å: `SHOW NAMED COLLECTIONS` + - `SHOW NAMED COLLECTIONS SECRETS`. レベル: `NAMED_COLLECTION`. 別å: `SHOW NAMED COLLECTIONS SECRETS` + - `NAMED COLLECTION`. レベル: `NAMED_COLLECTION`. 別å: `NAMED COLLECTION USAGE, USE NAMED COLLECTION` + +23.7ã§ã¯ã€GRANT NAMED COLLECTION以外ã®ã™ã¹ã¦ã®GRANT(CREATE, DROP, ALTER, SHOW)ãŒè¿½åŠ ã•ã‚Œã€23.7以é™ã«ã®ã¿GRANT NAMED COLLECTIONãŒè¿½åŠ ã•ã‚Œã¾ã—ãŸã€‚ + +**例** + +命åコレクションãŒabcã¨å‘¼ã°ã‚Œã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼johnã«CREATE NAMED COLLECTIONã®æ¨©é™ã‚’付与ã—ã¾ã™ã€‚ +- `GRANT CREATE NAMED COLLECTION ON abc TO john` + +### TABLE ENGINE + +テーブルを作æˆã™ã‚‹éš›ã«æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルエンジンを使用ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚[テーブルエンジン](../../engines/table-engines/index.md)ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +**例** + +- `GRANT TABLE ENGINE ON * TO john` +- `GRANT TABLE ENGINE ON TinyLog TO john` + +### ALL + +è¦åˆ¶å¯¾è±¡ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾ã™ã‚‹ã™ã¹ã¦ã®æ¨©é™ã‚’ユーザーアカウントã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã«ä»˜ä¸Žã—ã¾ã™ã€‚ + +### NONE + +ã„ã‹ãªã‚‹æ¨©é™ã‚‚付与ã—ã¾ã›ã‚“。 + +### ADMIN OPTION + +`ADMIN OPTION`権é™ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè‡ªèº«ã®ãƒ­ãƒ¼ãƒ«ã‚’ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ä»˜ä¸Žã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/index.md b/docs/ja/sql-reference/statements/index.md new file mode 100644 index 00000000000..bb9fa543c20 --- /dev/null +++ b/docs/ja/sql-reference/statements/index.md @@ -0,0 +1,32 @@ +--- +slug: /ja/sql-reference/statements/ +sidebar_position: 1 +sidebar_label: ステートメントã®ä¸€è¦§ +--- + +# ClickHouse SQL ステートメント + +ステートメントã¯ã€SQLクエリを使用ã—ã¦å®Ÿè¡Œã§ãã‚‹ã•ã¾ã–ã¾ãªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’表ã—ã¾ã™ã€‚å„種ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã«ã¯ã€ãã‚Œãžã‚Œå›ºæœ‰ã®æ§‹æ–‡ã¨ä½¿ç”¨æ–¹æ³•ãŒã‚ã‚Šã€ãれらã¯å€‹åˆ¥ã«èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™ã€‚ + +- [SELECT](/docs/ja/sql-reference/statements/select/index.md) +- [INSERT INTO](/docs/ja/sql-reference/statements/insert-into.md) +- [CREATE](/docs/ja/sql-reference/statements/create/index.md) +- [ALTER](/docs/ja/sql-reference/statements/alter/index.md) +- [SYSTEM](/docs/ja/sql-reference/statements/system.md) +- [SHOW](/docs/ja/sql-reference/statements/show.md) +- [GRANT](/docs/ja/sql-reference/statements/grant.md) +- [REVOKE](/docs/ja/sql-reference/statements/revoke.md) +- [ATTACH](/docs/ja/sql-reference/statements/attach.md) +- [CHECK TABLE](/docs/ja/sql-reference/statements/check-table.md) +- [DESCRIBE TABLE](/docs/ja/sql-reference/statements/describe-table.md) +- [DETACH](/docs/ja/sql-reference/statements/detach.md) +- [DROP](/docs/ja/sql-reference/statements/drop.md) +- [EXISTS](/docs/ja/sql-reference/statements/exists.md) +- [KILL](/docs/ja/sql-reference/statements/kill.md) +- [OPTIMIZE](/docs/ja/sql-reference/statements/optimize.md) +- [RENAME](/docs/ja/sql-reference/statements/rename.md) +- [SET](/docs/ja/sql-reference/statements/set.md) +- [SET ROLE](/docs/ja/sql-reference/statements/set-role.md) +- [TRUNCATE](/docs/ja/sql-reference/statements/truncate.md) +- [USE](/docs/ja/sql-reference/statements/use.md) +- [EXPLAIN](/docs/ja/sql-reference/statements/explain.md) diff --git a/docs/ja/sql-reference/statements/insert-into.md b/docs/ja/sql-reference/statements/insert-into.md new file mode 100644 index 00000000000..40cbcd782c6 --- /dev/null +++ b/docs/ja/sql-reference/statements/insert-into.md @@ -0,0 +1,257 @@ +# INSERT INTO ステートメント + +テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ã€‚ + +**構文** + +``` sql +INSERT INTO [TABLE] [db.]table [(c1, c2, c3)] [SETTINGS ...] VALUES (v11, v12, v13), (v21, v22, v23), ... +``` + +挿入ã™ã‚‹ã‚«ãƒ©ãƒ ã®ä¸€è¦§ã‚’ `(c1, c2, c3)` ã§æŒ‡å®šã§ãã¾ã™ã€‚ã¾ãŸã€`*` ã‚„ [APPLY](../../sql-reference/statements/select/index.md#apply-modifier), [EXCEPT](../../sql-reference/statements/select/index.md#except-modifier), [REPLACE](../../sql-reference/statements/select/index.md#replace-modifier) ãªã©ã®[修飾å­](../../sql-reference/statements/select/index.md#select-modifiers)を使用ã—ãŸã‚«ãƒ©ãƒ [マッãƒãƒ£ãƒ¼](../../sql-reference/statements/select/index.md#asterisk)ã®å¼ã‚‚使用å¯èƒ½ã§ã™ã€‚ + +例ãˆã°ã€ä»¥ä¸‹ã®ãƒ†ãƒ¼ãƒ–ルを考ãˆã¾ã™: + +``` sql +SHOW CREATE insert_select_testtable; +``` + +```text +CREATE TABLE insert_select_testtable +( + `a` Int8, + `b` String, + `c` Int8 +) +ENGINE = MergeTree() +ORDER BY a +``` + +``` sql +INSERT INTO insert_select_testtable (*) VALUES (1, 'a', 1) ; +``` + +ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã€'b' カラムを除外ã—ãŸã„å ´åˆã¯ã€ä¸¸æ‹¬å¼§å†…ã«é¸ã‚“ã ã‚«ãƒ©ãƒ ã®æ•°ã ã‘値を渡ã™å¿…è¦ãŒã‚ã‚Šã¾ã™: + +``` sql +INSERT INTO insert_select_testtable (* EXCEPT(b)) Values (2, 2); +``` + +``` sql +SELECT * FROM insert_select_testtable; +``` + +``` +┌─a─┬─b─┬─c─┠+│ 2 │ │ 2 │ +└───┴───┴───┘ +┌─a─┬─b─┬─c─┠+│ 1 │ a │ 1 │ +└───┴───┴───┘ +``` + +ã“ã®ä¾‹ã§ã¯ã€2行目ã§æŒ¿å…¥ã•ã‚ŒãŸè¡Œã¯ã€`a` 㨠`c` カラムãŒæ¸¡ã•ã‚ŒãŸå€¤ã§åŸ‹ã‚られã€`b` カラムã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§åŸ‹ã‚られã¦ã„ã¾ã™ã€‚`DEFAULT` キーワードを使用ã—ã¦ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’挿入ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™: + +``` sql +INSERT INTO insert_select_testtable VALUES (1, DEFAULT, 1) ; +``` + +カラムã®ãƒªã‚¹ãƒˆã«ã™ã¹ã¦ã®æ—¢å­˜ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã€æ®‹ã‚Šã®ã‚«ãƒ©ãƒ ã¯ä»¥ä¸‹ã§åŸ‹ã‚られã¾ã™: + +- テーブル定義ã§æŒ‡å®šã•ã‚Œã¦ã„ã‚‹ `DEFAULT` å¼ã‹ã‚‰è¨ˆç®—ã•ã‚ŒãŸå€¤ã€‚ +- `DEFAULT` å¼ãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ã‚¼ãƒ­ã¨ç©ºæ–‡å­—列。 + +データ㯠ClickHouse ãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ä»»æ„ã®[フォーマット](../../interfaces/formats.md#formats)㧠`INSERT` ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚クエリã§ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’明示的ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: + +``` sql +INSERT INTO [db.]table [(c1, c2, c3)] FORMAT format_name data_set +``` + +例ãˆã°ã€æ¬¡ã®ã‚¯ã‚¨ãƒªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯åŸºæœ¬çš„㪠INSERT ... VALUES ã¨åŒã˜ã§ã™: + +``` sql +INSERT INTO [db.]table [(c1, c2, c3)] FORMAT Values (v11, v12, v13), (v21, v22, v23), ... +``` + +ClickHouse ã¯ãƒ‡ãƒ¼ã‚¿ã®å‰ã®ã™ã¹ã¦ã®ã‚¹ãƒšãƒ¼ã‚¹ã¨1è¡Œã®æ”¹è¡Œï¼ˆå­˜åœ¨ã™ã‚‹å ´åˆï¼‰ã‚’削除ã—ã¾ã™ã€‚クエリを形æˆã™ã‚‹éš›ã€ãƒ‡ãƒ¼ã‚¿ã‚’クエリオペレータã®å¾Œã«æ–°ã—ã„è¡Œã«ç½®ãã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ï¼ˆãƒ‡ãƒ¼ã‚¿ãŒã‚¹ãƒšãƒ¼ã‚¹ã§å§‹ã¾ã‚‹å ´åˆã¯é‡è¦ã§ã™ï¼‰ã€‚ + +例: + +``` sql +INSERT INTO t FORMAT TabSeparated +11 Hello, world! +22 Qwerty +``` + +データをクエリã‹ã‚‰åˆ†é›¢ã—ã¦æŒ¿å…¥ã™ã‚‹ãŸã‚ã«ã€[コマンドラインクライアント](/docs/ja/integrations/sql-clients/clickhouse-client-local) ã‚„ [HTTPインターフェース](/docs/ja/interfaces/http/)を使用ã§ãã¾ã™ã€‚ + +:::note +`INSERT` クエリ㫠`SETTINGS` を指定ã—ãŸã„å ´åˆã¯ã€`FORMAT` 節㮠_å‰ã«_ 設定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãªãœãªã‚‰ã€`FORMAT format_name` 以é™ã¯ã™ã¹ã¦ãƒ‡ãƒ¼ã‚¿ã¨è¦‹ãªã•ã‚Œã‚‹ã‹ã‚‰ã§ã™ã€‚例: +```sql +INSERT INTO table SETTINGS ... FORMAT format_name data_set +``` +::: + +## 制約 + +テーブルã«[制約](../../sql-reference/statements/create/table.md#constraints)ãŒã‚ã‚‹å ´åˆã€ãã®å¼ã¯æŒ¿å…¥ãƒ‡ãƒ¼ã‚¿ã®å„è¡Œã«å¯¾ã—ã¦ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ã€‚ãれらã®åˆ¶ç´„ã®ã„ãšã‚Œã‹ãŒæº€ãŸã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚µãƒ¼ãƒãƒ¼ã¯åˆ¶ç´„åã¨å¼ã‚’å«ã‚€ä¾‹å¤–を発生ã•ã›ã€ã‚¯ã‚¨ãƒªã¯ä¸­æ–­ã•ã‚Œã¾ã™ã€‚ + +## SELECT ã®çµæžœã®æŒ¿å…¥ + +**構文** + +``` sql +INSERT INTO [TABLE] [db.]table [(c1, c2, c3)] SELECT ... +``` + +カラム㯠`SELECT` 節ã§ã®ä½ç½®ã«å¾“ã£ã¦ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™ã€‚ã—ã‹ã—ã€`SELECT` å¼ã¨ `INSERT` ã®ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルã§ã®åå‰ã¯ç•°ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦åž‹ã‚­ãƒ£ã‚¹ãƒ†ã‚£ãƒ³ã‚°ãŒè¡Œã‚ã‚Œã¾ã™ã€‚ + +`Values` 以外ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€`now()`, `1 + 2` ãªã©ã®ã‚ˆã†ãªå¼ã«å€¤ã‚’設定ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã›ã‚“。`Values` フォーマットã¯å¼ã®é™å®šçš„ãªä½¿ç”¨ã‚’許å¯ã—ã¾ã™ãŒã€ã“ã‚Œã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。ãªãœãªã‚‰ã€ã“ã®å ´åˆã€éžåŠ¹çŽ‡çš„ãªã‚³ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•ã‚Œã‚‹ã‹ã‚‰ã§ã™ã€‚ + +ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツを修正ã™ã‚‹ã‚¯ã‚¨ãƒªã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“:`UPDATE`, `DELETE`, `REPLACE`, `MERGE`, `UPSERT`, `INSERT UPDATE`。ãŸã ã—ã€`ALTER TABLE ... DROP PARTITION` を使用ã—ã¦å¤ã„データを削除ã§ãã¾ã™ã€‚ + +`SELECT` 節ãŒãƒ†ãƒ¼ãƒ–ル関数 [input()](../../sql-reference/table-functions/input.md) ã‚’å«ã‚€å ´åˆã¯ã€`FORMAT` 節をクエリã®æœ€å¾Œã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +`NULL` ã‚’æŒã¤éžnullableãªãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®ã‚«ãƒ©ãƒ ã«ä»£ã‚ã‚Šã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’挿入ã™ã‚‹ã«ã¯ã€[insert_null_as_default](../../operations/settings/settings.md#insert_null_as_default) 設定を有効ã«ã—ã¾ã™ã€‚ + +`INSERT` ã¯ã¾ãŸã€CTE(共通テーブルå¼ï¼‰ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚例ãˆã°ã€ä»¥ä¸‹ã®2ã¤ã®æ–‡ã¯åŒç­‰ã§ã™ï¼š + +``` sql +INSERT INTO x WITH y AS (SELECT * FROM numbers(10)) SELECT * FROM y; +WITH y AS (SELECT * FROM numbers(10)) INSERT INTO x SELECT * FROM y; +``` + +## ファイルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入 + +**構文** + +``` sql +INSERT INTO [TABLE] [db.]table [(c1, c2, c3)] FROM INFILE file_name [COMPRESSION type] [SETTINGS ...] [FORMAT format_name] +``` + +上記ã®æ§‹æ–‡ã‚’使用ã—ã¦ã€**クライアント**å´ã«ä¿å­˜ã•ã‚Œã¦ã„るファイルã€ã¾ãŸã¯ãƒ•ã‚¡ã‚¤ãƒ«ç¾¤ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã—ã¾ã™ã€‚`file_name` 㨠`type` ã¯æ–‡å­—列リテラルã§ã™ã€‚入力ファイルã®[フォーマット](../../interfaces/formats.md)㯠`FORMAT` 節ã§è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +圧縮ファイルã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚圧縮タイプã¯ãƒ•ã‚¡ã‚¤ãƒ«åã®æ‹¡å¼µå­ã§æ¤œå‡ºã•ã‚Œã¾ã™ã€‚ã‚‚ã—ãã¯ã€`COMPRESSION` 節ã§æ˜Žç¤ºçš„ã«æŒ‡å®šã§ãã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るタイプã¯ï¼š `'none'`, `'gzip'`, `'deflate'`, `'br'`, `'xz'`, `'zstd'`, `'lz4'`, `'bz2'`。 + +ã“ã®æ©Ÿèƒ½ã¯[コマンドラインクライアント](../../interfaces/cli.md)ãŠã‚ˆã³[clickhouse-local](../../operations/utilities/clickhouse-local.md)ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +**例** + +### FROM INFILE を使用ã—ãŸå˜ä¸€ãƒ•ã‚¡ã‚¤ãƒ« +以下ã®ã‚¯ã‚¨ãƒªã‚’[コマンドラインクライアント](../../interfaces/cli.md)ã§å®Ÿè¡Œã—ã¾ã™ï¼š + +```bash +echo 1,A > input.csv ; echo 2,B >> input.csv +clickhouse-client --query="CREATE TABLE table_from_file (id UInt32, text String) ENGINE=MergeTree() ORDER BY id;" +clickhouse-client --query="INSERT INTO table_from_file FROM INFILE 'input.csv' FORMAT CSV;" +clickhouse-client --query="SELECT * FROM table_from_file FORMAT PrettyCompact;" +``` + +çµæžœ: + +```text +┌─id─┬─text─┠+│ 1 │ A │ +│ 2 │ B │ +└────┴──────┘ +``` + +### FROM INFILE を使用ã—ãŸè¤‡æ•°ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚°ãƒ­ãƒ– + +ã“ã®ä¾‹ã¯å‰ã®ã‚‚ã®ã¨éžå¸¸ã«ä¼¼ã¦ã„ã¾ã™ãŒã€`FROM INFILE 'input_*.csv` を使用ã—ã¦è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰æŒ¿å…¥ã—ã¾ã™ã€‚ + +```bash +echo 1,A > input_1.csv ; echo 2,B > input_2.csv +clickhouse-client --query="CREATE TABLE infile_globs (id UInt32, text String) ENGINE=MergeTree() ORDER BY id;" +clickhouse-client --query="INSERT INTO infile_globs FROM INFILE 'input_*.csv' FORMAT CSV;" +clickhouse-client --query="SELECT * FROM infile_globs FORMAT PrettyCompact;" +``` + +:::tip +複数ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ `*` ã§é¸æŠžã™ã‚‹ã“ã¨ã«åŠ ãˆã€ç¯„囲(`{1,2}` ã‚„ `{1..9}`)やãã®ä»–ã®[グロブ置æ›](/docs/ja/sql-reference/table-functions/file.md/#globs-in-path)を使用ã§ãã¾ã™ã€‚以下ã®3ã¤ã™ã¹ã¦ãŒä¸Šè¨˜ã®ä¾‹ã§æ©Ÿèƒ½ã—ã¾ã™ï¼š +```sql +INSERT INTO infile_globs FROM INFILE 'input_*.csv' FORMAT CSV; +INSERT INTO infile_globs FROM INFILE 'input_{1,2}.csv' FORMAT CSV; +INSERT INTO infile_globs FROM INFILE 'input_?.csv' FORMAT CSV; +``` +::: + +## テーブル関数を使ã£ãŸãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥ + +データã¯[テーブル関数](../../sql-reference/table-functions/index.md)ã§å‚ç…§ã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã§ãã¾ã™ã€‚ + +**構文** +``` sql +INSERT INTO [TABLE] FUNCTION table_func ... +``` + +**例** + +次ã®ã‚¯ã‚¨ãƒªã§ã¯ã€[remote](../../sql-reference/table-functions/index.md#remote) テーブル関数を使用ã—ã¦ã„ã¾ã™: + +``` sql +CREATE TABLE simple_table (id UInt32, text String) ENGINE=MergeTree() ORDER BY id; +INSERT INTO TABLE FUNCTION remote('localhost', default.simple_table) + VALUES (100, 'inserted via remote()'); +SELECT * FROM simple_table; +``` + +çµæžœ: + +``` text +┌──id─┬─text──────────────────┠+│ 100 │ inserted via remote() │ +└─────┴───────────────────────┘ +``` + +## ClickHouse Cloud ã¸ã®ãƒ‡ãƒ¼ã‚¿æŒ¿å…¥ + +デフォルトã§ã¯ã€ClickHouse Cloud ã®ã‚µãƒ¼ãƒ“スã¯é«˜å¯ç”¨æ€§ã®ãŸã‚ã«è¤‡æ•°ã®ãƒ¬ãƒ—リカをæä¾›ã—ã¾ã™ã€‚サービスã«æŽ¥ç¶šã™ã‚‹ã¨ã€ã“れらã®ãƒ¬ãƒ—リカã®ã„ãšã‚Œã‹ã«æŽ¥ç¶šãŒç¢ºç«‹ã•ã‚Œã¾ã™ã€‚ + +`INSERT` ãŒæˆåŠŸã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯åŸºç›¤ã¨ãªã‚‹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ã—ã‹ã—ã€ãƒ¬ãƒ—リカãŒã“れらã®æ›´æ–°ã‚’å—ã‘å–ã‚‹ã¾ã§ã«ã¯æ™‚é–“ãŒã‹ã‹ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ãã®ãŸã‚ã€åˆ¥ã®æŽ¥ç¶šã‚’使用ã—ã¦ã“れらã®ä»–ã®ãƒ¬ãƒ—リカã®ã„ãšã‚Œã‹ã§ `SELECT` クエリを実行ã—ãŸå ´åˆã€æ›´æ–°ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒã¾ã å映ã•ã‚Œã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +レプリカã«æœ€æ–°ã®æ›´æ–°ã‚’å—ã‘å–らã›ã‚‹ãŸã‚ã«ã¯ã€`select_sequential_consistency` を使用ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã“ã“ã«ãã®è¨­å®šã‚’使用ã—㟠SELECT クエリã®ä¾‹ã‚’示ã—ã¾ã™ï¼š + +```sql +SELECT .... SETTINGS select_sequential_consistency = 1; +``` + +`select_sequential_consistency` を使用ã™ã‚‹ã¨ã€ClickHouse Keeper ã«è² è·ãŒã‹ã‹ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã€ã‚µãƒ¼ãƒ“スã®è² è·ã«å¿œã˜ã¦ãƒ‘フォーマンスãŒä½Žä¸‹ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。必è¦ã§ãªã„é™ã‚Šã€ã“ã®è¨­å®šã‚’有効ã«ã™ã‚‹ã“ã¨ã¯ãŠå‹§ã‚ã—ã¾ã›ã‚“。推奨ã•ã‚Œã‚‹ã‚¢ãƒ—ローãƒã¯ã€åŒã˜ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§èª­ã¿å–ã‚Š/書ãè¾¼ã¿ã‚’実行ã™ã‚‹ã‹ã€ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルを使用ã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ‰ãƒ©ã‚¤ãƒã‚’使用ã™ã‚‹ã“ã¨ã§ã™ï¼ˆã“ã‚Œã«ã‚ˆã‚Šã‚¹ãƒ†ã‚£ãƒƒã‚­ãƒ¼æŽ¥ç¶šãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ï¼‰ã€‚ + +## レプリケーション設定ã§ã®æŒ¿å…¥ + +レプリケーション設定ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ¬ãƒ—リケーションã•ã‚ŒãŸå¾Œã«ä»–ã®ãƒ¬ãƒ—リカã§è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚データ㯠`INSERT` 後ã™ãã«ãƒ¬ãƒ—リケーション(他ã®ãƒ¬ãƒ—リカã§ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ï¼‰ã‚’開始ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒã™ãã«å…±æœ‰ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«æ›¸ãè¾¼ã¾ã‚Œã€ãƒ¬ãƒ—リカãŒãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›´ã‚’購読ã™ã‚‹ ClickHouse Cloud ã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ + +レプリケーション設定ã§ã¯ã€`INSERTs` ãŒæ™‚ã«ã¯ï¼ˆ1秒程度ã®ï¼‰ã‹ãªã‚Šã®æ™‚é–“ã‚’è¦ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ã€åˆ†æ•£ã‚³ãƒ³ã‚»ãƒ³ã‚µã‚¹ã®ãŸã‚ã« ClickHouse Keeper ã«ã‚³ãƒŸãƒƒãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚S3 をストレージã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã€è¿½åŠ ã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã‚’追加ã—ã¾ã™ã€‚ + +## パフォーマンスã«é–¢ã™ã‚‹è€ƒæ…®äº‹é … + +`INSERT` ã¯å…¥åŠ›ãƒ‡ãƒ¼ã‚¿ã‚’主キーã§ã‚½ãƒ¼ãƒˆã—ã€ãƒ‘ーティションキーã§ãƒ‘ーティションã«åˆ†å‰²ã—ã¾ã™ã€‚一度ã«è¤‡æ•°ã®ãƒ‘ーティションã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ã€`INSERT` クエリã®ãƒ‘フォーマンスãŒå¤§å¹…ã«ä½Žä¸‹ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“れをé¿ã‘ã‚‹ãŸã‚ã«ï¼š + +- 例ãˆã° 100,000 è¡Œã®ã‚ˆã†ã«ã€ã‹ãªã‚Šå¤§ããªãƒãƒƒãƒã§ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ã€‚ +- データをアップロードã™ã‚‹å‰ã«ãƒ‘ーティションキーã§ã‚°ãƒ«ãƒ¼ãƒ—化ã™ã‚‹ã€‚ + +以下ã®å ´åˆã€ãƒ‘フォーマンスã¯ä½Žä¸‹ã—ã¾ã›ã‚“: + +- データãŒãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§è¿½åŠ ã•ã‚Œã‚‹ã€‚ +- 通常ã€æ™‚é–“ã§ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’アップロードã™ã‚‹ã€‚ + +### éžåŒæœŸæŒ¿å…¥ + +å°ã•ãã¦ã‚‚é »ç¹ã«éžåŒæœŸã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ãã®ã‚ˆã†ãªæŒ¿å…¥ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã¯ãƒãƒƒãƒã«çµåˆã•ã‚Œã€å®‰å…¨ã«ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚éžåŒæœŸæŒ¿å…¥ã‚’使用ã™ã‚‹ã«ã¯ã€[`async_insert`](../../operations/settings/settings.md#async-insert) 設定を有効ã«ã—ã¾ã™ã€‚ + +`async_insert` ã¾ãŸã¯ [`Buffer` テーブルエンジン](/ja/engines/table-engines/special/buffer) を使用ã™ã‚‹ã“ã¨ã§ã€è¿½åŠ ã®ãƒãƒƒãƒ•ã‚¡ãƒªãƒ³ã‚°ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +### 大è¦æ¨¡ã¾ãŸã¯é•·æ™‚間実行ã®æŒ¿å…¥ + +大é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ãã€ClickHouse ã¯ã€Œã‚¹ã‚¯ãƒ¯ãƒƒã‚·ãƒ¥ã€ã¨å‘¼ã°ã‚Œã‚‹ãƒ—ロセスを通ã˜ã¦æ›¸ãè¾¼ã¿ãƒ‘フォーマンスを最é©åŒ–ã—ã¾ã™ã€‚メモリ内ã®å°ã•ãªãƒ–ロックã®æŒ¿å…¥ãƒ‡ãƒ¼ã‚¿ãŒçµåˆã•ã‚Œã€ãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹å‰ã«å¤§ããªãƒ–ロックã«ã‚¹ã‚¯ãƒ¯ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚スクワッシュã¯ã€å„書ãè¾¼ã¿æ“作ã«é–¢é€£ã™ã‚‹ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’削減ã—ã¾ã™ã€‚ã“ã®ãƒ—ロセスã§ã¯ã€ClickHouse ãŒå„[`max_insert_block_size`](/ja/operations/settings/settings#max_insert_block_size) 行を書ã込むã®ã‚’完了ã—ãŸå¾Œã€æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒã‚¯ã‚¨ãƒªå¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚ + +**関連項目** + +- [async_insert](../../operations/settings/settings.md#async-insert) +- [async_insert_threads](../../operations/settings/settings.md#async-insert-threads) +- [wait_for_async_insert](../../operations/settings/settings.md#wait-for-async-insert) +- [wait_for_async_insert_timeout](../../operations/settings/settings.md#wait-for-async-insert-timeout) +- [async_insert_max_data_size](../../operations/settings/settings.md#async-insert-max-data-size) +- [async_insert_busy_timeout_ms](../../operations/settings/settings.md#async-insert-busy-timeout-ms) +- [async_insert_stale_timeout_ms](../../operations/settings/settings.md#async-insert-stale-timeout-ms) diff --git a/docs/ja/sql-reference/statements/kill.md b/docs/ja/sql-reference/statements/kill.md new file mode 100644 index 00000000000..f780d031692 --- /dev/null +++ b/docs/ja/sql-reference/statements/kill.md @@ -0,0 +1,139 @@ +--- +slug: /ja/sql-reference/statements/kill +sidebar_position: 46 +sidebar_label: KILL +title: "KILLステートメント" +--- + +KILLステートメントã«ã¯2種類ã‚ã‚Šã¾ã™: クエリをåœæ­¢ã™ã‚‹ã‚‚ã®ã¨ã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’åœæ­¢ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ + +## KILL QUERY + +``` sql +KILL QUERY [ON CLUSTER cluster] + WHERE + [SYNC|ASYNC|TEST] + [FORMAT format] +``` + +ç¾åœ¨å®Ÿè¡Œä¸­ã®ã‚¯ã‚¨ãƒªã‚’強制的ã«åœæ­¢ã—よã†ã¨ã—ã¾ã™ã€‚åœæ­¢ã™ã‚‹ã‚¯ã‚¨ãƒªã¯ã€`KILL`クエリã®`WHERE`å¥ã§å®šç¾©ã•ã‚ŒãŸæ¡ä»¶ã«åŸºã¥ãã€system.processesテーブルã‹ã‚‰é¸æŠžã•ã‚Œã¾ã™ã€‚ + +例: + +ã¾ãšã€æœªå®Œäº†ã®ã‚¯ã‚¨ãƒªã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®SQLクエリã¯ã€æœ€ã‚‚é•·ã実行ã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã«åŸºã¥ãã€ã“れをæä¾›ã—ã¾ã™ã€‚ + +å˜ä¸€ã®ClickHouseノードã‹ã‚‰ã®ãƒªã‚¹ãƒˆ: +``` sql +SELECT + initial_query_id, + query_id, + formatReadableTimeDelta(elapsed) AS time_delta, + query, + * + FROM system.processes + WHERE query ILIKE 'SELECT%' + ORDER BY time_delta DESC; +``` + +ClickHouseクラスタã‹ã‚‰ã®ãƒªã‚¹ãƒˆ: +``` sql +SELECT + initial_query_id, + query_id, + formatReadableTimeDelta(elapsed) AS time_delta, + query, + * + FROM clusterAllReplicas(default, system.processes) + WHERE query ILIKE 'SELECT%' + ORDER BY time_delta DESC; +``` + +クエリã®åœæ­¢: +``` sql +-- 指定ã•ã‚ŒãŸquery_idã‚’æŒã¤ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‚’強制終了ã—ã¾ã™: +KILL QUERY WHERE query_id='2-857d-4a57-9ee0-327da5d60a90' + +-- 'username'ã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‚’åŒæœŸçš„ã«çµ‚了ã—ã¾ã™: +KILL QUERY WHERE user='username' SYNC +``` + +:::tip +ClickHouse Cloudやセルフマãƒãƒ¼ã‚¸ãƒ‰ã®ã‚¯ãƒ©ã‚¹ã‚¿ã§ã‚¯ã‚¨ãƒªã‚’åœæ­¢ã™ã‚‹å ´åˆã¯ã€`ON CLUSTER [cluster-name]`オプションを使用ã—ã¦ã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§ã‚¯ã‚¨ãƒªãŒç¢ºå®Ÿã«åœæ­¢ã•ã‚Œã‚‹ã‚ˆã†ã«ã—ã¦ãã ã•ã„。 +::: + +読ã¿å–り専用ユーザーã¯è‡ªåˆ†ã®ã‚¯ã‚¨ãƒªã—ã‹åœæ­¢ã§ãã¾ã›ã‚“。 + +デフォルトã§ã¯ã€éžåŒæœŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆ`ASYNC`)ãŒä½¿ç”¨ã•ã‚Œã€ã‚¯ã‚¨ãƒªãŒåœæ­¢ã—ãŸã“ã¨ã®ç¢ºèªã‚’å¾…ãŸãšã«é€²è¡Œã—ã¾ã™ã€‚ + +åŒæœŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼ˆ`SYNC`)ã¯ã€ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªãŒåœæ­¢ã™ã‚‹ã®ã‚’å¾…æ©Ÿã—ã€å„プロセスãŒåœæ­¢ã™ã‚‹ãŸã³ã«æƒ…報を表示ã—ã¾ã™ã€‚応答ã«ã¯ã€ä»¥ä¸‹ã®å€¤ã‚’æŒã¤`kill_status`カラムãŒå«ã¾ã‚Œã¾ã™: + +1. `finished` – クエリãŒæ­£å¸¸ã«çµ‚了ã—ã¾ã—ãŸã€‚ +2. `waiting` – クエリã®çµ‚了信å·ã‚’é€ä¿¡ã—ãŸå¾Œã€çµ‚了を待機ã—ã¦ã„ã¾ã™ã€‚ +3. ãã®ä»–ã®å€¤ã¯ã€ã‚¯ã‚¨ãƒªãŒåœæ­¢ã§ããªã„ç†ç”±ã‚’説明ã—ã¾ã™ã€‚ + +テストクエリ(`TEST`)ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®æ¨©é™ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€åœæ­¢ã™ã‚‹ã‚¯ã‚¨ãƒªã®ãƒªã‚¹ãƒˆã‚’表示ã—ã¾ã™ã€‚ + +## KILL MUTATION + +長時間実行中ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚„未完了ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãŒã‚ã‚‹å ´åˆã€ClickHouseサービスãŒæ­£å¸¸ã«å‹•ä½œã—ã¦ã„ãªã„ã“ã¨ãŒç¤ºã•ã‚Œã‚‹ã“ã¨ãŒã‚ˆãã‚ã‚Šã¾ã™ã€‚ミューテーションã®éžåŒæœŸæ€§ã«ã‚ˆã‚Šã€ã‚·ã‚¹ãƒ†ãƒ ã®åˆ©ç”¨å¯èƒ½ãªã™ã¹ã¦ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’消費ã—ã¦ã—ã¾ã†ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚以下ã®ã„ãšã‚Œã‹ã®å¯¾ç­–ãŒå¿…è¦ãªå ´åˆãŒã‚ã‚Šã¾ã™: + +- ã™ã¹ã¦ã®æ–°ã—ã„ミューテーションã€`INSERT`ã€ãŠã‚ˆã³`SELECT`を一時åœæ­¢ã—ã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ã‚­ãƒ¥ãƒ¼ã‚’完了ã•ã›ã‚‹ã€‚ +- ã¾ãŸã¯ã€`KILL`コマンドをé€ä¿¡ã—ã¦ã€ã“れらã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ä¸€éƒ¨ã‚’手動ã§åœæ­¢ã™ã‚‹ã€‚ + +``` sql +KILL MUTATION + WHERE + [TEST] + [FORMAT format] +``` + +ç¾åœ¨å®Ÿè¡Œä¸­ã®[ミューテーション](../../sql-reference/statements/alter/index.md#alter-mutations)をキャンセルã—ã¦å‰Šé™¤ã—よã†ã¨ã—ã¾ã™ã€‚キャンセルã™ã‚‹ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã€`KILL`クエリã®`WHERE`å¥ã§æŒ‡å®šã•ã‚ŒãŸãƒ•ã‚£ãƒ«ã‚¿ã‚’使用ã—ã¦[`system.mutations`](../../operations/system-tables/mutations.md#system_tables-mutations)テーブルã‹ã‚‰é¸æŠžã•ã‚Œã¾ã™ã€‚ + +テストクエリ(`TEST`)ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®æ¨©é™ã‚’確èªã—ã€åœæ­¢ã™ã‚‹ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ãƒªã‚¹ãƒˆã‚’表示ã—ã¾ã™ã€‚ + +例: + +未完了ミューテーションã®`count()`ã‚’å–å¾—: + +å˜ä¸€ã®ClickHouseノードã‹ã‚‰ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³æ•°: +``` sql +SELECT count(*) +FROM system.mutations +WHERE is_done = 0; +``` + +レプリカã®ClickHouseクラスタã‹ã‚‰ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³æ•°: +``` sql +SELECT count(*) +FROM clusterAllReplicas('default', system.mutations) +WHERE is_done = 0; +``` + +未完了ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ãƒªã‚¹ãƒˆã‚’照会: + +å˜ä¸€ã®ClickHouseノードã‹ã‚‰ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ãƒªã‚¹ãƒˆ: +``` sql +SELECT mutation_id, * +FROM system.mutations +WHERE is_done = 0; +``` + +ClickHouseクラスタã‹ã‚‰ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ãƒªã‚¹ãƒˆ: +``` sql +SELECT mutation_id, * +FROM clusterAllReplicas('default', system.mutations) +WHERE is_done = 0; +``` + +å¿…è¦ã«å¿œã˜ã¦ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’åœæ­¢: +``` sql +-- å˜ä¸€ã®ãƒ†ãƒ¼ãƒ–ル内ã®ã™ã¹ã¦ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’キャンセルã—ã¦å‰Šé™¤: +KILL MUTATION WHERE database = 'default' AND table = 'table' + +-- 特定ã®ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’キャンセル: +KILL MUTATION WHERE database = 'default' AND table = 'table' AND mutation_id = 'mutation_3.txt' +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯ã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãŒåœæ­¢ã§ããšå®Œäº†ã—ãªã„状態(例ãˆã°ã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚¯ã‚¨ãƒªå†…ã®ä½•ã‚‰ã‹ã®é–¢æ•°ãŒãƒ†ãƒ¼ãƒ–ル内ã®ãƒ‡ãƒ¼ã‚¿ã«é©ç”¨ã•ã‚ŒãŸéš›ã«ä¾‹å¤–を投ã’ã‚‹å ´åˆï¼‰ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +ミューテーションã«ã‚ˆã£ã¦ã™ã§ã«è¡Œã‚ã‚ŒãŸå¤‰æ›´ã¯ãƒ­ãƒ¼ãƒ«ãƒãƒƒã‚¯ã•ã‚Œã¾ã›ã‚“。 diff --git a/docs/ja/sql-reference/statements/move.md b/docs/ja/sql-reference/statements/move.md new file mode 100644 index 00000000000..bfd344741da --- /dev/null +++ b/docs/ja/sql-reference/statements/move.md @@ -0,0 +1,32 @@ +--- +slug: /ja/sql-reference/statements/move +sidebar_position: 54 +sidebar_label: MOVE +--- + +# アクセスエンティティã®MOVEステートメント + +ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã€ã‚¢ã‚¯ã‚»ã‚¹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’一ã¤ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‹ã‚‰åˆ¥ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¸ç§»å‹•ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +構文: + +```sql +MOVE {USER, ROLE, QUOTA, SETTINGS PROFILE, ROW POLICY} name1 [, name2, ...] TO access_storage_type +``` + +ç¾åœ¨ã€ClickHouseã«ã¯äº”ã¤ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒã‚ã‚Šã¾ã™: + - `local_directory` + - `memory` + - `replicated` + - `users_xml` (読ã¿å–り専用) + - `ldap` (読ã¿å–り専用) + +例: + +```sql +MOVE USER test TO local_directory +``` + +```sql +MOVE ROLE test TO memory +``` diff --git a/docs/ja/sql-reference/statements/optimize.md b/docs/ja/sql-reference/statements/optimize.md new file mode 100644 index 00000000000..4fff4936316 --- /dev/null +++ b/docs/ja/sql-reference/statements/optimize.md @@ -0,0 +1,202 @@ +--- +slug: /ja/sql-reference/statements/optimize +sidebar_position: 47 +sidebar_label: OPTIMIZE +title: "OPTIMIZE ステートメント" +--- + +ã“ã®ã‚¯ã‚¨ãƒªã¯ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚Œã¦ã„ãªã„マージをåˆæœŸåŒ–ã—よã†ã¨ã—ã¾ã™ã€‚`OPTIMIZE TABLE ... FINAL` ã®ä½¿ç”¨ã¯ç®¡ç†ã‚’目的ã¨ã—ãŸã‚‚ã®ã§ã‚ã‚Šã€æ—¥å¸¸çš„ãªæ“作ã«ã¯æŽ¨å¥¨ã—ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„(詳細ã¯[ã“ã¡ã‚‰ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](/docs/ja/optimize/avoidoptimizefinal)ã‚’å‚照)。 + +:::note +`OPTIMIZE` 㯠`Too many parts` エラーを修正ã§ãã¾ã›ã‚“。 +::: + +**構文** + +``` sql +OPTIMIZE TABLE [db.]name [ON CLUSTER cluster] [PARTITION partition | PARTITION ID 'partition_id'] [FINAL] [DEDUPLICATE [BY expression]] +``` + +`OPTIMIZE` クエリ㯠[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) ファミリー([マテリアライズドビュー](../../sql-reference/statements/create/view.md#materialized-view)ã‚’å«ã‚€ï¼‰ãŠã‚ˆã³ [Buffer](../../engines/table-engines/special/buffer.md) エンジンã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ä»–ã®ãƒ†ãƒ¼ãƒ–ルエンジンã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +`OPTIMIZE` ㌠[ReplicatedMergeTree](../../engines/table-engines/mergetree-family/replication.md) ファミリーã®ãƒ†ãƒ¼ãƒ–ルエンジンã§ä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€ClickHouse ã¯ãƒžãƒ¼ã‚¸ã®ã‚¿ã‚¹ã‚¯ã‚’作æˆã—ã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§ã®å®Ÿè¡Œã‚’å¾…æ©Ÿã—ã¾ã™ï¼ˆ[alter_sync](../../operations/settings/settings.md#alter-sync) 設定㌠`2` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼‰ã¾ãŸã¯ç¾åœ¨ã®ãƒ¬ãƒ—リカã§ï¼ˆ[alter_sync](../../operations/settings/settings.md#alter-sync) 設定㌠`1` ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆï¼‰ã€‚ + +- `OPTIMIZE` ãŒä½•ã‚‰ã‹ã®ç†ç”±ã§ãƒžãƒ¼ã‚¸ã‚’è¡Œã‚ãªã„å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã¯é€šçŸ¥ã•ã‚Œã¾ã›ã‚“。通知を有効ã«ã™ã‚‹ã«ã¯ã€[optimize_throw_if_noop](../../operations/settings/settings.md#setting-optimize_throw_if_noop) 設定を使用ã—ã¦ãã ã•ã„。 +- `PARTITION` を指定ã™ã‚‹ã¨ã€æŒ‡å®šã•ã‚ŒãŸãƒ‘ーティションã®ã¿ãŒæœ€é©åŒ–ã•ã‚Œã¾ã™ã€‚[パーティションå¼ã®è¨­å®šæ–¹æ³•](alter/partition.md#how-to-set-partition-expression)。 +- `FINAL` を指定ã™ã‚‹ã¨ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒã™ã§ã«1ã¤ã®ãƒ‘ーツã«ã‚ã‚‹å ´åˆã§ã‚‚最é©åŒ–ãŒè¡Œã‚ã‚Œã¾ã™ã€‚ã“ã®å‹•ä½œã¯ [optimize_skip_merged_partitions](../../operations/settings/settings.md#optimize-skip-merged-partitions) ã§åˆ¶å¾¡ã§ãã¾ã™ã€‚åŒæ™‚ã«ãƒžãƒ¼ã‚¸ãŒè¡Œã‚ã‚Œã¦ã„ã‚‹å ´åˆã§ã‚‚ã€ãƒžãƒ¼ã‚¸ã¯å¼·åˆ¶ã•ã‚Œã¾ã™ã€‚ +- `DEDUPLICATE` を指定ã™ã‚‹ã¨ã€å®Œå…¨ã«åŒä¸€ã®è¡Œï¼ˆby-clauseãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„é™ã‚Šï¼‰ãŒé‡è¤‡æŽ’除ã•ã‚Œã¾ã™ï¼ˆã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒæ¯”較ã•ã‚Œã¾ã™ï¼‰ã€‚ã“れ㯠MergeTree エンジンã«ã®ã¿æ„味ãŒã‚ã‚Šã¾ã™ã€‚ + +`OPTIMIZE` クエリã®å®Ÿè¡Œã®ãŸã‚ã«éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リカを待ã¤æ™‚間(秒)を指定ã™ã‚‹ã«ã¯ã€[replication_wait_for_inactive_replica_timeout](../../operations/settings/settings.md#replication-wait-for-inactive-replica-timeout) 設定を使用ã—ã¾ã™ã€‚ + +:::note +`alter_sync` ㌠`2` ã«è¨­å®šã•ã‚Œã¦ã„ã¦ã€ã„ãã¤ã‹ã®ãƒ¬ãƒ—リカ㌠`replication_wait_for_inactive_replica_timeout` 設定ã§æŒ‡å®šã•ã‚ŒãŸæ™‚間を超ãˆã¦éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã‚ã‚‹å ´åˆã€`UNFINISHED` 例外ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ +::: + +## BY å¼ + +é‡è¤‡æŽ’除をã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã§ã¯ãªãカスタムセットã®ã‚«ãƒ©ãƒ ã§è¡Œã„ãŸã„å ´åˆã€ã‚«ãƒ©ãƒ ã®ãƒªã‚¹ãƒˆã‚’明示的ã«æŒ‡å®šã™ã‚‹ã‹ã€[`*`](../../sql-reference/statements/select/index.md#asterisk)ã€[`COLUMNS`](../../sql-reference/statements/select/index.md#columns-expression)ã€[`EXCEPT`](../../sql-reference/statements/select/index.md#except-modifier) å¼ã®ä»»æ„ã®çµ„ã¿åˆã‚ã›ã‚’使用ã§ãã¾ã™ã€‚明示的ã¾ãŸã¯æš—é»™ã«å±•é–‹ã•ã‚ŒãŸã‚«ãƒ©ãƒ ãƒªã‚¹ãƒˆã«ã¯ã€è¡Œã®é †åºä»˜ã‘å¼ï¼ˆä¸»ã‚­ãƒ¼ãŠã‚ˆã³ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ï¼‰ãŠã‚ˆã³ãƒ‘ーティショニングå¼ï¼ˆãƒ‘ーティションキー)ã§æŒ‡å®šã•ã‚ŒãŸã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’å«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +`*` 㯠`SELECT` ã¨åŒã˜ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ï¼š[MATERIALIZED](../../sql-reference/statements/create/table.md#materialized) ãŠã‚ˆã³ [ALIAS](../../sql-reference/statements/create/table.md#alias) カラムã¯å±•é–‹ç”¨ã«ä½¿ç”¨ã•ã‚Œã¾ã›ã‚“。 + +ã¾ãŸã€ã‚«ãƒ©ãƒ ã®ç©ºã®ãƒªã‚¹ãƒˆã‚’指定ã—ãŸã‚Šã€ç©ºã®ãƒªã‚¹ãƒˆã«ãªã‚‹å¼ã‚’書ã„ãŸã‚Šã€`ALIAS` カラムã§é‡è¤‡æŽ’除を行ã†ã“ã¨ã¯ã‚¨ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™ã€‚ +::: + +**構文** + +``` sql +OPTIMIZE TABLE table DEDUPLICATE; -- ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ  +OPTIMIZE TABLE table DEDUPLICATE BY *; -- MATERIALIZED ãŠã‚ˆã³ ALIAS カラムを除外ã™ã‚‹ +OPTIMIZE TABLE table DEDUPLICATE BY colX,colY,colZ; +OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT colX; +OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT (colX, colY); +OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex'); +OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT colX; +OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT (colX, colY); +``` + +**例** + +以下ã®ã‚ˆã†ãªãƒ†ãƒ¼ãƒ–ルを考ãˆã¾ã™ï¼š + +``` sql +CREATE TABLE example ( + primary_key Int32, + secondary_key Int32, + value UInt32, + partition_key UInt32, + materialized_value UInt32 MATERIALIZED 12345, + aliased_value UInt32 ALIAS 2, + PRIMARY KEY primary_key +) ENGINE=MergeTree +PARTITION BY partition_key +ORDER BY (primary_key, secondary_key); +``` +``` sql +INSERT INTO example (primary_key, secondary_key, value, partition_key) +VALUES (0, 0, 0, 0), (0, 0, 0, 0), (1, 1, 2, 2), (1, 1, 2, 3), (1, 1, 3, 3); +``` +``` sql +SELECT * FROM example; +``` +çµæžœ: +``` + +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 0 │ 0 │ 0 │ 0 │ +│ 0 │ 0 │ 0 │ 0 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 2 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 3 │ +│ 1 │ 1 │ 3 │ 3 │ +└─────────────┴───────────────┴───────┴───────────────┘ +``` +次ã«æŒ™ã’ã‚‹ã™ã¹ã¦ã®ä¾‹ã¯ã€ã“ã®5è¡Œã‹ã‚‰æˆã‚‹çŠ¶æ…‹ã«å¯¾ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +#### `DEDUPLICATE` +é‡è¤‡æŽ’除ã®ãŸã‚ã®ã‚«ãƒ©ãƒ ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒè€ƒæ…®ã•ã‚Œã¾ã™ã€‚ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã®å€¤ãŒå‰ã®è¡Œã®å¯¾å¿œã™ã‚‹å€¤ã¨ç­‰ã—ã„å ´åˆã«é™ã‚Šã€è¡ŒãŒå‰Šé™¤ã•ã‚Œã¾ã™ï¼š + +``` sql +OPTIMIZE TABLE example FINAL DEDUPLICATE; +``` +``` sql +SELECT * FROM example; +``` +çµæžœ: +``` +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 2 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 0 │ 0 │ 0 │ 0 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 3 │ +│ 1 │ 1 │ 3 │ 3 │ +└─────────────┴───────────────┴───────┴───────────────┘ +``` +#### `DEDUPLICATE BY *` +カラムãŒæš—黙的ã«æŒ‡å®šã•ã‚Œã‚‹ã¨ã€ãƒ†ãƒ¼ãƒ–ル㯠`ALIAS` ã¾ãŸã¯ `MATERIALIZED` ã§ãªã„ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã§é‡è¤‡æŽ’除ã•ã‚Œã¾ã™ã€‚上記ã®ãƒ†ãƒ¼ãƒ–ルを考慮ã™ã‚‹ã¨ã€ã“れら㯠`primary_key`ã€`secondary_key`ã€`value`ã€`partition_key` カラムã§ã™ï¼š +```sql +OPTIMIZE TABLE example FINAL DEDUPLICATE BY *; +``` +``` sql +SELECT * FROM example; +``` +çµæžœ: +``` +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 2 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 0 │ 0 │ 0 │ 0 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 3 │ +│ 1 │ 1 │ 3 │ 3 │ +└─────────────┴───────────────┴───────┴───────────────┘ +``` +#### `DEDUPLICATE BY * EXCEPT` +`ALIAS` ã¾ãŸã¯ `MATERIALIZED` ã§ãªã„ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã§é‡è¤‡æŽ’除ã—ã€æ˜Žç¤ºçš„ã« `value` 以外ã¨ã™ã‚‹ï¼š`primary_key`ã€`secondary_key`ã€`partition_key` カラム。 + +``` sql +OPTIMIZE TABLE example FINAL DEDUPLICATE BY * EXCEPT value; +``` +``` sql +SELECT * FROM example; +``` +çµæžœ: +``` +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 2 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 0 │ 0 │ 0 │ 0 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 3 │ +└─────────────┴───────────────┴───────┴───────────────┘ +``` +#### `DEDUPLICATE BY ` +`primary_key`ã€`secondary_key`ã€`partition_key` カラムã§æ˜Žç¤ºçš„ã«é‡è¤‡æŽ’除: +```sql +OPTIMIZE TABLE example FINAL DEDUPLICATE BY primary_key, secondary_key, partition_key; +``` +``` sql +SELECT * FROM example; +``` +çµæžœ: +``` +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 2 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 0 │ 0 │ 0 │ 0 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 3 │ +└─────────────┴───────────────┴───────┴───────────────┘ +``` +#### `DEDUPLICATE BY COLUMNS()` +æ­£è¦è¡¨ç¾ã«ä¸€è‡´ã™ã‚‹ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã§é‡è¤‡æŽ’除:`primary_key`ã€`secondary_key`ã€`partition_key` カラム: +```sql +OPTIMIZE TABLE example FINAL DEDUPLICATE BY COLUMNS('.*_key'); +``` +``` sql +SELECT * FROM example; +``` +çµæžœ: +``` +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 0 │ 0 │ 0 │ 0 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 2 │ +└─────────────┴───────────────┴───────┴───────────────┘ +┌─primary_key─┬─secondary_key─┬─value─┬─partition_key─┠+│ 1 │ 1 │ 2 │ 3 │ +└─────────────┴───────────────┴───────┴───────────────┘ +``` diff --git a/docs/ja/sql-reference/statements/rename.md b/docs/ja/sql-reference/statements/rename.md new file mode 100644 index 00000000000..5e77cbe5d10 --- /dev/null +++ b/docs/ja/sql-reference/statements/rename.md @@ -0,0 +1,62 @@ +--- +slug: /ja/sql-reference/statements/rename +sidebar_position: 48 +sidebar_label: RENAME +--- + +# RENAME ステートメント + +データベースã€ãƒ†ãƒ¼ãƒ–ルã€ã¾ãŸã¯ Dictionary ã®åå‰ã‚’変更ã—ã¾ã™ã€‚複数ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’å˜ä¸€ã®ã‚¯ã‚¨ãƒªã§ãƒªãƒãƒ¼ãƒ ã§ãã¾ã™ã€‚複数ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’伴ㆠ`RENAME` クエリã¯éžåŽŸå­çš„æ“作ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。エンティティã®åå‰ã‚’原å­çš„ã«äº¤æ›ã™ã‚‹ã«ã¯ã€[EXCHANGE](./exchange.md) ステートメントを使用ã—ã¦ãã ã•ã„。 + +**構文** + +```sql +RENAME [DATABASE|TABLE|DICTIONARY] name TO new_name [,...] [ON CLUSTER cluster] +``` + +## RENAME DATABASE + +データベースã®åå‰ã‚’変更ã—ã¾ã™ã€‚ + +**構文** + +```sql +RENAME DATABASE atomic_database1 TO atomic_database2 [,...] [ON CLUSTER cluster] +``` + +## RENAME TABLE + +一ã¤ã¾ãŸã¯è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルã®åå‰ã‚’変更ã—ã¾ã™ã€‚ + +テーブルã®ãƒªãƒãƒ¼ãƒ ã¯è»½é‡ãªæ“作ã§ã™ã€‚`TO` ã®å¾Œã«ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’指定ã™ã‚‹ã¨ã€ãƒ†ãƒ¼ãƒ–ルã¯ãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ç§»å‹•ã—ã¾ã™ã€‚ãŸã ã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¯åŒã˜ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«å­˜åœ¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•ã‚Œã¾ã™ã€‚ ã‚‚ã—一ã¤ã®ã‚¯ã‚¨ãƒªã§è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルをリãƒãƒ¼ãƒ ã™ã‚‹ã¨ã€ãã®æ“作ã¯åŽŸå­çš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。部分的ã«å®Ÿè¡Œã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã€ä»–ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ `Table ... does not exist ...` エラーãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +RENAME TABLE [db1.]name1 TO [db2.]name2 [,...] [ON CLUSTER cluster] +``` + +**例** + +```sql +RENAME TABLE table_A TO table_A_bak, table_B TO table_B_bak; +``` + +ãã—ã¦ã€ã‚ˆã‚Šã‚·ãƒ³ãƒ—ル㪠SQL を使ã†ã“ã¨ã‚‚ã§ãã¾ã™ï¼š +```sql +RENAME table_A TO table_A_bak, table_B TO table_B_bak; +``` + +## RENAME DICTIONARY + +一ã¤ã¾ãŸã¯è¤‡æ•°ã® Dictionary ã®åå‰ã‚’変更ã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯ã€Dictionary をデータベース間ã§ç§»å‹•ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**構文** + +```sql +RENAME DICTIONARY [db0.]dict_A TO [db1.]dict_B [,...] [ON CLUSTER cluster] +``` + +**関連項目** + +- [Dictionaries](../../sql-reference/dictionaries/index.md) diff --git a/docs/ja/sql-reference/statements/revoke.md b/docs/ja/sql-reference/statements/revoke.md new file mode 100644 index 00000000000..c81b11abb98 --- /dev/null +++ b/docs/ja/sql-reference/statements/revoke.md @@ -0,0 +1,49 @@ +--- +slug: /ja/sql-reference/statements/revoke +sidebar_position: 39 +sidebar_label: REVOKE +--- + +# REVOKE ステートメント + +ユーザーã¾ãŸã¯ãƒ­ãƒ¼ãƒ«ã‹ã‚‰æ¨©é™ã‚’å–り消ã—ã¾ã™ã€‚ + +## 構文 + +**ユーザーã‹ã‚‰ã®æ¨©é™ã®å–り消ã—** + +``` sql +REVOKE [ON CLUSTER cluster_name] privilege[(column_name [,...])] [,...] ON {db.table|db.*|*.*|table|*} FROM {user | CURRENT_USER} [,...] | ALL | ALL EXCEPT {user | CURRENT_USER} [,...] +``` + +**ユーザーã‹ã‚‰ã®ãƒ­ãƒ¼ãƒ«ã®å–り消ã—** + +``` sql +REVOKE [ON CLUSTER cluster_name] [ADMIN OPTION FOR] role [,...] FROM {user | role | CURRENT_USER} [,...] | ALL | ALL EXCEPT {user_name | role_name | CURRENT_USER} [,...] +``` + +## 説明 + +権é™ã‚’å–り消ã™ã«ã¯ã€å–り消ã—ãŸã„ã‚‚ã®ã‚ˆã‚Šåºƒã„範囲ã®æ¨©é™ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã«ãれを使用ã§ãã¾ã™ã€‚例ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ `SELECT (x,y)` 権é™ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€ç®¡ç†è€…㯠`REVOKE SELECT(x,y) ...` ã‚„ `REVOKE SELECT * ...`ã€ã•ã‚‰ã«ã¯ `REVOKE ALL PRIVILEGES ...` クエリを実行ã—ã¦ã“ã®æ¨©é™ã‚’å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### 部分的ãªå–り消㗠+ +権é™ã®ä¸€éƒ¨ã‚’å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ `SELECT *.*` 権é™ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルやデータベースã‹ã‚‰èª­ã¿å–る権é™ã‚’å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 例 + +`john` ユーザーアカウントã«ã€`accounts` データベースを除ãã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®é¸æŠžæ¨©é™ã‚’与ãˆã‚‹: + +``` sql +GRANT SELECT ON *.* TO john; +REVOKE SELECT ON accounts.* FROM john; +``` + +`mira` ユーザーアカウントã«ã€`accounts.staff` テーブルã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’é¸æŠžã™ã‚‹æ¨©é™ã‚’与ãˆã¾ã™ãŒã€`wage` カラムを除ãã¾ã™ã€‚ + +``` sql +GRANT SELECT ON accounts.staff TO mira; +REVOKE SELECT(wage) ON accounts.staff FROM mira; +``` + +[原文ã¯ã“ã¡ã‚‰](https://clickhouse.com/docs/ja/operations/settings/settings/) diff --git a/docs/ja/sql-reference/statements/select/all.md b/docs/ja/sql-reference/statements/select/all.md new file mode 100644 index 00000000000..08f4e7ddb72 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/all.md @@ -0,0 +1,20 @@ +--- +slug: /ja/sql-reference/statements/select/all +sidebar_label: ALL +--- + +# ALLå¥ + +テーブル内ã«è¤‡æ•°ã®ä¸€è‡´ã™ã‚‹è¡ŒãŒã‚ã‚‹å ´åˆã€`ALL`ã¯ãれらã™ã¹ã¦ã‚’è¿”ã—ã¾ã™ã€‚`SELECT ALL`ã¯ã€`DISTINCT`ãªã—ã®`SELECT`ã¨åŒä¸€ã§ã™ã€‚`ALL`ã¨`DISTINCT`ã®ä¸¡æ–¹ãŒæŒ‡å®šã•ã‚Œã‚‹ã¨ã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ + +`ALL`ã¯é›†è¨ˆé–¢æ•°å†…ã§åŒã˜åŠ¹æžœï¼ˆå®Ÿè³ªçš„ã«ã¯ç„¡æ„味)ã§æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚例ãˆã°ï¼š + +```sql +SELECT sum(ALL number) FROM numbers(10); +``` +ã¯æ¬¡ã¨åŒã˜ã§ã™ï¼š + +```sql +SELECT sum(number) FROM numbers(10); +``` + diff --git a/docs/ja/sql-reference/statements/select/array-join.md b/docs/ja/sql-reference/statements/select/array-join.md new file mode 100644 index 00000000000..53667a974fc --- /dev/null +++ b/docs/ja/sql-reference/statements/select/array-join.md @@ -0,0 +1,312 @@ +--- +slug: /ja/sql-reference/statements/select/array-join +sidebar_label: ARRAY JOIN +--- + +# ARRAY JOIN å¥ + +ARRAY JOINå¥ã¯ã€é…列カラムをå«ã‚€ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ã€ãã®ã‚«ãƒ©ãƒ ã®å„é…列è¦ç´ ã‚’æŒã¤æ–°ã—ã„テーブルを生æˆã—ã€ä»–ã®ã‚«ãƒ©ãƒ ã®å€¤ã‚’複製ã™ã‚‹ä¸€èˆ¬çš„ãªæ“作ã§ã™ã€‚ã“ã‚Œã¯ã€`ARRAY JOIN`å¥ãŒè¡Œã†åŸºæœ¬çš„ãªå†…容ã§ã™ã€‚ + +åå‰ã®ç”±æ¥ã¯ã€é…列ã¾ãŸã¯ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã¨ã®`JOIN`ã®å®Ÿè¡Œã¨ã—ã¦è¦‹ã‚‹ã“ã¨ãŒã§ãã‚‹ã“ã¨ã«ã‚ã‚Šã¾ã™ã€‚ã“ã®ç›®çš„ã¯ã€[arrayJoin](../../../sql-reference/functions/array-join.md#functions_arrayjoin) 関数ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€å¥ã®æ©Ÿèƒ½ã¯ã‚ˆã‚Šåºƒç¯„ã§ã™ã€‚ + +構文: + +```sql +SELECT +FROM +[LEFT] ARRAY JOIN +[WHERE|PREWHERE ] +... +``` + +`SELECT` クエリã§ã¯ã€`ARRAY JOIN` å¥ã‚’1ã¤ã ã‘指定ã§ãã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹`ARRAY JOIN`ã®ã‚¿ã‚¤ãƒ—ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +- `ARRAY JOIN` - 基本ã®å ´åˆã€ç©ºã®é…列㯠`JOIN` ã®çµæžœã«å«ã¾ã‚Œã¾ã›ã‚“。 +- `LEFT ARRAY JOIN` - `JOIN` ã®çµæžœã«ç©ºã®é…列をæŒã¤è¡ŒãŒå«ã¾ã‚Œã¾ã™ã€‚空ã®é…列ã®å€¤ã¯ã€é…列è¦ç´ ã‚¿ã‚¤ãƒ—ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼ˆé€šå¸¸ã¯0ã€ç©ºæ–‡å­—列ã€ã¾ãŸã¯ NULL)ã«è¨­å®šã•ã‚Œã¾ã™ã€‚ + +## 基本的㪠ARRAY JOIN ã®ä¾‹ + +以下ã®ä¾‹ã§ã¯ã€`ARRAY JOIN` ãŠã‚ˆã³ `LEFT ARRAY JOIN` ã®ä½¿ç”¨æ³•ã‚’示ã—ã¾ã™ã€‚[Array](../../../sql-reference/data-types/array.md) タイプã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€å€¤ã‚’挿入ã—ã¾ã™: + +```sql +CREATE TABLE arrays_test +( + s String, + arr Array(UInt8) +) ENGINE = Memory; + +INSERT INTO arrays_test +VALUES ('Hello', [1,2]), ('World', [3,4,5]), ('Goodbye', []); +``` + +```response +┌─s───────────┬─arr─────┠+│ Hello │ [1,2] │ +│ World │ [3,4,5] │ +│ Goodbye │ [] │ +└─────────────┴─────────┘ +``` + +以下ã®ä¾‹ã¯ã€`ARRAY JOIN` å¥ã‚’使用ã—ã¾ã™: + +```sql +SELECT s, arr +FROM arrays_test +ARRAY JOIN arr; +``` + +```response +┌─s─────┬─arr─┠+│ Hello │ 1 │ +│ Hello │ 2 │ +│ World │ 3 │ +│ World │ 4 │ +│ World │ 5 │ +└───────┴─────┘ +``` + +次ã®ä¾‹ã¯ã€`LEFT ARRAY JOIN` å¥ã‚’使用ã—ã¾ã™: + +```sql +SELECT s, arr +FROM arrays_test +LEFT ARRAY JOIN arr; +``` + +```response +┌─s───────────┬─arr─┠+│ Hello │ 1 │ +│ Hello │ 2 │ +│ World │ 3 │ +│ World │ 4 │ +│ World │ 5 │ +│ Goodbye │ 0 │ +└─────────────┴─────┘ +``` + +## エイリアスã®ä½¿ç”¨ + +`ARRAY JOIN` å¥ã§é…列ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’指定ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€é…列項目ã«ã¯ã“ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ãŒã€é…列自体ã«ã¯å…ƒã®åå‰ã§ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚例: + +```sql +SELECT s, arr, a +FROM arrays_test +ARRAY JOIN arr AS a; +``` + +```response +┌─s─────┬─arr─────┬─a─┠+│ Hello │ [1,2] │ 1 │ +│ Hello │ [1,2] │ 2 │ +│ World │ [3,4,5] │ 3 │ +│ World │ [3,4,5] │ 4 │ +│ World │ [3,4,5] │ 5 │ +└───────┴─────────┴───┘ +``` + +エイリアスを使用ã—ã¦ã€å¤–部é…列ã¨ã®`ARRAY JOIN`を実行ã§ãã¾ã™ã€‚例: + +```sql +SELECT s, arr_external +FROM arrays_test +ARRAY JOIN [1, 2, 3] AS arr_external; +``` + +```response +┌─s───────────┬─arr_external─┠+│ Hello │ 1 │ +│ Hello │ 2 │ +│ Hello │ 3 │ +│ World │ 1 │ +│ World │ 2 │ +│ World │ 3 │ +│ Goodbye │ 1 │ +│ Goodbye │ 2 │ +│ Goodbye │ 3 │ +└─────────────┴──────────────┘ +``` + +複数ã®é…列ã¯ã€`ARRAY JOIN`å¥ã§ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`JOIN`ã¯åŒæ™‚ã«å®Ÿè¡Œã•ã‚Œã¾ã™ï¼ˆç›´å’Œã§ã‚ã‚Šã€ç›´ç©ã§ã¯ã‚ã‚Šã¾ã›ã‚“)。デフォルトã§ã¯ã€ã™ã¹ã¦ã®é…列ã¯åŒã˜ã‚µã‚¤ã‚ºã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例: + +```sql +SELECT s, arr, a, num, mapped +FROM arrays_test +ARRAY JOIN arr AS a, arrayEnumerate(arr) AS num, arrayMap(x -> x + 1, arr) AS mapped; +``` + +```response +┌─s─────┬─arr─────┬─a─┬─num─┬─mapped─┠+│ Hello │ [1,2] │ 1 │ 1 │ 2 │ +│ Hello │ [1,2] │ 2 │ 2 │ 3 │ +│ World │ [3,4,5] │ 3 │ 1 │ 4 │ +│ World │ [3,4,5] │ 4 │ 2 │ 5 │ +│ World │ [3,4,5] │ 5 │ 3 │ 6 │ +└───────┴─────────┴───┴─────┴────────┘ +``` + +以下ã®ä¾‹ã§ã¯ã€[arrayEnumerate](../../../sql-reference/functions/array-functions.md#array_functions-arrayenumerate)関数を使用ã—ã¦ã„ã¾ã™: + +```sql +SELECT s, arr, a, num, arrayEnumerate(arr) +FROM arrays_test +ARRAY JOIN arr AS a, arrayEnumerate(arr) AS num; +``` + +```response +┌─s─────┬─arr─────┬─a─┬─num─┬─arrayEnumerate(arr)─┠+│ Hello │ [1,2] │ 1 │ 1 │ [1,2] │ +│ Hello │ [1,2] │ 2 │ 2 │ [1,2] │ +│ World │ [3,4,5] │ 3 │ 1 │ [1,2,3] │ +│ World │ [3,4,5] │ 4 │ 2 │ [1,2,3] │ +│ World │ [3,4,5] │ 5 │ 3 │ [1,2,3] │ +└───────┴─────────┴───┴─────┴─────────────────────┘ +``` + +ç•°ãªã‚‹ã‚µã‚¤ã‚ºã®è¤‡æ•°ã®é…列ã¯æ¬¡ã®ã‚ˆã†ã«ã—ã¦çµåˆã§ãã¾ã™: `SETTINGS enable_unaligned_array_join = 1`。例: + +```sql +SELECT s, arr, a, b +FROM arrays_test ARRAY JOIN arr as a, [['a','b'],['c']] as b +SETTINGS enable_unaligned_array_join = 1; +``` + +```response +┌─s───────┬─arr─────┬─a─┬─b─────────┠+│ Hello │ [1,2] │ 1 │ ['a','b'] │ +│ Hello │ [1,2] │ 2 │ ['c'] │ +│ World │ [3,4,5] │ 3 │ ['a','b'] │ +│ World │ [3,4,5] │ 4 │ ['c'] │ +│ World │ [3,4,5] │ 5 │ [] │ +│ Goodbye │ [] │ 0 │ ['a','b'] │ +│ Goodbye │ [] │ 0 │ ['c'] │ +└─────────┴─────────┴───┴───────────┘ +``` + +## ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã¨ã® ARRAY JOIN + +`ARRAY JOIN` ã¯[ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ](../../../sql-reference/data-types/nested-data-structures/index.md)ã«ã‚‚対応ã—ã¦ã„ã¾ã™: + +```sql +CREATE TABLE nested_test +( + s String, + nest Nested( + x UInt8, + y UInt32) +) ENGINE = Memory; + +INSERT INTO nested_test +VALUES ('Hello', [1,2], [10,20]), ('World', [3,4,5], [30,40,50]), ('Goodbye', [], []); +``` + +```response +┌─s───────┬─nest.x──┬─nest.y─────┠+│ Hello │ [1,2] │ [10,20] │ +│ World │ [3,4,5] │ [30,40,50] │ +│ Goodbye │ [] │ [] │ +└─────────┴─────────┴────────────┘ +``` + +```sql +SELECT s, `nest.x`, `nest.y` +FROM nested_test +ARRAY JOIN nest; +``` + +```response +┌─s─────┬─nest.x─┬─nest.y─┠+│ Hello │ 1 │ 10 │ +│ Hello │ 2 │ 20 │ +│ World │ 3 │ 30 │ +│ World │ 4 │ 40 │ +│ World │ 5 │ 50 │ +└───────┴────────┴────────┘ +``` + +`ARRAY JOIN` ã§ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®åå‰ã‚’指定ã™ã‚‹å ´åˆã€ãã®æ„味ã¯ãれを構æˆã™ã‚‹ã™ã¹ã¦ã®é…列è¦ç´ ã«å¯¾ã™ã‚‹ `ARRAY JOIN` ã¨åŒã˜ã§ã™ã€‚以下ã«ä¾‹ã‚’示ã—ã¾ã™: + +```sql +SELECT s, `nest.x`, `nest.y` +FROM nested_test +ARRAY JOIN `nest.x`, `nest.y`; +``` + +```response +┌─s─────┬─nest.x─┬─nest.y─┠+│ Hello │ 1 │ 10 │ +│ Hello │ 2 │ 20 │ +│ World │ 3 │ 30 │ +│ World │ 4 │ 40 │ +│ World │ 5 │ 50 │ +└───────┴────────┴────────┘ +``` + +以下ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã‚‚æ„味ãŒã‚ã‚Šã¾ã™: + +```sql +SELECT s, `nest.x`, `nest.y` +FROM nested_test +ARRAY JOIN `nest.x`; +``` + +```response +┌─s─────┬─nest.x─┬─nest.y─────┠+│ Hello │ 1 │ [10,20] │ +│ Hello │ 2 │ [10,20] │ +│ World │ 3 │ [30,40,50] │ +│ World │ 4 │ [30,40,50] │ +│ World │ 5 │ [30,40,50] │ +└───────┴────────┴────────────┘ +``` + +エイリアスをãƒã‚¹ãƒˆã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿æ§‹é€ ã«ä½¿ç”¨ã—ã¦ã€`JOIN`çµæžœã¾ãŸã¯ã‚½ãƒ¼ã‚¹é…列をé¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚例: + +```sql +SELECT s, `n.x`, `n.y`, `nest.x`, `nest.y` +FROM nested_test +ARRAY JOIN nest AS n; +``` + +```response +┌─s─────┬─n.x─┬─n.y─┬─nest.x──┬─nest.y─────┠+│ Hello │ 1 │ 10 │ [1,2] │ [10,20] │ +│ Hello │ 2 │ 20 │ [1,2] │ [10,20] │ +│ World │ 3 │ 30 │ [3,4,5] │ [30,40,50] │ +│ World │ 4 │ 40 │ [3,4,5] │ [30,40,50] │ +│ World │ 5 │ 50 │ [3,4,5] │ [30,40,50] │ +└───────┴─────┴─────┴─────────┴────────────┘ +``` + +[arrayEnumerate](../../../sql-reference/functions/array-functions.md#array_functions-arrayenumerate)関数を使用ã™ã‚‹ä¾‹: + +```sql +SELECT s, `n.x`, `n.y`, `nest.x`, `nest.y`, num +FROM nested_test +ARRAY JOIN nest AS n, arrayEnumerate(`nest.x`) AS num; +``` + +```response +┌─s─────┬─n.x─┬─n.y─┬─nest.x──┬─nest.y─────┬─num─┠+│ Hello │ 1 │ 10 │ [1,2] │ [10,20] │ 1 │ +│ Hello │ 2 │ 20 │ [1,2] │ [10,20] │ 2 │ +│ World │ 3 │ 30 │ [3,4,5] │ [30,40,50] │ 1 │ +│ World │ 4 │ 40 │ [3,4,5] │ [30,40,50] │ 2 │ +│ World │ 5 │ 50 │ [3,4,5] │ [30,40,50] │ 3 │ +└───────┴─────┴─────┴─────────┴────────────┴─────┘ +``` + +## 実装ã®è©³ç´° + +クエリ実行ã®é †åºã¯ã€`ARRAY JOIN` 実行時ã«æœ€é©åŒ–ã•ã‚Œã¾ã™ã€‚`ARRAY JOIN` ã¯ã‚¯ã‚¨ãƒªå†…ã§å¸¸ã« [WHERE](../../../sql-reference/statements/select/where.md)/[PREWHERE](../../../sql-reference/statements/select/prewhere.md) å¥ã®å‰ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒã€`ARRAY JOIN` ã®çµæžœãŒãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã«ä½¿ç”¨ã•ã‚Œãªã„é™ã‚Šã€æŠ€è¡“çš„ã«ã¯ä»»æ„ã®é †åºã§å®Ÿè¡Œã§ãã¾ã™ã€‚処ç†ã®é †åºã¯ã‚¯ã‚¨ãƒªã‚ªãƒ—ティマイザã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ + +### 短絡評価関数ã¨ã®äº’æ›æ€§ãŒãªã„ + +[短絡評価関数](../../../operations/settings/index.md#short-circuit-function-evaluation) ã¯ã€`if`ã€`multiIf`ã€`and`ã€`or` ãªã©ã®ç‰¹å®šã®é–¢æ•°ã§è¤‡é›‘ãªå¼ã®å®Ÿè¡Œã‚’最é©åŒ–ã™ã‚‹æ©Ÿèƒ½ã§ã€ã‚¼ãƒ­é™¤ç®—ãªã©ã®æ½œåœ¨çš„ãªä¾‹å¤–ãŒã“れらã®é–¢æ•°ã®å®Ÿè¡Œä¸­ã«ç™ºç”Ÿã™ã‚‹ã®ã‚’防ãŽã¾ã™ã€‚ + +`arrayJoin` ã¯å¸¸ã«å®Ÿè¡Œã•ã‚Œã€çŸ­çµ¡è©•ä¾¡é–¢æ•°ã«ã¯å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“。ã“ã‚Œã¯ã€ã™ã¹ã¦ã®ä»–ã®é–¢æ•°ã¨ã¯ç•°ãªã‚Šã€ã‚¯ã‚¨ãƒªåˆ†æžãŠã‚ˆã³å®Ÿè¡Œä¸­ã«åˆ¥é€”処ç†ã•ã‚Œã€`arrayJoin` ã®çµæžœã«ä¾å­˜ã—ã¦çµæžœã®è¡Œæ•°ãŒæ±ºã¾ã‚‹ãŸã‚ã§ã™ã€‚ãã®ãŸã‚ã€`arrayJoin` ã®é…延評価ã®å®Ÿè£…ã¯è¤‡é›‘ã§é«˜ã‚³ã‚¹ãƒˆã¨ãªã‚Šã¾ã™ã€‚ + +## 関連コンテンツ + +- ブログ: [ClickHouseã§ã®æ™‚系列データ処ç†](https://clickhouse.com/blog/working-with-time-series-data-and-functions-ClickHouse) diff --git a/docs/ja/sql-reference/statements/select/distinct.md b/docs/ja/sql-reference/statements/select/distinct.md new file mode 100644 index 00000000000..1bd5ee4129b --- /dev/null +++ b/docs/ja/sql-reference/statements/select/distinct.md @@ -0,0 +1,110 @@ +--- +slug: /ja/sql-reference/statements/select/distinct +sidebar_label: DISTINCT +--- + +# DISTINCTå¥ + +`SELECT DISTINCT`ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªçµæžœã«ã¯ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªè¡Œã ã‘ãŒæ®‹ã‚Šã¾ã™ã€‚ã¤ã¾ã‚Šã€çµæžœå†…ã§å®Œå…¨ã«ä¸€è‡´ã™ã‚‹è¡Œã®ã‚»ãƒƒãƒˆã‹ã‚‰ã¯ã€å˜ä¸€ã®è¡Œã®ã¿ãŒæ®‹ã‚Šã¾ã™ã€‚ + +ユニークãªå€¤ã‚’æŒã¤ã¹ãカラムã®ãƒªã‚¹ãƒˆã‚’指定ã§ãã¾ã™: `SELECT DISTINCT ON (column1, column2,...)`。カラムãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã¯ã€ã™ã¹ã¦ãŒè€ƒæ…®ã•ã‚Œã¾ã™ã€‚ + +以下ã®ãƒ†ãƒ¼ãƒ–ルを考ãˆã¦ã¿ã¾ã—ょã†: + +```text +┌─a─┬─b─┬─c─┠+│ 1 │ 1 │ 1 │ +│ 1 │ 1 │ 1 │ +│ 2 │ 2 │ 2 │ +│ 2 │ 2 │ 2 │ +│ 1 │ 1 │ 2 │ +│ 1 │ 2 │ 2 │ +└───┴───┴───┘ +``` + +カラムを指定ã›ãšã«`DISTINCT`を使用ã™ã‚‹å ´åˆ: + +```sql +SELECT DISTINCT * FROM t1; +``` + +```text +┌─a─┬─b─┬─c─┠+│ 1 │ 1 │ 1 │ +│ 2 │ 2 │ 2 │ +│ 1 │ 1 │ 2 │ +│ 1 │ 2 │ 2 │ +└───┴───┴───┘ +``` + +カラムを指定ã—ã¦`DISTINCT`を使用ã™ã‚‹å ´åˆ: + +```sql +SELECT DISTINCT ON (a,b) * FROM t1; +``` + +```text +┌─a─┬─b─┬─c─┠+│ 1 │ 1 │ 1 │ +│ 2 │ 2 │ 2 │ +│ 1 │ 2 │ 2 │ +└───┴───┴───┘ +``` + +## DISTINCTã¨ORDER BY + +ClickHouseã¯ã€ç•°ãªã‚‹ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦`DISTINCT`ãŠã‚ˆã³`ORDER BY`å¥ã‚’使用ã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚`DISTINCT`å¥ã¯`ORDER BY`å¥ã‚ˆã‚Šã‚‚å…ˆã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +以下ã®ãƒ†ãƒ¼ãƒ–ルを考ãˆã¦ã¿ã¾ã—ょã†: + +``` text +┌─a─┬─b─┠+│ 2 │ 1 │ +│ 1 │ 2 │ +│ 3 │ 3 │ +│ 2 │ 4 │ +└───┴───┘ +``` + +データをé¸æŠžã™ã‚‹å ´åˆ: + +```sql +SELECT DISTINCT a FROM t1 ORDER BY b ASC; +``` + +``` text +┌─a─┠+│ 2 │ +│ 1 │ +│ 3 │ +└───┘ +``` +ç•°ãªã‚‹ã‚½ãƒ¼ãƒˆé †ã§ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹å ´åˆ: + +```sql +SELECT DISTINCT a FROM t1 ORDER BY b DESC; +``` + +``` text +┌─a─┠+│ 3 │ +│ 1 │ +│ 2 │ +└───┘ +``` + +è¡Œ`2, 4`ã¯ã‚½ãƒ¼ãƒˆã®å‰ã«ã‚«ãƒƒãƒˆã•ã‚Œã¾ã—ãŸã€‚ + +クエリをプログラムã™ã‚‹ã¨ãã«ã¯ã€ã“ã®å®Ÿè£…ã®ç‰¹æ€§ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +## NULLã®å‡¦ç† + +`DISTINCT`ã¯ã€[NULL](../../../sql-reference/syntax.md#null-literal)を特定ã®å€¤ã¨ã¿ãªã—ã¦å‡¦ç†ã—ã€`NULL==NULL`ã§ã‚ã‚‹ã‹ã®ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€`DISTINCT`ã®çµæžœã§ã¯ã€`NULL`ã¨ã®ç•°ãªã‚‹çµ„ã¿åˆã‚ã›ã¯ä¸€åº¦ã ã‘発生ã—ã¾ã™ã€‚ä»–ã®å¤šãã®æ–‡è„ˆã«ãŠã‘ã‚‹`NULL`ã®å‡¦ç†ã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ + +## 代替案 + +`SELECT`å¥ã§æŒ‡å®šã—ãŸåŒã˜å€¤ã®ã‚»ãƒƒãƒˆã«å¯¾ã—ã¦[GROUP BY](../../../sql-reference/statements/select/group-by.md)ã‚’é©ç”¨ã™ã‚‹ã“ã¨ã§ã€é›†è¨ˆé–¢æ•°ã‚’使用ã›ãšã«åŒã˜çµæžœã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã—ã‹ã—ã€`GROUP BY`アプローãƒã¨ã¯ã„ãã¤ã‹ã®é•ã„ãŒã‚ã‚Šã¾ã™: + +- `DISTINCT`ã¯`GROUP BY`ã¨ã¨ã‚‚ã«é©ç”¨ã§ãã¾ã™ã€‚ +- [ORDER BY](../../../sql-reference/statements/select/order-by.md)ãŒçœç•¥ã•ã‚Œã€[LIMIT](../../../sql-reference/statements/select/limit.md)ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã¯å¿…è¦ãªç•°ãªã‚‹è¡Œã®æ•°ã‚’読ã¿å–ã£ãŸæ™‚点ã§å³åº§ã«çµ‚了ã—ã¾ã™ã€‚ +- データブロックã¯ã‚¯ã‚¨ãƒªã®å®Ÿè¡ŒãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ãŸãšã«å‡¦ç†ã•ã‚Œã‚‹ã¨ãã®ã¾ã¾å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/select/except.md b/docs/ja/sql-reference/statements/select/except.md new file mode 100644 index 00000000000..2cbacd11819 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/except.md @@ -0,0 +1,153 @@ +--- +slug: /ja/sql-reference/statements/select/except +sidebar_label: EXCEPT +--- + +# EXCEPTå¥ + +`EXCEPT`å¥ã¯ã€æœ€åˆã®ã‚¯ã‚¨ãƒªã®çµæžœã‹ã‚‰2番目ã®ã‚¯ã‚¨ãƒªã®çµæžœã‚’除ã„ãŸè¡Œã®ã¿ã‚’è¿”ã—ã¾ã™ã€‚クエリã¯ã€ã‚«ãƒ©ãƒ ã®æ•°ã€é †åºã€åž‹ãŒä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`EXCEPT`ã®çµæžœã«ã¯é‡è¤‡ã™ã‚‹è¡ŒãŒå«ã¾ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +括弧ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€è¤‡æ•°ã®`EXCEPT`æ–‡ã¯å·¦ã‹ã‚‰å³ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚`EXCEPT`演算å­ã¯`UNION`å¥ã¨åŒã˜å„ªå…ˆåº¦ã‚’æŒã¡ã€`INTERSECT`å¥ã‚ˆã‚Šä½Žã„優先度をæŒã£ã¦ã„ã¾ã™ã€‚ + +``` sql +SELECT column1 [, column2 ] +FROM table1 +[WHERE condition] + +EXCEPT + +SELECT column1 [, column2 ] +FROM table2 +[WHERE condition] + +``` +æ¡ä»¶ã¯è¦ä»¶ã«åŸºã¥ãä»»æ„ã®å¼ã‚’指定ã§ãã¾ã™ã€‚ + +## 例 + +ã“ã“ã§ã¯ã€1ã‹ã‚‰10ã¾ã§ã®æ•°å­—ã§ã€3ã‹ã‚‰8ã¾ã§ã®æ•°å­—ã«_å«ã¾ã‚Œãªã„_ã‚‚ã®ã‚’è¿”ã™ç°¡å˜ãªä¾‹ã‚’示ã—ã¾ã™ï¼š + +クエリ: + +``` sql +SELECT number FROM numbers(1,10) EXCEPT SELECT number FROM numbers(3,6); +``` + +çµæžœ: + +```response +┌─number─┠+│ 1 │ +│ 2 │ +│ 9 │ +│ 10 │ +└────────┘ +``` + +`EXCEPT`ã¨`INTERSECT`ã¯ç•°ãªã‚‹ãƒ–ール論ç†ã‚’用ã„ã¦ã—ã°ã—ã°ç›¸äº’ã«ä½¿ã‚ã‚Œã€å…±é€šã®ã‚«ãƒ©ãƒ (ã¾ãŸã¯ã‚«ãƒ©ãƒ )ã‚’æŒã¤2ã¤ã®ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚例ãˆã°ã€ãƒˆãƒ¬ãƒ¼ãƒ‰ä¾¡æ ¼ã¨ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’å«ã‚€æ•°ç™¾ä¸‡è¡Œã®ä»®æƒ³é€šè²¨ã®æ­´å²ãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚‹ã¨ã—ã¾ã™: + +```sql +CREATE TABLE crypto_prices +( + trade_date Date, + crypto_name String, + volume Float32, + price Float32, + market_cap Float32, + change_1_day Float32 +) +ENGINE = MergeTree +PRIMARY KEY (crypto_name, trade_date); + +INSERT INTO crypto_prices + SELECT * + FROM s3( + 'https://learn-clickhouse.s3.us-east-2.amazonaws.com/crypto_prices.csv', + 'CSVWithNames' +); + +SELECT * FROM crypto_prices +WHERE crypto_name = 'Bitcoin' +ORDER BY trade_date DESC +LIMIT 10; +``` + +```response +┌─trade_date─┬─crypto_name─┬──────volume─┬────price─┬───market_cap─┬──change_1_day─┠+│ 2020-11-02 │ Bitcoin │ 30771456000 │ 13550.49 │ 251119860000 │ -0.013585099 │ +│ 2020-11-01 │ Bitcoin │ 24453857000 │ 13737.11 │ 254569760000 │ -0.0031840964 │ +│ 2020-10-31 │ Bitcoin │ 30306464000 │ 13780.99 │ 255372070000 │ 0.017308505 │ +│ 2020-10-30 │ Bitcoin │ 30581486000 │ 13546.52 │ 251018150000 │ 0.008084608 │ +│ 2020-10-29 │ Bitcoin │ 56499500000 │ 13437.88 │ 248995320000 │ 0.012552661 │ +│ 2020-10-28 │ Bitcoin │ 35867320000 │ 13271.29 │ 245899820000 │ -0.02804481 │ +│ 2020-10-27 │ Bitcoin │ 33749879000 │ 13654.22 │ 252985950000 │ 0.04427984 │ +│ 2020-10-26 │ Bitcoin │ 29461459000 │ 13075.25 │ 242251000000 │ 0.0033826586 │ +│ 2020-10-25 │ Bitcoin │ 24406921000 │ 13031.17 │ 241425220000 │ -0.0058658565 │ +│ 2020-10-24 │ Bitcoin │ 24542319000 │ 13108.06 │ 242839880000 │ 0.013650347 │ +└────────────┴─────────────┴─────────────┴──────────┴──────────────┴───────────────┘ +``` + +今ã€ä¿æœ‰ã™ã‚‹ä»®æƒ³é€šè²¨ã®ãƒªã‚¹ãƒˆã¨ã‚³ã‚¤ãƒ³ã®æžšæ•°ã‚’å«ã‚€`holdings`ã¨ã„ã†ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹ã¨ä»®å®šã—ã¾ã™: + +```sql +CREATE TABLE holdings +( + crypto_name String, + quantity UInt64 +) +ENGINE = MergeTree +PRIMARY KEY (crypto_name); + +INSERT INTO holdings VALUES + ('Bitcoin', 1000), + ('Bitcoin', 200), + ('Ethereum', 250), + ('Ethereum', 5000), + ('DOGEFI', 10), + ('Bitcoin Diamond', 5000); +``` + +**「$10を下回ã£ãŸã“ã¨ãŒãªã„æŒã£ã¦ã„るコインã¯ã©ã‚Œã§ã™ã‹ï¼Ÿã€**ã¨ã„ã†è³ªå•ã«ç­”ãˆã‚‹ãŸã‚ã«`EXCEPT`を使用ã§ãã¾ã™: + +```sql +SELECT crypto_name FROM holdings +EXCEPT +SELECT crypto_name FROM crypto_prices +WHERE price < 10; +``` + +çµæžœ: + +```response +┌─crypto_name─┠+│ Bitcoin │ +│ Bitcoin │ +└─────────────┘ +``` + +ã“ã®ã“ã¨ã¯ã€ç§ãŸã¡ãŒæ‰€æœ‰ã™ã‚‹å››ã¤ã®ä»®æƒ³é€šè²¨ã®ã†ã¡ã€ã“ã“ã§ç¤ºã•ã‚ŒãŸé™ã‚‰ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã€Bitcoinã®ã¿ãŒ$10以下ã«ä¸‹ãŒã£ãŸã“ã¨ãŒãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +## EXCEPT DISTINCT + +å‰ã®ã‚¯ã‚¨ãƒªã§ã¯ã€çµæžœã«è¤‡æ•°ã®Bitcoinä¿æœ‰ãŒå«ã¾ã‚Œã¦ã„ã¾ã—ãŸã€‚`EXCEPT`ã«`DISTINCT`を追加ã—ã¦ã€çµæžœã‹ã‚‰é‡è¤‡ã™ã‚‹è¡Œã‚’å–り除ãã“ã¨ãŒã§ãã¾ã™: + +```sql +SELECT crypto_name FROM holdings +EXCEPT DISTINCT +SELECT crypto_name FROM crypto_prices +WHERE price < 10; +``` + +çµæžœ: + +```response +┌─crypto_name─┠+│ Bitcoin │ +└─────────────┘ +``` + + +**関連項目** + +- [UNION](union.md#union-clause) +- [INTERSECT](intersect.md#intersect-clause) diff --git a/docs/ja/sql-reference/statements/select/format.md b/docs/ja/sql-reference/statements/select/format.md new file mode 100644 index 00000000000..59a8bf4394a --- /dev/null +++ b/docs/ja/sql-reference/statements/select/format.md @@ -0,0 +1,18 @@ +--- +slug: /ja/sql-reference/statements/select/format +sidebar_label: FORMAT +--- + +# FORMATå¥ + +ClickHouseã¯ã€ã‚¯ã‚¨ãƒªçµæžœãªã©ã«ä½¿ç”¨ã§ãる幅広ã„[シリアル化フォーマット](../../../interfaces/formats.md)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚`SELECT`ã®å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’é¸æŠžã™ã‚‹æ–¹æ³•ã¯è¤‡æ•°ã‚ã‚Šã€ãã®ä¸€ã¤ã¨ã—ã¦ã‚¯ã‚¨ãƒªã®æœ«å°¾ã«`FORMAT format`を指定ã—ã¦ã€çµæžœãƒ‡ãƒ¼ã‚¿ã‚’特定ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§å–å¾—ã™ã‚‹æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚ + +特定ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€åˆ©ä¾¿æ€§ã€ä»–ã®ã‚·ã‚¹ãƒ†ãƒ ã¨ã®çµ±åˆã€ã¾ãŸã¯ãƒ‘フォーマンスå‘上ã®ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +## デフォルトフォーマット + +`FORMAT`å¥ã‚’çœç•¥ã™ã‚‹ã¨ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ã€è¨­å®šã¨ClickHouseサーãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã®ä¸¡æ–¹ã«ä¾å­˜ã—ã¾ã™ã€‚[HTTPインターフェース](../../../interfaces/http.md)ã‚„ãƒãƒƒãƒãƒ¢ãƒ¼ãƒ‰ã§ã®[コマンドラインクライアント](../../../interfaces/cli.md)ã®å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ `TabSeparated`ã§ã™ã€‚対話モードã§ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã§ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ `PrettyCompact`(人間ãŒèª­ã¿ã‚„ã™ã„コンパクトãªãƒ†ãƒ¼ãƒ–ルを生æˆï¼‰ã§ã™ã€‚ + +## 実装ã®è©³ç´° + +コマンドラインクライアントを使用ã™ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯å¸¸ã«ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯çµŒç”±ã§åŠ¹çŽ‡çš„ãªå†…部フォーマット(`Native`)ã§æ¸¡ã•ã‚Œã¾ã™ã€‚クライアントã¯ã‚¯ã‚¨ãƒªã®`FORMAT`å¥ã‚’自己解釈ã—ã€è‡ªåˆ†ã§ãƒ‡ãƒ¼ã‚¿ã‚’フォーマットã—ã¾ã™ï¼ˆã“ã‚Œã«ã‚ˆã‚Šã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚„サーãƒãƒ¼ã®è² è·ãŒæ¸›ã‚Šã¾ã™ï¼‰ã€‚ diff --git a/docs/ja/sql-reference/statements/select/from.md b/docs/ja/sql-reference/statements/select/from.md new file mode 100644 index 00000000000..72436dbf5f5 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/from.md @@ -0,0 +1,80 @@ +--- +slug: /ja/sql-reference/statements/select/from +sidebar_label: FROM +--- + +# FROMå¥ + +`FROM`å¥ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã®ã‚½ãƒ¼ã‚¹ã‚’指定ã—ã¾ã™: + +- [テーブル](../../../engines/table-engines/index.md) +- [サブクエリ](../../../sql-reference/statements/select/index.md) +- [テーブル関数](../../../sql-reference/table-functions/index.md#table-functions) + +`FROM`å¥ã®æ©Ÿèƒ½ã‚’æ‹¡å¼µã™ã‚‹ãŸã‚ã«ã€[JOIN](../../../sql-reference/statements/select/join.md) ãŠã‚ˆã³ [ARRAY JOIN](../../../sql-reference/statements/select/array-join.md)å¥ã‚‚使用ã§ãã¾ã™ã€‚ + +サブクエリã¯ã€`FROM`å¥å†…ã§æ‹¬å¼§ã§å›²ã¾ã‚ŒãŸåˆ¥ã®`SELECT`クエリã§ã™ã€‚ + +`FROM`ã«ã¯è¤‡æ•°ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã€ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ãれらã«å¯¾ã™ã‚‹[CROSS JOIN](../../../sql-reference/statements/select/join.md)を実行ã™ã‚‹ã“ã¨ã¨åŒç­‰ã§ã™ã€‚ + +`FROM`ã¯ã€`SELECT`å¥ã®å‰ã«ã‚ªãƒ—ションã§è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯æ¨™æº–SQLã®ClickHouse特有ã®æ‹¡å¼µã§ã‚ã‚Šã€`SELECT`文を読ã¿ã‚„ã™ãã—ã¾ã™ã€‚例: + +```sql +FROM table +SELECT * +``` + +## FINALä¿®é£¾å­ + +`FINAL`ãŒæŒ‡å®šã•ã‚Œã‚‹ã¨ã€ClickHouseã¯çµæžœã‚’è¿”ã™å‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’完全ã«ãƒžãƒ¼ã‚¸ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルエンジンã®ãƒžãƒ¼ã‚¸ä¸­ã«èµ·ã“ã‚‹ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚‚実行ã•ã‚Œã¾ã™ã€‚ + +以下ã®ãƒ†ãƒ¼ãƒ–ルエンジンを使用ã—ã¦ã„るテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹å ´åˆã«é©ç”¨ã•ã‚Œã¾ã™: +- `ReplacingMergeTree` +- `SummingMergeTree` +- `AggregatingMergeTree` +- `CollapsingMergeTree` +- `VersionedCollapsingMergeTree` + +`FINAL`付ãã®`SELECT`クエリã¯ä¸¦åˆ—ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚[max_final_threads](../../../operations/settings/settings.md#max-final-threads)設定ã¯ä½¿ç”¨ã™ã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰æ•°ã‚’制é™ã—ã¾ã™ã€‚ + +### 欠点 + +`FINAL`を使用ã™ã‚‹ã‚¯ã‚¨ãƒªã¯ã€`FINAL`を使用ã—ãªã„é¡žä¼¼ã®ã‚¯ã‚¨ãƒªã‚ˆã‚Šã‚‚若干é…ã実行ã•ã‚Œã¾ã™ã€‚ç†ç”±ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +- クエリ実行中ã«ãƒ‡ãƒ¼ã‚¿ãŒãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹ã€‚ +- `FINAL`付ãã®ã‚¯ã‚¨ãƒªã¯ã€ã‚¯ã‚¨ãƒªã§æŒ‡å®šã—ãŸã‚«ãƒ©ãƒ ã«åŠ ãˆã¦ä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ ã‚’読ã¿å–ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ + +`FINAL`ã¯é€šå¸¸ãƒžãƒ¼ã‚¸æ™‚ã«è¡Œã‚れる処ç†ã‚’クエリã®å®Ÿè¡Œæ™‚ã«ãƒ¡ãƒ¢ãƒªå†…ã§è¡Œã†ãŸã‚ã€è¿½åŠ ã®è¨ˆç®—リソースã¨ãƒ¡ãƒ¢ãƒªãƒªã‚½ãƒ¼ã‚¹ã‚’è¦æ±‚ã—ã¾ã™ã€‚ã—ã‹ã—ã€(データãŒã¾ã å®Œå…¨ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚)正確ãªçµæžœã‚’å¾—ã‚‹ãŸã‚ã«FINALを使用ã™ã‚‹ã“ã¨ãŒæ™‚々必è¦ã§ã™ã€‚ãã‚Œã¯ãƒžãƒ¼ã‚¸ã‚’強制ã™ã‚‹`OPTIMIZE`を実行ã™ã‚‹ã‚ˆã‚Šã‚‚コストãŒä½Žã„ã§ã™ã€‚ + +`FINAL`を使用ã™ã‚‹ä»£ã‚ã‚Šã«ã€`MergeTree`エンジンã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセスãŒã¾ã ç™ºç”Ÿã—ã¦ã„ãªã„ã¨ä»®å®šã—ã€é›†è¨ˆã‚’é©ç”¨ã—ã¦(例ãˆã°ã€é‡è¤‡ã‚’破棄ã™ã‚‹ãªã©)ãã‚Œã«å¯¾å‡¦ã™ã‚‹ç•°ãªã‚‹ã‚¯ã‚¨ãƒªã‚’使用ã™ã‚‹ã“ã¨ãŒæ™‚々å¯èƒ½ã§ã™ã€‚クエリã§å¿…è¦ãªçµæžœã‚’å¾—ã‚‹ãŸã‚ã«`FINAL`を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ãれを行ã†ã“ã¨ã¯å•é¡Œã‚ã‚Šã¾ã›ã‚“ãŒã€è¿½åŠ ã®å‡¦ç†ãŒå¿…è¦ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã«ã‚¯ã‚¨ãƒªã‚’自動的ã«é©ç”¨ã™ã‚‹ãŸã‚ã«ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロファイルã§[FINAL](../../../operations/settings/settings.md#final)設定を使用ã—ã¦`FINAL`ã‚’é©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### 使用例 + +`FINAL`キーワードを使用ã™ã‚‹å ´åˆ + +```sql +SELECT x, y FROM mytable FINAL WHERE x > 1; +``` + +クエリレベルã§`FINAL`を設定ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å ´åˆ + +```sql +SELECT x, y FROM mytable WHERE x > 1 SETTINGS final = 1; +``` + +セッションレベルã§`FINAL`を設定ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å ´åˆ + +```sql +SET final = 1; +SELECT x, y FROM mytable WHERE x > 1; +``` + +## 実装ã®è©³ç´° + +`FROM`å¥ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€`system.one`テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ãŒèª­ã¿å–られã¾ã™ã€‚ +`system.one`テーブルã¯æ­£ç¢ºã«1行をå«ã‚“ã§ã„ã¾ã™ (ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ä»–ã®DBMSsã§è¦‹ã‚‰ã‚Œã‚‹DUALテーブルã¨åŒã˜ç›®çš„ã‚’æžœãŸã—ã¾ã™)。 + +クエリを実行ã™ã‚‹ãŸã‚ã«ã€ã‚¯ã‚¨ãƒªã«ãƒªã‚¹ãƒˆã•ã‚ŒãŸã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒé©åˆ‡ãªãƒ†ãƒ¼ãƒ–ルã‹ã‚‰æŠ½å‡ºã•ã‚Œã¾ã™ã€‚外部クエリã«å¿…è¦ã®ãªã„カラムã¯ã‚µãƒ–クエリã‹ã‚‰æ¨ã¦ã‚‰ã‚Œã¾ã™ã€‚ +クエリã«ã‚«ãƒ©ãƒ ãŒãƒªã‚¹ãƒˆã•ã‚Œã¦ã„ãªã„å ´åˆ (`SELECT count() FROM t`ãªã©)ã€ã„ãšã‚Œã‹ã®ã‚«ãƒ©ãƒ ãŒãƒ†ãƒ¼ãƒ–ルã‹ã‚‰æŠ½å‡ºã•ã‚Œã¾ã™ (ã§ãã‚‹ã ã‘å°ã•ã„ã‚‚ã®ãŒå¥½ã¾ã‚Œã¾ã™)ã€è¡Œæ•°ã‚’計算ã™ã‚‹ãŸã‚ã§ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/select/group-by.md b/docs/ja/sql-reference/statements/select/group-by.md new file mode 100644 index 00000000000..ec14c5bf963 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/group-by.md @@ -0,0 +1,391 @@ +--- +slug: /ja/sql-reference/statements/select/group-by +sidebar_label: GROUP BY +--- + +# GROUP BYå¥ + +`GROUP BY`å¥ã¯`SELECT`クエリを集計モードã«åˆ‡ã‚Šæ›¿ãˆã€ä»¥ä¸‹ã®ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™: + +- `GROUP BY`å¥ã«ã¯å¼ã®ãƒªã‚¹ãƒˆï¼ˆã¾ãŸã¯é•·ã•1ã®ãƒªã‚¹ãƒˆã¨è¦‹ãªã•ã‚Œã‚‹å˜ä¸€ã®å¼ï¼‰ãŒå«ã¾ã‚Œã¾ã™ã€‚ã“ã®ãƒªã‚¹ãƒˆã¯ã€Œã‚°ãƒ«ãƒ¼ãƒ—化キーã€ã¨ã—ã¦æ©Ÿèƒ½ã—ã€ãã‚Œãžã‚Œã®å€‹ã€…ã®å¼ã¯ã€Œã‚­ãƒ¼è¡¨ç¾ã€ã¨å‘¼ã°ã‚Œã¾ã™ã€‚ +- [SELECT](../../../sql-reference/statements/select/index.md)ã€[HAVING](../../../sql-reference/statements/select/having.md)ã€ãŠã‚ˆã³[ORDER BY](../../../sql-reference/statements/select/order-by.md)å¥å†…ã®ã™ã¹ã¦ã®å¼ã¯ã€ã‚­ãƒ¼è¡¨ç¾ã«åŸºã¥ã„ã¦è¨ˆç®—ã•ã‚Œã‚‹ã‹ã€éžã‚­ãƒ¼å¼ï¼ˆãƒ—レーンカラムをå«ã‚€ï¼‰ä¸Šã®[集約関数](../../../sql-reference/aggregate-functions/index.md)ã«ã‚ˆã£ã¦è¨ˆç®—ã•ã‚Œã‚‹**å¿…è¦ãŒã‚ã‚Šã¾ã™**。言ã„æ›ãˆã‚Œã°ã€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰é¸æŠžã•ã‚ŒãŸå„カラムã¯ã€ã‚­ãƒ¼è¡¨ç¾ã¾ãŸã¯é›†ç´„関数ã®ã„ãšã‚Œã‹ã®ä¸­ã§ä½¿ç”¨ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã€ä¸¡æ–¹ã§ä½¿ç”¨ã•ã‚Œã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。 +- 集約ã•ã‚ŒãŸ`SELECT`クエリã®çµæžœã¯ã€ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ル内ã®ã€Œã‚°ãƒ«ãƒ¼ãƒ—化キーã€ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯å€¤ã®æ•°ã ã‘行をå«ã¿ã¾ã™ã€‚ã“ã®å‡¦ç†ã¯é€šå¸¸ã€è¡Œæ•°ã‚’æ¡é•ã„ã«æ¸›å°‘ã•ã›ã¾ã™ãŒã€å¿…ãšã—ã‚‚ãã†ã¨ã¯é™ã‚Šã¾ã›ã‚“:ã™ã¹ã¦ã®ã€Œã‚°ãƒ«ãƒ¼ãƒ—化キーã€å€¤ãŒç•°ãªã£ã¦ã„ã‚‹å ´åˆã€è¡Œæ•°ã¯åŒã˜ã¾ã¾ã«ãªã‚Šã¾ã™ã€‚ + +カラムåã®ä»£ã‚ã‚Šã«ã‚«ãƒ©ãƒ ç•ªå·ã§ãƒ†ãƒ¼ãƒ–ル内ã®ãƒ‡ãƒ¼ã‚¿ã‚’グループ化ã—ãŸã„å ´åˆã¯ã€è¨­å®š[enable_positional_arguments](../../../operations/settings/settings.md#enable-positional-arguments)を有効ã«ã—ã¾ã™ã€‚ + +:::note +テーブルã«å¯¾ã—ã¦é›†è¨ˆã‚’実行ã™ã‚‹è¿½åŠ ã®æ–¹æ³•ãŒã‚ã‚Šã¾ã™ã€‚クエリãŒé›†è¨ˆé–¢æ•°å†…ã«ãƒ†ãƒ¼ãƒ–ルカラムã®ã¿ã‚’å«ã‚€å ´åˆã€`GROUP BYå¥`ã‚’çœç•¥ã§ãã€ã‚­ãƒ¼ã®ç©ºã®é›†åˆã§é›†è¨ˆãŒä»®å®šã•ã‚Œã¾ã™ã€‚ã“ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã¯å¸¸ã«1è¡Œã®ã¿ã‚’è¿”ã—ã¾ã™ã€‚ +::: + +## NULLã®å‡¦ç† + +グループ化ã«ãŠã„ã¦ã€ClickHouseã¯[NULL](../../../sql-reference/syntax.md#null-literal)を値ã¨ã—ã¦è§£é‡ˆã—ã€`NULL==NULL`ã§ã™ã€‚ã“ã‚Œã¯ä»–ã®å¤šãã®æ–‡è„ˆã§ã®`NULL`処ç†ã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ + +ã“ã‚ŒãŒä½•ã‚’æ„味ã™ã‚‹ã‹ã‚’示ã™ä¾‹ã‚’以下ã«ç¤ºã—ã¾ã™ã€‚ + +次ã®ã‚ˆã†ãªãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹ã¨ä»®å®šã—ã¾ã™: + +``` text +┌─x─┬────y─┠+│ 1 │ 2 │ +│ 2 │ á´ºáµá´¸á´¸ │ +│ 3 │ 2 │ +│ 3 │ 3 │ +│ 3 │ á´ºáµá´¸á´¸ │ +└───┴──────┘ +``` + +クエリ`SELECT sum(x), y FROM t_null_big GROUP BY y`ã®çµæžœã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +``` text +┌─sum(x)─┬────y─┠+│ 4 │ 2 │ +│ 3 │ 3 │ +│ 5 │ á´ºáµá´¸á´¸ │ +└────────┴──────┘ +``` + +`y = NULL`ã«å¯¾ã™ã‚‹`GROUP BY`ãŒ`x`ã‚’åˆè¨ˆã—ãŸã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ã¾ã‚‹ã§`NULL`ãŒã“ã®å€¤ã§ã‚ã‚‹ã‹ã®ã‚ˆã†ã«ã€‚ + +`GROUP BY`ã«è¤‡æ•°ã®ã‚­ãƒ¼ã‚’渡ã™å ´åˆã€çµæžœã¯é¸æŠžã®ã™ã¹ã¦ã®çµ„ã¿åˆã‚ã›ã‚’æä¾›ã—ã¾ã™ã€‚`NULL`ãŒç‰¹å®šã®å€¤ã§ã‚ã‚‹ã‹ã®ã‚ˆã†ã«ã€‚ + +## ROLLUPä¿®é£¾å­ + +`ROLLUP`修飾å­ã¯ã€`GROUP BY`リスト内ã®é †åºã«åŸºã¥ã„ã¦ã‚­ãƒ¼è¡¨ç¾ã®å°è¨ˆã‚’計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚å°è¨ˆè¡Œã¯çµæžœãƒ†ãƒ¼ãƒ–ルã®å¾Œã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +å°è¨ˆã¯é€†é †ã§è¨ˆç®—ã•ã‚Œã¾ã™ï¼šæœ€åˆã«ãƒªã‚¹ãƒˆã®æœ€å¾Œã®ã‚­ãƒ¼è¡¨ç¾ã«å¯¾ã—ã¦å°è¨ˆãŒè¨ˆç®—ã•ã‚Œã€æ¬¡ã«å‰ã®ã‚­ãƒ¼è¡¨ç¾ã«å¯¾ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹ã¨ã„ã†å…·åˆã«ã€æœ€åˆã®ã‚­ãƒ¼è¡¨ç¾ã«è‡³ã‚‹ã¾ã§ã§ã™ã€‚ + +å°è¨ˆè¡Œã§ã¯ã€æ—¢ã«ã€Œã‚°ãƒ«ãƒ¼ãƒ—化ã€ã•ã‚ŒãŸã‚­ãƒ¼è¡¨ç¾ã®å€¤ãŒ`0`ã¾ãŸã¯ç©ºã®è¡Œã«è¨­å®šã•ã‚Œã¾ã™ã€‚ + +:::note +[HAVING](../../../sql-reference/statements/select/having.md)å¥ãŒå°è¨ˆã®çµæžœã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã‚’ç†è§£ã—ã¦ãã ã•ã„。 +::: + +**例** + +テーブル`t`を考ãˆã¾ã™: + +```text +┌─year─┬─month─┬─day─┠+│ 2019 │ 1 │ 5 │ +│ 2019 │ 1 │ 15 │ +│ 2020 │ 1 │ 5 │ +│ 2020 │ 1 │ 15 │ +│ 2020 │ 10 │ 5 │ +│ 2020 │ 10 │ 15 │ +└──────┴───────┴─────┘ +``` + +クエリ: + +```sql +SELECT year, month, day, count(*) FROM t GROUP BY ROLLUP(year, month, day); +``` +`GROUP BY`セクションã«3ã¤ã®ã‚­ãƒ¼è¡¨ç¾ãŒã‚ã‚‹ãŸã‚ã€çµæžœã«ã¯å³ã‹ã‚‰å·¦ã«ã€Œãƒ­ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—ã€ã•ã‚ŒãŸ4ã¤ã®å°è¨ˆãƒ†ãƒ¼ãƒ–ルãŒå«ã¾ã‚Œã¾ã™: + +- `GROUP BY year, month, day`; +- `GROUP BY year, month`(ãã—ã¦`day`カラムã¯ã‚¼ãƒ­ã§æº€ãŸã•ã‚Œã¦ã„ã¾ã™ï¼‰; +- `GROUP BY year`(ãã—ã¦ä»Šã‚„`month, day`カラムã¯ã©ã¡ã‚‰ã‚‚ゼロã§æº€ãŸã•ã‚Œã¦ã„ã¾ã™ï¼‰; +- ãã—ã¦åˆè¨ˆï¼ˆãã—ã¦3ã¤ã®ã‚­ãƒ¼è¡¨ç¾ã®ã‚«ãƒ©ãƒ ã¯ã™ã¹ã¦ã‚¼ãƒ­ã§ã™ï¼‰ã€‚ + +```text +┌─year─┬─month─┬─day─┬─count()─┠+│ 2020 │ 10 │ 15 │ 1 │ +│ 2020 │ 1 │ 5 │ 1 │ +│ 2019 │ 1 │ 5 │ 1 │ +│ 2020 │ 1 │ 15 │ 1 │ +│ 2019 │ 1 │ 15 │ 1 │ +│ 2020 │ 10 │ 5 │ 1 │ +└──────┴───────┴─────┴─────────┘ +┌─year─┬─month─┬─day─┬─count()─┠+│ 2019 │ 1 │ 0 │ 2 │ +│ 2020 │ 1 │ 0 │ 2 │ +│ 2020 │ 10 │ 0 │ 2 │ +└──────┴───────┴─────┴─────────┘ +┌─year─┬─month─┬─day─┬─count()─┠+│ 2019 │ 0 │ 0 │ 2 │ +│ 2020 │ 0 │ 0 │ 4 │ +└──────┴───────┴─────┴─────────┘ +┌─year─┬─month─┬─day─┬─count()─┠+│ 0 │ 0 │ 0 │ 6 │ +└──────┴───────┴─────┴─────────┘ +``` +ã“ã®ã‚¯ã‚¨ãƒªã¯`WITH`キーワードを使用ã—ã¦ã‚‚書ãã“ã¨ãŒã§ãã¾ã™ã€‚ +```sql +SELECT year, month, day, count(*) FROM t GROUP BY year, month, day WITH ROLLUP; +``` + +**ã“ã¡ã‚‰ã‚‚å‚ç…§** + +- SQL標準互æ›æ€§ã®ãŸã‚ã®[group_by_use_nulls](/docs/ja/operations/settings/settings.md#group_by_use_nulls)設定。 + +## CUBEä¿®é£¾å­ + +`CUBE`修飾å­ã¯ã€`GROUP BY`リスト内ã®ã‚­ãƒ¼è¡¨ç¾ã®ã‚らゆる組ã¿åˆã‚ã›ã«å¯¾ã—ã¦å°è¨ˆã‚’計算ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚å°è¨ˆè¡Œã¯çµæžœãƒ†ãƒ¼ãƒ–ルã®å¾Œã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + +å°è¨ˆè¡Œã§ã¯ã€ã™ã¹ã¦ã®ã€Œã‚°ãƒ«ãƒ¼ãƒ—化ã€ã‚­ãƒ¼è¡¨ç¾ã®å€¤ã‚’`0`ã¾ãŸã¯ç©ºã®è¡Œã«è¨­å®šã—ã¾ã™ã€‚ + +:::note +[HAVING](../../../sql-reference/statements/select/having.md)å¥ãŒå°è¨ˆã®çµæžœã«å½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã‚’ç†è§£ã—ã¦ãã ã•ã„。 +::: + +**例** + +テーブル`t`を考ãˆã¾ã™: + +```text +┌─year─┬─month─┬─day─┠+│ 2019 │ 1 │ 5 │ +│ 2019 │ 1 │ 15 │ +│ 2020 │ 1 │ 5 │ +│ 2020 │ 1 │ 15 │ +│ 2020 │ 10 │ 5 │ +│ 2020 │ 10 │ 15 │ +└──────┴───────┴─────┘ +``` + +クエリ: + +```sql +SELECT year, month, day, count(*) FROM t GROUP BY CUBE(year, month, day); +``` + +`GROUP BY`セクションã«3ã¤ã®ã‚­ãƒ¼è¡¨ç¾ãŒã‚ã‚‹ãŸã‚ã€çµæžœã«ã¯ã€ã™ã¹ã¦ã®ã‚­ãƒ¼è¡¨ç¾ã®çµ„ã¿åˆã‚ã›ã«å¯¾ã™ã‚‹8ã¤ã®å°è¨ˆãƒ†ãƒ¼ãƒ–ルãŒå«ã¾ã‚Œã¾ã™: + +- `GROUP BY year, month, day` +- `GROUP BY year, month` +- `GROUP BY year, day` +- `GROUP BY year` +- `GROUP BY month, day` +- `GROUP BY month` +- `GROUP BY day` +- ãã—ã¦åˆè¨ˆã€‚ + +`GROUP BY`ã‹ã‚‰é™¤å¤–ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã¯ã‚¼ãƒ­ã§æº€ãŸã•ã‚Œã¾ã™ã€‚ + +```text +┌─year─┬─month─┬─day─┬─count()─┠+│ 2020 │ 10 │ 15 │ 1 │ +│ 2020 │ 1 │ 5 │ 1 │ +│ 2019 │ 1 │ 5 │ 1 │ +│ 2020 │ 1 │ 15 │ 1 │ +│ 2019 │ 1 │ 15 │ 1 │ +│ 2020 │ 10 │ 5 │ 1 │ +└──────┴───────┴─────┴─────────┘ +┌─year─┬─month─┬─day─┬─count()─┠+│ 2019 │ 1 │ 0 │ 2 │ +│ 2020 │ 1 │ 0 │ 2 │ +│ 2020 │ 10 │ 0 │ 2 │ +└──────┴───────┴─────┴─────────┘ +┌─year─┬─month─┬─day─┬─count()─┠+│ 2020 │ 0 │ 5 │ 2 │ +│ 2019 │ 0 │ 5 │ 1 │ +│ 2020 │ 0 │ 15 │ 2 │ +│ 2019 │ 0 │ 15 │ 1 │ +└──────┴───────┴─────┴─────────┘ +┌─year─┬─month─┬─day─┬─count()─┠+│ 2019 │ 0 │ 0 │ 2 │ +│ 2020 │ 0 │ 0 │ 4 │ +└──────┴───────┴─────┴─────────┘ +┌─year─┬─month─┬─day─┬─count()─┠+│ 0 │ 1 │ 5 │ 2 │ +│ 0 │ 10 │ 15 │ 1 │ +│ 0 │ 10 │ 5 │ 1 │ +│ 0 │ 1 │ 15 │ 2 │ +└──────┴───────┴─────┴─────────┘ +┌─year─┬─month─┬─day─┬─count()─┠+│ 0 │ 1 │ 0 │ 4 │ +│ 0 │ 10 │ 0 │ 2 │ +└──────┴───────┴─────┴─────────┘ +┌─year─┬─month─┬─day─┬─count()─┠+│ 0 │ 0 │ 5 │ 3 │ +│ 0 │ 0 │ 15 │ 3 │ +└──────┴───────┴─────┴─────────┘ +┌─year─┬─month─┬─day─┬─count()─┠+│ 0 │ 0 │ 0 │ 6 │ +└──────┴───────┴─────┴─────────┘ +``` +ã“ã®ã‚¯ã‚¨ãƒªã¯`WITH`キーワードを使用ã—ã¦ã‚‚書ãã“ã¨ãŒã§ãã¾ã™ã€‚ +```sql +SELECT year, month, day, count(*) FROM t GROUP BY year, month, day WITH CUBE; +``` + +**ã“ã¡ã‚‰ã‚‚å‚ç…§** + +- SQL標準互æ›æ€§ã®ãŸã‚ã®[group_by_use_nulls](/docs/ja/operations/settings/settings.md#group_by_use_nulls)設定。 + +## WITH TOTALSä¿®é£¾å­ + +`WITH TOTALS`修飾å­ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€è¿½åŠ ã®è¡ŒãŒè¨ˆç®—ã•ã‚Œã¾ã™ã€‚ã“ã®è¡Œã¯ã€ã‚­ãƒ¼åˆ—ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼ˆã‚¼ãƒ­ã‚„空行)ãŒå«ã¾ã‚Œã€é›†ç´„関数ã®åˆ—ã«ã¯ã™ã¹ã¦ã®è¡Œã‚’å«ã‚€ã€Œåˆè¨ˆã€å€¤ãŒè¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +ã“ã®è¿½åŠ ã®è¡Œã¯ã€`JSON*`ã€`TabSeparated*`ã€ãŠã‚ˆã³ `Pretty*`フォーマットã§ã®ã¿ã€ä»–ã®è¡Œã¨ã¯åˆ¥ã«ç”Ÿæˆã•ã‚Œã¾ã™ï¼š + +- `XML`ãŠã‚ˆã³`JSON*`フォーマットã§ã¯ã€ã“ã®è¡Œã¯å€‹åˆ¥ã®â€˜totals’フィールドã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ +- `TabSeparated*`ã€`CSV*` ãŠã‚ˆã³ `Vertical` フォーマットã§ã¯ã€ç©ºè¡Œã®å¾Œï¼ˆä»–ã®ãƒ‡ãƒ¼ã‚¿å¾Œï¼‰ã«ç¶šã„ã¦ä¸»è¦ãªçµæžœã®å¾Œã«è¡ŒãŒæ¥ã¾ã™ã€‚ +- `Pretty*`フォーマットã§ã¯ã€ã“ã®è¡Œã¯ä¸»è¦ãªçµæžœã®å¾Œã«åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ +- `Template`フォーマットã§ã¯ã€æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ³ãƒ—レートã«å¾“ã£ã¦è¡ŒãŒå‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ +- ãã®ä»–ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 + +:::note +totalsã¯`SELECT`クエリã®çµæžœã«å‡ºåŠ›ã•ã‚Œã€`INSERT INTO ... SELECT`ã§ã¯å‡ºåŠ›ã•ã‚Œã¾ã›ã‚“。 +::: + +[HAVING](../../../sql-reference/statements/select/having.md)ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€`WITH TOTALS`ã¯ç•°ãªã‚‹æ–¹æ³•ã§å®Ÿè¡Œã§ãã¾ã™ã€‚ã“ã®å‹•ä½œã¯`totals_mode`設定ã«ä¾å­˜ã—ã¾ã™ã€‚ + +### åˆè¨ˆå‡¦ç†ã®è¨­å®š + +デフォルトã§ã¯ã€`totals_mode = 'before_having'`ã§ã™ã€‚ã“ã®å ´åˆã€â€˜totals’ã¯ã€HAVINGãŠã‚ˆã³`max_rows_to_group_by`を通éŽã—ãªã‹ã£ãŸã™ã¹ã¦ã®è¡Œã‚’å«ã‚ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ + +ä»–ã®é¸æŠžè‚¢ã¯ã€HAVINGを通éŽã—ãŸè¡Œã®ã¿ã‚’‘totals’ã«å«ã‚ã€`max_rows_to_group_by`ã¨`group_by_overflow_mode = 'any'`ã‚’æŒã¤å ´åˆã«ç•°ãªã‚‹å‹•ä½œã‚’ã—ã¾ã™ã€‚ + +`after_having_exclusive` – `max_rows_to_group_by`を通éŽã—ãªã‹ã£ãŸè¡Œã¯å«ã¾ã‚Œã¾ã›ã‚“。言ã„æ›ãˆã‚Œã°ã€â€˜totals’ã¯`max_rows_to_group_by`ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã‚ˆã‚Šã‚‚å°‘ãªã„ã‹ã€åŒã˜æ•°ã®è¡Œã‚’æŒã¡ã¾ã™ã€‚ + +`after_having_inclusive` – ‘totals’ã«â€˜max_rows_to_group_by’を通éŽã—ãªã‹ã£ãŸã™ã¹ã¦ã®è¡Œã‚’å«ã‚ã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€â€˜totals’ã¯`max_rows_to_group_by`ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã‚ˆã‚Šã‚‚多ãã®è¡Œã‚’æŒã¤ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +`after_having_auto` – HAVINGを通éŽã—ãŸè¡Œã®æ•°ã‚’æ•°ãˆã¾ã™ã€‚デフォルトã§50%以上ã®å ´åˆã€â€˜totals’ã«â€˜max_rows_to_group_by’を通éŽã—ãªã‹ã£ãŸã™ã¹ã¦ã®è¡Œã‚’å«ã‚ã¾ã™ã€‚ãã†ã§ãªã‘ã‚Œã°ã€ãれらをå«ã‚ã¾ã›ã‚“。 + +`totals_auto_threshold` – デフォルトã§ã¯0.5。`after_having_auto`ã®ä¿‚数。 + +`max_rows_to_group_by`ã¨`group_by_overflow_mode = 'any'`ãŒä½¿ç”¨ã•ã‚Œã¦ã„ãªã„å ´åˆã€`after_having`ã®ã™ã¹ã¦ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã¯åŒã˜ã§ã‚ã‚Šã€ã©ã‚Œã‚’使用ã—ã¦ã‚‚ã‹ã¾ã„ã¾ã›ã‚“(例ãˆã°ã€`after_having_auto`)。 + +[JOIN](../../../sql-reference/statements/select/join.md)å¥å†…ã®å‰¯å•åˆã›ã‚‚å«ã‚ã¦ã€å‰¯å•åˆã›ã§`WITH TOTALS`を使用ã§ãã¾ã™ï¼ˆã“ã®å ´åˆã€å¯¾å¿œã™ã‚‹åˆè¨ˆå€¤ãŒçµåˆã•ã‚Œã¾ã™ï¼‰ã€‚ + +## GROUP BY ALL + +`GROUP BY ALL`ã¯ã€é›†è¨ˆé–¢æ•°ã§ã¯ãªã„SELECTã•ã‚ŒãŸã™ã¹ã¦ã®å¼ã‚’リストã™ã‚‹ã“ã¨ã¨åŒç­‰ã§ã™ã€‚ + +例ãˆã°: + +``` sql +SELECT + a * 2, + b, + count(c), +FROM t +GROUP BY ALL +``` + +㯠+ +``` sql +SELECT + a * 2, + b, + count(c), +FROM t +GROUP BY a * 2, b +``` + +ã¨åŒã˜ã§ã™ã€‚ + +概算特殊ãªã‚±ãƒ¼ã‚¹ã¨ã—ã¦ã€é›†è¨ˆé–¢æ•°ã¨ä»–ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒãã®å¼•æ•°ã¨ã—ã¦ã‚る関数ãŒã‚ã‚‹å ´åˆã€`GROUP BY`キーã«ã¯æœ€å¤§ã®éžé›†è¨ˆãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +例ãˆã°: + +``` sql +SELECT + substring(a, 4, 2), + substring(substring(a, 1, 2), 1, count(b)) +FROM t +GROUP BY ALL +``` + +㯠+ +``` sql +SELECT + substring(a, 4, 2), + substring(substring(a, 1, 2), 1, count(b)) +FROM t +GROUP BY substring(a, 4, 2), substring(a, 1, 2) +``` + +ã¨åŒã˜ã§ã™ã€‚ + +## 例 + +例: + +``` sql +SELECT + count(), + median(FetchTiming > 60 ? 60 : FetchTiming), + count() - sum(Refresh) +FROM hits +``` + +標準SQLã«æº–æ‹ ã™ã‚‹MySQLã¨ã¯ç•°ãªã‚Šã€ã‚­ãƒ¼ã¾ãŸã¯é›†ç´„関数ã«ãªã„カラムã®å€¤ã‚’å–å¾—ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“(定数å¼ã‚’除ã)。ã“れを回é¿ã™ã‚‹ã«ã¯ã€ã€Œanyã€é›†ç´„関数(最åˆã«å‡ºç¾ã—ãŸå€¤ã‚’å–得)ã¾ãŸã¯ã€Œmin/maxã€ã‚’使用ã§ãã¾ã™ã€‚ + +例: + +``` sql +SELECT + domainWithoutWWW(URL) AS domain, + count(), + any(Title) AS title -- å„ドメインã®æœ€åˆã«è¦‹ã¤ã‹ã£ãŸãƒšãƒ¼ã‚¸ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’å–得。 +FROM hits +GROUP BY domain +``` + +ç•°ãªã‚‹ã‚­ãƒ¼å€¤ãŒè¦‹ã¤ã‹ã‚‹ãŸã³ã«ã€`GROUP BY`ã¯é›†è¨ˆé–¢æ•°ã®ã‚»ãƒƒãƒˆã‚’計算ã—ã¾ã™ã€‚ + +## GROUPING SETSä¿®é£¾å­ + +ã“ã‚Œã¯æœ€ã‚‚一般的ãªä¿®é£¾å­ã§ã™ã€‚ +ã“ã®ä¿®é£¾å­ã¯ã€ã„ãã¤ã‹ã®é›†è¨ˆã‚­ãƒ¼ã‚»ãƒƒãƒˆï¼ˆã‚°ãƒ«ãƒ¼ãƒ”ングセット)を手動ã§æŒ‡å®šã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ +集計ã¯ãã‚Œãžã‚Œã®ã‚°ãƒ«ãƒ¼ãƒ”ングセットã«å¯¾ã—ã¦å€‹åˆ¥ã«è¡Œã‚ã‚Œã€ãã®å¾Œã€ã™ã¹ã¦ã®çµæžœãŒçµåˆã•ã‚Œã¾ã™ã€‚ +グルーピングセットã«ã‚«ãƒ©ãƒ ãŒå­˜åœ¨ã—ãªã„å ´åˆã€ãã‚Œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§æº€ãŸã•ã‚Œã¾ã™ã€‚ + +言ã„æ›ãˆã‚Œã°ã€ä¸Šã§èª¬æ˜Žã—ãŸä¿®é£¾å­ã¯`GROUPING SETS`を使ã£ã¦è¡¨ç¾ã§ãã¾ã™ã€‚ +`ROLLUP`ã€`CUBE`ã€ãŠã‚ˆã³`GROUPING SETS`修飾å­ã‚’æŒã¤ã‚¯ã‚¨ãƒªã¯æ–‡æ³•çš„ã«ç­‰ã—ã„ã§ã™ãŒã€ç•°ãªã‚‹ãƒ‘フォーマンスを示ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +`GROUPING SETS`ãŒã™ã¹ã¦ã‚’並行ã—ã¦å®Ÿè¡Œã—よã†ã¨ã™ã‚‹ã¨ãã€`ROLLUP`ãŠã‚ˆã³`CUBE`ãŒé›†è¨ˆã®æœ€çµ‚マージをå˜ä¸€ã‚¹ãƒ¬ãƒƒãƒ‰ã§å®Ÿè¡Œã—ã¾ã™ã€‚ + +ソースã®åˆ—ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’å«ã‚€çŠ¶æ³ã§ã¯ã€è¡ŒãŒã“れらã®åˆ—をキーã¨ã—ã¦ä½¿ç”¨ã™ã‚‹é›†è¨ˆã®ä¸€éƒ¨ã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’見分ã‘ã‚‹ã®ãŒé›£ã—ã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 +ã“ã®å•é¡Œã‚’解決ã™ã‚‹ãŸã‚ã«ã€`GROUPING`関数を使用ã—ã¦ãã ã•ã„。 + +**例** + +次ã®2ã¤ã®ã‚¯ã‚¨ãƒªã¯åŒç­‰ã§ã™ã€‚ + +```sql +-- クエリ1 +SELECT year, month, day, count(*) FROM t GROUP BY year, month, day WITH ROLLUP; + +-- クエリ2 +SELECT year, month, day, count(*) FROM t GROUP BY +GROUPING SETS +( + (year, month, day), + (year, month), + (year), + () +); +``` + +**ã“ã¡ã‚‰ã‚‚å‚ç…§** + +- SQL標準互æ›æ€§ã®ãŸã‚ã®[group_by_use_nulls](/docs/ja/operations/settings/settings.md#group_by_use_nulls)設定。 + +## 実装詳細 + +集計ã¯åˆ—指å‘DBMSã®æœ€ã‚‚é‡è¦ãªæ©Ÿèƒ½ã®ã²ã¨ã¤ã§ã‚ã‚Šã€ãれゆãˆã«ClickHouseã®æœ€ã‚‚最é©åŒ–ã•ã‚ŒãŸéƒ¨åˆ†ã®ã²ã¨ã¤ã§ã™ã€‚デフォルトã§ã¯ã€é›†è¨ˆã¯ãƒ¡ãƒ¢ãƒªå†…ã§ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルを使用ã—ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ã“ã‚Œã¯40以上ã®ç‰¹æ®ŠåŒ–ã‚’æŒã¡ã€ã€Œã‚°ãƒ«ãƒ¼ãƒ—化キーã€ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«ä¾å­˜ã—ã¦è‡ªå‹•çš„ã«é¸æŠžã•ã‚Œã¾ã™ã€‚ + +### テーブルã®ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã«åŸºã¥ãGROUP BYã®æœ€é©åŒ– + +テーブルãŒã‚るキーã§ã‚½ãƒ¼ãƒˆã•ã‚Œã€`GROUP BY`å¼ãŒã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã¾ãŸã¯å˜å°„関数ã®å°‘ãªãã¨ã‚‚接頭辞をå«ã‚€å ´åˆã€é›†è¨ˆã¯ã‚ˆã‚ŠåŠ¹æžœçš„ã«è¡Œã‚ã‚Œã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰æ–°ã—ã„キーãŒèª­ã¿è¾¼ã¾ã‚Œã‚‹ã¨ã€é›†è¨ˆã®ä¸­é–“çµæžœã‚’確定ã—ã¦ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å‹•ä½œã¯[optimize_aggregation_in_order](../../../operations/settings/settings.md#optimize_aggregation_in_order)設定ã§åˆ‡ã‚Šæ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ã“ã®æœ€é©åŒ–ã¯é›†è¨ˆä¸­ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’減少ã•ã›ã¾ã™ãŒã€å ´åˆã«ã‚ˆã£ã¦ã¯ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’é…ãã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +### 外部メモリã§ã®GROUP BY + +`GROUP BY`中ã®ãƒ¡ãƒ¢ãƒªä½¿ç”¨é‡ã‚’制é™ã™ã‚‹ãŸã‚ã«ã€ä¸€æ™‚データをディスクã«æ›¸ã出ã™ã“ã¨ãŒã§ãã¾ã™ã€‚[max_bytes_before_external_group_by](../../../operations/settings/query-complexity.md#settings-max_bytes_before_external_group_by)設定ã¯`GROUP BY`ã®ä¸€æ™‚データをファイルシステムã«æ›¸ã出ã™ãŸã‚ã®RAM消費ã®ã—ãã„値を決定ã—ã¾ã™ã€‚0ã«è¨­å®šã™ã‚‹ã¨ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ã€ç„¡åŠ¹ã«ãªã‚Šã¾ã™ã€‚ + +`max_bytes_before_external_group_by`を使用ã™ã‚‹å ´åˆã€`max_memory_usage`ã‚’2å€ç¨‹åº¦é«˜ã設定ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚“ã§ä¸­é–“データを形æˆã™ã‚‹æ®µéšŽ(1)ã¨ä¸­é–“データをマージã™ã‚‹æ®µéšŽ(2)ã®2ã¤ã®æ®µéšŽãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚一時データã®æ›¸ã出ã—ã¯æ®µéšŽ1ã§ã—ã‹ç™ºç”Ÿã—ã¾ã›ã‚“。もã—一時データãŒæ›¸ã出ã•ã‚Œãªã‹ã£ãŸå ´åˆã€æ®µéšŽ2ã§ã¯æ®µéšŽ1ã¨åŒã˜é‡ã®ãƒ¡ãƒ¢ãƒªã‚’å¿…è¦ã¨ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +例ãˆã°ã€[max_memory_usage](../../../operations/settings/query-complexity.md#settings_max_memory_usage)ãŒ10000000000ã«è¨­å®šã•ã‚Œã¦ãŠã‚Šã€å¤–部集計を使用ã—ãŸã„å ´åˆã€`max_bytes_before_external_group_by`ã‚’10000000000ã«ã€`max_memory_usage`ã‚’20000000000ã«è¨­å®šã™ã‚‹ã“ã¨ãŒå¦¥å½“ã§ã™ã€‚外部集計ãŒãƒˆãƒªã‚¬ã•ã‚Œã‚‹ã¨ã(少ãªãã¨ã‚‚一度ã®ä¸€æ™‚データã®æ›¸ã出ã—ãŒã‚ã£ãŸå ´åˆï¼‰ã€RAMã®æœ€å¤§æ¶ˆè²»é‡ã¯`max_bytes_before_external_group_by`よりã‚ãšã‹ã«å¤šã„程度ã§ã™ã€‚ + +分散クエリ処ç†ã‚’使用ã™ã‚‹å ´åˆã€å¤–部集計ã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚リクエスタサーãƒãƒ¼ãŒå°‘é‡ã®RAMを使用ã™ã‚‹ã ã‘ã§æ¸ˆã‚€ã‚ˆã†ã«ã™ã‚‹ãŸã‚ã«ã€`distributed_aggregation_memory_efficient`ã‚’1ã«è¨­å®šã—ã¾ã™ã€‚ + +ディスクã«æ›¸ã出ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’マージã™ã‚‹éš›ã€ãŠã‚ˆã³`distributed_aggregation_memory_efficient`設定ãŒæœ‰åŠ¹ãªå ´åˆã«ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã®çµæžœã‚’マージã™ã‚‹éš›ã¯ã€åˆè¨ˆRAMã®`1/256 * スレッド数`ã¾ã§æ¶ˆè²»ã—ã¾ã™ã€‚ + +外部集計ãŒæœ‰åŠ¹ãªå ´åˆã€`max_bytes_before_external_group_by`以下ã®ãƒ‡ãƒ¼ã‚¿ãŒå­˜åœ¨ã—ãŸå ´åˆï¼ˆã¤ã¾ã‚Šãƒ‡ãƒ¼ã‚¿ãŒæ›¸ã出ã•ã‚Œãªã‹ã£ãŸå ´åˆï¼‰ã€ã‚¯ã‚¨ãƒªã¯å¤–部集計ãªã—ã¨åŒæ§˜ã«é«˜é€Ÿã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚一時データãŒæ›¸ã出ã•ã‚ŒãŸå ´åˆã€å®Ÿè¡Œæ™‚é–“ã¯æ•°å€ï¼ˆç´„三å€ï¼‰é•·ããªã‚Šã¾ã™ã€‚ + +`GROUP BY`後ã«`ORDER BY`ãŒã‚ã‚Šã€[LIMIT](../../../sql-reference/statements/select/limit.md)ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ä½¿ç”¨ã•ã‚Œã‚‹RAMã®é‡ã¯ãƒ†ãƒ¼ãƒ–ル全体ã§ã¯ãªã`LIMIT`内ã®ãƒ‡ãƒ¼ã‚¿é‡ã«ä¾å­˜ã—ã¾ã™ã€‚ã—ã‹ã—ã€`ORDER BY`ã«`LIMIT`ãŒãªã„å ´åˆã€å¤–部ソート(`max_bytes_before_external_sort`)を有効ã«ã™ã‚‹ã“ã¨ã‚’忘れãªã„ã§ãã ã•ã„。 diff --git a/docs/ja/sql-reference/statements/select/having.md b/docs/ja/sql-reference/statements/select/having.md new file mode 100644 index 00000000000..cccbfb95c09 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/having.md @@ -0,0 +1,14 @@ +--- +slug: /ja/sql-reference/statements/select/having +sidebar_label: HAVING +--- + +# HAVINGå¥ + +[GROUP BY](../../../sql-reference/statements/select/group-by.md)ã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸé›†è¨ˆçµæžœã‚’フィルタリングã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯[WHERE](../../../sql-reference/statements/select/where.md)å¥ã«ä¼¼ã¦ã„ã¾ã™ãŒã€`WHERE`ãŒé›†è¨ˆã®å‰ã«å®Ÿè¡Œã•ã‚Œã‚‹ã®ã«å¯¾ã—ã€`HAVING`ã¯é›†è¨ˆã®å¾Œã«å®Ÿè¡Œã•ã‚Œã‚‹ç‚¹ãŒç•°ãªã‚Šã¾ã™ã€‚ + +`HAVING`å¥ã§ã¯ã€`SELECT`å¥ã§ä½¿ã‚ã‚ŒãŸã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’å‚ç…§ã™ã‚‹ã“ã¨ã§é›†è¨ˆçµæžœã‚’フィルタリングã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã¾ãŸã€ã‚¯ã‚¨ãƒªçµæžœã«è¿”ã•ã‚Œãªã„追加ã®é›†è¨ˆçµæžœã‚’基ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +## 制é™äº‹é … + +集計ãŒè¡Œã‚ã‚Œãªã„å ´åˆã€`HAVING`を使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã“ã®å ´åˆã¯`WHERE`を使用ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/sql-reference/statements/select/index.md b/docs/ja/sql-reference/statements/select/index.md new file mode 100644 index 00000000000..70ee369a3d5 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/index.md @@ -0,0 +1,287 @@ +--- +slug: /ja/sql-reference/statements/select/ +sidebar_position: 32 +sidebar_label: SELECT +--- + +# SELECT クエリ + +`SELECT` クエリã¯ãƒ‡ãƒ¼ã‚¿ã®å–å¾—ã‚’è¡Œã„ã¾ã™ã€‚デフォルトã§ã¯è¦æ±‚ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«è¿”ã•ã‚Œã¾ã™ãŒã€[INSERT INTO](../../../sql-reference/statements/insert-into.md)ã¨ä½µç”¨ã™ã‚‹ã“ã¨ã§ã€ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã«è»¢é€ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +## 構文 + +``` sql +[WITH expr_list|(subquery)] +SELECT [DISTINCT [ON (column1, column2, ...)]] expr_list +[FROM [db.]table | (subquery) | table_function] [FINAL] +[SAMPLE sample_coeff] +[ARRAY JOIN ...] +[GLOBAL] [ANY|ALL|ASOF] [INNER|LEFT|RIGHT|FULL|CROSS] [OUTER|SEMI|ANTI] JOIN (subquery)|table (ON )|(USING ) +[PREWHERE expr] +[WHERE expr] +[GROUP BY expr_list] [WITH ROLLUP|WITH CUBE] [WITH TOTALS] +[HAVING expr] +[WINDOW window_expr_list] +[QUALIFY expr] +[ORDER BY expr_list] [WITH FILL] [FROM expr] [TO expr] [STEP expr] [INTERPOLATE [(expr_list)]] +[LIMIT [offset_value, ]n BY columns] +[LIMIT [n, ]m] [WITH TIES] +[SETTINGS ...] +[UNION ...] +[INTO OUTFILE filename [COMPRESSION type [LEVEL level]] ] +[FORMAT format] +``` + +ã™ã¹ã¦ã®å¥ã¯ã‚ªãƒ—ションã§ã™ãŒã€`SELECT`ã®ç›´å¾Œã«å¿…è¦ãªå¼ã®ãƒªã‚¹ãƒˆã¯[下記](#select-clause)ã§è©³ã—ã説明ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +å„オプションå¥ã®è©³ç´°ã¯ã€å®Ÿè¡Œé †ã«æ›¸ã‹ã‚Œã¦ã„る別ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§èª¬æ˜Žã•ã‚Œã¦ã„ã¾ã™ï¼š + +- [WITHå¥](../../../sql-reference/statements/select/with.md) +- [SELECTå¥](#select-clause) +- [DISTINCTå¥](../../../sql-reference/statements/select/distinct.md) +- [FROMå¥](../../../sql-reference/statements/select/from.md) +- [SAMPLEå¥](../../../sql-reference/statements/select/sample.md) +- [JOINå¥](../../../sql-reference/statements/select/join.md) +- [PREWHEREå¥](../../../sql-reference/statements/select/prewhere.md) +- [WHEREå¥](../../../sql-reference/statements/select/where.md) +- [GROUP BYå¥](../../../sql-reference/statements/select/group-by.md) +- [LIMIT BYå¥](../../../sql-reference/statements/select/limit-by.md) +- [HAVINGå¥](../../../sql-reference/statements/select/having.md) +- [QUALIFYå¥](../../../sql-reference/statements/select/qualify.md) +- [LIMITå¥](../../../sql-reference/statements/select/limit.md) +- [OFFSETå¥](../../../sql-reference/statements/select/offset.md) +- [UNIONå¥](../../../sql-reference/statements/select/union.md) +- [INTERSECTå¥](../../../sql-reference/statements/select/intersect.md) +- [EXCEPTå¥](../../../sql-reference/statements/select/except.md) +- [INTO OUTFILEå¥](../../../sql-reference/statements/select/into-outfile.md) +- [FORMATå¥](../../../sql-reference/statements/select/format.md) + +## SELECTå¥ + +[å¼](../../../sql-reference/syntax.md#syntax-expressions) ã¯ã€ä¸Šè¨˜ã§èª¬æ˜Žã—ãŸã™ã¹ã¦ã®å¥ã®æ“作完了後㫠`SELECT` å¥ã§è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ã“れらã®å¼ã¯ã€çµæžœã«å«ã¾ã‚Œã‚‹åˆ¥ã€…ã®è¡Œã«å¯¾ã—ã¦é©ç”¨ã•ã‚Œã‚‹ã‹ã®ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚`SELECT`å¥ã«å«ã¾ã‚Œã‚‹å¼ãŒé›†è¨ˆé–¢æ•°ã‚’å«ã‚“ã§ã„ã‚‹å ´åˆã€ClickHouseã¯[GROUP BY](../../../sql-reference/statements/select/group-by.md) 集計中ã«ã“れらã®é›†è¨ˆé–¢æ•°ã¨ãã®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã‚‹å¼ã‚’処ç†ã—ã¾ã™ã€‚ + +ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’çµæžœã«å«ã‚ãŸã„å ´åˆã¯ã€ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ (`*`) 記å·ã‚’使用ã—ã¾ã™ã€‚例ãˆã°ã€`SELECT * FROM ...` ã¨ã—ã¾ã™ã€‚ + +### 動的カラムé¸æŠž + +動的カラムé¸æŠžï¼ˆCOLUMNSå¼ã¨ã‚‚呼ã°ã‚Œã¾ã™ï¼‰ã¯ã€çµæžœã®ã„ãã¤ã‹ã®ã‚«ãƒ©ãƒ ã‚’[re2](https://en.wikipedia.org/wiki/RE2_(software))æ­£è¦è¡¨ç¾ã§ãƒžãƒƒãƒã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +``` sql +COLUMNS('regexp') +``` + +例ãˆã°ã€æ¬¡ã®ãƒ†ãƒ¼ãƒ–ルを考ãˆã¦ã¿ã¾ã™ï¼š + +``` sql +CREATE TABLE default.col_names (aa Int8, ab Int8, bc Int8) ENGINE = TinyLog +``` + +以下ã®ã‚¯ã‚¨ãƒªã¯ã€åå‰ã« `a` ãŒå«ã¾ã‚Œã‚‹ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã—ã¾ã™ã€‚ + +``` sql +SELECT COLUMNS('a') FROM col_names +``` + +``` text +┌─aa─┬─ab─┠+│ 1 │ 1 │ +└────┴────┘ +``` + +é¸æŠžã•ã‚ŒãŸã‚«ãƒ©ãƒ ã¯ã‚¢ãƒ«ãƒ•ã‚¡ãƒ™ãƒƒãƒˆé †ã«ã¯è¿”ã•ã‚Œã¾ã›ã‚“。 + +クエリ内ã§è¤‡æ•°ã® `COLUMNS` å¼ã‚’使用ã—ã€é–¢æ•°ã‚’ãã‚Œã«é©ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +例ãˆã°ï¼š + +``` sql +SELECT COLUMNS('a'), COLUMNS('c'), toTypeName(COLUMNS('c')) FROM col_names +``` + +``` text +┌─aa─┬─ab─┬─bc─┬─toTypeName(bc)─┠+│ 1 │ 1 │ 1 │ Int8 │ +└────┴────┴────┴────────────────┘ +``` + +`COLUMNS` å¼ã§è¿”ã•ã‚ŒãŸå„カラムã¯ã€åˆ¥ã€…ã®å¼•æ•°ã¨ã—ã¦é–¢æ•°ã«æ¸¡ã•ã‚Œã¾ã™ã€‚ã¾ãŸã€é–¢æ•°ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹å ´åˆã¯ä»–ã®å¼•æ•°ã‚’関数ã«æ¸¡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚関数を使用ã™ã‚‹éš›ã¯æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚関数ãŒæ¸¡ã•ã‚ŒãŸå¼•æ•°ã®æ•°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„å ´åˆã€ClickHouseã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +例ãˆã°ï¼š + +``` sql +SELECT COLUMNS('a') + COLUMNS('c') FROM col_names +``` + +``` text +Received exception from server (version 19.14.1): +Code: 42. DB::Exception: Received from localhost:9000. DB::Exception: Number of arguments for function plus does not match: passed 3, should be 2. +``` + +ã“ã®ä¾‹ã§ã¯ã€`COLUMNS('a')` ã¯2ã¤ã®ã‚«ãƒ©ãƒ  `aa` 㨠`ab` ã‚’è¿”ã—ã¾ã™ã€‚`COLUMNS('c')` 㯠`bc` カラムを返ã—ã¾ã™ã€‚`+` 演算å­ã¯3ã¤ã®å¼•æ•°ã«é©ç”¨ã§ããªã„ãŸã‚ã€ClickHouseã¯é–¢é€£ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¨ã¨ã‚‚ã«ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +`COLUMNS` ã«ãƒžãƒƒãƒã—ãŸã‚«ãƒ©ãƒ ã¯ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã‚’æŒã¤ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚`COLUMNS` ãŒä½•ã®ã‚«ãƒ©ãƒ ã«ã‚‚マッãƒã›ãšã€`SELECT`ã®å”¯ä¸€ã®å¼ã§ã‚ã‚‹å ´åˆã€ClickHouse ã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +### アスタリスク + +クエリã®ã„ã‹ãªã‚‹éƒ¨åˆ†ã«ã‚‚アスタリスクをå¼ã®ä»£ã‚ã‚Šã«ç½®ãã“ã¨ãŒã§ãã¾ã™ã€‚クエリãŒè§£æžã•ã‚Œã‚‹ã¨ã€ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ã¯ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルカラムã®ãƒªã‚¹ãƒˆã«å±•é–‹ã•ã‚Œã¾ã™ï¼ˆ`MATERIALIZED` ãŠã‚ˆã³ `ALIAS` カラムを除ã)。アスタリスクã®ä½¿ç”¨ãŒæ­£å½“化ã•ã‚Œã‚‹ã®ã¯ã‚ãšã‹ãªã‚±ãƒ¼ã‚¹ã®ã¿ã§ã™ï¼š + +- テーブルã®ãƒ€ãƒ³ãƒ—を作æˆã™ã‚‹å ´åˆã€‚ +- æ•°å°‘ãªã„カラムã—ã‹æŒãŸãªã„テーブルã€ãŸã¨ãˆã°ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€‚ +- テーブルã«ã©ã®ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã‹ã®æƒ…報をå–å¾—ã™ã‚‹å ´åˆã€‚ã“ã®å ´åˆã€ `LIMIT 1` を設定ã—ã¦ãã ã•ã„。ã—ã‹ã—ã€`DESC TABLE` クエリを使用ã™ã‚‹æ–¹ãŒè‰¯ã„ã§ã™ã€‚ +- `PREWHERE` を用ã„ã¦å°‘æ•°ã®ã‚«ãƒ©ãƒ ã«å¼·ã„フィルタをã‹ã‘ã‚‹å ´åˆã€‚ +- サブクエリ内(外部クエリã«å¿…è¦ã§ãªã„カラムã¯ã‚µãƒ–クエリã‹ã‚‰é™¤å¤–ã•ã‚Œã‚‹ãŸã‚)。 + +ã“れら以外ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。列指å‘DBMSã®åˆ©ç‚¹ã‚’æ´»ã‹ã™ã®ã§ã¯ãªãã€é€†ã«ä¸åˆ©ã‚’ã‚‚ãŸã‚‰ã™ã‹ã‚‰ã§ã™ã€‚ã¤ã¾ã‚Šã€ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“。 + +### Extreme Values + +çµæžœã«åŠ ãˆã¦ã€çµæžœã‚«ãƒ©ãƒ ã®æœ€å°å€¤ã¨æœ€å¤§å€¤ã‚‚å–å¾—ã§ãã¾ã™ã€‚ã“れを行ã†ã«ã¯ã€**extremes** 設定を1ã«è¨­å®šã—ã¾ã™ã€‚最å°å€¤ã¨æœ€å¤§å€¤ã¯æ•°å€¤åž‹ã€æ—¥ä»˜ã€æ—¥æ™‚ã«ã¤ã„ã¦è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ä»–ã®ã‚«ãƒ©ãƒ ã«ã¤ã„ã¦ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒå‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +追加ã®2è¡ŒãŒè¨ˆç®—ã•ã‚Œã¾ã™ã€‚最å°å€¤ã¨æœ€å¤§å€¤ã®ãã‚Œãžã‚Œã§ã™ã€‚ã“れらã®è¿½åŠ ã®2è¡Œã¯ã€ä»–ã®è¡Œã¨ã¯åˆ¥ã«`XML`ã€`JSON*`ã€`TabSeparated*`ã€`CSV*`ã€`Vertical`ã€`Template` ãŠã‚ˆã³ `Pretty*` [format](../../../interfaces/formats.md)ã§å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ä»–ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã¯å‡ºåŠ›ã•ã‚Œã¾ã›ã‚“。 + +`JSON*` ãŠã‚ˆã³ `XML` フォーマットã§ã¯ã€æ¥µå€¤ã¯åˆ¥ã® ‘extremes’ フィールドã§å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚`TabSeparated*`ã€`CSV*` ãŠã‚ˆã³ `Vertical` フォーマットã§ã¯ã€ä¸»è¦ãªçµæžœã®å¾Œã€ã‚‚㗠‘totals’ ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ãã®å¾Œã«è¡ŒãŒç©ºã®è¡Œã®å¾Œã«å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚`Pretty*` フォーマットã§ã¯ã€è¡ŒãŒä¸»è¦ãªçµæžœã®å¾Œã€ã‚‚ã— `totals` ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ãã‚Œã«ç¶šã„ã¦åˆ¥ã®ãƒ†ãƒ¼ãƒ–ルã¨ã—ã¦å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚`Template` フォーマットã§ã¯æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ³ãƒ—レートã«å¾“ã£ã¦æ¥µå€¤ãŒå‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ + +極値㯠`LIMIT` ã®å‰ã«è¡Œã«å¯¾ã—ã¦è¨ˆç®—ã•ã‚Œã¾ã™ãŒã€`LIMIT BY` ã®å¾Œã«è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ã—ã‹ã—ã€`LIMIT offset, size` を使用ã—ã¦ã„ã‚‹å ´åˆã€`offset` å‰ã®è¡Œã‚‚ `extremes` ã«å«ã¾ã‚Œã¾ã™ã€‚ストリームリクエストã§ã¯ã€çµæžœã¯ `LIMIT` を通éŽã—ãŸå°‘æ•°ã®è¡Œã‚’å«ã‚€ã“ã¨ã‚‚ã‚ã‚Šã¾ã™ã€‚ + +### 注æ„事項 + +クエリã®ã©ã®éƒ¨åˆ†ã§ã‚‚別å(`AS`エイリアス)を使用ã§ãã¾ã™ã€‚ + +`GROUP BY`ã€`ORDER BY` ãŠã‚ˆã³ `LIMIT BY` å¥ã¯ä½ç½®å¼•æ•°ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れを有効ã«ã™ã‚‹ã«ã¯ã€[enable_positional_arguments](../../../operations/settings/settings.md#enable-positional-arguments)設定をオンã«ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€`ORDER BY 1,2` ã¯ãƒ†ãƒ¼ãƒ–ルã®æœ€åˆã®ã€æ¬¡ã«2番目ã®ã‚«ãƒ©ãƒ ã§è¡Œã‚’ソートã—ã¾ã™ã€‚ + +## 実装ã®è©³ç´° + +クエリ㌠`DISTINCT`ã€`GROUP BY` ãŠã‚ˆã³ `ORDER BY` å¥ã¨ `IN` ãŠã‚ˆã³ `JOIN` サブクエリをçœç•¥ã—ãŸå ´åˆã€ã‚¯ã‚¨ãƒªã¯å®Œå…¨ã«ã‚¹ãƒˆãƒªãƒ¼ãƒ å‡¦ç†ã•ã‚Œã€O(1) ã®RAMé‡ã‚’使用ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã€é©åˆ‡ãªåˆ¶é™ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„ã¨ã‚¯ã‚¨ãƒªã¯å¤§é‡ã®RAMを消費ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ï¼š + +- `max_memory_usage` +- `max_rows_to_group_by` +- `max_rows_to_sort` +- `max_rows_in_distinct` +- `max_bytes_in_distinct` +- `max_rows_in_set` +- `max_bytes_in_set` +- `max_rows_in_join` +- `max_bytes_in_join` +- `max_bytes_before_external_sort` +- `max_bytes_before_external_group_by` + +詳細ã«ã¤ã„ã¦ã¯ã€ã€Œè¨­å®šã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。外部ソート(ディスクã¸ã®ä¸€æ™‚テーブルã®ä¿å­˜ï¼‰ãŠã‚ˆã³å¤–部集計を使用ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +## SELECTä¿®é£¾å­ + +`SELECT` クエリã§æ¬¡ã®ä¿®é£¾å­ã‚’使用ã§ãã¾ã™ã€‚ + +### APPLY + +クエリã®å¤–部テーブルå¼ã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹å„è¡Œã«å¯¾ã—ã¦é–¢æ•°ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文:** + +``` sql +SELECT APPLY( ) FROM [db.]table_name +``` + +**例:** + +``` sql +CREATE TABLE columns_transformers (i Int64, j Int16, k Int64) ENGINE = MergeTree ORDER by (i); +INSERT INTO columns_transformers VALUES (100, 10, 324), (120, 8, 23); +SELECT * APPLY(sum) FROM columns_transformers; +``` + +``` +┌─sum(i)─┬─sum(j)─┬─sum(k)─┠+│ 220 │ 18 │ 347 │ +└────────┴────────┴────────┘ +``` + +### EXCEPT + +çµæžœã‹ã‚‰é™¤å¤–ã™ã‚‹ä¸€ã¤ã¾ãŸã¯è¤‡æ•°ã®ã‚«ãƒ©ãƒ åを指定ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ä¸€è‡´ã™ã‚‹ã‚«ãƒ©ãƒ åãŒå‡ºåŠ›ã‹ã‚‰çœç•¥ã•ã‚Œã¾ã™ã€‚ + +**構文:** + +``` sql +SELECT EXCEPT ( col_name1 [, col_name2, col_name3, ...] ) FROM [db.]table_name +``` + +**例:** + +``` sql +SELECT * EXCEPT (i) from columns_transformers; +``` + +``` +┌──j─┬───k─┠+│ 10 │ 324 │ +│ 8 │ 23 │ +└────┴─────┘ +``` + +### REPLACE + +[å¼ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹](../../../sql-reference/syntax.md#syntax-expression_aliases)を一ã¤ã¾ãŸã¯è¤‡æ•°æŒ‡å®šã—ã¾ã™ã€‚ãã‚Œãžã‚Œã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¯ `SELECT *` æ–‡ã®ã‚«ãƒ©ãƒ åã¨ä¸€è‡´ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。出力カラムリストã§ã¯ã€ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã«ä¸€è‡´ã™ã‚‹ã‚«ãƒ©ãƒ ãŒãã® `REPLACE` ã«è¡¨ç¾ã•ã‚ŒãŸå¼ã§ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +ã“ã®ä¿®é£¾å­ã¯ã‚«ãƒ©ãƒ åã‚„é †åºã‚’変更ã—ã¾ã›ã‚“。ãŸã ã—ã€å€¤ã‚„値ã®åž‹ã‚’変更ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文:** + +``` sql +SELECT REPLACE( AS col_name) from [db.]table_name +``` + +**例:** + +``` sql +SELECT * REPLACE(i + 1 AS i) from columns_transformers; +``` + +``` +┌───i─┬──j─┬───k─┠+│ 101 │ 10 │ 324 │ +│ 121 │ 8 │ 23 │ +└─────┴────┴─────┘ +``` + +### 修飾å­ã®çµ„ã¿åˆã‚ã› + +å„修飾å­ã‚’個別ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã€çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +**例**: + +åŒã˜ä¿®é£¾å­ã‚’複数回使用ã™ã‚‹ã€‚ + +``` sql +SELECT COLUMNS('[jk]') APPLY(toString) APPLY(length) APPLY(max) from columns_transformers; +``` + +``` +┌─max(length(toString(j)))─┬─max(length(toString(k)))─┠+│ 2 │ 3 │ +└──────────────────────────┴──────────────────────────┘ +``` + +å˜ä¸€ã®ã‚¯ã‚¨ãƒªã§è¤‡æ•°ã®ä¿®é£¾å­ã‚’使用ã™ã‚‹ã€‚ + +``` sql +SELECT * REPLACE(i + 1 AS i) EXCEPT (j) APPLY(sum) from columns_transformers; +``` + +``` +┌─sum(plus(i, 1))─┬─sum(k)─┠+│ 222 │ 347 │ +└─────────────────┴────────┘ +``` + +## SELECT クエリã§ã® SETTINGS + +å¿…è¦ãªè¨­å®šã‚’ `SELECT` クエリ内ã§æŒ‡å®šã§ãã¾ã™ã€‚ã“ã®è¨­å®šå€¤ã¯ã“ã®ã‚¯ã‚¨ãƒªã«ã®ã¿é©ç”¨ã•ã‚Œã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡ŒãŒçµ‚了ã™ã‚‹ã¨ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¾ãŸã¯ä»¥å‰ã®å€¤ã«ãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +ä»–ã®è¨­å®šæ–¹æ³•ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](../../../operations/settings/index.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**例** + +``` sql +SELECT * FROM some_table SETTINGS optimize_read_in_order=1, cast_keep_nullable=1; +``` + diff --git a/docs/ja/sql-reference/statements/select/intersect.md b/docs/ja/sql-reference/statements/select/intersect.md new file mode 100644 index 00000000000..f33397c74f8 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/intersect.md @@ -0,0 +1,155 @@ +--- +slug: /ja/sql-reference/statements/select/intersect +sidebar_label: INTERSECT +--- + +# INTERSECTå¥ + +`INTERSECT`å¥ã¯ã€æœ€åˆã®ã‚¯ã‚¨ãƒªã¨2番目ã®ã‚¯ã‚¨ãƒªã®ä¸¡æ–¹ã®çµæžœã‹ã‚‰ã®ã¿è¡ŒãŒè¿”ã•ã‚Œã¾ã™ã€‚クエリã¯ã‚«ãƒ©ãƒ ã®æ•°ã€é †åºã€åž‹ãŒä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`INTERSECT`ã®çµæžœã«ã¯é‡è¤‡ã™ã‚‹è¡Œã‚’å«ã‚€ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +複数ã®`INTERSECT`æ–‡ã¯ã€æ‹¬å¼§ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€å·¦ã‹ã‚‰å³ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚`INTERSECT`演算å­ã¯ã€`UNION`ãŠã‚ˆã³`EXCEPT`å¥ã‚ˆã‚Šã‚‚優先順ä½ãŒé«˜ã„ã§ã™ã€‚ + +``` sql +SELECT column1 [, column2 ] +FROM table1 +[WHERE condition] + +INTERSECT + +SELECT column1 [, column2 ] +FROM table2 +[WHERE condition] +``` + +æ¡ä»¶ã¯ã€è¦æ±‚ã«åŸºã¥ãä»»æ„ã®å¼ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 例 + +以下ã¯ã€1ã‹ã‚‰10ã¾ã§ã®æ•°å­—ã¨3ã‹ã‚‰8ã¾ã§ã®æ•°å­—をインターセクトã™ã‚‹ç°¡å˜ãªä¾‹ã§ã™ï¼š + +```sql +SELECT number FROM numbers(1,10) INTERSECT SELECT number FROM numbers(3,8); +``` + +çµæžœï¼š + +```response +┌─number─┠+│ 3 │ +│ 4 │ +│ 5 │ +│ 6 │ +│ 7 │ +│ 8 │ +└────────┘ +``` + +`INTERSECT`ã¯ã€å…±é€šã®ã‚«ãƒ©ãƒ ã‚’æŒã¤2ã¤ã®ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ãã®çµæžœãŒåŒã˜ã‚«ãƒ©ãƒ ã‚’å«ã‚€é™ã‚Šã€2ã¤ã®ã‚¯ã‚¨ãƒªã®çµæžœã‚’インターセクトã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€æ•°ç™¾ä¸‡è¡Œã®æš—å·é€šè²¨å–引価格ã¨å–引é‡ã®å±¥æ­´ãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š + +```sql +CREATE TABLE crypto_prices +( + trade_date Date, + crypto_name String, + volume Float32, + price Float32, + market_cap Float32, + change_1_day Float32 +) +ENGINE = MergeTree +PRIMARY KEY (crypto_name, trade_date); + +INSERT INTO crypto_prices + SELECT * + FROM s3( + 'https://learn-clickhouse.s3.us-east-2.amazonaws.com/crypto_prices.csv', + 'CSVWithNames' +); + +SELECT * FROM crypto_prices +WHERE crypto_name = 'Bitcoin' +ORDER BY trade_date DESC +LIMIT 10; +``` + +```response +┌─trade_date─┬─crypto_name─┬──────volume─┬────price─┬───market_cap─┬──change_1_day─┠+│ 2020-11-02 │ Bitcoin │ 30771456000 │ 13550.49 │ 251119860000 │ -0.013585099 │ +│ 2020-11-01 │ Bitcoin │ 24453857000 │ 13737.11 │ 254569760000 │ -0.0031840964 │ +│ 2020-10-31 │ Bitcoin │ 30306464000 │ 13780.99 │ 255372070000 │ 0.017308505 │ +│ 2020-10-30 │ Bitcoin │ 30581486000 │ 13546.52 │ 251018150000 │ 0.008084608 │ +│ 2020-10-29 │ Bitcoin │ 56499500000 │ 13437.88 │ 248995320000 │ 0.012552661 │ +│ 2020-10-28 │ Bitcoin │ 35867320000 │ 13271.29 │ 245899820000 │ -0.02804481 │ +│ 2020-10-27 │ Bitcoin │ 33749879000 │ 13654.22 │ 252985950000 │ 0.04427984 │ +│ 2020-10-26 │ Bitcoin │ 29461459000 │ 13075.25 │ 242251000000 │ 0.0033826586 │ +│ 2020-10-25 │ Bitcoin │ 24406921000 │ 13031.17 │ 241425220000 │ -0.0058658565 │ +│ 2020-10-24 │ Bitcoin │ 24542319000 │ 13108.06 │ 242839880000 │ 0.013650347 │ +└────────────┴─────────────┴─────────────┴──────────┴──────────────┴───────────────┘ +``` + +次ã«ã€æ‰€æœ‰ã™ã‚‹æš—å·é€šè²¨ã®ãƒªã‚¹ãƒˆã¨ã‚³ã‚¤ãƒ³ã®æ•°é‡ã‚’å«ã‚€`holdings`ã¨ã„ã†ãƒ†ãƒ¼ãƒ–ルãŒã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ï¼š + +```sql +CREATE TABLE holdings +( + crypto_name String, + quantity UInt64 +) +ENGINE = MergeTree +PRIMARY KEY (crypto_name); + +INSERT INTO holdings VALUES + ('Bitcoin', 1000), + ('Bitcoin', 200), + ('Ethereum', 250), + ('Ethereum', 5000), + ('DOGEFI', 10); + ('Bitcoin Diamond', 5000); +``` + +`INTERSECT`を使ã£ã¦ã€**"所有ã™ã‚‹ã‚³ã‚¤ãƒ³ã®ä¸­ã§ä¾¡æ ¼ãŒ100ドルを超ãˆãŸå–引ãŒã‚ã£ãŸã‚‚ã®ã¯ã©ã‚Œã‹ï¼Ÿ"**ã¨è¨€ã£ãŸè³ªå•ã«ç­”ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼š + +```sql +SELECT crypto_name FROM holdings +INTERSECT +SELECT crypto_name FROM crypto_prices +WHERE price > 100 +``` + +çµæžœï¼š + +```response +┌─crypto_name─┠+│ Bitcoin │ +│ Bitcoin │ +│ Ethereum │ +│ Ethereum │ +└─────────────┘ +``` + +ã“ã‚Œã¯ã€ãƒ“ットコインã¨ã‚¤ãƒ¼ã‚µãƒªã‚¢ãƒ ãŒä¸€æ™‚期ã«100ドルを超ãˆã¦å–引ã•ã‚ŒãŸã“ã¨ã‚’æ„味ã—ã€DOGEFIã¨Bitcoin Diamondã¯100ドルを超ãˆã‚‹å–引ãŒç™ºç”Ÿã—ãŸã“ã¨ãŒãªã„ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ï¼ˆã“ã®ä¾‹ã®ãƒ‡ãƒ¼ã‚¿ã«åŸºã¥ã)。 + +## INTERSECT DISTINCT + +å‰ã®ã‚¯ã‚¨ãƒªã§ã¯ã€100ドル以上ã§å–引ã•ã‚ŒãŸãƒ“ットコインã¨ã‚¤ãƒ¼ã‚µãƒªã‚¢ãƒ ã®æ‰€æœ‰é‡ãŒè¤‡æ•°å›žå‡ºç¾ã—ã¦ã„ã¾ã™ã€‚é‡è¤‡ã—ãŸè¡Œã‚’削除ã™ã‚‹ã«ã¯ï¼ˆçŸ¥ã£ã¦ã„ã‚‹ã“ã¨ã‚’ãŸã ç¹°ã‚Šè¿”ã—ã¦ã„ã‚‹ã ã‘ãªã®ã§ï¼‰ã€`INTERSECT`ã«`DISTINCT`を追加ã§ãã¾ã™ï¼š + +```sql +SELECT crypto_name FROM holdings +INTERSECT DISTINCT +SELECT crypto_name FROM crypto_prices +WHERE price > 100; +``` + +çµæžœï¼š + +```response +┌─crypto_name─┠+│ Bitcoin │ +│ Ethereum │ +└─────────────┘ +``` + +**関連項目** + +- [UNION](union.md#union-clause) +- [EXCEPT](except.md#except-clause) diff --git a/docs/ja/sql-reference/statements/select/into-outfile.md b/docs/ja/sql-reference/statements/select/into-outfile.md new file mode 100644 index 00000000000..513d8f4d3b6 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/into-outfile.md @@ -0,0 +1,44 @@ +--- +slug: /ja/sql-reference/statements/select/into-outfile +sidebar_label: INTO OUTFILE +--- + +# INTO OUTFILE 節 + +`INTO OUTFILE` 節ã¯ã€`SELECT` クエリã®çµæžœã‚’**クライアント**å´ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã—ã¾ã™ã€‚ + +圧縮ファイルãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚圧縮タイプã¯ãƒ•ã‚¡ã‚¤ãƒ«åã®æ‹¡å¼µå­ã«ã‚ˆã£ã¦æ¤œå‡ºã•ã‚Œã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ `'auto'` モードãŒä½¿ç”¨ã•ã‚Œã¾ã™ï¼‰ã€‚ã¾ãŸã€`COMPRESSION` 節ã§æ˜Žç¤ºçš„ã«æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚特定ã®åœ§ç¸®ã‚¿ã‚¤ãƒ—ã«å¯¾ã™ã‚‹åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã¯ã€`LEVEL` 節ã§æŒ‡å®šã§ãã¾ã™ã€‚ + +**構文** + +```sql +SELECT INTO OUTFILE file_name [AND STDOUT] [APPEND | TRUNCATE] [COMPRESSION type [LEVEL level]] +``` + +`file_name` ãŠã‚ˆã³ `type` ã¯æ–‡å­—列リテラルã§ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る圧縮タイプã¯ã€`'none'`, `'gzip'`, `'deflate'`, `'br'`, `'xz'`, `'zstd'`, `'lz4'`, `'bz2'` ã§ã™ã€‚ + +`level` ã¯æ•°å€¤ãƒªãƒ†ãƒ©ãƒ«ã§ã™ã€‚次ã®ç¯„囲ã®æ­£ã®æ•´æ•°ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼š`lz4` タイプã®å ´åˆ `1-12`ã€`zstd` タイプã®å ´åˆ `1-22`ã€ãã®ä»–ã®åœ§ç¸®ã‚¿ã‚¤ãƒ—ã®å ´åˆ `1-9`。 + +## 実装ã®è©³ç´° + +- ã“ã®æ©Ÿèƒ½ã¯ã€[コマンドラインクライアント](../../../interfaces/cli.md)ãŠã‚ˆã³[clickhouse-local](../../../operations/utilities/clickhouse-local.md)ã§ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ãã®ãŸã‚ã€[HTTP インターフェース](../../../interfaces/http.md)経由ã§é€ä¿¡ã•ã‚ŒãŸã‚¯ã‚¨ãƒªã¯å¤±æ•—ã—ã¾ã™ã€‚ +- åŒã˜ãƒ•ã‚¡ã‚¤ãƒ«åã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã¯å¤±æ•—ã—ã¾ã™ã€‚ +- デフォルトã®[出力フォーマット](../../../interfaces/formats.md)㯠`TabSeparated` ã§ã™ï¼ˆã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ãƒãƒƒãƒãƒ¢ãƒ¼ãƒ‰ã¨åŒæ§˜ï¼‰ã€‚変更ã™ã‚‹ã«ã¯ [FORMAT](format.md) 節を使用ã—ã¾ã™ã€‚ +- クエリ㫠`AND STDOUT` ãŒè¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚ŒãŸå‡ºåŠ›ã¯æ¨™æº–出力ã«ã‚‚表示ã•ã‚Œã¾ã™ã€‚圧縮ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€å¹³æ–‡ãŒæ¨™æº–出力ã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ +- クエリ㫠`APPEND` ãŒè¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹å ´åˆã€å‡ºåŠ›ã¯æ—¢å­˜ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚圧縮ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã€è¿½åŠ ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 +- æ—¢ã«å­˜åœ¨ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ã込む場åˆã€`APPEND` ã¾ãŸã¯ `TRUNCATE` を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**例** + +次ã®ã‚¯ã‚¨ãƒªã‚’ [コマンドラインクライアント](../../../interfaces/cli.md)ã§å®Ÿè¡Œã—ã¾ã™ï¼š + +```bash +clickhouse-client --query="SELECT 1,'ABC' INTO OUTFILE 'select.gz' FORMAT CSV;" +zcat select.gz +``` + +çµæžœï¼š + +```text +1,"ABC" +``` diff --git a/docs/ja/sql-reference/statements/select/join.md b/docs/ja/sql-reference/statements/select/join.md new file mode 100644 index 00000000000..f086269478e --- /dev/null +++ b/docs/ja/sql-reference/statements/select/join.md @@ -0,0 +1,525 @@ +--- +slug: /ja/sql-reference/statements/select/join +sidebar_label: Join Table +--- + +# JOINå¥ + +**JOIN**ã¯ã€å…±é€šã®å€¤ã‚’使用ã—ã¦è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルã®**カラム**を組ã¿åˆã‚ã›ã‚‹ã“ã¨ã§ã€æ–°ã—ã„テーブルを生æˆã—ã¾ã™ã€‚ã“ã‚Œã¯ã€SQLをサãƒãƒ¼ãƒˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ä¸€èˆ¬çš„ãªæ“作ã§ã‚ã‚Šã€[関係代数](https://en.wikipedia.org/wiki/Relational_algebra#Joins_and_join-like_operators)ã®çµåˆã«å¯¾å¿œã—ã¾ã™ã€‚1ã¤ã®ãƒ†ãƒ¼ãƒ–ル内ã§ã®çµåˆã®ç‰¹åˆ¥ãªã‚±ãƒ¼ã‚¹ã¯ã€ã€Œè‡ªå·±çµåˆã€ã¨å‘¼ã°ã‚Œã‚‹ã“ã¨ãŒã‚ˆãã‚ã‚Šã¾ã™ã€‚ + +**構文** + +``` sql +SELECT +FROM +[GLOBAL] [INNER|LEFT|RIGHT|FULL|CROSS] [OUTER|SEMI|ANTI|ANY|ALL|ASOF] JOIN +(ON )|(USING ) ... +``` + +`ON`å¥ã‹ã‚‰ã®å¼ã¨`USING`å¥ã‹ã‚‰ã®**カラム**ã¯ã€Œçµåˆã‚­ãƒ¼ã€ã¨å‘¼ã°ã‚Œã¾ã™ã€‚特ã«æŒ‡å®šãŒãªã„é™ã‚Šã€çµåˆã¯ä¸€è‡´ã™ã‚‹ã€Œçµåˆã‚­ãƒ¼ã€ã‚’æŒã¤**è¡Œ**ã‹ã‚‰ã®[ç›´ç©](https://en.wikipedia.org/wiki/Cartesian_product)を生æˆã—ã€å…ƒã®ãƒ†ãƒ¼ãƒ–ルよりもã¯ã‚‹ã‹ã«å¤šãã®**è¡Œ**ã‚’æŒã¤çµæžœã‚’生æˆã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +## 関連コンテンツ + +- ブログ: [ClickHouse: A Blazingly Fast DBMS with Full SQL Join Support - Part 1](https://clickhouse.com/blog/clickhouse-fully-supports-joins) +- ブログ: [ClickHouse: A Blazingly Fast DBMS with Full SQL Join Support - Under the Hood - Part 2](https://clickhouse.com/blog/clickhouse-fully-supports-joins-hash-joins-part2) +- ブログ: [ClickHouse: A Blazingly Fast DBMS with Full SQL Join Support - Under the Hood - Part 3](https://clickhouse.com/blog/clickhouse-fully-supports-joins-full-sort-partial-merge-part3) +- ブログ: [ClickHouse: A Blazingly Fast DBMS with Full SQL Join Support - Under the Hood - Part 4](https://clickhouse.com/blog/clickhouse-fully-supports-joins-direct-join-part4) + +## サãƒãƒ¼ãƒˆã•ã‚Œã‚‹JOINã®ç¨®é¡ž + +å…¨ã¦ã®æ¨™æº–[SQL JOIN](https://en.wikipedia.org/wiki/Join_(SQL))タイプãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™: + +- `INNER JOIN`: 一致ã™ã‚‹**è¡Œ**ã®ã¿ãŒè¿”ã•ã‚Œã¾ã™ã€‚ +- `LEFT OUTER JOIN`: 左テーブルã‹ã‚‰ã®éžä¸€è‡´è¡Œã‚‚一致ã—ãŸ**è¡Œ**ã¨å…±ã«è¿”ã•ã‚Œã¾ã™ã€‚ +- `RIGHT OUTER JOIN`: å³ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®éžä¸€è‡´è¡Œã‚‚一致ã—ãŸ**è¡Œ**ã¨å…±ã«è¿”ã•ã‚Œã¾ã™ã€‚ +- `FULL OUTER JOIN`: 両テーブルã‹ã‚‰ã®éžä¸€è‡´è¡Œã‚‚一致ã—ãŸ**è¡Œ**ã¨å…±ã«è¿”ã•ã‚Œã¾ã™ã€‚ +- `CROSS JOIN`: テーブル全体ã®ç›´ç©ã‚’生æˆã—ã€ã€Œçµåˆã‚­ãƒ¼ã€ã¯**指定ã—ã¾ã›ã‚“**。 + +`JOIN`ã§ã‚¿ã‚¤ãƒ—ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€`INNER`ãŒæš—é»™ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚キーワード`OUTER`ã¯çœç•¥å¯èƒ½ã§ã™ã€‚`CROSS JOIN`ã®ä»£æ›¿æ§‹æ–‡ã¨ã—ã¦[FROMå¥](../../../sql-reference/statements/select/from.md)ã§è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルをカンマã§åŒºåˆ‡ã£ã¦æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +ClickHouseã§åˆ©ç”¨å¯èƒ½ãªè¿½åŠ ã®çµåˆã‚¿ã‚¤ãƒ—: + +- `LEFT SEMI JOIN`ã¨`RIGHT SEMI JOIN`: 「çµåˆã‚­ãƒ¼ã€ã®ãƒ›ãƒ¯ã‚¤ãƒˆãƒªã‚¹ãƒˆã‚’生æˆã—ã€ç›´ç©ã‚’生æˆã—ã¾ã›ã‚“。 +- `LEFT ANTI JOIN`ã¨`RIGHT ANTI JOIN`: 「çµåˆã‚­ãƒ¼ã€ã®ãƒ–ラックリストを生æˆã—ã€ç›´ç©ã‚’生æˆã—ã¾ã›ã‚“。 +- `LEFT ANY JOIN`, `RIGHT ANY JOIN`ã¨`INNER ANY JOIN`: 標準的ãª`JOIN`タイプã®ç›´ç©ã‚’部分的(`LEFT`ã¨`RIGHT`ã®å対å´ï¼‰ã¾ãŸã¯å®Œå…¨ï¼ˆ`INNER`ã¨`FULL`)ã«ç„¡åŠ¹ã«ã—ã¾ã™ã€‚ +- `ASOF JOIN`ã¨`LEFT ASOF JOIN`: 厳密ã§ãªã„一致ã§ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’çµåˆã—ã¾ã™ã€‚`ASOF JOIN`ã®ä½¿ç”¨æ³•ã«ã¤ã„ã¦ã¯ä»¥ä¸‹ã§èª¬æ˜Žã—ã¾ã™ã€‚ +- `PASTE JOIN`: 2ã¤ã®ãƒ†ãƒ¼ãƒ–ルを水平方å‘ã«çµåˆã—ã¾ã™ã€‚ + +:::note +`join_algorithm`ãŒ`partial_merge`ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`RIGHT JOIN`ã¨`FULL JOIN`ã¯`ALL`厳密性(`SEMI`, `ANTI`, `ANY`, `ASOF`ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“)ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ +::: + +## 設定 + +デフォルトã®çµåˆã‚¿ã‚¤ãƒ—ã¯[join_default_strictness](../../../operations/settings/settings.md#join_default_strictness)設定を使用ã—ã¦ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`ANY JOIN`æ“作ã«å¯¾ã™ã‚‹ClickHouseサーãƒãƒ¼ã®å‹•ä½œã¯[any_join_distinct_right_table_keys](../../../operations/settings/settings.md#any_join_distinct_right_table_keys)設定ã«ä¾å­˜ã—ã¾ã™ã€‚ + +**å‚ç…§** + +- [join_algorithm](../../../operations/settings/settings.md#join_algorithm) +- [join_any_take_last_row](../../../operations/settings/settings.md#join_any_take_last_row) +- [join_use_nulls](../../../operations/settings/settings.md#join_use_nulls) +- [partial_merge_join_optimizations](../../../operations/settings/settings.md#partial_merge_join_optimizations) +- [partial_merge_join_rows_in_right_blocks](../../../operations/settings/settings.md#partial_merge_join_rows_in_right_blocks) +- [join_on_disk_max_files_to_merge](../../../operations/settings/settings.md#join_on_disk_max_files_to_merge) +- [any_join_distinct_right_table_keys](../../../operations/settings/settings.md#any_join_distinct_right_table_keys) + +ClickHouseãŒ`CROSS JOIN`ã‚’`INNER JOIN`ã¨ã—ã¦æ›¸ãç›´ã™ã®ã«å¤±æ•—ã—ãŸæ™‚ã®å‹•ä½œã‚’定義ã™ã‚‹ãŸã‚ã«ã€`cross_to_inner_join_rewrite`設定を使用ã—ã¦ãã ã•ã„。デフォルト値ã¯`1`ã§ã‚ã‚Šã€ã“ã‚Œã«ã‚ˆã‚Šçµåˆã¯ç¶™ç¶šã•ã‚Œã¾ã™ãŒã€é…ããªã‚Šã¾ã™ã€‚エラーを発生ã•ã›ãŸã„å ´åˆã¯`cross_to_inner_join_rewrite`ã‚’`0`ã«è¨­å®šã—ã€å…¨ã¦ã®ã‚«ãƒ³ãƒž/クロスçµåˆã‚’書ãç›´ã™ã“ã¨ã‚’強制ã—ãŸã„å ´åˆã¯`2`ã«è¨­å®šã—ã¦ãã ã•ã„。値ãŒ`2`ã®ã¨ãã«æ›¸ãæ›ãˆãŒå¤±æ•—ã™ã‚‹ã¨ã€ã€Œ`WHERE`セクションを簡略化ã—ã¦ã¿ã¦ãã ã•ã„ã€ã¨ã„ã†ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +## ONセクションã®æ¡ä»¶ + +`ON`セクションã¯`AND`ãŠã‚ˆã³`OR`演算å­ã‚’使用ã—ã¦çµåˆã•ã‚ŒãŸè¤‡æ•°ã®æ¡ä»¶ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚çµåˆã‚­ãƒ¼ã‚’指定ã™ã‚‹æ¡ä»¶ã¯ã€å·¦ãƒ†ãƒ¼ãƒ–ルã¨å³ãƒ†ãƒ¼ãƒ–ルã®ä¸¡æ–¹ã‚’å‚ç…§ã—ã€ç­‰å·æ¼”ç®—å­ã‚’使用ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。他ã®æ¡ä»¶ã¯ã€ãã®ä»–ã®è«–ç†æ¼”ç®—å­ã‚’使用ã§ãã¾ã™ãŒã€**クエリ**ã®å·¦ã¾ãŸã¯å³ãƒ†ãƒ¼ãƒ–ルã®ã„ãšã‚Œã‹ã‚’å‚ç…§ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +æ¡ä»¶ãŒæº€ãŸã•ã‚Œã‚‹ã¨**è¡Œ**ãŒçµåˆã•ã‚Œã¾ã™ã€‚æ¡ä»¶ãŒæº€ãŸã•ã‚Œãªã„å ´åˆã§ã‚‚ã€`JOIN`タイプã«ã‚ˆã£ã¦ã¯**è¡Œ**ãŒçµæžœã«å«ã¾ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚注æ„ã™ã¹ã点ã¯ã€åŒã˜æ¡ä»¶ãŒ`WHERE`セクションã«é…ç½®ã•ã‚Œã€æ¡ä»¶ãŒæº€ãŸã•ã‚Œã¦ã„ãªã„å ´åˆã€**è¡Œ**ã¯å¸¸ã«çµæžœã‹ã‚‰ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ + +`ON`å¥å†…ã®`OR`演算å­ã¯ãƒãƒƒã‚·ãƒ¥çµåˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¦å‹•ä½œã—ã¾ã™ — `JOIN`ã®çµåˆã‚­ãƒ¼ã‚’æŒã¤å„`OR`引数ã«å¯¾ã—ã¦ã€å€‹åˆ¥ã®ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルãŒä½œæˆã•ã‚Œã‚‹ãŸã‚ã€ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã¨**クエリ**ã®å®Ÿè¡Œæ™‚é–“ã¯`ON`å¥ã®`OR`ã®è¡¨ç¾ã®æ•°ã®å¢—加ã«ä¼´ã„ç·šå½¢ã«å¢—加ã—ã¾ã™ã€‚ + +:::note +ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã®**カラム**ã«è¨€åŠã™ã‚‹æ¡ä»¶ã®å ´åˆã€ç¾æ™‚点ã§ã¯ç­‰å·æ¼”ç®—å­ï¼ˆ`=`)ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +**例** + +`table_1`ã¨`table_2`を考慮ã—ã¦ãã ã•ã„: + +``` +┌─Id─┬─name─┠┌─Id─┬─text───────────┬─scores─┠+│ 1 │ A │ │ 1 │ Text A │ 10 │ +│ 2 │ B │ │ 1 │ Another text A │ 12 │ +│ 3 │ C │ │ 2 │ Text B │ 15 │ +└────┴──────┘ └────┴────────────────┴────────┘ +``` + +1ã¤ã®çµåˆã‚­ãƒ¼æ¡ä»¶ã¨`table_2`ã«å¯¾ã™ã‚‹è¿½åŠ ã®æ¡ä»¶ã‚’æŒã¤**クエリ**: + +``` sql +SELECT name, text FROM table_1 LEFT OUTER JOIN table_2 + ON table_1.Id = table_2.Id AND startsWith(table_2.text, 'Text'); +``` + +çµæžœã«ã¯ã€nameãŒ`C`ã§ãƒ†ã‚­ã‚¹ãƒˆãŒç©ºã®**è¡Œ**ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€`OUTER`タイプã®çµåˆãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã«çµæžœã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +``` +┌─name─┬─text───┠+│ A │ Text A │ +│ B │ Text B │ +│ C │ │ +└──────┴────────┘ +``` + +`INNER`タイプã®çµåˆã¨è¤‡æ•°ã®æ¡ä»¶ã‚’æŒã¤**クエリ**: + +``` sql +SELECT name, text, scores FROM table_1 INNER JOIN table_2 + ON table_1.Id = table_2.Id AND table_2.scores > 10 AND startsWith(table_2.text, 'Text'); +``` + +çµæžœï¼š + +``` +┌─name─┬─text───┬─scores─┠+│ B │ Text B │ 15 │ +└──────┴────────┴────────┘ +``` + +`INNER`タイプã®çµåˆã¨`OR`ã‚’å«ã‚€æ¡ä»¶ã‚’æŒã¤**クエリ**: + +``` sql +CREATE TABLE t1 (`a` Int64, `b` Int64) ENGINE = MergeTree() ORDER BY a; + +CREATE TABLE t2 (`key` Int32, `val` Int64) ENGINE = MergeTree() ORDER BY key; + +INSERT INTO t1 SELECT number as a, -a as b from numbers(5); + +INSERT INTO t2 SELECT if(number % 2 == 0, toInt64(number), -number) as key, number as val from numbers(5); + +SELECT a, b, val FROM t1 INNER JOIN t2 ON t1.a = t2.key OR t1.b = t2.key; +``` + +çµæžœï¼š + +``` +┌─a─┬──b─┬─val─┠+│ 0 │ 0 │ 0 │ +│ 1 │ -1 │ 1 │ +│ 2 │ -2 │ 2 │ +│ 3 │ -3 │ 3 │ +│ 4 │ -4 │ 4 │ +└───┴────┴─────┘ +``` + +`INNER`タイプã®çµåˆã¨`OR`ãŠã‚ˆã³`AND`ã‚’å«ã‚€æ¡ä»¶ã‚’æŒã¤**クエリ**: + +:::note +デフォルトã§ã¯ã€ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®ã‚«ãƒ©ãƒ ã‚’使ã†æ¡ä»¶ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã›ã‚“。例ãˆã°`t1.a = t2.key AND t1.b > 0 AND t2.b > t2.c`ã¯`t1.b > 0`ãŒ`t1`ã®ã‚«ãƒ©ãƒ ã®ã¿ã‚’使用ã—ã€`t2.b > t2.c`ãŒ`t2`ã®ã‚«ãƒ©ãƒ ã®ã¿ã‚’使用ã™ã‚‹ãŸã‚å¯èƒ½ã§ã™ã€‚ã—ã‹ã—ã€`t1.a = t2.key AND t1.b > t2.key`ã®ã‚ˆã†ãªæ¡ä»¶ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã‚µãƒãƒ¼ãƒˆã‚’試ã¿ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ä»¥ä¸‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +``` sql +SELECT a, b, val FROM t1 INNER JOIN t2 ON t1.a = t2.key OR t1.b = t2.key AND t2.val > 3; +``` + +çµæžœï¼š + +``` +┌─a─┬──b─┬─val─┠+│ 0 │ 0 │ 0 │ +│ 2 │ -2 │ 2 │ +│ 4 │ -4 │ 4 │ +└───┴────┴─────┘ +``` + +## [試験的機能] ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«å¯¾ã™ã‚‹ä¸ç­‰å¼æ¡ä»¶ã‚’ä¼´ã†çµåˆ + +:::note +ã“ã®æ©Ÿèƒ½ã¯è©¦é¨“çš„ã§ã™ã€‚ã“れを利用ã™ã‚‹ã«ã¯ã€è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚„`SET`コマンドを用ã„ã¦`allow_experimental_join_condition`ã‚’1ã«è¨­å®šã—ã¦ãã ã•ã„: + +```sql +SET allow_experimental_join_condition=1 +``` + +ãã†ã§ãªã‘ã‚Œã°ã€`INVALID_JOIN_ON_EXPRESSION`ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +::: + +ClickHouseã¯ç¾åœ¨ã€ç­‰å¼æ¡ä»¶ã«åŠ ãˆã¦ä¸ç­‰å¼æ¡ä»¶ã‚’æŒã¤`ALL/ANY/SEMI/ANTI INNER/LEFT/RIGHT/FULL JOIN`をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ä¸ç­‰å¼æ¡ä»¶ã¯`hash`ãŠã‚ˆã³`grace_hash`çµåˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®ã¿ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ä¸ç­‰å¼æ¡ä»¶ã¯`join_use_nulls`ã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +**例** + +テーブル`t1`: + +``` +┌─key──┬─attr─┬─a─┬─b─┬─c─┠+│ key1 │ a │ 1 │ 1 │ 2 │ +│ key1 │ b │ 2 │ 3 │ 2 │ +│ key1 │ c │ 3 │ 2 │ 1 │ +│ key1 │ d │ 4 │ 7 │ 2 │ +│ key1 │ e │ 5 │ 5 │ 5 │ +│ key2 │ a2 │ 1 │ 1 │ 1 │ +│ key4 │ f │ 2 │ 3 │ 4 │ +└──────┴──────┴───┴───┴───┘ +``` + +テーブル`t2` + +``` +┌─key──┬─attr─┬─a─┬─b─┬─c─┠+│ key1 │ A │ 1 │ 2 │ 1 │ +│ key1 │ B │ 2 │ 1 │ 2 │ +│ key1 │ C │ 3 │ 4 │ 5 │ +│ key1 │ D │ 4 │ 1 │ 6 │ +│ key3 │ a3 │ 1 │ 1 │ 1 │ +│ key4 │ F │ 1 │ 1 │ 1 │ +└──────┴──────┴───┴───┴───┘ +``` + +```sql +SELECT t1.*, t2.* from t1 LEFT JOIN t2 ON t1.key = t2.key and (t1.a < t2.a) ORDER BY (t1.key, t1.attr, t2.key, t2.attr); +``` + +``` +key1 a 1 1 2 key1 B 2 1 2 +key1 a 1 1 2 key1 C 3 4 5 +key1 a 1 1 2 key1 D 4 1 6 +key1 b 2 3 2 key1 C 3 4 5 +key1 b 2 3 2 key1 D 4 1 6 +key1 c 3 2 1 key1 D 4 1 6 +key1 d 4 7 2 0 0 \N +key1 e 5 5 5 0 0 \N +key2 a2 1 1 1 0 0 \N +key4 f 2 3 4 0 0 \N +``` + +## JOINキー内ã®NULL値 + +NULLã¯ã©ã®å€¤ã¨ã‚‚ã€ã¾ãŸè‡ªèº«ã¨ã‚‚ç­‰ã—ãã‚ã‚Šã¾ã›ã‚“。ã¤ã¾ã‚Šã€JOINキーã«NULL値ãŒä¸€æ–¹ã®ãƒ†ãƒ¼ãƒ–ルã«ã‚ã‚‹å ´åˆã€ã‚‚ã†ä¸€æ–¹ã®ãƒ†ãƒ¼ãƒ–ルã®NULL値ã¨ä¸€è‡´ã—ã¾ã›ã‚“。 + +**例** + +テーブル`A`: + +``` +┌───id─┬─name────┠+│ 1 │ Alice │ +│ 2 │ Bob │ +│ á´ºáµá´¸á´¸ │ Charlie │ +└──────┴─────────┘ +``` + +テーブル`B`: + +``` +┌───id─┬─score─┠+│ 1 │ 90 │ +│ 3 │ 85 │ +│ á´ºáµá´¸á´¸ │ 88 │ +└──────┴───────┘ +``` + +```sql +SELECT A.name, B.score FROM A LEFT JOIN B ON A.id = B.id +``` + +``` +┌─name────┬─score─┠+│ Alice │ 90 │ +│ Bob │ 0 │ +│ Charlie │ 0 │ +└─────────┴───────┘ +``` + +`A`テーブルã®`Charlie`è¡Œã¨`B`テーブルã®ã‚¹ã‚³ã‚¢88ã®è¡Œã¯ã€JOINキーã®NULL値ã®ãŸã‚çµæžœã«å«ã¾ã‚Œã¦ã„ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +NULL値を一致ã•ã›ãŸã„å ´åˆã¯ã€`isNotDistinctFrom`関数を使用ã—ã¦JOINキーを比較ã—ã¾ã™ã€‚ + +```sql +SELECT A.name, B.score FROM A LEFT JOIN B ON isNotDistinctFrom(A.id, B.id) +``` + +``` +┌─name────┬─score─┠+│ Alice │ 90 │ +│ Bob │ 0 │ +│ Charlie │ 88 │ +└─────────┴───────┘ +``` + +## ASOF JOINã®ä½¿ç”¨æ–¹æ³• + +`ASOF JOIN`ã¯ã€æ­£ç¢ºãªä¸€è‡´ãŒãªã„レコードをçµåˆã™ã‚‹ã¨ãã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +アルゴリズムã«ã¯ç‰¹åˆ¥ãª**カラム**ãŒãƒ†ãƒ¼ãƒ–ルã«å¿…è¦ã§ã™ã€‚ã“ã®**カラム**: + +- é †åºä»˜ã‘られãŸã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’å«ã¾ãªã‘ã‚Œã°ãªã‚‰ãªã„ +- 次ã®ã„ãšã‚Œã‹ã®åž‹ã‚’æŒã¤ã“ã¨ãŒã§ãã‚‹: [Int, UInt](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md), [Date](../../../sql-reference/data-types/date.md), [DateTime](../../../sql-reference/data-types/datetime.md), [Decimal](../../../sql-reference/data-types/decimal.md) +- `hash`çµåˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã§ã¯ã€`JOIN`ã®å¥ã«å”¯ä¸€ã®**カラム**ã«ã™ã‚‹ã“ã¨ã¯ã§ããªã„ + +構文 `ASOF JOIN ... ON`: + +``` sql +SELECT expressions_list +FROM table_1 +ASOF LEFT JOIN table_2 +ON equi_cond AND closest_match_cond +``` + +ä»»æ„ã®æ•°ã®ç­‰å¼æ¡ä»¶ã¨åŽ³å¯†ã«1ã¤ã®æœ€ã‚‚è¿‘ã„一致æ¡ä»¶ã‚’使用ã§ãã¾ã™ã€‚例ãˆã°ã€`SELECT count() FROM table_1 ASOF LEFT JOIN table_2 ON table_1.a == table_2.b AND table_2.t <= table_1.t`。 + +最も近ã„一致ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹æ¡ä»¶: `>`, `>=`, `<`, `<=`。 + +構文 `ASOF JOIN ... USING`: + +``` sql +SELECT expressions_list +FROM table_1 +ASOF JOIN table_2 +USING (equi_column1, ... equi_columnN, asof_column) +``` + +`ASOF JOIN`ã¯`equi_columnX`を等価çµåˆã«ä½¿ç”¨ã—ã€`asof_column`を最も近ã„一致ã§ã®çµåˆã«ä½¿ç”¨ã—ã¾ã™ã€‚ã“ã®`asof_column`ã¯å¸¸ã«`USING`å¥ã®æœ€å¾Œã®**カラム**ã§ã™ã€‚ + +例ãˆã°ã€ä»¥ä¸‹ã®ãƒ†ãƒ¼ãƒ–ルを考慮ã—ã¦ãã ã•ã„: + + table_1 table_2 + event | ev_time | user_id event | ev_time | user_id + ----------|---------|---------- ----------|---------|---------- + ... ... + event_1_1 | 12:00 | 42 event_2_1 | 11:59 | 42 + ... event_2_2 | 12:30 | 42 + event_1_2 | 13:00 | 42 event_2_3 | 13:00 | 42 + ... ... + +`ASOF JOIN`ã¯ã€`table_1`ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã‚’å–å¾—ã—ã€æœ€ã‚‚è¿‘ã„一致æ¡ä»¶ã«å¯¾å¿œã™ã‚‹`table_1`イベントã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã«æœ€ã‚‚è¿‘ã„`table_2`ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’見ã¤ã‘ã¾ã™ã€‚ç­‰ã—ã„タイムスタンプã®å€¤ãŒåˆ©ç”¨å¯èƒ½ãªå ´åˆã€æœ€ã‚‚è¿‘ã„ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€`user_id`列ã¯ç­‰ä¾¡çµåˆã«ä½¿ç”¨ã•ã‚Œã€`ev_time`列ã¯æœ€ã‚‚è¿‘ã„一致ã§ã®çµåˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ã€`event_1_1`ã¯`event_2_1`ã¨çµåˆã•ã‚Œã€`event_1_2`ã¯`event_2_3`ã¨çµåˆã•ã‚Œã¾ã™ãŒã€`event_2_2`ã¯çµåˆã•ã‚Œã¾ã›ã‚“。 + +:::note +`ASOF JOIN`ã¯`hash`ãŠã‚ˆã³`full_sorting_merge`çµåˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®ã¿ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚ +[Join](../../../engines/table-engines/special/join.md)テーブルエンジンã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +::: + +## PASTE JOINã®ä½¿ç”¨æ–¹æ³• + +`PASTE JOIN`ã®çµæžœã¯ã€å·¦ã‚µãƒ–クエリã®ã™ã¹ã¦ã®**カラム**ã®å¾Œã«å³ã‚µãƒ–クエリã®ã™ã¹ã¦ã®**カラム**ãŒç¶šãテーブルã§ã™ã€‚ +å…ƒã®ãƒ†ãƒ¼ãƒ–ルã§ã®ãƒã‚¸ã‚·ãƒ§ãƒ³ã«åŸºã¥ã„ã¦**è¡Œ**ãŒä¸€è‡´ã—ã¾ã™ï¼ˆ**è¡Œ**ã®é †åºã¯å®šç¾©ã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚ +サブクエリãŒç•°ãªã‚‹æ•°ã®**è¡Œ**ã‚’è¿”ã™å ´åˆã€ä½™åˆ†ãª**è¡Œ**ã¯ã‚«ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +例: +```SQL +SELECT * +FROM +( + SELECT number AS a + FROM numbers(2) +) AS t1 +PASTE JOIN +( + SELECT number AS a + FROM numbers(2) + ORDER BY a DESC +) AS t2 + +┌─a─┬─t2.a─┠+│ 0 │ 1 │ +│ 1 │ 0 │ +└───┴──────┘ +``` +注æ„: ã“ã®å ´åˆã€çµæžœã¯ä¸¦åˆ—ã§èª­ã¿å–ã‚‹ã¨éžæ±ºå®šçš„ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚例: +```SQL +SELECT * +FROM +( + SELECT number AS a + FROM numbers_mt(5) +) AS t1 +PASTE JOIN +( + SELECT number AS a + FROM numbers(10) + ORDER BY a DESC +) AS t2 +SETTINGS max_block_size = 2; + +┌─a─┬─t2.a─┠+│ 2 │ 9 │ +│ 3 │ 8 │ +└───┴──────┘ +┌─a─┬─t2.a─┠+│ 0 │ 7 │ +│ 1 │ 6 │ +└───┴──────┘ +┌─a─┬─t2.a─┠+│ 4 │ 5 │ +└───┴──────┘ +``` + +## 分散JOIN + +分散テーブルをå«ã‚€JOINを実行ã™ã‚‹æ–¹æ³•ã¯2ã¤ã‚ã‚Šã¾ã™: + +- 通常ã®`JOIN`を使用ã™ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚サブクエリã¯ãã‚Œãžã‚Œã®ã‚µãƒ¼ãƒãƒ¼ã§å®Ÿè¡Œã•ã‚Œã€å³ãƒ†ãƒ¼ãƒ–ルãŒä½œæˆã•ã‚Œã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã¨ã®JOINãŒå®Ÿè¡Œã•ã‚Œã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€å³ãƒ†ãƒ¼ãƒ–ルã¯å„サーãƒãƒ¼ã§å€‹åˆ¥ã«å½¢æˆã•ã‚Œã¾ã™ã€‚ +- `GLOBAL ... JOIN`を使用ã™ã‚‹å ´åˆã€ã¾ãšãƒªã‚¯ã‚¨ã‚¹ã‚¿ã‚µãƒ¼ãƒãƒ¼ãŒå³ãƒ†ãƒ¼ãƒ–ルを計算ã™ã‚‹ãŸã‚ã®ã‚µãƒ–クエリを実行ã—ã¾ã™ã€‚ã“ã®ä¸€æ™‚テーブルã¯å„リモートサーãƒãƒ¼ã«æ¸¡ã•ã‚Œã€é€ä¿¡ã•ã‚ŒãŸä¸€æ™‚データを使用ã—ã¦ã‚¯ã‚¨ãƒªãŒå®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +`GLOBAL`を使用ã™ã‚‹éš›ã¯æ³¨æ„ã—ã¦ãã ã•ã„。詳細ã¯[分散サブクエリ](../../../sql-reference/operators/in.md#select-distributed-subqueries)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +## æš—é»™ã®åž‹å¤‰æ› + +`INNER JOIN`, `LEFT JOIN`, `RIGHT JOIN`, ãŠã‚ˆã³`FULL JOIN` **クエリ**ã¯ã€ã€Œçµåˆã‚­ãƒ¼ã€ã®æš—黙的ãªåž‹å¤‰æ›ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ãŸã ã—ã€å·¦ãƒ†ãƒ¼ãƒ–ルã¨å³ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã®çµåˆã‚­ãƒ¼ãŒå˜ä¸€ã®åž‹ã«å¤‰æ›ã§ããªã„å ´åˆï¼ˆä¾‹ãˆã°ã€`UInt64`ã¨`Int64`ã€ã‚ã‚‹ã„ã¯`String`ã¨`Int32`)ã«ã‚¯ã‚¨ãƒªã¯å®Ÿè¡Œã•ã‚Œã¾ã›ã‚“。 + +**例** + +以下ã®ãƒ†ãƒ¼ãƒ–ル `t_1` を考慮ã—ã¦ãã ã•ã„: +```text +┌─a─┬─b─┬─toTypeName(a)─┬─toTypeName(b)─┠+│ 1 │ 1 │ UInt16 │ UInt8 │ +│ 2 │ 2 │ UInt16 │ UInt8 │ +└───┴───┴───────────────┴───────────────┘ +``` +ãã—ã¦ãƒ†ãƒ¼ãƒ–ル `t_2`: +```text +┌──a─┬────b─┬─toTypeName(a)─┬─toTypeName(b)───┠+│ -1 │ 1 │ Int16 │ Nullable(Int64) │ +│ 1 │ -1 │ Int16 │ Nullable(Int64) │ +│ 1 │ 1 │ Int16 │ Nullable(Int64) │ +└────┴──────┴───────────────┴─────────────────┘ +``` + +以下ã®ã‚¯ã‚¨ãƒª +```sql +SELECT a, b, toTypeName(a), toTypeName(b) FROM t_1 FULL JOIN t_2 USING (a, b); +``` +ãŒè¿”ã™ã‚»ãƒƒãƒˆï¼š +```text +┌──a─┬────b─┬─toTypeName(a)─┬─toTypeName(b)───┠+│ 1 │ 1 │ Int32 │ Nullable(Int64) │ +│ 2 │ 2 │ Int32 │ Nullable(Int64) │ +│ -1 │ 1 │ Int32 │ Nullable(Int64) │ +│ 1 │ -1 │ Int32 │ Nullable(Int64) │ +└────┴──────┴───────────────┴─────────────────┘ +``` + +## 使用ã®æŽ¨å¥¨äº‹é … + +### 空ã¾ãŸã¯NULLセルã®å‡¦ç† + +テーブルをçµåˆã™ã‚‹ã¨ãã€ç©ºã®ã‚»ãƒ«ãŒç”Ÿã˜ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚[join_use_nulls](../../../operations/settings/settings.md#join_use_nulls)設定ã¯ClickHouseãŒã“れらã®ã‚»ãƒ«ã‚’ã©ã®ã‚ˆã†ã«åŸ‹ã‚ã‚‹ã‹ã‚’定義ã—ã¾ã™ã€‚ + +`JOIN`キーãŒ[Nullable](../../../sql-reference/data-types/nullable.md)フィールドã§ã‚ã‚‹å ´åˆã€å°‘ãªãã¨ã‚‚1ã¤ã®ã‚­ãƒ¼ãŒ[NULL](../../../sql-reference/syntax.md#null-literal)値をæŒã£ã¦ã„ã‚‹**è¡Œ**ã¯çµåˆã•ã‚Œã¾ã›ã‚“。 + +### 構文 + +`USING`ã§æŒ‡å®šã•ã‚ŒãŸ**カラム**ã¯ä¸¡æ–¹ã®ã‚µãƒ–クエリã§åŒã˜åå‰ã‚’æŒãŸãªã‘ã‚Œã°ãªã‚‰ãšã€ä»–ã®**カラム**ã¯ç•°ãªã‚‹åå‰ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。サブクエリ内ã§**カラム**ã®åå‰ã‚’変更ã™ã‚‹ãŸã‚ã«ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’使用ã§ãã¾ã™ã€‚ + +`USING`å¥ã¯1ã¤ä»¥ä¸Šã®**カラム**を指定ã™ã‚‹ã“ã¨ã§ã€ã“れらã®ã‚«ãƒ©ãƒ ã®ç­‰ä¾¡æ€§ã‚’確立ã—ã¾ã™ã€‚**カラム**ã®ãƒªã‚¹ãƒˆã¯æ‹¬å¼§ã‚’用ã„ãšã«è¨­å®šã•ã‚Œã¾ã™ã€‚より複雑ãªçµåˆæ¡ä»¶ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +### æ§‹æ–‡åˆ¶é™ + +1ã¤ã®`SELECT` **クエリ**ã«è¤‡æ•°ã®`JOIN`å¥ãŒã‚ã‚‹å ´åˆï¼š + +- `*`ã«ã‚ˆã‚‹å…¨ã¦ã®ã‚«ãƒ©ãƒ ã®å–å¾—ã¯ã€ã‚µãƒ–クエリã®**カラム**ã§ãªãテーブルãŒçµåˆã•ã‚Œã‚‹å ´åˆã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ +- `PREWHERE`å¥ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 +- `USING`å¥ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 + +`ON`ã€`WHERE`ã€ãŠã‚ˆã³`GROUP BY`å¥ã®å ´åˆï¼š + +- `ON`ã€`WHERE`ã€ãŠã‚ˆã³`GROUP BY`å¥ã§ä»»æ„ã®å¼ã‚’使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€`SELECT`å¥ã§å¼ã‚’定義ã—ã€ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’介ã—ã¦ã“れらã®å¥ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ã€‚ + +### パフォーマンス + +`JOIN`を実行ã™ã‚‹éš›ã€ã‚¯ã‚¨ãƒªã®ä»–ã®ã‚¹ãƒ†ãƒ¼ã‚¸ã«é–¢é€£ã™ã‚‹å®Ÿè¡Œé †åºã®æœ€é©åŒ–ã¯ã‚ã‚Šã¾ã›ã‚“。JOIN(å³ãƒ†ãƒ¼ãƒ–ルã®æ¤œç´¢ï¼‰ã¯`WHERE`ã§ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã®å‰ã«ã€é›†è¨ˆã®å‰ã«å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +åŒã˜`JOIN`ã‚’ä¼´ã†ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ãŸã³ã«ã‚µãƒ–クエリãŒå†åº¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚çµæžœã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã›ã‚“。ã“れをé¿ã‘ã‚‹ãŸã‚ã«ã€ç‰¹æ®Šãª[Join](../../../engines/table-engines/special/join.md)テーブルエンジンを使用ã—ã¾ã™ã€‚ã“ã®ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€å¸¸ã«RAMã«ã‚ã‚‹çµåˆã®ãŸã‚ã®æº–å‚™ã•ã‚ŒãŸé…列ã§ã™ã€‚ + +å ´åˆã«ã‚ˆã£ã¦ã¯ã€`JOIN`ã®ä»£ã‚ã‚Šã«[IN](../../../sql-reference/operators/in.md)を使用ã™ã‚‹æ–¹ãŒåŠ¹çŽ‡çš„ã§ã™ã€‚ + +ディメンションテーブル(広告キャンペーンã®åå‰ãªã©ã®ãƒ‡ã‚£ãƒ¡ãƒ³ã‚·ãƒ§ãƒ³ãƒ—ロパティをå«ã‚€æ¯”較的å°ã•ãªãƒ†ãƒ¼ãƒ–ル)ã¨ã®çµåˆã«`JOIN`ãŒå¿…è¦ãªå ´åˆã€å³ãƒ†ãƒ¼ãƒ–ルãŒæ¯Žå›žå†ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã‚‹ãŸã‚`JOIN`ã¯ã‚ã¾ã‚Šä¾¿åˆ©ã§ã¯ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ãã†ã„ã£ãŸå ´åˆã«ã¯ã€ŒDictionaryã€æ©Ÿèƒ½ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚詳細ã¯[Dictionaries](../../../sql-reference/dictionaries/index.md)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +### ãƒ¡ãƒ¢ãƒªåˆ¶é™ + +デフォルトã§ClickHouseã¯[ãƒãƒƒã‚·ãƒ¥çµåˆ](https://en.wikipedia.org/wiki/Hash_join)アルゴリズムを使用ã—ã¾ã™ã€‚ClickHouseã¯right_tableã‚’å–ã‚Šã€RAMã«ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚`join_algorithm = 'auto'`ãŒæœ‰åŠ¹ãªå ´åˆã€ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã®ã—ãã„値を超ãˆã‚‹ã¨ClickHouseã¯[マージ](https://en.wikipedia.org/wiki/Sort-merge_join)çµåˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã«ãƒ•ã‚©ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ã¾ã™ã€‚`JOIN`アルゴリズムã®èª¬æ˜Žã¯[join_algorithm](../../../operations/settings/settings.md#join_algorithm)設定をå‚ç…§ã—ã¦ãã ã•ã„。 + +`JOIN`æ“作ã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»ã‚’制é™ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ä»¥ä¸‹ã®è¨­å®šã‚’使用ã—ã¾ã™ï¼š + +- [max_rows_in_join](../../../operations/settings/query-complexity.md#settings-max_rows_in_join) — ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®è¡Œæ•°ã‚’制é™ã—ã¾ã™ã€‚ +- [max_bytes_in_join](../../../operations/settings/query-complexity.md#settings-max_bytes_in_join) — ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルã®ã‚µã‚¤ã‚ºã‚’制é™ã—ã¾ã™ã€‚ + +ã“れらã®åˆ¶é™ã®ã„ãšã‚Œã‹ãŒåˆ°é”ã•ã‚ŒãŸå ´åˆã€ClickHouseã¯[join_overflow_mode](../../../operations/settings/query-complexity.md#settings-join_overflow_mode)設定ã«æŒ‡ç¤ºã•ã‚ŒãŸé€šã‚Šã«å‹•ä½œã—ã¾ã™ã€‚ + +## 例 + +``` sql +SELECT + CounterID, + hits, + visits +FROM +( + SELECT + CounterID, + count() AS hits + FROM test.hits + GROUP BY CounterID +) ANY LEFT JOIN +( + SELECT + CounterID, + sum(Sign) AS visits + FROM test.visits + GROUP BY CounterID +) USING CounterID +ORDER BY hits DESC +LIMIT 10 +``` + +``` text +┌─CounterID─┬───hits─┬─visits─┠+│ 1143050 │ 523264 │ 13665 │ +│ 731962 │ 475698 │ 102716 │ +│ 722545 │ 337212 │ 108187 │ +│ 722889 │ 252197 │ 10547 │ +│ 2237260 │ 196036 │ 9522 │ +│ 23057320 │ 147211 │ 7689 │ +│ 722818 │ 90109 │ 17847 │ +│ 48221 │ 85379 │ 4652 │ +│ 19762435 │ 77807 │ 7026 │ +│ 722884 │ 77492 │ 11056 │ +└───────────┴────────┴────────┘ +``` diff --git a/docs/ja/sql-reference/statements/select/limit-by.md b/docs/ja/sql-reference/statements/select/limit-by.md new file mode 100644 index 00000000000..a13611e758d --- /dev/null +++ b/docs/ja/sql-reference/statements/select/limit-by.md @@ -0,0 +1,75 @@ +--- +slug: /ja/sql-reference/statements/select/limit-by +sidebar_label: LIMIT BY +--- + +# LIMIT BY å¥ + +`LIMIT n BY expressions` å¥ã‚’æŒã¤ã‚¯ã‚¨ãƒªã¯ã€`expressions` ã®å„ç•°ãªã‚‹å€¤ã®æœ€åˆã® `n` 行をé¸æŠžã—ã¾ã™ã€‚`LIMIT BY` ã®ã‚­ãƒ¼ã«ã¯ä»»æ„ã®æ•°ã®[å¼](../../../sql-reference/syntax.md#syntax-expressions)ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ClickHouse ã¯ä»¥ä¸‹ã®æ§‹æ–‡ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +- `LIMIT [offset_value, ]n BY expressions` +- `LIMIT n OFFSET offset_value BY expressions` + +クエリã®å‡¦ç†ä¸­ã€ClickHouse ã¯ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã«ã‚ˆã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã—ã¾ã™ã€‚ソートキーã¯[ORDER BY](order-by.md#select-order-by) å¥ã‚’使用ã—ã¦æ˜Žç¤ºçš„ã«è¨­å®šã™ã‚‹ã‹ã€ãƒ†ãƒ¼ãƒ–ルエンジンã®ãƒ—ロパティã¨ã—ã¦æš—黙的ã«è¨­å®šã•ã‚Œã¾ã™ï¼ˆè¡Œé †åºãŒä¿è¨¼ã•ã‚Œã‚‹ã®ã¯ [ORDER BY](order-by.md#select-order-by) を使用ã—ãŸå ´åˆã®ã¿ã§ã‚ã‚Šã€ãã†ã§ãªã‘ã‚Œã°ãƒžãƒ«ãƒã‚¹ãƒ¬ãƒƒãƒ‰ã®ãŸã‚ã«è¡Œãƒ–ロックã¯é †åºä»˜ã‘られã¾ã›ã‚“)。ãã®å¾Œã€ClickHouse 㯠`LIMIT n BY expressions` ã‚’é©ç”¨ã—ã€`expressions` ã®å„ç•°ãªã‚‹çµ„ã¿åˆã‚ã›ã®æœ€åˆã® `n` 行を返ã—ã¾ã™ã€‚`OFFSET` ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`expressions` ã®ç•°ãªã‚‹çµ„ã¿åˆã‚ã›ã«å±žã™ã‚‹å„データブロックã«å¯¾ã—ã¦ã€ClickHouse ã¯ãƒ–ロックã®æœ€åˆã‹ã‚‰ `offset_value` ã®è¡Œæ•°ã‚’スキップã—ã€æœ€å¤§ `n` 行をçµæžœã¨ã—ã¦è¿”ã—ã¾ã™ã€‚`offset_value` ãŒãƒ‡ãƒ¼ã‚¿ãƒ–ロック内ã®è¡Œæ•°ã‚’超ãˆã¦ã„ã‚‹å ´åˆã€ClickHouse ã¯ãƒ–ロックã‹ã‚‰ã‚¼ãƒ­è¡Œã‚’è¿”ã—ã¾ã™ã€‚ + +:::note +`LIMIT BY` 㯠[LIMIT](../../../sql-reference/statements/select/limit.md) ã¨ã¯é–¢ä¿‚ã‚ã‚Šã¾ã›ã‚“。両方をåŒã˜ã‚¯ã‚¨ãƒªå†…ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +`LIMIT BY` å¥ã§ã‚«ãƒ©ãƒ åã®ä»£ã‚ã‚Šã«ã‚«ãƒ©ãƒ ç•ªå·ã‚’使用ã—ãŸã„å ´åˆã¯ã€è¨­å®š [enable_positional_arguments](../../../operations/settings/settings.md#enable-positional-arguments) を有効ã«ã—ã¦ãã ã•ã„。 + +## 例 + +サンプルテーブル: + +``` sql +CREATE TABLE limit_by(id Int, val Int) ENGINE = Memory; +INSERT INTO limit_by VALUES (1, 10), (1, 11), (1, 12), (2, 20), (2, 21); +``` + +クエリ: + +``` sql +SELECT * FROM limit_by ORDER BY id, val LIMIT 2 BY id +``` + +``` text +┌─id─┬─val─┠+│ 1 │ 10 │ +│ 1 │ 11 │ +│ 2 │ 20 │ +│ 2 │ 21 │ +└────┴─────┘ +``` + +``` sql +SELECT * FROM limit_by ORDER BY id, val LIMIT 1, 2 BY id +``` + +``` text +┌─id─┬─val─┠+│ 1 │ 11 │ +│ 1 │ 12 │ +│ 2 │ 21 │ +└────┴─────┘ +``` + +`SELECT * FROM limit_by ORDER BY id, val LIMIT 2 OFFSET 1 BY id` クエリã¯åŒã˜çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +以下ã®ã‚¯ã‚¨ãƒªã¯ã€å„ `domain, device_type` ペアã®ä¸Šä½5ã¤ã®ãƒªãƒ•ã‚¡ãƒ©ãƒ¼ã‚’ã€æœ€å¤§100è¡Œã®åˆè¨ˆï¼ˆ`LIMIT n BY + LIMIT`)ã§è¿”ã—ã¾ã™ã€‚ + +``` sql +SELECT + domainWithoutWWW(URL) AS domain, + domainWithoutWWW(REFERRER_URL) AS referrer, + device_type, + count() cnt +FROM hits +GROUP BY domain, referrer, device_type +ORDER BY cnt DESC +LIMIT 5 BY domain, device_type +LIMIT 100 +``` + diff --git a/docs/ja/sql-reference/statements/select/limit.md b/docs/ja/sql-reference/statements/select/limit.md new file mode 100644 index 00000000000..76e2d78e0ea --- /dev/null +++ b/docs/ja/sql-reference/statements/select/limit.md @@ -0,0 +1,67 @@ +--- +slug: /ja/sql-reference/statements/select/limit +sidebar_label: LIMIT +--- + +# LIMITå¥ + +`LIMIT m`を使用ã™ã‚‹ã¨ã€çµæžœã‹ã‚‰æœ€åˆã®`m`行をé¸æŠžã§ãã¾ã™ã€‚ + +`LIMIT n, m`を使用ã™ã‚‹ã¨ã€æœ€åˆã®`n`行をスキップã—ãŸå¾Œã®çµæžœã‹ã‚‰`m`行をé¸æŠžã§ãã¾ã™ã€‚`LIMIT m OFFSET n`ã®æ§‹æ–‡ã¯ã“ã‚Œã¨åŒç­‰ã§ã™ã€‚ + +`n`ã¨`m`ã¯éžè² æ•´æ•°ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 + +çµæžœã‚’明示的ã«ã‚½ãƒ¼ãƒˆã™ã‚‹[ORDER BY](../../../sql-reference/statements/select/order-by.md)å¥ãŒãªã„å ´åˆã€çµæžœã«é¸ã°ã‚Œã‚‹è¡Œã¯ä»»æ„ã§éžæ±ºå®šçš„ãªã‚‚ã®ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +:::note +çµæžœã‚»ãƒƒãƒˆå†…ã®è¡Œæ•°ã¯ã€[limit](../../../operations/settings/settings.md#limit)設定ã«ã‚‚ä¾å­˜ã™ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## LIMIT ... WITH TIESä¿®é£¾å­ + +`LIMIT n[,m]`ã«`WITH TIES`修飾å­ã‚’設定ã—ã€`ORDER BY expr_list`を指定ã—ãŸå ´åˆã€`LIMIT n`ã§æŒ‡å®šã—ãŸä½ç½®`n`ã¾ãŸã¯`LIMIT n,m`ã§æŒ‡å®šã—ãŸä½ç½®`m`ã«ã‚ã‚‹è¡Œã¨åŒã˜`ORDER BY`フィールドã®å€¤ã‚’æŒã¤ã™ã¹ã¦ã®è¡Œã¨ã€æœ€åˆã®`n`ã¾ãŸã¯`n,m`行をçµæžœã¨ã—ã¦å–å¾—ã—ã¾ã™ã€‚ + +ã“ã®ä¿®é£¾å­ã¯ã€[ORDER BY ... WITH FILL修飾å­](../../../sql-reference/statements/select/order-by.md#orderby-with-fill)ã¨ã‚‚組ã¿åˆã‚ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +例ãˆã°ã€æ¬¡ã®ã‚¯ã‚¨ãƒª + +``` sql +SELECT * FROM ( + SELECT number%50 AS n FROM numbers(100) +) ORDER BY n LIMIT 0,5 +``` + +ã¯ã€æ¬¡ã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ + +``` text +┌─n─┠+│ 0 │ +│ 0 │ +│ 1 │ +│ 1 │ +│ 2 │ +└───┘ +``` + +ã—ã‹ã—ã€`WITH TIES`修飾å­ã‚’é©ç”¨ã™ã‚‹ã¨ + +``` sql +SELECT * FROM ( + SELECT number%50 AS n FROM numbers(100) +) ORDER BY n LIMIT 0,5 WITH TIES +``` + +別ã®è¡Œã‚»ãƒƒãƒˆãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +``` text +┌─n─┠+│ 0 │ +│ 0 │ +│ 1 │ +│ 1 │ +│ 2 │ +│ 2 │ +└───┘ +``` + +ã“ã‚Œã¯ã€è¡Œç•ªå·6ãŒãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰`n`ã«å¯¾ã—ã¦è¡Œç•ªå·5ã¨åŒã˜å€¤ã€Œ2ã€ã‚’æŒã£ã¦ã„ã‚‹ãŸã‚ã§ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/select/offset.md b/docs/ja/sql-reference/statements/select/offset.md new file mode 100644 index 00000000000..c728ebd0603 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/offset.md @@ -0,0 +1,88 @@ +--- +slug: /ja/sql-reference/statements/select/offset +sidebar_label: OFFSET +title: "OFFSET FETCH å¥" +--- + +`OFFSET` 㨠`FETCH` ã¯ãƒ‡ãƒ¼ã‚¿ã‚’部分ã”ã¨ã«å–å¾—ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€å˜ä¸€ã®ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦å–å¾—ã—ãŸã„è¡Œã®ãƒ–ロックを指定ã—ã¾ã™ã€‚ + +``` sql +OFFSET offset_row_count {ROW | ROWS}] [FETCH {FIRST | NEXT} fetch_row_count {ROW | ROWS} {ONLY | WITH TIES}] +``` + +`offset_row_count` ã‚„ `fetch_row_count` ã®å€¤ã¯ã€æ•°å€¤ã¾ãŸã¯ãƒªãƒ†ãƒ©ãƒ«å®šæ•°ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`fetch_row_count` ã‚’çœç•¥ã™ã‚‹ã“ã¨ã‚‚ã§ãã€ãã®å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯1ã§ã™ã€‚ + +`OFFSET` ã¯ã€ã‚¯ã‚¨ãƒªçµæžœã‚»ãƒƒãƒˆã‹ã‚‰è¡Œã‚’è¿”ã—始ã‚ã‚‹å‰ã«ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹è¡Œæ•°ã‚’指定ã—ã¾ã™ã€‚ + +`FETCH` ã¯ã€ã‚¯ã‚¨ãƒªçµæžœã®è¡Œæ•°ã®æœ€å¤§å€¤ã‚’指定ã—ã¾ã™ã€‚ + +`ONLY` オプションã¯ã€`OFFSET` ã«ã‚ˆã£ã¦çœç•¥ã•ã‚ŒãŸè¡Œã«ç¶šã行を返ã™ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“ã®å ´åˆã€`FETCH` 㯠[LIMIT](../../../sql-reference/statements/select/limit.md) å¥ã®ä»£æ›¿ã¨ãªã‚Šã¾ã™ã€‚例ãˆã°ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã¯ + +``` sql +SELECT * FROM test_fetch ORDER BY a OFFSET 1 ROW FETCH FIRST 3 ROWS ONLY; +``` + +次ã®ã‚¯ã‚¨ãƒªã¨åŒä¸€ã§ã™: + +``` sql +SELECT * FROM test_fetch ORDER BY a LIMIT 3 OFFSET 1; +``` + +`WITH TIES` オプションã¯ã€`ORDER BY` å¥ã«å¾“ã£ã¦çµæžœã‚»ãƒƒãƒˆã®æœ€çµ‚ä½ç½®ã¨åŒç€ã¨ãªã‚‹è¿½åŠ ã®è¡Œã‚’è¿”ã™ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€`fetch_row_count` ãŒ5ã®å ´åˆã§ã€2ã¤ã®è¿½åŠ ã®è¡ŒãŒ5行目㮠`ORDER BY` カラムã®å€¤ã¨ä¸€è‡´ã™ã‚‹ãªã‚‰ã€çµæžœã‚»ãƒƒãƒˆã«ã¯7è¡ŒãŒå«ã¾ã‚Œã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ + +:::note +標準ã«å¾“ãˆã°ã€`OFFSET` å¥ã¯ `FETCH` å¥ãŒã‚ã‚‹å ´åˆã€ãã®å‰ã«è¨˜è¿°ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +:::note +実際ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆã¯ã€[offset](../../../operations/settings/settings.md#offset) 設定ã«ã‚‚ä¾å­˜ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## 例 + +入力テーブル: + +``` text +┌─a─┬─b─┠+│ 1 │ 1 │ +│ 2 │ 1 │ +│ 3 │ 4 │ +│ 1 │ 3 │ +│ 5 │ 4 │ +│ 0 │ 6 │ +│ 5 │ 7 │ +└───┴───┘ +``` + +`ONLY` オプションã®ä½¿ç”¨ä¾‹: + +``` sql +SELECT * FROM test_fetch ORDER BY a OFFSET 3 ROW FETCH FIRST 3 ROWS ONLY; +``` + +çµæžœ: + +``` text +┌─a─┬─b─┠+│ 2 │ 1 │ +│ 3 │ 4 │ +│ 5 │ 4 │ +└───┴───┘ +``` + +`WITH TIES` オプションã®ä½¿ç”¨ä¾‹: + +``` sql +SELECT * FROM test_fetch ORDER BY a OFFSET 3 ROW FETCH FIRST 3 ROWS WITH TIES; +``` + +çµæžœ: + +``` text +┌─a─┬─b─┠+│ 2 │ 1 │ +│ 3 │ 4 │ +│ 5 │ 4 │ +│ 5 │ 7 │ +└───┴───┘ +``` diff --git a/docs/ja/sql-reference/statements/select/order-by.md b/docs/ja/sql-reference/statements/select/order-by.md new file mode 100644 index 00000000000..caa3a1edc40 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/order-by.md @@ -0,0 +1,671 @@ +--- +slug: /ja/sql-reference/statements/select/order-by +sidebar_label: ORDER BY +--- + +# ORDER BY å¥ + +`ORDER BY` å¥ã¯æ¬¡ã®ã„ãšã‚Œã‹ã‚’å«ã¿ã¾ã™ï¼š + +- å¼ã®ãƒªã‚¹ãƒˆã€ä¾‹ï¼š`ORDER BY visits, search_phrase`〠+- `SELECT` å¥å†…ã®ã‚«ãƒ©ãƒ ã‚’指ã™æ•°å­—ã®ãƒªã‚¹ãƒˆã€ä¾‹ï¼š`ORDER BY 2, 1`ã€ã¾ãŸã¯ +- `ALL`ã€ã“れ㯠`SELECT` å¥ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’æ„味ã—ã¾ã™ã€‚例:`ORDER BY ALL`。 + +カラム番å·ã«ã‚ˆã‚‹ã‚½ãƒ¼ãƒˆã‚’無効ã«ã™ã‚‹ã«ã¯ã€è¨­å®š [enable_positional_arguments](../../../operations/settings/settings.md#enable-positional-arguments) = 0 を設定ã—ã¾ã™ã€‚ +`ALL` ã«ã‚ˆã‚‹ã‚½ãƒ¼ãƒˆã‚’無効ã«ã™ã‚‹ã«ã¯ã€è¨­å®š [enable_order_by_all](../../../operations/settings/settings.md#enable-order-by-all) = 0 を設定ã—ã¾ã™ã€‚ + +`ORDER BY` å¥ã«ã¯ã‚½ãƒ¼ãƒˆã®æ–¹å‘を決定ã™ã‚‹ãŸã‚ã« `DESC` (é™é †ï¼‰ã¾ãŸã¯ `ASC` (昇順)修飾å­ãŒä»˜ã‘られるã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +明示的ãªã‚½ãƒ¼ãƒˆé †æŒ‡å®šãŒãªã„é™ã‚Šã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ `ASC` ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ +ソートã®æ–¹å‘ã¯ã€ãƒªã‚¹ãƒˆå…¨ä½“ã§ã¯ãªãå˜ä¸€ã®å¼ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚例:`ORDER BY Visits DESC, SearchPhrase`。 +ã¾ãŸã€ã‚½ãƒ¼ãƒˆã¯å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã¦è¡Œã‚ã‚Œã¾ã™ã€‚ + +ソートå¼ã®å€¤ãŒåŒä¸€ã®è¡Œã¯ã€ä»»æ„ã§éžæ±ºå®šè«–çš„ãªé †åºã§è¿”ã•ã‚Œã¾ã™ã€‚ +`SELECT` ステートメント㧠`ORDER BY` å¥ãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€è¡Œã®é †åºã‚‚ä»»æ„ã§éžæ±ºå®šè«–çš„ã§ã™ã€‚ + +## 特殊値ã®ã‚½ãƒ¼ãƒˆ + +`NaN` 㨠`NULL` ã®ã‚½ãƒ¼ãƒˆé †ã«ã¯2ã¤ã®ã‚¢ãƒ—ローãƒãŒã‚ã‚Šã¾ã™ï¼š + +- デフォルトã¾ãŸã¯ `NULLS LAST` 修飾å­ã‚’使用ã—ãŸå ´åˆï¼šæœ€åˆã«å€¤ã€ãã®å¾Œ `NaN`ã€æœ€å¾Œã« `NULL`。 +- `NULLS FIRST` 修飾å­ã‚’使用ã—ãŸå ´åˆï¼šæœ€åˆã« `NULL`ã€ãã®å¾Œ `NaN`ã€æœ€å¾Œã«ä»–ã®å€¤ã€‚ + +### 例 + +以下ã®ãƒ†ãƒ¼ãƒ–ルã«ã¤ã„ã¦ï¼š + +``` text +┌─x─┬────y─┠+│ 1 │ á´ºáµá´¸á´¸ │ +│ 2 │ 2 │ +│ 1 │ nan │ +│ 2 │ 2 │ +│ 3 │ 4 │ +│ 5 │ 6 │ +│ 6 │ nan │ +│ 7 │ á´ºáµá´¸á´¸ │ +│ 6 │ 7 │ +│ 8 │ 9 │ +└───┴──────┘ +``` + +クエリ `SELECT * FROM t_null_nan ORDER BY y NULLS FIRST` を実行ã™ã‚‹ã¨ï¼š + +``` text +┌─x─┬────y─┠+│ 1 │ á´ºáµá´¸á´¸ │ +│ 7 │ á´ºáµá´¸á´¸ │ +│ 1 │ nan │ +│ 6 │ nan │ +│ 2 │ 2 │ +│ 2 │ 2 │ +│ 3 │ 4 │ +│ 5 │ 6 │ +│ 6 │ 7 │ +│ 8 │ 9 │ +└───┴──────┘ +``` + +浮動å°æ•°ç‚¹æ•°ãŒã‚½ãƒ¼ãƒˆã•ã‚Œã‚‹éš›ã€NaNã¯ä»–ã®å€¤ã¨ã¯åˆ¥ã«æ‰±ã‚ã‚Œã¾ã™ã€‚ソートã®é †åºã«ã‹ã‹ã‚らãšã€NaNã¯æœ€å¾Œã«æ¥ã¾ã™ã€‚ã¤ã¾ã‚Šã€æ˜‡é †ã®ã‚½ãƒ¼ãƒˆã§ã¯ã™ã¹ã¦ã®ä»–ã®æ•°å€¤ã‚ˆã‚Šã‚‚大ãã„ã‹ã®ã‚ˆã†ã«æ‰±ã‚ã‚Œã€é™é †ã®ã‚½ãƒ¼ãƒˆã§ã¯æ®‹ã‚Šã®æ•°å€¤ã‚ˆã‚Šã‚‚å°ã•ã„ã‹ã®ã‚ˆã†ã«æ‰±ã‚ã‚Œã¾ã™ã€‚ + +## ç…§åˆã‚µãƒãƒ¼ãƒˆ + +[String](../../../sql-reference/data-types/string.md) 値ã«ã‚ˆã‚‹ã‚½ãƒ¼ãƒˆã®éš›ã€ç…§åˆï¼ˆæ¯”較)を指定ã§ãã¾ã™ã€‚例:`ORDER BY SearchPhrase COLLATE 'tr'` - トルコ語アルファベットを使用ã—ãŸå¤§æ–‡å­—å°æ–‡å­—を区別ã—ãªã„昇順ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã«ã‚ˆã‚‹ã‚½ãƒ¼ãƒˆã€‚`COLLATE` 㯠ORDER BY 内ã®å„å¼ã«ã¤ã„ã¦ç‹¬ç«‹ã—ã¦æŒ‡å®šå¯èƒ½ã§ã™ã€‚`ASC` ã¾ãŸã¯ `DESC` ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€`COLLATE` ã¯ãã®å¾Œã«æŒ‡å®šã•ã‚Œã¾ã™ã€‚`COLLATE` を使用ã™ã‚‹å ´åˆã€ã‚½ãƒ¼ãƒˆã¯å¸¸ã«å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +ç…§åˆã¯ [LowCardinality](../../../sql-reference/data-types/lowcardinality.md)ã€[Nullable](../../../sql-reference/data-types/nullable.md)ã€[Array](../../../sql-reference/data-types/array.md)ã€ãŠã‚ˆã³ [Tuple](../../../sql-reference/data-types/tuple.md) 内ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +通常ã®ãƒã‚¤ãƒˆã«ã‚ˆã‚‹ã‚½ãƒ¼ãƒˆã‚ˆã‚Šã‚‚効率ãŒä½Žä¸‹ã™ã‚‹ãŸã‚ã€ã‚ãšã‹ãªè¡Œã®æœ€çµ‚çš„ãªã‚½ãƒ¼ãƒˆã«ã®ã¿ `COLLATE` ã®ä½¿ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## ç…§åˆã®ä¾‹ + +[String](../../../sql-reference/data-types/string.md) 値ã®ã¿ã«é–¢ã™ã‚‹ä¾‹ï¼š + +入力テーブル: + +``` text +┌─x─┬─s────┠+│ 1 │ bca │ +│ 2 │ ABC │ +│ 3 │ 123a │ +│ 4 │ abc │ +│ 5 │ BCA │ +└───┴──────┘ +``` + +クエリ: + +```sql +SELECT * FROM collate_test ORDER BY s ASC COLLATE 'en'; +``` + +çµæžœï¼š + +``` text +┌─x─┬─s────┠+│ 3 │ 123a │ +│ 4 │ abc │ +│ 2 │ ABC │ +│ 1 │ bca │ +│ 5 │ BCA │ +└───┴──────┘ +``` + +[Nullable](../../../sql-reference/data-types/nullable.md) を用ã„ãŸä¾‹ï¼š + +入力テーブル: + +``` text +┌─x─┬─s────┠+│ 1 │ bca │ +│ 2 │ á´ºáµá´¸á´¸ │ +│ 3 │ ABC │ +│ 4 │ 123a │ +│ 5 │ abc │ +│ 6 │ á´ºáµá´¸á´¸ │ +│ 7 │ BCA │ +└───┴──────┘ +``` + +クエリ: + +```sql +SELECT * FROM collate_test ORDER BY s ASC COLLATE 'en'; +``` + +çµæžœï¼š + +``` text +┌─x─┬─s────┠+│ 4 │ 123a │ +│ 5 │ abc │ +│ 3 │ ABC │ +│ 1 │ bca │ +│ 7 │ BCA │ +│ 6 │ á´ºáµá´¸á´¸ │ +│ 2 │ á´ºáµá´¸á´¸ │ +└───┴──────┘ +``` + +[Array](../../../sql-reference/data-types/array.md) を用ã„ãŸä¾‹ï¼š + +入力テーブル: + +``` text +┌─x─┬─s─────────────┠+│ 1 │ ['Z'] │ +│ 2 │ ['z'] │ +│ 3 │ ['a'] │ +│ 4 │ ['A'] │ +│ 5 │ ['z','a'] │ +│ 6 │ ['z','a','a'] │ +│ 7 │ [''] │ +└───┴───────────────┘ +``` + +クエリ: + +```sql +SELECT * FROM collate_test ORDER BY s ASC COLLATE 'en'; +``` + +çµæžœï¼š + +``` text +┌─x─┬─s─────────────┠+│ 7 │ [''] │ +│ 3 │ ['a'] │ +│ 4 │ ['A'] │ +│ 2 │ ['z'] │ +│ 5 │ ['z','a'] │ +│ 6 │ ['z','a','a'] │ +│ 1 │ ['Z'] │ +└───┴───────────────┘ +``` + +[LowCardinality](../../../sql-reference/data-types/lowcardinality.md) string を用ã„ãŸä¾‹ï¼š + +入力テーブル: + +```text +┌─x─┬─s───┠+│ 1 │ Z │ +│ 2 │ z │ +│ 3 │ a │ +│ 4 │ A │ +│ 5 │ za │ +│ 6 │ zaa │ +│ 7 │ │ +└───┴─────┘ +``` + +クエリ: + +```sql +SELECT * FROM collate_test ORDER BY s ASC COLLATE 'en'; +``` + +çµæžœï¼š + +```text +┌─x─┬─s───┠+│ 7 │ │ +│ 3 │ a │ +│ 4 │ A │ +│ 2 │ z │ +│ 1 │ Z │ +│ 5 │ za │ +│ 6 │ zaa │ +└───┴─────┘ +``` + +[Tuple](../../../sql-reference/data-types/tuple.md) を用ã„ãŸä¾‹ï¼š + +```text +┌─x─┬─s───────┠+│ 1 │ (1,'Z') │ +│ 2 │ (1,'z') │ +│ 3 │ (1,'a') │ +│ 4 │ (2,'z') │ +│ 5 │ (1,'A') │ +│ 6 │ (2,'Z') │ +│ 7 │ (2,'A') │ +└───┴─────────┘ +``` + +クエリ: + +```sql +SELECT * FROM collate_test ORDER BY s ASC COLLATE 'en'; +``` + +çµæžœï¼š + +```text +┌─x─┬─s───────┠+│ 3 │ (1,'a') │ +│ 5 │ (1,'A') │ +│ 2 │ (1,'z') │ +│ 1 │ (1,'Z') │ +│ 7 │ (2,'A') │ +│ 4 │ (2,'z') │ +│ 6 │ (2,'Z') │ +└───┴─────────┘ +``` + +## 実装ã®è©³ç´° + +å°ã•ãª [LIMIT](../../../sql-reference/statements/select/limit.md) ㌠`ORDER BY` ã«è¿½åŠ ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚ˆã‚Šå°‘ãªã„RAMを使用ã—ã¾ã™ã€‚ãã†ã§ãªã„å ´åˆã€ã‚½ãƒ¼ãƒˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®é‡ã«æ¯”例ã—ãŸãƒ¡ãƒ¢ãƒªé‡ã‚’消費ã—ã¾ã™ã€‚分散クエリ処ç†ã®å ´åˆã€[GROUP BY](../../../sql-reference/statements/select/group-by.md) ãŒçœç•¥ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚½ãƒ¼ãƒˆã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã§éƒ¨åˆ†çš„ã«è¡Œã‚ã‚Œã€çµæžœã¯è¦æ±‚サーãƒãƒ¼ã§ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€åˆ†æ•£ã‚½ãƒ¼ãƒˆã®éš›ã€ã‚½ãƒ¼ãƒˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿é‡ã¯1å°ã®ã‚µãƒ¼ãƒãƒ¼ã®ãƒ¡ãƒ¢ãƒªã‚’超ãˆã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +RAMãŒä¸è¶³ã—ã¦ã„ã‚‹å ´åˆã€å¤–部メモリ(ディスク上ã®ä¸€æ™‚ファイルã®ä½œæˆï¼‰ã§ã‚½ãƒ¼ãƒˆã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ç›®çš„ã®ãŸã‚ã«ã€`max_bytes_before_external_sort` 設定を使用ã—ã¦ãã ã•ã„。0(デフォルト)ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€å¤–部ソートã¯ç„¡åŠ¹ã§ã™ã€‚有効ã«ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚½ãƒ¼ãƒˆã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®é‡ãŒæŒ‡å®šã•ã‚ŒãŸãƒã‚¤ãƒˆæ•°ã«é”ã™ã‚‹ã¨ã€åŽé›†ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãŒã‚½ãƒ¼ãƒˆã•ã‚Œã€ä¸€æ™‚ファイルã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒèª­ã¿å–られãŸå¾Œã€ã‚½ãƒ¼ãƒˆã•ã‚ŒãŸã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒãƒžãƒ¼ã‚¸ã•ã‚Œã€çµæžœãŒå‡ºåŠ›ã•ã‚Œã¾ã™ã€‚ファイル㯠`/var/lib/clickhouse/tmp/` ディレクトリã«æ›¸ãè¾¼ã¾ã‚Œï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã€`tmp_path` パラメータを使用ã—ã¦ã“ã®è¨­å®šã‚’変更ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼‰ã€‚ + +クエリã®å®Ÿè¡Œã«ã‚ˆã‚Šã€`max_bytes_before_external_sort` よりも多ãã®ãƒ¡ãƒ¢ãƒªã‚’使用ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ãŸã‚ã€ã“ã®è¨­å®šã¯ `max_memory_usage` よりもã‹ãªã‚Šå°ã•ã„値をæŒãŸãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ãŸã¨ãˆã°ã€ã‚µãƒ¼ãƒãƒ¼ã«128GBã®RAMãŒã‚ã‚Šã€å˜ä¸€ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€`max_memory_usage` ã‚’100GBã«è¨­å®šã—ã€`max_bytes_before_external_sort` ã‚’80GBã«è¨­å®šã—ã¾ã™ã€‚ + +外部ソートã¯RAM内ã§ã®ã‚½ãƒ¼ãƒˆã»ã©åŠ¹æžœçš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +## データ読ã¿å–ã‚Šã®æœ€é©åŒ– + + `ORDER BY` å¼ã«ãƒ†ãƒ¼ãƒ–ルソートキーã¨ä¸€è‡´ã™ã‚‹ãƒ—レフィクスãŒã‚ã‚‹å ´åˆã€[optimize_read_in_order](../../../operations/settings/settings.md#optimize_read_in_order) 設定を使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’最é©åŒ–ã§ãã¾ã™ã€‚ + + `optimize_read_in_order` 設定ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ClickHouseサーãƒãƒ¼ã¯ãƒ†ãƒ¼ãƒ–ルインデックスを使用ã—ã¦ã€`ORDER BY` キーã®é †åºã§ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æŒ‡å®šã•ã‚ŒãŸ [LIMIT](../../../sql-reference/statements/select/limit.md) ã®å ´åˆã«ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã“ã¨ã‚’é¿ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã®ãŸã‚ã€å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã™ã‚‹å°ã•ãªãƒªãƒŸãƒƒãƒˆä»˜ãã®ã‚¯ã‚¨ãƒªãŒã‚ˆã‚Šè¿…速ã«å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +ã“ã®æœ€é©åŒ–㯠`ASC` ãŠã‚ˆã³ `DESC` ã®ä¸¡æ–¹ã§å‹•ä½œã—ã€[GROUP BY](../../../sql-reference/statements/select/group-by.md) å¥ã‚„ [FINAL](../../../sql-reference/statements/select/from.md#select-from-final) 修飾å­ã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +`optimize_read_in_order` 設定ãŒç„¡åŠ¹ãªå ´åˆã€ClickHouseサーãƒãƒ¼ã¯ `SELECT` クエリを処ç†ã™ã‚‹éš›ã«ãƒ†ãƒ¼ãƒ–ルインデックスを使用ã—ã¾ã›ã‚“。 + +`ORDER BY` å¥ã€å¤§ã㪠`LIMIT` ã¨å·¨é¡ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’読ã¿è¾¼ã‚€å¿…è¦ãŒã‚ã‚‹ [WHERE](../../../sql-reference/statements/select/where.md) æ¡ä»¶ã‚’æŒã¤ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹å ´åˆã€`optimize_read_in_order` を手動ã§ç„¡åŠ¹åŒ–ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。 + +次ã®ãƒ†ãƒ¼ãƒ–ルエンジンã§æœ€é©åŒ–ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼š + +- [MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md)([マテリアライズドビュー](../../../sql-reference/statements/create/view.md#materialized-view) ã‚’å«ã‚€ï¼‰ã€ +- [Merge](../../../engines/table-engines/special/merge.md)〠+- [Buffer](../../../engines/table-engines/special/buffer.md) + +`MaterializedView` エンジンã®ãƒ†ãƒ¼ãƒ–ルã§ã¯ã€ãƒ“ューã¨ã—㦠`SELECT ... FROM merge_tree_table ORDER BY pk` ã®ã‚ˆã†ãªæœ€é©åŒ–ãŒæ©Ÿèƒ½ã—ã¾ã™ã€‚ãŸã ã—ã€ãƒ“ュークエリ㫠`ORDER BY` å¥ãŒãªã„å ´åˆã® `SELECT ... FROM view ORDER BY pk` ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +## ORDER BY Expr WITH FILL ä¿®é£¾å­ + +ã“ã®ä¿®é£¾å­ã¯ [LIMIT ... WITH TIES 修飾å­](../../../sql-reference/statements/select/limit.md#limit-with-ties) ã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +`WITH FILL` 修飾å­ã¯ã€`ORDER BY expr` ã«ã‚ªãƒ—ション㮠`FROM expr`ã€`TO expr`ã€ãŠã‚ˆã³ `STEP expr` パラメータã¨å…±ã«è¨­å®šã§ãã¾ã™ã€‚ +指定㮠`expr` カラムã®ã™ã¹ã¦ã®æ¬ è½å€¤ãŒé †æ¬¡åŸ‹ã‚られã€ä»–ã®ã‚«ãƒ©ãƒ ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã§åŸ‹ã‚られã¾ã™ã€‚ + +複数ã®ã‚«ãƒ©ãƒ ã‚’埋ã‚ã‚‹ã«ã¯ã€`ORDER BY` セクションã®å„フィールドåã®å¾Œã«ã‚ªãƒ—ションã®ãƒ‘ラメータã¨ã¨ã‚‚ã« `WITH FILL` 修飾å­ã‚’追加ã—ã¾ã™ã€‚ + +``` sql +ORDER BY expr [WITH FILL] [FROM const_expr] [TO const_expr] [STEP const_numeric_expr] [STALENESS const_numeric_expr], ... exprN [WITH FILL] [FROM expr] [TO expr] [STEP numeric_expr] [STALENESS numeric_expr] +[INTERPOLATE [(col [AS expr], ... colN [AS exprN])]] +``` + +`WITH FILL` ã¯ã€Numeric(ã™ã¹ã¦ã®ç¨®é¡žã®floatã€decimalã€int)ã¾ãŸã¯Date/DateTimeåž‹ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«é©ç”¨å¯èƒ½ã§ã™ã€‚`String` フィールドã«é©ç”¨ã•ã‚Œã‚‹å ´åˆã€æ¬ è½å€¤ã¯ç©ºæ–‡å­—列ã§è£œå……ã•ã‚Œã¾ã™ã€‚ +`FROM const_expr` ãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã€åŸ‹ã‚è¾¼ã¿ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¯ `ORDER BY` ã® `expr` フィールドã®æœ€å°å€¤ã‚’使用ã—ã¾ã™ã€‚ +`TO const_expr` ãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã€åŸ‹ã‚è¾¼ã¿ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¯ `ORDER BY` ã® `expr` フィールドã®æœ€å¤§å€¤ã‚’使用ã—ã¾ã™ã€‚ +`STEP const_numeric_expr` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹ã¨ã€`const_numeric_expr` ã¯æ•°å€¤åž‹ã®å ´åˆã¯ãã®ã¾ã¾è§£é‡ˆã•ã‚Œã€Dateåž‹ã§ã¯æ—¥æ•°ã€DateTimeåž‹ã§ã¯ç§’æ•°ã¨ã—ã¦è§£é‡ˆã•ã‚Œã¾ã™ã€‚ã¾ãŸã€æ™‚間や日付ã®é–“隔を表㙠[INTERVAL](https://clickhouse.com/docs/ja/sql-reference/data-types/special-data-types/interval/) データ型もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +`STEP const_numeric_expr` ãŒçœç•¥ã•ã‚Œã¦ã„ã‚‹å ´åˆã€åŸ‹ã‚è¾¼ã¿ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã¯æ•°å€¤åž‹ã§ã¯ `1.0`ã€Dateåž‹ã§ã¯ `1 day`ã€DateTimeåž‹ã§ã¯ `1 second` を使用ã—ã¾ã™ã€‚ +`STALENESS const_numeric_expr` ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã¯å…ƒã®ãƒ‡ãƒ¼ã‚¿ã«ãŠã‘ã‚‹å‰ã®è¡Œã¨ã®å·®ãŒ `const_numeric_expr` を超ãˆã‚‹ã¾ã§è¡Œã‚’生æˆã—ã¾ã™ã€‚ +`INTERPOLATE` 㯠`ORDER BY WITH FILL` ã«å‚加ã—ã¦ã„ãªã„カラムã«é©ç”¨å¯èƒ½ã§ã™ã€‚ãã®ã‚ˆã†ãªã‚«ãƒ©ãƒ ã¯ã€`expr` ã‚’é©ç”¨ã™ã‚‹ã“ã¨ã§å‰ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å€¤ã«åŸºã¥ã„ã¦åŸ‹ã‚られã¾ã™ã€‚`expr` ãŒå­˜åœ¨ã—ãªã„å ´åˆã€å‰ã®å€¤ã‚’ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚çœç•¥ã•ã‚ŒãŸãƒªã‚¹ãƒˆã¯ã€ã™ã¹ã¦ã®è¨±å¯ã•ã‚ŒãŸã‚«ãƒ©ãƒ ã‚’å«ã‚€çµæžœã¨ãªã‚Šã¾ã™ã€‚ + +`WITH FILL` を使用ã—ãªã„クエリã®ä¾‹ï¼š + +``` sql +SELECT n, source FROM ( + SELECT toFloat32(number % 10) AS n, 'original' AS source + FROM numbers(10) WHERE number % 3 = 1 +) ORDER BY n; +``` + +çµæžœï¼š + +``` text +┌─n─┬─source───┠+│ 1 │ original │ +│ 4 │ original │ +│ 7 │ original │ +└───┴──────────┘ +``` + +`WITH FILL` 修飾å­ã‚’é©ç”¨ã—ãŸå¾Œã®åŒã˜ã‚¯ã‚¨ãƒªï¼š + +``` sql +SELECT n, source FROM ( + SELECT toFloat32(number % 10) AS n, 'original' AS source + FROM numbers(10) WHERE number % 3 = 1 +) ORDER BY n WITH FILL FROM 0 TO 5.51 STEP 0.5; +``` + +çµæžœï¼š + +``` text +┌───n─┬─source───┠+│ 0 │ │ +│ 0.5 │ │ +│ 1 │ original │ +│ 1.5 │ │ +│ 2 │ │ +│ 2.5 │ │ +│ 3 │ │ +│ 3.5 │ │ +│ 4 │ original │ +│ 4.5 │ │ +│ 5 │ │ +│ 5.5 │ │ +│ 7 │ original │ +└─────┴──────────┘ +``` + +複数フィールドã®å ´åˆ `ORDER BY field2 WITH FILL, field1 WITH FILL` ã¨è¨˜è¿°ã™ã‚‹ã¨ã€åŸ‹ã‚è¾¼ã¿ã®é †åºã¯ `ORDER BY` å¥å†…ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®é †åºã«å¾“ã„ã¾ã™ã€‚ + +例: + +``` sql +SELECT + toDate((number * 10) * 86400) AS d1, + toDate(number * 86400) AS d2, + 'original' AS source +FROM numbers(10) +WHERE (number % 3) = 1 +ORDER BY + d2 WITH FILL, + d1 WITH FILL STEP 5; +``` + +çµæžœï¼š + +``` text +┌───d1───────┬───d2───────┬─source───┠+│ 1970-01-11 │ 1970-01-02 │ original │ +│ 1970-01-01 │ 1970-01-03 │ │ +│ 1970-01-01 │ 1970-01-04 │ │ +│ 1970-02-10 │ 1970-01-05 │ original │ +│ 1970-01-01 │ 1970-01-06 │ │ +│ 1970-01-01 │ 1970-01-07 │ │ +│ 1970-03-12 │ 1970-01-08 │ original │ +└────────────┴────────────┴──────────┘ +``` + +フィールド `d1` ã¯åŸ‹ã‚られãšã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’使用ã—ã¾ã™ã€‚ãªãœãªã‚‰ `d2` 値ã«å¯¾ã™ã‚‹å復値ãŒãªã„ãŸã‚ã€ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’ `d1` ã«å¯¾ã—ã¦é©åˆ‡ã«è¨ˆç®—ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +次ã®ã‚¯ã‚¨ãƒªã§ã¯ `ORDER BY` 内ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒå¤‰æ›´ã•ã‚Œã¦ã„ã¾ã™ï¼š + +``` sql +SELECT + toDate((number * 10) * 86400) AS d1, + toDate(number * 86400) AS d2, + 'original' AS source +FROM numbers(10) +WHERE (number % 3) = 1 +ORDER BY + d1 WITH FILL STEP 5, + d2 WITH FILL; +``` + +çµæžœï¼š + +``` text +┌───d1───────┬───d2───────┬─source───┠+│ 1970-01-11 │ 1970-01-02 │ original │ +│ 1970-01-16 │ 1970-01-01 │ │ +│ 1970-01-21 │ 1970-01-01 │ │ +│ 1970-01-26 │ 1970-01-01 │ │ +│ 1970-01-31 │ 1970-01-01 │ │ +│ 1970-02-05 │ 1970-01-01 │ │ +│ 1970-02-10 │ 1970-01-05 │ original │ +│ 1970-02-15 │ 1970-01-01 │ │ +│ 1970-02-20 │ 1970-01-01 │ │ +│ 1970-02-25 │ 1970-01-01 │ │ +│ 1970-03-02 │ 1970-01-01 │ │ +│ 1970-03-07 │ 1970-01-01 │ │ +│ 1970-03-12 │ 1970-01-08 │ original │ +└────────────┴────────────┴──────────┘ +``` + +次ã®ã‚¯ã‚¨ãƒªã¯ã€ã‚«ãƒ©ãƒ  `d1` ã«1æ—¥ã‚ãŸã‚Šãƒ‡ãƒ¼ã‚¿ã‚’埋ã‚ã‚‹ãŸã‚ã« `INTERVAL` データ型を使用ã—ã¦ã„ã¾ã™ï¼š + +``` sql +SELECT + toDate((number * 10) * 86400) AS d1, + toDate(number * 86400) AS d2, + 'original' AS source +FROM numbers(10) +WHERE (number % 3) = 1 +ORDER BY + d1 WITH FILL STEP INTERVAL 1 DAY, + d2 WITH FILL; +``` + +çµæžœï¼š +``` +┌─────────d1─┬─────────d2─┬─source───┠+│ 1970-01-11 │ 1970-01-02 │ original │ +│ 1970-01-12 │ 1970-01-01 │ │ +│ 1970-01-13 │ 1970-01-01 │ │ +│ 1970-01-14 │ 1970-01-01 │ │ +│ 1970-01-15 │ 1970-01-01 │ │ +│ 1970-01-16 │ 1970-01-01 │ │ +│ 1970-01-17 │ 1970-01-01 │ │ +│ 1970-01-18 │ 1970-01-01 │ │ +│ 1970-01-19 │ 1970-01-01 │ │ +│ 1970-01-20 │ 1970-01-01 │ │ +│ 1970-01-21 │ 1970-01-01 │ │ +│ 1970-01-22 │ 1970-01-01 │ │ +│ 1970-01-23 │ 1970-01-01 │ │ +│ 1970-01-24 │ 1970-01-01 │ │ +│ 1970-01-25 │ 1970-01-01 │ │ +│ 1970-01-26 │ 1970-01-01 │ │ +│ 1970-01-27 │ 1970-01-01 │ │ +│ 1970-01-28 │ 1970-01-01 │ │ +│ 1970-01-29 │ 1970-01-01 │ │ +│ 1970-01-30 │ 1970-01-01 │ │ +│ 1970-01-31 │ 1970-01-01 │ │ +│ 1970-02-01 │ 1970-01-01 │ │ +│ 1970-02-02 │ 1970-01-01 │ │ +│ 1970-02-03 │ 1970-01-01 │ │ +│ 1970-02-04 │ 1970-01-01 │ │ +│ 1970-02-05 │ 1970-01-01 │ │ +│ 1970-02-06 │ 1970-01-01 │ │ +│ 1970-02-07 │ 1970-01-01 │ │ +│ 1970-02-08 │ 1970-01-01 │ │ +│ 1970-02-09 │ 1970-01-01 │ │ +│ 1970-02-10 │ 1970-01-05 │ original │ +│ 1970-02-11 │ 1970-01-01 │ │ +│ 1970-02-12 │ 1970-01-01 │ │ +│ 1970-02-13 │ 1970-01-01 │ │ +│ 1970-02-14 │ 1970-01-01 │ │ +│ 1970-02-15 │ 1970-01-01 │ │ +│ 1970-02-16 │ 1970-01-01 │ │ +│ 1970-02-17 │ 1970-01-01 │ │ +│ 1970-02-18 │ 1970-01-01 │ │ +│ 1970-02-19 │ 1970-01-01 │ │ +│ 1970-02-20 │ 1970-01-01 │ │ +│ 1970-02-21 │ 1970-01-01 │ │ +│ 1970-02-22 │ 1970-01-01 │ │ +│ 1970-02-23 │ 1970-01-01 │ │ +│ 1970-02-24 │ 1970-01-01 │ │ +│ 1970-02-25 │ 1970-01-01 │ │ +│ 1970-02-26 │ 1970-01-01 │ │ +│ 1970-02-27 │ 1970-01-01 │ │ +│ 1970-02-28 │ 1970-01-01 │ │ +│ 1970-03-01 │ 1970-01-01 │ │ +│ 1970-03-02 │ 1970-01-01 │ │ +│ 1970-03-03 │ 1970-01-01 │ │ +│ 1970-03-04 │ 1970-01-01 │ │ +│ 1970-03-05 │ 1970-01-01 │ │ +│ 1970-03-06 │ 1970-01-01 │ │ +│ 1970-03-07 │ 1970-01-01 │ │ +│ 1970-03-08 │ 1970-01-01 │ │ +│ 1970-03-09 │ 1970-01-01 │ │ +│ 1970-03-10 │ 1970-01-01 │ │ +│ 1970-03-11 │ 1970-01-01 │ │ +│ 1970-03-12 │ 1970-01-08 │ original │ +└────────────┴────────────┴──────────┘ +``` + +`STALENESS` を使用ã—ãªã„クエリã®ä¾‹ï¼š + +``` sql +SELECT number as key, 5 * number value, 'original' AS source +FROM numbers(16) WHERE key % 5 == 0 +ORDER BY key WITH FILL; +``` + +çµæžœï¼š + +``` text + ┌─key─┬─value─┬─source───┠+ 1. │ 0 │ 0 │ original │ + 2. │ 1 │ 0 │ │ + 3. │ 2 │ 0 │ │ + 4. │ 3 │ 0 │ │ + 5. │ 4 │ 0 │ │ + 6. │ 5 │ 25 │ original │ + 7. │ 6 │ 0 │ │ + 8. │ 7 │ 0 │ │ + 9. │ 8 │ 0 │ │ +10. │ 9 │ 0 │ │ +11. │ 10 │ 50 │ original │ +12. │ 11 │ 0 │ │ +13. │ 12 │ 0 │ │ +14. │ 13 │ 0 │ │ +15. │ 14 │ 0 │ │ +16. │ 15 │ 75 │ original │ + └─────┴───────┴──────────┘ +``` + +`STALENESS 3` ã‚’é©ç”¨ã—ãŸåŒã˜ã‚¯ã‚¨ãƒªï¼š + +``` sql +SELECT number as key, 5 * number value, 'original' AS source +FROM numbers(16) WHERE key % 5 == 0 +ORDER BY key WITH FILL STALENESS 3; +``` + +çµæžœï¼š + +``` text + ┌─key─┬─value─┬─source───┠+ 1. │ 0 │ 0 │ original │ + 2. │ 1 │ 0 │ │ + 3. │ 2 │ 0 │ │ + 4. │ 5 │ 25 │ original │ + 5. │ 6 │ 0 │ │ + 6. │ 7 │ 0 │ │ + 7. │ 10 │ 50 │ original │ + 8. │ 11 │ 0 │ │ + 9. │ 12 │ 0 │ │ +10. │ 15 │ 75 │ original │ +11. │ 16 │ 0 │ │ +12. │ 17 │ 0 │ │ + └─────┴───────┴──────────┘ +``` + +`INTERPOLATE` を使用ã—ãªã„クエリã®ä¾‹ï¼š + +``` sql +SELECT n, source, inter FROM ( + SELECT toFloat32(number % 10) AS n, 'original' AS source, number as inter + FROM numbers(10) WHERE number % 3 = 1 +) ORDER BY n WITH FILL FROM 0 TO 5.51 STEP 0.5; +``` + +çµæžœï¼š + +``` text +┌───n─┬─source───┬─inter─┠+│ 0 │ │ 0 │ +│ 0.5 │ │ 0 │ +│ 1 │ original │ 1 │ +│ 1.5 │ │ 0 │ +│ 2 │ │ 0 │ +│ 2.5 │ │ 0 │ +│ 3 │ │ 0 │ +│ 3.5 │ │ 0 │ +│ 4 │ original │ 4 │ +│ 4.5 │ │ 0 │ +│ 5 │ │ 0 │ +│ 5.5 │ │ 0 │ +│ 7 │ original │ 7 │ +└─────┴──────────┴───────┘ +``` + +`INTERPOLATE` ã‚’é©ç”¨ã—ãŸåŒã˜ã‚¯ã‚¨ãƒªï¼š + +``` sql +SELECT n, source, inter FROM ( + SELECT toFloat32(number % 10) AS n, 'original' AS source, number as inter + FROM numbers(10) WHERE number % 3 = 1 +) ORDER BY n WITH FILL FROM 0 TO 5.51 STEP 0.5 INTERPOLATE (inter AS inter + 1); +``` + +çµæžœï¼š + +``` text +┌───n─┬─source───┬─inter─┠+│ 0 │ │ 0 │ +│ 0.5 │ │ 0 │ +│ 1 │ original │ 1 │ +│ 1.5 │ │ 2 │ +│ 2 │ │ 3 │ +│ 2.5 │ │ 4 │ +│ 3 │ │ 5 │ +│ 3.5 │ │ 6 │ +│ 4 │ original │ 4 │ +│ 4.5 │ │ 5 │ +│ 5 │ │ 6 │ +│ 5.5 │ │ 7 │ +│ 7 │ original │ 7 │ +└─────┴──────────┴───────┘ +``` + +## ソートプレフィックスã§ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚ŒãŸãƒ•ã‚£ãƒ«ã®å……å¡« + +特定ã®ã‚«ãƒ©ãƒ ã§åŒä¸€ã®å€¤ã‚’æŒã¤è¡Œã‚’独立ã—ã¦åŸ‹ã‚ã‚‹ã“ã¨ã¯æœ‰ç”¨ã§ã™ã€‚ - 良ã„例ã¯æ™‚系列データã®æ¬ è½å€¤ã®åŸ‹ã‚è¾¼ã¿ã§ã™ã€‚ +以下ã®ã‚ˆã†ãªæ™‚系列テーブルãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š + +``` sql +CREATE TABLE timeseries +( + `sensor_id` UInt64, + `timestamp` DateTime64(3, 'UTC'), + `value` Float64 +) +ENGINE = Memory; + +SELECT * FROM timeseries; + +┌─sensor_id─┬───────────────timestamp─┬─value─┠+│ 234 │ 2021-12-01 00:00:03.000 │ 3 │ +│ 432 │ 2021-12-01 00:00:01.000 │ 1 │ +│ 234 │ 2021-12-01 00:00:07.000 │ 7 │ +│ 432 │ 2021-12-01 00:00:05.000 │ 5 │ +└───────────┴─────────────────────────┴───────┘ +``` + +ãã—ã¦ã€1秒間隔ã§å„センサーã”ã¨ã«æ¬ è½å€¤ã‚’埋ã‚ãŸã„ã¨ã—ã¾ã™ã€‚ +é”æˆã™ã‚‹æ–¹æ³•ã¯ `sensor_id` カラムを `timestamp` カラムを填埋ã™ã‚‹ãŸã‚ã®ã‚½ãƒ¼ãƒˆãƒ—レフィックスã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +``` +SELECT * +FROM timeseries +ORDER BY + sensor_id, + timestamp WITH FILL +INTERPOLATE ( value AS 9999 ) + +┌─sensor_id─┬───────────────timestamp─┬─value─┠+│ 234 │ 2021-12-01 00:00:03.000 │ 3 │ +│ 234 │ 2021-12-01 00:00:04.000 │ 9999 │ +│ 234 │ 2021-12-01 00:00:05.000 │ 9999 │ +│ 234 │ 2021-12-01 00:00:06.000 │ 9999 │ +│ 234 │ 2021-12-01 00:00:07.000 │ 7 │ +│ 432 │ 2021-12-01 00:00:01.000 │ 1 │ +│ 432 │ 2021-12-01 00:00:02.000 │ 9999 │ +│ 432 │ 2021-12-01 00:00:03.000 │ 9999 │ +│ 432 │ 2021-12-01 00:00:04.000 │ 9999 │ +│ 432 │ 2021-12-01 00:00:05.000 │ 5 │ +└───────────┴─────────────────────────┴───────┘ +``` + +ã“ã“ã§ã€`value` カラムã¯åŸ‹ã‚られãŸè¡Œã‚’より目立ãŸã›ã‚‹ãŸã‚ã« `9999` ã§è£œé–“ã•ã‚Œã¾ã—ãŸã€‚ +ã“ã®å‹•ä½œã¯è¨­å®š `use_with_fill_by_sorting_prefix` ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ï¼‰ã€‚ + +## 関連コンテンツ + +- ブログ: [ClickHouseã«ãŠã‘る時系列データã®æ“作](https://clickhouse.com/blog/working-with-time-series-data-and-functions-ClickHouse) diff --git a/docs/ja/sql-reference/statements/select/prewhere.md b/docs/ja/sql-reference/statements/select/prewhere.md new file mode 100644 index 00000000000..f7c59ed52ad --- /dev/null +++ b/docs/ja/sql-reference/statements/select/prewhere.md @@ -0,0 +1,69 @@ +--- +slug: /ja/sql-reference/statements/select/prewhere +sidebar_label: PREWHERE +--- + +# PREWHEREå¥ + +Prewhereã¯ã€ã‚ˆã‚ŠåŠ¹çŽ‡çš„ã«ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’é©ç”¨ã™ã‚‹ãŸã‚ã®æœ€é©åŒ–ã§ã™ã€‚`PREWHERE`å¥ãŒæ˜Žç¤ºçš„ã«æŒ‡å®šã•ã‚Œã¦ã„ãªãã¦ã‚‚デフォルトã§æœ‰åŠ¹åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚[WHERE](../../../sql-reference/statements/select/where.md)æ¡ä»¶ã®ä¸€éƒ¨ã‚’自動的ã«prewhere段階ã«ç§»å‹•ã•ã›ã‚‹ã“ã¨ã§å‹•ä½œã—ã¾ã™ã€‚`PREWHERE`å¥ã®å½¹å‰²ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®å‹•ä½œã‚ˆã‚Šã‚‚優れãŸæ–¹æ³•ã§æœ€é©åŒ–を制御ã§ãã‚‹ã¨æ€ã‚れる場åˆã«ã€ãã®æœ€é©åŒ–を制御ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +prewhere最é©åŒ–を使用ã™ã‚‹ã“ã¨ã§ã€ã¾ãšprewhereå¼ã®å®Ÿè¡Œã«å¿…è¦ãªã‚«ãƒ©ãƒ ã ã‘ãŒèª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ãã®å¾Œã€ã‚¯ã‚¨ãƒªã®æ®‹ã‚Šã‚’実行ã™ã‚‹ãŸã‚ã«å¿…è¦ãªä»–ã®ã‚«ãƒ©ãƒ ãŒèª­ã¿è¾¼ã¾ã‚Œã¾ã™ãŒã€ãã‚Œã¯prewhereå¼ãŒå°‘ãªãã¨ã‚‚一部ã®è¡Œã§`true`ã§ã‚るブロックã ã‘ã§ã™ã€‚ã‚‚ã—prewhereå¼ãŒã™ã¹ã¦ã®è¡Œã§`false`ã§ã‚るブロックãŒå¤šãã€ä»–ã®ã‚¯ã‚¨ãƒªã®éƒ¨åˆ†ã‚ˆã‚Šã‚‚prewhereã§å¿…è¦ãªã‚«ãƒ©ãƒ ã®æ•°ãŒå°‘ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªå®Ÿè¡Œã®ãŸã‚ã«ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰èª­ã¿è¾¼ã‚€ãƒ‡ãƒ¼ã‚¿é‡ã‚’大幅ã«æ¸›ã‚‰ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## Prewhereã®æ‰‹å‹•åˆ¶å¾¡ + +ã“ã®å¥ã¯`WHERE`å¥ã¨åŒã˜æ„味をæŒã¡ã¾ã™ã€‚é•ã„ã¯ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿è¾¼ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã«ã‚ã‚Šã¾ã™ã€‚クエリ内ã®ã‚«ãƒ©ãƒ ã®ä¸€éƒ¨ã—ã‹ä½¿ç”¨ã—ãªã„ãŒã€å¼·åŠ›ãªãƒ‡ãƒ¼ã‚¿ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’æä¾›ã™ã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°æ¡ä»¶ã§`PREWHERE`を手動ã§åˆ¶å¾¡ã™ã‚‹ã¨ã€èª­ã¿è¾¼ã‚€ãƒ‡ãƒ¼ã‚¿ã®é‡ãŒæ¸›å°‘ã—ã¾ã™ã€‚ + +クエリã¯`PREWHERE`ã¨`WHERE`ã‚’åŒæ™‚ã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`PREWHERE`ãŒ`WHERE`ã«å…ˆè¡Œã—ã¾ã™ã€‚ + +[optimize_move_to_prewhere](../../../operations/settings/settings.md#optimize_move_to_prewhere)設定ãŒ0ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`WHERE`ã‹ã‚‰`PREWHERE`ã¸ã®å¼ã®éƒ¨åˆ†ã‚’自動的ã«ç§»å‹•ã™ã‚‹ãƒ’ューリスティクスã¯ç„¡åŠ¹åŒ–ã•ã‚Œã¾ã™ã€‚ + +クエリãŒ[FINAL](from.md#select-from-final)修飾å­ã‚’æŒã¤å ´åˆã€`PREWHERE`ã®æœ€é©åŒ–ã¯å¿…ãšã—ã‚‚æ­£ã—ãã‚ã‚Šã¾ã›ã‚“。ãã‚Œã¯[optimize_move_to_prewhere](../../../operations/settings/settings.md#optimize_move_to_prewhere)ã¨[optimize_move_to_prewhere_if_final](../../../operations/settings/settings.md#optimize_move_to_prewhere_if_final)ã®ä¸¡è¨­å®šãŒã‚ªãƒ³ã«ãªã£ã¦ã„ã‚‹å ´åˆã«ã®ã¿æœ‰åŠ¹ã§ã™ã€‚ + +:::note +`PREWHERE`セクションã¯`FINAL`ã®å‰ã«å®Ÿè¡Œã•ã‚Œã‚‹ãŸã‚ã€ãƒ†ãƒ¼ãƒ–ルã®`ORDER BY`セクションã«ãªã„フィールドを使用ã™ã‚‹`PREWHERE`を使用ã™ã‚‹ã¨ã€`FROM ... FINAL`クエリã®çµæžœãŒåã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +## åˆ¶é™ + +`PREWHERE`ã¯[*MergeTree](../../../engines/table-engines/mergetree-family/index.md)ファミリã®ãƒ†ãƒ¼ãƒ–ルã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +## 例 + +```sql +CREATE TABLE mydata +( + `A` Int64, + `B` Int8, + `C` String +) +ENGINE = MergeTree +ORDER BY A AS +SELECT + number, + 0, + if(number between 1000 and 2000, 'x', toString(number)) +FROM numbers(10000000); + +SELECT count() +FROM mydata +WHERE (B = 0) AND (C = 'x'); + +1 row in set. Elapsed: 0.074 sec. Processed 10.00 million rows, 168.89 MB (134.98 million rows/s., 2.28 GB/s.) + +-- ã©ã®è¿°èªžãŒPREWHEREã«ç§»å‹•ã•ã‚ŒãŸã‹ã‚’見るãŸã‚ã«ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’有効ã«ã—ã¾ã—ょㆠ+set send_logs_level='debug'; + +MergeTreeWhereOptimizer: condition "B = 0" moved to PREWHERE +-- Clickhouseã¯è‡ªå‹•ã§`B = 0`ã‚’PREWHEREã«ç§»å‹•ã—ã¾ã™ãŒã€Bã¯å¸¸ã«0ãªã®ã§æ„味ãŒã‚ã‚Šã¾ã›ã‚“。 + +-- ä»–ã®è¿°èªž`C = 'x'`を移動ã—ã¾ã—ょㆠ+ +SELECT count() +FROM mydata +PREWHERE C = 'x' +WHERE B = 0; + +1 row in set. Elapsed: 0.069 sec. Processed 10.00 million rows, 158.89 MB (144.90 million rows/s., 2.30 GB/s.) + +-- 手動ã®`PREWHERE`を使ã£ãŸã“ã®ã‚¯ã‚¨ãƒªã¯ã‚ãšã‹ã«å°‘ãªã„データを処ç†ã—ã¾ã™: 158.89 MB VS 168.89 MB +``` diff --git a/docs/ja/sql-reference/statements/select/qualify.md b/docs/ja/sql-reference/statements/select/qualify.md new file mode 100644 index 00000000000..82e91351be1 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/qualify.md @@ -0,0 +1,34 @@ +--- +slug: /ja/sql-reference/statements/select/qualify +sidebar_label: QUALIFY +--- + +# QUALIFYå¥ + +ウィンドウ関数ã®çµæžœã‚’フィルタリングã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯[WHERE](../../../sql-reference/statements/select/where.md)å¥ã«ä¼¼ã¦ã„ã¾ã™ãŒã€é•ã„ã¯`WHERE`ãŒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã‚’評価ã™ã‚‹å‰ã«å®Ÿè¡Œã•ã‚Œã‚‹ã®ã«å¯¾ã—ã€`QUALIFY`ã¯ãã‚ŒãŒè©•ä¾¡ã•ã‚ŒãŸå¾Œã«å®Ÿè¡Œã•ã‚Œã‚‹ç‚¹ã§ã™ã€‚ + +`SELECT`å¥ã§ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’使用ã—ã¦ã€`QUALIFY`å¥ã‹ã‚‰ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã®çµæžœã‚’å‚ç…§ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã‚‚ã—ãã¯ã€ã‚¯ã‚¨ãƒªã®çµæžœã«å«ã¾ã‚Œãªã„追加ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã®çµæžœã«åŸºã¥ã„ã¦ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +## 制é™äº‹é … + +評価ã™ã¹ãウィンドウ関数ãŒãªã„å ´åˆã€`QUALIFY`ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。ãã®å ´åˆã¯`WHERE`を使用ã—ã¦ãã ã•ã„。 + +## 例 + +例: + +``` sql +SELECT number, COUNT() OVER (PARTITION BY number % 3) AS partition_count +FROM numbers(10) +QUALIFY partition_count = 4 +ORDER BY number; +``` + +``` text +┌─number─┬─partition_count─┠+│ 0 │ 4 │ +│ 3 │ 4 │ +│ 6 │ 4 │ +│ 9 │ 4 │ +└────────┴─────────────────┘ +``` diff --git a/docs/ja/sql-reference/statements/select/sample.md b/docs/ja/sql-reference/statements/select/sample.md new file mode 100644 index 00000000000..ad7d931884a --- /dev/null +++ b/docs/ja/sql-reference/statements/select/sample.md @@ -0,0 +1,114 @@ +--- +slug: /ja/sql-reference/statements/select/sample +sidebar_label: SAMPLE +--- + +# SAMPLEå¥ + +`SAMPLE`å¥ã¯ã€è¿‘ä¼¼ã®`SELECT`クエリ処ç†ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +データサンプリングãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã¯ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã®ã§ã¯ãªãã€ãƒ‡ãƒ¼ã‚¿ã®ä¸€éƒ¨ï¼ˆã‚µãƒ³ãƒ—ル)ã®ã¿ã«å¯¾ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ã™ã¹ã¦ã®è¨ªå•ã®çµ±è¨ˆã‚’計算ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ã™ã¹ã¦ã®è¨ªå•ã®10分ã®1ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã—ã€ãã®çµæžœã‚’10å€ã™ã‚‹ã ã‘ã§å分ã§ã™ã€‚ + +近似クエリ処ç†ãŒæœ‰ç”¨ãªã‚±ãƒ¼ã‚¹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +- 厳格ãªãƒ¬ã‚¤ãƒ†ãƒ³ã‚·è¦ä»¶ï¼ˆä¾‹ãˆã°100ms未満)ãŒã‚ã‚‹ãŒã€ã“れを満ãŸã™ãŸã‚ã®è¿½åŠ ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ãƒªã‚½ãƒ¼ã‚¹ã®ã‚³ã‚¹ãƒˆã‚’正当化ã§ããªã„å ´åˆã€‚ +- 生データãŒæ­£ç¢ºã§ãªã„ã®ã§ã€è¿‘ä¼¼ãŒå“質を明らã‹ã«åŠ£åŒ–ã•ã›ã‚‹ã“ã¨ã¯ãªã„å ´åˆã€‚ +- ビジãƒã‚¹è¦ä»¶ãŒè¿‘ä¼¼çµæžœã‚’目標ã¨ã—ã¦ã„ã‚‹å ´åˆï¼ˆã‚³ã‚¹ãƒˆåŠ¹æžœã®ãŸã‚ã€ã¾ãŸã¯æ­£ç¢ºãªçµæžœã‚’プレミアムユーザーã«æä¾›ã™ã‚‹ãŸã‚)。 + +:::note +サンプリングã¯ã€[MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md)ファミリーã®ãƒ†ãƒ¼ãƒ–ルã§ã®ã¿ä½¿ç”¨ã§ãã€ãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã«ã‚µãƒ³ãƒ—リングå¼ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã®ã¿ä½¿ç”¨ã§ãã¾ã™ï¼ˆ[MergeTreeエンジン](../../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)ã‚’å‚照)。 +::: + +データサンプリングã®ç‰¹é•·ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +- データサンプリングã¯æ±ºå®šçš„ãªãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã§ã™ã€‚åŒã˜`SELECT .. SAMPLE`クエリã®çµæžœã¯å¸¸ã«åŒã˜ã§ã™ã€‚ +- サンプリングã¯ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã§ã‚‚一貫ã—ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚å˜ä¸€ã®ã‚µãƒ³ãƒ—リングキーをæŒã¤ãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€åŒã˜ä¿‚æ•°ã‚’æŒã¤ã‚µãƒ³ãƒ—ルã¯å¸¸ã«å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ã®åŒã˜éƒ¨åˆ†é›†åˆã‚’é¸æŠžã—ã¾ã™ã€‚例ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼IDã®ã‚µãƒ³ãƒ—ルã¯ã€ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰å¯èƒ½ãªã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼IDã®åŒã˜éƒ¨åˆ†é›†åˆã‚’æŒã¤è¡Œã‚’é¸æŠžã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€[IN](../../../sql-reference/operators/in.md)å¥ã®ã‚µãƒ–クエリã§ã‚µãƒ³ãƒ—ルを使用ã§ãã¾ã™ã€‚ã¾ãŸã€[JOIN](../../../sql-reference/statements/select/join.md)å¥ã‚’使用ã—ã¦ã‚µãƒ³ãƒ—ルをçµåˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- サンプリングã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿èª­ã¿å–りを減少ã•ã›ã¾ã™ã€‚サンプリングキーを正ã—ã指定ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。詳細ã¯[MergeTreeテーブルã®ä½œæˆ](../../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +`SAMPLE`å¥ã®ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る構文ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +| SAMPLE å¥æ§‹æ–‡ | 説明 | +|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `SAMPLE k` | ã“ã“ã§`k`ã¯0ã‹ã‚‰1ã®æ•°å­—ã§ã™ã€‚クエリã¯ãƒ‡ãƒ¼ã‚¿ã®`k`部分ã«å¯¾ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚例ãˆã°ã€`SAMPLE 0.1`ã¯ãƒ‡ãƒ¼ã‚¿ã®10%ã§ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚[詳細を読む](#sample-k) | +| `SAMPLE n` | ã“ã“ã§`n`ã¯å分ã«å¤§ãã„æ•´æ•°ã§ã™ã€‚クエリã¯å°‘ãªãã¨ã‚‚`n`è¡Œã®ã‚µãƒ³ãƒ—ルã§å®Ÿè¡Œã•ã‚Œã¾ã™ï¼ˆãŸã ã—ã€ãれより大幅ã«å¤šãã¯ã‚ã‚Šã¾ã›ã‚“)。例ãˆã°ã€`SAMPLE 10000000`ã¯æœ€ä½Žã§ã‚‚10,000,000è¡Œã§ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚[詳細を読む](#sample-n) | +| `SAMPLE k OFFSET m` | ã“ã“ã§`k`ãŠã‚ˆã³`m`ã¯0ã‹ã‚‰1ã®æ•°å­—ã§ã™ã€‚クエリã¯ãƒ‡ãƒ¼ã‚¿ã®`k`部分ã®ã‚µãƒ³ãƒ—ルã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚使用ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã¯`m`部分ã ã‘オフセットã•ã‚Œã¾ã™ã€‚[詳細を読む](#sample-k-offset-m) | + +## SAMPLE K + +ã“ã“ã§`k`ã¯0ã‹ã‚‰1ã®æ•°å­—(å°æ•°ãŠã‚ˆã³åˆ†æ•°ã®è¡¨è¨˜ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ï¼‰ã§ã™ã€‚例ãˆã°ã€`SAMPLE 1/2`ã¾ãŸã¯`SAMPLE 0.5`。 + +`SAMPLE k`å¥ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®`k`部分ã®ã‚µãƒ³ãƒ—ルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’抽出ã—ã¾ã™ã€‚以下ã«ä¾‹ã‚’示ã—ã¾ã™ï¼š + +``` sql +SELECT + Title, + count() * 10 AS PageViews +FROM hits_distributed +SAMPLE 0.1 +WHERE + CounterID = 34 +GROUP BY Title +ORDER BY PageViews DESC LIMIT 1000 +``` + +ã“ã®ä¾‹ã§ã¯ã€ã‚¯ã‚¨ãƒªã¯ãƒ‡ãƒ¼ã‚¿ã®0.1(10%)ã®ã‚µãƒ³ãƒ—ルã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚集計関数ã®å€¤ã¯è‡ªå‹•çš„ã«è£œæ­£ã•ã‚Œãªã„ãŸã‚ã€è¿‘ä¼¼çµæžœã‚’å¾—ã‚‹ã«ã¯`count()`ã®å€¤ã‚’手動ã§10å€ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## SAMPLE N + +ã“ã“ã§`n`ã¯å分ã«å¤§ãã„æ•´æ•°ã§ã™ã€‚例ãˆã°ã€`SAMPLE 10000000`。 + +ã“ã®å ´åˆã€ã‚¯ã‚¨ãƒªã¯å°‘ãªãã¨ã‚‚`n`è¡Œã®ã‚µãƒ³ãƒ—ルã§å®Ÿè¡Œã•ã‚Œã¾ã™ï¼ˆãŸã ã—ã€ãれより大幅ã«å¤šãã¯ã‚ã‚Šã¾ã›ã‚“)。例ãˆã°ã€`SAMPLE 10000000`ã¯æœ€ä½Žã§ã‚‚10,000,000è¡Œã§ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™ã€‚ + +データ読ã¿å–ã‚Šã®æœ€å°å˜ä½ã¯1ã¤ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã§ã‚ã‚‹ãŸã‚(ãã®ã‚µã‚¤ã‚ºã¯`index_granularity`設定ã§è¨­å®šã•ã‚Œã¾ã™ï¼‰ã€ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã®ã‚µã‚¤ã‚ºã‚ˆã‚Šã‚‚大ãã„サンプルを設定ã™ã‚‹ã“ã¨ãŒæ„味ãŒã‚ã‚Šã¾ã™ã€‚ + +`SAMPLE n`å¥ã‚’使用ã™ã‚‹å ´åˆã€å‡¦ç†ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã®ç›¸å¯¾çš„ãªå‰²åˆã‚’把æ¡ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã—ãŸãŒã£ã¦ã€é›†è¨ˆé–¢æ•°ã‚’ã©ã‚Œã ã‘å€ã«ã™ã‚‹ã¹ãã‹ã‚’知るã“ã¨ã¯ã§ãã¾ã›ã‚“。近似ã®çµæžœã‚’å¾—ã‚‹ãŸã‚ã«ã¯ã€ä»®æƒ³ã‚«ãƒ©ãƒ `_sample_factor`を使用ã—ã¾ã™ã€‚ + +`_sample_factor`カラムã¯å‹•çš„ã«è¨ˆç®—ã•ã‚Œã‚‹ç›¸å¯¾çš„ãªä¿‚æ•°ã‚’å«ã¿ã¾ã™ã€‚ã“ã®ã‚«ãƒ©ãƒ ã¯ã€ã‚µãƒ³ãƒ—リングキーを指定ã—ã¦ãƒ†ãƒ¼ãƒ–ルを[作æˆ](../../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)ã™ã‚‹éš›ã«è‡ªå‹•çš„ã«ä½œæˆã•ã‚Œã¾ã™ã€‚`_sample_factor`カラムã®ä½¿ç”¨ä¾‹ã‚’以下ã«ç¤ºã—ã¾ã™ã€‚ + +サイト訪å•ã®çµ±è¨ˆã‚’å«ã‚€ãƒ†ãƒ¼ãƒ–ル`visits`を考ãˆã¾ã™ã€‚最åˆã®ä¾‹ã¯ãƒšãƒ¼ã‚¸ãƒ“ュー数を計算ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ï¼š + +``` sql +SELECT sum(PageViews * _sample_factor) +FROM visits +SAMPLE 10000000 +``` + +次ã®ä¾‹ã¯ã€è¨ªå•ã®ç·æ•°ã‚’計算ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ï¼š + +``` sql +SELECT sum(_sample_factor) +FROM visits +SAMPLE 10000000 +``` + +以下ã®ä¾‹ã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®å¹³å‡ç¶™ç¶šæ™‚間を計算ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚å¹³å‡å€¤ã‚’計算ã™ã‚‹ã«ã¯ã€ç›¸å¯¾çš„係数を使用ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 + +``` sql +SELECT avg(Duration) +FROM visits +SAMPLE 10000000 +``` + +## SAMPLE K OFFSET M + +ã“ã“ã§`k`ãŠã‚ˆã³`m`ã¯0ã‹ã‚‰1ã®æ•°å­—ã§ã™ã€‚以下ã«ä¾‹ã‚’示ã—ã¾ã™ã€‚ + +**例 1** + +``` sql +SAMPLE 1/10 +``` + +ã“ã®ä¾‹ã§ã¯ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã®1/10ã®ã‚µãƒ³ãƒ—ルã§ã™ï¼š + +`[++------------]` + +**例 2** + +``` sql +SAMPLE 1/10 OFFSET 1/2 +``` + +ã“ã“ã§ã€ãƒ‡ãƒ¼ã‚¿ã®å¾ŒåŠã‹ã‚‰10%ã®ã‚µãƒ³ãƒ—ルãŒå–られã¾ã™ã€‚ + +`[------++------]` diff --git a/docs/ja/sql-reference/statements/select/union.md b/docs/ja/sql-reference/statements/select/union.md new file mode 100644 index 00000000000..e93df6d02df --- /dev/null +++ b/docs/ja/sql-reference/statements/select/union.md @@ -0,0 +1,85 @@ +--- +slug: /ja/sql-reference/statements/select/union +sidebar_label: UNION +--- + +# UNIONå¥ + +`UNION`ã¯`UNION ALL`ã¾ãŸã¯`UNION DISTINCT`を明示的ã«æŒ‡å®šã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ + +`ALL`ã¾ãŸã¯`DISTINCT`を指定ã—ãªã„å ´åˆã€`union_default_mode`設定ã«ä¾å­˜ã—ã¾ã™ã€‚`UNION ALL`ã¨`UNION DISTINCT`ã®é•ã„ã¯ã€`UNION DISTINCT`ã§ã¯UNIONã®çµæžœã«å¯¾ã—ã¦é‡è¤‡æŽ’除変æ›ãŒè¡Œã‚れるã“ã¨ã§ã™ã€‚ã“ã‚Œã¯`UNION ALL`ã‚’å«ã‚€ã‚µãƒ–クエリã‹ã‚‰`SELECT DISTINCT`ã‚’è¡Œã†ã“ã¨ã¨åŒç­‰ã§ã™ã€‚ + +ä»»æ„ã®æ•°ã®`SELECT`クエリã®çµæžœã‚’æ‹¡å¼µã—ã¦çµ„ã¿åˆã‚ã›ã‚‹ãŸã‚ã«`UNION`を使用ã§ãã¾ã™ã€‚例: + +``` sql +SELECT CounterID, 1 AS table, toInt64(count()) AS c + FROM test.hits + GROUP BY CounterID + +UNION ALL + +SELECT CounterID, 2 AS table, sum(Sign) AS c + FROM test.visits + GROUP BY CounterID + HAVING c > 0 +``` + +çµæžœã®ã‚«ãƒ©ãƒ ã¯ãã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ï¼ˆ`SELECT`内ã®é †åºï¼‰ã«åŸºã¥ã„ã¦ä¸€è‡´ã—ã¾ã™ã€‚カラムåãŒä¸€è‡´ã—ãªã„å ´åˆã€æœ€çµ‚çµæžœã®ã‚«ãƒ©ãƒ åã¯æœ€åˆã®ã‚¯ã‚¨ãƒªã‹ã‚‰å–å¾—ã•ã‚Œã¾ã™ã€‚ + +Unionã®ãŸã‚ã«åž‹ã‚­ãƒ£ã‚¹ãƒˆãŒè¡Œã‚ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€åŒã˜ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’æŒã¤äºŒã¤ã®ã‚¯ã‚¨ãƒªã‚’çµåˆã™ã‚‹éš›ã«ã€ãã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒéž`Nullable`åž‹ã¨äº’æ›æ€§ã®ã‚ã‚‹`Nullable`åž‹ã®å ´åˆã€çµæžœã®`UNION`フィールドã¯`Nullable`åž‹ã«ãªã‚Šã¾ã™ã€‚ + +`UNION`ã®ä¸€éƒ¨ã§ã‚るクエリを丸括弧ã§å›²ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚[ORDER BY](../../../sql-reference/statements/select/order-by.md)ã‚„[LIMIT](../../../sql-reference/statements/select/limit.md)ã¯ã€å€‹åˆ¥ã®ã‚¯ã‚¨ãƒªã«é©ç”¨ã•ã‚Œã€æœ€çµ‚çµæžœã«ã¯é©ç”¨ã•ã‚Œã¾ã›ã‚“。最終çµæžœã«å¤‰æ›ã‚’é©ç”¨ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ã™ã¹ã¦ã®ã‚¯ã‚¨ãƒªã‚’`UNION`ã§`FROM`å¥å†…ã®ã‚µãƒ–クエリã«é…ç½®ã§ãã¾ã™ã€‚ + +`UNION`ã‚’`UNION ALL`ã¾ãŸã¯`UNION DISTINCT`を明示的ã«æŒ‡å®šã›ãšã«ä½¿ç”¨ã™ã‚‹å ´åˆã¯ã€[union_default_mode](../../../operations/settings/settings.md#union-default-mode)設定を使用ã—ã¦Unionモードを指定ã§ãã¾ã™ã€‚設定値ã¯`ALL`ã€`DISTINCT`ã€ã¾ãŸã¯ç©ºæ–‡å­—列ã®ã„ãšã‚Œã‹ã§ã™ã€‚ã—ã‹ã—ã€`UNION`ã‚’`union_default_mode`設定ã§ç©ºæ–‡å­—列ã«ã™ã‚‹ã¨ã€ä¾‹å¤–ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚以下ã®ä¾‹ã¯ã€ç•°ãªã‚‹è¨­å®šå€¤ã‚’æŒã¤ã‚¯ã‚¨ãƒªã®çµæžœã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +クエリ: + +```sql +SET union_default_mode = 'DISTINCT'; +SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 2; +``` + +çµæžœ: + +```text +┌─1─┠+│ 1 │ +└───┘ +┌─1─┠+│ 2 │ +└───┘ +┌─1─┠+│ 3 │ +└───┘ +``` + +クエリ: + +```sql +SET union_default_mode = 'ALL'; +SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 2; +``` + +çµæžœ: + +```text +┌─1─┠+│ 1 │ +└───┘ +┌─1─┠+│ 2 │ +└───┘ +┌─1─┠+│ 2 │ +└───┘ +┌─1─┠+│ 3 │ +└───┘ +``` + +`UNION/UNION ALL/UNION DISTINCT`ã®ä¸€éƒ¨ã§ã‚るクエリã¯åŒæ™‚ã«å®Ÿè¡Œã•ã‚Œã€ãã®çµæžœã‚’組ã¿åˆã‚ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**å‚ç…§** + +- [insert_null_as_default](../../../operations/settings/settings.md#insert_null_as_default) 設定。 +- [union_default_mode](../../../operations/settings/settings.md#union-default-mode) 設定。 diff --git a/docs/ja/sql-reference/statements/select/where.md b/docs/ja/sql-reference/statements/select/where.md new file mode 100644 index 00000000000..46d714cb5fa --- /dev/null +++ b/docs/ja/sql-reference/statements/select/where.md @@ -0,0 +1,57 @@ +--- +slug: /ja/sql-reference/statements/select/where +sidebar_label: WHERE +--- + +# WHERE å¥ + +`WHERE` å¥ã¯ã€`SELECT` ã® [FROM](../../../sql-reference/statements/select/from.md) å¥ã‹ã‚‰å–å¾—ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’フィルタリングã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +`WHERE` å¥ãŒã‚ã‚‹å ´åˆã€`UInt8` åž‹ã®å¼ã‚’å«ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã€æ¯”較ãŠã‚ˆã³è«–ç†æ¼”ç®—å­ã‚’使用ã—ãŸå¼ã§ã™ã€‚ã“ã®å¼ãŒ `0` ã¨è©•ä¾¡ã•ã‚Œã‚‹è¡Œã¯ã€ä»¥é™ã®å¤‰æ›ã‚„çµæžœã‹ã‚‰é™¤å¤–ã•ã‚Œã¾ã™ã€‚ + +`WHERE` å¼ã¯ã€åŸºã«ãªã‚‹ãƒ†ãƒ¼ãƒ–ルエンジンãŒã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚„パーティションプルーニングをサãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹å ´åˆã€ãã®èƒ½åŠ›ã‚’使用ã™ã‚‹ãŸã‚ã«è©•ä¾¡ã•ã‚Œã¾ã™ã€‚ + +:::note +[PREWHERE](../../../sql-reference/statements/select/prewhere.md) ã¨å‘¼ã°ã‚Œã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã®æœ€é©åŒ–ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +[NULL](../../../sql-reference/syntax.md#null-literal) をテストã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€[IS NULL](../../operators/index.md#operator-is-null) ã‚„ [IS NOT NULL](../../operators/index.md#is-not-null) 演算å­ã€ã¾ãŸã¯ [isNull](../../../sql-reference/functions/functions-for-nulls.md#isnull) 㨠[isNotNull](../../../sql-reference/functions/functions-for-nulls.md#isnotnull) 関数を使用ã—ã¦ãã ã•ã„。ãã†ã§ãªã„ã¨ã€`NULL` ã‚’å«ã‚€å¼ã¯æ±ºã—ã¦é€šéŽã—ã¾ã›ã‚“。 + +**例** + +3 ã®å€æ•°ã§ã‚ã‚Šã€ã‹ã¤ 10 より大ãã„数を見ã¤ã‘ã‚‹ã«ã¯ã€[numbers テーブル](../../../sql-reference/table-functions/numbers.md)ã§æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™: + +``` sql +SELECT number FROM numbers(20) WHERE (number > 10) AND (number % 3 == 0); +``` + +çµæžœ: + +``` text +┌─number─┠+│ 12 │ +│ 15 │ +│ 18 │ +└────────┘ +``` + +`NULL` 値をå«ã‚€ã‚¯ã‚¨ãƒª: + +``` sql +CREATE TABLE t_null(x Int8, y Nullable(Int8)) ENGINE=MergeTree() ORDER BY x; +INSERT INTO t_null VALUES (1, NULL), (2, 3); + +SELECT * FROM t_null WHERE y IS NULL; +SELECT * FROM t_null WHERE y != 0; +``` + +çµæžœ: + +``` text +┌─x─┬────y─┠+│ 1 │ á´ºáµá´¸á´¸ │ +└───┴──────┘ +┌─x─┬─y─┠+│ 2 │ 3 │ +└───┴───┘ +``` diff --git a/docs/ja/sql-reference/statements/select/with.md b/docs/ja/sql-reference/statements/select/with.md new file mode 100644 index 00000000000..2fca610e664 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/with.md @@ -0,0 +1,312 @@ +--- +slug: /ja/sql-reference/statements/select/with +sidebar_label: WITH +--- + +# WITHå¥ + +ClickHouseã¯å…±é€šãƒ†ãƒ¼ãƒ–ルå¼ï¼ˆCTE)をサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€`WITH`å¥ã§å®šç¾©ã•ã‚ŒãŸã‚³ãƒ¼ãƒ‰ã‚’`SELECT`クエリã®ä»–ã®ã™ã¹ã¦ã®ä½¿ç”¨ç®‡æ‰€ã§ç½®ãæ›ãˆã¾ã™ã€‚åå‰ä»˜ãサブクエリã¯ã€ãƒ†ãƒ¼ãƒ–ルオブジェクトãŒè¨±å¯ã•ã‚Œã‚‹å ´æ‰€ã«ã€ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãŠã‚ˆã³å­ã‚¯ã‚¨ãƒªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ç¾åœ¨ã®ãƒ¬ãƒ™ãƒ«ã®CTEã‚’WITHå¼ã‹ã‚‰éš ã™ã“ã¨ã§å†å¸°ã‚’防止ã—ã¾ã™ã€‚ + +CTEã¯ã™ã¹ã¦ã®å‘¼ã³å‡ºã—箇所ã§åŒã˜çµæžœã‚’ä¿è¨¼ã—ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。使用ケースã”ã¨ã«ã‚¯ã‚¨ãƒªãŒå†å®Ÿè¡Œã•ã‚Œã‚‹ãŸã‚ã§ã™ã€‚ + +以下ã«ã€ãã®ã‚ˆã†ãªå‹•ä½œã®ä¾‹ã‚’示ã—ã¾ã™ã€‚ +``` sql +with cte_numbers as +( + select + num + from generateRandom('num UInt64', NULL) + limit 1000000 +) +select + count() +from cte_numbers +where num in (select num from cte_numbers) +``` +CTEãŒå˜ã«ã‚³ãƒ¼ãƒ‰ç‰‡ã§ã¯ãªã正確ã«çµæžœã‚’è¿”ã™ãªã‚‰ã€å¸¸ã«`1000000`を見るã“ã¨ã«ãªã‚‹ã§ã—ょã†ã€‚ + +ã—ã‹ã—ã€`cte_numbers`ã‚’2回å‚ç…§ã—ã¦ã„ã‚‹ãŸã‚ã€æ¯Žå›žãƒ©ãƒ³ãƒ€ãƒ ãªæ•°ãŒç”Ÿæˆã•ã‚Œã€ãã‚Œã«å¿œã˜ã¦ç•°ãªã‚‹ãƒ©ãƒ³ãƒ€ãƒ ãªçµæžœãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚例ãˆã°ã€`280501, 392454, 261636, 196227`ãªã©ã§ã™ã€‚ + +## 文法 + +``` sql +WITH AS +``` +ã¾ãŸã¯ +``` sql +WITH AS +``` + +## 例 + +**例1:** 定数å¼ã‚’「変数ã€ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ + +``` sql +WITH '2019-08-01 15:23:00' as ts_upper_bound +SELECT * +FROM hits +WHERE + EventDate = toDate(ts_upper_bound) AND + EventTime <= ts_upper_bound; +``` + +**例2:** `SELECT`å¥ã®ã‚«ãƒ©ãƒ ãƒªã‚¹ãƒˆã‹ã‚‰sum(bytes)ã®å¼çµæžœã‚’排除ã™ã‚‹ + +``` sql +WITH sum(bytes) as s +SELECT + formatReadableSize(s), + table +FROM system.parts +GROUP BY table +ORDER BY s; +``` + +**例3:** スカラサブクエリã®çµæžœã‚’使用ã™ã‚‹ + +``` sql +/* ã“ã®ä¾‹ã§ã¯æœ€ã‚‚大ããªãƒ†ãƒ¼ãƒ–ルã®TOP 10ã‚’è¿”ã—ã¾ã™ */ +WITH + ( + SELECT sum(bytes) + FROM system.parts + WHERE active + ) AS total_disk_usage +SELECT + (sum(bytes) / total_disk_usage) * 100 AS table_disk_usage, + table +FROM system.parts +GROUP BY table +ORDER BY table_disk_usage DESC +LIMIT 10; +``` + +**例4:** サブクエリ内ã§å¼ã‚’å†åˆ©ç”¨ã™ã‚‹ + +``` sql +WITH test1 AS (SELECT i + 1, j + 1 FROM test1) +SELECT * FROM test1; +``` + +## å†å¸°ã‚¯ã‚¨ãƒª + +オプションã®RECURSIVE修飾å­ã«ã‚ˆã‚Šã€WITHクエリãŒè‡ªèº«ã®å‡ºåŠ›ã‚’å‚ç…§ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例: + +**例:** 1ã‹ã‚‰100ã¾ã§ã®æ•´æ•°ã®åˆè¨ˆ + +```sql +WITH RECURSIVE test_table AS ( + SELECT 1 AS number +UNION ALL + SELECT number + 1 FROM test_table WHERE number < 100 +) +SELECT sum(number) FROM test_table; +``` + +``` text +┌─sum(number)─┠+│ 5050 │ +└─────────────┘ +``` + +å†å¸°çš„ãª`WITH`クエリã®ä¸€èˆ¬çš„ãªå½¢å¼ã¯ã€å¸¸ã«éžå†å¸°ã®é …ã€æ¬¡ã«`UNION ALL`ã€æ¬¡ã«å†å¸°ã®é …ãŒç¶šãã€å†å¸°ã®é …ã®ã¿ãŒã‚¯ã‚¨ãƒªã®è‡ªèº«ã®å‡ºåŠ›ã‚’å‚ç…§ã§ãã¾ã™ã€‚å†å¸°CTEクエリã¯æ¬¡ã®ã‚ˆã†ã«å®Ÿè¡Œã•ã‚Œã¾ã™ï¼š + +1. éžå†å¸°ã®é …を評価ã—ã¾ã™ã€‚éžå†å¸°ã®é …クエリã®çµæžœã‚’一時的ãªä½œæ¥­ãƒ†ãƒ¼ãƒ–ルã«é…ç½®ã—ã¾ã™ã€‚ +2. 作業テーブルãŒç©ºã§ãªã„é™ã‚Šã€ã“れらã®ã‚¹ãƒ†ãƒƒãƒ—ã‚’ç¹°ã‚Šè¿”ã—ã¾ã™ï¼š + 1. å†å¸°ã®é …を評価ã—ã€ä½œæ¥­ãƒ†ãƒ¼ãƒ–ルã®ç¾åœ¨ã®å†…容をå†å¸°çš„ãªè‡ªå·±å‚ç…§ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚å†å¸°ã®é …クエリã®çµæžœã‚’一時的ãªä¸­é–“テーブルã«é…ç½®ã—ã¾ã™ã€‚ + 2. 作業テーブルã®å†…容を中間テーブルã®å†…容ã§ç½®ãæ›ãˆã€ä¸­é–“テーブルを空ã«ã—ã¾ã™ã€‚ + +å†å¸°ã‚¯ã‚¨ãƒªã¯é€šå¸¸ã€éšŽå±¤ãƒ‡ãƒ¼ã‚¿ã‚„木構造ã®ãƒ‡ãƒ¼ã‚¿ã‚’扱ã†ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€æœ¨æ§‹é€ ã‚’探索ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’書ãã“ã¨ãŒã§ãã¾ã™ï¼š + +**例:** 木構造探索 + +ã¾ãšã€ãƒ„リーテーブルを作æˆã—ã¾ã—ょã†ï¼š + +```sql +DROP TABLE IF EXISTS tree; +CREATE TABLE tree +( + id UInt64, + parent_id Nullable(UInt64), + data String +) ENGINE = MergeTree ORDER BY id; + +INSERT INTO tree VALUES (0, NULL, 'ROOT'), (1, 0, 'Child_1'), (2, 0, 'Child_2'), (3, 1, 'Child_1_1'); +``` + +ã“ã®ãƒ„リーを探索ã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +**例:** 木構造探索 +```sql +WITH RECURSIVE search_tree AS ( + SELECT id, parent_id, data + FROM tree t + WHERE t.id = 0 +UNION ALL + SELECT t.id, t.parent_id, t.data + FROM tree t, search_tree st + WHERE t.parent_id = st.id +) +SELECT * FROM search_tree; +``` + +```text +┌─id─┬─parent_id─┬─data──────┠+│ 0 │ á´ºáµá´¸á´¸ │ ROOT │ +│ 1 │ 0 │ Child_1 │ +│ 2 │ 0 │ Child_2 │ +│ 3 │ 1 │ Child_1_1 │ +└────┴───────────┴───────────┘ +``` + +### æŽ¢ç´¢é †åº + +æ·±ã•å„ªå…ˆé †ã‚’作æˆã™ã‚‹ãŸã‚ã«ã¯ã€è¨ªå•æ¸ˆã¿ã®è¡Œã®é…列をå„çµæžœè¡Œã«è¨ˆç®—ã—ã¾ã™ï¼š + +**例:** æ·±ã•å„ªå…ˆé †ã«ã‚ˆã‚‹æœ¨æ§‹é€ æŽ¢ç´¢ +```sql +WITH RECURSIVE search_tree AS ( + SELECT id, parent_id, data, [t.id] AS path + FROM tree t + WHERE t.id = 0 +UNION ALL + SELECT t.id, t.parent_id, t.data, arrayConcat(path, [t.id]) + FROM tree t, search_tree st + WHERE t.parent_id = st.id +) +SELECT * FROM search_tree ORDER BY path; +``` + +```text +┌─id─┬─parent_id─┬─data──────┬─path────┠+│ 0 │ á´ºáµá´¸á´¸ │ ROOT │ [0] │ +│ 1 │ 0 │ Child_1 │ [0,1] │ +│ 3 │ 1 │ Child_1_1 │ [0,1,3] │ +│ 2 │ 0 │ Child_2 │ [0,2] │ +└────┴───────────┴───────────┴─────────┘ +``` + +幅優先順を作æˆã™ã‚‹ãŸã‚ã«ã¯ã€æŽ¢ç´¢ã®æ·±ã•ã‚’追跡ã™ã‚‹ã‚«ãƒ©ãƒ ã‚’追加ã™ã‚‹ã®ãŒæ¨™æº–çš„ãªã‚¢ãƒ—ローãƒã§ã™ï¼š + +**例:** 幅優先順ã«ã‚ˆã‚‹æœ¨æ§‹é€ æŽ¢ç´¢ +```sql +WITH RECURSIVE search_tree AS ( + SELECT id, parent_id, data, [t.id] AS path, toUInt64(0) AS depth + FROM tree t + WHERE t.id = 0 +UNION ALL + SELECT t.id, t.parent_id, t.data, arrayConcat(path, [t.id]), depth + 1 + FROM tree t, search_tree st + WHERE t.parent_id = st.id +) +SELECT * FROM search_tree ORDER BY depth; +``` + +```text +┌─id─┬─link─┬─data──────┬─path────┬─depth─┠+│ 0 │ á´ºáµá´¸á´¸ │ ROOT │ [0] │ 0 │ +│ 1 │ 0 │ Child_1 │ [0,1] │ 1 │ +│ 2 │ 0 │ Child_2 │ [0,2] │ 1 │ +│ 3 │ 1 │ Child_1_1 │ [0,1,3] │ 2 │ +└────┴──────┴───────────┴─────────┴───────┘ +``` + +### サイクル検出 + +ã¾ãšã‚°ãƒ©ãƒ•ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã—ょã†ï¼š + +```sql +DROP TABLE IF EXISTS graph; +CREATE TABLE graph +( + from UInt64, + to UInt64, + label String +) ENGINE = MergeTree ORDER BY (from, to); + +INSERT INTO graph VALUES (1, 2, '1 -> 2'), (1, 3, '1 -> 3'), (2, 3, '2 -> 3'), (1, 4, '1 -> 4'), (4, 5, '4 -> 5'); +``` + +ã“ã®ã‚°ãƒ©ãƒ•ã‚’探索ã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +**例:** サイクル検出ãªã—ã®ã‚°ãƒ©ãƒ•æŽ¢ç´¢ +```sql +WITH RECURSIVE search_graph AS ( + SELECT from, to, label FROM graph g + UNION ALL + SELECT g.from, g.to, g.label + FROM graph g, search_graph sg + WHERE g.from = sg.to +) +SELECT DISTINCT * FROM search_graph ORDER BY from; +``` +```text +┌─from─┬─to─┬─label──┠+│ 1 │ 4 │ 1 -> 4 │ +│ 1 │ 2 │ 1 -> 2 │ +│ 1 │ 3 │ 1 -> 3 │ +│ 2 │ 3 │ 2 -> 3 │ +│ 4 │ 5 │ 4 -> 5 │ +└──────┴────┴────────┘ +``` + +ã—ã‹ã—ã€ã‚°ãƒ©ãƒ•ã«ã‚µã‚¤ã‚¯ãƒ«ã‚’加ãˆã‚‹ã¨ã€å‰ã®ã‚¯ã‚¨ãƒªã¯`最大å†å¸°CTE評価深度`エラーã§å¤±æ•—ã—ã¾ã™ï¼š + +```sql +INSERT INTO graph VALUES (5, 1, '5 -> 1'); + +WITH RECURSIVE search_graph AS ( + SELECT from, to, label FROM graph g +UNION ALL + SELECT g.from, g.to, g.label + FROM graph g, search_graph sg + WHERE g.from = sg.to +) +SELECT DISTINCT * FROM search_graph ORDER BY from; +``` + +```text +コード: 306. DB::Exception: å—ä¿¡ã—ã¾ã—ãŸ: localhost:9000ã‹ã‚‰. DB::Exception: 最大å†å¸°CTE評価深度 (1000) を超ãˆã¾ã—ãŸã€search_graph AS (SELECT from, to, label FROM graph AS g UNION ALL SELECT g.from, g.to, g.label FROM graph AS g, search_graph AS sg WHERE g.from = sg.to) ã®è©•ä¾¡ä¸­ã€‚max_recursive_cte_evaluation_depth設定を上ã’ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。: RecursiveCTESourceを実行中㫠(TOO_DEEP_RECURSION) +``` + +循環を処ç†ã™ã‚‹æ¨™æº–çš„ãªæ–¹æ³•ã¯ã€æ—¢ã«è¨ªå•ã—ãŸãƒŽãƒ¼ãƒ‰ã®é…列を計算ã™ã‚‹ã“ã¨ã§ã™ï¼š + +**例:** サイクル検出付ãグラフ探索 +```sql +WITH RECURSIVE search_graph AS ( + SELECT from, to, label, false AS is_cycle, [tuple(g.from, g.to)] AS path FROM graph g +UNION ALL + SELECT g.from, g.to, g.label, has(path, tuple(g.from, g.to)), arrayConcat(sg.path, [tuple(g.from, g.to)]) + FROM graph g, search_graph sg + WHERE g.from = sg.to AND NOT is_cycle +) +SELECT * FROM search_graph WHERE is_cycle ORDER BY from; +``` + +```text +┌─from─┬─to─┬─label──┬─is_cycle─┬─path──────────────────────┠+│ 1 │ 4 │ 1 -> 4 │ true │ [(1,4),(4,5),(5,1),(1,4)] │ +│ 4 │ 5 │ 4 -> 5 │ true │ [(4,5),(5,1),(1,4),(4,5)] │ +│ 5 │ 1 │ 5 -> 1 │ true │ [(5,1),(1,4),(4,5),(5,1)] │ +└──────┴────┴────────┴──────────┴───────────────────────────┘ +``` + +### ç„¡é™ã‚¯ã‚¨ãƒª + +外部クエリã§`LIMIT`を使用ã™ã‚‹å ´åˆã€ç„¡é™å†å¸°CTEクエリを使用ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼š + +**例:** ç„¡é™å†å¸°CTEクエリ +```sql +WITH RECURSIVE test_table AS ( + SELECT 1 AS number +UNION ALL + SELECT number + 1 FROM test_table +) +SELECT sum(number) FROM (SELECT number FROM test_table LIMIT 100); +``` + +```text +┌─sum(number)─┠+│ 5050 │ +└─────────────┘ +``` diff --git a/docs/ja/sql-reference/statements/set-role.md b/docs/ja/sql-reference/statements/set-role.md new file mode 100644 index 00000000000..d4933aa638b --- /dev/null +++ b/docs/ja/sql-reference/statements/set-role.md @@ -0,0 +1,48 @@ +--- +slug: /ja/sql-reference/statements/set-role +sidebar_position: 51 +sidebar_label: SET ROLE +title: "SET ROLE ステートメント" +--- + +ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ãƒ­ãƒ¼ãƒ«ã‚’アクティベートã—ã¾ã™ã€‚ + +``` sql +SET ROLE {DEFAULT | NONE | role [,...] | ALL | ALL EXCEPT role [,...]} +``` + +## SET DEFAULT ROLE + +ユーザーã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ­ãƒ¼ãƒ«ã‚’設定ã—ã¾ã™ã€‚ + +デフォルトã®ãƒ­ãƒ¼ãƒ«ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ­ã‚°ã‚¤ãƒ³æ™‚ã«è‡ªå‹•çš„ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ™ãƒ¼ãƒˆã•ã‚Œã¾ã™ã€‚デフォルトã¨ã—ã¦è¨­å®šã™ã‚‹ã«ã¯ã€äº‹å‰ã«ä»˜ä¸Žã•ã‚ŒãŸãƒ­ãƒ¼ãƒ«ã®ã¿ã‚’使用ã§ãã¾ã™ã€‚ユーザーã«ãƒ­ãƒ¼ãƒ«ãŒä»˜ä¸Žã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouseã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +``` sql +SET DEFAULT ROLE {NONE | role [,...] | ALL | ALL EXCEPT role [,...]} TO {user|CURRENT_USER} [,...] +``` + +## 例 + +複数ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ­ãƒ¼ãƒ«ã‚’ユーザーã«è¨­å®šã—ã¾ã™: + +``` sql +SET DEFAULT ROLE role1, role2, ... TO user +``` + +付与ã•ã‚ŒãŸã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ã‚’ユーザーã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨ã—ã¦è¨­å®šã—ã¾ã™: + +``` sql +SET DEFAULT ROLE ALL TO user +``` + +ユーザーã‹ã‚‰ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ­ãƒ¼ãƒ«ã‚’ã™ã¹ã¦é™¤å¤–ã—ã¾ã™: + +``` sql +SET DEFAULT ROLE NONE TO user +``` + +特定ã®ãƒ­ãƒ¼ãƒ« `role1` 㨠`role2` を除ã„ã¦ã€ä»˜ä¸Žã•ã‚ŒãŸã™ã¹ã¦ã®ãƒ­ãƒ¼ãƒ«ã‚’デフォルトã¨ã—ã¦è¨­å®šã—ã¾ã™: + +``` sql +SET DEFAULT ROLE ALL EXCEPT role1, role2 TO user +``` diff --git a/docs/ja/sql-reference/statements/set.md b/docs/ja/sql-reference/statements/set.md new file mode 100644 index 00000000000..0983400e298 --- /dev/null +++ b/docs/ja/sql-reference/statements/set.md @@ -0,0 +1,21 @@ +--- +slug: /ja/sql-reference/statements/set +sidebar_position: 50 +sidebar_label: SET +--- + +# SET ステートメント + +``` sql +SET param = value +``` + +ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®`param` [設定](../../operations/settings/index.md)ã«`value`を割り当ã¦ã¾ã™ã€‚ã“ã®æ–¹æ³•ã§ã¯[サーãƒãƒ¼è¨­å®š](../../operations/server-configuration-parameters/settings.md)を変更ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +ã¾ãŸã€æŒ‡å®šã•ã‚ŒãŸè¨­å®šãƒ—ロファイルã‹ã‚‰ã™ã¹ã¦ã®å€¤ã‚’å˜ä¸€ã®ã‚¯ã‚¨ãƒªã§è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +``` sql +SET profile = 'profile-name-from-the-settings-file' +``` + +詳細ã«ã¤ã„ã¦ã¯ã€[設定](../../operations/settings/settings.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/docs/ja/sql-reference/statements/show.md b/docs/ja/sql-reference/statements/show.md new file mode 100644 index 00000000000..7e92f70a9f7 --- /dev/null +++ b/docs/ja/sql-reference/statements/show.md @@ -0,0 +1,705 @@ +--- +slug: /ja/sql-reference/statements/show +sidebar_position: 37 +sidebar_label: SHOW +--- + +# SHOW ステートメント + +N.B. `SHOW CREATE (TABLE|DATABASE|USER)` ã¯ã€[`display_secrets_in_show_and_select` サーãƒãƒ¼è¨­å®š](../../operations/server-configuration-parameters/settings#display_secrets_in_show_and_select)ãŒæœ‰åŠ¹ã«ãªã£ã¦ãŠã‚‰ãšã€[`format_display_secrets_in_show_and_select` フォーマット設定](../../operations/settings/formats#format_display_secrets_in_show_and_select)ãŒæœ‰åŠ¹ã«ãªã£ã¦ãŠã‚‰ãšã€ã¾ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«[`displaySecretsInShowAndSelect`](grant.md#display-secrets) 権é™ãŒãªã„é™ã‚Šã€ç§˜å¯†æƒ…報を隠ã™ã‚ˆã†ã«ã—ã¾ã™ã€‚ + +## SHOW CREATE TABLE | DICTIONARY | VIEW | DATABASE + +``` sql +SHOW [CREATE] [TEMPORARY] TABLE|DICTIONARY|VIEW|DATABASE [db.]table|view [INTO OUTFILE filename] [FORMAT format] +``` + +指定ã•ã‚ŒãŸã‚ªãƒ–ジェクトを作æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚ŒãŸCREATEクエリをå«ã‚€ã€Stringåž‹ã®å˜ä¸€ã®ã‚«ãƒ©ãƒ ã‚’è¿”ã—ã¾ã™ã€‚ + +`SHOW TABLE t` ãŠã‚ˆã³ `SHOW DATABASE db` 㯠`SHOW CREATE TABLE|DATABASE t|db` ã¨åŒã˜æ„味をæŒã¡ã¾ã™ãŒã€`SHOW t` ãŠã‚ˆã³ `SHOW db` ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +システムテーブル㮠`CREATE` クエリをå–å¾—ã™ã‚‹ãŸã‚ã«ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’使用ã™ã‚‹ã¨ã€ãƒ†ãƒ¼ãƒ–ル構造ã®ã¿ã‚’宣言ã™ã‚‹ *å½ã®* クエリãŒè¿”ã•ã‚Œã€ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## SHOW DATABASES + +ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ä¸€è¦§ã‚’表示ã—ã¾ã™ã€‚ + +```sql +SHOW DATABASES [[NOT] LIKE | ILIKE ''] [LIMIT ] [INTO OUTFILE filename] [FORMAT format] +``` + +ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã¨åŒä¸€ã§ã™ï¼š + +```sql +SELECT name FROM system.databases [WHERE name [NOT] LIKE | ILIKE ''] [LIMIT ] [INTO OUTFILE filename] [FORMAT format] +``` + +**例** + +åå‰ã« 'de' ã¨ã„ã†ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’å«ã‚€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã‚’å–å¾—ã™ã‚‹ï¼š + +``` sql +SHOW DATABASES LIKE '%de%' +``` + +çµæžœ: + +``` text +┌─name────┠+│ default │ +└─────────┘ +``` + +大文字å°æ–‡å­—を区別ã—ãªã„方法ã§ã€åå‰ã« 'de' ã¨ã„ã†ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’å«ã‚€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åã‚’å–å¾—ã™ã‚‹ï¼š + +``` sql +SHOW DATABASES ILIKE '%DE%' +``` + +çµæžœ: + +``` text +┌─name────┠+│ default │ +└─────────┘ +``` + +åå‰ã« 'de' ã¨ã„ã†ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’å«ã¾ãªã„データベースåã‚’å–å¾—ã™ã‚‹ï¼š + +``` sql +SHOW DATABASES NOT LIKE '%de%' +``` + +çµæžœ: + +``` text +┌─name───────────────────────────┠+│ _temporary_and_external_tables │ +│ system │ +│ test │ +│ tutorial │ +└────────────────────────────────┘ +``` + +データベースåã‹ã‚‰æœ€åˆã®äºŒè¡Œã‚’å–å¾—ã™ã‚‹ï¼š + +``` sql +SHOW DATABASES LIMIT 2 +``` + +çµæžœ: + +``` text +┌─name───────────────────────────┠+│ _temporary_and_external_tables │ +│ default │ +└────────────────────────────────┘ +``` + +**å‚考** +- [CREATE DATABASE](https://clickhouse.com/docs/ja/sql-reference/statements/create/database/#query-language-create-database) + +## SHOW TABLES + +テーブルã®ãƒªã‚¹ãƒˆã‚’表示ã—ã¾ã™ã€‚ + +```sql +SHOW [FULL] [TEMPORARY] TABLES [{FROM | IN} ] [[NOT] LIKE | ILIKE ''] [LIMIT ] [INTO OUTFILE ] [FORMAT ] +``` + +`FROM` å¥ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªã¯ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ†ãƒ¼ãƒ–ルリストを返ã—ã¾ã™ã€‚ + +ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã¨åŒä¸€ã§ã™ï¼š + +```sql +SELECT name FROM system.tables [WHERE name [NOT] LIKE | ILIKE ''] [LIMIT ] [INTO OUTFILE ] [FORMAT ] +``` + +**例** + +åå‰ã« 'user' ã¨ã„ã†ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’å«ã‚€ãƒ†ãƒ¼ãƒ–ルåã‚’å–å¾—ã™ã‚‹ï¼š + +``` sql +SHOW TABLES FROM system LIKE '%user%' +``` + +çµæžœ: + +``` text +┌─name─────────────┠+│ user_directories │ +│ users │ +└──────────────────┘ +``` + +大文字å°æ–‡å­—を区別ã—ãªã„方法ã§ã€åå‰ã« 'user' ã‚’å«ã‚€ãƒ†ãƒ¼ãƒ–ルåã‚’å–å¾—ã™ã‚‹ï¼š + +``` sql +SHOW TABLES FROM system ILIKE '%USER%' +``` + +çµæžœ: + +``` text +┌─name─────────────┠+│ user_directories │ +│ users │ +└──────────────────┘ +``` + +åå‰ã« 's' ã¨ã„ã†ã‚·ãƒ³ãƒœãƒ«ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’å«ã¾ãªã„テーブルåã‚’å–å¾—ã™ã‚‹ï¼š + +``` sql +SHOW TABLES FROM system NOT LIKE '%s%' +``` + +çµæžœ: + +``` text +┌─name─────────┠+│ metric_log │ +│ metric_log_0 │ +│ metric_log_1 │ +└──────────────┘ +``` + +テーブルåã‹ã‚‰æœ€åˆã®äºŒè¡Œã‚’å–å¾—ã™ã‚‹ï¼š + +``` sql +SHOW TABLES FROM system LIMIT 2 +``` + +çµæžœ: + +``` text +┌─name───────────────────────────┠+│ aggregate_function_combinators │ +│ asynchronous_metric_log │ +└────────────────────────────────┘ +``` + +**å‚考** + +- [Create Tables](https://clickhouse.com/docs/ja/getting-started/tutorial/#create-tables) +- [SHOW CREATE TABLE](https://clickhouse.com/docs/ja/sql-reference/statements/show/#show-create-table) + +## SHOW COLUMNS {#show_columns} + +カラムã®ãƒªã‚¹ãƒˆã‚’表示ã—ã¾ã™ + +```sql +SHOW [EXTENDED] [FULL] COLUMNS {FROM | IN}
    [{FROM | IN} ] [{[NOT] {LIKE | ILIKE} '' | WHERE }] [LIMIT ] [INTO OUTFILE ] [FORMAT ] +``` + +データベースåã¨ãƒ†ãƒ¼ãƒ–ルåã¯ã€`.
    ` ã®çœç•¥å½¢ã§æŒ‡å®šã§ãã€`FROM tab FROM db` ãŠã‚ˆã³ `FROM db.tab` ã¯ç­‰ä¾¡ã§ã™ã€‚データベースãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªã¯ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ã‚«ãƒ©ãƒ ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +オプションã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ `EXTENDED` ã¯ç¾åœ¨ã€åŠ¹æžœã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯MySQLã¨ã®äº’æ›æ€§ã®ãŸã‚ã«å­˜åœ¨ã—ã¾ã™ã€‚ + +オプションã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ `FULL` ã¯ã€å‡ºåŠ›ã«ç…§åˆé †åºã€ã‚³ãƒ¡ãƒ³ãƒˆã€ç‰¹æ¨©ã‚«ãƒ©ãƒ ã‚’å«ã‚るよã†ã«ã—ã¾ã™ã€‚ + +ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ä»¥ä¸‹ã®æ§‹é€ ã‚’æŒã¤çµæžœãƒ†ãƒ¼ãƒ–ルを生æˆã—ã¾ã™ï¼š +- `field` - カラムã®åå‰ (String) +- `type` - カラムデータ型。クエリãŒMySQLワイヤープロトコルを通ã˜ã¦è¡Œã‚ã‚ŒãŸå ´åˆã€MySQLã§ã®åŒç­‰ã®åž‹åãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ (String) +- `null` - カラムデータ型ãŒNullableã®å ´åˆã¯ `YES`ã€ãれ以外㯠`NO` (String) +- `key` - カラムãŒä¸»ã‚­ãƒ¼ã®ä¸€éƒ¨ã®å ´åˆã¯ `PRI`ã€ã‚½ãƒ¼ãƒˆã‚­ãƒ¼ã®ä¸€éƒ¨ã®å ´åˆã¯ `SOR`ã€ãã®ä»–ã®å ´åˆã¯ç©º (String) +- `default` - カラム㌠`ALIAS`ã€`DEFAULT`ã€ã¾ãŸã¯ `MATERIALIZED` åž‹ã®å ´åˆã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå¼ã€‚他㯠`NULL`。 (Nullable(String)) +- `extra` - 追加情報ã€ç¾åœ¨ã¯æœªä½¿ç”¨ (String) +- `collation` - (`FULL` キーワードを指定ã—ãŸå ´åˆã®ã¿) カラムã®ç…§åˆé †åºã€ClickHouseã«ã¯ã‚«ãƒ©ãƒ ã”ã¨ã®ç…§åˆé †åºãŒãªã„ãŸã‚常㫠`NULL` (Nullable(String)) +- `comment` - (`FULL` キーワードを指定ã—ãŸå ´åˆã®ã¿) カラムã®ã‚³ãƒ¡ãƒ³ãƒˆ (String) +- `privilege` - (`FULL` キーワードを指定ã—ãŸå ´åˆã®ã¿) ã“ã®ã‚«ãƒ©ãƒ ã«å¯¾ã™ã‚‹ç‰¹æ¨©ã€ç¾åœ¨ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“ (String) + +**例** + +'order' テーブル内㮠'delivery_' ã§å§‹ã¾ã‚‹ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã®æƒ…報をå–得: + +```sql +SHOW COLUMNS FROM 'orders' LIKE 'delivery_%' +``` + +çµæžœ: + +``` text +┌─field───────────┬─type─────┬─null─┬─key─────┬─default─┬─extra─┠+│ delivery_date │ DateTime │ 0 │ PRI SOR │ á´ºáµá´¸á´¸ │ │ +│ delivery_status │ Bool │ 0 │ │ á´ºáµá´¸á´¸ │ │ +└─────────────────┴──────────┴──────┴─────────┴─────────┴───────┘ +``` + +**å‚考** +- [system.columns](https://clickhouse.com/docs/ja/operations/system-tables/columns) + +## SHOW DICTIONARIES + +[Dictionary](../../sql-reference/dictionaries/index.md) ã®ãƒªã‚¹ãƒˆã‚’表示ã—ã¾ã™ã€‚ + +``` sql +SHOW DICTIONARIES [FROM ] [LIKE ''] [LIMIT ] [INTO OUTFILE ] [FORMAT ] +``` + +`FROM` å¥ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªã¯ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ã®Dictionaryã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +`SHOW DICTIONARIES` クエリã¨åŒã˜çµæžœã‚’次ã®æ–¹æ³•ã§å–å¾—ã§ãã¾ã™ï¼š + +``` sql +SELECT name FROM system.dictionaries WHERE database = [AND name LIKE ] [LIMIT ] [INTO OUTFILE ] [FORMAT ] +``` + +**例** + +次ã®ã‚¯ã‚¨ãƒªã¯ã€åå‰ã« `reg` ã‚’å«ã‚€ã€`system` データベースã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰æœ€åˆã®2行をé¸æŠžã—ã¾ã™ã€‚ + +``` sql +SHOW DICTIONARIES FROM db LIKE '%reg%' LIMIT 2 +``` + +``` text +┌─name─────────┠+│ regions │ +│ region_names │ +└──────────────┘ +``` + +## SHOW INDEX + +テーブルã®ä¸»ã‚­ãƒ¼åŠã³ãƒ‡ãƒ¼ã‚¿ã‚¹ã‚­ãƒƒãƒ”ングインデックスã®ãƒªã‚¹ãƒˆã‚’表示ã—ã¾ã™ã€‚ + +ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ä¸»ã«MySQLã¨ã®äº’æ›æ€§ã®ãŸã‚ã«å­˜åœ¨ã—ã¾ã™ã€‚システムテーブル [system.tables](../../operations/system-tables/tables.md) (主キー用) ãŠã‚ˆã³ [system.data_skipping_indices](../../operations/system-tables/data_skipping_indices.md) (データスキッピングインデックス用) ã¯ã€ClickHouseã«ã‚ˆã‚Šãƒã‚¤ãƒ†ã‚£ãƒ–ãªå½¢ã§åŒç­‰ã®æƒ…報をæä¾›ã—ã¾ã™ã€‚ + +```sql +SHOW [EXTENDED] {INDEX | INDEXES | INDICES | KEYS } {FROM | IN}
    [{FROM | IN} ] [WHERE ] [INTO OUTFILE ] [FORMAT ] +``` + +データベースãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルåã¯ã€`.
    ` ã®çœç•¥å½¢ã§æŒ‡å®šã§ãã€`FROM tab FROM db` ãŠã‚ˆã³ `FROM db.tab` ã¯ç­‰ä¾¡ã§ã™ã€‚データベースãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªã¯ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’データベースã¨ã—ã¦æƒ³å®šã—ã¾ã™ã€‚ + +オプションã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ `EXTENDED` ã¯ç¾åœ¨ã€åŠ¹æžœã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã¯MySQLã¨ã®äº’æ›æ€§ã®ãŸã‚ã«å­˜åœ¨ã—ã¾ã™ã€‚ + +ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ä»¥ä¸‹ã®æ§‹é€ ã‚’æŒã¤çµæžœãƒ†ãƒ¼ãƒ–ルを生æˆã—ã¾ã™ï¼š +- `table` - テーブルå。(String) +- `non_unique` - ClickHouseã¯ä¸€æ„性制約をサãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ãŸã‚ã€å¸¸ã« `1`。(UInt8) +- `key_name` - インデックスåã€ä¸»ã‚­ãƒ¼ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®å ´åˆã¯ `PRIMARY`。(String) +- `seq_in_index` - 主キーインデックスã®å ´åˆã€ã‚«ãƒ©ãƒ ã®ä½ç½®ã¯ `1` ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚データスキッピングインデックスã®å ´åˆï¼šå¸¸ã« `1`。(UInt8) +- `column_name` - 主キーインデックスã®å ´åˆã€ã‚«ãƒ©ãƒ å。データスキッピングインデックスã®å ´åˆï¼š`''` (空文字列)ã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ "expression" ã‚’å‚照。(String) +- `collation` - インデックス内ã®ã‚«ãƒ©ãƒ ã®ã‚½ãƒ¼ãƒˆé †åºï¼šæ˜‡é †ã®å ´åˆã¯ `A`ã€é™é †ã®å ´åˆã¯ `D`ã€ã‚½ãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„å ´åˆã¯ `NULL`。(Nullable(String)) +- `cardinality` - インデックスã®ã‚«ãƒ¼ãƒ‡ã‚£ãƒŠãƒªãƒ†ã‚£ï¼ˆã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹å†…ã®ä¸€æ„ã®å€¤ã®æ•°ï¼‰ã®æŽ¨å®šå€¤ã€‚ç¾åœ¨ã¯å¸¸ã« 0。(UInt64) +- `sub_part` - ClickHouseã¯MySQLã®ã‚ˆã†ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒ—レフィックスをサãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ãŸã‚ã€å¸¸ã« `NULL`。(Nullable(String)) +- `packed` - ClickHouseã¯MySQLã®ã‚ˆã†ãªãƒ‘ックドインデックスをサãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ãŸã‚ã€å¸¸ã« `NULL`。(Nullable(String)) +- `null` - ç¾åœ¨æœªä½¿ç”¨ +- `index_type` - インデックスタイプã€ä¾‹ï¼š`PRIMARY`ã€`MINMAX`ã€`BLOOM_FILTER` ãªã©ã€‚(String) +- `comment` - ç¾åœ¨å¸¸ã« `''`(空文字列)ã§ã‚るインデックスã«é–¢ã™ã‚‹è¿½åŠ æƒ…報。(String) +- `index_comment` - ClickHouseã§ã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã« `COMMENT` フィールド(MySQLã®ã‚ˆã†ãªï¼‰ã‚’æŒãŸã›ã‚‹ã“ã¨ãŒã§ããªã„ãŸã‚ã€`''`(空文字列)。(String) +- `visible` - インデックスãŒã‚ªãƒ—ティマイザã«è¦‹ãˆã‚‹å ´åˆã€å¸¸ã« `YES`。(String) +- `expression` - データスキッピングインデックスã®å ´åˆã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹å¼ã€‚主キーインデックスã®å ´åˆï¼š`''`(空文字列)。(String) + +**例** + +'tbl' テーブル内ã®ã™ã¹ã¦ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®æƒ…報をå–得: + +```sql +SHOW INDEX FROM 'tbl' +``` + +çµæžœ: + +``` text +┌─table─┬─non_unique─┬─key_name─┬─seq_in_index─┬─column_name─┬─collation─┬─cardinality─┬─sub_part─┬─packed─┬─null─┬─index_type───┬─comment─┬─index_comment─┬─visible─┬─expression─┠+│ tbl │ 1 │ blf_idx │ 1 │ 1 │ á´ºáµá´¸á´¸ │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ BLOOM_FILTER │ │ │ YES │ d, b │ +│ tbl │ 1 │ mm1_idx │ 1 │ 1 │ á´ºáµá´¸á´¸ │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ MINMAX │ │ │ YES │ a, c, d │ +│ tbl │ 1 │ mm2_idx │ 1 │ 1 │ á´ºáµá´¸á´¸ │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ MINMAX │ │ │ YES │ c, d, e │ +│ tbl │ 1 │ PRIMARY │ 1 │ c │ A │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ PRIMARY │ │ │ YES │ │ +│ tbl │ 1 │ PRIMARY │ 2 │ a │ A │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ PRIMARY │ │ │ YES │ │ +│ tbl │ 1 │ set_idx │ 1 │ 1 │ á´ºáµá´¸á´¸ │ 0 │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ á´ºáµá´¸á´¸ │ SET │ │ │ YES │ e │ +└───────┴────────────┴──────────┴──────────────┴─────────────┴───────────┴─────────────┴──────────┴────────┴──────┴──────────────┴─────────┴───────────────┴─────────┴────────────┘ +``` + +**å‚考** +- [system.tables](../../operations/system-tables/tables.md) +- [system.data_skipping_indices](../../operations/system-tables/data_skipping_indices.md) + +## SHOW PROCESSLIST + +``` sql +SHOW PROCESSLIST [INTO OUTFILE filename] [FORMAT format] +``` + +[system.processes](../../operations/system-tables/processes.md#system_tables-processes) テーブルã®å†…容を出力ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ã¯ã€ç¾åœ¨å‡¦ç†ä¸­ã®ã‚¯ã‚¨ãƒªã®ãƒªã‚¹ãƒˆãŒå«ã¾ã‚Œã¦ãŠã‚Šã€`SHOW PROCESSLIST` クエリã¯é™¤å¤–ã•ã‚Œã¾ã™ã€‚ + +`SELECT * FROM system.processes` クエリã¯ã€ã™ã¹ã¦ã®ç¾åœ¨ã®ã‚¯ã‚¨ãƒªã«é–¢ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ã€‚ + +Tip (コンソールã§å®Ÿè¡Œ): + +``` bash +$ watch -n1 "clickhouse-client --query='SHOW PROCESSLIST'" +``` + +## SHOW GRANTS + +ユーザーã®ç‰¹æ¨©ã‚’表示ã—ã¾ã™ã€‚ + +**構文** + +``` sql +SHOW GRANTS [FOR user1 [, user2 ...]] [WITH IMPLICIT] [FINAL] +``` + +ユーザーãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã‚¯ã‚¨ãƒªã¯ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ç‰¹æ¨©ã‚’è¿”ã—ã¾ã™ã€‚ + +`WITH IMPLICIT` 修飾å­ã¯ã€æš—é»™ã®æ¨©é™ã‚’表示ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ï¼ˆä¾‹ï¼š`GRANT SELECT ON system.one`) + +`FINAL` 修飾å­ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ãã®ä»˜ä¸Žã•ã‚ŒãŸå½¹å‰²ï¼ˆç¶™æ‰¿ä»˜ã)ã‹ã‚‰ã™ã¹ã¦ã®æ¨©é™ã‚’マージã—ã¾ã™ã€‚ + +## SHOW CREATE USER + +[ユーザー作æˆ](../../sql-reference/statements/create/user.md)ã§ä½¿ç”¨ã•ã‚ŒãŸãƒ‘ラメーターを表示ã—ã¾ã™ã€‚ + +**構文** + +``` sql +SHOW CREATE USER [name1 [, name2 ...] | CURRENT_USER] +``` + +## SHOW CREATE ROLE + +[ロール作æˆ](../../sql-reference/statements/create/role.md)ã§ä½¿ç”¨ã•ã‚ŒãŸãƒ‘ラメーターを表示ã—ã¾ã™ã€‚ + +**構文** + +``` sql +SHOW CREATE ROLE name1 [, name2 ...] +``` + +## SHOW CREATE ROW POLICY + +[ローãƒãƒªã‚·ãƒ¼ä½œæˆ](../../sql-reference/statements/create/row-policy.md)ã§ä½¿ç”¨ã•ã‚ŒãŸãƒ‘ラメーターを表示ã—ã¾ã™ã€‚ + +**構文** + +``` sql +SHOW CREATE [ROW] POLICY name ON [database1.]table1 [, [database2.]table2 ...] +``` + +## SHOW CREATE QUOTA + +[クォータ作æˆ](../../sql-reference/statements/create/quota.md)ã§ä½¿ç”¨ã•ã‚ŒãŸãƒ‘ラメーターを表示ã—ã¾ã™ã€‚ + +**構文** + +``` sql +SHOW CREATE QUOTA [name1 [, name2 ...] | CURRENT] +``` + +## SHOW CREATE SETTINGS PROFILE + +[設定プロファイル作æˆ](../../sql-reference/statements/create/settings-profile.md)ã§ä½¿ç”¨ã•ã‚ŒãŸãƒ‘ラメーターを表示ã—ã¾ã™ã€‚ + +**構文** + +``` sql +SHOW CREATE [SETTINGS] PROFILE name1 [, name2 ...] +``` + +## SHOW USERS + +[ユーザーアカウント](../../guides/sre/user-management/index.md#user-account-management)ã®åå‰ã‚’è¿”ã—ã¾ã™ã€‚ユーザーアカウントã®ãƒ‘ラメーターを表示ã™ã‚‹ã«ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル [system.users](../../operations/system-tables/users.md#system_tables-users) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +SHOW USERS +``` + +## SHOW ROLES + +[ロール](../../guides/sre/user-management/index.md#role-management)ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ä»–ã®ãƒ‘ラメーターを表示ã™ã‚‹ã«ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル [system.roles](../../operations/system-tables/roles.md#system_tables-roles) ãŠã‚ˆã³ [system.role_grants](../../operations/system-tables/role-grants.md#system_tables-role_grants) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +SHOW [CURRENT|ENABLED] ROLES +``` + +## SHOW PROFILES + +[設定プロファイル](../../guides/sre/user-management/index.md#settings-profiles-management)ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ユーザーアカウントã®ãƒ‘ラメーターを表示ã™ã‚‹ã«ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル [settings_profiles](../../operations/system-tables/settings_profiles.md#system_tables-settings_profiles) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +SHOW [SETTINGS] PROFILES +``` + +## SHOW POLICIES + +指定ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®[ローãƒãƒªã‚·ãƒ¼](../../guides/sre/user-management/index.md#row-policy-management)ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ユーザーアカウントã®ãƒ‘ラメーターを表示ã™ã‚‹ã«ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル [system.row_policies](../../operations/system-tables/row_policies.md#system_tables-row_policies) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +SHOW [ROW] POLICIES [ON [db.]table] +``` + +## SHOW QUOTAS + +[クォータ](../../guides/sre/user-management/index.md#quotas-management)ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚クォータã®ãƒ‘ラメーターを表示ã™ã‚‹ã«ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル [system.quotas](../../operations/system-tables/quotas.md#system_tables-quotas) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +SHOW QUOTAS +``` + +## SHOW QUOTA + +å…¨ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¾ãŸã¯ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®[クォータ](../../operations/quotas.md)消費é‡ã‚’è¿”ã—ã¾ã™ã€‚ä»–ã®ãƒ‘ラメーターを表示ã™ã‚‹ã«ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ル [system.quotas_usage](../../operations/system-tables/quotas_usage.md#system_tables-quotas_usage) ãŠã‚ˆã³ [system.quota_usage](../../operations/system-tables/quota_usage.md#system_tables-quota_usage) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**構文** + +``` sql +SHOW [CURRENT] QUOTA +``` + +## SHOW ACCESS + +ã™ã¹ã¦ã®[ユーザー](../../guides/sre/user-management/index.md#user-account-management)ã€[ロール](../../guides/sre/user-management/index.md#role-management)ã€[プロファイル](../../guides/sre/user-management/index.md#settings-profiles-management)ãªã©ã¨ãã®ã™ã¹ã¦ã®[付与](../../sql-reference/statements/grant.md#privileges)を表示ã—ã¾ã™ã€‚ + +**構文** + +``` sql +SHOW ACCESS +``` + +## SHOW CLUSTER(S) + +クラスタã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ã™ã¹ã¦ã®åˆ©ç”¨å¯èƒ½ãªã‚¯ãƒ©ã‚¹ã‚¿ã¯ [system.clusters](../../operations/system-tables/clusters.md) テーブルã«ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +:::note +`SHOW CLUSTER name` クエリã¯ã€ã“ã®ã‚¯ãƒ©ã‚¹ã‚¿ã«å¯¾ã™ã‚‹ system.clusters テーブルã®å†…容を表示ã—ã¾ã™ã€‚ +::: + +**構文** + +``` sql +SHOW CLUSTER '' +SHOW CLUSTERS [[NOT] LIKE|ILIKE ''] [LIMIT ] +``` + +**例** + +クエリ: + +``` sql +SHOW CLUSTERS; +``` + +çµæžœ: + +```text +┌─cluster──────────────────────────────────────┠+│ test_cluster_two_shards │ +│ test_cluster_two_shards_internal_replication │ +│ test_cluster_two_shards_localhost │ +│ test_shard_localhost │ +│ test_shard_localhost_secure │ +│ test_unavailable_shard │ +└──────────────────────────────────────────────┘ +``` + +クエリ: + +``` sql +SHOW CLUSTERS LIKE 'test%' LIMIT 1; +``` + +çµæžœ: + +```text +┌─cluster─────────────────┠+│ test_cluster_two_shards │ +└─────────────────────────┘ +``` + +クエリ: + +``` sql +SHOW CLUSTER 'test_shard_localhost' FORMAT Vertical; +``` + +çµæžœ: + +```text +Row 1: +────── +cluster: test_shard_localhost +shard_num: 1 +shard_weight: 1 +replica_num: 1 +host_name: localhost +host_address: 127.0.0.1 +port: 9000 +is_local: 1 +user: default +default_database: +errors_count: 0 +estimated_recovery_time: 0 +``` + +## SHOW SETTINGS + +システム設定ã¨ãã®å€¤ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ [system.settings](../../operations/system-tables/settings.md) テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã—ã¾ã™ã€‚ + +**構文** + +```sql +SHOW [CHANGED] SETTINGS LIKE|ILIKE +``` + +**å¥** + +`LIKE|ILIKE` ã¯ã€è¨­å®šåã®ä¸€è‡´ãƒ‘ターンを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`%` ã‚„ `_` ãªã©ã®ã‚°ãƒ­ãƒ–ã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚`LIKE` å¥ã¯å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã€`ILIKE` ã¯å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã¾ã›ã‚“。 + +`CHANGED` å¥ã‚’使用ã—ãŸå ´åˆã€ã‚¯ã‚¨ãƒªã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‹ã‚‰å¤‰æ›´ã•ã‚ŒãŸè¨­å®šã®ã¿ã‚’è¿”ã—ã¾ã™ã€‚ + +**例** + +`LIKE` å¥ã‚’使用ã—ãŸã‚¯ã‚¨ãƒªï¼š + +```sql +SHOW SETTINGS LIKE 'send_timeout'; +``` +çµæžœ: + +```text +┌─name─────────┬─type────┬─value─┠+│ send_timeout │ Seconds │ 300 │ +└──────────────┴─────────┴───────┘ +``` + +`ILIKE` å¥ã‚’使用ã—ãŸã‚¯ã‚¨ãƒªï¼š + +```sql +SHOW SETTINGS ILIKE '%CONNECT_timeout%' +``` + +çµæžœ: + +```text +┌─name────────────────────────────────────┬─type─────────┬─value─┠+│ connect_timeout │ Seconds │ 10 │ +│ connect_timeout_with_failover_ms │ Milliseconds │ 50 │ +│ connect_timeout_with_failover_secure_ms │ Milliseconds │ 100 │ +└─────────────────────────────────────────┴──────────────┴───────┘ +``` + +`CHANGED` å¥ã‚’使用ã—ãŸã‚¯ã‚¨ãƒªï¼š + +```sql +SHOW CHANGED SETTINGS ILIKE '%MEMORY%' +``` + +çµæžœ: + +```text +┌─name─────────────┬─type───┬─value───────┠+│ max_memory_usage │ UInt64 │ 10000000000 │ +└──────────────────┴────────┴─────────────┘ +``` + +## SHOW SETTING + +``` sql +SHOW SETTING +``` + +指定ã•ã‚ŒãŸè¨­å®šåã®è¨­å®šå€¤ã‚’出力ã—ã¾ã™ã€‚ + +**関連項目** +- [system.settings](../../operations/system-tables/settings.md) テーブル + +## SHOW FILESYSTEM CACHES + +```sql +SHOW FILESYSTEM CACHES +``` + +çµæžœ: + +``` text +┌─Caches────┠+│ s3_cache │ +└───────────┘ +``` + +**関連項目** +- [system.settings](../../operations/system-tables/settings.md) テーブル + +## SHOW ENGINES + +``` sql +SHOW ENGINES [INTO OUTFILE filename] [FORMAT format] +``` + +サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ãƒ†ãƒ¼ãƒ–ルエンジンã¨ãã‚Œã«é–¢é€£ã™ã‚‹æ©Ÿèƒ½ã‚µãƒãƒ¼ãƒˆæƒ…å ±ã®èª¬æ˜Žã‚’å«ã‚€ [system.table_engines](../../operations/system-tables/table_engines.md) テーブルã®å†…容を出力ã—ã¾ã™ã€‚ + +**関連項目** +- [system.table_engines](../../operations/system-tables/table_engines.md) テーブル + +## SHOW FUNCTIONS + +``` sql +SHOW FUNCTIONS [LIKE | ILIKE ''] +``` + +[system.functions](../../operations/system-tables/functions.md) テーブルã®å†…容を出力ã—ã¾ã™ã€‚ + +`LIKE` ã¾ãŸã¯ `ILIKE` å¥ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ã‚¯ã‚¨ãƒªã¯åå‰ãŒæä¾›ã•ã‚ŒãŸ `` ã«ä¸€è‡´ã™ã‚‹ã‚·ã‚¹ãƒ†ãƒ é–¢æ•°ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +**関連項目** +- [system.functions](../../operations/system-tables/functions.md) テーブル + +## SHOW MERGES + +マージã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒžãƒ¼ã‚¸ã¯ [system.merges](../../operations/system-tables/merges.md) テーブルã«ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +- `table` -- テーブルå。 +- `database` -- テーブルãŒå­˜åœ¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å。 +- `estimate_complete` -- 完了ã¾ã§ã®æŽ¨å®šæ™‚間(秒)。 +- `elapsed` -- マージ開始ã‹ã‚‰ã®çµŒéŽæ™‚間(秒)。 +- `progress` -- 完了ã—ãŸä½œæ¥­ã®å‰²åˆï¼ˆ0-100パーセント)。 +- `is_mutation` -- ã“ã®ãƒ—ロセスãŒéƒ¨åˆ†çš„ãªå¤‰ç•°ã§ã‚ã‚‹å ´åˆã¯ 1。 +- `size_compressed` -- マージã•ã‚ŒãŸãƒ‘ーツã®åœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã®åˆè¨ˆã‚µã‚¤ã‚ºã€‚ +- `memory_usage` -- マージプロセスã®ãƒ¡ãƒ¢ãƒªæ¶ˆè²»é‡ã€‚ + +**構文** + +``` sql +SHOW MERGES [[NOT] LIKE|ILIKE ''] [LIMIT ] +``` + +**例** + +クエリ: + +``` sql +SHOW MERGES; +``` + +çµæžœ: + +```text +┌─table──────┬─database─┬─estimate_complete─┬─elapsed─┬─progress─┬─is_mutation─┬─size_compressed─┬─memory_usage─┠+│ your_table │ default │ 0.14 │ 0.36 │ 73.01 │ 0 │ 5.40 MiB │ 10.25 MiB │ +└────────────┴──────────┴───────────────────┴─────────┴──────────┴─────────────┴─────────────────┴──────────────┘ +``` + +クエリ: + +``` sql +SHOW MERGES LIKE 'your_t%' LIMIT 1; +``` + +çµæžœ: + +```text +┌─table──────┬─database─┬─estimate_complete─┬─elapsed─┬─progress─┬─is_mutation─┬─size_compressed─┬─memory_usage─┠+│ your_table │ default │ 0.14 │ 0.36 │ 73.01 │ 0 │ 5.40 MiB │ 10.25 MiB │ +└────────────┴──────────┴───────────────────┴─────────┴──────────┴─────────────┴─────────────────┴──────────────┘ +``` diff --git a/docs/ja/sql-reference/statements/system.md b/docs/ja/sql-reference/statements/system.md new file mode 100644 index 00000000000..67819049c8a --- /dev/null +++ b/docs/ja/sql-reference/statements/system.md @@ -0,0 +1,557 @@ +--- +slug: /ja/sql-reference/statements/system +sidebar_position: 36 +sidebar_label: SYSTEM +--- + +# SYSTEM ステートメント + +## RELOAD EMBEDDED DICTIONARIES + +ã™ã¹ã¦ã®[内部 Dictionary](../../sql-reference/dictionaries/index.md)をリロードã—ã¾ã™ã€‚デフォルトã§ã¯ã€å†…部 Dictionary ã¯ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚内部 Dictionary ã®æ›´æ–°çµæžœã«é–¢ã‚らãšã€å¸¸ã« `Ok.` ã‚’è¿”ã—ã¾ã™ã€‚ + +## RELOAD DICTIONARIES + +以å‰ã«æˆåŠŸã—ã¦ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸã™ã¹ã¦ã® Dictionary をリロードã—ã¾ã™ã€‚デフォルトã§ã¯ã€Dictionary ã¯é…延ロードã•ã‚Œã¾ã™ï¼ˆ[dictionaries_lazy_load](../../operations/server-configuration-parameters/settings.md#dictionaries_lazy_load) ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。ã—ãŸãŒã£ã¦ã€èµ·å‹•æ™‚ã«è‡ªå‹•çš„ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã®ã§ã¯ãªãã€dictGet 関数や ENGINE = Dictionary ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã® SELECT を通ã—ã¦åˆã‚ã¦ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã‚‹æ™‚ã«åˆæœŸåŒ–ã•ã‚Œã¾ã™ã€‚`SYSTEM RELOAD DICTIONARIES` クエリã¯ã€ãã®ã‚ˆã†ãª (LOADED) Dictionary をリロードã—ã¾ã™ã€‚Dictionary ã®æ›´æ–°çµæžœã«é–¢ã‚らãšã€å¸¸ã« `Ok.` ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +SYSTEM RELOAD DICTIONARIES [ON CLUSTER cluster_name] +``` + +## RELOAD DICTIONARY + +`dictionary_name` ã‚’ Dictionary ã®çŠ¶æ…‹ (LOADED / NOT_LOADED / FAILED) ã«é–¢ã‚らãšå®Œå…¨ã«ãƒªãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚Dictionary ã®æ›´æ–°çµæžœã«é–¢ã‚らãšã€å¸¸ã« `Ok.` ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +SYSTEM RELOAD DICTIONARY [ON CLUSTER cluster_name] dictionary_name +``` + +Dictionary ã®çŠ¶æ…‹ã¯ `system.dictionaries` テーブルをクエリã™ã‚‹ã“ã¨ã§ç¢ºèªã§ãã¾ã™ã€‚ + +``` sql +SELECT name, status FROM system.dictionaries; +``` + +## RELOAD MODELS + +:::note +ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¨ `SYSTEM RELOAD MODEL` ã¯ã€clickhouse-library-bridge ã‹ã‚‰ CatBoost モデルをアンロードã™ã‚‹ã ã‘ã§ã™ã€‚`catboostEvaluate()` 関数ã¯ã€æœ€åˆã«ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚ŒãŸæ™‚点ã§ãƒ¢ãƒ‡ãƒ«ãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã„ãªã„å ´åˆã«ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ +::: + +ã™ã¹ã¦ã® CatBoost モデルをアンロードã—ã¾ã™ã€‚ + +**構文** + +```sql +SYSTEM RELOAD MODELS [ON CLUSTER cluster_name] +``` + +## RELOAD MODEL + +指定ã•ã‚ŒãŸ `model_path` ã® CatBoost モデルをアンロードã—ã¾ã™ã€‚ + +**構文** + +```sql +SYSTEM RELOAD MODEL [ON CLUSTER cluster_name] +``` + +## RELOAD FUNCTIONS + +登録ã•ã‚ŒãŸã™ã¹ã¦ã®[実行å¯èƒ½ãªãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©é–¢æ•°](../functions/index.md#executable-user-defined-functions)ã¾ãŸã¯ãれらã®1ã¤ã‚’設定ファイルã‹ã‚‰ãƒªãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ + +**構文** + +```sql +RELOAD FUNCTIONS [ON CLUSTER cluster_name] +RELOAD FUNCTION [ON CLUSTER cluster_name] function_name +``` + +## RELOAD ASYNCHRONOUS METRICS + +ã™ã¹ã¦ã®[éžåŒæœŸãƒ¡ãƒˆãƒªã‚¯ã‚¹](../../operations/system-tables/asynchronous_metrics.md)ã‚’å†è¨ˆç®—ã—ã¾ã™ã€‚éžåŒæœŸãƒ¡ãƒˆãƒªã‚¯ã‚¹ã¯è¨­å®š [asynchronous_metrics_update_period_s](../../operations/server-configuration-parameters/settings.md) ã«åŸºã¥ã„ã¦å®šæœŸçš„ã«æ›´æ–°ã•ã‚Œã‚‹ãŸã‚ã€ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’使用ã—ã¦æ‰‹å‹•ã§æ›´æ–°ã™ã‚‹å¿…è¦ã¯é€šå¸¸ã‚ã‚Šã¾ã›ã‚“。 + +```sql +RELOAD ASYNCHRONOUS METRICS [ON CLUSTER cluster_name] +``` + +## DROP DNS CACHE + +ClickHouse ã®å†…部 DNS キャッシュをクリアã—ã¾ã™ã€‚インフラストラクãƒãƒ£ã‚’変更ã™ã‚‹å ´åˆï¼ˆåˆ¥ã® ClickHouse サーãƒãƒ¼ã®IPアドレスを変更ã™ã‚‹å ´åˆã‚„ Dictionary を使用ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã‚’変更ã™ã‚‹å ´åˆï¼‰ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼ˆå¤ã„ ClickHouse ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®å ´åˆï¼‰ã€‚ + +キャッシュã®ç®¡ç†ã‚’より便利(自動化)ã«ã™ã‚‹ãŸã‚ã«ã€disable_internal_dns_cache, dns_cache_max_entries, dns_cache_update_periodパラメータをå‚ç…§ã—ã¦ãã ã•ã„。 + +## DROP MARK CACHE + +マークキャッシュをクリアã—ã¾ã™ã€‚ + +## DROP REPLICA + +`ReplicatedMergeTree` テーブルã®ãƒ‡ãƒƒãƒ‰ レプリカを次ã®æ§‹æ–‡ã‚’使用ã—ã¦å‰Šé™¤ã§ãã¾ã™ã€‚ + +``` sql +SYSTEM DROP REPLICA 'replica_name' FROM TABLE database.table; +SYSTEM DROP REPLICA 'replica_name' FROM DATABASE database; +SYSTEM DROP REPLICA 'replica_name'; +SYSTEM DROP REPLICA 'replica_name' FROM ZKPATH '/path/to/table/in/zk'; +``` + +クエリ㯠`ReplicatedMergeTree` レプリカ パスを ZooKeeper ã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã€‚レプリカãŒãƒ‡ãƒƒãƒ‰çŠ¶æ…‹ã§ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒ ZooKeeper ã‹ã‚‰ `DROP TABLE` ã«ã‚ˆã£ã¦å‰Šé™¤ã•ã‚Œãªã„å ´åˆãªã©ã«å½¹ç«‹ã¡ã¾ã™ã€‚éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–/å¤ã„レプリカã®ã¿ã‚’削除ã—ã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ¬ãƒ—リカを削除ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã“ã‚Œã«ã¯ `DROP TABLE` を使用ã—ã¦ãã ã•ã„。`DROP REPLICA` ã¯ãƒ†ãƒ¼ãƒ–ルを削除ã›ãšã€ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚„メタデータを削除ã—ã¾ã›ã‚“。 + +最åˆã®ã‚‚ã®ã¯ã€`database.table` テーブル㮠`'replica_name'` レプリカã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚ 2 番目ã®ã‚‚ã®ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ã™ã¹ã¦ã®è¤‡è£½ãƒ†ãƒ¼ãƒ–ルã«ã¤ã„ã¦åŒã˜æ“作を実行ã—ã¾ã™ã€‚ 3 番目ã®ã‚‚ã®ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ« サーãƒãƒ¼ä¸Šã®ã™ã¹ã¦ã®è¤‡è£½ãƒ†ãƒ¼ãƒ–ルã«ã¤ã„ã¦åŒã˜æ“作を行ã„ã¾ã™ã€‚ 4 番目ã¯ã€ãƒ†ãƒ¼ãƒ–ルã®ä»–ã®ã™ã¹ã¦ã®ãƒ¬ãƒ—リカãŒå‰Šé™¤ã•ã‚ŒãŸã¨ãã«ãƒ‡ãƒƒãƒ‰ãƒ¬ãƒ—リカã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã™ã€‚作æˆæ™‚ã® `ReplicatedMergeTree` エンジンã®æœ€åˆã®å¼•æ•°ã«æŒ‡å®šã—ãŸã®ã¨åŒã˜ãƒ‘スã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## DROP DATABASE REPLICA + +`Replicated` データベースã®ãƒ‡ãƒƒãƒ‰ レプリカを次ã®æ§‹æ–‡ã‚’使用ã—ã¦å‰Šé™¤ã§ãã¾ã™ã€‚ + +``` sql +SYSTEM DROP DATABASE REPLICA 'replica_name' [FROM SHARD 'shard_name'] FROM DATABASE database; +SYSTEM DROP DATABASE REPLICA 'replica_name' [FROM SHARD 'shard_name']; +SYSTEM DROP DATABASE REPLICA 'replica_name' [FROM SHARD 'shard_name'] FROM ZKPATH '/path/to/table/in/zk'; +``` + +`SYSTEM DROP REPLICA` ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€`DROP DATABASE` を実行ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒå­˜åœ¨ã—ãªã„å ´åˆã« ZooKeeper ã‹ã‚‰ `Replicated` データベースã®ãƒ¬ãƒ—リカ パスを削除ã—ã¾ã™ã€‚ `ReplicatedMergeTree` ã®ãƒ¬ãƒ—リカã¯å‰Šé™¤ã•ã‚Œãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„(ãã®ãŸã‚ `SYSTEM DROP REPLICA` ã‚‚å¿…è¦ã«ãªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼‰ã€‚ シャードãŠã‚ˆã³ãƒ¬ãƒ—リカåã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ä½œæˆæ™‚ã« `Replicated` エンジンã®å¼•æ•°ã«æŒ‡å®šã•ã‚ŒãŸåå‰ã§ã™ã€‚ã“れらã®åå‰ã¯ã€`system.clusters` ã® `database_shard_name` ãŠã‚ˆã³ `database_replica_name` カラムã‹ã‚‰å–å¾—ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ `FROM SHARD` å¥ãŒãªã„å ´åˆã€`replica_name` 㯠`shard_name|replica_name` フォーマットã®å®Œå…¨ãªãƒ¬ãƒ—リカåã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +## DROP UNCOMPRESSED CACHE + +éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’クリアã—ã¾ã™ã€‚éžåœ§ç¸®ãƒ‡ãƒ¼ã‚¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ã€ã‚¯ã‚¨ãƒª/ユーザー/プロファイルレベルã®è¨­å®š [use_uncompressed_cache](../../operations/settings/settings.md#setting-use_uncompressed_cache) ã§æœ‰åŠ¹åŒ–/無効化ã•ã‚Œã¾ã™ã€‚サーãƒãƒ¼ãƒ¬ãƒ™ãƒ«ã®è¨­å®š [uncompressed_cache_size](../../operations/server-configuration-parameters/settings.md#server-settings-uncompressed_cache_size) を使用ã—ã¦ãã®ã‚µã‚¤ã‚ºã‚’構æˆã§ãã¾ã™ã€‚ + +## DROP COMPILED EXPRESSION CACHE + +コンパイルã•ã‚ŒãŸå¼ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’クリアã—ã¾ã™ã€‚コンパイルã•ã‚ŒãŸå¼ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ã€ã‚¯ã‚¨ãƒª/ユーザー/プロファイルレベルã®è¨­å®š [compile_expressions](../../operations/settings/settings.md#compile-expressions) ã§æœ‰åŠ¹åŒ–/無効化ã•ã‚Œã¾ã™ã€‚ + +## DROP QUERY CACHE + +```sql +SYSTEM DROP QUERY CACHE; +SYSTEM DROP QUERY CACHE TAG '' +```` + +[クエリキャッシュ](../../operations/query-cache.md)をクリアã—ã¾ã™ã€‚ã‚¿ã‚°ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€æŒ‡å®šã•ã‚ŒãŸã‚¿ã‚°ã‚’æŒã¤ã‚¯ã‚¨ãƒªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚¨ãƒ³ãƒˆãƒªã®ã¿ãŒå‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +## DROP FORMAT SCHEMA CACHE {#system-drop-schema-format} + +[format_schema_path](../../operations/server-configuration-parameters/settings.md#format_schema_path) ã‹ã‚‰ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’クリアã—ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るフォーマット: + +- Protobuf + +```sql +SYSTEM DROP FORMAT SCHEMA CACHE [FOR Protobuf] +``` + +## FLUSH LOGS + +ãƒãƒƒãƒ•ã‚¡ã•ã‚ŒãŸãƒ­ã‚°ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’システムテーブル(例: system.query_log)ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚ã»ã¨ã‚“ã©ã®ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ãƒ•ãƒ©ãƒƒã‚·ãƒ¥é–“éš”ãŒ7.5秒ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€ãƒ‡ãƒãƒƒã‚°ã«å½¹ç«‹ã¡ã¾ã™ã€‚ +メッセージキューãŒç©ºã§ã‚‚システムテーブルを作æˆã—ã¾ã™ã€‚ + +```sql +SYSTEM FLUSH LOGS [ON CLUSTER cluster_name] +``` + +## RELOAD CONFIG + +ClickHouseã®è¨­å®šã‚’リロードã—ã¾ã™ã€‚設定ãŒZooKeeperã«ä¿å­˜ã•ã‚Œã¦ã„ã‚‹å ´åˆã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚`SYSTEM RELOAD CONFIG` ã¯ZooKeeperã«ä¿å­˜ã•ã‚ŒãŸ`USER` 設定をリロードã›ãšã€`users.xml` ã«ä¿å­˜ã•ã‚ŒãŸ`USER` 設定ã®ã¿ã‚’リロードã—ã¾ã™ã€‚ã™ã¹ã¦ã®`USER` 設定をリロードã™ã‚‹ã«ã¯ `SYSTEM RELOAD USERS` を使用ã—ã¾ã™ã€‚ + +```sql +SYSTEM RELOAD CONFIG [ON CLUSTER cluster_name] +``` + +## RELOAD USERS + +ã™ã¹ã¦ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’リロードã—ã¾ã™ã€‚å«ã¾ã‚Œã‚‹ã®ã¯: users.xmlã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ã‚¢ã‚¯ã‚»ã‚¹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã€ZooKeeperã§ãƒ¬ãƒ—リケートã•ã‚ŒãŸã‚¢ã‚¯ã‚»ã‚¹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã§ã™ã€‚ + +```sql +SYSTEM RELOAD USERS [ON CLUSTER cluster_name] +``` + +## SHUTDOWN + +ClickHouseを正常ã«ã‚·ãƒ£ãƒƒãƒˆãƒ€ã‚¦ãƒ³ã—ã¾ã™ï¼ˆ`service clickhouse-server stop` / `kill {$pid_clickhouse-server}` ã®ã‚ˆã†ã«ï¼‰ã€‚ + +## KILL + +ClickHouseプロセスを強制終了ã—ã¾ã™ï¼ˆ`kill -9 {$ pid_clickhouse-server}` ã®ã‚ˆã†ã«ï¼‰ã€‚ + +## 分散テーブルã®ç®¡ç† + +ClickHouse ã¯[分散](../../engines/table-engines/special/distributed.md) テーブルを管ç†ã§ãã¾ã™ã€‚ユーザーãŒã“れらã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã¨ã€ClickHouseã¯æœ€åˆã«ãƒ‡ãƒ¼ã‚¿ã‚’クラスタノードã«é€ä¿¡ã™ã‚‹ãŸã‚ã®ã‚­ãƒ¥ãƒ¼ã‚’作æˆã—ã€ãã®å¾Œãƒ‡ãƒ¼ã‚¿ã‚’éžåŒæœŸã§é€ä¿¡ã—ã¾ã™ã€‚[STOP DISTRIBUTED SENDS](#stop-distributed-sends), [FLUSH DISTRIBUTED](#flush-distributed), [START DISTRIBUTED SENDS](#start-distributed-sends) クエリを使用ã—ã¦ã‚­ãƒ¥ãƒ¼ã®å‡¦ç†ã‚’管ç†ã§ãã¾ã™ã€‚ã¾ãŸã€[distributed_foreground_insert](../../operations/settings/settings.md#distributed_foreground_insert) 設定を使用ã—ã¦åˆ†æ•£ãƒ‡ãƒ¼ã‚¿ã‚’åŒæœŸçš„ã«æŒ¿å…¥ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +### STOP DISTRIBUTED SENDS + +分散テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹éš›ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ‡ãƒ¼ã‚¿åˆ†æ•£ã‚’無効化ã—ã¾ã™ã€‚ + +``` sql +SYSTEM STOP DISTRIBUTED SENDS [db.] [ON CLUSTER cluster_name] +``` + +### FLUSH DISTRIBUTED + +ClickHouse ãŒã‚¯ãƒ©ã‚¹ã‚¿ãƒŽãƒ¼ãƒ‰ã«ãƒ‡ãƒ¼ã‚¿ã‚’åŒæœŸçš„ã«é€ä¿¡ã™ã‚‹ã“ã¨ã‚’強制ã—ã¾ã™ã€‚ノードãŒä½¿ç”¨ã§ããªã„å ´åˆã€ClickHouse ã¯ä¾‹å¤–をスローã—ã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œã‚’åœæ­¢ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ãŒå†åº¦ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ã«ãªã£ãŸæ™‚ã«ã€ã‚¯ã‚¨ãƒªãŒæˆåŠŸã™ã‚‹ã¾ã§å†è©¦è¡Œã§ãã¾ã™ã€‚ + +`SETTINGS` å¥ã‚’通ã˜ã¦ã„ãã¤ã‹ã®è¨­å®šã‚’上書ãã™ã‚‹ã“ã¨ã‚‚ã§ãã€`max_concurrent_queries_for_all_users` ã‚„ `max_memory_usage` ãªã©ã®ä¸€æ™‚çš„ãªåˆ¶é™ã‚’回é¿ã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã™ã€‚ + +``` sql +SYSTEM FLUSH DISTRIBUTED [db.] [ON CLUSTER cluster_name] [SETTINGS ...] +``` + +:::note +ä¿ç•™ä¸­ã®å„ブロックã¯ã€åˆæœŸã® INSERT クエリã‹ã‚‰ã®è¨­å®šã‚’使用ã—ã¦ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ãã®ãŸã‚ã€è¨­å®šã‚’上書ãã—ãŸã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ +::: + +### START DISTRIBUTED SENDS + +分散テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹éš›ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ‡ãƒ¼ã‚¿åˆ†æ•£ã‚’有効ã«ã—ã¾ã™ã€‚ + +``` sql +SYSTEM START DISTRIBUTED SENDS [db.] [ON CLUSTER cluster_name] +``` + +### STOP LISTEN + +指定ã—ãŸãƒãƒ¼ãƒˆã§æŒ‡å®šã—ãŸãƒ—ロトコルを使用ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã¸ã®æ—¢å­˜ã®æŽ¥ç¶šã‚’優雅ã«çµ‚了ã—ã€ã‚½ã‚±ãƒƒãƒˆã‚’é–‰ã˜ã¾ã™ã€‚ + +ãŸã ã—ã€å¯¾å¿œã™ã‚‹ãƒ—ロトコルã®è¨­å®šãŒ clickhouse-server ã®è¨­å®šã§æŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯åŠ¹æžœãŒã‚ã‚Šã¾ã›ã‚“。 + +```sql +SYSTEM STOP LISTEN [ON CLUSTER cluster_name] [QUERIES ALL | QUERIES DEFAULT | QUERIES CUSTOM | TCP | TCP WITH PROXY | TCP SECURE | HTTP | HTTPS | MYSQL | GRPC | POSTGRESQL | PROMETHEUS | CUSTOM 'protocol'] +``` + +- `CUSTOM 'protocol'` 修飾å­ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚µãƒ¼ãƒãƒ¼æ§‹æˆã®ãƒ—ロトコルセクションã§æŒ‡å®šã•ã‚ŒãŸã‚«ã‚¹ã‚¿ãƒ ãƒ—ロトコルãŒåœæ­¢ã•ã‚Œã¾ã™ã€‚ +- `QUERIES ALL [EXCEPT .. [,..]]` 修飾å­ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`EXCEPT` å¥ã§æŒ‡å®šã•ã‚ŒãŸã‚‚ã®ã‚’除ãã€ã™ã¹ã¦ã®ãƒ—ロトコルãŒåœæ­¢ã•ã‚Œã¾ã™ã€‚ +- `QUERIES DEFAULT [EXCEPT .. [,..]]` 修飾å­ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`EXCEPT` å¥ã§æŒ‡å®šã•ã‚ŒãŸã‚‚ã®ã‚’除ãã€ã™ã¹ã¦ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ—ロトコルãŒåœæ­¢ã•ã‚Œã¾ã™ã€‚ +- `QUERIES CUSTOM [EXCEPT .. [,..]]` 修飾å­ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€`EXCEPT` å¥ã§æŒ‡å®šã•ã‚ŒãŸã‚‚ã®ã‚’除ãã€ã™ã¹ã¦ã®ã‚«ã‚¹ã‚¿ãƒ ãƒ—ロトコルãŒåœæ­¢ã•ã‚Œã¾ã™ã€‚ + +### START LISTEN + +指定ã•ã‚ŒãŸãƒ—ロトコルã§æ–°ã—ã„接続を確立ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +ãŸã ã—ã€SYSTEM STOP LISTEN コマンドを使用ã—ã¦ã€æŒ‡å®šã•ã‚ŒãŸãƒãƒ¼ãƒˆã¨ãƒ—ロトコルã§ã‚µãƒ¼ãƒãƒ¼ã‚’åœæ­¢ã—ã¦ã„ãªã„å ´åˆã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯åŠ¹æžœã‚’発æ®ã—ã¾ã›ã‚“。 + +```sql +SYSTEM START LISTEN [ON CLUSTER cluster_name] [QUERIES ALL | QUERIES DEFAULT | QUERIES CUSTOM | TCP | TCP WITH PROXY | TCP SECURE | HTTP | HTTPS | MYSQL | GRPC | POSTGRESQL | PROMETHEUS | CUSTOM 'protocol'] +``` + +## MergeTree テーブルã®ç®¡ç† + +ClickHouse 㯠[MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) テーブルã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセスを管ç†ã§ãã¾ã™ã€‚ + +### STOP MERGES + +MergeTree ファミリ内ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ マージをåœæ­¢ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +``` sql +SYSTEM STOP MERGES [ON CLUSTER cluster_name] [ON VOLUME | [db.]merge_tree_family_table_name] +``` + +:::note +テーブルを `DETACH / ATTACH` ã™ã‚‹ã¨ã€ä»¥å‰ã«ã™ã¹ã¦ã® MergeTree テーブルã«å¯¾ã—ã¦ãƒžãƒ¼ã‚¸ãŒåœæ­¢ã•ã‚Œã¦ã„ãŸå ´åˆã§ã‚‚ã€ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ マージãŒé–‹å§‹ã•ã‚Œã¾ã™ã€‚ +::: + +### START MERGES + +MergeTree ファミリ内ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ マージを開始ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +``` sql +SYSTEM START MERGES [ON CLUSTER cluster_name] [ON VOLUME | [db.]merge_tree_family_table_name] +``` + +### STOP TTL MERGES + +MergeTree ファミリã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—㦠[æœ‰åŠ¹æœŸé™ (TTL) å¼](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-ttl) ã«å¾“ã£ã¦å¤ã„データをãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§å‰Šé™¤ã™ã‚‹ã“ã¨ã‚’åœæ­¢ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ テーブルãŒå­˜åœ¨ã—ãªã„å ´åˆã§ã‚‚ `Ok.` ã‚’è¿”ã—ã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +SYSTEM STOP TTL MERGES [ON CLUSTER cluster_name] [[db.]merge_tree_family_table_name] +``` + +### START TTL MERGES + +MergeTree ファミリã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—㦠[æœ‰åŠ¹æœŸé™ (TTL) å¼](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-ttl) ã«å¾“ã£ã¦å¤ã„データをãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§å‰Šé™¤ã‚’開始ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ テーブルãŒå­˜åœ¨ã—ãªã„å ´åˆã§ã‚‚ `Ok.` ã‚’è¿”ã—ã¾ã™ã€‚データベースãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +SYSTEM START TTL MERGES [ON CLUSTER cluster_name] [[db.]merge_tree_family_table_name] +``` + +### STOP MOVES + +MergeTree ファミリã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—㦠[TO VOLUME ã¾ãŸã¯ TO DISK å¥ã‚’伴ㆠTTL テーブルå¼](../../engines/table-engines/mergetree-family/mergetree.md#mergetree-table-ttl) ã«å¾“ã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ç§»å‹•ã™ã‚‹ã“ã¨ã‚’åœæ­¢ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ テーブルãŒå­˜åœ¨ã—ãªã„å ´åˆã§ã‚‚ `Ok.` ã‚’è¿”ã—ã¾ã™ã€‚データベースãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +SYSTEM STOP MOVES [ON CLUSTER cluster_name] [[db.]merge_tree_family_table_name] +``` + +### START MOVES + +MergeTree ファミリã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—㦠[TO VOLUME ã¾ãŸã¯ TO DISK å¥ã‚’伴ㆠTTL テーブルå¼](../../engines/table-engines/mergetree-family/mergetree.md#mergetree-table-ttl) ã«å¾“ã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ç§»å‹•ã‚’開始ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ テーブルãŒå­˜åœ¨ã—ãªã„å ´åˆã§ã‚‚ `Ok.` ã‚’è¿”ã—ã¾ã™ã€‚データベースãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ + +``` sql +SYSTEM START MOVES [ON CLUSTER cluster_name] [[db.]merge_tree_family_table_name] +``` + +### SYSTEM UNFREEZE {#query_language-system-unfreeze} + +指定ã•ã‚ŒãŸåå‰ã®ãƒ•ãƒªãƒ¼ã‚ºã•ã‚ŒãŸãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ã™ã¹ã¦ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ã‚¯ãƒªã‚¢ã—ã¾ã™ã€‚[ALTER TABLE table_name UNFREEZE WITH NAME](alter/partition.md#alter_unfreeze-partition) ã§å€‹ã€…ã®ãƒ‘ーツã®ã‚¢ãƒ³ãƒ•ãƒªãƒ¼ã‚ºã«ã¤ã„ã¦è©³ã—ãå­¦ã¹ã¾ã™ã€‚ + +``` sql +SYSTEM UNFREEZE WITH NAME +``` + +### WAIT LOADING PARTS + +テーブルã®ã™ã¹ã¦ã®éžåŒæœŸã§ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¦ã„るデータパーツ(å¤ã„データパーツ)ãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™ã€‚ + +``` sql +SYSTEM WAIT LOADING PARTS [ON CLUSTER cluster_name] [db.]merge_tree_family_table_name +``` + +## ReplicatedMergeTree テーブルã®ç®¡ç† + +ClickHouse 㯠[ReplicatedMergeTree](../../engines/table-engines/mergetree-family/replication.md#table_engines-replication) テーブルã®èƒŒæ™¯ãƒ¬ãƒ—リケーション関連プロセスを管ç†ã§ãã¾ã™ã€‚ + +### STOP FETCHES + +`ReplicatedMergeTree` ファミリ内ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹æŒ¿å…¥ã•ã‚ŒãŸãƒ‘ーツã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ フェッãƒã‚’åœæ­¢ã§ãる機能をæä¾›ã—ã¾ã™ã€‚ テーブルエンジンã«ã‹ã‹ã‚らãšã€ã¾ãŸãƒ†ãƒ¼ãƒ–ルやデータベースãŒå­˜åœ¨ã—ãªã„å ´åˆã§ã‚‚ `Ok.` を常ã«è¿”ã—ã¾ã™ã€‚ + +``` sql +SYSTEM STOP FETCHES [ON CLUSTER cluster_name] [[db.]replicated_merge_tree_family_table_name] +``` + +### START FETCHES + +`ReplicatedMergeTree` ファミリ内ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹æŒ¿å…¥ã•ã‚ŒãŸãƒ‘ーツã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ フェッãƒã‚’開始ã§ãる機能をæä¾›ã—ã¾ã™ã€‚ テーブルエンジンã«ã‹ã‹ã‚らãšã€ã¾ãŸãƒ†ãƒ¼ãƒ–ルやデータベースãŒå­˜åœ¨ã—ãªã„å ´åˆã§ã‚‚ `Ok.` を常ã«è¿”ã—ã¾ã™ã€‚ + +``` sql +SYSTEM START FETCHES [ON CLUSTER cluster_name] [[db.]replicated_merge_tree_family_table_name] +``` + +### STOP REPLICATED SENDS + +`ReplicatedMergeTree` ファミリ内ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹æ–°ã—ã挿入ã•ã‚ŒãŸãƒ‘ーツを他ã®ãƒ¬ãƒ—リカã«ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§é€ä¿¡ã™ã‚‹ã“ã¨ã‚’åœæ­¢ã§ãる機能をæä¾›ã—ã¾ã™ã€‚ + +``` sql +SYSTEM STOP REPLICATED SENDS [ON CLUSTER cluster_name] [[db.]replicated_merge_tree_family_table_name] +``` + +### START REPLICATED SENDS + +`ReplicatedMergeTree` ファミリ内ã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹æ–°ã—ã挿入ã•ã‚ŒãŸãƒ‘ーツを他ã®ãƒ¬ãƒ—リカã«ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§é€ä¿¡ã‚’開始ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +``` sql +SYSTEM START REPLICATED SENDS [ON CLUSTER cluster_name] [[db.]replicated_merge_tree_family_table_name] +``` + +### STOP REPLICATION QUEUES + +`ReplicatedMergeTree` ファミリã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—㦠ZooKeeper ã«æ ¼ç´ã•ã‚Œã¦ã„るレプリケーション キューã‹ã‚‰ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ フェッムタスク(マージã€ãƒ•ã‚§ãƒƒãƒã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã€ON CLUSTER å¥ã‚’å«ã‚€ DDL ステートメント)をåœæ­¢ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +``` sql +SYSTEM STOP REPLICATION QUEUES [ON CLUSTER cluster_name] [[db.]replicated_merge_tree_family_table_name] +``` + +### START REPLICATION QUEUES + +`ReplicatedMergeTree` ファミリã®ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—㦠ZooKeeper ã«æ ¼ç´ã•ã‚Œã¦ã„るレプリケーション キューã‹ã‚‰ã®ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ スタスク(マージã€ãƒ•ã‚§ãƒƒãƒã€ãƒŸãƒ¥ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã€ON CLUSTER å¥ã‚’å«ã‚€ DDL ステートメント)を開始ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +``` sql +SYSTEM START REPLICATION QUEUES [ON CLUSTER cluster_name] [[db.]replicated_merge_tree_family_table_name] +``` + +### STOP PULLING REPLICATION LOG + +`ReplicatedMergeTree` テーブルã®ãƒ¬ãƒ—リケーション キューã«æ–°ã—ã„エントリを追加ã™ã‚‹ã“ã¨ã‹ã‚‰ã€æ–°ã—ã„エントリã®ãƒ­ãƒ¼ãƒ‰ã‚’åœæ­¢ã—ã¾ã™ã€‚ + +``` sql +SYSTEM STOP PULLING REPLICATION LOG [ON CLUSTER cluster_name] [[db.]replicated_merge_tree_family_table_name] +``` + +### START PULLING REPLICATION LOG + +`SYSTEM STOP PULLING REPLICATION LOG` をキャンセルã—ã¾ã™ã€‚ + +``` sql +SYSTEM START PULLING REPLICATION LOG [ON CLUSTER cluster_name] [[db.]replicated_merge_tree_family_table_name] +``` + +### SYNC REPLICA + +`ReplicatedMergeTree` テーブルãŒã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å†…ã®ä»–ã®ãƒ¬ãƒ—リカã¨åŒæœŸã™ã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™ãŒã€`receive_timeout` 秒を超ãˆã¦ã¯ãªã‚Šã¾ã›ã‚“。 + +``` sql +SYSTEM SYNC REPLICA [ON CLUSTER cluster_name] [db.]replicated_merge_tree_family_table_name [STRICT | LIGHTWEIGHT [FROM 'srcReplica1'[, 'srcReplica2'[, ...]]] | PULL] +``` + +ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã™ã‚‹ã¨ã€`[db.]replicated_merge_tree_family_table_name` 㯠ZooKeeper ã®ä¸€èˆ¬çš„ãªãƒ¬ãƒ—リケートログã‹ã‚‰ã‚¨ãƒ³ãƒˆãƒªã‚’å–å¾—ã—ã¦ãã®ç‹¬è‡ªã®ãƒ¬ãƒ—リケーション キューã«è¿½åŠ ã—ã€ã‚¯ã‚¨ãƒªã¯å–å¾—ã•ã‚ŒãŸã‚³ãƒžãƒ³ãƒ‰ãŒã™ã¹ã¦å‡¦ç†ã•ã‚Œã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る修飾å­ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +- `STRICT` 修飾å­ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ã‚¯ã‚¨ãƒªã¯ãƒ¬ãƒ—リケーション キューãŒç©ºã«ãªã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™ã€‚`STRICT` ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ãƒ¬ãƒ—リケーション キューã«æ–°ã—ã„エントリãŒå¸¸ã«è¡¨ç¤ºã•ã‚Œã‚‹å ´åˆã€æˆåŠŸã—ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +- `LIGHTWEIGHT` 修飾å­ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ã‚¯ã‚¨ãƒªã¯ `GET_PART`, `ATTACH_PART`, `DROP_RANGE`, `REPLACE_RANGE` ãŠã‚ˆã³ `DROP_PART` エントリã®å‡¦ç†ã®ã¿ã‚’å¾…ã¡ã¾ã™ã€‚ã¾ãŸã€LIGHTWEIGHT 修飾å­ã¯ã‚ªãƒ—ション㮠FROM 'srcReplicas' å¥ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚'srcReplicas'ã¯ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚ŒãŸã‚½ãƒ¼ã‚¹ レプリカåã®ãƒªã‚¹ãƒˆã§ã™ã€‚ã“ã®æ‹¡å¼µã«ã‚ˆã‚Šã€æŒ‡å®šã•ã‚ŒãŸã‚½ãƒ¼ã‚¹ レプリカã‹ã‚‰ã®ãƒ¬ãƒ—リケーション タスクã®ã¿ã«ç„¦ç‚¹ã‚’当ã¦ã‚‹ã“ã¨ã§ã€ã‚ˆã‚Šå¯¾è±¡ã‚’絞ã£ãŸåŒæœŸã‚’実ç¾ã§ãã¾ã™ã€‚ +- `PULL` 修飾å­ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ã‚¯ã‚¨ãƒªã¯ ZooKeeper ã‹ã‚‰æ–°ã—ã„レプリケーション キュー エントリをå–å¾—ã—ã¾ã™ãŒã€ä½•ã‚‚処ç†å¾…ã¡ã—ã¾ã›ã‚“。 + +### SYNC DATABASE REPLICA + +指定ã•ã‚ŒãŸ[レプリケートデータベース](https://clickhouse.com/docs/ja/engines/database-engines/replicated) ãŒãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® DDL キューã‹ã‚‰ã™ã¹ã¦ã®ã‚¹ã‚­ãƒ¼ãƒžå¤‰æ›´ã‚’é©ç”¨ã™ã‚‹ã¾ã§å¾…æ©Ÿã—ã¾ã™ã€‚ + +**構文** +```sql +SYSTEM SYNC DATABASE REPLICA replicated_database_name; +``` + +### RESTART REPLICA + +`ReplicatedMergeTree` テーブル㮠ZooKeeper セッションã®çŠ¶æ…‹ã‚’å†åˆæœŸåŒ–ã—ã€Zookeeper をソースã¨ã—ãŸç¾åœ¨ã®çŠ¶æ…‹ã‚’比較ã—ã€å¿…è¦ã«å¿œã˜ã¦ Zookeeper キューã«ã‚¿ã‚¹ã‚¯ã‚’追加ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ +レプリケーション キュー㮠ZooKeeper データã«åŸºã¥ãåˆæœŸåŒ–ã¯ã€`ATTACH TABLE` ステートメントã®å ´åˆã¨åŒæ§˜ã«è¡Œã‚ã‚Œã¾ã™ã€‚短時間ã€ãƒ†ãƒ¼ãƒ–ルãŒã™ã¹ã¦ã®æ“作ã«å¯¾ã—ã¦åˆ©ç”¨ã§ããªããªã‚Šã¾ã™ã€‚ + +``` sql +SYSTEM RESTART REPLICA [ON CLUSTER cluster_name] [db.]replicated_merge_tree_family_table_name +``` + +### RESTORE REPLICA + +データ㌠[潜在的ã«] 存在ã™ã‚‹ãŒ Zookeeper メタデータãŒå¤±ã‚ã‚Œã¦ã„ã‚‹å ´åˆã«ã€ãƒ¬ãƒ—リカを復元ã—ã¾ã™ã€‚ + +読ã¿å–り専用 `ReplicatedMergeTree` テーブルã§ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +クエリã¯æ¬¡ã®å¾Œã«å®Ÿè¡Œã§ãã¾ã™ï¼š + +- ZooKeeper ルート `/` ã®æ失。 +- レプリカã®ãƒ‘ス `/replicas` ã®æ失。 +- 個々ã®ãƒ¬ãƒ—リカã®ãƒ‘ス `/replicas/replica_name/` ã®æ失。 + +レプリカã¯ãƒ­ãƒ¼ã‚«ãƒ«ã§è¦‹ã¤ã‹ã£ãŸãƒ‘ーツをアタッãƒã—ã€ãれらã®æƒ…報を Zookeeper ã«é€ä¿¡ã—ã¾ã™ã€‚ +メタデータæ失å‰ã«ãƒ¬ãƒ—リカã«å­˜åœ¨ã—ãŸãƒ‘ーツã¯ã€å¤ããªã„é™ã‚Šï¼ˆã—ãŸãŒã£ã¦ã€ãƒ¬ãƒ—リカã®å¾©å…ƒã¯ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯çµŒç”±ã§å†ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ã‚’æ„味ã—ãªã„)ã€ä»–ã®ãƒ¬ãƒ—リカã‹ã‚‰å†ãƒ•ã‚§ãƒƒãƒã•ã‚Œã¾ã›ã‚“。 + +:::note +ã™ã¹ã¦ã®çŠ¶æ…‹ã®ãƒ‘ーツ㯠`detached/` フォルダã«ç§»å‹•ã•ã‚Œã¾ã™ã€‚データæ失å‰ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã ã£ãŸãƒ‘ーツ(コミットã•ã‚ŒãŸï¼‰ã¯ã‚¢ã‚¿ãƒƒãƒã•ã‚Œã¾ã™ã€‚ +::: + +**構文** + +```sql +SYSTEM RESTORE REPLICA [db.]replicated_merge_tree_family_table_name [ON CLUSTER cluster_name] +``` + +代替構文: + +```sql +SYSTEM RESTORE REPLICA [ON CLUSTER cluster_name] [db.]replicated_merge_tree_family_table_name +``` + +**例** + +複数ã®ã‚µãƒ¼ãƒãƒ¼ã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã€‚ZooKeeper 内ã®ãƒ¬ãƒ—リカã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒå¤±ã‚ã‚ŒãŸå¾Œã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒãªã„ãŸã‚ã€ãƒ†ãƒ¼ãƒ–ルã¯èª­ã¿å–り専用ã¨ã—ã¦ã‚¢ã‚¿ãƒƒãƒã•ã‚Œã¾ã™ã€‚最後ã®ã‚¯ã‚¨ãƒªã¯ã™ã¹ã¦ã®ãƒ¬ãƒ—リカã§å®Ÿè¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +CREATE TABLE test(n UInt32) +ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/', '{replica}') +ORDER BY n PARTITION BY n % 10; + +INSERT INTO test SELECT * FROM numbers(1000); + +-- zookeeper_delete_path("/clickhouse/tables/test", recursive=True) <- root loss. + +SYSTEM RESTART REPLICA test; +SYSTEM RESTORE REPLICA test; +``` + +別ã®æ–¹æ³•ï¼š + +```sql +SYSTEM RESTORE REPLICA test ON CLUSTER cluster; +``` + +### RESTART REPLICAS + +ã™ã¹ã¦ã® `ReplicatedMergeTree` テーブル㮠ZooKeeper セッションã®çŠ¶æ…‹ã‚’å†åˆæœŸåŒ–ã—ã€Zookeeper をソースã¨ã—ãŸç¾åœ¨ã®çŠ¶æ…‹ã¨æ¯”較ã—ã¦å¿…è¦ã«å¿œã˜ã¦ Zookeeper キューã«ã‚¿ã‚¹ã‚¯ã‚’追加ã™ã‚‹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +### DROP FILESYSTEM CACHE + +ファイルシステム キャッシュを削除ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +```sql +SYSTEM DROP FILESYSTEM CACHE [ON CLUSTER cluster_name] +``` + +### SYNC FILE CACHE + +:::note +ãã‚Œã¯éžå¸¸ã«é‡ã„ã‚‚ã®ã§ã‚ã‚Šã€èª¤ç”¨ã®å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ +::: + +sync システムコールを実行ã—ã¾ã™ã€‚ + +```sql +SYSTEM SYNC FILE CACHE [ON CLUSTER cluster_name] +``` + +### UNLOAD PRIMARY KEY + +指定ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¾ãŸã¯ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã®ä¸»ã‚­ãƒ¼ã‚’アンロードã—ã¾ã™ã€‚ + +```sql +SYSTEM UNLOAD PRIMARY KEY [db.]name +``` + +```sql +SYSTEM UNLOAD PRIMARY KEY +``` + +## リフレッシュå¯èƒ½ãªãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®ç®¡ç† {#refreshable-materialized-views} + +[リフレッシュå¯èƒ½ãªãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ュー](../../sql-reference/statements/create/view.md#refreshable-materialized-view) ã«ã‚ˆã£ã¦å®Ÿè¡Œã•ã‚Œã‚‹ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã‚¿ã‚¹ã‚¯ã‚’制御ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã€‚ + +ãれらを使用ã™ã‚‹éš›ã¯ [`system.view_refreshes`](../../operations/system-tables/view_refreshes.md) を監視ã—ã¦ãã ã•ã„。 + +### REFRESH VIEW + +指定ã•ã‚ŒãŸãƒ“ューã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«å¤–ã®å³æ™‚更新をトリガーã—ã¾ã™ã€‚ + +```sql +SYSTEM REFRESH VIEW [db.]name +``` + +### REFRESH VIEW + +ç¾åœ¨å®Ÿè¡Œä¸­ã®æ›´æ–°ãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ã¡ã¾ã™ã€‚æ›´æ–°ãŒå¤±æ•—ã—ãŸå ´åˆã¯ã€ä¾‹å¤–をスローã—ã¾ã™ã€‚æ›´æ–°ãŒå®Ÿè¡Œä¸­ã§ãªã„å ´åˆã¯ç›´ã¡ã«å®Œäº†ã—ã€å‰å›žã®æ›´æ–°ãŒå¤±æ•—ã—ãŸå ´åˆã¯ä¾‹å¤–をスローã—ã¾ã™ã€‚ + +### STOP VIEW, STOP VIEWS + +指定ã•ã‚ŒãŸãƒ“ューã¾ãŸã¯ã™ã¹ã¦ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªãƒ“ューã®å®šæœŸçš„ãªæ›´æ–°ã‚’無効ã«ã—ã¾ã™ã€‚æ›´æ–°ãŒé€²è¡Œä¸­ã®å ´åˆã¯ã€ãれもキャンセルã—ã¾ã™ã€‚ + +```sql +SYSTEM STOP VIEW [db.]name +``` +```sql +SYSTEM STOP VIEWS +``` + +### START VIEW, START VIEWS + +指定ã•ã‚ŒãŸãƒ“ューã¾ãŸã¯ã™ã¹ã¦ã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªãƒ“ューã®å®šæœŸçš„ãªæ›´æ–°ã‚’有効ã«ã—ã¾ã™ã€‚å³æ™‚æ›´æ–°ã¯ãƒˆãƒªã‚¬ãƒ¼ã•ã‚Œã¾ã›ã‚“。 + +```sql +SYSTEM START VIEW [db.]name +``` +```sql +SYSTEM START VIEWS +``` + +### CANCEL VIEW + +指定ã•ã‚ŒãŸãƒ“ューã®æ›´æ–°ãŒé€²è¡Œä¸­ã®å ´åˆã€ãれを中断ã—ã¦ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ä½•ã‚‚ã—ã¾ã›ã‚“。 + +```sql +SYSTEM CANCEL VIEW [db.]name +``` + +### SYSTEM WAIT VIEW + +実行中ã®æ›´æ–°ãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ã¡ã¾ã™ã€‚æ›´æ–°ãŒå®Ÿè¡Œä¸­ã§ãªã„å ´åˆã¯ç›´ã¡ã«æˆ»ã‚Šã¾ã™ã€‚最新ã®æ›´æ–°è©¦è¡ŒãŒå¤±æ•—ã—ãŸå ´åˆã¯ã€ã‚¨ãƒ©ãƒ¼ã‚’報告ã—ã¾ã™ã€‚ + +æ–°ã—ã„リフレッシュå¯èƒ½ãªãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ュー(EMPTYキーワードãªã—)を作æˆã—ãŸç›´å¾Œã«ä½¿ç”¨ã—ã¦ã€åˆå›žã®æ›´æ–°ãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +SYSTEM WAIT VIEW [db.]name +``` + diff --git a/docs/ja/sql-reference/statements/truncate.md b/docs/ja/sql-reference/statements/truncate.md new file mode 100644 index 00000000000..ae0b458b331 --- /dev/null +++ b/docs/ja/sql-reference/statements/truncate.md @@ -0,0 +1,38 @@ +--- +slug: /ja/sql-reference/statements/truncate +sidebar_position: 52 +sidebar_label: TRUNCATE +--- + +# TRUNCATE ステートメント + +## TRUNCATE TABLE +``` sql +TRUNCATE TABLE [IF EXISTS] [db.]name [ON CLUSTER cluster] +``` + +テーブルã‹ã‚‰ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚`IF EXISTS` ã®å¥ã‚’çœç•¥ã—ãŸå ´åˆã€ãƒ†ãƒ¼ãƒ–ルãŒå­˜åœ¨ã—ãªã„ã¨ã‚¯ã‚¨ãƒªã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ + +`TRUNCATE` クエリã¯ã€[View](../../engines/table-engines/special/view.md)ã€[File](../../engines/table-engines/special/file.md)ã€[URL](../../engines/table-engines/special/url.md)ã€[Buffer](../../engines/table-engines/special/buffer.md)ã€[Null](../../engines/table-engines/special/null.md) テーブルエンジンã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +レプリカã§ã®å®Ÿè¡Œå¾…機をセットアップã™ã‚‹ã«ã¯ã€[alter_sync](../../operations/settings/settings.md#alter-sync) 設定を使用ã§ãã¾ã™ã€‚ + +éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªãƒ¬ãƒ—リカ㌠`TRUNCATE` クエリを実行ã™ã‚‹ã®ã‚’å¾…ã¤æ™‚間(秒å˜ä½ï¼‰ã‚’指定ã™ã‚‹ã«ã¯ã€[replication_wait_for_inactive_replica_timeout](../../operations/settings/settings.md#replication-wait-for-inactive-replica-timeout) 設定を使用ã§ãã¾ã™ã€‚ + +:::note +`alter_sync` ㌠`2` ã«è¨­å®šã•ã‚Œã€`replication_wait_for_inactive_replica_timeout` 設定ã§æŒ‡å®šã•ã‚ŒãŸæ™‚間を超ãˆã¦ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ãªã„レプリカãŒã‚ã‚‹å ´åˆã€`UNFINISHED` 例外ãŒã‚¹ãƒ­ãƒ¼ã•ã‚Œã¾ã™ã€‚ +::: + +## TRUNCATE ALL TABLES +``` sql +TRUNCATE ALL TABLES FROM [IF EXISTS] db [ON CLUSTER cluster] +``` + +データベース内ã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã™ã€‚ + +## TRUNCATE DATABASE +``` sql +TRUNCATE DATABASE [IF EXISTS] db [ON CLUSTER cluster] +``` + +データベースã‹ã‚‰ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルを削除ã—ã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãã®ã‚‚ã®ã¯ä¿æŒã—ã¾ã™ã€‚`IF EXISTS` ã®å¥ã‚’çœç•¥ã—ãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒå­˜åœ¨ã—ãªã„ã¨ã‚¯ã‚¨ãƒªã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/undrop.md b/docs/ja/sql-reference/statements/undrop.md new file mode 100644 index 00000000000..acbac7b28eb --- /dev/null +++ b/docs/ja/sql-reference/statements/undrop.md @@ -0,0 +1,84 @@ +--- +slug: /ja/sql-reference/statements/undrop +sidebar_label: UNDROP +--- + +# UNDROP TABLE + +テーブルã®å‰Šé™¤ã‚’å–り消ã—ã¾ã™ã€‚ + +ClickHouseãƒãƒ¼ã‚¸ãƒ§ãƒ³23.3ã‹ã‚‰ã€DROP TABLE文を発行ã—ã¦ã‹ã‚‰`database_atomic_delay_before_drop_table_sec`(デフォルトã§8分)以内ã«ã€Atomicデータベースã§ãƒ†ãƒ¼ãƒ–ルをUNDROPã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚削除ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯`system.dropped_tables`ã¨ã„ã†ã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルã«ä¸€è¦§è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ + +`TO`å¥ãŒé–¢é€£ä»˜ã‘られã¦ã„ãªã„Materialized ViewãŒå‰Šé™¤ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã«é–¢é€£ã—ã¦ã„ã‚‹å ´åˆã€ãã®ãƒ“ューã®å†…部テーブルもUNDROPã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +:::tip +[DROP TABLE](/docs/ja/sql-reference/statements/drop.md)ã‚‚å‚ç…§ã—ã¦ãã ã•ã„ +::: + +構文: + +``` sql +UNDROP TABLE [db.]name [UUID ''] [ON CLUSTER cluster] +``` + +**例** + +```sql +CREATE TABLE tab +( + `id` UInt8 +) +ENGINE = MergeTree +ORDER BY id; + +DROP TABLE tab; + +SELECT * +FROM system.dropped_tables +FORMAT Vertical; +``` + +```response +Row 1: +────── +index: 0 +database: default +table: tab +uuid: aa696a1a-1d70-4e60-a841-4c80827706cc +engine: MergeTree +metadata_dropped_path: /var/lib/clickhouse/metadata_dropped/default.tab.aa696a1a-1d70-4e60-a841-4c80827706cc.sql +table_dropped_time: 2023-04-05 14:12:12 + +1 row in set. Elapsed: 0.001 sec. +``` + +```sql +UNDROP TABLE tab; + +SELECT * +FROM system.dropped_tables +FORMAT Vertical; +``` + +```response +Ok. + +0 rows in set. Elapsed: 0.001 sec. +``` + +```sql +DESCRIBE TABLE tab +FORMAT Vertical; +``` + +```response +Row 1: +────── +name: id +type: UInt8 +default_type: +default_expression: +comment: +codec_expression: +ttl_expression: +``` diff --git a/docs/ja/sql-reference/statements/use.md b/docs/ja/sql-reference/statements/use.md new file mode 100644 index 00000000000..056da829811 --- /dev/null +++ b/docs/ja/sql-reference/statements/use.md @@ -0,0 +1,17 @@ +--- +slug: /ja/sql-reference/statements/use +sidebar_position: 53 +sidebar_label: USE +--- + +# USE ステートメント + +``` sql +USE db +``` + +ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ä½¿ç”¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã€ã‚¯ã‚¨ãƒªå†…ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒãƒ†ãƒ¼ãƒ–ルåã®å‰ã«ãƒ‰ãƒƒãƒˆã§æ˜Žç¤ºçš„ã«å®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã«ã€ãƒ†ãƒ¼ãƒ–ルを検索ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +HTTPプロトコルを使用ã—ã¦ã„ã‚‹å ´åˆã€ã“ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。セッションã®æ¦‚念ãŒãªã„ãŸã‚ã§ã™ã€‚ diff --git a/docs/ja/sql-reference/statements/watch.md b/docs/ja/sql-reference/statements/watch.md new file mode 100644 index 00000000000..20dc84ef0c7 --- /dev/null +++ b/docs/ja/sql-reference/statements/watch.md @@ -0,0 +1,110 @@ +--- +slug: /ja/sql-reference/statements/watch +sidebar_position: 53 +sidebar_label: WATCH +--- + +# WATCH ステートメント (試験的) + +:::note +ã“ã‚Œã¯ã€å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§å¾Œæ–¹äº’æ›æ€§ã®ãªã„変更ãŒè¡Œã‚れるå¯èƒ½æ€§ã®ã‚る試験的ãªæ©Ÿèƒ½ã§ã™ã€‚ライブビュー㨠`WATCH` クエリを有効ã«ã™ã‚‹ã«ã¯ã€`set allow_experimental_live_view = 1` を使用ã—ã¦ãã ã•ã„。 +::: + +``` sql +WATCH [db.]live_view +[EVENTS] +[LIMIT n] +[FORMAT format] +``` + +`WATCH` クエリã¯ã€[ライブビュー](./create/view.md#live-view)テーブルã‹ã‚‰ç¶™ç¶šçš„ãªãƒ‡ãƒ¼ã‚¿å–å¾—ã‚’è¡Œã„ã¾ã™ã€‚`LIMIT` å¥ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€[ライブビュー](./create/view.md#live-view)ã‹ã‚‰ã‚¯ã‚¨ãƒªçµæžœã®ç„¡é™ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’æä¾›ã—ã¾ã™ã€‚ + +```sql +WATCH [db.]live_view [EVENTS] [LIMIT n] [FORMAT format] +``` + +## 仮想カラム + +クエリçµæžœå†…ã®ä»®æƒ³ã‚«ãƒ©ãƒ  `_version` ã¯ã€ç¾åœ¨ã®çµæžœãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’示ã—ã¾ã™ã€‚ + +**例:** + +```sql +CREATE LIVE VIEW lv WITH REFRESH 5 AS SELECT now(); +WATCH lv; +``` + +```bash +┌───────────────now()─┬─_version─┠+│ 2021-02-21 09:17:21 │ 1 │ +└─────────────────────┴──────────┘ +┌───────────────now()─┬─_version─┠+│ 2021-02-21 09:17:26 │ 2 │ +└─────────────────────┴──────────┘ +┌───────────────now()─┬─_version─┠+│ 2021-02-21 09:17:31 │ 3 │ +└─────────────────────┴──────────┘ +... +``` + +デフォルトã§ã¯ã€è¦æ±‚ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«è¿”ã•ã‚Œã¾ã™ãŒã€[INSERT INTO](../../sql-reference/statements/insert-into.md) ã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã§ã€ç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã«è»¢é€ã§ãã¾ã™ã€‚ + +**例:** + +```sql +INSERT INTO [db.]table WATCH [db.]live_view ... +``` + +## EVENTS å¥ + +`EVENTS` å¥ã‚’使用ã™ã‚‹ã¨ã€`WATCH` クエリã®ç°¡ç•¥ç‰ˆã‚’å–å¾—ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ã‚¯ã‚¨ãƒªçµæžœã®ä»£ã‚ã‚Šã«æœ€æ–°ã®ã‚¯ã‚¨ãƒªçµæžœãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã¿ãŒè¿”ã•ã‚Œã¾ã™ã€‚ + +```sql +WATCH [db.]live_view EVENTS; +``` + +**例:** + +```sql +CREATE LIVE VIEW lv WITH REFRESH 5 AS SELECT now(); +WATCH lv EVENTS; +``` + +```bash +┌─version─┠+│ 1 │ +└─────────┘ +┌─version─┠+│ 2 │ +└─────────┘ +... +``` + +## LIMIT å¥ + +`LIMIT n` å¥ã¯ã€`WATCH` クエリãŒçµ‚了ã™ã‚‹å‰ã«å¾…æ©Ÿã™ã‚‹æ›´æ–°ã®æ•°ã‚’指定ã—ã¾ã™ã€‚デフォルトã§ã¯æ›´æ–°ã®æ•°ã«åˆ¶é™ã¯ãªãã€ã—ãŸãŒã£ã¦ã‚¯ã‚¨ãƒªã¯çµ‚了ã—ã¾ã›ã‚“。値㌠`0` ã®å ´åˆã€`WATCH` クエリã¯æ–°ã—ã„クエリçµæžœã‚’å¾…æ©Ÿã—ãªã„ã“ã¨ã‚’示ã—ã€ã‚¯ã‚¨ãƒªçµæžœãŒè©•ä¾¡ã•ã‚Œæ¬¡ç¬¬ã™ãã«è¿”ã•ã‚Œã¾ã™ã€‚ + +```sql +WATCH [db.]live_view LIMIT 1; +``` + +**例:** + +```sql +CREATE LIVE VIEW lv WITH REFRESH 5 AS SELECT now(); +WATCH lv EVENTS LIMIT 1; +``` + +```bash +┌─version─┠+│ 1 │ +└─────────┘ +``` + +## FORMAT å¥ + +`FORMAT` å¥ã¯ã€[SELECT](../../sql-reference/statements/select/format.md#format-clause) ã¨åŒã˜æ–¹æ³•ã§æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +:::note +[HTTP インターフェース](../../interfaces/formats.md#jsoneachrowwithprogress)を介ã—㦠[ライブビュー](./create/view.md#live-view) テーブルを監視ã™ã‚‹éš›ã¯ã€[JSONEachRowWithProgress](../../interfaces/formats.md#jsoneachrowwithprogress) フォーマットを使用ã™ã‚‹ã¹ãã§ã™ã€‚進行状æ³ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ã€ã‚¯ã‚¨ãƒªçµæžœãŒå¤‰åŒ–ã™ã‚‹ã¾ã§é•·æ™‚間維æŒã•ã‚Œã‚‹ HTTP 接続をä¿ã¤ãŸã‚ã«å‡ºåŠ›ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚進行状æ³ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®é–“éš”ã¯ã€[live_view_heartbeat_interval](./create/view.md#live-view-settings) 設定を使用ã—ã¦åˆ¶å¾¡ã•ã‚Œã¾ã™ã€‚ +::: diff --git a/docs/ja/sql-reference/syntax.md b/docs/ja/sql-reference/syntax.md new file mode 100644 index 00000000000..9e716ac897c --- /dev/null +++ b/docs/ja/sql-reference/syntax.md @@ -0,0 +1,269 @@ +--- + +slug: /ja/sql-reference/syntax +sidebar_position: 2 +sidebar_label: 文法 + +--- + +# 文法 + +システムã«ã¯äºŒç¨®é¡žã®ãƒ‘ーサーãŒã‚ã‚Šã¾ã™ï¼šå®Œå…¨ãªSQLパーサー(å†å¸°ä¸‹é™ãƒ‘ーサー)ã¨ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãƒ‘ーサー(高速ストリームパーサー)ã§ã™ã€‚`INSERT`クエリを除ãã™ã¹ã¦ã®å ´åˆã§ã€å®Œå…¨ãªSQLパーサーã®ã¿ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚`INSERT`クエリã¯ä¸¡æ–¹ã®ãƒ‘ーサーを使用ã—ã¾ã™ï¼š + +``` sql +INSERT INTO t VALUES (1, 'Hello, world'), (2, 'abc'), (3, 'def') +``` + +`INSERT INTO t VALUES`フラグメントã¯å®Œå…¨ãªãƒ‘ーサーã«ã‚ˆã£ã¦è§£æžã•ã‚Œã€ãƒ‡ãƒ¼ã‚¿`(1, 'Hello, world'), (2, 'abc'), (3, 'def')`ã¯é«˜é€Ÿã‚¹ãƒˆãƒªãƒ¼ãƒ ãƒ‘ーサーã«ã‚ˆã£ã¦è§£æžã•ã‚Œã¾ã™ã€‚[input_format_values_interpret_expressions](../operations/settings/settings-formats.md#input_format_values_interpret_expressions)設定を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦å®Œå…¨ãªãƒ‘ーサーをオンã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚`input_format_values_interpret_expressions = 1`ã®å ´åˆã€ClickHouseã¯æœ€åˆã«é«˜é€Ÿã‚¹ãƒˆãƒªãƒ¼ãƒ ãƒ‘ーサーã§å€¤ã‚’解æžã—よã†ã¨ã—ã¾ã™ã€‚失敗ã—ãŸå ´åˆã€ClickHouseã¯ãƒ‡ãƒ¼ã‚¿ã‚’SQL [å¼](#expressions)ã®ã‚ˆã†ã«æ‰±ã„ã€å®Œå…¨ãªãƒ‘ーサーを使用ã—ã¦è§£æžã—よã†ã¨ã—ã¾ã™ã€‚ + +データã¯ä»»æ„ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚クエリãŒå—ä¿¡ã•ã‚Œã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã¯RAM内ã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®[最大クエリサイズ](../operations/settings/settings.md#max_query_size)ãƒã‚¤ãƒˆï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯1 MB)を超ãˆãªã„よã†ã«è¨ˆç®—ã—ã€æ®‹ã‚Šã¯ã‚¹ãƒˆãƒªãƒ¼ãƒ è§£æžã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å¤§é‡ã®`INSERT`クエリã«ã‚ˆã‚‹å•é¡Œã‚’回é¿ã§ãã¾ã™ã€‚ + +`INSERT`クエリã§`Values`フォーマットを使用ã™ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãŒ`SELECT`クエリã®å¼ã¨åŒã˜ã‚ˆã†ã«è§£æžã•ã‚Œã‚‹ã‚ˆã†ã«è¦‹ãˆã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ãŒã€ã“ã‚Œã¯çœŸå®Ÿã§ã¯ã‚ã‚Šã¾ã›ã‚“。`Values`フォーマットã¯ã¯ã‚‹ã‹ã«åˆ¶é™ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“ã®è¨˜äº‹ã®æ®‹ã‚Šã®éƒ¨åˆ†ã§ã¯å®Œå…¨ãªãƒ‘ーサーをå–り上ã’ã¾ã™ã€‚フォーマットパーサーã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[フォーマット](../interfaces/formats.md)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +## スペース + +構文構造ã®é–“(クエリã®é–‹å§‹ã¨çµ‚了をå«ã‚€ï¼‰ã«ã¯ã€ä»»æ„ã®æ•°ã®ã‚¹ãƒšãƒ¼ã‚¹è¨˜å·ãŒå…¥ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚スペース記å·ã«ã¯ã€ã‚¹ãƒšãƒ¼ã‚¹ã€ã‚¿ãƒ–ã€æ”¹è¡Œã€ã‚­ãƒ£ãƒªãƒƒã‚¸ãƒªã‚¿ãƒ¼ãƒ³ã€ãŠã‚ˆã³ãƒ•ã‚©ãƒ¼ãƒ ãƒ•ã‚£ãƒ¼ãƒ‰ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +## コメント + +ClickHouseã¯SQLスタイルãŠã‚ˆã³Cスタイルã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ï¼š + +- SQLスタイルã®ã‚³ãƒ¡ãƒ³ãƒˆã¯`--`ã€`#!`ã¾ãŸã¯`# `ã§å§‹ã¾ã‚Šã€è¡Œã®æœ€å¾Œã¾ã§ç¶šãã¾ã™ã€‚`--`ã¨`#!`ã®å¾Œã®ã‚¹ãƒšãƒ¼ã‚¹ã¯çœç•¥å¯èƒ½ã§ã™ã€‚ +- Cスタイルã®ã‚³ãƒ¡ãƒ³ãƒˆã¯`/*`ã‹ã‚‰`*/`ã¾ã§ã§ã€è¤‡æ•°è¡Œã«ã‚ãŸã‚‹ã“ã¨ãŒã§ãã€ã‚¹ãƒšãƒ¼ã‚¹ã‚‚å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 + +## キーワード + +キーワードã¯ä»¥ä¸‹ã®å ´åˆã«å¤§æ–‡å­—å°æ–‡å­—を区別ã—ã¾ã›ã‚“: + +- SQL標準ã«è©²å½“ã™ã‚‹å ´åˆã€‚ãŸã¨ãˆã°ã€`SELECT`ã€`select`ã€ãŠã‚ˆã³`SeLeCt`ã¯ã™ã¹ã¦æœ‰åŠ¹ã§ã™ã€‚ +- 一部ã®äººæ°—DBMS(MySQLã¾ãŸã¯Postgres)ã§ã®å®Ÿè£…ã«è©²å½“ã™ã‚‹å ´åˆã€‚ãŸã¨ãˆã°ã€`DateTime`ã¯`datetime`ã¨åŒã˜ã§ã™ã€‚ + +データ型åãŒå¤§æ–‡å­—å°æ–‡å­—を区別ã™ã‚‹ã‹ã©ã†ã‹ã¯ã€[system.data_type_families](../operations/system-tables/data_type_families.md#system_tables-data_type_families)テーブルã§ç¢ºèªã§ãã¾ã™ã€‚ + +標準SQLã¨å¯¾ç…§çš„ã«ã€ä»–ã®ã™ã¹ã¦ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ï¼ˆé–¢æ•°åã‚’å«ã‚€ï¼‰ã¯**大文字å°æ–‡å­—を区別**ã—ã¾ã™ã€‚ + +キーワードã¯äºˆç´„ã•ã‚Œã¦ã„ã¾ã›ã‚“ï¼›ãれらã¯å¯¾å¿œã™ã‚‹ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã®ã¿ãã®ã‚ˆã†ã«æ‰±ã‚ã‚Œã¾ã™ã€‚キーワードã¨åŒã˜åå‰ã®[識別å­](#identifiers)を使用ã™ã‚‹å ´åˆã€ãれらを二é‡å¼•ç”¨ç¬¦ã¾ãŸã¯ãƒãƒƒã‚¯ãƒ†ã‚£ãƒƒã‚¯ã§å›²ã¿ã¾ã™ã€‚ãŸã¨ãˆã°ã€ã‚¯ã‚¨ãƒª`SELECT "FROM" FROM table_name`ã¯ã€`table_name`テーブルã«`"FROM"`ã¨ã„ã†åå‰ã®ã‚«ãƒ©ãƒ ãŒã‚ã‚‹å ´åˆã«æœ‰åŠ¹ã§ã™ã€‚ + +## è­˜åˆ¥å­ + +識別å­ã¨ã¯ï¼š + +- クラスターã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ‘ーティションã€ã‚«ãƒ©ãƒ å。 +- 関数。 +- データ型。 +- [å¼ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹](#expression-aliases)。 + +識別å­ã¯ã‚¯ã‚©ãƒ¼ãƒˆä»˜ãã¾ãŸã¯éžã‚¯ã‚©ãƒ¼ãƒˆä»˜ããŒã‚ã‚Šãˆã¾ã™ã€‚後者ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +éžã‚¯ã‚©ãƒ¼ãƒˆä»˜ãã®è­˜åˆ¥å­ã¯ã€æ­£è¦è¡¨ç¾`^[a-zA-Z_][0-9a-zA-Z_]*$`ã¨ä¸€è‡´ã—ã€[キーワード](#keywords)ã¨ç­‰ã—ããªã„å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例:`x`ã€`_1`ã€`X_y__Z123_`。 + +キーワードã¨åŒã˜è­˜åˆ¥å­ã‚’使用ã—ãŸã„å ´åˆã‚„識別å­ã«ä»–ã®è¨˜å·ã‚’使用ã—ãŸã„å ´åˆã€äºŒé‡å¼•ç”¨ç¬¦ã¾ãŸã¯ãƒãƒƒã‚¯ãƒ†ã‚£ãƒƒã‚¯ã‚’使用ã—ã¦ã‚¯ã‚©ãƒ¼ãƒˆã—ã¦ãã ã•ã„。例: `"id"`, `` `id` ``。 + +## リテラル + +リテラルã«ã¯ã€æ•°å€¤ãƒªãƒ†ãƒ©ãƒ«ã€æ–‡å­—列リテラルã€è¤‡åˆãƒªãƒ†ãƒ©ãƒ«ã€`NULL`リテラルãŒã‚ã‚Šã¾ã™ã€‚ + +### 数値 + +数値リテラルã¯ä»¥ä¸‹ã®ã‚ˆã†ã«è§£æžã•ã‚Œã¾ã™ï¼š + +- 最åˆã«ã€[strtoull](https://en.cppreference.com/w/cpp/string/byte/strtoul)関数を用ã„ã¦64ビット符å·ä»˜ãæ•´æ•°ã¨ã—ã¦è§£æžã•ã‚Œã¾ã™ã€‚ +- 失敗ã—ãŸå ´åˆã€[strtoll](https://en.cppreference.com/w/cpp/string/byte/strtol)関数を用ã„ã¦64ビット符å·ãªã—æ•´æ•°ã¨ã—ã¦è§£æžã•ã‚Œã¾ã™ã€‚ +- ã“ã‚Œã§ã‚‚失敗ã—ãŸå ´åˆã€[strtod](https://en.cppreference.com/w/cpp/string/byte/strtof)関数を用ã„ã¦æµ®å‹•å°æ•°ç‚¹æ•°ã¨ã—ã¦è§£æžã•ã‚Œã¾ã™ã€‚ +- ãれ以外ã®å ´åˆã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ + +リテラル値ã¯ã€å€¤ãŒåŽã¾ã‚‹æœ€å°ã®åž‹ã«ã‚­ãƒ£ã‚¹ãƒˆã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€1ã¯`UInt8`ã¨ã—ã¦è§£æžã•ã‚Œã¾ã™ãŒã€256ã¯`UInt16`ã¨ã—ã¦è§£æžã•ã‚Œã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯[データ型](../sql-reference/data-types/index.md)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。数値リテラル内ã®ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢`_`ã¯ç„¡è¦–ã•ã‚Œã€å¯èª­æ€§ã‚’å‘上ã•ã›ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•ã‚Œã‚‹æ•°å€¤ãƒªãƒ†ãƒ©ãƒ«ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +**æ•´æ•°** – `1`, `10_000_000`, `18446744073709551615`, `01` +**å°æ•°** – `0.1` +**指数表記** - `1e100`, `-1e-100` +**浮動å°æ•°ç‚¹æ•°** – `123.456`, `inf`, `nan` + +**16進数** – `0xc0fe` +**SQL標準互æ›16進文字列** – `x'c0fe'` + +**2進数** – `0b1101` +**SQL標準互æ›2進文字列** – `b'1101'` + +解釈ã®èª¤ã‚Šã‚’é¿ã‘ã‚‹ãŸã‚ã€8進数リテラルã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +### 文字列 + +文字列リテラルã¯ã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚©ãƒ¼ãƒˆã§å›²ã‚€å¿…è¦ãŒã‚ã‚Šã€ãƒ€ãƒ–ルクォートã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。エスケープã¯ã€æ¬¡ã®ã„ãšã‚Œã‹ã§å‹•ä½œã—ã¾ã™ï¼š + +- シングルクォートをå‰ç½®ã™ã‚‹ã“ã¨ã§ã€ã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚©ãƒ¼ãƒˆæ–‡å­—`'`(ãŠã‚ˆã³ã“ã®æ–‡å­—ã®ã¿ï¼‰ãŒ`''`ã¨ã—ã¦ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•ã‚Œã¾ã™ã€‚ +- ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’å‰ç½®ã™ã‚‹ã“ã¨ã§ã€æ¬¡ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ï¼š`\\`, `\'`, `\b`, `\f`, `\r`, `\n`, `\t`, `\0`, `\a`, `\v`, `\xHH`。リストã•ã‚Œã¦ã„ãªã„文字ã®å‰ã«ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒã‚ã‚‹å ´åˆã€ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã¯ãã®ç‰¹åˆ¥ãªæ„味を失ã„ã€æ–‡å­—通りã«è§£é‡ˆã•ã‚Œã¾ã™ã€‚ + +文字列リテラルã§ã¯ã€å°‘ãªãã¨ã‚‚`'`ã¨`\`をエスケープコード`\'`(ã¾ãŸã¯ï¼š`''`)ã¨`\\`ã§ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +### è¤‡åˆ + +é…列ã¯è§’括弧を用ã„ã¦ä½œæˆã•ã‚Œã¾ã™ï¼š`[1, 2, 3]`。タプルã¯ä¸¸æ‹¬å¼§ã‚’用ã„ã¦ä½œæˆã•ã‚Œã¾ã™ï¼š`(1, 'Hello, world!', 2)`。技術的ã«ã¯ã“れらã¯ãƒªãƒ†ãƒ©ãƒ«ã§ã¯ãªãã€ãã‚Œãžã‚Œé…列生æˆæ¼”ç®—å­ã¨ã‚¿ãƒ—ル生æˆæ¼”ç®—å­ã‚’使用ã—ãŸå¼ã§ã™ã€‚é…列ã¯å°‘ãªãã¨ã‚‚1ã¤ã®é …目をå«ã‚€å¿…è¦ãŒã‚ã‚Šã€ã‚¿ãƒ—ルã¯å°‘ãªãã¨ã‚‚2ã¤ã®é …目をæŒã¤å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚タプルã¯`SELECT`クエリã®`IN`å¥ã§å‡ºç¾ã™ã‚‹ç‰¹åˆ¥ãªã‚±ãƒ¼ã‚¹ã§ã™ã€‚クエリã®çµæžœã«ã¯ã‚¿ãƒ—ルをå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ã‚¿ãƒ—ルã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ä¿å­˜ã§ãã¾ã›ã‚“([Memory](../engines/table-engines/special/memory.md)エンジンを使用ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルを除ã)。 + +### NULL + +値ãŒæ¬ è½ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ + +テーブルフィールドã«`NULL`ã‚’ä¿å­˜ã™ã‚‹ã«ã¯ã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒ[Nullable](../sql-reference/data-types/nullable.md)åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +データフォーマット(入力ã¾ãŸã¯å‡ºåŠ›ï¼‰ã«å¿œã˜ã¦ã€`NULL`ã«ã¯ç•°ãªã‚‹è¡¨ç¾ãŒã‚ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[データフォーマット](../interfaces/formats.md#formats)ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +`NULL`ã®å‡¦ç†ã«ã¯å¤šãã®ãƒ‹ãƒ¥ã‚¢ãƒ³ã‚¹ãŒã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€æ¯”較æ“作ã®å¼•æ•°ã®å°‘ãªãã¨ã‚‚1ã¤ãŒ`NULL`ã®å ´åˆã€ã“ã®æ“作ã®çµæžœã‚‚`NULL`ã§ã™ã€‚乗算や加算ãªã©ä»–ã®æ“作ã«ã¤ã„ã¦ã‚‚åŒæ§˜ã§ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€å„æ“作ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +クエリ内ã§ã€[IS NULL](../sql-reference/operators/index.md#is-null)ãŠã‚ˆã³[IS NOT NULL](../sql-reference/operators/index.md#is-not-null)演算å­ãŠã‚ˆã³é–¢é€£ã™ã‚‹é–¢æ•°`isNull`ãŠã‚ˆã³`isNotNull`を使用ã—ã¦`NULL`を確èªã§ãã¾ã™ã€‚ + +### ヒアドキュメント + +[ヒアドキュメント](https://en.wikipedia.org/wiki/Here_document)ã¯ã€å…ƒã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’ä¿æŒã—ãªãŒã‚‰æ–‡å­—列(多ãã®å ´åˆè¤‡æ•°è¡Œï¼‰ã‚’定義ã™ã‚‹æ–¹æ³•ã§ã™ã€‚ヒアドキュメントã¯ã‚«ã‚¹ã‚¿ãƒ æ–‡å­—列リテラルã¨ã—ã¦å®šç¾©ã•ã‚Œã€ãŸã¨ãˆã°`$heredoc$`ã®ã‚ˆã†ã«äºŒã¤ã®`$`記å·ã§å›²ã¾ã‚Œã¾ã™ã€‚二ã¤ã®ãƒ’アドキュメントã®é–“ã«ã‚る値ã¯ãã®ã¾ã¾å‡¦ç†ã•ã‚Œã¾ã™ã€‚ + +ヒアドキュメントを使用ã—ã¦ã€SQLã€HTMLã€ã¾ãŸã¯XMLコードãªã©ã®ã‚¹ãƒ‹ãƒšãƒƒãƒˆã‚’埋ã‚込むã“ã¨ãŒã§ãã¾ã™ã€‚ + +**例** + +クエリ: + +```sql +SELECT $smth$SHOW CREATE VIEW my_view$smth$; +``` + +çµæžœï¼š + +```text +┌─'SHOW CREATE VIEW my_view'─┠+│ SHOW CREATE VIEW my_view │ +└────────────────────────────┘ +``` + +## クエリパラメータã®å®šç¾©ã¨ä½¿ç”¨æ³• + +クエリパラメータを使用ã™ã‚‹ã¨ã€å…·ä½“çš„ãªè­˜åˆ¥å­ã®ä»£ã‚ã‚Šã«æŠ½è±¡çš„ãªãƒ—レースホルダーをå«ã‚€ä¸€èˆ¬çš„ãªã‚¯ã‚¨ãƒªã‚’書ãã“ã¨ãŒã§ãã¾ã™ã€‚クエリパラメータ付ãã®ã‚¯ã‚¨ãƒªãŒå®Ÿè¡Œã•ã‚Œã‚‹ã¨ã€ã™ã¹ã¦ã®ãƒ—レースホルダーãŒè§£æ±ºã•ã‚Œã€å®Ÿéš›ã®ã‚¯ã‚¨ãƒªãƒ‘ラメータã®å€¤ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +クエリパラメータを定義ã™ã‚‹æ–¹æ³•ã¯äºŒã¤ã‚ã‚Šã¾ã™ï¼š + +- `SET param_=` コマンドを使用ã™ã‚‹ã€‚ +- コマンドラインã§`clickhouse-client`ã«`--param_=''`を引数ã¨ã—ã¦æ¸¡ã™ã€‚``ã¯ã‚¯ã‚¨ãƒªãƒ‘ラメータã®åå‰ã€``ã¯ãã®å€¤ã§ã™ã€‚ + +クエリ内ã§ã‚¯ã‚¨ãƒªãƒ‘ラメータをå‚ç…§ã™ã‚‹ã«ã¯ã€`{: }`を使用ã—ã¾ã™ã€‚ã“ã“ã§``ã¯ã‚¯ã‚¨ãƒªãƒ‘ラメータã®åå‰ã€``ã¯ãã‚ŒãŒå¤‰æ›ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã§ã™ã€‚ + +ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®SQLã¯ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã‚’æŒã¤ãƒ‘ラメータ`a` ã€`b` ã€`c` ã€`d`を定義ã—ã¦ã„ã¾ã™ï¼š + +```sql +SET param_a = 13; +SET param_b = 'str'; +SET param_c = '2022-08-04 18:30:53'; +SET param_d = {'10': [11, 12], '13': [14, 15]}; + +SELECT + {a: UInt32}, + {b: String}, + {c: DateTime}, + {d: Map(String, Array(UInt8))}; +``` + +çµæžœï¼š + +```response +13 str 2022-08-04 18:30:53 {'10':[11,12],'13':[14,15]} +``` + +`clickhouse-client`を使用ã—ã¦ã„ã‚‹å ´åˆã€ãƒ‘ラメータã¯`--param_name=value`ã¨ã—ã¦æŒ‡å®šã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ãƒ‘ラメータã¯`message`ã¨ã„ã†åå‰ã§ã€`String`ã¨ã—ã¦å–å¾—ã•ã‚Œã¾ã™ï¼š + +```bash +clickhouse-client --param_message='hello' --query="SELECT {message: String}" +``` + +çµæžœï¼š + +```response +hello +``` + +クエリパラメータãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãƒ†ãƒ¼ãƒ–ルã€é–¢æ•°ã€ã¾ãŸã¯ãã®ä»–ã®è­˜åˆ¥å­ã®åå‰ã‚’表ã™å ´åˆã€ãã®åž‹ã«ã¯`Identifier`を使用ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã¯`uk_price_paid`ã¨ã„ã†åå‰ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰è¡Œã‚’è¿”ã—ã¾ã™ï¼š + +```sql +SET param_mytablename = "uk_price_paid"; +SELECT * FROM {mytablename:Identifier}; +``` + +:::note +クエリパラメータã¯ä»»æ„ã®SQLクエリã®ä»»æ„ã®å ´æ‰€ã«ä½¿ç”¨ã§ãる一般的ãªãƒ†ã‚­ã‚¹ãƒˆç½®æ›ã§ã¯ã‚ã‚Šã¾ã›ã‚“。主ã«è­˜åˆ¥å­ã‚„リテラルã®ä»£ã‚ã‚Šã«`SELECT`ステートメント内ã§æ©Ÿèƒ½ã™ã‚‹ã‚ˆã†è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +## 関数 + +関数呼ã³å‡ºã—ã¯ã€æ‹¬å¼§å†…ã«å¼•æ•°ã®ãƒªã‚¹ãƒˆï¼ˆç©ºã§ã‚‚å¯ï¼‰ãŒã‚る識別å­ã®ã‚ˆã†ã«æ›¸ã‹ã‚Œã¾ã™ã€‚標準SQLã¨ã¯å¯¾ç…§çš„ã«ã€æ‹¬å¼§ã¯ç©ºã®å¼•æ•°ãƒªã‚¹ãƒˆã®å ´åˆã§ã‚‚å¿…è¦ã§ã™ã€‚例:`now()`。通常ã®é–¢æ•°ã¨é›†è¨ˆé–¢æ•°ï¼ˆ[集計関数](/docs/ja/sql-reference/aggregate-functions/index.md)セクションをå‚照)ãŒå­˜åœ¨ã—ã¾ã™ã€‚一部ã®é›†è¨ˆé–¢æ•°ã¯æ‹¬å¼§å†…ã«å¼•æ•°ãƒªã‚¹ãƒˆã‚’2ã¤æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚例:`quantile (0.9) (x)`。ã“れらã®é›†è¨ˆé–¢æ•°ã¯ã€Œãƒ‘ラメトリック関数ã€ã¨å‘¼ã°ã‚Œã€æœ€åˆã®ãƒªã‚¹ãƒˆã®å¼•æ•°ã¯ã€Œãƒ‘ラメータã€ã¨å‘¼ã°ã‚Œã¾ã™ã€‚パラメータã®ãªã„集計関数ã®æ§‹æ–‡ã¯ã€é€šå¸¸ã®é–¢æ•°ã¨åŒã˜ã§ã™ã€‚ + +## æ¼”ç®—å­ + +演算å­ã¯ã€å„ªå…ˆé †ä½ã¨çµåˆæ€§ã‚’考慮ã—ã¦ã€ã‚¯ã‚¨ãƒªè§£æžä¸­ã«å¯¾å¿œã™ã‚‹é–¢æ•°ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€å¼ `1 + 2 * 3 + 4` 㯠`plus(plus(1, multiply(2, 3)), 4)` ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +## データ型ã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルエンジン + +`CREATE`クエリ内ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¨ãƒ†ãƒ¼ãƒ–ルエンジンã¯ã€è­˜åˆ¥å­ã¾ãŸã¯é–¢æ•°ã¨ã—ã¦è¨˜è¿°ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€æ‹¬å¼§å†…ã«å¼•æ•°ãƒªã‚¹ãƒˆã‚’å«ã‚€å ´åˆã¨å«ã¾ãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[データ型](/docs/ja/sql-reference/data-types/index.md)ã€[テーブルエンジン](/docs/ja/engines/table-engines/index.md)ã€ãŠã‚ˆã³[CREATE](/docs/ja/sql-reference/statements/create/index.md)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +## å¼ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ + +エイリアスã¯ã€ã‚¯ã‚¨ãƒªå†…ã®å¼ã«å¯¾ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©ã®åå‰ã§ã™ã€‚ + +``` sql +expr AS alias +``` + +- `AS` — エイリアスを定義ã™ã‚‹ãŸã‚ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã§ã™ã€‚テーブルåã‚„`SELECT`å¥ã®ã‚«ãƒ©ãƒ åã«å¯¾ã—ã¦`AS`キーワードを使用ã›ãšã«ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’定義ã§ãã¾ã™ã€‚ + + 例:`SELECT table_name_alias.column_name FROM table_name table_name_alias` + + [CAST](./functions/type-conversion-functions.md#castx-t) 関数内ã§ã¯ã€`AS` キーワードã¯åˆ¥ã®æ„味をæŒã¡ã¾ã™ã€‚関数ã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +- `expr` — ClickHouseã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ä»»æ„ã®å¼ã€‚ + + 例:`SELECT column_name * 2 AS double FROM some_table` + +- `alias` — `expr`ã®ãŸã‚ã®åå‰ã€‚エイリアスã¯[識別å­](#identifiers)ã®æ§‹æ–‡ã«æº–æ‹ ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + + 例:`SELECT "table t".column_name FROM table_name AS "table t"` + +### 使用ã«é–¢ã™ã‚‹æ³¨æ„ + +エイリアスã¯ã‚¯ã‚¨ãƒªã¾ãŸã¯ã‚µãƒ–クエリã«å¯¾ã—ã¦ã‚°ãƒ­ãƒ¼ãƒãƒ«ã§ã‚ã‚Šã€ã‚¯ã‚¨ãƒªã®ä»»æ„ã®éƒ¨åˆ†ã§ä»»æ„ã®å¼ã«ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’定義ã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€`SELECT (1 AS n) + 2, n`。 + +エイリアスã¯ã‚µãƒ–クエリã§ã¯è¡¨ç¤ºã•ã‚Œãšã€ã‚µãƒ–クエリ間ã§ã‚‚表示ã•ã‚Œã¾ã›ã‚“。ãŸã¨ãˆã°ã€ã‚¯ã‚¨ãƒª`SELECT (SELECT sum(b.a) + num FROM b) - a.a AS num FROM a`を実行ã™ã‚‹éš›ã€ClickHouseã¯`Unknown identifier: num`ã¨ã„ã†ä¾‹å¤–を生æˆã—ã¾ã™ã€‚ + +エイリアスãŒã‚µãƒ–クエリã®`SELECT`å¥ã«ãŠã‘ã‚‹çµæžœã‚«ãƒ©ãƒ ã«å®šç¾©ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã“れらã®ã‚«ãƒ©ãƒ ã¯å¤–部クエリã§è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ãŸã¨ãˆã°ã€`SELECT n + m FROM (SELECT 1 AS n, 2 AS m)`。 + +カラムåやテーブルåã¨åŒã˜ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’注æ„ã—ã¦ãã ã•ã„。次ã®ä¾‹ã‚’考ãˆã¦ã¿ã¾ã—ょã†ï¼š + +``` sql +CREATE TABLE t +( + a Int, + b Int +) +ENGINE = TinyLog() +``` + +``` sql +SELECT + argMax(a, b), + sum(b) AS b +FROM t +``` + +``` text +Received exception from server (version 18.14.17): +Code: 184. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception: Aggregate function sum(b) is found inside another aggregate function in query. +``` + +ã“ã®ä¾‹ã§ã¯ã€ãƒ†ãƒ¼ãƒ–ル`t`をカラム`b`ã§å®£è¨€ã—ã¾ã—ãŸã€‚ãã®å¾Œã€ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹éš›ã«`sum(b) AS b`エイリアスを定義ã—ã¾ã—ãŸã€‚エイリアスã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã§ã‚ã‚‹ãŸã‚ã€ClickHouseã¯å¼`argMax(a, b)`内ã®ãƒªãƒ†ãƒ©ãƒ«`b`ã‚’å¼`sum(b)`ã§ç½®ãæ›ãˆã¾ã—ãŸã€‚ã“ã®ç½®æ›ã«ã‚ˆã‚Šä¾‹å¤–ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ã“ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æŒ™å‹•ã¯ã€[prefer_column_name_to_alias](../operations/settings/settings.md#prefer-column-name-to-alias)ã‚’`1`ã«è¨­å®šã™ã‚‹ã“ã¨ã§å¤‰æ›´ã§ãã¾ã™ã€‚ + +## アスタリスク + +`SELECT`クエリã§ã¯ã€ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ãŒå¼ã‚’ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[SELECT](/docs/ja/sql-reference/statements/select/index.md#asterisk)セクションをå‚ç…§ã—ã¦ãã ã•ã„。 + +## å¼ + +å¼ã¯ã€é–¢æ•°ã€è­˜åˆ¥å­ã€ãƒªãƒ†ãƒ©ãƒ«ã€æ¼”ç®—å­ã®é©ç”¨ã€æ‹¬å¼§å†…ã®å¼ã€ã‚µãƒ–クエリã€ã¾ãŸã¯ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ã§ã™ã€‚エイリアスをå«ã‚€ã“ã¨ã‚‚ã§ãã¾ã™ã€‚å¼ã®ãƒªã‚¹ãƒˆã¯ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚ŒãŸ1ã¤ä»¥ä¸Šã®å¼ã§ã™ã€‚関数ã¨æ¼”ç®—å­ã¯ã€å¼•æ•°ã¨ã—ã¦å¼ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/table-functions/azureBlobStorage.md b/docs/ja/sql-reference/table-functions/azureBlobStorage.md new file mode 100644 index 00000000000..db0e625acb4 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/azureBlobStorage.md @@ -0,0 +1,92 @@ +--- +slug: /ja/sql-reference/table-functions/azureBlobStorage +sidebar_position: 10 +sidebar_label: azureBlobStorage +keywords: [azure blob storage] +--- + +# azureBlobStorage テーブル関数 + +[Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs) ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠž/挿入ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚ˆã†ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ル関数㯠[s3 関数](../../sql-reference/table-functions/s3.md)ã¨ä¼¼ã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +azureBlobStorage(- connection_string|storage_account_url, container_name, blobpath, [account_name, account_key, format, compression, structure]) +``` + +**引数** + +- `connection_string|storage_account_url` — connection_string ã¯ã‚¢ã‚«ã‚¦ãƒ³ãƒˆåã¨ã‚­ãƒ¼ã‚’å«ã¿ã¾ã™ ([connection string ã®ä½œæˆ](https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&bc=%2Fazure%2Fstorage%2Fblobs%2Fbreadcrumb%2Ftoc.json#configure-a-connection-string-for-an-azure-storage-account)) ã¾ãŸã¯ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã®URLã‚’ã“ã“ã«æä¾›ã—ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆåã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚­ãƒ¼ã‚’別々ã®ãƒ‘ラメータã¨ã—ã¦æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼ˆãƒ‘ラメータã®account_nameã¨account_keyã‚’å‚照) +- `container_name` - コンテナーå +- `blobpath` - ファイルパス。リードオンリーモードã§ã¯ä»¥ä¸‹ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™: `*`, `**`, `?`, `{abc,def}` ãŠã‚ˆã³ `{N..M}` ã“ã“㧠`N`, `M` — æ•°å­—, `'abc'`, `'def'` — 文字列。 +- `account_name` - storage_account_url ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ã“ã“ã§ã‚¢ã‚«ã‚¦ãƒ³ãƒˆåを指定ã§ãã¾ã™ +- `account_key` - storage_account_url ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€ã“ã“ã§ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚­ãƒ¼ã‚’指定ã§ãã¾ã™ +- `format` — ファイルã®[フォーマット](../../interfaces/formats.md#formats)。 +- `compression` — サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る値: `none`, `gzip/gz`, `brotli/br`, `xz/LZMA`, `zstd/zst`。デフォルトã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«ã‚ˆã£ã¦åœ§ç¸®ã‚’自動的ã«æ¤œå‡ºã—ã¾ã™ï¼ˆ`auto`ã«è¨­å®šã—ãŸå ´åˆã¨åŒã˜ï¼‰ã€‚ +- `structure` — テーブルã®æ§‹é€ ã€‚フォーマット `'column1_name column1_type, column2_name column2_type, ...'`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã«ãŠã„ã¦ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿æ›¸ãã™ã‚‹ãŸã‚ã®æŒ‡å®šã•ã‚ŒãŸæ§‹é€ ã®ãƒ†ãƒ¼ãƒ–ル。 + +**例** + +以下を使用ã—㦠Azure Blob Storage ã«ãƒ‡ãƒ¼ã‚¿ã‚’書ãè¾¼ã¿ã¾ã™: + +```sql +INSERT INTO TABLE FUNCTION azureBlobStorage('http://azurite1:10000/devstoreaccount1', + 'test_container', 'test_{_partition_id}.csv', 'devstoreaccount1', 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==', + 'CSV', 'auto', 'column1 UInt32, column2 UInt32, column3 UInt32') PARTITION BY column3 VALUES (1, 2, 3), (3, 2, 1), (78, 43, 3); +``` + +ãã®ãƒ‡ãƒ¼ã‚¿ã¯æ¬¡ã®æ–¹æ³•ã§èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ + +```sql +SELECT * FROM azureBlobStorage('http://azurite1:10000/devstoreaccount1', + 'test_container', 'test_1.csv', 'devstoreaccount1', 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==', + 'CSV', 'auto', 'column1 UInt32, column2 UInt32, column3 UInt32'); +``` + +```response +┌───column1─┬────column2─┬───column3─┠+│ 3 │ 2 │ 1 │ +└───────────┴────────────┴───────────┘ +``` + +ã¾ãŸã¯ connection_string を使用ã™ã‚‹ + +```sql +SELECT count(*) FROM azureBlobStorage('DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;EndPointSuffix=core.windows.net', + 'test_container', 'test_3.csv', 'CSV', 'auto' , 'column1 UInt32, column2 UInt32, column3 UInt32'); +``` + +``` text +┌─count()─┠+│ 2 │ +└─────────┘ +``` + +## 仮想カラム {#virtual-columns} + +- `_path` — ファイルã¸ã®ãƒ‘ス。タイプ: `LowCardinalty(String)`。 +- `_file` — ファイルå。タイプ: `LowCardinalty(String)`。 +- `_size` — ファイルã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚タイプ: `Nullable(UInt64)`。ファイルサイズãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL` ã«ãªã‚Šã¾ã™ã€‚ +- `_time` — ファイルã®æœ€çµ‚更新時刻。タイプ: `Nullable(DateTime)`。時刻ãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL` ã«ãªã‚Šã¾ã™ã€‚ + +**関連項目** + +- [AzureBlobStorage テーブルエンジン](/docs/ja/engines/table-engines/integrations/azureBlobStorage.md) + +## Hiveスタイルã®ãƒ‘ーティショニング {#hive-style-partitioning} + +`use_hive_partitioning` ã‚’ 1 ã«è¨­å®šã™ã‚‹ã¨ã€ClickHouse ã¯ãƒ‘ス内㮠Hiveスタイルã®ãƒ‘ーティショニング(`/name=value/`)を検出ã—ã€ãƒ‘ーティションカラムをクエリ内ã§ä»®æƒ³ã‚«ãƒ©ãƒ ã¨ã—ã¦ä½¿ç”¨ã§ãるよã†ã«ã—ã¾ã™ã€‚ã“れらã®ä»®æƒ³ã‚«ãƒ©ãƒ ã¯ã€ãƒ‘ーティションã•ã‚ŒãŸãƒ‘ス内ã¨åŒã˜åå‰ã‚’æŒã¡ã¾ã™ãŒã€å…ˆé ­ã« `_` ãŒä»˜ãã¾ã™ã€‚ + +**例** + +Hiveスタイルã®ãƒ‘ーティショニングã§ä½œæˆã•ã‚ŒãŸä»®æƒ³ã‚«ãƒ©ãƒ ã‚’使用ã™ã‚‹ + +``` sql +SET use_hive_partitioning = 1; +SELECT * from azureBlobStorage(config, storage_account_url='...', container='...', blob_path='http://data/path/date=*/country=*/code=*/*.parquet') where _date > '2020-01-01' and _country = 'Netherlands' and _code = 42; +``` diff --git a/docs/ja/sql-reference/table-functions/azureBlobStorageCluster.md b/docs/ja/sql-reference/table-functions/azureBlobStorageCluster.md new file mode 100644 index 00000000000..e439553b220 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/azureBlobStorageCluster.md @@ -0,0 +1,46 @@ +--- +slug: /ja/sql-reference/table-functions/azureBlobStorageCluster +sidebar_position: 15 +sidebar_label: azureBlobStorageCluster +title: "azureBlobStorageCluster テーブル関数" +--- + +指定ã•ã‚ŒãŸã‚¯ãƒ©ã‚¹ã‚¿å†…ã®å¤šãã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰ä¸¦è¡Œã—㦠[Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs) ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’処ç†ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚起動ノードã§ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã«æŽ¥ç¶šã‚’作æˆã—ã€S3ファイルパス内ã®ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ã‚’展開ã—ã€å„ファイルを動的ã«åˆ†é…ã—ã¾ã™ã€‚ワーカーノードã§ã¯ã€å‡¦ç†ã™ã¹ã次ã®ã‚¿ã‚¹ã‚¯ã‚’起動ノードã«å•ã„åˆã‚ã›ã€ãれを処ç†ã—ã¾ã™ã€‚ã“ã‚Œã¯ã™ã¹ã¦ã®ã‚¿ã‚¹ã‚¯ãŒçµ‚了ã™ã‚‹ã¾ã§ç¹°ã‚Šè¿”ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ル関数ã¯ã€[s3Cluster 関数](../../sql-reference/table-functions/s3Cluster.md) ã¨ä¼¼ã¦ã„ã¾ã™ã€‚ + +**構文** + +``` sql +azureBlobStorageCluster(cluster_name, connection_string|storage_account_url, container_name, blobpath, [account_name, account_key, format, compression, structure]) +``` + +**引数** + +- `cluster_name` — リモートãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒ«ã‚µãƒ¼ãƒã¸ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã¨æŽ¥ç¶šãƒ‘ラメータã®ã‚»ãƒƒãƒˆã‚’構築ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ã®åå‰ã€‚ +- `connection_string|storage_account_url` — connection_string ã«ã¯ã‚¢ã‚«ã‚¦ãƒ³ãƒˆåã¨ã‚­ãƒ¼ãŒå«ã¾ã‚Œã¾ã™ ([接続文字列ã®ä½œæˆ](https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&bc=%2Fazure%2Fstorage%2Fblobs%2Fbreadcrumb%2Ftoc.json#configure-a-connection-string-for-an-azure-storage-account))。ã¾ãŸã¯ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¢ã‚«ã‚¦ãƒ³ãƒˆURLã‚’ã“ã“ã§æŒ‡å®šã—ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆåã¨ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚­ãƒ¼ã‚’別ã®ãƒ‘ラメータã¨ã—ã¦æä¾›ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼ˆãƒ‘ラメータaccount_nameã¨account_keyã‚’å‚照)。 +- `container_name` - コンテナå。 +- `blobpath` - ファイルパス。読ã¿å–り専用モードã§æ¬¡ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™: `*`, `**`, `?`, `{abc,def}`, `{N..M}` ã“ã“㧠`N`, `M`ã¯æ•°å€¤ã€`'abc'`, `'def'`ã¯æ–‡å­—列。 +- `account_name` - storage_account_url ãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€ã“ã“ã§ã‚¢ã‚«ã‚¦ãƒ³ãƒˆåを指定ã§ãã¾ã™ã€‚ +- `account_key` - storage_account_url ãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€ã“ã“ã§ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚­ãƒ¼ã‚’指定ã§ãã¾ã™ã€‚ +- `format` — ファイルã®[フォーマット](../../interfaces/formats.md#formats)。 +- `compression` — サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å€¤: `none`, `gzip/gz`, `brotli/br`, `xz/LZMA`, `zstd/zst`。デフォルトã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«ã‚ˆã£ã¦åœ§ç¸®ã‚’自動検出ã—ã¾ã™ï¼ˆ`auto`ã«è¨­å®šã™ã‚‹ã®ã¨åŒæ§˜ï¼‰ã€‚ +- `structure` — テーブルã®æ§‹é€ ã€‚フォーマット `'column1_name column1_type, column2_name column2_type, ...'`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã§ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿æ›¸ãã™ã‚‹ãŸã‚ã®æŒ‡å®šã•ã‚ŒãŸæ§‹é€ ã®ãƒ†ãƒ¼ãƒ–ル。 + +**例** + +`cluster_simple` クラスタ内ã®ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã‚’使用ã—ã¦ã€ãƒ•ã‚¡ã‚¤ãƒ« `test_cluster_*.csv` ã®ã‚«ã‚¦ãƒ³ãƒˆã‚’é¸æŠžã—ã¾ã™ï¼š + +``` sql +SELECT count(*) from azureBlobStorageCluster( + 'cluster_simple', 'http://azurite1:10000/devstoreaccount1', 'test_container', 'test_cluster_count.csv', 'devstoreaccount1', + 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==', 'CSV', + 'auto', 'key UInt64') +``` + +**å‚ç…§** + +- [AzureBlobStorage エンジン](../../engines/table-engines/integrations/azureBlobStorage.md) +- [azureBlobStorage テーブル関数](../../sql-reference/table-functions/azureBlobStorage.md) diff --git a/docs/ja/sql-reference/table-functions/cluster.md b/docs/ja/sql-reference/table-functions/cluster.md new file mode 100644 index 00000000000..b4059aa7d5c --- /dev/null +++ b/docs/ja/sql-reference/table-functions/cluster.md @@ -0,0 +1,59 @@ +--- +slug: /ja/sql-reference/table-functions/cluster +sidebar_position: 30 +sidebar_label: cluster +title: "cluster, clusterAllReplicas" +--- + +クラスタã®ã™ã¹ã¦ã®ã‚·ãƒ£ãƒ¼ãƒ‰ï¼ˆ`remote_servers`セクションã§è¨­å®šï¼‰ãŒã€[分散テーブル](../../engines/table-engines/special/distributed.md)を作æˆã›ãšã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚å„シャードã®ãƒ¬ãƒ—リカã®ã†ã¡1ã¤ã ã‘ãŒã‚¯ã‚¨ãƒªã•ã‚Œã¾ã™ã€‚ + +`clusterAllReplicas`関数 — `cluster`ã¨åŒæ§˜ã§ã™ãŒã€ã™ã¹ã¦ã®ãƒ¬ãƒ—リカãŒã‚¯ã‚¨ãƒªã•ã‚Œã¾ã™ã€‚クラスタ内ã®å„レプリカãŒå€‹åˆ¥ã®ã‚·ãƒ£ãƒ¼ãƒ‰/接続ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +:::note +利用å¯èƒ½ãªã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¹ã‚¿ã¯[system.clusters](../../operations/system-tables/clusters.md)テーブルã«ãƒªã‚¹ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ +::: + +**構文** + +``` sql +cluster(['cluster_name', db.table, sharding_key]) +cluster(['cluster_name', db, table, sharding_key]) +clusterAllReplicas(['cluster_name', db.table, sharding_key]) +clusterAllReplicas(['cluster_name', db, table, sharding_key]) +``` +**引数** + +- `cluster_name` – リモートãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒ«ã‚µãƒ¼ãƒãƒ¼ã¸ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã¨æŽ¥ç¶šãƒ‘ラメータã®ã‚»ãƒƒãƒˆã‚’構築ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ã®åå‰ã€‚指定ã—ãªã„å ´åˆã¯`default`ãŒè¨­å®šã•ã‚Œã¾ã™ã€‚ +- `db.table` ã¾ãŸã¯ `db`, `table` - データベースã¨ãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚ +- `sharding_key` - シャーディングキー。任æ„。クラスタãŒè¤‡æ•°ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚’æŒã¤å ´åˆã«æŒ‡å®šãŒå¿…è¦ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +クラスタã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã€‚ + +**マクロã®ä½¿ç”¨** + +`cluster_name`ã«ã¯ãƒžã‚¯ãƒ­ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚波括弧ã®ä¸­ã«ã‚る値ã¯ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã®[macros](../../operations/server-configuration-parameters/settings.md#macros)セクションã‹ã‚‰ã®ç½®æ›å€¤ã§ã™ã€‚ + +例: + +```sql +SELECT * FROM cluster('{cluster}', default.example_table); +``` + +**使用法ã¨æŽ¨å¥¨äº‹é …** + +`cluster`ãŠã‚ˆã³`clusterAllReplicas`テーブル関数を利用ã™ã‚‹ã“ã¨ã¯ã€`Distributed`テーブルを作æˆã™ã‚‹ã‚ˆã‚Šã‚‚効率ãŒåŠ£ã‚Šã¾ã™ã€‚ã¨ã„ã†ã®ã¯ã€ã“ã®å ´åˆã€è¦æ±‚ã”ã¨ã«ã‚µãƒ¼ãƒãƒ¼æŽ¥ç¶šãŒå†ç¢ºç«‹ã•ã‚Œã‚‹ãŸã‚ã§ã™ã€‚大é‡ã®ã‚¯ã‚¨ãƒªã‚’処ç†ã™ã‚‹éš›ã¯ã€å¸¸ã«äº‹å‰ã«`Distributed`テーブルを作æˆã—ã€`cluster`ãŠã‚ˆã³`clusterAllReplicas`テーブル関数を使用ã—ãªã„ã§ãã ã•ã„。 + +`cluster`ãŠã‚ˆã³`clusterAllReplicas`テーブル関数ã¯ã€æ¬¡ã®ã‚ˆã†ãªå ´åˆã«æœ‰ç”¨ã§ã™ï¼š + +- 特定ã®ã‚¯ãƒ©ã‚¹ã‚¿ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’通ã˜ãŸãƒ‡ãƒ¼ã‚¿ã®æ¯”較ã€ãƒ‡ãƒãƒƒã‚°ã€ãŠã‚ˆã³ãƒ†ã‚¹ãƒˆã€‚ +- 研究目的ã§ã®ã•ã¾ã–ã¾ãªClickHouseクラスタやレプリカã¸ã®ã‚¯ã‚¨ãƒªã€‚ +- 手動ã§å®Ÿè¡Œã•ã‚Œã‚‹ã¾ã‚Œãªåˆ†æ•£è¦æ±‚。 + +接続設定(`host`ã€`port`ã€`user`ã€`password`ã€`compression`ã€`secure`ãªã©ï¼‰ã¯``構æˆã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‹ã‚‰å–å¾—ã•ã‚Œã¾ã™ã€‚[Distributedエンジン](../../engines/table-engines/special/distributed.md)ã®è©³ç´°ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**関連項目** + +- [skip_unavailable_shards](../../operations/settings/settings.md#skip_unavailable_shards) +- [load_balancing](../../operations/settings/settings.md#load_balancing) diff --git a/docs/ja/sql-reference/table-functions/deltalake.md b/docs/ja/sql-reference/table-functions/deltalake.md new file mode 100644 index 00000000000..5d74f870b2f --- /dev/null +++ b/docs/ja/sql-reference/table-functions/deltalake.md @@ -0,0 +1,51 @@ +--- +slug: /ja/sql-reference/table-functions/deltalake +sidebar_position: 45 +sidebar_label: deltaLake +--- + +# deltaLake テーブル関数 + +Amazon S3 ã«ã‚ã‚‹ [Delta Lake](https://github.com/delta-io/delta) テーブルã¸ã®èª­ã¿å–り専用テーブルã®ã‚ˆã†ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ + +## 構文 + +``` sql +deltaLake(url [,aws_access_key_id, aws_secret_access_key] [,format] [,structure] [,compression]) +``` + +## 引数 + +- `url` — S3 ã«ã‚る既存㮠Delta Lake テーブルã¸ã®ãƒ‘スをå«ã‚€ãƒã‚±ãƒƒãƒˆURL。 +- `aws_access_key_id`, `aws_secret_access_key` - [AWS](https://aws.amazon.com/) アカウントユーザー用ã®é•·æœŸè³‡æ ¼æƒ…å ±ã§ã™ã€‚ã“れを使用ã—ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’èªè¨¼ã§ãã¾ã™ã€‚ã“れらã®ãƒ‘ラメータã¯ã‚ªãƒ—ションã§ã™ã€‚資格情報ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouse ã®è¨­å®šã‹ã‚‰ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚詳細㯠[Using S3 for Data Storage](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-s3) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- `format` — ファイルã®[フォーマット](/docs/ja/interfaces/formats.md/#formats)。 +- `structure` — テーブルã®æ§‹é€ ã€‚フォーマット㯠`'column1_name column1_type, column2_name column2_type, ...'` ã§ã™ã€‚ +- `compression` — パラメータã¯ã‚ªãƒ—ションã§ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る値:`none`, `gzip/gz`, `brotli/br`, `xz/LZMA`, `zstd/zst`。デフォルトã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«ã‚ˆã£ã¦åœ§ç¸®ãŒè‡ªå‹•æ¤œå‡ºã•ã‚Œã¾ã™ã€‚ + +**返り値** + +S3 ã«æŒ‡å®šã•ã‚ŒãŸ Delta Lake テーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã«æŒ‡å®šã•ã‚ŒãŸæ§‹é€ ã®ãƒ†ãƒ¼ãƒ–ル。 + +**例** + +S3 ã«ã‚るテーブル `https://clickhouse-public-datasets.s3.amazonaws.com/delta_lake/hits/` ã‹ã‚‰è¡Œã‚’é¸æŠž: + +``` sql +SELECT + URL, + UserAgent +FROM deltaLake('https://clickhouse-public-datasets.s3.amazonaws.com/delta_lake/hits/') +WHERE URL IS NOT NULL +LIMIT 2 +``` + +``` response +┌─URL───────────────────────────────────────────────────────────────────┬─UserAgent─┠+│ http://auto.ria.ua/search/index.kz/jobinmoscow/detail/55089/hasimages │ 1 │ +│ http://auto.ria.ua/search/index.kz/jobinmoscow.ru/gosushi │ 1 │ +└───────────────────────────────────────────────────────────────────────┴───────────┘ +``` + +**関連情報** + +- [DeltaLake エンジン](/docs/ja/engines/table-engines/integrations/deltalake.md) diff --git a/docs/ja/sql-reference/table-functions/dictionary.md b/docs/ja/sql-reference/table-functions/dictionary.md new file mode 100644 index 00000000000..81223111cde --- /dev/null +++ b/docs/ja/sql-reference/table-functions/dictionary.md @@ -0,0 +1,59 @@ +--- +slug: /ja/sql-reference/table-functions/dictionary +sidebar_position: 47 +sidebar_label: dictionary +title: dictionary +--- + +[Dictionary](../../sql-reference/dictionaries/index.md) ã®ãƒ‡ãƒ¼ã‚¿ã‚’ ClickHouse テーブルã¨ã—ã¦è¡¨ç¤ºã—ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ [Dictionary](../../engines/table-engines/special/dictionary.md) エンジンã¨åŒæ§˜ã«å‹•ä½œã—ã¾ã™ã€‚ + +**構文** + +``` sql +dictionary('dict') +``` + +**引数** + +- `dict` — Dictionary ã®åå‰ã€‚[String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +ClickHouse テーブル。 + +**例** + +入力テーブル `dictionary_source_table`: + +``` text +┌─id─┬─value─┠+│ 0 │ 0 │ +│ 1 │ 1 │ +└────┴───────┘ +``` + +Dictionary ã®ä½œæˆ: + +``` sql +CREATE DICTIONARY new_dictionary(id UInt64, value UInt64 DEFAULT 0) PRIMARY KEY id +SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'dictionary_source_table')) LAYOUT(DIRECT()); +``` + +クエリ: + +``` sql +SELECT * FROM dictionary('new_dictionary'); +``` + +çµæžœ: + +``` text +┌─id─┬─value─┠+│ 0 │ 0 │ +│ 1 │ 1 │ +└────┴───────┘ +``` + +**関連項目** + +- [Dictionary エンジン](../../engines/table-engines/special/dictionary.md#dictionary) diff --git a/docs/ja/sql-reference/table-functions/executable.md b/docs/ja/sql-reference/table-functions/executable.md new file mode 100644 index 00000000000..9de6d7113be --- /dev/null +++ b/docs/ja/sql-reference/table-functions/executable.md @@ -0,0 +1,106 @@ +--- +slug: /ja/engines/table-functions/executable +sidebar_position: 50 +sidebar_label: executable +keywords: [udf, user defined function, clickhouse, executable, table, function] +--- + +# UDF用㮠executable テーブル関数 + +`executable` テーブル関数ã¯ã€ãƒ¦ãƒ¼ã‚¶å®šç¾©é–¢æ•°ï¼ˆUDF)ã®å‡ºåŠ›ã«åŸºã¥ã„ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€**stdout** ã«è¡Œã‚’出力ã™ã‚‹ã‚¹ã‚¯ãƒªãƒ—ト内ã§å®šç¾©ã—ã¾ã™ã€‚実行å¯èƒ½ãªã‚¹ã‚¯ãƒªãƒ—ト㯠`users_scripts` ディレクトリã«ä¿å­˜ã•ã‚Œã€ä»»æ„ã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ClickHouse サーãƒãƒ¼ã«ã€å®Ÿè¡Œå¯èƒ½ã‚¹ã‚¯ãƒªãƒ—トを動作ã•ã›ã‚‹ãŸã‚ã«å¿…è¦ãªãƒ‘ッケージãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。例ãˆã°ã€Python スクリプトã®å ´åˆã€å¿…è¦ãª Python パッケージãŒã‚µãƒ¼ãƒãƒ¼ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +入力クエリを一ã¤ä»¥ä¸Šã‚ªãƒ—ションã§å«ã‚ã€çµæžœã‚’ **stdin** ã«ã‚¹ãƒˆãƒªãƒ¼ãƒ ã—ã¦ã‚¹ã‚¯ãƒªãƒ—トãŒèª­ã¿å–れるよã†ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +:::note +通常㮠UDF 関数㨠`executable` テーブル関数ãŠã‚ˆã³ `Executable` テーブルエンジンã®å¤§ããªåˆ©ç‚¹ã¯ã€é€šå¸¸ã® UDF 関数ã¯è¡Œæ•°ã‚’変更ã§ããªã„点ã§ã™ã€‚例ãˆã°ã€å…¥åŠ›ãŒ100è¡Œã§ã‚ã‚Œã°ã€çµæžœã‚‚100è¡Œã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ã—ã‹ã—ã€`executable` テーブル関数ã¾ãŸã¯ `Executable` テーブルエンジンを使用ã™ã‚‹ã“ã¨ã§ã€ã‚¹ã‚¯ãƒªãƒ—トã¯è¤‡é›‘ãªé›†è¨ˆãªã©ã€ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +## 構文 + +`executable` テーブル関数ã¯3ã¤ã®ãƒ‘ラメータをè¦æ±‚ã—ã€å…¥åŠ›ã‚¯ã‚¨ãƒªã®ã‚ªãƒ—ションリストをå—ã‘付ã‘ã¾ã™: + +```sql +executable(script_name, format, structure, [input_query...] [,SETTINGS ...]) +``` + +- `script_name`: スクリプトã®ãƒ•ã‚¡ã‚¤ãƒ«å。`user_scripts` フォルダã«ä¿å­˜ã•ã‚Œã¾ã™ï¼ˆ`user_scripts_path` 設定ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ•ã‚©ãƒ«ãƒ€ï¼‰ +- `format`: 生æˆã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ +- `structure`: 生æˆã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルã®ã‚¹ã‚­ãƒ¼ãƒž +- `input_query`: スクリプト㫠**stdin** 経由ã§çµæžœãŒæ¸¡ã•ã‚Œã‚‹ã‚ªãƒ—ションã®ã‚¯ã‚¨ãƒªï¼ˆã¾ãŸã¯é›†åˆã€ã‚¯ã‚¨ãƒªï¼‰ + +:::note +åŒã˜å…¥åŠ›ã‚¯ã‚¨ãƒªã§åŒã˜ã‚¹ã‚¯ãƒªãƒ—トを繰り返ã—呼ã³å‡ºã™äºˆå®šãŒã‚ã‚‹å ´åˆã€[`Executable` テーブルエンジン](../../engines/table-engines/special/executable.md)を使用ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。 +::: + +以下㮠Python スクリプト㯠`generate_random.py` ã¨ã„ã†åå‰ã§ã€`user_scripts` フォルダã«ä¿å­˜ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ã‚¹ã‚¯ãƒªãƒ—トã¯æ•°å€¤ `i` を読ã¿å–ã‚Šã€ã‚¿ãƒ–ã§åŒºåˆ‡ã‚‰ã‚ŒãŸç•ªå·ãŒå‰ã«ã¤ã `i` 個ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæ–‡å­—列を出力ã—ã¾ã™ã€‚ + +```python +#!/usr/local/bin/python3.9 + +import sys +import string +import random + +def main(): + + # Read input value + for number in sys.stdin: + i = int(number) + + # Generate some random rows + for id in range(0, i): + letters = string.ascii_letters + random_string = ''.join(random.choices(letters ,k=10)) + print(str(id) + '\t' + random_string + '\n', end='') + + # Flush results to stdout + sys.stdout.flush() + +if __name__ == "__main__": + main() +``` + +ã“ã®ã‚¹ã‚¯ãƒªãƒ—トを呼ã³å‡ºã—ã€ãƒ©ãƒ³ãƒ€ãƒ æ–‡å­—列を10個生æˆã—ã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +SELECT * FROM executable('generate_random.py', TabSeparated, 'id UInt32, random String', (SELECT 10)) +``` + +レスãƒãƒ³ã‚¹ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + +```response +┌─id─┬─random─────┠+│ 0 │ xheXXCiSkH │ +│ 1 │ AqxvHAoTrl │ +│ 2 │ JYvPCEbIkY │ +│ 3 │ sWgnqJwGRm │ +│ 4 │ fTZGrjcLon │ +│ 5 │ ZQINGktPnd │ +│ 6 │ YFSvGGoezb │ +│ 7 │ QyMJJZOOia │ +│ 8 │ NfiyDDhmcI │ +│ 9 │ REJRdJpWrg │ +└────┴────────────┘ +``` + +## 設定 + +- `send_chunk_header` - データ処ç†ã®ãƒãƒ£ãƒ³ã‚¯ã‚’é€ä¿¡ã™ã‚‹å‰ã«è¡Œæ•°ã‚’é€ä¿¡ã™ã‚‹ã‹ã©ã†ã‹ã‚’制御ã—ã¾ã™ã€‚デフォルト値㯠`false` ã§ã™ã€‚ +- `pool_size` — プールã®ã‚µã‚¤ã‚ºã€‚`pool_size` ã« `0` ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ãƒ—ールサイズã®åˆ¶é™ã¯ã‚ã‚Šã¾ã›ã‚“。デフォルト値㯠`16` ã§ã™ã€‚ +- `max_command_execution_time` — データブロックを処ç†ã™ã‚‹ãŸã‚ã®å®Ÿè¡Œå¯èƒ½ã‚¹ã‚¯ãƒªãƒ—トコマンドã®æœ€å¤§å®Ÿè¡Œæ™‚間。秒å˜ä½ã§æŒ‡å®šã€‚デフォルト値㯠10。 +- `command_termination_timeout` — 実行å¯èƒ½ã‚¹ã‚¯ãƒªãƒ—トã¯ãƒ¡ã‚¤ãƒ³ã®èª­ã¿æ›¸ãループをå«ã‚“ã§ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚テーブル関数ãŒç ´æ£„ã•ã‚Œã‚‹ã¨ãƒ‘イプãŒé–‰ã˜ã€å®Ÿè¡Œå¯èƒ½ãƒ•ã‚¡ã‚¤ãƒ«ã¯çµ‚了ã™ã‚‹ã¾ã§ `command_termination_timeout` 秒をæŒã¡ã€ClickHouse ãŒå­ãƒ—ロセス㫠SIGTERM シグナルをé€ã‚‹å‰ã«çµ‚了ã—ã¾ã™ã€‚秒å˜ä½ã§æŒ‡å®šã€‚デフォルト値㯠10。 +- `command_read_timeout` - コマンド㮠stdout ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–るタイムアウトをミリ秒ã§æŒ‡å®šã€‚デフォルト値㯠10000。 +- `command_write_timeout` - コマンド㮠stdin ã¸ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むタイムアウトをミリ秒ã§æŒ‡å®šã€‚デフォルト値㯠10000。 + +## クエリçµæžœã‚’スクリプトã«æ¸¡ã™ + +クエリçµæžœã‚’スクリプトã«æ¸¡ã™æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[`Executable` テーブルエンジン](../../engines/table-engines/special/executable.md#passing-query-results-to-a-script)ã®ä¾‹ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。ã“ã®ä¾‹ã®ã‚¹ã‚¯ãƒªãƒ—トを`executable` テーブル関数ã§å®Ÿè¡Œã™ã‚‹æ–¹æ³•ã¯æ¬¡ã®é€šã‚Šã§ã™ï¼š + +```sql +SELECT * FROM executable( + 'sentiment.py', + TabSeparated, + 'id UInt64, sentiment Float32', + (SELECT id, comment FROM hackernews WHERE id > 0 AND comment != '' LIMIT 20) +); +``` diff --git a/docs/ja/sql-reference/table-functions/file.md b/docs/ja/sql-reference/table-functions/file.md new file mode 100644 index 00000000000..b86c5e187e3 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/file.md @@ -0,0 +1,230 @@ +--- +slug: /ja/sql-reference/table-functions/file +sidebar_position: 60 +sidebar_label: file +--- + +# file + +`file`ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã—ã¦SELECTæ–‡ã¨INSERT文を実行ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルエンジンã§ã‚ã‚Šã€[s3](/docs/ja/sql-reference/table-functions/url.md)テーブル関数ã«ä¼¼ãŸãƒ†ãƒ¼ãƒ–ルライクãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ローカルファイルを扱ã†éš›ã«ã¯`file()`を使用ã—ã€S3ã€GCSã€MinIOãªã©ã®ã‚ªãƒ–ジェクトストレージã®ãƒã‚±ãƒƒãƒˆã‚’扱ã†éš›ã«ã¯`s3()`を使用ã—ã¾ã™ã€‚ + +`file`関数ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚“ã ã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込むãŸã‚ã«`SELECT`ãŠã‚ˆã³`INSERT`クエリã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**構文** + +```sql +file([path_to_archive ::] path [,format] [,structure] [,compression]) +``` + +**パラメータ** + +- `path` — [user_files_path](/docs/ja/operations/server-configuration-parameters/settings.md#user_files_path)ã‹ã‚‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ç›¸å¯¾ãƒ‘スã§ã™ã€‚読ã¿å–り専用モードã§ä»¥ä¸‹ã®[グロブ](#globs-in-path)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚`*`ã€`?`ã€`{abc,def}`(`'abc'`ã¨`'def'`ã¯æ–‡å­—列)ã€ãŠã‚ˆã³`{N..M}`(`N`ã¨`M`ã¯æ•°å€¤ï¼‰ã€‚ +- `path_to_archive` - zip/tar/7zアーカイブã¸ã®ç›¸å¯¾ãƒ‘ス。åŒã˜ã‚°ãƒ­ãƒ–ã‚’`path`ã¨å…±ã«ã‚µãƒãƒ¼ãƒˆã€‚ +- `format` — ファイルã®[フォーマット](/docs/ja/interfaces/formats.md#formats)。 +- `structure` — テーブルã®æ§‹é€ ã€‚å½¢å¼ï¼š `'column1_name column1_type, column2_name column2_type, ...'`。 +- `compression` — `SELECT`クエリã§ä½¿ç”¨ã™ã‚‹æ—¢å­˜ã®åœ§ç¸®ã‚¿ã‚¤ãƒ—ã€ã¾ãŸã¯`INSERT`クエリã§ä½¿ç”¨ã™ã‚‹å¸Œæœ›ã®åœ§ç¸®ã‚¿ã‚¤ãƒ—。サãƒãƒ¼ãƒˆã•ã‚Œã‚‹åœ§ç¸®ã‚¿ã‚¤ãƒ—ã¯`gz`ã€`br`ã€`xz`ã€`zst`ã€`lz4`ã€ãŠã‚ˆã³`bz2`ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +ファイル内ã®ãƒ‡ãƒ¼ã‚¿ã®èª­ã¿æ›¸ãã«ä½¿ç”¨ã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ル。 + +## ファイルã¸ã®æ›¸ãè¾¼ã¿ä¾‹ + +### TSVファイルã«æ›¸ã込む + +```sql +INSERT INTO TABLE FUNCTION +file('test.tsv', 'TSV', 'column1 UInt32, column2 UInt32, column3 UInt32') +VALUES (1, 2, 3), (3, 2, 1), (1, 3, 2) +``` + +çµæžœã¨ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã¯`test.tsv`ファイルã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ï¼š + +```bash +# cat /var/lib/clickhouse/user_files/test.tsv +1 2 3 +3 2 1 +1 3 2 +``` + +### 複数ã®TSVファイルã¸ã®ãƒ‘ーティション化ã•ã‚ŒãŸæ›¸ã込㿠+ +`file()`åž‹ã®ãƒ†ãƒ¼ãƒ–ル関数ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹éš›ã«`PARTITION BY`å¼ã‚’指定ã™ã‚‹ã¨ã€å„パーティションã”ã¨ã«å€‹åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒä½œæˆã•ã‚Œã¾ã™ã€‚データを別々ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã§èª­ã¿å–ã‚Šæ“作ã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +INSERT INTO TABLE FUNCTION +file('test_{_partition_id}.tsv', 'TSV', 'column1 UInt32, column2 UInt32, column3 UInt32') +PARTITION BY column3 +VALUES (1, 2, 3), (3, 2, 1), (1, 3, 2) +``` + +çµæžœã¨ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã¯3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã€`test_1.tsv`ã€`test_2.tsv`ã€`test_3.tsv`ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +```bash +# cat /var/lib/clickhouse/user_files/test_1.tsv +3 2 1 + +# cat /var/lib/clickhouse/user_files/test_2.tsv +1 3 2 + +# cat /var/lib/clickhouse/user_files/test_3.tsv +1 2 3 +``` + +## ファイルã‹ã‚‰ã®èª­ã¿å–り例 + +### CSVファイルã‹ã‚‰ã®SELECT + +ã¾ãšã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šã§`user_files_path`を設定ã—ã€`test.csv`ファイルを準備ã—ã¾ã™ï¼š + +```bash +$ grep user_files_path /etc/clickhouse-server/config.xml + /var/lib/clickhouse/user_files/ + +$ cat /var/lib/clickhouse/user_files/test.csv + 1,2,3 + 3,2,1 + 78,43,45 +``` + +次ã«ã€`test.csv`ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’テーブルã«èª­ã¿è¾¼ã¿ã€æœ€åˆã®2行をé¸æŠžã—ã¾ã™ï¼š + +```sql +SELECT * FROM +file('test.csv', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32') +LIMIT 2; +``` + +```text +┌─column1─┬─column2─┬─column3─┠+│ 1 │ 2 │ 3 │ +│ 3 │ 2 │ 1 │ +└─────────┴─────────┴─────────┘ +``` + +### ファイルã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥ + +```sql +INSERT INTO FUNCTION +file('test.csv', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32') +VALUES (1, 2, 3), (3, 2, 1); +``` +```sql +SELECT * FROM +file('test.csv', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32'); +``` + +```text +┌─column1─┬─column2─┬─column3─┠+│ 1 │ 2 │ 3 │ +│ 3 │ 2 │ 1 │ +└─────────┴─────────┴─────────┘ +``` + +`archive1.zip`ã¾ãŸã¯`archive2.zip`ã«ã‚ã‚‹`table.csv`ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®èª­ã¿è¾¼ã¿ï¼š + +```sql +SELECT * FROM file('user_files/archives/archive{1..2}.zip :: table.csv'); +``` + +## パスã®ã‚°ãƒ­ãƒ– + +パスã«ã¯ã‚°ãƒ­ãƒ“ングを使用ã§ãã¾ã™ã€‚ファイルã¯ãƒ‘スパターン全体ã«ãƒžãƒƒãƒã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€æŽ¥é ­è¾žã¾ãŸã¯æŽ¥å°¾è¾žã®ã¿ã§ã¯ã‚ã‚Šã¾ã›ã‚“。パスãŒæ—¢å­˜ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’指ã—ã€ã‚°ãƒ­ãƒ–を使用ã—ãªã„å ´åˆã€ãã®ãƒ‘スã«ã¯æš—黙的ã«`*`ãŒè¿½åŠ ã•ã‚Œã€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒé¸æŠžã•ã‚Œã‚‹ã¨ã„ã†ä¸€ä¾‹å¤–ãŒã‚ã‚Šã¾ã™ã€‚ + +- `*` — 空文字列をå«ã¿ã¾ã™ãŒ`/`を除ãä»»æ„ã®æ–‡å­—。 +- `?` — ä»»æ„ã®å˜ä¸€æ–‡å­—。 +- `{some_string,another_string,yet_another_one}` — 文字列 `'some_string'`, `'another_string'`, `'yet_another_one'` ã®ã„ãšã‚Œã‹ã‚’ç½®æ›ã§ãã¾ã™ã€‚文字列ã«ã¯`/`ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- `{N..M}` — `N >=` ãŠã‚ˆã³ `<= M` ã®ä»»æ„ã®æ•°ã€‚ +- `**` - フォルダ内ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†å¸°çš„ã«è¡¨ã—ã¾ã™ã€‚ + +`{}`を使用ã—ãŸæ§‹é€ ã¯[remote](remote.md)ã‚„[hdfs](hdfs.md)テーブル関数ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +**例** + +以下ã®ç›¸å¯¾ãƒ‘スをæŒã¤ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š + +- `some_dir/some_file_1` +- `some_dir/some_file_2` +- `some_dir/some_file_3` +- `another_dir/some_file_1` +- `another_dir/some_file_2` +- `another_dir/some_file_3` + +ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®è¡Œæ•°ã‚’クエリã—ã¾ã™ï¼š + +```sql +SELECT count(*) FROM file('{some,another}_dir/some_file_{1..3}', 'TSV', 'name String, value UInt32'); +``` + +åŒã˜çµæžœã‚’é”æˆã™ã‚‹åˆ¥ã®ãƒ‘ス表ç¾ï¼š + +```sql +SELECT count(*) FROM file('{some,another}_dir/*', 'TSV', 'name String, value UInt32'); +``` + +暗黙的ãª`*`を使用ã—ã¦`some_dir`内ã®ã™ã¹ã¦ã®è¡Œæ•°ã‚’クエリã—ã¾ã™ï¼š + +```sql +SELECT count(*) FROM file('some_dir', 'TSV', 'name String, value UInt32'); +``` + +:::note +ファイルリストã«å…ˆè¡Œã‚¼ãƒ­ã‚’æŒã¤æ•°ç¯„囲ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€å„æ¡ã«å¯¾ã—ã¦ä¸­æ‹¬å¼§ã‚’使用ã™ã‚‹æ§‹é€ ã‚’使用ã™ã‚‹ã‹ã€`?`を使用ã—ã¾ã™ã€‚ +::: + +**例** + +`file000`, `file001`, ..., `file999`ã¨ã„ã†ãƒ•ã‚¡ã‚¤ãƒ«ã«å«ã¾ã‚Œã‚‹åˆè¨ˆè¡Œæ•°ã‚’クエリã—ã¾ã™ï¼š + +```sql +SELECT count(*) FROM file('big_dir/file{0..9}{0..9}{0..9}', 'CSV', 'name String, value UInt32'); +``` + +**例** + +ディレクトリ`big_dir/`内ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰å†å¸°çš„ã«è¡Œæ•°ã‚’クエリã—ã¾ã™ï¼š + +```sql +SELECT count(*) FROM file('big_dir/**', 'CSV', 'name String, value UInt32'); +``` + +**例** + +ディレクトリ`big_dir/`内ã®ä»»æ„ã®ãƒ•ã‚©ãƒ«ãƒ€å†…ã«ã‚るファイル`file002`ã‹ã‚‰å†å¸°çš„ã«ã™ã¹ã¦ã®è¡Œæ•°ã‚’クエリã—ã¾ã™ï¼š + +```sql +SELECT count(*) FROM file('big_dir/**/file002', 'CSV', 'name String, value UInt32'); +``` + +## 仮想カラム {#virtual-columns} + +- `_path` — ファイルã¸ã®ãƒ‘ス。型:`LowCardinalty(String)`。 +- `_file` — ファイルå。型:`LowCardinalty(String)`。 +- `_size` — ãƒã‚¤ãƒˆå˜ä½ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚µã‚¤ã‚ºã€‚型:`Nullable(UInt64)`。ファイルサイズãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL` ã«ãªã‚Šã¾ã™ã€‚ +- `_time` — ファイルã®æœ€çµ‚更新時刻。型:`Nullable(DateTime)`。時間ãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯`NULL`ã«ãªã‚Šã¾ã™ã€‚ + +## Hiveスタイルã®ãƒ‘ーティション化 {#hive-style-partitioning} + +`use_hive_partitioning`設定を1ã«è¨­å®šã™ã‚‹ã¨ã€ClickHouseã¯ãƒ‘ス内ã®Hiveスタイルã®ãƒ‘ーティション化(`/name=value/`)を検出ã—ã€ãƒ‘ーティションカラムをクエリ内ã§ä»®æƒ³ã‚«ãƒ©ãƒ ã¨ã—ã¦ä½¿ç”¨ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ã“れらã®ä»®æƒ³ã‚«ãƒ©ãƒ ã¯ãƒ‘ーティション化ã•ã‚ŒãŸãƒ‘スã®ã‚«ãƒ©ãƒ åã¨åŒã˜ã§ã™ãŒã€å…ˆé ­ã«`_`ãŒä»˜ãã¾ã™ã€‚ + +**例** + +Hiveスタイルã®ãƒ‘ーティション化ã§ä½œæˆã•ã‚ŒãŸä»®æƒ³ã‚«ãƒ©ãƒ ã‚’使用 + +```sql +SET use_hive_partitioning = 1; +SELECT * from file('data/path/date=*/country=*/code=*/*.parquet') where _date > '2020-01-01' and _country = 'Netherlands' and _code = 42; +``` + +## 設定 {#settings} + +- [engine_file_empty_if_not_exists](/docs/ja/operations/settings/settings.md#engine-file-empty_if-not-exists) - 存在ã—ãªã„ファイルã‹ã‚‰ç©ºã®ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [engine_file_truncate_on_insert](/docs/ja/operations/settings/settings.md#engine-file-truncate-on-insert) - 挿入å‰ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’切り詰ã‚ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [engine_file_allow_create_multiple_files](/docs/ja/operations/settings/settings.md#engine_file_allow_create_multiple_files) - フォーマットã«ã‚µãƒ•ã‚£ãƒƒã‚¯ã‚¹ãŒã‚ã‚‹å ´åˆã€å„挿入ã§æ–°ã—ã„ファイルを作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [engine_file_skip_empty_files](/docs/ja/operations/settings/settings.md#engine_file_skip_empty_files) - 読ã¿å–り中ã«ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [storage_file_read_method](/docs/ja/operations/settings/settings.md#engine-file-empty_if-not-exists) - ストレージファイルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–る方法ã®1ã¤ã€‚read, pread, mmap(clickhouse-localã®ã¿ï¼‰ã€‚デフォルト値:`clickhouse-server`ã§ã¯`pread`ã€`clickhouse-local`ã§ã¯`mmap`。 + +**関連項目** + +- [Virtual columns](/docs/ja/engines/table-engines/index.md#table_engines-virtual_columns) +- [処ç†å¾Œã«ãƒ•ã‚¡ã‚¤ãƒ«ã®åå‰ã‚’変更ã™ã‚‹](/docs/ja/operations/settings/settings.md#rename_files_after_processing) diff --git a/docs/ja/sql-reference/table-functions/fileCluster.md b/docs/ja/sql-reference/table-functions/fileCluster.md new file mode 100644 index 00000000000..1c09b907d93 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/fileCluster.md @@ -0,0 +1,82 @@ +--- +slug: /ja/sql-reference/table-functions/fileCluster +sidebar_position: 61 +sidebar_label: fileCluster +--- + +# fileCluster テーブル関数 + +クラスター内ã®è¤‡æ•°ã®ãƒŽãƒ¼ãƒ‰ã§ã€æŒ‡å®šã•ã‚ŒãŸãƒ‘スã«ä¸€è‡´ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’åŒæ™‚ã«å‡¦ç†ã§ãるよã†ã«ã—ã¾ã™ã€‚イニシエーターã¯ãƒ¯ãƒ¼ã‚«ãƒ¼ãƒŽãƒ¼ãƒ‰ã¸ã®æŽ¥ç¶šã‚’確立ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘スã®ã‚°ãƒ­ãƒ–を展開ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«èª­ã¿å–りタスクをワーカーノードã«å§”ä»»ã—ã¾ã™ã€‚å„ワーカーノードã¯ã€æ¬¡ã«å‡¦ç†ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’イニシエーターã«ã‚¯ã‚¨ãƒªã—ã¦è¦æ±‚ã—ã€ã™ã¹ã¦ã®ã‚¿ã‚¹ã‚¯ãŒå®Œäº†ã™ã‚‹ã¾ã§ï¼ˆã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒèª­ã¿å–られるã¾ã§ï¼‰ã“ã®ãƒ—ロセスを繰り返ã—ã¾ã™ã€‚ + +:::note +ã“ã®é–¢æ•°ãŒ_æ­£ã—ã_動作ã™ã‚‹ã®ã¯ã€æœ€åˆã«æŒ‡å®šã•ã‚ŒãŸãƒ‘スã«ä¸€è‡´ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚»ãƒƒãƒˆãŒã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã§åŒä¸€ã§ã‚ã‚Šã€ç•°ãªã‚‹ãƒŽãƒ¼ãƒ‰é–“ã§ã‚‚内容ãŒä¸€è‡´ã—ã¦ã„ã‚‹å ´åˆã«é™ã‚Šã¾ã™ã€‚ +ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒãƒŽãƒ¼ãƒ‰é–“ã§ç•°ãªã‚‹å ´åˆã€ãƒ¯ãƒ¼ã‚«ãƒ¼ãƒŽãƒ¼ãƒ‰ãŒã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ãƒ¼ã‹ã‚‰ã‚¿ã‚¹ã‚¯ã‚’è¦æ±‚ã™ã‚‹é †åºã«ä¾å­˜ã™ã‚‹ãŸã‚ã€è¿”ã•ã‚Œã‚‹å€¤ã¯äºˆæ¸¬ã§ãã¾ã›ã‚“。 +::: + +**構文** + +``` sql +fileCluster(cluster_name, path[, format, structure, compression_method]) +``` + +**引数** + +- `cluster_name` — リモートãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒ«ã‚µãƒ¼ãƒãƒ¼ã¸ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã¨æŽ¥ç¶šãƒ‘ラメータã®ã‚»ãƒƒãƒˆã‚’構築ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®åå‰ã€‚ +- `path` — [user_files_path](/docs/ja/operations/server-configuration-parameters/settings.md#user_files_path) ã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ç›¸å¯¾ãƒ‘ス。ファイルã¸ã®ãƒ‘スã¯[グロブ](#globs-in-path)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +- `format` — ファイルã®[フォーマット](../../interfaces/formats.md#formats)。タイプ: [String](../../sql-reference/data-types/string.md)。 +- `structure` — `'UserID UInt64, Name String'`å½¢å¼ã®ãƒ†ãƒ¼ãƒ–ル構造。カラムåã¨ã‚¿ã‚¤ãƒ—を決定ã—ã¾ã™ã€‚タイプ: [String](../../sql-reference/data-types/string.md)。 +- `compression_method` — 圧縮方å¼ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã‚‹åœ§ç¸®ã‚¿ã‚¤ãƒ—㯠`gz`ã€`br`ã€`xz`ã€`zst`ã€`lz4`ã€`bz2` ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨æ§‹é€ ã‚’æŒã¡ã€æŒ‡å®šã•ã‚ŒãŸãƒ‘スã«ä¸€è‡´ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ル。 + +**例** + +`my_cluster` ã¨ã„ã†åå‰ã®ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã¨ã€ä»¥ä¸‹ã®è¨­å®šå€¤ `user_files_path` ãŒä¸Žãˆã‚‰ã‚Œã¦ã„ã‚‹å ´åˆ: + +``` bash +$ grep user_files_path /etc/clickhouse-server/config.xml + /var/lib/clickhouse/user_files/ +``` +ã¾ãŸã€å„クラスターノード㮠`user_files_path` 内㫠`test1.csv` 㨠`test2.csv` ãŒã‚ã‚Šã€ãã®å†…容ãŒç•°ãªã‚‹ãƒŽãƒ¼ãƒ‰é–“ã§åŒä¸€ã§ã‚ã‚‹å ´åˆ: +```bash +$ cat /var/lib/clickhouse/user_files/test1.csv + 1,"file1" + 11,"file11" + +$ cat /var/lib/clickhouse/user_files/test2.csv + 2,"file2" + 22,"file22" +``` + +例ãˆã°ã€ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å„クラスターノードã§æ¬¡ã®2ã¤ã®ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ã§ä½œæˆã§ãã¾ã™: +```sql +INSERT INTO TABLE FUNCTION file('file1.csv', 'CSV', 'i UInt32, s String') VALUES (1,'file1'), (11,'file11'); +INSERT INTO TABLE FUNCTION file('file2.csv', 'CSV', 'i UInt32, s String') VALUES (2,'file2'), (22,'file22'); +``` + +次ã«ã€`fileCluster` テーブル関数を通ã˜ã¦ `test1.csv` 㨠`test2.csv` ã®ãƒ‡ãƒ¼ã‚¿å†…容を読ã¿å–ã‚Šã¾ã™: + +```sql +SELECT * FROM fileCluster('my_cluster', 'file{1,2}.csv', 'CSV', 'i UInt32, s String') ORDER BY i, s +``` + +``` +┌──i─┬─s──────┠+│ 1 │ file1 │ +│ 11 │ file11 │ +└────┴────────┘ +┌──i─┬─s──────┠+│ 2 │ file2 │ +│ 22 │ file22 │ +└────┴────────┘ +``` + +## パスã«ãŠã‘るグロブ + +[File](../../sql-reference/table-functions/file.md#globs-in-path) テーブル関数ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ãƒ‘ターンãŒã€FileClusterã§ã‚‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**関連項目** + +- [Fileテーブル関数](../../sql-reference/table-functions/file.md) diff --git a/docs/ja/sql-reference/table-functions/format.md b/docs/ja/sql-reference/table-functions/format.md new file mode 100644 index 00000000000..7a3765a2552 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/format.md @@ -0,0 +1,98 @@ +--- +slug: /ja/sql-reference/table-functions/format +sidebar_position: 65 +sidebar_label: format +--- + +# format + +指定ã•ã‚ŒãŸå…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«å¾“ã£ã¦ã€å¼•æ•°ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’解æžã—ã¾ã™ã€‚ã‚‚ã—構造引数ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰æŠ½å‡ºã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +format(format_name, [structure], data) +``` + +**パラメータ** + +- `format_name` — データã®[フォーマット](../../interfaces/formats.md#formats)。 +- `structure` - テーブルã®æ§‹é€ ã€‚オプション。形å¼ã¯ 'column1_name column1_type, column2_name column2_type, ...'。 +- `data` — 指定ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€æ–‡å­—列を返ã™æ–‡å­—列リテラルã¾ãŸã¯å®šæ•°å¼ + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨æŒ‡å®šã¾ãŸã¯æŠ½å‡ºã•ã‚ŒãŸæ§‹é€ ã«å¾“ã£ã¦`data`引数ã‹ã‚‰è§£æžã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ†ãƒ¼ãƒ–ル。 + +**例** + +`structure`引数ãªã—: + +**クエリ:** +``` sql +SELECT * FROM format(JSONEachRow, +$$ +{"a": "Hello", "b": 111} +{"a": "World", "b": 123} +{"a": "Hello", "b": 112} +{"a": "World", "b": 124} +$$) +``` + +**çµæžœ:** + +```response +┌───b─┬─a─────┠+│ 111 │ Hello │ +│ 123 │ World │ +│ 112 │ Hello │ +│ 124 │ World │ +└─────┴───────┘ +``` + +**クエリ:** +```sql +DESC format(JSONEachRow, +$$ +{"a": "Hello", "b": 111} +{"a": "World", "b": 123} +{"a": "Hello", "b": 112} +{"a": "World", "b": 124} +$$) +``` + +**çµæžœ:** + +```response +┌─name─┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┠+│ b │ Nullable(Float64) │ │ │ │ │ │ +│ a │ Nullable(String) │ │ │ │ │ │ +└──────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ +``` + +`structure`引数ã‚ã‚Š: + +**クエリ:** +```sql +SELECT * FROM format(JSONEachRow, 'a String, b UInt32', +$$ +{"a": "Hello", "b": 111} +{"a": "World", "b": 123} +{"a": "Hello", "b": 112} +{"a": "World", "b": 124} +$$) +``` + +**çµæžœ:** +```response +┌─a─────┬───b─┠+│ Hello │ 111 │ +│ World │ 123 │ +│ Hello │ 112 │ +│ World │ 124 │ +└───────┴─────┘ +``` + +**関連項目** + +- [フォーマット](../../interfaces/formats.md) diff --git a/docs/ja/sql-reference/table-functions/fuzzJSON.md b/docs/ja/sql-reference/table-functions/fuzzJSON.md new file mode 100644 index 00000000000..33a9aab3a31 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/fuzzJSON.md @@ -0,0 +1,97 @@ +--- +slug: /ja/sql-reference/table-functions/fuzzJSON +sidebar_position: 75 +sidebar_label: fuzzJSON +--- + +# fuzzJSON + +JSON文字列ã«ãƒ©ãƒ³ãƒ€ãƒ ãªå¤‰å‹•ã‚’加ãˆã‚‹ã€‚ + +``` sql +fuzzJSON({ named_collection [, option=value [,..]] | json_str[, random_seed] }) +``` + +**引数** + +- `named_collection` - [NAMED COLLECTION](/docs/ja/sql-reference/statements/create/named-collection.md)。 +- `option=value` - Named collectionã®ã‚ªãƒ—ションパラメータã¨ãã®å€¤ã€‚ + - `json_str` (String) - JSONフォーマットã§æ§‹é€ åŒ–データを表ã™å…ƒã®æ–‡å­—列。 + - `random_seed` (UInt64) - 安定ã—ãŸçµæžœã‚’生æˆã™ã‚‹ãŸã‚ã®æ‰‹å‹•ãƒ©ãƒ³ãƒ€ãƒ ã‚·ãƒ¼ãƒ‰ã€‚ + - `reuse_output` (boolean) - 生æˆã•ã‚ŒãŸå‡ºåŠ›ã‚’次ã®ãƒ•ã‚¡ã‚ºå‡¦ç†ã®å…¥åŠ›ã¨ã—ã¦å†åˆ©ç”¨ã™ã‚‹ã€‚ + - `malform_output` (boolean) - JSONオブジェクトã¨ã—ã¦è§£æžä¸èƒ½ãªæ–‡å­—列を生æˆã™ã‚‹ã€‚ + - `max_output_length` (UInt64) - 生æˆã¾ãŸã¯å¤‰å‹•ã—ãŸJSON文字列ã®è¨±å®¹ã•ã‚Œã‚‹æœ€å¤§é•·ã€‚ + - `probability` (Float64) - JSONフィールド(キー-値ペア)をファズ化ã™ã‚‹ç¢ºçŽ‡ã€‚範囲ã¯[0, 1]。 + - `max_nesting_level` (UInt64) - JSONデータ内ã§è¨±å¯ã•ã‚Œã‚‹ãƒã‚¹ãƒˆæ§‹é€ ã®æœ€å¤§æ·±ã•ã€‚ + - `max_array_size` (UInt64) - JSONé…列ã®è¨±å¯ã•ã‚Œã‚‹æœ€å¤§ã‚µã‚¤ã‚ºã€‚ + - `max_object_size` (UInt64) - JSONオブジェクトã®å˜ä¸€ãƒ¬ãƒ™ãƒ«ã§ã®è¨±å®¹ã•ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®æœ€å¤§æ•°ã€‚ + - `max_string_value_length` (UInt64) - Stringåž‹ã®å€¤ã®æœ€å¤§é•·ã€‚ + - `min_key_length` (UInt64) - キーã®æœ€å°é•·ã€‚å°‘ãªãã¨ã‚‚1ã§ã‚ã‚‹ã¹ã。 + - `max_key_length` (UInt64) - キーã®æœ€å¤§é•·ã€‚指定ã•ã‚Œã¦ã„ã‚‹å ´åˆã€`min_key_length`以上ã§ã‚ã‚‹ã¹ã。 + +**戻り値** + +変動ã—ãŸJSON文字列をå«ã‚€å˜ä¸€ã‚«ãƒ©ãƒ ã®ãƒ†ãƒ¼ãƒ–ルオブジェクト。 + +## 使用例 + +``` sql +CREATE NAMED COLLECTION json_fuzzer AS json_str='{}'; +SELECT * FROM fuzzJSON(json_fuzzer) LIMIT 3; +``` + +``` text +{"52Xz2Zd4vKNcuP2":true} +{"UPbOhOQAdPKIg91":3405264103600403024} +{"X0QUWu8yT":[]} +``` + +``` sql +SELECT * FROM fuzzJSON(json_fuzzer, json_str='{"name" : "value"}', random_seed=1234) LIMIT 3; +``` + +``` text +{"key":"value", "mxPG0h1R5":"L-YQLv@9hcZbOIGrAn10%GA"} +{"BRE3":true} +{"key":"value", "SWzJdEJZ04nrpSfy":[{"3Q23y":[]}]} +``` + +``` sql +SELECT * FROM fuzzJSON(json_fuzzer, json_str='{"students" : ["Alice", "Bob"]}', reuse_output=true) LIMIT 3; +``` + +``` text +{"students":["Alice", "Bob"], "nwALnRMc4pyKD9Krv":[]} +{"students":["1rNY5ZNs0wU&82t_P", "Bob"], "wLNRGzwDiMKdw":[{}]} +{"xeEk":["1rNY5ZNs0wU&82t_P", "Bob"], "wLNRGzwDiMKdw":[{}, {}]} +``` + +``` sql +SELECT * FROM fuzzJSON(json_fuzzer, json_str='{"students" : ["Alice", "Bob"]}', max_output_length=512) LIMIT 3; +``` + +``` text +{"students":["Alice", "Bob"], "BREhhXj5":true} +{"NyEsSWzJdeJZ04s":["Alice", 5737924650575683711, 5346334167565345826], "BjVO2X9L":true} +{"NyEsSWzJdeJZ04s":["Alice", 5737924650575683711, 5346334167565345826], "BjVO2X9L":true, "k1SXzbSIz":[{}]} +``` + +``` sql +SELECT * FROM fuzzJSON('{"id":1}', 1234) LIMIT 3; +``` + +``` text +{"id":1, "mxPG0h1R5":"L-YQLv@9hcZbOIGrAn10%GA"} +{"BRjE":16137826149911306846} +{"XjKE":15076727133550123563} +``` + +``` sql +SELECT * FROM fuzzJSON(json_nc, json_str='{"name" : "FuzzJSON"}', random_seed=1337, malform_output=true) LIMIT 3; +``` + +``` text +U"name":"FuzzJSON*"SpByjZKtr2VAyHCO"falseh +{"name"keFuzzJSON, "g6vVO7TCIk":jTt^ +{"DBhz":YFuzzJSON5} +``` diff --git a/docs/ja/sql-reference/table-functions/fuzzQuery.md b/docs/ja/sql-reference/table-functions/fuzzQuery.md new file mode 100644 index 00000000000..2aabc044ca7 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/fuzzQuery.md @@ -0,0 +1,36 @@ +--- +slug: /ja/sql-reference/table-functions/fuzzQuery +sidebar_position: 75 +sidebar_label: fuzzQuery +--- + +# fuzzQuery + +指定ã•ã‚ŒãŸã‚¯ã‚¨ãƒªæ–‡å­—列をランダムãªãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã§æ’¹ä¹±ã—ã¾ã™ã€‚ + +``` sql +fuzzQuery(query[, max_query_length[, random_seed]]) +``` + +**引数** + +- `query` (String) - ファズ化を行ã†å…ƒã®ã‚¯ã‚¨ãƒªã€‚ +- `max_query_length` (UInt64) - ファズ化プロセス中ã«ã‚¯ã‚¨ãƒªãŒåˆ°é”ã§ãる最大長。 +- `random_seed` (UInt64) - 安定ã—ãŸçµæžœã‚’出力ã™ã‚‹ãŸã‚ã®ãƒ©ãƒ³ãƒ€ãƒ ã‚·ãƒ¼ãƒ‰ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +擾乱ã•ã‚ŒãŸã‚¯ã‚¨ãƒªæ–‡å­—列をå«ã‚€å˜ä¸€ã‚«ãƒ©ãƒ ã®ãƒ†ãƒ¼ãƒ–ルオブジェクト。 + +## 使用例 + +``` sql +SELECT * FROM fuzzQuery('SELECT materialize(\'a\' AS key) GROUP BY key') LIMIT 2; +``` + +``` + ┌─query──────────────────────────────────────────────────────────┠+1. │ SELECT 'a' AS key GROUP BY key │ +2. │ EXPLAIN PIPELINE compact = true SELECT 'a' AS key GROUP BY key │ + └────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/table-functions/gcs.md b/docs/ja/sql-reference/table-functions/gcs.md new file mode 100644 index 00000000000..8c7160c2b94 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/gcs.md @@ -0,0 +1,208 @@ +--- +slug: /ja/sql-reference/table-functions/gcs +sidebar_position: 70 +sidebar_label: gcs +keywords: [gcs, bucket] +--- + +# gcs テーブル関数 + +[Google Cloud Storage](https://cloud.google.com/storage/) ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ `SELECT` ãŠã‚ˆã³ `INSERT` ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルライクãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚[`Storage Object User` IAM ロール](https://cloud.google.com/storage/docs/access-control/iam-roles) ãŒå¿…è¦ã§ã™ã€‚ + +ã“れ㯠[s3 テーブル関数](../../sql-reference/table-functions/s3.md) ã®åˆ¥åã§ã™ã€‚ + +クラスターã«è¤‡æ•°ã®ãƒ¬ãƒ—リカãŒã‚ã‚‹å ´åˆã€[s3Cluster 関数](../../sql-reference/table-functions/s3Cluster.md)(GCS ã¨å…±ã«å‹•ä½œã—ã¾ã™ï¼‰ã‚’使用ã—ã¦æŒ¿å…¥ã‚’並列化ã§ãã¾ã™ã€‚ + +**構文** + +``` sql +gcs(url [, NOSIGN | hmac_key, hmac_secret] [,format] [,structure] [,compression_method]) +gcs(named_collection[, option=value [,..]]) +``` + +:::tip GCS +GCS テーブル関数ã¯ã€GCS XML API 㨠HMAC キーを使用ã—㦠Google Cloud Storage ã«çµ±åˆã—ã¾ã™ã€‚エンドãƒã‚¤ãƒ³ãƒˆã¨ HMAC ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[Google ã®ç›¸äº’é‹ç”¨æ€§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://cloud.google.com/storage/docs/interoperability)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +::: + +**パラメータ** + +- `url` — ファイルã¸ã®ãƒã‚±ãƒƒãƒˆãƒ‘ス。読ã¿å–り専用モードã§ä»¥ä¸‹ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ï¼š`*`, `**`, `?`, `{abc, def}` 㨠`{N..M}` (`N`, `M` — æ•°å­—, `'abc'`, `'def'` — 文字列)。 + :::note GCS + GCS パスã¯ã€Google XML API ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆãŒ JSON API ã¨ç•°ãªã‚‹ãŸã‚ã€ã“ã®å½¢å¼ã§ã™ï¼š + ``` + https://storage.googleapis.com/// + ``` + ã§ã‚ã‚Šã€~~https://storage.cloud.google.com~~ ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + ::: +- `NOSIGN` — 資格情報ã®ä»£ã‚ã‚Šã«ã“ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ãŒæä¾›ã•ã‚ŒãŸå ´åˆã€ã™ã¹ã¦ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ç½²åã•ã‚Œã¾ã›ã‚“。 +- `hmac_key` 㨠`hmac_secret` — 指定ã•ã‚ŒãŸã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹è³‡æ ¼æƒ…報を指定ã™ã‚‹ã‚­ãƒ¼ã€‚オプション。 +- `format` — ファイルã®[フォーマット](../../interfaces/formats.md#formats)。 +- `structure` — テーブルã®æ§‹é€ ã€‚å½¢å¼ `'column1_name column1_type, column2_name column2_type, ...'`。 +- `compression_method` — オプションã®ãƒ‘ラメータ。サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å€¤: `none`, `gzip/gz`, `brotli/br`, `xz/LZMA`, `zstd/zst`。デフォルトã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«ã‚ˆã£ã¦åœ§ç¸®æ–¹æ³•ã‚’自動検出ã—ã¾ã™ã€‚ + +引数ã¯[åå‰ä»˜ãコレクション](/docs/ja/operations/named-collections.md)を使用ã—ã¦æ¸¡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`url`ã€`format`ã€`structure`ã€`compression_method` ã¯åŒæ§˜ã«æ©Ÿèƒ½ã—ã€ã„ãã¤ã‹ã®è¿½åŠ ãƒ‘ラメータãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ï¼š + + - `access_key_id` — `hmac_key`, オプション。 + - `secret_access_key` — `hmac_secret`, オプション。 + - `filename` — 指定ã•ã‚ŒãŸå ´åˆã€URLã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + - `use_environment_credentials` — デフォルトã§æœ‰åŠ¹ã«ãªã£ã¦ãŠã‚Šã€ç’°å¢ƒå¤‰æ•° `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`ã€`AWS_CONTAINER_CREDENTIALS_FULL_URI`ã€`AWS_CONTAINER_AUTHORIZATION_TOKEN`ã€`AWS_EC2_METADATA_DISABLED` を使用ã—ã¦è¿½åŠ ã®ãƒ‘ラメータを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + - `no_sign_request` — デフォルトã§ã¯ç„¡åŠ¹ã€‚ + - `expiration_window_seconds` — デフォルト値㯠120。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã§ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿æ›¸ãã™ã‚‹ãŸã‚ã®ç‰¹å®šã®æ§‹é€ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ル。 + +**例** + +GCS ファイル `https://storage.googleapis.com/my-test-bucket-768/data.csv` ã‹ã‚‰æœ€åˆã®2行をé¸æŠžã™ã‚‹ä¾‹ï¼š + +``` sql +SELECT * +FROM gcs('https://storage.googleapis.com/my-test-bucket-768/data.csv', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32') +LIMIT 2; +``` + +``` text +┌─column1─┬─column2─┬─column3─┠+│ 1 │ 2 │ 3 │ +│ 3 │ 2 │ 1 │ +└─────────┴─────────┴─────────┘ +``` + +`gzip` 圧縮方法を使用ã—ãŸåŒæ§˜ã®ä¾‹ï¼š + +``` sql +SELECT * +FROM gcs('https://storage.googleapis.com/my-test-bucket-768/data.csv.gz', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32', 'gzip') +LIMIT 2; +``` + +``` text +┌─column1─┬─column2─┬─column3─┠+│ 1 │ 2 │ 3 │ +│ 3 │ 2 │ 1 │ +└─────────┴─────────┴─────────┘ +``` + +## 使用方法 + +GCS上ã®ä»¥ä¸‹ã®URIã‚’æŒã¤è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚‹ã¨ã—ã¾ã™ï¼š + +- 'https://storage.googleapis.com/my-test-bucket-768/some_prefix/some_file_1.csv' +- 'https://storage.googleapis.com/my-test-bucket-768/some_prefix/some_file_2.csv' +- 'https://storage.googleapis.com/my-test-bucket-768/some_prefix/some_file_3.csv' +- 'https://storage.googleapis.com/my-test-bucket-768/some_prefix/some_file_4.csv' +- 'https://storage.googleapis.com/my-test-bucket-768/another_prefix/some_file_1.csv' +- 'https://storage.googleapis.com/my-test-bucket-768/another_prefix/some_file_2.csv' +- 'https://storage.googleapis.com/my-test-bucket-768/another_prefix/some_file_3.csv' +- 'https://storage.googleapis.com/my-test-bucket-768/another_prefix/some_file_4.csv' + +番å·ãŒ1ã‹ã‚‰3ã¾ã§ã®ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®è¡Œæ•°ã‚’カウントã—ã¾ã™ï¼š + +``` sql +SELECT count(*) +FROM gcs('https://storage.googleapis.com/my-test-bucket-768/{some,another}_prefix/some_file_{1..3}.csv', 'CSV', 'name String, value UInt32') +``` + +``` text +┌─count()─┠+│ 18 │ +└─────────┘ +``` + +ã“れら2ã¤ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ç·è¡Œæ•°ã‚’カウントã—ã¾ã™ï¼š + +``` sql +SELECT count(*) +FROM gcs('https://storage.googleapis.com/my-test-bucket-768/{some,another}_prefix/*', 'CSV', 'name String, value UInt32') +``` + +``` text +┌─count()─┠+│ 24 │ +└─────────┘ +``` + +:::warning +先頭ã«ã‚¼ãƒ­ã‚’å«ã‚€æ•°å­—ã®ç¯„囲をå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ãƒªã‚¹ãƒˆã‚’æŒã£ã¦ã„ã‚‹å ´åˆã¯ã€å€‹åˆ¥ã®æ•°å­—用ã«ãƒ–レースを使用ã™ã‚‹ã‹ã€`?` を使用ã—ã¦ãã ã•ã„。 +::: + +ファイルå㌠`file-000.csv`ã€`file-001.csv`ã€...ã€`file-999.csv` ã®ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ç·è¡Œæ•°ã‚’カウントã—ã¾ã™ï¼š + +``` sql +SELECT count(*) +FROM gcs('https://storage.googleapis.com/my-test-bucket-768/big_prefix/file-{000..999}.csv', 'CSV', 'name String, value UInt32'); +``` + +``` text +┌─count()─┠+│ 12 │ +└─────────┘ +``` + +ファイル `test-data.csv.gz` ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入: + +``` sql +INSERT INTO FUNCTION gcs('https://storage.googleapis.com/my-test-bucket-768/test-data.csv.gz', 'CSV', 'name String, value UInt32', 'gzip') +VALUES ('test-data', 1), ('test-data-2', 2); +``` + +既存ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ« `test-data.csv.gz` ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入: + +``` sql +INSERT INTO FUNCTION gcs('https://storage.googleapis.com/my-test-bucket-768/test-data.csv.gz', 'CSV', 'name String, value UInt32', 'gzip') +SELECT name, value FROM existing_table; +``` + +グロブ ** ã¯å†å¸°çš„ãªãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãƒˆãƒ©ãƒãƒ¼ã‚µãƒ«ã«ä½¿ç”¨ã§ãã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ã€`my-test-bucket-768` ディレクトリ内ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†å¸°çš„ã«å–å¾—ã—ã¾ã™ï¼š + +``` sql +SELECT * FROM gcs('https://storage.googleapis.com/my-test-bucket-768/**', 'CSV', 'name String, value UInt32', 'gzip'); +``` + +以下㯠`my-test-bucket` ディレクトリ内ã®ä»»æ„ã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‹ã‚‰ `test-data.csv.gz` ファイルをå†å¸°çš„ã«å–å¾—ã™ã‚‹ä¾‹ã§ã™ï¼š + +``` sql +SELECT * FROM gcs('https://storage.googleapis.com/my-test-bucket-768/**/test-data.csv.gz', 'CSV', 'name String, value UInt32', 'gzip'); +``` + +実用化ã®ã‚±ãƒ¼ã‚¹ã§ã¯ [åå‰ä»˜ãコレクション](/docs/ja/operations/named-collections.md) を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚以下ãŒãã®ä¾‹ã§ã™ï¼š +``` sql + +CREATE NAMED COLLECTION creds AS + access_key_id = '***', + secret_access_key = '***'; +SELECT count(*) +FROM gcs(creds, url='https://s3-object-url.csv') +``` + +## パーティション書ã込㿠+ +データを `GCS` テーブルã«æŒ¿å…¥ã™ã‚‹éš›ã« `PARTITION BY` å¼ã‚’指定ã™ã‚‹ã¨ã€å„パーティション値ã«å¯¾ã—ã¦å€‹åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒä½œæˆã•ã‚Œã¾ã™ã€‚データを個別ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã§ã€èª­ã¿å–ã‚Šæ“作ã®åŠ¹çŽ‡ã‚’å‘上ã•ã›ã¾ã™ã€‚ + +**例** + +1. キーã«ãƒ‘ーティションIDを使用ã—ã¦å€‹åˆ¥ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆï¼š + +```sql +INSERT INTO TABLE FUNCTION + gcs('http://bucket.amazonaws.com/my_bucket/file_{_partition_id}.csv', 'CSV', 'a String, b UInt32, c UInt32') + PARTITION BY a VALUES ('x', 2, 3), ('x', 4, 5), ('y', 11, 12), ('y', 13, 14), ('z', 21, 22), ('z', 23, 24); +``` +ã“ã®çµæžœã€ãƒ‡ãƒ¼ã‚¿ã¯ `file_x.csv`ã€`file_y.csv`ã€`file_z.csv` ã®3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +2. パーティションIDã‚’ãƒã‚±ãƒƒãƒˆåã«ä½¿ç”¨ã—ã¦ã€ç•°ãªã‚‹ãƒã‚±ãƒƒãƒˆã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆï¼š + +```sql +INSERT INTO TABLE FUNCTION + gcs('http://bucket.amazonaws.com/my_bucket_{_partition_id}/file.csv', 'CSV', 'a UInt32, b UInt32, c UInt32') + PARTITION BY a VALUES (1, 2, 3), (1, 4, 5), (10, 11, 12), (10, 13, 14), (20, 21, 22), (20, 23, 24); +``` +ã“ã®çµæžœã€ãƒ‡ãƒ¼ã‚¿ã¯ç•°ãªã‚‹ãƒã‚±ãƒƒãƒˆã«ã‚ã‚‹3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ï¼š`my_bucket_1/file.csv`ã€`my_bucket_10/file.csv`ã€ãŠã‚ˆã³ `my_bucket_20/file.csv`。 + +**関連項目** + +- [S3テーブル関数](s3.md) +- [S3エンジン](../../engines/table-engines/integrations/s3.md) diff --git a/docs/ja/sql-reference/table-functions/generate.md b/docs/ja/sql-reference/table-functions/generate.md new file mode 100644 index 00000000000..3af4b93b21f --- /dev/null +++ b/docs/ja/sql-reference/table-functions/generate.md @@ -0,0 +1,101 @@ +--- +slug: /ja/sql-reference/table-functions/generate +sidebar_position: 75 +sidebar_label: generateRandom +--- + +# generateRandom + +指定ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã§ãƒ©ãƒ³ãƒ€ãƒ ãªãƒ‡ãƒ¼ã‚¿ã‚’生æˆã—ã¾ã™ã€‚ +テストテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’入力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +ã™ã¹ã¦ã®åž‹ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +``` sql +generateRandom(['name TypeName[, name TypeName]...', [, 'random_seed'[, 'max_string_length'[, 'max_array_length']]]]) +``` + +**引数** + +- `name` — 対応ã™ã‚‹ã‚«ãƒ©ãƒ ã®åå‰ã€‚ +- `TypeName` — 対応ã™ã‚‹ã‚«ãƒ©ãƒ ã®åž‹ã€‚ +- `random_seed` — 安定ã—ãŸçµæžœã‚’å¾—ã‚‹ãŸã‚ã«ãƒ©ãƒ³ãƒ€ãƒ ã‚·ãƒ¼ãƒ‰ã‚’手動ã§æŒ‡å®šã—ã¾ã™ã€‚NULLã®å ´åˆã€ã‚·ãƒ¼ãƒ‰ã¯ãƒ©ãƒ³ãƒ€ãƒ ã«ç”Ÿæˆã•ã‚Œã¾ã™ã€‚ +- `max_string_length` — 生æˆã•ã‚Œã‚‹ã™ã¹ã¦ã®æ–‡å­—列ã®æœ€å¤§é•·ã€‚デフォルトã¯`10`。 +- `max_array_length` — 生æˆã•ã‚Œã‚‹ã™ã¹ã¦ã®é…列ã¾ãŸã¯ãƒžãƒƒãƒ—ã®è¦ç´ ã®æœ€å¤§æ•°ã€‚デフォルトã¯`10`。 + +**戻り値** + +è¦æ±‚ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã®ãƒ†ãƒ¼ãƒ–ルオブジェクト。 + +## 使用例 + +``` sql +SELECT * FROM generateRandom('a Array(Int8), d Decimal32(4), c Tuple(DateTime64(3), UUID)', 1, 10, 2) LIMIT 3; +``` + +``` text +┌─a────────┬────────────d─┬─c──────────────────────────────────────────────────────────────────┠+│ [77] │ -124167.6723 │ ('2061-04-17 21:59:44.573','3f72f405-ec3e-13c8-44ca-66ef335f7835') │ +│ [32,110] │ -141397.7312 │ ('1979-02-09 03:43:48.526','982486d1-5a5d-a308-e525-7bd8b80ffa73') │ +│ [68] │ -67417.0770 │ ('2080-03-12 14:17:31.269','110425e5-413f-10a6-05ba-fa6b3e929f15') │ +└──────────┴──────────────┴────────────────────────────────────────────────────────────────────┘ +``` + +```sql +CREATE TABLE random (a Array(Int8), d Decimal32(4), c Tuple(DateTime64(3), UUID)) engine=Memory; +INSERT INTO random SELECT * FROM generateRandom() LIMIT 2; +SELECT * FROM random; +``` + +```text +┌─a────────────────────────────┬────────────d─┬─c──────────────────────────────────────────────────────────────────┠+│ [] │ 68091.8197 │ ('2037-10-02 12:44:23.368','039ecab7-81c2-45ee-208c-844e5c6c5652') │ +│ [8,-83,0,-22,65,9,-30,28,64] │ -186233.4909 │ ('2062-01-11 00:06:04.124','69563ea1-5ad1-f870-16d8-67061da0df25') │ +└──────────────────────────────┴──────────────┴────────────────────────────────────────────────────────────────────┘ +``` + +[generateRandomStructure](../../sql-reference/functions/other-functions.md#generaterandomstructure)ã¨çµ„ã¿åˆã‚ã›ã‚‹å ´åˆ: + +```sql +SELECT * FROM generateRandom(generateRandomStructure(4, 101), 101) LIMIT 3; +``` + +```text +┌──────────────────c1─┬──────────────────c2─┬─c3─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─c4──────────────────────────────────────┠+│ 1996-04-15 06:40:05 │ 33954608387.2844801 │ ['232.78.216.176','9.244.59.211','211.21.80.152','44.49.94.109','165.77.195.182','68.167.134.239','212.13.24.185','1.197.255.35','192.55.131.232'] │ 45d9:2b52:ab6:1c59:185b:515:c5b6:b781 │ +│ 2063-01-13 01:22:27 │ 36155064970.9514454 │ ['176.140.188.101'] │ c65a:2626:41df:8dee:ec99:f68d:c6dd:6b30 │ +│ 2090-02-28 14:50:56 │ 3864327452.3901373 │ ['155.114.30.32'] │ 57e9:5229:93ab:fbf3:aae7:e0e4:d1eb:86b │ +└─────────────────────┴─────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────────────────────────────┘ +``` + +`structure`引数ãŒãªã„å ´åˆï¼ˆã“ã®å ´åˆã€æ§‹é€ ã¯ãƒ©ãƒ³ãƒ€ãƒ ï¼‰: + +```sql +SELECT * FROM generateRandom() LIMIT 3; +``` + +```text +┌───c1─┬─────────c2─┬─────────────────────c3─┬──────────────────────c4─┬─c5───────┠+│ -128 │ 317300854 │ 2030-08-16 08:22:20.65 │ 1994-08-16 12:08:56.745 │ R0qgiC46 │ +│ 40 │ -744906827 │ 2059-04-16 06:31:36.98 │ 1975-07-16 16:28:43.893 │ PuH4M*MZ │ +│ -55 │ 698652232 │ 2052-08-04 20:13:39.68 │ 1998-09-20 03:48:29.279 │ │ +└──────┴────────────┴────────────────────────┴─────────────────────────┴──────────┘ +``` + +ランダムシードをランダム構造ã¨ãƒ©ãƒ³ãƒ€ãƒ ãƒ‡ãƒ¼ã‚¿ã®ä¸¡æ–¹ã«é©ç”¨ã™ã‚‹å ´åˆ: + +```sql +SELECT * FROM generateRandom(11) LIMIT 3; +``` + +```text +┌───────────────────────────────────────c1─┬─────────────────────────────────────────────────────────────────────────────c2─┬─────────────────────────────────────────────────────────────────────────────c3─┬─────────c4─┬─────────────────────────────────────────────────────────────────────────────c5─┬──────────────────────c6─┬─c7──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─c8──────────────────────────────────────┬─────────c9─┠+│ -77422512305044606600216318673365695785 │ 636812099959807642229.503817849012019401335326013846687285151335352272727523 │ -34944452809785978175157829109276115789694605299387223845886143311647505037529 │ 544473976 │ 111220388331710079615337037674887514156741572807049614590010583571763691328563 │ 22016.22623506465 │ {'2052-01-31 20:25:33':4306400876908509081044405485378623663,'1993-04-16 15:58:49':164367354809499452887861212674772770279,'2101-08-19 03:07:18':-60676948945963385477105077735447194811,'2039-12-22 22:31:39':-59227773536703059515222628111999932330} │ a7b2:8f58:4d07:6707:4189:80cf:92f5:902d │ 1950-07-14 │ +│ -159940486888657488786004075627859832441 │ 629206527868163085099.8195700356331771569105231840157308480121506729741348442 │ -53203761250367440823323469081755775164053964440214841464405368882783634063735 │ 2187136525 │ 94881662451116595672491944222189810087991610568040618106057495823910493624275 │ 1.3095786748458954e-104 │ {} │ a051:e3da:2e0a:c69:7835:aed6:e8b:3817 │ 1943-03-25 │ +│ -5239084224358020595591895205940528518 │ -529937657954363597180.1709207212648004850138812370209091520162977548101577846 │ 47490343304582536176125359129223180987770215457970451211489086575421345731671 │ 1637451978 │ 101899445785010192893461828129714741298630410942962837910400961787305271699002 │ 2.4344456058391296e223 │ {'2013-12-22 17:42:43':80271108282641375975566414544777036006,'2041-03-08 10:28:17':169706054082247533128707458270535852845,'1986-08-31 23:07:38':-54371542820364299444195390357730624136,'2094-04-23 21:26:50':7944954483303909347454597499139023465} │ 1293:a726:e899:9bfc:8c6f:2aa1:22c9:b635 │ 1924-11-20 │ +└──────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┴────────────┴────────────────────────────────────────────────────────────────────────────────┴─────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────────────────────────────┴────────────┘ +``` + +**注æ„:** `generateRandom(generateRandomStructure(), [random seed], max_string_length, max_array_length)` ã§å分大ã㪠`max_array_length` を指定ã™ã‚‹ã¨ã€è¤‡åˆåž‹ (`Array`, `Tuple`, `Map`, `Nested`) ã®æœ€å¤§ãƒã‚¹ãƒˆæ·±åº¦ (16ã¾ã§) ã«ã‚ˆã‚Šéžå¸¸ã«å¤§ããªå‡ºåŠ›ãŒç”Ÿæˆã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +## 関連コンテンツ +- ブログ: [ClickHouseã§ãƒ©ãƒ³ãƒ€ãƒ ãƒ‡ãƒ¼ã‚¿ã‚’生æˆã™ã‚‹](https://clickhouse.com/blog/generating-random-test-distribution-data-for-clickhouse) diff --git a/docs/ja/sql-reference/table-functions/generateSeries.md b/docs/ja/sql-reference/table-functions/generateSeries.md new file mode 100644 index 00000000000..e0501458681 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/generateSeries.md @@ -0,0 +1,8 @@ +--- +slug: /ja/sql-reference/table-functions/generateSeries +sidebar_position: 147 +sidebar_label: generateSeries +--- + +### 別å +[generate_series](generate_series.md) diff --git a/docs/ja/sql-reference/table-functions/generate_series.md b/docs/ja/sql-reference/table-functions/generate_series.md new file mode 100644 index 00000000000..b82ecc3ec1d --- /dev/null +++ b/docs/ja/sql-reference/table-functions/generate_series.md @@ -0,0 +1,25 @@ +--- +slug: /ja/sql-reference/table-functions/generate_series +sidebar_position: 146 +sidebar_label: generate_series +--- + +# generate_series + +`generate_series(START, STOP)` - 開始ã‹ã‚‰åœæ­¢ã¾ã§ã®æ•´æ•°ã‚’å«ã‚€å˜ä¸€ã® 'generate_series' カラム (UInt64) ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを返ã—ã¾ã™ã€‚ + +`generate_series(START, STOP, STEP)` - 開始ã‹ã‚‰åœæ­¢ã¾ã§ã®æ•´æ•°ã‚’å«ã‚€å˜ä¸€ã® 'generate_series' カラム (UInt64) ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルをã€æŒ‡å®šã•ã‚ŒãŸã‚¹ãƒ†ãƒƒãƒ—é–“éš”ã§è¿”ã—ã¾ã™ã€‚ + +以下ã®ã‚¯ã‚¨ãƒªã¯ã€ç•°ãªã‚‹ã‚«ãƒ©ãƒ åã‚’æŒã¡ãªãŒã‚‰ã‚‚åŒã˜å†…容ã®ãƒ†ãƒ¼ãƒ–ルを返ã—ã¾ã™ã€‚ + +``` sql +SELECT * FROM numbers(10, 5); +SELECT * FROM generate_series(10, 14); +``` + +ã¾ãŸã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚‚ç•°ãªã‚‹ã‚«ãƒ©ãƒ åã§åŒã˜å†…容ã®ãƒ†ãƒ¼ãƒ–ルを返ã—ã¾ã™ãŒã€äºŒç•ªç›®ã®ã‚ªãƒ—ションã®æ–¹ãŒåŠ¹çŽ‡çš„ã§ã™ã€‚ + +``` sql +SELECT * FROM numbers(10, 11) WHERE number % 3 == (10 % 3); +SELECT * FROM generate_series(10, 20, 3); +``` diff --git a/docs/ja/sql-reference/table-functions/hdfs.md b/docs/ja/sql-reference/table-functions/hdfs.md new file mode 100644 index 00000000000..3a56b2c3673 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/hdfs.md @@ -0,0 +1,125 @@ +--- +slug: /ja/sql-reference/table-functions/hdfs +sidebar_position: 80 +sidebar_label: hdfs +--- + +# hdfs + +HDFS内ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ル関数ã¯ã€[url](../../sql-reference/table-functions/url.md)ã‚„[file](../../sql-reference/table-functions/file.md)ã®é–¢æ•°ã¨ä¼¼ã¦ã„ã¾ã™ã€‚ + +``` sql +hdfs(URI, format, structure) +``` + +**入力パラメータ** + +- `URI` — HDFS内ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ç›¸å¯¾URIã§ã™ã€‚ファイルパスã¯èª­ã¿å–り専用モードã§ä»¥ä¸‹ã®ã‚°ãƒ­ãƒ–をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: `*`, `?`, `{abc,def}` ãŠã‚ˆã³ `{N..M}` ãŸã ã— `N`, `M` ã¯æ•°å­—ã§ã€`'abc', 'def'` ã¯æ–‡å­—列ã§ã™ã€‚ +- `format` — ファイルã®[フォーマット](../../interfaces/formats.md#formats)ã§ã™ã€‚ +- `structure` — テーブルã®æ§‹é€ ã§ã™ã€‚フォーマット㯠`'column1_name column1_type, column2_name column2_type, ...'` ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿æ›¸ãã§ãるよã†ã«ã—ãŸã€æŒ‡å®šã•ã‚ŒãŸæ§‹é€ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã§ã™ã€‚ + +**例** + +`hdfs://hdfs1:9000/test` ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルをå–å¾—ã—ã€ãã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰æœ€åˆã®äºŒè¡Œã‚’é¸æŠžã—ã¾ã™: + +``` sql +SELECT * +FROM hdfs('hdfs://hdfs1:9000/test', 'TSV', 'column1 UInt32, column2 UInt32, column3 UInt32') +LIMIT 2 +``` + +``` text +┌─column1─┬─column2─┬─column3─┠+│ 1 │ 2 │ 3 │ +│ 3 │ 2 │ 1 │ +└─────────┴─────────┴─────────┘ +``` + +## パスã®ã‚°ãƒ­ãƒ– {#globs_in_path} + +パスã¯ã‚°ãƒ­ãƒ–化を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ファイルã¯ãƒ‘スパターン全体ã¨ä¸€è‡´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€æŽ¥å°¾è¾žã‚„接頭辞ã ã‘ã«ä¸€è‡´ã™ã‚‹ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +- `*` — `/` を除ãä»»æ„ã®æ–‡å­—列を表ã—ã¾ã™ãŒã€ç©ºã®æ–‡å­—列もå«ã¿ã¾ã™ã€‚ +- `**` — フォルダ内ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†å¸°çš„ã«è¡¨ã—ã¾ã™ã€‚ +- `?` — ä»»æ„ã®1文字を表ã—ã¾ã™ã€‚ +- `{some_string,another_string,yet_another_one}` — 文字列 `'some_string', 'another_string', 'yet_another_one'` ã®ã„ãšã‚Œã‹ã‚’代用ã—ã¾ã™ã€‚文字列ã«ã¯ `/` 記å·ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- `{N..M}` — ä»»æ„ã®æ•°å€¤ `>= N` ã‹ã¤ `<= M` を表ã—ã¾ã™ã€‚ + +`{}` を使用ã—ãŸæ§‹é€ ã¯ã€[remote](remote.md) ãŠã‚ˆã³ [file](file.md) テーブル関数ã«ä¼¼ã¦ã„ã¾ã™ã€‚ + +**例** + +1. 以下ã®URIã‚’æŒã¤è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒHDFSã«å­˜åœ¨ã™ã‚‹ã¨ã—ã¾ã™: + +- ‘hdfs://hdfs1:9000/some_dir/some_file_1’ +- ‘hdfs://hdfs1:9000/some_dir/some_file_2’ +- ‘hdfs://hdfs1:9000/some_dir/some_file_3’ +- ‘hdfs://hdfs1:9000/another_dir/some_file_1’ +- ‘hdfs://hdfs1:9000/another_dir/some_file_2’ +- ‘hdfs://hdfs1:9000/another_dir/some_file_3’ + +2. ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®è¡Œæ•°ã‚’クエリã—ã¾ã™: + + + +``` sql +SELECT count(*) +FROM hdfs('hdfs://hdfs1:9000/{some,another}_dir/some_file_{1..3}', 'TSV', 'name String, value UInt32') +``` + +3. ã“れら二ã¤ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®è¡Œæ•°ã‚’クエリã—ã¾ã™: + + + +``` sql +SELECT count(*) +FROM hdfs('hdfs://hdfs1:9000/{some,another}_dir/*', 'TSV', 'name String, value UInt32') +``` + +:::note +ファイルã®ãƒªã‚¹ãƒˆã«å…ˆé ­ã‚¼ãƒ­ä»˜ãã®æ•°å€¤ç¯„囲ãŒå«ã¾ã‚Œã‚‹å ´åˆã€å„æ¡ã”ã¨ã«æ³¢æ‹¬å¼§ã‚’使用ã™ã‚‹ã‹ã€`?` を使用ã—ã¦ãã ã•ã„。 +::: + +**例** + +`file000`, `file001`, ... , `file999` ã¨å付ã‘られãŸãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’クエリã—ã¾ã™: + +``` sql +SELECT count(*) +FROM hdfs('hdfs://hdfs1:9000/big_dir/file{0..9}{0..9}{0..9}', 'CSV', 'name String, value UInt32') +``` + +## ãƒãƒ¼ãƒãƒ£ãƒ«ã‚«ãƒ©ãƒ  + +- `_path` — ファイルã®ãƒ‘ス。タイプ: `LowCardinalty(String)`。 +- `_file` — ファイルå。タイプ: `LowCardinalty(String)`。 +- `_size` — ファイルã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚タイプ: `Nullable(UInt64)`。サイズãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL` ã§ã™ã€‚ +- `_time` — ファイルã®æœ€çµ‚更新日時。タイプ: `Nullable(DateTime)`。日時ãŒä¸æ˜Žãªå ´åˆã€å€¤ã¯ `NULL` ã§ã™ã€‚ + +## Hiveスタイルã®ãƒ‘ーティショニング {#hive-style-partitioning} + +`use_hive_partitioning` ã‚’1ã«è¨­å®šã™ã‚‹ã¨ã€ClickHouseã¯ãƒ‘ス内㮠Hiveスタイルã®ãƒ‘ーティショニング (`/name=value/`) を検出ã—ã€ã‚¯ã‚¨ãƒªå†…ã§ãƒ‘ーティションカラムをãƒãƒ¼ãƒãƒ£ãƒ«ã‚«ãƒ©ãƒ ã¨ã—ã¦ä½¿ç”¨ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ã“れらã®ãƒãƒ¼ãƒãƒ£ãƒ«ã‚«ãƒ©ãƒ ã¯ã€ãƒ‘ーティション化ã•ã‚ŒãŸãƒ‘ス内ã®ã‚«ãƒ©ãƒ ã¨åŒã˜åå‰ã§ã™ãŒã€`_`ã§å§‹ã¾ã‚Šã¾ã™ã€‚ + +**例** + +Hiveスタイルã®ãƒ‘ーティショニングã§ä½œæˆã•ã‚ŒãŸãƒãƒ¼ãƒãƒ£ãƒ«ã‚«ãƒ©ãƒ ã‚’使用ã—ã¾ã™ + +``` sql +SET use_hive_partitioning = 1; +SELECT * from HDFS('hdfs://hdfs1:9000/data/path/date=*/country=*/code=*/*.parquet') where _date > '2020-01-01' and _country = 'Netherlands' and _code = 42; +``` + +## ストレージ設定 {#storage-settings} + +- [hdfs_truncate_on_insert](/docs/ja/operations/settings/settings.md#hdfs_truncate_on_insert) - 挿入å‰ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’切り詰ã‚ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [hdfs_create_new_file_on_insert](/docs/ja/operations/settings/settings.md#hdfs_create_new_file_on_insert) - フォーマットã«æŽ¥å°¾è¾žãŒã‚ã‚‹å ´åˆã€æŒ¿å…¥ã”ã¨ã«æ–°ã—ã„ファイルを作æˆã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [hdfs_skip_empty_files](/docs/ja/operations/settings/settings.md#hdfs_skip_empty_files) - 読ã¿å–り中ã«ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [ignore_access_denied_multidirectory_globs](/docs/ja/operations/settings/settings.md#ignore_access_denied_multidirectory_globs) - マルãƒãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚°ãƒ­ãƒ–ã«å¯¾ã—ã¦è¨±å¯æ‹’å¦ã‚¨ãƒ©ãƒ¼ã‚’無視ã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + +**関連項目** + +- [ãƒãƒ¼ãƒãƒ£ãƒ«ã‚«ãƒ©ãƒ ](../../engines/table-engines/index.md#table_engines-virtual_columns) diff --git a/docs/ja/sql-reference/table-functions/hdfsCluster.md b/docs/ja/sql-reference/table-functions/hdfsCluster.md new file mode 100644 index 00000000000..a21aaaea4e7 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/hdfsCluster.md @@ -0,0 +1,60 @@ +--- +slug: /ja/sql-reference/table-functions/hdfsCluster +sidebar_position: 81 +sidebar_label: hdfsCluster +--- + +# hdfsCluster テーブル関数 + +指定ã•ã‚ŒãŸã‚¯ãƒ©ã‚¹ã‚¿å†…ã®è¤‡æ•°ã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰HDFSã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’並行ã—ã¦å‡¦ç†ã§ãるよã†ã«ã—ã¾ã™ã€‚イニシエータã§ã¯ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã«æŽ¥ç¶šã‚’作æˆã—ã€HDFSファイルパスã®ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ã‚’展開ã—ã€å„ファイルを動的ã«é…分ã—ã¾ã™ã€‚ワーカーノードã§ã¯ã€æ¬¡ã«å‡¦ç†ã™ã¹ãタスクをイニシエータã«å•ã„åˆã‚ã›ã€ãれを処ç†ã—ã¾ã™ã€‚ã™ã¹ã¦ã®ã‚¿ã‚¹ã‚¯ãŒå®Œäº†ã™ã‚‹ã¾ã§ã“ã®ãƒ—ロセスを繰り返ã—ã¾ã™ã€‚ + +**構文** + +``` sql +hdfsCluster(cluster_name, URI, format, structure) +``` + +**引数** + +- `cluster_name` — リモートãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒ«ã‚µãƒ¼ãƒãƒ¼ã¸ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã¨æŽ¥ç¶šãƒ‘ラメータã®ã‚»ãƒƒãƒˆã‚’構築ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ã®åå‰ã€‚ +- `URI` — ファイルã¾ãŸã¯è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®URI。読ã¿å–り専用モードã§æ¬¡ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™: `*`, `**`, `?`, `{'abc','def'}` ãŠã‚ˆã³ `{N..M}` ã“ã“㧠`N`, `M` — 数値, `abc`, `def` — 文字列。詳細ã¯[パス内ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰](../../engines/table-engines/integrations/s3.md#wildcards-in-path)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- `format` — ファイルã®[フォーマット](../../interfaces/formats.md#formats)。 +- `structure` — テーブルã®æ§‹é€ ã€‚å½¢å¼ `'column1_name column1_type, column2_name column2_type, ...'`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã®æŒ‡å®šã•ã‚ŒãŸæ§‹é€ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ル。 + +**例** + +1. `cluster_simple` ã¨ã„ã†åå‰ã®ClickHouseクラスタãŒã‚ã‚Šã€HDFSã«ä»¥ä¸‹ã®URIã‚’æŒã¤è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚‹ã¨ã—ã¾ã™: + +- ‘hdfs://hdfs1:9000/some_dir/some_file_1’ +- ‘hdfs://hdfs1:9000/some_dir/some_file_2’ +- ‘hdfs://hdfs1:9000/some_dir/some_file_3’ +- ‘hdfs://hdfs1:9000/another_dir/some_file_1’ +- ‘hdfs://hdfs1:9000/another_dir/some_file_2’ +- ‘hdfs://hdfs1:9000/another_dir/some_file_3’ + +2. ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã«å«ã¾ã‚Œã‚‹è¡Œã®æ•°ã‚’クエリã—ã¾ã™: + +``` sql +SELECT count(*) +FROM hdfsCluster('cluster_simple', 'hdfs://hdfs1:9000/{some,another}_dir/some_file_{1..3}', 'TSV', 'name String, value UInt32') +``` + +3. ã“れら2ã¤ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®è¡Œæ•°ã‚’クエリã—ã¾ã™: + +``` sql +SELECT count(*) +FROM hdfsCluster('cluster_simple', 'hdfs://hdfs1:9000/{some,another}_dir/*', 'TSV', 'name String, value UInt32') +``` + +:::note +ファイルã®ãƒªã‚¹ãƒˆã«å…ˆé ­ã‚¼ãƒ­ãŒä»˜ã„ãŸæ•°å€¤ç¯„囲ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€å„æ¡ã‚’個別ã«ä¸­æ‹¬å¼§ã§å›²ã‚€ã‹ã€`?` を使用ã—ã¾ã™ã€‚ +::: + +**å‚ç…§** + +- [HDFS エンジン](../../engines/table-engines/integrations/hdfs.md) +- [HDFS テーブル関数](../../sql-reference/table-functions/hdfs.md) diff --git a/docs/ja/sql-reference/table-functions/hudi.md b/docs/ja/sql-reference/table-functions/hudi.md new file mode 100644 index 00000000000..222477a0b6c --- /dev/null +++ b/docs/ja/sql-reference/table-functions/hudi.md @@ -0,0 +1,31 @@ +--- +slug: /ja/sql-reference/table-functions/hudi +sidebar_position: 85 +sidebar_label: hudi +--- + +# hudi テーブル関数 + +Amazon S3 ã«ã‚ã‚‹ Apache [Hudi](https://hudi.apache.org/) テーブルã«å¯¾ã—ã¦ã€èª­ã¿å–り専用ã®ãƒ†ãƒ¼ãƒ–ルライクãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ + +## 構文 + +``` sql +hudi(url [,aws_access_key_id, aws_secret_access_key] [,format] [,structure] [,compression]) +``` + +## 引数 + +- `url` — S3 ã«å­˜åœ¨ã™ã‚‹ Hudi テーブルã¸ã®ãƒ‘スをå«ã‚€ãƒã‚±ãƒƒãƒˆã® URL。 +- `aws_access_key_id`, `aws_secret_access_key` - [AWS](https://aws.amazon.com/) アカウントユーザーã®é•·æœŸçš„ãªã‚¯ãƒ¬ãƒ‡ãƒ³ã‚·ãƒ£ãƒ«ã€‚ã“れを使用ã—ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’èªè¨¼ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れらã®ãƒ‘ラメータã¯ã‚ªãƒ—ションã§ã™ã€‚クレデンシャルãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€ClickHouse ã®è¨­å®šã‹ã‚‰ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€[S3 をデータストレージã¨ã—ã¦ä½¿ç”¨ã™ã‚‹](/docs/ja/engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-s3)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- `format` — ファイルã®[フォーマット](/docs/ja/interfaces/formats.md/#formats)。 +- `structure` — テーブルã®æ§‹é€ ã€‚å½¢å¼ã¯ `'column1_name column1_type, column2_name column2_type, ...'`。 +- `compression` — ã“ã®ãƒ‘ラメータã¯ã‚ªãƒ—ションã§ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る値ã¯: `none`, `gzip/gz`, `brotli/br`, `xz/LZMA`, `zstd/zst`。デフォルトã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«ã‚ˆã£ã¦åœ§ç¸®ãŒè‡ªå‹•æ¤œå‡ºã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸ S3 上㮠Hudi テーブル内ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿å–ã‚‹ãŸã‚ã®ã€æŒ‡å®šã•ã‚ŒãŸæ§‹é€ ã®ãƒ†ãƒ¼ãƒ–ル。 + +**関連項目** + +- [Hudi エンジン](/docs/ja/engines/table-engines/integrations/hudi.md) diff --git a/docs/ja/sql-reference/table-functions/iceberg.md b/docs/ja/sql-reference/table-functions/iceberg.md new file mode 100644 index 00000000000..c8706962683 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/iceberg.md @@ -0,0 +1,74 @@ +--- +slug: /ja/sql-reference/table-functions/iceberg +sidebar_position: 90 +sidebar_label: iceberg +--- + +# iceberg テーブル関数 + +Amazon S3ã€Azureã€HDFSã€ã¾ãŸã¯ãƒ­ãƒ¼ã‚«ãƒ«ã«ä¿å­˜ã•ã‚ŒãŸApache [Iceberg](https://iceberg.apache.org/) テーブルã«å¯¾ã—ã¦ã€èª­ã¿å–り専用ã®ãƒ†ãƒ¼ãƒ–ルライクãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ + +## 構文 + +``` sql +icebergS3(url [, NOSIGN | access_key_id, secret_access_key, [session_token]] [,format] [,compression_method]) +icebergS3(named_collection[, option=value [,..]]) + +icebergAzure(connection_string|storage_account_url, container_name, blobpath, [,account_name], [,account_key] [,format] [,compression_method]) +icebergAzure(named_collection[, option=value [,..]]) + +icebergHDFS(path_to_table, [,format] [,compression_method]) +icebergHDFS(named_collection[, option=value [,..]]) + +icebergLocal(path_to_table, [,format] [,compression_method]) +icebergLocal(named_collection[, option=value [,..]]) +``` + +## 引数 + +引数ã®èª¬æ˜Žã¯ã€ãƒ†ãƒ¼ãƒ–ル関数 `s3`ã€`azureBlobStorage`ã€`HDFS`ã€ãŠã‚ˆã³ `file` 内ã®å¼•æ•°ã®èª¬æ˜Žã¨ä¸€è‡´ã—ã¾ã™ã€‚ +`format` 㯠Iceberg テーブル内ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’表ã—ã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** +指定ã•ã‚ŒãŸ Iceberg テーブル内ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€ãŸã‚ã®ã€æŒ‡å®šã•ã‚ŒãŸæ§‹é€ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ル。 + +**例** + +```sql +SELECT * FROM icebergS3('http://test.s3.amazonaws.com/clickhouse-bucket/test_table', 'test', 'test') +``` + +:::important +ClickHouse ã¯ç¾åœ¨ã€`icebergS3`ã€`icebergAzure`ã€`icebergHDFS`ã€`icebergLocal` テーブル関数㨠`IcebergS3`ã€`icebergAzure`ã€`IcebergHDFS`ã€`IcebergLocal` テーブルエンジンを通ã˜ã¦ã€Iceberg フォーマット㮠v1 ãŠã‚ˆã³ v2 ã®èª­ã¿å–りをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ +::: + +## åå‰ä»˜ãコレクションã®å®šç¾© + +URLã¨è³‡æ ¼æƒ…報をä¿å­˜ã™ã‚‹ãŸã‚ã®åå‰ä»˜ãコレクションã®è¨­å®šä¾‹ã‚’次ã«ç¤ºã—ã¾ã™ï¼š + +```xml + + + + http://test.s3.amazonaws.com/clickhouse-bucket/ + test + test + auto + auto + + + +``` + +```sql +SELECT * FROM icebergS3(iceberg_conf, filename = 'test_table') +DESCRIBE icebergS3(iceberg_conf, filename = 'test_table') +``` + +**エイリアス** + +テーブル関数 `iceberg` ã¯ç¾åœ¨ `icebergS3` ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã™ã€‚ + +**関連項目** + +- [Iceberg エンジン](/docs/ja/engines/table-engines/integrations/iceberg.md) diff --git a/docs/ja/sql-reference/table-functions/index.md b/docs/ja/sql-reference/table-functions/index.md new file mode 100644 index 00000000000..161fd55ffff --- /dev/null +++ b/docs/ja/sql-reference/table-functions/index.md @@ -0,0 +1,25 @@ +--- +slug: /ja/sql-reference/table-functions/ +sidebar_label: テーブル関数 +sidebar_position: 1 +--- + +# テーブル関数 + +テーブル関数ã¯ã€ãƒ†ãƒ¼ãƒ–ルを構築ã™ã‚‹ãŸã‚ã®æ–¹æ³•ã§ã™ã€‚ + +テーブル関数ã¯ä»¥ä¸‹ã§ä½¿ç”¨ã§ãã¾ã™ï¼š + +- `SELECT` クエリ㮠[FROM](../../sql-reference/statements/select/from.md) å¥ã€‚ + + ç¾åœ¨ã®ã‚¯ã‚¨ãƒªå†…ã§ã®ã¿ä½¿ç”¨å¯èƒ½ãªä¸€æ™‚テーブルを作æˆã™ã‚‹æ–¹æ³•ã§ã™ã€‚クエリãŒçµ‚了ã™ã‚‹ã¨ãƒ†ãƒ¼ãƒ–ルã¯å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ + +- [CREATE TABLE AS table_function()](../../sql-reference/statements/create/table.md) クエリ。 + + テーブルを作æˆã™ã‚‹æ–¹æ³•ã®ä¸€ã¤ã§ã™ã€‚ + +- [INSERT INTO TABLE FUNCTION](../../sql-reference/statements/insert-into.md#inserting-into-table-function) クエリ。 + +:::note +[allow_ddl](../../operations/settings/permissions-for-queries.md#settings_allow_ddl) 設定ãŒç„¡åŠ¹ã®å ´åˆã€ãƒ†ãƒ¼ãƒ–ル関数を使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +::: diff --git a/docs/ja/sql-reference/table-functions/input.md b/docs/ja/sql-reference/table-functions/input.md new file mode 100644 index 00000000000..1288ca31549 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/input.md @@ -0,0 +1,38 @@ +--- +slug: /ja/sql-reference/table-functions/input +sidebar_position: 95 +sidebar_label: input +--- + +# input + +`input(structure)` - 指定ã•ã‚ŒãŸæ§‹é€ ã§ã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’別ã®æ§‹é€ ã®ãƒ†ãƒ¼ãƒ–ルã«åŠ¹çŽ‡çš„ã«å¤‰æ›ã—ã€æŒ¿å…¥ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ル関数ã§ã™ã€‚ + +`structure` - サーãƒãƒ¼ã«é€ä¿¡ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã®æ§‹é€ ã‚’次ã®å½¢å¼ã§æŒ‡å®šã—ã¾ã™: `'column1_name column1_type, column2_name column2_type, ...'`。 +例ãˆã°ã€`'id UInt32, name String'`。 + +ã“ã®é–¢æ•°ã¯`INSERT SELECT`クエリã§ã®ã¿ä½¿ç”¨ã§ãã€ä¸€åº¦ã—ã‹ä½¿ç”¨ã§ãã¾ã›ã‚“ãŒã€ãれ以外ã¯é€šå¸¸ã®ãƒ†ãƒ¼ãƒ–ル関数ã®ã‚ˆã†ã«å‹•ä½œã—ã¾ã™ +(例ãˆã°ã€ã‚µãƒ–クエリã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼‰ã€‚ + +データã¯é€šå¸¸ã®`INSERT`クエリã®ã‚ˆã†ã«ä»»æ„ã®æ–¹æ³•ã§é€ä¿¡ã§ãã€ã‚¯ã‚¨ãƒªã®æœ€å¾Œã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚‹ä»»æ„ã®åˆ©ç”¨å¯èƒ½ãª[å½¢å¼](../../interfaces/formats.md#formats)ã§æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ï¼ˆé€šå¸¸ã®`INSERT SELECT`ã¨ã¯ç•°ãªã‚Šã¾ã™ï¼‰ã€‚ + +ã“ã®é–¢æ•°ã®ä¸»ãªæ©Ÿèƒ½ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å—ä¿¡ã™ã‚‹ã¨ã€`SELECT`å¥ã®å¼ãƒªã‚¹ãƒˆã«å¾“ã£ã¦åŒæ™‚ã«å¤‰æ›ã—ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã™ã‚‹ã“ã¨ã§ã™ã€‚ã™ã¹ã¦ã®è»¢é€ãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã™ã‚‹ä¸€æ™‚テーブルã¯ä½œæˆã•ã‚Œã¾ã›ã‚“。 + +**例** + +- `test`テーブルãŒæ¬¡ã®æ§‹é€ `(a String, b String)`ã‚’æŒã¡ã€`data.csv`ã®ãƒ‡ãƒ¼ã‚¿ãŒç•°ãªã‚‹æ§‹é€ `(col1 String, col2 Date, col3 Int32)`ã‚’æŒã£ã¦ã„ã‚‹ã¨ã—ã¾ã™ã€‚ã“ã®å ´åˆã€`data.csv`ã‹ã‚‰`test`テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’åŒæ™‚ã«å¤‰æ›ã—ã¦æŒ¿å…¥ã™ã‚‹ã‚¯ã‚¨ãƒªã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + + + +``` bash +$ cat data.csv | clickhouse-client --query="INSERT INTO test SELECT lower(col1), col3 * col3 FROM input('col1 String, col2 Date, col3 Int32') FORMAT CSV"; +``` + +- `data.csv`ã«ãƒ†ãƒ¼ãƒ–ル`test`ã¨åŒã˜æ§‹é€ `test_structure`ã®ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã“れら二ã¤ã®ã‚¯ã‚¨ãƒªã¯åŒç­‰ã§ã™: + + + +``` bash +$ cat data.csv | clickhouse-client --query="INSERT INTO test FORMAT CSV" +$ cat data.csv | clickhouse-client --query="INSERT INTO test SELECT * FROM input('test_structure') FORMAT CSV" +``` diff --git a/docs/ja/sql-reference/table-functions/jdbc.md b/docs/ja/sql-reference/table-functions/jdbc.md new file mode 100644 index 00000000000..b4e98fa9818 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/jdbc.md @@ -0,0 +1,43 @@ +--- +slug: /ja/sql-reference/table-functions/jdbc +sidebar_position: 100 +sidebar_label: jdbc +--- + +# jdbc + +:::note +clickhouse-jdbc-bridge ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªã‚³ãƒ¼ãƒ‰ã‚’å«ã¿ã€ã‚‚ã¯ã‚„サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。信頼性ã®å•é¡Œã‚„セキュリティã®è„†å¼±æ€§ã‚’å«ã‚€å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚使用ã¯è‡ªå·±è²¬ä»»ã§è¡Œã£ã¦ãã ã•ã„。 +ClickHouse ã¯ã€ã‚¯ãƒªãƒƒã‚¯ãƒã‚¦ã‚¹å†…ã®çµ„ã¿è¾¼ã¿ãƒ†ãƒ¼ãƒ–ル関数ã®ä½¿ç”¨ã‚’推奨ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¢ãƒ‰ãƒ›ãƒƒã‚¯ãªã‚¯ã‚¨ãƒªã‚·ãƒŠãƒªã‚ªï¼ˆPostgresã€MySQLã€MongoDB ãªã©ï¼‰ã®ãŸã‚ã®ã‚ˆã‚Šè‰¯ã„代替手段をæä¾›ã—ã¾ã™ã€‚ +::: + +`jdbc(datasource, schema, table)` - JDBC ドライãƒãƒ¼ã‚’介ã—ã¦æŽ¥ç¶šã•ã‚Œã‚‹ãƒ†ãƒ¼ãƒ–ルを返ã—ã¾ã™ã€‚ + +ã“ã®ãƒ†ãƒ¼ãƒ–ル関数ã¯ã€åˆ¥é€” [clickhouse-jdbc-bridge](https://github.com/ClickHouse/clickhouse-jdbc-bridge) プログラムã®å®Ÿè¡ŒãŒå¿…è¦ã§ã™ã€‚ +Nullable åž‹ã®ã‚µãƒãƒ¼ãƒˆï¼ˆã‚¯ã‚¨ãƒªã•ã‚ŒãŸãƒªãƒ¢ãƒ¼ãƒˆãƒ†ãƒ¼ãƒ–ル㮠DDL ã«åŸºã¥ã„ã¦)ã‚‚æä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**例** + +``` sql +SELECT * FROM jdbc('jdbc:mysql://localhost:3306/?user=root&password=root', 'schema', 'table') +``` + +``` sql +SELECT * FROM jdbc('mysql://localhost:3306/?user=root&password=root', 'select * from schema.table') +``` + +``` sql +SELECT * FROM jdbc('mysql-dev?p1=233', 'num Int32', 'select toInt32OrZero(''{{p1}}'') as num') +``` + +``` sql +SELECT * +FROM jdbc('mysql-dev?p1=233', 'num Int32', 'select toInt32OrZero(''{{p1}}'') as num') +``` + +``` sql +SELECT a.datasource AS server1, b.datasource AS server2, b.name AS db +FROM jdbc('mysql-dev?datasource_column', 'show databases') a +INNER JOIN jdbc('self?datasource_column', 'show databases') b ON a.Database = b.name +``` + diff --git a/docs/ja/sql-reference/table-functions/loop.md b/docs/ja/sql-reference/table-functions/loop.md new file mode 100644 index 00000000000..8249bf1af01 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/loop.md @@ -0,0 +1,55 @@ +# loop + +**構文** + +``` sql +SELECT ... FROM loop(database, table); +SELECT ... FROM loop(database.table); +SELECT ... FROM loop(table); +SELECT ... FROM loop(other_table_function(...)); +``` + +**パラメータ** + +- `database` — データベースå。 +- `table` — テーブルå。 +- `other_table_function(...)` — ä»–ã®ãƒ†ãƒ¼ãƒ–ル関数。 + 例: `SELECT * FROM loop(numbers(10));` + `other_table_function(...)` ã“ã“ã§ã¯ `numbers(10)`。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +クエリã®çµæžœã‚’è¿”ã™ãŸã‚ã®ç„¡é™ãƒ«ãƒ¼ãƒ—。 + +**例** + +ClickHouseã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹: + +``` sql +SELECT * FROM loop(test_database, test_table); +SELECT * FROM loop(test_database.test_table); +SELECT * FROM loop(test_table); +``` + +ã¾ãŸã¯ä»–ã®ãƒ†ãƒ¼ãƒ–ル関数を使用ã™ã‚‹å ´åˆ: + +``` sql +SELECT * FROM loop(numbers(3)) LIMIT 7; + ┌─number─┠+1. │ 0 │ +2. │ 1 │ +3. │ 2 │ + └────────┘ + ┌─number─┠+4. │ 0 │ +5. │ 1 │ +6. │ 2 │ + └────────┘ + ┌─number─┠+7. │ 0 │ + └────────┘ +``` +``` sql +SELECT * FROM loop(mysql('localhost:3306', 'test', 'test', 'user', 'password')); +... +``` diff --git a/docs/ja/sql-reference/table-functions/merge.md b/docs/ja/sql-reference/table-functions/merge.md new file mode 100644 index 00000000000..af9e9949443 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/merge.md @@ -0,0 +1,27 @@ +--- +slug: /ja/sql-reference/table-functions/merge +sidebar_position: 130 +sidebar_label: merge +--- + +# merge + +一時的ãª[Merge](../../engines/table-engines/special/merge.md)テーブルを作æˆã—ã¾ã™ã€‚テーブルã®æ§‹é€ ã¯ã€æ­£è¦è¡¨ç¾ã«ä¸€è‡´ã™ã‚‹æœ€åˆã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰å–å¾—ã•ã‚Œã¾ã™ã€‚ + +**構文** + +```sql +merge(['db_name',] 'tables_regexp') +``` +**引数** + +- `db_name` — 以下ã®ã‚ˆã†ãªå€¤ãŒå¯èƒ½ã§ã™ï¼ˆã‚ªãƒ—ションã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯`currentDatabase()`): + - データベースå〠+ - データベースåを文字列ã¨ã—ã¦è¿”ã™å®šæ•°å¼ã€ä¾‹ãˆã°`currentDatabase()`〠+ - `REGEXP(expression)`ã€ã“ã“ã§`expression`ã¯DBåã«ä¸€è‡´ã•ã›ã‚‹ãŸã‚ã®æ­£è¦è¡¨ç¾ã§ã™ã€‚ + +- `tables_regexp` — 指定ã•ã‚ŒãŸDBã¾ãŸã¯DB群ã§ãƒ†ãƒ¼ãƒ–ルåã¨ä¸€è‡´ã•ã›ã‚‹ãŸã‚ã®æ­£è¦è¡¨ç¾ã€‚ + +**関連項目** + +- [Merge](../../engines/table-engines/special/merge.md)テーブルエンジン diff --git a/docs/ja/sql-reference/table-functions/mergeTreeIndex.md b/docs/ja/sql-reference/table-functions/mergeTreeIndex.md new file mode 100644 index 00000000000..295680fe589 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/mergeTreeIndex.md @@ -0,0 +1,83 @@ +--- +slug: /ja/sql-reference/table-functions/mergeTreeIndex +sidebar_position: 77 +sidebar_label: mergeTreeIndex +--- + +# mergeTreeIndex + +MergeTreeテーブルã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ãƒžãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã®å†…容を表ã—ã¾ã™ã€‚ã“ã‚Œã¯èª¿æŸ»ã®ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +``` sql +mergeTreeIndex(database, table, [with_marks = true]) +``` + +**引数** + +- `database` - インデックスã¨ãƒžãƒ¼ã‚¯ã‚’読ã¿å–ã‚‹ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å。 +- `table` - インデックスã¨ãƒžãƒ¼ã‚¯ã‚’読ã¿å–ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルå。 +- `with_marks` - çµæžœã«ãƒžãƒ¼ã‚¯ã‚’å«ã‚€ã‚«ãƒ©ãƒ ã‚’å«ã‚ã‚‹ã‹ã©ã†ã‹ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +ソーステーブルã®ä¸»ã‚­ãƒ¼ã®å€¤ã‚’æŒã¤ã‚«ãƒ©ãƒ ã€ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãƒ‘ーツ内ã®ã™ã¹ã¦ã®å¯èƒ½ãªãƒ•ã‚¡ã‚¤ãƒ«ã«å¯¾ã™ã‚‹ãƒžãƒ¼ã‚¯ã®å€¤ã‚’æŒã¤ã‚«ãƒ©ãƒ ï¼ˆæœ‰åŠ¹ãªå ´åˆï¼‰ãŠã‚ˆã³ä»®æƒ³ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルオブジェクト: + +- `part_name` - データパーツã®åå‰ã€‚ +- `mark_number` - データパーツ内ã®ç¾åœ¨ã®ãƒžãƒ¼ã‚¯ã®ç•ªå·ã€‚ +- `rows_in_granule` - ç¾åœ¨ã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«å†…ã®è¡Œæ•°ã€‚ + +マークã®ã‚«ãƒ©ãƒ ã¯ã€ã‚«ãƒ©ãƒ ãŒãƒ‡ãƒ¼ã‚¿ãƒ‘ーツã«å­˜åœ¨ã—ãªã„å ´åˆã‚„ã€ãã®ã‚µãƒ–ストリームã®ãƒžãƒ¼ã‚¯ãŒæ›¸ãè¾¼ã¾ã‚Œã¦ã„ãªã„å ´åˆï¼ˆä¾‹ï¼šã‚³ãƒ³ãƒ‘クトパーツ)ã«`(NULL, NULL)`ã®å€¤ã‚’å«ã‚€ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +## 使用例 + +```sql +CREATE TABLE test_table +( + `id` UInt64, + `n` UInt64, + `arr` Array(UInt64) +) +ENGINE = MergeTree +ORDER BY id +SETTINGS index_granularity = 3, min_bytes_for_wide_part = 0, min_rows_for_wide_part = 8; + +INSERT INTO test_table SELECT number, number, range(number % 5) FROM numbers(5); + +INSERT INTO test_table SELECT number, number, range(number % 5) FROM numbers(10, 10); +``` + +```sql +SELECT * FROM mergeTreeIndex(currentDatabase(), test_table, with_marks = true); +``` + +```text +┌─part_name─┬─mark_number─┬─rows_in_granule─┬─id─┬─id.mark─┬─n.mark──┬─arr.size0.mark─┬─arr.mark─┠+│ all_1_1_0 │ 0 │ 3 │ 0 │ (0,0) │ (42,0) │ (NULL,NULL) │ (84,0) │ +│ all_1_1_0 │ 1 │ 2 │ 3 │ (133,0) │ (172,0) │ (NULL,NULL) │ (211,0) │ +│ all_1_1_0 │ 2 │ 0 │ 4 │ (271,0) │ (271,0) │ (NULL,NULL) │ (271,0) │ +└───────────┴─────────────┴─────────────────┴────┴─────────┴─────────┴────────────────┴──────────┘ +┌─part_name─┬─mark_number─┬─rows_in_granule─┬─id─┬─id.mark─┬─n.mark─┬─arr.size0.mark─┬─arr.mark─┠+│ all_2_2_0 │ 0 │ 3 │ 10 │ (0,0) │ (0,0) │ (0,0) │ (0,0) │ +│ all_2_2_0 │ 1 │ 3 │ 13 │ (0,24) │ (0,24) │ (0,24) │ (0,24) │ +│ all_2_2_0 │ 2 │ 3 │ 16 │ (0,48) │ (0,48) │ (0,48) │ (0,80) │ +│ all_2_2_0 │ 3 │ 1 │ 19 │ (0,72) │ (0,72) │ (0,72) │ (0,128) │ +│ all_2_2_0 │ 4 │ 0 │ 19 │ (0,80) │ (0,80) │ (0,80) │ (0,160) │ +└───────────┴─────────────┴─────────────────┴────┴─────────┴────────┴────────────────┴──────────┘ +``` + +```sql +DESCRIBE mergeTreeIndex(currentDatabase(), test_table, with_marks = true) SETTINGS describe_compact_output = 1; +``` + +```text +┌─name────────────┬─type─────────────────────────────────────────────────────────────────────────────────────────────┠+│ part_name │ String │ +│ mark_number │ UInt64 │ +│ rows_in_granule │ UInt64 │ +│ id │ UInt64 │ +│ id.mark │ Tuple(offset_in_compressed_file Nullable(UInt64), offset_in_decompressed_block Nullable(UInt64)) │ +│ n.mark │ Tuple(offset_in_compressed_file Nullable(UInt64), offset_in_decompressed_block Nullable(UInt64)) │ +│ arr.size0.mark │ Tuple(offset_in_compressed_file Nullable(UInt64), offset_in_decompressed_block Nullable(UInt64)) │ +│ arr.mark │ Tuple(offset_in_compressed_file Nullable(UInt64), offset_in_decompressed_block Nullable(UInt64)) │ +└─────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/table-functions/mongodb.md b/docs/ja/sql-reference/table-functions/mongodb.md new file mode 100644 index 00000000000..3cd3e3f6b01 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/mongodb.md @@ -0,0 +1,104 @@ +--- +slug: /ja/sql-reference/table-functions/mongodb +sidebar_position: 135 +sidebar_label: mongodb +--- + +# mongodb + +リモートã®MongoDBサーãƒãƒ¼ã«ä¿å­˜ã•ã‚Œã¦ã„るデータã«å¯¾ã—ã¦`SELECT`クエリを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +``` sql +mongodb(host:port, database, collection, user, password, structure [, options]) +``` + +**引数** + +- `host:port` — MongoDBサーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ + +- `database` — リモートデータベースå。 + +- `collection` — リモートコレクションå。 + +- `user` — MongoDBユーザー。 + +- `password` — ユーザーパスワード。 + +- `structure` - ã“ã®é–¢æ•°ã‹ã‚‰è¿”ã•ã‚Œã‚‹ClickHouseテーブルã®ã‚¹ã‚­ãƒ¼ãƒžã€‚ + +- `options` - MongoDB接続文字列オプション(オプションã®ãƒ‘ラメータ)。 + +:::tip +MongoDB Atlasクラウドを使用ã—ã¦ã„ã‚‹å ´åˆã€æ¬¡ã®ã‚ªãƒ—ションを追加ã—ã¦ãã ã•ã„: + +``` +'connectTimeoutMS=10000&ssl=true&authSource=admin' +``` + +::: + +ã¾ãŸã€URIã§æŽ¥ç¶šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š +``` sql +mongodb(uri, collection, structure) +``` +**引数** + +- `uri` — 接続文字列。 + +- `collection` — リモートコレクションå。 + +- `structure` — ã“ã®é–¢æ•°ã‹ã‚‰è¿”ã•ã‚Œã‚‹ClickHouseテーブルã®ã‚¹ã‚­ãƒ¼ãƒžã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +MongoDBã®ã‚ªãƒªã‚¸ãƒŠãƒ«ãƒ†ãƒ¼ãƒ–ルã¨åŒã˜ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルオブジェクト。 + + +**例** + +MongoDBデータベース`test`ã«å®šç¾©ã•ã‚Œã¦ã„るコレクション`my_collection`ãŒã‚ã‚Šã€ãã“ã«ã„ãã¤ã‹ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’挿入ã™ã‚‹ã¨ã—ã¾ã™ï¼š + +```sql +db.createUser({user:"test_user",pwd:"password",roles:[{role:"readWrite",db:"test"}]}) + +db.createCollection("my_collection") + +db.my_collection.insertOne( + { log_type: "event", host: "120.5.33.9", command: "check-cpu-usage -w 75 -c 90" } +) + +db.my_collection.insertOne( + { log_type: "event", host: "120.5.33.4", command: "system-check"} +) +``` + +ã“ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’`mongodb`テーブル関数を使ã£ã¦ã‚¯ã‚¨ãƒªã—ã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT * FROM mongodb( + '127.0.0.1:27017', + 'test', + 'my_collection', + 'test_user', + 'password', + 'log_type String, host String, command String', + 'connectTimeoutMS=10000' +) +``` + +ã¾ãŸã¯ï¼š + +```sql +SELECT * FROM mongodb( + 'mongodb://test_user:password@127.0.0.1:27017/test?connectionTimeoutMS=10000', + 'my_collection', + 'log_type String, host String, command String' +) +``` + +**関連項目** + +- [MongoDBテーブルエンジン](/docs/ja/engines/table-engines/integrations/mongodb.md) +- [Dictionaryソースã¨ã—ã¦ã®MongoDBã®åˆ©ç”¨](/docs/ja/sql-reference/dictionaries/index.md#mongodb) diff --git a/docs/ja/sql-reference/table-functions/mysql.md b/docs/ja/sql-reference/table-functions/mysql.md new file mode 100644 index 00000000000..2f4eea75614 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/mysql.md @@ -0,0 +1,143 @@ +--- +slug: /ja/sql-reference/table-functions/mysql +sidebar_position: 137 +sidebar_label: mysql +--- + +# mysql + +リモートã®MySQLサーãƒãƒ¼ã«ä¿å­˜ã•ã‚Œã¦ã„るデータã«å¯¾ã—ã¦`SELECT`ãŠã‚ˆã³`INSERT`クエリを実行ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +**構文** + +``` sql +mysql({host:port, database, table, user, password[, replace_query, on_duplicate_clause] | named_collection[, option=value [,..]]}) +``` + +**パラメーター** + +- `host:port` — MySQLサーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ +- `database` — リモートデータベースå。 +- `table` — リモートテーブルå。 +- `user` — MySQLユーザー。 +- `password` — ユーザーパスワード。 +- `replace_query` — `INSERT INTO`クエリを`REPLACE INTO`ã«å¤‰æ›ã™ã‚‹ãƒ•ãƒ©ã‚°ã€‚å¯èƒ½ãªå€¤: + - `0` - クエリã¯`INSERT INTO`ã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + - `1` - クエリã¯`REPLACE INTO`ã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ +- `on_duplicate_clause` — `ON DUPLICATE KEY on_duplicate_clause`ãŒ`INSERT`クエリã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚`replace_query = 0`ã®å ´åˆã«ã®ã¿æŒ‡å®šã§ãã¾ã™ï¼ˆ`replace_query = 1`ã¨`on_duplicate_clause`ã‚’åŒæ™‚ã«æ¸¡ã™ã¨ã€ClickHouseã¯ä¾‹å¤–を生æˆã—ã¾ã™ï¼‰ã€‚ + 例: `INSERT INTO t (c1,c2) VALUES ('a', 2) ON DUPLICATE KEY UPDATE c2 = c2 + 1;` + ã“ã“ã§ã®`on_duplicate_clause`ã¯`UPDATE c2 = c2 + 1`ã§ã™ã€‚`ON DUPLICATE KEY`å¥ã§ä½¿ç”¨ã§ãã‚‹`on_duplicate_clause`ã«ã¤ã„ã¦ã¯ã€MySQLã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +引数ã¯ã€[named collections](/docs/ja/operations/named-collections.md)を使用ã—ã¦æ¸¡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`host`ã¨`port`ã¯åˆ¥ã€…ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã¯ã€æœ¬ç•ªç’°å¢ƒã§æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +ç¾åœ¨ã€`=, !=, >, >=, <, <=`ã®ã‚ˆã†ãªã‚·ãƒ³ãƒ—ルãª`WHERE`å¥ã¯MySQLサーãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +残りã®æ¡ä»¶ã¨`LIMIT`ã®ã‚µãƒ³ãƒ—リング制約ã¯ã€MySQLã¸ã®ã‚¯ã‚¨ãƒªãŒçµ‚了ã—ãŸå¾Œã«ClickHouseã§ã®ã¿å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +複数ã®ãƒ¬ãƒ—リカをサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€`|`ã§ãƒªã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例: + +```sql +SELECT name FROM mysql(`mysql{1|2|3}:3306`, 'mysql_database', 'mysql_table', 'user', 'password'); +``` + +ã¾ãŸã¯ + +```sql +SELECT name FROM mysql(`mysql1:3306|mysql2:3306|mysql3:3306`, 'mysql_database', 'mysql_table', 'user', 'password'); +``` + +**è¿”ã•ã‚Œã‚‹å€¤** + +å…ƒã®MySQLテーブルã¨åŒã˜ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルオブジェクト。 + +:::note +テーブル関数`mysql(...)`をカラムåã®ãƒªã‚¹ãƒˆã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルåã¨åŒºåˆ¥ã™ã‚‹ãŸã‚ã«ã¯ã€`INSERT`クエリã§ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰`FUNCTION`ã¾ãŸã¯`TABLE FUNCTION`を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚以下ã®ä¾‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +**例** + +MySQLã§ã®ãƒ†ãƒ¼ãƒ–ル: + +``` text +mysql> CREATE TABLE `test`.`test` ( + -> `int_id` INT NOT NULL AUTO_INCREMENT, + -> `float` FLOAT NOT NULL, + -> PRIMARY KEY (`int_id`)); + +mysql> INSERT INTO test (`int_id`, `float`) VALUES (1,2); + +mysql> SELECT * FROM test; ++--------+-------+ +| int_id | float | ++--------+-------+ +| 1 | 2 | ++--------+-------+ +``` + +ClickHouseã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿é¸æŠž: + +``` sql +SELECT * FROM mysql('localhost:3306', 'test', 'test', 'bayonet', '123'); +``` + +ã¾ãŸã¯[named collections](/docs/ja/operations/named-collections.md)を使用ã—ã¦: + +```sql +CREATE NAMED COLLECTION creds AS + host = 'localhost', + port = 3306, + database = 'test', + user = 'bayonet', + password = '123'; +SELECT * FROM mysql(creds, table='test'); +``` + +``` text +┌─int_id─┬─float─┠+│ 1 │ 2 │ +└────────┴───────┘ +``` + +ç½®æ›ã¨æŒ¿å…¥: + +```sql +INSERT INTO FUNCTION mysql('localhost:3306', 'test', 'test', 'bayonet', '123', 1) (int_id, float) VALUES (1, 3); +INSERT INTO TABLE FUNCTION mysql('localhost:3306', 'test', 'test', 'bayonet', '123', 0, 'UPDATE int_id = int_id + 1') (int_id, float) VALUES (1, 4); +SELECT * FROM mysql('localhost:3306', 'test', 'test', 'bayonet', '123'); +``` + +``` text +┌─int_id─┬─float─┠+│ 1 │ 3 │ +│ 2 │ 4 │ +└────────┴───────┘ +``` + +MySQLテーブルã‹ã‚‰ClickHouseテーブルã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚³ãƒ”ー: + +```sql +CREATE TABLE mysql_copy +( + `id` UInt64, + `datetime` DateTime('UTC'), + `description` String, +) +ENGINE = MergeTree +ORDER BY (id,datetime); + +INSERT INTO mysql_copy +SELECT * FROM mysql('host:port', 'database', 'table', 'user', 'password'); +``` + +ã¾ãŸã¯ã€ç¾åœ¨ã®æœ€å¤§IDã«åŸºã¥ã„ã¦MySQLã‹ã‚‰ã®ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãƒãƒƒãƒã®ã¿ã‚’コピーã™ã‚‹å ´åˆ: + +```sql +INSERT INTO mysql_copy +SELECT * FROM mysql('host:port', 'database', 'table', 'user', 'password') +WHERE id > (SELECT max(id) from mysql_copy); +``` + +**関連項目** + +- [MySQLテーブルエンジン](../../engines/table-engines/integrations/mysql.md) +- [MySQLã‚’Dictionaryソースã¨ã—ã¦ä½¿ç”¨ã™ã‚‹](../../sql-reference/dictionaries/index.md#dictionary-sources#dicts-external_dicts_dict_sources-mysql) diff --git a/docs/ja/sql-reference/table-functions/null.md b/docs/ja/sql-reference/table-functions/null.md new file mode 100644 index 00000000000..10ec674fe8f --- /dev/null +++ b/docs/ja/sql-reference/table-functions/null.md @@ -0,0 +1,42 @@ +--- +slug: /ja/sql-reference/table-functions/null +sidebar_position: 140 +sidebar_label: null 関数 +title: 'null' +--- + +指定ã•ã‚ŒãŸæ§‹é€ ã®ä¸€æ™‚テーブルを [Null](../../engines/table-engines/special/null.md) テーブルエンジンã§ä½œæˆã—ã¾ã™ã€‚`Null` エンジンã®ç‰¹æ€§ã«ã‚ˆã‚Šã€ãƒ†ãƒ¼ãƒ–ルデータã¯ç„¡è¦–ã•ã‚Œã€ã‚¯ã‚¨ãƒªã®å®Ÿè¡Œå¾Œã™ãã«ãƒ†ãƒ¼ãƒ–ル自体ãŒå‰Šé™¤ã•ã‚Œã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€ãƒ†ã‚¹ãƒˆã‚„デモンストレーションを行ã†éš›ã®åˆ©ä¾¿æ€§ã®ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +null('structure') +``` + +**パラメータ** + +- `structure` — カラムã¨ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã®ãƒªã‚¹ãƒˆã€‚[String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸæ§‹é€ ã‚’æŒã¤ä¸€æ™‚的㪠`Null` エンジンテーブル。 + +**例** + +`null` 関数を使用ã—ãŸã‚¯ã‚¨ãƒª: + +``` sql +INSERT INTO function null('x UInt64') SELECT * FROM numbers_mt(1000000000); +``` +ã¯æ¬¡ã®ä¸‰ã¤ã®ã‚¯ã‚¨ãƒªã‚’ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```sql +CREATE TABLE t (x UInt64) ENGINE = Null; +INSERT INTO t SELECT * FROM numbers_mt(1000000000); +DROP TABLE IF EXISTS t; +``` + +関連項目: + +- [Null テーブルエンジン](../../engines/table-engines/special/null.md) + diff --git a/docs/ja/sql-reference/table-functions/numbers.md b/docs/ja/sql-reference/table-functions/numbers.md new file mode 100644 index 00000000000..278284d702a --- /dev/null +++ b/docs/ja/sql-reference/table-functions/numbers.md @@ -0,0 +1,38 @@ +--- +slug: /ja/sql-reference/table-functions/numbers +sidebar_position: 145 +sidebar_label: numbers +--- + +# numbers + +`numbers(N)` – 0 ã‹ã‚‰ N-1 ã¾ã§ã®æ•´æ•°ã‚’å«ã‚€å˜ä¸€ã®ã€Œnumberã€ã‚«ãƒ©ãƒ  (UInt64) ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを返ã—ã¾ã™ã€‚ +`numbers(N, M)` - N ã‹ã‚‰ (N + M - 1) ã¾ã§ã®æ•´æ•°ã‚’å«ã‚€å˜ä¸€ã®ã€Œnumberã€ã‚«ãƒ©ãƒ  (UInt64) ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを返ã—ã¾ã™ã€‚ +`numbers(N, M, S)` - N ã‹ã‚‰ (N + M - 1) ã¾ã§ã®æ•´æ•°ã‚’ステップ S ã§å«ã‚€å˜ä¸€ã®ã€Œnumberã€ã‚«ãƒ©ãƒ  (UInt64) ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルを返ã—ã¾ã™ã€‚ + +`system.numbers` テーブルã«é¡žä¼¼ã—ã¦ãŠã‚Šã€ãƒ†ã‚¹ãƒˆã‚„連続ã™ã‚‹å€¤ã®ç”Ÿæˆã«ä½¿ç”¨ã§ãã¾ã™ãŒã€`numbers(N, M)` ã®æ–¹ãŒ `system.numbers` よりも効率的ã§ã™ã€‚ + +以下ã®ã‚¯ã‚¨ãƒªã¯åŒç­‰ã§ã™ï¼š + +``` sql +SELECT * FROM numbers(10); +SELECT * FROM numbers(0, 10); +SELECT * FROM system.numbers LIMIT 10; +SELECT * FROM system.numbers WHERE number BETWEEN 0 AND 9; +SELECT * FROM system.numbers WHERE number IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9); +``` + +ãã—ã¦ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚‚åŒç­‰ã§ã™ï¼š + +``` sql +SELECT number * 2 FROM numbers(10); +SELECT (number - 10) * 2 FROM numbers(10, 10); +SELECT * FROM numbers(0, 20, 2); +``` + +例: + +``` sql +-- 2010-01-01 ã‹ã‚‰ 2010-12-31 ã¾ã§ã®æ—¥ä»˜ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’ç”Ÿæˆ +select toDate('2010-01-01') + number as d FROM numbers(365); +``` diff --git a/docs/ja/sql-reference/table-functions/odbc.md b/docs/ja/sql-reference/table-functions/odbc.md new file mode 100644 index 00000000000..3120b610ceb --- /dev/null +++ b/docs/ja/sql-reference/table-functions/odbc.md @@ -0,0 +1,105 @@ +--- +slug: /ja/sql-reference/table-functions/odbc +sidebar_position: 150 +sidebar_label: odbc +--- + +# odbc + +[ODBC](https://en.wikipedia.org/wiki/Open_Database_Connectivity)を介ã—ã¦æŽ¥ç¶šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルを返ã—ã¾ã™ã€‚ + +``` sql +odbc(connection_settings, external_database, external_table) +``` + +パラメータ: + +- `connection_settings` — `odbc.ini`ファイル内ã®æŽ¥ç¶šè¨­å®šãŒæ›¸ã‹ã‚ŒãŸã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®åå‰ã€‚ +- `external_database` — 外部DBMSã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å。 +- `external_table` — `external_database`内ã®ãƒ†ãƒ¼ãƒ–ルå。 + +ODBC接続を安全ã«å®Ÿè£…ã™ã‚‹ãŸã‚ã«ã€ClickHouseã¯åˆ¥ã®ãƒ—ログラム `clickhouse-odbc-bridge` を使用ã—ã¾ã™ã€‚ODBCドライãƒãƒ¼ã‚’直接`clickhouse-server`ã‹ã‚‰ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã¨ã€ãƒ‰ãƒ©ã‚¤ãƒãƒ¼ã®å•é¡ŒãŒClickHouseサーãƒãƒ¼ã‚’クラッシュã•ã›ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã€ClickHouseã¯è‡ªå‹•çš„ã«`clickhouse-odbc-bridge`ã‚’èµ·å‹•ã—ã¾ã™ã€‚ã“ã®ODBCブリッジプログラムã¯`clickhouse-server`ã¨åŒã˜ãƒ‘ッケージã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¾ã™ã€‚ + +外部テーブルã‹ã‚‰`NULL`値をæŒã¤ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯ã€åŸºæœ¬ãƒ‡ãƒ¼ã‚¿åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚例ãˆã°ã€ãƒªãƒ¢ãƒ¼ãƒˆã®MySQLテーブルフィールドãŒ`INT NULL`åž‹ã§ã‚ã‚‹å ´åˆã€0(ClickHouseã®`Int32`データ型ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼‰ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +## 使用例 + +**ODBCを介ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ã®MySQLインストールã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—** + +ã“ã®ä¾‹ã¯ Ubuntu Linux 18.04 㨠MySQL サーãƒãƒ¼ 5.7 ã§ç¢ºèªã•ã‚Œã¦ã„ã¾ã™ã€‚ + +unixODBCã¨MySQL ConnectorãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +デフォルトã§ã¯ï¼ˆãƒ‘ッケージã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚ŒãŸå ´åˆï¼‰ã€ClickHouseã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼`clickhouse`ã¨ã—ã¦èµ·å‹•ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’MySQLサーãƒãƒ¼ã«ä½œæˆã—ã¦è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +``` bash +$ sudo mysql +``` + +``` sql +mysql> CREATE USER 'clickhouse'@'localhost' IDENTIFIED BY 'clickhouse'; +mysql> GRANT ALL PRIVILEGES ON *.* TO 'clickhouse'@'localhost' WITH GRANT OPTION; +``` + +次ã«ã€`/etc/odbc.ini`ã§æŽ¥ç¶šã‚’設定ã—ã¾ã™ã€‚ + +``` bash +$ cat /etc/odbc.ini +[mysqlconn] +DRIVER = /usr/local/lib/libmyodbc5w.so +SERVER = 127.0.0.1 +PORT = 3306 +DATABASE = test +USERNAME = clickhouse +PASSWORD = clickhouse +``` + +unixODBCインストールã‹ã‚‰ã®`isql`ユーティリティを使用ã—ã¦æŽ¥ç¶šã‚’確èªã§ãã¾ã™ã€‚ + +``` bash +$ isql -v mysqlconn ++-------------------------+ +| Connected! | +| | +... +``` + +MySQLã®ãƒ†ãƒ¼ãƒ–ル: + +``` text +mysql> CREATE TABLE `test`.`test` ( + -> `int_id` INT NOT NULL AUTO_INCREMENT, + -> `int_nullable` INT NULL DEFAULT NULL, + -> `float` FLOAT NOT NULL, + -> `float_nullable` FLOAT NULL DEFAULT NULL, + -> PRIMARY KEY (`int_id`)); +Query OK, 0 rows affected (0,09 sec) + +mysql> insert into test (`int_id`, `float`) VALUES (1,2); +Query OK, 1 row affected (0,00 sec) + +mysql> select * from test; ++--------+--------------+-------+----------------+ +| int_id | int_nullable | float | float_nullable | ++--------+--------------+-------+----------------+ +| 1 | NULL | 2 | NULL | ++--------+--------------+-------+----------------+ +1 row in set (0,00 sec) +``` + +ClickHouseã§MySQLテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—: + +``` sql +SELECT * FROM odbc('DSN=mysqlconn', 'test', 'test') +``` + +``` text +┌─int_id─┬─int_nullable─┬─float─┬─float_nullable─┠+│ 1 │ 0 │ 2 │ 0 │ +└────────┴──────────────┴───────┴────────────────┘ +``` + +## 関連項目 + +- [ODBC dictionaries](../../sql-reference/dictionaries/index.md#dictionary-sources#dicts-external_dicts_dict_sources-odbc) +- [ODBC table engine](../../engines/table-engines/integrations/odbc.md). diff --git a/docs/ja/sql-reference/table-functions/postgresql.md b/docs/ja/sql-reference/table-functions/postgresql.md new file mode 100644 index 00000000000..fec5b39ab6a --- /dev/null +++ b/docs/ja/sql-reference/table-functions/postgresql.md @@ -0,0 +1,157 @@ +--- +slug: /ja/sql-reference/table-functions/postgresql +sidebar_position: 160 +sidebar_label: postgresql +--- + +# postgresql + +リモートã®PostgreSQLサーãƒãƒ¼ã«ä¿å­˜ã•ã‚Œã¦ã„るデータã«å¯¾ã—ã¦`SELECT`ãŠã‚ˆã³`INSERT`クエリを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**構文** + +``` sql +postgresql({host:port, database, table, user, password[, schema, [, on_conflict]] | named_collection[, option=value [,..]]}) +``` + +**パラメータ** + +- `host:port` — PostgreSQLサーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ +- `database` — リモートデータベースå。 +- `table` — リモートテーブルå。 +- `user` — PostgreSQLユーザー。 +- `password` — ユーザーパスワード。 +- `schema` — デフォルトã§ãªã„テーブルスキーマ。オプション。 +- `on_conflict` — コンフリクト解決戦略。例: `ON CONFLICT DO NOTHING`。オプション。 + +引数ã¯[åå‰ä»˜ãコレクション](/docs/ja/operations/named-collections.md)を使用ã—ã¦æ¸¡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`host`ã¨`port`ã¯åˆ¥ã€…ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æ–¹æ³•ã¯æœ¬ç•ªç’°å¢ƒã«æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +å…ƒã®PostgreSQLテーブルã¨åŒã˜ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルオブジェクト。 + +:::note +テーブル関数`postgresql(...)`をテーブルåã¨ã‚«ãƒ©ãƒ åリストã‹ã‚‰åŒºåˆ¥ã™ã‚‹ãŸã‚ã«ã€`INSERT`クエリã§ã¯ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰`FUNCTION`ã¾ãŸã¯`TABLE FUNCTION`を使用ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。以下ã®ä¾‹ã‚’ã”覧ãã ã•ã„。 +::: + +## 実装ã®è©³ç´° + +PostgreSQLå´ã§ã®`SELECT`クエリã¯ã€èª­ã¿å–り専用PostgreSQLトランザクション内ã§`COPY (SELECT ...) TO STDOUT`ã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã€å„`SELECT`クエリ後ã«ã‚³ãƒŸãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ + +`=`, `!=`, `>`, `>=`, `<`, `<=`, ãŠã‚ˆã³`IN`ãªã©ã®å˜ç´”ãª`WHERE`å¥ã¯PostgreSQLサーãƒãƒ¼ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +ã™ã¹ã¦ã®ã‚¸ãƒ§ã‚¤ãƒ³ã€é›†è¨ˆã€ã‚½ãƒ¼ãƒˆã€`IN [ array ]`æ¡ä»¶ã€ãŠã‚ˆã³`LIMIT`サンプリング制約ã¯ã€PostgreSQLã¸ã®ã‚¯ã‚¨ãƒªçµ‚了後ã«ClickHouseã®ã¿ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +PostgreSQLå´ã§ã®`INSERT`クエリã¯ã€PostgreSQLトランザクション内ã§è‡ªå‹•ã‚³ãƒŸãƒƒãƒˆã§å„`INSERT`文後ã«`COPY "table_name" (field1, field2, ... fieldN) FROM STDIN`ã¨ã—ã¦å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚ + +PostgreSQLé…列型ã¯ClickHouseã®é…列ã«å¤‰æ›ã•ã‚Œã¾ã™ã€‚ + +:::note +注æ„ãŒå¿…è¦ã§ã™ã€‚PostgreSQLã§ã¯ã€ãƒ‡ãƒ¼ã‚¿åž‹ã‚«ãƒ©ãƒ ãŒç•°ãªã‚‹æ¬¡å…ƒã®é…列をå«ã‚€ã“ã¨ãŒã§ãã‚‹ãŒã€ClickHouseã§ã¯ã™ã¹ã¦ã®è¡Œã§åŒã˜æ¬¡å…ƒã®å¤šæ¬¡å…ƒé…列ã®ã¿ãŒè¨±å¯ã•ã‚Œã¾ã™ã€‚ +::: + +複数ã®ãƒ¬ãƒ—リカをサãƒãƒ¼ãƒˆã—ã€`|`ã§ãƒªã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ï¼š + +```sql +SELECT name FROM postgresql(`postgres{1|2|3}:5432`, 'postgres_database', 'postgres_table', 'user', 'password'); +``` + +ã¾ãŸã¯ + +```sql +SELECT name FROM postgresql(`postgres1:5431|postgres2:5432`, 'postgres_database', 'postgres_table', 'user', 'password'); +``` + +PostgreSQL Dictionaryソースã®ãƒ¬ãƒ—リカ優先度をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚マップ内ã®æ•°å­—ãŒå¤§ãã„ã»ã©å„ªå…ˆåº¦ãŒä½Žããªã‚Šã¾ã™ã€‚最も高ã„優先度ã¯`0`ã§ã™ã€‚ + +**例** + +PostgreSQLã®ãƒ†ãƒ¼ãƒ–ル: + +``` text +postgres=# CREATE TABLE "public"."test" ( +"int_id" SERIAL, +"int_nullable" INT NULL DEFAULT NULL, +"float" FLOAT NOT NULL, +"str" VARCHAR(100) NOT NULL DEFAULT '', +"float_nullable" FLOAT NULL DEFAULT NULL, +PRIMARY KEY (int_id)); + +CREATE TABLE + +postgres=# INSERT INTO test (int_id, str, "float") VALUES (1,'test',2); +INSERT 0 1 + +postgresql> SELECT * FROM test; + int_id | int_nullable | float | str | float_nullable + --------+--------------+-------+------+---------------- + 1 | | 2 | test | +(1 row) +``` + +ClickHouseã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿é¸æŠžï¼ˆãƒ—レーン引数使用): + +```sql +SELECT * FROM postgresql('localhost:5432', 'test', 'test', 'postgresql_user', 'password') WHERE str IN ('test'); +``` + +ã¾ãŸã¯[åå‰ä»˜ãコレクション](/docs/ja/operations/named-collections.md)を使用: + +```sql +CREATE NAMED COLLECTION mypg AS + host = 'localhost', + port = 5432, + database = 'test', + user = 'postgresql_user', + password = 'password'; +SELECT * FROM postgresql(mypg, table='test') WHERE str IN ('test'); +``` + +``` text +┌─int_id─┬─int_nullable─┬─float─┬─str──┬─float_nullable─┠+│ 1 │ á´ºáµá´¸á´¸ │ 2 │ test │ á´ºáµá´¸á´¸ │ +└────────┴──────────────┴───────┴──────┴────────────────┘ +``` + +挿入: + +```sql +INSERT INTO TABLE FUNCTION postgresql('localhost:5432', 'test', 'test', 'postgrsql_user', 'password') (int_id, float) VALUES (2, 3); +SELECT * FROM postgresql('localhost:5432', 'test', 'test', 'postgresql_user', 'password'); +``` + +``` text +┌─int_id─┬─int_nullable─┬─float─┬─str──┬─float_nullable─┠+│ 1 │ á´ºáµá´¸á´¸ │ 2 │ test │ á´ºáµá´¸á´¸ │ +│ 2 │ á´ºáµá´¸á´¸ │ 3 │ │ á´ºáµá´¸á´¸ │ +└────────┴──────────────┴───────┴──────┴────────────────┘ +``` + +デフォルトã§ãªã„スキーマã®ä½¿ç”¨: + +```text +postgres=# CREATE SCHEMA "nice.schema"; + +postgres=# CREATE TABLE "nice.schema"."nice.table" (a integer); + +postgres=# INSERT INTO "nice.schema"."nice.table" SELECT i FROM generate_series(0, 99) as t(i) +``` + +```sql +CREATE TABLE pg_table_schema_with_dots (a UInt32) + ENGINE PostgreSQL('localhost:5432', 'clickhouse', 'nice.table', 'postgrsql_user', 'password', 'nice.schema'); +``` + +**関連項目** + +- [PostgreSQLテーブルエンジン](../../engines/table-engines/integrations/postgresql.md) +- [PostgreSQLã‚’Dictionaryã®ã‚½ãƒ¼ã‚¹ã¨ã—ã¦ä½¿ç”¨](../../sql-reference/dictionaries/index.md#dictionary-sources#dicts-external_dicts_dict_sources-postgresql) + +## 関連コンテンツ + +- ブログ: [ClickHouseã¨PostgreSQL - データ天国ã§çµã°ã‚ŒãŸé–¢ä¿‚ - パート1](https://clickhouse.com/blog/migrating-data-between-clickhouse-postgres) +- ブログ: [ClickHouseã¨PostgreSQL - データ天国ã§çµã°ã‚ŒãŸé–¢ä¿‚ - パート2](https://clickhouse.com/blog/migrating-data-between-clickhouse-postgres-part-2) + +### PeerDBを用ã„ãŸPostgresデータã®ãƒ¬ãƒ—リケーションã¾ãŸã¯ç§»è¡Œ + +> テーブル関数ã«åŠ ãˆã¦ã€[PeerDB](https://docs.peerdb.io/introduction)を使用ã—ã¦Postgresã‹ã‚‰ClickHouseã¸ã®ç¶™ç¶šçš„ãªãƒ‡ãƒ¼ã‚¿ãƒ‘イプラインを設定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚PeerDBã¯ã€å¤‰æ›´ãƒ‡ãƒ¼ã‚¿ã‚­ãƒ£ãƒ—ãƒãƒ£ï¼ˆCDC)を使用ã—ã¦Postgresã‹ã‚‰ClickHouseã«ãƒ‡ãƒ¼ã‚¿ã‚’レプリケートã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚ŒãŸãƒ„ールã§ã™ã€‚ diff --git a/docs/ja/sql-reference/table-functions/redis.md b/docs/ja/sql-reference/table-functions/redis.md new file mode 100644 index 00000000000..08c445cf893 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/redis.md @@ -0,0 +1,67 @@ +--- +slug: /ja/sql-reference/table-functions/redis +sidebar_position: 170 +sidebar_label: redis +--- + +# redis + +ã“ã®ãƒ†ãƒ¼ãƒ–ル関数ã¯ã€ClickHouseã‚’[Redis](https://redis.io/)ã¨çµ±åˆã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ + +**構文** + +```sql +redis(host:port, key, structure[, db_index[, password[, pool_size]]]) +``` + +**引数** + +- `host:port` — Redisサーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ãƒãƒ¼ãƒˆã‚’指定ã—ãªã„å ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§Redisã®ãƒãƒ¼ãƒˆ6379ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +- `key` — カラムリスト内ã®ä»»æ„ã®ã‚«ãƒ©ãƒ å。 + +- `structure` — ã“ã®é–¢æ•°ã«ã‚ˆã‚Šè¿”ã•ã‚Œã‚‹ClickHouseテーブルã®ã‚¹ã‚­ãƒ¼ãƒžã€‚ + +- `db_index` — Redisã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã§ã€ç¯„囲ã¯0ã‹ã‚‰15ã§ã™ã€‚デフォルトã¯0ã§ã™ã€‚ + +- `password` — ユーザーã®ãƒ‘スワード。デフォルトã¯ç©ºæ–‡å­—列ã§ã™ã€‚ + +- `pool_size` — Redisã®æœ€å¤§æŽ¥ç¶šãƒ—ールサイズ。デフォルトã¯16ã§ã™ã€‚ + +- `primary`ã¯æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ä¸»ã‚­ãƒ¼ã«ã¯1ã¤ã®ã‚«ãƒ©ãƒ ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚主キーã¯Redisキーã¨ã—ã¦ãƒã‚¤ãƒŠãƒªã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œã¾ã™ã€‚ + +- 主キー以外ã®ã‚«ãƒ©ãƒ ã¯ã€å¯¾å¿œã™ã‚‹é †åºã§Redisã®å€¤ã¨ã—ã¦ãƒã‚¤ãƒŠãƒªã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•ã‚Œã¾ã™ã€‚ + +- キーãŒç­‰ã—ã„ã‹ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã•ã‚Œã¦ã„るクエリã¯ã€Redisã‹ã‚‰ã®ãƒžãƒ«ãƒã‚­ãƒ¼æ¤œç´¢ã«æœ€é©åŒ–ã•ã‚Œã¾ã™ã€‚フィルタリングキーãªã—ã®ã‚¯ã‚¨ãƒªã¯ã€å…¨ãƒ†ãƒ¼ãƒ–ルスキャンãŒè¡Œã‚れるãŸã‚ã€é‡ã„æ“作ã«ãªã‚Šã¾ã™ã€‚ + +ç¾åœ¨ã€`redis`テーブル関数ã«ã¯[åå‰ä»˜ãコレクション](/docs/ja/operations/named-collections.md)ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +Redisキーã¨ã—ã¦ã®ã‚­ãƒ¼ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルオブジェクト。他ã®ã‚«ãƒ©ãƒ ã¯Redis値ã¨ã—ã¦ãƒ‘ッケージ化ã•ã‚Œã¾ã™ã€‚ + +## 使用例 {#usage-example} + +Redisã‹ã‚‰èª­ã¿è¾¼ã‚€: + +```sql +SELECT * FROM redis( + 'redis1:6379', + 'key', + 'key String, v1 String, v2 UInt32' +) +``` + +Redisã«æŒ¿å…¥ã™ã‚‹: + +```sql +INSERT INTO TABLE FUNCTION redis( + 'redis1:6379', + 'key', + 'key String, v1 String, v2 UInt32') values ('1', '1', 1); +``` + +**å‚ç…§** + +- [`Redis`テーブルエンジン](/docs/ja/engines/table-engines/integrations/redis.md) +- [Dictionaryソースã¨ã—ã¦redisを使用ã™ã‚‹](/docs/ja/sql-reference/dictionaries/index.md#redis) diff --git a/docs/ja/sql-reference/table-functions/remote.md b/docs/ja/sql-reference/table-functions/remote.md new file mode 100644 index 00000000000..d09a71fa130 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/remote.md @@ -0,0 +1,181 @@ +--- +slug: /ja/sql-reference/table-functions/remote +sidebar_position: 175 +sidebar_label: remote +--- + +# remote, remoteSecure + +テーブル関数 `remote` ã¯ã€[分散テーブル](../../engines/table-engines/special/distributed.md)を作æˆã™ã‚‹ã“ã¨ãªãã€ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã«å³åº§ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚テーブル関数 `remoteSecure` ã¯ã€ã‚»ã‚­ãƒ¥ã‚¢ãªæŽ¥ç¶šã‚’用ã„㟠`remote` ã¨åŒæ§˜ã®æ©Ÿèƒ½ã‚’æŒã¡ã¾ã™ã€‚ + +ã©ã¡ã‚‰ã®é–¢æ•°ã‚‚ `SELECT` ãŠã‚ˆã³ `INSERT` クエリã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 構文 + +``` sql +remote(addresses_expr, [db, table, user [, password], sharding_key]) +remote(addresses_expr, [db.table, user [, password], sharding_key]) +remote(named_collection[, option=value [,..]]) +remoteSecure(addresses_expr, [db, table, user [, password], sharding_key]) +remoteSecure(addresses_expr, [db.table, user [, password], sharding_key]) +remoteSecure(named_collection[, option=value [,..]]) +``` + +## パラメータ + +- `addresses_expr` — リモートサーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã¾ãŸã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã®è¤‡æ•°ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’生æˆã™ã‚‹å¼ã€‚フォーマット: `host` ã¾ãŸã¯ `host:port`。 + + `host` ã¯ã‚µãƒ¼ãƒãƒ¼åã¨ã—ã¦ã€ã‚ã‚‹ã„㯠IPv4 ã¾ãŸã¯ IPv6 アドレスã¨ã—ã¦æŒ‡å®šã§ãã¾ã™ã€‚IPv6 アドレスã¯è§’括弧ã§å›²ã‚€å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + + `port` ã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚µãƒ¼ãƒãƒ¼ã®TCPãƒãƒ¼ãƒˆã§ã™ã€‚ãƒãƒ¼ãƒˆãŒçœç•¥ã•ã‚ŒãŸå ´åˆã€ãƒ†ãƒ¼ãƒ–ル関数 `remote` ã«ã¯ã‚µãƒ¼ãƒãƒ¼æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã® [tcp_port](../../operations/server-configuration-parameters/settings.md#tcp_port)(デフォルトã¯9000)ã€ãƒ†ãƒ¼ãƒ–ル関数 `remoteSecure` ã«ã¯ [tcp_port_secure](../../operations/server-configuration-parameters/settings.md#tcp_port_secure)(デフォルトã¯9440)ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + + IPv6 アドレスã®å ´åˆã€ãƒãƒ¼ãƒˆã®æŒ‡å®šãŒå¿…é ˆã§ã™ã€‚ + + パラメータ `addresses_expr` ã®ã¿ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€`db` 㨠`table` ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ `system.one` ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + + åž‹: [String](../../sql-reference/data-types/string.md)。 + +- `db` — データベースå。型: [String](../../sql-reference/data-types/string.md)。 +- `table` — テーブルå。型: [String](../../sql-reference/data-types/string.md)。 +- `user` — ユーザーå。指定ã—ãªã„å ´åˆã¯ `default` ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚åž‹: [String](../../sql-reference/data-types/string.md)。 +- `password` — ユーザーパスワード。指定ã—ãªã„å ´åˆã¯ç©ºã®ãƒ‘スワードãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚åž‹: [String](../../sql-reference/data-types/string.md)。 +- `sharding_key` — ノード間ã§ãƒ‡ãƒ¼ã‚¿ã‚’分散ã™ã‚‹ãŸã‚ã®ã‚·ãƒ£ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚­ãƒ¼ã€‚例: `insert into remote('127.0.0.1:9000,127.0.0.2', db, table, 'default', rand())`。型: [UInt32](../../sql-reference/data-types/int-uint.md)。 + +引数ã¯[named collections](/docs/ja/operations/named-collections.md)を使ã£ã¦æ¸¡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## 戻り値 + +リモートサーãƒãƒ¼ã«å­˜åœ¨ã™ã‚‹ãƒ†ãƒ¼ãƒ–ル。 + +## 使用法 + +テーブル関数 `remote` ãŠã‚ˆã³ `remoteSecure` ã¯å„リクエストã”ã¨ã«æŽ¥ç¶šã‚’å†ç¢ºç«‹ã™ã‚‹ãŸã‚ã€`Distributed` テーブルを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã¾ãŸã€ãƒ›ã‚¹ãƒˆåãŒè¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€åå‰ã®è§£æ±ºãŒè¡Œã‚ã‚Œã€ã•ã¾ã–ã¾ãªãƒ¬ãƒ—リカã¨ä½œæ¥­ã™ã‚‹éš›ã«ã¯ã‚¨ãƒ©ãƒ¼ãŒã‚«ã‚¦ãƒ³ãƒˆã•ã‚Œã¾ã›ã‚“。多数ã®ã‚¯ã‚¨ãƒªã‚’処ç†ã™ã‚‹å ´åˆã¯ã€äº‹å‰ã« `Distributed` テーブルを作æˆã—ã€`remote` テーブル関数を使用ã—ãªã„よã†ã«ã—ã¦ãã ã•ã„。 + +`remote` テーブル関数ã¯ä»¥ä¸‹ã®ã‚±ãƒ¼ã‚¹ã§ä¾¿åˆ©ã§ã™: + +- システム間ã®ä¸€å›žé™ã‚Šã®ãƒ‡ãƒ¼ã‚¿ç§»è¡Œ +- データ比較ã€ãƒ‡ãƒãƒƒã‚°ã€ãŠã‚ˆã³ãƒ†ã‚¹ãƒˆã®ãŸã‚ã«ç‰¹å®šã®ã‚µãƒ¼ãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ï¼ˆã‚¢ãƒ‰ãƒ›ãƒƒã‚¯æŽ¥ç¶šï¼‰ +- 調査目的ã§ã®è¤‡æ•°ã® ClickHouse クラスター間ã®ã‚¯ã‚¨ãƒª +- 手動ã§è¡Œã‚れるã¾ã‚Œãªåˆ†æ•£ãƒªã‚¯ã‚¨ã‚¹ãƒˆ +- サーãƒãƒ¼ã®ã‚»ãƒƒãƒˆãŒæ¯Žå›žå†å®šç¾©ã•ã‚Œã‚‹åˆ†æ•£ãƒªã‚¯ã‚¨ã‚¹ãƒˆ + +### アドレス + +``` text +example01-01-1 +example01-01-1:9440 +example01-01-1:9000 +localhost +127.0.0.1 +[::]:9440 +[::]:9000 +[2a02:6b8:0:1111::11]:9000 +``` + +複数ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã¯ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ClickHouse ã¯åˆ†æ•£å‡¦ç†ã‚’使用ã—ã¦ã€æŒ‡å®šã—ãŸã™ã¹ã¦ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ï¼ˆç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’æŒã¤ã‚·ãƒ£ãƒ¼ãƒ‰ã®ã‚ˆã†ã«ï¼‰ã«ã‚¯ã‚¨ãƒªã‚’é€ä¿¡ã—ã¾ã™ã€‚例: + +``` text +example01-01-1,example01-02-1 +``` + +## 例 + +### リモートサーãƒãƒ¼ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ï¼š + +``` sql +SELECT * FROM remote('127.0.0.1', db.remote_engine_table) LIMIT 3; +``` + +ã¾ãŸã¯[named collections](/docs/ja/operations/named-collections.md)を使用ã™ã‚‹å ´åˆï¼š + +```sql +CREATE NAMED COLLECTION creds AS + host = '127.0.0.1', + database = 'db'; +SELECT * FROM remote(creds, table='remote_engine_table') LIMIT 3; +``` + +### リモートサーãƒãƒ¼ä¸Šã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ï¼š + +``` sql +CREATE TABLE remote_table (name String, value UInt32) ENGINE=Memory; +INSERT INTO FUNCTION remote('127.0.0.1', currentDatabase(), 'remote_table') VALUES ('test', 42); +SELECT * FROM remote_table; +``` + +### システムã‹ã‚‰ã‚·ã‚¹ãƒ†ãƒ ã¸ã®ãƒ†ãƒ¼ãƒ–ルã®ç§»è¡Œï¼š + +ã“ã®ä¾‹ã§ã¯ã€ã‚µãƒ³ãƒ—ルデータセットã®1ã¤ã®ãƒ†ãƒ¼ãƒ–ルを使用ã—ã¾ã™ã€‚データベース㯠`imdb`ã€ãƒ†ãƒ¼ãƒ–ル㯠`actors` ã§ã™ã€‚ + +#### ソース ClickHouse システムã§ï¼ˆç¾åœ¨ãƒ‡ãƒ¼ã‚¿ã‚’ホストã—ã¦ã„るシステム) + +- ソースデータベースãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルåを確èªã™ã‚‹ï¼ˆ`imdb.actors`) + + ```sql + show databases + ``` + + ```sql + show tables in imdb + ``` + +- ソースã‹ã‚‰ CREATE TABLE ステートメントをå–å¾—ã™ã‚‹ï¼š + + ``` + select create_table_query + from system.tables + where database = 'imdb' and table = 'actors' + ``` + + レスãƒãƒ³ã‚¹ + + ```sql + CREATE TABLE imdb.actors (`id` UInt32, + `first_name` String, + `last_name` String, + `gender` FixedString(1)) + ENGINE = MergeTree + ORDER BY (id, first_name, last_name, gender); + ``` + +#### é€ä¿¡å…ˆ ClickHouse システムã§ï¼š + +- é€ä¿¡å…ˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã™ã‚‹ï¼š + + ```sql + CREATE DATABASE imdb + ``` + +- ソースã‹ã‚‰ã® CREATE TABLE ステートメントを使用ã—ã€é€ä¿¡å…ˆã‚’作æˆã™ã‚‹ï¼š + + ```sql + CREATE TABLE imdb.actors (`id` UInt32, + `first_name` String, + `last_name` String, + `gender` FixedString(1)) + ENGINE = MergeTree + ORDER BY (id, first_name, last_name, gender); + ``` + +#### ソース展開ã«æˆ»ã£ã¦ï¼š + +リモートシステム上ã§ä½œæˆã—ãŸæ–°ã—ã„データベースãŠã‚ˆã³ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã—ã¾ã™ã€‚ホストã€ãƒãƒ¼ãƒˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã€ãƒ‘スワードã€é€ä¿¡å…ˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€ãŠã‚ˆã³é€ä¿¡å…ˆãƒ†ãƒ¼ãƒ–ルãŒå¿…è¦ã§ã™ã€‚ + +```sql +INSERT INTO FUNCTION +remoteSecure('remote.clickhouse.cloud:9440', 'imdb.actors', 'USER', 'PASSWORD') +SELECT * from imdb.actors +``` + +## グロビング {#globs-in-addresses} + +波括弧 `{ }` 内ã®ãƒ‘ターンã¯ã€ã‚·ãƒ£ãƒ¼ãƒ‰ã®ã‚»ãƒƒãƒˆã‚’生æˆã—ãŸã‚Šã€ãƒ¬ãƒ—リカを指定ã—ãŸã‚Šã™ã‚‹ã®ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚複数ã®æ³¢æ‹¬å¼§ãƒšã‚¢ãŒã‚ã‚‹å ´åˆã€å¯¾å¿œã™ã‚‹ã‚»ãƒƒãƒˆã®ç›´ç©ãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚ + +次ã®ãƒ‘ターンタイプãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ + +- `{a,b,c}` - 代替文字列ã®ã„ãšã‚Œã‹ã§ã‚ã‚‹ `a`ã€`b` ã¾ãŸã¯ `c` を表ã—ã¾ã™ã€‚ã“ã®ãƒ‘ターンã¯æœ€åˆã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã¯ `a` ã«ç½®ãæ›ãˆã‚‰ã‚Œã€æ¬¡ã®ã‚·ãƒ£ãƒ¼ãƒ‰ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã¯ `b`ã€ãã®å¾Œã‚‚åŒæ§˜ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚例: `example0{1,2}-1` ã¯ã‚¢ãƒ‰ãƒ¬ã‚¹ `example01-1` ãŠã‚ˆã³ `example02-1` を生æˆã—ã¾ã™ã€‚ +- `{N..M}` - 数値ã®ç¯„囲。ã“ã®ãƒ‘ターンã¯ã€`N` ã‹ã‚‰ `M`(å«ã‚€ï¼‰ã¸ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’æŒã¤ã‚·ãƒ£ãƒ¼ãƒ‰ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’生æˆã—ã¾ã™ã€‚例: `example0{1..2}-1` 㯠`example01-1` ãŠã‚ˆã³ `example02-1` を生æˆã—ã¾ã™ã€‚ +- `{0n..0m}` - 先頭ã«ã‚¼ãƒ­ã®ã‚る数値ã®ç¯„囲。ã“ã®ãƒ‘ターンã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã«ãŠã‘る先頭ã®ã‚¼ãƒ­ã‚’維æŒã—ã¾ã™ã€‚例: `example{01..03}-1` 㯠`example01-1`ã€`example02-1`ã€`example03-1` を生æˆã—ã¾ã™ã€‚ +- `{a|b}` - `|` ã§åŒºåˆ‡ã‚‰ã‚ŒãŸä»»æ„ã®æ•°ã®ãƒãƒªã‚¢ãƒ³ãƒˆã€‚パターンã¯ãƒ¬ãƒ—リカを指定ã—ã¾ã™ã€‚例: `example01-{1|2}` ã¯ãƒ¬ãƒ—リカ `example01-1` ãŠã‚ˆã³ `example01-2` を生æˆã—ã¾ã™ã€‚ + +クエリã¯æœ€åˆã®æ­£å¸¸ãªãƒ¬ãƒ—リカã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ã—ã‹ã—ã€`remote` ã§ã¯ã€ãƒ¬ãƒ—リカã¯ç¾åœ¨ã®[ロードãƒãƒ©ãƒ³ã‚·ãƒ³ã‚°](../../operations/settings/settings.md#load_balancing)設定ã«ç¤ºã•ã‚Œã¦ã„ã‚‹é †åºã§å復ã•ã‚Œã¾ã™ã€‚生æˆã•ã‚ŒãŸã‚¢ãƒ‰ãƒ¬ã‚¹ã®æ•°ã¯ã€[table_function_remote_max_addresses](../../operations/settings/settings.md#table_function_remote_max_addresses)設定ã«ã‚ˆã£ã¦åˆ¶é™ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/sql-reference/table-functions/s3.md b/docs/ja/sql-reference/table-functions/s3.md new file mode 100644 index 00000000000..687d861520b --- /dev/null +++ b/docs/ja/sql-reference/table-functions/s3.md @@ -0,0 +1,322 @@ +--- +slug: /ja/sql-reference/table-functions/s3 +sidebar_position: 180 +sidebar_label: s3 +keywords: [s3, gcs, bucket] +--- + +# s3 テーブル関数 + +[Amazon S3](https://aws.amazon.com/s3/) 㨠[Google Cloud Storage](https://cloud.google.com/storage/) 内ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠž/挿入ã™ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルã®ã‚ˆã†ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ル関数㯠[hdfs 関数](../../sql-reference/table-functions/hdfs.md) ã«ä¼¼ã¦ã„ã¾ã™ãŒã€S3 固有ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +クラスターã«è¤‡æ•°ã®ãƒ¬ãƒ—リカãŒã‚ã‚‹å ´åˆã¯ã€æŒ¿å…¥ã‚’並列化ã™ã‚‹ãŸã‚ã«[s3Cluster 関数](../../sql-reference/table-functions/s3Cluster.md)を代ã‚ã‚Šã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +[`INSERT INTO...SELECT`](../../sql-reference/statements/insert-into#inserting-the-results-of-select) ã¨å…±ã« `s3 テーブル関数` を使用ã™ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯ã‚¹ãƒˆãƒªãƒ¼ãƒŸãƒ³ã‚°æ–¹å¼ã§èª­ã¿è¾¼ã¾ã‚Œã€æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚S3ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’連続的ã«èª­ã¿è¾¼ã¿ã€å®›å…ˆãƒ†ãƒ¼ãƒ–ルã«æŠ¼ã—込む間ã€ãƒ¡ãƒ¢ãƒªã«ã¯å°‘ã—ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®ã¿ãŒå­˜åœ¨ã—ã¾ã™ã€‚ + +**構文** + +``` sql +s3(url [, NOSIGN | access_key_id, secret_access_key, [session_token]] [,format] [,structure] [,compression_method]) +s3(named_collection[, option=value [,..]]) +``` + +:::tip GCS +S3 テーブル関数㯠GCS XML API 㨠HMAC キーを使用ã—㦠Google Cloud Storage ã¨çµ±åˆã•ã‚Œã¾ã™ã€‚エンドãƒã‚¤ãƒ³ãƒˆã¨HMACã®è©³ç´°ã«ã¤ã„ã¦ã¯[Google インターオペラビリティ ドキュメント](https://cloud.google.com/storage/docs/interoperability)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +GCS ã®å ´åˆã€`access_key_id` ãŠã‚ˆã³ `secret_access_key` ã®å ´æ‰€ã« HMAC キーãŠã‚ˆã³ HMAC シークレットを置ãæ›ãˆã¦ãã ã•ã„。 +::: + +**パラメータ** + +`s3` テーブル関数ã¯ä»¥ä¸‹ã®ãƒ—レーンパラメータをサãƒãƒ¼ãƒˆã—ã¾ã™: + +- `url` — ファイルã¸ã®ãƒ‘スをå«ã‚€ãƒã‚±ãƒƒãƒˆã®URL。読ã¿å–り専用モードã§ä»¥ä¸‹ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™: `*`, `**`, `?`, `{abc,def}` ãŠã‚ˆã³ `{N..M}` ãŸã ã— `N`, `M` — 数字〠`'abc'`, `'def'` — 文字列。詳細ã¯[ã“ã¡ã‚‰](../../engines/table-engines/integrations/s3.md#wildcards-in-path)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + :::note GCS + GCS ã®URLå½¢å¼ã¯Google XML APIã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆãŒJSON APIã¨ç•°ãªã‚‹ãŸã‚ã€ä»¥ä¸‹ã®å½¢å¼ã§ã™ï¼š + ``` + https://storage.googleapis.com/// + ``` + ãŠã‚ˆã³ ~~https://storage.cloud.google.com~~ ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + ::: +- `NOSIGN` — 資格情報ã®ä»£ã‚ã‚Šã«ã“ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ãŒæä¾›ã•ã‚ŒãŸå ´åˆã€ã™ã¹ã¦ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ç½²åã•ã‚Œã¾ã›ã‚“。 +- `access_key_id` ãŠã‚ˆã³ `secret_access_key` — 与ãˆã‚‰ã‚ŒãŸã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹è³‡æ ¼æƒ…報を指定ã™ã‚‹ãŸã‚ã®ã‚­ãƒ¼ã€‚オプション。 +- `session_token` - 指定ã•ã‚ŒãŸã‚­ãƒ¼ã¨å…±ã«ä½¿ç”¨ã™ã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³ãƒˆãƒ¼ã‚¯ãƒ³ã€‚キーを渡ã™å ´åˆã¯ã‚ªãƒ—ション。 +- `format` — ファイルã®[フォーマット](../../interfaces/formats.md#formats)。 +- `structure` — テーブルã®æ§‹é€ ã€‚フォーマット `'column1_name column1_type, column2_name column2_type, ...'`。 +- `compression_method` — パラメータã¯ã‚ªãƒ—ションã§ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å€¤: `none`, `gzip/gz`, `brotli/br`, `xz/LZMA`, `zstd/zst`。デフォルトã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«ã‚ˆã£ã¦åœ§ç¸®æ–¹æ³•ã‚’自動検出ã—ã¾ã™ã€‚ + +引数ã¯ã¾ãŸ[指定ã•ã‚ŒãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](/docs/ja/operations/named-collections.md)を使用ã—ã¦æ¸¡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`url`, `access_key_id`, `secret_access_key`, `format`, `structure`, `compression_method` ã¯åŒã˜æ–¹æ³•ã§å‹•ä½œã—ã€è¿½åŠ ã®ãƒ‘ラメータãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ï¼š + + - `filename` — 指定ã•ã‚ŒãŸå ´åˆã€url ã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + - `use_environment_credentials` — デフォルトã§æœ‰åŠ¹ã€ç’°å¢ƒå¤‰æ•° `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`, `AWS_CONTAINER_CREDENTIALS_FULL_URI`, `AWS_CONTAINER_AUTHORIZATION_TOKEN`, `AWS_EC2_METADATA_DISABLED` を使用ã—ã¦è¿½åŠ ãƒ‘ラメータを渡ã™ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ + - `no_sign_request` — デフォルトã§ç„¡åŠ¹ã€‚ + - `expiration_window_seconds` — デフォルト値㯠120。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã§ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿æ›¸ãã™ã‚‹ãŸã‚ã«ã€æŒ‡å®šã•ã‚ŒãŸæ§‹é€ ã®ãƒ†ãƒ¼ãƒ–ル。 + +**例** + +S3 ファイル `https://datasets-documentation.s3.eu-west-3.amazonaws.com/aapl_stock.csv` ã‹ã‚‰ãƒ†ãƒ¼ãƒ–ルã®æœ€åˆã® 5 行をé¸æŠžã™ã‚‹ï¼š + +``` sql +SELECT * +FROM s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/aapl_stock.csv', + 'CSVWithNames' +) +LIMIT 5; +``` + +```response +┌───────Date─┬────Open─┬────High─┬─────Low─┬───Close─┬───Volume─┬─OpenInt─┠+│ 1984-09-07 │ 0.42388 │ 0.42902 │ 0.41874 │ 0.42388 │ 23220030 │ 0 │ +│ 1984-09-10 │ 0.42388 │ 0.42516 │ 0.41366 │ 0.42134 │ 18022532 │ 0 │ +│ 1984-09-11 │ 0.42516 │ 0.43668 │ 0.42516 │ 0.42902 │ 42498199 │ 0 │ +│ 1984-09-12 │ 0.42902 │ 0.43157 │ 0.41618 │ 0.41618 │ 37125801 │ 0 │ +│ 1984-09-13 │ 0.43927 │ 0.44052 │ 0.43927 │ 0.43927 │ 57822062 │ 0 │ +└────────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┘ +``` + +:::note +ClickHouse ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®å½¢å¼ã‚’決定ã™ã‚‹ãŸã‚ã«ãƒ•ã‚¡ã‚¤ãƒ«åã®æ‹¡å¼µå­ã‚’使用ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€å‰ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ `CSVWithNames` ãªã—ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼š + +``` sql +SELECT * +FROM s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/aapl_stock.csv' +) +LIMIT 5; +``` + +ClickHouse ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®åœ§ç¸®æ–¹æ³•ã‚‚決定ã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ•ã‚¡ã‚¤ãƒ«ãŒ `.csv.gz` æ‹¡å¼µå­ã§åœ§ç¸®ã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouse ã¯è‡ªå‹•çš„ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’解å‡ã—ã¾ã™ã€‚ +::: + +## 使用方法 + +以下㮠URI ã‚’æŒã¤è¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒ S3 ã«ã‚ã‚‹ã¨ä»®å®šã—ã¾ã™: + +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/some_prefix/some_file_1.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/some_prefix/some_file_2.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/some_prefix/some_file_3.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/some_prefix/some_file_4.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/another_prefix/some_file_1.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/another_prefix/some_file_2.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/another_prefix/some_file_3.csv' +- 'https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/another_prefix/some_file_4.csv' + +1ã‹ã‚‰3ã¾ã§ã®æ•°å­—ã§çµ‚ã‚るファイルã®è¡Œæ•°ã‚’カウント: + +``` sql +SELECT count(*) +FROM s3('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/{some,another}_prefix/some_file_{1..3}.csv', 'CSV', 'name String, value UInt32') +``` + +``` text +┌─count()─┠+│ 18 │ +└─────────┘ +``` + +ã“れらã®2ã¤ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®åˆè¨ˆè¡Œæ•°ã‚’カウント: + +``` sql +SELECT count(*) +FROM s3('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/{some,another}_prefix/*', 'CSV', 'name String, value UInt32') +``` + +``` text +┌─count()─┠+│ 24 │ +└─────────┘ +``` + +:::tip +ファイルã®ä¸€è¦§ã«å…ˆè¡Œã‚¼ãƒ­ä»˜ãã®æ•°å­—範囲ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã¯ã€å„æ¡ã”ã¨ã«ä¸­æ‹¬å¼§ã‚’使ã†ã‹ `?` を使ã£ã¦ãã ã•ã„。 +::: + +ファイルå `file-000.csv`, `file-001.csv`, ... , `file-999.csv` ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®åˆè¨ˆè¡Œæ•°ã‚’カウント: + +``` sql +SELECT count(*) +FROM s3('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/big_prefix/file-{000..999}.csv', 'CSV', 'name String, value UInt32'); +``` + +``` text +┌─count()─┠+│ 12 │ +└─────────┘ +``` + +ファイル `test-data.csv.gz` ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入: + +``` sql +INSERT INTO FUNCTION s3('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/test-data.csv.gz', 'CSV', 'name String, value UInt32', 'gzip') +VALUES ('test-data', 1), ('test-data-2', 2); +``` + +既存ã®ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ« `test-data.csv.gz` ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入: + +``` sql +INSERT INTO FUNCTION s3('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/test-data.csv.gz', 'CSV', 'name String, value UInt32', 'gzip') +SELECT name, value FROM existing_table; +``` + +グロブ ** を使用ã—ã¦å†å¸°çš„ãªãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª トラãƒãƒ¼ã‚µãƒ«ãŒå¯èƒ½ã§ã™ã€‚以下ã®ä¾‹ã‚’考察ã—ã¦ãã ã•ã„。ã“れ㯠`my-test-bucket-768` ディレクトリ内ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†å¸°çš„ã«å–å¾—ã—ã¾ã™: + +``` sql +SELECT * FROM s3('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/**', 'CSV', 'name String, value UInt32', 'gzip'); +``` + +以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€`my-test-bucket` ディレクトリ内ã®ä»»æ„ã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼å†…ã®ã™ã¹ã¦ã® `test-data.csv.gz` ファイルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ã¾ã™: + +``` sql +SELECT * FROM s3('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/**/test-data.csv.gz', 'CSV', 'name String, value UInt32', 'gzip'); +``` + +注æ„点ã¨ã—ã¦ã€ã‚µãƒ¼ãƒãƒ¼æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«å†…ã§ã‚«ã‚¹ã‚¿ãƒ URLマッパーを指定ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚例: +``` sql +SELECT * FROM s3('s3://clickhouse-public-datasets/my-test-bucket-768/**/test-data.csv.gz', 'CSV', 'name String, value UInt32', 'gzip'); +``` +URL `'s3://clickhouse-public-datasets/my-test-bucket-768/**/test-data.csv.gz'` 㯠`'http://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/**/test-data.csv.gz'` ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + +カスタムマッパー㯠`config.xml` ã«è¿½åŠ ã§ãã¾ã™: +``` xml + + + https://{bucket}.s3.amazonaws.com + + + https://{bucket}.storage.googleapis.com + + + https://{bucket}.oss.aliyuncs.com + + +``` + +本番環境ã§ã®ä½¿ç”¨ã«ã¯[指定ã•ã‚ŒãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](/docs/ja/operations/named-collections.md)を使用ã™ã‚‹ã“ã¨ã‚’ãŠã™ã™ã‚ã—ã¾ã™ã€‚以下ã«ä¾‹ã‚’示ã—ã¾ã™: +``` sql + +CREATE NAMED COLLECTION creds AS + access_key_id = '***', + secret_access_key = '***'; +SELECT count(*) +FROM s3(creds, url='https://s3-object-url.csv') +``` + +## パーティション分ã‘ã•ã‚ŒãŸæ›¸ã込㿠+ +`S3` テーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹éš›ã« `PARTITION BY` å¼ã‚’指定ã™ã‚‹ã¨ã€å„パーティション値ã«å¯¾ã—ã¦åˆ¥ã€…ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒä½œæˆã•ã‚Œã¾ã™ã€‚データを別々ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«åˆ†ã‘ã‚‹ã“ã¨ã§ã€èª­ã¿å–ã‚Šæ“作ã®åŠ¹çŽ‡ãŒå‘上ã—ã¾ã™ã€‚ + +**例** + +1. キーã«ãƒ‘ーティションIDを使用ã—ã¦åˆ¥ã€…ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒä½œæˆã•ã‚Œã¾ã™ï¼š + +```sql +INSERT INTO TABLE FUNCTION + s3('http://bucket.amazonaws.com/my_bucket/file_{_partition_id}.csv', 'CSV', 'a String, b UInt32, c UInt32') + PARTITION BY a VALUES ('x', 2, 3), ('x', 4, 5), ('y', 11, 12), ('y', 13, 14), ('z', 21, 22), ('z', 23, 24); +``` +ãã®çµæžœã€ãƒ‡ãƒ¼ã‚¿ã¯3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™: `file_x.csv`, `file_y.csv`, ãã—㦠`file_z.csv`。 + +2. ãƒã‚±ãƒƒãƒˆåã«ãƒ‘ーティションIDを使用ã—ã¦ã€ç•°ãªã‚‹ãƒã‚±ãƒƒãƒˆã«ãƒ•ã‚¡ã‚¤ãƒ«ãŒä½œæˆã•ã‚Œã¾ã™ï¼š + +```sql +INSERT INTO TABLE FUNCTION + s3('http://bucket.amazonaws.com/my_bucket_{_partition_id}/file.csv', 'CSV', 'a UInt32, b UInt32, c UInt32') + PARTITION BY a VALUES (1, 2, 3), (1, 4, 5), (10, 11, 12), (10, 13, 14), (20, 21, 22), (20, 23, 24); +``` +ãã®çµæžœã€ãƒ‡ãƒ¼ã‚¿ã¯ç•°ãªã‚‹ãƒã‚±ãƒƒãƒˆå†…ã®3ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™: `my_bucket_1/file.csv`, `my_bucket_10/file.csv`, ãã—㦠`my_bucket_20/file.csv`。 + +## 公開ãƒã‚±ãƒƒãƒˆã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ + +ClickHouse ã¯ã•ã¾ã–ã¾ãªç¨®é¡žã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰è³‡æ ¼æƒ…報をå–å¾—ã—よã†ã¨è©¦ã¿ã¾ã™ã€‚ +時ã«ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒ `403` エラーコードを返ã—ã¦å…¬å…±ã®ãƒã‚±ãƒƒãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒå•é¡Œã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ +ã“ã®å•é¡Œã¯ `NOSIGN` キーワードを使用ã—ã¦ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã™ã¹ã¦ã®è³‡æ ¼æƒ…報を無視ã—ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ç½²åã—ãªã„よã†ã«å¼·åˆ¶ã™ã‚‹ã“ã¨ã§å›žé¿ã§ãã¾ã™ã€‚ + +``` sql +SELECT * +FROM s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/aapl_stock.csv', + NOSIGN, + 'CSVWithNames' +) +LIMIT 5; +``` + +## S3 クレデンシャルã®ä½¿ç”¨ (ClickHouse Cloud) + +éžå…¬é–‹ãƒã‚±ãƒƒãƒˆã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ `aws_access_key_id` 㨠`aws_secret_access_key` を関数ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚例: + +```sql +SELECT count() FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/mta/*.tsv', '', '','TSVWithNames') +``` + +ã“ã‚Œã¯ä¸€å›žé™ã‚Šã®ã‚¢ã‚¯ã‚»ã‚¹ã‚„資格情報を簡å˜ã«ãƒ­ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã§ãã‚‹å ´åˆã«é©ã—ã¦ã„ã¾ã™ã€‚ã—ã‹ã—ã€ç¹°ã‚Šè¿”ã—ã®ã‚¢ã‚¯ã‚»ã‚¹ãŒå¿…è¦ãªé•·æœŸçš„ãªè§£æ±ºç­–ã¨ã—ã¦ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“ã—ã€è³‡æ ¼æƒ…å ±ãŒæ©Ÿå¯†ã§ã‚ã‚‹å ´åˆã‚‚å•é¡Œã§ã™ã€‚ã“ã®å ´åˆã€ãƒ­ãƒ¼ãƒ«ãƒ™ãƒ¼ã‚¹ã®ã‚¢ã‚¯ã‚»ã‚¹ã«ä¾å­˜ã™ã‚‹ã“ã¨ã‚’ãŠã™ã™ã‚ã—ã¾ã™ã€‚ + +ClickHouse Cloudã®S3用ロールベースアクセスã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](/docs/ja/cloud/security/secure-s3#access-your-s3-bucket-with-the-clickhouseaccess-role)ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +設定ãŒå®Œäº†ã—ãŸã‚‰ã€`extra_credentials` パラメータを介㗠`roleARN` ã‚’ s3 関数ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚例: + +```sql +SELECT count() FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/mta/*.tsv','CSVWithNames',extra_credentials(role_arn = 'arn:aws:iam::111111111111:role/ClickHouseAccessRole-001')) +``` + +ã•ã‚‰ãªã‚‹ä¾‹ã¯[ã“ã¡ã‚‰](/docs/ja/cloud/security/secure-s3#access-your-s3-bucket-with-the-clickhouseaccess-role)ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## アーカイブを扱ㆠ+ +以下ã®URIã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ファイルãŒS3ã«ã‚ã‚‹ã¨æƒ³å®šã—ã¾ã™ï¼š + +- 'https://s3-us-west-1.amazonaws.com/umbrella-static/top-1m-2018-01-10.csv.zip' +- 'https://s3-us-west-1.amazonaws.com/umbrella-static/top-1m-2018-01-11.csv.zip' +- 'https://s3-us-west-1.amazonaws.com/umbrella-static/top-1m-2018-01-12.csv.zip' + +ã“れらã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’抽出ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚URLã®éƒ¨åˆ†ã¨ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–内ã®ãƒ•ã‚¡ã‚¤ãƒ«åを指定ã™ã‚‹éƒ¨åˆ†ï¼ˆ::ã®å¾Œï¼‰ã§ã‚°ãƒ­ãƒ–を使用ã§ãã¾ã™ã€‚ + +``` sql +SELECT * +FROM s3( + 'https://s3-us-west-1.amazonaws.com/umbrella-static/top-1m-2018-01-1{0..2}.csv.zip :: *.csv' +); +``` + +:::note +ClickHouse ã¯ä»¥ä¸‹ã®3ã¤ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–å½¢å¼ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ï¼š +ZIP +TAR +7Z +ZIPãŠã‚ˆã³TARアーカイブã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ä»»æ„ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å ´æ‰€ã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ãŒã€7Zアーカイブã¯ClickHouseãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„るローカルファイルシステムã‹ã‚‰ã®ã¿èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +::: + +## 仮想カラム {#virtual-columns} + +- `_path` — ファイルã¸ã®ãƒ‘ス。タイプ: `LowCardinalty(String)`。アーカイブã®å ´åˆã€"{path_to_archive}::{path_to_file_inside_archive}"ã®å½¢å¼ã§ãƒ‘スを表示ã—ã¾ã™ã€‚ +- `_file` — ファイルå。タイプ: `LowCardinalty(String)`。アーカイブã®å ´åˆã€ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–内ファイルã®åå‰ã‚’表示ã—ã¾ã™ã€‚ +- `_size` — ファイルã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚タイプ: `Nullable(UInt64)`。ファイルサイズãŒä¸æ˜Žãªå ´åˆã€ãã®å€¤ã¯ `NULL` ã§ã™ã€‚アーカイブã®å ´åˆã€ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–内ファイルã®éžåœ§ç¸®ã‚µã‚¤ã‚ºã‚’示ã—ã¾ã™ã€‚ +- `_time` — ファイルã®æœ€çµ‚変更時刻。タイプ: `Nullable(DateTime)`。時間ãŒä¸æ˜Žãªå ´åˆã€ãã®å€¤ã¯ `NULL` ã§ã™ã€‚ + +## Hive å½¢å¼ã®ãƒ‘ーティション分割 {#hive-style-partitioning} + +`use_hive_partitioning` 設定ãŒ1ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ClickHouseã¯ãƒ‘ス内ã®Hiveå½¢å¼ã®ãƒ‘ーティション分割(`/name=value/`)を検出ã—ã€ã‚¯ã‚¨ãƒªå†…ã§ãƒ‘ーティションカラムを仮想カラムã¨ã—ã¦ä½¿ç”¨ã§ãるよã†ã«ã—ã¾ã™ã€‚ã“れらã®ä»®æƒ³ã‚«ãƒ©ãƒ ã¯åˆ†å‰²ã•ã‚ŒãŸãƒ‘ス内ã¨åŒã˜åå‰ã‚’æŒã¡ã¾ã™ãŒã€`_` ã§å§‹ã¾ã‚Šã¾ã™ã€‚ + +**例** + +Hiveå½¢å¼ã®ãƒ‘ーティション分割ã§ä½œæˆã•ã‚ŒãŸä»®æƒ³ã‚«ãƒ©ãƒ ã‚’使用ã™ã‚‹ + +``` sql +SET use_hive_partitioning = 1; +SELECT * from s3('s3://data/path/date=*/country=*/code=*/*.parquet') where _date > '2020-01-01' and _country = 'Netherlands' and _code = 42; +``` + +## ストレージ設定 {#storage-settings} + +- [s3_truncate_on_insert](/docs/ja/operations/settings/settings.md#s3_truncate_on_insert) - 挿入å‰ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’切り詰ã‚ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [s3_create_new_file_on_insert](/docs/ja/operations/settings/settings.md#s3_create_new_file_on_insert) - フォーマットã«æŽ¥å°¾è¾žãŒã‚ã‚‹å ´åˆã«æŒ¿å…¥ã®ãŸã³ã«æ–°ã—ã„ファイルを作æˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [s3_skip_empty_files](/docs/ja/operations/settings/settings.md#s3_skip_empty_files) - 読ã¿å–り時ã«ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ + +**関連項目** + +- [S3エンジン](../../engines/table-engines/integrations/s3.md) diff --git a/docs/ja/sql-reference/table-functions/s3Cluster.md b/docs/ja/sql-reference/table-functions/s3Cluster.md new file mode 100644 index 00000000000..cfb0ac8ec6d --- /dev/null +++ b/docs/ja/sql-reference/table-functions/s3Cluster.md @@ -0,0 +1,85 @@ +--- +slug: /ja/sql-reference/table-functions/s3Cluster +sidebar_position: 181 +sidebar_label: s3Cluster +title: "s3Cluster テーブル関数" +--- +ã“れ㯠[s3](/docs/ja/sql-reference/table-functions/s3.md) テーブル関数ã®æ‹¡å¼µã§ã™ã€‚ + +指定ã—ãŸã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®å¤šãã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰ä¸¦åˆ—㧠[Amazon S3](https://aws.amazon.com/s3/) ãŠã‚ˆã³ [Google Cloud Storage](https://cloud.google.com/storage/) ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’処ç†ã§ãã¾ã™ã€‚イニシエータã§ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼å†…ã®ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã«æŽ¥ç¶šã‚’作æˆã—ã€S3ファイルパス内ã®ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ã‚’展開ã—ã€å„ファイルを動的ã«ãƒ‡ã‚£ã‚¹ãƒ‘ッãƒã—ã¾ã™ã€‚ワーカーノードã§ã¯ã€æ¬¡ã®å‡¦ç†ã‚¿ã‚¹ã‚¯ã«ã¤ã„ã¦ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ã«å•ã„åˆã‚ã›ã€ãれを処ç†ã—ã¾ã™ã€‚ã“ã®ãƒ—ロセスã¯ã™ã¹ã¦ã®ã‚¿ã‚¹ã‚¯ãŒçµ‚了ã™ã‚‹ã¾ã§ç¹°ã‚Šè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +s3Cluster(cluster_name, url [, NOSIGN | access_key_id, secret_access_key, [session_token]] [,format] [,structure] [,compression_method]) +s3Cluster(cluster_name, named_collection[, option=value [,..]]) +``` + +**引数** + +- `cluster_name` — リモートãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒ«ã‚µãƒ¼ãƒãƒ¼ã¸ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚»ãƒƒãƒˆã¨æŽ¥ç¶šãƒ‘ラメータを構築ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã®åå‰ã€‚ +- `url` — ファイルã¾ãŸã¯ä¸€é€£ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。読ã¿å–り専用モードã§æ¬¡ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆ: `*`, `**`, `?`, `{'abc','def'}` ãŠã‚ˆã³ `{N..M}` ã“ã“㧠`N`, `M` — æ•°å­—, `abc`, `def` — 文字列。詳細ã«ã¤ã„ã¦ã¯ [パス内ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰](../../engines/table-engines/integrations/s3.md#wildcards-in-path) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- `NOSIGN` — ã“ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ãŒè³‡æ ¼æƒ…å ±ã®ä»£ã‚ã‚Šã«æŒ‡å®šã•ã‚ŒãŸå ´åˆã€ã™ã¹ã¦ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ç½²åã•ã‚Œã¾ã›ã‚“。 +- `access_key_id` ãŠã‚ˆã³ `secret_access_key` — 指定ã•ã‚ŒãŸã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã®è³‡æ ¼æƒ…報を指定ã™ã‚‹ã‚­ãƒ¼ã€‚オプション。 +- `session_token` - 指定ã•ã‚ŒãŸã‚­ãƒ¼ã¨å…±ã«ä½¿ç”¨ã™ã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³ãƒˆãƒ¼ã‚¯ãƒ³ã€‚キーを渡ã™å ´åˆã¯ã‚ªãƒ—ション。 +- `format` — ファイルã®[å½¢å¼](../../interfaces/formats.md#formats)。 +- `structure` — テーブルã®æ§‹é€ ã€‚å½¢å¼ `'column1_name column1_type, column2_name column2_type, ...'`。 +- `compression_method` — パラメータã¯ã‚ªãƒ—ションã§ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã‚‹å€¤: `none`, `gzip/gz`, `brotli/br`, `xz/LZMA`, `zstd/zst`。デフォルトã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã«ã‚ˆã£ã¦åœ§ç¸®æ–¹æ³•ã‚’自動検出ã—ã¾ã™ã€‚ + +引数㯠[named collections](/docs/ja/operations/named-collections.md) を使用ã—ã¦æ¸¡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`url`, `access_key_id`, `secret_access_key`, `format`, `structure`, `compression_method` ã¯åŒã˜æ–¹æ³•ã§å‹•ä½œã—ã€ã„ãã¤ã‹ã®è¿½åŠ ãƒ‘ラメータãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™ï¼š + + - `filename` — 指定ã•ã‚Œã¦ã„ã‚‹å ´åˆã€urlã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚ + - `use_environment_credentials` — デフォルトã§æœ‰åŠ¹ã§ã€ç’°å¢ƒå¤‰æ•° `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`, `AWS_CONTAINER_CREDENTIALS_FULL_URI`, `AWS_CONTAINER_AUTHORIZATION_TOKEN`, `AWS_EC2_METADATA_DISABLED` を使用ã—ã¦è¿½åŠ ãƒ‘ラメータを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + - `no_sign_request` — デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ + - `expiration_window_seconds` — デフォルト値㯠120 ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã«ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿æ›¸ãã™ã‚‹ãŸã‚ã®ã€æŒ‡å®šã•ã‚ŒãŸæ§‹é€ ã®ãƒ†ãƒ¼ãƒ–ル。 + +**例** + +`cluster_simple` クラスター内ã®ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã‚’使用ã—ã¦ã€`/root/data/clickhouse` ãŠã‚ˆã³ `/root/data/database/` フォルダー内ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠž: + +``` sql +SELECT * FROM s3Cluster( + 'cluster_simple', + 'http://minio1:9001/root/data/{clickhouse,database}/*', + 'minio', + 'minio123', + 'CSV', + 'name String, value UInt32, polygon Array(Array(Tuple(Float64, Float64)))' +) ORDER BY (name, value, polygon); +``` + +`cluster_simple` クラスター内ã®ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®è¡Œã®åˆè¨ˆã‚’カウント: + +:::tip +ファイルリストã«å…ˆé ­ã«ã‚¼ãƒ­ãŒä»˜ã„ãŸæ•°å­—ã®ç¯„囲ãŒå«ã¾ã‚Œã‚‹å ´åˆã¯ã€å„æ¡ã”ã¨ã«æ³¢æ‹¬å¼§ã‚’使用ã™ã‚‹ã‹ `?` を使用ã—ã¦ãã ã•ã„。 +::: + +本番ユースケースã§ã¯ã€[named collections](/docs/ja/operations/named-collections.md) ã®ä½¿ç”¨ã‚’推奨ã—ã¾ã™ã€‚以下ã¯ä¾‹ã§ã™: +``` sql + +CREATE NAMED COLLECTION creds AS + access_key_id = 'minio', + secret_access_key = 'minio123'; +SELECT count(*) FROM s3Cluster( + 'cluster_simple', creds, url='https://s3-object-url.csv', + format='CSV', structure='name String, value UInt32, polygon Array(Array(Tuple(Float64, Float64)))' +) +``` + +## プライベートãŠã‚ˆã³ãƒ‘ブリックãƒã‚±ãƒƒãƒˆã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ + +ユーザーã¯ã€s3関数ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«è¨˜è¼‰ã•ã‚Œã¦ã„る方法を使用ã§ãã¾ã™ [ã“ã¡ã‚‰](/docs/ja/sql-reference/table-functions/s3#accessing-public-buckets). + +## パフォーマンスã®æœ€é©åŒ– + +s3関数ã®ãƒ‘フォーマンスを最é©åŒ–ã™ã‚‹è©³ç´°ã«ã¤ã„ã¦ã¯ã€[詳細ガイド](/docs/ja/integrations/s3/performance) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + +**å‚考** + +- [S3エンジン](../../engines/table-engines/integrations/s3.md) +- [s3 テーブル関数](../../sql-reference/table-functions/s3.md) diff --git a/docs/ja/sql-reference/table-functions/sqlite.md b/docs/ja/sql-reference/table-functions/sqlite.md new file mode 100644 index 00000000000..81013a61f10 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/sqlite.md @@ -0,0 +1,46 @@ +--- +slug: /ja/sql-reference/table-functions/sqlite +sidebar_position: 185 +sidebar_label: sqlite +title: sqlite +--- + +[SQLite](../../engines/database-engines/sqlite.md) データベースã«ä¿å­˜ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +**構文** + +``` sql + sqlite('db_path', 'table_name') +``` + +**引数** + +- `db_path` — SQLiteデータベースをå«ã‚€ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ス。[String](../../sql-reference/data-types/string.md)。 +- `table_name` — SQLiteデータベース内ã®ãƒ†ãƒ¼ãƒ–ルã®åå‰ã€‚[String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 元㮠`SQLite` テーブルã¨åŒã˜ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルオブジェクト。 + +**例** + +クエリ: + +``` sql +SELECT * FROM sqlite('sqlite.db', 'table1') ORDER BY col2; +``` + +çµæžœ: + +``` text +┌─col1──┬─col2─┠+│ line1 │ 1 │ +│ line2 │ 2 │ +│ line3 │ 3 │ +└───────┴──────┘ +``` + +**関連項目** + +- [SQLite](../../engines/table-engines/integrations/sqlite.md) テーブルエンジン + diff --git a/docs/ja/sql-reference/table-functions/timeSeriesData.md b/docs/ja/sql-reference/table-functions/timeSeriesData.md new file mode 100644 index 00000000000..9cf9fabecd1 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/timeSeriesData.md @@ -0,0 +1,27 @@ +--- +slug: /ja/sql-reference/table-functions/timeSeriesData +sidebar_position: 145 +sidebar_label: timeSeriesData +--- + +# timeSeriesData + +`timeSeriesData(db_name.time_series_table)` - [TimeSeries](../../engines/table-engines/integrations/time-series.md) テーブルエンジンを使用ã™ã‚‹ãƒ†ãƒ¼ãƒ–ル `db_name.time_series_table` ã§ä½¿ç”¨ã•ã‚Œã‚‹ [data](../../engines/table-engines/integrations/time-series.md#data-table) テーブルを返ã—ã¾ã™ï¼š + +``` sql +CREATE TABLE db_name.time_series_table ENGINE=TimeSeries DATA data_table +``` + +データテーブルãŒå†…部ã§ã‚ã‚‹å ´åˆã‚‚ã“ã®é–¢æ•°ã¯å‹•ä½œã—ã¾ã™ï¼š + +``` sql +CREATE TABLE db_name.time_series_table ENGINE=TimeSeries DATA INNER UUID '01234567-89ab-cdef-0123-456789abcdef' +``` + +以下ã®ã‚¯ã‚¨ãƒªã¯åŒç­‰ã§ã™ï¼š + +``` sql +SELECT * FROM timeSeriesData(db_name.time_series_table); +SELECT * FROM timeSeriesData('db_name.time_series_table'); +SELECT * FROM timeSeriesData('db_name', 'time_series_table'); +``` diff --git a/docs/ja/sql-reference/table-functions/timeSeriesMetrics.md b/docs/ja/sql-reference/table-functions/timeSeriesMetrics.md new file mode 100644 index 00000000000..9030effb247 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/timeSeriesMetrics.md @@ -0,0 +1,28 @@ +--- +slug: /ja/sql-reference/table-functions/timeSeriesMetrics +sidebar_position: 145 +sidebar_label: timeSeriesMetrics +--- + +# timeSeriesMetrics + +`timeSeriesMetrics(db_name.time_series_table)` - [TimeSeries](../../engines/table-engines/integrations/time-series.md)テーブルエンジンを使用ã™ã‚‹ãƒ†ãƒ¼ãƒ–ル`db_name.time_series_table`ã§ä½¿ç”¨ã•ã‚Œã‚‹[metrics](../../engines/table-engines/integrations/time-series.md#metrics-table)テーブルを返ã—ã¾ã™ã€‚ + +``` sql +CREATE TABLE db_name.time_series_table ENGINE=TimeSeries METRICS metrics_table +``` + +_metrics_テーブルãŒå†…å´ã«ã‚ã‚‹å ´åˆã‚‚ã“ã®é–¢æ•°ã¯æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +``` sql +CREATE TABLE db_name.time_series_table ENGINE=TimeSeries METRICS INNER UUID '01234567-89ab-cdef-0123-456789abcdef' +``` + +以下ã®ã‚¯ã‚¨ãƒªã¯åŒç­‰ã§ã™ã€‚ + +``` sql +SELECT * FROM timeSeriesMetrics(db_name.time_series_table); +SELECT * FROM timeSeriesMetrics('db_name.time_series_table'); +SELECT * FROM timeSeriesMetrics('db_name', 'time_series_table'); +``` + diff --git a/docs/ja/sql-reference/table-functions/timeSeriesTags.md b/docs/ja/sql-reference/table-functions/timeSeriesTags.md new file mode 100644 index 00000000000..77c22441d3e --- /dev/null +++ b/docs/ja/sql-reference/table-functions/timeSeriesTags.md @@ -0,0 +1,27 @@ +--- +slug: /ja/sql-reference/table-functions/timeSeriesTags +sidebar_position: 145 +sidebar_label: timeSeriesTags +--- + +# timeSeriesTags + +`timeSeriesTags(db_name.time_series_table)` - テーブルエンジン㌠[TimeSeries](../../engines/table-engines/integrations/time-series.md) ã®ãƒ†ãƒ¼ãƒ–ル `db_name.time_series_table` ã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹[ã‚¿ã‚°](../../engines/table-engines/integrations/time-series.md#tags-table)テーブルを返ã—ã¾ã™: + +``` sql +CREATE TABLE db_name.time_series_table ENGINE=TimeSeries TAGS tags_table +``` + +ã“ã®é–¢æ•°ã¯ã€_tags_ テーブルãŒå†…部ã«ã‚ã‚‹å ´åˆã§ã‚‚機能ã—ã¾ã™: + +``` sql +CREATE TABLE db_name.time_series_table ENGINE=TimeSeries TAGS INNER UUID '01234567-89ab-cdef-0123-456789abcdef' +``` + +以下ã®ã‚¯ã‚¨ãƒªã¯åŒç­‰ã§ã™: + +``` sql +SELECT * FROM timeSeriesTags(db_name.time_series_table); +SELECT * FROM timeSeriesTags('db_name.time_series_table'); +SELECT * FROM timeSeriesTags('db_name', 'time_series_table'); +``` diff --git a/docs/ja/sql-reference/table-functions/url.md b/docs/ja/sql-reference/table-functions/url.md new file mode 100644 index 00000000000..957ae445e25 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/url.md @@ -0,0 +1,79 @@ +--- +slug: /ja/sql-reference/table-functions/url +sidebar_position: 200 +sidebar_label: url +--- + +# url + +`url` 関数ã¯æŒ‡å®šã•ã‚ŒãŸ `URL` ã‹ã‚‰ `format` 㨠`structure` ã«å¾“ã£ãŸãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ + +`url` 関数ã¯ã€[URL](../../engines/table-engines/special/url.md) テーブルã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã™ã‚‹ `SELECT` ãŠã‚ˆã³ `INSERT` クエリã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**構文** + +``` sql +url(URL [,format] [,structure] [,headers]) +``` + +**パラメータ** + +- `URL` — `GET` ã¾ãŸã¯ `POST` リクエストをå—ã‘入れるã“ã¨ãŒã§ãã‚‹ HTTP ã¾ãŸã¯ HTTPS サーãƒãƒ¼ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ï¼ˆãã‚Œãžã‚Œ `SELECT` ã¾ãŸã¯ `INSERT` クエリ時)。型: [String](../../sql-reference/data-types/string.md)。 +- `format` — データã®[フォーマット](../../interfaces/formats.md#formats)。型: [String](../../sql-reference/data-types/string.md)。 +- `structure` — `'UserID UInt64, Name String'` å½¢å¼ã«ã‚ˆã‚‹ãƒ†ãƒ¼ãƒ–ル構造。カラムåã¨åž‹ã‚’決定ã—ã¾ã™ã€‚åž‹: [String](../../sql-reference/data-types/string.md)。 +- `headers` - `'headers('key1'='value1', 'key2'='value2')'` ã®å½¢å¼ã§æŒ‡å®šã™ã‚‹ãƒ˜ãƒƒãƒ€ãƒ¼ã€‚HTTP 呼ã³å‡ºã—時ã«ãƒ˜ãƒƒãƒ€ãƒ¼ã®è¨­å®šãŒå¯èƒ½ã§ã™ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +指定ã•ã‚ŒãŸå½¢å¼ã¨æ§‹é€ ã‚’æŒã¡ã€å®šç¾©ã•ã‚ŒãŸ `URL` ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ãŸãƒ†ãƒ¼ãƒ–ル。 + +**例** + +`String` 型㨠[UInt32](../../sql-reference/data-types/int-uint.md) åž‹ã®ã‚«ãƒ©ãƒ ã‚’æŒã¤ãƒ†ãƒ¼ãƒ–ルã®æœ€åˆã® 3 行をã€[CSV](../../interfaces/formats.md#csv) フォーマットã§å›žç­”ã™ã‚‹ HTTP サーãƒãƒ¼ã‹ã‚‰å–å¾—ã—ã¾ã™ã€‚ + +``` sql +SELECT * FROM url('http://127.0.0.1:12345/', CSV, 'column1 String, column2 UInt32', headers('Accept'='text/csv; charset=utf-8')) LIMIT 3; +``` + +`URL` ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’テーブルã«æŒ¿å…¥ã—ã¾ã™: + +``` sql +CREATE TABLE test_table (column1 String, column2 UInt32) ENGINE=Memory; +INSERT INTO FUNCTION url('http://127.0.0.1:8123/?query=INSERT+INTO+test_table+FORMAT+CSV', 'CSV', 'column1 String, column2 UInt32') VALUES ('http interface', 42); +SELECT * FROM test_table; +``` + +## URLã®ã‚°ãƒ­ãƒ– + +中括弧 `{ }` ã§å›²ã¾ã‚ŒãŸãƒ‘ターンã¯ã€ã‚·ãƒ£ãƒ¼ãƒ‰ã®ã‚»ãƒƒãƒˆã‚’生æˆã™ã‚‹ã‹ã€ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’指定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るパターンã®ç¨®é¡žã¨ä¾‹ã«ã¤ã„ã¦ã¯ã€[remote](remote.md#globs-in-addresses) 関数ã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +パターン内㮠`|` 文字ã¯ã€ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’指定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚パターンã«ãƒªã‚¹ãƒˆã•ã‚ŒãŸé †ã«å復ã•ã‚Œã¾ã™ã€‚生æˆã•ã‚Œã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹ã®æ•°ã¯ [glob_expansion_max_elements](../../operations/settings/settings.md#glob_expansion_max_elements) 設定ã«ã‚ˆã£ã¦åˆ¶é™ã•ã‚Œã¾ã™ã€‚ + +## 仮想カラム + +- `_path` — `URL` ã¸ã®ãƒ‘ス。型: `LowCardinalty(String)`。 +- `_file` — `URL` ã®ãƒªã‚½ãƒ¼ã‚¹å。型: `LowCardinalty(String)`。 +- `_size` — リソースã®ã‚µã‚¤ã‚ºï¼ˆãƒã‚¤ãƒˆå˜ä½ï¼‰ã€‚åž‹: `Nullable(UInt64)`。サイズãŒä¸æ˜Žãªå ´åˆã€ã“ã®å€¤ã¯ `NULL` ã§ã™ã€‚ +- `_time` — ファイルã®æœ€çµ‚変更時間。型: `Nullable(DateTime)`。時間ãŒä¸æ˜Žãªå ´åˆã€ã“ã®å€¤ã¯ `NULL` ã§ã™ã€‚ +- `_headers` - HTTP レスãƒãƒ³ã‚¹ãƒ˜ãƒƒãƒ€ãƒ¼ã€‚åž‹: `Map(LowCardinality(String), LowCardinality(String))`。 + +## Hiveスタイルã®ãƒ‘ーティショニング {#hive-style-partitioning} + +`use_hive_partitioning` 設定を1ã«è¨­å®šã™ã‚‹ã¨ã€ClickHouseã¯ãƒ‘ス内ã®Hiveスタイルã®ãƒ‘ーティショニング(`/name=value/`)を検出ã—ã€ã‚¯ã‚¨ãƒªå†…ã§ä»®æƒ³ã‚«ãƒ©ãƒ ã¨ã—ã¦ãƒ‘ーティションカラムを使用ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ã“れらã®ä»®æƒ³ã‚«ãƒ©ãƒ ã¯ãƒ‘ーティションパス内ã¨åŒã˜åå‰ã‚’æŒã¡ã¾ã™ãŒã€å…ˆé ­ã«`_`ãŒä»˜ãã¾ã™ã€‚ + +**例** + +Hiveスタイルã®ãƒ‘ーティショニングã§ä½œæˆã•ã‚ŒãŸä»®æƒ³ã‚«ãƒ©ãƒ ã‚’使用 + +``` sql +SET use_hive_partitioning = 1; +SELECT * from url('http://data/path/date=*/country=*/code=*/*.parquet') where _date > '2020-01-01' and _country = 'Netherlands' and _code = 42; +``` + +## ストレージ設定 {#storage-settings} + +- [engine_url_skip_empty_files](/docs/ja/operations/settings/settings.md#engine_url_skip_empty_files) - 読ã¿å–り時ã«ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’スキップã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚デフォルトã§ã¯ç„¡åŠ¹ã§ã™ã€‚ +- [enable_url_encoding](/docs/ja/operations/settings/settings.md#enable_url_encoding) - URIã®ãƒ‘スã®ãƒ‡ã‚³ãƒ¼ãƒ‰/エンコードを有効/無効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚デフォルトã§æœ‰åŠ¹ã§ã™ã€‚ + +**関連項目** + +- [仮想カラム](/docs/ja/engines/table-engines/index.md#table_engines-virtual_columns) diff --git a/docs/ja/sql-reference/table-functions/urlCluster.md b/docs/ja/sql-reference/table-functions/urlCluster.md new file mode 100644 index 00000000000..c002a561d8d --- /dev/null +++ b/docs/ja/sql-reference/table-functions/urlCluster.md @@ -0,0 +1,62 @@ +--- +slug: /ja/sql-reference/table-functions/urlCluster +sidebar_position: 201 +sidebar_label: urlCluster +--- + +# urlCluster テーブル関数 + +URL ã‹ã‚‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’指定ã—ãŸã‚¯ãƒ©ã‚¹ã‚¿ã®å¤šãã®ãƒŽãƒ¼ãƒ‰ã‹ã‚‰ä¸¦è¡Œã—ã¦å‡¦ç†ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚イニシエータã§ã¯ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¹ã‚¿å†…ã®ãƒŽãƒ¼ãƒ‰ã«æŽ¥ç¶šã‚’作æˆã—ã€URLファイルパス内ã®ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ã‚’公開ã—ã€å„ファイルを動的ã«åˆ†é…ã—ã¾ã™ã€‚ワーカーノードã§ã¯ã‚¤ãƒ‹ã‚·ã‚¨ãƒ¼ã‚¿ã«æ¬¡ã®å‡¦ç†ã‚¿ã‚¹ã‚¯ã‚’å•ã„åˆã‚ã›ã€ãれを処ç†ã—ã¾ã™ã€‚ã“ã®å‡¦ç†ã¯ã™ã¹ã¦ã®ã‚¿ã‚¹ã‚¯ãŒå®Œäº†ã™ã‚‹ã¾ã§ç¹°ã‚Šè¿”ã•ã‚Œã¾ã™ã€‚ + +**構文** + +``` sql +urlCluster(cluster_name, URL, format, structure) +``` + +**引数** + +- `cluster_name` — リモートãŠã‚ˆã³ãƒ­ãƒ¼ã‚«ãƒ«ã‚µãƒ¼ãƒãƒ¼ã¸ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚»ãƒƒãƒˆã¨æŽ¥ç¶šãƒ‘ラメータを構築ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¹ã‚¿ã®åå‰ã€‚ +- `URL` — `GET`リクエストをå—ã‘入れるã“ã¨ãŒã§ãã‚‹ HTTP ã¾ãŸã¯ HTTPS サーãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚åž‹: [String](../../sql-reference/data-types/string.md)。 +- `format` — データã®[フォーマット](../../interfaces/formats.md#formats)。型: [String](../../sql-reference/data-types/string.md)。 +- `structure` — `'UserID UInt64, Name String'`å½¢å¼ã®ãƒ†ãƒ¼ãƒ–ル構造。カラムåã¨ã‚¿ã‚¤ãƒ—を決定ã—ã¾ã™ã€‚åž‹: [String](../../sql-reference/data-types/string.md)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +定義ã•ã‚ŒãŸ`URL`ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’指定ã•ã‚ŒãŸãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¨æ§‹é€ ã§æŒã¤ãƒ†ãƒ¼ãƒ–ル。 + +**例** + +HTTP サーãƒãƒ¼ãŒ [CSV](../../interfaces/formats.md#csv)å½¢å¼ã§å¿œç­”ã™ã‚‹`String`ã¨[UInt32](../../sql-reference/data-types/int-uint.md) åž‹ã®ã‚«ãƒ©ãƒ ã‚’å«ã‚€ãƒ†ãƒ¼ãƒ–ルã®æœ€åˆã®3行をå–å¾—ã—ã¾ã™ã€‚ + +1. 標準㮠Python 3 ツールを使用ã—ã¦åŸºæœ¬çš„㪠HTTP サーãƒãƒ¼ã‚’作æˆã—ã€èµ·å‹•ã—ã¾ã™: + +```python +from http.server import BaseHTTPRequestHandler, HTTPServer + +class CSVHTTPServer(BaseHTTPRequestHandler): + def do_GET(self): + self.send_response(200) + self.send_header('Content-type', 'text/csv') + self.end_headers() + + self.wfile.write(bytes('Hello,1\nWorld,2\n', "utf-8")) + +if __name__ == "__main__": + server_address = ('127.0.0.1', 12345) + HTTPServer(server_address, CSVHTTPServer).serve_forever() +``` + +``` sql +SELECT * FROM urlCluster('cluster_simple','http://127.0.0.1:12345', CSV, 'column1 String, column2 UInt32') +``` + +## URL ã®ã‚°ãƒ­ãƒ– + +中括弧 `{ }` 内ã®ãƒ‘ターンã¯ã‚·ãƒ£ãƒ¼ãƒ‰ã®ã‚»ãƒƒãƒˆã‚’生æˆã™ã‚‹ã‹ã€ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’指定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るパターンタイプã¨ä¾‹ã«ã¤ã„ã¦ã¯ã€[remote](remote.md#globs-in-addresses) 関数ã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +パターン内ã®æ–‡å­— `|` ã¯ãƒ•ã‚§ã‚¤ãƒ«ã‚ªãƒ¼ãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’指定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ãれらã¯ãƒ‘ターンã«ãƒªã‚¹ãƒˆã•ã‚ŒãŸé †ã§å復ã•ã‚Œã¾ã™ã€‚生æˆã•ã‚Œã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹ã®æ•°ã¯ [glob_expansion_max_elements](../../operations/settings/settings.md#glob_expansion_max_elements) 設定ã«ã‚ˆã£ã¦åˆ¶é™ã•ã‚Œã¾ã™ã€‚ + +**関連項目** + +- [HDFS エンジン](../../engines/table-engines/special/url.md) +- [URL テーブル関数](../../sql-reference/table-functions/url.md) diff --git a/docs/ja/sql-reference/table-functions/view.md b/docs/ja/sql-reference/table-functions/view.md new file mode 100644 index 00000000000..e912d8be7cd --- /dev/null +++ b/docs/ja/sql-reference/table-functions/view.md @@ -0,0 +1,66 @@ +--- +slug: /ja/sql-reference/table-functions/view +sidebar_position: 210 +sidebar_label: view +title: view +--- + +サブクエリをテーブルã«å¤‰æ›ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ãƒ“ューを実装ã—ã¾ã™ï¼ˆ[CREATE VIEW](https://clickhouse.com/docs/ja/sql-reference/statements/create/view/#create-view)ã‚’å‚照)。生æˆã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã¯ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã›ãšã€æŒ‡å®šã•ã‚ŒãŸ`SELECT`クエリã®ã¿ã‚’ä¿å­˜ã—ã¾ã™ã€‚テーブルã‹ã‚‰èª­ã¿å–ã‚‹éš›ã€ClickHouseã¯ã‚¯ã‚¨ãƒªã‚’実行ã—ã€çµæžœã‹ã‚‰ä¸è¦ãªã‚«ãƒ©ãƒ ã‚’ã™ã¹ã¦å‰Šé™¤ã—ã¾ã™ã€‚ + +**構文** + +``` sql +view(subquery) +``` + +**引数** + +- `subquery` — `SELECT`クエリ。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- テーブル。 + +**例** + +入力テーブル: + +``` text +┌─id─┬─name─────┬─days─┠+│ 1 │ January │ 31 │ +│ 2 │ February │ 29 │ +│ 3 │ March │ 31 │ +│ 4 │ April │ 30 │ +└────┴──────────┴──────┘ +``` + +クエリ: + +``` sql +SELECT * FROM view(SELECT name FROM months); +``` + +çµæžœï¼š + +``` text +┌─name─────┠+│ January │ +│ February │ +│ March │ +│ April │ +└──────────┘ +``` + +`view`関数ã¯ã€[remote](https://clickhouse.com/docs/ja/sql-reference/table-functions/remote/#remote-remotesecure)ãŠã‚ˆã³[cluster](https://clickhouse.com/docs/ja/sql-reference/table-functions/cluster/#cluster-clusterallreplicas)テーブル関数ã®ãƒ‘ラメータã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ï¼š + +``` sql +SELECT * FROM remote(`127.0.0.1`, view(SELECT a, b, c FROM table_name)); +``` + +``` sql +SELECT * FROM cluster(`cluster_name`, view(SELECT a, b, c FROM table_name)); +``` + +**関連項目** + +- [View Table Engine](https://clickhouse.com/docs/ja/engines/table-engines/special/view/) diff --git a/docs/ja/sql-reference/transactions.md b/docs/ja/sql-reference/transactions.md new file mode 100644 index 00000000000..c937840cff3 --- /dev/null +++ b/docs/ja/sql-reference/transactions.md @@ -0,0 +1,281 @@ +--- +slug: /ja/guides/developer/transactional +--- +# トランザクショナル (ACID) サãƒãƒ¼ãƒˆ + +## ケース 1: MergeTree* ファミリーã®ä¸€ã¤ã®ãƒ†ãƒ¼ãƒ–ルã®ä¸€ã¤ã®ãƒ‘ーティションã¸ã®INSERT + +è¡ŒãŒå˜ä¸€ã®ãƒ–ロックã¨ã—ã¦ãƒ‘ックã•ã‚Œã¦æŒ¿å…¥ã•ã‚Œã‚‹å ´åˆã€ã“ã‚Œã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒŠãƒ« (ACID) ã§ã‚ã‚‹ (注æ„å‚ç…§): +- アトミック: INSERT ãŒæˆåŠŸã¾ãŸã¯å…¨ãæ‹’å¦ã•ã‚Œã‚‹: クライアントã«ç¢ºèªãŒé€ä¿¡ã•ã‚Œã‚‹ã¨å…¨ã¦ã®è¡ŒãŒæŒ¿å…¥ã•ã‚Œã€ã‚¨ãƒ©ãƒ¼ãŒé€ä¿¡ã•ã‚Œã‚‹ã¨ä½•ã‚‚挿入ã•ã‚Œãªã„。 +- 一貫性: テーブルã®åˆ¶ç´„ãŒé•åã•ã‚Œãªã„å ´åˆã€INSERT 内ã®ã™ã¹ã¦ã®è¡ŒãŒæŒ¿å…¥ã•ã‚Œã€INSERT ã¯æˆåŠŸã™ã‚‹; 制約ãŒé•åã•ã‚Œã‚‹å ´åˆã€ä½•ã‚‚挿入ã•ã‚Œãªã„。 +- 分離性: åŒæ™‚実行ã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒ†ãƒ¼ãƒ–ルã®ä¸€è²«ã—ãŸã‚¹ãƒŠãƒƒãƒ—ショットを観察ã™ã‚‹â€“INSERT 以å‰ã®çŠ¶æ…‹ã‹ã€æˆåŠŸã—ãŸå¾Œã®çŠ¶æ…‹; 部分的ãªçŠ¶æ…‹ã¯è¦‹ãˆãªã„。他ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å†…ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯[スナップショット分離](https://en.wikipedia.org/wiki/Snapshot_isolation)を享å—ã—ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å¤–ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯[未コミット読ã¿å–ã‚Š](https://en.wikipedia.org/wiki/Isolation_(database_systems)#Read_uncommitted)ã®åˆ†é›¢ãƒ¬ãƒ™ãƒ«ã‚’æŒã¤ã€‚ +- è€ä¹…性: æˆåŠŸã—㟠INSERT ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¸å¿œç­”ã™ã‚‹å‰ã«æ›¸ãè¾¼ã¾ã‚Œã€å˜ä¸€ã¾ãŸã¯è¤‡æ•°ã®ãƒ¬ãƒ—リカ㫠(ã“れ㯠`insert_quorum` 設定ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã‚‹)ã€ClickHouse ã¯OSã«æ ¼ç´ãƒ¡ãƒ‡ã‚£ã‚¢ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ãƒ‡ãƒ¼ã‚¿ã‚’åŒæœŸã™ã‚‹ã‚ˆã†è¦æ±‚ã§ãã‚‹ (ã“れ㯠`fsync_after_insert` 設定ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã‚‹)。 +- 複数ã®ãƒ†ãƒ¼ãƒ–ルã¸ã®INSERTã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã«å¯èƒ½ã§ã‚ã‚‹ (クライアントã‹ã‚‰INSERTã•ã‚ŒãŸã‚‚ã®ãŒãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューをæŒã¤ãƒ†ãƒ¼ãƒ–ルã§ã‚ã‚‹å ´åˆ)。 + +## ケース 2: MergeTree* ファミリーã®ä¸€ã¤ã®ãƒ†ãƒ¼ãƒ–ルã®è¤‡æ•°ã®ãƒ‘ーティションã¸ã®INSERT + +上記ã®ã‚±ãƒ¼ã‚¹ 1ã¨åŒæ§˜ã€è©³ç´°ã¯ä»¥ä¸‹ã®é€šã‚Š: +- テーブルã«å¤šæ•°ã®ãƒ‘ーティションãŒã‚ã‚Šã€INSERTãŒè¤‡æ•°ã®ãƒ‘ーティションをカãƒãƒ¼ã™ã‚‹å ´åˆã€å„パーティションã¸ã®æŒ¿å…¥ãŒç‹¬ç«‹ã—ã¦ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒŠãƒ«ã§ã‚ã‚‹ + + +## ケース 3: MergeTree* ファミリーã®ä¸€ã¤ã®åˆ†æ•£ãƒ†ãƒ¼ãƒ–ルã¸ã®INSERT + +上記ã®ã‚±ãƒ¼ã‚¹ 1ã¨åŒæ§˜ã€è©³ç´°ã¯ä»¥ä¸‹ã®é€šã‚Š: +- 分散テーブルã¸ã®INSERTã¯å…¨ä½“ã¨ã—ã¦ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒŠãƒ«ã§ã¯ãªã„ãŒã€å„シャードã¸ã®æŒ¿å…¥ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒŠãƒ«ã§ã‚ã‚‹ + +## ケース 4: Buffer テーブルã®ä½¿ç”¨ + +- Buffer テーブルã¸ã®æŒ¿å…¥ã¯åŽŸå­æ€§ã‚‚分離性も一貫性もè€ä¹…性もãªã„ + +## ケース 5: async_insert ã®ä½¿ç”¨ + +上記ã®ã‚±ãƒ¼ã‚¹ 1ã¨åŒæ§˜ã€è©³ç´°ã¯ä»¥ä¸‹ã®é€šã‚Š: +- `async_insert` ãŒæœ‰åŠ¹ã§ `wait_for_async_insert` ㌠1(デフォルト) ã®å ´åˆã§ã‚‚原å­æ€§ãŒä¿è¨¼ã•ã‚Œã‚‹ãŒã€`wait_for_async_insert` ㌠0 ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã¯åŽŸå­æ€§ãŒä¿è¨¼ã•ã‚Œãªã„。 + +## æ³¨æ„ +- クライアントã‹ã‚‰æŒ¿å…¥ã•ã‚ŒãŸè¡Œã¯ã€ã‚るデータフォーマットã§ä»¥ä¸‹ã®å ´åˆã«å˜ä¸€ã®ãƒ–ロックã«ãƒ‘ックã•ã‚Œã‚‹: + - 挿入フォーマットãŒè¡Œãƒ™ãƒ¼ã‚¹ã®å ´åˆï¼ˆCSVã€TSVã€Valuesã€JSONEachRowãªã©ï¼‰ã§ã€ãƒ‡ãƒ¼ã‚¿ãŒ `max_insert_block_size` 行未満(デフォルトã§ã¯ç´„1,000,000)ã¾ãŸã¯ `min_chunk_bytes_for_parallel_parsing` 未満ã®ãƒã‚¤ãƒˆæ•°ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯10 MB)ã®å ´åˆï¼ˆä¸¦åˆ—解æžãŒä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ï¼‰ + - 挿入フォーマットãŒã‚«ãƒ©ãƒ ãƒ™ãƒ¼ã‚¹ã®å ´åˆï¼ˆNativeã€Parquetã€ORCãªã©ï¼‰ã§ã€ãƒ‡ãƒ¼ã‚¿ãŒä¸€ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ–ロックã®ã¿ã‚’å«ã‚€å ´åˆ +- 挿入ã•ã‚ŒãŸãƒ–ロックã®ã‚µã‚¤ã‚ºã¯ã€ä¸€èˆ¬çš„ã«å¤šãã®è¨­å®šã«ä¾å­˜ã™ã‚‹ï¼ˆä¾‹ãˆã°: `max_block_size`, `max_insert_block_size`, `min_insert_block_size_rows`, `min_insert_block_size_bytes`, `preferred_block_size_bytes` ãªã©ï¼‰ +- クライアントãŒã‚µãƒ¼ãƒã‹ã‚‰å¿œç­”ã‚’å—ã‘å–らãªã‹ã£ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãŒæˆåŠŸã—ãŸã‹ã©ã†ã‹ã‚’知るã“ã¨ãŒã§ããšã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’ç¹°ã‚Šè¿”ã™ã“ã¨ãŒã§ãる(ã¡ã‚‡ã†ã©ä¸€åº¦ã ã‘ã®æŒ¿å…¥ç‰¹æ€§ã‚’使用ã—ã¦ï¼‰ +- ClickHouse ã¯å†…部ã§[MVCC](https://en.wikipedia.org/wiki/Multiversion_concurrency_control)を使用ã—ã€åŒæ™‚トランザクションã®ãŸã‚ã®[スナップショット分離](https://en.wikipedia.org/wiki/Snapshot_isolation)を使用ã—ã¦ã„ã‚‹ +- ã™ã¹ã¦ã®ACID 特性ã¯ã‚µãƒ¼ãƒã®ã‚­ãƒ«/クラッシュã®å ´åˆã§ã‚‚有効ã§ã‚ã‚‹ +- ç•°ãªã‚‹AZã¸ã® `insert_quorum` ã¾ãŸã¯ fsync ã®ã„ãšã‚Œã‹ãŒæœ‰åŠ¹ã§ã‚ã‚‹ã¹ãã§ã‚る典型的ãªè¨­å®šã«ãŠã„ã¦è€ä¹…性ã®ã‚る挿入をä¿è¨¼ã™ã‚‹ãŸã‚ã« +- ACID ã®ã€Œä¸€è²«æ€§ã€ã¯åˆ†æ•£ã‚·ã‚¹ãƒ†ãƒ ã®ã‚»ãƒžãƒ³ãƒ†ã‚£ã‚¯ã‚¹ã‚’ã‚«ãƒãƒ¼ã—ãªã„ã€è©³ç´°ã¯ https://jepsen.io/consistency ã‚’å‚照。ã“ã‚Œã¯ç•°ãªã‚‹è¨­å®šã«ã‚ˆã£ã¦åˆ¶å¾¡ã•ã‚Œã‚‹ï¼ˆ`select_sequential_consistency`) +- ã“ã‚Œã¯æ–°ã—ã„トランザクション機能をカãƒãƒ¼ã—ã¦ãŠã‚‰ãšã€è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã€è¤‡æ•°ã®SELECTã«å¯¾ã—ã¦ãƒ•ãƒ«ãƒ•ã‚£ãƒ¼ãƒãƒ£ãƒ¼ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’å¯èƒ½ã«ã™ã‚‹ï¼ˆæ¬¡ã®ã€Œãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚³ãƒŸãƒƒãƒˆã€ãŠã‚ˆã³ãƒ­ãƒ¼ãƒ«ãƒãƒƒã‚¯ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚照) + +## トランザクションã€ã‚³ãƒŸãƒƒãƒˆã€ãŠã‚ˆã³ãƒ­ãƒ¼ãƒ«ãƒãƒƒã‚¯ + +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®å†’é ­ã§èª¬æ˜Žã—ãŸæ©Ÿèƒ½ã«åŠ ãˆã¦ã€ClickHouse ã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚³ãƒŸãƒƒãƒˆã€ãŠã‚ˆã³ãƒ­ãƒ¼ãƒ«ãƒãƒƒã‚¯æ©Ÿèƒ½ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +### è¦ä»¶ + +- トランザクションを追跡ã™ã‚‹ãŸã‚ã« ClickHouse Keeper ã¾ãŸã¯ ZooKeeper を展開 +- Atomic DB ã®ã¿ï¼ˆãƒ‡ãƒ•ã‚©ãƒ«ãƒˆï¼‰ +- éžãƒ¬ãƒ—リケート MergeTree テーブルエンジンã®ã¿ +- `config.d/transactions.xml` ã«æ¬¡ã®è¨­å®šã‚’追加ã—ã¦ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚µãƒãƒ¼ãƒˆã‚’有効化: + ```xml + + 1 + + ``` + +### æ³¨æ„ +- ã“ã‚Œã¯ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªæ©Ÿèƒ½ã§ã‚ã‚Šã€å¤‰æ›´ãŒäºˆæƒ³ã•ã‚Œã¾ã™ã€‚ +- トランザクション中ã«ä¾‹å¤–ãŒç™ºç”Ÿã—ãŸå ´åˆã€ãã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’コミットã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã“ã‚Œã«ã¯ã™ã¹ã¦ã®ä¾‹å¤–ãŒå«ã¾ã‚Œã€ã‚¿ã‚¤ãƒ—ミスã«ã‚ˆã‚‹ `UNKNOWN_FUNCTION` 例外もå«ã¾ã‚Œã¾ã™ã€‚ +- ãƒã‚¹ãƒˆã•ã‚ŒãŸãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“; ç¾åœ¨ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’終了ã—ã€æ–°ã—ã„トランザクションを開始ã—ã¦ãã ã•ã„ + +### 設定 + +以下ã¯å˜ä¸€ãƒŽãƒ¼ãƒ‰ ClickHouse サーãƒã§ ClickHouse Keeper ãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã®ä¾‹ã§ã™ã€‚ + +#### エクスペリメンタルãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚µãƒãƒ¼ãƒˆã‚’有効化 + +```xml title=/etc/clickhouse-server/config.d/transactions.xml + + 1 + +``` + +#### ClickHouse Keeper ãŒæœ‰åŠ¹ãªå˜ä¸€ ClickHouse サーãƒãƒŽãƒ¼ãƒ‰ã®åŸºæœ¬è¨­å®š + +:::note +ClickHouse サーãƒã¨ ClickHouse Keeper ノードã®é©åˆ‡ãªã‚¯ã‚©ãƒ¼ãƒ©ãƒ ã®å±•é–‹ã«é–¢ã™ã‚‹è©³ç´°ã¯ã€[展開](docs/en/deployment-guides/terminology.md)ドキュメントをå‚ç…§ã—ã¦ãã ã•ã„。ã“ã“ã«ç¤ºã•ã‚ŒãŸè¨­å®šã¯å®Ÿé¨“目的ã®ã‚‚ã®ã§ã™ã€‚ +::: + +```xml title=/etc/clickhouse-server/config.d/config.xml + + + debug + /var/log/clickhouse-server/clickhouse-server.log + /var/log/clickhouse-server/clickhouse-server.err.log + 1000M + 3 + + node 1 + 0.0.0.0 + 8123 + 9000 + + + clickhouse-01 + 9181 + + + + 9181 + 1 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + 10000 + 30000 + information + + + + 1 + clickhouse-keeper-01 + 9234 + + + + +``` + +### 例 + +#### エクスペリメンタルトランザクションãŒæœ‰åŠ¹ã§ã‚ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ + +エクスペリメンタルトランザクションãŒæœ‰åŠ¹ã§ã‚ã‚Šã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’追跡ã™ã‚‹ãŸã‚ã« ClickHouse Keeper ãŒæœ‰åŠ¹ã§ã‚ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ãŸã‚ã«ã€`BEGIN TRANSACTION` ã¾ãŸã¯ `START TRANSACTION` ã«ç¶šã‘㦠`ROLLBACK` を実行ã—ã¾ã™ã€‚ + +```sql +BEGIN TRANSACTION +``` +```response +Ok. +``` + +:::tip +次ã®ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•ã‚ŒãŸå ´åˆã¯ã€æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’確èªã—㦠`allow_experimental_transactions` ㌠`1`(ã¾ãŸã¯ `0` ã‚„ `false` 以外ã®å€¤ï¼‰ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 +``` +Code: 48. DB::Exception: Received from localhost:9000. +DB::Exception: Transactions are not supported. +(NOT_IMPLEMENTED) +``` + +ClickHouse Keeper を確èªã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™: +``` +echo ruok | nc localhost 9181 +``` +ClickHouse Keeper 㯠`imok` ã¨è¿”ç­”ã™ã‚‹ã¯ãšã§ã™ã€‚ +::: + +```sql +ROLLBACK +``` +```response +Ok. +``` + +#### テスト用ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ + +:::tip +テーブルã®ä½œæˆã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒŠãƒ«ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã® DDL クエリã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å¤–ã§å®Ÿè¡Œã—ã¦ãã ã•ã„。 +::: + +```sql +CREATE TABLE mergetree_table +( + `n` Int64 +) +ENGINE = MergeTree +ORDER BY n +``` +```response +Ok. +``` + +#### トランザクションを開始ã—ã¦è¡Œã‚’挿入ã™ã‚‹ + +```sql +BEGIN TRANSACTION +``` +```response +Ok. +``` + +```sql +INSERT INTO mergetree_table FORMAT Values (10) +``` +```response +Ok. +``` + +```sql +SELECT * +FROM mergetree_table +``` +```response +┌──n─┠+│ 10 │ +└────┘ +``` +:::note +トランザクション内ã§ãƒ†ãƒ¼ãƒ–ルをクエリã™ã‚‹ã“ã¨ã§ã€ã¾ã ã‚³ãƒŸãƒƒãƒˆã•ã‚Œã¦ã„ãªãã¦ã‚‚è¡ŒãŒæŒ¿å…¥ã•ã‚ŒãŸã“ã¨ãŒç¢ºèªã§ãã¾ã™ã€‚ +::: + +#### トランザクションをロールãƒãƒƒã‚¯ã—ã€ãƒ†ãƒ¼ãƒ–ルをå†åº¦ã‚¯ã‚¨ãƒªã™ã‚‹ + +トランザクションãŒãƒ­ãƒ¼ãƒ«ãƒãƒƒã‚¯ã•ã‚ŒãŸã“ã¨ã‚’確èªã—ã¾ã™: +```sql +ROLLBACK +``` +```response +Ok. +``` +```sql +SELECT * +FROM mergetree_table +``` +```response +Ok. + +0 rows in set. Elapsed: 0.002 sec. +``` + +#### トランザクションを完了ã—ã€å†åº¦ãƒ†ãƒ¼ãƒ–ルをクエリã™ã‚‹ + +```sql +BEGIN TRANSACTION +``` +```response +Ok. +``` + +```sql +INSERT INTO mergetree_table FORMAT Values (42) +``` +```response +Ok. +``` + +```sql +COMMIT +``` +```response +Ok. Elapsed: 0.002 sec. +``` + +```sql +SELECT * +FROM mergetree_table +``` +```response +┌──n─┠+│ 42 │ +└────┘ +``` + +### トランザクションã®å†…çœ + +`system.transactions` テーブルをクエリã™ã‚‹ã“ã¨ã§ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’調ã¹ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å†…ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‹ã‚‰ãã®ãƒ†ãƒ¼ãƒ–ルをクエリã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ãã®ãƒ†ãƒ¼ãƒ–ルをクエリã™ã‚‹ãŸã‚ã«2ã¤ç›®ã® `clickhouse client` セッションを開ã„ã¦ãã ã•ã„。 + +```sql +SELECT * +FROM system.transactions +FORMAT Vertical +``` +```response +Row 1: +────── +tid: (33,61,'51e60bce-6b82-4732-9e1d-b40705ae9ab8') +tid_hash: 11240433987908122467 +elapsed: 210.017820947 +is_readonly: 1 +state: RUNNING +``` + +## 詳細 + +ã“ã®[メタå•é¡Œ](https://github.com/ClickHouse/ClickHouse/issues/48794)ã‚’å‚ç…§ã—ã¦ã€ã‚ˆã‚Šè©³ç´°ãªãƒ†ã‚¹ãƒˆã‚’見ã¤ã‘ã€é€²æ—を最新ã«ä¿ã£ã¦ãã ã•ã„。 diff --git a/docs/ja/sql-reference/window-functions/dense_rank.md b/docs/ja/sql-reference/window-functions/dense_rank.md new file mode 100644 index 00000000000..abf9aaaf5c7 --- /dev/null +++ b/docs/ja/sql-reference/window-functions/dense_rank.md @@ -0,0 +1,75 @@ +--- +slug: /ja/sql-reference/window-functions/dense_rank +sidebar_label: dense_rank +sidebar_position: 7 +--- + +# dense_rank + +パーティション内ã®ç¾åœ¨ã®è¡Œã‚’ã€ã‚®ãƒ£ãƒƒãƒ—ãªã—ã§ãƒ©ãƒ³ã‚¯ä»˜ã‘ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€æ–°ã—ã„è¡Œã®å€¤ãŒä»¥å‰ã®è¡Œã®ã„ãšã‚Œã‹ã®å€¤ã¨ç­‰ã—ã„å ´åˆã€ãã‚Œã¯ãƒ©ãƒ³ã‚¯ã«ã‚®ãƒ£ãƒƒãƒ—ãŒãªã„ã¾ã¾ã«æ¬¡ã®é€£ç¶šã™ã‚‹ãƒ©ãƒ³ã‚¯ã‚’å–å¾—ã—ã¾ã™ã€‚ + +[rank](./rank.md) 関数ã¯åŒæ§˜ã®å‹•ä½œã‚’æä¾›ã—ã¾ã™ãŒã€ãƒ©ãƒ³ã‚¯ã«ã‚®ãƒ£ãƒƒãƒ—ãŒã‚ã‚Šã¾ã™ã€‚ + +**構文** + +エイリアス: `denseRank` (大文字å°æ–‡å­—区別) + +```sql +dense_rank (column_name) + OVER ([[PARTITION BY grouping_column] [ORDER BY sorting_column] + [ROWS or RANGE expression_to_bound_rows_withing_the_group]] | [window_name]) +FROM table_name +WINDOW window_name as ([[PARTITION BY grouping_column] [ORDER BY sorting_column]) +``` + +ウィンドウ関数ã®æ§‹æ–‡ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[ウィンドウ関数 - 構文](./index.md/#syntax) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ランクã«ã‚®ãƒ£ãƒƒãƒ—ãªã—ã®ã€ãƒ‘ーティション内ã®ç¾åœ¨ã®è¡Œã®ç•ªå·ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +以下ã®ä¾‹ã¯ã€å‹•ç”»ã®æŒ‡å°Ž [Ranking window functions in ClickHouse](https://youtu.be/Yku9mmBYm_4?si=XIMu1jpYucCQEoXA) ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ + +クエリ: + +```sql +CREATE TABLE salaries +( + `team` String, + `player` String, + `salary` UInt32, + `position` String +) +Engine = Memory; + +INSERT INTO salaries FORMAT Values + ('Port Elizabeth Barbarians', 'Gary Chen', 195000, 'F'), + ('New Coreystad Archdukes', 'Charles Juarez', 190000, 'F'), + ('Port Elizabeth Barbarians', 'Michael Stanley', 150000, 'D'), + ('New Coreystad Archdukes', 'Scott Harrison', 150000, 'D'), + ('Port Elizabeth Barbarians', 'Robert George', 195000, 'M'), + ('South Hampton Seagulls', 'Douglas Benson', 150000, 'M'), + ('South Hampton Seagulls', 'James Henderson', 140000, 'M'); +``` + +```sql +SELECT player, salary, + dense_rank() OVER (ORDER BY salary DESC) AS dense_rank +FROM salaries; +``` + +çµæžœ: + +```response + ┌─player──────────┬─salary─┬─dense_rank─┠+1. │ Gary Chen │ 195000 │ 1 │ +2. │ Robert George │ 195000 │ 1 │ +3. │ Charles Juarez │ 190000 │ 2 │ +4. │ Michael Stanley │ 150000 │ 3 │ +5. │ Douglas Benson │ 150000 │ 3 │ +6. │ Scott Harrison │ 150000 │ 3 │ +7. │ James Henderson │ 140000 │ 4 │ + └─────────────────┴────────┴────────────┘ +``` diff --git a/docs/ja/sql-reference/window-functions/first_value.md b/docs/ja/sql-reference/window-functions/first_value.md new file mode 100644 index 00000000000..74c009d3da7 --- /dev/null +++ b/docs/ja/sql-reference/window-functions/first_value.md @@ -0,0 +1,79 @@ +--- +slug: /ja/sql-reference/window-functions/first_value +sidebar_label: first_value +sidebar_position: 3 +--- + +# first_value + +指定ã•ã‚ŒãŸé †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã§è©•ä¾¡ã•ã‚ŒãŸæœ€åˆã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚デフォルトã§ã¯ã€NULL 引数ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ãŒã€`RESPECT NULLS` 修飾å­ã‚’使用ã™ã‚‹ã“ã¨ã§ã“ã®æŒ™å‹•ã‚’上書ãã§ãã¾ã™ã€‚ + +**構文** + +```sql +first_value (column_name) [[RESPECT NULLS] | [IGNORE NULLS]] + OVER ([[PARTITION BY grouping_column] [ORDER BY sorting_column] + [ROWS or RANGE expression_to_bound_rows_withing_the_group]] | [window_name]) +FROM table_name +WINDOW window_name as ([[PARTITION BY grouping_column] [ORDER BY sorting_column]) +``` + +エイリアス: `any`. + +:::note +`first_value(column_name)` ã®å¾Œã«ã‚ªãƒ—ションã®ä¿®é£¾å­ `RESPECT NULLS` を使用ã™ã‚‹ã¨ã€`NULL` 引数ãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œãªããªã‚Šã¾ã™ã€‚ +詳細㯠[NULL ã®å‡¦ç†](../aggregate-functions/index.md/#null-processing) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +ウィンドウ関数ã®æ§‹æ–‡ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[ウィンドウ関数 - 構文](./index.md/#syntax) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- 指定ã•ã‚ŒãŸé †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã§è©•ä¾¡ã•ã‚ŒãŸæœ€åˆã®å€¤ã€‚ + +**例** + +ã“ã®ä¾‹ã§ã¯ã€`first_value` 関数を使ã£ã¦ã€ãƒ—レミアリーグã®æž¶ç©ºã®ã‚µãƒƒã‚«ãƒ¼é¸æ‰‹ã®çµ¦ä¸Žãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‹ã‚‰æœ€ã‚‚高給ã®é¸æ‰‹ã‚’見ã¤ã‘ã¾ã™ã€‚ + +クエリ: + +```sql +DROP TABLE IF EXISTS salaries; +CREATE TABLE salaries +( + `team` String, + `player` String, + `salary` UInt32, + `position` String +) +Engine = Memory; + +INSERT INTO salaries FORMAT Values + ('Port Elizabeth Barbarians', 'Gary Chen', 196000, 'F'), + ('New Coreystad Archdukes', 'Charles Juarez', 190000, 'F'), + ('Port Elizabeth Barbarians', 'Michael Stanley', 100000, 'D'), + ('New Coreystad Archdukes', 'Scott Harrison', 180000, 'D'), + ('Port Elizabeth Barbarians', 'Robert George', 195000, 'M'), + ('South Hampton Seagulls', 'Douglas Benson', 150000, 'M'), + ('South Hampton Seagulls', 'James Henderson', 140000, 'M'); +``` + +```sql +SELECT player, salary, + first_value(player) OVER (ORDER BY salary DESC) AS highest_paid_player +FROM salaries; +``` + +çµæžœ: + +```response + ┌─player──────────┬─salary─┬─highest_paid_player─┠+1. │ Gary Chen │ 196000 │ Gary Chen │ +2. │ Robert George │ 195000 │ Gary Chen │ +3. │ Charles Juarez │ 190000 │ Gary Chen │ +4. │ Scott Harrison │ 180000 │ Gary Chen │ +5. │ Douglas Benson │ 150000 │ Gary Chen │ +6. │ James Henderson │ 140000 │ Gary Chen │ +7. │ Michael Stanley │ 100000 │ Gary Chen │ + └─────────────────┴────────┴─────────────────────┘ +``` diff --git a/docs/ja/sql-reference/window-functions/index.md b/docs/ja/sql-reference/window-functions/index.md new file mode 100644 index 00000000000..5fee3498e37 --- /dev/null +++ b/docs/ja/sql-reference/window-functions/index.md @@ -0,0 +1,755 @@ +--- +slug: /ja/sql-reference/window-functions/ +sidebar_label: ウィンドウ関数 +sidebar_position: 1 +--- + +# ウィンドウ関数 + +ウィンドウ関数を使用ã™ã‚‹ã¨ã€ç¾åœ¨ã®è¡Œã«é–¢é€£ã™ã‚‹ä¸€é€£ã®è¡Œã«å¯¾ã—ã¦è¨ˆç®—を実行ã§ãã¾ã™ã€‚ã“れらã®è¨ˆç®—ã®ä¸€éƒ¨ã¯é›†ç´„関数ã§å®Ÿè¡Œã§ãã‚‹ã‚‚ã®ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã§ã¯è¡ŒãŒå˜ä¸€ã®å‡ºåŠ›ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã•ã‚Œã‚‹ã“ã¨ã¯ãªãã€å€‹ã€…ã®è¡ŒãŒè¿”ã•ã‚Œç¶šã‘ã¾ã™ã€‚ + +## 標準ウィンドウ関数 + +ClickHouse ã¯ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã‚’定義ã™ã‚‹ãŸã‚ã®æ¨™æº–çš„ãªæ–‡æ³•ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚以下ã®è¡¨ã¯ã€æ©Ÿèƒ½ãŒç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +| 機能 | サãƒãƒ¼ãƒˆçŠ¶æ³ | +|--------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| アドホックウィンドウ仕様 (`count(*) over (partition by id order by time desc)`) | ✅ | +| ウィンドウ関数をå«ã‚€å¼ä¾‹ (`(count(*) over ()) / 2)`) | ✅ | +| `WINDOW`å¥ (`select ... from table window w as (partition by id)`) | ✅ | +| `ROWS`フレーム | ✅ | +| `RANGE`フレーム | ✅ (デフォルト) | +| `DateTime` `RANGE OFFSET`フレームã®`INTERVAL`構文 | ⌠(代ã‚ã‚Šã«ç§’数を指定ã—ã¦ãã ã•ã„(`RANGE`ã¯ä»»æ„ã®æ•°å€¤åž‹ã§å‹•ä½œã—ã¾ã™ï¼‰ã€‚) | +| `GROUPS`フレーム | ⌠| +| フレームを超ãˆã‚‹é›†ç´„関数ã®è¨ˆç®— (`sum(value) over (order by time)`) | ✅ (ã™ã¹ã¦ã®é›†ç´„関数ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¾ã™) | +| `rank()`, `dense_rank()`, `row_number()` | ✅
    エイリアス: `denseRank()` | +| `percent_rank()` | ✅ パーティション内ã§ã®å€¤ã®ç›¸å¯¾çš„ãªä½ç½®ã‚’効率的ã«è¨ˆç®—ã—ã¾ã™ã€‚ã“ã®é–¢æ•°ã¯ã€ã‚ˆã‚Šå†—é•·ã§è¨ˆç®—集約的ãªæ‰‹å‹•SQL計算ã§ã‚ã‚‹`ifNull((rank() OVER(PARTITION BY x ORDER BY y) - 1) / nullif(count(1) OVER(PARTITION BY x) - 1, 0), 0)`を効果的ã«ç½®ãæ›ãˆã¾ã™
    エイリアス: `percentRank()`| +| `lag/lead(value, offset)` | âŒ
    次ã®å›žé¿ç­–ã®ã„ãšã‚Œã‹ã‚’使用ã§ãã¾ã™:
    1) `any(value) over (.... rows between preceding and preceding)`, ã¾ãŸã¯ `lead`ã®å ´åˆã¯`following`
    2) `lagInFrame/leadInFrame`, ã“れらã¯é¡žä¼¼ã—ã¦ã„ã¾ã™ãŒã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ•ãƒ¬ãƒ¼ãƒ ã«å¾“ã„ã¾ã™ã€‚`lag/lead`ã¨åŒã˜å‹•ä½œã‚’å¾—ã‚‹ã«ã¯ã€`rows between unbounded preceding and unbounded following`を使用ã—ã¦ãã ã•ã„。 | +| ntile(buckets) | ✅
    ウィンドウを指定ã—ã¾ã™ (partition by x order by y rows between unbounded preceding and unbounded following)。 | + +## ClickHouse固有ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•° + +以下ã®ClickHouse固有ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã‚‚ã‚ã‚Šã¾ã™: + +### nonNegativeDerivative(metric_column, timestamp_column[, INTERVAL X UNITS]) + +指定ã•ã‚ŒãŸ`metric_column`ã‚’`timestamp_column`ã§éžè² ã®å°Žé–¢æ•°ã‚’見ã¤ã‘ã¾ã™ã€‚ +`INTERVAL`ã¯çœç•¥å¯èƒ½ã§ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯`INTERVAL 1 SECOND`ã§ã™ã€‚ +å„è¡Œã«å¯¾ã—ã¦è¨ˆç®—ã•ã‚Œã‚‹å€¤ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: +- `0`ã¯æœ€åˆã®è¡Œã€ +- ${\text{metric}_i - \text{metric}_{i-1} \over \text{timestamp}_i - \text{timestamp}_{i-1}} * \text{interval}$ 㯠$i_{th}$ 行。 + +## 文法 + +```text +aggregate_function (column_name) + OVER ([[PARTITION BY grouping_column] [ORDER BY sorting_column] + [ROWS or RANGE expression_to_bound_rows_withing_the_group]] | [window_name]) +FROM table_name +WINDOW window_name as ([[PARTITION BY grouping_column] [ORDER BY sorting_column]) +``` + +- `PARTITION BY` - çµæžœã‚»ãƒƒãƒˆã‚’グループã«åˆ†ã‘る方法を定義ã—ã¾ã™ã€‚ +- `ORDER BY` - 集約関数ã®è¨ˆç®—中ã«ã‚°ãƒ«ãƒ¼ãƒ—内ã®è¡Œã‚’並ã³æ›¿ãˆã‚‹æ–¹æ³•ã‚’定義ã—ã¾ã™ã€‚ +- `ROWS or RANGE` - フレームã®å¢ƒç•Œã‚’定義ã—ã€é›†ç´„関数ã¯ãƒ•ãƒ¬ãƒ¼ãƒ å†…ã§è¨ˆç®—ã•ã‚Œã¾ã™ã€‚ +- `WINDOW` - 複数ã®å¼ãŒåŒã˜ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å®šç¾©ã‚’使用ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +```text + PARTITION +┌─────────────────┠<-- UNBOUNDED PRECEDING (BEGINNING of the PARTITION) +│ │ +│ │ +│=================│ <-- N PRECEDING <─┠+│ N ROWS │ │ F +│ Before CURRENT │ │ R +│~~~~~~~~~~~~~~~~~│ <-- CURRENT ROW │ A +│ M ROWS │ │ M +│ After CURRENT │ │ E +│=================│ <-- M FOLLOWING <─┘ +│ │ +│ │ +└─────────────────┘ <--- UNBOUNDED FOLLOWING (END of the PARTITION) +``` + +### 関数 + +ã“れらã®é–¢æ•°ã¯ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦é–¢æ•°ã¨ã—ã¦ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚ + +- [`row_number()`](./row_number.md) - 自身ã®ãƒ‘ーティション内ã§ç¾åœ¨ã®è¡Œã‚’1ã‹ã‚‰ç•ªå·ä»˜ã‘ã—ã¾ã™ã€‚ +- [`first_value(x)`](./first_value.md) - é †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã§æœ€åˆã«è©•ä¾¡ã•ã‚ŒãŸå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- [`last_value(x)`](./last_value.md) - é †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã§æœ€å¾Œã«è©•ä¾¡ã•ã‚ŒãŸå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- [`nth_value(x, offset)`](./nth_value.md) - é †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã®nth行(オフセット)ã§è©•ä¾¡ã•ã‚ŒãŸæœ€åˆã®éžNULL値を返ã—ã¾ã™ã€‚ +- [`rank()`](./rank.md) - ギャップをæŒã¤ãƒ‘ーティション内ã§ç¾åœ¨ã®è¡Œã‚’ランク付ã‘ã—ã¾ã™ã€‚ +- [`dense_rank()`](./dense_rank.md) - ギャップãªã—ã§ãƒ‘ーティション内ã§ç¾åœ¨ã®è¡Œã‚’ランク付ã‘ã—ã¾ã™ã€‚ +- [`lagInFrame(x)`](./lagInFrame.md) - é †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã§ç¾åœ¨ã®è¡Œã®å‰ã®æŒ‡å®šã•ã‚ŒãŸç‰©ç†ã‚ªãƒ•ã‚»ãƒƒãƒˆè¡Œã§è©•ä¾¡ã•ã‚ŒãŸå€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- [`leadInFrame(x)`](./leadInFrame.md) - é †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã§ç¾åœ¨ã®è¡Œã®å¾Œã®ã‚ªãƒ•ã‚»ãƒƒãƒˆè¡Œã§è©•ä¾¡ã•ã‚ŒãŸå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +## 例 + +ウィンドウ関数ãŒã©ã®ã‚ˆã†ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‹ã‚’ã„ãã¤ã‹ã®ä¾‹ã§è¦‹ã¦ã¿ã¾ã—ょã†ã€‚ + +### è¡Œã®ç•ªå·ä»˜ã‘ + +```sql +CREATE TABLE salaries +( + `team` String, + `player` String, + `salary` UInt32, + `position` String +) +Engine = Memory; + +INSERT INTO salaries FORMAT Values + ('Port Elizabeth Barbarians', 'Gary Chen', 195000, 'F'), + ('New Coreystad Archdukes', 'Charles Juarez', 190000, 'F'), + ('Port Elizabeth Barbarians', 'Michael Stanley', 150000, 'D'), + ('New Coreystad Archdukes', 'Scott Harrison', 150000, 'D'), + ('Port Elizabeth Barbarians', 'Robert George', 195000, 'M'); +``` + +```sql +SELECT player, salary, + row_number() OVER (ORDER BY salary) AS row +FROM salaries; +``` + +```text +┌─player──────────┬─salary─┬─row─┠+│ Michael Stanley │ 150000 │ 1 │ +│ Scott Harrison │ 150000 │ 2 │ +│ Charles Juarez │ 190000 │ 3 │ +│ Gary Chen │ 195000 │ 4 │ +│ Robert George │ 195000 │ 5 │ +└─────────────────┴────────┴─────┘ +``` + +```sql +SELECT player, salary, + row_number() OVER (ORDER BY salary) AS row, + rank() OVER (ORDER BY salary) AS rank, + dense_rank() OVER (ORDER BY salary) AS denseRank +FROM salaries; +``` + +```text +┌─player──────────┬─salary─┬─row─┬─rank─┬─denseRank─┠+│ Michael Stanley │ 150000 │ 1 │ 1 │ 1 │ +│ Scott Harrison │ 150000 │ 2 │ 1 │ 1 │ +│ Charles Juarez │ 190000 │ 3 │ 3 │ 2 │ +│ Gary Chen │ 195000 │ 4 │ 4 │ 3 │ +│ Robert George │ 195000 │ 5 │ 4 │ 3 │ +└─────────────────┴────────┴──────┴──────┴───────────┘ +``` + +### 集計関数 + +å„プレイヤーã®çµ¦ä¸Žã‚’ãƒãƒ¼ãƒ ã®å¹³å‡ã¨æ¯”較ã—ã¾ã™ã€‚ + +```sql +SELECT player, salary, team, + avg(salary) OVER (PARTITION BY team) AS teamAvg, + salary - teamAvg AS diff +FROM salaries; +``` + +```text +┌─player──────────┬─salary─┬─team──────────────────────┬─teamAvg─┬───diff─┠+│ Charles Juarez │ 190000 │ New Coreystad Archdukes │ 170000 │ 20000 │ +│ Scott Harrison │ 150000 │ New Coreystad Archdukes │ 170000 │ -20000 │ +│ Gary Chen │ 195000 │ Port Elizabeth Barbarians │ 180000 │ 15000 │ +│ Michael Stanley │ 150000 │ Port Elizabeth Barbarians │ 180000 │ -30000 │ +│ Robert George │ 195000 │ Port Elizabeth Barbarians │ 180000 │ 15000 │ +└─────────────────┴────────┴───────────────────────────┴─────────┴────────┘ +``` + +å„プレイヤーã®çµ¦ä¸Žã‚’ãƒãƒ¼ãƒ ã®æœ€å¤§å€¤ã¨æ¯”較ã—ã¾ã™ã€‚ + +```sql +SELECT player, salary, team, + max(salary) OVER (PARTITION BY team) AS teamAvg, + salary - teamAvg AS diff +FROM salaries; +``` + +```text +┌─player──────────┬─salary─┬─team──────────────────────┬─teamAvg─┬───diff─┠+│ Charles Juarez │ 190000 │ New Coreystad Archdukes │ 190000 │ 0 │ +│ Scott Harrison │ 150000 │ New Coreystad Archdukes │ 190000 │ -40000 │ +│ Gary Chen │ 195000 │ Port Elizabeth Barbarians │ 195000 │ 0 │ +│ Michael Stanley │ 150000 │ Port Elizabeth Barbarians │ 195000 │ -45000 │ +│ Robert George │ 195000 │ Port Elizabeth Barbarians │ 195000 │ 0 │ +└─────────────────┴────────┴───────────────────────────┴─────────┴────────┘ +``` + +### カラムã«ã‚ˆã‚‹ãƒ‘ーティション分割 + +```sql +CREATE TABLE wf_partition +( + `part_key` UInt64, + `value` UInt64, + `order` UInt64 +) +ENGINE = Memory; + +INSERT INTO wf_partition FORMAT Values + (1,1,1), (1,2,2), (1,3,3), (2,0,0), (3,0,0); + +SELECT + part_key, + value, + order, + groupArray(value) OVER (PARTITION BY part_key) AS frame_values +FROM wf_partition +ORDER BY + part_key ASC, + value ASC; + +┌─part_key─┬─value─┬─order─┬─frame_values─┠+│ 1 │ 1 │ 1 │ [1,2,3] │ <â” +│ 1 │ 2 │ 2 │ [1,2,3] │ │ 1ã¤ç›®ã®ã‚°ãƒ«ãƒ¼ãƒ— +│ 1 │ 3 │ 3 │ [1,2,3] │ <┘ +│ 2 │ 0 │ 0 │ [0] │ <- 2ã¤ç›®ã®ã‚°ãƒ«ãƒ¼ãƒ— +│ 3 │ 0 │ 0 │ [0] │ <- 3ã¤ç›®ã®ã‚°ãƒ«ãƒ¼ãƒ— +└──────────┴───────┴───────┴──────────────┘ +``` + +### フレーム境界設定 + +```sql +CREATE TABLE wf_frame +( + `part_key` UInt64, + `value` UInt64, + `order` UInt64 +) +ENGINE = Memory; + +INSERT INTO wf_frame FORMAT Values + (1,1,1), (1,2,2), (1,3,3), (1,4,4), (1,5,5); +``` + +```sql +-- フレームã¯ãƒ‘ーティションã®å¢ƒç•Œã«å›²ã¾ã‚Œã¦ã„ã¾ã™ï¼ˆBETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) +SELECT + part_key, + value, + order, + groupArray(value) OVER ( + PARTITION BY part_key + ORDER BY order ASC + Rows BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING + ) AS frame_values +FROM wf_frame +ORDER BY + part_key ASC, + value ASC; + +┌─part_key─┬─value─┬─order─┬─frame_values─┠+│ 1 │ 1 │ 1 │ [1,2,3,4,5] │ +│ 1 │ 2 │ 2 │ [1,2,3,4,5] │ +│ 1 │ 3 │ 3 │ [1,2,3,4,5] │ +│ 1 │ 4 │ 4 │ [1,2,3,4,5] │ +│ 1 │ 5 │ 5 │ [1,2,3,4,5] │ +└──────────┴───────┴───────┴──────────────┘ +``` + +```sql +-- ç°¡ç•¥å½¢å¼ - 境界å¼ãªã—ã€ORDER BYãªã— +SELECT + part_key, + value, + order, + groupArray(value) OVER (PARTITION BY part_key) AS frame_values +FROM wf_frame +ORDER BY + part_key ASC, + value ASC; +┌─part_key─┬─value─┬─order─┬─frame_values─┠+│ 1 │ 1 │ 1 │ [1,2,3,4,5] │ +│ 1 │ 2 │ 2 │ [1,2,3,4,5] │ +│ 1 │ 3 │ 3 │ [1,2,3,4,5] │ +│ 1 │ 4 │ 4 │ [1,2,3,4,5] │ +│ 1 │ 5 │ 5 │ [1,2,3,4,5] │ +└──────────┴───────┴───────┴──────────────┘ +``` + +```sql +-- フレームã¯ãƒ‘ーティションã®å§‹ã¾ã‚Šã¨ç¾åœ¨ã®è¡Œã§å›²ã¾ã‚Œã¦ã„ã¾ã™ +SELECT + part_key, + value, + order, + groupArray(value) OVER ( + PARTITION BY part_key + ORDER BY order ASC + Rows BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW + ) AS frame_values +FROM wf_frame +ORDER BY + part_key ASC, + value ASC; + +┌─part_key─┬─value─┬─order─┬─frame_values─┠+│ 1 │ 1 │ 1 │ [1] │ +│ 1 │ 2 │ 2 │ [1,2] │ +│ 1 │ 3 │ 3 │ [1,2,3] │ +│ 1 │ 4 │ 4 │ [1,2,3,4] │ +│ 1 │ 5 │ 5 │ [1,2,3,4,5] │ +└──────────┴───────┴───────┴──────────────┘ +``` + +```sql +-- 簡略形å¼ï¼ˆãƒ•ãƒ¬ãƒ¼ãƒ ã¯ãƒ‘ーティションã®å§‹ã¾ã‚Šã¨ç¾åœ¨ã®è¡Œã§å›²ã¾ã‚Œã¦ã„ã¾ã™ï¼‰ +SELECT + part_key, + value, + order, + groupArray(value) OVER (PARTITION BY part_key ORDER BY order ASC) AS frame_values +FROM wf_frame +ORDER BY + part_key ASC, + value ASC; +┌─part_key─┬─value─┬─order─┬─frame_values─┠+│ 1 │ 1 │ 1 │ [1] │ +│ 1 │ 2 │ 2 │ [1,2] │ +│ 1 │ 3 │ 3 │ [1,2,3] │ +│ 1 │ 4 │ 4 │ [1,2,3,4] │ +│ 1 │ 5 │ 5 │ [1,2,3,4,5] │ +└──────────┴───────┴───────┴──────────────┘ +``` + +```sql +-- フレームã¯ãƒ‘ーティションã®å§‹ã¾ã‚Šã¨ç¾åœ¨ã®è¡Œã§å›²ã¾ã‚Œã¦ã„ã¾ã™ãŒã€é †åºãŒé€†ã§ã™ +SELECT + part_key, + value, + order, + groupArray(value) OVER (PARTITION BY part_key ORDER BY order DESC) AS frame_values +FROM wf_frame +ORDER BY + part_key ASC, + value ASC; +┌─part_key─┬─value─┬─order─┬─frame_values─┠+│ 1 │ 1 │ 1 │ [5,4,3,2,1] │ +│ 1 │ 2 │ 2 │ [5,4,3,2] │ +│ 1 │ 3 │ 3 │ [5,4,3] │ +│ 1 │ 4 │ 4 │ [5,4] │ +│ 1 │ 5 │ 5 │ [5] │ +└──────────┴───────┴───────┴──────────────┘ +``` + +```sql +-- スライディングフレーム - 1ã¤å‰ã®è¡Œã¨ç¾åœ¨ã®è¡Œ +SELECT + part_key, + value, + order, + groupArray(value) OVER ( + PARTITION BY part_key + ORDER BY order ASC + Rows BETWEEN 1 PRECEDING AND CURRENT ROW + ) AS frame_values +FROM wf_frame +ORDER BY + part_key ASC, + value ASC; + +┌─part_key─┬─value─┬─order─┬─frame_values─┠+│ 1 │ 1 │ 1 │ [1] │ +│ 1 │ 2 │ 2 │ [1,2] │ +│ 1 │ 3 │ 3 │ [2,3] │ +│ 1 │ 4 │ 4 │ [3,4] │ +│ 1 │ 5 │ 5 │ [4,5] │ +└──────────┴───────┴───────┴──────────────┘ +``` + +```sql +-- スライディングフレーム - `Rows BETWEEN 1 PRECEDING AND UNBOUNDED FOLLOWING` +SELECT + part_key, + value, + order, + groupArray(value) OVER ( + PARTITION BY part_key + ORDER BY order ASC + Rows BETWEEN 1 PRECEDING AND UNBOUNDED FOLLOWING + ) AS frame_values +FROM wf_frame +ORDER BY + part_key ASC, + value ASC; +┌─part_key─┬─value─┬─order─┬─frame_values─┠+│ 1 │ 1 │ 1 │ [1,2,3,4,5] │ +│ 1 │ 2 │ 2 │ [1,2,3,4,5] │ +│ 1 │ 3 │ 3 │ [2,3,4,5] │ +│ 1 │ 4 │ 4 │ [3,4,5] │ +│ 1 │ 5 │ 5 │ [4,5] │ +└──────────┴───────┴───────┴──────────────┘ +``` + +```sql +-- `row_number`ã¯ãƒ•ãƒ¬ãƒ¼ãƒ ã‚’å°Šé‡ã—ãªã„ãŸã‚ã€`rn_1 = rn_2 = rn_3 != rn_4` +SELECT + part_key, + value, + order, + groupArray(value) OVER w1 AS frame_values, + row_number() OVER w1 AS rn_1, + sum(1) OVER w1 AS rn_2, + row_number() OVER w2 AS rn_3, + sum(1) OVER w2 AS rn_4 +FROM wf_frame +WINDOW + w1 AS (PARTITION BY part_key ORDER BY order DESC), + w2 AS ( + PARTITION BY part_key + ORDER BY order DESC + Rows BETWEEN 1 PRECEDING AND CURRENT ROW + ) +ORDER BY + part_key ASC, + value ASC; +┌─part_key─┬─value─┬─order─┬─frame_values─┬─rn_1─┬─rn_2─┬─rn_3─┬─rn_4─┠+│ 1 │ 1 │ 1 │ [5,4,3,2,1] │ 5 │ 5 │ 5 │ 2 │ +│ 1 │ 2 │ 2 │ [5,4,3,2] │ 4 │ 4 │ 4 │ 2 │ +│ 1 │ 3 │ 3 │ [5,4,3] │ 3 │ 3 │ 3 │ 2 │ +│ 1 │ 4 │ 4 │ [5,4] │ 2 │ 2 │ 2 │ 2 │ +│ 1 │ 5 │ 5 │ [5] │ 1 │ 1 │ 1 │ 1 │ +└──────────┴───────┴───────┴──────────────┴──────┴──────┴──────┴──────┘ +``` + +```sql +-- `first_value`ã¨`last_value`ã¯ãƒ•ãƒ¬ãƒ¼ãƒ ã‚’å°Šé‡ã—ã¾ã™ +SELECT + groupArray(value) OVER w1 AS frame_values_1, + first_value(value) OVER w1 AS first_value_1, + last_value(value) OVER w1 AS last_value_1, + groupArray(value) OVER w2 AS frame_values_2, + first_value(value) OVER w2 AS first_value_2, + last_value(value) OVER w2 AS last_value_2 +FROM wf_frame +WINDOW + w1 AS (PARTITION BY part_key ORDER BY order ASC), + w2 AS (PARTITION BY part_key ORDER BY order ASC Rows BETWEEN 1 PRECEDING AND CURRENT ROW) +ORDER BY + part_key ASC, + value ASC; +┌─frame_values_1─┬─first_value_1─┬─last_value_1─┬─frame_values_2─┬─first_value_2─┬─last_value_2─┠+│ [1] │ 1 │ 1 │ [1] │ 1 │ 1 │ +│ [1,2] │ 1 │ 2 │ [1,2] │ 1 │ 2 │ +│ [1,2,3] │ 1 │ 3 │ [2,3] │ 2 │ 3 │ +│ [1,2,3,4] │ 1 │ 4 │ [3,4] │ 3 │ 4 │ +│ [1,2,3,4,5] │ 1 │ 5 │ [4,5] │ 4 │ 5 │ +└────────────────┴───────────────┴──────────────┴────────────────┴───────────────┴──────────────┘ +``` + +```sql +-- フレーム内ã®2番目ã®å€¤ +SELECT + groupArray(value) OVER w1 AS frame_values_1, + nth_value(value, 2) OVER w1 AS second_value +FROM wf_frame +WINDOW w1 AS (PARTITION BY part_key ORDER BY order ASC Rows BETWEEN 3 PRECEDING AND CURRENT ROW) +ORDER BY + part_key ASC, + value ASC +┌─frame_values_1─┬─second_value─┠+│ [1] │ 0 │ +│ [1,2] │ 2 │ +│ [1,2,3] │ 2 │ +│ [1,2,3,4] │ 2 │ +│ [2,3,4,5] │ 3 │ +└────────────────┴──────────────┘ +``` + +```sql +-- フレーム内ã®2番目ã®å€¤ + 欠è½å€¤ã¸ã®Null +SELECT + groupArray(value) OVER w1 AS frame_values_1, + nth_value(toNullable(value), 2) OVER w1 AS second_value +FROM wf_frame +WINDOW w1 AS (PARTITION BY part_key ORDER BY order ASC Rows BETWEEN 3 PRECEDING AND CURRENT ROW) +ORDER BY + part_key ASC, + value ASC +┌─frame_values_1─┬─second_value─┠+│ [1] │ á´ºáµá´¸á´¸ │ +│ [1,2] │ 2 │ +│ [1,2,3] │ 2 │ +│ [1,2,3,4] │ 2 │ +│ [2,3,4,5] │ 3 │ +└────────────────┴──────────────┘ +``` + +## ç¾å®Ÿã®ä¾‹ + +以下ã¯ä¸€èˆ¬çš„ãªç¾å®Ÿã®å•é¡Œã‚’解決ã™ã‚‹ä¾‹ã§ã™ã€‚ + +### 部署別ã®æœ€å¤§çµ¦ä¸Ž/åˆè¨ˆçµ¦ä¸Ž + +```sql +CREATE TABLE employees +( + `department` String, + `employee_name` String, + `salary` Float +) +ENGINE = Memory; + +INSERT INTO employees FORMAT Values + ('Finance', 'Jonh', 200), + ('Finance', 'Joan', 210), + ('Finance', 'Jean', 505), + ('IT', 'Tim', 200), + ('IT', 'Anna', 300), + ('IT', 'Elen', 500); +``` + +```sql +SELECT + department, + employee_name AS emp, + salary, + max_salary_per_dep, + total_salary_per_dep, + round((salary / total_salary_per_dep) * 100, 2) AS `share_per_dep(%)` +FROM +( + SELECT + department, + employee_name, + salary, + max(salary) OVER wndw AS max_salary_per_dep, + sum(salary) OVER wndw AS total_salary_per_dep + FROM employees + WINDOW wndw AS ( + PARTITION BY department + rows BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING + ) + ORDER BY + department ASC, + employee_name ASC +); + +┌─department─┬─emp──┬─salary─┬─max_salary_per_dep─┬─total_salary_per_dep─┬─share_per_dep(%)─┠+│ Finance │ Jean │ 505 │ 505 │ 915 │ 55.19 │ +│ Finance │ Joan │ 210 │ 505 │ 915 │ 22.95 │ +│ Finance │ Jonh │ 200 │ 505 │ 915 │ 21.86 │ +│ IT │ Anna │ 300 │ 500 │ 1000 │ 30 │ +│ IT │ Elen │ 500 │ 500 │ 1000 │ 50 │ +│ IT │ Tim │ 200 │ 500 │ 1000 │ 20 │ +└────────────┴──────┴────────┴────────────────────┴──────────────────────┴──────────────────┘ +``` + +### ç´¯ç©å’Œ + +```sql +CREATE TABLE warehouse +( + `item` String, + `ts` DateTime, + `value` Float +) +ENGINE = Memory + +INSERT INTO warehouse VALUES + ('sku38', '2020-01-01', 9), + ('sku38', '2020-02-01', 1), + ('sku38', '2020-03-01', -4), + ('sku1', '2020-01-01', 1), + ('sku1', '2020-02-01', 1), + ('sku1', '2020-03-01', 1); +``` + +```sql +SELECT + item, + ts, + value, + sum(value) OVER (PARTITION BY item ORDER BY ts ASC) AS stock_balance +FROM warehouse +ORDER BY + item ASC, + ts ASC; + +┌─item──┬──────────────────ts─┬─value─┬─stock_balance─┠+│ sku1 │ 2020-01-01 00:00:00 │ 1 │ 1 │ +│ sku1 │ 2020-02-01 00:00:00 │ 1 │ 2 │ +│ sku1 │ 2020-03-01 00:00:00 │ 1 │ 3 │ +│ sku38 │ 2020-01-01 00:00:00 │ 9 │ 9 │ +│ sku38 │ 2020-02-01 00:00:00 │ 1 │ 10 │ +│ sku38 │ 2020-03-01 00:00:00 │ -4 │ 6 │ +└───────┴─────────────────────┴───────┴───────────────┘ +``` + +### ç§»å‹•ãƒ»ã‚¹ãƒ©ã‚¤ãƒ‡ã‚£ãƒ³ã‚°å¹³å‡ (3è¡Œã”ã¨) + +```sql +CREATE TABLE sensors +( + `metric` String, + `ts` DateTime, + `value` Float +) +ENGINE = Memory; + +insert into sensors values('cpu_temp', '2020-01-01 00:00:00', 87), + ('cpu_temp', '2020-01-01 00:00:01', 77), + ('cpu_temp', '2020-01-01 00:00:02', 93), + ('cpu_temp', '2020-01-01 00:00:03', 87), + ('cpu_temp', '2020-01-01 00:00:04', 87), + ('cpu_temp', '2020-01-01 00:00:05', 87), + ('cpu_temp', '2020-01-01 00:00:06', 87), + ('cpu_temp', '2020-01-01 00:00:07', 87); +``` + +```sql +SELECT + metric, + ts, + value, + avg(value) OVER ( + PARTITION BY metric + ORDER BY ts ASC + Rows BETWEEN 2 PRECEDING AND CURRENT ROW + ) AS moving_avg_temp +FROM sensors +ORDER BY + metric ASC, + ts ASC; + +┌─metric───┬──────────────────ts─┬─value─┬───moving_avg_temp─┠+│ cpu_temp │ 2020-01-01 00:00:00 │ 87 │ 87 │ +│ cpu_temp │ 2020-01-01 00:00:01 │ 77 │ 82 │ +│ cpu_temp │ 2020-01-01 00:00:02 │ 93 │ 85.66666666666667 │ +│ cpu_temp │ 2020-01-01 00:00:03 │ 87 │ 85.66666666666667 │ +│ cpu_temp │ 2020-01-01 00:00:04 │ 87 │ 89 │ +│ cpu_temp │ 2020-01-01 00:00:05 │ 87 │ 87 │ +│ cpu_temp │ 2020-01-01 00:00:06 │ 87 │ 87 │ +│ cpu_temp │ 2020-01-01 00:00:07 │ 87 │ 87 │ +└──────────┴─────────────────────┴───────┴───────────────────┘ +``` + +### ç§»å‹•ãƒ»ã‚¹ãƒ©ã‚¤ãƒ‡ã‚£ãƒ³ã‚°å¹³å‡ (10秒ã”ã¨) + +```sql +SELECT + metric, + ts, + value, + avg(value) OVER (PARTITION BY metric ORDER BY ts + Range BETWEEN 10 PRECEDING AND CURRENT ROW) AS moving_avg_10_seconds_temp +FROM sensors +ORDER BY + metric ASC, + ts ASC; + +┌─metric───┬──────────────────ts─┬─value─┬─moving_avg_10_seconds_temp─┠+│ cpu_temp │ 2020-01-01 00:00:00 │ 87 │ 87 │ +│ cpu_temp │ 2020-01-01 00:01:10 │ 77 │ 77 │ +│ cpu_temp │ 2020-01-01 00:02:20 │ 93 │ 93 │ +│ cpu_temp │ 2020-01-01 00:03:30 │ 87 │ 87 │ +│ cpu_temp │ 2020-01-01 00:04:40 │ 87 │ 87 │ +│ cpu_temp │ 2020-01-01 00:05:50 │ 87 │ 87 │ +│ cpu_temp │ 2020-01-01 00:06:00 │ 87 │ 87 │ +│ cpu_temp │ 2020-01-01 00:07:10 │ 87 │ 87 │ +└──────────┴─────────────────────┴───────┴────────────────────────────┘ +``` + +### ç§»å‹•ãƒ»ã‚¹ãƒ©ã‚¤ãƒ‡ã‚£ãƒ³ã‚°å¹³å‡ (10æ—¥ã”ã¨) + +温度ã¯ç§’å˜ä½ã§ä¿å­˜ã•ã‚Œã¾ã™ãŒã€`Range`ã¨`ORDER BY toDate(ts)`を使用ã™ã‚‹ã“ã¨ã§ã€10å˜ä½ã®ã‚µã‚¤ã‚ºã®ãƒ•ãƒ¬ãƒ¼ãƒ ã‚’å½¢æˆã—ã¾ã™ã€‚`toDate(ts)`を使用ã—ã¦ã„ã‚‹ãŸã‚ã€å˜ä½ã¯æ—¥ã§ã™ã€‚ + +```sql +CREATE TABLE sensors +( + `metric` String, + `ts` DateTime, + `value` Float +) +ENGINE = Memory; + +insert into sensors values('ambient_temp', '2020-01-01 00:00:00', 16), + ('ambient_temp', '2020-01-01 12:00:00', 16), + ('ambient_temp', '2020-01-02 11:00:00', 9), + ('ambient_temp', '2020-01-02 12:00:00', 9), + ('ambient_temp', '2020-02-01 10:00:00', 10), + ('ambient_temp', '2020-02-01 12:00:00', 10), + ('ambient_temp', '2020-02-10 12:00:00', 12), + ('ambient_temp', '2020-02-10 13:00:00', 12), + ('ambient_temp', '2020-02-20 12:00:01', 16), + ('ambient_temp', '2020-03-01 12:00:00', 16), + ('ambient_temp', '2020-03-01 12:00:00', 16), + ('ambient_temp', '2020-03-01 12:00:00', 16); +``` + +```sql +SELECT + metric, + ts, + value, + round(avg(value) OVER (PARTITION BY metric ORDER BY toDate(ts) + Range BETWEEN 10 PRECEDING AND CURRENT ROW),2) AS moving_avg_10_days_temp +FROM sensors +ORDER BY + metric ASC, + ts ASC; + +┌─metric───────┬──────────────────ts─┬─value─┬─moving_avg_10_days_temp─┠+│ ambient_temp │ 2020-01-01 00:00:00 │ 16 │ 16 │ +│ ambient_temp │ 2020-01-01 12:00:00 │ 16 │ 16 │ +│ ambient_temp │ 2020-01-02 11:00:00 │ 9 │ 12.5 │ +│ ambient_temp │ 2020-01-02 12:00:00 │ 9 │ 12.5 │ +│ ambient_temp │ 2020-02-01 10:00:00 │ 10 │ 10 │ +│ ambient_temp │ 2020-02-01 12:00:00 │ 10 │ 10 │ +│ ambient_temp │ 2020-02-10 12:00:00 │ 12 │ 11 │ +│ ambient_temp │ 2020-02-10 13:00:00 │ 12 │ 11 │ +│ ambient_temp │ 2020-02-20 12:00:01 │ 16 │ 13.33 │ +│ ambient_temp │ 2020-03-01 12:00:00 │ 16 │ 16 │ +│ ambient_temp │ 2020-03-01 12:00:00 │ 16 │ 16 │ +│ ambient_temp │ 2020-03-01 12:00:00 │ 16 │ 16 │ +└──────────────┴─────────────────────┴───────┴─────────────────────────┘ +``` + +## å‚考文献 + +### GitHub Issues + +ウィンドウ関数ã®åˆæœŸã‚µãƒãƒ¼ãƒˆã®ãƒ­ãƒ¼ãƒ‰ãƒžãƒƒãƒ—ã¯[ã“ã®å•é¡Œ](https://github.com/ClickHouse/ClickHouse/issues/18097)ã«ã‚ã‚Šã¾ã™ã€‚ + +ウィンドウ関数ã«é–¢é€£ã™ã‚‹ã™ã¹ã¦ã®GitHubã®å•é¡Œã¯[comp-window-functions](https://github.com/ClickHouse/ClickHouse/labels/comp-window-functions)ã‚¿ã‚°ãŒä»˜ã„ã¦ã„ã¾ã™ã€‚ + +### テスト + +ã“れらã®ãƒ†ã‚¹ãƒˆã¯ç¾åœ¨ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る文法ã®ä¾‹ã‚’å«ã‚“ã§ã„ã¾ã™: + +https://github.com/ClickHouse/ClickHouse/blob/master/tests/performance/window_functions.xml + +https://github.com/ClickHouse/ClickHouse/blob/master/tests/queries/0_stateless/01591_window_functions.sql + +### Postgres Docs + +https://www.postgresql.org/docs/current/sql-select.html#SQL-WINDOW + +https://www.postgresql.org/docs/devel/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS + +https://www.postgresql.org/docs/devel/functions-window.html + +https://www.postgresql.org/docs/devel/tutorial-window.html + +### MySQL Docs + +https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html + +https://dev.mysql.com/doc/refman/8.0/en/window-functions-usage.html + +https://dev.mysql.com/doc/refman/8.0/en/window-functions-frames.html + + +## 関連コンテンツ + +- ブログ: [ClickHouseã§ã®æ™‚系列データã®æ“作](https://clickhouse.com/blog/working-with-time-series-data-and-functions-ClickHouse) +- ブログ: [Gitコミットシーケンスã®ãŸã‚ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¨é…列関数](https://clickhouse.com/blog/clickhouse-window-array-functions-git-commits) +- ブログ: [ClickHouseã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚¤ãƒ³ãƒãƒ¼ãƒˆ - Part 3 - S3ã®ä½¿ç”¨](https://clickhouse.com/blog/getting-data-into-clickhouse-part-3-s3) diff --git a/docs/ja/sql-reference/window-functions/lagInFrame.md b/docs/ja/sql-reference/window-functions/lagInFrame.md new file mode 100644 index 00000000000..3e58dea606f --- /dev/null +++ b/docs/ja/sql-reference/window-functions/lagInFrame.md @@ -0,0 +1,79 @@ +--- +slug: /ja/sql-reference/window-functions/lagInFrame +sidebar_label: lagInFrame +sidebar_position: 9 +--- + +# lagInFrame + +é †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã§ç¾åœ¨ã®è¡Œã®å‰ã«æŒ‡å®šã•ã‚ŒãŸç‰©ç†çš„ãªã‚ªãƒ•ã‚»ãƒƒãƒˆè¡Œã«ã‚る評価ã•ã‚ŒãŸå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +lagInFrame(x[, offset[, default]]) + OVER ([[PARTITION BY grouping_column] [ORDER BY sorting_column] + [ROWS ã¾ãŸã¯ RANGE expression_to_bound_rows_withing_the_group]] | [window_name]) +FROM table_name +WINDOW window_name as ([[PARTITION BY grouping_column] [ORDER BY sorting_column]) +``` + +ウィンドウ関数ã®æ§‹æ–‡ã®è©³ç´°ã«ã¤ã„ã¦ã¯ä»¥ä¸‹ã‚’å‚ç…§ã—ã¦ãã ã•ã„: [ウィンドウ関数 - 構文](./index.md/#syntax). + +**パラメータ** +- `x` — カラムå。 +- `offset` — é©ç”¨ã™ã‚‹ã‚ªãƒ•ã‚»ãƒƒãƒˆã€‚[(U)Int*](../data-types/int-uint.md)。 (オプション - デフォルト㧠`1`)。 +- `default` — 計算ã•ã‚ŒãŸè¡ŒãŒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ•ãƒ¬ãƒ¼ãƒ ã®å¢ƒç•Œã‚’超ãˆãŸå ´åˆã«è¿”ã•ã‚Œã‚‹å€¤ã€‚ (オプション - çœç•¥æ™‚ã¯ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤)。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã§ç¾åœ¨ã®è¡Œã®å‰ã«æŒ‡å®šã•ã‚ŒãŸç‰©ç†çš„ãªã‚ªãƒ•ã‚»ãƒƒãƒˆè¡Œã«ã‚る評価ã•ã‚ŒãŸå€¤ã€‚ + +**例** + +ã“ã®ä¾‹ã§ã¯ç‰¹å®šã®æ ªå¼ã®éŽåŽ»ãƒ‡ãƒ¼ã‚¿ã‚’見ã¦ã€`lagInFrame` 関数を使用ã—ã¦æ ªä¾¡ã®çµ‚値ã®æ—¥ã€…ã®å¤‰åŒ–ã¨å¤‰åŒ–率を計算ã—ã¾ã™ã€‚ + +クエリ: + +```sql +CREATE TABLE stock_prices +( + `date` Date, + `open` Float32, -- 始値 + `high` Float32, -- 日中高値 + `low` Float32, -- 日中安値 + `close` Float32, -- 終値 + `volume` UInt32 -- å–å¼•é‡ +) +Engine = Memory; + +INSERT INTO stock_prices FORMAT Values + ('2024-06-03', 113.62, 115.00, 112.00, 115.00, 438392000), + ('2024-06-04', 115.72, 116.60, 114.04, 116.44, 403324000), + ('2024-06-05', 118.37, 122.45, 117.47, 122.44, 528402000), + ('2024-06-06', 124.05, 125.59, 118.32, 121.00, 664696000), + ('2024-06-07', 119.77, 121.69, 118.02, 120.89, 412386000); +``` + +```sql +SELECT + date, + close, + lagInFrame(close, 1, close) OVER (ORDER BY date ASC) AS previous_day_close, + COALESCE(ROUND(close - previous_day_close, 2)) AS delta, + COALESCE(ROUND((delta / previous_day_close) * 100, 2)) AS percent_change +FROM stock_prices +ORDER BY date DESC; +``` + +çµæžœ: + +```response + ┌───────date─┬──close─┬─previous_day_close─┬─delta─┬─percent_change─┠+1. │ 2024-06-07 │ 120.89 │ 121 │ -0.11 │ -0.09 │ +2. │ 2024-06-06 │ 121 │ 122.44 │ -1.44 │ -1.18 │ +3. │ 2024-06-05 │ 122.44 │ 116.44 │ 6 │ 5.15 │ +4. │ 2024-06-04 │ 116.44 │ 115 │ 1.44 │ 1.25 │ +5. │ 2024-06-03 │ 115 │ 115 │ 0 │ 0 │ + └────────────┴────────┴────────────────────┴───────┴────────────────┘ +``` diff --git a/docs/ja/sql-reference/window-functions/last_value.md b/docs/ja/sql-reference/window-functions/last_value.md new file mode 100644 index 00000000000..dbc1422584e --- /dev/null +++ b/docs/ja/sql-reference/window-functions/last_value.md @@ -0,0 +1,79 @@ +--- +slug: /ja/sql-reference/window-functions/last_value +sidebar_label: last_value +sidebar_position: 4 +--- + +# last_value + +ãã®é †åºä»˜ã‘られãŸæž å†…ã§è©•ä¾¡ã•ã‚ŒãŸæœ€å¾Œã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚デフォルトã§ã¯ã€NULL 引数ã¯ã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œã¾ã™ãŒã€`RESPECT NULLS` 修飾å­ã‚’使用ã™ã‚‹ã“ã¨ã§ã“ã®å‹•ä½œã‚’上書ãã§ãã¾ã™ã€‚ + +**構文** + +```sql +last_value (column_name) [[RESPECT NULLS] | [IGNORE NULLS]] + OVER ([[PARTITION BY grouping_column] [ORDER BY sorting_column] + [ROWS or RANGE expression_to_bound_rows_withing_the_group]] | [window_name]) +FROM table_name +WINDOW window_name as ([[PARTITION BY grouping_column] [ORDER BY sorting_column]) +``` + +別å: `anyLast`. + +:::note +`first_value(column_name)` ã®å¾Œã«ã‚ªãƒ—ションã®ä¿®é£¾å­ `RESPECT NULLS` を使用ã™ã‚‹ã¨ã€`NULL` 引数ãŒã‚¹ã‚­ãƒƒãƒ—ã•ã‚Œãªã„よã†ã«ãªã‚Šã¾ã™ã€‚ +詳細ã«ã¤ã„ã¦ã¯ã€[NULL 処ç†](../aggregate-functions/index.md/#null-processing)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +::: + +ウィンドウ関数構文ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[ウィンドウ関数 - 構文](./index.md/#syntax)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- ãã®é †åºä»˜ã‘られãŸæž å†…ã§è©•ä¾¡ã•ã‚ŒãŸæœ€å¾Œã®å€¤ã€‚ + +**例** + +ã“ã®ä¾‹ã§ã¯ã€`last_value` 関数を使用ã—ã¦ã€ãƒ—レミアリーグã®ã‚µãƒƒã‚«ãƒ¼é¸æ‰‹ã®æž¶ç©ºã®çµ¦æ–™ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‹ã‚‰æœ€é«˜çµ¦æ–™ã®é¸æ‰‹ã‚’見ã¤ã‘ã¾ã™ã€‚ + +クエリ: + +```sql +DROP TABLE IF EXISTS salaries; +CREATE TABLE salaries +( + `team` String, + `player` String, + `salary` UInt32, + `position` String +) +Engine = Memory; + +INSERT INTO salaries FORMAT Values + ('Port Elizabeth Barbarians', 'Gary Chen', 196000, 'F'), + ('New Coreystad Archdukes', 'Charles Juarez', 190000, 'F'), + ('Port Elizabeth Barbarians', 'Michael Stanley', 100000, 'D'), + ('New Coreystad Archdukes', 'Scott Harrison', 180000, 'D'), + ('Port Elizabeth Barbarians', 'Robert George', 195000, 'M'), + ('South Hampton Seagulls', 'Douglas Benson', 150000, 'M'), + ('South Hampton Seagulls', 'James Henderson', 140000, 'M'); +``` + +```sql +SELECT player, salary, + last_value(player) OVER (ORDER BY salary DESC RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS lowest_paid_player +FROM salaries; +``` + +çµæžœ: + +```response + ┌─player──────────┬─salary─┬─lowest_paid_player─┠+1. │ Gary Chen │ 196000 │ Michael Stanley │ +2. │ Robert George │ 195000 │ Michael Stanley │ +3. │ Charles Juarez │ 190000 │ Michael Stanley │ +4. │ Scott Harrison │ 180000 │ Michael Stanley │ +5. │ Douglas Benson │ 150000 │ Michael Stanley │ +6. │ James Henderson │ 140000 │ Michael Stanley │ +7. │ Michael Stanley │ 100000 │ Michael Stanley │ + └─────────────────┴────────┴────────────────────┘ +``` diff --git a/docs/ja/sql-reference/window-functions/leadInFrame.md b/docs/ja/sql-reference/window-functions/leadInFrame.md new file mode 100644 index 00000000000..e213a30cbf3 --- /dev/null +++ b/docs/ja/sql-reference/window-functions/leadInFrame.md @@ -0,0 +1,60 @@ +--- +slug: /ja/sql-reference/window-functions/leadInFrame +sidebar_label: leadInFrame +sidebar_position: 10 +--- + +# leadInFrame + +é †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã§ã€ç¾åœ¨ã®è¡Œã®å¾Œã«ã‚るオフセット行ã«è©•ä¾¡ã•ã‚ŒãŸå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +**構文** + +```sql +leadInFrame(x[, offset[, default]]) + OVER ([[PARTITION BY grouping_column] [ORDER BY sorting_column] + [ROWS or RANGE expression_to_bound_rows_withing_the_group]] | [window_name]) +FROM table_name +WINDOW window_name as ([[PARTITION BY grouping_column] [ORDER BY sorting_column]) +``` + +ウィンドウ関数ã®æ§‹æ–‡ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[ウィンドウ関数 - 構文](./index.md/#syntax) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**パラメーター** +- `x` — カラムå。 +- `offset` — é©ç”¨ã™ã‚‹ã‚ªãƒ•ã‚»ãƒƒãƒˆã€‚[(U)Int*](../data-types/int-uint.md)。 (çœç•¥å¯èƒ½ - デフォルト㯠`1`)。 +- `default` — 計算ã•ã‚ŒãŸè¡ŒãŒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ•ãƒ¬ãƒ¼ãƒ ã®å¢ƒç•Œã‚’超ãˆãŸå ´åˆã«è¿”ã™å€¤ã€‚ (çœç•¥å¯èƒ½ - çœç•¥æ™‚ã¯ã‚«ãƒ©ãƒ ã‚¿ã‚¤ãƒ—ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ï¼‰ã€‚ + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã§ã€ç¾åœ¨ã®è¡Œã®å¾Œã«ã‚るオフセット行ã«è©•ä¾¡ã•ã‚ŒãŸå€¤ã€‚ + +**例** + +ã“ã®ä¾‹ã§ã¯ã€ãƒŽãƒ¼ãƒ™ãƒ«è³žå—賞者ã®[æ­´å²ãƒ‡ãƒ¼ã‚¿](https://www.kaggle.com/datasets/sazidthe1/nobel-prize-data)を調査ã—ã€`leadInFrame` 関数を使用ã—ã¦ç‰©ç†å­¦ã‚«ãƒ†ã‚´ãƒªãƒ¼ã®é€£ç¶šã—ãŸå—賞者ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ + +クエリ: + +```sql +CREATE OR REPLACE VIEW nobel_prize_laureates AS FROM file('nobel_laureates_data.csv') SELECT *; +``` + +```sql +FROM nobel_prize_laureates SELECT fullName, leadInFrame(year, 1, year) OVER (PARTITION BY category ORDER BY year) AS year, category, motivation WHERE category == 'physics' ORDER BY year DESC LIMIT 9; +``` + +çµæžœ: + +```response + ┌─fullName─────────┬─year─┬─category─┬─motivation─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+1. │ Pierre Agostini │ 2023 │ physics │ for experimental methods that generate attosecond pulses of light for the study of electron dynamics in matter │ +2. │ Ferenc Krausz │ 2023 │ physics │ for experimental methods that generate attosecond pulses of light for the study of electron dynamics in matter │ +3. │ Anne L Huillier │ 2023 │ physics │ for experimental methods that generate attosecond pulses of light for the study of electron dynamics in matter │ +4. │ Alain Aspect │ 2022 │ physics │ for experiments with entangled photons establishing the violation of Bell inequalities and pioneering quantum information science │ +5. │ Anton Zeilinger │ 2022 │ physics │ for experiments with entangled photons establishing the violation of Bell inequalities and pioneering quantum information science │ +6. │ John Clauser │ 2022 │ physics │ for experiments with entangled photons establishing the violation of Bell inequalities and pioneering quantum information science │ +7. │ Syukuro Manabe │ 2021 │ physics │ for the physical modelling of Earths climate quantifying variability and reliably predicting global warming │ +8. │ Klaus Hasselmann │ 2021 │ physics │ for the physical modelling of Earths climate quantifying variability and reliably predicting global warming │ +9. │ Giorgio Parisi │ 2021 │ physics │ for the discovery of the interplay of disorder and fluctuations in physical systems from atomic to planetary scales │ + └──────────────────┴──────┴──────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ja/sql-reference/window-functions/nth_value.md b/docs/ja/sql-reference/window-functions/nth_value.md new file mode 100644 index 00000000000..28e004c37cd --- /dev/null +++ b/docs/ja/sql-reference/window-functions/nth_value.md @@ -0,0 +1,75 @@ +--- +slug: /ja/sql-reference/window-functions/nth_value +sidebar_label: nth_value +sidebar_position: 5 +--- + +# nth_value + +é †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã® nth 行(オフセット)ã«å¯¾ã—ã¦è©•ä¾¡ã•ã‚ŒãŸæœ€åˆã®éžNULL値を返ã—ã¾ã™ã€‚ + +**構文** + +```sql +nth_value (x, offset) + OVER ([[PARTITION BY grouping_column] [ORDER BY sorting_column] + [ROWS or RANGE expression_to_bound_rows_withing_the_group]] | [window_name]) +FROM table_name +WINDOW window_name as ([[PARTITION BY grouping_column] [ORDER BY sorting_column]) +``` + +ウィンドウ関数ã®æ§‹æ–‡ã«ã¤ã„ã¦ã®è©³ç´°ã¯æ¬¡ã‚’å‚ç…§ã—ã¦ãã ã•ã„: [Window Functions - Syntax](./index.md/#syntax). + +**パラメータ** + +- `x` — カラムå。 +- `offset` — ç¾åœ¨ã®è¡Œã‚’評価ã™ã‚‹ãŸã‚ã® nth 行。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- é †åºä»˜ã‘られãŸãƒ•ãƒ¬ãƒ¼ãƒ å†…ã® nth 行(オフセット)ã«å¯¾ã—ã¦è©•ä¾¡ã•ã‚ŒãŸæœ€åˆã®éžNULL値。 + +**例** + +ã“ã®ä¾‹ã§ã¯ã€`nth_value` 関数を使用ã—ã¦ã€ãƒ—レミアリーグã®ã‚µãƒƒã‚«ãƒ¼é¸æ‰‹ã®æž¶ç©ºã®çµ¦ä¸Žãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‹ã‚‰3番目ã«é«˜ã„給与を見ã¤ã‘ã¾ã™ã€‚ + +クエリ: + +```sql +DROP TABLE IF EXISTS salaries; +CREATE TABLE salaries +( + `team` String, + `player` String, + `salary` UInt32, + `position` String +) +Engine = Memory; + +INSERT INTO salaries FORMAT Values + ('Port Elizabeth Barbarians', 'Gary Chen', 195000, 'F'), + ('New Coreystad Archdukes', 'Charles Juarez', 190000, 'F'), + ('Port Elizabeth Barbarians', 'Michael Stanley', 100000, 'D'), + ('New Coreystad Archdukes', 'Scott Harrison', 180000, 'D'), + ('Port Elizabeth Barbarians', 'Robert George', 195000, 'M'), + ('South Hampton Seagulls', 'Douglas Benson', 150000, 'M'), + ('South Hampton Seagulls', 'James Henderson', 140000, 'M'); +``` + +```sql +SELECT player, salary, nth_value(player,3) OVER(ORDER BY salary DESC) AS third_highest_salary FROM salaries; +``` + +çµæžœ: + +```response + ┌─player──────────┬─salary─┬─third_highest_salary─┠+1. │ Gary Chen │ 195000 │ │ +2. │ Robert George │ 195000 │ │ +3. │ Charles Juarez │ 190000 │ Charles Juarez │ +4. │ Scott Harrison │ 180000 │ Charles Juarez │ +5. │ Douglas Benson │ 150000 │ Charles Juarez │ +6. │ James Henderson │ 140000 │ Charles Juarez │ +7. │ Michael Stanley │ 100000 │ Charles Juarez │ + └─────────────────┴────────┴──────────────────────┘ +``` diff --git a/docs/ja/sql-reference/window-functions/percent_rank.md b/docs/ja/sql-reference/window-functions/percent_rank.md new file mode 100644 index 00000000000..e310b2ee753 --- /dev/null +++ b/docs/ja/sql-reference/window-functions/percent_rank.md @@ -0,0 +1,72 @@ +--- +slug: /ja/sql-reference/window-functions/percent_rank +sidebar_label: percent_rank +sidebar_position: 8 +--- + +# percent_rank + +è¡Œã®ç›¸å¯¾çš„ãªé †ä½ï¼ˆã™ãªã‚ã¡ãƒ‘ーセンタイル)をウィンドウパーティション内ã§è¿”ã—ã¾ã™ã€‚ + +**構文** + +別å: `percentRank`(大文字å°æ–‡å­—を区別) + +```sql +percent_rank (column_name) + OVER ([[PARTITION BY grouping_column] [ORDER BY sorting_column] + [RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING]] | [window_name]) +FROM table_name +WINDOW window_name as ([PARTITION BY grouping_column] [ORDER BY sorting_column] RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) +``` + +デフォルトã§å¿…è¦ãªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒ•ãƒ¬ãƒ¼ãƒ å®šç¾©ã¯ `RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING` ã§ã™ã€‚ + +ウィンドウ関数ã®æ§‹æ–‡ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€ã“ã¡ã‚‰ã‚’å‚ç…§ã—ã¦ãã ã•ã„: [ウィンドウ関数 - 構文](./index.md/#syntax)。 + +**例** + +クエリ: + +```sql +CREATE TABLE salaries +( + `team` String, + `player` String, + `salary` UInt32, + `position` String +) +Engine = Memory; + +INSERT INTO salaries FORMAT Values + ('Port Elizabeth Barbarians', 'Gary Chen', 195000, 'F'), + ('New Coreystad Archdukes', 'Charles Juarez', 190000, 'F'), + ('Port Elizabeth Barbarians', 'Michael Stanley', 150000, 'D'), + ('New Coreystad Archdukes', 'Scott Harrison', 150000, 'D'), + ('Port Elizabeth Barbarians', 'Robert George', 195000, 'M'), + ('South Hampton Seagulls', 'Douglas Benson', 150000, 'M'), + ('South Hampton Seagulls', 'James Henderson', 140000, 'M'); +``` + +```sql +SELECT player, salary, + percent_rank() OVER (ORDER BY salary DESC) AS percent_rank +FROM salaries; +``` + +çµæžœ: + +```response + + ┌─player──────────┬─salary─┬───────percent_rank─┠+1. │ Gary Chen │ 195000 │ 0 │ +2. │ Robert George │ 195000 │ 0 │ +3. │ Charles Juarez │ 190000 │ 0.3333333333333333 │ +4. │ Michael Stanley │ 150000 │ 0.5 │ +5. │ Scott Harrison │ 150000 │ 0.5 │ +6. │ Douglas Benson │ 150000 │ 0.5 │ +7. │ James Henderson │ 140000 │ 1 │ + └─────────────────┴────────┴────────────────────┘ + +``` + diff --git a/docs/ja/sql-reference/window-functions/rank.md b/docs/ja/sql-reference/window-functions/rank.md new file mode 100644 index 00000000000..afa90930c87 --- /dev/null +++ b/docs/ja/sql-reference/window-functions/rank.md @@ -0,0 +1,73 @@ +--- +slug: /ja/sql-reference/window-functions/rank +sidebar_label: rank +sidebar_position: 6 +--- + +# rank + +ç¾åœ¨ã®è¡Œã‚’ãã®ãƒ‘ーティション内ã§ã‚®ãƒ£ãƒƒãƒ—ã‚’æŒã£ã¦ãƒ©ãƒ³ã‚¯ä»˜ã‘ã—ã¾ã™ã€‚言ã„æ›ãˆã‚Œã°ã€å‡¦ç†ä¸­ã®è¡Œã®å€¤ãŒä»¥å‰ã®è¡Œã¨ç­‰ã—ã„å ´åˆã€ãれらã¯åŒã˜ãƒ©ãƒ³ã‚¯ã‚’å—ã‘å–ã‚Šã¾ã™ã€‚次ã®è¡Œã®ãƒ©ãƒ³ã‚¯ã¯ã€å‰ã®è¡Œã®ãƒ©ãƒ³ã‚¯ã«ã€å‰ã®ãƒ©ãƒ³ã‚¯ãŒä¸Žãˆã‚‰ã‚ŒãŸå›žæ•°åˆ†ã®ã‚®ãƒ£ãƒƒãƒ—を加ãˆãŸã‚‚ã®ã«ãªã‚Šã¾ã™ã€‚ + +[dense_rank](./dense_rank.md)関数ã¯ã€ãƒ©ãƒ³ã‚¯ä»˜ã‘ã«ã‚®ãƒ£ãƒƒãƒ—ãŒãªã„åŒã˜å‹•ä½œã‚’æä¾›ã—ã¾ã™ã€‚ + +**構文** + +```sql +rank (column_name) + OVER ([[PARTITION BY grouping_column] [ORDER BY sorting_column] + [ROWS ã¾ãŸã¯ RANGE expression_to_bound_rows_withing_the_group]] | [window_name]) +FROM table_name +WINDOW window_name as ([[PARTITION BY grouping_column] [ORDER BY sorting_column]) +``` + +ウィンドウ関数ã®æ§‹æ–‡ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[ウィンドウ関数 - 構文](./index.md/#syntax)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**戻り値** + +- ギャップをå«ã‚€ã€ãƒ‘ーティション内ã®ç¾åœ¨ã®è¡Œã®ç•ªå·ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +以下ã®ä¾‹ã¯ã€å‹•ç”»ã‚¤ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚·ãƒ§ãƒ³[ClickHouseã«ãŠã‘るランキングウィンドウ関数](https://youtu.be/Yku9mmBYm_4?si=XIMu1jpYucCQEoXA)ã§æä¾›ã•ã‚ŒãŸä¾‹ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ + +クエリ: + +```sql +CREATE TABLE salaries +( + `team` String, + `player` String, + `salary` UInt32, + `position` String +) +Engine = Memory; + +INSERT INTO salaries FORMAT Values + ('Port Elizabeth Barbarians', 'Gary Chen', 195000, 'F'), + ('New Coreystad Archdukes', 'Charles Juarez', 190000, 'F'), + ('Port Elizabeth Barbarians', 'Michael Stanley', 150000, 'D'), + ('New Coreystad Archdukes', 'Scott Harrison', 150000, 'D'), + ('Port Elizabeth Barbarians', 'Robert George', 195000, 'M'), + ('South Hampton Seagulls', 'Douglas Benson', 150000, 'M'), + ('South Hampton Seagulls', 'James Henderson', 140000, 'M'); +``` + +```sql +SELECT player, salary, + rank() OVER (ORDER BY salary DESC) AS rank +FROM salaries; +``` + +çµæžœ: + +```response + ┌─player──────────┬─salary─┬─rank─┠+1. │ Gary Chen │ 195000 │ 1 │ +2. │ Robert George │ 195000 │ 1 │ +3. │ Charles Juarez │ 190000 │ 3 │ +4. │ Douglas Benson │ 150000 │ 4 │ +5. │ Michael Stanley │ 150000 │ 4 │ +6. │ Scott Harrison │ 150000 │ 4 │ +7. │ James Henderson │ 140000 │ 7 │ + └─────────────────┴────────┴──────┘ +``` diff --git a/docs/ja/sql-reference/window-functions/row_number.md b/docs/ja/sql-reference/window-functions/row_number.md new file mode 100644 index 00000000000..3b6c1de0563 --- /dev/null +++ b/docs/ja/sql-reference/window-functions/row_number.md @@ -0,0 +1,67 @@ +--- +slug: /ja/sql-reference/window-functions/row_number +sidebar_label: row_number +sidebar_position: 2 +--- + +# row_number + +行をãã®ãƒ‘ーティション内ã§1ã‹ã‚‰é †ç•ªã«ç•ªå·ä»˜ã‘ã—ã¾ã™ã€‚ + +**構文** + +```sql +row_number (column_name) + OVER ([[PARTITION BY grouping_column] [ORDER BY sorting_column] + [ROWS or RANGE expression_to_bound_rows_withing_the_group]] | [window_name]) +FROM table_name +WINDOW window_name as ([[PARTITION BY grouping_column] [ORDER BY sorting_column]) +``` + +ウィンドウ関数ã®æ§‹æ–‡ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[Window Functions - Syntax](./index.md/#syntax) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**è¿”ã•ã‚Œã‚‹å€¤** + +- パーティション内ã®ç¾åœ¨ã®è¡Œã®ç•ªå·ã€‚[UInt64](../data-types/int-uint.md)。 + +**例** + +以下ã®ä¾‹ã¯ã€ãƒ“デオ教æ [Ranking window functions in ClickHouse](https://youtu.be/Yku9mmBYm_4?si=XIMu1jpYucCQEoXA) ã§æä¾›ã•ã‚Œã¦ã„る例ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ + +クエリ: + +```sql +CREATE TABLE salaries +( + `team` String, + `player` String, + `salary` UInt32, + `position` String +) +Engine = Memory; + +INSERT INTO salaries FORMAT Values + ('Port Elizabeth Barbarians', 'Gary Chen', 195000, 'F'), + ('New Coreystad Archdukes', 'Charles Juarez', 190000, 'F'), + ('Port Elizabeth Barbarians', 'Michael Stanley', 150000, 'D'), + ('New Coreystad Archdukes', 'Scott Harrison', 150000, 'D'), + ('Port Elizabeth Barbarians', 'Robert George', 195000, 'M'); +``` + +```sql +SELECT player, salary, + row_number() OVER (ORDER BY salary DESC) AS row_number +FROM salaries; +``` + +çµæžœ: + +```response + ┌─player──────────┬─salary─┬─row_number─┠+1. │ Gary Chen │ 195000 │ 1 │ +2. │ Robert George │ 195000 │ 2 │ +3. │ Charles Juarez │ 190000 │ 3 │ +4. │ Scott Harrison │ 150000 │ 4 │ +5. │ Michael Stanley │ 150000 │ 5 │ + └─────────────────┴────────┴────────────┘ +``` diff --git a/docs/ja/tools-and-utilities/static-files-disk-uploader.md b/docs/ja/tools-and-utilities/static-files-disk-uploader.md new file mode 100644 index 00000000000..1ee43da9ff3 --- /dev/null +++ b/docs/ja/tools-and-utilities/static-files-disk-uploader.md @@ -0,0 +1,82 @@ +--- +slug: /ja/operations/utilities/static-files-disk-uploader +title: clickhouse-static-files-disk-uploader +keywords: [clickhouse-static-files-disk-uploader, ユーティリティ, ディスク, アップローダー] +--- + +# clickhouse-static-files-disk-uploader + +指定ã•ã‚ŒãŸ ClickHouse テーブル用ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ‡ãƒ¼ã‚¿ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’出力ã—ã¾ã™ã€‚ã“ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯ã€`web` ディスクã«ã‚ˆã£ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•ã‚ŒãŸèª­ã¿å–り専用データセットをå«ã‚€ ClickHouse テーブルを異ãªã‚‹ã‚µãƒ¼ãƒãƒ¼ã§ä½œæˆã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +データã®ç§»è¡Œã«ã¯ã“ã®ãƒ„ールを使用ã—ãªã„ã§ãã ã•ã„。代ã‚ã‚Šã«ã€[`BACKUP` 㨠`RESTORE` コマンド](/docs/ja/operations/backup)を使用ã—ã¦ãã ã•ã„。 + +## 使用法 + +``` +$ clickhouse static-files-disk-uploader [args] +``` + +## コマンド + +|コマンド|説明| +|---|---| +|`-h`, `--help`|ヘルプ情報を表示| +|`--metadata-path [path]`|指定ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ‘ス| +|`--test-mode`|`test` モードを有効ã«ã—ã€ãƒ†ãƒ¼ãƒ–ルメタデータを指定ã•ã‚ŒãŸ URL ã« PUT リクエストã¨ã—ã¦é€ä¿¡| +|`--link`|ファイルをコピーã™ã‚‹ä»£ã‚ã‚Šã« symlink を作æˆ| +|`--url [url]`|`test` モード用ã®ã‚¦ã‚§ãƒ–サーãƒãƒ¼ URL| +|`--output-dir [dir]`|`non-test` モードã§ãƒ•ã‚¡ã‚¤ãƒ«ã‚’出力ã™ã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª| + +## 指定ã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒ‘スをå–å¾—ã™ã‚‹ + +`clickhouse-static-files-disk-uploader` を使用ã™ã‚‹éš›ã«ã¯ã€ç›®çš„ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒ‘スをå–å¾—ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +1. 目的ã®ãƒ†ãƒ¼ãƒ–ルã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’指定ã—ã¦ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ã¾ã™: + +
    + +```sql +SELECT data_paths + FROM system.tables + WHERE name = 'mytable' AND database = 'default'; +``` + +2. ã“ã‚Œã«ã‚ˆã‚Šã€æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¸ã®ãƒ‘スãŒè¿”ã•ã‚Œã¾ã™: + +
    + +``` +┌─data_paths────────────────────────────────────────────┠+│ ['./store/bcc/bccc1cfd-d43d-43cf-a5b6-1cda8178f1ee/'] │ +└───────────────────────────────────────────────────────┘ +``` + +## ローカルファイルシステムã«ãƒ†ãƒ¼ãƒ–ルメタデータディレクトリを出力ã™ã‚‹ + +ターゲット出力ディレクトリ `output` ã¨æŒ‡å®šã•ã‚ŒãŸãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒ‘スを使用ã—ã¦ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™: + +``` +$ clickhouse static-files-disk-uploader --output-dir output --metadata-path ./store/bcc/bccc1cfd-d43d-43cf-a5b6-1cda8178f1ee/ +``` + +æˆåŠŸã—ãŸå ´åˆã€æ¬¡ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚Œã€`output` ディレクトリã«æŒ‡å®šã•ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã¯ãšã§ã™: + +``` +Data path: "/Users/john/store/bcc/bccc1cfd-d43d-43cf-a5b6-1cda8178f1ee", destination path: "output" +``` + +## 外部 URL ã«ãƒ†ãƒ¼ãƒ–ルメタデータディレクトリを出力ã™ã‚‹ + +ã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’ローカルファイルシステムã«å‡ºåŠ›ã™ã‚‹å ´åˆã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ 追加㧠`--test-mode` フラグを使用ã—ã¾ã™ã€‚出力ディレクトリを指定ã™ã‚‹ä»£ã‚ã‚Šã«ã€`--url` フラグを介ã—ã¦ã‚¿ãƒ¼ã‚²ãƒƒãƒˆ URL を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +`test` モードãŒæœ‰åŠ¹ã«ãªã£ã¦ã„ã‚‹å ´åˆã€ãƒ†ãƒ¼ãƒ–ルメタデータディレクトリãŒæŒ‡å®šã•ã‚ŒãŸ URL ã« PUT リクエストã¨ã—ã¦ã‚¢ãƒƒãƒ—ロードã•ã‚Œã¾ã™ã€‚ + +``` +$ clickhouse static-files-disk-uploader --test-mode --url http://nginx:80/test1 --metadata-path ./store/bcc/bccc1cfd-d43d-43cf-a5b6-1cda8178f1ee/ +``` + +## テーブルメタデータディレクトリを使用ã—㦠ClickHouse テーブルを作æˆã™ã‚‹ + +テーブルメタデータディレクトリを手ã«å…¥ã‚ŒãŸã‚‰ã€ãれを使用ã—ã¦ç•°ãªã‚‹ã‚µãƒ¼ãƒãƒ¼ã§ ClickHouse テーブルを作æˆã§ãã¾ã™ã€‚ + +デモを示㙠[ã“ã® GitHub リãƒã‚¸ãƒˆãƒª](https://github.com/ClickHouse/web-tables-demo)ã‚’ã”覧ãã ã•ã„。例ã§ã¯ã€`web` ディスクを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ç•°ãªã‚‹ã‚µãƒ¼ãƒãƒ¼ä¸Šã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ãƒ†ãƒ¼ãƒ–ルをアタッãƒã—ã¾ã™ã€‚ diff --git a/docs/ja/tutorial.md b/docs/ja/tutorial.md new file mode 100644 index 00000000000..d957de8ea21 --- /dev/null +++ b/docs/ja/tutorial.md @@ -0,0 +1,495 @@ +--- +slug: /ja/tutorial +sidebar_label: 高度ãªãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ« +sidebar_position: 0.5 +keywords: [clickhouse, install, tutorial, dictionary, dictionaries] +--- +import SQLConsoleDetail from '@site/docs/ja/_snippets/_launch_sql_console.md'; + +# 高度ãªãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ« + +## ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã‹ã‚‰ä½•ã‚’期待ã§ãã¾ã™ã‹ï¼Ÿ + +ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆï¼ˆäºŒç™¾ä¸‡è¡Œã®[ニューヨークã®ã‚¿ã‚¯ã‚·ãƒ¼ãƒ‡ãƒ¼ã‚¿](/docs/ja/getting-started/example-datasets/nyc-taxi.md))を挿入ã—ã¾ã™ã€‚ãã®å¾Œã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã—ã€Dictionaryを作æˆã—ã¦JOINを実行ã™ã‚‹ä¾‹ã‚’å«ã‚ã¾ã™ã€‚ + +:::note +ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã¯ã€ç¨¼åƒä¸­ã®ClickHouseサービスã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ã‚‚ã—ãªã„å ´åˆã¯ã€[クイックスタート](./quick-start.mdx)ã‚’ã”覧ãã ã•ã„。 +::: + +## 1. æ–°ã—ã„テーブルを作æˆã™ã‚‹ + +ニューヨーク市ã®ã‚¿ã‚¯ã‚·ãƒ¼ãƒ‡ãƒ¼ã‚¿ã«ã¯ã€æ•°ç™¾ä¸‡ã®ã‚¿ã‚¯ã‚·ãƒ¼ä¹—車ã®è©³ç´°ãŒå«ã¾ã‚Œã¦ãŠã‚Šã€ä¹—車ã¨é™è»Šã®æ™‚é–“ã¨å ´æ‰€ã€æ–™é‡‘ã€ãƒãƒƒãƒ—ã®é‡‘é¡ã€é€šè¡Œæ–™ã€æ”¯æ‰•ã„方法ãªã©ãŒã‚«ãƒ©ãƒ ã¨ã—ã¦å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã—ょã†... + +1. SQLコンソールã«æŽ¥ç¶šã™ã‚‹ + + + + セルフマãƒãƒ¼ã‚¸ãƒ‰ã®ClickHouseを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€https://_hostname_:8443/playã§SQLコンソールã«æŽ¥ç¶šã§ãã¾ã™ï¼ˆè©³ç´°ã¯ClickHouse管ç†è€…ã«ãŠå•ã„åˆã‚ã›ãã ã•ã„)。 + +1. `default` データベースã«æ¬¡ã® `trips` テーブルを作æˆã—ã¾ã™: + ```sql + CREATE TABLE trips + ( + `trip_id` UInt32, + `vendor_id` Enum8('1' = 1, '2' = 2, '3' = 3, '4' = 4, 'CMT' = 5, 'VTS' = 6, 'DDS' = 7, 'B02512' = 10, 'B02598' = 11, 'B02617' = 12, 'B02682' = 13, 'B02764' = 14, '' = 15), + `pickup_date` Date, + `pickup_datetime` DateTime, + `dropoff_date` Date, + `dropoff_datetime` DateTime, + `store_and_fwd_flag` UInt8, + `rate_code_id` UInt8, + `pickup_longitude` Float64, + `pickup_latitude` Float64, + `dropoff_longitude` Float64, + `dropoff_latitude` Float64, + `passenger_count` UInt8, + `trip_distance` Float64, + `fare_amount` Float32, + `extra` Float32, + `mta_tax` Float32, + `tip_amount` Float32, + `tolls_amount` Float32, + `ehail_fee` Float32, + `improvement_surcharge` Float32, + `total_amount` Float32, + `payment_type` Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4), + `trip_type` UInt8, + `pickup` FixedString(25), + `dropoff` FixedString(25), + `cab_type` Enum8('yellow' = 1, 'green' = 2, 'uber' = 3), + `pickup_nyct2010_gid` Int8, + `pickup_ctlabel` Float32, + `pickup_borocode` Int8, + `pickup_ct2010` String, + `pickup_boroct2010` String, + `pickup_cdeligibil` String, + `pickup_ntacode` FixedString(4), + `pickup_ntaname` String, + `pickup_puma` UInt16, + `dropoff_nyct2010_gid` UInt8, + `dropoff_ctlabel` Float32, + `dropoff_borocode` UInt8, + `dropoff_ct2010` String, + `dropoff_boroct2010` String, + `dropoff_cdeligibil` String, + `dropoff_ntacode` FixedString(4), + `dropoff_ntaname` String, + `dropoff_puma` UInt16 + ) + ENGINE = MergeTree + PARTITION BY toYYYYMM(pickup_date) + ORDER BY pickup_datetime; + ``` + +## 2. データセットを挿入ã™ã‚‹ + +テーブルを作æˆã—ãŸã®ã§ã€NYCタクシーデータを追加ã—ã¾ã—ょã†ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯S3内ã®CSVファイルã«ã‚ã‚Šã€ãã“ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ロードã§ãã¾ã™ã€‚ + +1. 次ã®ã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã‚Šã€2ã¤ã®ç•°ãªã‚‹S3ファイル `trips_1.tsv.gz` 㨠`trips_2.tsv.gz` ã‹ã‚‰ `trips` テーブルã«ç´„2,000,000行を挿入ã—ã¾ã™: + ```sql + INSERT INTO trips + SELECT * FROM s3( + 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_{1..2}.gz', + 'TabSeparatedWithNames', " + `trip_id` UInt32, + `vendor_id` Enum8('1' = 1, '2' = 2, '3' = 3, '4' = 4, 'CMT' = 5, 'VTS' = 6, 'DDS' = 7, 'B02512' = 10, 'B02598' = 11, 'B02617' = 12, 'B02682' = 13, 'B02764' = 14, '' = 15), + `pickup_date` Date, + `pickup_datetime` DateTime, + `dropoff_date` Date, + `dropoff_datetime` DateTime, + `store_and_fwd_flag` UInt8, + `rate_code_id` UInt8, + `pickup_longitude` Float64, + `pickup_latitude` Float64, + `dropoff_longitude` Float64, + `dropoff_latitude` Float64, + `passenger_count` UInt8, + `trip_distance` Float64, + `fare_amount` Float32, + `extra` Float32, + `mta_tax` Float32, + `tip_amount` Float32, + `tolls_amount` Float32, + `ehail_fee` Float32, + `improvement_surcharge` Float32, + `total_amount` Float32, + `payment_type` Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4), + `trip_type` UInt8, + `pickup` FixedString(25), + `dropoff` FixedString(25), + `cab_type` Enum8('yellow' = 1, 'green' = 2, 'uber' = 3), + `pickup_nyct2010_gid` Int8, + `pickup_ctlabel` Float32, + `pickup_borocode` Int8, + `pickup_ct2010` String, + `pickup_boroct2010` String, + `pickup_cdeligibil` String, + `pickup_ntacode` FixedString(4), + `pickup_ntaname` String, + `pickup_puma` UInt16, + `dropoff_nyct2010_gid` UInt8, + `dropoff_ctlabel` Float32, + `dropoff_borocode` UInt8, + `dropoff_ct2010` String, + `dropoff_boroct2010` String, + `dropoff_cdeligibil` String, + `dropoff_ntacode` FixedString(4), + `dropoff_ntaname` String, + `dropoff_puma` UInt16 + ") SETTINGS input_format_try_infer_datetimes = 0 + ``` + +2. `INSERT` ãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ã¡ã¾ã™ã€‚150 MBã®ãƒ‡ãƒ¼ã‚¿ãŒãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã®ã«å°‘ã—時間ãŒã‹ã‹ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + + :::note + `s3` 関数ã¯ãƒ‡ãƒ¼ã‚¿ã‚’自動的ã«è§£å‡ã™ã‚‹æ–¹æ³•ã‚’知ã£ã¦ãŠã‚Šã€`TabSeparatedWithNames` フォーマットã¯ãƒ‡ãƒ¼ã‚¿ãŒã‚¿ãƒ–区切りã§ã‚ã‚Šã€å„ファイルã®ãƒ˜ãƒƒãƒ€ãƒ¼è¡Œã‚’スキップã™ã‚‹ã‚ˆã†ClickHouseã«æŒ‡ç¤ºã—ã¾ã™ã€‚ + ::: + +3. 挿入ãŒçµ‚了ã—ãŸã‚‰ã€ãã‚ŒãŒæ­£å¸¸ã«å‹•ä½œã—ãŸã‹ç¢ºèªã—ã¦ãã ã•ã„: + ```sql + SELECT count() FROM trips + ``` + + ç´„2M行(厳密ã«ã¯1,999,657行)を見るã“ã¨ãŒã§ãã‚‹ã¯ãšã§ã™ã€‚ + + :::note + ClickHouseãŒã‚«ã‚¦ãƒ³ãƒˆã‚’決定ã™ã‚‹ãŸã‚ã«å‡¦ç†ã—ãªã‘ã‚Œã°ãªã‚‰ãªã‹ã£ãŸè¡Œæ•°ã¨ã€ã©ã‚Œã»ã©è¿…速ã§ã‚ã‚‹ã‹æ³¨æ„ã—ã¦ãã ã•ã„。ã‚ãšã‹0.001秒ã§6è¡Œã ã‘処ç†ã—ã¦ã‚«ã‚¦ãƒ³ãƒˆã‚’å–å¾—ã§ãã¾ã™ã€‚(ãã®6ã¯ã€`trips` テーブルãŒç¾åœ¨æŒã¤ **パーツ** ã®æ•°ã§ã‚ã‚Šã€ãƒ‘ーツã¯è‡ªèº«ã®è¡Œæ•°ã‚’知ã£ã¦ã„ã¾ã™ã€‚) + ::: + +4. ã™ã¹ã¦ã®è¡Œã‚’クロールã™ã‚‹å¿…è¦ãŒã‚るクエリを実行ã™ã‚‹ã¨ã€å‡¦ç†ã™ã‚‹è¡Œæ•°ãŒå¤§å¹…ã«å¢—加ã™ã‚‹ã“ã¨ã«æ°—付ãã§ã—ょã†ãŒã€å®Ÿè¡Œæ™‚é–“ã¯ä¾ç„¶ã¨ã—ã¦éžå¸¸ã«é€Ÿã„ã¾ã¾ã§ã™: + ```sql + SELECT DISTINCT(pickup_ntaname) FROM trips + ``` + + ã“ã®ã‚¯ã‚¨ãƒªã¯2M行を処ç†ã—ã€190ã®å€¤ã‚’è¿”ã™å¿…è¦ãŒã‚ã‚Šã¾ã™ãŒã€ç´„1秒ã§ãれを行ã„ã¾ã™ã€‚`pickup_ntaname` カラムã¯ã€ã‚¿ã‚¯ã‚·ãƒ¼ä¹—車ãŒå§‹ã¾ã£ãŸãƒ‹ãƒ¥ãƒ¼ãƒ¨ãƒ¼ã‚¯å¸‚ã®åœ°åŸŸã®åå‰ã‚’表ã—ã¾ã™ã€‚ + +## 3. データを分æžã™ã‚‹ + +2Mè¡Œã®ãƒ‡ãƒ¼ã‚¿ã‚’分æžã™ã‚‹ã‚¯ã‚¨ãƒªã‚’ã„ãã¤ã‹å®Ÿè¡Œã—ã¦ã¿ã¾ã—ょã†... + +1. ã¾ãšã€å¹³å‡ãƒãƒƒãƒ—é¡ã‚’計算ã™ã‚‹ã‚ˆã†ãªç°¡å˜ãªè¨ˆç®—ã‹ã‚‰å§‹ã‚ã¾ã™: + ```sql + SELECT round(avg(tip_amount), 2) FROM trips + ``` + + 応答ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + ```response + ┌─round(avg(tip_amount), 2)─┠+ │ 1.68 │ + └───────────────────────────┘ + ``` + +2. 次ã®ã‚¯ã‚¨ãƒªã¯ã€ä¹—客数ã«åŸºã¥ã„ãŸå¹³å‡è²»ç”¨ã‚’計算ã—ã¾ã™: + ```sql + SELECT + passenger_count, + ceil(avg(total_amount),2) AS average_total_amount + FROM trips + GROUP BY passenger_count + ``` + + `passenger_count` ã®ç¯„囲ã¯0ã‹ã‚‰9ã¾ã§ã§ã™: + ```response + ┌─passenger_count─┬─average_total_amount─┠+ │ 0 │ 22.69 │ + │ 1 │ 15.97 │ + │ 2 │ 17.15 │ + │ 3 │ 16.76 │ + │ 4 │ 17.33 │ + │ 5 │ 16.35 │ + │ 6 │ 16.04 │ + │ 7 │ 59.8 │ + │ 8 │ 36.41 │ + │ 9 │ 9.81 │ + └─────────────────┴──────────────────────┘ + ``` + +3. ã“ã“ã§ã¯ã€åœ°åŸŸã”ã¨ã®æ—¥æ¬¡ä¹—車数を計算ã™ã‚‹ã‚¯ã‚¨ãƒªãŒã‚ã‚Šã¾ã™: + ```sql + SELECT + pickup_date, + pickup_ntaname, + SUM(1) AS number_of_trips + FROM trips + GROUP BY pickup_date, pickup_ntaname + ORDER BY pickup_date ASC + ``` + + çµæžœã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + ```response + ┌─pickup_date─┬─pickup_ntaname───────────────────────────────────────────┬─number_of_trips─┠+ │ 2015-07-01 │ Brooklyn Heights-Cobble Hill │ 13 │ + │ 2015-07-01 │ Old Astoria │ 5 │ + │ 2015-07-01 │ Flushing │ 1 │ + │ 2015-07-01 │ Yorkville │ 378 │ + │ 2015-07-01 │ Gramercy │ 344 │ + │ 2015-07-01 │ Fordham South │ 2 │ + │ 2015-07-01 │ SoHo-TriBeCa-Civic Center-Little Italy │ 621 │ + │ 2015-07-01 │ Park Slope-Gowanus │ 29 │ + │ 2015-07-01 │ Bushwick South │ 5 │ + ``` + +4. ã“ã®ã‚¯ã‚¨ãƒªã¯ã€æ—…行時間を計算ã—ã€ãã®å€¤ã§çµæžœã‚’グループ化ã—ã¾ã™: + ```sql + SELECT + avg(tip_amount) AS avg_tip, + avg(fare_amount) AS avg_fare, + avg(passenger_count) AS avg_passenger, + count() AS count, + truncate(date_diff('second', pickup_datetime, dropoff_datetime)/60) as trip_minutes + FROM trips + WHERE trip_minutes > 0 + GROUP BY trip_minutes + ORDER BY trip_minutes DESC + ``` + + çµæžœã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + ```response + ┌──────────────avg_tip─┬───────────avg_fare─┬──────avg_passenger─┬──count─┬─trip_minutes─┠+ │ 1.9600000381469727 │ 8 │ 1 │ 1 │ 27511 │ + │ 0 │ 12 │ 2 │ 1 │ 27500 │ + │ 0.542166673981895 │ 19.716666666666665 │ 1.9166666666666667 │ 60 │ 1439 │ + │ 0.902499997522682 │ 11.270625001192093 │ 1.95625 │ 160 │ 1438 │ + │ 0.9715789457909146 │ 13.646616541353383 │ 2.0526315789473686 │ 133 │ 1437 │ + │ 0.9682692398245518 │ 14.134615384615385 │ 2.076923076923077 │ 104 │ 1436 │ + │ 1.1022105210705808 │ 13.778947368421052 │ 2.042105263157895 │ 95 │ 1435 │ + ``` + +5. ã“ã®ã‚¯ã‚¨ãƒªã¯å„時間帯ã®åœ°åŸŸã”ã¨ã®ä¹—車数を表示ã—ã¾ã™: + ```sql + SELECT + pickup_ntaname, + toHour(pickup_datetime) as pickup_hour, + SUM(1) AS pickups + FROM trips + WHERE pickup_ntaname != '' + GROUP BY pickup_ntaname, pickup_hour + ORDER BY pickup_ntaname, pickup_hour + ``` + + çµæžœã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + ```response + ┌─pickup_ntaname───────────────────────────────────────────┬─pickup_hour─┬─pickups─┠+ │ Airport │ 0 │ 3509 │ + │ Airport │ 1 │ 1184 │ + │ Airport │ 2 │ 401 │ + │ Airport │ 3 │ 152 │ + │ Airport │ 4 │ 213 │ + │ Airport │ 5 │ 955 │ + │ Airport │ 6 │ 2161 │ + │ Airport │ 7 │ 3013 │ + │ Airport │ 8 │ 3601 │ + │ Airport │ 9 │ 3792 │ + │ Airport │ 10 │ 4546 │ + │ Airport │ 11 │ 4659 │ + │ Airport │ 12 │ 4621 │ + │ Airport │ 13 │ 5348 │ + │ Airport │ 14 │ 5889 │ + │ Airport │ 15 │ 6505 │ + │ Airport │ 16 │ 6119 │ + │ Airport │ 17 │ 6341 │ + │ Airport │ 18 │ 6173 │ + │ Airport │ 19 │ 6329 │ + │ Airport │ 20 │ 6271 │ + │ Airport │ 21 │ 6649 │ + │ Airport │ 22 │ 6356 │ + │ Airport │ 23 │ 6016 │ + │ Allerton-Pelham Gardens │ 4 │ 1 │ + │ Allerton-Pelham Gardens │ 6 │ 1 │ + │ Allerton-Pelham Gardens │ 7 │ 1 │ + │ Allerton-Pelham Gardens │ 9 │ 5 │ + │ Allerton-Pelham Gardens │ 10 │ 3 │ + │ Allerton-Pelham Gardens │ 15 │ 1 │ + │ Allerton-Pelham Gardens │ 20 │ 2 │ + │ Allerton-Pelham Gardens │ 23 │ 1 │ + │ Annadale-Huguenot-Prince's Bay-Eltingville │ 23 │ 1 │ + │ Arden Heights │ 11 │ 1 │ + ``` + +6. ラガーディア(LGA)ã¾ãŸã¯JFK空港ã¸ã®ç§»å‹•ã‚’見ã¦ã¿ã¾ã—ょã†: + ```sql + SELECT + pickup_datetime, + dropoff_datetime, + total_amount, + pickup_nyct2010_gid, + dropoff_nyct2010_gid, + CASE + WHEN dropoff_nyct2010_gid = 138 THEN 'LGA' + WHEN dropoff_nyct2010_gid = 132 THEN 'JFK' + END AS airport_code, + EXTRACT(YEAR FROM pickup_datetime) AS year, + EXTRACT(DAY FROM pickup_datetime) AS day, + EXTRACT(HOUR FROM pickup_datetime) AS hour + FROM trips + WHERE dropoff_nyct2010_gid IN (132, 138) + ORDER BY pickup_datetime + ``` + + 応答ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + ```response + ┌─────pickup_datetime─┬────dropoff_datetime─┬─total_amount─┬─pickup_nyct2010_gid─┬─dropoff_nyct2010_gid─┬─airport_code─┬─year─┬─day─┬─hour─┠+ │ 2015-07-01 00:04:14 │ 2015-07-01 00:15:29 │ 13.3 │ -34 │ 132 │ JFK │ 2015 │ 1 │ 0 │ + │ 2015-07-01 00:09:42 │ 2015-07-01 00:12:55 │ 6.8 │ 50 │ 138 │ LGA │ 2015 │ 1 │ 0 │ + │ 2015-07-01 00:23:04 │ 2015-07-01 00:24:39 │ 4.8 │ -125 │ 132 │ JFK │ 2015 │ 1 │ 0 │ + │ 2015-07-01 00:27:51 │ 2015-07-01 00:39:02 │ 14.72 │ -101 │ 138 │ LGA │ 2015 │ 1 │ 0 │ + │ 2015-07-01 00:32:03 │ 2015-07-01 00:55:39 │ 39.34 │ 48 │ 138 │ LGA │ 2015 │ 1 │ 0 │ + │ 2015-07-01 00:34:12 │ 2015-07-01 00:40:48 │ 9.95 │ -93 │ 132 │ JFK │ 2015 │ 1 │ 0 │ + │ 2015-07-01 00:38:26 │ 2015-07-01 00:49:00 │ 13.3 │ -11 │ 138 │ LGA │ 2015 │ 1 │ 0 │ + │ 2015-07-01 00:41:48 │ 2015-07-01 00:44:45 │ 6.3 │ -94 │ 132 │ JFK │ 2015 │ 1 │ 0 │ + │ 2015-07-01 01:06:18 │ 2015-07-01 01:14:43 │ 11.76 │ 37 │ 132 │ JFK │ 2015 │ 1 │ 1 │ + ``` + +## 4. Dictionaryを作æˆã™ã‚‹ + +ClickHouseåˆå¿ƒè€…ã®æ–¹ã¯ã€***Dictionary***ã®å‹•ä½œã‚’ç†è§£ã™ã‚‹ã“ã¨ãŒé‡è¦ã§ã™ã€‚Dictionaryを考ãˆã‚‹ã‚·ãƒ³ãƒ—ルãªæ–¹æ³•ã¯ã€ãƒ¡ãƒ¢ãƒªå†…ã«æ ¼ç´ã•ã‚ŒãŸã‚­ãƒ¼->値ã®ãƒšã‚¢ã®ãƒžãƒƒãƒ”ングã§ã™ã€‚詳細やDictionaryã®ã™ã¹ã¦ã®ã‚ªãƒ—ションã¯ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã®æœ€å¾Œã«ãƒªãƒ³ã‚¯ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +1. ClickHouseサービス内ã®ãƒ†ãƒ¼ãƒ–ルã«é–¢é€£ä»˜ã‘られãŸDictionaryを作æˆã™ã‚‹æ–¹æ³•ã‚’見ã¦ã¿ã¾ã—ょã†ã€‚表ã¨ãã®Dictionaryã¯ã€NYCã®å„地域を示ã™265è¡Œã®CSVファイルã«åŸºã¥ãã¾ã™ã€‚ã“れらã®åœ°åŸŸã¯ãƒ‹ãƒ¥ãƒ¼ãƒ¨ãƒ¼ã‚¯å¸‚ã®å„行政区ã®åå‰ã«ãƒžãƒƒãƒ”ングã•ã‚Œã¦ãŠã‚Šï¼ˆãƒ‹ãƒ¥ãƒ¼ãƒ¨ãƒ¼ã‚¯å¸‚ã«ã¯5ã¤ã®è¡Œæ”¿åŒºãŒã‚ã‚Šã¾ã™ï¼šãƒ–ロンクスã€ãƒ–ルックリンã€ãƒžãƒ³ãƒãƒƒã‚¿ãƒ³ã€ã‚¯ã‚¤ãƒ¼ãƒ³ã‚ºã€ã‚¹ã‚¿ãƒ†ãƒ³ã‚¢ã‚¤ãƒ©ãƒ³ãƒ‰ï¼‰ã€ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ãƒ‹ãƒ¥ãƒ¼ã‚¢ãƒ¼ã‚¯ç©ºæ¸¯ï¼ˆEWR)も1ã¤ã®è¡Œæ”¿åŒºã¨ã—ã¦æ•°ãˆã¾ã™ã€‚ + + ã“ã‚Œã¯CSVファイルã®ä¸€éƒ¨ã§ã™ï¼ˆæ˜Žç¢ºã«ã™ã‚‹ãŸã‚ã«è¡¨ã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼‰ã€‚ファイル内ã®`LocationID` カラムã¯ã€`trips` テーブル内ã®`pickup_nyct2010_gid` 㨠`dropoff_nyct2010_gid` カラムã«ãƒžãƒƒãƒ”ングã•ã‚Œã¾ã™: + + | LocationID | Borough | Zone | service_zone | + | ----------- | -------------- | ------------------------ | ----------- | + | 1 | EWR | Newark Airport | EWR | + | 2 | Queens | Jamaica Bay | Boro Zone | + | 3 | Bronx | Allerton/Pelham Gardens | Boro Zone | + | 4 | Manhattan | Alphabet City | Yellow Zone | + | 5 | Staten Island | Arden Heights | Boro Zone | + +2. ファイルã®URL㯠`https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/taxi_zone_lookup.csv` ã§ã™ã€‚次ã®SQLを実行ã—ã¦ãã ã•ã„ã€ã“ã‚Œã¯`taxi_zone_dictionary`ã¨ã„ã†åã®Dictionaryを作æˆã—ã€S3ã®CSVファイルã‹ã‚‰Dictionaryを読ã¿è¾¼ã¿ã¾ã™: + ```sql + CREATE DICTIONARY taxi_zone_dictionary + ( + `LocationID` UInt16 DEFAULT 0, + `Borough` String, + `Zone` String, + `service_zone` String + ) + PRIMARY KEY LocationID + SOURCE(HTTP(URL 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/taxi_zone_lookup.csv' FORMAT 'CSVWithNames')) + LIFETIME(MIN 0 MAX 0) + LAYOUT(HASHED_ARRAY()) + ``` + + :::note + `LIFETIME`ã‚’0ã«è¨­å®šã™ã‚‹ã“ã¨ã§ã€Dictionaryã¯ã‚½ãƒ¼ã‚¹ã¨ã¨ã‚‚ã«æ›´æ–°ã•ã‚Œã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã“ã§ã¯ä¸è¦ãªãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚’S3ãƒã‚±ãƒƒãƒˆã«é€ã‚‰ãªã„よã†ã«ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ãŒã€ä¸€èˆ¬çš„ã«ã¯ä»»æ„ã®Lifetime値を指定ã§ãã¾ã™ã€‚ + + 例ãˆã°: + + ```sql + LIFETIME(MIN 1 MAX 10) + ``` + ã¨è¨­å®šã™ã‚‹ã¨ã€è¾žæ›¸ã¯1秒ã‹ã‚‰10秒ã®é–“ã®ãƒ©ãƒ³ãƒ€ãƒ ãªæ™‚間後ã«æ›´æ–°ã•ã‚Œã¾ã™ã€‚(ランダムãªæ™‚é–“ã¯ã€å¤šæ•°ã®ã‚µãƒ¼ãƒãƒ¼ã§ã®æ›´æ–°æ™‚ã«è¾žæ›¸ã‚½ãƒ¼ã‚¹ã¸ã®è² è·ã‚’分散ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚) + ::: + +3. 正常ã«å‹•ä½œã—ãŸäº‹ã‚’確èªã—ã¦ãã ã•ã„ - ã‚ãªãŸã¯265行(å„地域ã”ã¨ã«1行)をå–å¾—ã—ã¾ã™: + ```sql + SELECT * FROM taxi_zone_dictionary + ``` + +4. `dictGet`関数(ãŠã‚ˆã³ãã®[ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³](./sql-reference/functions/ext-dict-functions.md))を使用ã—ã¦Dictionaryã‹ã‚‰å€¤ã‚’å–å¾—ã—ã¾ã™ã€‚辞書ã®åå‰ã€å–å¾—ã—ãŸã„値ã€ãŠã‚ˆã³ã‚­ãƒ¼ï¼ˆã“ã®ä¾‹ã§ã¯`taxi_zone_dictionary`ã®`LocationID`カラム)を渡ã—ã¾ã™ã€‚ + + 例ãˆã°ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã¯ã€`LocationID`ãŒ132ã§ã‚ã‚‹`Borough`ã‚’è¿”ã—ã¾ã™ï¼ˆã“ã‚Œã¯ä¸Šã§è¦‹ãŸã‚ˆã†ã«JFK空港ã§ã™ï¼‰: + ```sql + SELECT dictGet('taxi_zone_dictionary', 'Borough', 132) + ``` + + JFKã¯ã‚¯ã‚¤ãƒ¼ãƒ³ã‚ºã«ã‚ã‚Šã€å€¤ã‚’å–å¾—ã™ã‚‹æ™‚é–“ã¯æœ¬è³ªçš„ã«0ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„: + ```response + ┌─dictGet('taxi_zone_dictionary', 'Borough', 132)─┠+ │ Queens │ + └─────────────────────────────────────────────────┘ + + 1 rows in set. Elapsed: 0.004 sec. + ``` + +5. `dictHas`関数を使用ã—ã¦Dictionaryã«ã‚­ãƒ¼ãŒå­˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã¯1ã‚’è¿”ã—ã¾ã™ï¼ˆã“ã‚Œã¯ClickHouseã§ã®"true"ã«ç›¸å½“ã—ã¾ã™ï¼‰: + ```sql + SELECT dictHas('taxi_zone_dictionary', 132) + ``` + +6. 次ã®ã‚¯ã‚¨ãƒªã¯ã€è¾žæ›¸ã«`LocationID`ã®å€¤4567ãŒãªã„ãŸã‚ã€0ã‚’è¿”ã—ã¾ã™: + ```sql + SELECT dictHas('taxi_zone_dictionary', 4567) + ``` + +7. クエリã§è¾žæ›¸ã®å称をå–å¾—ã™ã‚‹ãŸã‚ã«`dictGet`関数を使用ã—ã¾ã™ã€‚例ãˆã°: + ```sql + SELECT + count(1) AS total, + dictGetOrDefault('taxi_zone_dictionary','Borough', toUInt64(pickup_nyct2010_gid), 'Unknown') AS borough_name + FROM trips + WHERE dropoff_nyct2010_gid = 132 OR dropoff_nyct2010_gid = 138 + GROUP BY borough_name + ORDER BY total DESC + ``` + + ã“ã®ã‚¯ã‚¨ãƒªã¯ã€ãƒ©ã‚¬ãƒ¼ãƒ‡ã‚£ã‚¢ã¾ãŸã¯JFK空港ã§çµ‚ã‚るタクシー乗車ã®åŒºåˆ†ã‚’åˆè¨ˆã—ã¾ã™ã€‚çµæžœã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã€å‡ºç™ºåœ°åŸŸãŒä¸æ˜Žãªãƒˆãƒªãƒƒãƒ—ãŒã‹ãªã‚Šã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„: + ```response + ┌─total─┬─borough_name──┠+ │ 23683 │ Unknown │ + │ 7053 │ Manhattan │ + │ 6828 │ Brooklyn │ + │ 4458 │ Queens │ + │ 2670 │ Bronx │ + │ 554 │ Staten Island │ + │ 53 │ EWR │ + └───────┴───────────────┘ + + 7 rows in set. Elapsed: 0.019 sec. Processed 2.00 million rows, 4.00 MB (105.70 million rows/s., 211.40 MB/s.) + ``` + +## 5. Joinを実行ã™ã‚‹ + +ãã‚Œã§ã¯ã€`taxi_zone_dictionary`ã¨`trips`テーブルをçµåˆã™ã‚‹ã‚¯ã‚¨ãƒªã‚’何本ã‹æ›¸ã„ã¦ã¿ã¾ã—ょã†ã€‚ + +1. å˜ç´”ãª`JOIN`ã‹ã‚‰å§‹ã‚ã¾ã—ょã†ã€‚ã“ã‚Œã¯å‰è¿°ã®ç©ºæ¸¯ã‚¯ã‚¨ãƒªã¨ä¼¼ã¦ã„ã¾ã™: + ```sql + SELECT + count(1) AS total, + Borough + FROM trips + JOIN taxi_zone_dictionary ON toUInt64(trips.pickup_nyct2010_gid) = taxi_zone_dictionary.LocationID + WHERE dropoff_nyct2010_gid = 132 OR dropoff_nyct2010_gid = 138 + GROUP BY Borough + ORDER BY total DESC + ``` + + 応答ã¯ãŠãªã˜ã¿ã®ã‚‚ã®ã§ã™: + ```response + ┌─total─┬─Borough───────┠+ │ 7053 │ Manhattan │ + │ 6828 │ Brooklyn │ + │ 4458 │ Queens │ + │ 2670 │ Bronx │ + │ 554 │ Staten Island │ + │ 53 │ EWR │ + └───────┴───────────────┘ + + 6 rows in set. Elapsed: 0.034 sec. Processed 2.00 million rows, 4.00 MB (59.14 million rows/s., 118.29 MB/s.) + ``` + + :::note + 上記ã®`JOIN`クエリã®å‡ºåŠ›ã¯ã€å‰è¿°ã®`dictGetOrDefault`を使用ã—ãŸã‚¯ã‚¨ãƒªã¨åŒã˜ã§ã™ï¼ˆ`Unknown`値ãŒå«ã¾ã‚Œã¦ã„ãªã„ã“ã¨ã‚’除ã„ã¦ï¼‰ã€‚è£ã§ã¯ã€ClickHouseã¯å®Ÿéš›ã«`taxi_zone_dictionary`辞書ã«å¯¾ã—ã¦`dictGet`関数を呼ã³å‡ºã—ã¦ã„ã¾ã™ãŒã€`JOIN`構文ã¯SQL開発者ã«ã¨ã£ã¦ã‚ˆã‚Šè¦ªã—ã¿ã‚„ã™ã„ã‚‚ã®ã§ã™ã€‚ + ::: + +2. ClickHouseã§ã¯`SELECT *`ã‚’ã‚ã¾ã‚Šä½¿ç”¨ã—ã¾ã›ã‚“ - å¿…è¦ãªã‚«ãƒ©ãƒ ã®ã¿ã‚’å–å¾—ã™ã¹ãã§ã™ï¼ã—ã‹ã—ã€é•·æ™‚間実行ã•ã‚Œã‚‹ã‚¯ã‚¨ãƒªã‚’見ã¤ã‘ã‚‹ã®ã¯å›°é›£ãªã®ã§ã€ã“ã®ã‚¯ã‚¨ãƒªã¯ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’é¸æŠžã—ã€ã™ã¹ã¦ã®è¡Œã‚’è¿”ã™ï¼ˆãŸã ã—デフォルトã§å¿œç­”ã«ã¯æœ€å¤§10,000è¡Œã®åˆ¶é™ãŒã‚ã‚Šã¾ã™ï¼‰ã€ã•ã‚‰ã«ã™ã¹ã¦ã®è¡Œã‚’辞書ã¨å³çµåˆã™ã‚‹ã“ã¨ã‚’æ„図的ã«è¡Œã„ã¾ã™: + ```sql + SELECT * + FROM trips + JOIN taxi_zone_dictionary + ON trips.dropoff_nyct2010_gid = taxi_zone_dictionary.LocationID + WHERE tip_amount > 0 + ORDER BY tip_amount DESC + LIMIT 1000 + ``` + +#### ãŠã‚ã§ã¨ã†ã”ã–ã„ã¾ã™ï¼ + +ãŠç–²ã‚Œæ§˜ã§ã—ãŸï¼ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã‚’無事ã«å®Œäº†ã—ã€ClickHouseã®ä½¿ã„æ–¹ã«ã¤ã„ã¦ã®ç†è§£ãŒæ·±ã¾ã£ãŸã“ã¨ã‚’願ã£ã¦ã„ã¾ã™ã€‚次ã«ä½•ã‚’ã™ã‚‹ã‹ã®ã‚ªãƒ—ションã¯ã“ã¡ã‚‰ã§ã™ï¼š + +- [ClickHouseã®ä¸»ã‚­ãƒ¼ã®å‹•ä½œã«ã¤ã„ã¦](./guides/best-practices/sparse-primary-indexes.md)読む - ã“ã‚Œã¯ClickHouseã®ã‚¨ã‚­ã‚¹ãƒ‘ートã«ãªã‚‹æ—…ã«å¤§ã„ã«å½¹ç«‹ã¡ã¾ã™ +- ファイルã€Kafkaã€PostgreSQLã€ãƒ‡ãƒ¼ã‚¿ãƒ‘イプラインã€ãã®ä»–多ãã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¨ã„ã£ãŸ[外部データソースを統åˆã™ã‚‹](/docs/ja/integrations/index.mdx) +- [ãŠæ°—ã«å…¥ã‚Šã®UI/BIツール](./integrations/data-visualization.md)ã‚’ClickHouseã«æŽ¥ç¶šã™ã‚‹ +- [SQLリファレンス](./sql-reference/index.md)を確èªã—ã€ã•ã¾ã–ã¾ãªé–¢æ•°ã‚’å‚ç…§ã™ã‚‹ã“ã¨ã€‚ClickHouseã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›ã€å‡¦ç†ã€åˆ†æžã®ãŸã‚ã®ç´ æ™´ã‚‰ã—ã„コレクションãŒã‚ã‚Šã¾ã™ +- [Dictionaries](/docs/ja/sql-reference/dictionaries/index.md)ã«ã¤ã„ã¦ã•ã‚‰ã«å­¦ã¶ diff --git a/docs/ja/use-cases/observability/demo-application.md b/docs/ja/use-cases/observability/demo-application.md new file mode 100644 index 00000000000..cf78422da45 --- /dev/null +++ b/docs/ja/use-cases/observability/demo-application.md @@ -0,0 +1,8 @@ +--- +title: デモアプリケーション +description: 観測性ã®ãŸã‚ã®ãƒ‡ãƒ¢ã‚¢ãƒ—リケーション +slug: /ja/observability/demo-application +keywords: [観測性, ログ, トレース, メトリクス, OpenTelemetry, Grafana, otel] +--- + +Open Telemetry プロジェクトã«ã¯ã€[デモアプリケーション](https://opentelemetry.io/docs/demo/)ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ã‚¢ãƒ—リケーションã®ãƒ•ã‚©ãƒ¼ã‚¯ç‰ˆã§ã€ClickHouse をログã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¨ã—ã¦æ´»ç”¨ã—ã¦ã„ã‚‹ã‚‚ã®ãŒ[ã“ã¡ã‚‰](https://github.com/ClickHouse/opentelemetry-demo)ã«ã‚ã‚Šã¾ã™ã€‚å…¬å¼ã®[デモ手順](https://opentelemetry.io/docs/demo/docker-deployment/)ã«å¾“ã£ã¦ã€ã“ã®ãƒ‡ãƒ¢ã‚’ Docker ã§ãƒ‡ãƒ—ロイã§ãã¾ã™ã€‚既存ã®[コンãƒãƒ¼ãƒãƒ³ãƒˆ](https://opentelemetry.io/docs/demo/collector-data-flow-dashboard/)ã«åŠ ãˆã¦ã€ClickHouse ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒãƒ‡ãƒ—ロイã•ã‚Œã€ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã¨ã—ã¦ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ diff --git a/docs/ja/use-cases/observability/grafana.md b/docs/ja/use-cases/observability/grafana.md new file mode 100644 index 00000000000..3eba84fc232 --- /dev/null +++ b/docs/ja/use-cases/observability/grafana.md @@ -0,0 +1,241 @@ +--- +title: Grafanaã®ä½¿ç”¨ +description: Grafanaã¨ClickHouseを使用ã—ãŸã‚ªãƒ–ザーãƒãƒ“リティ +slug: /ja/observability/grafana +keywords: [observability, logs, traces, metrics, OpenTelemetry, Grafana, otel] +--- + +# Grafanaã¨ClickHouseを使用ã—ãŸã‚ªãƒ–ザーãƒãƒ“リティ + +Grafanaã¯ã€ClickHouseã«ãŠã‘るオブザーãƒãƒ“リティデータã®è¦–覚化ツールã¨ã—ã¦æŽ¨å¥¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€Grafana用ã®å…¬å¼ClickHouseプラグインを使用ã—ã¦å®Ÿç¾ã—ã¾ã™ã€‚インストール手順ã¯[ã“ã¡ã‚‰](/ja/integrations/grafana)ã§å‚ç…§ã§ãã¾ã™ã€‚ + +プラグインã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³4ã§ã¯ã€ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ãŒæ–°ã—ã„クエリビルダーエクスペリエンスã«ãŠã„ã¦ç¬¬ä¸€ç´šã®å­˜åœ¨ã¨ãªã£ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€SREãŒSQLクエリを書ã‹ãšã«æ¸ˆã‚€ç’°å¢ƒã‚’æä¾›ã—ã€SQLベースã®ã‚ªãƒ–ザーãƒãƒ“リティを簡素化ã—ã€ã“ã®æ–°ã—ã„パラダイムを推進ã—ã¾ã™ã€‚ã“ã®ä¸€ç’°ã¨ã—ã¦ã€Open Telemetry (OTel) をプラグインã®ä¸­æ ¸ã«æ®ãˆã€ä»Šå¾Œæ•°å¹´é–“ã®SQLベースã®ã‚ªãƒ–ザーãƒãƒ“リティã®åŸºç›¤ã«ãªã‚‹ã¨è€ƒãˆã¦ã„ã¾ã™ã€‚ + +## Open Telemetryçµ±åˆ + +Grafanaã§Clickhouseデータソースを設定ã™ã‚‹éš›ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ­ã‚°ãŠã‚ˆã³ãƒˆãƒ¬ãƒ¼ã‚¹ç”¨ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルを指定ã—ã€ã“れらã®ãƒ†ãƒ¼ãƒ–ルãŒOTelスキーマã«æº–æ‹ ã—ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’指定ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ—ラグインã¯Grafanaã§ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’正確ã«è¡¨ç¤ºã™ã‚‹ãŸã‚ã®ã‚«ãƒ©ãƒ ã‚’è¿”ã—ã¾ã™ã€‚デフォルトã®OTelスキーマを変更ã—ã¦ç‹¬è‡ªã®ã‚«ãƒ©ãƒ åを使用ã™ã‚‹å ´åˆã¯ã€ã“れらを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚時刻(Timestamp)ã€ãƒ­ã‚°ãƒ¬ãƒ™ãƒ«ï¼ˆSeverityText)ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æœ¬æ–‡ï¼ˆBody)ãªã©ã®ã‚«ãƒ©ãƒ åをデフォルトã®OTelカラムåã®ã¾ã¾ã§ä½¿ç”¨ã™ã‚‹å ´åˆã€å¤‰æ›´ã¯ä¸è¦ã§ã™ã€‚ + +> ユーザーã¯ã€HTTPã¾ãŸã¯ãƒã‚¤ãƒ†ã‚£ãƒ–プロトコルを使用ã—ã¦Grafanaã‚’ClickHouseã«æŽ¥ç¶šã§ãã¾ã™ã€‚後者ã¯ã€GrafanaユーザーãŒç™ºè¡Œã™ã‚‹é›†ç´„クエリã§é¡•è‘—ãªæ€§èƒ½å‘上をæä¾›ã™ã‚‹ã“ã¨ã¯ã»ã¨ã‚“ã©ã‚ã‚Šã¾ã›ã‚“ãŒã€HTTPプロトコルã¯é€šå¸¸ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¨ã£ã¦ãƒ—ロキシや内çœãŒç°¡å˜ã§ã™ã€‚ + +ログ設定ã«ã¯ã€ãƒ­ã‚°ã‚’æ­£ã—ã表示ã™ã‚‹ãŸã‚ã«ã€æ™‚刻ã€ãƒ­ã‚°ãƒ¬ãƒ™ãƒ«ã€ãŠã‚ˆã³ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚«ãƒ©ãƒ ãŒå¿…è¦ã§ã™ã€‚ + +トレース設定ã¯ã‚‚ã†å°‘ã—複雑ã§ã™ï¼ˆå®Œå…¨ãªãƒªã‚¹ãƒˆã¯[ã“ã¡ã‚‰](/ja/engines/table-engines/mergetree-family/mergetree#mergetree-data-storage))。ã“ã“ã§å¿…è¦ãªã‚«ãƒ©ãƒ ã¯ã€ãã®å¾Œã«ãƒ•ãƒ«ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ—ロファイルを構築ã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã‚’抽象化ã™ã‚‹ãŸã‚ã«å¿…è¦ã§ã™ã€‚ã“れらã®ã‚¯ã‚¨ãƒªã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒOTelã¨é¡žä¼¼ã—ãŸæ§‹é€ ã‚’æŒã£ã¦ã„ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã‚‹ãŸã‚ã€æ¨™æº–スキーマã‹ã‚‰å¤§ãã逸脱ã—ã¦ã„るユーザーã¯ã€ã“ã®æ©Ÿèƒ½ã®æ©æµã‚’å—ã‘ã‚‹ãŸã‚ã«ãƒ“ューを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +NEEDS ALT + +
    + +設定ãŒå®Œäº†ã™ã‚‹ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯[Grafana Explore](https://grafana.com/docs/grafana/latest/explore/)ã«ç§»å‹•ã—ã¦ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã®æ¤œç´¢ã‚’開始ã§ãã¾ã™ã€‚ + +## ログ + +Grafanaã®ãƒ­ã‚°ã«é–¢ã™ã‚‹è¦ä»¶ã«å¾“ã†å ´åˆã€ã‚¯ã‚¨ãƒªãƒ“ルダー㧠`Query Type: Log` ã‚’é¸æŠžã—㦠`Run Query` をクリックã§ãã¾ã™ã€‚クエリビルダーã¯ã€ãƒ­ã‚°ã‚’リストã—ã¦è¡¨ç¤ºã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã‚’作æˆã—ã¾ã™ã€‚例ãˆã°æ¬¡ã®ã‚ˆã†ã«ï¼š + +```sql +SELECT Timestamp as timestamp, Body as body, SeverityText as level, TraceId as traceID FROM "default"."otel_logs" WHERE ( timestamp >= $__fromTime AND timestamp <= $__toTime ) ORDER BY timestamp DESC LIMIT 1000 +``` + +NEEDS ALT + +
    + +クエリビルダーã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒSQLを書ãå¿…è¦ã‚’é¿ã‘ã‚‹ç°¡å˜ãªæ‰‹æ®µã‚’æä¾›ã—ã¾ã™ã€‚キーワードをå«ã‚€ãƒ­ã‚°ã‚’見ã¤ã‘ã‚‹ã“ã¨ã‚’å«ã‚€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¯ã€ã‚¯ã‚¨ãƒªãƒ“ルダーã§è¡Œãˆã¾ã™ã€‚より複雑ãªã‚¯ã‚¨ãƒªã‚’書ãã“ã¨ã‚’望むユーザーã¯ã€SQLエディタã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚é©åˆ‡ãªã‚«ãƒ©ãƒ ãŒè¿”ã•ã‚Œã€`logs` ãŒã‚¯ã‚¨ãƒªã‚¿ã‚¤ãƒ—ã¨ã—ã¦é¸æŠžã•ã‚Œã¦ã„ã‚‹é™ã‚Šã€çµæžœã¯ãƒ­ã‚°ã¨ã—ã¦ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ã€‚ログã®ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ã«å¿…è¦ãªã‚«ãƒ©ãƒ ã¯[ã“ã¡ã‚‰](https://grafana.com/developers/plugin-tools/tutorials/build-a-logs-data-source-plugin#logs-data-frame-format)ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +### トレースã¸ã®ãƒ­ã‚° + +ログãŒãƒˆãƒ¬ãƒ¼ã‚¹IDã‚’å«ã‚€å ´åˆã€ç‰¹å®šã®ãƒ­ã‚°è¡Œã‹ã‚‰ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’閲覧ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +NEEDS ALT + +
    + +## トレース + +å‰è¿°ã®ãƒ­ã‚°ä½“験ã¨åŒæ§˜ã«ã€GrafanaãŒãƒˆãƒ¬ãƒ¼ã‚¹ã‚’レンダリングã™ã‚‹ãŸã‚ã«å¿…è¦ãªã‚«ãƒ©ãƒ ãŒæº€ãŸã•ã‚Œã¦ã„ã‚‹å ´åˆï¼ˆä¾‹ãˆã°ã€OTelスキーマを使用ã—ã¦ã„ã‚‹å ´åˆï¼‰ã€ã‚¯ã‚¨ãƒªãƒ“ルダーã¯å¿…è¦ãªã‚¯ã‚¨ãƒªã‚’自動的ã«ä½œæˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`Query Type: Traces` ã‚’é¸æŠžã—ã€`Run Query` をクリックã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªãŒç”Ÿæˆã•ã‚Œå®Ÿè¡Œã•ã‚Œã¾ã™ï¼ˆè¨­å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã«ä¾å­˜ã—ã¦ãŠã‚Šã€ä»¥ä¸‹ã¯OTelを使用ã™ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ï¼‰ï¼š + +```sql +SELECT "TraceId" as traceID, + "ServiceName" as serviceName, + "SpanName" as operationName, + "Timestamp" as startTime, + multiply("Duration", 0.000001) as duration +FROM "default"."otel_traces" +WHERE ( Timestamp >= $__fromTime AND Timestamp <= $__toTime ) + AND ( ParentSpanId = '' ) + AND ( Duration > 0 ) + ORDER BY Timestamp DESC, Duration DESC LIMIT 1000 +``` + +ã“ã®ã‚¯ã‚¨ãƒªã¯GrafanaãŒæœŸå¾…ã™ã‚‹ã‚«ãƒ©ãƒ åã‚’è¿”ã—ã€ä»¥ä¸‹ã«ç¤ºã™ã‚ˆã†ã«ãƒˆãƒ¬ãƒ¼ã‚¹ã®ãƒ†ãƒ¼ãƒ–ルをレンダリングã—ã¾ã™ã€‚継続時間や他ã®ã‚«ãƒ©ãƒ ã‚’基ã«ã—ãŸãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚‚ã€SQLを書ãã“ã¨ãªã実行ã§ãã¾ã™ã€‚ + +NEEDS ALT + +
    + +より複雑ãªã‚¯ã‚¨ãƒªã‚’書ããŸã„ユーザーã¯ã€`SQL Editor`ã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### トレース詳細ã®è¡¨ç¤º + +上ã«ç¤ºã—ãŸã‚ˆã†ã«ã€ãƒˆãƒ¬ãƒ¼ã‚¹IDã¯ã‚¯ãƒªãƒƒã‚¯å¯èƒ½ãªãƒªãƒ³ã‚¯ã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚トレースIDをクリックã™ã‚‹ã¨ã€ãƒªãƒ³ã‚¯`View Trace`を通ã˜ã¦é–¢é€£ã™ã‚‹ã‚¹ãƒ‘ンã®è¡¨ç¤ºã‚’é¸æŠžã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¹ãƒ‘ンを必è¦ãªæ§‹é€ ã§å–å¾—ã—ã€çµæžœã‚’ウォーターフォールã¨ã—ã¦ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ã™ã‚‹ãŸã‚ã®ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªï¼ˆOTelカラムを想定)ãŒç™ºè¡Œã•ã‚Œã¾ã™ã€‚ + +```sql +WITH '' as trace_id, + (SELECT min(Start) FROM "default"."otel_traces_trace_id_ts" + WHERE TraceId = trace_id) as trace_start, + (SELECT max(End) + 1 FROM "default"."otel_traces_trace_id_ts" + WHERE TraceId = trace_id) as trace_end +SELECT "TraceId" as traceID, + "SpanId" as spanID, + "ParentSpanId" as parentSpanID, + "ServiceName" as serviceName, + "SpanName" as operationName, + "Timestamp" as startTime, + multiply("Duration", 0.000001) as duration, + arrayMap(key -> map('key', key, 'value',"SpanAttributes"[key]), + mapKeys("SpanAttributes")) as tags, + arrayMap(key -> map('key', key, 'value',"ResourceAttributes"[key]), + mapKeys("ResourceAttributes")) as serviceTags +FROM "default"."otel_traces" +WHERE traceID = trace_id + AND startTime >= trace_start + AND startTime <= trace_end +LIMIT 1000 +``` + +> 上記クエリãŒãƒˆãƒ¬ãƒ¼ã‚¹IDã®ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’è¡Œã†ãŸã‚ã«Materialized View `otel_traces_trace_id_ts` を使用ã™ã‚‹æ–¹æ³•ã«æ³¨ç›®ã—ã¦ãã ã•ã„。詳細ã¯ã€Œã‚¯ã‚¨ãƒªã®é«˜é€ŸåŒ– - ルックアップ用ã®Materialized Viewsã®æ´»ç”¨ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +NEEDS ALT + +
    + +### トレースã‹ã‚‰ãƒ­ã‚°ã¸ + +ログãŒãƒˆãƒ¬ãƒ¼ã‚¹IDã‚’å«ã‚€å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‹ã‚‰é–¢é€£ã™ã‚‹ãƒ­ã‚°ã¸ãƒŠãƒ“ゲートã§ãã¾ã™ã€‚ログを表示ã™ã‚‹ã«ã¯ãƒˆãƒ¬ãƒ¼ã‚¹IDをクリックã—ã€`View Logs`ã‚’é¸æŠžã—ã¾ã™ã€‚ã“ã®æ“作ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®OTelカラムを想定ã—ãŸä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’発行ã—ã¾ã™ã€‚ + +```sql +SELECT Timestamp as "timestamp", + Body as "body", SeverityText as "level", + TraceId as "traceID" FROM "default"."otel_logs" +WHERE ( traceID = '' ) +ORDER BY timestamp ASC LIMIT 1000 +``` + +NEEDS ALT + +
    + +## ダッシュボード + +Grafanaã§ClickHouseデータソースを使用ã—ã¦ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã‚’構築ã§ãã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€Grafanaã¨ClickHouseã®[データソースドキュメント](https://github.com/grafana/clickhouse-datasource)ã‚’å‚考ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚特ã«[マクロ](https://github.com/grafana/clickhouse-datasource?tab=readme-ov-file#macros)ã¨[変数](https://grafana.com/docs/grafana/latest/dashboards/variables/)ã®æ¦‚念ã«ç„¦ç‚¹ã‚’当ã¦ã¦ãã ã•ã„。 + +プラグインã¯ã€OTelã®ä»•æ§˜ã«æº–æ‹ ã—ãŸãƒ­ã‚°ãŠã‚ˆã³ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ç”¨ã®ä¾‹ã¨ãªã‚‹ãƒ€ãƒƒã‚·ãƒ¥ãƒœãƒ¼ãƒ‰ã€ŒSimple ClickHouse OTel dashboardingã€ã‚’å«ã‚€ã€ã„ãã¤ã‹ã®æ¨™æº–ダッシュボードをæä¾›ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒOTelã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚«ãƒ©ãƒ åã«æº–æ‹ ã™ã‚‹ã“ã¨ã‚’è¦æ±‚ã—ã€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã®è¨­å®šã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ãã¾ã™ã€‚ + +NEEDS ALT + +
    + +以下ã«ã€å¯è¦–化ã®ãŸã‚ã®ã„ãã¤ã‹ã®ç°¡å˜ãªãƒ’ントをæä¾›ã—ã¾ã™ã€‚ + +### 時系列 + +統計ã¨ã¨ã‚‚ã«ã€ç·šã‚°ãƒ©ãƒ•ã¯ã‚ªãƒ–ザーãƒãƒ“リティã®ä½¿ç”¨ã‚·ãƒ¼ãƒ³ã§æœ€ã‚‚一般的ãªè¦–覚化形å¼ã§ã™ã€‚Clickhouseプラグインã¯ã€`datetime` ã«åå‰ä»˜ã‘ã•ã‚ŒãŸ `time` ã¨æ•°å€¤ã‚«ãƒ©ãƒ ã‚’è¿”ã™ã‚¯ã‚¨ãƒªã®å ´åˆã€è‡ªå‹•çš„ã«ç·šã‚°ãƒ©ãƒ•ã‚’レンダリングã—ã¾ã™ã€‚例ãˆã°ï¼š + +```sql +SELECT + $__timeInterval(Timestamp) as time, + quantile(0.99)(Duration)/1000000 AS p99 +FROM otel_traces +WHERE + $__timeFilter(Timestamp) + AND ( Timestamp >= $__fromTime AND Timestamp <= $__toTime ) +GROUP BY time +ORDER BY time ASC +LIMIT 100000 +``` + +NEEDS ALT + +
    + +### 複数ラインã®ãƒãƒ£ãƒ¼ãƒˆ + +以下ã®æ¡ä»¶ãŒæº€ãŸã•ã‚Œã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã®ãŸã‚ã«è¤‡æ•°ãƒ©ã‚¤ãƒ³ã®ãƒãƒ£ãƒ¼ãƒˆãŒè‡ªå‹•çš„ã«ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ã•ã‚Œã¾ã™ï¼š + +- フィールド1: エイリアスåãŒtimeã®datetimeフィールド +- フィールド2: グループ化ã™ã‚‹ãŸã‚ã®å€¤ã€‚ã“ã‚Œã¯Stringã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 +- フィールド3以é™: メトリック値 + +例ãˆã°ï¼š + +```sql +SELECT + $__timeInterval(Timestamp) as time, + ServiceName, + quantile(0.99)(Duration)/1000000 AS p99 +FROM otel_traces +WHERE $__timeFilter(Timestamp) +AND ( Timestamp >= $__fromTime AND Timestamp <= $__toTime ) +GROUP BY ServiceName, time +ORDER BY time ASC +LIMIT 100000 +``` + +NEEDS ALT + +
    + +### 地ç†ãƒ‡ãƒ¼ã‚¿ã®å¯è¦–化 + +以å‰ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§IP Dictionaryを使用ã—ã¦åœ°ç†åº§æ¨™ã§ã‚ªãƒ–ザーãƒãƒ“リティデータを拡張ã™ã‚‹æ–¹æ³•ã‚’探ã—ã¾ã—ãŸã€‚`latitude` 㨠`longitude` ã®ã‚«ãƒ©ãƒ ãŒã‚ã‚‹ã¨ä»®å®šã—ã€ã‚ªãƒ–ザーãƒãƒ“リティを `geohashEncode` 関数を使用ã—ã¦å¯è¦–化ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€Grafanaã®Geo Mapãƒãƒ£ãƒ¼ãƒˆã¨äº’æ›æ€§ã®ã‚るジオãƒãƒƒã‚·ãƒ¥ãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚以下ã«ä¾‹ã®ã‚¯ã‚¨ãƒªã¨å¯è¦–化を示ã—ã¾ã™ï¼š + +```sql +WITH coords AS + ( + SELECT + Latitude, + Longitude, + geohashEncode(Longitude, Latitude, 4) AS hash + FROM otel_logs_v2 + WHERE (Longitude != 0) AND (Latitude != 0) + ) +SELECT + hash, + count() AS heat, + round(log10(heat), 2) AS adj_heat +FROM coords +GROUP BY hash +``` + +NEEDS ALT + +
    diff --git a/docs/ja/use-cases/observability/images/observability-1.png b/docs/ja/use-cases/observability/images/observability-1.png new file mode 100644 index 00000000000..cee69d5a181 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-1.png differ diff --git a/docs/ja/use-cases/observability/images/observability-10.png b/docs/ja/use-cases/observability/images/observability-10.png new file mode 100644 index 00000000000..88dfafa2a3b Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-10.png differ diff --git a/docs/ja/use-cases/observability/images/observability-11.png b/docs/ja/use-cases/observability/images/observability-11.png new file mode 100644 index 00000000000..0b16712c0a4 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-11.png differ diff --git a/docs/ja/use-cases/observability/images/observability-12.png b/docs/ja/use-cases/observability/images/observability-12.png new file mode 100644 index 00000000000..a67ef6271cd Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-12.png differ diff --git a/docs/ja/use-cases/observability/images/observability-13.png b/docs/ja/use-cases/observability/images/observability-13.png new file mode 100644 index 00000000000..b7b710beb24 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-13.png differ diff --git a/docs/ja/use-cases/observability/images/observability-14.png b/docs/ja/use-cases/observability/images/observability-14.png new file mode 100644 index 00000000000..4af18b8994e Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-14.png differ diff --git a/docs/ja/use-cases/observability/images/observability-15.png b/docs/ja/use-cases/observability/images/observability-15.png new file mode 100644 index 00000000000..5bd30367f2d Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-15.png differ diff --git a/docs/ja/use-cases/observability/images/observability-16.png b/docs/ja/use-cases/observability/images/observability-16.png new file mode 100644 index 00000000000..e3b4ef7ba8f Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-16.png differ diff --git a/docs/ja/use-cases/observability/images/observability-17.png b/docs/ja/use-cases/observability/images/observability-17.png new file mode 100644 index 00000000000..a355b0fa3f3 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-17.png differ diff --git a/docs/ja/use-cases/observability/images/observability-18.png b/docs/ja/use-cases/observability/images/observability-18.png new file mode 100644 index 00000000000..5658c346fcc Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-18.png differ diff --git a/docs/ja/use-cases/observability/images/observability-19.png b/docs/ja/use-cases/observability/images/observability-19.png new file mode 100644 index 00000000000..936ae8723b6 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-19.png differ diff --git a/docs/ja/use-cases/observability/images/observability-2.png b/docs/ja/use-cases/observability/images/observability-2.png new file mode 100644 index 00000000000..1614ead5f70 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-2.png differ diff --git a/docs/ja/use-cases/observability/images/observability-20.png b/docs/ja/use-cases/observability/images/observability-20.png new file mode 100644 index 00000000000..dbbc5d9069a Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-20.png differ diff --git a/docs/ja/use-cases/observability/images/observability-21.png b/docs/ja/use-cases/observability/images/observability-21.png new file mode 100644 index 00000000000..07b4ba3c89c Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-21.png differ diff --git a/docs/ja/use-cases/observability/images/observability-22.png b/docs/ja/use-cases/observability/images/observability-22.png new file mode 100644 index 00000000000..a41e210c688 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-22.png differ diff --git a/docs/ja/use-cases/observability/images/observability-23.png b/docs/ja/use-cases/observability/images/observability-23.png new file mode 100644 index 00000000000..d31d4324cbb Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-23.png differ diff --git a/docs/ja/use-cases/observability/images/observability-24.png b/docs/ja/use-cases/observability/images/observability-24.png new file mode 100644 index 00000000000..cfb63c68ff4 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-24.png differ diff --git a/docs/ja/use-cases/observability/images/observability-3.png b/docs/ja/use-cases/observability/images/observability-3.png new file mode 100644 index 00000000000..bd65722fc8e Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-3.png differ diff --git a/docs/ja/use-cases/observability/images/observability-4.png b/docs/ja/use-cases/observability/images/observability-4.png new file mode 100644 index 00000000000..68b010e2c46 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-4.png differ diff --git a/docs/ja/use-cases/observability/images/observability-5.png b/docs/ja/use-cases/observability/images/observability-5.png new file mode 100644 index 00000000000..84b310c4a00 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-5.png differ diff --git a/docs/ja/use-cases/observability/images/observability-6.png b/docs/ja/use-cases/observability/images/observability-6.png new file mode 100644 index 00000000000..0b4032adfb9 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-6.png differ diff --git a/docs/ja/use-cases/observability/images/observability-7.png b/docs/ja/use-cases/observability/images/observability-7.png new file mode 100644 index 00000000000..71c7227726b Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-7.png differ diff --git a/docs/ja/use-cases/observability/images/observability-8.png b/docs/ja/use-cases/observability/images/observability-8.png new file mode 100644 index 00000000000..632346c5ff9 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-8.png differ diff --git a/docs/ja/use-cases/observability/images/observability-9.png b/docs/ja/use-cases/observability/images/observability-9.png new file mode 100644 index 00000000000..a3222c82421 Binary files /dev/null and b/docs/ja/use-cases/observability/images/observability-9.png differ diff --git a/docs/ja/use-cases/observability/index.md b/docs/ja/use-cases/observability/index.md new file mode 100644 index 00000000000..693fe1dec12 --- /dev/null +++ b/docs/ja/use-cases/observability/index.md @@ -0,0 +1,96 @@ +--- +title: オブザーãƒãƒ“リティ +description: ClickHouse をオブザーãƒãƒ“リティソリューションã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ +slug: /ja/observability +keywords: [オブザーãƒãƒ“リティ, ログ, トレース, メトリクス, OpenTelemetry, Grafana, otel] +--- + +# オブザーãƒãƒ“リティã®ãŸã‚ã® ClickHouse ã®ä½¿ç”¨ + +## ã¯ã˜ã‚ã« + +ã“ã®ã‚¬ã‚¤ãƒ‰ã¯ã€ClickHouse を使用ã—ã¦ç‹¬è‡ªã® SQL ベースã®ã‚ªãƒ–ザーãƒãƒ“リティソリューションを構築ã—ãŸã„ã¨è€ƒãˆã¦ã„るユーザーå‘ã‘ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ã€‚ログやトレースã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚ ã“ã‚Œã«ã¯ã€ã‚¤ãƒ³ã‚¸ã‚§ã‚¹ãƒˆã®è€ƒæ…®äº‹é …ã€ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã«æœ€é©åŒ–ã•ã‚ŒãŸã‚¹ã‚­ãƒ¼ãƒžã€ãŠã‚ˆã³éžæ§‹é€ åŒ–ログã‹ã‚‰ã®æ§‹é€ ã®æŠ½å‡ºãªã©ã€ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³æ§‹ç¯‰ã®ã™ã¹ã¦ã®å´é¢ã‚’ã‚«ãƒãƒ¼ã—ã¦ã„ã¾ã™ã€‚ + +ClickHouse ã¯ã‚ªãƒ–ザーãƒãƒ“リティã®å³å¸­ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ãŸã ã—ã€ã‚ªãƒ–ザーãƒãƒ“リティデータã«å¯¾ã—ã¦æ¯”é¡žã®ãªã„圧縮率ã¨é«˜é€Ÿãªã‚¯ã‚¨ãƒªå¿œç­”時間をæä¾›ã§ãã‚‹éžå¸¸ã«åŠ¹çŽ‡çš„ãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ユーザー㌠ClickHouse をオブザーãƒãƒ“リティソリューションã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã¨ãƒ‡ãƒ¼ã‚¿åŽé›†ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã®ä¸¡æ–¹ãŒå¿…è¦ã§ã™ã€‚ç¾åœ¨ã€ã‚ªãƒ–ザーãƒãƒ“リティシグナルã®å¯è¦–化ã«ã¯ **Grafana** ã‚’ã€ãƒ‡ãƒ¼ã‚¿åŽé›†ã«ã¯ **OpenTelemetry** を使用ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¦ã„ã¾ã™ï¼ˆã©ã¡ã‚‰ã‚‚å…¬å¼ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹çµ±åˆã§ã™ï¼‰ã€‚ + +NEEDS ALT + +
    + +> データåŽé›†ã«ã¯ OpenTelemetry (OTeL) プロジェクトを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ãŒã€åŒæ§˜ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã¯ä»–ã®ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã‚„ツール(例:Vector ã‚„ Fluentd)を使用ã—ã¦ã‚‚構築ã§ãã¾ã™ï¼ˆ[Fluent Bit を使用ã—ãŸä¾‹](https://clickhouse.com/blog/kubernetes-logs-to-clickhouse-fluent-bit)ã‚’å‚照)。ã¾ãŸã€Superset ã‚„ Metabase ã‚’å«ã‚€ä»£æ›¿ã®å¯è¦–化ツールも存在ã—ã¾ã™ã€‚ + +## ãªãœ ClickHouse を使用ã™ã‚‹ã®ã‹ï¼Ÿ + +集中管ç†ã•ã‚ŒãŸã‚ªãƒ–ザーãƒãƒ“リティストアã®æœ€ã‚‚é‡è¦ãªç‰¹å¾´ã¯ã€å¤šæ§˜ãªã‚½ãƒ¼ã‚¹ã‹ã‚‰ã®è†¨å¤§ãªé‡ã®ãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã‚’迅速ã«é›†ç´„ã€åˆ†æžã€æ¤œç´¢ã™ã‚‹èƒ½åŠ›ã§ã™ã€‚ã“ã®é›†ä¸­åŒ–ã«ã‚ˆã‚Šã€ãƒˆãƒ©ãƒ–ルシューティングãŒç°¡ç´ åŒ–ã•ã‚Œã€ã‚µãƒ¼ãƒ“ス中断ã®æ ¹æœ¬åŽŸå› ã‚’特定ã—ã‚„ã™ããªã‚Šã¾ã™ã€‚ + +ユーザーãŒã¾ã™ã¾ã™ä¾¡æ ¼ã«æ•æ„Ÿã«ãªã‚Šã€ã“れらã®å³å¸­ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã®ã‚³ã‚¹ãƒˆãŒæä¾›ã•ã‚Œã‚‹ä¾¡å€¤ã¨æ¯”較ã—ã¦é«˜ã予測ä¸å¯èƒ½ã§ã‚ã‚‹ã¨æ„Ÿã˜ã‚‹ä¸­ã€ã‚¯ã‚¨ãƒªæ€§èƒ½ãŒè¨±å®¹ç¯„囲内ã§ã‚ã‚‹å ´åˆã®ã‚³ã‚¹ãƒˆåŠ¹çŽ‡ã®é«˜ã„予測å¯èƒ½ãªãƒ­ã‚°ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®é‡è¦æ€§ãŒå¢—ã—ã¦ã„ã¾ã™ã€‚ + +ãã®æ€§èƒ½ã¨ã‚³ã‚¹ãƒˆåŠ¹çŽ‡ã®ãŸã‚ã€ClickHouse ã¯ã‚ªãƒ–ザーãƒãƒ“リティ製å“ã«ãŠã‘るロギングãŠã‚ˆã³ãƒˆãƒ¬ãƒ¼ã‚¹ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã®äº‹å®Ÿä¸Šã®æ¨™æº–ã¨ãªã£ã¦ã„ã¾ã™ã€‚ + +より具体的ã«ã¯ã€ä»¥ä¸‹ã®ç†ç”±ã§ ClickHouse ã¯ã‚ªãƒ–ザーãƒãƒ“リティデータã®ä¿å­˜ã«ç†æƒ³çš„ã§ã™: + +- **圧縮** - オブザーãƒãƒ“リティデータã«ã¯é€šå¸¸ã€HTTP コードやサービスåãªã©ã®ç•°ãªã‚‹ã‚»ãƒƒãƒˆã‹ã‚‰ã®å€¤ãŒå«ã¾ã‚Œã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒã‚ã‚Šã¾ã™ã€‚ClickHouse ã®åˆ—指å‘ストレージã§ã¯å€¤ãŒã‚½ãƒ¼ãƒˆã•ã‚Œã¦æ ¼ç´ã•ã‚Œã‚‹ãŸã‚ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯éžå¸¸ã«ã†ã¾ã圧縮ã•ã‚Œã¾ã™ã€‚特ã«ã€æ™‚系列データã«ç‰¹åŒ–ã—ãŸæ§˜ã€…ãªã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¨çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ã§ã€ã•ã‚‰ã«åŠ¹æžœãŒé«˜ã¾ã‚Šã¾ã™ã€‚ä»–ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®å…ƒã®ã‚µã‚¤ã‚ºï¼ˆé€šå¸¸ã¯ JSON å½¢å¼ï¼‰ã¨åŒã˜ã ã‘ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒå¿…è¦ã§ã™ãŒã€ClickHouse ã¯å¹³å‡ã§æœ€å¤§ 14 å€ã«ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’圧縮ã—ã¾ã™ã€‚大è¦æ¨¡ãªã‚ªãƒ–ザーãƒãƒ“リティインストールã«ãŠã„ã¦å¤§å¹…ãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ç¯€ç´„ã‚’ã‚‚ãŸã‚‰ã™ã ã‘ã§ãªãã€ã“ã®åœ§ç¸®ã«ã‚ˆã‚Šãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ã®èª­ã¿å–りデータãŒå°‘ãªããªã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªã‚’高速化ã—ã¾ã™ã€‚ +- **高速ãªé›†è¨ˆ** - オブザーãƒãƒ“リティソリューションã¯é€šå¸¸ã€ã‚¨ãƒ©ãƒ¼ãƒ¬ãƒ¼ãƒˆã‚’示ã™ç·šã‚„トラフィックソースを示ã™æ£’グラフãªã©ã‚’通ã˜ã¦ãƒ‡ãƒ¼ã‚¿ã‚’å¯è¦–化ã™ã‚‹ã“ã¨ã«å¤§ããä¾å­˜ã—ã¦ã„ã¾ã™ã€‚集計や GROUP BY ã¯ã“れらã®ãƒãƒ£ãƒ¼ãƒˆã‚’機能ã•ã›ã‚‹ãŸã‚ã®åŸºæœ¬ã§ã‚ã‚Šã€ãƒ•ã‚£ãƒ«ã‚¿ã‚’é©ç”¨ã—ãŸéš›ã«é€Ÿã応答性ãŒã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ClickHouse ã®åˆ—指å‘フォーマットã¨ãƒ™ã‚¯ãƒˆãƒ«åŒ–ã•ã‚ŒãŸã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€é«˜é€Ÿãªé›†è¨ˆã«ç†æƒ³çš„ã§ã‚ã‚Šã€ã‚¹ãƒ‘ースインデックスãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«å¿œã˜ãŸè¿…速ãªãƒ‡ãƒ¼ã‚¿ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ +- **高速ãªç·šå½¢ã‚¹ã‚­ãƒ£ãƒ³** - 代替技術ã®å¤šãã¯ãƒ­ã‚°ã®é«˜é€Ÿãªã‚¯ã‚¨ãƒªã«è»¢ç½®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’利用ã—ã¦ã„ã¾ã™ãŒã€ã“ã‚Œã«ã‚ˆã‚Šãƒ‡ã‚£ã‚¹ã‚¯ä½¿ç”¨é‡ã‚„リソース使用é‡ãŒé«˜ããªã‚‹å‚¾å‘ãŒã‚ã‚Šã¾ã™ã€‚ClickHouse ã¯è¿½åŠ ã®ã‚ªãƒ—ションã§å転インデックスをæä¾›ã—ã¦ã„ã¾ã™ãŒã€ç·šå½¢ã‚¹ã‚­ãƒ£ãƒ³ã¯éžå¸¸ã«ä¸¦åˆ—化ã•ã‚Œã¦ãŠã‚Šï¼ˆè¨­å®šã‚’変更ã—ãªã„é™ã‚Šï¼‰ã€åˆ©ç”¨å¯èƒ½ãªã™ã¹ã¦ã®ãƒžã‚·ãƒ³ã‚³ã‚¢ã‚’使用ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æ¯Žç§’ 10 GB/s(圧縮済ã¿ï¼‰ä»¥ä¸Šã®ãƒžãƒƒãƒãƒ³ã‚°ã®ãŸã‚ã«ã‚¹ã‚­ãƒ£ãƒ³ãŒå¯èƒ½ã§ã™ã€‚最é©åŒ–ã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆãƒžãƒƒãƒãƒ³ã‚°ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- **SQL ã®è¦ªã—ã¿ã‚„ã™ã•** - SQL ã¯ã™ã¹ã¦ã®ã‚¨ãƒ³ã‚¸ãƒ‹ã‚¢ã«ã¨ã£ã¦ã‚ˆã知られãŸè¨€èªžã§ã‚ã‚Šã€50年以上ã®é–‹ç™ºã‚’通ã˜ã¦ã€ãƒ‡ãƒ¼ã‚¿åˆ†æžã®äº‹å®Ÿä¸Šã®æ¨™æº–言語ã¨ã—ã¦ã®åœ°ä½ã‚’確立ã—続ã‘ã¦ã„ã¾ã™ã€‚オブザーãƒãƒ“リティã¯å˜ãªã‚‹ãƒ‡ãƒ¼ã‚¿å•é¡Œã§ã‚ã‚Šã€SQL ã«æœ€é©ã§ã™ã€‚ +- **分æžæ©Ÿèƒ½** - ClickHouse 㯠ANSI SQL ã‚’æ‹¡å¼µã—ã€SQL クエリを簡å˜ã«æ›¸ãã‚„ã™ãã™ã‚‹åˆ†æžæ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ã“れらã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’切り分ã‘ã¦åˆ†æžã™ã‚‹å¿…è¦ãŒã‚る根本原因分æžã‚’è¡Œã†ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¨ã£ã¦ä¸å¯æ¬ ã§ã™ã€‚ +- **二次インデックス** - ClickHouse ã¯ãƒ–ルームフィルタãªã©ã®äºŒæ¬¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€ç‰¹å®šã®ã‚¯ã‚¨ãƒªãƒ—ロファイルを高速化ã—ã¾ã™ã€‚ã“れらã¯ã‚«ãƒ©ãƒ ãƒ¬ãƒ™ãƒ«ã§ä»»æ„ã«æœ‰åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã€ã‚³ã‚¹ãƒˆã¨æ€§èƒ½ã®åˆ©ç›Šã‚’評価ã™ã‚‹ãŸã‚ã®ç´°ã‹ã„制御をユーザーã«æä¾›ã—ã¾ã™ã€‚ +- **オープンソースã¨ã‚ªãƒ¼ãƒ—ンスタンダード** - オープンソースデータベースã¨ã—ã¦ã€ClickHouse 㯠OpenTelemetry ãªã©ã®ã‚ªãƒ¼ãƒ—ンスタンダードを採用ã—ã¦ã„ã¾ã™ã€‚プロジェクトã«è²¢çŒ®ã—ã€ç©æ¥µçš„ã«å‚加ã™ã‚‹èƒ½åŠ›ã‚’æä¾›ã™ã‚‹ä¸€æ–¹ã§ã€ãƒ™ãƒ³ãƒ€ãƒ¼ãƒ­ãƒƒã‚¯ã‚¤ãƒ³ã®èª²é¡Œã‚’回é¿ã—ã¾ã™ã€‚ + +## オブザーãƒãƒ“リティ㫠ClickHouse を使用ã™ã‚‹ã¹ã時 + +オブザーãƒãƒ“リティデータ㫠ClickHouse を使用ã™ã‚‹ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ SQL ベースã®ã‚ªãƒ–ザーãƒãƒ“リティを採用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®æ­´å²ã«ã¤ã„ã¦ã¯ [ブログ記事](https://clickhouse.com/blog/the-state-of-sql-based-observability)ã‚’ãŠå‹§ã‚ã—ã¾ã™ãŒã€è¦ç´„ã™ã‚‹ã¨ï¼š + +SQL ベースã®ã‚ªãƒ–ザーãƒãƒ“リティã¯æ¬¡ã®ã‚ˆã†ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é©ã—ã¦ã„ã¾ã™ï¼š + +- ã‚ãªãŸã¾ãŸã¯ã‚ãªãŸã®ãƒãƒ¼ãƒ ãŒ SQL ã«è¦ªã—ã‚“ã§ã„る(ã¾ãŸã¯ãã®ç¿’得を望んã§ã„る) +- ロックインを回é¿ã—ã€æ‹¡å¼µæ€§ã‚’é”æˆã™ã‚‹ãŸã‚ã« OpenTelemetry ãªã©ã®ã‚ªãƒ¼ãƒ—ン標準をéµå®ˆã™ã‚‹ã“ã¨ã‚’好む +- コレクションã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã€å¯è¦–化ã®ã™ã¹ã¦ã§ã‚ªãƒ¼ãƒ—ンソースã®é©æ–°ã«ã‚ˆã£ã¦é§†å‹•ã•ã‚Œã‚‹ã‚¨ã‚³ã‚·ã‚¹ãƒ†ãƒ ã‚’é‹å–¶ã™ã‚‹æº–å‚™ãŒã§ãã¦ã„ã‚‹ +- 中è¦æ¨¡ã¾ãŸã¯å¤§è¦æ¨¡ï¼ˆã¾ãŸã¯éžå¸¸ã«å¤§è¦æ¨¡ãªï¼‰ã‚ªãƒ–ザーãƒãƒ“リティデータã®ç®¡ç†ã‚’視野ã«å…¥ã‚Œã¦ã„ã‚‹ +- TCO(ç·æ‰€æœ‰ã‚³ã‚¹ãƒˆï¼‰ã‚’管ç†ã—ã€ã‚ªãƒ–ザーãƒãƒ“リティコストã®å¢—加をé¿ã‘ãŸã„ +- コストを管ç†ã™ã‚‹ãŸã‚ã«ã‚ªãƒ–ザーãƒãƒ“リティデータã®çŸ­ã„ä¿æŒæœŸé–“ã«ç¸›ã‚‰ã‚ŒãŸããªã„ + +SQL ベースã®ã‚ªãƒ–ザーãƒãƒ“リティãŒé©ã•ãªã„å ´åˆï¼š + +- ã‚ãªãŸã‚„ã‚ãªãŸã®ãƒãƒ¼ãƒ ãŒ SQL ã‚’å­¦ã¶ï¼ˆã¾ãŸã¯ç”Ÿæˆã™ã‚‹ï¼‰ã“ã¨ã«èˆˆå‘³ãŒãªã„ +- パッケージ化ã•ã‚ŒãŸã‚¨ãƒ³ãƒ‰ãƒ„ーエンドã®ã‚ªãƒ–ザーãƒãƒ“リティ体験を求ã‚ã¦ã„ã‚‹ +- オブザーãƒãƒ“リティデータã®é‡ãŒå°ã•ã™ãŽã¦ã€ä½•ã‚‰ã‹ã®é‡è¦ãªå·®åˆ¥åŒ–を生ã¿å‡ºã›ãªã„(例:<150 GiB)予測ãŒã•ã‚Œã¦ã„ãªã„。 +- モニターã®ä½¿ç”¨ä¾‹ãŒä¸»ã«ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã«ä¾å­˜ã—ã¦ãŠã‚Šã€PromQL ã‚’å¿…è¦ã¨ã—ã¦ã„る。ãã®å ´åˆã§ã‚‚ã€ClickHouse をログやトレースã«ä½¿ç”¨ã—ã€Grafana ã§ãƒ—レゼンテーションレイヤーを統一ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- エコシステムãŒæˆç†Ÿã™ã‚‹ã®ã‚’å¾…ã¡ã€SQL ベースã®ã‚ªãƒ–ザーãƒãƒ“リティãŒã‚‚ã£ã¨ç°¡å˜ã«ãªã‚‹ã®ã‚’å¾…ã¡ãŸã„ + +## ログã¨ãƒˆãƒ¬ãƒ¼ã‚¹ + +オブザーãƒãƒ“リティã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«ã¯ã€ãƒ­ã‚®ãƒ³ã‚°ã€ãƒˆãƒ¬ãƒ¼ã‚¹ã€ãŠã‚ˆã³ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã® 3 ã¤ã®æ˜Žç¢ºãªæŸ±ãŒã‚ã‚Šã¾ã™ã€‚ãã‚Œãžã‚ŒãŒç‹¬è‡ªã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¨ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンをæŒã£ã¦ã„ã¾ã™ã€‚ + +ç¾åœ¨ã€ClickHouse ã¯æ¬¡ã®2種類ã®ã‚ªãƒ–ザーãƒãƒ“リティデータã®ä¿å­˜ã‚’推奨ã—ã¦ã„ã¾ã™ï¼š + +- **ログ** - ログã¯ã€ã‚·ã‚¹ãƒ†ãƒ å†…ã§ç™ºç”Ÿã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã®æ™‚刻記録ã§ã‚ã‚Šã€ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢æ“作ã®ã•ã¾ã–ã¾ãªå´é¢ã«é–¢ã™ã‚‹è©³ç´°æƒ…報をキャプãƒãƒ£ã—ã¾ã™ã€‚ログã®ãƒ‡ãƒ¼ã‚¿ã¯é€šå¸¸ã€éžæ§‹é€ åŒ–ã¾ãŸã¯åŠæ§‹é€ åŒ–ã•ã‚Œã¦ãŠã‚Šã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚¯ãƒ†ã‚£ãƒ“ティログã€ã‚·ã‚¹ãƒ†ãƒ å¤‰æ›´ã€ä»–ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ログã¯ã€ãƒˆãƒ©ãƒ–ルシューティングã€ç•°å¸¸æ¤œå‡ºã€ãŠã‚ˆã³ã‚·ã‚¹ãƒ†ãƒ å†…部ã§ç™ºç”Ÿã™ã‚‹å•é¡Œã®ç‰¹å®šã®ã‚¤ãƒ™ãƒ³ãƒˆã®ç†è§£ã«ä¸å¯æ¬ ã§ã™ã€‚ + +``` +54.36.149.41 - - [22/Jan/2019:03:56:14 +0330] "GET +/filter/27|13%20%D9%85%DA%AF%D8%A7%D9%BE%DB%8C%DA%A9%D8%B3%D9%84,27|%DA%A9%D9%85%D8%AA%D8%B1%20%D8%A7%D8%B2%205%20%D9%85%DA%AF%D8%A7%D9%BE%DB%8C%DA%A9%D8%B3%D9%84,p53 HTTP/1.1" 200 30577 "-" "Mozilla/5.0 (compatible; AhrefsBot/6.1; +http://ahrefs.com/robot/)" "-" +``` + +- **トレース** - トレースã¯ã€åˆ†æ•£ã‚·ã‚¹ãƒ†ãƒ å†…を移動ã™ã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®éŽç¨‹ã‚’キャプãƒãƒ£ã—ã€ã“れらã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ãƒ«ãƒ¼ãƒˆã¨ãƒ‘フォーマンスを詳細ã«ç¤ºã—ã¾ã™ã€‚トレースã®ãƒ‡ãƒ¼ã‚¿ã¯éžå¸¸ã«æ§‹é€ åŒ–ã•ã‚Œã¦ãŠã‚Šã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒå–ã‚‹å„ステップをマッピングã™ã‚‹ã‚¹ãƒ‘ンã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã‹ã‚‰æˆã‚Šã¾ã™ã€‚トレースã¯ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ‘フォーマンスã®æ´žå¯Ÿã‚’æä¾›ã—ã€ãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã‚„待機時間ã®å•é¡Œã‚’特定ã—ã€ãƒžã‚¤ã‚¯ãƒ­ã‚µãƒ¼ãƒ“スã®åŠ¹çŽ‡ã‚’最é©åŒ–ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +> ClickHouse ã¯ãƒ¡ãƒˆãƒªã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿ã®ä¿å­˜ã«ã‚‚使用ã§ãã¾ã™ãŒã€ã“ã®æŸ±ã¯ã¾ã æˆç†Ÿæ®µéšŽã«ã‚ã‚Šã€Prometheus データ形å¼ãŠã‚ˆã³ PromQL ã¸ã®ã‚µãƒãƒ¼ãƒˆãŒé€²è¡Œä¸­ã§ã™ã€‚ + +### 分散トレーシング + +分散トレーシングã¯ã€ã‚ªãƒ–ザーãƒãƒ“リティã®é‡è¦ãªæ©Ÿèƒ½ã§ã™ã€‚分散トレースã€å˜ã«ãƒˆãƒ¬ãƒ¼ã‚¹ã¨å‘¼ã°ã‚Œã‚‹ã‚‚ã®ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã‚’通るリクエストã®éŽç¨‹ã‚’マッピングã—ã¾ã™ã€‚リクエストã¯ã‚¨ãƒ³ãƒ‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¾ãŸã¯ã‚¢ãƒ—リケーションã‹ã‚‰èµ·ã“ã‚Šã€é€šå¸¸ã¯ãƒžã‚¤ã‚¯ãƒ­ã‚µãƒ¼ãƒ“ス間ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®æµã‚Œã«ã¤ãªãŒã‚Šã¾ã™ã€‚ã“ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’記録ã—ã€å¾Œç¶šã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’相関ã•ã›ã‚‹ã“ã¨ã§ã€ã‚ªãƒ–ザーãƒãƒ“リティユーザーã¾ãŸã¯ SRE ã¯ã€ã‚¢ãƒ—リケーションフローã®å•é¡Œã‚’診断ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚µãƒ¼ãƒãƒ¼ãƒ¬ã‚¹ã‚„アーキテクãƒãƒ£ã®è¤‡é›‘ã•ã«é–¢ã‚らãšã€ç†è§£ãŒæ¥½ã«ãªã‚Šã¾ã™ã€‚ + +å„トレースã¯è¤‡æ•°ã®ã‚¹ãƒ‘ンã§æ§‹æˆã•ã‚Œã¦ãŠã‚Šã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«é–¢é€£ä»˜ã‘られãŸæœ€åˆã®ã‚¹ãƒ‘ンã¯ãƒ«ãƒ¼ãƒˆã‚¹ãƒ‘ンã¨å‘¼ã°ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ãƒ«ãƒ¼ãƒˆã‚¹ãƒ‘ンã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆå…¨ä½“を最åˆã‹ã‚‰æœ€å¾Œã¾ã§ã‚­ãƒ£ãƒ—ãƒãƒ£ã—ã¾ã™ã€‚ãã®ä¸‹ã«ã‚るスパンã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆä¸­ã«ç™ºç”Ÿã™ã‚‹å„ステップやæ“作ã®è©³ç´°ãªæ´žå¯Ÿã‚’æä¾›ã—ã¾ã™ã€‚トレースãŒãªã‘ã‚Œã°ã€åˆ†æ•£ã‚·ã‚¹ãƒ†ãƒ å†…ã®ãƒ‘フォーマンスã®å•é¡Œã‚’診断ã™ã‚‹ã“ã¨ã¯éžå¸¸ã«é›£ã—ã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚トレースã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒã‚·ã‚¹ãƒ†ãƒ ã‚’通éŽã™ã‚‹éš›ã®ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’詳細ã«ç¤ºã™ã“ã¨ã§ã€åˆ†æ•£ã‚·ã‚¹ãƒ†ãƒ ã®ãƒ‡ãƒãƒƒã‚°ã‚’容易ã«ã—ã€ç†è§£ã‚’助ã‘ã¾ã™ã€‚ + +ã»ã¨ã‚“ã©ã®ã‚ªãƒ–ザーãƒãƒ“リティベンダーã¯ã€ã“ã®æƒ…報をウォーターフォールã¨ã—ã¦è¦–覚化ã—ã¦ãŠã‚Šã€ç›¸å¯¾çš„ãªã‚¿ã‚¤ãƒŸãƒ³ã‚°ã‚’水平棒や比例サイズã§ç¤ºã—ã¦ã„ã¾ã™ã€‚Grafanaã®ä¾‹ï¼š + +NEEDS ALT + +
    + +ログã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã®æ¦‚念ã«æ·±ã慣れ親ã—む必è¦ãŒã‚るユーザーã«ã¯ã€[OpenTelemetry ドキュメント](https://opentelemetry.io/docs/concepts/)ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚ diff --git a/docs/ja/use-cases/observability/integrating-opentelemetry.md b/docs/ja/use-cases/observability/integrating-opentelemetry.md new file mode 100644 index 00000000000..99c3046ac6d --- /dev/null +++ b/docs/ja/use-cases/observability/integrating-opentelemetry.md @@ -0,0 +1,771 @@ +--- +title: OpenTelemetryã®çµ±åˆ +description: オブザーãƒãƒ“リティã®ãŸã‚ã®OpenTelemetryã¨ClickHouseã®çµ±åˆ +slug: /ja/observability/integrating-opentelemetry +keywords: [オブザーãƒãƒ“リティ, ログ, トレース, メトリクス, OpenTelemetry, Grafana, otel] +--- + +# データåŽé›†ã®ãŸã‚ã®OpenTelemetryã®çµ±åˆ + +オブザーãƒãƒ“リティソリューションã«ã¯ã€ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’åŽé›†ãŠã‚ˆã³ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹æ‰‹æ®µãŒå¿…è¦ã§ã™ã€‚ã“ã®ç›®çš„ã®ãŸã‚ã«ã€ClickHouseã¯[OpenTelemetry (OTel) プロジェクト](https://opentelemetry.io/)を推奨ã—ã¦ã„ã¾ã™ã€‚ + +"OpenTelemetryã¯ã€ãƒˆãƒ¬ãƒ¼ã‚¹ã€ãƒ¡ãƒˆãƒªã‚¯ã‚¹ã€ãƒ­ã‚°ãªã©ã®ãƒ†ãƒ¬ãƒ¡ãƒˆãƒªãƒ‡ãƒ¼ã‚¿ã‚’作æˆãŠã‚ˆã³ç®¡ç†ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚ŒãŸã‚ªãƒ–ザーãƒãƒ“リティフレームワークãŠã‚ˆã³ãƒ„ールキットã§ã™ã€‚" + +ClickHouseã‚„Prometheusã¨ã¯ç•°ãªã‚Šã€OpenTelemetryã¯ã‚ªãƒ–ザーãƒãƒ“リティã®ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã§ã¯ãªãã€ãƒ†ãƒ¬ãƒ¡ãƒˆãƒªãƒ‡ãƒ¼ã‚¿ã®ç”Ÿæˆã€åŽé›†ã€ç®¡ç†ã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„ã¾ã™ã€‚OpenTelemetryã®åˆæœŸã®ç›®æ¨™ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¨€èªžå›ºæœ‰ã®SDKを使用ã—ã¦ã‚¢ãƒ—リケーションやシステムを容易ã«è¨ˆè£…ã§ãるよã†ã«ã™ã‚‹ã“ã¨ã§ã—ãŸãŒã€ãã‚Œã¯OpenTelemetryコレクターを通ã˜ãŸãƒ­ã‚°ã®åŽé›†ã‚‚å«ã‚€ã‚ˆã†ã«æ‹¡å¼µã•ã‚Œã¾ã—ãŸã€‚OpenTelemetryコレクターã¯ã€ãƒ†ãƒ¬ãƒ¡ãƒˆãƒªãƒ‡ãƒ¼ã‚¿ã‚’å—ä¿¡ã€å‡¦ç†ã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã¾ãŸã¯ãƒ—ロキシã§ã™ã€‚ + +## ClickHouseã«é–¢é€£ã™ã‚‹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ + +OpenTelemetryã¯å¤šãã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚ä»–ã«ã¯ã€API仕様ã€æ¨™æº–化ã•ã‚ŒãŸãƒ—ロトコルã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰/カラムã®å‘½åè¦å‰‡ã‚’æä¾›ã™ã‚‹ã»ã‹ã€ClickHouseã§ã‚ªãƒ–ザーãƒãƒ“リティソリューションを構築ã™ã‚‹ãŸã‚ã«åŸºæœ¬çš„ãªäºŒã¤ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ï¼š + +- [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/)ã¯ã€ãƒ†ãƒ¬ãƒ¡ãƒˆãƒªãƒ‡ãƒ¼ã‚¿ã‚’å—ä¿¡ã€å‡¦ç†ã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã™ã‚‹ãƒ—ロキシã§ã™ã€‚ClickHouseãŒé§†å‹•ã™ã‚‹ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã€ã“ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’ログåŽé›†ã¨ã‚¤ãƒ™ãƒ³ãƒˆå‡¦ç†ã®ä¸¡æ–¹ã«ä½¿ç”¨ã—ã€ãƒãƒƒãƒå‡¦ç†ãŠã‚ˆã³æŒ¿å…¥ã‚’è¡Œã„ã¾ã™ã€‚ +- テレメトリデータã®ä»•æ§˜ã€APIã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’実装ã™ã‚‹[言語SDK](https://opentelemetry.io/docs/languages/)ã§ã™ã€‚ã“れらã®SDKã¯ã€ã‚¢ãƒ—リケーションã®ã‚³ãƒ¼ãƒ‰å†…ã§ãƒˆãƒ¬ãƒ¼ã‚¹ãŒæ­£ã—ã記録ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã€é–¢é€£ã™ã‚‹ã‚¹ãƒ‘ンãŒç”Ÿæˆã•ã‚Œã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’介ã—ã¦ã‚µãƒ¼ãƒ“ス間ã§ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãŒä¼é”ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€åˆ†æ•£ãƒˆãƒ¬ãƒ¼ã‚¹ãŒå½¢æˆã•ã‚Œã€ã‚¹ãƒ‘ンãŒç›¸é–¢ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ã“れらã®SDKã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚³ãƒ¼ãƒ‰ã‚’変更ã™ã‚‹ã“ã¨ãªãã€ç›´ã¡ã«è¨ˆè£…ã‚’å¾—ã‚‹ã“ã¨ã‚’æ„味ã™ã‚‹ä¸€èˆ¬çš„ãªãƒ©ã‚¤ãƒ–ラリã¨ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã‚’自動的ã«å®Ÿè£…ã™ã‚‹ã‚¨ã‚³ã‚·ã‚¹ãƒ†ãƒ ã«ã‚ˆã£ã¦è£œå®Œã•ã‚Œã¦ã„ã¾ã™ã€‚ + +ClickHouseを駆動ã™ã‚‹ã‚ªãƒ–ザーãƒãƒ“リティソリューションã¯ã€ã“れら両方ã®ãƒ„ールを活用ã—ã¾ã™ã€‚ + +## ディストリビューション + +OpenTelemetryコレクターã«ã¯[多ãã®ãƒ‡ã‚£ã‚¹ãƒˆãƒªãƒ“ューション](https://github.com/open-telemetry/opentelemetry-collector-releases?tab=readme-ov-file)ãŒã‚ã‚Šã¾ã™ã€‚ClickHouseソリューションã«å¿…è¦ãªfilelogレシーãƒãƒ¼ã¨ClickHouseエクスãƒãƒ¼ã‚¿ãƒ¼ã¯ã€[OpenTelemetry Collector Contrib Distro](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib)ã«ã®ã¿å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“ã®ãƒ‡ã‚£ã‚¹ãƒˆãƒªãƒ“ューションã«ã¯å¤šãã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒå«ã¾ã‚Œã¦ãŠã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã•ã¾ã–ã¾ãªæ§‹æˆã§å®Ÿé¨“ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€è£½å“ã§å®Ÿè¡Œã™ã‚‹å ´åˆã¯ã€ç’°å¢ƒã«å¿…è¦ãªã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã¿ã‚’å«ã‚るよã†ã«ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’制é™ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ãã®ç†ç”±ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªã‚‚ã®ãŒã‚ã‚Šã¾ã™ï¼š + +- コレクターã®ã‚µã‚¤ã‚ºã‚’減らã—ã€ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã®ãƒ‡ãƒ—ロイ時間を短縮ã™ã‚‹ +- 利用å¯èƒ½ãªæ”»æ’ƒã®è¡¨é¢ç©ã‚’減らã™ã“ã¨ã§ã€ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’改善ã™ã‚‹ + +[カスタムコレクター](https://opentelemetry.io/docs/collector/custom-collector/)ã®æ§‹ç¯‰ã¯ã€[OpenTelemetry Collector Builder](https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder)を使用ã—ã¦è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## OTelã«ã‚ˆã‚‹ãƒ‡ãƒ¼ã‚¿ã®å–り込㿠+ +### コレクターã®ãƒ‡ãƒ—ロイ役割 + +ログをåŽé›†ã—ã¦ClickHouseã«æŒ¿å…¥ã™ã‚‹ãŸã‚ã«ã€OpenTelemetry Collectorã®ä½¿ç”¨ã‚’推奨ã—ã¾ã™ã€‚OpenTelemetry Collectorã¯ã€ä¸»ã«2ã¤ã®å½¹å‰²ã§ãƒ‡ãƒ—ロイã§ãã¾ã™ï¼š + +- **エージェント** - エージェントインスタンスã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚„Kubernetesノードãªã©ã®ã‚¨ãƒƒã‚¸ã§ãƒ‡ãƒ¼ã‚¿ã‚’åŽé›†ã—ãŸã‚Šã€OpenTelemetry SDKã§è¨ˆè£…ã•ã‚ŒãŸã‚¢ãƒ—リケーションã‹ã‚‰ç›´æŽ¥ã‚¤ãƒ™ãƒ³ãƒˆã‚’å—ä¿¡ã—ãŸã‚Šã—ã¾ã™ã€‚後者ã®å ´åˆã€ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã‚¢ãƒ—リケーションã¨å…±ã«ã€ã¾ãŸã¯ã‚¢ãƒ—リケーションã¨åŒã˜ãƒ›ã‚¹ãƒˆã§å®Ÿè¡Œã•ã‚Œã¾ã™ï¼ˆä¾‹ãˆã°ã‚µã‚¤ãƒ‰ã‚«ãƒ¼ã‚„DaemonSetã¨ã—ã¦ï¼‰ã€‚エージェントã¯ãã®ãƒ‡ãƒ¼ã‚¿ã‚’直接ClickHouseã«é€ä¿¡ã—ãŸã‚Šã€ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«é€ä¿¡ã—ãŸã‚Šã§ãã¾ã™ã€‚å‰è€…ã®å ´åˆã€ã“ã‚Œã¯[エージェントデプロイメントパターン](https://opentelemetry.io/docs/collector/deployment/agent/)ã¨ã—ã¦çŸ¥ã‚‰ã‚Œã¾ã™ã€‚ +- **ゲートウェイ** - ゲートウェイインスタンスã¯ã€ç‹¬ç«‹ã—ãŸã‚µãƒ¼ãƒ“スをæä¾›ã—ã¾ã™ï¼ˆä¾‹ï¼šKubernetesã§ã®ãƒ‡ãƒ—ロイ)。通常ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼ã”ã¨ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼ã”ã¨ã€åœ°åŸŸã”ã¨ã«ã€ã“ã®å½¹å‰²ã¨ã—ã¦å‹•ä½œã—ã¾ã™ã€‚ã“れらã¯OTLPエンドãƒã‚¤ãƒ³ãƒˆã‚’介ã—ã¦ã‚¢ãƒ—リケーション(ã¾ãŸã¯ä»–ã®ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã¨ã—ã¦ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆï¼‰ã‹ã‚‰ã‚¤ãƒ™ãƒ³ãƒˆã‚’å—ä¿¡ã—ã¾ã™ã€‚通常ã€ä¸€é€£ã®ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒãƒ‡ãƒ—ロイã•ã‚Œã€ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚µãŒä½¿ç”¨ã•ã‚Œã¦è² è·ã‚’分散ã—ã¾ã™ã€‚全エージェントã¨ã‚¢ãƒ—リケーションãŒã“ã®å˜ä¸€ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã«ä¿¡å·ã‚’é€ã‚‹å ´åˆã€ã“ã‚Œã¯[ゲートウェイデプロイメントパターン](https://opentelemetry.io/docs/collector/deployment/gateway/)ã¨ã—ã¦ã—ã°ã—ã°è¨€åŠã•ã‚Œã¾ã™ã€‚ + +以下ã€ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ãŒã‚·ãƒ³ãƒ—ルã«ã‚¤ãƒ™ãƒ³ãƒˆã‚’ClickHouseã«ç›´æŽ¥é€ä¿¡ã™ã‚‹ã“ã¨ã‚’想定ã—ã¦ã„ã¾ã™ã€‚ゲートウェイを使用ã™ã‚‹å ´åˆãŠã‚ˆã³ã©ã®ã‚ˆã†ãªå ´åˆã«é©ç”¨ã§ãã‚‹ã‹ã«ã¤ã„ã¦è©³ç´°ã¯ã€Œã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚° with ゲートウェイã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### ログã®åŽé›† + +コレクターを使用ã™ã‚‹ä¸»ãªåˆ©ç‚¹ã¯ã€ã‚µãƒ¼ãƒ“スãŒãƒ‡ãƒ¼ã‚¿ã‚’迅速ã«ã‚ªãƒ•ãƒ­ãƒ¼ãƒ‰ã—ã€ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ãŒå†è©¦è¡Œã€ãƒãƒƒãƒå‡¦ç†ã€æš—å·åŒ–ã€ã¾ãŸã¯æ©Ÿå¯†ãƒ‡ãƒ¼ã‚¿ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ãªã©ã®è¿½åŠ å‡¦ç†ã‚’è² æ‹…ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã™ã‚‹ã“ã¨ã§ã™ã€‚ + +コレクターã¯ã€ãã®3ã¤ã®ä¸»è¦ãªå‡¦ç†ã‚¹ãƒ†ãƒ¼ã‚¸ã«å¯¾ã—ã¦[レシーãƒãƒ¼](https://opentelemetry.io/docs/collector/configuration/#receivers)ã€[プロセッサー](https://opentelemetry.io/docs/collector/configuration/#processors)ã€ãŠã‚ˆã³[エクスãƒãƒ¼ã‚¿ãƒ¼](https://opentelemetry.io/docs/collector/configuration/#exporters)ã¨ã„ã†ç”¨èªžã‚’使用ã—ã¾ã™ã€‚レシーãƒãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿åŽé›†ã«ä½¿ç”¨ã•ã‚Œã€ãƒ—ルベースã¾ãŸã¯ãƒ—ッシュベースã®ã„ãšã‚Œã‹ã§ã™ã€‚プロセッサーã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å¤‰æ›ã¨å¼·åŒ–ã‚’è¡Œã†æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚エクスãƒãƒ¼ã‚¿ãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ダウンストリームサービスã«é€ä¿¡ã™ã‚‹å½¹å‰²ã‚’æŒã¡ã¾ã™ã€‚ã“ã®ã‚µãƒ¼ãƒ“スã¯ç†è«–çš„ã«ã¯åˆ¥ã®ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã§ã‚‚ã‹ã¾ã„ã¾ã›ã‚“ãŒã€åŸºæœ¬çš„ãªãƒ‡ã‚£ã‚¹ã‚«ãƒƒã‚·ãƒ§ãƒ³ã®ãŸã‚ã«ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒClickHouseã«ç›´æŽ¥é€ä¿¡ã•ã‚Œã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ + +NEEDS ALT + +
    + +ユーザーãŒãƒ¬ã‚·ãƒ¼ãƒãƒ¼ã€ãƒ—ロセッサーã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ã‚¿ãƒ¼ã®å®Œå…¨ãªã‚»ãƒƒãƒˆã«æ…£ã‚Œã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +コレクターã¯ãƒ­ã‚°ã‚’åŽé›†ã™ã‚‹ãŸã‚ã®2ã¤ã®ä¸»è¦ãªãƒ¬ã‚·ãƒ¼ãƒãƒ¼ã‚’æä¾›ã—ã¾ã™ï¼š + +**OTLPを介ã—ã¦** - ã“ã®å ´åˆã€ãƒ­ã‚°ã¯OTLPプロトコルを介ã—ã¦OpenTelemetry SDKã‹ã‚‰ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã«ç›´æŽ¥ï¼ˆãƒ—ッシュ)é€ä¿¡ã•ã‚Œã¾ã™ã€‚[OpenTelemetryデモ](https://opentelemetry.io/docs/demo/)ã§ã¯ã“ã®ã‚¢ãƒ—ローãƒãŒæŽ¡ç”¨ã•ã‚Œã¦ãŠã‚Šã€å„言語ã®OTLPエクスãƒãƒ¼ã‚¿ãƒ¼ãŒãƒ­ãƒ¼ã‚«ãƒ«ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã‚’想定ã—ã¦ã„ã¾ã™ã€‚コレクターã¯ã“ã®å ´åˆã€OTLPレシーãƒãƒ¼ã§è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™â€”設定例ã¯ä¸Šè¨˜[デモã®è¨­å®š](https://github.com/ClickHouse/opentelemetry-demo/blob/main/src/otelcollector/otelcol-config.yml#L5-L12)ã‚’å‚照。ã¾ãŸã€ã“ã®ã‚¢ãƒ—ローãƒã®åˆ©ç‚¹ã¯ã€ãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ãŒè‡ªå‹•çš„ã«Trace Idã‚’å«ã‚€ã‚ˆã†ã«ãªã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒç‰¹å®šã®ãƒ­ã‚°ç”¨ã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’判別ã§ãるよã†ã«ãªã‚‹ã“ã¨ã§ã™ã€‚ + +NEEDS ALT + +
    + +ã“ã®ã‚¢ãƒ—ローãƒã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ[é©åˆ‡ãªè¨€èªžSDK](https://opentelemetry.io/docs/languages/)を使用ã—ã¦ã‚³ãƒ¼ãƒ‰ã‚’計装ã™ã‚‹ã“ã¨ãŒæ±‚ã‚られã¾ã™ã€‚ + +- **Filelogレシーãƒãƒ¼ã‚’介ã—ãŸã‚¹ã‚¯ãƒ¬ã‚¤ãƒ”ング** - ã“ã®ãƒ¬ã‚·ãƒ¼ãƒãƒ¼ã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’追跡ã—ã€ãƒ­ã‚°ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å½¢æˆã—ã€ã“れらをClickHouseã«é€ä¿¡ã—ã¾ã™ã€‚ã“ã®ãƒ¬ã‚·ãƒ¼ãƒãƒ¼ã¯ã€å¤šè¡Œãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ¤œå‡ºã€ãƒ­ã‚°ã®ãƒ­ãƒ¼ãƒ«ã‚ªãƒ¼ãƒãƒ¼å‡¦ç†ã€å†èµ·å‹•ã«å¯¾ã™ã‚‹ãƒ­ãƒã‚¹ãƒˆæ€§ã®ãƒã‚§ãƒƒã‚¯ãƒã‚¤ãƒ³ãƒˆè¨­å®šã€æ§‹é€ ã®æŠ½å‡ºãªã©ã€è¤‡é›‘ãªã‚¿ã‚¹ã‚¯ã‚’処ç†ã—ã¾ã™ã€‚ã“ã®ãƒ¬ã‚·ãƒ¼ãƒãƒ¼ã¯ã•ã‚‰ã«ã€Dockerã¨Kubernetesコンテナã®ãƒ­ã‚°ã‚’追跡ã—ã€ã“れらã‹ã‚‰æ§‹é€ ã‚’抽出ã—ã€ãƒãƒƒãƒ‰ã®è©³ç´°ã§å……実ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +NEEDS ALT + +
    + +**ã»ã¨ã‚“ã©ã®ãƒ‡ãƒ—ロイメントã§ã¯ä¸Šè¨˜ã®çµ„ã¿åˆã‚ã›ã‚’使用ã—ã¾ã™ã€‚** ユーザーãŒ[コレクタードキュメント](https://opentelemetry.io/docs/collector/)を読ã¿ã€åŸºæœ¬çš„ãªæ¦‚念や[構æˆæ§‹é€ ](https://opentelemetry.io/docs/collector/configuration/)ãŠã‚ˆã³[インストール方法](https://opentelemetry.io/docs/collector/installation/)ã«æ…£ã‚Œã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +> ヒント: [otelbin.io](https://www.otelbin.io/) ã¯ã€æ§‹æˆã‚’検証ãŠã‚ˆã³è¦–覚化ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +## 構造化vséžæ§‹é€ åŒ– + +ログã¯æ§‹é€ åŒ–ã¾ãŸã¯éžæ§‹é€ åŒ–ã®ã„ãšã‚Œã‹ã§ã™ã€‚ + +構造化ログã¯ã€JSONãªã©ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’使用ã—ã€httpコードやソースIPアドレスãªã©ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’定義ã—ã¾ã™ã€‚ + +``` +{ + "remote_addr":"54.36.149.41", + "remote_user":"-","run_time":"0","time_local":"2019-01-22 00:26:14.000","request_type":"GET", + "request_path":"\/filter\/27|13 ,27| 5 ,p53","request_protocol":"HTTP\/1.1", + "status":"200", + "size":"30577", + "referer":"-", + "user_agent":"Mozilla\/5.0 (compatible; AhrefsBot\/6.1; +http:\/\/ahrefs.com\/robot\/)" +} +``` + +一方ã€éžæ§‹é€ åŒ–ログã¯é€šå¸¸ã€ä½•ã‚‰ã‹ã®å›ºæœ‰ã®æ§‹é€ ã‚’æŒã£ã¦ã„ã‚‹ã‚‚ã®ã®ã€å˜ãªã‚‹æ–‡å­—列ã¨ã—ã¦ãƒ­ã‚°ã‚’表ç¾ã—ã¾ã™ã€‚ + +``` +54.36.149.41 - - [22/Jan/2019:03:56:14 +0330] "GET +/filter/27|13%20%D9%85%DA%AF%D8%A7%D9%BE%DB%8C%DA%A9%D8%B3%D9%84,27|%DA%A9%D9%85%D8%AA%D8%B1%20%D8%A7%D8%B2%205%20%D9%85%DA%AF%D8%A7%D9%BE%DB%8C%DA%A9%D8%B3%D9%84,p53 HTTP/1.1" 200 30577 "-" "Mozilla/5.0 (compatible; AhrefsBot/6.1; +http://ahrefs.com/robot/)" "-" +``` + +ユーザーãŒå¯èƒ½ãªé™ã‚Šæ§‹é€ åŒ–ログを使用ã—ã€JSON(例:ndjson)ã§ãƒ­ã‚°ã‚’記録ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€å¾Œã®ãƒ­ã‚°å‡¦ç†ãŒç°¡ç´ åŒ–ã•ã‚Œã€ClickHouseã«é€ä¿¡ã™ã‚‹å‰ã«[Collector Processor](https://opentelemetry.io/docs/collector/configuration/#processors)や挿入時ã«ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを使用ã—ã¦ç°¡ç´ åŒ–ã•ã‚Œã¾ã™ã€‚構造化ログã¯æœ€çµ‚çš„ã«å¾Œã«å¿…è¦ãªå‡¦ç†ãƒªã‚½ãƒ¼ã‚¹ã‚’節約ã—ã€ClickHouseソリューションã«å¿…è¦ãªCPUを削減ã—ã¾ã™ã€‚ + +### 例 + +例ã¨ã—ã¦ã€æ§‹é€ åŒ–ã•ã‚ŒãŸï¼ˆJSON)ãŠã‚ˆã³éžæ§‹é€ åŒ–ã®ãƒ­ã‚®ãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆï¼ˆãã‚Œãžã‚Œç´„10m行)ãŒä»¥ä¸‹ã®ãƒªãƒ³ã‚¯ã§åˆ©ç”¨å¯èƒ½ã§ã™ï¼š + +- [éžæ§‹é€ åŒ–](https://datasets-documentation.s3.eu-west-3.amazonaws.com/http_logs/access-unstructured.log.gz) +- [構造化](https://datasets-documentation.s3.eu-west-3.amazonaws.com/http_logs/access-structured.log.gz) + +以下ã®ä¾‹ã§ã¯æ§‹é€ åŒ–データセットを使用ã—ã¾ã™ã€‚ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ダウンロードã—ã¦å±•é–‹ã—ã€ä»¥ä¸‹ã®ä¾‹ã‚’å†ç¾ã—ã¦ãã ã•ã„。 + +以下ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’読ã¿è¾¼ã‚€OTel Collectorã®å˜ç´”ãªæ§‹æˆã‚’示ã—ã¦ãŠã‚Šã€filelogレシーãƒãƒ¼ã‚’使用ã—ã¦ã€çµæžœã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’stdoutã«å‡ºåŠ›ã—ã¾ã™ã€‚ログãŒæ§‹é€ åŒ–ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€[`json_parser`](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/docs/operators/json_parser.md)オペレーターを使用ã—ã¾ã™ã€‚`access-structured.log`ファイルã¸ã®ãƒ‘スを修正ã—ã¦ãã ã•ã„。 + +> 以下ã®ä¾‹ã§ã¯ã€ãƒ­ã‚°ã‹ã‚‰ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—を抽出ã—ã¾ã™ã€‚ã“ã‚Œã«ã¯`json_parser`オペレーターを使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã€ãƒ­ã‚°è¡Œå…¨ä½“ã‚’JSON文字列ã«å¤‰æ›ã—ã€çµæžœã‚’`LogAttributes`ã«é…ç½®ã—ã¾ã™ã€‚ã“ã‚Œã¯è¨ˆç®—ãŒé«˜ã‚³ã‚¹ãƒˆã¨ãªã‚‹ã“ã¨ãŒã‚ã‚Šã€[ClickHouseã§ã‚ˆã‚ŠåŠ¹çŽ‡çš„ã«å®Ÿè¡Œã§ãã¾ã™](https://clickhouse.com/blog/worlds-fastest-json-querying-tool-clickhouse-local) - 「SQLã«ã‚ˆã‚‹æ§‹é€ ã®æŠ½å‡ºã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。JSONを抽出ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹`regex_parser`を使用ã—ãŸåŒç­‰ã®éžæ§‹é€ åŒ–例ã¯[ã“ã“](https://pastila.nl/?01da7ee2/2ffd3ba8124a7d6e4ddf39422ad5b863#swBkiAXvGP7mRPgbuzzHFA==)ã§æä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**[config-structured-logs.yaml](https://www.otelbin.io/#config=receivers%3A*N_filelog%3A*N___include%3A*N_____-_%2Fopt%2Fdata%2Flogs%2Faccess-structured.log*N___start*_at%3A_beginning*N___operators%3A*N_____-_type%3A_json*_parser*N_______timestamp%3A*N_________parse*_from%3A_attributes.time*_local*N_________layout%3A_*%22*.Y-*.m-*.d_*.H%3A*.M%3A*.S*%22*N*N*Nprocessors%3A*N__batch%3A*N____timeout%3A_5s*N____send*_batch*_size%3A_1*N*N*Nexporters%3A*N_logging%3A*N___loglevel%3A_debug*N*N*Nservice%3A*N_pipelines%3A*N___logs%3A*N_____receivers%3A_%5Bfilelog%5D*N_____processors%3A_%5Bbatch%5D*N_____exporters%3A_%5Blogging%5D%7E)** + +```yaml +receivers: + filelog: + include: + - /opt/data/logs/access-structured.log + start_at: beginning + operators: + - type: json_parser + timestamp: + parse_from: attributes.time_local + layout: '%Y-%m-%d %H:%M:%S' +processors: + batch: + timeout: 5s + send_batch_size: 1 +exporters: + logging: + loglevel: debug +service: + pipelines: + logs: + receivers: [filelog] + processors: [batch] + exporters: [logging] +``` + +ユーザーã¯[å…¬å¼ã®æŒ‡ç¤º](https://opentelemetry.io/docs/collector/installation/)ã«å¾“ã£ã¦ãƒ­ãƒ¼ã‚«ãƒ«ã«ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’インストールã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚é‡è¦ãªã“ã¨ã¯ã€ã“れらã®æŒ‡ç¤ºãŒ[contribディストリビューション](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib)(`filelog`レシーãƒãƒ¼ãŒå«ã¾ã‚Œã¦ã„る)を使用ã™ã‚‹ã‚ˆã†ã«ä¿®æ­£ã•ã‚Œã‚‹ã“ã¨ã§ã™ã€‚例ã¨ã—ã¦ã€`otelcol_0.102.1_darwin_arm64.tar.gz`ã®ä»£ã‚ã‚Šã«`otelcol-contrib_0.102.1_darwin_arm64.tar.gz`をダウンロードã—ã¾ã™ã€‚リリースã¯[ã“ã“](https://github.com/open-telemetry/opentelemetry-collector-releases/releases)ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +インストールãŒå®Œäº†ã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦OTel Collectorを実行ã§ãã¾ã™ï¼š + +``` +./otelcol-contrib --config config-logs.yaml +``` + +構造化ã•ã‚ŒãŸãƒ­ã‚°ã‚’使用ã™ã‚‹ã¨ä»®å®šã™ã‚‹ã¨ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªå½¢å¼ã§å‡ºåŠ›ã•ã‚Œã¾ã™ï¼š + +``` +LogRecord #98 +ObservedTimestamp: 2024-06-19 13:21:16.414259 +0000 UTC +Timestamp: 2019-01-22 01:12:53 +0000 UTC +SeverityText: +SeverityNumber: Unspecified(0) +Body: Str({"remote_addr":"66.249.66.195","remote_user":"-","run_time":"0","time_local":"2019-01-22 01:12:53.000","request_type":"GET","request_path":"\/product\/7564","request_protocol":"HTTP\/1.1","status":"301","size":"178","referer":"-","user_agent":"Mozilla\/5.0 (Linux; Android 6.0.1; Nexus 5X Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/41.0.2272.96 Mobile Safari\/537.36 (compatible; Googlebot\/2.1; +http:\/\/www.google.com\/bot.html)"}) +Attributes: + -> remote_user: Str(-) + -> request_protocol: Str(HTTP/1.1) + -> time_local: Str(2019-01-22 01:12:53.000) + -> user_agent: Str(Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)) + -> log.file.name: Str(access.log) + -> status: Str(301) + -> size: Str(178) + -> referer: Str(-) + -> remote_addr: Str(66.249.66.195) + -> request_type: Str(GET) + -> request_path: Str(/product/7564) + -> run_time: Str(0) +Trace ID: +Span ID: +Flags: 0 +``` + +上記ã¯ã€OTelコレクターã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸå˜ä¸€ã®ãƒ­ã‚°ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表ã—ã¦ã„ã¾ã™ã€‚ã“れらåŒã˜ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’後ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ClickHouseã«æŠ•å…¥ã—ã¾ã™ã€‚ + +ログメッセージã®å®Œå…¨ãªã‚¹ã‚­ãƒ¼ãƒžã¯ã€[ã“ã¡ã‚‰](https://opentelemetry.io/docs/specs/otel/logs/data-model/)ã§ç¶­æŒã•ã‚Œã¦ã„ã¾ã™ã€‚**ユーザーã¯ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã«æ…£ã‚Œã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚** + +é‡è¦ãªã®ã¯ã€ãƒ­ã‚°è¡Œè‡ªä½“ãŒ`Body`フィールド内ã«æ–‡å­—列ã¨ã—ã¦ä¿æŒã•ã‚Œã¦ã„ã‚‹ã“ã¨ã§ã™ãŒã€JSONãŒ`json_parser`ã®ãŠã‹ã’ã§Attributesフィールドã«è‡ªå‹•æŠ½å‡ºã•ã‚Œã¦ã„ã‚‹ã“ã¨ã§ã™ã€‚ã“ã®åŒã˜[オペレーター](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/docs/operators/README.md#what-operators-are-available)を使用ã—ã¦ã€é©åˆ‡ãª`Timestamp`カラムã«ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—を抽出ã—ã¦ã„ã¾ã™ã€‚OTelã§ã®ãƒ­ã‚°å‡¦ç†ã®æŽ¨å¥¨äº‹é …ã«ã¤ã„ã¦ã¯ã€Œå‡¦ç†ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +> オペレーターã¯ã€ãƒ­ã‚°å‡¦ç†ã®æœ€ã‚‚基本的ãªå˜ä½ã§ã™ã€‚å„オペレーターã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‹ã‚‰è¡Œã‚’読ã¿å–ã‚‹ã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‹ã‚‰JSONを解æžã™ã‚‹ãªã©ã®å˜ä¸€ã®è²¬ä»»ã‚’æžœãŸã—ã¾ã™ã€‚オペレーターã¯ã€ãã®ç›®çš„ã‚’é”æˆã™ã‚‹ãŸã‚ã«ãƒ‘イプラインã§éŽ–ã§ã¤ãªãŒã‚Œã¾ã™ã€‚ + +> 上記ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«ã¯TraceIDã‚„SpanIDフィールドãŒã‚ã‚Šã¾ã›ã‚“。[分散トレース](https://opentelemetry.io/docs/concepts/observability-primer/#distributed-traces)を実装ã—ã¦ã„ã‚‹å ´åˆãªã©ã€å¿…è¦ãªå ´åˆã«ã¯ã€ä¸Šè¨˜ã®ã‚ˆã†ã«JSONã‹ã‚‰æŠ½å‡ºã§ãã¾ã™ã€‚ + +ローカルã¾ãŸã¯kubernetesã®ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã‚’åŽé›†ã™ã‚‹å¿…è¦ãŒã‚るユーザーã«ã¯ã€[filelogレシーãƒãƒ¼](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/filelogreceiver/README.md#configuration)ã§åˆ©ç”¨å¯èƒ½ãªæ§‹æˆã‚ªãƒ—ションã¨[オフセットã®å–り扱ã„](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver#offset-tracking)ãŠã‚ˆã³[多行ログã®è§£æžæ–¹æ³•](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver#example---multiline-logs-parsing)ã«é–¢ã—ã¦ç†è§£ã‚’æ·±ã‚ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## Kubernetesログã®åŽé›† + +Kubernetesログã®åŽé›†ã«ã¯ã€[Open Telemetryドキュメントガイド](https://opentelemetry.io/docs/kubernetes/)ã®åˆ©ç”¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ログやメトリクスをãƒãƒƒãƒ‰ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã§å¼·åŒ–ã™ã‚‹ãŸã‚ã«[Kubernetes Attributes Processor](https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-attributes-processor)ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ©ãƒ™ãƒ«ã®ã‚ˆã†ãªå‹•çš„ãªãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’生æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ã‚«ãƒ©ãƒ `ResourceAttributes`ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚ClickHouseã§ã¯ã€ç¾æ™‚点ã§ã“ã®ã‚«ãƒ©ãƒ ã«ã¯åž‹`Map(String, String)`を使用ã—ã¦ã„ã¾ã™ã€‚ã“ã®åž‹ã®æ“作ã¨æœ€é©åŒ–ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€Œãƒžãƒƒãƒ—ã®ä½¿ç”¨ã€ã¨ã€Œãƒžãƒƒãƒ—ã‹ã‚‰ã®æŠ½å‡ºã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## トレースã®åŽé›† + +コードを計装ã—ã¦ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’åŽé›†ã—ãŸã„ユーザーã«ã¯ã€å…¬å¼ã®[OTelドキュメント](https://opentelemetry.io/docs/languages/)ã«å¾“ã†ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +ClickHouseã«ã‚¤ãƒ™ãƒ³ãƒˆã‚’é€ä¿¡ã™ã‚‹ãŸã‚ã«ã¯ã€é©åˆ‡ãªãƒ¬ã‚·ãƒ¼ãƒãƒ¼ã‚’介ã—ã¦OTLPプロトコルã§ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¤ãƒ™ãƒ³ãƒˆã‚’å—ä¿¡ã™ã‚‹OTelコレクターをデプロイã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚OpenTelemetryデモã§ã¯ã€[対応ã™ã‚‹è¨€èªžã‚’計装ã—](https://opentelemetry.io/docs/demo/)イベントをコレクターã«é€ä¿¡ã™ã‚‹ä¾‹ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚stdoutã«ã‚¤ãƒ™ãƒ³ãƒˆã‚’出力ã™ã‚‹é©åˆ‡ãªã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã®è¨­å®šä¾‹ã‚’以下ã«ç¤ºã—ã¾ã™ï¼š + +### 例 + +トレースã¯OTLPã§å—ä¿¡ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ç”Ÿæˆç”¨ã«[telemetrygen](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/telemetrygen)ツールを使用ã—ã¾ã™ã€‚インストールã«ã¤ã„ã¦ã®æŒ‡ç¤ºã¯[ã“ã¡ã‚‰](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/telemetrygen)ã«ã‚ã‚Šã¾ã™ã€‚ + +以下ã®è¨­å®šã¯ã€OTLPレシーãƒãƒ¼ã§ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¤ãƒ™ãƒ³ãƒˆã‚’å—ã‘å–ã‚Šã€ãれをstdoutã«é€ä¿¡ã—ã¾ã™ã€‚ + +[config-traces.xml](https://www.otelbin.io/#config=receivers%3A*N_otlp%3A*N___protocols%3A*N_____grpc%3A*N_______endpoint%3A_0.0.0.0%3A4317*N*Nprocessors%3A*N_batch%3A*N___timeout%3A_1s*N*Nexporters%3A*N_logging%3A*N___loglevel%3A_debug*N*Nservice%3A*N_pipelines%3A*N__traces%3A*N____receivers%3A_%5Botlp%5D*N____processors%3A_%5Bbatch%5D*N____exporters%3A_%5Blogging%5D%7E) + +```yaml +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 +processors: + batch: + timeout: 1s +exporters: + logging: + loglevel: debug +service: + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [logging] +``` + +ã“ã®è¨­å®šã‚’以下ã®ã‚³ãƒžãƒ³ãƒ‰ã§å®Ÿè¡Œã—ã¾ã™ï¼š + +```bash +./otelcol-contrib --config config-traces.yaml +``` + +トレースイベントをコレクターã«é€ä¿¡ã™ã‚‹ãŸã‚ã«ã¯ã€`telemetrygen`を使用ã—ã¦ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + +```bash +$GOBIN/telemetrygen traces --otlp-insecure --traces 300 +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€ä»¥ä¸‹ã«ç¤ºã™ã‚ˆã†ãªãƒˆãƒ¬ãƒ¼ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒstdoutã«å‡ºåŠ›ã•ã‚Œã¾ã™ï¼š + +``` +Span #86 + Trace ID : 1bb5cdd2c9df5f0da320ca22045c60d9 + Parent ID : ce129e5c2dd51378 + ID : fbb14077b5e149a0 + Name : okey-dokey-0 + Kind : Server + Start time : 2024-06-19 18:03:41.603868 +0000 UTC + End time : 2024-06-19 18:03:41.603991 +0000 UTC + Status code : Unset + Status message : +Attributes: + -> net.peer.ip: Str(1.2.3.4) + -> peer.service: Str(telemetrygen-client) +``` + +上記ã¯ã€OTelコレクターã«ã‚ˆã£ã¦ç”Ÿæˆã•ã‚ŒãŸå˜ä¸€ã®ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表ã—ã¦ã„ã¾ã™ã€‚ã“れらåŒã˜ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’後ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ClickHouseã«æŠ•å…¥ã—ã¾ã™ã€‚ + +トレースメッセージã®å®Œå…¨ãªã‚¹ã‚­ãƒ¼ãƒžã¯[ã“ã¡ã‚‰](https://opentelemetry.io/docs/concepts/signals/traces/)ã§ç¶­æŒã•ã‚Œã¦ã„ã¾ã™ã€‚ユーザーã¯ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã«æ…£ã‚Œã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚ + +## å‡¦ç† - フィルタリングã€å¤‰æ›ã€å……実化 + +以å‰ã®ä¾‹ã§ç¤ºã—ãŸãƒ­ã‚°ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—を設定ã™ã‚‹ã‚ˆã†ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚¤ãƒ™ãƒ³ãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’フィルタリングã€å¤‰æ›ã€å……実化ã—ãŸã„ã¨è€ƒãˆã‚‹ã“ã¨ãŒã‚ˆãã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€Open Telemetryã§ã®ã„ãã¤ã‹ã®èƒ½åŠ›ã‚’使用ã—ã¦é”æˆã§ãã¾ã™ï¼š + +- **プロセッサー** - プロセッサーã¯ã€[レシーãƒãƒ¼ãŒåŽé›†ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’変更ã¾ãŸã¯å¤‰æ›](https://opentelemetry.io/docs/collector/transforming-telemetry/)ã—ã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ã‚¿ãƒ¼ã«é€ä¿¡ã™ã‚‹å‰ã«ãã®ãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã—ã¾ã™ã€‚[推奨ã•ã‚Œã‚‹ãƒ—ロセッサー](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor#recommended-processors) ã®æœ€å°ã‚»ãƒƒãƒˆã¯é€šå¸¸æŽ¨å¥¨ã•ã‚Œã¾ã™ãŒã€ã“れらã¯ä»»æ„ã§ã™ã€‚OTeLコレクターをClickHouseã¨å…±ã«ä½¿ç”¨ã™ã‚‹éš›ã«ã¯ã€ä»¥ä¸‹ã‚’プロセッサーã«åˆ¶é™ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ï¼š + + - [memory_limiter](https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/memorylimiterprocessor/README.md) ã¯ã€ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã§ã®ãƒ¡ãƒ¢ãƒªä¸è¶³ã‚’防ããŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚「リソースã®è¦‹ç©ã‚‚ã‚Šã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + - コンテキストã«åŸºã¥ã„ã¦å¼·åŒ–ã‚’è¡Œã†ãƒ—ロセッサー。ãŸã¨ãˆã°ã€[Kubernetes Attributes Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor) ã¯ã€k8sメタデータã§æŒ‡æ¨™ã‚„ログã®ãƒªã‚½ãƒ¼ã‚¹å±žæ€§ã‚’自動設定ã—ã¦ã€ã‚¤ãƒ™ãƒ³ãƒˆã‚’ãれらã®ã‚½ãƒ¼ã‚¹ãƒãƒƒãƒ‰IDã§å¼·åŒ–ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + - トレースãŒå¿…è¦ãªå ´åˆã®[末尾もã—ãã¯å…ˆç«¯ã®ã‚µãƒ³ãƒ—リング](https://opentelemetry.io/docs/concepts/sampling/)。 + - [基本的ãªãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°](https://opentelemetry.io/docs/collector/transforming-telemetry/) - オペレーターã§ã§ããªã„å ´åˆã®å‰Šé™¤ã‚¤ãƒ™ãƒ³ãƒˆã€‚ + - [ãƒãƒƒãƒ](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor) - データãŒãƒãƒƒãƒã§é€ä¿¡ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ãŸã‚ã«ClickHouseã§ä½œæ¥­ã™ã‚‹éš›ã«å¿…é ˆã§ã™ã€‚ClickHouseã¸ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +- **オペレーター** - [オペレーター](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/docs/operators/README.md)ã¯ã€ãƒ¬ã‚·ãƒ¼ãƒãƒ¼ã§åˆ©ç”¨å¯èƒ½ãªå‡¦ç†ã®æœ€ã‚‚基本的ãªå˜ä½ã‚’æä¾›ã—ã¾ã™ã€‚基本的ãªè§£æžãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€Severityã¨Timestampãªã©ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’設定ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚JSONã¨æ­£è¦è¡¨ç¾ã®è§£æžãŒã“ã“ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ãŠã‚Šã€ãã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã¨åŸºæœ¬çš„ãªå¤‰æ›ãŒå¯èƒ½ã§ã™ã€‚ã“ã“ã§ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +オペレーターã¾ãŸã¯[トランスフォームプロセッサー](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/transformprocessor/README.md)を使用ã—ã¦éŽå‰°ãªã‚¤ãƒ™ãƒ³ãƒˆå‡¦ç†ã‚’è¡Œã‚ãªã„ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“れらã¯ç›¸å½“ãªãƒ¡ãƒ¢ãƒªãŠã‚ˆã³CPUオーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€ç‰¹ã«JSON解æžã€‚ã—ã‹ã—ã€æŒ¿å…¥æ™‚ã«ClickHouseã§ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¨ã‚«ãƒ©ãƒ ã‚’使ã£ã¦ã™ã¹ã¦ã®å‡¦ç†ã‚’è¡Œã†ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ãŸã ã—ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆèªè­˜ãŒå¿…è¦ãªå¼·åŒ–(例:k8sメタデータã®è¿½åŠ ï¼‰ã¯é™¤ãã¾ã™ã€‚「SQLã§ã®æ§‹é€ ã®æŠ½å‡ºã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ã‚‚ã—ã€OTelコレクターを使用ã—ã¦å‡¦ç†ã‚’ã™ã‚‹å ´åˆã€ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã§ã®å¤‰æ›ã‚’推奨ã—ã€ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã§è¡Œã†ä½œæ¥­ã‚’最å°é™ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å‹•ä½œã™ã‚‹ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆãŒå¿…è¦ã¨ã™ã‚‹ãƒªã‚½ãƒ¼ã‚¹ãŒå¯èƒ½ãªé™ã‚Šæœ€å°åŒ–ã•ã‚Œã¾ã™ã€‚通常ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ï¼ˆä¸è¦ãªãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä½¿ç”¨ã‚’最å°åŒ–ã™ã‚‹ãŸã‚)ã€ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—設定(オペレーターを通ã—ã¦ï¼‰ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãŒå¿…è¦ãªå¼·åŒ–をエージェントã§è¡Œã†ã®ã‚’見ã¾ã™ã€‚ãŸã¨ãˆã°ã€ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒç•°ãªã‚‹Kubernetesクラスターã«å­˜åœ¨ã™ã‚‹å ´åˆã€k8sã®å¼·åŒ–ã¯ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã§ç™ºç”Ÿã—ã¾ã™ã€‚ + +### 例 + +以下ã®è¨­å®šã¯ã€éžæ§‹é€ åŒ–ログファイルã®åŽé›†ã‚’示ã—ã¾ã™ã€‚ログ行ã‹ã‚‰æ§‹é€ ã‚’抽出ã™ã‚‹ãŸã‚ã®ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ãƒ¼ï¼ˆ`regex_parser`)ã¨ã‚¤ãƒ™ãƒ³ãƒˆã‚’フィルタリングã™ã‚‹ãŸã‚ã®ä½¿ç”¨ã€åŠã³ã‚¤ãƒ™ãƒ³ãƒˆã‚’ãƒãƒƒãƒå‡¦ç†ã—メモリ使用é‡ã‚’制é™ã™ã‚‹ãŸã‚ã®ãƒ—ロセッサーを利用ã—ã¦ã„ã¾ã™ã€‚ + +[config-unstructured-logs-with-processor.yaml](https://www.otelbin.io/#config=receivers%3A*N_filelog%3A*N___include%3A*N_____-_%2Fopt%2Fdata%2Flogs%2Faccess-unstructured.log*N___start*_at%3A_beginning*N___operators%3A*N_____-_type%3A_regex*_parser*N_______regex%3A_*%22%5E*C*QP*Lip*G%5B*Bd.%5D*P*D*Bs*P-*Bs*P-*Bs*P*B%5B*C*QP*Ltimestamp*G%5B%5E*B%5D%5D*P*D*B%5D%5C*%22*C*QP*Lmethod*G%5BA-Z%5D*P*D*Bs*P*C*QP*Lurl*G%5B%5E*Bs%5D*P*D*Bs*PHTTP%2F%5B%5E*Bs%5D*P%22*Bs*P*C*QP*Lstatus*G*Bd*P*D*Bs*P*C*QP*Lsize*G*Bd*P*D*Bs*P%22*C*QP*Lreferrer*G%5B%5E%22%5D***D%22*Bs*P%22*C*QP*Luser*_agent*G%5B%5E%22%5D***D%22*%22*N_______timestamp%3A*N_________parse*_from%3A_attributes.timestamp*N_________layout%3A_*%22*.d%2F*.b%2F*.Y%3A*.H%3A*.M%3A*.S_*.z*%22*N_________*H22%2FJan%2F2019%3A03%3A56%3A14_*P0330*N*N*Nprocessors%3A*N_batch%3A*N___timeout%3A_1s*N___send*_batch*_size%3A_100*N_memory*_limiter%3A*N___check*_interval%3A_1s*N___limit*_mib%3A_2048*N___spike*_limit*_mib%3A_256*N*N*Nexporters%3A*N_logging%3A*N___loglevel%3A_debug*N*N*Nservice%3A*N_pipelines%3A*N___logs%3A*N_____receivers%3A_%5Bfilelog%5D*N_____processors%3A_%5Bbatch%2C_memory*_limiter%5D*N_____exporters%3A_%5Blogging%5D%7E) + +```yaml +receivers: + filelog: + include: + - /opt/data/logs/access-unstructured.log + start_at: beginning + operators: + - type: regex_parser + regex: '^(?P[\d.]+)\s+-\s+-\s+\[(?P[^\]]+)\]\s+"(?P[A-Z]+)\s+(?P[^\s]+)\s+HTTP/[^\s]+"\s+(?P\d+)\s+(?P\d+)\s+"(?P[^"]*)"\s+"(?P[^"]*)"' + timestamp: + parse_from: attributes.timestamp + layout: '%d/%b/%Y:%H:%M:%S %z' + #22/Jan/2019:03:56:14 +0330 +processors: + batch: + timeout: 1s + send_batch_size: 100 + memory_limiter: + check_interval: 1s + limit_mib: 2048 + spike_limit_mib: 256 +exporters: + logging: + loglevel: debug +service: + pipelines: + logs: + receivers: [filelog] + processors: [batch, memory_limiter] + exporters: [logging] +``` + +```bash +./otelcol-contrib --config config-unstructured-logs-with-processor.yaml +``` + +## ClickHouseã¸ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ + +エクスãƒãƒ¼ã‚¿ãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿ã‚’1ã¤ä»¥ä¸Šã®ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã¾ãŸã¯ç›®çš„地ã«é€ä¿¡ã—ã¾ã™ã€‚エクスãƒãƒ¼ã‚¿ãƒ¼ã¯ãƒ—ルã¾ãŸã¯ãƒ—ッシュベースã§ã™ã€‚ClickHouseã«ã‚¤ãƒ™ãƒ³ãƒˆã‚’é€ä¿¡ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒ—ッシュベースã®[ClickHouseエクスãƒãƒ¼ã‚¿ãƒ¼](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/clickhouseexporter/README.md)を使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +> ClickHouseエクスãƒãƒ¼ã‚¿ãƒ¼ã¯ã‚³ã‚¢ãƒ‡ã‚£ã‚¹ãƒˆãƒªãƒ“ューションã§ã¯ãªãã€[OpenTelemetry Collector Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main)ã®ä¸€éƒ¨ã§ã™ã€‚ユーザーã¯Contribディストリビューションを使用ã™ã‚‹ã‹ã€[独自ã®ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’構築](https://opentelemetry.io/docs/collector/custom-collector/)ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +完全ãªæ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã¯ä»¥ä¸‹ã«ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ + +[clickhouse-config.yaml](https://www.otelbin.io/#config=receivers%3A*N_filelog%3A*N___include%3A*N_____-_%2Fopt%2Fdata%2Flogs%2Faccess-structured.log*N___start*_at%3A_beginning*N___operators%3A*N_____-_type%3A_json*_parser*N_______timestamp%3A*N_________parse*_from%3A_attributes.time*_local*N_________layout%3A_*%22*.Y-*.m-*.d_*.H%3A*.M%3A*.S*%22*N_otlp%3A*N____protocols%3A*N______grpc%3A*N________endpoint%3A_0.0.0.0%3A4317*N*Nprocessors%3A*N_batch%3A*N___timeout%3A_5s*N___send*_batch*_size%3A_5000*N*Nexporters%3A*N_clickhouse%3A*N___endpoint%3A_tcp%3A%2F%2Flocalhost%3A9000*Qdial*_timeout*E10s*Acompress*Elz4*Aasync*_insert*E1*N___*H_ttl%3A_72h*N___traces*_table*_name%3A_otel*_traces*N___logs*_table*_name%3A_otel*_logs*N___create*_schema%3A_true*N___timeout%3A_5s*N___database%3A_default*N___sending*_queue%3A*N_____queue*_size%3A_1000*N___retry*_on*_failure%3A*N_____enabled%3A_true*N_____initial*_interval%3A_5s*N_____max*_interval%3A_30s*N_____max*_elapsed*_time%3A_300s*N*Nservice%3A*N_pipelines%3A*N___logs%3A*N_____receivers%3A_%5Bfilelog%5D*N_____processors%3A_%5Bbatch%5D*N_____exporters%3A_%5Bclickhouse%5D*N___traces%3A*N____receivers%3A_%5Botlp%5D*N____processors%3A_%5Bbatch%5D*N____exporters%3A_%5Bclickhouse%5D%7E&distro=otelcol-contrib%7E&distroVersion=v0.103.1%7E) + +```yaml +receivers: + filelog: + include: + - /opt/data/logs/access-structured.log + start_at: beginning + operators: + - type: json_parser + timestamp: + parse_from: attributes.time_local + layout: '%Y-%m-%d %H:%M:%S' + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 +processors: + batch: + timeout: 5s + send_batch_size: 5000 +exporters: + clickhouse: + endpoint: tcp://localhost:9000?dial_timeout=10s&compress=lz4&async_insert=1 + # ttl: 72h + traces_table_name: otel_traces + logs_table_name: otel_logs + create_schema: true + timeout: 5s + database: default + sending_queue: + queue_size: 1000 + retry_on_failure: + enabled: true + initial_interval: 5s + max_interval: 30s + max_elapsed_time: 300s + + +service: + pipelines: + logs: + receivers: [filelog] + processors: [batch] + exporters: [clickhouse] + traces: + receivers: [otlp] + processors: [batch] + exporters: [clickhouse] +``` + +次ã«ã€é‡è¦ãªè¨­å®šã‚’示ã—ã¦ã„ã¾ã™ï¼š + +- **パイプライン** - 上記ã®è¨­å®šã§ã¯ã€ãƒ¬ã‚·ãƒ¼ãƒãƒ¼ã€ãƒ—ロセッサーã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ã‚¿ãƒ¼ã®ã‚»ãƒƒãƒˆã¨ã—ã¦[パイプライン](https://opentelemetry.io/docs/collector/configuration/#pipelines)ã®ä½¿ç”¨ãŒãƒã‚¤ãƒ©ã‚¤ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ログã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã®ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ +- **エンドãƒã‚¤ãƒ³ãƒˆ** - ClickHouseã¨ã®é€šä¿¡ã¯`endpoint`パラメータã§è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚接続文字列`tcp://localhost:9000?dial_timeout=10s&compress=lz4&async_insert=1`ã«ã‚ˆã‚Šã€é€šä¿¡ã¯TCP上ã§è¡Œã‚ã‚Œã¾ã™ã€‚ユーザーãŒãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯ã‚¹ã‚¤ãƒƒãƒãƒ³ã‚°ã®ç†ç”±ã§HTTPを好む場åˆã¯ã€[ã“ã“](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/clickhouseexporter/README.md#configuration-options)ã§è¨˜è¼‰ã•ã‚Œã¦ã„るよã†ã«ã“ã®æŽ¥ç¶šæ–‡å­—列を変更ã—ã¦ãã ã•ã„。完全ãªæŽ¥ç¶šè©³ç´°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードをã“ã®æŽ¥ç¶šæ–‡å­—列ã«æŒ‡å®šã™ã‚‹èƒ½åŠ›ã‚’æŒã¤ã‚‚ã®ã¯ã€[ã“ã“](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/clickhouseexporter/README.md#configuration-options)ã§è©³ã—ã説明ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +**é‡è¦:** 上記ã®æŽ¥ç¶šæ–‡å­—列ã¯ã€åœ§ç¸®ï¼ˆlz4)ã¨éžåŒæœŸæŒ¿å…¥ã®ä¸¡æ–¹ã‚’有効ã«ã—ã¦ã„ã¾ã™ã€‚ç§ãŸã¡ã¯ã€å¸¸ã«ä¸¡æ–¹ã‚’有効ã«ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚éžåŒæœŸæŒ¿å…¥ã«é–¢ã™ã‚‹è©³ç´°ã¯ã€Œãƒãƒƒãƒå‡¦ç†ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。圧縮ã¯å¸¸ã«æŒ‡å®šã•ã‚Œãªã‘ã‚Œã°ãªã‚‰ãšã€ä»¥å‰ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ã‚¿ãƒ¼ã®å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åŠ¹ã«ã•ã‚Œã¦ã„ã¾ã›ã‚“。 + +- **ttl** - ã“ã“ã§ã®å€¤ã¯ãƒ‡ãƒ¼ã‚¿ãŒä¿æŒã•ã‚Œã‚‹æœŸé–“を決定ã—ã¾ã™ã€‚より詳ã—ã„情報ã¯ã€Œãƒ‡ãƒ¼ã‚¿ã®ç®¡ç†ã€ã«ã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯æ™‚é–“å˜ä½ã§æ™‚間を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例:72h。以下ã®ä¾‹ã§ã¯ç„¡åŠ¹åŒ–ã—ã¦ã„ã¾ã™ã€‚データãŒ2019å¹´ã®ã‚‚ã®ã§ã€æŒ¿å…¥å¾Œã™ãã«ClickHouseã«ã‚ˆã£ã¦å‰Šé™¤ã•ã‚Œã‚‹ãŸã‚ã§ã™ã€‚ +- **traces_table_name** 㨠**logs_table_name** - ログã¨ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã®åå‰ã‚’決定ã—ã¾ã™ã€‚ +- **create_schema** - デフォルトã®ã‚¹ã‚­ãƒ¼ãƒžã§ãƒ†ãƒ¼ãƒ–ルを起動時ã«ä½œæˆã™ã‚‹ã‹ã©ã†ã‹ã‚’決定ã—ã¾ã™ã€‚最åˆã¯çœŸã«è¨­å®šã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ユーザーã¯ã€ã“ã®å€¤ã‚’å½ã«è¨­å®šã—ã€ç‹¬è‡ªã®ã‚¹ã‚­ãƒ¼ãƒžã‚’定義ã™ã‚‹ã¹ãã§ã™ã€‚ +- **database** - 対象データベース。 +- **retry_on_failure** - 失敗ã—ãŸãƒãƒƒãƒã‚’å†è©¦è¡Œã™ã‚‹ã‹ã©ã†ã‹ã‚’決定ã™ã‚‹è¨­å®šã€‚ +- **batch** - ãƒãƒƒãƒãƒ—ロセッサーãŒã‚¤ãƒ™ãƒ³ãƒˆã‚’ãƒãƒƒãƒã¨ã—ã¦é€ä¿¡ã™ã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚5000ã»ã©ã®å€¤ã‚’推奨ã—ã€ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚’5sã¨ã—ã¦ã„ã¾ã™ã€‚ã“れらã®ã„ãšã‚Œã‹ãŒæœ€åˆã«é”ã—ãŸå ´åˆã€ãƒãƒƒãƒãŒãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ã‚¿ãƒ¼ã«é€ä¿¡ã•ã‚Œã¾ã™ã€‚ã“れらã®å€¤ã‚’下ã’ã‚‹ã“ã¨ã§ã€ã‚ˆã‚Šé€Ÿã„レイテンシーパイプラインã«ãªã‚Šã€ãƒ‡ãƒ¼ã‚¿ãŒå³åº§ã«ã‚¯ã‚¨ãƒªå¯èƒ½ã«ãªã‚‹ä¸€æ–¹ã§ã€ã‚ˆã‚Šå¤šãã®æŽ¥ç¶šã¨ãƒãƒƒãƒãŒClickHouseã«é€ä¿¡ã•ã‚Œã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚éžåŒæœŸæŒ¿å…¥ã‚’使用ã—ã¦ã„ãªã„å ´åˆã¯å•é¡Œã‚’引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ã“れを推奨ã—ã¾ã›ã‚“(ClickHouseã§ã®[éŽå¤šãƒ‘ーツ](https://clickhouse.com/blog/common-getting-started-issues-with-clickhouse#1-too-many-parts)ã®å•é¡Œï¼‰ã€‚逆ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒéžåŒæœŸæŒ¿å…¥ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€ã“れらã®è¨­å®šã§ãƒ‡ãƒ¼ã‚¿ãŒä¾ç„¶ã¨ã—ã¦ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€Œãƒãƒƒãƒå‡¦ç†ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- **sending_queue** - é€ä¿¡ã‚­ãƒ¥ãƒ¼ã®ã‚µã‚¤ã‚ºã‚’制御ã—ã¾ã™ã€‚キューã«ã¯ãƒãƒƒãƒãŒå«ã¾ã‚Œã¦ãŠã‚Šã€ã“ã®ã‚­ãƒ¥ãƒ¼ãŒè¶…éŽã™ã‚‹ã¨ã€ãƒãƒƒãƒãŒãƒ‰ãƒ­ãƒƒãƒ—ã•ã‚Œã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€Œãƒãƒƒã‚¯ãƒ—レッシャーã®å‡¦ç†ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +構造化ログファイルを抽出ã—ã€èªè¨¼ã•ã‚Œã¦ã„ãªã„[ローカルインスタンスã®ClickHouse](https://clickhouse.com/docs/ja/install)ãŒå®Ÿè¡Œä¸­ã§ã‚ã‚‹ã¨ä»®å®šã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦ã“ã®è¨­å®šã‚’実行ã§ãã¾ã™ï¼š + +```bash +./otelcol-contrib --config clickhouse-config.yaml +``` + +ã“ã®ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã«ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹ãŸã‚ã«ã¯ã€`telemetrygen`ツールを使用ã—ã¦ã®ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ï¼š + +```bash +$GOBIN/telemetrygen traces --otlp-insecure --traces 300 +``` + +実行中ã®éš›ã«ã¯ã€ç°¡å˜ãªã‚¯ã‚¨ãƒªã§ãƒ­ã‚°ã‚¤ãƒ™ãƒ³ãƒˆãŒå­˜åœ¨ã™ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„: + +```sql +SELECT * +FROM otel_logs +LIMIT 1 +FORMAT Vertical + +Row 1: +────── +Timestamp: 2019-01-22 06:46:14.000000000 +TraceId: +SpanId: +TraceFlags: 0 +SeverityText: +SeverityNumber: 0 +ServiceName: +Body: {"remote_addr":"109.230.70.66","remote_user":"-","run_time":"0","time_local":"2019-01-22 06:46:14.000","request_type":"GET","request_path":"\/image\/61884\/productModel\/150x150","request_protocol":"HTTP\/1.1","status":"200","size":"1684","referer":"https:\/\/www.zanbil.ir\/filter\/p3%2Cb2","user_agent":"Mozilla\/5.0 (Windows NT 6.1; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0"} +ResourceSchemaUrl: +ResourceAttributes: {} +ScopeSchemaUrl: +ScopeName: +ScopeVersion: +ScopeAttributes: {} +LogAttributes: {'referer':'https://www.zanbil.ir/filter/p3%2Cb2','log.file.name':'access-structured.log','run_time':'0','remote_user':'-','request_protocol':'HTTP/1.1','size':'1684','user_agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0','remote_addr':'109.230.70.66','request_path':'/image/61884/productModel/150x150','status':'200','time_local':'2019-01-22 06:46:14.000','request_type':'GET'} + +1 row in set. Elapsed: 0.012 sec. Processed 5.04 thousand rows, 4.62 MB (414.14 thousand rows/s., 379.48 MB/s.) +Peak memory usage: 5.41 MiB. + + +åŒæ§˜ã«ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¤ãƒ™ãƒ³ãƒˆã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯`otel_traces`テーブルを確èªã§ãã¾ã™ï¼š + +SELECT * +FROM otel_traces +LIMIT 1 +FORMAT Vertical + +Row 1: +────── +Timestamp: 2024-06-20 11:36:41.181398000 +TraceId: 00bba81fbd38a242ebb0c81a8ab85d8f +SpanId: beef91a2c8685ace +ParentSpanId: +TraceState: +SpanName: lets-go +SpanKind: SPAN_KIND_CLIENT +ServiceName: telemetrygen +ResourceAttributes: {'service.name':'telemetrygen'} +ScopeName: telemetrygen +ScopeVersion: +SpanAttributes: {'peer.service':'telemetrygen-server','net.peer.ip':'1.2.3.4'} +Duration: 123000 +StatusCode: STATUS_CODE_UNSET +StatusMessage: +Events.Timestamp: [] +Events.Name: [] +Events.Attributes: [] +Links.TraceId: [] +Links.SpanId: [] +Links.TraceState: [] +Links.Attributes: [] +``` + +## ã™ãã«ä½¿ãˆã‚‹ã‚¹ã‚­ãƒ¼ãƒž + +デフォルトã§ã¯ã€ClickHouseエクスãƒãƒ¼ã‚¿ãƒ¼ã¯ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã®ãŸã‚ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ­ã‚°ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ã“ã‚Œã¯`create_schema`ã®è¨­å®šã‚’通ã˜ã¦ç„¡åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã•ã‚‰ã«ã€`otel_logs`ãŠã‚ˆã³`otel_traces`ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‹ã‚‰ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã®åå‰ã‚’変更ã™ã‚‹ã“ã¨ãŒä¸Šè¨˜ã§è¨­å®šã•ã‚Œã¾ã—ãŸã€‚ + +> 以下ã®ã‚¹ã‚­ãƒ¼ãƒ ã¯ã€TTLãŒ72時間ã¨ã—ã¦è¨­å®šã•ã‚ŒãŸå ´åˆã‚’想定ã—ã¦ã„ã¾ã™ã€‚ + +ログã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚¹ã‚­ãƒ¼ãƒžã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼ˆ`otelcol-contrib v0.102.1`): + +```sql +CREATE TABLE default.otel_logs +( + `Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)), + `TraceId` String CODEC(ZSTD(1)), + `SpanId` String CODEC(ZSTD(1)), + `TraceFlags` UInt32 CODEC(ZSTD(1)), + `SeverityText` LowCardinality(String) CODEC(ZSTD(1)), + `SeverityNumber` Int32 CODEC(ZSTD(1)), + `ServiceName` LowCardinality(String) CODEC(ZSTD(1)), + `Body` String CODEC(ZSTD(1)), + `ResourceSchemaUrl` String CODEC(ZSTD(1)), + `ResourceAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `ScopeSchemaUrl` String CODEC(ZSTD(1)), + `ScopeName` String CODEC(ZSTD(1)), + `ScopeVersion` String CODEC(ZSTD(1)), + `ScopeAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `LogAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + INDEX idx_trace_id TraceId TYPE bloom_filter(0.001) GRANULARITY 1, + INDEX idx_res_attr_key mapKeys(ResourceAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_res_attr_value mapValues(ResourceAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_scope_attr_key mapKeys(ScopeAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_scope_attr_value mapValues(ScopeAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_log_attr_key mapKeys(LogAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_log_attr_value mapValues(LogAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_body Body TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 1 +) +ENGINE = MergeTree +PARTITION BY toDate(Timestamp) +ORDER BY (ServiceName, SeverityText, toUnixTimestamp(Timestamp), TraceId) +TTL toDateTime(Timestamp) + toIntervalDay(3) +SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1 +``` + +ã“ã®ã‚«ãƒ©ãƒ ã¯ã€å…¬å¼ä»•æ§˜ã«åŸºã¥ãOTelã®ãƒ­ã‚°ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³[ã“ã¡ã‚‰](https://opentelemetry.io/docs/specs/otel/logs/data-model/)ã«åŸºã¥ãã‚‚ã®ã§ã™ã€‚ + +ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã®é‡è¦ãªãƒã‚¤ãƒ³ãƒˆï¼š + +- デフォルトã§ãƒ†ãƒ¼ãƒ–ルã¯`PARTITION BY toDate(Timestamp)`ã«ã‚ˆã£ã¦æ—¥ä»˜ã§ãƒ‘ーティションã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šæœ‰éŽãŽãŸãƒ‡ãƒ¼ã‚¿ã®å‰Šé™¤ãŒåŠ¹çŽ‡çš„ã«è¡Œã‚ã‚Œã¾ã™ã€‚ +- TTL ㌠`TTL toDateTime(Timestamp) + toIntervalDay(3)` を通ã˜ã¦è¨­å®šã•ã‚Œã¦ãŠã‚Šã€ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼æ§‹æˆã§è¨­å®šã•ã‚Œã¦ã„る値ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚[`ttl_only_drop_parts=1`](/ja/operations/settings/settings#ttl_only_drop_parts) ã¨ã¯ã€ä¿å­˜ã•ã‚ŒãŸã™ã¹ã¦ã®è¡ŒãŒæœŸé™åˆ‡ã‚Œã«ãªã£ãŸã¨ãã«ãƒ‘ーツ全体ãŒå‰Šé™¤ã•ã‚Œã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚クリックãƒã‚¦ã‚¹ã«ãŠã‘ã‚‹ã€ã“ã®ç‰¹æ€§ã¯ã“高価ãªå‰Šé™¤ã‚’é¿ã‘ã‚‹ã“ã¨ãŒå¯èƒ½ã«ã—ã¾ã™ã€‚ã“れを常ã«è¨­å®šã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€ŒTTLã«ã‚ˆã‚‹ãƒ‡ãƒ¼ã‚¿ç®¡ç†ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- テーブルã¯å¤å…¸çš„ãª[`MergeTree`エンジン](/ja/engines/table-engines/mergetree-family/mergetree)を使用ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ãƒ­ã‚°ã‚„トレースã«æŽ¨å¥¨ã•ã‚Œã¦ãŠã‚Šã€å¤‰æ›´ã™ã‚‹å¿…è¦ã¯ã»ã¨ã‚“ã©ã‚ã‚Šã¾ã›ã‚“。 +- テーブルã¯`ORDER BY (ServiceName, SeverityText, toUnixTimestamp(Timestamp), TraceId)` ã«ã‚ˆã£ã¦æ•´ç†ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªã¯ServiceNameã€SeverityTextã€Timestampã€TraceIdã«å¯¾ã™ã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã«æœ€é©åŒ–ã•ã‚Œã¾ã™ - リストã®å…ˆé ­ã®ã‚«ãƒ©ãƒ ã¯å¾Œã®ã‚«ãƒ©ãƒ ã‚ˆã‚Šã‚‚速ãフィルタリングã•ã‚Œã¾ã™ã€‚ユーザーã¯æœŸå¾…ã•ã‚Œã‚‹ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã«å¿œã˜ã¦ã“ã®é †åºã‚’変更ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€Œä¸»ã‚­ãƒ¼ã®é¸æŠžã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- 上記ã®ã‚¹ã‚­ãƒ¼ãƒžã¯ã‚«ãƒ©ãƒ ã«`ZSTD(1)`ã‚’é©ç”¨ã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ãƒ­ã‚°ã«æœ€é©ãªåœ§ç¸®ã‚’æä¾›ã—ã¾ã™ã€‚ユーザーã¯ã‚ˆã‚Šè‰¯ã„圧縮を目指ã—ã¦ZSTDã®åœ§ç¸®ãƒ¬ãƒ™ãƒ«ï¼ˆä¸Šè¨˜ã®1)を増やã™ã“ã¨ãŒã§ãã¾ã™ãŒã€é€šå¸¸ã‚ã¾ã‚Šåˆ©ç›Šã‚’å¾—ã¾ã›ã‚“。ã“ã®å€¤ã‚’増やã™ã“ã¨ã¯ã€æŒ¿å…¥æ™‚ã®CPUオーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ï¼ˆåœ§ç¸®ä¸­ï¼‰ã‚’増加ã•ã›ã¾ã™ãŒã€è§£å‡ï¼ˆã‚¯ã‚¨ãƒªï¼‰ã¯åŒç­‰ã®æ€§èƒ½ã‚’æŒã¡ç¶šã‘ã‚‹ã¨äºˆæƒ³ã•ã‚Œã¾ã™ã€‚ã•ã‚‰ãªã‚‹è©³ç´°ã¯[ã“ã¡ã‚‰](https://clickhouse.com/blog/optimize-clickhouse-codecs-compression-schema)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。追加ã®[デルタエンコーディング](https://clickhouse.com/docs/ja/sql-reference/statements/create/table#delta)ãŒTimestampã«å¯¾ã—ã¦é©ç”¨ã•ã‚Œã¦ãŠã‚Šã€ãã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚µã‚¤ã‚ºã‚’縮å°ã™ã‚‹ã“ã¨ã‚’目的ã¨ã—ã¦ã„ã¾ã™ã€‚ +- `ResourceAttributes`ã‚„`LogAttributes`ã€`ScopeAttributes`ãŒãƒžãƒƒãƒ—ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ユーザーã¯ã“れらã®é•ã„ã«æ…£ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ ã“ã®ãƒžãƒƒãƒ—ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹æ–¹æ³•ã‚„キーã¸ã®æœ€é©åŒ–ã«ã¤ã„ã¦ã¯ã€Œãƒžãƒƒãƒ—を使ã†ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- ãã®ä»–ã®ã‚¿ã‚¤ãƒ—ã‚‚`ServiceName`ãªã©æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚Bodyカラムã¯ã€JSONã§ã‚ã‚‹ã«ã‚‚ã‹ã‹ã‚らãšã€æ–‡å­—列ã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚ +- ブルームフィルターã¯ãƒžãƒƒãƒ—キーã€å€¤ã€ãŠã‚ˆã³Bodyカラムã«é©ç”¨ã•ã‚Œã¾ã™ã€‚ã“れらã¯ã“れらã®ã‚«ãƒ©ãƒ ã®ã‚¯ã‚¨ãƒªæ™‚間を改善ã™ã‚‹ã“ã¨ã‚’æ„図ã—ã¦ãŠã‚Šã€é€šå¸¸ã¯ä¸è¦ã§ã™ã€‚ "二次/データスキップインデックス"ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +```sql +CREATE TABLE default.otel_traces +( + `Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)), + `TraceId` String CODEC(ZSTD(1)), + `SpanId` String CODEC(ZSTD(1)), + `ParentSpanId` String CODEC(ZSTD(1)), + `TraceState` String CODEC(ZSTD(1)), + `SpanName` LowCardinality(String) CODEC(ZSTD(1)), + `SpanKind` LowCardinality(String) CODEC(ZSTD(1)), + `ServiceName` LowCardinality(String) CODEC(ZSTD(1)), + `ResourceAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `ScopeName` String CODEC(ZSTD(1)), + `ScopeVersion` String CODEC(ZSTD(1)), + `SpanAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `Duration` Int64 CODEC(ZSTD(1)), + `StatusCode` LowCardinality(String) CODEC(ZSTD(1)), + `StatusMessage` String CODEC(ZSTD(1)), + `Events.Timestamp` Array(DateTime64(9)) CODEC(ZSTD(1)), + `Events.Name` Array(LowCardinality(String)) CODEC(ZSTD(1)), + `Events.Attributes` Array(Map(LowCardinality(String), String)) CODEC(ZSTD(1)), + `Links.TraceId` Array(String) CODEC(ZSTD(1)), + `Links.SpanId` Array(String) CODEC(ZSTD(1)), + `Links.TraceState` Array(String) CODEC(ZSTD(1)), + `Links.Attributes` Array(Map(LowCardinality(String), String)) CODEC(ZSTD(1)), + INDEX idx_trace_id TraceId TYPE bloom_filter(0.001) GRANULARITY 1, + INDEX idx_res_attr_key mapKeys(ResourceAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_res_attr_value mapValues(ResourceAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_span_attr_key mapKeys(SpanAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_span_attr_value mapValues(SpanAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_duration Duration TYPE minmax GRANULARITY 1 +) +ENGINE = MergeTree +PARTITION BY toDate(Timestamp) +ORDER BY (ServiceName, SpanName, toUnixTimestamp(Timestamp), TraceId) +TTL toDateTime(Timestamp) + toIntervalDay(3) +SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1 +``` + +å†åº¦ã€ã“ã‚Œã¯å…¬å¼ä»•æ§˜ã«åŸºã¥ãOTelã®ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã¯[ã“ã¡ã‚‰](https://opentelemetry.io/docs/specs/otel/trace/api/)ã§è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚ ã“ã¡ã‚‰ã®ã‚¹ã‚­ãƒ¼ãƒžã¯ã€ãƒ­ã‚°ã‚¹ã‚­ãƒ¼ãƒžã®å¤šãã®åŒã˜è¨­å®šã‚’使用ã—ã¦ãŠã‚Šã€ã‚¹ãƒ‘ン専用ã®è¿½åŠ ãƒªãƒ³ã‚¯ã‚«ãƒ©ãƒ ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +ユーザーã¯è‡ªå‹•ã‚¹ã‚­ãƒ¼ãƒžã®ä½œæˆã‚’無効ã«ã—ã€æ‰‹å‹•ã§ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ä¸»è¦ãŠã‚ˆã³äºŒæ¬¡ã‚­ãƒ¼ã®å¤‰æ›´ã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンス最é©åŒ–ã®ãŸã‚ã®è¿½åŠ ã®ã‚«ãƒ©ãƒ ã®å°Žå…¥ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ 詳細ã¯ã€Œã‚¹ã‚­ãƒ¼ãƒžè¨­è¨ˆã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 挿入ã®æœ€é©åŒ– + +高ã„挿入性能をé”æˆã—ã€ä¸€è²«æ€§ã®å¼·ã„ä¿è¨¼ã‚’å¾—ã‚‹ãŸã‚ã«ã€ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’通ã˜ãŸè¦³æ¸¬å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«æŒ¿å…¥ã™ã‚‹éš›ã«ã¯ã‚·ãƒ³ãƒ—ルãªãƒ«ãƒ¼ãƒ«ã«æº–æ‹ ã—ã¦ãã ã•ã„。OTelコレクターã®æ­£ã—ã„設定ã«ã‚ˆã‚Šã€ã“ã®ãƒ«ãƒ¼ãƒ«ã«å¾“ã†ã“ã¨ã¯ç°¡å˜ã§ã—ょã†ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒClickHouseを最åˆã«ä½¿ç”¨ã™ã‚‹éš›ã®ã‚ˆãã‚ã‚‹[å•é¡Œ](https://clickhouse.com/blog/common-getting-started-issues-with-clickhouse)ã‚’é¿ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### ãƒãƒƒãƒå‡¦ç† + +デフォルトã§ã¯ã€ClickHouseã«é€ä¿¡ã•ã‚ŒãŸå„挿入ã¯ClickHouseãŒç›´ã¡ã«ãã®ãƒ‡ãƒ¼ã‚¿ã¨ä»–ã®ä¿å­˜ã™ã‚‹å¿…è¦ã®ã‚るメタデータをå«ã‚€ãƒ‘ーツをストレージã«ä½œæˆã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ã—ãŸãŒã£ã¦å„挿入ãŒã‚ˆã‚Šå¤šãã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã¿ã€å°è¦æ¨¡ãªæŒ¿å…¥ã‚’より多ãé€ä¿¡ã™ã‚‹å ´åˆã«æœ€é©åŒ–ã•ã‚Œã¾ã™ã€‚1000以上ã®è¡Œã‚’å«ã‚€ã‹ãªã‚Šå¤§ããªãƒãƒƒãƒã§ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](https://clickhouse.com/blog/asynchronous-data-inserts-in-clickhouse#data-needs-to-be-batched-for-optimal-performance)ã«ã‚ã‚Šã¾ã™ã€‚ + +デフォルトã§ã€ClickHouseã¸ã®æŒ¿å…¥ã¯åŒæœŸçš„ã§ã‚ã‚Šã€åŒä¸€ã®å ´åˆã¯å†ªç­‰ã§ã™ã€‚マージツリーエンジンファミリーã®ãƒ†ãƒ¼ãƒ–ルã§ã¯ã€ClickHouseã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§è‡ªå‹•çš„ã«[挿入時ã«é‡è¤‡ã‚’排除](https://clickhouse.com/blog/common-getting-started-issues-with-clickhouse#5-deduplication-at-insert-time)ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æŒ¿å…¥ãŒä»¥ä¸‹ã®ã‚ˆã†ãªå ´åˆã«è¨±å®¹ã•ã‚Œã¾ã™ï¼š + +1. データをå—ä¿¡ã™ã‚‹ãƒŽãƒ¼ãƒ‰ã«å•é¡ŒãŒã‚ã‚‹å ´åˆã€INSERTクエリãŒã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆï¼ˆã¾ãŸã¯ã‚ˆã‚Šå…·ä½“çš„ãªã‚¨ãƒ©ãƒ¼ã‚’è¿”ã™ï¼‰ã—ã€ç¢ºèªãŒå¾—られã¾ã›ã‚“。 +2. ノードã«ã‚ˆã£ã¦ãƒ‡ãƒ¼ã‚¿ãŒæ›¸ãè¾¼ã¾ã‚Œã¾ã—ãŸãŒã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®ä¸­æ–­ãŒåŽŸå› ã§é€ä¿¡å´ã«ç¢ºèªã‚’è¿”ã™ã“ã¨ãŒã§ããªã„å ´åˆã€é€ä¿¡å´ã¯ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¾ãŸã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¨ãƒ©ãƒ¼ã‚’体験ã—ã¾ã™ã€‚ + +コレクターã®è¦³ç‚¹ã‹ã‚‰ã¯ã€(1)ã¨(2)ã¯åŒºåˆ¥ãŒé›£ã—ã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã—ã‹ã—ã€ã©ã¡ã‚‰ã®å ´åˆã‚‚確èªã•ã‚Œã¦ã„ãªã„挿入ã¯ãŸã ã¡ã«å†è©¦è¡Œã§ãã¾ã™ã€‚å…ƒã®æŒ¿å…¥ãŒæˆåŠŸã—ãŸå ´åˆã€æ–°ã—ã試行ã•ã‚ŒãŸæŒ¿å…¥ãŒç„¡è¦–ã•ã‚Œã¾ã™ã€‚ + +ユーザーãŒä¸Šè¨˜ã®ãƒãƒƒãƒãƒ—ロセッサーを使用ã—ã¦ã€æŒ¿å…¥ã‚’一貫性ã®ã‚ã‚‹è¡Œã®ãƒãƒƒãƒã¨ã—ã¦é€ä¿¡ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒãƒƒãƒãƒ—ロセッサーã®`timeout`ãŒé”æˆã•ã‚Œã‚‹å‰ã«ãƒãƒƒãƒãŒãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ã“ã¨ã«ãªã‚Šã€ãƒ‘イプラインã®ã‚¨ãƒ³ãƒ‰ãƒ„ーエンドã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ãŒä½Žããªã‚Šã€ãƒãƒƒãƒãŒä¸€è²«ã‚µã‚¤ã‚ºã«ãªã‚Šã¾ã™ã€‚ + +### éžåŒæœŸæŒ¿å…¥ã®ä½¿ç”¨ + +コレクターã®ã‚¹ãƒ«ãƒ¼ãƒ—ットãŒä½Žãã€ãƒ‡ãƒ¼ã‚¿ãŒClickHouseã«åˆ°é”ã™ã‚‹æœ€ä½Žé™ã®ã‚¨ãƒ³ãƒ‰ãƒ„ーエンドã®å¾…ã¡æ™‚間を期待ã™ã‚‹å ´åˆã€å¤§ããªãƒãƒƒãƒã‚’é€ä¿¡ã™ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ãƒãƒƒãƒãƒ—ロセッサーã®`timeout`ãŒæœŸé™åˆ‡ã‚Œã«ãªã‚‹ã¨ãã«å°ã•ãªãƒãƒƒãƒãŒé€ä¿¡ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šå•é¡ŒãŒç™ºç”Ÿã—ã€éžåŒæœŸæŒ¿å…¥ãŒå¿…è¦ã¨ãªã‚Šã¾ã™ã€‚ã“ã®å ´åˆã¯ç‰¹ã«**エージェント役ã¨ã—ã¦ClickHouseã«ç›´æŽ¥é€ä¿¡ã™ã‚‹ã‚ˆã†ã«ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ãŒæ§‹æˆã•ã‚Œã¦ã„ã‚‹å ´åˆ**ã«ç™ºç”Ÿã—ã¾ã™ã€‚ゲートウェイã¯ã€é›†ç´„器ã¨ã—ã¦æ©Ÿèƒ½ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ã“ã®å•é¡Œã‚’軽減ã—ã¾ã™ - 「ゲートウェイを使用ã—ãŸã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +大ããªãƒãƒƒãƒã‚’ä¿è¨¼ã§ããªã„å ´åˆã¯ã€ClickHouseを使用ã—ã¦éžåŒæœŸæŒ¿å…¥ã‚’[éžåŒæœŸæŒ¿å…¥](/ja/cloud/bestpractices/asynchronous-inserts)使用ã—ã¦ãƒãƒƒãƒå‡¦ç†ã‚’委任ã§ãã¾ã™ã€‚データã¯ã¾ãšãƒãƒƒãƒ•ã‚¡ã«æŒ¿å…¥ã•ã‚Œã€ãã®å¾Œãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ + +NEEDS ALT + +
    + +[éžåŒæœŸæŒ¿å…¥ã‚’有効ã«ã™ã‚‹ã¨](/ja/optimize/asynchronous-inserts#enabling-asynchronous-inserts)ã€ClickHouseãŒâ‘ Insertクエリをå—ã‘å–ã‚Šã€ãã®ã‚¯ã‚¨ãƒªã®ãƒ‡ãƒ¼ã‚¿ãŒâ‘¡ç›´ã¡ã«ãƒ¡ãƒ¢ãƒªå†…ãƒãƒƒãƒ•ã‚¡ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ ③次ã®ãƒãƒƒãƒ•ã‚¡ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ãŒè¡Œã‚れるã¨ãã€ãƒãƒƒãƒ•ã‚¡å†…ã®ãƒ‡ãƒ¼ã‚¿ã¯[ソートã•ã‚Œ](/ja/optimize/sparse-primary-indexes#data-is-stored-on-disk-ordered-by-primary-key-columns)ã€ãƒ‘ートã¨ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚注æ„点ã¨ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãŒã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹å‰ã«ã¯ã‚¯ã‚¨ãƒªã§æ¤œç´¢ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ãƒãƒƒãƒ•ã‚¡ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã¯[設定å¯èƒ½](/ja/optimize/asynchronous-inserts)ã§ã™ã€‚ + +コレクターã«å¯¾ã™ã‚‹éžåŒæœŸæŒ¿å…¥ã‚’有効ã«ã™ã‚‹ã«ã¯ã€`async_insert=1`を接続文字列ã«è¿½åŠ ã—ã¾ã™ã€‚é…é€ä¿è¨¼ã‚’å¾—ã‚‹ãŸã‚ã«`wait_for_async_insert=1`を使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã•ã‚‰ã«è©³ç´°ã¯[ã“ã¡ã‚‰](https://clickhouse.com/blog/asynchronous-data-inserts-in-clickhouse)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +éžåŒæœŸæŒ¿å…¥ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã¯ã€ClickHouseãƒãƒƒãƒ•ã‚¡ãŒãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã‚Œã‚‹ã¨æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚挿入ã¯`async_insert_max_data_size`を超éŽã—ãŸã¨ãã€ã¾ãŸã¯æœ€åˆã®INSERTクエリã‹ã‚‰`async_insert_busy_timeout_ms`ミリ秒ãŒçµŒéŽã—ãŸå¾Œã«è¡Œã‚ã‚Œã¾ã™ã€‚`async_insert_stale_timeout_ms`ãŒã‚¼ãƒ­ã§ãªã„値ã«è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯`async_insert_stale_timeout_ms`ミリ秒ãŒæœ€çµ‚クエリã‹ã‚‰çµŒéŽã—ãŸå¾Œã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ユーザーã¯ã“れらã®è¨­å®šã‚’調整ã—ã¦ã€ãƒ‘イプラインã®ã‚¨ãƒ³ãƒ‰ãƒ„ーエンドã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ã‚’制御ã§ãã¾ã™ã€‚ãƒãƒƒãƒ•ã‚¡ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã‚’最é©åŒ–ã™ã‚‹ãŸã‚ã«è¿½åŠ ã®è¨­å®šã¯[ã“ã¡ã‚‰](/ja/operations/settings/settings#asynchronous-insert-settings)ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã¾ã™ã€‚一般ã«ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãŒé©åˆ‡ã§ã™ã€‚ + +> エージェントã®æ•°ãŒå°‘ãªãã€ã‚¹ãƒ«ãƒ¼ãƒ—ットãŒä½Žã„ãŒåŽ³æ ¼ãªã‚¨ãƒ³ãƒ‰ãƒ„ーエンドã®ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·ãƒ¼ãŒæ±‚ã‚られる場åˆã€[é©å¿œéžåŒæœŸæŒ¿å…¥](https://clickhouse.com/blog/clickhouse-release-24-02#adaptive-asynchronous-inserts)ãŒæœ‰ç”¨ã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚一般的ã«ã€ã“れらã¯ClickHouseã§è¦‹ã‚‰ã‚Œã‚‹è¦³æ¸¬æ€§ã®é«˜ã‚¹ãƒ«ãƒ¼ãƒ—ットユースケースã«ã¯é©åˆã—ã¾ã›ã‚“。 + +最後ã«ã€éžåŒæœŸæŒ¿å…¥ã‚’使用ã™ã‚‹éš›ã€ClickHouseã¸ã®åŒæœŸæŒ¿å…¥ã«é–¢é€£ã™ã‚‹ä»¥å‰ã®é‡è¤‡æŽ’除ã®å‹•ä½œã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯æœ‰åŠ¹ã«ãªã£ã¦ã„ã¾ã›ã‚“。必è¦ã«å¿œã˜ã¦ã€è¨­å®š[`async_insert_deduplicate`](/ja/operations/settings/settings#async-insert-deduplicate)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ã“ã®æ©Ÿèƒ½ã®è©³ç´°ãªè¨­å®šã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](/ja/optimize/asynchronous-inserts#enabling-asynchronous-inserts)ã§è©³ã—ã説明ã•ã‚Œã¦ãŠã‚Šã€æ·±æŽ˜ã‚Šã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](https://clickhouse.com/blog/asynchronous-data-inserts-in-clickhouse)ãŒã‚ã‚Šã¾ã™ã€‚ + +## デプロイメントアーキテクãƒãƒ£ + +OTelコレクターをClickhouseã§ä½¿ç”¨ã™ã‚‹éš›ã®ã„ãã¤ã‹ã®ãƒ‡ãƒ—ロイメントアーキテクãƒãƒ£ãŒå¯èƒ½ã§ã™ã€‚ãã‚Œãžã‚Œã®æ¦‚è¦ã¨é©ç”¨å¯èƒ½ãªå ´åˆã‚’以下ã§èª¬æ˜Žã—ã¾ã™ã€‚ + +### エージェントã®ã¿ + +エージェントã®ã¿ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã§ã¯ã€OTelコレクターをエッジã«ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã¨ã—ã¦ãƒ‡ãƒ—ロイã—ã¾ã™ã€‚ã“れらã¯ãƒ­ãƒ¼ã‚«ãƒ«ã‚¢ãƒ—リケーション(例:サイドカーコンテナ)ã‹ã‚‰ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’å—ä¿¡ã—ã€ã‚µãƒ¼ãƒãƒ¼ã¾ãŸã¯Kubernetesノードã‹ã‚‰ãƒ­ã‚°ã‚’åŽé›†ã—ã¾ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆãŒãƒ‡ãƒ¼ã‚¿ã‚’ClickHouseã«ç›´æŽ¥é€ä¿¡ã—ã¾ã™ã€‚ + +NEEDS ALT + +
    + +ã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã¯ã€ä¸­å°è¦æ¨¡ã®ãƒ‡ãƒ—ロイメントã«é©ã—ã¦ã„ã¾ã™ã€‚ãã®ä¸»ãªåˆ©ç‚¹ã¯ã€è¿½åŠ ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‚’å¿…è¦ã¨ã›ãšã€ClickHouse観測å¯èƒ½æ€§ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã®å…¨ä½“çš„ãªãƒªã‚½ãƒ¼ã‚¹ãƒ•ãƒƒãƒˆãƒ—リントを最å°é™ã«æŠ‘ãˆã€ã‚¢ãƒ—リケーションã¨ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã¨ã®é–“ã«ã‚·ãƒ³ãƒ—ルãªãƒžãƒƒãƒ”ングをæŒã¤ã“ã¨ã§ã™ã€‚ + +エージェントã®æ•°ãŒæ•°ç™¾ã‚’超ãˆã‚‹å ´åˆã¯ã€ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ãƒ™ãƒ¼ã‚¹ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã¸ã®ç§»è¡Œã‚’検討ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã«ã¯ã„ãã¤ã‹ã®æ¬ ç‚¹ãŒã‚ã‚Šã€ã‚¹ã‚±ãƒ¼ãƒ«ã®å•é¡Œã‚’抱ãˆã¦ã„ã¾ã™ï¼š + +- **接続スケーリング** - å„エージェントã¯ClickHouseã«æŽ¥ç¶šã‚’確立ã—ã¾ã™ã€‚ClickHouseã¯æ•°ç™¾ï¼ˆå ´åˆã«ã‚ˆã£ã¦ã¯æ•°åƒï¼‰ã®åŒæ™‚挿入接続を維æŒå¯èƒ½ã§ã™ãŒã€æœ€çµ‚çš„ã«ã¯ãã‚ŒãŒåˆ¶é™è¦å› ã¨ãªã‚Šã€æŒ¿å…¥ãŒéžåŠ¹çŽ‡ã«ãªã‚Šã¾ã™ã€‚ã¤ã¾ã‚Šã€ClickHouseãŒæŽ¥ç¶šã‚’維æŒã™ã‚‹ãŸã‚ã«ã‚ˆã‚Šå¤šãã®ãƒªã‚½ãƒ¼ã‚¹ã‚’消費ã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ゲートウェイを使用ã™ã‚‹ã“ã¨ã§æŽ¥ç¶šæ•°ã‚’最å°é™ã«æŠ‘ãˆã€æŒ¿å…¥ã®åŠ¹çŽ‡ã‚’上ã’ã¾ã™ã€‚ +- **エッジã§ã®å‡¦ç†** - ã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã§ã¯ã€å¤‰æ›ã‚„イベント処ç†ãŒã‚¨ãƒƒã‚¸ã¾ãŸã¯ClickHouseã§è¡Œã‚れる必è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®åˆ¶é™ã¯ã€è¤‡é›‘ãªClickHouseã®Materialized Viewã‚’æ„味ã™ã‚‹ã‹ã€é‡è¦ãªã‚µãƒ¼ãƒ“スã«å½±éŸ¿ã‚’与ãˆã€ãƒªã‚½ãƒ¼ã‚¹ãŒä¹ã—ã„エッジã«å¤§é‡ã®è¨ˆç®—を押ã—付ã‘ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +- **å°è¦æ¨¡ãªãƒãƒƒãƒã¨ãƒ¬ã‚¤ãƒ†ãƒ³ã‚·** - エージェントコレクターã¯ãã‚Œãžã‚Œéžå¸¸ã«å°‘ãªã„イベントをåŽé›†ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€é…ä¿¡SLAを満ãŸã™ãŸã‚ã«ä¸€å®šã®é–“éš”ã§ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹ã‚ˆã†ã«æ§‹æˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ãŒClickHouseã«å°è¦æ¨¡ãªãƒãƒƒãƒã‚’é€ä¿¡ã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ä¸åˆ©ã§ã™ãŒã€ã€ŒæŒ¿å…¥ã®æœ€é©åŒ–ã€ã‚’å‚ç…§ã—ã¦éžåŒæœŸæŒ¿å…¥ã§è»½æ¸›ã§ãã¾ã™ã€‚ + +### ゲートウェイを用ã„ãŸã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚° + +OTelコレクターã¯ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¨ã—ã¦ãƒ‡ãƒ—ロイã•ã‚Œã€ä¸Šè¨˜ã®åˆ¶é™ã«å¯¾å‡¦ã—ã¾ã™ã€‚ã“れらã¯å˜ç‹¬ã®ã‚µãƒ¼ãƒ“スをæä¾›ã—ã€é€šå¸¸ã¯ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼ã‚„地域ã”ã¨ã«å±•é–‹ã•ã‚Œã¾ã™ã€‚ã“れらã¯å˜ä¸€ã®OTLPエンドãƒã‚¤ãƒ³ãƒˆçµŒç”±ã§ã‚¢ãƒ—リケーション(ã¾ãŸã¯ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«å†…ã®ä»–ã®ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ï¼‰ã‹ã‚‰ã‚¤ãƒ™ãƒ³ãƒˆã‚’å—ä¿¡ã—ã¾ã™ã€‚通常ã€ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®ã‚»ãƒƒãƒˆãŒãƒ‡ãƒ—ロイã•ã‚Œã€ãƒ­ãƒ¼ãƒ‰ãƒãƒ©ãƒ³ã‚µãƒ¼ã‚’使用ã—ã¦ãれらã®è² è·ã‚’分散ã—ã¾ã™ã€‚ + +NEEDS ALT + +
    + +ã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã®ç›®çš„ã¯ã€ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‹ã‚‰è¨ˆç®—ã«é›†ä¸­çš„ãªå‡¦ç†ã‚’オフロードã—ã€ãã‚Œã«ã‚ˆã£ã¦ãƒªã‚½ãƒ¼ã‚¹ã®ä½¿ç”¨ã‚’最å°é™ã«æŠ‘ãˆã‚‹ã“ã¨ã§ã™ã€‚ã“れらã®ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ã¯ã€ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆãŒè¡Œã†å¿…è¦ãŒã‚る変æ›ã‚¿ã‚¹ã‚¯ã‚’実行ã§ãã¾ã™ã€‚ã•ã‚‰ã«ã€å¤šãã®ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‹ã‚‰ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’集約ã™ã‚‹ã“ã¨ã§ã€ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ã¯ClickHouseã«å¤§è¦æ¨¡ãªãƒãƒƒãƒã‚’é€ä¿¡ã§ãã€åŠ¹çŽ‡çš„ãªæŒ¿å…¥ãŒå¯èƒ½ã§ã™ã€‚エージェントãŒè¿½åŠ ã•ã‚Œã€ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚¹ãƒ«ãƒ¼ãƒ—ットãŒå¢—加ã™ã‚‹ã«ã¤ã‚Œã¦ã€ã“れらã®ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã¯ç°¡å˜ã«ã‚¹ã‚±ãƒ¼ãƒ«ã§ãã¾ã™ã€‚以下ã«ã€ä¾‹ã¨ã—ã¦ã®ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤è¨­å®šã¨ã€ãã‚Œã«é–¢é€£ã™ã‚‹ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆè¨­å®šãŒç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚エージェントã¨ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤é–“ã®é€šä¿¡ã«ã¯OTLPãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +[clickhouse-agent-config.yaml](https://www.otelbin.io/#config=receivers%3A*N_filelog%3A*N___include%3A*N_____-_%2Fopt%2Fdata%2Flogs%2Faccess-structured.log*N___start*_at%3A_beginning*N___operators%3A*N_____-_type%3A_json*_parser*N_______timestamp%3A*N_________parse*_from%3A_attributes.time*_local*N_________layout%3A_*%22*.Y-*.m-*.d_*.H%3A*.M%3A*.S*%22*N*Nprocessors%3A*N_batch%3A*N___timeout%3A_5s*N___send*_batch*_size%3A_1000*N*Nexporters%3A*N_otlp%3A*N___endpoint%3A_localhost%3A4317*N___tls%3A*N_____insecure%3A_true_*H_Set_to_false_if_you_are_using_a_secure_connection*N*Nservice%3A*N_telemetry%3A*N___metrics%3A*N_____address%3A_0.0.0.0%3A9888_*H_Modified_as_2_collectors_running_on_same_host*N_pipelines%3A*N___logs%3A*N_____receivers%3A_%5Bfilelog%5D*N_____processors%3A_%5Bbatch%5D*N_____exporters%3A_%5Botlp%5D%7E&distro=otelcol-contrib%7E&distroVersion=v0.103.1%7E) + +```yaml +receivers: + filelog: + include: + - /opt/data/logs/access-structured.log + start_at: beginning + operators: + - type: json_parser + timestamp: + parse_from: attributes.time_local + layout: '%Y-%m-%d %H:%M:%S' +processors: + batch: + timeout: 5s + send_batch_size: 1000 +exporters: + otlp: + endpoint: localhost:4317 + tls: + insecure: true # セキュアãªæŽ¥ç¶šã‚’使用ã—ã¦ã„ã‚‹å ´åˆã¯falseã«è¨­å®šã—ã¦ãã ã•ã„ +service: + telemetry: + metrics: + address: 0.0.0.0:9888 # åŒä¸€ãƒ›ã‚¹ãƒˆã§2ã¤ã®ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ãŒå®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹ãŸã‚ã«ä¿®æ­£ + pipelines: + logs: + receivers: [filelog] + processors: [batch] + exporters: [otlp] +``` + +[clickhouse-gateway-config.yaml](https://www.otelbin.io/#config=receivers%3A*N__otlp%3A*N____protocols%3A*N____grpc%3A*N____endpoint%3A_0.0.0.0%3A4317*N*Nprocessors%3A*N__batch%3A*N____timeout%3A_5s*N____send*_batch*_size%3A_10000*N*Nexporters%3A*N__clickhouse%3A*N____endpoint%3A_tcp%3A%2F%2Flocalhost%3A9000*Qdial*_timeout*E10s*Acompress*Elz4*N____ttl%3A_96h*N____traces*_table*_name%3A_otel*_traces*N____logs*_table*_name%3A_otel*_logs*N____create*_schema%3A_true*N____timeout%3A_10s*N____database%3A_default*N____sending*_queue%3A*N____queue*_size%3A_10000*N____retry*_on*_failure%3A*N____enabled%3A_true*N____initial*_interval%3A_5s*N____max*_interval%3A_30s*N____max*_elapsed*_time%3A_300s*N*Nservice%3A*N__pipelines%3A*N____logs%3A*N______receivers%3A_%5Botlp%5D*N______processors%3A_%5Bbatch%5D*N______exporters%3A_%5Bclickhouse%5D%7E&distro=otelcol-contrib%7E&distroVersion=v0.103.1%7E) + +```yaml +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 +processors: + batch: + timeout: 5s + send_batch_size: 10000 +exporters: + clickhouse: + endpoint: tcp://localhost:9000?dial_timeout=10s&compress=lz4 + ttl: 96h + traces_table_name: otel_traces + logs_table_name: otel_logs + create_schema: true + timeout: 10s + database: default + sending_queue: + queue_size: 10000 + retry_on_failure: + enabled: true + initial_interval: 5s + max_interval: 30s + max_elapsed_time: 300s +service: + pipelines: + logs: + receivers: [otlp] + processors: [batch] + exporters: [clickhouse] +``` + +ã“れらã®è¨­å®šã¯ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã§å®Ÿè¡Œã§ãã¾ã™ã€‚ + +```bash +./otelcol-contrib --config clickhouse-gateway-config.yaml +./otelcol-contrib --config clickhouse-agent-config.yaml +``` + +ã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã®ä¸»ãªæ¬ ç‚¹ã¯ã€ä¸€é€£ã®ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’管ç†ã™ã‚‹ãŸã‚ã®é–¢é€£ã‚³ã‚¹ãƒˆã¨ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã§ã™ã€‚ + +関連ã™ã‚‹å­¦ç¿’ã¨å…±ã«ã€ã‚ˆã‚Šå¤§è¦æ¨¡ãªã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ãƒ™ãƒ¼ã‚¹ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã‚’管ç†ã™ã‚‹ä¾‹ã«ã¤ã„ã¦ã¯ã€[ã“ã®ãƒ–ログ記事](https://clickhouse.com/blog/building-a-logging-platform-with-clickhouse-and-saving-millions-over-datadog)ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +### Kafkaã®è¿½åŠ  + +読者ã¯ã€ã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãŒãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚­ãƒ¥ãƒ¼ã¨ã—ã¦Kafkaを使用ã—ã¦ã„ãªã„ã“ã¨ã«æ°—付ãã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +Kafkaキューをメッセージãƒãƒƒãƒ•ã‚¡ãƒ¼ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã€ãƒ­ã‚°ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã§ä¸€èˆ¬çš„ãªãƒ‡ã‚¶ã‚¤ãƒ³ãƒ‘ターンã§ã‚ã‚Šã€ELKスタックã«ã‚ˆã£ã¦æ™®åŠã—ã¾ã—ãŸã€‚ã“ã‚Œã«ã¯ã„ãã¤ã‹ã®åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™ã€‚主ã«ã€ã‚ˆã‚Šå¼·åŠ›ãªãƒ¡ãƒƒã‚»ãƒ¼ã‚¸é…ä¿¡ä¿è¨¼ã‚’æä¾›ã—ã€ãƒãƒƒã‚¯ãƒ—レッシャーã«å¯¾å‡¦ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚メッセージã¯åŽé›†ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‹ã‚‰Kafkaã«é€ä¿¡ã•ã‚Œã€ãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ç†è«–上ã€ã‚¯ãƒ©ã‚¹ã‚¿ãƒ¼åŒ–ã•ã‚ŒãŸKafkaインスタンスã¯é«˜ã‚¹ãƒ«ãƒ¼ãƒ—ットã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒãƒƒãƒ•ã‚¡ãƒ¼ã‚’æä¾›ã™ã‚‹ã¯ãšã§ã™ã€‚ãªãœãªã‚‰ã€ãƒ‡ãƒ¼ã‚¿ã‚’ディスクã«ç›´ç·šçš„ã«æ›¸ã込む計算オーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒå°‘ãªã„ã‹ã‚‰ã§ã™ã€‚Elasticã®å ´åˆã€ä¾‹ãˆã°ãƒˆãƒ¼ã‚¯ãƒ³åŒ–ã¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä½œæˆã«ã¯ã‹ãªã‚Šã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒã‹ã‹ã‚Šã¾ã™ã€‚エージェントã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’移動ã™ã‚‹ã“ã¨ã§ã€ã‚½ãƒ¼ã‚¹ã§ã®ãƒ­ã‚°ãƒ­ãƒ¼ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã«ã‚ˆã£ã¦ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå¤±ã‚れるリスクを減らã—ã¾ã™ã€‚最後ã«ã€ä¸€éƒ¨ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã§é­…力的ãªãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒªãƒ—レイãŠã‚ˆã³ã‚¯ãƒ­ã‚¹ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ãƒ¬ãƒ—リケーション機能をæä¾›ã—ã¾ã™ã€‚ + +ã—ã‹ã—ãªãŒã‚‰ã€ClickHouseã¯éžå¸¸ã«è¿…速ã«ãƒ‡ãƒ¼ã‚¿ã‚’挿入ã™ã‚‹ã“ã¨ãŒã§ãã€é€šå¸¸ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã§æ¯Žç§’何百万行も処ç†ã§ãã¾ã™ã€‚ClickHouseã«ã‚ˆã‚‹ãƒãƒƒã‚¯ãƒ—レッシャーã¯**稀ã§ã™**。Kafkaキューを利用ã™ã‚‹ã“ã¨ã¯ã€ã—ã°ã—ã°ã‚ˆã‚Šå¤šãã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã®è¤‡é›‘ã•ã¨ã‚³ã‚¹ãƒˆã‚’æ‹›ãã¾ã™ã€‚ログãŒéŠ€è¡Œå–引や他ã®ãƒŸãƒƒã‚·ãƒ§ãƒ³ã‚¯ãƒªãƒ†ã‚£ã‚«ãƒ«ãªãƒ‡ãƒ¼ã‚¿ã¨åŒã˜é…ä¿¡ä¿è¨¼ã‚’å¿…è¦ã¨ã—ãªã„ã¨ã„ã†åŽŸå‰‡ã‚’å—ã‘入れられるãªã‚‰ã€Kafkaã®è¤‡é›‘ã•ã‚’é¿ã‘ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +ãŸã ã—ã€é«˜ã„é…ä¿¡ä¿è¨¼ã‚„データをリプレイã™ã‚‹æ©Ÿèƒ½ï¼ˆãŠãらã複数ã®ã‚½ãƒ¼ã‚¹ã«ï¼‰ã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã€Kafkaã¯æœ‰ç”¨ãªã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ä¸Šã®è¿½åŠ æ©Ÿèƒ½ã¨ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +NEEDS ALT + +
    + +ã“ã®å ´åˆã€OTelエージェントã¯[Kafkaエクスãƒãƒ¼ã‚¿ãƒ¼](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/kafkaexporter/README.md)を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’Kafkaã«é€ä¿¡ã™ã‚‹ã‚ˆã†ã«è¨­å®šã§ãã¾ã™ã€‚ゲートウェイインスタンスã¯ã€[Kafkaレシーãƒãƒ¼](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/kafkareceiver/README.md)を使用ã—ã¦ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’消費ã—ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€ConfluentãŠã‚ˆã³OTelã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +### リソースã®è¦‹ç©ã‚‚ã‚Š + +OTelコレクターã®ãƒªã‚½ãƒ¼ã‚¹è¦ä»¶ã¯ã€ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚¹ãƒ«ãƒ¼ãƒ—ットã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ã‚µã‚¤ã‚ºã€ãŠã‚ˆã³è¡Œã‚れる処ç†é‡ã«ä¾å­˜ã—ã¾ã™ã€‚OpenTelemetryプロジェクトã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒªã‚½ãƒ¼ã‚¹è¦ä»¶ã‚’見ç©ã‚‚ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã‚‹[ベンãƒãƒžãƒ¼ã‚¯](https://opentelemetry.io/docs/collector/benchmarks/)ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ + +[ç§ãŸã¡ã®çµŒé¨“](https://clickhouse.com/blog/building-a-logging-platform-with-clickhouse-and-saving-millions-over-datadog#architectural-overview)ã§ã¯ã€3コアã¨12GBã®RAMã‚’æŒã¤ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã€ç´„60,000イベント/秒を処ç†ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®ãƒªãƒãƒ¼ãƒ ã®ã¿ã‚’担当ã™ã‚‹æœ€å°é™ã®å‡¦ç†ãƒ‘イプラインã¨æ­£è¦è¡¨ç¾ã‚’æŒãŸãªã„ã“ã¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ã€‚ + +ゲートウェイã«ã‚¤ãƒ™ãƒ³ãƒˆã‚’é€ä¿¡ã™ã‚‹ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®å ´åˆã€ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã®ã¿ã‚’設定ã™ã‚‹ã ã‘ãªã‚‰ã€äºˆæƒ³ã•ã‚Œã‚‹ç§’ã‚ãŸã‚Šã®ãƒ­ã‚°ã«åŸºã¥ã„ã¦ã‚µã‚¤ã‚ºã‚’決定ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚以下ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå§‹ã‚ã‚‹ãŸã‚ã®å‚考値を示ã—ã¦ã„ã¾ã™ï¼š + +| ログレート | コレクターエージェントã«å¿…è¦ãªãƒªã‚½ãƒ¼ã‚¹ | +|--------------|-------------------------------------| +| 1k/秒 | 0.2CPU, 0.2GiB | +| 5k/秒 | 0.5 CPU, 0.5GiB | +| 10k/秒 | 1 CPU, 1GiB | diff --git a/docs/ja/use-cases/observability/managing-data.md b/docs/ja/use-cases/observability/managing-data.md new file mode 100644 index 00000000000..3071ce7c7a9 --- /dev/null +++ b/docs/ja/use-cases/observability/managing-data.md @@ -0,0 +1,432 @@ +--- +title: ãƒ‡ãƒ¼ã‚¿ç®¡ç† +description: 観測性ã®ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ç®¡ç† +slug: /ja/observability/managing-data +keywords: [observability, logs, traces, metrics, OpenTelemetry, Grafana, otel] +--- + +# ãƒ‡ãƒ¼ã‚¿ç®¡ç† + +観測性ã®ãŸã‚ã®ClickHouseã®å°Žå…¥ã¯å¸¸ã«å¤§è¦æ¨¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒé–¢ä¸Žã—ã¦ãŠã‚Šã€ã“れを管ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ClickHouseã«ã¯ãƒ‡ãƒ¼ã‚¿ç®¡ç†ã‚’支æ´ã™ã‚‹ãŸã‚ã®ã•ã¾ã–ã¾ãªæ©Ÿèƒ½ãŒã‚ã‚Šã¾ã™ã€‚ + +## パーティション + +ClickHouseã§ã®ãƒ‘ーティションã¯ã€ã‚«ãƒ©ãƒ ã¾ãŸã¯SQLå¼ã«å¾“ã£ã¦ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ãƒ‡ãƒ¼ã‚¿ã‚’è«–ç†çš„ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚データを論ç†çš„ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã§ã€ãã‚Œãžã‚Œã®ãƒ‘ーティションを独立ã—ã¦æ“作(例: 削除)ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ™‚é–“ã‚„[クラスタã‹ã‚‰ã®åŠ¹çŽ‡çš„ãªãƒ‡ãƒ¼ã‚¿å‰Šé™¤](/ja/sql-reference/statements/alter/partition)ã«åŸºã¥ã„ã¦ãƒ‘ーティションを移動ã—ã€ã—ãŸãŒã£ã¦ã‚µãƒ–セットを効率的ã«ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å±¤é–“ã§ç§»å‹•ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +パーティションã¯ã€ãƒ†ãƒ¼ãƒ–ルãŒåˆã‚ã¦å®šç¾©ã•ã‚Œã‚‹éš›ã«`PARTITION BY`å¥ã‚’通ã˜ã¦æŒ‡å®šã•ã‚Œã¾ã™ã€‚ã“ã®å¥ã«ã¯ã€è¡Œã‚’ã©ã®ãƒ‘ーティションã«é€ä¿¡ã™ã‚‹ã‹ã‚’決定ã™ã‚‹ãŸã‚ã®SQLå¼ã‚’ä»»æ„ã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +NEEDS ALT + +
    + +データã®ãƒ‘ーツã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®å„パーティションã¨è«–ç†çš„ã«é–¢é€£ä»˜ã‘られã¦ãŠã‚Šï¼ˆå…±é€šã®ãƒ•ã‚©ãƒ«ãƒ€åã®ãƒ—レフィックスを介ã—ã¦ï¼‰ã€ç‹¬ç«‹ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã®ä¾‹ã§ã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®`otel_logs`スキーマã¯`toDate(Timestamp)`å¼ã‚’使用ã—ã¦æ—¥ã”ã¨ã«ãƒ‘ーティションを分割ã—ã¾ã™ã€‚データãŒClickHouseã«æŒ¿å…¥ã•ã‚Œã‚‹éš›ã«ã€ã“ã®å¼ãŒå„è¡Œã«å¯¾ã—ã¦è©•ä¾¡ã•ã‚Œã€è©²å½“ã™ã‚‹ãƒ‘ーティションã«ãƒ«ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã•ã‚Œã¾ã™ï¼ˆãã®æ—¥ã®æœ€åˆã®è¡Œã§ã‚ã‚‹å ´åˆã¯ãƒ‘ーティションãŒä½œæˆã•ã‚Œã¾ã™ï¼‰ã€‚ + +```sql +CREATE TABLE default.otel_logs +( +... +) +ENGINE = MergeTree +PARTITION BY toDate(Timestamp) +ORDER BY (ServiceName, SeverityText, toUnixTimestamp(Timestamp), TraceId) +``` + +[ã„ãã¤ã‹ã®æ“作](/ja/sql-reference/statements/alter/partition)をパーティション上ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚例ãˆã°ã€[ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—](/ja/sql-reference/statements/alter/partition#freeze-partition)ã€[カラムã®æ“作](/ja/sql-reference/statements/alter/partition#clear-column-in-partition)ã€[è¡Œã”ã¨ã®ãƒ‡ãƒ¼ã‚¿ã®æ›´æ–°](/ja/sql-reference/statements/alter/partition#update-in-partition)/[削除](/ja/sql-reference/statements/alter/partition#delete-in-partition)ã€ãŠã‚ˆã³[インデックスã®ã‚¯ãƒªã‚¢ï¼ˆä¾‹: 二次インデックス)](/ja/sql-reference/statements/alter/partition#clear-index-in-partition)ãŒå«ã¾ã‚Œã¾ã™ã€‚ + +例ãˆã°ã€`otel_logs`テーブルãŒæ—¥ã”ã¨ã«ãƒ‘ーティション分割ã•ã‚Œã¦ã„ã‚‹ã¨ä»®å®šã™ã‚‹ã¨ã€æ§‹é€ åŒ–ã•ã‚ŒãŸãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã§ã‚ã‚Œã°ã€ä»¥ä¸‹ã®ã‚ˆã†ã«æ•°æ—¥åˆ†ã®ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ + +```sql +SELECT Timestamp::Date AS day, + count() AS c +FROM otel_logs +GROUP BY day +ORDER BY c DESC + +┌────────day─┬───────c─┠+│ 2019-01-22 │ 2333977 │ +│ 2019-01-23 │ 2326694 │ +│ 2019-01-26 │ 1986456 │ +│ 2019-01-24 │ 1896255 │ +│ 2019-01-25 │ 1821770 │ +└────────────┴─────────┘ + +5 rows in set. Elapsed: 0.058 sec. Processed 10.37 million rows, 82.92 MB (177.96 million rows/s., 1.42 GB/s.) +Peak memory usage: 4.41 MiB. +``` + +ç¾åœ¨ã®ãƒ‘ーティションã¯ã€ç°¡å˜ãªã‚·ã‚¹ãƒ†ãƒ ãƒ†ãƒ¼ãƒ–ルクエリを使用ã—ã¦è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +SELECT DISTINCT partition +FROM system.parts +WHERE `table` = 'otel_logs' + +┌─partition──┠+│ 2019-01-22 │ +│ 2019-01-23 │ +│ 2019-01-24 │ +│ 2019-01-25 │ +│ 2019-01-26 │ +└────────────┘ + +5 rows in set. Elapsed: 0.005 sec. +``` + +別ã®ãƒ†ãƒ¼ãƒ–ルã€ä¾‹ãˆã°å¤ã„データをä¿å­˜ã™ã‚‹ãŸã‚ã®`otel_logs_archive`ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。データã¯ãƒ‘ーティションã”ã¨ã«ã“ã®ãƒ†ãƒ¼ãƒ–ルã«åŠ¹çŽ‡çš„ã«ç§»å‹•ã§ãã¾ã™ï¼ˆã“ã‚Œã¯å˜ãªã‚‹ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›´ã§ã™ï¼‰ã€‚ + +```sql +CREATE TABLE otel_logs_archive AS otel_logs +--move data to archive table +ALTER TABLE otel_logs + (MOVE PARTITION tuple('2019-01-26') TO TABLE otel_logs_archive +--confirm data has been moved +SELECT + Timestamp::Date AS day, + count() AS c +FROM otel_logs +GROUP BY day +ORDER BY c DESC + +┌────────day─┬───────c─┠+│ 2019-01-22 │ 2333977 │ +│ 2019-01-23 │ 2326694 │ +│ 2019-01-24 │ 1896255 │ +│ 2019-01-25 │ 1821770 │ +└────────────┴─────────┘ + +4 rows in set. Elapsed: 0.051 sec. Processed 8.38 million rows, 67.03 MB (163.52 million rows/s., 1.31 GB/s.) +Peak memory usage: 4.40 MiB. + +SELECT Timestamp::Date AS day, + count() AS c +FROM otel_logs_archive +GROUP BY day +ORDER BY c DESC + +┌────────day─┬───────c─┠+│ 2019-01-26 │ 1986456 │ +└────────────┴─────────┘ + +1 row in set. Elapsed: 0.024 sec. Processed 1.99 million rows, 15.89 MB (83.86 million rows/s., 670.87 MB/s.) +Peak memory usage: 4.99 MiB. +``` + +ã“ã‚Œã¯ã€`INSERT INTO SELECT`を使用ã—ã€æ–°ã—ã„ターゲットテーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’書ãæ›ãˆã‚‹å¿…è¦ãŒã‚ã‚‹ä»–ã®æ‰‹æ³•ã¨ã¯å¯¾ç…§çš„ã§ã™ã€‚ + +> [テーブル間ã®ãƒ‘ーティションã®ç§»å‹•](/ja/sql-reference/statements/alter/partition#move-partition-to-table)ã«ã¯ã€ã„ãã¤ã‹ã®æ¡ä»¶ã‚’満ãŸã™å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚特ã«ã€ãƒ†ãƒ¼ãƒ–ルã¯åŒã˜æ§‹é€ ã€ãƒ‘ーティションキーã€ä¸»ã‚­ãƒ¼ã€ãŠã‚ˆã³ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹/プロジェクションをæŒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚`ALTER` DDLã§ã®ãƒ‘ーティションã®æŒ‡å®šæ–¹æ³•ã«ã¤ã„ã¦ã®è©³ç´°ãªèª¬æ˜Žã¯[ã“ã¡ã‚‰](/ja/sql-reference/statements/alter/partition#how-to-set-partition-expression)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +ã•ã‚‰ã«ã€ãƒ‡ãƒ¼ã‚¿ã¯ãƒ‘ーティションã”ã¨ã«åŠ¹çŽ‡çš„ã«å‰Šé™¤ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯ä»£æ›¿æŠ€æ³•ï¼ˆå¤‰ç•°ã¾ãŸã¯è«–ç†å‰Šé™¤ï¼‰ã‚ˆã‚Šã‚‚ã¯ã‚‹ã‹ã«ãƒªã‚½ãƒ¼ã‚¹åŠ¹çŽ‡ãŒé«˜ãã€å„ªå…ˆã•ã‚Œã‚‹ã¹ãã§ã™ã€‚ + +```sql +ALTER TABLE otel_logs + (DROP PARTITION tuple('2019-01-25')) + +SELECT + Timestamp::Date AS day, + count() AS c +FROM otel_logs +GROUP BY day +ORDER BY c DESC +┌────────day─┬───────c─┠+│ 2019-01-22 │ 4667954 │ +│ 2019-01-23 │ 4653388 │ +│ 2019-01-24 │ 3792510 │ +└────────────┴─────────┘ +``` + +> ã“ã®æ©Ÿèƒ½ã¯`ttl_only_drop_parts=1`ãŒä½¿ç”¨ã•ã‚Œã‚‹ã¨æœ‰åŠ¹æœŸé™ (TTL) ã«ã‚ˆã£ã¦æ´»ç”¨ã•ã‚Œã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ã€Œæœ‰åŠ¹æœŸé™ (TTL) を使用ã—ãŸãƒ‡ãƒ¼ã‚¿ç®¡ç†ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### アプリケーション + +上記ã®æ–¹æ³•ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’効率的ã«ç§»å‹•ãŠã‚ˆã³æ“作ã™ã‚‹æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚実際ã«ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã»ã¨ã‚“ã©ã®å ´åˆã€ä»¥ä¸‹ã®2ã¤ã®ã‚·ãƒŠãƒªã‚ªã§è¦³æ¸¬æ€§ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«ãŠã„ã¦ãƒ‘ーティションæ“作を頻ç¹ã«åˆ©ç”¨ã™ã‚‹ã§ã—ょã†ã€‚ + +- **階層化アーキテクãƒãƒ£** - ストレージ層間ã§ãƒ‡ãƒ¼ã‚¿ã‚’移動ã—ã¾ã™ï¼ˆã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ†ã‚£ã‚¢ã€ã‚’å‚照)。ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ›ãƒƒãƒˆã‚³ãƒ¼ãƒ«ãƒ‰ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã‚’構築ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **効率的ãªå‰Šé™¤** - データãŒæŒ‡å®šã•ã‚ŒãŸæœ‰åŠ¹æœŸé™ã«é”ã—ãŸå ´åˆï¼ˆã€Œæœ‰åŠ¹æœŸé™ (TTL) を使用ã—ãŸãƒ‡ãƒ¼ã‚¿ç®¡ç†ã€ã‚’å‚照) + +以下ã«ã€ã“れらã®2ã¤ã®è©³ç´°ã«ã¤ã„ã¦è©³ã—ã説明ã—ã¾ã™ã€‚ + +### クエリパフォーマンス + +パーティションã¯ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスã«åŠ©ã‘ã«ãªã‚Šã¾ã™ãŒã€ãã‚Œã«ã¯ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã«éžå¸¸ã«ä¾å­˜ã—ã¾ã™ã€‚ã‚‚ã—クエリãŒå°‘æ•°ã®ãƒ‘ーティション(ç†æƒ³çš„ã«ã¯1ã¤ï¼‰ã®ã¿ã‚’ターゲットã¨ã™ã‚‹å ´åˆã€ãƒ‘フォーマンスãŒæ½œåœ¨çš„ã«æ”¹å–„ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã€ãƒ‘ーティショニングキーãŒä¸»ã‚­ãƒ¼ã«å«ã¾ã‚Œã¦ãŠã‚‰ãšã€ãã‚Œã«ã‚ˆã£ã¦ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’è¡Œã†å ´åˆã«æœ‰ç”¨ã§ã™ã€‚ãŸã ã—ã€å¤šãã®ãƒ‘ーティションをカãƒãƒ¼ã™ã‚‹å¿…è¦ãŒã‚るクエリã¯ã€å ´åˆã«ã‚ˆã£ã¦ã¯ãƒ‘ーティションを使用ã—ãªã„å ´åˆã‚ˆã‚Šã‚‚パフォーマンスãŒæ‚ªããªã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ï¼ˆãƒ‘ーツãŒå¤šã„ãŸã‚)。å˜ä¸€ãƒ‘ーティションをターゲットã¨ã™ã‚‹åˆ©ç‚¹ã¯ã€ãƒ‘ーティショニングキーãŒã™ã§ã«ä¸»ã‚­ãƒ¼ã®åˆæœŸã‚¨ãƒ³ãƒˆãƒªãƒ¼ã§ã‚ã‚‹å ´åˆã«ã¯ã»ã¨ã‚“ã©ã€ã¾ãŸã¯å…¨ãç¾ã‚Œãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。パーティションã¯ã€å„パーティション内ã®å€¤ãŒãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ã‚ã‚‹å ´åˆã«[GROUP BYクエリを最é©åŒ–ã™ã‚‹ãŸã‚ã«ä½¿ç”¨](/ja/engines/table-engines/mergetree-family/custom-partitioning-key#group-by-optimisation-using-partition-key)ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ãŸã ã—ã€ä¸€èˆ¬çš„ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä¸»ã‚­ãƒ¼ãŒæœ€é©åŒ–ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã€ç‰¹å®šã®äºˆæ¸¬å¯èƒ½ãªã‚µãƒ–セットã®ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンãŒã‚る特殊ãªå ´åˆï¼ˆä¾‹ãˆã°ã€æ—¥ã”ã¨ã«ãƒ‘ーティショニングã—ã¦ãŠã‚Šã€ã»ã¨ã‚“ã©ã®ã‚¯ã‚¨ãƒªãŒå‰æ—¥ã®ã‚‚ã®ï¼‰ã«ã®ã¿ãƒ‘ーティショニングをクエリã®æœ€é©åŒ–技術ã¨ã—ã¦è€ƒæ…®ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®å‹•ä½œã®ä¾‹ã¯[ã“ã¡ã‚‰](https://medium.com/datadenys/using-partitions-in-clickhouse-3ea0decb89c4)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +## æœ‰åŠ¹æœŸé™ (TTL) を使用ã—ãŸãƒ‡ãƒ¼ã‚¿ç®¡ç† + +Time-to-Live (TTL) ã¯ã€ClickHouseを利用ã—ãŸè¦³æ¸¬æ€§ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã«ãŠã‘る効率的ãªãƒ‡ãƒ¼ã‚¿ä¿æŒã¨ç®¡ç†ã®ãŸã‚ã®é‡è¦ãªæ©Ÿèƒ½ã§ã™ã€‚特ã«è†¨å¤§ãªãƒ‡ãƒ¼ã‚¿ãŒç¶™ç¶šçš„ã«ç”Ÿæˆã•ã‚Œã‚‹å ´åˆã«ãŠã„ã¦ãã†ã§ã™ã€‚ClickHouseã«ãŠã„ã¦TTLを実装ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€å¤ã„データã®è‡ªå‹•æœ‰åŠ¹æœŸé™åˆ‡ã‚Œã¨å‰Šé™¤ãŒå¯èƒ½ã«ãªã‚Šã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒæœ€é©ã«ä½¿ç”¨ã•ã‚Œã€æ‰‹å‹•ä»‹å…¥ãªã—ã§æ€§èƒ½ãŒç¶­æŒã•ã‚Œã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’スリムã«ä¿ã¡ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚³ã‚¹ãƒˆã‚’削減ã—ã€æœ€ã‚‚関連性ãŒé«˜ã最新ã®ãƒ‡ãƒ¼ã‚¿ã«ç„¦ç‚¹ã‚’当ã¦ã‚‹ã“ã¨ã§ã‚¯ã‚¨ãƒªã®é€Ÿåº¦ã¨åŠ¹çŽ‡ã‚’確ä¿ã™ã‚‹ãŸã‚ã«ä¸å¯æ¬ ã§ã™ã€‚ã¾ãŸã€ãƒ‡ãƒ¼ã‚¿ä¿æŒãƒãƒªã‚·ãƒ¼ã«æº–æ‹ ã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ©ã‚¤ãƒ•ã‚µã‚¤ã‚¯ãƒ«ã‚’システマティックã«ç®¡ç†ã™ã‚‹ã“ã¨ã§ã€è¦³æ¸¬æ€§ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã®å…¨ä½“çš„ãªæŒç¶šå¯èƒ½æ€§ã¨æ‹¡å¼µæ€§ã‚’å‘上ã•ã›ã¾ã™ã€‚ + +TTLã¯ClickHouseã«ãŠã„ã¦ã€ãƒ†ãƒ¼ãƒ–ルレベルã¾ãŸã¯ã‚«ãƒ©ãƒ ãƒ¬ãƒ™ãƒ«ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### テーブルレベルã®TTL + +ログã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã®ä¸¡æ–¹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã‚¹ã‚­ãƒ¼ãƒžã«ã¯ã€æŒ‡å®šã•ã‚ŒãŸæœŸé–“後ã«ãƒ‡ãƒ¼ã‚¿ã®æœ‰åŠ¹æœŸé™ã‚’設定ã™ã‚‹ãŸã‚ã®TTLãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ã“ã‚Œã¯ClickHouseエクスãƒãƒ¼ã‚¿ãƒ¼ã§`ttl`キーã®ä¸‹ã«æŒ‡å®šã•ã‚Œã¾ã™ã€‚例: + +```yaml +exporters: + clickhouse: + endpoint: tcp://localhost:9000?dial_timeout=10s&compress=lz4&async_insert=1 + ttl: 72h +``` + +ã“ã®æ§‹æ–‡ã¯ç¾åœ¨[Golang Duration syntax](https://pkg.go.dev/time#ParseDuration)をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚**ユーザーã«ã¯`h`を使用ã—ã€ã“ã‚ŒãŒãƒ‘ーティショニング期間ã«ä¸€è‡´ã™ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚例ãˆã°ã€æ—¥ã”ã¨ã«ãƒ‘ーティショニングã™ã‚‹å ´åˆã€24h, 48h, 72hãªã©ã®æ—¥æ•°ã®å€æ•°ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。** ã“ã‚Œã«ã‚ˆã‚Šã€è‡ªå‹•çš„ã«TTLå¥ãŒãƒ†ãƒ¼ãƒ–ルã«è¿½åŠ ã•ã‚Œã¾ã™ã€‚例:`ttl: 96h`ã®å ´åˆã€‚ + +```sql +PARTITION BY toDate(Timestamp) +ORDER BY (ServiceName, SpanName, toUnixTimestamp(Timestamp), TraceId) +TTL toDateTime(Timestamp) + toIntervalDay(4) +SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1 +``` + +デフォルトã§ã¯ã€æœŸé™åˆ‡ã‚Œã®TTLã‚’æŒã¤ãƒ‡ãƒ¼ã‚¿ã¯ClickHouseã«ã‚ˆã£ã¦[データパーツãŒãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹](/ja/engines/table-engines/mergetree-family/mergetree#mergetree-data-storage)時ã«å‰Šé™¤ã•ã‚Œã¾ã™ã€‚ClickHouseãŒæœŸé™åˆ‡ã‚Œã®ãƒ‡ãƒ¼ã‚¿ã‚’検出ã™ã‚‹ã¨ã€ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«å¤–ã®ãƒžãƒ¼ã‚¸ã‚’実行ã—ã¾ã™ã€‚ + +> TTLã¯ã™ãã«é©ç”¨ã•ã‚Œã‚‹ã‚ã‘ã§ã¯ãªãã€å‰è¿°ã®ã‚ˆã†ãªã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã«å¾“ã£ã¦é©ç”¨ã•ã‚Œã¾ã™ã€‚MergeTreeテーブル設定ã®`merge_with_ttl_timeout`ã¯ã€å‰Šé™¤TTLã§ã®ãƒžãƒ¼ã‚¸ãŒç¹°ã‚Šè¿”ã•ã‚Œã‚‹å‰ã®æœ€å°é…延を秒å˜ä½ã§è¨­å®šã—ã¾ã™ã€‚デフォルト値ã¯14400秒(4時間)ã§ã™ã€‚ã—ã‹ã—ã€ãã‚Œã¯æœ€ä½Žé™ã®é…延ã«éŽãŽãšã€TTLマージãŒãƒˆãƒªã‚¬ãƒ¼ã•ã‚Œã‚‹ã¾ã§ã«æ™‚é–“ãŒã‹ã‹ã‚‹å ´åˆãŒã‚ã‚Šã¾ã™ã€‚値ãŒä½Žã™ãŽã‚‹ã¨ã€å¤šãã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«å¤–マージãŒç™ºç”Ÿã—ã€ãƒªã‚½ãƒ¼ã‚¹ã‚’多ã消費ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚TTLã®æœŸé™åˆ‡ã‚Œã‚’強制ã™ã‚‹ã«ã¯ã€ã‚³ãƒžãƒ³ãƒ‰`ALTER TABLE my_table MATERIALIZE TTL`を使用ã—ã¾ã™ã€‚ + +**é‡è¦ï¼š`ttl_only_drop_parts=1`ã®è¨­å®šã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚**(デフォルトスキーマã§é©ç”¨ã•ã‚Œã¦ã„ã¾ã™ï¼‰ã“ã®è¨­å®šãŒæœ‰åŠ¹ãªå ´åˆã€ClickHouseã¯ã™ã¹ã¦ã®è¡ŒãŒæœŸé™åˆ‡ã‚Œã®çŠ¶æ…‹ã«ãªã‚‹ã¨å…¨ä½“ã®ãƒ‘ートを削除ã—ã¾ã™ã€‚部分的ã«TTL期é™åˆ‡ã‚Œã®è¡Œã‚’クリーンアップã™ã‚‹ï¼ˆ`ttl_only_drop_parts=0`ã®å ´åˆã«ãƒªã‚½ãƒ¼ã‚¹é›†ç´„çš„ãªå¤‰ç•°ã‚’介ã—ã¦é”æˆã•ã‚Œã‚‹ï¼‰ã®ã§ã¯ãªãã€å…¨ä½“ã®ãƒ‘ートを削除ã™ã‚‹ã“ã¨ã§ã€ã‚ˆã‚ŠçŸ­ã„`merge_with_ttl_timeout`時間をæŒã¡ã€ã‚·ã‚¹ãƒ†ãƒ æ€§èƒ½ã¸ã®å½±éŸ¿ã‚’低ãã§ãã¾ã™ã€‚データãŒã€æœ‰åŠ¹æœŸé–“ã¨åŒã˜å˜ä½ã§ãƒ‘ーティション化ã•ã‚Œã¦ã„ã‚‹å ´åˆï¼ˆä¾‹: 日)ã€ãƒ‘ーツã¯è‡ªç„¶ã«å®šç¾©ã•ã‚ŒãŸé–“éš”ã®ãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’å«ã‚€ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Š`ttl_only_drop_parts=1`を効率的ã«é©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### カラムレベルã®TTL + +上記ã®ä¾‹ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒãƒ†ãƒ¼ãƒ–ルレベルã§æœŸé™åˆ‡ã‚Œã«ãªã‚Šã¾ã™ã€‚ユーザーã¯ã‚«ãƒ©ãƒ ãƒ¬ãƒ™ãƒ«ã§ã‚‚データを期é™åˆ‡ã‚Œã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚データãŒå¤ããªã‚‹ã«ã¤ã‚Œã¦ã€èª¿æŸ»æ™‚ã«ãƒªã‚½ãƒ¼ã‚¹ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’正当化ã™ã‚‹ä¾¡å€¤ãŒãªã„カラムを削除ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚例ãˆã°ã€`Body`カラムをä¿æŒã—続ã‘ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã¯æŒ¿å…¥æ™‚ã«æŠ½å‡ºã•ã‚Œã¦ã„ãªã„æ–°ã—ã„動的メタデータãŒè¿½åŠ ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã§ã™ï¼ˆä¾‹ï¼šæ–°ã—ã„Kubernetesラベル)。例ãˆã°1ヶ月後ã€è¿½åŠ ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãŒå½¹ã«ç«‹ãŸãªã„ã¨æ˜Žã‚‰ã‹ã§ã‚ã‚Œã°ã€ãã®å€¤ã‚’ä¿æŒã™ã‚‹ä¾¡å€¤ãŒã‚ã‚‹ã“ã¨ã‚’制é™ã§ãã¾ã™ã€‚ + +30日後ã«`Body`カラムãŒå‰Šé™¤ã•ã‚Œã‚‹ä¾‹ã‚’以下ã«ç¤ºã—ã¾ã™ã€‚ + +```sql +CREATE TABLE otel_logs_v2 +( + `Body` String TTL Timestamp + INTERVAL 30 DAY, + `Timestamp` DateTime, + ... +) +ENGINE = MergeTree +ORDER BY (ServiceName, Timestamp) +``` + +> カラムレベルã®TTLを指定ã™ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼è‡ªèº«ã§ã‚¹ã‚­ãƒ¼ãƒžã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯OTelコレクターã§ã¯æŒ‡å®šã§ãã¾ã›ã‚“。 + +## データã®å†åœ§ç¸® + +通常ã€è¦³æ¸¬æ€§ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯`ZSTD(1)`ã‚’ãŠå‹§ã‚ã—ã¾ã™ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ç•°ãªã‚‹åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚„高レベルã®åœ§ç¸®ã€ä¾‹ãˆã°`ZSTD(3)`を試行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚スキーマ作æˆæ™‚ã«æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã€è¨­å®šã•ã‚ŒãŸæœŸé–“後ã«å¤‰æ›´ã§ãるよã†ã«åœ§ç¸®ã‚’設定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚別ã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¾ãŸã¯åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ãŒåœ§ç¸®ã‚’改善ã™ã‚‹ãŒã‚¯ã‚¨ãƒªãƒ‘フォーマンスãŒä½Žä¸‹ã™ã‚‹å ´åˆã€ã“ã®ãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ã¯ã€èª¿æŸ»ã§ã®åˆ©ç”¨åº¦ãŒä½Žã„å¤ã„データã«å¯¾ã—ã¦è¨±å®¹ã§ãã¦ã‚‚ã€èª¿æŸ»ã§ã®åˆ©ç”¨åº¦ãŒé«˜ã„æ–°ã—ã„データã«å¯¾ã—ã¦ã¯è¨±å®¹ã§ãã¾ã›ã‚“。 + +下記ã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’削除ã™ã‚‹ä»£ã‚ã‚Šã«4日後ã«`ZSTD(3)`ã§ãƒ‡ãƒ¼ã‚¿ã‚’圧縮ã™ã‚‹ä¾‹ã‚’示ã—ã¾ã™ã€‚ + +```sql +CREATE TABLE default.otel_logs_v2 +( + `Body` String, + `Timestamp` DateTime, + `ServiceName` LowCardinality(String), + `Status` UInt16, + `RequestProtocol` LowCardinality(String), + `RunTime` UInt32, + `Size` UInt32, + `UserAgent` String, + `Referer` String, + `RemoteUser` String, + `RequestType` LowCardinality(String), + `RequestPath` String, + `RemoteAddress` IPv4, + `RefererDomain` String, + `RequestPage` String, + `SeverityText` LowCardinality(String), + `SeverityNumber` UInt8, +) +ENGINE = MergeTree +ORDER BY (ServiceName, Timestamp) +TTL Timestamp + INTERVAL 4 DAY RECOMPRESS CODEC(ZSTD(3)) +``` + +> ユーザーã¯ã€ç•°ãªã‚‹åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã‚„アルゴリズムãŒæŒ¿å…¥ãŠã‚ˆã³ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã«ä¸Žãˆã‚‹å½±éŸ¿ã‚’評価ã™ã‚‹ã“ã¨ã‚’常ã«ãŠå‹§ã‚ã—ã¾ã™ã€‚例ãˆã°ã€ãƒ‡ãƒ«ã‚¿ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã¯ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã®åœ§ç¸®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ã—ã‹ã—ã€ã“ã‚ŒãŒä¸»ã‚­ãƒ¼ã®ä¸€éƒ¨ã§ã‚ã‚‹å ´åˆã€ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°æ€§èƒ½ã«å½±éŸ¿ã‚’åŠã¼ã™å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +TTLã®è¨­å®šãŠã‚ˆã³ä¾‹ã«é–¢ã™ã‚‹ã•ã‚‰ãªã‚‹è©³ç´°ã¯[ã“ã¡ã‚‰](/ja/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-multiple-volumes)ã§ç¢ºèªã§ãã¾ã™ã€‚TTLãŒãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ã‚«ãƒ©ãƒ ã«è¿½åŠ ãŠã‚ˆã³ä¿®æ­£ã•ã‚Œã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](/ja/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-ttl)ã§ç¢ºèªã§ãã¾ã™ã€‚TTLãŒãƒ›ãƒƒãƒˆ-ウォーム-コールドアーキテクãƒãƒ£ãªã©ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸éšŽå±¤ã‚’å¯èƒ½ã«ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€ã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ†ã‚£ã‚¢ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## ストレージティア + +ClickHouseã§ã¯ã€SSDã«ã‚ˆã‚‹ãƒ›ãƒƒãƒˆ/最近ã®ãƒ‡ãƒ¼ã‚¿ã¨S3ã«ã‚ˆã‚‹å¤ã„データを指ã™ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ†ã‚£ã‚¢ã‚’ã€ç•°ãªã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ä½œæˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã«ã‚ˆã‚Šã€èª¿æŸ»ã§ã®åˆ©ç”¨é »åº¦ãŒä½Žã„ãŸã‚ã«é«˜ã„クエリSLAã‚’æŒã¤å¤ã„データã«ã€ã‚ˆã‚Šä½Žã‚³ã‚¹ãƒˆã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’用ã„ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +> ClickHouse Cloudã¯ã€S3ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•ã‚ŒãŸå˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ã‚³ãƒ”ーを使用ã—ã€SSD-backed ノードキャッシュを使用ã—ã¾ã™ã€‚ãã®ãŸã‚ã€ClickHouse Cloudã§ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ†ã‚£ã‚¢ã¯å¿…è¦ã‚ã‚Šã¾ã›ã‚“。 + +ストレージティアã®ä½œæˆã«ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ã®ä½œæˆãŒå¿…è¦ã§ã€ãã®å¾Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒãƒªã‚·ãƒ¼ã‚’構築ã—ã€ãƒ†ãƒ¼ãƒ–ル作æˆæ™‚ã«æŒ‡å®šã§ãるボリュームを使用ã—ã¾ã™ã€‚データã¯ã€ä½¿ç”¨çŽ‡ã€ãƒ‘ーツサイズã€ãƒœãƒªãƒ¥ãƒ¼ãƒ ã®å„ªå…ˆåº¦ã«åŸºã¥ã„ã¦è‡ªå‹•çš„ã«ç•°ãªã‚‹ãƒ‡ã‚£ã‚¹ã‚¯é–“ã§ç§»å‹•ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚詳細ã¯[ã“ã¡ã‚‰](/ja/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-multiple-volumes)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +データã¯`ALTER TABLE MOVE PARTITION`コマンドを使用ã—ã¦æ‰‹å‹•ã§ãƒ‡ã‚£ã‚¹ã‚¯é–“を移動ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€TTLを使用ã—ã¦ãƒœãƒªãƒ¥ãƒ¼ãƒ é–“ã®ãƒ‡ãƒ¼ã‚¿ã®ç§»å‹•ã‚’制御ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚完全ãªä¾‹ã¯[ã“ã¡ã‚‰](/ja/guides/developer/ttl#implementing-a-hotwarmcold-architecture)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +## スキーマ変更ã®ç®¡ç† + +システムã®ãƒ©ã‚¤ãƒ•ã‚¿ã‚¤ãƒ ä¸­ã«ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ã‚¹ã‚­ãƒ¼ãƒžã¯å¿…ãšå¤‰ã‚ã‚‹ã§ã—ょã†ã€‚例ãˆã°ã€æ–°ã—ã„メタデータやãƒãƒƒãƒ‰ãƒ©ãƒ™ãƒ«ã‚’æŒã¤æ–°ã—ã„システムを監視ã™ã‚‹å ´åˆãªã©ã€‚OTelスキーマを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’生æˆã—ã€æ§‹é€ åŒ–ã•ã‚ŒãŸå½¢å¼ã§ã‚ªãƒªã‚¸ãƒŠãƒ«ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ‡ãƒ¼ã‚¿ã‚’キャプãƒãƒ£ã™ã‚‹ã“ã¨ã§ã€ClickHouseスキーマã¯ã“れらã®å¤‰æ›´ã«å¯¾ã—ã¦é©å¿œæ€§ã‚’æŒã¤ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ã—ã‹ã—ã€æ–°ã—ã„メタデータãŒåˆ©ç”¨å¯èƒ½ã«ãªã‚Šã€ã‚¯ã‚¨ãƒªã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンãŒå¤‰åŒ–ã™ã‚‹ã«ã¤ã‚Œã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã“れらã®é–‹ç™ºã«å¯¾å¿œã™ã‚‹ãŸã‚ã«ã‚¹ã‚­ãƒ¼ãƒžã‚’æ›´æ–°ã—ãŸã„ã¨è€ƒãˆã‚‹ã§ã—ょã†ã€‚ + +スキーマ変更時ã®ãƒ€ã‚¦ãƒ³ã‚¿ã‚¤ãƒ ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã„ãã¤ã‹ã®ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚以下ã«ãれらを示ã—ã¾ã™ã€‚ + +### デフォルト値を使用ã™ã‚‹ + +カラムã¯[`DEFAULT`値](/ja/sql-reference/statements/create/table#default)を使用ã—ã¦ã‚¹ã‚­ãƒ¼ãƒžã«è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚INSERT時ã«æŒ‡å®šã•ã‚Œã¦ã„ãªã„å ´åˆã€æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ + +スキーマ変更ã¯ã€æ–°ã—ã„カラムãŒé€ä¿¡ã•ã‚Œã‚‹ã‚ˆã†ã«ã™ã‚‹ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®å¤‰æ›ãƒ­ã‚¸ãƒƒã‚¯ã‚„OTelコレクターã®è¨­å®šã‚’変更ã™ã‚‹å‰ã«è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +一度スキーマãŒå¤‰æ›´ã•ã‚Œã‚‹ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯OTeLコレクターをå†æ§‹æˆã§ãã¾ã™ã€‚推奨ã•ã‚Œã‚‹ã€ŒSQLã§ã®æ§‹é€ æŠ½å‡ºã€ã§æ¦‚説ã•ã‚Œã¦ã„るプロセスを使用ã™ã‚‹ã“ã¨ã‚’想定ã—ãŸå ´åˆã€OTeLコレクターãŒãã®ãƒ‡ãƒ¼ã‚¿ã‚’Nullテーブルエンジンã«é€ä¿¡ã—ã€ãã®çµæžœã‚’抽出ã—ã¦ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã«é€ä¿¡ã™ã‚‹ãŸã‚ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューãŒæ‹…当ã—ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã‚¹ã‚­ãƒ¼ãƒžã‚’抽出ã™ã‚‹å ´åˆã€ãƒ“ューã¯æ¬¡ã®[`ALTER TABLE ... MODIFY QUERY`構文](/ja/sql-reference/statements/alter/view)を使用ã—ã¦ä¿®æ­£ã§ãã¾ã™ã€‚次ã®ã‚ˆã†ã«ã€OTelã®æ§‹é€ åŒ–ログã‹ã‚‰ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã‚¹ã‚­ãƒ¼ãƒžã‚’抽出ã™ã‚‹ãŸã‚ã®ãƒ“ューをæŒã¤ãƒ†ãƒ¼ãƒ–ルを例ã«ç¤ºã—ã¾ã™ï¼š + +```sql +CREATE TABLE default.otel_logs_v2 +( + `Body` String, + `Timestamp` DateTime, + `ServiceName` LowCardinality(String), + `Status` UInt16, + `RequestProtocol` LowCardinality(String), + `RunTime` UInt32, + `UserAgent` String, + `Referer` String, + `RemoteUser` String, + `RequestType` LowCardinality(String), + `RequestPath` String, + `RemoteAddress` IPv4, + `RefererDomain` String, + `RequestPage` String, + `SeverityText` LowCardinality(String), + `SeverityNumber` UInt8 +) +ENGINE = MergeTree +ORDER BY (ServiceName, Timestamp) + +CREATE MATERIALIZED VIEW otel_logs_mv TO otel_logs_v2 AS +SELECT + Body, + Timestamp::DateTime AS Timestamp, + ServiceName, + LogAttributes['status']::UInt16 AS Status, + LogAttributes['request_protocol'] AS RequestProtocol, + LogAttributes['run_time'] AS RunTime, + LogAttributes['user_agent'] AS UserAgent, + LogAttributes['referer'] AS Referer, + LogAttributes['remote_user'] AS RemoteUser, + LogAttributes['request_type'] AS RequestType, + LogAttributes['request_path'] AS RequestPath, + LogAttributes['remote_addr'] AS RemoteAddress, + domain(LogAttributes['referer']) AS RefererDomain, + path(LogAttributes['request_path']) AS RequestPage, + multiIf(Status::UInt64 > 500, 'CRITICAL', Status::UInt64 > 400, 'ERROR', Status::UInt64 > 300, 'WARNING', 'INFO') AS SeverityText, + multiIf(Status::UInt64 > 500, 20, Status::UInt64 > 400, 17, Status::UInt64 > 300, 13, 9) AS SeverityNumber +FROM otel_logs +``` + +`LogAttributes`ã‹ã‚‰æ–°ã—ã„カラム`Size`を抽出ã—ãŸã„ã¨ã—ã¾ã™ã€‚ã“れを`ALTER TABLE`を使用ã—ã¦ã‚¹ã‚­ãƒ¼ãƒžã«è¿½åŠ ã—ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’指定ã§ãã¾ã™ï¼š + +```sql +ALTER TABLE otel_logs_v2 + (ADD COLUMN `Size` UInt64 DEFAULT JSONExtractUInt(Body, 'size')) +``` + +上記ã®ä¾‹ã§ã¯ã€`LogAttributes`ã®`size`キーをデフォルトã¨ã—ã¦æŒ‡å®šã—ã¦ã„ã¾ã™ï¼ˆå­˜åœ¨ã—ãªã„å ´åˆã«ã¯0ã«ãªã‚Šã¾ã™ï¼‰ã€‚ã“ã‚Œã¯ã€å€¤ãŒæŒ¿å…¥ã•ã‚Œãªã‹ã£ãŸè¡Œã«å¯¾ã—ã¦ã€ã“ã®ã‚«ãƒ©ãƒ ã‚’アクセスã™ã‚‹ã‚¯ã‚¨ãƒªã¯ãƒžãƒƒãƒ—をアクセスã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€ã“ã‚Œã«ã‚ˆã‚Šå¾Œã®ã‚¯ã‚¨ãƒªã®ã‚³ã‚¹ãƒˆãŒå¢—加ã—ã¾ã™ã€‚ã‚‚ã¡ã‚ã‚“ã€å®šæ•°ã§æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚例ãˆã°ã€0ã«ã™ã‚‹ã¨ã€å€¤ãŒæŒ¿å…¥ã•ã‚Œãªã‹ã£ãŸè¡Œã«å¯¾ã™ã‚‹ãã®å¾Œã®ã‚¯ã‚¨ãƒªã®ã‚³ã‚¹ãƒˆãŒä¸‹ãŒã‚Šã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルをクエリã™ã‚‹ã“ã¨ã§ã€ãƒžãƒƒãƒ—ã‹ã‚‰æœŸå¾…通りã«å€¤ãŒç”Ÿæˆã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ï¼š + +```sql +SELECT Size +FROM otel_logs_v2 +LIMIT 5 +┌──Size─┠+│ 30577 │ +│ 5667 │ +│ 5379 │ +│ 1696 │ +│ 41483 │ +└───────┘ + +5 rows in set. Elapsed: 0.012 sec. +``` + +ã“ã®å€¤ãŒã™ã¹ã¦ã®å°†æ¥ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦æŒ¿å…¥ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã«ç¤ºã™`ALTER TABLE`構文を使用ã—ã¦ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを修正ã§ãã¾ã™ï¼š + +```sql +ALTER TABLE otel_logs_mv + MODIFY QUERY +SELECT + Body, + Timestamp::DateTime AS Timestamp, + ServiceName, + LogAttributes['status']::UInt16 AS Status, + LogAttributes['request_protocol'] AS RequestProtocol, + LogAttributes['run_time'] AS RunTime, + LogAttributes['size'] AS Size, + LogAttributes['user_agent'] AS UserAgent, + LogAttributes['referer'] AS Referer, + LogAttributes['remote_user'] AS RemoteUser, + LogAttributes['request_type'] AS RequestType, + LogAttributes['request_path'] AS RequestPath, + LogAttributes['remote_addr'] AS RemoteAddress, + domain(LogAttributes['referer']) AS RefererDomain, + path(LogAttributes['request_path']) AS RequestPage, + multiIf(Status::UInt64 > 500, 'CRITICAL', Status::UInt64 > 400, 'ERROR', Status::UInt64 > 300, 'WARNING', 'INFO') AS SeverityText, + multiIf(Status::UInt64 > 500, 20, Status::UInt64 > 400, 17, Status::UInt64 > 300, 13, 9) AS SeverityNumber +FROM otel_logs +``` + +ãã®å¾Œã®è¡Œã«ã¯ã€æŒ¿å…¥æ™‚ã«`Size`カラムãŒåŸ‹ã‚られã¾ã™ã€‚ + +### æ–°ã—ã„ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’ä½œæˆ + +上記ã®ãƒ—ロセスã®ä»£æ›¿ã¨ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ–°ã—ã„スキーマをæŒã¤æ–°ã—ã„ターゲットテーブルをå˜ã«ä½œæˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚マテリアライズドビューã¯ã€ä¸Šè¨˜ã®`ALTER TABLE MODIFY QUERY`を使用ã—ã¦æ–°ã—ã„テーブルを使用ã™ã‚‹ã‚ˆã†ã«ä¿®æ­£ã§ãã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä¾‹ãˆã°`otel_logs_v3`ã®ã‚ˆã†ã«ãƒ†ãƒ¼ãƒ–ルをãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®ã‚¢ãƒ—ローãƒã§ã¯ã€è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルをクエリã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚テーブルåã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ãƒ‘ターンをå—ã‘入れる[`merge`関数](/ja/sql-reference/table-functions/merge)を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚v2ã¨v3ã®`otel_logs`テーブルをクエリã™ã‚‹ä¾‹ã‚’以下ã«ç¤ºã—ã¾ã™ï¼š + +```sql +SELECT Status, count() AS c +FROM merge('otel_logs_v[2|3]') +GROUP BY Status +ORDER BY c DESC +LIMIT 5 + +┌─Status─┬────────c─┠+│ 200 │ 38319300 │ +│ 304 │ 1360912 │ +│ 302 │ 799340 │ +│ 404 │ 420044 │ +│ 301 │ 270212 │ +└────────┴──────────┘ + +5 rows in set. Elapsed: 0.137 sec. Processed 41.46 million rows, 82.92 MB (302.43 million rows/s., 604.85 MB/s.) +``` + +ユーザーãŒ`merge`関数を使用ã™ã‚‹ã“ã¨ã‚’回é¿ã—ã€è¤‡æ•°ã®ãƒ†ãƒ¼ãƒ–ルを組ã¿åˆã‚ã›ãŸãƒ†ãƒ¼ãƒ–ルをエンドユーザーã«å…¬é–‹ã—ãŸã„å ´åˆã€[Mergeテーブルエンジン](/ja/engines/table-engines/special/merge)を使用ã§ãã¾ã™ã€‚次ã«ã“ã®ä¾‹ã‚’示ã—ã¾ã™ï¼š + +```sql +CREATE TABLE otel_logs_merged +ENGINE = Merge('default', 'otel_logs_v[2|3]') + +SELECT Status, count() AS c +FROM otel_logs_merged +GROUP BY Status +ORDER BY c DESC +LIMIT 5 + +┌─Status─┬────────c─┠+│ 200 │ 38319300 │ +│ 304 │ 1360912 │ +│ 302 │ 799340 │ +│ 404 │ 420044 │ +│ 301 │ 270212 │ +└────────┴──────────┘ + +5 rows in set. Elapsed: 0.073 sec. Processed 41.46 million rows, 82.92 MB (565.43 million rows/s., 1.13 GB/s.) +``` + +æ–°ã—ã„テーブルãŒè¿½åŠ ã•ã‚ŒãŸå ´åˆã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯`EXCHANGE`テーブル構文を使用ã—ã¦æ›´æ–°ã§ãã¾ã™ã€‚例ãˆã°ã€v4テーブルを追加ã™ã‚‹ã«ã¯ã€æ–°ã—ã„テーブルを作æˆã—ã€ä»¥å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨åŽŸå­äº¤æ›ã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE otel_logs_merged_temp +ENGINE = Merge('default', 'otel_logs_v[2|3|4]') + +EXCHANGE TABLE otel_logs_merged_temp AND otel_logs_merged + +SELECT Status, count() AS c +FROM otel_logs_merged +GROUP BY Status +ORDER BY c DESC +LIMIT 5 + +┌─Status─┬────────c─┠+│ 200 │ 39259996 │ +│ 304 │ 1378564 │ +│ 302 │ 820118 │ +│ 404 │ 429220 │ +│ 301 │ 276960 │ +└────────┴──────────┘ + +5 rows in set. Elapsed: 0.068 sec. Processed 42.46 million rows, 84.92 MB (620.45 million rows/s., 1.24 GB/s.) +``` diff --git a/docs/ja/use-cases/observability/schema-design.md b/docs/ja/use-cases/observability/schema-design.md new file mode 100644 index 00000000000..f963dfa5f69 --- /dev/null +++ b/docs/ja/use-cases/observability/schema-design.md @@ -0,0 +1,1608 @@ +--- +title: スキーマ設計 +description: 観測性ã®ãŸã‚ã®ã‚¹ã‚­ãƒ¼ãƒžè¨­è¨ˆ +slug: /ja/observability/schema-design +keywords: [observability, logs, traces, metrics, OpenTelemetry, Grafana, otel] +--- + +# 観測性ã®ãŸã‚ã®ã‚¹ã‚­ãƒ¼ãƒžè¨­è¨ˆ + +ユーザーã«ã¯ã€ä»¥ä¸‹ã®ç†ç”±ã‹ã‚‰ã€ãƒ­ã‚°ãŠã‚ˆã³ãƒˆãƒ¬ãƒ¼ã‚¹ç”¨ã®ç‹¬è‡ªã®ã‚¹ã‚­ãƒ¼ãƒžã‚’常ã«ä½œæˆã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +- **主キーã®é¸æŠž** - デフォルトã®ã‚¹ã‚­ãƒ¼ãƒžã¯ç‰¹å®šã®ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã«æœ€é©åŒ–ã•ã‚ŒãŸ `ORDER BY` を使用ã—ã¦ã„ã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ã‚ãªãŸã®ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンãŒã“ã‚Œã«ä¸€è‡´ã™ã‚‹å¯èƒ½æ€§ã¯ä½Žã„ã§ã™ã€‚ +- **構造ã®æŠ½å‡º** - ユーザーã¯ã€æ—¢å­˜ã®ã‚«ãƒ©ãƒ ã‹ã‚‰æ–°ã—ã„カラムを抽出ã—ãŸã„å ´åˆãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“(例ãˆã° `Body` カラム)。ã“ã‚Œã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ã‚«ãƒ©ãƒ ï¼ˆãŠã‚ˆã³è¤‡é›‘ãªã‚±ãƒ¼ã‚¹ã§ã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ュー)を使用ã—ã¦å®Ÿç¾ã§ãã¾ã™ã€‚ã“ã‚Œã«ã¯ã‚¹ã‚­ãƒ¼ãƒžã®å¤‰æ›´ãŒå¿…è¦ã§ã™ã€‚ +- **マップã®æœ€é©åŒ–** - デフォルトã®ã‚¹ã‚­ãƒ¼ãƒžã¯ã€å±žæ€§ã®ä¿å­˜ã« Map 型を使用ã—ã¦ã„ã¾ã™ã€‚ã“れらã®ã‚«ãƒ©ãƒ ã¯ä»»æ„ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ä¿å­˜ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ã“ã‚Œã¯é‡è¦ãªæ©Ÿèƒ½ã§ã™ãŒã€ã‚¤ãƒ™ãƒ³ãƒˆã‹ã‚‰ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯é€šå¸¸å‰ã‚‚ã£ã¦å®šç¾©ã•ã‚Œã¦ã„ãªã„ãŸã‚ã€ClickHouseã®ã‚ˆã†ãªå¼·ã型付ã‘られãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ä¿å­˜ã§ãã¾ã›ã‚“。ãã®ãŸã‚ã€ãƒžãƒƒãƒ—キーやãã®å€¤ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯é€šå¸¸ã®ã‚«ãƒ©ãƒ ã«æ¯”ã¹ã¦åŠ¹çŽ‡ãŒè‰¯ãã‚ã‚Šã¾ã›ã‚“。ã“れを解決ã™ã‚‹ãŸã‚ã«ã€ã‚¹ã‚­ãƒ¼ãƒžã‚’変更ã—ã€æœ€ã‚‚一般的ã«ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã‚‹ãƒžãƒƒãƒ—キーをトップレベルã®ã‚«ãƒ©ãƒ ã¨ã—ã¦é…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™â€”「SQLã§ã®æ§‹é€ ã®æŠ½å‡ºã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。ã“ã‚Œã«ã¯ã‚¹ã‚­ãƒ¼ãƒžã®å¤‰æ›´ãŒå¿…è¦ã§ã™ã€‚ +- **マップキーアクセスã®ç°¡ç•¥åŒ–** - マップ内ã®ã‚­ãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã‚ˆã‚Šå†—é•·ãªæ§‹æ–‡ãŒå¿…è¦ã§ã™ã€‚ユーザーã¯ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ã§ã“れを軽減ã§ãã¾ã™ã€‚「エイリアスã®ä½¿ç”¨ã€ã‚’å‚ç…§ã—ã¦ã‚¯ã‚¨ãƒªã‚’簡素化ã—ã¦ãã ã•ã„。 +- **セカンダリインデックス** - デフォルトã®ã‚¹ã‚­ãƒ¼ãƒžã¯ã€Map ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã®é«˜é€ŸåŒ–やテキストクエリã®åŠ é€Ÿã®ãŸã‚ã«ã‚»ã‚«ãƒ³ãƒ€ãƒªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¾ã™ã€‚ã“れらã¯é€šå¸¸ä¸è¦ã§ã€è¿½åŠ ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’消費ã—ã¾ã™ãŒã€ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€å¿…è¦ã§ã‚ã‚‹ã“ã¨ã‚’テストã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚「セカンダリ / データスキップインデックスã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- **コーデックã®ä½¿ç”¨** - ユーザーã¯ã€äºˆæœŸã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’ç†è§£ã—ã€åœ§ç¸®ã‚’改善ã™ã‚‹è¨¼æ‹ ãŒã‚ã‚‹å ´åˆã€ã‚«ãƒ©ãƒ ã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ã‚’カスタマイズã—ãŸã„ã¨æ€ã†ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 + +_上記ã®å„使用例ã«ã¤ã„ã¦è©³ç´°ã«èª¬æ˜Žã—ã¾ã™ã€‚_ + +**é‡è¦**: ユーザーã¯æœ€é©ãªåœ§ç¸®ã¨ã‚¯ã‚¨ãƒªãƒ‘フォーマンスを実ç¾ã™ã‚‹ãŸã‚ã«ã‚¹ã‚­ãƒ¼ãƒžã‚’æ‹¡å¼µãŠã‚ˆã³å¤‰æ›´ã™ã‚‹ã“ã¨ãŒå¥¨åŠ±ã•ã‚Œã¦ã„ã¾ã™ãŒã€ä¸»è¦ã‚«ãƒ©ãƒ ã®OTelスキーマå付ã‘ã«å¾“ã†ã¹ãã§ã™ã€‚ClickHouseã®Grafanaプラグインã¯ã€ã‚¯ã‚¨ãƒªãƒ“ルドを支æ´ã™ã‚‹ãŸã‚ã«ã€ã„ãã¤ã‹ã®åŸºæœ¬çš„ãªOTelカラムã®å­˜åœ¨ã‚’å‰æã¨ã—ã¦ã„ã¾ã™ï¼ˆä¾‹ï¼šã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã‚„SeverityText)。ログãŠã‚ˆã³ãƒˆãƒ¬ãƒ¼ã‚¹ã«å¿…è¦ãªã‚«ãƒ©ãƒ ã¯ã€ã“ã“ã«æ–‡æ›¸åŒ–ã•ã‚Œã¦ã„ã¾ã™ [[1]](https://grafana.com/developers/plugin-tools/tutorials/build-a-logs-data-source-plugin#logs-data-frame-format)[[2]](https://grafana.com/docs/grafana/latest/explore/logs-integration/) åŠã³[ã“ã¡ã‚‰](https://grafana.com/docs/grafana/latest/explore/trace-integration/#data-frame-structure)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。ã“れらã®ã‚«ãƒ©ãƒ åを変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ãƒ—ラグイン設定ã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã—ã¦ãã ã•ã„。 + +## SQLã§ã®æ§‹é€ ã®æŠ½å‡º + +構造化ã•ã‚ŒãŸãƒ­ã‚°ã¾ãŸã¯éžæ§‹é€ åŒ–ã•ã‚ŒãŸãƒ­ã‚°ã‚’å–り込む際ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã—ã°ã—ã°ä»¥ä¸‹ã‚’実ç¾ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼š + +- **文字列ブロブã‹ã‚‰ã®ã‚«ãƒ©ãƒ ã®æŠ½å‡º**。ã“れをクエリã™ã‚‹æ–¹ãŒã€ã‚¯ã‚¨ãƒªæ™‚ã®æ–‡å­—列æ“作よりも速ããªã‚Šã¾ã™ã€‚ +- **マップã‹ã‚‰ã®ã‚­ãƒ¼ã®æŠ½å‡º**。デフォルトã®ã‚¹ã‚­ãƒ¼ãƒžã¯ä»»æ„ã®å±žæ€§ã‚’ Map åž‹ã®ã‚«ãƒ©ãƒ ã«æ ¼ç´ã—ã¾ã™ã€‚ã“ã®åž‹ã¯ã‚¹ã‚­ãƒ¼ãƒžãƒ¬ã‚¹ãªæ©Ÿèƒ½ã‚’æä¾›ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ­ã‚°ã‚„トレースを定義ã™ã‚‹éš›ã«å±žæ€§ã®ã‚«ãƒ©ãƒ ã‚’事å‰ã«å®šç¾©ã™ã‚‹å¿…è¦ãŒãªã„ã¨ã„ã†åˆ©ç‚¹ãŒã‚ã‚Šã¾ã™â€”特ã«Kubernetesã‹ã‚‰ãƒ­ã‚°ã‚’åŽé›†ã—ã€å¾Œã§ãƒãƒƒãƒ‰ãƒ©ãƒ™ãƒ«ã‚’ä¿æŒã™ã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ãŸã„å ´åˆã€ã“ã‚Œã¯ã—ã°ã—ã°ä¸å¯èƒ½ã§ã™ã€‚マップã®ã‚­ãƒ¼ã‚„ãã®å€¤ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã€æ™®é€šã®ClickHouseカラムã«æ¯”ã¹ã¦é…ããªã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ãƒžãƒƒãƒ—ã‹ã‚‰ã‚­ãƒ¼ã‚’抽出ã—ã¦ãƒ«ãƒ¼ãƒˆãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ©ãƒ ã«é…ç½®ã™ã‚‹ã“ã¨ã¯ã€ã—ã°ã—ã°æœ›ã¾ã—ã„ã§ã™ã€‚ + +以下ã®ã‚¯ã‚¨ãƒªã‚’考ãˆã¦ã¿ã¦ãã ã•ã„: + +特定ã®URLパスã«å¯¾ã—ã¦æœ€ã‚‚多ãã®POSTリクエストをå—ã‘å–るカウントをå–ã‚ŠãŸã„ã¨ã—ã¾ã™ã€‚JSONブロブ㯠`Body` カラムã«Stringã¨ã—ã¦ä¿å­˜ã•ã‚Œã¾ã™ã€‚ã¾ãŸã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼å†…ã§json_parserを有効ã«ã—ã¦ã„ã‚‹å ´åˆã€LogAttributesカラム㫠`Map(String, String)` ã¨ã—ã¦ã‚‚ä¿å­˜ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +SELECT LogAttributes +FROM otel_logs +LIMIT 1 +FORMAT Vertical + +è¡Œ 1: +────── +Body: {"remote_addr":"54.36.149.41","remote_user":"-","run_time":"0","time_local":"2019-01-22 00:26:14.000","request_type":"GET","request_path":"\/filter\/27|13 ,27| 5 ,p53","request_protocol":"HTTP\/1.1","status":"200","size":"30577","referer":"-","user_agent":"Mozilla\/5.0 (compatible; AhrefsBot\/6.1; +http:\/\/ahrefs.com\/robot\/)"} +LogAttributes: {'status':'200','log.file.name':'access-structured.log','request_protocol':'HTTP/1.1','run_time':'0','time_local':'2019-01-22 00:26:14.000','size':'30577','user_agent':'Mozilla/5.0 (compatible; AhrefsBot/6.1; +http://ahrefs.com/robot/)','referer':'-','remote_user':'-','request_type':'GET','request_path':'/filter/27|13 ,27| 5 ,p53','remote_addr':'54.36.149.41'} +``` + +LogAttributesãŒåˆ©ç”¨å¯èƒ½ã§ã‚ã‚‹ã¨æƒ³å®šã™ã‚‹ã¨ã€ã‚µã‚¤ãƒˆã®ã©ã®URLパスãŒæœ€ã‚‚多ãã®POSTリクエストをå—ã‘å–ã£ã¦ã„ã‚‹ã‹ã‚’カウントã™ã‚‹ãŸã‚ã®ã‚¯ã‚¨ãƒªã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ï¼š + +```sql +SELECT path(LogAttributes['request_path']) AS path, count() AS c +FROM otel_logs +WHERE ((LogAttributes['request_type']) = 'POST') +GROUP BY path +ORDER BY c DESC +LIMIT 5 + +┌─path─────────────────────┬─────c─┠+│ /m/updateVariation │ 12182 │ +│ /site/productCard │ 11080 │ +│ /site/productPrice │ 10876 │ +│ /site/productModelImages │ 10866 │ +│ /site/productAdditives │ 10866 │ +└──────────────────────────┴───────┘ + +5 rows in set. Elapsed: 0.735 sec. Processed 10.36 million rows, 4.65 GB (14.10 million rows/s., 6.32 GB/s.) +Peak memory usage: 153.71 MiB. +``` + +ã“ã“ã§ã®ãƒžãƒƒãƒ—構文ã®ä½¿ç”¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ãŸã¨ãˆã° `LogAttributes['request_path']`ã‚„ã€URLã‹ã‚‰ã‚¯ã‚¨ãƒªãƒ‘ラメータを削除ã™ã‚‹ãŸã‚ã® [`path` 関数](/ja/sql-reference/functions/url-functions#path)ã§ã™ã€‚ + +ユーザーãŒã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼å†…ã§JSONパースを有効ã«ã—ã¦ã„ãªã„å ´åˆã€`LogAttributes`ã¯ç©ºã«ãªã‚Šã¾ã™ã€‚ãã®ãŸã‚ã€[JSON関数](/ja/sql-reference/functions/json-functions)を使用ã—ã¦æ–‡å­—列 `Body` ã‹ã‚‰ã‚«ãƒ©ãƒ ã‚’抽出ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +> 構造化ã•ã‚ŒãŸãƒ­ã‚°ã®JSONパースã¯ClickHouseã§è¡Œã†ã“ã¨ã‚’一般的ã«ãŠå‹§ã‚ã—ã¾ã™ã€‚ClickHouseãŒæœ€é€Ÿã®JSONパース実装ã§ã‚ã‚‹ã¨è‡ªä¿¡ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ãŸã ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ­ã‚°ã‚’ä»–ã®ã‚½ãƒ¼ã‚¹ã«é€ä¿¡ã—ãŸã„å ´åˆã‚‚ã‚ã‚‹ã“ã¨ã‚’èªè­˜ã—ã¦ã„ã¾ã™ã€‚ãã‚Œã«ã“ã®ãƒ­ã‚¸ãƒƒã‚¯ã‚’ SQL ã«é…ç½®ã—ãŸããªã„å ´åˆã‚‚ã‚ã‚‹ã§ã—ょã†ã€‚ + +```sql +SELECT path(JSONExtractString(Body, 'request_path')) AS path, count() AS c +FROM otel_logs +WHERE JSONExtractString(Body, 'request_type') = 'POST' +GROUP BY path +ORDER BY c DESC +LIMIT 5 + +┌─path─────────────────────┬─────c─┠+│ /m/updateVariation │ 12182 │ +│ /site/productCard │ 11080 │ +│ /site/productPrice │ 10876 │ +│ /site/productAdditives │ 10866 │ +│ /site/productModelImages │ 10866 │ +└──────────────────────────┴───────┘ + +5 rows in set. Elapsed: 0.668 sec. Processed 10.37 million rows, 5.13 GB (15.52 million rows/s., 7.68 GB/s.) +Peak memory usage: 172.30 MiB. +``` + +次ã«ã€éžæ§‹é€ åŒ–ã•ã‚ŒãŸãƒ­ã‚°ã‚’考ãˆã¦ã¿ã¾ã—ょã†ï¼š + +```sql +SELECT Body, LogAttributes +FROM otel_logs +LIMIT 1 +FORMAT Vertical + +è¡Œ 1: +────── +Body: 151.233.185.144 - - [22/Jan/2019:19:08:54 +0330] "GET /image/105/brand HTTP/1.1" 200 2653 "https://www.zanbil.ir/filter/b43,p56" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" "-" +LogAttributes: {'log.file.name':'access-unstructured.log'} +``` + +éžæ§‹é€ åŒ–ログã®é¡žä¼¼ã®ã‚¯ã‚¨ãƒªã«ã¯ã€[`extractAllGroupsVertical` 関数](/ja/sql-reference/functions/string-search-functions#extractallgroupsvertical)を介ã—ãŸæ­£è¦è¡¨ç¾ã®ä½¿ç”¨ãŒå¿…è¦ã§ã™ã€‚ + +```sql +SELECT + path((groups[1])[2]) AS path, + count() AS c +FROM +( + SELECT extractAllGroupsVertical(Body, '(\\w+)\\s([^\\s]+)\\sHTTP/\\d\\.\\d') AS groups + FROM otel_logs + WHERE ((groups[1])[1]) = 'POST' +) +GROUP BY path +ORDER BY c DESC +LIMIT 5 + +┌─path─────────────────────┬─────c─┠+│ /m/updateVariation │ 12182 │ +│ /site/productCard │ 11080 │ +│ /site/productPrice │ 10876 │ +│ /site/productModelImages │ 10866 │ +│ /site/productAdditives │ 10866 │ +└──────────────────────────┴───────┘ + +5 rows in set. Elapsed: 1.953 sec. Processed 10.37 million rows, 3.59 GB (5.31 million rows/s., 1.84 GB/s.) +``` + +éžæ§‹é€ åŒ–ログã®ãƒ‘ースã®ãŸã‚ã®ã‚¯ã‚¨ãƒªã®è¤‡é›‘ã•ã¨ã‚³ã‚¹ãƒˆãŒå¢—加ã—ã¦ã„ã‚‹ã®ã«æ³¨æ„ã—ã¦ãã ã•ã„(パフォーマンスã®é•ã„ã«æ³¨æ„)。ã—ãŸãŒã£ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã¯ã€å¯èƒ½ãªé™ã‚Šæ§‹é€ åŒ–ã•ã‚ŒãŸãƒ­ã‚°ã‚’使用ã™ã‚‹ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚ + +> 上記ã®ã‚¯ã‚¨ãƒªã¯ã€æ­£è¦è¡¨ç¾Dictionaryを利用ã—ã¦æœ€é©åŒ–ã§ãã¾ã™ã€‚「Dictionaryã®ä½¿ç”¨ã€ã‚’å‚ç…§ã—ã¦è©³ç´°ã‚’確èªã—ã¦ãã ã•ã„。 + +ã“れらã®ä¸¡æ–¹ã®ä½¿ç”¨ä¾‹ã¯ã€ä¸Šè¨˜ã®ã‚¯ã‚¨ãƒªãƒ­ã‚¸ãƒƒã‚¯ã‚’挿入時ã«ç§»å‹•ã•ã›ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ClickHouseã§æº€ãŸã™ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã«ã„ãã¤ã‹ã®ã‚¢ãƒ—ローãƒã‚’示ã—ã€ã©ã®ã‚¢ãƒ—ローãƒãŒé©åˆ‡ã‹ã‚’強調ã—ã¾ã™ã€‚ + +> ユーザーã¯ã¾ãŸã€ã“ã“ã«èª¬æ˜Žã•ã‚Œã¦ã„るよã†ã« OTel Collector ã®ãƒ—ロセッサやオペレーターを使用ã—ã¦å‡¦ç†ã‚’è¡Œã†ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã»ã¨ã‚“ã©ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ ClickHouse ãŒã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã®ãƒ—ロセッサよりもリソース効率ãŒé«˜ãã€é«˜é€Ÿã§ã‚ã‚‹ã“ã¨ã‚’見ã¤ã‘ã‚‹ã§ã—ょã†ã€‚SQL ã§å…¨ã¦ã®ã‚¤ãƒ™ãƒ³ãƒˆå‡¦ç†ã‚’è¡Œã†ã“ã¨ã®ä¸»ãªæ¬ ç‚¹ã¯ã€ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ãŒ ClickHouse ã«çµã³ã¤ãã“ã¨ã§ã™ã€‚ãŸã¨ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ OTel コレクターã‹ã‚‰ä»–ã®å®›å…ˆï¼ˆä¾‹ï¼šS3)ã«å‡¦ç†æ¸ˆã¿ã®ãƒ­ã‚°ã‚’é€ä¿¡ã—ãŸã„å ´åˆã‚‚ã‚ã‚Šã¾ã™ã€‚ + +### マテリアライズドカラム + +マテリアライズドカラムã¯ã€ä»–ã®ã‚«ãƒ©ãƒ ã‹ã‚‰æ§‹é€ ã‚’抽出ã™ã‚‹æœ€ã‚‚シンプルãªè§£æ±ºç­–ã‚’æä¾›ã—ã¾ã™ã€‚ã“ã®ã‚ˆã†ãªã‚«ãƒ©ãƒ ã®å€¤ã¯å¸¸ã«æŒ¿å…¥æ™‚ã«è¨ˆç®—ã•ã‚Œã€INSERTクエリã§æŒ‡å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +> マテリアライズドカラムã¯ã€æŒ¿å…¥æ™‚ã«æ–°ã—ã„カラムã«å€¤ãŒæŠ½å‡ºã•ã‚Œã‚‹ãŸã‚ã€è¿½åŠ ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +マテリアライズドカラムã¯ã€ä»»æ„ã® ClickHouse 表ç¾ã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€[文字列ã®å‡¦ç†](/ja/sql-reference/functions/string-functions)([æ­£è¦è¡¨ç¾ã‚„検索](/ja/sql-reference/functions/string-search-functions)ã‚’å«ã‚€ï¼‰ã‚„ [URL](/ja/sql-reference/functions/url-functions)ã€[型変æ›](/ja/sql-reference/functions/type-conversion-functions)ã€[JSON ã‹ã‚‰ã®å€¤ã®æŠ½å‡º](/ja/sql-reference/functions/json-functions)ã€ã¾ãŸã¯ [数学的æ“作](/ja/sql-reference/functions/math-functions)ãªã©ã€ã‚らゆる分æžé–¢æ•°ã‚’活用ã§ãã¾ã™ã€‚ + +基本処ç†ã«ã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ã‚«ãƒ©ãƒ ã‚’推奨ã—ã¾ã™ã€‚ã“れらã¯ç‰¹ã«ã€ãƒžãƒƒãƒ—ã‹ã‚‰å€¤ã‚’抽出ã—ã€ãれをルートカラムã«æ˜‡æ ¼ã•ã›ã€åž‹å¤‰æ›ã‚’è¡Œã†ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚éžå¸¸ã«åŸºæœ¬çš„ãªã‚¹ã‚­ãƒ¼ãƒžã‚„マテリアライズドビューã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã™ã‚‹å ´åˆã«ã‚ˆã役立ã¡ã¾ã™ã€‚以下ã¯ã€ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã«ã‚ˆã£ã¦JSON㌠`LogAttributes` カラムã«æŠ½å‡ºã•ã‚ŒãŸãƒ­ã‚°ã®ã‚¹ã‚­ãƒ¼ãƒžã§ã™ï¼š + +```sql +CREATE TABLE otel_logs +( + `Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)), + `TraceId` String CODEC(ZSTD(1)), + `SpanId` String CODEC(ZSTD(1)), + `TraceFlags` UInt32 CODEC(ZSTD(1)), + `SeverityText` LowCardinality(String) CODEC(ZSTD(1)), + `SeverityNumber` Int32 CODEC(ZSTD(1)), + `ServiceName` LowCardinality(String) CODEC(ZSTD(1)), + `Body` String CODEC(ZSTD(1)), + `ResourceSchemaUrl` String CODEC(ZSTD(1)), + `ResourceAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `ScopeSchemaUrl` String CODEC(ZSTD(1)), + `ScopeName` String CODEC(ZSTD(1)), + `ScopeVersion` String CODEC(ZSTD(1)), + `ScopeAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `LogAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `RequestPage` String MATERIALIZED path(LogAttributes['request_path']), + `RequestType` LowCardinality(String) MATERIALIZED LogAttributes['request_type'], + `RefererDomain` String MATERIALIZED domain(LogAttributes['referer']) +) +ENGINE = MergeTree +PARTITION BY toDate(Timestamp) +ORDER BY (ServiceName, SeverityText, toUnixTimestamp(Timestamp), TraceId) +``` + +JSON関数を使用ã—ã¦String `Body` ã‹ã‚‰æŠ½å‡ºã™ã‚‹ãŸã‚ã®åŒç­‰ã®ã‚¹ã‚­ãƒ¼ãƒžã¯[ã“ã¡ã‚‰](https://pastila.nl/?005cbb97/513b174a7d6114bf17ecc657428cf829#gqoOOiomEjIiG6zlWhE+Sg==)ã«ã‚ã‚Šã¾ã™ã€‚ + +ç§ãŸã¡ã®3ã¤ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®ã‚«ãƒ©ãƒ ã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒšãƒ¼ã‚¸ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚¿ã‚¤ãƒ—ã€ãƒªãƒ•ã‚¡ãƒ©ãƒ¼ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã‚’抽出ã—ã¾ã™ã€‚ã“れらã¯ãƒžãƒƒãƒ—ã®ã‚­ãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã€ãã®å€¤ã«é–¢æ•°ã‚’é©ç”¨ã—ã¾ã™ã€‚次ã®ã‚¯ã‚¨ãƒªã¯ã€è‘—ã—ã速ããªã‚Šã¾ã™ï¼š + +```sql +SELECT RequestPage AS path, count() AS c +FROM otel_logs +WHERE RequestType = 'POST' +GROUP BY path +ORDER BY c DESC +LIMIT 5 + +┌─path─────────────────────┬─────c─┠+│ /m/updateVariation │ 12182 │ +│ /site/productCard │ 11080 │ +│ /site/productPrice │ 10876 │ +│ /site/productAdditives │ 10866 │ +│ /site/productModelImages │ 10866 │ +└──────────────────────────┴───────┘ + +5 rows in set. Elapsed: 0.173 sec. Processed 10.37 million rows, 418.03 MB (60.07 million rows/s., 2.42 GB/s.) +Peak memory usage: 3.16 MiB. +``` + +> マテリアライズドカラムã¯ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ `SELECT *` ã®å ´åˆã«è¿”ã•ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯ã€SELECT * ã®çµæžœãŒå¸¸ã«INSERTã§ãƒ†ãƒ¼ãƒ–ルã«æˆ»ã•ã‚Œã‚‹ã“ã¨ãŒã§ãã‚‹ã¨ã„ã†ä¸å¤‰æ¡ä»¶ã‚’維æŒã™ã‚‹ãŸã‚ã§ã™ã€‚ã“ã®å‹•ä½œã¯ `asterisk_include_materialized_columns=1` を設定ã™ã‚‹ã“ã¨ã§ç„¡åŠ¹ã«ã§ãã€Grafanaã§ã‚‚有効ã«ã§ãã¾ã™ï¼ˆãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹è¨­å®šã® `Additional Settings -> Custom Settings` ã‚’å‚照)。 + +## マテリアライズドビュー + +マテリアライズドビューã¯ã€ãƒ­ã‚°ã‚„トレースã«å¯¾ã—ã¦SQLフィルタリングや変æ›ã‚’é©ç”¨ã™ã‚‹ãŸã‚ã®ã€ã‚ˆã‚Šå¼·åŠ›ãªæ‰‹æ®µã‚’æä¾›ã—ã¾ã™ã€‚ + +マテリアライズドビューã¯ã€ã‚¯ã‚¨ãƒªã®ã‚³ã‚¹ãƒˆã‚’クエリ時ã‹ã‚‰æŒ¿å…¥æ™‚ã«ã‚·ãƒ•ãƒˆã™ã‚‹ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ClickHouseã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯ã€ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ãŒæŒ¿å…¥ã•ã‚Œã‚‹éš›ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ–ロック上ã§ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹ãƒˆãƒªã‚¬ãƒ¼ã«éŽãŽã¾ã›ã‚“。ã“ã®ã‚¯ã‚¨ãƒªã®çµæžœãŒã€ç¬¬äºŒã®ã€Œã‚¿ãƒ¼ã‚²ãƒƒãƒˆã€ãƒ†ãƒ¼ãƒ–ルã«æŒ¿å…¥ã•ã‚Œã¾ã™ã€‚ + +NEEDS ALT + +
    + +> ClickHouseã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯ã€åŸºã«ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ãŒæµå…¥ã™ã‚‹ã«ã¤ã‚Œã¦ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§æ›´æ–°ã•ã‚Œã€ç¶™ç¶šçš„ã«æ›´æ–°ã•ã‚Œã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚対照的ã«ã€ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã¯ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯é€šå¸¸ã‚¯ã‚¨ãƒªã®é™çš„スナップショットã§ã€ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ãŒå¿…è¦ã§ã™ï¼ˆClickHouseã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã«ä¼¼ã¦ã„ã¾ã™ï¼‰ã€‚ + +マテリアライズドビューã«é–¢é€£ä»˜ã‘られãŸã‚¯ã‚¨ãƒªã¯ã€ç†è«–çš„ã«ã¯ã€é›†è¨ˆã‚’å«ã‚€ä»»æ„ã®ã‚¯ã‚¨ãƒªã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ãŒã€[JOINã«åˆ¶é™ãŒã‚ã‚Šã¾ã™](https://clickhouse.com/blog/using-materialized-views-in-clickhouse#materialized-views-and-joins)。ログやトレースã«å¿…è¦ãªå¤‰æ›ã‚„フィルターワークロードã«ãŠã„ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ä»»æ„ã®SELECT文をå¯èƒ½ã¨è¦‹ãªã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ユーザーã¯ã€ã‚¯ã‚¨ãƒªãŒå˜ã«ãƒ†ãƒ¼ãƒ–ル(ソーステーブル)ã«æŒ¿å…¥ã•ã‚Œã‚‹è¡Œä¸Šã§å®Ÿè¡Œã•ã‚Œã‚‹ãƒˆãƒªã‚¬ãƒ¼ã§ã‚ã‚Šã€çµæžœãŒæ–°ã—ã„テーブル(ターゲットテーブル)ã«é€ä¿¡ã•ã‚Œã‚‹ã“ã¨ã‚’覚ãˆã¦ãŠãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +ソーステーブルã«ãƒ‡ãƒ¼ã‚¿ã‚’二é‡ä¿å­˜ã—ãªã„よã†ã«ã™ã‚‹ãŸã‚ã€ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã®ãƒ†ãƒ¼ãƒ–ルエンジンを[Nullテーブルエンジン](/ja/engines/table-engines/special/null)ã«å¤‰æ›´ã—ã€å…ƒã®ã‚¹ã‚­ãƒ¼ãƒžã‚’ä¿æŒã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ç§ãŸã¡ã®OTelコレクターã¯ã€ã“ã®ãƒ†ãƒ¼ãƒ–ルã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã—続ã‘ã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ­ã‚°ã®å ´åˆã€otel_logsテーブルã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + +```sql +CREATE TABLE otel_logs +( + `Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)), + `TraceId` String CODEC(ZSTD(1)), + `SpanId` String CODEC(ZSTD(1)), + `TraceFlags` UInt32 CODEC(ZSTD(1)), + `SeverityText` LowCardinality(String) CODEC(ZSTD(1)), + `SeverityNumber` Int32 CODEC(ZSTD(1)), + `ServiceName` LowCardinality(String) CODEC(ZSTD(1)), + `Body` String CODEC(ZSTD(1)), + `ResourceSchemaUrl` String CODEC(ZSTD(1)), + `ResourceAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `ScopeSchemaUrl` String CODEC(ZSTD(1)), + `ScopeName` String CODEC(ZSTD(1)), + `ScopeVersion` String CODEC(ZSTD(1)), + `ScopeAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `LogAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)) +) ENGINE = Null +``` + +Nullテーブルエンジンã¯å¼·åŠ›ãªæœ€é©åŒ–機能ã§ã™â€” `/dev/null` ã®ã‚ˆã†ã«è€ƒãˆã¦ãã ã•ã„。ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã—ã¾ã›ã‚“ãŒã€é–¢é€£ä»˜ã‘られãŸãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯æŒ¿å…¥ã•ã‚ŒãŸè¡Œã«å¯¾ã—ã¦å®Ÿè¡Œã•ã‚Œç¶šã‘ã¾ã™ã€‚ + +以下ã®ã‚¯ã‚¨ãƒªã‚’検討ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ã€è¡Œã‚’ç§ãŸã¡ãŒä¿å­˜ã—ãŸã„フォーマットã«å¤‰æ›ã—ã¾ã™ã€‚LogAttributesã‹ã‚‰ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ã‚’抽出ã—(ã“ã‚Œã¯ã‚³ãƒ¬ã‚¯ã‚¿ãƒ¼ã«ã‚ˆã£ã¦ `json_parser` オペレーターを使用ã—ã¦è¨­å®šã•ã‚ŒãŸã¨ä»®å®šï¼‰ã€`SeverityText` 㨠`SeverityNumber` を設定ã—ã¾ã™ï¼ˆã“ã‚Œã«ã¯ã„ãã¤ã‹ã®å˜ç´”ãªæ¡ä»¶ã¨[ã“れらã®ã‚«ãƒ©ãƒ ã«é–¢ã™ã‚‹å®šç¾©](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-severitytext)ã«åŸºã¥ã„ã¦ã„ã¾ã™ï¼‰ã€‚ã“ã®å ´åˆã€ãƒãƒ”ュレーションã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‹ã£ã¦ã„るカラムã®ã¿ã‚’é¸æŠžã—ã¾ã™â€”TraceIdã€SpanIdã€TraceFlagsãªã©ã®ã‚«ãƒ©ãƒ ã¯ç„¡è¦–ã—ã¾ã™ã€‚ + +```sql +SELECT + Body, + Timestamp::DateTime AS Timestamp, + ServiceName, + LogAttributes['status'] AS Status, + LogAttributes['request_protocol'] AS RequestProtocol, + LogAttributes['run_time'] AS RunTime, + LogAttributes['size'] AS Size, + LogAttributes['user_agent'] AS UserAgent, + LogAttributes['referer'] AS Referer, + LogAttributes['remote_user'] AS RemoteUser, + LogAttributes['request_type'] AS RequestType, + LogAttributes['request_path'] AS RequestPath, + LogAttributes['remote_addr'] AS RemoteAddr, + domain(LogAttributes['referer']) AS RefererDomain, + path(LogAttributes['request_path']) AS RequestPage, + multiIf(Status::UInt64 > 500, 'CRITICAL', Status::UInt64 > 400, 'ERROR', Status::UInt64 > 300, 'WARNING', 'INFO') AS SeverityText, + multiIf(Status::UInt64 > 500, 20, Status::UInt64 > 400, 17, Status::UInt64 > 300, 13, 9) AS SeverityNumber +FROM otel_logs +LIMIT 1 +FORMAT Vertical + +è¡Œ 1: +────── +Body: {"remote_addr":"54.36.149.41","remote_user":"-","run_time":"0","time_local":"2019-01-22 00:26:14.000","request_type":"GET","request_path":"\/filter\/27|13 ,27| 5 ,p53","request_protocol":"HTTP\/1.1","status":"200","size":"30577","referer":"-","user_agent":"Mozilla\/5.0 (compatible; AhrefsBot\/6.1; +http:\/\/ahrefs.com\/robot\/)"} +Timestamp: 2019-01-22 00:26:14 +ServiceName: +Status: 200 +RequestProtocol: HTTP/1.1 +RunTime: 0 +Size: 30577 +UserAgent: Mozilla/5.0 (compatible; AhrefsBot/6.1; +http://ahrefs.com/robot/) +Referer: - +RemoteUser: - +RequestType: GET +RequestPath: /filter/27|13 ,27| 5 ,p53 +RemoteAddr: 54.36.149.41 +RefererDomain: +RequestPage: /filter/27|13 ,27| 5 ,p53 +SeverityText: INFO +SeverityNumber: 9 + +1 row in set. Elapsed: 0.027 sec. +``` + +上記ã®ã‚«ãƒ©ãƒ ã«ã¯ã€å°†æ¥çš„ã«è¿½åŠ ã•ã‚Œã‚‹å¯èƒ½æ€§ã®ã‚る追加属性を考慮ã—ã¦ã€`Body` カラムも抽出ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ã‚«ãƒ©ãƒ ã¯ClickHouseã§ã®åœ§ç¸®ãŒåŠ¹ãã€ã‚¢ã‚¯ã‚»ã‚¹ã•ã‚Œã‚‹ã“ã¨ã¯ã»ã¨ã‚“ã©ãªã„ãŸã‚ã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã«å½±éŸ¿ã‚’与ãˆã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。最後ã«ã€æ—¥æ™‚ã‚’DateTimeã«å¤‰æ›ï¼ˆã‚¹ãƒšãƒ¼ã‚¹ã‚’節約ã™ã‚‹ãŸã‚)ã—ã¾ã™ï¼ˆã€Œåž‹ã®æœ€é©åŒ–ã€ã‚’å‚照)。 + +> 上記㮠`SeverityText` 㨠`SeverityNumber` を抽出ã™ã‚‹ãŸã‚ã®[æ¡ä»¶æ–‡](/ja/sql-reference/functions/conditional-functions)ã®ä½¿ç”¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“れらã¯è¤‡é›‘ãªæ¡ä»¶ã‚’å½¢æˆã—ã€ãƒžãƒƒãƒ—内ã®å€¤ãŒã‚»ãƒƒãƒˆã•ã‚Œã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’確èªã™ã‚‹ã®ã«éžå¸¸ã«ä¾¿åˆ©ã§ã™ã€‚ルールã«å¾“ã„ã€LogAttributesã«ã™ã¹ã¦ã®ã‚­ãƒ¼ãŒå­˜åœ¨ã™ã‚‹ã“ã¨ã‚’å˜ç´”ã«ä»®å®šã—ã¾ã™ã€‚ユーザーã¯ãã‚Œã«æ…£ã‚Œã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ­ã‚°ãƒ‘ースã®å‹ã§ã‚ã‚Šã€[NULL値を扱ã†é–¢æ•°](/ja/sql-reference/functions/functions-for-nulls)ã®é–¢æ•°ã®ä»–ã§ã™ï¼ + +ã“れらã®çµæžœã‚’å—ã‘å–ã‚‹ãŸã‚ã®ãƒ†ãƒ¼ãƒ–ルãŒå¿…è¦ã§ã™ã€‚以下ã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã¯ã€ä¸Šè¨˜ã®ã‚¯ã‚¨ãƒªã«ä¸€è‡´ã—ã¾ã™ï¼š + +```sql +CREATE TABLE otel_logs_v2 +( + `Body` String, + `Timestamp` DateTime, + `ServiceName` LowCardinality(String), + `Status` UInt16, + `RequestProtocol` LowCardinality(String), + `RunTime` UInt32, + `Size` UInt32, + `UserAgent` String, + `Referer` String, + `RemoteUser` String, + `RequestType` LowCardinality(String), + `RequestPath` String, + `RemoteAddress` IPv4, + `RefererDomain` String, + `RequestPage` String, + `SeverityText` LowCardinality(String), + `SeverityNumber` UInt8 +) +ENGINE = MergeTree +ORDER BY (ServiceName, Timestamp) +``` + +ã“ã“ã§é¸æŠžã•ã‚ŒãŸåž‹ã¯ã€ã€Œåž‹ã®æœ€é©åŒ–ã€ã«é–¢ã—ã¦è­°è«–ã•ã‚ŒãŸæœ€é©åŒ–ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ + +> スキーマãŒåŠ‡çš„ã«å¤‰æ›´ã•ã‚ŒãŸã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。実際ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯Traceカラムをä¿æŒã—ãŸã„å ´åˆã‚„ã€`ResourceAttributes`カラムもä¿æŒã—ãŸã„å ´åˆãŒã‚ã‚‹ã§ã—ょã†ï¼ˆã“ã‚Œã¯é€šå¸¸Kubernetesメタデータをå«ã¿ã¾ã™ï¼‰ã€‚Grafanaã¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚«ãƒ©ãƒ ã‚’利用ã—ã¦ã€ãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹é–“ã®ãƒªãƒ³ã‚¯æ©Ÿèƒ½ã‚’æä¾›ã§ãã¾ã™â€”「Grafanaã®ä½¿ç”¨ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +以下ã«ã€`otel_logs` テーブルã«å¯¾ã—ã¦ä¸Šè¨˜ã®ã‚»ãƒ¬ã‚¯ãƒˆã‚’実行ã—ã€çµæžœã‚’ `otel_logs_v2` ã«é€ä¿¡ã™ã‚‹ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ュー `otel_logs_mv` を作æˆã—ã¾ã™ã€‚ + +```sql +CREATE MATERIALIZED VIEW otel_logs_mv TO otel_logs_v2 AS +SELECT + Body, + Timestamp::DateTime AS Timestamp, + ServiceName, + LogAttributes['status']::UInt16 AS Status, + LogAttributes['request_protocol'] AS RequestProtocol, + LogAttributes['run_time'] AS RunTime, + LogAttributes['size'] AS Size, + LogAttributes['user_agent'] AS UserAgent, + LogAttributes['referer'] AS Referer, + LogAttributes['remote_user'] AS RemoteUser, + LogAttributes['request_type'] AS RequestType, + LogAttributes['request_path'] AS RequestPath, + LogAttributes['remote_addr'] AS RemoteAddress, + domain(LogAttributes['referer']) AS RefererDomain, + path(LogAttributes['request_path']) AS RequestPage, + multiIf(Status::UInt64 > 500, 'CRITICAL', Status::UInt64 > 400, 'ERROR', Status::UInt64 > 300, 'WARNING', 'INFO') AS SeverityText, + multiIf(Status::UInt64 > 500, 20, Status::UInt64 > 400, 17, Status::UInt64 > 300, 13, 9) AS SeverityNumber +FROM otel_logs +``` + +以下ã«ç¤ºã™ã‚ˆã†ã«ã€ä¸Šè¨˜ã¯è¦–覚化ã•ã‚Œã¾ã™ã€‚ + +NEEDS ALT + +
    + +「Exporting to ClickHouseã€ã§ä½¿ç”¨ã•ã‚Œã¦ã„るコレクター設定をå†èµ·å‹•ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯æœŸå¾…ã•ã‚Œã‚‹å½¢å¼ã§ `otel_logs_v2` ã«ç¾ã‚Œã¾ã™ã€‚型付ãJSON抽出関数ã®ä½¿ç”¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +```sql +SELECT * +FROM otel_logs_v2 +LIMIT 1 +FORMAT Vertical + +è¡Œ 1: +────── +Body: {"remote_addr":"54.36.149.41","remote_user":"-","run_time":"0","time_local":"2019-01-22 00:26:14.000","request_type":"GET","request_path":"\/filter\/27|13 ,27| 5 ,p53","request_protocol":"HTTP\/1.1","status":"200","size":"30577","referer":"-","user_agent":"Mozilla\/5.0 (compatible; AhrefsBot\/6.1; +http:\/\/ahrefs.com\/robot\/)"} +Timestamp: 2019-01-22 00:26:14 +ServiceName: +Status: 200 +RequestProtocol: HTTP/1.1 +RunTime: 0 +Size: 30577 +UserAgent: Mozilla/5.0 (compatible; AhrefsBot/6.1; +http://ahrefs.com/robot/) +Referer: - +RemoteUser: - +RequestType: GET +RequestPath: /filter/27|13 ,27| 5 ,p53 +RemoteAddress: 54.36.149.41 +RefererDomain: +RequestPage: /filter/27|13 ,27| 5 ,p53 +SeverityText: INFO +SeverityNumber: 9 + +1 row in set. Elapsed: 0.010 sec. +``` + +JSON関数を使用ã—㦠`Body` カラムã‹ã‚‰ã‚«ãƒ©ãƒ ã‚’抽出ã™ã‚‹åŒç­‰ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを以下ã«ç¤ºã—ã¾ã™ï¼š + +```sql +CREATE MATERIALIZED VIEW otel_logs_mv TO otel_logs_v2 AS +SELECT Body, + Timestamp::DateTime AS Timestamp, + ServiceName, + JSONExtractUInt(Body, 'status') AS Status, + JSONExtractString(Body, 'request_protocol') AS RequestProtocol, + JSONExtractUInt(Body, 'run_time') AS RunTime, + JSONExtractUInt(Body, 'size') AS Size, + JSONExtractString(Body, 'user_agent') AS UserAgent, + JSONExtractString(Body, 'referer') AS Referer, + JSONExtractString(Body, 'remote_user') AS RemoteUser, + JSONExtractString(Body, 'request_type') AS RequestType, + JSONExtractString(Body, 'request_path') AS RequestPath, + JSONExtractString(Body, 'remote_addr') AS remote_addr, + domain(JSONExtractString(Body, 'referer')) AS RefererDomain, + path(JSONExtractString(Body, 'request_path')) AS RequestPage, + multiIf(Status::UInt64 > 500, 'CRITICAL', Status::UInt64 > 400, 'ERROR', Status::UInt64 > 300, 'WARNING', 'INFO') AS SeverityText, + multiIf(Status::UInt64 > 500, 20, Status::UInt64 > 400, 17, Status::UInt64 > 300, 13, 9) AS SeverityNumber +FROM otel_logs +``` + +### åž‹ã«æ³¨æ„ + +上記ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯æš—é»™ã®åž‹å¤‰æ›ã«ä¾å­˜ã—ã¦ã„ã¾ã™â€”特ã«LogAttributesマップã®ä½¿ç”¨ã«ãŠã„ã¦ã€‚ClickHouseã¯ã—ã°ã—ã°ã€æŠ½å‡ºã•ã‚ŒãŸå€¤ã‚’対象テーブルã®åž‹ã«é€æ˜Žã«ã‚­ãƒ£ã‚¹ãƒˆã—ã€å¿…è¦ãªæ§‹æ–‡ã‚’減少ã•ã›ã¾ã™ã€‚ã—ã‹ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€åŒã˜ã‚¹ã‚­ãƒ¼ãƒžã‚’使用ã™ã‚‹ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—㦠`SELECT` ステートメントを使用ã—ã¦ãƒ“ューを常ã«ãƒ†ã‚¹ãƒˆã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€åž‹ãŒæ­£ã—ã処ç†ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã§ãã¾ã™ã€‚特ã«ä»¥ä¸‹ã®ã‚±ãƒ¼ã‚¹ã«ã¯æ³¨æ„ãŒå¿…è¦ã§ã™ï¼š + +- マップ内ã«ã‚­ãƒ¼ãŒå­˜åœ¨ã—ãªã„å ´åˆã€ç©ºã®æ–‡å­—列ãŒè¿”ã•ã‚Œã¾ã™ã€‚数値ã®å ´åˆã€ã“ã‚Œã¯é©åˆ‡ãªå€¤ã«ãƒžãƒƒãƒ”ングã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€[æ¡ä»¶æ–‡](/ja/sql-reference/functions/conditional-functions)(例:`if(LogAttributes['status'] = ", 200, LogAttributes['status'])`)ã¾ãŸã¯[キャスト関数](/ja/sql-reference/functions/type-conversion-functions#touint8163264256ordefault)を使用ã—ã¦ã“ã®ã‚ˆã†ã«é”æˆã§ãã¾ã™ã€‚デフォルト値ãŒè¨±å®¹ã•ã‚Œã‚‹å ´åˆï¼ˆä¾‹ï¼š`toUInt8OrDefault(LogAttributes['status'] )`)。 +- 一部ã®åž‹ã¯å¸¸ã«ã‚­ãƒ£ã‚¹ãƒˆã•ã‚Œãªã„å ´åˆãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€æ•°å€¤ã®æ–‡å­—列表ç¾ã¯ã€åˆ—挙値ã«ã‚­ãƒ£ã‚¹ãƒˆã•ã‚Œã¾ã›ã‚“。 +- JSON抽出関数ã¯ã€å€¤ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€åž‹ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã—ã¾ã™ã€‚ã“れらã®å€¤ãŒæ„味をæŒã¤ã‹ç¢ºèªã—ã¦ãã ã•ã„ï¼ + +> 観測性データ㮠ClickHouse ã«ãŠã„㦠Nullable を使用ã™ã‚‹ã“ã¨ã¯é¿ã‘ã¦ãã ã•ã„。ログやトレースã«ãŠã„ã¦ã€ç©ºã¨ NULL ã®é•ã„を区別ã™ã‚‹å¿…è¦ã¯ã»ã¨ã‚“ã©ã‚ã‚Šã¾ã›ã‚“。ã“ã®æ©Ÿèƒ½ã¯è¿½åŠ ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’ã‚‚ãŸã‚‰ã—ã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã«æ‚ªå½±éŸ¿ã‚’与ãˆã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](/ja/data-modeling/schema-design#optimizing-types)ã‚’å‚ç…§ãã ã•ã„。 + +## 主キー(オーダリングキー)ã®é¸æŠž + +希望ã™ã‚‹ã‚«ãƒ©ãƒ ã‚’抽出ã—ãŸã‚‰ã€ã‚ªãƒ¼ãƒ€ãƒªãƒ³ã‚°/主キーを最é©åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +オーダリングキーをé¸æŠžã™ã‚‹ãŸã‚ã®ã„ãã¤ã‹ã®ç°¡å˜ãªãƒ«ãƒ¼ãƒ«ãŒã‚ã‚Šã¾ã™ã€‚以下ã¯ã€æ™‚ã«ã¯å¯¾ç«‹ã™ã‚‹ã“ã¨ãŒã‚ã‚‹ãŸã‚ã€ã“れらを順番ã«æ¤œè¨Žã—ã¦ãã ã•ã„。ã“ã®ãƒ—ロセスã‹ã‚‰å¤šãã®ã‚­ãƒ¼ã‚’特定ã§ãã€é€šå¸¸4〜5個ã§å分ã§ã™ã€‚ + +1. 一般的ãªãƒ•ã‚£ãƒ«ã‚¿ã‚„アクセスパターンã«é©åˆã™ã‚‹ã‚«ãƒ©ãƒ ã‚’é¸æŠžã—ã¾ã™ã€‚ユーザーãŒé€šå¸¸ã€ç‰¹å®šã®ã‚«ãƒ©ãƒ ï¼ˆä¾‹ï¼šãƒãƒƒãƒ‰å)ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã‚’開始ã™ã‚‹å ´åˆã€ã“ã®ã‚«ãƒ©ãƒ ã¯ `WHERE` å¥ã§é »ç¹ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚ã“れらを他ã®é »ç¹ã«ä½¿ç”¨ã•ã‚Œãªã„カラムよりも優先ã—ã¦ã‚­ãƒ¼ã«å«ã‚ã¾ã™ã€‚ +2. フィルタリング時ã«å…¨ä½“ã®è¡Œæ•°ã®å¤§éƒ¨åˆ†ã‚’除外ã™ã‚‹ã®ã«å½¹ç«‹ã¤ã‚«ãƒ©ãƒ ã‚’優先ã—ã€å¿…è¦ã«å¿œã˜ã¦èª­ã¿å–るデータã®é‡ã‚’減少ã•ã›ã¾ã™ã€‚サービスåやステータスコードã¯ã—ã°ã—ã°è‰¯ã„候補ã§ã™ã€‚後者ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ200ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ã¨ã»ã¨ã‚“ã©ã®è¡Œã«ãƒžãƒƒãƒã™ã‚‹ã®ãŒä¸€èˆ¬çš„ã§ã™ã€‚500エラーã®ã‚ˆã†ã«å°ã•ãªã‚µãƒ–セットã«é–¢é€£ä»˜ã‘られる場åˆã‚’除ãã¾ã™ã€‚ +3. テーブル内ã®ä»–ã®ã‚«ãƒ©ãƒ ã¨é«˜ã„相関ãŒã‚ã‚‹å¯èƒ½æ€§ãŒé«˜ã„カラムを優先ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã“れらã®å€¤ãŒé€£ç¶šã—ã¦ä¿å­˜ã•ã‚Œã€åœ§ç¸®ãŒå‘上ã—ã¾ã™ã€‚ +4. オーダリングキーã®ã‚«ãƒ©ãƒ ã® `GROUP BY` ãŠã‚ˆã³ `ORDER BY` æ“作ã¯ã€ãƒ¡ãƒ¢ãƒªåŠ¹çŽ‡ã‚’å‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +
    + +オーダリングキーã®ä¸€éƒ¨ã®ã‚«ãƒ©ãƒ ã‚’特定ã™ã‚‹ã¨ã€ãれらを特定ã®é †åºã§å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®é †åºã¯ã€ã‚¯ã‚¨ãƒªå†…ã®ã‚»ã‚«ãƒ³ãƒ€ãƒªã‚­ãƒ¼åˆ—ã§ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°åŠ¹çŽ‡ã¨ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã®åœ§ç¸®çŽ‡ã«å¤§ããªå½±éŸ¿ã‚’与ãˆã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚一般的ã«ã€**カーディナリティã®æ˜‡é †ã§ã‚­ãƒ¼ã‚’並ã¹ã‚‹ã“ã¨ãŒæœ€è‰¯ã§ã™**。ãŸã ã—ã€ã‚ªãƒ¼ãƒ€ãƒªãƒ³ã‚°ã‚­ãƒ¼å†…ã§å¾Œã«ç¾ã‚Œã‚‹ã‚«ãƒ©ãƒ ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹éš›ã®åŠ¹çŽ‡ãŒä½Žããªã‚‹ã“ã¨ã«ãƒãƒ©ãƒ³ã‚¹ã‚’å–ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“れらã®å‹•ä½œã‚’ãƒãƒ©ãƒ³ã‚¹ã•ã›ã€ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンを考慮ã—ã¦ãã ã•ã„。最もé‡è¦ãªã®ã¯ã€ã•ã¾ã–ã¾ãªãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã‚’テストã™ã‚‹ã“ã¨ã§ã™ã€‚オーダリングキーやオプティマイズã®æ–¹æ³•ã«ã¤ã„ã¦ç†è§£ã‚’æ·±ã‚ã‚‹ãŸã‚ã«ã¯ã€[ã“ã®è¨˜äº‹](/ja/optimize/sparse-primary-indexes)ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +> ログを整形ã—ãŸå¾Œã«ã€ã‚ªãƒ¼ãƒ€ãƒªãƒ³ã‚°ã‚­ãƒ¼ã‚’決定ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚属性マップ内ã®ã‚­ãƒ¼ã‚„JSON抽出å¼ã‚’オーダリングキーã¨ã—ã¦ä½¿ç”¨ã—ãªã„ã§ãã ã•ã„。オーダリングキーをテーブル内ã®ãƒ«ãƒ¼ãƒˆã‚«ãƒ©ãƒ ã¨ã—ã¦ä¿æŒã—ã¦ãã ã•ã„。 + +## マップã®ä½¿ç”¨ + +以å‰ã®ä¾‹ã§ã¯ã€`Map(String, String)` カラム内ã®å€¤ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ãƒžãƒƒãƒ—構文 `map['key']` を使用ã—ã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¦ã„ã¾ã™ã€‚ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚­ãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ãƒžãƒƒãƒ—記法を使用ã™ã‚‹ã ã‘ã§ãªãã€ClickHouse専用ã®[マップ関数](/ja/sql-reference/functions/tuple-map-functions#mapkeys)ãŒåˆ©ç”¨å¯èƒ½ã§ã€ã“れらã®ã‚«ãƒ©ãƒ ã‚’フィルタリングã¾ãŸã¯é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã§ã¯ã€[`mapKeys` 関数](/ja/sql-reference/functions/tuple-map-functions#mapkeys)を使用ã—ã¦ã€LogAttributesカラム内ã§åˆ©ç”¨å¯èƒ½ãªã™ã¹ã¦ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ã‚­ãƒ¼ã‚’特定ã—ã€ãã®å¾Œã«[groupArrayDistinctArray関数](/ja/sql-reference/aggregate-functions/combinators)(コンビãƒãƒ¼ã‚¿ï¼‰ã‚’続ã‘ã¾ã™ã€‚ + +```sql +SELECT groupArrayDistinctArray(mapKeys(LogAttributes)) +FROM otel_logs +FORMAT Vertical + +è¡Œ 1: +────── +groupArrayDistinctArray(mapKeys(LogAttributes)): ['remote_user','run_time','request_type','log.file.name','referer','request_path','status','user_agent','remote_addr','time_local','size','request_protocol'] + +1 row in set. Elapsed: 1.139 sec. Processed 5.63 million rows, 2.53 GB (4.94 million rows/s., 2.22 GB/s.) +Peak memory usage: 71.90 MiB. +``` + +> マップカラムåã«ãƒ‰ãƒƒãƒˆã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã›ãšã€å°†æ¥çš„ã«ãã®ä½¿ç”¨ã‚’éžæŽ¨å¥¨ã«ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 `_` を使用ã—ã¦ãã ã•ã„。 + +## エイリアスã®ä½¿ç”¨ + +マップ型をクエリã™ã‚‹ã®ã¯ã€é€šå¸¸ã®ã‚«ãƒ©ãƒ ã‚’クエリã™ã‚‹ã‚ˆã‚Šã‚‚é…ããªã‚Šã¾ã™â€”「クエリã®é«˜é€ŸåŒ–ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。ã•ã‚‰ã«ã€æ§‹æ–‡ãŒã‚ˆã‚Šè¤‡é›‘ã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ›¸ãã®ãŒç…©ã‚ã—ããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å¾Œã®å•é¡Œã«å¯¾å‡¦ã™ã‚‹ãŸã‚ã«ã€ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚«ãƒ©ãƒ ã‚’使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +エイリアス(ALIAS)カラムã¯ã€ã‚¯ã‚¨ãƒªæ™‚ã«è¨ˆç®—ã•ã‚Œã€ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã•ã‚Œã¾ã›ã‚“。ã—ãŸãŒã£ã¦ã€ã“ã®åž‹ã®ã‚«ãƒ©ãƒ ã«å€¤ã‚’INSERTã™ã‚‹ã“ã¨ã¯ä¸å¯èƒ½ã§ã™ã€‚エイリアスを使用ã™ã‚‹ã“ã¨ã§ã€ãƒžãƒƒãƒ—キーをå‚ç…§ã—ã€æ§‹æ–‡ã‚’簡素化ã—ã€ãƒžãƒƒãƒ—エントリを通常ã®ã‚«ãƒ©ãƒ ã¨ã—ã¦é€éŽçš„ã«éœ²å‡ºã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚次ã®ä¾‹ã‚’考ãˆã¦ã¿ã¦ãã ã•ã„: + +```sql +CREATE TABLE otel_logs +( + `Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)), + `TraceId` String CODEC(ZSTD(1)), + `SpanId` String CODEC(ZSTD(1)), + `TraceFlags` UInt32 CODEC(ZSTD(1)), + `SeverityText` LowCardinality(String) CODEC(ZSTD(1)), + `SeverityNumber` Int32 CODEC(ZSTD(1)), + `ServiceName` LowCardinality(String) CODEC(ZSTD(1)), + `Body` String CODEC(ZSTD(1)), + `ResourceSchemaUrl` String CODEC(ZSTD(1)), + `ResourceAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `ScopeSchemaUrl` String CODEC(ZSTD(1)), + `ScopeName` String CODEC(ZSTD(1)), + `ScopeVersion` String CODEC(ZSTD(1)), + `ScopeAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `LogAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `RequestPath` String MATERIALIZED path(LogAttributes['request_path']), + `RequestType` LowCardinality(String) MATERIALIZED LogAttributes['request_type'], + `RefererDomain` String MATERIALIZED domain(LogAttributes['referer']), + `RemoteAddr` IPv4 ALIAS LogAttributes['remote_addr'] +) +ENGINE = MergeTree +PARTITION BY toDate(Timestamp) +ORDER BY (ServiceName, Timestamp) +``` + +ã„ãã¤ã‹ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ã‚«ãƒ©ãƒ ã¨ã€`ALIAS`カラムã§ã‚ã‚‹`RemoteAddr`ãŒã‚ã‚Šã€ã“ã‚ŒãŒãƒžãƒƒãƒ—`LogAttributes`ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€`LogAttributes['remote_addr']`ã®å€¤ã‚’ã“ã®ã‚«ãƒ©ãƒ ã‚’通ã˜ã¦ã‚¯ã‚¨ãƒªã§ãã‚‹ãŸã‚ã€ã‚¯ã‚¨ãƒªãŒç°¡ç´ åŒ–ã•ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€æ¬¡ã®ã‚ˆã†ã«ã—ã¾ã™ã€‚ + +```sql +SELECT RemoteAddr +FROM default.otel_logs +LIMIT 5 + +┌─RemoteAddr────┠+│ 54.36.149.41 │ +│ 31.56.96.51 │ +│ 31.56.96.51 │ +│ 40.77.167.129 │ +│ 91.99.72.15 │ +└───────────────┘ + +5 rows in set. Elapsed: 0.011 sec. +``` + +ã•ã‚‰ã«ã€`ALIAS`ã®è¿½åŠ ã¯`ALTER TABLE`コマンドを使用ã—ã¦ç°¡å˜ã«è¡Œãˆã¾ã™ã€‚ã“れらã®ã‚«ãƒ©ãƒ ã¯å³åº§ã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ãŸã¨ãˆã°æ¬¡ã®ã‚ˆã†ã«ã—ã¾ã™ã€‚ + +```sql +ALTER TABLE default.otel_logs + (ADD COLUMN `Size` String ALIAS LogAttributes['size']) + +SELECT Size +FROM default.otel_logs_v3 +LIMIT 5 + +┌─Size──┠+│ 30577 │ +│ 5667 │ +│ 5379 │ +│ 1696 │ +│ 41483 │ +└───────┘ + +5 rows in set. Elapsed: 0.014 sec. +``` + +> デフォルトã§ã¯ã€`SELECT *`ã¯ALIASカラムを除外ã—ã¾ã™ã€‚ã“ã®å‹•ä½œã¯`asterisk_include_alias_columns=1`を設定ã™ã‚‹ã“ã¨ã§ç„¡åŠ¹ã«ã§ãã¾ã™ã€‚ + +## åž‹ã®æœ€é©åŒ– + +åž‹ã®æœ€é©åŒ–ã«é–¢ã™ã‚‹[一般的㪠ClickHouse ã®ãƒ™ã‚¹ãƒˆãƒ—ラクティス](/ja/data-modeling/schema-design#optimizing-types)ã¯ã€ClickHouseã®ä½¿ç”¨ã‚±ãƒ¼ã‚¹ã«ã‚‚é©ç”¨ã•ã‚Œã¾ã™ã€‚ + +## コーデックã®ä½¿ç”¨ + +åž‹ã®æœ€é©åŒ–ã«åŠ ãˆã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ClickHouseã®å¯è¦–性スキーマã®åœ§ç¸®ã‚’最é©åŒ–ã—よã†ã¨ã™ã‚‹éš›ã«ã€[コーデックã«é–¢ã™ã‚‹ä¸€èˆ¬çš„ãªãƒ™ã‚¹ãƒˆãƒ—ラクティス](/ja/data-compression/compression-in-clickhouse#choosing-the-right-column-compression-codec)ã«å¾“ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +一般ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯`ZSTD`コーデックãŒãƒ­ã‚°ã¨ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«éžå¸¸ã«é©ç”¨å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‚’確èªã§ãã¾ã™ã€‚圧縮値をデフォルトã®1ã‹ã‚‰å¢—加ã•ã›ã‚‹ã“ã¨ã§ã€åœ§ç¸®ãŒæ”¹å–„ã•ã‚Œã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ãŸã ã—ã€é«˜ã„値ã¯æŒ¿å…¥æ™‚ã«ã‚ˆã‚Šå¤§ããªCPUオーãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚’発生ã•ã›ã‚‹ãŸã‚ã€ãƒ†ã‚¹ãƒˆã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚通常ã€ã“ã®å€¤ã‚’増加ã•ã›ã¦ã‚‚利益ã¯å°‘ãªã„ã§ã™ã€‚ + +ã•ã‚‰ã«ã€ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã¯åœ§ç¸®ã«é–¢ã—ã¦ãƒ‡ãƒ«ã‚¿ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‹ã‚‰æ©æµã‚’å—ã‘ã¾ã™ãŒã€ã“ã®ã‚«ãƒ©ãƒ ãŒä¸»ã‚­ãƒ¼/é †åºä»˜ã‘キーã§ä½¿ç”¨ã•ã‚Œã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスãŒé…ããªã‚‹ã“ã¨ãŒç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ユーザーã«ã¯ã€ãã‚Œãžã‚Œã®åœ§ç¸®ã¨ã‚¯ã‚¨ãƒªãƒ‘フォーマンスã®ãƒˆãƒ¬ãƒ¼ãƒ‰ã‚ªãƒ•ã‚’評価ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +## Dictionaryã®ä½¿ç”¨ + +[Dictionary](/ja/sql-reference/dictionaries)ã¯ã€ClickHouseã®[é‡è¦ãªæ©Ÿèƒ½](https://clickhouse.com/blog/faster-queries-dictionaries-clickhouse)ã§ã‚ã‚Šã€ã•ã¾ã–ã¾ãªå†…部ãŠã‚ˆã³å¤–部ã®[ソース](/ja/sql-reference/dictionaries#dictionary-sources)ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’ã€ãƒ¡ãƒ¢ãƒªå†…ã§[キー・ãƒãƒªãƒ¥ãƒ¼](https://en.wikipedia.org/wiki/Key%E2%80%93value_database)表ç¾ã¨ã—ã¦æä¾›ã—ã€è¶…低é…延ã®ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—クエリã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚ + +NEEDS ALT + +
    + +ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’集約ã™ã‚‹éš›ã«ã€å–り込んã ãƒ‡ãƒ¼ã‚¿ã‚’ãã®å ´ã§å¼·åŒ–ã—ã€å–ã‚Šè¾¼ã¿ãƒ—ロセスをé…延ã•ã›ãšã€å…¨ä½“çš„ã«ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ãªã©ã€ã•ã¾ã–ã¾ãªã‚·ãƒŠãƒªã‚ªã§ä¾¿åˆ©ã§ã™ã€‚特ã«JOINã«æœ‰ç›Šã§ã™ã€‚å¯è¦–性ã®ä½¿ç”¨ã‚±ãƒ¼ã‚¹ã§ã¯ã‚¸ãƒ§ã‚¤ãƒ³ãŒå¿…è¦ã«ãªã‚‹ã“ã¨ã¯ç¨€ã§ã™ãŒã€Dictionaryã¯æŒ¿å…¥æ™‚ã¨ã‚¯ã‚¨ãƒªæ™‚ã®ä¸¡æ–¹ã§å¼·åŒ–目的ã§å½¹ç«‹ã¤ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚以下ã«ä¸¡æ–¹ã®ä¾‹ã‚’示ã—ã¾ã™ã€‚ + +> Dictionaryを使用ã—ã¦ã‚¸ãƒ§ã‚¤ãƒ³ã‚’加速ã—ãŸã„ユーザーã¯ã€[ã“ã¡ã‚‰](/ja/dictionary)ã§ã•ã‚‰ã«è©³ç´°ã‚’確èªã§ãã¾ã™ã€‚ + +### 挿入時ã¨ã‚¯ã‚¨ãƒªæ™‚ + +Dictionaryã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’クエリ時ã¾ãŸã¯æŒ¿å…¥æ™‚ã«å¼·åŒ–ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ã“れらã®ã‚¢ãƒ—ローãƒã«ã¯ãã‚Œãžã‚Œåˆ©ç‚¹ã¨æ¬ ç‚¹ãŒã‚ã‚Šã¾ã™ã€‚è¦ç´„ã™ã‚‹ã¨ï¼š + +- **挿入時** - ã“ã‚Œã¯é€šå¸¸ã€å¼·åŒ–値ãŒå¤‰æ›´ã•ã‚Œãšã€Dictionaryã«ãƒãƒ”ュレートã§ãる外部ソースã«å­˜åœ¨ã™ã‚‹å ´åˆã«é©åˆ‡ã§ã™ã€‚ã“ã®å ´åˆã€æŒ¿å…¥æ™‚ã«è¡Œã‚’強化ã™ã‚‹ã¨ã€ã‚¯ã‚¨ãƒªæ™‚ã«Dictionaryã®ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå›žé¿ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€æŒ¿å…¥ãƒ‘フォーマンスã®ã‚³ã‚¹ãƒˆã¨ã€å¼·åŒ–ã•ã‚ŒãŸå€¤ãŒã‚«ãƒ©ãƒ ã¨ã—ã¦æ ¼ç´ã•ã‚Œã‚‹ãŸã‚ã€è¿½åŠ ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ãŒç™ºç”Ÿã—ã¾ã™ã€‚ +- **クエリ時** - Dictionary内ã®å€¤ãŒé »ç¹ã«å¤‰æ›´ã•ã‚Œã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªæ™‚ルックアップãŒã‚ˆã‚Šé©ç”¨å¯èƒ½ã§ã™ã€‚値ãŒãƒžãƒƒãƒ”ングã•ã‚Œã¦å¤‰æ›´ã•ã‚ŒãŸå ´åˆã€ã‚«ãƒ©ãƒ ã‚’æ›´æ–°ã™ã‚‹ï¼ˆãƒ‡ãƒ¼ã‚¿ã‚’å†æ›¸ãè¾¼ã¿ã™ã‚‹ï¼‰å¿…è¦ãŒãªããªã‚Šã¾ã™ã€‚ã“ã®æŸ”軟性ã¯ã€ã‚¯ã‚¨ãƒªæ™‚ã®ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—コストを考慮ã«å…¥ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼å¥ã§Dictionaryルックアップを使用ã™ã‚‹å ´åˆã€è¤‡æ•°ã®è¡Œã®ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå¿…è¦ã§ã‚ã‚Œã°ã€ã“ã®ã‚¯ã‚¨ãƒªæ™‚コストã¯é€šå¸¸ã¯é¡•è‘—ã§ã™ã€‚çµæžœã®å¼·åŒ–ã€ã™ãªã‚ã¡`SELECT`内ã§ã¯ã€ã“ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã¯é€šå¸¸é¡•è‘—ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 + +ç§ãŸã¡ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒDictionaryã®åŸºæœ¬ã‚’ç†è§£ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚Dictionaryã¯ã€ç‰¹å®šã®[専門関数](/ja/sql-reference/functions/ext-dict-functions#dictgetall)を使用ã—ã¦å€¤ã‚’å–å¾—ã§ãるメモリ内ã®ãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—テーブルをæä¾›ã—ã¾ã™ã€‚ + +シンプルãªå¼·åŒ–例ã«ã¤ã„ã¦ã¯ã€Dictionaryã«é–¢ã™ã‚‹ã‚¬ã‚¤ãƒ‰[ã“ã¡ã‚‰](/ja/dictionary)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。以下ã§ã¯ã€ä¸€èˆ¬çš„ãªå¯è¦–性強化タスクã«ç„¦ç‚¹ã‚’当ã¦ã¾ã™ã€‚ + +### IP Dictionaryã®ä½¿ç”¨ + +IPアドレスを使用ã—ã¦ãƒ­ã‚°ã‚„トレースã«ç·¯åº¦ã¨çµŒåº¦ã®å€¤ã‚’ジオ強化ã™ã‚‹ã“ã¨ã¯ã€ä¸€èˆ¬çš„ãªå¯è¦–性è¦ä»¶ã§ã™ã€‚`ip_trie` Dictionary構造を使用ã™ã‚‹ã“ã¨ã§å®Ÿç¾ã§ãã¾ã™ã€‚ + +ç§ãŸã¡ã¯ã€[DB-IP.com](https://db-ip.com/)ã«ã‚ˆã£ã¦æä¾›ã•ã‚Œã¦ã„ã‚‹ã€æœˆã”ã¨ã«æ›´æ–°ã•ã‚Œã‚‹[DB-IP市レベルデータセット](https://github.com/sapics/ip-location-db#db-ip-database-update-monthly)を公開ã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã‚’使用ã—ã¾ã™ã€‚ + +[README](https://github.com/sapics/ip-location-db#csv-format)ã‹ã‚‰ã€ãƒ‡ãƒ¼ã‚¿ãŒæ¬¡ã®ã‚ˆã†ã«æ§‹é€ åŒ–ã•ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã§ãã¾ã™ã€‚ + +```csv +| ip_range_start | ip_range_end | country_code | state1 | state2 | city | postcode | latitude | longitude | timezone | +``` + +ã“ã®æ§‹é€ ã‚’考慮ã—ã¦ã€URLテーブル関数を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’確èªã—ã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +SELECT * +FROM url('https://raw.githubusercontent.com/sapics/ip-location-db/master/dbip-city/dbip-city-ipv4.csv.gz', 'CSV', '\n \tip_range_start IPv4, \n \tip_range_end IPv4, \n \tcountry_code Nullable(String), \n \tstate1 Nullable(String), \n \tstate2 Nullable(String), \n \tcity Nullable(String), \n \tpostcode Nullable(String), \n \tlatitude Float64, \n \tlongitude Float64, \n \ttimezone Nullable(String)\n \t') +LIMIT 1 +FORMAT Vertical +Row 1: +────── +ip_range_start: 1.0.0.0 +ip_range_end: 1.0.0.255 +country_code: AU +state1: Queensland +state2: á´ºáµá´¸á´¸ +city: South Brisbane +postcode: á´ºáµá´¸á´¸ +latitude: -27.4767 +longitude: 153.017 +timezone: á´ºáµá´¸á´¸ +``` + +ç§ãŸã¡ã®ç”Ÿæ´»ã‚’ç°¡å˜ã«ã™ã‚‹ãŸã‚ã«ã€[`URL()`](/ja/engines/table-engines/special/url)テーブルエンジンを使用ã—ã¦ã€ClickHouseテーブルオブジェクトを作æˆã—ã€è¡Œæ•°ã‚’確èªã—ã¾ã™ã€‚ + +```sql +CREATE TABLE geoip_url( + ip_range_start IPv4, + ip_range_end IPv4, + country_code Nullable(String), + state1 Nullable(String), + state2 Nullable(String), + city Nullable(String), + postcode Nullable(String), + latitude Float64, + longitude Float64, + timezone Nullable(String) +) ENGINE = URL('https://raw.githubusercontent.com/sapics/ip-location-db/master/dbip-city/dbip-city-ipv4.csv.gz', 'CSV') + +SELECT count() FROM geoip_url; + +┌─count()─┠+│ 3261621 │ -- 3.26百万 +└─────────┘ +``` + +ç§ãŸã¡ã®`ip_trie`Dictionaryã¯ã€IPアドレス範囲をCIDR表記ã§è¡¨ç¾ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€`ip_range_start`ã¨`ip_range_end`を変æ›ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +å„範囲ã«ã¤ã„ã¦ã®CIDRã¯ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã§ç°¡æ½”ã«è¨ˆç®—ã§ãã¾ã™ã€‚ + +```sql +WITH + bitXor(ip_range_start, ip_range_end) AS xor, + if(xor != 0, ceil(log2(xor)), 0) AS unmatched, + 32 - unmatched AS cidr_suffix, + toIPv4(bitAnd(bitNot(pow(2, unmatched) - 1), ip_range_start)::UInt64) AS cidr_address +SELECT + ip_range_start, + ip_range_end, + concat(toString(cidr_address),'/',toString(cidr_suffix)) AS cidr +FROM + geoip_url +LIMIT 4; + +┌─ip_range_start─┬─ip_range_end─┬─cidr───────┠+│ 1.0.0.0 │ 1.0.0.255 │ 1.0.0.0/24 │ +│ 1.0.1.0 │ 1.0.3.255 │ 1.0.0.0/22 │ +│ 1.0.4.0 │ 1.0.7.255 │ 1.0.4.0/22 │ +│ 1.0.8.0 │ 1.0.15.255 │ 1.0.8.0/21 │ +└────────────────┴──────────────┴────────────┘ + +4 rows in set. Elapsed: 0.259 sec. +``` + +> 上記ã®ã‚¯ã‚¨ãƒªã§ã¯å¤šãã®ã“ã¨ãŒè¡Œã‚ã‚Œã¦ã„ã¾ã™ã€‚興味ã®ã‚ã‚‹æ–¹ã¯ã€ã“ã¡ã‚‰ã®[優れãŸèª¬æ˜Ž](https://clickhouse.com/blog/geolocating-ips-in-clickhouse-and-grafana#using-bit-functions-to-convert-ip-ranges-to-cidr-notation)を読んã§ãã ã•ã„。ãれ以外ã¯ã€ä¸Šè¨˜ã®è¨ˆç®—ãŒIP範囲ã®CIDRを計算ã™ã‚‹ã“ã¨ã‚’å—ã‘入れã¦ãã ã•ã„。 + +ç§ãŸã¡ã®ç›®çš„ã®ãŸã‚ã«ã¯ã€IP範囲ã€å›½ã‚³ãƒ¼ãƒ‰ã€ãŠã‚ˆã³åº§æ¨™ã ã‘ãŒå¿…è¦ã§ã™ã®ã§ã€æ–°ã—ã„テーブルを作æˆã—ã€GeoIPデータを挿入ã—ã¾ã™ã€‚ + +```sql +CREATE TABLE geoip +( + `cidr` String, + `latitude` Float64, + `longitude` Float64, + `country_code` String +) +ENGINE = MergeTree +ORDER BY cidr + +INSERT INTO geoip +WITH + bitXor(ip_range_start, ip_range_end) AS xor, + if(xor != 0, ceil(log2(xor)), 0) AS unmatched, + 32 - unmatched AS cidr_suffix, + toIPv4(bitAnd(bitNot(pow(2, unmatched) - 1), ip_range_start)::UInt64) AS cidr_address +SELECT + concat(toString(cidr_address),'/',toString(cidr_suffix)) AS cidr, + latitude, + longitude, + country_code +FROM geoip_url +``` + +低é…延ã®IPルックアップをClickHouseã§å®Ÿè¡Œã§ãるよã†ã«ã€Dictionaryを活用ã—ã¦ã€GeoIPデータã®ã‚­ãƒ¼â†’属性マッピングをメモリ内ã«ä¿å­˜ã—ã¾ã™ã€‚ClickHouseã¯ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ—レフィックス(CIDRブロック)を座標ãŠã‚ˆã³å›½ã‚³ãƒ¼ãƒ‰ã«ãƒžãƒƒãƒ”ングã™ã‚‹ãŸã‚ã®`ip_trie` [Dictionary構造](/ja/sql-reference/dictionaries#ip_trie)ã‚’æä¾›ã—ã¾ã™ã€‚次ã¯ã€ã“ã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’使用ã—ã€ä¸Šè¿°ã®ãƒ†ãƒ¼ãƒ–ルをソースã¨ã—ã¦æŒ‡å®šã™ã‚‹Dictionaryを作æˆã—ã¾ã™ã€‚ + +```sql +CREATE DICTIONARY ip_trie ( + cidr String, + latitude Float64, + longitude Float64, + country_code String +) +PRIMARY KEY cidr +SOURCE(CLICKHOUSE(TABLE 'geoip')) +LAYOUT(ip_trie) +LIFETIME(3600); +``` + +Dictionaryã‹ã‚‰è¡Œã‚’é¸æŠžã—ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆãŒãƒ«ãƒƒã‚¯ã‚¢ãƒƒãƒ—用ã«åˆ©ç”¨å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‚’確èªã§ãã¾ã™ã€‚ + +```sql +SELECT * FROM ip_trie LIMIT 3 + +┌─cidr───────┬─latitude─┬─longitude─┬─country_code─┠+│ 1.0.0.0/22 │ 26.0998 │ 119.297 │ CN │ +│ 1.0.0.0/24 │ -27.4767 │ 153.017 │ AU │ +│ 1.0.4.0/22 │ -38.0267 │ 145.301 │ AU │ +└────────────┴──────────┴───────────┴──────────────┘ + +3 rows in set. Elapsed: 4.662 sec. +``` + +> ClickHouseã®Dictionaryã¯ã€åŸºã«ãªã‚‹ãƒ†ãƒ¼ãƒ–ルデータã¨ä½¿ç”¨ã—ãŸãƒ©ã‚¤ãƒ•ã‚¿ã‚¤ãƒ æ¡ä»¶ã«åŸºã¥ã„ã¦ã€å®šæœŸçš„ã«æ›´æ–°ã•ã‚Œã¾ã™ã€‚DB-IPデータセットã®æœ€æ–°ã®å¤‰æ›´ã‚’å映ã™ã‚‹ãŸã‚ã«ã€`geoip`テーブルã«å¯¾ã—ã¦ã€geoip_urlリモートテーブルã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å†æŒ¿å…¥ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +GeoIPデータãŒip_trie Dictionary(便利ã«ã‚‚ip_trieã¨ã„ã†åå‰ï¼‰ã«ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸã®ã§ã€ã“れを使用ã—ã¦IPã®ã‚¸ã‚ªãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚’実行ã§ãã¾ã™ã€‚ã“ã‚Œã¯ã€æ¬¡ã®ã‚ˆã†ã«[`dictGet()`関数](/ja/sql-reference/functions/ext-dict-functions)を使用ã™ã‚‹ã“ã¨ã§å®Ÿç¾ã§ãã¾ã™ã€‚ + +```sql +SELECT dictGet('ip_trie', ('country_code', 'latitude', 'longitude'), CAST('85.242.48.167', 'IPv4')) AS ip_details + +┌─ip_details──────────────┠+│ ('PT',38.7944,-9.34284) │ +└─────────────────────────┘ + +1 row in set. Elapsed: 0.003 sec. +``` + +ã“ã“ã§ã®å–得速度ã«æ³¨ç›®ã—ã¦ãã ã•ã„。ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ­ã‚°ã‚’強化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€**クエリ時ã®å¼·åŒ–を実行ã™ã‚‹**ã“ã¨ã«ã—ã¾ã™ã€‚ + +å…ƒã®ãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«æˆ»ã‚‹ã¨ã€å›½åˆ¥ã«ãƒ­ã‚°ã‚’集約ã™ã‚‹ãŸã‚ã«ä¸Šè¨˜ã‚’使用ã§ãã¾ã™ã€‚以下ã¯ã€`RemoteAddress`カラムを抽出ã—ãŸãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã‹ã‚‰å¾—られるスキーマを使用ã™ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ + +```sql +SELECT dictGet('ip_trie', 'country_code', tuple(RemoteAddress)) AS country, + formatReadableQuantity(count()) AS num_requests +FROM default.otel_logs_v2 +WHERE country != '' +GROUP BY country +ORDER BY count() DESC +LIMIT 5 + +┌─country─┬─num_requests────┠+│ IR │ 736万 │ +│ US │ 167万 │ +│ AE │ 52.674万 │ +│ DE │ 15.935万 │ +│ FR │ 10.982万 │ +└─────────┴─────────────────┘ + +5 rows in set. Elapsed: 0.140 sec. Processed 20.73 million rows, 82.92 MB (147.79 million rows/s., 591.16 MB/s.) +Peak memory usage: 1.16 MiB. +``` + +IPã‹ã‚‰åœ°ç†çš„ãªä½ç½®ã¸ã®ãƒžãƒƒãƒ”ングã¯å¤‰ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ãŸã‚ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒè¡Œã‚ã‚ŒãŸæ™‚点ã§ã®å…ƒã®ä½ç½®ã‚’知りãŸã„å¯èƒ½æ€§ãŒé«˜ããªã‚Šã¾ã™ã€‚ã“ã®ç†ç”±ã‹ã‚‰ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹æ™‚ã®å¼·åŒ–ã¯ã“ã“ã§æœ›ã¾ã—ã„ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ã“ã‚Œã¯ã€æ¬¡ã®ã‚ˆã†ã«ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ã‚«ãƒ©ãƒ ã‚’使用ã™ã‚‹ã“ã¨ã§è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +CREATE TABLE otel_logs_v2 +( + `Body` String, + `Timestamp` DateTime, + `ServiceName` LowCardinality(String), + `Status` UInt16, + `RequestProtocol` LowCardinality(String), + `RunTime` UInt32, + `Size` UInt32, + `UserAgent` String, + `Referer` String, + `RemoteUser` String, + `RequestType` LowCardinality(String), + `RequestPath` String, + `RemoteAddress` IPv4, + `RefererDomain` String, + `RequestPage` String, + `SeverityText` LowCardinality(String), + `SeverityNumber` UInt8, + `Country` String MATERIALIZED dictGet('ip_trie', 'country_code', tuple(RemoteAddress)), + `Latitude` Float32 MATERIALIZED dictGet('ip_trie', 'latitude', tuple(RemoteAddress)), + `Longitude` Float32 MATERIALIZED dictGet('ip_trie', 'longitude', tuple(RemoteAddress)) +) +ENGINE = MergeTree +ORDER BY (ServiceName, Timestamp) +``` + +> ユーザーã¯ã€æ–°ã—ã„データã«åŸºã¥ã„ã¦IP Dictionaryã®å¼·åŒ–ãŒå®šæœŸçš„ã«æ›´æ–°ã•ã‚Œã‚‹ã“ã¨ã‚’望むå¯èƒ½æ€§ãŒé«˜ã„ã§ã™ã€‚ã“ã‚Œã¯Dictionaryã®LIFETIMEå¥ã‚’使用ã—ã¦é”æˆã§ãã€ã“ã‚Œã«ã‚ˆã‚ŠDictionaryãŒåŸºã«ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰å®šæœŸçš„ã«å†ãƒ­ãƒ¼ãƒ‰ã•ã‚Œã¾ã™ã€‚基ã«ãªã‚‹ãƒ†ãƒ¼ãƒ–ルを更新ã™ã‚‹æ–¹æ³•ã¯ã€ã€Œãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥å¯èƒ½ãªãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã®ä½¿ç”¨ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +上記ã®å›½ã¨åº§æ¨™ã¯ã€å›½åˆ¥ã«ã‚°ãƒ«ãƒ¼ãƒ—化ãŠã‚ˆã³ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã™ã‚‹ä»¥ä¸Šã®å¯è¦–化能力をæä¾›ã—ã¾ã™ã€‚インスピレーションã«ã¤ã„ã¦ã¯ã€ã€Œåœ°ç†ãƒ‡ãƒ¼ã‚¿ã®å¯è¦–化ã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### æ­£è¦è¡¨ç¾Dictionaryã®ä½¿ç”¨ï¼ˆãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆè§£æžï¼‰ + +ユーザーエージェント文字列ã®è§£æžã¯ã€å¤å…¸çš„ãªæ­£è¦è¡¨ç¾ã®å•é¡Œã§ã‚ã‚Šã€ãƒ­ã‚°ã‚„トレースベースã®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã®ä¸€èˆ¬çš„ãªè¦ä»¶ã§ã™ã€‚ClickHouseã¯ã€æ­£è¦è¡¨ç¾ãƒ„リーディクショナリを使用ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã®åŠ¹çŽ‡çš„ãªè§£æžã‚’æä¾›ã—ã¾ã™ã€‚ + +æ­£è¦è¡¨ç¾ãƒ„リーディクショナリã¯ã€ClickHouseオープンソースã§YAMLRegExpTree Dictionaryソースタイプを使用ã—ã¦å®šç¾©ã•ã‚Œã¦ãŠã‚Šã€æ­£è¦è¡¨ç¾ãƒ„リーをå«ã‚€YAMLファイルã¸ã®ãƒ‘スをæä¾›ã—ã¾ã™ã€‚独自ã®æ­£è¦è¡¨ç¾Dictionaryã‚’æä¾›ã™ã‚‹å ´åˆã«å¿…è¦ãªæ§‹é€ ã®è©³ç´°ã¯[ã“ã¡ã‚‰](/ja/sql-reference/dictionaries#use-regular-expression-tree-dictionary-in-clickhouse-open-source)ã«ã‚ã‚Šã¾ã™ã€‚以下ã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆè§£æžã«[ua-parser](https://github.com/ua-parser/uap-core)を使用ã—ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹CSVフォーマット用ã®Dictionaryをロードã—ã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ローãƒã¯OSSã¨ClickHouse Cloudã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ + +> 以下ã®ä¾‹ã§ã¯ã€2024å¹´6月ã®æœ€æ–°ã®uap-coreユーザーエージェント解æžç”¨ã®æ­£è¦è¡¨ç¾ã®ã‚¹ãƒŠãƒƒãƒ—ショットを使用ã—ã¾ã™ã€‚最新ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ™‚々更新ã•ã‚Œã€[ã“ã¡ã‚‰](https://raw.githubusercontent.com/ua-parser/uap-core/master/regexes.yaml)ã§ç¢ºèªã§ãã¾ã™ã€‚ユーザーã¯ã€ä»¥ä¸‹ã«ä½¿ç”¨ã•ã‚Œã‚‹CSVファイルをロードã™ã‚‹æ‰‹é †ã‚’[ã“ã¡ã‚‰](/ja/sql-reference/dictionaries#collecting-attribute-values)ã§ç¢ºèªã§ãã¾ã™ã€‚ + +次ã®ã‚ˆã†ã«ã€ãƒ¡ãƒ¢ãƒªãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‡ãƒã‚¤ã‚¹ã€ãƒ–ラウザã€ãŠã‚ˆã³ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã®è§£æžç”¨ã®æ­£è¦è¡¨ç¾ãŒä¿æŒã•ã‚Œã¾ã™ã€‚ + +```sql +CREATE TABLE regexp_os +( + id UInt64, + parent_id UInt64, + regexp String, + keys Array(String), + values Array(String) +) ENGINE=Memory; + +CREATE TABLE regexp_browser +( + id UInt64, + parent_id UInt64, + regexp String, + keys Array(String), + values Array(String) +) ENGINE=Memory; + +CREATE TABLE regexp_device +( + id UInt64, + parent_id UInt64, + regexp String, + keys Array(String), + values Array(String) +) ENGINE=Memory; +``` + +ã“れらã®ãƒ†ãƒ¼ãƒ–ルã¯ã€URLテーブル関数を使用ã—ã¦ã€ä»¥ä¸‹ã®å…¬é–‹ãƒ›ã‚¹ãƒˆCSVファイルã‹ã‚‰ãƒãƒ”ュレートã§ãã¾ã™ã€‚ + +```sql +INSERT INTO regexp_os SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/user_agent_regex/regexp_os.csv', 'CSV', 'id UInt64, parent_id UInt64, regexp String, keys Array(String), values Array(String)') + +INSERT INTO regexp_device SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/user_agent_regex/regexp_device.csv', 'CSV', 'id UInt64, parent_id UInt64, regexp String, keys Array(String), values Array(String)') + +INSERT INTO regexp_browser SELECT * FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/user_agent_regex/regexp_browser.csv', 'CSV', 'id UInt64, parent_id UInt64, regexp String, keys Array(String), values Array(String)') +``` + +メモリテーブルãŒãƒãƒ”ュレートã•ã‚ŒãŸã®ã§ã€æ­£è¦è¡¨ç¾ Dictionaryをロードã§ãã¾ã™ã€‚ã“ã“ã§æ³¨æ„ã™ã¹ãã¯ã€ã‚­ãƒ¼å€¤ã‚’カラムã¨ã—ã¦æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã§ã™ã€‚ã“ã‚ŒãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‹ã‚‰æŠ½å‡ºã§ãる属性ã«ãªã‚Šã¾ã™ã€‚ + +```sql +CREATE DICTIONARY regexp_os_dict +( + regexp String, + os_replacement String default 'Other', + os_v1_replacement String default '0', + os_v2_replacement String default '0', + os_v3_replacement String default '0', + os_v4_replacement String default '0' +) +PRIMARY KEY regexp +SOURCE(CLICKHOUSE(TABLE 'regexp_os')) +LIFETIME(MIN 0 MAX 0) +LAYOUT(REGEXP_TREE); + +CREATE DICTIONARY regexp_device_dict +( + regexp String, + device_replacement String default 'Other', + brand_replacement String, + model_replacement String +) +PRIMARY KEY(regexp) +SOURCE(CLICKHOUSE(TABLE 'regexp_device')) +LIFETIME(0) +LAYOUT(REGEXP_TREE); + +CREATE DICTIONARY regexp_browser_dict +( + regexp String, + family_replacement String default 'Other', + v1_replacement String default '0', + v2_replacement String default '0' +) +PRIMARY KEY(regexp) +SOURCE(CLICKHOUSE(TABLE 'regexp_browser')) +LIFETIME(0) +LAYOUT(REGEXP_TREE); +``` + +ã“れらã®Dictionaryをロードã—ãŸå¾Œã€ã‚µãƒ³ãƒ—ルã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‚’æä¾›ã—ã€æ–°ã—ã„Dictionaryã®æŠ½å‡ºæ©Ÿèƒ½ã‚’テストã§ãã¾ã™ã€‚ + +```sql +WITH 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko/20100101 Firefox/127.0' AS user_agent +SELECT + dictGet('regexp_device_dict', ('device_replacement', 'brand_replacement', 'model_replacement'), user_agent) AS device, + dictGet('regexp_browser_dict', ('family_replacement', 'v1_replacement', 'v2_replacement'), user_agent) AS browser, + dictGet('regexp_os_dict', ('os_replacement', 'os_v1_replacement', 'os_v2_replacement', 'os_v3_replacement'), user_agent) AS os + +┌─device────────────────┬─browser───────────────┬─os─────────────────────────┠+│ ('Mac','Apple','Mac') │ ('Firefox','127','0') │ ('Mac OS X','10','15','0') │ +└───────────────────────┴───────────────────────┴────────────────────────────┘ + +1 row in set. Elapsed: 0.003 sec. +``` + +ユーザーエージェントã«é–¢ã™ã‚‹ãƒ«ãƒ¼ãƒ«ã¯ã»ã¨ã‚“ã©å¤‰ã‚らãªã„ãŸã‚ã€æ–°ã—ã„ブラウザã€ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã€ãŠã‚ˆã³ãƒ‡ãƒã‚¤ã‚¹ã«å¿œã˜ã¦Dictionaryã‚’æ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãŸã‚ã€æŒ¿å…¥æ™‚ã«ã“ã®æŠ½å‡ºã‚’実行ã™ã‚‹ã®ãŒç†ã«ã‹ãªã£ã¦ã„ã¾ã™ã€‚ + +ã“ã®ä½œæ¥­ã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ã‚«ãƒ©ãƒ ã‚’使用ã™ã‚‹ã‹ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを使用ã—ã¦è¡Œã†ã“ã¨ãŒã§ãã¾ã™ã€‚以å‰ã«ä½¿ç”¨ã—ãŸãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを修正ã—ã¾ã™ã€‚ + +```sql +CREATE MATERIALIZED VIEW otel_logs_mv TO otel_logs_v2 +AS SELECT + Body, + CAST(Timestamp, 'DateTime') AS Timestamp, + ServiceName, + LogAttributes['status'] AS Status, + LogAttributes['request_protocol'] AS RequestProtocol, + LogAttributes['run_time'] AS RunTime, + LogAttributes['size'] AS Size, + LogAttributes['user_agent'] AS UserAgent, + LogAttributes['referer'] AS Referer, + LogAttributes['remote_user'] AS RemoteUser, + LogAttributes['request_type'] AS RequestType, + LogAttributes['request_path'] AS RequestPath, + LogAttributes['remote_addr'] AS RemoteAddress, + domain(LogAttributes['referer']) AS RefererDomain, + path(LogAttributes['request_path']) AS RequestPage, + multiIf(CAST(Status, 'UInt64') > 500, 'CRITICAL', CAST(Status, 'UInt64') > 400, 'ERROR', CAST(Status, 'UInt64') > 300, 'WARNING', 'INFO') AS SeverityText, + multiIf(CAST(Status, 'UInt64') > 500, 20, CAST(Status, 'UInt64') > 400, 17, CAST(Status, 'UInt64') > 300, 13, 9) AS SeverityNumber, + dictGet('regexp_device_dict', ('device_replacement', 'brand_replacement', 'model_replacement'), UserAgent) AS Device, + dictGet('regexp_browser_dict', ('family_replacement', 'v1_replacement', 'v2_replacement'), UserAgent) AS Browser, + dictGet('regexp_os_dict', ('os_replacement', 'os_v1_replacement', 'os_v2_replacement', 'os_v3_replacement'), UserAgent) AS Os +FROM otel_logs +``` + +ã“ã‚Œã«ã‚ˆã‚Šã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ル`otel_logs_v2`ã®ã‚¹ã‚­ãƒ¼ãƒžã‚’修正ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +```sql +CREATE TABLE default.otel_logs_v2 +( + `Body` String, + `Timestamp` DateTime, + `ServiceName` LowCardinality(String), + `Status` UInt8, + `RequestProtocol` LowCardinality(String), + `RunTime` UInt32, + `Size` UInt32, + `UserAgent` String, + `Referer` String, + `RemoteUser` String, + `RequestType` LowCardinality(String), + `RequestPath` String, + `remote_addr` IPv4, + `RefererDomain` String, + `RequestPage` String, + `SeverityText` LowCardinality(String), + `SeverityNumber` UInt8, + `Device` Tuple(device_replacement LowCardinality(String), brand_replacement LowCardinality(String), model_replacement LowCardinality(String)), + `Browser` Tuple(family_replacement LowCardinality(String), v1_replacement LowCardinality(String), v2_replacement LowCardinality(String)), + `Os` Tuple(os_replacement LowCardinality(String), os_v1_replacement LowCardinality(String), os_v2_replacement LowCardinality(String), os_v3_replacement LowCardinality(String)) +) +ENGINE = MergeTree +ORDER BY (ServiceName, Timestamp, Status) +``` + +コレクタをå†èµ·å‹•ã—ã€æ§‹é€ åŒ–ã•ã‚ŒãŸãƒ­ã‚°ã‚’å–り込んã å¾Œã€æ¬¡ã®ã‚ˆã†ã«æ–°ã—ã抽出ã•ã‚ŒãŸDeviceã€Browserã€ãŠã‚ˆã³Osカラムをクエリã§ãã¾ã™ã€‚ + +```sql +SELECT Device, Browser, Os +FROM otel_logs_v2 +LIMIT 1 +FORMAT Vertical + +Row 1: +────── +Device: ('Spider','Spider','Desktop') +Browser: ('AhrefsBot','6','1') +Os: ('Other','0','0','0') +``` + +> ユーザーエージェントカラムã«å¯¾ã—ã¦ã‚¿ãƒ—ルを使用ã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。タプルã¯ã€éšŽå±¤ãŒäº‹å‰ã«çŸ¥ã‚‰ã‚Œã¦ã„る複雑ãªæ§‹é€ ã«æŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚サブカラムã¯ã€ãƒžãƒƒãƒ—キーã¨ç•°ãªã‚Šã€é€šå¸¸ã®ã‚«ãƒ©ãƒ ã¨åŒã˜ãƒ‘フォーマンスをæä¾›ã—ã¾ã™ãŒã€ç•°ç¨®åž‹ãŒå¯èƒ½ã§ã™ã€‚ + +### ã•ã‚‰ãªã‚‹èª­ã¿ç‰© + +Dictionaryã«é–¢ã™ã‚‹ã‚ˆã‚Šå¤šãã®ä¾‹ã‚„詳細ã«ã¤ã„ã¦ã¯ã€æ¬¡ã®ã‚ˆã†ãªè¨˜äº‹ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +- [Dictionaryã®é«˜åº¦ãªãƒˆãƒ”ック](/ja/dictionary#advanced-dictionary-topics) +- [「Dictionaryを使用ã—ã¦ã‚¯ã‚¨ãƒªã‚’加速ã™ã‚‹ã€](https://clickhouse.com/blog/faster-queries-dictionaries-clickhouse) +- [Dictionary](/ja/sql-reference/dictionaries) + +## クエリã®åŠ é€Ÿ + +ClickHouseã¯ã€ã‚¯ã‚¨ãƒªãƒ‘フォーマンスを加速ã™ã‚‹ãŸã‚ã®ã„ãã¤ã‹ã®ãƒ†ã‚¯ãƒ‹ãƒƒã‚¯ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚以下ã¯ã€é©åˆ‡ãªä¸»ã‚­ãƒ¼/é †åºä»˜ã‘キーをé¸æŠžã—ã¦æœ€ã‚‚人気ã®ã‚るアクセスパターンを最é©åŒ–ã—ã€åœ§ç¸®ã‚’最大化ã™ã‚‹éŽç¨‹ã§æ¤œè¨Žã™ã¹ãã“ã¨ã§ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã€æœ€å°é™ã®åŠ´åŠ›ã§ãƒ‘フォーマンスã«æœ€ã‚‚大ããªå½±éŸ¿ã‚’与ãˆã¾ã™ã€‚ + +## 集約ã®ãŸã‚ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ュー(増分)使用 + +以å‰ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿å¤‰æ›ã¨ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã®ãŸã‚ã«ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを使用ã™ã‚‹ã“ã¨ã‚’探りã¾ã—ãŸã€‚ã—ã‹ã—ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯ã€æŒ¿å…¥æ™‚ã«é›†ç´„を事å‰è¨ˆç®—ã—ã€ãã®çµæžœã‚’ストアã™ã‚‹ãŸã‚ã«ã‚‚使用ã§ãã¾ã™ã€‚ã“ã®çµæžœã¯ã€å¾Œç¶šã®æŒ¿å…¥ã‹ã‚‰ã®çµæžœã§æ›´æ–°ã§ãã‚‹ãŸã‚ã€å®Ÿéš›ã«æŒ¿å…¥æ™‚ã«é›†ç´„を計算ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã“ã§ã®ä¸»ãªã‚¢ã‚¤ãƒ‡ã‚¢ã¯ã€çµæžœãŒå…ƒã®ãƒ‡ãƒ¼ã‚¿ã®å°ã•ã„表ç¾ï¼ˆé›†ç´„ã®å ´åˆã®ä¸€éƒ¨ã®ã‚¹ã‚±ãƒƒãƒï¼‰ã§ã‚ã‚‹ã“ã¨ãŒå¤šã„ã¨ã„ã†ã“ã¨ã§ã™ã€‚çµæžœã‚’ターゲットテーブルã‹ã‚‰èª­ã¿å–ã‚‹ãŸã‚ã®ã‚·ãƒ³ãƒ—ルãªã‚¯ã‚¨ãƒªã¨çµ„ã¿åˆã‚ã›ã‚‹ã¨ã€å…ƒã®ãƒ‡ãƒ¼ã‚¿ã§åŒã˜è¨ˆç®—ã‚’è¡Œã†ã‚ˆã‚Šã‚‚クエリ時間ãŒæ—©ããªã‚Šã¾ã™ã€‚ + +構造化ログを使用ã—ã¦ã€æ™‚é–“ã”ã¨ã®ãƒˆãƒ©ãƒ•ã‚£ãƒƒã‚¯åˆè¨ˆã‚’計算ã™ã‚‹æ¬¡ã®ã‚¯ã‚¨ãƒªã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚ + +```sql +SELECT toStartOfHour(Timestamp) AS Hour, + sum(toUInt64OrDefault(LogAttributes['size'])) AS TotalBytes +FROM otel_logs +GROUP BY Hour +ORDER BY Hour DESC +LIMIT 5 + +┌────────────────Hour─┬─TotalBytes─┠+│ 2019-01-26 16:00:00 │ 1661716343 │ +│ 2019-01-26 15:00:00 │ 1824015281 │ +│ 2019-01-26 14:00:00 │ 1506284139 │ +│ 2019-01-26 13:00:00 │ 1580955392 │ +│ 2019-01-26 12:00:00 │ 1736840933 │ +└─────────────────────┴────────────┘ + +5 rows in set. Elapsed: 0.666 sec. Processed 10.37 million rows, 4.73 GB (15.56 million rows/s., 7.10 GB/s.) +Peak memory usage: 1.40 MiB. +``` + +ã“ã‚Œã¯Grafanaã§ã®ä¸€èˆ¬çš„ãªãƒ©ã‚¤ãƒ³ãƒãƒ£ãƒ¼ãƒˆã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯æ˜Žã‚‰ã‹ã«éžå¸¸ã«é€Ÿã„ã§ã™ - データセットã¯ã‚ãšã‹10百万行ã§ã‚ã‚Šã€ClickHouseã¯é€Ÿã„ã§ã™ï¼ã—ã‹ã—ã€ã“れをビリオンやトリリオン行ã«ã‚¹ã‚±ãƒ¼ãƒ«ã•ã›ã‚‹ã¨ã€ç§ãŸã¡ã¯ã“ã®ã‚¯ã‚¨ãƒªãƒ‘フォーマンスを維æŒã™ã‚‹ã“ã¨ã‚’望むã§ã—ょã†ã€‚ + +> ã“ã®ã‚¯ã‚¨ãƒªã¯ã€LogAttributesã‹ã‚‰ã‚µã‚¤ã‚ºã‚­ãƒ¼ã‚’抽出ã™ã‚‹ä»¥å‰ã®ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã§ã‚ã‚‹otel_logs_v2を使用ã™ã‚‹ã¨ã€10å€é€Ÿããªã‚Šã¾ã™ã€‚ã“ã®ä¾‹ã§ã¯ç”Ÿãƒ‡ãƒ¼ã‚¿ã‚’使用ã—ã¦ã„ã¾ã™ãŒã€ã“ã‚Œã¯ã“ã®ã‚¯ã‚¨ãƒªãŒä¸€èˆ¬çš„ãªå ´åˆã¯ä»¥å‰ã®ãƒ“ューを使用ã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ + +マテリアライズドビューを使用ã—ã¦æŒ¿å…¥æ™‚ã«è¨ˆç®—ã‚’è¡Œã†çµæžœã‚’å—ã‘å–るテーブルãŒå¿…è¦ã§ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€å„時間ã”ã¨ã«1è¡Œã®ã¿ã‚’ä¿æŒã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚既存ã®æ™‚é–“ã«å¯¾ã—ã¦æ›´æ–°ãŒå—ä¿¡ã•ã‚ŒãŸå ´åˆã€ä»–ã®ã‚«ãƒ©ãƒ ã¯æ—¢å­˜ã®æ™‚é–“ã®è¡Œã«ãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚部分的ãªçŠ¶æ…‹ã‚’ä»–ã®ã‚«ãƒ©ãƒ ã®ãŸã‚ã«ä¿å­˜ã™ã‚‹ã“ã¨ã§ã€ã“ã®å¢—分状態ã®ãƒžãƒ¼ã‚¸ã‚’実ç¾ã§ãã¾ã™ã€‚ + +ã“ã‚Œã¯ClickHouseã®ç‰¹åˆ¥ãªã‚¨ãƒ³ã‚¸ãƒ³ã‚¿ã‚¤ãƒ—ã€ã™ãªã‚ã¡SummingMergeTreeã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€åŒã˜é †åºã‚­ãƒ¼ã‚’æŒã¤ã™ã¹ã¦ã®è¡ŒãŒ1ã¤ã®è¡Œã«ç½®ãæ›ãˆã‚‰ã‚Œã€æ•°å€¤ã‚«ãƒ©ãƒ ã®å€¤ãŒåˆè¨ˆã•ã‚ŒãŸè¡ŒãŒå«ã¾ã‚Œã¾ã™ã€‚次ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€åŒã˜æ—¥ä»˜ã®è¡Œã‚’マージã—ã€æ•°å€¤ã‚«ãƒ©ãƒ ã‚’åˆè¨ˆã—ã¾ã™ã€‚ + +```sql +CREATE TABLE bytes_per_hour +( + `Hour` DateTime, + `TotalBytes` UInt64 +) +ENGINE = SummingMergeTree +ORDER BY Hour +``` + +挿入時ã«ä¸Šè¨˜ã®SELECTを実行ã—ã¦ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを示ã™ã¨ä»®å®šã—ã¾ã™ã€‚bytes_per_hourテーブルã¯ç©ºã§ã€ãƒ‡ãƒ¼ã‚¿ã®å—ä¿¡ãŒã¾ã è¡Œã‚ã‚Œã¦ã„ãªã„ã¨ã—ã¾ã™ã€‚マテリアライズドビューã¯ã€otel_logsã«æŒ¿å…¥ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ä¸Šè¨˜ã®SELECTを実行ã—ã€ãã®çµæžœã‚’bytes_per_hourã«é€ä¿¡ã—ã¾ã™ã€‚構文ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ã€‚ + +```sql +CREATE MATERIALIZED VIEW bytes_per_hour_mv TO bytes_per_hour AS +SELECT toStartOfHour(Timestamp) AS Hour, + sum(toUInt64OrDefault(LogAttributes['size'])) AS TotalBytes +FROM otel_logs +GROUP BY Hour +``` + +ã“ã“ã§ã®`TO`å¥ã¯é‡è¦ã§ã‚ã‚Šã€çµæžœãŒé€ä¿¡ã•ã‚Œã‚‹å ´æ‰€ã€ã™ãªã‚ã¡`bytes_per_hour`を示ã—ã¦ã„ã¾ã™ã€‚ + +Otel Collectorã‚’å†èµ·å‹•ã—ã€ãƒ­ã‚°ã‚’å†é€ä¿¡ã™ã‚‹ã¨ã€`bytes_per_hour`テーブルã¯ä¸Šè¨˜ã®ã‚¯ã‚¨ãƒªçµæžœã§å¢—分的ã«ãƒãƒ”ュレートã•ã‚Œã¾ã™ã€‚完了後ã€`bytes_per_hour`ã®ã‚µã‚¤ã‚ºã‚’確èªã™ã‚‹ã¨ã€æ™‚é–“ã”ã¨ã«1è¡Œã®ã¯ãšã§ã™ã€‚ + +```sql +SELECT count() +FROM bytes_per_hour +FINAL + +┌─count()─┠+│ 113 │ +└─────────┘ +``` + +ã“ã“ã§ã¯ã€`otel_logs`内ã®10百万行ã‹ã‚‰113è¡Œã«å®Ÿè³ªçš„ã«æ¸›å°‘ã—ã¾ã—ãŸã€‚ã“ã®ã‚­ãƒ¼ã¯ã€æ–°ã—ã„ログãŒ`otel_logs`テーブルã«æŒ¿å…¥ã•ã‚Œã‚‹ã¨ã€æ–°ã—ã„値ãŒãã‚Œãžã‚Œã®æ™‚é–“ã®ãŸã‚ã«`bytes_per_hour`ã«é€ä¿¡ã•ã‚Œã€ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§éžåŒæœŸã«è‡ªå‹•çš„ã«ãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ã€‚`bytes_per_hour`ã¯å¸¸ã«å°ã•ãã€æœ€æ–°ã®çŠ¶æ…‹ã«ä¿ãŸã‚Œã¾ã™ã€‚ + +è¡Œã®ãƒžãƒ¼ã‚¸ã¯éžåŒæœŸã§ã‚ã‚‹ãŸã‚ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¯ã‚¨ãƒªã‚’è¡Œã†éš›ã«ã¯ã€æ™‚é–“ã”ã¨ã«è¤‡æ•°ã®è¡ŒãŒå­˜åœ¨ã™ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚クエリ時ã«æœªå‡¦ç†ã®è¡ŒãŒãƒžãƒ¼ã‚¸ã•ã‚Œã‚‹ã‚ˆã†ã«ã™ã‚‹ãŸã‚ã«ã€2ã¤ã®ã‚ªãƒ—ションãŒã‚ã‚Šã¾ã™ã€‚ + +1. テーブルåã®[`FINAL`修飾å­](/ja/sql-reference/statements/select/from#final-modifier)を使用ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ä¸Šè¨˜ã®ã‚«ã‚¦ãƒ³ãƒˆã‚¯ã‚¨ãƒªã§ã‚‚è¡Œã„ã¾ã—ãŸã€‚ +2. 最終テーブルã§ä½¿ç”¨ã•ã‚Œã‚‹é †åºã‚­ãƒ¼ï¼ˆã“ã®å ´åˆã¯Timestamp)を集約ã—ã€ãƒ¡ãƒˆãƒªãƒƒã‚¯ã‚’åˆè¨ˆã—ã¾ã™ã€‚ã“ã‚Œã¯é€šå¸¸ã€åŠ¹çŽ‡ãŒè‰¯ã柔軟性ãŒã‚り(テーブルã¯ä»–ã®ç”¨é€”ã«ã‚‚使用ã§ãる)ã€å‰è€…ã¯ä¸€éƒ¨ã®ã‚¯ã‚¨ãƒªã«ã¯ã‚ˆã‚Šç°¡å˜ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。両方を以下ã«ç¤ºã—ã¾ã™ã€‚ + +```sql +SELECT + Hour, + sum(TotalBytes) AS TotalBytes +FROM bytes_per_hour +GROUP BY Hour +ORDER BY Hour DESC +LIMIT 5 + +┌────────────────Hour─┬─TotalBytes─┠+│ 2019-01-26 16:00:00 │ 1661716343 │ +│ 2019-01-26 15:00:00 │ 1824015281 │ +│ 2019-01-26 14:00:00 │ 1506284139 │ +│ 2019-01-26 13:00:00 │ 1580955392 │ +│ 2019-01-26 12:00:00 │ 1736840933 │ +└─────────────────────┴────────────┘ + +5 rows in set. Elapsed: 0.008 sec. + +SELECT + Hour, + TotalBytes +FROM bytes_per_hour +FINAL +ORDER BY Hour DESC +LIMIT 5 + +┌────────────────Hour─┬─TotalBytes─┠+│ 2019-01-26 16:00:00 │ 1661716343 │ +│ 2019-01-26 15:00:00 │ 1824015281 │ +│ 2019-01-26 14:00:00 │ 1506284139 │ +│ 2019-01-26 13:00:00 │ 1580955392 │ +│ 2019-01-26 12:00:00 │ 1736840933 │ +└─────────────────────┴────────────┘ + +5 rows in set. Elapsed: 0.005 sec. +``` + +ã“ã®çµæžœã€ã‚¯ã‚¨ãƒªã®é€Ÿåº¦ã¯0.6秒ã‹ã‚‰0.008秒ã«75å€å‘上ã—ã¾ã—ãŸï¼ + +> ã“れらã®ç¯€ç´„ã¯ã€ã‚ˆã‚Šå¤§ããªãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚„より複雑ãªã‚¯ã‚¨ãƒªã§ã¯ã•ã‚‰ã«å¤§ãããªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚例ã«ã¤ã„ã¦ã¯[ã“ã¡ã‚‰](https://github.com/ClickHouse/clickpy)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### より複雑ãªä¾‹ + +上記ã®ä¾‹ã¯ã€SummingMergeTreeを使用ã—ã¦æ™‚é–“ã”ã¨ã®å˜ç´”ãªã‚«ã‚¦ãƒ³ãƒˆã‚’集約ã—ã¦ã„ã¾ã™ã€‚å˜ç´”ãªåˆè¨ˆã‚’超ãˆã‚‹çµ±è¨ˆã«ã¯ã€ç•°ãªã‚‹ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルエンジンã§ã‚ã‚‹AggregatingMergeTreeãŒå¿…è¦ã§ã™ã€‚ + +ãŸã¨ãˆã°ã€æ—¥ã”ã¨ã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªIPアドレス数(ユニークãªãƒ¦ãƒ¼ã‚¶ãƒ¼æ•°ï¼‰ã‚’計算ã—ãŸã„ã¨ã—ã¾ã™ã€‚ã“ã®ãŸã‚ã®ã‚¯ã‚¨ãƒªã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚ + +```sql +SELECT toStartOfHour(Timestamp) AS Hour, uniq(LogAttributes['remote_addr']) AS UniqueUsers +FROM otel_logs +GROUP BY Hour +ORDER BY Hour DESC + +┌────────────────Hour─┬─UniqueUsers─┠+│ 2019-01-26 16:00:00 │ 4763 │ +… +│ 2019-01-22 00:00:00 │ 536 │ +└─────────────────────┴────────────┘ + +113 rows in set. Elapsed: 0.667 sec. Processed 10.37 million rows, 4.73 GB (15.53 million rows/s., 7.09 GB/s.) +``` + +集約ã®ãŸã‚ã«å¢—分更新を維æŒã™ã‚‹ã«ã¯ã€AggregatingMergeTreeãŒå¿…è¦ã§ã™ã€‚ + +```sql +CREATE TABLE unique_visitors_per_hour +( + `Hour` DateTime, + `UniqueUsers` AggregateFunction(uniq, IPv4) +) +ENGINE = AggregatingMergeTree +ORDER BY Hour +``` + +ClickHouseãŒé›†ç´„状態ãŒä¿å­˜ã•ã‚Œã‚‹ã“ã¨ã‚’èªè­˜ã™ã‚‹ã‚ˆã†ã«ã€`UniqueUsers`カラムã®åž‹ã‚’[`AggregateFunction`](/ja/sql-reference/data-types/aggregatefunction)ã¨ã—ã¦å®šç¾©ã—ã€éƒ¨åˆ†çŠ¶æ…‹ã®ã‚½ãƒ¼ã‚¹é–¢æ•°ï¼ˆuniq)ã¨ã‚½ãƒ¼ã‚¹ã‚«ãƒ©ãƒ ã®åž‹ï¼ˆIPv4)を指定ã—ã¾ã™ã€‚SummingMergeTreeã¨åŒæ§˜ã«ã€åŒã˜`ORDER BY`キー値をæŒã¤è¡ŒãŒãƒžãƒ¼ã‚¸ã•ã‚Œã¾ã™ï¼ˆä¸Šè¨˜ã®ä¾‹ã§ã¯Hour)。 + +関連ã™ã‚‹ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¯ã€ä»¥å‰ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¾ã™ã€‚ + +```sql +CREATE MATERIALIZED VIEW unique_visitors_per_hour_mv TO unique_visitors_per_hour AS +SELECT toStartOfHour(Timestamp) AS Hour, + uniqState(LogAttributes['remote_addr']::IPv4) AS UniqueUsers +FROM otel_logs +GROUP BY Hour +ORDER BY Hour DESC +``` + +集約関数ã®æœ«å°¾ã«`suffix`を追加ã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“ã‚Œã¯ã€é–¢æ•°ã®é›†ç´„状態ãŒæˆ»ã•ã‚Œã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã€æœ€çµ‚çµæžœã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã‚Œã«ã‚ˆã‚Šã€ã“ã®éƒ¨åˆ†çŠ¶æ…‹ãŒä»–ã®çŠ¶æ…‹ã¨ãƒžãƒ¼ã‚¸ã™ã‚‹ãŸã‚ã®è¿½åŠ æƒ…報をå«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ + +データãŒå†èª­ã¿è¾¼ã¿ã•ã‚ŒãŸå¾Œã€ã‚³ãƒ¬ã‚¯ã‚¿ã®å†èµ·å‹•ã‚’経ã¦ã€`unique_visitors_per_hour`テーブルã«113è¡ŒãŒç¢ºèªã§ãã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +SELECT count() +FROM unique_visitors_per_hour +FINAL + +┌─count()─┠+│ 113 │ +└─────────┘ +``` +Our final query needs to utilize the Merge suffix for our functions (as the columns store partial aggregation states): + +```sql +SELECT Hour, uniqMerge(UniqueUsers) AS UniqueUsers +FROM unique_visitors_per_hour +GROUP BY Hour +ORDER BY Hour DESC + +┌────────────────Hour─┬─UniqueUsers─┠+│ 2019-01-26 16:00:00 │ 4763 │ + +│ 2019-01-22 00:00:00 │ 536 │ +└─────────────────────┴─────────────┘ + +113 rows in set. Elapsed: 0.027 sec. +``` + +Note we use a `GROUP BY` here instead of using `FINAL`. + +## 使用ã—ãŸãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ュー (ç´¯ç©) ã«ã‚ˆã‚‹é«˜é€Ÿæ¤œç´¢ + +ユーザーã¯ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ãŠã‚ˆã³é›†è¨ˆå¥ã§é »ç¹ã«ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã§ ClickHouse ã®é †åºã‚­ãƒ¼ã‚’é¸æŠžã™ã‚‹éš›ã«ã€ãã®ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンを考慮ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¤šæ§˜ãªã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンをæŒã¤è¦³æ¸¬æ€§ã®ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹ã«ãŠã„ã¦ã€å˜ä¸€ã®ã‚«ãƒ©ãƒ ã‚»ãƒƒãƒˆã§ã‚«ãƒ—セル化ã§ããªã„ãŸã‚制約ã«ãªã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“れをデフォルトã®OTelスキーマã«çµ„ã¿è¾¼ã¾ã‚ŒãŸä¾‹ã§æœ€ã‚‚よã示ã—ã¦ã„ã¾ã™ã€‚トレースã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã‚¹ã‚­ãƒ¼ãƒžã‚’考ãˆã¦ã¿ã¾ã—ょã†ï¼š + +```sql +CREATE TABLE otel_traces +( + `Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)), + `TraceId` String CODEC(ZSTD(1)), + `SpanId` String CODEC(ZSTD(1)), + `ParentSpanId` String CODEC(ZSTD(1)), + `TraceState` String CODEC(ZSTD(1)), + `SpanName` LowCardinality(String) CODEC(ZSTD(1)), + `SpanKind` LowCardinality(String) CODEC(ZSTD(1)), + `ServiceName` LowCardinality(String) CODEC(ZSTD(1)), + `ResourceAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `ScopeName` String CODEC(ZSTD(1)), + `ScopeVersion` String CODEC(ZSTD(1)), + `SpanAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)), + `Duration` Int64 CODEC(ZSTD(1)), + `StatusCode` LowCardinality(String) CODEC(ZSTD(1)), + `StatusMessage` String CODEC(ZSTD(1)), + `Events.Timestamp` Array(DateTime64(9)) CODEC(ZSTD(1)), + `Events.Name` Array(LowCardinality(String)) CODEC(ZSTD(1)), + `Events.Attributes` Array(Map(LowCardinality(String), String)) CODEC(ZSTD(1)), + `Links.TraceId` Array(String) CODEC(ZSTD(1)), + `Links.SpanId` Array(String) CODEC(ZSTD(1)), + `Links.TraceState` Array(String) CODEC(ZSTD(1)), + `Links.Attributes` Array(Map(LowCardinality(String), String)) CODEC(ZSTD(1)), + INDEX idx_trace_id TraceId TYPE bloom_filter(0.001) GRANULARITY 1, + INDEX idx_res_attr_key mapKeys(ResourceAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_res_attr_value mapValues(ResourceAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_span_attr_key mapKeys(SpanAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_span_attr_value mapValues(SpanAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_duration Duration TYPE minmax GRANULARITY 1 +) +ENGINE = MergeTree +PARTITION BY toDate(Timestamp) +ORDER BY (ServiceName, SpanName, toUnixTimestamp(Timestamp), TraceId) +``` + +ã“ã®ã‚¹ã‚­ãƒ¼ãƒžã¯ã€`ServiceName`ã€`SpanName`ã€ãŠã‚ˆã³ `Timestamp` ã«ã‚ˆã‚‹ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã«æœ€é©åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚トレーシングã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ç‰¹å®šã® `TraceId` ã«ã‚ˆã‚‹æ¤œç´¢ã‚’è¡Œã„ã€é–¢é€£ã™ã‚‹ãƒˆãƒ¬ãƒ¼ã‚¹ã®ã‚¹ãƒ‘ンをå–å¾—ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚ŒãŒé †åºã‚­ãƒ¼ã«å­˜åœ¨ã—ã¾ã™ãŒã€ãã®ä½ç½®ãŒæœ€å¾Œã«ã‚ã‚‹ãŸã‚ã€[フィルタリングã®åŠ¹çŽ‡ãŒä½Žä¸‹ã™ã‚‹](https://en/optimize/sparse-primary-indexes#ordering-key-columns-efficiently)ã“ã¨ãŒã‚ã‚Šã€å˜ä¸€ã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’å–å¾—ã™ã‚‹éš›ã«ã€å¤šãã®ãƒ‡ãƒ¼ã‚¿ã‚’スキャンã—ãªã‘ã‚Œã°ãªã‚‰ãªã„å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚ + +OTel コレクターã¯ã€ã“ã®èª²é¡Œã«å¯¾å‡¦ã™ã‚‹ãŸã‚ã«ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¨é–¢é€£ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルもインストールã—ã¾ã™ã€‚テーブルã¨ãƒ“ューã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼š + +```sql +CREATE TABLE otel_traces_trace_id_ts +( + `TraceId` String CODEC(ZSTD(1)), + `Start` DateTime64(9) CODEC(Delta(8), ZSTD(1)), + `End` DateTime64(9) CODEC(Delta(8), ZSTD(1)), + INDEX idx_trace_id TraceId TYPE bloom_filter(0.01) GRANULARITY 1 +) +ENGINE = MergeTree +ORDER BY (TraceId, toUnixTimestamp(Start)) + + +CREATE MATERIALIZED VIEW otel_traces_trace_id_ts_mv TO otel_traces_trace_id_ts +( + `TraceId` String, + `Start` DateTime64(9), + `End` DateTime64(9) +) +AS SELECT + TraceId, + min(Timestamp) AS Start, + max(Timestamp) AS End +FROM otel_traces +WHERE TraceId != '' +GROUP BY TraceId +``` + +ã“ã®ãƒ“ューã¯ã€ãƒ†ãƒ¼ãƒ–ル `otel_traces_trace_id_ts` ã«ãƒˆãƒ¬ãƒ¼ã‚¹ã®æœ€å°ãŠã‚ˆã³æœ€å¤§ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã‚’æŒã¤ã“ã¨ã‚’実効的ã«ä¿è¨¼ã—ã¾ã™ã€‚ã“ã®ãƒ†ãƒ¼ãƒ–ルã¯ã€`TraceId` ã«ã‚ˆã£ã¦é †åºä»˜ã‘られã¦ãŠã‚Šã€ã“ã‚Œã«ã‚ˆã‚Šã“れらã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—を効率的ã«å–å¾—ã§ãã¾ã™ã€‚ã“れらã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—範囲ã¯ã€ãƒ¡ã‚¤ãƒ³ãƒˆãƒ¬ãƒ¼ã‚¹ `otel_traces` テーブルをクエリã™ã‚‹éš›ã«ã‚‚使用ã§ãã¾ã™ã€‚具体的ã«ã¯ã€ãƒˆãƒ¬ãƒ¼ã‚¹ã®IDã§å–å¾—ã™ã‚‹éš›ã«GrafanaãŒä½¿ç”¨ã™ã‚‹ã‚¯ã‚¨ãƒªã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼š + +```sql +WITH 'ae9226c78d1d360601e6383928e4d22d' AS trace_id, + ( + SELECT min(Start) + FROM default.otel_traces_trace_id_ts + WHERE TraceId = trace_id + ) AS trace_start, + ( + SELECT max(End) + 1 + FROM default.otel_traces_trace_id_ts + WHERE TraceId = trace_id + ) AS trace_end +SELECT + TraceId AS traceID, + SpanId AS spanID, + ParentSpanId AS parentSpanID, + ServiceName AS serviceName, + SpanName AS operationName, + Timestamp AS startTime, + Duration * 0.000001 AS duration, + arrayMap(key -> map('key', key, 'value', SpanAttributes[key]), mapKeys(SpanAttributes)) AS tags, + arrayMap(key -> map('key', key, 'value', ResourceAttributes[key]), mapKeys(ResourceAttributes)) AS serviceTags +FROM otel_traces +WHERE (traceID = trace_id) AND (startTime >= trace_start) AND (startTime <= trace_end) +LIMIT 1000 +``` + +ã“ã“ã§ã®CTEã¯ã€ãƒˆãƒ¬ãƒ¼ã‚¹ID `ae9226c78d1d360601e6383928e4d22d` ã®æœ€å°ãŠã‚ˆã³æœ€å¤§ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—を特定ã—ã€ã“れを使用ã—ã¦ãƒ¡ã‚¤ãƒ³ã® `otel_traces` テーブルã®é–¢é€£ã‚¹ãƒ‘ンをフィルタリングã—ã¾ã™ã€‚ + +ã“ã®åŒã˜ã‚¢ãƒ—ローãƒã¯ã€åŒæ§˜ã®ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã«é©ç”¨ã§ãã¾ã™ã€‚データモデリングã§é¡žä¼¼ã®ä¾‹ã‚’探求ã—ã¦ã„ã¾ã™ã€‚ + +## プロジェクションã®ä½¿ç”¨ + +ClickHouse ã®ãƒ—ロジェクションã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã—ã¦è¤‡æ•°ã® `ORDER BY` å¥ã‚’指定ã§ãã¾ã™ã€‚ + +å‰ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを使用ã—㦠ClickHouse ã§é›†è¨ˆã‚’事å‰ã«è¨ˆç®—ã—ã€è¡Œã‚’変æ›ã—ã€ç•°ãªã‚‹ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã«åˆã‚ã›ãŸè¦³æ¸¬æ€§ã®ã‚¯ã‚¨ãƒªã‚’最é©åŒ–ã™ã‚‹æ–¹æ³•ã‚’探求ã—ã¾ã—ãŸã€‚ + +マテリアライズドビューã¯ã€ãƒˆãƒ¬ãƒ¼ã‚¹IDã«ã‚ˆã‚‹æ¤œç´¢ã‚’最é©åŒ–ã™ã‚‹ãŸã‚ã«ã€å…ƒã®ãƒ†ãƒ¼ãƒ–ルã¨ã¯ç•°ãªã‚‹é †åºã‚­ãƒ¼ã‚’æŒã¤ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ†ãƒ¼ãƒ–ルã«è¡Œã‚’é€ä¿¡ã™ã‚‹ä¾‹ã‚’æä¾›ã—ã¾ã—ãŸã€‚ + +プロジェクションã¯ã€ä¸»ã‚­ãƒ¼ã®ä¸€éƒ¨ã§ã¯ãªã„カラムã«å¯¾ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’最é©åŒ–ã™ã‚‹ãŸã‚ã«ã€åŒã˜å•é¡Œã«å¯¾å‡¦ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ç†è«–çš„ã«ã¯ã€ã“ã®èƒ½åŠ›ã¯ãƒ†ãƒ¼ãƒ–ルã®ãŸã‚ã«è¤‡æ•°ã®é †åºã‚­ãƒ¼ã‚’æä¾›ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ãŒã€ä¸€ã¤ã®æ˜Žç¢ºãªæ¬ ç‚¹ãŒã‚ã‚Šã¾ã™ï¼šãƒ‡ãƒ¼ã‚¿ã®é‡è¤‡ã§ã™ã€‚具体的ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã¯å„プロジェクションã«å¯¾ã—ã¦æŒ‡å®šã•ã‚ŒãŸé †åºã«åŠ ãˆã€ä¸»ãªä¸»ã‚­ãƒ¼ã®é †åºã§æ›¸ã込む必è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æŒ¿å…¥ãŒé…ããªã‚Šã€ã‚ˆã‚Šå¤šãã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ãŒæ¶ˆè²»ã•ã‚Œã¾ã™ã€‚ + +> プロジェクションã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューã¨åŒæ§˜ã®å¤šãã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ãŒã€å¾Œè€…ãŒå¥½ã¾ã‚Œã‚‹ã“ã¨ãŒå¤šãã€æŽ§ãˆã‚ã«ä½¿ç”¨ã™ã‚‹ã¹ãã§ã™ã€‚ユーザーã¯æ¬ ç‚¹ã‚’ç†è§£ã—ã€ã„ã¤é©åˆ‡ã«ä½¿ç”¨ã™ã‚‹ã‹ã‚’ç†è§£ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€ãƒ—ロジェクションã¯é›†è¨ˆã‚’事å‰ã«è¨ˆç®—ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã“ã‚Œã«ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ューを使用ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ + +NEEDS ALT + +
    + +以下ã®ã‚¯ã‚¨ãƒªã‚’考慮ã—ã¾ã™ã€‚ã“ã®ã‚¯ã‚¨ãƒªã¯ `otel_logs_v2` テーブルを 500 ã®ã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰ã§ãƒ•ã‚£ãƒ«ã‚¿ãƒªãƒ³ã‚°ã—ãŸã„ã¨è€ƒãˆã¦ã„ã‚‹ãŸã‚ã€ãƒ­ã‚°ã«ä½¿ç”¨ã•ã‚Œã‚‹ä¸€èˆ¬çš„ãªã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã§ã™ï¼š + +```sql +SELECT Timestamp, RequestPath, Status, RemoteAddress, UserAgent +FROM otel_logs_v2 +WHERE Status = 500 +FORMAT `Null` + +Ok. + +0 rows in set. Elapsed: 0.177 sec. Processed 10.37 million rows, 685.32 MB (58.66 million rows/s., 3.88 GB/s.) +Peak memory usage: 56.54 MiB. +``` + +> ã“ã®å ´åˆã€`FORMAT Null` を使用ã—ã¦çµæžœã‚’å°åˆ·ã—ã¦ã„ã¾ã›ã‚“。ã“ã‚Œã«ã‚ˆã‚Šã€ã™ã¹ã¦ã®çµæžœãŒèª­ã¿å–られã¾ã™ãŒè¿”å´ã•ã‚Œãªã„ãŸã‚ã€LIMIT ã«ã‚ˆã‚‹ã‚¯ã‚¨ãƒªã®æ—©æœŸçµ‚了を防ãŽã¾ã™ã€‚ã“ã‚Œã¯ã€å…¨ã¦ã®1000万行をスキャンã™ã‚‹ã®ã«ã‹ã‹ã£ãŸæ™‚間を示ã™ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ + +上記ã®ã‚¯ã‚¨ãƒªã¯ã€é¸æŠžã—ãŸé †åºã‚­ãƒ¼ `(ServiceName, Timestamp)` ã«å¯¾ã—ã¦ç·šå½¢ã‚¹ã‚­ãƒ£ãƒ³ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ç§ãŸã¡ã¯ã€ä¸Šè¨˜ã®ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ãŸã‚ã«ã€`Status` ã‚’é †åºã‚­ãƒ¼ã®æœ€å¾Œã«è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ãƒ—ロジェクションを追加ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +```sql +ALTER TABLE otel_logs_v2 ( + ADD PROJECTION status + ( + SELECT Timestamp, RequestPath, Status, RemoteAddress, UserAgent ORDER BY Status + ) +) + +ALTER TABLE otel_logs_v2 MATERIALIZE PROJECTION status +``` + +プロジェクションを最åˆã«ä½œæˆã—ã€æ¬¡ã«ãれをマテリアライズã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®å¾Œã®ã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ãŒç•°ãªã‚‹é †åºã®2ã¤ã®ç•°ãªã‚‹å½¢å¼ã§ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚データを作æˆã™ã‚‹ã¨ãã«ãƒ—ロジェクションを定義ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚以下ã®ã‚ˆã†ã«è‡ªå‹•çš„ã«ç¶­æŒã•ã‚Œã¾ã™ã€‚ + +```sql +CREATE TABLE otel_logs_v2 +( + `Body` String, + `Timestamp` DateTime, + `ServiceName` LowCardinality(String), + `Status` UInt16, + `RequestProtocol` LowCardinality(String), + `RunTime` UInt32, + `Size` UInt32, + `UserAgent` String, + `Referer` String, + `RemoteUser` String, + `RequestType` LowCardinality(String), + `RequestPath` String, + `RemoteAddress` IPv4, + `RefererDomain` String, + `RequestPage` String, + `SeverityText` LowCardinality(String), + `SeverityNumber` UInt8, + PROJECTION status + ( + SELECT Timestamp, RequestPath, Status, RemoteAddress, UserAgent + ORDER BY Status + ) +) +ENGINE = MergeTree +ORDER BY (ServiceName, Timestamp) +``` + +é‡è¦ãªã®ã¯ã€`ALTER`を介ã—ã¦ãƒ—ロジェクションãŒä½œæˆã•ã‚ŒãŸå ´åˆã€ãã®ä½œæˆã¯éžåŒæœŸã§ã‚ã‚Šã€`MATERIALIZE PROJECTION`コマンドãŒç™ºè¡Œã•ã‚Œã¾ã™ã€‚ã“ã®æ“作ã®é€²è¡ŒçŠ¶æ³ã¯ã€æ¬¡ã®ã‚¯ã‚¨ãƒªã§ç¢ºèªã§ãã€`is_done=1`ã‚’å¾…ã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```sql +SELECT parts_to_do, is_done, latest_fail_reason +FROM system.mutations +WHERE (`table` = 'otel_logs_v2') AND (command LIKE '%MATERIALIZE%') + +┌─parts_to_do─┬─is_done─┬─latest_fail_reason─┠+│ 0 │ 1 │ │ +└─────────────┴─────────┴────────────────────┘ + +1 row in set. Elapsed: 0.008 sec. +``` + +上記ã®ã‚¯ã‚¨ãƒªã‚’ç¹°ã‚Šè¿”ã™ã¨ã€ãƒ‘フォーマンスãŒå¤§å¹…ã«å‘上ã—ãŸã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ãŒã€è¿½åŠ ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒã‹ã‹ã£ã¦ã„ã¾ã™ï¼ˆã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚µã‚¤ã‚ºã¨åœ§ç¸®ã®æ¸¬å®šæ–¹æ³•ã«ã¤ã„ã¦ã¯ã€Œãƒ†ãƒ¼ãƒ–ルサイズã¨åœ§ç¸®ã®æ¸¬å®šã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +```sql +SELECT Timestamp, RequestPath, Status, RemoteAddress, UserAgent +FROM otel_logs_v2 +WHERE Status = 500 +FORMAT `Null` + +0 rows in set. Elapsed: 0.031 sec. Processed 51.42 thousand rows, 22.85 MB (1.65 million rows/s., 734.63 MB/s.) +Peak memory usage: 27.85 MiB. +``` + +上記ã®ä¾‹ã§ã¯ã€ä»¥å‰ã®ã‚¯ã‚¨ãƒªã§ä½¿ç”¨ã•ã‚Œã‚‹ã‚«ãƒ©ãƒ ã‚’プロジェクションã«æŒ‡å®šã—ã¦ã„ã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ã“れらã®æŒ‡å®šã•ã‚ŒãŸã‚«ãƒ©ãƒ ã®ã¿ãŒã€ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã«ã‚ˆã£ã¦é †åºä»˜ã‘られã¦ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•ã‚Œã¾ã™ã€‚逆ã«ã€ã“ã“㧠`SELECT *` を使用ã—ãŸå ´åˆã€ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ ãŒä¿å­˜ã•ã‚Œã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ï¼ˆã‚«ãƒ©ãƒ ã®ä»»æ„ã®ã‚µãƒ–セットを使用ã—ãŸï¼‰ã‚ˆã‚Šå¤šãã®ã‚¯ã‚¨ãƒªãŒãƒ—ロジェクションã®æ©æµã‚’å—ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€è¿½åŠ ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚ディスクスペースã¨åœ§ç¸®ã‚’測定ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€ã€Œãƒ†ãƒ¼ãƒ–ルサイズã¨åœ§ç¸®ã®æ¸¬å®šã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## セカンダリ/データスキップインデックス + +ClickHouse ã§ä¸»ã‚­ãƒ¼ãŒã©ã‚Œã»ã©ãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚°ã•ã‚Œã¦ã„ã¦ã‚‚ã€ã„ãã¤ã‹ã®ã‚¯ã‚¨ãƒªã¯å¿…然的ã«å…¨ãƒ†ãƒ¼ãƒ–ルスキャンを必è¦ã¨ã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ãƒžãƒ†ãƒªã‚¢ãƒ©ã‚¤ã‚ºãƒ‰ãƒ“ュー(ãŠã‚ˆã³ä¸€éƒ¨ã®ã‚¯ã‚¨ãƒªç”¨ã®ãƒ—ロジェクション)を使用ã™ã‚‹ã“ã¨ã§è»½æ¸›ã§ãã¾ã™ãŒã€ã“ã‚Œã«ã¯è¿½åŠ ã®ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ãŒå¿…è¦ã§ã‚ã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãã®åˆ©ç”¨å¯èƒ½æ€§ã‚’把æ¡ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚従æ¥ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã€ã‚»ã‚«ãƒ³ãƒ€ãƒªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¦ã“れを解決ã—ã¾ã™ãŒã€ClickHouse ã®ã‚ˆã†ãªåˆ—指å‘データベースã§ã¯åŠ¹æžœãŒã‚ã‚Šã¾ã›ã‚“。代ã‚ã‚Šã«ã€ClickHouse ã¯ã€Œã‚¹ã‚­ãƒƒãƒ—ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¦ãŠã‚Šã€ã“ã‚Œã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ä¸€è‡´ã™ã‚‹å€¤ãŒãªã„大ããªãƒ‡ãƒ¼ã‚¿ãƒãƒ£ãƒ³ã‚¯ã‚’スキップã™ã‚‹ã“ã¨ãŒã§ãã€ã‚¯ã‚¨ãƒªã®ãƒ‘フォーマンスを大幅ã«å‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +デフォルトã®OTelスキーマã¯ã€ãƒžãƒƒãƒ—アクセスã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’加速ã™ã‚‹ãŸã‚ã«ã‚»ã‚«ãƒ³ãƒ€ãƒªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¦ã„ã¾ã™ã€‚一般的ã«åŠ¹æžœãŒãªã„ã¨è€ƒãˆã¦ãŠã‚Šã€ã‚«ã‚¹ã‚¿ãƒ ã‚¹ã‚­ãƒ¼ãƒžã«ã‚³ãƒ”ーã™ã‚‹ã“ã¨ã¯ãŠå‹§ã‚ã—ã¾ã›ã‚“ãŒã€ã‚¹ã‚­ãƒƒãƒ—インデックスã¯ä¾ç„¶ã¨ã—ã¦æœ‰ç”¨ã§ã™ã€‚ + +ユーザーã¯ã€é©ç”¨ã™ã‚‹å‰ã«[セカンダリインデックスã«é–¢ã™ã‚‹ã‚¬ã‚¤ãƒ‰](https://en/optimize/skipping-indexes)を読ã¿ç†è§£ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +**一般ã«ã€ä¸»ã‚­ãƒ¼ã¨ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã¨ãªã‚‹éžä¸»ã‚­ãƒ¼ã®ã‚«ãƒ©ãƒ /å¼ã®é–“ã«å¼·ã„相関関係ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ã‹ã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã¾ã‚Œãªå€¤ã€ã¤ã¾ã‚Šå¤šãã®ã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã§ç™ºç”Ÿã—ãªã„値を探ã—ã¦ã„ã‚‹å ´åˆã«åŠ¹æžœçš„ã§ã™ã€‚** + +## テキスト検索ã®ãŸã‚ã®ãƒ–ルームフィルター + +観測性ã®ã‚¯ã‚¨ãƒªã«ãŠã„ã¦ã€ã‚»ã‚«ãƒ³ãƒ€ãƒªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ†ã‚­ã‚¹ãƒˆæ¤œç´¢ã‚’è¡Œã†å¿…è¦ãŒã‚ã‚‹ã¨ãã«å½¹ç«‹ã¡ã¾ã™ã€‚具体的ã«ã¯ã€ngram ãŠã‚ˆã³ãƒˆãƒ¼ã‚¯ãƒ³ãƒ™ãƒ¼ã‚¹ã®ãƒ–ルームフィルターインデックス [`ngrambf_v1`](https://en/optimize/skipping-indexes#bloom-filter-types) ãŠã‚ˆã³ [`tokenbf_v1`](https://en/optimize/skipping-indexes#bloom-filter-types) を使用ã—ã¦ã€`LIKE` ã€`IN`ã€ãŠã‚ˆã³ hasToken 演算å­ã‚’使用ã—ã¦æ–‡å­—列カラムã«å¯¾ã™ã‚‹æ¤œç´¢ã‚’加速ã§ãã¾ã™ã€‚特ã«ã€ãƒˆãƒ¼ã‚¯ãƒ³ãƒ™ãƒ¼ã‚¹ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã€éžè‹±æ•°å­—を区切りã¨ã—ã¦ä½¿ç”¨ã—ã¦ãƒˆãƒ¼ã‚¯ãƒ³ã‚’生æˆã—ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¯ã‚¨ãƒªæ™‚ã«ãƒˆãƒ¼ã‚¯ãƒ³ï¼ˆå…¨ä½“ã®å˜èªžï¼‰ã®ã¿ãŒä¸€è‡´ã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚より細ã‹ã„一致ã«ã¯ã€[N-gramブルームフィルター](https://en/optimize/skipping-indexes#bloom-filter-types)を使用ã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€æŒ‡å®šã•ã‚ŒãŸã‚µã‚¤ã‚ºã®n-gramã«æ–‡å­—列を分割ã—ã€éƒ¨åˆ†èªžã®ä¸€è‡´ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +生æˆã•ã‚Œã‚‹ãƒˆãƒ¼ã‚¯ãƒ³ã‚’評価ã™ã‚‹ãŸã‚ã€ã—ãŸãŒã£ã¦ä¸€è‡´ã™ã‚‹ãƒˆãƒ¼ã‚¯ãƒ³ã‚’評価ã™ã‚‹ãŸã‚ã«ã€`tokens` 関数を使用ã§ãã¾ã™ï¼š + +```sql +SELECT tokens('https://www.zanbil.ir/m/filter/b113') + +┌─tokens────────────────────────────────────────────┠+│ ['https','www','zanbil','ir','m','filter','b113'] │ +└───────────────────────────────────────────────────┘ + +1 row in set. Elapsed: 0.008 sec. +``` + +`ngram` 関数もåŒæ§˜ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚具体的ã«ã¯ã€n-gramサイズを第二ã®ãƒ‘ラメータã¨ã—ã¦æŒ‡å®šã§ãã¾ã™ï¼š + +```sql +SELECT ngrams('https://www.zanbil.ir/m/filter/b113', 3) + +┌─ngrams('https://www.zanbil.ir/m/filter/b113', 3)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┠+│ ['htt','ttp','tps','ps:','s:/','://','//w','/ww','www','ww.','w.z','.za','zan','anb','nbi','bil','il.','l.i','.ir','ir/','r/m','/m/','m/f','/fi','fil','ilt','lte','ter','er/','r/b','/b1','b11','113'] │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ + +1 row in set. Elapsed: 0.008 sec. +``` + +> ClickHouse ã«ã¯ã€ã‚»ã‚«ãƒ³ãƒ€ãƒªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¨ã—ã¦ã®é€†ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ã‚¨ã‚¯ã‚¹ãƒšãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã‚µãƒãƒ¼ãƒˆã‚‚ã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ç¾åœ¨ã€ãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã«ã¯æŽ¨å¥¨ã•ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€è£½å“版ã«æº–å‚™ãŒæ•´ã£ãŸå ´åˆã«ãƒˆãƒ¼ã‚¯ãƒ³ãƒ™ãƒ¼ã‚¹ã®ãƒ–ルームフィルターã«å–ã£ã¦ä»£ã‚ã‚‹ã“ã¨ã‚’期待ã—ã¦ã„ã¾ã™ã€‚ + +例ã®ç›®çš„ã®ãŸã‚ã«ã¯ã€æ§‹é€ åŒ–ログデータセットを使用ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€`Referer` カラム㫠`ultra` ã‚’å«ã‚€ãƒ­ã‚°ã‚’カウントã—ãŸã„ã¨ã—ã¾ã™ã€‚ + +```sql +SELECT count() +FROM otel_logs_v2 +WHERE Referer LIKE '%ultra%' + +┌─count()─┠+│ 114514 │ +└─────────┘ + +1 row in set. Elapsed: 0.177 sec. Processed 10.37 million rows, 908.49 MB (58.57 million rows/s., 5.13 GB/s.) +``` + +ã“ã“ã§ã¯ã€n-gramサイズを3ã§ä¸€è‡´ã•ã›ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€`ngrambf_v1` インデックスを作æˆã—ã¾ã™ã€‚ + +```sql +CREATE TABLE otel_logs_bloom +( + `Body` String, + `Timestamp` DateTime, + `ServiceName` LowCardinality(String), + `Status` UInt16, + `RequestProtocol` LowCardinality(String), + `RunTime` UInt32, + `Size` UInt32, + `UserAgent` String, + `Referer` String, + `RemoteUser` String, + `RequestType` LowCardinality(String), + `RequestPath` String, + `RemoteAddress` IPv4, + `RefererDomain` String, + `RequestPage` String, + `SeverityText` LowCardinality(String), + `SeverityNumber` UInt8, + INDEX idx_span_attr_value Referer TYPE ngrambf_v1(3, 10000, 3, 7) GRANULARITY 1 +) +ENGINE = MergeTree +ORDER BY (Timestamp) +``` + +インデックス `ngrambf_v1(3, 10000, 3, 7)` ã¯ã€ã“ã“ã§4ã¤ã®ãƒ‘ラメータをå–ã‚Šã¾ã™ã€‚最後ã®7ã¯ã‚·ãƒ¼ãƒ‰ã‚’表ã—ã¾ã™ã€‚ãã®ä»–ã¯ã€n-gram サイズ (3)ã€å€¤ `m` (フィルターサイズ)ã€ãŠã‚ˆã³ãƒãƒƒã‚·ãƒ¥é–¢æ•°ã®æ•° `k` (7) を表ã—ã¾ã™ã€‚ `k` 㨠`m` ã¯èª¿æ•´ãŒå¿…è¦ã§ã‚ã‚Šã€ãƒ¦ãƒ‹ãƒ¼ã‚¯ãª n-gram / トークンã®æ•°ã¨ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ãŒå½ã®è² ã‚’è¿”ã™ç¢ºçŽ‡ã«åŸºã¥ã„ã¦ã„ã¾ã™ - ã™ãªã‚ã¡ã€å€¤ãŒã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã«å­˜åœ¨ã—ãªã„ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ã“れらã®å€¤ã‚’特定ã™ã‚‹ã®ã«å½¹ç«‹ã¤æŽ¨å¥¨[関数](https://en/engines/table-engines/mergetree-family/mergetree#bloom-filter)ãŒã‚ã‚Šã¾ã™ã€‚ + +é©åˆ‡ã«ãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚°ã•ã‚Œã‚Œã°ã€ã“ã“ã§ã®ã‚¹ãƒ”ードアップã¯é¡•è‘—ã§ã™ï¼š + +```sql +SELECT count() +FROM otel_logs_bloom +WHERE Referer LIKE '%ultra%' +┌─count()─┠+│ 182 │ +└─────────┘ + +1 row in set. Elapsed: 0.077 sec. Processed 4.22 million rows, 375.29 MB (54.81 million rows/s., 4.87 GB/s.) +Peak memory usage: 129.60 KiB. +``` + +> 上記ã¯ä¾‹ç¤ºçš„ãªç›®çš„ã®ãŸã‚ã§ã™ã€‚ユーザーã¯ã€ãƒ†ã‚­ã‚¹ãƒˆæ¤œç´¢ã‚’最é©åŒ–ã—よã†ã¨ã™ã‚‹ã®ã§ã¯ãªãã€æŒ¿å…¥æ™‚ã«ãƒ­ã‚°ã‹ã‚‰æ§‹é€ ã‚’抽出ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ãŸã ã—ã€ãƒ†ã‚­ã‚¹ãƒˆæ¤œç´¢ãŒå½¹ç«‹ã¤ã‚±ãƒ¼ã‚¹ã‚‚ã‚ã‚Šã¾ã™ã€‚ãŸã¨ãˆã°ã€ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚„ä»–ã®å¤§ããªæ–‡å­—列ãªã©ã€æ§‹é€ ãŒã‚ã¾ã‚Šæ±ºå®šçš„ã§ãªã„å ´åˆã§ã™ã€‚ + +ブルームフィルターを使用ã™ã‚‹éš›ã®ä¸€èˆ¬çš„ãªã‚¬ã‚¤ãƒ‰ãƒ©ã‚¤ãƒ³ï¼š + +ブルームã®ç›®çš„ã¯[グラニュール](https://en/optimize/sparse-primary-indexes#clickhouse-index-design)をフィルタリングã—ã€ã‚«ãƒ©ãƒ ã®ã™ã¹ã¦ã®å€¤ã‚’読ã¿è¾¼ã‚“ã§ç·šå½¢ã‚¹ã‚­ãƒ£ãƒ³ã‚’回é¿ã™ã‚‹ã“ã¨ã§ã™ã€‚`EXPLAIN`å¥ã‚’使用ã—ã€`indexes=1`パラメータを指定ã™ã‚‹ã“ã¨ã§ã€ã‚¹ã‚­ãƒƒãƒ—ã•ã‚ŒãŸã‚°ãƒ©ãƒ‹ãƒ¥ãƒ¼ãƒ«ã®æ•°ã‚’特定ã§ãã¾ã™ã€‚以下ã¯ã€å…ƒã®ãƒ†ãƒ¼ãƒ–ル `otel_logs_v2` ã¨ã€ngrambf ã‚’æŒã¤ `otel_logs_bloom` テーブルã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’示ã—ã¾ã™ã€‚ + +```sql +EXPLAIN indexes = 1 +SELECT count() +FROM otel_logs_v2 +WHERE Referer LIKE '%ultra%' + +┌─explain────────────────────────────────────────────────────────────┠+│ Expression ((Project names + Projection)) │ +│ Aggregating │ +│ Expression (Before GROUP BY) │ +│ Filter ((WHERE + Change column names to column identifiers)) │ +│ ReadFromMergeTree (default.otel_logs_v2) │ +│ Indexes: │ +│ PrimaryKey │ +│ Condition: true │ +│ Parts: 9/9 │ +│ Granules: 1278/1278 │ +└────────────────────────────────────────────────────────────────────┘ + +10 rows in set. Elapsed: 0.016 sec. + + +EXPLAIN indexes = 1 +SELECT count() +FROM otel_logs_bloom +WHERE Referer LIKE '%ultra%' + +┌─explain────────────────────────────────────────────────────────────┠+│ Expression ((Project names + Projection)) │ +│ Aggregating │ +│ Expression (Before GROUP BY) │ +│ Filter ((WHERE + Change column names to column identifiers)) │ +│ ReadFromMergeTree (default.otel_logs_bloom) │ +│ Indexes: │ +│ PrimaryKey │ +│ Condition: true │ +│ Parts: 8/8 │ +│ Granules: 1276/1276 │ +│ Skip │ +│ Name: idx_span_attr_value │ +│ Description: ngrambf_v1 GRANULARITY 1 │ +│ Parts: 8/8 │ +│ Granules: 517/1276 │ +└────────────────────────────────────────────────────────────────────┘ +``` + +ブルームフィルターã¯ã€é€šå¸¸ã€åˆ—自体よりもå°ã•ã„å ´åˆã«ã®ã¿é«˜é€ŸåŒ–ã•ã‚Œã¾ã™ã€‚大ãã‘ã‚Œã°ã€ãƒ‘フォーマンスã®åˆ©ç‚¹ã¯ã»ã¨ã‚“ã©ãªã„ã§ã—ょã†ã€‚以下ã®ã‚¯ã‚¨ãƒªã‚’使用ã—ã¦ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¨åˆ—ã®ã‚µã‚¤ã‚ºã‚’比較ã—ã¦ãã ã•ã„: + +```sql +SELECT + name, + formatReadableSize(sum(data_compressed_bytes)) AS compressed_size, + formatReadableSize(sum(data_uncompressed_bytes)) AS uncompressed_size, + round(sum(data_uncompressed_bytes) / sum(data_compressed_bytes), 2) AS ratio +FROM system.columns +WHERE (`table` = 'otel_logs_bloom') AND (name = 'Referer') +GROUP BY name +ORDER BY sum(data_compressed_bytes) DESC + +┌─name────┬─compressed_size─┬─uncompressed_size─┬─ratio─┠+│ Referer │ 56.16 MiB │ 789.21 MiB │ 14.05 │ +└─────────┴─────────────────┴───────────────────┴───────┘ + +1 row in set. Elapsed: 0.018 sec. + + +SELECT + `table`, + formatReadableSize(data_compressed_bytes) AS compressed_size, + formatReadableSize(data_uncompressed_bytes) AS uncompressed_size +FROM system.data_skipping_indices +WHERE `table` = 'otel_logs_bloom' + +┌─table───────────┬─compressed_size─┬─uncompressed_size─┠+│ otel_logs_bloom │ 12.03 MiB │ 12.17 MiB │ +└─────────────────┴─────────────────┴───────────────────┘ + +1 row in set. Elapsed: 0.004 sec. +``` + +上記ã®ä¾‹ã§ã¯ã€ã‚»ã‚«ãƒ³ãƒ€ãƒªãƒ–ルームフィルターインデックスãŒ12MBã§ã€åˆ—自体ã®åœ§ç¸®ã‚µã‚¤ã‚ºã§ã‚ã‚‹56MBã®ç´„5å€å°ã•ã„ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ + +ブルームフィルターã¯ã€é‡è¦ãªãƒãƒ¥ãƒ¼ãƒ‹ãƒ³ã‚°ãŒå¿…è¦ã§ã™ã€‚最é©ãªè¨­å®šã‚’特定ã™ã‚‹ã®ã«å½¹ç«‹ã¤ãƒ¡ãƒ¢ã‚’[ã“ã¡ã‚‰ã«](https://en/engines/table-engines/mergetree-family/mergetree#bloom-filter)従ã†ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ブルームフィルターã¯ã€æŒ¿å…¥ãŠã‚ˆã³ãƒžãƒ¼ã‚¸æ™‚ã«ã‚‚高価ã«ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚製å“å‰ã«ãƒ–ルームフィルターを追加ã™ã‚‹å‰ã«ã€æŒ¿å…¥ãƒ‘フォーマンスã¸ã®å½±éŸ¿ã‚’評価ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ + +セカンダリスキップインデックスã«é–¢ã™ã‚‹è©³ç´°ã¯[ã“ã¡ã‚‰](https://en/optimize/skipping-indexes#skip-index-functions)ã«ã‚ã‚Šã¾ã™ã€‚ + +## マップã‹ã‚‰ã®æŠ½å‡º + +Map 型㯠OTel スキーマã«ãŠã„ã¦åºƒã使用ã•ã‚Œã¦ã„ã¾ã™ã€‚ã“ã®ã‚¿ã‚¤ãƒ—ã®ã‚­ãƒ¼ã¨å€¤ã¯åŒã˜åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ - ã“れ㯠Kubernetes ラベルãªã©ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ã¯å分ã§ã™ã€‚ã“ã“ã§æ³¨æ„ã™ã¹ãã¯ã€Map åž‹ã®ã‚µãƒ–キーをクエリã™ã‚‹éš›ã«ã€è¦ªã‚«ãƒ©ãƒ å…¨ä½“ãŒèª­ã¿è¾¼ã¾ã‚Œã‚‹ã“ã¨ã§ã™ã€‚Map ã«å¤šãã®ã‚­ãƒ¼ãŒã‚ã‚‹å ´åˆã€ã“ã‚Œã¯ã€ã‚­ãƒ¼ãŒã‚«ãƒ©ãƒ ã¨ã—ã¦å­˜åœ¨ã™ã‚‹å ´åˆã«èª­ã¿å–るよりも多ãã®ãƒ‡ãƒ¼ã‚¿ãŒãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰èª­ã¿å–られるãŸã‚ã€ã‚¯ã‚¨ãƒªã«é‡è¦ãªãƒšãƒŠãƒ«ãƒ†ã‚£ã‚’課ã™ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ + +特定ã®ã‚­ãƒ¼ã‚’é »ç¹ã«ã‚¯ã‚¨ãƒªã™ã‚‹å ´åˆã¯ã€ãれをルートã«å°‚用ã®ã‚«ãƒ©ãƒ ã«ç§»å‹•ã™ã‚‹ã“ã¨ã‚’検討ã—ã¦ãã ã•ã„。ã“ã‚Œã¯é€šå¸¸ã€ä¸€èˆ¬çš„ãªã‚¢ã‚¯ã‚»ã‚¹ãƒ‘ターンã¸ã®åå¿œã¨ã—ã¦ã€ãƒ‡ãƒ—ロイ後ã«ç™ºç”Ÿã™ã‚‹ã‚¿ã‚¹ã‚¯ã§ã‚ã‚Šã€è£½å“å‰ã«äºˆæ¸¬ã™ã‚‹ã“ã¨ã¯é›£ã—ã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。「スキーマã®é€²åŒ–ã€ã‚’å‚ç…§ã—ã¦ã€ãƒ‡ãƒ—ロイ後ã«ã‚¹ã‚­ãƒ¼ãƒžã‚’変更ã™ã‚‹æ–¹æ³•ã‚’確èªã—ã¦ãã ã•ã„。 + +## テーブルサイズã¨åœ§ç¸®ã®æ¸¬å®š + +ClickHouse ãŒè¦³æ¸¬æ€§ã®ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã‚‹ä¸»ãªç†ç”±ã®ä¸€ã¤ã¯ã€åœ§ç¸®ã§ã™ã€‚ + +ストレージコストを大幅ã«å‰Šæ¸›ã™ã‚‹ã ã‘ã§ãªãã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ‡ãƒ¼ã‚¿ãŒå°‘ãªã„ã¨ã„ã†ã“ã¨ã¯ã€I/O ãŒå°‘ãªããªã‚Šã€ã‚¯ã‚¨ãƒªã‚„挿入ãŒé€Ÿããªã‚Šã¾ã™ã€‚I/O ã®å‰Šæ¸›ã¯ã€CPUã®è¦³ç‚¹ã‹ã‚‰ã„ã‹ãªã‚‹åœ§ç¸®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã«å¯¾ã—ã¦ã‚‚ã€ä¸Šå›žã‚‹ã¹ãã§ã™ã€‚ã—ãŸãŒã£ã¦ã€ãƒ‡ãƒ¼ã‚¿ã®åœ§ç¸®ã‚’改善ã™ã‚‹ã“ã¨ãŒã€ClickHouse ã®ã‚¯ã‚¨ãƒªãŒé€Ÿã„ã“ã¨ã‚’確ä¿ã™ã‚‹éš›ã®æœ€åˆã®ç„¦ç‚¹ã§ã‚ã‚‹ã¹ãã§ã™ã€‚ + +圧縮を測定ã™ã‚‹æ–¹æ³•ã®è©³ç´°ã¯[ã“ã¡ã‚‰](https://en/data-compression/compression-in-clickhouse)ã«ã‚ã‚Šã¾ã™ã€‚ diff --git a/docs/ja/whats-new/_category_.yml b/docs/ja/whats-new/_category_.yml new file mode 100644 index 00000000000..a609b9ffc11 --- /dev/null +++ b/docs/ja/whats-new/_category_.yml @@ -0,0 +1,7 @@ +position: 100 +label: "What's New" +collapsible: true +collapsed: true +link: + type: generated-index + title: "What's New" diff --git a/docs/ja/whats-new/changelog/2017.md b/docs/ja/whats-new/changelog/2017.md new file mode 100644 index 00000000000..57a84002b14 --- /dev/null +++ b/docs/ja/whats-new/changelog/2017.md @@ -0,0 +1,268 @@ +--- +slug: /ja/whats-new/changelog/2017 +sidebar_position: 17 +sidebar_label: '2017' +title: 2017 Changelog +--- + +### ClickHouse Release 1.1.54327, 2017-12-21 {#clickhouse-release-1-1-54327-2017-12-21} + +This release contains bug fixes for the previous release 1.1.54318: + +- Fixed bug with possible race condition in replication that could lead to data loss. This issue affects versions 1.1.54310 and 1.1.54318. If you use one of these versions with Replicated tables, the update is strongly recommended. This issue shows in logs in Warning messages like `Part ... from own log does not exist.` The issue is relevant even if you do not see these messages in logs. + +### ClickHouse Release 1.1.54318, 2017-11-30 {#clickhouse-release-1-1-54318-2017-11-30} + +This release contains bug fixes for the previous release 1.1.54310: + +- Fixed incorrect row deletions during merges in the SummingMergeTree engine +- Fixed a memory leak in unreplicated MergeTree engines +- Fixed performance degradation with frequent inserts in MergeTree engines +- Fixed an issue that was causing the replication queue to stop running +- Fixed rotation and archiving of server logs + +### ClickHouse Release 1.1.54310, 2017-11-01 {#clickhouse-release-1-1-54310-2017-11-01} + +#### New Features: {#new-features} + +- Custom partitioning key for the MergeTree family of table engines. +- [Kafka](https://clickhouse.com/docs/ja/operations/table_engines/kafka/) table engine. +- Added support for loading [CatBoost](https://yandex.com/dev/catboost/) models and applying them to data stored in ClickHouse. +- Added support for time zones with non-integer offsets from UTC. +- Added support for arithmetic operations with time intervals. +- The range of values for the Date and DateTime types is extended to the year 2105. +- Added the `CREATE MATERIALIZED VIEW x TO y` query (specifies an existing table for storing the data of a materialized view). +- Added the `ATTACH TABLE` query without arguments. +- The processing logic for Nested columns with names ending in -Map in a SummingMergeTree table was extracted to the sumMap aggregate function. You can now specify such columns explicitly. +- Max size of the IP trie dictionary is increased to 128M entries. +- Added the getSizeOfEnumType function. +- Added the sumWithOverflow aggregate function. +- Added support for the Cap’n Proto input format. +- You can now customize compression level when using the zstd algorithm. + +#### Backward Incompatible Changes: {#backward-incompatible-changes} + +- Creation of temporary tables with an engine other than Memory is not allowed. +- Explicit creation of tables with the View or MaterializedView engine is not allowed. +- During table creation, a new check verifies that the sampling key expression is included in the primary key. + +#### Bug Fixes: {#bug-fixes} + +- Fixed hangups when synchronously inserting into a Distributed table. +- Fixed nonatomic adding and removing of parts in Replicated tables. +- Data inserted into a materialized view is not subjected to unnecessary deduplication. +- Executing a query to a Distributed table for which the local replica is lagging and remote replicas are unavailable does not result in an error anymore. +- Users do not need access permissions to the `default` database to create temporary tables anymore. +- Fixed crashing when specifying the Array type without arguments. +- Fixed hangups when the disk volume containing server logs is full. +- Fixed an overflow in the toRelativeWeekNum function for the first week of the Unix epoch. + +#### Build Improvements: {#build-improvements} + +- Several third-party libraries (notably Poco) were updated and converted to git submodules. + +### ClickHouse Release 1.1.54304, 2017-10-19 {#clickhouse-release-1-1-54304-2017-10-19} + +#### New Features: {#new-features-1} + +- TLS support in the native protocol (to enable, set `tcp_ssl_port` in `config.xml` ). + +#### Bug Fixes: {#bug-fixes-1} + +- `ALTER` for replicated tables now tries to start running as soon as possible. +- Fixed crashing when reading data with the setting `preferred_block_size_bytes=0.` +- Fixed crashes of `clickhouse-client` when pressing `Page Down` +- Correct interpretation of certain complex queries with `GLOBAL IN` and `UNION ALL` +- `FREEZE PARTITION` always works atomically now. +- Empty POST requests now return a response with code 411. +- Fixed interpretation errors for expressions like `CAST(1 AS Nullable(UInt8)).` +- Fixed an error when reading `Array(Nullable(String))` columns from `MergeTree` tables. +- Fixed crashing when parsing queries like `SELECT dummy AS dummy, dummy AS b` +- Users are updated correctly with invalid `users.xml` +- Correct handling when an executable dictionary returns a non-zero response code. + +### ClickHouse Release 1.1.54292, 2017-09-20 {#clickhouse-release-1-1-54292-2017-09-20} + +#### New Features: {#new-features-2} + +- Added the `pointInPolygon` function for working with coordinates on a coordinate plane. +- Added the `sumMap` aggregate function for calculating the sum of arrays, similar to `SummingMergeTree`. +- Added the `trunc` function. Improved performance of the rounding functions (`round`, `floor`, `ceil`, `roundToExp2`) and corrected the logic of how they work. Changed the logic of the `roundToExp2` function for fractions and negative numbers. +- The ClickHouse executable file is now less dependent on the libc version. The same ClickHouse executable file can run on a wide variety of Linux systems. There is still a dependency when using compiled queries (with the setting `compile = 1` , which is not used by default). +- Reduced the time needed for dynamic compilation of queries. + +#### Bug Fixes: {#bug-fixes-2} + +- Fixed an error that sometimes produced `part ... intersects previous part` messages and weakened replica consistency. +- Fixed an error that caused the server to lock up if ZooKeeper was unavailable during shutdown. +- Removed excessive logging when restoring replicas. +- Fixed an error in the UNION ALL implementation. +- Fixed an error in the concat function that occurred if the first column in a block has the Array type. +- Progress is now displayed correctly in the system.merges table. + +### ClickHouse Release 1.1.54289, 2017-09-13 {#clickhouse-release-1-1-54289-2017-09-13} + +#### New Features: {#new-features-3} + +- `SYSTEM` queries for server administration: `SYSTEM RELOAD DICTIONARY`, `SYSTEM RELOAD DICTIONARIES`, `SYSTEM DROP DNS CACHE`, `SYSTEM SHUTDOWN`, `SYSTEM KILL`. +- Added functions for working with arrays: `concat`, `arraySlice`, `arrayPushBack`, `arrayPushFront`, `arrayPopBack`, `arrayPopFront`. +- Added `root` and `identity` parameters for the ZooKeeper configuration. This allows you to isolate individual users on the same ZooKeeper cluster. +- Added aggregate functions `groupBitAnd`, `groupBitOr`, and `groupBitXor` (for compatibility, they are also available under the names `BIT_AND`, `BIT_OR`, and `BIT_XOR`). +- External dictionaries can be loaded from MySQL by specifying a socket in the filesystem. +- External dictionaries can be loaded from MySQL over SSL (`ssl_cert`, `ssl_key`, `ssl_ca` parameters). +- Added the `max_network_bandwidth_for_user` setting to restrict the overall bandwidth use for queries per user. +- Support for `DROP TABLE` for temporary tables. +- Support for reading `DateTime` values in Unix timestamp format from the `CSV` and `JSONEachRow` formats. +- Lagging replicas in distributed queries are now excluded by default (the default threshold is 5 minutes). +- FIFO locking is used during ALTER: an ALTER query isn’t blocked indefinitely for continuously running queries. +- Option to set `umask` in the config file. +- Improved performance for queries with `DISTINCT` . + +#### Bug Fixes: {#bug-fixes-3} + +- Improved the process for deleting old nodes in ZooKeeper. Previously, old nodes sometimes didn’t get deleted if there were very frequent inserts, which caused the server to be slow to shut down, among other things. +- Fixed randomization when choosing hosts for the connection to ZooKeeper. +- Fixed the exclusion of lagging replicas in distributed queries if the replica is localhost. +- Fixed an error where a data part in a `ReplicatedMergeTree` table could be broken after running `ALTER MODIFY` on an element in a `Nested` structure. +- Fixed an error that could cause SELECT queries to “hangâ€. +- Improvements to distributed DDL queries. +- Fixed the query `CREATE TABLE ... AS `. +- Resolved the deadlock in the `ALTER ... CLEAR COLUMN IN PARTITION` query for `Buffer` tables. +- Fixed the invalid default value for `Enum` s (0 instead of the minimum) when using the `JSONEachRow` and `TSKV` formats. +- Resolved the appearance of zombie processes when using a dictionary with an `executable` source. +- Fixed segfault for the HEAD query. + +#### Improved Workflow for Developing and Assembling ClickHouse: {#improved-workflow-for-developing-and-assembling-clickhouse} + +- You can use `pbuilder` to build ClickHouse. +- You can use `libc++` instead of `libstdc++` for builds on Linux. +- Added instructions for using static code analysis tools: `Coverage`, `clang-tidy`, `cppcheck`. + +#### Please Note When Upgrading: {#please-note-when-upgrading} + +- There is now a higher default value for the MergeTree setting `max_bytes_to_merge_at_max_space_in_pool` (the maximum total size of data parts to merge, in bytes): it has increased from 100 GiB to 150 GiB. This might result in large merges running after the server upgrade, which could cause an increased load on the disk subsystem. If the free space available on the server is less than twice the total amount of the merges that are running, this will cause all other merges to stop running, including merges of small data parts. As a result, INSERT queries will fail with the message “Merges are processing significantly slower than inserts.†Use the `SELECT * FROM system.merges` query to monitor the situation. You can also check the `DiskSpaceReservedForMerge` metric in the `system.metrics` table, or in Graphite. You do not need to do anything to fix this, since the issue will resolve itself once the large merges finish. If you find this unacceptable, you can restore the previous value for the `max_bytes_to_merge_at_max_space_in_pool` setting. To do this, go to the `` section in config.xml, set ``` ``107374182400 ``` and restart the server. + +### ClickHouse Release 1.1.54284, 2017-08-29 {#clickhouse-release-1-1-54284-2017-08-29} + +- This is a bugfix release for the previous 1.1.54282 release. It fixes leaks in the parts directory in ZooKeeper. + +### ClickHouse Release 1.1.54282, 2017-08-23 {#clickhouse-release-1-1-54282-2017-08-23} + +This release contains bug fixes for the previous release 1.1.54276: + +- Fixed `DB::Exception: Assertion violation: !_path.empty()` when inserting into a Distributed table. +- Fixed parsing when inserting in RowBinary format if input data starts with’;’. +- Errors during runtime compilation of certain aggregate functions (e.g. `groupArray()`). + +### ClickHouse Release 1.1.54276, 2017-08-16 {#clickhouse-release-1-1-54276-2017-08-16} + +#### New Features: {#new-features-4} + +- Added an optional WITH section for a SELECT query. Example query: `WITH 1+1 AS a SELECT a, a*a` +- INSERT can be performed synchronously in a Distributed table: OK is returned only after all the data is saved on all the shards. This is activated by the setting insert_distributed_sync=1. +- Added the UUID data type for working with 16-byte identifiers. +- Added aliases of CHAR, FLOAT and other types for compatibility with the Tableau. +- Added the functions toYYYYMM, toYYYYMMDD, and toYYYYMMDDhhmmss for converting time into numbers. +- You can use IP addresses (together with the hostname) to identify servers for clustered DDL queries. +- Added support for non-constant arguments and negative offsets in the function `substring(str, pos, len).` +- Added the max_size parameter for the `groupArray(max_size)(column)` aggregate function, and optimized its performance. + +#### Main Changes: {#main-changes} + +- Security improvements: all server files are created with 0640 permissions (can be changed via `` config parameter). +- Improved error messages for queries with invalid syntax. +- Significantly reduced memory consumption and improved performance when merging large sections of MergeTree data. +- Significantly increased the performance of data merges for the ReplacingMergeTree engine. +- Improved performance for asynchronous inserts from a Distributed table by combining multiple source inserts. To enable this functionality, use the setting distributed_directory_monitor_batch_inserts=1. + +#### Backward Incompatible Changes: {#backward-incompatible-changes-1} + +- Changed the binary format of aggregate states of `groupArray(array_column)` functions for arrays. + +#### Complete List of Changes: {#complete-list-of-changes} + +- Added the `output_format_json_quote_denormals` setting, which enables outputting nan and inf values in JSON format. +- Optimized stream allocation when reading from a Distributed table. +- Settings can be configured in readonly mode if the value does not change. +- Added the ability to retrieve non-integer granules of the MergeTree engine in order to meet restrictions on the block size specified in the preferred_block_size_bytes setting. The purpose is to reduce the consumption of RAM and increase cache locality when processing queries from tables with large columns. +- Efficient use of indexes that contain expressions like `toStartOfHour(x)` for conditions like `toStartOfHour(x) op Ñonstexpr.` +- Added new settings for MergeTree engines (the merge_tree section in config.xml): + - replicated_deduplication_window_seconds sets the number of seconds allowed for deduplicating inserts in Replicated tables. + - cleanup_delay_period sets how often to start cleanup to remove outdated data. + - replicated_can_become_leader can prevent a replica from becoming the leader (and assigning merges). +- Accelerated cleanup to remove outdated data from ZooKeeper. +- Multiple improvements and fixes for clustered DDL queries. Of particular interest is the new setting distributed_ddl_task_timeout, which limits the time to wait for a response from the servers in the cluster. If a ddl request has not been performed on all hosts, a response will contain a timeout error and a request will be executed in an async mode. +- Improved display of stack traces in the server logs. +- Added the “none†value for the compression method. +- You can use multiple dictionaries_config sections in config.xml. +- It is possible to connect to MySQL through a socket in the file system. +- The system.parts table has a new column with information about the size of marks, in bytes. + +#### Bug Fixes: {#bug-fixes-4} + +- Distributed tables using a Merge table now work correctly for a SELECT query with a condition on the `_table` field. +- Fixed a rare race condition in ReplicatedMergeTree when checking data parts. +- Fixed possible freezing on “leader election†when starting a server. +- The max_replica_delay_for_distributed_queries setting was ignored when using a local replica of the data source. This has been fixed. +- Fixed incorrect behavior of `ALTER TABLE CLEAR COLUMN IN PARTITION` when attempting to clean a non-existing column. +- Fixed an exception in the multiIf function when using empty arrays or strings. +- Fixed excessive memory allocations when deserializing Native format. +- Fixed incorrect auto-update of Trie dictionaries. +- Fixed an exception when running queries with a GROUP BY clause from a Merge table when using SAMPLE. +- Fixed a crash of GROUP BY when using distributed_aggregation_memory_efficient=1. +- Now you can specify the database.table in the right side of IN and JOIN. +- Too many threads were used for parallel aggregation. This has been fixed. +- Fixed how the “if†function works with FixedString arguments. +- SELECT worked incorrectly from a Distributed table for shards with a weight of 0. This has been fixed. +- Running `CREATE VIEW IF EXISTS no longer causes crashes.` +- Fixed incorrect behavior when input_format_skip_unknown_fields=1 is set and there are negative numbers. +- Fixed an infinite loop in the `dictGetHierarchy()` function if there is some invalid data in the dictionary. +- Fixed `Syntax error: unexpected (...)` errors when running distributed queries with subqueries in an IN or JOIN clause and Merge tables. +- Fixed an incorrect interpretation of a SELECT query from Dictionary tables. +- Fixed the “Cannot mremap†error when using arrays in IN and JOIN clauses with more than 2 billion elements. +- Fixed the failover for dictionaries with MySQL as the source. + +#### Improved Workflow for Developing and Assembling ClickHouse: {#improved-workflow-for-developing-and-assembling-clickhouse-1} + +- Builds can be assembled in Arcadia. +- You can use gcc 7 to compile ClickHouse. +- Parallel builds using ccache+distcc are faster now. + +### ClickHouse Release 1.1.54245, 2017-07-04 {#clickhouse-release-1-1-54245-2017-07-04} + +#### New Features: {#new-features-5} + +- Distributed DDL (for example, `CREATE TABLE ON CLUSTER`) +- The replicated query `ALTER TABLE CLEAR COLUMN IN PARTITION.` +- The engine for Dictionary tables (access to dictionary data in the form of a table). +- Dictionary database engine (this type of database automatically has Dictionary tables available for all the connected external dictionaries). +- You can check for updates to the dictionary by sending a request to the source. +- Qualified column names +- Quoting identifiers using double quotation marks. +- Sessions in the HTTP interface. +- The OPTIMIZE query for a Replicated table can can run not only on the leader. + +#### Backward Incompatible Changes: {#backward-incompatible-changes-2} + +- Removed SET GLOBAL. + +#### Minor Changes: {#minor-changes} + +- Now after an alert is triggered, the log prints the full stack trace. +- Relaxed the verification of the number of damaged/extra data parts at startup (there were too many false positives). + +#### Bug Fixes: {#bug-fixes-5} + +- Fixed a bad connection “sticking†when inserting into a Distributed table. +- GLOBAL IN now works for a query from a Merge table that looks at a Distributed table. +- The incorrect number of cores was detected on a Google Compute Engine virtual machine. This has been fixed. +- Changes in how an executable source of cached external dictionaries works. +- Fixed the comparison of strings containing null characters. +- Fixed the comparison of Float32 primary key fields with constants. +- Previously, an incorrect estimate of the size of a field could lead to overly large allocations. +- Fixed a crash when querying a Nullable column added to a table using ALTER. +- Fixed a crash when sorting by a Nullable column, if the number of rows is less than LIMIT. +- Fixed an ORDER BY subquery consisting of only constant values. +- Previously, a Replicated table could remain in the invalid state after a failed DROP TABLE. +- Aliases for scalar subqueries with empty results are no longer lost. +- Now a query that used compilation does not fail with an error if the .so file gets damaged. diff --git a/docs/ja/whats-new/changelog/2018.md b/docs/ja/whats-new/changelog/2018.md new file mode 100644 index 00000000000..0761e4a1e4f --- /dev/null +++ b/docs/ja/whats-new/changelog/2018.md @@ -0,0 +1,1063 @@ +--- +slug: /ja/whats-new/changelog/2018 +sidebar_position: 16 +sidebar_label: '2018' +title: 2018 Changelog +--- + +## ClickHouse Release 18.16 {#clickhouse-release-18-16} + +### ClickHouse Release 18.16.1, 2018-12-21 {#clickhouse-release-18-16-1-2018-12-21} + +#### Bug Fixes: {#bug-fixes} + +- Fixed an error that led to problems with updating dictionaries with the ODBC source. [#3825](https://github.com/ClickHouse/ClickHouse/issues/3825), [#3829](https://github.com/ClickHouse/ClickHouse/issues/3829) +- JIT compilation of aggregate functions now works with LowCardinality columns. [#3838](https://github.com/ClickHouse/ClickHouse/issues/3838) + +#### Improvements: {#improvements} + +- Added the `low_cardinality_allow_in_native_format` setting (enabled by default). When disabled, LowCardinality columns will be converted to ordinary columns for SELECT queries and ordinary columns will be expected for INSERT queries. [#3879](https://github.com/ClickHouse/ClickHouse/pull/3879) + +#### Build Improvements: {#build-improvements} + +- Fixes for builds on macOS and ARM. + +### ClickHouse Release 18.16.0, 2018-12-14 {#clickhouse-release-18-16-0-2018-12-14} + +#### New Features: {#new-features} + +- `DEFAULT` expressions are evaluated for missing fields when loading data in semi-structured input formats (`JSONEachRow`, `TSKV`). The feature is enabled with the `insert_sample_with_metadata` setting. [#3555](https://github.com/ClickHouse/ClickHouse/pull/3555) +- The `ALTER TABLE` query now has the `MODIFY ORDER BY` action for changing the sorting key when adding or removing a table column. This is useful for tables in the `MergeTree` family that perform additional tasks when merging based on this sorting key, such as `SummingMergeTree`, `AggregatingMergeTree`, and so on. [#3581](https://github.com/ClickHouse/ClickHouse/pull/3581) [#3755](https://github.com/ClickHouse/ClickHouse/pull/3755) +- For tables in the `MergeTree` family, now you can specify a different sorting key (`ORDER BY`) and index (`PRIMARY KEY`). The sorting key can be longer than the index. [#3581](https://github.com/ClickHouse/ClickHouse/pull/3581) +- Added the `hdfs` table function and the `HDFS` table engine for importing and exporting data to HDFS. [chenxing-xc](https://github.com/ClickHouse/ClickHouse/pull/3617) +- Added functions for working with base64: `base64Encode`, `base64Decode`, `tryBase64Decode`. [Alexander Krasheninnikov](https://github.com/ClickHouse/ClickHouse/pull/3350) +- Now you can use a parameter to configure the precision of the `uniqCombined` aggregate function (select the number of HyperLogLog cells). [#3406](https://github.com/ClickHouse/ClickHouse/pull/3406) +- Added the `system.contributors` table that contains the names of everyone who made commits in ClickHouse. [#3452](https://github.com/ClickHouse/ClickHouse/pull/3452) +- Added the ability to omit the partition for the `ALTER TABLE ... FREEZE` query in order to back up all partitions at once. [#3514](https://github.com/ClickHouse/ClickHouse/pull/3514) +- Added `dictGet` and `dictGetOrDefault` functions that do not require specifying the type of return value. The type is determined automatically from the dictionary description. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/3564) +- Now you can specify comments for a column in the table description and change it using `ALTER`. [#3377](https://github.com/ClickHouse/ClickHouse/pull/3377) +- Reading is supported for `Join` type tables with simple keys. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/3728) +- Now you can specify the options `join_use_nulls`, `max_rows_in_join`, `max_bytes_in_join`, and `join_overflow_mode` when creating a `Join` type table. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/3728) +- Added the `joinGet` function that allows you to use a `Join` type table like a dictionary. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/3728) +- Added the `partition_key`, `sorting_key`, `primary_key`, and `sampling_key` columns to the `system.tables` table in order to provide information about table keys. [#3609](https://github.com/ClickHouse/ClickHouse/pull/3609) +- Added the `is_in_partition_key`, `is_in_sorting_key`, `is_in_primary_key`, and `is_in_sampling_key` columns to the `system.columns` table. [#3609](https://github.com/ClickHouse/ClickHouse/pull/3609) +- Added the `min_time` and `max_time` columns to the `system.parts` table. These columns are populated when the partitioning key is an expression consisting of `DateTime` columns. [Emmanuel Donin de Rosière](https://github.com/ClickHouse/ClickHouse/pull/3800) + +#### Bug Fixes: {#bug-fixes-1} + +- Fixes and performance improvements for the `LowCardinality` data type. `GROUP BY` using `LowCardinality(Nullable(...))`. Getting the values of `extremes`. Processing high-order functions. `LEFT ARRAY JOIN`. Distributed `GROUP BY`. Functions that return `Array`. Execution of `ORDER BY`. Writing to `Distributed` tables (nicelulu). Backward compatibility for `INSERT` queries from old clients that implement the `Native` protocol. Support for `LowCardinality` for `JOIN`. Improved performance when working in a single stream. [#3823](https://github.com/ClickHouse/ClickHouse/pull/3823) [#3803](https://github.com/ClickHouse/ClickHouse/pull/3803) [#3799](https://github.com/ClickHouse/ClickHouse/pull/3799) [#3769](https://github.com/ClickHouse/ClickHouse/pull/3769) [#3744](https://github.com/ClickHouse/ClickHouse/pull/3744) [#3681](https://github.com/ClickHouse/ClickHouse/pull/3681) [#3651](https://github.com/ClickHouse/ClickHouse/pull/3651) [#3649](https://github.com/ClickHouse/ClickHouse/pull/3649) [#3641](https://github.com/ClickHouse/ClickHouse/pull/3641) [#3632](https://github.com/ClickHouse/ClickHouse/pull/3632) [#3568](https://github.com/ClickHouse/ClickHouse/pull/3568) [#3523](https://github.com/ClickHouse/ClickHouse/pull/3523) [#3518](https://github.com/ClickHouse/ClickHouse/pull/3518) +- Fixed how the `select_sequential_consistency` option works. Previously, when this setting was enabled, an incomplete result was sometimes returned after beginning to write to a new partition. [#2863](https://github.com/ClickHouse/ClickHouse/pull/2863) +- Databases are correctly specified when executing DDL `ON CLUSTER` queries and `ALTER UPDATE/DELETE`. [#3772](https://github.com/ClickHouse/ClickHouse/pull/3772) [#3460](https://github.com/ClickHouse/ClickHouse/pull/3460) +- Databases are correctly specified for subqueries inside a VIEW. [#3521](https://github.com/ClickHouse/ClickHouse/pull/3521) +- Fixed a bug in `PREWHERE` with `FINAL` for `VersionedCollapsingMergeTree`. [7167bfd7](https://github.com/ClickHouse/ClickHouse/commit/7167bfd7b365538f7a91c4307ad77e552ab4e8c1) +- Now you can use `KILL QUERY` to cancel queries that have not started yet because they are waiting for the table to be locked. [#3517](https://github.com/ClickHouse/ClickHouse/pull/3517) +- Corrected date and time calculations if the clocks were moved back at midnight (this happens in Iran, and happened in Moscow from 1981 to 1983). Previously, this led to the time being reset a day earlier than necessary, and also caused incorrect formatting of the date and time in text format. [#3819](https://github.com/ClickHouse/ClickHouse/pull/3819) +- Fixed bugs in some cases of `VIEW` and subqueries that omit the database. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/3521) +- Fixed a race condition when simultaneously reading from a `MATERIALIZED VIEW` and deleting a `MATERIALIZED VIEW` due to not locking the internal `MATERIALIZED VIEW`. [#3404](https://github.com/ClickHouse/ClickHouse/pull/3404) [#3694](https://github.com/ClickHouse/ClickHouse/pull/3694) +- Fixed the error `Lock handler cannot be nullptr.` [#3689](https://github.com/ClickHouse/ClickHouse/pull/3689) +- Fixed query processing when the `compile_expressions` option is enabled (it’s enabled by default). Nondeterministic constant expressions like the `now` function are no longer unfolded. [#3457](https://github.com/ClickHouse/ClickHouse/pull/3457) +- Fixed a crash when specifying a non-constant scale argument in `toDecimal32/64/128` functions. +- Fixed an error when trying to insert an array with `NULL` elements in the `Values` format into a column of type `Array` without `Nullable` (if `input_format_values_interpret_expressions` = 1). [#3487](https://github.com/ClickHouse/ClickHouse/pull/3487) [#3503](https://github.com/ClickHouse/ClickHouse/pull/3503) +- Fixed continuous error logging in `DDLWorker` if ZooKeeper is not available. [8f50c620](https://github.com/ClickHouse/ClickHouse/commit/8f50c620334988b28018213ec0092fe6423847e2) +- Fixed the return type for `quantile*` functions from `Date` and `DateTime` types of arguments. [#3580](https://github.com/ClickHouse/ClickHouse/pull/3580) +- Fixed the `WITH` clause if it specifies a simple alias without expressions. [#3570](https://github.com/ClickHouse/ClickHouse/pull/3570) +- Fixed processing of queries with named sub-queries and qualified column names when `enable_optimize_predicate_expression` is enabled. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/3588) +- Fixed the error `Attempt to attach to nullptr thread group` when working with materialized views. [Marek VavruÅ¡a](https://github.com/ClickHouse/ClickHouse/pull/3623) +- Fixed a crash when passing certain incorrect arguments to the `arrayReverse` function. [73e3a7b6](https://github.com/ClickHouse/ClickHouse/commit/73e3a7b662161d6005e7727d8a711b930386b871) +- Fixed the buffer overflow in the `extractURLParameter` function. Improved performance. Added correct processing of strings containing zero bytes. [141e9799](https://github.com/ClickHouse/ClickHouse/commit/141e9799e49201d84ea8e951d1bed4fb6d3dacb5) +- Fixed buffer overflow in the `lowerUTF8` and `upperUTF8` functions. Removed the ability to execute these functions over `FixedString` type arguments. [#3662](https://github.com/ClickHouse/ClickHouse/pull/3662) +- Fixed a rare race condition when deleting `MergeTree` tables. [#3680](https://github.com/ClickHouse/ClickHouse/pull/3680) +- Fixed a race condition when reading from `Buffer` tables and simultaneously performing `ALTER` or `DROP` on the target tables. [#3719](https://github.com/ClickHouse/ClickHouse/pull/3719) +- Fixed a segfault if the `max_temporary_non_const_columns` limit was exceeded. [#3788](https://github.com/ClickHouse/ClickHouse/pull/3788) + +#### Improvements: {#improvements-1} + +- The server does not write the processed configuration files to the `/etc/clickhouse-server/` directory. Instead, it saves them in the `preprocessed_configs` directory inside `path`. This means that the `/etc/clickhouse-server/` directory does not have write access for the `clickhouse` user, which improves security. [#2443](https://github.com/ClickHouse/ClickHouse/pull/2443) +- The `min_merge_bytes_to_use_direct_io` option is set to 10 GiB by default. A merge that forms large parts of tables from the MergeTree family will be performed in `O_DIRECT` mode, which prevents excessive page cache eviction. [#3504](https://github.com/ClickHouse/ClickHouse/pull/3504) +- Accelerated server start when there is a very large number of tables. [#3398](https://github.com/ClickHouse/ClickHouse/pull/3398) +- Added a connection pool and HTTP `Keep-Alive` for connections between replicas. [#3594](https://github.com/ClickHouse/ClickHouse/pull/3594) +- If the query syntax is invalid, the `400 Bad Request` code is returned in the `HTTP` interface (500 was returned previously). [31bc680a](https://github.com/ClickHouse/ClickHouse/commit/31bc680ac5f4bb1d0360a8ba4696fa84bb47d6ab) +- The `join_default_strictness` option is set to `ALL` by default for compatibility. [120e2cbe](https://github.com/ClickHouse/ClickHouse/commit/120e2cbe2ff4fbad626c28042d9b28781c805afe) +- Removed logging to `stderr` from the `re2` library for invalid or complex regular expressions. [#3723](https://github.com/ClickHouse/ClickHouse/pull/3723) +- Added for the `Kafka` table engine: checks for subscriptions before beginning to read from Kafka; the kafka_max_block_size setting for the table. [Marek VavruÅ¡a](https://github.com/ClickHouse/ClickHouse/pull/3396) +- The `cityHash64`, `farmHash64`, `metroHash64`, `sipHash64`, `halfMD5`, `murmurHash2_32`, `murmurHash2_64`, `murmurHash3_32`, and `murmurHash3_64` functions now work for any number of arguments and for arguments in the form of tuples. [#3451](https://github.com/ClickHouse/ClickHouse/pull/3451) [#3519](https://github.com/ClickHouse/ClickHouse/pull/3519) +- The `arrayReverse` function now works with any types of arrays. [73e3a7b6](https://github.com/ClickHouse/ClickHouse/commit/73e3a7b662161d6005e7727d8a711b930386b871) +- Added an optional parameter: the slot size for the `timeSlots` function. [Kirill Shvakov](https://github.com/ClickHouse/ClickHouse/pull/3724) +- For `FULL` and `RIGHT JOIN`, the `max_block_size` setting is used for a stream of non-joined data from the right table. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/3699) +- Added the `--secure` command line parameter in `clickhouse-benchmark` and `clickhouse-performance-test` to enable TLS. [#3688](https://github.com/ClickHouse/ClickHouse/pull/3688) [#3690](https://github.com/ClickHouse/ClickHouse/pull/3690) +- Type conversion when the structure of a `Buffer` type table does not match the structure of the destination table. [Vitaly Baranov](https://github.com/ClickHouse/ClickHouse/pull/3603) +- Added the `tcp_keep_alive_timeout` option to enable keep-alive packets after inactivity for the specified time interval. [#3441](https://github.com/ClickHouse/ClickHouse/pull/3441) +- Removed unnecessary quoting of values for the partition key in the `system.parts` table if it consists of a single column. [#3652](https://github.com/ClickHouse/ClickHouse/pull/3652) +- The modulo function works for `Date` and `DateTime` data types. [#3385](https://github.com/ClickHouse/ClickHouse/pull/3385) +- Added synonyms for the `POWER`, `LN`, `LCASE`, `UCASE`, `REPLACE`, `LOCATE`, `SUBSTR`, and `MID` functions. [#3774](https://github.com/ClickHouse/ClickHouse/pull/3774) [#3763](https://github.com/ClickHouse/ClickHouse/pull/3763) Some function names are case-insensitive for compatibility with the SQL standard. Added syntactic sugar `SUBSTRING(expr FROM start FOR length)` for compatibility with SQL. [#3804](https://github.com/ClickHouse/ClickHouse/pull/3804) +- Added the ability to `mlock` memory pages corresponding to `clickhouse-server` executable code to prevent it from being forced out of memory. This feature is disabled by default. [#3553](https://github.com/ClickHouse/ClickHouse/pull/3553) +- Improved performance when reading from `O_DIRECT` (with the `min_bytes_to_use_direct_io` option enabled). [#3405](https://github.com/ClickHouse/ClickHouse/pull/3405) +- Improved performance of the `dictGet...OrDefault` function for a constant key argument and a non-constant default argument. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/3563) +- The `firstSignificantSubdomain` function now processes the domains `gov`, `mil`, and `edu`. [Igor Hatarist](https://github.com/ClickHouse/ClickHouse/pull/3601) Improved performance. [#3628](https://github.com/ClickHouse/ClickHouse/pull/3628) +- Ability to specify custom environment variables for starting `clickhouse-server` using the `SYS-V init.d` script by defining `CLICKHOUSE_PROGRAM_ENV` in `/etc/default/clickhouse`. + [Pavlo Bashynskyi](https://github.com/ClickHouse/ClickHouse/pull/3612) +- Correct return code for the clickhouse-server init script. [#3516](https://github.com/ClickHouse/ClickHouse/pull/3516) +- The `system.metrics` table now has the `VersionInteger` metric, and `system.build_options` has the added line `VERSION_INTEGER`, which contains the numeric form of the ClickHouse version, such as `18016000`. [#3644](https://github.com/ClickHouse/ClickHouse/pull/3644) +- Removed the ability to compare the `Date` type with a number to avoid potential errors like `date = 2018-12-17`, where quotes around the date are omitted by mistake. [#3687](https://github.com/ClickHouse/ClickHouse/pull/3687) +- Fixed the behavior of stateful functions like `rowNumberInAllBlocks`. They previously output a result that was one number larger due to starting during query analysis. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/3729) +- If the `force_restore_data` file can’t be deleted, an error message is displayed. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/3794) + +#### Build Improvements: {#build-improvements-1} + +- Updated the `jemalloc` library, which fixes a potential memory leak. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/3557) +- Profiling with `jemalloc` is enabled by default in order to debug builds. [2cc82f5c](https://github.com/ClickHouse/ClickHouse/commit/2cc82f5cbe266421cd4c1165286c2c47e5ffcb15) +- Added the ability to run integration tests when only `Docker` is installed on the system. [#3650](https://github.com/ClickHouse/ClickHouse/pull/3650) +- Added the fuzz expression test in SELECT queries. [#3442](https://github.com/ClickHouse/ClickHouse/pull/3442) +- Added a stress test for commits, which performs functional tests in parallel and in random order to detect more race conditions. [#3438](https://github.com/ClickHouse/ClickHouse/pull/3438) +- Improved the method for starting clickhouse-server in a Docker image. [Elghazal Ahmed](https://github.com/ClickHouse/ClickHouse/pull/3663) +- For a Docker image, added support for initializing databases using files in the `/docker-entrypoint-initdb.d` directory. [Konstantin Lebedev](https://github.com/ClickHouse/ClickHouse/pull/3695) +- Fixes for builds on ARM. [#3709](https://github.com/ClickHouse/ClickHouse/pull/3709) + +#### Backward Incompatible Changes: {#backward-incompatible-changes} + +- Removed the ability to compare the `Date` type with a number. Instead of `toDate('2018-12-18') = 17883`, you must use explicit type conversion `= toDate(17883)` [#3687](https://github.com/ClickHouse/ClickHouse/pull/3687) + +## ClickHouse Release 18.14 {#clickhouse-release-18-14} + +### ClickHouse Release 18.14.19, 2018-12-19 {#clickhouse-release-18-14-19-2018-12-19} + +#### Bug Fixes: {#bug-fixes-2} + +- Fixed an error that led to problems with updating dictionaries with the ODBC source. [#3825](https://github.com/ClickHouse/ClickHouse/issues/3825), [#3829](https://github.com/ClickHouse/ClickHouse/issues/3829) +- Databases are correctly specified when executing DDL `ON CLUSTER` queries. [#3460](https://github.com/ClickHouse/ClickHouse/pull/3460) +- Fixed a segfault if the `max_temporary_non_const_columns` limit was exceeded. [#3788](https://github.com/ClickHouse/ClickHouse/pull/3788) + +#### Build Improvements: {#build-improvements-2} + +- Fixes for builds on ARM. + +### ClickHouse Release 18.14.18, 2018-12-04 {#clickhouse-release-18-14-18-2018-12-04} + +#### Bug Fixes: {#bug-fixes-3} + +- Fixed error in `dictGet...` function for dictionaries of type `range`, if one of the arguments is constant and other is not. [#3751](https://github.com/ClickHouse/ClickHouse/pull/3751) +- Fixed error that caused messages `netlink: '...': attribute type 1 has an invalid length` to be printed in Linux kernel log, that was happening only on fresh enough versions of Linux kernel. [#3749](https://github.com/ClickHouse/ClickHouse/pull/3749) +- Fixed segfault in function `empty` for argument of `FixedString` type. [Daniel, Dao Quang Minh](https://github.com/ClickHouse/ClickHouse/pull/3703) +- Fixed excessive memory allocation when using large value of `max_query_size` setting (a memory chunk of `max_query_size` bytes was preallocated at once). [#3720](https://github.com/ClickHouse/ClickHouse/pull/3720) + +#### Build Changes: {#build-changes} + +- Fixed build with LLVM/Clang libraries of version 7 from the OS packages (these libraries are used for runtime query compilation). [#3582](https://github.com/ClickHouse/ClickHouse/pull/3582) + +### ClickHouse Release 18.14.17, 2018-11-30 {#clickhouse-release-18-14-17-2018-11-30} + +#### Bug Fixes: {#bug-fixes-4} + +- Fixed cases when the ODBC bridge process did not terminate with the main server process. [#3642](https://github.com/ClickHouse/ClickHouse/pull/3642) +- Fixed synchronous insertion into the `Distributed` table with a columns list that differs from the column list of the remote table. [#3673](https://github.com/ClickHouse/ClickHouse/pull/3673) +- Fixed a rare race condition that can lead to a crash when dropping a MergeTree table. [#3643](https://github.com/ClickHouse/ClickHouse/pull/3643) +- Fixed a query deadlock in case when query thread creation fails with the `Resource temporarily unavailable` error. [#3643](https://github.com/ClickHouse/ClickHouse/pull/3643) +- Fixed parsing of the `ENGINE` clause when the `CREATE AS table` syntax was used and the `ENGINE` clause was specified before the `AS table` (the error resulted in ignoring the specified engine). [#3692](https://github.com/ClickHouse/ClickHouse/pull/3692) + +### ClickHouse Release 18.14.15, 2018-11-21 {#clickhouse-release-18-14-15-2018-11-21} + +#### Bug Fixes: {#bug-fixes-5} + +- The size of memory chunk was overestimated while deserializing the column of type `Array(String)` that leads to “Memory limit exceeded†errors. The issue appeared in version 18.12.13. [#3589](https://github.com/ClickHouse/ClickHouse/issues/3589) + +### ClickHouse Release 18.14.14, 2018-11-20 {#clickhouse-release-18-14-14-2018-11-20} + +#### Bug Fixes: {#bug-fixes-6} + +- Fixed `ON CLUSTER` queries when cluster configured as secure (flag ``). [#3599](https://github.com/ClickHouse/ClickHouse/pull/3599) + +#### Build Changes: {#build-changes-1} + +- Fixed problems (llvm-7 from system, macos) [#3582](https://github.com/ClickHouse/ClickHouse/pull/3582) + +### ClickHouse Release 18.14.13, 2018-11-08 {#clickhouse-release-18-14-13-2018-11-08} + +#### Bug Fixes: {#bug-fixes-7} + +- Fixed the `Block structure mismatch in MergingSorted stream` error. [#3162](https://github.com/ClickHouse/ClickHouse/issues/3162) +- Fixed `ON CLUSTER` queries in case when secure connections were turned on in the cluster config (the `` flag). [#3465](https://github.com/ClickHouse/ClickHouse/pull/3465) +- Fixed an error in queries that used `SAMPLE`, `PREWHERE` and alias columns. [#3543](https://github.com/ClickHouse/ClickHouse/pull/3543) +- Fixed a rare `unknown compression method` error when the `min_bytes_to_use_direct_io` setting was enabled. [3544](https://github.com/ClickHouse/ClickHouse/pull/3544) + +#### Performance Improvements: {#performance-improvements} + +- Fixed performance regression of queries with `GROUP BY` of columns of UInt16 or Date type when executing on AMD EPYC processors. [Igor Lapko](https://github.com/ClickHouse/ClickHouse/pull/3512) +- Fixed performance regression of queries that process long strings. [#3530](https://github.com/ClickHouse/ClickHouse/pull/3530) + +#### Build Improvements: {#build-improvements-3} + +- Improvements for simplifying the Arcadia build. [#3475](https://github.com/ClickHouse/ClickHouse/pull/3475), [#3535](https://github.com/ClickHouse/ClickHouse/pull/3535) + +### ClickHouse Release 18.14.12, 2018-11-02 {#clickhouse-release-18-14-12-2018-11-02} + +#### Bug Fixes: {#bug-fixes-8} + +- Fixed a crash on joining two unnamed subqueries. [#3505](https://github.com/ClickHouse/ClickHouse/pull/3505) +- Fixed generating incorrect queries (with an empty `WHERE` clause) when querying external databases. [hotid](https://github.com/ClickHouse/ClickHouse/pull/3477) +- Fixed using an incorrect timeout value in ODBC dictionaries. [Marek VavruÅ¡a](https://github.com/ClickHouse/ClickHouse/pull/3511) + +### ClickHouse Release 18.14.11, 2018-10-29 {#clickhouse-release-18-14-11-2018-10-29} + +#### Bug Fixes: {#bug-fixes-9} + +- Fixed the error `Block structure mismatch in UNION stream: different number of columns` in LIMIT queries. [#2156](https://github.com/ClickHouse/ClickHouse/issues/2156) +- Fixed errors when merging data in tables containing arrays inside Nested structures. [#3397](https://github.com/ClickHouse/ClickHouse/pull/3397) +- Fixed incorrect query results if the `merge_tree_uniform_read_distribution` setting is disabled (it is enabled by default). [#3429](https://github.com/ClickHouse/ClickHouse/pull/3429) +- Fixed an error on inserts to a Distributed table in Native format. [#3411](https://github.com/ClickHouse/ClickHouse/issues/3411) + +### ClickHouse Release 18.14.10, 2018-10-23 {#clickhouse-release-18-14-10-2018-10-23} + +- The `compile_expressions` setting (JIT compilation of expressions) is disabled by default. [#3410](https://github.com/ClickHouse/ClickHouse/pull/3410) +- The `enable_optimize_predicate_expression` setting is disabled by default. + +### ClickHouse Release 18.14.9, 2018-10-16 {#clickhouse-release-18-14-9-2018-10-16} + +#### New Features: {#new-features-1} + +- The `WITH CUBE` modifier for `GROUP BY` (the alternative syntax `GROUP BY CUBE(...)` is also available). [#3172](https://github.com/ClickHouse/ClickHouse/pull/3172) +- Added the `formatDateTime` function. [Alexandr Krasheninnikov](https://github.com/ClickHouse/ClickHouse/pull/2770) +- Added the `JDBC` table engine and `jdbc` table function (requires installing clickhouse-jdbc-bridge). [Alexandr Krasheninnikov](https://github.com/ClickHouse/ClickHouse/pull/3210) +- Added functions for working with the ISO week number: `toISOWeek`, `toISOYear`, `toStartOfISOYear`, and `toDayOfYear`. [#3146](https://github.com/ClickHouse/ClickHouse/pull/3146) +- Now you can use `Nullable` columns for `MySQL` and `ODBC` tables. [#3362](https://github.com/ClickHouse/ClickHouse/pull/3362) +- Nested data structures can be read as nested objects in `JSONEachRow` format. Added the `input_format_import_nested_json` setting. [Veloman Yunkan](https://github.com/ClickHouse/ClickHouse/pull/3144) +- Parallel processing is available for many `MATERIALIZED VIEW`s when inserting data. See the `parallel_view_processing` setting. [Marek VavruÅ¡a](https://github.com/ClickHouse/ClickHouse/pull/3208) +- Added the `SYSTEM FLUSH LOGS` query (forced log flushes to system tables such as `query_log`) [#3321](https://github.com/ClickHouse/ClickHouse/pull/3321) +- Now you can use pre-defined `database` and `table` macros when declaring `Replicated` tables. [#3251](https://github.com/ClickHouse/ClickHouse/pull/3251) +- Added the ability to read `Decimal` type values in engineering notation (indicating powers of ten). [#3153](https://github.com/ClickHouse/ClickHouse/pull/3153) + +#### Experimental Features: {#experimental-features} + +- Optimization of the GROUP BY clause for `LowCardinality data types.` [#3138](https://github.com/ClickHouse/ClickHouse/pull/3138) +- Optimized calculation of expressions for `LowCardinality data types.` [#3200](https://github.com/ClickHouse/ClickHouse/pull/3200) + +#### Improvements: {#improvements-2} + +- Significantly reduced memory consumption for queries with `ORDER BY` and `LIMIT`. See the `max_bytes_before_remerge_sort` setting. [#3205](https://github.com/ClickHouse/ClickHouse/pull/3205) +- In the absence of `JOIN` (`LEFT`, `INNER`, …), `INNER JOIN` is assumed. [#3147](https://github.com/ClickHouse/ClickHouse/pull/3147) +- Qualified asterisks work correctly in queries with `JOIN`. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/3202) +- The `ODBC` table engine correctly chooses the method for quoting identifiers in the SQL dialect of a remote database. [Alexandr Krasheninnikov](https://github.com/ClickHouse/ClickHouse/pull/3210) +- The `compile_expressions` setting (JIT compilation of expressions) is enabled by default. +- Fixed behavior for simultaneous DROP DATABASE/TABLE IF EXISTS and CREATE DATABASE/TABLE IF NOT EXISTS. Previously, a `CREATE DATABASE ... IF NOT EXISTS` query could return the error message “File … already existsâ€, and the `CREATE TABLE ... IF NOT EXISTS` and `DROP TABLE IF EXISTS` queries could return `Table ... is creating or attaching right now`. [#3101](https://github.com/ClickHouse/ClickHouse/pull/3101) +- LIKE and IN expressions with a constant right half are passed to the remote server when querying from MySQL or ODBC tables. [#3182](https://github.com/ClickHouse/ClickHouse/pull/3182) +- Comparisons with constant expressions in a WHERE clause are passed to the remote server when querying from MySQL and ODBC tables. Previously, only comparisons with constants were passed. [#3182](https://github.com/ClickHouse/ClickHouse/pull/3182) +- Correct calculation of row width in the terminal for `Pretty` formats, including strings with hieroglyphs. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/3257). +- `ON CLUSTER` can be specified for `ALTER UPDATE` queries. +- Improved performance for reading data in `JSONEachRow` format. [#3332](https://github.com/ClickHouse/ClickHouse/pull/3332) +- Added synonyms for the `LENGTH` and `CHARACTER_LENGTH` functions for compatibility. The `CONCAT` function is no longer case-sensitive. [#3306](https://github.com/ClickHouse/ClickHouse/pull/3306) +- Added the `TIMESTAMP` synonym for the `DateTime` type. [#3390](https://github.com/ClickHouse/ClickHouse/pull/3390) +- There is always space reserved for query_id in the server logs, even if the log line is not related to a query. This makes it easier to parse server text logs with third-party tools. +- Memory consumption by a query is logged when it exceeds the next level of an integer number of gigabytes. [#3205](https://github.com/ClickHouse/ClickHouse/pull/3205) +- Added compatibility mode for the case when the client library that uses the Native protocol sends fewer columns by mistake than the server expects for the INSERT query. This scenario was possible when using the clickhouse-cpp library. Previously, this scenario caused the server to crash. [#3171](https://github.com/ClickHouse/ClickHouse/pull/3171) +- In a user-defined WHERE expression in `clickhouse-copier`, you can now use a `partition_key` alias (for additional filtering by source table partition). This is useful if the partitioning scheme changes during copying, but only changes slightly. [#3166](https://github.com/ClickHouse/ClickHouse/pull/3166) +- The workflow of the `Kafka` engine has been moved to a background thread pool in order to automatically reduce the speed of data reading at high loads. [Marek VavruÅ¡a](https://github.com/ClickHouse/ClickHouse/pull/3215). +- Support for reading `Tuple` and `Nested` values of structures like `struct` in the `Cap'n'Proto format`. [Marek VavruÅ¡a](https://github.com/ClickHouse/ClickHouse/pull/3216) +- The list of top-level domains for the `firstSignificantSubdomain` function now includes the domain `biz`. [decaseal](https://github.com/ClickHouse/ClickHouse/pull/3219) +- In the configuration of external dictionaries, `null_value` is interpreted as the value of the default data type. [#3330](https://github.com/ClickHouse/ClickHouse/pull/3330) +- Support for the `intDiv` and `intDivOrZero` functions for `Decimal`. [b48402e8](https://github.com/ClickHouse/ClickHouse/commit/b48402e8712e2b9b151e0eef8193811d433a1264) +- Support for the `Date`, `DateTime`, `UUID`, and `Decimal` types as a key for the `sumMap` aggregate function. [#3281](https://github.com/ClickHouse/ClickHouse/pull/3281) +- Support for the `Decimal` data type in external dictionaries. [#3324](https://github.com/ClickHouse/ClickHouse/pull/3324) +- Support for the `Decimal` data type in `SummingMergeTree` tables. [#3348](https://github.com/ClickHouse/ClickHouse/pull/3348) +- Added specializations for `UUID` in `if`. [#3366](https://github.com/ClickHouse/ClickHouse/pull/3366) +- Reduced the number of `open` and `close` system calls when reading from a `MergeTree table`. [#3283](https://github.com/ClickHouse/ClickHouse/pull/3283) +- A `TRUNCATE TABLE` query can be executed on any replica (the query is passed to the leader replica). [Kirill Shvakov](https://github.com/ClickHouse/ClickHouse/pull/3375) + +#### Bug Fixes: {#bug-fixes-10} + +- Fixed an issue with `Dictionary` tables for `range_hashed` dictionaries. This error occurred in version 18.12.17. [#1702](https://github.com/ClickHouse/ClickHouse/pull/1702) +- Fixed an error when loading `range_hashed` dictionaries (the message `Unsupported type Nullable (...)`). This error occurred in version 18.12.17. [#3362](https://github.com/ClickHouse/ClickHouse/pull/3362) +- Fixed errors in the `pointInPolygon` function due to the accumulation of inaccurate calculations for polygons with a large number of vertices located close to each other. [#3331](https://github.com/ClickHouse/ClickHouse/pull/3331) [#3341](https://github.com/ClickHouse/ClickHouse/pull/3341) +- If after merging data parts, the checksum for the resulting part differs from the result of the same merge in another replica, the result of the merge is deleted and the data part is downloaded from the other replica (this is the correct behavior). But after downloading the data part, it couldn’t be added to the working set because of an error that the part already exists (because the data part was deleted with some delay after the merge). This led to cyclical attempts to download the same data. [#3194](https://github.com/ClickHouse/ClickHouse/pull/3194) +- Fixed incorrect calculation of total memory consumption by queries (because of incorrect calculation, the `max_memory_usage_for_all_queries` setting worked incorrectly and the `MemoryTracking` metric had an incorrect value). This error occurred in version 18.12.13. [Marek VavruÅ¡a](https://github.com/ClickHouse/ClickHouse/pull/3344) +- Fixed the functionality of `CREATE TABLE ... ON CLUSTER ... AS SELECT ...` This error occurred in version 18.12.13. [#3247](https://github.com/ClickHouse/ClickHouse/pull/3247) +- Fixed unnecessary preparation of data structures for `JOIN`s on the server that initiates the query if the `JOIN` is only performed on remote servers. [#3340](https://github.com/ClickHouse/ClickHouse/pull/3340) +- Fixed bugs in the `Kafka` engine: deadlocks after exceptions when starting to read data, and locks upon completion [Marek VavruÅ¡a](https://github.com/ClickHouse/ClickHouse/pull/3215). +- For `Kafka` tables, the optional `schema` parameter was not passed (the schema of the `Cap'n'Proto` format). [Vojtech Splichal](https://github.com/ClickHouse/ClickHouse/pull/3150) +- If the ensemble of ZooKeeper servers has servers that accept the connection but then immediately close it instead of responding to the handshake, ClickHouse chooses to connect another server. Previously, this produced the error `Cannot read all data. Bytes read: 0. Bytes expected: 4.` and the server couldn’t start. [8218cf3a](https://github.com/ClickHouse/ClickHouse/commit/8218cf3a5f39a43401953769d6d12a0bb8d29da9) +- If the ensemble of ZooKeeper servers contains servers for which the DNS query returns an error, these servers are ignored. [17b8e209](https://github.com/ClickHouse/ClickHouse/commit/17b8e209221061325ad7ba0539f03c6e65f87f29) +- Fixed type conversion between `Date` and `DateTime` when inserting data in the `VALUES` format (if `input_format_values_interpret_expressions = 1`). Previously, the conversion was performed between the numerical value of the number of days in Unix Epoch time and the Unix timestamp, which led to unexpected results. [#3229](https://github.com/ClickHouse/ClickHouse/pull/3229) +- Corrected type conversion between `Decimal` and integer numbers. [#3211](https://github.com/ClickHouse/ClickHouse/pull/3211) +- Fixed errors in the `enable_optimize_predicate_expression` setting. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/3231) +- Fixed a parsing error in CSV format with floating-point numbers if a non-default CSV separator is used, such as `;` [#3155](https://github.com/ClickHouse/ClickHouse/pull/3155) +- Fixed the `arrayCumSumNonNegative` function (it does not accumulate negative values if the accumulator is less than zero). [Aleksey Studnev](https://github.com/ClickHouse/ClickHouse/pull/3163) +- Fixed how `Merge` tables work on top of `Distributed` tables when using `PREWHERE`. [#3165](https://github.com/ClickHouse/ClickHouse/pull/3165) +- Bug fixes in the `ALTER UPDATE` query. +- Fixed bugs in the `odbc` table function that appeared in version 18.12. [#3197](https://github.com/ClickHouse/ClickHouse/pull/3197) +- Fixed the operation of aggregate functions with `StateArray` combinators. [#3188](https://github.com/ClickHouse/ClickHouse/pull/3188) +- Fixed a crash when dividing a `Decimal` value by zero. [69dd6609](https://github.com/ClickHouse/ClickHouse/commit/69dd6609193beb4e7acd3e6ad216eca0ccfb8179) +- Fixed output of types for operations using `Decimal` and integer arguments. [#3224](https://github.com/ClickHouse/ClickHouse/pull/3224) +- Fixed the segfault during `GROUP BY` on `Decimal128`. [3359ba06](https://github.com/ClickHouse/ClickHouse/commit/3359ba06c39fcd05bfdb87d6c64154819621e13a) +- The `log_query_threads` setting (logging information about each thread of query execution) now takes effect only if the `log_queries` option (logging information about queries) is set to 1. Since the `log_query_threads` option is enabled by default, information about threads was previously logged even if query logging was disabled. [#3241](https://github.com/ClickHouse/ClickHouse/pull/3241) +- Fixed an error in the distributed operation of the quantiles aggregate function (the error message `Not found column quantile...`). [292a8855](https://github.com/ClickHouse/ClickHouse/commit/292a885533b8e3b41ce8993867069d14cbd5a664) +- Fixed the compatibility problem when working on a cluster of version 18.12.17 servers and older servers at the same time. For distributed queries with GROUP BY keys of both fixed and non-fixed length, if there was a large amount of data to aggregate, the returned data was not always fully aggregated (two different rows contained the same aggregation keys). [#3254](https://github.com/ClickHouse/ClickHouse/pull/3254) +- Fixed handling of substitutions in `clickhouse-performance-test`, if the query contains only part of the substitutions declared in the test. [#3263](https://github.com/ClickHouse/ClickHouse/pull/3263) +- Fixed an error when using `FINAL` with `PREWHERE`. [#3298](https://github.com/ClickHouse/ClickHouse/pull/3298) +- Fixed an error when using `PREWHERE` over columns that were added during `ALTER`. [#3298](https://github.com/ClickHouse/ClickHouse/pull/3298) +- Added a check for the absence of `arrayJoin` for `DEFAULT` and `MATERIALIZED` expressions. Previously, `arrayJoin` led to an error when inserting data. [#3337](https://github.com/ClickHouse/ClickHouse/pull/3337) +- Added a check for the absence of `arrayJoin` in a `PREWHERE` clause. Previously, this led to messages like `Size ... does not match` or `Unknown compression method` when executing queries. [#3357](https://github.com/ClickHouse/ClickHouse/pull/3357) +- Fixed segfault that could occur in rare cases after optimization that replaced AND chains from equality evaluations with the corresponding IN expression. [liuyimin-bytedance](https://github.com/ClickHouse/ClickHouse/pull/3339) +- Minor corrections to `clickhouse-benchmark`: previously, client information was not sent to the server; now the number of queries executed is calculated more accurately when shutting down and for limiting the number of iterations. [#3351](https://github.com/ClickHouse/ClickHouse/pull/3351) [#3352](https://github.com/ClickHouse/ClickHouse/pull/3352) + +#### Backward Incompatible Changes: {#backward-incompatible-changes-1} + +- Removed the `allow_experimental_decimal_type` option. The `Decimal` data type is available for default use. [#3329](https://github.com/ClickHouse/ClickHouse/pull/3329) + +## ClickHouse Release 18.12 {#clickhouse-release-18-12} + +### ClickHouse Release 18.12.17, 2018-09-16 {#clickhouse-release-18-12-17-2018-09-16} + +#### New Features: {#new-features-2} + +- `invalidate_query` (the ability to specify a query to check whether an external dictionary needs to be updated) is implemented for the `clickhouse` source. [#3126](https://github.com/ClickHouse/ClickHouse/pull/3126) +- Added the ability to use `UInt*`, `Int*`, and `DateTime` data types (along with the `Date` type) as a `range_hashed` external dictionary key that defines the boundaries of ranges. Now `NULL` can be used to designate an open range. [Vasily Nemkov](https://github.com/ClickHouse/ClickHouse/pull/3123) +- The `Decimal` type now supports `var*` and `stddev*` aggregate functions. [#3129](https://github.com/ClickHouse/ClickHouse/pull/3129) +- The `Decimal` type now supports mathematical functions (`exp`, `sin` and so on.) [#3129](https://github.com/ClickHouse/ClickHouse/pull/3129) +- The `system.part_log` table now has the `partition_id` column. [#3089](https://github.com/ClickHouse/ClickHouse/pull/3089) + +#### Bug Fixes: {#bug-fixes-11} + +- `Merge` now works correctly on `Distributed` tables. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/3159) +- Fixed incompatibility (unnecessary dependency on the `glibc` version) that made it impossible to run ClickHouse on `Ubuntu Precise` and older versions. The incompatibility arose in version 18.12.13. [#3130](https://github.com/ClickHouse/ClickHouse/pull/3130) +- Fixed errors in the `enable_optimize_predicate_expression` setting. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/3107) +- Fixed a minor issue with backwards compatibility that appeared when working with a cluster of replicas on versions earlier than 18.12.13 and simultaneously creating a new replica of a table on a server with a newer version (shown in the message `Can not clone replica, because the ... updated to new ClickHouse version`, which is logical, but shouldn’t happen). [#3122](https://github.com/ClickHouse/ClickHouse/pull/3122) + +#### Backward Incompatible Changes: {#backward-incompatible-changes-2} + +- The `enable_optimize_predicate_expression` option is enabled by default (which is rather optimistic). If query analysis errors occur that are related to searching for the column names, set `enable_optimize_predicate_expression` to 0. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/3107) + +### ClickHouse Release 18.12.14, 2018-09-13 {#clickhouse-release-18-12-14-2018-09-13} + +#### New Features: {#new-features-3} + +- Added support for `ALTER UPDATE` queries. [#3035](https://github.com/ClickHouse/ClickHouse/pull/3035) +- Added the `allow_ddl` option, which restricts the user’s access to DDL queries. [#3104](https://github.com/ClickHouse/ClickHouse/pull/3104) +- Added the `min_merge_bytes_to_use_direct_io` option for `MergeTree` engines, which allows you to set a threshold for the total size of the merge (when above the threshold, data part files will be handled using O_DIRECT). [#3117](https://github.com/ClickHouse/ClickHouse/pull/3117) +- The `system.merges` system table now contains the `partition_id` column. [#3099](https://github.com/ClickHouse/ClickHouse/pull/3099) + +#### Improvements {#improvements-3} + +- If a data part remains unchanged during mutation, it isn’t downloaded by replicas. [#3103](https://github.com/ClickHouse/ClickHouse/pull/3103) +- Autocomplete is available for names of settings when working with `clickhouse-client`. [#3106](https://github.com/ClickHouse/ClickHouse/pull/3106) + +#### Bug Fixes: {#bug-fixes-12} + +- Added a check for the sizes of arrays that are elements of `Nested` type fields when inserting. [#3118](https://github.com/ClickHouse/ClickHouse/pull/3118) +- Fixed an error updating external dictionaries with the `ODBC` source and `hashed` storage. This error occurred in version 18.12.13. +- Fixed a crash when creating a temporary table from a query with an `IN` condition. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/3098) +- Fixed an error in aggregate functions for arrays that can have `NULL` elements. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/3097) + +### ClickHouse Release 18.12.13, 2018-09-10 {#clickhouse-release-18-12-13-2018-09-10} + +#### New Features: {#new-features-4} + +- Added the `DECIMAL(digits, scale)` data type (`Decimal32(scale)`, `Decimal64(scale)`, `Decimal128(scale)`). To enable it, use the setting `allow_experimental_decimal_type`. [#2846](https://github.com/ClickHouse/ClickHouse/pull/2846) [#2970](https://github.com/ClickHouse/ClickHouse/pull/2970) [#3008](https://github.com/ClickHouse/ClickHouse/pull/3008) [#3047](https://github.com/ClickHouse/ClickHouse/pull/3047) +- New `WITH ROLLUP` modifier for `GROUP BY` (alternative syntax: `GROUP BY ROLLUP(...)`). [#2948](https://github.com/ClickHouse/ClickHouse/pull/2948) +- In queries with JOIN, the star character expands to a list of columns in all tables, in compliance with the SQL standard. You can restore the old behavior by setting `asterisk_left_columns_only` to 1 on the user configuration level. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2787) +- Added support for JOIN with table functions. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2907) +- Autocomplete by pressing Tab in clickhouse-client. [Sergey Shcherbin](https://github.com/ClickHouse/ClickHouse/pull/2447) +- Ctrl+C in clickhouse-client clears a query that was entered. [#2877](https://github.com/ClickHouse/ClickHouse/pull/2877) +- Added the `join_default_strictness` setting (values: `"`, `'any'`, `'all'`). This allows you to not specify `ANY` or `ALL` for `JOIN`. [#2982](https://github.com/ClickHouse/ClickHouse/pull/2982) +- Each line of the server log related to query processing shows the query ID. [#2482](https://github.com/ClickHouse/ClickHouse/pull/2482) +- Now you can get query execution logs in clickhouse-client (use the `send_logs_level` setting). With distributed query processing, logs are cascaded from all the servers. [#2482](https://github.com/ClickHouse/ClickHouse/pull/2482) +- The `system.query_log` and `system.processes` (`SHOW PROCESSLIST`) tables now have information about all changed settings when you run a query (the nested structure of the `Settings` data). Added the `log_query_settings` setting. [#2482](https://github.com/ClickHouse/ClickHouse/pull/2482) +- The `system.query_log` and `system.processes` tables now show information about the number of threads that are participating in query execution (see the `thread_numbers` column). [#2482](https://github.com/ClickHouse/ClickHouse/pull/2482) +- Added `ProfileEvents` counters that measure the time spent on reading and writing over the network and reading and writing to disk, the number of network errors, and the time spent waiting when network bandwidth is limited. [#2482](https://github.com/ClickHouse/ClickHouse/pull/2482) +- Added `ProfileEvents`counters that contain the system metrics from rusage (you can use them to get information about CPU usage in userspace and the kernel, page faults, and context switches), as well as taskstats metrics (use these to obtain information about I/O wait time, CPU wait time, and the amount of data read and recorded, both with and without page cache). [#2482](https://github.com/ClickHouse/ClickHouse/pull/2482) +- The `ProfileEvents` counters are applied globally and for each query, as well as for each query execution thread, which allows you to profile resource consumption by query in detail. [#2482](https://github.com/ClickHouse/ClickHouse/pull/2482) +- Added the `system.query_thread_log` table, which contains information about each query execution thread. Added the `log_query_threads` setting. [#2482](https://github.com/ClickHouse/ClickHouse/pull/2482) +- The `system.metrics` and `system.events` tables now have built-in documentation. [#3016](https://github.com/ClickHouse/ClickHouse/pull/3016) +- Added the `arrayEnumerateDense` function. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2975) +- Added the `arrayCumSumNonNegative` and `arrayDifference` functions. [Aleksey Studnev](https://github.com/ClickHouse/ClickHouse/pull/2942) +- Added the `retention` aggregate function. [Sundy Li](https://github.com/ClickHouse/ClickHouse/pull/2887) +- Now you can add (merge) states of aggregate functions by using the plus operator, and multiply the states of aggregate functions by a nonnegative constant. [#3062](https://github.com/ClickHouse/ClickHouse/pull/3062) [#3034](https://github.com/ClickHouse/ClickHouse/pull/3034) +- Tables in the MergeTree family now have the virtual column `_partition_id`. [#3089](https://github.com/ClickHouse/ClickHouse/pull/3089) + +#### Experimental Features: {#experimental-features-1} + +- Added the `LowCardinality(T)` data type. This data type automatically creates a local dictionary of values and allows data processing without unpacking the dictionary. [#2830](https://github.com/ClickHouse/ClickHouse/pull/2830) +- Added a cache of JIT-compiled functions and a counter for the number of uses before compiling. To JIT compile expressions, enable the `compile_expressions` setting. [#2990](https://github.com/ClickHouse/ClickHouse/pull/2990) [#3077](https://github.com/ClickHouse/ClickHouse/pull/3077) + +#### Improvements: {#improvements-4} + +- Fixed the problem with unlimited accumulation of the replication log when there are abandoned replicas. Added an effective recovery mode for replicas with a long lag. +- Improved performance of `GROUP BY` with multiple aggregation fields when one of them is string and the others are fixed length. +- Improved performance when using `PREWHERE` and with implicit transfer of expressions in `PREWHERE`. +- Improved parsing performance for text formats (`CSV`, `TSV`). [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2977) [#2980](https://github.com/ClickHouse/ClickHouse/pull/2980) +- Improved performance of reading strings and arrays in binary formats. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2955) +- Increased performance and reduced memory consumption for queries to `system.tables` and `system.columns` when there is a very large number of tables on a single server. [#2953](https://github.com/ClickHouse/ClickHouse/pull/2953) +- Fixed a performance problem in the case of a large stream of queries that result in an error (the `_dl_addr` function is visible in `perf top`, but the server isn’t using much CPU). [#2938](https://github.com/ClickHouse/ClickHouse/pull/2938) +- Conditions are cast into the View (when `enable_optimize_predicate_expression` is enabled). [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2907) +- Improvements to the functionality for the `UUID` data type. [#3074](https://github.com/ClickHouse/ClickHouse/pull/3074) [#2985](https://github.com/ClickHouse/ClickHouse/pull/2985) +- The `UUID` data type is supported in The-Alchemist dictionaries. [#2822](https://github.com/ClickHouse/ClickHouse/pull/2822) +- The `visitParamExtractRaw` function works correctly with nested structures. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2974) +- When the `input_format_skip_unknown_fields` setting is enabled, object fields in `JSONEachRow` format are skipped correctly. [BlahGeek](https://github.com/ClickHouse/ClickHouse/pull/2958) +- For a `CASE` expression with conditions, you can now omit `ELSE`, which is equivalent to `ELSE NULL`. [#2920](https://github.com/ClickHouse/ClickHouse/pull/2920) +- The operation timeout can now be configured when working with ZooKeeper. [urykhy](https://github.com/ClickHouse/ClickHouse/pull/2971) +- You can specify an offset for `LIMIT n, m` as `LIMIT n OFFSET m`. [#2840](https://github.com/ClickHouse/ClickHouse/pull/2840) +- You can use the `SELECT TOP n` syntax as an alternative for `LIMIT`. [#2840](https://github.com/ClickHouse/ClickHouse/pull/2840) +- Increased the size of the queue to write to system tables, so the `SystemLog parameter queue is full` error does not happen as often. +- The `windowFunnel` aggregate function now supports events that meet multiple conditions. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2801) +- Duplicate columns can be used in a `USING` clause for `JOIN`. [#3006](https://github.com/ClickHouse/ClickHouse/pull/3006) +- `Pretty` formats now have a limit on column alignment by width. Use the `output_format_pretty_max_column_pad_width` setting. If a value is wider, it will still be displayed in its entirety, but the other cells in the table will not be too wide. [#3003](https://github.com/ClickHouse/ClickHouse/pull/3003) +- The `odbc` table function now allows you to specify the database/schema name. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2885) +- Added the ability to use a username specified in the `clickhouse-client` config file. [Vladimir Kozbin](https://github.com/ClickHouse/ClickHouse/pull/2909) +- The `ZooKeeperExceptions` counter has been split into three counters: `ZooKeeperUserExceptions`, `ZooKeeperHardwareExceptions`, and `ZooKeeperOtherExceptions`. +- `ALTER DELETE` queries work for materialized views. +- Added randomization when running the cleanup thread periodically for `ReplicatedMergeTree` tables in order to avoid periodic load spikes when there are a very large number of `ReplicatedMergeTree` tables. +- Support for `ATTACH TABLE ... ON CLUSTER` queries. [#3025](https://github.com/ClickHouse/ClickHouse/pull/3025) + +#### Bug Fixes: {#bug-fixes-13} + +- Fixed an issue with `Dictionary` tables (throws the `Size of offsets does not match size of column` or `Unknown compression method` exception). This bug appeared in version 18.10.3. [#2913](https://github.com/ClickHouse/ClickHouse/issues/2913) +- Fixed a bug when merging `CollapsingMergeTree` tables if one of the data parts is empty (these parts are formed during merge or `ALTER DELETE` if all data was deleted), and the `vertical` algorithm was used for the merge. [#3049](https://github.com/ClickHouse/ClickHouse/pull/3049) +- Fixed a race condition during `DROP` or `TRUNCATE` for `Memory` tables with a simultaneous `SELECT`, which could lead to server crashes. This bug appeared in version 1.1.54388. [#3038](https://github.com/ClickHouse/ClickHouse/pull/3038) +- Fixed the possibility of data loss when inserting in `Replicated` tables if the `Session is expired` error is returned (data loss can be detected by the `ReplicatedDataLoss` metric). This error occurred in version 1.1.54378. [#2939](https://github.com/ClickHouse/ClickHouse/pull/2939) [#2949](https://github.com/ClickHouse/ClickHouse/pull/2949) [#2964](https://github.com/ClickHouse/ClickHouse/pull/2964) +- Fixed a segfault during `JOIN ... ON`. [#3000](https://github.com/ClickHouse/ClickHouse/pull/3000) +- Fixed the error searching column names when the `WHERE` expression consists entirely of a qualified column name, such as `WHERE table.column`. [#2994](https://github.com/ClickHouse/ClickHouse/pull/2994) +- Fixed the “Not found column†error that occurred when executing distributed queries if a single column consisting of an IN expression with a subquery is requested from a remote server. [#3087](https://github.com/ClickHouse/ClickHouse/pull/3087) +- Fixed the `Block structure mismatch in UNION stream: different number of columns` error that occurred for distributed queries if one of the shards is local and the other is not, and optimization of the move to `PREWHERE` is triggered. [#2226](https://github.com/ClickHouse/ClickHouse/pull/2226) [#3037](https://github.com/ClickHouse/ClickHouse/pull/3037) [#3055](https://github.com/ClickHouse/ClickHouse/pull/3055) [#3065](https://github.com/ClickHouse/ClickHouse/pull/3065) [#3073](https://github.com/ClickHouse/ClickHouse/pull/3073) [#3090](https://github.com/ClickHouse/ClickHouse/pull/3090) [#3093](https://github.com/ClickHouse/ClickHouse/pull/3093) +- Fixed the `pointInPolygon` function for certain cases of non-convex polygons. [#2910](https://github.com/ClickHouse/ClickHouse/pull/2910) +- Fixed the incorrect result when comparing `nan` with integers. [#3024](https://github.com/ClickHouse/ClickHouse/pull/3024) +- Fixed an error in the `zlib-ng` library that could lead to segfault in rare cases. [#2854](https://github.com/ClickHouse/ClickHouse/pull/2854) +- Fixed a memory leak when inserting into a table with `AggregateFunction` columns, if the state of the aggregate function is not simple (allocates memory separately), and if a single insertion request results in multiple small blocks. [#3084](https://github.com/ClickHouse/ClickHouse/pull/3084) +- Fixed a race condition when creating and deleting the same `Buffer` or `MergeTree` table simultaneously. +- Fixed the possibility of a segfault when comparing tuples made up of certain non-trivial types, such as tuples. [#2989](https://github.com/ClickHouse/ClickHouse/pull/2989) +- Fixed the possibility of a segfault when running certain `ON CLUSTER` queries. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2960) +- Fixed an error in the `arrayDistinct` function for `Nullable` array elements. [#2845](https://github.com/ClickHouse/ClickHouse/pull/2845) [#2937](https://github.com/ClickHouse/ClickHouse/pull/2937) +- The `enable_optimize_predicate_expression` option now correctly supports cases with `SELECT *`. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2929) +- Fixed the segfault when re-initializing the ZooKeeper session. [#2917](https://github.com/ClickHouse/ClickHouse/pull/2917) +- Fixed potential blocking when working with ZooKeeper. +- Fixed incorrect code for adding nested data structures in a `SummingMergeTree`. +- When allocating memory for states of aggregate functions, alignment is correctly taken into account, which makes it possible to use operations that require alignment when implementing states of aggregate functions. [chenxing-xc](https://github.com/ClickHouse/ClickHouse/pull/2808) + +#### Security Fix: {#security-fix} + +- Safe use of ODBC data sources. Interaction with ODBC drivers uses a separate `clickhouse-odbc-bridge` process. Errors in third-party ODBC drivers no longer cause problems with server stability or vulnerabilities. [#2828](https://github.com/ClickHouse/ClickHouse/pull/2828) [#2879](https://github.com/ClickHouse/ClickHouse/pull/2879) [#2886](https://github.com/ClickHouse/ClickHouse/pull/2886) [#2893](https://github.com/ClickHouse/ClickHouse/pull/2893) [#2921](https://github.com/ClickHouse/ClickHouse/pull/2921) +- Fixed incorrect validation of the file path in the `catBoostPool` table function. [#2894](https://github.com/ClickHouse/ClickHouse/pull/2894) +- The contents of system tables (`tables`, `databases`, `parts`, `columns`, `parts_columns`, `merges`, `mutations`, `replicas`, and `replication_queue`) are filtered according to the user’s configured access to databases (`allow_databases`). [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2856) + +#### Backward Incompatible Changes: {#backward-incompatible-changes-3} + +- In queries with JOIN, the star character expands to a list of columns in all tables, in compliance with the SQL standard. You can restore the old behavior by setting `asterisk_left_columns_only` to 1 on the user configuration level. + +#### Build Changes: {#build-changes-2} + +- Most integration tests can now be run by commit. +- Code style checks can also be run by commit. +- The `memcpy` implementation is chosen correctly when building on CentOS7/Fedora. [Etienne Champetier](https://github.com/ClickHouse/ClickHouse/pull/2912) +- When using clang to build, some warnings from `-Weverything` have been added, in addition to the regular `-Wall-Wextra -Werror`. [#2957](https://github.com/ClickHouse/ClickHouse/pull/2957) +- Debugging the build uses the `jemalloc` debug option. +- The interface of the library for interacting with ZooKeeper is declared abstract. [#2950](https://github.com/ClickHouse/ClickHouse/pull/2950) + +## ClickHouse Release 18.10 {#clickhouse-release-18-10} + +### ClickHouse Release 18.10.3, 2018-08-13 {#clickhouse-release-18-10-3-2018-08-13} + +#### New Features: {#new-features-5} + +- HTTPS can be used for replication. [#2760](https://github.com/ClickHouse/ClickHouse/pull/2760) +- Added the functions `murmurHash2_64`, `murmurHash3_32`, `murmurHash3_64`, and `murmurHash3_128` in addition to the existing `murmurHash2_32`. [#2791](https://github.com/ClickHouse/ClickHouse/pull/2791) +- Support for Nullable types in the ClickHouse ODBC driver (`ODBCDriver2` output format). [#2834](https://github.com/ClickHouse/ClickHouse/pull/2834) +- Support for `UUID` in the key columns. + +#### Improvements: {#improvements-5} + +- Clusters can be removed without restarting the server when they are deleted from the config files. [#2777](https://github.com/ClickHouse/ClickHouse/pull/2777) +- External dictionaries can be removed without restarting the server when they are removed from config files. [#2779](https://github.com/ClickHouse/ClickHouse/pull/2779) +- Added `SETTINGS` support for the `Kafka` table engine. [Alexander Marshalov](https://github.com/ClickHouse/ClickHouse/pull/2781) +- Improvements for the `UUID` data type (not yet complete). [#2618](https://github.com/ClickHouse/ClickHouse/pull/2618) +- Support for empty parts after merges in the `SummingMergeTree`, `CollapsingMergeTree` and `VersionedCollapsingMergeTree` engines. [#2815](https://github.com/ClickHouse/ClickHouse/pull/2815) +- Old records of completed mutations are deleted (`ALTER DELETE`). [#2784](https://github.com/ClickHouse/ClickHouse/pull/2784) +- Added the `system.merge_tree_settings` table. [Kirill Shvakov](https://github.com/ClickHouse/ClickHouse/pull/2841) +- The `system.tables` table now has dependency columns: `dependencies_database` and `dependencies_table`. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2851) +- Added the `max_partition_size_to_drop` config option. [#2782](https://github.com/ClickHouse/ClickHouse/pull/2782) +- Added the `output_format_json_escape_forward_slashes` option. [Alexander Bocharov](https://github.com/ClickHouse/ClickHouse/pull/2812) +- Added the `max_fetch_partition_retries_count` setting. [#2831](https://github.com/ClickHouse/ClickHouse/pull/2831) +- Added the `prefer_localhost_replica` setting for disabling the preference for a local replica and going to a local replica without inter-process interaction. [#2832](https://github.com/ClickHouse/ClickHouse/pull/2832) +- The `quantileExact` aggregate function returns `nan` in the case of aggregation on an empty `Float32` or `Float64` set. [Sundy Li](https://github.com/ClickHouse/ClickHouse/pull/2855) + +#### Bug Fixes: {#bug-fixes-14} + +- Removed unnecessary escaping of the connection string parameters for ODBC, which made it impossible to establish a connection. This error occurred in version 18.6.0. +- Fixed the logic for processing `REPLACE PARTITION` commands in the replication queue. If there are two `REPLACE` commands for the same partition, the incorrect logic could cause one of them to remain in the replication queue and not be executed. [#2814](https://github.com/ClickHouse/ClickHouse/pull/2814) +- Fixed a merge bug when all data parts were empty (parts that were formed from a merge or from `ALTER DELETE` if all data was deleted). This bug appeared in version 18.1.0. [#2930](https://github.com/ClickHouse/ClickHouse/pull/2930) +- Fixed an error for concurrent `Set` or `Join`. [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2823) +- Fixed the `Block structure mismatch in UNION stream: different number of columns` error that occurred for `UNION ALL` queries inside a sub-query if one of the `SELECT` queries contains duplicate column names. [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2094) +- Fixed a memory leak if an exception occurred when connecting to a MySQL server. +- Fixed incorrect clickhouse-client response code in case of a query error. +- Fixed incorrect behavior of materialized views containing DISTINCT. [#2795](https://github.com/ClickHouse/ClickHouse/issues/2795) + +#### Backward Incompatible Changes {#backward-incompatible-changes-4} + +- Removed support for CHECK TABLE queries for Distributed tables. + +#### Build Changes: {#build-changes-3} + +- The allocator has been replaced: `jemalloc` is now used instead of `tcmalloc`. In some scenarios, this increases speed up to 20%. However, there are queries that have slowed by up to 20%. Memory consumption has been reduced by approximately 10% in some scenarios, with improved stability. With highly competitive loads, CPU usage in userspace and in system shows just a slight increase. [#2773](https://github.com/ClickHouse/ClickHouse/pull/2773) +- Use of libressl from a submodule. [#1983](https://github.com/ClickHouse/ClickHouse/pull/1983) [#2807](https://github.com/ClickHouse/ClickHouse/pull/2807) +- Use of unixodbc from a submodule. [#2789](https://github.com/ClickHouse/ClickHouse/pull/2789) +- Use of mariadb-connector-c from a submodule. [#2785](https://github.com/ClickHouse/ClickHouse/pull/2785) +- Added functional test files to the repository that depend on the availability of test data (for the time being, without the test data itself). + +## ClickHouse Release 18.6 {#clickhouse-release-18-6} + +### ClickHouse Release 18.6.0, 2018-08-02 {#clickhouse-release-18-6-0-2018-08-02} + +#### New Features: {#new-features-6} + +- Added support for ON expressions for the JOIN ON syntax: + `JOIN ON Expr([table.]column ...) = Expr([table.]column, ...) [AND Expr([table.]column, ...) = Expr([table.]column, ...) ...]` + The expression must be a chain of equalities joined by the AND operator. Each side of the equality can be an arbitrary expression over the columns of one of the tables. The use of fully qualified column names is supported (`table.name`, `database.table.name`, `table_alias.name`, `subquery_alias.name`) for the right table. [#2742](https://github.com/ClickHouse/ClickHouse/pull/2742) +- HTTPS can be enabled for replication. [#2760](https://github.com/ClickHouse/ClickHouse/pull/2760) + +#### Improvements: {#improvements-6} + +- The server passes the patch component of its version to the client. Data about the patch version component is in `system.processes` and `query_log`. [#2646](https://github.com/ClickHouse/ClickHouse/pull/2646) + +## ClickHouse Release 18.5 {#clickhouse-release-18-5} + +### ClickHouse Release 18.5.1, 2018-07-31 {#clickhouse-release-18-5-1-2018-07-31} + +#### New Features: {#new-features-7} + +- Added the hash function `murmurHash2_32` [#2756](https://github.com/ClickHouse/ClickHouse/pull/2756). + +#### Improvements: {#improvements-7} + +- Now you can use the `from_env` [#2741](https://github.com/ClickHouse/ClickHouse/pull/2741) attribute to set values in config files from environment variables. +- Added case-insensitive versions of the `coalesce`, `ifNull`, and `nullIf functions` [#2752](https://github.com/ClickHouse/ClickHouse/pull/2752). + +#### Bug Fixes: {#bug-fixes-15} + +- Fixed a possible bug when starting a replica [#2759](https://github.com/ClickHouse/ClickHouse/pull/2759). + +## ClickHouse Release 18.4 {#clickhouse-release-18-4} + +### ClickHouse Release 18.4.0, 2018-07-28 {#clickhouse-release-18-4-0-2018-07-28} + +#### New Features: {#new-features-8} + +- Added system tables: `formats`, `data_type_families`, `aggregate_function_combinators`, `table_functions`, `table_engines`, `collations` [#2721](https://github.com/ClickHouse/ClickHouse/pull/2721). +- Added the ability to use a table function instead of a table as an argument of a `remote` or `cluster table function` [#2708](https://github.com/ClickHouse/ClickHouse/pull/2708). +- Support for `HTTP Basic` authentication in the replication protocol [#2727](https://github.com/ClickHouse/ClickHouse/pull/2727). +- The `has` function now allows searching for a numeric value in an array of `Enum` values [Maxim Khrisanfov](https://github.com/ClickHouse/ClickHouse/pull/2699). +- Support for adding arbitrary message separators when reading from `Kafka` [Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2701). + +#### Improvements: {#improvements-8} + +- The `ALTER TABLE t DELETE WHERE` query does not rewrite data parts that were not affected by the WHERE condition [#2694](https://github.com/ClickHouse/ClickHouse/pull/2694). +- The `use_minimalistic_checksums_in_zookeeper` option for `ReplicatedMergeTree` tables is enabled by default. This setting was added in version 1.1.54378, 2018-04-16. Versions that are older than 1.1.54378 can no longer be installed. +- Support for running `KILL` and `OPTIMIZE` queries that specify `ON CLUSTER` [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2689). + +#### Bug Fixes: {#bug-fixes-16} + +- Fixed the error `Column ... is not under an aggregate function and not in GROUP BY` for aggregation with an IN expression. This bug appeared in version 18.1.0. ([bbdd780b](https://github.com/ClickHouse/ClickHouse/commit/bbdd780be0be06a0f336775941cdd536878dd2c2)) +- Fixed a bug in the `windowFunnel aggregate function` [Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2735). +- Fixed a bug in the `anyHeavy` aggregate function ([a2101df2](https://github.com/ClickHouse/ClickHouse/commit/a2101df25a6a0fba99aa71f8793d762af2b801ee)) +- Fixed server crash when using the `countArray()` aggregate function. + +#### Backward Incompatible Changes: {#backward-incompatible-changes-5} + +- Parameters for `Kafka` engine was changed from `Kafka(kafka_broker_list, kafka_topic_list, kafka_group_name, kafka_format[, kafka_schema, kafka_num_consumers])` to `Kafka(kafka_broker_list, kafka_topic_list, kafka_group_name, kafka_format[, kafka_row_delimiter, kafka_schema, kafka_num_consumers])`. If your tables use `kafka_schema` or `kafka_num_consumers` parameters, you have to manually edit the metadata files `path/metadata/database/table.sql` and add `kafka_row_delimiter` parameter with `''` value. + +## ClickHouse Release 18.1 {#clickhouse-release-18-1} + +### ClickHouse Release 18.1.0, 2018-07-23 {#clickhouse-release-18-1-0-2018-07-23} + +#### New Features: {#new-features-9} + +- Support for the `ALTER TABLE t DELETE WHERE` query for non-replicated MergeTree tables ([#2634](https://github.com/ClickHouse/ClickHouse/pull/2634)). +- Support for arbitrary types for the `uniq*` family of aggregate functions ([#2010](https://github.com/ClickHouse/ClickHouse/issues/2010)). +- Support for arbitrary types in comparison operators ([#2026](https://github.com/ClickHouse/ClickHouse/issues/2026)). +- The `users.xml` file allows setting a subnet mask in the format `10.0.0.1/255.255.255.0`. This is necessary for using masks for IPv6 networks with zeros in the middle ([#2637](https://github.com/ClickHouse/ClickHouse/pull/2637)). +- Added the `arrayDistinct` function ([#2670](https://github.com/ClickHouse/ClickHouse/pull/2670)). +- The SummingMergeTree engine can now work with AggregateFunction type columns ([Constantin S. Pan](https://github.com/ClickHouse/ClickHouse/pull/2566)). + +#### Improvements: {#improvements-9} + +- Changed the numbering scheme for release versions. Now the first part contains the year of release (A.D., Moscow timezone, minus 2000), the second part contains the number for major changes (increases for most releases), and the third part is the patch version. Releases are still backward compatible, unless otherwise stated in the changelog. +- Faster conversions of floating-point numbers to a string ([Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2664)). +- If some rows were skipped during an insert due to parsing errors (this is possible with the `input_allow_errors_num` and `input_allow_errors_ratio` settings enabled), the number of skipped rows is now written to the server log ([Leonardo Cecchi](https://github.com/ClickHouse/ClickHouse/pull/2669)). + +#### Bug Fixes: {#bug-fixes-17} + +- Fixed the TRUNCATE command for temporary tables ([Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2624)). +- Fixed a rare deadlock in the ZooKeeper client library that occurred when there was a network error while reading the response ([c315200](https://github.com/ClickHouse/ClickHouse/commit/c315200e64b87e44bdf740707fc857d1fdf7e947)). +- Fixed an error during a CAST to Nullable types ([#1322](https://github.com/ClickHouse/ClickHouse/issues/1322)). +- Fixed the incorrect result of the `maxIntersection()` function when the boundaries of intervals coincided ([Michael Furmur](https://github.com/ClickHouse/ClickHouse/pull/2657)). +- Fixed incorrect transformation of the OR expression chain in a function argument ([chenxing-xc](https://github.com/ClickHouse/ClickHouse/pull/2663)). +- Fixed performance degradation for queries containing `IN (subquery)` expressions inside another subquery ([#2571](https://github.com/ClickHouse/ClickHouse/issues/2571)). +- Fixed incompatibility between servers with different versions in distributed queries that use a `CAST` function that isn’t in uppercase letters ([fe8c4d6](https://github.com/ClickHouse/ClickHouse/commit/fe8c4d64e434cacd4ceef34faa9005129f2190a5)). +- Added missing quoting of identifiers for queries to an external DBMS ([#2635](https://github.com/ClickHouse/ClickHouse/issues/2635)). + +#### Backward Incompatible Changes: {#backward-incompatible-changes-6} + +- Converting a string containing the number zero to DateTime does not work. Example: `SELECT toDateTime('0')`. This is also the reason that `DateTime DEFAULT '0'` does not work in tables, as well as `0` in dictionaries. Solution: replace `0` with `0000-00-00 00:00:00`. + +## ClickHouse Release 1.1 {#clickhouse-release-1-1} + +### ClickHouse Release 1.1.54394, 2018-07-12 {#clickhouse-release-1-1-54394-2018-07-12} + +#### New Features: {#new-features-10} + +- Added the `histogram` aggregate function ([Mikhail Surin](https://github.com/ClickHouse/ClickHouse/pull/2521)). +- Now `OPTIMIZE TABLE ... FINAL` can be used without specifying partitions for `ReplicatedMergeTree` ([Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2600)). + +#### Bug Fixes: {#bug-fixes-18} + +- Fixed a problem with a very small timeout for sockets (one second) for reading and writing when sending and downloading replicated data, which made it impossible to download larger parts if there is a load on the network or disk (it resulted in cyclical attempts to download parts). This error occurred in version 1.1.54388. +- Fixed issues when using chroot in ZooKeeper if you inserted duplicate data blocks in the table. +- The `has` function now works correctly for an array with Nullable elements ([#2115](https://github.com/ClickHouse/ClickHouse/issues/2115)). +- The `system.tables` table now works correctly when used in distributed queries. The `metadata_modification_time` and `engine_full` columns are now non-virtual. Fixed an error that occurred if only these columns were queried from the table. +- Fixed how an empty `TinyLog` table works after inserting an empty data block ([#2563](https://github.com/ClickHouse/ClickHouse/issues/2563)). +- The `system.zookeeper` table works if the value of the node in ZooKeeper is NULL. + +### ClickHouse Release 1.1.54390, 2018-07-06 {#clickhouse-release-1-1-54390-2018-07-06} + +#### New Features: {#new-features-11} + +- Queries can be sent in `multipart/form-data` format (in the `query` field), which is useful if external data is also sent for query processing ([Olga Hvostikova](https://github.com/ClickHouse/ClickHouse/pull/2490)). +- Added the ability to enable or disable processing single or double quotes when reading data in CSV format. You can configure this in the `format_csv_allow_single_quotes` and `format_csv_allow_double_quotes` settings ([Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2574)). +- Now `OPTIMIZE TABLE ... FINAL` can be used without specifying the partition for non-replicated variants of `MergeTree` ([Amos Bird](https://github.com/ClickHouse/ClickHouse/pull/2599)). + +#### Improvements: {#improvements-10} + +- Improved performance, reduced memory consumption, and correct memory consumption tracking with use of the IN operator when a table index could be used ([#2584](https://github.com/ClickHouse/ClickHouse/pull/2584)). +- Removed redundant checking of checksums when adding a data part. This is important when there are a large number of replicas, because in these cases the total number of checks was equal to N^2. +- Added support for `Array(Tuple(...))` arguments for the `arrayEnumerateUniq` function ([#2573](https://github.com/ClickHouse/ClickHouse/pull/2573)). +- Added `Nullable` support for the `runningDifference` function ([#2594](https://github.com/ClickHouse/ClickHouse/pull/2594)). +- Improved query analysis performance when there is a very large number of expressions ([#2572](https://github.com/ClickHouse/ClickHouse/pull/2572)). +- Faster selection of data parts for merging in `ReplicatedMergeTree` tables. Faster recovery of the ZooKeeper session ([#2597](https://github.com/ClickHouse/ClickHouse/pull/2597)). +- The `format_version.txt` file for `MergeTree` tables is re-created if it is missing, which makes sense if ClickHouse is launched after copying the directory structure without files ([Ciprian Hacman](https://github.com/ClickHouse/ClickHouse/pull/2593)). + +#### Bug Fixes: {#bug-fixes-19} + +- Fixed a bug when working with ZooKeeper that could make it impossible to recover the session and readonly states of tables before restarting the server. +- Fixed a bug when working with ZooKeeper that could result in old nodes not being deleted if the session is interrupted. +- Fixed an error in the `quantileTDigest` function for Float arguments (this bug was introduced in version 1.1.54388) ([Mikhail Surin](https://github.com/ClickHouse/ClickHouse/pull/2553)). +- Fixed a bug in the index for MergeTree tables if the primary key column is located inside the function for converting types between signed and unsigned integers of the same size ([#2603](https://github.com/ClickHouse/ClickHouse/pull/2603)). +- Fixed segfault if `macros` are used but they aren’t in the config file ([#2570](https://github.com/ClickHouse/ClickHouse/pull/2570)). +- Fixed switching to the default database when reconnecting the client ([#2583](https://github.com/ClickHouse/ClickHouse/pull/2583)). +- Fixed a bug that occurred when the `use_index_for_in_with_subqueries` setting was disabled. + +#### Security Fix: {#security-fix-1} + +- Sending files is no longer possible when connected to MySQL (`LOAD DATA LOCAL INFILE`). + +### ClickHouse Release 1.1.54388, 2018-06-28 {#clickhouse-release-1-1-54388-2018-06-28} + +#### New Features: {#new-features-12} + +- Support for the `ALTER TABLE t DELETE WHERE` query for replicated tables. Added the `system.mutations` table to track progress of this type of queries. +- Support for the `ALTER TABLE t [REPLACE|ATTACH] PARTITION` query for \*MergeTree tables. +- Support for the `TRUNCATE TABLE` query ([Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2260)) +- Several new `SYSTEM` queries for replicated tables (`RESTART REPLICAS`, `SYNC REPLICA`, `[STOP|START] [MERGES|FETCHES|SENDS REPLICATED|REPLICATION QUEUES]`). +- Added the ability to write to a table with the MySQL engine and the corresponding table function ([sundy-li](https://github.com/ClickHouse/ClickHouse/pull/2294)). +- Added the `url()` table function and the `URL` table engine ([Alexander Sapin](https://github.com/ClickHouse/ClickHouse/pull/2501)). +- Added the `windowFunnel` aggregate function ([sundy-li](https://github.com/ClickHouse/ClickHouse/pull/2352)). +- New `startsWith` and `endsWith` functions for strings ([Vadim Plakhtinsky](https://github.com/ClickHouse/ClickHouse/pull/2429)). +- The `numbers()` table function now allows you to specify the offset ([Winter Zhang](https://github.com/ClickHouse/ClickHouse/pull/2535)). +- The password to `clickhouse-client` can be entered interactively. +- Server logs can now be sent to syslog ([Alexander Krasheninnikov](https://github.com/ClickHouse/ClickHouse/pull/2459)). +- Support for logging in dictionaries with a shared library source ([Alexander Sapin](https://github.com/ClickHouse/ClickHouse/pull/2472)). +- Support for custom CSV delimiters ([Ivan Zhukov](https://github.com/ClickHouse/ClickHouse/pull/2263)) +- Added the `date_time_input_format` setting. If you switch this setting to `'best_effort'`, DateTime values will be read in a wide range of formats. +- Added the `clickhouse-obfuscator` utility for data obfuscation. Usage example: publishing data used in performance tests. + +#### Experimental Features: {#experimental-features-2} + +- Added the ability to calculate `and` arguments only where they are needed ([Anastasia Tsarkova](https://github.com/ClickHouse/ClickHouse/pull/2272)) +- JIT compilation to native code is now available for some expressions ([pyos](https://github.com/ClickHouse/ClickHouse/pull/2277)). + +#### Bug Fixes: {#bug-fixes-20} + +- Duplicates no longer appear for a query with `DISTINCT` and `ORDER BY`. +- Queries with `ARRAY JOIN` and `arrayFilter` no longer return an incorrect result. +- Fixed an error when reading an array column from a Nested structure ([#2066](https://github.com/ClickHouse/ClickHouse/issues/2066)). +- Fixed an error when analyzing queries with a HAVING clause like `HAVING tuple IN (...)`. +- Fixed an error when analyzing queries with recursive aliases. +- Fixed an error when reading from ReplacingMergeTree with a condition in PREWHERE that filters all rows ([#2525](https://github.com/ClickHouse/ClickHouse/issues/2525)). +- User profile settings were not applied when using sessions in the HTTP interface. +- Fixed how settings are applied from the command line parameters in clickhouse-local. +- The ZooKeeper client library now uses the session timeout received from the server. +- Fixed a bug in the ZooKeeper client library when the client waited for the server response longer than the timeout. +- Fixed pruning of parts for queries with conditions on partition key columns ([#2342](https://github.com/ClickHouse/ClickHouse/issues/2342)). +- Merges are now possible after `CLEAR COLUMN IN PARTITION` ([#2315](https://github.com/ClickHouse/ClickHouse/issues/2315)). +- Type mapping in the ODBC table function has been fixed ([sundy-li](https://github.com/ClickHouse/ClickHouse/pull/2268)). +- Type comparisons have been fixed for `DateTime` with and without the time zone ([Alexander Bocharov](https://github.com/ClickHouse/ClickHouse/pull/2400)). +- Fixed syntactic parsing and formatting of the `CAST` operator. +- Fixed insertion into a materialized view for the Distributed table engine ([Babacar Diassé](https://github.com/ClickHouse/ClickHouse/pull/2411)). +- Fixed a race condition when writing data from the `Kafka` engine to materialized views ([Yangkuan Liu](https://github.com/ClickHouse/ClickHouse/pull/2448)). +- Fixed SSRF in the remote() table function. +- Fixed exit behavior of `clickhouse-client` in multiline mode ([#2510](https://github.com/ClickHouse/ClickHouse/issues/2510)). + +#### Improvements: {#improvements-11} + +- Background tasks in replicated tables are now performed in a thread pool instead of in separate threads ([Silviu Caragea](https://github.com/ClickHouse/ClickHouse/pull/1722)). +- Improved LZ4 compression performance. +- Faster analysis for queries with a large number of JOINs and sub-queries. +- The DNS cache is now updated automatically when there are too many network errors. +- Table inserts no longer occur if the insert into one of the materialized views is not possible because it has too many parts. +- Corrected the discrepancy in the event counters `Query`, `SelectQuery`, and `InsertQuery`. +- Expressions like `tuple IN (SELECT tuple)` are allowed if the tuple types match. +- A server with replicated tables can start even if you haven’t configured ZooKeeper. +- When calculating the number of available CPU cores, limits on cgroups are now taken into account ([Atri Sharma](https://github.com/ClickHouse/ClickHouse/pull/2325)). +- Added chown for config directories in the systemd config file ([Mikhail Shiryaev](https://github.com/ClickHouse/ClickHouse/pull/2421)). + +#### Build Changes: {#build-changes-4} + +- The gcc8 compiler can be used for builds. +- Added the ability to build llvm from submodule. +- The version of the librdkafka library has been updated to v0.11.4. +- Added the ability to use the system libcpuid library. The library version has been updated to 0.4.0. +- Fixed the build using the vectorclass library ([Babacar Diassé](https://github.com/ClickHouse/ClickHouse/pull/2274)). +- Cmake now generates files for ninja by default (like when using `-G Ninja`). +- Added the ability to use the libtinfo library instead of libtermcap ([Georgy Kondratiev](https://github.com/ClickHouse/ClickHouse/pull/2519)). +- Fixed a header file conflict in Fedora Rawhide ([#2520](https://github.com/ClickHouse/ClickHouse/issues/2520)). + +#### Backward Incompatible Changes: {#backward-incompatible-changes-7} + +- Removed escaping in `Vertical` and `Pretty*` formats and deleted the `VerticalRaw` format. +- If servers with version 1.1.54388 (or newer) and servers with an older version are used simultaneously in a distributed query and the query has the `cast(x, 'Type')` expression without the `AS` keyword and does not have the word `cast` in uppercase, an exception will be thrown with a message like `Not found column cast(0, 'UInt8') in block`. Solution: Update the server on the entire cluster. + +### ClickHouse Release 1.1.54385, 2018-06-01 {#clickhouse-release-1-1-54385-2018-06-01} + +#### Bug Fixes: {#bug-fixes-21} + +- Fixed an error that in some cases caused ZooKeeper operations to block. + +### ClickHouse Release 1.1.54383, 2018-05-22 {#clickhouse-release-1-1-54383-2018-05-22} + +#### Bug Fixes: {#bug-fixes-22} + +- Fixed a slowdown of replication queue if a table has many replicas. + +### ClickHouse Release 1.1.54381, 2018-05-14 {#clickhouse-release-1-1-54381-2018-05-14} + +#### Bug Fixes: {#bug-fixes-23} + +- Fixed a nodes leak in ZooKeeper when ClickHouse loses connection to ZooKeeper server. + +### ClickHouse Release 1.1.54380, 2018-04-21 {#clickhouse-release-1-1-54380-2018-04-21} + +#### New Features: {#new-features-13} + +- Added the table function `file(path, format, structure)`. An example reading bytes from `/dev/urandom`: ``` ln -s /dev/urandom /var/lib/clickhouse/user_files/random``clickhouse-client -q "SELECT * FROM file('random', 'RowBinary', 'd UInt8') LIMIT 10" ```. + +#### Improvements: {#improvements-12} + +- Subqueries can be wrapped in `()` brackets to enhance query readability. For example: `(SELECT 1) UNION ALL (SELECT 1)`. +- Simple `SELECT` queries from the `system.processes` table are not included in the `max_concurrent_queries` limit. + +#### Bug Fixes: {#bug-fixes-24} + +- Fixed incorrect behavior of the `IN` operator when select from `MATERIALIZED VIEW`. +- Fixed incorrect filtering by partition index in expressions like `partition_key_column IN (...)`. +- Fixed inability to execute `OPTIMIZE` query on non-leader replica if `REANAME` was performed on the table. +- Fixed the authorization error when executing `OPTIMIZE` or `ALTER` queries on a non-leader replica. +- Fixed freezing of `KILL QUERY`. +- Fixed an error in ZooKeeper client library which led to loss of watches, freezing of distributed DDL queue, and slowdowns in the replication queue if a non-empty `chroot` prefix is used in the ZooKeeper configuration. + +#### Backward Incompatible Changes: {#backward-incompatible-changes-8} + +- Removed support for expressions like `(a, b) IN (SELECT (a, b))` (you can use the equivalent expression `(a, b) IN (SELECT a, b)`). In previous releases, these expressions led to undetermined `WHERE` filtering or caused errors. + +### ClickHouse Release 1.1.54378, 2018-04-16 {#clickhouse-release-1-1-54378-2018-04-16} + +#### New Features: {#new-features-14} + +- Logging level can be changed without restarting the server. +- Added the `SHOW CREATE DATABASE` query. +- The `query_id` can be passed to `clickhouse-client` (elBroom). +- New setting: `max_network_bandwidth_for_all_users`. +- Added support for `ALTER TABLE ... PARTITION ...` for `MATERIALIZED VIEW`. +- Added information about the size of data parts in uncompressed form in the system table. +- Server-to-server encryption support for distributed tables (`1` in the replica config in ``). +- Configuration of the table level for the `ReplicatedMergeTree` family in order to minimize the amount of data stored in Zookeeper: : `use_minimalistic_checksums_in_zookeeper = 1` +- Configuration of the `clickhouse-client` prompt. By default, server names are now output to the prompt. The server’s display name can be changed. It’s also sent in the `X-ClickHouse-Display-Name` HTTP header (Kirill Shvakov). +- Multiple comma-separated `topics` can be specified for the `Kafka` engine (Tobias Adamson) +- When a query is stopped by `KILL QUERY` or `replace_running_query`, the client receives the `Query was canceled` exception instead of an incomplete result. + +#### Improvements: {#improvements-13} + +- `ALTER TABLE ... DROP/DETACH PARTITION` queries are run at the front of the replication queue. +- `SELECT ... FINAL` and `OPTIMIZE ... FINAL` can be used even when the table has a single data part. +- A `query_log` table is recreated on the fly if it was deleted manually (Kirill Shvakov). +- The `lengthUTF8` function runs faster (zhang2014). +- Improved performance of synchronous inserts in `Distributed` tables (`insert_distributed_sync = 1`) when there is a very large number of shards. +- The server accepts the `send_timeout` and `receive_timeout` settings from the client and applies them when connecting to the client (they are applied in reverse order: the server socket’s `send_timeout` is set to the `receive_timeout` value received from the client, and vice versa). +- More robust crash recovery for asynchronous insertion into `Distributed` tables. +- The return type of the `countEqual` function changed from `UInt32` to `UInt64` (谢磊). + +#### Bug Fixes: {#bug-fixes-25} + +- Fixed an error with `IN` when the left side of the expression is `Nullable`. +- Correct results are now returned when using tuples with `IN` when some of the tuple components are in the table index. +- The `max_execution_time` limit now works correctly with distributed queries. +- Fixed errors when calculating the size of composite columns in the `system.columns` table. +- Fixed an error when creating a temporary table `CREATE TEMPORARY TABLE IF NOT EXISTS.` +- Fixed errors in `StorageKafka` (##2075) +- Fixed server crashes from invalid arguments of certain aggregate functions. +- Fixed the error that prevented the `DETACH DATABASE` query from stopping background tasks for `ReplicatedMergeTree` tables. +- `Too many parts` state is less likely to happen when inserting into aggregated materialized views (##2084). +- Corrected recursive handling of substitutions in the config if a substitution must be followed by another substitution on the same level. +- Corrected the syntax in the metadata file when creating a `VIEW` that uses a query with `UNION ALL`. +- `SummingMergeTree` now works correctly for summation of nested data structures with a composite key. +- Fixed the possibility of a race condition when choosing the leader for `ReplicatedMergeTree` tables. + +#### Build Changes: {#build-changes-5} + +- The build supports `ninja` instead of `make` and uses `ninja` by default for building releases. +- Renamed packages: `clickhouse-server-base` in `clickhouse-common-static`; `clickhouse-server-common` in `clickhouse-server`; `clickhouse-common-dbg` in `clickhouse-common-static-dbg`. To install, use `clickhouse-server clickhouse-client`. Packages with the old names will still load in the repositories for backward compatibility. + +#### Backward Incompatible Changes: {#backward-incompatible-changes-9} + +- Removed the special interpretation of an IN expression if an array is specified on the left side. Previously, the expression `arr IN (set)` was interpreted as “at least one `arr` element belongs to the `set`â€. To get the same behavior in the new version, write `arrayExists(x -> x IN (set), arr)`. +- Disabled the incorrect use of the socket option `SO_REUSEPORT`, which was incorrectly enabled by default in the Poco library. Note that on Linux there is no longer any reason to simultaneously specify the addresses `::` and `0.0.0.0` for listen – use just `::`, which allows listening to the connection both over IPv4 and IPv6 (with the default kernel config settings). You can also revert to the behavior from previous versions by specifying `1` in the config. + +### ClickHouse Release 1.1.54370, 2018-03-16 {#clickhouse-release-1-1-54370-2018-03-16} + +#### New Features: {#new-features-15} + +- Added the `system.macros` table and auto updating of macros when the config file is changed. +- Added the `SYSTEM RELOAD CONFIG` query. +- Added the `maxIntersections(left_col, right_col)` aggregate function, which returns the maximum number of simultaneously intersecting intervals `[left; right]`. The `maxIntersectionsPosition(left, right)` function returns the beginning of the “maximum†interval. ([Michael Furmur](https://github.com/ClickHouse/ClickHouse/pull/2012)). + +#### Improvements: {#improvements-14} + +- When inserting data in a `Replicated` table, fewer requests are made to `ZooKeeper` (and most of the user-level errors have disappeared from the `ZooKeeper` log). +- Added the ability to create aliases for data sets. Example: `WITH (1, 2, 3) AS set SELECT number IN set FROM system.numbers LIMIT 10`. + +#### Bug Fixes: {#bug-fixes-26} + +- Fixed the `Illegal PREWHERE` error when reading from Merge tables for `Distributed`tables. +- Added fixes that allow you to start clickhouse-server in IPv4-only Docker containers. +- Fixed a race condition when reading from system `system.parts_columns tables.` +- Removed double buffering during a synchronous insert to a `Distributed` table, which could have caused the connection to timeout. +- Fixed a bug that caused excessively long waits for an unavailable replica before beginning a `SELECT` query. +- Fixed incorrect dates in the `system.parts` table. +- Fixed a bug that made it impossible to insert data in a `Replicated` table if `chroot` was non-empty in the configuration of the `ZooKeeper` cluster. +- Fixed the vertical merging algorithm for an empty `ORDER BY` table. +- Restored the ability to use dictionaries in queries to remote tables, even if these dictionaries are not present on the requestor server. This functionality was lost in release 1.1.54362. +- Restored the behavior for queries like `SELECT * FROM remote('server2', default.table) WHERE col IN (SELECT col2 FROM default.table)` when the right side of the `IN` should use a remote `default.table` instead of a local one. This behavior was broken in version 1.1.54358. +- Removed extraneous error-level logging of `Not found column ... in block`. + +### ClickHouse Release 1.1.54362, 2018-03-11 {#clickhouse-release-1-1-54362-2018-03-11} + +#### New Features: {#new-features-16} + +- Aggregation without `GROUP BY` for an empty set (such as `SELECT count(*) FROM table WHERE 0`) now returns a result with one row with null values for aggregate functions, in compliance with the SQL standard. To restore the old behavior (return an empty result), set `empty_result_for_aggregation_by_empty_set` to 1. +- Added type conversion for `UNION ALL`. Different alias names are allowed in `SELECT` positions in `UNION ALL`, in compliance with the SQL standard. +- Arbitrary expressions are supported in `LIMIT BY` clauses. Previously, it was only possible to use columns resulting from `SELECT`. +- An index of `MergeTree` tables is used when `IN` is applied to a tuple of expressions from the columns of the primary key. Example: `WHERE (UserID, EventDate) IN ((123, '2000-01-01'), ...)` (Anastasiya Tsarkova). +- Added the `clickhouse-copier` tool for copying between clusters and resharding data (beta). +- Added consistent hashing functions: `yandexConsistentHash`, `jumpConsistentHash`, `sumburConsistentHash`. They can be used as a sharding key in order to reduce the amount of network traffic during subsequent reshardings. +- Added functions: `arrayAny`, `arrayAll`, `hasAny`, `hasAll`, `arrayIntersect`, `arrayResize`. +- Added the `arrayCumSum` function (Javi Santana). +- Added the `parseDateTimeBestEffort`, `parseDateTimeBestEffortOrZero`, and `parseDateTimeBestEffortOrNull` functions to read the DateTime from a string containing text in a wide variety of possible formats. +- Data can be partially reloaded from external dictionaries during updating (load just the records in which the value of the specified field greater than in the previous download) (Arsen Hakobyan). +- Added the `cluster` table function. Example: `cluster(cluster_name, db, table)`. The `remote` table function can accept the cluster name as the first argument, if it is specified as an identifier. +- The `remote` and `cluster` table functions can be used in `INSERT` queries. +- Added the `create_table_query` and `engine_full` virtual columns to the `system.tables`table . The `metadata_modification_time` column is virtual. +- Added the `data_path` and `metadata_path` columns to `system.tables`and`system.databases` tables, and added the `path` column to the `system.parts` and `system.parts_columns` tables. +- Added additional information about merges in the `system.part_log` table. +- An arbitrary partitioning key can be used for the `system.query_log` table (Kirill Shvakov). +- The `SHOW TABLES` query now also shows temporary tables. Added temporary tables and the `is_temporary` column to `system.tables` (zhang2014). +- Added `DROP TEMPORARY TABLE` and `EXISTS TEMPORARY TABLE` queries (zhang2014). +- Support for `SHOW CREATE TABLE` for temporary tables (zhang2014). +- Added the `system_profile` configuration parameter for the settings used by internal processes. +- Support for loading `object_id` as an attribute in `MongoDB` dictionaries (Pavel Litvinenko). +- Reading `null` as the default value when loading data for an external dictionary with the `MongoDB` source (Pavel Litvinenko). +- Reading `DateTime` values in the `Values` format from a Unix timestamp without single quotes. +- Failover is supported in `remote` table functions for cases when some of the replicas are missing the requested table. +- Configuration settings can be overridden in the command line when you run `clickhouse-server`. Example: `clickhouse-server -- --logger.level=information`. +- Implemented the `empty` function from a `FixedString` argument: the function returns 1 if the string consists entirely of null bytes (zhang2014). +- Added the `listen_try`configuration parameter for listening to at least one of the listen addresses without quitting, if some of the addresses can’t be listened to (useful for systems with disabled support for IPv4 or IPv6). +- Added the `VersionedCollapsingMergeTree` table engine. +- Support for rows and arbitrary numeric types for the `library` dictionary source. +- `MergeTree` tables can be used without a primary key (you need to specify `ORDER BY tuple()`). +- A `Nullable` type can be `CAST` to a non-`Nullable` type if the argument is not `NULL`. +- `RENAME TABLE` can be performed for `VIEW`. +- Added the `throwIf` function. +- Added the `odbc_default_field_size` option, which allows you to extend the maximum size of the value loaded from an ODBC source (by default, it is 1024). +- The `system.processes` table and `SHOW PROCESSLIST` now have the `is_cancelled` and `peak_memory_usage` columns. + +#### Improvements: {#improvements-15} + +- Limits and quotas on the result are no longer applied to intermediate data for `INSERT SELECT` queries or for `SELECT` subqueries. +- Fewer false triggers of `force_restore_data` when checking the status of `Replicated` tables when the server starts. +- Added the `allow_distributed_ddl` option. +- Nondeterministic functions are not allowed in expressions for `MergeTree` table keys. +- Files with substitutions from `config.d` directories are loaded in alphabetical order. +- Improved performance of the `arrayElement` function in the case of a constant multidimensional array with an empty array as one of the elements. Example: `[[1], []][x]`. +- The server starts faster now when using configuration files with very large substitutions (for instance, very large lists of IP networks). +- When running a query, table valued functions run once. Previously, `remote` and `mysql` table valued functions performed the same query twice to retrieve the table structure from a remote server. +- The `MkDocs` documentation generator is used. +- When you try to delete a table column that `DEFAULT`/`MATERIALIZED` expressions of other columns depend on, an exception is thrown (zhang2014). +- Added the ability to parse an empty line in text formats as the number 0 for `Float` data types. This feature was previously available but was lost in release 1.1.54342. +- `Enum` values can be used in `min`, `max`, `sum` and some other functions. In these cases, it uses the corresponding numeric values. This feature was previously available but was lost in the release 1.1.54337. +- Added `max_expanded_ast_elements` to restrict the size of the AST after recursively expanding aliases. + +#### Bug Fixes: {#bug-fixes-27} + +- Fixed cases when unnecessary columns were removed from subqueries in error, or not removed from subqueries containing `UNION ALL`. +- Fixed a bug in merges for `ReplacingMergeTree` tables. +- Fixed synchronous insertions in `Distributed` tables (`insert_distributed_sync = 1`). +- Fixed segfault for certain uses of `FULL` and `RIGHT JOIN` with duplicate columns in subqueries. +- Fixed segfault for certain uses of `replace_running_query` and `KILL QUERY`. +- Fixed the order of the `source` and `last_exception` columns in the `system.dictionaries` table. +- Fixed a bug when the `DROP DATABASE` query did not delete the file with metadata. +- Fixed the `DROP DATABASE` query for `Dictionary` databases. +- Fixed the low precision of `uniqHLL12` and `uniqCombined` functions for cardinalities greater than 100 million items (Alex Bocharov). +- Fixed the calculation of implicit default values when necessary to simultaneously calculate default explicit expressions in `INSERT` queries (zhang2014). +- Fixed a rare case when a query to a `MergeTree` table couldn’t finish (chenxing-xc). +- Fixed a crash that occurred when running a `CHECK` query for `Distributed` tables if all shards are local (chenxing.xc). +- Fixed a slight performance regression with functions that use regular expressions. +- Fixed a performance regression when creating multidimensional arrays from complex expressions. +- Fixed a bug that could cause an extra `FORMAT` section to appear in an `.sql` file with metadata. +- Fixed a bug that caused the `max_table_size_to_drop` limit to apply when trying to delete a `MATERIALIZED VIEW` looking at an explicitly specified table. +- Fixed incompatibility with old clients (old clients were sometimes sent data with the `DateTime('timezone')` type, which they do not understand). +- Fixed a bug when reading `Nested` column elements of structures that were added using `ALTER` but that are empty for the old partitions, when the conditions for these columns moved to `PREWHERE`. +- Fixed a bug when filtering tables by virtual `_table` columns in queries to `Merge` tables. +- Fixed a bug when using `ALIAS` columns in `Distributed` tables. +- Fixed a bug that made dynamic compilation impossible for queries with aggregate functions from the `quantile` family. +- Fixed a race condition in the query execution pipeline that occurred in very rare cases when using `Merge` tables with a large number of tables, and when using `GLOBAL` subqueries. +- Fixed a crash when passing arrays of different sizes to an `arrayReduce` function when using aggregate functions from multiple arguments. +- Prohibited the use of queries with `UNION ALL` in a `MATERIALIZED VIEW`. +- Fixed an error during initialization of the `part_log` system table when the server starts (by default, `part_log` is disabled). + +#### Backward Incompatible Changes: {#backward-incompatible-changes-10} + +- Removed the `distributed_ddl_allow_replicated_alter` option. This behavior is enabled by default. +- Removed the `strict_insert_defaults` setting. If you were using this functionality, write to `feedback@clickhouse.com`. +- Removed the `UnsortedMergeTree` engine. + +### ClickHouse Release 1.1.54343, 2018-02-05 {#clickhouse-release-1-1-54343-2018-02-05} + +- Added macros support for defining cluster names in distributed DDL queries and constructors of Distributed tables: `CREATE TABLE distr ON CLUSTER '{cluster}' (...) ENGINE = Distributed('{cluster}', 'db', 'table')`. +- Now queries like `SELECT ... FROM table WHERE expr IN (subquery)` are processed using the `table` index. +- Improved processing of duplicates when inserting to Replicated tables, so they no longer slow down execution of the replication queue. + +### ClickHouse Release 1.1.54342, 2018-01-22 {#clickhouse-release-1-1-54342-2018-01-22} + +This release contains bug fixes for the previous release 1.1.54337: + +- Fixed a regression in 1.1.54337: if the default user has readonly access, then the server refuses to start up with the message `Cannot create database in readonly mode`. +- Fixed a regression in 1.1.54337: on systems with systemd, logs are always written to syslog regardless of the configuration; the watchdog script still uses init.d. +- Fixed a regression in 1.1.54337: wrong default configuration in the Docker image. +- Fixed nondeterministic behavior of GraphiteMergeTree (you can see it in log messages `Data after merge is not byte-identical to the data on another replicas`). +- Fixed a bug that may lead to inconsistent merges after OPTIMIZE query to Replicated tables (you may see it in log messages `Part ... intersects the previous part`). +- Buffer tables now work correctly when MATERIALIZED columns are present in the destination table (by zhang2014). +- Fixed a bug in implementation of NULL. + +### ClickHouse Release 1.1.54337, 2018-01-18 {#clickhouse-release-1-1-54337-2018-01-18} + +#### New Features: {#new-features-17} + +- Added support for storage of multi-dimensional arrays and tuples (`Tuple` data type) in tables. +- Support for table functions for `DESCRIBE` and `INSERT` queries. Added support for subqueries in `DESCRIBE`. Examples: `DESC TABLE remote('host', default.hits)`; `DESC TABLE (SELECT 1)`; `INSERT INTO TABLE FUNCTION remote('host', default.hits)`. Support for `INSERT INTO TABLE` in addition to `INSERT INTO`. +- Improved support for time zones. The `DateTime` data type can be annotated with the timezone that is used for parsing and formatting in text formats. Example: `DateTime('Asia/Istanbul')`. When timezones are specified in functions for `DateTime` arguments, the return type will track the timezone, and the value will be displayed as expected. +- Added the functions `toTimeZone`, `timeDiff`, `toQuarter`, `toRelativeQuarterNum`. The `toRelativeHour`/`Minute`/`Second` functions can take a value of type `Date` as an argument. The `now` function name is case-sensitive. +- Added the `toStartOfFifteenMinutes` function (Kirill Shvakov). +- Added the `clickhouse format` tool for formatting queries. +- Added the `format_schema_path` configuration parameter (Marek VavruÅŸa). It is used for specifying a schema in `Cap'n Proto` format. Schema files can be located only in the specified directory. +- Added support for config substitutions (`incl` and `conf.d`) for configuration of external dictionaries and models (Pavel Yakunin). +- Added a column with documentation for the `system.settings` table (Kirill Shvakov). +- Added the `system.parts_columns` table with information about column sizes in each data part of `MergeTree` tables. +- Added the `system.models` table with information about loaded `CatBoost` machine learning models. +- Added the `mysql` and `odbc` table function and corresponding `MySQL` and `ODBC` table engines for accessing remote databases. This functionality is in the beta stage. +- Added the possibility to pass an argument of type `AggregateFunction` for the `groupArray` aggregate function (so you can create an array of states of some aggregate function). +- Removed restrictions on various combinations of aggregate function combinators. For example, you can use `avgForEachIf` as well as `avgIfForEach` aggregate functions, which have different behaviors. +- The `-ForEach` aggregate function combinator is extended for the case of aggregate functions of multiple arguments. +- Added support for aggregate functions of `Nullable` arguments even for cases when the function returns a non-`Nullable` result (added with the contribution of Silviu Caragea). Example: `groupArray`, `groupUniqArray`, `topK`. +- Added the `max_client_network_bandwidth` for `clickhouse-client` (Kirill Shvakov). +- Users with the `readonly = 2` setting are allowed to work with TEMPORARY tables (CREATE, DROP, INSERT…) (Kirill Shvakov). +- Added support for using multiple consumers with the `Kafka` engine. Extended configuration options for `Kafka` (Marek VavruÅ¡a). +- Added the `intExp3` and `intExp4` functions. +- Added the `sumKahan` aggregate function. +- Added the to \* Number\* OrNull functions, where \* Number\* is a numeric type. +- Added support for `WITH` clauses for an `INSERT SELECT` query (author: zhang2014). +- Added settings: `http_connection_timeout`, `http_send_timeout`, `http_receive_timeout`. In particular, these settings are used for downloading data parts for replication. Changing these settings allows for faster failover if the network is overloaded. +- Added support for `ALTER` for tables of type `Null` (Anastasiya Tsarkova). +- The `reinterpretAsString` function is extended for all data types that are stored contiguously in memory. +- Added the `--silent` option for the `clickhouse-local` tool. It suppresses printing query execution info in stderr. +- Added support for reading values of type `Date` from text in a format where the month and/or day of the month is specified using a single digit instead of two digits (Amos Bird). + +#### Performance Optimizations: {#performance-optimizations} + +- Improved performance of aggregate functions `min`, `max`, `any`, `anyLast`, `anyHeavy`, `argMin`, `argMax` from string arguments. +- Improved performance of the functions `isInfinite`, `isFinite`, `isNaN`, `roundToExp2`. +- Improved performance of parsing and formatting `Date` and `DateTime` type values in text format. +- Improved performance and precision of parsing floating point numbers. +- Lowered memory usage for `JOIN` in the case when the left and right parts have columns with identical names that are not contained in `USING` . +- Improved performance of aggregate functions `varSamp`, `varPop`, `stddevSamp`, `stddevPop`, `covarSamp`, `covarPop`, `corr` by reducing computational stability. The old functions are available under the names `varSampStable`, `varPopStable`, `stddevSampStable`, `stddevPopStable`, `covarSampStable`, `covarPopStable`, `corrStable`. + +#### Bug Fixes: {#bug-fixes-28} + +- Fixed data deduplication after running a `DROP` or `DETACH PARTITION` query. In the previous version, dropping a partition and inserting the same data again was not working because inserted blocks were considered duplicates. +- Fixed a bug that could lead to incorrect interpretation of the `WHERE` clause for `CREATE MATERIALIZED VIEW` queries with `POPULATE` . +- Fixed a bug in using the `root_path` parameter in the `zookeeper_servers` configuration. +- Fixed unexpected results of passing the `Date` argument to `toStartOfDay` . +- Fixed the `addMonths` and `subtractMonths` functions and the arithmetic for `INTERVAL n MONTH` in cases when the result has the previous year. +- Added missing support for the `UUID` data type for `DISTINCT` , `JOIN` , and `uniq` aggregate functions and external dictionaries (Evgeniy Ivanov). Support for `UUID` is still incomplete. +- Fixed `SummingMergeTree` behavior in cases when the rows summed to zero. +- Various fixes for the `Kafka` engine (Marek VavruÅ¡a). +- Fixed incorrect behavior of the `Join` table engine (Amos Bird). +- Fixed incorrect allocator behavior under FreeBSD and OS X. +- The `extractAll` function now supports empty matches. +- Fixed an error that blocked usage of `libressl` instead of `openssl` . +- Fixed the `CREATE TABLE AS SELECT` query from temporary tables. +- Fixed non-atomicity of updating the replication queue. This could lead to replicas being out of sync until the server restarts. +- Fixed possible overflow in `gcd` , `lcm` and `modulo` (`%` operator) (Maks Skorokhod). +- `-preprocessed` files are now created after changing `umask` (`umask` can be changed in the config). +- Fixed a bug in the background check of parts (`MergeTreePartChecker` ) when using a custom partition key. +- Fixed parsing of tuples (values of the `Tuple` data type) in text formats. +- Improved error messages about incompatible types passed to `multiIf` , `array` and some other functions. +- Redesigned support for `Nullable` types. Fixed bugs that may lead to a server crash. Fixed almost all other bugs related to `NULL` support: incorrect type conversions in INSERT SELECT, insufficient support for Nullable in HAVING and PREWHERE, `join_use_nulls` mode, Nullable types as arguments of `OR` operator, etc. +- Fixed various bugs related to internal semantics of data types. Examples: unnecessary summing of `Enum` type fields in `SummingMergeTree` ; alignment of `Enum` types in `Pretty` formats, etc. +- Stricter checks for allowed combinations of composite columns. +- Fixed the overflow when specifying a very large parameter for the `FixedString` data type. +- Fixed a bug in the `topK` aggregate function in a generic case. +- Added the missing check for equality of array sizes in arguments of n-ary variants of aggregate functions with an `-Array` combinator. +- Fixed a bug in `--pager` for `clickhouse-client` (author: ks1322). +- Fixed the precision of the `exp10` function. +- Fixed the behavior of the `visitParamExtract` function for better compliance with documentation. +- Fixed the crash when incorrect data types are specified. +- Fixed the behavior of `DISTINCT` in the case when all columns are constants. +- Fixed query formatting in the case of using the `tupleElement` function with a complex constant expression as the tuple element index. +- Fixed a bug in `Dictionary` tables for `range_hashed` dictionaries. +- Fixed a bug that leads to excessive rows in the result of `FULL` and `RIGHT JOIN` (Amos Bird). +- Fixed a server crash when creating and removing temporary files in `config.d` directories during config reload. +- Fixed the `SYSTEM DROP DNS CACHE` query: the cache was flushed but addresses of cluster nodes were not updated. +- Fixed the behavior of `MATERIALIZED VIEW` after executing `DETACH TABLE` for the table under the view (Marek VavruÅ¡a). + +#### Build Improvements: {#build-improvements-4} + +- The `pbuilder` tool is used for builds. The build process is almost completely independent of the build host environment. +- A single build is used for different OS versions. Packages and binaries have been made compatible with a wide range of Linux systems. +- Added the `clickhouse-test` package. It can be used to run functional tests. +- The source tarball can now be published to the repository. It can be used to reproduce the build without using GitHub. +- Added limited integration with Travis CI. Due to limits on build time in Travis, only the debug build is tested and a limited subset of tests are run. +- Added support for `Cap'n'Proto` in the default build. +- Changed the format of documentation sources from `Restricted Text` to `Markdown`. +- Added support for `systemd` (Vladimir Smirnov). It is disabled by default due to incompatibility with some OS images and can be enabled manually. +- For dynamic code generation, `clang` and `lld` are embedded into the `clickhouse` binary. They can also be invoked as `clickhouse clang` and `clickhouse lld` . +- Removed usage of GNU extensions from the code. Enabled the `-Wextra` option. When building with `clang` the default is `libc++` instead of `libstdc++`. +- Extracted `clickhouse_parsers` and `clickhouse_common_io` libraries to speed up builds of various tools. + +#### Backward Incompatible Changes: {#backward-incompatible-changes-11} + +- The format for marks in `Log` type tables that contain `Nullable` columns was changed in a backward incompatible way. If you have these tables, you should convert them to the `TinyLog` type before starting up the new server version. To do this, replace `ENGINE = Log` with `ENGINE = TinyLog` in the corresponding `.sql` file in the `metadata` directory. If your table does not have `Nullable` columns or if the type of your table is not `Log`, then you do not need to do anything. +- Removed the `experimental_allow_extended_storage_definition_syntax` setting. Now this feature is enabled by default. +- The `runningIncome` function was renamed to `runningDifferenceStartingWithFirstvalue` to avoid confusion. +- Removed the `FROM ARRAY JOIN arr` syntax when ARRAY JOIN is specified directly after FROM with no table (Amos Bird). +- Removed the `BlockTabSeparated` format that was used solely for demonstration purposes. +- Changed the state format for aggregate functions `varSamp`, `varPop`, `stddevSamp`, `stddevPop`, `covarSamp`, `covarPop`, `corr`. If you have stored states of these aggregate functions in tables (using the `AggregateFunction` data type or materialized views with corresponding states), please write to feedback@clickhouse.com. +- In previous server versions there was an undocumented feature: if an aggregate function depends on parameters, you can still specify it without parameters in the AggregateFunction data type. Example: `AggregateFunction(quantiles, UInt64)` instead of `AggregateFunction(quantiles(0.5, 0.9), UInt64)`. This feature was lost. Although it was undocumented, we plan to support it again in future releases. +- Enum data types cannot be used in min/max aggregate functions. This ability will be returned in the next release. + +#### Please Note When Upgrading: {#please-note-when-upgrading} + +- When doing a rolling update on a cluster, at the point when some of the replicas are running the old version of ClickHouse and some are running the new version, replication is temporarily stopped and the message `unknown parameter 'shard'` appears in the log. Replication will continue after all replicas of the cluster are updated. +- If different versions of ClickHouse are running on the cluster servers, it is possible that distributed queries using the following functions will have incorrect results: `varSamp`, `varPop`, `stddevSamp`, `stddevPop`, `covarSamp`, `covarPop`, `corr`. You should update all cluster nodes. + +## [Changelog for 2017](./2017.md) diff --git a/docs/ja/whats-new/changelog/2019.md b/docs/ja/whats-new/changelog/2019.md new file mode 100644 index 00000000000..cd4a2f45ff6 --- /dev/null +++ b/docs/ja/whats-new/changelog/2019.md @@ -0,0 +1,2074 @@ +--- +slug: /ja/whats-new/changelog/2019 +sidebar_position: 15 +sidebar_label: '2019' +title: 2019 Changelog +--- + +## ClickHouse Release 19.17 {#clickhouse-release-v19-17} + +### ClickHouse Release 19.17.6.36, 2019-12-27 {#clickhouse-release-v19-17-6-36-2019-12-27} + +#### Bug Fix {#bug-fix} + +- Fixed potential buffer overflow in decompress. Malicious user can pass fabricated compressed data that could cause read after buffer. This issue was found by Eldar Zaitov from Yandex information security team. [#8404](https://github.com/ClickHouse/ClickHouse/pull/8404) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed possible server crash (`std::terminate`) when the server cannot send or write data in JSON or XML format with values of String data type (that require UTF-8 validation) or when compressing result data with Brotli algorithm or in some other rare cases. [#8384](https://github.com/ClickHouse/ClickHouse/pull/8384) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed dictionaries with source from a clickhouse `VIEW`, now reading such dictionaries does not cause the error `There is no query`. [#8351](https://github.com/ClickHouse/ClickHouse/pull/8351) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fixed checking if a client host is allowed by host_regexp specified in users.xml. [#8241](https://github.com/ClickHouse/ClickHouse/pull/8241), [#8342](https://github.com/ClickHouse/ClickHouse/pull/8342) ([Vitaly Baranov](https://github.com/vitlibar)) +- `RENAME TABLE` for a distributed table now renames the folder containing inserted data before sending to shards. This fixes an issue with successive renames `tableA->tableB`, `tableC->tableA`. [#8306](https://github.com/ClickHouse/ClickHouse/pull/8306) ([tavplubix](https://github.com/tavplubix)) +- `range_hashed` external dictionaries created by DDL queries now allow ranges of arbitrary numeric types. [#8275](https://github.com/ClickHouse/ClickHouse/pull/8275) ([alesapin](https://github.com/alesapin)) +- Fixed `INSERT INTO table SELECT ... FROM mysql(...)` table function. [#8234](https://github.com/ClickHouse/ClickHouse/pull/8234) ([tavplubix](https://github.com/tavplubix)) +- Fixed segfault in `INSERT INTO TABLE FUNCTION file()` while inserting into a file which does not exist. Now in this case file would be created and then insert would be processed. [#8177](https://github.com/ClickHouse/ClickHouse/pull/8177) ([Olga Khvostikova](https://github.com/stavrolia)) +- Fixed bitmapAnd error when intersecting an aggregated bitmap and a scalar bitmap. [#8082](https://github.com/ClickHouse/ClickHouse/pull/8082) ([Yue Huang](https://github.com/moon03432)) +- Fixed segfault when `EXISTS` query was used without `TABLE` or `DICTIONARY` qualifier, just like `EXISTS t`. [#8213](https://github.com/ClickHouse/ClickHouse/pull/8213) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed return type for functions `rand` and `randConstant` in case of nullable argument. Now functions always return `UInt32` and never `Nullable(UInt32)`. [#8204](https://github.com/ClickHouse/ClickHouse/pull/8204) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fixed `DROP DICTIONARY IF EXISTS db.dict`, now it does not throw exception if `db` does not exist. [#8185](https://github.com/ClickHouse/ClickHouse/pull/8185) ([Vitaly Baranov](https://github.com/vitlibar)) +- If a table wasn’t completely dropped because of server crash, the server will try to restore and load it [#8176](https://github.com/ClickHouse/ClickHouse/pull/8176) ([tavplubix](https://github.com/tavplubix)) +- Fixed a trivial count query for a distributed table if there are more than two shard local table. [#8164](https://github.com/ClickHouse/ClickHouse/pull/8164) ([å°è·¯](https://github.com/nicelulu)) +- Fixed bug that lead to a data race in DB::BlockStreamProfileInfo::calculateRowsBeforeLimit() [#8143](https://github.com/ClickHouse/ClickHouse/pull/8143) ([Alexander Kazakov](https://github.com/Akazz)) +- Fixed `ALTER table MOVE part` executed immediately after merging the specified part, which could cause moving a part which the specified part merged into. Now it correctly moves the specified part. [#8104](https://github.com/ClickHouse/ClickHouse/pull/8104) ([Vladimir Chebotarev](https://github.com/excitoon)) +- Expressions for dictionaries can be specified as strings now. This is useful for calculation of attributes while extracting data from non-ClickHouse sources because it allows to use non-ClickHouse syntax for those expressions. [#8098](https://github.com/ClickHouse/ClickHouse/pull/8098) ([alesapin](https://github.com/alesapin)) +- Fixed a very rare race in `clickhouse-copier` because of an overflow in ZXid. [#8088](https://github.com/ClickHouse/ClickHouse/pull/8088) ([Ding Xiang Fei](https://github.com/dingxiangfei2009)) +- Fixed the bug when after the query failed (due to “Too many simultaneous queries†for example) it would not read external tables info, and the + next request would interpret this info as the beginning of the next query causing an error like `Unknown packet from client`. [#8084](https://github.com/ClickHouse/ClickHouse/pull/8084) ([Azat Khuzhin](https://github.com/azat)) +- Avoid null dereference after “Unknown packet X from server†[#8071](https://github.com/ClickHouse/ClickHouse/pull/8071) ([Azat Khuzhin](https://github.com/azat)) +- Restore support of all ICU locales, add the ability to apply collations for constant expressions and add language name to system.collations table. [#8051](https://github.com/ClickHouse/ClickHouse/pull/8051) ([alesapin](https://github.com/alesapin)) +- Number of streams for read from `StorageFile` and `StorageHDFS` is now limited, to avoid exceeding the memory limit. [#7981](https://github.com/ClickHouse/ClickHouse/pull/7981) ([alesapin](https://github.com/alesapin)) +- Fixed `CHECK TABLE` query for `*MergeTree` tables without key. [#7979](https://github.com/ClickHouse/ClickHouse/pull/7979) ([alesapin](https://github.com/alesapin)) +- Removed the mutation number from a part name in case there were no mutations. This removing improved the compatibility with older versions. [#8250](https://github.com/ClickHouse/ClickHouse/pull/8250) ([alesapin](https://github.com/alesapin)) +- Fixed the bug that mutations are skipped for some attached parts due to their data_version are larger than the table mutation version. [#7812](https://github.com/ClickHouse/ClickHouse/pull/7812) ([Zhichang Yu](https://github.com/yuzhichang)) +- Allow starting the server with redundant copies of parts after moving them to another device. [#7810](https://github.com/ClickHouse/ClickHouse/pull/7810) ([Vladimir Chebotarev](https://github.com/excitoon)) +- Fixed the error “Sizes of columns does not match†that might appear when using aggregate function columns. [#7790](https://github.com/ClickHouse/ClickHouse/pull/7790) ([Boris Granveaud](https://github.com/bgranvea)) +- Now an exception will be thrown in case of using WITH TIES alongside LIMIT BY. And now it’s possible to use TOP with LIMIT BY. [#7637](https://github.com/ClickHouse/ClickHouse/pull/7637) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +- Fix dictionary reload if it has `invalidate_query`, which stopped updates and some exception on previous update tries. [#8029](https://github.com/ClickHouse/ClickHouse/pull/8029) ([alesapin](https://github.com/alesapin)) + +### ClickHouse Release 19.17.4.11, 2019-11-22 {#clickhouse-release-v19-17-4-11-2019-11-22} + +#### Backward Incompatible Change {#backward-incompatible-change} + +- Using column instead of AST to store scalar subquery results for better performance. Setting `enable_scalar_subquery_optimization` was added in 19.17 and it was enabled by default. It leads to errors like [this](https://github.com/ClickHouse/ClickHouse/issues/7851) during upgrade to 19.17.2 or 19.17.3 from previous versions. This setting was disabled by default in 19.17.4, to make possible upgrading from 19.16 and older versions without errors. [#7392](https://github.com/ClickHouse/ClickHouse/pull/7392) ([Amos Bird](https://github.com/amosbird)) + +#### New Feature {#new-feature} + +- Add the ability to create dictionaries with DDL queries. [#7360](https://github.com/ClickHouse/ClickHouse/pull/7360) ([alesapin](https://github.com/alesapin)) +- Make `bloom_filter` type of index supporting `LowCardinality` and `Nullable` [#7363](https://github.com/ClickHouse/ClickHouse/issues/7363) [#7561](https://github.com/ClickHouse/ClickHouse/pull/7561) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Add function `isValidJSON` to check that passed string is a valid json. [#5910](https://github.com/ClickHouse/ClickHouse/issues/5910) [#7293](https://github.com/ClickHouse/ClickHouse/pull/7293) ([Vdimir](https://github.com/Vdimir)) +- Implement `arrayCompact` function [#7328](https://github.com/ClickHouse/ClickHouse/pull/7328) ([Memo](https://github.com/Joeywzr)) +- Created function `hex` for Decimal numbers. It works like `hex(reinterpretAsString())`, but does not delete last zero bytes. [#7355](https://github.com/ClickHouse/ClickHouse/pull/7355) ([Mikhail Korotov](https://github.com/millb)) +- Add `arrayFill` and `arrayReverseFill` functions, which replace elements by other elements in front/back of them in the array. [#7380](https://github.com/ClickHouse/ClickHouse/pull/7380) ([hcz](https://github.com/hczhcz)) +- Add `CRC32IEEE()`/`CRC64()` support [#7480](https://github.com/ClickHouse/ClickHouse/pull/7480) ([Azat Khuzhin](https://github.com/azat)) +- Implement `char` function similar to one in [mysql](https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_char) [#7486](https://github.com/ClickHouse/ClickHouse/pull/7486) ([sundyli](https://github.com/sundy-li)) +- Add `bitmapTransform` function. It transforms an array of values in a bitmap to another array of values, the result is a new bitmap [#7598](https://github.com/ClickHouse/ClickHouse/pull/7598) ([Zhichang Yu](https://github.com/yuzhichang)) +- Implemented `javaHashUTF16LE()` function [#7651](https://github.com/ClickHouse/ClickHouse/pull/7651) ([achimbab](https://github.com/achimbab)) +- Add `_shard_num` virtual column for the Distributed engine [#7624](https://github.com/ClickHouse/ClickHouse/pull/7624) ([Azat Khuzhin](https://github.com/azat)) + +#### Experimental Feature {#experimental-feature} + +- Support for processors (new query execution pipeline) in `MergeTree`. [#7181](https://github.com/ClickHouse/ClickHouse/pull/7181) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) + +#### Bug Fix {#bug-fix-1} + +- Fix incorrect float parsing in `Values` [#7817](https://github.com/ClickHouse/ClickHouse/issues/7817) [#7870](https://github.com/ClickHouse/ClickHouse/pull/7870) ([tavplubix](https://github.com/tavplubix)) +- Fix rare deadlock which can happen when trace_log is enabled. [#7838](https://github.com/ClickHouse/ClickHouse/pull/7838) ([filimonov](https://github.com/filimonov)) +- Prevent message duplication when producing Kafka table has any MVs selecting from it [#7265](https://github.com/ClickHouse/ClickHouse/pull/7265) ([Ivan](https://github.com/abyss7)) +- Support for `Array(LowCardinality(Nullable(String)))` in `IN`. Resolves [#7364](https://github.com/ClickHouse/ClickHouse/issues/7364) [#7366](https://github.com/ClickHouse/ClickHouse/pull/7366) ([achimbab](https://github.com/achimbab)) +- Add handling of `SQL_TINYINT` and `SQL_BIGINT`, and fix handling of `SQL_FLOAT` data source types in ODBC Bridge. [#7491](https://github.com/ClickHouse/ClickHouse/pull/7491) ([Denis Glazachev](https://github.com/traceon)) +- Fix aggregation (`avg` and quantiles) over empty decimal columns [#7431](https://github.com/ClickHouse/ClickHouse/pull/7431) ([Andrey Konyaev](https://github.com/akonyaev90)) +- Fix `INSERT` into Distributed with `MATERIALIZED` columns [#7377](https://github.com/ClickHouse/ClickHouse/pull/7377) ([Azat Khuzhin](https://github.com/azat)) +- Make `MOVE PARTITION` work if some parts of partition are already on destination disk or volume [#7434](https://github.com/ClickHouse/ClickHouse/pull/7434) ([Vladimir Chebotarev](https://github.com/excitoon)) +- Fixed bug with hardlinks failing to be created during mutations in `ReplicatedMergeTree` in multi-disk configurations. [#7558](https://github.com/ClickHouse/ClickHouse/pull/7558) ([Vladimir Chebotarev](https://github.com/excitoon)) +- Fixed a bug with a mutation on a MergeTree when whole part remains unchanged and best space is being found on another disk [#7602](https://github.com/ClickHouse/ClickHouse/pull/7602) ([Vladimir Chebotarev](https://github.com/excitoon)) +- Fixed bug with `keep_free_space_ratio` not being read from disks configuration [#7645](https://github.com/ClickHouse/ClickHouse/pull/7645) ([Vladimir Chebotarev](https://github.com/excitoon)) +- Fix bug with table contains only `Tuple` columns or columns with complex paths. Fixes [7541](https://github.com/ClickHouse/ClickHouse/issues/7541). [#7545](https://github.com/ClickHouse/ClickHouse/pull/7545) ([alesapin](https://github.com/alesapin)) +- Do not account memory for Buffer engine in max_memory_usage limit [#7552](https://github.com/ClickHouse/ClickHouse/pull/7552) ([Azat Khuzhin](https://github.com/azat)) +- Fix final mark usage in `MergeTree` tables ordered by `tuple()`. In rare cases it could lead to `Can't adjust last granule` error while select. [#7639](https://github.com/ClickHouse/ClickHouse/pull/7639) ([Anton Popov](https://github.com/CurtizJ)) +- Fix bug in mutations that have predicate with actions that require context (for example functions for json), which may lead to crashes or strange exceptions. [#7664](https://github.com/ClickHouse/ClickHouse/pull/7664) ([alesapin](https://github.com/alesapin)) +- Fix mismatch of database and table names escaping in `data/` and `shadow/` directories [#7575](https://github.com/ClickHouse/ClickHouse/pull/7575) ([Alexander Burmak](https://github.com/Alex-Burmak)) +- Support duplicated keys in RIGHT\|FULL JOINs, e.g. `ON t.x = u.x AND t.x = u.y`. Fix crash in this case. [#7586](https://github.com/ClickHouse/ClickHouse/pull/7586) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix `Not found column in block` when joining on expression with RIGHT or FULL JOIN. [#7641](https://github.com/ClickHouse/ClickHouse/pull/7641) ([Artem Zuikov](https://github.com/4ertus2)) +- One more attempt to fix infinite loop in `PrettySpace` format [#7591](https://github.com/ClickHouse/ClickHouse/pull/7591) ([Olga Khvostikova](https://github.com/stavrolia)) +- Fix bug in `concat` function when all arguments were `FixedString` of the same size. [#7635](https://github.com/ClickHouse/ClickHouse/pull/7635) ([alesapin](https://github.com/alesapin)) +- Fixed exception in case of using 1 argument while defining S3, URL and HDFS storages. [#7618](https://github.com/ClickHouse/ClickHouse/pull/7618) ([Vladimir Chebotarev](https://github.com/excitoon)) +- Fix scope of the InterpreterSelectQuery for views with query [#7601](https://github.com/ClickHouse/ClickHouse/pull/7601) ([Azat Khuzhin](https://github.com/azat)) + +#### Improvement {#improvement} + +- `Nullable` columns recognized and NULL-values handled correctly by ODBC-bridge [#7402](https://github.com/ClickHouse/ClickHouse/pull/7402) ([Vasily Nemkov](https://github.com/Enmk)) +- Write current batch for distributed send atomically [#7600](https://github.com/ClickHouse/ClickHouse/pull/7600) ([Azat Khuzhin](https://github.com/azat)) +- Throw an exception if we cannot detect table for column name in query. [#7358](https://github.com/ClickHouse/ClickHouse/pull/7358) ([Artem Zuikov](https://github.com/4ertus2)) +- Add `merge_max_block_size` setting to `MergeTreeSettings` [#7412](https://github.com/ClickHouse/ClickHouse/pull/7412) ([Artem Zuikov](https://github.com/4ertus2)) +- Queries with `HAVING` and without `GROUP BY` assume group by constant. So, `SELECT 1 HAVING 1` now returns a result. [#7496](https://github.com/ClickHouse/ClickHouse/pull/7496) ([Amos Bird](https://github.com/amosbird)) +- Support parsing `(X,)` as tuple similar to python. [#7501](https://github.com/ClickHouse/ClickHouse/pull/7501), [#7562](https://github.com/ClickHouse/ClickHouse/pull/7562) ([Amos Bird](https://github.com/amosbird)) +- Make `range` function behaviors almost like pythonic one. [#7518](https://github.com/ClickHouse/ClickHouse/pull/7518) ([sundyli](https://github.com/sundy-li)) +- Add `constraints` columns to table `system.settings` [#7553](https://github.com/ClickHouse/ClickHouse/pull/7553) ([Vitaly Baranov](https://github.com/vitlibar)) +- Better Null format for tcp handler, so that it’s possible to use `select ignore() from table format Null` for perf measure via clickhouse-client [#7606](https://github.com/ClickHouse/ClickHouse/pull/7606) ([Amos Bird](https://github.com/amosbird)) +- Queries like `CREATE TABLE ... AS (SELECT (1, 2))` are parsed correctly [#7542](https://github.com/ClickHouse/ClickHouse/pull/7542) ([hcz](https://github.com/hczhcz)) + +#### Performance Improvement {#performance-improvement} + +- The performance of aggregation over short string keys is improved. [#6243](https://github.com/ClickHouse/ClickHouse/pull/6243) ([Alexander Kuzmenkov](https://github.com/akuzm), [Amos Bird](https://github.com/amosbird)) +- Run another pass of syntax/expression analysis to get potential optimizations after constant predicates are folded. [#7497](https://github.com/ClickHouse/ClickHouse/pull/7497) ([Amos Bird](https://github.com/amosbird)) +- Use storage meta info to evaluate trivial `SELECT count() FROM table;` [#7510](https://github.com/ClickHouse/ClickHouse/pull/7510) ([Amos Bird](https://github.com/amosbird), [alexey-milovidov](https://github.com/alexey-milovidov)) +- Vectorize processing `arrayReduce` similar to Aggregator `addBatch`. [#7608](https://github.com/ClickHouse/ClickHouse/pull/7608) ([Amos Bird](https://github.com/amosbird)) +- Minor improvements in performance of `Kafka` consumption [#7475](https://github.com/ClickHouse/ClickHouse/pull/7475) ([Ivan](https://github.com/abyss7)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement} + +- Add support for cross-compiling to the CPU architecture AARCH64. Refactor packager script. [#7370](https://github.com/ClickHouse/ClickHouse/pull/7370) [#7539](https://github.com/ClickHouse/ClickHouse/pull/7539) ([Ivan](https://github.com/abyss7)) +- Unpack darwin-x86_64 and linux-aarch64 toolchains into mounted Docker volume when building packages [#7534](https://github.com/ClickHouse/ClickHouse/pull/7534) ([Ivan](https://github.com/abyss7)) +- Update Docker Image for Binary Packager [#7474](https://github.com/ClickHouse/ClickHouse/pull/7474) ([Ivan](https://github.com/abyss7)) +- Fixed compile errors on macOS Catalina [#7585](https://github.com/ClickHouse/ClickHouse/pull/7585) ([Ernest Poletaev](https://github.com/ernestp)) +- Some refactoring in query analysis logic: split complex class into several simple ones. [#7454](https://github.com/ClickHouse/ClickHouse/pull/7454) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix build without submodules [#7295](https://github.com/ClickHouse/ClickHouse/pull/7295) ([proller](https://github.com/proller)) +- Better `add_globs` in CMake files [#7418](https://github.com/ClickHouse/ClickHouse/pull/7418) ([Amos Bird](https://github.com/amosbird)) +- Remove hardcoded paths in `unwind` target [#7460](https://github.com/ClickHouse/ClickHouse/pull/7460) ([Konstantin Podshumok](https://github.com/podshumok)) +- Allow to use mysql format without ssl [#7524](https://github.com/ClickHouse/ClickHouse/pull/7524) ([proller](https://github.com/proller)) + +#### Other {#other} + +- Added ANTLR4 grammar for ClickHouse SQL dialect [#7595](https://github.com/ClickHouse/ClickHouse/issues/7595) [#7596](https://github.com/ClickHouse/ClickHouse/pull/7596) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +## ClickHouse Release 19.16 {#clickhouse-release-v19-16} + +#### ClickHouse Release 19.16.14.65, 2020-03-25 {#clickhouse-release-v19-16-14-65-2020-03-25} + +- Fixed up a bug in batched calculations of ternary logical OPs on multiple arguments (more than 10). [#8718](https://github.com/ClickHouse/ClickHouse/pull/8718) ([Alexander Kazakov](https://github.com/Akazz)) This bugfix was backported to version 19.16 by a special request from Altinity. + +#### ClickHouse Release 19.16.14.65, 2020-03-05 {#clickhouse-release-v19-16-14-65-2020-03-05} + +- Fix distributed subqueries incompatibility with older CH versions. Fixes [#7851](https://github.com/ClickHouse/ClickHouse/issues/7851) + [(tabplubix)](https://github.com/tavplubix) +- When executing `CREATE` query, fold constant expressions in storage engine arguments. Replace empty database name with current database. Fixes [#6508](https://github.com/ClickHouse/ClickHouse/issues/6508), [#3492](https://github.com/ClickHouse/ClickHouse/issues/3492). Also fix check for local address in `ClickHouseDictionarySource`. + [#9262](https://github.com/ClickHouse/ClickHouse/pull/9262) [(tabplubix)](https://github.com/tavplubix) +- Now background merges in `*MergeTree` table engines family preserve storage policy volume order more accurately. + [#8549](https://github.com/ClickHouse/ClickHouse/pull/8549) ([Vladimir Chebotarev](https://github.com/excitoon)) +- Prevent losing data in `Kafka` in rare cases when exception happens after reading suffix but before commit. Fixes [#9378](https://github.com/ClickHouse/ClickHouse/issues/9378). Related: [#7175](https://github.com/ClickHouse/ClickHouse/issues/7175) + [#9507](https://github.com/ClickHouse/ClickHouse/pull/9507) [(filimonov)](https://github.com/filimonov) +- Fix bug leading to server termination when trying to use / drop `Kafka` table created with wrong parameters. Fixes [#9494](https://github.com/ClickHouse/ClickHouse/issues/9494). Incorporates [#9507](https://github.com/ClickHouse/ClickHouse/issues/9507). + [#9513](https://github.com/ClickHouse/ClickHouse/pull/9513) [(filimonov)](https://github.com/filimonov) +- Allow using `MaterializedView` with subqueries above `Kafka` tables. + [#8197](https://github.com/ClickHouse/ClickHouse/pull/8197) ([filimonov](https://github.com/filimonov)) + +#### New Feature {#new-feature-1} + +- Add `deduplicate_blocks_in_dependent_materialized_views` option to control the behaviour of idempotent inserts into tables with materialized views. This new feature was added to the bugfix release by a special request from Altinity. + [#9070](https://github.com/ClickHouse/ClickHouse/pull/9070) [(urykhy)](https://github.com/urykhy) + +### ClickHouse Release 19.16.2.2, 2019-10-30 {#clickhouse-release-v19-16-2-2-2019-10-30} + +#### Backward Incompatible Change {#backward-incompatible-change-1} + +- Add missing arity validation for count/counIf. + [#7095](https://github.com/ClickHouse/ClickHouse/issues/7095) + [#7298](https://github.com/ClickHouse/ClickHouse/pull/7298) ([Vdimir](https://github.com/Vdimir)) +- Remove legacy `asterisk_left_columns_only` setting (it was disabled by default). + [#7335](https://github.com/ClickHouse/ClickHouse/pull/7335) ([Artem + Zuikov](https://github.com/4ertus2)) +- Format strings for Template data format are now specified in files. + [#7118](https://github.com/ClickHouse/ClickHouse/pull/7118) + ([tavplubix](https://github.com/tavplubix)) + +#### New Feature {#new-feature-2} + +- Introduce uniqCombined64() to calculate cardinality greater than UINT_MAX. + [#7213](https://github.com/ClickHouse/ClickHouse/pull/7213), + [#7222](https://github.com/ClickHouse/ClickHouse/pull/7222) ([Azat + Khuzhin](https://github.com/azat)) +- Support Bloom filter indexes on Array columns. + [#6984](https://github.com/ClickHouse/ClickHouse/pull/6984) + ([achimbab](https://github.com/achimbab)) +- Add a function `getMacro(name)` that returns String with the value of corresponding `` + from server configuration. [#7240](https://github.com/ClickHouse/ClickHouse/pull/7240) + ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Set two configuration options for a dictionary based on an HTTP source: `credentials` and + `http-headers`. [#7092](https://github.com/ClickHouse/ClickHouse/pull/7092) ([Guillaume + Tassery](https://github.com/YiuRULE)) +- Add a new ProfileEvent `Merge` that counts the number of launched background merges. + [#7093](https://github.com/ClickHouse/ClickHouse/pull/7093) ([Mikhail + Korotov](https://github.com/millb)) +- Add fullHostName function that returns a fully qualified domain name. + [#7263](https://github.com/ClickHouse/ClickHouse/issues/7263) + [#7291](https://github.com/ClickHouse/ClickHouse/pull/7291) ([sundyli](https://github.com/sundy-li)) +- Add function `arraySplit` and `arrayReverseSplit` which split an array by “cut off†+ conditions. They are useful in time sequence handling. + [#7294](https://github.com/ClickHouse/ClickHouse/pull/7294) ([hcz](https://github.com/hczhcz)) +- Add new functions that return the Array of all matched indices in multiMatch family of functions. + [#7299](https://github.com/ClickHouse/ClickHouse/pull/7299) ([Danila + Kutenin](https://github.com/danlark1)) +- Add a new database engine `Lazy` that is optimized for storing a large number of small -Log + tables. [#7171](https://github.com/ClickHouse/ClickHouse/pull/7171) ([Nikita + Vasilev](https://github.com/nikvas0)) +- Add aggregate functions groupBitmapAnd, -Or, -Xor for bitmap columns. [#7109](https://github.com/ClickHouse/ClickHouse/pull/7109) ([Zhichang + Yu](https://github.com/yuzhichang)) +- Add aggregate function combinators -OrNull and -OrDefault, which return null + or default values when there is nothing to aggregate. + [#7331](https://github.com/ClickHouse/ClickHouse/pull/7331) + ([hcz](https://github.com/hczhcz)) +- Introduce CustomSeparated data format that supports custom escaping and + delimiter rules. [#7118](https://github.com/ClickHouse/ClickHouse/pull/7118) + ([tavplubix](https://github.com/tavplubix)) +- Support Redis as source of external dictionary. [#4361](https://github.com/ClickHouse/ClickHouse/pull/4361) [#6962](https://github.com/ClickHouse/ClickHouse/pull/6962) ([comunodi](https://github.com/comunodi), [Anton + Popov](https://github.com/CurtizJ)) + +#### Bug Fix {#bug-fix-2} + +- Fix wrong query result if it has `WHERE IN (SELECT ...)` section and `optimize_read_in_order` is + used. [#7371](https://github.com/ClickHouse/ClickHouse/pull/7371) ([Anton + Popov](https://github.com/CurtizJ)) +- Disabled MariaDB authentication plugin, which depends on files outside of project. + [#7140](https://github.com/ClickHouse/ClickHouse/pull/7140) ([Yuriy + Baranov](https://github.com/yurriy)) +- Fix exception `Cannot convert column ... because it is constant but values of constants are different in source and result` which could rarely happen when functions `now()`, `today()`, + `yesterday()`, `randConstant()` are used. + [#7156](https://github.com/ClickHouse/ClickHouse/pull/7156) ([Nikolai + Kochetov](https://github.com/KochetovNicolai)) +- Fixed issue of using HTTP keep alive timeout instead of TCP keep alive timeout. + [#7351](https://github.com/ClickHouse/ClickHouse/pull/7351) ([Vasily + Nemkov](https://github.com/Enmk)) +- Fixed a segmentation fault in groupBitmapOr (issue [#7109](https://github.com/ClickHouse/ClickHouse/issues/7109)). + [#7289](https://github.com/ClickHouse/ClickHouse/pull/7289) ([Zhichang + Yu](https://github.com/yuzhichang)) +- For materialized views the commit for Kafka is called after all data were written. + [#7175](https://github.com/ClickHouse/ClickHouse/pull/7175) ([Ivan](https://github.com/abyss7)) +- Fixed wrong `duration_ms` value in `system.part_log` table. It was ten times off. + [#7172](https://github.com/ClickHouse/ClickHouse/pull/7172) ([Vladimir + Chebotarev](https://github.com/excitoon)) +- A quick fix to resolve crash in LIVE VIEW table and re-enabling all LIVE VIEW tests. + [#7201](https://github.com/ClickHouse/ClickHouse/pull/7201) + ([vzakaznikov](https://github.com/vzakaznikov)) +- Serialize NULL values correctly in min/max indexes of MergeTree parts. + [#7234](https://github.com/ClickHouse/ClickHouse/pull/7234) ([Alexander + Kuzmenkov](https://github.com/akuzm)) +- Don’t put virtual columns to .sql metadata when table is created as `CREATE TABLE AS`. + [#7183](https://github.com/ClickHouse/ClickHouse/pull/7183) ([Ivan](https://github.com/abyss7)) +- Fix segmentation fault in `ATTACH PART` query. + [#7185](https://github.com/ClickHouse/ClickHouse/pull/7185) + ([alesapin](https://github.com/alesapin)) +- Fix wrong result for some queries given by the optimization of empty IN subqueries and empty + INNER/RIGHT JOIN. [#7284](https://github.com/ClickHouse/ClickHouse/pull/7284) ([Nikolai + Kochetov](https://github.com/KochetovNicolai)) +- Fixing AddressSanitizer error in the LIVE VIEW getHeader() method. + [#7271](https://github.com/ClickHouse/ClickHouse/pull/7271) + ([vzakaznikov](https://github.com/vzakaznikov)) + +#### Improvement {#improvement-1} + +- Add a message in case of queue_wait_max_ms wait takes place. + [#7390](https://github.com/ClickHouse/ClickHouse/pull/7390) ([Azat + Khuzhin](https://github.com/azat)) +- Made setting `s3_min_upload_part_size` table-level. + [#7059](https://github.com/ClickHouse/ClickHouse/pull/7059) ([Vladimir + Chebotarev](https://github.com/excitoon)) +- Check TTL in StorageFactory. [#7304](https://github.com/ClickHouse/ClickHouse/pull/7304) + ([sundyli](https://github.com/sundy-li)) +- Squash left-hand blocks in partial merge join (optimization). + [#7122](https://github.com/ClickHouse/ClickHouse/pull/7122) ([Artem + Zuikov](https://github.com/4ertus2)) +- Do not allow non-deterministic functions in mutations of Replicated table engines, because this + can introduce inconsistencies between replicas. + [#7247](https://github.com/ClickHouse/ClickHouse/pull/7247) ([Alexander + Kazakov](https://github.com/Akazz)) +- Disable memory tracker while converting exception stack trace to string. It can prevent the loss + of error messages of type `Memory limit exceeded` on server, which caused the `Attempt to read after eof` exception on client. [#7264](https://github.com/ClickHouse/ClickHouse/pull/7264) + ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Miscellaneous format improvements. Resolves + [#6033](https://github.com/ClickHouse/ClickHouse/issues/6033), + [#2633](https://github.com/ClickHouse/ClickHouse/issues/2633), + [#6611](https://github.com/ClickHouse/ClickHouse/issues/6611), + [#6742](https://github.com/ClickHouse/ClickHouse/issues/6742) + [#7215](https://github.com/ClickHouse/ClickHouse/pull/7215) + ([tavplubix](https://github.com/tavplubix)) +- ClickHouse ignores values on the right side of IN operator that are not convertible to the left + side type. Make it work properly for compound types – Array and Tuple. + [#7283](https://github.com/ClickHouse/ClickHouse/pull/7283) ([Alexander + Kuzmenkov](https://github.com/akuzm)) +- Support missing inequalities for ASOF JOIN. It’s possible to join less-or-equal variant and strict + greater and less variants for ASOF column in ON syntax. + [#7282](https://github.com/ClickHouse/ClickHouse/pull/7282) ([Artem + Zuikov](https://github.com/4ertus2)) +- Optimize partial merge join. [#7070](https://github.com/ClickHouse/ClickHouse/pull/7070) + ([Artem Zuikov](https://github.com/4ertus2)) +- Do not use more than 98K of memory in uniqCombined functions. + [#7236](https://github.com/ClickHouse/ClickHouse/pull/7236), + [#7270](https://github.com/ClickHouse/ClickHouse/pull/7270) ([Azat + Khuzhin](https://github.com/azat)) +- Flush parts of right-hand joining table on disk in PartialMergeJoin (if there is not enough + memory). Load data back when needed. [#7186](https://github.com/ClickHouse/ClickHouse/pull/7186) + ([Artem Zuikov](https://github.com/4ertus2)) + +#### Performance Improvement {#performance-improvement-1} + +- Speed up joinGet with const arguments by avoiding data duplication. + [#7359](https://github.com/ClickHouse/ClickHouse/pull/7359) ([Amos + Bird](https://github.com/amosbird)) +- Return early if the subquery is empty. + [#7007](https://github.com/ClickHouse/ClickHouse/pull/7007) ([å°è·¯](https://github.com/nicelulu)) +- Optimize parsing of SQL expression in Values. + [#6781](https://github.com/ClickHouse/ClickHouse/pull/6781) + ([tavplubix](https://github.com/tavplubix)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-1} + +- Disable some contribs for cross-compilation to Mac OS. + [#7101](https://github.com/ClickHouse/ClickHouse/pull/7101) ([Ivan](https://github.com/abyss7)) +- Add missing linking with PocoXML for clickhouse_common_io. + [#7200](https://github.com/ClickHouse/ClickHouse/pull/7200) ([Azat + Khuzhin](https://github.com/azat)) +- Accept multiple test filter arguments in clickhouse-test. + [#7226](https://github.com/ClickHouse/ClickHouse/pull/7226) ([Alexander + Kuzmenkov](https://github.com/akuzm)) +- Enable musl and jemalloc for ARM. [#7300](https://github.com/ClickHouse/ClickHouse/pull/7300) + ([Amos Bird](https://github.com/amosbird)) +- Added `--client-option` parameter to `clickhouse-test` to pass additional parameters to client. + [#7277](https://github.com/ClickHouse/ClickHouse/pull/7277) ([Nikolai + Kochetov](https://github.com/KochetovNicolai)) +- Preserve existing configs on rpm package upgrade. + [#7103](https://github.com/ClickHouse/ClickHouse/pull/7103) + ([filimonov](https://github.com/filimonov)) +- Fix errors detected by PVS. [#7153](https://github.com/ClickHouse/ClickHouse/pull/7153) ([Artem + Zuikov](https://github.com/4ertus2)) +- Fix build for Darwin. [#7149](https://github.com/ClickHouse/ClickHouse/pull/7149) + ([Ivan](https://github.com/abyss7)) +- glibc 2.29 compatibility. [#7142](https://github.com/ClickHouse/ClickHouse/pull/7142) ([Amos + Bird](https://github.com/amosbird)) +- Make sure dh_clean does not touch potential source files. + [#7205](https://github.com/ClickHouse/ClickHouse/pull/7205) ([Amos + Bird](https://github.com/amosbird)) +- Attempt to avoid conflict when updating from altinity rpm - it has config file packaged separately + in clickhouse-server-common. [#7073](https://github.com/ClickHouse/ClickHouse/pull/7073) + ([filimonov](https://github.com/filimonov)) +- Optimize some header files for faster rebuilds. + [#7212](https://github.com/ClickHouse/ClickHouse/pull/7212), + [#7231](https://github.com/ClickHouse/ClickHouse/pull/7231) ([Alexander + Kuzmenkov](https://github.com/akuzm)) +- Add performance tests for Date and DateTime. [#7332](https://github.com/ClickHouse/ClickHouse/pull/7332) ([Vasily + Nemkov](https://github.com/Enmk)) +- Fix some tests that contained non-deterministic mutations. + [#7132](https://github.com/ClickHouse/ClickHouse/pull/7132) ([Alexander + Kazakov](https://github.com/Akazz)) +- Add build with MemorySanitizer to CI. [#7066](https://github.com/ClickHouse/ClickHouse/pull/7066) + ([Alexander Kuzmenkov](https://github.com/akuzm)) +- Avoid use of uninitialized values in MetricsTransmitter. + [#7158](https://github.com/ClickHouse/ClickHouse/pull/7158) ([Azat + Khuzhin](https://github.com/azat)) +- Fix some issues in Fields found by MemorySanitizer. + [#7135](https://github.com/ClickHouse/ClickHouse/pull/7135), + [#7179](https://github.com/ClickHouse/ClickHouse/pull/7179) ([Alexander + Kuzmenkov](https://github.com/akuzm)), [#7376](https://github.com/ClickHouse/ClickHouse/pull/7376) + ([Amos Bird](https://github.com/amosbird)) +- Fix undefined behavior in murmurhash32. [#7388](https://github.com/ClickHouse/ClickHouse/pull/7388) ([Amos + Bird](https://github.com/amosbird)) +- Fix undefined behavior in StoragesInfoStream. [#7384](https://github.com/ClickHouse/ClickHouse/pull/7384) + ([tavplubix](https://github.com/tavplubix)) +- Fixed constant expressions folding for external database engines (MySQL, ODBC, JDBC). In previous + versions it wasn’t working for multiple constant expressions and was not working at all for Date, + DateTime and UUID. This fixes [#7245](https://github.com/ClickHouse/ClickHouse/issues/7245) + [#7252](https://github.com/ClickHouse/ClickHouse/pull/7252) + ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixing ThreadSanitizer data race error in the LIVE VIEW when accessing no_users_thread variable. + [#7353](https://github.com/ClickHouse/ClickHouse/pull/7353) + ([vzakaznikov](https://github.com/vzakaznikov)) +- Get rid of malloc symbols in libcommon + [#7134](https://github.com/ClickHouse/ClickHouse/pull/7134), + [#7065](https://github.com/ClickHouse/ClickHouse/pull/7065) ([Amos + Bird](https://github.com/amosbird)) +- Add global flag ENABLE_LIBRARIES for disabling all libraries. + [#7063](https://github.com/ClickHouse/ClickHouse/pull/7063) + ([proller](https://github.com/proller)) + +#### Code Cleanup {#code-cleanup} + +- Generalize configuration repository to prepare for DDL for Dictionaries. [#7155](https://github.com/ClickHouse/ClickHouse/pull/7155) + ([alesapin](https://github.com/alesapin)) +- Parser for dictionaries DDL without any semantic. + [#7209](https://github.com/ClickHouse/ClickHouse/pull/7209) + ([alesapin](https://github.com/alesapin)) +- Split ParserCreateQuery into different smaller parsers. + [#7253](https://github.com/ClickHouse/ClickHouse/pull/7253) + ([alesapin](https://github.com/alesapin)) +- Small refactoring and renaming near external dictionaries. + [#7111](https://github.com/ClickHouse/ClickHouse/pull/7111) + ([alesapin](https://github.com/alesapin)) +- Refactor some code to prepare for role-based access control. [#7235](https://github.com/ClickHouse/ClickHouse/pull/7235) ([Vitaly + Baranov](https://github.com/vitlibar)) +- Some improvements in DatabaseOrdinary code. + [#7086](https://github.com/ClickHouse/ClickHouse/pull/7086) ([Nikita + Vasilev](https://github.com/nikvas0)) +- Do not use iterators in find() and emplace() methods of hash tables. + [#7026](https://github.com/ClickHouse/ClickHouse/pull/7026) ([Alexander + Kuzmenkov](https://github.com/akuzm)) +- Fix getMultipleValuesFromConfig in case when parameter root is not empty. [#7374](https://github.com/ClickHouse/ClickHouse/pull/7374) + ([Mikhail Korotov](https://github.com/millb)) +- Remove some copy-paste (TemporaryFile and TemporaryFileStream) + [#7166](https://github.com/ClickHouse/ClickHouse/pull/7166) ([Artem + Zuikov](https://github.com/4ertus2)) +- Improved code readability a little bit (`MergeTreeData::getActiveContainingPart`). + [#7361](https://github.com/ClickHouse/ClickHouse/pull/7361) ([Vladimir + Chebotarev](https://github.com/excitoon)) +- Wait for all scheduled jobs, which are using local objects, if `ThreadPool::schedule(...)` throws + an exception. Rename `ThreadPool::schedule(...)` to `ThreadPool::scheduleOrThrowOnError(...)` and + fix comments to make obvious that it may throw. + [#7350](https://github.com/ClickHouse/ClickHouse/pull/7350) + ([tavplubix](https://github.com/tavplubix)) + +## ClickHouse Release 19.15 {#clickhouse-release-19-15} + +### ClickHouse Release 19.15.4.10, 2019-10-31 {#clickhouse-release-19-15-4-10-2019-10-31} + +#### Bug Fix {#bug-fix-3} + +- Added handling of SQL_TINYINT and SQL_BIGINT, and fix handling of SQL_FLOAT data source types in ODBC Bridge. + [#7491](https://github.com/ClickHouse/ClickHouse/pull/7491) ([Denis Glazachev](https://github.com/traceon)) +- Allowed to have some parts on destination disk or volume in MOVE PARTITION. + [#7434](https://github.com/ClickHouse/ClickHouse/pull/7434) ([Vladimir Chebotarev](https://github.com/excitoon)) +- Fixed NULL-values in nullable columns through ODBC-bridge. + [#7402](https://github.com/ClickHouse/ClickHouse/pull/7402) ([Vasily Nemkov](https://github.com/Enmk)) +- Fixed INSERT into Distributed non local node with MATERIALIZED columns. + [#7377](https://github.com/ClickHouse/ClickHouse/pull/7377) ([Azat Khuzhin](https://github.com/azat)) +- Fixed function getMultipleValuesFromConfig. + [#7374](https://github.com/ClickHouse/ClickHouse/pull/7374) ([Mikhail Korotov](https://github.com/millb)) +- Fixed issue of using HTTP keep alive timeout instead of TCP keep alive timeout. + [#7351](https://github.com/ClickHouse/ClickHouse/pull/7351) ([Vasily Nemkov](https://github.com/Enmk)) +- Wait for all jobs to finish on exception (fixes rare segfaults). + [#7350](https://github.com/ClickHouse/ClickHouse/pull/7350) ([tavplubix](https://github.com/tavplubix)) +- Don’t push to MVs when inserting into Kafka table. + [#7265](https://github.com/ClickHouse/ClickHouse/pull/7265) ([Ivan](https://github.com/abyss7)) +- Disable memory tracker for exception stack. + [#7264](https://github.com/ClickHouse/ClickHouse/pull/7264) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fixed bad code in transforming query for external database. + [#7252](https://github.com/ClickHouse/ClickHouse/pull/7252) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Avoid use of uninitialized values in MetricsTransmitter. + [#7158](https://github.com/ClickHouse/ClickHouse/pull/7158) ([Azat Khuzhin](https://github.com/azat)) +- Added example config with macros for tests ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.15.3.6, 2019-10-09 {#clickhouse-release-19-15-3-6-2019-10-09} + +#### Bug Fix {#bug-fix-4} + +- Fixed bad_variant in hashed dictionary. + ([alesapin](https://github.com/alesapin)) +- Fixed up bug with segmentation fault in ATTACH PART query. + ([alesapin](https://github.com/alesapin)) +- Fixed time calculation in `MergeTreeData`. + ([Vladimir Chebotarev](https://github.com/excitoon)) +- Commit to Kafka explicitly after the writing is finalized. + [#7175](https://github.com/ClickHouse/ClickHouse/pull/7175) ([Ivan](https://github.com/abyss7)) +- Serialize NULL values correctly in min/max indexes of MergeTree parts. + [#7234](https://github.com/ClickHouse/ClickHouse/pull/7234) ([Alexander Kuzmenkov](https://github.com/akuzm)) + +### ClickHouse Release 19.15.2.2, 2019-10-01 {#clickhouse-release-19-15-2-2-2019-10-01} + +#### New Feature {#new-feature-3} + +- Tiered storage: support to use multiple storage volumes for tables with MergeTree engine. It’s possible to store fresh data on SSD and automatically move old data to HDD. ([example](https://clickhouse.github.io/clickhouse-presentations/meetup30/new_features/#12)). [#4918](https://github.com/ClickHouse/ClickHouse/pull/4918) ([Igr](https://github.com/ObjatieGroba)) [#6489](https://github.com/ClickHouse/ClickHouse/pull/6489) ([alesapin](https://github.com/alesapin)) +- Add table function `input` for reading incoming data in `INSERT SELECT` query. [#5450](https://github.com/ClickHouse/ClickHouse/pull/5450) ([palasonic1](https://github.com/palasonic1)) [#6832](https://github.com/ClickHouse/ClickHouse/pull/6832) ([Anton Popov](https://github.com/CurtizJ)) +- Add a `sparse_hashed` dictionary layout, that is functionally equivalent to the `hashed` layout, but is more memory efficient. It uses about twice as less memory at the cost of slower value retrieval. [#6894](https://github.com/ClickHouse/ClickHouse/pull/6894) ([Azat Khuzhin](https://github.com/azat)) +- Implement ability to define list of users for access to dictionaries. Only current connected database using. [#6907](https://github.com/ClickHouse/ClickHouse/pull/6907) ([Guillaume Tassery](https://github.com/YiuRULE)) +- Add `LIMIT` option to `SHOW` query. [#6944](https://github.com/ClickHouse/ClickHouse/pull/6944) ([Philipp Malkovsky](https://github.com/malkfilipp)) +- Add `bitmapSubsetLimit(bitmap, range_start, limit)` function, that returns subset of the smallest `limit` values in set that is no smaller than `range_start`. [#6957](https://github.com/ClickHouse/ClickHouse/pull/6957) ([Zhichang Yu](https://github.com/yuzhichang)) +- Add `bitmapMin` and `bitmapMax` functions. [#6970](https://github.com/ClickHouse/ClickHouse/pull/6970) ([Zhichang Yu](https://github.com/yuzhichang)) +- Add function `repeat` related to [issue-6648](https://github.com/ClickHouse/ClickHouse/issues/6648) [#6999](https://github.com/ClickHouse/ClickHouse/pull/6999) ([flynn](https://github.com/ucasFL)) + +#### Experimental Feature {#experimental-feature-1} + +- Implement (in memory) Merge Join variant that does not change current pipeline. Result is partially sorted by merge key. Set `partial_merge_join = 1` to use this feature. The Merge Join is still in development. [#6940](https://github.com/ClickHouse/ClickHouse/pull/6940) ([Artem Zuikov](https://github.com/4ertus2)) +- Add `S3` engine and table function. It is still in development (no authentication support yet). [#5596](https://github.com/ClickHouse/ClickHouse/pull/5596) ([Vladimir Chebotarev](https://github.com/excitoon)) + +#### Improvement {#improvement-2} + +- Every message read from Kafka is inserted atomically. This resolves almost all known issues with Kafka engine. [#6950](https://github.com/ClickHouse/ClickHouse/pull/6950) ([Ivan](https://github.com/abyss7)) +- Improvements for failover of Distributed queries. Shorten recovery time, also it is now configurable and can be seen in `system.clusters`. [#6399](https://github.com/ClickHouse/ClickHouse/pull/6399) ([Vasily Nemkov](https://github.com/Enmk)) +- Support numeric values for Enums directly in `IN` section. #6766 [#6941](https://github.com/ClickHouse/ClickHouse/pull/6941) ([dimarub2000](https://github.com/dimarub2000)) +- Support (optional, disabled by default) redirects on URL storage. [#6914](https://github.com/ClickHouse/ClickHouse/pull/6914) ([maqroll](https://github.com/maqroll)) +- Add information message when client with an older version connects to a server. [#6893](https://github.com/ClickHouse/ClickHouse/pull/6893) ([Philipp Malkovsky](https://github.com/malkfilipp)) +- Remove maximum backoff sleep time limit for sending data in Distributed tables [#6895](https://github.com/ClickHouse/ClickHouse/pull/6895) ([Azat Khuzhin](https://github.com/azat)) +- Add ability to send profile events (counters) with cumulative values to graphite. It can be enabled under `` in server `config.xml`. [#6969](https://github.com/ClickHouse/ClickHouse/pull/6969) ([Azat Khuzhin](https://github.com/azat)) +- Add automatically cast type `T` to `LowCardinality(T)` while inserting data in column of type `LowCardinality(T)` in Native format via HTTP. [#6891](https://github.com/ClickHouse/ClickHouse/pull/6891) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Add ability to use function `hex` without using `reinterpretAsString` for `Float32`, `Float64`. [#7024](https://github.com/ClickHouse/ClickHouse/pull/7024) ([Mikhail Korotov](https://github.com/millb)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-2} + +- Add gdb-index to clickhouse binary with debug info. It will speed up startup time of `gdb`. [#6947](https://github.com/ClickHouse/ClickHouse/pull/6947) ([alesapin](https://github.com/alesapin)) +- Speed up deb packaging with patched dpkg-deb which uses `pigz`. [#6960](https://github.com/ClickHouse/ClickHouse/pull/6960) ([alesapin](https://github.com/alesapin)) +- Set `enable_fuzzing = 1` to enable libfuzzer instrumentation of all the project code. [#7042](https://github.com/ClickHouse/ClickHouse/pull/7042) ([kyprizel](https://github.com/kyprizel)) +- Add split build smoke test in CI. [#7061](https://github.com/ClickHouse/ClickHouse/pull/7061) ([alesapin](https://github.com/alesapin)) +- Add build with MemorySanitizer to CI. [#7066](https://github.com/ClickHouse/ClickHouse/pull/7066) ([Alexander Kuzmenkov](https://github.com/akuzm)) +- Replace `libsparsehash` with `sparsehash-c11` [#6965](https://github.com/ClickHouse/ClickHouse/pull/6965) ([Azat Khuzhin](https://github.com/azat)) + +#### Bug Fix {#bug-fix-5} + +- Fixed performance degradation of index analysis on complex keys on large tables. This fixes #6924. [#7075](https://github.com/ClickHouse/ClickHouse/pull/7075) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix logical error causing segfaults when selecting from Kafka empty topic. [#6909](https://github.com/ClickHouse/ClickHouse/pull/6909) ([Ivan](https://github.com/abyss7)) +- Fix too early MySQL connection close in `MySQLBlockInputStream.cpp`. [#6882](https://github.com/ClickHouse/ClickHouse/pull/6882) ([Clément Rodriguez](https://github.com/clemrodriguez)) +- Returned support for very old Linux kernels (fix [#6841](https://github.com/ClickHouse/ClickHouse/issues/6841)) [#6853](https://github.com/ClickHouse/ClickHouse/pull/6853) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix possible data loss in `insert select` query in case of empty block in input stream. #6834 #6862 [#6911](https://github.com/ClickHouse/ClickHouse/pull/6911) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fix for function `ÐrrayEnumerateUniqRanked` with empty arrays in params [#6928](https://github.com/ClickHouse/ClickHouse/pull/6928) ([proller](https://github.com/proller)) +- Fix complex queries with array joins and global subqueries. [#6934](https://github.com/ClickHouse/ClickHouse/pull/6934) ([Ivan](https://github.com/abyss7)) +- Fix `Unknown identifier` error in ORDER BY and GROUP BY with multiple JOINs [#7022](https://github.com/ClickHouse/ClickHouse/pull/7022) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed `MSan` warning while executing function with `LowCardinality` argument. [#7062](https://github.com/ClickHouse/ClickHouse/pull/7062) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) + +#### Backward Incompatible Change {#backward-incompatible-change-2} + +- Changed serialization format of bitmap\* aggregate function states to improve performance. Serialized states of bitmap\* from previous versions cannot be read. [#6908](https://github.com/ClickHouse/ClickHouse/pull/6908) ([Zhichang Yu](https://github.com/yuzhichang)) + +## ClickHouse Release 19.14 {#clickhouse-release-19-14} + +### ClickHouse Release 19.14.7.15, 2019-10-02 {#clickhouse-release-19-14-7-15-2019-10-02} + +#### Bug Fix {#bug-fix-6} + +- This release also contains all bug fixes from 19.11.12.69. +- Fixed compatibility for distributed queries between 19.14 and earlier versions. This fixes [#7068](https://github.com/ClickHouse/ClickHouse/issues/7068). [#7069](https://github.com/ClickHouse/ClickHouse/pull/7069) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.14.6.12, 2019-09-19 {#clickhouse-release-19-14-6-12-2019-09-19} + +#### Bug Fix {#bug-fix-7} + +- Fix for function `ÐrrayEnumerateUniqRanked` with empty arrays in params. [#6928](https://github.com/ClickHouse/ClickHouse/pull/6928) ([proller](https://github.com/proller)) +- Fixed subquery name in queries with `ARRAY JOIN` and `GLOBAL IN subquery` with alias. Use subquery alias for external table name if it is specified. [#6934](https://github.com/ClickHouse/ClickHouse/pull/6934) ([Ivan](https://github.com/abyss7)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-3} + +- Fix [flapping](https://clickhouse-test-reports.s3.yandex.net/6944/aab95fd5175a513413c7395a73a82044bdafb906/functional_stateless_tests_(debug).html) test `00715_fetch_merged_or_mutated_part_zookeeper` by rewriting it to a shell scripts because it needs to wait for mutations to apply. [#6977](https://github.com/ClickHouse/ClickHouse/pull/6977) ([Alexander Kazakov](https://github.com/Akazz)) +- Fixed UBSan and MemSan failure in function `groupUniqArray` with emtpy array argument. It was caused by placing of empty `PaddedPODArray` into hash table zero cell because constructor for zero cell value was not called. [#6937](https://github.com/ClickHouse/ClickHouse/pull/6937) ([Amos Bird](https://github.com/amosbird)) + +### ClickHouse Release 19.14.3.3, 2019-09-10 {#clickhouse-release-19-14-3-3-2019-09-10} + +#### New Feature {#new-feature-4} + +- `WITH FILL` modifier for `ORDER BY`. (continuation of [#5069](https://github.com/ClickHouse/ClickHouse/issues/5069)) [#6610](https://github.com/ClickHouse/ClickHouse/pull/6610) ([Anton Popov](https://github.com/CurtizJ)) +- `WITH TIES` modifier for `LIMIT`. (continuation of [#5069](https://github.com/ClickHouse/ClickHouse/issues/5069)) [#6610](https://github.com/ClickHouse/ClickHouse/pull/6610) ([Anton Popov](https://github.com/CurtizJ)) +- Parse unquoted `NULL` literal as NULL (if setting `format_csv_unquoted_null_literal_as_null=1`). Initialize null fields with default values if data type of this field is not nullable (if setting `input_format_null_as_default=1`). [#5990](https://github.com/ClickHouse/ClickHouse/issues/5990) [#6055](https://github.com/ClickHouse/ClickHouse/pull/6055) ([tavplubix](https://github.com/tavplubix)) +- Support for wildcards in paths of table functions `file` and `hdfs`. If the path contains wildcards, the table will be readonly. Example of usage: `select * from hdfs('hdfs://hdfs1:9000/some_dir/another_dir/*/file{0..9}{0..9}')` and `select * from file('some_dir/{some_file,another_file,yet_another}.tsv', 'TSV', 'value UInt32')`. [#6092](https://github.com/ClickHouse/ClickHouse/pull/6092) ([Olga Khvostikova](https://github.com/stavrolia)) +- New `system.metric_log` table which stores values of `system.events` and `system.metrics` with specified time interval. [#6363](https://github.com/ClickHouse/ClickHouse/issues/6363) [#6467](https://github.com/ClickHouse/ClickHouse/pull/6467) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) [#6530](https://github.com/ClickHouse/ClickHouse/pull/6530) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Allow to write ClickHouse text logs to `system.text_log` table. [#6037](https://github.com/ClickHouse/ClickHouse/issues/6037) [#6103](https://github.com/ClickHouse/ClickHouse/pull/6103) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) [#6164](https://github.com/ClickHouse/ClickHouse/pull/6164) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Show private symbols in stack traces (this is done via parsing symbol tables of ELF files). Added information about file and line number in stack traces if debug info is present. Speedup symbol name lookup with indexing symbols present in program. Added new SQL functions for introspection: `demangle` and `addressToLine`. Renamed function `symbolizeAddress` to `addressToSymbol` for consistency. Function `addressToSymbol` will return mangled name for performance reasons and you have to apply `demangle`. Added setting `allow_introspection_functions` which is turned off by default. [#6201](https://github.com/ClickHouse/ClickHouse/pull/6201) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Table function `values` (the name is case-insensitive). It allows to read from `VALUES` list proposed in [#5984](https://github.com/ClickHouse/ClickHouse/issues/5984). Example: `SELECT * FROM VALUES('a UInt64, s String', (1, 'one'), (2, 'two'), (3, 'three'))`. [#6217](https://github.com/ClickHouse/ClickHouse/issues/6217). [#6209](https://github.com/ClickHouse/ClickHouse/pull/6209) ([dimarub2000](https://github.com/dimarub2000)) +- Added an ability to alter storage settings. Syntax: `ALTER TABLE
    MODIFY SETTING = `. [#6366](https://github.com/ClickHouse/ClickHouse/pull/6366) [#6669](https://github.com/ClickHouse/ClickHouse/pull/6669) [#6685](https://github.com/ClickHouse/ClickHouse/pull/6685) ([alesapin](https://github.com/alesapin)) +- Support for removing of detached parts. Syntax: `ALTER TABLE DROP DETACHED PART ''`. [#6158](https://github.com/ClickHouse/ClickHouse/pull/6158) ([tavplubix](https://github.com/tavplubix)) +- Table constraints. Allows to add constraint to table definition which will be checked at insert. [#5273](https://github.com/ClickHouse/ClickHouse/pull/5273) ([Gleb Novikov](https://github.com/NanoBjorn)) [#6652](https://github.com/ClickHouse/ClickHouse/pull/6652) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Suppport for cascaded materialized views. [#6324](https://github.com/ClickHouse/ClickHouse/pull/6324) ([Amos Bird](https://github.com/amosbird)) +- Turn on query profiler by default to sample every query execution thread once a second. [#6283](https://github.com/ClickHouse/ClickHouse/pull/6283) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Input format `ORC`. [#6454](https://github.com/ClickHouse/ClickHouse/pull/6454) [#6703](https://github.com/ClickHouse/ClickHouse/pull/6703) ([akonyaev90](https://github.com/akonyaev90)) +- Added two new functions: `sigmoid` and `tanh` (that are useful for machine learning applications). [#6254](https://github.com/ClickHouse/ClickHouse/pull/6254) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Function `hasToken(haystack, token)`, `hasTokenCaseInsensitive(haystack, token)` to check if given token is in haystack. Token is a maximal length substring between two non alphanumeric ASCII characters (or boundaries of haystack). Token must be a constant string. Supported by tokenbf_v1 index specialization. [#6596](https://github.com/ClickHouse/ClickHouse/pull/6596), [#6662](https://github.com/ClickHouse/ClickHouse/pull/6662) ([Vasily Nemkov](https://github.com/Enmk)) +- New function `neighbor(value, offset[, default_value])`. Allows to reach prev/next value within column in a block of data. [#5925](https://github.com/ClickHouse/ClickHouse/pull/5925) ([Alex Krash](https://github.com/alex-krash)) [6685365ab8c5b74f9650492c88a012596eb1b0c6](https://github.com/ClickHouse/ClickHouse/commit/6685365ab8c5b74f9650492c88a012596eb1b0c6) [341e2e4587a18065c2da1ca888c73389f48ce36c](https://github.com/ClickHouse/ClickHouse/commit/341e2e4587a18065c2da1ca888c73389f48ce36c) [Alexey Milovidov](https://github.com/alexey-milovidov) +- Created a function `currentUser()`, returning login of authorized user. Added alias `user()` for compatibility with MySQL. [#6470](https://github.com/ClickHouse/ClickHouse/pull/6470) ([Alex Krash](https://github.com/alex-krash)) +- New aggregate functions `quantilesExactInclusive` and `quantilesExactExclusive` which were proposed in [#5885](https://github.com/ClickHouse/ClickHouse/issues/5885). [#6477](https://github.com/ClickHouse/ClickHouse/pull/6477) ([dimarub2000](https://github.com/dimarub2000)) +- Function `bitmapRange(bitmap, range_begin, range_end)` which returns new set with specified range (not include the `range_end`). [#6314](https://github.com/ClickHouse/ClickHouse/pull/6314) ([Zhichang Yu](https://github.com/yuzhichang)) +- Function `geohashesInBox(longitude_min, latitude_min, longitude_max, latitude_max, precision)` which creates array of precision-long strings of geohash-boxes covering provided area. [#6127](https://github.com/ClickHouse/ClickHouse/pull/6127) ([Vasily Nemkov](https://github.com/Enmk)) +- Implement support for INSERT query with `Kafka` tables. [#6012](https://github.com/ClickHouse/ClickHouse/pull/6012) ([Ivan](https://github.com/abyss7)) +- Added support for `_partition` and `_timestamp` virtual columns to Kafka engine. [#6400](https://github.com/ClickHouse/ClickHouse/pull/6400) ([Ivan](https://github.com/abyss7)) +- Possibility to remove sensitive data from `query_log`, server logs, process list with regexp-based rules. [#5710](https://github.com/ClickHouse/ClickHouse/pull/5710) ([filimonov](https://github.com/filimonov)) + +#### Experimental Feature {#experimental-feature-2} + +- Input and output data format `Template`. It allows to specify custom format string for input and output. [#4354](https://github.com/ClickHouse/ClickHouse/issues/4354) [#6727](https://github.com/ClickHouse/ClickHouse/pull/6727) ([tavplubix](https://github.com/tavplubix)) +- Implementation of `LIVE VIEW` tables that were originally proposed in [#2898](https://github.com/ClickHouse/ClickHouse/pull/2898), prepared in [#3925](https://github.com/ClickHouse/ClickHouse/issues/3925), and then updated in [#5541](https://github.com/ClickHouse/ClickHouse/issues/5541). See [#5541](https://github.com/ClickHouse/ClickHouse/issues/5541) for detailed description. [#5541](https://github.com/ClickHouse/ClickHouse/issues/5541) ([vzakaznikov](https://github.com/vzakaznikov)) [#6425](https://github.com/ClickHouse/ClickHouse/pull/6425) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) [#6656](https://github.com/ClickHouse/ClickHouse/pull/6656) ([vzakaznikov](https://github.com/vzakaznikov)) Note that `LIVE VIEW` feature may be removed in next versions. + +#### Bug Fix {#bug-fix-8} + +- This release also contains all bug fixes from 19.13 and 19.11. +- Fix segmentation fault when the table has skip indices and vertical merge happens. [#6723](https://github.com/ClickHouse/ClickHouse/pull/6723) ([alesapin](https://github.com/alesapin)) +- Fix per-column TTL with non-trivial column defaults. Previously in case of force TTL merge with `OPTIMIZE ... FINAL` query, expired values was replaced by type defaults instead of user-specified column defaults. [#6796](https://github.com/ClickHouse/ClickHouse/pull/6796) ([Anton Popov](https://github.com/CurtizJ)) +- Fix Kafka messages duplication problem on normal server restart. [#6597](https://github.com/ClickHouse/ClickHouse/pull/6597) ([Ivan](https://github.com/abyss7)) +- Fixed infinite loop when reading Kafka messages. Do not pause/resume consumer on subscription at all - otherwise it may get paused indefinitely in some scenarios. [#6354](https://github.com/ClickHouse/ClickHouse/pull/6354) ([Ivan](https://github.com/abyss7)) +- Fix `Key expression contains comparison between inconvertible types` exception in `bitmapContains` function. [#6136](https://github.com/ClickHouse/ClickHouse/issues/6136) [#6146](https://github.com/ClickHouse/ClickHouse/issues/6146) [#6156](https://github.com/ClickHouse/ClickHouse/pull/6156) ([dimarub2000](https://github.com/dimarub2000)) +- Fix segfault with enabled `optimize_skip_unused_shards` and missing sharding key. [#6384](https://github.com/ClickHouse/ClickHouse/pull/6384) ([Anton Popov](https://github.com/CurtizJ)) +- Fixed wrong code in mutations that may lead to memory corruption. Fixed segfault with read of address `0x14c0` that may happed due to concurrent `DROP TABLE` and `SELECT` from `system.parts` or `system.parts_columns`. Fixed race condition in preparation of mutation queries. Fixed deadlock caused by `OPTIMIZE` of Replicated tables and concurrent modification operations like ALTERs. [#6514](https://github.com/ClickHouse/ClickHouse/pull/6514) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Removed extra verbose logging in MySQL interface [#6389](https://github.com/ClickHouse/ClickHouse/pull/6389) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Return the ability to parse boolean settings from ‘true’ and ‘false’ in the configuration file. [#6278](https://github.com/ClickHouse/ClickHouse/pull/6278) ([alesapin](https://github.com/alesapin)) +- Fix crash in `quantile` and `median` function over `Nullable(Decimal128)`. [#6378](https://github.com/ClickHouse/ClickHouse/pull/6378) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed possible incomplete result returned by `SELECT` query with `WHERE` condition on primary key contained conversion to Float type. It was caused by incorrect checking of monotonicity in `toFloat` function. [#6248](https://github.com/ClickHouse/ClickHouse/issues/6248) [#6374](https://github.com/ClickHouse/ClickHouse/pull/6374) ([dimarub2000](https://github.com/dimarub2000)) +- Check `max_expanded_ast_elements` setting for mutations. Clear mutations after `TRUNCATE TABLE`. [#6205](https://github.com/ClickHouse/ClickHouse/pull/6205) ([Winter Zhang](https://github.com/zhang2014)) +- Fix JOIN results for key columns when used with `join_use_nulls`. Attach Nulls instead of columns defaults. [#6249](https://github.com/ClickHouse/ClickHouse/pull/6249) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix for skip indices with vertical merge and alter. Fix for `Bad size of marks file` exception. [#6594](https://github.com/ClickHouse/ClickHouse/issues/6594) [#6713](https://github.com/ClickHouse/ClickHouse/pull/6713) ([alesapin](https://github.com/alesapin)) +- Fix rare crash in `ALTER MODIFY COLUMN` and vertical merge when one of merged/altered parts is empty (0 rows) [#6746](https://github.com/ClickHouse/ClickHouse/issues/6746) [#6780](https://github.com/ClickHouse/ClickHouse/pull/6780) ([alesapin](https://github.com/alesapin)) +- Fixed bug in conversion of `LowCardinality` types in `AggregateFunctionFactory`. This fixes [#6257](https://github.com/ClickHouse/ClickHouse/issues/6257). [#6281](https://github.com/ClickHouse/ClickHouse/pull/6281) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fix wrong behavior and possible segfaults in `topK` and `topKWeighted` aggregated functions. [#6404](https://github.com/ClickHouse/ClickHouse/pull/6404) ([Anton Popov](https://github.com/CurtizJ)) +- Fixed unsafe code around `getIdentifier` function. [#6401](https://github.com/ClickHouse/ClickHouse/issues/6401) [#6409](https://github.com/ClickHouse/ClickHouse/pull/6409) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed bug in MySQL wire protocol (is used while connecting to ClickHouse form MySQL client). Caused by heap buffer overflow in `PacketPayloadWriteBuffer`. [#6212](https://github.com/ClickHouse/ClickHouse/pull/6212) ([Yuriy Baranov](https://github.com/yurriy)) +- Fixed memory leak in `bitmapSubsetInRange` function. [#6819](https://github.com/ClickHouse/ClickHouse/pull/6819) ([Zhichang Yu](https://github.com/yuzhichang)) +- Fix rare bug when mutation executed after granularity change. [#6816](https://github.com/ClickHouse/ClickHouse/pull/6816) ([alesapin](https://github.com/alesapin)) +- Allow protobuf message with all fields by default. [#6132](https://github.com/ClickHouse/ClickHouse/pull/6132) ([Vitaly Baranov](https://github.com/vitlibar)) +- Resolve a bug with `nullIf` function when we send a `NULL` argument on the second argument. [#6446](https://github.com/ClickHouse/ClickHouse/pull/6446) ([Guillaume Tassery](https://github.com/YiuRULE)) +- Fix rare bug with wrong memory allocation/deallocation in complex key cache dictionaries with string fields which leads to infinite memory consumption (looks like memory leak). Bug reproduces when string size was a power of two starting from eight (8, 16, 32, etc). [#6447](https://github.com/ClickHouse/ClickHouse/pull/6447) ([alesapin](https://github.com/alesapin)) +- Fixed Gorilla encoding on small sequences which caused exception `Cannot write after end of buffer`. [#6398](https://github.com/ClickHouse/ClickHouse/issues/6398) [#6444](https://github.com/ClickHouse/ClickHouse/pull/6444) ([Vasily Nemkov](https://github.com/Enmk)) +- Allow to use not nullable types in JOINs with `join_use_nulls` enabled. [#6705](https://github.com/ClickHouse/ClickHouse/pull/6705) ([Artem Zuikov](https://github.com/4ertus2)) +- Disable `Poco::AbstractConfiguration` substitutions in query in `clickhouse-client`. [#6706](https://github.com/ClickHouse/ClickHouse/pull/6706) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Avoid deadlock in `REPLACE PARTITION`. [#6677](https://github.com/ClickHouse/ClickHouse/pull/6677) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Using `arrayReduce` for constant arguments may lead to segfault. [#6242](https://github.com/ClickHouse/ClickHouse/issues/6242) [#6326](https://github.com/ClickHouse/ClickHouse/pull/6326) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix inconsistent parts which can appear if replica was restored after `DROP PARTITION`. [#6522](https://github.com/ClickHouse/ClickHouse/issues/6522) [#6523](https://github.com/ClickHouse/ClickHouse/pull/6523) ([tavplubix](https://github.com/tavplubix)) +- Fixed hang in `JSONExtractRaw` function. [#6195](https://github.com/ClickHouse/ClickHouse/issues/6195) [#6198](https://github.com/ClickHouse/ClickHouse/pull/6198) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix bug with incorrect skip indices serialization and aggregation with adaptive granularity. [#6594](https://github.com/ClickHouse/ClickHouse/issues/6594). [#6748](https://github.com/ClickHouse/ClickHouse/pull/6748) ([alesapin](https://github.com/alesapin)) +- Fix `WITH ROLLUP` and `WITH CUBE` modifiers of `GROUP BY` with two-level aggregation. [#6225](https://github.com/ClickHouse/ClickHouse/pull/6225) ([Anton Popov](https://github.com/CurtizJ)) +- Fix bug with writing secondary indices marks with adaptive granularity. [#6126](https://github.com/ClickHouse/ClickHouse/pull/6126) ([alesapin](https://github.com/alesapin)) +- Fix initialization order while server startup. Since `StorageMergeTree::background_task_handle` is initialized in `startup()` the `MergeTreeBlockOutputStream::write()` may try to use it before initialization. Just check if it is initialized. [#6080](https://github.com/ClickHouse/ClickHouse/pull/6080) ([Ivan](https://github.com/abyss7)) +- Clearing the data buffer from the previous read operation that was completed with an error. [#6026](https://github.com/ClickHouse/ClickHouse/pull/6026) ([Nikolay](https://github.com/bopohaa)) +- Fix bug with enabling adaptive granularity when creating a new replica for Replicated\*MergeTree table. [#6394](https://github.com/ClickHouse/ClickHouse/issues/6394) [#6452](https://github.com/ClickHouse/ClickHouse/pull/6452) ([alesapin](https://github.com/alesapin)) +- Fixed possible crash during server startup in case of exception happened in `libunwind` during exception at access to uninitialized `ThreadStatus` structure. [#6456](https://github.com/ClickHouse/ClickHouse/pull/6456) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +- Fix crash in `yandexConsistentHash` function. Found by fuzz test. [#6304](https://github.com/ClickHouse/ClickHouse/issues/6304) [#6305](https://github.com/ClickHouse/ClickHouse/pull/6305) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed the possibility of hanging queries when server is overloaded and global thread pool becomes near full. This have higher chance to happen on clusters with large number of shards (hundreds), because distributed queries allocate a thread per connection to each shard. For example, this issue may reproduce if a cluster of 330 shards is processing 30 concurrent distributed queries. This issue affects all versions starting from 19.2. [#6301](https://github.com/ClickHouse/ClickHouse/pull/6301) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed logic of `arrayEnumerateUniqRanked` function. [#6423](https://github.com/ClickHouse/ClickHouse/pull/6423) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix segfault when decoding symbol table. [#6603](https://github.com/ClickHouse/ClickHouse/pull/6603) ([Amos Bird](https://github.com/amosbird)) +- Fixed irrelevant exception in cast of `LowCardinality(Nullable)` to not-Nullable column in case if it does not contain Nulls (e.g. in query like `SELECT CAST(CAST('Hello' AS LowCardinality(Nullable(String))) AS String)`. [#6094](https://github.com/ClickHouse/ClickHouse/issues/6094) [#6119](https://github.com/ClickHouse/ClickHouse/pull/6119) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Removed extra quoting of description in `system.settings` table. [#6696](https://github.com/ClickHouse/ClickHouse/issues/6696) [#6699](https://github.com/ClickHouse/ClickHouse/pull/6699) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Avoid possible deadlock in `TRUNCATE` of Replicated table. [#6695](https://github.com/ClickHouse/ClickHouse/pull/6695) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix reading in order of sorting key. [#6189](https://github.com/ClickHouse/ClickHouse/pull/6189) ([Anton Popov](https://github.com/CurtizJ)) +- Fix `ALTER TABLE ... UPDATE` query for tables with `enable_mixed_granularity_parts=1`. [#6543](https://github.com/ClickHouse/ClickHouse/pull/6543) ([alesapin](https://github.com/alesapin)) +- Fix bug opened by [#4405](https://github.com/ClickHouse/ClickHouse/pull/4405) (since 19.4.0). Reproduces in queries to Distributed tables over MergeTree tables when we does not query any columns (`SELECT 1`). [#6236](https://github.com/ClickHouse/ClickHouse/pull/6236) ([alesapin](https://github.com/alesapin)) +- Fixed overflow in integer division of signed type to unsigned type. The behaviour was exactly as in C or C++ language (integer promotion rules) that may be surprising. Please note that the overflow is still possible when dividing large signed number to large unsigned number or vice-versa (but that case is less usual). The issue existed in all server versions. [#6214](https://github.com/ClickHouse/ClickHouse/issues/6214) [#6233](https://github.com/ClickHouse/ClickHouse/pull/6233) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Limit maximum sleep time for throttling when `max_execution_speed` or `max_execution_speed_bytes` is set. Fixed false errors like `Estimated query execution time (inf seconds) is too long`. [#5547](https://github.com/ClickHouse/ClickHouse/issues/5547) [#6232](https://github.com/ClickHouse/ClickHouse/pull/6232) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed issues about using `MATERIALIZED` columns and aliases in `MaterializedView`. [#448](https://github.com/ClickHouse/ClickHouse/issues/448) [#3484](https://github.com/ClickHouse/ClickHouse/issues/3484) [#3450](https://github.com/ClickHouse/ClickHouse/issues/3450) [#2878](https://github.com/ClickHouse/ClickHouse/issues/2878) [#2285](https://github.com/ClickHouse/ClickHouse/issues/2285) [#3796](https://github.com/ClickHouse/ClickHouse/pull/3796) ([Amos Bird](https://github.com/amosbird)) [#6316](https://github.com/ClickHouse/ClickHouse/pull/6316) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix `FormatFactory` behaviour for input streams which are not implemented as processor. [#6495](https://github.com/ClickHouse/ClickHouse/pull/6495) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fixed typo. [#6631](https://github.com/ClickHouse/ClickHouse/pull/6631) ([Alex Ryndin](https://github.com/alexryndin)) +- Typo in the error message ( is -\> are ). [#6839](https://github.com/ClickHouse/ClickHouse/pull/6839) ([Denis Zhuravlev](https://github.com/den-crane)) +- Fixed error while parsing of columns list from string if type contained a comma (this issue was relevant for `File`, `URL`, `HDFS` storages) [#6217](https://github.com/ClickHouse/ClickHouse/issues/6217). [#6209](https://github.com/ClickHouse/ClickHouse/pull/6209) ([dimarub2000](https://github.com/dimarub2000)) + +#### Security Fix {#security-fix} + +- This release also contains all bug security fixes from 19.13 and 19.11. +- Fixed the possibility of a fabricated query to cause server crash due to stack overflow in SQL parser. Fixed the possibility of stack overflow in Merge and Distributed tables, materialized views and conditions for row-level security that involve subqueries. [#6433](https://github.com/ClickHouse/ClickHouse/pull/6433) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Improvement {#improvement-3} + +- Correct implementation of ternary logic for `AND/OR`. [#6048](https://github.com/ClickHouse/ClickHouse/pull/6048) ([Alexander Kazakov](https://github.com/Akazz)) +- Now values and rows with expired TTL will be removed after `OPTIMIZE ... FINAL` query from old parts without TTL infos or with outdated TTL infos, e.g. after `ALTER ... MODIFY TTL` query. Added queries `SYSTEM STOP/START TTL MERGES` to disallow/allow assign merges with TTL and filter expired values in all merges. [#6274](https://github.com/ClickHouse/ClickHouse/pull/6274) ([Anton Popov](https://github.com/CurtizJ)) +- Possibility to change the location of ClickHouse history file for client using `CLICKHOUSE_HISTORY_FILE` env. [#6840](https://github.com/ClickHouse/ClickHouse/pull/6840) ([filimonov](https://github.com/filimonov)) +- Remove `dry_run` flag from `InterpreterSelectQuery`. … [#6375](https://github.com/ClickHouse/ClickHouse/pull/6375) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Support `ASOF JOIN` with `ON` section. [#6211](https://github.com/ClickHouse/ClickHouse/pull/6211) ([Artem Zuikov](https://github.com/4ertus2)) +- Better support of skip indexes for mutations and replication. Support for `MATERIALIZE/CLEAR INDEX ... IN PARTITION` query. `UPDATE x = x` recalculates all indices that use column `x`. [#5053](https://github.com/ClickHouse/ClickHouse/pull/5053) ([Nikita Vasilev](https://github.com/nikvas0)) +- Allow to `ATTACH` live views (for example, at the server startup) regardless to `allow_experimental_live_view` setting. [#6754](https://github.com/ClickHouse/ClickHouse/pull/6754) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- For stack traces gathered by query profiler, do not include stack frames generated by the query profiler itself. [#6250](https://github.com/ClickHouse/ClickHouse/pull/6250) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Now table functions `values`, `file`, `url`, `hdfs` have support for ALIAS columns. [#6255](https://github.com/ClickHouse/ClickHouse/pull/6255) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Throw an exception if `config.d` file does not have the corresponding root element as the config file. [#6123](https://github.com/ClickHouse/ClickHouse/pull/6123) ([dimarub2000](https://github.com/dimarub2000)) +- Print extra info in exception message for `no space left on device`. [#6182](https://github.com/ClickHouse/ClickHouse/issues/6182), [#6252](https://github.com/ClickHouse/ClickHouse/issues/6252) [#6352](https://github.com/ClickHouse/ClickHouse/pull/6352) ([tavplubix](https://github.com/tavplubix)) +- When determining shards of a `Distributed` table to be covered by a read query (for `optimize_skip_unused_shards` = 1) ClickHouse now checks conditions from both `prewhere` and `where` clauses of select statement. [#6521](https://github.com/ClickHouse/ClickHouse/pull/6521) ([Alexander Kazakov](https://github.com/Akazz)) +- Enabled `SIMDJSON` for machines without AVX2 but with SSE 4.2 and PCLMUL instruction set. [#6285](https://github.com/ClickHouse/ClickHouse/issues/6285) [#6320](https://github.com/ClickHouse/ClickHouse/pull/6320) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- ClickHouse can work on filesystems without `O_DIRECT` support (such as ZFS and BtrFS) without additional tuning. [#4449](https://github.com/ClickHouse/ClickHouse/issues/4449) [#6730](https://github.com/ClickHouse/ClickHouse/pull/6730) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Support push down predicate for final subquery. [#6120](https://github.com/ClickHouse/ClickHouse/pull/6120) ([TCeason](https://github.com/TCeason)) [#6162](https://github.com/ClickHouse/ClickHouse/pull/6162) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Better `JOIN ON` keys extraction [#6131](https://github.com/ClickHouse/ClickHouse/pull/6131) ([Artem Zuikov](https://github.com/4ertus2)) +- Upated `SIMDJSON`. [#6285](https://github.com/ClickHouse/ClickHouse/issues/6285). [#6306](https://github.com/ClickHouse/ClickHouse/pull/6306) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Optimize selecting of smallest column for `SELECT count()` query. [#6344](https://github.com/ClickHouse/ClickHouse/pull/6344) ([Amos Bird](https://github.com/amosbird)) +- Added `strict` parameter in `windowFunnel()`. When the `strict` is set, the `windowFunnel()` applies conditions only for the unique values. [#6548](https://github.com/ClickHouse/ClickHouse/pull/6548) ([achimbab](https://github.com/achimbab)) +- Safer interface of `mysqlxx::Pool`. [#6150](https://github.com/ClickHouse/ClickHouse/pull/6150) ([avasiliev](https://github.com/avasiliev)) +- Options line size when executing with `--help` option now corresponds with terminal size. [#6590](https://github.com/ClickHouse/ClickHouse/pull/6590) ([dimarub2000](https://github.com/dimarub2000)) +- Disable “read in order†optimization for aggregation without keys. [#6599](https://github.com/ClickHouse/ClickHouse/pull/6599) ([Anton Popov](https://github.com/CurtizJ)) +- HTTP status code for `INCORRECT_DATA` and `TYPE_MISMATCH` error codes was changed from default `500 Internal Server Error` to `400 Bad Request`. [#6271](https://github.com/ClickHouse/ClickHouse/pull/6271) ([Alexander Rodin](https://github.com/a-rodin)) +- Move Join object from `ExpressionAction` into `AnalyzedJoin`. `ExpressionAnalyzer` and `ExpressionAction` do not know about `Join` class anymore. Its logic is hidden by `AnalyzedJoin` iface. [#6801](https://github.com/ClickHouse/ClickHouse/pull/6801) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed possible deadlock of distributed queries when one of shards is localhost but the query is sent via network connection. [#6759](https://github.com/ClickHouse/ClickHouse/pull/6759) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Changed semantic of multiple tables `RENAME` to avoid possible deadlocks. [#6757](https://github.com/ClickHouse/ClickHouse/issues/6757). [#6756](https://github.com/ClickHouse/ClickHouse/pull/6756) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Rewritten MySQL compatibility server to prevent loading full packet payload in memory. Decreased memory consumption for each connection to approximately `2 * DBMS_DEFAULT_BUFFER_SIZE` (read/write buffers). [#5811](https://github.com/ClickHouse/ClickHouse/pull/5811) ([Yuriy Baranov](https://github.com/yurriy)) +- Move AST alias interpreting logic out of parser that does not have to know anything about query semantics. [#6108](https://github.com/ClickHouse/ClickHouse/pull/6108) ([Artem Zuikov](https://github.com/4ertus2)) +- Slightly more safe parsing of `NamesAndTypesList`. [#6408](https://github.com/ClickHouse/ClickHouse/issues/6408). [#6410](https://github.com/ClickHouse/ClickHouse/pull/6410) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- `clickhouse-copier`: Allow use `where_condition` from config with `partition_key` alias in query for checking partition existence (Earlier it was used only in reading data queries). [#6577](https://github.com/ClickHouse/ClickHouse/pull/6577) ([proller](https://github.com/proller)) +- Added optional message argument in `throwIf`. ([#5772](https://github.com/ClickHouse/ClickHouse/issues/5772)) [#6329](https://github.com/ClickHouse/ClickHouse/pull/6329) ([Vdimir](https://github.com/Vdimir)) +- Server exception got while sending insertion data is now being processed in client as well. [#5891](https://github.com/ClickHouse/ClickHouse/issues/5891) [#6711](https://github.com/ClickHouse/ClickHouse/pull/6711) ([dimarub2000](https://github.com/dimarub2000)) +- Added a metric `DistributedFilesToInsert` that shows the total number of files in filesystem that are selected to send to remote servers by Distributed tables. The number is summed across all shards. [#6600](https://github.com/ClickHouse/ClickHouse/pull/6600) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Move most of JOINs prepare logic from `ExpressionAction/ExpressionAnalyzer` to `AnalyzedJoin`. [#6785](https://github.com/ClickHouse/ClickHouse/pull/6785) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix TSan [warning](https://clickhouse-test-reports.s3.yandex.net/6399/c1c1d1daa98e199e620766f1bd06a5921050a00d/functional_stateful_tests_(thread).html) ‘lock-order-inversion’. [#6740](https://github.com/ClickHouse/ClickHouse/pull/6740) ([Vasily Nemkov](https://github.com/Enmk)) +- Better information messages about lack of Linux capabilities. Logging fatal errors with “fatal†level, that will make it easier to find in `system.text_log`. [#6441](https://github.com/ClickHouse/ClickHouse/pull/6441) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- When enable dumping temporary data to the disk to restrict memory usage during `GROUP BY`, `ORDER BY`, it didn’t check the free disk space. The fix add a new setting `min_free_disk_space`, when the free disk space it smaller then the threshold, the query will stop and throw `ErrorCodes::NOT_ENOUGH_SPACE`. [#6678](https://github.com/ClickHouse/ClickHouse/pull/6678) ([Weiqing Xu](https://github.com/weiqxu)) [#6691](https://github.com/ClickHouse/ClickHouse/pull/6691) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Removed recursive rwlock by thread. It makes no sense, because threads are reused between queries. `SELECT` query may acquire a lock in one thread, hold a lock from another thread and exit from first thread. In the same time, first thread can be reused by `DROP` query. This will lead to false “Attempt to acquire exclusive lock recursively†messages. [#6771](https://github.com/ClickHouse/ClickHouse/pull/6771) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Split `ExpressionAnalyzer.appendJoin()`. Prepare a place in `ExpressionAnalyzer` for `MergeJoin`. [#6524](https://github.com/ClickHouse/ClickHouse/pull/6524) ([Artem Zuikov](https://github.com/4ertus2)) +- Added `mysql_native_password` authentication plugin to MySQL compatibility server. [#6194](https://github.com/ClickHouse/ClickHouse/pull/6194) ([Yuriy Baranov](https://github.com/yurriy)) +- Less number of `clock_gettime` calls; fixed ABI compatibility between debug/release in `Allocator` (insignificant issue). [#6197](https://github.com/ClickHouse/ClickHouse/pull/6197) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Move `collectUsedColumns` from `ExpressionAnalyzer` to `SyntaxAnalyzer`. `SyntaxAnalyzer` makes `required_source_columns` itself now. [#6416](https://github.com/ClickHouse/ClickHouse/pull/6416) ([Artem Zuikov](https://github.com/4ertus2)) +- Add setting `joined_subquery_requires_alias` to require aliases for subselects and table functions in `FROM` that more than one table is present (i.e. queries with JOINs). [#6733](https://github.com/ClickHouse/ClickHouse/pull/6733) ([Artem Zuikov](https://github.com/4ertus2)) +- Extract `GetAggregatesVisitor` class from `ExpressionAnalyzer`. [#6458](https://github.com/ClickHouse/ClickHouse/pull/6458) ([Artem Zuikov](https://github.com/4ertus2)) +- `system.query_log`: change data type of `type` column to `Enum`. [#6265](https://github.com/ClickHouse/ClickHouse/pull/6265) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +- Static linking of `sha256_password` authentication plugin. [#6512](https://github.com/ClickHouse/ClickHouse/pull/6512) ([Yuriy Baranov](https://github.com/yurriy)) +- Avoid extra dependency for the setting `compile` to work. In previous versions, the user may get error like `cannot open crti.o`, `unable to find library -lc` etc. [#6309](https://github.com/ClickHouse/ClickHouse/pull/6309) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- More validation of the input that may come from malicious replica. [#6303](https://github.com/ClickHouse/ClickHouse/pull/6303) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Now `clickhouse-obfuscator` file is available in `clickhouse-client` package. In previous versions it was available as `clickhouse obfuscator` (with whitespace). [#5816](https://github.com/ClickHouse/ClickHouse/issues/5816) [#6609](https://github.com/ClickHouse/ClickHouse/pull/6609) ([dimarub2000](https://github.com/dimarub2000)) +- Fixed deadlock when we have at least two queries that read at least two tables in different order and another query that performs DDL operation on one of tables. Fixed another very rare deadlock. [#6764](https://github.com/ClickHouse/ClickHouse/pull/6764) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added `os_thread_ids` column to `system.processes` and `system.query_log` for better debugging possibilities. [#6763](https://github.com/ClickHouse/ClickHouse/pull/6763) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- A workaround for PHP mysqlnd extension bugs which occur when `sha256_password` is used as a default authentication plugin (described in [#6031](https://github.com/ClickHouse/ClickHouse/issues/6031)). [#6113](https://github.com/ClickHouse/ClickHouse/pull/6113) ([Yuriy Baranov](https://github.com/yurriy)) +- Remove unneeded place with changed nullability columns. [#6693](https://github.com/ClickHouse/ClickHouse/pull/6693) ([Artem Zuikov](https://github.com/4ertus2)) +- Set default value of `queue_max_wait_ms` to zero, because current value (five seconds) makes no sense. There are rare circumstances when this settings has any use. Added settings `replace_running_query_max_wait_ms`, `kafka_max_wait_ms` and `connection_pool_max_wait_ms` for disambiguation. [#6692](https://github.com/ClickHouse/ClickHouse/pull/6692) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Extract `SelectQueryExpressionAnalyzer` from `ExpressionAnalyzer`. Keep the last one for non-select queries. [#6499](https://github.com/ClickHouse/ClickHouse/pull/6499) ([Artem Zuikov](https://github.com/4ertus2)) +- Removed duplicating input and output formats. [#6239](https://github.com/ClickHouse/ClickHouse/pull/6239) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Allow user to override `poll_interval` and `idle_connection_timeout` settings on connection. [#6230](https://github.com/ClickHouse/ClickHouse/pull/6230) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- `MergeTree` now has an additional option `ttl_only_drop_parts` (disabled by default) to avoid partial pruning of parts, so that they dropped completely when all the rows in a part are expired. [#6191](https://github.com/ClickHouse/ClickHouse/pull/6191) ([Sergi Vladykin](https://github.com/svladykin)) +- Type checks for set index functions. Throw exception if function got a wrong type. This fixes fuzz test with UBSan. [#6511](https://github.com/ClickHouse/ClickHouse/pull/6511) ([Nikita Vasilev](https://github.com/nikvas0)) + +#### Performance Improvement {#performance-improvement-2} + +- Optimize queries with `ORDER BY expressions` clause, where `expressions` have coinciding prefix with sorting key in `MergeTree` tables. This optimization is controlled by `optimize_read_in_order` setting. [#6054](https://github.com/ClickHouse/ClickHouse/pull/6054) [#6629](https://github.com/ClickHouse/ClickHouse/pull/6629) ([Anton Popov](https://github.com/CurtizJ)) +- Allow to use multiple threads during parts loading and removal. [#6372](https://github.com/ClickHouse/ClickHouse/issues/6372) [#6074](https://github.com/ClickHouse/ClickHouse/issues/6074) [#6438](https://github.com/ClickHouse/ClickHouse/pull/6438) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Implemented batch variant of updating aggregate function states. It may lead to performance benefits. [#6435](https://github.com/ClickHouse/ClickHouse/pull/6435) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Using `FastOps` library for functions `exp`, `log`, `sigmoid`, `tanh`. FastOps is a fast vector math library from Michael Parakhin (Yandex CTO). Improved performance of `exp` and `log` functions more than 6 times. The functions `exp` and `log` from `Float32` argument will return `Float32` (in previous versions they always return `Float64`). Now `exp(nan)` may return `inf`. The result of `exp` and `log` functions may be not the nearest machine representable number to the true answer. [#6254](https://github.com/ClickHouse/ClickHouse/pull/6254) ([alexey-milovidov](https://github.com/alexey-milovidov)) Using Danila Kutenin variant to make fastops working [#6317](https://github.com/ClickHouse/ClickHouse/pull/6317) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Disable consecutive key optimization for `UInt8/16`. [#6298](https://github.com/ClickHouse/ClickHouse/pull/6298) [#6701](https://github.com/ClickHouse/ClickHouse/pull/6701) ([akuzm](https://github.com/akuzm)) +- Improved performance of `simdjson` library by getting rid of dynamic allocation in `ParsedJson::Iterator`. [#6479](https://github.com/ClickHouse/ClickHouse/pull/6479) ([Vitaly Baranov](https://github.com/vitlibar)) +- Pre-fault pages when allocating memory with `mmap()`. [#6667](https://github.com/ClickHouse/ClickHouse/pull/6667) ([akuzm](https://github.com/akuzm)) +- Fix performance bug in `Decimal` comparison. [#6380](https://github.com/ClickHouse/ClickHouse/pull/6380) ([Artem Zuikov](https://github.com/4ertus2)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-4} + +- Remove Compiler (runtime template instantiation) because we’ve win over it’s performance. [#6646](https://github.com/ClickHouse/ClickHouse/pull/6646) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added performance test to show degradation of performance in gcc-9 in more isolated way. [#6302](https://github.com/ClickHouse/ClickHouse/pull/6302) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added table function `numbers_mt`, which is multithreaded version of `numbers`. Updated performance tests with hash functions. [#6554](https://github.com/ClickHouse/ClickHouse/pull/6554) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Comparison mode in `clickhouse-benchmark` [#6220](https://github.com/ClickHouse/ClickHouse/issues/6220) [#6343](https://github.com/ClickHouse/ClickHouse/pull/6343) ([dimarub2000](https://github.com/dimarub2000)) +- Best effort for printing stack traces. Also added `SIGPROF` as a debugging signal to print stack trace of a running thread. [#6529](https://github.com/ClickHouse/ClickHouse/pull/6529) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Every function in its own file, part 10. [#6321](https://github.com/ClickHouse/ClickHouse/pull/6321) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Remove doubled const `TABLE_IS_READ_ONLY`. [#6566](https://github.com/ClickHouse/ClickHouse/pull/6566) ([filimonov](https://github.com/filimonov)) +- Formatting changes for `StringHashMap` PR [#5417](https://github.com/ClickHouse/ClickHouse/issues/5417). [#6700](https://github.com/ClickHouse/ClickHouse/pull/6700) ([akuzm](https://github.com/akuzm)) +- Better subquery for join creation in `ExpressionAnalyzer`. [#6824](https://github.com/ClickHouse/ClickHouse/pull/6824) ([Artem Zuikov](https://github.com/4ertus2)) +- Remove a redundant condition (found by PVS Studio). [#6775](https://github.com/ClickHouse/ClickHouse/pull/6775) ([akuzm](https://github.com/akuzm)) +- Separate the hash table interface for `ReverseIndex`. [#6672](https://github.com/ClickHouse/ClickHouse/pull/6672) ([akuzm](https://github.com/akuzm)) +- Refactoring of settings. [#6689](https://github.com/ClickHouse/ClickHouse/pull/6689) ([alesapin](https://github.com/alesapin)) +- Add comments for `set` index functions. [#6319](https://github.com/ClickHouse/ClickHouse/pull/6319) ([Nikita Vasilev](https://github.com/nikvas0)) +- Increase OOM score in debug version on Linux. [#6152](https://github.com/ClickHouse/ClickHouse/pull/6152) ([akuzm](https://github.com/akuzm)) +- HDFS HA now work in debug build. [#6650](https://github.com/ClickHouse/ClickHouse/pull/6650) ([Weiqing Xu](https://github.com/weiqxu)) +- Added a test to `transform_query_for_external_database`. [#6388](https://github.com/ClickHouse/ClickHouse/pull/6388) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Add test for multiple materialized views for Kafka table. [#6509](https://github.com/ClickHouse/ClickHouse/pull/6509) ([Ivan](https://github.com/abyss7)) +- Make a better build scheme. [#6500](https://github.com/ClickHouse/ClickHouse/pull/6500) ([Ivan](https://github.com/abyss7)) +- Fixed `test_external_dictionaries` integration in case it was executed under non root user. [#6507](https://github.com/ClickHouse/ClickHouse/pull/6507) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- The bug reproduces when total size of written packets exceeds `DBMS_DEFAULT_BUFFER_SIZE`. [#6204](https://github.com/ClickHouse/ClickHouse/pull/6204) ([Yuriy Baranov](https://github.com/yurriy)) +- Added a test for `RENAME` table race condition [#6752](https://github.com/ClickHouse/ClickHouse/pull/6752) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Avoid data race on Settings in `KILL QUERY`. [#6753](https://github.com/ClickHouse/ClickHouse/pull/6753) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Add integration test for handling errors by a cache dictionary. [#6755](https://github.com/ClickHouse/ClickHouse/pull/6755) ([Vitaly Baranov](https://github.com/vitlibar)) +- Disable parsing of ELF object files on Mac OS, because it makes no sense. [#6578](https://github.com/ClickHouse/ClickHouse/pull/6578) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Attempt to make changelog generator better. [#6327](https://github.com/ClickHouse/ClickHouse/pull/6327) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Adding `-Wshadow` switch to the GCC. [#6325](https://github.com/ClickHouse/ClickHouse/pull/6325) ([kreuzerkrieg](https://github.com/kreuzerkrieg)) +- Removed obsolete code for `mimalloc` support. [#6715](https://github.com/ClickHouse/ClickHouse/pull/6715) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- `zlib-ng` determines x86 capabilities and saves this info to global variables. This is done in defalteInit call, which may be made by different threads simultaneously. To avoid multithreaded writes, do it on library startup. [#6141](https://github.com/ClickHouse/ClickHouse/pull/6141) ([akuzm](https://github.com/akuzm)) +- Regression test for a bug which in join which was fixed in [#5192](https://github.com/ClickHouse/ClickHouse/issues/5192). [#6147](https://github.com/ClickHouse/ClickHouse/pull/6147) ([Bakhtiyor Ruziev](https://github.com/theruziev)) +- Fixed MSan report. [#6144](https://github.com/ClickHouse/ClickHouse/pull/6144) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix flapping TTL test. [#6782](https://github.com/ClickHouse/ClickHouse/pull/6782) ([Anton Popov](https://github.com/CurtizJ)) +- Fixed false data race in `MergeTreeDataPart::is_frozen` field. [#6583](https://github.com/ClickHouse/ClickHouse/pull/6583) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed timeouts in fuzz test. In previous version, it managed to find false hangup in query `SELECT * FROM numbers_mt(gccMurmurHash(''))`. [#6582](https://github.com/ClickHouse/ClickHouse/pull/6582) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added debug checks to `static_cast` of columns. [#6581](https://github.com/ClickHouse/ClickHouse/pull/6581) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Support for Oracle Linux in official RPM packages. [#6356](https://github.com/ClickHouse/ClickHouse/issues/6356) [#6585](https://github.com/ClickHouse/ClickHouse/pull/6585) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Changed json perftests from `once` to `loop` type. [#6536](https://github.com/ClickHouse/ClickHouse/pull/6536) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- `odbc-bridge.cpp` defines `main()` so it should not be included in `clickhouse-lib`. [#6538](https://github.com/ClickHouse/ClickHouse/pull/6538) ([Orivej Desh](https://github.com/orivej)) +- Test for crash in `FULL|RIGHT JOIN` with nulls in right table’s keys. [#6362](https://github.com/ClickHouse/ClickHouse/pull/6362) ([Artem Zuikov](https://github.com/4ertus2)) +- Added a test for the limit on expansion of aliases just in case. [#6442](https://github.com/ClickHouse/ClickHouse/pull/6442) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Switched from `boost::filesystem` to `std::filesystem` where appropriate. [#6253](https://github.com/ClickHouse/ClickHouse/pull/6253) [#6385](https://github.com/ClickHouse/ClickHouse/pull/6385) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added RPM packages to website. [#6251](https://github.com/ClickHouse/ClickHouse/pull/6251) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Add a test for fixed `Unknown identifier` exception in `IN` section. [#6708](https://github.com/ClickHouse/ClickHouse/pull/6708) ([Artem Zuikov](https://github.com/4ertus2)) +- Simplify `shared_ptr_helper` because people facing difficulties understanding it. [#6675](https://github.com/ClickHouse/ClickHouse/pull/6675) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added performance tests for fixed Gorilla and DoubleDelta codec. [#6179](https://github.com/ClickHouse/ClickHouse/pull/6179) ([Vasily Nemkov](https://github.com/Enmk)) +- Split the integration test `test_dictionaries` into 4 separate tests. [#6776](https://github.com/ClickHouse/ClickHouse/pull/6776) ([Vitaly Baranov](https://github.com/vitlibar)) +- Fix PVS-Studio warning in `PipelineExecutor`. [#6777](https://github.com/ClickHouse/ClickHouse/pull/6777) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Allow to use `library` dictionary source with ASan. [#6482](https://github.com/ClickHouse/ClickHouse/pull/6482) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added option to generate changelog from a list of PRs. [#6350](https://github.com/ClickHouse/ClickHouse/pull/6350) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Lock the `TinyLog` storage when reading. [#6226](https://github.com/ClickHouse/ClickHouse/pull/6226) ([akuzm](https://github.com/akuzm)) +- Check for broken symlinks in CI. [#6634](https://github.com/ClickHouse/ClickHouse/pull/6634) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Increase timeout for “stack overflow†test because it may take a long time in debug build. [#6637](https://github.com/ClickHouse/ClickHouse/pull/6637) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added a check for double whitespaces. [#6643](https://github.com/ClickHouse/ClickHouse/pull/6643) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix `new/delete` memory tracking when build with sanitizers. Tracking is not clear. It only prevents memory limit exceptions in tests. [#6450](https://github.com/ClickHouse/ClickHouse/pull/6450) ([Artem Zuikov](https://github.com/4ertus2)) +- Enable back the check of undefined symbols while linking. [#6453](https://github.com/ClickHouse/ClickHouse/pull/6453) ([Ivan](https://github.com/abyss7)) +- Avoid rebuilding `hyperscan` every day. [#6307](https://github.com/ClickHouse/ClickHouse/pull/6307) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed UBSan report in `ProtobufWriter`. [#6163](https://github.com/ClickHouse/ClickHouse/pull/6163) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Don’t allow to use query profiler with sanitizers because it is not compatible. [#6769](https://github.com/ClickHouse/ClickHouse/pull/6769) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Add test for reloading a dictionary after fail by timer. [#6114](https://github.com/ClickHouse/ClickHouse/pull/6114) ([Vitaly Baranov](https://github.com/vitlibar)) +- Fix inconsistency in `PipelineExecutor::prepareProcessor` argument type. [#6494](https://github.com/ClickHouse/ClickHouse/pull/6494) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Added a test for bad URIs. [#6493](https://github.com/ClickHouse/ClickHouse/pull/6493) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added more checks to `CAST` function. This should get more information about segmentation fault in fuzzy test. [#6346](https://github.com/ClickHouse/ClickHouse/pull/6346) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Added `gcc-9` support to `docker/builder` container that builds image locally. [#6333](https://github.com/ClickHouse/ClickHouse/pull/6333) ([Gleb Novikov](https://github.com/NanoBjorn)) +- Test for primary key with `LowCardinality(String)`. [#5044](https://github.com/ClickHouse/ClickHouse/issues/5044) [#6219](https://github.com/ClickHouse/ClickHouse/pull/6219) ([dimarub2000](https://github.com/dimarub2000)) +- Fixed tests affected by slow stack traces printing. [#6315](https://github.com/ClickHouse/ClickHouse/pull/6315) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Add a test case for crash in `groupUniqArray` fixed in [#6029](https://github.com/ClickHouse/ClickHouse/pull/6029). [#4402](https://github.com/ClickHouse/ClickHouse/issues/4402) [#6129](https://github.com/ClickHouse/ClickHouse/pull/6129) ([akuzm](https://github.com/akuzm)) +- Fixed indices mutations tests. [#6645](https://github.com/ClickHouse/ClickHouse/pull/6645) ([Nikita Vasilev](https://github.com/nikvas0)) +- In performance test, do not read query log for queries we didn’t run. [#6427](https://github.com/ClickHouse/ClickHouse/pull/6427) ([akuzm](https://github.com/akuzm)) +- Materialized view now could be created with any low cardinality types regardless to the setting about suspicious low cardinality types. [#6428](https://github.com/ClickHouse/ClickHouse/pull/6428) ([Olga Khvostikova](https://github.com/stavrolia)) +- Updated tests for `send_logs_level` setting. [#6207](https://github.com/ClickHouse/ClickHouse/pull/6207) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fix build under gcc-8.2. [#6196](https://github.com/ClickHouse/ClickHouse/pull/6196) ([Max Akhmedov](https://github.com/zlobober)) +- Fix build with internal libc++. [#6724](https://github.com/ClickHouse/ClickHouse/pull/6724) ([Ivan](https://github.com/abyss7)) +- Fix shared build with `rdkafka` library [#6101](https://github.com/ClickHouse/ClickHouse/pull/6101) ([Ivan](https://github.com/abyss7)) +- Fixes for Mac OS build (incomplete). [#6390](https://github.com/ClickHouse/ClickHouse/pull/6390) ([alexey-milovidov](https://github.com/alexey-milovidov)) [#6429](https://github.com/ClickHouse/ClickHouse/pull/6429) ([alex-zaitsev](https://github.com/alex-zaitsev)) +- Fix “splitted†build. [#6618](https://github.com/ClickHouse/ClickHouse/pull/6618) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Other build fixes: [#6186](https://github.com/ClickHouse/ClickHouse/pull/6186) ([Amos Bird](https://github.com/amosbird)) [#6486](https://github.com/ClickHouse/ClickHouse/pull/6486) [#6348](https://github.com/ClickHouse/ClickHouse/pull/6348) ([vxider](https://github.com/Vxider)) [#6744](https://github.com/ClickHouse/ClickHouse/pull/6744) ([Ivan](https://github.com/abyss7)) [#6016](https://github.com/ClickHouse/ClickHouse/pull/6016) [#6421](https://github.com/ClickHouse/ClickHouse/pull/6421) [#6491](https://github.com/ClickHouse/ClickHouse/pull/6491) ([proller](https://github.com/proller)) + +#### Backward Incompatible Change {#backward-incompatible-change-3} + +- Removed rarely used table function `catBoostPool` and storage `CatBoostPool`. If you have used this table function, please write email to `feedback@clickhouse.com`. Note that CatBoost integration remains and will be supported. [#6279](https://github.com/ClickHouse/ClickHouse/pull/6279) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Disable `ANY RIGHT JOIN` and `ANY FULL JOIN` by default. Set `any_join_distinct_right_table_keys` setting to enable them. [#5126](https://github.com/ClickHouse/ClickHouse/issues/5126) [#6351](https://github.com/ClickHouse/ClickHouse/pull/6351) ([Artem Zuikov](https://github.com/4ertus2)) + +## ClickHouse Release 19.13 {#clickhouse-release-19-13} + +### ClickHouse Release 19.13.6.51, 2019-10-02 {#clickhouse-release-19-13-6-51-2019-10-02} + +#### Bug Fix {#bug-fix-9} + +- This release also contains all bug fixes from 19.11.12.69. + +### ClickHouse Release 19.13.5.44, 2019-09-20 {#clickhouse-release-19-13-5-44-2019-09-20} + +#### Bug Fix {#bug-fix-10} + +- This release also contains all bug fixes from 19.14.6.12. +- Fixed possible inconsistent state of table while executing `DROP` query for replicated table while zookeeper is not accessible. [#6045](https://github.com/ClickHouse/ClickHouse/issues/6045) [#6413](https://github.com/ClickHouse/ClickHouse/pull/6413) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +- Fix for data race in StorageMerge [#6717](https://github.com/ClickHouse/ClickHouse/pull/6717) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix bug introduced in query profiler which leads to endless recv from socket. [#6386](https://github.com/ClickHouse/ClickHouse/pull/6386) ([alesapin](https://github.com/alesapin)) +- Fix excessive CPU usage while executing `JSONExtractRaw` function over a boolean value. [#6208](https://github.com/ClickHouse/ClickHouse/pull/6208) ([Vitaly Baranov](https://github.com/vitlibar)) +- Fixes the regression while pushing to materialized view. [#6415](https://github.com/ClickHouse/ClickHouse/pull/6415) ([Ivan](https://github.com/abyss7)) +- Table function `url` had the vulnerability allowed the attacker to inject arbitrary HTTP headers in the request. This issue was found by [Nikita Tikhomirov](https://github.com/NSTikhomirov). [#6466](https://github.com/ClickHouse/ClickHouse/pull/6466) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix useless `AST` check in Set index. [#6510](https://github.com/ClickHouse/ClickHouse/issues/6510) [#6651](https://github.com/ClickHouse/ClickHouse/pull/6651) ([Nikita Vasilev](https://github.com/nikvas0)) +- Fixed parsing of `AggregateFunction` values embedded in query. [#6575](https://github.com/ClickHouse/ClickHouse/issues/6575) [#6773](https://github.com/ClickHouse/ClickHouse/pull/6773) ([Zhichang Yu](https://github.com/yuzhichang)) +- Fixed wrong behaviour of `trim` functions family. [#6647](https://github.com/ClickHouse/ClickHouse/pull/6647) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.13.4.32, 2019-09-10 {#clickhouse-release-19-13-4-32-2019-09-10} + +#### Bug Fix {#bug-fix-11} + +- This release also contains all bug security fixes from 19.11.9.52 and 19.11.10.54. +- Fixed data race in `system.parts` table and `ALTER` query. [#6245](https://github.com/ClickHouse/ClickHouse/issues/6245) [#6513](https://github.com/ClickHouse/ClickHouse/pull/6513) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed mismatched header in streams happened in case of reading from empty distributed table with sample and prewhere. [#6167](https://github.com/ClickHouse/ClickHouse/issues/6167) ([Lixiang Qian](https://github.com/fancyqlx)) [#6823](https://github.com/ClickHouse/ClickHouse/pull/6823) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fixed crash when using `IN` clause with a subquery with a tuple. [#6125](https://github.com/ClickHouse/ClickHouse/issues/6125) [#6550](https://github.com/ClickHouse/ClickHouse/pull/6550) ([tavplubix](https://github.com/tavplubix)) +- Fix case with same column names in `GLOBAL JOIN ON` section. [#6181](https://github.com/ClickHouse/ClickHouse/pull/6181) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix crash when casting types to `Decimal` that do not support it. Throw exception instead. [#6297](https://github.com/ClickHouse/ClickHouse/pull/6297) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed crash in `extractAll()` function. [#6644](https://github.com/ClickHouse/ClickHouse/pull/6644) ([Artem Zuikov](https://github.com/4ertus2)) +- Query transformation for `MySQL`, `ODBC`, `JDBC` table functions now works properly for `SELECT WHERE` queries with multiple `AND` expressions. [#6381](https://github.com/ClickHouse/ClickHouse/issues/6381) [#6676](https://github.com/ClickHouse/ClickHouse/pull/6676) ([dimarub2000](https://github.com/dimarub2000)) +- Added previous declaration checks for MySQL 8 integration. [#6569](https://github.com/ClickHouse/ClickHouse/pull/6569) ([Rafael David Tinoco](https://github.com/rafaeldtinoco)) + +#### Security Fix {#security-fix-1} + +- Fix two vulnerabilities in codecs in decompression phase (malicious user can fabricate compressed data that will lead to buffer overflow in decompression). [#6670](https://github.com/ClickHouse/ClickHouse/pull/6670) ([Artem Zuikov](https://github.com/4ertus2)) + +### ClickHouse Release 19.13.3.26, 2019-08-22 {#clickhouse-release-19-13-3-26-2019-08-22} + +#### Bug Fix {#bug-fix-12} + +- Fix `ALTER TABLE ... UPDATE` query for tables with `enable_mixed_granularity_parts=1`. [#6543](https://github.com/ClickHouse/ClickHouse/pull/6543) ([alesapin](https://github.com/alesapin)) +- Fix NPE when using IN clause with a subquery with a tuple. [#6125](https://github.com/ClickHouse/ClickHouse/issues/6125) [#6550](https://github.com/ClickHouse/ClickHouse/pull/6550) ([tavplubix](https://github.com/tavplubix)) +- Fixed an issue that if a stale replica becomes alive, it may still have data parts that were removed by DROP PARTITION. [#6522](https://github.com/ClickHouse/ClickHouse/issues/6522) [#6523](https://github.com/ClickHouse/ClickHouse/pull/6523) ([tavplubix](https://github.com/tavplubix)) +- Fixed issue with parsing CSV [#6426](https://github.com/ClickHouse/ClickHouse/issues/6426) [#6559](https://github.com/ClickHouse/ClickHouse/pull/6559) ([tavplubix](https://github.com/tavplubix)) +- Fixed data race in system.parts table and ALTER query. This fixes [#6245](https://github.com/ClickHouse/ClickHouse/issues/6245). [#6513](https://github.com/ClickHouse/ClickHouse/pull/6513) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed wrong code in mutations that may lead to memory corruption. Fixed segfault with read of address `0x14c0` that may happed due to concurrent `DROP TABLE` and `SELECT` from `system.parts` or `system.parts_columns`. Fixed race condition in preparation of mutation queries. Fixed deadlock caused by `OPTIMIZE` of Replicated tables and concurrent modification operations like ALTERs. [#6514](https://github.com/ClickHouse/ClickHouse/pull/6514) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed possible data loss after `ALTER DELETE` query on table with skipping index. [#6224](https://github.com/ClickHouse/ClickHouse/issues/6224) [#6282](https://github.com/ClickHouse/ClickHouse/pull/6282) ([Nikita Vasilev](https://github.com/nikvas0)) + +#### Security Fix {#security-fix-2} + +- If the attacker has write access to ZooKeeper and is able to run custom server available from the network where ClickHouse run, it can create custom-built malicious server that will act as ClickHouse replica and register it in ZooKeeper. When another replica will fetch data part from malicious replica, it can force clickhouse-server to write to arbitrary path on filesystem. Found by Eldar Zaitov, information security team at Yandex. [#6247](https://github.com/ClickHouse/ClickHouse/pull/6247) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.13.2.19, 2019-08-14 {#clickhouse-release-19-13-2-19-2019-08-14} + +#### New Feature {#new-feature-5} + +- Sampling profiler on query level. [Example](https://gist.github.com/alexey-milovidov/92758583dd41c24c360fdb8d6a4da194). [#4247](https://github.com/ClickHouse/ClickHouse/issues/4247) ([laplab](https://github.com/laplab)) [#6124](https://github.com/ClickHouse/ClickHouse/pull/6124) ([alexey-milovidov](https://github.com/alexey-milovidov)) [#6250](https://github.com/ClickHouse/ClickHouse/pull/6250) [#6283](https://github.com/ClickHouse/ClickHouse/pull/6283) [#6386](https://github.com/ClickHouse/ClickHouse/pull/6386) +- Allow to specify a list of columns with `COLUMNS('regexp')` expression that works like a more sophisticated variant of `*` asterisk. [#5951](https://github.com/ClickHouse/ClickHouse/pull/5951) ([mfridental](https://github.com/mfridental)), ([alexey-milovidov](https://github.com/alexey-milovidov)) +- `CREATE TABLE AS table_function()` is now possible [#6057](https://github.com/ClickHouse/ClickHouse/pull/6057) ([dimarub2000](https://github.com/dimarub2000)) +- Adam optimizer for stochastic gradient descent is used by default in `stochasticLinearRegression()` and `stochasticLogisticRegression()` aggregate functions, because it shows good quality without almost any tuning. [#6000](https://github.com/ClickHouse/ClickHouse/pull/6000) ([Quid37](https://github.com/Quid37)) +- Added functions for working with the Ñustom week number [#5212](https://github.com/ClickHouse/ClickHouse/pull/5212) ([Andy Yang](https://github.com/andyyzh)) +- `RENAME` queries now work with all storages. [#5953](https://github.com/ClickHouse/ClickHouse/pull/5953) ([Ivan](https://github.com/abyss7)) +- Now client receive logs from server with any desired level by setting `send_logs_level` regardless to the log level specified in server settings. [#5964](https://github.com/ClickHouse/ClickHouse/pull/5964) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) + +#### Backward Incompatible Change {#backward-incompatible-change-4} + +- The setting `input_format_defaults_for_omitted_fields` is enabled by default. Inserts in Distributed tables need this setting to be the same on cluster (you need to set it before rolling update). It enables calculation of complex default expressions for omitted fields in `JSONEachRow` and `CSV*` formats. It should be the expected behavior but may lead to negligible performance difference. [#6043](https://github.com/ClickHouse/ClickHouse/pull/6043) ([Artem Zuikov](https://github.com/4ertus2)), [#5625](https://github.com/ClickHouse/ClickHouse/pull/5625) ([akuzm](https://github.com/akuzm)) + +#### Experimental Features {#experimental-features} + +- New query processing pipeline. Use `experimental_use_processors=1` option to enable it. Use for your own trouble. [#4914](https://github.com/ClickHouse/ClickHouse/pull/4914) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) + +#### Bug Fix {#bug-fix-13} + +- Kafka integration has been fixed in this version. +- Fixed `DoubleDelta` encoding of `Int64` for large `DoubleDelta` values, improved `DoubleDelta` encoding for random data for `Int32`. [#5998](https://github.com/ClickHouse/ClickHouse/pull/5998) ([Vasily Nemkov](https://github.com/Enmk)) +- Fixed overestimation of `max_rows_to_read` if the setting `merge_tree_uniform_read_distribution` is set to 0. [#6019](https://github.com/ClickHouse/ClickHouse/pull/6019) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Improvement {#improvement-4} + +- Throws an exception if `config.d` file does not have the corresponding root element as the config file [#6123](https://github.com/ClickHouse/ClickHouse/pull/6123) ([dimarub2000](https://github.com/dimarub2000)) + +#### Performance Improvement {#performance-improvement-3} + +- Optimize `count()`. Now it uses the smallest column (if possible). [#6028](https://github.com/ClickHouse/ClickHouse/pull/6028) ([Amos Bird](https://github.com/amosbird)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-5} + +- Report memory usage in performance tests. [#5899](https://github.com/ClickHouse/ClickHouse/pull/5899) ([akuzm](https://github.com/akuzm)) +- Fix build with external `libcxx` [#6010](https://github.com/ClickHouse/ClickHouse/pull/6010) ([Ivan](https://github.com/abyss7)) +- Fix shared build with `rdkafka` library [#6101](https://github.com/ClickHouse/ClickHouse/pull/6101) ([Ivan](https://github.com/abyss7)) + +## ClickHouse Release 19.11 {#clickhouse-release-19-11} + +### ClickHouse Release 19.11.13.74, 2019-11-01 {#clickhouse-release-19-11-13-74-2019-11-01} + +#### Bug Fix {#bug-fix-14} + +- Fixed rare crash in `ALTER MODIFY COLUMN` and vertical merge when one of merged/altered parts is empty (0 rows). [#6780](https://github.com/ClickHouse/ClickHouse/pull/6780) ([alesapin](https://github.com/alesapin)) +- Manual update of `SIMDJSON`. This fixes possible flooding of stderr files with bogus json diagnostic messages. [#7548](https://github.com/ClickHouse/ClickHouse/pull/7548) ([Alexander Kazakov](https://github.com/Akazz)) +- Fixed bug with `mrk` file extension for mutations ([alesapin](https://github.com/alesapin)) + +### ClickHouse Release 19.11.12.69, 2019-10-02 {#clickhouse-release-19-11-12-69-2019-10-02} + +#### Bug Fix {#bug-fix-15} + +- Fixed performance degradation of index analysis on complex keys on large tables. This fixes [#6924](https://github.com/ClickHouse/ClickHouse/issues/6924). [#7075](https://github.com/ClickHouse/ClickHouse/pull/7075) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Avoid rare SIGSEGV while sending data in tables with Distributed engine (`Failed to send batch: file with index XXXXX is absent`). [#7032](https://github.com/ClickHouse/ClickHouse/pull/7032) ([Azat Khuzhin](https://github.com/azat)) +- Fix `Unknown identifier` with multiple joins. This fixes [#5254](https://github.com/ClickHouse/ClickHouse/issues/5254). [#7022](https://github.com/ClickHouse/ClickHouse/pull/7022) ([Artem Zuikov](https://github.com/4ertus2)) + +### ClickHouse Release 19.11.11.57, 2019-09-13 {#clickhouse-release-19-11-11-57-2019-09-13} + +- Fix logical error causing segfaults when selecting from Kafka empty topic. [#6902](https://github.com/ClickHouse/ClickHouse/issues/6902) [#6909](https://github.com/ClickHouse/ClickHouse/pull/6909) ([Ivan](https://github.com/abyss7)) +- Fix for function `ÐrrayEnumerateUniqRanked` with empty arrays in params. [#6928](https://github.com/ClickHouse/ClickHouse/pull/6928) ([proller](https://github.com/proller)) + +### ClickHouse Release 19.11.10.54, 2019-09-10 {#clickhouse-release-19-11-10-54-2019-09-10} + +#### Bug Fix {#bug-fix-16} + +- Do store offsets for Kafka messages manually to be able to commit them all at once for all partitions. Fixes potential duplication in “one consumer - many partitions†scenario. [#6872](https://github.com/ClickHouse/ClickHouse/pull/6872) ([Ivan](https://github.com/abyss7)) + +### ClickHouse Release 19.11.9.52, 2019-09-6 {#clickhouse-release-19-11-9-52-2019-09-6} + +- Improve error handling in cache dictionaries. [#6737](https://github.com/ClickHouse/ClickHouse/pull/6737) ([Vitaly Baranov](https://github.com/vitlibar)) +- Fixed bug in function `arrayEnumerateUniqRanked`. [#6779](https://github.com/ClickHouse/ClickHouse/pull/6779) ([proller](https://github.com/proller)) +- Fix `JSONExtract` function while extracting a `Tuple` from JSON. [#6718](https://github.com/ClickHouse/ClickHouse/pull/6718) ([Vitaly Baranov](https://github.com/vitlibar)) +- Fixed possible data loss after `ALTER DELETE` query on table with skipping index. [#6224](https://github.com/ClickHouse/ClickHouse/issues/6224) [#6282](https://github.com/ClickHouse/ClickHouse/pull/6282) ([Nikita Vasilev](https://github.com/nikvas0)) +- Fixed performance test. [#6392](https://github.com/ClickHouse/ClickHouse/pull/6392) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Parquet: Fix reading boolean columns. [#6579](https://github.com/ClickHouse/ClickHouse/pull/6579) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed wrong behaviour of `nullIf` function for constant arguments. [#6518](https://github.com/ClickHouse/ClickHouse/pull/6518) ([Guillaume Tassery](https://github.com/YiuRULE)) [#6580](https://github.com/ClickHouse/ClickHouse/pull/6580) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix Kafka messages duplication problem on normal server restart. [#6597](https://github.com/ClickHouse/ClickHouse/pull/6597) ([Ivan](https://github.com/abyss7)) +- Fixed an issue when long `ALTER UPDATE` or `ALTER DELETE` may prevent regular merges to run. Prevent mutations from executing if there is no enough free threads available. [#6502](https://github.com/ClickHouse/ClickHouse/issues/6502) [#6617](https://github.com/ClickHouse/ClickHouse/pull/6617) ([tavplubix](https://github.com/tavplubix)) +- Fixed error with processing “timezone†in server configuration file. [#6709](https://github.com/ClickHouse/ClickHouse/pull/6709) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix kafka tests. [#6805](https://github.com/ClickHouse/ClickHouse/pull/6805) ([Ivan](https://github.com/abyss7)) + +#### Security Fix {#security-fix-3} + +- If the attacker has write access to ZooKeeper and is able to run custom server available from the network where ClickHouse runs, it can create custom-built malicious server that will act as ClickHouse replica and register it in ZooKeeper. When another replica will fetch data part from malicious replica, it can force clickhouse-server to write to arbitrary path on filesystem. Found by Eldar Zaitov, information security team at Yandex. [#6247](https://github.com/ClickHouse/ClickHouse/pull/6247) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.11.8.46, 2019-08-22 {#clickhouse-release-19-11-8-46-2019-08-22} + +#### Bug Fix {#bug-fix-17} + +- Fix `ALTER TABLE ... UPDATE` query for tables with `enable_mixed_granularity_parts=1`. [#6543](https://github.com/ClickHouse/ClickHouse/pull/6543) ([alesapin](https://github.com/alesapin)) +- Fix NPE when using IN clause with a subquery with a tuple. [#6125](https://github.com/ClickHouse/ClickHouse/issues/6125) [#6550](https://github.com/ClickHouse/ClickHouse/pull/6550) ([tavplubix](https://github.com/tavplubix)) +- Fixed an issue that if a stale replica becomes alive, it may still have data parts that were removed by DROP PARTITION. [#6522](https://github.com/ClickHouse/ClickHouse/issues/6522) [#6523](https://github.com/ClickHouse/ClickHouse/pull/6523) ([tavplubix](https://github.com/tavplubix)) +- Fixed issue with parsing CSV [#6426](https://github.com/ClickHouse/ClickHouse/issues/6426) [#6559](https://github.com/ClickHouse/ClickHouse/pull/6559) ([tavplubix](https://github.com/tavplubix)) +- Fixed data race in system.parts table and ALTER query. This fixes [#6245](https://github.com/ClickHouse/ClickHouse/issues/6245). [#6513](https://github.com/ClickHouse/ClickHouse/pull/6513) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed wrong code in mutations that may lead to memory corruption. Fixed segfault with read of address `0x14c0` that may happed due to concurrent `DROP TABLE` and `SELECT` from `system.parts` or `system.parts_columns`. Fixed race condition in preparation of mutation queries. Fixed deadlock caused by `OPTIMIZE` of Replicated tables and concurrent modification operations like ALTERs. [#6514](https://github.com/ClickHouse/ClickHouse/pull/6514) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.11.7.40, 2019-08-14 {#clickhouse-release-19-11-7-40-2019-08-14} + +#### Bug Fix {#bug-fix-18} + +- Kafka integration has been fixed in this version. +- Fix segfault when using `arrayReduce` for constant arguments. [#6326](https://github.com/ClickHouse/ClickHouse/pull/6326) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed `toFloat()` monotonicity. [#6374](https://github.com/ClickHouse/ClickHouse/pull/6374) ([dimarub2000](https://github.com/dimarub2000)) +- Fix segfault with enabled `optimize_skip_unused_shards` and missing sharding key. [#6384](https://github.com/ClickHouse/ClickHouse/pull/6384) ([CurtizJ](https://github.com/CurtizJ)) +- Fixed logic of `arrayEnumerateUniqRanked` function. [#6423](https://github.com/ClickHouse/ClickHouse/pull/6423) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Removed extra verbose logging from MySQL handler. [#6389](https://github.com/ClickHouse/ClickHouse/pull/6389) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix wrong behavior and possible segfaults in `topK` and `topKWeighted` aggregated functions. [#6404](https://github.com/ClickHouse/ClickHouse/pull/6404) ([CurtizJ](https://github.com/CurtizJ)) +- Do not expose virtual columns in `system.columns` table. This is required for backward compatibility. [#6406](https://github.com/ClickHouse/ClickHouse/pull/6406) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix bug with memory allocation for string fields in complex key cache dictionary. [#6447](https://github.com/ClickHouse/ClickHouse/pull/6447) ([alesapin](https://github.com/alesapin)) +- Fix bug with enabling adaptive granularity when creating new replica for `Replicated*MergeTree` table. [#6452](https://github.com/ClickHouse/ClickHouse/pull/6452) ([alesapin](https://github.com/alesapin)) +- Fix infinite loop when reading Kafka messages. [#6354](https://github.com/ClickHouse/ClickHouse/pull/6354) ([abyss7](https://github.com/abyss7)) +- Fixed the possibility of a fabricated query to cause server crash due to stack overflow in SQL parser and possibility of stack overflow in `Merge` and `Distributed` tables [#6433](https://github.com/ClickHouse/ClickHouse/pull/6433) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed Gorilla encoding error on small sequences. [#6444](https://github.com/ClickHouse/ClickHouse/pull/6444) ([Enmk](https://github.com/Enmk)) + +#### Improvement {#improvement-5} + +- Allow user to override `poll_interval` and `idle_connection_timeout` settings on connection. [#6230](https://github.com/ClickHouse/ClickHouse/pull/6230) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.11.5.28, 2019-08-05 {#clickhouse-release-19-11-5-28-2019-08-05} + +#### Bug Fix {#bug-fix-19} + +- Fixed the possibility of hanging queries when server is overloaded. [#6301](https://github.com/ClickHouse/ClickHouse/pull/6301) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix FPE in yandexConsistentHash function. This fixes [#6304](https://github.com/ClickHouse/ClickHouse/issues/6304). [#6126](https://github.com/ClickHouse/ClickHouse/pull/6126) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed bug in conversion of `LowCardinality` types in `AggregateFunctionFactory`. This fixes [#6257](https://github.com/ClickHouse/ClickHouse/issues/6257). [#6281](https://github.com/ClickHouse/ClickHouse/pull/6281) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fix parsing of `bool` settings from `true` and `false` strings in configuration files. [#6278](https://github.com/ClickHouse/ClickHouse/pull/6278) ([alesapin](https://github.com/alesapin)) +- Fix rare bug with incompatible stream headers in queries to `Distributed` table over `MergeTree` table when part of `WHERE` moves to `PREWHERE`. [#6236](https://github.com/ClickHouse/ClickHouse/pull/6236) ([alesapin](https://github.com/alesapin)) +- Fixed overflow in integer division of signed type to unsigned type. This fixes [#6214](https://github.com/ClickHouse/ClickHouse/issues/6214). [#6233](https://github.com/ClickHouse/ClickHouse/pull/6233) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Backward Incompatible Change {#backward-incompatible-change-5} + +- `Kafka` still broken. + +### ClickHouse Release 19.11.4.24, 2019-08-01 {#clickhouse-release-19-11-4-24-2019-08-01} + +#### Bug Fix {#bug-fix-20} + +- Fix bug with writing secondary indices marks with adaptive granularity. [#6126](https://github.com/ClickHouse/ClickHouse/pull/6126) ([alesapin](https://github.com/alesapin)) +- Fix `WITH ROLLUP` and `WITH CUBE` modifiers of `GROUP BY` with two-level aggregation. [#6225](https://github.com/ClickHouse/ClickHouse/pull/6225) ([Anton Popov](https://github.com/CurtizJ)) +- Fixed hang in `JSONExtractRaw` function. Fixed [#6195](https://github.com/ClickHouse/ClickHouse/issues/6195) [#6198](https://github.com/ClickHouse/ClickHouse/pull/6198) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix segfault in ExternalLoader::reloadOutdated(). [#6082](https://github.com/ClickHouse/ClickHouse/pull/6082) ([Vitaly Baranov](https://github.com/vitlibar)) +- Fixed the case when server may close listening sockets but not shutdown and continue serving remaining queries. You may end up with two running clickhouse-server processes. Sometimes, the server may return an error `bad_function_call` for remaining queries. [#6231](https://github.com/ClickHouse/ClickHouse/pull/6231) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed useless and incorrect condition on update field for initial loading of external dictionaries via ODBC, MySQL, ClickHouse and HTTP. This fixes [#6069](https://github.com/ClickHouse/ClickHouse/issues/6069) [#6083](https://github.com/ClickHouse/ClickHouse/pull/6083) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed irrelevant exception in cast of `LowCardinality(Nullable)` to not-Nullable column in case if it does not contain Nulls (e.g. in query like `SELECT CAST(CAST('Hello' AS LowCardinality(Nullable(String))) AS String)`. [#6094](https://github.com/ClickHouse/ClickHouse/issues/6094) [#6119](https://github.com/ClickHouse/ClickHouse/pull/6119) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fix non-deterministic result of “uniq†aggregate function in extreme rare cases. The bug was present in all ClickHouse versions. [#6058](https://github.com/ClickHouse/ClickHouse/pull/6058) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Segfault when we set a little bit too high CIDR on the function `IPv6CIDRToRange`. [#6068](https://github.com/ClickHouse/ClickHouse/pull/6068) ([Guillaume Tassery](https://github.com/YiuRULE)) +- Fixed small memory leak when server throw many exceptions from many different contexts. [#6144](https://github.com/ClickHouse/ClickHouse/pull/6144) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix the situation when consumer got paused before subscription and not resumed afterwards. [#6075](https://github.com/ClickHouse/ClickHouse/pull/6075) ([Ivan](https://github.com/abyss7)) Note that Kafka is broken in this version. +- Clearing the Kafka data buffer from the previous read operation that was completed with an error [#6026](https://github.com/ClickHouse/ClickHouse/pull/6026) ([Nikolay](https://github.com/bopohaa)) Note that Kafka is broken in this version. +- Since `StorageMergeTree::background_task_handle` is initialized in `startup()` the `MergeTreeBlockOutputStream::write()` may try to use it before initialization. Just check if it is initialized. [#6080](https://github.com/ClickHouse/ClickHouse/pull/6080) ([Ivan](https://github.com/abyss7)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-6} + +- Added official `rpm` packages. [#5740](https://github.com/ClickHouse/ClickHouse/pull/5740) ([proller](https://github.com/proller)) ([alesapin](https://github.com/alesapin)) +- Add an ability to build `.rpm` and `.tgz` packages with `packager` script. [#5769](https://github.com/ClickHouse/ClickHouse/pull/5769) ([alesapin](https://github.com/alesapin)) +- Fixes for “Arcadia†build system. [#6223](https://github.com/ClickHouse/ClickHouse/pull/6223) ([proller](https://github.com/proller)) + +#### Backward Incompatible Change {#backward-incompatible-change-6} + +- `Kafka` is broken in this version. + +### ClickHouse Release 19.11.3.11, 2019-07-18 {#clickhouse-release-19-11-3-11-2019-07-18} + +#### New Feature {#new-feature-6} + +- Added support for prepared statements. [#5331](https://github.com/ClickHouse/ClickHouse/pull/5331/) ([Alexander](https://github.com/sanych73)) [#5630](https://github.com/ClickHouse/ClickHouse/pull/5630) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- `DoubleDelta` and `Gorilla` column codecs [#5600](https://github.com/ClickHouse/ClickHouse/pull/5600) ([Vasily Nemkov](https://github.com/Enmk)) +- Added `os_thread_priority` setting that allows to control the “nice†value of query processing threads that is used by OS to adjust dynamic scheduling priority. It requires `CAP_SYS_NICE` capabilities to work. This implements [#5858](https://github.com/ClickHouse/ClickHouse/issues/5858) [#5909](https://github.com/ClickHouse/ClickHouse/pull/5909) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Implement `_topic`, `_offset`, `_key` columns for Kafka engine [#5382](https://github.com/ClickHouse/ClickHouse/pull/5382) ([Ivan](https://github.com/abyss7)) Note that Kafka is broken in this version. +- Add aggregate function combinator `-Resample` [#5590](https://github.com/ClickHouse/ClickHouse/pull/5590) ([hcz](https://github.com/hczhcz)) +- Aggregate functions `groupArrayMovingSum(win_size)(x)` and `groupArrayMovingAvg(win_size)(x)`, which calculate moving sum/avg with or without window-size limitation. [#5595](https://github.com/ClickHouse/ClickHouse/pull/5595) ([inv2004](https://github.com/inv2004)) +- Add synonim `arrayFlatten` \<-\> `flatten` [#5764](https://github.com/ClickHouse/ClickHouse/pull/5764) ([hcz](https://github.com/hczhcz)) +- Intergate H3 function `geoToH3` from Uber. [#4724](https://github.com/ClickHouse/ClickHouse/pull/4724) ([Remen Ivan](https://github.com/BHYCHIK)) [#5805](https://github.com/ClickHouse/ClickHouse/pull/5805) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Bug Fix {#bug-fix-21} + +- Implement DNS cache with asynchronous update. Separate thread resolves all hosts and updates DNS cache with period (setting `dns_cache_update_period`). It should help, when ip of hosts changes frequently. [#5857](https://github.com/ClickHouse/ClickHouse/pull/5857) ([Anton Popov](https://github.com/CurtizJ)) +- Fix segfault in `Delta` codec which affects columns with values less than 32 bits size. The bug led to random memory corruption. [#5786](https://github.com/ClickHouse/ClickHouse/pull/5786) ([alesapin](https://github.com/alesapin)) +- Fix segfault in TTL merge with non-physical columns in block. [#5819](https://github.com/ClickHouse/ClickHouse/pull/5819) ([Anton Popov](https://github.com/CurtizJ)) +- Fix rare bug in checking of part with `LowCardinality` column. Previously `checkDataPart` always fails for part with `LowCardinality` column. [#5832](https://github.com/ClickHouse/ClickHouse/pull/5832) ([alesapin](https://github.com/alesapin)) +- Avoid hanging connections when server thread pool is full. It is important for connections from `remote` table function or connections to a shard without replicas when there is long connection timeout. This fixes [#5878](https://github.com/ClickHouse/ClickHouse/issues/5878) [#5881](https://github.com/ClickHouse/ClickHouse/pull/5881) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Support for constant arguments to `evalMLModel` function. This fixes [#5817](https://github.com/ClickHouse/ClickHouse/issues/5817) [#5820](https://github.com/ClickHouse/ClickHouse/pull/5820) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed the issue when ClickHouse determines default time zone as `UCT` instead of `UTC`. This fixes [#5804](https://github.com/ClickHouse/ClickHouse/issues/5804). [#5828](https://github.com/ClickHouse/ClickHouse/pull/5828) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed buffer underflow in `visitParamExtractRaw`. This fixes [#5901](https://github.com/ClickHouse/ClickHouse/issues/5901) [#5902](https://github.com/ClickHouse/ClickHouse/pull/5902) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Now distributed `DROP/ALTER/TRUNCATE/OPTIMIZE ON CLUSTER` queries will be executed directly on leader replica. [#5757](https://github.com/ClickHouse/ClickHouse/pull/5757) ([alesapin](https://github.com/alesapin)) +- Fix `coalesce` for `ColumnConst` with `ColumnNullable` + related changes. [#5755](https://github.com/ClickHouse/ClickHouse/pull/5755) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix the `ReadBufferFromKafkaConsumer` so that it keeps reading new messages after `commit()` even if it was stalled before [#5852](https://github.com/ClickHouse/ClickHouse/pull/5852) ([Ivan](https://github.com/abyss7)) +- Fix `FULL` and `RIGHT` JOIN results when joining on `Nullable` keys in right table. [#5859](https://github.com/ClickHouse/ClickHouse/pull/5859) ([Artem Zuikov](https://github.com/4ertus2)) +- Possible fix of infinite sleeping of low-priority queries. [#5842](https://github.com/ClickHouse/ClickHouse/pull/5842) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix race condition, which cause that some queries may not appear in query_log after `SYSTEM FLUSH LOGS` query. [#5456](https://github.com/ClickHouse/ClickHouse/issues/5456) [#5685](https://github.com/ClickHouse/ClickHouse/pull/5685) ([Anton Popov](https://github.com/CurtizJ)) +- Fixed `heap-use-after-free` ASan warning in ClusterCopier caused by watch which try to use already removed copier object. [#5871](https://github.com/ClickHouse/ClickHouse/pull/5871) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fixed wrong `StringRef` pointer returned by some implementations of `IColumn::deserializeAndInsertFromArena`. This bug affected only unit-tests. [#5973](https://github.com/ClickHouse/ClickHouse/pull/5973) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Prevent source and intermediate array join columns of masking same name columns. [#5941](https://github.com/ClickHouse/ClickHouse/pull/5941) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix insert and select query to MySQL engine with MySQL style identifier quoting. [#5704](https://github.com/ClickHouse/ClickHouse/pull/5704) ([Winter Zhang](https://github.com/zhang2014)) +- Now `CHECK TABLE` query can work with MergeTree engine family. It returns check status and message if any for each part (or file in case of simplier engines). Also, fix bug in fetch of a broken part. [#5865](https://github.com/ClickHouse/ClickHouse/pull/5865) ([alesapin](https://github.com/alesapin)) +- Fix SPLIT_SHARED_LIBRARIES runtime [#5793](https://github.com/ClickHouse/ClickHouse/pull/5793) ([Danila Kutenin](https://github.com/danlark1)) +- Fixed time zone initialization when `/etc/localtime` is a relative symlink like `../usr/share/zoneinfo/Asia/Istanbul` [#5922](https://github.com/ClickHouse/ClickHouse/pull/5922) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- clickhouse-copier: Fix use-after free on shutdown [#5752](https://github.com/ClickHouse/ClickHouse/pull/5752) ([proller](https://github.com/proller)) +- Updated `simdjson`. Fixed the issue that some invalid JSONs with zero bytes successfully parse. [#5938](https://github.com/ClickHouse/ClickHouse/pull/5938) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix shutdown of SystemLogs [#5802](https://github.com/ClickHouse/ClickHouse/pull/5802) ([Anton Popov](https://github.com/CurtizJ)) +- Fix hanging when condition in invalidate_query depends on a dictionary. [#6011](https://github.com/ClickHouse/ClickHouse/pull/6011) ([Vitaly Baranov](https://github.com/vitlibar)) + +#### Improvement {#improvement-6} + +- Allow unresolvable addresses in cluster configuration. They will be considered unavailable and tried to resolve at every connection attempt. This is especially useful for Kubernetes. This fixes [#5714](https://github.com/ClickHouse/ClickHouse/issues/5714) [#5924](https://github.com/ClickHouse/ClickHouse/pull/5924) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Close idle TCP connections (with one hour timeout by default). This is especially important for large clusters with multiple distributed tables on every server, because every server can possibly keep a connection pool to every other server, and after peak query concurrency, connections will stall. This fixes [#5879](https://github.com/ClickHouse/ClickHouse/issues/5879) [#5880](https://github.com/ClickHouse/ClickHouse/pull/5880) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Better quality of `topK` function. Changed the SavingSpace set behavior to remove the last element if the new element have a bigger weight. [#5833](https://github.com/ClickHouse/ClickHouse/issues/5833) [#5850](https://github.com/ClickHouse/ClickHouse/pull/5850) ([Guillaume Tassery](https://github.com/YiuRULE)) +- URL functions to work with domains now can work for incomplete URLs without scheme [#5725](https://github.com/ClickHouse/ClickHouse/pull/5725) ([alesapin](https://github.com/alesapin)) +- Checksums added to the `system.parts_columns` table. [#5874](https://github.com/ClickHouse/ClickHouse/pull/5874) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +- Added `Enum` data type as a synonim for `Enum8` or `Enum16`. [#5886](https://github.com/ClickHouse/ClickHouse/pull/5886) ([dimarub2000](https://github.com/dimarub2000)) +- Full bit transpose variant for `T64` codec. Could lead to better compression with `zstd`. [#5742](https://github.com/ClickHouse/ClickHouse/pull/5742) ([Artem Zuikov](https://github.com/4ertus2)) +- Condition on `startsWith` function now can uses primary key. This fixes [#5310](https://github.com/ClickHouse/ClickHouse/issues/5310) and [#5882](https://github.com/ClickHouse/ClickHouse/issues/5882) [#5919](https://github.com/ClickHouse/ClickHouse/pull/5919) ([dimarub2000](https://github.com/dimarub2000)) +- Allow to use `clickhouse-copier` with cross-replication cluster topology by permitting empty database name. [#5745](https://github.com/ClickHouse/ClickHouse/pull/5745) ([nvartolomei](https://github.com/nvartolomei)) +- Use `UTC` as default timezone on a system without `tzdata` (e.g. bare Docker container). Before this patch, error message `Could not determine local time zone` was printed and server or client refused to start. [#5827](https://github.com/ClickHouse/ClickHouse/pull/5827) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Returned back support for floating point argument in function `quantileTiming` for backward compatibility. [#5911](https://github.com/ClickHouse/ClickHouse/pull/5911) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Show which table is missing column in error messages. [#5768](https://github.com/ClickHouse/ClickHouse/pull/5768) ([Ivan](https://github.com/abyss7)) +- Disallow run query with same query_id by various users [#5430](https://github.com/ClickHouse/ClickHouse/pull/5430) ([proller](https://github.com/proller)) +- More robust code for sending metrics to Graphite. It will work even during long multiple `RENAME TABLE` operation. [#5875](https://github.com/ClickHouse/ClickHouse/pull/5875) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- More informative error messages will be displayed when ThreadPool cannot schedule a task for execution. This fixes [#5305](https://github.com/ClickHouse/ClickHouse/issues/5305) [#5801](https://github.com/ClickHouse/ClickHouse/pull/5801) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Inverting ngramSearch to be more intuitive [#5807](https://github.com/ClickHouse/ClickHouse/pull/5807) ([Danila Kutenin](https://github.com/danlark1)) +- Add user parsing in HDFS engine builder [#5946](https://github.com/ClickHouse/ClickHouse/pull/5946) ([akonyaev90](https://github.com/akonyaev90)) +- Update default value of `max_ast_elements parameter` [#5933](https://github.com/ClickHouse/ClickHouse/pull/5933) ([Artem Konovalov](https://github.com/izebit)) +- Added a notion of obsolete settings. The obsolete setting `allow_experimental_low_cardinality_type` can be used with no effect. [0f15c01c6802f7ce1a1494c12c846be8c98944cd](https://github.com/ClickHouse/ClickHouse/commit/0f15c01c6802f7ce1a1494c12c846be8c98944cd) [Alexey Milovidov](https://github.com/alexey-milovidov) + +#### Performance Improvement {#performance-improvement-4} + +- Increase number of streams to SELECT from Merge table for more uniform distribution of threads. Added setting `max_streams_multiplier_for_merge_tables`. This fixes [#5797](https://github.com/ClickHouse/ClickHouse/issues/5797) [#5915](https://github.com/ClickHouse/ClickHouse/pull/5915) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-7} + +- Add a backward compatibility test for client-server interaction with different versions of clickhouse. [#5868](https://github.com/ClickHouse/ClickHouse/pull/5868) ([alesapin](https://github.com/alesapin)) +- Test coverage information in every commit and pull request. [#5896](https://github.com/ClickHouse/ClickHouse/pull/5896) ([alesapin](https://github.com/alesapin)) +- Cooperate with address sanitizer to support our custom allocators (`Arena` and `ArenaWithFreeLists`) for better debugging of “use-after-free†errors. [#5728](https://github.com/ClickHouse/ClickHouse/pull/5728) ([akuzm](https://github.com/akuzm)) +- Switch to [LLVM libunwind implementation](https://github.com/llvm-mirror/libunwind) for C++ exception handling and for stack traces printing [#4828](https://github.com/ClickHouse/ClickHouse/pull/4828) ([Nikita Lapkov](https://github.com/laplab)) +- Add two more warnings from -Weverything [#5923](https://github.com/ClickHouse/ClickHouse/pull/5923) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Allow to build ClickHouse with Memory Sanitizer. [#3949](https://github.com/ClickHouse/ClickHouse/pull/3949) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed ubsan report about `bitTest` function in fuzz test. [#5943](https://github.com/ClickHouse/ClickHouse/pull/5943) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Docker: added possibility to init a ClickHouse instance which requires authentication. [#5727](https://github.com/ClickHouse/ClickHouse/pull/5727) ([Korviakov Andrey](https://github.com/shurshun)) +- Update librdkafka to version 1.1.0 [#5872](https://github.com/ClickHouse/ClickHouse/pull/5872) ([Ivan](https://github.com/abyss7)) +- Add global timeout for integration tests and disable some of them in tests code. [#5741](https://github.com/ClickHouse/ClickHouse/pull/5741) ([alesapin](https://github.com/alesapin)) +- Fix some ThreadSanitizer failures. [#5854](https://github.com/ClickHouse/ClickHouse/pull/5854) ([akuzm](https://github.com/akuzm)) +- The `--no-undefined` option forces the linker to check all external names for existence while linking. It’s very useful to track real dependencies between libraries in the split build mode. [#5855](https://github.com/ClickHouse/ClickHouse/pull/5855) ([Ivan](https://github.com/abyss7)) +- Added performance test for [#5797](https://github.com/ClickHouse/ClickHouse/issues/5797) [#5914](https://github.com/ClickHouse/ClickHouse/pull/5914) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed compatibility with gcc-7. [#5840](https://github.com/ClickHouse/ClickHouse/pull/5840) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added support for gcc-9. This fixes [#5717](https://github.com/ClickHouse/ClickHouse/issues/5717) [#5774](https://github.com/ClickHouse/ClickHouse/pull/5774) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed error when libunwind can be linked incorrectly. [#5948](https://github.com/ClickHouse/ClickHouse/pull/5948) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed a few warnings found by PVS-Studio. [#5921](https://github.com/ClickHouse/ClickHouse/pull/5921) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added initial support for `clang-tidy` static analyzer. [#5806](https://github.com/ClickHouse/ClickHouse/pull/5806) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Convert BSD/Linux endian macros( ‘be64toh’ and ‘htobe64’) to the Mac OS X equivalents [#5785](https://github.com/ClickHouse/ClickHouse/pull/5785) ([Fu Chen](https://github.com/fredchenbj)) +- Improved integration tests guide. [#5796](https://github.com/ClickHouse/ClickHouse/pull/5796) ([Vladimir Chebotarev](https://github.com/excitoon)) +- Fixing build at macosx + gcc9 [#5822](https://github.com/ClickHouse/ClickHouse/pull/5822) ([filimonov](https://github.com/filimonov)) +- Fix a hard-to-spot typo: aggreAGte -\> aggregate. [#5753](https://github.com/ClickHouse/ClickHouse/pull/5753) ([akuzm](https://github.com/akuzm)) +- Fix freebsd build [#5760](https://github.com/ClickHouse/ClickHouse/pull/5760) ([proller](https://github.com/proller)) +- Add link to experimental YouTube channel to website [#5845](https://github.com/ClickHouse/ClickHouse/pull/5845) ([Ivan Blinkov](https://github.com/blinkov)) +- CMake: add option for coverage flags: WITH_COVERAGE [#5776](https://github.com/ClickHouse/ClickHouse/pull/5776) ([proller](https://github.com/proller)) +- Fix initial size of some inline PODArray’s. [#5787](https://github.com/ClickHouse/ClickHouse/pull/5787) ([akuzm](https://github.com/akuzm)) +- clickhouse-server.postinst: fix os detection for centos 6 [#5788](https://github.com/ClickHouse/ClickHouse/pull/5788) ([proller](https://github.com/proller)) +- Added Arch linux package generation. [#5719](https://github.com/ClickHouse/ClickHouse/pull/5719) ([Vladimir Chebotarev](https://github.com/excitoon)) +- Split Common/config.h by libs (dbms) [#5715](https://github.com/ClickHouse/ClickHouse/pull/5715) ([proller](https://github.com/proller)) +- Fixes for “Arcadia†build platform [#5795](https://github.com/ClickHouse/ClickHouse/pull/5795) ([proller](https://github.com/proller)) +- Fixes for unconventional build (gcc9, no submodules) [#5792](https://github.com/ClickHouse/ClickHouse/pull/5792) ([proller](https://github.com/proller)) +- Require explicit type in unalignedStore because it was proven to be bug-prone [#5791](https://github.com/ClickHouse/ClickHouse/pull/5791) ([akuzm](https://github.com/akuzm)) +- Fixes macOS build [#5830](https://github.com/ClickHouse/ClickHouse/pull/5830) ([filimonov](https://github.com/filimonov)) +- Performance test concerning the new JIT feature with bigger dataset, as requested here [#5263](https://github.com/ClickHouse/ClickHouse/issues/5263) [#5887](https://github.com/ClickHouse/ClickHouse/pull/5887) ([Guillaume Tassery](https://github.com/YiuRULE)) +- Run stateful tests in stress test [12693e568722f11e19859742f56428455501fd2a](https://github.com/ClickHouse/ClickHouse/commit/12693e568722f11e19859742f56428455501fd2a) ([alesapin](https://github.com/alesapin)) + +#### Backward Incompatible Change {#backward-incompatible-change-7} + +- `Kafka` is broken in this version. +- Enable `adaptive_index_granularity` = 10MB by default for new `MergeTree` tables. If you created new MergeTree tables on version 19.11+, downgrade to versions prior to 19.6 will be impossible. [#5628](https://github.com/ClickHouse/ClickHouse/pull/5628) ([alesapin](https://github.com/alesapin)) +- Removed obsolete undocumented embedded dictionaries that were used by Yandex.Metrica. The functions `OSIn`, `SEIn`, `OSToRoot`, `SEToRoot`, `OSHierarchy`, `SEHierarchy` are no longer available. If you are using these functions, write email to clickhouse-feedback@yandex-team.com. Note: at the last moment we decided to keep these functions for a while. [#5780](https://github.com/ClickHouse/ClickHouse/pull/5780) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +## ClickHouse Release 19.10 {#clickhouse-release-19-10} + +### ClickHouse Release 19.10.1.5, 2019-07-12 {#clickhouse-release-19-10-1-5-2019-07-12} + +#### New Feature {#new-feature-7} + +- Add new column codec: `T64`. Made for (U)IntX/EnumX/Data(Time)/DecimalX columns. It should be good for columns with constant or small range values. Codec itself allows enlarge or shrink data type without re-compression. [#5557](https://github.com/ClickHouse/ClickHouse/pull/5557) ([Artem Zuikov](https://github.com/4ertus2)) +- Add database engine `MySQL` that allow to view all the tables in remote MySQL server [#5599](https://github.com/ClickHouse/ClickHouse/pull/5599) ([Winter Zhang](https://github.com/zhang2014)) +- `bitmapContains` implementation. It’s 2x faster than `bitmapHasAny` if the second bitmap contains one element. [#5535](https://github.com/ClickHouse/ClickHouse/pull/5535) ([Zhichang Yu](https://github.com/yuzhichang)) +- Support for `crc32` function (with behaviour exactly as in MySQL or PHP). Do not use it if you need a hash function. [#5661](https://github.com/ClickHouse/ClickHouse/pull/5661) ([Remen Ivan](https://github.com/BHYCHIK)) +- Implemented `SYSTEM START/STOP DISTRIBUTED SENDS` queries to control asynchronous inserts into `Distributed` tables. [#4935](https://github.com/ClickHouse/ClickHouse/pull/4935) ([Winter Zhang](https://github.com/zhang2014)) + +#### Bug Fix {#bug-fix-22} + +- Ignore query execution limits and max parts size for merge limits while executing mutations. [#5659](https://github.com/ClickHouse/ClickHouse/pull/5659) ([Anton Popov](https://github.com/CurtizJ)) +- Fix bug which may lead to deduplication of normal blocks (extremely rare) and insertion of duplicate blocks (more often). [#5549](https://github.com/ClickHouse/ClickHouse/pull/5549) ([alesapin](https://github.com/alesapin)) +- Fix of function `arrayEnumerateUniqRanked` for arguments with empty arrays [#5559](https://github.com/ClickHouse/ClickHouse/pull/5559) ([proller](https://github.com/proller)) +- Don’t subscribe to Kafka topics without intent to poll any messages. [#5698](https://github.com/ClickHouse/ClickHouse/pull/5698) ([Ivan](https://github.com/abyss7)) +- Make setting `join_use_nulls` get no effect for types that cannot be inside Nullable [#5700](https://github.com/ClickHouse/ClickHouse/pull/5700) ([Olga Khvostikova](https://github.com/stavrolia)) +- Fixed `Incorrect size of index granularity` errors [#5720](https://github.com/ClickHouse/ClickHouse/pull/5720) ([coraxster](https://github.com/coraxster)) +- Fix Float to Decimal convert overflow [#5607](https://github.com/ClickHouse/ClickHouse/pull/5607) ([coraxster](https://github.com/coraxster)) +- Flush buffer when `WriteBufferFromHDFS`’s destructor is called. This fixes writing into `HDFS`. [#5684](https://github.com/ClickHouse/ClickHouse/pull/5684) ([Xindong Peng](https://github.com/eejoin)) + +#### Improvement {#improvement-7} + +- Treat empty cells in `CSV` as default values when the setting `input_format_defaults_for_omitted_fields` is enabled. [#5625](https://github.com/ClickHouse/ClickHouse/pull/5625) ([akuzm](https://github.com/akuzm)) +- Non-blocking loading of external dictionaries. [#5567](https://github.com/ClickHouse/ClickHouse/pull/5567) ([Vitaly Baranov](https://github.com/vitlibar)) +- Network timeouts can be dynamically changed for already established connections according to the settings. [#4558](https://github.com/ClickHouse/ClickHouse/pull/4558) ([Konstantin Podshumok](https://github.com/podshumok)) +- Using “public_suffix_list†for functions `firstSignificantSubdomain`, `cutToFirstSignificantSubdomain`. It’s using a perfect hash table generated by `gperf` with a list generated from the file: https://publicsuffix.org/list/public_suffix_list.dat. (for example, now we recognize the domain `ac.uk` as non-significant). [#5030](https://github.com/ClickHouse/ClickHouse/pull/5030) ([Guillaume Tassery](https://github.com/YiuRULE)) +- Adopted `IPv6` data type in system tables; unified client info columns in `system.processes` and `system.query_log` [#5640](https://github.com/ClickHouse/ClickHouse/pull/5640) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Using sessions for connections with MySQL compatibility protocol. #5476 [#5646](https://github.com/ClickHouse/ClickHouse/pull/5646) ([Yuriy Baranov](https://github.com/yurriy)) +- Support more `ALTER` queries `ON CLUSTER`. [#5593](https://github.com/ClickHouse/ClickHouse/pull/5593) [#5613](https://github.com/ClickHouse/ClickHouse/pull/5613) ([sundyli](https://github.com/sundy-li)) +- Support `` section in `clickhouse-local` config file. [#5540](https://github.com/ClickHouse/ClickHouse/pull/5540) ([proller](https://github.com/proller)) +- Allow run query with `remote` table function in `clickhouse-local` [#5627](https://github.com/ClickHouse/ClickHouse/pull/5627) ([proller](https://github.com/proller)) + +#### Performance Improvement {#performance-improvement-5} + +- Add the possibility to write the final mark at the end of MergeTree columns. It allows to avoid useless reads for keys that are out of table data range. It is enabled only if adaptive index granularity is in use. [#5624](https://github.com/ClickHouse/ClickHouse/pull/5624) ([alesapin](https://github.com/alesapin)) +- Improved performance of MergeTree tables on very slow filesystems by reducing number of `stat` syscalls. [#5648](https://github.com/ClickHouse/ClickHouse/pull/5648) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed performance degradation in reading from MergeTree tables that was introduced in version 19.6. Fixes #5631. [#5633](https://github.com/ClickHouse/ClickHouse/pull/5633) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-8} + +- Implemented `TestKeeper` as an implementation of ZooKeeper interface used for testing [#5643](https://github.com/ClickHouse/ClickHouse/pull/5643) ([alexey-milovidov](https://github.com/alexey-milovidov)) ([levushkin aleksej](https://github.com/alexey-milovidov)) +- From now on `.sql` tests can be run isolated by server, in parallel, with random database. It allows to run them faster, add new tests with custom server configurations, and be sure that different tests does not affect each other. [#5554](https://github.com/ClickHouse/ClickHouse/pull/5554) ([Ivan](https://github.com/abyss7)) +- Remove `` and `` from performance tests [#5672](https://github.com/ClickHouse/ClickHouse/pull/5672) ([Olga Khvostikova](https://github.com/stavrolia)) +- Fixed “select_format†performance test for `Pretty` formats [#5642](https://github.com/ClickHouse/ClickHouse/pull/5642) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +## ClickHouse Release 19.9 {#clickhouse-release-19-9} + +### ClickHouse Release 19.9.3.31, 2019-07-05 {#clickhouse-release-19-9-3-31-2019-07-05} + +#### Bug Fix {#bug-fix-23} + +- Fix segfault in Delta codec which affects columns with values less than 32 bits size. The bug led to random memory corruption. [#5786](https://github.com/ClickHouse/ClickHouse/pull/5786) ([alesapin](https://github.com/alesapin)) +- Fix rare bug in checking of part with LowCardinality column. [#5832](https://github.com/ClickHouse/ClickHouse/pull/5832) ([alesapin](https://github.com/alesapin)) +- Fix segfault in TTL merge with non-physical columns in block. [#5819](https://github.com/ClickHouse/ClickHouse/pull/5819) ([Anton Popov](https://github.com/CurtizJ)) +- Fix potential infinite sleeping of low-priority queries. [#5842](https://github.com/ClickHouse/ClickHouse/pull/5842) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix how ClickHouse determines default time zone as UCT instead of UTC. [#5828](https://github.com/ClickHouse/ClickHouse/pull/5828) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix bug about executing distributed DROP/ALTER/TRUNCATE/OPTIMIZE ON CLUSTER queries on follower replica before leader replica. Now they will be executed directly on leader replica. [#5757](https://github.com/ClickHouse/ClickHouse/pull/5757) ([alesapin](https://github.com/alesapin)) +- Fix race condition, which cause that some queries may not appear in query_log instantly after SYSTEM FLUSH LOGS query. [#5685](https://github.com/ClickHouse/ClickHouse/pull/5685) ([Anton Popov](https://github.com/CurtizJ)) +- Added missing support for constant arguments to `evalMLModel` function. [#5820](https://github.com/ClickHouse/ClickHouse/pull/5820) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.9.2.4, 2019-06-24 {#clickhouse-release-19-9-2-4-2019-06-24} + +#### New Feature {#new-feature-8} + +- Print information about frozen parts in `system.parts` table. [#5471](https://github.com/ClickHouse/ClickHouse/pull/5471) ([proller](https://github.com/proller)) +- Ask client password on clickhouse-client start on tty if not set in arguments [#5092](https://github.com/ClickHouse/ClickHouse/pull/5092) ([proller](https://github.com/proller)) +- Implement `dictGet` and `dictGetOrDefault` functions for Decimal types. [#5394](https://github.com/ClickHouse/ClickHouse/pull/5394) ([Artem Zuikov](https://github.com/4ertus2)) + +#### Improvement {#improvement-8} + +- Debian init: Add service stop timeout [#5522](https://github.com/ClickHouse/ClickHouse/pull/5522) ([proller](https://github.com/proller)) +- Add setting forbidden by default to create table with suspicious types for LowCardinality [#5448](https://github.com/ClickHouse/ClickHouse/pull/5448) ([Olga Khvostikova](https://github.com/stavrolia)) +- Regression functions return model weights when not used as State in function `evalMLMethod`. [#5411](https://github.com/ClickHouse/ClickHouse/pull/5411) ([Quid37](https://github.com/Quid37)) +- Rename and improve regression methods. [#5492](https://github.com/ClickHouse/ClickHouse/pull/5492) ([Quid37](https://github.com/Quid37)) +- Clearer interfaces of string searchers. [#5586](https://github.com/ClickHouse/ClickHouse/pull/5586) ([Danila Kutenin](https://github.com/danlark1)) + +#### Bug Fix {#bug-fix-24} + +- Fix potential data loss in Kafka [#5445](https://github.com/ClickHouse/ClickHouse/pull/5445) ([Ivan](https://github.com/abyss7)) +- Fix potential infinite loop in `PrettySpace` format when called with zero columns [#5560](https://github.com/ClickHouse/ClickHouse/pull/5560) ([Olga Khvostikova](https://github.com/stavrolia)) +- Fixed UInt32 overflow bug in linear models. Allow eval ML model for non-const model argument. [#5516](https://github.com/ClickHouse/ClickHouse/pull/5516) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- `ALTER TABLE ... DROP INDEX IF EXISTS ...` should not raise an exception if provided index does not exist [#5524](https://github.com/ClickHouse/ClickHouse/pull/5524) ([Gleb Novikov](https://github.com/NanoBjorn)) +- Fix segfault with `bitmapHasAny` in scalar subquery [#5528](https://github.com/ClickHouse/ClickHouse/pull/5528) ([Zhichang Yu](https://github.com/yuzhichang)) +- Fixed error when replication connection pool does not retry to resolve host, even when DNS cache was dropped. [#5534](https://github.com/ClickHouse/ClickHouse/pull/5534) ([alesapin](https://github.com/alesapin)) +- Fixed `ALTER ... MODIFY TTL` on ReplicatedMergeTree. [#5539](https://github.com/ClickHouse/ClickHouse/pull/5539) ([Anton Popov](https://github.com/CurtizJ)) +- Fix INSERT into Distributed table with MATERIALIZED column [#5429](https://github.com/ClickHouse/ClickHouse/pull/5429) ([Azat Khuzhin](https://github.com/azat)) +- Fix bad alloc when truncate Join storage [#5437](https://github.com/ClickHouse/ClickHouse/pull/5437) ([TCeason](https://github.com/TCeason)) +- In recent versions of package tzdata some of files are symlinks now. The current mechanism for detecting default timezone gets broken and gives wrong names for some timezones. Now at least we force the timezone name to the contents of TZ if provided. [#5443](https://github.com/ClickHouse/ClickHouse/pull/5443) ([Ivan](https://github.com/abyss7)) +- Fix some extremely rare cases with MultiVolnitsky searcher when the constant needles in sum are at least 16KB long. The algorithm missed or overwrote the previous results which can lead to the incorrect result of `multiSearchAny`. [#5588](https://github.com/ClickHouse/ClickHouse/pull/5588) ([Danila Kutenin](https://github.com/danlark1)) +- Fix the issue when settings for ExternalData requests couldn’t use ClickHouse settings. Also, for now, settings `date_time_input_format` and `low_cardinality_allow_in_native_format` cannot be used because of the ambiguity of names (in external data it can be interpreted as table format and in the query it can be a setting). [#5455](https://github.com/ClickHouse/ClickHouse/pull/5455) ([Danila Kutenin](https://github.com/danlark1)) +- Fix bug when parts were removed only from FS without dropping them from Zookeeper. [#5520](https://github.com/ClickHouse/ClickHouse/pull/5520) ([alesapin](https://github.com/alesapin)) +- Remove debug logging from MySQL protocol [#5478](https://github.com/ClickHouse/ClickHouse/pull/5478) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Skip ZNONODE during DDL query processing [#5489](https://github.com/ClickHouse/ClickHouse/pull/5489) ([Azat Khuzhin](https://github.com/azat)) +- Fix mix `UNION ALL` result column type. There were cases with inconsistent data and column types of resulting columns. [#5503](https://github.com/ClickHouse/ClickHouse/pull/5503) ([Artem Zuikov](https://github.com/4ertus2)) +- Throw an exception on wrong integers in `dictGetT` functions instead of crash. [#5446](https://github.com/ClickHouse/ClickHouse/pull/5446) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix wrong element_count and load_factor for hashed dictionary in `system.dictionaries` table. [#5440](https://github.com/ClickHouse/ClickHouse/pull/5440) ([Azat Khuzhin](https://github.com/azat)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-9} + +- Fixed build without `Brotli` HTTP compression support (`ENABLE_BROTLI=OFF` cmake variable). [#5521](https://github.com/ClickHouse/ClickHouse/pull/5521) ([Anton Yuzhaninov](https://github.com/citrin)) +- Include roaring.h as roaring/roaring.h [#5523](https://github.com/ClickHouse/ClickHouse/pull/5523) ([Orivej Desh](https://github.com/orivej)) +- Fix gcc9 warnings in hyperscan (#line directive is evil!) [#5546](https://github.com/ClickHouse/ClickHouse/pull/5546) ([Danila Kutenin](https://github.com/danlark1)) +- Fix all warnings when compiling with gcc-9. Fix some contrib issues. Fix gcc9 ICE and submit it to bugzilla. [#5498](https://github.com/ClickHouse/ClickHouse/pull/5498) ([Danila Kutenin](https://github.com/danlark1)) +- Fixed linking with lld [#5477](https://github.com/ClickHouse/ClickHouse/pull/5477) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Remove unused specializations in dictionaries [#5452](https://github.com/ClickHouse/ClickHouse/pull/5452) ([Artem Zuikov](https://github.com/4ertus2)) +- Improvement performance tests for formatting and parsing tables for different types of files [#5497](https://github.com/ClickHouse/ClickHouse/pull/5497) ([Olga Khvostikova](https://github.com/stavrolia)) +- Fixes for parallel test run [#5506](https://github.com/ClickHouse/ClickHouse/pull/5506) ([proller](https://github.com/proller)) +- Docker: use configs from clickhouse-test [#5531](https://github.com/ClickHouse/ClickHouse/pull/5531) ([proller](https://github.com/proller)) +- Fix compile for FreeBSD [#5447](https://github.com/ClickHouse/ClickHouse/pull/5447) ([proller](https://github.com/proller)) +- Upgrade boost to 1.70 [#5570](https://github.com/ClickHouse/ClickHouse/pull/5570) ([proller](https://github.com/proller)) +- Fix build clickhouse as submodule [#5574](https://github.com/ClickHouse/ClickHouse/pull/5574) ([proller](https://github.com/proller)) +- Improve JSONExtract performance tests [#5444](https://github.com/ClickHouse/ClickHouse/pull/5444) ([Vitaly Baranov](https://github.com/vitlibar)) + +## ClickHouse Release 19.8 {#clickhouse-release-19-8} + +### ClickHouse Release 19.8.3.8, 2019-06-11 {#clickhouse-release-19-8-3-8-2019-06-11} + +#### New Features {#new-features} + +- Added functions to work with JSON [#4686](https://github.com/ClickHouse/ClickHouse/pull/4686) ([hcz](https://github.com/hczhcz)) [#5124](https://github.com/ClickHouse/ClickHouse/pull/5124). ([Vitaly Baranov](https://github.com/vitlibar)) +- Add a function basename, with a similar behaviour to a basename function, which exists in a lot of languages (`os.path.basename` in python, `basename` in PHP, etc…). Work with both an UNIX-like path or a Windows path. [#5136](https://github.com/ClickHouse/ClickHouse/pull/5136) ([Guillaume Tassery](https://github.com/YiuRULE)) +- Added `LIMIT n, m BY` or `LIMIT m OFFSET n BY` syntax to set offset of n for LIMIT BY clause. [#5138](https://github.com/ClickHouse/ClickHouse/pull/5138) ([Anton Popov](https://github.com/CurtizJ)) +- Added new data type `SimpleAggregateFunction`, which allows to have columns with light aggregation in an `AggregatingMergeTree`. This can only be used with simple functions like `any`, `anyLast`, `sum`, `min`, `max`. [#4629](https://github.com/ClickHouse/ClickHouse/pull/4629) ([Boris Granveaud](https://github.com/bgranvea)) +- Added support for non-constant arguments in function `ngramDistance` [#5198](https://github.com/ClickHouse/ClickHouse/pull/5198) ([Danila Kutenin](https://github.com/danlark1)) +- Added functions `skewPop`, `skewSamp`, `kurtPop` and `kurtSamp` to compute for sequence skewness, sample skewness, kurtosis and sample kurtosis respectively. [#5200](https://github.com/ClickHouse/ClickHouse/pull/5200) ([hcz](https://github.com/hczhcz)) +- Support rename operation for `MaterializeView` storage. [#5209](https://github.com/ClickHouse/ClickHouse/pull/5209) ([Guillaume Tassery](https://github.com/YiuRULE)) +- Added server which allows connecting to ClickHouse using MySQL client. [#4715](https://github.com/ClickHouse/ClickHouse/pull/4715) ([Yuriy Baranov](https://github.com/yurriy)) +- Add `toDecimal*OrZero` and `toDecimal*OrNull` functions. [#5291](https://github.com/ClickHouse/ClickHouse/pull/5291) ([Artem Zuikov](https://github.com/4ertus2)) +- Support Decimal types in functions: `quantile`, `quantiles`, `median`, `quantileExactWeighted`, `quantilesExactWeighted`, medianExactWeighted. [#5304](https://github.com/ClickHouse/ClickHouse/pull/5304) ([Artem Zuikov](https://github.com/4ertus2)) +- Added `toValidUTF8` function, which replaces all invalid UTF-8 characters by replacement character � (U+FFFD). [#5322](https://github.com/ClickHouse/ClickHouse/pull/5322) ([Danila Kutenin](https://github.com/danlark1)) +- Added `format` function. Formatting constant pattern (simplified Python format pattern) with the strings listed in the arguments. [#5330](https://github.com/ClickHouse/ClickHouse/pull/5330) ([Danila Kutenin](https://github.com/danlark1)) +- Added `system.detached_parts` table containing information about detached parts of `MergeTree` tables. [#5353](https://github.com/ClickHouse/ClickHouse/pull/5353) ([akuzm](https://github.com/akuzm)) +- Added `ngramSearch` function to calculate the non-symmetric difference between needle and haystack. [#5418](https://github.com/ClickHouse/ClickHouse/pull/5418)[#5422](https://github.com/ClickHouse/ClickHouse/pull/5422) ([Danila Kutenin](https://github.com/danlark1)) +- Implementation of basic machine learning methods (stochastic linear regression and logistic regression) using aggregate functions interface. Has different strategies for updating model weights (simple gradient descent, momentum method, Nesterov method). Also supports mini-batches of custom size. [#4943](https://github.com/ClickHouse/ClickHouse/pull/4943) ([Quid37](https://github.com/Quid37)) +- Implementation of `geohashEncode` and `geohashDecode` functions. [#5003](https://github.com/ClickHouse/ClickHouse/pull/5003) ([Vasily Nemkov](https://github.com/Enmk)) +- Added aggregate function `timeSeriesGroupSum`, which can aggregate different time series that sample timestamp not alignment. It will use linear interpolation between two sample timestamp and then sum time-series together. Added aggregate function `timeSeriesGroupRateSum`, which calculates the rate of time-series and then sum rates together. [#4542](https://github.com/ClickHouse/ClickHouse/pull/4542) ([Yangkuan Liu](https://github.com/LiuYangkuan)) +- Added functions `IPv4CIDRtoIPv4Range` and `IPv6CIDRtoIPv6Range` to calculate the lower and higher bounds for an IP in the subnet using a CIDR. [#5095](https://github.com/ClickHouse/ClickHouse/pull/5095) ([Guillaume Tassery](https://github.com/YiuRULE)) +- Add a X-ClickHouse-Summary header when we send a query using HTTP with enabled setting `send_progress_in_http_headers`. Return the usual information of X-ClickHouse-Progress, with additional information like how many rows and bytes were inserted in the query. [#5116](https://github.com/ClickHouse/ClickHouse/pull/5116) ([Guillaume Tassery](https://github.com/YiuRULE)) + +#### Improvements {#improvements} + +- Added `max_parts_in_total` setting for MergeTree family of tables (default: 100 000) that prevents unsafe specification of partition key #5166. [#5171](https://github.com/ClickHouse/ClickHouse/pull/5171) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- `clickhouse-obfuscator`: derive seed for individual columns by combining initial seed with column name, not column position. This is intended to transform datasets with multiple related tables, so that tables will remain JOINable after transformation. [#5178](https://github.com/ClickHouse/ClickHouse/pull/5178) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added functions `JSONExtractRaw`, `JSONExtractKeyAndValues`. Renamed functions `jsonExtract` to `JSONExtract`. When something goes wrong these functions return the correspondent values, not `NULL`. Modified function `JSONExtract`, now it gets the return type from its last parameter and does not inject nullables. Implemented fallback to RapidJSON in case AVX2 instructions are not available. Simdjson library updated to a new version. [#5235](https://github.com/ClickHouse/ClickHouse/pull/5235) ([Vitaly Baranov](https://github.com/vitlibar)) +- Now `if` and `multiIf` functions do not rely on the condition’s `Nullable`, but rely on the branches for sql compatibility. [#5238](https://github.com/ClickHouse/ClickHouse/pull/5238) ([Jian Wu](https://github.com/janplus)) +- `In` predicate now generates `Null` result from `Null` input like the `Equal` function. [#5152](https://github.com/ClickHouse/ClickHouse/pull/5152) ([Jian Wu](https://github.com/janplus)) +- Check the time limit every (flush_interval / poll_timeout) number of rows from Kafka. This allows to break the reading from Kafka consumer more frequently and to check the time limits for the top-level streams [#5249](https://github.com/ClickHouse/ClickHouse/pull/5249) ([Ivan](https://github.com/abyss7)) +- Link rdkafka with bundled SASL. It should allow to use SASL SCRAM authentication [#5253](https://github.com/ClickHouse/ClickHouse/pull/5253) ([Ivan](https://github.com/abyss7)) +- Batched version of RowRefList for ALL JOINS. [#5267](https://github.com/ClickHouse/ClickHouse/pull/5267) ([Artem Zuikov](https://github.com/4ertus2)) +- clickhouse-server: more informative listen error messages. [#5268](https://github.com/ClickHouse/ClickHouse/pull/5268) ([proller](https://github.com/proller)) +- Support dictionaries in clickhouse-copier for functions in `` [#5270](https://github.com/ClickHouse/ClickHouse/pull/5270) ([proller](https://github.com/proller)) +- Add new setting `kafka_commit_every_batch` to regulate Kafka committing policy. + It allows to set commit mode: after every batch of messages is handled, or after the whole block is written to the storage. It’s a trade-off between losing some messages or reading them twice in some extreme situations. [#5308](https://github.com/ClickHouse/ClickHouse/pull/5308) ([Ivan](https://github.com/abyss7)) +- Make `windowFunnel` support other Unsigned Integer Types. [#5320](https://github.com/ClickHouse/ClickHouse/pull/5320) ([sundyli](https://github.com/sundy-li)) +- Allow to shadow virtual column `_table` in Merge engine. [#5325](https://github.com/ClickHouse/ClickHouse/pull/5325) ([Ivan](https://github.com/abyss7)) +- Make `sequenceMatch` aggregate functions support other unsigned Integer types [#5339](https://github.com/ClickHouse/ClickHouse/pull/5339) ([sundyli](https://github.com/sundy-li)) +- Better error messages if checksum mismatch is most likely caused by hardware failures. [#5355](https://github.com/ClickHouse/ClickHouse/pull/5355) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Check that underlying tables support sampling for `StorageMerge` [#5366](https://github.com/ClickHouse/ClickHouse/pull/5366) ([Ivan](https://github.com/abyss7)) +- Сlose MySQL connections after their usage in external dictionaries. It is related to issue #893. [#5395](https://github.com/ClickHouse/ClickHouse/pull/5395) ([Clément Rodriguez](https://github.com/clemrodriguez)) +- Improvements of MySQL Wire Protocol. Changed name of format to MySQLWire. Using RAII for calling RSA_free. Disabling SSL if context cannot be created. [#5419](https://github.com/ClickHouse/ClickHouse/pull/5419) ([Yuriy Baranov](https://github.com/yurriy)) +- clickhouse-client: allow to run with unaccessable history file (read-only, no disk space, file is directory, …). [#5431](https://github.com/ClickHouse/ClickHouse/pull/5431) ([proller](https://github.com/proller)) +- Respect query settings in asynchronous INSERTs into Distributed tables. [#4936](https://github.com/ClickHouse/ClickHouse/pull/4936) ([TCeason](https://github.com/TCeason)) +- Renamed functions `leastSqr` to `simpleLinearRegression`, `LinearRegression` to `linearRegression`, `LogisticRegression` to `logisticRegression`. [#5391](https://github.com/ClickHouse/ClickHouse/pull/5391) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) + +#### Performance Improvements {#performance-improvements} + +- Parallelize processing of parts of non-replicated MergeTree tables in ALTER MODIFY query. [#4639](https://github.com/ClickHouse/ClickHouse/pull/4639) ([Ivan Kush](https://github.com/IvanKush)) +- Optimizations in regular expressions extraction. [#5193](https://github.com/ClickHouse/ClickHouse/pull/5193) [#5191](https://github.com/ClickHouse/ClickHouse/pull/5191) ([Danila Kutenin](https://github.com/danlark1)) +- Do not add right join key column to join result if it’s used only in join on section. [#5260](https://github.com/ClickHouse/ClickHouse/pull/5260) ([Artem Zuikov](https://github.com/4ertus2)) +- Freeze the Kafka buffer after first empty response. It avoids multiple invokations of `ReadBuffer::next()` for empty result in some row-parsing streams. [#5283](https://github.com/ClickHouse/ClickHouse/pull/5283) ([Ivan](https://github.com/abyss7)) +- `concat` function optimization for multiple arguments. [#5357](https://github.com/ClickHouse/ClickHouse/pull/5357) ([Danila Kutenin](https://github.com/danlark1)) +- Query optimisation. Allow push down IN statement while rewriting commа/cross join into inner one. [#5396](https://github.com/ClickHouse/ClickHouse/pull/5396) ([Artem Zuikov](https://github.com/4ertus2)) +- Upgrade our LZ4 implementation with reference one to have faster decompression. [#5070](https://github.com/ClickHouse/ClickHouse/pull/5070) ([Danila Kutenin](https://github.com/danlark1)) +- Implemented MSD radix sort (based on kxsort), and partial sorting. [#5129](https://github.com/ClickHouse/ClickHouse/pull/5129) ([Evgenii Pravda](https://github.com/kvinty)) + +#### Bug Fixes {#bug-fixes} + +- Fix push require columns with join [#5192](https://github.com/ClickHouse/ClickHouse/pull/5192) ([Winter Zhang](https://github.com/zhang2014)) +- Fixed bug, when ClickHouse is run by systemd, the command `sudo service clickhouse-server forcerestart` was not working as expected. [#5204](https://github.com/ClickHouse/ClickHouse/pull/5204) ([proller](https://github.com/proller)) +- Fix http error codes in DataPartsExchange (interserver http server on 9009 port always returned code 200, even on errors). [#5216](https://github.com/ClickHouse/ClickHouse/pull/5216) ([proller](https://github.com/proller)) +- Fix SimpleAggregateFunction for String longer than MAX_SMALL_STRING_SIZE [#5311](https://github.com/ClickHouse/ClickHouse/pull/5311) ([Azat Khuzhin](https://github.com/azat)) +- Fix error for `Decimal` to `Nullable(Decimal)` conversion in IN. Support other Decimal to Decimal conversions (including different scales). [#5350](https://github.com/ClickHouse/ClickHouse/pull/5350) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed FPU clobbering in simdjson library that lead to wrong calculation of `uniqHLL` and `uniqCombined` aggregate function and math functions such as `log`. [#5354](https://github.com/ClickHouse/ClickHouse/pull/5354) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed handling mixed const/nonconst cases in JSON functions. [#5435](https://github.com/ClickHouse/ClickHouse/pull/5435) ([Vitaly Baranov](https://github.com/vitlibar)) +- Fix `retention` function. Now all conditions that satisfy in a row of data are added to the data state. [#5119](https://github.com/ClickHouse/ClickHouse/pull/5119) ([å°è·¯](https://github.com/nicelulu)) +- Fix result type for `quantileExact` with Decimals. [#5304](https://github.com/ClickHouse/ClickHouse/pull/5304) ([Artem Zuikov](https://github.com/4ertus2)) + +#### Documentation {#documentation} + +- Translate documentation for `CollapsingMergeTree` to chinese. [#5168](https://github.com/ClickHouse/ClickHouse/pull/5168) ([张风啸](https://github.com/AlexZFX)) +- Translate some documentation about table engines to chinese. + [#5134](https://github.com/ClickHouse/ClickHouse/pull/5134) + [#5328](https://github.com/ClickHouse/ClickHouse/pull/5328) + ([never lee](https://github.com/neverlee)) + +#### Build/Testing/Packaging Improvements {#buildtestingpackaging-improvements} + +- Fix some sanitizer reports that show probable use-after-free.[#5139](https://github.com/ClickHouse/ClickHouse/pull/5139) [#5143](https://github.com/ClickHouse/ClickHouse/pull/5143) [#5393](https://github.com/ClickHouse/ClickHouse/pull/5393) ([Ivan](https://github.com/abyss7)) +- Move performance tests out of separate directories for convenience. [#5158](https://github.com/ClickHouse/ClickHouse/pull/5158) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix incorrect performance tests. [#5255](https://github.com/ClickHouse/ClickHouse/pull/5255) ([alesapin](https://github.com/alesapin)) +- Added a tool to calculate checksums caused by bit flips to debug hardware issues. [#5334](https://github.com/ClickHouse/ClickHouse/pull/5334) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Make runner script more usable. [#5340](https://github.com/ClickHouse/ClickHouse/pull/5340)[#5360](https://github.com/ClickHouse/ClickHouse/pull/5360) ([filimonov](https://github.com/filimonov)) +- Add small instruction how to write performance tests. [#5408](https://github.com/ClickHouse/ClickHouse/pull/5408) ([alesapin](https://github.com/alesapin)) +- Add ability to make substitutions in create, fill and drop query in performance tests [#5367](https://github.com/ClickHouse/ClickHouse/pull/5367) ([Olga Khvostikova](https://github.com/stavrolia)) + +## ClickHouse Release 19.7 {#clickhouse-release-19-7} + +### ClickHouse Release 19.7.5.29, 2019-07-05 {#clickhouse-release-19-7-5-29-2019-07-05} + +#### Bug Fix {#bug-fix-25} + +- Fix performance regression in some queries with JOIN. [#5192](https://github.com/ClickHouse/ClickHouse/pull/5192) ([Winter Zhang](https://github.com/zhang2014)) + +### ClickHouse Release 19.7.5.27, 2019-06-09 {#clickhouse-release-19-7-5-27-2019-06-09} + +#### New Features {#new-features-1} + +- Added bitmap related functions `bitmapHasAny` and `bitmapHasAll` analogous to `hasAny` and `hasAll` functions for arrays. [#5279](https://github.com/ClickHouse/ClickHouse/pull/5279) ([Sergi Vladykin](https://github.com/svladykin)) + +#### Bug Fixes {#bug-fixes-1} + +- Fix segfault on `minmax` INDEX with Null value. [#5246](https://github.com/ClickHouse/ClickHouse/pull/5246) ([Nikita Vasilev](https://github.com/nikvas0)) +- Mark all input columns in LIMIT BY as required output. It fixes ‘Not found column’ error in some distributed queries. [#5407](https://github.com/ClickHouse/ClickHouse/pull/5407) ([Constantin S. Pan](https://github.com/kvap)) +- Fix “Column ‘0’ already exists†error in `SELECT .. PREWHERE` on column with DEFAULT [#5397](https://github.com/ClickHouse/ClickHouse/pull/5397) ([proller](https://github.com/proller)) +- Fix `ALTER MODIFY TTL` query on `ReplicatedMergeTree`. [#5539](https://github.com/ClickHouse/ClickHouse/pull/5539/commits) ([Anton Popov](https://github.com/CurtizJ)) +- Don’t crash the server when Kafka consumers have failed to start. [#5285](https://github.com/ClickHouse/ClickHouse/pull/5285) ([Ivan](https://github.com/abyss7)) +- Fixed bitmap functions produce wrong result. [#5359](https://github.com/ClickHouse/ClickHouse/pull/5359) ([Andy Yang](https://github.com/andyyzh)) +- Fix element_count for hashed dictionary (do not include duplicates) [#5440](https://github.com/ClickHouse/ClickHouse/pull/5440) ([Azat Khuzhin](https://github.com/azat)) +- Use contents of environment variable TZ as the name for timezone. It helps to correctly detect default timezone in some cases.[#5443](https://github.com/ClickHouse/ClickHouse/pull/5443) ([Ivan](https://github.com/abyss7)) +- Do not try to convert integers in `dictGetT` functions, because it does not work correctly. Throw an exception instead. [#5446](https://github.com/ClickHouse/ClickHouse/pull/5446) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix settings in ExternalData HTTP request. [#5455](https://github.com/ClickHouse/ClickHouse/pull/5455) ([Danila + Kutenin](https://github.com/danlark1)) +- Fix bug when parts were removed only from FS without dropping them from Zookeeper. [#5520](https://github.com/ClickHouse/ClickHouse/pull/5520) ([alesapin](https://github.com/alesapin)) +- Fix segmentation fault in `bitmapHasAny` function. [#5528](https://github.com/ClickHouse/ClickHouse/pull/5528) ([Zhichang Yu](https://github.com/yuzhichang)) +- Fixed error when replication connection pool does not retry to resolve host, even when DNS cache was dropped. [#5534](https://github.com/ClickHouse/ClickHouse/pull/5534) ([alesapin](https://github.com/alesapin)) +- Fixed `DROP INDEX IF EXISTS` query. Now `ALTER TABLE ... DROP INDEX IF EXISTS ...` query does not raise an exception if provided index does not exist. [#5524](https://github.com/ClickHouse/ClickHouse/pull/5524) ([Gleb Novikov](https://github.com/NanoBjorn)) +- Fix union all supertype column. There were cases with inconsistent data and column types of resulting columns. [#5503](https://github.com/ClickHouse/ClickHouse/pull/5503) ([Artem Zuikov](https://github.com/4ertus2)) +- Skip ZNONODE during DDL query processing. Before if another node removes the znode in task queue, the one that + did not process it, but already get list of children, will terminate the DDLWorker thread. [#5489](https://github.com/ClickHouse/ClickHouse/pull/5489) ([Azat Khuzhin](https://github.com/azat)) +- Fix INSERT into Distributed() table with MATERIALIZED column. [#5429](https://github.com/ClickHouse/ClickHouse/pull/5429) ([Azat Khuzhin](https://github.com/azat)) + +### ClickHouse Release 19.7.3.9, 2019-05-30 {#clickhouse-release-19-7-3-9-2019-05-30} + +#### New Features {#new-features-2} + +- Allow to limit the range of a setting that can be specified by user. + These constraints can be set up in user settings profile. + [#4931](https://github.com/ClickHouse/ClickHouse/pull/4931) ([Vitaly + Baranov](https://github.com/vitlibar)) +- Add a second version of the function `groupUniqArray` with an optional + `max_size` parameter that limits the size of the resulting array. This + behavior is similar to `groupArray(max_size)(x)` function. + [#5026](https://github.com/ClickHouse/ClickHouse/pull/5026) ([Guillaume + Tassery](https://github.com/YiuRULE)) +- For TSVWithNames/CSVWithNames input file formats, column order can now be + determined from file header. This is controlled by + `input_format_with_names_use_header` parameter. + [#5081](https://github.com/ClickHouse/ClickHouse/pull/5081) + ([Alexander](https://github.com/Akazz)) + +#### Bug Fixes {#bug-fixes-2} + +- Crash with uncompressed_cache + JOIN during merge (#5197) + [#5133](https://github.com/ClickHouse/ClickHouse/pull/5133) ([Danila + Kutenin](https://github.com/danlark1)) +- Segmentation fault on a clickhouse-client query to system tables. #5066 + [#5127](https://github.com/ClickHouse/ClickHouse/pull/5127) + ([Ivan](https://github.com/abyss7)) +- Data loss on heavy load via KafkaEngine (#4736) + [#5080](https://github.com/ClickHouse/ClickHouse/pull/5080) + ([Ivan](https://github.com/abyss7)) +- Fixed very rare data race condition that could happen when executing a query with UNION ALL involving at least two SELECTs from system.columns, system.tables, system.parts, system.parts_tables or tables of Merge family and performing ALTER of columns of the related tables concurrently. [#5189](https://github.com/ClickHouse/ClickHouse/pull/5189) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Performance Improvements {#performance-improvements-1} + +- Use radix sort for sorting by single numeric column in `ORDER BY` without + `LIMIT`. [#5106](https://github.com/ClickHouse/ClickHouse/pull/5106), + [#4439](https://github.com/ClickHouse/ClickHouse/pull/4439) + ([Evgenii Pravda](https://github.com/kvinty), + [alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Documentation {#documentation-1} + +- Translate documentation for some table engines to Chinese. + [#5107](https://github.com/ClickHouse/ClickHouse/pull/5107), + [#5094](https://github.com/ClickHouse/ClickHouse/pull/5094), + [#5087](https://github.com/ClickHouse/ClickHouse/pull/5087) + ([张风啸](https://github.com/AlexZFX)), + [#5068](https://github.com/ClickHouse/ClickHouse/pull/5068) ([never + lee](https://github.com/neverlee)) + +#### Build/Testing/Packaging Improvements {#buildtestingpackaging-improvements-1} + +- Print UTF-8 characters properly in `clickhouse-test`. + [#5084](https://github.com/ClickHouse/ClickHouse/pull/5084) + ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Add command line parameter for clickhouse-client to always load suggestion + data. [#5102](https://github.com/ClickHouse/ClickHouse/pull/5102) + ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Resolve some of PVS-Studio warnings. + [#5082](https://github.com/ClickHouse/ClickHouse/pull/5082) + ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Update LZ4 [#5040](https://github.com/ClickHouse/ClickHouse/pull/5040) ([Danila + Kutenin](https://github.com/danlark1)) +- Add gperf to build requirements for upcoming pull request #5030. + [#5110](https://github.com/ClickHouse/ClickHouse/pull/5110) + ([proller](https://github.com/proller)) + +## ClickHouse Release 19.6 {#clickhouse-release-19-6} + +### ClickHouse Release 19.6.3.18, 2019-06-13 {#clickhouse-release-19-6-3-18-2019-06-13} + +#### Bug Fixes {#bug-fixes-3} + +- Fixed IN condition pushdown for queries from table functions `mysql` and `odbc` and corresponding table engines. This fixes #3540 and #2384. [#5313](https://github.com/ClickHouse/ClickHouse/pull/5313) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix deadlock in Zookeeper. [#5297](https://github.com/ClickHouse/ClickHouse/pull/5297) ([github1youlc](https://github.com/github1youlc)) +- Allow quoted decimals in CSV. [#5284](https://github.com/ClickHouse/ClickHouse/pull/5284) ([Artem Zuikov](https://github.com/4ertus2) +- Disallow conversion from float Inf/NaN into Decimals (throw exception). [#5282](https://github.com/ClickHouse/ClickHouse/pull/5282) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix data race in rename query. [#5247](https://github.com/ClickHouse/ClickHouse/pull/5247) ([Winter Zhang](https://github.com/zhang2014)) +- Temporarily disable LFAlloc. Usage of LFAlloc might lead to a lot of MAP_FAILED in allocating UncompressedCache and in a result to crashes of queries at high loaded servers. [cfdba93](https://github.com/ClickHouse/ClickHouse/commit/cfdba938ce22f16efeec504f7f90206a515b1280)([Danila Kutenin](https://github.com/danlark1)) + +### ClickHouse Release 19.6.2.11, 2019-05-13 {#clickhouse-release-19-6-2-11-2019-05-13} + +#### New Features {#new-features-3} + +- TTL expressions for columns and tables. [#4212](https://github.com/ClickHouse/ClickHouse/pull/4212) ([Anton Popov](https://github.com/CurtizJ)) +- Added support for `brotli` compression for HTTP responses (Accept-Encoding: br) [#4388](https://github.com/ClickHouse/ClickHouse/pull/4388) ([Mikhail](https://github.com/fandyushin)) +- Added new function `isValidUTF8` for checking whether a set of bytes is correctly utf-8 encoded. [#4934](https://github.com/ClickHouse/ClickHouse/pull/4934) ([Danila Kutenin](https://github.com/danlark1)) +- Add new load balancing policy `first_or_random` which sends queries to the first specified host and if it’s inaccessible send queries to random hosts of shard. Useful for cross-replication topology setups. [#5012](https://github.com/ClickHouse/ClickHouse/pull/5012) ([nvartolomei](https://github.com/nvartolomei)) + +#### Experimental Features {#experimental-features-1} + +- Add setting `index_granularity_bytes` (adaptive index granularity) for MergeTree\* tables family. [#4826](https://github.com/ClickHouse/ClickHouse/pull/4826) ([alesapin](https://github.com/alesapin)) + +#### Improvements {#improvements-1} + +- Added support for non-constant and negative size and length arguments for function `substringUTF8`. [#4989](https://github.com/ClickHouse/ClickHouse/pull/4989) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Disable push-down to right table in left join, left table in right join, and both tables in full join. This fixes wrong JOIN results in some cases. [#4846](https://github.com/ClickHouse/ClickHouse/pull/4846) ([Ivan](https://github.com/abyss7)) +- `clickhouse-copier`: auto upload task configuration from `--task-file` option [#4876](https://github.com/ClickHouse/ClickHouse/pull/4876) ([proller](https://github.com/proller)) +- Added typos handler for storage factory and table functions factory. [#4891](https://github.com/ClickHouse/ClickHouse/pull/4891) ([Danila Kutenin](https://github.com/danlark1)) +- Support asterisks and qualified asterisks for multiple joins without subqueries [#4898](https://github.com/ClickHouse/ClickHouse/pull/4898) ([Artem Zuikov](https://github.com/4ertus2)) +- Make missing column error message more user friendly. [#4915](https://github.com/ClickHouse/ClickHouse/pull/4915) ([Artem Zuikov](https://github.com/4ertus2)) + +#### Performance Improvements {#performance-improvements-2} + +- Significant speedup of ASOF JOIN [#4924](https://github.com/ClickHouse/ClickHouse/pull/4924) ([Martijn Bakker](https://github.com/Gladdy)) + +#### Backward Incompatible Changes {#backward-incompatible-changes} + +- HTTP header `Query-Id` was renamed to `X-ClickHouse-Query-Id` for consistency. [#4972](https://github.com/ClickHouse/ClickHouse/pull/4972) ([Mikhail](https://github.com/fandyushin)) + +#### Bug Fixes {#bug-fixes-4} + +- Fixed potential null pointer dereference in `clickhouse-copier`. [#4900](https://github.com/ClickHouse/ClickHouse/pull/4900) ([proller](https://github.com/proller)) +- Fixed error on query with JOIN + ARRAY JOIN [#4938](https://github.com/ClickHouse/ClickHouse/pull/4938) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed hanging on start of the server when a dictionary depends on another dictionary via a database with engine=Dictionary. [#4962](https://github.com/ClickHouse/ClickHouse/pull/4962) ([Vitaly Baranov](https://github.com/vitlibar)) +- Partially fix distributed_product_mode = local. It’s possible to allow columns of local tables in where/having/order by/… via table aliases. Throw exception if table does not have alias. There’s not possible to access to the columns without table aliases yet. [#4986](https://github.com/ClickHouse/ClickHouse/pull/4986) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix potentially wrong result for `SELECT DISTINCT` with `JOIN` [#5001](https://github.com/ClickHouse/ClickHouse/pull/5001) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed very rare data race condition that could happen when executing a query with UNION ALL involving at least two SELECTs from system.columns, system.tables, system.parts, system.parts_tables or tables of Merge family and performing ALTER of columns of the related tables concurrently. [#5189](https://github.com/ClickHouse/ClickHouse/pull/5189) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Build/Testing/Packaging Improvements {#buildtestingpackaging-improvements-2} + +- Fixed test failures when running clickhouse-server on different host [#4713](https://github.com/ClickHouse/ClickHouse/pull/4713) ([Vasily Nemkov](https://github.com/Enmk)) +- clickhouse-test: Disable color control sequences in non tty environment. [#4937](https://github.com/ClickHouse/ClickHouse/pull/4937) ([alesapin](https://github.com/alesapin)) +- clickhouse-test: Allow use any test database (remove `test.` qualification where it possible) [#5008](https://github.com/ClickHouse/ClickHouse/pull/5008) ([proller](https://github.com/proller)) +- Fix ubsan errors [#5037](https://github.com/ClickHouse/ClickHouse/pull/5037) ([Vitaly Baranov](https://github.com/vitlibar)) +- Yandex LFAlloc was added to ClickHouse to allocate MarkCache and UncompressedCache data in different ways to catch segfaults more reliable [#4995](https://github.com/ClickHouse/ClickHouse/pull/4995) ([Danila Kutenin](https://github.com/danlark1)) +- Python util to help with backports and changelogs. [#4949](https://github.com/ClickHouse/ClickHouse/pull/4949) ([Ivan](https://github.com/abyss7)) + +## ClickHouse Release 19.5 {#clickhouse-release-19-5} + +### ClickHouse Release 19.5.4.22, 2019-05-13 {#clickhouse-release-19-5-4-22-2019-05-13} + +#### Bug Fixes {#bug-fixes-5} + +- Fixed possible crash in bitmap\* functions [#5220](https://github.com/ClickHouse/ClickHouse/pull/5220) [#5228](https://github.com/ClickHouse/ClickHouse/pull/5228) ([Andy Yang](https://github.com/andyyzh)) +- Fixed very rare data race condition that could happen when executing a query with UNION ALL involving at least two SELECTs from system.columns, system.tables, system.parts, system.parts_tables or tables of Merge family and performing ALTER of columns of the related tables concurrently. [#5189](https://github.com/ClickHouse/ClickHouse/pull/5189) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed error `Set for IN is not created yet in case of using single LowCardinality column in the left part of IN`. This error happened if LowCardinality column was the part of primary key. #5031 [#5154](https://github.com/ClickHouse/ClickHouse/pull/5154) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Modification of retention function: If a row satisfies both the first and NTH condition, only the first satisfied condition is added to the data state. Now all conditions that satisfy in a row of data are added to the data state. [#5119](https://github.com/ClickHouse/ClickHouse/pull/5119) ([å°è·¯](https://github.com/nicelulu)) + +### ClickHouse Release 19.5.3.8, 2019-04-18 {#clickhouse-release-19-5-3-8-2019-04-18} + +#### Bug Fixes {#bug-fixes-6} + +- Fixed type of setting `max_partitions_per_insert_block` from boolean to UInt64. [#5028](https://github.com/ClickHouse/ClickHouse/pull/5028) ([Mohammad Hossein Sekhavat](https://github.com/mhsekhavat)) + +### ClickHouse Release 19.5.2.6, 2019-04-15 {#clickhouse-release-19-5-2-6-2019-04-15} + +#### New Features {#new-features-4} + +- [Hyperscan](https://github.com/intel/hyperscan) multiple regular expression matching was added (functions `multiMatchAny`, `multiMatchAnyIndex`, `multiFuzzyMatchAny`, `multiFuzzyMatchAnyIndex`). [#4780](https://github.com/ClickHouse/ClickHouse/pull/4780), [#4841](https://github.com/ClickHouse/ClickHouse/pull/4841) ([Danila Kutenin](https://github.com/danlark1)) +- `multiSearchFirstPosition` function was added. [#4780](https://github.com/ClickHouse/ClickHouse/pull/4780) ([Danila Kutenin](https://github.com/danlark1)) +- Implement the predefined expression filter per row for tables. [#4792](https://github.com/ClickHouse/ClickHouse/pull/4792) ([Ivan](https://github.com/abyss7)) +- A new type of data skipping indices based on bloom filters (can be used for `equal`, `in` and `like` functions). [#4499](https://github.com/ClickHouse/ClickHouse/pull/4499) ([Nikita Vasilev](https://github.com/nikvas0)) +- Added `ASOF JOIN` which allows to run queries that join to the most recent value known. [#4774](https://github.com/ClickHouse/ClickHouse/pull/4774) [#4867](https://github.com/ClickHouse/ClickHouse/pull/4867) [#4863](https://github.com/ClickHouse/ClickHouse/pull/4863) [#4875](https://github.com/ClickHouse/ClickHouse/pull/4875) ([Martijn Bakker](https://github.com/Gladdy), [Artem Zuikov](https://github.com/4ertus2)) +- Rewrite multiple `COMMA JOIN` to `CROSS JOIN`. Then rewrite them to `INNER JOIN` if possible. [#4661](https://github.com/ClickHouse/ClickHouse/pull/4661) ([Artem Zuikov](https://github.com/4ertus2)) + +#### Improvement {#improvement-9} + +- `topK` and `topKWeighted` now supports custom `loadFactor` (fixes issue [#4252](https://github.com/ClickHouse/ClickHouse/issues/4252)). [#4634](https://github.com/ClickHouse/ClickHouse/pull/4634) ([Kirill Danshin](https://github.com/kirillDanshin)) +- Allow to use `parallel_replicas_count > 1` even for tables without sampling (the setting is simply ignored for them). In previous versions it was lead to exception. [#4637](https://github.com/ClickHouse/ClickHouse/pull/4637) ([Alexey Elymanov](https://github.com/digitalist)) +- Support for `CREATE OR REPLACE VIEW`. Allow to create a view or set a new definition in a single statement. [#4654](https://github.com/ClickHouse/ClickHouse/pull/4654) ([Boris Granveaud](https://github.com/bgranvea)) +- `Buffer` table engine now supports `PREWHERE`. [#4671](https://github.com/ClickHouse/ClickHouse/pull/4671) ([Yangkuan Liu](https://github.com/LiuYangkuan)) +- Add ability to start replicated table without metadata in zookeeper in `readonly` mode. [#4691](https://github.com/ClickHouse/ClickHouse/pull/4691) ([alesapin](https://github.com/alesapin)) +- Fixed flicker of progress bar in clickhouse-client. The issue was most noticeable when using `FORMAT Null` with streaming queries. [#4811](https://github.com/ClickHouse/ClickHouse/pull/4811) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Allow to disable functions with `hyperscan` library on per user basis to limit potentially excessive and uncontrolled resource usage. [#4816](https://github.com/ClickHouse/ClickHouse/pull/4816) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Add version number logging in all errors. [#4824](https://github.com/ClickHouse/ClickHouse/pull/4824) ([proller](https://github.com/proller)) +- Added restriction to the `multiMatch` functions which requires string size to fit into `unsigned int`. Also added the number of arguments limit to the `multiSearch` functions. [#4834](https://github.com/ClickHouse/ClickHouse/pull/4834) ([Danila Kutenin](https://github.com/danlark1)) +- Improved usage of scratch space and error handling in Hyperscan. [#4866](https://github.com/ClickHouse/ClickHouse/pull/4866) ([Danila Kutenin](https://github.com/danlark1)) +- Fill `system.graphite_detentions` from a table config of `*GraphiteMergeTree` engine tables. [#4584](https://github.com/ClickHouse/ClickHouse/pull/4584) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) +- Rename `trigramDistance` function to `ngramDistance` and add more functions with `CaseInsensitive` and `UTF`. [#4602](https://github.com/ClickHouse/ClickHouse/pull/4602) ([Danila Kutenin](https://github.com/danlark1)) +- Improved data skipping indices calculation. [#4640](https://github.com/ClickHouse/ClickHouse/pull/4640) ([Nikita Vasilev](https://github.com/nikvas0)) +- Keep ordinary, `DEFAULT`, `MATERIALIZED` and `ALIAS` columns in a single list (fixes issue [#2867](https://github.com/ClickHouse/ClickHouse/issues/2867)). [#4707](https://github.com/ClickHouse/ClickHouse/pull/4707) ([Alex Zatelepin](https://github.com/ztlpn)) + +#### Bug Fix {#bug-fix-26} + +- Avoid `std::terminate` in case of memory allocation failure. Now `std::bad_alloc` exception is thrown as expected. [#4665](https://github.com/ClickHouse/ClickHouse/pull/4665) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixes capnproto reading from buffer. Sometimes files wasn’t loaded successfully by HTTP. [#4674](https://github.com/ClickHouse/ClickHouse/pull/4674) ([Vladislav](https://github.com/smirnov-vs)) +- Fix error `Unknown log entry type: 0` after `OPTIMIZE TABLE FINAL` query. [#4683](https://github.com/ClickHouse/ClickHouse/pull/4683) ([Amos Bird](https://github.com/amosbird)) +- Wrong arguments to `hasAny` or `hasAll` functions may lead to segfault. [#4698](https://github.com/ClickHouse/ClickHouse/pull/4698) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Deadlock may happen while executing `DROP DATABASE dictionary` query. [#4701](https://github.com/ClickHouse/ClickHouse/pull/4701) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix undefined behavior in `median` and `quantile` functions. [#4702](https://github.com/ClickHouse/ClickHouse/pull/4702) ([hcz](https://github.com/hczhcz)) +- Fix compression level detection when `network_compression_method` in lowercase. Broken in v19.1. [#4706](https://github.com/ClickHouse/ClickHouse/pull/4706) ([proller](https://github.com/proller)) +- Fixed ignorance of `UTC` setting (fixes issue [#4658](https://github.com/ClickHouse/ClickHouse/issues/4658)). [#4718](https://github.com/ClickHouse/ClickHouse/pull/4718) ([proller](https://github.com/proller)) +- Fix `histogram` function behaviour with `Distributed` tables. [#4741](https://github.com/ClickHouse/ClickHouse/pull/4741) ([olegkv](https://github.com/olegkv)) +- Fixed tsan report `destroy of a locked mutex`. [#4742](https://github.com/ClickHouse/ClickHouse/pull/4742) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed TSan report on shutdown due to race condition in system logs usage. Fixed potential use-after-free on shutdown when part_log is enabled. [#4758](https://github.com/ClickHouse/ClickHouse/pull/4758) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix recheck parts in `ReplicatedMergeTreeAlterThread` in case of error. [#4772](https://github.com/ClickHouse/ClickHouse/pull/4772) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Arithmetic operations on intermediate aggregate function states were not working for constant arguments (such as subquery results). [#4776](https://github.com/ClickHouse/ClickHouse/pull/4776) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Always backquote column names in metadata. Otherwise it’s impossible to create a table with column named `index` (server won’t restart due to malformed `ATTACH` query in metadata). [#4782](https://github.com/ClickHouse/ClickHouse/pull/4782) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix crash in `ALTER ... MODIFY ORDER BY` on `Distributed` table. [#4790](https://github.com/ClickHouse/ClickHouse/pull/4790) ([TCeason](https://github.com/TCeason)) +- Fix segfault in `JOIN ON` with enabled `enable_optimize_predicate_expression`. [#4794](https://github.com/ClickHouse/ClickHouse/pull/4794) ([Winter Zhang](https://github.com/zhang2014)) +- Fix bug with adding an extraneous row after consuming a protobuf message from Kafka. [#4808](https://github.com/ClickHouse/ClickHouse/pull/4808) ([Vitaly Baranov](https://github.com/vitlibar)) +- Fix crash of `JOIN` on not-nullable vs nullable column. Fix `NULLs` in right keys in `ANY JOIN` + `join_use_nulls`. [#4815](https://github.com/ClickHouse/ClickHouse/pull/4815) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix segmentation fault in `clickhouse-copier`. [#4835](https://github.com/ClickHouse/ClickHouse/pull/4835) ([proller](https://github.com/proller)) +- Fixed race condition in `SELECT` from `system.tables` if the table is renamed or altered concurrently. [#4836](https://github.com/ClickHouse/ClickHouse/pull/4836) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed data race when fetching data part that is already obsolete. [#4839](https://github.com/ClickHouse/ClickHouse/pull/4839) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed rare data race that can happen during `RENAME` table of MergeTree family. [#4844](https://github.com/ClickHouse/ClickHouse/pull/4844) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed segmentation fault in function `arrayIntersect`. Segmentation fault could happen if function was called with mixed constant and ordinary arguments. [#4847](https://github.com/ClickHouse/ClickHouse/pull/4847) ([Lixiang Qian](https://github.com/fancyqlx)) +- Fixed reading from `Array(LowCardinality)` column in rare case when column contained a long sequence of empty arrays. [#4850](https://github.com/ClickHouse/ClickHouse/pull/4850) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fix crash in `FULL/RIGHT JOIN` when we joining on nullable vs not nullable. [#4855](https://github.com/ClickHouse/ClickHouse/pull/4855) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix `No message received` exception while fetching parts between replicas. [#4856](https://github.com/ClickHouse/ClickHouse/pull/4856) ([alesapin](https://github.com/alesapin)) +- Fixed `arrayIntersect` function wrong result in case of several repeated values in single array. [#4871](https://github.com/ClickHouse/ClickHouse/pull/4871) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fix a race condition during concurrent `ALTER COLUMN` queries that could lead to a server crash (fixes issue [#3421](https://github.com/ClickHouse/ClickHouse/issues/3421)). [#4592](https://github.com/ClickHouse/ClickHouse/pull/4592) ([Alex Zatelepin](https://github.com/ztlpn)) +- Fix incorrect result in `FULL/RIGHT JOIN` with const column. [#4723](https://github.com/ClickHouse/ClickHouse/pull/4723) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix duplicates in `GLOBAL JOIN` with asterisk. [#4705](https://github.com/ClickHouse/ClickHouse/pull/4705) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix parameter deduction in `ALTER MODIFY` of column `CODEC` when column type is not specified. [#4883](https://github.com/ClickHouse/ClickHouse/pull/4883) ([alesapin](https://github.com/alesapin)) +- Functions `cutQueryStringAndFragment()` and `queryStringAndFragment()` now works correctly when `URL` contains a fragment and no query. [#4894](https://github.com/ClickHouse/ClickHouse/pull/4894) ([Vitaly Baranov](https://github.com/vitlibar)) +- Fix rare bug when setting `min_bytes_to_use_direct_io` is greater than zero, which occures when thread have to seek backward in column file. [#4897](https://github.com/ClickHouse/ClickHouse/pull/4897) ([alesapin](https://github.com/alesapin)) +- Fix wrong argument types for aggregate functions with `LowCardinality` arguments (fixes issue [#4919](https://github.com/ClickHouse/ClickHouse/issues/4919)). [#4922](https://github.com/ClickHouse/ClickHouse/pull/4922) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fix wrong name qualification in `GLOBAL JOIN`. [#4969](https://github.com/ClickHouse/ClickHouse/pull/4969) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix function `toISOWeek` result for year 1970. [#4988](https://github.com/ClickHouse/ClickHouse/pull/4988) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix `DROP`, `TRUNCATE` and `OPTIMIZE` queries duplication, when executed on `ON CLUSTER` for `ReplicatedMergeTree*` tables family. [#4991](https://github.com/ClickHouse/ClickHouse/pull/4991) ([alesapin](https://github.com/alesapin)) + +#### Backward Incompatible Change {#backward-incompatible-change-8} + +- Rename setting `insert_sample_with_metadata` to setting `input_format_defaults_for_omitted_fields`. [#4771](https://github.com/ClickHouse/ClickHouse/pull/4771) ([Artem Zuikov](https://github.com/4ertus2)) +- Added setting `max_partitions_per_insert_block` (with value 100 by default). If inserted block contains larger number of partitions, an exception is thrown. Set it to 0 if you want to remove the limit (not recommended). [#4845](https://github.com/ClickHouse/ClickHouse/pull/4845) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Multi-search functions were renamed (`multiPosition` to `multiSearchAllPositions`, `multiSearch` to `multiSearchAny`, `firstMatch` to `multiSearchFirstIndex`). [#4780](https://github.com/ClickHouse/ClickHouse/pull/4780) ([Danila Kutenin](https://github.com/danlark1)) + +#### Performance Improvement {#performance-improvement-6} + +- Optimize Volnitsky searcher by inlining, giving about 5-10% search improvement for queries with many needles or many similar bigrams. [#4862](https://github.com/ClickHouse/ClickHouse/pull/4862) ([Danila Kutenin](https://github.com/danlark1)) +- Fix performance issue when setting `use_uncompressed_cache` is greater than zero, which appeared when all read data contained in cache. [#4913](https://github.com/ClickHouse/ClickHouse/pull/4913) ([alesapin](https://github.com/alesapin)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-10} + +- Hardening debug build: more granular memory mappings and ASLR; add memory protection for mark cache and index. This allows to find more memory stomping bugs in case when ASan and MSan cannot do it. [#4632](https://github.com/ClickHouse/ClickHouse/pull/4632) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Add support for cmake variables `ENABLE_PROTOBUF`, `ENABLE_PARQUET` and `ENABLE_BROTLI` which allows to enable/disable the above features (same as we can do for librdkafka, mysql, etc). [#4669](https://github.com/ClickHouse/ClickHouse/pull/4669) ([Silviu Caragea](https://github.com/silviucpp)) +- Add ability to print process list and stacktraces of all threads if some queries are hung after test run. [#4675](https://github.com/ClickHouse/ClickHouse/pull/4675) ([alesapin](https://github.com/alesapin)) +- Add retries on `Connection loss` error in `clickhouse-test`. [#4682](https://github.com/ClickHouse/ClickHouse/pull/4682) ([alesapin](https://github.com/alesapin)) +- Add freebsd build with vagrant and build with thread sanitizer to packager script. [#4712](https://github.com/ClickHouse/ClickHouse/pull/4712) [#4748](https://github.com/ClickHouse/ClickHouse/pull/4748) ([alesapin](https://github.com/alesapin)) +- Now user asked for password for user `'default'` during installation. [#4725](https://github.com/ClickHouse/ClickHouse/pull/4725) ([proller](https://github.com/proller)) +- Suppress warning in `rdkafka` library. [#4740](https://github.com/ClickHouse/ClickHouse/pull/4740) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Allow ability to build without ssl. [#4750](https://github.com/ClickHouse/ClickHouse/pull/4750) ([proller](https://github.com/proller)) +- Add a way to launch clickhouse-server image from a custom user. [#4753](https://github.com/ClickHouse/ClickHouse/pull/4753) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) +- Upgrade contrib boost to 1.69. [#4793](https://github.com/ClickHouse/ClickHouse/pull/4793) ([proller](https://github.com/proller)) +- Disable usage of `mremap` when compiled with Thread Sanitizer. Surprisingly enough, TSan does not intercept `mremap` (though it does intercept `mmap`, `munmap`) that leads to false positives. Fixed TSan report in stateful tests. [#4859](https://github.com/ClickHouse/ClickHouse/pull/4859) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Add test checking using format schema via HTTP interface. [#4864](https://github.com/ClickHouse/ClickHouse/pull/4864) ([Vitaly Baranov](https://github.com/vitlibar)) + +## ClickHouse Release 19.4 {#clickhouse-release-19-4} + +### ClickHouse Release 19.4.4.33, 2019-04-17 {#clickhouse-release-19-4-4-33-2019-04-17} + +#### Bug Fixes {#bug-fixes-7} + +- Avoid `std::terminate` in case of memory allocation failure. Now `std::bad_alloc` exception is thrown as expected. [#4665](https://github.com/ClickHouse/ClickHouse/pull/4665) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixes capnproto reading from buffer. Sometimes files wasn’t loaded successfully by HTTP. [#4674](https://github.com/ClickHouse/ClickHouse/pull/4674) ([Vladislav](https://github.com/smirnov-vs)) +- Fix error `Unknown log entry type: 0` after `OPTIMIZE TABLE FINAL` query. [#4683](https://github.com/ClickHouse/ClickHouse/pull/4683) ([Amos Bird](https://github.com/amosbird)) +- Wrong arguments to `hasAny` or `hasAll` functions may lead to segfault. [#4698](https://github.com/ClickHouse/ClickHouse/pull/4698) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Deadlock may happen while executing `DROP DATABASE dictionary` query. [#4701](https://github.com/ClickHouse/ClickHouse/pull/4701) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix undefined behavior in `median` and `quantile` functions. [#4702](https://github.com/ClickHouse/ClickHouse/pull/4702) ([hcz](https://github.com/hczhcz)) +- Fix compression level detection when `network_compression_method` in lowercase. Broken in v19.1. [#4706](https://github.com/ClickHouse/ClickHouse/pull/4706) ([proller](https://github.com/proller)) +- Fixed ignorance of `UTC` setting (fixes issue [#4658](https://github.com/ClickHouse/ClickHouse/issues/4658)). [#4718](https://github.com/ClickHouse/ClickHouse/pull/4718) ([proller](https://github.com/proller)) +- Fix `histogram` function behaviour with `Distributed` tables. [#4741](https://github.com/ClickHouse/ClickHouse/pull/4741) ([olegkv](https://github.com/olegkv)) +- Fixed tsan report `destroy of a locked mutex`. [#4742](https://github.com/ClickHouse/ClickHouse/pull/4742) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed TSan report on shutdown due to race condition in system logs usage. Fixed potential use-after-free on shutdown when part_log is enabled. [#4758](https://github.com/ClickHouse/ClickHouse/pull/4758) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix recheck parts in `ReplicatedMergeTreeAlterThread` in case of error. [#4772](https://github.com/ClickHouse/ClickHouse/pull/4772) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Arithmetic operations on intermediate aggregate function states were not working for constant arguments (such as subquery results). [#4776](https://github.com/ClickHouse/ClickHouse/pull/4776) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Always backquote column names in metadata. Otherwise it’s impossible to create a table with column named `index` (server won’t restart due to malformed `ATTACH` query in metadata). [#4782](https://github.com/ClickHouse/ClickHouse/pull/4782) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix crash in `ALTER ... MODIFY ORDER BY` on `Distributed` table. [#4790](https://github.com/ClickHouse/ClickHouse/pull/4790) ([TCeason](https://github.com/TCeason)) +- Fix segfault in `JOIN ON` with enabled `enable_optimize_predicate_expression`. [#4794](https://github.com/ClickHouse/ClickHouse/pull/4794) ([Winter Zhang](https://github.com/zhang2014)) +- Fix bug with adding an extraneous row after consuming a protobuf message from Kafka. [#4808](https://github.com/ClickHouse/ClickHouse/pull/4808) ([Vitaly Baranov](https://github.com/vitlibar)) +- Fix segmentation fault in `clickhouse-copier`. [#4835](https://github.com/ClickHouse/ClickHouse/pull/4835) ([proller](https://github.com/proller)) +- Fixed race condition in `SELECT` from `system.tables` if the table is renamed or altered concurrently. [#4836](https://github.com/ClickHouse/ClickHouse/pull/4836) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed data race when fetching data part that is already obsolete. [#4839](https://github.com/ClickHouse/ClickHouse/pull/4839) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed rare data race that can happen during `RENAME` table of MergeTree family. [#4844](https://github.com/ClickHouse/ClickHouse/pull/4844) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed segmentation fault in function `arrayIntersect`. Segmentation fault could happen if function was called with mixed constant and ordinary arguments. [#4847](https://github.com/ClickHouse/ClickHouse/pull/4847) ([Lixiang Qian](https://github.com/fancyqlx)) +- Fixed reading from `Array(LowCardinality)` column in rare case when column contained a long sequence of empty arrays. [#4850](https://github.com/ClickHouse/ClickHouse/pull/4850) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fix `No message received` exception while fetching parts between replicas. [#4856](https://github.com/ClickHouse/ClickHouse/pull/4856) ([alesapin](https://github.com/alesapin)) +- Fixed `arrayIntersect` function wrong result in case of several repeated values in single array. [#4871](https://github.com/ClickHouse/ClickHouse/pull/4871) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fix a race condition during concurrent `ALTER COLUMN` queries that could lead to a server crash (fixes issue [#3421](https://github.com/ClickHouse/ClickHouse/issues/3421)). [#4592](https://github.com/ClickHouse/ClickHouse/pull/4592) ([Alex Zatelepin](https://github.com/ztlpn)) +- Fix parameter deduction in `ALTER MODIFY` of column `CODEC` when column type is not specified. [#4883](https://github.com/ClickHouse/ClickHouse/pull/4883) ([alesapin](https://github.com/alesapin)) +- Functions `cutQueryStringAndFragment()` and `queryStringAndFragment()` now works correctly when `URL` contains a fragment and no query. [#4894](https://github.com/ClickHouse/ClickHouse/pull/4894) ([Vitaly Baranov](https://github.com/vitlibar)) +- Fix rare bug when setting `min_bytes_to_use_direct_io` is greater than zero, which occures when thread have to seek backward in column file. [#4897](https://github.com/ClickHouse/ClickHouse/pull/4897) ([alesapin](https://github.com/alesapin)) +- Fix wrong argument types for aggregate functions with `LowCardinality` arguments (fixes issue [#4919](https://github.com/ClickHouse/ClickHouse/issues/4919)). [#4922](https://github.com/ClickHouse/ClickHouse/pull/4922) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fix function `toISOWeek` result for year 1970. [#4988](https://github.com/ClickHouse/ClickHouse/pull/4988) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix `DROP`, `TRUNCATE` and `OPTIMIZE` queries duplication, when executed on `ON CLUSTER` for `ReplicatedMergeTree*` tables family. [#4991](https://github.com/ClickHouse/ClickHouse/pull/4991) ([alesapin](https://github.com/alesapin)) + +#### Improvements {#improvements-2} + +- Keep ordinary, `DEFAULT`, `MATERIALIZED` and `ALIAS` columns in a single list (fixes issue [#2867](https://github.com/ClickHouse/ClickHouse/issues/2867)). [#4707](https://github.com/ClickHouse/ClickHouse/pull/4707) ([Alex Zatelepin](https://github.com/ztlpn)) + +### ClickHouse Release 19.4.3.11, 2019-04-02 {#clickhouse-release-19-4-3-11-2019-04-02} + +#### Bug Fixes {#bug-fixes-8} + +- Fix crash in `FULL/RIGHT JOIN` when we joining on nullable vs not nullable. [#4855](https://github.com/ClickHouse/ClickHouse/pull/4855) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix segmentation fault in `clickhouse-copier`. [#4835](https://github.com/ClickHouse/ClickHouse/pull/4835) ([proller](https://github.com/proller)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-11} + +- Add a way to launch clickhouse-server image from a custom user. [#4753](https://github.com/ClickHouse/ClickHouse/pull/4753) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) + +### ClickHouse Release 19.4.2.7, 2019-03-30 {#clickhouse-release-19-4-2-7-2019-03-30} + +#### Bug Fixes {#bug-fixes-9} + +- Fixed reading from `Array(LowCardinality)` column in rare case when column contained a long sequence of empty arrays. [#4850](https://github.com/ClickHouse/ClickHouse/pull/4850) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) + +### ClickHouse Release 19.4.1.3, 2019-03-19 {#clickhouse-release-19-4-1-3-2019-03-19} + +#### Bug Fixes {#bug-fixes-10} + +- Fixed remote queries which contain both `LIMIT BY` and `LIMIT`. Previously, if `LIMIT BY` and `LIMIT` were used for remote query, `LIMIT` could happen before `LIMIT BY`, which led to too filtered result. [#4708](https://github.com/ClickHouse/ClickHouse/pull/4708) ([Constantin S. Pan](https://github.com/kvap)) + +### ClickHouse Release 19.4.0.49, 2019-03-09 {#clickhouse-release-19-4-0-49-2019-03-09} + +#### New Features {#new-features-5} + +- Added full support for `Protobuf` format (input and output, nested data structures). [#4174](https://github.com/ClickHouse/ClickHouse/pull/4174) [#4493](https://github.com/ClickHouse/ClickHouse/pull/4493) ([Vitaly Baranov](https://github.com/vitlibar)) +- Added bitmap functions with Roaring Bitmaps. [#4207](https://github.com/ClickHouse/ClickHouse/pull/4207) ([Andy Yang](https://github.com/andyyzh)) [#4568](https://github.com/ClickHouse/ClickHouse/pull/4568) ([Vitaly Baranov](https://github.com/vitlibar)) +- Parquet format support. [#4448](https://github.com/ClickHouse/ClickHouse/pull/4448) ([proller](https://github.com/proller)) +- N-gram distance was added for fuzzy string comparison. It is similar to q-gram metrics in R language. [#4466](https://github.com/ClickHouse/ClickHouse/pull/4466) ([Danila Kutenin](https://github.com/danlark1)) +- Combine rules for graphite rollup from dedicated aggregation and retention patterns. [#4426](https://github.com/ClickHouse/ClickHouse/pull/4426) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) +- Added `max_execution_speed` and `max_execution_speed_bytes` to limit resource usage. Added `min_execution_speed_bytes` setting to complement the `min_execution_speed`. [#4430](https://github.com/ClickHouse/ClickHouse/pull/4430) ([Winter Zhang](https://github.com/zhang2014)) +- Implemented function `flatten`. [#4555](https://github.com/ClickHouse/ClickHouse/pull/4555) [#4409](https://github.com/ClickHouse/ClickHouse/pull/4409) ([alexey-milovidov](https://github.com/alexey-milovidov), [kzon](https://github.com/kzon)) +- Added functions `arrayEnumerateDenseRanked` and `arrayEnumerateUniqRanked` (it’s like `arrayEnumerateUniq` but allows to fine tune array depth to look inside multidimensional arrays). [#4475](https://github.com/ClickHouse/ClickHouse/pull/4475) ([proller](https://github.com/proller)) [#4601](https://github.com/ClickHouse/ClickHouse/pull/4601) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Multiple JOINS with some restrictions: no asterisks, no complex aliases in ON/WHERE/GROUP BY/… [#4462](https://github.com/ClickHouse/ClickHouse/pull/4462) ([Artem Zuikov](https://github.com/4ertus2)) + +#### Bug Fixes {#bug-fixes-11} + +- This release also contains all bug fixes from 19.3 and 19.1. +- Fixed bug in data skipping indices: order of granules after INSERT was incorrect. [#4407](https://github.com/ClickHouse/ClickHouse/pull/4407) ([Nikita Vasilev](https://github.com/nikvas0)) +- Fixed `set` index for `Nullable` and `LowCardinality` columns. Before it, `set` index with `Nullable` or `LowCardinality` column led to error `Data type must be deserialized with multiple streams` while selecting. [#4594](https://github.com/ClickHouse/ClickHouse/pull/4594) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Correctly set update_time on full `executable` dictionary update. [#4551](https://github.com/ClickHouse/ClickHouse/pull/4551) ([Tema Novikov](https://github.com/temoon)) +- Fix broken progress bar in 19.3. [#4627](https://github.com/ClickHouse/ClickHouse/pull/4627) ([filimonov](https://github.com/filimonov)) +- Fixed inconsistent values of MemoryTracker when memory region was shrinked, in certain cases. [#4619](https://github.com/ClickHouse/ClickHouse/pull/4619) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed undefined behaviour in ThreadPool. [#4612](https://github.com/ClickHouse/ClickHouse/pull/4612) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed a very rare crash with the message `mutex lock failed: Invalid argument` that could happen when a MergeTree table was dropped concurrently with a SELECT. [#4608](https://github.com/ClickHouse/ClickHouse/pull/4608) ([Alex Zatelepin](https://github.com/ztlpn)) +- ODBC driver compatibility with `LowCardinality` data type. [#4381](https://github.com/ClickHouse/ClickHouse/pull/4381) ([proller](https://github.com/proller)) +- FreeBSD: Fixup for `AIOcontextPool: Found io_event with unknown id 0` error. [#4438](https://github.com/ClickHouse/ClickHouse/pull/4438) ([urgordeadbeef](https://github.com/urgordeadbeef)) +- `system.part_log` table was created regardless to configuration. [#4483](https://github.com/ClickHouse/ClickHouse/pull/4483) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix undefined behaviour in `dictIsIn` function for cache dictionaries. [#4515](https://github.com/ClickHouse/ClickHouse/pull/4515) ([alesapin](https://github.com/alesapin)) +- Fixed a deadlock when a SELECT query locks the same table multiple times (e.g. from different threads or when executing multiple subqueries) and there is a concurrent DDL query. [#4535](https://github.com/ClickHouse/ClickHouse/pull/4535) ([Alex Zatelepin](https://github.com/ztlpn)) +- Disable compile_expressions by default until we get own `llvm` contrib and can test it with `clang` and `asan`. [#4579](https://github.com/ClickHouse/ClickHouse/pull/4579) ([alesapin](https://github.com/alesapin)) +- Prevent `std::terminate` when `invalidate_query` for `clickhouse` external dictionary source has returned wrong resultset (empty or more than one row or more than one column). Fixed issue when the `invalidate_query` was performed every five seconds regardless to the `lifetime`. [#4583](https://github.com/ClickHouse/ClickHouse/pull/4583) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Avoid deadlock when the `invalidate_query` for a dictionary with `clickhouse` source was involving `system.dictionaries` table or `Dictionaries` database (rare case). [#4599](https://github.com/ClickHouse/ClickHouse/pull/4599) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixes for CROSS JOIN with empty WHERE. [#4598](https://github.com/ClickHouse/ClickHouse/pull/4598) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed segfault in function “replicate†when constant argument is passed. [#4603](https://github.com/ClickHouse/ClickHouse/pull/4603) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix lambda function with predicate optimizer. [#4408](https://github.com/ClickHouse/ClickHouse/pull/4408) ([Winter Zhang](https://github.com/zhang2014)) +- Multiple JOINs multiple fixes. [#4595](https://github.com/ClickHouse/ClickHouse/pull/4595) ([Artem Zuikov](https://github.com/4ertus2)) + +#### Improvements {#improvements-3} + +- Support aliases in JOIN ON section for right table columns. [#4412](https://github.com/ClickHouse/ClickHouse/pull/4412) ([Artem Zuikov](https://github.com/4ertus2)) +- Result of multiple JOINs need correct result names to be used in subselects. Replace flat aliases with source names in result. [#4474](https://github.com/ClickHouse/ClickHouse/pull/4474) ([Artem Zuikov](https://github.com/4ertus2)) +- Improve push-down logic for joined statements. [#4387](https://github.com/ClickHouse/ClickHouse/pull/4387) ([Ivan](https://github.com/abyss7)) + +#### Performance Improvements {#performance-improvements-3} + +- Improved heuristics of “move to PREWHERE†optimization. [#4405](https://github.com/ClickHouse/ClickHouse/pull/4405) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Use proper lookup tables that uses HashTable’s API for 8-bit and 16-bit keys. [#4536](https://github.com/ClickHouse/ClickHouse/pull/4536) ([Amos Bird](https://github.com/amosbird)) +- Improved performance of string comparison. [#4564](https://github.com/ClickHouse/ClickHouse/pull/4564) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Cleanup distributed DDL queue in a separate thread so that it does not slow down the main loop that processes distributed DDL tasks. [#4502](https://github.com/ClickHouse/ClickHouse/pull/4502) ([Alex Zatelepin](https://github.com/ztlpn)) +- When `min_bytes_to_use_direct_io` is set to 1, not every file was opened with O_DIRECT mode because the data size to read was sometimes underestimated by the size of one compressed block. [#4526](https://github.com/ClickHouse/ClickHouse/pull/4526) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-12} + +- Added support for clang-9 [#4604](https://github.com/ClickHouse/ClickHouse/pull/4604) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix wrong `__asm__` instructions (again) [#4621](https://github.com/ClickHouse/ClickHouse/pull/4621) ([Konstantin Podshumok](https://github.com/podshumok)) +- Add ability to specify settings for `clickhouse-performance-test` from command line. [#4437](https://github.com/ClickHouse/ClickHouse/pull/4437) ([alesapin](https://github.com/alesapin)) +- Add dictionaries tests to integration tests. [#4477](https://github.com/ClickHouse/ClickHouse/pull/4477) ([alesapin](https://github.com/alesapin)) +- Added queries from the benchmark on the website to automated performance tests. [#4496](https://github.com/ClickHouse/ClickHouse/pull/4496) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- `xxhash.h` does not exist in external lz4 because it is an implementation detail and its symbols are namespaced with `XXH_NAMESPACE` macro. When lz4 is external, xxHash has to be external too, and the dependents have to link to it. [#4495](https://github.com/ClickHouse/ClickHouse/pull/4495) ([Orivej Desh](https://github.com/orivej)) +- Fixed a case when `quantileTiming` aggregate function can be called with negative or floating point argument (this fixes fuzz test with undefined behaviour sanitizer). [#4506](https://github.com/ClickHouse/ClickHouse/pull/4506) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Spelling error correction. [#4531](https://github.com/ClickHouse/ClickHouse/pull/4531) ([sdk2](https://github.com/sdk2)) +- Fix compilation on Mac. [#4371](https://github.com/ClickHouse/ClickHouse/pull/4371) ([Vitaly Baranov](https://github.com/vitlibar)) +- Build fixes for FreeBSD and various unusual build configurations. [#4444](https://github.com/ClickHouse/ClickHouse/pull/4444) ([proller](https://github.com/proller)) + +## ClickHouse Release 19.3 {#clickhouse-release-19-3} + +### ClickHouse Release 19.3.9.1, 2019-04-02 {#clickhouse-release-19-3-9-1-2019-04-02} + +#### Bug Fixes {#bug-fixes-12} + +- Fix crash in `FULL/RIGHT JOIN` when we joining on nullable vs not nullable. [#4855](https://github.com/ClickHouse/ClickHouse/pull/4855) ([Artem Zuikov](https://github.com/4ertus2)) +- Fix segmentation fault in `clickhouse-copier`. [#4835](https://github.com/ClickHouse/ClickHouse/pull/4835) ([proller](https://github.com/proller)) +- Fixed reading from `Array(LowCardinality)` column in rare case when column contained a long sequence of empty arrays. [#4850](https://github.com/ClickHouse/ClickHouse/pull/4850) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) + +#### Build/Testing/Packaging Improvement {#buildtestingpackaging-improvement-13} + +- Add a way to launch clickhouse-server image from a custom user [#4753](https://github.com/ClickHouse/ClickHouse/pull/4753) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) + +### ClickHouse Release 19.3.7, 2019-03-12 {#clickhouse-release-19-3-7-2019-03-12} + +#### Bug Fixes {#bug-fixes-13} + +- Fixed error in #3920. This error manifests itself as random cache corruption (messages `Unknown codec family code`, `Cannot seek through file`) and segfaults. This bug first appeared in version 19.1 and is present in versions up to 19.1.10 and 19.3.6. [#4623](https://github.com/ClickHouse/ClickHouse/pull/4623) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.3.6, 2019-03-02 {#clickhouse-release-19-3-6-2019-03-02} + +#### Bug Fixes {#bug-fixes-14} + +- When there are more than 1000 threads in a thread pool, `std::terminate` may happen on thread exit. [Azat Khuzhin](https://github.com/azat) [#4485](https://github.com/ClickHouse/ClickHouse/pull/4485) [#4505](https://github.com/ClickHouse/ClickHouse/pull/4505) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Now it’s possible to create `ReplicatedMergeTree*` tables with comments on columns without defaults and tables with columns codecs without comments and defaults. Also fix comparison of codecs. [#4523](https://github.com/ClickHouse/ClickHouse/pull/4523) ([alesapin](https://github.com/alesapin)) +- Fixed crash on JOIN with array or tuple. [#4552](https://github.com/ClickHouse/ClickHouse/pull/4552) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed crash in clickhouse-copier with the message `ThreadStatus not created`. [#4540](https://github.com/ClickHouse/ClickHouse/pull/4540) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed hangup on server shutdown if distributed DDLs were used. [#4472](https://github.com/ClickHouse/ClickHouse/pull/4472) ([Alex Zatelepin](https://github.com/ztlpn)) +- Incorrect column numbers were printed in error message about text format parsing for columns with number greater than 10. [#4484](https://github.com/ClickHouse/ClickHouse/pull/4484) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Build/Testing/Packaging Improvements {#buildtestingpackaging-improvements-3} + +- Fixed build with AVX enabled. [#4527](https://github.com/ClickHouse/ClickHouse/pull/4527) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Enable extended accounting and IO accounting based on good known version instead of kernel under which it is compiled. [#4541](https://github.com/ClickHouse/ClickHouse/pull/4541) ([nvartolomei](https://github.com/nvartolomei)) +- Allow to skip setting of core_dump.size_limit, warning instead of throw if limit set fail. [#4473](https://github.com/ClickHouse/ClickHouse/pull/4473) ([proller](https://github.com/proller)) +- Removed the `inline` tags of `void readBinary(...)` in `Field.cpp`. Also merged redundant `namespace DB` blocks. [#4530](https://github.com/ClickHouse/ClickHouse/pull/4530) ([hcz](https://github.com/hczhcz)) + +### ClickHouse Release 19.3.5, 2019-02-21 {#clickhouse-release-19-3-5-2019-02-21} + +#### Bug Fixes {#bug-fixes-15} + +- Fixed bug with large http insert queries processing. [#4454](https://github.com/ClickHouse/ClickHouse/pull/4454) ([alesapin](https://github.com/alesapin)) +- Fixed backward incompatibility with old versions due to wrong implementation of `send_logs_level` setting. [#4445](https://github.com/ClickHouse/ClickHouse/pull/4445) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed backward incompatibility of table function `remote` introduced with column comments. [#4446](https://github.com/ClickHouse/ClickHouse/pull/4446) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.3.4, 2019-02-16 {#clickhouse-release-19-3-4-2019-02-16} + +#### Improvements {#improvements-4} + +- Table index size is not accounted for memory limits when doing `ATTACH TABLE` query. Avoided the possibility that a table cannot be attached after being detached. [#4396](https://github.com/ClickHouse/ClickHouse/pull/4396) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Slightly raised up the limit on max string and array size received from ZooKeeper. It allows to continue to work with increased size of `CLIENT_JVMFLAGS=-Djute.maxbuffer=...` on ZooKeeper. [#4398](https://github.com/ClickHouse/ClickHouse/pull/4398) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Allow to repair abandoned replica even if it already has huge number of nodes in its queue. [#4399](https://github.com/ClickHouse/ClickHouse/pull/4399) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Add one required argument to `SET` index (max stored rows number). [#4386](https://github.com/ClickHouse/ClickHouse/pull/4386) ([Nikita Vasilev](https://github.com/nikvas0)) + +#### Bug Fixes {#bug-fixes-16} + +- Fixed `WITH ROLLUP` result for group by single `LowCardinality` key. [#4384](https://github.com/ClickHouse/ClickHouse/pull/4384) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Fixed bug in the set index (dropping a granule if it contains more than `max_rows` rows). [#4386](https://github.com/ClickHouse/ClickHouse/pull/4386) ([Nikita Vasilev](https://github.com/nikvas0)) +- A lot of FreeBSD build fixes. [#4397](https://github.com/ClickHouse/ClickHouse/pull/4397) ([proller](https://github.com/proller)) +- Fixed aliases substitution in queries with subquery containing same alias (issue [#4110](https://github.com/ClickHouse/ClickHouse/issues/4110)). [#4351](https://github.com/ClickHouse/ClickHouse/pull/4351) ([Artem Zuikov](https://github.com/4ertus2)) + +#### Build/Testing/Packaging Improvements {#buildtestingpackaging-improvements-4} + +- Add ability to run `clickhouse-server` for stateless tests in docker image. [#4347](https://github.com/ClickHouse/ClickHouse/pull/4347) ([Vasily Nemkov](https://github.com/Enmk)) + +### ClickHouse Release 19.3.3, 2019-02-13 {#clickhouse-release-19-3-3-2019-02-13} + +#### New Features {#new-features-6} + +- Added the `KILL MUTATION` statement that allows removing mutations that are for some reasons stuck. Added `latest_failed_part`, `latest_fail_time`, `latest_fail_reason` fields to the `system.mutations` table for easier troubleshooting. [#4287](https://github.com/ClickHouse/ClickHouse/pull/4287) ([Alex Zatelepin](https://github.com/ztlpn)) +- Added aggregate function `entropy` which computes Shannon entropy. [#4238](https://github.com/ClickHouse/ClickHouse/pull/4238) ([Quid37](https://github.com/Quid37)) +- Added ability to send queries `INSERT INTO tbl VALUES (....` to server without splitting on `query` and `data` parts. [#4301](https://github.com/ClickHouse/ClickHouse/pull/4301) ([alesapin](https://github.com/alesapin)) +- Generic implementation of `arrayWithConstant` function was added. [#4322](https://github.com/ClickHouse/ClickHouse/pull/4322) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Implemented `NOT BETWEEN` comparison operator. [#4228](https://github.com/ClickHouse/ClickHouse/pull/4228) ([Dmitry Naumov](https://github.com/nezed)) +- Implement `sumMapFiltered` in order to be able to limit the number of keys for which values will be summed by `sumMap`. [#4129](https://github.com/ClickHouse/ClickHouse/pull/4129) ([Léo Ercolanelli](https://github.com/ercolanelli-leo)) +- Added support of `Nullable` types in `mysql` table function. [#4198](https://github.com/ClickHouse/ClickHouse/pull/4198) ([Emmanuel Donin de Rosière](https://github.com/edonin)) +- Support for arbitrary constant expressions in `LIMIT` clause. [#4246](https://github.com/ClickHouse/ClickHouse/pull/4246) ([k3box](https://github.com/k3box)) +- Added `topKWeighted` aggregate function that takes additional argument with (unsigned integer) weight. [#4245](https://github.com/ClickHouse/ClickHouse/pull/4245) ([Andrew Golman](https://github.com/andrewgolman)) +- `StorageJoin` now supports `join_any_take_last_row` setting that allows overwriting existing values of the same key. [#3973](https://github.com/ClickHouse/ClickHouse/pull/3973) ([Amos Bird](https://github.com/amosbird) +- Added function `toStartOfInterval`. [#4304](https://github.com/ClickHouse/ClickHouse/pull/4304) ([Vitaly Baranov](https://github.com/vitlibar)) +- Added `RowBinaryWithNamesAndTypes` format. [#4200](https://github.com/ClickHouse/ClickHouse/pull/4200) ([Oleg V. Kozlyuk](https://github.com/DarkWanderer)) +- Added `IPv4` and `IPv6` data types. More effective implementations of `IPv*` functions. [#3669](https://github.com/ClickHouse/ClickHouse/pull/3669) ([Vasily Nemkov](https://github.com/Enmk)) +- Added function `toStartOfTenMinutes()`. [#4298](https://github.com/ClickHouse/ClickHouse/pull/4298) ([Vitaly Baranov](https://github.com/vitlibar)) +- Added `Protobuf` output format. [#4005](https://github.com/ClickHouse/ClickHouse/pull/4005) [#4158](https://github.com/ClickHouse/ClickHouse/pull/4158) ([Vitaly Baranov](https://github.com/vitlibar)) +- Added brotli support for HTTP interface for data import (INSERTs). [#4235](https://github.com/ClickHouse/ClickHouse/pull/4235) ([Mikhail](https://github.com/fandyushin)) +- Added hints while user make typo in function name or type in command line client. [#4239](https://github.com/ClickHouse/ClickHouse/pull/4239) ([Danila Kutenin](https://github.com/danlark1)) +- Added `Query-Id` to Server’s HTTP Response header. [#4231](https://github.com/ClickHouse/ClickHouse/pull/4231) ([Mikhail](https://github.com/fandyushin)) + +#### Experimental Features {#experimental-features-2} + +- Added `minmax` and `set` data skipping indices for MergeTree table engines family. [#4143](https://github.com/ClickHouse/ClickHouse/pull/4143) ([Nikita Vasilev](https://github.com/nikvas0)) +- Added conversion of `CROSS JOIN` to `INNER JOIN` if possible. [#4221](https://github.com/ClickHouse/ClickHouse/pull/4221) [#4266](https://github.com/ClickHouse/ClickHouse/pull/4266) ([Artem Zuikov](https://github.com/4ertus2)) + +#### Bug Fixes {#bug-fixes-17} + +- Fixed `Not found column` for duplicate columns in `JOIN ON` section. [#4279](https://github.com/ClickHouse/ClickHouse/pull/4279) ([Artem Zuikov](https://github.com/4ertus2)) +- Make `START REPLICATED SENDS` command start replicated sends. [#4229](https://github.com/ClickHouse/ClickHouse/pull/4229) ([nvartolomei](https://github.com/nvartolomei)) +- Fixed aggregate functions execution with `Array(LowCardinality)` arguments. [#4055](https://github.com/ClickHouse/ClickHouse/pull/4055) ([KochetovNicolai](https://github.com/KochetovNicolai)) +- Fixed wrong behaviour when doing `INSERT ... SELECT ... FROM file(...)` query and file has `CSVWithNames` or `TSVWIthNames` format and the first data row is missing. [#4297](https://github.com/ClickHouse/ClickHouse/pull/4297) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed crash on dictionary reload if dictionary not available. This bug was appeared in 19.1.6. [#4188](https://github.com/ClickHouse/ClickHouse/pull/4188) ([proller](https://github.com/proller)) +- Fixed `ALL JOIN` with duplicates in right table. [#4184](https://github.com/ClickHouse/ClickHouse/pull/4184) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed segmentation fault with `use_uncompressed_cache=1` and exception with wrong uncompressed size. This bug was appeared in 19.1.6. [#4186](https://github.com/ClickHouse/ClickHouse/pull/4186) ([alesapin](https://github.com/alesapin)) +- Fixed `compile_expressions` bug with comparison of big (more than int16) dates. [#4341](https://github.com/ClickHouse/ClickHouse/pull/4341) ([alesapin](https://github.com/alesapin)) +- Fixed infinite loop when selecting from table function `numbers(0)`. [#4280](https://github.com/ClickHouse/ClickHouse/pull/4280) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Temporarily disable predicate optimization for `ORDER BY`. [#3890](https://github.com/ClickHouse/ClickHouse/pull/3890) ([Winter Zhang](https://github.com/zhang2014)) +- Fixed `Illegal instruction` error when using base64 functions on old CPUs. This error has been reproduced only when ClickHouse was compiled with gcc-8. [#4275](https://github.com/ClickHouse/ClickHouse/pull/4275) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed `No message received` error when interacting with PostgreSQL ODBC Driver through TLS connection. Also fixes segfault when using MySQL ODBC Driver. [#4170](https://github.com/ClickHouse/ClickHouse/pull/4170) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed incorrect result when `Date` and `DateTime` arguments are used in branches of conditional operator (function `if`). Added generic case for function `if`. [#4243](https://github.com/ClickHouse/ClickHouse/pull/4243) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- ClickHouse dictionaries now load within `clickhouse` process. [#4166](https://github.com/ClickHouse/ClickHouse/pull/4166) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed deadlock when `SELECT` from a table with `File` engine was retried after `No such file or directory` error. [#4161](https://github.com/ClickHouse/ClickHouse/pull/4161) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed race condition when selecting from `system.tables` may give `table does not exist` error. [#4313](https://github.com/ClickHouse/ClickHouse/pull/4313) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- `clickhouse-client` can segfault on exit while loading data for command line suggestions if it was run in interactive mode. [#4317](https://github.com/ClickHouse/ClickHouse/pull/4317) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed a bug when the execution of mutations containing `IN` operators was producing incorrect results. [#4099](https://github.com/ClickHouse/ClickHouse/pull/4099) ([Alex Zatelepin](https://github.com/ztlpn)) +- Fixed error: if there is a database with `Dictionary` engine, all dictionaries forced to load at server startup, and if there is a dictionary with ClickHouse source from localhost, the dictionary cannot load. [#4255](https://github.com/ClickHouse/ClickHouse/pull/4255) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed error when system logs are tried to create again at server shutdown. [#4254](https://github.com/ClickHouse/ClickHouse/pull/4254) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Correctly return the right type and properly handle locks in `joinGet` function. [#4153](https://github.com/ClickHouse/ClickHouse/pull/4153) ([Amos Bird](https://github.com/amosbird)) +- Added `sumMapWithOverflow` function. [#4151](https://github.com/ClickHouse/ClickHouse/pull/4151) ([Léo Ercolanelli](https://github.com/ercolanelli-leo)) +- Fixed segfault with `allow_experimental_multiple_joins_emulation`. [52de2c](https://github.com/ClickHouse/ClickHouse/commit/52de2cd927f7b5257dd67e175f0a5560a48840d0) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed bug with incorrect `Date` and `DateTime` comparison. [#4237](https://github.com/ClickHouse/ClickHouse/pull/4237) ([valexey](https://github.com/valexey)) +- Fixed fuzz test under undefined behavior sanitizer: added parameter type check for `quantile*Weighted` family of functions. [#4145](https://github.com/ClickHouse/ClickHouse/pull/4145) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed rare race condition when removing of old data parts can fail with `File not found` error. [#4378](https://github.com/ClickHouse/ClickHouse/pull/4378) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix install package with missing /etc/clickhouse-server/config.xml. [#4343](https://github.com/ClickHouse/ClickHouse/pull/4343) ([proller](https://github.com/proller)) + +#### Build/Testing/Packaging Improvements {#buildtestingpackaging-improvements-5} + +- Debian package: correct /etc/clickhouse-server/preprocessed link according to config. [#4205](https://github.com/ClickHouse/ClickHouse/pull/4205) ([proller](https://github.com/proller)) +- Various build fixes for FreeBSD. [#4225](https://github.com/ClickHouse/ClickHouse/pull/4225) ([proller](https://github.com/proller)) +- Added ability to create, fill and drop tables in perftest. [#4220](https://github.com/ClickHouse/ClickHouse/pull/4220) ([alesapin](https://github.com/alesapin)) +- Added a script to check for duplicate includes. [#4326](https://github.com/ClickHouse/ClickHouse/pull/4326) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added ability to run queries by index in performance test. [#4264](https://github.com/ClickHouse/ClickHouse/pull/4264) ([alesapin](https://github.com/alesapin)) +- Package with debug symbols is suggested to be installed. [#4274](https://github.com/ClickHouse/ClickHouse/pull/4274) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Refactoring of performance-test. Better logging and signals handling. [#4171](https://github.com/ClickHouse/ClickHouse/pull/4171) ([alesapin](https://github.com/alesapin)) +- Added docs to anonymized Yandex.Metrika datasets. [#4164](https://github.com/ClickHouse/ClickHouse/pull/4164) ([alesapin](https://github.com/alesapin)) +- Ðdded tool for converting an old month-partitioned part to the custom-partitioned format. [#4195](https://github.com/ClickHouse/ClickHouse/pull/4195) ([Alex Zatelepin](https://github.com/ztlpn)) +- Added docs about two datasets in s3. [#4144](https://github.com/ClickHouse/ClickHouse/pull/4144) ([alesapin](https://github.com/alesapin)) +- Added script which creates changelog from pull requests description. [#4169](https://github.com/ClickHouse/ClickHouse/pull/4169) [#4173](https://github.com/ClickHouse/ClickHouse/pull/4173) ([KochetovNicolai](https://github.com/KochetovNicolai)) ([KochetovNicolai](https://github.com/KochetovNicolai)) +- Added puppet module for ClickHouse. [#4182](https://github.com/ClickHouse/ClickHouse/pull/4182) ([Maxim Fedotov](https://github.com/MaxFedotov)) +- Added docs for a group of undocumented functions. [#4168](https://github.com/ClickHouse/ClickHouse/pull/4168) ([Winter Zhang](https://github.com/zhang2014)) +- ARM build fixes. [#4210](https://github.com/ClickHouse/ClickHouse/pull/4210)[#4306](https://github.com/ClickHouse/ClickHouse/pull/4306) [#4291](https://github.com/ClickHouse/ClickHouse/pull/4291) ([proller](https://github.com/proller)) ([proller](https://github.com/proller)) +- Dictionary tests now able to run from `ctest`. [#4189](https://github.com/ClickHouse/ClickHouse/pull/4189) ([proller](https://github.com/proller)) +- Now `/etc/ssl` is used as default directory with SSL certificates. [#4167](https://github.com/ClickHouse/ClickHouse/pull/4167) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added checking SSE and AVX instruction at start. [#4234](https://github.com/ClickHouse/ClickHouse/pull/4234) ([Igr](https://github.com/igron99)) +- Init script will wait server until start. [#4281](https://github.com/ClickHouse/ClickHouse/pull/4281) ([proller](https://github.com/proller)) + +#### Backward Incompatible Changes {#backward-incompatible-changes-1} + +- Removed `allow_experimental_low_cardinality_type` setting. `LowCardinality` data types are production ready. [#4323](https://github.com/ClickHouse/ClickHouse/pull/4323) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Reduce mark cache size and uncompressed cache size accordingly to available memory amount. [#4240](https://github.com/ClickHouse/ClickHouse/pull/4240) ([Lopatin Konstantin](https://github.com/k-lopatin) +- Added keyword `INDEX` in `CREATE TABLE` query. A column with name `index` must be quoted with backticks or double quotes: `` `index` ``. [#4143](https://github.com/ClickHouse/ClickHouse/pull/4143) ([Nikita Vasilev](https://github.com/nikvas0)) +- `sumMap` now promote result type instead of overflow. The old `sumMap` behavior can be obtained by using `sumMapWithOverflow` function. [#4151](https://github.com/ClickHouse/ClickHouse/pull/4151) ([Léo Ercolanelli](https://github.com/ercolanelli-leo)) + +#### Performance Improvements {#performance-improvements-4} + +- `std::sort` replaced by `pdqsort` for queries without `LIMIT`. [#4236](https://github.com/ClickHouse/ClickHouse/pull/4236) ([Evgenii Pravda](https://github.com/kvinty)) +- Now server reuse threads from global thread pool. This affects performance in some corner cases. [#4150](https://github.com/ClickHouse/ClickHouse/pull/4150) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Improvements {#improvements-5} + +- Implemented AIO support for FreeBSD. [#4305](https://github.com/ClickHouse/ClickHouse/pull/4305) ([urgordeadbeef](https://github.com/urgordeadbeef)) +- `SELECT * FROM a JOIN b USING a, b` now return `a` and `b` columns only from the left table. [#4141](https://github.com/ClickHouse/ClickHouse/pull/4141) ([Artem Zuikov](https://github.com/4ertus2)) +- Allow `-C` option of client to work as `-c` option. [#4232](https://github.com/ClickHouse/ClickHouse/pull/4232) ([syominsergey](https://github.com/syominsergey)) +- Now option `--password` used without value requires password from stdin. [#4230](https://github.com/ClickHouse/ClickHouse/pull/4230) ([BSD_Conqueror](https://github.com/bsd-conqueror)) +- Added highlighting of unescaped metacharacters in string literals that contain `LIKE` expressions or regexps. [#4327](https://github.com/ClickHouse/ClickHouse/pull/4327) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added cancelling of HTTP read only queries if client socket goes away. [#4213](https://github.com/ClickHouse/ClickHouse/pull/4213) ([nvartolomei](https://github.com/nvartolomei)) +- Now server reports progress to keep client connections alive. [#4215](https://github.com/ClickHouse/ClickHouse/pull/4215) ([Ivan](https://github.com/abyss7)) +- Slightly better message with reason for OPTIMIZE query with `optimize_throw_if_noop` setting enabled. [#4294](https://github.com/ClickHouse/ClickHouse/pull/4294) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added support of `--version` option for clickhouse server. [#4251](https://github.com/ClickHouse/ClickHouse/pull/4251) ([Lopatin Konstantin](https://github.com/k-lopatin)) +- Added `--help/-h` option to `clickhouse-server`. [#4233](https://github.com/ClickHouse/ClickHouse/pull/4233) ([Yuriy Baranov](https://github.com/yurriy)) +- Added support for scalar subqueries with aggregate function state result. [#4348](https://github.com/ClickHouse/ClickHouse/pull/4348) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +- Improved server shutdown time and ALTERs waiting time. [#4372](https://github.com/ClickHouse/ClickHouse/pull/4372) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added info about the replicated_can_become_leader setting to system.replicas and add logging if the replica won’t try to become leader. [#4379](https://github.com/ClickHouse/ClickHouse/pull/4379) ([Alex Zatelepin](https://github.com/ztlpn)) + +## ClickHouse Release 19.1 {#clickhouse-release-19-1} + +### ClickHouse Release 19.1.14, 2019-03-14 {#clickhouse-release-19-1-14-2019-03-14} + +- Fixed error `Column ... queried more than once` that may happen if the setting `asterisk_left_columns_only` is set to 1 in case of using `GLOBAL JOIN` with `SELECT *` (rare case). The issue does not exist in 19.3 and newer. [6bac7d8d](https://github.com/ClickHouse/ClickHouse/pull/4692/commits/6bac7d8d11a9b0d6de0b32b53c47eb2f6f8e7062) ([Artem Zuikov](https://github.com/4ertus2)) + +### ClickHouse Release 19.1.13, 2019-03-12 {#clickhouse-release-19-1-13-2019-03-12} + +This release contains exactly the same set of patches as 19.3.7. + +### ClickHouse Release 19.1.10, 2019-03-03 {#clickhouse-release-19-1-10-2019-03-03} + +This release contains exactly the same set of patches as 19.3.6. + +## ClickHouse Release 19.1 {#clickhouse-release-19-1-1} + +### ClickHouse Release 19.1.9, 2019-02-21 {#clickhouse-release-19-1-9-2019-02-21} + +#### Bug Fixes {#bug-fixes-18} + +- Fixed backward incompatibility with old versions due to wrong implementation of `send_logs_level` setting. [#4445](https://github.com/ClickHouse/ClickHouse/pull/4445) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed backward incompatibility of table function `remote` introduced with column comments. [#4446](https://github.com/ClickHouse/ClickHouse/pull/4446) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.1.8, 2019-02-16 {#clickhouse-release-19-1-8-2019-02-16} + +#### Bug Fixes {#bug-fixes-19} + +- Fix install package with missing /etc/clickhouse-server/config.xml. [#4343](https://github.com/ClickHouse/ClickHouse/pull/4343) ([proller](https://github.com/proller)) + +## ClickHouse Release 19.1 {#clickhouse-release-19-1-2} + +### ClickHouse Release 19.1.7, 2019-02-15 {#clickhouse-release-19-1-7-2019-02-15} + +#### Bug Fixes {#bug-fixes-20} + +- Correctly return the right type and properly handle locks in `joinGet` function. [#4153](https://github.com/ClickHouse/ClickHouse/pull/4153) ([Amos Bird](https://github.com/amosbird)) +- Fixed error when system logs are tried to create again at server shutdown. [#4254](https://github.com/ClickHouse/ClickHouse/pull/4254) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed error: if there is a database with `Dictionary` engine, all dictionaries forced to load at server startup, and if there is a dictionary with ClickHouse source from localhost, the dictionary cannot load. [#4255](https://github.com/ClickHouse/ClickHouse/pull/4255) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed a bug when the execution of mutations containing `IN` operators was producing incorrect results. [#4099](https://github.com/ClickHouse/ClickHouse/pull/4099) ([Alex Zatelepin](https://github.com/ztlpn)) +- `clickhouse-client` can segfault on exit while loading data for command line suggestions if it was run in interactive mode. [#4317](https://github.com/ClickHouse/ClickHouse/pull/4317) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed race condition when selecting from `system.tables` may give `table does not exist` error. [#4313](https://github.com/ClickHouse/ClickHouse/pull/4313) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed deadlock when `SELECT` from a table with `File` engine was retried after `No such file or directory` error. [#4161](https://github.com/ClickHouse/ClickHouse/pull/4161) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed an issue: local ClickHouse dictionaries are loaded via TCP, but should load within process. [#4166](https://github.com/ClickHouse/ClickHouse/pull/4166) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed `No message received` error when interacting with PostgreSQL ODBC Driver through TLS connection. Also fixes segfault when using MySQL ODBC Driver. [#4170](https://github.com/ClickHouse/ClickHouse/pull/4170) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Temporarily disable predicate optimization for `ORDER BY`. [#3890](https://github.com/ClickHouse/ClickHouse/pull/3890) ([Winter Zhang](https://github.com/zhang2014)) +- Fixed infinite loop when selecting from table function `numbers(0)`. [#4280](https://github.com/ClickHouse/ClickHouse/pull/4280) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed `compile_expressions` bug with comparison of big (more than int16) dates. [#4341](https://github.com/ClickHouse/ClickHouse/pull/4341) ([alesapin](https://github.com/alesapin)) +- Fixed segmentation fault with `uncompressed_cache=1` and exception with wrong uncompressed size. [#4186](https://github.com/ClickHouse/ClickHouse/pull/4186) ([alesapin](https://github.com/alesapin)) +- Fixed `ALL JOIN` with duplicates in right table. [#4184](https://github.com/ClickHouse/ClickHouse/pull/4184) ([Artem Zuikov](https://github.com/4ertus2)) +- Fixed wrong behaviour when doing `INSERT ... SELECT ... FROM file(...)` query and file has `CSVWithNames` or `TSVWIthNames` format and the first data row is missing. [#4297](https://github.com/ClickHouse/ClickHouse/pull/4297) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed aggregate functions execution with `Array(LowCardinality)` arguments. [#4055](https://github.com/ClickHouse/ClickHouse/pull/4055) ([KochetovNicolai](https://github.com/KochetovNicolai)) +- Debian package: correct /etc/clickhouse-server/preprocessed link according to config. [#4205](https://github.com/ClickHouse/ClickHouse/pull/4205) ([proller](https://github.com/proller)) +- Fixed fuzz test under undefined behavior sanitizer: added parameter type check for `quantile*Weighted` family of functions. [#4145](https://github.com/ClickHouse/ClickHouse/pull/4145) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Make `START REPLICATED SENDS` command start replicated sends. [#4229](https://github.com/ClickHouse/ClickHouse/pull/4229) ([nvartolomei](https://github.com/nvartolomei)) +- Fixed `Not found column` for duplicate columns in JOIN ON section. [#4279](https://github.com/ClickHouse/ClickHouse/pull/4279) ([Artem Zuikov](https://github.com/4ertus2)) +- Now `/etc/ssl` is used as default directory with SSL certificates. [#4167](https://github.com/ClickHouse/ClickHouse/pull/4167) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed crash on dictionary reload if dictionary not available. [#4188](https://github.com/ClickHouse/ClickHouse/pull/4188) ([proller](https://github.com/proller)) +- Fixed bug with incorrect `Date` and `DateTime` comparison. [#4237](https://github.com/ClickHouse/ClickHouse/pull/4237) ([valexey](https://github.com/valexey)) +- Fixed incorrect result when `Date` and `DateTime` arguments are used in branches of conditional operator (function `if`). Added generic case for function `if`. [#4243](https://github.com/ClickHouse/ClickHouse/pull/4243) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +### ClickHouse Release 19.1.6, 2019-01-24 {#clickhouse-release-19-1-6-2019-01-24} + +#### New Features {#new-features-7} + +- Custom per column compression codecs for tables. [#3899](https://github.com/ClickHouse/ClickHouse/pull/3899) [#4111](https://github.com/ClickHouse/ClickHouse/pull/4111) ([alesapin](https://github.com/alesapin), [Winter Zhang](https://github.com/zhang2014), [Anatoly](https://github.com/Sindbag)) +- Added compression codec `Delta`. [#4052](https://github.com/ClickHouse/ClickHouse/pull/4052) ([alesapin](https://github.com/alesapin)) +- Allow to `ALTER` compression codecs. [#4054](https://github.com/ClickHouse/ClickHouse/pull/4054) ([alesapin](https://github.com/alesapin)) +- Added functions `left`, `right`, `trim`, `ltrim`, `rtrim`, `timestampadd`, `timestampsub` for SQL standard compatibility. [#3826](https://github.com/ClickHouse/ClickHouse/pull/3826) ([Ivan Blinkov](https://github.com/blinkov)) +- Support for write in `HDFS` tables and `hdfs` table function. [#4084](https://github.com/ClickHouse/ClickHouse/pull/4084) ([alesapin](https://github.com/alesapin)) +- Added functions to search for multiple constant strings from big haystack: `multiPosition`, `multiSearch` ,`firstMatch` also with `-UTF8`, `-CaseInsensitive`, and `-CaseInsensitiveUTF8` variants. [#4053](https://github.com/ClickHouse/ClickHouse/pull/4053) ([Danila Kutenin](https://github.com/danlark1)) +- Pruning of unused shards if `SELECT` query filters by sharding key (setting `optimize_skip_unused_shards`). [#3851](https://github.com/ClickHouse/ClickHouse/pull/3851) ([Gleb Kanterov](https://github.com/kanterov), [Ivan](https://github.com/abyss7)) +- Allow `Kafka` engine to ignore some number of parsing errors per block. [#4094](https://github.com/ClickHouse/ClickHouse/pull/4094) ([Ivan](https://github.com/abyss7)) +- Added support for `CatBoost` multiclass models evaluation. Function `modelEvaluate` returns tuple with per-class raw predictions for multiclass models. `libcatboostmodel.so` should be built with [#607](https://github.com/catboost/catboost/pull/607). [#3959](https://github.com/ClickHouse/ClickHouse/pull/3959) ([KochetovNicolai](https://github.com/KochetovNicolai)) +- Added functions `filesystemAvailable`, `filesystemFree`, `filesystemCapacity`. [#4097](https://github.com/ClickHouse/ClickHouse/pull/4097) ([Boris Granveaud](https://github.com/bgranvea)) +- Added hashing functions `xxHash64` and `xxHash32`. [#3905](https://github.com/ClickHouse/ClickHouse/pull/3905) ([filimonov](https://github.com/filimonov)) +- Added `gccMurmurHash` hashing function (GCC flavoured Murmur hash) which uses the same hash seed as [gcc](https://github.com/gcc-mirror/gcc/blob/41d6b10e96a1de98e90a7c0378437c3255814b16/libstdc%2B%2B-v3/include/bits/functional_hash.h#L191) [#4000](https://github.com/ClickHouse/ClickHouse/pull/4000) ([sundyli](https://github.com/sundy-li)) +- Added hashing functions `javaHash`, `hiveHash`. [#3811](https://github.com/ClickHouse/ClickHouse/pull/3811) ([shangshujie365](https://github.com/shangshujie365)) +- Added table function `remoteSecure`. Function works as `remote`, but uses secure connection. [#4088](https://github.com/ClickHouse/ClickHouse/pull/4088) ([proller](https://github.com/proller)) + +#### Experimental Features {#experimental-features-3} + +- Added multiple JOINs emulation (`allow_experimental_multiple_joins_emulation` setting). [#3946](https://github.com/ClickHouse/ClickHouse/pull/3946) ([Artem Zuikov](https://github.com/4ertus2)) + +#### Bug Fixes {#bug-fixes-21} + +- Make `compiled_expression_cache_size` setting limited by default to lower memory consumption. [#4041](https://github.com/ClickHouse/ClickHouse/pull/4041) ([alesapin](https://github.com/alesapin)) +- Fix a bug that led to hangups in threads that perform ALTERs of Replicated tables and in the thread that updates configuration from ZooKeeper. [#2947](https://github.com/ClickHouse/ClickHouse/issues/2947) [#3891](https://github.com/ClickHouse/ClickHouse/issues/3891) [#3934](https://github.com/ClickHouse/ClickHouse/pull/3934) ([Alex Zatelepin](https://github.com/ztlpn)) +- Fixed a race condition when executing a distributed ALTER task. The race condition led to more than one replica trying to execute the task and all replicas except one failing with a ZooKeeper error. [#3904](https://github.com/ClickHouse/ClickHouse/pull/3904) ([Alex Zatelepin](https://github.com/ztlpn)) +- Fix a bug when `from_zk` config elements weren’t refreshed after a request to ZooKeeper timed out. [#2947](https://github.com/ClickHouse/ClickHouse/issues/2947) [#3947](https://github.com/ClickHouse/ClickHouse/pull/3947) ([Alex Zatelepin](https://github.com/ztlpn)) +- Fix bug with wrong prefix for IPv4 subnet masks. [#3945](https://github.com/ClickHouse/ClickHouse/pull/3945) ([alesapin](https://github.com/alesapin)) +- Fixed crash (`std::terminate`) in rare cases when a new thread cannot be created due to exhausted resources. [#3956](https://github.com/ClickHouse/ClickHouse/pull/3956) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix bug when in `remote` table function execution when wrong restrictions were used for in `getStructureOfRemoteTable`. [#4009](https://github.com/ClickHouse/ClickHouse/pull/4009) ([alesapin](https://github.com/alesapin)) +- Fix a leak of netlink sockets. They were placed in a pool where they were never deleted and new sockets were created at the start of a new thread when all current sockets were in use. [#4017](https://github.com/ClickHouse/ClickHouse/pull/4017) ([Alex Zatelepin](https://github.com/ztlpn)) +- Fix bug with closing `/proc/self/fd` directory earlier than all fds were read from `/proc` after forking `odbc-bridge` subprocess. [#4120](https://github.com/ClickHouse/ClickHouse/pull/4120) ([alesapin](https://github.com/alesapin)) +- Fixed String to UInt monotonic conversion in case of usage String in primary key. [#3870](https://github.com/ClickHouse/ClickHouse/pull/3870) ([Winter Zhang](https://github.com/zhang2014)) +- Fixed error in calculation of integer conversion function monotonicity. [#3921](https://github.com/ClickHouse/ClickHouse/pull/3921) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed segfault in `arrayEnumerateUniq`, `arrayEnumerateDense` functions in case of some invalid arguments. [#3909](https://github.com/ClickHouse/ClickHouse/pull/3909) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fix UB in StorageMerge. [#3910](https://github.com/ClickHouse/ClickHouse/pull/3910) ([Amos Bird](https://github.com/amosbird)) +- Fixed segfault in functions `addDays`, `subtractDays`. [#3913](https://github.com/ClickHouse/ClickHouse/pull/3913) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed error: functions `round`, `floor`, `trunc`, `ceil` may return bogus result when executed on integer argument and large negative scale. [#3914](https://github.com/ClickHouse/ClickHouse/pull/3914) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed a bug induced by ‘kill query sync’ which leads to a core dump. [#3916](https://github.com/ClickHouse/ClickHouse/pull/3916) ([muVulDeePecker](https://github.com/fancyqlx)) +- Fix bug with long delay after empty replication queue. [#3928](https://github.com/ClickHouse/ClickHouse/pull/3928) [#3932](https://github.com/ClickHouse/ClickHouse/pull/3932) ([alesapin](https://github.com/alesapin)) +- Fixed excessive memory usage in case of inserting into table with `LowCardinality` primary key. [#3955](https://github.com/ClickHouse/ClickHouse/pull/3955) ([KochetovNicolai](https://github.com/KochetovNicolai)) +- Fixed `LowCardinality` serialization for `Native` format in case of empty arrays. [#3907](https://github.com/ClickHouse/ClickHouse/issues/3907) [#4011](https://github.com/ClickHouse/ClickHouse/pull/4011) ([KochetovNicolai](https://github.com/KochetovNicolai)) +- Fixed incorrect result while using distinct by single LowCardinality numeric column. [#3895](https://github.com/ClickHouse/ClickHouse/issues/3895) [#4012](https://github.com/ClickHouse/ClickHouse/pull/4012) ([KochetovNicolai](https://github.com/KochetovNicolai)) +- Fixed specialized aggregation with LowCardinality key (in case when `compile` setting is enabled). [#3886](https://github.com/ClickHouse/ClickHouse/pull/3886) ([KochetovNicolai](https://github.com/KochetovNicolai)) +- Fix user and password forwarding for replicated tables queries. [#3957](https://github.com/ClickHouse/ClickHouse/pull/3957) ([alesapin](https://github.com/alesapin)) ([å°è·¯](https://github.com/nicelulu)) +- Fixed very rare race condition that can happen when listing tables in Dictionary database while reloading dictionaries. [#3970](https://github.com/ClickHouse/ClickHouse/pull/3970) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed incorrect result when HAVING was used with ROLLUP or CUBE. [#3756](https://github.com/ClickHouse/ClickHouse/issues/3756) [#3837](https://github.com/ClickHouse/ClickHouse/pull/3837) ([Sam Chou](https://github.com/reflection)) +- Fixed column aliases for query with `JOIN ON` syntax and distributed tables. [#3980](https://github.com/ClickHouse/ClickHouse/pull/3980) ([Winter Zhang](https://github.com/zhang2014)) +- Fixed error in internal implementation of `quantileTDigest` (found by Artem Vakhrushev). This error never happens in ClickHouse and was relevant only for those who use ClickHouse codebase as a library directly. [#3935](https://github.com/ClickHouse/ClickHouse/pull/3935) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Improvements {#improvements-6} + +- Support for `IF NOT EXISTS` in `ALTER TABLE ADD COLUMN` statements along with `IF EXISTS` in `DROP/MODIFY/CLEAR/COMMENT COLUMN`. [#3900](https://github.com/ClickHouse/ClickHouse/pull/3900) ([Boris Granveaud](https://github.com/bgranvea)) +- Function `parseDateTimeBestEffort`: support for formats `DD.MM.YYYY`, `DD.MM.YY`, `DD-MM-YYYY`, `DD-Mon-YYYY`, `DD/Month/YYYY` and similar. [#3922](https://github.com/ClickHouse/ClickHouse/pull/3922) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- `CapnProtoInputStream` now support jagged structures. [#4063](https://github.com/ClickHouse/ClickHouse/pull/4063) ([Odin Hultgren Van Der Horst](https://github.com/Miniwoffer)) +- Usability improvement: added a check that server process is started from the data directory’s owner. Do not allow to start server from root if the data belongs to non-root user. [#3785](https://github.com/ClickHouse/ClickHouse/pull/3785) ([sergey-v-galtsev](https://github.com/sergey-v-galtsev)) +- Better logic of checking required columns during analysis of queries with JOINs. [#3930](https://github.com/ClickHouse/ClickHouse/pull/3930) ([Artem Zuikov](https://github.com/4ertus2)) +- Decreased the number of connections in case of large number of Distributed tables in a single server. [#3726](https://github.com/ClickHouse/ClickHouse/pull/3726) ([Winter Zhang](https://github.com/zhang2014)) +- Supported totals row for `WITH TOTALS` query for ODBC driver. [#3836](https://github.com/ClickHouse/ClickHouse/pull/3836) ([Maksim Koritckiy](https://github.com/nightweb)) +- Allowed to use `Enum`s as integers inside if function. [#3875](https://github.com/ClickHouse/ClickHouse/pull/3875) ([Ivan](https://github.com/abyss7)) +- Added `low_cardinality_allow_in_native_format` setting. If disabled, do not use `LowCadrinality` type in `Native` format. [#3879](https://github.com/ClickHouse/ClickHouse/pull/3879) ([KochetovNicolai](https://github.com/KochetovNicolai)) +- Removed some redundant objects from compiled expressions cache to lower memory usage. [#4042](https://github.com/ClickHouse/ClickHouse/pull/4042) ([alesapin](https://github.com/alesapin)) +- Add check that `SET send_logs_level = 'value'` query accept appropriate value. [#3873](https://github.com/ClickHouse/ClickHouse/pull/3873) ([Sabyanin Maxim](https://github.com/s-mx)) +- Fixed data type check in type conversion functions. [#3896](https://github.com/ClickHouse/ClickHouse/pull/3896) ([Winter Zhang](https://github.com/zhang2014)) + +#### Performance Improvements {#performance-improvements-5} + +- Add a MergeTree setting `use_minimalistic_part_header_in_zookeeper`. If enabled, Replicated tables will store compact part metadata in a single part znode. This can dramatically reduce ZooKeeper snapshot size (especially if the tables have a lot of columns). Note that after enabling this setting you will not be able to downgrade to a version that does not support it. [#3960](https://github.com/ClickHouse/ClickHouse/pull/3960) ([Alex Zatelepin](https://github.com/ztlpn)) +- Add an DFA-based implementation for functions `sequenceMatch` and `sequenceCount` in case pattern does not contain time. [#4004](https://github.com/ClickHouse/ClickHouse/pull/4004) ([Léo Ercolanelli](https://github.com/ercolanelli-leo)) +- Performance improvement for integer numbers serialization. [#3968](https://github.com/ClickHouse/ClickHouse/pull/3968) ([Amos Bird](https://github.com/amosbird)) +- Zero left padding PODArray so that -1 element is always valid and zeroed. It’s used for branchless calculation of offsets. [#3920](https://github.com/ClickHouse/ClickHouse/pull/3920) ([Amos Bird](https://github.com/amosbird)) +- Reverted `jemalloc` version which lead to performance degradation. [#4018](https://github.com/ClickHouse/ClickHouse/pull/4018) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Backward Incompatible Changes {#backward-incompatible-changes-2} + +- Removed undocumented feature `ALTER MODIFY PRIMARY KEY` because it was superseded by the `ALTER MODIFY ORDER BY` command. [#3887](https://github.com/ClickHouse/ClickHouse/pull/3887) ([Alex Zatelepin](https://github.com/ztlpn)) +- Removed function `shardByHash`. [#3833](https://github.com/ClickHouse/ClickHouse/pull/3833) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Forbid using scalar subqueries with result of type `AggregateFunction`. [#3865](https://github.com/ClickHouse/ClickHouse/pull/3865) ([Ivan](https://github.com/abyss7)) + +#### Build/Testing/Packaging Improvements {#buildtestingpackaging-improvements-6} + +- Added support for PowerPC (`ppc64le`) build. [#4132](https://github.com/ClickHouse/ClickHouse/pull/4132) ([Danila Kutenin](https://github.com/danlark1)) +- Stateful functional tests are run on public available dataset. [#3969](https://github.com/ClickHouse/ClickHouse/pull/3969) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed error when the server cannot start with the `bash: /usr/bin/clickhouse-extract-from-config: Operation not permitted` message within Docker or systemd-nspawn. [#4136](https://github.com/ClickHouse/ClickHouse/pull/4136) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Updated `rdkafka` library to v1.0.0-RC5. Used cppkafka instead of raw C interface. [#4025](https://github.com/ClickHouse/ClickHouse/pull/4025) ([Ivan](https://github.com/abyss7)) +- Updated `mariadb-client` library. Fixed one of issues found by UBSan. [#3924](https://github.com/ClickHouse/ClickHouse/pull/3924) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Some fixes for UBSan builds. [#3926](https://github.com/ClickHouse/ClickHouse/pull/3926) [#3021](https://github.com/ClickHouse/ClickHouse/pull/3021) [#3948](https://github.com/ClickHouse/ClickHouse/pull/3948) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added per-commit runs of tests with UBSan build. +- Added per-commit runs of PVS-Studio static analyzer. +- Fixed bugs found by PVS-Studio. [#4013](https://github.com/ClickHouse/ClickHouse/pull/4013) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed glibc compatibility issues. [#4100](https://github.com/ClickHouse/ClickHouse/pull/4100) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Move Docker images to 18.10 and add compatibility file for glibc \>= 2.28 [#3965](https://github.com/ClickHouse/ClickHouse/pull/3965) ([alesapin](https://github.com/alesapin)) +- Add env variable if user do not want to chown directories in server Docker image. [#3967](https://github.com/ClickHouse/ClickHouse/pull/3967) ([alesapin](https://github.com/alesapin)) +- Enabled most of the warnings from `-Weverything` in clang. Enabled `-Wpedantic`. [#3986](https://github.com/ClickHouse/ClickHouse/pull/3986) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Added a few more warnings that are available only in clang 8. [#3993](https://github.com/ClickHouse/ClickHouse/pull/3993) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Link to `libLLVM` rather than to individual LLVM libs when using shared linking. [#3989](https://github.com/ClickHouse/ClickHouse/pull/3989) ([Orivej Desh](https://github.com/orivej)) +- Added sanitizer variables for test images. [#4072](https://github.com/ClickHouse/ClickHouse/pull/4072) ([alesapin](https://github.com/alesapin)) +- `clickhouse-server` debian package will recommend `libcap2-bin` package to use `setcap` tool for setting capabilities. This is optional. [#4093](https://github.com/ClickHouse/ClickHouse/pull/4093) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Improved compilation time, fixed includes. [#3898](https://github.com/ClickHouse/ClickHouse/pull/3898) ([proller](https://github.com/proller)) +- Added performance tests for hash functions. [#3918](https://github.com/ClickHouse/ClickHouse/pull/3918) ([filimonov](https://github.com/filimonov)) +- Fixed cyclic library dependences. [#3958](https://github.com/ClickHouse/ClickHouse/pull/3958) ([proller](https://github.com/proller)) +- Improved compilation with low available memory. [#4030](https://github.com/ClickHouse/ClickHouse/pull/4030) ([proller](https://github.com/proller)) +- Added test script to reproduce performance degradation in `jemalloc`. [#4036](https://github.com/ClickHouse/ClickHouse/pull/4036) ([alexey-milovidov](https://github.com/alexey-milovidov)) +- Fixed misspells in comments and string literals under `dbms`. [#4122](https://github.com/ClickHouse/ClickHouse/pull/4122) ([maiha](https://github.com/maiha)) +- Fixed typos in comments. [#4089](https://github.com/ClickHouse/ClickHouse/pull/4089) ([Evgenii Pravda](https://github.com/kvinty)) + +## [Changelog for 2018](./2018.md) diff --git a/docs/ja/whats-new/changelog/2020.md b/docs/ja/whats-new/changelog/2020.md new file mode 100644 index 00000000000..cbd0ee1ccca --- /dev/null +++ b/docs/ja/whats-new/changelog/2020.md @@ -0,0 +1,3534 @@ +--- +slug: /ja/whats-new/changelog/2020 +sidebar_position: 14 +sidebar_label: '2020' +title: 2020 Changelog +--- + +### ClickHouse release 20.12 + +### ClickHouse release v20.12.5.14-stable, 2020-12-28 + +#### Bug Fix + +* Disable write with AIO during merges because it can lead to extremely rare data corruption of primary key columns during merge. [#18481](https://github.com/ClickHouse/ClickHouse/pull/18481) ([alesapin](https://github.com/alesapin)). +* Fixed `value is too short` error when executing `toType(...)` functions (`toDate`, `toUInt32`, etc) with argument of type `Nullable(String)`. Now such functions return `NULL` on parsing errors instead of throwing exception. Fixes [#7673](https://github.com/ClickHouse/ClickHouse/issues/7673). [#18445](https://github.com/ClickHouse/ClickHouse/pull/18445) ([tavplubix](https://github.com/tavplubix)). +* Restrict merges from wide to compact parts. In case of vertical merge it led to broken result part. [#18381](https://github.com/ClickHouse/ClickHouse/pull/18381) ([Anton Popov](https://github.com/CurtizJ)). +* Fix filling table `system.settings_profile_elements`. This PR fixes [#18231](https://github.com/ClickHouse/ClickHouse/issues/18231). [#18379](https://github.com/ClickHouse/ClickHouse/pull/18379) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix possible crashes in aggregate functions with combinator `Distinct`, while using two-level aggregation. Fixes [#17682](https://github.com/ClickHouse/ClickHouse/issues/17682). [#18365](https://github.com/ClickHouse/ClickHouse/pull/18365) ([Anton Popov](https://github.com/CurtizJ)). +* Fix error when query `MODIFY COLUMN ... REMOVE TTL` does not actually remove column TTL. [#18130](https://github.com/ClickHouse/ClickHouse/pull/18130) ([alesapin](https://github.com/alesapin)). + +#### Build/Testing/Packaging Improvement + +* Update timezones info to 2020e. [#18531](https://github.com/ClickHouse/ClickHouse/pull/18531) ([alesapin](https://github.com/alesapin)). + + +### ClickHouse release v20.12.4.5-stable, 2020-12-24 + +#### Bug Fix + +* Fixed issue when `clickhouse-odbc-bridge` process is unreachable by server on machines with dual IPv4/IPv6 stack; - Fixed issue when ODBC dictionary updates are performed using malformed queries and/or cause crashes; Possibly closes [#14489](https://github.com/ClickHouse/ClickHouse/issues/14489). [#18278](https://github.com/ClickHouse/ClickHouse/pull/18278) ([Denis Glazachev](https://github.com/traceon)). +* Fixed key comparison between Enum and Int types. This fixes [#17989](https://github.com/ClickHouse/ClickHouse/issues/17989). [#18214](https://github.com/ClickHouse/ClickHouse/pull/18214) ([Amos Bird](https://github.com/amosbird)). +* Fixed unique key convert crash in `MaterializeMySQL` database engine. This fixes [#18186](https://github.com/ClickHouse/ClickHouse/issues/18186) and fixes [#16372](https://github.com/ClickHouse/ClickHouse/issues/16372) [#18211](https://github.com/ClickHouse/ClickHouse/pull/18211) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed `std::out_of_range: basic_string` in S3 URL parsing. [#18059](https://github.com/ClickHouse/ClickHouse/pull/18059) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fixed the issue when some tables not synchronized to ClickHouse from MySQL caused by the fact that convertion MySQL prefix index wasn't supported for MaterializeMySQL. This fixes [#15187](https://github.com/ClickHouse/ClickHouse/issues/15187) and fixes [#17912](https://github.com/ClickHouse/ClickHouse/issues/17912) [#17944](https://github.com/ClickHouse/ClickHouse/pull/17944) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed the issue when query optimization was producing wrong result if query contains `ARRAY JOIN`. [#17887](https://github.com/ClickHouse/ClickHouse/pull/17887) ([sundyli](https://github.com/sundy-li)). +* Fixed possible segfault in `topK` aggregate function. This closes [#17404](https://github.com/ClickHouse/ClickHouse/issues/17404). [#17845](https://github.com/ClickHouse/ClickHouse/pull/17845) ([Maksim Kita](https://github.com/kitaisreal)). +* Fixed empty `system.stack_trace` table when server is running in daemon mode. [#17630](https://github.com/ClickHouse/ClickHouse/pull/17630) ([Amos Bird](https://github.com/amosbird)). + + +### ClickHouse release v20.12.3.3-stable, 2020-12-13 + +#### Backward Incompatible Change + +* Enable `use_compact_format_in_distributed_parts_names` by default (see the documentation for the reference). [#16728](https://github.com/ClickHouse/ClickHouse/pull/16728) ([Azat Khuzhin](https://github.com/azat)). +* Accept user settings related to file formats (e.g. `format_csv_delimiter`) in the `SETTINGS` clause when creating a table that uses `File` engine, and use these settings in all `INSERT`s and `SELECT`s. The file format settings changed in the current user session, or in the `SETTINGS` clause of a DML query itself, no longer affect the query. [#16591](https://github.com/ClickHouse/ClickHouse/pull/16591) ([Alexander Kuzmenkov](https://github.com/akuzm)). + +#### New Feature + +* add `*.xz` compression/decompression support.It enables using `*.xz` in `file()` function. This closes [#8828](https://github.com/ClickHouse/ClickHouse/issues/8828). [#16578](https://github.com/ClickHouse/ClickHouse/pull/16578) ([Abi Palagashvili](https://github.com/fibersel)). +* Introduce the query `ALTER TABLE ... DROP|DETACH PART 'part_name'`. [#15511](https://github.com/ClickHouse/ClickHouse/pull/15511) ([nvartolomei](https://github.com/nvartolomei)). +* Added new ALTER UPDATE/DELETE IN PARTITION syntax. [#13403](https://github.com/ClickHouse/ClickHouse/pull/13403) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Allow formatting named tuples as JSON objects when using JSON input/output formats, controlled by the `output_format_json_named_tuples_as_objects` setting, disabled by default. [#17175](https://github.com/ClickHouse/ClickHouse/pull/17175) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Add a possibility to input enum value as it's id in TSV and CSV formats by default. [#16834](https://github.com/ClickHouse/ClickHouse/pull/16834) ([Kruglov Pavel](https://github.com/Avogar)). +* Add COLLATE support for Nullable, LowCardinality, Array and Tuple, where nested type is String. Also refactor the code associated with collations in ColumnString.cpp. [#16273](https://github.com/ClickHouse/ClickHouse/pull/16273) ([Kruglov Pavel](https://github.com/Avogar)). +* New `tcpPort` function returns TCP port listened by this server. [#17134](https://github.com/ClickHouse/ClickHouse/pull/17134) ([Ivan](https://github.com/abyss7)). +* Add new math functions: `acosh`, `asinh`, `atan2`, `atanh`, `cosh`, `hypot`, `log1p`, `sinh`. [#16636](https://github.com/ClickHouse/ClickHouse/pull/16636) ([Konstantin Malanchev](https://github.com/hombit)). +* Possibility to distribute the merges between different replicas. Introduces the `execute_merges_on_single_replica_time_threshold` mergetree setting. [#16424](https://github.com/ClickHouse/ClickHouse/pull/16424) ([filimonov](https://github.com/filimonov)). +* Add setting `aggregate_functions_null_for_empty` for SQL standard compatibility. This option will rewrite all aggregate functions in a query, adding -OrNull suffix to them. Implements [10273](https://github.com/ClickHouse/ClickHouse/issues/10273). [#16123](https://github.com/ClickHouse/ClickHouse/pull/16123) ([flynn](https://github.com/ucasFL)). +* Updated DateTime, DateTime64 parsing to accept string Date literal format. [#16040](https://github.com/ClickHouse/ClickHouse/pull/16040) ([Maksim Kita](https://github.com/kitaisreal)). +* Make it possible to change the path to history file in `clickhouse-client` using the `--history_file` parameter. [#15960](https://github.com/ClickHouse/ClickHouse/pull/15960) ([Maksim Kita](https://github.com/kitaisreal)). + +#### Bug Fix + +* Fix the issue when server can stop accepting connections in very rare cases. [#17542](https://github.com/ClickHouse/ClickHouse/pull/17542) ([Amos Bird](https://github.com/amosbird)). +* Fixed `Function not implemented` error when executing `RENAME` query in `Atomic` database with ClickHouse running on Windows Subsystem for Linux. Fixes [#17661](https://github.com/ClickHouse/ClickHouse/issues/17661). [#17664](https://github.com/ClickHouse/ClickHouse/pull/17664) ([tavplubix](https://github.com/tavplubix)). +* Do not restore parts from WAL if `in_memory_parts_enable_wal` is disabled. [#17802](https://github.com/ClickHouse/ClickHouse/pull/17802) ([detailyang](https://github.com/detailyang)). +* fix incorrect initialization of `max_compress_block_size` of MergeTreeWriterSettings with `min_compress_block_size`. [#17833](https://github.com/ClickHouse/ClickHouse/pull/17833) ([flynn](https://github.com/ucasFL)). +* Exception message about max table size to drop was displayed incorrectly. [#17764](https://github.com/ClickHouse/ClickHouse/pull/17764) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed possible segfault when there is not enough space when inserting into `Distributed` table. [#17737](https://github.com/ClickHouse/ClickHouse/pull/17737) ([tavplubix](https://github.com/tavplubix)). +* Fixed problem when ClickHouse fails to resume connection to MySQL servers. [#17681](https://github.com/ClickHouse/ClickHouse/pull/17681) ([Alexander Kazakov](https://github.com/Akazz)). +* In might be determined incorrectly if cluster is circular- (cross-) replicated or not when executing `ON CLUSTER` query due to race condition when `pool_size` > 1. It's fixed. [#17640](https://github.com/ClickHouse/ClickHouse/pull/17640) ([tavplubix](https://github.com/tavplubix)). +* Exception `fmt::v7::format_error` can be logged in background for MergeTree tables. This fixes [#17613](https://github.com/ClickHouse/ClickHouse/issues/17613). [#17615](https://github.com/ClickHouse/ClickHouse/pull/17615) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* When clickhouse-client is used in interactive mode with multiline queries, single line comment was erronously extended till the end of query. This fixes [#13654](https://github.com/ClickHouse/ClickHouse/issues/13654). [#17565](https://github.com/ClickHouse/ClickHouse/pull/17565) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix alter query hang when the corresponding mutation was killed on the different replica. Fixes [#16953](https://github.com/ClickHouse/ClickHouse/issues/16953). [#17499](https://github.com/ClickHouse/ClickHouse/pull/17499) ([alesapin](https://github.com/alesapin)). +* Fix issue when mark cache size was underestimated by clickhouse. It may happen when there are a lot of tiny files with marks. [#17496](https://github.com/ClickHouse/ClickHouse/pull/17496) ([alesapin](https://github.com/alesapin)). +* Fix `ORDER BY` with enabled setting `optimize_redundant_functions_in_order_by`. [#17471](https://github.com/ClickHouse/ClickHouse/pull/17471) ([Anton Popov](https://github.com/CurtizJ)). +* Fix duplicates after `DISTINCT` which were possible because of incorrect optimization. Fixes [#17294](https://github.com/ClickHouse/ClickHouse/issues/17294). [#17296](https://github.com/ClickHouse/ClickHouse/pull/17296) ([li chengxiang](https://github.com/chengxianglibra)). [#17439](https://github.com/ClickHouse/ClickHouse/pull/17439) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix crash while reading from `JOIN` table with `LowCardinality` types. Fixes [#17228](https://github.com/ClickHouse/ClickHouse/issues/17228). [#17397](https://github.com/ClickHouse/ClickHouse/pull/17397) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* fix `toInt256(inf)` stack overflow. Int256 is an experimental feature. Closed [#17235](https://github.com/ClickHouse/ClickHouse/issues/17235). [#17257](https://github.com/ClickHouse/ClickHouse/pull/17257) ([flynn](https://github.com/ucasFL)). +* Fix possible `Unexpected packet Data received from client` error logged for Distributed queries with `LIMIT`. [#17254](https://github.com/ClickHouse/ClickHouse/pull/17254) ([Azat Khuzhin](https://github.com/azat)). +* Fix set index invalidation when there are const columns in the subquery. This fixes [#17246](https://github.com/ClickHouse/ClickHouse/issues/17246). [#17249](https://github.com/ClickHouse/ClickHouse/pull/17249) ([Amos Bird](https://github.com/amosbird)). +* Fix possible wrong index analysis when the types of the index comparison are different. This fixes [#17122](https://github.com/ClickHouse/ClickHouse/issues/17122). [#17145](https://github.com/ClickHouse/ClickHouse/pull/17145) ([Amos Bird](https://github.com/amosbird)). +* Fix ColumnConst comparison which leads to crash. This fixed [#17088](https://github.com/ClickHouse/ClickHouse/issues/17088) . [#17135](https://github.com/ClickHouse/ClickHouse/pull/17135) ([Amos Bird](https://github.com/amosbird)). +* Multiple fixed for MaterializeMySQL (experimental feature). Fixes [#16923](https://github.com/ClickHouse/ClickHouse/issues/16923) Fixes [#15883](https://github.com/ClickHouse/ClickHouse/issues/15883) Fix MaterializeMySQL SYNC failure when the modify MySQL binlog_checksum. [#17091](https://github.com/ClickHouse/ClickHouse/pull/17091) ([Winter Zhang](https://github.com/zhang2014)). +* Fix bug when `ON CLUSTER` queries may hang forever for non-leader ReplicatedMergeTreeTables. [#17089](https://github.com/ClickHouse/ClickHouse/pull/17089) ([alesapin](https://github.com/alesapin)). +* Fixed crash on `CREATE TABLE ... AS some_table` query when `some_table` was created `AS table_function()` Fixes [#16944](https://github.com/ClickHouse/ClickHouse/issues/16944). [#17072](https://github.com/ClickHouse/ClickHouse/pull/17072) ([tavplubix](https://github.com/tavplubix)). +* Bug unfinished implementation for funciton fuzzBits, related issue: [#16980](https://github.com/ClickHouse/ClickHouse/issues/16980). [#17051](https://github.com/ClickHouse/ClickHouse/pull/17051) ([hexiaoting](https://github.com/hexiaoting)). +* Fix LLVM's libunwind in the case when CFA register is RAX. This is the [bug](https://bugs.llvm.org/show_bug.cgi?id=48186) in [LLVM's libunwind](https://github.com/llvm/llvm-project/tree/master/libunwind). We already have workarounds for this bug. [#17046](https://github.com/ClickHouse/ClickHouse/pull/17046) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Avoid unnecessary network errors for remote queries which may be cancelled while execution, like queries with `LIMIT`. [#17006](https://github.com/ClickHouse/ClickHouse/pull/17006) ([Azat Khuzhin](https://github.com/azat)). +* Fix `optimize_distributed_group_by_sharding_key` setting (that is disabled by default) for query with OFFSET only. [#16996](https://github.com/ClickHouse/ClickHouse/pull/16996) ([Azat Khuzhin](https://github.com/azat)). +* Fix for Merge tables over Distributed tables with JOIN. [#16993](https://github.com/ClickHouse/ClickHouse/pull/16993) ([Azat Khuzhin](https://github.com/azat)). +* Fixed wrong result in big integers (128, 256 bit) when casting from double. Big integers support is experimental. [#16986](https://github.com/ClickHouse/ClickHouse/pull/16986) ([Mike](https://github.com/myrrc)). +* Fix possible server crash after `ALTER TABLE ... MODIFY COLUMN ... NewType` when `SELECT` have `WHERE` expression on altering column and alter does not finished yet. [#16968](https://github.com/ClickHouse/ClickHouse/pull/16968) ([Amos Bird](https://github.com/amosbird)). +* Blame info was not calculated correctly in `clickhouse-git-import`. [#16959](https://github.com/ClickHouse/ClickHouse/pull/16959) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix order by optimization with monotonous functions. Fixes [#16107](https://github.com/ClickHouse/ClickHouse/issues/16107). [#16956](https://github.com/ClickHouse/ClickHouse/pull/16956) ([Anton Popov](https://github.com/CurtizJ)). +* Fix optimization of group by with enabled setting `optimize_aggregators_of_group_by_keys` and joins. Fixes [#12604](https://github.com/ClickHouse/ClickHouse/issues/12604). [#16951](https://github.com/ClickHouse/ClickHouse/pull/16951) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible error `Illegal type of argument` for queries with `ORDER BY`. Fixes [#16580](https://github.com/ClickHouse/ClickHouse/issues/16580). [#16928](https://github.com/ClickHouse/ClickHouse/pull/16928) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix strange code in InterpreterShowAccessQuery. [#16866](https://github.com/ClickHouse/ClickHouse/pull/16866) ([tavplubix](https://github.com/tavplubix)). +* Prevent clickhouse server crashes when using the function `timeSeriesGroupSum`. The function is removed from newer ClickHouse releases. [#16865](https://github.com/ClickHouse/ClickHouse/pull/16865) ([filimonov](https://github.com/filimonov)). +* Fix rare silent crashes when query profiler is on and ClickHouse is installed on OS with glibc version that has (supposedly) broken asynchronous unwind tables for some functions. This fixes [#15301](https://github.com/ClickHouse/ClickHouse/issues/15301). This fixes [#13098](https://github.com/ClickHouse/ClickHouse/issues/13098). [#16846](https://github.com/ClickHouse/ClickHouse/pull/16846) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix crash when using `any` without any arguments. This is for [#16803](https://github.com/ClickHouse/ClickHouse/issues/16803) . cc @azat. [#16826](https://github.com/ClickHouse/ClickHouse/pull/16826) ([Amos Bird](https://github.com/amosbird)). +* If no memory can be allocated while writing table metadata on disk, broken metadata file can be written. [#16772](https://github.com/ClickHouse/ClickHouse/pull/16772) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix trivial query optimization with partition predicate. [#16767](https://github.com/ClickHouse/ClickHouse/pull/16767) ([Azat Khuzhin](https://github.com/azat)). +* Fix `IN` operator over several columns and tuples with enabled `transform_null_in` setting. Fixes [#15310](https://github.com/ClickHouse/ClickHouse/issues/15310). [#16722](https://github.com/ClickHouse/ClickHouse/pull/16722) ([Anton Popov](https://github.com/CurtizJ)). +* Return number of affected rows for INSERT queries via MySQL protocol. Previously ClickHouse used to always return 0, it's fixed. Fixes [#16605](https://github.com/ClickHouse/ClickHouse/issues/16605). [#16715](https://github.com/ClickHouse/ClickHouse/pull/16715) ([Winter Zhang](https://github.com/zhang2014)). +* Fix remote query failure when using 'if' suffix aggregate function. Fixes [#16574](https://github.com/ClickHouse/ClickHouse/issues/16574) Fixes [#16231](https://github.com/ClickHouse/ClickHouse/issues/16231) [#16610](https://github.com/ClickHouse/ClickHouse/pull/16610) ([Winter Zhang](https://github.com/zhang2014)). +* Fix inconsistent behavior caused by `select_sequential_consistency` for optimized trivial count query and system.tables. [#16309](https://github.com/ClickHouse/ClickHouse/pull/16309) ([Hao Chen](https://github.com/haoch)). + +#### Improvement + +* Remove empty parts after they were pruned by TTL, mutation, or collapsing merge algorithm. [#16895](https://github.com/ClickHouse/ClickHouse/pull/16895) ([Anton Popov](https://github.com/CurtizJ)). +* Enable compact format of directories for asynchronous sends in Distributed tables: `use_compact_format_in_distributed_parts_names` is set to 1 by default. [#16788](https://github.com/ClickHouse/ClickHouse/pull/16788) ([Azat Khuzhin](https://github.com/azat)). +* Abort multipart upload if no data was written to S3. [#16840](https://github.com/ClickHouse/ClickHouse/pull/16840) ([Pavel Kovalenko](https://github.com/Jokser)). +* Reresolve the IP of the `format_avro_schema_registry_url` in case of errors. [#16985](https://github.com/ClickHouse/ClickHouse/pull/16985) ([filimonov](https://github.com/filimonov)). +* Mask password in data_path in the system.distribution_queue. [#16727](https://github.com/ClickHouse/ClickHouse/pull/16727) ([Azat Khuzhin](https://github.com/azat)). +* Throw error when use column transformer replaces non existing column. [#16183](https://github.com/ClickHouse/ClickHouse/pull/16183) ([hexiaoting](https://github.com/hexiaoting)). +* Turn off parallel parsing when there is no enough memory for all threads to work simultaneously. Also there could be exceptions like "Memory limit exceeded" when somebody will try to insert extremely huge rows (> min_chunk_bytes_for_parallel_parsing), because each piece to parse has to be independent set of strings (one or more). [#16721](https://github.com/ClickHouse/ClickHouse/pull/16721) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Install script should always create subdirs in config folders. This is only relevant for Docker build with custom config. [#16936](https://github.com/ClickHouse/ClickHouse/pull/16936) ([filimonov](https://github.com/filimonov)). +* Correct grammar in error message in JSONEachRow, JSONCompactEachRow, and RegexpRow input formats. [#17205](https://github.com/ClickHouse/ClickHouse/pull/17205) ([nico piderman](https://github.com/sneako)). +* Set default `host` and `port` parameters for `SOURCE(CLICKHOUSE(...))` to current instance and set default `user` value to `'default'`. [#16997](https://github.com/ClickHouse/ClickHouse/pull/16997) ([vdimir](https://github.com/vdimir)). +* Throw an informative error message when doing `ATTACH/DETACH TABLE `. Before this PR, `detach table ` works but leads to an ill-formed in-memory metadata. [#16885](https://github.com/ClickHouse/ClickHouse/pull/16885) ([Amos Bird](https://github.com/amosbird)). +* Add cutToFirstSignificantSubdomainWithWWW(). [#16845](https://github.com/ClickHouse/ClickHouse/pull/16845) ([Azat Khuzhin](https://github.com/azat)). +* Server refused to startup with exception message if wrong config is given (`metric_log`.`collect_interval_milliseconds` is missing). [#16815](https://github.com/ClickHouse/ClickHouse/pull/16815) ([Ivan](https://github.com/abyss7)). +* Better exception message when configuration for distributed DDL is absent. This fixes [#5075](https://github.com/ClickHouse/ClickHouse/issues/5075). [#16769](https://github.com/ClickHouse/ClickHouse/pull/16769) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Usability improvement: better suggestions in syntax error message when `CODEC` expression is misplaced in `CREATE TABLE` query. This fixes [#12493](https://github.com/ClickHouse/ClickHouse/issues/12493). [#16768](https://github.com/ClickHouse/ClickHouse/pull/16768) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove empty directories for async INSERT at start of Distributed engine. [#16729](https://github.com/ClickHouse/ClickHouse/pull/16729) ([Azat Khuzhin](https://github.com/azat)). +* Workaround for use S3 with nginx server as proxy. Nginx currenty does not accept urls with empty path like `http://domain.com?delete`, but vanilla aws-sdk-cpp produces this kind of urls. This commit uses patched aws-sdk-cpp version, which makes urls with "/" as path in this cases, like `http://domain.com/?delete`. [#16709](https://github.com/ClickHouse/ClickHouse/pull/16709) ([ianton-ru](https://github.com/ianton-ru)). +* Allow `reinterpretAs*` functions to work for integers and floats of the same size. Implements [16640](https://github.com/ClickHouse/ClickHouse/issues/16640). [#16657](https://github.com/ClickHouse/ClickHouse/pull/16657) ([flynn](https://github.com/ucasFL)). +* Now, `` configuration can be changed in `config.xml` and reloaded without server startup. [#16627](https://github.com/ClickHouse/ClickHouse/pull/16627) ([Amos Bird](https://github.com/amosbird)). +* Support SNI in https connections to remote resources. This will allow to connect to Cloudflare servers that require SNI. This fixes [#10055](https://github.com/ClickHouse/ClickHouse/issues/10055). [#16252](https://github.com/ClickHouse/ClickHouse/pull/16252) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Make it possible to connect to `clickhouse-server` secure endpoint which requires SNI. This is possible when `clickhouse-server` is hosted behind TLS proxy. [#16938](https://github.com/ClickHouse/ClickHouse/pull/16938) ([filimonov](https://github.com/filimonov)). +* Fix possible stack overflow if a loop of materialized views is created. This closes [#15732](https://github.com/ClickHouse/ClickHouse/issues/15732). [#16048](https://github.com/ClickHouse/ClickHouse/pull/16048) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Simplify the implementation of background tasks processing for the MergeTree table engines family. There should be no visible changes for user. [#15983](https://github.com/ClickHouse/ClickHouse/pull/15983) ([alesapin](https://github.com/alesapin)). +* Improvement for MaterializeMySQL (experimental feature). Throw exception about right sync privileges when MySQL sync user has error privileges. [#15977](https://github.com/ClickHouse/ClickHouse/pull/15977) ([TCeason](https://github.com/TCeason)). +* Made `indexOf()` use BloomFilter. [#14977](https://github.com/ClickHouse/ClickHouse/pull/14977) ([achimbab](https://github.com/achimbab)). + +#### Performance Improvement + +* Use Floyd-Rivest algorithm, it is the best for the ClickHouse use case of partial sorting. Bechmarks are in https://github.com/danlark1/miniselect and [here](https://drive.google.com/drive/folders/1DHEaeXgZuX6AJ9eByeZ8iQVQv0ueP8XM). [#16825](https://github.com/ClickHouse/ClickHouse/pull/16825) ([Danila Kutenin](https://github.com/danlark1)). +* Now `ReplicatedMergeTree` tree engines family uses a separate thread pool for replicated fetches. Size of the pool limited by setting `background_fetches_pool_size` which can be tuned with a server restart. The default value of the setting is 3 and it means that the maximum amount of parallel fetches is equal to 3 (and it allows to utilize 10G network). Fixes #520. [#16390](https://github.com/ClickHouse/ClickHouse/pull/16390) ([alesapin](https://github.com/alesapin)). +* Fixed uncontrolled growth of the state of `quantileTDigest`. [#16680](https://github.com/ClickHouse/ClickHouse/pull/16680) ([hrissan](https://github.com/hrissan)). +* Add `VIEW` subquery description to `EXPLAIN`. Limit push down optimisation for `VIEW`. Add local replicas of `Distributed` to query plan. [#14936](https://github.com/ClickHouse/ClickHouse/pull/14936) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix optimize_read_in_order/optimize_aggregation_in_order with max_threads > 0 and expression in ORDER BY. [#16637](https://github.com/ClickHouse/ClickHouse/pull/16637) ([Azat Khuzhin](https://github.com/azat)). +* Fix performance of reading from `Merge` tables over huge number of `MergeTree` tables. Fixes [#7748](https://github.com/ClickHouse/ClickHouse/issues/7748). [#16988](https://github.com/ClickHouse/ClickHouse/pull/16988) ([Anton Popov](https://github.com/CurtizJ)). +* Now we can safely prune partitions with exact match. Useful case: Suppose table is partitioned by `intHash64(x) % 100` and the query has condition on `intHash64(x) % 100` verbatim, not on x. [#16253](https://github.com/ClickHouse/ClickHouse/pull/16253) ([Amos Bird](https://github.com/amosbird)). + +#### Experimental Feature + +* Add `EmbeddedRocksDB` table engine (can be used for dictionaries). [#15073](https://github.com/ClickHouse/ClickHouse/pull/15073) ([sundyli](https://github.com/sundy-li)). + +#### Build/Testing/Packaging Improvement + +* Improvements in test coverage building images. [#17233](https://github.com/ClickHouse/ClickHouse/pull/17233) ([alesapin](https://github.com/alesapin)). +* Update embedded timezone data to version 2020d (also update cctz to the latest master). [#17204](https://github.com/ClickHouse/ClickHouse/pull/17204) ([filimonov](https://github.com/filimonov)). +* Fix UBSan report in Poco. This closes [#12719](https://github.com/ClickHouse/ClickHouse/issues/12719). [#16765](https://github.com/ClickHouse/ClickHouse/pull/16765) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Do not instrument 3rd-party libraries with UBSan. [#16764](https://github.com/ClickHouse/ClickHouse/pull/16764) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix UBSan report in cache dictionaries. This closes [#12641](https://github.com/ClickHouse/ClickHouse/issues/12641). [#16763](https://github.com/ClickHouse/ClickHouse/pull/16763) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix UBSan report when trying to convert infinite floating point number to integer. This closes [#14190](https://github.com/ClickHouse/ClickHouse/issues/14190). [#16677](https://github.com/ClickHouse/ClickHouse/pull/16677) ([alexey-milovidov](https://github.com/alexey-milovidov)). + + +## ClickHouse release 20.11 + +### ClickHouse release v20.11.7.16-stable, 2021-03-02 + +#### Improvement + +* Explicitly set uid / gid of clickhouse user & group to the fixed values (101) in clickhouse-server images. [#19096](https://github.com/ClickHouse/ClickHouse/pull/19096) ([filimonov](https://github.com/filimonov)). + +#### Bug Fix + +* BloomFilter index crash fix. Fixes [#19757](https://github.com/ClickHouse/ClickHouse/issues/19757). [#19884](https://github.com/ClickHouse/ClickHouse/pull/19884) ([Maksim Kita](https://github.com/kitaisreal)). +* Deadlock was possible if system.text_log is enabled. This fixes [#19874](https://github.com/ClickHouse/ClickHouse/issues/19874). [#19875](https://github.com/ClickHouse/ClickHouse/pull/19875) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* In previous versions, unusual arguments for function arrayEnumerateUniq may cause crash or infinite loop. This closes [#19787](https://github.com/ClickHouse/ClickHouse/issues/19787). [#19788](https://github.com/ClickHouse/ClickHouse/pull/19788) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed stack overflow when using accurate comparison of arithmetic type with string type. [#19773](https://github.com/ClickHouse/ClickHouse/pull/19773) ([tavplubix](https://github.com/tavplubix)). +* Fix a segmentation fault in `bitmapAndnot` function. Fixes [#19668](https://github.com/ClickHouse/ClickHouse/issues/19668). [#19713](https://github.com/ClickHouse/ClickHouse/pull/19713) ([Maksim Kita](https://github.com/kitaisreal)). +* Some functions with big integers may cause segfault. Big integers is experimental feature. This closes [#19667](https://github.com/ClickHouse/ClickHouse/issues/19667). [#19672](https://github.com/ClickHouse/ClickHouse/pull/19672) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix wrong result of function `neighbor` for `LowCardinality` argument. Fixes [#10333](https://github.com/ClickHouse/ClickHouse/issues/10333). [#19617](https://github.com/ClickHouse/ClickHouse/pull/19617) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix use-after-free of the CompressedWriteBuffer in Connection after disconnect. [#19599](https://github.com/ClickHouse/ClickHouse/pull/19599) ([Azat Khuzhin](https://github.com/azat)). +* `DROP/DETACH TABLE table ON CLUSTER cluster SYNC` query might hang, it's fixed. Fixes [#19568](https://github.com/ClickHouse/ClickHouse/issues/19568). [#19572](https://github.com/ClickHouse/ClickHouse/pull/19572) ([tavplubix](https://github.com/tavplubix)). +* Query CREATE DICTIONARY id expression fix. [#19571](https://github.com/ClickHouse/ClickHouse/pull/19571) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix SIGSEGV with merge_tree_min_rows_for_concurrent_read/merge_tree_min_bytes_for_concurrent_read=0/UINT64_MAX. [#19528](https://github.com/ClickHouse/ClickHouse/pull/19528) ([Azat Khuzhin](https://github.com/azat)). +* Buffer overflow (on memory read) was possible if `addMonth` function was called with specifically crafted arguments. This fixes [#19441](https://github.com/ClickHouse/ClickHouse/issues/19441). This fixes [#19413](https://github.com/ClickHouse/ClickHouse/issues/19413). [#19472](https://github.com/ClickHouse/ClickHouse/pull/19472) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Mark distributed batch as broken in case of empty data block in one of files. [#19449](https://github.com/ClickHouse/ClickHouse/pull/19449) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible buffer overflow in Uber H3 library. See https://github.com/uber/h3/issues/392. This closes [#19219](https://github.com/ClickHouse/ClickHouse/issues/19219). [#19383](https://github.com/ClickHouse/ClickHouse/pull/19383) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix system.parts _state column (LOGICAL_ERROR when querying this column, due to incorrect order). [#19346](https://github.com/ClickHouse/ClickHouse/pull/19346) ([Azat Khuzhin](https://github.com/azat)). +* Fix error `Cannot convert column now64() because it is constant but values of constants are different in source and result`. Continuation of [#7156](https://github.com/ClickHouse/ClickHouse/issues/7156). [#19316](https://github.com/ClickHouse/ClickHouse/pull/19316) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bug when concurrent `ALTER` and `DROP` queries may hang while processing ReplicatedMergeTree table. [#19237](https://github.com/ClickHouse/ClickHouse/pull/19237) ([alesapin](https://github.com/alesapin)). +* Fix infinite reading from file in `ORC` format (was introduced in [#10580](https://github.com/ClickHouse/ClickHouse/issues/10580)). Fixes [#19095](https://github.com/ClickHouse/ClickHouse/issues/19095). [#19134](https://github.com/ClickHouse/ClickHouse/pull/19134) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix startup bug when clickhouse was not able to read compression codec from `LowCardinality(Nullable(...))` and throws exception `Attempt to read after EOF`. Fixes [#18340](https://github.com/ClickHouse/ClickHouse/issues/18340). [#19101](https://github.com/ClickHouse/ClickHouse/pull/19101) ([alesapin](https://github.com/alesapin)). +* Fixed `There is no checkpoint` error when inserting data through http interface using `Template` or `CustomSeparated` format. Fixes [#19021](https://github.com/ClickHouse/ClickHouse/issues/19021). [#19072](https://github.com/ClickHouse/ClickHouse/pull/19072) ([tavplubix](https://github.com/tavplubix)). +* Restrict `MODIFY TTL` queries for `MergeTree` tables created in old syntax. Previously the query succeeded, but actually it had no effect. [#19064](https://github.com/ClickHouse/ClickHouse/pull/19064) ([Anton Popov](https://github.com/CurtizJ)). +* Make sure `groupUniqArray` returns correct type for argument of Enum type. This closes [#17875](https://github.com/ClickHouse/ClickHouse/issues/17875). [#19019](https://github.com/ClickHouse/ClickHouse/pull/19019) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix possible error `Expected single dictionary argument for function` if use function `ignore` with `LowCardinality` argument. Fixes [#14275](https://github.com/ClickHouse/ClickHouse/issues/14275). [#19016](https://github.com/ClickHouse/ClickHouse/pull/19016) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix inserting of `LowCardinality` column to table with `TinyLog` engine. Fixes [#18629](https://github.com/ClickHouse/ClickHouse/issues/18629). [#19010](https://github.com/ClickHouse/ClickHouse/pull/19010) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Disable `optimize_move_functions_out_of_any` because optimization is not always correct. This closes [#18051](https://github.com/ClickHouse/ClickHouse/issues/18051). This closes [#18973](https://github.com/ClickHouse/ClickHouse/issues/18973). [#18981](https://github.com/ClickHouse/ClickHouse/pull/18981) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed very rare deadlock at shutdown. [#18977](https://github.com/ClickHouse/ClickHouse/pull/18977) ([tavplubix](https://github.com/tavplubix)). +* Fix bug when mutation with some escaped text (like `ALTER ... UPDATE e = CAST('foo', 'Enum8(\'foo\' = 1')` serialized incorrectly. Fixes [#18878](https://github.com/ClickHouse/ClickHouse/issues/18878). [#18944](https://github.com/ClickHouse/ClickHouse/pull/18944) ([alesapin](https://github.com/alesapin)). +* Attach partition should reset the mutation. [#18804](https://github.com/ClickHouse/ClickHouse/issues/18804). [#18935](https://github.com/ClickHouse/ClickHouse/pull/18935) ([fastio](https://github.com/fastio)). +* Fix possible hang at shutdown in clickhouse-local. This fixes [#18891](https://github.com/ClickHouse/ClickHouse/issues/18891). [#18893](https://github.com/ClickHouse/ClickHouse/pull/18893) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix *If combinator with unary function and Nullable types. [#18806](https://github.com/ClickHouse/ClickHouse/pull/18806) ([Azat Khuzhin](https://github.com/azat)). +* Asynchronous distributed INSERTs can be rejected by the server if the setting `network_compression_method` is globally set to non-default value. This fixes [#18741](https://github.com/ClickHouse/ClickHouse/issues/18741). [#18776](https://github.com/ClickHouse/ClickHouse/pull/18776) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `Attempt to read after eof` error when trying to `CAST` `NULL` from `Nullable(String)` to `Nullable(Decimal(P, S))`. Now function `CAST` returns `NULL` when it cannot parse decimal from nullable string. Fixes [#7690](https://github.com/ClickHouse/ClickHouse/issues/7690). [#18718](https://github.com/ClickHouse/ClickHouse/pull/18718) ([Winter Zhang](https://github.com/zhang2014)). +* Fix Logger with unmatched arg size. [#18717](https://github.com/ClickHouse/ClickHouse/pull/18717) ([sundyli](https://github.com/sundy-li)). +* Add FixedString Data type support. I'll get this exception "Code: 50, e.displayText() = DB::Exception: Unsupported type FixedString(1)" when replicating data from MySQL to ClickHouse. This patch fixes bug [#18450](https://github.com/ClickHouse/ClickHouse/issues/18450) Also fixes [#6556](https://github.com/ClickHouse/ClickHouse/issues/6556). [#18553](https://github.com/ClickHouse/ClickHouse/pull/18553) ([awesomeleo](https://github.com/awesomeleo)). +* Fix possible `Pipeline stuck` error while using `ORDER BY` after subquery with `RIGHT` or `FULL` join. [#18550](https://github.com/ClickHouse/ClickHouse/pull/18550) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bug which may lead to `ALTER` queries hung after corresponding mutation kill. Found by thread fuzzer. [#18518](https://github.com/ClickHouse/ClickHouse/pull/18518) ([alesapin](https://github.com/alesapin)). +* Disable write with AIO during merges because it can lead to extremely rare data corruption of primary key columns during merge. [#18481](https://github.com/ClickHouse/ClickHouse/pull/18481) ([alesapin](https://github.com/alesapin)). +* Disable constant folding for subqueries on the analysis stage, when the result cannot be calculated. [#18446](https://github.com/ClickHouse/ClickHouse/pull/18446) ([Azat Khuzhin](https://github.com/azat)). +* Fixed `value is too short` error when executing `toType(...)` functions (`toDate`, `toUInt32`, etc) with argument of type `Nullable(String)`. Now such functions return `NULL` on parsing errors instead of throwing exception. Fixes [#7673](https://github.com/ClickHouse/ClickHouse/issues/7673). [#18445](https://github.com/ClickHouse/ClickHouse/pull/18445) ([tavplubix](https://github.com/tavplubix)). +* Restrict merges from wide to compact parts. In case of vertical merge it led to broken result part. [#18381](https://github.com/ClickHouse/ClickHouse/pull/18381) ([Anton Popov](https://github.com/CurtizJ)). +* Fix filling table `system.settings_profile_elements`. This PR fixes [#18231](https://github.com/ClickHouse/ClickHouse/issues/18231). [#18379](https://github.com/ClickHouse/ClickHouse/pull/18379) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix index analysis of binary functions with constant argument which leads to wrong query results. This fixes [#18364](https://github.com/ClickHouse/ClickHouse/issues/18364). [#18373](https://github.com/ClickHouse/ClickHouse/pull/18373) ([Amos Bird](https://github.com/amosbird)). +* Fix possible crashes in aggregate functions with combinator `Distinct`, while using two-level aggregation. Fixes [#17682](https://github.com/ClickHouse/ClickHouse/issues/17682). [#18365](https://github.com/ClickHouse/ClickHouse/pull/18365) ([Anton Popov](https://github.com/CurtizJ)). +* `SELECT count() FROM table` now can be executed if only one any column can be selected from the `table`. This PR fixes [#10639](https://github.com/ClickHouse/ClickHouse/issues/10639). [#18233](https://github.com/ClickHouse/ClickHouse/pull/18233) ([Vitaly Baranov](https://github.com/vitlibar)). +* `SELECT JOIN` now requires the `SELECT` privilege on each of the joined tables. This PR fixes [#17654](https://github.com/ClickHouse/ClickHouse/issues/17654). [#18232](https://github.com/ClickHouse/ClickHouse/pull/18232) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix possible incomplete query result while reading from `MergeTree*` in case of read backoff (message ` MergeTreeReadPool: Will lower number of threads` in logs). Was introduced in [#16423](https://github.com/ClickHouse/ClickHouse/issues/16423). Fixes [#18137](https://github.com/ClickHouse/ClickHouse/issues/18137). [#18216](https://github.com/ClickHouse/ClickHouse/pull/18216) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix error when query `MODIFY COLUMN ... REMOVE TTL` does not actually remove column TTL. [#18130](https://github.com/ClickHouse/ClickHouse/pull/18130) ([alesapin](https://github.com/alesapin)). +* Fix indeterministic functions with predicate optimizer. This fixes [#17244](https://github.com/ClickHouse/ClickHouse/issues/17244). [#17273](https://github.com/ClickHouse/ClickHouse/pull/17273) ([Winter Zhang](https://github.com/zhang2014)). +* Mutation might hang waiting for some non-existent part after `MOVE` or `REPLACE PARTITION` or, in rare cases, after `DETACH` or `DROP PARTITION`. It's fixed. [#15537](https://github.com/ClickHouse/ClickHouse/pull/15537) ([tavplubix](https://github.com/tavplubix)). + +#### Build/Testing/Packaging Improvement + +* Update timezones info to 2020e. [#18531](https://github.com/ClickHouse/ClickHouse/pull/18531) ([alesapin](https://github.com/alesapin)). + + + +### ClickHouse release v20.11.6.6-stable, 2020-12-24 + +#### Bug Fix + +* Fixed issue when `clickhouse-odbc-bridge` process is unreachable by server on machines with dual `IPv4/IPv6 stack` and fixed issue when ODBC dictionary updates are performed using malformed queries and/or cause crashes. This possibly closes [#14489](https://github.com/ClickHouse/ClickHouse/issues/14489). [#18278](https://github.com/ClickHouse/ClickHouse/pull/18278) ([Denis Glazachev](https://github.com/traceon)). +* Fixed key comparison between Enum and Int types. This fixes [#17989](https://github.com/ClickHouse/ClickHouse/issues/17989). [#18214](https://github.com/ClickHouse/ClickHouse/pull/18214) ([Amos Bird](https://github.com/amosbird)). +* Fixed unique key convert crash in `MaterializeMySQL` database engine. This fixes [#18186](https://github.com/ClickHouse/ClickHouse/issues/18186) and fixes [#16372](https://github.com/ClickHouse/ClickHouse/issues/16372) [#18211](https://github.com/ClickHouse/ClickHouse/pull/18211) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed `std::out_of_range: basic_string` in S3 URL parsing. [#18059](https://github.com/ClickHouse/ClickHouse/pull/18059) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fixed the issue when some tables not synchronized to ClickHouse from MySQL caused by the fact that convertion MySQL prefix index wasn't supported for MaterializeMySQL. This fixes [#15187](https://github.com/ClickHouse/ClickHouse/issues/15187) and fixes [#17912](https://github.com/ClickHouse/ClickHouse/issues/17912) [#17944](https://github.com/ClickHouse/ClickHouse/pull/17944) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed the issue when query optimization was producing wrong result if query contains `ARRAY JOIN`. [#17887](https://github.com/ClickHouse/ClickHouse/pull/17887) ([sundyli](https://github.com/sundy-li)). +* Fix possible segfault in `topK` aggregate function. This closes [#17404](https://github.com/ClickHouse/ClickHouse/issues/17404). [#17845](https://github.com/ClickHouse/ClickHouse/pull/17845) ([Maksim Kita](https://github.com/kitaisreal)). +* Do not restore parts from WAL if `in_memory_parts_enable_wal` is disabled. [#17802](https://github.com/ClickHouse/ClickHouse/pull/17802) ([detailyang](https://github.com/detailyang)). +* Fixed problem when ClickHouse fails to resume connection to MySQL servers. [#17681](https://github.com/ClickHouse/ClickHouse/pull/17681) ([Alexander Kazakov](https://github.com/Akazz)). +* Fixed inconsistent behaviour of `optimize_trivial_count_query` with partition predicate. [#17644](https://github.com/ClickHouse/ClickHouse/pull/17644) ([Azat Khuzhin](https://github.com/azat)). +* Fixed empty `system.stack_trace` table when server is running in daemon mode. [#17630](https://github.com/ClickHouse/ClickHouse/pull/17630) ([Amos Bird](https://github.com/amosbird)). +* Fixed the behaviour when xxception `fmt::v7::format_error` can be logged in background for MergeTree tables. This fixes [#17613](https://github.com/ClickHouse/ClickHouse/issues/17613). [#17615](https://github.com/ClickHouse/ClickHouse/pull/17615) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the behaviour when clickhouse-client is used in interactive mode with multiline queries and single line comment was erronously extended till the end of query. This fixes [#13654](https://github.com/ClickHouse/ClickHouse/issues/13654). [#17565](https://github.com/ClickHouse/ClickHouse/pull/17565) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the issue when server can stop accepting connections in very rare cases. [#17542](https://github.com/ClickHouse/ClickHouse/pull/17542) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed alter query hang when the corresponding mutation was killed on the different replica. This fixes [#16953](https://github.com/ClickHouse/ClickHouse/issues/16953). [#17499](https://github.com/ClickHouse/ClickHouse/pull/17499) ([alesapin](https://github.com/alesapin)). +* Fixed bug when mark cache size was underestimated by clickhouse. It may happen when there are a lot of tiny files with marks. [#17496](https://github.com/ClickHouse/ClickHouse/pull/17496) ([alesapin](https://github.com/alesapin)). +* Fixed `ORDER BY` with enabled setting `optimize_redundant_functions_in_order_by`. [#17471](https://github.com/ClickHouse/ClickHouse/pull/17471) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed duplicates after `DISTINCT` which were possible because of incorrect optimization. This fixes [#17294](https://github.com/ClickHouse/ClickHouse/issues/17294). [#17296](https://github.com/ClickHouse/ClickHouse/pull/17296) ([li chengxiang](https://github.com/chengxianglibra)). [#17439](https://github.com/ClickHouse/ClickHouse/pull/17439) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed crash while reading from `JOIN` table with `LowCardinality` types. This fixes [#17228](https://github.com/ClickHouse/ClickHouse/issues/17228). [#17397](https://github.com/ClickHouse/ClickHouse/pull/17397) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed set index invalidation when there are const columns in the subquery. This fixes [#17246](https://github.com/ClickHouse/ClickHouse/issues/17246) . [#17249](https://github.com/ClickHouse/ClickHouse/pull/17249) ([Amos Bird](https://github.com/amosbird)). +* Fixed possible wrong index analysis when the types of the index comparison are different. This fixes [#17122](https://github.com/ClickHouse/ClickHouse/issues/17122). [#17145](https://github.com/ClickHouse/ClickHouse/pull/17145) ([Amos Bird](https://github.com/amosbird)). +* Fixed `ColumnConst` comparison which leads to crash. This fixes [#17088](https://github.com/ClickHouse/ClickHouse/issues/17088) . [#17135](https://github.com/ClickHouse/ClickHouse/pull/17135) ([Amos Bird](https://github.com/amosbird)). +* Fixed bug when `ON CLUSTER` queries may hang forever for non-leader `ReplicatedMergeTreeTables`. [#17089](https://github.com/ClickHouse/ClickHouse/pull/17089) ([alesapin](https://github.com/alesapin)). +* Fixed fuzzer-found bug in funciton `fuzzBits`. This fixes [#16980](https://github.com/ClickHouse/ClickHouse/issues/16980). [#17051](https://github.com/ClickHouse/ClickHouse/pull/17051) ([hexiaoting](https://github.com/hexiaoting)). +* Avoid unnecessary network errors for remote queries which may be cancelled while execution, like queries with `LIMIT`. [#17006](https://github.com/ClickHouse/ClickHouse/pull/17006) ([Azat Khuzhin](https://github.com/azat)). +* Fixed wrong result in big integers (128, 256 bit) when casting from double. [#16986](https://github.com/ClickHouse/ClickHouse/pull/16986) ([Mike](https://github.com/myrrc)). +* Reresolve the IP of the `format_avro_schema_registry_url` in case of errors. [#16985](https://github.com/ClickHouse/ClickHouse/pull/16985) ([filimonov](https://github.com/filimonov)). +* Fixed possible server crash after `ALTER TABLE ... MODIFY COLUMN ... NewType` when `SELECT` have `WHERE` expression on altering column and alter does not finished yet. [#16968](https://github.com/ClickHouse/ClickHouse/pull/16968) ([Amos Bird](https://github.com/amosbird)). +* Blame info was not calculated correctly in `clickhouse-git-import`. [#16959](https://github.com/ClickHouse/ClickHouse/pull/16959) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed order by optimization with monotonous functions. Fixes [#16107](https://github.com/ClickHouse/ClickHouse/issues/16107). [#16956](https://github.com/ClickHouse/ClickHouse/pull/16956) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed optimization of group by with enabled setting `optimize_aggregators_of_group_by_keys` and joins. This fixes [#12604](https://github.com/ClickHouse/ClickHouse/issues/12604). [#16951](https://github.com/ClickHouse/ClickHouse/pull/16951) ([Anton Popov](https://github.com/CurtizJ)). +* Install script should always create subdirs in config folders. This is only relevant for Docker build with custom config. [#16936](https://github.com/ClickHouse/ClickHouse/pull/16936) ([filimonov](https://github.com/filimonov)). +* Fixed possible error `Illegal type of argument` for queries with `ORDER BY`. This fixes [#16580](https://github.com/ClickHouse/ClickHouse/issues/16580). [#16928](https://github.com/ClickHouse/ClickHouse/pull/16928) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Abort multipart upload if no data was written to WriteBufferFromS3. [#16840](https://github.com/ClickHouse/ClickHouse/pull/16840) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fixed crash when using `any` without any arguments. This fixes [#16803](https://github.com/ClickHouse/ClickHouse/issues/16803). [#16826](https://github.com/ClickHouse/ClickHouse/pull/16826) ([Amos Bird](https://github.com/amosbird)). +* Fixed the behaviour when ClickHouse used to always return 0 insted of a number of affected rows for `INSERT` queries via MySQL protocol. This fixes [#16605](https://github.com/ClickHouse/ClickHouse/issues/16605). [#16715](https://github.com/ClickHouse/ClickHouse/pull/16715) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed uncontrolled growth of TDigest. [#16680](https://github.com/ClickHouse/ClickHouse/pull/16680) ([hrissan](https://github.com/hrissan)). +* Fixed remote query failure when using suffix `if` in Aggregate function. This fixes [#16574](https://github.com/ClickHouse/ClickHouse/issues/16574) fixes [#16231](https://github.com/ClickHouse/ClickHouse/issues/16231) [#16610](https://github.com/ClickHouse/ClickHouse/pull/16610) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed inconsistent behavior caused by `select_sequential_consistency` for optimized trivial count query and system.tables. [#16309](https://github.com/ClickHouse/ClickHouse/pull/16309) ([Hao Chen](https://github.com/haoch)). +* Throw error when use ColumnTransformer replace non exist column. [#16183](https://github.com/ClickHouse/ClickHouse/pull/16183) ([hexiaoting](https://github.com/hexiaoting)). + + +### ClickHouse release v20.11.3.3-stable, 2020-11-13 + +#### Bug Fix + +* Fix rare silent crashes when query profiler is on and ClickHouse is installed on OS with glibc version that has (supposedly) broken asynchronous unwind tables for some functions. This fixes [#15301](https://github.com/ClickHouse/ClickHouse/issues/15301). This fixes [#13098](https://github.com/ClickHouse/ClickHouse/issues/13098). [#16846](https://github.com/ClickHouse/ClickHouse/pull/16846) ([alexey-milovidov](https://github.com/alexey-milovidov)). + + +### ClickHouse release v20.11.2.1, 2020-11-11 + +#### Backward Incompatible Change + +* If some `profile` was specified in `distributed_ddl` config section, then this profile could overwrite settings of `default` profile on server startup. It's fixed, now settings of distributed DDL queries should not affect global server settings. [#16635](https://github.com/ClickHouse/ClickHouse/pull/16635) ([tavplubix](https://github.com/tavplubix)). +* Restrict to use of non-comparable data types (like `AggregateFunction`) in keys (Sorting key, Primary key, Partition key, and so on). [#16601](https://github.com/ClickHouse/ClickHouse/pull/16601) ([alesapin](https://github.com/alesapin)). +* Remove `ANALYZE` and `AST` queries, and make the setting `enable_debug_queries` obsolete since now it is the part of full featured `EXPLAIN` query. [#16536](https://github.com/ClickHouse/ClickHouse/pull/16536) ([Ivan](https://github.com/abyss7)). +* Aggregate functions `boundingRatio`, `rankCorr`, `retention`, `timeSeriesGroupSum`, `timeSeriesGroupRateSum`, `windowFunnel` were erroneously made case-insensitive. Now their names are made case sensitive as designed. Only functions that are specified in SQL standard or made for compatibility with other DBMS or functions similar to those should be case-insensitive. [#16407](https://github.com/ClickHouse/ClickHouse/pull/16407) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Make `rankCorr` function return nan on insufficient data [#16124](https://github.com/ClickHouse/ClickHouse/issues/16124). [#16135](https://github.com/ClickHouse/ClickHouse/pull/16135) ([hexiaoting](https://github.com/hexiaoting)). +* When upgrading from versions older than 20.5, if rolling update is performed and cluster contains both versions 20.5 or greater and less than 20.5, if ClickHouse nodes with old versions are restarted and old version has been started up in presence of newer versions, it may lead to `Part ... intersects previous part` errors. To prevent this error, first install newer clickhouse-server packages on all cluster nodes and then do restarts (so, when clickhouse-server is restarted, it will start up with the new version). + +#### New Feature + +* Added support of LDAP as a user directory for locally non-existent users. [#12736](https://github.com/ClickHouse/ClickHouse/pull/12736) ([Denis Glazachev](https://github.com/traceon)). +* Add `system.replicated_fetches` table which shows currently running background fetches. [#16428](https://github.com/ClickHouse/ClickHouse/pull/16428) ([alesapin](https://github.com/alesapin)). +* Added setting `date_time_output_format`. [#15845](https://github.com/ClickHouse/ClickHouse/pull/15845) ([Maksim Kita](https://github.com/kitaisreal)). +* Added minimal web UI to ClickHouse. [#16158](https://github.com/ClickHouse/ClickHouse/pull/16158) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allows to read/write Single protobuf message at once (w/o length-delimiters). [#15199](https://github.com/ClickHouse/ClickHouse/pull/15199) ([filimonov](https://github.com/filimonov)). +* Added initial OpenTelemetry support. ClickHouse now accepts OpenTelemetry traceparent headers over Native and HTTP protocols, and passes them downstream in some cases. The trace spans for executed queries are saved into the `system.opentelemetry_span_log` table. [#14195](https://github.com/ClickHouse/ClickHouse/pull/14195) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Allow specify primary key in column list of `CREATE TABLE` query. This is needed for compatibility with other SQL dialects. [#15823](https://github.com/ClickHouse/ClickHouse/pull/15823) ([Maksim Kita](https://github.com/kitaisreal)). +* Implement `OFFSET offset_row_count {ROW | ROWS} FETCH {FIRST | NEXT} fetch_row_count {ROW | ROWS} {ONLY | WITH TIES}` in SELECT query with ORDER BY. This is the SQL-standard way to specify `LIMIT`. [#15855](https://github.com/ClickHouse/ClickHouse/pull/15855) ([hexiaoting](https://github.com/hexiaoting)). +* `errorCodeToName` function - return variable name of the error (useful for analyzing query_log and similar). `system.errors` table - shows how many times errors has been happened (respects `system_events_show_zero_values`). [#16438](https://github.com/ClickHouse/ClickHouse/pull/16438) ([Azat Khuzhin](https://github.com/azat)). +* Added function `untuple` which is a special function which can introduce new columns to the SELECT list by expanding a named tuple. [#16242](https://github.com/ClickHouse/ClickHouse/pull/16242) ([Nikolai Kochetov](https://github.com/KochetovNicolai), [Amos Bird](https://github.com/amosbird)). +* Now we can provide identifiers via query parameters. And these parameters can be used as table objects or columns. [#16594](https://github.com/ClickHouse/ClickHouse/pull/16594) ([Amos Bird](https://github.com/amosbird)). +* Added big integers (UInt256, Int128, Int256) and UUID data types support for MergeTree BloomFilter index. Big integers is an experimental feature. [#16642](https://github.com/ClickHouse/ClickHouse/pull/16642) ([Maksim Kita](https://github.com/kitaisreal)). +* Add `farmFingerprint64` function (non-cryptographic string hashing). [#16570](https://github.com/ClickHouse/ClickHouse/pull/16570) ([Jacob Hayes](https://github.com/JacobHayes)). +* Add `log_queries_min_query_duration_ms`, only queries slower than the value of this setting will go to `query_log`/`query_thread_log` (i.e. something like `slow_query_log` in mysql). [#16529](https://github.com/ClickHouse/ClickHouse/pull/16529) ([Azat Khuzhin](https://github.com/azat)). +* Ability to create a docker image on the top of `Alpine`. Uses precompiled binary and glibc components from ubuntu 20.04. [#16479](https://github.com/ClickHouse/ClickHouse/pull/16479) ([filimonov](https://github.com/filimonov)). +* Added `toUUIDOrNull`, `toUUIDOrZero` cast functions. [#16337](https://github.com/ClickHouse/ClickHouse/pull/16337) ([Maksim Kita](https://github.com/kitaisreal)). +* Add `max_concurrent_queries_for_all_users` setting, see [#6636](https://github.com/ClickHouse/ClickHouse/issues/6636) for use cases. [#16154](https://github.com/ClickHouse/ClickHouse/pull/16154) ([nvartolomei](https://github.com/nvartolomei)). +* Add a new option `print_query_id` to clickhouse-client. It helps generate arbitrary strings with the current query id generated by the client. Also print query id in clickhouse-client by default. [#15809](https://github.com/ClickHouse/ClickHouse/pull/15809) ([Amos Bird](https://github.com/amosbird)). +* Add `tid` and `logTrace` functions. This closes [#9434](https://github.com/ClickHouse/ClickHouse/issues/9434). [#15803](https://github.com/ClickHouse/ClickHouse/pull/15803) ([flynn](https://github.com/ucasFL)). +* Add function `formatReadableTimeDelta` that format time delta to human readable string ... [#15497](https://github.com/ClickHouse/ClickHouse/pull/15497) ([Filipe Caixeta](https://github.com/filipecaixeta)). +* Added `disable_merges` option for volumes in multi-disk configuration. [#13956](https://github.com/ClickHouse/ClickHouse/pull/13956) ([Vladimir Chebotarev](https://github.com/excitoon)). + +#### Experimental Feature + +* New functions `encrypt`, `aes_encrypt_mysql`, `decrypt`, `aes_decrypt_mysql`. These functions are working slowly, so we consider it as an experimental feature. [#11844](https://github.com/ClickHouse/ClickHouse/pull/11844) ([Vasily Nemkov](https://github.com/Enmk)). + +#### Bug Fix + +* Mask password in data_path in the `system.distribution_queue`. [#16727](https://github.com/ClickHouse/ClickHouse/pull/16727) ([Azat Khuzhin](https://github.com/azat)). +* Fix `IN` operator over several columns and tuples with enabled `transform_null_in` setting. Fixes [#15310](https://github.com/ClickHouse/ClickHouse/issues/15310). [#16722](https://github.com/ClickHouse/ClickHouse/pull/16722) ([Anton Popov](https://github.com/CurtizJ)). +* The setting `max_parallel_replicas` worked incorrectly if the queried table has no sampling. This fixes [#5733](https://github.com/ClickHouse/ClickHouse/issues/5733). [#16675](https://github.com/ClickHouse/ClickHouse/pull/16675) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix optimize_read_in_order/optimize_aggregation_in_order with max_threads > 0 and expression in ORDER BY. [#16637](https://github.com/ClickHouse/ClickHouse/pull/16637) ([Azat Khuzhin](https://github.com/azat)). +* Calculation of `DEFAULT` expressions was involving possible name collisions (that was very unlikely to encounter). This fixes [#9359](https://github.com/ClickHouse/ClickHouse/issues/9359). [#16612](https://github.com/ClickHouse/ClickHouse/pull/16612) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `query_thread_log.query_duration_ms` unit. [#16563](https://github.com/ClickHouse/ClickHouse/pull/16563) ([Azat Khuzhin](https://github.com/azat)). +* Fix a bug when using MySQL Master -> MySQL Slave -> ClickHouse MaterializeMySQL Engine. `MaterializeMySQL` is an experimental feature. [#16504](https://github.com/ClickHouse/ClickHouse/pull/16504) ([TCeason](https://github.com/TCeason)). +* Specifically crafted argument of `round` function with `Decimal` was leading to integer division by zero. This fixes [#13338](https://github.com/ClickHouse/ClickHouse/issues/13338). [#16451](https://github.com/ClickHouse/ClickHouse/pull/16451) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix DROP TABLE for Distributed (racy with INSERT). [#16409](https://github.com/ClickHouse/ClickHouse/pull/16409) ([Azat Khuzhin](https://github.com/azat)). +* Fix processing of very large entries in replication queue. Very large entries may appear in ALTER queries if table structure is extremely large (near 1 MB). This fixes [#16307](https://github.com/ClickHouse/ClickHouse/issues/16307). [#16332](https://github.com/ClickHouse/ClickHouse/pull/16332) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the inconsistent behaviour when a part of return data could be dropped because the set for its filtration wasn't created. [#16308](https://github.com/ClickHouse/ClickHouse/pull/16308) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix dictGet in sharding_key (and similar places, i.e. when the function context is stored permanently). [#16205](https://github.com/ClickHouse/ClickHouse/pull/16205) ([Azat Khuzhin](https://github.com/azat)). +* Fix the exception thrown in `clickhouse-local` when trying to execute `OPTIMIZE` command. Fixes [#16076](https://github.com/ClickHouse/ClickHouse/issues/16076). [#16192](https://github.com/ClickHouse/ClickHouse/pull/16192) ([filimonov](https://github.com/filimonov)). +* Fixes [#15780](https://github.com/ClickHouse/ClickHouse/issues/15780) regression, e.g. `indexOf([1, 2, 3], toLowCardinality(1))` now is prohibited but it should not be. [#16038](https://github.com/ClickHouse/ClickHouse/pull/16038) ([Mike](https://github.com/myrrc)). +* Fix bug with MySQL database. When MySQL server used as database engine is down some queries raise Exception, because they try to get tables from disabled server, while it's unnecessary. For example, query `SELECT ... FROM system.parts` should work only with MergeTree tables and don't touch MySQL database at all. [#16032](https://github.com/ClickHouse/ClickHouse/pull/16032) ([Kruglov Pavel](https://github.com/Avogar)). +* Now exception will be thrown when `ALTER MODIFY COLUMN ... DEFAULT ...` has incompatible default with column type. Fixes [#15854](https://github.com/ClickHouse/ClickHouse/issues/15854). [#15858](https://github.com/ClickHouse/ClickHouse/pull/15858) ([alesapin](https://github.com/alesapin)). +* Fixed IPv4CIDRToRange/IPv6CIDRToRange functions to accept const IP-column values. [#15856](https://github.com/ClickHouse/ClickHouse/pull/15856) ([vladimir-golovchenko](https://github.com/vladimir-golovchenko)). + +#### Improvement + +* Treat `INTERVAL '1 hour'` as equivalent to `INTERVAL 1 HOUR`, to be compatible with Postgres and similar. This fixes [#15637](https://github.com/ClickHouse/ClickHouse/issues/15637). [#15978](https://github.com/ClickHouse/ClickHouse/pull/15978) ([flynn](https://github.com/ucasFL)). +* Enable parsing enum values by their numeric ids for CSV, TSV and JSON input formats. [#15685](https://github.com/ClickHouse/ClickHouse/pull/15685) ([vivarum](https://github.com/vivarum)). +* Better read task scheduling for JBOD architecture and `MergeTree` storage. New setting `read_backoff_min_concurrency` which serves as the lower limit to the number of reading threads. [#16423](https://github.com/ClickHouse/ClickHouse/pull/16423) ([Amos Bird](https://github.com/amosbird)). +* Add missing support for `LowCardinality` in `Avro` format. [#16521](https://github.com/ClickHouse/ClickHouse/pull/16521) ([Mike](https://github.com/myrrc)). +* Workaround for use `S3` with nginx server as proxy. Nginx currenty does not accept urls with empty path like `http://domain.com?delete`, but vanilla aws-sdk-cpp produces this kind of urls. This commit uses patched aws-sdk-cpp version, which makes urls with "/" as path in this cases, like `http://domain.com/?delete`. [#16814](https://github.com/ClickHouse/ClickHouse/pull/16814) ([ianton-ru](https://github.com/ianton-ru)). +* Better diagnostics on parse errors in input data. Provide row number on `Cannot read all data` errors. [#16644](https://github.com/ClickHouse/ClickHouse/pull/16644) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Make the behaviour of `minMap` and `maxMap` more desireable. It will not skip zero values in the result. Fixes [#16087](https://github.com/ClickHouse/ClickHouse/issues/16087). [#16631](https://github.com/ClickHouse/ClickHouse/pull/16631) ([Ildus Kurbangaliev](https://github.com/ildus)). +* Better update of ZooKeeper configuration in runtime. [#16630](https://github.com/ClickHouse/ClickHouse/pull/16630) ([sundyli](https://github.com/sundy-li)). +* Apply SETTINGS clause as early as possible. It allows to modify more settings in the query. This closes [#3178](https://github.com/ClickHouse/ClickHouse/issues/3178). [#16619](https://github.com/ClickHouse/ClickHouse/pull/16619) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now `event_time_microseconds` field stores in Decimal64, not UInt64. [#16617](https://github.com/ClickHouse/ClickHouse/pull/16617) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Now paratmeterized functions can be used in `APPLY` column transformer. [#16589](https://github.com/ClickHouse/ClickHouse/pull/16589) ([Amos Bird](https://github.com/amosbird)). +* Improve scheduling of background task which removes data of dropped tables in `Atomic` databases. `Atomic` databases do not create broken symlink to table data directory if table actually has no data directory. [#16584](https://github.com/ClickHouse/ClickHouse/pull/16584) ([tavplubix](https://github.com/tavplubix)). +* Subqueries in `WITH` section (CTE) can reference previous subqueries in `WITH` section by their name. [#16575](https://github.com/ClickHouse/ClickHouse/pull/16575) ([Amos Bird](https://github.com/amosbird)). +* Add current_database into `system.query_thread_log`. [#16558](https://github.com/ClickHouse/ClickHouse/pull/16558) ([Azat Khuzhin](https://github.com/azat)). +* Allow to fetch parts that are already committed or outdated in the current instance into the detached directory. It's useful when migrating tables from another cluster and having N to 1 shards mapping. It's also consistent with the current fetchPartition implementation. [#16538](https://github.com/ClickHouse/ClickHouse/pull/16538) ([Amos Bird](https://github.com/amosbird)). +* Multiple improvements for `RabbitMQ`: Fixed bug for [#16263](https://github.com/ClickHouse/ClickHouse/issues/16263). Also minimized event loop lifetime. Added more efficient queues setup. [#16426](https://github.com/ClickHouse/ClickHouse/pull/16426) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix debug assertion in `quantileDeterministic` function. In previous version it may also transfer up to two times more data over the network. Although no bug existed. This fixes [#15683](https://github.com/ClickHouse/ClickHouse/issues/15683). [#16410](https://github.com/ClickHouse/ClickHouse/pull/16410) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add `TablesToDropQueueSize` metric. It's equal to number of dropped tables, that are waiting for background data removal. [#16364](https://github.com/ClickHouse/ClickHouse/pull/16364) ([tavplubix](https://github.com/tavplubix)). +* Better diagnostics when client has dropped connection. In previous versions, `Attempt to read after EOF` and `Broken pipe` exceptions were logged in server. In new version, it's information message `Client has dropped the connection, cancel the query.`. [#16329](https://github.com/ClickHouse/ClickHouse/pull/16329) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add total_rows/total_bytes (from system.tables) support for Set/Join table engines. [#16306](https://github.com/ClickHouse/ClickHouse/pull/16306) ([Azat Khuzhin](https://github.com/azat)). +* Now it's possible to specify `PRIMARY KEY` without `ORDER BY` for MergeTree table engines family. Closes [#15591](https://github.com/ClickHouse/ClickHouse/issues/15591). [#16284](https://github.com/ClickHouse/ClickHouse/pull/16284) ([alesapin](https://github.com/alesapin)). +* If there is no tmp folder in the system (chroot, misconfigutation etc) `clickhouse-local` will create temporary subfolder in the current directory. [#16280](https://github.com/ClickHouse/ClickHouse/pull/16280) ([filimonov](https://github.com/filimonov)). +* Add support for nested data types (like named tuple) as sub-types. Fixes [#15587](https://github.com/ClickHouse/ClickHouse/issues/15587). [#16262](https://github.com/ClickHouse/ClickHouse/pull/16262) ([Ivan](https://github.com/abyss7)). +* Support for `database_atomic_wait_for_drop_and_detach_synchronously`/`NO DELAY`/`SYNC` for `DROP DATABASE`. [#16127](https://github.com/ClickHouse/ClickHouse/pull/16127) ([Azat Khuzhin](https://github.com/azat)). +* Add `allow_nondeterministic_optimize_skip_unused_shards` (to allow non deterministic like `rand()` or `dictGet()` in sharding key). [#16105](https://github.com/ClickHouse/ClickHouse/pull/16105) ([Azat Khuzhin](https://github.com/azat)). +* Fix `memory_profiler_step`/`max_untracked_memory` for queries via HTTP (test included). Fix the issue that adjusting this value globally in xml config does not help either, since those settings are not applied anyway, only default (4MB) value is [used](https://github.com/ClickHouse/ClickHouse/blob/17731245336d8c84f75e4c0894c5797ed7732190/src/Common/ThreadStatus.h#L104). Fix `query_id` for the most root ThreadStatus of the http query (by initializing QueryScope after reading query_id). [#16101](https://github.com/ClickHouse/ClickHouse/pull/16101) ([Azat Khuzhin](https://github.com/azat)). +* Now it's allowed to execute `ALTER ... ON CLUSTER` queries regardless of the `` setting in cluster config. [#16075](https://github.com/ClickHouse/ClickHouse/pull/16075) ([alesapin](https://github.com/alesapin)). +* Fix rare issue when `clickhouse-client` may abort on exit due to loading of suggestions. This fixes [#16035](https://github.com/ClickHouse/ClickHouse/issues/16035). [#16047](https://github.com/ClickHouse/ClickHouse/pull/16047) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add support of `cache` layout for `Redis` dictionaries with complex key. [#15985](https://github.com/ClickHouse/ClickHouse/pull/15985) ([Anton Popov](https://github.com/CurtizJ)). +* Fix query hang (endless loop) in case of misconfiguration (`connections_with_failover_max_tries` set to 0). [#15876](https://github.com/ClickHouse/ClickHouse/pull/15876) ([Azat Khuzhin](https://github.com/azat)). +* Change level of some log messages from information to debug, so information messages will not appear for every query. This closes [#5293](https://github.com/ClickHouse/ClickHouse/issues/5293). [#15816](https://github.com/ClickHouse/ClickHouse/pull/15816) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove `MemoryTrackingInBackground*` metrics to avoid potentially misleading results. This fixes [#15684](https://github.com/ClickHouse/ClickHouse/issues/15684). [#15813](https://github.com/ClickHouse/ClickHouse/pull/15813) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add reconnects to `zookeeper-dump-tree` tool. [#15711](https://github.com/ClickHouse/ClickHouse/pull/15711) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow explicitly specify columns list in `CREATE TABLE table AS table_function(...)` query. Fixes [#9249](https://github.com/ClickHouse/ClickHouse/issues/9249) Fixes [#14214](https://github.com/ClickHouse/ClickHouse/issues/14214). [#14295](https://github.com/ClickHouse/ClickHouse/pull/14295) ([tavplubix](https://github.com/tavplubix)). + +#### Performance Improvement + +* Do not merge parts across partitions in SELECT FINAL. [#15938](https://github.com/ClickHouse/ClickHouse/pull/15938) ([Kruglov Pavel](https://github.com/Avogar)). +* Improve performance of `-OrNull` and `-OrDefault` aggregate functions. [#16661](https://github.com/ClickHouse/ClickHouse/pull/16661) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve performance of `quantileMerge`. In previous versions it was obnoxiously slow. This closes [#1463](https://github.com/ClickHouse/ClickHouse/issues/1463). [#16643](https://github.com/ClickHouse/ClickHouse/pull/16643) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve performance of logical functions a little. [#16347](https://github.com/ClickHouse/ClickHouse/pull/16347) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improved performance of merges assignment in MergeTree table engines. Shouldn't be visible for the user. [#16191](https://github.com/ClickHouse/ClickHouse/pull/16191) ([alesapin](https://github.com/alesapin)). +* Speedup hashed/sparse_hashed dictionary loading by preallocating the hash table. [#15454](https://github.com/ClickHouse/ClickHouse/pull/15454) ([Azat Khuzhin](https://github.com/azat)). +* Now trivial count optimization becomes slightly non-trivial. Predicates that contain exact partition expr can be optimized too. This also fixes [#11092](https://github.com/ClickHouse/ClickHouse/issues/11092) which returns wrong count when `max_parallel_replicas > 1`. [#15074](https://github.com/ClickHouse/ClickHouse/pull/15074) ([Amos Bird](https://github.com/amosbird)). + +#### Build/Testing/Packaging Improvement + +* Add flaky check for stateless tests. It will detect potentially flaky functional tests in advance, before they are merged. [#16238](https://github.com/ClickHouse/ClickHouse/pull/16238) ([alesapin](https://github.com/alesapin)). +* Use proper version for `croaring` instead of amalgamation. [#16285](https://github.com/ClickHouse/ClickHouse/pull/16285) ([sundyli](https://github.com/sundy-li)). +* Improve generation of build files for `ya.make` build system (Arcadia). [#16700](https://github.com/ClickHouse/ClickHouse/pull/16700) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add MySQL BinLog file check tool for `MaterializeMySQL` database engine. `MaterializeMySQL` is an experimental feature. [#16223](https://github.com/ClickHouse/ClickHouse/pull/16223) ([Winter Zhang](https://github.com/zhang2014)). +* Check for executable bit on non-executable files. People often accidentially commit executable files from Windows. [#15843](https://github.com/ClickHouse/ClickHouse/pull/15843) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Check for `#pragma once` in headers. [#15818](https://github.com/ClickHouse/ClickHouse/pull/15818) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix illegal code style `&vector[idx]` in libhdfs3. This fixes libcxx debug build. See also https://github.com/ClickHouse-Extras/libhdfs3/pull/8 . [#15815](https://github.com/ClickHouse/ClickHouse/pull/15815) ([Amos Bird](https://github.com/amosbird)). +* Fix build of one miscellaneous example tool on Mac OS. Note that we don't build examples on Mac OS in our CI (we build only ClickHouse binary), so there is zero chance it will not break again. This fixes [#15804](https://github.com/ClickHouse/ClickHouse/issues/15804). [#15808](https://github.com/ClickHouse/ClickHouse/pull/15808) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Simplify Sys/V init script. [#14135](https://github.com/ClickHouse/ClickHouse/pull/14135) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added `boost::program_options` to `db_generator` in order to increase its usability. This closes [#15940](https://github.com/ClickHouse/ClickHouse/issues/15940). [#15973](https://github.com/ClickHouse/ClickHouse/pull/15973) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). + + +## ClickHouse release 20.10 + +### ClickHouse release v20.10.7.4-stable, 2020-12-24 + +#### Bug Fix + +* Fixed issue when `clickhouse-odbc-bridge` process is unreachable by server on machines with dual `IPv4/IPv6` stack and fixed issue when ODBC dictionary updates are performed using malformed queries and/or cause crashes. This possibly closes [#14489](https://github.com/ClickHouse/ClickHouse/issues/14489). [#18278](https://github.com/ClickHouse/ClickHouse/pull/18278) ([Denis Glazachev](https://github.com/traceon)). +* Fix key comparison between Enum and Int types. This fixes [#17989](https://github.com/ClickHouse/ClickHouse/issues/17989). [#18214](https://github.com/ClickHouse/ClickHouse/pull/18214) ([Amos Bird](https://github.com/amosbird)). +* Fixed unique key convert crash in `MaterializeMySQL` database engine. This fixes [#18186](https://github.com/ClickHouse/ClickHouse/issues/18186) and fixes [#16372](https://github.com/ClickHouse/ClickHouse/issues/16372) [#18211](https://github.com/ClickHouse/ClickHouse/pull/18211) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed `std::out_of_range: basic_string` in S3 URL parsing. [#18059](https://github.com/ClickHouse/ClickHouse/pull/18059) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fixed the issue when some tables not synchronized to ClickHouse from MySQL caused by the fact that convertion MySQL prefix index wasn't supported for MaterializeMySQL. This fixes [#15187](https://github.com/ClickHouse/ClickHouse/issues/15187) and fixes [#17912](https://github.com/ClickHouse/ClickHouse/issues/17912) [#17944](https://github.com/ClickHouse/ClickHouse/pull/17944) ([Winter Zhang](https://github.com/zhang2014)). +* Fix possible segfault in `topK` aggregate function. This closes [#17404](https://github.com/ClickHouse/ClickHouse/issues/17404). [#17845](https://github.com/ClickHouse/ClickHouse/pull/17845) ([Maksim Kita](https://github.com/kitaisreal)). +* Do not restore parts from `WAL` if `in_memory_parts_enable_wal` is disabled. [#17802](https://github.com/ClickHouse/ClickHouse/pull/17802) ([detailyang](https://github.com/detailyang)). +* Fixed problem when ClickHouse fails to resume connection to MySQL servers. [#17681](https://github.com/ClickHouse/ClickHouse/pull/17681) ([Alexander Kazakov](https://github.com/Akazz)). +* Fixed empty `system.stack_trace` table when server is running in daemon mode. [#17630](https://github.com/ClickHouse/ClickHouse/pull/17630) ([Amos Bird](https://github.com/amosbird)). +* Fixed the behaviour when `clickhouse-client` is used in interactive mode with multiline queries and single line comment was erronously extended till the end of query. This fixes [#13654](https://github.com/ClickHouse/ClickHouse/issues/13654). [#17565](https://github.com/ClickHouse/ClickHouse/pull/17565) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the issue when server can stop accepting connections in very rare cases. [#17542](https://github.com/ClickHouse/ClickHouse/pull/17542) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `ALTER` query hang when the corresponding mutation was killed on the different replica. This fixes [#16953](https://github.com/ClickHouse/ClickHouse/issues/16953). [#17499](https://github.com/ClickHouse/ClickHouse/pull/17499) ([alesapin](https://github.com/alesapin)). +* Fixed bug when mark cache size was underestimated by clickhouse. It may happen when there are a lot of tiny files with marks. [#17496](https://github.com/ClickHouse/ClickHouse/pull/17496) ([alesapin](https://github.com/alesapin)). +* Fixed `ORDER BY` with enabled setting `optimize_redundant_functions_in_order_by`. [#17471](https://github.com/ClickHouse/ClickHouse/pull/17471) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed duplicates after `DISTINCT` which were possible because of incorrect optimization. Fixes [#17294](https://github.com/ClickHouse/ClickHouse/issues/17294). [#17296](https://github.com/ClickHouse/ClickHouse/pull/17296) ([li chengxiang](https://github.com/chengxianglibra)). [#17439](https://github.com/ClickHouse/ClickHouse/pull/17439) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed crash while reading from `JOIN` table with `LowCardinality` types. This fixes [#17228](https://github.com/ClickHouse/ClickHouse/issues/17228). [#17397](https://github.com/ClickHouse/ClickHouse/pull/17397) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed set index invalidation when there are const columns in the subquery. This fixes [#17246](https://github.com/ClickHouse/ClickHouse/issues/17246) . [#17249](https://github.com/ClickHouse/ClickHouse/pull/17249) ([Amos Bird](https://github.com/amosbird)). +* Fixed `ColumnConst` comparison which leads to crash. This fixed [#17088](https://github.com/ClickHouse/ClickHouse/issues/17088) . [#17135](https://github.com/ClickHouse/ClickHouse/pull/17135) ([Amos Bird](https://github.com/amosbird)). +* Fixed bug when `ON CLUSTER` queries may hang forever for non-leader `ReplicatedMergeTreeTables`. [#17089](https://github.com/ClickHouse/ClickHouse/pull/17089) ([alesapin](https://github.com/alesapin)). +* Fixed fuzzer-found bug in function `fuzzBits`. This fixes [#16980](https://github.com/ClickHouse/ClickHouse/issues/16980). [#17051](https://github.com/ClickHouse/ClickHouse/pull/17051) ([hexiaoting](https://github.com/hexiaoting)). +* Avoid unnecessary network errors for remote queries which may be cancelled while execution, like queries with `LIMIT`. [#17006](https://github.com/ClickHouse/ClickHouse/pull/17006) ([Azat Khuzhin](https://github.com/azat)). +* Fixed wrong result in big integers (128, 256 bit) when casting from double. [#16986](https://github.com/ClickHouse/ClickHouse/pull/16986) ([Mike](https://github.com/myrrc)). +* Reresolve the IP of the `format_avro_schema_registry_url` in case of errors. [#16985](https://github.com/ClickHouse/ClickHouse/pull/16985) ([filimonov](https://github.com/filimonov)). +* Fixed possible server crash after `ALTER TABLE ... MODIFY COLUMN ... NewType` when `SELECT` have `WHERE` expression on altering column and alter does not finished yet. [#16968](https://github.com/ClickHouse/ClickHouse/pull/16968) ([Amos Bird](https://github.com/amosbird)). +* Blame info was not calculated correctly in `clickhouse-git-import`. [#16959](https://github.com/ClickHouse/ClickHouse/pull/16959) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed order by optimization with monotonous functions. This fixes [#16107](https://github.com/ClickHouse/ClickHouse/issues/16107). [#16956](https://github.com/ClickHouse/ClickHouse/pull/16956) ([Anton Popov](https://github.com/CurtizJ)). +* Fixrf optimization of group by with enabled setting `optimize_aggregators_of_group_by_keys` and joins. This fixes [#12604](https://github.com/ClickHouse/ClickHouse/issues/12604). [#16951](https://github.com/ClickHouse/ClickHouse/pull/16951) ([Anton Popov](https://github.com/CurtizJ)). +* Install script should always create subdirs in config folders. This is only relevant for Docker build with custom config. [#16936](https://github.com/ClickHouse/ClickHouse/pull/16936) ([filimonov](https://github.com/filimonov)). +* Fixrf possible error `Illegal type of argument` for queries with `ORDER BY`. This fixes [#16580](https://github.com/ClickHouse/ClickHouse/issues/16580). [#16928](https://github.com/ClickHouse/ClickHouse/pull/16928) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Abort multipart upload if no data was written to `WriteBufferFromS3`. [#16840](https://github.com/ClickHouse/ClickHouse/pull/16840) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fixed crash when using `any` without any arguments. This fixes [#16803](https://github.com/ClickHouse/ClickHouse/issues/16803). [#16826](https://github.com/ClickHouse/ClickHouse/pull/16826) ([Amos Bird](https://github.com/amosbird)). +* Fixed the behaviour when ClickHouse used to always return 0 insted of a number of affected rows for `INSERT` queries via MySQL protocol. This fixes [#16605](https://github.com/ClickHouse/ClickHouse/issues/16605). [#16715](https://github.com/ClickHouse/ClickHouse/pull/16715) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed uncontrolled growth of `TDigest`. [#16680](https://github.com/ClickHouse/ClickHouse/pull/16680) ([hrissan](https://github.com/hrissan)). +* Fixed remote query failure when using suffix `if` in Aggregate function. This fixes [#16574](https://github.com/ClickHouse/ClickHouse/issues/16574) fixes [#16231](https://github.com/ClickHouse/ClickHouse/issues/16231) [#16610](https://github.com/ClickHouse/ClickHouse/pull/16610) ([Winter Zhang](https://github.com/zhang2014)). + + +### ClickHouse release v20.10.4.1-stable, 2020-11-13 + +#### Bug Fix + +* Fix rare silent crashes when query profiler is on and ClickHouse is installed on OS with glibc version that has (supposedly) broken asynchronous unwind tables for some functions. This fixes [#15301](https://github.com/ClickHouse/ClickHouse/issues/15301). This fixes [#13098](https://github.com/ClickHouse/ClickHouse/issues/13098). [#16846](https://github.com/ClickHouse/ClickHouse/pull/16846) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `IN` operator over several columns and tuples with enabled `transform_null_in` setting. Fixes [#15310](https://github.com/ClickHouse/ClickHouse/issues/15310). [#16722](https://github.com/ClickHouse/ClickHouse/pull/16722) ([Anton Popov](https://github.com/CurtizJ)). +* This will fix optimize_read_in_order/optimize_aggregation_in_order with max_threads>0 and expression in ORDER BY. [#16637](https://github.com/ClickHouse/ClickHouse/pull/16637) ([Azat Khuzhin](https://github.com/azat)). +* Now when parsing AVRO from input the LowCardinality is removed from type. Fixes [#16188](https://github.com/ClickHouse/ClickHouse/issues/16188). [#16521](https://github.com/ClickHouse/ClickHouse/pull/16521) ([Mike](https://github.com/myrrc)). +* Fix rapid growth of metadata when using MySQL Master -> MySQL Slave -> ClickHouse MaterializeMySQL Engine, and `slave_parallel_worker` enabled on MySQL Slave, by properly shrinking GTID sets. This fixes [#15951](https://github.com/ClickHouse/ClickHouse/issues/15951). [#16504](https://github.com/ClickHouse/ClickHouse/pull/16504) ([TCeason](https://github.com/TCeason)). +* Fix DROP TABLE for Distributed (racy with INSERT). [#16409](https://github.com/ClickHouse/ClickHouse/pull/16409) ([Azat Khuzhin](https://github.com/azat)). +* Fix processing of very large entries in replication queue. Very large entries may appear in ALTER queries if table structure is extremely large (near 1 MB). This fixes [#16307](https://github.com/ClickHouse/ClickHouse/issues/16307). [#16332](https://github.com/ClickHouse/ClickHouse/pull/16332) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix bug with MySQL database. When MySQL server used as database engine is down some queries raise Exception, because they try to get tables from disabled server, while it's unnecessary. For example, query `SELECT ... FROM system.parts` should work only with MergeTree tables and don't touch MySQL database at all. [#16032](https://github.com/ClickHouse/ClickHouse/pull/16032) ([Kruglov Pavel](https://github.com/Avogar)). + +#### Improvement + +* Workaround for use S3 with nginx server as proxy. Nginx currenty does not accept urls with empty path like http://domain.com?delete, but vanilla aws-sdk-cpp produces this kind of urls. This commit uses patched aws-sdk-cpp version, which makes urls with "/" as path in this cases, like http://domain.com/?delete. [#16813](https://github.com/ClickHouse/ClickHouse/pull/16813) ([ianton-ru](https://github.com/ianton-ru)). + + +### ClickHouse release v20.10.3.30, 2020-10-28 + +#### Backward Incompatible Change + +* Make `multiple_joins_rewriter_version` obsolete. Remove first version of joins rewriter. [#15472](https://github.com/ClickHouse/ClickHouse/pull/15472) ([Artem Zuikov](https://github.com/4ertus2)). +* Change default value of `format_regexp_escaping_rule` setting (it's related to `Regexp` format) to `Raw` (it means - read whole subpattern as a value) to make the behaviour more like to what users expect. [#15426](https://github.com/ClickHouse/ClickHouse/pull/15426) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add support for nested multiline comments `/* comment /* comment */ */` in SQL. This conforms to the SQL standard. [#14655](https://github.com/ClickHouse/ClickHouse/pull/14655) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added MergeTree settings (`max_replicated_merges_with_ttl_in_queue` and `max_number_of_merges_with_ttl_in_pool`) to control the number of merges with TTL in the background pool and replicated queue. This change breaks compatibility with older versions only if you use delete TTL. Otherwise, replication will stay compatible. You can avoid incompatibility issues if you update all shard replicas at once or execute `SYSTEM STOP TTL MERGES` until you finish the update of all replicas. If you'll get an incompatible entry in the replication queue, first of all, execute `SYSTEM STOP TTL MERGES` and after `ALTER TABLE ... DETACH PARTITION ...` the partition where incompatible TTL merge was assigned. Attach it back on a single replica. [#14490](https://github.com/ClickHouse/ClickHouse/pull/14490) ([alesapin](https://github.com/alesapin)). +* When upgrading from versions older than 20.5, if rolling update is performed and cluster contains both versions 20.5 or greater and less than 20.5, if ClickHouse nodes with old versions are restarted and old version has been started up in presence of newer versions, it may lead to `Part ... intersects previous part` errors. To prevent this error, first install newer clickhouse-server packages on all cluster nodes and then do restarts (so, when clickhouse-server is restarted, it will start up with the new version). + +#### New Feature + +* Background data recompression. Add the ability to specify `TTL ... RECOMPRESS codec_name` for MergeTree table engines family. [#14494](https://github.com/ClickHouse/ClickHouse/pull/14494) ([alesapin](https://github.com/alesapin)). +* Add parallel quorum inserts. This closes [#15601](https://github.com/ClickHouse/ClickHouse/issues/15601). [#15601](https://github.com/ClickHouse/ClickHouse/pull/15601) ([Latysheva Alexandra](https://github.com/alexelex)). +* Settings for additional enforcement of data durability. Useful for non-replicated setups. [#11948](https://github.com/ClickHouse/ClickHouse/pull/11948) ([Anton Popov](https://github.com/CurtizJ)). +* When duplicate block is written to replica where it does not exist locally (has not been fetched from replicas), don't ignore it and write locally to achieve the same effect as if it was successfully replicated. [#11684](https://github.com/ClickHouse/ClickHouse/pull/11684) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now we support `WITH AS (subquery) ... ` to introduce named subqueries in the query context. This closes [#2416](https://github.com/ClickHouse/ClickHouse/issues/2416). This closes [#4967](https://github.com/ClickHouse/ClickHouse/issues/4967). [#14771](https://github.com/ClickHouse/ClickHouse/pull/14771) ([Amos Bird](https://github.com/amosbird)). +* Introduce `enable_global_with_statement` setting which propagates the first select's `WITH` statements to other select queries at the same level, and makes aliases in `WITH` statements visible to subqueries. [#15451](https://github.com/ClickHouse/ClickHouse/pull/15451) ([Amos Bird](https://github.com/amosbird)). +* Secure inter-cluster query execution (with initial_user as current query user). [#13156](https://github.com/ClickHouse/ClickHouse/pull/13156) ([Azat Khuzhin](https://github.com/azat)). [#15551](https://github.com/ClickHouse/ClickHouse/pull/15551) ([Azat Khuzhin](https://github.com/azat)). +* Add the ability to remove column properties and table TTLs. Introduced queries `ALTER TABLE MODIFY COLUMN col_name REMOVE what_to_remove` and `ALTER TABLE REMOVE TTL`. Both operations are lightweight and executed at the metadata level. [#14742](https://github.com/ClickHouse/ClickHouse/pull/14742) ([alesapin](https://github.com/alesapin)). +* Added format `RawBLOB`. It is intended for input or output a single value without any escaping and delimiters. This closes [#15349](https://github.com/ClickHouse/ClickHouse/issues/15349). [#15364](https://github.com/ClickHouse/ClickHouse/pull/15364) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add the `reinterpretAsUUID` function that allows to convert a big-endian byte string to UUID. [#15480](https://github.com/ClickHouse/ClickHouse/pull/15480) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Implement `force_data_skipping_indices` setting. [#15642](https://github.com/ClickHouse/ClickHouse/pull/15642) ([Azat Khuzhin](https://github.com/azat)). +* Add a setting `output_format_pretty_row_numbers` to numerate the result in Pretty formats. This closes [#15350](https://github.com/ClickHouse/ClickHouse/issues/15350). [#15443](https://github.com/ClickHouse/ClickHouse/pull/15443) ([flynn](https://github.com/ucasFL)). +* Added query obfuscation tool. It allows to share more queries for better testing. This closes [#15268](https://github.com/ClickHouse/ClickHouse/issues/15268). [#15321](https://github.com/ClickHouse/ClickHouse/pull/15321) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add table function `null('structure')`. [#14797](https://github.com/ClickHouse/ClickHouse/pull/14797) ([vxider](https://github.com/Vxider)). +* Added `formatReadableQuantity` function. It is useful for reading big numbers by human. [#14725](https://github.com/ClickHouse/ClickHouse/pull/14725) ([Artem Hnilov](https://github.com/BooBSD)). +* Add format `LineAsString` that accepts a sequence of lines separated by newlines, every line is parsed as a whole as a single String field. [#14703](https://github.com/ClickHouse/ClickHouse/pull/14703) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)), [#13846](https://github.com/ClickHouse/ClickHouse/pull/13846) ([hexiaoting](https://github.com/hexiaoting)). +* Add `JSONStrings` format which output data in arrays of strings. [#14333](https://github.com/ClickHouse/ClickHouse/pull/14333) ([hcz](https://github.com/hczhcz)). +* Add support for "Raw" column format for `Regexp` format. It allows to simply extract subpatterns as a whole without any escaping rules. [#15363](https://github.com/ClickHouse/ClickHouse/pull/15363) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow configurable `NULL` representation for `TSV` output format. It is controlled by the setting `output_format_tsv_null_representation` which is `\N` by default. This closes [#9375](https://github.com/ClickHouse/ClickHouse/issues/9375). Note that the setting only controls output format and `\N` is the only supported `NULL` representation for `TSV` input format. [#14586](https://github.com/ClickHouse/ClickHouse/pull/14586) ([Kruglov Pavel](https://github.com/Avogar)). +* Support Decimal data type for `MaterializeMySQL`. `MaterializeMySQL` is an experimental feature. [#14535](https://github.com/ClickHouse/ClickHouse/pull/14535) ([Winter Zhang](https://github.com/zhang2014)). +* Add new feature: `SHOW DATABASES LIKE 'xxx'`. [#14521](https://github.com/ClickHouse/ClickHouse/pull/14521) ([hexiaoting](https://github.com/hexiaoting)). +* Added a script to import (arbitrary) git repository to ClickHouse as a sample dataset. [#14471](https://github.com/ClickHouse/ClickHouse/pull/14471) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now insert statements can have asterisk (or variants) with column transformers in the column list. [#14453](https://github.com/ClickHouse/ClickHouse/pull/14453) ([Amos Bird](https://github.com/amosbird)). +* New query complexity limit settings `max_rows_to_read_leaf`, `max_bytes_to_read_leaf` for distributed queries to limit max rows/bytes read on the leaf nodes. Limit is applied for local reads only, *excluding* the final merge stage on the root node. [#14221](https://github.com/ClickHouse/ClickHouse/pull/14221) ([Roman Khavronenko](https://github.com/hagen1778)). +* Allow user to specify settings for `ReplicatedMergeTree*` storage in `` section of config file. It works similarly to `` section. For `ReplicatedMergeTree*` storages settings from `` and `` are applied together, but settings from `` has higher priority. Added `system.replicated_merge_tree_settings` table. [#13573](https://github.com/ClickHouse/ClickHouse/pull/13573) ([Amos Bird](https://github.com/amosbird)). +* Add `mapPopulateSeries` function. [#13166](https://github.com/ClickHouse/ClickHouse/pull/13166) ([Ildus Kurbangaliev](https://github.com/ildus)). +* Supporting MySQL types: `decimal` (as ClickHouse `Decimal`) and `datetime` with sub-second precision (as `DateTime64`). [#11512](https://github.com/ClickHouse/ClickHouse/pull/11512) ([Vasily Nemkov](https://github.com/Enmk)). +* Introduce `event_time_microseconds` field to `system.text_log`, `system.trace_log`, `system.query_log` and `system.query_thread_log` tables. [#14760](https://github.com/ClickHouse/ClickHouse/pull/14760) ([Bharat Nallan](https://github.com/bharatnc)). +* Add `event_time_microseconds` to `system.asynchronous_metric_log` & `system.metric_log` tables. [#14514](https://github.com/ClickHouse/ClickHouse/pull/14514) ([Bharat Nallan](https://github.com/bharatnc)). +* Add `query_start_time_microseconds` field to `system.query_log` & `system.query_thread_log` tables. [#14252](https://github.com/ClickHouse/ClickHouse/pull/14252) ([Bharat Nallan](https://github.com/bharatnc)). + +#### Bug Fix + +* Fix the case when memory can be overallocated regardless to the limit. This closes [#14560](https://github.com/ClickHouse/ClickHouse/issues/14560). [#16206](https://github.com/ClickHouse/ClickHouse/pull/16206) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `executable` dictionary source hang. In previous versions, when using some formats (e.g. `JSONEachRow`) data was not feed to a child process before it outputs at least something. This closes [#1697](https://github.com/ClickHouse/ClickHouse/issues/1697). This closes [#2455](https://github.com/ClickHouse/ClickHouse/issues/2455). [#14525](https://github.com/ClickHouse/ClickHouse/pull/14525) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix double free in case of exception in function `dictGet`. It could have happened if dictionary was loaded with error. [#16429](https://github.com/ClickHouse/ClickHouse/pull/16429) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix group by with totals/rollup/cube modifers and min/max functions over group by keys. Fixes [#16393](https://github.com/ClickHouse/ClickHouse/issues/16393). [#16397](https://github.com/ClickHouse/ClickHouse/pull/16397) ([Anton Popov](https://github.com/CurtizJ)). +* Fix async Distributed INSERT with prefer_localhost_replica=0 and internal_replication. [#16358](https://github.com/ClickHouse/ClickHouse/pull/16358) ([Azat Khuzhin](https://github.com/azat)). +* Fix a very wrong code in TwoLevelStringHashTable implementation, which might lead to memory leak. [#16264](https://github.com/ClickHouse/ClickHouse/pull/16264) ([Amos Bird](https://github.com/amosbird)). +* Fix segfault in some cases of wrong aggregation in lambdas. [#16082](https://github.com/ClickHouse/ClickHouse/pull/16082) ([Anton Popov](https://github.com/CurtizJ)). +* Fix `ALTER MODIFY ... ORDER BY` query hang for `ReplicatedVersionedCollapsingMergeTree`. This fixes [#15980](https://github.com/ClickHouse/ClickHouse/issues/15980). [#16011](https://github.com/ClickHouse/ClickHouse/pull/16011) ([alesapin](https://github.com/alesapin)). +* `MaterializeMySQL` (experimental feature): Fix collate name & charset name parser and support `length = 0` for string type. [#16008](https://github.com/ClickHouse/ClickHouse/pull/16008) ([Winter Zhang](https://github.com/zhang2014)). +* Allow to use `direct` layout for dictionaries with complex keys. [#16007](https://github.com/ClickHouse/ClickHouse/pull/16007) ([Anton Popov](https://github.com/CurtizJ)). +* Prevent replica hang for 5-10 mins when replication error happens after a period of inactivity. [#15987](https://github.com/ClickHouse/ClickHouse/pull/15987) ([filimonov](https://github.com/filimonov)). +* Fix rare segfaults when inserting into or selecting from MaterializedView and concurrently dropping target table (for Atomic database engine). [#15984](https://github.com/ClickHouse/ClickHouse/pull/15984) ([tavplubix](https://github.com/tavplubix)). +* Fix ambiguity in parsing of settings profiles: `CREATE USER ... SETTINGS profile readonly` is now considered as using a profile named `readonly`, not a setting named `profile` with the readonly constraint. This fixes [#15628](https://github.com/ClickHouse/ClickHouse/issues/15628). [#15982](https://github.com/ClickHouse/ClickHouse/pull/15982) ([Vitaly Baranov](https://github.com/vitlibar)). +* `MaterializeMySQL` (experimental feature): Fix crash on create database failure. [#15954](https://github.com/ClickHouse/ClickHouse/pull/15954) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed `DROP TABLE IF EXISTS` failure with `Table ... does not exist` error when table is concurrently renamed (for Atomic database engine). Fixed rare deadlock when concurrently executing some DDL queries with multiple tables (like `DROP DATABASE` and `RENAME TABLE`) - Fixed `DROP/DETACH DATABASE` failure with `Table ... does not exist` when concurrently executing `DROP/DETACH TABLE`. [#15934](https://github.com/ClickHouse/ClickHouse/pull/15934) ([tavplubix](https://github.com/tavplubix)). +* Fix incorrect empty result for query from `Distributed` table if query has `WHERE`, `PREWHERE` and `GLOBAL IN`. Fixes [#15792](https://github.com/ClickHouse/ClickHouse/issues/15792). [#15933](https://github.com/ClickHouse/ClickHouse/pull/15933) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixes [#12513](https://github.com/ClickHouse/ClickHouse/issues/12513): difference expressions with same alias when query is reanalyzed. [#15886](https://github.com/ClickHouse/ClickHouse/pull/15886) ([Winter Zhang](https://github.com/zhang2014)). +* Fix possible very rare deadlocks in RBAC implementation. [#15875](https://github.com/ClickHouse/ClickHouse/pull/15875) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix exception `Block structure mismatch` in `SELECT ... ORDER BY DESC` queries which were executed after `ALTER MODIFY COLUMN` query. Fixes [#15800](https://github.com/ClickHouse/ClickHouse/issues/15800). [#15852](https://github.com/ClickHouse/ClickHouse/pull/15852) ([alesapin](https://github.com/alesapin)). +* `MaterializeMySQL` (experimental feature): Fix `select count()` inaccuracy. [#15767](https://github.com/ClickHouse/ClickHouse/pull/15767) ([tavplubix](https://github.com/tavplubix)). +* Fix some cases of queries, in which only virtual columns are selected. Previously `Not found column _nothing in block` exception may be thrown. Fixes [#12298](https://github.com/ClickHouse/ClickHouse/issues/12298). [#15756](https://github.com/ClickHouse/ClickHouse/pull/15756) ([Anton Popov](https://github.com/CurtizJ)). +* Fix drop of materialized view with inner table in Atomic database (hangs all subsequent DROP TABLE due to hang of the worker thread, due to recursive DROP TABLE for inner table of MV). [#15743](https://github.com/ClickHouse/ClickHouse/pull/15743) ([Azat Khuzhin](https://github.com/azat)). +* Possibility to move part to another disk/volume if the first attempt was failed. [#15723](https://github.com/ClickHouse/ClickHouse/pull/15723) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fix error `Cannot find column` which may happen at insertion into `MATERIALIZED VIEW` in case if query for `MV` containes `ARRAY JOIN`. [#15717](https://github.com/ClickHouse/ClickHouse/pull/15717) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed too low default value of `max_replicated_logs_to_keep` setting, which might cause replicas to become lost too often. Improve lost replica recovery process by choosing the most up-to-date replica to clone. Also do not remove old parts from lost replica, detach them instead. [#15701](https://github.com/ClickHouse/ClickHouse/pull/15701) ([tavplubix](https://github.com/tavplubix)). +* Fix rare race condition in dictionaries and tables from MySQL. [#15686](https://github.com/ClickHouse/ClickHouse/pull/15686) ([alesapin](https://github.com/alesapin)). +* Fix (benign) race condition in AMQP-CPP. [#15667](https://github.com/ClickHouse/ClickHouse/pull/15667) ([alesapin](https://github.com/alesapin)). +* Fix error `Cannot add simple transform to empty Pipe` which happened while reading from `Buffer` table which has different structure than destination table. It was possible if destination table returned empty result for query. Fixes [#15529](https://github.com/ClickHouse/ClickHouse/issues/15529). [#15662](https://github.com/ClickHouse/ClickHouse/pull/15662) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Proper error handling during insert into MergeTree with S3. MergeTree over S3 is an experimental feature. [#15657](https://github.com/ClickHouse/ClickHouse/pull/15657) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fixed bug with S3 table function: region from URL was not applied to S3 client configuration. [#15646](https://github.com/ClickHouse/ClickHouse/pull/15646) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fix the order of destruction for resources in `ReadFromStorage` step of query plan. It might cause crashes in rare cases. Possibly connected with [#15610](https://github.com/ClickHouse/ClickHouse/issues/15610). [#15645](https://github.com/ClickHouse/ClickHouse/pull/15645) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Subtract `ReadonlyReplica` metric when detach readonly tables. [#15592](https://github.com/ClickHouse/ClickHouse/pull/15592) ([sundyli](https://github.com/sundy-li)). +* Fixed `Element ... is not a constant expression` error when using `JSON*` function result in `VALUES`, `LIMIT` or right side of `IN` operator. [#15589](https://github.com/ClickHouse/ClickHouse/pull/15589) ([tavplubix](https://github.com/tavplubix)). +* Query will finish faster in case of exception. Cancel execution on remote replicas if exception happens. [#15578](https://github.com/ClickHouse/ClickHouse/pull/15578) ([Azat Khuzhin](https://github.com/azat)). +* Prevent the possibility of error message `Could not calculate available disk space (statvfs), errno: 4, strerror: Interrupted system call`. This fixes [#15541](https://github.com/ClickHouse/ClickHouse/issues/15541). [#15557](https://github.com/ClickHouse/ClickHouse/pull/15557) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `Database does not exist.` in queries with IN and Distributed table when there's no database on initiator. [#15538](https://github.com/ClickHouse/ClickHouse/pull/15538) ([Artem Zuikov](https://github.com/4ertus2)). +* Mutation might hang waiting for some non-existent part after `MOVE` or `REPLACE PARTITION` or, in rare cases, after `DETACH` or `DROP PARTITION`. It's fixed. [#15537](https://github.com/ClickHouse/ClickHouse/pull/15537) ([tavplubix](https://github.com/tavplubix)). +* Fix bug when `ILIKE` operator stops being case insensitive if `LIKE` with the same pattern was executed. [#15536](https://github.com/ClickHouse/ClickHouse/pull/15536) ([alesapin](https://github.com/alesapin)). +* Fix `Missing columns` errors when selecting columns which absent in data, but depend on other columns which also absent in data. Fixes [#15530](https://github.com/ClickHouse/ClickHouse/issues/15530). [#15532](https://github.com/ClickHouse/ClickHouse/pull/15532) ([alesapin](https://github.com/alesapin)). +* Throw an error when a single parameter is passed to ReplicatedMergeTree instead of ignoring it. [#15516](https://github.com/ClickHouse/ClickHouse/pull/15516) ([nvartolomei](https://github.com/nvartolomei)). +* Fix bug with event subscription in DDLWorker which rarely may lead to query hangs in `ON CLUSTER`. Introduced in [#13450](https://github.com/ClickHouse/ClickHouse/issues/13450). [#15477](https://github.com/ClickHouse/ClickHouse/pull/15477) ([alesapin](https://github.com/alesapin)). +* Report proper error when the second argument of `boundingRatio` aggregate function has a wrong type. [#15407](https://github.com/ClickHouse/ClickHouse/pull/15407) ([detailyang](https://github.com/detailyang)). +* Fixes [#15365](https://github.com/ClickHouse/ClickHouse/issues/15365): attach a database with MySQL engine throws exception (no query context). [#15384](https://github.com/ClickHouse/ClickHouse/pull/15384) ([Winter Zhang](https://github.com/zhang2014)). +* Fix the case of multiple occurrences of column transformers in a select query. [#15378](https://github.com/ClickHouse/ClickHouse/pull/15378) ([Amos Bird](https://github.com/amosbird)). +* Fixed compression in `S3` storage. [#15376](https://github.com/ClickHouse/ClickHouse/pull/15376) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fix bug where queries like `SELECT toStartOfDay(today())` fail complaining about empty time_zone argument. [#15319](https://github.com/ClickHouse/ClickHouse/pull/15319) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix race condition during MergeTree table rename and background cleanup. [#15304](https://github.com/ClickHouse/ClickHouse/pull/15304) ([alesapin](https://github.com/alesapin)). +* Fix rare race condition on server startup when system logs are enabled. [#15300](https://github.com/ClickHouse/ClickHouse/pull/15300) ([alesapin](https://github.com/alesapin)). +* Fix hang of queries with a lot of subqueries to same table of `MySQL` engine. Previously, if there were more than 16 subqueries to same `MySQL` table in query, it hang forever. [#15299](https://github.com/ClickHouse/ClickHouse/pull/15299) ([Anton Popov](https://github.com/CurtizJ)). +* Fix MSan report in QueryLog. Uninitialized memory can be used for the field `memory_usage`. [#15258](https://github.com/ClickHouse/ClickHouse/pull/15258) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix 'Unknown identifier' in GROUP BY when query has JOIN over Merge table. [#15242](https://github.com/ClickHouse/ClickHouse/pull/15242) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix instance crash when using `joinGet` with `LowCardinality` types. This fixes [#15214](https://github.com/ClickHouse/ClickHouse/issues/15214). [#15220](https://github.com/ClickHouse/ClickHouse/pull/15220) ([Amos Bird](https://github.com/amosbird)). +* Fix bug in table engine `Buffer` which does not allow to insert data of new structure into `Buffer` after `ALTER` query. Fixes [#15117](https://github.com/ClickHouse/ClickHouse/issues/15117). [#15192](https://github.com/ClickHouse/ClickHouse/pull/15192) ([alesapin](https://github.com/alesapin)). +* Adjust Decimal field size in MySQL column definition packet. [#15152](https://github.com/ClickHouse/ClickHouse/pull/15152) ([maqroll](https://github.com/maqroll)). +* Fixes `Data compressed with different methods` in `join_algorithm='auto'`. Keep LowCardinality as type for left table join key in `join_algorithm='partial_merge'`. [#15088](https://github.com/ClickHouse/ClickHouse/pull/15088) ([Artem Zuikov](https://github.com/4ertus2)). +* Update `jemalloc` to fix `percpu_arena` with affinity mask. [#15035](https://github.com/ClickHouse/ClickHouse/pull/15035) ([Azat Khuzhin](https://github.com/azat)). [#14957](https://github.com/ClickHouse/ClickHouse/pull/14957) ([Azat Khuzhin](https://github.com/azat)). +* We already use padded comparison between String and FixedString (https://github.com/ClickHouse/ClickHouse/blob/master/src/Functions/FunctionsComparison.h#L333). This PR applies the same logic to field comparison which corrects the usage of FixedString as primary keys. This fixes [#14908](https://github.com/ClickHouse/ClickHouse/issues/14908). [#15033](https://github.com/ClickHouse/ClickHouse/pull/15033) ([Amos Bird](https://github.com/amosbird)). +* If function `bar` was called with specifically crafted arguments, buffer overflow was possible. This closes [#13926](https://github.com/ClickHouse/ClickHouse/issues/13926). [#15028](https://github.com/ClickHouse/ClickHouse/pull/15028) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `Cannot rename ... errno: 22, strerror: Invalid argument` error on DDL query execution in Atomic database when running clickhouse-server in Docker on Mac OS. [#15024](https://github.com/ClickHouse/ClickHouse/pull/15024) ([tavplubix](https://github.com/tavplubix)). +* Fix crash in RIGHT or FULL JOIN with join_algorith='auto' when memory limit exceeded and we should change HashJoin with MergeJoin. [#15002](https://github.com/ClickHouse/ClickHouse/pull/15002) ([Artem Zuikov](https://github.com/4ertus2)). +* Now settings `number_of_free_entries_in_pool_to_execute_mutation` and `number_of_free_entries_in_pool_to_lower_max_size_of_merge` can be equal to `background_pool_size`. [#14975](https://github.com/ClickHouse/ClickHouse/pull/14975) ([alesapin](https://github.com/alesapin)). +* Fix to make predicate push down work when subquery contains `finalizeAggregation` function. Fixes [#14847](https://github.com/ClickHouse/ClickHouse/issues/14847). [#14937](https://github.com/ClickHouse/ClickHouse/pull/14937) ([filimonov](https://github.com/filimonov)). +* Publish CPU frequencies per logical core in `system.asynchronous_metrics`. This fixes [#14923](https://github.com/ClickHouse/ClickHouse/issues/14923). [#14924](https://github.com/ClickHouse/ClickHouse/pull/14924) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* `MaterializeMySQL` (experimental feature): Fixed `.metadata.tmp File exists` error. [#14898](https://github.com/ClickHouse/ClickHouse/pull/14898) ([Winter Zhang](https://github.com/zhang2014)). +* Fix the issue when some invocations of `extractAllGroups` function may trigger "Memory limit exceeded" error. This fixes [#13383](https://github.com/ClickHouse/ClickHouse/issues/13383). [#14889](https://github.com/ClickHouse/ClickHouse/pull/14889) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix SIGSEGV for an attempt to INSERT into StorageFile with file descriptor. [#14887](https://github.com/ClickHouse/ClickHouse/pull/14887) ([Azat Khuzhin](https://github.com/azat)). +* Fixed segfault in `cache` dictionary [#14837](https://github.com/ClickHouse/ClickHouse/issues/14837). [#14879](https://github.com/ClickHouse/ClickHouse/pull/14879) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* `MaterializeMySQL` (experimental feature): Fixed bug in parsing MySQL binlog events, which causes `Attempt to read after eof` and `Packet payload is not fully read` in `MaterializeMySQL` database engine. [#14852](https://github.com/ClickHouse/ClickHouse/pull/14852) ([Winter Zhang](https://github.com/zhang2014)). +* Fix rare error in `SELECT` queries when the queried column has `DEFAULT` expression which depends on the other column which also has `DEFAULT` and not present in select query and not exists on disk. Partially fixes [#14531](https://github.com/ClickHouse/ClickHouse/issues/14531). [#14845](https://github.com/ClickHouse/ClickHouse/pull/14845) ([alesapin](https://github.com/alesapin)). +* Fix a problem where the server may get stuck on startup while talking to ZooKeeper, if the configuration files have to be fetched from ZK (using the `from_zk` include option). This fixes [#14814](https://github.com/ClickHouse/ClickHouse/issues/14814). [#14843](https://github.com/ClickHouse/ClickHouse/pull/14843) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fix wrong monotonicity detection for shrunk `Int -> Int` cast of signed types. It might lead to incorrect query result. This bug is unveiled in [#14513](https://github.com/ClickHouse/ClickHouse/issues/14513). [#14783](https://github.com/ClickHouse/ClickHouse/pull/14783) ([Amos Bird](https://github.com/amosbird)). +* `Replace` column transformer should replace identifiers with cloned ASTs. This fixes [#14695](https://github.com/ClickHouse/ClickHouse/issues/14695) . [#14734](https://github.com/ClickHouse/ClickHouse/pull/14734) ([Amos Bird](https://github.com/amosbird)). +* Fixed missed default database name in metadata of materialized view when executing `ALTER ... MODIFY QUERY`. [#14664](https://github.com/ClickHouse/ClickHouse/pull/14664) ([tavplubix](https://github.com/tavplubix)). +* Fix bug when `ALTER UPDATE` mutation with `Nullable` column in assignment expression and constant value (like `UPDATE x = 42`) leads to incorrect value in column or segfault. Fixes [#13634](https://github.com/ClickHouse/ClickHouse/issues/13634), [#14045](https://github.com/ClickHouse/ClickHouse/issues/14045). [#14646](https://github.com/ClickHouse/ClickHouse/pull/14646) ([alesapin](https://github.com/alesapin)). +* Fix wrong Decimal multiplication result caused wrong decimal scale of result column. [#14603](https://github.com/ClickHouse/ClickHouse/pull/14603) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix function `has` with `LowCardinality` of `Nullable`. [#14591](https://github.com/ClickHouse/ClickHouse/pull/14591) ([Mike](https://github.com/myrrc)). +* Cleanup data directory after Zookeeper exceptions during CreateQuery for StorageReplicatedMergeTree Engine. [#14563](https://github.com/ClickHouse/ClickHouse/pull/14563) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix rare segfaults in functions with combinator `-Resample`, which could appear in result of overflow with very large parameters. [#14562](https://github.com/ClickHouse/ClickHouse/pull/14562) ([Anton Popov](https://github.com/CurtizJ)). +* Fix a bug when converting `Nullable(String)` to Enum. Introduced by [#12745](https://github.com/ClickHouse/ClickHouse/pull/12745). This fixes [#14435](https://github.com/ClickHouse/ClickHouse/issues/14435). [#14530](https://github.com/ClickHouse/ClickHouse/pull/14530) ([Amos Bird](https://github.com/amosbird)). +* Fixed the incorrect sorting order of `Nullable` column. This fixes [#14344](https://github.com/ClickHouse/ClickHouse/issues/14344). [#14495](https://github.com/ClickHouse/ClickHouse/pull/14495) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix `currentDatabase()` function cannot be used in `ON CLUSTER` ddl query. [#14211](https://github.com/ClickHouse/ClickHouse/pull/14211) ([Winter Zhang](https://github.com/zhang2014)). +* `MaterializeMySQL` (experimental feature): Fixed `Packet payload is not fully read` error in `MaterializeMySQL` database engine. [#14696](https://github.com/ClickHouse/ClickHouse/pull/14696) ([BohuTANG](https://github.com/BohuTANG)). + +#### Improvement + +* Enable `Atomic` database engine by default for newly created databases. [#15003](https://github.com/ClickHouse/ClickHouse/pull/15003) ([tavplubix](https://github.com/tavplubix)). +* Add the ability to specify specialized codecs like `Delta`, `T64`, etc. for columns with subtypes. Implements [#12551](https://github.com/ClickHouse/ClickHouse/issues/12551), fixes [#11397](https://github.com/ClickHouse/ClickHouse/issues/11397), fixes [#4609](https://github.com/ClickHouse/ClickHouse/issues/4609). [#15089](https://github.com/ClickHouse/ClickHouse/pull/15089) ([alesapin](https://github.com/alesapin)). +* Dynamic reload of zookeeper config. [#14678](https://github.com/ClickHouse/ClickHouse/pull/14678) ([sundyli](https://github.com/sundy-li)). +* Now it's allowed to execute `ALTER ... ON CLUSTER` queries regardless of the `` setting in cluster config. [#16075](https://github.com/ClickHouse/ClickHouse/pull/16075) ([alesapin](https://github.com/alesapin)). +* Now `joinGet` supports multi-key lookup. Continuation of [#12418](https://github.com/ClickHouse/ClickHouse/issues/12418). [#13015](https://github.com/ClickHouse/ClickHouse/pull/13015) ([Amos Bird](https://github.com/amosbird)). +* Wait for `DROP/DETACH TABLE` to actually finish if `NO DELAY` or `SYNC` is specified for `Atomic` database. [#15448](https://github.com/ClickHouse/ClickHouse/pull/15448) ([tavplubix](https://github.com/tavplubix)). +* Now it's possible to change the type of version column for `VersionedCollapsingMergeTree` with `ALTER` query. [#15442](https://github.com/ClickHouse/ClickHouse/pull/15442) ([alesapin](https://github.com/alesapin)). +* Unfold `{database}`, `{table}` and `{uuid}` macros in `zookeeper_path` on replicated table creation. Do not allow `RENAME TABLE` if it may break `zookeeper_path` after server restart. Fixes [#6917](https://github.com/ClickHouse/ClickHouse/issues/6917). [#15348](https://github.com/ClickHouse/ClickHouse/pull/15348) ([tavplubix](https://github.com/tavplubix)). +* The function `now` allows an argument with timezone. This closes [15264](https://github.com/ClickHouse/ClickHouse/issues/15264). [#15285](https://github.com/ClickHouse/ClickHouse/pull/15285) ([flynn](https://github.com/ucasFL)). +* Do not allow connections to ClickHouse server until all scripts in `/docker-entrypoint-initdb.d/` are executed. [#15244](https://github.com/ClickHouse/ClickHouse/pull/15244) ([Aleksei Kozharin](https://github.com/alekseik1)). +* Added `optimize` setting to `EXPLAIN PLAN` query. If enabled, query plan level optimisations are applied. Enabled by default. [#15201](https://github.com/ClickHouse/ClickHouse/pull/15201) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Proper exception message for wrong number of arguments of CAST. This closes [#13992](https://github.com/ClickHouse/ClickHouse/issues/13992). [#15029](https://github.com/ClickHouse/ClickHouse/pull/15029) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add option to disable TTL move on data part insert. [#15000](https://github.com/ClickHouse/ClickHouse/pull/15000) ([Pavel Kovalenko](https://github.com/Jokser)). +* Ignore key constraints when doing mutations. Without this pull request, it's not possible to do mutations when `force_index_by_date = 1` or `force_primary_key = 1`. [#14973](https://github.com/ClickHouse/ClickHouse/pull/14973) ([Amos Bird](https://github.com/amosbird)). +* Allow to drop Replicated table if previous drop attempt was failed due to ZooKeeper session expiration. This fixes [#11891](https://github.com/ClickHouse/ClickHouse/issues/11891). [#14926](https://github.com/ClickHouse/ClickHouse/pull/14926) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed excessive settings constraint violation when running SELECT with SETTINGS from a distributed table. [#14876](https://github.com/ClickHouse/ClickHouse/pull/14876) ([Amos Bird](https://github.com/amosbird)). +* Provide a `load_balancing_first_offset` query setting to explicitly state what the first replica is. It's used together with `FIRST_OR_RANDOM` load balancing strategy, which allows to control replicas workload. [#14867](https://github.com/ClickHouse/ClickHouse/pull/14867) ([Amos Bird](https://github.com/amosbird)). +* Show subqueries for `SET` and `JOIN` in `EXPLAIN` result. [#14856](https://github.com/ClickHouse/ClickHouse/pull/14856) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Allow using multi-volume storage configuration in storage `Distributed`. [#14839](https://github.com/ClickHouse/ClickHouse/pull/14839) ([Pavel Kovalenko](https://github.com/Jokser)). +* Construct `query_start_time` and `query_start_time_microseconds` from the same timespec. [#14831](https://github.com/ClickHouse/ClickHouse/pull/14831) ([Bharat Nallan](https://github.com/bharatnc)). +* Support for disabling persistency for `StorageJoin` and `StorageSet`, this feature is controlled by setting `disable_set_and_join_persistency`. And this PR solved issue [#6318](https://github.com/ClickHouse/ClickHouse/issues/6318). [#14776](https://github.com/ClickHouse/ClickHouse/pull/14776) ([vxider](https://github.com/Vxider)). +* Now `COLUMNS` can be used to wrap over a list of columns and apply column transformers afterwards. [#14775](https://github.com/ClickHouse/ClickHouse/pull/14775) ([Amos Bird](https://github.com/amosbird)). +* Add `merge_algorithm` to `system.merges` table to improve merging inspections. [#14705](https://github.com/ClickHouse/ClickHouse/pull/14705) ([Amos Bird](https://github.com/amosbird)). +* Fix potential memory leak caused by zookeeper exists watch. [#14693](https://github.com/ClickHouse/ClickHouse/pull/14693) ([hustnn](https://github.com/hustnn)). +* Allow parallel execution of distributed DDL. [#14684](https://github.com/ClickHouse/ClickHouse/pull/14684) ([Azat Khuzhin](https://github.com/azat)). +* Add `QueryMemoryLimitExceeded` event counter. This closes [#14589](https://github.com/ClickHouse/ClickHouse/issues/14589). [#14647](https://github.com/ClickHouse/ClickHouse/pull/14647) ([fastio](https://github.com/fastio)). +* Fix some trailing whitespaces in query formatting. [#14595](https://github.com/ClickHouse/ClickHouse/pull/14595) ([Azat Khuzhin](https://github.com/azat)). +* ClickHouse treats partition expr and key expr differently. Partition expr is used to construct an minmax index containing related columns, while primary key expr is stored as an expr. Sometimes user might partition a table at coarser levels, such as `partition by i / 1000`. However, binary operators are not monotonic and this PR tries to fix that. It might also benifit other use cases. [#14513](https://github.com/ClickHouse/ClickHouse/pull/14513) ([Amos Bird](https://github.com/amosbird)). +* Add an option to skip access checks for `DiskS3`. `s3` disk is an experimental feature. [#14497](https://github.com/ClickHouse/ClickHouse/pull/14497) ([Pavel Kovalenko](https://github.com/Jokser)). +* Speed up server shutdown process if there are ongoing S3 requests. [#14496](https://github.com/ClickHouse/ClickHouse/pull/14496) ([Pavel Kovalenko](https://github.com/Jokser)). +* `SYSTEM RELOAD CONFIG` now throws an exception if failed to reload and continues using the previous users.xml. The background periodic reloading also continues using the previous users.xml if failed to reload. [#14492](https://github.com/ClickHouse/ClickHouse/pull/14492) ([Vitaly Baranov](https://github.com/vitlibar)). +* For INSERTs with inline data in VALUES format in the script mode of `clickhouse-client`, support semicolon as the data terminator, in addition to the new line. Closes [#12288](https://github.com/ClickHouse/ClickHouse/issues/12288). [#13192](https://github.com/ClickHouse/ClickHouse/pull/13192) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Support custom codecs in compact parts. [#12183](https://github.com/ClickHouse/ClickHouse/pull/12183) ([Anton Popov](https://github.com/CurtizJ)). + +#### Performance Improvement + +* Enable compact parts by default for small parts. This will allow to process frequent inserts slightly more efficiently (4..100 times). [#11913](https://github.com/ClickHouse/ClickHouse/pull/11913) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve `quantileTDigest` performance. This fixes [#2668](https://github.com/ClickHouse/ClickHouse/issues/2668). [#15542](https://github.com/ClickHouse/ClickHouse/pull/15542) ([Kruglov Pavel](https://github.com/Avogar)). +* Significantly reduce memory usage in AggregatingInOrderTransform/optimize_aggregation_in_order. [#15543](https://github.com/ClickHouse/ClickHouse/pull/15543) ([Azat Khuzhin](https://github.com/azat)). +* Faster 256-bit multiplication. [#15418](https://github.com/ClickHouse/ClickHouse/pull/15418) ([Artem Zuikov](https://github.com/4ertus2)). +* Improve performance of 256-bit types using (u)int64_t as base type for wide integers. Original wide integers use 8-bit types as base. [#14859](https://github.com/ClickHouse/ClickHouse/pull/14859) ([Artem Zuikov](https://github.com/4ertus2)). +* Explicitly use a temporary disk to store vertical merge temporary data. [#15639](https://github.com/ClickHouse/ClickHouse/pull/15639) ([Grigory Pervakov](https://github.com/GrigoryPervakov)). +* Use one S3 DeleteObjects request instead of multiple DeleteObject in a loop. No any functionality changes, so covered by existing tests like integration/test_log_family_s3. [#15238](https://github.com/ClickHouse/ClickHouse/pull/15238) ([ianton-ru](https://github.com/ianton-ru)). +* Fix `DateTime DateTime` mistakenly choosing the slow generic implementation. This fixes [#15153](https://github.com/ClickHouse/ClickHouse/issues/15153). [#15178](https://github.com/ClickHouse/ClickHouse/pull/15178) ([Amos Bird](https://github.com/amosbird)). +* Improve performance of GROUP BY key of type `FixedString`. [#15034](https://github.com/ClickHouse/ClickHouse/pull/15034) ([Amos Bird](https://github.com/amosbird)). +* Only `mlock` code segment when starting clickhouse-server. In previous versions, all mapped regions were locked in memory, including debug info. Debug info is usually splitted to a separate file but if it isn't, it led to +2..3 GiB memory usage. [#14929](https://github.com/ClickHouse/ClickHouse/pull/14929) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* ClickHouse binary become smaller due to link time optimization. + +#### Build/Testing/Packaging Improvement + +* Now we use clang-11 for production ClickHouse build. [#15239](https://github.com/ClickHouse/ClickHouse/pull/15239) ([alesapin](https://github.com/alesapin)). +* Now we use clang-11 to build ClickHouse in CI. [#14846](https://github.com/ClickHouse/ClickHouse/pull/14846) ([alesapin](https://github.com/alesapin)). +* Switch binary builds (Linux, Darwin, AArch64, FreeDSD) to clang-11. [#15622](https://github.com/ClickHouse/ClickHouse/pull/15622) ([Ilya Yatsishin](https://github.com/qoega)). +* Now all test images use `llvm-symbolizer-11`. [#15069](https://github.com/ClickHouse/ClickHouse/pull/15069) ([alesapin](https://github.com/alesapin)). +* Allow to build with llvm-11. [#15366](https://github.com/ClickHouse/ClickHouse/pull/15366) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Switch from `clang-tidy-10` to `clang-tidy-11`. [#14922](https://github.com/ClickHouse/ClickHouse/pull/14922) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Use LLVM's experimental pass manager by default. [#15608](https://github.com/ClickHouse/ClickHouse/pull/15608) ([Danila Kutenin](https://github.com/danlark1)). +* Don't allow any C++ translation unit to build more than 10 minutes or to use more than 10 GB or memory. This fixes [#14925](https://github.com/ClickHouse/ClickHouse/issues/14925). [#15060](https://github.com/ClickHouse/ClickHouse/pull/15060) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Make performance test more stable and representative by splitting test runs and profile runs. [#15027](https://github.com/ClickHouse/ClickHouse/pull/15027) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Attempt to make performance test more reliable. It is done by remapping the executable memory of the process on the fly with `madvise` to use transparent huge pages - it can lower the number of iTLB misses which is the main source of instabilities in performance tests. [#14685](https://github.com/ClickHouse/ClickHouse/pull/14685) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Convert to python3. This closes [#14886](https://github.com/ClickHouse/ClickHouse/issues/14886). [#15007](https://github.com/ClickHouse/ClickHouse/pull/15007) ([Azat Khuzhin](https://github.com/azat)). +* Fail early in functional tests if server failed to respond. This closes [#15262](https://github.com/ClickHouse/ClickHouse/issues/15262). [#15267](https://github.com/ClickHouse/ClickHouse/pull/15267) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow to run AArch64 version of clickhouse-server without configs. This facilitates [#15174](https://github.com/ClickHouse/ClickHouse/issues/15174). [#15266](https://github.com/ClickHouse/ClickHouse/pull/15266) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improvements in CI docker images: get rid of ZooKeeper and single script for test configs installation. [#15215](https://github.com/ClickHouse/ClickHouse/pull/15215) ([alesapin](https://github.com/alesapin)). +* Fix CMake options forwarding in fast test script. Fixes error in [#14711](https://github.com/ClickHouse/ClickHouse/issues/14711). [#15155](https://github.com/ClickHouse/ClickHouse/pull/15155) ([alesapin](https://github.com/alesapin)). +* Added a script to perform hardware benchmark in a single command. [#15115](https://github.com/ClickHouse/ClickHouse/pull/15115) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Splitted huge test `test_dictionaries_all_layouts_and_sources` into smaller ones. [#15110](https://github.com/ClickHouse/ClickHouse/pull/15110) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Maybe fix MSan report in base64 (on servers with AVX-512). This fixes [#14006](https://github.com/ClickHouse/ClickHouse/issues/14006). [#15030](https://github.com/ClickHouse/ClickHouse/pull/15030) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Reformat and cleanup code in all integration test *.py files. [#14864](https://github.com/ClickHouse/ClickHouse/pull/14864) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix MaterializeMySQL empty transaction unstable test case found in CI. [#14854](https://github.com/ClickHouse/ClickHouse/pull/14854) ([Winter Zhang](https://github.com/zhang2014)). +* Attempt to speed up build a little. [#14808](https://github.com/ClickHouse/ClickHouse/pull/14808) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Speed up build a little by removing unused headers. [#14714](https://github.com/ClickHouse/ClickHouse/pull/14714) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix build failure in OSX. [#14761](https://github.com/ClickHouse/ClickHouse/pull/14761) ([Winter Zhang](https://github.com/zhang2014)). +* Enable ccache by default in cmake if it's found in OS. [#14575](https://github.com/ClickHouse/ClickHouse/pull/14575) ([alesapin](https://github.com/alesapin)). +* Control CI builds configuration from the ClickHouse repository. [#14547](https://github.com/ClickHouse/ClickHouse/pull/14547) ([alesapin](https://github.com/alesapin)). +* In CMake files: - Moved some options' descriptions' parts to comments above. - Replace 0 -> `OFF`, 1 -> `ON` in `option`s default values. - Added some descriptions and links to docs to the options. - Replaced `FUZZER` option (there is another option `ENABLE_FUZZING` which also enables same functionality). - Removed `ENABLE_GTEST_LIBRARY` option as there is `ENABLE_TESTS`. See the full description in PR: [#14711](https://github.com/ClickHouse/ClickHouse/pull/14711) ([Mike](https://github.com/myrrc)). +* Make binary a bit smaller (~50 Mb for debug version). [#14555](https://github.com/ClickHouse/ClickHouse/pull/14555) ([Artem Zuikov](https://github.com/4ertus2)). +* Use std::filesystem::path in ConfigProcessor for concatenating file paths. [#14558](https://github.com/ClickHouse/ClickHouse/pull/14558) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix debug assertion in `bitShiftLeft()` when called with negative big integer. [#14697](https://github.com/ClickHouse/ClickHouse/pull/14697) ([Artem Zuikov](https://github.com/4ertus2)). + + +## ClickHouse release 20.9 + +### ClickHouse release v20.9.7.11-stable, 2020-12-07 + +#### Performance Improvement + +* Fix performance of reading from `Merge` tables over huge number of `MergeTree` tables. Fixes [#7748](https://github.com/ClickHouse/ClickHouse/issues/7748). [#16988](https://github.com/ClickHouse/ClickHouse/pull/16988) ([Anton Popov](https://github.com/CurtizJ)). + +#### Bug Fix + +* Do not restore parts from WAL if `in_memory_parts_enable_wal` is disabled. [#17802](https://github.com/ClickHouse/ClickHouse/pull/17802) ([detailyang](https://github.com/detailyang)). +* Fixed segfault when there is not enough space when inserting into `Distributed` table. [#17737](https://github.com/ClickHouse/ClickHouse/pull/17737) ([tavplubix](https://github.com/tavplubix)). +* Fixed problem when ClickHouse fails to resume connection to MySQL servers. [#17681](https://github.com/ClickHouse/ClickHouse/pull/17681) ([Alexander Kazakov](https://github.com/Akazz)). +* Fixed `Function not implemented` error when executing `RENAME` query in `Atomic` database with ClickHouse running on Windows Subsystem for Linux. Fixes [#17661](https://github.com/ClickHouse/ClickHouse/issues/17661). [#17664](https://github.com/ClickHouse/ClickHouse/pull/17664) ([tavplubix](https://github.com/tavplubix)). +* When clickhouse-client is used in interactive mode with multiline queries, single line comment was erronously extended till the end of query. This fixes [#13654](https://github.com/ClickHouse/ClickHouse/issues/13654). [#17565](https://github.com/ClickHouse/ClickHouse/pull/17565) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix the issue when server can stop accepting connections in very rare cases. [#17542](https://github.com/ClickHouse/ClickHouse/pull/17542) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix alter query hang when the corresponding mutation was killed on the different replica. Fixes [#16953](https://github.com/ClickHouse/ClickHouse/issues/16953). [#17499](https://github.com/ClickHouse/ClickHouse/pull/17499) ([alesapin](https://github.com/alesapin)). +* Fix bug when mark cache size was underestimated by clickhouse. It may happen when there are a lot of tiny files with marks. [#17496](https://github.com/ClickHouse/ClickHouse/pull/17496) ([alesapin](https://github.com/alesapin)). +* Fix `ORDER BY` with enabled setting `optimize_redundant_functions_in_order_by`. [#17471](https://github.com/ClickHouse/ClickHouse/pull/17471) ([Anton Popov](https://github.com/CurtizJ)). +* Fix duplicates after `DISTINCT` which were possible because of incorrect optimization. Fixes [#17294](https://github.com/ClickHouse/ClickHouse/issues/17294). [#17296](https://github.com/ClickHouse/ClickHouse/pull/17296) ([li chengxiang](https://github.com/chengxianglibra)). [#17439](https://github.com/ClickHouse/ClickHouse/pull/17439) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix crash while reading from `JOIN` table with `LowCardinality` types. Fixes [#17228](https://github.com/ClickHouse/ClickHouse/issues/17228). [#17397](https://github.com/ClickHouse/ClickHouse/pull/17397) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix set index invalidation when there are const columns in the subquery. This fixes [#17246](https://github.com/ClickHouse/ClickHouse/issues/17246) . [#17249](https://github.com/ClickHouse/ClickHouse/pull/17249) ([Amos Bird](https://github.com/amosbird)). +* Fix ColumnConst comparison which leads to crash. This fixed [#17088](https://github.com/ClickHouse/ClickHouse/issues/17088) . [#17135](https://github.com/ClickHouse/ClickHouse/pull/17135) ([Amos Bird](https://github.com/amosbird)). +* Fixed crash on `CREATE TABLE ... AS some_table` query when `some_table` was created `AS table_function()` Fixes [#16944](https://github.com/ClickHouse/ClickHouse/issues/16944). [#17072](https://github.com/ClickHouse/ClickHouse/pull/17072) ([tavplubix](https://github.com/tavplubix)). +* Bug fix for funciton fuzzBits, related issue: [#16980](https://github.com/ClickHouse/ClickHouse/issues/16980). [#17051](https://github.com/ClickHouse/ClickHouse/pull/17051) ([hexiaoting](https://github.com/hexiaoting)). +* Avoid unnecessary network errors for remote queries which may be cancelled while execution, like queries with `LIMIT`. [#17006](https://github.com/ClickHouse/ClickHouse/pull/17006) ([Azat Khuzhin](https://github.com/azat)). +* TODO. [#16866](https://github.com/ClickHouse/ClickHouse/pull/16866) ([tavplubix](https://github.com/tavplubix)). +* Return number of affected rows for INSERT queries via MySQL protocol. Previously ClickHouse used to always return 0, it's fixed. Fixes [#16605](https://github.com/ClickHouse/ClickHouse/issues/16605). [#16715](https://github.com/ClickHouse/ClickHouse/pull/16715) ([Winter Zhang](https://github.com/zhang2014)). + +#### Build/Testing/Packaging Improvement + +* Update embedded timezone data to version 2020d (also update cctz to the latest master). [#17204](https://github.com/ClickHouse/ClickHouse/pull/17204) ([filimonov](https://github.com/filimonov)). + + +### ClickHouse release v20.9.6.14-stable, 2020-11-20 + +#### Improvement + +* Make it possible to connect to `clickhouse-server` secure endpoint which requires SNI. This is possible when `clickhouse-server` is hosted behind TLS proxy. [#16938](https://github.com/ClickHouse/ClickHouse/pull/16938) ([filimonov](https://github.com/filimonov)). +* Conditional aggregate functions (for example: `avgIf`, `sumIf`, `maxIf`) should return `NULL` when miss rows and use nullable arguments. [#13964](https://github.com/ClickHouse/ClickHouse/pull/13964) ([Winter Zhang](https://github.com/zhang2014)). + +#### Bug Fix + +* Fix bug when `ON CLUSTER` queries may hang forever for non-leader ReplicatedMergeTreeTables. [#17089](https://github.com/ClickHouse/ClickHouse/pull/17089) ([alesapin](https://github.com/alesapin)). +* Reresolve the IP of the `format_avro_schema_registry_url` in case of errors. [#16985](https://github.com/ClickHouse/ClickHouse/pull/16985) ([filimonov](https://github.com/filimonov)). +* Fix possible server crash after `ALTER TABLE ... MODIFY COLUMN ... NewType` when `SELECT` have `WHERE` expression on altering column and alter does not finished yet. [#16968](https://github.com/ClickHouse/ClickHouse/pull/16968) ([Amos Bird](https://github.com/amosbird)). +* Install script should always create subdirs in config folders. This is only relevant for Docker build with custom config. [#16936](https://github.com/ClickHouse/ClickHouse/pull/16936) ([filimonov](https://github.com/filimonov)). +* Fix possible error `Illegal type of argument` for queries with `ORDER BY`. Fixes [#16580](https://github.com/ClickHouse/ClickHouse/issues/16580). [#16928](https://github.com/ClickHouse/ClickHouse/pull/16928) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Abort multipart upload if no data was written to WriteBufferFromS3. [#16840](https://github.com/ClickHouse/ClickHouse/pull/16840) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fix crash when using `any` without any arguments. This is for [#16803](https://github.com/ClickHouse/ClickHouse/issues/16803) . cc @azat. [#16826](https://github.com/ClickHouse/ClickHouse/pull/16826) ([Amos Bird](https://github.com/amosbird)). +* Fix `IN` operator over several columns and tuples with enabled `transform_null_in` setting. Fixes [#15310](https://github.com/ClickHouse/ClickHouse/issues/15310). [#16722](https://github.com/ClickHouse/ClickHouse/pull/16722) ([Anton Popov](https://github.com/CurtizJ)). +* This will fix optimize_read_in_order/optimize_aggregation_in_order with max_threads>0 and expression in ORDER BY. [#16637](https://github.com/ClickHouse/ClickHouse/pull/16637) ([Azat Khuzhin](https://github.com/azat)). +* fixes [#16574](https://github.com/ClickHouse/ClickHouse/issues/16574) fixes [#16231](https://github.com/ClickHouse/ClickHouse/issues/16231) fix remote query failure when using 'if' suffix aggregate function. [#16610](https://github.com/ClickHouse/ClickHouse/pull/16610) ([Winter Zhang](https://github.com/zhang2014)). +* Query is finished faster in case of exception. Cancel execution on remote replicas if exception happens. [#15578](https://github.com/ClickHouse/ClickHouse/pull/15578) ([Azat Khuzhin](https://github.com/azat)). + + +### ClickHouse release v20.9.5.5-stable, 2020-11-13 + +#### Bug Fix + +* Fix rare silent crashes when query profiler is on and ClickHouse is installed on OS with glibc version that has (supposedly) broken asynchronous unwind tables for some functions. This fixes [#15301](https://github.com/ClickHouse/ClickHouse/issues/15301). This fixes [#13098](https://github.com/ClickHouse/ClickHouse/issues/13098). [#16846](https://github.com/ClickHouse/ClickHouse/pull/16846) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now when parsing AVRO from input the LowCardinality is removed from type. Fixes [#16188](https://github.com/ClickHouse/ClickHouse/issues/16188). [#16521](https://github.com/ClickHouse/ClickHouse/pull/16521) ([Mike](https://github.com/myrrc)). +* Fix rapid growth of metadata when using MySQL Master -> MySQL Slave -> ClickHouse MaterializeMySQL Engine, and `slave_parallel_worker` enabled on MySQL Slave, by properly shrinking GTID sets. This fixes [#15951](https://github.com/ClickHouse/ClickHouse/issues/15951). [#16504](https://github.com/ClickHouse/ClickHouse/pull/16504) ([TCeason](https://github.com/TCeason)). +* Fix DROP TABLE for Distributed (racy with INSERT). [#16409](https://github.com/ClickHouse/ClickHouse/pull/16409) ([Azat Khuzhin](https://github.com/azat)). +* Fix processing of very large entries in replication queue. Very large entries may appear in ALTER queries if table structure is extremely large (near 1 MB). This fixes [#16307](https://github.com/ClickHouse/ClickHouse/issues/16307). [#16332](https://github.com/ClickHouse/ClickHouse/pull/16332) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the inconsistent behaviour when a part of return data could be dropped because the set for its filtration wasn't created. [#16308](https://github.com/ClickHouse/ClickHouse/pull/16308) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix bug with MySQL database. When MySQL server used as database engine is down some queries raise Exception, because they try to get tables from disabled server, while it's unnecessary. For example, query `SELECT ... FROM system.parts` should work only with MergeTree tables and don't touch MySQL database at all. [#16032](https://github.com/ClickHouse/ClickHouse/pull/16032) ([Kruglov Pavel](https://github.com/Avogar)). + + +### ClickHouse release v20.9.4.76-stable (2020-10-29) + +#### Bug Fix + +* Fix double free in case of exception in function `dictGet`. It could have happened if dictionary was loaded with error. [#16429](https://github.com/ClickHouse/ClickHouse/pull/16429) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix group by with totals/rollup/cube modifers and min/max functions over group by keys. Fixes [#16393](https://github.com/ClickHouse/ClickHouse/issues/16393). [#16397](https://github.com/ClickHouse/ClickHouse/pull/16397) ([Anton Popov](https://github.com/CurtizJ)). +* Fix async Distributed INSERT w/ prefer_localhost_replica=0 and internal_replication. [#16358](https://github.com/ClickHouse/ClickHouse/pull/16358) ([Azat Khuzhin](https://github.com/azat)). +* Fix a very wrong code in TwoLevelStringHashTable implementation, which might lead to memory leak. I'm suprised how this bug can lurk for so long.... [#16264](https://github.com/ClickHouse/ClickHouse/pull/16264) ([Amos Bird](https://github.com/amosbird)). +* Fix the case when memory can be overallocated regardless to the limit. This closes [#14560](https://github.com/ClickHouse/ClickHouse/issues/14560). [#16206](https://github.com/ClickHouse/ClickHouse/pull/16206) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `ALTER MODIFY ... ORDER BY` query hang for `ReplicatedVersionedCollapsingMergeTree`. This fixes [#15980](https://github.com/ClickHouse/ClickHouse/issues/15980). [#16011](https://github.com/ClickHouse/ClickHouse/pull/16011) ([alesapin](https://github.com/alesapin)). +* Fix collate name & charset name parser and support `length = 0` for string type. [#16008](https://github.com/ClickHouse/ClickHouse/pull/16008) ([Winter Zhang](https://github.com/zhang2014)). +* Allow to use direct layout for dictionaries with complex keys. [#16007](https://github.com/ClickHouse/ClickHouse/pull/16007) ([Anton Popov](https://github.com/CurtizJ)). +* Prevent replica hang for 5-10 mins when replication error happens after a period of inactivity. [#15987](https://github.com/ClickHouse/ClickHouse/pull/15987) ([filimonov](https://github.com/filimonov)). +* Fix rare segfaults when inserting into or selecting from MaterializedView and concurrently dropping target table (for Atomic database engine). [#15984](https://github.com/ClickHouse/ClickHouse/pull/15984) ([tavplubix](https://github.com/tavplubix)). +* Fix ambiguity in parsing of settings profiles: `CREATE USER ... SETTINGS profile readonly` is now considered as using a profile named `readonly`, not a setting named `profile` with the readonly constraint. This fixes [#15628](https://github.com/ClickHouse/ClickHouse/issues/15628). [#15982](https://github.com/ClickHouse/ClickHouse/pull/15982) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix a crash when database creation fails. [#15954](https://github.com/ClickHouse/ClickHouse/pull/15954) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed `DROP TABLE IF EXISTS` failure with `Table ... does not exist` error when table is concurrently renamed (for Atomic database engine). Fixed rare deadlock when concurrently executing some DDL queries with multiple tables (like `DROP DATABASE` and `RENAME TABLE`) Fixed `DROP/DETACH DATABASE` failure with `Table ... does not exist` when concurrently executing `DROP/DETACH TABLE`. [#15934](https://github.com/ClickHouse/ClickHouse/pull/15934) ([tavplubix](https://github.com/tavplubix)). +* Fix incorrect empty result for query from `Distributed` table if query has `WHERE`, `PREWHERE` and `GLOBAL IN`. Fixes [#15792](https://github.com/ClickHouse/ClickHouse/issues/15792). [#15933](https://github.com/ClickHouse/ClickHouse/pull/15933) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix possible deadlocks in RBAC. [#15875](https://github.com/ClickHouse/ClickHouse/pull/15875) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix exception `Block structure mismatch` in `SELECT ... ORDER BY DESC` queries which were executed after `ALTER MODIFY COLUMN` query. Fixes [#15800](https://github.com/ClickHouse/ClickHouse/issues/15800). [#15852](https://github.com/ClickHouse/ClickHouse/pull/15852) ([alesapin](https://github.com/alesapin)). +* Fix `select count()` inaccuracy for MaterializeMySQL. [#15767](https://github.com/ClickHouse/ClickHouse/pull/15767) ([tavplubix](https://github.com/tavplubix)). +* Fix some cases of queries, in which only virtual columns are selected. Previously `Not found column _nothing in block` exception may be thrown. Fixes [#12298](https://github.com/ClickHouse/ClickHouse/issues/12298). [#15756](https://github.com/ClickHouse/ClickHouse/pull/15756) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed too low default value of `max_replicated_logs_to_keep` setting, which might cause replicas to become lost too often. Improve lost replica recovery process by choosing the most up-to-date replica to clone. Also do not remove old parts from lost replica, detach them instead. [#15701](https://github.com/ClickHouse/ClickHouse/pull/15701) ([tavplubix](https://github.com/tavplubix)). +* Fix error `Cannot add simple transform to empty Pipe` which happened while reading from `Buffer` table which has different structure than destination table. It was possible if destination table returned empty result for query. Fixes [#15529](https://github.com/ClickHouse/ClickHouse/issues/15529). [#15662](https://github.com/ClickHouse/ClickHouse/pull/15662) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed bug with globs in S3 table function, region from URL was not applied to S3 client configuration. [#15646](https://github.com/ClickHouse/ClickHouse/pull/15646) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Decrement the `ReadonlyReplica` metric when detaching read-only tables. This fixes [#15598](https://github.com/ClickHouse/ClickHouse/issues/15598). [#15592](https://github.com/ClickHouse/ClickHouse/pull/15592) ([sundyli](https://github.com/sundy-li)). +* Throw an error when a single parameter is passed to ReplicatedMergeTree instead of ignoring it. [#15516](https://github.com/ClickHouse/ClickHouse/pull/15516) ([nvartolomei](https://github.com/nvartolomei)). + +#### Improvement + +* Now it's allowed to execute `ALTER ... ON CLUSTER` queries regardless of the `` setting in cluster config. [#16075](https://github.com/ClickHouse/ClickHouse/pull/16075) ([alesapin](https://github.com/alesapin)). +* Unfold `{database}`, `{table}` and `{uuid}` macros in `ReplicatedMergeTree` arguments on table creation. [#16160](https://github.com/ClickHouse/ClickHouse/pull/16160) ([tavplubix](https://github.com/tavplubix)). + + +### ClickHouse release v20.9.3.45-stable (2020-10-09) + +#### Bug Fix + +* Fix error `Cannot find column` which may happen at insertion into `MATERIALIZED VIEW` in case if query for `MV` containes `ARRAY JOIN`. [#15717](https://github.com/ClickHouse/ClickHouse/pull/15717) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix race condition in AMQP-CPP. [#15667](https://github.com/ClickHouse/ClickHouse/pull/15667) ([alesapin](https://github.com/alesapin)). +* Fix the order of destruction for resources in `ReadFromStorage` step of query plan. It might cause crashes in rare cases. Possibly connected with [#15610](https://github.com/ClickHouse/ClickHouse/issues/15610). [#15645](https://github.com/ClickHouse/ClickHouse/pull/15645) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed `Element ... is not a constant expression` error when using `JSON*` function result in `VALUES`, `LIMIT` or right side of `IN` operator. [#15589](https://github.com/ClickHouse/ClickHouse/pull/15589) ([tavplubix](https://github.com/tavplubix)). +* Prevent the possibility of error message `Could not calculate available disk space (statvfs), errno: 4, strerror: Interrupted system call`. This fixes [#15541](https://github.com/ClickHouse/ClickHouse/issues/15541). [#15557](https://github.com/ClickHouse/ClickHouse/pull/15557) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Significantly reduce memory usage in AggregatingInOrderTransform/optimize_aggregation_in_order. [#15543](https://github.com/ClickHouse/ClickHouse/pull/15543) ([Azat Khuzhin](https://github.com/azat)). +* Mutation might hang waiting for some non-existent part after `MOVE` or `REPLACE PARTITION` or, in rare cases, after `DETACH` or `DROP PARTITION`. It's fixed. [#15537](https://github.com/ClickHouse/ClickHouse/pull/15537) ([tavplubix](https://github.com/tavplubix)). +* Fix bug when `ILIKE` operator stops being case insensitive if `LIKE` with the same pattern was executed. [#15536](https://github.com/ClickHouse/ClickHouse/pull/15536) ([alesapin](https://github.com/alesapin)). +* Fix `Missing columns` errors when selecting columns which absent in data, but depend on other columns which also absent in data. Fixes [#15530](https://github.com/ClickHouse/ClickHouse/issues/15530). [#15532](https://github.com/ClickHouse/ClickHouse/pull/15532) ([alesapin](https://github.com/alesapin)). +* Fix bug with event subscription in DDLWorker which rarely may lead to query hangs in `ON CLUSTER`. Introduced in [#13450](https://github.com/ClickHouse/ClickHouse/issues/13450). [#15477](https://github.com/ClickHouse/ClickHouse/pull/15477) ([alesapin](https://github.com/alesapin)). +* Report proper error when the second argument of `boundingRatio` aggregate function has a wrong type. [#15407](https://github.com/ClickHouse/ClickHouse/pull/15407) ([detailyang](https://github.com/detailyang)). +* Fix bug where queries like `SELECT toStartOfDay(today())` fail complaining about empty time_zone argument. [#15319](https://github.com/ClickHouse/ClickHouse/pull/15319) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix race condition during MergeTree table rename and background cleanup. [#15304](https://github.com/ClickHouse/ClickHouse/pull/15304) ([alesapin](https://github.com/alesapin)). +* Fix rare race condition on server startup when system.logs are enabled. [#15300](https://github.com/ClickHouse/ClickHouse/pull/15300) ([alesapin](https://github.com/alesapin)). +* Fix MSan report in QueryLog. Uninitialized memory can be used for the field `memory_usage`. [#15258](https://github.com/ClickHouse/ClickHouse/pull/15258) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix instance crash when using joinGet with LowCardinality types. This fixes [#15214](https://github.com/ClickHouse/ClickHouse/issues/15214). [#15220](https://github.com/ClickHouse/ClickHouse/pull/15220) ([Amos Bird](https://github.com/amosbird)). +* Fix bug in table engine `Buffer` which does not allow to insert data of new structure into `Buffer` after `ALTER` query. Fixes [#15117](https://github.com/ClickHouse/ClickHouse/issues/15117). [#15192](https://github.com/ClickHouse/ClickHouse/pull/15192) ([alesapin](https://github.com/alesapin)). +* Adjust decimals field size in mysql column definition packet. [#15152](https://github.com/ClickHouse/ClickHouse/pull/15152) ([maqroll](https://github.com/maqroll)). +* Fixed `Cannot rename ... errno: 22, strerror: Invalid argument` error on DDL query execution in Atomic database when running clickhouse-server in docker on Mac OS. [#15024](https://github.com/ClickHouse/ClickHouse/pull/15024) ([tavplubix](https://github.com/tavplubix)). +* Fix to make predicate push down work when subquery contains finalizeAggregation function. Fixes [#14847](https://github.com/ClickHouse/ClickHouse/issues/14847). [#14937](https://github.com/ClickHouse/ClickHouse/pull/14937) ([filimonov](https://github.com/filimonov)). +* Fix a problem where the server may get stuck on startup while talking to ZooKeeper, if the configuration files have to be fetched from ZK (using the `from_zk` include option). This fixes [#14814](https://github.com/ClickHouse/ClickHouse/issues/14814). [#14843](https://github.com/ClickHouse/ClickHouse/pull/14843) ([Alexander Kuzmenkov](https://github.com/akuzm)). + +#### Improvement + +* Now it's possible to change the type of version column for `VersionedCollapsingMergeTree` with `ALTER` query. [#15442](https://github.com/ClickHouse/ClickHouse/pull/15442) ([alesapin](https://github.com/alesapin)). + + +### ClickHouse release v20.9.2.20, 2020-09-22 + +#### Backward Incompatible Change + +* When upgrading from versions older than 20.5, if rolling update is performed and cluster contains both versions 20.5 or greater and less than 20.5, if ClickHouse nodes with old versions are restarted and old version has been started up in presence of newer versions, it may lead to `Part ... intersects previous part` errors. To prevent this error, first install newer clickhouse-server packages on all cluster nodes and then do restarts (so, when clickhouse-server is restarted, it will start up with the new version). + +#### New Feature + +* Added column transformers `EXCEPT`, `REPLACE`, `APPLY`, which can be applied to the list of selected columns (after `*` or `COLUMNS(...)`). For example, you can write `SELECT * EXCEPT(URL) REPLACE(number + 1 AS number)`. Another example: `select * apply(length) apply(max) from wide_string_table` to find out the maxium length of all string columns. [#14233](https://github.com/ClickHouse/ClickHouse/pull/14233) ([Amos Bird](https://github.com/amosbird)). +* Added an aggregate function `rankCorr` which computes a rank correlation coefficient. [#11769](https://github.com/ClickHouse/ClickHouse/pull/11769) ([antikvist](https://github.com/antikvist)) [#14411](https://github.com/ClickHouse/ClickHouse/pull/14411) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Added table function `view` which turns a subquery into a table object. This helps passing queries around. For instance, it can be used in remote/cluster table functions. [#12567](https://github.com/ClickHouse/ClickHouse/pull/12567) ([Amos Bird](https://github.com/amosbird)). + +#### Bug Fix + +* Fix bug when `ALTER UPDATE` mutation with Nullable column in assignment expression and constant value (like `UPDATE x = 42`) leads to incorrect value in column or segfault. Fixes [#13634](https://github.com/ClickHouse/ClickHouse/issues/13634), [#14045](https://github.com/ClickHouse/ClickHouse/issues/14045). [#14646](https://github.com/ClickHouse/ClickHouse/pull/14646) ([alesapin](https://github.com/alesapin)). +* Fix wrong Decimal multiplication result caused wrong decimal scale of result column. [#14603](https://github.com/ClickHouse/ClickHouse/pull/14603) ([Artem Zuikov](https://github.com/4ertus2)). +* Fixed the incorrect sorting order of `Nullable` column. This fixes [#14344](https://github.com/ClickHouse/ClickHouse/issues/14344). [#14495](https://github.com/ClickHouse/ClickHouse/pull/14495) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fixed inconsistent comparison with primary key of type `FixedString` on index analysis if they're compered with a string of less size. This fixes [#14908](https://github.com/ClickHouse/ClickHouse/issues/14908). [#15033](https://github.com/ClickHouse/ClickHouse/pull/15033) ([Amos Bird](https://github.com/amosbird)). +* Fix bug which leads to wrong merges assignment if table has partitions with a single part. [#14444](https://github.com/ClickHouse/ClickHouse/pull/14444) ([alesapin](https://github.com/alesapin)). +* If function `bar` was called with specifically crafted arguments, buffer overflow was possible. This closes [#13926](https://github.com/ClickHouse/ClickHouse/issues/13926). [#15028](https://github.com/ClickHouse/ClickHouse/pull/15028) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Publish CPU frequencies per logical core in `system.asynchronous_metrics`. This fixes [#14923](https://github.com/ClickHouse/ClickHouse/issues/14923). [#14924](https://github.com/ClickHouse/ClickHouse/pull/14924) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fixed `.metadata.tmp File exists` error when using `MaterializeMySQL` database engine. [#14898](https://github.com/ClickHouse/ClickHouse/pull/14898) ([Winter Zhang](https://github.com/zhang2014)). +* Fix the issue when some invocations of `extractAllGroups` function may trigger "Memory limit exceeded" error. This fixes [#13383](https://github.com/ClickHouse/ClickHouse/issues/13383). [#14889](https://github.com/ClickHouse/ClickHouse/pull/14889) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix SIGSEGV for an attempt to INSERT into StorageFile(fd). [#14887](https://github.com/ClickHouse/ClickHouse/pull/14887) ([Azat Khuzhin](https://github.com/azat)). +* Fix rare error in `SELECT` queries when the queried column has `DEFAULT` expression which depends on the other column which also has `DEFAULT` and not present in select query and not exists on disk. Partially fixes [#14531](https://github.com/ClickHouse/ClickHouse/issues/14531). [#14845](https://github.com/ClickHouse/ClickHouse/pull/14845) ([alesapin](https://github.com/alesapin)). +* Fix wrong monotonicity detection for shrunk `Int -> Int` cast of signed types. It might lead to incorrect query result. This bug is unveiled in [#14513](https://github.com/ClickHouse/ClickHouse/issues/14513). [#14783](https://github.com/ClickHouse/ClickHouse/pull/14783) ([Amos Bird](https://github.com/amosbird)). +* Fixed missed default database name in metadata of materialized view when executing `ALTER ... MODIFY QUERY`. [#14664](https://github.com/ClickHouse/ClickHouse/pull/14664) ([tavplubix](https://github.com/tavplubix)). +* Fix possibly incorrect result of function `has` when LowCardinality and Nullable types are involved. [#14591](https://github.com/ClickHouse/ClickHouse/pull/14591) ([Mike](https://github.com/myrrc)). +* Cleanup data directory after Zookeeper exceptions during CREATE query for tables with ReplicatedMergeTree Engine. [#14563](https://github.com/ClickHouse/ClickHouse/pull/14563) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix rare segfaults in functions with combinator `-Resample`, which could appear in result of overflow with very large parameters. [#14562](https://github.com/ClickHouse/ClickHouse/pull/14562) ([Anton Popov](https://github.com/CurtizJ)). +* Check for array size overflow in `topK` aggregate function. Without this check the user may send a query with carefully crafted parameters that will lead to server crash. This closes [#14452](https://github.com/ClickHouse/ClickHouse/issues/14452). [#14467](https://github.com/ClickHouse/ClickHouse/pull/14467) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Proxy restart/start/stop/reload of SysVinit to systemd (if it is used). [#14460](https://github.com/ClickHouse/ClickHouse/pull/14460) ([Azat Khuzhin](https://github.com/azat)). +* Stop query execution if exception happened in `PipelineExecutor` itself. This could prevent rare possible query hung. [#14334](https://github.com/ClickHouse/ClickHouse/pull/14334) [#14402](https://github.com/ClickHouse/ClickHouse/pull/14402) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix crash during `ALTER` query for table which was created `AS table_function`. Fixes [#14212](https://github.com/ClickHouse/ClickHouse/issues/14212). [#14326](https://github.com/ClickHouse/ClickHouse/pull/14326) ([alesapin](https://github.com/alesapin)). +* Fix exception during ALTER LIVE VIEW query with REFRESH command. LIVE VIEW is an experimental feature. [#14320](https://github.com/ClickHouse/ClickHouse/pull/14320) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix QueryPlan lifetime (for EXPLAIN PIPELINE graph=1) for queries with nested interpreter. [#14315](https://github.com/ClickHouse/ClickHouse/pull/14315) ([Azat Khuzhin](https://github.com/azat)). +* Better check for tuple size in SSD cache complex key external dictionaries. This fixes [#13981](https://github.com/ClickHouse/ClickHouse/issues/13981). [#14313](https://github.com/ClickHouse/ClickHouse/pull/14313) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Disallows `CODEC` on `ALIAS` column type. Fixes [#13911](https://github.com/ClickHouse/ClickHouse/issues/13911). [#14263](https://github.com/ClickHouse/ClickHouse/pull/14263) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix GRANT ALL statement when executed on a non-global level. [#13987](https://github.com/ClickHouse/ClickHouse/pull/13987) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix arrayJoin() capturing in lambda (exception with logical error message was thrown). [#13792](https://github.com/ClickHouse/ClickHouse/pull/13792) ([Azat Khuzhin](https://github.com/azat)). + +#### Experimental Feature + +* Added `db-generator` tool for random database generation by given SELECT queries. It may faciliate reproducing issues when there is only incomplete bug report from the user. [#14442](https://github.com/ClickHouse/ClickHouse/pull/14442) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) [#10973](https://github.com/ClickHouse/ClickHouse/issues/10973) ([ZeDRoman](https://github.com/ZeDRoman)). + +#### Improvement + +* Allow using multi-volume storage configuration in storage Distributed. [#14839](https://github.com/ClickHouse/ClickHouse/pull/14839) ([Pavel Kovalenko](https://github.com/Jokser)). +* Disallow empty time_zone argument in `toStartOf*` type of functions. [#14509](https://github.com/ClickHouse/ClickHouse/pull/14509) ([Bharat Nallan](https://github.com/bharatnc)). +* MySQL handler returns `OK` for queries like `SET @@var = value`. Such statement is ignored. It is needed because some MySQL drivers send `SET @@` query for setup after handshake https://github.com/ClickHouse/ClickHouse/issues/9336#issuecomment-686222422 . [#14469](https://github.com/ClickHouse/ClickHouse/pull/14469) ([BohuTANG](https://github.com/BohuTANG)). +* Now TTLs will be applied during merge if they were not previously materialized. [#14438](https://github.com/ClickHouse/ClickHouse/pull/14438) ([alesapin](https://github.com/alesapin)). +* Now `clickhouse-obfuscator` supports UUID type as proposed in [#13163](https://github.com/ClickHouse/ClickHouse/issues/13163). [#14409](https://github.com/ClickHouse/ClickHouse/pull/14409) ([dimarub2000](https://github.com/dimarub2000)). +* Added new setting `system_events_show_zero_values` as proposed in [#11384](https://github.com/ClickHouse/ClickHouse/issues/11384). [#14404](https://github.com/ClickHouse/ClickHouse/pull/14404) ([dimarub2000](https://github.com/dimarub2000)). +* Implicitly convert primary key to not null in `MaterializeMySQL` (Same as `MySQL`). Fixes [#14114](https://github.com/ClickHouse/ClickHouse/issues/14114). [#14397](https://github.com/ClickHouse/ClickHouse/pull/14397) ([Winter Zhang](https://github.com/zhang2014)). +* Replace wide integers (256 bit) from boost multiprecision with implementation from https://github.com/cerevra/int. 256bit integers are experimental. [#14229](https://github.com/ClickHouse/ClickHouse/pull/14229) ([Artem Zuikov](https://github.com/4ertus2)). +* Add default compression codec for parts in `system.part_log` with the name `default_compression_codec`. [#14116](https://github.com/ClickHouse/ClickHouse/pull/14116) ([alesapin](https://github.com/alesapin)). +* Add precision argument for `DateTime` type. It allows to use `DateTime` name instead of `DateTime64`. [#13761](https://github.com/ClickHouse/ClickHouse/pull/13761) ([Winter Zhang](https://github.com/zhang2014)). +* Added requirepass authorization for `Redis` external dictionary. [#13688](https://github.com/ClickHouse/ClickHouse/pull/13688) ([Ivan Torgashov](https://github.com/it1804)). +* Improvements in `RabbitMQ` engine: added connection and channels failure handling, proper commits, insert failures handling, better exchanges, queue durability and queue resume opportunity, new queue settings. Fixed tests. [#12761](https://github.com/ClickHouse/ClickHouse/pull/12761) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support custom codecs in compact parts. [#12183](https://github.com/ClickHouse/ClickHouse/pull/12183) ([Anton Popov](https://github.com/CurtizJ)). + +#### Performance Improvement + +* Optimize queries with LIMIT/LIMIT BY/ORDER BY for distributed with GROUP BY sharding_key (under `optimize_skip_unused_shards` and `optimize_distributed_group_by_sharding_key`). [#10373](https://github.com/ClickHouse/ClickHouse/pull/10373) ([Azat Khuzhin](https://github.com/azat)). +* Creating sets for multiple `JOIN` and `IN` in parallel. It may slightly improve performance for queries with several different `IN subquery` expressions. [#14412](https://github.com/ClickHouse/ClickHouse/pull/14412) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Improve Kafka engine performance by providing independent thread for each consumer. Separate thread pool for streaming engines (like Kafka). [#13939](https://github.com/ClickHouse/ClickHouse/pull/13939) ([fastio](https://github.com/fastio)). + +#### Build/Testing/Packaging Improvement + +* Lower binary size in debug build by removing debug info from `Functions`. This is needed only for one internal project in Yandex who is using very old linker. [#14549](https://github.com/ClickHouse/ClickHouse/pull/14549) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Prepare for build with clang 11. [#14455](https://github.com/ClickHouse/ClickHouse/pull/14455) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix the logic in backport script. In previous versions it was triggered for any labels of 100% red color. It was strange. [#14433](https://github.com/ClickHouse/ClickHouse/pull/14433) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Integration tests use default base config. All config changes are explicit with main_configs, user_configs and dictionaries parameters for instance. [#13647](https://github.com/ClickHouse/ClickHouse/pull/13647) ([Ilya Yatsishin](https://github.com/qoega)). + + + +## ClickHouse release 20.8 + +### ClickHouse release v20.8.12.2-lts, 2021-01-16 + +#### Bug Fix + +* Fix *If combinator with unary function and Nullable types. [#18806](https://github.com/ClickHouse/ClickHouse/pull/18806) ([Azat Khuzhin](https://github.com/azat)). +* Restrict merges from wide to compact parts. In case of vertical merge it led to broken result part. [#18381](https://github.com/ClickHouse/ClickHouse/pull/18381) ([Anton Popov](https://github.com/CurtizJ)). + + +### ClickHouse release v20.8.11.17-lts, 2020-12-25 + +#### Bug Fix + +* Disable write with AIO during merges because it can lead to extremely rare data corruption of primary key columns during merge. [#18481](https://github.com/ClickHouse/ClickHouse/pull/18481) ([alesapin](https://github.com/alesapin)). +* Fixed `value is too short` error when executing `toType(...)` functions (`toDate`, `toUInt32`, etc) with argument of type `Nullable(String)`. Now such functions return `NULL` on parsing errors instead of throwing exception. Fixes [#7673](https://github.com/ClickHouse/ClickHouse/issues/7673). [#18445](https://github.com/ClickHouse/ClickHouse/pull/18445) ([tavplubix](https://github.com/tavplubix)). +* Fix possible crashes in aggregate functions with combinator `Distinct`, while using two-level aggregation. Fixes [#17682](https://github.com/ClickHouse/ClickHouse/issues/17682). [#18365](https://github.com/ClickHouse/ClickHouse/pull/18365) ([Anton Popov](https://github.com/CurtizJ)). + + +### ClickHouse release v20.8.10.13-lts, 2020-12-24 + +#### Bug Fix + +* When server log rotation was configured using `logger.size` parameter with numeric value larger than 2^32, the logs were not rotated properly. [#17905](https://github.com/ClickHouse/ClickHouse/pull/17905) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fixed incorrect initialization of `max_compress_block_size` in MergeTreeWriterSettings with `min_compress_block_size`. [#17833](https://github.com/ClickHouse/ClickHouse/pull/17833) ([flynn](https://github.com/ucasFL)). +* Fixed problem when ClickHouse fails to resume connection to MySQL servers. [#17681](https://github.com/ClickHouse/ClickHouse/pull/17681) ([Alexander Kazakov](https://github.com/Akazz)). +* Fixed `ALTER` query hang when the corresponding mutation was killed on the different replica. This fixes [#16953](https://github.com/ClickHouse/ClickHouse/issues/16953). [#17499](https://github.com/ClickHouse/ClickHouse/pull/17499) ([alesapin](https://github.com/alesapin)). +* Fixed a bug when mark cache size was underestimated by ClickHouse. It may happen when there are a lot of tiny files with marks. [#17496](https://github.com/ClickHouse/ClickHouse/pull/17496) ([alesapin](https://github.com/alesapin)). +* Fixed `ORDER BY` with enabled setting `optimize_redundant_functions_in_order_by`. [#17471](https://github.com/ClickHouse/ClickHouse/pull/17471) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed `ColumnConst` comparison which leads to crash. This fixed [#17088](https://github.com/ClickHouse/ClickHouse/issues/17088) . [#17135](https://github.com/ClickHouse/ClickHouse/pull/17135) ([Amos Bird](https://github.com/amosbird)). +* Fixed bug when `ON CLUSTER` queries may hang forever for non-leader ReplicatedMergeTreeTables. [#17089](https://github.com/ClickHouse/ClickHouse/pull/17089) ([alesapin](https://github.com/alesapin)). +* Avoid unnecessary network errors for remote queries which may be cancelled while execution, like queries with `LIMIT`. [#17006](https://github.com/ClickHouse/ClickHouse/pull/17006) ([Azat Khuzhin](https://github.com/azat)). +* Reresolve the IP of the `format_avro_schema_registry_url` in case of errors. [#16985](https://github.com/ClickHouse/ClickHouse/pull/16985) ([filimonov](https://github.com/filimonov)). +* Fixed possible server crash after `ALTER TABLE ... MODIFY COLUMN ... NewType` when `SELECT` have `WHERE` expression on altering column and alter does not finished yet. [#16968](https://github.com/ClickHouse/ClickHouse/pull/16968) ([Amos Bird](https://github.com/amosbird)). +* Install script should always create subdirs in config folders. This is only relevant for Docker build with custom config. [#16936](https://github.com/ClickHouse/ClickHouse/pull/16936) ([filimonov](https://github.com/filimonov)). +* Fixed possible error `Illegal type of argument` for queries with `ORDER BY`. Fixes [#16580](https://github.com/ClickHouse/ClickHouse/issues/16580). [#16928](https://github.com/ClickHouse/ClickHouse/pull/16928) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Abort multipart upload if no data was written to WriteBufferFromS3. [#16840](https://github.com/ClickHouse/ClickHouse/pull/16840) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fixed crash when using `any` without any arguments. This fixes [#16803](https://github.com/ClickHouse/ClickHouse/issues/16803). [#16826](https://github.com/ClickHouse/ClickHouse/pull/16826) ([Amos Bird](https://github.com/amosbird)). +* Fixed `IN` operator over several columns and tuples with enabled `transform_null_in` setting. Fixes [#15310](https://github.com/ClickHouse/ClickHouse/issues/15310). [#16722](https://github.com/ClickHouse/ClickHouse/pull/16722) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed inconsistent behaviour of `optimize_read_in_order/optimize_aggregation_in_order` with max_threads > 0 and expression in ORDER BY. [#16637](https://github.com/ClickHouse/ClickHouse/pull/16637) ([Azat Khuzhin](https://github.com/azat)). +* Fixed the issue when query optimization was producing wrong result if query contains `ARRAY JOIN`. [#17887](https://github.com/ClickHouse/ClickHouse/pull/17887) ([sundyli](https://github.com/sundy-li)). +* Query is finished faster in case of exception. Cancel execution on remote replicas if exception happens. [#15578](https://github.com/ClickHouse/ClickHouse/pull/15578) ([Azat Khuzhin](https://github.com/azat)). + + +### ClickHouse release v20.8.6.6-lts, 2020-11-13 + +#### Bug Fix + +* Fix rare silent crashes when query profiler is on and ClickHouse is installed on OS with glibc version that has (supposedly) broken asynchronous unwind tables for some functions. This fixes [#15301](https://github.com/ClickHouse/ClickHouse/issues/15301). This fixes [#13098](https://github.com/ClickHouse/ClickHouse/issues/13098). [#16846](https://github.com/ClickHouse/ClickHouse/pull/16846) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now when parsing AVRO from input the LowCardinality is removed from type. Fixes [#16188](https://github.com/ClickHouse/ClickHouse/issues/16188). [#16521](https://github.com/ClickHouse/ClickHouse/pull/16521) ([Mike](https://github.com/myrrc)). +* Fix rapid growth of metadata when using MySQL Master -> MySQL Slave -> ClickHouse MaterializeMySQL Engine, and `slave_parallel_worker` enabled on MySQL Slave, by properly shrinking GTID sets. This fixes [#15951](https://github.com/ClickHouse/ClickHouse/issues/15951). [#16504](https://github.com/ClickHouse/ClickHouse/pull/16504) ([TCeason](https://github.com/TCeason)). +* Fix DROP TABLE for Distributed (racy with INSERT). [#16409](https://github.com/ClickHouse/ClickHouse/pull/16409) ([Azat Khuzhin](https://github.com/azat)). +* Fix processing of very large entries in replication queue. Very large entries may appear in ALTER queries if table structure is extremely large (near 1 MB). This fixes [#16307](https://github.com/ClickHouse/ClickHouse/issues/16307). [#16332](https://github.com/ClickHouse/ClickHouse/pull/16332) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the inconsistent behaviour when a part of return data could be dropped because the set for its filtration wasn't created. [#16308](https://github.com/ClickHouse/ClickHouse/pull/16308) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix bug with MySQL database. When MySQL server used as database engine is down some queries raise Exception, because they try to get tables from disabled server, while it's unnecessary. For example, query `SELECT ... FROM system.parts` should work only with MergeTree tables and don't touch MySQL database at all. [#16032](https://github.com/ClickHouse/ClickHouse/pull/16032) ([Kruglov Pavel](https://github.com/Avogar)). + + +### ClickHouse release v20.8.5.45-lts, 2020-10-29 + +#### Bug Fix + +* Fix double free in case of exception in function `dictGet`. It could have happened if dictionary was loaded with error. [#16429](https://github.com/ClickHouse/ClickHouse/pull/16429) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix group by with totals/rollup/cube modifers and min/max functions over group by keys. Fixes [#16393](https://github.com/ClickHouse/ClickHouse/issues/16393). [#16397](https://github.com/ClickHouse/ClickHouse/pull/16397) ([Anton Popov](https://github.com/CurtizJ)). +* Fix async Distributed INSERT w/ prefer_localhost_replica=0 and internal_replication. [#16358](https://github.com/ClickHouse/ClickHouse/pull/16358) ([Azat Khuzhin](https://github.com/azat)). +* Fix a possible memory leak during `GROUP BY` with string keys, caused by an error in `TwoLevelStringHashTable` implementation. [#16264](https://github.com/ClickHouse/ClickHouse/pull/16264) ([Amos Bird](https://github.com/amosbird)). +* Fix the case when memory can be overallocated regardless to the limit. This closes [#14560](https://github.com/ClickHouse/ClickHouse/issues/14560). [#16206](https://github.com/ClickHouse/ClickHouse/pull/16206) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `ALTER MODIFY ... ORDER BY` query hang for `ReplicatedVersionedCollapsingMergeTree`. This fixes [#15980](https://github.com/ClickHouse/ClickHouse/issues/15980). [#16011](https://github.com/ClickHouse/ClickHouse/pull/16011) ([alesapin](https://github.com/alesapin)). +* Fix collate name & charset name parser and support `length = 0` for string type. [#16008](https://github.com/ClickHouse/ClickHouse/pull/16008) ([Winter Zhang](https://github.com/zhang2014)). +* Allow to use direct layout for dictionaries with complex keys. [#16007](https://github.com/ClickHouse/ClickHouse/pull/16007) ([Anton Popov](https://github.com/CurtizJ)). +* Prevent replica hang for 5-10 mins when replication error happens after a period of inactivity. [#15987](https://github.com/ClickHouse/ClickHouse/pull/15987) ([filimonov](https://github.com/filimonov)). +* Fix rare segfaults when inserting into or selecting from MaterializedView and concurrently dropping target table (for Atomic database engine). [#15984](https://github.com/ClickHouse/ClickHouse/pull/15984) ([tavplubix](https://github.com/tavplubix)). +* Fix ambiguity in parsing of settings profiles: `CREATE USER ... SETTINGS profile readonly` is now considered as using a profile named `readonly`, not a setting named `profile` with the readonly constraint. This fixes [#15628](https://github.com/ClickHouse/ClickHouse/issues/15628). [#15982](https://github.com/ClickHouse/ClickHouse/pull/15982) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix a crash when database creation fails. [#15954](https://github.com/ClickHouse/ClickHouse/pull/15954) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed `DROP TABLE IF EXISTS` failure with `Table ... does not exist` error when table is concurrently renamed (for Atomic database engine). Fixed rare deadlock when concurrently executing some DDL queries with multiple tables (like `DROP DATABASE` and `RENAME TABLE`) Fixed `DROP/DETACH DATABASE` failure with `Table ... does not exist` when concurrently executing `DROP/DETACH TABLE`. [#15934](https://github.com/ClickHouse/ClickHouse/pull/15934) ([tavplubix](https://github.com/tavplubix)). +* Fix incorrect empty result for query from `Distributed` table if query has `WHERE`, `PREWHERE` and `GLOBAL IN`. Fixes [#15792](https://github.com/ClickHouse/ClickHouse/issues/15792). [#15933](https://github.com/ClickHouse/ClickHouse/pull/15933) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix possible deadlocks in RBAC. [#15875](https://github.com/ClickHouse/ClickHouse/pull/15875) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix exception `Block structure mismatch` in `SELECT ... ORDER BY DESC` queries which were executed after `ALTER MODIFY COLUMN` query. Fixes [#15800](https://github.com/ClickHouse/ClickHouse/issues/15800). [#15852](https://github.com/ClickHouse/ClickHouse/pull/15852) ([alesapin](https://github.com/alesapin)). +* Fix some cases of queries, in which only virtual columns are selected. Previously `Not found column _nothing in block` exception may be thrown. Fixes [#12298](https://github.com/ClickHouse/ClickHouse/issues/12298). [#15756](https://github.com/ClickHouse/ClickHouse/pull/15756) ([Anton Popov](https://github.com/CurtizJ)). +* Fix error `Cannot find column` which may happen at insertion into `MATERIALIZED VIEW` in case if query for `MV` containes `ARRAY JOIN`. [#15717](https://github.com/ClickHouse/ClickHouse/pull/15717) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed too low default value of `max_replicated_logs_to_keep` setting, which might cause replicas to become lost too often. Improve lost replica recovery process by choosing the most up-to-date replica to clone. Also do not remove old parts from lost replica, detach them instead. [#15701](https://github.com/ClickHouse/ClickHouse/pull/15701) ([tavplubix](https://github.com/tavplubix)). +* Fix error `Cannot add simple transform to empty Pipe` which happened while reading from `Buffer` table which has different structure than destination table. It was possible if destination table returned empty result for query. Fixes [#15529](https://github.com/ClickHouse/ClickHouse/issues/15529). [#15662](https://github.com/ClickHouse/ClickHouse/pull/15662) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed bug with globs in S3 table function, region from URL was not applied to S3 client configuration. [#15646](https://github.com/ClickHouse/ClickHouse/pull/15646) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Decrement the `ReadonlyReplica` metric when detaching read-only tables. This fixes [#15598](https://github.com/ClickHouse/ClickHouse/issues/15598). [#15592](https://github.com/ClickHouse/ClickHouse/pull/15592) ([sundyli](https://github.com/sundy-li)). +* Throw an error when a single parameter is passed to ReplicatedMergeTree instead of ignoring it. [#15516](https://github.com/ClickHouse/ClickHouse/pull/15516) ([nvartolomei](https://github.com/nvartolomei)). + +#### Improvement + +* Now it's allowed to execute `ALTER ... ON CLUSTER` queries regardless of the `` setting in cluster config. [#16075](https://github.com/ClickHouse/ClickHouse/pull/16075) ([alesapin](https://github.com/alesapin)). +* Unfold `{database}`, `{table}` and `{uuid}` macros in `ReplicatedMergeTree` arguments on table creation. [#16159](https://github.com/ClickHouse/ClickHouse/pull/16159) ([tavplubix](https://github.com/tavplubix)). + + +### ClickHouse release v20.8.4.11-lts, 2020-10-09 + +#### Bug Fix + +* Fix the order of destruction for resources in `ReadFromStorage` step of query plan. It might cause crashes in rare cases. Possibly connected with [#15610](https://github.com/ClickHouse/ClickHouse/issues/15610). [#15645](https://github.com/ClickHouse/ClickHouse/pull/15645) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed `Element ... is not a constant expression` error when using `JSON*` function result in `VALUES`, `LIMIT` or right side of `IN` operator. [#15589](https://github.com/ClickHouse/ClickHouse/pull/15589) ([tavplubix](https://github.com/tavplubix)). +* Prevent the possibility of error message `Could not calculate available disk space (statvfs), errno: 4, strerror: Interrupted system call`. This fixes [#15541](https://github.com/ClickHouse/ClickHouse/issues/15541). [#15557](https://github.com/ClickHouse/ClickHouse/pull/15557) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Significantly reduce memory usage in AggregatingInOrderTransform/optimize_aggregation_in_order. [#15543](https://github.com/ClickHouse/ClickHouse/pull/15543) ([Azat Khuzhin](https://github.com/azat)). +* Mutation might hang waiting for some non-existent part after `MOVE` or `REPLACE PARTITION` or, in rare cases, after `DETACH` or `DROP PARTITION`. It's fixed. [#15537](https://github.com/ClickHouse/ClickHouse/pull/15537) ([tavplubix](https://github.com/tavplubix)). +* Fix bug when `ILIKE` operator stops being case insensitive if `LIKE` with the same pattern was executed. [#15536](https://github.com/ClickHouse/ClickHouse/pull/15536) ([alesapin](https://github.com/alesapin)). +* Fix `Missing columns` errors when selecting columns which absent in data, but depend on other columns which also absent in data. Fixes [#15530](https://github.com/ClickHouse/ClickHouse/issues/15530). [#15532](https://github.com/ClickHouse/ClickHouse/pull/15532) ([alesapin](https://github.com/alesapin)). +* Fix bug with event subscription in DDLWorker which rarely may lead to query hangs in `ON CLUSTER`. Introduced in [#13450](https://github.com/ClickHouse/ClickHouse/issues/13450). [#15477](https://github.com/ClickHouse/ClickHouse/pull/15477) ([alesapin](https://github.com/alesapin)). +* Report proper error when the second argument of `boundingRatio` aggregate function has a wrong type. [#15407](https://github.com/ClickHouse/ClickHouse/pull/15407) ([detailyang](https://github.com/detailyang)). +* Fix race condition during MergeTree table rename and background cleanup. [#15304](https://github.com/ClickHouse/ClickHouse/pull/15304) ([alesapin](https://github.com/alesapin)). +* Fix rare race condition on server startup when system.logs are enabled. [#15300](https://github.com/ClickHouse/ClickHouse/pull/15300) ([alesapin](https://github.com/alesapin)). +* Fix MSan report in QueryLog. Uninitialized memory can be used for the field `memory_usage`. [#15258](https://github.com/ClickHouse/ClickHouse/pull/15258) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix instance crash when using joinGet with LowCardinality types. This fixes [#15214](https://github.com/ClickHouse/ClickHouse/issues/15214). [#15220](https://github.com/ClickHouse/ClickHouse/pull/15220) ([Amos Bird](https://github.com/amosbird)). +* Fix bug in table engine `Buffer` which does not allow to insert data of new structure into `Buffer` after `ALTER` query. Fixes [#15117](https://github.com/ClickHouse/ClickHouse/issues/15117). [#15192](https://github.com/ClickHouse/ClickHouse/pull/15192) ([alesapin](https://github.com/alesapin)). +* Adjust decimals field size in mysql column definition packet. [#15152](https://github.com/ClickHouse/ClickHouse/pull/15152) ([maqroll](https://github.com/maqroll)). +* We already use padded comparison between String and FixedString (https://github.com/ClickHouse/ClickHouse/blob/master/src/Functions/FunctionsComparison.h#L333). This PR applies the same logic to field comparison which corrects the usage of FixedString as primary keys. This fixes [#14908](https://github.com/ClickHouse/ClickHouse/issues/14908). [#15033](https://github.com/ClickHouse/ClickHouse/pull/15033) ([Amos Bird](https://github.com/amosbird)). +* If function `bar` was called with specifically crafted arguments, buffer overflow was possible. This closes [#13926](https://github.com/ClickHouse/ClickHouse/issues/13926). [#15028](https://github.com/ClickHouse/ClickHouse/pull/15028) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `Cannot rename ... errno: 22, strerror: Invalid argument` error on DDL query execution in Atomic database when running clickhouse-server in docker on Mac OS. [#15024](https://github.com/ClickHouse/ClickHouse/pull/15024) ([tavplubix](https://github.com/tavplubix)). +* Now settings `number_of_free_entries_in_pool_to_execute_mutation` and `number_of_free_entries_in_pool_to_lower_max_size_of_merge` can be equal to `background_pool_size`. [#14975](https://github.com/ClickHouse/ClickHouse/pull/14975) ([alesapin](https://github.com/alesapin)). +* Fix to make predicate push down work when subquery contains finalizeAggregation function. Fixes [#14847](https://github.com/ClickHouse/ClickHouse/issues/14847). [#14937](https://github.com/ClickHouse/ClickHouse/pull/14937) ([filimonov](https://github.com/filimonov)). +* Publish CPU frequencies per logical core in `system.asynchronous_metrics`. This fixes [#14923](https://github.com/ClickHouse/ClickHouse/issues/14923). [#14924](https://github.com/ClickHouse/ClickHouse/pull/14924) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fixed `.metadata.tmp File exists` error when using `MaterializeMySQL` database engine. [#14898](https://github.com/ClickHouse/ClickHouse/pull/14898) ([Winter Zhang](https://github.com/zhang2014)). +* Fix a problem where the server may get stuck on startup while talking to ZooKeeper, if the configuration files have to be fetched from ZK (using the `from_zk` include option). This fixes [#14814](https://github.com/ClickHouse/ClickHouse/issues/14814). [#14843](https://github.com/ClickHouse/ClickHouse/pull/14843) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fix wrong monotonicity detection for shrunk `Int -> Int` cast of signed types. It might lead to incorrect query result. This bug is unveiled in [#14513](https://github.com/ClickHouse/ClickHouse/issues/14513). [#14783](https://github.com/ClickHouse/ClickHouse/pull/14783) ([Amos Bird](https://github.com/amosbird)). +* Fixed the incorrect sorting order of `Nullable` column. This fixes [#14344](https://github.com/ClickHouse/ClickHouse/issues/14344). [#14495](https://github.com/ClickHouse/ClickHouse/pull/14495) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). + +#### Improvement + +* Now it's possible to change the type of version column for `VersionedCollapsingMergeTree` with `ALTER` query. [#15442](https://github.com/ClickHouse/ClickHouse/pull/15442) ([alesapin](https://github.com/alesapin)). + + +### ClickHouse release v20.8.3.18-stable, 2020-09-18 + +#### Bug Fix + +* Fix the issue when some invocations of `extractAllGroups` function may trigger "Memory limit exceeded" error. This fixes [#13383](https://github.com/ClickHouse/ClickHouse/issues/13383). [#14889](https://github.com/ClickHouse/ClickHouse/pull/14889) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix SIGSEGV for an attempt to INSERT into StorageFile(fd). [#14887](https://github.com/ClickHouse/ClickHouse/pull/14887) ([Azat Khuzhin](https://github.com/azat)). +* Fix rare error in `SELECT` queries when the queried column has `DEFAULT` expression which depends on the other column which also has `DEFAULT` and not present in select query and not exists on disk. Partially fixes [#14531](https://github.com/ClickHouse/ClickHouse/issues/14531). [#14845](https://github.com/ClickHouse/ClickHouse/pull/14845) ([alesapin](https://github.com/alesapin)). +* Fixed missed default database name in metadata of materialized view when executing `ALTER ... MODIFY QUERY`. [#14664](https://github.com/ClickHouse/ClickHouse/pull/14664) ([tavplubix](https://github.com/tavplubix)). +* Fix bug when `ALTER UPDATE` mutation with Nullable column in assignment expression and constant value (like `UPDATE x = 42`) leads to incorrect value in column or segfault. Fixes [#13634](https://github.com/ClickHouse/ClickHouse/issues/13634), [#14045](https://github.com/ClickHouse/ClickHouse/issues/14045). [#14646](https://github.com/ClickHouse/ClickHouse/pull/14646) ([alesapin](https://github.com/alesapin)). +* Fix wrong Decimal multiplication result caused wrong decimal scale of result column. [#14603](https://github.com/ClickHouse/ClickHouse/pull/14603) ([Artem Zuikov](https://github.com/4ertus2)). +* Added the checker as neither calling `lc->isNullable()` nor calling `ls->getDictionaryPtr()->isNullable()` would return the correct result. [#14591](https://github.com/ClickHouse/ClickHouse/pull/14591) ([myrrc](https://github.com/myrrc)). +* Cleanup data directory after Zookeeper exceptions during CreateQuery for StorageReplicatedMergeTree Engine. [#14563](https://github.com/ClickHouse/ClickHouse/pull/14563) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix rare segfaults in functions with combinator -Resample, which could appear in result of overflow with very large parameters. [#14562](https://github.com/ClickHouse/ClickHouse/pull/14562) ([Anton Popov](https://github.com/CurtizJ)). + +#### Improvement + +* Speed up server shutdown process if there are ongoing S3 requests. [#14858](https://github.com/ClickHouse/ClickHouse/pull/14858) ([Pavel Kovalenko](https://github.com/Jokser)). +* Allow using multi-volume storage configuration in storage Distributed. [#14839](https://github.com/ClickHouse/ClickHouse/pull/14839) ([Pavel Kovalenko](https://github.com/Jokser)). +* Speed up server shutdown process if there are ongoing S3 requests. [#14496](https://github.com/ClickHouse/ClickHouse/pull/14496) ([Pavel Kovalenko](https://github.com/Jokser)). +* Support custom codecs in compact parts. [#12183](https://github.com/ClickHouse/ClickHouse/pull/12183) ([Anton Popov](https://github.com/CurtizJ)). + + +### ClickHouse release v20.8.2.3-stable, 2020-09-08 + +#### Backward Incompatible Change + +* Now `OPTIMIZE FINAL` query does not recalculate TTL for parts that were added before TTL was created. Use `ALTER TABLE ... MATERIALIZE TTL` once to calculate them, after that `OPTIMIZE FINAL` will evaluate TTL's properly. This behavior never worked for replicated tables. [#14220](https://github.com/ClickHouse/ClickHouse/pull/14220) ([alesapin](https://github.com/alesapin)). +* Extend `parallel_distributed_insert_select` setting, adding an option to run `INSERT` into local table. The setting changes type from `Bool` to `UInt64`, so the values `false` and `true` are no longer supported. If you have these values in server configuration, the server will not start. Please replace them with `0` and `1`, respectively. [#14060](https://github.com/ClickHouse/ClickHouse/pull/14060) ([Azat Khuzhin](https://github.com/azat)). +* Remove support for the `ODBCDriver` input/output format. This was a deprecated format once used for communication with the ClickHouse ODBC driver, now long superseded by the `ODBCDriver2` format. Resolves [#13629](https://github.com/ClickHouse/ClickHouse/issues/13629). [#13847](https://github.com/ClickHouse/ClickHouse/pull/13847) ([hexiaoting](https://github.com/hexiaoting)). +* When upgrading from versions older than 20.5, if rolling update is performed and cluster contains both versions 20.5 or greater and less than 20.5, if ClickHouse nodes with old versions are restarted and old version has been started up in presence of newer versions, it may lead to `Part ... intersects previous part` errors. To prevent this error, first install newer clickhouse-server packages on all cluster nodes and then do restarts (so, when clickhouse-server is restarted, it will start up with the new version). + +#### New Feature + +* Add the ability to specify `Default` compression codec for columns that correspond to settings specified in `config.xml`. Implements: [#9074](https://github.com/ClickHouse/ClickHouse/issues/9074). [#14049](https://github.com/ClickHouse/ClickHouse/pull/14049) ([alesapin](https://github.com/alesapin)). +* Support Kerberos authentication in Kafka, using `krb5` and `cyrus-sasl` libraries. [#12771](https://github.com/ClickHouse/ClickHouse/pull/12771) ([Ilya Golshtein](https://github.com/ilejn)). +* Add function `normalizeQuery` that replaces literals, sequences of literals and complex aliases with placeholders. Add function `normalizedQueryHash` that returns identical 64bit hash values for similar queries. It helps to analyze query log. This closes [#11271](https://github.com/ClickHouse/ClickHouse/issues/11271). [#13816](https://github.com/ClickHouse/ClickHouse/pull/13816) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add `time_zones` table. [#13880](https://github.com/ClickHouse/ClickHouse/pull/13880) ([Bharat Nallan](https://github.com/bharatnc)). +* Add function `defaultValueOfTypeName` that returns the default value for a given type. [#13877](https://github.com/ClickHouse/ClickHouse/pull/13877) ([hcz](https://github.com/hczhcz)). +* Add `countDigits(x)` function that count number of decimal digits in integer or decimal column. Add `isDecimalOverflow(d, [p])` function that checks if the value in Decimal column is out of its (or specified) precision. [#14151](https://github.com/ClickHouse/ClickHouse/pull/14151) ([Artem Zuikov](https://github.com/4ertus2)). +* Add `quantileExactLow` and `quantileExactHigh` implementations with respective aliases for `medianExactLow` and `medianExactHigh`. [#13818](https://github.com/ClickHouse/ClickHouse/pull/13818) ([Bharat Nallan](https://github.com/bharatnc)). +* Added `date_trunc` function that truncates a date/time value to a specified date/time part. [#13888](https://github.com/ClickHouse/ClickHouse/pull/13888) ([Vladimir Golovchenko](https://github.com/vladimir-golovchenko)). +* Add new optional section `` to the main config. [#13425](https://github.com/ClickHouse/ClickHouse/pull/13425) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add `ALTER SAMPLE BY` statement that allows to change table sample clause. [#13280](https://github.com/ClickHouse/ClickHouse/pull/13280) ([Amos Bird](https://github.com/amosbird)). +* Function `position` now supports optional `start_pos` argument. [#13237](https://github.com/ClickHouse/ClickHouse/pull/13237) ([vdimir](https://github.com/vdimir)). + +#### Bug Fix + +* Fix visible data clobbering by progress bar in client in interactive mode. This fixes [#12562](https://github.com/ClickHouse/ClickHouse/issues/12562) and [#13369](https://github.com/ClickHouse/ClickHouse/issues/13369) and [#13584](https://github.com/ClickHouse/ClickHouse/issues/13584) and fixes [#12964](https://github.com/ClickHouse/ClickHouse/issues/12964). [#13691](https://github.com/ClickHouse/ClickHouse/pull/13691) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed incorrect sorting order if `LowCardinality` column when sorting by multiple columns. This fixes [#13958](https://github.com/ClickHouse/ClickHouse/issues/13958). [#14223](https://github.com/ClickHouse/ClickHouse/pull/14223) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Check for array size overflow in `topK` aggregate function. Without this check the user may send a query with carefully crafted parameters that will lead to server crash. This closes [#14452](https://github.com/ClickHouse/ClickHouse/issues/14452). [#14467](https://github.com/ClickHouse/ClickHouse/pull/14467) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix bug which can lead to wrong merges assignment if table has partitions with a single part. [#14444](https://github.com/ClickHouse/ClickHouse/pull/14444) ([alesapin](https://github.com/alesapin)). +* Stop query execution if exception happened in `PipelineExecutor` itself. This could prevent rare possible query hung. Continuation of [#14334](https://github.com/ClickHouse/ClickHouse/issues/14334). [#14402](https://github.com/ClickHouse/ClickHouse/pull/14402) [#14334](https://github.com/ClickHouse/ClickHouse/pull/14334) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix crash during `ALTER` query for table which was created `AS table_function`. Fixes [#14212](https://github.com/ClickHouse/ClickHouse/issues/14212). [#14326](https://github.com/ClickHouse/ClickHouse/pull/14326) ([alesapin](https://github.com/alesapin)). +* Fix exception during ALTER LIVE VIEW query with REFRESH command. Live view is an experimental feature. [#14320](https://github.com/ClickHouse/ClickHouse/pull/14320) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix QueryPlan lifetime (for EXPLAIN PIPELINE graph=1) for queries with nested interpreter. [#14315](https://github.com/ClickHouse/ClickHouse/pull/14315) ([Azat Khuzhin](https://github.com/azat)). +* Fix segfault in `clickhouse-odbc-bridge` during schema fetch from some external sources. This PR fixes [#13861](https://github.com/ClickHouse/ClickHouse/issues/13861). [#14267](https://github.com/ClickHouse/ClickHouse/pull/14267) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix crash in mark inclusion search introduced in [#12277](https://github.com/ClickHouse/ClickHouse/pull/12277). [#14225](https://github.com/ClickHouse/ClickHouse/pull/14225) ([Amos Bird](https://github.com/amosbird)). +* Fix creation of tables with named tuples. This fixes [#13027](https://github.com/ClickHouse/ClickHouse/issues/13027). [#14143](https://github.com/ClickHouse/ClickHouse/pull/14143) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix formatting of minimal negative decimal numbers. This fixes [#14111](https://github.com/ClickHouse/ClickHouse/issues/14111). [#14119](https://github.com/ClickHouse/ClickHouse/pull/14119) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fix `DistributedFilesToInsert` metric (zeroed when it should not). [#14095](https://github.com/ClickHouse/ClickHouse/pull/14095) ([Azat Khuzhin](https://github.com/azat)). +* Fix `pointInPolygon` with const 2d array as polygon. [#14079](https://github.com/ClickHouse/ClickHouse/pull/14079) ([Alexey Ilyukhov](https://github.com/livace)). +* Fixed wrong mount point in extra info for `Poco::Exception: no space left on device`. [#14050](https://github.com/ClickHouse/ClickHouse/pull/14050) ([tavplubix](https://github.com/tavplubix)). +* Fix GRANT ALL statement when executed on a non-global level. [#13987](https://github.com/ClickHouse/ClickHouse/pull/13987) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix parser to reject create table as table function with engine. [#13940](https://github.com/ClickHouse/ClickHouse/pull/13940) ([hcz](https://github.com/hczhcz)). +* Fix wrong results in select queries with `DISTINCT` keyword and subqueries with UNION ALL in case `optimize_duplicate_order_by_and_distinct` setting is enabled. [#13925](https://github.com/ClickHouse/ClickHouse/pull/13925) ([Artem Zuikov](https://github.com/4ertus2)). +* Fixed potential deadlock when renaming `Distributed` table. [#13922](https://github.com/ClickHouse/ClickHouse/pull/13922) ([tavplubix](https://github.com/tavplubix)). +* Fix incorrect sorting for `FixedString` columns when sorting by multiple columns. Fixes [#13182](https://github.com/ClickHouse/ClickHouse/issues/13182). [#13887](https://github.com/ClickHouse/ClickHouse/pull/13887) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix potentially imprecise result of `topK`/`topKWeighted` merge (with non-default parameters). [#13817](https://github.com/ClickHouse/ClickHouse/pull/13817) ([Azat Khuzhin](https://github.com/azat)). +* Fix reading from MergeTree table with INDEX of type SET fails when comparing against NULL. This fixes [#13686](https://github.com/ClickHouse/ClickHouse/issues/13686). [#13793](https://github.com/ClickHouse/ClickHouse/pull/13793) ([Amos Bird](https://github.com/amosbird)). +* Fix `arrayJoin` capturing in lambda (LOGICAL_ERROR). [#13792](https://github.com/ClickHouse/ClickHouse/pull/13792) ([Azat Khuzhin](https://github.com/azat)). +* Add step overflow check in function `range`. [#13790](https://github.com/ClickHouse/ClickHouse/pull/13790) ([Azat Khuzhin](https://github.com/azat)). +* Fixed `Directory not empty` error when concurrently executing `DROP DATABASE` and `CREATE TABLE`. [#13756](https://github.com/ClickHouse/ClickHouse/pull/13756) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add range check for `h3KRing` function. This fixes [#13633](https://github.com/ClickHouse/ClickHouse/issues/13633). [#13752](https://github.com/ClickHouse/ClickHouse/pull/13752) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix race condition between DETACH and background merges. Parts may revive after detach. This is continuation of [#8602](https://github.com/ClickHouse/ClickHouse/issues/8602) that did not fix the issue but introduced a test that started to fail in very rare cases, demonstrating the issue. [#13746](https://github.com/ClickHouse/ClickHouse/pull/13746) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix logging Settings.Names/Values when log_queries_min_type > QUERY_START. [#13737](https://github.com/ClickHouse/ClickHouse/pull/13737) ([Azat Khuzhin](https://github.com/azat)). +* Fixes `/replicas_status` endpoint response status code when verbose=1. [#13722](https://github.com/ClickHouse/ClickHouse/pull/13722) ([javi santana](https://github.com/javisantana)). +* Fix incorrect message in `clickhouse-server.init` while checking user and group. [#13711](https://github.com/ClickHouse/ClickHouse/pull/13711) ([ylchou](https://github.com/ylchou)). +* Do not optimize any(arrayJoin()) -> arrayJoin() under `optimize_move_functions_out_of_any` setting. [#13681](https://github.com/ClickHouse/ClickHouse/pull/13681) ([Azat Khuzhin](https://github.com/azat)). +* Fix crash in JOIN with StorageMerge and `set enable_optimize_predicate_expression=1`. [#13679](https://github.com/ClickHouse/ClickHouse/pull/13679) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix typo in error message about `The value of 'number_of_free_entries_in_pool_to_lower_max_size_of_merge' setting`. [#13678](https://github.com/ClickHouse/ClickHouse/pull/13678) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Concurrent `ALTER ... REPLACE/MOVE PARTITION ...` queries might cause deadlock. It's fixed. [#13626](https://github.com/ClickHouse/ClickHouse/pull/13626) ([tavplubix](https://github.com/tavplubix)). +* Fixed the behaviour when sometimes cache-dictionary returned default value instead of present value from source. [#13624](https://github.com/ClickHouse/ClickHouse/pull/13624) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix secondary indices corruption in compact parts. Compact parts are experimental feature. [#13538](https://github.com/ClickHouse/ClickHouse/pull/13538) ([Anton Popov](https://github.com/CurtizJ)). +* Fix premature `ON CLUSTER` timeouts for queries that must be executed on a single replica. Fixes [#6704](https://github.com/ClickHouse/ClickHouse/issues/6704), [#7228](https://github.com/ClickHouse/ClickHouse/issues/7228), [#13361](https://github.com/ClickHouse/ClickHouse/issues/13361), [#11884](https://github.com/ClickHouse/ClickHouse/issues/11884). [#13450](https://github.com/ClickHouse/ClickHouse/pull/13450) ([alesapin](https://github.com/alesapin)). +* Fix wrong code in function `netloc`. This fixes [#13335](https://github.com/ClickHouse/ClickHouse/issues/13335). [#13446](https://github.com/ClickHouse/ClickHouse/pull/13446) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix possible race in `StorageMemory`. [#13416](https://github.com/ClickHouse/ClickHouse/pull/13416) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix missing or excessive headers in `TSV/CSVWithNames` formats in HTTP protocol. This fixes [#12504](https://github.com/ClickHouse/ClickHouse/issues/12504). [#13343](https://github.com/ClickHouse/ClickHouse/pull/13343) ([Azat Khuzhin](https://github.com/azat)). +* Fix parsing row policies from users.xml when names of databases or tables contain dots. This fixes [#5779](https://github.com/ClickHouse/ClickHouse/issues/5779), [#12527](https://github.com/ClickHouse/ClickHouse/issues/12527). [#13199](https://github.com/ClickHouse/ClickHouse/pull/13199) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix access to `redis` dictionary after connection was dropped once. It may happen with `cache` and `direct` dictionary layouts. [#13082](https://github.com/ClickHouse/ClickHouse/pull/13082) ([Anton Popov](https://github.com/CurtizJ)). +* Removed wrong auth access check when using ClickHouseDictionarySource to query remote tables. [#12756](https://github.com/ClickHouse/ClickHouse/pull/12756) ([sundyli](https://github.com/sundy-li)). +* Properly distinguish subqueries in some cases for common subexpression elimination. [#8333](https://github.com/ClickHouse/ClickHouse/issues/8333). [#8367](https://github.com/ClickHouse/ClickHouse/pull/8367) ([Amos Bird](https://github.com/amosbird)). + +#### Improvement + +* Disallows `CODEC` on `ALIAS` column type. Fixes [#13911](https://github.com/ClickHouse/ClickHouse/issues/13911). [#14263](https://github.com/ClickHouse/ClickHouse/pull/14263) ([Bharat Nallan](https://github.com/bharatnc)). +* When waiting for a dictionary update to complete, use the timeout specified by `query_wait_timeout_milliseconds` setting instead of a hard-coded value. [#14105](https://github.com/ClickHouse/ClickHouse/pull/14105) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add setting `min_index_granularity_bytes` that protects against accidentally creating a table with very low `index_granularity_bytes` setting. [#14139](https://github.com/ClickHouse/ClickHouse/pull/14139) ([Bharat Nallan](https://github.com/bharatnc)). +* Now it's possible to fetch partitions from clusters that use different ZooKeeper: `ALTER TABLE table_name FETCH PARTITION partition_expr FROM 'zk-name:/path-in-zookeeper'`. It's useful for shipping data to new clusters. [#14155](https://github.com/ClickHouse/ClickHouse/pull/14155) ([Amos Bird](https://github.com/amosbird)). +* Slightly better performance of Memory table if it was constructed from a huge number of very small blocks (that's unlikely). Author of the idea: [Mark Papadakis](https://github.com/markpapadakis). Closes [#14043](https://github.com/ClickHouse/ClickHouse/issues/14043). [#14056](https://github.com/ClickHouse/ClickHouse/pull/14056) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Conditional aggregate functions (for example: `avgIf`, `sumIf`, `maxIf`) should return `NULL` when miss rows and use nullable arguments. [#13964](https://github.com/ClickHouse/ClickHouse/pull/13964) ([Winter Zhang](https://github.com/zhang2014)). +* Increase limit in -Resample combinator to 1M. [#13947](https://github.com/ClickHouse/ClickHouse/pull/13947) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Corrected an error in AvroConfluent format that caused the Kafka table engine to stop processing messages when an abnormally small, malformed, message was received. [#13941](https://github.com/ClickHouse/ClickHouse/pull/13941) ([Gervasio Varela](https://github.com/gervarela)). +* Fix wrong error for long queries. It was possible to get syntax error other than `Max query size exceeded` for correct query. [#13928](https://github.com/ClickHouse/ClickHouse/pull/13928) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Better error message for null value of `TabSeparated` format. [#13906](https://github.com/ClickHouse/ClickHouse/pull/13906) ([jiang tao](https://github.com/tomjiang1987)). +* Function `arrayCompact` will compare NaNs bitwise if the type of array elements is Float32/Float64. In previous versions NaNs were always not equal if the type of array elements is Float32/Float64 and were always equal if the type is more complex, like Nullable(Float64). This closes [#13857](https://github.com/ClickHouse/ClickHouse/issues/13857). [#13868](https://github.com/ClickHouse/ClickHouse/pull/13868) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix data race in `lgamma` function. This race was caught only in `tsan`, no side effects a really happened. [#13842](https://github.com/ClickHouse/ClickHouse/pull/13842) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Avoid too slow queries when arrays are manipulated as fields. Throw exception instead. [#13753](https://github.com/ClickHouse/ClickHouse/pull/13753) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added Redis requirepass authorization (for redis dictionary source). [#13688](https://github.com/ClickHouse/ClickHouse/pull/13688) ([Ivan Torgashov](https://github.com/it1804)). +* Add MergeTree Write-Ahead-Log (WAL) dump tool. WAL is an experimental feature. [#13640](https://github.com/ClickHouse/ClickHouse/pull/13640) ([BohuTANG](https://github.com/BohuTANG)). +* In previous versions `lcm` function may produce assertion violation in debug build if called with specifically crafted arguments. This fixes [#13368](https://github.com/ClickHouse/ClickHouse/issues/13368). [#13510](https://github.com/ClickHouse/ClickHouse/pull/13510) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Provide monotonicity for `toDate/toDateTime` functions in more cases. Monotonicity information is used for index analysis (more complex queries will be able to use index). Now the input arguments are saturated more naturally and provides better monotonicity. [#13497](https://github.com/ClickHouse/ClickHouse/pull/13497) ([Amos Bird](https://github.com/amosbird)). +* Support compound identifiers for custom settings. Custom settings is an integration point of ClickHouse codebase with other codebases (no benefits for ClickHouse itself) [#13496](https://github.com/ClickHouse/ClickHouse/pull/13496) ([Vitaly Baranov](https://github.com/vitlibar)). +* Move parts from DiskLocal to DiskS3 in parallel. `DiskS3` is an experimental feature. [#13459](https://github.com/ClickHouse/ClickHouse/pull/13459) ([Pavel Kovalenko](https://github.com/Jokser)). +* Enable mixed granularity parts by default. [#13449](https://github.com/ClickHouse/ClickHouse/pull/13449) ([alesapin](https://github.com/alesapin)). +* Proper remote host checking in S3 redirects (security-related thing). [#13404](https://github.com/ClickHouse/ClickHouse/pull/13404) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Add `QueryTimeMicroseconds`, `SelectQueryTimeMicroseconds` and `InsertQueryTimeMicroseconds` to system.events. [#13336](https://github.com/ClickHouse/ClickHouse/pull/13336) ([ianton-ru](https://github.com/ianton-ru)). +* Fix debug assertion when Decimal has too large negative exponent. Fixes [#13188](https://github.com/ClickHouse/ClickHouse/issues/13188). [#13228](https://github.com/ClickHouse/ClickHouse/pull/13228) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added cache layer for DiskS3 (cache to local disk mark and index files). `DiskS3` is an experimental feature. [#13076](https://github.com/ClickHouse/ClickHouse/pull/13076) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fix readline so it dumps history to file now. [#13600](https://github.com/ClickHouse/ClickHouse/pull/13600) ([Amos Bird](https://github.com/amosbird)). +* Create `system` database with `Atomic` engine by default (a preparation to enable `Atomic` database engine by default everywhere). [#13680](https://github.com/ClickHouse/ClickHouse/pull/13680) ([tavplubix](https://github.com/tavplubix)). + +#### Performance Improvement + +* Slightly optimize very short queries with `LowCardinality`. [#14129](https://github.com/ClickHouse/ClickHouse/pull/14129) ([Anton Popov](https://github.com/CurtizJ)). +* Enable parallel INSERTs for table engines `Null`, `Memory`, `Distributed` and `Buffer` when the setting `max_insert_threads` is set. [#14120](https://github.com/ClickHouse/ClickHouse/pull/14120) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fail fast if `max_rows_to_read` limit is exceeded on parts scan. The motivation behind this change is to skip ranges scan for all selected parts if it is clear that `max_rows_to_read` is already exceeded. The change is quite noticeable for queries over big number of parts. [#13677](https://github.com/ClickHouse/ClickHouse/pull/13677) ([Roman Khavronenko](https://github.com/hagen1778)). +* Slightly improve performance of aggregation by UInt8/UInt16 keys. [#13099](https://github.com/ClickHouse/ClickHouse/pull/13099) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Optimize `has()`, `indexOf()` and `countEqual()` functions for `Array(LowCardinality(T))` and constant right arguments. [#12550](https://github.com/ClickHouse/ClickHouse/pull/12550) ([myrrc](https://github.com/myrrc)). +* When performing trivial `INSERT SELECT` queries, automatically set `max_threads` to 1 or `max_insert_threads`, and set `max_block_size` to `min_insert_block_size_rows`. Related to [#5907](https://github.com/ClickHouse/ClickHouse/issues/5907). [#12195](https://github.com/ClickHouse/ClickHouse/pull/12195) ([flynn](https://github.com/ucasFL)). + +#### Experimental Feature + +* ClickHouse can work as MySQL replica - it is implemented by `MaterializeMySQL` database engine. Implements [#4006](https://github.com/ClickHouse/ClickHouse/issues/4006). [#10851](https://github.com/ClickHouse/ClickHouse/pull/10851) ([Winter Zhang](https://github.com/zhang2014)). +* Add types `Int128`, `Int256`, `UInt256` and related functions for them. Extend Decimals with Decimal256 (precision up to 76 digits). New types are under the setting `allow_experimental_bigint_types`. It is working extremely slow and bad. The implementation is incomplete. Please don't use this feature. [#13097](https://github.com/ClickHouse/ClickHouse/pull/13097) ([Artem Zuikov](https://github.com/4ertus2)). + +#### Build/Testing/Packaging Improvement + +* Added `clickhouse install` script, that is useful if you only have a single binary. [#13528](https://github.com/ClickHouse/ClickHouse/pull/13528) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow to run `clickhouse` binary without configuration. [#13515](https://github.com/ClickHouse/ClickHouse/pull/13515) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Enable check for typos in code with `codespell`. [#13513](https://github.com/ClickHouse/ClickHouse/pull/13513) [#13511](https://github.com/ClickHouse/ClickHouse/pull/13511) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Enable Shellcheck in CI as a linter of .sh tests. This closes [#13168](https://github.com/ClickHouse/ClickHouse/issues/13168). [#13530](https://github.com/ClickHouse/ClickHouse/pull/13530) [#13529](https://github.com/ClickHouse/ClickHouse/pull/13529) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add a CMake option to fail configuration instead of auto-reconfiguration, enabled by default. [#13687](https://github.com/ClickHouse/ClickHouse/pull/13687) ([Konstantin](https://github.com/podshumok)). +* Expose version of embedded tzdata via TZDATA_VERSION in system.build_options. [#13648](https://github.com/ClickHouse/ClickHouse/pull/13648) ([filimonov](https://github.com/filimonov)). +* Improve generation of system.time_zones table during build. Closes [#14209](https://github.com/ClickHouse/ClickHouse/issues/14209). [#14215](https://github.com/ClickHouse/ClickHouse/pull/14215) ([filimonov](https://github.com/filimonov)). +* Build ClickHouse with the most fresh tzdata from package repository. [#13623](https://github.com/ClickHouse/ClickHouse/pull/13623) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add the ability to write js-style comments in skip_list.json. [#14159](https://github.com/ClickHouse/ClickHouse/pull/14159) ([alesapin](https://github.com/alesapin)). +* Ensure that there is no copy-pasted GPL code. [#13514](https://github.com/ClickHouse/ClickHouse/pull/13514) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Switch tests docker images to use test-base parent. [#14167](https://github.com/ClickHouse/ClickHouse/pull/14167) ([Ilya Yatsishin](https://github.com/qoega)). +* Adding retry logic when bringing up docker-compose cluster; Increasing COMPOSE_HTTP_TIMEOUT. [#14112](https://github.com/ClickHouse/ClickHouse/pull/14112) ([vzakaznikov](https://github.com/vzakaznikov)). +* Enabled `system.text_log` in stress test to find more bugs. [#13855](https://github.com/ClickHouse/ClickHouse/pull/13855) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Testflows LDAP module: adding missing certificates and dhparam.pem for openldap4. [#13780](https://github.com/ClickHouse/ClickHouse/pull/13780) ([vzakaznikov](https://github.com/vzakaznikov)). +* ZooKeeper cannot work reliably in unit tests in CI infrastructure. Using unit tests for ZooKeeper interaction with real ZooKeeper is bad idea from the start (unit tests are not supposed to verify complex distributed systems). We already using integration tests for this purpose and they are better suited. [#13745](https://github.com/ClickHouse/ClickHouse/pull/13745) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added docker image for style check. Added style check that all docker and docker compose files are located in docker directory. [#13724](https://github.com/ClickHouse/ClickHouse/pull/13724) ([Ilya Yatsishin](https://github.com/qoega)). +* Fix cassandra build on Mac OS. [#13708](https://github.com/ClickHouse/ClickHouse/pull/13708) ([Ilya Yatsishin](https://github.com/qoega)). +* Fix link error in shared build. [#13700](https://github.com/ClickHouse/ClickHouse/pull/13700) ([Amos Bird](https://github.com/amosbird)). +* Updating LDAP user authentication suite to check that it works with RBAC. [#13656](https://github.com/ClickHouse/ClickHouse/pull/13656) ([vzakaznikov](https://github.com/vzakaznikov)). +* Removed `-DENABLE_CURL_CLIENT` for `contrib/aws`. [#13628](https://github.com/ClickHouse/ClickHouse/pull/13628) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Increasing health-check timeouts for ClickHouse nodes and adding support to dump docker-compose logs if unhealthy containers found. [#13612](https://github.com/ClickHouse/ClickHouse/pull/13612) ([vzakaznikov](https://github.com/vzakaznikov)). +* Make sure [#10977](https://github.com/ClickHouse/ClickHouse/issues/10977) is invalid. [#13539](https://github.com/ClickHouse/ClickHouse/pull/13539) ([Amos Bird](https://github.com/amosbird)). +* Skip PR's from robot-clickhouse. [#13489](https://github.com/ClickHouse/ClickHouse/pull/13489) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Move Dockerfiles from integration tests to `docker/test` directory. docker_compose files are available in `runner` docker container. Docker images are built in CI and not in integration tests. [#13448](https://github.com/ClickHouse/ClickHouse/pull/13448) ([Ilya Yatsishin](https://github.com/qoega)). + + +## ClickHouse release 20.7 + +### ClickHouse release v20.7.2.30-stable, 2020-08-31 + +#### Backward Incompatible Change + +* Function `modulo` (operator `%`) with at least one floating point number as argument will calculate remainder of division directly on floating point numbers without converting both arguments to integers. It makes behaviour compatible with most of DBMS. This also applicable for Date and DateTime data types. Added alias `mod`. This closes [#7323](https://github.com/ClickHouse/ClickHouse/issues/7323). [#12585](https://github.com/ClickHouse/ClickHouse/pull/12585) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Deprecate special printing of zero Date/DateTime values as `0000-00-00` and `0000-00-00 00:00:00`. [#12442](https://github.com/ClickHouse/ClickHouse/pull/12442) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* The function `groupArrayMoving*` was not working for distributed queries. It's result was calculated within incorrect data type (without promotion to the largest type). The function `groupArrayMovingAvg` was returning integer number that was inconsistent with the `avg` function. This fixes [#12568](https://github.com/ClickHouse/ClickHouse/issues/12568). [#12622](https://github.com/ClickHouse/ClickHouse/pull/12622) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add sanity check for MergeTree settings. If the settings are incorrect, the server will refuse to start or to create a table, printing detailed explanation to the user. [#13153](https://github.com/ClickHouse/ClickHouse/pull/13153) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Protect from the cases when user may set `background_pool_size` to value lower than `number_of_free_entries_in_pool_to_execute_mutation` or `number_of_free_entries_in_pool_to_lower_max_size_of_merge`. In these cases ALTERs won't work or the maximum size of merge will be too limited. It will throw exception explaining what to do. This closes [#10897](https://github.com/ClickHouse/ClickHouse/issues/10897). [#12728](https://github.com/ClickHouse/ClickHouse/pull/12728) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* When upgrading from versions older than 20.5, if rolling update is performed and cluster contains both versions 20.5 or greater and less than 20.5, if ClickHouse nodes with old versions are restarted and old version has been started up in presence of newer versions, it may lead to `Part ... intersects previous part` errors. To prevent this error, first install newer clickhouse-server packages on all cluster nodes and then do restarts (so, when clickhouse-server is restarted, it will start up with the new version). + +#### New Feature + +* Polygon dictionary type that provides efficient "reverse geocoding" lookups - to find the region by coordinates in a dictionary of many polygons (world map). It is using carefully optimized algorithm with recursive grids to maintain low CPU and memory usage. [#9278](https://github.com/ClickHouse/ClickHouse/pull/9278) ([achulkov2](https://github.com/achulkov2)). +* Added support of LDAP authentication for preconfigured users ("Simple Bind" method). [#11234](https://github.com/ClickHouse/ClickHouse/pull/11234) ([Denis Glazachev](https://github.com/traceon)). +* Introduce setting `alter_partition_verbose_result` which outputs information about touched parts for some types of `ALTER TABLE ... PARTITION ...` queries (currently `ATTACH` and `FREEZE`). Closes [#8076](https://github.com/ClickHouse/ClickHouse/issues/8076). [#13017](https://github.com/ClickHouse/ClickHouse/pull/13017) ([alesapin](https://github.com/alesapin)). +* Add `bayesAB` function for bayesian-ab-testing. [#12327](https://github.com/ClickHouse/ClickHouse/pull/12327) ([achimbab](https://github.com/achimbab)). +* Added `system.crash_log` table into which stack traces for fatal errors are collected. This table should be empty. [#12316](https://github.com/ClickHouse/ClickHouse/pull/12316) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added http headers `X-ClickHouse-Database` and `X-ClickHouse-Format` which may be used to set default database and output format. [#12981](https://github.com/ClickHouse/ClickHouse/pull/12981) ([hcz](https://github.com/hczhcz)). +* Add `minMap` and `maxMap` functions support to `SimpleAggregateFunction`. [#12662](https://github.com/ClickHouse/ClickHouse/pull/12662) ([Ildus Kurbangaliev](https://github.com/ildus)). +* Add setting `allow_non_metadata_alters` which restricts to execute `ALTER` queries which modify data on disk. Disabled be default. Closes [#11547](https://github.com/ClickHouse/ClickHouse/issues/11547). [#12635](https://github.com/ClickHouse/ClickHouse/pull/12635) ([alesapin](https://github.com/alesapin)). +* A function `formatRow` is added to support turning arbitrary expressions into a string via given format. It's useful for manipulating SQL outputs and is quite versatile combined with the `columns` function. [#12574](https://github.com/ClickHouse/ClickHouse/pull/12574) ([Amos Bird](https://github.com/amosbird)). +* Add `FROM_UNIXTIME` function for compatibility with MySQL, related to [12149](https://github.com/ClickHouse/ClickHouse/issues/12149). [#12484](https://github.com/ClickHouse/ClickHouse/pull/12484) ([flynn](https://github.com/ucasFL)). +* Allow Nullable types as keys in MergeTree tables if `allow_nullable_key` table setting is enabled. Closes [#5319](https://github.com/ClickHouse/ClickHouse/issues/5319). [#12433](https://github.com/ClickHouse/ClickHouse/pull/12433) ([Amos Bird](https://github.com/amosbird)). +* Integration with [COS](https://intl.cloud.tencent.com/product/cos). [#12386](https://github.com/ClickHouse/ClickHouse/pull/12386) ([fastio](https://github.com/fastio)). +* Add `mapAdd` and `mapSubtract` functions for adding/subtracting key-mapped values. [#11735](https://github.com/ClickHouse/ClickHouse/pull/11735) ([Ildus Kurbangaliev](https://github.com/ildus)). + +#### Bug Fix + +* Fix premature `ON CLUSTER` timeouts for queries that must be executed on a single replica. Fixes [#6704](https://github.com/ClickHouse/ClickHouse/issues/6704), [#7228](https://github.com/ClickHouse/ClickHouse/issues/7228), [#13361](https://github.com/ClickHouse/ClickHouse/issues/13361), [#11884](https://github.com/ClickHouse/ClickHouse/issues/11884). [#13450](https://github.com/ClickHouse/ClickHouse/pull/13450) ([alesapin](https://github.com/alesapin)). +* Fix crash in mark inclusion search introduced in [#12277](https://github.com/ClickHouse/ClickHouse/pull/12277). [#14225](https://github.com/ClickHouse/ClickHouse/pull/14225) ([Amos Bird](https://github.com/amosbird)). +* Fix race condition in external dictionaries with cache layout which can lead server crash. [#12566](https://github.com/ClickHouse/ClickHouse/pull/12566) ([alesapin](https://github.com/alesapin)). +* Fix visible data clobbering by progress bar in client in interactive mode. This fixes [#12562](https://github.com/ClickHouse/ClickHouse/issues/12562) and [#13369](https://github.com/ClickHouse/ClickHouse/issues/13369) and [#13584](https://github.com/ClickHouse/ClickHouse/issues/13584) and fixes [#12964](https://github.com/ClickHouse/ClickHouse/issues/12964). [#13691](https://github.com/ClickHouse/ClickHouse/pull/13691) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed incorrect sorting order for `LowCardinality` columns when ORDER BY multiple columns is used. This fixes [#13958](https://github.com/ClickHouse/ClickHouse/issues/13958). [#14223](https://github.com/ClickHouse/ClickHouse/pull/14223) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Removed hardcoded timeout, which wrongly overruled `query_wait_timeout_milliseconds` setting for cache-dictionary. [#14105](https://github.com/ClickHouse/ClickHouse/pull/14105) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fixed wrong mount point in extra info for `Poco::Exception: no space left on device`. [#14050](https://github.com/ClickHouse/ClickHouse/pull/14050) ([tavplubix](https://github.com/tavplubix)). +* Fix wrong query optimization of select queries with `DISTINCT` keyword when subqueries also have `DISTINCT` in case `optimize_duplicate_order_by_and_distinct` setting is enabled. [#13925](https://github.com/ClickHouse/ClickHouse/pull/13925) ([Artem Zuikov](https://github.com/4ertus2)). +* Fixed potential deadlock when renaming `Distributed` table. [#13922](https://github.com/ClickHouse/ClickHouse/pull/13922) ([tavplubix](https://github.com/tavplubix)). +* Fix incorrect sorting for `FixedString` columns when ORDER BY multiple columns is used. Fixes [#13182](https://github.com/ClickHouse/ClickHouse/issues/13182). [#13887](https://github.com/ClickHouse/ClickHouse/pull/13887) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix potentially lower precision of `topK`/`topKWeighted` aggregations (with non-default parameters). [#13817](https://github.com/ClickHouse/ClickHouse/pull/13817) ([Azat Khuzhin](https://github.com/azat)). +* Fix reading from MergeTree table with INDEX of type SET fails when compared against NULL. This fixes [#13686](https://github.com/ClickHouse/ClickHouse/issues/13686). [#13793](https://github.com/ClickHouse/ClickHouse/pull/13793) ([Amos Bird](https://github.com/amosbird)). +* Fix step overflow in function `range()`. [#13790](https://github.com/ClickHouse/ClickHouse/pull/13790) ([Azat Khuzhin](https://github.com/azat)). +* Fixed `Directory not empty` error when concurrently executing `DROP DATABASE` and `CREATE TABLE`. [#13756](https://github.com/ClickHouse/ClickHouse/pull/13756) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add range check for `h3KRing` function. This fixes [#13633](https://github.com/ClickHouse/ClickHouse/issues/13633). [#13752](https://github.com/ClickHouse/ClickHouse/pull/13752) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix race condition between DETACH and background merges. Parts may revive after detach. This is continuation of [#8602](https://github.com/ClickHouse/ClickHouse/issues/8602) that did not fix the issue but introduced a test that started to fail in very rare cases, demonstrating the issue. [#13746](https://github.com/ClickHouse/ClickHouse/pull/13746) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix logging Settings.Names/Values when `log_queries_min_type` greater than `QUERY_START`. [#13737](https://github.com/ClickHouse/ClickHouse/pull/13737) ([Azat Khuzhin](https://github.com/azat)). +* Fix incorrect message in `clickhouse-server.init` while checking user and group. [#13711](https://github.com/ClickHouse/ClickHouse/pull/13711) ([ylchou](https://github.com/ylchou)). +* Do not optimize `any(arrayJoin())` to `arrayJoin()` under `optimize_move_functions_out_of_any`. [#13681](https://github.com/ClickHouse/ClickHouse/pull/13681) ([Azat Khuzhin](https://github.com/azat)). +* Fixed possible deadlock in concurrent `ALTER ... REPLACE/MOVE PARTITION ...` queries. [#13626](https://github.com/ClickHouse/ClickHouse/pull/13626) ([tavplubix](https://github.com/tavplubix)). +* Fixed the behaviour when sometimes cache-dictionary returned default value instead of present value from source. [#13624](https://github.com/ClickHouse/ClickHouse/pull/13624) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix secondary indices corruption in compact parts (compact parts is an experimental feature). [#13538](https://github.com/ClickHouse/ClickHouse/pull/13538) ([Anton Popov](https://github.com/CurtizJ)). +* Fix wrong code in function `netloc`. This fixes [#13335](https://github.com/ClickHouse/ClickHouse/issues/13335). [#13446](https://github.com/ClickHouse/ClickHouse/pull/13446) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix error in `parseDateTimeBestEffort` function when unix timestamp was passed as an argument. This fixes [#13362](https://github.com/ClickHouse/ClickHouse/issues/13362). [#13441](https://github.com/ClickHouse/ClickHouse/pull/13441) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix invalid return type for comparison of tuples with `NULL` elements. Fixes [#12461](https://github.com/ClickHouse/ClickHouse/issues/12461). [#13420](https://github.com/ClickHouse/ClickHouse/pull/13420) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix wrong optimization caused `aggregate function any(x) is found inside another aggregate function in query` error with `SET optimize_move_functions_out_of_any = 1` and aliases inside `any()`. [#13419](https://github.com/ClickHouse/ClickHouse/pull/13419) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix possible race in `StorageMemory`. [#13416](https://github.com/ClickHouse/ClickHouse/pull/13416) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix empty output for `Arrow` and `Parquet` formats in case if query return zero rows. It was done because empty output is not valid for this formats. [#13399](https://github.com/ClickHouse/ClickHouse/pull/13399) ([hcz](https://github.com/hczhcz)). +* Fix select queries with constant columns and prefix of primary key in `ORDER BY` clause. [#13396](https://github.com/ClickHouse/ClickHouse/pull/13396) ([Anton Popov](https://github.com/CurtizJ)). +* Fix `PrettyCompactMonoBlock` for clickhouse-local. Fix extremes/totals with `PrettyCompactMonoBlock`. Fixes [#7746](https://github.com/ClickHouse/ClickHouse/issues/7746). [#13394](https://github.com/ClickHouse/ClickHouse/pull/13394) ([Azat Khuzhin](https://github.com/azat)). +* Fixed deadlock in system.text_log. [#12452](https://github.com/ClickHouse/ClickHouse/pull/12452) ([alexey-milovidov](https://github.com/alexey-milovidov)). It is a part of [#12339](https://github.com/ClickHouse/ClickHouse/issues/12339). This fixes [#12325](https://github.com/ClickHouse/ClickHouse/issues/12325). [#13386](https://github.com/ClickHouse/ClickHouse/pull/13386) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fixed `File(TSVWithNames*)` (header was written multiple times), fixed `clickhouse-local --format CSVWithNames*` (lacks header, broken after [#12197](https://github.com/ClickHouse/ClickHouse/issues/12197)), fixed `clickhouse-local --format CSVWithNames*` with zero rows (lacks header). [#13343](https://github.com/ClickHouse/ClickHouse/pull/13343) ([Azat Khuzhin](https://github.com/azat)). +* Fix segfault when function `groupArrayMovingSum` deserializes empty state. Fixes [#13339](https://github.com/ClickHouse/ClickHouse/issues/13339). [#13341](https://github.com/ClickHouse/ClickHouse/pull/13341) ([alesapin](https://github.com/alesapin)). +* Throw error on `arrayJoin()` function in `JOIN ON` section. [#13330](https://github.com/ClickHouse/ClickHouse/pull/13330) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix crash in `LEFT ASOF JOIN` with `join_use_nulls=1`. [#13291](https://github.com/ClickHouse/ClickHouse/pull/13291) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix possible error `Totals having transform was already added to pipeline` in case of a query from delayed replica. [#13290](https://github.com/ClickHouse/ClickHouse/pull/13290) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* The server may crash if user passed specifically crafted arguments to the function `h3ToChildren`. This fixes [#13275](https://github.com/ClickHouse/ClickHouse/issues/13275). [#13277](https://github.com/ClickHouse/ClickHouse/pull/13277) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix potentially low performance and slightly incorrect result for `uniqExact`, `topK`, `sumDistinct` and similar aggregate functions called on Float types with `NaN` values. It also triggered assert in debug build. This fixes [#12491](https://github.com/ClickHouse/ClickHouse/issues/12491). [#13254](https://github.com/ClickHouse/ClickHouse/pull/13254) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix assertion in KeyCondition when primary key contains expression with monotonic function and query contains comparison with constant whose type is different. This fixes [#12465](https://github.com/ClickHouse/ClickHouse/issues/12465). [#13251](https://github.com/ClickHouse/ClickHouse/pull/13251) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Return passed number for numbers with MSB set in function roundUpToPowerOfTwoOrZero(). It prevents potential errors in case of overflow of array sizes. [#13234](https://github.com/ClickHouse/ClickHouse/pull/13234) ([Azat Khuzhin](https://github.com/azat)). +* Fix function if with nullable constexpr as cond that is not literal NULL. Fixes [#12463](https://github.com/ClickHouse/ClickHouse/issues/12463). [#13226](https://github.com/ClickHouse/ClickHouse/pull/13226) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix assert in `arrayElement` function in case of array elements are Nullable and array subscript is also Nullable. This fixes [#12172](https://github.com/ClickHouse/ClickHouse/issues/12172). [#13224](https://github.com/ClickHouse/ClickHouse/pull/13224) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix DateTime64 conversion functions with constant argument. [#13205](https://github.com/ClickHouse/ClickHouse/pull/13205) ([Azat Khuzhin](https://github.com/azat)). +* Fix parsing row policies from users.xml when names of databases or tables contain dots. This fixes [#5779](https://github.com/ClickHouse/ClickHouse/issues/5779), [#12527](https://github.com/ClickHouse/ClickHouse/issues/12527). [#13199](https://github.com/ClickHouse/ClickHouse/pull/13199) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix access to `redis` dictionary after connection was dropped once. It may happen with `cache` and `direct` dictionary layouts. [#13082](https://github.com/ClickHouse/ClickHouse/pull/13082) ([Anton Popov](https://github.com/CurtizJ)). +* Fix wrong index analysis with functions. It could lead to some data parts being skipped when reading from `MergeTree` tables. Fixes [#13060](https://github.com/ClickHouse/ClickHouse/issues/13060). Fixes [#12406](https://github.com/ClickHouse/ClickHouse/issues/12406). [#13081](https://github.com/ClickHouse/ClickHouse/pull/13081) ([Anton Popov](https://github.com/CurtizJ)). +* Fix error `Cannot convert column because it is constant but values of constants are different in source and result` for remote queries which use deterministic functions in scope of query, but not deterministic between queries, like `now()`, `now64()`, `randConstant()`. Fixes [#11327](https://github.com/ClickHouse/ClickHouse/issues/11327). [#13075](https://github.com/ClickHouse/ClickHouse/pull/13075) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix crash which was possible for queries with `ORDER BY` tuple and small `LIMIT`. Fixes [#12623](https://github.com/ClickHouse/ClickHouse/issues/12623). [#13009](https://github.com/ClickHouse/ClickHouse/pull/13009) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix `Block structure mismatch` error for queries with `UNION` and `JOIN`. Fixes [#12602](https://github.com/ClickHouse/ClickHouse/issues/12602). [#12989](https://github.com/ClickHouse/ClickHouse/pull/12989) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Corrected `merge_with_ttl_timeout` logic which did not work well when expiration affected more than one partition over one time interval. (Authored by @excitoon). [#12982](https://github.com/ClickHouse/ClickHouse/pull/12982) ([Alexander Kazakov](https://github.com/Akazz)). +* Fix columns duplication for range hashed dictionary created from DDL query. This fixes [#10605](https://github.com/ClickHouse/ClickHouse/issues/10605). [#12857](https://github.com/ClickHouse/ClickHouse/pull/12857) ([alesapin](https://github.com/alesapin)). +* Fix unnecessary limiting for the number of threads for selects from local replica. [#12840](https://github.com/ClickHouse/ClickHouse/pull/12840) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix rare bug when `ALTER DELETE` and `ALTER MODIFY COLUMN` queries executed simultaneously as a single mutation. Bug leads to an incorrect amount of rows in `count.txt` and as a consequence incorrect data in part. Also, fix a small bug with simultaneous `ALTER RENAME COLUMN` and `ALTER ADD COLUMN`. [#12760](https://github.com/ClickHouse/ClickHouse/pull/12760) ([alesapin](https://github.com/alesapin)). +* Wrong credentials being used when using `clickhouse` dictionary source to query remote tables. [#12756](https://github.com/ClickHouse/ClickHouse/pull/12756) ([sundyli](https://github.com/sundy-li)). +* Fix `CAST(Nullable(String), Enum())`. [#12745](https://github.com/ClickHouse/ClickHouse/pull/12745) ([Azat Khuzhin](https://github.com/azat)). +* Fix performance with large tuples, which are interpreted as functions in `IN` section. The case when user writes `WHERE x IN tuple(1, 2, ...)` instead of `WHERE x IN (1, 2, ...)` for some obscure reason. [#12700](https://github.com/ClickHouse/ClickHouse/pull/12700) ([Anton Popov](https://github.com/CurtizJ)). +* Fix memory tracking for input_format_parallel_parsing (by attaching thread to group). [#12672](https://github.com/ClickHouse/ClickHouse/pull/12672) ([Azat Khuzhin](https://github.com/azat)). +* Fix wrong optimization `optimize_move_functions_out_of_any=1` in case of `any(func())`. [#12664](https://github.com/ClickHouse/ClickHouse/pull/12664) ([Artem Zuikov](https://github.com/4ertus2)). +* Fixed [#10572](https://github.com/ClickHouse/ClickHouse/issues/10572) fix bloom filter index with const expression. [#12659](https://github.com/ClickHouse/ClickHouse/pull/12659) ([Winter Zhang](https://github.com/zhang2014)). +* Fix SIGSEGV in StorageKafka when broker is unavailable (and not only). [#12658](https://github.com/ClickHouse/ClickHouse/pull/12658) ([Azat Khuzhin](https://github.com/azat)). +* Add support for function `if` with `Array(UUID)` arguments. This fixes [#11066](https://github.com/ClickHouse/ClickHouse/issues/11066). [#12648](https://github.com/ClickHouse/ClickHouse/pull/12648) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* CREATE USER IF NOT EXISTS now does not throw exception if the user exists. This fixes [#12507](https://github.com/ClickHouse/ClickHouse/issues/12507). [#12646](https://github.com/ClickHouse/ClickHouse/pull/12646) ([Vitaly Baranov](https://github.com/vitlibar)). +* Exception `There is no supertype...` can be thrown during `ALTER ... UPDATE` in unexpected cases (e.g. when subtracting from UInt64 column). This fixes [#7306](https://github.com/ClickHouse/ClickHouse/issues/7306). This fixes [#4165](https://github.com/ClickHouse/ClickHouse/issues/4165). [#12633](https://github.com/ClickHouse/ClickHouse/pull/12633) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix possible `Pipeline stuck` error for queries with external sorting. Fixes [#12617](https://github.com/ClickHouse/ClickHouse/issues/12617). [#12618](https://github.com/ClickHouse/ClickHouse/pull/12618) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix error `Output of TreeExecutor is not sorted` for `OPTIMIZE DEDUPLICATE`. Fixes [#11572](https://github.com/ClickHouse/ClickHouse/issues/11572). [#12613](https://github.com/ClickHouse/ClickHouse/pull/12613) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix the issue when alias on result of function `any` can be lost during query optimization. [#12593](https://github.com/ClickHouse/ClickHouse/pull/12593) ([Anton Popov](https://github.com/CurtizJ)). +* Remove data for Distributed tables (blocks from async INSERTs) on DROP TABLE. [#12556](https://github.com/ClickHouse/ClickHouse/pull/12556) ([Azat Khuzhin](https://github.com/azat)). +* Now ClickHouse will recalculate checksums for parts when file `checksums.txt` is absent. Broken since [#9827](https://github.com/ClickHouse/ClickHouse/issues/9827). [#12545](https://github.com/ClickHouse/ClickHouse/pull/12545) ([alesapin](https://github.com/alesapin)). +* Fix bug which lead to broken old parts after `ALTER DELETE` query when `enable_mixed_granularity_parts=1`. Fixes [#12536](https://github.com/ClickHouse/ClickHouse/issues/12536). [#12543](https://github.com/ClickHouse/ClickHouse/pull/12543) ([alesapin](https://github.com/alesapin)). +* Fixing race condition in live view tables which could cause data duplication. LIVE VIEW is an experimental feature. [#12519](https://github.com/ClickHouse/ClickHouse/pull/12519) ([vzakaznikov](https://github.com/vzakaznikov)). +* Fix backwards compatibility in binary format of `AggregateFunction(avg, ...)` values. This fixes [#12342](https://github.com/ClickHouse/ClickHouse/issues/12342). [#12486](https://github.com/ClickHouse/ClickHouse/pull/12486) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix crash in JOIN with dictionary when we are joining over expression of dictionary key: `t JOIN dict ON expr(dict.id) = t.id`. Disable dictionary join optimisation for this case. [#12458](https://github.com/ClickHouse/ClickHouse/pull/12458) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix overflow when very large LIMIT or OFFSET is specified. This fixes [#10470](https://github.com/ClickHouse/ClickHouse/issues/10470). This fixes [#11372](https://github.com/ClickHouse/ClickHouse/issues/11372). [#12427](https://github.com/ClickHouse/ClickHouse/pull/12427) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* kafka: fix SIGSEGV if there is a message with error in the middle of the batch. [#12302](https://github.com/ClickHouse/ClickHouse/pull/12302) ([Azat Khuzhin](https://github.com/azat)). + +#### Improvement + +* Keep smaller amount of logs in ZooKeeper. Avoid excessive growing of ZooKeeper nodes in case of offline replicas when having many servers/tables/inserts. [#13100](https://github.com/ClickHouse/ClickHouse/pull/13100) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now exceptions forwarded to the client if an error happened during ALTER or mutation. Closes [#11329](https://github.com/ClickHouse/ClickHouse/issues/11329). [#12666](https://github.com/ClickHouse/ClickHouse/pull/12666) ([alesapin](https://github.com/alesapin)). +* Add `QueryTimeMicroseconds`, `SelectQueryTimeMicroseconds` and `InsertQueryTimeMicroseconds` to `system.events`, along with system.metrics, processes, query_log, etc. [#13028](https://github.com/ClickHouse/ClickHouse/pull/13028) ([ianton-ru](https://github.com/ianton-ru)). +* Added `SelectedRows` and `SelectedBytes` to `system.events`, along with system.metrics, processes, query_log, etc. [#12638](https://github.com/ClickHouse/ClickHouse/pull/12638) ([ianton-ru](https://github.com/ianton-ru)). +* Added `current_database` information to `system.query_log`. [#12652](https://github.com/ClickHouse/ClickHouse/pull/12652) ([Amos Bird](https://github.com/amosbird)). +* Allow `TabSeparatedRaw` as input format. [#12009](https://github.com/ClickHouse/ClickHouse/pull/12009) ([hcz](https://github.com/hczhcz)). +* Now `joinGet` supports multi-key lookup. [#12418](https://github.com/ClickHouse/ClickHouse/pull/12418) ([Amos Bird](https://github.com/amosbird)). +* Allow `*Map` aggregate functions to work on Arrays with NULLs. Fixes [#13157](https://github.com/ClickHouse/ClickHouse/issues/13157). [#13225](https://github.com/ClickHouse/ClickHouse/pull/13225) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Avoid overflow in parsing of DateTime values that will lead to negative unix timestamp in their timezone (for example, `1970-01-01 00:00:00` in Moscow). Saturate to zero instead. This fixes [#3470](https://github.com/ClickHouse/ClickHouse/issues/3470). This fixes [#4172](https://github.com/ClickHouse/ClickHouse/issues/4172). [#12443](https://github.com/ClickHouse/ClickHouse/pull/12443) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* AvroConfluent: Skip Kafka tombstone records - Support skipping broken records [#13203](https://github.com/ClickHouse/ClickHouse/pull/13203) ([Andrew Onyshchuk](https://github.com/oandrew)). +* Fix wrong error for long queries. It was possible to get syntax error other than `Max query size exceeded` for correct query. [#13928](https://github.com/ClickHouse/ClickHouse/pull/13928) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix data race in `lgamma` function. This race was caught only in `tsan`, no side effects really happened. [#13842](https://github.com/ClickHouse/ClickHouse/pull/13842) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix a 'Week'-interval formatting for ATTACH/ALTER/CREATE QUOTA-statements. [#13417](https://github.com/ClickHouse/ClickHouse/pull/13417) ([vladimir-golovchenko](https://github.com/vladimir-golovchenko)). +* Now broken parts are also reported when encountered in compact part processing. Compact parts is an experimental feature. [#13282](https://github.com/ClickHouse/ClickHouse/pull/13282) ([Amos Bird](https://github.com/amosbird)). +* Fix assert in `geohashesInBox`. This fixes [#12554](https://github.com/ClickHouse/ClickHouse/issues/12554). [#13229](https://github.com/ClickHouse/ClickHouse/pull/13229) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix assert in `parseDateTimeBestEffort`. This fixes [#12649](https://github.com/ClickHouse/ClickHouse/issues/12649). [#13227](https://github.com/ClickHouse/ClickHouse/pull/13227) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Minor optimization in Processors/PipelineExecutor: breaking out of a loop because it makes sense to do so. [#13058](https://github.com/ClickHouse/ClickHouse/pull/13058) ([Mark Papadakis](https://github.com/markpapadakis)). +* Support TRUNCATE table without TABLE keyword. [#12653](https://github.com/ClickHouse/ClickHouse/pull/12653) ([Winter Zhang](https://github.com/zhang2014)). +* Fix explain query format overwrite by default. This fixes [#12541](https://github.com/ClickHouse/ClickHouse/issues/12432). [#12541](https://github.com/ClickHouse/ClickHouse/pull/12541) ([BohuTANG](https://github.com/BohuTANG)). +* Allow to set JOIN kind and type in more standad way: `LEFT SEMI JOIN` instead of `SEMI LEFT JOIN`. For now both are correct. [#12520](https://github.com/ClickHouse/ClickHouse/pull/12520) ([Artem Zuikov](https://github.com/4ertus2)). +* Changes default value for `multiple_joins_rewriter_version` to 2. It enables new multiple joins rewriter that knows about column names. [#12469](https://github.com/ClickHouse/ClickHouse/pull/12469) ([Artem Zuikov](https://github.com/4ertus2)). +* Add several metrics for requests to S3 storages. [#12464](https://github.com/ClickHouse/ClickHouse/pull/12464) ([ianton-ru](https://github.com/ianton-ru)). +* Use correct default secure port for clickhouse-benchmark with `--secure` argument. This fixes [#11044](https://github.com/ClickHouse/ClickHouse/issues/11044). [#12440](https://github.com/ClickHouse/ClickHouse/pull/12440) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Rollback insertion errors in `Log`, `TinyLog`, `StripeLog` engines. In previous versions insertion error lead to inconsisent table state (this works as documented and it is normal for these table engines). This fixes [#12402](https://github.com/ClickHouse/ClickHouse/issues/12402). [#12426](https://github.com/ClickHouse/ClickHouse/pull/12426) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Implement `RENAME DATABASE` and `RENAME DICTIONARY` for `Atomic` database engine - Add implicit `{uuid}` macro, which can be used in ZooKeeper path for `ReplicatedMergeTree`. It works with `CREATE ... ON CLUSTER ...` queries. Set `show_table_uuid_in_table_create_query_if_not_nil` to `true` to use it. - Make `ReplicatedMergeTree` engine arguments optional, `/clickhouse/tables/{uuid}/{shard}/` and `{replica}` are used by default. Closes [#12135](https://github.com/ClickHouse/ClickHouse/issues/12135). - Minor fixes. - These changes break backward compatibility of `Atomic` database engine. Previously created `Atomic` databases must be manually converted to new format. Atomic database is an experimental feature. [#12343](https://github.com/ClickHouse/ClickHouse/pull/12343) ([tavplubix](https://github.com/tavplubix)). +* Separated `AWSAuthV4Signer` into different logger, removed excessive `AWSClient: AWSClient` from log messages. [#12320](https://github.com/ClickHouse/ClickHouse/pull/12320) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Better exception message in disk access storage. [#12625](https://github.com/ClickHouse/ClickHouse/pull/12625) ([alesapin](https://github.com/alesapin)). +* Better exception for function `in` with invalid number of arguments. [#12529](https://github.com/ClickHouse/ClickHouse/pull/12529) ([Anton Popov](https://github.com/CurtizJ)). +* Fix error message about adaptive granularity. [#12624](https://github.com/ClickHouse/ClickHouse/pull/12624) ([alesapin](https://github.com/alesapin)). +* Fix SETTINGS parse after FORMAT. [#12480](https://github.com/ClickHouse/ClickHouse/pull/12480) ([Azat Khuzhin](https://github.com/azat)). +* If MergeTree table does not contain ORDER BY or PARTITION BY, it was possible to request ALTER to CLEAR all the columns and ALTER will stuck. Fixed [#7941](https://github.com/ClickHouse/ClickHouse/issues/7941). [#12382](https://github.com/ClickHouse/ClickHouse/pull/12382) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Avoid re-loading completion from the history file after each query (to avoid history overlaps with other client sessions). [#13086](https://github.com/ClickHouse/ClickHouse/pull/13086) ([Azat Khuzhin](https://github.com/azat)). + +#### Performance Improvement + +* Lower memory usage for some operations up to 2 times. [#12424](https://github.com/ClickHouse/ClickHouse/pull/12424) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Optimize PK lookup for queries that match exact PK range. [#12277](https://github.com/ClickHouse/ClickHouse/pull/12277) ([Ivan Babrou](https://github.com/bobrik)). +* Slightly optimize very short queries with `LowCardinality`. [#14129](https://github.com/ClickHouse/ClickHouse/pull/14129) ([Anton Popov](https://github.com/CurtizJ)). +* Slightly improve performance of aggregation by UInt8/UInt16 keys. [#13091](https://github.com/ClickHouse/ClickHouse/pull/13091) and [#13055](https://github.com/ClickHouse/ClickHouse/pull/13055) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Push down `LIMIT` step for query plan (inside subqueries). [#13016](https://github.com/ClickHouse/ClickHouse/pull/13016) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Parallel primary key lookup and skipping index stages on parts, as described in [#11564](https://github.com/ClickHouse/ClickHouse/issues/11564). [#12589](https://github.com/ClickHouse/ClickHouse/pull/12589) ([Ivan Babrou](https://github.com/bobrik)). +* Converting String-type arguments of function "if" and "transform" into enum if `set optimize_if_transform_strings_to_enum = 1`. [#12515](https://github.com/ClickHouse/ClickHouse/pull/12515) ([Artem Zuikov](https://github.com/4ertus2)). +* Replaces monotonic functions with its argument in `ORDER BY` if `set optimize_monotonous_functions_in_order_by=1`. [#12467](https://github.com/ClickHouse/ClickHouse/pull/12467) ([Artem Zuikov](https://github.com/4ertus2)). +* Add order by optimization that rewrites `ORDER BY x, f(x)` with `ORDER by x` if `set optimize_redundant_functions_in_order_by = 1`. [#12404](https://github.com/ClickHouse/ClickHouse/pull/12404) ([Artem Zuikov](https://github.com/4ertus2)). +* Allow pushdown predicate when subquery contains `WITH` clause. This fixes [#12293](https://github.com/ClickHouse/ClickHouse/issues/12293) [#12663](https://github.com/ClickHouse/ClickHouse/pull/12663) ([Winter Zhang](https://github.com/zhang2014)). +* Improve performance of reading from compact parts. Compact parts is an experimental feature. [#12492](https://github.com/ClickHouse/ClickHouse/pull/12492) ([Anton Popov](https://github.com/CurtizJ)). +* Attempt to implement streaming optimization in `DiskS3`. DiskS3 is an experimental feature. [#12434](https://github.com/ClickHouse/ClickHouse/pull/12434) ([Vladimir Chebotarev](https://github.com/excitoon)). + +#### Build/Testing/Packaging Improvement + +* Use `shellcheck` for sh tests linting. [#13200](https://github.com/ClickHouse/ClickHouse/pull/13200) [#13207](https://github.com/ClickHouse/ClickHouse/pull/13207) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add script which set labels for pull requests in GitHub hook. [#13183](https://github.com/ClickHouse/ClickHouse/pull/13183) ([alesapin](https://github.com/alesapin)). +* Remove some of recursive submodules. See [#13378](https://github.com/ClickHouse/ClickHouse/issues/13378). [#13379](https://github.com/ClickHouse/ClickHouse/pull/13379) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Ensure that all the submodules are from proper URLs. Continuation of [#13379](https://github.com/ClickHouse/ClickHouse/issues/13379). This fixes [#13378](https://github.com/ClickHouse/ClickHouse/issues/13378). [#13397](https://github.com/ClickHouse/ClickHouse/pull/13397) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added support for user-declared settings, which can be accessed from inside queries. This is needed when ClickHouse engine is used as a component of another system. [#13013](https://github.com/ClickHouse/ClickHouse/pull/13013) ([Vitaly Baranov](https://github.com/vitlibar)). +* Added testing for RBAC functionality of INSERT privilege in TestFlows. Expanded tables on which SELECT is being tested. Added Requirements to match new table engine tests. [#13340](https://github.com/ClickHouse/ClickHouse/pull/13340) ([MyroTk](https://github.com/MyroTk)). +* Fix timeout error during server restart in the stress test. [#13321](https://github.com/ClickHouse/ClickHouse/pull/13321) ([alesapin](https://github.com/alesapin)). +* Now fast test will wait server with retries. [#13284](https://github.com/ClickHouse/ClickHouse/pull/13284) ([alesapin](https://github.com/alesapin)). +* Function `materialize()` (the function for ClickHouse testing) will work for NULL as expected - by transforming it to non-constant column. [#13212](https://github.com/ClickHouse/ClickHouse/pull/13212) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix libunwind build in AArch64. This fixes [#13204](https://github.com/ClickHouse/ClickHouse/issues/13204). [#13208](https://github.com/ClickHouse/ClickHouse/pull/13208) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Even more retries in zkutil gtest to prevent test flakiness. [#13165](https://github.com/ClickHouse/ClickHouse/pull/13165) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Small fixes to the RBAC TestFlows. [#13152](https://github.com/ClickHouse/ClickHouse/pull/13152) ([vzakaznikov](https://github.com/vzakaznikov)). +* Fixing `00960_live_view_watch_events_live.py` test. [#13108](https://github.com/ClickHouse/ClickHouse/pull/13108) ([vzakaznikov](https://github.com/vzakaznikov)). +* Improve cache purge in documentation deploy script. [#13107](https://github.com/ClickHouse/ClickHouse/pull/13107) ([alesapin](https://github.com/alesapin)). +* Rewrote some orphan tests to gtest. Removed useless includes from tests. [#13073](https://github.com/ClickHouse/ClickHouse/pull/13073) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Added tests for RBAC functionality of `SELECT` privilege in TestFlows. [#13061](https://github.com/ClickHouse/ClickHouse/pull/13061) ([Ritaank Tiwari](https://github.com/ritaank)). +* Rerun some tests in fast test check. [#12992](https://github.com/ClickHouse/ClickHouse/pull/12992) ([alesapin](https://github.com/alesapin)). +* Fix MSan error in "rdkafka" library. This closes [#12990](https://github.com/ClickHouse/ClickHouse/issues/12990). Updated `rdkafka` to version 1.5 (master). [#12991](https://github.com/ClickHouse/ClickHouse/pull/12991) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix UBSan report in base64 if tests were run on server with AVX-512. This fixes [#12318](https://github.com/ClickHouse/ClickHouse/issues/12318). Author: @qoega. [#12441](https://github.com/ClickHouse/ClickHouse/pull/12441) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix UBSan report in HDFS library. This closes [#12330](https://github.com/ClickHouse/ClickHouse/issues/12330). [#12453](https://github.com/ClickHouse/ClickHouse/pull/12453) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Check an ability that we able to restore the backup from an old version to the new version. This closes [#8979](https://github.com/ClickHouse/ClickHouse/issues/8979). [#12959](https://github.com/ClickHouse/ClickHouse/pull/12959) ([alesapin](https://github.com/alesapin)). +* Do not build helper_container image inside integrational tests. Build docker container in CI and use pre-built helper_container in integration tests. [#12953](https://github.com/ClickHouse/ClickHouse/pull/12953) ([Ilya Yatsishin](https://github.com/qoega)). +* Add a test for `ALTER TABLE CLEAR COLUMN` query for primary key columns. [#12951](https://github.com/ClickHouse/ClickHouse/pull/12951) ([alesapin](https://github.com/alesapin)). +* Increased timeouts in testflows tests. [#12949](https://github.com/ClickHouse/ClickHouse/pull/12949) ([vzakaznikov](https://github.com/vzakaznikov)). +* Fix build of test under Mac OS X. This closes [#12767](https://github.com/ClickHouse/ClickHouse/issues/12767). [#12772](https://github.com/ClickHouse/ClickHouse/pull/12772) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Connector-ODBC updated to mysql-connector-odbc-8.0.21. [#12739](https://github.com/ClickHouse/ClickHouse/pull/12739) ([Ilya Yatsishin](https://github.com/qoega)). +* Adding RBAC syntax tests in TestFlows. [#12642](https://github.com/ClickHouse/ClickHouse/pull/12642) ([vzakaznikov](https://github.com/vzakaznikov)). +* Improve performance of TestKeeper. This will speedup tests with heavy usage of Replicated tables. [#12505](https://github.com/ClickHouse/ClickHouse/pull/12505) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now we check that server is able to start after stress tests run. This fixes [#12473](https://github.com/ClickHouse/ClickHouse/issues/12473). [#12496](https://github.com/ClickHouse/ClickHouse/pull/12496) ([alesapin](https://github.com/alesapin)). +* Update fmtlib to master (7.0.1). [#12446](https://github.com/ClickHouse/ClickHouse/pull/12446) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add docker image for fast tests. [#12294](https://github.com/ClickHouse/ClickHouse/pull/12294) ([alesapin](https://github.com/alesapin)). +* Rework configuration paths for integration tests. [#12285](https://github.com/ClickHouse/ClickHouse/pull/12285) ([Ilya Yatsishin](https://github.com/qoega)). +* Add compiler option to control that stack frames are not too large. This will help to run the code in fibers with small stack size. [#11524](https://github.com/ClickHouse/ClickHouse/pull/11524) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Update gitignore-files. [#13447](https://github.com/ClickHouse/ClickHouse/pull/13447) ([vladimir-golovchenko](https://github.com/vladimir-golovchenko)). + + +## ClickHouse release 20.6 + +### ClickHouse release v20.6.3.28-stable + +#### Backward Incompatible Change + +* When upgrading from versions older than 20.5, if rolling update is performed and cluster contains both versions 20.5 or greater and less than 20.5, if ClickHouse nodes with old versions are restarted and old version has been started up in presence of newer versions, it may lead to `Part ... intersects previous part` errors. To prevent this error, first install newer clickhouse-server packages on all cluster nodes and then do restarts (so, when clickhouse-server is restarted, it will start up with the new version). + +#### New Feature + +* Added an initial implementation of `EXPLAIN` query. Syntax: `EXPLAIN SELECT ...`. This fixes [#1118](https://github.com/ClickHouse/ClickHouse/issues/1118). [#11873](https://github.com/ClickHouse/ClickHouse/pull/11873) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Added storage `RabbitMQ`. [#11069](https://github.com/ClickHouse/ClickHouse/pull/11069) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Implemented PostgreSQL-like `ILIKE` operator for [#11710](https://github.com/ClickHouse/ClickHouse/issues/11710). [#12125](https://github.com/ClickHouse/ClickHouse/pull/12125) ([Mike](https://github.com/myrrc)). +* Supported RIGHT and FULL JOIN with `SET join_algorithm = 'partial_merge'`. Only ALL strictness is allowed (ANY, SEMI, ANTI, ASOF are not). [#12118](https://github.com/ClickHouse/ClickHouse/pull/12118) ([Artem Zuikov](https://github.com/4ertus2)). +* Added a function `initializeAggregation` to initialize an aggregation based on a single value. [#12109](https://github.com/ClickHouse/ClickHouse/pull/12109) ([Guillaume Tassery](https://github.com/YiuRULE)). +* Supported `ALTER TABLE ... [ADD|MODIFY] COLUMN ... FIRST` [#4006](https://github.com/ClickHouse/ClickHouse/issues/4006). [#12073](https://github.com/ClickHouse/ClickHouse/pull/12073) ([Winter Zhang](https://github.com/zhang2014)). +* Added function `parseDateTimeBestEffortUS`. [#12028](https://github.com/ClickHouse/ClickHouse/pull/12028) ([flynn](https://github.com/ucasFL)). +* Support format `ORC` for output (was supported only for input). [#11662](https://github.com/ClickHouse/ClickHouse/pull/11662) ([Kruglov Pavel](https://github.com/Avogar)). + +#### Bug Fix + +* Fixed `aggregate function any(x) is found inside another aggregate function in query` error with `SET optimize_move_functions_out_of_any = 1` and aliases inside `any()`. [#13419](https://github.com/ClickHouse/ClickHouse/pull/13419) ([Artem Zuikov](https://github.com/4ertus2)). +* Fixed `PrettyCompactMonoBlock` for clickhouse-local. Fixed extremes/totals with `PrettyCompactMonoBlock`. This fixes [#7746](https://github.com/ClickHouse/ClickHouse/issues/7746). [#13394](https://github.com/ClickHouse/ClickHouse/pull/13394) ([Azat Khuzhin](https://github.com/azat)). +* Fixed possible error `Totals having transform was already added to pipeline` in case of a query from delayed replica. [#13290](https://github.com/ClickHouse/ClickHouse/pull/13290) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* The server may crash if user passed specifically crafted arguments to the function `h3ToChildren`. This fixes [#13275](https://github.com/ClickHouse/ClickHouse/issues/13275). [#13277](https://github.com/ClickHouse/ClickHouse/pull/13277) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potentially low performance and slightly incorrect result for `uniqExact`, `topK`, `sumDistinct` and similar aggregate functions called on Float types with NaN values. It also triggered assert in debug build. This fixes [#12491](https://github.com/ClickHouse/ClickHouse/issues/12491). [#13254](https://github.com/ClickHouse/ClickHouse/pull/13254) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed function if with nullable constexpr as cond that is not literal NULL. Fixes [#12463](https://github.com/ClickHouse/ClickHouse/issues/12463). [#13226](https://github.com/ClickHouse/ClickHouse/pull/13226) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed assert in `arrayElement` function in case of array elements are Nullable and array subscript is also Nullable. This fixes [#12172](https://github.com/ClickHouse/ClickHouse/issues/12172). [#13224](https://github.com/ClickHouse/ClickHouse/pull/13224) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `DateTime64` conversion functions with constant argument. [#13205](https://github.com/ClickHouse/ClickHouse/pull/13205) ([Azat Khuzhin](https://github.com/azat)). +* Fixed wrong index analysis with functions. It could lead to pruning wrong parts, while reading from `MergeTree` tables. Fixes [#13060](https://github.com/ClickHouse/ClickHouse/issues/13060). Fixes [#12406](https://github.com/ClickHouse/ClickHouse/issues/12406). [#13081](https://github.com/ClickHouse/ClickHouse/pull/13081) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed error `Cannot convert column because it is constant but values of constants are different in source and result` for remote queries which use deterministic functions in scope of query, but not deterministic between queries, like `now()`, `now64()`, `randConstant()`. Fixes [#11327](https://github.com/ClickHouse/ClickHouse/issues/11327). [#13075](https://github.com/ClickHouse/ClickHouse/pull/13075) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed unnecessary limiting for the number of threads for selects from local replica. [#12840](https://github.com/ClickHouse/ClickHouse/pull/12840) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed rare bug when `ALTER DELETE` and `ALTER MODIFY COLUMN` queries executed simultaneously as a single mutation. Bug leads to an incorrect amount of rows in `count.txt` and as a consequence incorrect data in part. Also, fix a small bug with simultaneous `ALTER RENAME COLUMN` and `ALTER ADD COLUMN`. [#12760](https://github.com/ClickHouse/ClickHouse/pull/12760) ([alesapin](https://github.com/alesapin)). +* Fixed `CAST(Nullable(String), Enum())`. [#12745](https://github.com/ClickHouse/ClickHouse/pull/12745) ([Azat Khuzhin](https://github.com/azat)). +* Fixed a performance with large tuples, which are interpreted as functions in `IN` section. The case when user write `WHERE x IN tuple(1, 2, ...)` instead of `WHERE x IN (1, 2, ...)` for some obscure reason. [#12700](https://github.com/ClickHouse/ClickHouse/pull/12700) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed memory tracking for `input_format_parallel_parsing` (by attaching thread to group). [#12672](https://github.com/ClickHouse/ClickHouse/pull/12672) ([Azat Khuzhin](https://github.com/azat)). +* Fixed bloom filter index with const expression. This fixes [#10572](https://github.com/ClickHouse/ClickHouse/issues/10572). [#12659](https://github.com/ClickHouse/ClickHouse/pull/12659) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed `SIGSEGV` in `StorageKafka` when broker is unavailable (and not only). [#12658](https://github.com/ClickHouse/ClickHouse/pull/12658) ([Azat Khuzhin](https://github.com/azat)). +* Added support for function `if` with `Array(UUID)` arguments. This fixes [#11066](https://github.com/ClickHouse/ClickHouse/issues/11066). [#12648](https://github.com/ClickHouse/ClickHouse/pull/12648) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* `CREATE USER IF NOT EXISTS` now does not throw exception if the user exists. This fixes [#12507](https://github.com/ClickHouse/ClickHouse/issues/12507). [#12646](https://github.com/ClickHouse/ClickHouse/pull/12646) ([Vitaly Baranov](https://github.com/vitlibar)). +* Better exception message in disk access storage. [#12625](https://github.com/ClickHouse/ClickHouse/pull/12625) ([alesapin](https://github.com/alesapin)). +* The function `groupArrayMoving*` was not working for distributed queries. It's result was calculated within incorrect data type (without promotion to the largest type). The function `groupArrayMovingAvg` was returning integer number that was inconsistent with the `avg` function. This fixes [#12568](https://github.com/ClickHouse/ClickHouse/issues/12568). [#12622](https://github.com/ClickHouse/ClickHouse/pull/12622) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed lack of aliases with function `any`. [#12593](https://github.com/ClickHouse/ClickHouse/pull/12593) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed race condition in external dictionaries with cache layout which can lead server crash. [#12566](https://github.com/ClickHouse/ClickHouse/pull/12566) ([alesapin](https://github.com/alesapin)). +* Remove data for Distributed tables (blocks from async INSERTs) on DROP TABLE. [#12556](https://github.com/ClickHouse/ClickHouse/pull/12556) ([Azat Khuzhin](https://github.com/azat)). +* Fixed bug which lead to broken old parts after `ALTER DELETE` query when `enable_mixed_granularity_parts=1`. Fixes [#12536](https://github.com/ClickHouse/ClickHouse/issues/12536). [#12543](https://github.com/ClickHouse/ClickHouse/pull/12543) ([alesapin](https://github.com/alesapin)). +* Better exception for function `in` with invalid number of arguments. [#12529](https://github.com/ClickHouse/ClickHouse/pull/12529) ([Anton Popov](https://github.com/CurtizJ)). +* Fixing race condition in live view tables which could cause data duplication. [#12519](https://github.com/ClickHouse/ClickHouse/pull/12519) ([vzakaznikov](https://github.com/vzakaznikov)). +* Fixed performance issue, while reading from compact parts. [#12492](https://github.com/ClickHouse/ClickHouse/pull/12492) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed backwards compatibility in binary format of `AggregateFunction(avg, ...)` values. This fixes [#12342](https://github.com/ClickHouse/ClickHouse/issues/12342). [#12486](https://github.com/ClickHouse/ClickHouse/pull/12486) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed SETTINGS parse after FORMAT. [#12480](https://github.com/ClickHouse/ClickHouse/pull/12480) ([Azat Khuzhin](https://github.com/azat)). +* Fixed the deadlock if `text_log` is enabled. [#12452](https://github.com/ClickHouse/ClickHouse/pull/12452) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed overflow when very large `LIMIT` or `OFFSET` is specified. This fixes [#10470](https://github.com/ClickHouse/ClickHouse/issues/10470). This fixes [#11372](https://github.com/ClickHouse/ClickHouse/issues/11372). [#12427](https://github.com/ClickHouse/ClickHouse/pull/12427) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed possible segfault if `StorageMerge`. This fixes [#12054](https://github.com/ClickHouse/ClickHouse/issues/12054). [#12401](https://github.com/ClickHouse/ClickHouse/pull/12401) ([tavplubix](https://github.com/tavplubix)). +* Reverted change introduced in [#11079](https://github.com/ClickHouse/ClickHouse/issues/11079) to resolve [#12098](https://github.com/ClickHouse/ClickHouse/issues/12098). [#12397](https://github.com/ClickHouse/ClickHouse/pull/12397) ([Mike](https://github.com/myrrc)). +* Additional check for arguments of bloom filter index. This fixes [#11408](https://github.com/ClickHouse/ClickHouse/issues/11408). [#12388](https://github.com/ClickHouse/ClickHouse/pull/12388) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Avoid exception when negative or floating point constant is used in WHERE condition for indexed tables. This fixes [#11905](https://github.com/ClickHouse/ClickHouse/issues/11905). [#12384](https://github.com/ClickHouse/ClickHouse/pull/12384) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allowed to `CLEAR` column even if there are depending `DEFAULT` expressions. This fixes [#12333](https://github.com/ClickHouse/ClickHouse/issues/12333). [#12378](https://github.com/ClickHouse/ClickHouse/pull/12378) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `TOTALS/ROLLUP/CUBE` for aggregate functions with `-State` and `Nullable` arguments. This fixes [#12163](https://github.com/ClickHouse/ClickHouse/issues/12163). [#12376](https://github.com/ClickHouse/ClickHouse/pull/12376) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed error message and exit codes for `ALTER RENAME COLUMN` queries, when `RENAME` is not allowed. Fixes [#12301](https://github.com/ClickHouse/ClickHouse/issues/12301) and [#12303](https://github.com/ClickHouse/ClickHouse/issues/12303). [#12335](https://github.com/ClickHouse/ClickHouse/pull/12335) ([alesapin](https://github.com/alesapin)). +* Fixed very rare race condition in `ReplicatedMergeTreeQueue`. [#12315](https://github.com/ClickHouse/ClickHouse/pull/12315) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* When using codec `Delta` or `DoubleDelta` with non fixed width types, exception with code `LOGICAL_ERROR` was returned instead of exception with code `BAD_ARGUMENTS` (we ensure that exceptions with code logical error never happen). This fixes [#12110](https://github.com/ClickHouse/ClickHouse/issues/12110). [#12308](https://github.com/ClickHouse/ClickHouse/pull/12308) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed order of columns in `WITH FILL` modifier. Previously order of columns of `ORDER BY` statement wasn't respected. [#12306](https://github.com/ClickHouse/ClickHouse/pull/12306) ([Anton Popov](https://github.com/CurtizJ)). +* Avoid "bad cast" exception when there is an expression that filters data by virtual columns (like `_table` in `Merge` tables) or by "index" columns in system tables such as filtering by database name when querying from `system.tables`, and this expression returns `Nullable` type. This fixes [#12166](https://github.com/ClickHouse/ClickHouse/issues/12166). [#12305](https://github.com/ClickHouse/ClickHouse/pull/12305) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `TTL` after renaming column, on which depends TTL expression. [#12304](https://github.com/ClickHouse/ClickHouse/pull/12304) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed SIGSEGV if there is an message with error in the middle of the batch in `Kafka` Engine. [#12302](https://github.com/ClickHouse/ClickHouse/pull/12302) ([Azat Khuzhin](https://github.com/azat)). +* Fixed the situation when some threads might randomly hang for a few seconds during `DNS` cache updating. [#12296](https://github.com/ClickHouse/ClickHouse/pull/12296) ([tavplubix](https://github.com/tavplubix)). +* Fixed typo in setting name. [#12292](https://github.com/ClickHouse/ClickHouse/pull/12292) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Show error after `TrieDictionary` failed to load. [#12290](https://github.com/ClickHouse/ClickHouse/pull/12290) ([Vitaly Baranov](https://github.com/vitlibar)). +* The function `arrayFill` worked incorrectly for empty arrays that may lead to crash. This fixes [#12263](https://github.com/ClickHouse/ClickHouse/issues/12263). [#12279](https://github.com/ClickHouse/ClickHouse/pull/12279) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Implement conversions to the common type for `LowCardinality` types. This allows to execute UNION ALL of tables with columns of LowCardinality and other columns. This fixes [#8212](https://github.com/ClickHouse/ClickHouse/issues/8212). This fixes [#4342](https://github.com/ClickHouse/ClickHouse/issues/4342). [#12275](https://github.com/ClickHouse/ClickHouse/pull/12275) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the behaviour on reaching redirect limit in request to `S3` storage. [#12256](https://github.com/ClickHouse/ClickHouse/pull/12256) ([ianton-ru](https://github.com/ianton-ru)). +* Fixed the behaviour when during multiple sequential inserts in `StorageFile` header for some special types was written more than once. This fixed [#6155](https://github.com/ClickHouse/ClickHouse/issues/6155). [#12197](https://github.com/ClickHouse/ClickHouse/pull/12197) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fixed logical functions for UInt8 values when they are not equal to 0 or 1. [#12196](https://github.com/ClickHouse/ClickHouse/pull/12196) ([Alexander Kazakov](https://github.com/Akazz)). +* Cap max_memory_usage* limits to the process resident memory. [#12182](https://github.com/ClickHouse/ClickHouse/pull/12182) ([Azat Khuzhin](https://github.com/azat)). +* Fix dictGet arguments check during `GROUP BY` injective functions elimination. [#12179](https://github.com/ClickHouse/ClickHouse/pull/12179) ([Azat Khuzhin](https://github.com/azat)). +* Fixed the behaviour when `SummingMergeTree` engine sums up columns from partition key. Added an exception in case of explicit definition of columns to sum which intersects with partition key columns. This fixes [#7867](https://github.com/ClickHouse/ClickHouse/issues/7867). [#12173](https://github.com/ClickHouse/ClickHouse/pull/12173) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Don't split the dictionary source's table name into schema and table name itself if ODBC connection does not support schema. [#12165](https://github.com/ClickHouse/ClickHouse/pull/12165) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed wrong logic in `ALTER DELETE` that leads to deleting of records when condition evaluates to NULL. This fixes [#9088](https://github.com/ClickHouse/ClickHouse/issues/9088). This closes [#12106](https://github.com/ClickHouse/ClickHouse/issues/12106). [#12153](https://github.com/ClickHouse/ClickHouse/pull/12153) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed transform of query to send to external DBMS (e.g. MySQL, ODBC) in presense of aliases. This fixes [#12032](https://github.com/ClickHouse/ClickHouse/issues/12032). [#12151](https://github.com/ClickHouse/ClickHouse/pull/12151) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed bad code in redundant ORDER BY optimization. The bug was introduced in [#10067](https://github.com/ClickHouse/ClickHouse/issues/10067). [#12148](https://github.com/ClickHouse/ClickHouse/pull/12148) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potential overflow in integer division. This fixes [#12119](https://github.com/ClickHouse/ClickHouse/issues/12119). [#12140](https://github.com/ClickHouse/ClickHouse/pull/12140) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potential infinite loop in `greatCircleDistance`, `geoDistance`. This fixes [#12117](https://github.com/ClickHouse/ClickHouse/issues/12117). [#12137](https://github.com/ClickHouse/ClickHouse/pull/12137) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Normalize "pid" file handling. In previous versions the server may refuse to start if it was killed without proper shutdown and if there is another process that has the same pid as previously runned server. Also pid file may be removed in unsuccessful server startup even if there is another server running. This fixes [#3501](https://github.com/ClickHouse/ClickHouse/issues/3501). [#12133](https://github.com/ClickHouse/ClickHouse/pull/12133) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed bug which leads to incorrect table metadata in ZooKeepeer for ReplicatedVersionedCollapsingMergeTree tables. Fixes [#12093](https://github.com/ClickHouse/ClickHouse/issues/12093). [#12121](https://github.com/ClickHouse/ClickHouse/pull/12121) ([alesapin](https://github.com/alesapin)). +* Avoid "There is no query" exception for materialized views with joins or with subqueries attached to system logs (system.query_log, metric_log, etc) or to engine=Buffer underlying table. [#12120](https://github.com/ClickHouse/ClickHouse/pull/12120) ([filimonov](https://github.com/filimonov)). +* Fixed handling dependency of table with ENGINE=Dictionary on dictionary. This fixes [#10994](https://github.com/ClickHouse/ClickHouse/issues/10994). This fixes [#10397](https://github.com/ClickHouse/ClickHouse/issues/10397). [#12116](https://github.com/ClickHouse/ClickHouse/pull/12116) ([Vitaly Baranov](https://github.com/vitlibar)). +* Format `Parquet` now properly works with `LowCardinality` and `LowCardinality(Nullable)` types. Fixes [#12086](https://github.com/ClickHouse/ClickHouse/issues/12086), [#8406](https://github.com/ClickHouse/ClickHouse/issues/8406). [#12108](https://github.com/ClickHouse/ClickHouse/pull/12108) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed performance for selects with `UNION` caused by wrong limit for the total number of threads. Fixes [#12030](https://github.com/ClickHouse/ClickHouse/issues/12030). [#12103](https://github.com/ClickHouse/ClickHouse/pull/12103) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed segfault with `-StateResample` combinators. [#12092](https://github.com/ClickHouse/ClickHouse/pull/12092) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed empty `result_rows` and `result_bytes` metrics in `system.quey_log` for selects. Fixes [#11595](https://github.com/ClickHouse/ClickHouse/issues/11595). [#12089](https://github.com/ClickHouse/ClickHouse/pull/12089) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed unnecessary limiting the number of threads for selects from `VIEW`. Fixes [#11937](https://github.com/ClickHouse/ClickHouse/issues/11937). [#12085](https://github.com/ClickHouse/ClickHouse/pull/12085) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed SIGSEGV in StorageKafka on DROP TABLE. [#12075](https://github.com/ClickHouse/ClickHouse/pull/12075) ([Azat Khuzhin](https://github.com/azat)). +* Fixed possible crash while using wrong type for `PREWHERE`. Fixes [#12053](https://github.com/ClickHouse/ClickHouse/issues/12053), [#12060](https://github.com/ClickHouse/ClickHouse/issues/12060). [#12060](https://github.com/ClickHouse/ClickHouse/pull/12060) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed error `Cannot capture column` for higher-order functions with `Tuple(LowCardinality)` argument. Fixes [#9766](https://github.com/ClickHouse/ClickHouse/issues/9766). [#12055](https://github.com/ClickHouse/ClickHouse/pull/12055) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed constraints check if constraint is a constant expression. This fixes [#11360](https://github.com/ClickHouse/ClickHouse/issues/11360). [#12042](https://github.com/ClickHouse/ClickHouse/pull/12042) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed wrong result and potential crash when invoking function `if` with arguments of type `FixedString` with different sizes. This fixes [#11362](https://github.com/ClickHouse/ClickHouse/issues/11362). [#12021](https://github.com/ClickHouse/ClickHouse/pull/12021) ([alexey-milovidov](https://github.com/alexey-milovidov)). + +#### Improvement + +* Allowed to set `JOIN` kind and type in more standard way: `LEFT SEMI JOIN` instead of `SEMI LEFT JOIN`. For now both are correct. [#12520](https://github.com/ClickHouse/ClickHouse/pull/12520) ([Artem Zuikov](https://github.com/4ertus2)). +* lifetime_rows/lifetime_bytes for Buffer engine. [#12421](https://github.com/ClickHouse/ClickHouse/pull/12421) ([Azat Khuzhin](https://github.com/azat)). +* Write the detail exception message to the client instead of 'MySQL server has gone away'. [#12383](https://github.com/ClickHouse/ClickHouse/pull/12383) ([BohuTANG](https://github.com/BohuTANG)). +* Allows to change a charset which is used for printing grids borders. Available charsets are following: UTF-8, ASCII. Setting `output_format_pretty_grid_charset` enables this feature. [#12372](https://github.com/ClickHouse/ClickHouse/pull/12372) ([Sabyanin Maxim](https://github.com/s-mx)). +* Supported MySQL 'SELECT DATABASE()' [#9336](https://github.com/ClickHouse/ClickHouse/issues/9336) 2. Add MySQL replacement query integration test. [#12314](https://github.com/ClickHouse/ClickHouse/pull/12314) ([BohuTANG](https://github.com/BohuTANG)). +* Added `KILL QUERY [connection_id]` for the MySQL client/driver to cancel the long query, issue [#12038](https://github.com/ClickHouse/ClickHouse/issues/12038). [#12152](https://github.com/ClickHouse/ClickHouse/pull/12152) ([BohuTANG](https://github.com/BohuTANG)). +* Added support for `%g` (two digit ISO year) and `%G` (four digit ISO year) substitutions in `formatDateTime` function. [#12136](https://github.com/ClickHouse/ClickHouse/pull/12136) ([vivarum](https://github.com/vivarum)). +* Added 'type' column in system.disks. [#12115](https://github.com/ClickHouse/ClickHouse/pull/12115) ([ianton-ru](https://github.com/ianton-ru)). +* Improved `REVOKE` command: now it requires grant/admin option for only access which will be revoked. For example, to execute `REVOKE ALL ON *.* FROM user1` now it does not require to have full access rights granted with grant option. Added command `REVOKE ALL FROM user1` - it revokes all granted roles from `user1`. [#12083](https://github.com/ClickHouse/ClickHouse/pull/12083) ([Vitaly Baranov](https://github.com/vitlibar)). +* Added replica priority for load_balancing (for manual prioritization of the load balancing). [#11995](https://github.com/ClickHouse/ClickHouse/pull/11995) ([Azat Khuzhin](https://github.com/azat)). +* Switched paths in S3 metadata to relative which allows to handle S3 blobs more easily. [#11892](https://github.com/ClickHouse/ClickHouse/pull/11892) ([Vladimir Chebotarev](https://github.com/excitoon)). + +#### Performance Improvement + +* Improved performace of 'ORDER BY' and 'GROUP BY' by prefix of sorting key (enabled with `optimize_aggregation_in_order` setting, disabled by default). [#11696](https://github.com/ClickHouse/ClickHouse/pull/11696) ([Anton Popov](https://github.com/CurtizJ)). +* Removed injective functions inside `uniq*()` if `set optimize_injective_functions_inside_uniq=1`. [#12337](https://github.com/ClickHouse/ClickHouse/pull/12337) ([Ruslan Kamalov](https://github.com/kamalov-ruslan)). +* Index not used for IN operator with literals, performance regression introduced around v19.3. This fixes [#10574](https://github.com/ClickHouse/ClickHouse/issues/10574). [#12062](https://github.com/ClickHouse/ClickHouse/pull/12062) ([nvartolomei](https://github.com/nvartolomei)). +* Implemented single part uploads for DiskS3 (experimental feature). [#12026](https://github.com/ClickHouse/ClickHouse/pull/12026) ([Vladimir Chebotarev](https://github.com/excitoon)). + +#### Experimental Feature +* Added new in-memory format of parts in `MergeTree`-family tables, which stores data in memory. Parts are written on disk at first merge. Part will be created in in-memory format if its size in rows or bytes is below thresholds `min_rows_for_compact_part` and `min_bytes_for_compact_part`. Also optional support of Write-Ahead-Log is available, which is enabled by default and is controlled by setting `in_memory_parts_enable_wal`. [#10697](https://github.com/ClickHouse/ClickHouse/pull/10697) ([Anton Popov](https://github.com/CurtizJ)). + +#### Build/Testing/Packaging Improvement + +* Implement AST-based query fuzzing mode for clickhouse-client. See [this label](https://github.com/ClickHouse/ClickHouse/issues?q=label%3Afuzz+is%3Aissue) for the list of issues we recently found by fuzzing. Most of them were found by this tool, and a couple by SQLancer and `00746_sql_fuzzy.pl`. [#12111](https://github.com/ClickHouse/ClickHouse/pull/12111) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Add new type of tests based on Testflows framework. [#12090](https://github.com/ClickHouse/ClickHouse/pull/12090) ([vzakaznikov](https://github.com/vzakaznikov)). +* Added S3 HTTPS integration test. [#12412](https://github.com/ClickHouse/ClickHouse/pull/12412) ([Pavel Kovalenko](https://github.com/Jokser)). +* Log sanitizer trap messages from separate thread. This will prevent possible deadlock under thread sanitizer. [#12313](https://github.com/ClickHouse/ClickHouse/pull/12313) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now functional and stress tests will be able to run with old version of `clickhouse-test` script. [#12287](https://github.com/ClickHouse/ClickHouse/pull/12287) ([alesapin](https://github.com/alesapin)). +* Remove strange file creation during build in `orc`. [#12258](https://github.com/ClickHouse/ClickHouse/pull/12258) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Place common docker compose files to integration docker container. [#12168](https://github.com/ClickHouse/ClickHouse/pull/12168) ([Ilya Yatsishin](https://github.com/qoega)). +* Fix warnings from CodeQL. `CodeQL` is another static analyzer that we will use along with `clang-tidy` and `PVS-Studio` that we use already. [#12138](https://github.com/ClickHouse/ClickHouse/pull/12138) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Minor CMake fixes for UNBUNDLED build. [#12131](https://github.com/ClickHouse/ClickHouse/pull/12131) ([Matwey V. Kornilov](https://github.com/matwey)). +* Added a showcase of the minimal Docker image without using any Linux distribution. [#12126](https://github.com/ClickHouse/ClickHouse/pull/12126) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Perform an upgrade of system packages in the `clickhouse-server` docker image. [#12124](https://github.com/ClickHouse/ClickHouse/pull/12124) ([Ivan Blinkov](https://github.com/blinkov)). +* Add `UNBUNDLED` flag to `system.build_options` table. Move skip lists for `clickhouse-test` to clickhouse repo. [#12107](https://github.com/ClickHouse/ClickHouse/pull/12107) ([alesapin](https://github.com/alesapin)). +* Regular check by [Anchore Container Analysis](https://docs.anchore.com) security analysis tool that looks for [CVE](https://cve.mitre.org/) in `clickhouse-server` Docker image. Also confirms that `Dockerfile` is buildable. Runs daily on `master` and on pull-requests to `Dockerfile`. [#12102](https://github.com/ClickHouse/ClickHouse/pull/12102) ([Ivan Blinkov](https://github.com/blinkov)). +* Daily check by [GitHub CodeQL](https://securitylab.github.com/tools/codeql) security analysis tool that looks for [CWE](https://cwe.mitre.org/). [#12101](https://github.com/ClickHouse/ClickHouse/pull/12101) ([Ivan Blinkov](https://github.com/blinkov)). +* Install `ca-certificates` before the first `apt-get update` in Dockerfile. [#12095](https://github.com/ClickHouse/ClickHouse/pull/12095) ([Ivan Blinkov](https://github.com/blinkov)). + +## ClickHouse release 20.5 + +### ClickHouse release v20.5.4.40-stable 2020-08-10 + +#### Bug Fix + +* Fixed wrong index analysis with functions. It could lead to pruning wrong parts, while reading from `MergeTree` tables. Fixes [#13060](https://github.com/ClickHouse/ClickHouse/issues/13060). Fixes [#12406](https://github.com/ClickHouse/ClickHouse/issues/12406). [#13081](https://github.com/ClickHouse/ClickHouse/pull/13081) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed unnecessary limiting for the number of threads for selects from local replica. [#12840](https://github.com/ClickHouse/ClickHouse/pull/12840) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed performance with large tuples, which are interpreted as functions in `IN` section. The case when user write `WHERE x IN tuple(1, 2, ...)` instead of `WHERE x IN (1, 2, ...)` for some obscure reason. [#12700](https://github.com/ClickHouse/ClickHouse/pull/12700) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed memory tracking for input_format_parallel_parsing (by attaching thread to group). [#12672](https://github.com/ClickHouse/ClickHouse/pull/12672) ([Azat Khuzhin](https://github.com/azat)). +* Fixed bloom filter index with const expression. This fixes [#10572](https://github.com/ClickHouse/ClickHouse/issues/10572). [#12659](https://github.com/ClickHouse/ClickHouse/pull/12659) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed `SIGSEGV` in `StorageKafka` when broker is unavailable (and not only). [#12658](https://github.com/ClickHouse/ClickHouse/pull/12658) ([Azat Khuzhin](https://github.com/azat)). +* Added support for function `if` with `Array(UUID)` arguments. This fixes [#11066](https://github.com/ClickHouse/ClickHouse/issues/11066). [#12648](https://github.com/ClickHouse/ClickHouse/pull/12648) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed lack of aliases with function `any`. [#12593](https://github.com/ClickHouse/ClickHouse/pull/12593) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed race condition in external dictionaries with cache layout which can lead server crash. [#12566](https://github.com/ClickHouse/ClickHouse/pull/12566) ([alesapin](https://github.com/alesapin)). +* Remove data for Distributed tables (blocks from async INSERTs) on DROP TABLE. [#12556](https://github.com/ClickHouse/ClickHouse/pull/12556) ([Azat Khuzhin](https://github.com/azat)). +* Fixed bug which lead to broken old parts after `ALTER DELETE` query when `enable_mixed_granularity_parts=1`. Fixes [#12536](https://github.com/ClickHouse/ClickHouse/issues/12536). [#12543](https://github.com/ClickHouse/ClickHouse/pull/12543) ([alesapin](https://github.com/alesapin)). +* Better exception for function `in` with invalid number of arguments. [#12529](https://github.com/ClickHouse/ClickHouse/pull/12529) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed race condition in live view tables which could cause data duplication. [#12519](https://github.com/ClickHouse/ClickHouse/pull/12519) ([vzakaznikov](https://github.com/vzakaznikov)). +* Fixed performance issue, while reading from compact parts. [#12492](https://github.com/ClickHouse/ClickHouse/pull/12492) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed backwards compatibility in binary format of `AggregateFunction(avg, ...)` values. This fixes [#12342](https://github.com/ClickHouse/ClickHouse/issues/12342). [#12486](https://github.com/ClickHouse/ClickHouse/pull/12486) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the deadlock if `text_log` is enabled. [#12452](https://github.com/ClickHouse/ClickHouse/pull/12452) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed overflow when very large LIMIT or OFFSET is specified. This fixes [#10470](https://github.com/ClickHouse/ClickHouse/issues/10470). This fixes [#11372](https://github.com/ClickHouse/ClickHouse/issues/11372). [#12427](https://github.com/ClickHouse/ClickHouse/pull/12427) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed possible segfault if StorageMerge. Closes [#12054](https://github.com/ClickHouse/ClickHouse/issues/12054). [#12401](https://github.com/ClickHouse/ClickHouse/pull/12401) ([tavplubix](https://github.com/tavplubix)). +* Reverts change introduced in [#11079](https://github.com/ClickHouse/ClickHouse/issues/11079) to resolve [#12098](https://github.com/ClickHouse/ClickHouse/issues/12098). [#12397](https://github.com/ClickHouse/ClickHouse/pull/12397) ([Mike](https://github.com/myrrc)). +* Avoid exception when negative or floating point constant is used in WHERE condition for indexed tables. This fixes [#11905](https://github.com/ClickHouse/ClickHouse/issues/11905). [#12384](https://github.com/ClickHouse/ClickHouse/pull/12384) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow to CLEAR column even if there are depending DEFAULT expressions. This fixes [#12333](https://github.com/ClickHouse/ClickHouse/issues/12333). [#12378](https://github.com/ClickHouse/ClickHouse/pull/12378) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed TOTALS/ROLLUP/CUBE for aggregate functions with `-State` and `Nullable` arguments. This fixes [#12163](https://github.com/ClickHouse/ClickHouse/issues/12163). [#12376](https://github.com/ClickHouse/ClickHouse/pull/12376) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed SIGSEGV if there is an message with error in the middle of the batch in `Kafka` Engine. [#12302](https://github.com/ClickHouse/ClickHouse/pull/12302) ([Azat Khuzhin](https://github.com/azat)). +* Fixed the behaviour when `SummingMergeTree` engine sums up columns from partition key. Added an exception in case of explicit definition of columns to sum which intersects with partition key columns. This fixes [#7867](https://github.com/ClickHouse/ClickHouse/issues/7867). [#12173](https://github.com/ClickHouse/ClickHouse/pull/12173) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fixed transform of query to send to external DBMS (e.g. MySQL, ODBC) in presense of aliases. This fixes [#12032](https://github.com/ClickHouse/ClickHouse/issues/12032). [#12151](https://github.com/ClickHouse/ClickHouse/pull/12151) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed bug which leads to incorrect table metadata in ZooKeepeer for ReplicatedVersionedCollapsingMergeTree tables. Fixes [#12093](https://github.com/ClickHouse/ClickHouse/issues/12093). [#12121](https://github.com/ClickHouse/ClickHouse/pull/12121) ([alesapin](https://github.com/alesapin)). +* Fixed unnecessary limiting the number of threads for selects from `VIEW`. Fixes [#11937](https://github.com/ClickHouse/ClickHouse/issues/11937). [#12085](https://github.com/ClickHouse/ClickHouse/pull/12085) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed crash in JOIN with LowCardinality type with `join_algorithm=partial_merge`. [#12035](https://github.com/ClickHouse/ClickHouse/pull/12035) ([Artem Zuikov](https://github.com/4ertus2)). +* Fixed wrong result for `if()` with NULLs in condition. [#11807](https://github.com/ClickHouse/ClickHouse/pull/11807) ([Artem Zuikov](https://github.com/4ertus2)). + +#### Performance Improvement + +* Index not used for IN operator with literals, performance regression introduced around v19.3. This fixes [#10574](https://github.com/ClickHouse/ClickHouse/issues/10574). [#12062](https://github.com/ClickHouse/ClickHouse/pull/12062) ([nvartolomei](https://github.com/nvartolomei)). + +#### Build/Testing/Packaging Improvement + +* Install `ca-certificates` before the first `apt-get update` in Dockerfile. [#12095](https://github.com/ClickHouse/ClickHouse/pull/12095) ([Ivan Blinkov](https://github.com/blinkov)). + + +### ClickHouse release v20.5.2.7-stable 2020-07-02 + +#### Backward Incompatible Change + +* Return non-Nullable result from COUNT(DISTINCT), and `uniq` aggregate functions family. If all passed values are NULL, return zero instead. This improves SQL compatibility. [#11661](https://github.com/ClickHouse/ClickHouse/pull/11661) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added a check for the case when user-level setting is specified in a wrong place. User-level settings should be specified in `users.xml` inside `` section for specific user profile (or in `` for default settings). The server won't start with exception message in log. This fixes [#9051](https://github.com/ClickHouse/ClickHouse/issues/9051). If you want to skip the check, you can either move settings to the appropriate place or add `1` to config.xml. [#11449](https://github.com/ClickHouse/ClickHouse/pull/11449) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* The setting `input_format_with_names_use_header` is enabled by default. It will affect parsing of input formats `-WithNames` and `-WithNamesAndTypes`. [#10937](https://github.com/ClickHouse/ClickHouse/pull/10937) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove `experimental_use_processors` setting. It is enabled by default. [#10924](https://github.com/ClickHouse/ClickHouse/pull/10924) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Update `zstd` to 1.4.4. It has some minor improvements in performance and compression ratio. If you run replicas with different versions of ClickHouse you may see reasonable error messages `Data after merge is not byte-identical to data on another replicas.` with explanation. These messages are Ok and you should not worry. This change is backward compatible but we list it here in changelog in case you will wonder about these messages. [#10663](https://github.com/ClickHouse/ClickHouse/pull/10663) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added a check for meaningless codecs and a setting `allow_suspicious_codecs` to control this check. This closes [#4966](https://github.com/ClickHouse/ClickHouse/issues/4966). [#10645](https://github.com/ClickHouse/ClickHouse/pull/10645) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Several Kafka setting changes their defaults. See [#11388](https://github.com/ClickHouse/ClickHouse/pull/11388). +* When upgrading from versions older than 20.5, if rolling update is performed and cluster contains both versions 20.5 or greater and less than 20.5, if ClickHouse nodes with old versions are restarted and old version has been started up in presence of newer versions, it may lead to `Part ... intersects previous part` errors. To prevent this error, first install newer clickhouse-server packages on all cluster nodes and then do restarts (so, when clickhouse-server is restarted, it will start up with the new version). + +#### New Feature + +* `TTL DELETE WHERE` and `TTL GROUP BY` for automatic data coarsening and rollup in tables. [#10537](https://github.com/ClickHouse/ClickHouse/pull/10537) ([expl0si0nn](https://github.com/expl0si0nn)). +* Implementation of PostgreSQL wire protocol. [#10242](https://github.com/ClickHouse/ClickHouse/pull/10242) ([Movses](https://github.com/MovElb)). +* Added system tables for users, roles, grants, settings profiles, quotas, row policies; added commands SHOW USER, SHOW [CURRENT|ENABLED] ROLES, SHOW SETTINGS PROFILES. [#10387](https://github.com/ClickHouse/ClickHouse/pull/10387) ([Vitaly Baranov](https://github.com/vitlibar)). +* Support writes in ODBC Table function [#10554](https://github.com/ClickHouse/ClickHouse/pull/10554) ([ageraab](https://github.com/ageraab)). [#10901](https://github.com/ClickHouse/ClickHouse/pull/10901) ([tavplubix](https://github.com/tavplubix)). +* Add query performance metrics based on Linux `perf_events` (these metrics are calculated with hardware CPU counters and OS counters). It is optional and requires `CAP_SYS_ADMIN` to be set on clickhouse binary. [#9545](https://github.com/ClickHouse/ClickHouse/pull/9545) [Andrey Skobtsov](https://github.com/And42). [#11226](https://github.com/ClickHouse/ClickHouse/pull/11226) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Now support `NULL` and `NOT NULL` modifiers for data types in `CREATE` query. [#11057](https://github.com/ClickHouse/ClickHouse/pull/11057) ([Павел Потемкин](https://github.com/Potya)). +* Add `ArrowStream` input and output format. [#11088](https://github.com/ClickHouse/ClickHouse/pull/11088) ([hcz](https://github.com/hczhcz)). +* Support Cassandra as external dictionary source. [#4978](https://github.com/ClickHouse/ClickHouse/pull/4978) ([favstovol](https://github.com/favstovol)). +* Added a new layout `direct` which loads all the data directly from the source for each query, without storing or caching data. [#10622](https://github.com/ClickHouse/ClickHouse/pull/10622) ([Artem Streltsov](https://github.com/kekekekule)). +* Added new `complex_key_direct` layout to dictionaries, that does not store anything locally during query execution. [#10850](https://github.com/ClickHouse/ClickHouse/pull/10850) ([Artem Streltsov](https://github.com/kekekekule)). +* Added support for MySQL style global variables syntax (stub). This is needed for compatibility of MySQL protocol. [#11832](https://github.com/ClickHouse/ClickHouse/pull/11832) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added syntax highligting to `clickhouse-client` using `replxx`. [#11422](https://github.com/ClickHouse/ClickHouse/pull/11422) ([Tagir Kuskarov](https://github.com/kuskarov)). +* `minMap` and `maxMap` functions were added. [#11603](https://github.com/ClickHouse/ClickHouse/pull/11603) ([Ildus Kurbangaliev](https://github.com/ildus)). +* Add the `system.asynchronous_metric_log` table that logs historical metrics from `system.asynchronous_metrics`. [#11588](https://github.com/ClickHouse/ClickHouse/pull/11588) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Add functions `extractAllGroupsHorizontal(haystack, re)` and `extractAllGroupsVertical(haystack, re)`. [#11554](https://github.com/ClickHouse/ClickHouse/pull/11554) ([Vasily Nemkov](https://github.com/Enmk)). +* Add SHOW CLUSTER(S) queries. [#11467](https://github.com/ClickHouse/ClickHouse/pull/11467) ([hexiaoting](https://github.com/hexiaoting)). +* Add `netloc` function for extracting network location, similar to `urlparse(url)`, `netloc` in python. [#11356](https://github.com/ClickHouse/ClickHouse/pull/11356) ([Guillaume Tassery](https://github.com/YiuRULE)). +* Add 2 more virtual columns for engine=Kafka to access message headers. [#11283](https://github.com/ClickHouse/ClickHouse/pull/11283) ([filimonov](https://github.com/filimonov)). +* Add `_timestamp_ms` virtual column for Kafka engine (type is `Nullable(DateTime64(3))`). [#11260](https://github.com/ClickHouse/ClickHouse/pull/11260) ([filimonov](https://github.com/filimonov)). +* Add function `randomFixedString`. [#10866](https://github.com/ClickHouse/ClickHouse/pull/10866) ([Andrei Nekrashevich](https://github.com/xolm)). +* Add function `fuzzBits` that randomly flips bits in a string with given probability. [#11237](https://github.com/ClickHouse/ClickHouse/pull/11237) ([Andrei Nekrashevich](https://github.com/xolm)). +* Allow comparison of numbers with constant string in comparison operators, IN and VALUES sections. [#11647](https://github.com/ClickHouse/ClickHouse/pull/11647) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add `round_robin` load_balancing mode. [#11645](https://github.com/ClickHouse/ClickHouse/pull/11645) ([Azat Khuzhin](https://github.com/azat)). +* Add `cast_keep_nullable` setting. If set `CAST(something_nullable AS Type)` return `Nullable(Type)`. [#11733](https://github.com/ClickHouse/ClickHouse/pull/11733) ([Artem Zuikov](https://github.com/4ertus2)). +* Added column `position` to `system.columns` table and `column_position` to `system.parts_columns` table. It contains ordinal position of a column in a table starting with 1. This closes [#7744](https://github.com/ClickHouse/ClickHouse/issues/7744). [#11655](https://github.com/ClickHouse/ClickHouse/pull/11655) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* ON CLUSTER support for SYSTEM {FLUSH DISTRIBUTED,STOP/START DISTRIBUTED SEND}. [#11415](https://github.com/ClickHouse/ClickHouse/pull/11415) ([Azat Khuzhin](https://github.com/azat)). +* Add system.distribution_queue table. [#11394](https://github.com/ClickHouse/ClickHouse/pull/11394) ([Azat Khuzhin](https://github.com/azat)). +* Support for all format settings in Kafka, expose some setting on table level, adjust the defaults for better performance. [#11388](https://github.com/ClickHouse/ClickHouse/pull/11388) ([filimonov](https://github.com/filimonov)). +* Add `port` function (to extract port from URL). [#11120](https://github.com/ClickHouse/ClickHouse/pull/11120) ([Azat Khuzhin](https://github.com/azat)). +* Now `dictGet*` functions accept table names. [#11050](https://github.com/ClickHouse/ClickHouse/pull/11050) ([Vitaly Baranov](https://github.com/vitlibar)). +* The `clickhouse-format` tool is now able to format multiple queries when the `-n` argument is used. [#10852](https://github.com/ClickHouse/ClickHouse/pull/10852) ([Darío](https://github.com/dgrr)). +* Possibility to configure proxy-resolver for DiskS3. [#10744](https://github.com/ClickHouse/ClickHouse/pull/10744) ([Pavel Kovalenko](https://github.com/Jokser)). +* Make `pointInPolygon` work with non-constant polygon. PointInPolygon now can take Array(Array(Tuple(..., ...))) as second argument, array of polygon and holes. [#10623](https://github.com/ClickHouse/ClickHouse/pull/10623) ([Alexey Ilyukhov](https://github.com/livace)) [#11421](https://github.com/ClickHouse/ClickHouse/pull/11421) ([Alexey Ilyukhov](https://github.com/livace)). +* Added `move_ttl_info` to `system.parts` in order to provide introspection of move TTL functionality. [#10591](https://github.com/ClickHouse/ClickHouse/pull/10591) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Possibility to work with S3 through proxies. [#10576](https://github.com/ClickHouse/ClickHouse/pull/10576) ([Pavel Kovalenko](https://github.com/Jokser)). +* Add `NCHAR` and `NVARCHAR` synonims for data types. [#11025](https://github.com/ClickHouse/ClickHouse/pull/11025) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Resolved [#7224](https://github.com/ClickHouse/ClickHouse/issues/7224): added `FailedQuery`, `FailedSelectQuery` and `FailedInsertQuery` metrics to `system.events` table. [#11151](https://github.com/ClickHouse/ClickHouse/pull/11151) ([Nikita Orlov](https://github.com/naorlov)). +* Add more `jemalloc` statistics to `system.asynchronous_metrics`, and ensure that we see up-to-date values for them. [#11748](https://github.com/ClickHouse/ClickHouse/pull/11748) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Allow to specify default S3 credentials and custom auth headers. [#11134](https://github.com/ClickHouse/ClickHouse/pull/11134) ([Grigory Pervakov](https://github.com/GrigoryPervakov)). +* Added new functions to import/export DateTime64 as Int64 with various precision: `to-/fromUnixTimestamp64Milli/-Micro/-Nano`. [#10923](https://github.com/ClickHouse/ClickHouse/pull/10923) ([Vasily Nemkov](https://github.com/Enmk)). +* Allow specifying `mongodb://` URI for MongoDB dictionaries. [#10915](https://github.com/ClickHouse/ClickHouse/pull/10915) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* OFFSET keyword can now be used without an affiliated LIMIT clause. [#10802](https://github.com/ClickHouse/ClickHouse/pull/10802) ([Guillaume Tassery](https://github.com/YiuRULE)). +* Added `system.licenses` table. This table contains licenses of third-party libraries that are located in `contrib` directory. This closes [#2890](https://github.com/ClickHouse/ClickHouse/issues/2890). [#10795](https://github.com/ClickHouse/ClickHouse/pull/10795) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* New function function toStartOfSecond(DateTime64) -> DateTime64 that nullifies sub-second part of DateTime64 value. [#10722](https://github.com/ClickHouse/ClickHouse/pull/10722) ([Vasily Nemkov](https://github.com/Enmk)). +* Add new input format `JSONAsString` that accepts a sequence of JSON objects separated by newlines, spaces and/or commas. [#10607](https://github.com/ClickHouse/ClickHouse/pull/10607) ([Kruglov Pavel](https://github.com/Avogar)). +* Allowed to profile memory with finer granularity steps than 4 MiB. Added sampling memory profiler to capture random allocations/deallocations. [#10598](https://github.com/ClickHouse/ClickHouse/pull/10598) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* `SimpleAggregateFunction` now also supports `sumMap`. [#10000](https://github.com/ClickHouse/ClickHouse/pull/10000) ([Ildus Kurbangaliev](https://github.com/ildus)). +* Support `ALTER RENAME COLUMN` for the distributed table engine. Continuation of [#10727](https://github.com/ClickHouse/ClickHouse/issues/10727). Fixes [#10747](https://github.com/ClickHouse/ClickHouse/issues/10747). [#10887](https://github.com/ClickHouse/ClickHouse/pull/10887) ([alesapin](https://github.com/alesapin)). + +#### Bug Fix + +* Fix UBSan report in Decimal parse. This fixes [#7540](https://github.com/ClickHouse/ClickHouse/issues/7540). [#10512](https://github.com/ClickHouse/ClickHouse/pull/10512) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix potential floating point exception when parsing DateTime64. This fixes [#11374](https://github.com/ClickHouse/ClickHouse/issues/11374). [#11875](https://github.com/ClickHouse/ClickHouse/pull/11875) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix rare crash caused by using `Nullable` column in prewhere condition. [#11895](https://github.com/ClickHouse/ClickHouse/pull/11895) [#11608](https://github.com/ClickHouse/ClickHouse/issues/11608) [#11869](https://github.com/ClickHouse/ClickHouse/pull/11869) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Don't allow arrayJoin inside higher order functions. It was leading to broken protocol synchronization. This closes [#3933](https://github.com/ClickHouse/ClickHouse/issues/3933). [#11846](https://github.com/ClickHouse/ClickHouse/pull/11846) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix wrong result of comparison of FixedString with constant String. This fixes [#11393](https://github.com/ClickHouse/ClickHouse/issues/11393). This bug appeared in version 20.4. [#11828](https://github.com/ClickHouse/ClickHouse/pull/11828) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix wrong result for `if` with NULLs in condition. [#11807](https://github.com/ClickHouse/ClickHouse/pull/11807) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix using too many threads for queries. [#11788](https://github.com/ClickHouse/ClickHouse/pull/11788) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed `Scalar does not exist` exception when using `WITH ...` in `SELECT ... FROM merge_tree_table ...` [#11621](https://github.com/ClickHouse/ClickHouse/issues/11621). [#11767](https://github.com/ClickHouse/ClickHouse/pull/11767) ([Amos Bird](https://github.com/amosbird)). +* Fix unexpected behaviour of queries like `SELECT *, xyz.*` which were success while an error expected. [#11753](https://github.com/ClickHouse/ClickHouse/pull/11753) ([hexiaoting](https://github.com/hexiaoting)). +* Now replicated fetches will be cancelled during metadata alter. [#11744](https://github.com/ClickHouse/ClickHouse/pull/11744) ([alesapin](https://github.com/alesapin)). +* Parse metadata stored in zookeeper before checking for equality. [#11739](https://github.com/ClickHouse/ClickHouse/pull/11739) ([Azat Khuzhin](https://github.com/azat)). +* Fixed LOGICAL_ERROR caused by wrong type deduction of complex literals in Values input format. [#11732](https://github.com/ClickHouse/ClickHouse/pull/11732) ([tavplubix](https://github.com/tavplubix)). +* Fix `ORDER BY ... WITH FILL` over const columns. [#11697](https://github.com/ClickHouse/ClickHouse/pull/11697) ([Anton Popov](https://github.com/CurtizJ)). +* Fix very rare race condition in SYSTEM SYNC REPLICA. If the replicated table is created and at the same time from the separate connection another client is issuing `SYSTEM SYNC REPLICA` command on that table (this is unlikely, because another client should be aware that the table is created), it's possible to get nullptr dereference. [#11691](https://github.com/ClickHouse/ClickHouse/pull/11691) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Pass proper timeouts when communicating with XDBC bridge. Recently timeouts were not respected when checking bridge liveness and receiving meta info. [#11690](https://github.com/ClickHouse/ClickHouse/pull/11690) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `LIMIT n WITH TIES` usage together with `ORDER BY` statement, which contains aliases. [#11689](https://github.com/ClickHouse/ClickHouse/pull/11689) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible `Pipeline stuck` for selects with parallel `FINAL`. Fixes [#11636](https://github.com/ClickHouse/ClickHouse/issues/11636). [#11682](https://github.com/ClickHouse/ClickHouse/pull/11682) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix error which leads to an incorrect state of `system.mutations`. It may show that whole mutation is already done but the server still has `MUTATE_PART` tasks in the replication queue and tries to execute them. This fixes [#11611](https://github.com/ClickHouse/ClickHouse/issues/11611). [#11681](https://github.com/ClickHouse/ClickHouse/pull/11681) ([alesapin](https://github.com/alesapin)). +* Fix syntax hilite in CREATE USER query. [#11664](https://github.com/ClickHouse/ClickHouse/pull/11664) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add support for regular expressions with case-insensitive flags. This fixes [#11101](https://github.com/ClickHouse/ClickHouse/issues/11101) and fixes [#11506](https://github.com/ClickHouse/ClickHouse/issues/11506). [#11649](https://github.com/ClickHouse/ClickHouse/pull/11649) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove trivial count query optimization if row-level security is set. In previous versions the user get total count of records in a table instead filtered. This fixes [#11352](https://github.com/ClickHouse/ClickHouse/issues/11352). [#11644](https://github.com/ClickHouse/ClickHouse/pull/11644) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix bloom filters for String (data skipping indices). [#11638](https://github.com/ClickHouse/ClickHouse/pull/11638) ([Azat Khuzhin](https://github.com/azat)). +* Without `-q` option the database does not get created at startup. [#11604](https://github.com/ClickHouse/ClickHouse/pull/11604) ([giordyb](https://github.com/giordyb)). +* Fix error `Block structure mismatch` for queries with sampling reading from `Buffer` table. [#11602](https://github.com/ClickHouse/ClickHouse/pull/11602) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix wrong exit code of the clickhouse-client, when `exception.code() % 256 == 0`. [#11601](https://github.com/ClickHouse/ClickHouse/pull/11601) ([filimonov](https://github.com/filimonov)). +* Fix race conditions in CREATE/DROP of different replicas of ReplicatedMergeTree. Continue to work if the table was not removed completely from ZooKeeper or not created successfully. This fixes [#11432](https://github.com/ClickHouse/ClickHouse/issues/11432). [#11592](https://github.com/ClickHouse/ClickHouse/pull/11592) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix trivial error in log message about "Mark cache size was lowered" at server startup. This closes [#11399](https://github.com/ClickHouse/ClickHouse/issues/11399). [#11589](https://github.com/ClickHouse/ClickHouse/pull/11589) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix error `Size of offsets does not match size of column` for queries with `PREWHERE column in (subquery)` and `ARRAY JOIN`. [#11580](https://github.com/ClickHouse/ClickHouse/pull/11580) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed rare segfault in `SHOW CREATE TABLE` Fixes [#11490](https://github.com/ClickHouse/ClickHouse/issues/11490). [#11579](https://github.com/ClickHouse/ClickHouse/pull/11579) ([tavplubix](https://github.com/tavplubix)). +* All queries in HTTP session have had the same query_id. It is fixed. [#11578](https://github.com/ClickHouse/ClickHouse/pull/11578) ([tavplubix](https://github.com/tavplubix)). +* Now clickhouse-server docker container will prefer IPv6 checking server aliveness. [#11550](https://github.com/ClickHouse/ClickHouse/pull/11550) ([Ivan Starkov](https://github.com/istarkov)). +* Fix the error `Data compressed with different methods` that can happen if `min_bytes_to_use_direct_io` is enabled and PREWHERE is active and using SAMPLE or high number of threads. This fixes [#11539](https://github.com/ClickHouse/ClickHouse/issues/11539). [#11540](https://github.com/ClickHouse/ClickHouse/pull/11540) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix shard_num/replica_num for `` (breaks use_compact_format_in_distributed_parts_names). [#11528](https://github.com/ClickHouse/ClickHouse/pull/11528) ([Azat Khuzhin](https://github.com/azat)). +* Fix async INSERT into Distributed for prefer_localhost_replica=0 and w/o internal_replication. [#11527](https://github.com/ClickHouse/ClickHouse/pull/11527) ([Azat Khuzhin](https://github.com/azat)). +* Fix memory leak when exception is thrown in the middle of aggregation with `-State` functions. This fixes [#8995](https://github.com/ClickHouse/ClickHouse/issues/8995). [#11496](https://github.com/ClickHouse/ClickHouse/pull/11496) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `Pipeline stuck` exception for `INSERT SELECT FINAL` where `SELECT` (`max_threads`>1) has multiple streams but `INSERT` has only one (`max_insert_threads`==0). [#11455](https://github.com/ClickHouse/ClickHouse/pull/11455) ([Azat Khuzhin](https://github.com/azat)). +* Fix wrong result in queries like `select count() from t, u`. [#11454](https://github.com/ClickHouse/ClickHouse/pull/11454) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix return compressed size for codecs. [#11448](https://github.com/ClickHouse/ClickHouse/pull/11448) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix server crash when a column has compression codec with non-literal arguments. Fixes [#11365](https://github.com/ClickHouse/ClickHouse/issues/11365). [#11431](https://github.com/ClickHouse/ClickHouse/pull/11431) ([alesapin](https://github.com/alesapin)). +* Fix potential uninitialized memory read in MergeTree shutdown if table was not created successfully. [#11420](https://github.com/ClickHouse/ClickHouse/pull/11420) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix crash in JOIN over `LowCarinality(T)` and `Nullable(T)`. [#11380](https://github.com/ClickHouse/ClickHouse/issues/11380). [#11414](https://github.com/ClickHouse/ClickHouse/pull/11414) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix error code for wrong `USING` key. [#11373](https://github.com/ClickHouse/ClickHouse/issues/11373). [#11404](https://github.com/ClickHouse/ClickHouse/pull/11404) ([Artem Zuikov](https://github.com/4ertus2)). +* Fixed `geohashesInBox` with arguments outside of latitude/longitude range. [#11403](https://github.com/ClickHouse/ClickHouse/pull/11403) ([Vasily Nemkov](https://github.com/Enmk)). +* Better errors for `joinGet()` functions. [#11389](https://github.com/ClickHouse/ClickHouse/pull/11389) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix possible `Pipeline stuck` error for queries with external sort and limit. Fixes [#11359](https://github.com/ClickHouse/ClickHouse/issues/11359). [#11366](https://github.com/ClickHouse/ClickHouse/pull/11366) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Remove redundant lock during parts send in ReplicatedMergeTree. [#11354](https://github.com/ClickHouse/ClickHouse/pull/11354) ([alesapin](https://github.com/alesapin)). +* Fix support for `\G` (vertical output) in clickhouse-client in multiline mode. This closes [#9933](https://github.com/ClickHouse/ClickHouse/issues/9933). [#11350](https://github.com/ClickHouse/ClickHouse/pull/11350) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix potential segfault when using `Lazy` database. [#11348](https://github.com/ClickHouse/ClickHouse/pull/11348) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix crash in direct selects from `Join` table engine (without JOIN) and wrong nullability. [#11340](https://github.com/ClickHouse/ClickHouse/pull/11340) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix crash in `quantilesExactWeightedArray`. [#11337](https://github.com/ClickHouse/ClickHouse/pull/11337) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Now merges stopped before change metadata in `ALTER` queries. [#11335](https://github.com/ClickHouse/ClickHouse/pull/11335) ([alesapin](https://github.com/alesapin)). +* Make writing to `MATERIALIZED VIEW` with setting `parallel_view_processing = 1` parallel again. Fixes [#10241](https://github.com/ClickHouse/ClickHouse/issues/10241). [#11330](https://github.com/ClickHouse/ClickHouse/pull/11330) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix `visitParamExtractRaw` when extracted JSON has strings with unbalanced { or [. [#11318](https://github.com/ClickHouse/ClickHouse/pull/11318) ([Ewout](https://github.com/devwout)). +* Fix very rare race condition in ThreadPool. [#11314](https://github.com/ClickHouse/ClickHouse/pull/11314) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix insignificant data race in `clickhouse-copier`. Found by integration tests. [#11313](https://github.com/ClickHouse/ClickHouse/pull/11313) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix potential uninitialized memory in conversion. Example: `SELECT toIntervalSecond(now64())`. [#11311](https://github.com/ClickHouse/ClickHouse/pull/11311) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix the issue when index analysis cannot work if a table has Array column in primary key and if a query is filtering by this column with `empty` or `notEmpty` functions. This fixes [#11286](https://github.com/ClickHouse/ClickHouse/issues/11286). [#11303](https://github.com/ClickHouse/ClickHouse/pull/11303) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix bug when query speed estimation can be incorrect and the limit of `min_execution_speed` may not work or work incorrectly if the query is throttled by `max_network_bandwidth`, `max_execution_speed` or `priority` settings. Change the default value of `timeout_before_checking_execution_speed` to non-zero, because otherwise the settings `min_execution_speed` and `max_execution_speed` have no effect. This fixes [#11297](https://github.com/ClickHouse/ClickHouse/issues/11297). This fixes [#5732](https://github.com/ClickHouse/ClickHouse/issues/5732). This fixes [#6228](https://github.com/ClickHouse/ClickHouse/issues/6228). Usability improvement: avoid concatenation of exception message with progress bar in `clickhouse-client`. [#11296](https://github.com/ClickHouse/ClickHouse/pull/11296) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix crash when `SET DEFAULT ROLE` is called with wrong arguments. This fixes [#10586](https://github.com/ClickHouse/ClickHouse/issues/10586). [#11278](https://github.com/ClickHouse/ClickHouse/pull/11278) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix crash while reading malformed data in `Protobuf` format. This fixes [#5957](https://github.com/ClickHouse/ClickHouse/issues/5957), fixes [#11203](https://github.com/ClickHouse/ClickHouse/issues/11203). [#11258](https://github.com/ClickHouse/ClickHouse/pull/11258) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed a bug when `cache` dictionary could return default value instead of normal (when there are only expired keys). This affects only string fields. [#11233](https://github.com/ClickHouse/ClickHouse/pull/11233) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix error `Block structure mismatch in QueryPipeline` while reading from `VIEW` with constants in inner query. Fixes [#11181](https://github.com/ClickHouse/ClickHouse/issues/11181). [#11205](https://github.com/ClickHouse/ClickHouse/pull/11205) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix possible exception `Invalid status for associated output`. [#11200](https://github.com/ClickHouse/ClickHouse/pull/11200) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Now `primary.idx` will be checked if it's defined in `CREATE` query. [#11199](https://github.com/ClickHouse/ClickHouse/pull/11199) ([alesapin](https://github.com/alesapin)). +* Fix possible error `Cannot capture column` for higher-order functions with `Array(Array(LowCardinality))` captured argument. [#11185](https://github.com/ClickHouse/ClickHouse/pull/11185) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed `S3` globbing which could fail in case of more than 1000 keys and some backends. [#11179](https://github.com/ClickHouse/ClickHouse/pull/11179) ([Vladimir Chebotarev](https://github.com/excitoon)). +* If data skipping index is dependent on columns that are going to be modified during background merge (for SummingMergeTree, AggregatingMergeTree as well as for TTL GROUP BY), it was calculated incorrectly. This issue is fixed by moving index calculation after merge so the index is calculated on merged data. [#11162](https://github.com/ClickHouse/ClickHouse/pull/11162) ([Azat Khuzhin](https://github.com/azat)). +* Fix for the hang which was happening sometimes during DROP of table engine=Kafka (or during server restarts). [#11145](https://github.com/ClickHouse/ClickHouse/pull/11145) ([filimonov](https://github.com/filimonov)). +* Fix excessive reserving of threads for simple queries (optimization for reducing the number of threads, which was partly broken after changes in pipeline). [#11114](https://github.com/ClickHouse/ClickHouse/pull/11114) ([Azat Khuzhin](https://github.com/azat)). +* Remove logging from mutation finalization task if nothing was finalized. [#11109](https://github.com/ClickHouse/ClickHouse/pull/11109) ([alesapin](https://github.com/alesapin)). +* Fixed deadlock during server startup after update with changes in structure of system log tables. [#11106](https://github.com/ClickHouse/ClickHouse/pull/11106) ([alesapin](https://github.com/alesapin)). +* Fixed memory leak in registerDiskS3. [#11074](https://github.com/ClickHouse/ClickHouse/pull/11074) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fix error `No such name in Block::erase()` when JOIN appears with PREWHERE or `optimize_move_to_prewhere` makes PREWHERE from WHERE. [#11051](https://github.com/ClickHouse/ClickHouse/pull/11051) ([Artem Zuikov](https://github.com/4ertus2)). +* Fixes the potential missed data during termination of Kafka engine table. [#11048](https://github.com/ClickHouse/ClickHouse/pull/11048) ([filimonov](https://github.com/filimonov)). +* Fixed parseDateTime64BestEffort argument resolution bugs. [#10925](https://github.com/ClickHouse/ClickHouse/issues/10925). [#11038](https://github.com/ClickHouse/ClickHouse/pull/11038) ([Vasily Nemkov](https://github.com/Enmk)). +* Now it's possible to `ADD/DROP` and `RENAME` the same one column in a single `ALTER` query. Exception message for simultaneous `MODIFY` and `RENAME` became more clear. Partially fixes [#10669](https://github.com/ClickHouse/ClickHouse/issues/10669). [#11037](https://github.com/ClickHouse/ClickHouse/pull/11037) ([alesapin](https://github.com/alesapin)). +* Fixed parsing of S3 URLs. [#11036](https://github.com/ClickHouse/ClickHouse/pull/11036) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fix memory tracking for two-level `GROUP BY` when there is a `LIMIT`. [#11022](https://github.com/ClickHouse/ClickHouse/pull/11022) ([Azat Khuzhin](https://github.com/azat)). +* Fix very rare potential use-after-free error in MergeTree if table was not created successfully. [#10986](https://github.com/ClickHouse/ClickHouse/pull/10986) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix metadata (relative path for rename) and data (relative path for symlink) handling for Atomic database. [#10980](https://github.com/ClickHouse/ClickHouse/pull/10980) ([Azat Khuzhin](https://github.com/azat)). +* Fix server crash on concurrent `ALTER` and `DROP DATABASE` queries with `Atomic` database engine. [#10968](https://github.com/ClickHouse/ClickHouse/pull/10968) ([tavplubix](https://github.com/tavplubix)). +* Fix incorrect raw data size in method getRawData(). [#10964](https://github.com/ClickHouse/ClickHouse/pull/10964) ([Igr](https://github.com/ObjatieGroba)). +* Fix incompatibility of two-level aggregation between versions 20.1 and earlier. This incompatibility happens when different versions of ClickHouse are used on initiator node and remote nodes and the size of GROUP BY result is large and aggregation is performed by a single String field. It leads to several unmerged rows for a single key in result. [#10952](https://github.com/ClickHouse/ClickHouse/pull/10952) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Avoid sending partially written files by the DistributedBlockOutputStream. [#10940](https://github.com/ClickHouse/ClickHouse/pull/10940) ([Azat Khuzhin](https://github.com/azat)). +* Fix crash in `SELECT count(notNullIn(NULL, []))`. [#10920](https://github.com/ClickHouse/ClickHouse/pull/10920) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix for the hang which was happening sometimes during DROP of table engine=Kafka (or during server restarts). [#10910](https://github.com/ClickHouse/ClickHouse/pull/10910) ([filimonov](https://github.com/filimonov)). +* Now it's possible to execute multiple `ALTER RENAME` like `a TO b, c TO a`. [#10895](https://github.com/ClickHouse/ClickHouse/pull/10895) ([alesapin](https://github.com/alesapin)). +* Fix possible race which could happen when you get result from aggregate function state from multiple thread for the same column. The only way (which I found) it can happen is when you use `finalizeAggregation` function while reading from table with `Memory` engine which stores `AggregateFunction` state for `quanite*` function. [#10890](https://github.com/ClickHouse/ClickHouse/pull/10890) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix backward compatibility with tuples in Distributed tables. [#10889](https://github.com/ClickHouse/ClickHouse/pull/10889) ([Anton Popov](https://github.com/CurtizJ)). +* Fix SIGSEGV in StringHashTable (if such key does not exist). [#10870](https://github.com/ClickHouse/ClickHouse/pull/10870) ([Azat Khuzhin](https://github.com/azat)). +* Fixed `WATCH` hangs after `LiveView` table was dropped from database with `Atomic` engine. [#10859](https://github.com/ClickHouse/ClickHouse/pull/10859) ([tavplubix](https://github.com/tavplubix)). +* Fixed bug in `ReplicatedMergeTree` which might cause some `ALTER` on `OPTIMIZE` query to hang waiting for some replica after it become inactive. [#10849](https://github.com/ClickHouse/ClickHouse/pull/10849) ([tavplubix](https://github.com/tavplubix)). +* Now constraints are updated if the column participating in `CONSTRAINT` expression was renamed. Fixes [#10844](https://github.com/ClickHouse/ClickHouse/issues/10844). [#10847](https://github.com/ClickHouse/ClickHouse/pull/10847) ([alesapin](https://github.com/alesapin)). +* Fix potential read of uninitialized memory in cache dictionary. [#10834](https://github.com/ClickHouse/ClickHouse/pull/10834) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix columns order after Block::sortColumns() (also add a test that shows that it affects some real use case - Buffer engine). [#10826](https://github.com/ClickHouse/ClickHouse/pull/10826) ([Azat Khuzhin](https://github.com/azat)). +* Fix the issue with ODBC bridge when no quoting of identifiers is requested. This fixes [#7984](https://github.com/ClickHouse/ClickHouse/issues/7984). [#10821](https://github.com/ClickHouse/ClickHouse/pull/10821) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix UBSan and MSan report in DateLUT. [#10798](https://github.com/ClickHouse/ClickHouse/pull/10798) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Make use of `src_type` for correct type conversion in key conditions. Fixes [#6287](https://github.com/ClickHouse/ClickHouse/issues/6287). [#10791](https://github.com/ClickHouse/ClickHouse/pull/10791) ([Andrew Onyshchuk](https://github.com/oandrew)). +* Get rid of old libunwind patches. https://github.com/ClickHouse-Extras/libunwind/commit/500aa227911bd185a94bfc071d68f4d3b03cb3b1#r39048012 This allows to disable `-fno-omit-frame-pointer` in `clang` builds that improves performance at least by 1% in average. [#10761](https://github.com/ClickHouse/ClickHouse/pull/10761) ([Amos Bird](https://github.com/amosbird)). +* Fix avgWeighted when using floating-point weight over multiple shards. [#10758](https://github.com/ClickHouse/ClickHouse/pull/10758) ([Baudouin Giard](https://github.com/bgiard)). +* Fix `parallel_view_processing` behavior. Now all insertions into `MATERIALIZED VIEW` without exception should be finished if exception happened. Fixes [#10241](https://github.com/ClickHouse/ClickHouse/issues/10241). [#10757](https://github.com/ClickHouse/ClickHouse/pull/10757) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix combinator -OrNull and -OrDefault when combined with -State. [#10741](https://github.com/ClickHouse/ClickHouse/pull/10741) ([hcz](https://github.com/hczhcz)). +* Fix crash in `generateRandom` with nested types. Fixes [#10583](https://github.com/ClickHouse/ClickHouse/issues/10583). [#10734](https://github.com/ClickHouse/ClickHouse/pull/10734) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix data corruption for `LowCardinality(FixedString)` key column in `SummingMergeTree` which could have happened after merge. Fixes [#10489](https://github.com/ClickHouse/ClickHouse/issues/10489). [#10721](https://github.com/ClickHouse/ClickHouse/pull/10721) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix usage of primary key wrapped into a function with 'FINAL' modifier and 'ORDER BY' optimization. [#10715](https://github.com/ClickHouse/ClickHouse/pull/10715) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible buffer overflow in function `h3EdgeAngle`. [#10711](https://github.com/ClickHouse/ClickHouse/pull/10711) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix disappearing totals. Totals could have being filtered if query had had join or subquery with external where condition. Fixes [#10674](https://github.com/ClickHouse/ClickHouse/issues/10674). [#10698](https://github.com/ClickHouse/ClickHouse/pull/10698) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix atomicity of HTTP insert. This fixes [#9666](https://github.com/ClickHouse/ClickHouse/issues/9666). [#10687](https://github.com/ClickHouse/ClickHouse/pull/10687) ([Andrew Onyshchuk](https://github.com/oandrew)). +* Fix multiple usages of `IN` operator with the identical set in one query. [#10686](https://github.com/ClickHouse/ClickHouse/pull/10686) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed bug, which causes http requests stuck on client close when `readonly=2` and `cancel_http_readonly_queries_on_client_close=1`. Fixes [#7939](https://github.com/ClickHouse/ClickHouse/issues/7939), [#7019](https://github.com/ClickHouse/ClickHouse/issues/7019), [#7736](https://github.com/ClickHouse/ClickHouse/issues/7736), [#7091](https://github.com/ClickHouse/ClickHouse/issues/7091). [#10684](https://github.com/ClickHouse/ClickHouse/pull/10684) ([tavplubix](https://github.com/tavplubix)). +* Fix order of parameters in AggregateTransform constructor. [#10667](https://github.com/ClickHouse/ClickHouse/pull/10667) ([palasonic1](https://github.com/palasonic1)). +* Fix the lack of parallel execution of remote queries with `distributed_aggregation_memory_efficient` enabled. Fixes [#10655](https://github.com/ClickHouse/ClickHouse/issues/10655). [#10664](https://github.com/ClickHouse/ClickHouse/pull/10664) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix possible incorrect number of rows for queries with `LIMIT`. Fixes [#10566](https://github.com/ClickHouse/ClickHouse/issues/10566), [#10709](https://github.com/ClickHouse/ClickHouse/issues/10709). [#10660](https://github.com/ClickHouse/ClickHouse/pull/10660) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bug which locks concurrent alters when table has a lot of parts. [#10659](https://github.com/ClickHouse/ClickHouse/pull/10659) ([alesapin](https://github.com/alesapin)). +* Fix nullptr dereference in StorageBuffer if server was shutdown before table startup. [#10641](https://github.com/ClickHouse/ClickHouse/pull/10641) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix predicates optimization for distributed queries (`enable_optimize_predicate_expression=1`) for queries with `HAVING` section (i.e. when filtering on the server initiator is required), by preserving the order of expressions (and this is enough to fix), and also force aggregator use column names over indexes. Fixes: [#10613](https://github.com/ClickHouse/ClickHouse/issues/10613), [#11413](https://github.com/ClickHouse/ClickHouse/issues/11413). [#10621](https://github.com/ClickHouse/ClickHouse/pull/10621) ([Azat Khuzhin](https://github.com/azat)). +* Fix optimize_skip_unused_shards with LowCardinality. [#10611](https://github.com/ClickHouse/ClickHouse/pull/10611) ([Azat Khuzhin](https://github.com/azat)). +* Fix segfault in StorageBuffer when exception on server startup. Fixes [#10550](https://github.com/ClickHouse/ClickHouse/issues/10550). [#10609](https://github.com/ClickHouse/ClickHouse/pull/10609) ([tavplubix](https://github.com/tavplubix)). +* On `SYSTEM DROP DNS CACHE` query also drop caches, which are used to check if user is allowed to connect from some IP addresses. [#10608](https://github.com/ClickHouse/ClickHouse/pull/10608) ([tavplubix](https://github.com/tavplubix)). +* Fixed incorrect scalar results inside inner query of `MATERIALIZED VIEW` in case if this query contained dependent table. [#10603](https://github.com/ClickHouse/ClickHouse/pull/10603) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed handling condition variable for synchronous mutations. In some cases signals to that condition variable could be lost. [#10588](https://github.com/ClickHouse/ClickHouse/pull/10588) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fixes possible crash `createDictionary()` is called before `loadStoredObject()` has finished. [#10587](https://github.com/ClickHouse/ClickHouse/pull/10587) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix error `the BloomFilter false positive must be a double number between 0 and 1` [#10551](https://github.com/ClickHouse/ClickHouse/issues/10551). [#10569](https://github.com/ClickHouse/ClickHouse/pull/10569) ([Winter Zhang](https://github.com/zhang2014)). +* Fix SELECT of column ALIAS which default expression type different from column type. [#10563](https://github.com/ClickHouse/ClickHouse/pull/10563) ([Azat Khuzhin](https://github.com/azat)). +* Implemented comparison between DateTime64 and String values (just like for DateTime). [#10560](https://github.com/ClickHouse/ClickHouse/pull/10560) ([Vasily Nemkov](https://github.com/Enmk)). +* Fix index corruption, which may occur in some cases after merge compact parts into another compact part. [#10531](https://github.com/ClickHouse/ClickHouse/pull/10531) ([Anton Popov](https://github.com/CurtizJ)). +* Disable GROUP BY sharding_key optimization by default (`optimize_distributed_group_by_sharding_key` had been introduced and turned of by default, due to trickery of sharding_key analyzing, simple example is `if` in sharding key) and fix it for WITH ROLLUP/CUBE/TOTALS. [#10516](https://github.com/ClickHouse/ClickHouse/pull/10516) ([Azat Khuzhin](https://github.com/azat)). +* Fixes: [#10263](https://github.com/ClickHouse/ClickHouse/issues/10263) (after that PR dist send via INSERT had been postponing on each INSERT) Fixes: [#8756](https://github.com/ClickHouse/ClickHouse/issues/8756) (that PR breaks distributed sends with all of the following conditions met (unlikely setup for now I guess): `internal_replication == false`, multiple local shards (activates the hardlinking code) and `distributed_storage_policy` (makes `link(2)` fails on `EXDEV`)). [#10486](https://github.com/ClickHouse/ClickHouse/pull/10486) ([Azat Khuzhin](https://github.com/azat)). +* Fixed error with "max_rows_to_sort" limit. [#10268](https://github.com/ClickHouse/ClickHouse/pull/10268) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Get dictionary and check access rights only once per each call of any function reading external dictionaries. [#10928](https://github.com/ClickHouse/ClickHouse/pull/10928) ([Vitaly Baranov](https://github.com/vitlibar)). + +#### Improvement + +* Apply `TTL` for old data, after `ALTER MODIFY TTL` query. This behaviour is controlled by setting `materialize_ttl_after_modify`, which is enabled by default. [#11042](https://github.com/ClickHouse/ClickHouse/pull/11042) ([Anton Popov](https://github.com/CurtizJ)). +* When parsing C-style backslash escapes in string literals, VALUES and various text formats (this is an extension to SQL standard that is endemic for ClickHouse and MySQL), keep backslash if unknown escape sequence is found (e.g. `\%` or `\w`) that will make usage of `LIKE` and `match` regular expressions more convenient (it's enough to write `name LIKE 'used\_cars'` instead of `name LIKE 'used\\_cars'`) and more compatible at the same time. This fixes [#10922](https://github.com/ClickHouse/ClickHouse/issues/10922). [#11208](https://github.com/ClickHouse/ClickHouse/pull/11208) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* When reading Decimal value, cut extra digits after point. This behaviour is more compatible with MySQL and PostgreSQL. This fixes [#10202](https://github.com/ClickHouse/ClickHouse/issues/10202). [#11831](https://github.com/ClickHouse/ClickHouse/pull/11831) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow to DROP replicated table if the metadata in ZooKeeper was already removed and does not exist (this is also the case when using TestKeeper for testing and the server was restarted). Allow to RENAME replicated table even if there is an error communicating with ZooKeeper. This fixes [#10720](https://github.com/ClickHouse/ClickHouse/issues/10720). [#11652](https://github.com/ClickHouse/ClickHouse/pull/11652) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Slightly improve diagnostic of reading decimal from string. This closes [#10202](https://github.com/ClickHouse/ClickHouse/issues/10202). [#11829](https://github.com/ClickHouse/ClickHouse/pull/11829) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix sleep invocation in signal handler. It was sleeping for less amount of time than expected. [#11825](https://github.com/ClickHouse/ClickHouse/pull/11825) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* (Only Linux) OS related performance metrics (for CPU and I/O) will work even without `CAP_NET_ADMIN` capability. [#10544](https://github.com/ClickHouse/ClickHouse/pull/10544) ([Alexander Kazakov](https://github.com/Akazz)). +* Added `hostname` as an alias to function `hostName`. This feature was suggested by Victor Tarnavskiy from Yandex.Metrica. [#11821](https://github.com/ClickHouse/ClickHouse/pull/11821) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added support for distributed `DDL` (update/delete/drop partition) on cross replication clusters. [#11703](https://github.com/ClickHouse/ClickHouse/pull/11703) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Emit warning instead of error in server log at startup if we cannot listen one of the listen addresses (e.g. IPv6 is unavailable inside Docker). Note that if server fails to listen all listed addresses, it will refuse to startup as before. This fixes [#4406](https://github.com/ClickHouse/ClickHouse/issues/4406). [#11687](https://github.com/ClickHouse/ClickHouse/pull/11687) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Default user and database creation on docker image starting. [#10637](https://github.com/ClickHouse/ClickHouse/pull/10637) ([Paramtamtam](https://github.com/tarampampam)). +* When multiline query is printed to server log, the lines are joined. Make it to work correct in case of multiline string literals, identifiers and single-line comments. This fixes [#3853](https://github.com/ClickHouse/ClickHouse/issues/3853). [#11686](https://github.com/ClickHouse/ClickHouse/pull/11686) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Multiple names are now allowed in commands: CREATE USER, CREATE ROLE, ALTER USER, SHOW CREATE USER, SHOW GRANTS and so on. [#11670](https://github.com/ClickHouse/ClickHouse/pull/11670) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add support for distributed DDL (`UPDATE/DELETE/DROP PARTITION`) on cross replication clusters. [#11508](https://github.com/ClickHouse/ClickHouse/pull/11508) ([frank lee](https://github.com/etah000)). +* Clear password from command line in `clickhouse-client` and `clickhouse-benchmark` if the user has specified it with explicit value. This prevents password exposure by `ps` and similar tools. [#11665](https://github.com/ClickHouse/ClickHouse/pull/11665) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Don't use debug info from ELF file if it does not correspond to the running binary. It is needed to avoid printing wrong function names and source locations in stack traces. This fixes [#7514](https://github.com/ClickHouse/ClickHouse/issues/7514). [#11657](https://github.com/ClickHouse/ClickHouse/pull/11657) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Return NULL/zero when value is not parsed completely in parseDateTimeBestEffortOrNull/Zero functions. This fixes [#7876](https://github.com/ClickHouse/ClickHouse/issues/7876). [#11653](https://github.com/ClickHouse/ClickHouse/pull/11653) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Skip empty parameters in requested URL. They may appear when you write `http://localhost:8123/?&a=b` or `http://localhost:8123/?a=b&&c=d`. This closes [#10749](https://github.com/ClickHouse/ClickHouse/issues/10749). [#11651](https://github.com/ClickHouse/ClickHouse/pull/11651) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow using `groupArrayArray` and `groupUniqArrayArray` as `SimpleAggregateFunction`. [#11650](https://github.com/ClickHouse/ClickHouse/pull/11650) ([Volodymyr Kuznetsov](https://github.com/ksvladimir)). +* Allow comparison with constant strings by implicit conversions when analysing index conditions on other types. This may close [#11630](https://github.com/ClickHouse/ClickHouse/issues/11630). [#11648](https://github.com/ClickHouse/ClickHouse/pull/11648) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* https://github.com/ClickHouse/ClickHouse/pull/7572#issuecomment-642815377 Support config default HTTPHandlers. [#11628](https://github.com/ClickHouse/ClickHouse/pull/11628) ([Winter Zhang](https://github.com/zhang2014)). +* Make more input formats to work with Kafka engine. Fix the issue with premature flushes. Fix the performance issue when `kafka_num_consumers` is greater than number of partitions in topic. [#11599](https://github.com/ClickHouse/ClickHouse/pull/11599) ([filimonov](https://github.com/filimonov)). +* Improve `multiple_joins_rewriter_version=2` logic. Fix unknown columns error for lambda aliases. [#11587](https://github.com/ClickHouse/ClickHouse/pull/11587) ([Artem Zuikov](https://github.com/4ertus2)). +* Better exception message when cannot parse columns declaration list. This closes [#10403](https://github.com/ClickHouse/ClickHouse/issues/10403). [#11537](https://github.com/ClickHouse/ClickHouse/pull/11537) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve `enable_optimize_predicate_expression=1` logic for VIEW. [#11513](https://github.com/ClickHouse/ClickHouse/pull/11513) ([Artem Zuikov](https://github.com/4ertus2)). +* Adding support for PREWHERE in live view tables. [#11495](https://github.com/ClickHouse/ClickHouse/pull/11495) ([vzakaznikov](https://github.com/vzakaznikov)). +* Automatically update DNS cache, which is used to check if user is allowed to connect from an address. [#11487](https://github.com/ClickHouse/ClickHouse/pull/11487) ([tavplubix](https://github.com/tavplubix)). +* OPTIMIZE FINAL will force merge even if concurrent merges are performed. This closes [#11309](https://github.com/ClickHouse/ClickHouse/issues/11309) and closes [#11322](https://github.com/ClickHouse/ClickHouse/issues/11322). [#11346](https://github.com/ClickHouse/ClickHouse/pull/11346) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Suppress output of cancelled queries in clickhouse-client. In previous versions result may continue to print in terminal even after you press Ctrl+C to cancel query. This closes [#9473](https://github.com/ClickHouse/ClickHouse/issues/9473). [#11342](https://github.com/ClickHouse/ClickHouse/pull/11342) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now history file is updated after each query and there is no race condition if multiple clients use one history file. This fixes [#9897](https://github.com/ClickHouse/ClickHouse/issues/9897). [#11453](https://github.com/ClickHouse/ClickHouse/pull/11453) ([Tagir Kuskarov](https://github.com/kuskarov)). +* Better log messages in while reloading configuration. [#11341](https://github.com/ClickHouse/ClickHouse/pull/11341) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove trailing whitespaces from formatted queries in `clickhouse-client` or `clickhouse-format` in some cases. [#11325](https://github.com/ClickHouse/ClickHouse/pull/11325) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add setting "output_format_pretty_max_value_width". If value is longer, it will be cut to avoid output of too large values in terminal. This closes [#11140](https://github.com/ClickHouse/ClickHouse/issues/11140). [#11324](https://github.com/ClickHouse/ClickHouse/pull/11324) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Better exception message in case when there is shortage of memory mappings. This closes [#11027](https://github.com/ClickHouse/ClickHouse/issues/11027). [#11316](https://github.com/ClickHouse/ClickHouse/pull/11316) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Support (U)Int8, (U)Int16, Date in ASOF JOIN. [#11301](https://github.com/ClickHouse/ClickHouse/pull/11301) ([Artem Zuikov](https://github.com/4ertus2)). +* Support kafka_client_id parameter for Kafka tables. It also changes the default `client.id` used by ClickHouse when communicating with Kafka to be more verbose and usable. [#11252](https://github.com/ClickHouse/ClickHouse/pull/11252) ([filimonov](https://github.com/filimonov)). +* Keep the value of `DistributedFilesToInsert` metric on exceptions. In previous versions, the value was set when we are going to send some files, but it is zero, if there was an exception and some files are still pending. Now it corresponds to the number of pending files in filesystem. [#11220](https://github.com/ClickHouse/ClickHouse/pull/11220) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add support for multi-word data type names (such as `DOUBLE PRECISION` and `CHAR VARYING`) for better SQL compatibility. [#11214](https://github.com/ClickHouse/ClickHouse/pull/11214) ([Павел Потемкин](https://github.com/Potya)). +* Provide synonyms for some data types. [#10856](https://github.com/ClickHouse/ClickHouse/pull/10856) ([Павел Потемкин](https://github.com/Potya)). +* The query log is now enabled by default. [#11184](https://github.com/ClickHouse/ClickHouse/pull/11184) ([Ivan Blinkov](https://github.com/blinkov)). +* Show authentication type in table system.users and while executing SHOW CREATE USER query. [#11080](https://github.com/ClickHouse/ClickHouse/pull/11080) ([Vitaly Baranov](https://github.com/vitlibar)). +* Remove data on explicit `DROP DATABASE` for `Memory` database engine. Fixes [#10557](https://github.com/ClickHouse/ClickHouse/issues/10557). [#11021](https://github.com/ClickHouse/ClickHouse/pull/11021) ([tavplubix](https://github.com/tavplubix)). +* Set thread names for internal threads of rdkafka library. Make logs from rdkafka available in server logs. [#10983](https://github.com/ClickHouse/ClickHouse/pull/10983) ([Azat Khuzhin](https://github.com/azat)). +* Support for unicode whitespaces in queries. This helps when queries are copy-pasted from Word or from web page. This fixes [#10896](https://github.com/ClickHouse/ClickHouse/issues/10896). [#10903](https://github.com/ClickHouse/ClickHouse/pull/10903) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow large UInt types as the index in function `tupleElement`. [#10874](https://github.com/ClickHouse/ClickHouse/pull/10874) ([hcz](https://github.com/hczhcz)). +* Respect prefer_localhost_replica/load_balancing on INSERT into Distributed. [#10867](https://github.com/ClickHouse/ClickHouse/pull/10867) ([Azat Khuzhin](https://github.com/azat)). +* Introduce `min_insert_block_size_rows_for_materialized_views`, `min_insert_block_size_bytes_for_materialized_views` settings. This settings are similar to `min_insert_block_size_rows` and `min_insert_block_size_bytes`, but applied only for blocks inserted into `MATERIALIZED VIEW`. It helps to control blocks squashing while pushing to MVs and avoid excessive memory usage. [#10858](https://github.com/ClickHouse/ClickHouse/pull/10858) ([Azat Khuzhin](https://github.com/azat)). +* Get rid of exception from replicated queue during server shutdown. Fixes [#10819](https://github.com/ClickHouse/ClickHouse/issues/10819). [#10841](https://github.com/ClickHouse/ClickHouse/pull/10841) ([alesapin](https://github.com/alesapin)). +* Ensure that `varSamp`, `varPop` cannot return negative results due to numerical errors and that `stddevSamp`, `stddevPop` cannot be calculated from negative variance. This fixes [#10532](https://github.com/ClickHouse/ClickHouse/issues/10532). [#10829](https://github.com/ClickHouse/ClickHouse/pull/10829) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Better DNS exception message. This fixes [#10813](https://github.com/ClickHouse/ClickHouse/issues/10813). [#10828](https://github.com/ClickHouse/ClickHouse/pull/10828) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Change HTTP response code in case of some parse errors to 400 Bad Request. This fix [#10636](https://github.com/ClickHouse/ClickHouse/issues/10636). [#10640](https://github.com/ClickHouse/ClickHouse/pull/10640) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Print a message if clickhouse-client is newer than clickhouse-server. [#10627](https://github.com/ClickHouse/ClickHouse/pull/10627) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Adding support for `INSERT INTO [db.]table WATCH` query. [#10498](https://github.com/ClickHouse/ClickHouse/pull/10498) ([vzakaznikov](https://github.com/vzakaznikov)). +* Allow to pass quota_key in clickhouse-client. This closes [#10227](https://github.com/ClickHouse/ClickHouse/issues/10227). [#10270](https://github.com/ClickHouse/ClickHouse/pull/10270) ([alexey-milovidov](https://github.com/alexey-milovidov)). + +#### Performance Improvement + +* Allow multiple replicas to assign merges, mutations, partition drop, move and replace concurrently. This closes [#10367](https://github.com/ClickHouse/ClickHouse/issues/10367). [#11639](https://github.com/ClickHouse/ClickHouse/pull/11639) ([alexey-milovidov](https://github.com/alexey-milovidov)) [#11795](https://github.com/ClickHouse/ClickHouse/pull/11795) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Optimization of GROUP BY with respect to table sorting key, enabled with `optimize_aggregation_in_order` setting. [#9113](https://github.com/ClickHouse/ClickHouse/pull/9113) ([dimarub2000](https://github.com/dimarub2000)). +* Selects with final are executed in parallel. Added setting `max_final_threads` to limit the number of threads used. [#10463](https://github.com/ClickHouse/ClickHouse/pull/10463) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Improve performance for INSERT queries via `INSERT SELECT` or INSERT with clickhouse-client when small blocks are generated (typical case with parallel parsing). This fixes [#11275](https://github.com/ClickHouse/ClickHouse/issues/11275). Fix the issue that CONSTRAINTs were not working for DEFAULT fields. This fixes [#11273](https://github.com/ClickHouse/ClickHouse/issues/11273). Fix the issue that CONSTRAINTS were ignored for TEMPORARY tables. This fixes [#11274](https://github.com/ClickHouse/ClickHouse/issues/11274). [#11276](https://github.com/ClickHouse/ClickHouse/pull/11276) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Optimization that eliminates min/max/any aggregators of GROUP BY keys in SELECT section, enabled with `optimize_aggregators_of_group_by_keys` setting. [#11667](https://github.com/ClickHouse/ClickHouse/pull/11667) ([xPoSx](https://github.com/xPoSx)). [#11806](https://github.com/ClickHouse/ClickHouse/pull/11806) ([Azat Khuzhin](https://github.com/azat)). +* New optimization that takes all operations out of `any` function, enabled with `optimize_move_functions_out_of_any` [#11529](https://github.com/ClickHouse/ClickHouse/pull/11529) ([Ruslan](https://github.com/kamalov-ruslan)). +* Improve performance of `clickhouse-client` in interactive mode when Pretty formats are used. In previous versions, significant amount of time can be spent calculating visible width of UTF-8 string. This closes [#11323](https://github.com/ClickHouse/ClickHouse/issues/11323). [#11323](https://github.com/ClickHouse/ClickHouse/pull/11323) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improved performance for queries with `ORDER BY` and small `LIMIT` (less, then `max_block_size`). [#11171](https://github.com/ClickHouse/ClickHouse/pull/11171) ([Albert Kidrachev](https://github.com/Provet)). +* Add runtime CPU detection to select and dispatch the best function implementation. Add support for codegeneration for multiple targets. This closes [#1017](https://github.com/ClickHouse/ClickHouse/issues/1017). [#10058](https://github.com/ClickHouse/ClickHouse/pull/10058) ([DimasKovas](https://github.com/DimasKovas)). +* Enable `mlock` of clickhouse binary by default. It will prevent clickhouse executable from being paged out under high IO load. [#11139](https://github.com/ClickHouse/ClickHouse/pull/11139) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Make queries with `sum` aggregate function and without GROUP BY keys to run multiple times faster. [#10992](https://github.com/ClickHouse/ClickHouse/pull/10992) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improving radix sort (used in `ORDER BY` with simple keys) by removing some redundant data moves. [#10981](https://github.com/ClickHouse/ClickHouse/pull/10981) ([Arslan Gumerov](https://github.com/g-arslan)). +* Sort bigger parts of the left table in MergeJoin. Buffer left blocks in memory. Add `partial_merge_join_left_table_buffer_bytes` setting to manage the left blocks buffers sizes. [#10601](https://github.com/ClickHouse/ClickHouse/pull/10601) ([Artem Zuikov](https://github.com/4ertus2)). +* Remove duplicate ORDER BY and DISTINCT from subqueries, this optimization is enabled with `optimize_duplicate_order_by_and_distinct` [#10067](https://github.com/ClickHouse/ClickHouse/pull/10067) ([Mikhail Malafeev](https://github.com/demo-99)). +* This feature eliminates functions of other keys in GROUP BY section, enabled with `optimize_group_by_function_keys` [#10051](https://github.com/ClickHouse/ClickHouse/pull/10051) ([xPoSx](https://github.com/xPoSx)). +* New optimization that takes arithmetic operations out of aggregate functions, enabled with `optimize_arithmetic_operations_in_aggregate_functions` [#10047](https://github.com/ClickHouse/ClickHouse/pull/10047) ([Ruslan](https://github.com/kamalov-ruslan)). +* Use HTTP client for S3 based on Poco instead of curl. This will improve performance and lower memory usage of s3 storage and table functions. [#11230](https://github.com/ClickHouse/ClickHouse/pull/11230) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fix Kafka performance issue related to reschedules based on limits, which were always applied. [#11149](https://github.com/ClickHouse/ClickHouse/pull/11149) ([filimonov](https://github.com/filimonov)). +* Enable percpu_arena:percpu for jemalloc (This will reduce memory fragmentation due to thread pool). [#11084](https://github.com/ClickHouse/ClickHouse/pull/11084) ([Azat Khuzhin](https://github.com/azat)). +* Optimize memory usage when reading a response from an S3 HTTP client. [#11561](https://github.com/ClickHouse/ClickHouse/pull/11561) ([Pavel Kovalenko](https://github.com/Jokser)). +* Adjust the default Kafka settings for better performance. [#11388](https://github.com/ClickHouse/ClickHouse/pull/11388) ([filimonov](https://github.com/filimonov)). + +#### Experimental Feature + +* Add data type `Point` (Tuple(Float64, Float64)) and `Polygon` (Array(Array(Tuple(Float64, Float64))). [#10678](https://github.com/ClickHouse/ClickHouse/pull/10678) ([Alexey Ilyukhov](https://github.com/livace)). +* Add's a `hasSubstr` function that allows for look for subsequences in arrays. Note: this function is likely to be renamed without further notice. [#11071](https://github.com/ClickHouse/ClickHouse/pull/11071) ([Ryad Zenine](https://github.com/r-zenine)). +* Added OpenCL support and bitonic sort algorithm, which can be used for sorting integer types of data in single column. Needs to be build with flag `-DENABLE_OPENCL=1`. For using bitonic sort algorithm instead of others you need to set `bitonic_sort` for Setting's option `special_sort` and make sure that OpenCL is available. This feature does not improve performance or anything else, it is only provided as an example and for demonstration purposes. It is likely to be removed in near future if there will be no further development in this direction. [#10232](https://github.com/ClickHouse/ClickHouse/pull/10232) ([Ri](https://github.com/margaritiko)). + +#### Build/Testing/Packaging Improvement + +* Enable clang-tidy for programs and utils. [#10991](https://github.com/ClickHouse/ClickHouse/pull/10991) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove dependency on `tzdata`: do not fail if `/usr/share/zoneinfo` directory does not exist. Note that all timezones work in ClickHouse even without tzdata installed in system. [#11827](https://github.com/ClickHouse/ClickHouse/pull/11827) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added MSan and UBSan stress tests. Note that we already have MSan, UBSan for functional tests and "stress" test is another kind of tests. [#10871](https://github.com/ClickHouse/ClickHouse/pull/10871) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Print compiler build id in crash messages. It will make us slightly more certain about what binary has crashed. Added new function `buildId`. [#11824](https://github.com/ClickHouse/ClickHouse/pull/11824) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added a test to ensure that mutations continue to work after FREEZE query. [#11820](https://github.com/ClickHouse/ClickHouse/pull/11820) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Don't allow tests with "fail" substring in their names because it makes looking at the tests results in browser less convenient when you type Ctrl+F and search for "fail". [#11817](https://github.com/ClickHouse/ClickHouse/pull/11817) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Removes unused imports from HTTPHandlerFactory. [#11660](https://github.com/ClickHouse/ClickHouse/pull/11660) ([Bharat Nallan](https://github.com/bharatnc)). +* Added a random sampling of instances where copier is executed. It is needed to avoid `Too many simultaneous queries` error. Also increased timeout and decreased fault probability. [#11573](https://github.com/ClickHouse/ClickHouse/pull/11573) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix missed include. [#11525](https://github.com/ClickHouse/ClickHouse/pull/11525) ([Matwey V. Kornilov](https://github.com/matwey)). +* Speed up build by removing old example programs. Also found some orphan functional test. [#11486](https://github.com/ClickHouse/ClickHouse/pull/11486) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Increase ccache size for builds in CI. [#11450](https://github.com/ClickHouse/ClickHouse/pull/11450) ([alesapin](https://github.com/alesapin)). +* Leave only unit_tests_dbms in deb build. [#11429](https://github.com/ClickHouse/ClickHouse/pull/11429) ([Ilya Yatsishin](https://github.com/qoega)). +* Update librdkafka to version [1.4.2](https://github.com/edenhill/librdkafka/releases/tag/v1.4.2). [#11256](https://github.com/ClickHouse/ClickHouse/pull/11256) ([filimonov](https://github.com/filimonov)). +* Refactor CMake build files. [#11390](https://github.com/ClickHouse/ClickHouse/pull/11390) ([Ivan](https://github.com/abyss7)). +* Fix several flaky integration tests. [#11355](https://github.com/ClickHouse/ClickHouse/pull/11355) ([alesapin](https://github.com/alesapin)). +* Add support for unit tests run with UBSan. [#11345](https://github.com/ClickHouse/ClickHouse/pull/11345) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove redundant timeout from integration test `test_insertion_sync_fails_with_timeout`. [#11343](https://github.com/ClickHouse/ClickHouse/pull/11343) ([alesapin](https://github.com/alesapin)). +* Better check for hung queries in clickhouse-test. [#11321](https://github.com/ClickHouse/ClickHouse/pull/11321) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Emit a warning if server was build in debug or with sanitizers. [#11304](https://github.com/ClickHouse/ClickHouse/pull/11304) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now clickhouse-test check the server aliveness before tests run. [#11285](https://github.com/ClickHouse/ClickHouse/pull/11285) ([alesapin](https://github.com/alesapin)). +* Fix potentially flacky test `00731_long_merge_tree_select_opened_files.sh`. It does not fail frequently but we have discovered potential race condition in this test while experimenting with ThreadFuzzer: [#9814](https://github.com/ClickHouse/ClickHouse/issues/9814) See [link](https://clickhouse-test-reports.s3.yandex.net/9814/40e3023e215df22985d275bf85f4d2290897b76b/functional_stateless_tests_(unbundled).html#fail1) for the example. [#11270](https://github.com/ClickHouse/ClickHouse/pull/11270) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Repeat test in CI if `curl` invocation was timed out. It is possible due to system hangups for 10+ seconds that are typical in our CI infrastructure. This fixes [#11267](https://github.com/ClickHouse/ClickHouse/issues/11267). [#11268](https://github.com/ClickHouse/ClickHouse/pull/11268) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add a test for Join table engine from @donmikel. This closes [#9158](https://github.com/ClickHouse/ClickHouse/issues/9158). [#11265](https://github.com/ClickHouse/ClickHouse/pull/11265) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix several non significant errors in unit tests. [#11262](https://github.com/ClickHouse/ClickHouse/pull/11262) ([alesapin](https://github.com/alesapin)). +* Now parts of linker command for `cctz` library will not be shuffled with other libraries. [#11213](https://github.com/ClickHouse/ClickHouse/pull/11213) ([alesapin](https://github.com/alesapin)). +* Split /programs/server into actual program and library. [#11186](https://github.com/ClickHouse/ClickHouse/pull/11186) ([Ivan](https://github.com/abyss7)). +* Improve build scripts for protobuf & gRPC. [#11172](https://github.com/ClickHouse/ClickHouse/pull/11172) ([Vitaly Baranov](https://github.com/vitlibar)). +* Enable performance test that was not working. [#11158](https://github.com/ClickHouse/ClickHouse/pull/11158) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Create root S3 bucket for tests before any CH instance is started. [#11142](https://github.com/ClickHouse/ClickHouse/pull/11142) ([Pavel Kovalenko](https://github.com/Jokser)). +* Add performance test for non-constant polygons. [#11141](https://github.com/ClickHouse/ClickHouse/pull/11141) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixing `00979_live_view_watch_continuous_aggregates` test. [#11024](https://github.com/ClickHouse/ClickHouse/pull/11024) ([vzakaznikov](https://github.com/vzakaznikov)). +* Add ability to run zookeeper in integration tests over tmpfs. [#11002](https://github.com/ClickHouse/ClickHouse/pull/11002) ([alesapin](https://github.com/alesapin)). +* Wait for odbc-bridge with exponential backoff. Previous wait time of 200 ms was not enough in our CI environment. [#10990](https://github.com/ClickHouse/ClickHouse/pull/10990) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix non-deterministic test. [#10989](https://github.com/ClickHouse/ClickHouse/pull/10989) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added a test for empty external data. [#10926](https://github.com/ClickHouse/ClickHouse/pull/10926) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Database is recreated for every test. This improves separation of tests. [#10902](https://github.com/ClickHouse/ClickHouse/pull/10902) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added more asserts in columns code. [#10833](https://github.com/ClickHouse/ClickHouse/pull/10833) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Better cooperation with sanitizers. Print information about query_id in the message of sanitizer failure. [#10832](https://github.com/ClickHouse/ClickHouse/pull/10832) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix obvious race condition in "Split build smoke test" check. [#10820](https://github.com/ClickHouse/ClickHouse/pull/10820) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix (false) MSan report in MergeTreeIndexFullText. The issue first appeared in [#9968](https://github.com/ClickHouse/ClickHouse/issues/9968). [#10801](https://github.com/ClickHouse/ClickHouse/pull/10801) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add MSan suppression for MariaDB Client library. [#10800](https://github.com/ClickHouse/ClickHouse/pull/10800) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* GRPC make couldn't find protobuf files, changed make file by adding the right link. [#10794](https://github.com/ClickHouse/ClickHouse/pull/10794) ([mnkonkova](https://github.com/mnkonkova)). +* Enable extra warnings (`-Weverything`) for base, utils, programs. Note that we already have it for the most of the code. [#10779](https://github.com/ClickHouse/ClickHouse/pull/10779) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Suppressions of warnings from libraries was mistakenly declared as public in [#10396](https://github.com/ClickHouse/ClickHouse/issues/10396). [#10776](https://github.com/ClickHouse/ClickHouse/pull/10776) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Restore a patch that was accidentially deleted in [#10396](https://github.com/ClickHouse/ClickHouse/issues/10396). [#10774](https://github.com/ClickHouse/ClickHouse/pull/10774) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix performance tests errors, part 2. [#10773](https://github.com/ClickHouse/ClickHouse/pull/10773) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix performance test errors. [#10766](https://github.com/ClickHouse/ClickHouse/pull/10766) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Update cross-builds to use clang-10 compiler. [#10724](https://github.com/ClickHouse/ClickHouse/pull/10724) ([Ivan](https://github.com/abyss7)). +* Update instruction to install RPM packages. This was suggested by Denis (TG login @ldviolet) and implemented by Arkady Shejn. [#10707](https://github.com/ClickHouse/ClickHouse/pull/10707) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Trying to fix `tests/queries/0_stateless/01246_insert_into_watch_live_view.py` test. [#10670](https://github.com/ClickHouse/ClickHouse/pull/10670) ([vzakaznikov](https://github.com/vzakaznikov)). +* Fixing and re-enabling 00979_live_view_watch_continuous_aggregates.py test. [#10658](https://github.com/ClickHouse/ClickHouse/pull/10658) ([vzakaznikov](https://github.com/vzakaznikov)). +* Fix OOM in ASan stress test. [#10646](https://github.com/ClickHouse/ClickHouse/pull/10646) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix UBSan report (adding zero to nullptr) in HashTable that appeared after migration to clang-10. [#10638](https://github.com/ClickHouse/ClickHouse/pull/10638) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove external call to `ld` (bfd) linker during tzdata processing in compile time. [#10634](https://github.com/ClickHouse/ClickHouse/pull/10634) ([alesapin](https://github.com/alesapin)). +* Allow to use `lld` to link blobs (resources). [#10632](https://github.com/ClickHouse/ClickHouse/pull/10632) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix UBSan report in `LZ4` library. [#10631](https://github.com/ClickHouse/ClickHouse/pull/10631) ([alexey-milovidov](https://github.com/alexey-milovidov)). See also [https://github.com/lz4/lz4/issues/857](https://github.com/lz4/lz4/issues/857) +* Update LZ4 to the latest dev branch. [#10630](https://github.com/ClickHouse/ClickHouse/pull/10630) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added auto-generated machine-readable file with the list of stable versions. [#10628](https://github.com/ClickHouse/ClickHouse/pull/10628) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `capnproto` version check for `capnp::UnalignedFlatArrayMessageReader`. [#10618](https://github.com/ClickHouse/ClickHouse/pull/10618) ([Matwey V. Kornilov](https://github.com/matwey)). +* Lower memory usage in tests. [#10617](https://github.com/ClickHouse/ClickHouse/pull/10617) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixing hard coded timeouts in new live view tests. [#10604](https://github.com/ClickHouse/ClickHouse/pull/10604) ([vzakaznikov](https://github.com/vzakaznikov)). +* Increasing timeout when opening a client in tests/queries/0_stateless/helpers/client.py. [#10599](https://github.com/ClickHouse/ClickHouse/pull/10599) ([vzakaznikov](https://github.com/vzakaznikov)). +* Enable ThinLTO for clang builds, continuation of [#10435](https://github.com/ClickHouse/ClickHouse/pull/10435). [#10585](https://github.com/ClickHouse/ClickHouse/pull/10585) ([Amos Bird](https://github.com/amosbird)). +* Adding fuzzers and preparing for oss-fuzz integration. [#10546](https://github.com/ClickHouse/ClickHouse/pull/10546) ([kyprizel](https://github.com/kyprizel)). +* Fix FreeBSD build. [#10150](https://github.com/ClickHouse/ClickHouse/pull/10150) ([Ivan](https://github.com/abyss7)). +* Add new build for query tests using pytest framework. [#10039](https://github.com/ClickHouse/ClickHouse/pull/10039) ([Ivan](https://github.com/abyss7)). + + +## ClickHouse release v20.4 + +### ClickHouse release v20.4.8.99-stable 2020-08-10 + +#### Bug Fix + +* Fixed error in `parseDateTimeBestEffort` function when unix timestamp was passed as an argument. This fixes [#13362](https://github.com/ClickHouse/ClickHouse/issues/13362). [#13441](https://github.com/ClickHouse/ClickHouse/pull/13441) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potentially low performance and slightly incorrect result for `uniqExact`, `topK`, `sumDistinct` and similar aggregate functions called on Float types with NaN values. It also triggered assert in debug build. This fixes [#12491](https://github.com/ClickHouse/ClickHouse/issues/12491). [#13254](https://github.com/ClickHouse/ClickHouse/pull/13254) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed function if with nullable constexpr as cond that is not literal NULL. Fixes [#12463](https://github.com/ClickHouse/ClickHouse/issues/12463). [#13226](https://github.com/ClickHouse/ClickHouse/pull/13226) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed assert in `arrayElement` function in case of array elements are Nullable and array subscript is also Nullable. This fixes [#12172](https://github.com/ClickHouse/ClickHouse/issues/12172). [#13224](https://github.com/ClickHouse/ClickHouse/pull/13224) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed wrong index analysis with functions. It could lead to pruning wrong parts, while reading from `MergeTree` tables. Fixes [#13060](https://github.com/ClickHouse/ClickHouse/issues/13060). Fixes [#12406](https://github.com/ClickHouse/ClickHouse/issues/12406). [#13081](https://github.com/ClickHouse/ClickHouse/pull/13081) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed unnecessary limiting for the number of threads for selects from local replica. [#12840](https://github.com/ClickHouse/ClickHouse/pull/12840) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed possible extra overflow row in data which could appear for queries `WITH TOTALS`. [#12747](https://github.com/ClickHouse/ClickHouse/pull/12747) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed performance with large tuples, which are interpreted as functions in `IN` section. The case when user write `WHERE x IN tuple(1, 2, ...)` instead of `WHERE x IN (1, 2, ...)` for some obscure reason. [#12700](https://github.com/ClickHouse/ClickHouse/pull/12700) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed memory tracking for `input_format_parallel_parsing` (by attaching thread to group). [#12672](https://github.com/ClickHouse/ClickHouse/pull/12672) ([Azat Khuzhin](https://github.com/azat)). +* Fixed [#12293](https://github.com/ClickHouse/ClickHouse/issues/12293) allow push predicate when subquery contains with clause. [#12663](https://github.com/ClickHouse/ClickHouse/pull/12663) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed [#10572](https://github.com/ClickHouse/ClickHouse/issues/10572) fix bloom filter index with const expression. [#12659](https://github.com/ClickHouse/ClickHouse/pull/12659) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed `SIGSEGV` in `StorageKafka` when broker is unavailable (and not only). [#12658](https://github.com/ClickHouse/ClickHouse/pull/12658) ([Azat Khuzhin](https://github.com/azat)). +* Added support for function `if` with `Array(UUID)` arguments. This fixes [#11066](https://github.com/ClickHouse/ClickHouse/issues/11066). [#12648](https://github.com/ClickHouse/ClickHouse/pull/12648) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed race condition in external dictionaries with cache layout which can lead server crash. [#12566](https://github.com/ClickHouse/ClickHouse/pull/12566) ([alesapin](https://github.com/alesapin)). +* Removed data for Distributed tables (blocks from async INSERTs) on DROP TABLE. [#12556](https://github.com/ClickHouse/ClickHouse/pull/12556) ([Azat Khuzhin](https://github.com/azat)). +* Fixed bug which lead to broken old parts after `ALTER DELETE` query when `enable_mixed_granularity_parts=1`. Fixes [#12536](https://github.com/ClickHouse/ClickHouse/issues/12536). [#12543](https://github.com/ClickHouse/ClickHouse/pull/12543) ([alesapin](https://github.com/alesapin)). +* Better exception for function `in` with invalid number of arguments. [#12529](https://github.com/ClickHouse/ClickHouse/pull/12529) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed performance issue, while reading from compact parts. [#12492](https://github.com/ClickHouse/ClickHouse/pull/12492) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed crash in JOIN with dictionary when we are joining over expression of dictionary key: `t JOIN dict ON expr(dict.id) = t.id`. Disable dictionary join optimisation for this case. [#12458](https://github.com/ClickHouse/ClickHouse/pull/12458) ([Artem Zuikov](https://github.com/4ertus2)). +* Fixed possible segfault if StorageMerge. Closes [#12054](https://github.com/ClickHouse/ClickHouse/issues/12054). [#12401](https://github.com/ClickHouse/ClickHouse/pull/12401) ([tavplubix](https://github.com/tavplubix)). +* Fixed order of columns in `WITH FILL` modifier. Previously order of columns of `ORDER BY` statement wasn't respected. [#12306](https://github.com/ClickHouse/ClickHouse/pull/12306) ([Anton Popov](https://github.com/CurtizJ)). +* Avoid "bad cast" exception when there is an expression that filters data by virtual columns (like `_table` in `Merge` tables) or by "index" columns in system tables such as filtering by database name when querying from `system.tables`, and this expression returns `Nullable` type. This fixes [#12166](https://github.com/ClickHouse/ClickHouse/issues/12166). [#12305](https://github.com/ClickHouse/ClickHouse/pull/12305) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Show error after TrieDictionary failed to load. [#12290](https://github.com/ClickHouse/ClickHouse/pull/12290) ([Vitaly Baranov](https://github.com/vitlibar)). +* The function `arrayFill` worked incorrectly for empty arrays that may lead to crash. This fixes [#12263](https://github.com/ClickHouse/ClickHouse/issues/12263). [#12279](https://github.com/ClickHouse/ClickHouse/pull/12279) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Implemented conversions to the common type for `LowCardinality` types. This allows to execute UNION ALL of tables with columns of LowCardinality and other columns. This fixes [#8212](https://github.com/ClickHouse/ClickHouse/issues/8212). This fixes [#4342](https://github.com/ClickHouse/ClickHouse/issues/4342). [#12275](https://github.com/ClickHouse/ClickHouse/pull/12275) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the behaviour when during multiple sequential inserts in `StorageFile` header for some special types was written more than once. This fixed [#6155](https://github.com/ClickHouse/ClickHouse/issues/6155). [#12197](https://github.com/ClickHouse/ClickHouse/pull/12197) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fixed logical functions for UInt8 values when they are not equal to 0 or 1. [#12196](https://github.com/ClickHouse/ClickHouse/pull/12196) ([Alexander Kazakov](https://github.com/Akazz)). +* Cap max_memory_usage* limits to the process resident memory. [#12182](https://github.com/ClickHouse/ClickHouse/pull/12182) ([Azat Khuzhin](https://github.com/azat)). +* Fixed `dictGet` arguments check during GROUP BY injective functions elimination. [#12179](https://github.com/ClickHouse/ClickHouse/pull/12179) ([Azat Khuzhin](https://github.com/azat)). +* Don't split the dictionary source's table name into schema and table name itself if ODBC connection does not support schema. [#12165](https://github.com/ClickHouse/ClickHouse/pull/12165) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed wrong logic in `ALTER DELETE` that leads to deleting of records when condition evaluates to NULL. This fixes [#9088](https://github.com/ClickHouse/ClickHouse/issues/9088). This closes [#12106](https://github.com/ClickHouse/ClickHouse/issues/12106). [#12153](https://github.com/ClickHouse/ClickHouse/pull/12153) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed transform of query to send to external DBMS (e.g. MySQL, ODBC) in presense of aliases. This fixes [#12032](https://github.com/ClickHouse/ClickHouse/issues/12032). [#12151](https://github.com/ClickHouse/ClickHouse/pull/12151) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potential overflow in integer division. This fixes [#12119](https://github.com/ClickHouse/ClickHouse/issues/12119). [#12140](https://github.com/ClickHouse/ClickHouse/pull/12140) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potential infinite loop in `greatCircleDistance`, `geoDistance`. This fixes [#12117](https://github.com/ClickHouse/ClickHouse/issues/12117). [#12137](https://github.com/ClickHouse/ClickHouse/pull/12137) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Normalize "pid" file handling. In previous versions the server may refuse to start if it was killed without proper shutdown and if there is another process that has the same pid as previously runned server. Also pid file may be removed in unsuccessful server startup even if there is another server running. This fixes [#3501](https://github.com/ClickHouse/ClickHouse/issues/3501). [#12133](https://github.com/ClickHouse/ClickHouse/pull/12133) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed handling dependency of table with ENGINE=Dictionary on dictionary. This fixes [#10994](https://github.com/ClickHouse/ClickHouse/issues/10994). This fixes [#10397](https://github.com/ClickHouse/ClickHouse/issues/10397). [#12116](https://github.com/ClickHouse/ClickHouse/pull/12116) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed performance for selects with `UNION` caused by wrong limit for the total number of threads. Fixes [#12030](https://github.com/ClickHouse/ClickHouse/issues/12030). [#12103](https://github.com/ClickHouse/ClickHouse/pull/12103) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed segfault with `-StateResample` combinators. [#12092](https://github.com/ClickHouse/ClickHouse/pull/12092) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed empty `result_rows` and `result_bytes` metrics in `system.quey_log` for selects. Fixes [#11595](https://github.com/ClickHouse/ClickHouse/issues/11595). [#12089](https://github.com/ClickHouse/ClickHouse/pull/12089) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed unnecessary limiting the number of threads for selects from `VIEW`. Fixes [#11937](https://github.com/ClickHouse/ClickHouse/issues/11937). [#12085](https://github.com/ClickHouse/ClickHouse/pull/12085) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed possible crash while using wrong type for `PREWHERE`. Fixes [#12053](https://github.com/ClickHouse/ClickHouse/issues/12053), [#12060](https://github.com/ClickHouse/ClickHouse/issues/12060). [#12060](https://github.com/ClickHouse/ClickHouse/pull/12060) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed error `Expected single dictionary argument for function` for function `defaultValueOfArgumentType` with `LowCardinality` type. Fixes [#11808](https://github.com/ClickHouse/ClickHouse/issues/11808). [#12056](https://github.com/ClickHouse/ClickHouse/pull/12056) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed error `Cannot capture column` for higher-order functions with `Tuple(LowCardinality)` argument. Fixes [#9766](https://github.com/ClickHouse/ClickHouse/issues/9766). [#12055](https://github.com/ClickHouse/ClickHouse/pull/12055) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Parse tables metadata in parallel when loading database. This fixes slow server startup when there are large number of tables. [#12045](https://github.com/ClickHouse/ClickHouse/pull/12045) ([tavplubix](https://github.com/tavplubix)). +* Make `topK` aggregate function return Enum for Enum types. This fixes [#3740](https://github.com/ClickHouse/ClickHouse/issues/3740). [#12043](https://github.com/ClickHouse/ClickHouse/pull/12043) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed constraints check if constraint is a constant expression. This fixes [#11360](https://github.com/ClickHouse/ClickHouse/issues/11360). [#12042](https://github.com/ClickHouse/ClickHouse/pull/12042) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed incorrect comparison of tuples with `Nullable` columns. Fixes [#11985](https://github.com/ClickHouse/ClickHouse/issues/11985). [#12039](https://github.com/ClickHouse/ClickHouse/pull/12039) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed calculation of access rights when allow_introspection_functions=0. [#12031](https://github.com/ClickHouse/ClickHouse/pull/12031) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed wrong result and potential crash when invoking function `if` with arguments of type `FixedString` with different sizes. This fixes [#11362](https://github.com/ClickHouse/ClickHouse/issues/11362). [#12021](https://github.com/ClickHouse/ClickHouse/pull/12021) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* A query with function `neighbor` as the only returned expression may return empty result if the function is called with offset `-9223372036854775808`. This fixes [#11367](https://github.com/ClickHouse/ClickHouse/issues/11367). [#12019](https://github.com/ClickHouse/ClickHouse/pull/12019) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed calculation of access rights when allow_ddl=0. [#12015](https://github.com/ClickHouse/ClickHouse/pull/12015) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed potential array size overflow in generateRandom that may lead to crash. This fixes [#11371](https://github.com/ClickHouse/ClickHouse/issues/11371). [#12013](https://github.com/ClickHouse/ClickHouse/pull/12013) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potential floating point exception. This closes [#11378](https://github.com/ClickHouse/ClickHouse/issues/11378). [#12005](https://github.com/ClickHouse/ClickHouse/pull/12005) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed wrong setting name in log message at server startup. [#11997](https://github.com/ClickHouse/ClickHouse/pull/11997) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `Query parameter was not set` in `Values` format. Fixes [#11918](https://github.com/ClickHouse/ClickHouse/issues/11918). [#11936](https://github.com/ClickHouse/ClickHouse/pull/11936) ([tavplubix](https://github.com/tavplubix)). +* Keep aliases for substitutions in query (parametrized queries). This fixes [#11914](https://github.com/ClickHouse/ClickHouse/issues/11914). [#11916](https://github.com/ClickHouse/ClickHouse/pull/11916) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed bug with no moves when changing storage policy from default one. [#11893](https://github.com/ClickHouse/ClickHouse/pull/11893) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fixed potential floating point exception when parsing `DateTime64`. This fixes [#11374](https://github.com/ClickHouse/ClickHouse/issues/11374). [#11875](https://github.com/ClickHouse/ClickHouse/pull/11875) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed memory accounting via HTTP interface (can be significant with `wait_end_of_query=1`). [#11840](https://github.com/ClickHouse/ClickHouse/pull/11840) ([Azat Khuzhin](https://github.com/azat)). +* Parse metadata stored in zookeeper before checking for equality. [#11739](https://github.com/ClickHouse/ClickHouse/pull/11739) ([Azat Khuzhin](https://github.com/azat)). + +#### Performance Improvement + +* Index not used for IN operator with literals, performance regression introduced around v19.3. This fixes [#10574](https://github.com/ClickHouse/ClickHouse/issues/10574). [#12062](https://github.com/ClickHouse/ClickHouse/pull/12062) ([nvartolomei](https://github.com/nvartolomei)). + +#### Build/Testing/Packaging Improvement + +* Install `ca-certificates` before the first `apt-get update` in Dockerfile. [#12095](https://github.com/ClickHouse/ClickHouse/pull/12095) ([Ivan Blinkov](https://github.com/blinkov)). + + +### ClickHouse release v20.4.6.53-stable 2020-06-25 + +#### Bug Fix + +* Fix rare crash caused by using `Nullable` column in prewhere condition. Continuation of [#11608](https://github.com/ClickHouse/ClickHouse/issues/11608). [#11869](https://github.com/ClickHouse/ClickHouse/pull/11869) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Don't allow arrayJoin inside higher order functions. It was leading to broken protocol synchronization. This closes [#3933](https://github.com/ClickHouse/ClickHouse/issues/3933). [#11846](https://github.com/ClickHouse/ClickHouse/pull/11846) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix wrong result of comparison of FixedString with constant String. This fixes [#11393](https://github.com/ClickHouse/ClickHouse/issues/11393). This bug appeared in version 20.4. [#11828](https://github.com/ClickHouse/ClickHouse/pull/11828) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix wrong result for `if()` with NULLs in condition. [#11807](https://github.com/ClickHouse/ClickHouse/pull/11807) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix using too many threads for queries. [#11788](https://github.com/ClickHouse/ClickHouse/pull/11788) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix unexpected behaviour of queries like `SELECT *, xyz.*` which were success while an error expected. [#11753](https://github.com/ClickHouse/ClickHouse/pull/11753) ([hexiaoting](https://github.com/hexiaoting)). +* Now replicated fetches will be cancelled during metadata alter. [#11744](https://github.com/ClickHouse/ClickHouse/pull/11744) ([alesapin](https://github.com/alesapin)). +* Fixed LOGICAL_ERROR caused by wrong type deduction of complex literals in Values input format. [#11732](https://github.com/ClickHouse/ClickHouse/pull/11732) ([tavplubix](https://github.com/tavplubix)). +* Fix `ORDER BY ... WITH FILL` over const columns. [#11697](https://github.com/ClickHouse/ClickHouse/pull/11697) ([Anton Popov](https://github.com/CurtizJ)). +* Pass proper timeouts when communicating with XDBC bridge. Recently timeouts were not respected when checking bridge liveness and receiving meta info. [#11690](https://github.com/ClickHouse/ClickHouse/pull/11690) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `LIMIT n WITH TIES` usage together with `ORDER BY` statement, which contains aliases. [#11689](https://github.com/ClickHouse/ClickHouse/pull/11689) ([Anton Popov](https://github.com/CurtizJ)). +* Fix error which leads to an incorrect state of `system.mutations`. It may show that whole mutation is already done but the server still has `MUTATE_PART` tasks in the replication queue and tries to execute them. This fixes [#11611](https://github.com/ClickHouse/ClickHouse/issues/11611). [#11681](https://github.com/ClickHouse/ClickHouse/pull/11681) ([alesapin](https://github.com/alesapin)). +* Add support for regular expressions with case-insensitive flags. This fixes [#11101](https://github.com/ClickHouse/ClickHouse/issues/11101) and fixes [#11506](https://github.com/ClickHouse/ClickHouse/issues/11506). [#11649](https://github.com/ClickHouse/ClickHouse/pull/11649) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove trivial count query optimization if row-level security is set. In previous versions the user get total count of records in a table instead filtered. This fixes [#11352](https://github.com/ClickHouse/ClickHouse/issues/11352). [#11644](https://github.com/ClickHouse/ClickHouse/pull/11644) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix bloom filters for String (data skipping indices). [#11638](https://github.com/ClickHouse/ClickHouse/pull/11638) ([Azat Khuzhin](https://github.com/azat)). +* Fix rare crash caused by using `Nullable` column in prewhere condition. (Probably it is connected with [#11572](https://github.com/ClickHouse/ClickHouse/issues/11572) somehow). [#11608](https://github.com/ClickHouse/ClickHouse/pull/11608) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix error `Block structure mismatch` for queries with sampling reading from `Buffer` table. [#11602](https://github.com/ClickHouse/ClickHouse/pull/11602) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix wrong exit code of the clickhouse-client, when exception.code() % 256 = 0. [#11601](https://github.com/ClickHouse/ClickHouse/pull/11601) ([filimonov](https://github.com/filimonov)). +* Fix trivial error in log message about "Mark cache size was lowered" at server startup. This closes [#11399](https://github.com/ClickHouse/ClickHouse/issues/11399). [#11589](https://github.com/ClickHouse/ClickHouse/pull/11589) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix error `Size of offsets does not match size of column` for queries with `PREWHERE column in (subquery)` and `ARRAY JOIN`. [#11580](https://github.com/ClickHouse/ClickHouse/pull/11580) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed rare segfault in `SHOW CREATE TABLE` Fixes [#11490](https://github.com/ClickHouse/ClickHouse/issues/11490). [#11579](https://github.com/ClickHouse/ClickHouse/pull/11579) ([tavplubix](https://github.com/tavplubix)). +* All queries in HTTP session have had the same query_id. It is fixed. [#11578](https://github.com/ClickHouse/ClickHouse/pull/11578) ([tavplubix](https://github.com/tavplubix)). +* Now clickhouse-server docker container will prefer IPv6 checking server aliveness. [#11550](https://github.com/ClickHouse/ClickHouse/pull/11550) ([Ivan Starkov](https://github.com/istarkov)). +* Fix shard_num/replica_num for `` (breaks use_compact_format_in_distributed_parts_names). [#11528](https://github.com/ClickHouse/ClickHouse/pull/11528) ([Azat Khuzhin](https://github.com/azat)). +* Fix race condition which may lead to an exception during table drop. It's a bit tricky and not dangerous at all. If you want an explanation, just notice me in telegram. [#11523](https://github.com/ClickHouse/ClickHouse/pull/11523) ([alesapin](https://github.com/alesapin)). +* Fix memory leak when exception is thrown in the middle of aggregation with -State functions. This fixes [#8995](https://github.com/ClickHouse/ClickHouse/issues/8995). [#11496](https://github.com/ClickHouse/ClickHouse/pull/11496) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* If data skipping index is dependent on columns that are going to be modified during background merge (for SummingMergeTree, AggregatingMergeTree as well as for TTL GROUP BY), it was calculated incorrectly. This issue is fixed by moving index calculation after merge so the index is calculated on merged data. [#11162](https://github.com/ClickHouse/ClickHouse/pull/11162) ([Azat Khuzhin](https://github.com/azat)). +* Get rid of old libunwind patches. https://github.com/ClickHouse-Extras/libunwind/commit/500aa227911bd185a94bfc071d68f4d3b03cb3b1#r39048012 This allows to disable `-fno-omit-frame-pointer` in `clang` builds that improves performance at least by 1% in average. [#10761](https://github.com/ClickHouse/ClickHouse/pull/10761) ([Amos Bird](https://github.com/amosbird)). +* Fix usage of primary key wrapped into a function with 'FINAL' modifier and 'ORDER BY' optimization. [#10715](https://github.com/ClickHouse/ClickHouse/pull/10715) ([Anton Popov](https://github.com/CurtizJ)). + +#### Build/Testing/Packaging Improvement + +* Fix several non significant errors in unit tests. [#11262](https://github.com/ClickHouse/ClickHouse/pull/11262) ([alesapin](https://github.com/alesapin)). +* Fix (false) MSan report in MergeTreeIndexFullText. The issue first appeared in [#9968](https://github.com/ClickHouse/ClickHouse/issues/9968). [#10801](https://github.com/ClickHouse/ClickHouse/pull/10801) ([alexey-milovidov](https://github.com/alexey-milovidov)). + + +### ClickHouse release v20.4.5.36-stable 2020-06-10 + +#### Bug Fix + +* Fix the error `Data compressed with different methods` that can happen if `min_bytes_to_use_direct_io` is enabled and PREWHERE is active and using SAMPLE or high number of threads. This fixes [#11539](https://github.com/ClickHouse/ClickHouse/issues/11539). [#11540](https://github.com/ClickHouse/ClickHouse/pull/11540) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix return compressed size for codecs. [#11448](https://github.com/ClickHouse/ClickHouse/pull/11448) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix server crash when a column has compression codec with non-literal arguments. Fixes [#11365](https://github.com/ClickHouse/ClickHouse/issues/11365). [#11431](https://github.com/ClickHouse/ClickHouse/pull/11431) ([alesapin](https://github.com/alesapin)). +* Fix pointInPolygon with nan as point. Fixes [#11375](https://github.com/ClickHouse/ClickHouse/issues/11375). [#11421](https://github.com/ClickHouse/ClickHouse/pull/11421) ([Alexey Ilyukhov](https://github.com/livace)). +* Fix potential uninitialized memory read in MergeTree shutdown if table was not created successfully. [#11420](https://github.com/ClickHouse/ClickHouse/pull/11420) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed geohashesInBox with arguments outside of latitude/longitude range. [#11403](https://github.com/ClickHouse/ClickHouse/pull/11403) ([Vasily Nemkov](https://github.com/Enmk)). +* Fix possible `Pipeline stuck` error for queries with external sort and limit. Fixes [#11359](https://github.com/ClickHouse/ClickHouse/issues/11359). [#11366](https://github.com/ClickHouse/ClickHouse/pull/11366) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Remove redundant lock during parts send in ReplicatedMergeTree. [#11354](https://github.com/ClickHouse/ClickHouse/pull/11354) ([alesapin](https://github.com/alesapin)). +* Fix support for `\G` (vertical output) in clickhouse-client in multiline mode. This closes [#9933](https://github.com/ClickHouse/ClickHouse/issues/9933). [#11350](https://github.com/ClickHouse/ClickHouse/pull/11350) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix potential segfault when using `Lazy` database. [#11348](https://github.com/ClickHouse/ClickHouse/pull/11348) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix crash in `quantilesExactWeightedArray`. [#11337](https://github.com/ClickHouse/ClickHouse/pull/11337) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Now merges stopped before change metadata in `ALTER` queries. [#11335](https://github.com/ClickHouse/ClickHouse/pull/11335) ([alesapin](https://github.com/alesapin)). +* Make writing to `MATERIALIZED VIEW` with setting `parallel_view_processing = 1` parallel again. Fixes [#10241](https://github.com/ClickHouse/ClickHouse/issues/10241). [#11330](https://github.com/ClickHouse/ClickHouse/pull/11330) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix visitParamExtractRaw when extracted JSON has strings with unbalanced { or [. [#11318](https://github.com/ClickHouse/ClickHouse/pull/11318) ([Ewout](https://github.com/devwout)). +* Fix very rare race condition in ThreadPool. [#11314](https://github.com/ClickHouse/ClickHouse/pull/11314) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix insignificant data race in clickhouse-copier. Found by integration tests. [#11313](https://github.com/ClickHouse/ClickHouse/pull/11313) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix potential uninitialized memory in conversion. Example: `SELECT toIntervalSecond(now64())`. [#11311](https://github.com/ClickHouse/ClickHouse/pull/11311) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix the issue when index analysis cannot work if a table has Array column in primary key and if a query is filtering by this column with `empty` or `notEmpty` functions. This fixes [#11286](https://github.com/ClickHouse/ClickHouse/issues/11286). [#11303](https://github.com/ClickHouse/ClickHouse/pull/11303) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix bug when query speed estimation can be incorrect and the limit of `min_execution_speed` may not work or work incorrectly if the query is throttled by `max_network_bandwidth`, `max_execution_speed` or `priority` settings. Change the default value of `timeout_before_checking_execution_speed` to non-zero, because otherwise the settings `min_execution_speed` and `max_execution_speed` have no effect. This fixes [#11297](https://github.com/ClickHouse/ClickHouse/issues/11297). This fixes [#5732](https://github.com/ClickHouse/ClickHouse/issues/5732). This fixes [#6228](https://github.com/ClickHouse/ClickHouse/issues/6228). Usability improvement: avoid concatenation of exception message with progress bar in `clickhouse-client`. [#11296](https://github.com/ClickHouse/ClickHouse/pull/11296) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix crash when SET DEFAULT ROLE is called with wrong arguments. This fixes [#10586](https://github.com/ClickHouse/ClickHouse/issues/10586). [#11278](https://github.com/ClickHouse/ClickHouse/pull/11278) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix crash while reading malformed data in Protobuf format. This fixes [#5957](https://github.com/ClickHouse/ClickHouse/issues/5957), fixes [#11203](https://github.com/ClickHouse/ClickHouse/issues/11203). [#11258](https://github.com/ClickHouse/ClickHouse/pull/11258) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed a bug when cache-dictionary could return default value instead of normal (when there are only expired keys). This affects only string fields. [#11233](https://github.com/ClickHouse/ClickHouse/pull/11233) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix error `Block structure mismatch in QueryPipeline` while reading from `VIEW` with constants in inner query. Fixes [#11181](https://github.com/ClickHouse/ClickHouse/issues/11181). [#11205](https://github.com/ClickHouse/ClickHouse/pull/11205) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix possible exception `Invalid status for associated output`. [#11200](https://github.com/ClickHouse/ClickHouse/pull/11200) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix possible error `Cannot capture column` for higher-order functions with `Array(Array(LowCardinality))` captured argument. [#11185](https://github.com/ClickHouse/ClickHouse/pull/11185) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed S3 globbing which could fail in case of more than 1000 keys and some backends. [#11179](https://github.com/ClickHouse/ClickHouse/pull/11179) ([Vladimir Chebotarev](https://github.com/excitoon)). +* If data skipping index is dependent on columns that are going to be modified during background merge (for SummingMergeTree, AggregatingMergeTree as well as for TTL GROUP BY), it was calculated incorrectly. This issue is fixed by moving index calculation after merge so the index is calculated on merged data. [#11162](https://github.com/ClickHouse/ClickHouse/pull/11162) ([Azat Khuzhin](https://github.com/azat)). +* Fix Kafka performance issue related to reschedules based on limits, which were always applied. [#11149](https://github.com/ClickHouse/ClickHouse/pull/11149) ([filimonov](https://github.com/filimonov)). +* Fix for the hang which was happening sometimes during DROP of table engine=Kafka (or during server restarts). [#11145](https://github.com/ClickHouse/ClickHouse/pull/11145) ([filimonov](https://github.com/filimonov)). +* Fix excessive reserving of threads for simple queries (optimization for reducing the number of threads, which was partly broken after changes in pipeline). [#11114](https://github.com/ClickHouse/ClickHouse/pull/11114) ([Azat Khuzhin](https://github.com/azat)). +* Fix predicates optimization for distributed queries (`enable_optimize_predicate_expression=1`) for queries with `HAVING` section (i.e. when filtering on the server initiator is required), by preserving the order of expressions (and this is enough to fix), and also force aggregator use column names over indexes. Fixes: [#10613](https://github.com/ClickHouse/ClickHouse/issues/10613), [#11413](https://github.com/ClickHouse/ClickHouse/issues/11413). [#10621](https://github.com/ClickHouse/ClickHouse/pull/10621) ([Azat Khuzhin](https://github.com/azat)). + +#### Build/Testing/Packaging Improvement + +* Fix several flaky integration tests. [#11355](https://github.com/ClickHouse/ClickHouse/pull/11355) ([alesapin](https://github.com/alesapin)). + +### ClickHouse release v20.4.4.18-stable 2020-05-26 + +No changes compared to v20.4.3.16-stable. + +### ClickHouse release v20.4.3.16-stable 2020-05-23 + +#### Bug Fix + +* Removed logging from mutation finalization task if nothing was finalized. [#11109](https://github.com/ClickHouse/ClickHouse/pull/11109) ([alesapin](https://github.com/alesapin)). +* Fixed memory leak in registerDiskS3. [#11074](https://github.com/ClickHouse/ClickHouse/pull/11074) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fixed the potential missed data during termination of Kafka engine table. [#11048](https://github.com/ClickHouse/ClickHouse/pull/11048) ([filimonov](https://github.com/filimonov)). +* Fixed `parseDateTime64BestEffort` argument resolution bugs. [#11038](https://github.com/ClickHouse/ClickHouse/pull/11038) ([Vasily Nemkov](https://github.com/Enmk)). +* Fixed very rare potential use-after-free error in `MergeTree` if table was not created successfully. [#10986](https://github.com/ClickHouse/ClickHouse/pull/10986), [#10970](https://github.com/ClickHouse/ClickHouse/pull/10970) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed metadata (relative path for rename) and data (relative path for symlink) handling for Atomic database. [#10980](https://github.com/ClickHouse/ClickHouse/pull/10980) ([Azat Khuzhin](https://github.com/azat)). +* Fixed server crash on concurrent `ALTER` and `DROP DATABASE` queries with `Atomic` database engine. [#10968](https://github.com/ClickHouse/ClickHouse/pull/10968) ([tavplubix](https://github.com/tavplubix)). +* Fixed incorrect raw data size in `getRawData()` method. [#10964](https://github.com/ClickHouse/ClickHouse/pull/10964) ([Igr](https://github.com/ObjatieGroba)). +* Fixed incompatibility of two-level aggregation between versions 20.1 and earlier. This incompatibility happens when different versions of ClickHouse are used on initiator node and remote nodes and the size of GROUP BY result is large and aggregation is performed by a single String field. It leads to several unmerged rows for a single key in result. [#10952](https://github.com/ClickHouse/ClickHouse/pull/10952) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed sending partially written files by the `DistributedBlockOutputStream`. [#10940](https://github.com/ClickHouse/ClickHouse/pull/10940) ([Azat Khuzhin](https://github.com/azat)). +* Fixed crash in `SELECT count(notNullIn(NULL, []))`. [#10920](https://github.com/ClickHouse/ClickHouse/pull/10920) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed the hang which was happening sometimes during `DROP` of `Kafka` table engine. (or during server restarts). [#10910](https://github.com/ClickHouse/ClickHouse/pull/10910) ([filimonov](https://github.com/filimonov)). +* Fixed the impossibility of executing multiple `ALTER RENAME` like `a TO b, c TO a`. [#10895](https://github.com/ClickHouse/ClickHouse/pull/10895) ([alesapin](https://github.com/alesapin)). +* Fixed possible race which could happen when you get result from aggregate function state from multiple thread for the same column. The only way it can happen is when you use `finalizeAggregation` function while reading from table with `Memory` engine which stores `AggregateFunction` state for `quantile*` function. [#10890](https://github.com/ClickHouse/ClickHouse/pull/10890) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed backward compatibility with tuples in Distributed tables. [#10889](https://github.com/ClickHouse/ClickHouse/pull/10889) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed `SIGSEGV` in `StringHashTable` if such a key does not exist. [#10870](https://github.com/ClickHouse/ClickHouse/pull/10870) ([Azat Khuzhin](https://github.com/azat)). +* Fixed `WATCH` hangs after `LiveView` table was dropped from database with `Atomic` engine. [#10859](https://github.com/ClickHouse/ClickHouse/pull/10859) ([tavplubix](https://github.com/tavplubix)). +* Fixed bug in `ReplicatedMergeTree` which might cause some `ALTER` on `OPTIMIZE` query to hang waiting for some replica after it become inactive. [#10849](https://github.com/ClickHouse/ClickHouse/pull/10849) ([tavplubix](https://github.com/tavplubix)). +* Now constraints are updated if the column participating in `CONSTRAINT` expression was renamed. Fixes [#10844](https://github.com/ClickHouse/ClickHouse/issues/10844). [#10847](https://github.com/ClickHouse/ClickHouse/pull/10847) ([alesapin](https://github.com/alesapin)). +* Fixed potential read of uninitialized memory in cache-dictionary. [#10834](https://github.com/ClickHouse/ClickHouse/pull/10834) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed columns order after `Block::sortColumns()`. [#10826](https://github.com/ClickHouse/ClickHouse/pull/10826) ([Azat Khuzhin](https://github.com/azat)). +* Fixed the issue with `ODBC` bridge when no quoting of identifiers is requested. Fixes [#7984](https://github.com/ClickHouse/ClickHouse/issues/7984). [#10821](https://github.com/ClickHouse/ClickHouse/pull/10821) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `UBSan` and `MSan` report in `DateLUT`. [#10798](https://github.com/ClickHouse/ClickHouse/pull/10798) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed incorrect type conversion in key conditions. Fixes [#6287](https://github.com/ClickHouse/ClickHouse/issues/6287). [#10791](https://github.com/ClickHouse/ClickHouse/pull/10791) ([Andrew Onyshchuk](https://github.com/oandrew)). +* Fixed `parallel_view_processing` behavior. Now all insertions into `MATERIALIZED VIEW` without exception should be finished if exception happened. Fixes [#10241](https://github.com/ClickHouse/ClickHouse/issues/10241). [#10757](https://github.com/ClickHouse/ClickHouse/pull/10757) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed combinator `-OrNull` and `-OrDefault` when combined with `-State`. [#10741](https://github.com/ClickHouse/ClickHouse/pull/10741) ([hcz](https://github.com/hczhcz)). +* Fixed possible buffer overflow in function `h3EdgeAngle`. [#10711](https://github.com/ClickHouse/ClickHouse/pull/10711) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed bug which locks concurrent alters when table has a lot of parts. [#10659](https://github.com/ClickHouse/ClickHouse/pull/10659) ([alesapin](https://github.com/alesapin)). +* Fixed `nullptr` dereference in `StorageBuffer` if server was shutdown before table startup. [#10641](https://github.com/ClickHouse/ClickHouse/pull/10641) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `optimize_skip_unused_shards` with `LowCardinality`. [#10611](https://github.com/ClickHouse/ClickHouse/pull/10611) ([Azat Khuzhin](https://github.com/azat)). +* Fixed handling condition variable for synchronous mutations. In some cases signals to that condition variable could be lost. [#10588](https://github.com/ClickHouse/ClickHouse/pull/10588) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fixed possible crash when `createDictionary()` is called before `loadStoredObject()` has finished. [#10587](https://github.com/ClickHouse/ClickHouse/pull/10587) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed `SELECT` of column `ALIAS` which default expression type different from column type. [#10563](https://github.com/ClickHouse/ClickHouse/pull/10563) ([Azat Khuzhin](https://github.com/azat)). +* Implemented comparison between DateTime64 and String values. [#10560](https://github.com/ClickHouse/ClickHouse/pull/10560) ([Vasily Nemkov](https://github.com/Enmk)). +* Disable `GROUP BY` sharding_key optimization by default (`optimize_distributed_group_by_sharding_key` had been introduced and turned of by default, due to trickery of sharding_key analyzing, simple example is `if` in sharding key) and fix it for `WITH ROLLUP/CUBE/TOTALS`. [#10516](https://github.com/ClickHouse/ClickHouse/pull/10516) ([Azat Khuzhin](https://github.com/azat)). +* Fixed [#10263](https://github.com/ClickHouse/ClickHouse/issues/10263). [#10486](https://github.com/ClickHouse/ClickHouse/pull/10486) ([Azat Khuzhin](https://github.com/azat)). +* Added tests about `max_rows_to_sort` setting. [#10268](https://github.com/ClickHouse/ClickHouse/pull/10268) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added backward compatibility for create bloom filter index. [#10551](https://github.com/ClickHouse/ClickHouse/issues/10551). [#10569](https://github.com/ClickHouse/ClickHouse/pull/10569) ([Winter Zhang](https://github.com/zhang2014)). + +### ClickHouse release v20.4.2.9, 2020-05-12 + +#### Backward Incompatible Change +* System tables (e.g. system.query_log, system.trace_log, system.metric_log) are using compact data part format for parts smaller than 10 MiB in size. Compact data part format is supported since version 20.3. If you are going to downgrade to version less than 20.3, you should manually delete table data for system logs in `/var/lib/clickhouse/data/system/`. +* When string comparison involves FixedString and compared arguments are of different sizes, do comparison as if smaller string is padded to the length of the larger. This is intented for SQL compatibility if we imagine that FixedString data type corresponds to SQL CHAR. This closes [#9272](https://github.com/ClickHouse/ClickHouse/issues/9272). [#10363](https://github.com/ClickHouse/ClickHouse/pull/10363) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Make SHOW CREATE TABLE multiline. Now it is more readable and more like MySQL. [#10049](https://github.com/ClickHouse/ClickHouse/pull/10049) ([Azat Khuzhin](https://github.com/azat)) +* Added a setting `validate_polygons` that is used in `pointInPolygon` function and enabled by default. [#9857](https://github.com/ClickHouse/ClickHouse/pull/9857) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### New Feature +* Add support for secured connection from ClickHouse to Zookeeper [#10184](https://github.com/ClickHouse/ClickHouse/pull/10184) ([Konstantin Lebedev](https://github.com/xzkostyan)) +* Support custom HTTP handlers. See [#5436](https://github.com/ClickHouse/ClickHouse/issues/5436) for description. [#7572](https://github.com/ClickHouse/ClickHouse/pull/7572) ([Winter Zhang](https://github.com/zhang2014)) +* Add MessagePack Input/Output format. [#9889](https://github.com/ClickHouse/ClickHouse/pull/9889) ([Kruglov Pavel](https://github.com/Avogar)) +* Add Regexp input format. [#9196](https://github.com/ClickHouse/ClickHouse/pull/9196) ([Kruglov Pavel](https://github.com/Avogar)) +* Added output format `Markdown` for embedding tables in markdown documents. [#10317](https://github.com/ClickHouse/ClickHouse/pull/10317) ([Kruglov Pavel](https://github.com/Avogar)) +* Added support for custom settings section in dictionaries. Also fixes issue [#2829](https://github.com/ClickHouse/ClickHouse/issues/2829). [#10137](https://github.com/ClickHouse/ClickHouse/pull/10137) ([Artem Streltsov](https://github.com/kekekekule)) +* Added custom settings support in DDL-queries for `CREATE DICTIONARY` [#10465](https://github.com/ClickHouse/ClickHouse/pull/10465) ([Artem Streltsov](https://github.com/kekekekule)) +* Add simple server-wide memory profiler that will collect allocation contexts when server memory usage becomes higher than the next allocation threshold. [#10444](https://github.com/ClickHouse/ClickHouse/pull/10444) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add setting `always_fetch_merged_part` which restrict replica to merge parts by itself and always prefer dowloading from other replicas. [#10379](https://github.com/ClickHouse/ClickHouse/pull/10379) ([alesapin](https://github.com/alesapin)) +* Add function `JSONExtractKeysAndValuesRaw` which extracts raw data from JSON objects [#10378](https://github.com/ClickHouse/ClickHouse/pull/10378) ([hcz](https://github.com/hczhcz)) +* Add memory usage from OS to `system.asynchronous_metrics`. [#10361](https://github.com/ClickHouse/ClickHouse/pull/10361) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added generic variants for functions `least` and `greatest`. Now they work with arbitrary number of arguments of arbitrary types. This fixes [#4767](https://github.com/ClickHouse/ClickHouse/issues/4767) [#10318](https://github.com/ClickHouse/ClickHouse/pull/10318) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Now ClickHouse controls timeouts of dictionary sources on its side. Two new settings added to cache dictionary configuration: `strict_max_lifetime_seconds`, which is `max_lifetime` by default, and `query_wait_timeout_milliseconds`, which is one minute by default. The first settings is also useful with `allow_read_expired_keys` settings (to forbid reading very expired keys). [#10337](https://github.com/ClickHouse/ClickHouse/pull/10337) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Add log_queries_min_type to filter which entries will be written to query_log [#10053](https://github.com/ClickHouse/ClickHouse/pull/10053) ([Azat Khuzhin](https://github.com/azat)) +* Added function `isConstant`. This function checks whether its argument is constant expression and returns 1 or 0. It is intended for development, debugging and demonstration purposes. [#10198](https://github.com/ClickHouse/ClickHouse/pull/10198) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* add joinGetOrNull to return NULL when key is missing instead of returning the default value. [#10094](https://github.com/ClickHouse/ClickHouse/pull/10094) ([Amos Bird](https://github.com/amosbird)) +* Consider `NULL` to be equal to `NULL` in `IN` operator, if the option `transform_null_in` is set. [#10085](https://github.com/ClickHouse/ClickHouse/pull/10085) ([achimbab](https://github.com/achimbab)) +* Add `ALTER TABLE ... RENAME COLUMN` for MergeTree table engines family. [#9948](https://github.com/ClickHouse/ClickHouse/pull/9948) ([alesapin](https://github.com/alesapin)) +* Support parallel distributed INSERT SELECT. [#9759](https://github.com/ClickHouse/ClickHouse/pull/9759) ([vxider](https://github.com/Vxider)) +* Add ability to query Distributed over Distributed (w/o `distributed_group_by_no_merge`) ... [#9923](https://github.com/ClickHouse/ClickHouse/pull/9923) ([Azat Khuzhin](https://github.com/azat)) +* Add function `arrayReduceInRanges` which aggregates array elements in given ranges. [#9598](https://github.com/ClickHouse/ClickHouse/pull/9598) ([hcz](https://github.com/hczhcz)) +* Add Dictionary Status on prometheus exporter. [#9622](https://github.com/ClickHouse/ClickHouse/pull/9622) ([Guillaume Tassery](https://github.com/YiuRULE)) +* Add function `arrayAUC` [#8698](https://github.com/ClickHouse/ClickHouse/pull/8698) ([taiyang-li](https://github.com/taiyang-li)) +* Support `DROP VIEW` statement for better TPC-H compatibility. [#9831](https://github.com/ClickHouse/ClickHouse/pull/9831) ([Amos Bird](https://github.com/amosbird)) +* Add 'strict_order' option to windowFunnel() [#9773](https://github.com/ClickHouse/ClickHouse/pull/9773) ([achimbab](https://github.com/achimbab)) +* Support `DATE` and `TIMESTAMP` SQL operators, e.g. `SELECT date '2001-01-01'` [#9691](https://github.com/ClickHouse/ClickHouse/pull/9691) ([Artem Zuikov](https://github.com/4ertus2)) + +#### Experimental Feature +* Added experimental database engine Atomic. It supports non-blocking `DROP` and `RENAME TABLE` queries and atomic `EXCHANGE TABLES t1 AND t2` query [#7512](https://github.com/ClickHouse/ClickHouse/pull/7512) ([tavplubix](https://github.com/tavplubix)) +* Initial support for ReplicatedMergeTree over S3 (it works in suboptimal way) [#10126](https://github.com/ClickHouse/ClickHouse/pull/10126) ([Pavel Kovalenko](https://github.com/Jokser)) + +#### Bug Fix +* Fixed incorrect scalar results inside inner query of `MATERIALIZED VIEW` in case if this query contained dependent table [#10603](https://github.com/ClickHouse/ClickHouse/pull/10603) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fixed bug, which caused HTTP requests to get stuck on client closing connection when `readonly=2` and `cancel_http_readonly_queries_on_client_close=1`. [#10684](https://github.com/ClickHouse/ClickHouse/pull/10684) ([tavplubix](https://github.com/tavplubix)) +* Fix segfault in StorageBuffer when exception is thrown on server startup. Fixes [#10550](https://github.com/ClickHouse/ClickHouse/issues/10550) [#10609](https://github.com/ClickHouse/ClickHouse/pull/10609) ([tavplubix](https://github.com/tavplubix)) +* The query`SYSTEM DROP DNS CACHE` now also drops caches used to check if user is allowed to connect from some IP addresses [#10608](https://github.com/ClickHouse/ClickHouse/pull/10608) ([tavplubix](https://github.com/tavplubix)) +* Fix usage of multiple `IN` operators with an identical set in one query. Fixes [#10539](https://github.com/ClickHouse/ClickHouse/issues/10539) [#10686](https://github.com/ClickHouse/ClickHouse/pull/10686) ([Anton Popov](https://github.com/CurtizJ)) +* Fix crash in `generateRandom` with nested types. Fixes [#10583](https://github.com/ClickHouse/ClickHouse/issues/10583). [#10734](https://github.com/ClickHouse/ClickHouse/pull/10734) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix data corruption for `LowCardinality(FixedString)` key column in `SummingMergeTree` which could have happened after merge. Fixes [#10489](https://github.com/ClickHouse/ClickHouse/issues/10489). [#10721](https://github.com/ClickHouse/ClickHouse/pull/10721) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix logic for aggregation_memory_efficient_merge_threads setting. [#10667](https://github.com/ClickHouse/ClickHouse/pull/10667) ([palasonic1](https://github.com/palasonic1)) +* Fix disappearing totals. Totals could have being filtered if query had `JOIN` or subquery with external `WHERE` condition. Fixes [#10674](https://github.com/ClickHouse/ClickHouse/issues/10674) [#10698](https://github.com/ClickHouse/ClickHouse/pull/10698) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix the lack of parallel execution of remote queries with `distributed_aggregation_memory_efficient` enabled. Fixes [#10655](https://github.com/ClickHouse/ClickHouse/issues/10655) [#10664](https://github.com/ClickHouse/ClickHouse/pull/10664) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix possible incorrect number of rows for queries with `LIMIT`. Fixes [#10566](https://github.com/ClickHouse/ClickHouse/issues/10566), [#10709](https://github.com/ClickHouse/ClickHouse/issues/10709) [#10660](https://github.com/ClickHouse/ClickHouse/pull/10660) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix index corruption, which may occur in some cases after merging compact parts into another compact part. [#10531](https://github.com/ClickHouse/ClickHouse/pull/10531) ([Anton Popov](https://github.com/CurtizJ)) +* Fix the situation, when mutation finished all parts, but hung up in `is_done=0`. [#10526](https://github.com/ClickHouse/ClickHouse/pull/10526) ([alesapin](https://github.com/alesapin)) +* Fix overflow at beginning of unix epoch for timezones with fractional offset from UTC. Fixes [#9335](https://github.com/ClickHouse/ClickHouse/issues/9335). [#10513](https://github.com/ClickHouse/ClickHouse/pull/10513) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Better diagnostics for input formats. Fixes [#10204](https://github.com/ClickHouse/ClickHouse/issues/10204) [#10418](https://github.com/ClickHouse/ClickHouse/pull/10418) ([tavplubix](https://github.com/tavplubix)) +* Fix numeric overflow in `simpleLinearRegression()` over large integers [#10474](https://github.com/ClickHouse/ClickHouse/pull/10474) ([hcz](https://github.com/hczhcz)) +* Fix use-after-free in Distributed shutdown, avoid waiting for sending all batches [#10491](https://github.com/ClickHouse/ClickHouse/pull/10491) ([Azat Khuzhin](https://github.com/azat)) +* Add CA certificates to clickhouse-server docker image [#10476](https://github.com/ClickHouse/ClickHouse/pull/10476) ([filimonov](https://github.com/filimonov)) +* Fix a rare endless loop that might have occurred when using the `addressToLine` function or AggregateFunctionState columns. [#10466](https://github.com/ClickHouse/ClickHouse/pull/10466) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Handle zookeeper "no node error" during distributed query [#10050](https://github.com/ClickHouse/ClickHouse/pull/10050) ([Daniel Chen](https://github.com/Phantomape)) +* Fix bug when server cannot attach table after column's default was altered. [#10441](https://github.com/ClickHouse/ClickHouse/pull/10441) ([alesapin](https://github.com/alesapin)) +* Implicitly cast the default expression type to the column type for the ALIAS columns [#10563](https://github.com/ClickHouse/ClickHouse/pull/10563) ([Azat Khuzhin](https://github.com/azat)) +* Don't remove metadata directory if `ATTACH DATABASE` fails [#10442](https://github.com/ClickHouse/ClickHouse/pull/10442) ([Winter Zhang](https://github.com/zhang2014)) +* Avoid dependency on system tzdata. Fixes loading of `Africa/Casablanca` timezone on CentOS 8. Fixes [#10211](https://github.com/ClickHouse/ClickHouse/issues/10211) [#10425](https://github.com/ClickHouse/ClickHouse/pull/10425) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix some issues if data is inserted with quorum and then gets deleted (DROP PARTITION, TTL, etc.). It led to stuck of INSERTs or false-positive exceptions in SELECTs. Fixes [#9946](https://github.com/ClickHouse/ClickHouse/issues/9946) [#10188](https://github.com/ClickHouse/ClickHouse/pull/10188) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Check the number and type of arguments when creating BloomFilter index [#9623](https://github.com/ClickHouse/ClickHouse/issues/9623) [#10431](https://github.com/ClickHouse/ClickHouse/pull/10431) ([Winter Zhang](https://github.com/zhang2014)) +* Prefer `fallback_to_stale_replicas` over `skip_unavailable_shards`, otherwise when both settings specified and there are no up-to-date replicas the query will fail (patch from @alex-zaitsev ) [#10422](https://github.com/ClickHouse/ClickHouse/pull/10422) ([Azat Khuzhin](https://github.com/azat)) +* Fix the issue when a query with ARRAY JOIN, ORDER BY and LIMIT may return incomplete result. Fixes [#10226](https://github.com/ClickHouse/ClickHouse/issues/10226). [#10427](https://github.com/ClickHouse/ClickHouse/pull/10427) ([Vadim Plakhtinskiy](https://github.com/VadimPlh)) +* Add database name to dictionary name after DETACH/ATTACH. Fixes system.dictionaries table and `SYSTEM RELOAD` query [#10415](https://github.com/ClickHouse/ClickHouse/pull/10415) ([Azat Khuzhin](https://github.com/azat)) +* Fix possible incorrect result for extremes in processors pipeline. [#10131](https://github.com/ClickHouse/ClickHouse/pull/10131) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix possible segfault when the setting `distributed_group_by_no_merge` is enabled (introduced in 20.3.7.46 by [#10131](https://github.com/ClickHouse/ClickHouse/issues/10131)). [#10399](https://github.com/ClickHouse/ClickHouse/pull/10399) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix wrong flattening of `Array(Tuple(...))` data types. Fixes [#10259](https://github.com/ClickHouse/ClickHouse/issues/10259) [#10390](https://github.com/ClickHouse/ClickHouse/pull/10390) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix column names of constants inside JOIN that may clash with names of constants outside of JOIN [#9950](https://github.com/ClickHouse/ClickHouse/pull/9950) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Fix order of columns after Block::sortColumns() [#10826](https://github.com/ClickHouse/ClickHouse/pull/10826) ([Azat Khuzhin](https://github.com/azat)) +* Fix possible `Pipeline stuck` error in `ConcatProcessor` which may happen in remote query. [#10381](https://github.com/ClickHouse/ClickHouse/pull/10381) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Don't make disk reservations for aggregations. Fixes [#9241](https://github.com/ClickHouse/ClickHouse/issues/9241) [#10375](https://github.com/ClickHouse/ClickHouse/pull/10375) ([Azat Khuzhin](https://github.com/azat)) +* Fix wrong behaviour of datetime functions for timezones that has altered between positive and negative offsets from UTC (e.g. Pacific/Kiritimati). Fixes [#7202](https://github.com/ClickHouse/ClickHouse/issues/7202) [#10369](https://github.com/ClickHouse/ClickHouse/pull/10369) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Avoid infinite loop in `dictIsIn` function. Fixes #515 [#10365](https://github.com/ClickHouse/ClickHouse/pull/10365) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Disable GROUP BY sharding_key optimization by default and fix it for WITH ROLLUP/CUBE/TOTALS [#10516](https://github.com/ClickHouse/ClickHouse/pull/10516) ([Azat Khuzhin](https://github.com/azat)) +* Check for error code when checking parts and don't mark part as broken if the error is like "not enough memory". Fixes [#6269](https://github.com/ClickHouse/ClickHouse/issues/6269) [#10364](https://github.com/ClickHouse/ClickHouse/pull/10364) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Show information about not loaded dictionaries in system tables. [#10234](https://github.com/ClickHouse/ClickHouse/pull/10234) ([Vitaly Baranov](https://github.com/vitlibar)) +* Fix nullptr dereference in StorageBuffer if server was shutdown before table startup. [#10641](https://github.com/ClickHouse/ClickHouse/pull/10641) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fixed `DROP` vs `OPTIMIZE` race in `ReplicatedMergeTree`. `DROP` could left some garbage in replica path in ZooKeeper if there was concurrent `OPTIMIZE` query. [#10312](https://github.com/ClickHouse/ClickHouse/pull/10312) ([tavplubix](https://github.com/tavplubix)) +* Fix 'Logical error: CROSS JOIN has expressions' error for queries with comma and names joins mix. Fixes [#9910](https://github.com/ClickHouse/ClickHouse/issues/9910) [#10311](https://github.com/ClickHouse/ClickHouse/pull/10311) ([Artem Zuikov](https://github.com/4ertus2)) +* Fix queries with `max_bytes_before_external_group_by`. [#10302](https://github.com/ClickHouse/ClickHouse/pull/10302) ([Artem Zuikov](https://github.com/4ertus2)) +* Fix the issue with limiting maximum recursion depth in parser in certain cases. This fixes [#10283](https://github.com/ClickHouse/ClickHouse/issues/10283) This fix may introduce minor incompatibility: long and deep queries via clickhouse-client may refuse to work, and you should adjust settings `max_query_size` and `max_parser_depth` accordingly. [#10295](https://github.com/ClickHouse/ClickHouse/pull/10295) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Allow to use `count(*)` with multiple JOINs. Fixes [#9853](https://github.com/ClickHouse/ClickHouse/issues/9853) [#10291](https://github.com/ClickHouse/ClickHouse/pull/10291) ([Artem Zuikov](https://github.com/4ertus2)) +* Fix error `Pipeline stuck` with `max_rows_to_group_by` and `group_by_overflow_mode = 'break'`. [#10279](https://github.com/ClickHouse/ClickHouse/pull/10279) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix 'Cannot add column' error while creating `range_hashed` dictionary using DDL query. Fixes [#10093](https://github.com/ClickHouse/ClickHouse/issues/10093). [#10235](https://github.com/ClickHouse/ClickHouse/pull/10235) ([alesapin](https://github.com/alesapin)) +* Fix rare possible exception `Cannot drain connections: cancel first`. [#10239](https://github.com/ClickHouse/ClickHouse/pull/10239) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fixed bug where ClickHouse would throw "Unknown function lambda." error message when user tries to run ALTER UPDATE/DELETE on tables with ENGINE = Replicated*. Check for nondeterministic functions now handles lambda expressions correctly. [#10237](https://github.com/ClickHouse/ClickHouse/pull/10237) ([Alexander Kazakov](https://github.com/Akazz)) +* Fixed reasonably rare segfault in StorageSystemTables that happens when SELECT ... FROM system.tables is run on a database with Lazy engine. [#10209](https://github.com/ClickHouse/ClickHouse/pull/10209) ([Alexander Kazakov](https://github.com/Akazz)) +* Fix possible infinite query execution when the query actually should stop on LIMIT, while reading from infinite source like `system.numbers` or `system.zeros`. [#10206](https://github.com/ClickHouse/ClickHouse/pull/10206) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fixed "generateRandom" function for Date type. This fixes [#9973](https://github.com/ClickHouse/ClickHouse/issues/9973). Fix an edge case when dates with year 2106 are inserted to MergeTree tables with old-style partitioning but partitions are named with year 1970. [#10218](https://github.com/ClickHouse/ClickHouse/pull/10218) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Convert types if the table definition of a View does not correspond to the SELECT query. This fixes [#10180](https://github.com/ClickHouse/ClickHouse/issues/10180) and [#10022](https://github.com/ClickHouse/ClickHouse/issues/10022) [#10217](https://github.com/ClickHouse/ClickHouse/pull/10217) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix `parseDateTimeBestEffort` for strings in RFC-2822 when day of week is Tuesday or Thursday. This fixes [#10082](https://github.com/ClickHouse/ClickHouse/issues/10082) [#10214](https://github.com/ClickHouse/ClickHouse/pull/10214) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix column names of constants inside JOIN that may clash with names of constants outside of JOIN. [#10207](https://github.com/ClickHouse/ClickHouse/pull/10207) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix move-to-prewhere optimization in presense of arrayJoin functions (in certain cases). This fixes [#10092](https://github.com/ClickHouse/ClickHouse/issues/10092) [#10195](https://github.com/ClickHouse/ClickHouse/pull/10195) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix issue with separator appearing in SCRAMBLE for native mysql-connector-java (JDBC) [#10140](https://github.com/ClickHouse/ClickHouse/pull/10140) ([BohuTANG](https://github.com/BohuTANG)) +* Fix using the current database for an access checking when the database isn't specified. [#10192](https://github.com/ClickHouse/ClickHouse/pull/10192) ([Vitaly Baranov](https://github.com/vitlibar)) +* Fix ALTER of tables with compact parts. [#10130](https://github.com/ClickHouse/ClickHouse/pull/10130) ([Anton Popov](https://github.com/CurtizJ)) +* Add the ability to relax the restriction on non-deterministic functions usage in mutations with `allow_nondeterministic_mutations` setting. [#10186](https://github.com/ClickHouse/ClickHouse/pull/10186) ([filimonov](https://github.com/filimonov)) +* Fix `DROP TABLE` invoked for dictionary [#10165](https://github.com/ClickHouse/ClickHouse/pull/10165) ([Azat Khuzhin](https://github.com/azat)) +* Convert blocks if structure does not match when doing `INSERT` into Distributed table [#10135](https://github.com/ClickHouse/ClickHouse/pull/10135) ([Azat Khuzhin](https://github.com/azat)) +* The number of rows was logged incorrectly (as sum across all parts) when inserted block is split by parts with partition key. [#10138](https://github.com/ClickHouse/ClickHouse/pull/10138) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add some arguments check and support identifier arguments for MySQL Database Engine [#10077](https://github.com/ClickHouse/ClickHouse/pull/10077) ([Winter Zhang](https://github.com/zhang2014)) +* Fix incorrect `index_granularity_bytes` check while creating new replica. Fixes [#10098](https://github.com/ClickHouse/ClickHouse/issues/10098). [#10121](https://github.com/ClickHouse/ClickHouse/pull/10121) ([alesapin](https://github.com/alesapin)) +* Fix bug in `CHECK TABLE` query when table contain skip indices. [#10068](https://github.com/ClickHouse/ClickHouse/pull/10068) ([alesapin](https://github.com/alesapin)) +* Fix Distributed-over-Distributed with the only one shard in a nested table [#9997](https://github.com/ClickHouse/ClickHouse/pull/9997) ([Azat Khuzhin](https://github.com/azat)) +* Fix possible rows loss for queries with `JOIN` and `UNION ALL`. Fixes [#9826](https://github.com/ClickHouse/ClickHouse/issues/9826), [#10113](https://github.com/ClickHouse/ClickHouse/issues/10113). ... [#10099](https://github.com/ClickHouse/ClickHouse/pull/10099) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix bug in dictionary when local clickhouse server is used as source. It may caused memory corruption if types in dictionary and source are not compatible. [#10071](https://github.com/ClickHouse/ClickHouse/pull/10071) ([alesapin](https://github.com/alesapin)) +* Fixed replicated tables startup when updating from an old ClickHouse version where `/table/replicas/replica_name/metadata` node does not exist. Fixes [#10037](https://github.com/ClickHouse/ClickHouse/issues/10037). [#10095](https://github.com/ClickHouse/ClickHouse/pull/10095) ([alesapin](https://github.com/alesapin)) +* Fix error `Cannot clone block with columns because block has 0 columns ... While executing GroupingAggregatedTransform`. It happened when setting `distributed_aggregation_memory_efficient` was enabled, and distributed query read aggregating data with mixed single and two-level aggregation from different shards. [#10063](https://github.com/ClickHouse/ClickHouse/pull/10063) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix deadlock when database with materialized view failed attach at start [#10054](https://github.com/ClickHouse/ClickHouse/pull/10054) ([Azat Khuzhin](https://github.com/azat)) +* Fix a segmentation fault that could occur in GROUP BY over string keys containing trailing zero bytes ([#8636](https://github.com/ClickHouse/ClickHouse/issues/8636), [#8925](https://github.com/ClickHouse/ClickHouse/issues/8925)). ... [#10025](https://github.com/ClickHouse/ClickHouse/pull/10025) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Fix wrong results of distributed queries when alias could override qualified column name. Fixes [#9672](https://github.com/ClickHouse/ClickHouse/issues/9672) [#9714](https://github.com/ClickHouse/ClickHouse/issues/9714) [#9972](https://github.com/ClickHouse/ClickHouse/pull/9972) ([Artem Zuikov](https://github.com/4ertus2)) +* Fix possible deadlock in `SYSTEM RESTART REPLICAS` [#9955](https://github.com/ClickHouse/ClickHouse/pull/9955) ([tavplubix](https://github.com/tavplubix)) +* Fix the number of threads used for remote query execution (performance regression, since 20.3). This happened when query from `Distributed` table was executed simultaneously on local and remote shards. Fixes [#9965](https://github.com/ClickHouse/ClickHouse/issues/9965) [#9971](https://github.com/ClickHouse/ClickHouse/pull/9971) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fixed `DeleteOnDestroy` logic in `ATTACH PART` which could lead to automatic removal of attached part and added few tests [#9410](https://github.com/ClickHouse/ClickHouse/pull/9410) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fix a bug with `ON CLUSTER` DDL queries freezing on server startup. [#9927](https://github.com/ClickHouse/ClickHouse/pull/9927) ([Gagan Arneja](https://github.com/garneja)) +* Fix bug in which the necessary tables weren't retrieved at one of the processing stages of queries to some databases. Fixes [#9699](https://github.com/ClickHouse/ClickHouse/issues/9699). [#9949](https://github.com/ClickHouse/ClickHouse/pull/9949) ([achulkov2](https://github.com/achulkov2)) +* Fix 'Not found column in block' error when `JOIN` appears with `TOTALS`. Fixes [#9839](https://github.com/ClickHouse/ClickHouse/issues/9839) [#9939](https://github.com/ClickHouse/ClickHouse/pull/9939) ([Artem Zuikov](https://github.com/4ertus2)) +* Fix parsing multiple hosts set in the CREATE USER command [#9924](https://github.com/ClickHouse/ClickHouse/pull/9924) ([Vitaly Baranov](https://github.com/vitlibar)) +* Fix `TRUNCATE` for Join table engine ([#9917](https://github.com/ClickHouse/ClickHouse/issues/9917)). [#9920](https://github.com/ClickHouse/ClickHouse/pull/9920) ([Amos Bird](https://github.com/amosbird)) +* Fix race condition between drop and optimize in `ReplicatedMergeTree`. [#9901](https://github.com/ClickHouse/ClickHouse/pull/9901) ([alesapin](https://github.com/alesapin)) +* Fix `DISTINCT` for Distributed when `optimize_skip_unused_shards` is set. [#9808](https://github.com/ClickHouse/ClickHouse/pull/9808) ([Azat Khuzhin](https://github.com/azat)) +* Fix "scalar does not exist" error in ALTERs ([#9878](https://github.com/ClickHouse/ClickHouse/issues/9878)). ... [#9904](https://github.com/ClickHouse/ClickHouse/pull/9904) ([Amos Bird](https://github.com/amosbird)) +* Fix error with qualified names in `distributed_product_mode=\'local\'`. Fixes [#4756](https://github.com/ClickHouse/ClickHouse/issues/4756) [#9891](https://github.com/ClickHouse/ClickHouse/pull/9891) ([Artem Zuikov](https://github.com/4ertus2)) +* For INSERT queries shards now do clamp the settings from the initiator to their constraints instead of throwing an exception. This fix allows to send INSERT queries to a shard with another constraints. This change improves fix [#9447](https://github.com/ClickHouse/ClickHouse/issues/9447). [#9852](https://github.com/ClickHouse/ClickHouse/pull/9852) ([Vitaly Baranov](https://github.com/vitlibar)) +* Add some retries when commiting offsets to Kafka broker, since it can reject commit if during `offsets.commit.timeout.ms` there were no enough replicas available for the `__consumer_offsets` topic [#9884](https://github.com/ClickHouse/ClickHouse/pull/9884) ([filimonov](https://github.com/filimonov)) +* Fix Distributed engine behavior when virtual columns of the underlying table used in `WHERE` [#9847](https://github.com/ClickHouse/ClickHouse/pull/9847) ([Azat Khuzhin](https://github.com/azat)) +* Fixed some cases when timezone of the function argument wasn't used properly. [#9574](https://github.com/ClickHouse/ClickHouse/pull/9574) ([Vasily Nemkov](https://github.com/Enmk)) +* Fix 'Different expressions with the same alias' error when query has PREWHERE and WHERE on distributed table and `SET distributed_product_mode = 'local'`. [#9871](https://github.com/ClickHouse/ClickHouse/pull/9871) ([Artem Zuikov](https://github.com/4ertus2)) +* Fix mutations excessive memory consumption for tables with a composite primary key. This fixes [#9850](https://github.com/ClickHouse/ClickHouse/issues/9850). [#9860](https://github.com/ClickHouse/ClickHouse/pull/9860) ([alesapin](https://github.com/alesapin)) +* Fix calculating grants for introspection functions from the setting `allow_introspection_functions`. [#9840](https://github.com/ClickHouse/ClickHouse/pull/9840) ([Vitaly Baranov](https://github.com/vitlibar)) +* Fix max_distributed_connections (w/ and w/o Processors) [#9673](https://github.com/ClickHouse/ClickHouse/pull/9673) ([Azat Khuzhin](https://github.com/azat)) +* Fix possible exception `Got 0 in totals chunk, expected 1` on client. It happened for queries with `JOIN` in case if right joined table had zero rows. Example: `select * from system.one t1 join system.one t2 on t1.dummy = t2.dummy limit 0 FORMAT TabSeparated;`. Fixes [#9777](https://github.com/ClickHouse/ClickHouse/issues/9777). ... [#9823](https://github.com/ClickHouse/ClickHouse/pull/9823) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix 'COMMA to CROSS JOIN rewriter is not enabled or cannot rewrite query' error in case of subqueries with COMMA JOIN out of tables lists (i.e. in WHERE). Fixes [#9782](https://github.com/ClickHouse/ClickHouse/issues/9782) [#9830](https://github.com/ClickHouse/ClickHouse/pull/9830) ([Artem Zuikov](https://github.com/4ertus2)) +* Fix server crashing when `optimize_skip_unused_shards` is set and expression for key can't be converted to its field type [#9804](https://github.com/ClickHouse/ClickHouse/pull/9804) ([Azat Khuzhin](https://github.com/azat)) +* Fix empty string handling in `splitByString`. [#9767](https://github.com/ClickHouse/ClickHouse/pull/9767) ([hcz](https://github.com/hczhcz)) +* Fix broken `ALTER TABLE DELETE COLUMN` query for compact parts. [#9779](https://github.com/ClickHouse/ClickHouse/pull/9779) ([alesapin](https://github.com/alesapin)) +* Fixed missing `rows_before_limit_at_least` for queries over http (with processors pipeline). Fixes [#9730](https://github.com/ClickHouse/ClickHouse/issues/9730) [#9757](https://github.com/ClickHouse/ClickHouse/pull/9757) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix excessive memory consumption in `ALTER` queries (mutations). This fixes [#9533](https://github.com/ClickHouse/ClickHouse/issues/9533) and [#9670](https://github.com/ClickHouse/ClickHouse/issues/9670). [#9754](https://github.com/ClickHouse/ClickHouse/pull/9754) ([alesapin](https://github.com/alesapin)) +* Fix possible permanent "Cannot schedule a task" error. [#9154](https://github.com/ClickHouse/ClickHouse/pull/9154) ([Azat Khuzhin](https://github.com/azat)) +* Fix bug in backquoting in external dictionaries DDL. Fixes [#9619](https://github.com/ClickHouse/ClickHouse/issues/9619). [#9734](https://github.com/ClickHouse/ClickHouse/pull/9734) ([alesapin](https://github.com/alesapin)) +* Fixed data race in `text_log`. It does not correspond to any real bug. [#9726](https://github.com/ClickHouse/ClickHouse/pull/9726) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix bug in a replication that does not allow replication to work if the user has executed mutations on the previous version. This fixes [#9645](https://github.com/ClickHouse/ClickHouse/issues/9645). [#9652](https://github.com/ClickHouse/ClickHouse/pull/9652) ([alesapin](https://github.com/alesapin)) +* Fixed incorrect internal function names for `sumKahan` and `sumWithOverflow`. It led to exception while using this functions in remote queries. [#9636](https://github.com/ClickHouse/ClickHouse/pull/9636) ([Azat Khuzhin](https://github.com/azat)) +* Add setting `use_compact_format_in_distributed_parts_names` which allows to write files for `INSERT` queries into `Distributed` table with more compact format. This fixes [#9647](https://github.com/ClickHouse/ClickHouse/issues/9647). [#9653](https://github.com/ClickHouse/ClickHouse/pull/9653) ([alesapin](https://github.com/alesapin)) +* Fix RIGHT and FULL JOIN with LowCardinality in JOIN keys. [#9610](https://github.com/ClickHouse/ClickHouse/pull/9610) ([Artem Zuikov](https://github.com/4ertus2)) +* Fix possible exceptions `Size of filter does not match size of column` and `Invalid number of rows in Chunk` in `MergeTreeRangeReader`. They could appear while executing `PREWHERE` in some cases. [#9612](https://github.com/ClickHouse/ClickHouse/pull/9612) ([Anton Popov](https://github.com/CurtizJ)) +* Allow `ALTER ON CLUSTER` of Distributed tables with internal replication. This fixes [#3268](https://github.com/ClickHouse/ClickHouse/issues/3268) [#9617](https://github.com/ClickHouse/ClickHouse/pull/9617) ([shinoi2](https://github.com/shinoi2)) +* Fix issue when timezone was not preserved if you write a simple arithmetic expression like `time + 1` (in contrast to an expression like `time + INTERVAL 1 SECOND`). This fixes [#5743](https://github.com/ClickHouse/ClickHouse/issues/5743) [#9323](https://github.com/ClickHouse/ClickHouse/pull/9323) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Improvement +* Use time zone when comparing DateTime with string literal. This fixes [#5206](https://github.com/ClickHouse/ClickHouse/issues/5206). [#10515](https://github.com/ClickHouse/ClickHouse/pull/10515) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Print verbose diagnostic info if Decimal value cannot be parsed from text input format. [#10205](https://github.com/ClickHouse/ClickHouse/pull/10205) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add tasks/memory metrics for distributed/buffer schedule pools [#10449](https://github.com/ClickHouse/ClickHouse/pull/10449) ([Azat Khuzhin](https://github.com/azat)) +* Display result as soon as it's ready for SELECT DISTINCT queries in clickhouse-local and HTTP interface. This fixes [#8951](https://github.com/ClickHouse/ClickHouse/issues/8951) [#9559](https://github.com/ClickHouse/ClickHouse/pull/9559) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Allow to use `SAMPLE OFFSET` query instead of `cityHash64(PRIMARY KEY) % N == n` for splitting in `clickhouse-copier`. To use this feature, pass `--experimental-use-sample-offset 1` as a command line argument. [#10414](https://github.com/ClickHouse/ClickHouse/pull/10414) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Allow to parse BOM in TSV if the first column cannot contain BOM in its value. This fixes [#10301](https://github.com/ClickHouse/ClickHouse/issues/10301) [#10424](https://github.com/ClickHouse/ClickHouse/pull/10424) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add Avro nested fields insert support [#10354](https://github.com/ClickHouse/ClickHouse/pull/10354) ([Andrew Onyshchuk](https://github.com/oandrew)) +* Allowed to alter column in non-modifying data mode when the same type is specified. [#10382](https://github.com/ClickHouse/ClickHouse/pull/10382) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Auto `distributed_group_by_no_merge` on GROUP BY sharding key (if `optimize_skip_unused_shards` is set) [#10341](https://github.com/ClickHouse/ClickHouse/pull/10341) ([Azat Khuzhin](https://github.com/azat)) +* Optimize queries with LIMIT/LIMIT BY/ORDER BY for distributed with GROUP BY sharding_key [#10373](https://github.com/ClickHouse/ClickHouse/pull/10373) ([Azat Khuzhin](https://github.com/azat)) +* Added a setting `max_server_memory_usage` to limit total memory usage of the server. The metric `MemoryTracking` is now calculated without a drift. The setting `max_memory_usage_for_all_queries` is now obsolete and does nothing. This closes [#10293](https://github.com/ClickHouse/ClickHouse/issues/10293). [#10362](https://github.com/ClickHouse/ClickHouse/pull/10362) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add config option `system_tables_lazy_load`. If it's set to false, then system tables with logs are loaded at the server startup. [Alexander Burmak](https://github.com/Alex-Burmak), [Svyatoslav Tkhon Il Pak](https://github.com/DeifyTheGod), [#9642](https://github.com/ClickHouse/ClickHouse/pull/9642) [#10359](https://github.com/ClickHouse/ClickHouse/pull/10359) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Use background thread pool (background_schedule_pool_size) for distributed sends [#10263](https://github.com/ClickHouse/ClickHouse/pull/10263) ([Azat Khuzhin](https://github.com/azat)) +* Use background thread pool for background buffer flushes. [#10315](https://github.com/ClickHouse/ClickHouse/pull/10315) ([Azat Khuzhin](https://github.com/azat)) +* Support for one special case of removing incompletely written parts. This fixes [#9940](https://github.com/ClickHouse/ClickHouse/issues/9940). [#10221](https://github.com/ClickHouse/ClickHouse/pull/10221) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Use isInjective() over manual list of such functions for GROUP BY optimization. [#10342](https://github.com/ClickHouse/ClickHouse/pull/10342) ([Azat Khuzhin](https://github.com/azat)) +* Avoid printing error message in log if client sends RST packet immediately on connect. It is typical behaviour of IPVS balancer with keepalived and VRRP. This fixes [#1851](https://github.com/ClickHouse/ClickHouse/issues/1851) [#10274](https://github.com/ClickHouse/ClickHouse/pull/10274) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Allow to parse `+inf` for floating point types. This closes [#1839](https://github.com/ClickHouse/ClickHouse/issues/1839) [#10272](https://github.com/ClickHouse/ClickHouse/pull/10272) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Implemented `generateRandom` table function for Nested types. This closes [#9903](https://github.com/ClickHouse/ClickHouse/issues/9903) [#10219](https://github.com/ClickHouse/ClickHouse/pull/10219) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Provide `max_allowed_packed` in MySQL compatibility interface that will help some clients to communicate with ClickHouse via MySQL protocol. [#10199](https://github.com/ClickHouse/ClickHouse/pull/10199) ([BohuTANG](https://github.com/BohuTANG)) +* Allow literals for GLOBAL IN (i.e. `SELECT * FROM remote('localhost', system.one) WHERE dummy global in (0)`) [#10196](https://github.com/ClickHouse/ClickHouse/pull/10196) ([Azat Khuzhin](https://github.com/azat)) +* Fix various small issues in interactive mode of clickhouse-client [#10194](https://github.com/ClickHouse/ClickHouse/pull/10194) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Avoid superfluous dictionaries load (system.tables, DROP/SHOW CREATE TABLE) [#10164](https://github.com/ClickHouse/ClickHouse/pull/10164) ([Azat Khuzhin](https://github.com/azat)) +* Update to RWLock: timeout parameter for getLock() + implementation reworked to be phase fair [#10073](https://github.com/ClickHouse/ClickHouse/pull/10073) ([Alexander Kazakov](https://github.com/Akazz)) +* Enhanced compatibility with native mysql-connector-java(JDBC) [#10021](https://github.com/ClickHouse/ClickHouse/pull/10021) ([BohuTANG](https://github.com/BohuTANG)) +* The function `toString` is considered monotonic and can be used for index analysis even when applied in tautological cases with String or LowCardinality(String) argument. [#10110](https://github.com/ClickHouse/ClickHouse/pull/10110) ([Amos Bird](https://github.com/amosbird)) +* Add `ON CLUSTER` clause support to commands `{CREATE|DROP} USER/ROLE/ROW POLICY/SETTINGS PROFILE/QUOTA`, `GRANT`. [#9811](https://github.com/ClickHouse/ClickHouse/pull/9811) ([Vitaly Baranov](https://github.com/vitlibar)) +* Virtual hosted-style support for S3 URI [#9998](https://github.com/ClickHouse/ClickHouse/pull/9998) ([Pavel Kovalenko](https://github.com/Jokser)) +* Now layout type for dictionaries with no arguments can be specified without round brackets in dictionaries DDL-queries. Fixes [#10057](https://github.com/ClickHouse/ClickHouse/issues/10057). [#10064](https://github.com/ClickHouse/ClickHouse/pull/10064) ([alesapin](https://github.com/alesapin)) +* Add ability to use number ranges with leading zeros in filepath [#9989](https://github.com/ClickHouse/ClickHouse/pull/9989) ([Olga Khvostikova](https://github.com/stavrolia)) +* Better memory usage in CROSS JOIN. [#10029](https://github.com/ClickHouse/ClickHouse/pull/10029) ([Artem Zuikov](https://github.com/4ertus2)) +* Try to connect to all shards in cluster when getting structure of remote table and skip_unavailable_shards is set. [#7278](https://github.com/ClickHouse/ClickHouse/pull/7278) ([nvartolomei](https://github.com/nvartolomei)) +* Add `total_rows`/`total_bytes` into the `system.tables` table. [#9919](https://github.com/ClickHouse/ClickHouse/pull/9919) ([Azat Khuzhin](https://github.com/azat)) +* System log tables now use polymorpic parts by default. [#9905](https://github.com/ClickHouse/ClickHouse/pull/9905) ([Anton Popov](https://github.com/CurtizJ)) +* Add type column into system.settings/merge_tree_settings [#9909](https://github.com/ClickHouse/ClickHouse/pull/9909) ([Azat Khuzhin](https://github.com/azat)) +* Check for available CPU instructions at server startup as early as possible. [#9888](https://github.com/ClickHouse/ClickHouse/pull/9888) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Remove `ORDER BY` stage from mutations because we read from a single ordered part in a single thread. Also add check that the rows in mutation are ordered by sorting key and this order is not violated. [#9886](https://github.com/ClickHouse/ClickHouse/pull/9886) ([alesapin](https://github.com/alesapin)) +* Implement operator LIKE for FixedString at left hand side. This is needed to better support TPC-DS queries. [#9890](https://github.com/ClickHouse/ClickHouse/pull/9890) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add `force_optimize_skip_unused_shards_no_nested` that will disable `force_optimize_skip_unused_shards` for nested Distributed table [#9812](https://github.com/ClickHouse/ClickHouse/pull/9812) ([Azat Khuzhin](https://github.com/azat)) +* Now columns size is calculated only once for MergeTree data parts. [#9827](https://github.com/ClickHouse/ClickHouse/pull/9827) ([alesapin](https://github.com/alesapin)) +* Evaluate constant expressions for `optimize_skip_unused_shards` (i.e. `SELECT * FROM foo_dist WHERE key=xxHash32(0)`) [#8846](https://github.com/ClickHouse/ClickHouse/pull/8846) ([Azat Khuzhin](https://github.com/azat)) +* Check for using `Date` or `DateTime` column from TTL expressions was removed. [#9967](https://github.com/ClickHouse/ClickHouse/pull/9967) ([Vladimir Chebotarev](https://github.com/excitoon)) +* DiskS3 hard links optimal implementation. [#9760](https://github.com/ClickHouse/ClickHouse/pull/9760) ([Pavel Kovalenko](https://github.com/Jokser)) +* If `set multiple_joins_rewriter_version = 2` enables second version of multiple JOIN rewrites that keeps not clashed column names as is. It supports multiple JOINs with `USING` and allow `select *` for JOINs with subqueries. [#9739](https://github.com/ClickHouse/ClickHouse/pull/9739) ([Artem Zuikov](https://github.com/4ertus2)) +* Implementation of "non-blocking" alter for StorageMergeTree [#9606](https://github.com/ClickHouse/ClickHouse/pull/9606) ([alesapin](https://github.com/alesapin)) +* Add MergeTree full support for DiskS3 [#9646](https://github.com/ClickHouse/ClickHouse/pull/9646) ([Pavel Kovalenko](https://github.com/Jokser)) +* Extend `splitByString` to support empty strings as separators. [#9742](https://github.com/ClickHouse/ClickHouse/pull/9742) ([hcz](https://github.com/hczhcz)) +* Add a `timestamp_ns` column to `system.trace_log`. It contains a high-definition timestamp of the trace event, and allows to build timelines of thread profiles ("flame charts"). [#9696](https://github.com/ClickHouse/ClickHouse/pull/9696) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* When the setting `send_logs_level` is enabled, avoid intermixing of log messages and query progress. [#9634](https://github.com/ClickHouse/ClickHouse/pull/9634) ([Azat Khuzhin](https://github.com/azat)) +* Added support of `MATERIALIZE TTL IN PARTITION`. [#9581](https://github.com/ClickHouse/ClickHouse/pull/9581) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Support complex types inside Avro nested fields [#10502](https://github.com/ClickHouse/ClickHouse/pull/10502) ([Andrew Onyshchuk](https://github.com/oandrew)) + +#### Performance Improvement +* Better insert logic for right table for Partial MergeJoin. [#10467](https://github.com/ClickHouse/ClickHouse/pull/10467) ([Artem Zuikov](https://github.com/4ertus2)) +* Improved performance of row-oriented formats (more than 10% for CSV and more than 35% for Avro in case of narrow tables). [#10503](https://github.com/ClickHouse/ClickHouse/pull/10503) ([Andrew Onyshchuk](https://github.com/oandrew)) +* Improved performance of queries with explicitly defined sets at right side of IN operator and tuples on the left side. [#10385](https://github.com/ClickHouse/ClickHouse/pull/10385) ([Anton Popov](https://github.com/CurtizJ)) +* Use less memory for hash table in HashJoin. [#10416](https://github.com/ClickHouse/ClickHouse/pull/10416) ([Artem Zuikov](https://github.com/4ertus2)) +* Special HashJoin over StorageDictionary. Allow rewrite `dictGet()` functions with JOINs. It's not backward incompatible itself but could uncover [#8400](https://github.com/ClickHouse/ClickHouse/issues/8400) on some installations. [#10133](https://github.com/ClickHouse/ClickHouse/pull/10133) ([Artem Zuikov](https://github.com/4ertus2)) +* Enable parallel insert of materialized view when its target table supports. [#10052](https://github.com/ClickHouse/ClickHouse/pull/10052) ([vxider](https://github.com/Vxider)) +* Improved performance of index analysis with monotonic functions. [#9607](https://github.com/ClickHouse/ClickHouse/pull/9607)[#10026](https://github.com/ClickHouse/ClickHouse/pull/10026) ([Anton Popov](https://github.com/CurtizJ)) +* Using SSE2 or SSE4.2 SIMD intrinsics to speed up tokenization in bloom filters. [#9968](https://github.com/ClickHouse/ClickHouse/pull/9968) ([Vasily Nemkov](https://github.com/Enmk)) +* Improved performance of queries with explicitly defined sets at right side of `IN` operator. This fixes performance regression in version 20.3. [#9740](https://github.com/ClickHouse/ClickHouse/pull/9740) ([Anton Popov](https://github.com/CurtizJ)) +* Now clickhouse-copier splits each partition in number of pieces and copies them independently. [#9075](https://github.com/ClickHouse/ClickHouse/pull/9075) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Adding more aggregation methods. For example TPC-H query 1 will now pick `FixedHashMap` and gets 25% performance gain [#9829](https://github.com/ClickHouse/ClickHouse/pull/9829) ([Amos Bird](https://github.com/amosbird)) +* Use single row counter for multiple streams in pre-limit transform. This helps to avoid uniting pipeline streams in queries with `limit` but without `order by` (like `select f(x) from (select x from t limit 1000000000)`) and use multiple threads for further processing. [#9602](https://github.com/ClickHouse/ClickHouse/pull/9602) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) + +#### Build/Testing/Packaging Improvement +* Use a fork of AWS SDK libraries from ClickHouse-Extras [#10527](https://github.com/ClickHouse/ClickHouse/pull/10527) ([Pavel Kovalenko](https://github.com/Jokser)) +* Add integration tests for new ALTER RENAME COLUMN query. [#10654](https://github.com/ClickHouse/ClickHouse/pull/10654) ([vzakaznikov](https://github.com/vzakaznikov)) +* Fix possible signed integer overflow in invocation of function `now64` with wrong arguments. This fixes [#8973](https://github.com/ClickHouse/ClickHouse/issues/8973) [#10511](https://github.com/ClickHouse/ClickHouse/pull/10511) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Split fuzzer and sanitizer configurations to make build config compatible with Oss-fuzz. [#10494](https://github.com/ClickHouse/ClickHouse/pull/10494) ([kyprizel](https://github.com/kyprizel)) +* Fixes for clang-tidy on clang-10. [#10420](https://github.com/ClickHouse/ClickHouse/pull/10420) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Display absolute paths in error messages. Otherwise KDevelop fails to navigate to correct file and opens a new file instead. [#10434](https://github.com/ClickHouse/ClickHouse/pull/10434) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added `ASAN_OPTIONS` environment variable to investigate errors in CI stress tests with Address sanitizer. [#10440](https://github.com/ClickHouse/ClickHouse/pull/10440) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Enable ThinLTO for clang builds (experimental). [#10435](https://github.com/ClickHouse/ClickHouse/pull/10435) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Remove accidential dependency on Z3 that may be introduced if the system has Z3 solver installed. [#10426](https://github.com/ClickHouse/ClickHouse/pull/10426) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Move integration tests docker files to docker/ directory. [#10335](https://github.com/ClickHouse/ClickHouse/pull/10335) ([Ilya Yatsishin](https://github.com/qoega)) +* Allow to use `clang-10` in CI. It ensures that [#10238](https://github.com/ClickHouse/ClickHouse/issues/10238) is fixed. [#10384](https://github.com/ClickHouse/ClickHouse/pull/10384) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Update OpenSSL to upstream master. Fixed the issue when TLS connections may fail with the message `OpenSSL SSL_read: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error` and `SSL Exception: error:2400006E:random number generator::error retrieving entropy`. The issue was present in version 20.1. [#8956](https://github.com/ClickHouse/ClickHouse/pull/8956) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix clang-10 build. [#10238](https://github.com/ClickHouse/ClickHouse/issues/10238) [#10370](https://github.com/ClickHouse/ClickHouse/pull/10370) ([Amos Bird](https://github.com/amosbird)) +* Add performance test for [Parallel INSERT for materialized view](https://github.com/ClickHouse/ClickHouse/pull/10052). [#10345](https://github.com/ClickHouse/ClickHouse/pull/10345) ([vxider](https://github.com/Vxider)) +* Fix flaky test `test_settings_constraints_distributed.test_insert_clamps_settings`. [#10346](https://github.com/ClickHouse/ClickHouse/pull/10346) ([Vitaly Baranov](https://github.com/vitlibar)) +* Add util to test results upload in CI ClickHouse [#10330](https://github.com/ClickHouse/ClickHouse/pull/10330) ([Ilya Yatsishin](https://github.com/qoega)) +* Convert test results to JSONEachRow format in junit_to_html tool [#10323](https://github.com/ClickHouse/ClickHouse/pull/10323) ([Ilya Yatsishin](https://github.com/qoega)) +* Update cctz. [#10215](https://github.com/ClickHouse/ClickHouse/pull/10215) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Allow to create HTML report from the purest JUnit XML report. [#10247](https://github.com/ClickHouse/ClickHouse/pull/10247) ([Ilya Yatsishin](https://github.com/qoega)) +* Update the check for minimal compiler version. Fix the root cause of the issue [#10250](https://github.com/ClickHouse/ClickHouse/issues/10250) [#10256](https://github.com/ClickHouse/ClickHouse/pull/10256) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Initial support for live view tables over distributed [#10179](https://github.com/ClickHouse/ClickHouse/pull/10179) ([vzakaznikov](https://github.com/vzakaznikov)) +* Fix (false) MSan report in MergeTreeIndexFullText. The issue first appeared in [#9968](https://github.com/ClickHouse/ClickHouse/issues/9968). [#10801](https://github.com/ClickHouse/ClickHouse/pull/10801) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* clickhouse-docker-util [#10151](https://github.com/ClickHouse/ClickHouse/pull/10151) ([filimonov](https://github.com/filimonov)) +* Update pdqsort to recent version [#10171](https://github.com/ClickHouse/ClickHouse/pull/10171) ([Ivan](https://github.com/abyss7)) +* Update libdivide to v3.0 [#10169](https://github.com/ClickHouse/ClickHouse/pull/10169) ([Ivan](https://github.com/abyss7)) +* Add check with enabled polymorphic parts. [#10086](https://github.com/ClickHouse/ClickHouse/pull/10086) ([Anton Popov](https://github.com/CurtizJ)) +* Add cross-compile build for FreeBSD. This fixes [#9465](https://github.com/ClickHouse/ClickHouse/issues/9465) [#9643](https://github.com/ClickHouse/ClickHouse/pull/9643) ([Ivan](https://github.com/abyss7)) +* Add performance test for [#6924](https://github.com/ClickHouse/ClickHouse/issues/6924) [#6980](https://github.com/ClickHouse/ClickHouse/pull/6980) ([filimonov](https://github.com/filimonov)) +* Add support of `/dev/null` in the `File` engine for better performance testing [#8455](https://github.com/ClickHouse/ClickHouse/pull/8455) ([Amos Bird](https://github.com/amosbird)) +* Move all folders inside /dbms one level up [#9974](https://github.com/ClickHouse/ClickHouse/pull/9974) ([Ivan](https://github.com/abyss7)) +* Add a test that checks that read from MergeTree with single thread is performed in order. Addition to [#9670](https://github.com/ClickHouse/ClickHouse/issues/9670) [#9762](https://github.com/ClickHouse/ClickHouse/pull/9762) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix the `00964_live_view_watch_events_heartbeat.py` test to avoid race condition. [#9944](https://github.com/ClickHouse/ClickHouse/pull/9944) ([vzakaznikov](https://github.com/vzakaznikov)) +* Fix integration test `test_settings_constraints` [#9962](https://github.com/ClickHouse/ClickHouse/pull/9962) ([Vitaly Baranov](https://github.com/vitlibar)) +* Every function in its own file, part 12. [#9922](https://github.com/ClickHouse/ClickHouse/pull/9922) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added performance test for the case of extremely slow analysis of array of tuples. [#9872](https://github.com/ClickHouse/ClickHouse/pull/9872) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Update zstd to 1.4.4. It has some minor improvements in performance and compression ratio. If you run replicas with different versions of ClickHouse you may see reasonable error messages `Data after merge is not byte-identical to data on another replicas.` with explanation. These messages are Ok and you should not worry. [#10663](https://github.com/ClickHouse/ClickHouse/pull/10663) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix TSan report in `system.stack_trace`. [#9832](https://github.com/ClickHouse/ClickHouse/pull/9832) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Removed dependency on `clock_getres`. [#9833](https://github.com/ClickHouse/ClickHouse/pull/9833) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added identifier names check with clang-tidy. [#9799](https://github.com/ClickHouse/ClickHouse/pull/9799) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Update "builder" docker image. This image is not used in CI but is useful for developers. [#9809](https://github.com/ClickHouse/ClickHouse/pull/9809) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Remove old `performance-test` tool that is no longer used in CI. `clickhouse-performance-test` is great but now we are using way superior tool that is doing comparison testing with sophisticated statistical formulas to achieve confident results regardless to various changes in environment. [#9796](https://github.com/ClickHouse/ClickHouse/pull/9796) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added most of clang-static-analyzer checks. [#9765](https://github.com/ClickHouse/ClickHouse/pull/9765) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Update Poco to 1.9.3 in preparation for MongoDB URI support. [#6892](https://github.com/ClickHouse/ClickHouse/pull/6892) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Fix build with `-DUSE_STATIC_LIBRARIES=0 -DENABLE_JEMALLOC=0` [#9651](https://github.com/ClickHouse/ClickHouse/pull/9651) ([Artem Zuikov](https://github.com/4ertus2)) +* For change log script, if merge commit was cherry-picked to release branch, take PR name from commit description. [#9708](https://github.com/ClickHouse/ClickHouse/pull/9708) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Support `vX.X-conflicts` tag in backport script. [#9705](https://github.com/ClickHouse/ClickHouse/pull/9705) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix `auto-label` for backporting script. [#9685](https://github.com/ClickHouse/ClickHouse/pull/9685) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Use libc++ in Darwin cross-build to make it consistent with native build. [#9665](https://github.com/ClickHouse/ClickHouse/pull/9665) ([Hui Wang](https://github.com/huiwang)) +* Fix flacky test `01017_uniqCombined_memory_usage`. Continuation of [#7236](https://github.com/ClickHouse/ClickHouse/issues/7236). [#9667](https://github.com/ClickHouse/ClickHouse/pull/9667) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix build for native macOS Clang compiler [#9649](https://github.com/ClickHouse/ClickHouse/pull/9649) ([Ivan](https://github.com/abyss7)) +* Allow to add various glitches around `pthread_mutex_lock`, `pthread_mutex_unlock` functions. [#9635](https://github.com/ClickHouse/ClickHouse/pull/9635) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add support for `clang-tidy` in `packager` script. [#9625](https://github.com/ClickHouse/ClickHouse/pull/9625) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add ability to use unbundled msgpack. [#10168](https://github.com/ClickHouse/ClickHouse/pull/10168) ([Azat Khuzhin](https://github.com/azat)) + + +## ClickHouse release v20.3 + + +### ClickHouse release v20.3.21.2-lts, 2020-11-02 + +#### Bug Fix + +* Fix dictGet in sharding_key (and similar places, i.e. when the function context is stored permanently). [#16205](https://github.com/ClickHouse/ClickHouse/pull/16205) ([Azat Khuzhin](https://github.com/azat)). +* Fix incorrect empty result for query from `Distributed` table if query has `WHERE`, `PREWHERE` and `GLOBAL IN`. Fixes [#15792](https://github.com/ClickHouse/ClickHouse/issues/15792). [#15933](https://github.com/ClickHouse/ClickHouse/pull/15933) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix missing or excessive headers in `TSV/CSVWithNames` formats. This fixes [#12504](https://github.com/ClickHouse/ClickHouse/issues/12504). [#13343](https://github.com/ClickHouse/ClickHouse/pull/13343) ([Azat Khuzhin](https://github.com/azat)). + + +### ClickHouse release v20.3.20.6-lts, 2020-10-09 + +#### Bug Fix + +* Mutation might hang waiting for some non-existent part after `MOVE` or `REPLACE PARTITION` or, in rare cases, after `DETACH` or `DROP PARTITION`. It's fixed. [#15724](https://github.com/ClickHouse/ClickHouse/pull/15724), [#15537](https://github.com/ClickHouse/ClickHouse/pull/15537) ([tavplubix](https://github.com/tavplubix)). +* Fix hang of queries with a lot of subqueries to same table of `MySQL` engine. Previously, if there were more than 16 subqueries to same `MySQL` table in query, it hang forever. [#15299](https://github.com/ClickHouse/ClickHouse/pull/15299) ([Anton Popov](https://github.com/CurtizJ)). +* Fix 'Unknown identifier' in GROUP BY when query has JOIN over Merge table. [#15242](https://github.com/ClickHouse/ClickHouse/pull/15242) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix to make predicate push down work when subquery contains finalizeAggregation function. Fixes [#14847](https://github.com/ClickHouse/ClickHouse/issues/14847). [#14937](https://github.com/ClickHouse/ClickHouse/pull/14937) ([filimonov](https://github.com/filimonov)). +* Concurrent `ALTER ... REPLACE/MOVE PARTITION ...` queries might cause deadlock. It's fixed. [#13626](https://github.com/ClickHouse/ClickHouse/pull/13626) ([tavplubix](https://github.com/tavplubix)). + + +### ClickHouse release v20.3.19.4-lts, 2020-09-18 + +#### Bug Fix + +* Fix rare error in `SELECT` queries when the queried column has `DEFAULT` expression which depends on the other column which also has `DEFAULT` and not present in select query and not exists on disk. Partially fixes [#14531](https://github.com/ClickHouse/ClickHouse/issues/14531). [#14845](https://github.com/ClickHouse/ClickHouse/pull/14845) ([alesapin](https://github.com/alesapin)). +* Fix bug when `ALTER UPDATE` mutation with Nullable column in assignment expression and constant value (like `UPDATE x = 42`) leads to incorrect value in column or segfault. Fixes [#13634](https://github.com/ClickHouse/ClickHouse/issues/13634), [#14045](https://github.com/ClickHouse/ClickHouse/issues/14045). [#14646](https://github.com/ClickHouse/ClickHouse/pull/14646) ([alesapin](https://github.com/alesapin)). +* Fix wrong Decimal multiplication result caused wrong decimal scale of result column. [#14603](https://github.com/ClickHouse/ClickHouse/pull/14603) ([Artem Zuikov](https://github.com/4ertus2)). + +#### Improvement + +* Support custom codecs in compact parts. [#12183](https://github.com/ClickHouse/ClickHouse/pull/12183) ([Anton Popov](https://github.com/CurtizJ)). + + +### ClickHouse release v20.3.18.10-lts, 2020-09-08 + +#### Bug Fix + +* Stop query execution if exception happened in `PipelineExecutor` itself. This could prevent rare possible query hung. Continuation of [#14334](https://github.com/ClickHouse/ClickHouse/issues/14334). [#14402](https://github.com/ClickHouse/ClickHouse/pull/14402) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed the behaviour when sometimes cache-dictionary returned default value instead of present value from source. [#13624](https://github.com/ClickHouse/ClickHouse/pull/13624) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix parsing row policies from users.xml when names of databases or tables contain dots. This fixes [#5779](https://github.com/ClickHouse/ClickHouse/issues/5779), [#12527](https://github.com/ClickHouse/ClickHouse/issues/12527). [#13199](https://github.com/ClickHouse/ClickHouse/pull/13199) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix CAST(Nullable(String), Enum()). [#12745](https://github.com/ClickHouse/ClickHouse/pull/12745) ([Azat Khuzhin](https://github.com/azat)). +* Fixed data race in `text_log`. It does not correspond to any real bug. [#9726](https://github.com/ClickHouse/ClickHouse/pull/9726) ([alexey-milovidov](https://github.com/alexey-milovidov)). + +#### Improvement + +* Fix wrong error for long queries. It was possible to get syntax error other than `Max query size exceeded` for correct query. [#13928](https://github.com/ClickHouse/ClickHouse/pull/13928) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Return NULL/zero when value is not parsed completely in parseDateTimeBestEffortOrNull/Zero functions. This fixes [#7876](https://github.com/ClickHouse/ClickHouse/issues/7876). [#11653](https://github.com/ClickHouse/ClickHouse/pull/11653) ([alexey-milovidov](https://github.com/alexey-milovidov)). + +#### Performance Improvement + +* Slightly optimize very short queries with LowCardinality. [#14129](https://github.com/ClickHouse/ClickHouse/pull/14129) ([Anton Popov](https://github.com/CurtizJ)). + +#### Build/Testing/Packaging Improvement + +* Fix UBSan report (adding zero to nullptr) in HashTable that appeared after migration to clang-10. [#10638](https://github.com/ClickHouse/ClickHouse/pull/10638) ([alexey-milovidov](https://github.com/alexey-milovidov)). + + +### ClickHouse release v20.3.17.173-lts, 2020-08-15 + +#### Bug Fix + +* Fix crash in JOIN with StorageMerge and `set enable_optimize_predicate_expression=1`. [#13679](https://github.com/ClickHouse/ClickHouse/pull/13679) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix invalid return type for comparison of tuples with `NULL` elements. Fixes [#12461](https://github.com/ClickHouse/ClickHouse/issues/12461). [#13420](https://github.com/ClickHouse/ClickHouse/pull/13420) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix queries with constant columns and `ORDER BY` prefix of primary key. [#13396](https://github.com/ClickHouse/ClickHouse/pull/13396) ([Anton Popov](https://github.com/CurtizJ)). +* Return passed number for numbers with MSB set in roundUpToPowerOfTwoOrZero(). [#13234](https://github.com/ClickHouse/ClickHouse/pull/13234) ([Azat Khuzhin](https://github.com/azat)). + + +### ClickHouse release v20.3.16.165-lts 2020-08-10 + +#### Bug Fix + +* Fixed error in `parseDateTimeBestEffort` function when unix timestamp was passed as an argument. This fixes [#13362](https://github.com/ClickHouse/ClickHouse/issues/13362). [#13441](https://github.com/ClickHouse/ClickHouse/pull/13441) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potentially low performance and slightly incorrect result for `uniqExact`, `topK`, `sumDistinct` and similar aggregate functions called on Float types with `NaN` values. It also triggered assert in debug build. This fixes [#12491](https://github.com/ClickHouse/ClickHouse/issues/12491). [#13254](https://github.com/ClickHouse/ClickHouse/pull/13254) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed function if with nullable constexpr as cond that is not literal NULL. Fixes [#12463](https://github.com/ClickHouse/ClickHouse/issues/12463). [#13226](https://github.com/ClickHouse/ClickHouse/pull/13226) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed assert in `arrayElement` function in case of array elements are Nullable and array subscript is also Nullable. This fixes [#12172](https://github.com/ClickHouse/ClickHouse/issues/12172). [#13224](https://github.com/ClickHouse/ClickHouse/pull/13224) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed unnecessary limiting for the number of threads for selects from local replica. [#12840](https://github.com/ClickHouse/ClickHouse/pull/12840) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed possible extra overflow row in data which could appear for queries `WITH TOTALS`. [#12747](https://github.com/ClickHouse/ClickHouse/pull/12747) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed performance with large tuples, which are interpreted as functions in `IN` section. The case when user write `WHERE x IN tuple(1, 2, ...)` instead of `WHERE x IN (1, 2, ...)` for some obscure reason. [#12700](https://github.com/ClickHouse/ClickHouse/pull/12700) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed memory tracking for input_format_parallel_parsing (by attaching thread to group). [#12672](https://github.com/ClickHouse/ClickHouse/pull/12672) ([Azat Khuzhin](https://github.com/azat)). +* Fixed [#12293](https://github.com/ClickHouse/ClickHouse/issues/12293) allow push predicate when subquery contains with clause. [#12663](https://github.com/ClickHouse/ClickHouse/pull/12663) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed [#10572](https://github.com/ClickHouse/ClickHouse/issues/10572) fix bloom filter index with const expression. [#12659](https://github.com/ClickHouse/ClickHouse/pull/12659) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed SIGSEGV in StorageKafka when broker is unavailable (and not only). [#12658](https://github.com/ClickHouse/ClickHouse/pull/12658) ([Azat Khuzhin](https://github.com/azat)). +* Fixed race condition in external dictionaries with cache layout which can lead server crash. [#12566](https://github.com/ClickHouse/ClickHouse/pull/12566) ([alesapin](https://github.com/alesapin)). +* Fixed bug which lead to broken old parts after `ALTER DELETE` query when `enable_mixed_granularity_parts=1`. Fixes [#12536](https://github.com/ClickHouse/ClickHouse/issues/12536). [#12543](https://github.com/ClickHouse/ClickHouse/pull/12543) ([alesapin](https://github.com/alesapin)). +* Better exception for function `in` with invalid number of arguments. [#12529](https://github.com/ClickHouse/ClickHouse/pull/12529) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed performance issue, while reading from compact parts. [#12492](https://github.com/ClickHouse/ClickHouse/pull/12492) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed the deadlock if `text_log` is enabled. [#12452](https://github.com/ClickHouse/ClickHouse/pull/12452) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed possible segfault if StorageMerge. Closes [#12054](https://github.com/ClickHouse/ClickHouse/issues/12054). [#12401](https://github.com/ClickHouse/ClickHouse/pull/12401) ([tavplubix](https://github.com/tavplubix)). +* Fixed `TOTALS/ROLLUP/CUBE` for aggregate functions with `-State` and `Nullable` arguments. This fixes [#12163](https://github.com/ClickHouse/ClickHouse/issues/12163). [#12376](https://github.com/ClickHouse/ClickHouse/pull/12376) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed order of columns in `WITH FILL` modifier. Previously order of columns of `ORDER BY` statement wasn't respected. [#12306](https://github.com/ClickHouse/ClickHouse/pull/12306) ([Anton Popov](https://github.com/CurtizJ)). +* Avoid "bad cast" exception when there is an expression that filters data by virtual columns (like `_table` in `Merge` tables) or by "index" columns in system tables such as filtering by database name when querying from `system.tables`, and this expression returns `Nullable` type. This fixes [#12166](https://github.com/ClickHouse/ClickHouse/issues/12166). [#12305](https://github.com/ClickHouse/ClickHouse/pull/12305) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Show error after `TrieDictionary` failed to load. [#12290](https://github.com/ClickHouse/ClickHouse/pull/12290) ([Vitaly Baranov](https://github.com/vitlibar)). +* The function `arrayFill` worked incorrectly for empty arrays that may lead to crash. This fixes [#12263](https://github.com/ClickHouse/ClickHouse/issues/12263). [#12279](https://github.com/ClickHouse/ClickHouse/pull/12279) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Implement conversions to the common type for `LowCardinality` types. This allows to execute UNION ALL of tables with columns of LowCardinality and other columns. This fixes [#8212](https://github.com/ClickHouse/ClickHouse/issues/8212). This fixes [#4342](https://github.com/ClickHouse/ClickHouse/issues/4342). [#12275](https://github.com/ClickHouse/ClickHouse/pull/12275) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the behaviour when during multiple sequential inserts in `StorageFile` header for some special types was written more than once. This fixed [#6155](https://github.com/ClickHouse/ClickHouse/issues/6155). [#12197](https://github.com/ClickHouse/ClickHouse/pull/12197) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fixed logical functions for UInt8 values when they are not equal to 0 or 1. [#12196](https://github.com/ClickHouse/ClickHouse/pull/12196) ([Alexander Kazakov](https://github.com/Akazz)). +* Fixed `dictGet` arguments check during GROUP BY injective functions elimination. [#12179](https://github.com/ClickHouse/ClickHouse/pull/12179) ([Azat Khuzhin](https://github.com/azat)). +* Fixed wrong logic in `ALTER DELETE` that leads to deleting of records when condition evaluates to NULL. This fixes [#9088](https://github.com/ClickHouse/ClickHouse/issues/9088). This closes [#12106](https://github.com/ClickHouse/ClickHouse/issues/12106). [#12153](https://github.com/ClickHouse/ClickHouse/pull/12153) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed transform of query to send to external DBMS (e.g. MySQL, ODBC) in presense of aliases. This fixes [#12032](https://github.com/ClickHouse/ClickHouse/issues/12032). [#12151](https://github.com/ClickHouse/ClickHouse/pull/12151) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potential overflow in integer division. This fixes [#12119](https://github.com/ClickHouse/ClickHouse/issues/12119). [#12140](https://github.com/ClickHouse/ClickHouse/pull/12140) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potential infinite loop in `greatCircleDistance`, `geoDistance`. This fixes [#12117](https://github.com/ClickHouse/ClickHouse/issues/12117). [#12137](https://github.com/ClickHouse/ClickHouse/pull/12137) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Avoid `There is no query` exception for materialized views with joins or with subqueries attached to system logs (system.query_log, metric_log, etc) or to engine=Buffer underlying table. [#12120](https://github.com/ClickHouse/ClickHouse/pull/12120) ([filimonov](https://github.com/filimonov)). +* Fixed performance for selects with `UNION` caused by wrong limit for the total number of threads. Fixes [#12030](https://github.com/ClickHouse/ClickHouse/issues/12030). [#12103](https://github.com/ClickHouse/ClickHouse/pull/12103) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed segfault with `-StateResample` combinators. [#12092](https://github.com/ClickHouse/ClickHouse/pull/12092) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed unnecessary limiting the number of threads for selects from `VIEW`. Fixes [#11937](https://github.com/ClickHouse/ClickHouse/issues/11937). [#12085](https://github.com/ClickHouse/ClickHouse/pull/12085) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed possible crash while using wrong type for `PREWHERE`. Fixes [#12053](https://github.com/ClickHouse/ClickHouse/issues/12053), [#12060](https://github.com/ClickHouse/ClickHouse/issues/12060). [#12060](https://github.com/ClickHouse/ClickHouse/pull/12060) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed error `Expected single dictionary argument for function` for function `defaultValueOfArgumentType` with `LowCardinality` type. Fixes [#11808](https://github.com/ClickHouse/ClickHouse/issues/11808). [#12056](https://github.com/ClickHouse/ClickHouse/pull/12056) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed error `Cannot capture column` for higher-order functions with `Tuple(LowCardinality)` argument. Fixes [#9766](https://github.com/ClickHouse/ClickHouse/issues/9766). [#12055](https://github.com/ClickHouse/ClickHouse/pull/12055) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Parse tables metadata in parallel when loading database. This fixes slow server startup when there are large number of tables. [#12045](https://github.com/ClickHouse/ClickHouse/pull/12045) ([tavplubix](https://github.com/tavplubix)). +* Make `topK` aggregate function return Enum for Enum types. This fixes [#3740](https://github.com/ClickHouse/ClickHouse/issues/3740). [#12043](https://github.com/ClickHouse/ClickHouse/pull/12043) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed constraints check if constraint is a constant expression. This fixes [#11360](https://github.com/ClickHouse/ClickHouse/issues/11360). [#12042](https://github.com/ClickHouse/ClickHouse/pull/12042) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed incorrect comparison of tuples with `Nullable` columns. Fixes [#11985](https://github.com/ClickHouse/ClickHouse/issues/11985). [#12039](https://github.com/ClickHouse/ClickHouse/pull/12039) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed wrong result and potential crash when invoking function `if` with arguments of type `FixedString` with different sizes. This fixes [#11362](https://github.com/ClickHouse/ClickHouse/issues/11362). [#12021](https://github.com/ClickHouse/ClickHouse/pull/12021) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* A query with function `neighbor` as the only returned expression may return empty result if the function is called with offset `-9223372036854775808`. This fixes [#11367](https://github.com/ClickHouse/ClickHouse/issues/11367). [#12019](https://github.com/ClickHouse/ClickHouse/pull/12019) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potential array size overflow in generateRandom that may lead to crash. This fixes [#11371](https://github.com/ClickHouse/ClickHouse/issues/11371). [#12013](https://github.com/ClickHouse/ClickHouse/pull/12013) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potential floating point exception. This closes [#11378](https://github.com/ClickHouse/ClickHouse/issues/11378). [#12005](https://github.com/ClickHouse/ClickHouse/pull/12005) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed wrong setting name in log message at server startup. [#11997](https://github.com/ClickHouse/ClickHouse/pull/11997) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `Query parameter was not set` in `Values` format. Fixes [#11918](https://github.com/ClickHouse/ClickHouse/issues/11918). [#11936](https://github.com/ClickHouse/ClickHouse/pull/11936) ([tavplubix](https://github.com/tavplubix)). +* Keep aliases for substitutions in query (parametrized queries). This fixes [#11914](https://github.com/ClickHouse/ClickHouse/issues/11914). [#11916](https://github.com/ClickHouse/ClickHouse/pull/11916) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed potential floating point exception when parsing DateTime64. This fixes [#11374](https://github.com/ClickHouse/ClickHouse/issues/11374). [#11875](https://github.com/ClickHouse/ClickHouse/pull/11875) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed memory accounting via `HTTP` interface (can be significant with `wait_end_of_query=1`). [#11840](https://github.com/ClickHouse/ClickHouse/pull/11840) ([Azat Khuzhin](https://github.com/azat)). +* Fixed wrong result for `if()` with NULLs in condition. [#11807](https://github.com/ClickHouse/ClickHouse/pull/11807) ([Artem Zuikov](https://github.com/4ertus2)). +* Parse metadata stored in zookeeper before checking for equality. [#11739](https://github.com/ClickHouse/ClickHouse/pull/11739) ([Azat Khuzhin](https://github.com/azat)). +* Fixed `LIMIT n WITH TIES` usage together with `ORDER BY` statement, which contains aliases. [#11689](https://github.com/ClickHouse/ClickHouse/pull/11689) ([Anton Popov](https://github.com/CurtizJ)). +* Fix potential read of uninitialized memory in cache dictionary. [#10834](https://github.com/ClickHouse/ClickHouse/pull/10834) ([alexey-milovidov](https://github.com/alexey-milovidov)). + +#### Performance Improvement + +* Index not used for IN operator with literals, performance regression introduced around v19.3. This fixes [#10574](https://github.com/ClickHouse/ClickHouse/issues/10574). [#12062](https://github.com/ClickHouse/ClickHouse/pull/12062) ([nvartolomei](https://github.com/nvartolomei)). + + +### ClickHouse release v20.3.12.112-lts 2020-06-25 + +#### Bug Fix + +* Fix rare crash caused by using `Nullable` column in prewhere condition. Continuation of [#11608](https://github.com/ClickHouse/ClickHouse/issues/11608). [#11869](https://github.com/ClickHouse/ClickHouse/pull/11869) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Don't allow arrayJoin inside higher order functions. It was leading to broken protocol synchronization. This closes [#3933](https://github.com/ClickHouse/ClickHouse/issues/3933). [#11846](https://github.com/ClickHouse/ClickHouse/pull/11846) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix using too many threads for queries. [#11788](https://github.com/ClickHouse/ClickHouse/pull/11788) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix unexpected behaviour of queries like `SELECT *, xyz.*` which were success while an error expected. [#11753](https://github.com/ClickHouse/ClickHouse/pull/11753) ([hexiaoting](https://github.com/hexiaoting)). +* Now replicated fetches will be cancelled during metadata alter. [#11744](https://github.com/ClickHouse/ClickHouse/pull/11744) ([alesapin](https://github.com/alesapin)). +* Fixed LOGICAL_ERROR caused by wrong type deduction of complex literals in Values input format. [#11732](https://github.com/ClickHouse/ClickHouse/pull/11732) ([tavplubix](https://github.com/tavplubix)). +* Fix `ORDER BY ... WITH FILL` over const columns. [#11697](https://github.com/ClickHouse/ClickHouse/pull/11697) ([Anton Popov](https://github.com/CurtizJ)). +* Pass proper timeouts when communicating with XDBC bridge. Recently timeouts were not respected when checking bridge liveness and receiving meta info. [#11690](https://github.com/ClickHouse/ClickHouse/pull/11690) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix error which leads to an incorrect state of `system.mutations`. It may show that whole mutation is already done but the server still has `MUTATE_PART` tasks in the replication queue and tries to execute them. This fixes [#11611](https://github.com/ClickHouse/ClickHouse/issues/11611). [#11681](https://github.com/ClickHouse/ClickHouse/pull/11681) ([alesapin](https://github.com/alesapin)). +* Add support for regular expressions with case-insensitive flags. This fixes [#11101](https://github.com/ClickHouse/ClickHouse/issues/11101) and fixes [#11506](https://github.com/ClickHouse/ClickHouse/issues/11506). [#11649](https://github.com/ClickHouse/ClickHouse/pull/11649) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove trivial count query optimization if row-level security is set. In previous versions the user get total count of records in a table instead filtered. This fixes [#11352](https://github.com/ClickHouse/ClickHouse/issues/11352). [#11644](https://github.com/ClickHouse/ClickHouse/pull/11644) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix bloom filters for String (data skipping indices). [#11638](https://github.com/ClickHouse/ClickHouse/pull/11638) ([Azat Khuzhin](https://github.com/azat)). +* Fix rare crash caused by using `Nullable` column in prewhere condition. (Probably it is connected with [#11572](https://github.com/ClickHouse/ClickHouse/issues/11572) somehow). [#11608](https://github.com/ClickHouse/ClickHouse/pull/11608) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix error `Block structure mismatch` for queries with sampling reading from `Buffer` table. [#11602](https://github.com/ClickHouse/ClickHouse/pull/11602) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix wrong exit code of the clickhouse-client, when exception.code() % 256 = 0. [#11601](https://github.com/ClickHouse/ClickHouse/pull/11601) ([filimonov](https://github.com/filimonov)). +* Fix trivial error in log message about "Mark cache size was lowered" at server startup. This closes [#11399](https://github.com/ClickHouse/ClickHouse/issues/11399). [#11589](https://github.com/ClickHouse/ClickHouse/pull/11589) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix error `Size of offsets does not match size of column` for queries with `PREWHERE column in (subquery)` and `ARRAY JOIN`. [#11580](https://github.com/ClickHouse/ClickHouse/pull/11580) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* All queries in HTTP session have had the same query_id. It is fixed. [#11578](https://github.com/ClickHouse/ClickHouse/pull/11578) ([tavplubix](https://github.com/tavplubix)). +* Now clickhouse-server docker container will prefer IPv6 checking server aliveness. [#11550](https://github.com/ClickHouse/ClickHouse/pull/11550) ([Ivan Starkov](https://github.com/istarkov)). +* Fix shard_num/replica_num for `` (breaks use_compact_format_in_distributed_parts_names). [#11528](https://github.com/ClickHouse/ClickHouse/pull/11528) ([Azat Khuzhin](https://github.com/azat)). +* Fix memory leak when exception is thrown in the middle of aggregation with -State functions. This fixes [#8995](https://github.com/ClickHouse/ClickHouse/issues/8995). [#11496](https://github.com/ClickHouse/ClickHouse/pull/11496) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix wrong results of distributed queries when alias could override qualified column name. Fixes [#9672](https://github.com/ClickHouse/ClickHouse/issues/9672) [#9714](https://github.com/ClickHouse/ClickHouse/issues/9714). [#9972](https://github.com/ClickHouse/ClickHouse/pull/9972) ([Artem Zuikov](https://github.com/4ertus2)). + + +### ClickHouse release v20.3.11.97-lts 2020-06-10 + +#### New Feature + +* Now ClickHouse controls timeouts of dictionary sources on its side. Two new settings added to cache dictionary configuration: `strict_max_lifetime_seconds`, which is `max_lifetime` by default and `query_wait_timeout_milliseconds`, which is one minute by default. The first settings is also useful with `allow_read_expired_keys` settings (to forbid reading very expired keys). [#10337](https://github.com/ClickHouse/ClickHouse/pull/10337) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). + +#### Bug Fix + +* Fix the error `Data compressed with different methods` that can happen if `min_bytes_to_use_direct_io` is enabled and PREWHERE is active and using SAMPLE or high number of threads. This fixes [#11539](https://github.com/ClickHouse/ClickHouse/issues/11539). [#11540](https://github.com/ClickHouse/ClickHouse/pull/11540) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix return compressed size for codecs. [#11448](https://github.com/ClickHouse/ClickHouse/pull/11448) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix server crash when a column has compression codec with non-literal arguments. Fixes [#11365](https://github.com/ClickHouse/ClickHouse/issues/11365). [#11431](https://github.com/ClickHouse/ClickHouse/pull/11431) ([alesapin](https://github.com/alesapin)). +* Fix pointInPolygon with nan as point. Fixes [#11375](https://github.com/ClickHouse/ClickHouse/issues/11375). [#11421](https://github.com/ClickHouse/ClickHouse/pull/11421) ([Alexey Ilyukhov](https://github.com/livace)). +* Fix crash in JOIN over LowCarinality(T) and Nullable(T). [#11380](https://github.com/ClickHouse/ClickHouse/issues/11380). [#11414](https://github.com/ClickHouse/ClickHouse/pull/11414) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix error code for wrong `USING` key. [#11373](https://github.com/ClickHouse/ClickHouse/issues/11373). [#11404](https://github.com/ClickHouse/ClickHouse/pull/11404) ([Artem Zuikov](https://github.com/4ertus2)). +* Fixed geohashesInBox with arguments outside of latitude/longitude range. [#11403](https://github.com/ClickHouse/ClickHouse/pull/11403) ([Vasily Nemkov](https://github.com/Enmk)). +* Better errors for `joinGet()` functions. [#11389](https://github.com/ClickHouse/ClickHouse/pull/11389) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix possible `Pipeline stuck` error for queries with external sort and limit. Fixes [#11359](https://github.com/ClickHouse/ClickHouse/issues/11359). [#11366](https://github.com/ClickHouse/ClickHouse/pull/11366) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Remove redundant lock during parts send in ReplicatedMergeTree. [#11354](https://github.com/ClickHouse/ClickHouse/pull/11354) ([alesapin](https://github.com/alesapin)). +* Fix support for `\G` (vertical output) in clickhouse-client in multiline mode. This closes [#9933](https://github.com/ClickHouse/ClickHouse/issues/9933). [#11350](https://github.com/ClickHouse/ClickHouse/pull/11350) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix crash in direct selects from StorageJoin (without JOIN) and wrong nullability. [#11340](https://github.com/ClickHouse/ClickHouse/pull/11340) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix crash in `quantilesExactWeightedArray`. [#11337](https://github.com/ClickHouse/ClickHouse/pull/11337) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Now merges stopped before change metadata in `ALTER` queries. [#11335](https://github.com/ClickHouse/ClickHouse/pull/11335) ([alesapin](https://github.com/alesapin)). +* Make writing to `MATERIALIZED VIEW` with setting `parallel_view_processing = 1` parallel again. Fixes [#10241](https://github.com/ClickHouse/ClickHouse/issues/10241). [#11330](https://github.com/ClickHouse/ClickHouse/pull/11330) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix visitParamExtractRaw when extracted JSON has strings with unbalanced { or [. [#11318](https://github.com/ClickHouse/ClickHouse/pull/11318) ([Ewout](https://github.com/devwout)). +* Fix very rare race condition in ThreadPool. [#11314](https://github.com/ClickHouse/ClickHouse/pull/11314) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix potential uninitialized memory in conversion. Example: `SELECT toIntervalSecond(now64())`. [#11311](https://github.com/ClickHouse/ClickHouse/pull/11311) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix the issue when index analysis cannot work if a table has Array column in primary key and if a query is filtering by this column with `empty` or `notEmpty` functions. This fixes [#11286](https://github.com/ClickHouse/ClickHouse/issues/11286). [#11303](https://github.com/ClickHouse/ClickHouse/pull/11303) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix bug when query speed estimation can be incorrect and the limit of `min_execution_speed` may not work or work incorrectly if the query is throttled by `max_network_bandwidth`, `max_execution_speed` or `priority` settings. Change the default value of `timeout_before_checking_execution_speed` to non-zero, because otherwise the settings `min_execution_speed` and `max_execution_speed` have no effect. This fixes [#11297](https://github.com/ClickHouse/ClickHouse/issues/11297). This fixes [#5732](https://github.com/ClickHouse/ClickHouse/issues/5732). This fixes [#6228](https://github.com/ClickHouse/ClickHouse/issues/6228). Usability improvement: avoid concatenation of exception message with progress bar in `clickhouse-client`. [#11296](https://github.com/ClickHouse/ClickHouse/pull/11296) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix crash while reading malformed data in Protobuf format. This fixes [#5957](https://github.com/ClickHouse/ClickHouse/issues/5957), fixes [#11203](https://github.com/ClickHouse/ClickHouse/issues/11203). [#11258](https://github.com/ClickHouse/ClickHouse/pull/11258) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed a bug when cache-dictionary could return default value instead of normal (when there are only expired keys). This affects only string fields. [#11233](https://github.com/ClickHouse/ClickHouse/pull/11233) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix error `Block structure mismatch in QueryPipeline` while reading from `VIEW` with constants in inner query. Fixes [#11181](https://github.com/ClickHouse/ClickHouse/issues/11181). [#11205](https://github.com/ClickHouse/ClickHouse/pull/11205) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix possible exception `Invalid status for associated output`. [#11200](https://github.com/ClickHouse/ClickHouse/pull/11200) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix possible error `Cannot capture column` for higher-order functions with `Array(Array(LowCardinality))` captured argument. [#11185](https://github.com/ClickHouse/ClickHouse/pull/11185) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed S3 globbing which could fail in case of more than 1000 keys and some backends. [#11179](https://github.com/ClickHouse/ClickHouse/pull/11179) ([Vladimir Chebotarev](https://github.com/excitoon)). +* If data skipping index is dependent on columns that are going to be modified during background merge (for SummingMergeTree, AggregatingMergeTree as well as for TTL GROUP BY), it was calculated incorrectly. This issue is fixed by moving index calculation after merge so the index is calculated on merged data. [#11162](https://github.com/ClickHouse/ClickHouse/pull/11162) ([Azat Khuzhin](https://github.com/azat)). +* Fix excessive reserving of threads for simple queries (optimization for reducing the number of threads, which was partly broken after changes in pipeline). [#11114](https://github.com/ClickHouse/ClickHouse/pull/11114) ([Azat Khuzhin](https://github.com/azat)). +* Fix predicates optimization for distributed queries (`enable_optimize_predicate_expression=1`) for queries with `HAVING` section (i.e. when filtering on the server initiator is required), by preserving the order of expressions (and this is enough to fix), and also force aggregator use column names over indexes. Fixes: [#10613](https://github.com/ClickHouse/ClickHouse/issues/10613), [#11413](https://github.com/ClickHouse/ClickHouse/issues/11413). [#10621](https://github.com/ClickHouse/ClickHouse/pull/10621) ([Azat Khuzhin](https://github.com/azat)). +* Introduce commit retry logic to decrease the possibility of getting duplicates from Kafka in rare cases when offset commit was failed. [#9884](https://github.com/ClickHouse/ClickHouse/pull/9884) ([filimonov](https://github.com/filimonov)). + +#### Performance Improvement + +* Get dictionary and check access rights only once per each call of any function reading external dictionaries. [#10928](https://github.com/ClickHouse/ClickHouse/pull/10928) ([Vitaly Baranov](https://github.com/vitlibar)). + +#### Build/Testing/Packaging Improvement + +* Fix several flaky integration tests. [#11355](https://github.com/ClickHouse/ClickHouse/pull/11355) ([alesapin](https://github.com/alesapin)). + +### ClickHouse release v20.3.10.75-lts 2020-05-23 + +#### Bug Fix + +* Removed logging from mutation finalization task if nothing was finalized. [#11109](https://github.com/ClickHouse/ClickHouse/pull/11109) ([alesapin](https://github.com/alesapin)). +* Fixed `parseDateTime64BestEffort` argument resolution bugs. [#11038](https://github.com/ClickHouse/ClickHouse/pull/11038) ([Vasily Nemkov](https://github.com/Enmk)). +* Fixed incorrect raw data size in method `getRawData()`. [#10964](https://github.com/ClickHouse/ClickHouse/pull/10964) ([Igr](https://github.com/ObjatieGroba)). +* Fixed incompatibility of two-level aggregation between versions 20.1 and earlier. This incompatibility happens when different versions of ClickHouse are used on initiator node and remote nodes and the size of `GROUP BY` result is large and aggregation is performed by a single `String` field. It leads to several unmerged rows for a single key in result. [#10952](https://github.com/ClickHouse/ClickHouse/pull/10952) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed backward compatibility with tuples in `Distributed` tables. [#10889](https://github.com/ClickHouse/ClickHouse/pull/10889) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed `SIGSEGV` in `StringHashTable` if such a key does not exist. [#10870](https://github.com/ClickHouse/ClickHouse/pull/10870) ([Azat Khuzhin](https://github.com/azat)). +* Fixed bug in `ReplicatedMergeTree` which might cause some `ALTER` on `OPTIMIZE` query to hang waiting for some replica after it become inactive. [#10849](https://github.com/ClickHouse/ClickHouse/pull/10849) ([tavplubix](https://github.com/tavplubix)). +* Fixed columns order after `Block::sortColumns()`. [#10826](https://github.com/ClickHouse/ClickHouse/pull/10826) ([Azat Khuzhin](https://github.com/azat)). +* Fixed the issue with `ODBC` bridge when no quoting of identifiers is requested. Fixes [#7984](https://github.com/ClickHouse/ClickHouse/issues/7984). [#10821](https://github.com/ClickHouse/ClickHouse/pull/10821) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `UBSan` and `MSan` report in `DateLUT`. [#10798](https://github.com/ClickHouse/ClickHouse/pull/10798) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed incorrect type conversion in key conditions. Fixes [#6287](https://github.com/ClickHouse/ClickHouse/issues/6287). [#10791](https://github.com/ClickHouse/ClickHouse/pull/10791) ([Andrew Onyshchuk](https://github.com/oandrew)) +* Fixed `parallel_view_processing` behavior. Now all insertions into `MATERIALIZED VIEW` without exception should be finished if exception happened. Fixes [#10241](https://github.com/ClickHouse/ClickHouse/issues/10241). [#10757](https://github.com/ClickHouse/ClickHouse/pull/10757) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed combinator -`OrNull` and `-OrDefault` when combined with `-State`. [#10741](https://github.com/ClickHouse/ClickHouse/pull/10741) ([hcz](https://github.com/hczhcz)). +* Fixed crash in `generateRandom` with nested types. Fixes [#10583](https://github.com/ClickHouse/ClickHouse/issues/10583). [#10734](https://github.com/ClickHouse/ClickHouse/pull/10734) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed data corruption for `LowCardinality(FixedString)` key column in `SummingMergeTree` which could have happened after merge. Fixes [#10489](https://github.com/ClickHouse/ClickHouse/issues/10489). [#10721](https://github.com/ClickHouse/ClickHouse/pull/10721) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed possible buffer overflow in function `h3EdgeAngle`. [#10711](https://github.com/ClickHouse/ClickHouse/pull/10711) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed disappearing totals. Totals could have being filtered if query had had join or subquery with external where condition. Fixes [#10674](https://github.com/ClickHouse/ClickHouse/issues/10674). [#10698](https://github.com/ClickHouse/ClickHouse/pull/10698) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed multiple usages of `IN` operator with the identical set in one query. [#10686](https://github.com/ClickHouse/ClickHouse/pull/10686) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed bug, which causes http requests stuck on client close when `readonly=2` and `cancel_http_readonly_queries_on_client_close=1`. Fixes [#7939](https://github.com/ClickHouse/ClickHouse/issues/7939), [#7019](https://github.com/ClickHouse/ClickHouse/issues/7019), [#7736](https://github.com/ClickHouse/ClickHouse/issues/7736), [#7091](https://github.com/ClickHouse/ClickHouse/issues/7091). [#10684](https://github.com/ClickHouse/ClickHouse/pull/10684) ([tavplubix](https://github.com/tavplubix)). +* Fixed order of parameters in `AggregateTransform` constructor. [#10667](https://github.com/ClickHouse/ClickHouse/pull/10667) ([palasonic1](https://github.com/palasonic1)). +* Fixed the lack of parallel execution of remote queries with `distributed_aggregation_memory_efficient` enabled. Fixes [#10655](https://github.com/ClickHouse/ClickHouse/issues/10655). [#10664](https://github.com/ClickHouse/ClickHouse/pull/10664) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed possible incorrect number of rows for queries with `LIMIT`. Fixes [#10566](https://github.com/ClickHouse/ClickHouse/issues/10566), [#10709](https://github.com/ClickHouse/ClickHouse/issues/10709). [#10660](https://github.com/ClickHouse/ClickHouse/pull/10660) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed a bug which locks concurrent alters when table has a lot of parts. [#10659](https://github.com/ClickHouse/ClickHouse/pull/10659) ([alesapin](https://github.com/alesapin)). +* Fixed a bug when on `SYSTEM DROP DNS CACHE` query also drop caches, which are used to check if user is allowed to connect from some IP addresses. [#10608](https://github.com/ClickHouse/ClickHouse/pull/10608) ([tavplubix](https://github.com/tavplubix)). +* Fixed incorrect scalar results inside inner query of `MATERIALIZED VIEW` in case if this query contained dependent table. [#10603](https://github.com/ClickHouse/ClickHouse/pull/10603) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed `SELECT` of column `ALIAS` which default expression type different from column type. [#10563](https://github.com/ClickHouse/ClickHouse/pull/10563) ([Azat Khuzhin](https://github.com/azat)). +* Implemented comparison between DateTime64 and String values. [#10560](https://github.com/ClickHouse/ClickHouse/pull/10560) ([Vasily Nemkov](https://github.com/Enmk)). +* Fixed index corruption, which may occur in some cases after merge compact parts into another compact part. [#10531](https://github.com/ClickHouse/ClickHouse/pull/10531) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed the situation, when mutation finished all parts, but hung up in `is_done=0`. [#10526](https://github.com/ClickHouse/ClickHouse/pull/10526) ([alesapin](https://github.com/alesapin)). +* Fixed overflow at beginning of unix epoch for timezones with fractional offset from `UTC`. This fixes [#9335](https://github.com/ClickHouse/ClickHouse/issues/9335). [#10513](https://github.com/ClickHouse/ClickHouse/pull/10513) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed improper shutdown of `Distributed` storage. [#10491](https://github.com/ClickHouse/ClickHouse/pull/10491) ([Azat Khuzhin](https://github.com/azat)). +* Fixed numeric overflow in `simpleLinearRegression` over large integers. [#10474](https://github.com/ClickHouse/ClickHouse/pull/10474) ([hcz](https://github.com/hczhcz)). + + +#### Build/Testing/Packaging Improvement + +* Fix UBSan report in LZ4 library. [#10631](https://github.com/ClickHouse/ClickHouse/pull/10631) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix clang-10 build. [#10238](https://github.com/ClickHouse/ClickHouse/issues/10238). [#10370](https://github.com/ClickHouse/ClickHouse/pull/10370) ([Amos Bird](https://github.com/amosbird)). +* Added failing tests about `max_rows_to_sort` setting. [#10268](https://github.com/ClickHouse/ClickHouse/pull/10268) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added some improvements in printing diagnostic info in input formats. Fixes [#10204](https://github.com/ClickHouse/ClickHouse/issues/10204). [#10418](https://github.com/ClickHouse/ClickHouse/pull/10418) ([tavplubix](https://github.com/tavplubix)). +* Added CA certificates to clickhouse-server docker image. [#10476](https://github.com/ClickHouse/ClickHouse/pull/10476) ([filimonov](https://github.com/filimonov)). + +#### Bug fix + +* Fix error `the BloomFilter false positive must be a double number between 0 and 1` [#10551](https://github.com/ClickHouse/ClickHouse/issues/10551). [#10569](https://github.com/ClickHouse/ClickHouse/pull/10569) ([Winter Zhang](https://github.com/zhang2014)). + + +### ClickHouse release v20.3.8.53, 2020-04-23 + +#### Bug Fix +* Fixed wrong behaviour of datetime functions for timezones that has altered between positive and negative offsets from UTC (e.g. Pacific/Kiritimati). This fixes [#7202](https://github.com/ClickHouse/ClickHouse/issues/7202) [#10369](https://github.com/ClickHouse/ClickHouse/pull/10369) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix possible segfault with `distributed_group_by_no_merge` enabled (introduced in 20.3.7.46 by [#10131](https://github.com/ClickHouse/ClickHouse/issues/10131)). [#10399](https://github.com/ClickHouse/ClickHouse/pull/10399) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix wrong flattening of `Array(Tuple(...))` data types. This fixes [#10259](https://github.com/ClickHouse/ClickHouse/issues/10259) [#10390](https://github.com/ClickHouse/ClickHouse/pull/10390) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Drop disks reservation in Aggregator. This fixes bug in disk space reservation, which may cause big external aggregation to fail even if it could be completed successfully [#10375](https://github.com/ClickHouse/ClickHouse/pull/10375) ([Azat Khuzhin](https://github.com/azat)) +* Fixed `DROP` vs `OPTIMIZE` race in `ReplicatedMergeTree`. `DROP` could left some garbage in replica path in ZooKeeper if there was concurrent `OPTIMIZE` query. [#10312](https://github.com/ClickHouse/ClickHouse/pull/10312) ([tavplubix](https://github.com/tavplubix)) +* Fix bug when server cannot attach table after column default was altered. [#10441](https://github.com/ClickHouse/ClickHouse/pull/10441) ([alesapin](https://github.com/alesapin)) +* Do not remove metadata directory when attach database fails before loading tables. [#10442](https://github.com/ClickHouse/ClickHouse/pull/10442) ([Winter Zhang](https://github.com/zhang2014)) +* Fixed several bugs when some data was inserted with quorum, then deleted somehow (DROP PARTITION, TTL) and this leaded to the stuck of INSERTs or false-positive exceptions in SELECTs. This fixes [#9946](https://github.com/ClickHouse/ClickHouse/issues/9946) [#10188](https://github.com/ClickHouse/ClickHouse/pull/10188) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Fix possible `Pipeline stuck` error in `ConcatProcessor` which could have happened in remote query. [#10381](https://github.com/ClickHouse/ClickHouse/pull/10381) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fixed wrong behavior in HashTable that caused compilation error when trying to read HashMap from buffer. [#10386](https://github.com/ClickHouse/ClickHouse/pull/10386) ([palasonic1](https://github.com/palasonic1)) +* Allow to use `count(*)` with multiple JOINs. Fixes [#9853](https://github.com/ClickHouse/ClickHouse/issues/9853) [#10291](https://github.com/ClickHouse/ClickHouse/pull/10291) ([Artem Zuikov](https://github.com/4ertus2)) +* Prefer `fallback_to_stale_replicas` over `skip_unavailable_shards`, otherwise when both settings specified and there are no up-to-date replicas the query will fail (patch from @alex-zaitsev). Fixes: [#2564](https://github.com/ClickHouse/ClickHouse/issues/2564). [#10422](https://github.com/ClickHouse/ClickHouse/pull/10422) ([Azat Khuzhin](https://github.com/azat)) +* Fix the issue when a query with ARRAY JOIN, ORDER BY and LIMIT may return incomplete result. This fixes [#10226](https://github.com/ClickHouse/ClickHouse/issues/10226). Author: [Vadim Plakhtinskiy](https://github.com/VadimPlh). [#10427](https://github.com/ClickHouse/ClickHouse/pull/10427) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Check the number and type of arguments when creating BloomFilter index [#9623](https://github.com/ClickHouse/ClickHouse/issues/9623) [#10431](https://github.com/ClickHouse/ClickHouse/pull/10431) ([Winter Zhang](https://github.com/zhang2014)) + +#### Performance Improvement +* Improved performance of queries with explicitly defined sets at right side of `IN` operator and tuples in the left side. This fixes performance regression in version 20.3. [#9740](https://github.com/ClickHouse/ClickHouse/pull/9740), [#10385](https://github.com/ClickHouse/ClickHouse/pull/10385) ([Anton Popov](https://github.com/CurtizJ)) + +### ClickHouse release v20.3.7.46, 2020-04-17 + +#### Bug Fix + +* Fix `Logical error: CROSS JOIN has expressions` error for queries with comma and names joins mix. [#10311](https://github.com/ClickHouse/ClickHouse/pull/10311) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix queries with `max_bytes_before_external_group_by`. [#10302](https://github.com/ClickHouse/ClickHouse/pull/10302) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix move-to-prewhere optimization in presense of arrayJoin functions (in certain cases). This fixes [#10092](https://github.com/ClickHouse/ClickHouse/issues/10092). [#10195](https://github.com/ClickHouse/ClickHouse/pull/10195) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add the ability to relax the restriction on non-deterministic functions usage in mutations with `allow_nondeterministic_mutations` setting. [#10186](https://github.com/ClickHouse/ClickHouse/pull/10186) ([filimonov](https://github.com/filimonov)). + +### ClickHouse release v20.3.6.40, 2020-04-16 + +#### New Feature + +* Added function `isConstant`. This function checks whether its argument is constant expression and returns 1 or 0. It is intended for development, debugging and demonstration purposes. [#10198](https://github.com/ClickHouse/ClickHouse/pull/10198) ([alexey-milovidov](https://github.com/alexey-milovidov)). + +#### Bug Fix + +* Fix error `Pipeline stuck` with `max_rows_to_group_by` and `group_by_overflow_mode = 'break'`. [#10279](https://github.com/ClickHouse/ClickHouse/pull/10279) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix rare possible exception `Cannot drain connections: cancel first`. [#10239](https://github.com/ClickHouse/ClickHouse/pull/10239) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed bug where ClickHouse would throw "Unknown function lambda." error message when user tries to run ALTER UPDATE/DELETE on tables with ENGINE = Replicated*. Check for nondeterministic functions now handles lambda expressions correctly. [#10237](https://github.com/ClickHouse/ClickHouse/pull/10237) ([Alexander Kazakov](https://github.com/Akazz)). +* Fixed "generateRandom" function for Date type. This fixes [#9973](https://github.com/ClickHouse/ClickHouse/issues/9973). Fix an edge case when dates with year 2106 are inserted to MergeTree tables with old-style partitioning but partitions are named with year 1970. [#10218](https://github.com/ClickHouse/ClickHouse/pull/10218) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Convert types if the table definition of a View does not correspond to the SELECT query. This fixes [#10180](https://github.com/ClickHouse/ClickHouse/issues/10180) and [#10022](https://github.com/ClickHouse/ClickHouse/issues/10022). [#10217](https://github.com/ClickHouse/ClickHouse/pull/10217) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `parseDateTimeBestEffort` for strings in RFC-2822 when day of week is Tuesday or Thursday. This fixes [#10082](https://github.com/ClickHouse/ClickHouse/issues/10082). [#10214](https://github.com/ClickHouse/ClickHouse/pull/10214) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix column names of constants inside JOIN that may clash with names of constants outside of JOIN. [#10207](https://github.com/ClickHouse/ClickHouse/pull/10207) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix possible inifinite query execution when the query actually should stop on LIMIT, while reading from infinite source like `system.numbers` or `system.zeros`. [#10206](https://github.com/ClickHouse/ClickHouse/pull/10206) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix using the current database for access checking when the database isn't specified. [#10192](https://github.com/ClickHouse/ClickHouse/pull/10192) ([Vitaly Baranov](https://github.com/vitlibar)). +* Convert blocks if structure does not match on INSERT into Distributed(). [#10135](https://github.com/ClickHouse/ClickHouse/pull/10135) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible incorrect result for extremes in processors pipeline. [#10131](https://github.com/ClickHouse/ClickHouse/pull/10131) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix some kinds of alters with compact parts. [#10130](https://github.com/ClickHouse/ClickHouse/pull/10130) ([Anton Popov](https://github.com/CurtizJ)). +* Fix incorrect `index_granularity_bytes` check while creating new replica. Fixes [#10098](https://github.com/ClickHouse/ClickHouse/issues/10098). [#10121](https://github.com/ClickHouse/ClickHouse/pull/10121) ([alesapin](https://github.com/alesapin)). +* Fix SIGSEGV on INSERT into Distributed table when its structure differs from the underlying tables. [#10105](https://github.com/ClickHouse/ClickHouse/pull/10105) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible rows loss for queries with `JOIN` and `UNION ALL`. Fixes [#9826](https://github.com/ClickHouse/ClickHouse/issues/9826), [#10113](https://github.com/ClickHouse/ClickHouse/issues/10113). [#10099](https://github.com/ClickHouse/ClickHouse/pull/10099) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed replicated tables startup when updating from an old ClickHouse version where `/table/replicas/replica_name/metadata` node does not exist. Fixes [#10037](https://github.com/ClickHouse/ClickHouse/issues/10037). [#10095](https://github.com/ClickHouse/ClickHouse/pull/10095) ([alesapin](https://github.com/alesapin)). +* Add some arguments check and support identifier arguments for MySQL Database Engine. [#10077](https://github.com/ClickHouse/ClickHouse/pull/10077) ([Winter Zhang](https://github.com/zhang2014)). +* Fix bug in clickhouse dictionary source from localhost clickhouse server. The bug may lead to memory corruption if types in dictionary and source are not compatible. [#10071](https://github.com/ClickHouse/ClickHouse/pull/10071) ([alesapin](https://github.com/alesapin)). +* Fix bug in `CHECK TABLE` query when table contain skip indices. [#10068](https://github.com/ClickHouse/ClickHouse/pull/10068) ([alesapin](https://github.com/alesapin)). +* Fix error `Cannot clone block with columns because block has 0 columns ... While executing GroupingAggregatedTransform`. It happened when setting `distributed_aggregation_memory_efficient` was enabled, and distributed query read aggregating data with different level from different shards (mixed single and two level aggregation). [#10063](https://github.com/ClickHouse/ClickHouse/pull/10063) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix a segmentation fault that could occur in GROUP BY over string keys containing trailing zero bytes ([#8636](https://github.com/ClickHouse/ClickHouse/issues/8636), [#8925](https://github.com/ClickHouse/ClickHouse/issues/8925)). [#10025](https://github.com/ClickHouse/ClickHouse/pull/10025) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fix the number of threads used for remote query execution (performance regression, since 20.3). This happened when query from `Distributed` table was executed simultaneously on local and remote shards. Fixes [#9965](https://github.com/ClickHouse/ClickHouse/issues/9965). [#9971](https://github.com/ClickHouse/ClickHouse/pull/9971) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bug in which the necessary tables weren't retrieved at one of the processing stages of queries to some databases. Fixes [#9699](https://github.com/ClickHouse/ClickHouse/issues/9699). [#9949](https://github.com/ClickHouse/ClickHouse/pull/9949) ([achulkov2](https://github.com/achulkov2)). +* Fix 'Not found column in block' error when `JOIN` appears with `TOTALS`. Fixes [#9839](https://github.com/ClickHouse/ClickHouse/issues/9839). [#9939](https://github.com/ClickHouse/ClickHouse/pull/9939) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix a bug with `ON CLUSTER` DDL queries freezing on server startup. [#9927](https://github.com/ClickHouse/ClickHouse/pull/9927) ([Gagan Arneja](https://github.com/garneja)). +* Fix parsing multiple hosts set in the CREATE USER command, e.g. `CREATE USER user6 HOST NAME REGEXP 'lo.?*host', NAME REGEXP 'lo*host'`. [#9924](https://github.com/ClickHouse/ClickHouse/pull/9924) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix `TRUNCATE` for Join table engine ([#9917](https://github.com/ClickHouse/ClickHouse/issues/9917)). [#9920](https://github.com/ClickHouse/ClickHouse/pull/9920) ([Amos Bird](https://github.com/amosbird)). +* Fix "scalar does not exist" error in ALTERs ([#9878](https://github.com/ClickHouse/ClickHouse/issues/9878)). [#9904](https://github.com/ClickHouse/ClickHouse/pull/9904) ([Amos Bird](https://github.com/amosbird)). +* Fix race condition between drop and optimize in `ReplicatedMergeTree`. [#9901](https://github.com/ClickHouse/ClickHouse/pull/9901) ([alesapin](https://github.com/alesapin)). +* Fix error with qualified names in `distributed_product_mode='local'`. Fixes [#4756](https://github.com/ClickHouse/ClickHouse/issues/4756). [#9891](https://github.com/ClickHouse/ClickHouse/pull/9891) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix calculating grants for introspection functions from the setting 'allow_introspection_functions'. [#9840](https://github.com/ClickHouse/ClickHouse/pull/9840) ([Vitaly Baranov](https://github.com/vitlibar)). + +#### Build/Testing/Packaging Improvement + +* Fix integration test `test_settings_constraints`. [#9962](https://github.com/ClickHouse/ClickHouse/pull/9962) ([Vitaly Baranov](https://github.com/vitlibar)). +* Removed dependency on `clock_getres`. [#9833](https://github.com/ClickHouse/ClickHouse/pull/9833) ([alexey-milovidov](https://github.com/alexey-milovidov)). + + +### ClickHouse release v20.3.5.21, 2020-03-27 + +#### Bug Fix + +* Fix 'Different expressions with the same alias' error when query has PREWHERE and WHERE on distributed table and `SET distributed_product_mode = 'local'`. [#9871](https://github.com/ClickHouse/ClickHouse/pull/9871) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix mutations excessive memory consumption for tables with a composite primary key. This fixes [#9850](https://github.com/ClickHouse/ClickHouse/issues/9850). [#9860](https://github.com/ClickHouse/ClickHouse/pull/9860) ([alesapin](https://github.com/alesapin)). +* For INSERT queries shard now clamps the settings got from the initiator to the shard's constaints instead of throwing an exception. This fix allows to send INSERT queries to a shard with another constraints. This change improves fix [#9447](https://github.com/ClickHouse/ClickHouse/issues/9447). [#9852](https://github.com/ClickHouse/ClickHouse/pull/9852) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix 'COMMA to CROSS JOIN rewriter is not enabled or cannot rewrite query' error in case of subqueries with COMMA JOIN out of tables lists (i.e. in WHERE). Fixes [#9782](https://github.com/ClickHouse/ClickHouse/issues/9782). [#9830](https://github.com/ClickHouse/ClickHouse/pull/9830) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix possible exception `Got 0 in totals chunk, expected 1` on client. It happened for queries with `JOIN` in case if right joined table had zero rows. Example: `select * from system.one t1 join system.one t2 on t1.dummy = t2.dummy limit 0 FORMAT TabSeparated;`. Fixes [#9777](https://github.com/ClickHouse/ClickHouse/issues/9777). [#9823](https://github.com/ClickHouse/ClickHouse/pull/9823) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix SIGSEGV with optimize_skip_unused_shards when type cannot be converted. [#9804](https://github.com/ClickHouse/ClickHouse/pull/9804) ([Azat Khuzhin](https://github.com/azat)). +* Fix broken `ALTER TABLE DELETE COLUMN` query for compact parts. [#9779](https://github.com/ClickHouse/ClickHouse/pull/9779) ([alesapin](https://github.com/alesapin)). +* Fix max_distributed_connections (w/ and w/o Processors). [#9673](https://github.com/ClickHouse/ClickHouse/pull/9673) ([Azat Khuzhin](https://github.com/azat)). +* Fixed a few cases when timezone of the function argument wasn't used properly. [#9574](https://github.com/ClickHouse/ClickHouse/pull/9574) ([Vasily Nemkov](https://github.com/Enmk)). + +#### Improvement + +* Remove order by stage from mutations because we read from a single ordered part in a single thread. Also add check that the order of rows in mutation is ordered in sorting key order and this order is not violated. [#9886](https://github.com/ClickHouse/ClickHouse/pull/9886) ([alesapin](https://github.com/alesapin)). + + +### ClickHouse release v20.3.4.10, 2020-03-20 + +#### Bug Fix +* This release also contains all bug fixes from 20.1.8.41 +* Fix missing `rows_before_limit_at_least` for queries over http (with processors pipeline). This fixes [#9730](https://github.com/ClickHouse/ClickHouse/issues/9730). [#9757](https://github.com/ClickHouse/ClickHouse/pull/9757) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) + + +### ClickHouse release v20.3.3.6, 2020-03-17 + +#### Bug Fix +* This release also contains all bug fixes from 20.1.7.38 +* Fix bug in a replication that does not allow replication to work if the user has executed mutations on the previous version. This fixes [#9645](https://github.com/ClickHouse/ClickHouse/issues/9645). [#9652](https://github.com/ClickHouse/ClickHouse/pull/9652) ([alesapin](https://github.com/alesapin)). It makes version 20.3 backward compatible again. +* Add setting `use_compact_format_in_distributed_parts_names` which allows to write files for `INSERT` queries into `Distributed` table with more compact format. This fixes [#9647](https://github.com/ClickHouse/ClickHouse/issues/9647). [#9653](https://github.com/ClickHouse/ClickHouse/pull/9653) ([alesapin](https://github.com/alesapin)). It makes version 20.3 backward compatible again. + +### ClickHouse release v20.3.2.1, 2020-03-12 + +#### Backward Incompatible Change + +* Fixed the issue `file name too long` when sending data for `Distributed` tables for a large number of replicas. Fixed the issue that replica credentials were exposed in the server log. The format of directory name on disk was changed to `[shard{shard_index}[_replica{replica_index}]]`. [#8911](https://github.com/ClickHouse/ClickHouse/pull/8911) ([Mikhail Korotov](https://github.com/millb)) After you upgrade to the new version, you will not be able to downgrade without manual intervention, because old server version does not recognize the new directory format. If you want to downgrade, you have to manually rename the corresponding directories to the old format. This change is relevant only if you have used asynchronous `INSERT`s to `Distributed` tables. In the version 20.3.3 we will introduce a setting that will allow you to enable the new format gradually. +* Changed the format of replication log entries for mutation commands. You have to wait for old mutations to process before installing the new version. +* Implement simple memory profiler that dumps stacktraces to `system.trace_log` every N bytes over soft allocation limit [#8765](https://github.com/ClickHouse/ClickHouse/pull/8765) ([Ivan](https://github.com/abyss7)) [#9472](https://github.com/ClickHouse/ClickHouse/pull/9472) ([alexey-milovidov](https://github.com/alexey-milovidov)) The column of `system.trace_log` was renamed from `timer_type` to `trace_type`. This will require changes in third-party performance analysis and flamegraph processing tools. +* Use OS thread id everywhere instead of internal thread number. This fixes [#7477](https://github.com/ClickHouse/ClickHouse/issues/7477) Old `clickhouse-client` cannot receive logs that are send from the server when the setting `send_logs_level` is enabled, because the names and types of the structured log messages were changed. On the other hand, different server versions can send logs with different types to each other. When you don't use the `send_logs_level` setting, you should not care. [#8954](https://github.com/ClickHouse/ClickHouse/pull/8954) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Remove `indexHint` function [#9542](https://github.com/ClickHouse/ClickHouse/pull/9542) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Remove `findClusterIndex`, `findClusterValue` functions. This fixes [#8641](https://github.com/ClickHouse/ClickHouse/issues/8641). If you were using these functions, send an email to `clickhouse-feedback@yandex-team.com` [#9543](https://github.com/ClickHouse/ClickHouse/pull/9543) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Now it's not allowed to create columns or add columns with `SELECT` subquery as default expression. [#9481](https://github.com/ClickHouse/ClickHouse/pull/9481) ([alesapin](https://github.com/alesapin)) +* Require aliases for subqueries in JOIN. [#9274](https://github.com/ClickHouse/ClickHouse/pull/9274) ([Artem Zuikov](https://github.com/4ertus2)) +* Improved `ALTER MODIFY/ADD` queries logic. Now you cannot `ADD` column without type, `MODIFY` default expression does not change type of column and `MODIFY` type does not loose default expression value. Fixes [#8669](https://github.com/ClickHouse/ClickHouse/issues/8669). [#9227](https://github.com/ClickHouse/ClickHouse/pull/9227) ([alesapin](https://github.com/alesapin)) +* Require server to be restarted to apply the changes in logging configuration. This is a temporary workaround to avoid the bug where the server logs to a deleted log file (see [#8696](https://github.com/ClickHouse/ClickHouse/issues/8696)). [#8707](https://github.com/ClickHouse/ClickHouse/pull/8707) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* The setting `experimental_use_processors` is enabled by default. This setting enables usage of the new query pipeline. This is internal refactoring and we expect no visible changes. If you will see any issues, set it to back zero. [#8768](https://github.com/ClickHouse/ClickHouse/pull/8768) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### New Feature +* Add `Avro` and `AvroConfluent` input/output formats [#8571](https://github.com/ClickHouse/ClickHouse/pull/8571) ([Andrew Onyshchuk](https://github.com/oandrew)) [#8957](https://github.com/ClickHouse/ClickHouse/pull/8957) ([Andrew Onyshchuk](https://github.com/oandrew)) [#8717](https://github.com/ClickHouse/ClickHouse/pull/8717) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Multi-threaded and non-blocking updates of expired keys in `cache` dictionaries (with optional permission to read old ones). [#8303](https://github.com/ClickHouse/ClickHouse/pull/8303) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Add query `ALTER ... MATERIALIZE TTL`. It runs mutation that forces to remove expired data by TTL and recalculates meta-information about TTL in all parts. [#8775](https://github.com/ClickHouse/ClickHouse/pull/8775) ([Anton Popov](https://github.com/CurtizJ)) +* Switch from HashJoin to MergeJoin (on disk) if needed [#9082](https://github.com/ClickHouse/ClickHouse/pull/9082) ([Artem Zuikov](https://github.com/4ertus2)) +* Added `MOVE PARTITION` command for `ALTER TABLE` [#4729](https://github.com/ClickHouse/ClickHouse/issues/4729) [#6168](https://github.com/ClickHouse/ClickHouse/pull/6168) ([Guillaume Tassery](https://github.com/YiuRULE)) +* Reloading storage configuration from configuration file on the fly. [#8594](https://github.com/ClickHouse/ClickHouse/pull/8594) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Allowed to change `storage_policy` to not less rich one. [#8107](https://github.com/ClickHouse/ClickHouse/pull/8107) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Added support for globs/wildcards for S3 storage and table function. [#8851](https://github.com/ClickHouse/ClickHouse/pull/8851) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Implement `bitAnd`, `bitOr`, `bitXor`, `bitNot` for `FixedString(N)` datatype. [#9091](https://github.com/ClickHouse/ClickHouse/pull/9091) ([Guillaume Tassery](https://github.com/YiuRULE)) +* Added function `bitCount`. This fixes [#8702](https://github.com/ClickHouse/ClickHouse/issues/8702). [#8708](https://github.com/ClickHouse/ClickHouse/pull/8708) ([alexey-milovidov](https://github.com/alexey-milovidov)) [#8749](https://github.com/ClickHouse/ClickHouse/pull/8749) ([ikopylov](https://github.com/ikopylov)) +* Add `generateRandom` table function to generate random rows with given schema. Allows to populate arbitrary test table with data. [#8994](https://github.com/ClickHouse/ClickHouse/pull/8994) ([Ilya Yatsishin](https://github.com/qoega)) +* `JSONEachRowFormat`: support special case when objects enclosed in top-level array. [#8860](https://github.com/ClickHouse/ClickHouse/pull/8860) ([Kruglov Pavel](https://github.com/Avogar)) +* Now it's possible to create a column with `DEFAULT` expression which depends on a column with default `ALIAS` expression. [#9489](https://github.com/ClickHouse/ClickHouse/pull/9489) ([alesapin](https://github.com/alesapin)) +* Allow to specify `--limit` more than the source data size in `clickhouse-obfuscator`. The data will repeat itself with different random seed. [#9155](https://github.com/ClickHouse/ClickHouse/pull/9155) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added `groupArraySample` function (similar to `groupArray`) with reservior sampling algorithm. [#8286](https://github.com/ClickHouse/ClickHouse/pull/8286) ([Amos Bird](https://github.com/amosbird)) +* Now you can monitor the size of update queue in `cache`/`complex_key_cache` dictionaries via system metrics. [#9413](https://github.com/ClickHouse/ClickHouse/pull/9413) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Allow to use CRLF as a line separator in CSV output format with setting `output_format_csv_crlf_end_of_line` is set to 1 [#8934](https://github.com/ClickHouse/ClickHouse/pull/8934) [#8935](https://github.com/ClickHouse/ClickHouse/pull/8935) [#8963](https://github.com/ClickHouse/ClickHouse/pull/8963) ([Mikhail Korotov](https://github.com/millb)) +* Implement more functions of the [H3](https://github.com/uber/h3) API: `h3GetBaseCell`, `h3HexAreaM2`, `h3IndexesAreNeighbors`, `h3ToChildren`, `h3ToString` and `stringToH3` [#8938](https://github.com/ClickHouse/ClickHouse/pull/8938) ([Nico Mandery](https://github.com/nmandery)) +* New setting introduced: `max_parser_depth` to control maximum stack size and allow large complex queries. This fixes [#6681](https://github.com/ClickHouse/ClickHouse/issues/6681) and [#7668](https://github.com/ClickHouse/ClickHouse/issues/7668). [#8647](https://github.com/ClickHouse/ClickHouse/pull/8647) ([Maxim Smirnov](https://github.com/qMBQx8GH)) +* Add a setting `force_optimize_skip_unused_shards` setting to throw if skipping of unused shards is not possible [#8805](https://github.com/ClickHouse/ClickHouse/pull/8805) ([Azat Khuzhin](https://github.com/azat)) +* Allow to configure multiple disks/volumes for storing data for send in `Distributed` engine [#8756](https://github.com/ClickHouse/ClickHouse/pull/8756) ([Azat Khuzhin](https://github.com/azat)) +* Support storage policy (``) for storing temporary data. [#8750](https://github.com/ClickHouse/ClickHouse/pull/8750) ([Azat Khuzhin](https://github.com/azat)) +* Added `X-ClickHouse-Exception-Code` HTTP header that is set if exception was thrown before sending data. This implements [#4971](https://github.com/ClickHouse/ClickHouse/issues/4971). [#8786](https://github.com/ClickHouse/ClickHouse/pull/8786) ([Mikhail Korotov](https://github.com/millb)) +* Added function `ifNotFinite`. It is just a syntactic sugar: `ifNotFinite(x, y) = isFinite(x) ? x : y`. [#8710](https://github.com/ClickHouse/ClickHouse/pull/8710) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added `last_successful_update_time` column in `system.dictionaries` table [#9394](https://github.com/ClickHouse/ClickHouse/pull/9394) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Add `blockSerializedSize` function (size on disk without compression) [#8952](https://github.com/ClickHouse/ClickHouse/pull/8952) ([Azat Khuzhin](https://github.com/azat)) +* Add function `moduloOrZero` [#9358](https://github.com/ClickHouse/ClickHouse/pull/9358) ([hcz](https://github.com/hczhcz)) +* Added system tables `system.zeros` and `system.zeros_mt` as well as tale functions `zeros()` and `zeros_mt()`. Tables (and table functions) contain single column with name `zero` and type `UInt8`. This column contains zeros. It is needed for test purposes as the fastest method to generate many rows. This fixes [#6604](https://github.com/ClickHouse/ClickHouse/issues/6604) [#9593](https://github.com/ClickHouse/ClickHouse/pull/9593) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) + +#### Experimental Feature +* Add new compact format of parts in `MergeTree`-family tables in which all columns are stored in one file. It helps to increase performance of small and frequent inserts. The old format (one file per column) is now called wide. Data storing format is controlled by settings `min_bytes_for_wide_part` and `min_rows_for_wide_part`. [#8290](https://github.com/ClickHouse/ClickHouse/pull/8290) ([Anton Popov](https://github.com/CurtizJ)) +* Support for S3 storage for `Log`, `TinyLog` and `StripeLog` tables. [#8862](https://github.com/ClickHouse/ClickHouse/pull/8862) ([Pavel Kovalenko](https://github.com/Jokser)) + +#### Bug Fix +* Fixed inconsistent whitespaces in log messages. [#9322](https://github.com/ClickHouse/ClickHouse/pull/9322) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix bug in which arrays of unnamed tuples were flattened as Nested structures on table creation. [#8866](https://github.com/ClickHouse/ClickHouse/pull/8866) ([achulkov2](https://github.com/achulkov2)) +* Fixed the issue when "Too many open files" error may happen if there are too many files matching glob pattern in `File` table or `file` table function. Now files are opened lazily. This fixes [#8857](https://github.com/ClickHouse/ClickHouse/issues/8857) [#8861](https://github.com/ClickHouse/ClickHouse/pull/8861) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* DROP TEMPORARY TABLE now drops only temporary table. [#8907](https://github.com/ClickHouse/ClickHouse/pull/8907) ([Vitaly Baranov](https://github.com/vitlibar)) +* Remove outdated partition when we shutdown the server or DETACH/ATTACH a table. [#8602](https://github.com/ClickHouse/ClickHouse/pull/8602) ([Guillaume Tassery](https://github.com/YiuRULE)) +* For how the default disk calculates the free space from `data` subdirectory. Fixed the issue when the amount of free space is not calculated correctly if the `data` directory is mounted to a separate device (rare case). This fixes [#7441](https://github.com/ClickHouse/ClickHouse/issues/7441) [#9257](https://github.com/ClickHouse/ClickHouse/pull/9257) ([Mikhail Korotov](https://github.com/millb)) +* Allow comma (cross) join with IN () inside. [#9251](https://github.com/ClickHouse/ClickHouse/pull/9251) ([Artem Zuikov](https://github.com/4ertus2)) +* Allow to rewrite CROSS to INNER JOIN if there's [NOT] LIKE operator in WHERE section. [#9229](https://github.com/ClickHouse/ClickHouse/pull/9229) ([Artem Zuikov](https://github.com/4ertus2)) +* Fix possible incorrect result after `GROUP BY` with enabled setting `distributed_aggregation_memory_efficient`. Fixes [#9134](https://github.com/ClickHouse/ClickHouse/issues/9134). [#9289](https://github.com/ClickHouse/ClickHouse/pull/9289) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Found keys were counted as missed in metrics of cache dictionaries. [#9411](https://github.com/ClickHouse/ClickHouse/pull/9411) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Fix replication protocol incompatibility introduced in [#8598](https://github.com/ClickHouse/ClickHouse/issues/8598). [#9412](https://github.com/ClickHouse/ClickHouse/pull/9412) ([alesapin](https://github.com/alesapin)) +* Fixed race condition on `queue_task_handle` at the startup of `ReplicatedMergeTree` tables. [#9552](https://github.com/ClickHouse/ClickHouse/pull/9552) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* The token `NOT` did not work in `SHOW TABLES NOT LIKE` query [#8727](https://github.com/ClickHouse/ClickHouse/issues/8727) [#8940](https://github.com/ClickHouse/ClickHouse/pull/8940) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added range check to function `h3EdgeLengthM`. Without this check, buffer overflow is possible. [#8945](https://github.com/ClickHouse/ClickHouse/pull/8945) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fixed up a bug in batched calculations of ternary logical OPs on multiple arguments (more than 10). [#8718](https://github.com/ClickHouse/ClickHouse/pull/8718) ([Alexander Kazakov](https://github.com/Akazz)) +* Fix error of PREWHERE optimization, which could lead to segfaults or `Inconsistent number of columns got from MergeTreeRangeReader` exception. [#9024](https://github.com/ClickHouse/ClickHouse/pull/9024) ([Anton Popov](https://github.com/CurtizJ)) +* Fix unexpected `Timeout exceeded while reading from socket` exception, which randomly happens on secure connection before timeout actually exceeded and when query profiler is enabled. Also add `connect_timeout_with_failover_secure_ms` settings (default 100ms), which is similar to `connect_timeout_with_failover_ms`, but is used for secure connections (because SSL handshake is slower, than ordinary TCP connection) [#9026](https://github.com/ClickHouse/ClickHouse/pull/9026) ([tavplubix](https://github.com/tavplubix)) +* Fix bug with mutations finalization, when mutation may hang in state with `parts_to_do=0` and `is_done=0`. [#9022](https://github.com/ClickHouse/ClickHouse/pull/9022) ([alesapin](https://github.com/alesapin)) +* Use new ANY JOIN logic with `partial_merge_join` setting. It's possible to make `ANY|ALL|SEMI LEFT` and `ALL INNER` joins with `partial_merge_join=1` now. [#8932](https://github.com/ClickHouse/ClickHouse/pull/8932) ([Artem Zuikov](https://github.com/4ertus2)) +* Shard now clamps the settings got from the initiator to the shard's constaints instead of throwing an exception. This fix allows to send queries to a shard with another constraints. [#9447](https://github.com/ClickHouse/ClickHouse/pull/9447) ([Vitaly Baranov](https://github.com/vitlibar)) +* Fixed memory management problem in `MergeTreeReadPool`. [#8791](https://github.com/ClickHouse/ClickHouse/pull/8791) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fix `toDecimal*OrNull()` functions family when called with string `e`. Fixes [#8312](https://github.com/ClickHouse/ClickHouse/issues/8312) [#8764](https://github.com/ClickHouse/ClickHouse/pull/8764) ([Artem Zuikov](https://github.com/4ertus2)) +* Make sure that `FORMAT Null` sends no data to the client. [#8767](https://github.com/ClickHouse/ClickHouse/pull/8767) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Fix bug that timestamp in `LiveViewBlockInputStream` will not updated. `LIVE VIEW` is an experimental feature. [#8644](https://github.com/ClickHouse/ClickHouse/pull/8644) ([vxider](https://github.com/Vxider)) [#8625](https://github.com/ClickHouse/ClickHouse/pull/8625) ([vxider](https://github.com/Vxider)) +* Fixed `ALTER MODIFY TTL` wrong behavior which did not allow to delete old TTL expressions. [#8422](https://github.com/ClickHouse/ClickHouse/pull/8422) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fixed UBSan report in MergeTreeIndexSet. This fixes [#9250](https://github.com/ClickHouse/ClickHouse/issues/9250) [#9365](https://github.com/ClickHouse/ClickHouse/pull/9365) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fixed the behaviour of `match` and `extract` functions when haystack has zero bytes. The behaviour was wrong when haystack was constant. This fixes [#9160](https://github.com/ClickHouse/ClickHouse/issues/9160) [#9163](https://github.com/ClickHouse/ClickHouse/pull/9163) ([alexey-milovidov](https://github.com/alexey-milovidov)) [#9345](https://github.com/ClickHouse/ClickHouse/pull/9345) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Avoid throwing from destructor in Apache Avro 3rd-party library. [#9066](https://github.com/ClickHouse/ClickHouse/pull/9066) ([Andrew Onyshchuk](https://github.com/oandrew)) +* Don't commit a batch polled from `Kafka` partially as it can lead to holes in data. [#8876](https://github.com/ClickHouse/ClickHouse/pull/8876) ([filimonov](https://github.com/filimonov)) +* Fix `joinGet` with nullable return types. [#8919](https://github.com/ClickHouse/ClickHouse/issues/8919) [#9014](https://github.com/ClickHouse/ClickHouse/pull/9014) ([Amos Bird](https://github.com/amosbird)) +* Fix data incompatibility when compressed with `T64` codec. [#9016](https://github.com/ClickHouse/ClickHouse/pull/9016) ([Artem Zuikov](https://github.com/4ertus2)) Fix data type ids in `T64` compression codec that leads to wrong (de)compression in affected versions. [#9033](https://github.com/ClickHouse/ClickHouse/pull/9033) ([Artem Zuikov](https://github.com/4ertus2)) +* Add setting `enable_early_constant_folding` and disable it in some cases that leads to errors. [#9010](https://github.com/ClickHouse/ClickHouse/pull/9010) ([Artem Zuikov](https://github.com/4ertus2)) +* Fix pushdown predicate optimizer with VIEW and enable the test [#9011](https://github.com/ClickHouse/ClickHouse/pull/9011) ([Winter Zhang](https://github.com/zhang2014)) +* Fix segfault in `Merge` tables, that can happen when reading from `File` storages [#9387](https://github.com/ClickHouse/ClickHouse/pull/9387) ([tavplubix](https://github.com/tavplubix)) +* Added a check for storage policy in `ATTACH PARTITION FROM`, `REPLACE PARTITION`, `MOVE TO TABLE`. Otherwise it could make data of part inaccessible after restart and prevent ClickHouse to start. [#9383](https://github.com/ClickHouse/ClickHouse/pull/9383) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fix alters if there is TTL set for table. [#8800](https://github.com/ClickHouse/ClickHouse/pull/8800) ([Anton Popov](https://github.com/CurtizJ)) +* Fix race condition that can happen when `SYSTEM RELOAD ALL DICTIONARIES` is executed while some dictionary is being modified/added/removed. [#8801](https://github.com/ClickHouse/ClickHouse/pull/8801) ([Vitaly Baranov](https://github.com/vitlibar)) +* In previous versions `Memory` database engine use empty data path, so tables are created in `path` directory (e.g. `/var/lib/clickhouse/`), not in data directory of database (e.g. `/var/lib/clickhouse/db_name`). [#8753](https://github.com/ClickHouse/ClickHouse/pull/8753) ([tavplubix](https://github.com/tavplubix)) +* Fixed wrong log messages about missing default disk or policy. [#9530](https://github.com/ClickHouse/ClickHouse/pull/9530) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fix not(has()) for the bloom_filter index of array types. [#9407](https://github.com/ClickHouse/ClickHouse/pull/9407) ([achimbab](https://github.com/achimbab)) +* Allow first column(s) in a table with `Log` engine be an alias [#9231](https://github.com/ClickHouse/ClickHouse/pull/9231) ([Ivan](https://github.com/abyss7)) +* Fix order of ranges while reading from `MergeTree` table in one thread. It could lead to exceptions from `MergeTreeRangeReader` or wrong query results. [#9050](https://github.com/ClickHouse/ClickHouse/pull/9050) ([Anton Popov](https://github.com/CurtizJ)) +* Make `reinterpretAsFixedString` to return `FixedString` instead of `String`. [#9052](https://github.com/ClickHouse/ClickHouse/pull/9052) ([Andrew Onyshchuk](https://github.com/oandrew)) +* Avoid extremely rare cases when the user can get wrong error message (`Success` instead of detailed error description). [#9457](https://github.com/ClickHouse/ClickHouse/pull/9457) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Do not crash when using `Template` format with empty row template. [#8785](https://github.com/ClickHouse/ClickHouse/pull/8785) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Metadata files for system tables could be created in wrong place [#8653](https://github.com/ClickHouse/ClickHouse/pull/8653) ([tavplubix](https://github.com/tavplubix)) Fixes [#8581](https://github.com/ClickHouse/ClickHouse/issues/8581). +* Fix data race on exception_ptr in cache dictionary [#8303](https://github.com/ClickHouse/ClickHouse/issues/8303). [#9379](https://github.com/ClickHouse/ClickHouse/pull/9379) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Do not throw an exception for query `ATTACH TABLE IF NOT EXISTS`. Previously it was thrown if table already exists, despite the `IF NOT EXISTS` clause. [#8967](https://github.com/ClickHouse/ClickHouse/pull/8967) ([Anton Popov](https://github.com/CurtizJ)) +* Fixed missing closing paren in exception message. [#8811](https://github.com/ClickHouse/ClickHouse/pull/8811) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Avoid message `Possible deadlock avoided` at the startup of clickhouse-client in interactive mode. [#9455](https://github.com/ClickHouse/ClickHouse/pull/9455) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fixed the issue when padding at the end of base64 encoded value can be malformed. Update base64 library. This fixes [#9491](https://github.com/ClickHouse/ClickHouse/issues/9491), closes [#9492](https://github.com/ClickHouse/ClickHouse/issues/9492) [#9500](https://github.com/ClickHouse/ClickHouse/pull/9500) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Prevent losing data in `Kafka` in rare cases when exception happens after reading suffix but before commit. Fixes [#9378](https://github.com/ClickHouse/ClickHouse/issues/9378) [#9507](https://github.com/ClickHouse/ClickHouse/pull/9507) ([filimonov](https://github.com/filimonov)) +* Fixed exception in `DROP TABLE IF EXISTS` [#8663](https://github.com/ClickHouse/ClickHouse/pull/8663) ([Nikita Vasilev](https://github.com/nikvas0)) +* Fix crash when a user tries to `ALTER MODIFY SETTING` for old-formated `MergeTree` table engines family. [#9435](https://github.com/ClickHouse/ClickHouse/pull/9435) ([alesapin](https://github.com/alesapin)) +* Support for UInt64 numbers that don't fit in Int64 in JSON-related functions. Update SIMDJSON to master. This fixes [#9209](https://github.com/ClickHouse/ClickHouse/issues/9209) [#9344](https://github.com/ClickHouse/ClickHouse/pull/9344) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fixed execution of inversed predicates when non-strictly monotinic functional index is used. [#9223](https://github.com/ClickHouse/ClickHouse/pull/9223) ([Alexander Kazakov](https://github.com/Akazz)) +* Don't try to fold `IN` constant in `GROUP BY` [#8868](https://github.com/ClickHouse/ClickHouse/pull/8868) ([Amos Bird](https://github.com/amosbird)) +* Fix bug in `ALTER DELETE` mutations which leads to index corruption. This fixes [#9019](https://github.com/ClickHouse/ClickHouse/issues/9019) and [#8982](https://github.com/ClickHouse/ClickHouse/issues/8982). Additionally fix extremely rare race conditions in `ReplicatedMergeTree` `ALTER` queries. [#9048](https://github.com/ClickHouse/ClickHouse/pull/9048) ([alesapin](https://github.com/alesapin)) +* When the setting `compile_expressions` is enabled, you can get `unexpected column` in `LLVMExecutableFunction` when we use `Nullable` type [#8910](https://github.com/ClickHouse/ClickHouse/pull/8910) ([Guillaume Tassery](https://github.com/YiuRULE)) +* Multiple fixes for `Kafka` engine: 1) fix duplicates that were appearing during consumer group rebalance. 2) Fix rare 'holes' appeared when data were polled from several partitions with one poll and committed partially (now we always process / commit the whole polled block of messages). 3) Fix flushes by block size (before that only flushing by timeout was working properly). 4) better subscription procedure (with assignment feedback). 5) Make tests work faster (with default intervals and timeouts). Due to the fact that data was not flushed by block size before (as it should according to documentation), that PR may lead to some performance degradation with default settings (due to more often & tinier flushes which are less optimal). If you encounter the performance issue after that change - please increase `kafka_max_block_size` in the table to the bigger value ( for example `CREATE TABLE ...Engine=Kafka ... SETTINGS ... kafka_max_block_size=524288`). Fixes [#7259](https://github.com/ClickHouse/ClickHouse/issues/7259) [#8917](https://github.com/ClickHouse/ClickHouse/pull/8917) ([filimonov](https://github.com/filimonov)) +* Fix `Parameter out of bound` exception in some queries after PREWHERE optimizations. [#8914](https://github.com/ClickHouse/ClickHouse/pull/8914) ([Baudouin Giard](https://github.com/bgiard)) +* Fixed the case of mixed-constness of arguments of function `arrayZip`. [#8705](https://github.com/ClickHouse/ClickHouse/pull/8705) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* When executing `CREATE` query, fold constant expressions in storage engine arguments. Replace empty database name with current database. Fixes [#6508](https://github.com/ClickHouse/ClickHouse/issues/6508), [#3492](https://github.com/ClickHouse/ClickHouse/issues/3492) [#9262](https://github.com/ClickHouse/ClickHouse/pull/9262) ([tavplubix](https://github.com/tavplubix)) +* Now it's not possible to create or add columns with simple cyclic aliases like `a DEFAULT b, b DEFAULT a`. [#9603](https://github.com/ClickHouse/ClickHouse/pull/9603) ([alesapin](https://github.com/alesapin)) +* Fixed a bug with double move which may corrupt original part. This is relevant if you use `ALTER TABLE MOVE` [#8680](https://github.com/ClickHouse/ClickHouse/pull/8680) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Allow `interval` identifier to correctly parse without backticks. Fixed issue when a query cannot be executed even if the `interval` identifier is enclosed in backticks or double quotes. This fixes [#9124](https://github.com/ClickHouse/ClickHouse/issues/9124). [#9142](https://github.com/ClickHouse/ClickHouse/pull/9142) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fixed fuzz test and incorrect behaviour of `bitTestAll`/`bitTestAny` functions. [#9143](https://github.com/ClickHouse/ClickHouse/pull/9143) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix possible crash/wrong number of rows in `LIMIT n WITH TIES` when there are a lot of rows equal to n'th row. [#9464](https://github.com/ClickHouse/ClickHouse/pull/9464) ([tavplubix](https://github.com/tavplubix)) +* Fix mutations with parts written with enabled `insert_quorum`. [#9463](https://github.com/ClickHouse/ClickHouse/pull/9463) ([alesapin](https://github.com/alesapin)) +* Fix data race at destruction of `Poco::HTTPServer`. It could happen when server is started and immediately shut down. [#9468](https://github.com/ClickHouse/ClickHouse/pull/9468) ([Anton Popov](https://github.com/CurtizJ)) +* Fix bug in which a misleading error message was shown when running `SHOW CREATE TABLE a_table_that_does_not_exist`. [#8899](https://github.com/ClickHouse/ClickHouse/pull/8899) ([achulkov2](https://github.com/achulkov2)) +* Fixed `Parameters are out of bound` exception in some rare cases when we have a constant in the `SELECT` clause when we have an `ORDER BY` and a `LIMIT` clause. [#8892](https://github.com/ClickHouse/ClickHouse/pull/8892) ([Guillaume Tassery](https://github.com/YiuRULE)) +* Fix mutations finalization, when already done mutation can have status `is_done=0`. [#9217](https://github.com/ClickHouse/ClickHouse/pull/9217) ([alesapin](https://github.com/alesapin)) +* Prevent from executing `ALTER ADD INDEX` for MergeTree tables with old syntax, because it does not work. [#8822](https://github.com/ClickHouse/ClickHouse/pull/8822) ([Mikhail Korotov](https://github.com/millb)) +* During server startup do not access table, which `LIVE VIEW` depends on, so server will be able to start. Also remove `LIVE VIEW` dependencies when detaching `LIVE VIEW`. `LIVE VIEW` is an experimental feature. [#8824](https://github.com/ClickHouse/ClickHouse/pull/8824) ([tavplubix](https://github.com/tavplubix)) +* Fix possible segfault in `MergeTreeRangeReader`, while executing `PREWHERE`. [#9106](https://github.com/ClickHouse/ClickHouse/pull/9106) ([Anton Popov](https://github.com/CurtizJ)) +* Fix possible mismatched checksums with column TTLs. [#9451](https://github.com/ClickHouse/ClickHouse/pull/9451) ([Anton Popov](https://github.com/CurtizJ)) +* Fixed a bug when parts were not being moved in background by TTL rules in case when there is only one volume. [#8672](https://github.com/ClickHouse/ClickHouse/pull/8672) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fixed the issue `Method createColumn() is not implemented for data type Set`. This fixes [#7799](https://github.com/ClickHouse/ClickHouse/issues/7799). [#8674](https://github.com/ClickHouse/ClickHouse/pull/8674) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Now we will try finalize mutations more frequently. [#9427](https://github.com/ClickHouse/ClickHouse/pull/9427) ([alesapin](https://github.com/alesapin)) +* Fix `intDiv` by minus one constant [#9351](https://github.com/ClickHouse/ClickHouse/pull/9351) ([hcz](https://github.com/hczhcz)) +* Fix possible race condition in `BlockIO`. [#9356](https://github.com/ClickHouse/ClickHouse/pull/9356) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix bug leading to server termination when trying to use / drop `Kafka` table created with wrong parameters. [#9513](https://github.com/ClickHouse/ClickHouse/pull/9513) ([filimonov](https://github.com/filimonov)) +* Added workaround if OS returns wrong result for `timer_create` function. [#8837](https://github.com/ClickHouse/ClickHouse/pull/8837) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fixed error in usage of `min_marks_for_seek` parameter. Fixed the error message when there is no sharding key in Distributed table and we try to skip unused shards. [#8908](https://github.com/ClickHouse/ClickHouse/pull/8908) ([Azat Khuzhin](https://github.com/azat)) + +#### Improvement +* Implement `ALTER MODIFY/DROP` queries on top of mutations for `ReplicatedMergeTree*` engines family. Now `ALTERS` blocks only at the metadata update stage, and don't block after that. [#8701](https://github.com/ClickHouse/ClickHouse/pull/8701) ([alesapin](https://github.com/alesapin)) +* Add ability to rewrite CROSS to INNER JOINs with `WHERE` section containing unqialified names. [#9512](https://github.com/ClickHouse/ClickHouse/pull/9512) ([Artem Zuikov](https://github.com/4ertus2)) +* Make `SHOW TABLES` and `SHOW DATABASES` queries support the `WHERE` expressions and `FROM`/`IN` [#9076](https://github.com/ClickHouse/ClickHouse/pull/9076) ([sundyli](https://github.com/sundy-li)) +* Added a setting `deduplicate_blocks_in_dependent_materialized_views`. [#9070](https://github.com/ClickHouse/ClickHouse/pull/9070) ([urykhy](https://github.com/urykhy)) +* After recent changes MySQL client started to print binary strings in hex thereby making them not readable ([#9032](https://github.com/ClickHouse/ClickHouse/issues/9032)). The workaround in ClickHouse is to mark string columns as UTF-8, which is not always, but usually the case. [#9079](https://github.com/ClickHouse/ClickHouse/pull/9079) ([Yuriy Baranov](https://github.com/yurriy)) +* Add support of String and FixedString keys for `sumMap` [#8903](https://github.com/ClickHouse/ClickHouse/pull/8903) ([Baudouin Giard](https://github.com/bgiard)) +* Support string keys in SummingMergeTree maps [#8933](https://github.com/ClickHouse/ClickHouse/pull/8933) ([Baudouin Giard](https://github.com/bgiard)) +* Signal termination of thread to the thread pool even if the thread has thrown exception [#8736](https://github.com/ClickHouse/ClickHouse/pull/8736) ([Ding Xiang Fei](https://github.com/dingxiangfei2009)) +* Allow to set `query_id` in `clickhouse-benchmark` [#9416](https://github.com/ClickHouse/ClickHouse/pull/9416) ([Anton Popov](https://github.com/CurtizJ)) +* Don't allow strange expressions in `ALTER TABLE ... PARTITION partition` query. This addresses [#7192](https://github.com/ClickHouse/ClickHouse/issues/7192) [#8835](https://github.com/ClickHouse/ClickHouse/pull/8835) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* The table `system.table_engines` now provides information about feature support (like `supports_ttl` or `supports_sort_order`). [#8830](https://github.com/ClickHouse/ClickHouse/pull/8830) ([Max Akhmedov](https://github.com/zlobober)) +* Enable `system.metric_log` by default. It will contain rows with values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval (one second by default). The table is very small (usually in order of megabytes) and collecting this data by default is reasonable. [#9225](https://github.com/ClickHouse/ClickHouse/pull/9225) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Initialize query profiler for all threads in a group, e.g. it allows to fully profile insert-queries. Fixes [#6964](https://github.com/ClickHouse/ClickHouse/issues/6964) [#8874](https://github.com/ClickHouse/ClickHouse/pull/8874) ([Ivan](https://github.com/abyss7)) +* Now temporary `LIVE VIEW` is created by `CREATE LIVE VIEW name WITH TIMEOUT [42] ...` instead of `CREATE TEMPORARY LIVE VIEW ...`, because the previous syntax was not consistent with `CREATE TEMPORARY TABLE ...` [#9131](https://github.com/ClickHouse/ClickHouse/pull/9131) ([tavplubix](https://github.com/tavplubix)) +* Add text_log.level configuration parameter to limit entries that goes to `system.text_log` table [#8809](https://github.com/ClickHouse/ClickHouse/pull/8809) ([Azat Khuzhin](https://github.com/azat)) +* Allow to put downloaded part to a disks/volumes according to TTL rules [#8598](https://github.com/ClickHouse/ClickHouse/pull/8598) ([Vladimir Chebotarev](https://github.com/excitoon)) +* For external MySQL dictionaries, allow to mutualize MySQL connection pool to "share" them among dictionaries. This option significantly reduces the number of connections to MySQL servers. [#9409](https://github.com/ClickHouse/ClickHouse/pull/9409) ([Clément Rodriguez](https://github.com/clemrodriguez)) +* Show nearest query execution time for quantiles in `clickhouse-benchmark` output instead of interpolated values. It's better to show values that correspond to the execution time of some queries. [#8712](https://github.com/ClickHouse/ClickHouse/pull/8712) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Possibility to add key & timestamp for the message when inserting data to Kafka. Fixes [#7198](https://github.com/ClickHouse/ClickHouse/issues/7198) [#8969](https://github.com/ClickHouse/ClickHouse/pull/8969) ([filimonov](https://github.com/filimonov)) +* If server is run from terminal, highlight thread number, query id and log priority by colors. This is for improved readability of correlated log messages for developers. [#8961](https://github.com/ClickHouse/ClickHouse/pull/8961) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Better exception message while loading tables for `Ordinary` database. [#9527](https://github.com/ClickHouse/ClickHouse/pull/9527) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Implement `arraySlice` for arrays with aggregate function states. This fixes [#9388](https://github.com/ClickHouse/ClickHouse/issues/9388) [#9391](https://github.com/ClickHouse/ClickHouse/pull/9391) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Allow constant functions and constant arrays to be used on the right side of IN operator. [#8813](https://github.com/ClickHouse/ClickHouse/pull/8813) ([Anton Popov](https://github.com/CurtizJ)) +* If zookeeper exception has happened while fetching data for system.replicas, display it in a separate column. This implements [#9137](https://github.com/ClickHouse/ClickHouse/issues/9137) [#9138](https://github.com/ClickHouse/ClickHouse/pull/9138) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Atomically remove MergeTree data parts on destroy. [#8402](https://github.com/ClickHouse/ClickHouse/pull/8402) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Support row-level security for Distributed tables. [#8926](https://github.com/ClickHouse/ClickHouse/pull/8926) ([Ivan](https://github.com/abyss7)) +* Now we recognize suffix (like KB, KiB...) in settings values. [#8072](https://github.com/ClickHouse/ClickHouse/pull/8072) ([Mikhail Korotov](https://github.com/millb)) +* Prevent out of memory while constructing result of a large JOIN. [#8637](https://github.com/ClickHouse/ClickHouse/pull/8637) ([Artem Zuikov](https://github.com/4ertus2)) +* Added names of clusters to suggestions in interactive mode in `clickhouse-client`. [#8709](https://github.com/ClickHouse/ClickHouse/pull/8709) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Initialize query profiler for all threads in a group, e.g. it allows to fully profile insert-queries [#8820](https://github.com/ClickHouse/ClickHouse/pull/8820) ([Ivan](https://github.com/abyss7)) +* Added column `exception_code` in `system.query_log` table. [#8770](https://github.com/ClickHouse/ClickHouse/pull/8770) ([Mikhail Korotov](https://github.com/millb)) +* Enabled MySQL compatibility server on port `9004` in the default server configuration file. Fixed password generation command in the example in configuration. [#8771](https://github.com/ClickHouse/ClickHouse/pull/8771) ([Yuriy Baranov](https://github.com/yurriy)) +* Prevent abort on shutdown if the filesystem is readonly. This fixes [#9094](https://github.com/ClickHouse/ClickHouse/issues/9094) [#9100](https://github.com/ClickHouse/ClickHouse/pull/9100) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Better exception message when length is required in HTTP POST query. [#9453](https://github.com/ClickHouse/ClickHouse/pull/9453) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add `_path` and `_file` virtual columns to `HDFS` and `File` engines and `hdfs` and `file` table functions [#8489](https://github.com/ClickHouse/ClickHouse/pull/8489) ([Olga Khvostikova](https://github.com/stavrolia)) +* Fix error `Cannot find column` while inserting into `MATERIALIZED VIEW` in case if new column was added to view's internal table. [#8766](https://github.com/ClickHouse/ClickHouse/pull/8766) [#8788](https://github.com/ClickHouse/ClickHouse/pull/8788) ([vzakaznikov](https://github.com/vzakaznikov)) [#8788](https://github.com/ClickHouse/ClickHouse/issues/8788) [#8806](https://github.com/ClickHouse/ClickHouse/pull/8806) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) [#8803](https://github.com/ClickHouse/ClickHouse/pull/8803) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix progress over native client-server protocol, by send progress after final update (like logs). This may be relevant only to some third-party tools that are using native protocol. [#9495](https://github.com/ClickHouse/ClickHouse/pull/9495) ([Azat Khuzhin](https://github.com/azat)) +* Add a system metric tracking the number of client connections using MySQL protocol ([#9013](https://github.com/ClickHouse/ClickHouse/issues/9013)). [#9015](https://github.com/ClickHouse/ClickHouse/pull/9015) ([Eugene Klimov](https://github.com/Slach)) +* From now on, HTTP responses will have `X-ClickHouse-Timezone` header set to the same timezone value that `SELECT timezone()` would report. [#9493](https://github.com/ClickHouse/ClickHouse/pull/9493) ([Denis Glazachev](https://github.com/traceon)) + +#### Performance Improvement +* Improve performance of analysing index with IN [#9261](https://github.com/ClickHouse/ClickHouse/pull/9261) ([Anton Popov](https://github.com/CurtizJ)) +* Simpler and more efficient code in Logical Functions + code cleanups. A followup to [#8718](https://github.com/ClickHouse/ClickHouse/issues/8718) [#8728](https://github.com/ClickHouse/ClickHouse/pull/8728) ([Alexander Kazakov](https://github.com/Akazz)) +* Overall performance improvement (in range of 5%..200% for affected queries) by ensuring even more strict aliasing with C++20 features. [#9304](https://github.com/ClickHouse/ClickHouse/pull/9304) ([Amos Bird](https://github.com/amosbird)) +* More strict aliasing for inner loops of comparison functions. [#9327](https://github.com/ClickHouse/ClickHouse/pull/9327) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* More strict aliasing for inner loops of arithmetic functions. [#9325](https://github.com/ClickHouse/ClickHouse/pull/9325) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* A ~3 times faster implementation for ColumnVector::replicate(), via which ColumnConst::convertToFullColumn() is implemented. Also will be useful in tests when materializing constants. [#9293](https://github.com/ClickHouse/ClickHouse/pull/9293) ([Alexander Kazakov](https://github.com/Akazz)) +* Another minor performance improvement to `ColumnVector::replicate()` (this speeds up the `materialize` function and higher order functions) an even further improvement to [#9293](https://github.com/ClickHouse/ClickHouse/issues/9293) [#9442](https://github.com/ClickHouse/ClickHouse/pull/9442) ([Alexander Kazakov](https://github.com/Akazz)) +* Improved performance of `stochasticLinearRegression` aggregate function. This patch is contributed by Intel. [#8652](https://github.com/ClickHouse/ClickHouse/pull/8652) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Improve performance of `reinterpretAsFixedString` function. [#9342](https://github.com/ClickHouse/ClickHouse/pull/9342) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Do not send blocks to client for `Null` format in processors pipeline. [#8797](https://github.com/ClickHouse/ClickHouse/pull/8797) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) [#8767](https://github.com/ClickHouse/ClickHouse/pull/8767) ([Alexander Kuzmenkov](https://github.com/akuzm)) + +#### Build/Testing/Packaging Improvement +* Exception handling now works correctly on Windows Subsystem for Linux. See https://github.com/ClickHouse-Extras/libunwind/pull/3 This fixes [#6480](https://github.com/ClickHouse/ClickHouse/issues/6480) [#9564](https://github.com/ClickHouse/ClickHouse/pull/9564) ([sobolevsv](https://github.com/sobolevsv)) +* Replace `readline` with `replxx` for interactive line editing in `clickhouse-client` [#8416](https://github.com/ClickHouse/ClickHouse/pull/8416) ([Ivan](https://github.com/abyss7)) +* Better build time and less template instantiations in FunctionsComparison. [#9324](https://github.com/ClickHouse/ClickHouse/pull/9324) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added integration with `clang-tidy` in CI. See also [#6044](https://github.com/ClickHouse/ClickHouse/issues/6044) [#9566](https://github.com/ClickHouse/ClickHouse/pull/9566) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Now we link ClickHouse in CI using `lld` even for `gcc`. [#9049](https://github.com/ClickHouse/ClickHouse/pull/9049) ([alesapin](https://github.com/alesapin)) +* Allow to randomize thread scheduling and insert glitches when `THREAD_FUZZER_*` environment variables are set. This helps testing. [#9459](https://github.com/ClickHouse/ClickHouse/pull/9459) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Enable secure sockets in stateless tests [#9288](https://github.com/ClickHouse/ClickHouse/pull/9288) ([tavplubix](https://github.com/tavplubix)) +* Make SPLIT_SHARED_LIBRARIES=OFF more robust [#9156](https://github.com/ClickHouse/ClickHouse/pull/9156) ([Azat Khuzhin](https://github.com/azat)) +* Make "performance_introspection_and_logging" test reliable to random server stuck. This may happen in CI environment. See also [#9515](https://github.com/ClickHouse/ClickHouse/issues/9515) [#9528](https://github.com/ClickHouse/ClickHouse/pull/9528) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Validate XML in style check. [#9550](https://github.com/ClickHouse/ClickHouse/pull/9550) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fixed race condition in test `00738_lock_for_inner_table`. This test relied on sleep. [#9555](https://github.com/ClickHouse/ClickHouse/pull/9555) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Remove performance tests of type `once`. This is needed to run all performance tests in statistical comparison mode (more reliable). [#9557](https://github.com/ClickHouse/ClickHouse/pull/9557) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added performance test for arithmetic functions. [#9326](https://github.com/ClickHouse/ClickHouse/pull/9326) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added performance test for `sumMap` and `sumMapWithOverflow` aggregate functions. Follow-up for [#8933](https://github.com/ClickHouse/ClickHouse/issues/8933) [#8947](https://github.com/ClickHouse/ClickHouse/pull/8947) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Ensure style of ErrorCodes by style check. [#9370](https://github.com/ClickHouse/ClickHouse/pull/9370) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add script for tests history. [#8796](https://github.com/ClickHouse/ClickHouse/pull/8796) ([alesapin](https://github.com/alesapin)) +* Add GCC warning `-Wsuggest-override` to locate and fix all places where `override` keyword must be used. [#8760](https://github.com/ClickHouse/ClickHouse/pull/8760) ([kreuzerkrieg](https://github.com/kreuzerkrieg)) +* Ignore weak symbol under Mac OS X because it must be defined [#9538](https://github.com/ClickHouse/ClickHouse/pull/9538) ([Deleted user](https://github.com/ghost)) +* Normalize running time of some queries in performance tests. This is done in preparation to run all the performance tests in comparison mode. [#9565](https://github.com/ClickHouse/ClickHouse/pull/9565) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix some tests to support pytest with query tests [#9062](https://github.com/ClickHouse/ClickHouse/pull/9062) ([Ivan](https://github.com/abyss7)) +* Enable SSL in build with MSan, so server will not fail at startup when running stateless tests [#9531](https://github.com/ClickHouse/ClickHouse/pull/9531) ([tavplubix](https://github.com/tavplubix)) +* Fix database substitution in test results [#9384](https://github.com/ClickHouse/ClickHouse/pull/9384) ([Ilya Yatsishin](https://github.com/qoega)) +* Build fixes for miscellaneous platforms [#9381](https://github.com/ClickHouse/ClickHouse/pull/9381) ([proller](https://github.com/proller)) [#8755](https://github.com/ClickHouse/ClickHouse/pull/8755) ([proller](https://github.com/proller)) [#8631](https://github.com/ClickHouse/ClickHouse/pull/8631) ([proller](https://github.com/proller)) +* Added disks section to stateless-with-coverage test docker image [#9213](https://github.com/ClickHouse/ClickHouse/pull/9213) ([Pavel Kovalenko](https://github.com/Jokser)) +* Get rid of in-source-tree files when building with GRPC [#9588](https://github.com/ClickHouse/ClickHouse/pull/9588) ([Amos Bird](https://github.com/amosbird)) +* Slightly faster build time by removing SessionCleaner from Context. Make the code of SessionCleaner more simple. [#9232](https://github.com/ClickHouse/ClickHouse/pull/9232) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Updated checking for hung queries in clickhouse-test script [#8858](https://github.com/ClickHouse/ClickHouse/pull/8858) ([Alexander Kazakov](https://github.com/Akazz)) +* Removed some useless files from repository. [#8843](https://github.com/ClickHouse/ClickHouse/pull/8843) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Changed type of math perftests from `once` to `loop`. [#8783](https://github.com/ClickHouse/ClickHouse/pull/8783) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Add docker image which allows to build interactive code browser HTML report for our codebase. [#8781](https://github.com/ClickHouse/ClickHouse/pull/8781) ([alesapin](https://github.com/alesapin)) See [Woboq Code Browser](https://clickhouse-test-reports.s3.yandex.net/codebrowser/ClickHouse/dbms/index.html) +* Suppress some test failures under MSan. [#8780](https://github.com/ClickHouse/ClickHouse/pull/8780) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Speedup "exception while insert" test. This test often time out in debug-with-coverage build. [#8711](https://github.com/ClickHouse/ClickHouse/pull/8711) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Updated `libcxx` and `libcxxabi` to master. In preparation to [#9304](https://github.com/ClickHouse/ClickHouse/issues/9304) [#9308](https://github.com/ClickHouse/ClickHouse/pull/9308) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix flacky test `00910_zookeeper_test_alter_compression_codecs`. [#9525](https://github.com/ClickHouse/ClickHouse/pull/9525) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Clean up duplicated linker flags. Make sure the linker won't look up an unexpected symbol. [#9433](https://github.com/ClickHouse/ClickHouse/pull/9433) ([Amos Bird](https://github.com/amosbird)) +* Add `clickhouse-odbc` driver into test images. This allows to test interaction of ClickHouse with ClickHouse via its own ODBC driver. [#9348](https://github.com/ClickHouse/ClickHouse/pull/9348) ([filimonov](https://github.com/filimonov)) +* Fix several bugs in unit tests. [#9047](https://github.com/ClickHouse/ClickHouse/pull/9047) ([alesapin](https://github.com/alesapin)) +* Enable `-Wmissing-include-dirs` GCC warning to eliminate all non-existing includes - mostly as a result of CMake scripting errors [#8704](https://github.com/ClickHouse/ClickHouse/pull/8704) ([kreuzerkrieg](https://github.com/kreuzerkrieg)) +* Describe reasons if query profiler cannot work. This is intended for [#9049](https://github.com/ClickHouse/ClickHouse/issues/9049) [#9144](https://github.com/ClickHouse/ClickHouse/pull/9144) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Update OpenSSL to upstream master. Fixed the issue when TLS connections may fail with the message `OpenSSL SSL_read: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error` and `SSL Exception: error:2400006E:random number generator::error retrieving entropy`. The issue was present in version 20.1. [#8956](https://github.com/ClickHouse/ClickHouse/pull/8956) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Update Dockerfile for server [#8893](https://github.com/ClickHouse/ClickHouse/pull/8893) ([Ilya Mazaev](https://github.com/ne-ray)) +* Minor fixes in build-gcc-from-sources script [#8774](https://github.com/ClickHouse/ClickHouse/pull/8774) ([Michael Nacharov](https://github.com/mnach)) +* Replace `numbers` to `zeros` in perftests where `number` column is not used. This will lead to more clean test results. [#9600](https://github.com/ClickHouse/ClickHouse/pull/9600) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix stack overflow issue when using initializer_list in Column constructors. [#9367](https://github.com/ClickHouse/ClickHouse/pull/9367) ([Deleted user](https://github.com/ghost)) +* Upgrade librdkafka to v1.3.0. Enable bundled `rdkafka` and `gsasl` libraries on Mac OS X. [#9000](https://github.com/ClickHouse/ClickHouse/pull/9000) ([Andrew Onyshchuk](https://github.com/oandrew)) +* build fix on GCC 9.2.0 [#9306](https://github.com/ClickHouse/ClickHouse/pull/9306) ([vxider](https://github.com/Vxider)) + + +## ClickHouse release v20.1 + +### ClickHouse release v20.1.16.120-stable 2020-60-26 + +#### Bug Fix + +* Fix rare crash caused by using `Nullable` column in prewhere condition. Continuation of [#11608](https://github.com/ClickHouse/ClickHouse/issues/11608). [#11869](https://github.com/ClickHouse/ClickHouse/pull/11869) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Don't allow arrayJoin inside higher order functions. It was leading to broken protocol synchronization. This closes [#3933](https://github.com/ClickHouse/ClickHouse/issues/3933). [#11846](https://github.com/ClickHouse/ClickHouse/pull/11846) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix unexpected behaviour of queries like `SELECT *, xyz.*` which were success while an error expected. [#11753](https://github.com/ClickHouse/ClickHouse/pull/11753) ([hexiaoting](https://github.com/hexiaoting)). +* Fixed LOGICAL_ERROR caused by wrong type deduction of complex literals in Values input format. [#11732](https://github.com/ClickHouse/ClickHouse/pull/11732) ([tavplubix](https://github.com/tavplubix)). +* Fix `ORDER BY ... WITH FILL` over const columns. [#11697](https://github.com/ClickHouse/ClickHouse/pull/11697) ([Anton Popov](https://github.com/CurtizJ)). +* Pass proper timeouts when communicating with XDBC bridge. Recently timeouts were not respected when checking bridge liveness and receiving meta info. [#11690](https://github.com/ClickHouse/ClickHouse/pull/11690) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add support for regular expressions with case-insensitive flags. This fixes [#11101](https://github.com/ClickHouse/ClickHouse/issues/11101) and fixes [#11506](https://github.com/ClickHouse/ClickHouse/issues/11506). [#11649](https://github.com/ClickHouse/ClickHouse/pull/11649) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix bloom filters for String (data skipping indices). [#11638](https://github.com/ClickHouse/ClickHouse/pull/11638) ([Azat Khuzhin](https://github.com/azat)). +* Fix rare crash caused by using `Nullable` column in prewhere condition. (Probably it is connected with [#11572](https://github.com/ClickHouse/ClickHouse/issues/11572) somehow). [#11608](https://github.com/ClickHouse/ClickHouse/pull/11608) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix wrong exit code of the clickhouse-client, when exception.code() % 256 = 0. [#11601](https://github.com/ClickHouse/ClickHouse/pull/11601) ([filimonov](https://github.com/filimonov)). +* Fix trivial error in log message about "Mark cache size was lowered" at server startup. This closes [#11399](https://github.com/ClickHouse/ClickHouse/issues/11399). [#11589](https://github.com/ClickHouse/ClickHouse/pull/11589) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now clickhouse-server docker container will prefer IPv6 checking server aliveness. [#11550](https://github.com/ClickHouse/ClickHouse/pull/11550) ([Ivan Starkov](https://github.com/istarkov)). +* Fix memory leak when exception is thrown in the middle of aggregation with -State functions. This fixes [#8995](https://github.com/ClickHouse/ClickHouse/issues/8995). [#11496](https://github.com/ClickHouse/ClickHouse/pull/11496) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix usage of primary key wrapped into a function with 'FINAL' modifier and 'ORDER BY' optimization. [#10715](https://github.com/ClickHouse/ClickHouse/pull/10715) ([Anton Popov](https://github.com/CurtizJ)). + + +### ClickHouse release v20.1.15.109-stable 2020-06-19 + +#### Bug Fix + +* Fix excess lock for structure during alter. [#11790](https://github.com/ClickHouse/ClickHouse/pull/11790) ([alesapin](https://github.com/alesapin)). + + +### ClickHouse release v20.1.14.107-stable 2020-06-11 + +#### Bug Fix + +* Fix error `Size of offsets does not match size of column` for queries with `PREWHERE column in (subquery)` and `ARRAY JOIN`. [#11580](https://github.com/ClickHouse/ClickHouse/pull/11580) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). + + +### ClickHouse release v20.1.13.105-stable 2020-06-10 + +#### Bug Fix + +* Fix the error `Data compressed with different methods` that can happen if `min_bytes_to_use_direct_io` is enabled and PREWHERE is active and using SAMPLE or high number of threads. This fixes [#11539](https://github.com/ClickHouse/ClickHouse/issues/11539). [#11540](https://github.com/ClickHouse/ClickHouse/pull/11540) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix return compressed size for codecs. [#11448](https://github.com/ClickHouse/ClickHouse/pull/11448) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix server crash when a column has compression codec with non-literal arguments. Fixes [#11365](https://github.com/ClickHouse/ClickHouse/issues/11365). [#11431](https://github.com/ClickHouse/ClickHouse/pull/11431) ([alesapin](https://github.com/alesapin)). +* Fix pointInPolygon with nan as point. Fixes [#11375](https://github.com/ClickHouse/ClickHouse/issues/11375). [#11421](https://github.com/ClickHouse/ClickHouse/pull/11421) ([Alexey Ilyukhov](https://github.com/livace)). +* Fixed geohashesInBox with arguments outside of latitude/longitude range. [#11403](https://github.com/ClickHouse/ClickHouse/pull/11403) ([Vasily Nemkov](https://github.com/Enmk)). +* Fix possible `Pipeline stuck` error for queries with external sort and limit. Fixes [#11359](https://github.com/ClickHouse/ClickHouse/issues/11359). [#11366](https://github.com/ClickHouse/ClickHouse/pull/11366) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix crash in `quantilesExactWeightedArray`. [#11337](https://github.com/ClickHouse/ClickHouse/pull/11337) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Make writing to `MATERIALIZED VIEW` with setting `parallel_view_processing = 1` parallel again. Fixes [#10241](https://github.com/ClickHouse/ClickHouse/issues/10241). [#11330](https://github.com/ClickHouse/ClickHouse/pull/11330) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix visitParamExtractRaw when extracted JSON has strings with unbalanced { or [. [#11318](https://github.com/ClickHouse/ClickHouse/pull/11318) ([Ewout](https://github.com/devwout)). +* Fix very rare race condition in ThreadPool. [#11314](https://github.com/ClickHouse/ClickHouse/pull/11314) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix potential uninitialized memory in conversion. Example: `SELECT toIntervalSecond(now64())`. [#11311](https://github.com/ClickHouse/ClickHouse/pull/11311) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix the issue when index analysis cannot work if a table has Array column in primary key and if a query is filtering by this column with `empty` or `notEmpty` functions. This fixes [#11286](https://github.com/ClickHouse/ClickHouse/issues/11286). [#11303](https://github.com/ClickHouse/ClickHouse/pull/11303) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix bug when query speed estimation can be incorrect and the limit of `min_execution_speed` may not work or work incorrectly if the query is throttled by `max_network_bandwidth`, `max_execution_speed` or `priority` settings. Change the default value of `timeout_before_checking_execution_speed` to non-zero, because otherwise the settings `min_execution_speed` and `max_execution_speed` have no effect. This fixes [#11297](https://github.com/ClickHouse/ClickHouse/issues/11297). This fixes [#5732](https://github.com/ClickHouse/ClickHouse/issues/5732). This fixes [#6228](https://github.com/ClickHouse/ClickHouse/issues/6228). Usability improvement: avoid concatenation of exception message with progress bar in `clickhouse-client`. [#11296](https://github.com/ClickHouse/ClickHouse/pull/11296) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix crash while reading malformed data in Protobuf format. This fixes [#5957](https://github.com/ClickHouse/ClickHouse/issues/5957), fixes [#11203](https://github.com/ClickHouse/ClickHouse/issues/11203). [#11258](https://github.com/ClickHouse/ClickHouse/pull/11258) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix possible error `Cannot capture column` for higher-order functions with `Array(Array(LowCardinality))` captured argument. [#11185](https://github.com/ClickHouse/ClickHouse/pull/11185) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* If data skipping index is dependent on columns that are going to be modified during background merge (for SummingMergeTree, AggregatingMergeTree as well as for TTL GROUP BY), it was calculated incorrectly. This issue is fixed by moving index calculation after merge so the index is calculated on merged data. [#11162](https://github.com/ClickHouse/ClickHouse/pull/11162) ([Azat Khuzhin](https://github.com/azat)). +* Remove logging from mutation finalization task if nothing was finalized. [#11109](https://github.com/ClickHouse/ClickHouse/pull/11109) ([alesapin](https://github.com/alesapin)). +* Fixed parseDateTime64BestEffort argument resolution bugs. [#10925](https://github.com/ClickHouse/ClickHouse/issues/10925). [#11038](https://github.com/ClickHouse/ClickHouse/pull/11038) ([Vasily Nemkov](https://github.com/Enmk)). +* Fix incorrect raw data size in method getRawData(). [#10964](https://github.com/ClickHouse/ClickHouse/pull/10964) ([Igr](https://github.com/ObjatieGroba)). +* Fix backward compatibility with tuples in Distributed tables. [#10889](https://github.com/ClickHouse/ClickHouse/pull/10889) ([Anton Popov](https://github.com/CurtizJ)). +* Fix SIGSEGV in StringHashTable (if such key does not exist). [#10870](https://github.com/ClickHouse/ClickHouse/pull/10870) ([Azat Khuzhin](https://github.com/azat)). +* Fixed bug in `ReplicatedMergeTree` which might cause some `ALTER` on `OPTIMIZE` query to hang waiting for some replica after it become inactive. [#10849](https://github.com/ClickHouse/ClickHouse/pull/10849) ([tavplubix](https://github.com/tavplubix)). +* Fix columns order after Block::sortColumns() (also add a test that shows that it affects some real use case - Buffer engine). [#10826](https://github.com/ClickHouse/ClickHouse/pull/10826) ([Azat Khuzhin](https://github.com/azat)). +* Fix the issue with ODBC bridge when no quoting of identifiers is requested. This fixes [#7984](https://github.com/ClickHouse/ClickHouse/issues/7984). [#10821](https://github.com/ClickHouse/ClickHouse/pull/10821) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix UBSan and MSan report in DateLUT. [#10798](https://github.com/ClickHouse/ClickHouse/pull/10798) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* - Make use of `src_type` for correct type conversion in key conditions. Fixes [#6287](https://github.com/ClickHouse/ClickHouse/issues/6287). [#10791](https://github.com/ClickHouse/ClickHouse/pull/10791) ([Andrew Onyshchuk](https://github.com/oandrew)). +* Fix `parallel_view_processing` behavior. Now all insertions into `MATERIALIZED VIEW` without exception should be finished if exception happened. Fixes [#10241](https://github.com/ClickHouse/ClickHouse/issues/10241). [#10757](https://github.com/ClickHouse/ClickHouse/pull/10757) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix combinator -OrNull and -OrDefault when combined with -State. [#10741](https://github.com/ClickHouse/ClickHouse/pull/10741) ([hcz](https://github.com/hczhcz)). +* Fix disappearing totals. Totals could have being filtered if query had had join or subquery with external where condition. Fixes [#10674](https://github.com/ClickHouse/ClickHouse/issues/10674). [#10698](https://github.com/ClickHouse/ClickHouse/pull/10698) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix multiple usages of `IN` operator with the identical set in one query. [#10686](https://github.com/ClickHouse/ClickHouse/pull/10686) ([Anton Popov](https://github.com/CurtizJ)). +* Fix order of parameters in AggregateTransform constructor. [#10667](https://github.com/ClickHouse/ClickHouse/pull/10667) ([palasonic1](https://github.com/palasonic1)). +* Fix the lack of parallel execution of remote queries with `distributed_aggregation_memory_efficient` enabled. Fixes [#10655](https://github.com/ClickHouse/ClickHouse/issues/10655). [#10664](https://github.com/ClickHouse/ClickHouse/pull/10664) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix predicates optimization for distributed queries (`enable_optimize_predicate_expression=1`) for queries with `HAVING` section (i.e. when filtering on the server initiator is required), by preserving the order of expressions (and this is enough to fix), and also force aggregator use column names over indexes. Fixes: [#10613](https://github.com/ClickHouse/ClickHouse/issues/10613), [#11413](https://github.com/ClickHouse/ClickHouse/issues/11413). [#10621](https://github.com/ClickHouse/ClickHouse/pull/10621) ([Azat Khuzhin](https://github.com/azat)). +* Fix error `the BloomFilter false positive must be a double number between 0 and 1` [#10551](https://github.com/ClickHouse/ClickHouse/issues/10551). [#10569](https://github.com/ClickHouse/ClickHouse/pull/10569) ([Winter Zhang](https://github.com/zhang2014)). +* Fix SELECT of column ALIAS which default expression type different from column type. [#10563](https://github.com/ClickHouse/ClickHouse/pull/10563) ([Azat Khuzhin](https://github.com/azat)). +* * Implemented comparison between DateTime64 and String values (just like for DateTime). [#10560](https://github.com/ClickHouse/ClickHouse/pull/10560) ([Vasily Nemkov](https://github.com/Enmk)). + + +### ClickHouse release v20.1.12.86, 2020-05-26 + +#### Bug Fix + +* Fixed incompatibility of two-level aggregation between versions 20.1 and earlier. This incompatibility happens when different versions of ClickHouse are used on initiator node and remote nodes and the size of GROUP BY result is large and aggregation is performed by a single String field. It leads to several unmerged rows for a single key in result. [#10952](https://github.com/ClickHouse/ClickHouse/pull/10952) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed data corruption for `LowCardinality(FixedString)` key column in `SummingMergeTree` which could have happened after merge. Fixes [#10489](https://github.com/ClickHouse/ClickHouse/issues/10489). [#10721](https://github.com/ClickHouse/ClickHouse/pull/10721) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed bug, which causes http requests stuck on client close when `readonly=2` and `cancel_http_readonly_queries_on_client_close=1`. Fixes [#7939](https://github.com/ClickHouse/ClickHouse/issues/7939), [#7019](https://github.com/ClickHouse/ClickHouse/issues/7019), [#7736](https://github.com/ClickHouse/ClickHouse/issues/7736), [#7091](https://github.com/ClickHouse/ClickHouse/issues/7091). [#10684](https://github.com/ClickHouse/ClickHouse/pull/10684) ([tavplubix](https://github.com/tavplubix)). +* Fixed a bug when on `SYSTEM DROP DNS CACHE` query also drop caches, which are used to check if user is allowed to connect from some IP addresses. [#10608](https://github.com/ClickHouse/ClickHouse/pull/10608) ([tavplubix](https://github.com/tavplubix)). +* Fixed incorrect scalar results inside inner query of `MATERIALIZED VIEW` in case if this query contained dependent table. [#10603](https://github.com/ClickHouse/ClickHouse/pull/10603) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed the situation when mutation finished all parts, but hung up in `is_done=0`. [#10526](https://github.com/ClickHouse/ClickHouse/pull/10526) ([alesapin](https://github.com/alesapin)). +* Fixed overflow at beginning of unix epoch for timezones with fractional offset from UTC. This fixes [#9335](https://github.com/ClickHouse/ClickHouse/issues/9335). [#10513](https://github.com/ClickHouse/ClickHouse/pull/10513) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed improper shutdown of Distributed storage. [#10491](https://github.com/ClickHouse/ClickHouse/pull/10491) ([Azat Khuzhin](https://github.com/azat)). +* Fixed numeric overflow in `simpleLinearRegression` over large integers. [#10474](https://github.com/ClickHouse/ClickHouse/pull/10474) ([hcz](https://github.com/hczhcz)). +* Fixed removing metadata directory when attach database fails. [#10442](https://github.com/ClickHouse/ClickHouse/pull/10442) ([Winter Zhang](https://github.com/zhang2014)). +* Added a check of number and type of arguments when creating `BloomFilter` index [#9623](https://github.com/ClickHouse/ClickHouse/issues/9623). [#10431](https://github.com/ClickHouse/ClickHouse/pull/10431) ([Winter Zhang](https://github.com/zhang2014)). +* Fixed the issue when a query with `ARRAY JOIN`, `ORDER BY` and `LIMIT` may return incomplete result. This fixes [#10226](https://github.com/ClickHouse/ClickHouse/issues/10226). [#10427](https://github.com/ClickHouse/ClickHouse/pull/10427) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Prefer `fallback_to_stale_replicas` over `skip_unavailable_shards`. [#10422](https://github.com/ClickHouse/ClickHouse/pull/10422) ([Azat Khuzhin](https://github.com/azat)). +* Fixed wrong flattening of `Array(Tuple(...))` data types. This fixes [#10259](https://github.com/ClickHouse/ClickHouse/issues/10259). [#10390](https://github.com/ClickHouse/ClickHouse/pull/10390) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed wrong behavior in `HashTable` that caused compilation error when trying to read HashMap from buffer. [#10386](https://github.com/ClickHouse/ClickHouse/pull/10386) ([palasonic1](https://github.com/palasonic1)). +* Fixed possible `Pipeline stuck` error in `ConcatProcessor` which could have happened in remote query. [#10381](https://github.com/ClickHouse/ClickHouse/pull/10381) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed error `Pipeline stuck` with `max_rows_to_group_by` and `group_by_overflow_mode = 'break'`. [#10279](https://github.com/ClickHouse/ClickHouse/pull/10279) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed several bugs when some data was inserted with quorum, then deleted somehow (DROP PARTITION, TTL) and this leaded to the stuck of INSERTs or false-positive exceptions in SELECTs. This fixes [#9946](https://github.com/ClickHouse/ClickHouse/issues/9946). [#10188](https://github.com/ClickHouse/ClickHouse/pull/10188) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fixed incompatibility when versions prior to 18.12.17 are used on remote servers and newer is used on initiating server, and GROUP BY both fixed and non-fixed keys, and when two-level group by method is activated. [#3254](https://github.com/ClickHouse/ClickHouse/pull/3254) ([alexey-milovidov](https://github.com/alexey-milovidov)). + +#### Build/Testing/Packaging Improvement + +* Added CA certificates to clickhouse-server docker image. [#10476](https://github.com/ClickHouse/ClickHouse/pull/10476) ([filimonov](https://github.com/filimonov)). + + +### ClickHouse release v20.1.10.70, 2020-04-17 + +#### Bug Fix + +* Fix rare possible exception `Cannot drain connections: cancel first`. [#10239](https://github.com/ClickHouse/ClickHouse/pull/10239) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed bug where ClickHouse would throw `'Unknown function lambda.'` error message when user tries to run `ALTER UPDATE/DELETE` on tables with `ENGINE = Replicated*`. Check for nondeterministic functions now handles lambda expressions correctly. [#10237](https://github.com/ClickHouse/ClickHouse/pull/10237) ([Alexander Kazakov](https://github.com/Akazz)). +* Fix `parseDateTimeBestEffort` for strings in RFC-2822 when day of week is Tuesday or Thursday. This fixes [#10082](https://github.com/ClickHouse/ClickHouse/issues/10082). [#10214](https://github.com/ClickHouse/ClickHouse/pull/10214) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix column names of constants inside `JOIN` that may clash with names of constants outside of `JOIN`. [#10207](https://github.com/ClickHouse/ClickHouse/pull/10207) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix possible inifinite query execution when the query actually should stop on LIMIT, while reading from infinite source like `system.numbers` or `system.zeros`. [#10206](https://github.com/ClickHouse/ClickHouse/pull/10206) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix move-to-prewhere optimization in presense of `arrayJoin` functions (in certain cases). This fixes [#10092](https://github.com/ClickHouse/ClickHouse/issues/10092). [#10195](https://github.com/ClickHouse/ClickHouse/pull/10195) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add the ability to relax the restriction on non-deterministic functions usage in mutations with `allow_nondeterministic_mutations` setting. [#10186](https://github.com/ClickHouse/ClickHouse/pull/10186) ([filimonov](https://github.com/filimonov)). +* Convert blocks if structure does not match on `INSERT` into table with `Distributed` engine. [#10135](https://github.com/ClickHouse/ClickHouse/pull/10135) ([Azat Khuzhin](https://github.com/azat)). +* Fix `SIGSEGV` on `INSERT` into `Distributed` table when its structure differs from the underlying tables. [#10105](https://github.com/ClickHouse/ClickHouse/pull/10105) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible rows loss for queries with `JOIN` and `UNION ALL`. Fixes [#9826](https://github.com/ClickHouse/ClickHouse/issues/9826), [#10113](https://github.com/ClickHouse/ClickHouse/issues/10113). [#10099](https://github.com/ClickHouse/ClickHouse/pull/10099) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Add arguments check and support identifier arguments for MySQL Database Engine. [#10077](https://github.com/ClickHouse/ClickHouse/pull/10077) ([Winter Zhang](https://github.com/zhang2014)). +* Fix bug in clickhouse dictionary source from localhost clickhouse server. The bug may lead to memory corruption if types in dictionary and source are not compatible. [#10071](https://github.com/ClickHouse/ClickHouse/pull/10071) ([alesapin](https://github.com/alesapin)). +* Fix error `Cannot clone block with columns because block has 0 columns ... While executing GroupingAggregatedTransform`. It happened when setting `distributed_aggregation_memory_efficient` was enabled, and distributed query read aggregating data with different level from different shards (mixed single and two level aggregation). [#10063](https://github.com/ClickHouse/ClickHouse/pull/10063) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix a segmentation fault that could occur in `GROUP BY` over string keys containing trailing zero bytes ([#8636](https://github.com/ClickHouse/ClickHouse/issues/8636), [#8925](https://github.com/ClickHouse/ClickHouse/issues/8925)). [#10025](https://github.com/ClickHouse/ClickHouse/pull/10025) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fix bug in which the necessary tables weren't retrieved at one of the processing stages of queries to some databases. Fixes [#9699](https://github.com/ClickHouse/ClickHouse/issues/9699). [#9949](https://github.com/ClickHouse/ClickHouse/pull/9949) ([achulkov2](https://github.com/achulkov2)). +* Fix `'Not found column in block'` error when `JOIN` appears with `TOTALS`. Fixes [#9839](https://github.com/ClickHouse/ClickHouse/issues/9839). [#9939](https://github.com/ClickHouse/ClickHouse/pull/9939) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix a bug with `ON CLUSTER` DDL queries freezing on server startup. [#9927](https://github.com/ClickHouse/ClickHouse/pull/9927) ([Gagan Arneja](https://github.com/garneja)). +* Fix `TRUNCATE` for Join table engine ([#9917](https://github.com/ClickHouse/ClickHouse/issues/9917)). [#9920](https://github.com/ClickHouse/ClickHouse/pull/9920) ([Amos Bird](https://github.com/amosbird)). +* Fix `'scalar does not exist'` error in ALTER queries ([#9878](https://github.com/ClickHouse/ClickHouse/issues/9878)). [#9904](https://github.com/ClickHouse/ClickHouse/pull/9904) ([Amos Bird](https://github.com/amosbird)). +* Fix race condition between drop and optimize in `ReplicatedMergeTree`. [#9901](https://github.com/ClickHouse/ClickHouse/pull/9901) ([alesapin](https://github.com/alesapin)). +* Fixed `DeleteOnDestroy` logic in `ATTACH PART` which could lead to automatic removal of attached part and added few tests. [#9410](https://github.com/ClickHouse/ClickHouse/pull/9410) ([Vladimir Chebotarev](https://github.com/excitoon)). + +#### Build/Testing/Packaging Improvement + +* Fix unit test `collapsing_sorted_stream`. [#9367](https://github.com/ClickHouse/ClickHouse/pull/9367) ([Deleted user](https://github.com/ghost)). + +### ClickHouse release v20.1.9.54, 2020-03-28 + +#### Bug Fix + +* Fix `'Different expressions with the same alias'` error when query has `PREWHERE` and `WHERE` on distributed table and `SET distributed_product_mode = 'local'`. [#9871](https://github.com/ClickHouse/ClickHouse/pull/9871) ([Artem Zuikov](https://github.com/4ertus2)). +* Fix mutations excessive memory consumption for tables with a composite primary key. This fixes [#9850](https://github.com/ClickHouse/ClickHouse/issues/9850). [#9860](https://github.com/ClickHouse/ClickHouse/pull/9860) ([alesapin](https://github.com/alesapin)). +* For INSERT queries shard now clamps the settings got from the initiator to the shard's constaints instead of throwing an exception. This fix allows to send `INSERT` queries to a shard with another constraints. This change improves fix [#9447](https://github.com/ClickHouse/ClickHouse/issues/9447). [#9852](https://github.com/ClickHouse/ClickHouse/pull/9852) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix possible exception `Got 0 in totals chunk, expected 1` on client. It happened for queries with `JOIN` in case if right joined table had zero rows. Example: `select * from system.one t1 join system.one t2 on t1.dummy = t2.dummy limit 0 FORMAT TabSeparated;`. Fixes [#9777](https://github.com/ClickHouse/ClickHouse/issues/9777). [#9823](https://github.com/ClickHouse/ClickHouse/pull/9823) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix `SIGSEGV` with `optimize_skip_unused_shards` when type cannot be converted. [#9804](https://github.com/ClickHouse/ClickHouse/pull/9804) ([Azat Khuzhin](https://github.com/azat)). +* Fixed a few cases when timezone of the function argument wasn't used properly. [#9574](https://github.com/ClickHouse/ClickHouse/pull/9574) ([Vasily Nemkov](https://github.com/Enmk)). + +#### Improvement + +* Remove `ORDER BY` stage from mutations because we read from a single ordered part in a single thread. Also add check that the order of rows in mutation is ordered in sorting key order and this order is not violated. [#9886](https://github.com/ClickHouse/ClickHouse/pull/9886) ([alesapin](https://github.com/alesapin)). + +#### Build/Testing/Packaging Improvement + +* Clean up duplicated linker flags. Make sure the linker won't look up an unexpected symbol. [#9433](https://github.com/ClickHouse/ClickHouse/pull/9433) ([Amos Bird](https://github.com/amosbird)). + +### ClickHouse release v20.1.8.41, 2020-03-20 + +#### Bug Fix +* Fix possible permanent `Cannot schedule a task` error (due to unhandled exception in `ParallelAggregatingBlockInputStream::Handler::onFinish/onFinishThread`). This fixes [#6833](https://github.com/ClickHouse/ClickHouse/issues/6833). [#9154](https://github.com/ClickHouse/ClickHouse/pull/9154) ([Azat Khuzhin](https://github.com/azat)) +* Fix excessive memory consumption in `ALTER` queries (mutations). This fixes [#9533](https://github.com/ClickHouse/ClickHouse/issues/9533) and [#9670](https://github.com/ClickHouse/ClickHouse/issues/9670). [#9754](https://github.com/ClickHouse/ClickHouse/pull/9754) ([alesapin](https://github.com/alesapin)) +* Fix bug in backquoting in external dictionaries DDL. This fixes [#9619](https://github.com/ClickHouse/ClickHouse/issues/9619). [#9734](https://github.com/ClickHouse/ClickHouse/pull/9734) ([alesapin](https://github.com/alesapin)) + +### ClickHouse release v20.1.7.38, 2020-03-18 + +#### Bug Fix +* Fixed incorrect internal function names for `sumKahan` and `sumWithOverflow`. I lead to exception while using this functions in remote queries. [#9636](https://github.com/ClickHouse/ClickHouse/pull/9636) ([Azat Khuzhin](https://github.com/azat)). This issue was in all ClickHouse releases. +* Allow `ALTER ON CLUSTER` of `Distributed` tables with internal replication. This fixes [#3268](https://github.com/ClickHouse/ClickHouse/issues/3268). [#9617](https://github.com/ClickHouse/ClickHouse/pull/9617) ([shinoi2](https://github.com/shinoi2)). This issue was in all ClickHouse releases. +* Fix possible exceptions `Size of filter does not match size of column` and `Invalid number of rows in Chunk` in `MergeTreeRangeReader`. They could appear while executing `PREWHERE` in some cases. Fixes [#9132](https://github.com/ClickHouse/ClickHouse/issues/9132). [#9612](https://github.com/ClickHouse/ClickHouse/pull/9612) ([Anton Popov](https://github.com/CurtizJ)) +* Fixed the issue: timezone was not preserved if you write a simple arithmetic expression like `time + 1` (in contrast to an expression like `time + INTERVAL 1 SECOND`). This fixes [#5743](https://github.com/ClickHouse/ClickHouse/issues/5743). [#9323](https://github.com/ClickHouse/ClickHouse/pull/9323) ([alexey-milovidov](https://github.com/alexey-milovidov)). This issue was in all ClickHouse releases. +* Now it's not possible to create or add columns with simple cyclic aliases like `a DEFAULT b, b DEFAULT a`. [#9603](https://github.com/ClickHouse/ClickHouse/pull/9603) ([alesapin](https://github.com/alesapin)) +* Fixed the issue when padding at the end of base64 encoded value can be malformed. Update base64 library. This fixes [#9491](https://github.com/ClickHouse/ClickHouse/issues/9491), closes [#9492](https://github.com/ClickHouse/ClickHouse/issues/9492) [#9500](https://github.com/ClickHouse/ClickHouse/pull/9500) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix data race at destruction of `Poco::HTTPServer`. It could happen when server is started and immediately shut down. [#9468](https://github.com/ClickHouse/ClickHouse/pull/9468) ([Anton Popov](https://github.com/CurtizJ)) +* Fix possible crash/wrong number of rows in `LIMIT n WITH TIES` when there are a lot of rows equal to n'th row. [#9464](https://github.com/ClickHouse/ClickHouse/pull/9464) ([tavplubix](https://github.com/tavplubix)) +* Fix possible mismatched checksums with column TTLs. [#9451](https://github.com/ClickHouse/ClickHouse/pull/9451) ([Anton Popov](https://github.com/CurtizJ)) +* Fix crash when a user tries to `ALTER MODIFY SETTING` for old-formated `MergeTree` table engines family. [#9435](https://github.com/ClickHouse/ClickHouse/pull/9435) ([alesapin](https://github.com/alesapin)) +* Now we will try finalize mutations more frequently. [#9427](https://github.com/ClickHouse/ClickHouse/pull/9427) ([alesapin](https://github.com/alesapin)) +* Fix replication protocol incompatibility introduced in [#8598](https://github.com/ClickHouse/ClickHouse/issues/8598). [#9412](https://github.com/ClickHouse/ClickHouse/pull/9412) ([alesapin](https://github.com/alesapin)) +* Fix not(has()) for the bloom_filter index of array types. [#9407](https://github.com/ClickHouse/ClickHouse/pull/9407) ([achimbab](https://github.com/achimbab)) +* Fixed the behaviour of `match` and `extract` functions when haystack has zero bytes. The behaviour was wrong when haystack was constant. This fixes [#9160](https://github.com/ClickHouse/ClickHouse/issues/9160) [#9163](https://github.com/ClickHouse/ClickHouse/pull/9163) ([alexey-milovidov](https://github.com/alexey-milovidov)) [#9345](https://github.com/ClickHouse/ClickHouse/pull/9345) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Build/Testing/Packaging Improvement + +* Exception handling now works correctly on Windows Subsystem for Linux. See https://github.com/ClickHouse-Extras/libunwind/pull/3 This fixes [#6480](https://github.com/ClickHouse/ClickHouse/issues/6480) [#9564](https://github.com/ClickHouse/ClickHouse/pull/9564) ([sobolevsv](https://github.com/sobolevsv)) + + +### ClickHouse release v20.1.6.30, 2020-03-05 + +#### Bug Fix + +* Fix data incompatibility when compressed with `T64` codec. +[#9039](https://github.com/ClickHouse/ClickHouse/pull/9039) [(abyss7)](https://github.com/abyss7) +* Fix order of ranges while reading from MergeTree table in one thread. Fixes [#8964](https://github.com/ClickHouse/ClickHouse/issues/8964). +[#9050](https://github.com/ClickHouse/ClickHouse/pull/9050) [(CurtizJ)](https://github.com/CurtizJ) +* Fix possible segfault in `MergeTreeRangeReader`, while executing `PREWHERE`. Fixes [#9064](https://github.com/ClickHouse/ClickHouse/issues/9064). +[#9106](https://github.com/ClickHouse/ClickHouse/pull/9106) [(CurtizJ)](https://github.com/CurtizJ) +* Fix `reinterpretAsFixedString` to return `FixedString` instead of `String`. +[#9052](https://github.com/ClickHouse/ClickHouse/pull/9052) [(oandrew)](https://github.com/oandrew) +* Fix `joinGet` with nullable return types. Fixes [#8919](https://github.com/ClickHouse/ClickHouse/issues/8919) +[#9014](https://github.com/ClickHouse/ClickHouse/pull/9014) [(amosbird)](https://github.com/amosbird) +* Fix fuzz test and incorrect behaviour of bitTestAll/bitTestAny functions. +[#9143](https://github.com/ClickHouse/ClickHouse/pull/9143) [(alexey-milovidov)](https://github.com/alexey-milovidov) +* Fix the behaviour of match and extract functions when haystack has zero bytes. The behaviour was wrong when haystack was constant. Fixes [#9160](https://github.com/ClickHouse/ClickHouse/issues/9160) +[#9163](https://github.com/ClickHouse/ClickHouse/pull/9163) [(alexey-milovidov)](https://github.com/alexey-milovidov) +* Fixed execution of inversed predicates when non-strictly monotinic functional index is used. Fixes [#9034](https://github.com/ClickHouse/ClickHouse/issues/9034) +[#9223](https://github.com/ClickHouse/ClickHouse/pull/9223) [(Akazz)](https://github.com/Akazz) +* Allow to rewrite `CROSS` to `INNER JOIN` if there's `[NOT] LIKE` operator in `WHERE` section. Fixes [#9191](https://github.com/ClickHouse/ClickHouse/issues/9191) +[#9229](https://github.com/ClickHouse/ClickHouse/pull/9229) [(4ertus2)](https://github.com/4ertus2) +* Allow first column(s) in a table with Log engine be an alias. +[#9231](https://github.com/ClickHouse/ClickHouse/pull/9231) [(abyss7)](https://github.com/abyss7) +* Allow comma join with `IN()` inside. Fixes [#7314](https://github.com/ClickHouse/ClickHouse/issues/7314). +[#9251](https://github.com/ClickHouse/ClickHouse/pull/9251) [(4ertus2)](https://github.com/4ertus2) +* Improve `ALTER MODIFY/ADD` queries logic. Now you cannot `ADD` column without type, `MODIFY` default expression does not change type of column and `MODIFY` type does not loose default expression value. Fixes [#8669](https://github.com/ClickHouse/ClickHouse/issues/8669). +[#9227](https://github.com/ClickHouse/ClickHouse/pull/9227) [(alesapin)](https://github.com/alesapin) +* Fix mutations finalization, when already done mutation can have status is_done=0. +[#9217](https://github.com/ClickHouse/ClickHouse/pull/9217) [(alesapin)](https://github.com/alesapin) +* Support "Processors" pipeline for system.numbers and system.numbers_mt. This also fixes the bug when `max_execution_time` is not respected. +[#7796](https://github.com/ClickHouse/ClickHouse/pull/7796) [(KochetovNicolai)](https://github.com/KochetovNicolai) +* Fix wrong counting of `DictCacheKeysRequestedFound` metric. +[#9411](https://github.com/ClickHouse/ClickHouse/pull/9411) [(nikitamikhaylov)](https://github.com/nikitamikhaylov) +* Added a check for storage policy in `ATTACH PARTITION FROM`, `REPLACE PARTITION`, `MOVE TO TABLE` which otherwise could make data of part inaccessible after restart and prevent ClickHouse to start. +[#9383](https://github.com/ClickHouse/ClickHouse/pull/9383) [(excitoon)](https://github.com/excitoon) +* Fixed UBSan report in `MergeTreeIndexSet`. This fixes [#9250](https://github.com/ClickHouse/ClickHouse/issues/9250) +[#9365](https://github.com/ClickHouse/ClickHouse/pull/9365) [(alexey-milovidov)](https://github.com/alexey-milovidov) +* Fix possible datarace in BlockIO. +[#9356](https://github.com/ClickHouse/ClickHouse/pull/9356) [(KochetovNicolai)](https://github.com/KochetovNicolai) +* Support for `UInt64` numbers that don't fit in Int64 in JSON-related functions. Update `SIMDJSON` to master. This fixes [#9209](https://github.com/ClickHouse/ClickHouse/issues/9209) +[#9344](https://github.com/ClickHouse/ClickHouse/pull/9344) [(alexey-milovidov)](https://github.com/alexey-milovidov) +* Fix the issue when the amount of free space is not calculated correctly if the data directory is mounted to a separate device. For default disk calculate the free space from data subdirectory. This fixes [#7441](https://github.com/ClickHouse/ClickHouse/issues/7441) +[#9257](https://github.com/ClickHouse/ClickHouse/pull/9257) [(millb)](https://github.com/millb) +* Fix the issue when TLS connections may fail with the message `OpenSSL SSL_read: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error and SSL Exception: error:2400006E:random number generator::error retrieving entropy.` Update OpenSSL to upstream master. +[#8956](https://github.com/ClickHouse/ClickHouse/pull/8956) [(alexey-milovidov)](https://github.com/alexey-milovidov) +* When executing `CREATE` query, fold constant expressions in storage engine arguments. Replace empty database name with current database. Fixes [#6508](https://github.com/ClickHouse/ClickHouse/issues/6508), [#3492](https://github.com/ClickHouse/ClickHouse/issues/3492). Also fix check for local address in ClickHouseDictionarySource. +[#9262](https://github.com/ClickHouse/ClickHouse/pull/9262) [(tabplubix)](https://github.com/tavplubix) +* Fix segfault in `StorageMerge`, which can happen when reading from StorageFile. +[#9387](https://github.com/ClickHouse/ClickHouse/pull/9387) [(tabplubix)](https://github.com/tavplubix) +* Prevent losing data in `Kafka` in rare cases when exception happens after reading suffix but before commit. Fixes [#9378](https://github.com/ClickHouse/ClickHouse/issues/9378). Related: [#7175](https://github.com/ClickHouse/ClickHouse/issues/7175) +[#9507](https://github.com/ClickHouse/ClickHouse/pull/9507) [(filimonov)](https://github.com/filimonov) +* Fix bug leading to server termination when trying to use / drop `Kafka` table created with wrong parameters. Fixes [#9494](https://github.com/ClickHouse/ClickHouse/issues/9494). Incorporates [#9507](https://github.com/ClickHouse/ClickHouse/issues/9507). +[#9513](https://github.com/ClickHouse/ClickHouse/pull/9513) [(filimonov)](https://github.com/filimonov) + +#### New Feature +* Add `deduplicate_blocks_in_dependent_materialized_views` option to control the behaviour of idempotent inserts into tables with materialized views. This new feature was added to the bugfix release by a special request from Altinity. +[#9070](https://github.com/ClickHouse/ClickHouse/pull/9070) [(urykhy)](https://github.com/urykhy) + +### ClickHouse release v20.1.2.4, 2020-01-22 + +#### Backward Incompatible Change +* Make the setting `merge_tree_uniform_read_distribution` obsolete. The server still recognizes this setting but it has no effect. [#8308](https://github.com/ClickHouse/ClickHouse/pull/8308) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Changed return type of the function `greatCircleDistance` to `Float32` because now the result of calculation is `Float32`. [#7993](https://github.com/ClickHouse/ClickHouse/pull/7993) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Now it's expected that query parameters are represented in "escaped" format. For example, to pass string `ab` you have to write `a\tb` or `a\b` and respectively, `a%5Ctb` or `a%5C%09b` in URL. This is needed to add the possibility to pass NULL as `\N`. This fixes [#7488](https://github.com/ClickHouse/ClickHouse/issues/7488). [#8517](https://github.com/ClickHouse/ClickHouse/pull/8517) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Enable `use_minimalistic_part_header_in_zookeeper` setting for `ReplicatedMergeTree` by default. This will significantly reduce amount of data stored in ZooKeeper. This setting is supported since version 19.1 and we already use it in production in multiple services without any issues for more than half a year. Disable this setting if you have a chance to downgrade to versions older than 19.1. [#6850](https://github.com/ClickHouse/ClickHouse/pull/6850) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Data skipping indices are production ready and enabled by default. The settings `allow_experimental_data_skipping_indices`, `allow_experimental_cross_to_join_conversion` and `allow_experimental_multiple_joins_emulation` are now obsolete and do nothing. [#7974](https://github.com/ClickHouse/ClickHouse/pull/7974) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add new `ANY JOIN` logic for `StorageJoin` consistent with `JOIN` operation. To upgrade without changes in behaviour you need add `SETTINGS any_join_distinct_right_table_keys = 1` to Engine Join tables metadata or recreate these tables after upgrade. [#8400](https://github.com/ClickHouse/ClickHouse/pull/8400) ([Artem Zuikov](https://github.com/4ertus2)) +* Require server to be restarted to apply the changes in logging configuration. This is a temporary workaround to avoid the bug where the server logs to a deleted log file (see [#8696](https://github.com/ClickHouse/ClickHouse/issues/8696)). [#8707](https://github.com/ClickHouse/ClickHouse/pull/8707) ([Alexander Kuzmenkov](https://github.com/akuzm)) + +#### New Feature +* Added information about part paths to `system.merges`. [#8043](https://github.com/ClickHouse/ClickHouse/pull/8043) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Add ability to execute `SYSTEM RELOAD DICTIONARY` query in `ON CLUSTER` mode. [#8288](https://github.com/ClickHouse/ClickHouse/pull/8288) ([Guillaume Tassery](https://github.com/YiuRULE)) +* Add ability to execute `CREATE DICTIONARY` queries in `ON CLUSTER` mode. [#8163](https://github.com/ClickHouse/ClickHouse/pull/8163) ([alesapin](https://github.com/alesapin)) +* Now user's profile in `users.xml` can inherit multiple profiles. [#8343](https://github.com/ClickHouse/ClickHouse/pull/8343) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) +* Added `system.stack_trace` table that allows to look at stack traces of all server threads. This is useful for developers to introspect server state. This fixes [#7576](https://github.com/ClickHouse/ClickHouse/issues/7576). [#8344](https://github.com/ClickHouse/ClickHouse/pull/8344) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add `DateTime64` datatype with configurable sub-second precision. [#7170](https://github.com/ClickHouse/ClickHouse/pull/7170) ([Vasily Nemkov](https://github.com/Enmk)) +* Add table function `clusterAllReplicas` which allows to query all the nodes in the cluster. [#8493](https://github.com/ClickHouse/ClickHouse/pull/8493) ([kiran sunkari](https://github.com/kiransunkari)) +* Add aggregate function `categoricalInformationValue` which calculates the information value of a discrete feature. [#8117](https://github.com/ClickHouse/ClickHouse/pull/8117) ([hcz](https://github.com/hczhcz)) +* Speed up parsing of data files in `CSV`, `TSV` and `JSONEachRow` format by doing it in parallel. [#7780](https://github.com/ClickHouse/ClickHouse/pull/7780) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Add function `bankerRound` which performs banker's rounding. [#8112](https://github.com/ClickHouse/ClickHouse/pull/8112) ([hcz](https://github.com/hczhcz)) +* Support more languages in embedded dictionary for region names: 'ru', 'en', 'ua', 'uk', 'by', 'kz', 'tr', 'de', 'uz', 'lv', 'lt', 'et', 'pt', 'he', 'vi'. [#8189](https://github.com/ClickHouse/ClickHouse/pull/8189) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Improvements in consistency of `ANY JOIN` logic. Now `t1 ANY LEFT JOIN t2` equals `t2 ANY RIGHT JOIN t1`. [#7665](https://github.com/ClickHouse/ClickHouse/pull/7665) ([Artem Zuikov](https://github.com/4ertus2)) +* Add setting `any_join_distinct_right_table_keys` which enables old behaviour for `ANY INNER JOIN`. [#7665](https://github.com/ClickHouse/ClickHouse/pull/7665) ([Artem Zuikov](https://github.com/4ertus2)) +* Add new `SEMI` and `ANTI JOIN`. Old `ANY INNER JOIN` behaviour now available as `SEMI LEFT JOIN`. [#7665](https://github.com/ClickHouse/ClickHouse/pull/7665) ([Artem Zuikov](https://github.com/4ertus2)) +* Added `Distributed` format for `File` engine and `file` table function which allows to read from `.bin` files generated by asynchronous inserts into `Distributed` table. [#8535](https://github.com/ClickHouse/ClickHouse/pull/8535) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Add optional reset column argument for `runningAccumulate` which allows to reset aggregation results for each new key value. [#8326](https://github.com/ClickHouse/ClickHouse/pull/8326) ([Sergey Kononenko](https://github.com/kononencheg)) +* Add ability to use ClickHouse as Prometheus endpoint. [#7900](https://github.com/ClickHouse/ClickHouse/pull/7900) ([vdimir](https://github.com/Vdimir)) +* Add section `` in `config.xml` which restricts allowed hosts for remote table engines and table functions `URL`, `S3`, `HDFS`. [#7154](https://github.com/ClickHouse/ClickHouse/pull/7154) ([Mikhail Korotov](https://github.com/millb)) +* Added function `greatCircleAngle` which calculates the distance on a sphere in degrees. [#8105](https://github.com/ClickHouse/ClickHouse/pull/8105) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Changed Earth radius to be consistent with H3 library. [#8105](https://github.com/ClickHouse/ClickHouse/pull/8105) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added `JSONCompactEachRow` and `JSONCompactEachRowWithNamesAndTypes` formats for input and output. [#7841](https://github.com/ClickHouse/ClickHouse/pull/7841) ([Mikhail Korotov](https://github.com/millb)) +* Added feature for file-related table engines and table functions (`File`, `S3`, `URL`, `HDFS`) which allows to read and write `gzip` files based on additional engine parameter or file extension. [#7840](https://github.com/ClickHouse/ClickHouse/pull/7840) ([Andrey Bodrov](https://github.com/apbodrov)) +* Added the `randomASCII(length)` function, generating a string with a random set of [ASCII](https://en.wikipedia.org/wiki/ASCII#Printable_characters) printable characters. [#8401](https://github.com/ClickHouse/ClickHouse/pull/8401) ([BayoNet](https://github.com/BayoNet)) +* Added function `JSONExtractArrayRaw` which returns an array on unparsed json array elements from `JSON` string. [#8081](https://github.com/ClickHouse/ClickHouse/pull/8081) ([Oleg Matrokhin](https://github.com/errx)) +* Add `arrayZip` function which allows to combine multiple arrays of equal lengths into one array of tuples. [#8149](https://github.com/ClickHouse/ClickHouse/pull/8149) ([Winter Zhang](https://github.com/zhang2014)) +* Add ability to move data between disks according to configured `TTL`-expressions for `*MergeTree` table engines family. [#8140](https://github.com/ClickHouse/ClickHouse/pull/8140) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Added new aggregate function `avgWeighted` which allows to calculate weighted average. [#7898](https://github.com/ClickHouse/ClickHouse/pull/7898) ([Andrey Bodrov](https://github.com/apbodrov)) +* Now parallel parsing is enabled by default for `TSV`, `TSKV`, `CSV` and `JSONEachRow` formats. [#7894](https://github.com/ClickHouse/ClickHouse/pull/7894) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Add several geo functions from `H3` library: `h3GetResolution`, `h3EdgeAngle`, `h3EdgeLength`, `h3IsValid` and `h3kRing`. [#8034](https://github.com/ClickHouse/ClickHouse/pull/8034) ([Konstantin Malanchev](https://github.com/hombit)) +* Added support for brotli (`br`) compression in file-related storages and table functions. This fixes [#8156](https://github.com/ClickHouse/ClickHouse/issues/8156). [#8526](https://github.com/ClickHouse/ClickHouse/pull/8526) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add `groupBit*` functions for the `SimpleAggregationFunction` type. [#8485](https://github.com/ClickHouse/ClickHouse/pull/8485) ([Guillaume Tassery](https://github.com/YiuRULE)) + +#### Bug Fix +* Fix rename of tables with `Distributed` engine. Fixes issue [#7868](https://github.com/ClickHouse/ClickHouse/issues/7868). [#8306](https://github.com/ClickHouse/ClickHouse/pull/8306) ([tavplubix](https://github.com/tavplubix)) +* Now dictionaries support `EXPRESSION` for attributes in arbitrary string in non-ClickHouse SQL dialect. [#8098](https://github.com/ClickHouse/ClickHouse/pull/8098) ([alesapin](https://github.com/alesapin)) +* Fix broken `INSERT SELECT FROM mysql(...)` query. This fixes [#8070](https://github.com/ClickHouse/ClickHouse/issues/8070) and [#7960](https://github.com/ClickHouse/ClickHouse/issues/7960). [#8234](https://github.com/ClickHouse/ClickHouse/pull/8234) ([tavplubix](https://github.com/tavplubix)) +* Fix error "Mismatch column sizes" when inserting default `Tuple` from `JSONEachRow`. This fixes [#5653](https://github.com/ClickHouse/ClickHouse/issues/5653). [#8606](https://github.com/ClickHouse/ClickHouse/pull/8606) ([tavplubix](https://github.com/tavplubix)) +* Now an exception will be thrown in case of using `WITH TIES` alongside `LIMIT BY`. Also add ability to use `TOP` with `LIMIT BY`. This fixes [#7472](https://github.com/ClickHouse/ClickHouse/issues/7472). [#7637](https://github.com/ClickHouse/ClickHouse/pull/7637) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Fix unintendent dependency from fresh glibc version in `clickhouse-odbc-bridge` binary. [#8046](https://github.com/ClickHouse/ClickHouse/pull/8046) ([Amos Bird](https://github.com/amosbird)) +* Fix bug in check function of `*MergeTree` engines family. Now it does not fail in case when we have equal amount of rows in last granule and last mark (non-final). [#8047](https://github.com/ClickHouse/ClickHouse/pull/8047) ([alesapin](https://github.com/alesapin)) +* Fix insert into `Enum*` columns after `ALTER` query, when underlying numeric type is equal to table specified type. This fixes [#7836](https://github.com/ClickHouse/ClickHouse/issues/7836). [#7908](https://github.com/ClickHouse/ClickHouse/pull/7908) ([Anton Popov](https://github.com/CurtizJ)) +* Allowed non-constant negative "size" argument for function `substring`. It was not allowed by mistake. This fixes [#4832](https://github.com/ClickHouse/ClickHouse/issues/4832). [#7703](https://github.com/ClickHouse/ClickHouse/pull/7703) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix parsing bug when wrong number of arguments passed to `(O|J)DBC` table engine. [#7709](https://github.com/ClickHouse/ClickHouse/pull/7709) ([alesapin](https://github.com/alesapin)) +* Using command name of the running clickhouse process when sending logs to syslog. In previous versions, empty string was used instead of command name. [#8460](https://github.com/ClickHouse/ClickHouse/pull/8460) ([Michael Nacharov](https://github.com/mnach)) +* Fix check of allowed hosts for `localhost`. This PR fixes the solution provided in [#8241](https://github.com/ClickHouse/ClickHouse/pull/8241). [#8342](https://github.com/ClickHouse/ClickHouse/pull/8342) ([Vitaly Baranov](https://github.com/vitlibar)) +* Fix rare crash in `argMin` and `argMax` functions for long string arguments, when result is used in `runningAccumulate` function. This fixes [#8325](https://github.com/ClickHouse/ClickHouse/issues/8325) [#8341](https://github.com/ClickHouse/ClickHouse/pull/8341) ([dinosaur](https://github.com/769344359)) +* Fix memory overcommit for tables with `Buffer` engine. [#8345](https://github.com/ClickHouse/ClickHouse/pull/8345) ([Azat Khuzhin](https://github.com/azat)) +* Fixed potential bug in functions that can take `NULL` as one of the arguments and return non-NULL. [#8196](https://github.com/ClickHouse/ClickHouse/pull/8196) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Better metrics calculations in thread pool for background processes for `MergeTree` table engines. [#8194](https://github.com/ClickHouse/ClickHouse/pull/8194) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fix function `IN` inside `WHERE` statement when row-level table filter is present. Fixes [#6687](https://github.com/ClickHouse/ClickHouse/issues/6687) [#8357](https://github.com/ClickHouse/ClickHouse/pull/8357) ([Ivan](https://github.com/abyss7)) +* Now an exception is thrown if the integral value is not parsed completely for settings values. [#7678](https://github.com/ClickHouse/ClickHouse/pull/7678) ([Mikhail Korotov](https://github.com/millb)) +* Fix exception when aggregate function is used in query to distributed table with more than two local shards. [#8164](https://github.com/ClickHouse/ClickHouse/pull/8164) ([å°è·¯](https://github.com/nicelulu)) +* Now bloom filter can handle zero length arrays and does not perform redundant calculations. [#8242](https://github.com/ClickHouse/ClickHouse/pull/8242) ([achimbab](https://github.com/achimbab)) +* Fixed checking if a client host is allowed by matching the client host to `host_regexp` specified in `users.xml`. [#8241](https://github.com/ClickHouse/ClickHouse/pull/8241) ([Vitaly Baranov](https://github.com/vitlibar)) +* Relax ambiguous column check that leads to false positives in multiple `JOIN ON` section. [#8385](https://github.com/ClickHouse/ClickHouse/pull/8385) ([Artem Zuikov](https://github.com/4ertus2)) +* Fixed possible server crash (`std::terminate`) when the server cannot send or write data in `JSON` or `XML` format with values of `String` data type (that require `UTF-8` validation) or when compressing result data with Brotli algorithm or in some other rare cases. This fixes [#7603](https://github.com/ClickHouse/ClickHouse/issues/7603) [#8384](https://github.com/ClickHouse/ClickHouse/pull/8384) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix race condition in `StorageDistributedDirectoryMonitor` found by CI. This fixes [#8364](https://github.com/ClickHouse/ClickHouse/issues/8364). [#8383](https://github.com/ClickHouse/ClickHouse/pull/8383) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Now background merges in `*MergeTree` table engines family preserve storage policy volume order more accurately. [#8549](https://github.com/ClickHouse/ClickHouse/pull/8549) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Now table engine `Kafka` works properly with `Native` format. This fixes [#6731](https://github.com/ClickHouse/ClickHouse/issues/6731) [#7337](https://github.com/ClickHouse/ClickHouse/issues/7337) [#8003](https://github.com/ClickHouse/ClickHouse/issues/8003). [#8016](https://github.com/ClickHouse/ClickHouse/pull/8016) ([filimonov](https://github.com/filimonov)) +* Fixed formats with headers (like `CSVWithNames`) which were throwing exception about EOF for table engine `Kafka`. [#8016](https://github.com/ClickHouse/ClickHouse/pull/8016) ([filimonov](https://github.com/filimonov)) +* Fixed a bug with making set from subquery in right part of `IN` section. This fixes [#5767](https://github.com/ClickHouse/ClickHouse/issues/5767) and [#2542](https://github.com/ClickHouse/ClickHouse/issues/2542). [#7755](https://github.com/ClickHouse/ClickHouse/pull/7755) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Fix possible crash while reading from storage `File`. [#7756](https://github.com/ClickHouse/ClickHouse/pull/7756) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fixed reading of the files in `Parquet` format containing columns of type `list`. [#8334](https://github.com/ClickHouse/ClickHouse/pull/8334) ([maxulan](https://github.com/maxulan)) +* Fix error `Not found column` for distributed queries with `PREWHERE` condition dependent on sampling key if `max_parallel_replicas > 1`. [#7913](https://github.com/ClickHouse/ClickHouse/pull/7913) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix error `Not found column` if query used `PREWHERE` dependent on table's alias and the result set was empty because of primary key condition. [#7911](https://github.com/ClickHouse/ClickHouse/pull/7911) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fixed return type for functions `rand` and `randConstant` in case of `Nullable` argument. Now functions always return `UInt32` and never `Nullable(UInt32)`. [#8204](https://github.com/ClickHouse/ClickHouse/pull/8204) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Disabled predicate push-down for `WITH FILL` expression. This fixes [#7784](https://github.com/ClickHouse/ClickHouse/issues/7784). [#7789](https://github.com/ClickHouse/ClickHouse/pull/7789) ([Winter Zhang](https://github.com/zhang2014)) +* Fixed incorrect `count()` result for `SummingMergeTree` when `FINAL` section is used. [#3280](https://github.com/ClickHouse/ClickHouse/issues/3280) [#7786](https://github.com/ClickHouse/ClickHouse/pull/7786) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Fix possible incorrect result for constant functions from remote servers. It happened for queries with functions like `version()`, `uptime()`, etc. which returns different constant values for different servers. This fixes [#7666](https://github.com/ClickHouse/ClickHouse/issues/7666). [#7689](https://github.com/ClickHouse/ClickHouse/pull/7689) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix complicated bug in push-down predicate optimization which leads to wrong results. This fixes a lot of issues on push-down predicate optimization. [#8503](https://github.com/ClickHouse/ClickHouse/pull/8503) ([Winter Zhang](https://github.com/zhang2014)) +* Fix crash in `CREATE TABLE .. AS dictionary` query. [#8508](https://github.com/ClickHouse/ClickHouse/pull/8508) ([Azat Khuzhin](https://github.com/azat)) +* Several improvements ClickHouse grammar in `.g4` file. [#8294](https://github.com/ClickHouse/ClickHouse/pull/8294) ([taiyang-li](https://github.com/taiyang-li)) +* Fix bug that leads to crashes in `JOIN`s with tables with engine `Join`. This fixes [#7556](https://github.com/ClickHouse/ClickHouse/issues/7556) [#8254](https://github.com/ClickHouse/ClickHouse/issues/8254) [#7915](https://github.com/ClickHouse/ClickHouse/issues/7915) [#8100](https://github.com/ClickHouse/ClickHouse/issues/8100). [#8298](https://github.com/ClickHouse/ClickHouse/pull/8298) ([Artem Zuikov](https://github.com/4ertus2)) +* Fix redundant dictionaries reload on `CREATE DATABASE`. [#7916](https://github.com/ClickHouse/ClickHouse/pull/7916) ([Azat Khuzhin](https://github.com/azat)) +* Limit maximum number of streams for read from `StorageFile` and `StorageHDFS`. Fixes [#7650](https://github.com/ClickHouse/ClickHouse/issues/7650). [#7981](https://github.com/ClickHouse/ClickHouse/pull/7981) ([alesapin](https://github.com/alesapin)) +* Fix bug in `ALTER ... MODIFY ... CODEC` query, when user specify both default expression and codec. Fixes [8593](https://github.com/ClickHouse/ClickHouse/issues/8593). [#8614](https://github.com/ClickHouse/ClickHouse/pull/8614) ([alesapin](https://github.com/alesapin)) +* Fix error in background merge of columns with `SimpleAggregateFunction(LowCardinality)` type. [#8613](https://github.com/ClickHouse/ClickHouse/pull/8613) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fixed type check in function `toDateTime64`. [#8375](https://github.com/ClickHouse/ClickHouse/pull/8375) ([Vasily Nemkov](https://github.com/Enmk)) +* Now server do not crash on `LEFT` or `FULL JOIN` with and Join engine and unsupported `join_use_nulls` settings. [#8479](https://github.com/ClickHouse/ClickHouse/pull/8479) ([Artem Zuikov](https://github.com/4ertus2)) +* Now `DROP DICTIONARY IF EXISTS db.dict` query does not throw exception if `db` does not exist. [#8185](https://github.com/ClickHouse/ClickHouse/pull/8185) ([Vitaly Baranov](https://github.com/vitlibar)) +* Fix possible crashes in table functions (`file`, `mysql`, `remote`) caused by usage of reference to removed `IStorage` object. Fix incorrect parsing of columns specified at insertion into table function. [#7762](https://github.com/ClickHouse/ClickHouse/pull/7762) ([tavplubix](https://github.com/tavplubix)) +* Ensure network be up before starting `clickhouse-server`. This fixes [#7507](https://github.com/ClickHouse/ClickHouse/issues/7507). [#8570](https://github.com/ClickHouse/ClickHouse/pull/8570) ([Zhichang Yu](https://github.com/yuzhichang)) +* Fix timeouts handling for secure connections, so queries does not hang indefenitely. This fixes [#8126](https://github.com/ClickHouse/ClickHouse/issues/8126). [#8128](https://github.com/ClickHouse/ClickHouse/pull/8128) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix `clickhouse-copier`'s redundant contention between concurrent workers. [#7816](https://github.com/ClickHouse/ClickHouse/pull/7816) ([Ding Xiang Fei](https://github.com/dingxiangfei2009)) +* Now mutations does not skip attached parts, even if their mutation version were larger than current mutation version. [#7812](https://github.com/ClickHouse/ClickHouse/pull/7812) ([Zhichang Yu](https://github.com/yuzhichang)) [#8250](https://github.com/ClickHouse/ClickHouse/pull/8250) ([alesapin](https://github.com/alesapin)) +* Ignore redundant copies of `*MergeTree` data parts after move to another disk and server restart. [#7810](https://github.com/ClickHouse/ClickHouse/pull/7810) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fix crash in `FULL JOIN` with `LowCardinality` in `JOIN` key. [#8252](https://github.com/ClickHouse/ClickHouse/pull/8252) ([Artem Zuikov](https://github.com/4ertus2)) +* Forbidden to use column name more than once in insert query like `INSERT INTO tbl (x, y, x)`. This fixes [#5465](https://github.com/ClickHouse/ClickHouse/issues/5465), [#7681](https://github.com/ClickHouse/ClickHouse/issues/7681). [#7685](https://github.com/ClickHouse/ClickHouse/pull/7685) ([alesapin](https://github.com/alesapin)) +* Added fallback for detection the number of physical CPU cores for unknown CPUs (using the number of logical CPU cores). This fixes [#5239](https://github.com/ClickHouse/ClickHouse/issues/5239). [#7726](https://github.com/ClickHouse/ClickHouse/pull/7726) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix `There's no column` error for materialized and alias columns. [#8210](https://github.com/ClickHouse/ClickHouse/pull/8210) ([Artem Zuikov](https://github.com/4ertus2)) +* Fixed sever crash when `EXISTS` query was used without `TABLE` or `DICTIONARY` qualifier. Just like `EXISTS t`. This fixes [#8172](https://github.com/ClickHouse/ClickHouse/issues/8172). This bug was introduced in version 19.17. [#8213](https://github.com/ClickHouse/ClickHouse/pull/8213) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix rare bug with error `"Sizes of columns does not match"` that might appear when using `SimpleAggregateFunction` column. [#7790](https://github.com/ClickHouse/ClickHouse/pull/7790) ([Boris Granveaud](https://github.com/bgranvea)) +* Fix bug where user with empty `allow_databases` got access to all databases (and same for `allow_dictionaries`). [#7793](https://github.com/ClickHouse/ClickHouse/pull/7793) ([DeifyTheGod](https://github.com/DeifyTheGod)) +* Fix client crash when server already disconnected from client. [#8071](https://github.com/ClickHouse/ClickHouse/pull/8071) ([Azat Khuzhin](https://github.com/azat)) +* Fix `ORDER BY` behaviour in case of sorting by primary key prefix and non primary key suffix. [#7759](https://github.com/ClickHouse/ClickHouse/pull/7759) ([Anton Popov](https://github.com/CurtizJ)) +* Check if qualified column present in the table. This fixes [#6836](https://github.com/ClickHouse/ClickHouse/issues/6836). [#7758](https://github.com/ClickHouse/ClickHouse/pull/7758) ([Artem Zuikov](https://github.com/4ertus2)) +* Fixed behavior with `ALTER MOVE` ran immediately after merge finish moves superpart of specified. Fixes [#8103](https://github.com/ClickHouse/ClickHouse/issues/8103). [#8104](https://github.com/ClickHouse/ClickHouse/pull/8104) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fix possible server crash while using `UNION` with different number of columns. Fixes [#7279](https://github.com/ClickHouse/ClickHouse/issues/7279). [#7929](https://github.com/ClickHouse/ClickHouse/pull/7929) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix size of result substring for function `substr` with negative size. [#8589](https://github.com/ClickHouse/ClickHouse/pull/8589) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Now server does not execute part mutation in `MergeTree` if there are not enough free threads in background pool. [#8588](https://github.com/ClickHouse/ClickHouse/pull/8588) ([tavplubix](https://github.com/tavplubix)) +* Fix a minor typo on formatting `UNION ALL` AST. [#7999](https://github.com/ClickHouse/ClickHouse/pull/7999) ([litao91](https://github.com/litao91)) +* Fixed incorrect bloom filter results for negative numbers. This fixes [#8317](https://github.com/ClickHouse/ClickHouse/issues/8317). [#8566](https://github.com/ClickHouse/ClickHouse/pull/8566) ([Winter Zhang](https://github.com/zhang2014)) +* Fixed potential buffer overflow in decompress. Malicious user can pass fabricated compressed data that will cause read after buffer. This issue was found by Eldar Zaitov from Yandex information security team. [#8404](https://github.com/ClickHouse/ClickHouse/pull/8404) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix incorrect result because of integers overflow in `arrayIntersect`. [#7777](https://github.com/ClickHouse/ClickHouse/pull/7777) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Now `OPTIMIZE TABLE` query will not wait for offline replicas to perform the operation. [#8314](https://github.com/ClickHouse/ClickHouse/pull/8314) ([javi santana](https://github.com/javisantana)) +* Fixed `ALTER TTL` parser for `Replicated*MergeTree` tables. [#8318](https://github.com/ClickHouse/ClickHouse/pull/8318) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fix communication between server and client, so server read temporary tables info after query failure. [#8084](https://github.com/ClickHouse/ClickHouse/pull/8084) ([Azat Khuzhin](https://github.com/azat)) +* Fix `bitmapAnd` function error when intersecting an aggregated bitmap and a scalar bitmap. [#8082](https://github.com/ClickHouse/ClickHouse/pull/8082) ([Yue Huang](https://github.com/moon03432)) +* Refine the definition of `ZXid` according to the ZooKeeper Programmer's Guide which fixes bug in `clickhouse-cluster-copier`. [#8088](https://github.com/ClickHouse/ClickHouse/pull/8088) ([Ding Xiang Fei](https://github.com/dingxiangfei2009)) +* `odbc` table function now respects `external_table_functions_use_nulls` setting. [#7506](https://github.com/ClickHouse/ClickHouse/pull/7506) ([Vasily Nemkov](https://github.com/Enmk)) +* Fixed bug that lead to a rare data race. [#8143](https://github.com/ClickHouse/ClickHouse/pull/8143) ([Alexander Kazakov](https://github.com/Akazz)) +* Now `SYSTEM RELOAD DICTIONARY` reloads a dictionary completely, ignoring `update_field`. This fixes [#7440](https://github.com/ClickHouse/ClickHouse/issues/7440). [#8037](https://github.com/ClickHouse/ClickHouse/pull/8037) ([Vitaly Baranov](https://github.com/vitlibar)) +* Add ability to check if dictionary exists in create query. [#8032](https://github.com/ClickHouse/ClickHouse/pull/8032) ([alesapin](https://github.com/alesapin)) +* Fix `Float*` parsing in `Values` format. This fixes [#7817](https://github.com/ClickHouse/ClickHouse/issues/7817). [#7870](https://github.com/ClickHouse/ClickHouse/pull/7870) ([tavplubix](https://github.com/tavplubix)) +* Fix crash when we cannot reserve space in some background operations of `*MergeTree` table engines family. [#7873](https://github.com/ClickHouse/ClickHouse/pull/7873) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fix crash of merge operation when table contains `SimpleAggregateFunction(LowCardinality)` column. This fixes [#8515](https://github.com/ClickHouse/ClickHouse/issues/8515). [#8522](https://github.com/ClickHouse/ClickHouse/pull/8522) ([Azat Khuzhin](https://github.com/azat)) +* Restore support of all ICU locales and add the ability to apply collations for constant expressions. Also add language name to `system.collations` table. [#8051](https://github.com/ClickHouse/ClickHouse/pull/8051) ([alesapin](https://github.com/alesapin)) +* Fix bug when external dictionaries with zero minimal lifetime (`LIFETIME(MIN 0 MAX N)`, `LIFETIME(N)`) don't update in background. [#7983](https://github.com/ClickHouse/ClickHouse/pull/7983) ([alesapin](https://github.com/alesapin)) +* Fix crash when external dictionary with ClickHouse source has subquery in query. [#8351](https://github.com/ClickHouse/ClickHouse/pull/8351) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Fix incorrect parsing of file extension in table with engine `URL`. This fixes [#8157](https://github.com/ClickHouse/ClickHouse/issues/8157). [#8419](https://github.com/ClickHouse/ClickHouse/pull/8419) ([Andrey Bodrov](https://github.com/apbodrov)) +* Fix `CHECK TABLE` query for `*MergeTree` tables without key. Fixes [#7543](https://github.com/ClickHouse/ClickHouse/issues/7543). [#7979](https://github.com/ClickHouse/ClickHouse/pull/7979) ([alesapin](https://github.com/alesapin)) +* Fixed conversion of `Float64` to MySQL type. [#8079](https://github.com/ClickHouse/ClickHouse/pull/8079) ([Yuriy Baranov](https://github.com/yurriy)) +* Now if table was not completely dropped because of server crash, server will try to restore and load it. [#8176](https://github.com/ClickHouse/ClickHouse/pull/8176) ([tavplubix](https://github.com/tavplubix)) +* Fixed crash in table function `file` while inserting into file that does not exist. Now in this case file would be created and then insert would be processed. [#8177](https://github.com/ClickHouse/ClickHouse/pull/8177) ([Olga Khvostikova](https://github.com/stavrolia)) +* Fix rare deadlock which can happen when `trace_log` is in enabled. [#7838](https://github.com/ClickHouse/ClickHouse/pull/7838) ([filimonov](https://github.com/filimonov)) +* Add ability to work with different types besides `Date` in `RangeHashed` external dictionary created from DDL query. Fixes [7899](https://github.com/ClickHouse/ClickHouse/issues/7899). [#8275](https://github.com/ClickHouse/ClickHouse/pull/8275) ([alesapin](https://github.com/alesapin)) +* Fixes crash when `now64()` is called with result of another function. [#8270](https://github.com/ClickHouse/ClickHouse/pull/8270) ([Vasily Nemkov](https://github.com/Enmk)) +* Fixed bug with detecting client IP for connections through mysql wire protocol. [#7743](https://github.com/ClickHouse/ClickHouse/pull/7743) ([Dmitry Muzyka](https://github.com/dmitriy-myz)) +* Fix empty array handling in `arraySplit` function. This fixes [#7708](https://github.com/ClickHouse/ClickHouse/issues/7708). [#7747](https://github.com/ClickHouse/ClickHouse/pull/7747) ([hcz](https://github.com/hczhcz)) +* Fixed the issue when `pid-file` of another running `clickhouse-server` may be deleted. [#8487](https://github.com/ClickHouse/ClickHouse/pull/8487) ([Weiqing Xu](https://github.com/weiqxu)) +* Fix dictionary reload if it has `invalidate_query`, which stopped updates and some exception on previous update tries. [#8029](https://github.com/ClickHouse/ClickHouse/pull/8029) ([alesapin](https://github.com/alesapin)) +* Fixed error in function `arrayReduce` that may lead to "double free" and error in aggregate function combinator `Resample` that may lead to memory leak. Added aggregate function `aggThrow`. This function can be used for testing purposes. [#8446](https://github.com/ClickHouse/ClickHouse/pull/8446) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Improvement +* Improved logging when working with `S3` table engine. [#8251](https://github.com/ClickHouse/ClickHouse/pull/8251) ([Grigory Pervakov](https://github.com/GrigoryPervakov)) +* Printed help message when no arguments are passed when calling `clickhouse-local`. This fixes [#5335](https://github.com/ClickHouse/ClickHouse/issues/5335). [#8230](https://github.com/ClickHouse/ClickHouse/pull/8230) ([Andrey Nagorny](https://github.com/Melancholic)) +* Add setting `mutations_sync` which allows to wait `ALTER UPDATE/DELETE` queries synchronously. [#8237](https://github.com/ClickHouse/ClickHouse/pull/8237) ([alesapin](https://github.com/alesapin)) +* Allow to set up relative `user_files_path` in `config.xml` (in the way similar to `format_schema_path`). [#7632](https://github.com/ClickHouse/ClickHouse/pull/7632) ([hcz](https://github.com/hczhcz)) +* Add exception for illegal types for conversion functions with `-OrZero` postfix. [#7880](https://github.com/ClickHouse/ClickHouse/pull/7880) ([Andrey Konyaev](https://github.com/akonyaev90)) +* Simplify format of the header of data sending to a shard in a distributed query. [#8044](https://github.com/ClickHouse/ClickHouse/pull/8044) ([Vitaly Baranov](https://github.com/vitlibar)) +* `Live View` table engine refactoring. [#8519](https://github.com/ClickHouse/ClickHouse/pull/8519) ([vzakaznikov](https://github.com/vzakaznikov)) +* Add additional checks for external dictionaries created from DDL-queries. [#8127](https://github.com/ClickHouse/ClickHouse/pull/8127) ([alesapin](https://github.com/alesapin)) +* Fix error `Column ... already exists` while using `FINAL` and `SAMPLE` together, e.g. `select count() from table final sample 1/2`. Fixes [#5186](https://github.com/ClickHouse/ClickHouse/issues/5186). [#7907](https://github.com/ClickHouse/ClickHouse/pull/7907) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Now table the first argument of `joinGet` function can be table identifier. [#7707](https://github.com/ClickHouse/ClickHouse/pull/7707) ([Amos Bird](https://github.com/amosbird)) +* Allow using `MaterializedView` with subqueries above `Kafka` tables. [#8197](https://github.com/ClickHouse/ClickHouse/pull/8197) ([filimonov](https://github.com/filimonov)) +* Now background moves between disks run it the seprate thread pool. [#7670](https://github.com/ClickHouse/ClickHouse/pull/7670) ([Vladimir Chebotarev](https://github.com/excitoon)) +* `SYSTEM RELOAD DICTIONARY` now executes synchronously. [#8240](https://github.com/ClickHouse/ClickHouse/pull/8240) ([Vitaly Baranov](https://github.com/vitlibar)) +* Stack traces now display physical addresses (offsets in object file) instead of virtual memory addresses (where the object file was loaded). That allows the use of `addr2line` when binary is position independent and ASLR is active. This fixes [#8360](https://github.com/ClickHouse/ClickHouse/issues/8360). [#8387](https://github.com/ClickHouse/ClickHouse/pull/8387) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Support new syntax for row-level security filters: `
    …
    `. Fixes [#5779](https://github.com/ClickHouse/ClickHouse/issues/5779). [#8381](https://github.com/ClickHouse/ClickHouse/pull/8381) ([Ivan](https://github.com/abyss7)) +* Now `cityHash` function can work with `Decimal` and `UUID` types. Fixes [#5184](https://github.com/ClickHouse/ClickHouse/issues/5184). [#7693](https://github.com/ClickHouse/ClickHouse/pull/7693) ([Mikhail Korotov](https://github.com/millb)) +* Removed fixed index granularity (it was 1024) from system logs because it's obsolete after implementation of adaptive granularity. [#7698](https://github.com/ClickHouse/ClickHouse/pull/7698) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Enabled MySQL compatibility server when ClickHouse is compiled without SSL. [#7852](https://github.com/ClickHouse/ClickHouse/pull/7852) ([Yuriy Baranov](https://github.com/yurriy)) +* Now server checksums distributed batches, which gives more verbose errors in case of corrupted data in batch. [#7914](https://github.com/ClickHouse/ClickHouse/pull/7914) ([Azat Khuzhin](https://github.com/azat)) +* Support `DROP DATABASE`, `DETACH TABLE`, `DROP TABLE` and `ATTACH TABLE` for `MySQL` database engine. [#8202](https://github.com/ClickHouse/ClickHouse/pull/8202) ([Winter Zhang](https://github.com/zhang2014)) +* Add authentication in S3 table function and table engine. [#7623](https://github.com/ClickHouse/ClickHouse/pull/7623) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Added check for extra parts of `MergeTree` at different disks, in order to not allow to miss data parts at undefined disks. [#8118](https://github.com/ClickHouse/ClickHouse/pull/8118) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Enable SSL support for Mac client and server. [#8297](https://github.com/ClickHouse/ClickHouse/pull/8297) ([Ivan](https://github.com/abyss7)) +* Now ClickHouse can work as MySQL federated server (see https://dev.mysql.com/doc/refman/5.7/en/federated-create-server.html). [#7717](https://github.com/ClickHouse/ClickHouse/pull/7717) ([Maxim Fedotov](https://github.com/MaxFedotov)) +* `clickhouse-client` now only enable `bracketed-paste` when multiquery is on and multiline is off. This fixes [#7757](https://github.com/ClickHouse/ClickHouse/issues/7757). [#7761](https://github.com/ClickHouse/ClickHouse/pull/7761) ([Amos Bird](https://github.com/amosbird)) +* Support `Array(Decimal)` in `if` function. [#7721](https://github.com/ClickHouse/ClickHouse/pull/7721) ([Artem Zuikov](https://github.com/4ertus2)) +* Support Decimals in `arrayDifference`, `arrayCumSum` and `arrayCumSumNegative` functions. [#7724](https://github.com/ClickHouse/ClickHouse/pull/7724) ([Artem Zuikov](https://github.com/4ertus2)) +* Added `lifetime` column to `system.dictionaries` table. [#6820](https://github.com/ClickHouse/ClickHouse/issues/6820) [#7727](https://github.com/ClickHouse/ClickHouse/pull/7727) ([kekekekule](https://github.com/kekekekule)) +* Improved check for existing parts on different disks for `*MergeTree` table engines. Addresses [#7660](https://github.com/ClickHouse/ClickHouse/issues/7660). [#8440](https://github.com/ClickHouse/ClickHouse/pull/8440) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Integration with `AWS SDK` for `S3` interactions which allows to use all S3 features out of the box. [#8011](https://github.com/ClickHouse/ClickHouse/pull/8011) ([Pavel Kovalenko](https://github.com/Jokser)) +* Added support for subqueries in `Live View` tables. [#7792](https://github.com/ClickHouse/ClickHouse/pull/7792) ([vzakaznikov](https://github.com/vzakaznikov)) +* Check for using `Date` or `DateTime` column from `TTL` expressions was removed. [#7920](https://github.com/ClickHouse/ClickHouse/pull/7920) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Information about disk was added to `system.detached_parts` table. [#7833](https://github.com/ClickHouse/ClickHouse/pull/7833) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Now settings `max_(table|partition)_size_to_drop` can be changed without a restart. [#7779](https://github.com/ClickHouse/ClickHouse/pull/7779) ([Grigory Pervakov](https://github.com/GrigoryPervakov)) +* Slightly better usability of error messages. Ask user not to remove the lines below `Stack trace:`. [#7897](https://github.com/ClickHouse/ClickHouse/pull/7897) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Better reading messages from `Kafka` engine in various formats after [#7935](https://github.com/ClickHouse/ClickHouse/issues/7935). [#8035](https://github.com/ClickHouse/ClickHouse/pull/8035) ([Ivan](https://github.com/abyss7)) +* Better compatibility with MySQL clients which don't support `sha2_password` auth plugin. [#8036](https://github.com/ClickHouse/ClickHouse/pull/8036) ([Yuriy Baranov](https://github.com/yurriy)) +* Support more column types in MySQL compatibility server. [#7975](https://github.com/ClickHouse/ClickHouse/pull/7975) ([Yuriy Baranov](https://github.com/yurriy)) +* Implement `ORDER BY` optimization for `Merge`, `Buffer` and `Materilized View` storages with underlying `MergeTree` tables. [#8130](https://github.com/ClickHouse/ClickHouse/pull/8130) ([Anton Popov](https://github.com/CurtizJ)) +* Now we always use POSIX implementation of `getrandom` to have better compatibility with old kernels (< 3.17). [#7940](https://github.com/ClickHouse/ClickHouse/pull/7940) ([Amos Bird](https://github.com/amosbird)) +* Better check for valid destination in a move TTL rule. [#8410](https://github.com/ClickHouse/ClickHouse/pull/8410) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Better checks for broken insert batches for `Distributed` table engine. [#7933](https://github.com/ClickHouse/ClickHouse/pull/7933) ([Azat Khuzhin](https://github.com/azat)) +* Add column with array of parts name which mutations must process in future to `system.mutations` table. [#8179](https://github.com/ClickHouse/ClickHouse/pull/8179) ([alesapin](https://github.com/alesapin)) +* Parallel merge sort optimization for processors. [#8552](https://github.com/ClickHouse/ClickHouse/pull/8552) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* The settings `mark_cache_min_lifetime` is now obsolete and does nothing. In previous versions, mark cache can grow in memory larger than `mark_cache_size` to accomodate data within `mark_cache_min_lifetime` seconds. That was leading to confusion and higher memory usage than expected, that is especially bad on memory constrained systems. If you will see performance degradation after installing this release, you should increase the `mark_cache_size`. [#8484](https://github.com/ClickHouse/ClickHouse/pull/8484) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Preparation to use `tid` everywhere. This is needed for [#7477](https://github.com/ClickHouse/ClickHouse/issues/7477). [#8276](https://github.com/ClickHouse/ClickHouse/pull/8276) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +#### Performance Improvement +* Performance optimizations in processors pipeline. [#7988](https://github.com/ClickHouse/ClickHouse/pull/7988) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Non-blocking updates of expired keys in cache dictionaries (with permission to read old ones). [#8303](https://github.com/ClickHouse/ClickHouse/pull/8303) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Compile ClickHouse without `-fno-omit-frame-pointer` globally to spare one more register. [#8097](https://github.com/ClickHouse/ClickHouse/pull/8097) ([Amos Bird](https://github.com/amosbird)) +* Speedup `greatCircleDistance` function and add performance tests for it. [#7307](https://github.com/ClickHouse/ClickHouse/pull/7307) ([Olga Khvostikova](https://github.com/stavrolia)) +* Improved performance of function `roundDown`. [#8465](https://github.com/ClickHouse/ClickHouse/pull/8465) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Improved performance of `max`, `min`, `argMin`, `argMax` for `DateTime64` data type. [#8199](https://github.com/ClickHouse/ClickHouse/pull/8199) ([Vasily Nemkov](https://github.com/Enmk)) +* Improved performance of sorting without a limit or with big limit and external sorting. [#8545](https://github.com/ClickHouse/ClickHouse/pull/8545) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Improved performance of formatting floating point numbers up to 6 times. [#8542](https://github.com/ClickHouse/ClickHouse/pull/8542) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Improved performance of `modulo` function. [#7750](https://github.com/ClickHouse/ClickHouse/pull/7750) ([Amos Bird](https://github.com/amosbird)) +* Optimized `ORDER BY` and merging with single column key. [#8335](https://github.com/ClickHouse/ClickHouse/pull/8335) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Better implementation for `arrayReduce`, `-Array` and `-State` combinators. [#7710](https://github.com/ClickHouse/ClickHouse/pull/7710) ([Amos Bird](https://github.com/amosbird)) +* Now `PREWHERE` should be optimized to be at least as efficient as `WHERE`. [#7769](https://github.com/ClickHouse/ClickHouse/pull/7769) ([Amos Bird](https://github.com/amosbird)) +* Improve the way `round` and `roundBankers` handling negative numbers. [#8229](https://github.com/ClickHouse/ClickHouse/pull/8229) ([hcz](https://github.com/hczhcz)) +* Improved decoding performance of `DoubleDelta` and `Gorilla` codecs by roughly 30-40%. This fixes [#7082](https://github.com/ClickHouse/ClickHouse/issues/7082). [#8019](https://github.com/ClickHouse/ClickHouse/pull/8019) ([Vasily Nemkov](https://github.com/Enmk)) +* Improved performance of `base64` related functions. [#8444](https://github.com/ClickHouse/ClickHouse/pull/8444) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Added a function `geoDistance`. It is similar to `greatCircleDistance` but uses approximation to WGS-84 ellipsoid model. The performance of both functions are near the same. [#8086](https://github.com/ClickHouse/ClickHouse/pull/8086) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Faster `min` and `max` aggregation functions for `Decimal` data type. [#8144](https://github.com/ClickHouse/ClickHouse/pull/8144) ([Artem Zuikov](https://github.com/4ertus2)) +* Vectorize processing `arrayReduce`. [#7608](https://github.com/ClickHouse/ClickHouse/pull/7608) ([Amos Bird](https://github.com/amosbird)) +* `if` chains are now optimized as `multiIf`. [#8355](https://github.com/ClickHouse/ClickHouse/pull/8355) ([kamalov-ruslan](https://github.com/kamalov-ruslan)) +* Fix performance regression of `Kafka` table engine introduced in 19.15. This fixes [#7261](https://github.com/ClickHouse/ClickHouse/issues/7261). [#7935](https://github.com/ClickHouse/ClickHouse/pull/7935) ([filimonov](https://github.com/filimonov)) +* Removed "pie" code generation that `gcc` from Debian packages occasionally brings by default. [#8483](https://github.com/ClickHouse/ClickHouse/pull/8483) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Parallel parsing data formats [#6553](https://github.com/ClickHouse/ClickHouse/pull/6553) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) +* Enable optimized parser of `Values` with expressions by default (`input_format_values_deduce_templates_of_expressions=1`). [#8231](https://github.com/ClickHouse/ClickHouse/pull/8231) ([tavplubix](https://github.com/tavplubix)) + +#### Build/Testing/Packaging Improvement +* Build fixes for `ARM` and in minimal mode. [#8304](https://github.com/ClickHouse/ClickHouse/pull/8304) ([proller](https://github.com/proller)) +* Add coverage file flush for `clickhouse-server` when std::atexit is not called. Also slightly improved logging in stateless tests with coverage. [#8267](https://github.com/ClickHouse/ClickHouse/pull/8267) ([alesapin](https://github.com/alesapin)) +* Update LLVM library in contrib. Avoid using LLVM from OS packages. [#8258](https://github.com/ClickHouse/ClickHouse/pull/8258) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Make bundled `curl` build fully quiet. [#8232](https://github.com/ClickHouse/ClickHouse/pull/8232) [#8203](https://github.com/ClickHouse/ClickHouse/pull/8203) ([Pavel Kovalenko](https://github.com/Jokser)) +* Fix some `MemorySanitizer` warnings. [#8235](https://github.com/ClickHouse/ClickHouse/pull/8235) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Use `add_warning` and `no_warning` macros in `CMakeLists.txt`. [#8604](https://github.com/ClickHouse/ClickHouse/pull/8604) ([Ivan](https://github.com/abyss7)) +* Add support of Minio S3 Compatible object (https://min.io/) for better integration tests. [#7863](https://github.com/ClickHouse/ClickHouse/pull/7863) [#7875](https://github.com/ClickHouse/ClickHouse/pull/7875) ([Pavel Kovalenko](https://github.com/Jokser)) +* Imported `libc` headers to contrib. It allows to make builds more consistent across various systems (only for `x86_64-linux-gnu`). [#5773](https://github.com/ClickHouse/ClickHouse/pull/5773) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Remove `-fPIC` from some libraries. [#8464](https://github.com/ClickHouse/ClickHouse/pull/8464) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Clean `CMakeLists.txt` for curl. See https://github.com/ClickHouse/ClickHouse/pull/8011#issuecomment-569478910 [#8459](https://github.com/ClickHouse/ClickHouse/pull/8459) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Silent warnings in `CapNProto` library. [#8220](https://github.com/ClickHouse/ClickHouse/pull/8220) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Add performance tests for short string optimized hash tables. [#7679](https://github.com/ClickHouse/ClickHouse/pull/7679) ([Amos Bird](https://github.com/amosbird)) +* Now ClickHouse will build on `AArch64` even if `MADV_FREE` is not available. This fixes [#8027](https://github.com/ClickHouse/ClickHouse/issues/8027). [#8243](https://github.com/ClickHouse/ClickHouse/pull/8243) ([Amos Bird](https://github.com/amosbird)) +* Update `zlib-ng` to fix memory sanitizer problems. [#7182](https://github.com/ClickHouse/ClickHouse/pull/7182) [#8206](https://github.com/ClickHouse/ClickHouse/pull/8206) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Enable internal MySQL library on non-Linux system, because usage of OS packages is very fragile and usually does not work at all. This fixes [#5765](https://github.com/ClickHouse/ClickHouse/issues/5765). [#8426](https://github.com/ClickHouse/ClickHouse/pull/8426) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fixed build on some systems after enabling `libc++`. This supersedes [#8374](https://github.com/ClickHouse/ClickHouse/issues/8374). [#8380](https://github.com/ClickHouse/ClickHouse/pull/8380) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Make `Field` methods more type-safe to find more errors. [#7386](https://github.com/ClickHouse/ClickHouse/pull/7386) [#8209](https://github.com/ClickHouse/ClickHouse/pull/8209) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Added missing files to the `libc-headers` submodule. [#8507](https://github.com/ClickHouse/ClickHouse/pull/8507) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix wrong `JSON` quoting in performance test output. [#8497](https://github.com/ClickHouse/ClickHouse/pull/8497) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Now stack trace is displayed for `std::exception` and `Poco::Exception`. In previous versions it was available only for `DB::Exception`. This improves diagnostics. [#8501](https://github.com/ClickHouse/ClickHouse/pull/8501) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Porting `clock_gettime` and `clock_nanosleep` for fresh glibc versions. [#8054](https://github.com/ClickHouse/ClickHouse/pull/8054) ([Amos Bird](https://github.com/amosbird)) +* Enable `part_log` in example config for developers. [#8609](https://github.com/ClickHouse/ClickHouse/pull/8609) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix async nature of reload in `01036_no_superfluous_dict_reload_on_create_database*`. [#8111](https://github.com/ClickHouse/ClickHouse/pull/8111) ([Azat Khuzhin](https://github.com/azat)) +* Fixed codec performance tests. [#8615](https://github.com/ClickHouse/ClickHouse/pull/8615) ([Vasily Nemkov](https://github.com/Enmk)) +* Add install scripts for `.tgz` build and documentation for them. [#8612](https://github.com/ClickHouse/ClickHouse/pull/8612) [#8591](https://github.com/ClickHouse/ClickHouse/pull/8591) ([alesapin](https://github.com/alesapin)) +* Removed old `ZSTD` test (it was created in year 2016 to reproduce the bug that pre 1.0 version of ZSTD has had). This fixes [#8618](https://github.com/ClickHouse/ClickHouse/issues/8618). [#8619](https://github.com/ClickHouse/ClickHouse/pull/8619) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fixed build on Mac OS Catalina. [#8600](https://github.com/ClickHouse/ClickHouse/pull/8600) ([meo](https://github.com/meob)) +* Increased number of rows in codec performance tests to make results noticeable. [#8574](https://github.com/ClickHouse/ClickHouse/pull/8574) ([Vasily Nemkov](https://github.com/Enmk)) +* In debug builds, treat `LOGICAL_ERROR` exceptions as assertion failures, so that they are easier to notice. [#8475](https://github.com/ClickHouse/ClickHouse/pull/8475) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Make formats-related performance test more deterministic. [#8477](https://github.com/ClickHouse/ClickHouse/pull/8477) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Update `lz4` to fix a MemorySanitizer failure. [#8181](https://github.com/ClickHouse/ClickHouse/pull/8181) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Suppress a known MemorySanitizer false positive in exception handling. [#8182](https://github.com/ClickHouse/ClickHouse/pull/8182) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Update `gcc` and `g++` to version 9 in `build/docker/build.sh` [#7766](https://github.com/ClickHouse/ClickHouse/pull/7766) ([TLightSky](https://github.com/tlightsky)) +* Add performance test case to test that `PREWHERE` is worse than `WHERE`. [#7768](https://github.com/ClickHouse/ClickHouse/pull/7768) ([Amos Bird](https://github.com/amosbird)) +* Progress towards fixing one flacky test. [#8621](https://github.com/ClickHouse/ClickHouse/pull/8621) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Avoid MemorySanitizer report for data from `libunwind`. [#8539](https://github.com/ClickHouse/ClickHouse/pull/8539) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Updated `libc++` to the latest version. [#8324](https://github.com/ClickHouse/ClickHouse/pull/8324) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Build ICU library from sources. This fixes [#6460](https://github.com/ClickHouse/ClickHouse/issues/6460). [#8219](https://github.com/ClickHouse/ClickHouse/pull/8219) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Switched from `libressl` to `openssl`. ClickHouse should support TLS 1.3 and SNI after this change. This fixes [#8171](https://github.com/ClickHouse/ClickHouse/issues/8171). [#8218](https://github.com/ClickHouse/ClickHouse/pull/8218) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fixed UBSan report when using `chacha20_poly1305` from SSL (happens on connect to https://yandex.ru/). [#8214](https://github.com/ClickHouse/ClickHouse/pull/8214) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix mode of default password file for `.deb` linux distros. [#8075](https://github.com/ClickHouse/ClickHouse/pull/8075) ([proller](https://github.com/proller)) +* Improved expression for getting `clickhouse-server` PID in `clickhouse-test`. [#8063](https://github.com/ClickHouse/ClickHouse/pull/8063) ([Alexander Kazakov](https://github.com/Akazz)) +* Updated contrib/googletest to v1.10.0. [#8587](https://github.com/ClickHouse/ClickHouse/pull/8587) ([Alexander Burmak](https://github.com/Alex-Burmak)) +* Fixed ThreadSaninitizer report in `base64` library. Also updated this library to the latest version, but it does not matter. This fixes [#8397](https://github.com/ClickHouse/ClickHouse/issues/8397). [#8403](https://github.com/ClickHouse/ClickHouse/pull/8403) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Fix `00600_replace_running_query` for processors. [#8272](https://github.com/ClickHouse/ClickHouse/pull/8272) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Remove support for `tcmalloc` to make `CMakeLists.txt` simpler. [#8310](https://github.com/ClickHouse/ClickHouse/pull/8310) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Release gcc builds now use `libc++` instead of `libstdc++`. Recently `libc++` was used only with clang. This will improve consistency of build configurations and portability. [#8311](https://github.com/ClickHouse/ClickHouse/pull/8311) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Enable ICU library for build with MemorySanitizer. [#8222](https://github.com/ClickHouse/ClickHouse/pull/8222) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Suppress warnings from `CapNProto` library. [#8224](https://github.com/ClickHouse/ClickHouse/pull/8224) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Removed special cases of code for `tcmalloc`, because it's no longer supported. [#8225](https://github.com/ClickHouse/ClickHouse/pull/8225) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* In CI coverage task, kill the server gracefully to allow it to save the coverage report. This fixes incomplete coverage reports we've been seeing lately. [#8142](https://github.com/ClickHouse/ClickHouse/pull/8142) ([alesapin](https://github.com/alesapin)) +* Performance tests for all codecs against `Float64` and `UInt64` values. [#8349](https://github.com/ClickHouse/ClickHouse/pull/8349) ([Vasily Nemkov](https://github.com/Enmk)) +* `termcap` is very much deprecated and lead to various problems (f.g. missing "up" cap and echoing `^J` instead of multi line) . Favor `terminfo` or bundled `ncurses`. [#7737](https://github.com/ClickHouse/ClickHouse/pull/7737) ([Amos Bird](https://github.com/amosbird)) +* Fix `test_storage_s3` integration test. [#7734](https://github.com/ClickHouse/ClickHouse/pull/7734) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Support `StorageFile(, null) ` to insert block into given format file without actually write to disk. This is required for performance tests. [#8455](https://github.com/ClickHouse/ClickHouse/pull/8455) ([Amos Bird](https://github.com/amosbird)) +* Added argument `--print-time` to functional tests which prints execution time per test. [#8001](https://github.com/ClickHouse/ClickHouse/pull/8001) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Added asserts to `KeyCondition` while evaluating RPN. This will fix warning from gcc-9. [#8279](https://github.com/ClickHouse/ClickHouse/pull/8279) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Dump cmake options in CI builds. [#8273](https://github.com/ClickHouse/ClickHouse/pull/8273) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Don't generate debug info for some fat libraries. [#8271](https://github.com/ClickHouse/ClickHouse/pull/8271) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Make `log_to_console.xml` always log to stderr, regardless of is it interactive or not. [#8395](https://github.com/ClickHouse/ClickHouse/pull/8395) ([Alexander Kuzmenkov](https://github.com/akuzm)) +* Removed some unused features from `clickhouse-performance-test` tool. [#8555](https://github.com/ClickHouse/ClickHouse/pull/8555) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Now we will also search for `lld-X` with corresponding `clang-X` version. [#8092](https://github.com/ClickHouse/ClickHouse/pull/8092) ([alesapin](https://github.com/alesapin)) +* Parquet build improvement. [#8421](https://github.com/ClickHouse/ClickHouse/pull/8421) ([maxulan](https://github.com/maxulan)) +* More GCC warnings [#8221](https://github.com/ClickHouse/ClickHouse/pull/8221) ([kreuzerkrieg](https://github.com/kreuzerkrieg)) +* Package for Arch Linux now allows to run ClickHouse server, and not only client. [#8534](https://github.com/ClickHouse/ClickHouse/pull/8534) ([Vladimir Chebotarev](https://github.com/excitoon)) +* Fix test with processors. Tiny performance fixes. [#7672](https://github.com/ClickHouse/ClickHouse/pull/7672) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) +* Update contrib/protobuf. [#8256](https://github.com/ClickHouse/ClickHouse/pull/8256) ([Matwey V. Kornilov](https://github.com/matwey)) +* In preparation of switching to c++20 as a new year celebration. "May the C++ force be with ClickHouse." [#8447](https://github.com/ClickHouse/ClickHouse/pull/8447) ([Amos Bird](https://github.com/amosbird)) + +#### Experimental Feature +* Added experimental setting `min_bytes_to_use_mmap_io`. It allows to read big files without copying data from kernel to userspace. The setting is disabled by default. Recommended threshold is about 64 MB, because mmap/munmap is slow. [#8520](https://github.com/ClickHouse/ClickHouse/pull/8520) ([alexey-milovidov](https://github.com/alexey-milovidov)) +* Reworked quotas as a part of access control system. Added new table `system.quotas`, new functions `currentQuota`, `currentQuotaKey`, new SQL syntax `CREATE QUOTA`, `ALTER QUOTA`, `DROP QUOTA`, `SHOW QUOTA`. [#7257](https://github.com/ClickHouse/ClickHouse/pull/7257) ([Vitaly Baranov](https://github.com/vitlibar)) +* Allow skipping unknown settings with warnings instead of throwing exceptions. [#7653](https://github.com/ClickHouse/ClickHouse/pull/7653) ([Vitaly Baranov](https://github.com/vitlibar)) +* Reworked row policies as a part of access control system. Added new table `system.row_policies`, new function `currentRowPolicies()`, new SQL syntax `CREATE POLICY`, `ALTER POLICY`, `DROP POLICY`, `SHOW CREATE POLICY`, `SHOW POLICIES`. [#7808](https://github.com/ClickHouse/ClickHouse/pull/7808) ([Vitaly Baranov](https://github.com/vitlibar)) + +#### Security Fix +* Fixed the possibility of reading directories structure in tables with `File` table engine. This fixes [#8536](https://github.com/ClickHouse/ClickHouse/issues/8536). [#8537](https://github.com/ClickHouse/ClickHouse/pull/8537) ([alexey-milovidov](https://github.com/alexey-milovidov)) + +## [Changelog for 2019](./2019.md) diff --git a/docs/ja/whats-new/changelog/2021.md b/docs/ja/whats-new/changelog/2021.md new file mode 100644 index 00000000000..e3b471facac --- /dev/null +++ b/docs/ja/whats-new/changelog/2021.md @@ -0,0 +1,2055 @@ +--- +slug: /ja/whats-new/changelog/2021 +sidebar_position: 10 +sidebar_label: '2021' +title: 2021 Changelog +--- + +### ClickHouse release v21.12, 2021-12-15 + +#### Backward Incompatible Change + +* *A fix for a feature that previously had unwanted behaviour.* Do not allow direct select for Kafka/RabbitMQ/FileLog. Can be enabled by setting `stream_like_engine_allow_direct_select`. Direct select will be not allowed even if enabled by setting, in case there is an attached materialized view. For Kafka and RabbitMQ direct selectm if allowed, will not commit massages by default. To enable commits with direct select, user must use storage level setting `kafka{rabbitmq}_commit_on_select=1` (default `0`). [#31053](https://github.com/ClickHouse/ClickHouse/pull/31053) ([Kseniia Sumarokova](https://github.com/kssenii)). +* *A slight change in behaviour of a new function.* Return unquoted string in JSON_VALUE. Closes [#27965](https://github.com/ClickHouse/ClickHouse/issues/27965). [#31008](https://github.com/ClickHouse/ClickHouse/pull/31008) ([Kseniia Sumarokova](https://github.com/kssenii)). +* *Setting rename.* Add custom null representation support for TSV/CSV input formats. Fix deserialing Nullable(String) in TSV/CSV/JSONCompactStringsEachRow/JSONStringsEachRow input formats. Rename `output_format_csv_null_representation` and `output_format_tsv_null_representation` to `format_csv_null_representation` and `format_tsv_null_representation` accordingly. [#30497](https://github.com/ClickHouse/ClickHouse/pull/30497) ([Kruglov Pavel](https://github.com/Avogar)). +* *Further deprecation of already unused code.* This is relevant only for users of ClickHouse versions older than 20.6. A "leader election" mechanism is removed from `ReplicatedMergeTree`, because multiple leaders are supported since 20.6. If you are upgrading from an older version and some replica with an old version is a leader, then server will fail to start after upgrade. Stop replicas with old version to make new version start. After that it will not be possible to downgrade to version older than 20.6. [#32140](https://github.com/ClickHouse/ClickHouse/pull/32140) ([tavplubix](https://github.com/tavplubix)). + +#### New Feature + +* Implemented more of the ZooKeeper Four Letter Words commands in clickhouse-keeper: https://zookeeper.apache.org/doc/r3.4.8/zookeeperAdmin.html#sc_zkCommands. [#28981](https://github.com/ClickHouse/ClickHouse/pull/28981) ([JackyWoo](https://github.com/JackyWoo)). Now `clickhouse-keeper` is feature complete. +* Support for `Bool` data type. [#31072](https://github.com/ClickHouse/ClickHouse/pull/31072) ([kevin wan](https://github.com/MaxWk)). +* Support for `PARTITION BY` in File, URL, HDFS storages and with `INSERT INTO` table function. Closes [#30273](https://github.com/ClickHouse/ClickHouse/issues/30273). [#30690](https://github.com/ClickHouse/ClickHouse/pull/30690) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Added `CONSTRAINT ... ASSUME ...` (without checking during `INSERT`). Added query transformation to CNF (https://github.com/ClickHouse/ClickHouse/issues/11749) for more convenient optimization. Added simple query rewriting using constraints (only simple matching now, will be improved to support <,=,>... later). Added ability to replace heavy columns with light columns if it's possible. [#18787](https://github.com/ClickHouse/ClickHouse/pull/18787) ([Nikita Vasilev](https://github.com/nikvas0)). +* Basic access authentication for http/url functions. [#31648](https://github.com/ClickHouse/ClickHouse/pull/31648) ([michael1589](https://github.com/michael1589)). +* Support `INTERVAL` type in `STEP` clause for `WITH FILL` modifier. [#30927](https://github.com/ClickHouse/ClickHouse/pull/30927) ([Anton Popov](https://github.com/CurtizJ)). +* Add support for parallel reading from multiple files and support globs in `FROM INFILE` clause. [#30135](https://github.com/ClickHouse/ClickHouse/pull/30135) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Add support for `Identifier` table and database query parameters. Closes [#27226](https://github.com/ClickHouse/ClickHouse/issues/27226). [#28668](https://github.com/ClickHouse/ClickHouse/pull/28668) ([Nikolay Degterinsky](https://github.com/evillique)). +* *TLDR: Major improvements of completeness and consistency of text formats.* Refactor formats `TSV`, `TSVRaw`, `CSV` and `JSONCompactEachRow`, `JSONCompactStringsEachRow`, remove code duplication, add base interface for formats with `-WithNames` and `-WithNamesAndTypes` suffixes. Add formats `CSVWithNamesAndTypes`, `TSVRawWithNames`, `TSVRawWithNamesAndTypes`, `JSONCompactEachRowWIthNames`, `JSONCompactStringsEachRowWIthNames`, `RowBinaryWithNames`. Support parallel parsing for formats `TSVWithNamesAndTypes`, `TSVRaw(WithNames/WIthNamesAndTypes)`, `CSVWithNamesAndTypes`, `JSONCompactEachRow(WithNames/WIthNamesAndTypes)`, `JSONCompactStringsEachRow(WithNames/WIthNamesAndTypes)`. Support columns mapping and types checking for `RowBinaryWithNamesAndTypes` format. Add setting `input_format_with_types_use_header` which specify if we should check that types written in `WIthNamesAndTypes` format matches with table structure. Add setting `input_format_csv_empty_as_default` and use it in CSV format instead of `input_format_defaults_for_omitted_fields` (because this setting should not control `csv_empty_as_default`). Fix usage of setting `input_format_defaults_for_omitted_fields` (it was used only as `csv_empty_as_default`, but it should control calculation of default expressions for omitted fields). Fix Nullable input/output in `TSVRaw` format, make this format fully compatible with inserting into TSV. Fix inserting NULLs in `LowCardinality(Nullable)` when `input_format_null_as_default` is enabled (previously default values was inserted instead of actual NULLs). Fix strings deserialization in `JSONStringsEachRow`/`JSONCompactStringsEachRow` formats (strings were parsed just until first '\n' or '\t'). Add ability to use `Raw` escaping rule in Template input format. Add diagnostic info for JSONCompactEachRow(WithNames/WIthNamesAndTypes) input format. Fix bug with parallel parsing of `-WithNames` formats in case when setting `min_chunk_bytes_for_parallel_parsing` is less than bytes in a single row. [#30178](https://github.com/ClickHouse/ClickHouse/pull/30178) ([Kruglov Pavel](https://github.com/Avogar)). Allow to print/parse names and types of colums in `CustomSeparated` input/output format. Add formats `CustomSeparatedWithNames/WithNamesAndTypes` similar to `TSVWithNames/WithNamesAndTypes`. [#31434](https://github.com/ClickHouse/ClickHouse/pull/31434) ([Kruglov Pavel](https://github.com/Avogar)). +* Aliyun OSS Storage support. [#31286](https://github.com/ClickHouse/ClickHouse/pull/31286) ([cfcz48](https://github.com/cfcz48)). +* Exposes all settings of the global thread pool in the configuration file. [#31285](https://github.com/ClickHouse/ClickHouse/pull/31285) ([Tomáš Hromada](https://github.com/gyfis)). +* Introduced window functions `exponentialTimeDecayedSum`, `exponentialTimeDecayedMax`, `exponentialTimeDecayedCount` and `exponentialTimeDecayedAvg` which are more effective than `exponentialMovingAverage` for bigger windows. Also more use-cases were covered. [#29799](https://github.com/ClickHouse/ClickHouse/pull/29799) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Add option to compress logs before writing them to a file using LZ4. Closes [#23860](https://github.com/ClickHouse/ClickHouse/issues/23860). [#29219](https://github.com/ClickHouse/ClickHouse/pull/29219) ([Nikolay Degterinsky](https://github.com/evillique)). +* Support `JOIN ON 1 = 1` that have CROSS JOIN semantic. This closes [#25578](https://github.com/ClickHouse/ClickHouse/issues/25578). [#25894](https://github.com/ClickHouse/ClickHouse/pull/25894) ([Vladimir C](https://github.com/vdimir)). +* Add Map combinator for `Map` type. - Rename old `sum-, min-, max- Map` for mapped arrays to `sum-, min-, max- MappedArrays`. [#24539](https://github.com/ClickHouse/ClickHouse/pull/24539) ([Ildus Kurbangaliev](https://github.com/ildus)). +* Make reading from HTTP retriable. Closes [#29696](https://github.com/ClickHouse/ClickHouse/issues/29696). [#29894](https://github.com/ClickHouse/ClickHouse/pull/29894) ([Kseniia Sumarokova](https://github.com/kssenii)). + +#### Experimental Feature + +* `WINDOW VIEW` to enable stream processing in ClickHouse. [#8331](https://github.com/ClickHouse/ClickHouse/pull/8331) ([vxider](https://github.com/Vxider)). +* Drop support for using Ordinary databases with `MaterializedMySQL`. [#31292](https://github.com/ClickHouse/ClickHouse/pull/31292) ([Stig Bakken](https://github.com/stigsb)). +* Implement the commands BACKUP and RESTORE for the Log family. This feature is under development. [#30688](https://github.com/ClickHouse/ClickHouse/pull/30688) ([Vitaly Baranov](https://github.com/vitlibar)). + +#### Performance Improvement + +* Reduce memory usage when reading with `s3` / `url` / `hdfs` formats `Parquet`, `ORC`, `Arrow` (controlled by setting `input_format_allow_seeks`, enabled by default). Also add setting `remote_read_min_bytes_for_seek` to control seeks. Closes [#10461](https://github.com/ClickHouse/ClickHouse/issues/10461). Closes [#16857](https://github.com/ClickHouse/ClickHouse/issues/16857). [#30936](https://github.com/ClickHouse/ClickHouse/pull/30936) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add optimizations for constant conditions in JOIN ON, ref [#26928](https://github.com/ClickHouse/ClickHouse/issues/26928). [#27021](https://github.com/ClickHouse/ClickHouse/pull/27021) ([Vladimir C](https://github.com/vdimir)). +* Support parallel formatting for all text formats, except `JSONEachRowWithProgress` and `PrettyCompactMonoBlock`. [#31489](https://github.com/ClickHouse/ClickHouse/pull/31489) ([Kruglov Pavel](https://github.com/Avogar)). +* Speed up count over nullable columns. [#31806](https://github.com/ClickHouse/ClickHouse/pull/31806) ([Raúl Marín](https://github.com/Algunenano)). +* Speed up `avg` and `sumCount` aggregate functions. [#31694](https://github.com/ClickHouse/ClickHouse/pull/31694) ([Raúl Marín](https://github.com/Algunenano)). +* Improve performance of JSON and XML output formats. [#31673](https://github.com/ClickHouse/ClickHouse/pull/31673) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve performance of syncing data to block device. This closes [#31181](https://github.com/ClickHouse/ClickHouse/issues/31181). [#31229](https://github.com/ClickHouse/ClickHouse/pull/31229) ([zhanglistar](https://github.com/zhanglistar)). +* Fixing query performance issue in `LiveView` tables. Fixes [#30831](https://github.com/ClickHouse/ClickHouse/issues/30831). [#31006](https://github.com/ClickHouse/ClickHouse/pull/31006) ([vzakaznikov](https://github.com/vzakaznikov)). +* Speed up query parsing. [#31949](https://github.com/ClickHouse/ClickHouse/pull/31949) ([Raúl Marín](https://github.com/Algunenano)). +* Allow to split `GraphiteMergeTree` rollup rules for plain/tagged metrics (optional `rule_type` field). [#25122](https://github.com/ClickHouse/ClickHouse/pull/25122) ([Michail Safronov](https://github.com/msaf1980)). +* Remove excessive `DESC TABLE` requests for `remote()` (in case of `remote('127.1', system.one)` (i.e. identifier as the db.table instead of string) there was excessive `DESC TABLE` request). [#32019](https://github.com/ClickHouse/ClickHouse/pull/32019) ([Azat Khuzhin](https://github.com/azat)). +* Optimize function `tupleElement` to reading of subcolumn with enabled setting `optimize_functions_to_subcolumns`. [#31261](https://github.com/ClickHouse/ClickHouse/pull/31261) ([Anton Popov](https://github.com/CurtizJ)). +* Optimize function `mapContains` to reading of subcolumn `key` with enabled settings `optimize_functions_to_subcolumns`. [#31218](https://github.com/ClickHouse/ClickHouse/pull/31218) ([Anton Popov](https://github.com/CurtizJ)). +* Add settings `merge_tree_min_rows_for_concurrent_read_for_remote_filesystem` and `merge_tree_min_bytes_for_concurrent_read_for_remote_filesystem`. [#30970](https://github.com/ClickHouse/ClickHouse/pull/30970) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Skipping mutations of different partitions in `StorageMergeTree`. [#21326](https://github.com/ClickHouse/ClickHouse/pull/21326) ([Vladimir Chebotarev](https://github.com/excitoon)). + +#### Improvement + +* Do not allow to drop a table or dictionary if some tables or dictionaries depend on it. [#30977](https://github.com/ClickHouse/ClickHouse/pull/30977) ([tavplubix](https://github.com/tavplubix)). +* Allow versioning of aggregate function states. Now we can introduce backward compatible changes in serialization format of aggregate function states. Closes [#12552](https://github.com/ClickHouse/ClickHouse/issues/12552). [#24820](https://github.com/ClickHouse/ClickHouse/pull/24820) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support PostgreSQL style `ALTER MODIFY COLUMN` syntax. [#32003](https://github.com/ClickHouse/ClickHouse/pull/32003) ([SuperDJY](https://github.com/cmsxbc)). +* Added `update_field` support for `RangeHashedDictionary`, `ComplexKeyRangeHashedDictionary`. [#32185](https://github.com/ClickHouse/ClickHouse/pull/32185) ([Maksim Kita](https://github.com/kitaisreal)). +* The `murmurHash3_128` and `sipHash128` functions now accept an arbitrary number of arguments. This closes [#28774](https://github.com/ClickHouse/ClickHouse/issues/28774). [#28965](https://github.com/ClickHouse/ClickHouse/pull/28965) ([å°è·¯](https://github.com/nicelulu)). +* Support default expression for `HDFS` storage and optimize fetching when source is column oriented. [#32256](https://github.com/ClickHouse/ClickHouse/pull/32256) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Improve the operation name of an opentelemetry span. [#32234](https://github.com/ClickHouse/ClickHouse/pull/32234) ([Frank Chen](https://github.com/FrankChen021)). +* Use `Content-Type: application/x-ndjson` (http://ndjson.org/) for output format `JSONEachRow`. [#32223](https://github.com/ClickHouse/ClickHouse/pull/32223) ([Dmitriy Dorofeev](https://github.com/deem0n)). +* Improve skipping unknown fields with quoted escaping rule in Template/CustomSeparated formats. Previously you could skip only quoted strings, now you can skip values with any type. [#32204](https://github.com/ClickHouse/ClickHouse/pull/32204) ([Kruglov Pavel](https://github.com/Avogar)). +* Now `clickhouse-keeper` refuses to start or apply configuration changes when they contain duplicated IDs or endpoints. Fixes [#31339](https://github.com/ClickHouse/ClickHouse/issues/31339). [#32121](https://github.com/ClickHouse/ClickHouse/pull/32121) ([alesapin](https://github.com/alesapin)). +* Set Content-Type in HTTP packets issued from URL engine. [#32113](https://github.com/ClickHouse/ClickHouse/pull/32113) ([Frank Chen](https://github.com/FrankChen021)). +* Return Content-Type as 'application/json' for `JSONEachRow` format if `output_format_json_array_of_rows` is enabled. [#32112](https://github.com/ClickHouse/ClickHouse/pull/32112) ([Frank Chen](https://github.com/FrankChen021)). +* Allow to parse `+` before `Float32`/`Float64` values. [#32079](https://github.com/ClickHouse/ClickHouse/pull/32079) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow a user configured `hdfs_replication` parameter for `DiskHDFS` and `StorageHDFS`. Closes [#32039](https://github.com/ClickHouse/ClickHouse/issues/32039). [#32049](https://github.com/ClickHouse/ClickHouse/pull/32049) ([leosunli](https://github.com/leosunli)). +* Added ClickHouse `exception` and `exception_code` fields to opentelemetry span log. [#32040](https://github.com/ClickHouse/ClickHouse/pull/32040) ([Frank Chen](https://github.com/FrankChen021)). +* Improve opentelemetry span log duration - it was is zero at the query level if there is a query exception. [#32038](https://github.com/ClickHouse/ClickHouse/pull/32038) ([Frank Chen](https://github.com/FrankChen021)). +* Fix the issue that `LowCardinality` of `Int256` cannot be created. [#31832](https://github.com/ClickHouse/ClickHouse/pull/31832) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Recreate `system.*_log` tables in case of different engine/partition_by. [#31824](https://github.com/ClickHouse/ClickHouse/pull/31824) ([Azat Khuzhin](https://github.com/azat)). +* `MaterializedMySQL`: Fix issue with table named 'table'. [#31781](https://github.com/ClickHouse/ClickHouse/pull/31781) ([HÃ¥vard KvÃ¥len](https://github.com/havardk)). +* ClickHouse dictionary source: support predefined connections. Closes [#31705](https://github.com/ClickHouse/ClickHouse/issues/31705). [#31749](https://github.com/ClickHouse/ClickHouse/pull/31749) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Allow to use predefined connections configuration for Kafka and RabbitMQ engines (the same way as for other integration table engines). [#31691](https://github.com/ClickHouse/ClickHouse/pull/31691) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Always re-render prompt while navigating history in clickhouse-client. This will improve usability of manipulating very long queries that don't fit on screen. [#31675](https://github.com/ClickHouse/ClickHouse/pull/31675) ([alexey-milovidov](https://github.com/alexey-milovidov)) (author: Amos Bird). +* Add key bindings for navigating through history (instead of lines/history). [#31641](https://github.com/ClickHouse/ClickHouse/pull/31641) ([Azat Khuzhin](https://github.com/azat)). +* Improve the `max_execution_time` checks. Fixed some cases when timeout checks do not happen and query could run too long. [#31636](https://github.com/ClickHouse/ClickHouse/pull/31636) ([Raúl Marín](https://github.com/Algunenano)). +* Better exception message when `users.xml` cannot be loaded due to bad password hash. This closes [#24126](https://github.com/ClickHouse/ClickHouse/issues/24126). [#31557](https://github.com/ClickHouse/ClickHouse/pull/31557) ([Vitaly Baranov](https://github.com/vitlibar)). +* Use shard and replica name from `Replicated` database arguments when expanding macros in `ReplicatedMergeTree` arguments if these macros are not defined in config. Closes [#31471](https://github.com/ClickHouse/ClickHouse/issues/31471). [#31488](https://github.com/ClickHouse/ClickHouse/pull/31488) ([tavplubix](https://github.com/tavplubix)). +* Better analysis for `min/max/count` projection. Now, with enabled `allow_experimental_projection_optimization`, virtual `min/max/count` projection can be used together with columns from partition key. [#31474](https://github.com/ClickHouse/ClickHouse/pull/31474) ([Amos Bird](https://github.com/amosbird)). +* Add `--pager` support for `clickhouse-local`. [#31457](https://github.com/ClickHouse/ClickHouse/pull/31457) ([Azat Khuzhin](https://github.com/azat)). +* Fix waiting of the editor during interactive query edition (`waitpid()` returns -1 on `SIGWINCH` and `EDITOR` and `clickhouse-local`/`clickhouse-client` works concurrently). [#31456](https://github.com/ClickHouse/ClickHouse/pull/31456) ([Azat Khuzhin](https://github.com/azat)). +* Throw an exception if there is some garbage after field in `JSONCompactStrings(EachRow)` format. [#31455](https://github.com/ClickHouse/ClickHouse/pull/31455) ([Kruglov Pavel](https://github.com/Avogar)). +* Default value of `http_send_timeout` and `http_receive_timeout` settings changed from 1800 (30 minutes) to 180 (3 minutes). [#31450](https://github.com/ClickHouse/ClickHouse/pull/31450) ([tavplubix](https://github.com/tavplubix)). +* `MaterializedMySQL` now handles `CREATE TABLE ... LIKE ...` DDL queries. [#31410](https://github.com/ClickHouse/ClickHouse/pull/31410) ([Stig Bakken](https://github.com/stigsb)). +* Return artificial create query when executing `show create table` on system's tables. [#31391](https://github.com/ClickHouse/ClickHouse/pull/31391) ([SuperDJY](https://github.com/cmsxbc)). +* Previously progress was shown only for `numbers` table function. Now for `numbers_mt` it is also shown. [#31318](https://github.com/ClickHouse/ClickHouse/pull/31318) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Initial user's roles are used now to find row policies, see [#31080](https://github.com/ClickHouse/ClickHouse/issues/31080). [#31262](https://github.com/ClickHouse/ClickHouse/pull/31262) ([Vitaly Baranov](https://github.com/vitlibar)). +* If some obsolete setting is changed - show warning in `system.warnings`. [#31252](https://github.com/ClickHouse/ClickHouse/pull/31252) ([tavplubix](https://github.com/tavplubix)). +* Improved backoff for background cleanup tasks in `MergeTree`. Settings `merge_tree_clear_old_temporary_directories_interval_seconds` and `merge_tree_clear_old_parts_interval_seconds` moved from users settings to merge tree settings. [#31180](https://github.com/ClickHouse/ClickHouse/pull/31180) ([tavplubix](https://github.com/tavplubix)). +* Now every replica will send to client only incremental information about profile events counters. [#31155](https://github.com/ClickHouse/ClickHouse/pull/31155) ([Dmitry Novik](https://github.com/novikd)). This makes `--hardware_utilization` option in `clickhouse-client` usable. +* Enable multiline editing in clickhouse-client by default. This addresses [#31121](https://github.com/ClickHouse/ClickHouse/issues/31121) . [#31123](https://github.com/ClickHouse/ClickHouse/pull/31123) ([Amos Bird](https://github.com/amosbird)). +* Function name normalization for `ALTER` queries. This helps avoid metadata mismatch between creating table with indices/projections and adding indices/projections via alter commands. This is a follow-up PR of https://github.com/ClickHouse/ClickHouse/pull/20174. Mark as improvements as there are no bug reports and the senario is somehow rare. [#31095](https://github.com/ClickHouse/ClickHouse/pull/31095) ([Amos Bird](https://github.com/amosbird)). +* Support `IF EXISTS` modifier for `RENAME DATABASE`/`TABLE`/`DICTIONARY` query. If this directive is used, one will not get an error if the DATABASE/TABLE/DICTIONARY to be renamed doesn't exist. [#31081](https://github.com/ClickHouse/ClickHouse/pull/31081) ([victorgao](https://github.com/kafka1991)). +* Cancel vertical merges when partition is dropped. This is a follow-up of https://github.com/ClickHouse/ClickHouse/pull/25684 and https://github.com/ClickHouse/ClickHouse/pull/30996. [#31057](https://github.com/ClickHouse/ClickHouse/pull/31057) ([Amos Bird](https://github.com/amosbird)). +* The local session inside a ClickHouse dictionary source won't send its events to the session log anymore. This fixes a possible deadlock (tsan alert) on shutdown. Also this PR fixes flaky `test_dictionaries_dependency_xml/`. [#31013](https://github.com/ClickHouse/ClickHouse/pull/31013) ([Vitaly Baranov](https://github.com/vitlibar)). +* Less locking in ALTER command. [#31010](https://github.com/ClickHouse/ClickHouse/pull/31010) ([Amos Bird](https://github.com/amosbird)). +* Fix `--verbose` option in clickhouse-local interactive mode and allow logging into file. [#30881](https://github.com/ClickHouse/ClickHouse/pull/30881) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Added `\l`, `\d`, `\c` commands in `clickhouse-client` like in MySQL and PostgreSQL. [#30876](https://github.com/ClickHouse/ClickHouse/pull/30876) ([Pavel Medvedev](https://github.com/pmed)). +* For clickhouse-local or clickhouse-client: if there is `--interactive` option with `--query` or `--queries-file`, then first execute them like in non-interactive and then start interactive mode. [#30851](https://github.com/ClickHouse/ClickHouse/pull/30851) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix possible "The local set of parts of X doesn't look like the set of parts in ZooKeeper" error (if DROP fails during removing znodes from zookeeper). [#30826](https://github.com/ClickHouse/ClickHouse/pull/30826) ([Azat Khuzhin](https://github.com/azat)). +* Avro format works against Kafka. Setting `output_format_avro_rows_in_file` added. [#30351](https://github.com/ClickHouse/ClickHouse/pull/30351) ([Ilya Golshtein](https://github.com/ilejn)). +* Allow to specify one or any number of PostgreSQL schemas for one `MaterializedPostgreSQL` database. Closes [#28901](https://github.com/ClickHouse/ClickHouse/issues/28901). Closes [#29324](https://github.com/ClickHouse/ClickHouse/issues/29324). [#28933](https://github.com/ClickHouse/ClickHouse/pull/28933) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Replaced default ports for clickhouse-keeper internal communication from 44444 to 9234. Fixes [#30879](https://github.com/ClickHouse/ClickHouse/issues/30879). [#31799](https://github.com/ClickHouse/ClickHouse/pull/31799) ([alesapin](https://github.com/alesapin)). +* Implement function transform with Decimal arguments. [#31839](https://github.com/ClickHouse/ClickHouse/pull/31839) ([æŽå¸…](https://github.com/loneylee)). +* Fix abort in debug server and `DB::Exception: std::out_of_range: basic_string` error in release server in case of bad hdfs url by adding additional check of hdfs url structure. [#31042](https://github.com/ClickHouse/ClickHouse/pull/31042) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix possible assert in `hdfs` table function/engine, add test. [#31036](https://github.com/ClickHouse/ClickHouse/pull/31036) ([Kruglov Pavel](https://github.com/Avogar)). + +#### Bug Fixes + +* Fix group by / order by / limit by aliases with positional arguments enabled. Closes [#31173](https://github.com/ClickHouse/ClickHouse/issues/31173). [#31741](https://github.com/ClickHouse/ClickHouse/pull/31741) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix usage of `Buffer` table engine with type `Map`. Fixes [#30546](https://github.com/ClickHouse/ClickHouse/issues/30546). [#31742](https://github.com/ClickHouse/ClickHouse/pull/31742) ([Anton Popov](https://github.com/CurtizJ)). +* Fix reading from `MergeTree` tables with enabled `use_uncompressed_cache`. [#31826](https://github.com/ClickHouse/ClickHouse/pull/31826) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed the behavior when mutations that have nothing to do are stuck (with enabled setting `empty_result_for_aggregation_by_empty_set`). [#32358](https://github.com/ClickHouse/ClickHouse/pull/32358) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix skipping columns while writing protobuf. This PR fixes [#31160](https://github.com/ClickHouse/ClickHouse/issues/31160), see the comment [#31160](https://github.com/ClickHouse/ClickHouse/issues/31160)#issuecomment-980595318. [#31988](https://github.com/ClickHouse/ClickHouse/pull/31988) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix bug when remove unneeded columns in subquery. If there is an aggregation function in query without group by, do not remove if it is unneeded. [#32289](https://github.com/ClickHouse/ClickHouse/pull/32289) ([dongyifeng](https://github.com/dyf6372)). +* Quota limit was not reached, but the limit was exceeded. This PR fixes [#31174](https://github.com/ClickHouse/ClickHouse/issues/31174). [#31337](https://github.com/ClickHouse/ClickHouse/pull/31337) ([sunny](https://github.com/sunny19930321)). +* Fix SHOW GRANTS when partial revokes are used. This PR fixes [#31138](https://github.com/ClickHouse/ClickHouse/issues/31138). [#31249](https://github.com/ClickHouse/ClickHouse/pull/31249) ([Vitaly Baranov](https://github.com/vitlibar)). +* Memory amount was incorrectly estimated when ClickHouse is run in containers with cgroup limits. [#31157](https://github.com/ClickHouse/ClickHouse/pull/31157) ([Pavel Medvedev](https://github.com/pmed)). +* Fix `ALTER ... MATERIALIZE COLUMN ...` queries in case when data type of default expression is not equal to the data type of column. [#32348](https://github.com/ClickHouse/ClickHouse/pull/32348) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed crash with SIGFPE in aggregate function `avgWeighted` with `Decimal` argument. Fixes [#32053](https://github.com/ClickHouse/ClickHouse/issues/32053). [#32303](https://github.com/ClickHouse/ClickHouse/pull/32303) ([tavplubix](https://github.com/tavplubix)). +* Server might fail to start with `Cannot attach 1 tables due to cyclic dependencies` error if `Dictionary` table looks at XML-dictionary with the same name, it's fixed. Fixes [#31315](https://github.com/ClickHouse/ClickHouse/issues/31315). [#32288](https://github.com/ClickHouse/ClickHouse/pull/32288) ([tavplubix](https://github.com/tavplubix)). +* Fix parsing error while NaN deserializing for `Nullable(Float)` for `Quoted` escaping rule. [#32190](https://github.com/ClickHouse/ClickHouse/pull/32190) ([Kruglov Pavel](https://github.com/Avogar)). +* XML dictionaries: identifiers, used in table create query, can be qualified to `default_database` during upgrade to newer version. Closes [#31963](https://github.com/ClickHouse/ClickHouse/issues/31963). [#32187](https://github.com/ClickHouse/ClickHouse/pull/32187) ([Maksim Kita](https://github.com/kitaisreal)). +* Number of active replicas might be determined incorrectly when inserting with quorum if setting `replicated_can_become_leader` is disabled on some replicas. It's fixed. [#32157](https://github.com/ClickHouse/ClickHouse/pull/32157) ([tavplubix](https://github.com/tavplubix)). +* Dictionaries: fix cases when `{condition}` does not work for custom database queries. [#32117](https://github.com/ClickHouse/ClickHouse/pull/32117) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix `CAST` from `Nullable` with `cast_keep_nullable` (`PARAMETER_OUT_OF_BOUND` error before for i.e. `toUInt32OrDefault(toNullable(toUInt32(1)))`). [#32080](https://github.com/ClickHouse/ClickHouse/pull/32080) ([Azat Khuzhin](https://github.com/azat)). +* Fix CREATE TABLE of Join Storage in some obscure cases. Close [#31680](https://github.com/ClickHouse/ClickHouse/issues/31680). [#32066](https://github.com/ClickHouse/ClickHouse/pull/32066) ([SuperDJY](https://github.com/cmsxbc)). +* Fixed `Directory ... already exists and is not empty` error when detaching part. [#32063](https://github.com/ClickHouse/ClickHouse/pull/32063) ([tavplubix](https://github.com/tavplubix)). +* `MaterializedMySQL` (experimental feature): Fix misinterpretation of `DECIMAL` data from MySQL. [#31990](https://github.com/ClickHouse/ClickHouse/pull/31990) ([HÃ¥vard KvÃ¥len](https://github.com/havardk)). +* `FileLog` (experimental feature) engine unnesessary created meta data directory when create table failed. Fix [#31962](https://github.com/ClickHouse/ClickHouse/issues/31962). [#31967](https://github.com/ClickHouse/ClickHouse/pull/31967) ([flynn](https://github.com/ucasfl)). +* Some `GET_PART` entry might hang in replication queue if part is lost on all replicas and there are no other parts in the same partition. It's fixed in cases when partition key contains only columns of integer types or `Date[Time]`. Fixes [#31485](https://github.com/ClickHouse/ClickHouse/issues/31485). [#31887](https://github.com/ClickHouse/ClickHouse/pull/31887) ([tavplubix](https://github.com/tavplubix)). +* Fix functions `empty` and `notEmpty` with arguments of `UUID` type. Fixes [#31819](https://github.com/ClickHouse/ClickHouse/issues/31819). [#31883](https://github.com/ClickHouse/ClickHouse/pull/31883) ([Anton Popov](https://github.com/CurtizJ)). +* Change configuration path from `keeper_server.session_timeout_ms` to `keeper_server.coordination_settings.session_timeout_ms` when constructing a `KeeperTCPHandler`. Same with `operation_timeout`. [#31859](https://github.com/ClickHouse/ClickHouse/pull/31859) ([JackyWoo](https://github.com/JackyWoo)). +* Fix invalid cast of Nullable type when nullable primary key is used. (Nullable primary key is a discouraged feature - please do not use). This fixes [#31075](https://github.com/ClickHouse/ClickHouse/issues/31075). [#31823](https://github.com/ClickHouse/ClickHouse/pull/31823) ([Amos Bird](https://github.com/amosbird)). +* Fix crash in recursive UDF in SQL. Closes [#30856](https://github.com/ClickHouse/ClickHouse/issues/30856). [#31820](https://github.com/ClickHouse/ClickHouse/pull/31820) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix crash when function `dictGet` with type is used for dictionary attribute when type is `Nullable`. Fixes [#30980](https://github.com/ClickHouse/ClickHouse/issues/30980). [#31800](https://github.com/ClickHouse/ClickHouse/pull/31800) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix crash with empty result of ODBC query (with some ODBC drivers). Closes [#31465](https://github.com/ClickHouse/ClickHouse/issues/31465). [#31766](https://github.com/ClickHouse/ClickHouse/pull/31766) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix disabling query profiler (In case of `query_profiler_real_time_period_ns>0`/`query_profiler_cpu_time_period_ns>0` query profiler can stayed enabled even after query finished). [#31740](https://github.com/ClickHouse/ClickHouse/pull/31740) ([Azat Khuzhin](https://github.com/azat)). +* Fixed rare segfault on concurrent `ATTACH PARTITION` queries. [#31738](https://github.com/ClickHouse/ClickHouse/pull/31738) ([tavplubix](https://github.com/tavplubix)). +* Fix race in JSONEachRowWithProgress output format when data and lines with progress are mixed in output. [#31736](https://github.com/ClickHouse/ClickHouse/pull/31736) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixed `there are no such cluster here` error on execution of `ON CLUSTER` query if specified cluster name is name of `Replicated` database. [#31723](https://github.com/ClickHouse/ClickHouse/pull/31723) ([tavplubix](https://github.com/tavplubix)). +* Fix exception on some of the applications of `decrypt` function on Nullable columns. This closes [#31662](https://github.com/ClickHouse/ClickHouse/issues/31662). This closes [#31426](https://github.com/ClickHouse/ClickHouse/issues/31426). [#31707](https://github.com/ClickHouse/ClickHouse/pull/31707) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed function ngrams when string contains UTF-8 characters. [#31706](https://github.com/ClickHouse/ClickHouse/pull/31706) ([yandd](https://github.com/yandd)). +* Settings `input_format_allow_errors_num` and `input_format_allow_errors_ratio` did not work for parsing of domain types, such as `IPv4`, it's fixed. Fixes [#31686](https://github.com/ClickHouse/ClickHouse/issues/31686). [#31697](https://github.com/ClickHouse/ClickHouse/pull/31697) ([tavplubix](https://github.com/tavplubix)). +* Fixed null pointer exception in `MATERIALIZE COLUMN`. [#31679](https://github.com/ClickHouse/ClickHouse/pull/31679) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* `RENAME TABLE` query worked incorrectly on attempt to rename an DDL dictionary in `Ordinary` database, it's fixed. [#31638](https://github.com/ClickHouse/ClickHouse/pull/31638) ([tavplubix](https://github.com/tavplubix)). +* Implement `sparkbar` aggregate function as it was intended, see: [#26175](https://github.com/ClickHouse/ClickHouse/issues/26175)#issuecomment-960353867, [comment](https://github.com/ClickHouse/ClickHouse/issues/26175#issuecomment-961155065). [#31624](https://github.com/ClickHouse/ClickHouse/pull/31624) ([å°è·¯](https://github.com/nicelulu)). +* Fix invalid generated JSON when only column names contain invalid UTF-8 sequences. [#31534](https://github.com/ClickHouse/ClickHouse/pull/31534) ([Kevin Michel](https://github.com/kmichel-aiven)). +* Disable `partial_merge_join_left_table_buffer_bytes` before bug in this optimization is fixed. See [#31009](https://github.com/ClickHouse/ClickHouse/issues/31009)). Remove redundant option `partial_merge_join_optimizations`. [#31528](https://github.com/ClickHouse/ClickHouse/pull/31528) ([Vladimir C](https://github.com/vdimir)). +* Fix progress for short `INSERT SELECT` queries. [#31510](https://github.com/ClickHouse/ClickHouse/pull/31510) ([Azat Khuzhin](https://github.com/azat)). +* Fix wrong behavior with group by and positional arguments. Closes [#31280](https://github.com/ClickHouse/ClickHouse/issues/31280)#issuecomment-968696186. [#31420](https://github.com/ClickHouse/ClickHouse/pull/31420) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Resolve `nullptr` in STS credentials provider for S3. [#31409](https://github.com/ClickHouse/ClickHouse/pull/31409) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Remove `notLike` function from index analysis, because it was wrong. [#31169](https://github.com/ClickHouse/ClickHouse/pull/31169) ([sundyli](https://github.com/sundy-li)). +* Fix bug in Keeper which can lead to inability to start when some coordination logs was lost and we have more fresh snapshot than our latest log. [#31150](https://github.com/ClickHouse/ClickHouse/pull/31150) ([alesapin](https://github.com/alesapin)). +* Rewrite right distributed table in local join. solves [#25809](https://github.com/ClickHouse/ClickHouse/issues/25809). [#31105](https://github.com/ClickHouse/ClickHouse/pull/31105) ([abel-cheng](https://github.com/abel-cheng)). +* Fix `Merge` table with aliases and where (it did not work before at all). Closes [#28802](https://github.com/ClickHouse/ClickHouse/issues/28802). [#31044](https://github.com/ClickHouse/ClickHouse/pull/31044) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix JSON_VALUE/JSON_QUERY with quoted identifiers. This allows to have spaces in json path. Closes [#30971](https://github.com/ClickHouse/ClickHouse/issues/30971). [#31003](https://github.com/ClickHouse/ClickHouse/pull/31003) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Using `formatRow` function with not row-oriented formats led to segfault. Don't allow to use this function with such formats (because it doesn't make sense). [#31001](https://github.com/ClickHouse/ClickHouse/pull/31001) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix bug which broke select queries if they happened after dropping materialized view. Found in [#30691](https://github.com/ClickHouse/ClickHouse/issues/30691). [#30997](https://github.com/ClickHouse/ClickHouse/pull/30997) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Skip `max_partition_size_to_drop check` in case of ATTACH PARTITION ... FROM and MOVE PARTITION ... [#30995](https://github.com/ClickHouse/ClickHouse/pull/30995) ([Amr Alaa](https://github.com/amralaa-MSFT)). +* Fix some corner cases with `INTERSECT` and `EXCEPT` operators. Closes [#30803](https://github.com/ClickHouse/ClickHouse/issues/30803). [#30965](https://github.com/ClickHouse/ClickHouse/pull/30965) ([Kseniia Sumarokova](https://github.com/kssenii)). + +#### Build/Testing/Packaging Improvement + +* Fix incorrect filtering result on non-x86 builds. This closes [#31417](https://github.com/ClickHouse/ClickHouse/issues/31417). This closes [#31524](https://github.com/ClickHouse/ClickHouse/issues/31524). [#31574](https://github.com/ClickHouse/ClickHouse/pull/31574) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Make ClickHouse build fully reproducible (byte identical on different machines). This closes [#22113](https://github.com/ClickHouse/ClickHouse/issues/22113). [#31899](https://github.com/ClickHouse/ClickHouse/pull/31899) ([alexey-milovidov](https://github.com/alexey-milovidov)). Remove filesystem path to the build directory from binaries to enable reproducible builds. This needed for [#22113](https://github.com/ClickHouse/ClickHouse/issues/22113). [#31838](https://github.com/ClickHouse/ClickHouse/pull/31838) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Use our own CMakeLists for `zlib-ng`, `cassandra`, `mariadb-connector-c` and `xz`, `re2`, `sentry`, `gsasl`, `arrow`, `protobuf`. This is needed for [#20151](https://github.com/ClickHouse/ClickHouse/issues/20151). Part of [#9226](https://github.com/ClickHouse/ClickHouse/issues/9226). A small step towards removal of annoying trash from the build system. [#30599](https://github.com/ClickHouse/ClickHouse/pull/30599) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Hermetic builds: use fixed version of libc and make sure that no source or binary files from the host OS are using during build. This closes [#27133](https://github.com/ClickHouse/ClickHouse/issues/27133). This closes [#21435](https://github.com/ClickHouse/ClickHouse/issues/21435). This closes [#30462](https://github.com/ClickHouse/ClickHouse/issues/30462). [#30011](https://github.com/ClickHouse/ClickHouse/pull/30011) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Adding function `getFuzzerData()` to easily fuzz particular functions. This closes [#23227](https://github.com/ClickHouse/ClickHouse/issues/23227). [#27526](https://github.com/ClickHouse/ClickHouse/pull/27526) ([Alexey Boykov](https://github.com/mathalex)). +* More correct setting up capabilities inside Docker. [#31802](https://github.com/ClickHouse/ClickHouse/pull/31802) ([Constantine Peresypkin](https://github.com/pkit)). +* Enable clang `-fstrict-vtable-pointers`, `-fwhole-program-vtables` compile options. [#20151](https://github.com/ClickHouse/ClickHouse/pull/20151) ([Maksim Kita](https://github.com/kitaisreal)). +* Avoid downloading toolchain tarballs for cross-compiling for FreeBSD. [#31672](https://github.com/ClickHouse/ClickHouse/pull/31672) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Initial support for risc-v. See development/build-cross-riscv for quirks and build command that was tested. [#31309](https://github.com/ClickHouse/ClickHouse/pull/31309) ([Vladimir Smirnov](https://github.com/Civil)). +* Support compile in arm machine with parameter "-DENABLE_TESTS=OFF". [#31007](https://github.com/ClickHouse/ClickHouse/pull/31007) ([zhanghuajie](https://github.com/zhanghuajieHIT)). + + +### ClickHouse release v21.11, 2021-11-09 + +#### Backward Incompatible Change + +* Change order of json_path and json arguments in SQL/JSON functions (to be consistent with the standard). Closes [#30449](https://github.com/ClickHouse/ClickHouse/issues/30449). [#30474](https://github.com/ClickHouse/ClickHouse/pull/30474) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Remove `MergeTree` table setting `write_final_mark`. It will be always `true`. [#30455](https://github.com/ClickHouse/ClickHouse/pull/30455) ([Kseniia Sumarokova](https://github.com/kssenii)). No actions required, all tables are compatible with the new version. +* Function `bayesAB` is removed. Please help to return this function back, refreshed. This closes [#26233](https://github.com/ClickHouse/ClickHouse/issues/26233). [#29934](https://github.com/ClickHouse/ClickHouse/pull/29934) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* This is relevant only if you already started using the experimental `clickhouse-keeper` support. Now ClickHouse Keeper snapshots compressed with `ZSTD` codec by default instead of custom ClickHouse LZ4 block compression. This behavior can be turned off with `compress_snapshots_with_zstd_format` coordination setting (must be equal on all quorum replicas). Backward incompatibility is quite rare and may happen only when new node will send snapshot (happens in case of recovery) to the old node which is unable to read snapshots in ZSTD format. [#29417](https://github.com/ClickHouse/ClickHouse/pull/29417) ([alesapin](https://github.com/alesapin)). + +#### New Feature + +* New asynchronous INSERT mode allows to accumulate inserted data and store it in a single batch in background. On client it can be enabled by setting `async_insert` for `INSERT` queries with data inlined in query or in separate buffer (e.g. for `INSERT` queries via HTTP protocol). If `wait_for_async_insert` is true (by default) the client will wait until data will be flushed to table. On server-side it controlled by the settings `async_insert_threads`, `async_insert_max_data_size` and `async_insert_busy_timeout_ms`. Implements [#18282](https://github.com/ClickHouse/ClickHouse/issues/18282). [#27537](https://github.com/ClickHouse/ClickHouse/pull/27537) ([Anton Popov](https://github.com/CurtizJ)). [#20557](https://github.com/ClickHouse/ClickHouse/pull/20557) ([Ivan](https://github.com/abyss7)). Notes on performance: with asynchronous inserts you can do up to around 10 000 individual INSERT queries per second, so it is still recommended to insert in batches if you want to achieve performance up to millions inserted rows per second. +* Add interactive mode for `clickhouse-local`. So, you can just run `clickhouse-local` to get a command line ClickHouse interface without connecting to a server and process data from files and external data sources. Also merge the code of `clickhouse-client` and `clickhouse-local` together. Closes [#7203](https://github.com/ClickHouse/ClickHouse/issues/7203). Closes [#25516](https://github.com/ClickHouse/ClickHouse/issues/25516). Closes [#22401](https://github.com/ClickHouse/ClickHouse/issues/22401). [#26231](https://github.com/ClickHouse/ClickHouse/pull/26231) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Added support for executable (scriptable) user defined functions. These are UDFs that can be written in any programming language. [#28803](https://github.com/ClickHouse/ClickHouse/pull/28803) ([Maksim Kita](https://github.com/kitaisreal)). +* Allow predefined connections to external data sources. This allows to avoid specifying credentials or addresses while using external data sources, they can be referenced by names instead. Closes [#28367](https://github.com/ClickHouse/ClickHouse/issues/28367). [#28577](https://github.com/ClickHouse/ClickHouse/pull/28577) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Added `INFORMATION_SCHEMA` database with `SCHEMATA`, `TABLES`, `VIEWS` and `COLUMNS` views to the corresponding tables in `system` database. Closes [#9770](https://github.com/ClickHouse/ClickHouse/issues/9770). [#28691](https://github.com/ClickHouse/ClickHouse/pull/28691) ([tavplubix](https://github.com/tavplubix)). +* Support `EXISTS (subquery)`. Closes [#6852](https://github.com/ClickHouse/ClickHouse/issues/6852). [#29731](https://github.com/ClickHouse/ClickHouse/pull/29731) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Session logging for audit. Logging all successful and failed login and logout events to a new `system.session_log` table. [#22415](https://github.com/ClickHouse/ClickHouse/pull/22415) ([Vasily Nemkov](https://github.com/Enmk)) ([Vitaly Baranov](https://github.com/vitlibar)). +* Support multidimensional cosine distance and euclidean distance functions; L1, L2, Lp, Linf distances and norms. Scalar product on tuples and various arithmetic operators on tuples. This fully closes [#4509](https://github.com/ClickHouse/ClickHouse/issues/4509) and even more. [#27933](https://github.com/ClickHouse/ClickHouse/pull/27933) ([Alexey Boykov](https://github.com/mathalex)). +* Add support for compression and decompression for `INTO OUTFILE` and `FROM INFILE` (with autodetect or with additional optional parameter). [#27135](https://github.com/ClickHouse/ClickHouse/pull/27135) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Add CORS (Cross Origin Resource Sharing) support with HTTP `OPTIONS` request. It means, now Grafana will work with serverless requests without a kludges. Closes [#18693](https://github.com/ClickHouse/ClickHouse/issues/18693). [#29155](https://github.com/ClickHouse/ClickHouse/pull/29155) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Queries with JOIN ON now supports disjunctions (OR). [#21320](https://github.com/ClickHouse/ClickHouse/pull/21320) ([Ilya Golshtein](https://github.com/ilejn)). +* Added function `tokens`. That allow to split string into tokens using non-alpha numeric ASCII characters as separators. [#29981](https://github.com/ClickHouse/ClickHouse/pull/29981) ([Maksim Kita](https://github.com/kitaisreal)). Added function `ngrams` to extract ngrams from text. Closes [#29699](https://github.com/ClickHouse/ClickHouse/issues/29699). [#29738](https://github.com/ClickHouse/ClickHouse/pull/29738) ([Maksim Kita](https://github.com/kitaisreal)). +* Add functions for Unicode normalization: `normalizeUTF8NFC`, `normalizeUTF8NFD`, `normalizeUTF8NFKC`, `normalizeUTF8NFKD` functions. [#28633](https://github.com/ClickHouse/ClickHouse/pull/28633) ([darkkeks](https://github.com/darkkeks)). +* Streaming consumption of application log files in ClickHouse with `FileLog` table engine. It's like `Kafka` or `RabbitMQ` engine but for append-only and rotated logs in local filesystem. Closes [#6953](https://github.com/ClickHouse/ClickHouse/issues/6953). [#25969](https://github.com/ClickHouse/ClickHouse/pull/25969) ([flynn](https://github.com/ucasfl)) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add `CapnProto` output format, refactor `CapnProto` input format. [#29291](https://github.com/ClickHouse/ClickHouse/pull/29291) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow to write number in query as binary literal. Example `SELECT 0b001;`. [#29304](https://github.com/ClickHouse/ClickHouse/pull/29304) ([Maksim Kita](https://github.com/kitaisreal)). +* Added `hashed_array` dictionary type. It saves memory when using dictionaries with multiple attributes. Closes [#30236](https://github.com/ClickHouse/ClickHouse/issues/30236). [#30242](https://github.com/ClickHouse/ClickHouse/pull/30242) ([Maksim Kita](https://github.com/kitaisreal)). +* Added `JSONExtractKeys` function. [#30056](https://github.com/ClickHouse/ClickHouse/pull/30056) ([Vitaly](https://github.com/orloffv)). +* Add a function `getOSKernelVersion` - it returns a string with OS kernel version. [#29755](https://github.com/ClickHouse/ClickHouse/pull/29755) ([Memo](https://github.com/Joeywzr)). +* Added `MD4` and `SHA384` functions. MD4 is an obsolete and insecure hash function, it can be used only in rare cases when MD4 is already being used in some legacy system and you need to get exactly the same result. [#29602](https://github.com/ClickHouse/ClickHouse/pull/29602) ([Nikita Tikhomirov](https://github.com/NSTikhomirov)). +* HSTS can be enabled for ClickHouse HTTP server by setting `hsts_max_age` in configuration file with a positive number. [#29516](https://github.com/ClickHouse/ClickHouse/pull/29516) ([凌涛](https://github.com/lingtaolf)). +* Huawei OBS Storage support. Closes [#24294](https://github.com/ClickHouse/ClickHouse/issues/24294). [#29511](https://github.com/ClickHouse/ClickHouse/pull/29511) ([kevin wan](https://github.com/MaxWk)). +* New function `mapContainsKeyLike` to get the map that key matches a simple regular expression. [#29471](https://github.com/ClickHouse/ClickHouse/pull/29471) ([凌涛](https://github.com/lingtaolf)). New function `mapExtractKeyLike` to get the map only kept elements matched specified pattern. [#30793](https://github.com/ClickHouse/ClickHouse/pull/30793) ([凌涛](https://github.com/lingtaolf)). +* Implemented `ALTER TABLE x MODIFY COMMENT`. [#29264](https://github.com/ClickHouse/ClickHouse/pull/29264) ([Vasily Nemkov](https://github.com/Enmk)). +* Adds H3 inspection functions that are missing from ClickHouse but are available via the H3 api: https://h3geo.org/docs/api/inspection. [#29209](https://github.com/ClickHouse/ClickHouse/pull/29209) ([Bharat Nallan](https://github.com/bharatnc)). +* Allow non-replicated ALTER TABLE FETCH and ATTACH in Replicated databases. [#29202](https://github.com/ClickHouse/ClickHouse/pull/29202) ([Kevin Michel](https://github.com/kmichel-aiven)). +* Added a setting `output_format_csv_null_representation`: This is the same as `output_format_tsv_null_representation` but is for CSV output. [#29123](https://github.com/ClickHouse/ClickHouse/pull/29123) ([PHO](https://github.com/depressed-pho)). +* Added function `zookeeperSessionUptime()` which returns uptime of current ZooKeeper session in seconds. [#28983](https://github.com/ClickHouse/ClickHouse/pull/28983) ([tavplubix](https://github.com/tavplubix)). +* Implements the `h3ToGeoBoundary` function. [#28952](https://github.com/ClickHouse/ClickHouse/pull/28952) ([Ivan Veselov](https://github.com/fuzzERot)). +* Add aggregate function `exponentialMovingAverage` that can be used as window function. This closes [#27511](https://github.com/ClickHouse/ClickHouse/issues/27511). [#28914](https://github.com/ClickHouse/ClickHouse/pull/28914) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow to include subcolumns of table columns into `DESCRIBE` query result (can be enabled by setting `describe_include_subcolumns`). [#28905](https://github.com/ClickHouse/ClickHouse/pull/28905) ([Anton Popov](https://github.com/CurtizJ)). +* `Executable`, `ExecutablePool` added option `send_chunk_header`. If this option is true then chunk rows_count with line break will be sent to client before chunk. [#28833](https://github.com/ClickHouse/ClickHouse/pull/28833) ([Maksim Kita](https://github.com/kitaisreal)). +* `tokenbf_v1` and `ngram` support Map with key of String of FixedSring type. It enhance data skipping in query with map key filter. ```sql CREATE TABLE map_tokenbf ( row_id UInt32, map Map(String, String), INDEX map_tokenbf map TYPE ngrambf_v1(4,256,2,0) GRANULARITY 1 ) Engine=MergeTree() Order by id ``` With table above, the query `select * from map_tokebf where map['K']='V'` will skip the granule that doesn't contain key `A` . Of course, how many rows will skipped is depended on the `granularity` and `index_granularity` you set. [#28511](https://github.com/ClickHouse/ClickHouse/pull/28511) ([凌涛](https://github.com/lingtaolf)). +* Send profile events from server to client. New packet type `ProfileEvents` was introduced. Closes [#26177](https://github.com/ClickHouse/ClickHouse/issues/26177). [#28364](https://github.com/ClickHouse/ClickHouse/pull/28364) ([Dmitry Novik](https://github.com/novikd)). +* Bit shift operations for `FixedString` and `String` data types. This closes [#27763](https://github.com/ClickHouse/ClickHouse/issues/27763). [#28325](https://github.com/ClickHouse/ClickHouse/pull/28325) ([å°è·¯](https://github.com/nicelulu)). +* Support adding / deleting tables to replication from PostgreSQL dynamically in database engine MaterializedPostgreSQL. Support alter for database settings. Closes [#27573](https://github.com/ClickHouse/ClickHouse/issues/27573). [#28301](https://github.com/ClickHouse/ClickHouse/pull/28301) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Added function accurateCastOrDefault(x, T). Closes [#21330](https://github.com/ClickHouse/ClickHouse/issues/21330). Authors @taiyang-li. [#23028](https://github.com/ClickHouse/ClickHouse/pull/23028) ([Maksim Kita](https://github.com/kitaisreal)). +* Add Function `toUUIDOrDefault`, `toUInt8/16/32/64/256OrDefault`, `toInt8/16/32/64/128/256OrDefault`, which enables user defining default value(not null) when string parsing is failed. [#21330](https://github.com/ClickHouse/ClickHouse/pull/21330) ([taiyang-li](https://github.com/taiyang-li)). + +#### Performance Improvement + +* Background merges can be preempted by each other and they are scheduled with appropriate priorities. Now long running merges won't prevent short merges to proceed. This is needed for a better scheduling and controlling of merges execution. It reduces the chances to get "too many parts" error. [#22381](https://github.com/ClickHouse/ClickHouse/issues/22381). [#25165](https://github.com/ClickHouse/ClickHouse/pull/25165) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). Added an ability to execute more merges and mutations than the number of threads in background pool. Merges and mutations will be executed step by step according to their sizes (lower is more prioritized). The ratio of the number of tasks to threads to execute is controlled by a setting `background_merges_mutations_concurrency_ratio`, 2 by default. [#29140](https://github.com/ClickHouse/ClickHouse/pull/29140) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Allow to use asynchronous reads for remote filesystems. Lower the number of seeks while reading from remote filesystems. It improves performance tremendously and makes the experimental `web` and `s3` disks to work faster than EBS under certain conditions. [#29205](https://github.com/ClickHouse/ClickHouse/pull/29205) ([Kseniia Sumarokova](https://github.com/kssenii)). In the meantime, the `web` disk type (static dataset hosted on a web server) is graduated from being experimental to be production ready. +* Queries with `INTO OUTFILE` in `clickhouse-client` will use multiple threads. Fix the issue with flickering progress-bar when using `INTO OUTFILE`. This closes [#30873](https://github.com/ClickHouse/ClickHouse/issues/30873). This closes [#30872](https://github.com/ClickHouse/ClickHouse/issues/30872). [#30886](https://github.com/ClickHouse/ClickHouse/pull/30886) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Reduce amount of redundant compressed data read from disk for some types `SELECT` queries (only for `MergeTree` engines family). [#30111](https://github.com/ClickHouse/ClickHouse/pull/30111) ([alesapin](https://github.com/alesapin)). +* Remove some redundant `seek` calls while reading compressed blocks in MergeTree table engines family. [#29766](https://github.com/ClickHouse/ClickHouse/pull/29766) ([alesapin](https://github.com/alesapin)). +* Make `url` table function to process multiple URLs in parallel. This closes [#29670](https://github.com/ClickHouse/ClickHouse/issues/29670) and closes [#29671](https://github.com/ClickHouse/ClickHouse/issues/29671). [#29673](https://github.com/ClickHouse/ClickHouse/pull/29673) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve performance of aggregation in order of primary key (with enabled setting `optimize_aggregation_in_order`). [#30266](https://github.com/ClickHouse/ClickHouse/pull/30266) ([Anton Popov](https://github.com/CurtizJ)). +* Now clickhouse is using DNS cache while communicating with external S3. [#29999](https://github.com/ClickHouse/ClickHouse/pull/29999) ([alesapin](https://github.com/alesapin)). +* Add support for pushdown of `IS NULL`/`IS NOT NULL` to external databases (i.e. MySQL). [#29463](https://github.com/ClickHouse/ClickHouse/pull/29463) ([Azat Khuzhin](https://github.com/azat)). Transform `isNull`/`isNotNull` to `IS NULL`/`IS NOT NULL` (for external dbs, i.e. MySQL). [#29446](https://github.com/ClickHouse/ClickHouse/pull/29446) ([Azat Khuzhin](https://github.com/azat)). +* SELECT queries from Dictionary tables will use multiple threads. [#30500](https://github.com/ClickHouse/ClickHouse/pull/30500) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance for filtering (WHERE operation) of `Decimal` columns. [#30431](https://github.com/ClickHouse/ClickHouse/pull/30431) ([Jun Jin](https://github.com/vesslanjin)). +* Remove branchy code in filter operation with a better implementation with popcnt/ctz which have better performance. [#29881](https://github.com/ClickHouse/ClickHouse/pull/29881) ([Jun Jin](https://github.com/vesslanjin)). +* Improve filter bytemask generator (used for WHERE operator) function all in one with SSE/AVX2/AVX512 instructions. Note that by default ClickHouse is only using SSE, so it's only relevant for custom builds. [#30014](https://github.com/ClickHouse/ClickHouse/pull/30014) ([jasperzhu](https://github.com/jinjunzh)). [#30670](https://github.com/ClickHouse/ClickHouse/pull/30670) ([jasperzhu](https://github.com/jinjunzh)). +* Improve the performance of SUM aggregate function of Nullable floating point numbers. [#28906](https://github.com/ClickHouse/ClickHouse/pull/28906) ([Raúl Marín](https://github.com/Algunenano)). +* Speed up part loading process with multiple disks are in use. The idea is similar to https://github.com/ClickHouse/ClickHouse/pull/16423 . Prod env shows improvement: 24 min -> 16 min . [#28363](https://github.com/ClickHouse/ClickHouse/pull/28363) ([Amos Bird](https://github.com/amosbird)). +* Reduce default settings for S3 multipart upload part size to lower memory usage. [#28679](https://github.com/ClickHouse/ClickHouse/pull/28679) ([ianton-ru](https://github.com/ianton-ru)). +* Speed up `bitmapAnd` function. [#28332](https://github.com/ClickHouse/ClickHouse/pull/28332) ([dddounaiking](https://github.com/OodounaikingoO)). +* Removed sub-optimal mutation notifications in `StorageMergeTree` when merges are still going. [#27552](https://github.com/ClickHouse/ClickHouse/pull/27552) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Attempt to improve performance of string comparison. [#28767](https://github.com/ClickHouse/ClickHouse/pull/28767) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Primary key index and partition filter can work in tuple. [#29281](https://github.com/ClickHouse/ClickHouse/pull/29281) ([凌涛](https://github.com/lingtaolf)). +* If query has multiple quantile aggregate functions with the same arguments but different level parameter, they will be fused together and executed in one pass if the setting `optimize_syntax_fuse_functions` is enabled. [#26657](https://github.com/ClickHouse/ClickHouse/pull/26657) ([hexiaoting](https://github.com/hexiaoting)). +* Now min-max aggregation over the first expression of primary key is optimized by projection. This is for [#329](https://github.com/ClickHouse/ClickHouse/issues/329). [#29918](https://github.com/ClickHouse/ClickHouse/pull/29918) ([Amos Bird](https://github.com/amosbird)). + +#### Experimental Feature + +* Add ability to change nodes configuration (in `.xml` file) for ClickHouse Keeper. [#30372](https://github.com/ClickHouse/ClickHouse/pull/30372) ([alesapin](https://github.com/alesapin)). +* Add `sparkbar` aggregate function. This closes [#26175](https://github.com/ClickHouse/ClickHouse/issues/26175). [#27481](https://github.com/ClickHouse/ClickHouse/pull/27481) ([å°è·¯](https://github.com/nicelulu)). Note: there is one flaw in this function, the behaviour will be changed in future releases. + +#### Improvement + +* Allow user to change log levels without restart. [#29586](https://github.com/ClickHouse/ClickHouse/pull/29586) ([Nikolay Degterinsky](https://github.com/evillique)). +* Multiple improvements for SQL UDF. Queries for manipulation of SQL User Defined Functions now support ON CLUSTER clause. Example `CREATE FUNCTION test_function ON CLUSTER 'cluster' AS x -> x + 1;`. Closes [#30666](https://github.com/ClickHouse/ClickHouse/issues/30666). [#30734](https://github.com/ClickHouse/ClickHouse/pull/30734) ([Maksim Kita](https://github.com/kitaisreal)). Support `CREATE OR REPLACE`, `CREATE IF NOT EXISTS` syntaxes. [#30454](https://github.com/ClickHouse/ClickHouse/pull/30454) ([Maksim Kita](https://github.com/kitaisreal)). Added DROP IF EXISTS support. Example `DROP FUNCTION IF EXISTS test_function`. [#30437](https://github.com/ClickHouse/ClickHouse/pull/30437) ([Maksim Kita](https://github.com/kitaisreal)). Support lambdas. Example `CREATE FUNCTION lambda_function AS x -> arrayMap(element -> element * 2, x);`. [#30435](https://github.com/ClickHouse/ClickHouse/pull/30435) ([Maksim Kita](https://github.com/kitaisreal)). Support SQL user defined functions for `clickhouse-local`. [#30179](https://github.com/ClickHouse/ClickHouse/pull/30179) ([Maksim Kita](https://github.com/kitaisreal)). +* Enable per-query memory profiler (set to `memory_profiler_step` = 4MiB) globally. [#29455](https://github.com/ClickHouse/ClickHouse/pull/29455) ([Azat Khuzhin](https://github.com/azat)). +* Added columns `data_compressed_bytes`, `data_uncompressed_bytes`, `marks_bytes` into `system.data_skipping_indices`. Added columns `secondary_indices_compressed_bytes`, `secondary_indices_uncompressed_bytes`, `secondary_indices_marks_bytes` into `system.parts`. Closes [#29697](https://github.com/ClickHouse/ClickHouse/issues/29697). [#29896](https://github.com/ClickHouse/ClickHouse/pull/29896) ([Maksim Kita](https://github.com/kitaisreal)). +* Add `table` alias to system.tables and `database` alias to system.databases [#29677](https://github.com/ClickHouse/ClickHouse/issues/29677). [#29882](https://github.com/ClickHouse/ClickHouse/pull/29882) ([kevin wan](https://github.com/MaxWk)). +* Correctly resolve interdependencies between tables on server startup. Closes [#8004](https://github.com/ClickHouse/ClickHouse/issues/8004), closes [#15170](https://github.com/ClickHouse/ClickHouse/issues/15170). [#28373](https://github.com/ClickHouse/ClickHouse/pull/28373) ([tavplubix](https://github.com/tavplubix)). +* Avoid error "Division by zero" when denominator is Nullable in functions `divide`, `intDiv` and `modulo`. Closes [#22621](https://github.com/ClickHouse/ClickHouse/issues/22621). [#28352](https://github.com/ClickHouse/ClickHouse/pull/28352) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow to parse values of `Date` data type in text formats as `YYYYMMDD` in addition to `YYYY-MM-DD`. This closes [#30870](https://github.com/ClickHouse/ClickHouse/issues/30870). [#30871](https://github.com/ClickHouse/ClickHouse/pull/30871) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Web UI: render bars in table cells. [#29792](https://github.com/ClickHouse/ClickHouse/pull/29792) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* User can now create dictionaries with comments: `CREATE DICTIONARY ... COMMENT 'vaue'` ... [#29899](https://github.com/ClickHouse/ClickHouse/pull/29899) ([Vasily Nemkov](https://github.com/Enmk)). Users now can set comments to database in `CREATE DATABASE` statement ... [#29429](https://github.com/ClickHouse/ClickHouse/pull/29429) ([Vasily Nemkov](https://github.com/Enmk)). +* Introduce `compiled_expression_cache_elements_size` setting. If you will ever want to use this setting, you will already know what it does. [#30667](https://github.com/ClickHouse/ClickHouse/pull/30667) ([Maksim Kita](https://github.com/kitaisreal)). +* clickhouse-format now supports option `--query`. In previous versions you have to pass the query to stdin. [#29325](https://github.com/ClickHouse/ClickHouse/pull/29325) ([凌涛](https://github.com/lingtaolf)). +* Support `ALTER TABLE` for tables in `Memory` databases. Memory databases are used in `clickhouse-local`. [#30866](https://github.com/ClickHouse/ClickHouse/pull/30866) ([tavplubix](https://github.com/tavplubix)). +* Arrays of all serializable types are now supported by `arrayStringConcat`. [#30840](https://github.com/ClickHouse/ClickHouse/pull/30840) ([Nickita Taranov](https://github.com/nickitat)). +* ClickHouse now will account docker/cgroups limitations to get system memory amount. See [#25662](https://github.com/ClickHouse/ClickHouse/issues/25662). [#30574](https://github.com/ClickHouse/ClickHouse/pull/30574) ([Pavel Medvedev](https://github.com/pmed)). +* Fetched table structure for PostgreSQL database is more reliable now. [#30477](https://github.com/ClickHouse/ClickHouse/pull/30477) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Full support of positional arguments in GROUP BY and ORDER BY. [#30433](https://github.com/ClickHouse/ClickHouse/pull/30433) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Allow extracting non-string element as string using JSONExtractString. This is for [pull/25452#issuecomment-927123287](https://github.com/ClickHouse/ClickHouse/pull/25452#issuecomment-927123287). [#30426](https://github.com/ClickHouse/ClickHouse/pull/30426) ([Amos Bird](https://github.com/amosbird)). +* Added an ability to use FINAL clause in SELECT queries from `GraphiteMergeTree`. [#30360](https://github.com/ClickHouse/ClickHouse/pull/30360) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Minor improvements in replica cloning and enqueuing fetch for broken parts, that should avoid extremely rare hanging of `GET_PART` entries in replication queue. [#30346](https://github.com/ClickHouse/ClickHouse/pull/30346) ([tavplubix](https://github.com/tavplubix)). +* Allow symlinks to files in `user_files` directory for file table function. [#30309](https://github.com/ClickHouse/ClickHouse/pull/30309) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fixed comparison of `Date32` with `Date`, `DateTime`, `DateTime64` and `String`. [#30219](https://github.com/ClickHouse/ClickHouse/pull/30219) ([liang.huang](https://github.com/lhuang09287750)). +* Allow to remove `SAMPLE BY` expression from `MergeTree` tables (`ALTER TABLE REMOVE SAMPLE BY`). [#30180](https://github.com/ClickHouse/ClickHouse/pull/30180) ([Anton Popov](https://github.com/CurtizJ)). +* Now `Keeper` (as part of `clickhouse-server`) will start asynchronously if it can connect to some other node. [#30170](https://github.com/ClickHouse/ClickHouse/pull/30170) ([alesapin](https://github.com/alesapin)). +* Now `clickhouse-client` supports native multi-line editing. [#30143](https://github.com/ClickHouse/ClickHouse/pull/30143) ([Amos Bird](https://github.com/amosbird)). +* `polygon` dictionaries (reverse geocoding): added support for reading the dictionary content with SELECT query method if setting `store_polygon_key_column` = true. Closes [#30090](https://github.com/ClickHouse/ClickHouse/issues/30090). [#30142](https://github.com/ClickHouse/ClickHouse/pull/30142) ([Maksim Kita](https://github.com/kitaisreal)). +* Add ClickHouse logo to Play UI. [#29674](https://github.com/ClickHouse/ClickHouse/pull/29674) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Better exception message while reading column from Arrow-supported formats like `Arrow`, `ArrowStream`, `Parquet` and `ORC`. This closes [#29926](https://github.com/ClickHouse/ClickHouse/issues/29926). [#29927](https://github.com/ClickHouse/ClickHouse/pull/29927) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix data-race between flush and startup in `Buffer` tables. This can appear in tests. [#29930](https://github.com/ClickHouse/ClickHouse/pull/29930) ([Azat Khuzhin](https://github.com/azat)). +* Fix `lock-order-inversion` between `DROP TABLE` for `DatabaseMemory` and `LiveView`. Live View is an experimental feature. Memory database is used in clickhouse-local. [#29929](https://github.com/ClickHouse/ClickHouse/pull/29929) ([Azat Khuzhin](https://github.com/azat)). +* Fix lock-order-inversion between periodic dictionary reload and config reload. [#29928](https://github.com/ClickHouse/ClickHouse/pull/29928) ([Azat Khuzhin](https://github.com/azat)). +* Update zoneinfo files to 2021c. [#29925](https://github.com/ClickHouse/ClickHouse/pull/29925) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add ability to configure retries and delays between them for `clickhouse-copier`. [#29921](https://github.com/ClickHouse/ClickHouse/pull/29921) ([Azat Khuzhin](https://github.com/azat)). +* Add `shutdown_wait_unfinished_queries` server setting to allowing waiting for running queries up to `shutdown_wait_unfinished` time. This is for [#24451](https://github.com/ClickHouse/ClickHouse/issues/24451). [#29914](https://github.com/ClickHouse/ClickHouse/pull/29914) ([Amos Bird](https://github.com/amosbird)). +* Add ability to trace peak memory usage (with new trace_type in `system.trace_log` - `MemoryPeak`). [#29858](https://github.com/ClickHouse/ClickHouse/pull/29858) ([Azat Khuzhin](https://github.com/azat)). +* PostgreSQL foreign tables: Added partitioned table prefix 'p' for the query for fetching replica identity index. [#29828](https://github.com/ClickHouse/ClickHouse/pull/29828) ([Shoh Jahon](https://github.com/Shohjahon)). +* Apply `max_untracked_memory`/`memory_profiler_step`/`memory_profiler_sample_probability` during mutate/merge to profile memory usage during merges. [#29681](https://github.com/ClickHouse/ClickHouse/pull/29681) ([Azat Khuzhin](https://github.com/azat)). +* Query obfuscator: `clickhouse-format --obfuscate` now works with more types of queries. [#29672](https://github.com/ClickHouse/ClickHouse/pull/29672) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the issue: `clickhouse-format --obfuscate` cannot process queries with embedded dictionaries (functions `regionTo...`). [#29667](https://github.com/ClickHouse/ClickHouse/pull/29667) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix incorrect Nullable processing of JSON functions. This fixes [#29615](https://github.com/ClickHouse/ClickHouse/issues/29615) . Mark as improvement because https://github.com/ClickHouse/ClickHouse/pull/28012 is not released. [#29659](https://github.com/ClickHouse/ClickHouse/pull/29659) ([Amos Bird](https://github.com/amosbird)). +* Increase `listen_backlog` by default (to match default in newer linux kernel). [#29643](https://github.com/ClickHouse/ClickHouse/pull/29643) ([Azat Khuzhin](https://github.com/azat)). +* Reload dictionaries, models, user defined executable functions if servers config `dictionaries_config`, `models_config`, `user_defined_executable_functions_config` changes. Closes [#28142](https://github.com/ClickHouse/ClickHouse/issues/28142). [#29529](https://github.com/ClickHouse/ClickHouse/pull/29529) ([Maksim Kita](https://github.com/kitaisreal)). +* Get rid of pointless restriction on projection name. Now projection name can start with `tmp_`. [#29520](https://github.com/ClickHouse/ClickHouse/pull/29520) ([Amos Bird](https://github.com/amosbird)). +* Fixed `There is no query or query context has expired` error in mutations with nested subqueries. Do not allow subqueries in mutation if table is replicated and `allow_nondeterministic_mutations` setting is disabled. [#29495](https://github.com/ClickHouse/ClickHouse/pull/29495) ([tavplubix](https://github.com/tavplubix)). +* Apply config changes to `max_concurrent_queries` during runtime (no need to restart). [#29414](https://github.com/ClickHouse/ClickHouse/pull/29414) ([Raúl Marín](https://github.com/Algunenano)). +* Added setting `use_skip_indexes`. [#29405](https://github.com/ClickHouse/ClickHouse/pull/29405) ([Maksim Kita](https://github.com/kitaisreal)). +* Add support for `FREEZE`ing in-memory parts (for backups). [#29376](https://github.com/ClickHouse/ClickHouse/pull/29376) ([Mo Xuan](https://github.com/mo-avatar)). +* Pass through initial query_id for `clickhouse-benchmark` (previously if you run remote query via `clickhouse-benchmark`, queries on shards will not be linked to the initial query via `initial_query_id`). [#29364](https://github.com/ClickHouse/ClickHouse/pull/29364) ([Azat Khuzhin](https://github.com/azat)). +* Skip indexes `tokenbf_v1` and `ngrambf_v1`: added support for `Array` data type with key of `String` of `FixedString` type. [#29280](https://github.com/ClickHouse/ClickHouse/pull/29280) ([Maksim Kita](https://github.com/kitaisreal)). Skip indexes `tokenbf_v1` and `ngrambf_v1` added support for `Map` data type with key of `String` of `FixedString` type. Author @lingtaolf. [#29220](https://github.com/ClickHouse/ClickHouse/pull/29220) ([Maksim Kita](https://github.com/kitaisreal)). +* Function `has`: added support for `Map` data type. [#29267](https://github.com/ClickHouse/ClickHouse/pull/29267) ([Maksim Kita](https://github.com/kitaisreal)). +* Add `compress_logs` settings for clickhouse-keeper which allow to compress clickhouse-keeper logs (for replicated state machine) in `ZSTD` . Implements: [#26977](https://github.com/ClickHouse/ClickHouse/issues/26977). [#29223](https://github.com/ClickHouse/ClickHouse/pull/29223) ([alesapin](https://github.com/alesapin)). +* Add a setting `external_table_strict_query` - it will force passing the whole WHERE expression in queries to foreign databases even if it is incompatible. [#29206](https://github.com/ClickHouse/ClickHouse/pull/29206) ([Azat Khuzhin](https://github.com/azat)). +* Disable projections when `ARRAY JOIN` is used. In previous versions projection analysis may break aliases in array join. [#29139](https://github.com/ClickHouse/ClickHouse/pull/29139) ([Amos Bird](https://github.com/amosbird)). +* Support more types in `MsgPack` input/output format. [#29077](https://github.com/ClickHouse/ClickHouse/pull/29077) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow to input and output `LowCardinality` columns in `ORC` input/output format. [#29062](https://github.com/ClickHouse/ClickHouse/pull/29062) ([Kruglov Pavel](https://github.com/Avogar)). +* Select from `system.distributed_ddl_queue` might show incorrect values, it's fixed. [#29061](https://github.com/ClickHouse/ClickHouse/pull/29061) ([tavplubix](https://github.com/tavplubix)). +* Correct behaviour with unknown methods for HTTP connection. Solves [#29050](https://github.com/ClickHouse/ClickHouse/issues/29050). [#29057](https://github.com/ClickHouse/ClickHouse/pull/29057) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* `clickhouse-keeper`: Fix bug in `clickhouse-keeper-converter` which can lead to some data loss while restoring from ZooKeeper logs (not snapshot). [#29030](https://github.com/ClickHouse/ClickHouse/pull/29030) ([å°è·¯](https://github.com/nicelulu)). Fix bug in `clickhouse-keeper-converter` which can lead to incorrect ZooKeeper log deserialization. [#29071](https://github.com/ClickHouse/ClickHouse/pull/29071) ([å°è·¯](https://github.com/nicelulu)). +* Apply settings from `CREATE ... AS SELECT` queries (fixes: [#28810](https://github.com/ClickHouse/ClickHouse/issues/28810)). [#28962](https://github.com/ClickHouse/ClickHouse/pull/28962) ([Azat Khuzhin](https://github.com/azat)). +* Respect default database setting for ALTER TABLE ... ON CLUSTER ... REPLACE/MOVE PARTITION FROM/TO ... [#28955](https://github.com/ClickHouse/ClickHouse/pull/28955) ([anneji-dev](https://github.com/anneji-dev)). +* gRPC protocol: Allow change server-side compression from client. [#28953](https://github.com/ClickHouse/ClickHouse/pull/28953) ([Vitaly Baranov](https://github.com/vitlibar)). +* Skip "no data" exception when reading thermal sensors for asynchronous metrics. This closes [#28852](https://github.com/ClickHouse/ClickHouse/issues/28852). [#28882](https://github.com/ClickHouse/ClickHouse/pull/28882) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed logical race condition that might cause `Dictionary not found` error for existing dictionary in rare cases. [#28853](https://github.com/ClickHouse/ClickHouse/pull/28853) ([tavplubix](https://github.com/tavplubix)). +* Relax nested function for If-combinator check (but forbid nested identical combinators). [#28828](https://github.com/ClickHouse/ClickHouse/pull/28828) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible uncaught exception during server termination. [#28761](https://github.com/ClickHouse/ClickHouse/pull/28761) ([Azat Khuzhin](https://github.com/azat)). +* Forbid cleaning of tmp directories that can be used by an active mutation/merge if mutation/merge is extraordinarily long. [#28760](https://github.com/ClickHouse/ClickHouse/pull/28760) ([Azat Khuzhin](https://github.com/azat)). +* Allow optimization `optimize_arithmetic_operations_in_aggregate_functions = 1` when alias is used. [#28746](https://github.com/ClickHouse/ClickHouse/pull/28746) ([Amos Bird](https://github.com/amosbird)). +* Implement `detach_not_byte_identical_parts` setting for `ReplicatedMergeTree`, that will detach instead of remove not byte-identical parts (after mege/mutate). [#28708](https://github.com/ClickHouse/ClickHouse/pull/28708) ([Azat Khuzhin](https://github.com/azat)). +* Implement `max_suspicious_broken_parts_bytes` setting for `MergeTree` (to limit total size of all broken parts, default is `1GiB`). [#28707](https://github.com/ClickHouse/ClickHouse/pull/28707) ([Azat Khuzhin](https://github.com/azat)). +* Enable expanding macros in `RabbitMQ` table settings. [#28683](https://github.com/ClickHouse/ClickHouse/pull/28683) ([Vitaly Baranov](https://github.com/vitlibar)). +* Restore the possibility to read data of a table using the `Log` engine in multiple threads. [#28125](https://github.com/ClickHouse/ClickHouse/pull/28125) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix misbehavior of NULL column handling in JSON functions. This fixes [#27930](https://github.com/ClickHouse/ClickHouse/issues/27930). [#28012](https://github.com/ClickHouse/ClickHouse/pull/28012) ([Amos Bird](https://github.com/amosbird)). +* Allow to set the size of Mark/Uncompressed cache for skip indices separately from columns. [#27961](https://github.com/ClickHouse/ClickHouse/pull/27961) ([Amos Bird](https://github.com/amosbird)). +* Allow to mix JOIN with `USING` with other JOIN types. [#23881](https://github.com/ClickHouse/ClickHouse/pull/23881) ([darkkeks](https://github.com/darkkeks)). +* Update aws-sdk submodule for throttling in Yandex Cloud S3. [#30646](https://github.com/ClickHouse/ClickHouse/pull/30646) ([ianton-ru](https://github.com/ianton-ru)). +* Fix releasing query ID and session ID at the end of query processing while handing gRPC call. [#29954](https://github.com/ClickHouse/ClickHouse/pull/29954) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix shutdown of `AccessControlManager` to fix flaky test. [#29951](https://github.com/ClickHouse/ClickHouse/pull/29951) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix failed assertion in reading from `HDFS`. Update libhdfs3 library to be able to run in tests in debug. Closes [#29251](https://github.com/ClickHouse/ClickHouse/issues/29251). Closes [#27814](https://github.com/ClickHouse/ClickHouse/issues/27814). [#29276](https://github.com/ClickHouse/ClickHouse/pull/29276) ([Kseniia Sumarokova](https://github.com/kssenii)). + + +#### Build/Testing/Packaging Improvement + +* Add support for FreeBSD builds for Aarch64 machines. [#29952](https://github.com/ClickHouse/ClickHouse/pull/29952) ([MikaelUrankar](https://github.com/MikaelUrankar)). +* Recursive submodules are no longer needed for ClickHouse. [#30315](https://github.com/ClickHouse/ClickHouse/pull/30315) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* ClickHouse can be statically built with Musl. This is added as experiment, it does not support building `odbc-bridge`, `library-bridge`, integration with CatBoost and some libraries. [#30248](https://github.com/ClickHouse/ClickHouse/pull/30248) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Enable `Protobuf`, `Arrow`, `ORC`, `Parquet` for `AArch64` and `Darwin` (macOS) builds. This closes [#29248](https://github.com/ClickHouse/ClickHouse/issues/29248). This closes [#28018](https://github.com/ClickHouse/ClickHouse/issues/28018). [#30015](https://github.com/ClickHouse/ClickHouse/pull/30015) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add cross-build for PowerPC (powerpc64le). This closes [#9589](https://github.com/ClickHouse/ClickHouse/issues/9589). Enable support for interaction with MySQL for AArch64 and PowerPC. This closes [#26301](https://github.com/ClickHouse/ClickHouse/issues/26301). [#30010](https://github.com/ClickHouse/ClickHouse/pull/30010) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Leave only required files in cross-compile toolchains. Include them as submodules (earlier they were downloaded as tarballs). [#29974](https://github.com/ClickHouse/ClickHouse/pull/29974) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Implemented structure-aware fuzzing approach in ClickHouse for select statement parser. [#30012](https://github.com/ClickHouse/ClickHouse/pull/30012) ([Paul](https://github.com/PaulCher)). +* Turning on experimental constexpr expressions evaluator for clang to speed up template code compilation. [#29668](https://github.com/ClickHouse/ClickHouse/pull/29668) ([myrrc](https://github.com/myrrc)). +* Add ability to compile using newer version fo glibc without using new symbols. [#29594](https://github.com/ClickHouse/ClickHouse/pull/29594) ([Azat Khuzhin](https://github.com/azat)). +* Reduce Debug build binary size by clang optimization option. [#28736](https://github.com/ClickHouse/ClickHouse/pull/28736) ([flynn](https://github.com/ucasfl)). +* Now all images for CI will be placed in the separate dockerhub repo. [#28656](https://github.com/ClickHouse/ClickHouse/pull/28656) ([alesapin](https://github.com/alesapin)). +* Improve support for build with clang-13. [#28046](https://github.com/ClickHouse/ClickHouse/pull/28046) ([Sergei Semin](https://github.com/syominsergey)). +* Add ability to print raw profile events to `clickhouse-client` (This can be useful for debugging and for testing). [#30064](https://github.com/ClickHouse/ClickHouse/pull/30064) ([Azat Khuzhin](https://github.com/azat)). +* Add time dependency for clickhouse-server unit (systemd and sysvinit init). [#28891](https://github.com/ClickHouse/ClickHouse/pull/28891) ([Azat Khuzhin](https://github.com/azat)). +* Reload stacktrace cache when symbol is reloaded. [#28137](https://github.com/ClickHouse/ClickHouse/pull/28137) ([Amos Bird](https://github.com/amosbird)). + +#### Bug Fix + +* Functions for case-insensitive search in UTF-8 strings like `positionCaseInsensitiveUTF8` and `countSubstringsCaseInsensitiveUTF8` might find substrings that actually does not match in very rare cases, it's fixed. [#30663](https://github.com/ClickHouse/ClickHouse/pull/30663) ([tavplubix](https://github.com/tavplubix)). +* Fix reading from empty file on encrypted disk. [#30494](https://github.com/ClickHouse/ClickHouse/pull/30494) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix transformation of disjunctions chain to `IN` (controlled by settings `optimize_min_equality_disjunction_chain_length`) in distributed queries with settings `legacy_column_name_of_tuple_literal = 0`. [#28658](https://github.com/ClickHouse/ClickHouse/pull/28658) ([Anton Popov](https://github.com/CurtizJ)). +* Allow using a materialized column as the sharding key in a distributed table even if `insert_allow_materialized_columns=0`:. [#28637](https://github.com/ClickHouse/ClickHouse/pull/28637) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix `ORDER BY ... WITH FILL` with set `TO` and `FROM` and no rows in result set. [#30888](https://github.com/ClickHouse/ClickHouse/pull/30888) ([Anton Popov](https://github.com/CurtizJ)). +* Fix set index not used in AND/OR expressions when there are more than two operands. This fixes [#30416](https://github.com/ClickHouse/ClickHouse/issues/30416) . [#30887](https://github.com/ClickHouse/ClickHouse/pull/30887) ([Amos Bird](https://github.com/amosbird)). +* Fix crash when projection with hashing function is materialized. This fixes [#30861](https://github.com/ClickHouse/ClickHouse/issues/30861) . The issue is similar to https://github.com/ClickHouse/ClickHouse/pull/28560 which is a lack of proper understanding of the invariant of header's emptyness. [#30877](https://github.com/ClickHouse/ClickHouse/pull/30877) ([Amos Bird](https://github.com/amosbird)). +* Fixed ambiguity when extracting auxiliary ZooKeeper name from ZooKeeper path in `ReplicatedMergeTree`. Previously server might fail to start with `Unknown auxiliary ZooKeeper name` if ZooKeeper path contains a colon. Fixes [#29052](https://github.com/ClickHouse/ClickHouse/issues/29052). Also it was allowed to specify ZooKeeper path that does not start with slash, but now it's deprecated and creation of new tables with such path is not allowed. Slashes and colons in auxiliary ZooKeeper names are not allowed too. [#30822](https://github.com/ClickHouse/ClickHouse/pull/30822) ([tavplubix](https://github.com/tavplubix)). +* Clean temporary directory when localBackup failed by some reason. [#30797](https://github.com/ClickHouse/ClickHouse/pull/30797) ([ianton-ru](https://github.com/ianton-ru)). +* Fixed a race condition between `REPLACE/MOVE PARTITION` and background merge in non-replicated `MergeTree` that might cause a part of moved/replaced data to remain in partition. Fixes [#29327](https://github.com/ClickHouse/ClickHouse/issues/29327). [#30717](https://github.com/ClickHouse/ClickHouse/pull/30717) ([tavplubix](https://github.com/tavplubix)). +* Fix PREWHERE with WHERE in case of always true PREWHERE. [#30668](https://github.com/ClickHouse/ClickHouse/pull/30668) ([Azat Khuzhin](https://github.com/azat)). +* Limit push down optimization could cause a error `Cannot find column`. Fixes [#30438](https://github.com/ClickHouse/ClickHouse/issues/30438). [#30562](https://github.com/ClickHouse/ClickHouse/pull/30562) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Add missing parenthesis for `isNotNull`/`isNull` rewrites to `IS [NOT] NULL` (fixes queries that has something like `isNotNull(1)+isNotNull(2)`). [#30520](https://github.com/ClickHouse/ClickHouse/pull/30520) ([Azat Khuzhin](https://github.com/azat)). +* Fix deadlock on ALTER with scalar subquery to the same table, close [#30461](https://github.com/ClickHouse/ClickHouse/issues/30461). [#30492](https://github.com/ClickHouse/ClickHouse/pull/30492) ([Vladimir C](https://github.com/vdimir)). +* Fixed segfault which might happen if session expired during execution of REPLACE PARTITION. [#30432](https://github.com/ClickHouse/ClickHouse/pull/30432) ([tavplubix](https://github.com/tavplubix)). +* Queries with condition like `IN (subquery)` could return incorrect result in case if aggregate projection applied. Fixed creation of sets for projections. [#30310](https://github.com/ClickHouse/ClickHouse/pull/30310) ([Amos Bird](https://github.com/amosbird)). +* Fix column alias resolution of JOIN queries when projection is enabled. This fixes [#30146](https://github.com/ClickHouse/ClickHouse/issues/30146). [#30293](https://github.com/ClickHouse/ClickHouse/pull/30293) ([Amos Bird](https://github.com/amosbird)). +* Fix some deficiency in `replaceRegexpAll` function. [#30292](https://github.com/ClickHouse/ClickHouse/pull/30292) ([Memo](https://github.com/Joeywzr)). +* Fix ComplexKeyHashedDictionary, ComplexKeySparseHashedDictionary parsing `preallocate` option from layout config. [#30246](https://github.com/ClickHouse/ClickHouse/pull/30246) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix `[I]LIKE` function. Closes [#28661](https://github.com/ClickHouse/ClickHouse/issues/28661). [#30244](https://github.com/ClickHouse/ClickHouse/pull/30244) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix crash with shortcircuit and lowcardinality in multiIf. [#30243](https://github.com/ClickHouse/ClickHouse/pull/30243) ([Raúl Marín](https://github.com/Algunenano)). +* FlatDictionary, HashedDictionary fix bytes_allocated calculation for nullable attributes. [#30238](https://github.com/ClickHouse/ClickHouse/pull/30238) ([Maksim Kita](https://github.com/kitaisreal)). +* Allow identifiers starting with numbers in multiple joins. [#30230](https://github.com/ClickHouse/ClickHouse/pull/30230) ([Vladimir C](https://github.com/vdimir)). +* Fix reading from `MergeTree` with `max_read_buffer_size = 0` (when the user wants to shoot himself in the foot) (can lead to exceptions `Can't adjust last granule`, `LOGICAL_ERROR`, or even data loss). [#30192](https://github.com/ClickHouse/ClickHouse/pull/30192) ([Azat Khuzhin](https://github.com/azat)). +* Fix `pread_fake_async`/`pread_threadpool` with `min_bytes_to_use_direct_io`. [#30191](https://github.com/ClickHouse/ClickHouse/pull/30191) ([Azat Khuzhin](https://github.com/azat)). +* Fix INSERT SELECT incorrectly fills MATERIALIZED column based of Nullable column. [#30189](https://github.com/ClickHouse/ClickHouse/pull/30189) ([Azat Khuzhin](https://github.com/azat)). +* Support nullable arguments in function `initializeAggregation`. [#30177](https://github.com/ClickHouse/ClickHouse/pull/30177) ([Anton Popov](https://github.com/CurtizJ)). +* Fix error `Port is already connected` for queries with `GLOBAL IN` and `WITH TOTALS`. Only for 21.9 and 21.10. [#30086](https://github.com/ClickHouse/ClickHouse/pull/30086) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix race between MOVE PARTITION and merges/mutations for MergeTree. [#30074](https://github.com/ClickHouse/ClickHouse/pull/30074) ([Azat Khuzhin](https://github.com/azat)). +* Dropped `Memory` database might reappear after server restart, it's fixed ([#29795](https://github.com/ClickHouse/ClickHouse/issues/29795)). Also added `force_remove_data_recursively_on_drop` setting as a workaround for `Directory not empty` error when dropping `Ordinary` database (because it's not possible to remove data leftovers manually in cloud environment). [#30054](https://github.com/ClickHouse/ClickHouse/pull/30054) ([tavplubix](https://github.com/tavplubix)). +* Fix crash of sample by `tuple()`, closes [#30004](https://github.com/ClickHouse/ClickHouse/issues/30004). [#30016](https://github.com/ClickHouse/ClickHouse/pull/30016) ([flynn](https://github.com/ucasfl)). +* try to close issue: [#29965](https://github.com/ClickHouse/ClickHouse/issues/29965). [#29976](https://github.com/ClickHouse/ClickHouse/pull/29976) ([hexiaoting](https://github.com/hexiaoting)). +* Fix possible data-race between `FileChecker` and `StorageLog`/`StorageStripeLog`. [#29959](https://github.com/ClickHouse/ClickHouse/pull/29959) ([Azat Khuzhin](https://github.com/azat)). +* Fix data-race between `LogSink::writeMarks()` and `LogSource` in `StorageLog`. [#29946](https://github.com/ClickHouse/ClickHouse/pull/29946) ([Azat Khuzhin](https://github.com/azat)). +* Fix potential resource leak of the concurrent query limit of merge tree tables introduced in https://github.com/ClickHouse/ClickHouse/pull/19544. [#29879](https://github.com/ClickHouse/ClickHouse/pull/29879) ([Amos Bird](https://github.com/amosbird)). +* Fix system tables recreation check (fails to detect changes in enum values). [#29857](https://github.com/ClickHouse/ClickHouse/pull/29857) ([Azat Khuzhin](https://github.com/azat)). +* MaterializedMySQL: Fix an issue where if the connection to MySQL was lost, only parts of a transaction could be processed. [#29837](https://github.com/ClickHouse/ClickHouse/pull/29837) ([HÃ¥vard KvÃ¥len](https://github.com/havardk)). +* Avoid `Timeout exceeded: elapsed 18446744073.709553 seconds` error that might happen in extremely rare cases, presumably due to some bug in kernel. Fixes [#29154](https://github.com/ClickHouse/ClickHouse/issues/29154). [#29811](https://github.com/ClickHouse/ClickHouse/pull/29811) ([tavplubix](https://github.com/tavplubix)). +* Fix bad cast in `ATTACH TABLE ... FROM 'path'` query when non-string literal is used instead of path. It may lead to reading of uninitialized memory. [#29790](https://github.com/ClickHouse/ClickHouse/pull/29790) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix concurrent access to `LowCardinality` during `GROUP BY` (in combination with `Buffer` tables it may lead to troubles). [#29782](https://github.com/ClickHouse/ClickHouse/pull/29782) ([Azat Khuzhin](https://github.com/azat)). +* Fix incorrect `GROUP BY` (multiple rows with the same keys in result) in case of distributed query when shards had mixed versions `<= 21.3` and `>= 21.4`, `GROUP BY` key had several columns all with fixed size, and two-level aggregation was activated (see `group_by_two_level_threshold` and `group_by_two_level_threshold_bytes`). Fixes [#29580](https://github.com/ClickHouse/ClickHouse/issues/29580). [#29735](https://github.com/ClickHouse/ClickHouse/pull/29735) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed incorrect behaviour of setting `materialized_postgresql_tables_list` at server restart. Found in [#28529](https://github.com/ClickHouse/ClickHouse/issues/28529). [#29686](https://github.com/ClickHouse/ClickHouse/pull/29686) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Condition in filter predicate could be lost after push-down optimisation. [#29625](https://github.com/ClickHouse/ClickHouse/pull/29625) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix JIT expression compilation with aliases and short-circuit expression evaluation. Closes [#29403](https://github.com/ClickHouse/ClickHouse/issues/29403). [#29574](https://github.com/ClickHouse/ClickHouse/pull/29574) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix rare segfault in `ALTER MODIFY` query when using incorrect table identifier in `DEFAULT` expression like `x.y.z...` Fixes [#29184](https://github.com/ClickHouse/ClickHouse/issues/29184). [#29573](https://github.com/ClickHouse/ClickHouse/pull/29573) ([alesapin](https://github.com/alesapin)). +* Fix nullptr deference for `GROUP BY WITH TOTALS HAVING` (when the column from `HAVING` wasn't selected). [#29553](https://github.com/ClickHouse/ClickHouse/pull/29553) ([Azat Khuzhin](https://github.com/azat)). +* Avoid deadlocks when reading and writting on Join table engine tables at the same time. [#29544](https://github.com/ClickHouse/ClickHouse/pull/29544) ([Raúl Marín](https://github.com/Algunenano)). +* Fix bug in check `pathStartsWith` becuase there was bug with the usage of `std::mismatch`: ` The behavior is undefined if the second range is shorter than the first range.`. [#29531](https://github.com/ClickHouse/ClickHouse/pull/29531) ([Kseniia Sumarokova](https://github.com/kssenii)). +* In ODBC bridge add retries for error Invalid cursor state. It is a retriable error. Closes [#29473](https://github.com/ClickHouse/ClickHouse/issues/29473). [#29518](https://github.com/ClickHouse/ClickHouse/pull/29518) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fixed incorrect table name parsing on loading of `Lazy` database. Fixes [#29456](https://github.com/ClickHouse/ClickHouse/issues/29456). [#29476](https://github.com/ClickHouse/ClickHouse/pull/29476) ([tavplubix](https://github.com/tavplubix)). +* Fix possible `Block structure mismatch` for subqueries with pushed-down `HAVING` predicate. Fixes [#29010](https://github.com/ClickHouse/ClickHouse/issues/29010). [#29475](https://github.com/ClickHouse/ClickHouse/pull/29475) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix Logical error `Cannot capture columns` in functions greatest/least. Closes [#29334](https://github.com/ClickHouse/ClickHouse/issues/29334). [#29454](https://github.com/ClickHouse/ClickHouse/pull/29454) ([Kruglov Pavel](https://github.com/Avogar)). +* RocksDB table engine: fix race condition during multiple DB opening (and get back some tests that triggers the problem on CI). [#29393](https://github.com/ClickHouse/ClickHouse/pull/29393) ([Azat Khuzhin](https://github.com/azat)). +* Fix replicated access storage not shutting down cleanly when misconfigured. [#29388](https://github.com/ClickHouse/ClickHouse/pull/29388) ([Kevin Michel](https://github.com/kmichel-aiven)). +* Remove window function `nth_value` as it is not memory-safe. This closes [#29347](https://github.com/ClickHouse/ClickHouse/issues/29347). [#29348](https://github.com/ClickHouse/ClickHouse/pull/29348) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix vertical merges of projection parts. This fixes [#29253](https://github.com/ClickHouse/ClickHouse/issues/29253) . This PR also fixes several projection merge/mutation issues introduced in https://github.com/ClickHouse/ClickHouse/pull/25165. [#29337](https://github.com/ClickHouse/ClickHouse/pull/29337) ([Amos Bird](https://github.com/amosbird)). +* Fix hanging DDL queries on Replicated database while adding a new replica. [#29328](https://github.com/ClickHouse/ClickHouse/pull/29328) ([Kevin Michel](https://github.com/kmichel-aiven)). +* Fix connection timeouts (`send_timeout`/`receive_timeout`). [#29282](https://github.com/ClickHouse/ClickHouse/pull/29282) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible `Table columns structure in ZooKeeper is different from local table structure` exception while recreating or creating new replicas of `ReplicatedMergeTree`, when one of table columns have default expressions with case-insensitive functions. [#29266](https://github.com/ClickHouse/ClickHouse/pull/29266) ([Anton Popov](https://github.com/CurtizJ)). +* Send normal `Database doesn't exist error` (`UNKNOWN_DATABASE`) to the client (via TCP) instead of `Attempt to read after eof` (`ATTEMPT_TO_READ_AFTER_EOF`). [#29229](https://github.com/ClickHouse/ClickHouse/pull/29229) ([Azat Khuzhin](https://github.com/azat)). +* Fix segfault while inserting into column with type LowCardinality(Nullable) in Avro input format. [#29132](https://github.com/ClickHouse/ClickHouse/pull/29132) ([Kruglov Pavel](https://github.com/Avogar)). +* Do not allow to reuse previous credentials in case of inter-server secret (Before INSERT via Buffer/Kafka to Distributed table with interserver secret configured for that cluster, may re-use previously set user for that connection). [#29060](https://github.com/ClickHouse/ClickHouse/pull/29060) ([Azat Khuzhin](https://github.com/azat)). +* Handle `any_join_distinct_right_table_keys` when join with dictionary, close [#29007](https://github.com/ClickHouse/ClickHouse/issues/29007). [#29014](https://github.com/ClickHouse/ClickHouse/pull/29014) ([Vladimir C](https://github.com/vdimir)). +* Fix "Not found column ... in block" error, when join on alias column, close [#26980](https://github.com/ClickHouse/ClickHouse/issues/26980). [#29008](https://github.com/ClickHouse/ClickHouse/pull/29008) ([Vladimir C](https://github.com/vdimir)). +* Fix the number of threads used in `GLOBAL IN` subquery (it was executed in single threads since [#19414](https://github.com/ClickHouse/ClickHouse/issues/19414) bugfix). [#28997](https://github.com/ClickHouse/ClickHouse/pull/28997) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bad optimizations of ORDER BY if it contains WITH FILL. This closes [#28908](https://github.com/ClickHouse/ClickHouse/issues/28908). This closes [#26049](https://github.com/ClickHouse/ClickHouse/issues/26049). [#28910](https://github.com/ClickHouse/ClickHouse/pull/28910) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix higher-order array functions (`SIGSEGV` for `arrayCompact`/`ILLEGAL_COLUMN` for `arrayDifference`/`arrayCumSumNonNegative`) with consts. [#28904](https://github.com/ClickHouse/ClickHouse/pull/28904) ([Azat Khuzhin](https://github.com/azat)). +* Fix waiting for mutation with `mutations_sync=2`. [#28889](https://github.com/ClickHouse/ClickHouse/pull/28889) ([Azat Khuzhin](https://github.com/azat)). +* Fix queries to external databases (i.e. MySQL) with multiple columns in IN ( i.e. `(k,v) IN ((1, 2))` ). [#28888](https://github.com/ClickHouse/ClickHouse/pull/28888) ([Azat Khuzhin](https://github.com/azat)). +* Fix bug with `LowCardinality` in short-curcuit function evaluation. Closes [#28884](https://github.com/ClickHouse/ClickHouse/issues/28884). [#28887](https://github.com/ClickHouse/ClickHouse/pull/28887) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix reading of subcolumns from compact parts. [#28873](https://github.com/ClickHouse/ClickHouse/pull/28873) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed a race condition between `DROP PART` and `REPLACE/MOVE PARTITION` that might cause replicas to diverge in rare cases. [#28864](https://github.com/ClickHouse/ClickHouse/pull/28864) ([tavplubix](https://github.com/tavplubix)). +* Fix expressions compilation with short circuit evaluation. [#28821](https://github.com/ClickHouse/ClickHouse/pull/28821) ([Azat Khuzhin](https://github.com/azat)). +* Fix extremely rare case when ReplicatedMergeTree replicas can diverge after hard reboot of all replicas. The error looks like `Part ... intersects (previous|next) part ...`. [#28817](https://github.com/ClickHouse/ClickHouse/pull/28817) ([alesapin](https://github.com/alesapin)). +* Better check for connection usability and also catch any exception in `RabbitMQ` shutdown just in case. [#28797](https://github.com/ClickHouse/ClickHouse/pull/28797) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix benign race condition in ReplicatedMergeTreeQueue. Shouldn't be visible for user, but can lead to subtle bugs. [#28734](https://github.com/ClickHouse/ClickHouse/pull/28734) ([alesapin](https://github.com/alesapin)). +* Fix possible crash for `SELECT` with partially created aggregate projection in case of exception. [#28700](https://github.com/ClickHouse/ClickHouse/pull/28700) ([Amos Bird](https://github.com/amosbird)). +* Fix the coredump in the creation of distributed tables, when the parameters passed in are wrong. [#28686](https://github.com/ClickHouse/ClickHouse/pull/28686) ([Zhiyong Wang](https://github.com/ljcui)). +* Add Settings.Names, Settings.Values aliases for system.processes table. [#28685](https://github.com/ClickHouse/ClickHouse/pull/28685) ([Vitaly](https://github.com/orloffv)). +* Support for S2 Geometry library: Fix the number of arguments required by `s2RectAdd` and `s2RectContains` functions. [#28663](https://github.com/ClickHouse/ClickHouse/pull/28663) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix invalid constant type conversion when Nullable or LowCardinality primary key is used. [#28636](https://github.com/ClickHouse/ClickHouse/pull/28636) ([Amos Bird](https://github.com/amosbird)). +* Fix "Column is not under aggregate function and not in GROUP BY" with PREWHERE (Fixes: [#28461](https://github.com/ClickHouse/ClickHouse/issues/28461)). [#28502](https://github.com/ClickHouse/ClickHouse/pull/28502) ([Azat Khuzhin](https://github.com/azat)). + + +### ClickHouse release v21.10, 2021-10-16 + +#### Backward Incompatible Change + +* Now the following MergeTree table-level settings: `replicated_max_parallel_sends`, `replicated_max_parallel_sends_for_table`, `replicated_max_parallel_fetches`, `replicated_max_parallel_fetches_for_table` do nothing. They never worked well and were replaced with `max_replicated_fetches_network_bandwidth`, `max_replicated_sends_network_bandwidth` and `background_fetches_pool_size`. [#28404](https://github.com/ClickHouse/ClickHouse/pull/28404) ([alesapin](https://github.com/alesapin)). + +#### New Feature + +* Add feature for creating user-defined functions (UDF) as lambda expressions. Syntax `CREATE FUNCTION {function_name} as ({parameters}) -> {function core}`. Example `CREATE FUNCTION plus_one as (a) -> a + 1`. Authors @Realist007. [#27796](https://github.com/ClickHouse/ClickHouse/pull/27796) ([Maksim Kita](https://github.com/kitaisreal)) [#23978](https://github.com/ClickHouse/ClickHouse/pull/23978) ([Realist007](https://github.com/Realist007)). +* Added `Executable` storage engine and `executable` table function. It enables data processing with external scripts in streaming fashion. [#28102](https://github.com/ClickHouse/ClickHouse/pull/28102) ([Maksim Kita](https://github.com/kitaisreal)) ([ruct](https://github.com/ruct)). +* Added `ExecutablePool` storage engine. Similar to `Executable` but it's using a pool of long running processes. [#28518](https://github.com/ClickHouse/ClickHouse/pull/28518) ([Maksim Kita](https://github.com/kitaisreal)). +* Add `ALTER TABLE ... MATERIALIZE COLUMN` query. [#27038](https://github.com/ClickHouse/ClickHouse/pull/27038) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Support for partitioned write into `s3` table function. [#23051](https://github.com/ClickHouse/ClickHouse/pull/23051) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Support `lz4` compression format (in addition to `gz`, `bz2`, `xz`, `zstd`) for data import / export. [#25310](https://github.com/ClickHouse/ClickHouse/pull/25310) ([Bharat Nallan](https://github.com/bharatnc)). +* Allow positional arguments under setting `enable_positional_arguments`. Closes [#2592](https://github.com/ClickHouse/ClickHouse/issues/2592). [#27530](https://github.com/ClickHouse/ClickHouse/pull/27530) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Accept user settings related to file formats in `SETTINGS` clause in `CREATE` query for s3 tables. This closes [#27580](https://github.com/ClickHouse/ClickHouse/issues/27580). [#28037](https://github.com/ClickHouse/ClickHouse/pull/28037) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Allow SSL connection for `RabbitMQ` engine. [#28365](https://github.com/ClickHouse/ClickHouse/pull/28365) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add `getServerPort` function to allow getting server port. When the port is not used by the server, throw an exception. [#27900](https://github.com/ClickHouse/ClickHouse/pull/27900) ([Amos Bird](https://github.com/amosbird)). +* Add conversion functions between "snowflake id" and `DateTime`, `DateTime64`. See [#27058](https://github.com/ClickHouse/ClickHouse/issues/27058). [#27704](https://github.com/ClickHouse/ClickHouse/pull/27704) ([jasine](https://github.com/jasine)). +* Add function `SHA512`. [#27830](https://github.com/ClickHouse/ClickHouse/pull/27830) ([zhanglistar](https://github.com/zhanglistar)). +* Add `log_queries_probability` setting that allows user to write to query_log only a sample of queries. Closes [#16609](https://github.com/ClickHouse/ClickHouse/issues/16609). [#27527](https://github.com/ClickHouse/ClickHouse/pull/27527) ([Nikolay Degterinsky](https://github.com/evillique)). + +#### Experimental Feature + +* `web` type of disks to store readonly tables on web server in form of static files. See [#23982](https://github.com/ClickHouse/ClickHouse/issues/23982). [#25251](https://github.com/ClickHouse/ClickHouse/pull/25251) ([Kseniia Sumarokova](https://github.com/kssenii)). This is mostly needed to faciliate testing of operation on shared storage and for easy importing of datasets. Not recommended to use before release 21.11. +* Added new commands `BACKUP` and `RESTORE`. [#21945](https://github.com/ClickHouse/ClickHouse/pull/21945) ([Vitaly Baranov](https://github.com/vitlibar)). This is under development and not intended to be used in current version. + +#### Performance Improvement + +* Speed up `sumIf` and `countIf` aggregation functions. [#28272](https://github.com/ClickHouse/ClickHouse/pull/28272) ([Raúl Marín](https://github.com/Algunenano)). +* Create virtual projection for `minmax` indices. Now, when `allow_experimental_projection_optimization` is enabled, queries will use minmax index instead of reading the data when possible. [#26286](https://github.com/ClickHouse/ClickHouse/pull/26286) ([Amos Bird](https://github.com/amosbird)). +* Introducing two checks in `sequenceMatch` and `sequenceCount` that allow for early exit when some deterministic part of the sequence pattern is missing from the events list. This change unlocks many queries that would previously fail due to reaching operations cap, and generally speeds up the pipeline. [#27729](https://github.com/ClickHouse/ClickHouse/pull/27729) ([Jakub Kuklis](https://github.com/jkuklis)). +* Enhance primary key analysis with always monotonic information of binary functions, notably non-zero constant division. [#28302](https://github.com/ClickHouse/ClickHouse/pull/28302) ([Amos Bird](https://github.com/amosbird)). +* Make `hasAll` filter condition leverage bloom filter data-skipping indexes. [#27984](https://github.com/ClickHouse/ClickHouse/pull/27984) ([Braulio Valdivielso Martínez](https://github.com/BraulioVM)). +* Speed up data parts loading by delaying table startup process. [#28313](https://github.com/ClickHouse/ClickHouse/pull/28313) ([Amos Bird](https://github.com/amosbird)). +* Fixed possible excessive number of conditions moved from `WHERE` to `PREWHERE` (optimization controlled by settings `optimize_move_to_prewhere`). [#28139](https://github.com/ClickHouse/ClickHouse/pull/28139) ([lthaooo](https://github.com/lthaooo)). +* Enable `optimize_distributed_group_by_sharding_key` by default. [#28105](https://github.com/ClickHouse/ClickHouse/pull/28105) ([Azat Khuzhin](https://github.com/azat)). + +#### Improvement + +* Check cluster name before creating `Distributed` table, do not allow to create a table with incorrect cluster name. Fixes [#27832](https://github.com/ClickHouse/ClickHouse/issues/27832). [#27927](https://github.com/ClickHouse/ClickHouse/pull/27927) ([tavplubix](https://github.com/tavplubix)). +* Add aggregate function `quantileBFloat16Weighted` similarly to other quantile...Weighted functions. This closes [#27745](https://github.com/ClickHouse/ClickHouse/issues/27745). [#27758](https://github.com/ClickHouse/ClickHouse/pull/27758) ([Ivan Novitskiy](https://github.com/RedClusive)). +* Allow to create dictionaries with empty attributes list. [#27905](https://github.com/ClickHouse/ClickHouse/pull/27905) ([Maksim Kita](https://github.com/kitaisreal)). +* Add interactive documentation in `clickhouse-client` about how to reset the password. This is useful in scenario when user has installed ClickHouse, set up the password and instantly forget it. See [#27750](https://github.com/ClickHouse/ClickHouse/issues/27750). [#27903](https://github.com/ClickHouse/ClickHouse/pull/27903) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Support the case when the data is enclosed in array in `JSONAsString` input format. Closes [#25517](https://github.com/ClickHouse/ClickHouse/issues/25517). [#25633](https://github.com/ClickHouse/ClickHouse/pull/25633) ([Kruglov Pavel](https://github.com/Avogar)). +* Add new column `last_queue_update_exception` to `system.replicas` table. [#26843](https://github.com/ClickHouse/ClickHouse/pull/26843) ([nvartolomei](https://github.com/nvartolomei)). +* Support reconnections on failover for `MaterializedPostgreSQL` tables. Closes [#28529](https://github.com/ClickHouse/ClickHouse/issues/28529). [#28614](https://github.com/ClickHouse/ClickHouse/pull/28614) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Generate a unique server UUID on first server start. [#20089](https://github.com/ClickHouse/ClickHouse/pull/20089) ([Bharat Nallan](https://github.com/bharatnc)). +* Introduce `connection_wait_timeout` (default to 5 seconds, 0 - do not wait) setting for `MySQL` engine. [#28474](https://github.com/ClickHouse/ClickHouse/pull/28474) ([Azat Khuzhin](https://github.com/azat)). +* Do not allow creating `MaterializedPostgreSQL` with bad arguments. Closes [#28423](https://github.com/ClickHouse/ClickHouse/issues/28423). [#28430](https://github.com/ClickHouse/ClickHouse/pull/28430) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Use real tmp file instead of predefined "rows_sources" for vertical merges. This avoids generating garbage directories in tmp disks. [#28299](https://github.com/ClickHouse/ClickHouse/pull/28299) ([Amos Bird](https://github.com/amosbird)). +* Added `libhdfs3_conf` in server config instead of export env `LIBHDFS3_CONF` in clickhouse-server.service. This is for configuration of interaction with HDFS. [#28268](https://github.com/ClickHouse/ClickHouse/pull/28268) ([Zhichang Yu](https://github.com/yuzhichang)). +* Fix removing of parts in a Temporary state which can lead to an unexpected exception (`Part %name% doesn't exist`). Fixes [#23661](https://github.com/ClickHouse/ClickHouse/issues/23661). [#28221](https://github.com/ClickHouse/ClickHouse/pull/28221) [#28221](https://github.com/ClickHouse/ClickHouse/issues/28221)) ([Azat Khuzhin](https://github.com/azat)). +* Fix `zookeeper_log.address` (before the first patch in this PR the address was always `::`) and reduce number of calls `getpeername(2)` for this column (since each time entry for `zookeeper_log` is added `getpeername()` is called, cache this address in the zookeeper client to avoid this). [#28212](https://github.com/ClickHouse/ClickHouse/pull/28212) ([Azat Khuzhin](https://github.com/azat)). +* Support implicit conversions between index in operator `[]` and key of type `Map` (e.g. different `Int` types, `String` and `FixedString`). [#28096](https://github.com/ClickHouse/ClickHouse/pull/28096) ([Anton Popov](https://github.com/CurtizJ)). +* Support `ON CONFLICT` clause when inserting into PostgreSQL table engine or table function. Closes [#27727](https://github.com/ClickHouse/ClickHouse/issues/27727). [#28081](https://github.com/ClickHouse/ClickHouse/pull/28081) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Lower restrictions for `Enum` data type to allow attaching compatible data. Closes [#26672](https://github.com/ClickHouse/ClickHouse/issues/26672). [#28028](https://github.com/ClickHouse/ClickHouse/pull/28028) ([Dmitry Novik](https://github.com/novikd)). +* Add a setting `empty_result_for_aggregation_by_constant_keys_on_empty_set` to control the behavior of grouping by constant keys on empty set. This is to bring back the old baviour of [#6842](https://github.com/ClickHouse/ClickHouse/issues/6842). [#27932](https://github.com/ClickHouse/ClickHouse/pull/27932) ([Amos Bird](https://github.com/amosbird)). +* Added `replication_wait_for_inactive_replica_timeout` setting. It allows to specify how long to wait for inactive replicas to execute `ALTER`/`OPTIMZE`/`TRUNCATE` query (default is 120 seconds). If `replication_alter_partitions_sync` is 2 and some replicas are not active for more than `replication_wait_for_inactive_replica_timeout` seconds, then `UNFINISHED` will be thrown. [#27931](https://github.com/ClickHouse/ClickHouse/pull/27931) ([tavplubix](https://github.com/tavplubix)). +* Support lambda argument for `APPLY` column transformer which allows applying functions with more than one argument. This is for [#27877](https://github.com/ClickHouse/ClickHouse/issues/27877). [#27901](https://github.com/ClickHouse/ClickHouse/pull/27901) ([Amos Bird](https://github.com/amosbird)). +* Enable `tcp_keep_alive_timeout` by default. [#27882](https://github.com/ClickHouse/ClickHouse/pull/27882) ([Azat Khuzhin](https://github.com/azat)). +* Improve remote query cancelation (in case of remote server abnormaly terminated). [#27881](https://github.com/ClickHouse/ClickHouse/pull/27881) ([Azat Khuzhin](https://github.com/azat)). +* Use Multipart copy upload for large S3 objects. [#27858](https://github.com/ClickHouse/ClickHouse/pull/27858) ([ianton-ru](https://github.com/ianton-ru)). +* Allow symlink traversal for library dictionaty path. [#27815](https://github.com/ClickHouse/ClickHouse/pull/27815) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Now `ALTER MODIFY COLUM` `T` to `Nullable(T)` doesn't require mutation. [#27787](https://github.com/ClickHouse/ClickHouse/pull/27787) ([victorgao](https://github.com/kafka1991)). +* Don't silently ignore errors and don't count delays in `ReadBufferFromS3`. [#27484](https://github.com/ClickHouse/ClickHouse/pull/27484) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Improve `ALTER ... MATERIALIZE TTL` by recalculating metadata only without actual TTL action. [#27019](https://github.com/ClickHouse/ClickHouse/pull/27019) ([lthaooo](https://github.com/lthaooo)). +* Allow reading the list of custom top level domains without a new line at EOF. [#28213](https://github.com/ClickHouse/ClickHouse/pull/28213) ([Azat Khuzhin](https://github.com/azat)). + +#### Bug Fix + +* Fix cases, when reading compressed data from `carbon-clickhouse` fails with 'attempt to read after end of file'. Closes [#26149](https://github.com/ClickHouse/ClickHouse/issues/26149). [#28150](https://github.com/ClickHouse/ClickHouse/pull/28150) ([FArthur-cmd](https://github.com/FArthur-cmd)). +* Fix checking access grants when executing `GRANT WITH REPLACE` statement with `ON CLUSTER` clause. This PR improves fix [#27001](https://github.com/ClickHouse/ClickHouse/pull/27701). [#27983](https://github.com/ClickHouse/ClickHouse/pull/27983) ([Vitaly Baranov](https://github.com/vitlibar)). +* Allow selecting with `extremes = 1` from a column of the type `LowCardinality(UUID)`. [#27918](https://github.com/ClickHouse/ClickHouse/pull/27918) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix PostgreSQL-style cast (`::` operator) with negative numbers. [#27876](https://github.com/ClickHouse/ClickHouse/pull/27876) ([Anton Popov](https://github.com/CurtizJ)). +* After [#26864](https://github.com/ClickHouse/ClickHouse/pull/26864). Fix shutdown of `NamedSessionStorage`: session contexts stored in `NamedSessionStorage` are now destroyed before destroying the global context. [#27875](https://github.com/ClickHouse/ClickHouse/pull/27875) ([Vitaly Baranov](https://github.com/vitlibar)). +* Bugfix for `windowFunnel` "strict" mode. This fixes [#27469](https://github.com/ClickHouse/ClickHouse/issues/27469). [#27563](https://github.com/ClickHouse/ClickHouse/pull/27563) ([achimbab](https://github.com/achimbab)). +* Fix infinite loop while reading truncated `bzip2` archive. [#28543](https://github.com/ClickHouse/ClickHouse/pull/28543) ([Azat Khuzhin](https://github.com/azat)). +* Fix UUID overlap in `DROP TABLE` for internal DDL from `MaterializedMySQL`. MaterializedMySQL is an experimental feature. [#28533](https://github.com/ClickHouse/ClickHouse/pull/28533) ([Azat Khuzhin](https://github.com/azat)). +* Fix `There is no subcolumn` error, while select from tables, which have `Nested` columns and scalar columns with dot in name and the same prefix as `Nested` (e.g. `n.id UInt32, n.arr1 Array(UInt64), n.arr2 Array(UInt64)`). [#28531](https://github.com/ClickHouse/ClickHouse/pull/28531) ([Anton Popov](https://github.com/CurtizJ)). +* Fix bug which can lead to error `Existing table metadata in ZooKeeper differs in sorting key expression.` after ALTER of `ReplicatedVersionedCollapsingMergeTree`. Fixes [#28515](https://github.com/ClickHouse/ClickHouse/issues/28515). [#28528](https://github.com/ClickHouse/ClickHouse/pull/28528) ([alesapin](https://github.com/alesapin)). +* Fixed possible ZooKeeper watches leak (minor issue) on background processing of distributed DDL queue. Closes [#26036](https://github.com/ClickHouse/ClickHouse/issues/26036). [#28446](https://github.com/ClickHouse/ClickHouse/pull/28446) ([tavplubix](https://github.com/tavplubix)). +* Fix missing quoting of table names in `MaterializedPostgreSQL` engine. Closes [#28316](https://github.com/ClickHouse/ClickHouse/issues/28316). [#28433](https://github.com/ClickHouse/ClickHouse/pull/28433) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix the wrong behaviour of non joined rows from nullable column. Close [#27691](https://github.com/ClickHouse/ClickHouse/issues/27691). [#28349](https://github.com/ClickHouse/ClickHouse/pull/28349) ([vdimir](https://github.com/vdimir)). +* Fix NOT-IN index optimization when not all key columns are used. This fixes [#28120](https://github.com/ClickHouse/ClickHouse/issues/28120). [#28315](https://github.com/ClickHouse/ClickHouse/pull/28315) ([Amos Bird](https://github.com/amosbird)). +* Fix intersecting parts due to new part had been replaced with an empty part. [#28310](https://github.com/ClickHouse/ClickHouse/pull/28310) ([Azat Khuzhin](https://github.com/azat)). +* Fix inconsistent result in queries with `ORDER BY` and `Merge` tables with enabled setting `optimize_read_in_order`. [#28266](https://github.com/ClickHouse/ClickHouse/pull/28266) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible read of uninitialized memory for queries with `Nullable(LowCardinality)` type and the setting `extremes` set to 1. Fixes [#28165](https://github.com/ClickHouse/ClickHouse/issues/28165). [#28205](https://github.com/ClickHouse/ClickHouse/pull/28205) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Multiple small fixes for projections. See detailed description in the PR. [#28178](https://github.com/ClickHouse/ClickHouse/pull/28178) ([Amos Bird](https://github.com/amosbird)). +* Fix extremely rare segfaults on shutdown due to incorrect order of context/config reloader shutdown. [#28088](https://github.com/ClickHouse/ClickHouse/pull/28088) ([nvartolomei](https://github.com/nvartolomei)). +* Fix handling null value with type of `Nullable(String)` in function `JSONExtract`. This fixes [#27929](https://github.com/ClickHouse/ClickHouse/issues/27929) and [#27930](https://github.com/ClickHouse/ClickHouse/issues/27930). This was introduced in https://github.com/ClickHouse/ClickHouse/pull/25452 . [#27939](https://github.com/ClickHouse/ClickHouse/pull/27939) ([Amos Bird](https://github.com/amosbird)). +* Multiple fixes for the new `clickhouse-keeper` tool. Fix a rare bug in `clickhouse-keeper` when the client can receive a watch response before request-response. [#28197](https://github.com/ClickHouse/ClickHouse/pull/28197) ([alesapin](https://github.com/alesapin)). Fix incorrect behavior in `clickhouse-keeper` when list watches (`getChildren`) triggered with `set` requests for children. [#28190](https://github.com/ClickHouse/ClickHouse/pull/28190) ([alesapin](https://github.com/alesapin)). Fix rare case when changes of `clickhouse-keeper` settings may lead to lost logs and server hung. [#28360](https://github.com/ClickHouse/ClickHouse/pull/28360) ([alesapin](https://github.com/alesapin)). Fix bug in `clickhouse-keeper` which can lead to endless logs when `rotate_logs_interval` decreased. [#28152](https://github.com/ClickHouse/ClickHouse/pull/28152) ([alesapin](https://github.com/alesapin)). + +#### Build/Testing/Packaging Improvement + +* Enable Thread Fuzzer in Stress Test. Thread Fuzzer is ClickHouse feature that allows to test more permutations of thread scheduling and discover more potential issues. This closes [#9813](https://github.com/ClickHouse/ClickHouse/issues/9813). This closes [#9814](https://github.com/ClickHouse/ClickHouse/issues/9814). This closes [#9515](https://github.com/ClickHouse/ClickHouse/issues/9515). This closes [#9516](https://github.com/ClickHouse/ClickHouse/issues/9516). [#27538](https://github.com/ClickHouse/ClickHouse/pull/27538) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add new log level `test` for testing environments. It is even more verbose than the default `trace`. [#28559](https://github.com/ClickHouse/ClickHouse/pull/28559) ([alesapin](https://github.com/alesapin)). +* Print out git status information at CMake configure stage. [#28047](https://github.com/ClickHouse/ClickHouse/pull/28047) ([Braulio Valdivielso Martínez](https://github.com/BraulioVM)). +* Temporarily switched ubuntu apt repository to mirror ru.archive.ubuntu.com as the default one (archive.ubuntu.com) is not responding from our CI. [#28016](https://github.com/ClickHouse/ClickHouse/pull/28016) ([Ilya Yatsishin](https://github.com/qoega)). + + + +### ClickHouse release v21.9, 2021-09-09 + +#### Backward Incompatible Change + +* Do not output trailing zeros in text representation of `Decimal` types. Example: `1.23` will be printed instead of `1.230000` for decimal with scale 6. This closes [#15794](https://github.com/ClickHouse/ClickHouse/issues/15794). It may introduce slight incompatibility if your applications somehow relied on the trailing zeros. Serialization in output formats can be controlled with the setting `output_format_decimal_trailing_zeros`. Implementation of `toString` and casting to String is changed unconditionally. [#27680](https://github.com/ClickHouse/ClickHouse/pull/27680) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Do not allow to apply parametric aggregate function with `-Merge` combinator to aggregate function state if state was produced by aggregate function with different parameters. For example, state of `fooState(42)(x)` cannot be finalized with `fooMerge(s)` or `fooMerge(123)(s)`, parameters must be specified explicitly like `fooMerge(42)(s)` and must be equal. It does not affect some special aggregate functions like `quantile` and `sequence*` that use parameters for finalization only. [#26847](https://github.com/ClickHouse/ClickHouse/pull/26847) ([tavplubix](https://github.com/tavplubix)). +* Under clickhouse-local, always treat local addresses with a port as remote. [#26736](https://github.com/ClickHouse/ClickHouse/pull/26736) ([Raúl Marín](https://github.com/Algunenano)). +* Fix the issue that in case of some sophisticated query with column aliases identical to the names of expressions, bad cast may happen. This fixes [#25447](https://github.com/ClickHouse/ClickHouse/issues/25447). This fixes [#26914](https://github.com/ClickHouse/ClickHouse/issues/26914). This fix may introduce backward incompatibility: if there are different expressions with identical names, exception will be thrown. It may break some rare cases when `enable_optimize_predicate_expression` is set. [#26639](https://github.com/ClickHouse/ClickHouse/pull/26639) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now, scalar subquery always returns `Nullable` result if it's type can be `Nullable`. It is needed because in case of empty subquery it's result should be `Null`. Previously, it was possible to get error about incompatible types (type deduction does not execute scalar subquery, and it could use not-nullable type). Scalar subquery with empty result which can't be converted to `Nullable` (like `Array` or `Tuple`) now throws error. Fixes [#25411](https://github.com/ClickHouse/ClickHouse/issues/25411). [#26423](https://github.com/ClickHouse/ClickHouse/pull/26423) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Introduce syntax for here documents. Example `SELECT $doc$ VALUE $doc$`. [#26671](https://github.com/ClickHouse/ClickHouse/pull/26671) ([Maksim Kita](https://github.com/kitaisreal)). This change is backward incompatible if in query there are identifiers that contain `$` [#28768](https://github.com/ClickHouse/ClickHouse/issues/28768). +* Now indices can handle Nullable types, including `isNull` and `isNotNull`. [#12433](https://github.com/ClickHouse/ClickHouse/pull/12433) and [#12455](https://github.com/ClickHouse/ClickHouse/pull/12455) ([Amos Bird](https://github.com/amosbird)) and [#27250](https://github.com/ClickHouse/ClickHouse/pull/27250) ([Azat Khuzhin](https://github.com/azat)). But this was done with on-disk format changes, and even though new server can read old data, old server cannot. Also, in case you have `MINMAX` data skipping indices, you may get `Data after mutation/merge is not byte-identical` error, since new index will have `.idx2` extension while before it was `.idx`. That said, that you should not delay updating all existing replicas, in this case, otherwise, if old replica (<21.9) will download data from new replica with 21.9+ it will not be able to apply index for downloaded part. + +#### New Feature + +* Implementation of short circuit function evaluation, closes [#12587](https://github.com/ClickHouse/ClickHouse/issues/12587). Add settings `short_circuit_function_evaluation` to configure short circuit function evaluation. [#23367](https://github.com/ClickHouse/ClickHouse/pull/23367) ([Kruglov Pavel](https://github.com/Avogar)). +* Add support for INTERSECT, EXCEPT, ANY, ALL operators. [#24757](https://github.com/ClickHouse/ClickHouse/pull/24757) ([Kirill Ershov](https://github.com/zdikov)). ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add support for encryption at the virtual file system level (data encryption at rest) using AES-CTR algorithm. [#24206](https://github.com/ClickHouse/ClickHouse/pull/24206) ([Latysheva Alexandra](https://github.com/alexelex)). ([Vitaly Baranov](https://github.com/vitlibar)) [#26733](https://github.com/ClickHouse/ClickHouse/pull/26733) [#26377](https://github.com/ClickHouse/ClickHouse/pull/26377) [#26465](https://github.com/ClickHouse/ClickHouse/pull/26465). +* Added natural language processing (NLP) functions for tokenization, stemming, lemmatizing and search in synonyms extensions. [#24997](https://github.com/ClickHouse/ClickHouse/pull/24997) ([Nikolay Degterinsky](https://github.com/evillique)). +* Added integration with S2 geometry library. [#24980](https://github.com/ClickHouse/ClickHouse/pull/24980) ([Andr0901](https://github.com/Andr0901)). ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add SQLite table engine, table function, database engine. [#24194](https://github.com/ClickHouse/ClickHouse/pull/24194) ([Arslan Gumerov](https://github.com/g-arslan)). ([Kseniia Sumarokova](https://github.com/kssenii)). +* Added support for custom query for `MySQL`, `PostgreSQL`, `ClickHouse`, `JDBC`, `Cassandra` dictionary source. Closes [#1270](https://github.com/ClickHouse/ClickHouse/issues/1270). [#26995](https://github.com/ClickHouse/ClickHouse/pull/26995) ([Maksim Kita](https://github.com/kitaisreal)). +* Add shared (replicated) storage of user, roles, row policies, quotas and settings profiles through ZooKeeper. [#27426](https://github.com/ClickHouse/ClickHouse/pull/27426) ([Kevin Michel](https://github.com/kmichel-aiven)). +* Add compression for `INTO OUTFILE` that automatically choose compression algorithm. Closes [#3473](https://github.com/ClickHouse/ClickHouse/issues/3473). [#27134](https://github.com/ClickHouse/ClickHouse/pull/27134) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Add `INSERT ... FROM INFILE` similarly to `SELECT ... INTO OUTFILE`. [#27655](https://github.com/ClickHouse/ClickHouse/pull/27655) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Added `complex_key_range_hashed` dictionary. Closes [#22029](https://github.com/ClickHouse/ClickHouse/issues/22029). [#27629](https://github.com/ClickHouse/ClickHouse/pull/27629) ([Maksim Kita](https://github.com/kitaisreal)). +* Support expressions in JOIN ON section. Close [#21868](https://github.com/ClickHouse/ClickHouse/issues/21868). [#24420](https://github.com/ClickHouse/ClickHouse/pull/24420) ([Vladimir C](https://github.com/vdimir)). +* When client connects to server, it receives information about all warnings that are already were collected by server. (It can be disabled by using option `--no-warnings`). Add `system.warnings` table to collect warnings about server configuration. [#26246](https://github.com/ClickHouse/ClickHouse/pull/26246) ([Filatenkov Artur](https://github.com/FArthur-cmd)). [#26282](https://github.com/ClickHouse/ClickHouse/pull/26282) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Allow using constant expressions from with and select in aggregate function parameters. Close [#10945](https://github.com/ClickHouse/ClickHouse/issues/10945). [#27531](https://github.com/ClickHouse/ClickHouse/pull/27531) ([abel-cheng](https://github.com/abel-cheng)). +* Add `tupleToNameValuePairs`, a function that turns a named tuple into an array of pairs. [#27505](https://github.com/ClickHouse/ClickHouse/pull/27505) ([Braulio Valdivielso Martínez](https://github.com/BraulioVM)). +* Add support for `bzip2` compression method for import/export. Closes [#22428](https://github.com/ClickHouse/ClickHouse/issues/22428). [#27377](https://github.com/ClickHouse/ClickHouse/pull/27377) ([Nikolay Degterinsky](https://github.com/evillique)). +* Added `bitmapSubsetOffsetLimit(bitmap, offset, cardinality_limit)` function. It creates a subset of bitmap limit the results to `cardinality_limit` with offset of `offset`. [#27234](https://github.com/ClickHouse/ClickHouse/pull/27234) ([DHBin](https://github.com/DHBin)). +* Add column `default_database` to `system.users`. [#27054](https://github.com/ClickHouse/ClickHouse/pull/27054) ([kevin wan](https://github.com/MaxWk)). +* Supported `cluster` macros inside table functions 'cluster' and 'clusterAllReplicas'. [#26913](https://github.com/ClickHouse/ClickHouse/pull/26913) ([polyprogrammist](https://github.com/PolyProgrammist)). +* Add new functions `currentRoles()`, `enabledRoles()`, `defaultRoles()`. [#26780](https://github.com/ClickHouse/ClickHouse/pull/26780) ([Vitaly Baranov](https://github.com/vitlibar)). +* New functions `currentProfiles()`, `enabledProfiles()`, `defaultProfiles()`. [#26714](https://github.com/ClickHouse/ClickHouse/pull/26714) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add functions that return (initial_)query_id of the current query. This closes [#23682](https://github.com/ClickHouse/ClickHouse/issues/23682). [#26410](https://github.com/ClickHouse/ClickHouse/pull/26410) ([Alexey Boykov](https://github.com/mathalex)). +* Add `REPLACE GRANT` feature. [#26384](https://github.com/ClickHouse/ClickHouse/pull/26384) ([Caspian](https://github.com/Cas-pian)). +* `EXPLAIN` query now has `EXPLAIN ESTIMATE ...` mode that will show information about read rows, marks and parts from MergeTree tables. Closes [#23941](https://github.com/ClickHouse/ClickHouse/issues/23941). [#26131](https://github.com/ClickHouse/ClickHouse/pull/26131) ([fastio](https://github.com/fastio)). +* Added `system.zookeeper_log` table. All actions of ZooKeeper client are logged into this table. Implements [#25449](https://github.com/ClickHouse/ClickHouse/issues/25449). [#26129](https://github.com/ClickHouse/ClickHouse/pull/26129) ([tavplubix](https://github.com/tavplubix)). +* Zero-copy replication for `ReplicatedMergeTree` over `HDFS` storage. [#25918](https://github.com/ClickHouse/ClickHouse/pull/25918) ([Zhichang Yu](https://github.com/yuzhichang)). +* Allow to insert Nested type as array of structs in `Arrow`, `ORC` and `Parquet` input format. [#25902](https://github.com/ClickHouse/ClickHouse/pull/25902) ([Kruglov Pavel](https://github.com/Avogar)). +* Add a new datatype `Date32` (store data as Int32), support date range same with `DateTime64` support load parquet date32 to ClickHouse `Date32` Add new function `toDate32` like `toDate`. [#25774](https://github.com/ClickHouse/ClickHouse/pull/25774) ([LiuNeng](https://github.com/liuneng1994)). +* Allow setting default database for users. [#25268](https://github.com/ClickHouse/ClickHouse/issues/25268). [#25687](https://github.com/ClickHouse/ClickHouse/pull/25687) ([kevin wan](https://github.com/MaxWk)). +* Add an optional parameter to `MongoDB` engine to accept connection string options and support SSL connection. Closes [#21189](https://github.com/ClickHouse/ClickHouse/issues/21189). Closes [#21041](https://github.com/ClickHouse/ClickHouse/issues/21041). [#22045](https://github.com/ClickHouse/ClickHouse/pull/22045) ([Omar Bazaraa](https://github.com/OmarBazaraa)). + +#### Experimental Feature + +* Added a compression codec `AES_128_GCM_SIV` which encrypts columns instead of compressing them. [#19896](https://github.com/ClickHouse/ClickHouse/pull/19896) ([PHO](https://github.com/depressed-pho)). Will be rewritten, do not use. +* Rename `MaterializeMySQL` to `MaterializedMySQL`. [#26822](https://github.com/ClickHouse/ClickHouse/pull/26822) ([tavplubix](https://github.com/tavplubix)). + +#### Performance Improvement + +* Improve the performance of fast queries when `max_execution_time = 0` by reducing the number of `clock_gettime` system calls. [#27325](https://github.com/ClickHouse/ClickHouse/pull/27325) ([filimonov](https://github.com/filimonov)). +* Specialize date time related comparison to achieve better performance. This fixes [#27083](https://github.com/ClickHouse/ClickHouse/issues/27083) . [#27122](https://github.com/ClickHouse/ClickHouse/pull/27122) ([Amos Bird](https://github.com/amosbird)). +* Share file descriptors in concurrent reads of the same files. There is no noticeable performance difference on Linux. But the number of opened files will be significantly (10..100 times) lower on typical servers and it makes operations easier. See [#26214](https://github.com/ClickHouse/ClickHouse/issues/26214). [#26768](https://github.com/ClickHouse/ClickHouse/pull/26768) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve latency of short queries, that require reading from tables with large number of columns. [#26371](https://github.com/ClickHouse/ClickHouse/pull/26371) ([Anton Popov](https://github.com/CurtizJ)). +* Don't build sets for indices when analyzing a query. [#26365](https://github.com/ClickHouse/ClickHouse/pull/26365) ([Raúl Marín](https://github.com/Algunenano)). +* Vectorize the SUM of Nullable integer types with native representation ([David Manzanares](https://github.com/davidmanzanares), [Raúl Marín](https://github.com/Algunenano)). [#26248](https://github.com/ClickHouse/ClickHouse/pull/26248) ([Raúl Marín](https://github.com/Algunenano)). +* Compile expressions involving columns with `Enum` types. [#26237](https://github.com/ClickHouse/ClickHouse/pull/26237) ([Maksim Kita](https://github.com/kitaisreal)). +* Compile aggregate functions `groupBitOr`, `groupBitAnd`, `groupBitXor`. [#26161](https://github.com/ClickHouse/ClickHouse/pull/26161) ([Maksim Kita](https://github.com/kitaisreal)). +* Improved memory usage with better block size prediction when reading empty DEFAULT columns. Closes [#17317](https://github.com/ClickHouse/ClickHouse/issues/17317). [#25917](https://github.com/ClickHouse/ClickHouse/pull/25917) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Reduce memory usage and number of read rows in queries with `ORDER BY primary_key`. [#25721](https://github.com/ClickHouse/ClickHouse/pull/25721) ([Anton Popov](https://github.com/CurtizJ)). +* Enable `distributed_push_down_limit` by default. [#27104](https://github.com/ClickHouse/ClickHouse/pull/27104) ([Azat Khuzhin](https://github.com/azat)). +* Make `toTimeZone` monotonicity when timeZone is a constant value to support partition puring when use sql like:. [#26261](https://github.com/ClickHouse/ClickHouse/pull/26261) ([huangzhaowei](https://github.com/SaintBacchus)). + +#### Improvement + +* Mark window functions as ready for general use. Remove the `allow_experimental_window_functions` setting. [#27184](https://github.com/ClickHouse/ClickHouse/pull/27184) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Improve compatibility with non-whole-minute timezone offsets. [#27080](https://github.com/ClickHouse/ClickHouse/pull/27080) ([Raúl Marín](https://github.com/Algunenano)). +* If file descriptor in `File` table is regular file - allow to read multiple times from it. It allows `clickhouse-local` to read multiple times from stdin (with multiple SELECT queries or subqueries) if stdin is a regular file like `clickhouse-local --query "SELECT * FROM table UNION ALL SELECT * FROM table" ... < file`. This closes [#11124](https://github.com/ClickHouse/ClickHouse/issues/11124). Co-authored with ([alexey-milovidov](https://github.com/alexey-milovidov)). [#25960](https://github.com/ClickHouse/ClickHouse/pull/25960) ([BoloniniD](https://github.com/BoloniniD)). +* Remove duplicate index analysis and avoid possible invalid limit checks during projection analysis. [#27742](https://github.com/ClickHouse/ClickHouse/pull/27742) ([Amos Bird](https://github.com/amosbird)). +* Enable query parameters to be passed in the body of HTTP requests. [#27706](https://github.com/ClickHouse/ClickHouse/pull/27706) ([Hermano Lustosa](https://github.com/hllustosa)). +* Disallow `arrayJoin` on partition expressions. [#27648](https://github.com/ClickHouse/ClickHouse/pull/27648) ([Raúl Marín](https://github.com/Algunenano)). +* Log client IP address if authentication fails. [#27514](https://github.com/ClickHouse/ClickHouse/pull/27514) ([Misko Lee](https://github.com/imiskolee)). +* Use bytes instead of strings for binary data in the GRPC protocol. [#27431](https://github.com/ClickHouse/ClickHouse/pull/27431) ([Vitaly Baranov](https://github.com/vitlibar)). +* Send response with error message if HTTP port is not set and user tries to send HTTP request to TCP port. [#27385](https://github.com/ClickHouse/ClickHouse/pull/27385) ([Braulio Valdivielso Martínez](https://github.com/BraulioVM)). +* Add `_CAST` function for internal usage, which will not preserve type nullability, but non-internal cast will preserve according to setting `cast_keep_nullable`. Closes [#12636](https://github.com/ClickHouse/ClickHouse/issues/12636). [#27382](https://github.com/ClickHouse/ClickHouse/pull/27382) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add setting `log_formatted_queries` to log additional formatted query into `system.query_log`. It's useful for normalized query analysis because functions like `normalizeQuery` and `normalizeQueryKeepNames` don't parse/format queries in order to achieve better performance. [#27380](https://github.com/ClickHouse/ClickHouse/pull/27380) ([Amos Bird](https://github.com/amosbird)). +* Add two settings `max_hyperscan_regexp_length` and `max_hyperscan_regexp_total_length` to prevent huge regexp being used in hyperscan related functions, such as `multiMatchAny`. [#27378](https://github.com/ClickHouse/ClickHouse/pull/27378) ([Amos Bird](https://github.com/amosbird)). +* Memory consumed by bitmap aggregate functions now is taken into account for memory limits. This closes [#26555](https://github.com/ClickHouse/ClickHouse/issues/26555). [#27252](https://github.com/ClickHouse/ClickHouse/pull/27252) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add 10 seconds cache for S3 proxy resolver. [#27216](https://github.com/ClickHouse/ClickHouse/pull/27216) ([ianton-ru](https://github.com/ianton-ru)). +* Split global mutex into individual regexp construction. This helps avoid huge regexp construction blocking other related threads. [#27211](https://github.com/ClickHouse/ClickHouse/pull/27211) ([Amos Bird](https://github.com/amosbird)). +* Support schema for PostgreSQL database engine. Closes [#27166](https://github.com/ClickHouse/ClickHouse/issues/27166). [#27198](https://github.com/ClickHouse/ClickHouse/pull/27198) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Track memory usage in clickhouse-client. [#27191](https://github.com/ClickHouse/ClickHouse/pull/27191) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Try recording `query_kind` in `system.query_log` even when query fails to start. [#27182](https://github.com/ClickHouse/ClickHouse/pull/27182) ([Amos Bird](https://github.com/amosbird)). +* Added columns `replica_is_active` that maps replica name to is replica active status to table `system.replicas`. Closes [#27138](https://github.com/ClickHouse/ClickHouse/issues/27138). [#27180](https://github.com/ClickHouse/ClickHouse/pull/27180) ([Maksim Kita](https://github.com/kitaisreal)). +* Allow to pass query settings via server URI in Web UI. [#27177](https://github.com/ClickHouse/ClickHouse/pull/27177) ([kolsys](https://github.com/kolsys)). +* Add a new metric called `MaxPushedDDLEntryID` which is the maximum ddl entry id that current node push to zookeeper. [#27174](https://github.com/ClickHouse/ClickHouse/pull/27174) ([Fuwang Hu](https://github.com/fuwhu)). +* Improved the existence condition judgment and empty string node judgment when `clickhouse-keeper` creates znode. [#27125](https://github.com/ClickHouse/ClickHouse/pull/27125) ([å°è·¯](https://github.com/nicelulu)). +* Merge JOIN correctly handles empty set in the right. [#27078](https://github.com/ClickHouse/ClickHouse/pull/27078) ([Vladimir C](https://github.com/vdimir)). +* Now functions can be shard-level constants, which means if it's executed in the context of some distributed table, it generates a normal column, otherwise it produces a constant value. Notable functions are: `hostName()`, `tcpPort()`, `version()`, `buildId()`, `uptime()`, etc. [#27020](https://github.com/ClickHouse/ClickHouse/pull/27020) ([Amos Bird](https://github.com/amosbird)). +* Updated `extractAllGroupsHorizontal` - upper limit on the number of matches per row can be set via optional third argument. [#26961](https://github.com/ClickHouse/ClickHouse/pull/26961) ([Vasily Nemkov](https://github.com/Enmk)). +* Expose `RocksDB` statistics via system.rocksdb table. Read rocksdb options from ClickHouse config (`rocksdb...` keys). NOTE: ClickHouse does not rely on RocksDB, it is just one of the additional integration storage engines. [#26821](https://github.com/ClickHouse/ClickHouse/pull/26821) ([Azat Khuzhin](https://github.com/azat)). +* Less verbose internal RocksDB logs. NOTE: ClickHouse does not rely on RocksDB, it is just one of the additional integration storage engines. This closes [#26252](https://github.com/ClickHouse/ClickHouse/issues/26252). [#26789](https://github.com/ClickHouse/ClickHouse/pull/26789) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Changing default roles affects new sessions only. [#26759](https://github.com/ClickHouse/ClickHouse/pull/26759) ([Vitaly Baranov](https://github.com/vitlibar)). +* Watchdog is disabled in docker by default. Fix for not handling ctrl+c. [#26757](https://github.com/ClickHouse/ClickHouse/pull/26757) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* `SET PROFILE` now applies constraints too if they're set for a passed profile. [#26730](https://github.com/ClickHouse/ClickHouse/pull/26730) ([Vitaly Baranov](https://github.com/vitlibar)). +* Improve handling of `KILL QUERY` requests. [#26675](https://github.com/ClickHouse/ClickHouse/pull/26675) ([Raúl Marín](https://github.com/Algunenano)). +* `mapPopulatesSeries` function supports `Map` type. [#26663](https://github.com/ClickHouse/ClickHouse/pull/26663) ([Ildus Kurbangaliev](https://github.com/ildus)). +* Fix excessive (x2) connect attempts with `skip_unavailable_shards`. [#26658](https://github.com/ClickHouse/ClickHouse/pull/26658) ([Azat Khuzhin](https://github.com/azat)). +* Avoid hanging `clickhouse-benchmark` if connection fails (i.e. on EMFILE). [#26656](https://github.com/ClickHouse/ClickHouse/pull/26656) ([Azat Khuzhin](https://github.com/azat)). +* Allow more threads to be used by the Kafka engine. [#26642](https://github.com/ClickHouse/ClickHouse/pull/26642) ([feihengye](https://github.com/feihengye)). +* Add round-robin support for `clickhouse-benchmark` (it does not differ from the regular multi host/port run except for statistics report). [#26607](https://github.com/ClickHouse/ClickHouse/pull/26607) ([Azat Khuzhin](https://github.com/azat)). +* Executable dictionaries (`executable`, `executable_pool`) enable creation with DDL query using `clickhouse-local`. Closes [#22355](https://github.com/ClickHouse/ClickHouse/issues/22355). [#26510](https://github.com/ClickHouse/ClickHouse/pull/26510) ([Maksim Kita](https://github.com/kitaisreal)). +* Set client query kind for `mysql` and `postgresql` compatibility protocol handlers. [#26498](https://github.com/ClickHouse/ClickHouse/pull/26498) ([anneji-dev](https://github.com/anneji-dev)). +* Apply `LIMIT` on the shards for queries like `SELECT * FROM dist ORDER BY key LIMIT 10` w/ `distributed_push_down_limit=1`. Avoid running `Distinct`/`LIMIT BY` steps for queries like `SELECT DISTINCT shading_key FROM dist ORDER BY key`. Now `distributed_push_down_limit` is respected by `optimize_distributed_group_by_sharding_key` optimization. [#26466](https://github.com/ClickHouse/ClickHouse/pull/26466) ([Azat Khuzhin](https://github.com/azat)). +* Updated protobuf to 3.17.3. Changelogs are available on https://github.com/protocolbuffers/protobuf/releases. [#26424](https://github.com/ClickHouse/ClickHouse/pull/26424) ([Ilya Yatsishin](https://github.com/qoega)). +* Enable `use_hedged_requests` setting that allows to mitigate tail latencies on large clusters. [#26380](https://github.com/ClickHouse/ClickHouse/pull/26380) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve behaviour with non-existing host in user allowed host list. [#26368](https://github.com/ClickHouse/ClickHouse/pull/26368) ([ianton-ru](https://github.com/ianton-ru)). +* Add ability to set `Distributed` directory monitor settings via CREATE TABLE (i.e. `CREATE TABLE dist (key Int) Engine=Distributed(cluster, db, table) SETTINGS monitor_batch_inserts=1` and similar). [#26336](https://github.com/ClickHouse/ClickHouse/pull/26336) ([Azat Khuzhin](https://github.com/azat)). +* Save server address in history URLs in web UI if it differs from the origin of web UI. This closes [#26044](https://github.com/ClickHouse/ClickHouse/issues/26044). [#26322](https://github.com/ClickHouse/ClickHouse/pull/26322) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add events to profile calls to `sleep` / `sleepEachRow`. [#26320](https://github.com/ClickHouse/ClickHouse/pull/26320) ([Raúl Marín](https://github.com/Algunenano)). +* Allow to reuse connections of shards among different clusters. It also avoids creating new connections when using `cluster` table function. [#26318](https://github.com/ClickHouse/ClickHouse/pull/26318) ([Amos Bird](https://github.com/amosbird)). +* Control the execution period of clear old temporary directories by parameter with default value. [#26212](https://github.com/ClickHouse/ClickHouse/issues/26212). [#26313](https://github.com/ClickHouse/ClickHouse/pull/26313) ([fastio](https://github.com/fastio)). +* Add a setting `function_range_max_elements_in_block` to tune the safety threshold for data volume generated by function `range`. This closes [#26303](https://github.com/ClickHouse/ClickHouse/issues/26303). [#26305](https://github.com/ClickHouse/ClickHouse/pull/26305) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Check hash function at table creation, not at sampling. Add settings for MergeTree, if someone create a table with incorrect sampling column but sampling never be used, disable this settings for starting the server without exception. [#26256](https://github.com/ClickHouse/ClickHouse/pull/26256) ([zhaoyu](https://github.com/zxc111)). +* Added `output_format_avro_string_column_pattern` setting to put specified String columns to Avro as string instead of default bytes. Implements [#22414](https://github.com/ClickHouse/ClickHouse/issues/22414). [#26245](https://github.com/ClickHouse/ClickHouse/pull/26245) ([Ilya Golshtein](https://github.com/ilejn)). +* Add information about column sizes in `system.columns` table for `Log` and `TinyLog` tables. This closes [#9001](https://github.com/ClickHouse/ClickHouse/issues/9001). [#26241](https://github.com/ClickHouse/ClickHouse/pull/26241) ([Nikolay Degterinsky](https://github.com/evillique)). +* Don't throw exception when querying `system.detached_parts` table if there is custom disk configuration and `detached` directory does not exist on some disks. This closes [#26078](https://github.com/ClickHouse/ClickHouse/issues/26078). [#26236](https://github.com/ClickHouse/ClickHouse/pull/26236) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Check for non-deterministic functions in keys, including constant expressions like `now()`, `today()`. This closes [#25875](https://github.com/ClickHouse/ClickHouse/issues/25875). This closes [#11333](https://github.com/ClickHouse/ClickHouse/issues/11333). [#26235](https://github.com/ClickHouse/ClickHouse/pull/26235) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* convert timestamp and timestamptz data types to `DateTime64` in PostgreSQL table engine. [#26234](https://github.com/ClickHouse/ClickHouse/pull/26234) ([jasine](https://github.com/jasine)). +* Apply aggressive IN index analysis for projections so that better projection candidate can be selected. [#26218](https://github.com/ClickHouse/ClickHouse/pull/26218) ([Amos Bird](https://github.com/amosbird)). +* Remove GLOBAL keyword for IN when scalar function is passed. In previous versions, if user specified `GLOBAL IN f(x)` exception was thrown. [#26217](https://github.com/ClickHouse/ClickHouse/pull/26217) ([Amos Bird](https://github.com/amosbird)). +* Add error id (like `BAD_ARGUMENTS`) to exception messages. This closes [#25862](https://github.com/ClickHouse/ClickHouse/issues/25862). [#26172](https://github.com/ClickHouse/ClickHouse/pull/26172) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix incorrect output with --progress option for clickhouse-local. Progress bar will be cleared once it gets to 100% - same as it is done for clickhouse-client. Closes [#17484](https://github.com/ClickHouse/ClickHouse/issues/17484). [#26128](https://github.com/ClickHouse/ClickHouse/pull/26128) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add `merge_selecting_sleep_ms` setting. [#26120](https://github.com/ClickHouse/ClickHouse/pull/26120) ([lthaooo](https://github.com/lthaooo)). +* Remove complicated usage of Linux AIO with one block readahead and replace it with plain simple synchronous IO with O_DIRECT. In previous versions, the setting `min_bytes_to_use_direct_io` may not work correctly if `max_threads` is greater than one. Reading with direct IO (that is disabled by default for queries and enabled by default for large merges) will work in less efficient way. This closes [#25997](https://github.com/ClickHouse/ClickHouse/issues/25997). [#26003](https://github.com/ClickHouse/ClickHouse/pull/26003) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Flush `Distributed` table on `REPLACE TABLE` query. Resolves [#24566](https://github.com/ClickHouse/ClickHouse/issues/24566) - Do not replace (or create) table on `[CREATE OR] REPLACE TABLE ... AS SELECT` query if insertion into new table fails. Resolves [#23175](https://github.com/ClickHouse/ClickHouse/issues/23175). [#25895](https://github.com/ClickHouse/ClickHouse/pull/25895) ([tavplubix](https://github.com/tavplubix)). +* Add `views` column to system.query_log containing the names of the (materialized or live) views executed by the query. Adds a new log table (`system.query_views_log`) that contains information about each view executed during a query. Modifies view execution: When an exception is thrown while executing a view, any view that has already startedwill continue running until it finishes. This used to be the behaviour under parallel_view_processing=true and now it's always the same behaviour. - Dependent views now report reading progress to the context. [#25714](https://github.com/ClickHouse/ClickHouse/pull/25714) ([Raúl Marín](https://github.com/Algunenano)). +* Do connection draining asynchonously upon finishing executing distributed queries. A new server setting is added `max_threads_for_connection_collector` which specifies the number of workers to recycle connections in background. If the pool is full, connection will be drained synchronously but a bit different than before: It's drained after we send EOS to client, query will succeed immediately after receiving enough data, and any exception will be logged instead of throwing to the client. Added setting `drain_timeout` (3 seconds by default). Connection draining will disconnect upon timeout. [#25674](https://github.com/ClickHouse/ClickHouse/pull/25674) ([Amos Bird](https://github.com/amosbird)). +* Support for multiple includes in configuration. It is possible to include users configuration, remote servers configuration from multiple sources. Simply place `` element with `from_zk`, `from_env` or `incl` attribute and it will be replaced with the substitution. [#24404](https://github.com/ClickHouse/ClickHouse/pull/24404) ([nvartolomei](https://github.com/nvartolomei)). +* Fix multiple block insertion into distributed table with `insert_distributed_one_random_shard = 1`. This is a marginal feature. Mark as improvement. [#23140](https://github.com/ClickHouse/ClickHouse/pull/23140) ([Amos Bird](https://github.com/amosbird)). +* Support `LowCardinality` and `FixedString` keys/values for `Map` type. [#21543](https://github.com/ClickHouse/ClickHouse/pull/21543) ([hexiaoting](https://github.com/hexiaoting)). +* Enable reloading of local disk config. [#19526](https://github.com/ClickHouse/ClickHouse/pull/19526) ([taiyang-li](https://github.com/taiyang-li)). + +#### Bug Fix + +* Fix a couple of bugs that may cause replicas to diverge. [#27808](https://github.com/ClickHouse/ClickHouse/pull/27808) ([tavplubix](https://github.com/tavplubix)). +* Fix a rare bug in `DROP PART` which can lead to the error `Unexpected merged part intersects drop range`. [#27807](https://github.com/ClickHouse/ClickHouse/pull/27807) ([alesapin](https://github.com/alesapin)). +* Prevent crashes for some formats when NULL (tombstone) message was coming from Kafka. Closes [#19255](https://github.com/ClickHouse/ClickHouse/issues/19255). [#27794](https://github.com/ClickHouse/ClickHouse/pull/27794) ([filimonov](https://github.com/filimonov)). +* Fix column filtering with union distinct in subquery. Closes [#27578](https://github.com/ClickHouse/ClickHouse/issues/27578). [#27689](https://github.com/ClickHouse/ClickHouse/pull/27689) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix bad type cast when functions like `arrayHas` are applied to arrays of LowCardinality of Nullable of different non-numeric types like `DateTime` and `DateTime64`. In previous versions bad cast occurs. In new version it will lead to exception. This closes [#26330](https://github.com/ClickHouse/ClickHouse/issues/26330). [#27682](https://github.com/ClickHouse/ClickHouse/pull/27682) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix postgresql table function resulting in non-closing connections. Closes [#26088](https://github.com/ClickHouse/ClickHouse/issues/26088). [#27662](https://github.com/ClickHouse/ClickHouse/pull/27662) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fixed another case of `Unexpected merged part ... intersecting drop range ...` error. [#27656](https://github.com/ClickHouse/ClickHouse/pull/27656) ([tavplubix](https://github.com/tavplubix)). +* Fix an error with aliased column in `Distributed` table. [#27652](https://github.com/ClickHouse/ClickHouse/pull/27652) ([Vladimir C](https://github.com/vdimir)). +* After setting `max_memory_usage*` to non-zero value it was not possible to reset it back to 0 (unlimited). It's fixed. [#27638](https://github.com/ClickHouse/ClickHouse/pull/27638) ([tavplubix](https://github.com/tavplubix)). +* Fixed underflow of the time value when constructing it from components. Closes [#27193](https://github.com/ClickHouse/ClickHouse/issues/27193). [#27605](https://github.com/ClickHouse/ClickHouse/pull/27605) ([Vasily Nemkov](https://github.com/Enmk)). +* Fix crash during projection materialization when some parts contain missing columns. This fixes [#27512](https://github.com/ClickHouse/ClickHouse/issues/27512). [#27528](https://github.com/ClickHouse/ClickHouse/pull/27528) ([Amos Bird](https://github.com/amosbird)). +* fix metric `BackgroundMessageBrokerSchedulePoolTask`, maybe mistyped. [#27452](https://github.com/ClickHouse/ClickHouse/pull/27452) ([Ben](https://github.com/benbiti)). +* Fix distributed queries with zero shards and aggregation. [#27427](https://github.com/ClickHouse/ClickHouse/pull/27427) ([Azat Khuzhin](https://github.com/azat)). +* Compatibility when `/proc/meminfo` does not contain KB suffix. [#27361](https://github.com/ClickHouse/ClickHouse/pull/27361) ([Mike Kot](https://github.com/myrrc)). +* Fix incorrect result for query with row-level security, PREWHERE and LowCardinality filter. Fixes [#27179](https://github.com/ClickHouse/ClickHouse/issues/27179). [#27329](https://github.com/ClickHouse/ClickHouse/pull/27329) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed incorrect validation of partition id for MergeTree tables that created with old syntax. [#27328](https://github.com/ClickHouse/ClickHouse/pull/27328) ([tavplubix](https://github.com/tavplubix)). +* Fix MySQL protocol when using parallel formats (CSV / TSV). [#27326](https://github.com/ClickHouse/ClickHouse/pull/27326) ([Raúl Marín](https://github.com/Algunenano)). +* Fix `Cannot find column` error for queries with sampling. Was introduced in [#24574](https://github.com/ClickHouse/ClickHouse/issues/24574). Fixes [#26522](https://github.com/ClickHouse/ClickHouse/issues/26522). [#27301](https://github.com/ClickHouse/ClickHouse/pull/27301) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix errors like `Expected ColumnLowCardinality, gotUInt8` or `Bad cast from type DB::ColumnVector to DB::ColumnLowCardinality` for some queries with `LowCardinality` in `PREWHERE`. And more importantly, fix the lack of whitespace in the error message. Fixes [#23515](https://github.com/ClickHouse/ClickHouse/issues/23515). [#27298](https://github.com/ClickHouse/ClickHouse/pull/27298) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix `distributed_group_by_no_merge = 2` with `distributed_push_down_limit = 1` or `optimize_distributed_group_by_sharding_key = 1` with `LIMIT BY` and `LIMIT OFFSET`. [#27249](https://github.com/ClickHouse/ClickHouse/pull/27249) ([Azat Khuzhin](https://github.com/azat)). These are obscure combination of settings that no one is using. +* Fix mutation stuck on invalid partitions in non-replicated MergeTree. [#27248](https://github.com/ClickHouse/ClickHouse/pull/27248) ([Azat Khuzhin](https://github.com/azat)). +* In case of ambiguity, lambda functions prefer its arguments to other aliases or identifiers. [#27235](https://github.com/ClickHouse/ClickHouse/pull/27235) ([Raúl Marín](https://github.com/Algunenano)). +* Fix column structure in merge join, close [#27091](https://github.com/ClickHouse/ClickHouse/issues/27091). [#27217](https://github.com/ClickHouse/ClickHouse/pull/27217) ([Vladimir C](https://github.com/vdimir)). +* In rare cases `system.detached_parts` table might contain incorrect information for some parts, it's fixed. Fixes [#27114](https://github.com/ClickHouse/ClickHouse/issues/27114). [#27183](https://github.com/ClickHouse/ClickHouse/pull/27183) ([tavplubix](https://github.com/tavplubix)). +* Fix uninitialized memory in functions `multiSearch*` with empty array, close [#27169](https://github.com/ClickHouse/ClickHouse/issues/27169). [#27181](https://github.com/ClickHouse/ClickHouse/pull/27181) ([Vladimir C](https://github.com/vdimir)). +* Fix synchronization in GRPCServer. This PR fixes [#27024](https://github.com/ClickHouse/ClickHouse/issues/27024). [#27064](https://github.com/ClickHouse/ClickHouse/pull/27064) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed `cache`, `complex_key_cache`, `ssd_cache`, `complex_key_ssd_cache` configuration parsing. Options `allow_read_expired_keys`, `max_update_queue_size`, `update_queue_push_timeout_milliseconds`, `query_wait_timeout_milliseconds` were not parsed for dictionaries with non `cache` type. [#27032](https://github.com/ClickHouse/ClickHouse/pull/27032) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix possible mutation stack due to race with DROP_RANGE. [#27002](https://github.com/ClickHouse/ClickHouse/pull/27002) ([Azat Khuzhin](https://github.com/azat)). +* Now partition ID in queries like `ALTER TABLE ... PARTITION ID xxx` validates for correctness. Fixes [#25718](https://github.com/ClickHouse/ClickHouse/issues/25718). [#26963](https://github.com/ClickHouse/ClickHouse/pull/26963) ([alesapin](https://github.com/alesapin)). +* Fix "Unknown column name" error with multiple JOINs in some cases, close [#26899](https://github.com/ClickHouse/ClickHouse/issues/26899). [#26957](https://github.com/ClickHouse/ClickHouse/pull/26957) ([Vladimir C](https://github.com/vdimir)). +* Fix reading of custom TLDs (stops processing with lower buffer or bigger file). [#26948](https://github.com/ClickHouse/ClickHouse/pull/26948) ([Azat Khuzhin](https://github.com/azat)). +* Fix error `Missing columns: 'xxx'` when `DEFAULT` column references other non materialized column without `DEFAULT` expression. Fixes [#26591](https://github.com/ClickHouse/ClickHouse/issues/26591). [#26900](https://github.com/ClickHouse/ClickHouse/pull/26900) ([alesapin](https://github.com/alesapin)). +* Fix loading of dictionary keys in `library-bridge` for `library` dictionary source. [#26834](https://github.com/ClickHouse/ClickHouse/pull/26834) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Aggregate function parameters might be lost when applying some combinators causing exceptions like `Conversion from AggregateFunction(topKArray, Array(String)) to AggregateFunction(topKArray(10), Array(String)) is not supported`. It's fixed. Fixes [#26196](https://github.com/ClickHouse/ClickHouse/issues/26196) and [#26433](https://github.com/ClickHouse/ClickHouse/issues/26433). [#26814](https://github.com/ClickHouse/ClickHouse/pull/26814) ([tavplubix](https://github.com/tavplubix)). +* Add `event_time_microseconds` value for `REMOVE_PART` in `system.part_log`. In previous versions is was not set. [#26720](https://github.com/ClickHouse/ClickHouse/pull/26720) ([Azat Khuzhin](https://github.com/azat)). +* Do not remove data on ReplicatedMergeTree table shutdown to avoid creating data to metadata inconsistency. [#26716](https://github.com/ClickHouse/ClickHouse/pull/26716) ([nvartolomei](https://github.com/nvartolomei)). +* Sometimes `SET ROLE` could work incorrectly, this PR fixes that. [#26707](https://github.com/ClickHouse/ClickHouse/pull/26707) ([Vitaly Baranov](https://github.com/vitlibar)). +* Some fixes for parallel formatting (https://github.com/ClickHouse/ClickHouse/issues/26694). [#26703](https://github.com/ClickHouse/ClickHouse/pull/26703) ([Raúl Marín](https://github.com/Algunenano)). +* Fix potential nullptr dereference in window functions. This fixes [#25276](https://github.com/ClickHouse/ClickHouse/issues/25276). [#26668](https://github.com/ClickHouse/ClickHouse/pull/26668) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fix clickhouse-client history file conversion (when upgrading from the format of 3 years old version of clickhouse-client) if file is empty. [#26589](https://github.com/ClickHouse/ClickHouse/pull/26589) ([Azat Khuzhin](https://github.com/azat)). +* Fix incorrect function names of groupBitmapAnd/Or/Xor (can be displayed in some occasions). This fixes. [#26557](https://github.com/ClickHouse/ClickHouse/pull/26557) ([Amos Bird](https://github.com/amosbird)). +* Update `chown` cmd check in clickhouse-server docker entrypoint. It fixes the bug that cluster pod restart failed (or timeout) on kubernetes. [#26545](https://github.com/ClickHouse/ClickHouse/pull/26545) ([Ky Li](https://github.com/Kylinrix)). +* Fix crash in `RabbitMQ` shutdown in case `RabbitMQ` setup was not started. Closes [#26504](https://github.com/ClickHouse/ClickHouse/issues/26504). [#26529](https://github.com/ClickHouse/ClickHouse/pull/26529) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix issues with `CREATE DICTIONARY` query if dictionary name or database name was quoted. Closes [#26491](https://github.com/ClickHouse/ClickHouse/issues/26491). [#26508](https://github.com/ClickHouse/ClickHouse/pull/26508) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix broken column name resolution after rewriting column aliases. This fixes [#26432](https://github.com/ClickHouse/ClickHouse/issues/26432). [#26475](https://github.com/ClickHouse/ClickHouse/pull/26475) ([Amos Bird](https://github.com/amosbird)). +* Fix some fuzzed msan crash. Fixes [#22517](https://github.com/ClickHouse/ClickHouse/issues/22517). [#26428](https://github.com/ClickHouse/ClickHouse/pull/26428) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix infinite non joined block stream in `partial_merge_join` close [#26325](https://github.com/ClickHouse/ClickHouse/issues/26325). [#26374](https://github.com/ClickHouse/ClickHouse/pull/26374) ([Vladimir C](https://github.com/vdimir)). +* Fix possible crash when login as dropped user. This PR fixes [#26073](https://github.com/ClickHouse/ClickHouse/issues/26073). [#26363](https://github.com/ClickHouse/ClickHouse/pull/26363) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix `optimize_distributed_group_by_sharding_key` for multiple columns (leads to incorrect result w/ `optimize_skip_unused_shards=1`/`allow_nondeterministic_optimize_skip_unused_shards=1` and multiple columns in sharding key expression). [#26353](https://github.com/ClickHouse/ClickHouse/pull/26353) ([Azat Khuzhin](https://github.com/azat)). +* Fixed rare bug in lost replica recovery that may cause replicas to diverge. [#26321](https://github.com/ClickHouse/ClickHouse/pull/26321) ([tavplubix](https://github.com/tavplubix)). +* Fix zstd decompression (for import/export in zstd framing format that is unrelated to tables data) in case there are escape sequences at the end of internal buffer. Closes [#26013](https://github.com/ClickHouse/ClickHouse/issues/26013). [#26314](https://github.com/ClickHouse/ClickHouse/pull/26314) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix logical error on join with totals, close [#26017](https://github.com/ClickHouse/ClickHouse/issues/26017). [#26250](https://github.com/ClickHouse/ClickHouse/pull/26250) ([Vladimir C](https://github.com/vdimir)). +* Remove excessive newline in `thread_name` column in `system.stack_trace` table. This fixes [#24124](https://github.com/ClickHouse/ClickHouse/issues/24124). [#26210](https://github.com/ClickHouse/ClickHouse/pull/26210) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix potential crash if more than one `untuple` expression is used. [#26179](https://github.com/ClickHouse/ClickHouse/pull/26179) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Don't throw exception in `toString` for Nullable Enum if Enum does not have a value for zero, close [#25806](https://github.com/ClickHouse/ClickHouse/issues/25806). [#26123](https://github.com/ClickHouse/ClickHouse/pull/26123) ([Vladimir C](https://github.com/vdimir)). +* Fixed incorrect `sequence_id` in MySQL protocol packets that ClickHouse sends on exception during query execution. It might cause MySQL client to reset connection to ClickHouse server. Fixes [#21184](https://github.com/ClickHouse/ClickHouse/issues/21184). [#26051](https://github.com/ClickHouse/ClickHouse/pull/26051) ([tavplubix](https://github.com/tavplubix)). +* Fix for the case that `cutToFirstSignificantSubdomainCustom()`/`cutToFirstSignificantSubdomainCustomWithWWW()`/`firstSignificantSubdomainCustom()` returns incorrect type for consts, and hence `optimize_skip_unused_shards` does not work:. [#26041](https://github.com/ClickHouse/ClickHouse/pull/26041) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible mismatched header when using normal projection with prewhere. This fixes [#26020](https://github.com/ClickHouse/ClickHouse/issues/26020). [#26038](https://github.com/ClickHouse/ClickHouse/pull/26038) ([Amos Bird](https://github.com/amosbird)). +* Fix sharding_key from column w/o function for remote() (before `select * from remote('127.1', system.one, dummy)` leads to `Unknown column: dummy, there are only columns .` error). [#25824](https://github.com/ClickHouse/ClickHouse/pull/25824) ([Azat Khuzhin](https://github.com/azat)). +* Fixed `Not found column ...` and `Missing column ...` errors when selecting from `MaterializeMySQL`. Fixes [#23708](https://github.com/ClickHouse/ClickHouse/issues/23708), [#24830](https://github.com/ClickHouse/ClickHouse/issues/24830), [#25794](https://github.com/ClickHouse/ClickHouse/issues/25794). [#25822](https://github.com/ClickHouse/ClickHouse/pull/25822) ([tavplubix](https://github.com/tavplubix)). +* Fix `optimize_skip_unused_shards_rewrite_in` for non-UInt64 types (may select incorrect shards eventually or throw `Cannot infer type of an empty tuple` or `Function tuple requires at least one argument`). [#25798](https://github.com/ClickHouse/ClickHouse/pull/25798) ([Azat Khuzhin](https://github.com/azat)). + +#### Build/Testing/Packaging Improvement + +* Now we ran stateful and stateless tests in random timezones. Fixes [#12439](https://github.com/ClickHouse/ClickHouse/issues/12439). Reading String as DateTime and writing DateTime as String in Protobuf format now respect timezone. Reading UInt16 as DateTime in Arrow and Parquet formats now treat it as Date and then converts to DateTime with respect to DateTime's timezone, because Date is serialized in Arrow and Parquet as UInt16. GraphiteMergeTree now respect time zone for rounding of times. Fixes [#5098](https://github.com/ClickHouse/ClickHouse/issues/5098). Author: @alexey-milovidov. [#15408](https://github.com/ClickHouse/ClickHouse/pull/15408) ([alesapin](https://github.com/alesapin)). +* `clickhouse-test` supports SQL tests with [Jinja2](https://jinja.palletsprojects.com/en/3.0.x/templates/#synopsis) templates. [#26579](https://github.com/ClickHouse/ClickHouse/pull/26579) ([Vladimir C](https://github.com/vdimir)). +* Add support for build with `clang-13`. This closes [#27705](https://github.com/ClickHouse/ClickHouse/issues/27705). [#27714](https://github.com/ClickHouse/ClickHouse/pull/27714) ([alexey-milovidov](https://github.com/alexey-milovidov)). [#27777](https://github.com/ClickHouse/ClickHouse/pull/27777) ([Sergei Semin](https://github.com/syominsergey)) +* Add CMake options to build with or without specific CPU instruction set. This is for [#17469](https://github.com/ClickHouse/ClickHouse/issues/17469) and [#27509](https://github.com/ClickHouse/ClickHouse/issues/27509). [#27508](https://github.com/ClickHouse/ClickHouse/pull/27508) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix linking of auxiliar programs when using dynamic libraries. [#26958](https://github.com/ClickHouse/ClickHouse/pull/26958) ([Raúl Marín](https://github.com/Algunenano)). +* Update RocksDB to `2021-07-16` master. [#26411](https://github.com/ClickHouse/ClickHouse/pull/26411) ([alexey-milovidov](https://github.com/alexey-milovidov)). + + +### ClickHouse release v21.8, 2021-08-12 + +#### Upgrade Notes +* New version is using `Map` data type for system logs tables (`system.query_log`, `system.query_thread_log`, `system.processes`, `system.opentelemetry_span_log`). These tables will be auto-created with new data types. Virtual columns are created to support old queries. Closes [#18698](https://github.com/ClickHouse/ClickHouse/issues/18698). [#23934](https://github.com/ClickHouse/ClickHouse/pull/23934), [#25773](https://github.com/ClickHouse/ClickHouse/pull/25773) ([hexiaoting](https://github.com/hexiaoting), [sundy-li](https://github.com/sundy-li), [Maksim Kita](https://github.com/kitaisreal)). If you want to *downgrade* from version 21.8 to older versions, you will need to cleanup system tables with logs manually. Look at `/var/lib/clickhouse/data/system/*_log`. + +#### New Features + +* Add support for a part of SQL/JSON standard. [#24148](https://github.com/ClickHouse/ClickHouse/pull/24148) ([l1tsolaiki](https://github.com/l1tsolaiki), [Kseniia Sumarokova](https://github.com/kssenii)). +* Collect common system metrics (in `system.asynchronous_metrics` and `system.asynchronous_metric_log`) on CPU usage, disk usage, memory usage, IO, network, files, load average, CPU frequencies, thermal sensors, EDAC counters, system uptime; also added metrics about the scheduling jitter and the time spent collecting the metrics. It works similar to `atop` in ClickHouse and allows access to monitoring data even if you have no additional tools installed. Close [#9430](https://github.com/ClickHouse/ClickHouse/issues/9430). [#24416](https://github.com/ClickHouse/ClickHouse/pull/24416) ([alexey-milovidov](https://github.com/alexey-milovidov), [Yegor Levankov](https://github.com/elevankoff)). +* Add MaterializedPostgreSQL table engine and database engine. This database engine allows replicating a whole database or any subset of database tables. [#20470](https://github.com/ClickHouse/ClickHouse/pull/20470) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add new functions `leftPad()`, `rightPad()`, `leftPadUTF8()`, `rightPadUTF8()`. [#26075](https://github.com/ClickHouse/ClickHouse/pull/26075) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add the `FIRST` keyword to the `ADD INDEX` command to be able to add the index at the beginning of the indices list. [#25904](https://github.com/ClickHouse/ClickHouse/pull/25904) ([xjewer](https://github.com/xjewer)). +* Introduce `system.data_skipping_indices` table containing information about existing data skipping indices. Close [#7659](https://github.com/ClickHouse/ClickHouse/issues/7659). [#25693](https://github.com/ClickHouse/ClickHouse/pull/25693) ([Dmitry Novik](https://github.com/novikd)). +* Add `bin`/`unbin` functions. [#25609](https://github.com/ClickHouse/ClickHouse/pull/25609) ([zhaoyu](https://github.com/zxc111)). +* Support `Map` and `UInt128`, `Int128`, `UInt256`, `Int256` types in `mapAdd` and `mapSubtract` functions. [#25596](https://github.com/ClickHouse/ClickHouse/pull/25596) ([Ildus Kurbangaliev](https://github.com/ildus)). +* Support `DISTINCT ON (columns)` expression, close [#25404](https://github.com/ClickHouse/ClickHouse/issues/25404). [#25589](https://github.com/ClickHouse/ClickHouse/pull/25589) ([Zijie Lu](https://github.com/TszKitLo40)). +* Add an ability to reset a custom setting to default and remove it from the table's metadata. It allows rolling back the change without knowing the system/config's default. Closes [#14449](https://github.com/ClickHouse/ClickHouse/issues/14449). [#17769](https://github.com/ClickHouse/ClickHouse/pull/17769) ([xjewer](https://github.com/xjewer)). +* Render pipelines as graphs in Web UI if `EXPLAIN PIPELINE graph = 1` query is submitted. [#26067](https://github.com/ClickHouse/ClickHouse/pull/26067) ([alexey-milovidov](https://github.com/alexey-milovidov)). + +#### Performance Improvements + +* Compile aggregate functions. Use option `compile_aggregate_expressions` to enable it. [#24789](https://github.com/ClickHouse/ClickHouse/pull/24789) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve latency of short queries that require reading from tables with many columns. [#26371](https://github.com/ClickHouse/ClickHouse/pull/26371) ([Anton Popov](https://github.com/CurtizJ)). + +#### Improvements + +* Use `Map` data type for system logs tables (`system.query_log`, `system.query_thread_log`, `system.processes`, `system.opentelemetry_span_log`). These tables will be auto-created with new data types. Virtual columns are created to support old queries. Closes [#18698](https://github.com/ClickHouse/ClickHouse/issues/18698). [#23934](https://github.com/ClickHouse/ClickHouse/pull/23934), [#25773](https://github.com/ClickHouse/ClickHouse/pull/25773) ([hexiaoting](https://github.com/hexiaoting), [sundy-li](https://github.com/sundy-li), [Maksim Kita](https://github.com/kitaisreal)). +* For a dictionary with a complex key containing only one attribute, allow not wrapping the key expression in tuple for functions `dictGet`, `dictHas`. [#26130](https://github.com/ClickHouse/ClickHouse/pull/26130) ([Maksim Kita](https://github.com/kitaisreal)). +* Implement function `bin`/`hex` from `AggregateFunction` states. [#26094](https://github.com/ClickHouse/ClickHouse/pull/26094) ([zhaoyu](https://github.com/zxc111)). +* Support arguments of `UUID` type for `empty` and `notEmpty` functions. `UUID` is empty if it is all zeros (nil UUID). Closes [#3446](https://github.com/ClickHouse/ClickHouse/issues/3446). [#25974](https://github.com/ClickHouse/ClickHouse/pull/25974) ([zhaoyu](https://github.com/zxc111)). +* Add support for `SET SQL_SELECT_LIMIT` in MySQL protocol. Closes [#17115](https://github.com/ClickHouse/ClickHouse/issues/17115). [#25972](https://github.com/ClickHouse/ClickHouse/pull/25972) ([Kseniia Sumarokova](https://github.com/kssenii)). +* More instrumentation for network interaction: add counters for recv/send bytes; add gauges for recvs/sends. Added missing documentation. Close [#5897](https://github.com/ClickHouse/ClickHouse/issues/5897). [#25962](https://github.com/ClickHouse/ClickHouse/pull/25962) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add setting `optimize_move_to_prewhere_if_final`. If query has `FINAL`, the optimization `move_to_prewhere` will be enabled only if both `optimize_move_to_prewhere` and `optimize_move_to_prewhere_if_final` are enabled. Closes [#8684](https://github.com/ClickHouse/ClickHouse/issues/8684). [#25940](https://github.com/ClickHouse/ClickHouse/pull/25940) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Allow complex quoted identifiers of JOINed tables. Close [#17861](https://github.com/ClickHouse/ClickHouse/issues/17861). [#25924](https://github.com/ClickHouse/ClickHouse/pull/25924) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add support for Unicode (e.g. Chinese, Cyrillic) components in `Nested` data types. Close [#25594](https://github.com/ClickHouse/ClickHouse/issues/25594). [#25923](https://github.com/ClickHouse/ClickHouse/pull/25923) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow `quantiles*` functions to work with `aggregate_functions_null_for_empty`. Close [#25892](https://github.com/ClickHouse/ClickHouse/issues/25892). [#25919](https://github.com/ClickHouse/ClickHouse/pull/25919) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow parameters for parametric aggregate functions to be arbitrary constant expressions (e.g., `1 + 2`), not just literals. It also allows using the query parameters (in parameterized queries like `{param:UInt8}`) inside parametric aggregate functions. Closes [#11607](https://github.com/ClickHouse/ClickHouse/issues/11607). [#25910](https://github.com/ClickHouse/ClickHouse/pull/25910) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Correctly throw the exception on the attempt to parse an invalid `Date`. Closes [#6481](https://github.com/ClickHouse/ClickHouse/issues/6481). [#25909](https://github.com/ClickHouse/ClickHouse/pull/25909) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Support for multiple includes in configuration. It is possible to include users configuration, remote server configuration from multiple sources. Simply place `` element with `from_zk`, `from_env` or `incl` attribute, and it will be replaced with the substitution. [#24404](https://github.com/ClickHouse/ClickHouse/pull/24404) ([nvartolomei](https://github.com/nvartolomei)). +* Support for queries with a column named `"null"` (it must be specified in back-ticks or double quotes) and `ON CLUSTER`. Closes [#24035](https://github.com/ClickHouse/ClickHouse/issues/24035). [#25907](https://github.com/ClickHouse/ClickHouse/pull/25907) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Support `LowCardinality`, `Decimal`, and `UUID` for `JSONExtract`. Closes [#24606](https://github.com/ClickHouse/ClickHouse/issues/24606). [#25900](https://github.com/ClickHouse/ClickHouse/pull/25900) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Convert history file from `readline` format to `replxx` format. [#25888](https://github.com/ClickHouse/ClickHouse/pull/25888) ([Azat Khuzhin](https://github.com/azat)). +* Fix an issue which can lead to intersecting parts after `DROP PART` or background deletion of an empty part. [#25884](https://github.com/ClickHouse/ClickHouse/pull/25884) ([alesapin](https://github.com/alesapin)). +* Better handling of lost parts for `ReplicatedMergeTree` tables. Fixes rare inconsistencies in `ReplicationQueue`. Fixes [#10368](https://github.com/ClickHouse/ClickHouse/issues/10368). [#25820](https://github.com/ClickHouse/ClickHouse/pull/25820) ([alesapin](https://github.com/alesapin)). +* Allow starting clickhouse-client with unreadable working directory. [#25817](https://github.com/ClickHouse/ClickHouse/pull/25817) ([ianton-ru](https://github.com/ianton-ru)). +* Fix "No available columns" error for `Merge` storage. [#25801](https://github.com/ClickHouse/ClickHouse/pull/25801) ([Azat Khuzhin](https://github.com/azat)). +* MySQL Engine now supports the exchange of column comments between MySQL and ClickHouse. [#25795](https://github.com/ClickHouse/ClickHouse/pull/25795) ([Storozhuk Kostiantyn](https://github.com/sand6255)). +* Fix inconsistent behaviour of `GROUP BY` constant on empty set. Closes [#6842](https://github.com/ClickHouse/ClickHouse/issues/6842). [#25786](https://github.com/ClickHouse/ClickHouse/pull/25786) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Cancel already running merges in partition on `DROP PARTITION` and `TRUNCATE` for `ReplicatedMergeTree`. Resolves [#17151](https://github.com/ClickHouse/ClickHouse/issues/17151). [#25684](https://github.com/ClickHouse/ClickHouse/pull/25684) ([tavplubix](https://github.com/tavplubix)). +* Support ENUM` data type for MaterializeMySQL. [#25676](https://github.com/ClickHouse/ClickHouse/pull/25676) ([Storozhuk Kostiantyn](https://github.com/sand6255)). +* Support materialized and aliased columns in JOIN, close [#13274](https://github.com/ClickHouse/ClickHouse/issues/13274). [#25634](https://github.com/ClickHouse/ClickHouse/pull/25634) ([Vladimir C](https://github.com/vdimir)). +* Fix possible logical race condition between `ALTER TABLE ... DETACH` and background merges. [#25605](https://github.com/ClickHouse/ClickHouse/pull/25605) ([Azat Khuzhin](https://github.com/azat)). +* Make `NetworkReceiveElapsedMicroseconds` metric to correctly include the time spent waiting for data from the client to `INSERT`. Close [#9958](https://github.com/ClickHouse/ClickHouse/issues/9958). [#25602](https://github.com/ClickHouse/ClickHouse/pull/25602) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Support `TRUNCATE TABLE` for S3 and HDFS. Close [#25530](https://github.com/ClickHouse/ClickHouse/issues/25530). [#25550](https://github.com/ClickHouse/ClickHouse/pull/25550) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support for dynamic reloading of config to change number of threads in pool for background jobs execution (merges, mutations, fetches). [#25548](https://github.com/ClickHouse/ClickHouse/pull/25548) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Allow extracting of non-string element as string using `JSONExtract`. This is for [#25414](https://github.com/ClickHouse/ClickHouse/issues/25414). [#25452](https://github.com/ClickHouse/ClickHouse/pull/25452) ([Amos Bird](https://github.com/amosbird)). +* Support regular expression in `Database` argument for `StorageMerge`. Close [#776](https://github.com/ClickHouse/ClickHouse/issues/776). [#25064](https://github.com/ClickHouse/ClickHouse/pull/25064) ([flynn](https://github.com/ucasfl)). +* Web UI: if the value looks like a URL, automatically generate a link. [#25965](https://github.com/ClickHouse/ClickHouse/pull/25965) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Make `sudo service clickhouse-server start` to work on systems with `systemd` like Centos 8. Close [#14298](https://github.com/ClickHouse/ClickHouse/issues/14298). Close [#17799](https://github.com/ClickHouse/ClickHouse/issues/17799). [#25921](https://github.com/ClickHouse/ClickHouse/pull/25921) ([alexey-milovidov](https://github.com/alexey-milovidov)). + +#### Bug Fixes + +* Fix incorrect `SET ROLE` in some cases. [#26707](https://github.com/ClickHouse/ClickHouse/pull/26707) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix potential `nullptr` dereference in window functions. Fix [#25276](https://github.com/ClickHouse/ClickHouse/issues/25276). [#26668](https://github.com/ClickHouse/ClickHouse/pull/26668) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fix incorrect function names of `groupBitmapAnd/Or/Xor`. Fix [#26557](https://github.com/ClickHouse/ClickHouse/pull/26557) ([Amos Bird](https://github.com/amosbird)). +* Fix crash in RabbitMQ shutdown in case RabbitMQ setup was not started. Closes [#26504](https://github.com/ClickHouse/ClickHouse/issues/26504). [#26529](https://github.com/ClickHouse/ClickHouse/pull/26529) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix issues with `CREATE DICTIONARY` query if dictionary name or database name was quoted. Closes [#26491](https://github.com/ClickHouse/ClickHouse/issues/26491). [#26508](https://github.com/ClickHouse/ClickHouse/pull/26508) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix broken name resolution after rewriting column aliases. Fix [#26432](https://github.com/ClickHouse/ClickHouse/issues/26432). [#26475](https://github.com/ClickHouse/ClickHouse/pull/26475) ([Amos Bird](https://github.com/amosbird)). +* Fix infinite non-joined block stream in `partial_merge_join` close [#26325](https://github.com/ClickHouse/ClickHouse/issues/26325). [#26374](https://github.com/ClickHouse/ClickHouse/pull/26374) ([Vladimir C](https://github.com/vdimir)). +* Fix possible crash when login as dropped user. Fix [#26073](https://github.com/ClickHouse/ClickHouse/issues/26073). [#26363](https://github.com/ClickHouse/ClickHouse/pull/26363) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix `optimize_distributed_group_by_sharding_key` for multiple columns (leads to incorrect result w/ `optimize_skip_unused_shards=1`/`allow_nondeterministic_optimize_skip_unused_shards=1` and multiple columns in sharding key expression). [#26353](https://github.com/ClickHouse/ClickHouse/pull/26353) ([Azat Khuzhin](https://github.com/azat)). +* `CAST` from `Date` to `DateTime` (or `DateTime64`) was not using the timezone of the `DateTime` type. It can also affect the comparison between `Date` and `DateTime`. Inference of the common type for `Date` and `DateTime` also was not using the corresponding timezone. It affected the results of function `if` and array construction. Closes [#24128](https://github.com/ClickHouse/ClickHouse/issues/24128). [#24129](https://github.com/ClickHouse/ClickHouse/pull/24129) ([Maksim Kita](https://github.com/kitaisreal)). +* Fixed rare bug in lost replica recovery that may cause replicas to diverge. [#26321](https://github.com/ClickHouse/ClickHouse/pull/26321) ([tavplubix](https://github.com/tavplubix)). +* Fix zstd decompression in case there are escape sequences at the end of internal buffer. Closes [#26013](https://github.com/ClickHouse/ClickHouse/issues/26013). [#26314](https://github.com/ClickHouse/ClickHouse/pull/26314) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix logical error on join with totals, close [#26017](https://github.com/ClickHouse/ClickHouse/issues/26017). [#26250](https://github.com/ClickHouse/ClickHouse/pull/26250) ([Vladimir C](https://github.com/vdimir)). +* Remove excessive newline in `thread_name` column in `system.stack_trace` table. Fix [#24124](https://github.com/ClickHouse/ClickHouse/issues/24124). [#26210](https://github.com/ClickHouse/ClickHouse/pull/26210) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `joinGet` with `LowCarinality` columns, close [#25993](https://github.com/ClickHouse/ClickHouse/issues/25993). [#26118](https://github.com/ClickHouse/ClickHouse/pull/26118) ([Vladimir C](https://github.com/vdimir)). +* Fix possible crash in `pointInPolygon` if the setting `validate_polygons` is turned off. [#26113](https://github.com/ClickHouse/ClickHouse/pull/26113) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix throwing exception when iterate over non-existing remote directory. [#26087](https://github.com/ClickHouse/ClickHouse/pull/26087) ([ianton-ru](https://github.com/ianton-ru)). +* Fix rare server crash because of `abort` in ZooKeeper client. Fixes [#25813](https://github.com/ClickHouse/ClickHouse/issues/25813). [#26079](https://github.com/ClickHouse/ClickHouse/pull/26079) ([alesapin](https://github.com/alesapin)). +* Fix wrong thread count estimation for right subquery join in some cases. Close [#24075](https://github.com/ClickHouse/ClickHouse/issues/24075). [#26052](https://github.com/ClickHouse/ClickHouse/pull/26052) ([Vladimir C](https://github.com/vdimir)). +* Fixed incorrect `sequence_id` in MySQL protocol packets that ClickHouse sends on exception during query execution. It might cause MySQL client to reset connection to ClickHouse server. Fixes [#21184](https://github.com/ClickHouse/ClickHouse/issues/21184). [#26051](https://github.com/ClickHouse/ClickHouse/pull/26051) ([tavplubix](https://github.com/tavplubix)). +* Fix possible mismatched header when using normal projection with `PREWHERE`. Fix [#26020](https://github.com/ClickHouse/ClickHouse/issues/26020). [#26038](https://github.com/ClickHouse/ClickHouse/pull/26038) ([Amos Bird](https://github.com/amosbird)). +* Fix formatting of type `Map` with integer keys to `JSON`. [#25982](https://github.com/ClickHouse/ClickHouse/pull/25982) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible deadlock during query profiler stack unwinding. Fix [#25968](https://github.com/ClickHouse/ClickHouse/issues/25968). [#25970](https://github.com/ClickHouse/ClickHouse/pull/25970) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix crash on call `dictGet()` with bad arguments. [#25913](https://github.com/ClickHouse/ClickHouse/pull/25913) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed `scram-sha-256` authentication for PostgreSQL engines. Closes [#24516](https://github.com/ClickHouse/ClickHouse/issues/24516). [#25906](https://github.com/ClickHouse/ClickHouse/pull/25906) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix extremely long backoff for background tasks when the background pool is full. Fixes [#25836](https://github.com/ClickHouse/ClickHouse/issues/25836). [#25893](https://github.com/ClickHouse/ClickHouse/pull/25893) ([alesapin](https://github.com/alesapin)). +* Fix ARM exception handling with non default page size. Fixes [#25512](https://github.com/ClickHouse/ClickHouse/issues/25512), [#25044](https://github.com/ClickHouse/ClickHouse/issues/25044), [#24901](https://github.com/ClickHouse/ClickHouse/issues/24901), [#23183](https://github.com/ClickHouse/ClickHouse/issues/23183), [#20221](https://github.com/ClickHouse/ClickHouse/issues/20221), [#19703](https://github.com/ClickHouse/ClickHouse/issues/19703), [#19028](https://github.com/ClickHouse/ClickHouse/issues/19028), [#18391](https://github.com/ClickHouse/ClickHouse/issues/18391), [#18121](https://github.com/ClickHouse/ClickHouse/issues/18121), [#17994](https://github.com/ClickHouse/ClickHouse/issues/17994), [#12483](https://github.com/ClickHouse/ClickHouse/issues/12483). [#25854](https://github.com/ClickHouse/ClickHouse/pull/25854) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix sharding_key from column w/o function for `remote()` (before `select * from remote('127.1', system.one, dummy)` leads to `Unknown column: dummy, there are only columns .` error). [#25824](https://github.com/ClickHouse/ClickHouse/pull/25824) ([Azat Khuzhin](https://github.com/azat)). +* Fixed `Not found column ...` and `Missing column ...` errors when selecting from `MaterializeMySQL`. Fixes [#23708](https://github.com/ClickHouse/ClickHouse/issues/23708), [#24830](https://github.com/ClickHouse/ClickHouse/issues/24830), [#25794](https://github.com/ClickHouse/ClickHouse/issues/25794). [#25822](https://github.com/ClickHouse/ClickHouse/pull/25822) ([tavplubix](https://github.com/tavplubix)). +* Fix `optimize_skip_unused_shards_rewrite_in` for non-UInt64 types (may select incorrect shards eventually or throw `Cannot infer type of an empty tuple` or `Function tuple requires at least one argument`). [#25798](https://github.com/ClickHouse/ClickHouse/pull/25798) ([Azat Khuzhin](https://github.com/azat)). +* Fix rare bug with `DROP PART` query for `ReplicatedMergeTree` tables which can lead to error message `Unexpected merged part intersecting drop range`. [#25783](https://github.com/ClickHouse/ClickHouse/pull/25783) ([alesapin](https://github.com/alesapin)). +* Fix bug in `TTL` with `GROUP BY` expression which refuses to execute `TTL` after first execution in part. [#25743](https://github.com/ClickHouse/ClickHouse/pull/25743) ([alesapin](https://github.com/alesapin)). +* Allow StorageMerge to access tables with aliases. Closes [#6051](https://github.com/ClickHouse/ClickHouse/issues/6051). [#25694](https://github.com/ClickHouse/ClickHouse/pull/25694) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix slow dict join in some cases, close [#24209](https://github.com/ClickHouse/ClickHouse/issues/24209). [#25618](https://github.com/ClickHouse/ClickHouse/pull/25618) ([Vladimir C](https://github.com/vdimir)). +* Fix `ALTER MODIFY COLUMN` of columns, which participates in TTL expressions. [#25554](https://github.com/ClickHouse/ClickHouse/pull/25554) ([Anton Popov](https://github.com/CurtizJ)). +* Fix assertion in `PREWHERE` with non-UInt8 type, close [#19589](https://github.com/ClickHouse/ClickHouse/issues/19589). [#25484](https://github.com/ClickHouse/ClickHouse/pull/25484) ([Vladimir C](https://github.com/vdimir)). +* Fix some fuzzed msan crash. Fixes [#22517](https://github.com/ClickHouse/ClickHouse/issues/22517). [#26428](https://github.com/ClickHouse/ClickHouse/pull/26428) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Update `chown` cmd check in `clickhouse-server` docker entrypoint. It fixes error 'cluster pod restart failed (or timeout)' on kubernetes. [#26545](https://github.com/ClickHouse/ClickHouse/pull/26545) ([Ky Li](https://github.com/Kylinrix)). + + +### ClickHouse release v21.7, 2021-07-09 + +#### Backward Incompatible Change + +* Improved performance of queries with explicitly defined large sets. Added compatibility setting `legacy_column_name_of_tuple_literal`. It makes sense to set it to `true`, while doing rolling update of cluster from version lower than 21.7 to any higher version. Otherwise distributed queries with explicitly defined sets at `IN` clause may fail during update. [#25371](https://github.com/ClickHouse/ClickHouse/pull/25371) ([Anton Popov](https://github.com/CurtizJ)). +* Forward/backward incompatible change of maximum buffer size in clickhouse-keeper (an experimental alternative to ZooKeeper). Better to do it now (before production), than later. [#25421](https://github.com/ClickHouse/ClickHouse/pull/25421) ([alesapin](https://github.com/alesapin)). + +#### New Feature + +* Support configuration in YAML format as alternative to XML. This closes [#3607](https://github.com/ClickHouse/ClickHouse/issues/3607). [#21858](https://github.com/ClickHouse/ClickHouse/pull/21858) ([BoloniniD](https://github.com/BoloniniD)). +* Provides a way to restore replicated table when the data is (possibly) present, but the ZooKeeper metadata is lost. Resolves [#13458](https://github.com/ClickHouse/ClickHouse/issues/13458). [#13652](https://github.com/ClickHouse/ClickHouse/pull/13652) ([Mike Kot](https://github.com/myrrc)). +* Support structs and maps in Arrow/Parquet/ORC and dictionaries in Arrow input/output formats. Present new setting `output_format_arrow_low_cardinality_as_dictionary`. [#24341](https://github.com/ClickHouse/ClickHouse/pull/24341) ([Kruglov Pavel](https://github.com/Avogar)). +* Added support for `Array` type in dictionaries. [#25119](https://github.com/ClickHouse/ClickHouse/pull/25119) ([Maksim Kita](https://github.com/kitaisreal)). +* Added function `bitPositionsToArray`. Closes [#23792](https://github.com/ClickHouse/ClickHouse/issues/23792). Author [Kevin Wan] (@MaxWk). [#25394](https://github.com/ClickHouse/ClickHouse/pull/25394) ([Maksim Kita](https://github.com/kitaisreal)). +* Added function `dateName` to return names like 'Friday' or 'April'. Author [Daniil Kondratyev] (@dankondr). [#25372](https://github.com/ClickHouse/ClickHouse/pull/25372) ([Maksim Kita](https://github.com/kitaisreal)). +* Add `toJSONString` function to serialize columns to their JSON representations. [#25164](https://github.com/ClickHouse/ClickHouse/pull/25164) ([Amos Bird](https://github.com/amosbird)). +* Now `query_log` has two new columns: `initial_query_start_time`, `initial_query_start_time_microsecond` that record the starting time of a distributed query if any. [#25022](https://github.com/ClickHouse/ClickHouse/pull/25022) ([Amos Bird](https://github.com/amosbird)). +* Add aggregate function `segmentLengthSum`. [#24250](https://github.com/ClickHouse/ClickHouse/pull/24250) ([flynn](https://github.com/ucasfl)). +* Add a new boolean setting `prefer_global_in_and_join` which defaults all IN/JOIN as GLOBAL IN/JOIN. [#23434](https://github.com/ClickHouse/ClickHouse/pull/23434) ([Amos Bird](https://github.com/amosbird)). +* Support `ALTER DELETE` queries for `Join` table engine. [#23260](https://github.com/ClickHouse/ClickHouse/pull/23260) ([foolchi](https://github.com/foolchi)). +* Add `quantileBFloat16` aggregate function as well as the corresponding `quantilesBFloat16` and `medianBFloat16`. It is very simple and fast quantile estimator with relative error not more than 0.390625%. This closes [#16641](https://github.com/ClickHouse/ClickHouse/issues/16641). [#23204](https://github.com/ClickHouse/ClickHouse/pull/23204) ([Ivan Novitskiy](https://github.com/RedClusive)). +* Implement `sequenceNextNode()` function useful for `flow analysis`. [#19766](https://github.com/ClickHouse/ClickHouse/pull/19766) ([achimbab](https://github.com/achimbab)). + +#### Experimental Feature + +* Add support for virtual filesystem over HDFS. [#11058](https://github.com/ClickHouse/ClickHouse/pull/11058) ([overshov](https://github.com/overshov)) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Now clickhouse-keeper (an experimental alternative to ZooKeeper) supports ZooKeeper-like `digest` ACLs. [#24448](https://github.com/ClickHouse/ClickHouse/pull/24448) ([alesapin](https://github.com/alesapin)). + +#### Performance Improvement + +* Added optimization that transforms some functions to reading of subcolumns to reduce amount of read data. E.g., statement `col IS NULL` is transformed to reading of subcolumn `col.null`. Optimization can be enabled by setting `optimize_functions_to_subcolumns` which is currently off by default. [#24406](https://github.com/ClickHouse/ClickHouse/pull/24406) ([Anton Popov](https://github.com/CurtizJ)). +* Rewrite more columns to possible alias expressions. This may enable better optimization, such as projections. [#24405](https://github.com/ClickHouse/ClickHouse/pull/24405) ([Amos Bird](https://github.com/amosbird)). +* Index of type `bloom_filter` can be used for expressions with `hasAny` function with constant arrays. This closes: [#24291](https://github.com/ClickHouse/ClickHouse/issues/24291). [#24900](https://github.com/ClickHouse/ClickHouse/pull/24900) ([Vasily Nemkov](https://github.com/Enmk)). +* Add exponential backoff to reschedule read attempt in case RabbitMQ queues are empty. (ClickHouse has support for importing data from RabbitMQ). Closes [#24340](https://github.com/ClickHouse/ClickHouse/issues/24340). [#24415](https://github.com/ClickHouse/ClickHouse/pull/24415) ([Kseniia Sumarokova](https://github.com/kssenii)). + +#### Improvement + +* Allow to limit bandwidth for replication. Add two Replicated\*MergeTree settings: `max_replicated_fetches_network_bandwidth` and `max_replicated_sends_network_bandwidth` which allows to limit maximum speed of replicated fetches/sends for table. Add two server-wide settings (in `default` user profile): `max_replicated_fetches_network_bandwidth_for_server` and `max_replicated_sends_network_bandwidth_for_server` which limit maximum speed of replication for all tables. The settings are not followed perfectly accurately. Turned off by default. Fixes [#1821](https://github.com/ClickHouse/ClickHouse/issues/1821). [#24573](https://github.com/ClickHouse/ClickHouse/pull/24573) ([alesapin](https://github.com/alesapin)). +* Resource constraints and isolation for ODBC and Library bridges. Use separate `clickhouse-bridge` group and user for bridge processes. Set oom_score_adj so the bridges will be first subjects for OOM killer. Set set maximum RSS to 1 GiB. Closes [#23861](https://github.com/ClickHouse/ClickHouse/issues/23861). [#25280](https://github.com/ClickHouse/ClickHouse/pull/25280) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add standalone `clickhouse-keeper` symlink to the main `clickhouse` binary. Now it's possible to run coordination without the main clickhouse server. [#24059](https://github.com/ClickHouse/ClickHouse/pull/24059) ([alesapin](https://github.com/alesapin)). +* Use global settings for query to `VIEW`. Fixed the behavior when queries to `VIEW` use local settings, that leads to errors if setting on `CREATE VIEW` and `SELECT` were different. As for now, `VIEW` won't use these modified settings, but you can still pass additional settings in `SETTINGS` section of `CREATE VIEW` query. Close [#20551](https://github.com/ClickHouse/ClickHouse/issues/20551). [#24095](https://github.com/ClickHouse/ClickHouse/pull/24095) ([Vladimir](https://github.com/vdimir)). +* On server start, parts with incorrect partition ID would not be ever removed, but always detached. [#25070](https://github.com/ClickHouse/ClickHouse/issues/25070). [#25166](https://github.com/ClickHouse/ClickHouse/pull/25166) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Increase size of background schedule pool to 128 (`background_schedule_pool_size` setting). It allows avoiding replication queue hung on slow zookeeper connection. [#25072](https://github.com/ClickHouse/ClickHouse/pull/25072) ([alesapin](https://github.com/alesapin)). +* Add merge tree setting `max_parts_to_merge_at_once` which limits the number of parts that can be merged in the background at once. Doesn't affect `OPTIMIZE FINAL` query. Fixes [#1820](https://github.com/ClickHouse/ClickHouse/issues/1820). [#24496](https://github.com/ClickHouse/ClickHouse/pull/24496) ([alesapin](https://github.com/alesapin)). +* Allow `NOT IN` operator to be used in partition pruning. [#24894](https://github.com/ClickHouse/ClickHouse/pull/24894) ([Amos Bird](https://github.com/amosbird)). +* Recognize IPv4 addresses like `127.0.1.1` as local. This is controversial and closes [#23504](https://github.com/ClickHouse/ClickHouse/issues/23504). Michael Filimonov will test this feature. [#24316](https://github.com/ClickHouse/ClickHouse/pull/24316) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* ClickHouse database created with MaterializeMySQL (it is an experimental feature) now contains all column comments from the MySQL database that materialized. [#25199](https://github.com/ClickHouse/ClickHouse/pull/25199) ([Storozhuk Kostiantyn](https://github.com/sand6255)). +* Add settings (`connection_auto_close`/`connection_max_tries`/`connection_pool_size`) for MySQL storage engine. [#24146](https://github.com/ClickHouse/ClickHouse/pull/24146) ([Azat Khuzhin](https://github.com/azat)). +* Improve startup time of Distributed engine. [#25663](https://github.com/ClickHouse/ClickHouse/pull/25663) ([Azat Khuzhin](https://github.com/azat)). +* Improvement for Distributed tables. Drop replicas from dirname for internal_replication=true (allows INSERT into Distributed with cluster from any number of replicas, before only 15 replicas was supported, everything more will fail with ENAMETOOLONG while creating directory for async blocks). [#25513](https://github.com/ClickHouse/ClickHouse/pull/25513) ([Azat Khuzhin](https://github.com/azat)). +* Added support `Interval` type for `LowCardinality`. It is needed for intermediate values of some expressions. Closes [#21730](https://github.com/ClickHouse/ClickHouse/issues/21730). [#25410](https://github.com/ClickHouse/ClickHouse/pull/25410) ([Vladimir](https://github.com/vdimir)). +* Add `==` operator on time conditions for `sequenceMatch` and `sequenceCount` functions. For eg: sequenceMatch('(?1)(?t==1)(?2)')(time, data = 1, data = 2). [#25299](https://github.com/ClickHouse/ClickHouse/pull/25299) ([Christophe Kalenzaga](https://github.com/mga-chka)). +* Add settings `http_max_fields`, `http_max_field_name_size`, `http_max_field_value_size`. [#25296](https://github.com/ClickHouse/ClickHouse/pull/25296) ([Ivan](https://github.com/abyss7)). +* Add support for function `if` with `Decimal` and `Int` types on its branches. This closes [#20549](https://github.com/ClickHouse/ClickHouse/issues/20549). This closes [#10142](https://github.com/ClickHouse/ClickHouse/issues/10142). [#25283](https://github.com/ClickHouse/ClickHouse/pull/25283) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Update prompt in `clickhouse-client` and display a message when reconnecting. This closes [#10577](https://github.com/ClickHouse/ClickHouse/issues/10577). [#25281](https://github.com/ClickHouse/ClickHouse/pull/25281) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Correct memory tracking in aggregate function `topK`. This closes [#25259](https://github.com/ClickHouse/ClickHouse/issues/25259). [#25260](https://github.com/ClickHouse/ClickHouse/pull/25260) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `topLevelDomain` for IDN hosts (i.e. `example.рф`), before it returns empty string for such hosts. [#25103](https://github.com/ClickHouse/ClickHouse/pull/25103) ([Azat Khuzhin](https://github.com/azat)). +* Detect Linux kernel version at runtime (for worked nested epoll, that is required for `async_socket_for_remote`/`use_hedged_requests`, otherwise remote queries may stuck). [#25067](https://github.com/ClickHouse/ClickHouse/pull/25067) ([Azat Khuzhin](https://github.com/azat)). +* For distributed query, when `optimize_skip_unused_shards=1`, allow to skip shard with condition like `(sharding key) IN (one-element-tuple)`. (Tuples with many elements were supported. Tuple with single element did not work because it is parsed as literal). [#24930](https://github.com/ClickHouse/ClickHouse/pull/24930) ([Amos Bird](https://github.com/amosbird)). +* Improved log messages of S3 errors, no more double whitespaces in case of empty keys and buckets. [#24897](https://github.com/ClickHouse/ClickHouse/pull/24897) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Some queries require multi-pass semantic analysis. Try reusing built sets for `IN` in this case. [#24874](https://github.com/ClickHouse/ClickHouse/pull/24874) ([Amos Bird](https://github.com/amosbird)). +* Respect `max_distributed_connections` for `insert_distributed_sync` (otherwise for huge clusters and sync insert it may run out of `max_thread_pool_size`). [#24754](https://github.com/ClickHouse/ClickHouse/pull/24754) ([Azat Khuzhin](https://github.com/azat)). +* Avoid hiding errors like `Limit for rows or bytes to read exceeded` for scalar subqueries. [#24545](https://github.com/ClickHouse/ClickHouse/pull/24545) ([nvartolomei](https://github.com/nvartolomei)). +* Make String-to-Int parser stricter so that `toInt64('+')` will throw. [#24475](https://github.com/ClickHouse/ClickHouse/pull/24475) ([Amos Bird](https://github.com/amosbird)). +* If `SSD_CACHE` is created with DDL query, it can be created only inside `user_files` directory. [#24466](https://github.com/ClickHouse/ClickHouse/pull/24466) ([Maksim Kita](https://github.com/kitaisreal)). +* PostgreSQL support for specifying non default schema for insert queries. Closes [#24149](https://github.com/ClickHouse/ClickHouse/issues/24149). [#24413](https://github.com/ClickHouse/ClickHouse/pull/24413) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix IPv6 addresses resolving (i.e. fixes `select * from remote('[::1]', system.one)`). [#24319](https://github.com/ClickHouse/ClickHouse/pull/24319) ([Azat Khuzhin](https://github.com/azat)). +* Fix trailing whitespaces in FROM clause with subqueries in multiline mode, and also changes the output of the queries slightly in a more human friendly way. [#24151](https://github.com/ClickHouse/ClickHouse/pull/24151) ([Azat Khuzhin](https://github.com/azat)). +* Improvement for Distributed tables. Add ability to split distributed batch on failures (i.e. due to memory limits, corruptions), under `distributed_directory_monitor_split_batch_on_failure` (OFF by default). [#23864](https://github.com/ClickHouse/ClickHouse/pull/23864) ([Azat Khuzhin](https://github.com/azat)). +* Handle column name clashes for `Join` table engine. Closes [#20309](https://github.com/ClickHouse/ClickHouse/issues/20309). [#23769](https://github.com/ClickHouse/ClickHouse/pull/23769) ([Vladimir](https://github.com/vdimir)). +* Display progress for `File` table engine in `clickhouse-local` and on INSERT query in `clickhouse-client` when data is passed to stdin. Closes [#18209](https://github.com/ClickHouse/ClickHouse/issues/18209). [#23656](https://github.com/ClickHouse/ClickHouse/pull/23656) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Bugfixes and improvements of `clickhouse-copier`. Allow to copy tables with different (but compatible schemas). Closes [#9159](https://github.com/ClickHouse/ClickHouse/issues/9159). Added test to copy ReplacingMergeTree. Closes [#22711](https://github.com/ClickHouse/ClickHouse/issues/22711). Support TTL on columns and Data Skipping Indices. It simply removes it to create internal Distributed table (underlying table will have TTL and skipping indices). Closes [#19384](https://github.com/ClickHouse/ClickHouse/issues/19384). Allow to copy MATERIALIZED and ALIAS columns. There are some cases in which it could be helpful (e.g. if this column is in PRIMARY KEY). Now it could be allowed by setting `allow_to_copy_alias_and_materialized_columns` property to true in task configuration. Closes [#9177](https://github.com/ClickHouse/ClickHouse/issues/9177). Closes [#11007] (https://github.com/ClickHouse/ClickHouse/issues/11007). Closes [#9514](https://github.com/ClickHouse/ClickHouse/issues/9514). Added a property `allow_to_drop_target_partitions` in task configuration to drop partition in original table before moving helping tables. Closes [#20957](https://github.com/ClickHouse/ClickHouse/issues/20957). Get rid of `OPTIMIZE DEDUPLICATE` query. This hack was needed, because `ALTER TABLE MOVE PARTITION` was retried many times and plain MergeTree tables don't have deduplication. Closes [#17966](https://github.com/ClickHouse/ClickHouse/issues/17966). Write progress to ZooKeeper node on path `task_path + /status` in JSON format. Closes [#20955](https://github.com/ClickHouse/ClickHouse/issues/20955). Support for ReplicatedTables without arguments. Closes [#24834](https://github.com/ClickHouse/ClickHouse/issues/24834) .[#23518](https://github.com/ClickHouse/ClickHouse/pull/23518) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Added sleep with backoff between read retries from S3. [#23461](https://github.com/ClickHouse/ClickHouse/pull/23461) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Respect `insert_allow_materialized_columns` (allows materialized columns) for INSERT into `Distributed` table. [#23349](https://github.com/ClickHouse/ClickHouse/pull/23349) ([Azat Khuzhin](https://github.com/azat)). +* Add ability to push down LIMIT for distributed queries. [#23027](https://github.com/ClickHouse/ClickHouse/pull/23027) ([Azat Khuzhin](https://github.com/azat)). +* Fix zero-copy replication with several S3 volumes (Fixes [#22679](https://github.com/ClickHouse/ClickHouse/issues/22679)). [#22864](https://github.com/ClickHouse/ClickHouse/pull/22864) ([ianton-ru](https://github.com/ianton-ru)). +* Resolve the actual port number bound when a user requests any available port from the operating system to show it in the log message. [#25569](https://github.com/ClickHouse/ClickHouse/pull/25569) ([bnaecker](https://github.com/bnaecker)). +* Fixed case, when sometimes conversion of postgres arrays resulted in String data type, not n-dimensional array, because `attndims` works incorrectly in some cases. Closes [#24804](https://github.com/ClickHouse/ClickHouse/issues/24804). [#25538](https://github.com/ClickHouse/ClickHouse/pull/25538) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix convertion of DateTime with timezone for MySQL, PostgreSQL, ODBC. Closes [#5057](https://github.com/ClickHouse/ClickHouse/issues/5057). [#25528](https://github.com/ClickHouse/ClickHouse/pull/25528) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Distinguish KILL MUTATION for different tables (fixes unexpected `Cancelled mutating parts` error). [#25025](https://github.com/ClickHouse/ClickHouse/pull/25025) ([Azat Khuzhin](https://github.com/azat)). +* Allow to declare S3 disk at root of bucket (S3 virtual filesystem is an experimental feature under development). [#24898](https://github.com/ClickHouse/ClickHouse/pull/24898) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Enable reading of subcolumns (e.g. components of Tuples) for distributed tables. [#24472](https://github.com/ClickHouse/ClickHouse/pull/24472) ([Anton Popov](https://github.com/CurtizJ)). +* A feature for MySQL compatibility protocol: make `user` function to return correct output. Closes [#25697](https://github.com/ClickHouse/ClickHouse/pull/25697). [#25697](https://github.com/ClickHouse/ClickHouse/pull/25697) ([sundyli](https://github.com/sundy-li)). + +#### Bug Fix + +* Improvement for backward compatibility. Use old modulo function version when used in partition key. Closes [#23508](https://github.com/ClickHouse/ClickHouse/issues/23508). [#24157](https://github.com/ClickHouse/ClickHouse/pull/24157) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix extremely rare bug on low-memory servers which can lead to the inability to perform merges without restart. Possibly fixes [#24603](https://github.com/ClickHouse/ClickHouse/issues/24603). [#24872](https://github.com/ClickHouse/ClickHouse/pull/24872) ([alesapin](https://github.com/alesapin)). +* Fix extremely rare error `Tagging already tagged part` in replication queue during concurrent `alter move/replace partition`. Possibly fixes [#22142](https://github.com/ClickHouse/ClickHouse/issues/22142). [#24961](https://github.com/ClickHouse/ClickHouse/pull/24961) ([alesapin](https://github.com/alesapin)). +* Fix potential crash when calculating aggregate function states by aggregation of aggregate function states of other aggregate functions (not a practical use case). See [#24523](https://github.com/ClickHouse/ClickHouse/issues/24523). [#25015](https://github.com/ClickHouse/ClickHouse/pull/25015) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed the behavior when query `SYSTEM RESTART REPLICA` or `SYSTEM SYNC REPLICA` does not finish. This was detected on server with extremely low amount of RAM. [#24457](https://github.com/ClickHouse/ClickHouse/pull/24457) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix bug which can lead to ZooKeeper client hung inside clickhouse-server. [#24721](https://github.com/ClickHouse/ClickHouse/pull/24721) ([alesapin](https://github.com/alesapin)). +* If ZooKeeper connection was lost and replica was cloned after restoring the connection, its replication queue might contain outdated entries. Fixed failed assertion when replication queue contains intersecting virtual parts. It may rarely happen if some data part was lost. Print error in log instead of terminating. [#24777](https://github.com/ClickHouse/ClickHouse/pull/24777) ([tavplubix](https://github.com/tavplubix)). +* Fix lost `WHERE` condition in expression-push-down optimization of query plan (setting `query_plan_filter_push_down = 1` by default). Fixes [#25368](https://github.com/ClickHouse/ClickHouse/issues/25368). [#25370](https://github.com/ClickHouse/ClickHouse/pull/25370) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bug which can lead to intersecting parts after merges with TTL: `Part all_40_40_0 is covered by all_40_40_1 but should be merged into all_40_41_1. This shouldn't happen often.`. [#25549](https://github.com/ClickHouse/ClickHouse/pull/25549) ([alesapin](https://github.com/alesapin)). +* On ZooKeeper connection loss `ReplicatedMergeTree` table might wait for background operations to complete before trying to reconnect. It's fixed, now background operations are stopped forcefully. [#25306](https://github.com/ClickHouse/ClickHouse/pull/25306) ([tavplubix](https://github.com/tavplubix)). +* Fix error `Key expression contains comparison between inconvertible types` for queries with `ARRAY JOIN` in case if array is used in primary key. Fixes [#8247](https://github.com/ClickHouse/ClickHouse/issues/8247). [#25546](https://github.com/ClickHouse/ClickHouse/pull/25546) ([Anton Popov](https://github.com/CurtizJ)). +* Fix wrong totals for query `WITH TOTALS` and `WITH FILL`. Fixes [#20872](https://github.com/ClickHouse/ClickHouse/issues/20872). [#25539](https://github.com/ClickHouse/ClickHouse/pull/25539) ([Anton Popov](https://github.com/CurtizJ)). +* Fix data race when querying `system.clusters` while reloading the cluster configuration at the same time. [#25737](https://github.com/ClickHouse/ClickHouse/pull/25737) ([Amos Bird](https://github.com/amosbird)). +* Fixed `No such file or directory` error on moving `Distributed` table between databases. Fixes [#24971](https://github.com/ClickHouse/ClickHouse/issues/24971). [#25667](https://github.com/ClickHouse/ClickHouse/pull/25667) ([tavplubix](https://github.com/tavplubix)). +* `REPLACE PARTITION` might be ignored in rare cases if the source partition was empty. It's fixed. Fixes [#24869](https://github.com/ClickHouse/ClickHouse/issues/24869). [#25665](https://github.com/ClickHouse/ClickHouse/pull/25665) ([tavplubix](https://github.com/tavplubix)). +* Fixed a bug in `Replicated` database engine that might rarely cause some replica to skip enqueued DDL query. [#24805](https://github.com/ClickHouse/ClickHouse/pull/24805) ([tavplubix](https://github.com/tavplubix)). +* Fix null pointer dereference in `EXPLAIN AST` without query. [#25631](https://github.com/ClickHouse/ClickHouse/pull/25631) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix waiting of automatic dropping of empty parts. It could lead to full filling of background pool and stuck of replication. [#23315](https://github.com/ClickHouse/ClickHouse/pull/23315) ([Anton Popov](https://github.com/CurtizJ)). +* Fix restore of a table stored in S3 virtual filesystem (it is an experimental feature not ready for production). [#25601](https://github.com/ClickHouse/ClickHouse/pull/25601) ([ianton-ru](https://github.com/ianton-ru)). +* Fix nullptr dereference in `Arrow` format when using `Decimal256`. Add `Decimal256` support for `Arrow` format. [#25531](https://github.com/ClickHouse/ClickHouse/pull/25531) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix excessive underscore before the names of the preprocessed configuration files. [#25431](https://github.com/ClickHouse/ClickHouse/pull/25431) ([Vitaly Baranov](https://github.com/vitlibar)). +* A fix for `clickhouse-copier` tool: Fix segfault when sharding_key is absent in task config for copier. [#25419](https://github.com/ClickHouse/ClickHouse/pull/25419) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix `REPLACE` column transformer when used in DDL by correctly quoting the formated query. This fixes [#23925](https://github.com/ClickHouse/ClickHouse/issues/23925). [#25391](https://github.com/ClickHouse/ClickHouse/pull/25391) ([Amos Bird](https://github.com/amosbird)). +* Fix the possibility of non-deterministic behaviour of the `quantileDeterministic` function and similar. This closes [#20480](https://github.com/ClickHouse/ClickHouse/issues/20480). [#25313](https://github.com/ClickHouse/ClickHouse/pull/25313) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Support `SimpleAggregateFunction(LowCardinality)` for `SummingMergeTree`. Fixes [#25134](https://github.com/ClickHouse/ClickHouse/issues/25134). [#25300](https://github.com/ClickHouse/ClickHouse/pull/25300) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix logical error with exception message "Cannot sum Array/Tuple in min/maxMap". [#25298](https://github.com/ClickHouse/ClickHouse/pull/25298) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix error `Bad cast from type DB::ColumnLowCardinality to DB::ColumnVector` for queries where `LowCardinality` argument was used for IN (this bug appeared in 21.6). Fixes [#25187](https://github.com/ClickHouse/ClickHouse/issues/25187). [#25290](https://github.com/ClickHouse/ClickHouse/pull/25290) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix incorrect behaviour of `joinGetOrNull` with not-nullable columns. This fixes [#24261](https://github.com/ClickHouse/ClickHouse/issues/24261). [#25288](https://github.com/ClickHouse/ClickHouse/pull/25288) ([Amos Bird](https://github.com/amosbird)). +* Fix incorrect behaviour and UBSan report in big integers. In previous versions `CAST(1e19 AS UInt128)` returned zero. [#25279](https://github.com/ClickHouse/ClickHouse/pull/25279) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed an error which occurred while inserting a subset of columns using CSVWithNames format. Fixes [#25129](https://github.com/ClickHouse/ClickHouse/issues/25129). [#25169](https://github.com/ClickHouse/ClickHouse/pull/25169) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Do not use table's projection for `SELECT` with `FINAL`. It is not supported yet. [#25163](https://github.com/ClickHouse/ClickHouse/pull/25163) ([Amos Bird](https://github.com/amosbird)). +* Fix possible parts loss after updating up to 21.5 in case table used `UUID` in partition key. (It is not recommended to use `UUID` in partition key). Fixes [#25070](https://github.com/ClickHouse/ClickHouse/issues/25070). [#25127](https://github.com/ClickHouse/ClickHouse/pull/25127) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix crash in query with cross join and `joined_subquery_requires_alias = 0`. Fixes [#24011](https://github.com/ClickHouse/ClickHouse/issues/24011). [#25082](https://github.com/ClickHouse/ClickHouse/pull/25082) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bug with constant maps in mapContains function that lead to error `empty column was returned by function mapContains`. Closes [#25077](https://github.com/ClickHouse/ClickHouse/issues/25077). [#25080](https://github.com/ClickHouse/ClickHouse/pull/25080) ([Kruglov Pavel](https://github.com/Avogar)). +* Remove possibility to create tables with columns referencing themselves like `a UInt32 ALIAS a + 1` or `b UInt32 MATERIALIZED b`. Fixes [#24910](https://github.com/ClickHouse/ClickHouse/issues/24910), [#24292](https://github.com/ClickHouse/ClickHouse/issues/24292). [#25059](https://github.com/ClickHouse/ClickHouse/pull/25059) ([alesapin](https://github.com/alesapin)). +* Fix wrong result when using aggregate projection with *not empty* `GROUP BY` key to execute query with `GROUP BY` by *empty* key. [#25055](https://github.com/ClickHouse/ClickHouse/pull/25055) ([Amos Bird](https://github.com/amosbird)). +* Fix serialization of splitted nested messages in Protobuf format. This PR fixes [#24647](https://github.com/ClickHouse/ClickHouse/issues/24647). [#25000](https://github.com/ClickHouse/ClickHouse/pull/25000) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix limit/offset settings for distributed queries (ignore on the remote nodes). [#24940](https://github.com/ClickHouse/ClickHouse/pull/24940) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible heap-buffer-overflow in `Arrow` format. [#24922](https://github.com/ClickHouse/ClickHouse/pull/24922) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixed possible error 'Cannot read from istream at offset 0' when reading a file from DiskS3 (S3 virtual filesystem is an experimental feature under development that should not be used in production). [#24885](https://github.com/ClickHouse/ClickHouse/pull/24885) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fix "Missing columns" exception when joining Distributed Materialized View. [#24870](https://github.com/ClickHouse/ClickHouse/pull/24870) ([Azat Khuzhin](https://github.com/azat)). +* Allow `NULL` values in postgresql compatibility protocol. Closes [#22622](https://github.com/ClickHouse/ClickHouse/issues/22622). [#24857](https://github.com/ClickHouse/ClickHouse/pull/24857) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix bug when exception `Mutation was killed` can be thrown to the client on mutation wait when mutation not loaded into memory yet. [#24809](https://github.com/ClickHouse/ClickHouse/pull/24809) ([alesapin](https://github.com/alesapin)). +* Fixed bug in deserialization of random generator state with might cause some data types such as `AggregateFunction(groupArraySample(N), T))` to behave in a non-deterministic way. [#24538](https://github.com/ClickHouse/ClickHouse/pull/24538) ([tavplubix](https://github.com/tavplubix)). +* Disallow building uniqXXXXStates of other aggregation states. [#24523](https://github.com/ClickHouse/ClickHouse/pull/24523) ([Raúl Marín](https://github.com/Algunenano)). Then allow it back by actually eliminating the root cause of the related issue. ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix usage of tuples in `CREATE .. AS SELECT` queries. [#24464](https://github.com/ClickHouse/ClickHouse/pull/24464) ([Anton Popov](https://github.com/CurtizJ)). +* Fix computation of total bytes in `Buffer` table. In current ClickHouse version total_writes.bytes counter decreases too much during the buffer flush. It leads to counter overflow and totalBytes return something around 17.44 EB some time after the flush. [#24450](https://github.com/ClickHouse/ClickHouse/pull/24450) ([DimasKovas](https://github.com/DimasKovas)). +* Fix incorrect information about the monotonicity of toWeek function. This fixes [#24422](https://github.com/ClickHouse/ClickHouse/issues/24422) . This bug was introduced in https://github.com/ClickHouse/ClickHouse/pull/5212 , and was exposed later by smarter partition pruner. [#24446](https://github.com/ClickHouse/ClickHouse/pull/24446) ([Amos Bird](https://github.com/amosbird)). +* When user authentication is managed by LDAP. Fixed potential deadlock that can happen during LDAP role (re)mapping, when LDAP group is mapped to a nonexistent local role. [#24431](https://github.com/ClickHouse/ClickHouse/pull/24431) ([Denis Glazachev](https://github.com/traceon)). +* In "multipart/form-data" message consider the CRLF preceding a boundary as part of it. Fixes [#23905](https://github.com/ClickHouse/ClickHouse/issues/23905). [#24399](https://github.com/ClickHouse/ClickHouse/pull/24399) ([Ivan](https://github.com/abyss7)). +* Fix drop partition with intersect fake parts. In rare cases there might be parts with mutation version greater than current block number. [#24321](https://github.com/ClickHouse/ClickHouse/pull/24321) ([Amos Bird](https://github.com/amosbird)). +* Fixed a bug in moving Materialized View from Ordinary to Atomic database (`RENAME TABLE` query). Now inner table is moved to new database together with Materialized View. Fixes [#23926](https://github.com/ClickHouse/ClickHouse/issues/23926). [#24309](https://github.com/ClickHouse/ClickHouse/pull/24309) ([tavplubix](https://github.com/tavplubix)). +* Allow empty HTTP headers. Fixes [#23901](https://github.com/ClickHouse/ClickHouse/issues/23901). [#24285](https://github.com/ClickHouse/ClickHouse/pull/24285) ([Ivan](https://github.com/abyss7)). +* Correct processing of mutations (ALTER UPDATE/DELETE) in Memory tables. Closes [#24274](https://github.com/ClickHouse/ClickHouse/issues/24274). [#24275](https://github.com/ClickHouse/ClickHouse/pull/24275) ([flynn](https://github.com/ucasfl)). +* Make column LowCardinality property in JOIN output the same as in the input, close [#23351](https://github.com/ClickHouse/ClickHouse/issues/23351), close [#20315](https://github.com/ClickHouse/ClickHouse/issues/20315). [#24061](https://github.com/ClickHouse/ClickHouse/pull/24061) ([Vladimir](https://github.com/vdimir)). +* A fix for Kafka tables. Fix the bug in failover behavior when Engine = Kafka was not able to start consumption if the same consumer had an empty assignment previously. Closes [#21118](https://github.com/ClickHouse/ClickHouse/issues/21118). [#21267](https://github.com/ClickHouse/ClickHouse/pull/21267) ([filimonov](https://github.com/filimonov)). + +#### Build/Testing/Packaging Improvement + +* Add `darwin-aarch64` (Mac M1 / Apple Silicon) builds in CI [#25560](https://github.com/ClickHouse/ClickHouse/pull/25560) ([Ivan](https://github.com/abyss7)) and put the links to the docs and website ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Adds cross-platform embedding of binary resources into executables. It works on Illumos. [#25146](https://github.com/ClickHouse/ClickHouse/pull/25146) ([bnaecker](https://github.com/bnaecker)). +* Add join related options to stress tests to improve fuzzing. [#25200](https://github.com/ClickHouse/ClickHouse/pull/25200) ([Vladimir](https://github.com/vdimir)). +* Enable build with s3 module in osx [#25217](https://github.com/ClickHouse/ClickHouse/issues/25217). [#25218](https://github.com/ClickHouse/ClickHouse/pull/25218) ([kevin wan](https://github.com/MaxWk)). +* Add integration test cases to cover JDBC bridge. [#25047](https://github.com/ClickHouse/ClickHouse/pull/25047) ([Zhichun Wu](https://github.com/zhicwu)). +* Integration tests configuration has special treatment for dictionaries. Removed remaining dictionaries manual setup. [#24728](https://github.com/ClickHouse/ClickHouse/pull/24728) ([Ilya Yatsishin](https://github.com/qoega)). +* Add libfuzzer tests for YAMLParser class. [#24480](https://github.com/ClickHouse/ClickHouse/pull/24480) ([BoloniniD](https://github.com/BoloniniD)). +* Ubuntu 20.04 is now used to run integration tests, docker-compose version used to run integration tests is updated to 1.28.2. Environment variables now take effect on docker-compose. Rework test_dictionaries_all_layouts_separate_sources to allow parallel run. [#20393](https://github.com/ClickHouse/ClickHouse/pull/20393) ([Ilya Yatsishin](https://github.com/qoega)). +* Fix TOCTOU error in installation script. [#25277](https://github.com/ClickHouse/ClickHouse/pull/25277) ([alexey-milovidov](https://github.com/alexey-milovidov)). + + +### ClickHouse release 21.6, 2021-06-05 + +#### Backward Incompatible Change +* uniqState / uniqHLL12State / uniqCombinedState / uniqCombined64State produce incompatible states with `UUID` type. [#33607](https://github.com/ClickHouse/ClickHouse/issues/33607). + +#### Upgrade Notes + +* `zstd` compression library is updated to v1.5.0. You may get messages about "checksum does not match" in replication. These messages are expected due to update of compression algorithm and you can ignore them. These messages are informational and do not indicate any kinds of undesired behaviour. +* The setting `compile_expressions` is enabled by default. Although it has been heavily tested on variety of scenarios, if you find some undesired behaviour on your servers, you can try turning this setting off. +* Values of `UUID` type cannot be compared with integer. For example, instead of writing `uuid != 0` type `uuid != '00000000-0000-0000-0000-000000000000'`. + +#### New Feature + +* Add Postgres-like cast operator (`::`). E.g.: `[1, 2]::Array(UInt8)`, `0.1::Decimal(4, 4)`, `number::UInt16`. [#23871](https://github.com/ClickHouse/ClickHouse/pull/23871) ([Anton Popov](https://github.com/CurtizJ)). +* Make big integers production ready. Add support for `UInt128` data type. Fix known issues with the `Decimal256` data type. Support big integers in dictionaries. Support `gcd`/`lcm` functions for big integers. Support big integers in array search and conditional functions. Support `LowCardinality(UUID)`. Support big integers in `generateRandom` table function and `clickhouse-obfuscator`. Fix error with returning `UUID` from scalar subqueries. This fixes [#7834](https://github.com/ClickHouse/ClickHouse/issues/7834). This fixes [#23936](https://github.com/ClickHouse/ClickHouse/issues/23936). This fixes [#4176](https://github.com/ClickHouse/ClickHouse/issues/4176). This fixes [#24018](https://github.com/ClickHouse/ClickHouse/issues/24018). Backward incompatible change: values of `UUID` type cannot be compared with integer. For example, instead of writing `uuid != 0` type `uuid != '00000000-0000-0000-0000-000000000000'`. [#23631](https://github.com/ClickHouse/ClickHouse/pull/23631) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Support `Array` data type for inserting and selecting data in `Arrow`, `Parquet` and `ORC` formats. [#21770](https://github.com/ClickHouse/ClickHouse/pull/21770) ([taylor12805](https://github.com/taylor12805)). +* Implement table comments. Closes [#23225](https://github.com/ClickHouse/ClickHouse/issues/23225). [#23548](https://github.com/ClickHouse/ClickHouse/pull/23548) ([flynn](https://github.com/ucasFL)). +* Support creating dictionaries with DDL queries in `clickhouse-local`. Closes [#22354](https://github.com/ClickHouse/ClickHouse/issues/22354). Added support for `DETACH DICTIONARY PERMANENTLY`. Added support for `EXCHANGE DICTIONARIES` for `Atomic` database engine. Added support for moving dictionaries between databases using `RENAME DICTIONARY`. [#23436](https://github.com/ClickHouse/ClickHouse/pull/23436) ([Maksim Kita](https://github.com/kitaisreal)). +* Add aggregate function `uniqTheta` to support [Theta Sketch](https://datasketches.apache.org/docs/Theta/ThetaSketchFramework.html) in ClickHouse. [#23894](https://github.com/ClickHouse/ClickHouse/pull/23894). [#22609](https://github.com/ClickHouse/ClickHouse/pull/22609) ([Ping Yu](https://github.com/pingyu)). +* Add function `splitByRegexp`. [#24077](https://github.com/ClickHouse/ClickHouse/pull/24077) ([abel-cheng](https://github.com/abel-cheng)). +* Add function `arrayProduct` which accept an array as the parameter, and return the product of all the elements in array. Closes [#21613](https://github.com/ClickHouse/ClickHouse/issues/21613). [#23782](https://github.com/ClickHouse/ClickHouse/pull/23782) ([Maksim Kita](https://github.com/kitaisreal)). +* Add `thread_name` column in `system.stack_trace`. This closes [#23256](https://github.com/ClickHouse/ClickHouse/issues/23256). [#24124](https://github.com/ClickHouse/ClickHouse/pull/24124) ([abel-cheng](https://github.com/abel-cheng)). +* If `insert_null_as_default` = 1, insert default values instead of NULL in `INSERT ... SELECT` and `INSERT ... SELECT ... UNION ALL ...` queries. Closes [#22832](https://github.com/ClickHouse/ClickHouse/issues/22832). [#23524](https://github.com/ClickHouse/ClickHouse/pull/23524) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add support for progress indication in `clickhouse-local` with `--progress` option. [#23196](https://github.com/ClickHouse/ClickHouse/pull/23196) ([Egor Savin](https://github.com/Amesaru)). +* Add support for HTTP compression (determined by `Content-Encoding` HTTP header) in `http` dictionary source. This fixes [#8912](https://github.com/ClickHouse/ClickHouse/issues/8912). [#23946](https://github.com/ClickHouse/ClickHouse/pull/23946) ([FArthur-cmd](https://github.com/FArthur-cmd)). +* Added `SYSTEM QUERY RELOAD MODEL`, `SYSTEM QUERY RELOAD MODELS`. Closes [#18722](https://github.com/ClickHouse/ClickHouse/issues/18722). [#23182](https://github.com/ClickHouse/ClickHouse/pull/23182) ([Maksim Kita](https://github.com/kitaisreal)). +* Add setting `json` (boolean, 0 by default) for `EXPLAIN PLAN` query. When enabled, query output will be a single `JSON` row. It is recommended to use `TSVRaw` format to avoid unnecessary escaping. [#23082](https://github.com/ClickHouse/ClickHouse/pull/23082) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Add setting `indexes` (boolean, disabled by default) to `EXPLAIN PIPELINE` query. When enabled, shows used indexes, number of filtered parts and granules for every index applied. Supported for `MergeTree*` tables. [#22352](https://github.com/ClickHouse/ClickHouse/pull/22352) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* LDAP: implemented user DN detection functionality to use when mapping Active Directory groups to ClickHouse roles. [#22228](https://github.com/ClickHouse/ClickHouse/pull/22228) ([Denis Glazachev](https://github.com/traceon)). +* New aggregate function `deltaSumTimestamp` for summing the difference between consecutive rows while maintaining ordering during merge by storing timestamps. [#21888](https://github.com/ClickHouse/ClickHouse/pull/21888) ([Russ Frank](https://github.com/rf)). +* Added less secure IMDS credentials provider for S3 which works under docker correctly. [#21852](https://github.com/ClickHouse/ClickHouse/pull/21852) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Add back `indexHint` function. This is for [#21238](https://github.com/ClickHouse/ClickHouse/issues/21238). This reverts [#9542](https://github.com/ClickHouse/ClickHouse/pull/9542). This fixes [#9540](https://github.com/ClickHouse/ClickHouse/issues/9540). [#21304](https://github.com/ClickHouse/ClickHouse/pull/21304) ([Amos Bird](https://github.com/amosbird)). + +#### Experimental Feature + +* Add `PROJECTION` support for `MergeTree*` tables. [#20202](https://github.com/ClickHouse/ClickHouse/pull/20202) ([Amos Bird](https://github.com/amosbird)). + +#### Performance Improvement + +* Enable `compile_expressions` setting by default. When this setting enabled, compositions of simple functions and operators will be compiled to native code with LLVM at runtime. [#8482](https://github.com/ClickHouse/ClickHouse/pull/8482) ([Maksim Kita](https://github.com/kitaisreal), [alexey-milovidov](https://github.com/alexey-milovidov)). Note: if you feel in trouble, turn this option off. +* Update `re2` library. Performance of regular expressions matching is improved. Also this PR adds compatibility with gcc-11. [#24196](https://github.com/ClickHouse/ClickHouse/pull/24196) ([Raúl Marín](https://github.com/Algunenano)). +* ORC input format reading by stripe instead of reading entire table into memory by once which is cost memory when file size is huge. [#23102](https://github.com/ClickHouse/ClickHouse/pull/23102) ([Chao Ma](https://github.com/godliness)). +* Fusion of aggregate functions `sum`, `count` and `avg` in a query into single aggregate function. The optimization is controlled with the `optimize_fuse_sum_count_avg` setting. This is implemented with a new aggregate function `sumCount`. This function returns a tuple of two fields: `sum` and `count`. [#21337](https://github.com/ClickHouse/ClickHouse/pull/21337) ([hexiaoting](https://github.com/hexiaoting)). +* Update `zstd` to v1.5.0. The performance of compression is improved for single digits percentage. [#24135](https://github.com/ClickHouse/ClickHouse/pull/24135) ([Raúl Marín](https://github.com/Algunenano)). Note: you may get messages about "checksum does not match" in replication. These messages are expected due to update of compression algorithm and you can ignore them. +* Improved performance of `Buffer` tables: do not acquire lock for total_bytes/total_rows for `Buffer` engine. [#24066](https://github.com/ClickHouse/ClickHouse/pull/24066) ([Azat Khuzhin](https://github.com/azat)). +* Preallocate support for hashed/sparse_hashed dictionaries is returned. [#23979](https://github.com/ClickHouse/ClickHouse/pull/23979) ([Azat Khuzhin](https://github.com/azat)). +* Enable `async_socket_for_remote` by default (lower amount of threads in querying Distributed tables with large fanout). [#23683](https://github.com/ClickHouse/ClickHouse/pull/23683) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). + +#### Improvement + +* Add `_partition_value` virtual column to MergeTree table family. It can be used to prune partition in a deterministic way. It's needed to implement partition matcher for mutations. [#23673](https://github.com/ClickHouse/ClickHouse/pull/23673) ([Amos Bird](https://github.com/amosbird)). +* Added `region` parameter for S3 storage and disk. [#23846](https://github.com/ClickHouse/ClickHouse/pull/23846) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Allow configuring different log levels for different logging channels. Closes [#19569](https://github.com/ClickHouse/ClickHouse/issues/19569). [#23857](https://github.com/ClickHouse/ClickHouse/pull/23857) ([filimonov](https://github.com/filimonov)). +* Keep default timezone on `DateTime` operations if it was not provided explicitly. For example, if you add one second to a value of `DateTime` type without timezone it will remain `DateTime` without timezone. In previous versions the value of default timezone was placed to the returned data type explicitly so it becomes DateTime('something'). This closes [#4854](https://github.com/ClickHouse/ClickHouse/issues/4854). [#23392](https://github.com/ClickHouse/ClickHouse/pull/23392) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow user to specify empty string instead of database name for `MySQL` storage. Default database will be used for queries. In previous versions it was working for SELECT queries and not support for INSERT was also added. This closes [#19281](https://github.com/ClickHouse/ClickHouse/issues/19281). This can be useful working with `Sphinx` or other MySQL-compatible foreign databases. [#23319](https://github.com/ClickHouse/ClickHouse/pull/23319) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `quantile(s)TDigest`. Added special handling of singleton centroids according to tdunning/t-digest 3.2+. Also a bug with over-compression of centroids in implementation of earlier version of the algorithm was fixed. [#23314](https://github.com/ClickHouse/ClickHouse/pull/23314) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Function `now64` now supports optional timezone argument. [#24091](https://github.com/ClickHouse/ClickHouse/pull/24091) ([Vasily Nemkov](https://github.com/Enmk)). +* Fix the case when a progress bar in interactive mode in clickhouse-client that appear in the middle of the data may rewrite some parts of visible data in terminal. This closes [#19283](https://github.com/ClickHouse/ClickHouse/issues/19283). [#23050](https://github.com/ClickHouse/ClickHouse/pull/23050) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix crash when memory allocation fails in simdjson. https://github.com/simdjson/simdjson/pull/1567 . Mark as improvement because it's a very rare bug. [#24147](https://github.com/ClickHouse/ClickHouse/pull/24147) ([Amos Bird](https://github.com/amosbird)). +* Preserve dictionaries until storage shutdown (this will avoid possible `external dictionary 'DICT' not found` errors at server shutdown during final flush of the `Buffer` engine). [#24068](https://github.com/ClickHouse/ClickHouse/pull/24068) ([Azat Khuzhin](https://github.com/azat)). +* Flush `Buffer` tables before shutting down tables (within one database), to avoid discarding blocks due to underlying table had been already detached (and `Destination table default.a_data_01870 doesn't exist. Block of data is discarded` error in the log). [#24067](https://github.com/ClickHouse/ClickHouse/pull/24067) ([Azat Khuzhin](https://github.com/azat)). +* Now `prefer_column_name_to_alias = 1` will also favor column names for `group by`, `having` and `order by`. This fixes [#23882](https://github.com/ClickHouse/ClickHouse/issues/23882). [#24022](https://github.com/ClickHouse/ClickHouse/pull/24022) ([Amos Bird](https://github.com/amosbird)). +* Add support for `ORDER BY WITH FILL` with `DateTime64`. [#24016](https://github.com/ClickHouse/ClickHouse/pull/24016) ([kevin wan](https://github.com/MaxWk)). +* Enable `DateTime64` to be a version column in `ReplacingMergeTree`. [#23992](https://github.com/ClickHouse/ClickHouse/pull/23992) ([kevin wan](https://github.com/MaxWk)). +* Log information about OS name, kernel version and CPU architecture on server startup. [#23988](https://github.com/ClickHouse/ClickHouse/pull/23988) ([Azat Khuzhin](https://github.com/azat)). +* Support specifying table schema for `postgresql` dictionary source. Closes [#23958](https://github.com/ClickHouse/ClickHouse/issues/23958). [#23980](https://github.com/ClickHouse/ClickHouse/pull/23980) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add hints for names of `Enum` elements (suggest names in case of typos). Closes [#17112](https://github.com/ClickHouse/ClickHouse/issues/17112). [#23919](https://github.com/ClickHouse/ClickHouse/pull/23919) ([flynn](https://github.com/ucasFL)). +* Measure found rate (the percentage for which the value was found) for dictionaries (see `found_rate` in `system.dictionaries`). [#23916](https://github.com/ClickHouse/ClickHouse/pull/23916) ([Azat Khuzhin](https://github.com/azat)). +* Allow to add specific queue settings via table settng `rabbitmq_queue_settings_list`. (Closes [#23737](https://github.com/ClickHouse/ClickHouse/issues/23737) and [#23918](https://github.com/ClickHouse/ClickHouse/issues/23918)). Allow user to control all RabbitMQ setup: if table setting `rabbitmq_queue_consume` is set to `1` - RabbitMQ table engine will only connect to specified queue and will not perform any RabbitMQ consumer-side setup like declaring exchange, queues, bindings. (Closes [#21757](https://github.com/ClickHouse/ClickHouse/issues/21757)). Add proper cleanup when RabbitMQ table is dropped - delete queues, which the table has declared and all bound exchanges - if they were created by the table. [#23887](https://github.com/ClickHouse/ClickHouse/pull/23887) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add `broken_data_files`/`broken_data_compressed_bytes` into `system.distribution_queue`. Add metric for number of files for asynchronous insertion into Distributed tables that has been marked as broken (`BrokenDistributedFilesToInsert`). [#23885](https://github.com/ClickHouse/ClickHouse/pull/23885) ([Azat Khuzhin](https://github.com/azat)). +* Querying `system.tables` does not go to ZooKeeper anymore. [#23793](https://github.com/ClickHouse/ClickHouse/pull/23793) ([Fuwang Hu](https://github.com/fuwhu)). +* Respect `lock_acquire_timeout_for_background_operations` for `OPTIMIZE` queries. [#23623](https://github.com/ClickHouse/ClickHouse/pull/23623) ([Azat Khuzhin](https://github.com/azat)). +* Possibility to change `S3` disk settings in runtime via new `SYSTEM RESTART DISK` SQL command. [#23429](https://github.com/ClickHouse/ClickHouse/pull/23429) ([Pavel Kovalenko](https://github.com/Jokser)). +* If user applied a misconfiguration by mistakenly setting `max_distributed_connections` to value zero, every query to a `Distributed` table will throw exception with a message containing "logical error". But it's really an expected behaviour, not a logical error, so the exception message was slightly incorrect. It also triggered checks in our CI enviroment that ensures that no logical errors ever happen. Instead we will treat `max_distributed_connections` misconfigured to zero as the minimum possible value (one). [#23348](https://github.com/ClickHouse/ClickHouse/pull/23348) ([Azat Khuzhin](https://github.com/azat)). +* Disable `min_bytes_to_use_mmap_io` by default. [#23322](https://github.com/ClickHouse/ClickHouse/pull/23322) ([Azat Khuzhin](https://github.com/azat)). +* Support `LowCardinality` nullability with `join_use_nulls`, close [#15101](https://github.com/ClickHouse/ClickHouse/issues/15101). [#23237](https://github.com/ClickHouse/ClickHouse/pull/23237) ([vdimir](https://github.com/vdimir)). +* Added possibility to restore `MergeTree` parts to `detached` directory for `S3` disk. [#23112](https://github.com/ClickHouse/ClickHouse/pull/23112) ([Pavel Kovalenko](https://github.com/Jokser)). +* Retries on HTTP connection drops in S3. [#22988](https://github.com/ClickHouse/ClickHouse/pull/22988) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Add settings `external_storage_max_read_rows` and `external_storage_max_read_rows` for MySQL table engine, dictionary source and MaterializeMySQL minor data fetches. [#22697](https://github.com/ClickHouse/ClickHouse/pull/22697) ([TCeason](https://github.com/TCeason)). +* `MaterializeMySQL` (experimental feature): Previously, MySQL 5.7.9 was not supported due to SQL incompatibility. Now leave MySQL parameter verification to the MaterializeMySQL. [#23413](https://github.com/ClickHouse/ClickHouse/pull/23413) ([TCeason](https://github.com/TCeason)). +* Enable reading of subcolumns for distributed tables. [#24472](https://github.com/ClickHouse/ClickHouse/pull/24472) ([Anton Popov](https://github.com/CurtizJ)). +* Fix usage of tuples in `CREATE .. AS SELECT` queries. [#24464](https://github.com/ClickHouse/ClickHouse/pull/24464) ([Anton Popov](https://github.com/CurtizJ)). +* Support for `Parquet` format in `Kafka` tables. [#23412](https://github.com/ClickHouse/ClickHouse/pull/23412) ([Chao Ma](https://github.com/godliness)). + +#### Bug Fix + +* Use old modulo function version when used in partition key and primary key. Closes [#23508](https://github.com/ClickHouse/ClickHouse/issues/23508). [#24157](https://github.com/ClickHouse/ClickHouse/pull/24157) ([Kseniia Sumarokova](https://github.com/kssenii)). It was a source of backward incompatibility in previous releases. +* Fixed the behavior when query `SYSTEM RESTART REPLICA` or `SYSTEM SYNC REPLICA` is being processed infinitely. This was detected on server with extremely little amount of RAM. [#24457](https://github.com/ClickHouse/ClickHouse/pull/24457) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix incorrect monotonicity of `toWeek` function. This fixes [#24422](https://github.com/ClickHouse/ClickHouse/issues/24422) . This bug was introduced in [#5212](https://github.com/ClickHouse/ClickHouse/pull/5212), and was exposed later by smarter partition pruner. [#24446](https://github.com/ClickHouse/ClickHouse/pull/24446) ([Amos Bird](https://github.com/amosbird)). +* Fix drop partition with intersect fake parts. In rare cases there might be parts with mutation version greater than current block number. [#24321](https://github.com/ClickHouse/ClickHouse/pull/24321) ([Amos Bird](https://github.com/amosbird)). +* Fixed a bug in moving Materialized View from Ordinary to Atomic database (`RENAME TABLE` query). Now inner table is moved to new database together with Materialized View. Fixes [#23926](https://github.com/ClickHouse/ClickHouse/issues/23926). [#24309](https://github.com/ClickHouse/ClickHouse/pull/24309) ([tavplubix](https://github.com/tavplubix)). +* Allow empty HTTP headers in client requests. Fixes [#23901](https://github.com/ClickHouse/ClickHouse/issues/23901). [#24285](https://github.com/ClickHouse/ClickHouse/pull/24285) ([Ivan](https://github.com/abyss7)). +* Set `max_threads = 1` to fix mutation fail of `Memory` tables. Closes [#24274](https://github.com/ClickHouse/ClickHouse/issues/24274). [#24275](https://github.com/ClickHouse/ClickHouse/pull/24275) ([flynn](https://github.com/ucasFL)). +* Fix typo in implementation of `Memory` tables, this bug was introduced at [#15127](https://github.com/ClickHouse/ClickHouse/issues/15127). Closes [#24192](https://github.com/ClickHouse/ClickHouse/issues/24192). [#24193](https://github.com/ClickHouse/ClickHouse/pull/24193) ([张中å—](https://github.com/plugine)). +* Fix abnormal server termination due to `HDFS` becoming not accessible during query execution. Closes [#24117](https://github.com/ClickHouse/ClickHouse/issues/24117). [#24191](https://github.com/ClickHouse/ClickHouse/pull/24191) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix crash on updating of `Nested` column with const condition. [#24183](https://github.com/ClickHouse/ClickHouse/pull/24183) ([hexiaoting](https://github.com/hexiaoting)). +* Fix race condition which could happen in RBAC under a heavy load. This PR fixes [#24090](https://github.com/ClickHouse/ClickHouse/issues/24090), [#24134](https://github.com/ClickHouse/ClickHouse/issues/24134),. [#24176](https://github.com/ClickHouse/ClickHouse/pull/24176) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix a rare bug that could lead to a partially initialized table that can serve write requests (insert/alter/so on). Now such tables will be in readonly mode. [#24122](https://github.com/ClickHouse/ClickHouse/pull/24122) ([alesapin](https://github.com/alesapin)). +* Fix an issue: `EXPLAIN PIPELINE` with `SELECT xxx FINAL` showed a wrong pipeline. ([hexiaoting](https://github.com/hexiaoting)). +* Fixed using const `DateTime` value vs `DateTime64` column in `WHERE`. [#24100](https://github.com/ClickHouse/ClickHouse/pull/24100) ([Vasily Nemkov](https://github.com/Enmk)). +* Fix crash in merge JOIN, closes [#24010](https://github.com/ClickHouse/ClickHouse/issues/24010). [#24013](https://github.com/ClickHouse/ClickHouse/pull/24013) ([vdimir](https://github.com/vdimir)). +* Some `ALTER PARTITION` queries might cause `Part A intersects previous part B` and `Unexpected merged part C intersecting drop range D` errors in replication queue. It's fixed. Fixes [#23296](https://github.com/ClickHouse/ClickHouse/issues/23296). [#23997](https://github.com/ClickHouse/ClickHouse/pull/23997) ([tavplubix](https://github.com/tavplubix)). +* Fix SIGSEGV for external GROUP BY and overflow row (i.e. queries like `SELECT FROM GROUP BY WITH TOTALS SETTINGS max_bytes_before_external_group_by>0, max_rows_to_group_by>0, group_by_overflow_mode='any', totals_mode='before_having'`). [#23962](https://github.com/ClickHouse/ClickHouse/pull/23962) ([Azat Khuzhin](https://github.com/azat)). +* Fix keys metrics accounting for `CACHE` dictionary with duplicates in the source (leads to `DictCacheKeysRequestedMiss` overflows). [#23929](https://github.com/ClickHouse/ClickHouse/pull/23929) ([Azat Khuzhin](https://github.com/azat)). +* Fix implementation of connection pool of `PostgreSQL` engine. Closes [#23897](https://github.com/ClickHouse/ClickHouse/issues/23897). [#23909](https://github.com/ClickHouse/ClickHouse/pull/23909) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix `distributed_group_by_no_merge = 2` with `GROUP BY` and aggregate function wrapped into regular function (had been broken in [#23546](https://github.com/ClickHouse/ClickHouse/issues/23546)). Throw exception in case of someone trying to use `distributed_group_by_no_merge = 2` with window functions. Disable `optimize_distributed_group_by_sharding_key` for queries with window functions. [#23906](https://github.com/ClickHouse/ClickHouse/pull/23906) ([Azat Khuzhin](https://github.com/azat)). +* A fix for `s3` table function: better handling of HTTP errors. Response bodies of HTTP errors were being ignored earlier. [#23844](https://github.com/ClickHouse/ClickHouse/pull/23844) ([Vladimir Chebotarev](https://github.com/excitoon)). +* A fix for `s3` table function: better handling of URI's. Fixed an incompatibility with URLs containing `+` symbol, data with such keys could not be read previously. [#23822](https://github.com/ClickHouse/ClickHouse/pull/23822) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fix error `Can't initialize pipeline with empty pipe` for queries with `GLOBAL IN/JOIN` and `use_hedged_requests`. Fixes [#23431](https://github.com/ClickHouse/ClickHouse/issues/23431). [#23805](https://github.com/ClickHouse/ClickHouse/pull/23805) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix `CLEAR COLUMN` does not work when it is referenced by materialized view. Close [#23764](https://github.com/ClickHouse/ClickHouse/issues/23764). [#23781](https://github.com/ClickHouse/ClickHouse/pull/23781) ([flynn](https://github.com/ucasFL)). +* Fix heap use after free when reading from HDFS if `Values` format is used. [#23761](https://github.com/ClickHouse/ClickHouse/pull/23761) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Avoid possible "Cannot schedule a task" error (in case some exception had been occurred) on INSERT into Distributed. [#23744](https://github.com/ClickHouse/ClickHouse/pull/23744) ([Azat Khuzhin](https://github.com/azat)). +* Fixed a bug in recovery of staled `ReplicatedMergeTree` replica. Some metadata updates could be ignored by staled replica if `ALTER` query was executed during downtime of the replica. [#23742](https://github.com/ClickHouse/ClickHouse/pull/23742) ([tavplubix](https://github.com/tavplubix)). +* Fix a bug with `Join` and `WITH TOTALS`, close [#17718](https://github.com/ClickHouse/ClickHouse/issues/17718). [#23549](https://github.com/ClickHouse/ClickHouse/pull/23549) ([vdimir](https://github.com/vdimir)). +* Fix possible `Block structure mismatch` error for queries with `UNION` which could possibly happen after filter-pushdown optimization. Fixes [#23029](https://github.com/ClickHouse/ClickHouse/issues/23029). [#23359](https://github.com/ClickHouse/ClickHouse/pull/23359) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Add type conversion when the setting `optimize_skip_unused_shards_rewrite_in` is enabled. This fixes MSan report. [#23219](https://github.com/ClickHouse/ClickHouse/pull/23219) ([Azat Khuzhin](https://github.com/azat)). +* Add a missing check when updating nested subcolumns, close issue: [#22353](https://github.com/ClickHouse/ClickHouse/issues/22353). [#22503](https://github.com/ClickHouse/ClickHouse/pull/22503) ([hexiaoting](https://github.com/hexiaoting)). + +#### Build/Testing/Packaging Improvement + +* Support building on Illumos. [#24144](https://github.com/ClickHouse/ClickHouse/pull/24144). Adds support for building on Solaris-derived operating systems. [#23746](https://github.com/ClickHouse/ClickHouse/pull/23746) ([bnaecker](https://github.com/bnaecker)). +* Add more benchmarks for hash tables, including the Swiss Table from Google (that appeared to be slower than ClickHouse hash map in our specific usage scenario). [#24111](https://github.com/ClickHouse/ClickHouse/pull/24111) ([Maksim Kita](https://github.com/kitaisreal)). +* Update librdkafka 1.6.0-RC3 to 1.6.1. [#23874](https://github.com/ClickHouse/ClickHouse/pull/23874) ([filimonov](https://github.com/filimonov)). +* Always enable `asynchronous-unwind-tables` explicitly. It may fix query profiler on AArch64. [#23602](https://github.com/ClickHouse/ClickHouse/pull/23602) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Avoid possible build dependency on locale and filesystem order. This allows reproducible builds. [#23600](https://github.com/ClickHouse/ClickHouse/pull/23600) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove a source of nondeterminism from build. Now builds at different point of time will produce byte-identical binaries. Partially addressed [#22113](https://github.com/ClickHouse/ClickHouse/issues/22113). [#23559](https://github.com/ClickHouse/ClickHouse/pull/23559) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add simple tool for benchmarking (Zoo)Keeper. [#23038](https://github.com/ClickHouse/ClickHouse/pull/23038) ([alesapin](https://github.com/alesapin)). + + +## ClickHouse release 21.5, 2021-05-20 + +#### Backward Incompatible Change + +* Change comparison of integers and floating point numbers when integer is not exactly representable in the floating point data type. In new version comparison will return false as the rounding error will occur. Example: `9223372036854775808.0 != 9223372036854775808`, because the number `9223372036854775808` is not representable as floating point number exactly (and `9223372036854775808.0` is rounded to `9223372036854776000.0`). But in previous version the comparison will return as the numbers are equal, because if the floating point number `9223372036854776000.0` get converted back to UInt64, it will yield `9223372036854775808`. For the reference, the Python programming language also treats these numbers as equal. But this behaviour was dependend on CPU model (different results on AMD64 and AArch64 for some out-of-range numbers), so we make the comparison more precise. It will treat int and float numbers equal only if int is represented in floating point type exactly. [#22595](https://github.com/ClickHouse/ClickHouse/pull/22595) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove support for `argMin` and `argMax` for single `Tuple` argument. The code was not memory-safe. The feature was added by mistake and it is confusing for people. These functions can be reintroduced under different names later. This fixes [#22384](https://github.com/ClickHouse/ClickHouse/issues/22384) and reverts [#17359](https://github.com/ClickHouse/ClickHouse/issues/17359). [#23393](https://github.com/ClickHouse/ClickHouse/pull/23393) ([alexey-milovidov](https://github.com/alexey-milovidov)). + +#### New Feature + +* Added functions `dictGetChildren(dictionary, key)`, `dictGetDescendants(dictionary, key, level)`. Function `dictGetChildren` return all children as an array if indexes. It is a inverse transformation for `dictGetHierarchy`. Function `dictGetDescendants` return all descendants as if `dictGetChildren` was applied `level` times recursively. Zero `level` value is equivalent to infinity. Improved performance of `dictGetHierarchy`, `dictIsIn` functions. Closes [#14656](https://github.com/ClickHouse/ClickHouse/issues/14656). [#22096](https://github.com/ClickHouse/ClickHouse/pull/22096) ([Maksim Kita](https://github.com/kitaisreal)). +* Added function `dictGetOrNull`. It works like `dictGet`, but return `Null` in case key was not found in dictionary. Closes [#22375](https://github.com/ClickHouse/ClickHouse/issues/22375). [#22413](https://github.com/ClickHouse/ClickHouse/pull/22413) ([Maksim Kita](https://github.com/kitaisreal)). +* Added a table function `s3Cluster`, which allows to process files from `s3` in parallel on every node of a specified cluster. [#22012](https://github.com/ClickHouse/ClickHouse/pull/22012) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Added support for replicas and shards in MySQL/PostgreSQL table engine / table function. You can write `SELECT * FROM mysql('host{1,2}-{1|2}', ...)`. Closes [#20969](https://github.com/ClickHouse/ClickHouse/issues/20969). [#22217](https://github.com/ClickHouse/ClickHouse/pull/22217) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Added `ALTER TABLE ... FETCH PART ...` query. It's similar to `FETCH PARTITION`, but fetches only one part. [#22706](https://github.com/ClickHouse/ClickHouse/pull/22706) ([turbo jason](https://github.com/songenjie)). +* Added a setting `max_distributed_depth` that limits the depth of recursive queries to `Distributed` tables. Closes [#20229](https://github.com/ClickHouse/ClickHouse/issues/20229). [#21942](https://github.com/ClickHouse/ClickHouse/pull/21942) ([flynn](https://github.com/ucasFL)). + +#### Performance Improvement + +* Improved performance of `intDiv` by dynamic dispatch for AVX2. This closes [#22314](https://github.com/ClickHouse/ClickHouse/issues/22314). [#23000](https://github.com/ClickHouse/ClickHouse/pull/23000) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improved performance of reading from `ArrowStream` input format for sources other then local file (e.g. URL). [#22673](https://github.com/ClickHouse/ClickHouse/pull/22673) ([nvartolomei](https://github.com/nvartolomei)). +* Disabled compression by default when interacting with localhost (with clickhouse-client or server to server with distributed queries) via native protocol. It may improve performance of some import/export operations. This closes [#22234](https://github.com/ClickHouse/ClickHouse/issues/22234). [#22237](https://github.com/ClickHouse/ClickHouse/pull/22237) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Exclude values that does not belong to the shard from right part of IN section for distributed queries (under `optimize_skip_unused_shards_rewrite_in`, enabled by default, since it still requires `optimize_skip_unused_shards`). [#21511](https://github.com/ClickHouse/ClickHouse/pull/21511) ([Azat Khuzhin](https://github.com/azat)). +* Improved performance of reading a subset of columns with File-like table engine and column-oriented format like Parquet, Arrow or ORC. This closes [#issue:20129](https://github.com/ClickHouse/ClickHouse/issues/20129). [#21302](https://github.com/ClickHouse/ClickHouse/pull/21302) ([keenwolf](https://github.com/keen-wolf)). +* Allow to move more conditions to `PREWHERE` as it was before version 21.1 (adjustment of internal heuristics). Insufficient number of moved condtions could lead to worse performance. [#23397](https://github.com/ClickHouse/ClickHouse/pull/23397) ([Anton Popov](https://github.com/CurtizJ)). +* Improved performance of ODBC connections and fixed all the outstanding issues from the backlog. Using `nanodbc` library instead of `Poco::ODBC`. Closes [#9678](https://github.com/ClickHouse/ClickHouse/issues/9678). Add support for DateTime64 and Decimal* for ODBC table engine. Closes [#21961](https://github.com/ClickHouse/ClickHouse/issues/21961). Fixed issue with cyrillic text being truncated. Closes [#16246](https://github.com/ClickHouse/ClickHouse/issues/16246). Added connection pools for odbc bridge. [#21972](https://github.com/ClickHouse/ClickHouse/pull/21972) ([Kseniia Sumarokova](https://github.com/kssenii)). + +#### Improvement + +* Increase `max_uri_size` (the maximum size of URL in HTTP interface) to 1 MiB by default. This closes [#21197](https://github.com/ClickHouse/ClickHouse/issues/21197). [#22997](https://github.com/ClickHouse/ClickHouse/pull/22997) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Set `background_fetches_pool_size` to `8` that is better for production usage with frequent small insertions or slow ZooKeeper cluster. [#22945](https://github.com/ClickHouse/ClickHouse/pull/22945) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* FlatDictionary added `initial_array_size`, `max_array_size` options. [#22521](https://github.com/ClickHouse/ClickHouse/pull/22521) ([Maksim Kita](https://github.com/kitaisreal)). +* Add new setting `non_replicated_deduplication_window` for non-replicated MergeTree inserts deduplication. [#22514](https://github.com/ClickHouse/ClickHouse/pull/22514) ([alesapin](https://github.com/alesapin)). +* Update paths to the `CatBoost` model configs in config reloading. [#22434](https://github.com/ClickHouse/ClickHouse/pull/22434) ([Kruglov Pavel](https://github.com/Avogar)). +* Added `Decimal256` type support in dictionaries. `Decimal256` is experimental feature. Closes [#20979](https://github.com/ClickHouse/ClickHouse/issues/20979). [#22960](https://github.com/ClickHouse/ClickHouse/pull/22960) ([Maksim Kita](https://github.com/kitaisreal)). +* Enabled `async_socket_for_remote` by default (using less amount of OS threads for distributed queries). [#23683](https://github.com/ClickHouse/ClickHouse/pull/23683) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed `quantile(s)TDigest`. Added special handling of singleton centroids according to tdunning/t-digest 3.2+. Also a bug with over-compression of centroids in implementation of earlier version of the algorithm was fixed. [#23314](https://github.com/ClickHouse/ClickHouse/pull/23314) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Make function name `unhex` case insensitive for compatibility with MySQL. [#23229](https://github.com/ClickHouse/ClickHouse/pull/23229) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Implement functions `arrayHasAny`, `arrayHasAll`, `has`, `indexOf`, `countEqual` for generic case when types of array elements are different. In previous versions the functions `arrayHasAny`, `arrayHasAll` returned false and `has`, `indexOf`, `countEqual` thrown exception. Also add support for `Decimal` and big integer types in functions `has` and similar. This closes [#20272](https://github.com/ClickHouse/ClickHouse/issues/20272). [#23044](https://github.com/ClickHouse/ClickHouse/pull/23044) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Raised the threshold on max number of matches in result of the function `extractAllGroupsHorizontal`. [#23036](https://github.com/ClickHouse/ClickHouse/pull/23036) ([Vasily Nemkov](https://github.com/Enmk)). +* Do not perform `optimize_skip_unused_shards` for cluster with one node. [#22999](https://github.com/ClickHouse/ClickHouse/pull/22999) ([Azat Khuzhin](https://github.com/azat)). +* Added ability to run clickhouse-keeper (experimental drop-in replacement to ZooKeeper) with SSL. Config settings `keeper_server.tcp_port_secure` can be used for secure interaction between client and keeper-server. `keeper_server.raft_configuration.secure` can be used to enable internal secure communication between nodes. [#22992](https://github.com/ClickHouse/ClickHouse/pull/22992) ([alesapin](https://github.com/alesapin)). +* Added ability to flush buffer only in background for `Buffer` tables. [#22986](https://github.com/ClickHouse/ClickHouse/pull/22986) ([Azat Khuzhin](https://github.com/azat)). +* When selecting from MergeTree table with NULL in WHERE condition, in rare cases, exception was thrown. This closes [#20019](https://github.com/ClickHouse/ClickHouse/issues/20019). [#22978](https://github.com/ClickHouse/ClickHouse/pull/22978) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix error handling in Poco HTTP Client for AWS. [#22973](https://github.com/ClickHouse/ClickHouse/pull/22973) ([kreuzerkrieg](https://github.com/kreuzerkrieg)). +* Respect `max_part_removal_threads` for `ReplicatedMergeTree`. [#22971](https://github.com/ClickHouse/ClickHouse/pull/22971) ([Azat Khuzhin](https://github.com/azat)). +* Fix obscure corner case of MergeTree settings inactive_parts_to_throw_insert = 0 with inactive_parts_to_delay_insert > 0. [#22947](https://github.com/ClickHouse/ClickHouse/pull/22947) ([Azat Khuzhin](https://github.com/azat)). +* `dateDiff` now works with `DateTime64` arguments (even for values outside of `DateTime` range) [#22931](https://github.com/ClickHouse/ClickHouse/pull/22931) ([Vasily Nemkov](https://github.com/Enmk)). +* MaterializeMySQL (experimental feature): added an ability to replicate MySQL databases containing views without failing. This is accomplished by ignoring the views. [#22760](https://github.com/ClickHouse/ClickHouse/pull/22760) ([Christian](https://github.com/cfroystad)). +* Allow RBAC row policy via postgresql protocol. Closes [#22658](https://github.com/ClickHouse/ClickHouse/issues/22658). PostgreSQL protocol is enabled in configuration by default. [#22755](https://github.com/ClickHouse/ClickHouse/pull/22755) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add metric to track how much time is spend during waiting for Buffer layer lock. [#22725](https://github.com/ClickHouse/ClickHouse/pull/22725) ([Azat Khuzhin](https://github.com/azat)). +* Allow to use CTE in VIEW definition. This closes [#22491](https://github.com/ClickHouse/ClickHouse/issues/22491). [#22657](https://github.com/ClickHouse/ClickHouse/pull/22657) ([Amos Bird](https://github.com/amosbird)). +* Clear the rest of the screen and show cursor in `clickhouse-client` if previous program has left garbage in terminal. This closes [#16518](https://github.com/ClickHouse/ClickHouse/issues/16518). [#22634](https://github.com/ClickHouse/ClickHouse/pull/22634) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Make `round` function to behave consistently on non-x86_64 platforms. Rounding half to nearest even (Banker's rounding) is used. [#22582](https://github.com/ClickHouse/ClickHouse/pull/22582) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Correctly check structure of blocks of data that are sending by Distributed tables. [#22325](https://github.com/ClickHouse/ClickHouse/pull/22325) ([Azat Khuzhin](https://github.com/azat)). +* Allow publishing Kafka errors to a virtual column of Kafka engine, controlled by the `kafka_handle_error_mode` setting. [#21850](https://github.com/ClickHouse/ClickHouse/pull/21850) ([fastio](https://github.com/fastio)). +* Add aliases `simpleJSONExtract/simpleJSONHas` to `visitParam/visitParamExtract{UInt, Int, Bool, Float, Raw, String}`. Fixes [#21383](https://github.com/ClickHouse/ClickHouse/issues/21383). [#21519](https://github.com/ClickHouse/ClickHouse/pull/21519) ([fastio](https://github.com/fastio)). +* Add `clickhouse-library-bridge` for library dictionary source. Closes [#9502](https://github.com/ClickHouse/ClickHouse/issues/9502). [#21509](https://github.com/ClickHouse/ClickHouse/pull/21509) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Forbid to drop a column if it's referenced by materialized view. Closes [#21164](https://github.com/ClickHouse/ClickHouse/issues/21164). [#21303](https://github.com/ClickHouse/ClickHouse/pull/21303) ([flynn](https://github.com/ucasFL)). +* Support dynamic interserver credentials (rotating credentials without downtime). [#14113](https://github.com/ClickHouse/ClickHouse/pull/14113) ([johnskopis](https://github.com/johnskopis)). +* Add support for Kafka storage with `Arrow` and `ArrowStream` format messages. [#23415](https://github.com/ClickHouse/ClickHouse/pull/23415) ([Chao Ma](https://github.com/godliness)). +* Fixed missing semicolon in exception message. The user may find this exception message unpleasant to read. [#23208](https://github.com/ClickHouse/ClickHouse/pull/23208) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed missing whitespace in some exception messages about `LowCardinality` type. [#23207](https://github.com/ClickHouse/ClickHouse/pull/23207) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Some values were formatted with alignment in center in table cells in `Markdown` format. Not anymore. [#23096](https://github.com/ClickHouse/ClickHouse/pull/23096) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove non-essential details from suggestions in clickhouse-client. This closes [#22158](https://github.com/ClickHouse/ClickHouse/issues/22158). [#23040](https://github.com/ClickHouse/ClickHouse/pull/23040) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Correct calculation of `bytes_allocated` field in system.dictionaries for sparse_hashed dictionaries. [#22867](https://github.com/ClickHouse/ClickHouse/pull/22867) ([Azat Khuzhin](https://github.com/azat)). +* Fixed approximate total rows accounting for reverse reading from MergeTree. [#22726](https://github.com/ClickHouse/ClickHouse/pull/22726) ([Azat Khuzhin](https://github.com/azat)). +* Fix the case when it was possible to configure dictionary with clickhouse source that was looking to itself that leads to infinite loop. Closes [#14314](https://github.com/ClickHouse/ClickHouse/issues/14314). [#22479](https://github.com/ClickHouse/ClickHouse/pull/22479) ([Maksim Kita](https://github.com/kitaisreal)). + +#### Bug Fix + +* Multiple fixes for hedged requests. Fixed an error `Can't initialize pipeline with empty pipe` for queries with `GLOBAL IN/JOIN` when the setting `use_hedged_requests` is enabled. Fixes [#23431](https://github.com/ClickHouse/ClickHouse/issues/23431). [#23805](https://github.com/ClickHouse/ClickHouse/pull/23805) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). Fixed a race condition in hedged connections which leads to crash. This fixes [#22161](https://github.com/ClickHouse/ClickHouse/issues/22161). [#22443](https://github.com/ClickHouse/ClickHouse/pull/22443) ([Kruglov Pavel](https://github.com/Avogar)). Fix possible crash in case if `unknown packet` was received from remote query (with `async_socket_for_remote` enabled). Fixes [#21167](https://github.com/ClickHouse/ClickHouse/issues/21167). [#23309](https://github.com/ClickHouse/ClickHouse/pull/23309) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed the behavior when disabling `input_format_with_names_use_header ` setting discards all the input with CSVWithNames format. This fixes [#22406](https://github.com/ClickHouse/ClickHouse/issues/22406). [#23202](https://github.com/ClickHouse/ClickHouse/pull/23202) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fixed remote JDBC bridge timeout connection issue. Closes [#9609](https://github.com/ClickHouse/ClickHouse/issues/9609). [#23771](https://github.com/ClickHouse/ClickHouse/pull/23771) ([Maksim Kita](https://github.com/kitaisreal), [alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix the logic of initial load of `complex_key_hashed` if `update_field` is specified. Closes [#23800](https://github.com/ClickHouse/ClickHouse/issues/23800). [#23824](https://github.com/ClickHouse/ClickHouse/pull/23824) ([Maksim Kita](https://github.com/kitaisreal)). +* Fixed crash when `PREWHERE` and row policy filter are both in effect with empty result. [#23763](https://github.com/ClickHouse/ClickHouse/pull/23763) ([Amos Bird](https://github.com/amosbird)). +* Avoid possible "Cannot schedule a task" error (in case some exception had been occurred) on INSERT into Distributed. [#23744](https://github.com/ClickHouse/ClickHouse/pull/23744) ([Azat Khuzhin](https://github.com/azat)). +* Added an exception in case of completely the same values in both samples in aggregate function `mannWhitneyUTest`. This fixes [#23646](https://github.com/ClickHouse/ClickHouse/issues/23646). [#23654](https://github.com/ClickHouse/ClickHouse/pull/23654) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fixed server fault when inserting data through HTTP caused an exception. This fixes [#23512](https://github.com/ClickHouse/ClickHouse/issues/23512). [#23643](https://github.com/ClickHouse/ClickHouse/pull/23643) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fixed misinterpretation of some `LIKE` expressions with escape sequences. [#23610](https://github.com/ClickHouse/ClickHouse/pull/23610) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed restart / stop command hanging. Closes [#20214](https://github.com/ClickHouse/ClickHouse/issues/20214). [#23552](https://github.com/ClickHouse/ClickHouse/pull/23552) ([filimonov](https://github.com/filimonov)). +* Fixed `COLUMNS` matcher in case of multiple JOINs in select query. Closes [#22736](https://github.com/ClickHouse/ClickHouse/issues/22736). [#23501](https://github.com/ClickHouse/ClickHouse/pull/23501) ([Maksim Kita](https://github.com/kitaisreal)). +* Fixed a crash when modifying column's default value when a column itself is used as `ReplacingMergeTree`'s parameter. [#23483](https://github.com/ClickHouse/ClickHouse/pull/23483) ([hexiaoting](https://github.com/hexiaoting)). +* Fixed corner cases in vertical merges with `ReplacingMergeTree`. In rare cases they could lead to fails of merges with exceptions like `Incomplete granules are not allowed while blocks are granules size`. [#23459](https://github.com/ClickHouse/ClickHouse/pull/23459) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed bug that does not allow cast from empty array literal, to array with dimensions greater than 1, e.g. `CAST([] AS Array(Array(String)))`. Closes [#14476](https://github.com/ClickHouse/ClickHouse/issues/14476). [#23456](https://github.com/ClickHouse/ClickHouse/pull/23456) ([Maksim Kita](https://github.com/kitaisreal)). +* Fixed a bug when `deltaSum` aggregate function produced incorrect result after resetting the counter. [#23437](https://github.com/ClickHouse/ClickHouse/pull/23437) ([Russ Frank](https://github.com/rf)). +* Fixed `Cannot unlink file` error on unsuccessful creation of ReplicatedMergeTree table with multidisk configuration. This closes [#21755](https://github.com/ClickHouse/ClickHouse/issues/21755). [#23433](https://github.com/ClickHouse/ClickHouse/pull/23433) ([tavplubix](https://github.com/tavplubix)). +* Fixed incompatible constant expression generation during partition pruning based on virtual columns. This fixes https://github.com/ClickHouse/ClickHouse/pull/21401#discussion_r611888913. [#23366](https://github.com/ClickHouse/ClickHouse/pull/23366) ([Amos Bird](https://github.com/amosbird)). +* Fixed a crash when setting join_algorithm is set to 'auto' and Join is performed with a Dictionary. Close [#23002](https://github.com/ClickHouse/ClickHouse/issues/23002). [#23312](https://github.com/ClickHouse/ClickHouse/pull/23312) ([Vladimir](https://github.com/vdimir)). +* Don't relax NOT conditions during partition pruning. This fixes [#23305](https://github.com/ClickHouse/ClickHouse/issues/23305) and [#21539](https://github.com/ClickHouse/ClickHouse/issues/21539). [#23310](https://github.com/ClickHouse/ClickHouse/pull/23310) ([Amos Bird](https://github.com/amosbird)). +* Fixed very rare race condition on background cleanup of old blocks. It might cause a block not to be deduplicated if it's too close to the end of deduplication window. [#23301](https://github.com/ClickHouse/ClickHouse/pull/23301) ([tavplubix](https://github.com/tavplubix)). +* Fixed very rare (distributed) race condition between creation and removal of ReplicatedMergeTree tables. It might cause exceptions like `node doesn't exist` on attempt to create replicated table. Fixes [#21419](https://github.com/ClickHouse/ClickHouse/issues/21419). [#23294](https://github.com/ClickHouse/ClickHouse/pull/23294) ([tavplubix](https://github.com/tavplubix)). +* Fixed simple key dictionary from DDL creation if primary key is not first attribute. Fixes [#23236](https://github.com/ClickHouse/ClickHouse/issues/23236). [#23262](https://github.com/ClickHouse/ClickHouse/pull/23262) ([Maksim Kita](https://github.com/kitaisreal)). +* Fixed reading from ODBC when there are many long column names in a table. Closes [#8853](https://github.com/ClickHouse/ClickHouse/issues/8853). [#23215](https://github.com/ClickHouse/ClickHouse/pull/23215) ([Kseniia Sumarokova](https://github.com/kssenii)). +* MaterializeMySQL (experimental feature): fixed `Not found column` error when selecting from `MaterializeMySQL` with condition on key column. Fixes [#22432](https://github.com/ClickHouse/ClickHouse/issues/22432). [#23200](https://github.com/ClickHouse/ClickHouse/pull/23200) ([tavplubix](https://github.com/tavplubix)). +* Correct aliases handling if subquery was optimized to constant. Fixes [#22924](https://github.com/ClickHouse/ClickHouse/issues/22924). Fixes [#10401](https://github.com/ClickHouse/ClickHouse/issues/10401). [#23191](https://github.com/ClickHouse/ClickHouse/pull/23191) ([Maksim Kita](https://github.com/kitaisreal)). +* Server might fail to start if `data_type_default_nullable` setting is enabled in default profile, it's fixed. Fixes [#22573](https://github.com/ClickHouse/ClickHouse/issues/22573). [#23185](https://github.com/ClickHouse/ClickHouse/pull/23185) ([tavplubix](https://github.com/tavplubix)). +* Fixed a crash on shutdown which happened because of wrong accounting of current connections. [#23154](https://github.com/ClickHouse/ClickHouse/pull/23154) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed `Table .inner_id... doesn't exist` error when selecting from Materialized View after detaching it from Atomic database and attaching back. [#23047](https://github.com/ClickHouse/ClickHouse/pull/23047) ([tavplubix](https://github.com/tavplubix)). +* Fix error `Cannot find column in ActionsDAG result` which may happen if subquery uses `untuple`. Fixes [#22290](https://github.com/ClickHouse/ClickHouse/issues/22290). [#22991](https://github.com/ClickHouse/ClickHouse/pull/22991) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix usage of constant columns of type `Map` with nullable values. [#22939](https://github.com/ClickHouse/ClickHouse/pull/22939) ([Anton Popov](https://github.com/CurtizJ)). +* fixed `formatDateTime()` on `DateTime64` and "%C" format specifier fixed `toDateTime64()` for large values and non-zero scale. [#22937](https://github.com/ClickHouse/ClickHouse/pull/22937) ([Vasily Nemkov](https://github.com/Enmk)). +* Fixed a crash when using `mannWhitneyUTest` and `rankCorr` with window functions. This fixes [#22728](https://github.com/ClickHouse/ClickHouse/issues/22728). [#22876](https://github.com/ClickHouse/ClickHouse/pull/22876) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* LIVE VIEW (experimental feature): fixed possible hanging in concurrent DROP/CREATE of TEMPORARY LIVE VIEW in `TemporaryLiveViewCleaner`, [see](https://gist.github.com/vzakaznikov/0c03195960fc86b56bfe2bc73a90019e). [#22858](https://github.com/ClickHouse/ClickHouse/pull/22858) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed pushdown of `HAVING` in case, when filter column is used in aggregation. [#22763](https://github.com/ClickHouse/ClickHouse/pull/22763) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed possible hangs in Zookeeper requests in case of OOM exception. Fixes [#22438](https://github.com/ClickHouse/ClickHouse/issues/22438). [#22684](https://github.com/ClickHouse/ClickHouse/pull/22684) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed wait for mutations on several replicas for ReplicatedMergeTree table engines. Previously, mutation/alter query may finish before mutation actually executed on other replicas. [#22669](https://github.com/ClickHouse/ClickHouse/pull/22669) ([alesapin](https://github.com/alesapin)). +* Fixed exception for Log with nested types without columns in the SELECT clause. [#22654](https://github.com/ClickHouse/ClickHouse/pull/22654) ([Azat Khuzhin](https://github.com/azat)). +* Fix unlimited wait for auxiliary AWS requests. [#22594](https://github.com/ClickHouse/ClickHouse/pull/22594) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fixed a crash when client closes connection very early [#22579](https://github.com/ClickHouse/ClickHouse/issues/22579). [#22591](https://github.com/ClickHouse/ClickHouse/pull/22591) ([nvartolomei](https://github.com/nvartolomei)). +* `Map` data type (experimental feature): fixed an incorrect formatting of function `map` in distributed queries. [#22588](https://github.com/ClickHouse/ClickHouse/pull/22588) ([foolchi](https://github.com/foolchi)). +* Fixed deserialization of empty string without newline at end of TSV format. This closes [#20244](https://github.com/ClickHouse/ClickHouse/issues/20244). Possible workaround without version update: set `input_format_null_as_default` to zero. It was zero in old versions. [#22527](https://github.com/ClickHouse/ClickHouse/pull/22527) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed wrong cast of a column of `LowCardinality` type in Merge Join algorithm. Close [#22386](https://github.com/ClickHouse/ClickHouse/issues/22386), close [#22388](https://github.com/ClickHouse/ClickHouse/issues/22388). [#22510](https://github.com/ClickHouse/ClickHouse/pull/22510) ([Vladimir](https://github.com/vdimir)). +* Buffer overflow (on read) was possible in `tokenbf_v1` full text index. The excessive bytes are not used but the read operation may lead to crash in rare cases. This closes [#19233](https://github.com/ClickHouse/ClickHouse/issues/19233). [#22421](https://github.com/ClickHouse/ClickHouse/pull/22421) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Do not limit HTTP chunk size. Fixes [#21907](https://github.com/ClickHouse/ClickHouse/issues/21907). [#22322](https://github.com/ClickHouse/ClickHouse/pull/22322) ([Ivan](https://github.com/abyss7)). +* Fixed a bug, which leads to underaggregation of data in case of enabled `optimize_aggregation_in_order` and many parts in table. Slightly improve performance of aggregation with enabled `optimize_aggregation_in_order`. [#21889](https://github.com/ClickHouse/ClickHouse/pull/21889) ([Anton Popov](https://github.com/CurtizJ)). +* Check if table function view is used as a column. This complements #20350. [#21465](https://github.com/ClickHouse/ClickHouse/pull/21465) ([Amos Bird](https://github.com/amosbird)). +* Fix "unknown column" error for tables with `Merge` engine in queris with `JOIN` and aggregation. Closes [#18368](https://github.com/ClickHouse/ClickHouse/issues/18368), close [#22226](https://github.com/ClickHouse/ClickHouse/issues/22226). [#21370](https://github.com/ClickHouse/ClickHouse/pull/21370) ([Vladimir](https://github.com/vdimir)). +* Fixed name clashes in pushdown optimization. It caused incorrect `WHERE` filtration after FULL JOIN. Close [#20497](https://github.com/ClickHouse/ClickHouse/issues/20497). [#20622](https://github.com/ClickHouse/ClickHouse/pull/20622) ([Vladimir](https://github.com/vdimir)). +* Fixed very rare bug when quorum insert with `quorum_parallel=1` is not really "quorum" because of deduplication. [#18215](https://github.com/ClickHouse/ClickHouse/pull/18215) ([filimonov](https://github.com/filimonov) - reported, [alesapin](https://github.com/alesapin) - fixed). + +#### Build/Testing/Packaging Improvement + +* Run stateless tests in parallel in CI. [#22300](https://github.com/ClickHouse/ClickHouse/pull/22300) ([alesapin](https://github.com/alesapin)). +* Simplify debian packages. This fixes [#21698](https://github.com/ClickHouse/ClickHouse/issues/21698). [#22976](https://github.com/ClickHouse/ClickHouse/pull/22976) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added support for ClickHouse build on Apple M1. [#21639](https://github.com/ClickHouse/ClickHouse/pull/21639) ([changvvb](https://github.com/changvvb)). +* Fixed ClickHouse Keeper build for macOS. [#22860](https://github.com/ClickHouse/ClickHouse/pull/22860) ([alesapin](https://github.com/alesapin)). +* Fixed some tests on AArch64 platform. [#22596](https://github.com/ClickHouse/ClickHouse/pull/22596) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Added function alignment for possibly better performance. [#21431](https://github.com/ClickHouse/ClickHouse/pull/21431) ([Danila Kutenin](https://github.com/danlark1)). +* Adjust some tests to output identical results on amd64 and aarch64 (qemu). The result was depending on implementation specific CPU behaviour. [#22590](https://github.com/ClickHouse/ClickHouse/pull/22590) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow query profiling only on x86_64. See [#15174](https://github.com/ClickHouse/ClickHouse/issues/15174#issuecomment-812954965) and [#15638](https://github.com/ClickHouse/ClickHouse/issues/15638#issuecomment-703805337). This closes [#15638](https://github.com/ClickHouse/ClickHouse/issues/15638). [#22580](https://github.com/ClickHouse/ClickHouse/pull/22580) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow building with unbundled xz (lzma) using `USE_INTERNAL_XZ_LIBRARY=OFF` CMake option. [#22571](https://github.com/ClickHouse/ClickHouse/pull/22571) ([Kfir Itzhak](https://github.com/mastertheknife)). +* Enable bundled `openldap` on `ppc64le` [#22487](https://github.com/ClickHouse/ClickHouse/pull/22487) ([Kfir Itzhak](https://github.com/mastertheknife)). +* Disable incompatible libraries (platform specific typically) on `ppc64le` [#22475](https://github.com/ClickHouse/ClickHouse/pull/22475) ([Kfir Itzhak](https://github.com/mastertheknife)). +* Add Jepsen test in CI for clickhouse Keeper. [#22373](https://github.com/ClickHouse/ClickHouse/pull/22373) ([alesapin](https://github.com/alesapin)). +* Build `jemalloc` with support for [heap profiling](https://github.com/jemalloc/jemalloc/wiki/Use-Case%3A-Heap-Profiling). [#22834](https://github.com/ClickHouse/ClickHouse/pull/22834) ([nvartolomei](https://github.com/nvartolomei)). +* Avoid UB in `*Log` engines for rwlock unlock due to unlock from another thread. [#22583](https://github.com/ClickHouse/ClickHouse/pull/22583) ([Azat Khuzhin](https://github.com/azat)). +* Fixed UB by unlocking the rwlock of the TinyLog from the same thread. [#22560](https://github.com/ClickHouse/ClickHouse/pull/22560) ([Azat Khuzhin](https://github.com/azat)). + + +## ClickHouse release 21.4 + +### ClickHouse release 21.4.1 2021-04-12 + +#### Backward Incompatible Change + +* The `toStartOfIntervalFunction` will align hour intervals to the midnight (in previous versions they were aligned to the start of unix epoch). For example, `toStartOfInterval(x, INTERVAL 11 HOUR)` will split every day into three intervals: `00:00:00..10:59:59`, `11:00:00..21:59:59` and `22:00:00..23:59:59`. This behaviour is more suited for practical needs. This closes [#9510](https://github.com/ClickHouse/ClickHouse/issues/9510). [#22060](https://github.com/ClickHouse/ClickHouse/pull/22060) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* `Age` and `Precision` in graphite rollup configs should increase from retention to retention. Now it's checked and the wrong config raises an exception. [#21496](https://github.com/ClickHouse/ClickHouse/pull/21496) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Fix `cutToFirstSignificantSubdomainCustom()`/`firstSignificantSubdomainCustom()` returning wrong result for 3+ level domains present in custom top-level domain list. For input domains matching these custom top-level domains, the third-level domain was considered to be the first significant one. This is now fixed. This change may introduce incompatibility if the function is used in e.g. the sharding key. [#21946](https://github.com/ClickHouse/ClickHouse/pull/21946) ([Azat Khuzhin](https://github.com/azat)). +* Column `keys` in table `system.dictionaries` was replaced to columns `key.names` and `key.types`. Columns `key.names`, `key.types`, `attribute.names`, `attribute.types` from `system.dictionaries` table does not require dictionary to be loaded. [#21884](https://github.com/ClickHouse/ClickHouse/pull/21884) ([Maksim Kita](https://github.com/kitaisreal)). +* Now replicas that are processing the `ALTER TABLE ATTACH PART[ITION]` command search in their `detached/` folders before fetching the data from other replicas. As an implementation detail, a new command `ATTACH_PART` is introduced in the replicated log. Parts are searched and compared by their checksums. [#18978](https://github.com/ClickHouse/ClickHouse/pull/18978) ([Mike Kot](https://github.com/myrrc)). **Note**: + * `ATTACH PART[ITION]` queries may not work during cluster upgrade. + * It's not possible to rollback to older ClickHouse version after executing `ALTER ... ATTACH` query in new version as the old servers would fail to pass the `ATTACH_PART` entry in the replicated log. +* In this version, empty `` will block all access to remote hosts while in previous versions it did nothing. If you want to keep old behaviour and you have empty `remote_url_allow_hosts` element in configuration file, remove it. [#20058](https://github.com/ClickHouse/ClickHouse/pull/20058) ([Vladimir Chebotarev](https://github.com/excitoon)). + + +#### New Feature + +* Extended range of `DateTime64` to support dates from year 1925 to 2283. Improved support of `DateTime` around zero date (`1970-01-01`). [#9404](https://github.com/ClickHouse/ClickHouse/pull/9404) ([alexey-milovidov](https://github.com/alexey-milovidov), [Vasily Nemkov](https://github.com/Enmk)). Not every time and date functions are working for extended range of dates. +* Added support of Kerberos authentication for preconfigured users and HTTP requests (GSS-SPNEGO). [#14995](https://github.com/ClickHouse/ClickHouse/pull/14995) ([Denis Glazachev](https://github.com/traceon)). +* Add `prefer_column_name_to_alias` setting to use original column names instead of aliases. it is needed to be more compatible with common databases' aliasing rules. This is for [#9715](https://github.com/ClickHouse/ClickHouse/issues/9715) and [#9887](https://github.com/ClickHouse/ClickHouse/issues/9887). [#22044](https://github.com/ClickHouse/ClickHouse/pull/22044) ([Amos Bird](https://github.com/amosbird)). +* Added functions `dictGetChildren(dictionary, key)`, `dictGetDescendants(dictionary, key, level)`. Function `dictGetChildren` return all children as an array if indexes. It is a inverse transformation for `dictGetHierarchy`. Function `dictGetDescendants` return all descendants as if `dictGetChildren` was applied `level` times recursively. Zero `level` value is equivalent to infinity. Closes [#14656](https://github.com/ClickHouse/ClickHouse/issues/14656). [#22096](https://github.com/ClickHouse/ClickHouse/pull/22096) ([Maksim Kita](https://github.com/kitaisreal)). +* Added `executable_pool` dictionary source. Close [#14528](https://github.com/ClickHouse/ClickHouse/issues/14528). [#21321](https://github.com/ClickHouse/ClickHouse/pull/21321) ([Maksim Kita](https://github.com/kitaisreal)). +* Added table function `dictionary`. It works the same way as `Dictionary` engine. Closes [#21560](https://github.com/ClickHouse/ClickHouse/issues/21560). [#21910](https://github.com/ClickHouse/ClickHouse/pull/21910) ([Maksim Kita](https://github.com/kitaisreal)). +* Support `Nullable` type for `PolygonDictionary` attribute. [#21890](https://github.com/ClickHouse/ClickHouse/pull/21890) ([Maksim Kita](https://github.com/kitaisreal)). +* Functions `dictGet`, `dictHas` use current database name if it is not specified for dictionaries created with DDL. Closes [#21632](https://github.com/ClickHouse/ClickHouse/issues/21632). [#21859](https://github.com/ClickHouse/ClickHouse/pull/21859) ([Maksim Kita](https://github.com/kitaisreal)). +* Added function `dictGetOrNull`. It works like `dictGet`, but return `Null` in case key was not found in dictionary. Closes [#22375](https://github.com/ClickHouse/ClickHouse/issues/22375). [#22413](https://github.com/ClickHouse/ClickHouse/pull/22413) ([Maksim Kita](https://github.com/kitaisreal)). +* Added async update in `ComplexKeyCache`, `SSDCache`, `SSDComplexKeyCache` dictionaries. Added support for `Nullable` type in `Cache`, `ComplexKeyCache`, `SSDCache`, `SSDComplexKeyCache` dictionaries. Added support for multiple attributes fetch with `dictGet`, `dictGetOrDefault` functions. Fixes [#21517](https://github.com/ClickHouse/ClickHouse/issues/21517). [#20595](https://github.com/ClickHouse/ClickHouse/pull/20595) ([Maksim Kita](https://github.com/kitaisreal)). +* Support `dictHas` function for `RangeHashedDictionary`. Fixes [#6680](https://github.com/ClickHouse/ClickHouse/issues/6680). [#19816](https://github.com/ClickHouse/ClickHouse/pull/19816) ([Maksim Kita](https://github.com/kitaisreal)). +* Add function `timezoneOf` that returns the timezone name of `DateTime` or `DateTime64` data types. This does not close [#9959](https://github.com/ClickHouse/ClickHouse/issues/9959). Fix inconsistencies in function names: add aliases `timezone` and `timeZone` as well as `toTimezone` and `toTimeZone` and `timezoneOf` and `timeZoneOf`. [#22001](https://github.com/ClickHouse/ClickHouse/pull/22001) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add new optional clause `GRANTEES` for `CREATE/ALTER USER` commands. It specifies users or roles which are allowed to receive grants from this user on condition this user has also all required access granted with grant option. By default `GRANTEES ANY` is used which means a user with grant option can grant to anyone. Syntax: `CREATE USER ... GRANTEES {user | role | ANY | NONE} [,...] [EXCEPT {user | role} [,...]]`. [#21641](https://github.com/ClickHouse/ClickHouse/pull/21641) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add new column `slowdowns_count` to `system.clusters`. When using hedged requests, it shows how many times we switched to another replica because this replica was responding slowly. Also show actual value of `errors_count` in `system.clusters`. [#21480](https://github.com/ClickHouse/ClickHouse/pull/21480) ([Kruglov Pavel](https://github.com/Avogar)). +* Add `_partition_id` virtual column for `MergeTree*` engines. Allow to prune partitions by `_partition_id`. Add `partitionID()` function to calculate partition id string. [#21401](https://github.com/ClickHouse/ClickHouse/pull/21401) ([Amos Bird](https://github.com/amosbird)). +* Add function `isIPAddressInRange` to test if an IPv4 or IPv6 address is contained in a given CIDR network prefix. [#21329](https://github.com/ClickHouse/ClickHouse/pull/21329) ([PHO](https://github.com/depressed-pho)). +* Added new SQL command `ALTER TABLE 'table_name' UNFREEZE [PARTITION 'part_expr'] WITH NAME 'backup_name'`. This command is needed to properly remove 'freezed' partitions from all disks. [#21142](https://github.com/ClickHouse/ClickHouse/pull/21142) ([Pavel Kovalenko](https://github.com/Jokser)). +* Supports implicit key type conversion for JOIN. [#19885](https://github.com/ClickHouse/ClickHouse/pull/19885) ([Vladimir](https://github.com/vdimir)). + +#### Experimental Feature + +* Support `RANGE OFFSET` frame (for window functions) for floating point types. Implement `lagInFrame`/`leadInFrame` window functions, which are analogous to `lag`/`lead`, but respect the window frame. They are identical when the frame is `between unbounded preceding and unbounded following`. This closes [#5485](https://github.com/ClickHouse/ClickHouse/issues/5485). [#21895](https://github.com/ClickHouse/ClickHouse/pull/21895) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Zero-copy replication for `ReplicatedMergeTree` over S3 storage. [#16240](https://github.com/ClickHouse/ClickHouse/pull/16240) ([ianton-ru](https://github.com/ianton-ru)). +* Added possibility to migrate existing S3 disk to the schema with backup-restore capabilities. [#22070](https://github.com/ClickHouse/ClickHouse/pull/22070) ([Pavel Kovalenko](https://github.com/Jokser)). + +#### Performance Improvement + +* Supported parallel formatting in `clickhouse-local` and everywhere else. [#21630](https://github.com/ClickHouse/ClickHouse/pull/21630) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Support parallel parsing for `CSVWithNames` and `TSVWithNames` formats. This closes [#21085](https://github.com/ClickHouse/ClickHouse/issues/21085). [#21149](https://github.com/ClickHouse/ClickHouse/pull/21149) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Enable read with mmap IO for file ranges from 64 MiB (the settings `min_bytes_to_use_mmap_io`). It may lead to moderate performance improvement. [#22326](https://github.com/ClickHouse/ClickHouse/pull/22326) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add cache for files read with `min_bytes_to_use_mmap_io` setting. It makes significant (2x and more) performance improvement when the value of the setting is small by avoiding frequent mmap/munmap calls and the consequent page faults. Note that mmap IO has major drawbacks that makes it less reliable in production (e.g. hung or SIGBUS on faulty disks; less controllable memory usage). Nevertheless it is good in benchmarks. [#22206](https://github.com/ClickHouse/ClickHouse/pull/22206) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Avoid unnecessary data copy when using codec `NONE`. Please note that codec `NONE` is mostly useless - it's recommended to always use compression (`LZ4` is by default). Despite the common belief, disabling compression may not improve performance (the opposite effect is possible). The `NONE` codec is useful in some cases: - when data is uncompressable; - for synthetic benchmarks. [#22145](https://github.com/ClickHouse/ClickHouse/pull/22145) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Faster `GROUP BY` with small `max_rows_to_group_by` and `group_by_overflow_mode='any'`. [#21856](https://github.com/ClickHouse/ClickHouse/pull/21856) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Optimize performance of queries like `SELECT ... FINAL ... WHERE`. Now in queries with `FINAL` it's allowed to move to `PREWHERE` columns, which are in sorting key. [#21830](https://github.com/ClickHouse/ClickHouse/pull/21830) ([foolchi](https://github.com/foolchi)). +* Improved performance by replacing `memcpy` to another implementation. This closes [#18583](https://github.com/ClickHouse/ClickHouse/issues/18583). [#21520](https://github.com/ClickHouse/ClickHouse/pull/21520) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve performance of aggregation in order of sorting key (with enabled setting `optimize_aggregation_in_order`). [#19401](https://github.com/ClickHouse/ClickHouse/pull/19401) ([Anton Popov](https://github.com/CurtizJ)). + +#### Improvement + +* Add connection pool for PostgreSQL table/database engine and dictionary source. Should fix [#21444](https://github.com/ClickHouse/ClickHouse/issues/21444). [#21839](https://github.com/ClickHouse/ClickHouse/pull/21839) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support non-default table schema for postgres storage/table-function. Closes [#21701](https://github.com/ClickHouse/ClickHouse/issues/21701). [#21711](https://github.com/ClickHouse/ClickHouse/pull/21711) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support replicas priority for postgres dictionary source. [#21710](https://github.com/ClickHouse/ClickHouse/pull/21710) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Introduce a new merge tree setting `min_bytes_to_rebalance_partition_over_jbod` which allows assigning new parts to different disks of a JBOD volume in a balanced way. [#16481](https://github.com/ClickHouse/ClickHouse/pull/16481) ([Amos Bird](https://github.com/amosbird)). +* Added `Grant`, `Revoke` and `System` values of `query_kind` column for corresponding queries in `system.query_log`. [#21102](https://github.com/ClickHouse/ClickHouse/pull/21102) ([Vasily Nemkov](https://github.com/Enmk)). +* Allow customizing timeouts for HTTP connections used for replication independently from other HTTP timeouts. [#20088](https://github.com/ClickHouse/ClickHouse/pull/20088) ([nvartolomei](https://github.com/nvartolomei)). +* Better exception message in client in case of exception while server is writing blocks. In previous versions client may get misleading message like `Data compressed with different methods`. [#22427](https://github.com/ClickHouse/ClickHouse/pull/22427) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix error `Directory tmp_fetch_XXX already exists` which could happen after failed fetch part. Delete temporary fetch directory if it already exists. Fixes [#14197](https://github.com/ClickHouse/ClickHouse/issues/14197). [#22411](https://github.com/ClickHouse/ClickHouse/pull/22411) ([nvartolomei](https://github.com/nvartolomei)). +* Fix MSan report for function `range` with `UInt256` argument (support for large integers is experimental). This closes [#22157](https://github.com/ClickHouse/ClickHouse/issues/22157). [#22387](https://github.com/ClickHouse/ClickHouse/pull/22387) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add `current_database` column to `system.processes` table. It contains the current database of the query. [#22365](https://github.com/ClickHouse/ClickHouse/pull/22365) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Add case-insensitive history search/navigation and subword movement features to `clickhouse-client`. [#22105](https://github.com/ClickHouse/ClickHouse/pull/22105) ([Amos Bird](https://github.com/amosbird)). +* If tuple of NULLs, e.g. `(NULL, NULL)` is on the left hand side of `IN` operator with tuples of non-NULLs on the right hand side, e.g. `SELECT (NULL, NULL) IN ((0, 0), (3, 1))` return 0 instead of throwing an exception about incompatible types. The expression may also appear due to optimization of something like `SELECT (NULL, NULL) = (8, 0) OR (NULL, NULL) = (3, 2) OR (NULL, NULL) = (0, 0) OR (NULL, NULL) = (3, 1)`. This closes [#22017](https://github.com/ClickHouse/ClickHouse/issues/22017). [#22063](https://github.com/ClickHouse/ClickHouse/pull/22063) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Update used version of simdjson to 0.9.1. This fixes [#21984](https://github.com/ClickHouse/ClickHouse/issues/21984). [#22057](https://github.com/ClickHouse/ClickHouse/pull/22057) ([Vitaly Baranov](https://github.com/vitlibar)). +* Added case insensitive aliases for `CONNECTION_ID()` and `VERSION()` functions. This fixes [#22028](https://github.com/ClickHouse/ClickHouse/issues/22028). [#22042](https://github.com/ClickHouse/ClickHouse/pull/22042) ([Eugene Klimov](https://github.com/Slach)). +* Add option `strict_increase` to `windowFunnel` function to calculate each event once (resolve [#21835](https://github.com/ClickHouse/ClickHouse/issues/21835)). [#22025](https://github.com/ClickHouse/ClickHouse/pull/22025) ([Vladimir](https://github.com/vdimir)). +* If partition key of a `MergeTree` table does not include `Date` or `DateTime` columns but includes exactly one `DateTime64` column, expose its values in the `min_time` and `max_time` columns in `system.parts` and `system.parts_columns` tables. Add `min_time` and `max_time` columns to `system.parts_columns` table (these was inconsistency to the `system.parts` table). This closes [#18244](https://github.com/ClickHouse/ClickHouse/issues/18244). [#22011](https://github.com/ClickHouse/ClickHouse/pull/22011) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Supported `replication_alter_partitions_sync=1` setting in `clickhouse-copier` for moving partitions from helping table to destination. Decreased default timeouts. Fixes [#21911](https://github.com/ClickHouse/ClickHouse/issues/21911). [#21912](https://github.com/ClickHouse/ClickHouse/pull/21912) ([turbo jason](https://github.com/songenjie)). +* Show path to data directory of `EmbeddedRocksDB` tables in system tables. [#21903](https://github.com/ClickHouse/ClickHouse/pull/21903) ([tavplubix](https://github.com/tavplubix)). +* Add profile event `HedgedRequestsChangeReplica`, change read data timeout from sec to ms. [#21886](https://github.com/ClickHouse/ClickHouse/pull/21886) ([Kruglov Pavel](https://github.com/Avogar)). +* DiskS3 (experimental feature under development). Fixed bug with the impossibility to move directory if the destination is not empty and cache disk is used. [#21837](https://github.com/ClickHouse/ClickHouse/pull/21837) ([Pavel Kovalenko](https://github.com/Jokser)). +* Better formatting for `Array` and `Map` data types in Web UI. [#21798](https://github.com/ClickHouse/ClickHouse/pull/21798) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Update clusters only if their configurations were updated. [#21685](https://github.com/ClickHouse/ClickHouse/pull/21685) ([Kruglov Pavel](https://github.com/Avogar)). +* Propagate query and session settings for distributed DDL queries. Set `distributed_ddl_entry_format_version` to 2 to enable this. Added `distributed_ddl_output_mode` setting. Supported modes: `none`, `throw` (default), `null_status_on_timeout` and `never_throw`. Miscellaneous fixes and improvements for `Replicated` database engine. [#21535](https://github.com/ClickHouse/ClickHouse/pull/21535) ([tavplubix](https://github.com/tavplubix)). +* If `PODArray` was instantiated with element size that is neither a fraction or a multiple of 16, buffer overflow was possible. No bugs in current releases exist. [#21533](https://github.com/ClickHouse/ClickHouse/pull/21533) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add `last_error_time`/`last_error_message`/`last_error_stacktrace`/`remote` columns for `system.errors`. [#21529](https://github.com/ClickHouse/ClickHouse/pull/21529) ([Azat Khuzhin](https://github.com/azat)). +* Add aliases `simpleJSONExtract/simpleJSONHas` to `visitParam/visitParamExtract{UInt, Int, Bool, Float, Raw, String}`. Fixes #21383. [#21519](https://github.com/ClickHouse/ClickHouse/pull/21519) ([fastio](https://github.com/fastio)). +* Add setting `optimize_skip_unused_shards_limit` to limit the number of sharding key values for `optimize_skip_unused_shards`. [#21512](https://github.com/ClickHouse/ClickHouse/pull/21512) ([Azat Khuzhin](https://github.com/azat)). +* Improve `clickhouse-format` to not throw exception when there are extra spaces or comment after the last query, and throw exception early with readable message when format `ASTInsertQuery` with data . [#21311](https://github.com/ClickHouse/ClickHouse/pull/21311) ([flynn](https://github.com/ucasFL)). +* Improve support of integer keys in data type `Map`. [#21157](https://github.com/ClickHouse/ClickHouse/pull/21157) ([Anton Popov](https://github.com/CurtizJ)). +* MaterializeMySQL: attempt to reconnect to MySQL if the connection is lost. [#20961](https://github.com/ClickHouse/ClickHouse/pull/20961) ([HÃ¥vard KvÃ¥len](https://github.com/havardk)). +* Support more cases to rewrite `CROSS JOIN` to `INNER JOIN`. [#20392](https://github.com/ClickHouse/ClickHouse/pull/20392) ([Vladimir](https://github.com/vdimir)). +* Do not create empty parts on INSERT when `optimize_on_insert` setting enabled. Fixes [#20304](https://github.com/ClickHouse/ClickHouse/issues/20304). [#20387](https://github.com/ClickHouse/ClickHouse/pull/20387) ([Kruglov Pavel](https://github.com/Avogar)). +* `MaterializeMySQL`: add minmax skipping index for `_version` column. [#20382](https://github.com/ClickHouse/ClickHouse/pull/20382) ([Stig Bakken](https://github.com/stigsb)). +* Add option `--backslash` for `clickhouse-format`, which can add a backslash at the end of each line of the formatted query. [#21494](https://github.com/ClickHouse/ClickHouse/pull/21494) ([flynn](https://github.com/ucasFL)). +* Now clickhouse will not throw `LOGICAL_ERROR` exception when we try to mutate the already covered part. Fixes [#22013](https://github.com/ClickHouse/ClickHouse/issues/22013). [#22291](https://github.com/ClickHouse/ClickHouse/pull/22291) ([alesapin](https://github.com/alesapin)). + +#### Bug Fix + +* Remove socket from epoll before cancelling packet receiver in `HedgedConnections` to prevent possible race. Fixes [#22161](https://github.com/ClickHouse/ClickHouse/issues/22161). [#22443](https://github.com/ClickHouse/ClickHouse/pull/22443) ([Kruglov Pavel](https://github.com/Avogar)). +* Add (missing) memory accounting in parallel parsing routines. In previous versions OOM was possible when the resultset contains very large blocks of data. This closes [#22008](https://github.com/ClickHouse/ClickHouse/issues/22008). [#22425](https://github.com/ClickHouse/ClickHouse/pull/22425) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix exception which may happen when `SELECT` has constant `WHERE` condition and source table has columns which names are digits. [#22270](https://github.com/ClickHouse/ClickHouse/pull/22270) ([LiuNeng](https://github.com/liuneng1994)). +* Fix query cancellation with `use_hedged_requests=0` and `async_socket_for_remote=1`. [#22183](https://github.com/ClickHouse/ClickHouse/pull/22183) ([Azat Khuzhin](https://github.com/azat)). +* Fix uncaught exception in `InterserverIOHTTPHandler`. [#22146](https://github.com/ClickHouse/ClickHouse/pull/22146) ([Azat Khuzhin](https://github.com/azat)). +* Fix docker entrypoint in case `http_port` is not in the config. [#22132](https://github.com/ClickHouse/ClickHouse/pull/22132) ([Ewout](https://github.com/devwout)). +* Fix error `Invalid number of rows in Chunk` in `JOIN` with `TOTALS` and `arrayJoin`. Closes [#19303](https://github.com/ClickHouse/ClickHouse/issues/19303). [#22129](https://github.com/ClickHouse/ClickHouse/pull/22129) ([Vladimir](https://github.com/vdimir)). +* Fix the background thread pool name which used to poll message from Kafka. The Kafka engine with the broken thread pool will not consume the message from message queue. [#22122](https://github.com/ClickHouse/ClickHouse/pull/22122) ([fastio](https://github.com/fastio)). +* Fix waiting for `OPTIMIZE` and `ALTER` queries for `ReplicatedMergeTree` table engines. Now the query will not hang when the table was detached or restarted. [#22118](https://github.com/ClickHouse/ClickHouse/pull/22118) ([alesapin](https://github.com/alesapin)). +* Disable `async_socket_for_remote`/`use_hedged_requests` for buggy Linux kernels. [#22109](https://github.com/ClickHouse/ClickHouse/pull/22109) ([Azat Khuzhin](https://github.com/azat)). +* Docker entrypoint: avoid chown of `.` in case when `LOG_PATH` is empty. Closes [#22100](https://github.com/ClickHouse/ClickHouse/issues/22100). [#22102](https://github.com/ClickHouse/ClickHouse/pull/22102) ([filimonov](https://github.com/filimonov)). +* The function `decrypt` was lacking a check for the minimal size of data encrypted in `AEAD` mode. This closes [#21897](https://github.com/ClickHouse/ClickHouse/issues/21897). [#22064](https://github.com/ClickHouse/ClickHouse/pull/22064) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* In rare case, merge for `CollapsingMergeTree` may create granule with `index_granularity + 1` rows. Because of this, internal check, added in [#18928](https://github.com/ClickHouse/ClickHouse/issues/18928) (affects 21.2 and 21.3), may fail with error `Incomplete granules are not allowed while blocks are granules size`. This error did not allow parts to merge. [#21976](https://github.com/ClickHouse/ClickHouse/pull/21976) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Reverted [#15454](https://github.com/ClickHouse/ClickHouse/issues/15454) that may cause significant increase in memory usage while loading external dictionaries of hashed type. This closes [#21935](https://github.com/ClickHouse/ClickHouse/issues/21935). [#21948](https://github.com/ClickHouse/ClickHouse/pull/21948) ([Maksim Kita](https://github.com/kitaisreal)). +* Prevent hedged connections overlaps (`Unknown packet 9 from server` error). [#21941](https://github.com/ClickHouse/ClickHouse/pull/21941) ([Azat Khuzhin](https://github.com/azat)). +* Fix reading the HTTP POST request with "multipart/form-data" content type in some cases. [#21936](https://github.com/ClickHouse/ClickHouse/pull/21936) ([Ivan](https://github.com/abyss7)). +* Fix wrong `ORDER BY` results when a query contains window functions, and optimization for reading in primary key order is applied. Fixes [#21828](https://github.com/ClickHouse/ClickHouse/issues/21828). [#21915](https://github.com/ClickHouse/ClickHouse/pull/21915) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fix deadlock in first catboost model execution. Closes [#13832](https://github.com/ClickHouse/ClickHouse/issues/13832). [#21844](https://github.com/ClickHouse/ClickHouse/pull/21844) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix incorrect query result (and possible crash) which could happen when `WHERE` or `HAVING` condition is pushed before `GROUP BY`. Fixes [#21773](https://github.com/ClickHouse/ClickHouse/issues/21773). [#21841](https://github.com/ClickHouse/ClickHouse/pull/21841) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Better error handling and logging in `WriteBufferFromS3`. [#21836](https://github.com/ClickHouse/ClickHouse/pull/21836) ([Pavel Kovalenko](https://github.com/Jokser)). +* Fix possible crashes in aggregate functions with combinator `Distinct`, while using two-level aggregation. This is a follow-up fix of [#18365](https://github.com/ClickHouse/ClickHouse/pull/18365) . Can only reproduced in production env. [#21818](https://github.com/ClickHouse/ClickHouse/pull/21818) ([Amos Bird](https://github.com/amosbird)). +* Fix scalar subquery index analysis. This fixes [#21717](https://github.com/ClickHouse/ClickHouse/issues/21717) , which was introduced in [#18896](https://github.com/ClickHouse/ClickHouse/pull/18896). [#21766](https://github.com/ClickHouse/ClickHouse/pull/21766) ([Amos Bird](https://github.com/amosbird)). +* Fix bug for `ReplicatedMerge` table engines when `ALTER MODIFY COLUMN` query doesn't change the type of `Decimal` column if its size (32 bit or 64 bit) doesn't change. [#21728](https://github.com/ClickHouse/ClickHouse/pull/21728) ([alesapin](https://github.com/alesapin)). +* Fix possible infinite waiting when concurrent `OPTIMIZE` and `DROP` are run for `ReplicatedMergeTree`. [#21716](https://github.com/ClickHouse/ClickHouse/pull/21716) ([Azat Khuzhin](https://github.com/azat)). +* Fix function `arrayElement` with type `Map` for constant integer arguments. [#21699](https://github.com/ClickHouse/ClickHouse/pull/21699) ([Anton Popov](https://github.com/CurtizJ)). +* Fix SIGSEGV on not existing attributes from `ip_trie` with `access_to_key_from_attributes`. [#21692](https://github.com/ClickHouse/ClickHouse/pull/21692) ([Azat Khuzhin](https://github.com/azat)). +* Server now start accepting connections only after `DDLWorker` and dictionaries initialization. [#21676](https://github.com/ClickHouse/ClickHouse/pull/21676) ([Azat Khuzhin](https://github.com/azat)). +* Add type conversion for keys of tables of type `Join` (previously led to SIGSEGV). [#21646](https://github.com/ClickHouse/ClickHouse/pull/21646) ([Azat Khuzhin](https://github.com/azat)). +* Fix distributed requests cancellation (for example simple select from multiple shards with limit, i.e. `select * from remote('127.{2,3}', system.numbers) limit 100`) with `async_socket_for_remote=1`. [#21643](https://github.com/ClickHouse/ClickHouse/pull/21643) ([Azat Khuzhin](https://github.com/azat)). +* Fix `fsync_part_directory` for horizontal merge. [#21642](https://github.com/ClickHouse/ClickHouse/pull/21642) ([Azat Khuzhin](https://github.com/azat)). +* Remove unknown columns from joined table in `WHERE` for queries to external database engines (MySQL, PostgreSQL). close [#14614](https://github.com/ClickHouse/ClickHouse/issues/14614), close [#19288](https://github.com/ClickHouse/ClickHouse/issues/19288) (dup), close [#19645](https://github.com/ClickHouse/ClickHouse/issues/19645) (dup). [#21640](https://github.com/ClickHouse/ClickHouse/pull/21640) ([Vladimir](https://github.com/vdimir)). +* `std::terminate` was called if there is an error writing data into s3. [#21624](https://github.com/ClickHouse/ClickHouse/pull/21624) ([Vladimir](https://github.com/vdimir)). +* Fix possible error `Cannot find column` when `optimize_skip_unused_shards` is enabled and zero shards are used. [#21579](https://github.com/ClickHouse/ClickHouse/pull/21579) ([Azat Khuzhin](https://github.com/azat)). +* In case if query has constant `WHERE` condition, and setting `optimize_skip_unused_shards` enabled, all shards may be skipped and query could return incorrect empty result. [#21550](https://github.com/ClickHouse/ClickHouse/pull/21550) ([Amos Bird](https://github.com/amosbird)). +* Fix table function `clusterAllReplicas` returns wrong `_shard_num`. close [#21481](https://github.com/ClickHouse/ClickHouse/issues/21481). [#21498](https://github.com/ClickHouse/ClickHouse/pull/21498) ([flynn](https://github.com/ucasFL)). +* Fix that S3 table holds old credentials after config update. [#21457](https://github.com/ClickHouse/ClickHouse/pull/21457) ([Grigory Pervakov](https://github.com/GrigoryPervakov)). +* Fixed race on SSL object inside `SecureSocket` in Poco. [#21456](https://github.com/ClickHouse/ClickHouse/pull/21456) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix `Avro` format parsing for `Kafka`. Fixes [#21437](https://github.com/ClickHouse/ClickHouse/issues/21437). [#21438](https://github.com/ClickHouse/ClickHouse/pull/21438) ([Ilya Golshtein](https://github.com/ilejn)). +* Fix receive and send timeouts and non-blocking read in secure socket. [#21429](https://github.com/ClickHouse/ClickHouse/pull/21429) ([Kruglov Pavel](https://github.com/Avogar)). +* `force_drop_table` flag didn't work for `MATERIALIZED VIEW`, it's fixed. Fixes [#18943](https://github.com/ClickHouse/ClickHouse/issues/18943). [#20626](https://github.com/ClickHouse/ClickHouse/pull/20626) ([tavplubix](https://github.com/tavplubix)). +* Fix name clashes in `PredicateRewriteVisitor`. It caused incorrect `WHERE` filtration after full join. Close [#20497](https://github.com/ClickHouse/ClickHouse/issues/20497). [#20622](https://github.com/ClickHouse/ClickHouse/pull/20622) ([Vladimir](https://github.com/vdimir)). + +#### Build/Testing/Packaging Improvement + +* Add [Jepsen](https://github.com/jepsen-io/jepsen) tests for ClickHouse Keeper. [#21677](https://github.com/ClickHouse/ClickHouse/pull/21677) ([alesapin](https://github.com/alesapin)). +* Run stateless tests in parallel in CI. Depends on [#22181](https://github.com/ClickHouse/ClickHouse/issues/22181). [#22300](https://github.com/ClickHouse/ClickHouse/pull/22300) ([alesapin](https://github.com/alesapin)). +* Enable status check for [SQLancer](https://github.com/sqlancer/sqlancer) CI run. [#22015](https://github.com/ClickHouse/ClickHouse/pull/22015) ([Ilya Yatsishin](https://github.com/qoega)). +* Multiple preparations for PowerPC builds: Enable the bundled openldap on `ppc64le`. [#22487](https://github.com/ClickHouse/ClickHouse/pull/22487) ([Kfir Itzhak](https://github.com/mastertheknife)). Enable compiling on `ppc64le` with Clang. [#22476](https://github.com/ClickHouse/ClickHouse/pull/22476) ([Kfir Itzhak](https://github.com/mastertheknife)). Fix compiling boost on `ppc64le`. [#22474](https://github.com/ClickHouse/ClickHouse/pull/22474) ([Kfir Itzhak](https://github.com/mastertheknife)). Fix CMake error about internal CMake variable `CMAKE_ASM_COMPILE_OBJECT` not set on `ppc64le`. [#22469](https://github.com/ClickHouse/ClickHouse/pull/22469) ([Kfir Itzhak](https://github.com/mastertheknife)). Fix Fedora/RHEL/CentOS not finding `libclang_rt.builtins` on `ppc64le`. [#22458](https://github.com/ClickHouse/ClickHouse/pull/22458) ([Kfir Itzhak](https://github.com/mastertheknife)). Enable building with `jemalloc` on `ppc64le`. [#22447](https://github.com/ClickHouse/ClickHouse/pull/22447) ([Kfir Itzhak](https://github.com/mastertheknife)). Fix ClickHouse's config embedding and cctz's timezone embedding on `ppc64le`. [#22445](https://github.com/ClickHouse/ClickHouse/pull/22445) ([Kfir Itzhak](https://github.com/mastertheknife)). Fixed compiling on `ppc64le` and use the correct instruction pointer register on `ppc64le`. [#22430](https://github.com/ClickHouse/ClickHouse/pull/22430) ([Kfir Itzhak](https://github.com/mastertheknife)). +* Re-enable the S3 (AWS) library on `aarch64`. [#22484](https://github.com/ClickHouse/ClickHouse/pull/22484) ([Kfir Itzhak](https://github.com/mastertheknife)). +* Add `tzdata` to Docker containers because reading `ORC` formats requires it. This closes [#14156](https://github.com/ClickHouse/ClickHouse/issues/14156). [#22000](https://github.com/ClickHouse/ClickHouse/pull/22000) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Introduce 2 arguments for `clickhouse-server` image Dockerfile: `deb_location` & `single_binary_location`. [#21977](https://github.com/ClickHouse/ClickHouse/pull/21977) ([filimonov](https://github.com/filimonov)). +* Allow to use clang-tidy with release builds by enabling assertions if it is used. [#21914](https://github.com/ClickHouse/ClickHouse/pull/21914) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add llvm-12 binaries name to search in cmake scripts. Implicit constants conversions to mute clang warnings. Updated submodules to build with CMake 3.19. Mute recursion in macro expansion in `readpassphrase` library. Deprecated `-fuse-ld` changed to `--ld-path` for clang. [#21597](https://github.com/ClickHouse/ClickHouse/pull/21597) ([Ilya Yatsishin](https://github.com/qoega)). +* Updating `docker/test/testflows/runner/dockerd-entrypoint.sh` to use Yandex dockerhub-proxy, because Docker Hub has enabled very restrictive rate limits [#21551](https://github.com/ClickHouse/ClickHouse/pull/21551) ([vzakaznikov](https://github.com/vzakaznikov)). +* Fix macOS shared lib build. [#20184](https://github.com/ClickHouse/ClickHouse/pull/20184) ([nvartolomei](https://github.com/nvartolomei)). +* Add `ctime` option to `zookeeper-dump-tree`. It allows to dump node creation time. [#21842](https://github.com/ClickHouse/ClickHouse/pull/21842) ([Ilya](https://github.com/HumanUser)). + + +## ClickHouse release 21.3 (LTS) + +### ClickHouse release v21.3, 2021-03-12 + +#### Backward Incompatible Change + +* Now it's not allowed to create MergeTree tables in old syntax with table TTL because it's just ignored. Attach of old tables is still possible. [#20282](https://github.com/ClickHouse/ClickHouse/pull/20282) ([alesapin](https://github.com/alesapin)). +* Now all case-insensitive function names will be rewritten to their canonical representations. This is needed for projection query routing (the upcoming feature). [#20174](https://github.com/ClickHouse/ClickHouse/pull/20174) ([Amos Bird](https://github.com/amosbird)). +* Fix creation of `TTL` in cases, when its expression is a function and it is the same as `ORDER BY` key. Now it's allowed to set custom aggregation to primary key columns in `TTL` with `GROUP BY`. Backward incompatible: For primary key columns, which are not in `GROUP BY` and aren't set explicitly now is applied function `any` instead of `max`, when TTL is expired. Also if you use TTL with `WHERE` or `GROUP BY` you can see exceptions at merges, while making rolling update. [#15450](https://github.com/ClickHouse/ClickHouse/pull/15450) ([Anton Popov](https://github.com/CurtizJ)). + +#### New Feature + +* Add file engine settings: `engine_file_empty_if_not_exists` and `engine_file_truncate_on_insert`. [#20620](https://github.com/ClickHouse/ClickHouse/pull/20620) ([M0r64n](https://github.com/M0r64n)). +* Add aggregate function `deltaSum` for summing the differences between consecutive rows. [#20057](https://github.com/ClickHouse/ClickHouse/pull/20057) ([Russ Frank](https://github.com/rf)). +* New `event_time_microseconds` column in `system.part_log` table. [#20027](https://github.com/ClickHouse/ClickHouse/pull/20027) ([Bharat Nallan](https://github.com/bharatnc)). +* Added `timezoneOffset(datetime)` function which will give the offset from UTC in seconds. This close [#issue:19850](https://github.com/ClickHouse/ClickHouse/issues/19850). [#19962](https://github.com/ClickHouse/ClickHouse/pull/19962) ([keenwolf](https://github.com/keen-wolf)). +* Add setting `insert_shard_id` to support insert data into specific shard from distributed table. [#19961](https://github.com/ClickHouse/ClickHouse/pull/19961) ([flynn](https://github.com/ucasFL)). +* Function `reinterpretAs` updated to support big integers. Fixes [#19691](https://github.com/ClickHouse/ClickHouse/issues/19691). [#19858](https://github.com/ClickHouse/ClickHouse/pull/19858) ([Maksim Kita](https://github.com/kitaisreal)). +* Added Server Side Encryption Customer Keys (the `x-amz-server-side-encryption-customer-(key/md5)` header) support in S3 client. See [the link](https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). Closes [#19428](https://github.com/ClickHouse/ClickHouse/issues/19428). [#19748](https://github.com/ClickHouse/ClickHouse/pull/19748) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Added `implicit_key` option for `executable` dictionary source. It allows to avoid printing key for every record if records comes in the same order as the input keys. Implements [#14527](https://github.com/ClickHouse/ClickHouse/issues/14527). [#19677](https://github.com/ClickHouse/ClickHouse/pull/19677) ([Maksim Kita](https://github.com/kitaisreal)). +* Add quota type `query_selects` and `query_inserts`. [#19603](https://github.com/ClickHouse/ClickHouse/pull/19603) ([JackyWoo](https://github.com/JackyWoo)). +* Add function `extractTextFromHTML` [#19600](https://github.com/ClickHouse/ClickHouse/pull/19600) ([zlx19950903](https://github.com/zlx19950903)), ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Tables with `MergeTree*` engine now have two new table-level settings for query concurrency control. Setting `max_concurrent_queries` limits the number of concurrently executed queries which are related to this table. Setting `min_marks_to_honor_max_concurrent_queries` tells to apply previous setting only if query reads at least this number of marks. [#19544](https://github.com/ClickHouse/ClickHouse/pull/19544) ([Amos Bird](https://github.com/amosbird)). +* Added `file` function to read file from user_files directory as a String. This is different from the `file` table function. This implements [#issue:18851](https://github.com/ClickHouse/ClickHouse/issues/18851). [#19204](https://github.com/ClickHouse/ClickHouse/pull/19204) ([keenwolf](https://github.com/keen-wolf)). + +#### Experimental feature + +* Add experimental `Replicated` database engine. It replicates DDL queries across multiple hosts. [#16193](https://github.com/ClickHouse/ClickHouse/pull/16193) ([tavplubix](https://github.com/tavplubix)). +* Introduce experimental support for window functions, enabled with `allow_experimental_window_functions = 1`. This is a preliminary, alpha-quality implementation that is not suitable for production use and will change in backward-incompatible ways in future releases. Please see [the documentation](https://github.com/ClickHouse/ClickHouse/blob/master/docs/en/sql-reference/window-functions/index.md#experimental-window-functions) for the list of supported features. [#20337](https://github.com/ClickHouse/ClickHouse/pull/20337) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Add the ability to backup/restore metadata files for DiskS3. [#18377](https://github.com/ClickHouse/ClickHouse/pull/18377) ([Pavel Kovalenko](https://github.com/Jokser)). + +#### Performance Improvement + +* Hedged requests for remote queries. When setting `use_hedged_requests` enabled (off by default), allow to establish many connections with different replicas for query. New connection is enabled in case existent connection(s) with replica(s) were not established within `hedged_connection_timeout` or no data was received within `receive_data_timeout`. Query uses the first connection which send non empty progress packet (or data packet, if `allow_changing_replica_until_first_data_packet`); other connections are cancelled. Queries with `max_parallel_replicas > 1` are supported. [#19291](https://github.com/ClickHouse/ClickHouse/pull/19291) ([Kruglov Pavel](https://github.com/Avogar)). This allows to significantly reduce tail latencies on very large clusters. +* Added support for `PREWHERE` (and enable the corresponding optimization) when tables have row-level security expressions specified. [#19576](https://github.com/ClickHouse/ClickHouse/pull/19576) ([Denis Glazachev](https://github.com/traceon)). +* The setting `distributed_aggregation_memory_efficient` is enabled by default. It will lower memory usage and improve performance of distributed queries. [#20599](https://github.com/ClickHouse/ClickHouse/pull/20599) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve performance of GROUP BY multiple fixed size keys. [#20472](https://github.com/ClickHouse/ClickHouse/pull/20472) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve performance of aggregate functions by more strict aliasing. [#19946](https://github.com/ClickHouse/ClickHouse/pull/19946) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Speed up reading from `Memory` tables in extreme cases (when reading speed is in order of 50 GB/sec) by simplification of pipeline and (consequently) less lock contention in pipeline scheduling. [#20468](https://github.com/ClickHouse/ClickHouse/pull/20468) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Partially reimplement HTTP server to make it making less copies of incoming and outgoing data. It gives up to 1.5 performance improvement on inserting long records over HTTP. [#19516](https://github.com/ClickHouse/ClickHouse/pull/19516) ([Ivan](https://github.com/abyss7)). +* Add `compress` setting for `Memory` tables. If it's enabled the table will use less RAM. On some machines and datasets it can also work faster on SELECT, but it is not always the case. This closes [#20093](https://github.com/ClickHouse/ClickHouse/issues/20093). Note: there are reasons why Memory tables can work slower than MergeTree: (1) lack of compression (2) static size of blocks (3) lack of indices and prewhere... [#20168](https://github.com/ClickHouse/ClickHouse/pull/20168) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Slightly better code in aggregation. [#20978](https://github.com/ClickHouse/ClickHouse/pull/20978) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add back `intDiv`/`modulo` specializations for better performance. This fixes [#21293](https://github.com/ClickHouse/ClickHouse/issues/21293) . The regression was introduced in https://github.com/ClickHouse/ClickHouse/pull/18145 . [#21307](https://github.com/ClickHouse/ClickHouse/pull/21307) ([Amos Bird](https://github.com/amosbird)). +* Do not squash blocks too much on INSERT SELECT if inserting into Memory table. In previous versions inefficient data representation was created in Memory table after INSERT SELECT. This closes [#13052](https://github.com/ClickHouse/ClickHouse/issues/13052). [#20169](https://github.com/ClickHouse/ClickHouse/pull/20169) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix at least one case when DataType parser may have exponential complexity (found by fuzzer). This closes [#20096](https://github.com/ClickHouse/ClickHouse/issues/20096). [#20132](https://github.com/ClickHouse/ClickHouse/pull/20132) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Parallelize SELECT with FINAL for single part with level > 0 when `do_not_merge_across_partitions_select_final` setting is 1. [#19375](https://github.com/ClickHouse/ClickHouse/pull/19375) ([Kruglov Pavel](https://github.com/Avogar)). +* Fill only requested columns when querying `system.parts` and `system.parts_columns`. Closes [#19570](https://github.com/ClickHouse/ClickHouse/issues/19570). [#21035](https://github.com/ClickHouse/ClickHouse/pull/21035) ([Anmol Arora](https://github.com/anmolarora)). +* Perform algebraic optimizations of arithmetic expressions inside `avg` aggregate function. close [#20092](https://github.com/ClickHouse/ClickHouse/issues/20092). [#20183](https://github.com/ClickHouse/ClickHouse/pull/20183) ([flynn](https://github.com/ucasFL)). + +#### Improvement + +* Case-insensitive compression methods for table functions. Also fixed LZMA compression method which was checked in upper case. [#21416](https://github.com/ClickHouse/ClickHouse/pull/21416) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Add two settings to delay or throw error during insertion when there are too many inactive parts. This is useful when server fails to clean up parts quickly enough. [#20178](https://github.com/ClickHouse/ClickHouse/pull/20178) ([Amos Bird](https://github.com/amosbird)). +* Provide better compatibility for mysql clients. 1. mysql jdbc 2. mycli. [#21367](https://github.com/ClickHouse/ClickHouse/pull/21367) ([Amos Bird](https://github.com/amosbird)). +* Forbid to drop a column if it's referenced by materialized view. Closes [#21164](https://github.com/ClickHouse/ClickHouse/issues/21164). [#21303](https://github.com/ClickHouse/ClickHouse/pull/21303) ([flynn](https://github.com/ucasFL)). +* MySQL dictionary source will now retry unexpected connection failures (Lost connection to MySQL server during query) which sometimes happen on SSL/TLS connections. [#21237](https://github.com/ClickHouse/ClickHouse/pull/21237) ([Alexander Kazakov](https://github.com/Akazz)). +* Usability improvement: more consistent `DateTime64` parsing: recognize the case when unix timestamp with subsecond resolution is specified as scaled integer (like `1111111111222` instead of `1111111111.222`). This closes [#13194](https://github.com/ClickHouse/ClickHouse/issues/13194). [#21053](https://github.com/ClickHouse/ClickHouse/pull/21053) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Do only merging of sorted blocks on initiator with distributed_group_by_no_merge. [#20882](https://github.com/ClickHouse/ClickHouse/pull/20882) ([Azat Khuzhin](https://github.com/azat)). +* When loading config for mysql source ClickHouse will now randomize the list of replicas with the same priority to ensure the round-robin logics of picking mysql endpoint. This closes [#20629](https://github.com/ClickHouse/ClickHouse/issues/20629). [#20632](https://github.com/ClickHouse/ClickHouse/pull/20632) ([Alexander Kazakov](https://github.com/Akazz)). +* Function 'reinterpretAs(x, Type)' renamed into 'reinterpret(x, Type)'. [#20611](https://github.com/ClickHouse/ClickHouse/pull/20611) ([Maksim Kita](https://github.com/kitaisreal)). +* Support vhost for RabbitMQ engine [#20576](https://github.com/ClickHouse/ClickHouse/issues/20576). [#20596](https://github.com/ClickHouse/ClickHouse/pull/20596) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Improved serialization for data types combined of Arrays and Tuples. Improved matching enum data types to protobuf enum type. Fixed serialization of the `Map` data type. Omitted values are now set by default. [#20506](https://github.com/ClickHouse/ClickHouse/pull/20506) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed race between execution of distributed DDL tasks and cleanup of DDL queue. Now DDL task cannot be removed from ZooKeeper if there are active workers. Fixes [#20016](https://github.com/ClickHouse/ClickHouse/issues/20016). [#20448](https://github.com/ClickHouse/ClickHouse/pull/20448) ([tavplubix](https://github.com/tavplubix)). +* Make FQDN and other DNS related functions work correctly in alpine images. [#20336](https://github.com/ClickHouse/ClickHouse/pull/20336) ([filimonov](https://github.com/filimonov)). +* Do not allow early constant folding of explicitly forbidden functions. [#20303](https://github.com/ClickHouse/ClickHouse/pull/20303) ([Azat Khuzhin](https://github.com/azat)). +* Implicit conversion from integer to Decimal type might succeeded if integer value doe not fit into Decimal type. Now it throws `ARGUMENT_OUT_OF_BOUND`. [#20232](https://github.com/ClickHouse/ClickHouse/pull/20232) ([tavplubix](https://github.com/tavplubix)). +* Lockless `SYSTEM FLUSH DISTRIBUTED`. [#20215](https://github.com/ClickHouse/ClickHouse/pull/20215) ([Azat Khuzhin](https://github.com/azat)). +* Normalize count(constant), sum(1) to count(). This is needed for projection query routing. [#20175](https://github.com/ClickHouse/ClickHouse/pull/20175) ([Amos Bird](https://github.com/amosbird)). +* Support all native integer types in bitmap functions. [#20171](https://github.com/ClickHouse/ClickHouse/pull/20171) ([Amos Bird](https://github.com/amosbird)). +* Updated `CacheDictionary`, `ComplexCacheDictionary`, `SSDCacheDictionary`, `SSDComplexKeyDictionary` to use LRUHashMap as underlying index. [#20164](https://github.com/ClickHouse/ClickHouse/pull/20164) ([Maksim Kita](https://github.com/kitaisreal)). +* The setting `access_management` is now configurable on startup by providing `CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT`, defaults to disabled (`0`) which was the prior value. [#20139](https://github.com/ClickHouse/ClickHouse/pull/20139) ([Marquitos](https://github.com/sonirico)). +* Fix toDateTime64(toDate()/toDateTime()) for DateTime64 - Implement DateTime64 clamping to match DateTime behaviour. [#20131](https://github.com/ClickHouse/ClickHouse/pull/20131) ([Azat Khuzhin](https://github.com/azat)). +* Quota improvements: SHOW TABLES is now considered as one query in the quota calculations, not two queries. SYSTEM queries now consume quota. Fix calculation of interval's end in quota consumption. [#20106](https://github.com/ClickHouse/ClickHouse/pull/20106) ([Vitaly Baranov](https://github.com/vitlibar)). +* Supports `path IN (set)` expressions for `system.zookeeper` table. [#20105](https://github.com/ClickHouse/ClickHouse/pull/20105) ([å°è·¯](https://github.com/nicelulu)). +* Show full details of `MaterializeMySQL` tables in `system.tables`. [#20051](https://github.com/ClickHouse/ClickHouse/pull/20051) ([Stig Bakken](https://github.com/stigsb)). +* Fix data race in executable dictionary that was possible only on misuse (when the script returns data ignoring its input). [#20045](https://github.com/ClickHouse/ClickHouse/pull/20045) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* The value of MYSQL_OPT_RECONNECT option can now be controlled by "opt_reconnect" parameter in the config section of mysql replica. [#19998](https://github.com/ClickHouse/ClickHouse/pull/19998) ([Alexander Kazakov](https://github.com/Akazz)). +* If user calls `JSONExtract` function with `Float32` type requested, allow inaccurate conversion to the result type. For example the number `0.1` in JSON is double precision and is not representable in Float32, but the user still wants to get it. Previous versions return 0 for non-Nullable type and NULL for Nullable type to indicate that conversion is imprecise. The logic was 100% correct but it was surprising to users and leading to questions. This closes [#13962](https://github.com/ClickHouse/ClickHouse/issues/13962). [#19960](https://github.com/ClickHouse/ClickHouse/pull/19960) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add conversion of block structure for INSERT into Distributed tables if it does not match. [#19947](https://github.com/ClickHouse/ClickHouse/pull/19947) ([Azat Khuzhin](https://github.com/azat)). +* Improvement for the `system.distributed_ddl_queue` table. Initialize MaxDDLEntryID to the last value after restarting. Before this PR, MaxDDLEntryID will remain zero until a new DDLTask is processed. [#19924](https://github.com/ClickHouse/ClickHouse/pull/19924) ([Amos Bird](https://github.com/amosbird)). +* Show `MaterializeMySQL` tables in `system.parts`. [#19770](https://github.com/ClickHouse/ClickHouse/pull/19770) ([Stig Bakken](https://github.com/stigsb)). +* Add separate config directive for `Buffer` profile. [#19721](https://github.com/ClickHouse/ClickHouse/pull/19721) ([Azat Khuzhin](https://github.com/azat)). +* Move conditions that are not related to JOIN to WHERE clause. [#18720](https://github.com/ClickHouse/ClickHouse/issues/18720). [#19685](https://github.com/ClickHouse/ClickHouse/pull/19685) ([hexiaoting](https://github.com/hexiaoting)). +* Add ability to throttle INSERT into Distributed based on amount of pending bytes for async send (`bytes_to_delay_insert`/`max_delay_to_insert` and `bytes_to_throw_insert` settings for `Distributed` engine has been added). [#19673](https://github.com/ClickHouse/ClickHouse/pull/19673) ([Azat Khuzhin](https://github.com/azat)). +* Fix some rare cases when write errors can be ignored in destructors. [#19451](https://github.com/ClickHouse/ClickHouse/pull/19451) ([Azat Khuzhin](https://github.com/azat)). +* Print inline frames in stack traces for fatal errors. [#19317](https://github.com/ClickHouse/ClickHouse/pull/19317) ([Ivan](https://github.com/abyss7)). + +#### Bug Fix + +* Fix redundant reconnects to ZooKeeper and the possibility of two active sessions for a single clickhouse server. Both problems introduced in #14678. [#21264](https://github.com/ClickHouse/ClickHouse/pull/21264) ([alesapin](https://github.com/alesapin)). +* Fix error `Bad cast from type ... to DB::ColumnLowCardinality` while inserting into table with `LowCardinality` column from `Values` format. Fixes #21140 [#21357](https://github.com/ClickHouse/ClickHouse/pull/21357) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix a deadlock in `ALTER DELETE` mutations for non replicated MergeTree table engines when the predicate contains the table itself. Fixes [#20558](https://github.com/ClickHouse/ClickHouse/issues/20558). [#21477](https://github.com/ClickHouse/ClickHouse/pull/21477) ([alesapin](https://github.com/alesapin)). +* Fix SIGSEGV for distributed queries on failures. [#21434](https://github.com/ClickHouse/ClickHouse/pull/21434) ([Azat Khuzhin](https://github.com/azat)). +* Now `ALTER MODIFY COLUMN` queries will correctly affect changes in partition key, skip indices, TTLs, and so on. Fixes [#13675](https://github.com/ClickHouse/ClickHouse/issues/13675). [#21334](https://github.com/ClickHouse/ClickHouse/pull/21334) ([alesapin](https://github.com/alesapin)). +* Fix bug with `join_use_nulls` and joining `TOTALS` from subqueries. This closes [#19362](https://github.com/ClickHouse/ClickHouse/issues/19362) and [#21137](https://github.com/ClickHouse/ClickHouse/issues/21137). [#21248](https://github.com/ClickHouse/ClickHouse/pull/21248) ([vdimir](https://github.com/vdimir)). +* Fix crash in `EXPLAIN` for query with `UNION`. Fixes [#20876](https://github.com/ClickHouse/ClickHouse/issues/20876), [#21170](https://github.com/ClickHouse/ClickHouse/issues/21170). [#21246](https://github.com/ClickHouse/ClickHouse/pull/21246) ([flynn](https://github.com/ucasFL)). +* Now mutations allowed only for table engines that support them (MergeTree family, Memory, MaterializedView). Other engines will report a more clear error. Fixes [#21168](https://github.com/ClickHouse/ClickHouse/issues/21168). [#21183](https://github.com/ClickHouse/ClickHouse/pull/21183) ([alesapin](https://github.com/alesapin)). +* Fixes [#21112](https://github.com/ClickHouse/ClickHouse/issues/21112). Fixed bug that could cause duplicates with insert query (if one of the callbacks came a little too late). [#21138](https://github.com/ClickHouse/ClickHouse/pull/21138) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix `input_format_null_as_default` take effective when types are nullable. This fixes [#21116](https://github.com/ClickHouse/ClickHouse/issues/21116) . [#21121](https://github.com/ClickHouse/ClickHouse/pull/21121) ([Amos Bird](https://github.com/amosbird)). +* fix bug related to cast Tuple to Map. Closes [#21029](https://github.com/ClickHouse/ClickHouse/issues/21029). [#21120](https://github.com/ClickHouse/ClickHouse/pull/21120) ([hexiaoting](https://github.com/hexiaoting)). +* Fix the metadata leak when the Replicated*MergeTree with custom (non default) ZooKeeper cluster is dropped. [#21119](https://github.com/ClickHouse/ClickHouse/pull/21119) ([fastio](https://github.com/fastio)). +* Fix type mismatch issue when using LowCardinality keys in joinGet. This fixes [#21114](https://github.com/ClickHouse/ClickHouse/issues/21114). [#21117](https://github.com/ClickHouse/ClickHouse/pull/21117) ([Amos Bird](https://github.com/amosbird)). +* fix default_replica_path and default_replica_name values are useless on Replicated(*)MergeTree engine when the engine needs specify other parameters. [#21060](https://github.com/ClickHouse/ClickHouse/pull/21060) ([mxzlxy](https://github.com/mxzlxy)). +* Out of bound memory access was possible when formatting specifically crafted out of range value of type `DateTime64`. This closes [#20494](https://github.com/ClickHouse/ClickHouse/issues/20494). This closes [#20543](https://github.com/ClickHouse/ClickHouse/issues/20543). [#21023](https://github.com/ClickHouse/ClickHouse/pull/21023) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Block parallel insertions into storage join. [#21009](https://github.com/ClickHouse/ClickHouse/pull/21009) ([vdimir](https://github.com/vdimir)). +* Fixed behaviour, when `ALTER MODIFY COLUMN` created mutation, that will knowingly fail. [#21007](https://github.com/ClickHouse/ClickHouse/pull/21007) ([Anton Popov](https://github.com/CurtizJ)). +* Closes [#9969](https://github.com/ClickHouse/ClickHouse/issues/9969). Fixed Brotli http compression error, which reproduced for large data sizes, slightly complicated structure and with json output format. Update Brotli to the latest version to include the "fix rare access to uninitialized data in ring-buffer". [#20991](https://github.com/ClickHouse/ClickHouse/pull/20991) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix 'Empty task was returned from async task queue' on query cancellation. [#20881](https://github.com/ClickHouse/ClickHouse/pull/20881) ([Azat Khuzhin](https://github.com/azat)). +* `USE database;` query did not work when using MySQL 5.7 client to connect to ClickHouse server, it's fixed. Fixes [#18926](https://github.com/ClickHouse/ClickHouse/issues/18926). [#20878](https://github.com/ClickHouse/ClickHouse/pull/20878) ([tavplubix](https://github.com/tavplubix)). +* Fix usage of `-Distinct` combinator with `-State` combinator in aggregate functions. [#20866](https://github.com/ClickHouse/ClickHouse/pull/20866) ([Anton Popov](https://github.com/CurtizJ)). +* Fix subquery with union distinct and limit clause. close [#20597](https://github.com/ClickHouse/ClickHouse/issues/20597). [#20610](https://github.com/ClickHouse/ClickHouse/pull/20610) ([flynn](https://github.com/ucasFL)). +* Fixed inconsistent behavior of dictionary in case of queries where we look for absent keys in dictionary. [#20578](https://github.com/ClickHouse/ClickHouse/pull/20578) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix the number of threads for scalar subqueries and subqueries for index (after [#19007](https://github.com/ClickHouse/ClickHouse/issues/19007) single thread was always used). Fixes [#20457](https://github.com/ClickHouse/ClickHouse/issues/20457), [#20512](https://github.com/ClickHouse/ClickHouse/issues/20512). [#20550](https://github.com/ClickHouse/ClickHouse/pull/20550) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix crash which could happen if unknown packet was received from remove query (was introduced in [#17868](https://github.com/ClickHouse/ClickHouse/issues/17868)). [#20547](https://github.com/ClickHouse/ClickHouse/pull/20547) ([Azat Khuzhin](https://github.com/azat)). +* Add proper checks while parsing directory names for async INSERT (fixes SIGSEGV). [#20498](https://github.com/ClickHouse/ClickHouse/pull/20498) ([Azat Khuzhin](https://github.com/azat)). +* Fix function `transform` does not work properly for floating point keys. Closes [#20460](https://github.com/ClickHouse/ClickHouse/issues/20460). [#20479](https://github.com/ClickHouse/ClickHouse/pull/20479) ([flynn](https://github.com/ucasFL)). +* Fix infinite loop when propagating WITH aliases to subqueries. This fixes [#20388](https://github.com/ClickHouse/ClickHouse/issues/20388). [#20476](https://github.com/ClickHouse/ClickHouse/pull/20476) ([Amos Bird](https://github.com/amosbird)). +* Fix abnormal server termination when http client goes away. [#20464](https://github.com/ClickHouse/ClickHouse/pull/20464) ([Azat Khuzhin](https://github.com/azat)). +* Fix `LOGICAL_ERROR` for `join_use_nulls=1` when JOIN contains const from SELECT. [#20461](https://github.com/ClickHouse/ClickHouse/pull/20461) ([Azat Khuzhin](https://github.com/azat)). +* Check if table function `view` is used in expression list and throw an error. This fixes [#20342](https://github.com/ClickHouse/ClickHouse/issues/20342). [#20350](https://github.com/ClickHouse/ClickHouse/pull/20350) ([Amos Bird](https://github.com/amosbird)). +* Avoid invalid dereference in RANGE_HASHED() dictionary. [#20345](https://github.com/ClickHouse/ClickHouse/pull/20345) ([Azat Khuzhin](https://github.com/azat)). +* Fix null dereference with `join_use_nulls=1`. [#20344](https://github.com/ClickHouse/ClickHouse/pull/20344) ([Azat Khuzhin](https://github.com/azat)). +* Fix incorrect result of binary operations between two constant decimals of different scale. Fixes [#20283](https://github.com/ClickHouse/ClickHouse/issues/20283). [#20339](https://github.com/ClickHouse/ClickHouse/pull/20339) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix too often retries of failed background tasks for `ReplicatedMergeTree` table engines family. This could lead to too verbose logging and increased CPU load. Fixes [#20203](https://github.com/ClickHouse/ClickHouse/issues/20203). [#20335](https://github.com/ClickHouse/ClickHouse/pull/20335) ([alesapin](https://github.com/alesapin)). +* Restrict to `DROP` or `RENAME` version column of `*CollapsingMergeTree` and `ReplacingMergeTree` table engines. [#20300](https://github.com/ClickHouse/ClickHouse/pull/20300) ([alesapin](https://github.com/alesapin)). +* Fixed the behavior when in case of broken JSON we tried to read the whole file into memory which leads to exception from the allocator. Fixes [#19719](https://github.com/ClickHouse/ClickHouse/issues/19719). [#20286](https://github.com/ClickHouse/ClickHouse/pull/20286) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix exception during vertical merge for `MergeTree` table engines family which don't allow to perform vertical merges. Fixes [#20259](https://github.com/ClickHouse/ClickHouse/issues/20259). [#20279](https://github.com/ClickHouse/ClickHouse/pull/20279) ([alesapin](https://github.com/alesapin)). +* Fix rare server crash on config reload during the shutdown. Fixes [#19689](https://github.com/ClickHouse/ClickHouse/issues/19689). [#20224](https://github.com/ClickHouse/ClickHouse/pull/20224) ([alesapin](https://github.com/alesapin)). +* Fix CTE when using in INSERT SELECT. This fixes [#20187](https://github.com/ClickHouse/ClickHouse/issues/20187), fixes [#20195](https://github.com/ClickHouse/ClickHouse/issues/20195). [#20211](https://github.com/ClickHouse/ClickHouse/pull/20211) ([Amos Bird](https://github.com/amosbird)). +* Fixes [#19314](https://github.com/ClickHouse/ClickHouse/issues/19314). [#20156](https://github.com/ClickHouse/ClickHouse/pull/20156) ([Ivan](https://github.com/abyss7)). +* fix toMinute function to handle special timezone correctly. [#20149](https://github.com/ClickHouse/ClickHouse/pull/20149) ([keenwolf](https://github.com/keen-wolf)). +* Fix server crash after query with `if` function with `Tuple` type of then/else branches result. `Tuple` type must contain `Array` or another complex type. Fixes [#18356](https://github.com/ClickHouse/ClickHouse/issues/18356). [#20133](https://github.com/ClickHouse/ClickHouse/pull/20133) ([alesapin](https://github.com/alesapin)). +* The `MongoDB` table engine now establishes connection only when it's going to read data. `ATTACH TABLE` won't try to connect anymore. [#20110](https://github.com/ClickHouse/ClickHouse/pull/20110) ([Vitaly Baranov](https://github.com/vitlibar)). +* Bugfix in StorageJoin. [#20079](https://github.com/ClickHouse/ClickHouse/pull/20079) ([vdimir](https://github.com/vdimir)). +* Fix the case when calculating modulo of division of negative number by small divisor, the resulting data type was not large enough to accomodate the negative result. This closes [#20052](https://github.com/ClickHouse/ClickHouse/issues/20052). [#20067](https://github.com/ClickHouse/ClickHouse/pull/20067) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* MaterializeMySQL: Fix replication for statements that update several tables. [#20066](https://github.com/ClickHouse/ClickHouse/pull/20066) ([HÃ¥vard KvÃ¥len](https://github.com/havardk)). +* Prevent "Connection refused" in docker during initialization script execution. [#20012](https://github.com/ClickHouse/ClickHouse/pull/20012) ([filimonov](https://github.com/filimonov)). +* `EmbeddedRocksDB` is an experimental storage. Fix the issue with lack of proper type checking. Simplified code. This closes [#19967](https://github.com/ClickHouse/ClickHouse/issues/19967). [#19972](https://github.com/ClickHouse/ClickHouse/pull/19972) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix a segfault in function `fromModifiedJulianDay` when the argument type is `Nullable(T)` for any integral types other than Int32. [#19959](https://github.com/ClickHouse/ClickHouse/pull/19959) ([PHO](https://github.com/depressed-pho)). +* BloomFilter index crash fix. Fixes [#19757](https://github.com/ClickHouse/ClickHouse/issues/19757). [#19884](https://github.com/ClickHouse/ClickHouse/pull/19884) ([Maksim Kita](https://github.com/kitaisreal)). +* Deadlock was possible if system.text_log is enabled. This fixes [#19874](https://github.com/ClickHouse/ClickHouse/issues/19874). [#19875](https://github.com/ClickHouse/ClickHouse/pull/19875) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix starting the server with tables having default expressions containing dictGet(). Allow getting return type of dictGet() without loading dictionary. [#19805](https://github.com/ClickHouse/ClickHouse/pull/19805) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix clickhouse-client abort exception while executing only `select`. [#19790](https://github.com/ClickHouse/ClickHouse/pull/19790) ([taiyang-li](https://github.com/taiyang-li)). +* Fix a bug that moving pieces to destination table may failed in case of launching multiple clickhouse-copiers. [#19743](https://github.com/ClickHouse/ClickHouse/pull/19743) ([madianjun](https://github.com/mdianjun)). +* Background thread which executes `ON CLUSTER` queries might hang waiting for dropped replicated table to do something. It's fixed. [#19684](https://github.com/ClickHouse/ClickHouse/pull/19684) ([yiguolei](https://github.com/yiguolei)). + +#### Build/Testing/Packaging Improvement + +* Allow to build ClickHouse with AVX-2 enabled globally. It gives slight performance benefits on modern CPUs. Not recommended for production and will not be supported as official build for now. [#20180](https://github.com/ClickHouse/ClickHouse/pull/20180) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix some of the issues found by Coverity. See [#19964](https://github.com/ClickHouse/ClickHouse/issues/19964). [#20010](https://github.com/ClickHouse/ClickHouse/pull/20010) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow to start up with modified binary under gdb. In previous version if you set up breakpoint in gdb before start, server will refuse to start up due to failed integrity check. [#21258](https://github.com/ClickHouse/ClickHouse/pull/21258) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add a test for different compression methods in Kafka. [#21111](https://github.com/ClickHouse/ClickHouse/pull/21111) ([filimonov](https://github.com/filimonov)). +* Fixed port clash from test_storage_kerberized_hdfs test. [#19974](https://github.com/ClickHouse/ClickHouse/pull/19974) ([Ilya Yatsishin](https://github.com/qoega)). +* Print `stdout` and `stderr` to log when failed to start docker in integration tests. Before this PR there was a very short error message in this case which didn't help to investigate the problems. [#20631](https://github.com/ClickHouse/ClickHouse/pull/20631) ([Vitaly Baranov](https://github.com/vitlibar)). + + +## ClickHouse release 21.2 + +### ClickHouse release v21.2.2.8-stable, 2021-02-07 + +#### Backward Incompatible Change + +* Bitwise functions (`bitAnd`, `bitOr`, etc) are forbidden for floating point arguments. Now you have to do explicit cast to integer. [#19853](https://github.com/ClickHouse/ClickHouse/pull/19853) ([Azat Khuzhin](https://github.com/azat)). +* Forbid `lcm`/`gcd` for floats. [#19532](https://github.com/ClickHouse/ClickHouse/pull/19532) ([Azat Khuzhin](https://github.com/azat)). +* Fix memory tracking for `OPTIMIZE TABLE`/merges; account query memory limits and sampling for `OPTIMIZE TABLE`/merges. [#18772](https://github.com/ClickHouse/ClickHouse/pull/18772) ([Azat Khuzhin](https://github.com/azat)). +* Disallow floating point column as partition key, see [#18421](https://github.com/ClickHouse/ClickHouse/issues/18421#event-4147046255). [#18464](https://github.com/ClickHouse/ClickHouse/pull/18464) ([hexiaoting](https://github.com/hexiaoting)). +* Excessive parenthesis in type definitions no longer supported, example: `Array((UInt8))`. + +#### New Feature + +* Added `PostgreSQL` table engine (both select/insert, with support for multidimensional arrays), also as table function. Added `PostgreSQL` dictionary source. Added `PostgreSQL` database engine. [#18554](https://github.com/ClickHouse/ClickHouse/pull/18554) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Data type `Nested` now supports arbitrary levels of nesting. Introduced subcolumns of complex types, such as `size0` in `Array`, `null` in `Nullable`, names of `Tuple` elements, which can be read without reading of whole column. [#17310](https://github.com/ClickHouse/ClickHouse/pull/17310) ([Anton Popov](https://github.com/CurtizJ)). +* Added `Nullable` support for `FlatDictionary`, `HashedDictionary`, `ComplexKeyHashedDictionary`, `DirectDictionary`, `ComplexKeyDirectDictionary`, `RangeHashedDictionary`. [#18236](https://github.com/ClickHouse/ClickHouse/pull/18236) ([Maksim Kita](https://github.com/kitaisreal)). +* Adds a new table called `system.distributed_ddl_queue` that displays the queries in the DDL worker queue. [#17656](https://github.com/ClickHouse/ClickHouse/pull/17656) ([Bharat Nallan](https://github.com/bharatnc)). +* Added support of mapping LDAP group names, and attribute values in general, to local roles for users from ldap user directories. [#17211](https://github.com/ClickHouse/ClickHouse/pull/17211) ([Denis Glazachev](https://github.com/traceon)). +* Support insert into table function `cluster`, and for both table functions `remote` and `cluster`, support distributing data across nodes by specify sharding key. Close [#16752](https://github.com/ClickHouse/ClickHouse/issues/16752). [#18264](https://github.com/ClickHouse/ClickHouse/pull/18264) ([flynn](https://github.com/ucasFL)). +* Add function `decodeXMLComponent` to decode characters for XML. Example: `SELECT decodeXMLComponent('Hello,"world"!')` [#17659](https://github.com/ClickHouse/ClickHouse/issues/17659). [#18542](https://github.com/ClickHouse/ClickHouse/pull/18542) ([nauta](https://github.com/nautaa)). +* Added functions `parseDateTimeBestEffortUSOrZero`, `parseDateTimeBestEffortUSOrNull`. [#19712](https://github.com/ClickHouse/ClickHouse/pull/19712) ([Maksim Kita](https://github.com/kitaisreal)). +* Add `sign` math function. [#19527](https://github.com/ClickHouse/ClickHouse/pull/19527) ([flynn](https://github.com/ucasFL)). +* Add information about used features (functions, table engines, etc) into system.query_log. [#18495](https://github.com/ClickHouse/ClickHouse/issues/18495). [#19371](https://github.com/ClickHouse/ClickHouse/pull/19371) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Function `formatDateTime` support the `%Q` modification to format date to quarter. [#19224](https://github.com/ClickHouse/ClickHouse/pull/19224) ([Jianmei Zhang](https://github.com/zhangjmruc)). +* Support MetaKey+Enter hotkey binding in play UI. [#19012](https://github.com/ClickHouse/ClickHouse/pull/19012) ([sundyli](https://github.com/sundy-li)). +* Add three functions for map data type: 1. `mapContains(map, key)` to check weather map.keys include the second parameter key. 2. `mapKeys(map)` return all the keys in Array format 3. `mapValues(map)` return all the values in Array format. [#18788](https://github.com/ClickHouse/ClickHouse/pull/18788) ([hexiaoting](https://github.com/hexiaoting)). +* Add `log_comment` setting related to [#18494](https://github.com/ClickHouse/ClickHouse/issues/18494). [#18549](https://github.com/ClickHouse/ClickHouse/pull/18549) ([Zijie Lu](https://github.com/TszKitLo40)). +* Add support of tuple argument to `argMin` and `argMax` functions. [#17359](https://github.com/ClickHouse/ClickHouse/pull/17359) ([Ildus Kurbangaliev](https://github.com/ildus)). +* Support `EXISTS VIEW` syntax. [#18552](https://github.com/ClickHouse/ClickHouse/pull/18552) ([Du Chuan](https://github.com/spongedu)). +* Add `SELECT ALL` syntax. closes [#18706](https://github.com/ClickHouse/ClickHouse/issues/18706). [#18723](https://github.com/ClickHouse/ClickHouse/pull/18723) ([flynn](https://github.com/ucasFL)). + +#### Performance Improvement + +* Faster parts removal by lowering the number of `stat` syscalls. This returns the optimization that existed while ago. More safe interface of `IDisk`. This closes [#19065](https://github.com/ClickHouse/ClickHouse/issues/19065). [#19086](https://github.com/ClickHouse/ClickHouse/pull/19086) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Aliases declared in `WITH` statement are properly used in index analysis. Queries like `WITH column AS alias SELECT ... WHERE alias = ...` may use index now. [#18896](https://github.com/ClickHouse/ClickHouse/pull/18896) ([Amos Bird](https://github.com/amosbird)). +* Add `optimize_alias_column_prediction` (on by default), that will: - Respect aliased columns in WHERE during partition pruning and skipping data using secondary indexes; - Respect aliased columns in WHERE for trivial count queries for optimize_trivial_count; - Respect aliased columns in GROUP BY/ORDER BY for optimize_aggregation_in_order/optimize_read_in_order. [#16995](https://github.com/ClickHouse/ClickHouse/pull/16995) ([sundyli](https://github.com/sundy-li)). +* Speed up aggregate function `sum`. Improvement only visible on synthetic benchmarks and not very practical. [#19216](https://github.com/ClickHouse/ClickHouse/pull/19216) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Update libc++ and use another ABI to provide better performance. [#18914](https://github.com/ClickHouse/ClickHouse/pull/18914) ([Danila Kutenin](https://github.com/danlark1)). +* Rewrite `sumIf()` and `sum(if())` function to `countIf()` function when logically equivalent. [#17041](https://github.com/ClickHouse/ClickHouse/pull/17041) ([flynn](https://github.com/ucasFL)). +* Use a connection pool for S3 connections, controlled by the `s3_max_connections` settings. [#13405](https://github.com/ClickHouse/ClickHouse/pull/13405) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Add support for zstd long option for better compression of string columns to save space. [#17184](https://github.com/ClickHouse/ClickHouse/pull/17184) ([ygrek](https://github.com/ygrek)). +* Slightly improve server latency by removing access to configuration on every connection. [#19863](https://github.com/ClickHouse/ClickHouse/pull/19863) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Reduce lock contention for multiple layers of the `Buffer` engine. [#19379](https://github.com/ClickHouse/ClickHouse/pull/19379) ([Azat Khuzhin](https://github.com/azat)). +* Support splitting `Filter` step of query plan into `Expression + Filter` pair. Together with `Expression + Expression` merging optimization ([#17458](https://github.com/ClickHouse/ClickHouse/issues/17458)) it may delay execution for some expressions after `Filter` step. [#19253](https://github.com/ClickHouse/ClickHouse/pull/19253) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). + +#### Improvement + +* `SELECT count() FROM table` now can be executed if only one any column can be selected from the `table`. This PR fixes [#10639](https://github.com/ClickHouse/ClickHouse/issues/10639). [#18233](https://github.com/ClickHouse/ClickHouse/pull/18233) ([Vitaly Baranov](https://github.com/vitlibar)). +* Set charset to `utf8mb4` when interacting with remote MySQL servers. Fixes [#19795](https://github.com/ClickHouse/ClickHouse/issues/19795). [#19800](https://github.com/ClickHouse/ClickHouse/pull/19800) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* `S3` table function now supports `auto` compression mode (autodetect). This closes [#18754](https://github.com/ClickHouse/ClickHouse/issues/18754). [#19793](https://github.com/ClickHouse/ClickHouse/pull/19793) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Correctly output infinite arguments for `formatReadableTimeDelta` function. In previous versions, there was implicit conversion to implementation specific integer value. [#19791](https://github.com/ClickHouse/ClickHouse/pull/19791) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Table function `S3` will use global region if the region can't be determined exactly. This closes [#10998](https://github.com/ClickHouse/ClickHouse/issues/10998). [#19750](https://github.com/ClickHouse/ClickHouse/pull/19750) ([Vladimir Chebotarev](https://github.com/excitoon)). +* In distributed queries if the setting `async_socket_for_remote` is enabled, it was possible to get stack overflow at least in debug build configuration if very deeply nested data type is used in table (e.g. `Array(Array(Array(...more...)))`). This fixes [#19108](https://github.com/ClickHouse/ClickHouse/issues/19108). This change introduces minor backward incompatibility: excessive parenthesis in type definitions no longer supported, example: `Array((UInt8))`. [#19736](https://github.com/ClickHouse/ClickHouse/pull/19736) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add separate pool for message brokers (RabbitMQ and Kafka). [#19722](https://github.com/ClickHouse/ClickHouse/pull/19722) ([Azat Khuzhin](https://github.com/azat)). +* Fix rare `max_number_of_merges_with_ttl_in_pool` limit overrun (more merges with TTL can be assigned) for non-replicated MergeTree. [#19708](https://github.com/ClickHouse/ClickHouse/pull/19708) ([alesapin](https://github.com/alesapin)). +* Dictionary: better error message during attribute parsing. [#19678](https://github.com/ClickHouse/ClickHouse/pull/19678) ([Maksim Kita](https://github.com/kitaisreal)). +* Add an option to disable validation of checksums on reading. Should never be used in production. Please do not expect any benefits in disabling it. It may only be used for experiments and benchmarks. The setting only applicable for tables of MergeTree family. Checksums are always validated for other table engines and when receiving data over network. In my observations there is no performance difference or it is less than 0.5%. [#19588](https://github.com/ClickHouse/ClickHouse/pull/19588) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Support constant result in function `multiIf`. [#19533](https://github.com/ClickHouse/ClickHouse/pull/19533) ([Maksim Kita](https://github.com/kitaisreal)). +* Enable function length/empty/notEmpty for datatype Map, which returns keys number in Map. [#19530](https://github.com/ClickHouse/ClickHouse/pull/19530) ([taiyang-li](https://github.com/taiyang-li)). +* Add `--reconnect` option to `clickhouse-benchmark`. When this option is specified, it will reconnect before every request. This is needed for testing. [#19872](https://github.com/ClickHouse/ClickHouse/pull/19872) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Support using the new location of `.debug` file. This fixes [#19348](https://github.com/ClickHouse/ClickHouse/issues/19348). [#19520](https://github.com/ClickHouse/ClickHouse/pull/19520) ([Amos Bird](https://github.com/amosbird)). +* `toIPv6` function parses `IPv4` addresses. [#19518](https://github.com/ClickHouse/ClickHouse/pull/19518) ([Bharat Nallan](https://github.com/bharatnc)). +* Add `http_referer` field to `system.query_log`, `system.processes`, etc. This closes [#19389](https://github.com/ClickHouse/ClickHouse/issues/19389). [#19390](https://github.com/ClickHouse/ClickHouse/pull/19390) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve MySQL compatibility by making more functions case insensitive and adding aliases. [#19387](https://github.com/ClickHouse/ClickHouse/pull/19387) ([Daniil Kondratyev](https://github.com/dankondr)). +* Add metrics for MergeTree parts (Wide/Compact/InMemory) types. [#19381](https://github.com/ClickHouse/ClickHouse/pull/19381) ([Azat Khuzhin](https://github.com/azat)). +* Allow docker to be executed with arbitrary uid. [#19374](https://github.com/ClickHouse/ClickHouse/pull/19374) ([filimonov](https://github.com/filimonov)). +* Fix wrong alignment of values of `IPv4` data type in Pretty formats. They were aligned to the right, not to the left. This closes [#19184](https://github.com/ClickHouse/ClickHouse/issues/19184). [#19339](https://github.com/ClickHouse/ClickHouse/pull/19339) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow change `max_server_memory_usage` without restart. This closes [#18154](https://github.com/ClickHouse/ClickHouse/issues/18154). [#19186](https://github.com/ClickHouse/ClickHouse/pull/19186) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* The exception when function `bar` is called with certain NaN argument may be slightly misleading in previous versions. This fixes [#19088](https://github.com/ClickHouse/ClickHouse/issues/19088). [#19107](https://github.com/ClickHouse/ClickHouse/pull/19107) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Explicitly set uid / gid of clickhouse user & group to the fixed values (101) in clickhouse-server images. [#19096](https://github.com/ClickHouse/ClickHouse/pull/19096) ([filimonov](https://github.com/filimonov)). +* Fixed `PeekableReadBuffer: Memory limit exceed` error when inserting data with huge strings. Fixes [#18690](https://github.com/ClickHouse/ClickHouse/issues/18690). [#18979](https://github.com/ClickHouse/ClickHouse/pull/18979) ([tavplubix](https://github.com/tavplubix)). +* Docker image: several improvements for clickhouse-server entrypoint. [#18954](https://github.com/ClickHouse/ClickHouse/pull/18954) ([filimonov](https://github.com/filimonov)). +* Add `normalizeQueryKeepNames` and `normalizedQueryHashKeepNames` to normalize queries without masking long names with `?`. This helps better analyze complex query logs. [#18910](https://github.com/ClickHouse/ClickHouse/pull/18910) ([Amos Bird](https://github.com/amosbird)). +* Check per-block checksum of the distributed batch on the sender before sending (without reading the file twice, the checksums will be verified while reading), this will avoid stuck of the INSERT on the receiver (on truncated .bin file on the sender). Avoid reading .bin files twice for batched INSERT (it was required to calculate rows/bytes to take squashing into account, now this information included into the header, backward compatible is preserved). [#18853](https://github.com/ClickHouse/ClickHouse/pull/18853) ([Azat Khuzhin](https://github.com/azat)). +* Fix issues with RIGHT and FULL JOIN of tables with aggregate function states. In previous versions exception about `cloneResized` method was thrown. [#18818](https://github.com/ClickHouse/ClickHouse/pull/18818) ([templarzq](https://github.com/templarzq)). +* Added prefix-based S3 endpoint settings. [#18812](https://github.com/ClickHouse/ClickHouse/pull/18812) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Add [UInt8, UInt16, UInt32, UInt64] arguments types support for bitmapTransform, bitmapSubsetInRange, bitmapSubsetLimit, bitmapContains functions. This closes [#18713](https://github.com/ClickHouse/ClickHouse/issues/18713). [#18791](https://github.com/ClickHouse/ClickHouse/pull/18791) ([sundyli](https://github.com/sundy-li)). +* Allow CTE (Common Table Expressions) to be further aliased. Propagate CSE (Common Subexpressions Elimination) to subqueries in the same level when `enable_global_with_statement = 1`. This fixes [#17378](https://github.com/ClickHouse/ClickHouse/issues/17378) . This fixes https://github.com/ClickHouse/ClickHouse/pull/16575#issuecomment-753416235 . [#18684](https://github.com/ClickHouse/ClickHouse/pull/18684) ([Amos Bird](https://github.com/amosbird)). +* Update librdkafka to v1.6.0-RC2. Fixes [#18668](https://github.com/ClickHouse/ClickHouse/issues/18668). [#18671](https://github.com/ClickHouse/ClickHouse/pull/18671) ([filimonov](https://github.com/filimonov)). +* In case of unexpected exceptions automatically restart background thread which is responsible for execution of distributed DDL queries. Fixes [#17991](https://github.com/ClickHouse/ClickHouse/issues/17991). [#18285](https://github.com/ClickHouse/ClickHouse/pull/18285) ([å¾ç‚˜](https://github.com/weeds085490)). +* Updated AWS C++ SDK in order to utilize global regions in S3. [#17870](https://github.com/ClickHouse/ClickHouse/pull/17870) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Added support for `WITH ... [AND] [PERIODIC] REFRESH [interval_in_sec]` clause when creating `LIVE VIEW` tables. [#14822](https://github.com/ClickHouse/ClickHouse/pull/14822) ([vzakaznikov](https://github.com/vzakaznikov)). +* Restrict `MODIFY TTL` queries for `MergeTree` tables created in old syntax. Previously the query succeeded, but actually it had no effect. [#19064](https://github.com/ClickHouse/ClickHouse/pull/19064) ([Anton Popov](https://github.com/CurtizJ)). + +#### Bug Fix + +* Fix index analysis of binary functions with constant argument which leads to wrong query results. This fixes [#18364](https://github.com/ClickHouse/ClickHouse/issues/18364). [#18373](https://github.com/ClickHouse/ClickHouse/pull/18373) ([Amos Bird](https://github.com/amosbird)). +* Fix starting the server with tables having default expressions containing dictGet(). Allow getting return type of dictGet() without loading dictionary. [#19805](https://github.com/ClickHouse/ClickHouse/pull/19805) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix server crash after query with `if` function with `Tuple` type of then/else branches result. `Tuple` type must contain `Array` or another complex type. Fixes [#18356](https://github.com/ClickHouse/ClickHouse/issues/18356). [#20133](https://github.com/ClickHouse/ClickHouse/pull/20133) ([alesapin](https://github.com/alesapin)). +* `MaterializeMySQL` (experimental feature): Fix replication for statements that update several tables. [#20066](https://github.com/ClickHouse/ClickHouse/pull/20066) ([HÃ¥vard KvÃ¥len](https://github.com/havardk)). +* Prevent "Connection refused" in docker during initialization script execution. [#20012](https://github.com/ClickHouse/ClickHouse/pull/20012) ([filimonov](https://github.com/filimonov)). +* `EmbeddedRocksDB` is an experimental storage. Fix the issue with lack of proper type checking. Simplified code. This closes [#19967](https://github.com/ClickHouse/ClickHouse/issues/19967). [#19972](https://github.com/ClickHouse/ClickHouse/pull/19972) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix a segfault in function `fromModifiedJulianDay` when the argument type is `Nullable(T)` for any integral types other than Int32. [#19959](https://github.com/ClickHouse/ClickHouse/pull/19959) ([PHO](https://github.com/depressed-pho)). +* The function `greatCircleAngle` returned inaccurate results in previous versions. This closes [#19769](https://github.com/ClickHouse/ClickHouse/issues/19769). [#19789](https://github.com/ClickHouse/ClickHouse/pull/19789) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix rare bug when some replicated operations (like mutation) cannot process some parts after data corruption. Fixes [#19593](https://github.com/ClickHouse/ClickHouse/issues/19593). [#19702](https://github.com/ClickHouse/ClickHouse/pull/19702) ([alesapin](https://github.com/alesapin)). +* Background thread which executes `ON CLUSTER` queries might hang waiting for dropped replicated table to do something. It's fixed. [#19684](https://github.com/ClickHouse/ClickHouse/pull/19684) ([yiguolei](https://github.com/yiguolei)). +* Fix wrong deserialization of columns description. It makes INSERT into a table with a column named `\` impossible. [#19479](https://github.com/ClickHouse/ClickHouse/pull/19479) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Mark distributed batch as broken in case of empty data block in one of files. [#19449](https://github.com/ClickHouse/ClickHouse/pull/19449) ([Azat Khuzhin](https://github.com/azat)). +* Fixed very rare bug that might cause mutation to hang after `DROP/DETACH/REPLACE/MOVE PARTITION`. It was partially fixed by [#15537](https://github.com/ClickHouse/ClickHouse/issues/15537) for the most cases. [#19443](https://github.com/ClickHouse/ClickHouse/pull/19443) ([tavplubix](https://github.com/tavplubix)). +* Fix possible error `Extremes transform was already added to pipeline`. Fixes [#14100](https://github.com/ClickHouse/ClickHouse/issues/14100). [#19430](https://github.com/ClickHouse/ClickHouse/pull/19430) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix default value in join types with non-zero default (e.g. some Enums). Closes [#18197](https://github.com/ClickHouse/ClickHouse/issues/18197). [#19360](https://github.com/ClickHouse/ClickHouse/pull/19360) ([vdimir](https://github.com/vdimir)). +* Do not mark file for distributed send as broken on EOF. [#19290](https://github.com/ClickHouse/ClickHouse/pull/19290) ([Azat Khuzhin](https://github.com/azat)). +* Fix leaking of pipe fd for `async_socket_for_remote`. [#19153](https://github.com/ClickHouse/ClickHouse/pull/19153) ([Azat Khuzhin](https://github.com/azat)). +* Fix infinite reading from file in `ORC` format (was introduced in [#10580](https://github.com/ClickHouse/ClickHouse/issues/10580)). Fixes [#19095](https://github.com/ClickHouse/ClickHouse/issues/19095). [#19134](https://github.com/ClickHouse/ClickHouse/pull/19134) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix issue in merge tree data writer which can lead to marks with bigger size than fixed granularity size. Fixes [#18913](https://github.com/ClickHouse/ClickHouse/issues/18913). [#19123](https://github.com/ClickHouse/ClickHouse/pull/19123) ([alesapin](https://github.com/alesapin)). +* Fix startup bug when clickhouse was not able to read compression codec from `LowCardinality(Nullable(...))` and throws exception `Attempt to read after EOF`. Fixes [#18340](https://github.com/ClickHouse/ClickHouse/issues/18340). [#19101](https://github.com/ClickHouse/ClickHouse/pull/19101) ([alesapin](https://github.com/alesapin)). +* Simplify the implementation of `tupleHammingDistance`. Support for tuples of any equal length. Fixes [#19029](https://github.com/ClickHouse/ClickHouse/issues/19029). [#19084](https://github.com/ClickHouse/ClickHouse/pull/19084) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Make sure `groupUniqArray` returns correct type for argument of Enum type. This closes [#17875](https://github.com/ClickHouse/ClickHouse/issues/17875). [#19019](https://github.com/ClickHouse/ClickHouse/pull/19019) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix possible error `Expected single dictionary argument for function` if use function `ignore` with `LowCardinality` argument. Fixes [#14275](https://github.com/ClickHouse/ClickHouse/issues/14275). [#19016](https://github.com/ClickHouse/ClickHouse/pull/19016) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix inserting of `LowCardinality` column to table with `TinyLog` engine. Fixes [#18629](https://github.com/ClickHouse/ClickHouse/issues/18629). [#19010](https://github.com/ClickHouse/ClickHouse/pull/19010) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix minor issue in JOIN: Join tries to materialize const columns, but our code waits for them in other places. [#18982](https://github.com/ClickHouse/ClickHouse/pull/18982) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Disable `optimize_move_functions_out_of_any` because optimization is not always correct. This closes [#18051](https://github.com/ClickHouse/ClickHouse/issues/18051). This closes [#18973](https://github.com/ClickHouse/ClickHouse/issues/18973). [#18981](https://github.com/ClickHouse/ClickHouse/pull/18981) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix possible exception `QueryPipeline stream: different number of columns` caused by merging of query plan's `Expression` steps. Fixes [#18190](https://github.com/ClickHouse/ClickHouse/issues/18190). [#18980](https://github.com/ClickHouse/ClickHouse/pull/18980) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed very rare deadlock at shutdown. [#18977](https://github.com/ClickHouse/ClickHouse/pull/18977) ([tavplubix](https://github.com/tavplubix)). +* Fixed rare crashes when server run out of memory. [#18976](https://github.com/ClickHouse/ClickHouse/pull/18976) ([tavplubix](https://github.com/tavplubix)). +* Fix incorrect behavior when `ALTER TABLE ... DROP PART 'part_name'` query removes all deduplication blocks for the whole partition. Fixes [#18874](https://github.com/ClickHouse/ClickHouse/issues/18874). [#18969](https://github.com/ClickHouse/ClickHouse/pull/18969) ([alesapin](https://github.com/alesapin)). +* Fixed issue [#18894](https://github.com/ClickHouse/ClickHouse/issues/18894) Add a check to avoid exception when long column alias('table.column' style, usually auto-generated by BI tools like Looker) equals to long table name. [#18968](https://github.com/ClickHouse/ClickHouse/pull/18968) ([Daniel Qin](https://github.com/mathfool)). +* Fix error `Task was not found in task queue` (possible only for remote queries, with `async_socket_for_remote = 1`). [#18964](https://github.com/ClickHouse/ClickHouse/pull/18964) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bug when mutation with some escaped text (like `ALTER ... UPDATE e = CAST('foo', 'Enum8(\'foo\' = 1')` serialized incorrectly. Fixes [#18878](https://github.com/ClickHouse/ClickHouse/issues/18878). [#18944](https://github.com/ClickHouse/ClickHouse/pull/18944) ([alesapin](https://github.com/alesapin)). +* ATTACH PARTITION will reset mutations. [#18804](https://github.com/ClickHouse/ClickHouse/issues/18804). [#18935](https://github.com/ClickHouse/ClickHouse/pull/18935) ([fastio](https://github.com/fastio)). +* Fix issue with `bitmapOrCardinality` that may lead to nullptr dereference. This closes [#18911](https://github.com/ClickHouse/ClickHouse/issues/18911). [#18912](https://github.com/ClickHouse/ClickHouse/pull/18912) ([sundyli](https://github.com/sundy-li)). +* Fixed `Attempt to read after eof` error when trying to `CAST` `NULL` from `Nullable(String)` to `Nullable(Decimal(P, S))`. Now function `CAST` returns `NULL` when it cannot parse decimal from nullable string. Fixes [#7690](https://github.com/ClickHouse/ClickHouse/issues/7690). [#18718](https://github.com/ClickHouse/ClickHouse/pull/18718) ([Winter Zhang](https://github.com/zhang2014)). +* Fix data type convert issue for MySQL engine. [#18124](https://github.com/ClickHouse/ClickHouse/pull/18124) ([bo zeng](https://github.com/mis98zb)). +* Fix clickhouse-client abort exception while executing only `select`. [#19790](https://github.com/ClickHouse/ClickHouse/pull/19790) ([taiyang-li](https://github.com/taiyang-li)). + + +#### Build/Testing/Packaging Improvement + +* Run [SQLancer](https://twitter.com/RiggerManuel/status/1352345625480884228) (logical SQL fuzzer) in CI. [#19006](https://github.com/ClickHouse/ClickHouse/pull/19006) ([Ilya Yatsishin](https://github.com/qoega)). +* Query Fuzzer will fuzz newly added tests more extensively. This closes [#18916](https://github.com/ClickHouse/ClickHouse/issues/18916). [#19185](https://github.com/ClickHouse/ClickHouse/pull/19185) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Integrate with [Big List of Naughty Strings](https://github.com/minimaxir/big-list-of-naughty-strings/) for better fuzzing. [#19480](https://github.com/ClickHouse/ClickHouse/pull/19480) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add integration tests run with MSan. [#18974](https://github.com/ClickHouse/ClickHouse/pull/18974) ([alesapin](https://github.com/alesapin)). +* Fixed MemorySanitizer errors in cyrus-sasl and musl. [#19821](https://github.com/ClickHouse/ClickHouse/pull/19821) ([Ilya Yatsishin](https://github.com/qoega)). +* Insuffiient arguments check in `positionCaseInsensitiveUTF8` function triggered address sanitizer. [#19720](https://github.com/ClickHouse/ClickHouse/pull/19720) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove --project-directory for docker-compose in integration test. Fix logs formatting from docker container. [#19706](https://github.com/ClickHouse/ClickHouse/pull/19706) ([Ilya Yatsishin](https://github.com/qoega)). +* Made generation of macros.xml easier for integration tests. No more excessive logging from dicttoxml. dicttoxml project is not active for 5+ years. [#19697](https://github.com/ClickHouse/ClickHouse/pull/19697) ([Ilya Yatsishin](https://github.com/qoega)). +* Allow to explicitly enable or disable watchdog via environment variable `CLICKHOUSE_WATCHDOG_ENABLE`. By default it is enabled if server is not attached to terminal. [#19522](https://github.com/ClickHouse/ClickHouse/pull/19522) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow building ClickHouse with Kafka support on arm64. [#19369](https://github.com/ClickHouse/ClickHouse/pull/19369) ([filimonov](https://github.com/filimonov)). +* Allow building librdkafka without ssl. [#19337](https://github.com/ClickHouse/ClickHouse/pull/19337) ([filimonov](https://github.com/filimonov)). +* Restore Kafka input in FreeBSD builds. [#18924](https://github.com/ClickHouse/ClickHouse/pull/18924) ([Alexandre Snarskii](https://github.com/snar)). +* Fix potential nullptr dereference in table function `VALUES`. [#19357](https://github.com/ClickHouse/ClickHouse/pull/19357) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Avoid UBSan reports in `arrayElement` function, `substring` and `arraySum`. Fixes [#19305](https://github.com/ClickHouse/ClickHouse/issues/19305). Fixes [#19287](https://github.com/ClickHouse/ClickHouse/issues/19287). This closes [#19336](https://github.com/ClickHouse/ClickHouse/issues/19336). [#19347](https://github.com/ClickHouse/ClickHouse/pull/19347) ([alexey-milovidov](https://github.com/alexey-milovidov)). + + +## ClickHouse release 21.1 + +### ClickHouse release v21.1.3.32-stable, 2021-02-03 + +#### Bug Fix + +* BloomFilter index crash fix. Fixes [#19757](https://github.com/ClickHouse/ClickHouse/issues/19757). [#19884](https://github.com/ClickHouse/ClickHouse/pull/19884) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix crash when pushing down predicates to union distinct subquery. This fixes [#19855](https://github.com/ClickHouse/ClickHouse/issues/19855). [#19861](https://github.com/ClickHouse/ClickHouse/pull/19861) ([Amos Bird](https://github.com/amosbird)). +* Fix filtering by UInt8 greater than 127. [#19799](https://github.com/ClickHouse/ClickHouse/pull/19799) ([Anton Popov](https://github.com/CurtizJ)). +* In previous versions, unusual arguments for function arrayEnumerateUniq may cause crash or infinite loop. This closes [#19787](https://github.com/ClickHouse/ClickHouse/issues/19787). [#19788](https://github.com/ClickHouse/ClickHouse/pull/19788) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed stack overflow when using accurate comparison of arithmetic type with string type. [#19773](https://github.com/ClickHouse/ClickHouse/pull/19773) ([tavplubix](https://github.com/tavplubix)). +* Fix crash when nested column name was used in `WHERE` or `PREWHERE`. Fixes [#19755](https://github.com/ClickHouse/ClickHouse/issues/19755). [#19763](https://github.com/ClickHouse/ClickHouse/pull/19763) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix a segmentation fault in `bitmapAndnot` function. Fixes [#19668](https://github.com/ClickHouse/ClickHouse/issues/19668). [#19713](https://github.com/ClickHouse/ClickHouse/pull/19713) ([Maksim Kita](https://github.com/kitaisreal)). +* Some functions with big integers may cause segfault. Big integers is experimental feature. This closes [#19667](https://github.com/ClickHouse/ClickHouse/issues/19667). [#19672](https://github.com/ClickHouse/ClickHouse/pull/19672) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix wrong result of function `neighbor` for `LowCardinality` argument. Fixes [#10333](https://github.com/ClickHouse/ClickHouse/issues/10333). [#19617](https://github.com/ClickHouse/ClickHouse/pull/19617) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix use-after-free of the CompressedWriteBuffer in Connection after disconnect. [#19599](https://github.com/ClickHouse/ClickHouse/pull/19599) ([Azat Khuzhin](https://github.com/azat)). +* `DROP/DETACH TABLE table ON CLUSTER cluster SYNC` query might hang, it's fixed. Fixes [#19568](https://github.com/ClickHouse/ClickHouse/issues/19568). [#19572](https://github.com/ClickHouse/ClickHouse/pull/19572) ([tavplubix](https://github.com/tavplubix)). +* Query CREATE DICTIONARY id expression fix. [#19571](https://github.com/ClickHouse/ClickHouse/pull/19571) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix SIGSEGV with merge_tree_min_rows_for_concurrent_read/merge_tree_min_bytes_for_concurrent_read=0/UINT64_MAX. [#19528](https://github.com/ClickHouse/ClickHouse/pull/19528) ([Azat Khuzhin](https://github.com/azat)). +* Buffer overflow (on memory read) was possible if `addMonth` function was called with specifically crafted arguments. This fixes [#19441](https://github.com/ClickHouse/ClickHouse/issues/19441). This fixes [#19413](https://github.com/ClickHouse/ClickHouse/issues/19413). [#19472](https://github.com/ClickHouse/ClickHouse/pull/19472) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Uninitialized memory read was possible in encrypt/decrypt functions if empty string was passed as IV. This closes [#19391](https://github.com/ClickHouse/ClickHouse/issues/19391). [#19397](https://github.com/ClickHouse/ClickHouse/pull/19397) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix possible buffer overflow in Uber H3 library. See https://github.com/uber/h3/issues/392. This closes [#19219](https://github.com/ClickHouse/ClickHouse/issues/19219). [#19383](https://github.com/ClickHouse/ClickHouse/pull/19383) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix system.parts _state column (LOGICAL_ERROR when querying this column, due to incorrect order). [#19346](https://github.com/ClickHouse/ClickHouse/pull/19346) ([Azat Khuzhin](https://github.com/azat)). +* Fixed possible wrong result or segfault on aggregation when Materialized View and its target table have different structure. Fixes [#18063](https://github.com/ClickHouse/ClickHouse/issues/18063). [#19322](https://github.com/ClickHouse/ClickHouse/pull/19322) ([tavplubix](https://github.com/tavplubix)). +* Fix error `Cannot convert column now64() because it is constant but values of constants are different in source and result`. Continuation of [#7156](https://github.com/ClickHouse/ClickHouse/issues/7156). [#19316](https://github.com/ClickHouse/ClickHouse/pull/19316) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bug when concurrent `ALTER` and `DROP` queries may hang while processing ReplicatedMergeTree table. [#19237](https://github.com/ClickHouse/ClickHouse/pull/19237) ([alesapin](https://github.com/alesapin)). +* Fixed `There is no checkpoint` error when inserting data through http interface using `Template` or `CustomSeparated` format. Fixes [#19021](https://github.com/ClickHouse/ClickHouse/issues/19021). [#19072](https://github.com/ClickHouse/ClickHouse/pull/19072) ([tavplubix](https://github.com/tavplubix)). +* Disable constant folding for subqueries on the analysis stage, when the result cannot be calculated. [#18446](https://github.com/ClickHouse/ClickHouse/pull/18446) ([Azat Khuzhin](https://github.com/azat)). +* Mutation might hang waiting for some non-existent part after `MOVE` or `REPLACE PARTITION` or, in rare cases, after `DETACH` or `DROP PARTITION`. It's fixed. [#15537](https://github.com/ClickHouse/ClickHouse/pull/15537) ([tavplubix](https://github.com/tavplubix)). + + + +### ClickHouse release v21.1.2.15-stable 2021-01-18 + +#### Backward Incompatible Change + +* The setting `input_format_null_as_default` is enabled by default. [#17525](https://github.com/ClickHouse/ClickHouse/pull/17525) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Check settings constraints for profile settings from config. Server will fail to start if users.xml contain settings that do not meet corresponding constraints. [#18486](https://github.com/ClickHouse/ClickHouse/pull/18486) ([tavplubix](https://github.com/tavplubix)). +* Restrict `ALTER MODIFY SETTING` from changing storage settings that affects data parts (`write_final_mark` and `enable_mixed_granularity_parts`). [#18306](https://github.com/ClickHouse/ClickHouse/pull/18306) ([Amos Bird](https://github.com/amosbird)). +* Set `insert_quorum_parallel` to 1 by default. It is significantly more convenient to use than "sequential" quorum inserts. But if you rely to sequential consistency, you should set the setting back to zero. [#17567](https://github.com/ClickHouse/ClickHouse/pull/17567) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Remove `sumburConsistentHash` function. This closes [#18120](https://github.com/ClickHouse/ClickHouse/issues/18120). [#18656](https://github.com/ClickHouse/ClickHouse/pull/18656) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Removed aggregate functions `timeSeriesGroupSum`, `timeSeriesGroupRateSum` because a friend of mine said they never worked. This fixes [#16869](https://github.com/ClickHouse/ClickHouse/issues/16869). If you have luck using these functions, write a email to feedback@clickhouse.com. [#17423](https://github.com/ClickHouse/ClickHouse/pull/17423) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Prohibit toUnixTimestamp(Date()) (before it just returns UInt16 representation of Date). [#17376](https://github.com/ClickHouse/ClickHouse/pull/17376) ([Azat Khuzhin](https://github.com/azat)). +* Allow using extended integer types (`Int128`, `Int256`, `UInt256`) in `avg` and `avgWeighted` functions. Also allow using different types (integer, decimal, floating point) for value and for weight in `avgWeighted` function. This is a backward-incompatible change: now the `avg` and `avgWeighted` functions always return `Float64` (as documented). Before this change the return type for `Decimal` arguments was also `Decimal`. [#15419](https://github.com/ClickHouse/ClickHouse/pull/15419) ([Mike](https://github.com/myrrc)). +* Expression `toUUID(N)` no longer works. Replace with `toUUID('00000000-0000-0000-0000-000000000000')`. This change is motivated by non-obvious results of `toUUID(N)` where N is non zero. +* SSL Certificates with incorrect "key usage" are rejected. In previous versions they are used to work. See [#19262](https://github.com/ClickHouse/ClickHouse/issues/19262). +* `incl` references to substitutions file (`/etc/metrika.xml`) were removed from the default config (``, ``, ``, ``, ``). If you were using substitutions file and were relying on those implicit references, you should put them back manually and explicitly by adding corresponding sections with `incl="..."` attributes before the update. See [#18740](https://github.com/ClickHouse/ClickHouse/pull/18740) ([alexey-milovidov](https://github.com/alexey-milovidov)). + +#### New Feature + +* Implement gRPC protocol in ClickHouse. [#15111](https://github.com/ClickHouse/ClickHouse/pull/15111) ([Vitaly Baranov](https://github.com/vitlibar)). +* Allow to use multiple zookeeper clusters. [#17070](https://github.com/ClickHouse/ClickHouse/pull/17070) ([fastio](https://github.com/fastio)). +* Implemented `REPLACE TABLE` and `CREATE OR REPLACE TABLE` queries. [#18521](https://github.com/ClickHouse/ClickHouse/pull/18521) ([tavplubix](https://github.com/tavplubix)). +* Implement `UNION DISTINCT` and treat the plain `UNION` clause as `UNION DISTINCT` by default. Add a setting `union_default_mode` that allows to treat it as `UNION ALL` or require explicit mode specification. [#16338](https://github.com/ClickHouse/ClickHouse/pull/16338) ([flynn](https://github.com/ucasFL)). +* Added function `accurateCastOrNull`. This closes [#10290](https://github.com/ClickHouse/ClickHouse/issues/10290). Add type conversions in `x IN (subquery)` expressions. This closes [#10266](https://github.com/ClickHouse/ClickHouse/issues/10266). [#16724](https://github.com/ClickHouse/ClickHouse/pull/16724) ([Maksim Kita](https://github.com/kitaisreal)). +* IP Dictionary supports `IPv4` / `IPv6` types directly. [#17571](https://github.com/ClickHouse/ClickHouse/pull/17571) ([vdimir](https://github.com/vdimir)). +* IP Dictionary supports key fetching. Resolves [#18241](https://github.com/ClickHouse/ClickHouse/issues/18241). [#18480](https://github.com/ClickHouse/ClickHouse/pull/18480) ([vdimir](https://github.com/vdimir)). +* Add `*.zst` compression/decompression support for data import and export. It enables using `*.zst` in `file()` function and `Content-encoding: zstd` in HTTP client. This closes [#16791 ](https://github.com/ClickHouse/ClickHouse/issues/16791). [#17144](https://github.com/ClickHouse/ClickHouse/pull/17144) ([Abi Palagashvili](https://github.com/fibersel)). +* Added `mannWitneyUTest`, `studentTTest` and `welchTTest` aggregate functions. Refactored `rankCorr` a bit. [#16883](https://github.com/ClickHouse/ClickHouse/pull/16883) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add functions `countMatches`/`countMatchesCaseInsensitive`. [#17459](https://github.com/ClickHouse/ClickHouse/pull/17459) ([Azat Khuzhin](https://github.com/azat)). +* Implement `countSubstrings()`/`countSubstringsCaseInsensitive()`/`countSubstringsCaseInsensitiveUTF8()` (Count the number of substring occurrences). [#17347](https://github.com/ClickHouse/ClickHouse/pull/17347) ([Azat Khuzhin](https://github.com/azat)). +* Add information about used databases, tables and columns in system.query_log. Add `query_kind` and `normalized_query_hash` fields. [#17726](https://github.com/ClickHouse/ClickHouse/pull/17726) ([Amos Bird](https://github.com/amosbird)). +* Add a setting `optimize_on_insert`. When enabled, do the same transformation for INSERTed block of data as if merge was done on this block (e.g. Replacing, Collapsing, Aggregating...). This setting is enabled by default. This can influence Materialized View and MaterializeMySQL behaviour (see detailed description). This closes [#10683](https://github.com/ClickHouse/ClickHouse/issues/10683). [#16954](https://github.com/ClickHouse/ClickHouse/pull/16954) ([Kruglov Pavel](https://github.com/Avogar)). +* Kerberos Authenticaiton for HDFS. [#16621](https://github.com/ClickHouse/ClickHouse/pull/16621) ([Ilya Golshtein](https://github.com/ilejn)). +* Support `SHOW SETTINGS` statement to show parameters in system.settings. `SHOW CHANGED SETTINGS` and `LIKE/ILIKE` clause are also supported. [#18056](https://github.com/ClickHouse/ClickHouse/pull/18056) ([Jianmei Zhang](https://github.com/zhangjmruc)). +* Function `position` now supports `POSITION(needle IN haystack)` synax for SQL compatibility. This closes [#18701](https://github.com/ClickHouse/ClickHouse/issues/18701). ... [#18779](https://github.com/ClickHouse/ClickHouse/pull/18779) ([Jianmei Zhang](https://github.com/zhangjmruc)). +* Now we have a new storage setting `max_partitions_to_read` for tables in the MergeTree family. It limits the max number of partitions that can be accessed in one query. A user setting `force_max_partition_limit` is also added to enforce this constraint. [#18712](https://github.com/ClickHouse/ClickHouse/pull/18712) ([Amos Bird](https://github.com/amosbird)). +* Add `query_id` column to `system.part_log` for inserted parts. Closes [#10097](https://github.com/ClickHouse/ClickHouse/issues/10097). [#18644](https://github.com/ClickHouse/ClickHouse/pull/18644) ([flynn](https://github.com/ucasFL)). +* Allow create table as select with columns specification. Example `CREATE TABLE t1 (x String) ENGINE = Memory AS SELECT 1;`. [#18060](https://github.com/ClickHouse/ClickHouse/pull/18060) ([Maksim Kita](https://github.com/kitaisreal)). +* Added `arrayMin`, `arrayMax`, `arrayAvg` aggregation functions. [#18032](https://github.com/ClickHouse/ClickHouse/pull/18032) ([Maksim Kita](https://github.com/kitaisreal)). +* Implemented `ATTACH TABLE name FROM 'path/to/data/' (col1 Type1, ...` query. It creates new table with provided structure and attaches table data from provided directory in `user_files`. [#17903](https://github.com/ClickHouse/ClickHouse/pull/17903) ([tavplubix](https://github.com/tavplubix)). +* Add mutation support for StorageMemory. This closes [#9117](https://github.com/ClickHouse/ClickHouse/issues/9117). [#15127](https://github.com/ClickHouse/ClickHouse/pull/15127) ([flynn](https://github.com/ucasFL)). +* Support syntax `EXISTS DATABASE name`. [#18458](https://github.com/ClickHouse/ClickHouse/pull/18458) ([Du Chuan](https://github.com/spongedu)). +* Support builtin function `isIPv4String` && `isIPv6String` like [MySQL](https://github.com/ClickHouse/ClickHouse/compare/master...spongedu:support_is_ipv4?expand=1). [#18349](https://github.com/ClickHouse/ClickHouse/pull/18349) ([Du Chuan](https://github.com/spongedu)). +* Add a new setting `insert_distributed_one_random_shard = 1` to allow insertion into multi-sharded distributed table without any distributed key. [#18294](https://github.com/ClickHouse/ClickHouse/pull/18294) ([Amos Bird](https://github.com/amosbird)). +* Add settings `min_compress_block_size` and `max_compress_block_size` to MergeTreeSettings, which have higher priority than the global settings and take effect when they are set. close [13890](https://github.com/ClickHouse/ClickHouse/issues/13890). [#17867](https://github.com/ClickHouse/ClickHouse/pull/17867) ([flynn](https://github.com/ucasFL)). +* Add support for 64bit roaring bitmaps. [#17858](https://github.com/ClickHouse/ClickHouse/pull/17858) ([Andy Yang](https://github.com/andyyzh)). +* Extended `OPTIMIZE ... DEDUPLICATE` syntax to allow explicit (or implicit with asterisk/column transformers) list of columns to check for duplicates on. ... [#17846](https://github.com/ClickHouse/ClickHouse/pull/17846) ([Vasily Nemkov](https://github.com/Enmk)). +* Added functions `toModifiedJulianDay`, `fromModifiedJulianDay`, `toModifiedJulianDayOrNull`, and `fromModifiedJulianDayOrNull`. These functions convert between Proleptic Gregorian calendar date and Modified Julian Day number. [#17750](https://github.com/ClickHouse/ClickHouse/pull/17750) ([PHO](https://github.com/depressed-pho)). +* Add ability to use custom TLD list: added functions `firstSignificantSubdomainCustom`, `cutToFirstSignificantSubdomainCustom`. [#17748](https://github.com/ClickHouse/ClickHouse/pull/17748) ([Azat Khuzhin](https://github.com/azat)). +* Add support for `PROXYv1` protocol to wrap native TCP interface. Allow quotas to be keyed by proxy-forwarded IP address (applied for `PROXYv1` address and for `X-Forwarded-For` from HTTP interface). This is useful when you provide access to ClickHouse only via trusted proxy (e.g. CloudFlare) but want to account user resources by their original IP addresses. This fixes [#17268](https://github.com/ClickHouse/ClickHouse/issues/17268). [#17707](https://github.com/ClickHouse/ClickHouse/pull/17707) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now clickhouse-client supports opening `EDITOR` to edit commands. `Alt-Shift-E`. [#17665](https://github.com/ClickHouse/ClickHouse/pull/17665) ([Amos Bird](https://github.com/amosbird)). +* Add function `encodeXMLComponent` to escape characters to place string into XML text node or attribute. [#17659](https://github.com/ClickHouse/ClickHouse/pull/17659) ([nauta](https://github.com/nautaa)). +* Introduce `DETACH TABLE/VIEW ... PERMANENTLY` syntax, so that after restarting the table does not reappear back automatically on restart (only by explicit request). The table can still be attached back using the short syntax ATTACH TABLE. Implements [#5555](https://github.com/ClickHouse/ClickHouse/issues/5555). Fixes [#13850](https://github.com/ClickHouse/ClickHouse/issues/13850). [#17642](https://github.com/ClickHouse/ClickHouse/pull/17642) ([filimonov](https://github.com/filimonov)). +* Add asynchronous metrics on total amount of rows, bytes and parts in MergeTree tables. This fix [#11714](https://github.com/ClickHouse/ClickHouse/issues/11714). [#17639](https://github.com/ClickHouse/ClickHouse/pull/17639) ([flynn](https://github.com/ucasFL)). +* Add settings `limit` and `offset` for out-of-SQL pagination: [#16176](https://github.com/ClickHouse/ClickHouse/issues/16176) They are useful for building APIs. These two settings will affect SELECT query as if it is added like `select * from (your_original_select_query) t limit xxx offset xxx;`. [#17633](https://github.com/ClickHouse/ClickHouse/pull/17633) ([hexiaoting](https://github.com/hexiaoting)). +* Provide a new aggregator combinator : `-SimpleState` to build `SimpleAggregateFunction` types via query. It's useful for defining MaterializedView of AggregatingMergeTree engine, and will benefit projections too. [#16853](https://github.com/ClickHouse/ClickHouse/pull/16853) ([Amos Bird](https://github.com/amosbird)). +* Added `queries-file` parameter for `clickhouse-client` and `clickhouse-local`. [#15930](https://github.com/ClickHouse/ClickHouse/pull/15930) ([Maksim Kita](https://github.com/kitaisreal)). +* Added `query` parameter for `clickhouse-benchmark`. [#17832](https://github.com/ClickHouse/ClickHouse/pull/17832) ([Maksim Kita](https://github.com/kitaisreal)). +* `EXPLAIN AST` now support queries other then `SELECT`. [#18136](https://github.com/ClickHouse/ClickHouse/pull/18136) ([taiyang-li](https://github.com/taiyang-li)). + + +#### Experimental Feature + +* Added functions for calculation of minHash and simHash of text n-grams and shingles. They are intended for semi-duplicate search. Also functions `bitHammingDistance` and `tupleHammingDistance` are added. [#7649](https://github.com/ClickHouse/ClickHouse/pull/7649) ([flynn](https://github.com/ucasFL)). +* Add new data type `Map`. See [#1841](https://github.com/ClickHouse/ClickHouse/issues/1841). First version for Map only supports `String` type of key and value. [#15806](https://github.com/ClickHouse/ClickHouse/pull/15806) ([hexiaoting](https://github.com/hexiaoting)). +* Implement alternative SQL parser based on ANTLR4 runtime and generated from EBNF grammar. [#11298](https://github.com/ClickHouse/ClickHouse/pull/11298) ([Ivan](https://github.com/abyss7)). + + +#### Performance Improvement + +* New IP Dictionary implementation with lower memory consumption, improved performance for some cases, and fixed bugs. [#16804](https://github.com/ClickHouse/ClickHouse/pull/16804) ([vdimir](https://github.com/vdimir)). +* Parallel formatting for data export. [#11617](https://github.com/ClickHouse/ClickHouse/pull/11617) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* LDAP integration: Added `verification_cooldown` parameter in LDAP server connection configuration to allow caching of successful "bind" attempts for configurable period of time. [#15988](https://github.com/ClickHouse/ClickHouse/pull/15988) ([Denis Glazachev](https://github.com/traceon)). +* Add `--no-system-table` option for `clickhouse-local` to run without system tables. This avoids initialization of `DateLUT` that may take noticeable amount of time (tens of milliseconds) at startup. [#18899](https://github.com/ClickHouse/ClickHouse/pull/18899) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Replace `PODArray` with `PODArrayWithStackMemory` in `AggregateFunctionWindowFunnelData` to improve `windowFunnel` function performance. [#18817](https://github.com/ClickHouse/ClickHouse/pull/18817) ([flynn](https://github.com/ucasFL)). +* Don't send empty blocks to shards on synchronous INSERT into Distributed table. This closes [#14571](https://github.com/ClickHouse/ClickHouse/issues/14571). [#18775](https://github.com/ClickHouse/ClickHouse/pull/18775) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Optimized read for StorageMemory. [#18052](https://github.com/ClickHouse/ClickHouse/pull/18052) ([Maksim Kita](https://github.com/kitaisreal)). +* Using Dragonbox algorithm for float to string conversion instead of ryu. This improves performance of float to string conversion significantly. [#17831](https://github.com/ClickHouse/ClickHouse/pull/17831) ([Maksim Kita](https://github.com/kitaisreal)). +* Speedup `IPv6CIDRToRange` implementation. [#17569](https://github.com/ClickHouse/ClickHouse/pull/17569) ([vdimir](https://github.com/vdimir)). +* Add `remerge_sort_lowered_memory_bytes_ratio` setting (If memory usage after remerge does not reduced by this ratio, remerge will be disabled). [#17539](https://github.com/ClickHouse/ClickHouse/pull/17539) ([Azat Khuzhin](https://github.com/azat)). +* Improve performance of AggregatingMergeTree with SimpleAggregateFunction(String) in PK. [#17109](https://github.com/ClickHouse/ClickHouse/pull/17109) ([Azat Khuzhin](https://github.com/azat)). +* Now the `-If` combinator is devirtualized, and `count` is properly vectorized. It is for [this PR](https://github.com/ClickHouse/ClickHouse/pull/17041). [#17043](https://github.com/ClickHouse/ClickHouse/pull/17043) ([Amos Bird](https://github.com/amosbird)). +* Fix performance of reading from `Merge` tables over huge number of `MergeTree` tables. Fixes [#7748](https://github.com/ClickHouse/ClickHouse/issues/7748). [#16988](https://github.com/ClickHouse/ClickHouse/pull/16988) ([Anton Popov](https://github.com/CurtizJ)). +* Improved performance of function `repeat`. [#16937](https://github.com/ClickHouse/ClickHouse/pull/16937) ([satanson](https://github.com/satanson)). +* Slightly improved performance of float parsing. [#16809](https://github.com/ClickHouse/ClickHouse/pull/16809) ([Maksim Kita](https://github.com/kitaisreal)). +* Add possibility to skip merged partitions for `OPTIMIZE TABLE ... FINAL`. [#15939](https://github.com/ClickHouse/ClickHouse/pull/15939) ([Kruglov Pavel](https://github.com/Avogar)). +* Integrate with [fast_float from Daniel Lemire](https://github.com/lemire/fast_float) to parse floating point numbers. [#16787](https://github.com/ClickHouse/ClickHouse/pull/16787) ([Maksim Kita](https://github.com/kitaisreal)). It is not enabled, because performance its performance is still lower than rough float parser in ClickHouse. +* Fix max_distributed_connections (affects `prefer_localhost_replica = 1` and `max_threads != max_distributed_connections`). [#17848](https://github.com/ClickHouse/ClickHouse/pull/17848) ([Azat Khuzhin](https://github.com/azat)). +* Adaptive choice of single/multi part upload when sending data to S3. Single part upload is controlled by a new setting `max_single_part_upload_size`. [#17934](https://github.com/ClickHouse/ClickHouse/pull/17934) ([Pavel Kovalenko](https://github.com/Jokser)). +* Support for async tasks in `PipelineExecutor`. Initial support of async sockets for remote queries. [#17868](https://github.com/ClickHouse/ClickHouse/pull/17868) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Allow to use `optimize_move_to_prewhere` optimization with compact parts, when sizes of columns are unknown. [#17330](https://github.com/ClickHouse/ClickHouse/pull/17330) ([Anton Popov](https://github.com/CurtizJ)). + + +#### Improvement + +* Avoid deadlock when executing INSERT SELECT into itself from a table with `TinyLog` or `Log` table engines. This closes [#6802](https://github.com/ClickHouse/ClickHouse/issues/6802). This closes [#18691](https://github.com/ClickHouse/ClickHouse/issues/18691). This closes [#16812](https://github.com/ClickHouse/ClickHouse/issues/16812). This closes [#14570](https://github.com/ClickHouse/ClickHouse/issues/14570). [#15260](https://github.com/ClickHouse/ClickHouse/pull/15260) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Support `SHOW CREATE VIEW name` syntax like [MySQL](https://dev.mysql.com/doc/refman/5.7/en/show-create-view.html). [#18095](https://github.com/ClickHouse/ClickHouse/pull/18095) ([Du Chuan](https://github.com/spongedu)). +* All queries of type `Decimal * Float` or vice versa are allowed, including aggregate ones (e.g. `SELECT sum(decimal_field * 1.1)` or `SELECT dec_col * float_col`), the result type is Float32 or Float64. [#18145](https://github.com/ClickHouse/ClickHouse/pull/18145) ([Mike](https://github.com/myrrc)). +* Improved minimal Web UI: add history; add sharing support; avoid race condition of different requests; add request in-flight and ready indicators; add favicon; detect Ctrl+Enter if textarea is not in focus. [#17293](https://github.com/ClickHouse/ClickHouse/pull/17293) [#17770](https://github.com/ClickHouse/ClickHouse/pull/17770) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* clickhouse-server didn't send `close` request to ZooKeeper server. [#16837](https://github.com/ClickHouse/ClickHouse/pull/16837) ([alesapin](https://github.com/alesapin)). +* Avoid server abnormal termination in case of too low memory limits (`max_memory_usage = 1` / `max_untracked_memory = 1`). [#17453](https://github.com/ClickHouse/ClickHouse/pull/17453) ([Azat Khuzhin](https://github.com/azat)). +* Fix non-deterministic result of `windowFunnel` function in case of same timestamp for different events. [#18884](https://github.com/ClickHouse/ClickHouse/pull/18884) ([Fuwang Hu](https://github.com/fuwhu)). +* Docker: Explicitly set uid / gid of clickhouse user & group to the fixed values (101) in clickhouse-server Docker images. [#19096](https://github.com/ClickHouse/ClickHouse/pull/19096) ([filimonov](https://github.com/filimonov)). +* Asynchronous INSERTs to `Distributed` tables: Two new settings (by analogy with MergeTree family) has been added: - `fsync_after_insert` - Do fsync for every inserted. Will decreases performance of inserts. - `fsync_directories` - Do fsync for temporary directory (that is used for async INSERT only) after all operations (writes, renames, etc.). [#18864](https://github.com/ClickHouse/ClickHouse/pull/18864) ([Azat Khuzhin](https://github.com/azat)). +* `SYSTEM KILL` command started to work in Docker. This closes [#18847](https://github.com/ClickHouse/ClickHouse/issues/18847). [#18848](https://github.com/ClickHouse/ClickHouse/pull/18848) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Expand macros in the zk path when executing `FETCH PARTITION`. [#18839](https://github.com/ClickHouse/ClickHouse/pull/18839) ([fastio](https://github.com/fastio)). +* Apply `ALTER TABLE ON CLUSTER MODIFY SETTING ...` to all replicas. Because we don't replicate such alter commands. [#18789](https://github.com/ClickHouse/ClickHouse/pull/18789) ([Amos Bird](https://github.com/amosbird)). +* Allow column transformer `EXCEPT` to accept a string as regular expression matcher. This resolves [#18685](https://github.com/ClickHouse/ClickHouse/issues/18685) . [#18699](https://github.com/ClickHouse/ClickHouse/pull/18699) ([Amos Bird](https://github.com/amosbird)). +* Fix SimpleAggregateFunction in SummingMergeTree. Now it works like AggregateFunction. In previous versions values were summed together regardless to the aggregate function. This fixes [#18564](https://github.com/ClickHouse/ClickHouse/issues/18564) . [#8052](https://github.com/ClickHouse/ClickHouse/issues/8052). [#18637](https://github.com/ClickHouse/ClickHouse/pull/18637) ([Amos Bird](https://github.com/amosbird)). Another fix of using `SimpleAggregateFunction` in `SummingMergeTree`. This fixes [#18676](https://github.com/ClickHouse/ClickHouse/issues/18676) . [#18677](https://github.com/ClickHouse/ClickHouse/pull/18677) ([Amos Bird](https://github.com/amosbird)). +* Fixed assertion error inside allocator in case when last argument of function bar is NaN. Now simple ClickHouse's exception is being thrown. This fixes [#17876](https://github.com/ClickHouse/ClickHouse/issues/17876). [#18520](https://github.com/ClickHouse/ClickHouse/pull/18520) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix usability issue: no newline after exception message in some tools. [#18444](https://github.com/ClickHouse/ClickHouse/pull/18444) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add ability to modify primary and partition key column type from `LowCardinality(Type)` to `Type` and vice versa. Also add an ability to modify primary key column type from `EnumX ` to `IntX` type. Fixes [#5604](https://github.com/ClickHouse/ClickHouse/issues/5604). [#18362](https://github.com/ClickHouse/ClickHouse/pull/18362) ([alesapin](https://github.com/alesapin)). +* Implement `untuple` field access. [#18133](https://github.com/ClickHouse/ClickHouse/issues/18133). [#18309](https://github.com/ClickHouse/ClickHouse/pull/18309) ([hexiaoting](https://github.com/hexiaoting)). +* Allow to parse Array fields from CSV if it is represented as a string containing array that was serialized as nested CSV. Example: `"[""Hello"", ""world"", ""42"""" TV""]"` will parse as `['Hello', 'world', '42" TV']`. Allow to parse array in CSV in a string without enclosing braces. Example: `"'Hello', 'world', '42"" TV'"` will parse as `['Hello', 'world', '42" TV']`. [#18271](https://github.com/ClickHouse/ClickHouse/pull/18271) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Make better adaptive granularity calculation for merge tree wide parts. [#18223](https://github.com/ClickHouse/ClickHouse/pull/18223) ([alesapin](https://github.com/alesapin)). +* Now `clickhouse install` could work on Mac. The problem was that there is no procfs on this platform. [#18201](https://github.com/ClickHouse/ClickHouse/pull/18201) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Better hints for `SHOW ...` query syntax. [#18183](https://github.com/ClickHouse/ClickHouse/pull/18183) ([Du Chuan](https://github.com/spongedu)). +* Array aggregation `arrayMin`, `arrayMax`, `arraySum`, `arrayAvg` support for `Int128`, `Int256`, `UInt256`. [#18147](https://github.com/ClickHouse/ClickHouse/pull/18147) ([Maksim Kita](https://github.com/kitaisreal)). +* Add `disk` to Set and Join storage settings. [#18112](https://github.com/ClickHouse/ClickHouse/pull/18112) ([Grigory Pervakov](https://github.com/GrigoryPervakov)). +* Access control: Now table function `merge()` requires current user to have `SELECT` privilege on each table it receives data from. This PR fixes [#16964](https://github.com/ClickHouse/ClickHouse/issues/16964). [#18104](https://github.com/ClickHouse/ClickHouse/pull/18104) [#17983](https://github.com/ClickHouse/ClickHouse/pull/17983) ([Vitaly Baranov](https://github.com/vitlibar)). +* Temporary tables are visible in the system tables `system.tables` and `system.columns` now only in those session where they have been created. The internal database `_temporary_and_external_tables` is now hidden in those system tables; temporary tables are shown as tables with empty database with the `is_temporary` flag set instead. [#18014](https://github.com/ClickHouse/ClickHouse/pull/18014) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix clickhouse-client rendering issue when the size of terminal window changes. [#18009](https://github.com/ClickHouse/ClickHouse/pull/18009) ([Amos Bird](https://github.com/amosbird)). +* Decrease log verbosity of the events when the client drops the connection from Warning to Information. [#18005](https://github.com/ClickHouse/ClickHouse/pull/18005) ([filimonov](https://github.com/filimonov)). +* Forcibly removing empty or bad metadata files from filesystem for DiskS3. S3 is an experimental feature. [#17935](https://github.com/ClickHouse/ClickHouse/pull/17935) ([Pavel Kovalenko](https://github.com/Jokser)). +* Access control: `allow_introspection_functions=0` prohibits usage of introspection functions but doesn't prohibit giving grants for them anymore (the grantee will need to set `allow_introspection_functions=1` for himself to be able to use that grant). Similarly `allow_ddl=0` prohibits usage of DDL commands but doesn't prohibit giving grants for them anymore. [#17908](https://github.com/ClickHouse/ClickHouse/pull/17908) ([Vitaly Baranov](https://github.com/vitlibar)). +* Usability improvement: hints for column names. [#17112](https://github.com/ClickHouse/ClickHouse/issues/17112). [#17857](https://github.com/ClickHouse/ClickHouse/pull/17857) ([fastio](https://github.com/fastio)). +* Add diagnostic information when two merge tables try to read each other's data. [#17854](https://github.com/ClickHouse/ClickHouse/pull/17854) ([å¾ç‚˜](https://github.com/weeds085490)). +* Let the possibility to override timeout value for running script using the ClickHouse docker image. [#17818](https://github.com/ClickHouse/ClickHouse/pull/17818) ([Guillaume Tassery](https://github.com/YiuRULE)). +* Check system log tables' engine definition grammar to prevent some configuration errors. Notes that this grammar check is not semantical, that means such mistakes as non-existent columns / expression functions would be not found out util the table is created. [#17739](https://github.com/ClickHouse/ClickHouse/pull/17739) ([Du Chuan](https://github.com/spongedu)). +* Removed exception throwing at `RabbitMQ` table initialization if there was no connection (it will be reconnecting in the background). [#17709](https://github.com/ClickHouse/ClickHouse/pull/17709) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Do not ignore server memory limits during Buffer flush. [#17646](https://github.com/ClickHouse/ClickHouse/pull/17646) ([Azat Khuzhin](https://github.com/azat)). +* Switch to patched version of RocksDB (from ClickHouse-Extras) to fix use-after-free error. [#17643](https://github.com/ClickHouse/ClickHouse/pull/17643) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Added an offset to exception message for parallel parsing. This fixes [#17457](https://github.com/ClickHouse/ClickHouse/issues/17457). [#17641](https://github.com/ClickHouse/ClickHouse/pull/17641) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Don't throw "Too many parts" error in the middle of INSERT query. [#17566](https://github.com/ClickHouse/ClickHouse/pull/17566) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow query parameters in UPDATE statement of ALTER query. Fixes [#10976](https://github.com/ClickHouse/ClickHouse/issues/10976). [#17563](https://github.com/ClickHouse/ClickHouse/pull/17563) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Query obfuscator: avoid usage of some SQL keywords for identifier names. [#17526](https://github.com/ClickHouse/ClickHouse/pull/17526) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Export current max ddl entry executed by DDLWorker via server metric. It's useful to check if DDLWorker hangs somewhere. [#17464](https://github.com/ClickHouse/ClickHouse/pull/17464) ([Amos Bird](https://github.com/amosbird)). +* Export asynchronous metrics of all servers current threads. It's useful to track down issues like [this](https://github.com/ClickHouse-Extras/poco/pull/28). [#17463](https://github.com/ClickHouse/ClickHouse/pull/17463) ([Amos Bird](https://github.com/amosbird)). +* Include dynamic columns like MATERIALIZED / ALIAS for wildcard query when settings `asterisk_include_materialized_columns` and `asterisk_include_alias_columns` are turned on. [#17462](https://github.com/ClickHouse/ClickHouse/pull/17462) ([Ken Chen](https://github.com/chenziliang)). +* Allow specifying [TTL](https://clickhouse.com/docs/ja/engines/table-engines/mergetree-family/mergetree/#mergetree-table-ttl) to remove old entries from [system log tables](https://clickhouse.com/docs/ja/operations/system-tables/), using the `` attribute in `config.xml`. [#17438](https://github.com/ClickHouse/ClickHouse/pull/17438) ([Du Chuan](https://github.com/spongedu)). +* Now queries coming to the server via MySQL and PostgreSQL protocols have distinctive interface types (which can be seen in the `interface` column of the table`system.query_log`): `4` for MySQL, and `5` for PostgreSQL, instead of formerly used `1` which is now used for the native protocol only. [#17437](https://github.com/ClickHouse/ClickHouse/pull/17437) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix parsing of SETTINGS clause of the `INSERT ... SELECT ... SETTINGS` query. [#17414](https://github.com/ClickHouse/ClickHouse/pull/17414) ([Azat Khuzhin](https://github.com/azat)). +* Correctly account memory in RadixSort. [#17412](https://github.com/ClickHouse/ClickHouse/pull/17412) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add eof check in `receiveHello` in server to prevent getting `Attempt to read after eof` exception. [#17365](https://github.com/ClickHouse/ClickHouse/pull/17365) ([Kruglov Pavel](https://github.com/Avogar)). +* Avoid possible stack overflow in bigint conversion. Big integers are experimental. [#17269](https://github.com/ClickHouse/ClickHouse/pull/17269) ([flynn](https://github.com/ucasFL)). +* Now `set` indices will work with `GLOBAL IN`. This fixes [#17232](https://github.com/ClickHouse/ClickHouse/issues/17232) , [#5576](https://github.com/ClickHouse/ClickHouse/issues/5576) . [#17253](https://github.com/ClickHouse/ClickHouse/pull/17253) ([Amos Bird](https://github.com/amosbird)). +* Add limit for http redirects in request to S3 storage (`s3_max_redirects`). [#17220](https://github.com/ClickHouse/ClickHouse/pull/17220) ([ianton-ru](https://github.com/ianton-ru)). +* When `-OrNull` combinator combined `-If`, `-Merge`, `-MergeState`, `-State` combinators, we should put `-OrNull` in front. [#16935](https://github.com/ClickHouse/ClickHouse/pull/16935) ([flynn](https://github.com/ucasFL)). +* Support HTTP proxy and HTTPS S3 endpoint configuration. [#16861](https://github.com/ClickHouse/ClickHouse/pull/16861) ([Pavel Kovalenko](https://github.com/Jokser)). +* Added proper authentication using environment, `~/.aws` and `AssumeRole` for S3 client. [#16856](https://github.com/ClickHouse/ClickHouse/pull/16856) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Add more OpenTelemetry spans. Add an example of how to export the span data to Zipkin. [#16535](https://github.com/ClickHouse/ClickHouse/pull/16535) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Cache dictionaries: Completely eliminate callbacks and locks for acquiring them. Keys are not divided into "not found" and "expired", but stored in the same map during query. [#14958](https://github.com/ClickHouse/ClickHouse/pull/14958) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix never worked `fsync_part_directory`/`fsync_after_insert`/`in_memory_parts_insert_sync` (experimental feature). [#18845](https://github.com/ClickHouse/ClickHouse/pull/18845) ([Azat Khuzhin](https://github.com/azat)). +* Allow using `Atomic` engine for nested database of `MaterializeMySQL` engine. [#14849](https://github.com/ClickHouse/ClickHouse/pull/14849) ([tavplubix](https://github.com/tavplubix)). + + +#### Bug Fix + +* Fix the issue when server can stop accepting connections in very rare cases. [#17542](https://github.com/ClickHouse/ClickHouse/pull/17542) (Amos Bird, [alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix index analysis of binary functions with constant argument which leads to wrong query results. This fixes [#18364](https://github.com/ClickHouse/ClickHouse/issues/18364). [#18373](https://github.com/ClickHouse/ClickHouse/pull/18373) ([Amos Bird](https://github.com/amosbird)). +* Fix possible wrong index analysis when the types of the index comparison are different. This fixes [#17122](https://github.com/ClickHouse/ClickHouse/issues/17122). [#17145](https://github.com/ClickHouse/ClickHouse/pull/17145) ([Amos Bird](https://github.com/amosbird)). +* Disable write with AIO during merges because it can lead to extremely rare data corruption of primary key columns during merge. [#18481](https://github.com/ClickHouse/ClickHouse/pull/18481) ([alesapin](https://github.com/alesapin)). +* Restrict merges from wide to compact parts. In case of vertical merge it led to broken result part. [#18381](https://github.com/ClickHouse/ClickHouse/pull/18381) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible incomplete query result while reading from `MergeTree*` in case of read backoff (message ` MergeTreeReadPool: Will lower number of threads` in logs). Was introduced in [#16423](https://github.com/ClickHouse/ClickHouse/issues/16423). Fixes [#18137](https://github.com/ClickHouse/ClickHouse/issues/18137). [#18216](https://github.com/ClickHouse/ClickHouse/pull/18216) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix use after free bug in `rocksdb` library. [#18862](https://github.com/ClickHouse/ClickHouse/pull/18862) ([sundyli](https://github.com/sundy-li)). +* Fix infinite reading from file in `ORC` format (was introduced in [#10580](https://github.com/ClickHouse/ClickHouse/issues/10580)). Fixes [#19095](https://github.com/ClickHouse/ClickHouse/issues/19095). [#19134](https://github.com/ClickHouse/ClickHouse/pull/19134) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bug in merge tree data writer which can lead to marks with bigger size than fixed granularity size. Fixes [#18913](https://github.com/ClickHouse/ClickHouse/issues/18913). [#19123](https://github.com/ClickHouse/ClickHouse/pull/19123) ([alesapin](https://github.com/alesapin)). +* Fix startup bug when clickhouse was not able to read compression codec from `LowCardinality(Nullable(...))` and throws exception `Attempt to read after EOF`. Fixes [#18340](https://github.com/ClickHouse/ClickHouse/issues/18340). [#19101](https://github.com/ClickHouse/ClickHouse/pull/19101) ([alesapin](https://github.com/alesapin)). +* Restrict `MODIFY TTL` queries for `MergeTree` tables created in old syntax. Previously the query succeeded, but actually it had no effect. [#19064](https://github.com/ClickHouse/ClickHouse/pull/19064) ([Anton Popov](https://github.com/CurtizJ)). +* Make sure `groupUniqArray` returns correct type for argument of Enum type. This closes [#17875](https://github.com/ClickHouse/ClickHouse/issues/17875). [#19019](https://github.com/ClickHouse/ClickHouse/pull/19019) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix possible error `Expected single dictionary argument for function` if use function `ignore` with `LowCardinality` argument. Fixes [#14275](https://github.com/ClickHouse/ClickHouse/issues/14275). [#19016](https://github.com/ClickHouse/ClickHouse/pull/19016) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix inserting of `LowCardinality` column to table with `TinyLog` engine. Fixes [#18629](https://github.com/ClickHouse/ClickHouse/issues/18629). [#19010](https://github.com/ClickHouse/ClickHouse/pull/19010) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Join tries to materialize const columns, but our code wants them in other places. [#18982](https://github.com/ClickHouse/ClickHouse/pull/18982) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Disable `optimize_move_functions_out_of_any` because optimization is not always correct. This closes [#18051](https://github.com/ClickHouse/ClickHouse/issues/18051). This closes [#18973](https://github.com/ClickHouse/ClickHouse/issues/18973). [#18981](https://github.com/ClickHouse/ClickHouse/pull/18981) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix possible exception `QueryPipeline stream: different number of columns` caused by merging of query plan's `Expression` steps. Fixes [#18190](https://github.com/ClickHouse/ClickHouse/issues/18190). [#18980](https://github.com/ClickHouse/ClickHouse/pull/18980) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed very rare deadlock at shutdown. [#18977](https://github.com/ClickHouse/ClickHouse/pull/18977) ([tavplubix](https://github.com/tavplubix)). +* Fix incorrect behavior when `ALTER TABLE ... DROP PART 'part_name'` query removes all deduplication blocks for the whole partition. Fixes [#18874](https://github.com/ClickHouse/ClickHouse/issues/18874). [#18969](https://github.com/ClickHouse/ClickHouse/pull/18969) ([alesapin](https://github.com/alesapin)). +* Attach partition should reset the mutation. [#18804](https://github.com/ClickHouse/ClickHouse/issues/18804). [#18935](https://github.com/ClickHouse/ClickHouse/pull/18935) ([fastio](https://github.com/fastio)). +* Fix issue with `bitmapOrCardinality` that may lead to nullptr dereference. This closes [#18911](https://github.com/ClickHouse/ClickHouse/issues/18911). [#18912](https://github.com/ClickHouse/ClickHouse/pull/18912) ([sundyli](https://github.com/sundy-li)). +* Fix possible hang at shutdown in `clickhouse-local`. This fixes [#18891](https://github.com/ClickHouse/ClickHouse/issues/18891). [#18893](https://github.com/ClickHouse/ClickHouse/pull/18893) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Queries for external databases (MySQL, ODBC, JDBC) were incorrectly rewritten if there was an expression in form of `x IN table`. This fixes [#9756](https://github.com/ClickHouse/ClickHouse/issues/9756). [#18876](https://github.com/ClickHouse/ClickHouse/pull/18876) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix *If combinator with unary function and Nullable types. [#18806](https://github.com/ClickHouse/ClickHouse/pull/18806) ([Azat Khuzhin](https://github.com/azat)). +* Fix the issue that asynchronous distributed INSERTs can be rejected by the server if the setting `network_compression_method` is globally set to non-default value. This fixes [#18741](https://github.com/ClickHouse/ClickHouse/issues/18741). [#18776](https://github.com/ClickHouse/ClickHouse/pull/18776) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed `Attempt to read after eof` error when trying to `CAST` `NULL` from `Nullable(String)` to `Nullable(Decimal(P, S))`. Now function `CAST` returns `NULL` when it cannot parse decimal from nullable string. Fixes [#7690](https://github.com/ClickHouse/ClickHouse/issues/7690). [#18718](https://github.com/ClickHouse/ClickHouse/pull/18718) ([Winter Zhang](https://github.com/zhang2014)). +* Fix minor issue with logging. [#18717](https://github.com/ClickHouse/ClickHouse/pull/18717) ([sundyli](https://github.com/sundy-li)). +* Fix removing of empty parts in `ReplicatedMergeTree` tables, created with old syntax. Fixes [#18582](https://github.com/ClickHouse/ClickHouse/issues/18582). [#18614](https://github.com/ClickHouse/ClickHouse/pull/18614) ([Anton Popov](https://github.com/CurtizJ)). +* Fix previous bug when date overflow with different values. Strict Date value limit to "2106-02-07", cast date > "2106-02-07" to value 0. [#18565](https://github.com/ClickHouse/ClickHouse/pull/18565) ([hexiaoting](https://github.com/hexiaoting)). +* Add FixedString data type support for replication from MySQL. Replication from MySQL is an experimental feature. This patch fixes [#18450](https://github.com/ClickHouse/ClickHouse/issues/18450) Also fixes [#6556](https://github.com/ClickHouse/ClickHouse/issues/6556). [#18553](https://github.com/ClickHouse/ClickHouse/pull/18553) ([awesomeleo](https://github.com/awesomeleo)). +* Fix possible `Pipeline stuck` error while using `ORDER BY` after subquery with `RIGHT` or `FULL` join. [#18550](https://github.com/ClickHouse/ClickHouse/pull/18550) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bug which may lead to `ALTER` queries hung after corresponding mutation kill. Found by thread fuzzer. [#18518](https://github.com/ClickHouse/ClickHouse/pull/18518) ([alesapin](https://github.com/alesapin)). +* Proper support for 12AM in `parseDateTimeBestEffort` function. This fixes [#18402](https://github.com/ClickHouse/ClickHouse/issues/18402). [#18449](https://github.com/ClickHouse/ClickHouse/pull/18449) ([vladimir-golovchenko](https://github.com/vladimir-golovchenko)). +* Fixed `value is too short` error when executing `toType(...)` functions (`toDate`, `toUInt32`, etc) with argument of type `Nullable(String)`. Now such functions return `NULL` on parsing errors instead of throwing exception. Fixes [#7673](https://github.com/ClickHouse/ClickHouse/issues/7673). [#18445](https://github.com/ClickHouse/ClickHouse/pull/18445) ([tavplubix](https://github.com/tavplubix)). +* Fix the unexpected behaviour of `SHOW TABLES`. [#18431](https://github.com/ClickHouse/ClickHouse/pull/18431) ([fastio](https://github.com/fastio)). +* Fix -SimpleState combinator generates incompatible arugment type and return type. [#18404](https://github.com/ClickHouse/ClickHouse/pull/18404) ([Amos Bird](https://github.com/amosbird)). +* Fix possible race condition in concurrent usage of `Set` or `Join` tables and selects from `system.tables`. [#18385](https://github.com/ClickHouse/ClickHouse/pull/18385) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix filling table `system.settings_profile_elements`. This PR fixes [#18231](https://github.com/ClickHouse/ClickHouse/issues/18231). [#18379](https://github.com/ClickHouse/ClickHouse/pull/18379) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix possible crashes in aggregate functions with combinator `Distinct`, while using two-level aggregation. Fixes [#17682](https://github.com/ClickHouse/ClickHouse/issues/17682). [#18365](https://github.com/ClickHouse/ClickHouse/pull/18365) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed issue when `clickhouse-odbc-bridge` process is unreachable by server on machines with dual IPv4/IPv6 stack; Fixed issue when ODBC dictionary updates are performed using malformed queries and/or cause crashes of the odbc-bridge process; Possibly closes [#14489](https://github.com/ClickHouse/ClickHouse/issues/14489). [#18278](https://github.com/ClickHouse/ClickHouse/pull/18278) ([Denis Glazachev](https://github.com/traceon)). +* Access control: `SELECT count() FROM table` now can be executed if the user has access to at least single column from a table. This PR fixes [#10639](https://github.com/ClickHouse/ClickHouse/issues/10639). [#18233](https://github.com/ClickHouse/ClickHouse/pull/18233) ([Vitaly Baranov](https://github.com/vitlibar)). +* Access control: `SELECT JOIN` now requires the `SELECT` privilege on each of the joined tables. This PR fixes [#17654](https://github.com/ClickHouse/ClickHouse/issues/17654). [#18232](https://github.com/ClickHouse/ClickHouse/pull/18232) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix key comparison between Enum and Int types. This fixes [#17989](https://github.com/ClickHouse/ClickHouse/issues/17989). [#18214](https://github.com/ClickHouse/ClickHouse/pull/18214) ([Amos Bird](https://github.com/amosbird)). +* Replication from MySQL (experimental feature). Fixes [#18186](https://github.com/ClickHouse/ClickHouse/issues/18186) Fixes [#16372](https://github.com/ClickHouse/ClickHouse/issues/16372) Fix unique key convert issue in MaterializeMySQL database engine. [#18211](https://github.com/ClickHouse/ClickHouse/pull/18211) ([Winter Zhang](https://github.com/zhang2014)). +* Fix inconsistency for queries with both `WITH FILL` and `WITH TIES` [#17466](https://github.com/ClickHouse/ClickHouse/issues/17466). [#18188](https://github.com/ClickHouse/ClickHouse/pull/18188) ([hexiaoting](https://github.com/hexiaoting)). +* Fix inserting a row with default value in case of parsing error in the last column. Fixes [#17712](https://github.com/ClickHouse/ClickHouse/issues/17712). [#18182](https://github.com/ClickHouse/ClickHouse/pull/18182) ([Jianmei Zhang](https://github.com/zhangjmruc)). +* Fix `Unknown setting profile` error on attempt to set settings profile. [#18167](https://github.com/ClickHouse/ClickHouse/pull/18167) ([tavplubix](https://github.com/tavplubix)). +* Fix error when query `MODIFY COLUMN ... REMOVE TTL` doesn't actually remove column TTL. [#18130](https://github.com/ClickHouse/ClickHouse/pull/18130) ([alesapin](https://github.com/alesapin)). +* Fixed `std::out_of_range: basic_string` in S3 URL parsing. [#18059](https://github.com/ClickHouse/ClickHouse/pull/18059) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fix comparison of `DateTime64` and `Date`. Fixes [#13804](https://github.com/ClickHouse/ClickHouse/issues/13804) and [#11222](https://github.com/ClickHouse/ClickHouse/issues/11222). ... [#18050](https://github.com/ClickHouse/ClickHouse/pull/18050) ([Vasily Nemkov](https://github.com/Enmk)). +* Replication from MySQL (experimental feature): Fixes [#15187](https://github.com/ClickHouse/ClickHouse/issues/15187) Fixes [#17912](https://github.com/ClickHouse/ClickHouse/issues/17912) support convert MySQL prefix index for MaterializeMySQL. [#17944](https://github.com/ClickHouse/ClickHouse/pull/17944) ([Winter Zhang](https://github.com/zhang2014)). +* When server log rotation was configured using `logger.size` parameter with numeric value larger than 2^32, the logs were not rotated properly. This is fixed. [#17905](https://github.com/ClickHouse/ClickHouse/pull/17905) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Trivial query optimization was producing wrong result if query contains ARRAY JOIN (so query is actually non trivial). [#17887](https://github.com/ClickHouse/ClickHouse/pull/17887) ([sundyli](https://github.com/sundy-li)). +* Fix possible segfault in `topK` aggregate function. This closes [#17404](https://github.com/ClickHouse/ClickHouse/issues/17404). [#17845](https://github.com/ClickHouse/ClickHouse/pull/17845) ([Maksim Kita](https://github.com/kitaisreal)). +* WAL (experimental feature): Do not restore parts from WAL if `in_memory_parts_enable_wal` is disabled. [#17802](https://github.com/ClickHouse/ClickHouse/pull/17802) ([detailyang](https://github.com/detailyang)). +* Exception message about max table size to drop was displayed incorrectly. [#17764](https://github.com/ClickHouse/ClickHouse/pull/17764) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed possible segfault when there is not enough space when inserting into `Distributed` table. [#17737](https://github.com/ClickHouse/ClickHouse/pull/17737) ([tavplubix](https://github.com/tavplubix)). +* Fixed problem when ClickHouse fails to resume connection to MySQL servers. [#17681](https://github.com/ClickHouse/ClickHouse/pull/17681) ([Alexander Kazakov](https://github.com/Akazz)). +* Windows: Fixed `Function not implemented` error when executing `RENAME` query in `Atomic` database with ClickHouse running on Windows Subsystem for Linux. Fixes [#17661](https://github.com/ClickHouse/ClickHouse/issues/17661). [#17664](https://github.com/ClickHouse/ClickHouse/pull/17664) ([tavplubix](https://github.com/tavplubix)). +* In might be determined incorrectly if cluster is circular- (cross-) replicated or not when executing `ON CLUSTER` query due to race condition when `pool_size` > 1. It's fixed. [#17640](https://github.com/ClickHouse/ClickHouse/pull/17640) ([tavplubix](https://github.com/tavplubix)). +* Fix empty `system.stack_trace` table when server is running in daemon mode. [#17630](https://github.com/ClickHouse/ClickHouse/pull/17630) ([Amos Bird](https://github.com/amosbird)). +* Exception `fmt::v7::format_error` can be logged in background for MergeTree tables. This fixes [#17613](https://github.com/ClickHouse/ClickHouse/issues/17613). [#17615](https://github.com/ClickHouse/ClickHouse/pull/17615) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* When clickhouse-client is used in interactive mode with multiline queries, single line comment was erronously extended till the end of query. This fixes [#13654](https://github.com/ClickHouse/ClickHouse/issues/13654). [#17565](https://github.com/ClickHouse/ClickHouse/pull/17565) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix alter query hang when the corresponding mutation was killed on the different replica. Fixes [#16953](https://github.com/ClickHouse/ClickHouse/issues/16953). [#17499](https://github.com/ClickHouse/ClickHouse/pull/17499) ([alesapin](https://github.com/alesapin)). +* Fix issue with memory accounting when mark cache size was underestimated by clickhouse. It may happen when there are a lot of tiny files with marks. [#17496](https://github.com/ClickHouse/ClickHouse/pull/17496) ([alesapin](https://github.com/alesapin)). +* Fix `ORDER BY` with enabled setting `optimize_redundant_functions_in_order_by`. [#17471](https://github.com/ClickHouse/ClickHouse/pull/17471) ([Anton Popov](https://github.com/CurtizJ)). +* Fix duplicates after `DISTINCT` which were possible because of incorrect optimization. Fixes [#17294](https://github.com/ClickHouse/ClickHouse/issues/17294). [#17296](https://github.com/ClickHouse/ClickHouse/pull/17296) ([li chengxiang](https://github.com/chengxianglibra)). [#17439](https://github.com/ClickHouse/ClickHouse/pull/17439) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed high CPU usage in background tasks of *MergeTree tables. [#17416](https://github.com/ClickHouse/ClickHouse/pull/17416) ([tavplubix](https://github.com/tavplubix)). +* Fix possible crash while reading from `JOIN` table with `LowCardinality` types. Fixes [#17228](https://github.com/ClickHouse/ClickHouse/issues/17228). [#17397](https://github.com/ClickHouse/ClickHouse/pull/17397) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Replication from MySQL (experimental feature): Fixes [#16835](https://github.com/ClickHouse/ClickHouse/issues/16835) try fix miss match header with MySQL SHOW statement. [#17366](https://github.com/ClickHouse/ClickHouse/pull/17366) ([Winter Zhang](https://github.com/zhang2014)). +* Fix nondeterministic functions with predicate optimizer. This fixes [#17244](https://github.com/ClickHouse/ClickHouse/issues/17244). [#17273](https://github.com/ClickHouse/ClickHouse/pull/17273) ([Winter Zhang](https://github.com/zhang2014)). +* Fix possible `Unexpected packet Data received from client` error for Distributed queries with `LIMIT`. [#17254](https://github.com/ClickHouse/ClickHouse/pull/17254) ([Azat Khuzhin](https://github.com/azat)). +* Fix set index invalidation when there are const columns in the subquery. This fixes [#17246](https://github.com/ClickHouse/ClickHouse/issues/17246). [#17249](https://github.com/ClickHouse/ClickHouse/pull/17249) ([Amos Bird](https://github.com/amosbird)). +* clickhouse-copier: Fix for non-partitioned tables [#15235](https://github.com/ClickHouse/ClickHouse/issues/15235). [#17248](https://github.com/ClickHouse/ClickHouse/pull/17248) ([Qi Chen](https://github.com/kaka11chen)). +* Fixed possible not-working mutations for parts stored on S3 disk (experimental feature). [#17227](https://github.com/ClickHouse/ClickHouse/pull/17227) ([Pavel Kovalenko](https://github.com/Jokser)). +* Bug fix for funciton `fuzzBits`, related issue: [#16980](https://github.com/ClickHouse/ClickHouse/issues/16980). [#17051](https://github.com/ClickHouse/ClickHouse/pull/17051) ([hexiaoting](https://github.com/hexiaoting)). +* Fix `optimize_distributed_group_by_sharding_key` for query with OFFSET only. [#16996](https://github.com/ClickHouse/ClickHouse/pull/16996) ([Azat Khuzhin](https://github.com/azat)). +* Fix queries from `Merge` tables over `Distributed` tables with JOINs. [#16993](https://github.com/ClickHouse/ClickHouse/pull/16993) ([Azat Khuzhin](https://github.com/azat)). +* Fix order by optimization with monotonic functions. Fixes [#16107](https://github.com/ClickHouse/ClickHouse/issues/16107). [#16956](https://github.com/ClickHouse/ClickHouse/pull/16956) ([Anton Popov](https://github.com/CurtizJ)). +* Fix incorrect comparison of types `DateTime64` with different scales. Fixes [#16655](https://github.com/ClickHouse/ClickHouse/issues/16655) ... [#16952](https://github.com/ClickHouse/ClickHouse/pull/16952) ([Vasily Nemkov](https://github.com/Enmk)). +* Fix optimization of group by with enabled setting `optimize_aggregators_of_group_by_keys` and joins. Fixes [#12604](https://github.com/ClickHouse/ClickHouse/issues/12604). [#16951](https://github.com/ClickHouse/ClickHouse/pull/16951) ([Anton Popov](https://github.com/CurtizJ)). +* Minor fix in SHOW ACCESS query. [#16866](https://github.com/ClickHouse/ClickHouse/pull/16866) ([tavplubix](https://github.com/tavplubix)). +* Fix the behaviour with enabled `optimize_trivial_count_query` setting with partition predicate. [#16767](https://github.com/ClickHouse/ClickHouse/pull/16767) ([Azat Khuzhin](https://github.com/azat)). +* Return number of affected rows for INSERT queries via MySQL wire protocol. Previously ClickHouse used to always return 0, it's fixed. Fixes [#16605](https://github.com/ClickHouse/ClickHouse/issues/16605). [#16715](https://github.com/ClickHouse/ClickHouse/pull/16715) ([Winter Zhang](https://github.com/zhang2014)). +* Fix inconsistent behavior caused by `select_sequential_consistency` for optimized trivial count query and system tables. [#16309](https://github.com/ClickHouse/ClickHouse/pull/16309) ([Hao Chen](https://github.com/haoch)). +* Throw error when `REPLACE` column transformer operates on non existing column. [#16183](https://github.com/ClickHouse/ClickHouse/pull/16183) ([hexiaoting](https://github.com/hexiaoting)). +* Throw exception in case of not equi-join ON expression in RIGH|FULL JOIN. [#15162](https://github.com/ClickHouse/ClickHouse/pull/15162) ([Artem Zuikov](https://github.com/4ertus2)). + + +#### Build/Testing/Packaging Improvement + +* Add simple integrity check for ClickHouse binary. It allows to detect corruption due to faulty hardware (bit rot on storage media or bit flips in RAM). [#18811](https://github.com/ClickHouse/ClickHouse/pull/18811) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Change `OpenSSL` to `BoringSSL`. It allows to avoid issues with sanitizers. This fixes [#12490](https://github.com/ClickHouse/ClickHouse/issues/12490). This fixes [#17502](https://github.com/ClickHouse/ClickHouse/issues/17502). This fixes [#12952](https://github.com/ClickHouse/ClickHouse/issues/12952). [#18129](https://github.com/ClickHouse/ClickHouse/pull/18129) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Simplify `Sys/V` init script. It was not working on Ubuntu 12.04 or older. [#17428](https://github.com/ClickHouse/ClickHouse/pull/17428) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Multiple improvements in `./clickhouse install` script. [#17421](https://github.com/ClickHouse/ClickHouse/pull/17421) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now ClickHouse can pretend to be a fake ZooKeeper. Currently, storage implementation is just stored in-memory hash-table, and server partially support ZooKeeper protocol. [#16877](https://github.com/ClickHouse/ClickHouse/pull/16877) ([alesapin](https://github.com/alesapin)). +* Fix dead list watches removal for TestKeeperStorage (a mock for ZooKeeper). [#18065](https://github.com/ClickHouse/ClickHouse/pull/18065) ([alesapin](https://github.com/alesapin)). +* Add `SYSTEM SUSPEND` command for fault injection. It can be used to faciliate failover tests. This closes [#15979](https://github.com/ClickHouse/ClickHouse/issues/15979). [#18850](https://github.com/ClickHouse/ClickHouse/pull/18850) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Generate build id when ClickHouse is linked with `lld`. It's appeared that `lld` does not generate it by default on my machine. Build id is used for crash reports and introspection. [#18808](https://github.com/ClickHouse/ClickHouse/pull/18808) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix shellcheck errors in style check. [#18566](https://github.com/ClickHouse/ClickHouse/pull/18566) ([Ilya Yatsishin](https://github.com/qoega)). +* Update timezones info to 2020e. [#18531](https://github.com/ClickHouse/ClickHouse/pull/18531) ([alesapin](https://github.com/alesapin)). +* Fix codespell warnings. Split style checks into separate parts. Update style checks docker image. [#18463](https://github.com/ClickHouse/ClickHouse/pull/18463) ([Ilya Yatsishin](https://github.com/qoega)). +* Automated check for leftovers of conflict markers in docs. [#18332](https://github.com/ClickHouse/ClickHouse/pull/18332) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Enable Thread Fuzzer for stateless tests flaky check. [#18299](https://github.com/ClickHouse/ClickHouse/pull/18299) ([alesapin](https://github.com/alesapin)). +* Do not use non thread-safe function `strerror`. [#18204](https://github.com/ClickHouse/ClickHouse/pull/18204) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Update `anchore/scan-action@main` workflow action (was moved from `master` to `main`). [#18192](https://github.com/ClickHouse/ClickHouse/pull/18192) ([Stig Bakken](https://github.com/stigsb)). +* Now `clickhouse-test` does DROP/CREATE databases with a timeout. [#18098](https://github.com/ClickHouse/ClickHouse/pull/18098) ([alesapin](https://github.com/alesapin)). +* Enable experimental support for Pytest framework for stateless tests. [#17902](https://github.com/ClickHouse/ClickHouse/pull/17902) ([Ivan](https://github.com/abyss7)). +* Now we use the fresh docker daemon version in integration tests. [#17671](https://github.com/ClickHouse/ClickHouse/pull/17671) ([alesapin](https://github.com/alesapin)). +* Send info about official build, memory, cpu and free disk space to Sentry if it is enabled. Sentry is opt-in feature to help ClickHouse developers. This closes [#17279](https://github.com/ClickHouse/ClickHouse/issues/17279). [#17543](https://github.com/ClickHouse/ClickHouse/pull/17543) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* There was an uninitialized variable in the code of clickhouse-copier. [#17363](https://github.com/ClickHouse/ClickHouse/pull/17363) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix [one MSan report](https://clickhouse-test-reports.s3.yandex.net/17309/065cd002578f2e8228f12a2744bd40c970065e0c/stress_test_(memory)/stderr.log) from [#17309](https://github.com/ClickHouse/ClickHouse/issues/17309). [#17344](https://github.com/ClickHouse/ClickHouse/pull/17344) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix for the issue with IPv6 in Arrow Flight library. See [the comments](https://github.com/ClickHouse/ClickHouse/pull/16243#issuecomment-720830294) for details. [#16664](https://github.com/ClickHouse/ClickHouse/pull/16664) ([Zhanna](https://github.com/FawnD2)). +* Add a library that replaces some `libc` functions to traps that will terminate the process. [#16366](https://github.com/ClickHouse/ClickHouse/pull/16366) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Provide diagnostics in server logs in case of stack overflow, send error message to clickhouse-client. This closes [#14840](https://github.com/ClickHouse/ClickHouse/issues/14840). [#16346](https://github.com/ClickHouse/ClickHouse/pull/16346) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now we can run almost all stateless functional tests in parallel. [#15236](https://github.com/ClickHouse/ClickHouse/pull/15236) ([alesapin](https://github.com/alesapin)). +* Fix corruption in `librdkafka` snappy decompression (was a problem only for gcc10 builds, but official builds uses clang already, so at least recent official releases are not affected). [#18053](https://github.com/ClickHouse/ClickHouse/pull/18053) ([Azat Khuzhin](https://github.com/azat)). +* If server was terminated by OOM killer, print message in log. [#13516](https://github.com/ClickHouse/ClickHouse/pull/13516) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* PODArray: Avoid call to memcpy with (nullptr, 0) arguments (Fix UBSan report). This fixes [#18525](https://github.com/ClickHouse/ClickHouse/issues/18525). [#18526](https://github.com/ClickHouse/ClickHouse/pull/18526) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Minor improvement for path concatenation of zookeeper paths inside DDLWorker. [#17767](https://github.com/ClickHouse/ClickHouse/pull/17767) ([Bharat Nallan](https://github.com/bharatnc)). +* Allow to reload symbols from debug file. This PR also fixes a build-id issue. [#17637](https://github.com/ClickHouse/ClickHouse/pull/17637) ([Amos Bird](https://github.com/amosbird)). + + +## [Changelog for 2020](./2020.md) diff --git a/docs/ja/whats-new/changelog/2022.md b/docs/ja/whats-new/changelog/2022.md new file mode 100644 index 00000000000..d152d23616b --- /dev/null +++ b/docs/ja/whats-new/changelog/2022.md @@ -0,0 +1,1837 @@ +--- +slug: /ja/whats-new/changelog/2022 +sidebar_position: 9 +sidebar_label: 2022 +title: 2022 Changelog +--- + +### ClickHouse release 22.12, 2022-12-15 + +:::warning + +This release contains a faulty systemd service comment that might break the ClickHouse installation on upgrade for some Linux distributions. The systemd service changes the directory owner permissions on `/run/systemd`, causing all subsequent systemd operations to fail. It is advised that you skip upgrading to this version and instead upgrade to a newer version of ClickHouse. + +Refer to this issue on GitHub for more details: https://github.com/ClickHouse/ClickHouse/issues/48285 + +::: + +#### Upgrade Notes +* Fixed backward incompatibility in (de)serialization of states of `min`, `max`, `any*`, `argMin`, `argMax` aggregate functions with `String` argument. The incompatibility affects 22.9, 22.10 and 22.11 branches (fixed since 22.9.6, 22.10.4 and 22.11.2 correspondingly). Some minor releases of 22.3, 22.7 and 22.8 branches are also affected: 22.3.13...22.3.14 (fixed since 22.3.15), 22.8.6...22.8.9 (fixed since 22.8.10), 22.7.6 and newer (will not be fixed in 22.7, we recommend upgrading from 22.7.* to 22.8.10 or newer). This release note does not concern users that have never used affected versions. Incompatible versions append an extra `'\0'` to strings when reading states of the aggregate functions mentioned above. For example, if an older version saved state of `anyState('foobar')` to `state_column` then the incompatible version will print `'foobar\0'` on `anyMerge(state_column)`. Also incompatible versions write states of the aggregate functions without trailing `'\0'`. Newer versions (that have the fix) can correctly read data written by all versions including incompatible versions, except one corner case. If an incompatible version saved a state with a string that actually ends with null character, then newer version will trim trailing `'\0'` when reading state of affected aggregate function. For example, if an incompatible version saved state of `anyState('abrac\0dabra\0')` to `state_column` then newer versions will print `'abrac\0dabra'` on `anyMerge(state_column)`. The issue also affects distributed queries when an incompatible version works in a cluster together with older or newer versions. [#43038](https://github.com/ClickHouse/ClickHouse/pull/43038) ([Alexander Tokmakov](https://github.com/tavplubix), [Raúl Marín](https://github.com/Algunenano)). Note: all the official ClickHouse builds already include the patches. This is not necessarily true for unofficial third-party builds that should be avoided. + +#### New Feature +* Add `BSONEachRow` input/output format. In this format, ClickHouse formats/parses each row as a separate BSON document and each column is formatted/parsed as a single BSON field with the column name as the key. [#42033](https://github.com/ClickHouse/ClickHouse/pull/42033) ([mark-polokhov](https://github.com/mark-polokhov)). +* Add `grace_hash` JOIN algorithm, it can be enabled with `SET join_algorithm = 'grace_hash'`. [#38191](https://github.com/ClickHouse/ClickHouse/pull/38191) ([BigRedEye](https://github.com/BigRedEye), [Vladimir C](https://github.com/vdimir)). +* Allow configuring password complexity rules and checks for creating and changing users. [#43719](https://github.com/ClickHouse/ClickHouse/pull/43719) ([Nikolay Degterinsky](https://github.com/evillique)). +* Mask sensitive information in logs; mask secret parts in the output of queries `SHOW CREATE TABLE` and `SELECT FROM system.tables`. Also resolves [#41418](https://github.com/ClickHouse/ClickHouse/issues/41418). [#43227](https://github.com/ClickHouse/ClickHouse/pull/43227) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add `GROUP BY ALL` syntax: [#37631](https://github.com/ClickHouse/ClickHouse/issues/37631). [#42265](https://github.com/ClickHouse/ClickHouse/pull/42265) ([刘陶峰](https://github.com/taofengliu)). +* Add `FROM table SELECT column` syntax. [#41095](https://github.com/ClickHouse/ClickHouse/pull/41095) ([Nikolay Degterinsky](https://github.com/evillique)). +* Added function `concatWithSeparator` and `concat_ws` as an alias for Spark SQL compatibility. A function `concatWithSeparatorAssumeInjective` added as a variant to enable GROUP BY optimization, similarly to `concatAssumeInjective`. [#43749](https://github.com/ClickHouse/ClickHouse/pull/43749) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Added `multiplyDecimal` and `divideDecimal` functions for decimal operations with fixed precision. [#42438](https://github.com/ClickHouse/ClickHouse/pull/42438) ([Andrey Zvonov](https://github.com/zvonand)). +* Added `system.moves` table with list of currently moving parts. [#42660](https://github.com/ClickHouse/ClickHouse/pull/42660) ([Sergei Trifonov](https://github.com/serxa)). +* Add support for embedded Prometheus endpoint for ClickHouse Keeper. [#43087](https://github.com/ClickHouse/ClickHouse/pull/43087) ([Antonio Andelic](https://github.com/antonio2368)). +* Support numeric literals with `_` as the separator, for example, `1_000_000`. [#43925](https://github.com/ClickHouse/ClickHouse/pull/43925) ([jh0x](https://github.com/jh0x)). +* Added possibility to use an array as a second parameter for `cutURLParameter` function. It will cut multiple parameters. Close [#6827](https://github.com/ClickHouse/ClickHouse/issues/6827). [#43788](https://github.com/ClickHouse/ClickHouse/pull/43788) ([Roman Vasin](https://github.com/rvasin)). +* Add a column with the expression of the index in the `system.data_skipping_indices` table. [#43308](https://github.com/ClickHouse/ClickHouse/pull/43308) ([Guillaume Tassery](https://github.com/YiuRULE)). +* Add column `engine_full` to system table `databases` so that users can access the entire engine definition of a database via system tables. [#43468](https://github.com/ClickHouse/ClickHouse/pull/43468) ([凌涛](https://github.com/lingtaolf)). +* New hash function [xxh3](https://github.com/Cyan4973/xxHash) added. Also, the performance of `xxHash32` and `xxHash64` are improved on ARM thanks to a library update. [#43411](https://github.com/ClickHouse/ClickHouse/pull/43411) ([Nikita Taranov](https://github.com/nickitat)). +* Added support to define constraints for merge tree settings. For example you can forbid overriding the `storage_policy` by users. [#43903](https://github.com/ClickHouse/ClickHouse/pull/43903) ([Sergei Trifonov](https://github.com/serxa)). +* Add a new setting `input_format_json_read_objects_as_strings` that allows the parsing of nested JSON objects into Strings in all JSON input formats. This setting is disabled by default. [#44052](https://github.com/ClickHouse/ClickHouse/pull/44052) ([Kruglov Pavel](https://github.com/Avogar)). + +#### Experimental Feature +* Support deduplication for asynchronous inserts. Before this change, async inserts did not support deduplication, because multiple small inserts coexisted in one inserted batch. Closes [#38075](https://github.com/ClickHouse/ClickHouse/issues/38075). [#43304](https://github.com/ClickHouse/ClickHouse/pull/43304) ([Han Fei](https://github.com/hanfei1991)). +* Add support for cosine distance for the experimental Annoy (vector similarity search) index. [#42778](https://github.com/ClickHouse/ClickHouse/pull/42778) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Add `CREATE / ALTER / DROP NAMED COLLECTION` queries. [#43252](https://github.com/ClickHouse/ClickHouse/pull/43252) ([Kseniia Sumarokova](https://github.com/kssenii)). This feature is under development and the queries are not effective as of version 22.12. This changelog entry is added only to avoid confusion. Restrict default access to named collections to the user defined in config. This requires that `show_named_collections = 1` is set to be able to see them. [#43325](https://github.com/ClickHouse/ClickHouse/pull/43325) ([Kseniia Sumarokova](https://github.com/kssenii)). The `system.named_collections` table is introduced [#43147](https://github.com/ClickHouse/ClickHouse/pull/43147) ([Kseniia Sumarokova](https://github.com/kssenii)). + +#### Performance Improvement +* Add settings `max_streams_for_merge_tree_reading` and `allow_asynchronous_read_from_io_pool_for_merge_tree`. Setting `max_streams_for_merge_tree_reading` limits the number of reading streams for MergeTree tables. Setting `allow_asynchronous_read_from_io_pool_for_merge_tree` enables a background I/O pool to read from `MergeTree` tables. This may increase performance for I/O bound queries if used together with `max_streams_to_max_threads_ratio` or `max_streams_for_merge_tree_reading`. [#43260](https://github.com/ClickHouse/ClickHouse/pull/43260) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). This improves performance up to 100 times in case of high latency storage, low number of CPU and high number of data parts. +* Settings `merge_tree_min_rows_for_concurrent_read_for_remote_filesystem/merge_tree_min_bytes_for_concurrent_read_for_remote_filesystem` did not respect adaptive granularity. Fat rows did not decrease the number of read rows (as it was done for `merge_tree_min_rows_for_concurrent_read/merge_tree_min_bytes_for_concurrent_read`, which could lead to high memory usage when using remote filesystems. [#43965](https://github.com/ClickHouse/ClickHouse/pull/43965) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Optimized the number of list requests to ZooKeeper or ClickHouse Keeper when selecting a part to merge. Previously it could produce thousands of requests in some cases. Fixes [#43647](https://github.com/ClickHouse/ClickHouse/issues/43647). [#43675](https://github.com/ClickHouse/ClickHouse/pull/43675) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Optimization is getting skipped now if `max_size_to_preallocate_for_aggregation` has too small a value. The default value of this setting increased to `10^8`. [#43945](https://github.com/ClickHouse/ClickHouse/pull/43945) ([Nikita Taranov](https://github.com/nickitat)). +* Speed-up server shutdown by avoiding cleaning up of old data parts. Because it is unnecessary after https://github.com/ClickHouse/ClickHouse/pull/41145. [#43760](https://github.com/ClickHouse/ClickHouse/pull/43760) ([Sema Checherinda](https://github.com/CheSema)). +* Merging on initiator now uses the same memory bound approach as merging of local aggregation results if `enable_memory_bound_merging_of_aggregation_results` is set. [#40879](https://github.com/ClickHouse/ClickHouse/pull/40879) ([Nikita Taranov](https://github.com/nickitat)). +* Keeper improvement: try syncing logs to disk in parallel with replication. [#43450](https://github.com/ClickHouse/ClickHouse/pull/43450) ([Antonio Andelic](https://github.com/antonio2368)). +* Keeper improvement: requests are batched more often. The batching can be controlled with the new setting `max_requests_quick_batch_size`. [#43686](https://github.com/ClickHouse/ClickHouse/pull/43686) ([Antonio Andelic](https://github.com/antonio2368)). + +#### Improvement +* Implement referential dependencies and use them to create tables in the correct order while restoring from a backup. [#43834](https://github.com/ClickHouse/ClickHouse/pull/43834) ([Vitaly Baranov](https://github.com/vitlibar)). +* Substitute UDFs in `CREATE` query to avoid failures during loading at startup. Additionally, UDFs can now be used as `DEFAULT` expressions for columns. [#43539](https://github.com/ClickHouse/ClickHouse/pull/43539) ([Antonio Andelic](https://github.com/antonio2368)). +* Change how the following queries delete parts: TRUNCATE TABLE, ALTER TABLE DROP PART, ALTER TABLE DROP PARTITION. Now, these queries make empty parts which cover the old parts. This makes the TRUNCATE query work without a followedexclusive lock which means concurrent reads aren't locked. Also achieved durability in all those queries. If the request succeeds, then no resurrected parts appear later. Note that atomicity is achieved only with transaction scope. [#41145](https://github.com/ClickHouse/ClickHouse/pull/41145) ([Sema Checherinda](https://github.com/CheSema)). +* `SET param_x` query no longer requires manual string serialization for the value of the parameter. For example, query `SET param_a = '[\'a\', \'b\']'` can now be written like `SET param_a = ['a', 'b']`. [#41874](https://github.com/ClickHouse/ClickHouse/pull/41874) ([Nikolay Degterinsky](https://github.com/evillique)). +* Show read rows in the progress indication while reading from STDIN from client. Closes [#43423](https://github.com/ClickHouse/ClickHouse/issues/43423). [#43442](https://github.com/ClickHouse/ClickHouse/pull/43442) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Show progress bar while reading from s3 table function / engine. [#43454](https://github.com/ClickHouse/ClickHouse/pull/43454) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Progress bar will show both read and written rows. [#43496](https://github.com/ClickHouse/ClickHouse/pull/43496) ([Ilya Yatsishin](https://github.com/qoega)). +* `filesystemAvailable` and related functions support one optional argument with disk name, and change `filesystemFree` to `filesystemUnreserved`. Closes [#35076](https://github.com/ClickHouse/ClickHouse/issues/35076). [#42064](https://github.com/ClickHouse/ClickHouse/pull/42064) ([flynn](https://github.com/ucasfl)). +* Integration with LDAP: increased the default value of search_limit to 256, and added LDAP server config option to change that to an arbitrary value. Closes: [#42276](https://github.com/ClickHouse/ClickHouse/issues/42276). [#42461](https://github.com/ClickHouse/ClickHouse/pull/42461) ([Vasily Nemkov](https://github.com/Enmk)). +* Allow the removal of sensitive information (see the `query_masking_rules` in the configuration file) from the exception messages as well. Resolves [#41418](https://github.com/ClickHouse/ClickHouse/issues/41418). [#42940](https://github.com/ClickHouse/ClickHouse/pull/42940) ([filimonov](https://github.com/filimonov)). +* Support queries like `SHOW FULL TABLES ...` for MySQL compatibility. [#43910](https://github.com/ClickHouse/ClickHouse/pull/43910) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Keeper improvement: Add 4lw command `rqld` which can manually assign a node as leader. [#43026](https://github.com/ClickHouse/ClickHouse/pull/43026) ([JackyWoo](https://github.com/JackyWoo)). +* Apply connection timeout settings for Distributed async INSERT from the query. [#43156](https://github.com/ClickHouse/ClickHouse/pull/43156) ([Azat Khuzhin](https://github.com/azat)). +* The `unhex` function now supports `FixedString` arguments. [issue42369](https://github.com/ClickHouse/ClickHouse/issues/42369). [#43207](https://github.com/ClickHouse/ClickHouse/pull/43207) ([DR](https://github.com/freedomDR)). +* Priority is given to deleting completely expired parts according to the TTL rules, see [#42869](https://github.com/ClickHouse/ClickHouse/issues/42869). [#43222](https://github.com/ClickHouse/ClickHouse/pull/43222) ([zhongyuankai](https://github.com/zhongyuankai)). +* More precise and reactive CPU load indication in clickhouse-client. [#43307](https://github.com/ClickHouse/ClickHouse/pull/43307) ([Sergei Trifonov](https://github.com/serxa)). +* Support reading of subcolumns of nested types from storage `S3` and table function `s3` with formats `Parquet`, `Arrow` and `ORC`. [#43329](https://github.com/ClickHouse/ClickHouse/pull/43329) ([chen](https://github.com/xiedeyantu)). +* Add `table_uuid` column to the `system.parts` table. [#43404](https://github.com/ClickHouse/ClickHouse/pull/43404) ([Azat Khuzhin](https://github.com/azat)). +* Added client option to display the number of locally processed rows in non-interactive mode (`--print-num-processed-rows`). [#43407](https://github.com/ClickHouse/ClickHouse/pull/43407) ([jh0x](https://github.com/jh0x)). +* Implement `aggregation-in-order` optimization on top of a query plan. It is enabled by default (but works only together with `optimize_aggregation_in_order`, which is disabled by default). Set `query_plan_aggregation_in_order = 0` to use the previous AST-based version. [#43592](https://github.com/ClickHouse/ClickHouse/pull/43592) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Allow to collect profile events with `trace_type = 'ProfileEvent'` to `system.trace_log` on each increment with current stack, profile event name and value of the increment. It can be enabled by the setting `trace_profile_events` and used to investigate performance of queries. [#43639](https://github.com/ClickHouse/ClickHouse/pull/43639) ([Anton Popov](https://github.com/CurtizJ)). +* Add a new setting `input_format_max_binary_string_size` to limit string size in RowBinary format. [#43842](https://github.com/ClickHouse/ClickHouse/pull/43842) ([Kruglov Pavel](https://github.com/Avogar)). +* When ClickHouse requests a remote HTTP server, and it returns an error, the numeric HTTP code was not displayed correctly in the exception message. Closes [#43919](https://github.com/ClickHouse/ClickHouse/issues/43919). [#43920](https://github.com/ClickHouse/ClickHouse/pull/43920) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Correctly report errors in queries even when multiple JOINs optimization is taking place. [#43583](https://github.com/ClickHouse/ClickHouse/pull/43583) ([Salvatore](https://github.com/tbsal)). + +#### Build/Testing/Packaging Improvement + +* Systemd integration now correctly notifies systemd that the service is really started and is ready to serve requests. [#43400](https://github.com/ClickHouse/ClickHouse/pull/43400) ([Коренберг Марк](https://github.com/socketpair)). +* Added the option to build ClickHouse with OpenSSL using the [OpenSSL FIPS Module](https://www.openssl.org/docs/man3.0/man7/fips_module.html). This build type has not been tested to validate security and is not supported. [#43991](https://github.com/ClickHouse/ClickHouse/pull/43991) ([Boris Kuschel](https://github.com/bkuschel)). +* Upgrade to the new `DeflateQpl` compression codec which has been implemented in a previous PR (details: https://github.com/ClickHouse/ClickHouse/pull/39494). This patch improves codec on below aspects: 1. QPL v0.2.0 to QPL v0.3.0 [Intel® Query Processing Library (QPL)](https://github.com/intel/qpl) 2. Improve CMake file for fixing QPL build issues for QPL v0.3.0. 3. Link the QPL library with libaccel-config at build time instead of runtime loading on QPL v0.2.0 (dlopen) 4. Fixed log print issue in CompressionCodecDeflateQpl.cpp. [#44024](https://github.com/ClickHouse/ClickHouse/pull/44024) ([jasperzhu](https://github.com/jinjunzh)). + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Fixed bug which could lead to deadlock while using asynchronous inserts. [#43233](https://github.com/ClickHouse/ClickHouse/pull/43233) ([Anton Popov](https://github.com/CurtizJ)). +* Fix some incorrect logic in AST level optimization `optimize_normalize_count_variants`. [#43873](https://github.com/ClickHouse/ClickHouse/pull/43873) ([Duc Canh Le](https://github.com/canhld94)). +* Fix a case when mutations are not making progress when checksums do not match between replicas (e.g. caused by a change in data format on an upgrade). [#36877](https://github.com/ClickHouse/ClickHouse/pull/36877) ([nvartolomei](https://github.com/nvartolomei)). +* Fix the `skip_unavailable_shards` optimization which did not work with the `hdfsCluster` table function. [#43236](https://github.com/ClickHouse/ClickHouse/pull/43236) ([chen](https://github.com/xiedeyantu)). +* Fix `s3` support for the `?` wildcard. Closes [#42731](https://github.com/ClickHouse/ClickHouse/issues/42731). [#43253](https://github.com/ClickHouse/ClickHouse/pull/43253) ([chen](https://github.com/xiedeyantu)). +* Fix functions `arrayFirstOrNull` and `arrayLastOrNull` or null when the array contains `Nullable` elements. [#43274](https://github.com/ClickHouse/ClickHouse/pull/43274) ([Duc Canh Le](https://github.com/canhld94)). +* Fix incorrect `UserTimeMicroseconds`/`SystemTimeMicroseconds` accounting related to Kafka tables. [#42791](https://github.com/ClickHouse/ClickHouse/pull/42791) ([Azat Khuzhin](https://github.com/azat)). +* Do not suppress exceptions in `web` disks. Fix retries for the `web` disk. [#42800](https://github.com/ClickHouse/ClickHouse/pull/42800) ([Azat Khuzhin](https://github.com/azat)). +* Fixed (logical) race condition between inserts and dropping materialized views. A race condition happened when a Materialized View was dropped at the same time as an INSERT, where the MVs were present as a dependency of the insert at the begining of the execution, but the table has been dropped by the time the insert chain tries to access it, producing either an `UNKNOWN_TABLE` or `TABLE_IS_DROPPED` exception, and stopping the insertion. After this change, we avoid these exceptions and just continue with the insert if the dependency is gone. [#43161](https://github.com/ClickHouse/ClickHouse/pull/43161) ([AlfVII](https://github.com/AlfVII)). +* Fix undefined behavior in the `quantiles` function, which might lead to uninitialized memory. Found by fuzzer. This closes [#44066](https://github.com/ClickHouse/ClickHouse/issues/44066). [#44067](https://github.com/ClickHouse/ClickHouse/pull/44067) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Additional check on zero uncompressed size is added to `CompressionCodecDelta`. [#43255](https://github.com/ClickHouse/ClickHouse/pull/43255) ([Nikita Taranov](https://github.com/nickitat)). +* Flatten arrays from Parquet to avoid an issue with inconsistent data in arrays. These incorrect files can be generated by Apache Iceberg. [#43297](https://github.com/ClickHouse/ClickHouse/pull/43297) ([Arthur Passos](https://github.com/arthurpassos)). +* Fix bad cast from `LowCardinality` column when using short circuit function execution. [#43311](https://github.com/ClickHouse/ClickHouse/pull/43311) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixed queries with `SAMPLE BY` with prewhere optimization on tables using `Merge` engine. [#43315](https://github.com/ClickHouse/ClickHouse/pull/43315) ([Antonio Andelic](https://github.com/antonio2368)). +* Check and compare the content of the `format_version` file in `MergeTreeData` so that tables can be loaded even if the storage policy was changed. [#43328](https://github.com/ClickHouse/ClickHouse/pull/43328) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix possible (very unlikely) "No column to rollback" logical error during INSERT into `Buffer` tables. [#43336](https://github.com/ClickHouse/ClickHouse/pull/43336) ([Azat Khuzhin](https://github.com/azat)). +* Fix a bug that allowed the parser to parse an unlimited amount of round brackets into one function if `allow_function_parameters` is set. [#43350](https://github.com/ClickHouse/ClickHouse/pull/43350) ([Nikolay Degterinsky](https://github.com/evillique)). +* `MaterializeMySQL` (experimental feature) support DDL: `drop table t1, t2` and compatible with most of MySQL DROP DDL. [#43366](https://github.com/ClickHouse/ClickHouse/pull/43366) ([zzsmdfj](https://github.com/zzsmdfj)). +* `session_log` (experimental feature): Fixed the inability to log in (because of failure to create the session_log entry) in a very rare case of messed up setting profiles. [#42641](https://github.com/ClickHouse/ClickHouse/pull/42641) ([Vasily Nemkov](https://github.com/Enmk)). +* Fix possible `Cannot create non-empty column with type Nothing` in functions `if`/`multiIf`. Closes [#43356](https://github.com/ClickHouse/ClickHouse/issues/43356). [#43368](https://github.com/ClickHouse/ClickHouse/pull/43368) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix a bug when a row level filter uses the default value of a column. [#43387](https://github.com/ClickHouse/ClickHouse/pull/43387) ([Alexander Gololobov](https://github.com/davenger)). +* Query with `DISTINCT` + `LIMIT BY` + `LIMIT` can return fewer rows than expected. Fixes [#43377](https://github.com/ClickHouse/ClickHouse/issues/43377). [#43410](https://github.com/ClickHouse/ClickHouse/pull/43410) ([Igor Nikonov](https://github.com/devcrafter)). +* Fix `sumMap` for `Nullable(Decimal(...))`. [#43414](https://github.com/ClickHouse/ClickHouse/pull/43414) ([Azat Khuzhin](https://github.com/azat)). +* Fix `date_diff` for hour/minute on macOS. Close [#42742](https://github.com/ClickHouse/ClickHouse/issues/42742). [#43466](https://github.com/ClickHouse/ClickHouse/pull/43466) ([zzsmdfj](https://github.com/zzsmdfj)). +* Fix incorrect memory accounting because of merges/mutations. [#43516](https://github.com/ClickHouse/ClickHouse/pull/43516) ([Azat Khuzhin](https://github.com/azat)). +* Fixed primary key analysis with conditions involving `toString(enum)`. [#43596](https://github.com/ClickHouse/ClickHouse/pull/43596) ([Nikita Taranov](https://github.com/nickitat)). This error has been found by @tisonkun. +* Ensure consistency when `clickhouse-copier` updates status and `attach_is_done` in Keeper after partition attach is done. [#43602](https://github.com/ClickHouse/ClickHouse/pull/43602) ([lzydmxy](https://github.com/lzydmxy)). +* During the recovery of a lost replica of a `Replicated` database (experimental feature), there could a situation where we need to atomically swap two table names (use EXCHANGE). Previously we tried to use two RENAME queries, which was obviously failing and moreover, failed the whole recovery process of the database replica. [#43628](https://github.com/ClickHouse/ClickHouse/pull/43628) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix the case when the `s3Cluster` function throws `NOT_FOUND_COLUMN_IN_BLOCK` error. Closes [#43534](https://github.com/ClickHouse/ClickHouse/issues/43534). [#43629](https://github.com/ClickHouse/ClickHouse/pull/43629) ([chen](https://github.com/xiedeyantu)). +* Fix possible logical error `Array sizes mismatched` while parsing JSON object with arrays with same key names but with different nesting level. Closes [#43569](https://github.com/ClickHouse/ClickHouse/issues/43569). [#43693](https://github.com/ClickHouse/ClickHouse/pull/43693) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixed possible exception in the case of distributed `GROUP BY` with an `ALIAS` column among aggregation keys. [#43709](https://github.com/ClickHouse/ClickHouse/pull/43709) ([Nikita Taranov](https://github.com/nickitat)). +* Fix bug which can lead to broken projections if zero-copy replication (experimental feature) is enabled and used. [#43764](https://github.com/ClickHouse/ClickHouse/pull/43764) ([alesapin](https://github.com/alesapin)). +* Fix using multipart upload for very large S3 objects in AWS S3. [#43824](https://github.com/ClickHouse/ClickHouse/pull/43824) ([ianton-ru](https://github.com/ianton-ru)). +* Fixed `ALTER ... RESET SETTING` with `ON CLUSTER`. It could have been applied to one replica only. Fixes [#43843](https://github.com/ClickHouse/ClickHouse/issues/43843). [#43848](https://github.com/ClickHouse/ClickHouse/pull/43848) ([Elena Torró](https://github.com/elenatorro)). +* Fix a logical error in JOIN with `Join` table engine at right hand side, if `USING` is being used. [#43963](https://github.com/ClickHouse/ClickHouse/pull/43963) ([Vladimir C](https://github.com/vdimir)). Fix a bug with wrong order of keys in `Join` table engine. [#44012](https://github.com/ClickHouse/ClickHouse/pull/44012) ([Vladimir C](https://github.com/vdimir)). +* Keeper fix: throw if the interserver port for Raft is already in use. [#43984](https://github.com/ClickHouse/ClickHouse/pull/43984) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix ORDER BY positional argument (example: `ORDER BY 1, 2`) in case of unneeded columns pruning from subqueries. Closes [#43964](https://github.com/ClickHouse/ClickHouse/issues/43964). [#43987](https://github.com/ClickHouse/ClickHouse/pull/43987) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fixed exception when a subquery contains HAVING but doesn't contain an actual aggregation. [#44051](https://github.com/ClickHouse/ClickHouse/pull/44051) ([Nikita Taranov](https://github.com/nickitat)). +* Fix race in s3 multipart upload. This race could cause the error `Part number must be an integer between 1 and 10000, inclusive. (S3_ERROR)` while restoring from a backup. [#44065](https://github.com/ClickHouse/ClickHouse/pull/44065) ([Vitaly Baranov](https://github.com/vitlibar)). + +### ClickHouse release 22.11, 2022-11-17 + +#### Backward Incompatible Change +* `JSONExtract` family of functions will now attempt to coerce to the requested type. [#41502](https://github.com/ClickHouse/ClickHouse/pull/41502) ([Márcio Martins](https://github.com/marcioapm)). + +#### New Feature +* Adds support for retries during INSERTs into ReplicatedMergeTree when a session with ClickHouse Keeper is lost. Apart from fault tolerance, it aims to provide better user experience, - avoid returning a user an error during insert if keeper is restarted (for example, due to upgrade). [#42607](https://github.com/ClickHouse/ClickHouse/pull/42607) ([Igor Nikonov](https://github.com/devcrafter)). +* Add `Hudi` and `DeltaLake` table engines, read-only, only for tables on S3. [#41054](https://github.com/ClickHouse/ClickHouse/pull/41054) ([Daniil Rubin](https://github.com/rubin-do), [Kseniia Sumarokova](https://github.com/kssenii)). +* Add table function `hudi` and `deltaLake`. [#43080](https://github.com/ClickHouse/ClickHouse/pull/43080) ([flynn](https://github.com/ucasfl)). +* Support for composite time intervals. 1. Add, subtract and negate operations are now available on Intervals. In the case where the types of Intervals are different, they will be transformed into the Tuple of those types. 2. A tuple of intervals can be added to or subtracted from a Date/DateTime field. 3. Added parsing of Intervals with different types, for example: `INTERVAL '1 HOUR 1 MINUTE 1 SECOND'`. [#42195](https://github.com/ClickHouse/ClickHouse/pull/42195) ([Nikolay Degterinsky](https://github.com/evillique)). +* Added `**` glob support for recursive directory traversal of the filesystem and S3. Resolves [#36316](https://github.com/ClickHouse/ClickHouse/issues/36316). [#42376](https://github.com/ClickHouse/ClickHouse/pull/42376) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Introduce `s3_plain` disk type for write-once-read-many operations. Implement `ATTACH` of `MergeTree` table for `s3_plain` disk. [#42628](https://github.com/ClickHouse/ClickHouse/pull/42628) ([Azat Khuzhin](https://github.com/azat)). +* Added applied row-level policies to `system.query_log`. [#39819](https://github.com/ClickHouse/ClickHouse/pull/39819) ([Vladimir Chebotaryov](https://github.com/quickhouse)). +* Add four-letter command `csnp` for manually creating snapshots in ClickHouse Keeper. Additionally, `lgif` was added to get Raft information for a specific node (e.g. index of last created snapshot, last committed log index). [#41766](https://github.com/ClickHouse/ClickHouse/pull/41766) ([JackyWoo](https://github.com/JackyWoo)). +* Add function `ascii` like in Apache Spark: https://spark.apache.org/docs/latest/api/sql/#ascii. [#42670](https://github.com/ClickHouse/ClickHouse/pull/42670) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Add function `pmod` which returns non-negative result based on modulo. [#42755](https://github.com/ClickHouse/ClickHouse/pull/42755) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Add function `formatReadableDecimalSize`. [#42774](https://github.com/ClickHouse/ClickHouse/pull/42774) ([Alejandro](https://github.com/alexon1234)). +* Add function `randCanonical`, which is similar to the `rand` function in Apache Spark or Impala. The function generates pseudo random results with independent and identically distributed uniformly distributed values in [0, 1). [#43124](https://github.com/ClickHouse/ClickHouse/pull/43124) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Add function `displayName`, closes [#36770](https://github.com/ClickHouse/ClickHouse/issues/36770). [#37681](https://github.com/ClickHouse/ClickHouse/pull/37681) ([hongbin](https://github.com/xlwh)). +* Add `min_age_to_force_merge_on_partition_only` setting to optimize old parts for the entire partition only. [#42659](https://github.com/ClickHouse/ClickHouse/pull/42659) ([Antonio Andelic](https://github.com/antonio2368)). +* Add generic implementation for arbitrary structured named collections, access type and `system.named_collections`. [#43147](https://github.com/ClickHouse/ClickHouse/pull/43147) ([Kseniia Sumarokova](https://github.com/kssenii)). + +#### Performance Improvement +* `match` function can use the index if it's a condition on string prefix. This closes [#37333](https://github.com/ClickHouse/ClickHouse/issues/37333). [#42458](https://github.com/ClickHouse/ClickHouse/pull/42458) ([clarkcaoliu](https://github.com/Clark0)). +* Speed up AND and OR operators when they are sequenced. [#42214](https://github.com/ClickHouse/ClickHouse/pull/42214) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Support parallel parsing for `LineAsString` input format. This improves performance just slightly. This closes [#42502](https://github.com/ClickHouse/ClickHouse/issues/42502). [#42780](https://github.com/ClickHouse/ClickHouse/pull/42780) ([Kruglov Pavel](https://github.com/Avogar)). +* ClickHouse Keeper performance improvement: improve commit performance for cases when many different nodes have uncommitted states. This should help with cases when a follower node can't sync fast enough. [#42926](https://github.com/ClickHouse/ClickHouse/pull/42926) ([Antonio Andelic](https://github.com/antonio2368)). +* A condition like `NOT LIKE 'prefix%'` can use the primary index. [#42209](https://github.com/ClickHouse/ClickHouse/pull/42209) ([Duc Canh Le](https://github.com/canhld94)). + +#### Experimental Feature +* Support type `Object` inside other types, e.g. `Array(JSON)`. [#36969](https://github.com/ClickHouse/ClickHouse/pull/36969) ([Anton Popov](https://github.com/CurtizJ)). +* Ignore MySQL binlog SAVEPOINT event for MaterializedMySQL. [#42931](https://github.com/ClickHouse/ClickHouse/pull/42931) ([zzsmdfj](https://github.com/zzsmdfj)). Handle (ignore) SAVEPOINT queries in MaterializedMySQL. [#43086](https://github.com/ClickHouse/ClickHouse/pull/43086) ([Stig Bakken](https://github.com/stigsb)). + +#### Improvement +* Trivial queries with small LIMIT will properly determine the number of estimated rows to read, so that the threshold will be checked properly. Closes [#7071](https://github.com/ClickHouse/ClickHouse/issues/7071). [#42580](https://github.com/ClickHouse/ClickHouse/pull/42580) ([Han Fei](https://github.com/hanfei1991)). +* Add support for interactive parameters in INSERT VALUES queries. [#43077](https://github.com/ClickHouse/ClickHouse/pull/43077) ([Nikolay Degterinsky](https://github.com/evillique)). +* Added new field `allow_readonly` in `system.table_functions` to allow using table functions in readonly mode. Resolves [#42414](https://github.com/ClickHouse/ClickHouse/issues/42414) Implementation: * Added a new field allow_readonly to table system.table_functions. * Updated to use new field allow_readonly to allow using table functions in readonly mode. Testing: * Added a test for filesystem tests/queries/0_stateless/02473_functions_in_readonly_mode.sh Documentation: * Updated the english documentation for Table Functions. [#42708](https://github.com/ClickHouse/ClickHouse/pull/42708) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* The `system.asynchronous_metrics` gets embedded documentation. This documentation is also exported to Prometheus. Fixed an error with the metrics about `cache` disks - they were calculated only for one arbitrary cache disk instead all of them. This closes [#7644](https://github.com/ClickHouse/ClickHouse/issues/7644). [#43194](https://github.com/ClickHouse/ClickHouse/pull/43194) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Throttling algorithm changed to token bucket. [#42665](https://github.com/ClickHouse/ClickHouse/pull/42665) ([Sergei Trifonov](https://github.com/serxa)). +* Mask passwords and secret keys both in `system.query_log` and `/var/log/clickhouse-server/*.log` and also in error messages. [#42484](https://github.com/ClickHouse/ClickHouse/pull/42484) ([Vitaly Baranov](https://github.com/vitlibar)). +* Remove covered parts for fetched part (to avoid possible replication delay grows). [#39737](https://github.com/ClickHouse/ClickHouse/pull/39737) ([Azat Khuzhin](https://github.com/azat)). +* If `/dev/tty` is available, the progress in clickhouse-client and clickhouse-local will be rendered directly to the terminal, without writing to STDERR. It allows getting progress even if STDERR is redirected to a file, and the file will not be polluted by terminal escape sequences. The progress can be disabled by `--progress false`. This closes [#32238](https://github.com/ClickHouse/ClickHouse/issues/32238). [#42003](https://github.com/ClickHouse/ClickHouse/pull/42003) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add support for `FixedString` input to base64 coding functions. [#42285](https://github.com/ClickHouse/ClickHouse/pull/42285) ([ltrk2](https://github.com/ltrk2)). +* Add columns `bytes_on_disk` and `path` to `system.detached_parts`. Closes [#42264](https://github.com/ClickHouse/ClickHouse/issues/42264). [#42303](https://github.com/ClickHouse/ClickHouse/pull/42303) ([chen](https://github.com/xiedeyantu)). +* Improve using structure from insertion table in table functions, now setting `use_structure_from_insertion_table_in_table_functions` has new possible value - `2` that means that ClickHouse will try to determine if we can use structure from insertion table or not automatically. Closes [#40028](https://github.com/ClickHouse/ClickHouse/issues/40028). [#42320](https://github.com/ClickHouse/ClickHouse/pull/42320) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix no progress indication on INSERT FROM INFILE. Closes [#42548](https://github.com/ClickHouse/ClickHouse/issues/42548). [#42634](https://github.com/ClickHouse/ClickHouse/pull/42634) ([chen](https://github.com/xiedeyantu)). +* Refactor function `tokens` to enable max tokens returned for related functions (disabled by default). [#42673](https://github.com/ClickHouse/ClickHouse/pull/42673) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Allow to use `Date32` arguments for `formatDateTime` and `FROM_UNIXTIME` functions. [#42737](https://github.com/ClickHouse/ClickHouse/pull/42737) ([Roman Vasin](https://github.com/rvasin)). +* Update tzdata to 2022f. Mexico will no longer observe DST except near the US border: https://www.timeanddate.com/news/time/mexico-abolishes-dst-2022.html. Chihuahua moves to year-round UTC-6 on 2022-10-30. Fiji no longer observes DST. See https://github.com/google/cctz/pull/235 and https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1995209. [#42796](https://github.com/ClickHouse/ClickHouse/pull/42796) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add `FailedAsyncInsertQuery` event metric for async inserts. [#42814](https://github.com/ClickHouse/ClickHouse/pull/42814) ([Krzysztof Góralski](https://github.com/kgoralski)). +* Implement `read-in-order` optimization on top of query plan. It is enabled by default. Set `query_plan_read_in_order = 0` to use previous AST-based version. [#42829](https://github.com/ClickHouse/ClickHouse/pull/42829) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Increase the size of upload part exponentially for backup to S3 to avoid errors about max 10 000 parts limit of the multipart upload to s3. [#42833](https://github.com/ClickHouse/ClickHouse/pull/42833) ([Vitaly Baranov](https://github.com/vitlibar)). +* When the merge task is continuously busy and the disk space is insufficient, the completely expired parts cannot be selected and dropped, resulting in insufficient disk space. My idea is that when the entire Part expires, there is no need for additional disk space to guarantee, ensure the normal execution of TTL. [#42869](https://github.com/ClickHouse/ClickHouse/pull/42869) ([zhongyuankai](https://github.com/zhongyuankai)). +* Add `oss` function and `OSS` table engine (this is convenient for users). oss is fully compatible with s3. [#43155](https://github.com/ClickHouse/ClickHouse/pull/43155) ([zzsmdfj](https://github.com/zzsmdfj)). +* Improve error reporting in the collection of OS-related info for the `system.asynchronous_metrics` table. [#43192](https://github.com/ClickHouse/ClickHouse/pull/43192) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Modify the `INFORMATION_SCHEMA` tables in a way so that ClickHouse can connect to itself using the MySQL compatibility protocol. Add columns instead of aliases (related to [#9769](https://github.com/ClickHouse/ClickHouse/issues/9769)). It will improve the compatibility with various MySQL clients. [#43198](https://github.com/ClickHouse/ClickHouse/pull/43198) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Add some functions for compatibility with PowerBI, when it connects using MySQL protocol [#42612](https://github.com/ClickHouse/ClickHouse/pull/42612) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Better usability for Dashboard on changes [#42872](https://github.com/ClickHouse/ClickHouse/pull/42872) ([Vladimir C](https://github.com/vdimir)). + +#### Build/Testing/Packaging Improvement +* Run SQLancer for each pull request and commit to master. [SQLancer](https://github.com/sqlancer/sqlancer) is an OpenSource fuzzer that focuses on automatic detection of logical bugs. [#42397](https://github.com/ClickHouse/ClickHouse/pull/42397) ([Ilya Yatsishin](https://github.com/qoega)). +* Update to latest zlib-ng. [#42463](https://github.com/ClickHouse/ClickHouse/pull/42463) ([Boris Kuschel](https://github.com/bkuschel)). +* Add support for testing ClickHouse server with Jepsen. By the way, we already have support for testing ClickHouse Keeper with Jepsen. This pull request extends it to Replicated tables. [#42619](https://github.com/ClickHouse/ClickHouse/pull/42619) ([Antonio Andelic](https://github.com/antonio2368)). +* Use https://github.com/matus-chochlik/ctcache for clang-tidy results caching. [#42913](https://github.com/ClickHouse/ClickHouse/pull/42913) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Before the fix, the user-defined config was preserved by RPM in `$file.rpmsave`. The PR fixes it and won't replace the user's files from packages. [#42936](https://github.com/ClickHouse/ClickHouse/pull/42936) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Remove some libraries from Ubuntu Docker image. [#42622](https://github.com/ClickHouse/ClickHouse/pull/42622) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Updated normaliser to clone the alias ast. Resolves [#42452](https://github.com/ClickHouse/ClickHouse/issues/42452) Implementation: * Updated QueryNormalizer to clone alias ast, when its replaced. Previously just assigning the same leads to exception in LogicalExpressinsOptimizer as it would be the same parent being inserted again. * This bug is not seen with new analyser (allow_experimental_analyzer), so no changes for it. I added a test for the same. [#42827](https://github.com/ClickHouse/ClickHouse/pull/42827) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fix race for backup of tables in `Lazy` databases. [#43104](https://github.com/ClickHouse/ClickHouse/pull/43104) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix for `skip_unavailable_shards`: it did not work with the `s3Cluster` table function. [#43131](https://github.com/ClickHouse/ClickHouse/pull/43131) ([chen](https://github.com/xiedeyantu)). +* Fix schema inference in `s3Cluster` and improvement in `hdfsCluster`. [#41979](https://github.com/ClickHouse/ClickHouse/pull/41979) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix retries while reading from URL table engines / table function. (retriable errors could be retries more times than needed, non-retriable errors resulted in failed assertion in code). [#42224](https://github.com/ClickHouse/ClickHouse/pull/42224) ([Kseniia Sumarokova](https://github.com/kssenii)). +* A segmentation fault related to DNS & c-ares has been reported and fixed. [#42234](https://github.com/ClickHouse/ClickHouse/pull/42234) ([Arthur Passos](https://github.com/arthurpassos)). +* Fix `LOGICAL_ERROR` `Arguments of 'plus' have incorrect data types` which may happen in PK analysis (monotonicity check). Fix invalid PK analysis for monotonic binary functions with first constant argument. [#42410](https://github.com/ClickHouse/ClickHouse/pull/42410) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix incorrect key analysis when key types cannot be inside Nullable. This fixes [#42456](https://github.com/ClickHouse/ClickHouse/issues/42456). [#42469](https://github.com/ClickHouse/ClickHouse/pull/42469) ([Amos Bird](https://github.com/amosbird)). +* Fix typo in a setting name that led to bad usage of schema inference cache while using setting `input_format_csv_use_best_effort_in_schema_inference`. Closes [#41735](https://github.com/ClickHouse/ClickHouse/issues/41735). [#42536](https://github.com/ClickHouse/ClickHouse/pull/42536) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix creating a Set with wrong header when data type is LowCardinality. Closes [#42460](https://github.com/ClickHouse/ClickHouse/issues/42460). [#42579](https://github.com/ClickHouse/ClickHouse/pull/42579) ([flynn](https://github.com/ucasfl)). +* `(U)Int128` and `(U)Int256` values were correctly checked in `PREWHERE`. [#42605](https://github.com/ClickHouse/ClickHouse/pull/42605) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix a bug in functions parser that could have led to a segmentation fault. [#42724](https://github.com/ClickHouse/ClickHouse/pull/42724) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix the locking in `truncate table`. [#42728](https://github.com/ClickHouse/ClickHouse/pull/42728) ([flynn](https://github.com/ucasfl)). +* Fix possible crash in `web` disks when file does not exist (or `OPTIMIZE TABLE FINAL`, that also can got the same error eventually). [#42767](https://github.com/ClickHouse/ClickHouse/pull/42767) ([Azat Khuzhin](https://github.com/azat)). +* Fix `auth_type` mapping in `system.session_log`, by including `SSL_CERTIFICATE` for the enum values. [#42782](https://github.com/ClickHouse/ClickHouse/pull/42782) ([Miel Donkers](https://github.com/mdonkers)). +* Fix stack-use-after-return under ASAN build in the Create User query parser. [#42804](https://github.com/ClickHouse/ClickHouse/pull/42804) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix `lowerUTF8`/`upperUTF8` in case of symbol was in between 16-byte boundary (very frequent case of you have strings > 16 bytes long). [#42812](https://github.com/ClickHouse/ClickHouse/pull/42812) ([Azat Khuzhin](https://github.com/azat)). +* Additional bound check was added to LZ4 decompression routine to fix misbehaviour in case of malformed input. [#42868](https://github.com/ClickHouse/ClickHouse/pull/42868) ([Nikita Taranov](https://github.com/nickitat)). +* Fix rare possible hang on query cancellation. [#42874](https://github.com/ClickHouse/ClickHouse/pull/42874) ([Azat Khuzhin](https://github.com/azat)). +* Fix incorrect behavior with multiple disjuncts in hash join, close [#42832](https://github.com/ClickHouse/ClickHouse/issues/42832). [#42876](https://github.com/ClickHouse/ClickHouse/pull/42876) ([Vladimir C](https://github.com/vdimir)). +* A null pointer will be generated when select if as from ‘three table join’ , For example, this SQL query: [#42883](https://github.com/ClickHouse/ClickHouse/pull/42883) ([zzsmdfj](https://github.com/zzsmdfj)). +* Fix memory sanitizer report in Cluster Discovery, close [#42763](https://github.com/ClickHouse/ClickHouse/issues/42763). [#42905](https://github.com/ClickHouse/ClickHouse/pull/42905) ([Vladimir C](https://github.com/vdimir)). +* Improve DateTime schema inference in case of empty string. [#42911](https://github.com/ClickHouse/ClickHouse/pull/42911) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix rare NOT_FOUND_COLUMN_IN_BLOCK error when projection is possible to use but there is no projection available. This fixes [#42771](https://github.com/ClickHouse/ClickHouse/issues/42771) . The bug was introduced in https://github.com/ClickHouse/ClickHouse/pull/25563. [#42938](https://github.com/ClickHouse/ClickHouse/pull/42938) ([Amos Bird](https://github.com/amosbird)). +* Fix ATTACH TABLE in `PostgreSQL` database engine if the table contains DATETIME data type. Closes [#42817](https://github.com/ClickHouse/ClickHouse/issues/42817). [#42960](https://github.com/ClickHouse/ClickHouse/pull/42960) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix lambda parsing. Closes [#41848](https://github.com/ClickHouse/ClickHouse/issues/41848). [#42979](https://github.com/ClickHouse/ClickHouse/pull/42979) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix incorrect key analysis when nullable keys appear in the middle of a hyperrectangle. This fixes [#43111](https://github.com/ClickHouse/ClickHouse/issues/43111) . [#43133](https://github.com/ClickHouse/ClickHouse/pull/43133) ([Amos Bird](https://github.com/amosbird)). +* Fix several buffer over-reads in deserialization of carefully crafted aggregate function states. [#43159](https://github.com/ClickHouse/ClickHouse/pull/43159) ([Raúl Marín](https://github.com/Algunenano)). +* Fix function `if` in case of NULL and const Nullable arguments. Closes [#43069](https://github.com/ClickHouse/ClickHouse/issues/43069). [#43178](https://github.com/ClickHouse/ClickHouse/pull/43178) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix decimal math overflow in parsing DateTime with the 'best effort' algorithm. Closes [#43061](https://github.com/ClickHouse/ClickHouse/issues/43061). [#43180](https://github.com/ClickHouse/ClickHouse/pull/43180) ([Kruglov Pavel](https://github.com/Avogar)). +* The `indent` field produced by the `git-import` tool was miscalculated. See https://clickhouse.com/docs/ja/getting-started/example-datasets/github/. [#43191](https://github.com/ClickHouse/ClickHouse/pull/43191) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fixed unexpected behaviour of `Interval` types with subquery and casting. [#43193](https://github.com/ClickHouse/ClickHouse/pull/43193) ([jh0x](https://github.com/jh0x)). + +### ClickHouse release 22.10, 2022-10-25 + +#### Backward Incompatible Change +* Rename cache commands: `show caches` -> `show filesystem caches`, `describe cache` -> `describe filesystem cache`. [#41508](https://github.com/ClickHouse/ClickHouse/pull/41508) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Remove support for the `WITH TIMEOUT` section for `LIVE VIEW`. This closes [#40557](https://github.com/ClickHouse/ClickHouse/issues/40557). [#42173](https://github.com/ClickHouse/ClickHouse/pull/42173) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Remove support for the `{database}` macro from the client's prompt. It was displayed incorrectly if the database was unspecified and it was not updated on `USE` statements. This closes [#25891](https://github.com/ClickHouse/ClickHouse/issues/25891). [#42508](https://github.com/ClickHouse/ClickHouse/pull/42508) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### New Feature +* Composable protocol configuration is added. Now different protocols can be set up with different listen hosts. Protocol wrappers such as PROXYv1 can be set up over any other protocols (TCP, TCP secure, MySQL, Postgres). [#41198](https://github.com/ClickHouse/ClickHouse/pull/41198) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Add `S3` as a new type of the destination of backups. Support BACKUP to S3 with as-is path/data structure. [#42333](https://github.com/ClickHouse/ClickHouse/pull/42333) ([Vitaly Baranov](https://github.com/vitlibar)), [#42232](https://github.com/ClickHouse/ClickHouse/pull/42232) ([Azat Khuzhin](https://github.com/azat)). +* Added functions (`randUniform`, `randNormal`, `randLogNormal`, `randExponential`, `randChiSquared`, `randStudentT`, `randFisherF`, `randBernoulli`, `randBinomial`, `randNegativeBinomial`, `randPoisson`) to generate random values according to the specified distributions. This closes [#21834](https://github.com/ClickHouse/ClickHouse/issues/21834). [#42411](https://github.com/ClickHouse/ClickHouse/pull/42411) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* An improvement for ClickHouse Keeper: add support for uploading snapshots to S3. S3 information can be defined inside `keeper_server.s3_snapshot`. [#41342](https://github.com/ClickHouse/ClickHouse/pull/41342) ([Antonio Andelic](https://github.com/antonio2368)). +* Added an aggregate function `analysisOfVariance` (`anova`) to perform a statistical test over several groups of normally distributed observations to find out whether all groups have the same mean or not. Original PR [#37872](https://github.com/ClickHouse/ClickHouse/issues/37872). [#42131](https://github.com/ClickHouse/ClickHouse/pull/42131) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Support limiting of temporary data stored on disk using settings `max_temporary_data_on_disk_size_for_user`/`max_temporary_data_on_disk_size_for_query` . [#40893](https://github.com/ClickHouse/ClickHouse/pull/40893) ([Vladimir C](https://github.com/vdimir)). +* Add setting `format_json_object_each_row_column_for_object_name` to write/parse object name as column value in JSONObjectEachRow format. [#41703](https://github.com/ClickHouse/ClickHouse/pull/41703) ([Kruglov Pavel](https://github.com/Avogar)). +* Add BLAKE3 hash-function to SQL. [#33435](https://github.com/ClickHouse/ClickHouse/pull/33435) ([BoloniniD](https://github.com/BoloniniD)). +* The function `javaHash` has been extended to integers. [#41131](https://github.com/ClickHouse/ClickHouse/pull/41131) ([JackyWoo](https://github.com/JackyWoo)). +* Add OpenTelemetry support to ON CLUSTER DDL (require `distributed_ddl_entry_format_version` to be set to 4). [#41484](https://github.com/ClickHouse/ClickHouse/pull/41484) ([Frank Chen](https://github.com/FrankChen021)). +* Added system table `asynchronous_insert_log`. It contains information about asynchronous inserts (including results of queries in fire-and-forget mode (with `wait_for_async_insert=0`)) for better introspection. [#42040](https://github.com/ClickHouse/ClickHouse/pull/42040) ([Anton Popov](https://github.com/CurtizJ)). +* Add support for methods `lz4`, `bz2`, `snappy` in HTTP's `Accept-Encoding` which is a non-standard extension to HTTP protocol. [#42071](https://github.com/ClickHouse/ClickHouse/pull/42071) ([Nikolay Degterinsky](https://github.com/evillique)). +* Adds Morton Coding (ZCurve) encode/decode functions. [#41753](https://github.com/ClickHouse/ClickHouse/pull/41753) ([Constantine Peresypkin](https://github.com/pkit)). +* Add support for `SET setting_name = DEFAULT`. [#42187](https://github.com/ClickHouse/ClickHouse/pull/42187) ([Filatenkov Artur](https://github.com/FArthur-cmd)). + +#### Experimental Feature +* Added new infrastructure for query analysis and planning under the `allow_experimental_analyzer` setting. [#31796](https://github.com/ClickHouse/ClickHouse/pull/31796) ([Maksim Kita](https://github.com/kitaisreal)). +* Initial implementation of Kusto Query Language. Please don't use it. [#37961](https://github.com/ClickHouse/ClickHouse/pull/37961) ([Yong Wang](https://github.com/kashwy)). + +#### Performance Improvement +* Relax the "Too many parts" threshold. This closes [#6551](https://github.com/ClickHouse/ClickHouse/issues/6551). Now ClickHouse will allow more parts in a partition if the average part size is large enough (at least 10 GiB). This allows to have up to petabytes of data in a single partition of a single table on a single server, which is possible using disk shelves or object storage. [#42002](https://github.com/ClickHouse/ClickHouse/pull/42002) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Implement operator precedence element parser to make the required stack size smaller. [#34892](https://github.com/ClickHouse/ClickHouse/pull/34892) ([Nikolay Degterinsky](https://github.com/evillique)). +* DISTINCT in order optimization leverage sorting properties of data streams. This improvement will enable reading in order for DISTINCT if applicable (before it was necessary to provide ORDER BY for columns in DISTINCT). [#41014](https://github.com/ClickHouse/ClickHouse/pull/41014) ([Igor Nikonov](https://github.com/devcrafter)). +* ColumnVector: optimize UInt8 index with AVX512VBMI. [#41247](https://github.com/ClickHouse/ClickHouse/pull/41247) ([Guo Wangyang](https://github.com/guowangy)). +* Optimize the lock contentions for `ThreadGroupStatus::mutex`. The performance experiments of **SSB** (Star Schema Benchmark) on the ICX device (Intel Xeon Platinum 8380 CPU, 80 cores, 160 threads) shows that this change could bring a **2.95x** improvement of the geomean of all subcases' QPS. [#41675](https://github.com/ClickHouse/ClickHouse/pull/41675) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Add `ldapr` capabilities to AArch64 builds. This is supported from Graviton 2+, Azure and GCP instances. Only appeared in clang-15 [not so long ago](https://github.com/llvm/llvm-project/commit/9609b5daffe9fd28d83d83da895abc5113f76c24). [#41778](https://github.com/ClickHouse/ClickHouse/pull/41778) ([Daniel Kutenin](https://github.com/danlark1)). +* Improve performance when comparing strings and one argument is an empty constant string. [#41870](https://github.com/ClickHouse/ClickHouse/pull/41870) ([Jiebin Sun](https://github.com/jiebinn)). +* Optimize `insertFrom` of ColumnAggregateFunction to share Aggregate State in some cases. [#41960](https://github.com/ClickHouse/ClickHouse/pull/41960) ([flynn](https://github.com/ucasfl)). +* Make writing to `azure_blob_storage` disks faster (respect `max_single_part_upload_size` instead of writing a block per each buffer size). Inefficiency mentioned in [#41754](https://github.com/ClickHouse/ClickHouse/issues/41754). [#42041](https://github.com/ClickHouse/ClickHouse/pull/42041) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Make thread ids in the process list and query_log unique to avoid waste. [#42180](https://github.com/ClickHouse/ClickHouse/pull/42180) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Support skipping cache completely (both download to cache and reading cached data) in case the requested read range exceeds the threshold defined by cache setting `bypass_cache_threashold`, requires to be enabled with `enable_bypass_cache_with_threshold`). [#42418](https://github.com/ClickHouse/ClickHouse/pull/42418) ([Han Shukai](https://github.com/KinderRiven)). This helps on slow local disks. + +#### Improvement +* Add setting `allow_implicit_no_password`: in combination with `allow_no_password` it forbids creating a user with no password unless `IDENTIFIED WITH no_password` is explicitly specified. [#41341](https://github.com/ClickHouse/ClickHouse/pull/41341) ([Nikolay Degterinsky](https://github.com/evillique)). +* Embedded Keeper will always start in the background allowing ClickHouse to start without achieving quorum. [#40991](https://github.com/ClickHouse/ClickHouse/pull/40991) ([Antonio Andelic](https://github.com/antonio2368)). +* Made reestablishing a new connection to ZooKeeper more reactive in case of expiration of the previous one. Previously there was a task which spawns every minute by default and thus a table could be in readonly state for about this time. [#41092](https://github.com/ClickHouse/ClickHouse/pull/41092) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Now projections can be used with zero copy replication (zero-copy replication is a non-production feature). [#41147](https://github.com/ClickHouse/ClickHouse/pull/41147) ([alesapin](https://github.com/alesapin)). +* Support expression `(EXPLAIN SELECT ...)` in a subquery. Queries like `SELECT * FROM (EXPLAIN PIPELINE SELECT col FROM TABLE ORDER BY col)` became valid. [#40630](https://github.com/ClickHouse/ClickHouse/pull/40630) ([Vladimir C](https://github.com/vdimir)). +* Allow changing `async_insert_max_data_size` or `async_insert_busy_timeout_ms` in scope of query. E.g. user wants to insert data rarely and she doesn't have access to the server config to tune default settings. [#40668](https://github.com/ClickHouse/ClickHouse/pull/40668) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Improvements for reading from remote filesystems, made threadpool size for reads/writes configurable. Closes [#41070](https://github.com/ClickHouse/ClickHouse/issues/41070). [#41011](https://github.com/ClickHouse/ClickHouse/pull/41011) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support all combinators combination in WindowTransform/arratReduce*/initializeAggregation/aggregate functions versioning. Previously combinators like `ForEach/Resample/Map` didn't work in these places, using them led to exception like`State function ... inserts results into non-state column`. [#41107](https://github.com/ClickHouse/ClickHouse/pull/41107) ([Kruglov Pavel](https://github.com/Avogar)). +* Add function `tryDecrypt` that returns NULL when decrypt fails (e.g. decrypt with incorrect key) instead of throwing an exception. [#41206](https://github.com/ClickHouse/ClickHouse/pull/41206) ([Duc Canh Le](https://github.com/canhld94)). +* Add the `unreserved_space` column to the `system.disks` table to check how much space is not taken by reservations per disk. [#41254](https://github.com/ClickHouse/ClickHouse/pull/41254) ([filimonov](https://github.com/filimonov)). +* Support s3 authorization headers in table function arguments. [#41261](https://github.com/ClickHouse/ClickHouse/pull/41261) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add support for MultiRead in Keeper and internal ZooKeeper client (this is an extension to ZooKeeper protocol, only available in ClickHouse Keeper). [#41410](https://github.com/ClickHouse/ClickHouse/pull/41410) ([Antonio Andelic](https://github.com/antonio2368)). +* Add support for decimal type comparing with floating point literal in IN operator. [#41544](https://github.com/ClickHouse/ClickHouse/pull/41544) ([liang.huang](https://github.com/lhuang09287750)). +* Allow readable size values (like `1TB`) in cache config. [#41688](https://github.com/ClickHouse/ClickHouse/pull/41688) ([Kseniia Sumarokova](https://github.com/kssenii)). +* ClickHouse could cache stale DNS entries for some period of time (15 seconds by default) until the cache won't be updated asynchronously. During these periods ClickHouse can nevertheless try to establish a connection and produce errors. This behavior is fixed. [#41707](https://github.com/ClickHouse/ClickHouse/pull/41707) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add interactive history search with fzf-like utility (fzf/sk) for `clickhouse-client`/`clickhouse-local` (note you can use `FZF_DEFAULT_OPTS`/`SKIM_DEFAULT_OPTIONS` to additionally configure the behavior). [#41730](https://github.com/ClickHouse/ClickHouse/pull/41730) ([Azat Khuzhin](https://github.com/azat)). +* Only allow clients connecting to a secure server with an invalid certificate only to proceed with the '--accept-certificate' flag. [#41743](https://github.com/ClickHouse/ClickHouse/pull/41743) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Add function `tryBase58Decode`, similar to the existing function `tryBase64Decode`. [#41824](https://github.com/ClickHouse/ClickHouse/pull/41824) ([Robert Schulze](https://github.com/rschu1ze)). +* Improve feedback when replacing partition with different primary key. Fixes [#34798](https://github.com/ClickHouse/ClickHouse/issues/34798). [#41838](https://github.com/ClickHouse/ClickHouse/pull/41838) ([Salvatore](https://github.com/tbsal)). +* Fix parallel parsing: segmentator now checks `max_block_size`. This fixed memory overallocation in case of parallel parsing and small LIMIT. [#41852](https://github.com/ClickHouse/ClickHouse/pull/41852) ([Vitaly Baranov](https://github.com/vitlibar)). +* Don't add "TABLE_IS_DROPPED" exception to `system.errors` if it's happened during SELECT from a system table and was ignored. [#41908](https://github.com/ClickHouse/ClickHouse/pull/41908) ([AlfVII](https://github.com/AlfVII)). +* Improve option `enable_extended_results_for_datetime_functions` to return results of type DateTime64 for functions `toStartOfDay`, `toStartOfHour`, `toStartOfFifteenMinutes`, `toStartOfTenMinutes`, `toStartOfFiveMinutes`, `toStartOfMinute` and `timeSlot`. [#41910](https://github.com/ClickHouse/ClickHouse/pull/41910) ([Roman Vasin](https://github.com/rvasin)). +* Improve `DateTime` type inference for text formats. Now it respects setting `date_time_input_format` and doesn't try to infer datetimes from numbers as timestamps. Closes [#41389](https://github.com/ClickHouse/ClickHouse/issues/41389) Closes [#42206](https://github.com/ClickHouse/ClickHouse/issues/42206). [#41912](https://github.com/ClickHouse/ClickHouse/pull/41912) ([Kruglov Pavel](https://github.com/Avogar)). +* Remove confusing warning when inserting with `perform_ttl_move_on_insert` = false. [#41980](https://github.com/ClickHouse/ClickHouse/pull/41980) ([Vitaly Baranov](https://github.com/vitlibar)). +* Allow user to write `countState(*)` similar to `count(*)`. This closes [#9338](https://github.com/ClickHouse/ClickHouse/issues/9338). [#41983](https://github.com/ClickHouse/ClickHouse/pull/41983) ([Amos Bird](https://github.com/amosbird)). +* Fix `rankCorr` size overflow. [#42020](https://github.com/ClickHouse/ClickHouse/pull/42020) ([Duc Canh Le](https://github.com/canhld94)). +* Added an option to specify an arbitrary string as an environment name in the Sentry's config for more handy reports. [#42037](https://github.com/ClickHouse/ClickHouse/pull/42037) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix parsing out-of-range Date from CSV. [#42044](https://github.com/ClickHouse/ClickHouse/pull/42044) ([Andrey Zvonov](https://github.com/zvonand)). +* `parseDataTimeBestEffort` now supports comma between date and time. Closes [#42038](https://github.com/ClickHouse/ClickHouse/issues/42038). [#42049](https://github.com/ClickHouse/ClickHouse/pull/42049) ([flynn](https://github.com/ucasfl)). +* Improved stale replica recovery process for `ReplicatedMergeTree`. If a lost replica has some parts which are absent from a healthy replica, but these parts should appear in the future according to the replication queue of the healthy replica, then the lost replica will keep such parts instead of detaching them. [#42134](https://github.com/ClickHouse/ClickHouse/pull/42134) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Add a possibility to use `Date32` arguments for date_diff function. Fix issue in date_diff function when using DateTime64 arguments with a start date before Unix epoch and end date after Unix epoch. [#42308](https://github.com/ClickHouse/ClickHouse/pull/42308) ([Roman Vasin](https://github.com/rvasin)). +* When uploading big parts to Minio, 'Complete Multipart Upload' can take a long time. Minio sends heartbeats every 10 seconds (see https://github.com/minio/minio/pull/7198). But clickhouse times out earlier, because the default send/receive timeout is [set](https://github.com/ClickHouse/ClickHouse/blob/cc24fcd6d5dfb67f5f66f5483e986bd1010ad9cf/src/IO/S3/PocoHTTPClient.cpp#L123) to 5 seconds. [#42321](https://github.com/ClickHouse/ClickHouse/pull/42321) ([filimonov](https://github.com/filimonov)). +* Fix rarely invalid cast of aggregate state types with complex types such as Decimal. This fixes [#42408](https://github.com/ClickHouse/ClickHouse/issues/42408). [#42417](https://github.com/ClickHouse/ClickHouse/pull/42417) ([Amos Bird](https://github.com/amosbird)). +* Allow to use `Date32` arguments for `dateName` function. [#42554](https://github.com/ClickHouse/ClickHouse/pull/42554) ([Roman Vasin](https://github.com/rvasin)). +* Now filters with NULL literals will be used during index analysis. [#34063](https://github.com/ClickHouse/ClickHouse/issues/34063). [#41842](https://github.com/ClickHouse/ClickHouse/pull/41842) ([Amos Bird](https://github.com/amosbird)). +* Merge parts if every part in the range is older than a certain threshold. The threshold can be set by using `min_age_to_force_merge_seconds`. This closes [#35836](https://github.com/ClickHouse/ClickHouse/issues/35836). [#42423](https://github.com/ClickHouse/ClickHouse/pull/42423) ([Antonio Andelic](https://github.com/antonio2368)). This is continuation of [#39550i](https://github.com/ClickHouse/ClickHouse/pull/39550) by [@fastio](https://github.com/fastio) who implemented most of the logic. +* Added new infrastructure for query analysis and planning under `allow_experimental_analyzer` setting. [#31796](https://github.com/ClickHouse/ClickHouse/pull/31796) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve the time to recover lost keeper connections. [#42541](https://github.com/ClickHouse/ClickHouse/pull/42541) ([Raúl Marín](https://github.com/Algunenano)). + +#### Build/Testing/Packaging Improvement +* Add fuzzer for table definitions [#40096](https://github.com/ClickHouse/ClickHouse/pull/40096) ([Anton Popov](https://github.com/CurtizJ)). This represents the biggest advancement for ClickHouse testing in this year so far. +* Beta version of the ClickHouse Cloud service is released: [https://clickhouse.cloud/](https://clickhouse.cloud/). It provides the easiest way to use ClickHouse (even slightly easier than the single-command installation). +* Added support of WHERE clause generation to AST Fuzzer and possibility to add or remove ORDER BY and WHERE clause. [#38519](https://github.com/ClickHouse/ClickHouse/pull/38519) ([Ilya Yatsishin](https://github.com/qoega)). +* Aarch64 binaries now require at least ARMv8.2, released in 2016. Most notably, this enables use of ARM LSE, i.e. native atomic operations. Also, CMake build option "NO_ARMV81_OR_HIGHER" has been added to allow compilation of binaries for older ARMv8.0 hardware, e.g. Raspberry Pi 4. [#41610](https://github.com/ClickHouse/ClickHouse/pull/41610) ([Robert Schulze](https://github.com/rschu1ze)). +* Allow building ClickHouse with Musl (small changes after it was already supported but broken). [#41987](https://github.com/ClickHouse/ClickHouse/pull/41987) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add the `$CLICKHOUSE_CRONFILE` file checking to avoid running the `sed` command to get the file not found error on install. [#42081](https://github.com/ClickHouse/ClickHouse/pull/42081) ([Chun-Sheng, Li](https://github.com/peter279k)). +* Update cctz to `2022e` to support the new timezone changes. Palestine transitions are now Saturdays at 02:00. Simplify three Ukraine zones into one. Jordan and Syria switch from +02/+03 with DST to year-round +03. (https://data.iana.org/time-zones/tzdb/NEWS). This closes [#42252](https://github.com/ClickHouse/ClickHouse/issues/42252). [#42327](https://github.com/ClickHouse/ClickHouse/pull/42327) ([Alexey Milovidov](https://github.com/alexey-milovidov)). [#42273](https://github.com/ClickHouse/ClickHouse/pull/42273) ([Dom Del Nano](https://github.com/ddelnano)). +* Add Rust code support into ClickHouse with BLAKE3 hash-function library as an example. [#33435](https://github.com/ClickHouse/ClickHouse/pull/33435) ([BoloniniD](https://github.com/BoloniniD)). + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Choose correct aggregation method for `LowCardinality` with big integer types. [#42342](https://github.com/ClickHouse/ClickHouse/pull/42342) ([Duc Canh Le](https://github.com/canhld94)). +* Several fixes for `web` disk. [#41652](https://github.com/ClickHouse/ClickHouse/pull/41652) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fixes an issue that causes docker run to fail if `https_port` is not present in config. [#41693](https://github.com/ClickHouse/ClickHouse/pull/41693) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Mutations were not cancelled properly on server shutdown or `SYSTEM STOP MERGES` query and cancellation might take long time, it's fixed. [#41699](https://github.com/ClickHouse/ClickHouse/pull/41699) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix wrong result of queries with `ORDER BY` or `GROUP BY` by columns from prefix of sorting key, wrapped into monotonic functions, with enable "read in order" optimization (settings `optimize_read_in_order` and `optimize_aggregation_in_order`). [#41701](https://github.com/ClickHouse/ClickHouse/pull/41701) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible crash in `SELECT` from `Merge` table with enabled `optimize_monotonous_functions_in_order_by` setting. Fixes [#41269](https://github.com/ClickHouse/ClickHouse/issues/41269). [#41740](https://github.com/ClickHouse/ClickHouse/pull/41740) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed "Part ... intersects part ..." error that might happen in extremely rare cases if replica was restarted just after detaching some part as broken. [#41741](https://github.com/ClickHouse/ClickHouse/pull/41741) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Don't allow to create or alter merge tree tables with column name `_row_exists`, which is reserved for lightweight delete. Fixed [#41716](https://github.com/ClickHouse/ClickHouse/issues/41716). [#41763](https://github.com/ClickHouse/ClickHouse/pull/41763) ([Jianmei Zhang](https://github.com/zhangjmruc)). +* Fix a bug that CORS headers are missing in some HTTP responses. [#41792](https://github.com/ClickHouse/ClickHouse/pull/41792) ([Frank Chen](https://github.com/FrankChen021)). +* 22.9 might fail to startup `ReplicatedMergeTree` table if that table was created by 20.3 or older version and was never altered, it's fixed. Fixes [#41742](https://github.com/ClickHouse/ClickHouse/issues/41742). [#41796](https://github.com/ClickHouse/ClickHouse/pull/41796) ([Alexander Tokmakov](https://github.com/tavplubix)). +* When the batch sending fails for some reason, it cannot be automatically recovered, and if it is not processed in time, it will lead to accumulation, and the printed error message will become longer and longer, which will cause the http thread to block. [#41813](https://github.com/ClickHouse/ClickHouse/pull/41813) ([zhongyuankai](https://github.com/zhongyuankai)). +* Fix compact parts with compressed marks setting. Fixes [#41783](https://github.com/ClickHouse/ClickHouse/issues/41783) and [#41746](https://github.com/ClickHouse/ClickHouse/issues/41746). [#41823](https://github.com/ClickHouse/ClickHouse/pull/41823) ([alesapin](https://github.com/alesapin)). +* Old versions of Replicated database don't have a special marker in [Zoo]Keeper. We need to check only whether the node contains come obscure data instead of special mark. [#41875](https://github.com/ClickHouse/ClickHouse/pull/41875) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix possible exception in fs cache. [#41884](https://github.com/ClickHouse/ClickHouse/pull/41884) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix `use_environment_credentials` for s3 table function. [#41970](https://github.com/ClickHouse/ClickHouse/pull/41970) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fixed "Directory already exists and is not empty" error on detaching broken part that might prevent `ReplicatedMergeTree` table from starting replication. Fixes [#40957](https://github.com/ClickHouse/ClickHouse/issues/40957). [#41981](https://github.com/ClickHouse/ClickHouse/pull/41981) ([Alexander Tokmakov](https://github.com/tavplubix)). +* `toDateTime64` now returns the same output with negative integer and float arguments. [#42025](https://github.com/ClickHouse/ClickHouse/pull/42025) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix write into `azure_blob_storage`. Partially closes [#41754](https://github.com/ClickHouse/ClickHouse/issues/41754). [#42034](https://github.com/ClickHouse/ClickHouse/pull/42034) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix the `bzip2` decoding issue for specific `bzip2` files. [#42046](https://github.com/ClickHouse/ClickHouse/pull/42046) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix SQL function `toLastDayOfMonth` with setting "enable_extended_results_for_datetime_functions = 1" at the beginning of the extended range (January 1900). - Fix SQL function "toRelativeWeekNum()" with setting "enable_extended_results_for_datetime_functions = 1" at the end of extended range (December 2299). - Improve the performance of for SQL functions "toISOYear()", "toFirstDayNumOfISOYearIndex()" and "toYearWeekOfNewyearMode()" by avoiding unnecessary index arithmetics. [#42084](https://github.com/ClickHouse/ClickHouse/pull/42084) ([Roman Vasin](https://github.com/rvasin)). +* The maximum size of fetches for each table accidentally was set to 8 while the pool size could be bigger. Now the maximum size of fetches for table is equal to the pool size. [#42090](https://github.com/ClickHouse/ClickHouse/pull/42090) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* A table might be shut down and a dictionary might be detached before checking if can be dropped without breaking dependencies between table, it's fixed. Fixes [#41982](https://github.com/ClickHouse/ClickHouse/issues/41982). [#42106](https://github.com/ClickHouse/ClickHouse/pull/42106) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix bad inefficiency of `remote_filesystem_read_method=read` with filesystem cache. Closes [#42125](https://github.com/ClickHouse/ClickHouse/issues/42125). [#42129](https://github.com/ClickHouse/ClickHouse/pull/42129) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix possible timeout exception for distributed queries with use_hedged_requests = 0. [#42130](https://github.com/ClickHouse/ClickHouse/pull/42130) ([Azat Khuzhin](https://github.com/azat)). +* Fixed a minor bug inside function `runningDifference` in case of using it with `Date32` type. Previously `Date` was used and it may cause some logical errors like `Bad cast from type DB::ColumnVector to DB::ColumnVector'`. [#42143](https://github.com/ClickHouse/ClickHouse/pull/42143) ([Alfred Xu](https://github.com/sperlingxx)). +* Fix reusing of files > 4GB from base backup. [#42146](https://github.com/ClickHouse/ClickHouse/pull/42146) ([Azat Khuzhin](https://github.com/azat)). +* DISTINCT in order fails with LOGICAL_ERROR if first column in sorting key contains function. [#42186](https://github.com/ClickHouse/ClickHouse/pull/42186) ([Igor Nikonov](https://github.com/devcrafter)). +* Fix a bug with projections and the `aggregate_functions_null_for_empty` setting. This bug is very rare and appears only if you enable the `aggregate_functions_null_for_empty` setting in the server's config. This closes [#41647](https://github.com/ClickHouse/ClickHouse/issues/41647). [#42198](https://github.com/ClickHouse/ClickHouse/pull/42198) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix read from `Buffer` tables with read in order desc. [#42236](https://github.com/ClickHouse/ClickHouse/pull/42236) ([Duc Canh Le](https://github.com/canhld94)). +* Fix a bug which prevents ClickHouse to start when `background_pool_size setting` is set on default profile but `background_merges_mutations_concurrency_ratio` is not. [#42315](https://github.com/ClickHouse/ClickHouse/pull/42315) ([nvartolomei](https://github.com/nvartolomei)). +* `ALTER UPDATE` of attached part (with columns different from table schema) could create an invalid `columns.txt` metadata on disk. Reading from such part could fail with errors or return invalid data. Fixes [#42161](https://github.com/ClickHouse/ClickHouse/issues/42161). [#42319](https://github.com/ClickHouse/ClickHouse/pull/42319) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Setting `additional_table_filters` were not applied to `Distributed` storage. Fixes [#41692](https://github.com/ClickHouse/ClickHouse/issues/41692). [#42322](https://github.com/ClickHouse/ClickHouse/pull/42322) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix a data race in query finish/cancel. This closes [#42346](https://github.com/ClickHouse/ClickHouse/issues/42346). [#42362](https://github.com/ClickHouse/ClickHouse/pull/42362) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* This reverts [#40217](https://github.com/ClickHouse/ClickHouse/issues/40217) which introduced a regression in date/time functions. [#42367](https://github.com/ClickHouse/ClickHouse/pull/42367) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix assert cast in join on falsy condition, Close [#42380](https://github.com/ClickHouse/ClickHouse/issues/42380). [#42407](https://github.com/ClickHouse/ClickHouse/pull/42407) ([Vladimir C](https://github.com/vdimir)). +* Fix buffer overflow in the processing of Decimal data types. This closes [#42451](https://github.com/ClickHouse/ClickHouse/issues/42451). [#42465](https://github.com/ClickHouse/ClickHouse/pull/42465) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* `AggregateFunctionQuantile` now correctly works with UInt128 columns. Previously, the quantile state interpreted `UInt128` columns as `Int128` which could have led to incorrect results. [#42473](https://github.com/ClickHouse/ClickHouse/pull/42473) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix bad_cast assert during INSERT into `Annoy` indexes over non-Float32 columns. `Annoy` indices is an experimental feature. [#42485](https://github.com/ClickHouse/ClickHouse/pull/42485) ([Robert Schulze](https://github.com/rschu1ze)). +* Arithmetic operator with Date or DateTime and 128 or 256-bit integer was referencing uninitialized memory. [#42453](https://github.com/ClickHouse/ClickHouse/issues/42453). [#42573](https://github.com/ClickHouse/ClickHouse/pull/42573) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix unexpected table loading error when partition key contains alias function names during server upgrade. [#36379](https://github.com/ClickHouse/ClickHouse/pull/36379) ([Amos Bird](https://github.com/amosbird)). + +### ClickHouse release 22.9, 2022-09-22 + +#### Backward Incompatible Change +* Upgrade from 20.3 and older to 22.9 and newer should be done through an intermediate version if there are any `ReplicatedMergeTree` tables, otherwise server with the new version will not start. [#40641](https://github.com/ClickHouse/ClickHouse/pull/40641) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Remove the functions `accurate_Cast` and `accurate_CastOrNull` (they are different to `accurateCast` and `accurateCastOrNull` by underscore in the name and they are not affected by the value of `cast_keep_nullable` setting). These functions were undocumented, untested, unused, and unneeded. They appeared to be alive due to code generalization. [#40682](https://github.com/ClickHouse/ClickHouse/pull/40682) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add a test to ensure that every new table function will be documented. See [#40649](https://github.com/ClickHouse/ClickHouse/issues/40649). Rename table function `MeiliSearch` to `meilisearch`. [#40709](https://github.com/ClickHouse/ClickHouse/pull/40709) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add a test to ensure that every new function will be documented. See [#40649](https://github.com/ClickHouse/ClickHouse/pull/40649). The functions `lemmatize`, `synonyms`, `stem` were case-insensitive by mistake. Now they are case-sensitive. [#40711](https://github.com/ClickHouse/ClickHouse/pull/40711) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* For security and stability reasons, catboost models are no longer evaluated within the ClickHouse server. Instead, the evaluation is now + done in the clickhouse-library-bridge, a separate process that loads the catboost library and communicates with the server process via + HTTP. [#40897](https://github.com/ClickHouse/ClickHouse/pull/40897) ([Robert Schulze](https://github.com/rschu1ze)). +* Make interpretation of YAML configs to be more conventional. [#41044](https://github.com/ClickHouse/ClickHouse/pull/41044) ([Vitaly Baranov](https://github.com/vitlibar)). + +#### New Feature +* Support `insert_quorum = 'auto'` to use majority number. [#39970](https://github.com/ClickHouse/ClickHouse/pull/39970) ([Sachin](https://github.com/SachinSetiya)). +* Add embedded dashboards to ClickHouse server. This is a demo project about how to achieve 90% results with 1% effort using ClickHouse features. [#40461](https://github.com/ClickHouse/ClickHouse/pull/40461) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Added new settings constraint writability kind `changeable_in_readonly`. [#40631](https://github.com/ClickHouse/ClickHouse/pull/40631) ([Sergei Trifonov](https://github.com/serxa)). +* Add support for `INTERSECT DISTINCT` and `EXCEPT DISTINCT`. [#40792](https://github.com/ClickHouse/ClickHouse/pull/40792) ([Duc Canh Le](https://github.com/canhld94)). +* Add new input/output format `JSONObjectEachRow` - Support import for formats `JSON/JSONCompact/JSONColumnsWithMetadata`. Add new setting `input_format_json_validate_types_from_metadata` that controls whether we should check if data types from metadata match data types from the header. - Add new setting `input_format_json_validate_utf8`, when it's enabled, all `JSON` formats will validate UTF-8 sequences. It will be disabled by default. Note that this setting doesn't influence output formats `JSON/JSONCompact/JSONColumnsWithMetadata`, they always validate utf8 sequences (this exception was made because of compatibility reasons). - Add new setting `input_format_json_read_numbers_as_strings ` that allows to parse numbers in String column, the setting is disabled by default. - Add new setting `output_format_json_quote_decimals` that allows to output decimals in double quotes, disabled by default. - Allow to parse decimals in double quotes during data import. [#40910](https://github.com/ClickHouse/ClickHouse/pull/40910) ([Kruglov Pavel](https://github.com/Avogar)). +* Query parameters supported in DESCRIBE TABLE query. [#40952](https://github.com/ClickHouse/ClickHouse/pull/40952) ([Nikita Taranov](https://github.com/nickitat)). +* Add support to Parquet Time32/64 by converting it into DateTime64. Parquet time32/64 represents time elapsed since midnight, while DateTime32/64 represents an actual unix timestamp. Conversion simply offsets from `0`. [#41333](https://github.com/ClickHouse/ClickHouse/pull/41333) ([Arthur Passos](https://github.com/arthurpassos)). +* Implement set operations on Apache Datasketches. [#39919](https://github.com/ClickHouse/ClickHouse/pull/39919) ([Fangyuan Deng](https://github.com/pzhdfy)). Note: there is no point of using Apache Datasketches, they are inferiour than ClickHouse and only make sense for integration with other systems. +* Allow recording errors to specified file while reading text formats (`CSV`, `TSV`). [#40516](https://github.com/ClickHouse/ClickHouse/pull/40516) ([zjial](https://github.com/zjial)). + +#### Experimental Feature + +* Add ANN (approximate nearest neighbor) index based on `Annoy`. [#40818](https://github.com/ClickHouse/ClickHouse/pull/40818) ([Filatenkov Artur](https://github.com/FArthur-cmd)). [#37215](https://github.com/ClickHouse/ClickHouse/pull/37215) ([VVMak](https://github.com/VVMak)). +* Add new storage engine `KeeperMap`, that uses ClickHouse Keeper or ZooKeeper as a key-value store. [#39976](https://github.com/ClickHouse/ClickHouse/pull/39976) ([Antonio Andelic](https://github.com/antonio2368)). This storage engine is intended to store a small amount of metadata. +* Improvement for in-memory data parts: remove completely processed WAL files. [#40592](https://github.com/ClickHouse/ClickHouse/pull/40592) ([Azat Khuzhin](https://github.com/azat)). + +#### Performance Improvement +* Implement compression of marks and primary key. Close [#34437](https://github.com/ClickHouse/ClickHouse/issues/34437). [#37693](https://github.com/ClickHouse/ClickHouse/pull/37693) ([zhongyuankai](https://github.com/zhongyuankai)). +* Allow to load marks with threadpool in advance. Regulated by setting `load_marks_asynchronously` (default: 0). [#40821](https://github.com/ClickHouse/ClickHouse/pull/40821) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Virtual filesystem over s3 will use random object names split into multiple path prefixes for better performance on AWS. [#40968](https://github.com/ClickHouse/ClickHouse/pull/40968) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Account `max_block_size` value while producing single-level aggregation results. Allows to execute following query plan steps using more threads. [#39138](https://github.com/ClickHouse/ClickHouse/pull/39138) ([Nikita Taranov](https://github.com/nickitat)). +* Software prefetching is used in aggregation to speed up operations with hash tables. Controlled by the setting `enable_software_prefetch_in_aggregation`, enabled by default. [#39304](https://github.com/ClickHouse/ClickHouse/pull/39304) ([Nikita Taranov](https://github.com/nickitat)). +* Better support of `optimize_read_in_order` in case when some of sorting key columns are always constant after applying `WHERE` clause. E.g. query like `SELECT ... FROM table WHERE a = 'x' ORDER BY a, b`, where `table` has storage definition: `MergeTree ORDER BY (a, b)`. [#38715](https://github.com/ClickHouse/ClickHouse/pull/38715) ([Anton Popov](https://github.com/CurtizJ)). +* Filter joined streams for `full_sorting_join` by each other before sorting. [#39418](https://github.com/ClickHouse/ClickHouse/pull/39418) ([Vladimir C](https://github.com/vdimir)). +* LZ4 decompression optimised by skipping empty literals processing. [#40142](https://github.com/ClickHouse/ClickHouse/pull/40142) ([Nikita Taranov](https://github.com/nickitat)). +* Speedup backup process using native `copy` when possible instead of copying through `clickhouse-server` memory. [#40395](https://github.com/ClickHouse/ClickHouse/pull/40395) ([alesapin](https://github.com/alesapin)). +* Do not obtain storage snapshot for each INSERT block (slightly improves performance). [#40638](https://github.com/ClickHouse/ClickHouse/pull/40638) ([Azat Khuzhin](https://github.com/azat)). +* Implement batch processing for aggregate functions with multiple nullable arguments. [#41058](https://github.com/ClickHouse/ClickHouse/pull/41058) ([Raúl Marín](https://github.com/Algunenano)). +* Speed up reading UniquesHashSet (`uniqState` from disk for example). [#41089](https://github.com/ClickHouse/ClickHouse/pull/41089) ([Raúl Marín](https://github.com/Algunenano)). +* Fixed high memory usage while executing mutations of compact parts in tables with huge number of columns. [#41122](https://github.com/ClickHouse/ClickHouse/pull/41122) ([lthaooo](https://github.com/lthaooo)). +* Enable the vectorscan library on ARM, this speeds up regexp evaluation. [#41033](https://github.com/ClickHouse/ClickHouse/pull/41033) ([Robert Schulze](https://github.com/rschu1ze)). +* Upgrade vectorscan to 5.4.8 which has many performance optimizations to speed up regexp evaluation. [#41270](https://github.com/ClickHouse/ClickHouse/pull/41270) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix incorrect fallback to skip the local filesystem cache for VFS (like S3) which happened on very high concurrency level. [#40420](https://github.com/ClickHouse/ClickHouse/pull/40420) ([Kseniia Sumarokova](https://github.com/kssenii)). +* If row policy filter is always false, return empty result immediately without reading any data. This closes [#24012](https://github.com/ClickHouse/ClickHouse/issues/24012). [#40740](https://github.com/ClickHouse/ClickHouse/pull/40740) ([Amos Bird](https://github.com/amosbird)). +* Parallel hash JOIN for Float data types might be suboptimal. Make it better. [#41183](https://github.com/ClickHouse/ClickHouse/pull/41183) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### Improvement +* During startup and ATTACH call, `ReplicatedMergeTree` tables will be readonly until the ZooKeeper connection is made and the setup is finished. [#40148](https://github.com/ClickHouse/ClickHouse/pull/40148) ([Antonio Andelic](https://github.com/antonio2368)). +* Add `enable_extended_results_for_datetime_functions` option to return results of type Date32 for functions toStartOfYear, toStartOfISOYear, toStartOfQuarter, toStartOfMonth, toStartOfWeek, toMonday and toLastDayOfMonth when argument is Date32 or DateTime64, otherwise results of Date type are returned. For compatibility reasons default value is ‘0’. [#41214](https://github.com/ClickHouse/ClickHouse/pull/41214) ([Roman Vasin](https://github.com/rvasin)). +* For security and stability reasons, CatBoost models are no longer evaluated within the ClickHouse server. Instead, the evaluation is now done in the clickhouse-library-bridge, a separate process that loads the catboost library and communicates with the server process via HTTP. Function `modelEvaluate()` was replaced by `catboostEvaluate()`. [#40897](https://github.com/ClickHouse/ClickHouse/pull/40897) ([Robert Schulze](https://github.com/rschu1ze)). [#39629](https://github.com/ClickHouse/ClickHouse/pull/39629) ([Robert Schulze](https://github.com/rschu1ze)). +* Add more metrics for on-disk temporary data, close [#40206](https://github.com/ClickHouse/ClickHouse/issues/40206). [#40239](https://github.com/ClickHouse/ClickHouse/pull/40239) ([Vladimir C](https://github.com/vdimir)). +* Add config option `warning_supress_regexp`, close [#40330](https://github.com/ClickHouse/ClickHouse/issues/40330). [#40548](https://github.com/ClickHouse/ClickHouse/pull/40548) ([Vladimir C](https://github.com/vdimir)). +* Add setting to disable limit on kafka_num_consumers. Closes [#40331](https://github.com/ClickHouse/ClickHouse/issues/40331). [#40670](https://github.com/ClickHouse/ClickHouse/pull/40670) ([Kruglov Pavel](https://github.com/Avogar)). +* Support `SETTINGS` in `DELETE ...` query. [#41533](https://github.com/ClickHouse/ClickHouse/pull/41533) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Detailed S3 profile events `DiskS3*` per S3 API call split for S3 ObjectStorage. [#41532](https://github.com/ClickHouse/ClickHouse/pull/41532) ([Sergei Trifonov](https://github.com/serxa)). +* Two new metrics in `system.asynchronous_metrics`. `NumberOfDetachedParts` and `NumberOfDetachedByUserParts`. [#40779](https://github.com/ClickHouse/ClickHouse/pull/40779) ([Sema Checherinda](https://github.com/CheSema)). +* Allow CONSTRAINTs for ODBC and JDBC tables. [#34551](https://github.com/ClickHouse/ClickHouse/pull/34551) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Don't print `SETTINGS` more than once during query formatting if it didn't appear multiple times in the original query. [#38900](https://github.com/ClickHouse/ClickHouse/pull/38900) ([Raúl Marín](https://github.com/Algunenano)). +* Improve the tracing (OpenTelemetry) context propagation across threads. [#39010](https://github.com/ClickHouse/ClickHouse/pull/39010) ([Frank Chen](https://github.com/FrankChen021)). +* ClickHouse Keeper: add listeners for `interserver_listen_host` only in Keeper if specified. [#39973](https://github.com/ClickHouse/ClickHouse/pull/39973) ([Antonio Andelic](https://github.com/antonio2368)). +* Improve recovery of Replicated user access storage after errors. [#39977](https://github.com/ClickHouse/ClickHouse/pull/39977) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add support for TTL in `EmbeddedRocksDB`. [#39986](https://github.com/ClickHouse/ClickHouse/pull/39986) ([Lloyd-Pottiger](https://github.com/Lloyd-Pottiger)). +* Add schema inference to `clickhouse-obfuscator`, so the `--structure` argument is no longer required. [#40120](https://github.com/ClickHouse/ClickHouse/pull/40120) ([Nikolay Degterinsky](https://github.com/evillique)). +* Improve and fix dictionaries in `Arrow` format. [#40173](https://github.com/ClickHouse/ClickHouse/pull/40173) ([Kruglov Pavel](https://github.com/Avogar)). +* More natural conversion of `Date32`, `DateTime64`, `Date` to narrower types: upper or lower normal value is considered when out of normal range. [#40217](https://github.com/ClickHouse/ClickHouse/pull/40217) ([Andrey Zvonov](https://github.com/zvonand)). +* Fix the case when `Merge` table over `View` cannot use index. [#40233](https://github.com/ClickHouse/ClickHouse/pull/40233) ([Duc Canh Le](https://github.com/canhld94)). +* Custom key names for JSON server logs. [#40251](https://github.com/ClickHouse/ClickHouse/pull/40251) ([Mallik Hassan](https://github.com/SadiHassan)). +* It is now possible to set a custom error code for the exception thrown by function `throwIf`. [#40319](https://github.com/ClickHouse/ClickHouse/pull/40319) ([Robert Schulze](https://github.com/rschu1ze)). +* Improve schema inference cache, respect format settings that can change the schema. [#40414](https://github.com/ClickHouse/ClickHouse/pull/40414) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow parsing `Date` as `DateTime` and `DateTime64`. This implements the enhancement proposed in [#36949](https://github.com/ClickHouse/ClickHouse/issues/36949). [#40474](https://github.com/ClickHouse/ClickHouse/pull/40474) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Allow conversion from `String` with `DateTime64` like `2022-08-22 01:02:03.456` to `Date` and `Date32`. Allow conversion from String with DateTime like `2022-08-22 01:02:03` to `Date32`. This closes [#39598](https://github.com/ClickHouse/ClickHouse/issues/39598). [#40475](https://github.com/ClickHouse/ClickHouse/pull/40475) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Better support for nested data structures in Parquet format [#40485](https://github.com/ClickHouse/ClickHouse/pull/40485) ([Arthur Passos](https://github.com/arthurpassos)). +* Support reading Array(Record) into flatten nested table in Avro. [#40534](https://github.com/ClickHouse/ClickHouse/pull/40534) ([Kruglov Pavel](https://github.com/Avogar)). +* Add read-only support for `EmbeddedRocksDB`. [#40543](https://github.com/ClickHouse/ClickHouse/pull/40543) ([Lloyd-Pottiger](https://github.com/Lloyd-Pottiger)). +* Validate the compression method parameter of URL table engine. [#40600](https://github.com/ClickHouse/ClickHouse/pull/40600) ([Frank Chen](https://github.com/FrankChen021)). +* Better format detection for url table function/engine in presence of a query string after a file name. Closes [#40315](https://github.com/ClickHouse/ClickHouse/issues/40315). [#40636](https://github.com/ClickHouse/ClickHouse/pull/40636) ([Kruglov Pavel](https://github.com/Avogar)). +* Disable projection when grouping set is used. It generated wrong result. This fixes [#40635](https://github.com/ClickHouse/ClickHouse/issues/40635). [#40726](https://github.com/ClickHouse/ClickHouse/pull/40726) ([Amos Bird](https://github.com/amosbird)). +* Fix incorrect format of `APPLY` column transformer which can break metadata if used in table definition. This fixes [#37590](https://github.com/ClickHouse/ClickHouse/issues/37590). [#40727](https://github.com/ClickHouse/ClickHouse/pull/40727) ([Amos Bird](https://github.com/amosbird)). +* Support the `%z` descriptor for formatting the timezone offset in `formatDateTime`. [#40736](https://github.com/ClickHouse/ClickHouse/pull/40736) ([Cory Levy](https://github.com/LevyCory)). +* The interactive mode in `clickhouse-client` now interprets `.` and `/` as "run the last command". [#40750](https://github.com/ClickHouse/ClickHouse/pull/40750) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix issue with passing MySQL timeouts for MySQL database engine and MySQL table function. Closes [#34168](https://github.com/ClickHouse/ClickHouse/issues/34168). [#40751](https://github.com/ClickHouse/ClickHouse/pull/40751) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Create status file for filesystem cache directory to make sure that cache directories are not shared between different servers or caches. [#40820](https://github.com/ClickHouse/ClickHouse/pull/40820) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add support for `DELETE` and `UPDATE` for `EmbeddedRocksDB` storage. [#40853](https://github.com/ClickHouse/ClickHouse/pull/40853) ([Antonio Andelic](https://github.com/antonio2368)). +* ClickHouse Keeper: fix shutdown during long commit and increase allowed request size. [#40941](https://github.com/ClickHouse/ClickHouse/pull/40941) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix race in WriteBufferFromS3, add TSA annotations. [#40950](https://github.com/ClickHouse/ClickHouse/pull/40950) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Grouping sets with group_by_use_nulls should only convert key columns to nullable. [#40997](https://github.com/ClickHouse/ClickHouse/pull/40997) ([Duc Canh Le](https://github.com/canhld94)). +* Improve the observability of INSERT on distributed table. [#41034](https://github.com/ClickHouse/ClickHouse/pull/41034) ([Frank Chen](https://github.com/FrankChen021)). +* More low-level metrics for S3 interaction. [#41039](https://github.com/ClickHouse/ClickHouse/pull/41039) ([mateng915](https://github.com/mateng0915)). +* Support relative path in Location header after HTTP redirect. Closes [#40985](https://github.com/ClickHouse/ClickHouse/issues/40985). [#41162](https://github.com/ClickHouse/ClickHouse/pull/41162) ([Kruglov Pavel](https://github.com/Avogar)). +* Apply changes to HTTP handlers on fly without server restart. [#41177](https://github.com/ClickHouse/ClickHouse/pull/41177) ([Azat Khuzhin](https://github.com/azat)). +* ClickHouse Keeper: properly close active sessions during shutdown. [#41215](https://github.com/ClickHouse/ClickHouse/pull/41215) ([Antonio Andelic](https://github.com/antonio2368)). This lowers the period of "table is read-only" errors. +* Add ability to automatically comment SQL queries in clickhouse-client/local (with `Alt-#`, like in readline). [#41224](https://github.com/ClickHouse/ClickHouse/pull/41224) ([Azat Khuzhin](https://github.com/azat)). +* Fix incompatibility of cache after switching setting `do_no_evict_index_and_mark_files` from 1 to 0, 0 to 1. [#41330](https://github.com/ClickHouse/ClickHouse/pull/41330) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add a setting `allow_suspicious_fixed_string_types` to prevent users from creating columns of type FixedString with size > 256. [#41495](https://github.com/ClickHouse/ClickHouse/pull/41495) ([Duc Canh Le](https://github.com/canhld94)). +* Add `has_lightweight_delete` to system.parts. [#41564](https://github.com/ClickHouse/ClickHouse/pull/41564) ([Kseniia Sumarokova](https://github.com/kssenii)). + +#### Build/Testing/Packaging Improvement +* Enforce documentation for every setting. [#40644](https://github.com/ClickHouse/ClickHouse/pull/40644) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Enforce documentation for every current metric. [#40645](https://github.com/ClickHouse/ClickHouse/pull/40645) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Enforce documentation for every profile event counter. Write the documentation where it was missing. [#40646](https://github.com/ClickHouse/ClickHouse/pull/40646) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Allow minimal `clickhouse-local` build by correcting some dependencies. [#40460](https://github.com/ClickHouse/ClickHouse/pull/40460) ([Alexey Milovidov](https://github.com/alexey-milovidov)). It is less than 50 MiB. +* Calculate and report SQL function coverage in tests. [#40593](https://github.com/ClickHouse/ClickHouse/issues/40593). [#40647](https://github.com/ClickHouse/ClickHouse/pull/40647) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Enforce documentation for every MergeTree setting. [#40648](https://github.com/ClickHouse/ClickHouse/pull/40648) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* A prototype of embedded reference documentation for high-level uniform server components. [#40649](https://github.com/ClickHouse/ClickHouse/pull/40649) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* We will check all queries from the changed perf tests to ensure that all changed queries were tested. [#40322](https://github.com/ClickHouse/ClickHouse/pull/40322) ([Nikita Taranov](https://github.com/nickitat)). +* Fix TGZ packages. [#40681](https://github.com/ClickHouse/ClickHouse/pull/40681) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Fix debug symbols. [#40873](https://github.com/ClickHouse/ClickHouse/pull/40873) ([Azat Khuzhin](https://github.com/azat)). +* Extended the CI configuration to create a x86 SSE2-only build. Useful for old or embedded hardware. [#40999](https://github.com/ClickHouse/ClickHouse/pull/40999) ([Robert Schulze](https://github.com/rschu1ze)). +* Switch to llvm/clang 15. [#41046](https://github.com/ClickHouse/ClickHouse/pull/41046) ([Azat Khuzhin](https://github.com/azat)). +* Continuation of [#40938](https://github.com/ClickHouse/ClickHouse/issues/40938). Fix ODR violation for `Loggers` class. Fixes [#40398](https://github.com/ClickHouse/ClickHouse/issues/40398), [#40937](https://github.com/ClickHouse/ClickHouse/issues/40937). [#41060](https://github.com/ClickHouse/ClickHouse/pull/41060) ([Dmitry Novik](https://github.com/novikd)). +* Add macOS binaries to GitHub release assets, it fixes [#37718](https://github.com/ClickHouse/ClickHouse/issues/37718). [#41088](https://github.com/ClickHouse/ClickHouse/pull/41088) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* The c-ares library is now bundled with ClickHouse's build system. [#41239](https://github.com/ClickHouse/ClickHouse/pull/41239) ([Robert Schulze](https://github.com/rschu1ze)). +* Get rid of `dlopen` from the main ClickHouse code. It remains in the library-bridge and odbc-bridge. [#41428](https://github.com/ClickHouse/ClickHouse/pull/41428) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Don't allow `dlopen` in the main ClickHouse binary, because it is harmful and insecure. We don't use it. But it can be used by some libraries for the implementation of "plugins". We absolutely discourage the ancient technique of loading 3rd-party uncontrolled dangerous libraries into the process address space, because it is insane. [#41429](https://github.com/ClickHouse/ClickHouse/pull/41429) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add `source` field to deb packages, update `nfpm`. [#41531](https://github.com/ClickHouse/ClickHouse/pull/41531) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Support for DWARF-5 in the in-house DWARF parser. [#40710](https://github.com/ClickHouse/ClickHouse/pull/40710) ([Azat Khuzhin](https://github.com/azat)). +* Add fault injection in ZooKeeper client for testing [#30498](https://github.com/ClickHouse/ClickHouse/pull/30498) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Add stateless tests with s3 storage with debug and tsan [#35262](https://github.com/ClickHouse/ClickHouse/pull/35262) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Trying stress on top of S3 [#36837](https://github.com/ClickHouse/ClickHouse/pull/36837) ([alesapin](https://github.com/alesapin)). +* Enable `concurrency-mt-unsafe` in `clang-tidy` [#40224](https://github.com/ClickHouse/ClickHouse/pull/40224) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### Bug Fix + +* Fix potential dataloss due to [a bug in AWS SDK](https://github.com/aws/aws-sdk-cpp/issues/658). Bug can be triggered only when clickhouse is used over S3. [#40506](https://github.com/ClickHouse/ClickHouse/pull/40506) ([alesapin](https://github.com/alesapin)). This bug has been open for 5 years in AWS SDK and is closed after our report. +* Malicious data in Native format might cause a crash. [#41441](https://github.com/ClickHouse/ClickHouse/pull/41441) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The aggregate function `categorialInformationValue` was having incorrectly defined properties, which might cause a null pointer dereferencing at runtime. This closes [#41443](https://github.com/ClickHouse/ClickHouse/issues/41443). [#41449](https://github.com/ClickHouse/ClickHouse/pull/41449) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Writing data in Apache `ORC` format might lead to a buffer overrun. [#41458](https://github.com/ClickHouse/ClickHouse/pull/41458) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix memory safety issues with functions `encrypt` and `contingency` if Array of Nullable is used as an argument. This fixes [#41004](https://github.com/ClickHouse/ClickHouse/issues/41004). [#40195](https://github.com/ClickHouse/ClickHouse/pull/40195) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix bugs in MergeJoin when 'not_processed' is not null. [#40335](https://github.com/ClickHouse/ClickHouse/pull/40335) ([liql2007](https://github.com/liql2007)). +* Fix incorrect result in case of decimal precision loss in IN operator, ref [#41125](https://github.com/ClickHouse/ClickHouse/issues/41125). [#41130](https://github.com/ClickHouse/ClickHouse/pull/41130) ([Vladimir C](https://github.com/vdimir)). +* Fix filling of missed `Nested` columns with multiple levels. [#37152](https://github.com/ClickHouse/ClickHouse/pull/37152) ([Anton Popov](https://github.com/CurtizJ)). +* Fix SYSTEM UNFREEZE query for Ordinary (deprecated) database. Fix for https://github.com/ClickHouse/ClickHouse/pull/36424. [#38262](https://github.com/ClickHouse/ClickHouse/pull/38262) ([Vadim Volodin](https://github.com/PolyProgrammist)). +* Fix unused unknown columns introduced by WITH statement. This fixes [#37812](https://github.com/ClickHouse/ClickHouse/issues/37812) . [#39131](https://github.com/ClickHouse/ClickHouse/pull/39131) ([Amos Bird](https://github.com/amosbird)). +* Fix query analysis for ORDER BY in presence of window functions. Fixes [#38741](https://github.com/ClickHouse/ClickHouse/issues/38741) Fixes [#24892](https://github.com/ClickHouse/ClickHouse/issues/24892). [#39354](https://github.com/ClickHouse/ClickHouse/pull/39354) ([Dmitry Novik](https://github.com/novikd)). +* Fixed `Unknown identifier (aggregate-function)` exception which appears when a user tries to calculate WINDOW ORDER BY/PARTITION BY expressions over aggregate functions. [#39762](https://github.com/ClickHouse/ClickHouse/pull/39762) ([Vladimir Chebotaryov](https://github.com/quickhouse)). +* Limit number of analyze for one query with setting `max_analyze_depth`. It prevents exponential blow up of analysis time for queries with extraordinarily large number of subqueries. [#40334](https://github.com/ClickHouse/ClickHouse/pull/40334) ([Vladimir C](https://github.com/vdimir)). +* Fix rare bug with column TTL for MergeTree engines family: In case of repeated vertical merge the error `Cannot unlink file ColumnName.bin ... No such file or directory.` could happen. [#40346](https://github.com/ClickHouse/ClickHouse/pull/40346) ([alesapin](https://github.com/alesapin)). +* Use DNS entries for both IPv4 and IPv6 if present. [#40353](https://github.com/ClickHouse/ClickHouse/pull/40353) ([Maksim Kita](https://github.com/kitaisreal)). +* Allow to read snappy compressed files from Hadoop. [#40482](https://github.com/ClickHouse/ClickHouse/pull/40482) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix crash while parsing values of type `Object` (experimental feature) that contains arrays of variadic dimension. [#40483](https://github.com/ClickHouse/ClickHouse/pull/40483) ([Duc Canh Le](https://github.com/canhld94)). +* Fix settings `input_format_tsv_skip_first_lines`. [#40491](https://github.com/ClickHouse/ClickHouse/pull/40491) ([mini4](https://github.com/mini4)). +* Fix bug (race condition) when starting up MaterializedPostgreSQL database/table engine. [#40262](https://github.com/ClickHouse/ClickHouse/issues/40262). Fix error with reaching limit of relcache_callback_list slots. [#40511](https://github.com/ClickHouse/ClickHouse/pull/40511) ([Maksim Buren](https://github.com/maks-buren630501)). +* Fix possible error 'Decimal math overflow' while parsing DateTime64. [#40546](https://github.com/ClickHouse/ClickHouse/pull/40546) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix vertical merge of parts with lightweight deleted rows. [#40559](https://github.com/ClickHouse/ClickHouse/pull/40559) ([Alexander Gololobov](https://github.com/davenger)). +* Fix segment fault when writing data to URL table engine if it enables compression. [#40565](https://github.com/ClickHouse/ClickHouse/pull/40565) ([Frank Chen](https://github.com/FrankChen021)). +* Fix possible logical error `'Invalid Field get from type UInt64 to type String'` in arrayElement function with Map. [#40572](https://github.com/ClickHouse/ClickHouse/pull/40572) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix possible race in filesystem cache. [#40586](https://github.com/ClickHouse/ClickHouse/pull/40586) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Removed skipping of mutations in unaffected partitions of `MergeTree` tables, because this feature never worked correctly and might cause resurrection of finished mutations. [#40589](https://github.com/ClickHouse/ClickHouse/pull/40589) ([Alexander Tokmakov](https://github.com/tavplubix)). +* The clickhouse server will crash if we add a grpc port which has been occupied to the configuration in runtime. [#40597](https://github.com/ClickHouse/ClickHouse/pull/40597) ([何æŽå¤«](https://github.com/helifu)). +* Fix `base58Encode / base58Decode` handling leading 0 / '1'. [#40620](https://github.com/ClickHouse/ClickHouse/pull/40620) ([Andrey Zvonov](https://github.com/zvonand)). +* keeper-fix: fix race in accessing logs while snapshot is being installed. [#40627](https://github.com/ClickHouse/ClickHouse/pull/40627) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix short circuit execution of toFixedString function. Solves (partially) [#40622](https://github.com/ClickHouse/ClickHouse/issues/40622). [#40628](https://github.com/ClickHouse/ClickHouse/pull/40628) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixes SQLite int8 column conversion to int64 column in ClickHouse. Fixes [#40639](https://github.com/ClickHouse/ClickHouse/issues/40639). [#40642](https://github.com/ClickHouse/ClickHouse/pull/40642) ([Barum Rho](https://github.com/barumrho)). +* Fix stack overflow in recursive `Buffer` tables. This closes [#40637](https://github.com/ClickHouse/ClickHouse/issues/40637). [#40643](https://github.com/ClickHouse/ClickHouse/pull/40643) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* During insertion of a new query to the `ProcessList` allocations happen. If we reach the memory limit during these allocations we can not use `OvercommitTracker`, because `ProcessList::mutex` is already acquired. Fixes [#40611](https://github.com/ClickHouse/ClickHouse/issues/40611). [#40677](https://github.com/ClickHouse/ClickHouse/pull/40677) ([Dmitry Novik](https://github.com/novikd)). +* Fix LOGICAL_ERROR with max_read_buffer_size=0 during reading marks. [#40705](https://github.com/ClickHouse/ClickHouse/pull/40705) ([Azat Khuzhin](https://github.com/azat)). +* Fix memory leak while pushing to MVs w/o query context (from Kafka/...). [#40732](https://github.com/ClickHouse/ClickHouse/pull/40732) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible error Attempt to read after eof in CSV schema inference. [#40746](https://github.com/ClickHouse/ClickHouse/pull/40746) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix logical error in write-through cache "File segment completion can be done only by downloader". Closes [#40748](https://github.com/ClickHouse/ClickHouse/issues/40748). [#40759](https://github.com/ClickHouse/ClickHouse/pull/40759) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Make the result of GROUPING function the same as in SQL and other DBMS. [#40762](https://github.com/ClickHouse/ClickHouse/pull/40762) ([Dmitry Novik](https://github.com/novikd)). +* In [#40595](https://github.com/ClickHouse/ClickHouse/issues/40595) it was reported that the `host_regexp` functionality was not working properly with a name to address resolution in `/etc/hosts`. It's fixed. [#40769](https://github.com/ClickHouse/ClickHouse/pull/40769) ([Arthur Passos](https://github.com/arthurpassos)). +* Fix incremental backups for Log family. [#40827](https://github.com/ClickHouse/ClickHouse/pull/40827) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix extremely rare bug which can lead to potential data loss in zero-copy replication. [#40844](https://github.com/ClickHouse/ClickHouse/pull/40844) ([alesapin](https://github.com/alesapin)). +* Fix key condition analyzing crashes when same set expression built from different column(s). [#40850](https://github.com/ClickHouse/ClickHouse/pull/40850) ([Duc Canh Le](https://github.com/canhld94)). +* Fix nested JSON Objects schema inference. [#40851](https://github.com/ClickHouse/ClickHouse/pull/40851) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix 3-digit prefix directory for filesystem cache files not being deleted if empty. Closes [#40797](https://github.com/ClickHouse/ClickHouse/issues/40797). [#40867](https://github.com/ClickHouse/ClickHouse/pull/40867) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix uncaught DNS_ERROR on failed connection to replicas. [#40881](https://github.com/ClickHouse/ClickHouse/pull/40881) ([Robert Coelho](https://github.com/coelho)). +* Fix bug when removing unneeded columns in subquery. [#40884](https://github.com/ClickHouse/ClickHouse/pull/40884) ([luocongkai](https://github.com/TKaxe)). +* Fix extra memory allocation for remote read buffers. [#40896](https://github.com/ClickHouse/ClickHouse/pull/40896) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fixed a behaviour when user with explicitly revoked grant for dropping databases can still drop it. [#40906](https://github.com/ClickHouse/ClickHouse/pull/40906) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* A fix for ClickHouse Keeper: correctly compare paths in write requests to Keeper internal system node paths. [#40918](https://github.com/ClickHouse/ClickHouse/pull/40918) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix deadlock in WriteBufferFromS3. [#40943](https://github.com/ClickHouse/ClickHouse/pull/40943) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix access rights for `DESCRIBE TABLE url()` and some other `DESCRIBE TABLE ()`. [#40975](https://github.com/ClickHouse/ClickHouse/pull/40975) ([Vitaly Baranov](https://github.com/vitlibar)). +* Remove wrong parser logic for `WITH GROUPING SETS` which may lead to nullptr dereference. [#41049](https://github.com/ClickHouse/ClickHouse/pull/41049) ([Duc Canh Le](https://github.com/canhld94)). +* A fix for ClickHouse Keeper: fix possible segfault during Keeper shutdown. [#41075](https://github.com/ClickHouse/ClickHouse/pull/41075) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix possible segfaults, use-heap-after-free and memory leak in aggregate function combinators. Closes [#40848](https://github.com/ClickHouse/ClickHouse/issues/40848). [#41083](https://github.com/ClickHouse/ClickHouse/pull/41083) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix query_views_log with Window views. [#41132](https://github.com/ClickHouse/ClickHouse/pull/41132) ([Raúl Marín](https://github.com/Algunenano)). +* Disables optimize_monotonous_functions_in_order_by by default, mitigates: [#40094](https://github.com/ClickHouse/ClickHouse/issues/40094). [#41136](https://github.com/ClickHouse/ClickHouse/pull/41136) ([Denny Crane](https://github.com/den-crane)). +* Fixed "possible deadlock avoided" error on automatic conversion of database engine from Ordinary to Atomic. [#41146](https://github.com/ClickHouse/ClickHouse/pull/41146) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix SIGSEGV in SortedBlocksWriter in case of empty block (possible to get with `optimize_aggregation_in_order` and `join_algorithm=auto`). [#41154](https://github.com/ClickHouse/ClickHouse/pull/41154) ([Azat Khuzhin](https://github.com/azat)). +* Fix incorrect query result when trivial count optimization is in effect with array join. This fixes [#39431](https://github.com/ClickHouse/ClickHouse/issues/39431). [#41158](https://github.com/ClickHouse/ClickHouse/pull/41158) ([Denny Crane](https://github.com/den-crane)). +* Fix stack-use-after-return in GetPriorityForLoadBalancing::getPriorityFunc(). [#41159](https://github.com/ClickHouse/ClickHouse/pull/41159) ([Azat Khuzhin](https://github.com/azat)). +* Fix positional arguments exception Positional argument out of bounds. Closes [#40634](https://github.com/ClickHouse/ClickHouse/issues/40634). [#41189](https://github.com/ClickHouse/ClickHouse/pull/41189) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix background clean up of broken detached parts. [#41190](https://github.com/ClickHouse/ClickHouse/pull/41190) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix exponential query rewrite in case of lots of cross joins with where, close [#21557](https://github.com/ClickHouse/ClickHouse/issues/21557). [#41223](https://github.com/ClickHouse/ClickHouse/pull/41223) ([Vladimir C](https://github.com/vdimir)). +* Fix possible logical error in write-through cache, which happened because not all types of exception were handled as needed. Closes [#41208](https://github.com/ClickHouse/ClickHouse/issues/41208). [#41232](https://github.com/ClickHouse/ClickHouse/pull/41232) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix String log entry in system.filesystem_cache_log. [#41233](https://github.com/ClickHouse/ClickHouse/pull/41233) ([jmimbrero](https://github.com/josemimbrero-tinybird)). +* Queries with `OFFSET` clause in subquery and `WHERE` clause in outer query might return incorrect result, it's fixed. Fixes [#40416](https://github.com/ClickHouse/ClickHouse/issues/40416). [#41280](https://github.com/ClickHouse/ClickHouse/pull/41280) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix possible wrong query result with `query_plan_optimize_primary_key` enabled. Fixes [#40599](https://github.com/ClickHouse/ClickHouse/issues/40599). [#41281](https://github.com/ClickHouse/ClickHouse/pull/41281) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Do not allow invalid sequences influence other rows in lowerUTF8/upperUTF8. [#41286](https://github.com/ClickHouse/ClickHouse/pull/41286) ([Azat Khuzhin](https://github.com/azat)). +* Fix `ALTER
    ADD COLUMN` queries with columns of type `Object`. [#41290](https://github.com/ClickHouse/ClickHouse/pull/41290) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed "No node" error when selecting from `system.distributed_ddl_queue` when there's no `distributed_ddl.path` in config. Fixes [#41096](https://github.com/ClickHouse/ClickHouse/issues/41096). [#41296](https://github.com/ClickHouse/ClickHouse/pull/41296) ([young scott](https://github.com/young-scott)). +* Fix incorrect logical error `Expected relative path` in disk object storage. Related to [#41246](https://github.com/ClickHouse/ClickHouse/issues/41246). [#41297](https://github.com/ClickHouse/ClickHouse/pull/41297) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add column type check before UUID insertion in MsgPack format. [#41309](https://github.com/ClickHouse/ClickHouse/pull/41309) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix possible crash after inserting asynchronously (with enabled setting `async_insert`) malformed data to columns of type `Object`. It could happen, if JSONs in all batches of async inserts were invalid and could not be parsed. [#41336](https://github.com/ClickHouse/ClickHouse/pull/41336) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible deadlock with async_socket_for_remote/use_hedged_requests and parallel KILL. [#41343](https://github.com/ClickHouse/ClickHouse/pull/41343) ([Azat Khuzhin](https://github.com/azat)). +* Disables optimize_rewrite_sum_if_to_count_if by default, mitigates: [#38605](https://github.com/ClickHouse/ClickHouse/issues/38605) [#38683](https://github.com/ClickHouse/ClickHouse/issues/38683). [#41388](https://github.com/ClickHouse/ClickHouse/pull/41388) ([Denny Crane](https://github.com/den-crane)). +* Since 22.8 `ON CLUSTER` clause is ignored if database is `Replicated` and cluster name and database name are the same. Because of this `DROP PARTITION ON CLUSTER` worked unexpected way with `Replicated`. It's fixed, now `ON CLUSTER` clause is ignored only for queries that are replicated on database level. Fixes [#41299](https://github.com/ClickHouse/ClickHouse/issues/41299). [#41390](https://github.com/ClickHouse/ClickHouse/pull/41390) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix possible hung/deadlock on query cancellation (`KILL QUERY` or server shutdown). [#41467](https://github.com/ClickHouse/ClickHouse/pull/41467) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible server crash when using the JBOD feature. This fixes [#41365](https://github.com/ClickHouse/ClickHouse/issues/41365). [#41483](https://github.com/ClickHouse/ClickHouse/pull/41483) ([Amos Bird](https://github.com/amosbird)). +* Fix conversion from nullable fixed string to string. [#41541](https://github.com/ClickHouse/ClickHouse/pull/41541) ([Duc Canh Le](https://github.com/canhld94)). +* Prevent crash when passing wrong aggregation states to groupBitmap*. [#41563](https://github.com/ClickHouse/ClickHouse/pull/41563) ([Raúl Marín](https://github.com/Algunenano)). +* Queries with `ORDER BY` and `1500 <= LIMIT <= max_block_size` could return incorrect result with missing rows from top. Fixes [#41182](https://github.com/ClickHouse/ClickHouse/issues/41182). [#41576](https://github.com/ClickHouse/ClickHouse/pull/41576) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix read bytes/rows in X-ClickHouse-Summary with materialized views. [#41586](https://github.com/ClickHouse/ClickHouse/pull/41586) ([Raúl Marín](https://github.com/Algunenano)). +* Fix possible `pipeline stuck` exception for queries with `OFFSET`. The error was found with `enable_optimize_predicate_expression = 0` and always false condition in `WHERE`. Fixes [#41383](https://github.com/ClickHouse/ClickHouse/issues/41383). [#41588](https://github.com/ClickHouse/ClickHouse/pull/41588) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). + +### ClickHouse release 22.8, 2022-08-18 + +#### Backward Incompatible Change +* Extended range of `Date32` and `DateTime64` to support dates from the year 1900 to 2299. In previous versions, the supported interval was only from the year 1925 to 2283. The implementation is using the proleptic Gregorian calendar (which is conformant with [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601):2004 (clause 3.2.1 The Gregorian calendar)) instead of accounting for historical transitions from the Julian to the Gregorian calendar. This change affects implementation-specific behavior for out-of-range arguments. E.g. if in previous versions the value of `1899-01-01` was clamped to `1925-01-01`, in the new version it will be clamped to `1900-01-01`. It changes the behavior of rounding with `toStartOfInterval` if you pass `INTERVAL 3 QUARTER` up to one quarter because the intervals are counted from an implementation-specific point of time. Closes [#28216](https://github.com/ClickHouse/ClickHouse/issues/28216), improves [#38393](https://github.com/ClickHouse/ClickHouse/issues/38393). [#39425](https://github.com/ClickHouse/ClickHouse/pull/39425) ([Roman Vasin](https://github.com/rvasin)). +* Now, all relevant dictionary sources respect `remote_url_allow_hosts` setting. It was already done for HTTP, Cassandra, Redis. Added ClickHouse, MongoDB, MySQL, PostgreSQL. Host is checked only for dictionaries created from DDL. [#39184](https://github.com/ClickHouse/ClickHouse/pull/39184) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Prebuilt ClickHouse x86 binaries now require support for AVX instructions, i.e. a CPU not older than Intel Sandy Bridge / AMD Bulldozer, both released in 2011. [#39000](https://github.com/ClickHouse/ClickHouse/pull/39000) ([Robert Schulze](https://github.com/rschu1ze)). +* Make the remote filesystem cache composable, allow not to evict certain files (regarding idx, mrk, ..), delete old cache version. Now it is possible to configure cache over Azure blob storage disk, over Local disk, over StaticWeb disk, etc. This PR is marked backward incompatible because cache configuration changes and in order for cache to work need to update the config file. Old cache will still be used with new configuration. The server will startup fine with the old cache configuration. Closes https://github.com/ClickHouse/ClickHouse/issues/36140. Closes https://github.com/ClickHouse/ClickHouse/issues/37889. ([Kseniia Sumarokova](https://github.com/kssenii)). [#36171](https://github.com/ClickHouse/ClickHouse/pull/36171)) + +#### New Feature +* Support SQL standard DELETE FROM syntax on merge tree tables and lightweight delete implementation for merge tree families. [#37893](https://github.com/ClickHouse/ClickHouse/pull/37893) ([Jianmei Zhang](https://github.com/zhangjmruc)) ([Alexander Gololobov](https://github.com/davenger)). Note: this new feature does not make ClickHouse an HTAP DBMS. +* Query parameters can be set in interactive mode as `SET param_abc = 'def'` and transferred via the native protocol as settings. [#39906](https://github.com/ClickHouse/ClickHouse/pull/39906) ([Nikita Taranov](https://github.com/nickitat)). +* Quota key can be set in the native protocol ([Yakov Olkhovsky](https://github.com/ClickHouse/ClickHouse/pull/39874)). +* Added a setting `exact_rows_before_limit` (0/1). When enabled, ClickHouse will provide exact value for `rows_before_limit_at_least` statistic, but with the cost that the data before limit will have to be read completely. This closes [#6613](https://github.com/ClickHouse/ClickHouse/issues/6613). [#25333](https://github.com/ClickHouse/ClickHouse/pull/25333) ([kevin wan](https://github.com/MaxWk)). +* Added support for parallel distributed insert select with `s3Cluster` table function into tables with `Distributed` and `Replicated` engine [#34670](https://github.com/ClickHouse/ClickHouse/issues/34670). [#39107](https://github.com/ClickHouse/ClickHouse/pull/39107) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add new settings to control schema inference from text formats: - `input_format_try_infer_dates` - try infer dates from strings. - `input_format_try_infer_datetimes` - try infer datetimes from strings. - `input_format_try_infer_integers` - try infer `Int64` instead of `Float64`. - `input_format_json_try_infer_numbers_from_strings` - try infer numbers from json strings in JSON formats. [#39186](https://github.com/ClickHouse/ClickHouse/pull/39186) ([Kruglov Pavel](https://github.com/Avogar)). +* An option to provide JSON formatted log output. The purpose is to allow easier ingestion and query in log analysis tools. [#39277](https://github.com/ClickHouse/ClickHouse/pull/39277) ([Mallik Hassan](https://github.com/SadiHassan)). +* Add function `nowInBlock` which allows getting the current time during long-running and continuous queries. Closes [#39522](https://github.com/ClickHouse/ClickHouse/issues/39522). Notes: there are no functions `now64InBlock` neither `todayInBlock`. [#39533](https://github.com/ClickHouse/ClickHouse/pull/39533) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add ability to specify settings for an `executable()` table function. [#39681](https://github.com/ClickHouse/ClickHouse/pull/39681) ([Constantine Peresypkin](https://github.com/pkit)). +* Implemented automatic conversion of database engine from `Ordinary` to `Atomic`. Create empty `convert_ordinary_to_atomic` file in `flags` directory and all `Ordinary` databases will be converted automatically on next server start. Resolves [#39546](https://github.com/ClickHouse/ClickHouse/issues/39546). [#39933](https://github.com/ClickHouse/ClickHouse/pull/39933) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Support `SELECT ... INTO OUTFILE '...' AND STDOUT`. [#37490](https://github.com/ClickHouse/ClickHouse/issues/37490). [#39054](https://github.com/ClickHouse/ClickHouse/pull/39054) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Add formats `PrettyMonoBlock`, `PrettyNoEscapesMonoBlock`, `PrettyCompactNoEscapes`, `PrettyCompactNoEscapesMonoBlock`, `PrettySpaceNoEscapes`, `PrettySpaceMonoBlock`, `PrettySpaceNoEscapesMonoBlock`. [#39646](https://github.com/ClickHouse/ClickHouse/pull/39646) ([Kruglov Pavel](https://github.com/Avogar)). + +#### Performance Improvement +* Improved memory usage during memory efficient merging of aggregation results. [#39429](https://github.com/ClickHouse/ClickHouse/pull/39429) ([Nikita Taranov](https://github.com/nickitat)). +* Added concurrency control logic to limit total number of concurrent threads created by queries. [#37558](https://github.com/ClickHouse/ClickHouse/pull/37558) ([Sergei Trifonov](https://github.com/serxa)). Add `concurrent_threads_soft_limit parameter` to increase performance in case of high QPS by means of limiting total number of threads for all queries. [#37285](https://github.com/ClickHouse/ClickHouse/pull/37285) ([Roman Vasin](https://github.com/rvasin)). +* Add `SLRU` cache policy for uncompressed cache and marks cache. ([Kseniia Sumarokova](https://github.com/kssenii)). [#34651](https://github.com/ClickHouse/ClickHouse/pull/34651) ([alexX512](https://github.com/alexX512)). Decoupling local cache function and cache algorithm [#38048](https://github.com/ClickHouse/ClickHouse/pull/38048) ([Han Shukai](https://github.com/KinderRiven)). +* Intel® In-Memory Analytics Accelerator (Intel® IAA) is a hardware accelerator available in the upcoming generation of Intel® Xeon® Scalable processors ("Sapphire Rapids"). Its goal is to speed up common operations in analytics like data (de)compression and filtering. ClickHouse gained the new "DeflateQpl" compression codec which utilizes the Intel® IAA offloading technology to provide a high-performance DEFLATE implementation. The codec uses the [Intel® Query Processing Library (QPL)](https://github.com/intel/qpl) which abstracts access to the hardware accelerator, respectively to a software fallback in case the hardware accelerator is not available. DEFLATE provides in general higher compression rates than ClickHouse's LZ4 default codec, and as a result, offers less disk I/O and lower main memory consumption. [#36654](https://github.com/ClickHouse/ClickHouse/pull/36654) ([jasperzhu](https://github.com/jinjunzh)). [#39494](https://github.com/ClickHouse/ClickHouse/pull/39494) ([Robert Schulze](https://github.com/rschu1ze)). +* `DISTINCT` in order with `ORDER BY`: Deduce way to sort based on input stream sort description. Skip sorting if input stream is already sorted. [#38719](https://github.com/ClickHouse/ClickHouse/pull/38719) ([Igor Nikonov](https://github.com/devcrafter)). Improve memory usage (significantly) and query execution time + use `DistinctSortedChunkTransform` for final distinct when `DISTINCT` columns match `ORDER BY` columns, but rename to `DistinctSortedStreamTransform` in `EXPLAIN PIPELINE` → this improves memory usage significantly + remove unnecessary allocations in hot loop in `DistinctSortedChunkTransform`. [#39432](https://github.com/ClickHouse/ClickHouse/pull/39432) ([Igor Nikonov](https://github.com/devcrafter)). Use `DistinctSortedTransform` only when sort description is applicable to DISTINCT columns, otherwise fall back to ordinary DISTINCT implementation + it allows making less checks during `DistinctSortedTransform` execution. [#39528](https://github.com/ClickHouse/ClickHouse/pull/39528) ([Igor Nikonov](https://github.com/devcrafter)). Fix: `DistinctSortedTransform` didn't take advantage of sorting. It never cleared HashSet since clearing_columns were detected incorrectly (always empty). So, it basically worked as ordinary `DISTINCT` (`DistinctTransform`). The fix reduces memory usage significantly. [#39538](https://github.com/ClickHouse/ClickHouse/pull/39538) ([Igor Nikonov](https://github.com/devcrafter)). +* Use local node as first priority to get structure of remote table when executing `cluster` and similar table functions. [#39440](https://github.com/ClickHouse/ClickHouse/pull/39440) ([Mingliang Pan](https://github.com/liangliangpan)). +* Optimize filtering by numeric columns with AVX512VBMI2 compress store. [#39633](https://github.com/ClickHouse/ClickHouse/pull/39633) ([Guo Wangyang](https://github.com/guowangy)). For systems with AVX512 VBMI2, this PR improves performance by ca. 6% for SSB benchmark queries queries 3.1, 3.2 and 3.3 (SF=100). Tested on Intel Icelake Xeon 8380 * 2 socket. [#40033](https://github.com/ClickHouse/ClickHouse/pull/40033) ([Robert Schulze](https://github.com/rschu1ze)). +* Optimize index analysis with functional expressions in multi-thread scenario. [#39812](https://github.com/ClickHouse/ClickHouse/pull/39812) ([Guo Wangyang](https://github.com/guowangy)). +* Optimizations for complex queries: Don't visit the AST for UDFs if none are registered. [#40069](https://github.com/ClickHouse/ClickHouse/pull/40069) ([Raúl Marín](https://github.com/Algunenano)). Optimize CurrentMemoryTracker alloc and free. [#40078](https://github.com/ClickHouse/ClickHouse/pull/40078) ([Raúl Marín](https://github.com/Algunenano)). +* Improved Base58 encoding/decoding. [#39292](https://github.com/ClickHouse/ClickHouse/pull/39292) ([Andrey Zvonov](https://github.com/zvonand)). +* Improve bytes to bits mask transform for SSE/AVX/AVX512. [#39586](https://github.com/ClickHouse/ClickHouse/pull/39586) ([Guo Wangyang](https://github.com/guowangy)). + +#### Improvement +* Normalize `AggregateFunction` types and state representations because optimizations like [#35788](https://github.com/ClickHouse/ClickHouse/pull/35788) will treat `count(not null columns)` as `count()`, which might confuses distributed interpreters with the following error : `Conversion from AggregateFunction(count) to AggregateFunction(count, Int64) is not supported`. [#39420](https://github.com/ClickHouse/ClickHouse/pull/39420) ([Amos Bird](https://github.com/amosbird)). The functions with identical states can be used in materialized views interchangeably. +* Rework and simplify the `system.backups` table, remove the `internal` column, allow user to set the ID of operation, add columns `num_files`, `uncompressed_size`, `compressed_size`, `start_time`, `end_time`. [#39503](https://github.com/ClickHouse/ClickHouse/pull/39503) ([Vitaly Baranov](https://github.com/vitlibar)). +* Improved structure of DDL query result table for `Replicated` database (separate columns with shard and replica name, more clear status) - `CREATE TABLE ... ON CLUSTER` queries can be normalized on initiator first if `distributed_ddl_entry_format_version` is set to 3 (default value). It means that `ON CLUSTER` queries may not work if initiator does not belong to the cluster that specified in query. Fixes [#37318](https://github.com/ClickHouse/ClickHouse/issues/37318), [#39500](https://github.com/ClickHouse/ClickHouse/issues/39500) - Ignore `ON CLUSTER` clause if database is `Replicated` and cluster name equals to database name. Related to [#35570](https://github.com/ClickHouse/ClickHouse/issues/35570) - Miscellaneous minor fixes for `Replicated` database engine - Check metadata consistency when starting up `Replicated` database, start replica recovery in case of mismatch of local metadata and metadata in Keeper. Resolves [#24880](https://github.com/ClickHouse/ClickHouse/issues/24880). [#37198](https://github.com/ClickHouse/ClickHouse/pull/37198) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Add result_rows and result_bytes to progress reports (`X-ClickHouse-Summary`). [#39567](https://github.com/ClickHouse/ClickHouse/pull/39567) ([Raúl Marín](https://github.com/Algunenano)). +* Improve primary key analysis for MergeTree. [#25563](https://github.com/ClickHouse/ClickHouse/pull/25563) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* `timeSlots` now works with DateTime64; subsecond duration and slot size available when working with DateTime64. [#37951](https://github.com/ClickHouse/ClickHouse/pull/37951) ([Andrey Zvonov](https://github.com/zvonand)). +* Added support of `LEFT SEMI` and `LEFT ANTI` direct join with `EmbeddedRocksDB` tables. [#38956](https://github.com/ClickHouse/ClickHouse/pull/38956) ([Vladimir C](https://github.com/vdimir)). +* Add profile events for fsync operations. [#39179](https://github.com/ClickHouse/ClickHouse/pull/39179) ([Azat Khuzhin](https://github.com/azat)). +* Add the second argument to the ordinary function `file(path[, default])`, which function returns in the case when a file does not exists. [#39218](https://github.com/ClickHouse/ClickHouse/pull/39218) ([Nikolay Degterinsky](https://github.com/evillique)). +* Some small fixes for reading via http, allow to retry partial content in case if 200 OK. [#39244](https://github.com/ClickHouse/ClickHouse/pull/39244) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support queries `CREATE TEMPORARY TABLE ... () AS ...`. [#39462](https://github.com/ClickHouse/ClickHouse/pull/39462) ([Kruglov Pavel](https://github.com/Avogar)). +* Add support of `!`/`*` (exclamation/asterisk) in custom TLDs (`cutToFirstSignificantSubdomainCustom()`/`cutToFirstSignificantSubdomainCustomWithWWW()`/`firstSignificantSubdomainCustom()`). [#39496](https://github.com/ClickHouse/ClickHouse/pull/39496) ([Azat Khuzhin](https://github.com/azat)). +* Add support for TLS connections to NATS. Implements [#39525](https://github.com/ClickHouse/ClickHouse/issues/39525). [#39527](https://github.com/ClickHouse/ClickHouse/pull/39527) ([Constantine Peresypkin](https://github.com/pkit)). +* `clickhouse-obfuscator` (a tool for database obfuscation for testing and load generation) now has the new `--save` and `--load` parameters to work with pre-trained models. This closes [#39534](https://github.com/ClickHouse/ClickHouse/issues/39534). [#39541](https://github.com/ClickHouse/ClickHouse/pull/39541) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix incorrect behavior of log rotation during restart. [#39558](https://github.com/ClickHouse/ClickHouse/pull/39558) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix building aggregate projections when external aggregation is on. Mark as improvement because the case is rare and there exists easy workaround to fix it via changing settings. This fixes [#39667](https://github.com/ClickHouse/ClickHouse/issues/39667) . [#39671](https://github.com/ClickHouse/ClickHouse/pull/39671) ([Amos Bird](https://github.com/amosbird)). +* Allow to execute hash functions with arguments of type `Map`. [#39685](https://github.com/ClickHouse/ClickHouse/pull/39685) ([Anton Popov](https://github.com/CurtizJ)). +* Add a configuration parameter to hide addresses in stack traces. It may improve security a little but generally, it is harmful and should not be used. [#39690](https://github.com/ClickHouse/ClickHouse/pull/39690) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Change the prefix size of AggregateFunctionDistinct to make sure nested function data memory segment is aligned. [#39696](https://github.com/ClickHouse/ClickHouse/pull/39696) ([Pxl](https://github.com/BiteTheDDDDt)). +* Properly escape credentials passed to the `clickhouse-diagnostic` tool. [#39707](https://github.com/ClickHouse/ClickHouse/pull/39707) ([Dale McDiarmid](https://github.com/gingerwizard)). +* ClickHouse Keeper improvement: create a snapshot on exit. It can be controlled with the config `keeper_server.create_snapshot_on_exit`, `true` by default. [#39755](https://github.com/ClickHouse/ClickHouse/pull/39755) ([Antonio Andelic](https://github.com/antonio2368)). +* Support primary key analysis for `row_policy_filter` and `additional_filter`. It also helps fix issues like [#37454](https://github.com/ClickHouse/ClickHouse/issues/37454) . [#39826](https://github.com/ClickHouse/ClickHouse/pull/39826) ([Amos Bird](https://github.com/amosbird)). +* Fix two usability issues in Play UI: - it was non-pixel-perfect on iPad due to parasitic border radius and margins; - the progress indication did not display after the first query. This closes [#39957](https://github.com/ClickHouse/ClickHouse/issues/39957). This closes [#39960](https://github.com/ClickHouse/ClickHouse/issues/39960). [#39961](https://github.com/ClickHouse/ClickHouse/pull/39961) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Play UI: add row numbers; add cell selection on click; add hysteresis for table cells. [#39962](https://github.com/ClickHouse/ClickHouse/pull/39962) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Play UI: recognize tab key in textarea, but at the same time don't mess up with tab navigation. [#40053](https://github.com/ClickHouse/ClickHouse/pull/40053) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The client will show server-side elapsed time. This is important for the performance comparison of ClickHouse services in remote datacenters. This closes [#38070](https://github.com/ClickHouse/ClickHouse/issues/38070). See also [this](https://github.com/ClickHouse/ClickBench/blob/main/hardware/benchmark-cloud.sh#L37) for motivation. [#39968](https://github.com/ClickHouse/ClickHouse/pull/39968) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Adds `parseDateTime64BestEffortUS`, `parseDateTime64BestEffortUSOrNull`, `parseDateTime64BestEffortUSOrZero` functions, closing [#37492](https://github.com/ClickHouse/ClickHouse/issues/37492). [#40015](https://github.com/ClickHouse/ClickHouse/pull/40015) ([Tanya Bragin](https://github.com/tbragin)). +* Extend the `system.processors_profile_log` with more information such as input rows. [#40121](https://github.com/ClickHouse/ClickHouse/pull/40121) ([Amos Bird](https://github.com/amosbird)). +* Display server-side time in `clickhouse-benchmark` by default if it is available (since ClickHouse version 22.8). This is needed to correctly compare the performance of clouds. This behavior can be changed with the new `--client-side-time` command line option. Change the `--randomize` command line option from `--randomize 1` to the form without argument. [#40193](https://github.com/ClickHouse/ClickHouse/pull/40193) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add counters (ProfileEvents) for cases when query complexity limitation has been set and has reached (a separate counter for `overflow_mode` = `break` and `throw`). For example, if you have set up `max_rows_to_read` with `read_overflow_mode = 'break'`, looking at the value of `OverflowBreak` counter will allow distinguishing incomplete results. [#40205](https://github.com/ClickHouse/ClickHouse/pull/40205) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix memory accounting in case of "Memory limit exceeded" errors (previously [peak] memory usage was takes failed allocations into account). [#40249](https://github.com/ClickHouse/ClickHouse/pull/40249) ([Azat Khuzhin](https://github.com/azat)). +* Add metrics for filesystem cache: `FilesystemCacheSize` and `FilesystemCacheElements`. [#40260](https://github.com/ClickHouse/ClickHouse/pull/40260) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support hadoop secure RPC transfer (hadoop.rpc.protection=privacy and hadoop.rpc.protection=integrity). [#39411](https://github.com/ClickHouse/ClickHouse/pull/39411) ([michael1589](https://github.com/michael1589)). +* Avoid continuously growing memory consumption of pattern cache when using functions multi(Fuzzy)Match(Any|AllIndices|AnyIndex)(). [#40264](https://github.com/ClickHouse/ClickHouse/pull/40264) ([Robert Schulze](https://github.com/rschu1ze)). + +#### Build/Testing/Packaging Improvement +* [ClickFiddle](https://fiddle.clickhouse.com/): A new tool for testing ClickHouse versions in read/write mode (**Igor Baliuk**). +* ClickHouse binary is made self-extracting [#35775](https://github.com/ClickHouse/ClickHouse/pull/35775) ([Yakov Olkhovskiy, Arthur Filatenkov](https://github.com/yakov-olkhovskiy)). +* Update tzdata to 2022b to support the new timezone changes. See https://github.com/google/cctz/pull/226. Chile's 2022 DST start is delayed from September 4 to September 11. Iran plans to stop observing DST permanently, after it falls back on 2022-09-21. There are corrections of the historical time zone of Asia/Tehran in the year 1977: Iran adopted standard time in 1935, not 1946. In 1977 it observed DST from 03-21 23:00 to 10-20 24:00; its 1978 transitions were on 03-24 and 08-05, not 03-20 and 10-20; and its spring 1979 transition was on 05-27, not 03-21 (https://data.iana.org/time-zones/tzdb/NEWS). ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Former packages used to install systemd.service file to `/etc`. The files there are marked as `conf` and are not cleaned out, and not updated automatically. This PR cleans them out. [#39323](https://github.com/ClickHouse/ClickHouse/pull/39323) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Ensure LSan is effective. [#39430](https://github.com/ClickHouse/ClickHouse/pull/39430) ([Azat Khuzhin](https://github.com/azat)). +* TSAN has issues with clang-14 (https://github.com/google/sanitizers/issues/1552, https://github.com/google/sanitizers/issues/1540), so here we build the TSAN binaries with clang-15. [#39450](https://github.com/ClickHouse/ClickHouse/pull/39450) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Remove the option to build ClickHouse tools as separate executable programs. This fixes [#37847](https://github.com/ClickHouse/ClickHouse/issues/37847). [#39520](https://github.com/ClickHouse/ClickHouse/pull/39520) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Small preparations for build on s390x (which is big-endian). [#39627](https://github.com/ClickHouse/ClickHouse/pull/39627) ([Harry Lee](https://github.com/HarryLeeIBM)). [#39656](https://github.com/ClickHouse/ClickHouse/pull/39656) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed Endian issue in BitHelpers for s390x. [#39656](https://github.com/ClickHouse/ClickHouse/pull/39656) ([Harry Lee](https://github.com/HarryLeeIBM)). Implement a piece of code related to SipHash for s390x architecture (which is not supported by ClickHouse). [#39732](https://github.com/ClickHouse/ClickHouse/pull/39732) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed an Endian issue in Coordination snapshot code for s390x architecture (which is not supported by ClickHouse). [#39931](https://github.com/ClickHouse/ClickHouse/pull/39931) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed Endian issues in Codec code for s390x architecture (which is not supported by ClickHouse). [#40008](https://github.com/ClickHouse/ClickHouse/pull/40008) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed Endian issues in reading/writing BigEndian binary data in ReadHelpers and WriteHelpers code for s390x architecture (which is not supported by ClickHouse). [#40179](https://github.com/ClickHouse/ClickHouse/pull/40179) ([Harry Lee](https://github.com/HarryLeeIBM)). +* Support build with `clang-16` (trunk). This closes [#39949](https://github.com/ClickHouse/ClickHouse/issues/39949). [#40181](https://github.com/ClickHouse/ClickHouse/pull/40181) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Prepare RISC-V 64 build to run in CI. This is for [#40141](https://github.com/ClickHouse/ClickHouse/issues/40141). [#40197](https://github.com/ClickHouse/ClickHouse/pull/40197) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Simplified function registration macro interface (`FUNCTION_REGISTER*`) to eliminate the step to add and call an extern function in the registerFunctions.cpp, it also makes incremental builds of a new function faster. [#38615](https://github.com/ClickHouse/ClickHouse/pull/38615) ([Li Yin](https://github.com/liyinsg)). +* Docker: Now entrypoint.sh in docker image creates and executes chown for all folders it found in config for multidisk setup [#17717](https://github.com/ClickHouse/ClickHouse/issues/17717). [#39121](https://github.com/ClickHouse/ClickHouse/pull/39121) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). + +#### Bug Fix +* Fix possible segfault in `CapnProto` input format. This bug was found and send through ClickHouse bug-bounty [program](https://github.com/ClickHouse/ClickHouse/issues/38986) by *kiojj*. [#40241](https://github.com/ClickHouse/ClickHouse/pull/40241) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix a very rare case of incorrect behavior of array subscript operator. This closes [#28720](https://github.com/ClickHouse/ClickHouse/issues/28720). [#40185](https://github.com/ClickHouse/ClickHouse/pull/40185) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix insufficient argument check for encryption functions (found by query fuzzer). This closes [#39987](https://github.com/ClickHouse/ClickHouse/issues/39987). [#40194](https://github.com/ClickHouse/ClickHouse/pull/40194) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix the case when the order of columns can be incorrect if the `IN` operator is used with a table with `ENGINE = Set` containing multiple columns. This fixes [#13014](https://github.com/ClickHouse/ClickHouse/issues/13014). [#40225](https://github.com/ClickHouse/ClickHouse/pull/40225) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix seeking while reading from encrypted disk. This PR fixes [#38381](https://github.com/ClickHouse/ClickHouse/issues/38381). [#39687](https://github.com/ClickHouse/ClickHouse/pull/39687) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix duplicate columns in join plan. Finally, solve [#26809](https://github.com/ClickHouse/ClickHouse/issues/26809). [#40009](https://github.com/ClickHouse/ClickHouse/pull/40009) ([Vladimir C](https://github.com/vdimir)). +* Fixed query hanging for SELECT with ORDER BY WITH FILL with different date/time types. [#37849](https://github.com/ClickHouse/ClickHouse/pull/37849) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix ORDER BY that matches projections ORDER BY (before it simply returns unsorted result). [#38725](https://github.com/ClickHouse/ClickHouse/pull/38725) ([Azat Khuzhin](https://github.com/azat)). +* Do not optimise functions in GROUP BY statements if they shadow one of the table columns or expressions. Fixes [#37032](https://github.com/ClickHouse/ClickHouse/issues/37032). [#39103](https://github.com/ClickHouse/ClickHouse/pull/39103) ([Anton Kozlov](https://github.com/tonickkozlov)). +* Fix wrong table name in logs after RENAME TABLE. This fixes [#38018](https://github.com/ClickHouse/ClickHouse/issues/38018). [#39227](https://github.com/ClickHouse/ClickHouse/pull/39227) ([Amos Bird](https://github.com/amosbird)). +* Fix positional arguments in case of columns pruning when optimising the query. Closes [#38433](https://github.com/ClickHouse/ClickHouse/issues/38433). [#39293](https://github.com/ClickHouse/ClickHouse/pull/39293) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix bug in schema inference in case of empty messages in Protobuf/CapnProto formats that allowed to create column with empty `Tuple` type. Closes [#39051](https://github.com/ClickHouse/ClickHouse/issues/39051) Add 2 new settings `input_format_{protobuf/capnproto}_skip_fields_with_unsupported_types_in_schema_inference` that allow to skip fields with unsupported types while schema inference for Protobuf and CapnProto formats. [#39357](https://github.com/ClickHouse/ClickHouse/pull/39357) ([Kruglov Pavel](https://github.com/Avogar)). +* (Window View is an experimental feature) Fix segmentation fault on `CREATE WINDOW VIEW .. ON CLUSTER ... INNER`. Closes [#39363](https://github.com/ClickHouse/ClickHouse/issues/39363). [#39384](https://github.com/ClickHouse/ClickHouse/pull/39384) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix WriteBuffer finalize when cancelling insert into function (in previous versions it may leat to std::terminate). [#39458](https://github.com/ClickHouse/ClickHouse/pull/39458) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix storing of columns of type `Object` in sparse serialization. [#39464](https://github.com/ClickHouse/ClickHouse/pull/39464) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible "Not found column in block" exception when using projections. This closes [#39469](https://github.com/ClickHouse/ClickHouse/issues/39469). [#39470](https://github.com/ClickHouse/ClickHouse/pull/39470) ([å°è·¯](https://github.com/nicelulu)). +* Fix exception on race between DROP and INSERT with materialized views. [#39477](https://github.com/ClickHouse/ClickHouse/pull/39477) ([Azat Khuzhin](https://github.com/azat)). +* A bug in Apache Avro library: fix data race and possible heap-buffer-overflow in Avro format. Closes [#39094](https://github.com/ClickHouse/ClickHouse/issues/39094) Closes [#33652](https://github.com/ClickHouse/ClickHouse/issues/33652). [#39498](https://github.com/ClickHouse/ClickHouse/pull/39498) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix rare bug in asynchronous reading (with setting `local_filesystem_read_method='pread_threadpool'`) with enabled `O_DIRECT` (enabled by setting `min_bytes_to_use_direct_io`). [#39506](https://github.com/ClickHouse/ClickHouse/pull/39506) ([Anton Popov](https://github.com/CurtizJ)). +* (only on FreeBSD) Fixes "Code: 49. DB::Exception: FunctionFactory: the function name '' is not unique. (LOGICAL_ERROR)" observed on FreeBSD when starting clickhouse. [#39551](https://github.com/ClickHouse/ClickHouse/pull/39551) ([Alexander Gololobov](https://github.com/davenger)). +* Fix bug with the recently introduced "maxsplit" argument for `splitByChar`, which was not working correctly. [#39552](https://github.com/ClickHouse/ClickHouse/pull/39552) ([filimonov](https://github.com/filimonov)). +* Fix bug in ASOF JOIN with `enable_optimize_predicate_expression`, close [#37813](https://github.com/ClickHouse/ClickHouse/issues/37813). [#39556](https://github.com/ClickHouse/ClickHouse/pull/39556) ([Vladimir C](https://github.com/vdimir)). +* Fixed `CREATE/DROP INDEX` query with `ON CLUSTER` or `Replicated` database and `ReplicatedMergeTree`. It used to be executed on all replicas (causing error or DDL queue stuck). Fixes [#39511](https://github.com/ClickHouse/ClickHouse/issues/39511). [#39565](https://github.com/ClickHouse/ClickHouse/pull/39565) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix "column not found" error for push down with join, close [#39505](https://github.com/ClickHouse/ClickHouse/issues/39505). [#39575](https://github.com/ClickHouse/ClickHouse/pull/39575) ([Vladimir C](https://github.com/vdimir)). +* Fix the wrong `REGEXP_REPLACE` alias. This fixes https://github.com/ClickHouse/ClickBench/issues/9. [#39592](https://github.com/ClickHouse/ClickHouse/pull/39592) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fixed point of origin for exponential decay window functions to the last value in window. Previously, decay was calculated by formula `exp((t - curr_row_t) / decay_length)`, which is incorrect when right boundary of window is not `CURRENT ROW`. It was changed to: `exp((t - last_row_t) / decay_length)`. There is no change in results for windows with `ROWS BETWEEN (smth) AND CURRENT ROW`. [#39593](https://github.com/ClickHouse/ClickHouse/pull/39593) ([Vladimir Chebotaryov](https://github.com/quickhouse)). +* Fix Decimal division overflow, which can be detected based on operands scale. [#39600](https://github.com/ClickHouse/ClickHouse/pull/39600) ([Andrey Zvonov](https://github.com/zvonand)). +* Fix settings `output_format_arrow_string_as_string` and `output_format_arrow_low_cardinality_as_dictionary` work in combination. Closes [#39624](https://github.com/ClickHouse/ClickHouse/issues/39624). [#39647](https://github.com/ClickHouse/ClickHouse/pull/39647) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixed a bug in default database resolution in distributed table reads. [#39674](https://github.com/ClickHouse/ClickHouse/pull/39674) ([Anton Kozlov](https://github.com/tonickkozlov)). +* (Only with the obsolete Ordinary databases) Select might read data of dropped table if cache for mmap IO is used and database engine is Ordinary and new tables was created with the same name as dropped one had. It's fixed. [#39708](https://github.com/ClickHouse/ClickHouse/pull/39708) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix possible error `Invalid column type for ColumnUnique::insertRangeFrom. Expected String, got ColumnLowCardinality` Fixes [#38460](https://github.com/ClickHouse/ClickHouse/issues/38460). [#39716](https://github.com/ClickHouse/ClickHouse/pull/39716) ([Arthur Passos](https://github.com/arthurpassos)). +* Field names in the `meta` section of JSON format were erroneously double escaped. This closes [#39693](https://github.com/ClickHouse/ClickHouse/issues/39693). [#39747](https://github.com/ClickHouse/ClickHouse/pull/39747) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix wrong index analysis with tuples and operator `IN`, which could lead to wrong query result. [#39752](https://github.com/ClickHouse/ClickHouse/pull/39752) ([Anton Popov](https://github.com/CurtizJ)). +* Fix `EmbeddedRocksDB` tables filtering by key using params. [#39757](https://github.com/ClickHouse/ClickHouse/pull/39757) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix error `Invalid number of columns in chunk pushed to OutputPort` which was caused by ARRAY JOIN optimization. Fixes [#39164](https://github.com/ClickHouse/ClickHouse/issues/39164). [#39799](https://github.com/ClickHouse/ClickHouse/pull/39799) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* A workaround for a bug in Linux kernel. Fix `CANNOT_READ_ALL_DATA` exception with `local_filesystem_read_method=pread_threadpool`. This bug affected only Linux kernel version 5.9 and 5.10 according to [man](https://manpages.debian.org/testing/manpages-dev/preadv2.2.en.html#BUGS). [#39800](https://github.com/ClickHouse/ClickHouse/pull/39800) ([Anton Popov](https://github.com/CurtizJ)). +* (Only on NFS) Fix broken NFS mkdir for root-squashed volumes. [#39898](https://github.com/ClickHouse/ClickHouse/pull/39898) ([Constantine Peresypkin](https://github.com/pkit)). +* Remove dictionaries from prometheus metrics on DETACH/DROP. [#39926](https://github.com/ClickHouse/ClickHouse/pull/39926) ([Azat Khuzhin](https://github.com/azat)). +* Fix read of StorageFile with virtual columns. Closes [#39907](https://github.com/ClickHouse/ClickHouse/issues/39907). [#39943](https://github.com/ClickHouse/ClickHouse/pull/39943) ([flynn](https://github.com/ucasfl)). +* Fix big memory usage during fetches. Fixes [#39915](https://github.com/ClickHouse/ClickHouse/issues/39915). [#39990](https://github.com/ClickHouse/ClickHouse/pull/39990) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* (experimental feature) Fix `hashId` crash and salt parameter not being used. [#40002](https://github.com/ClickHouse/ClickHouse/pull/40002) ([Raúl Marín](https://github.com/Algunenano)). +* `EXCEPT` and `INTERSECT` operators may lead to crash if a specific combination of constant and non-constant columns were used. [#40020](https://github.com/ClickHouse/ClickHouse/pull/40020) ([Duc Canh Le](https://github.com/canhld94)). +* Fixed "Part directory doesn't exist" and "`tmp_` ... No such file or directory" errors during too slow INSERT or too long merge/mutation. Also fixed issue that may cause some replication queue entries to stuck without any errors or warnings in logs if previous attempt to fetch part failed, but `tmp-fetch_` directory was not cleaned up. [#40031](https://github.com/ClickHouse/ClickHouse/pull/40031) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix rare cases of parsing of arrays of tuples in format `Values`. [#40034](https://github.com/ClickHouse/ClickHouse/pull/40034) ([Anton Popov](https://github.com/CurtizJ)). +* Fixes ArrowColumn format Dictionary(X) & Dictionary(Nullable(X)) conversion to ClickHouse LowCardinality(X) & LowCardinality(Nullable(X)) respectively. [#40037](https://github.com/ClickHouse/ClickHouse/pull/40037) ([Arthur Passos](https://github.com/arthurpassos)). +* Fix potential deadlock in writing to S3 during task scheduling failure. [#40070](https://github.com/ClickHouse/ClickHouse/pull/40070) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix bug in collectFilesToSkip() by adding correct file extension (.idx or idx2) for indexes to be recalculated, avoid wrong hard links. Fixed [#39896](https://github.com/ClickHouse/ClickHouse/issues/39896). [#40095](https://github.com/ClickHouse/ClickHouse/pull/40095) ([Jianmei Zhang](https://github.com/zhangjmruc)). +* A fix for reverse DNS resolution. [#40134](https://github.com/ClickHouse/ClickHouse/pull/40134) ([Arthur Passos](https://github.com/arthurpassos)). +* Fix unexpected result `arrayDifference` of `Array(UInt32). [#40211](https://github.com/ClickHouse/ClickHouse/pull/40211) ([Duc Canh Le](https://github.com/canhld94)). + + +### ClickHouse release 22.7, 2022-07-21 + +#### Upgrade Notes +* Enable setting `enable_positional_arguments` by default. It allows queries like `SELECT ... ORDER BY 1, 2` where 1, 2 are the references to the select clause. If you need to return the old behavior, disable this setting. [#38204](https://github.com/ClickHouse/ClickHouse/pull/38204) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Disable `format_csv_allow_single_quotes` by default. See [#37096](https://github.com/ClickHouse/ClickHouse/issues/37096). ([Kruglov Pavel](https://github.com/Avogar)). +* `Ordinary` database engine and old storage definition syntax for `*MergeTree` tables are deprecated. By default it's not possible to create new databases with `Ordinary` engine. If `system` database has `Ordinary` engine it will be automatically converted to `Atomic` on server startup. There are settings to keep old behavior (`allow_deprecated_database_ordinary` and `allow_deprecated_syntax_for_merge_tree`), but these settings may be removed in future releases. [#38335](https://github.com/ClickHouse/ClickHouse/pull/38335) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Force rewriting comma join to inner by default (set default value `cross_to_inner_join_rewrite = 2`). To have old behavior set `cross_to_inner_join_rewrite = 1`. [#39326](https://github.com/ClickHouse/ClickHouse/pull/39326) ([Vladimir C](https://github.com/vdimir)). If you will face any incompatibilities, you can turn this setting back. + +#### New Feature +* Support expressions with window functions. Closes [#19857](https://github.com/ClickHouse/ClickHouse/issues/19857). [#37848](https://github.com/ClickHouse/ClickHouse/pull/37848) ([Dmitry Novik](https://github.com/novikd)). +* Add new `direct` join algorithm for `EmbeddedRocksDB` tables, see [#33582](https://github.com/ClickHouse/ClickHouse/issues/33582). [#35363](https://github.com/ClickHouse/ClickHouse/pull/35363) ([Vladimir C](https://github.com/vdimir)). +* Added full sorting merge join algorithm. [#35796](https://github.com/ClickHouse/ClickHouse/pull/35796) ([Vladimir C](https://github.com/vdimir)). +* Implement NATS table engine, which allows to pub/sub to NATS. Closes [#32388](https://github.com/ClickHouse/ClickHouse/issues/32388). [#37171](https://github.com/ClickHouse/ClickHouse/pull/37171) ([tchepavel](https://github.com/tchepavel)). ([Kseniia Sumarokova](https://github.com/kssenii)) +* Implement table function `mongodb`. Allow writes into `MongoDB` storage / table function. [#37213](https://github.com/ClickHouse/ClickHouse/pull/37213) ([aaapetrenko](https://github.com/aaapetrenko)). ([Kseniia Sumarokova](https://github.com/kssenii)) +* Add `SQLInsert` output format. Closes [#38441](https://github.com/ClickHouse/ClickHouse/issues/38441). [#38477](https://github.com/ClickHouse/ClickHouse/pull/38477) ([Kruglov Pavel](https://github.com/Avogar)). +* Introduced settings `additional_table_filters`. Using this setting, you can specify additional filtering condition for a table which will be applied directly after reading. Example: `select number, x, y from (select number from system.numbers limit 5) f any left join (select x, y from table_1) s on f.number = s.x settings additional_table_filters={'system.numbers : 'number != 3', 'table_1' : 'x != 2'}`. Introduced setting `additional_result_filter` which specifies additional filtering condition for query result. Closes [#37918](https://github.com/ClickHouse/ClickHouse/issues/37918). [#38475](https://github.com/ClickHouse/ClickHouse/pull/38475) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Add `compatibility` setting and `system.settings_changes` system table that contains information about changes in settings through ClickHouse versions. Closes [#35972](https://github.com/ClickHouse/ClickHouse/issues/35972). [#38957](https://github.com/ClickHouse/ClickHouse/pull/38957) ([Kruglov Pavel](https://github.com/Avogar)). +* Add functions `translate(string, from_string, to_string)` and `translateUTF8(string, from_string, to_string)`. It translates some characters to another. [#38935](https://github.com/ClickHouse/ClickHouse/pull/38935) ([Nikolay Degterinsky](https://github.com/evillique)). +* Support `parseTimeDelta` function. It can be used like ` ;-+,:` can be used as separators, eg. `1yr-2mo`, `2m:6s`: `SELECT parseTimeDelta('1yr-2mo-4w + 12 days, 3 hours : 1 minute ; 33 seconds')`. [#39071](https://github.com/ClickHouse/ClickHouse/pull/39071) ([jiahui-97](https://github.com/jiahui-97)). +* Added `CREATE TABLE ... EMPTY AS SELECT` query. It automatically deduces table structure from the SELECT query, but does not fill the table after creation. Resolves [#38049](https://github.com/ClickHouse/ClickHouse/issues/38049). [#38272](https://github.com/ClickHouse/ClickHouse/pull/38272) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Added options to limit IO operations with remote storage: `max_remote_read_network_bandwidth_for_server` and `max_remote_write_network_bandwidth_for_server`. [#39095](https://github.com/ClickHouse/ClickHouse/pull/39095) ([Sergei Trifonov](https://github.com/serxa)). +* Add `group_by_use_nulls` setting to make aggregation key columns nullable in the case of ROLLUP, CUBE and GROUPING SETS. Closes [#37359](https://github.com/ClickHouse/ClickHouse/issues/37359). [#38642](https://github.com/ClickHouse/ClickHouse/pull/38642) ([Dmitry Novik](https://github.com/novikd)). +* Add the ability to specify compression level during data export. [#38907](https://github.com/ClickHouse/ClickHouse/pull/38907) ([Nikolay Degterinsky](https://github.com/evillique)). +* Add an option to require explicit grants to SELECT from the `system` database. Details: [#38970](https://github.com/ClickHouse/ClickHouse/pull/38970) ([Vitaly Baranov](https://github.com/vitlibar)). +* Functions `multiMatchAny`, `multiMatchAnyIndex`, `multiMatchAllIndices` and their fuzzy variants now accept non-const pattern array argument. [#38485](https://github.com/ClickHouse/ClickHouse/pull/38485) ([Robert Schulze](https://github.com/rschu1ze)). SQL function `multiSearchAllPositions` now accepts non-const needle arguments. [#39167](https://github.com/ClickHouse/ClickHouse/pull/39167) ([Robert Schulze](https://github.com/rschu1ze)). +* Add a setting `zstd_window_log_max` to configure max memory usage on zstd decoding when importing external files. Closes [#35693](https://github.com/ClickHouse/ClickHouse/issues/35693). [#37015](https://github.com/ClickHouse/ClickHouse/pull/37015) ([wuxiaobai24](https://github.com/wuxiaobai24)). +* Add `send_logs_source_regexp` setting. Send server text logs with specified regexp to match log source name. Empty means all sources. [#39161](https://github.com/ClickHouse/ClickHouse/pull/39161) ([Amos Bird](https://github.com/amosbird)). +* Support `ALTER` for `Hive` tables. [#38214](https://github.com/ClickHouse/ClickHouse/pull/38214) ([lgbo](https://github.com/lgbo-ustc)). +* Support `isNullable` function. This function checks whether it's argument is nullable and return 1 or 0. Closes [#38611](https://github.com/ClickHouse/ClickHouse/issues/38611). [#38841](https://github.com/ClickHouse/ClickHouse/pull/38841) ([lokax](https://github.com/lokax)). +* Added functions for base58 encoding/decoding. [#38159](https://github.com/ClickHouse/ClickHouse/pull/38159) ([Andrey Zvonov](https://github.com/zvonand)). +* Add chart visualization to Play UI. [#38197](https://github.com/ClickHouse/ClickHouse/pull/38197) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Added L2 Squared distance and norm functions for both arrays and tuples. [#38545](https://github.com/ClickHouse/ClickHouse/pull/38545) ([Julian Gilyadov](https://github.com/israelg99)). +* Add ability to pass HTTP headers to the `url` table function / storage via SQL. Closes [#37897](https://github.com/ClickHouse/ClickHouse/issues/37897). [#38176](https://github.com/ClickHouse/ClickHouse/pull/38176) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add `clickhouse-diagnostics` binary to the packages. [#38647](https://github.com/ClickHouse/ClickHouse/pull/38647) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + +#### Experimental Feature +* Adds new setting `implicit_transaction` to run standalone queries inside a transaction. It handles both creation and closing (via COMMIT if the query succeeded or ROLLBACK if it didn't) of the transaction automatically. [#38344](https://github.com/ClickHouse/ClickHouse/pull/38344) ([Raúl Marín](https://github.com/Algunenano)). + +#### Performance Improvement +* Distinct optimization for sorted columns. Use specialized distinct transformation in case input stream is sorted by column(s) in distinct. Optimization can be applied to pre-distinct, final distinct, or both. Initial implementation by @dimarub2000. [#37803](https://github.com/ClickHouse/ClickHouse/pull/37803) ([Igor Nikonov](https://github.com/devcrafter)). +* Improve performance of `ORDER BY`, `MergeTree` merges, window functions using batch version of `BinaryHeap`. [#38022](https://github.com/ClickHouse/ClickHouse/pull/38022) ([Maksim Kita](https://github.com/kitaisreal)). +* More parallel execution for queries with `FINAL` [#36396](https://github.com/ClickHouse/ClickHouse/pull/36396) ([Nikita Taranov](https://github.com/nickitat)). +* Fix significant join performance regression which was introduced in [#35616](https://github.com/ClickHouse/ClickHouse/pull/35616). It's interesting that common join queries such as ssb queries have been 10 times slower for almost 3 months while no one complains. [#38052](https://github.com/ClickHouse/ClickHouse/pull/38052) ([Amos Bird](https://github.com/amosbird)). +* Migrate from the Intel hyperscan library to vectorscan, this speeds up many string matching on non-x86 platforms. [#38171](https://github.com/ClickHouse/ClickHouse/pull/38171) ([Robert Schulze](https://github.com/rschu1ze)). +* Increased parallelism of query plan steps executed after aggregation. [#38295](https://github.com/ClickHouse/ClickHouse/pull/38295) ([Nikita Taranov](https://github.com/nickitat)). +* Improve performance of insertion to columns of type `JSON`. [#38320](https://github.com/ClickHouse/ClickHouse/pull/38320) ([Anton Popov](https://github.com/CurtizJ)). +* Optimized insertion and lookups in the HashTable. [#38413](https://github.com/ClickHouse/ClickHouse/pull/38413) ([Nikita Taranov](https://github.com/nickitat)). +* Fix performance degradation from [#32493](https://github.com/ClickHouse/ClickHouse/issues/32493). [#38417](https://github.com/ClickHouse/ClickHouse/pull/38417) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Improve performance of joining with numeric columns using SIMD instructions. [#37235](https://github.com/ClickHouse/ClickHouse/pull/37235) ([zzachimed](https://github.com/zzachimed)). [#38565](https://github.com/ClickHouse/ClickHouse/pull/38565) ([Maksim Kita](https://github.com/kitaisreal)). +* Norm and Distance functions for arrays speed up 1.2-2 times. [#38740](https://github.com/ClickHouse/ClickHouse/pull/38740) ([Alexander Gololobov](https://github.com/davenger)). +* Add AVX-512 VBMI optimized `copyOverlap32Shuffle` for LZ4 decompression. In other words, LZ4 decompression performance is improved. [#37891](https://github.com/ClickHouse/ClickHouse/pull/37891) ([Guo Wangyang](https://github.com/guowangy)). +* `ORDER BY (a, b)` will use all the same benefits as `ORDER BY a, b`. [#38873](https://github.com/ClickHouse/ClickHouse/pull/38873) ([Igor Nikonov](https://github.com/devcrafter)). +* Align branches within a 32B boundary to make benchmark more stable. [#38988](https://github.com/ClickHouse/ClickHouse/pull/38988) ([Guo Wangyang](https://github.com/guowangy)). It improves performance 1..2% on average for Intel. +* Executable UDF, executable dictionaries, and Executable tables will avoid wasting one second during wait for subprocess termination. [#38929](https://github.com/ClickHouse/ClickHouse/pull/38929) ([Constantine Peresypkin](https://github.com/pkit)). +* Optimize accesses to `system.stack_trace` table if not all columns are selected. [#39177](https://github.com/ClickHouse/ClickHouse/pull/39177) ([Azat Khuzhin](https://github.com/azat)). +* Improve isNullable/isConstant/isNull/isNotNull performance for LowCardinality argument. [#39192](https://github.com/ClickHouse/ClickHouse/pull/39192) ([Kruglov Pavel](https://github.com/Avogar)). +* Optimized processing of ORDER BY in window functions. [#34632](https://github.com/ClickHouse/ClickHouse/pull/34632) ([Vladimir Chebotarev](https://github.com/excitoon)). +* The table `system.asynchronous_metric_log` is further optimized for storage space. This closes [#38134](https://github.com/ClickHouse/ClickHouse/issues/38134). See the [YouTube video](https://www.youtube.com/watch?v=0fSp9SF8N8A). [#38428](https://github.com/ClickHouse/ClickHouse/pull/38428) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### Improvement +* Support SQL standard CREATE INDEX and DROP INDEX syntax. [#35166](https://github.com/ClickHouse/ClickHouse/pull/35166) ([Jianmei Zhang](https://github.com/zhangjmruc)). +* Send profile events for INSERT queries (previously only SELECT was supported). [#37391](https://github.com/ClickHouse/ClickHouse/pull/37391) ([Azat Khuzhin](https://github.com/azat)). +* Implement in order aggregation (`optimize_aggregation_in_order`) for fully materialized projections. [#37469](https://github.com/ClickHouse/ClickHouse/pull/37469) ([Azat Khuzhin](https://github.com/azat)). +* Remove subprocess run for kerberos initialization. Added new integration test. Closes [#27651](https://github.com/ClickHouse/ClickHouse/issues/27651). [#38105](https://github.com/ClickHouse/ClickHouse/pull/38105) ([Roman Vasin](https://github.com/rvasin)). +* * Add setting `multiple_joins_try_to_keep_original_names` to not rewrite identifier name on multiple JOINs rewrite, close [#34697](https://github.com/ClickHouse/ClickHouse/issues/34697). [#38149](https://github.com/ClickHouse/ClickHouse/pull/38149) ([Vladimir C](https://github.com/vdimir)). +* Improved trace-visualizer UX. [#38169](https://github.com/ClickHouse/ClickHouse/pull/38169) ([Sergei Trifonov](https://github.com/serxa)). +* Enable stack trace collection and query profiler for AArch64. [#38181](https://github.com/ClickHouse/ClickHouse/pull/38181) ([Maksim Kita](https://github.com/kitaisreal)). +* Do not skip symlinks in `user_defined` directory during SQL user defined functions loading. Closes [#38042](https://github.com/ClickHouse/ClickHouse/issues/38042). [#38184](https://github.com/ClickHouse/ClickHouse/pull/38184) ([Maksim Kita](https://github.com/kitaisreal)). +* Added background cleanup of subdirectories in `store/`. In some cases clickhouse-server might left garbage subdirectories in `store/` (for example, on unsuccessful table creation) and those dirs were never been removed. Fixes [#33710](https://github.com/ClickHouse/ClickHouse/issues/33710). [#38265](https://github.com/ClickHouse/ClickHouse/pull/38265) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Add `DESCRIBE CACHE` query to show cache settings from config. Add `SHOW CACHES` query to show available filesystem caches list. [#38279](https://github.com/ClickHouse/ClickHouse/pull/38279) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add access check for `system drop filesystem cache`. Support ON CLUSTER. [#38319](https://github.com/ClickHouse/ClickHouse/pull/38319) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix PostgreSQL database engine incompatibility on upgrade from 21.3 to 22.3. Closes [#36659](https://github.com/ClickHouse/ClickHouse/issues/36659). [#38369](https://github.com/ClickHouse/ClickHouse/pull/38369) ([Kseniia Sumarokova](https://github.com/kssenii)). +* `filesystemAvailable` and similar functions now work in `clickhouse-local`. This closes [#38423](https://github.com/ClickHouse/ClickHouse/issues/38423). [#38424](https://github.com/ClickHouse/ClickHouse/pull/38424) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add `revision` function. [#38555](https://github.com/ClickHouse/ClickHouse/pull/38555) ([Azat Khuzhin](https://github.com/azat)). +* Fix GCS via proxy tunnel usage. [#38726](https://github.com/ClickHouse/ClickHouse/pull/38726) ([Azat Khuzhin](https://github.com/azat)). +* Support `\i file` in clickhouse client / local (similar to psql \i). [#38813](https://github.com/ClickHouse/ClickHouse/pull/38813) ([Kseniia Sumarokova](https://github.com/kssenii)). +* New option `optimize = 1` in `EXPLAIN AST`. If enabled, it shows AST after it's rewritten, otherwise AST of original query. Disabled by default. [#38910](https://github.com/ClickHouse/ClickHouse/pull/38910) ([Igor Nikonov](https://github.com/devcrafter)). +* Allow trailing comma in columns list. closes [#38425](https://github.com/ClickHouse/ClickHouse/issues/38425). [#38440](https://github.com/ClickHouse/ClickHouse/pull/38440) ([chen](https://github.com/xiedeyantu)). +* Bugfixes and performance improvements for `parallel_hash` JOIN method. [#37648](https://github.com/ClickHouse/ClickHouse/pull/37648) ([Vladimir C](https://github.com/vdimir)). +* Support hadoop secure RPC transfer (hadoop.rpc.protection=privacy and hadoop.rpc.protection=integrity). [#37852](https://github.com/ClickHouse/ClickHouse/pull/37852) ([Peng Liu](https://github.com/michael1589)). +* Add struct type support in `StorageHive`. [#38118](https://github.com/ClickHouse/ClickHouse/pull/38118) ([lgbo](https://github.com/lgbo-ustc)). +* S3 single objects are now removed with `RemoveObjectRequest`. Implement compatibility with GCP which did not allow to use `removeFileIfExists` effectively breaking approximately half of `remove` functionality. Automatic detection for `DeleteObjects` S3 API, that is not supported by GCS. This will allow to use GCS without explicit `support_batch_delete=0` in configuration. [#37882](https://github.com/ClickHouse/ClickHouse/pull/37882) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Expose basic ClickHouse Keeper related monitoring data (via ProfileEvents and CurrentMetrics). [#38072](https://github.com/ClickHouse/ClickHouse/pull/38072) ([lingpeng0314](https://github.com/lingpeng0314)). +* Support `auto_close` option for PostgreSQL engine connection. Closes [#31486](https://github.com/ClickHouse/ClickHouse/issues/31486). [#38363](https://github.com/ClickHouse/ClickHouse/pull/38363) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Allow `NULL` modifier in columns declaration for table functions. [#38816](https://github.com/ClickHouse/ClickHouse/pull/38816) ([Kruglov Pavel](https://github.com/Avogar)). +* Deactivate `mutations_finalizing_task` before shutdown to avoid benign `TABLE_IS_READ_ONLY` errors during shutdown. [#38851](https://github.com/ClickHouse/ClickHouse/pull/38851) ([Raúl Marín](https://github.com/Algunenano)). +* Eliminate unnecessary waiting of SELECT queries after ALTER queries in presence of INSERT queries if you use deprecated Ordinary databases. [#38864](https://github.com/ClickHouse/ClickHouse/pull/38864) ([Azat Khuzhin](https://github.com/azat)). +* New option `rewrite` in `EXPLAIN AST`. If enabled, it shows AST after it's rewritten, otherwise AST of original query. Disabled by default. [#38910](https://github.com/ClickHouse/ClickHouse/pull/38910) ([Igor Nikonov](https://github.com/devcrafter)). +* Stop reporting Zookeeper "Node exists" exceptions in system.errors when they are expected. [#38961](https://github.com/ClickHouse/ClickHouse/pull/38961) ([Raúl Marín](https://github.com/Algunenano)). +* `clickhouse-keeper`: add support for real-time digest calculation and verification. It is disabled by default. [#37555](https://github.com/ClickHouse/ClickHouse/pull/37555) ([Antonio Andelic](https://github.com/antonio2368)). +* Allow to specify globs `* or {expr1, expr2, expr3}` inside a key for `clickhouse-extract-from-config` tool. [#38966](https://github.com/ClickHouse/ClickHouse/pull/38966) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* clearOldLogs: Don't report KEEPER_EXCEPTION on concurrent deletes. [#39016](https://github.com/ClickHouse/ClickHouse/pull/39016) ([Raúl Marín](https://github.com/Algunenano)). +* clickhouse-keeper improvement: persist meta-information about keeper servers to disk. [#39069](https://github.com/ClickHouse/ClickHouse/pull/39069) ([Antonio Andelic](https://github.com/antonio2368)). This will make it easier to operate if you shutdown or restart all keeper nodes at the same time. +* Continue without exception when running out of disk space when using filesystem cache. [#39106](https://github.com/ClickHouse/ClickHouse/pull/39106) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Handling SIGTERM signals from k8s. [#39130](https://github.com/ClickHouse/ClickHouse/pull/39130) ([Timur Solodovnikov](https://github.com/tsolodov)). +* Add `merge_algorithm` column (Undecided, Horizontal, Vertical) to system.part_log. [#39181](https://github.com/ClickHouse/ClickHouse/pull/39181) ([Azat Khuzhin](https://github.com/azat)). +* Don't increment a counter in `system.errors` when the disk is not rotational. [#39216](https://github.com/ClickHouse/ClickHouse/pull/39216) ([Raúl Marín](https://github.com/Algunenano)). +* The metric `result_bytes` for `INSERT` queries in `system.query_log` shows number of bytes inserted. Previously value was incorrect and stored the same value as `result_rows`. [#39225](https://github.com/ClickHouse/ClickHouse/pull/39225) ([Ilya Yatsishin](https://github.com/qoega)). +* The CPU usage metric in clickhouse-client will be displayed in a better way. Fixes [#38756](https://github.com/ClickHouse/ClickHouse/issues/38756). [#39280](https://github.com/ClickHouse/ClickHouse/pull/39280) ([Sergei Trifonov](https://github.com/serxa)). +* Rethrow exception on filesystem cache initialization on server startup, better error message. [#39386](https://github.com/ClickHouse/ClickHouse/pull/39386) ([Kseniia Sumarokova](https://github.com/kssenii)). +* OpenTelemetry now collects traces without Processors spans by default (there are too many). To enable Processors spans collection `opentelemetry_trace_processors` setting. [#39170](https://github.com/ClickHouse/ClickHouse/pull/39170) ([Ilya Yatsishin](https://github.com/qoega)). +* Functions `multiMatch[Fuzzy](AllIndices/Any/AnyIndex)` - don't throw a logical error if the needle argument is empty. [#39012](https://github.com/ClickHouse/ClickHouse/pull/39012) ([Robert Schulze](https://github.com/rschu1ze)). +* Allow to declare `RabbitMQ` queue without default arguments `x-max-length` and `x-overflow`. [#39259](https://github.com/ClickHouse/ClickHouse/pull/39259) ([rnbondarenko](https://github.com/rnbondarenko)). + +#### Build/Testing/Packaging Improvement +* Apply Clang Thread Safety Analysis (TSA) annotations to ClickHouse. [#38068](https://github.com/ClickHouse/ClickHouse/pull/38068) ([Robert Schulze](https://github.com/rschu1ze)). +* Adapt universal installation script for FreeBSD. [#39302](https://github.com/ClickHouse/ClickHouse/pull/39302) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Preparation for building on `s390x` platform. [#39193](https://github.com/ClickHouse/ClickHouse/pull/39193) ([Harry Lee](https://github.com/HarryLeeIBM)). +* Fix a bug in `jemalloc` library [#38757](https://github.com/ClickHouse/ClickHouse/pull/38757) ([Azat Khuzhin](https://github.com/azat)). +* Hardware benchmark now has support for automatic results uploading. [#38427](https://github.com/ClickHouse/ClickHouse/pull/38427) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* System table "system.licenses" is now correctly populated on Mac (Darwin). [#38294](https://github.com/ClickHouse/ClickHouse/pull/38294) ([Robert Schulze](https://github.com/rschu1ze)). +* Change `all|noarch` packages to architecture-dependent - Fix some documentation for it - Push aarch64|arm64 packages to artifactory and release assets - Fixes [#36443](https://github.com/ClickHouse/ClickHouse/issues/36443). [#38580](https://github.com/ClickHouse/ClickHouse/pull/38580) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) +* Fix rounding for `Decimal128/Decimal256` with more than 19-digits long scale. [#38027](https://github.com/ClickHouse/ClickHouse/pull/38027) ([Igor Nikonov](https://github.com/devcrafter)). +* Fixed crash caused by data race in storage `Hive` (integration table engine). [#38887](https://github.com/ClickHouse/ClickHouse/pull/38887) ([lgbo](https://github.com/lgbo-ustc)). +* Fix crash when executing GRANT ALL ON *.* with ON CLUSTER. It was broken in https://github.com/ClickHouse/ClickHouse/pull/35767. This closes [#38618](https://github.com/ClickHouse/ClickHouse/issues/38618). [#38674](https://github.com/ClickHouse/ClickHouse/pull/38674) ([Vitaly Baranov](https://github.com/vitlibar)). +* Correct glob expansion in case of `{0..10}` forms. Fixes [#38498](https://github.com/ClickHouse/ClickHouse/issues/38498) Current Implementation is similar to what shell does mentiond by @rschu1ze [here](https://github.com/ClickHouse/ClickHouse/pull/38502#issuecomment-1169057723). [#38502](https://github.com/ClickHouse/ClickHouse/pull/38502) ([Heena Bansal](https://github.com/HeenaBansal2009)). +* Fix crash for `mapUpdate`, `mapFilter` functions when using with constant map argument. Closes [#38547](https://github.com/ClickHouse/ClickHouse/issues/38547). [#38553](https://github.com/ClickHouse/ClickHouse/pull/38553) ([hexiaoting](https://github.com/hexiaoting)). +* Fix `toHour` monotonicity information for query optimization which can lead to incorrect query result (incorrect index analysis). This fixes [#38333](https://github.com/ClickHouse/ClickHouse/issues/38333). [#38675](https://github.com/ClickHouse/ClickHouse/pull/38675) ([Amos Bird](https://github.com/amosbird)). +* Fix checking whether s3 storage support parallel writes. It resulted in s3 parallel writes not working. [#38792](https://github.com/ClickHouse/ClickHouse/pull/38792) ([chen](https://github.com/xiedeyantu)). +* Fix s3 seekable reads with parallel read buffer. (Affected memory usage during query). Closes [#38258](https://github.com/ClickHouse/ClickHouse/issues/38258). [#38802](https://github.com/ClickHouse/ClickHouse/pull/38802) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Update `simdjson`. This fixes [#38621](https://github.com/ClickHouse/ClickHouse/issues/38621) - a buffer overflow on machines with the latest Intel CPUs with AVX-512 VBMI. [#38838](https://github.com/ClickHouse/ClickHouse/pull/38838) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix possible logical error for Vertical merges. [#38859](https://github.com/ClickHouse/ClickHouse/pull/38859) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix settings profile with seconds unit. [#38896](https://github.com/ClickHouse/ClickHouse/pull/38896) ([Raúl Marín](https://github.com/Algunenano)). +* Fix incorrect partition pruning when there is a nullable partition key. Note: most likely you don't use nullable partition keys - this is an obscure feature you should not use. Nullable keys are a nonsense and this feature is only needed for some crazy use-cases. This fixes [#38941](https://github.com/ClickHouse/ClickHouse/issues/38941). [#38946](https://github.com/ClickHouse/ClickHouse/pull/38946) ([Amos Bird](https://github.com/amosbird)). +* Improve `fsync_part_directory` for fetches. [#38993](https://github.com/ClickHouse/ClickHouse/pull/38993) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible dealock inside `OvercommitTracker`. Fixes [#37794](https://github.com/ClickHouse/ClickHouse/issues/37794). [#39030](https://github.com/ClickHouse/ClickHouse/pull/39030) ([Dmitry Novik](https://github.com/novikd)). +* Fix bug in filesystem cache that could happen in some corner case which coincided with cache capacity hitting the limit. Closes [#39066](https://github.com/ClickHouse/ClickHouse/issues/39066). [#39070](https://github.com/ClickHouse/ClickHouse/pull/39070) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix some corner cases of interpretation of the arguments of window expressions. Fixes [#38538](https://github.com/ClickHouse/ClickHouse/issues/38538) Allow using of higher-order functions in window expressions. [#39112](https://github.com/ClickHouse/ClickHouse/pull/39112) ([Dmitry Novik](https://github.com/novikd)). +* Keep `LowCardinality` type in `tuple` function. Previously `LowCardinality` type was dropped and elements of created tuple had underlying type of `LowCardinality`. [#39113](https://github.com/ClickHouse/ClickHouse/pull/39113) ([Anton Popov](https://github.com/CurtizJ)). +* Fix error `Block structure mismatch` which could happen for INSERT into table with attached MATERIALIZED VIEW and enabled setting `extremes = 1`. Closes [#29759](https://github.com/ClickHouse/ClickHouse/issues/29759) and [#38729](https://github.com/ClickHouse/ClickHouse/issues/38729). [#39125](https://github.com/ClickHouse/ClickHouse/pull/39125) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix unexpected query result when both `optimize_trivial_count_query` and `empty_result_for_aggregation_by_empty_set` are set to true. This fixes [#39140](https://github.com/ClickHouse/ClickHouse/issues/39140). [#39155](https://github.com/ClickHouse/ClickHouse/pull/39155) ([Amos Bird](https://github.com/amosbird)). +* Fixed error `Not found column Type in block` in selects with `PREWHERE` and read-in-order optimizations. [#39157](https://github.com/ClickHouse/ClickHouse/pull/39157) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix extremely rare race condition in during hardlinks for remote filesystem. The only way to reproduce it is concurrent run of backups. [#39190](https://github.com/ClickHouse/ClickHouse/pull/39190) ([alesapin](https://github.com/alesapin)). +* (zero-copy replication is an experimental feature that should not be used in production) Fix fetch of in-memory part with `allow_remote_fs_zero_copy_replication`. [#39214](https://github.com/ClickHouse/ClickHouse/pull/39214) ([Azat Khuzhin](https://github.com/azat)). +* (MaterializedPostgreSQL - experimental feature). Fix segmentation fault in MaterializedPostgreSQL database engine, which could happen if some exception occurred at replication initialisation. Closes [#36939](https://github.com/ClickHouse/ClickHouse/issues/36939). [#39272](https://github.com/ClickHouse/ClickHouse/pull/39272) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix incorrect fetch of table metadata from PostgreSQL database engine. Closes [#33502](https://github.com/ClickHouse/ClickHouse/issues/33502). [#39283](https://github.com/ClickHouse/ClickHouse/pull/39283) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix projection exception when aggregation keys are wrapped inside other functions. This fixes [#37151](https://github.com/ClickHouse/ClickHouse/issues/37151). [#37155](https://github.com/ClickHouse/ClickHouse/pull/37155) ([Amos Bird](https://github.com/amosbird)). +* Fix possible logical error `... with argument with type Nothing and default implementation for Nothing is expected to return result with type Nothing, got ...` in some functions. Closes: [#37610](https://github.com/ClickHouse/ClickHouse/issues/37610) Closes: [#37741](https://github.com/ClickHouse/ClickHouse/issues/37741). [#37759](https://github.com/ClickHouse/ClickHouse/pull/37759) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix incorrect columns order in subqueries of UNION (in case of duplicated columns in subselects may produce incorrect result). [#37887](https://github.com/ClickHouse/ClickHouse/pull/37887) ([Azat Khuzhin](https://github.com/azat)). +* Fix incorrect work of MODIFY ALTER Column with column names that contain dots. Closes [#37907](https://github.com/ClickHouse/ClickHouse/issues/37907). [#37971](https://github.com/ClickHouse/ClickHouse/pull/37971) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix reading of sparse columns from `MergeTree` tables that store their data in S3. [#37978](https://github.com/ClickHouse/ClickHouse/pull/37978) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible crash in `Distributed` async insert in case of removing a replica from config. [#38029](https://github.com/ClickHouse/ClickHouse/pull/38029) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix "Missing columns" for GLOBAL JOIN with CTE without alias. [#38056](https://github.com/ClickHouse/ClickHouse/pull/38056) ([Azat Khuzhin](https://github.com/azat)). +* Rewrite tuple functions as literals in backwards-compatibility mode. [#38096](https://github.com/ClickHouse/ClickHouse/pull/38096) ([Anton Kozlov](https://github.com/tonickkozlov)). +* Fix redundant memory reservation for output block during `ORDER BY`. [#38127](https://github.com/ClickHouse/ClickHouse/pull/38127) ([iyupeng](https://github.com/iyupeng)). +* Fix possible logical error `Bad cast from type DB::IColumn* to DB::ColumnNullable*` in array mapped functions. Closes [#38006](https://github.com/ClickHouse/ClickHouse/issues/38006). [#38132](https://github.com/ClickHouse/ClickHouse/pull/38132) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix temporary name clash in partial merge join, close [#37928](https://github.com/ClickHouse/ClickHouse/issues/37928). [#38135](https://github.com/ClickHouse/ClickHouse/pull/38135) ([Vladimir C](https://github.com/vdimir)). +* Some minr issue with queries like `CREATE TABLE nested_name_tuples (`a` Tuple(x String, y Tuple(i Int32, j String))) ENGINE = Memory;` [#38136](https://github.com/ClickHouse/ClickHouse/pull/38136) ([lgbo](https://github.com/lgbo-ustc)). +* Fix bug with nested short-circuit functions that led to execution of arguments even if condition is false. Closes [#38040](https://github.com/ClickHouse/ClickHouse/issues/38040). [#38173](https://github.com/ClickHouse/ClickHouse/pull/38173) ([Kruglov Pavel](https://github.com/Avogar)). +* (Window View is a experimental feature) Fix LOGICAL_ERROR for WINDOW VIEW with incorrect structure. [#38205](https://github.com/ClickHouse/ClickHouse/pull/38205) ([Azat Khuzhin](https://github.com/azat)). +* Update librdkafka submodule to fix crash when an OAUTHBEARER refresh callback is set. [#38225](https://github.com/ClickHouse/ClickHouse/pull/38225) ([Rafael Acevedo](https://github.com/racevedoo)). +* Fix INSERT into Distributed hung due to ProfileEvents. [#38307](https://github.com/ClickHouse/ClickHouse/pull/38307) ([Azat Khuzhin](https://github.com/azat)). +* Fix retries in PostgreSQL engine. [#38310](https://github.com/ClickHouse/ClickHouse/pull/38310) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix optimization in PartialSortingTransform (SIGSEGV and possible incorrect result). [#38324](https://github.com/ClickHouse/ClickHouse/pull/38324) ([Azat Khuzhin](https://github.com/azat)). +* Fix RabbitMQ with formats based on PeekableReadBuffer. Closes [#38061](https://github.com/ClickHouse/ClickHouse/issues/38061). [#38356](https://github.com/ClickHouse/ClickHouse/pull/38356) ([Kseniia Sumarokova](https://github.com/kssenii)). +* MaterializedPostgreSQL - experimentail feature. Fix possible `Invalid number of rows in Chunk` in MaterializedPostgreSQL. Closes [#37323](https://github.com/ClickHouse/ClickHouse/issues/37323). [#38360](https://github.com/ClickHouse/ClickHouse/pull/38360) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix RabbitMQ configuration with connection string setting. Closes [#36531](https://github.com/ClickHouse/ClickHouse/issues/36531). [#38365](https://github.com/ClickHouse/ClickHouse/pull/38365) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix PostgreSQL engine not using PostgreSQL schema when retrieving array dimension size. Closes [#36755](https://github.com/ClickHouse/ClickHouse/issues/36755). Closes [#36772](https://github.com/ClickHouse/ClickHouse/issues/36772). [#38366](https://github.com/ClickHouse/ClickHouse/pull/38366) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix possibly incorrect result of distributed queries with `DISTINCT` and `LIMIT`. Fixes [#38282](https://github.com/ClickHouse/ClickHouse/issues/38282). [#38371](https://github.com/ClickHouse/ClickHouse/pull/38371) ([Anton Popov](https://github.com/CurtizJ)). +* Fix wrong results of countSubstrings() & position() on patterns with 0-bytes. [#38589](https://github.com/ClickHouse/ClickHouse/pull/38589) ([Robert Schulze](https://github.com/rschu1ze)). +* Now it's possible to start a clickhouse-server and attach/detach tables even for tables with the incorrect values of IPv4/IPv6 representation. Proper fix for issue [#35156](https://github.com/ClickHouse/ClickHouse/issues/35156). [#38590](https://github.com/ClickHouse/ClickHouse/pull/38590) ([alesapin](https://github.com/alesapin)). +* `rankCorr` function will work correctly if some arguments are NaNs. This closes [#38396](https://github.com/ClickHouse/ClickHouse/issues/38396). [#38722](https://github.com/ClickHouse/ClickHouse/pull/38722) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix `parallel_view_processing=1` with `optimize_trivial_insert_select=1`. Fix `max_insert_threads` while pushing to views. [#38731](https://github.com/ClickHouse/ClickHouse/pull/38731) ([Azat Khuzhin](https://github.com/azat)). +* Fix use-after-free for aggregate functions with `Map` combinator that leads to incorrect result. [#38748](https://github.com/ClickHouse/ClickHouse/pull/38748) ([Azat Khuzhin](https://github.com/azat)). + +### ClickHouse release 22.6, 2022-06-16 + +#### Backward Incompatible Change +* Remove support for octal number literals in SQL. In previous versions they were parsed as Float64. [#37765](https://github.com/ClickHouse/ClickHouse/pull/37765) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Changes how settings using `seconds` as type are parsed to support floating point values (for example: `max_execution_time=0.5`). Infinity or NaN values will throw an exception. [#37187](https://github.com/ClickHouse/ClickHouse/pull/37187) ([Raúl Marín](https://github.com/Algunenano)). +* Changed format of binary serialization of columns of experimental type `Object`. New format is more convenient to implement by third-party clients. [#37482](https://github.com/ClickHouse/ClickHouse/pull/37482) ([Anton Popov](https://github.com/CurtizJ)). +* Turn on setting `output_format_json_named_tuples_as_objects` by default. It allows to serialize named tuples as JSON objects in JSON formats. [#37756](https://github.com/ClickHouse/ClickHouse/pull/37756) ([Anton Popov](https://github.com/CurtizJ)). +* LIKE patterns with trailing escape symbol ('\\') are now disallowed (as mandated by the SQL standard). [#37764](https://github.com/ClickHouse/ClickHouse/pull/37764) ([Robert Schulze](https://github.com/rschu1ze)). +* If you run different ClickHouse versions on a cluster with AArch64 CPU or mix AArch64 and amd64 on a cluster, and use distributed queries with GROUP BY multiple keys of fixed-size type that fit in 256 bits but don't fit in 64 bits, and the size of the result is huge, the data will not be fully aggregated in the result of these queries during upgrade. Workaround: upgrade with downtime instead of a rolling upgrade. + +#### New Feature +* Add `GROUPING` function. It allows to disambiguate the records in the queries with `ROLLUP`, `CUBE` or `GROUPING SETS`. Closes [#19426](https://github.com/ClickHouse/ClickHouse/issues/19426). [#37163](https://github.com/ClickHouse/ClickHouse/pull/37163) ([Dmitry Novik](https://github.com/novikd)). +* A new codec [FPC](https://userweb.cs.txstate.edu/~burtscher/papers/dcc07a.pdf) algorithm for floating point data compression. [#37553](https://github.com/ClickHouse/ClickHouse/pull/37553) ([Mikhail Guzov](https://github.com/koloshmet)). +* Add new columnar JSON formats: `JSONColumns`, `JSONCompactColumns`, `JSONColumnsWithMetadata`. Closes [#36338](https://github.com/ClickHouse/ClickHouse/issues/36338) Closes [#34509](https://github.com/ClickHouse/ClickHouse/issues/34509). [#36975](https://github.com/ClickHouse/ClickHouse/pull/36975) ([Kruglov Pavel](https://github.com/Avogar)). +* Added open telemetry traces visualizing tool based on d3js. [#37810](https://github.com/ClickHouse/ClickHouse/pull/37810) ([Sergei Trifonov](https://github.com/serxa)). +* Support INSERTs into `system.zookeeper` table. Closes [#22130](https://github.com/ClickHouse/ClickHouse/issues/22130). [#37596](https://github.com/ClickHouse/ClickHouse/pull/37596) ([Han Fei](https://github.com/hanfei1991)). +* Support non-constant pattern argument for `LIKE`, `ILIKE` and `match` functions. [#37251](https://github.com/ClickHouse/ClickHouse/pull/37251) ([Robert Schulze](https://github.com/rschu1ze)). +* Executable user defined functions now support parameters. Example: `SELECT test_function(parameters)(arguments)`. Closes [#37578](https://github.com/ClickHouse/ClickHouse/issues/37578). [#37720](https://github.com/ClickHouse/ClickHouse/pull/37720) ([Maksim Kita](https://github.com/kitaisreal)). +* Add `merge_reason` column to system.part_log table. [#36912](https://github.com/ClickHouse/ClickHouse/pull/36912) ([Sema Checherinda](https://github.com/CheSema)). +* Add support for Maps and Records in Avro format. Add new setting `input_format_avro_null_as_default ` that allow to insert null as default in Avro format. Closes [#18925](https://github.com/ClickHouse/ClickHouse/issues/18925) Closes [#37378](https://github.com/ClickHouse/ClickHouse/issues/37378) Closes [#32899](https://github.com/ClickHouse/ClickHouse/issues/32899). [#37525](https://github.com/ClickHouse/ClickHouse/pull/37525) ([Kruglov Pavel](https://github.com/Avogar)). +* Add `clickhouse-disks` tool to introspect and operate on virtual filesystems configured for ClickHouse. [#36060](https://github.com/ClickHouse/ClickHouse/pull/36060) ([Artyom Yurkov](https://github.com/Varinara)). +* Adds H3 unidirectional edge functions. [#36843](https://github.com/ClickHouse/ClickHouse/pull/36843) ([Bharat Nallan](https://github.com/bharatnc)). +* Add support for calculating [hashids](https://hashids.org/) from unsigned integers. [#37013](https://github.com/ClickHouse/ClickHouse/pull/37013) ([Michael Nutt](https://github.com/mnutt)). +* Explicit `SALT` specification is allowed for `CREATE USER IDENTIFIED WITH sha256_hash`. [#37377](https://github.com/ClickHouse/ClickHouse/pull/37377) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Add two new settings `input_format_csv_skip_first_lines/input_format_tsv_skip_first_lines` to allow skipping specified number of lines in the beginning of the file in CSV/TSV formats. [#37537](https://github.com/ClickHouse/ClickHouse/pull/37537) ([Kruglov Pavel](https://github.com/Avogar)). +* `showCertificate` function shows current server's SSL certificate. [#37540](https://github.com/ClickHouse/ClickHouse/pull/37540) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* HTTP source for Data Dictionaries in Named Collections is supported. [#37581](https://github.com/ClickHouse/ClickHouse/pull/37581) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Added a new window function `nonNegativeDerivative(metric_column, timestamp_column[, INTERVAL x SECOND])`. [#37628](https://github.com/ClickHouse/ClickHouse/pull/37628) ([Andrey Zvonov](https://github.com/zvonand)). +* Implemented changing the comment for `ReplicatedMergeTree` tables. [#37416](https://github.com/ClickHouse/ClickHouse/pull/37416) ([Vasily Nemkov](https://github.com/Enmk)). +* Added `SYSTEM UNFREEZE` query that deletes the whole backup regardless if the corresponding table is deleted or not. [#36424](https://github.com/ClickHouse/ClickHouse/pull/36424) ([Vadim Volodin](https://github.com/PolyProgrammist)). + +#### Experimental Feature +* Enables `POPULATE` for `WINDOW VIEW`. [#36945](https://github.com/ClickHouse/ClickHouse/pull/36945) ([vxider](https://github.com/Vxider)). +* `ALTER TABLE ... MODIFY QUERY` support for `WINDOW VIEW`. [#37188](https://github.com/ClickHouse/ClickHouse/pull/37188) ([vxider](https://github.com/Vxider)). +* This PR changes the behavior of the `ENGINE` syntax in `WINDOW VIEW`, to make it like in `MATERIALIZED VIEW`. [#37214](https://github.com/ClickHouse/ClickHouse/pull/37214) ([vxider](https://github.com/Vxider)). + +#### Performance Improvement +* Added numerous optimizations for ARM NEON [#38093](https://github.com/ClickHouse/ClickHouse/pull/38093)([Daniel Kutenin](https://github.com/danlark1)), ([Alexandra Pilipyuk](https://github.com/chalice19)) Note: if you run different ClickHouse versions on a cluster with ARM CPU and use distributed queries with GROUP BY multiple keys of fixed-size type that fit in 256 bits but don't fit in 64 bits, the result of the aggregation query will be wrong during upgrade. Workaround: upgrade with downtime instead of a rolling upgrade. +* Improve performance and memory usage for select of subset of columns for formats Native, Protobuf, CapnProto, JSONEachRow, TSKV, all formats with suffixes WithNames/WithNamesAndTypes. Previously while selecting only subset of columns from files in these formats all columns were read and stored in memory. Now only required columns are read. This PR enables setting `input_format_skip_unknown_fields` by default, because otherwise in case of select of subset of columns exception will be thrown. [#37192](https://github.com/ClickHouse/ClickHouse/pull/37192) ([Kruglov Pavel](https://github.com/Avogar)). +* Now more filters can be pushed down for join. [#37472](https://github.com/ClickHouse/ClickHouse/pull/37472) ([Amos Bird](https://github.com/amosbird)). +* Load marks for only necessary columns when reading wide parts. [#36879](https://github.com/ClickHouse/ClickHouse/pull/36879) ([Anton Kozlov](https://github.com/tonickkozlov)). +* Improved performance of aggregation in case, when sparse columns (can be enabled by experimental setting `ratio_of_defaults_for_sparse_serialization` in `MergeTree` tables) are used as arguments in aggregate functions. [#37617](https://github.com/ClickHouse/ClickHouse/pull/37617) ([Anton Popov](https://github.com/CurtizJ)). +* Optimize function `COALESCE` with two arguments. [#37666](https://github.com/ClickHouse/ClickHouse/pull/37666) ([Anton Popov](https://github.com/CurtizJ)). +* Replace `multiIf` to `if` in case when `multiIf` has only one condition, because function `if` is more performant. [#37695](https://github.com/ClickHouse/ClickHouse/pull/37695) ([Anton Popov](https://github.com/CurtizJ)). +* Improve performance of `dictGetDescendants`, `dictGetChildren` functions, create temporary parent to children hierarchical index per query, not per function call during query. Allow to specify `BIDIRECTIONAL` for `HIERARHICAL` attributes, dictionary will maintain parent to children index in memory, that way functions `dictGetDescendants`, `dictGetChildren` will not create temporary index per query. Closes [#32481](https://github.com/ClickHouse/ClickHouse/issues/32481). [#37148](https://github.com/ClickHouse/ClickHouse/pull/37148) ([Maksim Kita](https://github.com/kitaisreal)). +* Aggregates state destruction now may be posted on a thread pool. For queries with LIMIT and big state it provides significant speedup, e.g. `select uniq(number) from numbers_mt(1e7) group by number limit 100` became around 2.5x faster. [#37855](https://github.com/ClickHouse/ClickHouse/pull/37855) ([Nikita Taranov](https://github.com/nickitat)). +* Improve sort performance by single column. [#37195](https://github.com/ClickHouse/ClickHouse/pull/37195) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance of single column sorting using sorting queue specializations. [#37990](https://github.com/ClickHouse/ClickHouse/pull/37990) ([Maksim Kita](https://github.com/kitaisreal)). +* Improved performance on array norm and distance functions 2x-4x times. [#37394](https://github.com/ClickHouse/ClickHouse/pull/37394) ([Alexander Gololobov](https://github.com/davenger)). +* Improve performance of number comparison functions using dynamic dispatch. [#37399](https://github.com/ClickHouse/ClickHouse/pull/37399) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance of ORDER BY with LIMIT. [#37481](https://github.com/ClickHouse/ClickHouse/pull/37481) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance of `hasAll` function using dynamic dispatch infrastructure. [#37484](https://github.com/ClickHouse/ClickHouse/pull/37484) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance of `greatCircleAngle`, `greatCircleDistance`, `geoDistance` functions. [#37524](https://github.com/ClickHouse/ClickHouse/pull/37524) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance of insert into MergeTree if there are multiple columns in ORDER BY. [#35762](https://github.com/ClickHouse/ClickHouse/pull/35762) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix excessive CPU usage in background when there are a lot of tables. [#38028](https://github.com/ClickHouse/ClickHouse/pull/38028) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance of `not` function using dynamic dispatch. [#38058](https://github.com/ClickHouse/ClickHouse/pull/38058) ([Maksim Kita](https://github.com/kitaisreal)). +* Optimized the internal caching of re2 patterns which occur e.g. in LIKE and MATCH functions. [#37544](https://github.com/ClickHouse/ClickHouse/pull/37544) ([Robert Schulze](https://github.com/rschu1ze)). +* Improve filter bitmask generator function all in one with AVX-512 instructions. [#37588](https://github.com/ClickHouse/ClickHouse/pull/37588) ([yaqi-zhao](https://github.com/yaqi-zhao)). +* Apply read method `threadpool` for Hive integration engine. This will significantly speed up reading. [#36328](https://github.com/ClickHouse/ClickHouse/pull/36328) ([æŽæ‰¬](https://github.com/taiyang-li)). +* When all the columns to read are partition keys, construct columns by the file's row number without real reading the Hive file. [#37103](https://github.com/ClickHouse/ClickHouse/pull/37103) ([lgbo](https://github.com/lgbo-ustc)). +* Support multi disks for caching hive files. [#37279](https://github.com/ClickHouse/ClickHouse/pull/37279) ([lgbo](https://github.com/lgbo-ustc)). +* Limiting the maximum cache usage per query can effectively prevent cache pool contamination. [Related Issues](https://github.com/ClickHouse/ClickHouse/issues/28961). [#37859](https://github.com/ClickHouse/ClickHouse/pull/37859) ([Han Shukai](https://github.com/KinderRiven)). +* Currently clickhouse directly downloads all remote files to the local cache (even if they are only read once), which will frequently cause IO of the local hard disk. In some scenarios, these IOs may not be necessary and may easily cause negative optimization. As shown in the figure below, when we run SSB Q1-Q4, the performance of the cache has caused negative optimization. [#37516](https://github.com/ClickHouse/ClickHouse/pull/37516) ([Han Shukai](https://github.com/KinderRiven)). +* Allow to prune the list of files via virtual columns such as `_file` and `_path` when reading from S3. This is for [#37174](https://github.com/ClickHouse/ClickHouse/issues/37174) , [#23494](https://github.com/ClickHouse/ClickHouse/issues/23494). [#37356](https://github.com/ClickHouse/ClickHouse/pull/37356) ([Amos Bird](https://github.com/amosbird)). +* In function: CompressedWriteBuffer::nextImpl(), there is an unnecessary write-copy step that would happen frequently during inserting data. Below shows the differentiation with this patch: - Before: 1. Compress "working_buffer" into "compressed_buffer" 2. write-copy into "out" - After: Directly Compress "working_buffer" into "out". [#37242](https://github.com/ClickHouse/ClickHouse/pull/37242) ([jasperzhu](https://github.com/jinjunzh)). + +#### Improvement +* Support types with non-standard defaults in ROLLUP, CUBE, GROUPING SETS. Closes [#37360](https://github.com/ClickHouse/ClickHouse/issues/37360). [#37667](https://github.com/ClickHouse/ClickHouse/pull/37667) ([Dmitry Novik](https://github.com/novikd)). +* Fix stack traces collection on ARM. Closes [#37044](https://github.com/ClickHouse/ClickHouse/issues/37044). Closes [#15638](https://github.com/ClickHouse/ClickHouse/issues/15638). [#37797](https://github.com/ClickHouse/ClickHouse/pull/37797) ([Maksim Kita](https://github.com/kitaisreal)). +* Client will try every IP address returned by DNS resolution until successful connection. [#37273](https://github.com/ClickHouse/ClickHouse/pull/37273) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Allow to use String type instead of Binary in Arrow/Parquet/ORC formats. This PR introduces 3 new settings for it: `output_format_arrow_string_as_string`, `output_format_parquet_string_as_string`, `output_format_orc_string_as_string`. Default value for all settings is `false`. [#37327](https://github.com/ClickHouse/ClickHouse/pull/37327) ([Kruglov Pavel](https://github.com/Avogar)). +* Apply setting `input_format_max_rows_to_read_for_schema_inference` for all read rows in total from all files in globs. Previously setting `input_format_max_rows_to_read_for_schema_inference` was applied for each file in glob separately and in case of huge number of nulls we could read first `input_format_max_rows_to_read_for_schema_inference` rows from each file and get nothing. Also increase default value for this setting to 25000. [#37332](https://github.com/ClickHouse/ClickHouse/pull/37332) ([Kruglov Pavel](https://github.com/Avogar)). +* Add separate `CLUSTER` grant (and `access_control_improvements.on_cluster_queries_require_cluster_grant` configuration directive, for backward compatibility, default to `false`). [#35767](https://github.com/ClickHouse/ClickHouse/pull/35767) ([Azat Khuzhin](https://github.com/azat)). +* Added support for schema inference for `hdfsCluster`. [#35812](https://github.com/ClickHouse/ClickHouse/pull/35812) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Implement `least_used` load balancing algorithm for disks inside volume (multi disk configuration). [#36686](https://github.com/ClickHouse/ClickHouse/pull/36686) ([Azat Khuzhin](https://github.com/azat)). +* Modify the HTTP Endpoint to return the full stats under the `X-ClickHouse-Summary` header when `send_progress_in_http_headers=0` (before it would return all zeros). - Modify the HTTP Endpoint to return `X-ClickHouse-Exception-Code` header when progress has been sent before (`send_progress_in_http_headers=1`) - Modify the HTTP Endpoint to return `HTTP_REQUEST_TIMEOUT` (408) instead of `HTTP_INTERNAL_SERVER_ERROR` (500) on `TIMEOUT_EXCEEDED` errors. [#36884](https://github.com/ClickHouse/ClickHouse/pull/36884) ([Raúl Marín](https://github.com/Algunenano)). +* Allow a user to inspect grants from granted roles. [#36941](https://github.com/ClickHouse/ClickHouse/pull/36941) ([nvartolomei](https://github.com/nvartolomei)). +* Do not calculate an integral numerically but use CDF functions instead. This will speed up execution and will increase the precision. This fixes [#36714](https://github.com/ClickHouse/ClickHouse/issues/36714). [#36953](https://github.com/ClickHouse/ClickHouse/pull/36953) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add default implementation for Nothing in functions. Now most of the functions will return column with type Nothing in case one of it's arguments is Nothing. It also solves problem with functions like arrayMap/arrayFilter and similar when they have empty array as an argument. Previously queries like `select arrayMap(x -> 2 * x, []);` failed because function inside lambda cannot work with type `Nothing`, now such queries return empty array with type `Array(Nothing)`. Also add support for arrays of nullable types in functions like arrayFilter/arrayFill. Previously, queries like `select arrayFilter(x -> x % 2, [1, NULL])` failed, now they work (if the result of lambda is NULL, then this value won't be included in the result). Closes [#37000](https://github.com/ClickHouse/ClickHouse/issues/37000). [#37048](https://github.com/ClickHouse/ClickHouse/pull/37048) ([Kruglov Pavel](https://github.com/Avogar)). +* Now if a shard has local replica we create a local plan and a plan to read from all remote replicas. They have shared initiator which coordinates reading. [#37204](https://github.com/ClickHouse/ClickHouse/pull/37204) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Do no longer abort server startup if configuration option "mark_cache_size" is not explicitly set. [#37326](https://github.com/ClickHouse/ClickHouse/pull/37326) ([Robert Schulze](https://github.com/rschu1ze)). +* Allows providing `NULL`/`NOT NULL` right after type in column declaration. [#37337](https://github.com/ClickHouse/ClickHouse/pull/37337) ([Igor Nikonov](https://github.com/devcrafter)). +* optimize file segment PARTIALLY_DOWNLOADED get read buffer. [#37338](https://github.com/ClickHouse/ClickHouse/pull/37338) ([xiedeyantu](https://github.com/xiedeyantu)). +* Try to improve short circuit functions processing to fix problems with stress tests. [#37384](https://github.com/ClickHouse/ClickHouse/pull/37384) ([Kruglov Pavel](https://github.com/Avogar)). +* Closes [#37395](https://github.com/ClickHouse/ClickHouse/issues/37395). [#37415](https://github.com/ClickHouse/ClickHouse/pull/37415) ([Memo](https://github.com/Joeywzr)). +* Fix extremely rare deadlock during part fetch in zero-copy replication. Fixes [#37423](https://github.com/ClickHouse/ClickHouse/issues/37423). [#37424](https://github.com/ClickHouse/ClickHouse/pull/37424) ([metahys](https://github.com/metahys)). +* Don't allow to create storage with unknown data format. [#37450](https://github.com/ClickHouse/ClickHouse/pull/37450) ([Kruglov Pavel](https://github.com/Avogar)). +* Set `global_memory_usage_overcommit_max_wait_microseconds` default value to 5 seconds. Add info about `OvercommitTracker` to OOM exception message. Add `MemoryOvercommitWaitTimeMicroseconds` profile event. [#37460](https://github.com/ClickHouse/ClickHouse/pull/37460) ([Dmitry Novik](https://github.com/novikd)). +* Do not display `-0.0` CPU time in clickhouse-client. It can appear due to rounding errors. This closes [#38003](https://github.com/ClickHouse/ClickHouse/issues/38003). This closes [#38038](https://github.com/ClickHouse/ClickHouse/issues/38038). [#38064](https://github.com/ClickHouse/ClickHouse/pull/38064) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Play UI: Keep controls in place when the page is scrolled horizontally. This makes edits comfortable even if the table is wide and it was scrolled far to the right. The feature proposed by Maksym Tereshchenko from CaspianDB. [#37470](https://github.com/ClickHouse/ClickHouse/pull/37470) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Modify query div in play.html to be extendable beyond 20% height. In case of very long queries it is helpful to extend the textarea element, only today, since the div is fixed height, the extended textarea hides the data div underneath. With this fix, extending the textarea element will push the data div down/up such the extended textarea won't hide it. Also, keeps query box width 100% even when the user adjusting the size of the query textarea. [#37488](https://github.com/ClickHouse/ClickHouse/pull/37488) ([guyco87](https://github.com/guyco87)). +* Added `ProfileEvents` for introspection of type of written (inserted or merged) parts (`Inserted{Wide/Compact/InMemory}Parts`, `MergedInto{Wide/Compact/InMemory}Parts`. Added column `part_type` to `system.part_log`. Resolves [#37495](https://github.com/ClickHouse/ClickHouse/issues/37495). [#37536](https://github.com/ClickHouse/ClickHouse/pull/37536) ([Anton Popov](https://github.com/CurtizJ)). +* clickhouse-keeper improvement: move broken logs to a timestamped folder. [#37565](https://github.com/ClickHouse/ClickHouse/pull/37565) ([Antonio Andelic](https://github.com/antonio2368)). +* Do not write expired columns by TTL after subsequent merges (before only first merge/optimize of the part will not write expired by TTL columns, all other will do). [#37570](https://github.com/ClickHouse/ClickHouse/pull/37570) ([Azat Khuzhin](https://github.com/azat)). +* More precise result of the `dumpColumnStructure` miscellaneous function in presence of LowCardinality or Sparse columns. In previous versions, these functions were converting the argument to a full column before returning the result. This is needed to provide an answer in [#6935](https://github.com/ClickHouse/ClickHouse/issues/6935). [#37633](https://github.com/ClickHouse/ClickHouse/pull/37633) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* clickhouse-keeper: store only unique session IDs for watches. [#37641](https://github.com/ClickHouse/ClickHouse/pull/37641) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible "Cannot write to finalized buffer". [#37645](https://github.com/ClickHouse/ClickHouse/pull/37645) ([Azat Khuzhin](https://github.com/azat)). +* Add setting `support_batch_delete` for `DiskS3` to disable multiobject delete calls, which Google Cloud Storage doesn't support. [#37659](https://github.com/ClickHouse/ClickHouse/pull/37659) ([Fred Wulff](https://github.com/frew)). +* Add an option to disable connection pooling in ODBC bridge. [#37705](https://github.com/ClickHouse/ClickHouse/pull/37705) ([Anton Kozlov](https://github.com/tonickkozlov)). +* Functions `dictGetHierarchy`, `dictIsIn`, `dictGetChildren`, `dictGetDescendants` added support nullable `HIERARCHICAL` attribute in dictionaries. Closes [#35521](https://github.com/ClickHouse/ClickHouse/issues/35521). [#37805](https://github.com/ClickHouse/ClickHouse/pull/37805) ([Maksim Kita](https://github.com/kitaisreal)). +* Expose BoringSSL version related info in the `system.build_options` table. [#37850](https://github.com/ClickHouse/ClickHouse/pull/37850) ([Bharat Nallan](https://github.com/bharatnc)). +* Now clickhouse-server removes `delete_tmp` directories on server start. Fixes [#26503](https://github.com/ClickHouse/ClickHouse/issues/26503). [#37906](https://github.com/ClickHouse/ClickHouse/pull/37906) ([alesapin](https://github.com/alesapin)). +* Clean up broken detached parts after timeout. Closes [#25195](https://github.com/ClickHouse/ClickHouse/issues/25195). [#37975](https://github.com/ClickHouse/ClickHouse/pull/37975) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Now in MergeTree table engines family failed-to-move parts will be removed instantly. [#37994](https://github.com/ClickHouse/ClickHouse/pull/37994) ([alesapin](https://github.com/alesapin)). +* Now if setting `always_fetch_merged_part` is enabled for ReplicatedMergeTree merges will try to find parts on other replicas rarely with smaller load for [Zoo]Keeper. [#37995](https://github.com/ClickHouse/ClickHouse/pull/37995) ([alesapin](https://github.com/alesapin)). +* Add implicit grants with grant option too. For example `GRANT CREATE TABLE ON test.* TO A WITH GRANT OPTION` now allows `A` to execute `GRANT CREATE VIEW ON test.* TO B`. [#38017](https://github.com/ClickHouse/ClickHouse/pull/38017) ([Vitaly Baranov](https://github.com/vitlibar)). + +#### Build/Testing/Packaging Improvement +* Use `clang-14` and LLVM infrastructure version 14 for builds. This closes [#34681](https://github.com/ClickHouse/ClickHouse/issues/34681). [#34754](https://github.com/ClickHouse/ClickHouse/pull/34754) ([Alexey Milovidov](https://github.com/alexey-milovidov)). Note: `clang-14` has [a bug](https://github.com/google/sanitizers/issues/1540) in ThreadSanitizer that makes our CI work worse. +* Allow to drop privileges at startup. This simplifies Docker images. Closes [#36293](https://github.com/ClickHouse/ClickHouse/issues/36293). [#36341](https://github.com/ClickHouse/ClickHouse/pull/36341) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add docs spellcheck to CI. [#37790](https://github.com/ClickHouse/ClickHouse/pull/37790) ([Vladimir C](https://github.com/vdimir)). +* Fix overly aggressive stripping which removed the embedded hash required for checking the consistency of the executable. [#37993](https://github.com/ClickHouse/ClickHouse/pull/37993) ([Robert Schulze](https://github.com/rschu1ze)). + +#### Bug Fix + +* Fix `SELECT ... INTERSECT` and `EXCEPT SELECT` statements with constant string types. [#37738](https://github.com/ClickHouse/ClickHouse/pull/37738) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix `GROUP BY` `AggregateFunction` (i.e. you `GROUP BY` by the column that has `AggregateFunction` type). [#37093](https://github.com/ClickHouse/ClickHouse/pull/37093) ([Azat Khuzhin](https://github.com/azat)). +* (experimental WINDOW VIEW) Fix `addDependency` in WindowView. This bug can be reproduced like [#37237](https://github.com/ClickHouse/ClickHouse/issues/37237). [#37224](https://github.com/ClickHouse/ClickHouse/pull/37224) ([vxider](https://github.com/Vxider)). +* Fix inconsistency in ORDER BY ... WITH FILL feature. Query, containing ORDER BY ... WITH FILL, can generate extra rows when multiple WITH FILL columns are present. [#38074](https://github.com/ClickHouse/ClickHouse/pull/38074) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* This PR moving `addDependency` from constructor to `startup()` to avoid adding dependency to a *dropped* table, fix [#37237](https://github.com/ClickHouse/ClickHouse/issues/37237). [#37243](https://github.com/ClickHouse/ClickHouse/pull/37243) ([vxider](https://github.com/Vxider)). +* Fix inserting defaults for missing values in columnar formats. Previously missing columns were filled with defaults for types, not for columns. [#37253](https://github.com/ClickHouse/ClickHouse/pull/37253) ([Kruglov Pavel](https://github.com/Avogar)). +* (experimental Object type) Fix some cases of insertion nested arrays to columns of type `Object`. [#37305](https://github.com/ClickHouse/ClickHouse/pull/37305) ([Anton Popov](https://github.com/CurtizJ)). +* Fix unexpected errors with a clash of constant strings in aggregate function, prewhere and join. Close [#36891](https://github.com/ClickHouse/ClickHouse/issues/36891). [#37336](https://github.com/ClickHouse/ClickHouse/pull/37336) ([Vladimir C](https://github.com/vdimir)). +* Fix projections with GROUP/ORDER BY in query and optimize_aggregation_in_order (before the result was incorrect since only finish sorting was performed). [#37342](https://github.com/ClickHouse/ClickHouse/pull/37342) ([Azat Khuzhin](https://github.com/azat)). +* Fixed error with symbols in key name in S3. Fixes [#33009](https://github.com/ClickHouse/ClickHouse/issues/33009). [#37344](https://github.com/ClickHouse/ClickHouse/pull/37344) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Throw an exception when GROUPING SETS used with ROLLUP or CUBE. [#37367](https://github.com/ClickHouse/ClickHouse/pull/37367) ([Dmitry Novik](https://github.com/novikd)). +* Fix LOGICAL_ERROR in getMaxSourcePartsSizeForMerge during merges (in case of non standard, greater, values of `background_pool_size`/`background_merges_mutations_concurrency_ratio` has been specified in `config.xml` (new way) not in `users.xml` (deprecated way)). [#37413](https://github.com/ClickHouse/ClickHouse/pull/37413) ([Azat Khuzhin](https://github.com/azat)). +* Stop removing UTF-8 BOM in RowBinary format. [#37428](https://github.com/ClickHouse/ClickHouse/pull/37428) ([Paul Loyd](https://github.com/loyd)). [#37428](https://github.com/ClickHouse/ClickHouse/pull/37428) ([Paul Loyd](https://github.com/loyd)). +* clickhouse-keeper bugfix: fix force recovery for single node cluster. [#37440](https://github.com/ClickHouse/ClickHouse/pull/37440) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix logical error in normalizeUTF8 functions. Closes [#37298](https://github.com/ClickHouse/ClickHouse/issues/37298). [#37443](https://github.com/ClickHouse/ClickHouse/pull/37443) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix cast lowcard of nullable in JoinSwitcher, close [#37385](https://github.com/ClickHouse/ClickHouse/issues/37385). [#37453](https://github.com/ClickHouse/ClickHouse/pull/37453) ([Vladimir C](https://github.com/vdimir)). +* Fix named tuples output in ORC/Arrow/Parquet formats. [#37458](https://github.com/ClickHouse/ClickHouse/pull/37458) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix optimization of monotonous functions in ORDER BY clause in presence of GROUPING SETS. Fixes [#37401](https://github.com/ClickHouse/ClickHouse/issues/37401). [#37493](https://github.com/ClickHouse/ClickHouse/pull/37493) ([Dmitry Novik](https://github.com/novikd)). +* Fix error on joining with dictionary on some conditions. Close [#37386](https://github.com/ClickHouse/ClickHouse/issues/37386). [#37530](https://github.com/ClickHouse/ClickHouse/pull/37530) ([Vladimir C](https://github.com/vdimir)). +* Prohibit `optimize_aggregation_in_order` with `GROUPING SETS` (fixes `LOGICAL_ERROR`). [#37542](https://github.com/ClickHouse/ClickHouse/pull/37542) ([Azat Khuzhin](https://github.com/azat)). +* Fix wrong dump information of ActionsDAG. [#37587](https://github.com/ClickHouse/ClickHouse/pull/37587) ([zhanglistar](https://github.com/zhanglistar)). +* Fix converting types for UNION queries (may produce LOGICAL_ERROR). [#37593](https://github.com/ClickHouse/ClickHouse/pull/37593) ([Azat Khuzhin](https://github.com/azat)). +* Fix `WITH FILL` modifier with negative intervals in `STEP` clause. Fixes [#37514](https://github.com/ClickHouse/ClickHouse/issues/37514). [#37600](https://github.com/ClickHouse/ClickHouse/pull/37600) ([Anton Popov](https://github.com/CurtizJ)). +* Fix illegal joinGet array usage when ` join_use_nulls = 1`. This fixes [#37562](https://github.com/ClickHouse/ClickHouse/issues/37562) . [#37650](https://github.com/ClickHouse/ClickHouse/pull/37650) ([Amos Bird](https://github.com/amosbird)). +* Fix columns number mismatch in cross join, close [#37561](https://github.com/ClickHouse/ClickHouse/issues/37561). [#37653](https://github.com/ClickHouse/ClickHouse/pull/37653) ([Vladimir C](https://github.com/vdimir)). +* Fix segmentation fault in `show create table` from mysql database when it is configured with named collections. Closes [#37683](https://github.com/ClickHouse/ClickHouse/issues/37683). [#37690](https://github.com/ClickHouse/ClickHouse/pull/37690) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix RabbitMQ Storage not being able to startup on server restart if storage was create without SETTINGS clause. Closes [#37463](https://github.com/ClickHouse/ClickHouse/issues/37463). [#37691](https://github.com/ClickHouse/ClickHouse/pull/37691) ([Kseniia Sumarokova](https://github.com/kssenii)). +* SQL user defined functions disable CREATE/DROP in readonly mode. Closes [#37280](https://github.com/ClickHouse/ClickHouse/issues/37280). [#37699](https://github.com/ClickHouse/ClickHouse/pull/37699) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix formatting of Nullable arguments for executable user defined functions. Closes [#35897](https://github.com/ClickHouse/ClickHouse/issues/35897). [#37711](https://github.com/ClickHouse/ClickHouse/pull/37711) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix optimization enabled by setting `optimize_monotonous_functions_in_order_by` in distributed queries. Fixes [#36037](https://github.com/ClickHouse/ClickHouse/issues/36037). [#37724](https://github.com/ClickHouse/ClickHouse/pull/37724) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible logical error: `Invalid Field get from type UInt64 to type Float64` in `values` table function. Closes [#37602](https://github.com/ClickHouse/ClickHouse/issues/37602). [#37754](https://github.com/ClickHouse/ClickHouse/pull/37754) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix possible segfault in schema inference in case of exception in SchemaReader constructor. Closes [#37680](https://github.com/ClickHouse/ClickHouse/issues/37680). [#37760](https://github.com/ClickHouse/ClickHouse/pull/37760) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix setting cast_ipv4_ipv6_default_on_conversion_error for internal cast function. Closes [#35156](https://github.com/ClickHouse/ClickHouse/issues/35156). [#37761](https://github.com/ClickHouse/ClickHouse/pull/37761) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix toString error on DatatypeDate32. [#37775](https://github.com/ClickHouse/ClickHouse/pull/37775) ([LiuNeng](https://github.com/liuneng1994)). +* The clickhouse-keeper setting `dead_session_check_period_ms` was transformed into microseconds (multiplied by 1000), which lead to dead sessions only being cleaned up after several minutes (instead of 500ms). [#37824](https://github.com/ClickHouse/ClickHouse/pull/37824) ([Michael Lex](https://github.com/mlex)). +* Fix possible "No more packets are available" for distributed queries (in case of `async_socket_for_remote`/`use_hedged_requests` is disabled). [#37826](https://github.com/ClickHouse/ClickHouse/pull/37826) ([Azat Khuzhin](https://github.com/azat)). +* (experimental WINDOW VIEW) Do not drop the inner target table when executing `ALTER TABLE … MODIFY QUERY` in WindowView. [#37879](https://github.com/ClickHouse/ClickHouse/pull/37879) ([vxider](https://github.com/Vxider)). +* Fix directory ownership of coordination dir in clickhouse-keeper Docker image. Fixes [#37914](https://github.com/ClickHouse/ClickHouse/issues/37914). [#37915](https://github.com/ClickHouse/ClickHouse/pull/37915) ([James Maidment](https://github.com/jamesmaidment)). +* Dictionaries fix custom query with update field and `{condition}`. Closes [#33746](https://github.com/ClickHouse/ClickHouse/issues/33746). [#37947](https://github.com/ClickHouse/ClickHouse/pull/37947) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix possible incorrect result of `SELECT ... WITH FILL` in the case when `ORDER BY` should be applied after `WITH FILL` result (e.g. for outer query). Incorrect result was caused by optimization for `ORDER BY` expressions ([#35623](https://github.com/ClickHouse/ClickHouse/issues/35623)). Closes [#37904](https://github.com/ClickHouse/ClickHouse/issues/37904). [#37959](https://github.com/ClickHouse/ClickHouse/pull/37959) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* (experimental WINDOW VIEW) Add missing default columns when pushing to the target table in WindowView, fix [#37815](https://github.com/ClickHouse/ClickHouse/issues/37815). [#37965](https://github.com/ClickHouse/ClickHouse/pull/37965) ([vxider](https://github.com/Vxider)). +* Fixed too large stack frame that would cause compilation to fail. [#37996](https://github.com/ClickHouse/ClickHouse/pull/37996) ([Han Shukai](https://github.com/KinderRiven)). +* When open enable_filesystem_query_cache_limit, throw Reserved cache size exceeds the remaining cache size. [#38004](https://github.com/ClickHouse/ClickHouse/pull/38004) ([xiedeyantu](https://github.com/xiedeyantu)). +* Fix converting types for UNION queries (may produce LOGICAL_ERROR). [#34775](https://github.com/ClickHouse/ClickHouse/pull/34775) ([Azat Khuzhin](https://github.com/azat)). +* TTL merge may not be scheduled again if BackgroundExecutor is busy. --merges_with_ttl_counter is increased in selectPartsToMerge() --merge task will be ignored if BackgroundExecutor is busy --merges_with_ttl_counter will not be decrease. [#36387](https://github.com/ClickHouse/ClickHouse/pull/36387) ([lthaooo](https://github.com/lthaooo)). +* Fix overridden settings value of `normalize_function_names`. [#36937](https://github.com/ClickHouse/ClickHouse/pull/36937) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Fix for exponential time decaying window functions. Now respecting boundaries of the window. [#36944](https://github.com/ClickHouse/ClickHouse/pull/36944) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fix possible heap-use-after-free error when reading system.projection_parts and system.projection_parts_columns . This fixes [#37184](https://github.com/ClickHouse/ClickHouse/issues/37184). [#37185](https://github.com/ClickHouse/ClickHouse/pull/37185) ([Amos Bird](https://github.com/amosbird)). +* Fixed `DateTime64` fractional seconds behavior prior to Unix epoch. [#37697](https://github.com/ClickHouse/ClickHouse/pull/37697) ([Andrey Zvonov](https://github.com/zvonand)). [#37039](https://github.com/ClickHouse/ClickHouse/pull/37039) ([æŽæ‰¬](https://github.com/taiyang-li)). + +### ClickHouse release 22.5, 2022-05-19 + +#### Upgrade Notes + +* Now, background merges, mutations and `OPTIMIZE` will not increment `SelectedRows` and `SelectedBytes` metrics. They (still) will increment `MergedRows` and `MergedUncompressedBytes` as it was before. This only affects the metric values, and makes them better. This change does not introduce any incompatibility, but you may wonder about the changes of metrics, so we put in this category. [#37040](https://github.com/ClickHouse/ClickHouse/pull/37040) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Updated the BoringSSL module to the official FIPS compliant version. This makes ClickHouse FIPS compliant. [#35914](https://github.com/ClickHouse/ClickHouse/pull/35914) ([Meena-Renganathan](https://github.com/Meena-Renganathan)). The ciphers `aes-192-cfb128` and `aes-256-cfb128` were removed, because they are not included in the FIPS certified version of BoringSSL. +* `max_memory_usage` setting is removed from the default user profile in `users.xml`. This enables flexible memory limits for queries instead of the old rigid limit of 10 GB. +* Disable `log_query_threads` setting by default. It controls the logging of statistics about every thread participating in query execution. After supporting asynchronous reads, the total number of distinct thread ids became too large, and logging into the `query_thread_log` has become too heavy. [#37077](https://github.com/ClickHouse/ClickHouse/pull/37077) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Remove function `groupArraySorted` which has a bug. [#36822](https://github.com/ClickHouse/ClickHouse/pull/36822) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### New Feature + +* Enable memory overcommit by default. [#35921](https://github.com/ClickHouse/ClickHouse/pull/35921) ([Dmitry Novik](https://github.com/novikd)). +* Add support of GROUPING SETS in GROUP BY clause. This implementation supports a parallel processing of grouping sets. [#33631](https://github.com/ClickHouse/ClickHouse/pull/33631) ([Dmitry Novik](https://github.com/novikd)). +* Added `system.certificates` table. [#37142](https://github.com/ClickHouse/ClickHouse/pull/37142) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Adds `h3Line`, `h3Distance` and `h3HexRing` functions. [#37030](https://github.com/ClickHouse/ClickHouse/pull/37030) ([Bharat Nallan](https://github.com/bharatnc)). +* New single binary based diagnostics tool (clickhouse-diagnostics). [#36705](https://github.com/ClickHouse/ClickHouse/pull/36705) ([Dale McDiarmid](https://github.com/gingerwizard)). +* Add output format `Prometheus` [#36051](https://github.com/ClickHouse/ClickHouse/issues/36051). [#36206](https://github.com/ClickHouse/ClickHouse/pull/36206) ([Vladimir C](https://github.com/vdimir)). +* Add `MySQLDump` input format. It reads all data from INSERT queries belonging to one table in dump. If there are more than one table, by default it reads data from the first one. [#36667](https://github.com/ClickHouse/ClickHouse/pull/36667) ([Kruglov Pavel](https://github.com/Avogar)). +* Show the `total_rows` and `total_bytes` fields in `system.tables` for temporary tables. [#36401](https://github.com/ClickHouse/ClickHouse/issues/36401). [#36439](https://github.com/ClickHouse/ClickHouse/pull/36439) ([xiedeyantu](https://github.com/xiedeyantu)). +* Allow to override `parts_to_delay_insert` and `parts_to_throw_insert` with query-level settings. If they are defined, they will override table-level settings. [#36371](https://github.com/ClickHouse/ClickHouse/pull/36371) ([Memo](https://github.com/Joeywzr)). + +#### Experimental Feature + +* Implemented L1, L2, Linf, Cosine distance functions for arrays and L1, L2, Linf norm functions for arrays. + [#37033](https://github.com/ClickHouse/ClickHouse/pull/37033) ([qieqieplus](https://github.com/qieqieplus)). Caveat: the functions will be renamed. +* Improve the `WATCH` query in WindowView: 1. Reduce the latency of providing query results by calling the `fire_condition` signal. 2. Makes the cancel query operation(ctrl-c) faster, by checking `isCancelled()` more frequently. [#37226](https://github.com/ClickHouse/ClickHouse/pull/37226) ([vxider](https://github.com/Vxider)). +* Introspection for remove filesystem cache. [#36802](https://github.com/ClickHouse/ClickHouse/pull/36802) ([Han Shukai](https://github.com/KinderRiven)). +* Added new hash function `wyHash64` for SQL. [#36467](https://github.com/ClickHouse/ClickHouse/pull/36467) ([olevino](https://github.com/olevino)). +* Improvement for replicated databases: Added `SYSTEM SYNC DATABASE REPLICA` query which allows to sync tables metadata inside Replicated database, because currently synchronisation is asynchronous. [#35944](https://github.com/ClickHouse/ClickHouse/pull/35944) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Improvement for remote filesystem cache: Better read from cache. [#37054](https://github.com/ClickHouse/ClickHouse/pull/37054) ([Kseniia Sumarokova](https://github.com/kssenii)). Improve `SYSTEM DROP FILESYSTEM CACHE` query: `` option and `FORCE` option. [#36639](https://github.com/ClickHouse/ClickHouse/pull/36639) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Improvement for semistructured data: Allow to cast columns of type `Object(...)` to `Object(Nullable(...))`. [#36564](https://github.com/ClickHouse/ClickHouse/pull/36564) ([awakeljw](https://github.com/awakeljw)). +* Improvement for parallel replicas: We create a local interpreter if we want to execute query on localhost replica. But for when executing query on multiple replicas we rely on the fact that a connection exists so replicas can talk to coordinator. It is now improved and localhost replica can talk to coordinator directly in the same process. [#36281](https://github.com/ClickHouse/ClickHouse/pull/36281) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). + +#### Performance Improvement + +* Improve performance of `avg`, `sum` aggregate functions if used without GROUP BY expression. [#37257](https://github.com/ClickHouse/ClickHouse/pull/37257) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance of unary arithmetic functions (`bitCount`, `bitNot`, `abs`, `intExp2`, `intExp10`, `negate`, `roundAge`, `roundDuration`, `roundToExp2`, `sign`) using dynamic dispatch. [#37289](https://github.com/ClickHouse/ClickHouse/pull/37289) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance of ORDER BY, MergeJoin, insertion into MergeTree using JIT compilation of sort columns comparator. [#34469](https://github.com/ClickHouse/ClickHouse/pull/34469) ([Maksim Kita](https://github.com/kitaisreal)). +* Change structure of `system.asynchronous_metric_log`. It will take about 10 times less space. This closes [#36357](https://github.com/ClickHouse/ClickHouse/issues/36357). The field `event_time_microseconds` was removed, because it is useless. [#36360](https://github.com/ClickHouse/ClickHouse/pull/36360) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Load marks for only necessary columns when reading wide parts. [#36879](https://github.com/ClickHouse/ClickHouse/pull/36879) ([Anton Kozlov](https://github.com/tonickkozlov)). +* Improves performance of file descriptor cache by narrowing mutex scopes. [#36682](https://github.com/ClickHouse/ClickHouse/pull/36682) ([Anton Kozlov](https://github.com/tonickkozlov)). +* Improve performance of reading from storage `File` and table functions `file` in case when path has globs and matched directory contains large number of files. [#36647](https://github.com/ClickHouse/ClickHouse/pull/36647) ([Anton Popov](https://github.com/CurtizJ)). +* Apply parallel parsing for input format `HiveText`, which can speed up HiveText parsing by 2x when reading local file. [#36650](https://github.com/ClickHouse/ClickHouse/pull/36650) ([æŽæ‰¬](https://github.com/taiyang-li)). +* The default `HashJoin` is not thread safe for inserting right table's rows and run it in a single thread. When the right table is large, the join process is too slow with low cpu utilization. [#36415](https://github.com/ClickHouse/ClickHouse/pull/36415) ([lgbo](https://github.com/lgbo-ustc)). +* Allow to rewrite `select countDistinct(a) from t` to `select count(1) from (select a from t groupBy a)`. [#35993](https://github.com/ClickHouse/ClickHouse/pull/35993) ([zhanglistar](https://github.com/zhanglistar)). +* Transform OR LIKE chain to multiMatchAny. Will enable once we have more confidence it works. [#34932](https://github.com/ClickHouse/ClickHouse/pull/34932) ([Daniel Kutenin](https://github.com/danlark1)). +* Improve performance of some functions with inlining. [#34544](https://github.com/ClickHouse/ClickHouse/pull/34544) ([Daniel Kutenin](https://github.com/danlark1)). +* Add a branch to avoid unnecessary memcpy in readBig. It improves performance somewhat. [#36095](https://github.com/ClickHouse/ClickHouse/pull/36095) ([jasperzhu](https://github.com/jinjunzh)). +* Implement partial GROUP BY key for optimize_aggregation_in_order. [#35111](https://github.com/ClickHouse/ClickHouse/pull/35111) ([Azat Khuzhin](https://github.com/azat)). + +#### Improvement + +* Show names of erroneous files in case of parsing errors while executing table functions `file`, `s3` and `url`. [#36314](https://github.com/ClickHouse/ClickHouse/pull/36314) ([Anton Popov](https://github.com/CurtizJ)). +* Allowed to increase the number of threads for executing background operations (merges, mutations, moves and fetches) at runtime if they are specified at top level config. [#36425](https://github.com/ClickHouse/ClickHouse/pull/36425) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Now date time conversion functions that generates time before 1970-01-01 00:00:00 with partial hours/minutes timezones will be saturated to zero instead of overflow. This is the continuation of https://github.com/ClickHouse/ClickHouse/pull/29953 which addresses https://github.com/ClickHouse/ClickHouse/pull/29953#discussion_r800550280 . Mark as improvement because it's implementation defined behavior (and very rare case) and we are allowed to break it. [#36656](https://github.com/ClickHouse/ClickHouse/pull/36656) ([Amos Bird](https://github.com/amosbird)). +* Add a warning if someone running clickhouse-server with log level "test". The log level "test" was added recently and cannot be used in production due to inevitable, unavoidable, fatal and life-threatening performance degradation. [#36824](https://github.com/ClickHouse/ClickHouse/pull/36824) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Parse collations in CREATE TABLE, throw exception or ignore. closes [#35892](https://github.com/ClickHouse/ClickHouse/issues/35892). [#36271](https://github.com/ClickHouse/ClickHouse/pull/36271) ([yuuch](https://github.com/yuuch)). +* Option `compatibility_ignore_auto_increment_in_create_table` allows ignoring `AUTO_INCREMENT` keyword in a column declaration to simplify migration from MySQL. [#37178](https://github.com/ClickHouse/ClickHouse/pull/37178) ([Igor Nikonov](https://github.com/devcrafter)). +* Add aliases `JSONLines` and `NDJSON` for `JSONEachRow`. Closes [#36303](https://github.com/ClickHouse/ClickHouse/issues/36303). [#36327](https://github.com/ClickHouse/ClickHouse/pull/36327) ([flynn](https://github.com/ucasfl)). +* Limit the max partitions could be queried for each hive table. Avoid resource overruns. [#37281](https://github.com/ClickHouse/ClickHouse/pull/37281) ([lgbo](https://github.com/lgbo-ustc)). +* Added implicit cast for `h3kRing` function second argument to improve usability. Closes [#35432](https://github.com/ClickHouse/ClickHouse/issues/35432). [#37189](https://github.com/ClickHouse/ClickHouse/pull/37189) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix progress indication for `INSERT SELECT` in `clickhouse-local` for any query and for file progress in client, more correct file progress. [#37075](https://github.com/ClickHouse/ClickHouse/pull/37075) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix bug which can lead to forgotten outdated parts in MergeTree table engines family in case of filesystem failures during parts removal. Before fix they will be removed only after first server restart. [#37014](https://github.com/ClickHouse/ClickHouse/pull/37014) ([alesapin](https://github.com/alesapin)). +* Implemented a new mode of handling row policies which can be enabled in the main configuration which enables users without permissive row policies to read rows. [#36997](https://github.com/ClickHouse/ClickHouse/pull/36997) ([Vitaly Baranov](https://github.com/vitlibar)). +* Play UI: Nullable numbers will be aligned to the right in table cells. This closes [#36982](https://github.com/ClickHouse/ClickHouse/issues/36982). [#36988](https://github.com/ClickHouse/ClickHouse/pull/36988) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Play UI: If there is one row in result and more than a few columns, display the result vertically. Continuation of [#36811](https://github.com/ClickHouse/ClickHouse/issues/36811). [#36842](https://github.com/ClickHouse/ClickHouse/pull/36842) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Cleanup CSS in Play UI. The pixels are more evenly placed. Better usability for long content in table cells. [#36569](https://github.com/ClickHouse/ClickHouse/pull/36569) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Finalize write buffers in case of exception to avoid doing it in destructors. Hope it fixes: [#36907](https://github.com/ClickHouse/ClickHouse/issues/36907). [#36979](https://github.com/ClickHouse/ClickHouse/pull/36979) ([Kruglov Pavel](https://github.com/Avogar)). +* After [#36425](https://github.com/ClickHouse/ClickHouse/issues/36425) settings like `background_fetches_pool_size` became obsolete and can appear in top level config, but clickhouse throws and exception like `Error updating configuration from '/etc/clickhouse-server/config.xml' config.: Code: 137. DB::Exception: A setting 'background_fetches_pool_size' appeared at top level in config /etc/clickhouse-server/config.xml.` This is fixed. [#36917](https://github.com/ClickHouse/ClickHouse/pull/36917) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add extra diagnostic info (if applicable) when sending exception to other server. [#36872](https://github.com/ClickHouse/ClickHouse/pull/36872) ([tavplubix](https://github.com/tavplubix)). +* Allow to execute hash functions with arguments of type `Array(Tuple(..))`. [#36812](https://github.com/ClickHouse/ClickHouse/pull/36812) ([Anton Popov](https://github.com/CurtizJ)). +* Added `user_defined_path` config setting. [#36753](https://github.com/ClickHouse/ClickHouse/pull/36753) ([Maksim Kita](https://github.com/kitaisreal)). +* Allow cluster macro in `s3Cluster` table function. [#36726](https://github.com/ClickHouse/ClickHouse/pull/36726) ([Vadim Volodin](https://github.com/PolyProgrammist)). +* Properly cancel INSERT queries in `clickhouse-client`/`clickhouse-local`. [#36710](https://github.com/ClickHouse/ClickHouse/pull/36710) ([Azat Khuzhin](https://github.com/azat)). +* Allow to cancel a query while still keeping a decent query id in `MySQLHandler`. [#36699](https://github.com/ClickHouse/ClickHouse/pull/36699) ([Amos Bird](https://github.com/amosbird)). +* Add `is_all_data_sent` column into `system.processes`, and improve internal testing hardening check based on it. [#36649](https://github.com/ClickHouse/ClickHouse/pull/36649) ([Azat Khuzhin](https://github.com/azat)). +* The metrics about time spent reading from s3 now calculated correctly. Close [#35483](https://github.com/ClickHouse/ClickHouse/issues/35483). [#36572](https://github.com/ClickHouse/ClickHouse/pull/36572) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Allow file descriptors in table function file if it is run in clickhouse-local. [#36562](https://github.com/ClickHouse/ClickHouse/pull/36562) ([wuxiaobai24](https://github.com/wuxiaobai24)). +* Allow names of tuple elements that start from digits. [#36544](https://github.com/ClickHouse/ClickHouse/pull/36544) ([Anton Popov](https://github.com/CurtizJ)). +* Now clickhouse-benchmark can read authentication info from environment variables. [#36497](https://github.com/ClickHouse/ClickHouse/pull/36497) ([Anton Kozlov](https://github.com/tonickkozlov)). +* `clickhouse-keeper` improvement: add support for force recovery which allows you to reconfigure cluster without quorum. [#36258](https://github.com/ClickHouse/ClickHouse/pull/36258) ([Antonio Andelic](https://github.com/antonio2368)). +* Improve schema inference for JSON objects. [#36207](https://github.com/ClickHouse/ClickHouse/pull/36207) ([Kruglov Pavel](https://github.com/Avogar)). +* Refactor code around schema inference with globs. Try next file from glob only if it makes sense (previously we tried next file in case of any error). Also it fixes [#36317](https://github.com/ClickHouse/ClickHouse/issues/36317). [#36205](https://github.com/ClickHouse/ClickHouse/pull/36205) ([Kruglov Pavel](https://github.com/Avogar)). +* Add a separate `CLUSTER` grant (and `access_control_improvements.on_cluster_queries_require_cluster_grant` configuration directive, for backward compatibility, default to `false`). [#35767](https://github.com/ClickHouse/ClickHouse/pull/35767) ([Azat Khuzhin](https://github.com/azat)). +* If the required amount of memory is available before the selected query stopped, all waiting queries continue execution. Now we don't stop any query if memory is freed before the moment when the selected query knows about the cancellation. [#35637](https://github.com/ClickHouse/ClickHouse/pull/35637) ([Dmitry Novik](https://github.com/novikd)). +* Nullables detection in protobuf. In proto3, default values are not sent on the wire. This makes it non-trivial to distinguish between null and default values for Nullable columns. A standard way to deal with this problem is to use Google wrappers to nest the target value within an inner message (see https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/wrappers.proto). In this case, a missing field is interpreted as null value, a field with missing value if interpreted as default value, and a field with regular value is interpreted as regular value. However, ClickHouse interprets Google wrappers as nested columns. We propose to introduce special behaviour to detect Google wrappers and interpret them like in the description above. For example, to serialize values for a Nullable column `test`, we would use `google.protobuf.StringValue test` in our .proto schema. Note that these types are so called "well-known types" in Protobuf, implemented in the library itself. [#35149](https://github.com/ClickHouse/ClickHouse/pull/35149) ([Jakub Kuklis](https://github.com/jkuklis)). +* Added support for specifying `content_type` in predefined and static HTTP handler config. [#34916](https://github.com/ClickHouse/ClickHouse/pull/34916) ([Roman Nikonov](https://github.com/nic11)). +* Warn properly if use clickhouse-client --file without preceeding --external. Close [#34747](https://github.com/ClickHouse/ClickHouse/issues/34747). [#34765](https://github.com/ClickHouse/ClickHouse/pull/34765) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Improve MySQL database engine to compatible with binary(0) dataType. [#37232](https://github.com/ClickHouse/ClickHouse/pull/37232) ([zzsmdfj](https://github.com/zzsmdfj)). +* Improve JSON report of clickhouse-benchmark. [#36473](https://github.com/ClickHouse/ClickHouse/pull/36473) ([Tian Xinhui](https://github.com/xinhuitian)). +* Server might refuse to start if it cannot resolve hostname of external ClickHouse dictionary. It's fixed. Fixes [#36451](https://github.com/ClickHouse/ClickHouse/issues/36451). [#36463](https://github.com/ClickHouse/ClickHouse/pull/36463) ([tavplubix](https://github.com/tavplubix)). + +#### Build/Testing/Packaging Improvement + +* Now `clickhouse-keeper` for the `x86_64` architecture is statically linked with [musl](https://musl.libc.org/) and doesn't depend on any system libraries. [#31833](https://github.com/ClickHouse/ClickHouse/pull/31833) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* ClickHouse builds for `PowerPC64LE` architecture are now available in universal installation script `curl https://clickhouse.com/ | sh` and by direct link `https://builds.clickhouse.com/master/powerpc64le/clickhouse`. [#37095](https://github.com/ClickHouse/ClickHouse/pull/37095) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Limit PowerPC code generation to Power8 for better compatibility. This closes [#36025](https://github.com/ClickHouse/ClickHouse/issues/36025). [#36529](https://github.com/ClickHouse/ClickHouse/pull/36529) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Simplify performance test. This will give a chance for us to use it. [#36769](https://github.com/ClickHouse/ClickHouse/pull/36769) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fail performance comparison on errors in the report. [#34797](https://github.com/ClickHouse/ClickHouse/pull/34797) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add ZSTD support for Arrow. This fixes [#35283](https://github.com/ClickHouse/ClickHouse/issues/35283). [#35486](https://github.com/ClickHouse/ClickHouse/pull/35486) ([Sean Lafferty](https://github.com/seanlaff)). + +#### Bug Fix + +* Extracts Version ID if present from the URI and adds a request to the AWS HTTP URI. Closes [#31221](https://github.com/ClickHouse/ClickHouse/issues/31221). - [x] Extract `Version ID` from URI if present and reassemble without it. - [x] Configure `AWS HTTP URI` object with request. - [x] Unit Tests: [`gtest_s3_uri`](https://github.com/ClickHouse/ClickHouse/blob/2340a6c6849ebc05a8efbf97ba8de3ff9dc0eff4/src/IO/tests/gtest_s3_uri.cpp) - [x] Drop instrumentation commit. [#34571](https://github.com/ClickHouse/ClickHouse/pull/34571) ([Saad Ur Rahman](https://github.com/surahman)). +* Fix system.opentelemetry_span_log attribute.values alias to values instead of keys. [#37275](https://github.com/ClickHouse/ClickHouse/pull/37275) ([Aleksandr Razumov](https://github.com/ernado)). +* Fix Nullable(String) to Nullable(Bool/IPv4/IPv6) conversion Closes [#37221](https://github.com/ClickHouse/ClickHouse/issues/37221). [#37270](https://github.com/ClickHouse/ClickHouse/pull/37270) ([Kruglov Pavel](https://github.com/Avogar)). +* Experimental feature: Fix execution of mutations in tables, in which there exist columns of type `Object`. Using subcolumns of type `Object` in `WHERE` expression of `UPDATE` or `DELETE` queries is now allowed yet, as well as manipulating (`DROP`, `MODIFY`) of separate subcolumns. Fixes [#37205](https://github.com/ClickHouse/ClickHouse/issues/37205). [#37266](https://github.com/ClickHouse/ClickHouse/pull/37266) ([Anton Popov](https://github.com/CurtizJ)). +* Kafka does not need `group.id` on producer stage. In console log you can find Warning that describe this issue: ``` 2022.05.15 17:59:13.270227 [ 137 ] {} StorageKafka (topic-name): [rdk:CONFWARN] [thrd:app]: Configuration property group.id is a consumer property and will be ignored by this producer instance ```. [#37228](https://github.com/ClickHouse/ClickHouse/pull/37228) ([Mark Andreev](https://github.com/mrk-andreev)). +* Experimental feature (WindowView): Update `max_fired_watermark ` after blocks actually fired, in case delete data that hasn't been fired yet. [#37225](https://github.com/ClickHouse/ClickHouse/pull/37225) ([vxider](https://github.com/Vxider)). +* Fix "Cannot create column of type Set" for distributed queries with LIMIT BY. [#37193](https://github.com/ClickHouse/ClickHouse/pull/37193) ([Azat Khuzhin](https://github.com/azat)). +* Experimental feature: Now WindowView `WATCH EVENTS` query will not be terminated due to the nonempty Chunk created in `WindowViewSource.h:58`. [#37182](https://github.com/ClickHouse/ClickHouse/pull/37182) ([vxider](https://github.com/Vxider)). +* Enable `enable_global_with_statement` for subqueries, close [#37141](https://github.com/ClickHouse/ClickHouse/issues/37141). [#37166](https://github.com/ClickHouse/ClickHouse/pull/37166) ([Vladimir C](https://github.com/vdimir)). +* Fix implicit cast for optimize_skip_unused_shards_rewrite_in. [#37153](https://github.com/ClickHouse/ClickHouse/pull/37153) ([Azat Khuzhin](https://github.com/azat)). +* The ILIKE function on FixedString columns could have returned wrong results (i.e. match less than it should). [#37117](https://github.com/ClickHouse/ClickHouse/pull/37117) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix `GROUP BY` `AggregateFunction` (i.e. you `GROUP BY` by the column that has `AggregateFunction` type). [#37093](https://github.com/ClickHouse/ClickHouse/pull/37093) ([Azat Khuzhin](https://github.com/azat)). +* Experimental feature: Fix optimize_aggregation_in_order with prefix GROUP BY and *Array aggregate functions. [#37050](https://github.com/ClickHouse/ClickHouse/pull/37050) ([Azat Khuzhin](https://github.com/azat)). +* Fixed performance degradation of some INSERT SELECT queries with implicit aggregation. Fixes [#36792](https://github.com/ClickHouse/ClickHouse/issues/36792). [#37047](https://github.com/ClickHouse/ClickHouse/pull/37047) ([tavplubix](https://github.com/tavplubix)). +* Experimental feature: Fix in-order `GROUP BY` (`optimize_aggregation_in_order=1`) with `*Array` (`groupArrayArray`/...) aggregate functions. [#37046](https://github.com/ClickHouse/ClickHouse/pull/37046) ([Azat Khuzhin](https://github.com/azat)). +* Fix LowCardinality->ArrowDictionary invalid output when type of indexes is not UInt8. Closes [#36832](https://github.com/ClickHouse/ClickHouse/issues/36832). [#37043](https://github.com/ClickHouse/ClickHouse/pull/37043) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixed problem with infs in `quantileTDigest`. Fixes [#32107](https://github.com/ClickHouse/ClickHouse/issues/32107). [#37021](https://github.com/ClickHouse/ClickHouse/pull/37021) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Fix sending external tables data in HedgedConnections with max_parallel_replicas != 1. [#36981](https://github.com/ClickHouse/ClickHouse/pull/36981) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixed logical error on `TRUNCATE` query in `Replicated` database. Fixes [#33747](https://github.com/ClickHouse/ClickHouse/issues/33747). [#36976](https://github.com/ClickHouse/ClickHouse/pull/36976) ([tavplubix](https://github.com/tavplubix)). +* Experimental feature: Fix stuck when dropping source table in WindowView. Closes [#35678](https://github.com/ClickHouse/ClickHouse/issues/35678). [#36967](https://github.com/ClickHouse/ClickHouse/pull/36967) ([vxider](https://github.com/Vxider)). +* Experimental feature (rocksdb cache): Fix issue: [#36671](https://github.com/ClickHouse/ClickHouse/issues/36671). [#36929](https://github.com/ClickHouse/ClickHouse/pull/36929) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Experimental feature: Fix bugs when using multiple columns in WindowView by adding converting actions to make it possible to call`writeIntoWindowView` with a slightly different schema. [#36928](https://github.com/ClickHouse/ClickHouse/pull/36928) ([vxider](https://github.com/Vxider)). +* Fix bug in clickhouse-keeper which can lead to corrupted compressed log files in case of small load and restarts. [#36910](https://github.com/ClickHouse/ClickHouse/pull/36910) ([alesapin](https://github.com/alesapin)). +* Fix incorrect query result when doing constant aggregation. This fixes [#36728](https://github.com/ClickHouse/ClickHouse/issues/36728) . [#36888](https://github.com/ClickHouse/ClickHouse/pull/36888) ([Amos Bird](https://github.com/amosbird)). +* Experimental feature: Fix `current_size` count in cache. [#36887](https://github.com/ClickHouse/ClickHouse/pull/36887) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Experimental feature: Fix fire in window view with hop window [#34044](https://github.com/ClickHouse/ClickHouse/issues/34044). [#36861](https://github.com/ClickHouse/ClickHouse/pull/36861) ([vxider](https://github.com/Vxider)). +* Experimental feature: Fix incorrect cast in cached buffer from remote fs. [#36809](https://github.com/ClickHouse/ClickHouse/pull/36809) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix creation of tables with `flatten_nested = 0`. Previously unflattened `Nested` columns could be flattened after server restart. [#36803](https://github.com/ClickHouse/ClickHouse/pull/36803) ([Anton Popov](https://github.com/CurtizJ)). +* Fix some issues with async reads from remote filesystem which happened when reading low cardinality. [#36763](https://github.com/ClickHouse/ClickHouse/pull/36763) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Experimental feature: Fix insertion to columns of type `Object` from multiple files, e.g. via table function `file` with globs. [#36762](https://github.com/ClickHouse/ClickHouse/pull/36762) ([Anton Popov](https://github.com/CurtizJ)). +* Fix timeouts in Hedged requests. Connection hang right after sending remote query could lead to eternal waiting. [#36749](https://github.com/ClickHouse/ClickHouse/pull/36749) ([Kruglov Pavel](https://github.com/Avogar)). +* Experimental feature: Fix a bug of `groupBitmapAndState`/`groupBitmapOrState`/`groupBitmapXorState` on distributed table. [#36739](https://github.com/ClickHouse/ClickHouse/pull/36739) ([Zhang Yifan](https://github.com/zhangyifan27)). +* Experimental feature: During the [test](https://s3.amazonaws.com/clickhouse-test-reports/36376/1cb1c7275cb53769ab826772db9b71361bb3e413/stress_test__thread__actions_/clickhouse-server.clean.log) in [PR](https://github.com/ClickHouse/ClickHouse/pull/36376), I found that the one cache class was initialized twice, it throws a exception. Although the cause of this problem is not clear, there should be code logic of repeatedly loading disk in ClickHouse, so we need to make special judgment for this situation. [#36737](https://github.com/ClickHouse/ClickHouse/pull/36737) ([Han Shukai](https://github.com/KinderRiven)). +* Fix vertical merges in wide parts. Previously an exception `There is no column` can be thrown during merge. [#36707](https://github.com/ClickHouse/ClickHouse/pull/36707) ([Anton Popov](https://github.com/CurtizJ)). +* Fix server reload on port change (do not wait for current connections from query context). [#36700](https://github.com/ClickHouse/ClickHouse/pull/36700) ([Azat Khuzhin](https://github.com/azat)). +* Experimental feature: In the previous [PR](https://github.com/ClickHouse/ClickHouse/pull/36376), I found that testing (stateless tests, flaky check (address, actions)) is timeout. Moreover, testing locally can also trigger unstable system deadlocks. This problem still exists when using the latest source code of master. [#36697](https://github.com/ClickHouse/ClickHouse/pull/36697) ([Han Shukai](https://github.com/KinderRiven)). +* Experimental feature: Fix server restart if cache configuration changed. [#36685](https://github.com/ClickHouse/ClickHouse/pull/36685) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix possible heap-use-after-free in schema inference. Closes [#36661](https://github.com/ClickHouse/ClickHouse/issues/36661). [#36679](https://github.com/ClickHouse/ClickHouse/pull/36679) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixed parsing of query settings in `CREATE` query when engine is not specified. Fixes https://github.com/ClickHouse/ClickHouse/pull/34187#issuecomment-1103812419. [#36642](https://github.com/ClickHouse/ClickHouse/pull/36642) ([tavplubix](https://github.com/tavplubix)). +* Experimental feature: Fix merges of wide parts with type `Object`. [#36637](https://github.com/ClickHouse/ClickHouse/pull/36637) ([Anton Popov](https://github.com/CurtizJ)). +* Fix format crash when default expression follow EPHEMERAL not literal. Closes [#36618](https://github.com/ClickHouse/ClickHouse/issues/36618). [#36633](https://github.com/ClickHouse/ClickHouse/pull/36633) ([flynn](https://github.com/ucasfl)). +* Fix `Missing column` exception which could happen while using `INTERPOLATE` with `ENGINE = MergeTree` table. [#36549](https://github.com/ClickHouse/ClickHouse/pull/36549) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix potential error with literals in `WHERE` for join queries. Close [#36279](https://github.com/ClickHouse/ClickHouse/issues/36279). [#36542](https://github.com/ClickHouse/ClickHouse/pull/36542) ([Vladimir C](https://github.com/vdimir)). +* Fix offset update ReadBufferFromEncryptedFile, which could cause undefined behaviour. [#36493](https://github.com/ClickHouse/ClickHouse/pull/36493) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix hostname sanity checks for Keeper cluster configuration. Add `keeper_server.host_checks_enabled` config to enable/disable those checks. [#36492](https://github.com/ClickHouse/ClickHouse/pull/36492) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix usage of executable user defined functions in GROUP BY. Before executable user defined functions cannot be used as expressions in GROUP BY. Closes [#36448](https://github.com/ClickHouse/ClickHouse/issues/36448). [#36486](https://github.com/ClickHouse/ClickHouse/pull/36486) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix possible exception with unknown packet from server in client. [#36481](https://github.com/ClickHouse/ClickHouse/pull/36481) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Experimental feature (please never use `system.session_log`, it is going to be removed): Add missing enum values in system.session_log table. Closes [#36474](https://github.com/ClickHouse/ClickHouse/issues/36474). [#36480](https://github.com/ClickHouse/ClickHouse/pull/36480) ([Memo](https://github.com/Joeywzr)). +* Fix bug in s3Cluster schema inference that let to the fact that not all data was read in the select from s3Cluster. The bug appeared in https://github.com/ClickHouse/ClickHouse/pull/35544. [#36434](https://github.com/ClickHouse/ClickHouse/pull/36434) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix nullptr dereference in JOIN and COLUMNS matcher. This fixes [#36416](https://github.com/ClickHouse/ClickHouse/issues/36416). This is for https://github.com/ClickHouse/ClickHouse/pull/36417. [#36430](https://github.com/ClickHouse/ClickHouse/pull/36430) ([Amos Bird](https://github.com/amosbird)). +* Fix dictionary reload for `ClickHouseDictionarySource` if it contains scalar subqueries. [#36390](https://github.com/ClickHouse/ClickHouse/pull/36390) ([lthaooo](https://github.com/lthaooo)). +* Fix assertion in JOIN, close [#36199](https://github.com/ClickHouse/ClickHouse/issues/36199). [#36201](https://github.com/ClickHouse/ClickHouse/pull/36201) ([Vladimir C](https://github.com/vdimir)). +* Queries with aliases inside special operators returned parsing error (was broken in 22.1). Example: `SELECT substring('test' AS t, 1, 1)`. [#36167](https://github.com/ClickHouse/ClickHouse/pull/36167) ([Maksim Kita](https://github.com/kitaisreal)). +* Experimental feature: Fix insertion of complex JSONs with nested arrays to columns of type `Object`. [#36077](https://github.com/ClickHouse/ClickHouse/pull/36077) ([Anton Popov](https://github.com/CurtizJ)). +* Fix ALTER DROP COLUMN of nested column with compact parts (i.e. `ALTER TABLE x DROP COLUMN n`, when there is column `n.d`). [#35797](https://github.com/ClickHouse/ClickHouse/pull/35797) ([Azat Khuzhin](https://github.com/azat)). +* Fix substring function range error length when `offset` and `length` is negative constant and `s` is not constant. [#33861](https://github.com/ClickHouse/ClickHouse/pull/33861) ([RogerYK](https://github.com/RogerYK)). + + +### ClickHouse release 22.4, 2022-04-19 + +#### Backward Incompatible Change + +* Do not allow SETTINGS after FORMAT for INSERT queries (there is compatibility setting `allow_settings_after_format_in_insert` to accept such queries, but it is turned OFF by default). [#35883](https://github.com/ClickHouse/ClickHouse/pull/35883) ([Azat Khuzhin](https://github.com/azat)). +* Function `yandexConsistentHash` (consistent hashing algorithm by Konstantin "kostik" Oblakov) is renamed to `kostikConsistentHash`. The old name is left as an alias for compatibility. Although this change is backward compatible, we may remove the alias in subsequent releases, that's why it's recommended to update the usages of this function in your apps. [#35553](https://github.com/ClickHouse/ClickHouse/pull/35553) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### New Feature + +* Added INTERPOLATE extension to the ORDER BY ... WITH FILL. Closes [#34903](https://github.com/ClickHouse/ClickHouse/issues/34903). [#35349](https://github.com/ClickHouse/ClickHouse/pull/35349) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Profiling on Processors level (under `log_processors_profiles` setting, ClickHouse will write time that processor spent during execution/waiting for data to `system.processors_profile_log` table). [#34355](https://github.com/ClickHouse/ClickHouse/pull/34355) ([Azat Khuzhin](https://github.com/azat)). +* Added functions makeDate(year, month, day), makeDate32(year, month, day). [#35628](https://github.com/ClickHouse/ClickHouse/pull/35628) ([Alexander Gololobov](https://github.com/davenger)). Implementation of makeDateTime() and makeDateTIme64(). [#35934](https://github.com/ClickHouse/ClickHouse/pull/35934) ([Alexander Gololobov](https://github.com/davenger)). +* Support new type of quota `WRITTEN BYTES` to limit amount of written bytes during insert queries. [#35736](https://github.com/ClickHouse/ClickHouse/pull/35736) ([Anton Popov](https://github.com/CurtizJ)). +* Added function `flattenTuple`. It receives nested named `Tuple` as an argument and returns a flatten `Tuple` which elements are the paths from the original `Tuple`. E.g.: `Tuple(a Int, Tuple(b Int, c Int)) -> Tuple(a Int, b Int, c Int)`. `flattenTuple` can be used to select all paths from type `Object` as separate columns. [#35690](https://github.com/ClickHouse/ClickHouse/pull/35690) ([Anton Popov](https://github.com/CurtizJ)). +* Added functions `arrayFirstOrNull`, `arrayLastOrNull`. Closes [#35238](https://github.com/ClickHouse/ClickHouse/issues/35238). [#35414](https://github.com/ClickHouse/ClickHouse/pull/35414) ([Maksim Kita](https://github.com/kitaisreal)). +* Added functions `minSampleSizeContinous` and `minSampleSizeConversion`. Author [achimbab](https://github.com/achimbab). [#35360](https://github.com/ClickHouse/ClickHouse/pull/35360) ([Maksim Kita](https://github.com/kitaisreal)). +* New functions minSampleSizeContinous and minSampleSizeConversion. [#34354](https://github.com/ClickHouse/ClickHouse/pull/34354) ([achimbab](https://github.com/achimbab)). +* Introduce format `ProtobufList` (all records as repeated messages in out Protobuf). Closes [#16436](https://github.com/ClickHouse/ClickHouse/issues/16436). [#35152](https://github.com/ClickHouse/ClickHouse/pull/35152) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Add `h3PointDistM`, `h3PointDistKm`, `h3PointDistRads`, `h3GetRes0Indexes`, `h3GetPentagonIndexes` functions. [#34568](https://github.com/ClickHouse/ClickHouse/pull/34568) ([Bharat Nallan](https://github.com/bharatnc)). +* Add `toLastDayOfMonth` function which rounds up a date or date with time to the last day of the month. [#33501](https://github.com/ClickHouse/ClickHouse/issues/33501). [#34394](https://github.com/ClickHouse/ClickHouse/pull/34394) ([Habibullah Oladepo](https://github.com/holadepo)). +* Added load balancing setting for \[Zoo\]Keeper client. Closes [#29617](https://github.com/ClickHouse/ClickHouse/issues/29617). [#30325](https://github.com/ClickHouse/ClickHouse/pull/30325) ([å°è·¯](https://github.com/nicelulu)). +* Add a new kind of row policies named `simple`. Before this PR we had two kinds or row policies: `permissive` and `restrictive`. A `simple` row policy adds a new filter on a table without any side-effects like it was for permissive and restrictive policies. [#35345](https://github.com/ClickHouse/ClickHouse/pull/35345) ([Vitaly Baranov](https://github.com/vitlibar)). +* Added an ability to specify cluster secret in replicated database. [#35333](https://github.com/ClickHouse/ClickHouse/pull/35333) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Added sanity checks on server startup (available memory and disk space, max thread count, etc). [#34566](https://github.com/ClickHouse/ClickHouse/pull/34566) ([Sergei Trifonov](https://github.com/serxa)). +* INTERVAL improvement - can be used with `[MILLI|MICRO|NANO]SECOND`. Added `toStartOf[Milli|Micro|Nano]second()` functions. Added `[add|subtract][Milli|Micro|Nano]seconds()`. [#34353](https://github.com/ClickHouse/ClickHouse/pull/34353) ([Andrey Zvonov](https://github.com/zvonand)). + +#### Experimental Feature + +* Added support for transactions for simple `MergeTree` tables. This feature is highly experimental and not recommended for production. Part of [#22086](https://github.com/ClickHouse/ClickHouse/issues/22086). [#24258](https://github.com/ClickHouse/ClickHouse/pull/24258) ([tavplubix](https://github.com/tavplubix)). +* Support schema inference for type `Object` in format `JSONEachRow`. Allow to convert columns of type `Map` to columns of type `Object`. [#35629](https://github.com/ClickHouse/ClickHouse/pull/35629) ([Anton Popov](https://github.com/CurtizJ)). +* Allow to write remote FS cache on all write operations. Add `system.remote_filesystem_cache` table. Add `drop remote filesystem cache` query. Add introspection for s3 metadata with `system.remote_data_paths` table. Closes [#34021](https://github.com/ClickHouse/ClickHouse/issues/34021). Add cache option for merges by adding mode `read_from_filesystem_cache_if_exists_otherwise_bypass_cache` (turned on by default for merges and can also be turned on by query setting with the same name). Rename cache related settings (`remote_fs_enable_cache -> enable_filesystem_cache`, etc). [#35475](https://github.com/ClickHouse/ClickHouse/pull/35475) ([Kseniia Sumarokova](https://github.com/kssenii)). +* An option to store parts metadata in RocksDB. Speed up parts loading process of MergeTree to accelerate starting up of clickhouse-server. With this improvement, clickhouse-server was able to decrease starting up time from 75 minutes to 20 seconds, with 700k mergetree parts. [#32928](https://github.com/ClickHouse/ClickHouse/pull/32928) ([æŽæ‰¬](https://github.com/taiyang-li)). + +#### Performance Improvement + +* A new query plan optimization. Evaluate functions after `ORDER BY` when possible. As an example, for a query `SELECT sipHash64(number) FROM numbers(1e8) ORDER BY number LIMIT 5`, function `sipHash64` would be evaluated after `ORDER BY` and `LIMIT`, which gives ~20x speed up. [#35623](https://github.com/ClickHouse/ClickHouse/pull/35623) ([Nikita Taranov](https://github.com/nickitat)). +* Sizes of hash tables used during aggregation now collected and used in later queries to avoid hash tables resizes. [#33439](https://github.com/ClickHouse/ClickHouse/pull/33439) ([Nikita Taranov](https://github.com/nickitat)). +* Improvement for hasAll function using SIMD instructions (SSE and AVX2). [#27653](https://github.com/ClickHouse/ClickHouse/pull/27653) ([youennL-cs](https://github.com/youennL-cs)). [#35723](https://github.com/ClickHouse/ClickHouse/pull/35723) ([Maksim Kita](https://github.com/kitaisreal)). +* Multiple changes to improve ASOF JOIN performance (1.2 - 1.6x as fast). It also adds support to use big integers. [#34733](https://github.com/ClickHouse/ClickHouse/pull/34733) ([Raúl Marín](https://github.com/Algunenano)). +* Improve performance of ASOF JOIN if key is native integer. [#35525](https://github.com/ClickHouse/ClickHouse/pull/35525) ([Maksim Kita](https://github.com/kitaisreal)). +* Parallelization of multipart upload into S3 storage. [#35343](https://github.com/ClickHouse/ClickHouse/pull/35343) ([Sergei Trifonov](https://github.com/serxa)). +* URL storage engine now downloads multiple chunks in parallel if the endpoint supports HTTP Range. Two additional settings were added, `max_download_threads` and `max_download_buffer_size`, which control maximum number of threads a single query can use to download the file and the maximum number of bytes each thread can process. [#35150](https://github.com/ClickHouse/ClickHouse/pull/35150) ([Antonio Andelic](https://github.com/antonio2368)). +* Use multiple threads to download objects from S3. Downloading is controllable using `max_download_threads` and `max_download_buffer_size` settings. [#35571](https://github.com/ClickHouse/ClickHouse/pull/35571) ([Antonio Andelic](https://github.com/antonio2368)). +* Narrow mutex scope when interacting with HDFS. Related to [#35292](https://github.com/ClickHouse/ClickHouse/issues/35292). [#35646](https://github.com/ClickHouse/ClickHouse/pull/35646) ([shuchaome](https://github.com/shuchaome)). +* Require mutations for per-table TTL only when it had been changed. [#35953](https://github.com/ClickHouse/ClickHouse/pull/35953) ([Azat Khuzhin](https://github.com/azat)). + +#### Improvement + +* Multiple improvements for schema inference. Use some tweaks and heuristics to determine numbers, strings, arrays, tuples and maps in CSV, TSV and TSVRaw data formats. Add setting `input_format_csv_use_best_effort_in_schema_inference` for CSV format that enables/disables using these heuristics, if it's disabled, we treat everything as string. Add similar setting `input_format_tsv_use_best_effort_in_schema_inference` for TSV/TSVRaw format. These settings are enabled by default. - Add Maps support for schema inference in Values format. - Fix possible segfault in schema inference in Values format. - Allow to skip columns with unsupported types in Arrow/ORC/Parquet formats. Add corresponding settings for it: `input_format_{parquet|orc|arrow}_skip_columns_with_unsupported_types_in_schema_inference`. These settings are disabled by default. - Allow to convert a column with type Null to a Nullable column with all NULL values in Arrow/Parquet formats. - Allow to specify column names in schema inference via setting `column_names_for_schema_inference` for formats that don't contain column names (like CSV, TSV, JSONCompactEachRow, etc) - Fix schema inference in ORC/Arrow/Parquet formats in terms of working with Nullable columns. Previously all inferred types were not Nullable and it blocked reading Nullable columns from data, now it's fixed and all inferred types are always Nullable (because we cannot understand that column is Nullable or not by reading the schema). - Fix schema inference in Template format with CSV escaping rules. [#35582](https://github.com/ClickHouse/ClickHouse/pull/35582) ([Kruglov Pavel](https://github.com/Avogar)). +* Add parallel parsing and schema inference for format `JSONAsObject`. [#35592](https://github.com/ClickHouse/ClickHouse/pull/35592) ([Anton Popov](https://github.com/CurtizJ)). +* Added a support for automatic schema inference to `s3Cluster` table function. Synced the signatures of `s3 ` and `s3Cluster`. [#35544](https://github.com/ClickHouse/ClickHouse/pull/35544) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Added support for schema inference for `hdfsCluster`. [#35602](https://github.com/ClickHouse/ClickHouse/pull/35602) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add new setting `input_format_json_read_bools_as_numbers` that allows to infer and parse bools as numbers in JSON input formats. It's enabled by default. Suggested by @alexey-milovidov. [#35735](https://github.com/ClickHouse/ClickHouse/pull/35735) ([Kruglov Pavel](https://github.com/Avogar)). +* Improve columns ordering in schema inference for formats TSKV and JSONEachRow, closes [#35640](https://github.com/ClickHouse/ClickHouse/issues/35640). Don't stop schema inference when reading empty row in schema inference for formats TSKV and JSONEachRow. [#35724](https://github.com/ClickHouse/ClickHouse/pull/35724) ([Kruglov Pavel](https://github.com/Avogar)). +* Add settings `input_format_orc_case_insensitive_column_matching`, `input_format_arrow_case_insensitive_column_matching`, and `input_format_parquet_case_insensitive_column_matching` which allows ClickHouse to use case insensitive matching of columns while reading data from ORC, Arrow or Parquet files. [#35459](https://github.com/ClickHouse/ClickHouse/pull/35459) ([Antonio Andelic](https://github.com/antonio2368)). +* Added `is_secure` column to `system.query_log` which denotes if the client is using a secure connection over TCP or HTTP. [#35705](https://github.com/ClickHouse/ClickHouse/pull/35705) ([Antonio Andelic](https://github.com/antonio2368)). +* Now `kafka_num_consumers` can be bigger than amount of physical cores in case of low resource machine (less than 16 cores). [#35926](https://github.com/ClickHouse/ClickHouse/pull/35926) ([alesapin](https://github.com/alesapin)). +* Add some basic metrics to monitor engine=Kafka tables. [#35916](https://github.com/ClickHouse/ClickHouse/pull/35916) ([filimonov](https://github.com/filimonov)). +* Now it's not allowed to `ALTER TABLE ... RESET SETTING` for non-existing settings for MergeTree engines family. Fixes [#35816](https://github.com/ClickHouse/ClickHouse/issues/35816). [#35884](https://github.com/ClickHouse/ClickHouse/pull/35884) ([alesapin](https://github.com/alesapin)). +* Now some `ALTER MODIFY COLUMN` queries for `Arrays` and `Nullable` types can be done at metadata level without mutations. For example, alter from `Array(Enum8('Option1'=1))` to `Array(Enum8('Option1'=1, 'Option2'=2))`. [#35882](https://github.com/ClickHouse/ClickHouse/pull/35882) ([alesapin](https://github.com/alesapin)). +* Added an animation to the hourglass icon to indicate to the user that a query is running. [#35860](https://github.com/ClickHouse/ClickHouse/pull/35860) ([peledni](https://github.com/peledni)). +* support ALTER TABLE t DETACH PARTITION (ALL). [#35794](https://github.com/ClickHouse/ClickHouse/pull/35794) ([awakeljw](https://github.com/awakeljw)). +* Improve projection analysis to optimize trivial queries such as `count()`. [#35788](https://github.com/ClickHouse/ClickHouse/pull/35788) ([Amos Bird](https://github.com/amosbird)). +* Support schema inference for insert select with using `input` table function. Get schema from insertion table instead of inferring it from the data in case of insert select from table functions that support schema inference. Closes [#35639](https://github.com/ClickHouse/ClickHouse/issues/35639). [#35760](https://github.com/ClickHouse/ClickHouse/pull/35760) ([Kruglov Pavel](https://github.com/Avogar)). +* Respect `remote_url_allow_hosts` for Hive tables. [#35743](https://github.com/ClickHouse/ClickHouse/pull/35743) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Implement `send_logs_level` for clickhouse-local. Closes [#35653](https://github.com/ClickHouse/ClickHouse/issues/35653). [#35716](https://github.com/ClickHouse/ClickHouse/pull/35716) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Closes [#35641](https://github.com/ClickHouse/ClickHouse/issues/35641) Allow `EPHEMERAL` columns without explicit default expression. [#35706](https://github.com/ClickHouse/ClickHouse/pull/35706) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Add profile event counter `AsyncInsertBytes` about size of async INSERTs. [#35644](https://github.com/ClickHouse/ClickHouse/pull/35644) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Improve the pipeline description for JOIN. [#35612](https://github.com/ClickHouse/ClickHouse/pull/35612) ([何æŽå¤«](https://github.com/helifu)). +* Deduce absolute hdfs config path. [#35572](https://github.com/ClickHouse/ClickHouse/pull/35572) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Improve pasting performance and compatibility of clickhouse-client. This helps [#35501](https://github.com/ClickHouse/ClickHouse/issues/35501). [#35541](https://github.com/ClickHouse/ClickHouse/pull/35541) ([Amos Bird](https://github.com/amosbird)). +* It was possible to get stack overflow in distributed queries if one of the settings `async_socket_for_remote` and `use_hedged_requests` is enabled while parsing very deeply nested data type (at least in debug build). Closes [#35509](https://github.com/ClickHouse/ClickHouse/issues/35509). [#35524](https://github.com/ClickHouse/ClickHouse/pull/35524) ([Kruglov Pavel](https://github.com/Avogar)). +* Add sizes of subcolumns to `system.parts_columns` table. [#35488](https://github.com/ClickHouse/ClickHouse/pull/35488) ([Anton Popov](https://github.com/CurtizJ)). +* Add explicit table info to the scan node of query plan and pipeline. [#35460](https://github.com/ClickHouse/ClickHouse/pull/35460) ([何æŽå¤«](https://github.com/helifu)). +* Allow server to bind to low-numbered ports (e.g. 443). ClickHouse installation script will set `cap_net_bind_service` to the binary file. [#35451](https://github.com/ClickHouse/ClickHouse/pull/35451) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix INSERT INTO table FROM INFILE: it did not display the progress bar. [#35429](https://github.com/ClickHouse/ClickHouse/pull/35429) ([xiedeyantu](https://github.com/xiedeyantu)). +* Add arguments `--user`, `--password`, `--host`, `--port` for `clickhouse-diagnostics` tool. [#35422](https://github.com/ClickHouse/ClickHouse/pull/35422) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Support uuid for Postgres engines. Closes [#35384](https://github.com/ClickHouse/ClickHouse/issues/35384). [#35403](https://github.com/ClickHouse/ClickHouse/pull/35403) ([Kseniia Sumarokova](https://github.com/kssenii)). +* For table function `s3cluster` or `HDFSCluster` or `hive`, we can't get right `AccessType` by `StorageFactory::instance().getSourceAccessType(getStorageTypeName())`. This pr fix it. [#35365](https://github.com/ClickHouse/ClickHouse/pull/35365) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Remove `--testmode` option for clickhouse-client, enable it unconditionally. [#35354](https://github.com/ClickHouse/ClickHouse/pull/35354) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Don't allow `wchc` operation (four letter command) for clickhouse-keeper. [#35320](https://github.com/ClickHouse/ClickHouse/pull/35320) ([zhangyuli1](https://github.com/zhangyuli1)). +* Add function `getTypeSerializationStreams`. For a specified type (which is detected from column), it returns an array with all the serialization substream paths. This function is useful mainly for developers. [#35290](https://github.com/ClickHouse/ClickHouse/pull/35290) ([æŽæ‰¬](https://github.com/taiyang-li)). +* If `port` is not specified in cluster configuration, default server port will be used. This closes [#34769](https://github.com/ClickHouse/ClickHouse/issues/34769). [#34772](https://github.com/ClickHouse/ClickHouse/pull/34772) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Use `minmax` index for orc/parquet file in Hive Engine. Related PR: https://github.com/ClickHouse/arrow/pull/10. [#34631](https://github.com/ClickHouse/ClickHouse/pull/34631) ([æŽæ‰¬](https://github.com/taiyang-li)). +* System log tables now allow to specify COMMENT in ENGINE declaration. Closes [#33768](https://github.com/ClickHouse/ClickHouse/issues/33768). [#34536](https://github.com/ClickHouse/ClickHouse/pull/34536) ([Maksim Kita](https://github.com/kitaisreal)). +* Proper support of setting `max_rows_to_read` in case of reading in order of sorting key and specified limit. Previously the exception `Limit for rows or bytes to read exceeded` could be thrown even if query actually requires to read less amount of rows. [#33230](https://github.com/ClickHouse/ClickHouse/pull/33230) ([Anton Popov](https://github.com/CurtizJ)). +* Respect only quota & period from cgroups, ignore shares (which are not really limit the number of the cores which can be used). [#35815](https://github.com/ClickHouse/ClickHouse/pull/35815) ([filimonov](https://github.com/filimonov)). + +#### Build/Testing/Packaging Improvement + +* Add next batch of randomization settings in functional tests. [#35047](https://github.com/ClickHouse/ClickHouse/pull/35047) ([Kruglov Pavel](https://github.com/Avogar)). +* Add backward compatibility check in stress test. Closes [#25088](https://github.com/ClickHouse/ClickHouse/issues/25088). [#27928](https://github.com/ClickHouse/ClickHouse/pull/27928) ([Kruglov Pavel](https://github.com/Avogar)). +* Migrate package building to `nfpm` - Deprecate `release` script in favor of `packages/build` - Build everything in clickhouse/binary-builder image (cleanup: clickhouse/deb-builder) - Add symbol stripping to cmake (todo: use $prefix/lib/$bin_dir/clickhouse/$binary.debug) - Fix issue with DWARF symbols - Add Alpine APK packages - Rename `alien` to `additional_pkgs`. [#33664](https://github.com/ClickHouse/ClickHouse/pull/33664) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add a night scan and upload for Coverity. [#34895](https://github.com/ClickHouse/ClickHouse/pull/34895) ([Boris Kuschel](https://github.com/bkuschel)). +* A dedicated small package for `clickhouse-keeper`. [#35308](https://github.com/ClickHouse/ClickHouse/pull/35308) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Running with podman was failing: it complains about specifying the same volume twice. [#35978](https://github.com/ClickHouse/ClickHouse/pull/35978) ([Roman Nikonov](https://github.com/nic11)). +* Minor improvement in contrib/krb5 build configuration. [#35832](https://github.com/ClickHouse/ClickHouse/pull/35832) ([Anton Kozlov](https://github.com/tonickkozlov)). +* Add a label to recognize a building task for every image. [#35583](https://github.com/ClickHouse/ClickHouse/pull/35583) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Apply `black` formatter to python code and add a per-commit check. [#35466](https://github.com/ClickHouse/ClickHouse/pull/35466) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Redo alpine image to use clean Dockerfile. Create a script in tests/ci to build both ubuntu and alpine images. Add clickhouse-keeper image (cc @nikitamikhaylov). Add build check to PullRequestCI. Add a job to a ReleaseCI. Add a job to MasterCI to build and push `clickhouse/clickhouse-server:head` and `clickhouse/clickhouse-keeper:head` images for each merged PR. [#35211](https://github.com/ClickHouse/ClickHouse/pull/35211) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Fix stress-test report in CI, now we upload the runlog with information about started stress tests only once. [#35093](https://github.com/ClickHouse/ClickHouse/pull/35093) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Switch to libcxx / libcxxabi from LLVM 14. [#34906](https://github.com/ClickHouse/ClickHouse/pull/34906) ([Raúl Marín](https://github.com/Algunenano)). +* Update unixodbc to mitigate CVE-2018-7485. Note: this CVE is not relevant for ClickHouse as it implements its own isolation layer for ODBC. [#35943](https://github.com/ClickHouse/ClickHouse/pull/35943) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + +#### Bug Fix + +* Added settings `input_format_ipv4_default_on_conversion_error`, `input_format_ipv6_default_on_conversion_error` to allow insert of invalid ip address values as default into tables. Closes [#35726](https://github.com/ClickHouse/ClickHouse/issues/35726). [#35733](https://github.com/ClickHouse/ClickHouse/pull/35733) ([Maksim Kita](https://github.com/kitaisreal)). +* Avoid erasing columns from a block if it doesn't exist while reading data from Hive. [#35393](https://github.com/ClickHouse/ClickHouse/pull/35393) ([lgbo](https://github.com/lgbo-ustc)). +* Add type checking when creating materialized view. Close: [#23684](https://github.com/ClickHouse/ClickHouse/issues/23684). [#24896](https://github.com/ClickHouse/ClickHouse/pull/24896) ([hexiaoting](https://github.com/hexiaoting)). +* Fix formatting of INSERT INFILE queries (missing quotes). [#35886](https://github.com/ClickHouse/ClickHouse/pull/35886) ([Azat Khuzhin](https://github.com/azat)). +* Disable `session_log` because memory safety issue has been found by fuzzing. See [#35714](https://github.com/ClickHouse/ClickHouse/issues/35714). [#35873](https://github.com/ClickHouse/ClickHouse/pull/35873) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Avoid processing per-column TTL multiple times. [#35820](https://github.com/ClickHouse/ClickHouse/pull/35820) ([Azat Khuzhin](https://github.com/azat)). +* Fix inserts to columns of type `Object` in case when there is data related to several partitions in insert query. [#35806](https://github.com/ClickHouse/ClickHouse/pull/35806) ([Anton Popov](https://github.com/CurtizJ)). +* Fix bug in indexes of not presented columns in -WithNames formats that led to error `INCORRECT_NUMBER_OF_COLUMNS ` when the number of columns is more than 256. Closes [#35793](https://github.com/ClickHouse/ClickHouse/issues/35793). [#35803](https://github.com/ClickHouse/ClickHouse/pull/35803) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixes [#35751](https://github.com/ClickHouse/ClickHouse/issues/35751). [#35799](https://github.com/ClickHouse/ClickHouse/pull/35799) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix for reading from HDFS in Snappy format. [#35771](https://github.com/ClickHouse/ClickHouse/pull/35771) ([shuchaome](https://github.com/shuchaome)). +* Fix bug in conversion from custom types to string that could lead to segfault or unexpected error messages. Closes [#35752](https://github.com/ClickHouse/ClickHouse/issues/35752). [#35755](https://github.com/ClickHouse/ClickHouse/pull/35755) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix any/all (subquery) implementation. Closes [#35489](https://github.com/ClickHouse/ClickHouse/issues/35489). [#35727](https://github.com/ClickHouse/ClickHouse/pull/35727) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix dropping non-empty database in clickhouse-local. Closes [#35692](https://github.com/ClickHouse/ClickHouse/issues/35692). [#35711](https://github.com/ClickHouse/ClickHouse/pull/35711) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix bug in creating materialized view with subquery after server restart. Materialized view was not getting updated after inserts into underlying table after server restart. Closes [#35511](https://github.com/ClickHouse/ClickHouse/issues/35511). [#35691](https://github.com/ClickHouse/ClickHouse/pull/35691) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix possible `Can't adjust last granule` exception while reading subcolumns of experimental type `Object`. [#35687](https://github.com/ClickHouse/ClickHouse/pull/35687) ([Anton Popov](https://github.com/CurtizJ)). +* Enable build with JIT compilation by default. [#35683](https://github.com/ClickHouse/ClickHouse/pull/35683) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix possible loss of subcolumns in experimental type `Object`. [#35682](https://github.com/ClickHouse/ClickHouse/pull/35682) ([Anton Popov](https://github.com/CurtizJ)). +* Fix check ASOF JOIN key nullability, close [#35565](https://github.com/ClickHouse/ClickHouse/issues/35565). [#35674](https://github.com/ClickHouse/ClickHouse/pull/35674) ([Vladimir C](https://github.com/vdimir)). +* Fix part checking logic for parts with projections. Error happened when projection and main part had different types. This is similar to https://github.com/ClickHouse/ClickHouse/pull/33774 . The bug is addressed by @caoyang10. [#35667](https://github.com/ClickHouse/ClickHouse/pull/35667) ([Amos Bird](https://github.com/amosbird)). +* Fix server crash when large number of arguments are passed into `format` function. Please refer to the test file and see how to reproduce the crash. [#35651](https://github.com/ClickHouse/ClickHouse/pull/35651) ([Amos Bird](https://github.com/amosbird)). +* Fix usage of quotas with asynchronous inserts. [#35645](https://github.com/ClickHouse/ClickHouse/pull/35645) ([Anton Popov](https://github.com/CurtizJ)). +* Fix positional arguments with aliases. Closes [#35600](https://github.com/ClickHouse/ClickHouse/issues/35600). [#35620](https://github.com/ClickHouse/ClickHouse/pull/35620) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Check `remote_url_allow_hosts` before schema inference in URL engine Closes [#35064](https://github.com/ClickHouse/ClickHouse/issues/35064). [#35619](https://github.com/ClickHouse/ClickHouse/pull/35619) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix `HashJoin` when columns with `LowCardinality` type are used. This closes [#35548](https://github.com/ClickHouse/ClickHouse/issues/35548). [#35616](https://github.com/ClickHouse/ClickHouse/pull/35616) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix possible segfault in MaterializedPostgreSQL which happened if exception occurred when data, collected in memory, was synced into underlying tables. Closes [#35611](https://github.com/ClickHouse/ClickHouse/issues/35611). [#35614](https://github.com/ClickHouse/ClickHouse/pull/35614) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Setting `database_atomic_wait_for_drop_and_detach_synchronously` worked incorrectly for `ATTACH TABLE` query when previously detached table is still in use, It's fixed. [#35594](https://github.com/ClickHouse/ClickHouse/pull/35594) ([tavplubix](https://github.com/tavplubix)). +* Fix HTTP headers with named collections, add compression_method. Closes [#35273](https://github.com/ClickHouse/ClickHouse/issues/35273). Closes [#35269](https://github.com/ClickHouse/ClickHouse/issues/35269). [#35593](https://github.com/ClickHouse/ClickHouse/pull/35593) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix s3 engine getting virtual columns. Closes [#35411](https://github.com/ClickHouse/ClickHouse/issues/35411). [#35586](https://github.com/ClickHouse/ClickHouse/pull/35586) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fixed return type deduction for `caseWithExpression`. The type of the ELSE branch is now correctly taken into account. [#35576](https://github.com/ClickHouse/ClickHouse/pull/35576) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix parsing of IPv6 addresses longer than 39 characters. Closes [#34022](https://github.com/ClickHouse/ClickHouse/issues/34022). [#35539](https://github.com/ClickHouse/ClickHouse/pull/35539) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix cast into IPv4, IPv6 address in IN section. Fixes [#35528](https://github.com/ClickHouse/ClickHouse/issues/35528). [#35534](https://github.com/ClickHouse/ClickHouse/pull/35534) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix crash during short circuit function evaluation when one of arguments is nullable constant. Closes [#35497](https://github.com/ClickHouse/ClickHouse/issues/35497). Closes [#35496](https://github.com/ClickHouse/ClickHouse/issues/35496). [#35502](https://github.com/ClickHouse/ClickHouse/pull/35502) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix crash for function `throwIf` with constant arguments. [#35500](https://github.com/ClickHouse/ClickHouse/pull/35500) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix bug in Keeper which can lead to unstable client connections. Introduced in [#35031](https://github.com/ClickHouse/ClickHouse/issues/35031). [#35498](https://github.com/ClickHouse/ClickHouse/pull/35498) ([alesapin](https://github.com/alesapin)). +* Fix bug in function `if` when resulting column type differs with resulting data type that led to logical errors like `Logical error: 'Bad cast from type DB::ColumnVector to DB::ColumnVector'.`. Closes [#35367](https://github.com/ClickHouse/ClickHouse/issues/35367). [#35476](https://github.com/ClickHouse/ClickHouse/pull/35476) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix excessive logging when using S3 as backend for MergeTree or as separate table engine/function. Fixes [#30559](https://github.com/ClickHouse/ClickHouse/issues/30559). [#35434](https://github.com/ClickHouse/ClickHouse/pull/35434) ([alesapin](https://github.com/alesapin)). +* Now merges executed with zero copy replication (experimental) will not spam logs with message `Found parts with the same min block and with the same max block as the missing part _ on replica _. Hoping that it will eventually appear as a result of a merge.`. [#35430](https://github.com/ClickHouse/ClickHouse/pull/35430) ([alesapin](https://github.com/alesapin)). +* Skip possible exception if empty chunks appear in GroupingAggregatedTransform. [#35417](https://github.com/ClickHouse/ClickHouse/pull/35417) ([Nikita Taranov](https://github.com/nickitat)). +* Fix working with columns that are not needed in query in Arrow/Parquet/ORC formats, it prevents possible errors like `Unsupported type of an input column ` when file contains column with unsupported type and we don't use it in query. [#35406](https://github.com/ClickHouse/ClickHouse/pull/35406) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix for local cache for remote filesystem (experimental feature) for high concurrency on corner cases. [#35381](https://github.com/ClickHouse/ClickHouse/pull/35381) ([Kseniia Sumarokova](https://github.com/kssenii)). Fix possible deadlock in cache. [#35378](https://github.com/ClickHouse/ClickHouse/pull/35378) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix partition pruning in case of comparison with constant in `WHERE`. If column and constant had different types, overflow was possible. Query could return an incorrect empty result. This fixes [#35304](https://github.com/ClickHouse/ClickHouse/issues/35304). [#35334](https://github.com/ClickHouse/ClickHouse/pull/35334) ([Amos Bird](https://github.com/amosbird)). +* Fix schema inference for TSKV format while using small max_read_buffer_size. [#35332](https://github.com/ClickHouse/ClickHouse/pull/35332) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix mutations in tables with enabled sparse columns. [#35284](https://github.com/ClickHouse/ClickHouse/pull/35284) ([Anton Popov](https://github.com/CurtizJ)). +* Do not delay final part writing by default (fixes possible `Memory limit exceeded` during `INSERT` by adding `max_insert_delayed_streams_for_parallel_write` with default to 1000 for writes to s3 and disabled as before otherwise). [#34780](https://github.com/ClickHouse/ClickHouse/pull/34780) ([Azat Khuzhin](https://github.com/azat)). + + +### ClickHouse release v22.3-lts, 2022-03-17 + +#### Backward Incompatible Change + +* Make `arrayCompact` function behave as other higher-order functions: perform compaction not of lambda function results but on the original array. If you're using nontrivial lambda functions in arrayCompact you may restore old behaviour by wrapping `arrayCompact` arguments into `arrayMap`. Closes [#34010](https://github.com/ClickHouse/ClickHouse/issues/34010) [#18535](https://github.com/ClickHouse/ClickHouse/issues/18535) [#14778](https://github.com/ClickHouse/ClickHouse/issues/14778). [#34795](https://github.com/ClickHouse/ClickHouse/pull/34795) ([Alexandre Snarskii](https://github.com/snar)). +* Change implementation specific behavior on overflow of function `toDatetime`. It will be saturated to the nearest min/max supported instant of datetime instead of wraparound. This change is highlighted as "backward incompatible" because someone may unintentionally rely on the old behavior. [#32898](https://github.com/ClickHouse/ClickHouse/pull/32898) ([HaiBo Li](https://github.com/marising)). +* Make function `cast(value, 'IPv4')`, `cast(value, 'IPv6')` behave same as `toIPv4`, `toIPv6` functions. Changed behavior of incorrect IP address passed into functions `toIPv4`,` toIPv6`, now if invalid IP address passes into this functions exception will be raised, before this function return default value. Added functions `IPv4StringToNumOrDefault`, `IPv4StringToNumOrNull`, `IPv6StringToNumOrDefault`, `IPv6StringOrNull` `toIPv4OrDefault`, `toIPv4OrNull`, `toIPv6OrDefault`, `toIPv6OrNull`. Functions `IPv4StringToNumOrDefault `, `toIPv4OrDefault `, `toIPv6OrDefault ` should be used if previous logic relied on `IPv4StringToNum`, `toIPv4`, `toIPv6` returning default value for invalid address. Added setting `cast_ipv4_ipv6_default_on_conversion_error`, if this setting enabled, then IP address conversion functions will behave as before. Closes [#22825](https://github.com/ClickHouse/ClickHouse/issues/22825). Closes [#5799](https://github.com/ClickHouse/ClickHouse/issues/5799). Closes [#35156](https://github.com/ClickHouse/ClickHouse/issues/35156). [#35240](https://github.com/ClickHouse/ClickHouse/pull/35240) ([Maksim Kita](https://github.com/kitaisreal)). + +#### New Feature + +* Support for caching data locally for remote filesystems. It can be enabled for `s3` disks. Closes [#28961](https://github.com/ClickHouse/ClickHouse/issues/28961). [#33717](https://github.com/ClickHouse/ClickHouse/pull/33717) ([Kseniia Sumarokova](https://github.com/kssenii)). In the meantime, we enabled the test suite on s3 filesystem and no more known issues exist, so it is started to be production ready. +* Add new table function `hive`. It can be used as follows `hive('', '', '', '', '')` for example `SELECT * FROM hive('thrift://hivetest:9083', 'test', 'demo', 'id Nullable(String), score Nullable(Int32), day Nullable(String)', 'day')`. [#34946](https://github.com/ClickHouse/ClickHouse/pull/34946) ([lgbo](https://github.com/lgbo-ustc)). +* Support authentication of users connected via SSL by their X.509 certificate. [#31484](https://github.com/ClickHouse/ClickHouse/pull/31484) ([eungenue](https://github.com/eungenue)). +* Support schema inference for inserting into table functions `file`/`hdfs`/`s3`/`url`. [#34732](https://github.com/ClickHouse/ClickHouse/pull/34732) ([Kruglov Pavel](https://github.com/Avogar)). +* Now you can read `system.zookeeper` table without restrictions on path or using `like` expression. This reads can generate quite heavy load for zookeeper so to enable this ability you have to enable setting `allow_unrestricted_reads_from_keeper`. [#34609](https://github.com/ClickHouse/ClickHouse/pull/34609) ([Sergei Trifonov](https://github.com/serxa)). +* Display CPU and memory metrics in clickhouse-local. Close [#34545](https://github.com/ClickHouse/ClickHouse/issues/34545). [#34605](https://github.com/ClickHouse/ClickHouse/pull/34605) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Implement `startsWith` and `endsWith` function for arrays, closes [#33982](https://github.com/ClickHouse/ClickHouse/issues/33982). [#34368](https://github.com/ClickHouse/ClickHouse/pull/34368) ([usurai](https://github.com/usurai)). +* Add three functions for Map data type: 1. `mapReplace(map1, map2)` - replaces values for keys in map1 with the values of the corresponding keys in map2; adds keys from map2 that don't exist in map1. 2. `mapFilter` 3. `mapMap`. mapFilter and mapMap are higher order functions, accepting two arguments, the first argument is a lambda function with k, v pair as arguments, the second argument is a column of type Map. [#33698](https://github.com/ClickHouse/ClickHouse/pull/33698) ([hexiaoting](https://github.com/hexiaoting)). +* Allow getting default user and password for clickhouse-client from the `CLICKHOUSE_USER` and `CLICKHOUSE_PASSWORD` environment variables. Close [#34538](https://github.com/ClickHouse/ClickHouse/issues/34538). [#34947](https://github.com/ClickHouse/ClickHouse/pull/34947) ([DR](https://github.com/freedomDR)). + +#### Experimental Feature + +* New data type `Object()`, which supports storing of semi-structured data (for now JSON only). Data is written to such types as string. Then all paths are extracted according to format of semi-structured data and written as separate columns in most optimal types, that can store all their values. Those columns can be queried by names that match paths in source data. E.g `data.key1.key2` or with cast operator `data.key1.key2::Int64`. +* Add `database_replicated_allow_only_replicated_engine` setting. When enabled, it only allowed to only create `Replicated` tables or tables with stateless engines in `Replicated` databases. [#35214](https://github.com/ClickHouse/ClickHouse/pull/35214) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). Note that `Replicated` database is still an experimental feature. + +#### Performance Improvement + +* Improve performance of insertion into `MergeTree` tables by optimizing sorting. Up to 2x improvement is observed on realistic benchmarks. [#34750](https://github.com/ClickHouse/ClickHouse/pull/34750) ([Maksim Kita](https://github.com/kitaisreal)). +* Columns pruning when reading Parquet, ORC and Arrow files from URL and S3. Closes [#34163](https://github.com/ClickHouse/ClickHouse/issues/34163). [#34849](https://github.com/ClickHouse/ClickHouse/pull/34849) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Columns pruning when reading Parquet, ORC and Arrow files from Hive. [#34954](https://github.com/ClickHouse/ClickHouse/pull/34954) ([lgbo](https://github.com/lgbo-ustc)). +* A bunch of performance optimizations from a performance superhero. Improve performance of processing queries with large `IN` section. Improve performance of `direct` dictionary if its source is `ClickHouse`. Improve performance of `detectCharset `, `detectLanguageUnknown ` functions. [#34888](https://github.com/ClickHouse/ClickHouse/pull/34888) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance of `any` aggregate function by using more batching. [#34760](https://github.com/ClickHouse/ClickHouse/pull/34760) ([Raúl Marín](https://github.com/Algunenano)). +* Multiple improvements for performance of `clickhouse-keeper`: less locking [#35010](https://github.com/ClickHouse/ClickHouse/pull/35010) ([zhanglistar](https://github.com/zhanglistar)), lower memory usage by streaming reading and writing of snapshot instead of full copy. [#34584](https://github.com/ClickHouse/ClickHouse/pull/34584) ([zhanglistar](https://github.com/zhanglistar)), optimizing compaction of log store in the RAFT implementation. [#34534](https://github.com/ClickHouse/ClickHouse/pull/34534) ([zhanglistar](https://github.com/zhanglistar)), versioning of the internal data structure [#34486](https://github.com/ClickHouse/ClickHouse/pull/34486) ([zhanglistar](https://github.com/zhanglistar)). + +#### Improvement + +* Allow asynchronous inserts to table functions. Fixes [#34864](https://github.com/ClickHouse/ClickHouse/issues/34864). [#34866](https://github.com/ClickHouse/ClickHouse/pull/34866) ([Anton Popov](https://github.com/CurtizJ)). +* Implicit type casting of the key argument for functions `dictGetHierarchy`, `dictIsIn`, `dictGetChildren`, `dictGetDescendants`. Closes [#34970](https://github.com/ClickHouse/ClickHouse/issues/34970). [#35027](https://github.com/ClickHouse/ClickHouse/pull/35027) ([Maksim Kita](https://github.com/kitaisreal)). +* `EXPLAIN AST` query can output AST in form of a graph in Graphviz format: `EXPLAIN AST graph = 1 SELECT * FROM system.parts`. [#35173](https://github.com/ClickHouse/ClickHouse/pull/35173) ([æŽæ‰¬](https://github.com/taiyang-li)). +* When large files were written with `s3` table function or table engine, the content type on the files was mistakenly set to `application/xml` due to a bug in the AWS SDK. This closes [#33964](https://github.com/ClickHouse/ClickHouse/issues/33964). [#34433](https://github.com/ClickHouse/ClickHouse/pull/34433) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Change restrictive row policies a bit to make them an easier alternative to permissive policies in easy cases. If for a particular table only restrictive policies exist (without permissive policies) users will be able to see some rows. Also `SHOW CREATE ROW POLICY` will always show `AS permissive` or `AS restrictive` in row policy's definition. [#34596](https://github.com/ClickHouse/ClickHouse/pull/34596) ([Vitaly Baranov](https://github.com/vitlibar)). +* Improve schema inference with globs in File/S3/HDFS/URL engines. Try to use the next path for schema inference in case of error. [#34465](https://github.com/ClickHouse/ClickHouse/pull/34465) ([Kruglov Pavel](https://github.com/Avogar)). +* Play UI now correctly detects the preferred light/dark theme from the OS. [#35068](https://github.com/ClickHouse/ClickHouse/pull/35068) ([peledni](https://github.com/peledni)). +* Added `date_time_input_format = 'best_effort_us'`. Closes [#34799](https://github.com/ClickHouse/ClickHouse/issues/34799). [#34982](https://github.com/ClickHouse/ClickHouse/pull/34982) ([WenYao](https://github.com/Cai-Yao)). +* A new settings called `allow_plaintext_password` and `allow_no_password` are added in server configuration which turn on/off authentication types that can be potentially insecure in some environments. They are allowed by default. [#34738](https://github.com/ClickHouse/ClickHouse/pull/34738) ([Heena Bansal](https://github.com/HeenaBansal2009)). +* Support for `DateTime64` data type in `Arrow` format, closes [#8280](https://github.com/ClickHouse/ClickHouse/issues/8280) and closes [#28574](https://github.com/ClickHouse/ClickHouse/issues/28574). [#34561](https://github.com/ClickHouse/ClickHouse/pull/34561) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Reload `remote_url_allow_hosts` (filtering of outgoing connections) on config update. [#35294](https://github.com/ClickHouse/ClickHouse/pull/35294) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Support `--testmode` parameter for `clickhouse-local`. This parameter enables interpretation of test hints that we use in functional tests. [#35264](https://github.com/ClickHouse/ClickHouse/pull/35264) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add `distributed_depth` to query log. It is like a more detailed variant of `is_initial_query` [#35207](https://github.com/ClickHouse/ClickHouse/pull/35207) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Respect `remote_url_allow_hosts` for `MySQL` and `PostgreSQL` table functions. [#35191](https://github.com/ClickHouse/ClickHouse/pull/35191) ([Heena Bansal](https://github.com/HeenaBansal2009)). +* Added `disk_name` field to `system.part_log`. [#35178](https://github.com/ClickHouse/ClickHouse/pull/35178) ([Artyom Yurkov](https://github.com/Varinara)). +* Do not retry non-rertiable errors when querying remote URLs. Closes [#35161](https://github.com/ClickHouse/ClickHouse/issues/35161). [#35172](https://github.com/ClickHouse/ClickHouse/pull/35172) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support distributed INSERT SELECT queries (the setting `parallel_distributed_insert_select`) table function `view()`. [#35132](https://github.com/ClickHouse/ClickHouse/pull/35132) ([Azat Khuzhin](https://github.com/azat)). +* More precise memory tracking during `INSERT` into `Buffer` with `AggregateFunction`. [#35072](https://github.com/ClickHouse/ClickHouse/pull/35072) ([Azat Khuzhin](https://github.com/azat)). +* Avoid division by zero in Query Profiler if Linux kernel has a bug. Closes [#34787](https://github.com/ClickHouse/ClickHouse/issues/34787). [#35032](https://github.com/ClickHouse/ClickHouse/pull/35032) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add more sanity checks for keeper configuration: now mixing of localhost and non-local servers is not allowed, also add checks for same value of internal raft port and keeper client port. [#35004](https://github.com/ClickHouse/ClickHouse/pull/35004) ([alesapin](https://github.com/alesapin)). +* Currently, if the user changes the settings of the system tables there will be tons of logs and ClickHouse will rename the tables every minute. This fixes [#34929](https://github.com/ClickHouse/ClickHouse/issues/34929). [#34949](https://github.com/ClickHouse/ClickHouse/pull/34949) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Use connection pool for Hive metastore client. [#34940](https://github.com/ClickHouse/ClickHouse/pull/34940) ([lgbo](https://github.com/lgbo-ustc)). +* Ignore per-column `TTL` in `CREATE TABLE AS` if new table engine does not support it (i.e. if the engine is not of `MergeTree` family). [#34938](https://github.com/ClickHouse/ClickHouse/pull/34938) ([Azat Khuzhin](https://github.com/azat)). +* Allow `LowCardinality` strings for `ngrambf_v1`/`tokenbf_v1` indexes. Closes [#21865](https://github.com/ClickHouse/ClickHouse/issues/21865). [#34911](https://github.com/ClickHouse/ClickHouse/pull/34911) ([Lars Hiller Eidnes](https://github.com/larspars)). +* Allow opening empty sqlite db if the file doesn't exist. Closes [#33367](https://github.com/ClickHouse/ClickHouse/issues/33367). [#34907](https://github.com/ClickHouse/ClickHouse/pull/34907) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Implement memory statistics for FreeBSD - this is required for `max_server_memory_usage` to work correctly. [#34902](https://github.com/ClickHouse/ClickHouse/pull/34902) ([Alexandre Snarskii](https://github.com/snar)). +* In previous versions the progress bar in clickhouse-client can jump forward near 50% for no reason. This closes [#34324](https://github.com/ClickHouse/ClickHouse/issues/34324). [#34801](https://github.com/ClickHouse/ClickHouse/pull/34801) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Now `ALTER TABLE DROP COLUMN columnX` queries for `MergeTree` table engines will work instantly when `columnX` is an `ALIAS` column. Fixes [#34660](https://github.com/ClickHouse/ClickHouse/issues/34660). [#34786](https://github.com/ClickHouse/ClickHouse/pull/34786) ([alesapin](https://github.com/alesapin)). +* Show hints when user mistyped the name of a data skipping index. Closes [#29698](https://github.com/ClickHouse/ClickHouse/issues/29698). [#34764](https://github.com/ClickHouse/ClickHouse/pull/34764) ([flynn](https://github.com/ucasfl)). +* Support `remote()`/`cluster()` table functions for `parallel_distributed_insert_select`. [#34728](https://github.com/ClickHouse/ClickHouse/pull/34728) ([Azat Khuzhin](https://github.com/azat)). +* Do not reset logging that configured via `--log-file`/`--errorlog-file` command line options in case of empty configuration in the config file. [#34718](https://github.com/ClickHouse/ClickHouse/pull/34718) ([Amos Bird](https://github.com/amosbird)). +* Extract schema only once on table creation and prevent reading from local files/external sources to extract schema on each server startup. [#34684](https://github.com/ClickHouse/ClickHouse/pull/34684) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow specifying argument names for executable UDFs. This is necessary for formats where argument name is part of serialization, like `Native`, `JSONEachRow`. Closes [#34604](https://github.com/ClickHouse/ClickHouse/issues/34604). [#34653](https://github.com/ClickHouse/ClickHouse/pull/34653) ([Maksim Kita](https://github.com/kitaisreal)). +* `MaterializedMySQL` (experimental feature) now supports `materialized_mysql_tables_list` (a comma-separated list of MySQL database tables, which will be replicated by the MaterializedMySQL database engine. Default value: empty list — means all the tables will be replicated), mentioned at [#32977](https://github.com/ClickHouse/ClickHouse/issues/32977). [#34487](https://github.com/ClickHouse/ClickHouse/pull/34487) ([zzsmdfj](https://github.com/zzsmdfj)). +* Improve OpenTelemetry span logs for INSERT operation on distributed table. [#34480](https://github.com/ClickHouse/ClickHouse/pull/34480) ([Frank Chen](https://github.com/FrankChen021)). +* Make the znode `ctime` and `mtime` consistent between servers in ClickHouse Keeper. [#33441](https://github.com/ClickHouse/ClickHouse/pull/33441) ([å°è·¯](https://github.com/nicelulu)). + +#### Build/Testing/Packaging Improvement + +* Package repository is migrated to JFrog Artifactory (**Mikhail f. Shiryaev**). +* Randomize some settings in functional tests, so more possible combinations of settings will be tested. This is yet another fuzzing method to ensure better test coverage. This closes [#32268](https://github.com/ClickHouse/ClickHouse/issues/32268). [#34092](https://github.com/ClickHouse/ClickHouse/pull/34092) ([Kruglov Pavel](https://github.com/Avogar)). +* Drop PVS-Studio from our CI. [#34680](https://github.com/ClickHouse/ClickHouse/pull/34680) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add an ability to build stripped binaries with CMake. In previous versions it was performed by dh-tools. [#35196](https://github.com/ClickHouse/ClickHouse/pull/35196) ([alesapin](https://github.com/alesapin)). +* Smaller "fat-free" `clickhouse-keeper` build. [#35031](https://github.com/ClickHouse/ClickHouse/pull/35031) ([alesapin](https://github.com/alesapin)). +* Use @robot-clickhouse as an author and committer for PRs like https://github.com/ClickHouse/ClickHouse/pull/34685. [#34793](https://github.com/ClickHouse/ClickHouse/pull/34793) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Limit DWARF version for debug info by 4 max, because our internal stack symbolizer cannot parse DWARF version 5. This makes sense if you compile ClickHouse with clang-15. [#34777](https://github.com/ClickHouse/ClickHouse/pull/34777) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Remove `clickhouse-test` debian package as unneeded complication. CI use tests from repository and standalone testing via deb package is no longer supported. [#34606](https://github.com/ClickHouse/ClickHouse/pull/34606) ([Ilya Yatsishin](https://github.com/qoega)). + +#### Bug Fix (user-visible misbehaviour in official stable or prestable release) + +* A fix for HDFS integration: When the inner buffer size is too small, NEED_MORE_INPUT in `HadoopSnappyDecoder` will run multi times (>=3) for one compressed block. This makes the input data be copied into the wrong place in `HadoopSnappyDecoder::buffer`. [#35116](https://github.com/ClickHouse/ClickHouse/pull/35116) ([lgbo](https://github.com/lgbo-ustc)). +* Ignore obsolete grants in ATTACH GRANT statements. This PR fixes [#34815](https://github.com/ClickHouse/ClickHouse/issues/34815). [#34855](https://github.com/ClickHouse/ClickHouse/pull/34855) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix segfault in Postgres database when getting create table query if database was created using named collections. Closes [#35312](https://github.com/ClickHouse/ClickHouse/issues/35312). [#35313](https://github.com/ClickHouse/ClickHouse/pull/35313) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix partial merge join duplicate rows bug, close [#31009](https://github.com/ClickHouse/ClickHouse/issues/31009). [#35311](https://github.com/ClickHouse/ClickHouse/pull/35311) ([Vladimir C](https://github.com/vdimir)). +* Fix possible `Assertion 'position() != working_buffer.end()' failed` while using bzip2 compression with small `max_read_buffer_size` setting value. The bug was found in https://github.com/ClickHouse/ClickHouse/pull/35047. [#35300](https://github.com/ClickHouse/ClickHouse/pull/35300) ([Kruglov Pavel](https://github.com/Avogar)). While using lz4 compression with a small max_read_buffer_size setting value. [#35296](https://github.com/ClickHouse/ClickHouse/pull/35296) ([Kruglov Pavel](https://github.com/Avogar)). While using lzma compression with small `max_read_buffer_size` setting value. [#35295](https://github.com/ClickHouse/ClickHouse/pull/35295) ([Kruglov Pavel](https://github.com/Avogar)). While using `brotli` compression with a small `max_read_buffer_size` setting value. The bug was found in https://github.com/ClickHouse/ClickHouse/pull/35047. [#35281](https://github.com/ClickHouse/ClickHouse/pull/35281) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix possible segfault in `JSONEachRow` schema inference. [#35291](https://github.com/ClickHouse/ClickHouse/pull/35291) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix `CHECK TABLE` query in case when sparse columns are enabled in table. [#35274](https://github.com/ClickHouse/ClickHouse/pull/35274) ([Anton Popov](https://github.com/CurtizJ)). +* Avoid std::terminate in case of exception in reading from remote VFS. [#35257](https://github.com/ClickHouse/ClickHouse/pull/35257) ([Azat Khuzhin](https://github.com/azat)). +* Fix reading port from config, close [#34776](https://github.com/ClickHouse/ClickHouse/issues/34776). [#35193](https://github.com/ClickHouse/ClickHouse/pull/35193) ([Vladimir C](https://github.com/vdimir)). +* Fix error in query with `WITH TOTALS` in case if `HAVING` returned empty result. This fixes [#33711](https://github.com/ClickHouse/ClickHouse/issues/33711). [#35186](https://github.com/ClickHouse/ClickHouse/pull/35186) ([Amos Bird](https://github.com/amosbird)). +* Fix a corner case of `replaceRegexpAll`, close [#35117](https://github.com/ClickHouse/ClickHouse/issues/35117). [#35182](https://github.com/ClickHouse/ClickHouse/pull/35182) ([Vladimir C](https://github.com/vdimir)). +* Schema inference didn't work properly on case of `INSERT INTO FUNCTION s3(...) FROM ...`, it tried to read schema from s3 file instead of from select query. [#35176](https://github.com/ClickHouse/ClickHouse/pull/35176) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix MaterializedPostgreSQL (experimental feature) `table overrides` for partition by, etc. Closes [#35048](https://github.com/ClickHouse/ClickHouse/issues/35048). [#35162](https://github.com/ClickHouse/ClickHouse/pull/35162) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix MaterializedPostgreSQL (experimental feature) adding new table to replication (ATTACH TABLE) after manually removing (DETACH TABLE). Closes [#33800](https://github.com/ClickHouse/ClickHouse/issues/33800). Closes [#34922](https://github.com/ClickHouse/ClickHouse/issues/34922). Closes [#34315](https://github.com/ClickHouse/ClickHouse/issues/34315). [#35158](https://github.com/ClickHouse/ClickHouse/pull/35158) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix partition pruning error when non-monotonic function is used with IN operator. This fixes [#35136](https://github.com/ClickHouse/ClickHouse/issues/35136). [#35146](https://github.com/ClickHouse/ClickHouse/pull/35146) ([Amos Bird](https://github.com/amosbird)). +* Fixed slightly incorrect translation of YAML configs to XML. [#35135](https://github.com/ClickHouse/ClickHouse/pull/35135) ([Miel Donkers](https://github.com/mdonkers)). +* Fix `optimize_skip_unused_shards_rewrite_in` for signed columns and negative values. [#35134](https://github.com/ClickHouse/ClickHouse/pull/35134) ([Azat Khuzhin](https://github.com/azat)). +* The `update_lag` external dictionary configuration option was unusable showing the error message ``Unexpected key `update_lag` in dictionary source configuration``. [#35089](https://github.com/ClickHouse/ClickHouse/pull/35089) ([Jason Chu](https://github.com/1lann)). +* Avoid possible deadlock on server shutdown. [#35081](https://github.com/ClickHouse/ClickHouse/pull/35081) ([Azat Khuzhin](https://github.com/azat)). +* Fix missing alias after function is optimized to a subcolumn when setting `optimize_functions_to_subcolumns` is enabled. Closes [#33798](https://github.com/ClickHouse/ClickHouse/issues/33798). [#35079](https://github.com/ClickHouse/ClickHouse/pull/35079) ([qieqieplus](https://github.com/qieqieplus)). +* Fix reading from `system.asynchronous_inserts` table if there exists asynchronous insert into table function. [#35050](https://github.com/ClickHouse/ClickHouse/pull/35050) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible exception `Reading for MergeTree family tables must be done with last position boundary` (relevant to operation on remote VFS). Closes [#34979](https://github.com/ClickHouse/ClickHouse/issues/34979). [#35001](https://github.com/ClickHouse/ClickHouse/pull/35001) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix unexpected result when use -State type aggregate function in window frame. [#34999](https://github.com/ClickHouse/ClickHouse/pull/34999) ([metahys](https://github.com/metahys)). +* Fix possible segfault in FileLog (experimental feature). Closes [#30749](https://github.com/ClickHouse/ClickHouse/issues/30749). [#34996](https://github.com/ClickHouse/ClickHouse/pull/34996) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix possible rare error `Cannot push block to port which already has data`. [#34993](https://github.com/ClickHouse/ClickHouse/pull/34993) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix wrong schema inference for unquoted dates in CSV. Closes [#34768](https://github.com/ClickHouse/ClickHouse/issues/34768). [#34961](https://github.com/ClickHouse/ClickHouse/pull/34961) ([Kruglov Pavel](https://github.com/Avogar)). +* Integration with Hive: Fix unexpected result when use `in` in `where` in hive query. [#34945](https://github.com/ClickHouse/ClickHouse/pull/34945) ([lgbo](https://github.com/lgbo-ustc)). +* Avoid busy polling in ClickHouse Keeper while searching for changelog files to delete. [#34931](https://github.com/ClickHouse/ClickHouse/pull/34931) ([Azat Khuzhin](https://github.com/azat)). +* Fix DateTime64 conversion from PostgreSQL. Closes [#33364](https://github.com/ClickHouse/ClickHouse/issues/33364). [#34910](https://github.com/ClickHouse/ClickHouse/pull/34910) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix possible "Part directory doesn't exist" during `INSERT` into MergeTree table backed by VFS over s3. [#34876](https://github.com/ClickHouse/ClickHouse/pull/34876) ([Azat Khuzhin](https://github.com/azat)). +* Support DDLs like CREATE USER to be executed on cross replicated cluster. [#34860](https://github.com/ClickHouse/ClickHouse/pull/34860) ([Jianmei Zhang](https://github.com/zhangjmruc)). +* Fix bugs for multiple columns group by in `WindowView` (experimental feature). [#34859](https://github.com/ClickHouse/ClickHouse/pull/34859) ([vxider](https://github.com/Vxider)). +* Fix possible failures in S2 functions when queries contain const columns. [#34745](https://github.com/ClickHouse/ClickHouse/pull/34745) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix bug for H3 funcs containing const columns which cause queries to fail. [#34743](https://github.com/ClickHouse/ClickHouse/pull/34743) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix `No such file or directory` with enabled `fsync_part_directory` and vertical merge. [#34739](https://github.com/ClickHouse/ClickHouse/pull/34739) ([Azat Khuzhin](https://github.com/azat)). +* Fix serialization/printing for system queries `RELOAD MODEL`, `RELOAD FUNCTION`, `RESTART DISK` when used `ON CLUSTER`. Closes [#34514](https://github.com/ClickHouse/ClickHouse/issues/34514). [#34696](https://github.com/ClickHouse/ClickHouse/pull/34696) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix `allow_experimental_projection_optimization` with `enable_global_with_statement` (before it may lead to `Stack size too large` error in case of multiple expressions in `WITH` clause, and also it executes scalar subqueries again and again, so not it will be more optimal). [#34650](https://github.com/ClickHouse/ClickHouse/pull/34650) ([Azat Khuzhin](https://github.com/azat)). +* Stop to select part for mutate when the other replica has already updated the transaction log for `ReplatedMergeTree` engine. [#34633](https://github.com/ClickHouse/ClickHouse/pull/34633) ([Jianmei Zhang](https://github.com/zhangjmruc)). +* Fix incorrect result of trivial count query when part movement feature is used [#34089](https://github.com/ClickHouse/ClickHouse/issues/34089). [#34385](https://github.com/ClickHouse/ClickHouse/pull/34385) ([nvartolomei](https://github.com/nvartolomei)). +* Fix inconsistency of `max_query_size` limitation in distributed subqueries. [#34078](https://github.com/ClickHouse/ClickHouse/pull/34078) ([Chao Ma](https://github.com/godliness)). + + +### ClickHouse release v22.2, 2022-02-17 + +#### Upgrade Notes + +* Applying data skipping indexes for queries with FINAL may produce incorrect result. In this release we disabled data skipping indexes by default for queries with FINAL (a new setting `use_skip_indexes_if_final` is introduced and disabled by default). [#34243](https://github.com/ClickHouse/ClickHouse/pull/34243) ([Azat Khuzhin](https://github.com/azat)). + +#### New Feature + +* Projections are production ready. Set `allow_experimental_projection_optimization` by default and deprecate this setting. [#34456](https://github.com/ClickHouse/ClickHouse/pull/34456) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* An option to create a new files on insert for `File`/`S3`/`HDFS` engines. Allow to overwrite a file in `HDFS`. Throw an exception in attempt to overwrite a file in `S3` by default. Throw an exception in attempt to append data to file in formats that have a suffix (and thus don't support appends, like `Parquet`, `ORC`). Closes [#31640](https://github.com/ClickHouse/ClickHouse/issues/31640) Closes [#31622](https://github.com/ClickHouse/ClickHouse/issues/31622) Closes [#23862](https://github.com/ClickHouse/ClickHouse/issues/23862) Closes [#15022](https://github.com/ClickHouse/ClickHouse/issues/15022) Closes [#16674](https://github.com/ClickHouse/ClickHouse/issues/16674). [#33302](https://github.com/ClickHouse/ClickHouse/pull/33302) ([Kruglov Pavel](https://github.com/Avogar)). +* Add a setting that allows a user to provide own deduplication semantic in `MergeTree`/`ReplicatedMergeTree` If provided, it's used instead of data digest to generate block ID. So, for example, by providing a unique value for the setting in each INSERT statement, the user can avoid the same inserted data being deduplicated. This closes: [#7461](https://github.com/ClickHouse/ClickHouse/issues/7461). [#32304](https://github.com/ClickHouse/ClickHouse/pull/32304) ([Igor Nikonov](https://github.com/devcrafter)). +* Add support of `DEFAULT` keyword for INSERT statements. Closes [#6331](https://github.com/ClickHouse/ClickHouse/issues/6331). [#33141](https://github.com/ClickHouse/ClickHouse/pull/33141) ([Andrii Buriachevskyi](https://github.com/1over)). +* `EPHEMERAL` column specifier is added to `CREATE TABLE` query. Closes [#9436](https://github.com/ClickHouse/ClickHouse/issues/9436). [#34424](https://github.com/ClickHouse/ClickHouse/pull/34424) ([yakov-olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Support `IF EXISTS` clause for `TTL expr TO [DISK|VOLUME] [IF EXISTS] 'xxx'` feature. Parts will be moved to disk or volume only if it exists on replica, so `MOVE TTL` rules will be able to behave differently on replicas according to the existing storage policies. Resolves [#34455](https://github.com/ClickHouse/ClickHouse/issues/34455). [#34504](https://github.com/ClickHouse/ClickHouse/pull/34504) ([Anton Popov](https://github.com/CurtizJ)). +* Allow set default table engine and to create tables without specifying ENGINE. [#34187](https://github.com/ClickHouse/ClickHouse/pull/34187) ([Ilya Yatsishin](https://github.com/qoega)). +* Add table function `format(format_name, data)`. [#34125](https://github.com/ClickHouse/ClickHouse/pull/34125) ([Kruglov Pavel](https://github.com/Avogar)). +* Detect format in `clickhouse-local` by file name even in the case when it is passed to stdin. [#33829](https://github.com/ClickHouse/ClickHouse/pull/33829) ([Kruglov Pavel](https://github.com/Avogar)). +* Add schema inference for `values` table function. Closes [#33811](https://github.com/ClickHouse/ClickHouse/issues/33811). [#34017](https://github.com/ClickHouse/ClickHouse/pull/34017) ([Kruglov Pavel](https://github.com/Avogar)). +* Dynamic reload of server TLS certificates on config reload. Closes [#15764](https://github.com/ClickHouse/ClickHouse/issues/15764). [#15765](https://github.com/ClickHouse/ClickHouse/pull/15765) ([johnskopis](https://github.com/johnskopis)). [#31257](https://github.com/ClickHouse/ClickHouse/pull/31257) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Now ReplicatedMergeTree can recover data when some of its disks are broken. [#13544](https://github.com/ClickHouse/ClickHouse/pull/13544) ([Amos Bird](https://github.com/amosbird)). +* Fault-tolerant connections in clickhouse-client: `clickhouse-client ... --host host1 --host host2 --port port2 --host host3 --port port --host host4`. [#34490](https://github.com/ClickHouse/ClickHouse/pull/34490) ([Kruglov Pavel](https://github.com/Avogar)). [#33824](https://github.com/ClickHouse/ClickHouse/pull/33824) ([Filippov Denis](https://github.com/DF5HSE)). +* Add `DEGREES` and `RADIANS` functions for MySQL compatibility. [#33769](https://github.com/ClickHouse/ClickHouse/pull/33769) ([Bharat Nallan](https://github.com/bharatnc)). +* Add `h3ToCenterChild` function. [#33313](https://github.com/ClickHouse/ClickHouse/pull/33313) ([Bharat Nallan](https://github.com/bharatnc)). Add new h3 miscellaneous functions: `edgeLengthKm`,`exactEdgeLengthKm`,`exactEdgeLengthM`,`exactEdgeLengthRads`,`numHexagons`. [#33621](https://github.com/ClickHouse/ClickHouse/pull/33621) ([Bharat Nallan](https://github.com/bharatnc)). +* Add function `bitSlice` to extract bit subsequences from String/FixedString. [#33360](https://github.com/ClickHouse/ClickHouse/pull/33360) ([RogerYK](https://github.com/RogerYK)). +* Implemented `meanZTest` aggregate function. [#33354](https://github.com/ClickHouse/ClickHouse/pull/33354) ([achimbab](https://github.com/achimbab)). +* Add confidence intervals to T-tests aggregate functions. [#33260](https://github.com/ClickHouse/ClickHouse/pull/33260) ([achimbab](https://github.com/achimbab)). +* Add function `addressToLineWithInlines`. Close [#26211](https://github.com/ClickHouse/ClickHouse/issues/26211). [#33467](https://github.com/ClickHouse/ClickHouse/pull/33467) ([SuperDJY](https://github.com/cmsxbc)). +* Added `#!` and `# ` as a recognised start of a single line comment. Closes [#34138](https://github.com/ClickHouse/ClickHouse/issues/34138). [#34230](https://github.com/ClickHouse/ClickHouse/pull/34230) ([Aaron Katz](https://github.com/aaronstephenkatz)). + +#### Experimental Feature + +* Functions for text classification: language and charset detection. See [#23271](https://github.com/ClickHouse/ClickHouse/issues/23271). [#33314](https://github.com/ClickHouse/ClickHouse/pull/33314) ([Nikolay Degterinsky](https://github.com/evillique)). +* Add memory overcommit to `MemoryTracker`. Added `guaranteed` settings for memory limits which represent soft memory limits. In case when hard memory limit is reached, `MemoryTracker` tries to cancel the most overcommited query. New setting `memory_usage_overcommit_max_wait_microseconds` specifies how long queries may wait another query to stop. Closes [#28375](https://github.com/ClickHouse/ClickHouse/issues/28375). [#31182](https://github.com/ClickHouse/ClickHouse/pull/31182) ([Dmitry Novik](https://github.com/novikd)). +* Enable stream to table join in WindowView. [#33729](https://github.com/ClickHouse/ClickHouse/pull/33729) ([vxider](https://github.com/Vxider)). +* Support `SET`, `YEAR`, `TIME` and `GEOMETRY` data types in `MaterializedMySQL` (experimental feature). Fixes [#18091](https://github.com/ClickHouse/ClickHouse/issues/18091), [#21536](https://github.com/ClickHouse/ClickHouse/issues/21536), [#26361](https://github.com/ClickHouse/ClickHouse/issues/26361). [#33429](https://github.com/ClickHouse/ClickHouse/pull/33429) ([zzsmdfj](https://github.com/zzsmdfj)). +* Fix various issues when projection is enabled by default. Each issue is described in separate commit. This is for [#33678](https://github.com/ClickHouse/ClickHouse/issues/33678) . This fixes [#34273](https://github.com/ClickHouse/ClickHouse/issues/34273). [#34305](https://github.com/ClickHouse/ClickHouse/pull/34305) ([Amos Bird](https://github.com/amosbird)). + +#### Performance Improvement + +* Support `optimize_read_in_order` if prefix of sorting key is already sorted. E.g. if we have sorting key `ORDER BY (a, b)` in table and query with `WHERE a = const ORDER BY b` clauses, now it will be applied reading in order of sorting key instead of full sort. [#32748](https://github.com/ClickHouse/ClickHouse/pull/32748) ([Anton Popov](https://github.com/CurtizJ)). +* Improve performance of partitioned insert into table functions `URL`, `S3`, `File`, `HDFS`. Closes [#34348](https://github.com/ClickHouse/ClickHouse/issues/34348). [#34510](https://github.com/ClickHouse/ClickHouse/pull/34510) ([Maksim Kita](https://github.com/kitaisreal)). +* Multiple performance improvements of clickhouse-keeper. [#34484](https://github.com/ClickHouse/ClickHouse/pull/34484) [#34587](https://github.com/ClickHouse/ClickHouse/pull/34587) ([zhanglistar](https://github.com/zhanglistar)). +* `FlatDictionary` improve performance of dictionary data load. [#33871](https://github.com/ClickHouse/ClickHouse/pull/33871) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance of `mapPopulateSeries` function. Closes [#33944](https://github.com/ClickHouse/ClickHouse/issues/33944). [#34318](https://github.com/ClickHouse/ClickHouse/pull/34318) ([Maksim Kita](https://github.com/kitaisreal)). +* `_file` and `_path` virtual columns (in file-like table engines) are made `LowCardinality` - it will make queries for multiple files faster. Closes [#34300](https://github.com/ClickHouse/ClickHouse/issues/34300). [#34317](https://github.com/ClickHouse/ClickHouse/pull/34317) ([flynn](https://github.com/ucasfl)). +* Speed up loading of data parts. It was not parallelized before: the setting `part_loading_threads` did not have effect. See [#4699](https://github.com/ClickHouse/ClickHouse/issues/4699). [#34310](https://github.com/ClickHouse/ClickHouse/pull/34310) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve performance of `LineAsString` format. This closes [#34303](https://github.com/ClickHouse/ClickHouse/issues/34303). [#34306](https://github.com/ClickHouse/ClickHouse/pull/34306) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Optimize `quantilesExact{Low,High}` to use `nth_element` instead of `sort`. [#34287](https://github.com/ClickHouse/ClickHouse/pull/34287) ([Danila Kutenin](https://github.com/danlark1)). +* Slightly improve performance of `Regexp` format. [#34202](https://github.com/ClickHouse/ClickHouse/pull/34202) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Minor improvement for analysis of scalar subqueries. [#34128](https://github.com/ClickHouse/ClickHouse/pull/34128) ([Federico Rodriguez](https://github.com/fedrod)). +* Make ORDER BY tuple almost as fast as ORDER BY columns. We have special optimizations for multiple column ORDER BY: https://github.com/ClickHouse/ClickHouse/pull/10831 . It's beneficial to also apply to tuple columns. [#34060](https://github.com/ClickHouse/ClickHouse/pull/34060) ([Amos Bird](https://github.com/amosbird)). +* Rework and reintroduce the scalar subqueries cache to Materialized Views execution. [#33958](https://github.com/ClickHouse/ClickHouse/pull/33958) ([Raúl Marín](https://github.com/Algunenano)). +* Slightly improve performance of `ORDER BY` by adding x86-64 AVX-512 support for `memcmpSmall` functions to accelerate memory comparison. It works only if you compile ClickHouse by yourself. [#33706](https://github.com/ClickHouse/ClickHouse/pull/33706) ([hanqf-git](https://github.com/hanqf-git)). +* Improve `range_hashed` dictionary performance if for key there are a lot of intervals. Fixes [#23821](https://github.com/ClickHouse/ClickHouse/issues/23821). [#33516](https://github.com/ClickHouse/ClickHouse/pull/33516) ([Maksim Kita](https://github.com/kitaisreal)). +* For inserts and merges into S3, write files in parallel whenever possible (TODO: check if it's merged). [#33291](https://github.com/ClickHouse/ClickHouse/pull/33291) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Improve `clickhouse-keeper` performance and fix several memory leaks in NuRaft library. [#33329](https://github.com/ClickHouse/ClickHouse/pull/33329) ([alesapin](https://github.com/alesapin)). + +#### Improvement + +* Support asynchronous inserts in `clickhouse-client` for queries with inlined data. [#34267](https://github.com/ClickHouse/ClickHouse/pull/34267) ([Anton Popov](https://github.com/CurtizJ)). +* Functions `dictGet`, `dictHas` implicitly cast key argument to dictionary key structure, if they are different. [#33672](https://github.com/ClickHouse/ClickHouse/pull/33672) ([Maksim Kita](https://github.com/kitaisreal)). +* Improvements for `range_hashed` dictionaries. Improve performance of load time if there are multiple attributes. Allow to create a dictionary without attributes. Added option to specify strategy when intervals `start` and `end` have `Nullable` type `convert_null_range_bound_to_open` by default is `true`. Closes [#29791](https://github.com/ClickHouse/ClickHouse/issues/29791). Allow to specify `Float`, `Decimal`, `DateTime64`, `Int128`, `Int256`, `UInt128`, `UInt256` as range types. `RangeHashedDictionary` added support for range values that extend `Int64` type. Closes [#28322](https://github.com/ClickHouse/ClickHouse/issues/28322). Added option `range_lookup_strategy` to specify range lookup type `min`, `max` by default is `min` . Closes [#21647](https://github.com/ClickHouse/ClickHouse/issues/21647). Fixed allocated bytes calculations. Fixed type name in `system.dictionaries` in case of `ComplexKeyHashedDictionary`. [#33927](https://github.com/ClickHouse/ClickHouse/pull/33927) ([Maksim Kita](https://github.com/kitaisreal)). +* `flat`, `hashed`, `hashed_array` dictionaries now support creating with empty attributes, with support of reading the keys and using `dictHas`. Fixes [#33820](https://github.com/ClickHouse/ClickHouse/issues/33820). [#33918](https://github.com/ClickHouse/ClickHouse/pull/33918) ([Maksim Kita](https://github.com/kitaisreal)). +* Added support for `DateTime64` data type in dictionaries. [#33914](https://github.com/ClickHouse/ClickHouse/pull/33914) ([Maksim Kita](https://github.com/kitaisreal)). +* Allow to write `s3(url, access_key_id, secret_access_key)` (autodetect of data format and table structure, but with explicit credentials). [#34503](https://github.com/ClickHouse/ClickHouse/pull/34503) ([Kruglov Pavel](https://github.com/Avogar)). +* Added sending of the output format back to client like it's done in HTTP protocol as suggested in [#34362](https://github.com/ClickHouse/ClickHouse/issues/34362). Closes [#34362](https://github.com/ClickHouse/ClickHouse/issues/34362). [#34499](https://github.com/ClickHouse/ClickHouse/pull/34499) ([Vitaly Baranov](https://github.com/vitlibar)). +* Send ProfileEvents statistics in case of INSERT SELECT query (to display query metrics in `clickhouse-client` for this type of queries). [#34498](https://github.com/ClickHouse/ClickHouse/pull/34498) ([Dmitry Novik](https://github.com/novikd)). +* Recognize `.jsonl` extension for JSONEachRow format. [#34496](https://github.com/ClickHouse/ClickHouse/pull/34496) ([Kruglov Pavel](https://github.com/Avogar)). +* Improve schema inference in clickhouse-local. Allow to write just `clickhouse-local -q "select * from table" < data.format`. [#34495](https://github.com/ClickHouse/ClickHouse/pull/34495) ([Kruglov Pavel](https://github.com/Avogar)). +* Privileges CREATE/ALTER/DROP ROW POLICY now can be granted on a table or on `database.*` as well as globally `*.*`. [#34489](https://github.com/ClickHouse/ClickHouse/pull/34489) ([Vitaly Baranov](https://github.com/vitlibar)). +* Allow to export arbitrary large files to `s3`. Add two new settings: `s3_upload_part_size_multiply_factor` and `s3_upload_part_size_multiply_parts_count_threshold`. Now each time `s3_upload_part_size_multiply_parts_count_threshold` uploaded to S3 from a single query `s3_min_upload_part_size` multiplied by `s3_upload_part_size_multiply_factor`. Fixes [#34244](https://github.com/ClickHouse/ClickHouse/issues/34244). [#34422](https://github.com/ClickHouse/ClickHouse/pull/34422) ([alesapin](https://github.com/alesapin)). +* Allow to skip not found (404) URLs for globs when using URL storage / table function. Also closes [#34359](https://github.com/ClickHouse/ClickHouse/issues/34359). [#34392](https://github.com/ClickHouse/ClickHouse/pull/34392) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Default input and output formats for `clickhouse-local` that can be overriden by --input-format and --output-format. Close [#30631](https://github.com/ClickHouse/ClickHouse/issues/30631). [#34352](https://github.com/ClickHouse/ClickHouse/pull/34352) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Add options for `clickhouse-format`. Which close [#30528](https://github.com/ClickHouse/ClickHouse/issues/30528) - `max_query_size` - `max_parser_depth`. [#34349](https://github.com/ClickHouse/ClickHouse/pull/34349) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Better handling of pre-inputs before client start. This is for [#34308](https://github.com/ClickHouse/ClickHouse/issues/34308). [#34336](https://github.com/ClickHouse/ClickHouse/pull/34336) ([Amos Bird](https://github.com/amosbird)). +* `REGEXP_MATCHES` and `REGEXP_REPLACE` function aliases for compatibility with PostgreSQL. Close [#30885](https://github.com/ClickHouse/ClickHouse/issues/30885). [#34334](https://github.com/ClickHouse/ClickHouse/pull/34334) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Some servers expect a User-Agent header in their HTTP requests. A `User-Agent` header entry has been added to HTTP requests of the form: User-Agent: ClickHouse/VERSION_STRING. [#34330](https://github.com/ClickHouse/ClickHouse/pull/34330) ([Saad Ur Rahman](https://github.com/surahman)). +* Cancel merges before acquiring table lock for `TRUNCATE` query to avoid `DEADLOCK_AVOIDED` error in some cases. Fixes [#34302](https://github.com/ClickHouse/ClickHouse/issues/34302). [#34304](https://github.com/ClickHouse/ClickHouse/pull/34304) ([tavplubix](https://github.com/tavplubix)). +* Change severity of the "Cancelled merging parts" message in logs, because it's not an error. This closes [#34148](https://github.com/ClickHouse/ClickHouse/issues/34148). [#34232](https://github.com/ClickHouse/ClickHouse/pull/34232) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add ability to compose PostgreSQL-style cast operator `::` with expressions using `[]` and `.` operators (array and tuple indexing). [#34229](https://github.com/ClickHouse/ClickHouse/pull/34229) ([Nikolay Degterinsky](https://github.com/evillique)). +* Recognize `YYYYMMDD-hhmmss` format in `parseDateTimeBestEffort` function. This closes [#34206](https://github.com/ClickHouse/ClickHouse/issues/34206). [#34208](https://github.com/ClickHouse/ClickHouse/pull/34208) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow carriage return in the middle of the line while parsing by `Regexp` format. This closes [#34200](https://github.com/ClickHouse/ClickHouse/issues/34200). [#34205](https://github.com/ClickHouse/ClickHouse/pull/34205) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow to parse dictionary's `PRIMARY KEY` as `PRIMARY KEY (id, value)`; previously supported only `PRIMARY KEY id, value`. Closes [#34135](https://github.com/ClickHouse/ClickHouse/issues/34135). [#34141](https://github.com/ClickHouse/ClickHouse/pull/34141) ([Maksim Kita](https://github.com/kitaisreal)). +* An optional argument for `splitByChar` to limit the number of resulting elements. close [#34081](https://github.com/ClickHouse/ClickHouse/issues/34081). [#34140](https://github.com/ClickHouse/ClickHouse/pull/34140) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Improving the experience of multiple line editing for clickhouse-client. This is a follow-up of [#31123](https://github.com/ClickHouse/ClickHouse/pull/31123). [#34114](https://github.com/ClickHouse/ClickHouse/pull/34114) ([Amos Bird](https://github.com/amosbird)). +* Add `UUID` suport in `MsgPack` input/output format. [#34065](https://github.com/ClickHouse/ClickHouse/pull/34065) ([Kruglov Pavel](https://github.com/Avogar)). +* Tracing context (for OpenTelemetry) is now propagated from GRPC client metadata (this change is relevant for GRPC client-server protocol). [#34064](https://github.com/ClickHouse/ClickHouse/pull/34064) ([andremarianiello](https://github.com/andremarianiello)). +* Supports all types of `SYSTEM` queries with `ON CLUSTER` clause. [#34005](https://github.com/ClickHouse/ClickHouse/pull/34005) ([å°è·¯](https://github.com/nicelulu)). +* Improve memory accounting for queries that are using less than `max_untracker_memory`. [#34001](https://github.com/ClickHouse/ClickHouse/pull/34001) ([Azat Khuzhin](https://github.com/azat)). +* Fixed UTF-8 string case-insensitive search when lowercase and uppercase characters are represented by different number of bytes. Example is `ẞ` and `ß`. This closes [#7334](https://github.com/ClickHouse/ClickHouse/issues/7334). [#33992](https://github.com/ClickHouse/ClickHouse/pull/33992) ([Harry Lee](https://github.com/HarryLeeIBM)). +* Detect format and schema from stdin in `clickhouse-local`. [#33960](https://github.com/ClickHouse/ClickHouse/pull/33960) ([Kruglov Pavel](https://github.com/Avogar)). +* Correctly handle the case of misconfiguration when multiple disks are using the same path on the filesystem. [#29072](https://github.com/ClickHouse/ClickHouse/issues/29072). [#33905](https://github.com/ClickHouse/ClickHouse/pull/33905) ([zhongyuankai](https://github.com/zhongyuankai)). +* Try every resolved IP address while getting S3 proxy. S3 proxies are rarely used, mostly in Yandex Cloud. [#33862](https://github.com/ClickHouse/ClickHouse/pull/33862) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Support EXPLAIN AST CREATE FUNCTION query `EXPLAIN AST CREATE FUNCTION mycast AS (n) -> cast(n as String)` will return `EXPLAIN AST CREATE FUNCTION mycast AS n -> CAST(n, 'String')`. [#33819](https://github.com/ClickHouse/ClickHouse/pull/33819) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Added support for cast from `Map(Key, Value)` to `Array(Tuple(Key, Value))`. [#33794](https://github.com/ClickHouse/ClickHouse/pull/33794) ([Maksim Kita](https://github.com/kitaisreal)). +* Add some improvements and fixes for `Bool` data type. Fixes [#33244](https://github.com/ClickHouse/ClickHouse/issues/33244). [#33737](https://github.com/ClickHouse/ClickHouse/pull/33737) ([Kruglov Pavel](https://github.com/Avogar)). +* Parse and store OpenTelemetry trace-id in big-endian order. [#33723](https://github.com/ClickHouse/ClickHouse/pull/33723) ([Frank Chen](https://github.com/FrankChen021)). +* Improvement for `fromUnixTimestamp64` family functions.. They now accept any integer value that can be converted to `Int64`. This closes: [#14648](https://github.com/ClickHouse/ClickHouse/issues/14648). [#33505](https://github.com/ClickHouse/ClickHouse/pull/33505) ([Andrey Zvonov](https://github.com/zvonand)). +* Reimplement `_shard_num` from constants (see [#7624](https://github.com/ClickHouse/ClickHouse/issues/7624)) with `shardNum()` function (seee [#27020](https://github.com/ClickHouse/ClickHouse/issues/27020)), to avoid possible issues (like those that had been found in [#16947](https://github.com/ClickHouse/ClickHouse/issues/16947)). [#33392](https://github.com/ClickHouse/ClickHouse/pull/33392) ([Azat Khuzhin](https://github.com/azat)). +* Enable binary arithmetic (plus, minus, multiply, division, least, greatest) between Decimal and Float. [#33355](https://github.com/ClickHouse/ClickHouse/pull/33355) ([flynn](https://github.com/ucasfl)). +* Respect cgroups limits in max_threads autodetection. [#33342](https://github.com/ClickHouse/ClickHouse/pull/33342) ([JaySon](https://github.com/JaySon-Huang)). +* Add new clickhouse-keeper setting `min_session_timeout_ms`. Now clickhouse-keeper will determine client session timeout according to `min_session_timeout_ms` and `session_timeout_ms` settings. [#33288](https://github.com/ClickHouse/ClickHouse/pull/33288) ([JackyWoo](https://github.com/JackyWoo)). +* Added `UUID` data type support for functions `hex` and `bin`. [#32170](https://github.com/ClickHouse/ClickHouse/pull/32170) ([Frank Chen](https://github.com/FrankChen021)). +* Fix reading of subcolumns with dots in their names. In particular fixed reading of `Nested` columns, if their element names contain dots (e.g ```Nested(`keys.name` String, `keys.id` UInt64, values UInt64)```). [#34228](https://github.com/ClickHouse/ClickHouse/pull/34228) ([Anton Popov](https://github.com/CurtizJ)). +* Fixes `parallel_view_processing = 0` not working when inserting into a table using `VALUES`. - Fixes `view_duration_ms` in the `query_views_log` not being set correctly for materialized views. [#34067](https://github.com/ClickHouse/ClickHouse/pull/34067) ([Raúl Marín](https://github.com/Algunenano)). +* Fix parsing tables structure from ZooKeeper: now metadata from ZooKeeper compared with local metadata in canonical form. It helps when canonical function names can change between ClickHouse versions. [#33933](https://github.com/ClickHouse/ClickHouse/pull/33933) ([sunny](https://github.com/sunny19930321)). +* Properly escape some characters for interaction with LDAP. [#33401](https://github.com/ClickHouse/ClickHouse/pull/33401) ([IlyaTsoi](https://github.com/IlyaTsoi)). + +#### Build/Testing/Packaging Improvement + +* Remove unbundled build support. [#33690](https://github.com/ClickHouse/ClickHouse/pull/33690) ([Azat Khuzhin](https://github.com/azat)). +* Ensure that tests don't depend on the result of non-stable sorting of equal elements. Added equal items ranges randomization in debug after sort to prevent issues when we rely on equal items sort order. [#34393](https://github.com/ClickHouse/ClickHouse/pull/34393) ([Maksim Kita](https://github.com/kitaisreal)). +* Add verbosity to a style check. [#34289](https://github.com/ClickHouse/ClickHouse/pull/34289) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Remove `clickhouse-test` debian package because it's obsolete. [#33948](https://github.com/ClickHouse/ClickHouse/pull/33948) ([Ilya Yatsishin](https://github.com/qoega)). +* Multiple improvements for build system to remove the possibility of occasionally using packages from the OS and to enforce hermetic builds. [#33695](https://github.com/ClickHouse/ClickHouse/pull/33695) ([Amos Bird](https://github.com/amosbird)). + +#### Bug Fix (user-visible misbehaviour in official stable or prestable release) + +* Fixed the assertion in case of using `allow_experimental_parallel_reading_from_replicas` with `max_parallel_replicas` equals to 1. This fixes [#34525](https://github.com/ClickHouse/ClickHouse/issues/34525). [#34613](https://github.com/ClickHouse/ClickHouse/pull/34613) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix rare bug while reading of empty arrays, which could lead to `Data compressed with different methods` error. It can reproduce if you have mostly empty arrays, but not always. And reading is performed in backward direction with ORDER BY ... DESC. This error is extremely unlikely to happen. [#34327](https://github.com/ClickHouse/ClickHouse/pull/34327) ([Anton Popov](https://github.com/CurtizJ)). +* Fix wrong result of `round`/`roundBankers` if integer values of small types are rounded. Closes [#33267](https://github.com/ClickHouse/ClickHouse/issues/33267). [#34562](https://github.com/ClickHouse/ClickHouse/pull/34562) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Sometimes query cancellation did not work immediately when we were reading multiple files from s3 or HDFS. Fixes [#34301](https://github.com/ClickHouse/ClickHouse/issues/34301) Relates to [#34397](https://github.com/ClickHouse/ClickHouse/issues/34397). [#34539](https://github.com/ClickHouse/ClickHouse/pull/34539) ([Dmitry Novik](https://github.com/novikd)). +* Fix exception `Chunk should have AggregatedChunkInfo in MergingAggregatedTransform` (in case of `optimize_aggregation_in_order = 1` and `distributed_aggregation_memory_efficient = 0`). Fixes [#34526](https://github.com/ClickHouse/ClickHouse/issues/34526). [#34532](https://github.com/ClickHouse/ClickHouse/pull/34532) ([Anton Popov](https://github.com/CurtizJ)). +* Fix comparison between integers and floats in index analysis. Previously it could lead to skipping some granules for reading by mistake. Fixes [#34493](https://github.com/ClickHouse/ClickHouse/issues/34493). [#34528](https://github.com/ClickHouse/ClickHouse/pull/34528) ([Anton Popov](https://github.com/CurtizJ)). +* Fix compression support in URL engine. [#34524](https://github.com/ClickHouse/ClickHouse/pull/34524) ([Frank Chen](https://github.com/FrankChen021)). +* Fix possible error 'file_size: Operation not supported' in files' schema autodetection. [#34479](https://github.com/ClickHouse/ClickHouse/pull/34479) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixes possible race with table deletion. [#34416](https://github.com/ClickHouse/ClickHouse/pull/34416) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix possible error `Cannot convert column Function to mask` in short circuit function evaluation. Closes [#34171](https://github.com/ClickHouse/ClickHouse/issues/34171). [#34415](https://github.com/ClickHouse/ClickHouse/pull/34415) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix potential crash when doing schema inference from url source. Closes [#34147](https://github.com/ClickHouse/ClickHouse/issues/34147). [#34405](https://github.com/ClickHouse/ClickHouse/pull/34405) ([Kruglov Pavel](https://github.com/Avogar)). +* For UDFs access permissions were checked for database level instead of global level as it should be. Closes [#34281](https://github.com/ClickHouse/ClickHouse/issues/34281). [#34404](https://github.com/ClickHouse/ClickHouse/pull/34404) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix wrong engine syntax in result of `SHOW CREATE DATABASE` query for databases with engine `Memory`. This closes [#34335](https://github.com/ClickHouse/ClickHouse/issues/34335). [#34345](https://github.com/ClickHouse/ClickHouse/pull/34345) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fixed a couple of extremely rare race conditions that might lead to broken state of replication queue and "intersecting parts" error. [#34297](https://github.com/ClickHouse/ClickHouse/pull/34297) ([tavplubix](https://github.com/tavplubix)). +* Fix progress bar width. It was incorrectly rounded to integer number of characters. [#34275](https://github.com/ClickHouse/ClickHouse/pull/34275) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix current_user/current_address client information fields for inter-server communication (before this patch current_user/current_address will be preserved from the previous query). [#34263](https://github.com/ClickHouse/ClickHouse/pull/34263) ([Azat Khuzhin](https://github.com/azat)). +* Fix memory leak in case of some Exception during query processing with `optimize_aggregation_in_order=1`. [#34234](https://github.com/ClickHouse/ClickHouse/pull/34234) ([Azat Khuzhin](https://github.com/azat)). +* Fix metric `Query`, which shows the number of executing queries. In last several releases it was always 0. [#34224](https://github.com/ClickHouse/ClickHouse/pull/34224) ([Anton Popov](https://github.com/CurtizJ)). +* Fix schema inference for table runction `s3`. [#34186](https://github.com/ClickHouse/ClickHouse/pull/34186) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix rare and benign race condition in `HDFS`, `S3` and `URL` storage engines which can lead to additional connections. [#34172](https://github.com/ClickHouse/ClickHouse/pull/34172) ([alesapin](https://github.com/alesapin)). +* Fix bug which can rarely lead to error "Cannot read all data" while reading LowCardinality columns of MergeTree table engines family which stores data on remote file system like S3 (virtual filesystem over s3 is an experimental feature that is not ready for production). [#34139](https://github.com/ClickHouse/ClickHouse/pull/34139) ([alesapin](https://github.com/alesapin)). +* Fix inserts to distributed tables in case of a change of native protocol. The last change was in the version 22.1, so there may be some failures of inserts to distributed tables after upgrade to that version. [#34132](https://github.com/ClickHouse/ClickHouse/pull/34132) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible data race in `File` table engine that was introduced in [#33960](https://github.com/ClickHouse/ClickHouse/pull/33960). Closes [#34111](https://github.com/ClickHouse/ClickHouse/issues/34111). [#34113](https://github.com/ClickHouse/ClickHouse/pull/34113) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixed minor race condition that might cause "intersecting parts" error in extremely rare cases after ZooKeeper connection loss. [#34096](https://github.com/ClickHouse/ClickHouse/pull/34096) ([tavplubix](https://github.com/tavplubix)). +* Fix asynchronous inserts with `Native` format. [#34068](https://github.com/ClickHouse/ClickHouse/pull/34068) ([Anton Popov](https://github.com/CurtizJ)). +* Fix bug which lead to inability for server to start when both replicated access storage and keeper (embedded in clickhouse-server) are used. Introduced two settings for keeper socket timeout instead of settings from default user: `keeper_server.socket_receive_timeout_sec` and `keeper_server.socket_send_timeout_sec`. Fixes [#33973](https://github.com/ClickHouse/ClickHouse/issues/33973). [#33988](https://github.com/ClickHouse/ClickHouse/pull/33988) ([alesapin](https://github.com/alesapin)). +* Fix segfault while parsing ORC file with corrupted footer. Closes [#33797](https://github.com/ClickHouse/ClickHouse/issues/33797). [#33984](https://github.com/ClickHouse/ClickHouse/pull/33984) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix parsing IPv6 from query parameter (prepared statements) and fix IPv6 to string conversion. Closes [#33928](https://github.com/ClickHouse/ClickHouse/issues/33928). [#33971](https://github.com/ClickHouse/ClickHouse/pull/33971) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix crash while reading of nested tuples. Fixes [#33838](https://github.com/ClickHouse/ClickHouse/issues/33838). [#33956](https://github.com/ClickHouse/ClickHouse/pull/33956) ([Anton Popov](https://github.com/CurtizJ)). +* Fix usage of functions `array` and `tuple` with literal arguments in distributed queries. Previously it could lead to `Not found columns` exception. [#33938](https://github.com/ClickHouse/ClickHouse/pull/33938) ([Anton Popov](https://github.com/CurtizJ)). +* Aggregate function combinator `-If` did not correctly process `Nullable` filter argument. This closes [#27073](https://github.com/ClickHouse/ClickHouse/issues/27073). [#33920](https://github.com/ClickHouse/ClickHouse/pull/33920) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix potential race condition when doing remote disk read (virtual filesystem over s3 is an experimental feature that is not ready for production). [#33912](https://github.com/ClickHouse/ClickHouse/pull/33912) ([Amos Bird](https://github.com/amosbird)). +* Fix crash if SQL UDF is created with lambda with non identifier arguments. Closes [#33866](https://github.com/ClickHouse/ClickHouse/issues/33866). [#33868](https://github.com/ClickHouse/ClickHouse/pull/33868) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix usage of sparse columns (which can be enabled by experimental setting `ratio_of_defaults_for_sparse_serialization`). [#33849](https://github.com/ClickHouse/ClickHouse/pull/33849) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed `replica is not readonly` logical error on `SYSTEM RESTORE REPLICA` query when replica is actually readonly. Fixes [#33806](https://github.com/ClickHouse/ClickHouse/issues/33806). [#33847](https://github.com/ClickHouse/ClickHouse/pull/33847) ([tavplubix](https://github.com/tavplubix)). +* Fix memory leak in `clickhouse-keeper` in case of compression is used (default). [#33840](https://github.com/ClickHouse/ClickHouse/pull/33840) ([Azat Khuzhin](https://github.com/azat)). +* Fix index analysis with no common types available. [#33833](https://github.com/ClickHouse/ClickHouse/pull/33833) ([Amos Bird](https://github.com/amosbird)). +* Fix schema inference for `JSONEachRow` and `JSONCompactEachRow`. [#33830](https://github.com/ClickHouse/ClickHouse/pull/33830) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix usage of external dictionaries with `redis` source and large number of keys. [#33804](https://github.com/ClickHouse/ClickHouse/pull/33804) ([Anton Popov](https://github.com/CurtizJ)). +* Fix bug in client that led to 'Connection reset by peer' in server. Closes [#33309](https://github.com/ClickHouse/ClickHouse/issues/33309). [#33790](https://github.com/ClickHouse/ClickHouse/pull/33790) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix parsing query INSERT INTO ... VALUES SETTINGS ... (...), ... [#33776](https://github.com/ClickHouse/ClickHouse/pull/33776) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix bug of check table when creating data part with wide format and projection. [#33774](https://github.com/ClickHouse/ClickHouse/pull/33774) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Fix tiny race between count() and INSERT/merges/... in MergeTree (it is possible to return incorrect number of rows for SELECT with optimize_trivial_count_query). [#33753](https://github.com/ClickHouse/ClickHouse/pull/33753) ([Azat Khuzhin](https://github.com/azat)). +* Throw exception when directory listing request has failed in storage HDFS. [#33724](https://github.com/ClickHouse/ClickHouse/pull/33724) ([LiuNeng](https://github.com/liuneng1994)). +* Fix mutation when table contains projections. This fixes [#33010](https://github.com/ClickHouse/ClickHouse/issues/33010). This fixes [#33275](https://github.com/ClickHouse/ClickHouse/issues/33275). [#33679](https://github.com/ClickHouse/ClickHouse/pull/33679) ([Amos Bird](https://github.com/amosbird)). +* Correctly determine current database if `CREATE TEMPORARY TABLE AS SELECT` is queried inside a named HTTP session. This is a very rare use case. This closes [#8340](https://github.com/ClickHouse/ClickHouse/issues/8340). [#33676](https://github.com/ClickHouse/ClickHouse/pull/33676) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Allow some queries with sorting, LIMIT BY, ARRAY JOIN and lambda functions. This closes [#7462](https://github.com/ClickHouse/ClickHouse/issues/7462). [#33675](https://github.com/ClickHouse/ClickHouse/pull/33675) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix bug in "zero copy replication" (a feature that is under development and should not be used in production) which lead to data duplication in case of TTL move. Fixes [#33643](https://github.com/ClickHouse/ClickHouse/issues/33643). [#33642](https://github.com/ClickHouse/ClickHouse/pull/33642) ([alesapin](https://github.com/alesapin)). +* Fix `Chunk should have AggregatedChunkInfo in GroupingAggregatedTransform` (in case of `optimize_aggregation_in_order = 1`). [#33637](https://github.com/ClickHouse/ClickHouse/pull/33637) ([Azat Khuzhin](https://github.com/azat)). +* Fix error `Bad cast from type ... to DB::DataTypeArray` which may happen when table has `Nested` column with dots in name, and default value is generated for it (e.g. during insert, when column is not listed). Continuation of [#28762](https://github.com/ClickHouse/ClickHouse/issues/28762). [#33588](https://github.com/ClickHouse/ClickHouse/pull/33588) ([Alexey Pavlenko](https://github.com/alexeypavlenko)). +* Export into `lz4` files has been fixed. Closes [#31421](https://github.com/ClickHouse/ClickHouse/issues/31421). [#31862](https://github.com/ClickHouse/ClickHouse/pull/31862) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix potential crash if `group_by_overflow_mode` was set to `any` (approximate GROUP BY) and aggregation was performed by single column of type `LowCardinality`. [#34506](https://github.com/ClickHouse/ClickHouse/pull/34506) ([DR](https://github.com/freedomDR)). +* Fix inserting to temporary tables via gRPC client-server protocol. Fixes [#34347](https://github.com/ClickHouse/ClickHouse/issues/34347), issue `#2`. [#34364](https://github.com/ClickHouse/ClickHouse/pull/34364) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix issue [#19429](https://github.com/ClickHouse/ClickHouse/issues/19429). [#34225](https://github.com/ClickHouse/ClickHouse/pull/34225) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix issue [#18206](https://github.com/ClickHouse/ClickHouse/issues/18206). [#33977](https://github.com/ClickHouse/ClickHouse/pull/33977) ([Vitaly Baranov](https://github.com/vitlibar)). +* This PR allows using multiple LDAP storages in the same list of user directories. It worked earlier but was broken because LDAP tests are disabled (they are part of the testflows tests). [#33574](https://github.com/ClickHouse/ClickHouse/pull/33574) ([Vitaly Baranov](https://github.com/vitlibar)). + + +### ClickHouse release v22.1, 2022-01-18 + +#### Upgrade Notes + +* The functions `left` and `right` were previously implemented in parser and now full-featured. Distributed queries with `left` or `right` functions without aliases may throw exception if cluster contains different versions of clickhouse-server. If you are upgrading your cluster and encounter this error, you should finish upgrading your cluster to ensure all nodes have the same version. Also you can add aliases (`AS something`) to the columns in your queries to avoid this issue. [#33407](https://github.com/ClickHouse/ClickHouse/pull/33407) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Resource usage by scalar subqueries is fully accounted since this version. With this change, rows read in scalar subqueries are now reported in the query_log. If the scalar subquery is cached (repeated or called for several rows) the rows read are only counted once. This change allows KILLing queries and reporting progress while they are executing scalar subqueries. [#32271](https://github.com/ClickHouse/ClickHouse/pull/32271) ([Raúl Marín](https://github.com/Algunenano)). + +#### New Feature + +* Implement data schema inference for input formats. Allow to skip structure (or write just `auto`) in table functions `file`, `url`, `s3`, `hdfs` and in parameters of `clickhouse-local` . Allow to skip structure in create query for table engines `File`, `HDFS`, `S3`, `URL`, `Merge`, `Buffer`, `Distributed` and `ReplicatedMergeTree` (if we add new replicas). [#32455](https://github.com/ClickHouse/ClickHouse/pull/32455) ([Kruglov Pavel](https://github.com/Avogar)). +* Detect format by file extension in `file`/`hdfs`/`s3`/`url` table functions and `HDFS`/`S3`/`URL` table engines and also for `SELECT INTO OUTFILE` and `INSERT FROM INFILE` [#33565](https://github.com/ClickHouse/ClickHouse/pull/33565) ([Kruglov Pavel](https://github.com/Avogar)). Close [#30918](https://github.com/ClickHouse/ClickHouse/issues/30918). [#33443](https://github.com/ClickHouse/ClickHouse/pull/33443) ([OnePiece](https://github.com/zhongyuankai)). +* A tool for collecting diagnostics data if you need support. [#33175](https://github.com/ClickHouse/ClickHouse/pull/33175) ([Alexander Burmak](https://github.com/Alex-Burmak)). +* Automatic cluster discovery via Zoo/Keeper. It allows to add replicas to the cluster without changing configuration on every server. [#31442](https://github.com/ClickHouse/ClickHouse/pull/31442) ([vdimir](https://github.com/vdimir)). +* Implement hive table engine to access apache hive from clickhouse. This implements: [#29245](https://github.com/ClickHouse/ClickHouse/issues/29245). [#31104](https://github.com/ClickHouse/ClickHouse/pull/31104) ([taiyang-li](https://github.com/taiyang-li)). +* Add aggregate functions `cramersV`, `cramersVBiasCorrected`, `theilsU` and `contingency`. These functions calculate dependency (measure of association) between categorical values. All these functions are using cross-tab (histogram on pairs) for implementation. You can imagine it like a correlation coefficient but for any discrete values (not necessary numbers). [#33366](https://github.com/ClickHouse/ClickHouse/pull/33366) ([alexey-milovidov](https://github.com/alexey-milovidov)). Initial implementation by [Vanyok-All-is-OK](https://github.com/Vanyok-All-is-OK) and [antikvist](https://github.com/antikvist). +* Added table function `hdfsCluster` which allows processing files from HDFS in parallel from many nodes in a specified cluster, similarly to `s3Cluster`. [#32400](https://github.com/ClickHouse/ClickHouse/pull/32400) ([Zhichang Yu](https://github.com/yuzhichang)). +* Adding support for disks backed by Azure Blob Storage, in a similar way it has been done for disks backed by AWS S3. [#31505](https://github.com/ClickHouse/ClickHouse/pull/31505) ([Jakub Kuklis](https://github.com/jkuklis)). +* Allow `COMMENT` in `CREATE VIEW` (for all VIEW kinds). [#31062](https://github.com/ClickHouse/ClickHouse/pull/31062) ([Vasily Nemkov](https://github.com/Enmk)). +* Dynamically reinitialize listening ports and protocols when configuration changes. [#30549](https://github.com/ClickHouse/ClickHouse/pull/30549) ([Kevin Michel](https://github.com/kmichel-aiven)). +* Added `left`, `right`, `leftUTF8`, `rightUTF8` functions. Fix error in implementation of `substringUTF8` function with negative offset (offset from the end of string). [#33407](https://github.com/ClickHouse/ClickHouse/pull/33407) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add new functions for `H3` coordinate system: `h3HexAreaKm2`, `h3CellAreaM2`, `h3CellAreaRads2`. [#33479](https://github.com/ClickHouse/ClickHouse/pull/33479) ([Bharat Nallan](https://github.com/bharatnc)). +* Add `MONTHNAME` function. [#33436](https://github.com/ClickHouse/ClickHouse/pull/33436) ([usurai](https://github.com/usurai)). +* Added function `arrayLast`. Closes [#33390](https://github.com/ClickHouse/ClickHouse/issues/33390). [#33415](https://github.com/ClickHouse/ClickHouse/pull/33415) Added function `arrayLastIndex`. [#33465](https://github.com/ClickHouse/ClickHouse/pull/33465) ([Maksim Kita](https://github.com/kitaisreal)). +* Add function `decodeURLFormComponent` slightly different to `decodeURLComponent`. Close [#10298](https://github.com/ClickHouse/ClickHouse/issues/10298). [#33451](https://github.com/ClickHouse/ClickHouse/pull/33451) ([SuperDJY](https://github.com/cmsxbc)). +* Allow to split `GraphiteMergeTree` rollup rules for plain/tagged metrics (optional rule_type field). [#33494](https://github.com/ClickHouse/ClickHouse/pull/33494) ([Michail Safronov](https://github.com/msaf1980)). + + +#### Performance Improvement + +* Support moving conditions to `PREWHERE` (setting `optimize_move_to_prewhere`) for tables of `Merge` engine if its all underlying tables supports `PREWHERE`. [#33300](https://github.com/ClickHouse/ClickHouse/pull/33300) ([Anton Popov](https://github.com/CurtizJ)). +* More efficient handling of globs for URL storage. Now you can easily query million URLs in parallel with retries. Closes [#32866](https://github.com/ClickHouse/ClickHouse/issues/32866). [#32907](https://github.com/ClickHouse/ClickHouse/pull/32907) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Avoid exponential backtracking in parser. This closes [#20158](https://github.com/ClickHouse/ClickHouse/issues/20158). [#33481](https://github.com/ClickHouse/ClickHouse/pull/33481) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Abuse of `untuple` function was leading to exponential complexity of query analysis (found by fuzzer). This closes [#33297](https://github.com/ClickHouse/ClickHouse/issues/33297). [#33445](https://github.com/ClickHouse/ClickHouse/pull/33445) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Reduce allocated memory for dictionaries with string attributes. [#33466](https://github.com/ClickHouse/ClickHouse/pull/33466) ([Maksim Kita](https://github.com/kitaisreal)). +* Slight performance improvement of `reinterpret` function. [#32587](https://github.com/ClickHouse/ClickHouse/pull/32587) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Non significant change. In extremely rare cases when data part is lost on every replica, after merging of some data parts, the subsequent queries may skip less amount of partitions during partition pruning. This hardly affects anything. [#32220](https://github.com/ClickHouse/ClickHouse/pull/32220) ([Azat Khuzhin](https://github.com/azat)). +* Improve `clickhouse-keeper` writing performance by optimization the size calculation logic. [#32366](https://github.com/ClickHouse/ClickHouse/pull/32366) ([zhanglistar](https://github.com/zhanglistar)). +* Optimize single part projection materialization. This closes [#31669](https://github.com/ClickHouse/ClickHouse/issues/31669). [#31885](https://github.com/ClickHouse/ClickHouse/pull/31885) ([Amos Bird](https://github.com/amosbird)). +* Improve query performance of system tables. [#33312](https://github.com/ClickHouse/ClickHouse/pull/33312) ([OnePiece](https://github.com/zhongyuankai)). +* Optimize selecting of MergeTree parts that can be moved between volumes. [#33225](https://github.com/ClickHouse/ClickHouse/pull/33225) ([OnePiece](https://github.com/zhongyuankai)). +* Fix `sparse_hashed` dict performance with sequential keys (wrong hash function). [#32536](https://github.com/ClickHouse/ClickHouse/pull/32536) ([Azat Khuzhin](https://github.com/azat)). + + +#### Experimental Feature + +* Parallel reading from multiple replicas within a shard during distributed query without using sample key. To enable this, set `allow_experimental_parallel_reading_from_replicas = 1` and `max_parallel_replicas` to any number. This closes [#26748](https://github.com/ClickHouse/ClickHouse/issues/26748). [#29279](https://github.com/ClickHouse/ClickHouse/pull/29279) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Implemented sparse serialization. It can reduce usage of disk space and improve performance of some queries for columns, which contain a lot of default (zero) values. It can be enabled by setting `ratio_for_sparse_serialization`. Sparse serialization will be chosen dynamically for column, if it has ratio of number of default values to number of all values above that threshold. Serialization (default or sparse) will be fixed for every column in part, but may varies between parts. [#22535](https://github.com/ClickHouse/ClickHouse/pull/22535) ([Anton Popov](https://github.com/CurtizJ)). +* Add "TABLE OVERRIDE" feature for customizing MaterializedMySQL table schemas. [#32325](https://github.com/ClickHouse/ClickHouse/pull/32325) ([Stig Bakken](https://github.com/stigsb)). +* Add `EXPLAIN TABLE OVERRIDE` query. [#32836](https://github.com/ClickHouse/ClickHouse/pull/32836) ([Stig Bakken](https://github.com/stigsb)). +* Support TABLE OVERRIDE clause for MaterializedPostgreSQL. RFC: [#31480](https://github.com/ClickHouse/ClickHouse/issues/31480). [#32749](https://github.com/ClickHouse/ClickHouse/pull/32749) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Change ZooKeeper path for zero-copy marks for shared data. Note that "zero-copy replication" is non-production feature (in early stages of development) that you shouldn't use anyway. But in case if you have used it, let you keep in mind this change. [#32061](https://github.com/ClickHouse/ClickHouse/pull/32061) ([ianton-ru](https://github.com/ianton-ru)). +* Events clause support for WINDOW VIEW watch query. [#32607](https://github.com/ClickHouse/ClickHouse/pull/32607) ([vxider](https://github.com/Vxider)). +* Fix ACL with explicit digit hash in `clickhouse-keeper`: now the behavior consistent with ZooKeeper and generated digest is always accepted. [#33249](https://github.com/ClickHouse/ClickHouse/pull/33249) ([å°è·¯](https://github.com/nicelulu)). [#33246](https://github.com/ClickHouse/ClickHouse/pull/33246). +* Fix unexpected projection removal when detaching parts. [#32067](https://github.com/ClickHouse/ClickHouse/pull/32067) ([Amos Bird](https://github.com/amosbird)). + + +#### Improvement + +* Now date time conversion functions that generates time before `1970-01-01 00:00:00` will be saturated to zero instead of overflow. [#29953](https://github.com/ClickHouse/ClickHouse/pull/29953) ([Amos Bird](https://github.com/amosbird)). It also fixes a bug in index analysis if date truncation function would yield result before the Unix epoch. +* Always display resource usage (total CPU usage, total RAM usage and max RAM usage per host) in client. [#33271](https://github.com/ClickHouse/ClickHouse/pull/33271) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve `Bool` type serialization and deserialization, check the range of values. [#32984](https://github.com/ClickHouse/ClickHouse/pull/32984) ([Kruglov Pavel](https://github.com/Avogar)). +* If an invalid setting is defined using the `SET` query or using the query parameters in the HTTP request, error message will contain suggestions that are similar to the invalid setting string (if any exists). [#32946](https://github.com/ClickHouse/ClickHouse/pull/32946) ([Antonio Andelic](https://github.com/antonio2368)). +* Support hints for mistyped setting names for clickhouse-client and clickhouse-local. Closes [#32237](https://github.com/ClickHouse/ClickHouse/issues/32237). [#32841](https://github.com/ClickHouse/ClickHouse/pull/32841) ([凌涛](https://github.com/lingtaolf)). +* Allow to use virtual columns in Materialized Views. Close [#11210](https://github.com/ClickHouse/ClickHouse/issues/11210). [#33482](https://github.com/ClickHouse/ClickHouse/pull/33482) ([OnePiece](https://github.com/zhongyuankai)). +* Add config to disable IPv6 in clickhouse-keeper if needed. This close [#33381](https://github.com/ClickHouse/ClickHouse/issues/33381). [#33450](https://github.com/ClickHouse/ClickHouse/pull/33450) ([Wu Xueyang](https://github.com/wuxueyang96)). +* Add more info to `system.build_options` about current git revision. [#33431](https://github.com/ClickHouse/ClickHouse/pull/33431) ([taiyang-li](https://github.com/taiyang-li)). +* `clickhouse-local`: track memory under `--max_memory_usage_in_client` option. [#33341](https://github.com/ClickHouse/ClickHouse/pull/33341) ([Azat Khuzhin](https://github.com/azat)). +* Allow negative intervals in function `intervalLengthSum`. Their length will be added as well. This closes [#33323](https://github.com/ClickHouse/ClickHouse/issues/33323). [#33335](https://github.com/ClickHouse/ClickHouse/pull/33335) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* `LineAsString` can be used as output format. This closes [#30919](https://github.com/ClickHouse/ClickHouse/issues/30919). [#33331](https://github.com/ClickHouse/ClickHouse/pull/33331) ([Sergei Trifonov](https://github.com/serxa)). +* Support `` in cluster configuration, as an alternative form of `1`. Close [#33270](https://github.com/ClickHouse/ClickHouse/issues/33270). [#33330](https://github.com/ClickHouse/ClickHouse/pull/33330) ([SuperDJY](https://github.com/cmsxbc)). +* Pressing Ctrl+C twice will terminate `clickhouse-benchmark` immediately without waiting for in-flight queries. This closes [#32586](https://github.com/ClickHouse/ClickHouse/issues/32586). [#33303](https://github.com/ClickHouse/ClickHouse/pull/33303) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Support Unix timestamp with milliseconds in `parseDateTimeBestEffort` function. [#33276](https://github.com/ClickHouse/ClickHouse/pull/33276) ([Ben](https://github.com/benbiti)). +* Allow to cancel query while reading data from external table in the formats: `Arrow` / `Parquet` / `ORC` - it failed to be cancelled it case of big files and setting input_format_allow_seeks as false. Closes [#29678](https://github.com/ClickHouse/ClickHouse/issues/29678). [#33238](https://github.com/ClickHouse/ClickHouse/pull/33238) ([Kseniia Sumarokova](https://github.com/kssenii)). +* If table engine supports `SETTINGS` clause, allow to pass the settings as key-value or via config. Add this support for MySQL. [#33231](https://github.com/ClickHouse/ClickHouse/pull/33231) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Correctly prevent Nullable primary keys if necessary. This is for [#32780](https://github.com/ClickHouse/ClickHouse/issues/32780). [#33218](https://github.com/ClickHouse/ClickHouse/pull/33218) ([Amos Bird](https://github.com/amosbird)). +* Add retry for `PostgreSQL` connections in case nothing has been fetched yet. Closes [#33199](https://github.com/ClickHouse/ClickHouse/issues/33199). [#33209](https://github.com/ClickHouse/ClickHouse/pull/33209) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Validate config keys for external dictionaries. [#33095](https://github.com/ClickHouse/ClickHouse/issues/33095#issuecomment-1000577517). [#33130](https://github.com/ClickHouse/ClickHouse/pull/33130) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Send profile info inside `clickhouse-local`. Closes [#33093](https://github.com/ClickHouse/ClickHouse/issues/33093). [#33097](https://github.com/ClickHouse/ClickHouse/pull/33097) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Short circuit evaluation: support for function `throwIf`. Closes [#32969](https://github.com/ClickHouse/ClickHouse/issues/32969). [#32973](https://github.com/ClickHouse/ClickHouse/pull/32973) ([Maksim Kita](https://github.com/kitaisreal)). +* (This only happens in unofficial builds). Fixed segfault when inserting data into compressed Decimal, String, FixedString and Array columns. This closes [#32939](https://github.com/ClickHouse/ClickHouse/issues/32939). [#32940](https://github.com/ClickHouse/ClickHouse/pull/32940) ([N. Kolotov](https://github.com/nkolotov)). +* Added support for specifying subquery as SQL user defined function. Example: `CREATE FUNCTION test AS () -> (SELECT 1)`. Closes [#30755](https://github.com/ClickHouse/ClickHouse/issues/30755). [#32758](https://github.com/ClickHouse/ClickHouse/pull/32758) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve gRPC compression support for [#28671](https://github.com/ClickHouse/ClickHouse/issues/28671). [#32747](https://github.com/ClickHouse/ClickHouse/pull/32747) ([Vitaly Baranov](https://github.com/vitlibar)). +* Flush all In-Memory data parts when WAL is not enabled while shutdown server or detaching table. [#32742](https://github.com/ClickHouse/ClickHouse/pull/32742) ([nauta](https://github.com/nautaa)). +* Allow to control connection timeouts for MySQL (previously was supported only for dictionary source). Closes [#16669](https://github.com/ClickHouse/ClickHouse/issues/16669). Previously default connect_timeout was rather small, now it is configurable. [#32734](https://github.com/ClickHouse/ClickHouse/pull/32734) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support `authSource` option for storage `MongoDB`. Closes [#32594](https://github.com/ClickHouse/ClickHouse/issues/32594). [#32702](https://github.com/ClickHouse/ClickHouse/pull/32702) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support `Date32` type in `genarateRandom` table function. [#32643](https://github.com/ClickHouse/ClickHouse/pull/32643) ([nauta](https://github.com/nautaa)). +* Add settings `max_concurrent_select_queries` and `max_concurrent_insert_queries` for control concurrent queries by query kind. Close [#3575](https://github.com/ClickHouse/ClickHouse/issues/3575). [#32609](https://github.com/ClickHouse/ClickHouse/pull/32609) ([SuperDJY](https://github.com/cmsxbc)). +* Improve handling nested structures with missing columns while reading data in `Protobuf` format. Follow-up to https://github.com/ClickHouse/ClickHouse/pull/31988. [#32531](https://github.com/ClickHouse/ClickHouse/pull/32531) ([Vitaly Baranov](https://github.com/vitlibar)). +* Allow empty credentials for `MongoDB` engine. Closes [#26267](https://github.com/ClickHouse/ClickHouse/issues/26267). [#32460](https://github.com/ClickHouse/ClickHouse/pull/32460) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Disable some optimizations for window functions that may lead to exceptions. Closes [#31535](https://github.com/ClickHouse/ClickHouse/issues/31535). Closes [#31620](https://github.com/ClickHouse/ClickHouse/issues/31620). [#32453](https://github.com/ClickHouse/ClickHouse/pull/32453) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Allows to connect to MongoDB 5.0. Closes [#31483](https://github.com/ClickHouse/ClickHouse/issues/31483),. [#32416](https://github.com/ClickHouse/ClickHouse/pull/32416) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Enable comparison between `Decimal` and `Float`. Closes [#22626](https://github.com/ClickHouse/ClickHouse/issues/22626). [#31966](https://github.com/ClickHouse/ClickHouse/pull/31966) ([flynn](https://github.com/ucasFL)). +* Added settings `command_read_timeout`, `command_write_timeout` for `StorageExecutable`, `StorageExecutablePool`, `ExecutableDictionary`, `ExecutablePoolDictionary`, `ExecutableUserDefinedFunctions`. Setting `command_read_timeout` controls timeout for reading data from command stdout in milliseconds. Setting `command_write_timeout` timeout for writing data to command stdin in milliseconds. Added settings `command_termination_timeout` for `ExecutableUserDefinedFunction`, `ExecutableDictionary`, `StorageExecutable`. Added setting `execute_direct` for `ExecutableUserDefinedFunction`, by default true. Added setting `execute_direct` for `ExecutableDictionary`, `ExecutablePoolDictionary`, by default false. [#30957](https://github.com/ClickHouse/ClickHouse/pull/30957) ([Maksim Kita](https://github.com/kitaisreal)). +* Bitmap aggregate functions will give correct result for out of range argument instead of wraparound. [#33127](https://github.com/ClickHouse/ClickHouse/pull/33127) ([DR](https://github.com/freedomDR)). +* Fix parsing incorrect queries with `FROM INFILE` statement. [#33521](https://github.com/ClickHouse/ClickHouse/pull/33521) ([Kruglov Pavel](https://github.com/Avogar)). +* Don't allow to write into `S3` if path contains globs. [#33142](https://github.com/ClickHouse/ClickHouse/pull/33142) ([Kruglov Pavel](https://github.com/Avogar)). +* `--echo` option was not used by `clickhouse-client` in batch mode with single query. [#32843](https://github.com/ClickHouse/ClickHouse/pull/32843) ([N. Kolotov](https://github.com/nkolotov)). +* Use `--database` option for clickhouse-local. [#32797](https://github.com/ClickHouse/ClickHouse/pull/32797) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix surprisingly bad code in SQL ordinary function `file`. Now it supports symlinks. [#32640](https://github.com/ClickHouse/ClickHouse/pull/32640) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Updating `modification_time` for data part in `system.parts` after part movement [#32964](https://github.com/ClickHouse/ClickHouse/issues/32964). [#32965](https://github.com/ClickHouse/ClickHouse/pull/32965) ([save-my-heart](https://github.com/save-my-heart)). +* Potential issue, cannot be exploited: integer overflow may happen in array resize. [#33024](https://github.com/ClickHouse/ClickHouse/pull/33024) ([varadarajkumar](https://github.com/varadarajkumar)). + + +#### Build/Testing/Packaging Improvement + +* Add packages, functional tests and Docker builds for AArch64 (ARM) version of ClickHouse. [#32911](https://github.com/ClickHouse/ClickHouse/pull/32911) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). [#32415](https://github.com/ClickHouse/ClickHouse/pull/32415) +* Prepare ClickHouse to be built with musl-libc. It is not enabled by default. [#33134](https://github.com/ClickHouse/ClickHouse/pull/33134) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Make installation script working on FreeBSD. This closes [#33384](https://github.com/ClickHouse/ClickHouse/issues/33384). [#33418](https://github.com/ClickHouse/ClickHouse/pull/33418) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add `actionlint` for GitHub Actions workflows and verify workflow files via `act --list` to check the correct workflow syntax. [#33612](https://github.com/ClickHouse/ClickHouse/pull/33612) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add more tests for the nullable primary key feature. Add more tests with different types and merge tree kinds, plus randomly generated data. [#33228](https://github.com/ClickHouse/ClickHouse/pull/33228) ([Amos Bird](https://github.com/amosbird)). +* Add a simple tool to visualize flaky tests in web browser. [#33185](https://github.com/ClickHouse/ClickHouse/pull/33185) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Enable hermetic build for shared builds. This is mainly for developers. [#32968](https://github.com/ClickHouse/ClickHouse/pull/32968) ([Amos Bird](https://github.com/amosbird)). +* Update `libc++` and `libc++abi` to the latest. [#32484](https://github.com/ClickHouse/ClickHouse/pull/32484) ([Raúl Marín](https://github.com/Algunenano)). +* Added integration test for external .NET client ([ClickHouse.Client](https://github.com/DarkWanderer/ClickHouse.Client)). [#23230](https://github.com/ClickHouse/ClickHouse/pull/23230) ([Oleg V. Kozlyuk](https://github.com/DarkWanderer)). +* Inject git information into clickhouse binary file. So we can get source code revision easily from clickhouse binary file. [#33124](https://github.com/ClickHouse/ClickHouse/pull/33124) ([taiyang-li](https://github.com/taiyang-li)). +* Remove obsolete code from ConfigProcessor. Yandex specific code is not used anymore. The code contained one minor defect. This defect was reported by [Mallik Hassan](https://github.com/SadiHassan) in [#33032](https://github.com/ClickHouse/ClickHouse/issues/33032). This closes [#33032](https://github.com/ClickHouse/ClickHouse/issues/33032). [#33026](https://github.com/ClickHouse/ClickHouse/pull/33026) ([alexey-milovidov](https://github.com/alexey-milovidov)). + + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Several fixes for format parsing. This is relevant if `clickhouse-server` is open for write access to adversary. Specifically crafted input data for `Native` format may lead to reading uninitialized memory or crash. This is relevant if `clickhouse-server` is open for write access to adversary. [#33050](https://github.com/ClickHouse/ClickHouse/pull/33050) ([Heena Bansal](https://github.com/HeenaBansal2009)). Fixed Apache Avro Union type index out of boundary issue in Apache Avro binary format. [#33022](https://github.com/ClickHouse/ClickHouse/pull/33022) ([Harry Lee](https://github.com/HarryLeeIBM)). Fix null pointer dereference in `LowCardinality` data when deserializing `LowCardinality` data in the Native format. [#33021](https://github.com/ClickHouse/ClickHouse/pull/33021) ([Harry Lee](https://github.com/HarryLeeIBM)). +* ClickHouse Keeper handler will correctly remove operation when response sent. [#32988](https://github.com/ClickHouse/ClickHouse/pull/32988) ([JackyWoo](https://github.com/JackyWoo)). +* Potential off-by-one miscalculation of quotas: quota limit was not reached, but the limit was exceeded. This fixes [#31174](https://github.com/ClickHouse/ClickHouse/issues/31174). [#31656](https://github.com/ClickHouse/ClickHouse/pull/31656) ([sunny](https://github.com/sunny19930321)). +* Fixed CASTing from String to IPv4 or IPv6 and back. Fixed error message in case of failed conversion. [#29224](https://github.com/ClickHouse/ClickHouse/pull/29224) ([Dmitry Novik](https://github.com/novikd)) [#27914](https://github.com/ClickHouse/ClickHouse/pull/27914) ([Vasily Nemkov](https://github.com/Enmk)). +* Fixed an exception like `Unknown aggregate function nothing` during an execution on a remote server. This fixes [#16689](https://github.com/ClickHouse/ClickHouse/issues/16689). [#26074](https://github.com/ClickHouse/ClickHouse/pull/26074) ([hexiaoting](https://github.com/hexiaoting)). +* Fix wrong database for JOIN without explicit database in distributed queries (Fixes: [#10471](https://github.com/ClickHouse/ClickHouse/issues/10471)). [#33611](https://github.com/ClickHouse/ClickHouse/pull/33611) ([Azat Khuzhin](https://github.com/azat)). +* Fix segfault in Apache `Avro` format that appears after the second insert into file. [#33566](https://github.com/ClickHouse/ClickHouse/pull/33566) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix segfault in Apache `Arrow` format if schema contains `Dictionary` type. Closes [#33507](https://github.com/ClickHouse/ClickHouse/issues/33507). [#33529](https://github.com/ClickHouse/ClickHouse/pull/33529) ([Kruglov Pavel](https://github.com/Avogar)). +* Out of band `offset` and `limit` settings may be applied incorrectly for views. Close [#33289](https://github.com/ClickHouse/ClickHouse/issues/33289) [#33518](https://github.com/ClickHouse/ClickHouse/pull/33518) ([hexiaoting](https://github.com/hexiaoting)). +* Fix an exception `Block structure mismatch` which may happen during insertion into table with default nested `LowCardinality` column. Fixes [#33028](https://github.com/ClickHouse/ClickHouse/issues/33028). [#33504](https://github.com/ClickHouse/ClickHouse/pull/33504) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix dictionary expressions for `range_hashed` range min and range max attributes when created using DDL. Closes [#30809](https://github.com/ClickHouse/ClickHouse/issues/30809). [#33478](https://github.com/ClickHouse/ClickHouse/pull/33478) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix possible use-after-free for INSERT into Materialized View with concurrent DROP ([Azat Khuzhin](https://github.com/azat)). +* Do not try to read pass EOF (to workaround for a bug in the Linux kernel), this bug can be reproduced on kernels (3.14..5.9), and requires `index_granularity_bytes=0` (i.e. turn off adaptive index granularity). [#33372](https://github.com/ClickHouse/ClickHouse/pull/33372) ([Azat Khuzhin](https://github.com/azat)). +* The commands `SYSTEM SUSPEND` and `SYSTEM ... THREAD FUZZER` missed access control. It is fixed. Author: Kevin Michel. [#33333](https://github.com/ClickHouse/ClickHouse/pull/33333) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix when `COMMENT` for dictionaries does not appear in `system.tables`, `system.dictionaries`. Allow to modify the comment for `Dictionary` engine. Closes [#33251](https://github.com/ClickHouse/ClickHouse/issues/33251). [#33261](https://github.com/ClickHouse/ClickHouse/pull/33261) ([Maksim Kita](https://github.com/kitaisreal)). +* Add asynchronous inserts (with enabled setting `async_insert`) to query log. Previously such queries didn't appear in the query log. [#33239](https://github.com/ClickHouse/ClickHouse/pull/33239) ([Anton Popov](https://github.com/CurtizJ)). +* Fix sending `WHERE 1 = 0` expressions for external databases query. Closes [#33152](https://github.com/ClickHouse/ClickHouse/issues/33152). [#33214](https://github.com/ClickHouse/ClickHouse/pull/33214) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix DDL validation for MaterializedPostgreSQL. Fix setting `materialized_postgresql_allow_automatic_update`. Closes [#29535](https://github.com/ClickHouse/ClickHouse/issues/29535). [#33200](https://github.com/ClickHouse/ClickHouse/pull/33200) ([Kseniia Sumarokova](https://github.com/kssenii)). Make sure unused replication slots are always removed. Found in [#26952](https://github.com/ClickHouse/ClickHouse/issues/26952). [#33187](https://github.com/ClickHouse/ClickHouse/pull/33187) ([Kseniia Sumarokova](https://github.com/kssenii)). Fix MaterializedPostreSQL detach/attach (removing / adding to replication) tables with non-default schema. Found in [#29535](https://github.com/ClickHouse/ClickHouse/issues/29535). [#33179](https://github.com/ClickHouse/ClickHouse/pull/33179) ([Kseniia Sumarokova](https://github.com/kssenii)). Fix DROP MaterializedPostgreSQL database. [#33468](https://github.com/ClickHouse/ClickHouse/pull/33468) ([Kseniia Sumarokova](https://github.com/kssenii)). +* The metric `StorageBufferBytes` sometimes was miscalculated. [#33159](https://github.com/ClickHouse/ClickHouse/pull/33159) ([xuyatian](https://github.com/xuyatian)). +* Fix error `Invalid version for SerializationLowCardinality key column` in case of reading from `LowCardinality` column with `local_filesystem_read_prefetch` or `remote_filesystem_read_prefetch` enabled. [#33046](https://github.com/ClickHouse/ClickHouse/pull/33046) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix `s3` table function reading empty file. Closes [#33008](https://github.com/ClickHouse/ClickHouse/issues/33008). [#33037](https://github.com/ClickHouse/ClickHouse/pull/33037) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix Context leak in case of cancel_http_readonly_queries_on_client_close (i.e. leaking of external tables that had been uploaded the the server and other resources). [#32982](https://github.com/ClickHouse/ClickHouse/pull/32982) ([Azat Khuzhin](https://github.com/azat)). +* Fix wrong tuple output in `CSV` format in case of custom csv delimiter. [#32981](https://github.com/ClickHouse/ClickHouse/pull/32981) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix HDFS URL check that didn't allow using HA namenode address. Bug was introduced in https://github.com/ClickHouse/ClickHouse/pull/31042. [#32976](https://github.com/ClickHouse/ClickHouse/pull/32976) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix throwing exception like positional argument out of bounds for non-positional arguments. Closes [#31173](https://github.com/ClickHouse/ClickHouse/issues/31173)#event-5789668239. [#32961](https://github.com/ClickHouse/ClickHouse/pull/32961) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix UB in case of unexpected EOF during filling a set from HTTP query (i.e. if the client interrupted in the middle, i.e. `timeout 0.15s curl -Ss -F 's=@t.csv;' 'http://127.0.0.1:8123/?s_structure=key+Int&query=SELECT+dummy+IN+s'` and with large enough `t.csv`). [#32955](https://github.com/ClickHouse/ClickHouse/pull/32955) ([Azat Khuzhin](https://github.com/azat)). +* Fix a regression in `replaceRegexpAll` function. The function worked incorrectly when matched substring was empty. This closes [#32777](https://github.com/ClickHouse/ClickHouse/issues/32777). This closes [#30245](https://github.com/ClickHouse/ClickHouse/issues/30245). [#32945](https://github.com/ClickHouse/ClickHouse/pull/32945) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix `ORC` format stripe reading. [#32929](https://github.com/ClickHouse/ClickHouse/pull/32929) ([kreuzerkrieg](https://github.com/kreuzerkrieg)). +* `topKWeightedState` failed for some input types. [#32487](https://github.com/ClickHouse/ClickHouse/issues/32487). [#32914](https://github.com/ClickHouse/ClickHouse/pull/32914) ([vdimir](https://github.com/vdimir)). +* Fix exception `Single chunk is expected from view inner query (LOGICAL_ERROR)` in materialized view. Fixes [#31419](https://github.com/ClickHouse/ClickHouse/issues/31419). [#32862](https://github.com/ClickHouse/ClickHouse/pull/32862) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix optimization with lazy seek for async reads from remote filesystems. Closes [#32803](https://github.com/ClickHouse/ClickHouse/issues/32803). [#32835](https://github.com/ClickHouse/ClickHouse/pull/32835) ([Kseniia Sumarokova](https://github.com/kssenii)). +* `MergeTree` table engine might silently skip some mutations if there are too many running mutations or in case of high memory consumption, it's fixed. Fixes [#17882](https://github.com/ClickHouse/ClickHouse/issues/17882). [#32814](https://github.com/ClickHouse/ClickHouse/pull/32814) ([tavplubix](https://github.com/tavplubix)). +* Avoid reusing the scalar subquery cache when processing MV blocks. This fixes a bug when the scalar query reference the source table but it means that all subscalar queries in the MV definition will be calculated for each block. [#32811](https://github.com/ClickHouse/ClickHouse/pull/32811) ([Raúl Marín](https://github.com/Algunenano)). +* Server might fail to start if database with `MySQL` engine cannot connect to MySQL server, it's fixed. Fixes [#14441](https://github.com/ClickHouse/ClickHouse/issues/14441). [#32802](https://github.com/ClickHouse/ClickHouse/pull/32802) ([tavplubix](https://github.com/tavplubix)). +* Fix crash when used `fuzzBits` function, close [#32737](https://github.com/ClickHouse/ClickHouse/issues/32737). [#32755](https://github.com/ClickHouse/ClickHouse/pull/32755) ([SuperDJY](https://github.com/cmsxbc)). +* Fix error `Column is not under aggregate function` in case of MV with `GROUP BY (list of columns)` (which is pared as `GROUP BY tuple(...)`) over `Kafka`/`RabbitMQ`. Fixes [#32668](https://github.com/ClickHouse/ClickHouse/issues/32668) and [#32744](https://github.com/ClickHouse/ClickHouse/issues/32744). [#32751](https://github.com/ClickHouse/ClickHouse/pull/32751) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix `ALTER TABLE ... MATERIALIZE TTL` query with `TTL ... DELETE WHERE ...` and `TTL ... GROUP BY ...` modes. [#32695](https://github.com/ClickHouse/ClickHouse/pull/32695) ([Anton Popov](https://github.com/CurtizJ)). +* Fix `optimize_read_in_order` optimization in case when table engine is `Distributed` or `Merge` and its underlying `MergeTree` tables have monotonous function in prefix of sorting key. [#32670](https://github.com/ClickHouse/ClickHouse/pull/32670) ([Anton Popov](https://github.com/CurtizJ)). +* Fix LOGICAL_ERROR exception when the target of a materialized view is a JOIN or a SET table. [#32669](https://github.com/ClickHouse/ClickHouse/pull/32669) ([Raúl Marín](https://github.com/Algunenano)). +* Inserting into S3 with multipart upload to Google Cloud Storage may trigger abort. [#32504](https://github.com/ClickHouse/ClickHouse/issues/32504). [#32649](https://github.com/ClickHouse/ClickHouse/pull/32649) ([vdimir](https://github.com/vdimir)). +* Fix possible exception at `RabbitMQ` storage startup by delaying channel creation. [#32584](https://github.com/ClickHouse/ClickHouse/pull/32584) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix table lifetime (i.e. possible use-after-free) in case of parallel DROP TABLE and INSERT. [#32572](https://github.com/ClickHouse/ClickHouse/pull/32572) ([Azat Khuzhin](https://github.com/azat)). +* Fix async inserts with formats `CustomSeparated`, `Template`, `Regexp`, `MsgPack` and `JSONAsString`. Previousely the async inserts with these formats didn't read any data. [#32530](https://github.com/ClickHouse/ClickHouse/pull/32530) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix `groupBitmapAnd` function on distributed table. [#32529](https://github.com/ClickHouse/ClickHouse/pull/32529) ([minhthucdao](https://github.com/dmthuc)). +* Fix crash in JOIN found by fuzzer, close [#32458](https://github.com/ClickHouse/ClickHouse/issues/32458). [#32508](https://github.com/ClickHouse/ClickHouse/pull/32508) ([vdimir](https://github.com/vdimir)). +* Proper handling of the case with Apache Arrow column duplication. [#32507](https://github.com/ClickHouse/ClickHouse/pull/32507) ([Dmitriy Mokhnatkin](https://github.com/DMokhnatkin)). +* Fix issue with ambiguous query formatting in distributed queries that led to errors when some table columns were named `ALL` or `DISTINCT`. This closes [#32391](https://github.com/ClickHouse/ClickHouse/issues/32391). [#32490](https://github.com/ClickHouse/ClickHouse/pull/32490) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix failures in queries that are trying to use skipping indices, which are not materialized yet. Fixes [#32292](https://github.com/ClickHouse/ClickHouse/issues/32292) and [#30343](https://github.com/ClickHouse/ClickHouse/issues/30343). [#32359](https://github.com/ClickHouse/ClickHouse/pull/32359) ([Anton Popov](https://github.com/CurtizJ)). +* Fix broken select query when there are more than 2 row policies on same column, begin at second queries on the same session. [#31606](https://github.com/ClickHouse/ClickHouse/issues/31606). [#32291](https://github.com/ClickHouse/ClickHouse/pull/32291) ([SuperDJY](https://github.com/cmsxbc)). +* Fix fractional unix timestamp conversion to `DateTime64`, fractional part was reversed for negative unix timestamps (before 1970-01-01). [#32240](https://github.com/ClickHouse/ClickHouse/pull/32240) ([Ben](https://github.com/benbiti)). +* Some entries of replication queue might hang for `temporary_directories_lifetime` (1 day by default) with `Directory tmp_merge_` or `Part ... (state Deleting) already exists, but it will be deleted soon` or similar error. It's fixed. Fixes [#29616](https://github.com/ClickHouse/ClickHouse/issues/29616). [#32201](https://github.com/ClickHouse/ClickHouse/pull/32201) ([tavplubix](https://github.com/tavplubix)). +* Fix parsing of `APPLY lambda` column transformer which could lead to client/server crash. [#32138](https://github.com/ClickHouse/ClickHouse/pull/32138) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix `base64Encode` adding trailing bytes on small strings. [#31797](https://github.com/ClickHouse/ClickHouse/pull/31797) ([Kevin Michel](https://github.com/kmichel-aiven)). +* Fix possible crash (or incorrect result) in case of `LowCardinality` arguments of window function. Fixes [#31114](https://github.com/ClickHouse/ClickHouse/issues/31114). [#31888](https://github.com/ClickHouse/ClickHouse/pull/31888) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix hang up with command `DROP TABLE system.query_log sync`. [#33293](https://github.com/ClickHouse/ClickHouse/pull/33293) ([zhanghuajie](https://github.com/zhanghuajieHIT)). + + +## [Changelog for 2021](./2021.md) diff --git a/docs/ja/whats-new/changelog/2023.md b/docs/ja/whats-new/changelog/2023.md new file mode 100644 index 00000000000..daa6c121dd9 --- /dev/null +++ b/docs/ja/whats-new/changelog/2023.md @@ -0,0 +1,2171 @@ +--- +slug: /ja/whats-new/changelog/2023 +sidebar_position: 8 +sidebar_label: 2023 +title: 2023 Changelog +--- + +### Table of Contents +**[ClickHouse release v23.12, 2023-12-28](#2312)**
    +**[ClickHouse release v23.11, 2023-12-06](#2311)**
    +**[ClickHouse release v23.10, 2023-11-02](#2310)**
    +**[ClickHouse release v23.9, 2023-09-28](#239)**
    +**[ClickHouse release v23.8 LTS, 2023-08-31](#238)**
    +**[ClickHouse release v23.7, 2023-07-27](#237)**
    +**[ClickHouse release v23.6, 2023-06-30](#236)**
    +**[ClickHouse release v23.5, 2023-06-08](#235)**
    +**[ClickHouse release v23.4, 2023-04-26](#234)**
    +**[ClickHouse release v23.3 LTS, 2023-03-30](#233)**
    +**[ClickHouse release v23.2, 2023-02-23](#232)**
    +**[ClickHouse release v23.1, 2023-01-25](#231)**
    +**[Changelog for 2022](https://clickhouse.com/docs/ja/whats-new/changelog/2022/)**
    + +# 2023 Changelog + +### ClickHouse release 23.12, 2023-12-28 {#2312} + +#### Backward Incompatible Change +* Fix check for non-deterministic functions in TTL expressions. Previously, you could create a TTL expression with non-deterministic functions in some cases, which could lead to undefined behavior later. This fixes [#37250](https://github.com/ClickHouse/ClickHouse/issues/37250). Disallow TTL expressions that don't depend on any columns of a table by default. It can be allowed back by `SET allow_suspicious_ttl_expressions = 1` or `SET compatibility = '23.11'`. Closes [#37286](https://github.com/ClickHouse/ClickHouse/issues/37286). [#51858](https://github.com/ClickHouse/ClickHouse/pull/51858) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The MergeTree setting `clean_deleted_rows` is deprecated, it has no effect anymore. The `CLEANUP` keyword for the `OPTIMIZE` is not allowed by default (it can be unlocked with the `allow_experimental_replacing_merge_with_cleanup` setting). [#58267](https://github.com/ClickHouse/ClickHouse/pull/58267) ([Alexander Tokmakov](https://github.com/tavplubix)). This fixes [#57930](https://github.com/ClickHouse/ClickHouse/issues/57930). This closes [#54988](https://github.com/ClickHouse/ClickHouse/issues/54988). This closes [#54570](https://github.com/ClickHouse/ClickHouse/issues/54570). This closes [#50346](https://github.com/ClickHouse/ClickHouse/issues/50346). This closes [#47579](https://github.com/ClickHouse/ClickHouse/issues/47579). The feature has to be removed because it is not good. We have to remove it as quickly as possible, because there is no other option. [#57932](https://github.com/ClickHouse/ClickHouse/pull/57932) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### New Feature +* Implement Refreshable Materialized Views, requested in [#33919](https://github.com/ClickHouse/ClickHouse/issues/33919). [#56946](https://github.com/ClickHouse/ClickHouse/pull/56946) ([Michael Kolupaev](https://github.com/al13n321), [Michael Guzov](https://github.com/koloshmet)). +* Introduce `PASTE JOIN`, which allows users to join tables without `ON` clause simply by row numbers. Example: `SELECT * FROM (SELECT number AS a FROM numbers(2)) AS t1 PASTE JOIN (SELECT number AS a FROM numbers(2) ORDER BY a DESC) AS t2`. [#57995](https://github.com/ClickHouse/ClickHouse/pull/57995) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* The `ORDER BY` clause now supports specifying `ALL`, meaning that ClickHouse sorts by all columns in the `SELECT` clause. Example: `SELECT col1, col2 FROM tab WHERE [...] ORDER BY ALL`. [#57875](https://github.com/ClickHouse/ClickHouse/pull/57875) ([zhongyuankai](https://github.com/zhongyuankai)). +* Added a new mutation command `ALTER TABLE
    APPLY DELETED MASK`, which allows to enforce applying of mask written by lightweight delete and to remove rows marked as deleted from disk. [#57433](https://github.com/ClickHouse/ClickHouse/pull/57433) ([Anton Popov](https://github.com/CurtizJ)). +* A handler `/binary` opens a visual viewer of symbols inside the ClickHouse binary. [#58211](https://github.com/ClickHouse/ClickHouse/pull/58211) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Added a new SQL function `sqid` to generate Sqids (https://sqids.org/), example: `SELECT sqid(125, 126)`. [#57512](https://github.com/ClickHouse/ClickHouse/pull/57512) ([Robert Schulze](https://github.com/rschu1ze)). +* Add a new function `seriesPeriodDetectFFT` to detect series period using FFT. [#57574](https://github.com/ClickHouse/ClickHouse/pull/57574) ([Bhavna Jindal](https://github.com/bhavnajindal)). +* Add an HTTP endpoint for checking if Keeper is ready to accept traffic. [#55876](https://github.com/ClickHouse/ClickHouse/pull/55876) ([Konstantin Bogdanov](https://github.com/thevar1able)). +* Add 'union' mode for schema inference. In this mode the resulting table schema is the union of all files schemas (so schema is inferred from each file). The mode of schema inference is controlled by a setting `schema_inference_mode` with two possible values - `default` and `union`. Closes [#55428](https://github.com/ClickHouse/ClickHouse/issues/55428). [#55892](https://github.com/ClickHouse/ClickHouse/pull/55892) ([Kruglov Pavel](https://github.com/Avogar)). +* Add new setting `input_format_csv_try_infer_numbers_from_strings` that allows to infer numbers from strings in CSV format. Closes [#56455](https://github.com/ClickHouse/ClickHouse/issues/56455). [#56859](https://github.com/ClickHouse/ClickHouse/pull/56859) ([Kruglov Pavel](https://github.com/Avogar)). +* When the number of databases or tables exceeds a configurable threshold, show a warning to the user. [#57375](https://github.com/ClickHouse/ClickHouse/pull/57375) ([凌涛](https://github.com/lingtaolf)). +* Dictionary with `HASHED_ARRAY` (and `COMPLEX_KEY_HASHED_ARRAY`) layout supports `SHARDS` similarly to `HASHED`. [#57544](https://github.com/ClickHouse/ClickHouse/pull/57544) ([vdimir](https://github.com/vdimir)). +* Add asynchronous metrics for total primary key bytes and total allocated primary key bytes in memory. [#57551](https://github.com/ClickHouse/ClickHouse/pull/57551) ([Bharat Nallan](https://github.com/bharatnc)). +* Add `SHA512_256` function. [#57645](https://github.com/ClickHouse/ClickHouse/pull/57645) ([Bharat Nallan](https://github.com/bharatnc)). +* Add `FORMAT_BYTES` as an alias for `formatReadableSize`. [#57592](https://github.com/ClickHouse/ClickHouse/pull/57592) ([Bharat Nallan](https://github.com/bharatnc)). +* Allow passing optional session token to the `s3` table function. [#57850](https://github.com/ClickHouse/ClickHouse/pull/57850) ([Shani Elharrar](https://github.com/shanielh)). +* Introduce a new setting `http_make_head_request`. If it is turned off, the URL table engine will not do a HEAD request to determine the file size. This is needed to support inefficient, misconfigured, or not capable HTTP servers. [#54602](https://github.com/ClickHouse/ClickHouse/pull/54602) ([Fionera](https://github.com/fionera)). +* It is now possible to refer to ALIAS column in index (non-primary-key) definitions (issue [#55650](https://github.com/ClickHouse/ClickHouse/issues/55650)). Example: `CREATE TABLE tab(col UInt32, col_alias ALIAS col + 1, INDEX idx (col_alias) TYPE minmax) ENGINE = MergeTree ORDER BY col;`. [#57546](https://github.com/ClickHouse/ClickHouse/pull/57546) ([Robert Schulze](https://github.com/rschu1ze)). +* Added a new setting `readonly` which can be used to specify an S3 disk is read only. It can be useful to create a table on a disk of `s3_plain` type, while having read only access to the underlying S3 bucket. [#57977](https://github.com/ClickHouse/ClickHouse/pull/57977) ([Pengyuan Bian](https://github.com/bianpengyuan)). +* The primary key analysis in MergeTree tables will now be applied to predicates that include the virtual column `_part_offset` (optionally with `_part`). This feature can serve as a special kind of a secondary index. [#58224](https://github.com/ClickHouse/ClickHouse/pull/58224) ([Amos Bird](https://github.com/amosbird)). + +#### Performance Improvement +* Extract non-intersecting parts ranges from MergeTree table during FINAL processing. That way we can avoid additional FINAL logic for this non-intersecting parts ranges. In case when amount of duplicate values with same primary key is low, performance will be almost the same as without FINAL. Improve reading performance for MergeTree FINAL when `do_not_merge_across_partitions_select_final` setting is set. [#58120](https://github.com/ClickHouse/ClickHouse/pull/58120) ([Maksim Kita](https://github.com/kitaisreal)). +* Made copy between s3 disks using a s3-server-side copy instead of copying through the buffer. Improves `BACKUP/RESTORE` operations and `clickhouse-disks copy` command. [#56744](https://github.com/ClickHouse/ClickHouse/pull/56744) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* Hash JOIN respects setting `max_joined_block_size_rows` and do not produce large blocks for `ALL JOIN`. [#56996](https://github.com/ClickHouse/ClickHouse/pull/56996) ([vdimir](https://github.com/vdimir)). +* Release memory for aggregation earlier. This may avoid unnecessary external aggregation. [#57691](https://github.com/ClickHouse/ClickHouse/pull/57691) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Improve performance of string serialization. [#57717](https://github.com/ClickHouse/ClickHouse/pull/57717) ([Maksim Kita](https://github.com/kitaisreal)). +* Support trivial count optimization for `Merge`-engine tables. [#57867](https://github.com/ClickHouse/ClickHouse/pull/57867) ([skyoct](https://github.com/skyoct)). +* Optimized aggregation in some cases. [#57872](https://github.com/ClickHouse/ClickHouse/pull/57872) ([Anton Popov](https://github.com/CurtizJ)). +* The `hasAny` function can now take advantage of the full-text skipping indices. [#57878](https://github.com/ClickHouse/ClickHouse/pull/57878) ([Jpnock](https://github.com/Jpnock)). +* Function `if(cond, then, else)` (and its alias `cond ? then : else`) were optimized to use branch-free evaluation. [#57885](https://github.com/ClickHouse/ClickHouse/pull/57885) ([zhanglistar](https://github.com/zhanglistar)). +* MergeTree automatically derive `do_not_merge_across_partitions_select_final` setting if partition key expression contains only columns from primary key expression. [#58218](https://github.com/ClickHouse/ClickHouse/pull/58218) ([Maksim Kita](https://github.com/kitaisreal)). +* Speedup `MIN` and `MAX` for native types. [#58231](https://github.com/ClickHouse/ClickHouse/pull/58231) ([Raúl Marín](https://github.com/Algunenano)). +* Implement `SLRU` cache policy for filesystem cache. [#57076](https://github.com/ClickHouse/ClickHouse/pull/57076) ([Kseniia Sumarokova](https://github.com/kssenii)). +* The limit for the number of connections per endpoint for background fetches was raised from `15` to the value of `background_fetches_pool_size` setting. - MergeTree-level setting `replicated_max_parallel_fetches_for_host` became obsolete - MergeTree-level settings `replicated_fetches_http_connection_timeout`, `replicated_fetches_http_send_timeout` and `replicated_fetches_http_receive_timeout` are moved to the Server-level. - Setting `keep_alive_timeout` is added to the list of Server-level settings. [#57523](https://github.com/ClickHouse/ClickHouse/pull/57523) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Make querying `system.filesystem_cache` not memory intensive. [#57687](https://github.com/ClickHouse/ClickHouse/pull/57687) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Reduce memory usage on strings deserialization. [#57787](https://github.com/ClickHouse/ClickHouse/pull/57787) ([Maksim Kita](https://github.com/kitaisreal)). +* More efficient constructor for Enum - it makes sense when Enum has a boatload of values. [#57887](https://github.com/ClickHouse/ClickHouse/pull/57887) ([Duc Canh Le](https://github.com/canhld94)). +* An improvement for reading from the filesystem cache: always use `pread` method. [#57970](https://github.com/ClickHouse/ClickHouse/pull/57970) ([Nikita Taranov](https://github.com/nickitat)). +* Add optimization for AND notEquals chain in logical expression optimizer. This optimization is only available with the experimental Analyzer enabled. [#58214](https://github.com/ClickHouse/ClickHouse/pull/58214) ([Kevin Mingtarja](https://github.com/kevinmingtarja)). + +#### Improvement +* Support for soft memory limit in Keeper. It will refuse requests if the memory usage is close to the maximum. [#57271](https://github.com/ClickHouse/ClickHouse/pull/57271) ([Han Fei](https://github.com/hanfei1991)). [#57699](https://github.com/ClickHouse/ClickHouse/pull/57699) ([Han Fei](https://github.com/hanfei1991)). +* Make inserts into distributed tables handle updated cluster configuration properly. When the list of cluster nodes is dynamically updated, the Directory Monitor of the distribution table will update it. [#42826](https://github.com/ClickHouse/ClickHouse/pull/42826) ([zhongyuankai](https://github.com/zhongyuankai)). +* Do not allow creating a replicated table with inconsistent merge parameters. [#56833](https://github.com/ClickHouse/ClickHouse/pull/56833) ([Duc Canh Le](https://github.com/canhld94)). +* Show uncompressed size in `system.tables`. [#56618](https://github.com/ClickHouse/ClickHouse/issues/56618). [#57186](https://github.com/ClickHouse/ClickHouse/pull/57186) ([Chen Lixiang](https://github.com/chenlx0)). +* Add `skip_unavailable_shards` as a setting for `Distributed` tables that is similar to the corresponding query-level setting. Closes [#43666](https://github.com/ClickHouse/ClickHouse/issues/43666). [#57218](https://github.com/ClickHouse/ClickHouse/pull/57218) ([Gagan Goel](https://github.com/tntnatbry)). +* The function `substring` (aliases: `substr`, `mid`) can now be used with `Enum` types. Previously, the first function argument had to be a value of type `String` or `FixedString`. This improves compatibility with 3rd party tools such as Tableau via MySQL interface. [#57277](https://github.com/ClickHouse/ClickHouse/pull/57277) ([Serge Klochkov](https://github.com/slvrtrn)). +* Function `format` now supports arbitrary argument types (instead of only `String` and `FixedString` arguments). This is important to calculate `SELECT format('The {0} to all questions is {1}', 'answer', 42)`. [#57549](https://github.com/ClickHouse/ClickHouse/pull/57549) ([Robert Schulze](https://github.com/rschu1ze)). +* Allows to use the `date_trunc` function with a case-insensitive first argument. Both cases are now supported: `SELECT date_trunc('day', now())` and `SELECT date_trunc('DAY', now())`. [#57624](https://github.com/ClickHouse/ClickHouse/pull/57624) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Better hints when a table doesn't exist. [#57342](https://github.com/ClickHouse/ClickHouse/pull/57342) ([Bharat Nallan](https://github.com/bharatnc)). +* Allow to overwrite `max_partition_size_to_drop` and `max_table_size_to_drop` server settings in query time. [#57452](https://github.com/ClickHouse/ClickHouse/pull/57452) ([Jordi Villar](https://github.com/jrdi)). +* Slightly better inference of unnamed tupes in JSON formats. [#57751](https://github.com/ClickHouse/ClickHouse/pull/57751) ([Kruglov Pavel](https://github.com/Avogar)). +* Add support for read-only flag when connecting to Keeper (fixes [#53749](https://github.com/ClickHouse/ClickHouse/issues/53749)). [#57479](https://github.com/ClickHouse/ClickHouse/pull/57479) ([Mikhail Koviazin](https://github.com/mkmkme)). +* Fix possible distributed sends stuck due to "No such file or directory" (during recovering a batch from disk). Fix possible issues with `error_count` from `system.distribution_queue` (in case of `distributed_directory_monitor_max_sleep_time_ms` >5min). Introduce profile event to track async INSERT failures - `DistributedAsyncInsertionFailures`. [#57480](https://github.com/ClickHouse/ClickHouse/pull/57480) ([Azat Khuzhin](https://github.com/azat)). +* Support PostgreSQL generated columns and default column values in `MaterializedPostgreSQL` (experimental feature). Closes [#40449](https://github.com/ClickHouse/ClickHouse/issues/40449). [#57568](https://github.com/ClickHouse/ClickHouse/pull/57568) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Allow to apply some filesystem cache config settings changes without server restart. [#57578](https://github.com/ClickHouse/ClickHouse/pull/57578) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Properly handling PostgreSQL table structure with empty array. [#57618](https://github.com/ClickHouse/ClickHouse/pull/57618) ([Mike Kot](https://github.com/myrrc)). +* Expose the total number of errors occurred since last server restart as a `ClickHouseErrorMetric_ALL` metric. [#57627](https://github.com/ClickHouse/ClickHouse/pull/57627) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Allow nodes in the configuration file with `from_env`/`from_zk` reference and non empty element with replace=1. [#57628](https://github.com/ClickHouse/ClickHouse/pull/57628) ([Azat Khuzhin](https://github.com/azat)). +* A table function `fuzzJSON` which allows generating a lot of malformed JSON for fuzzing. [#57646](https://github.com/ClickHouse/ClickHouse/pull/57646) ([Julia Kartseva](https://github.com/jkartseva)). +* Allow IPv6 to UInt128 conversion and binary arithmetic. [#57707](https://github.com/ClickHouse/ClickHouse/pull/57707) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Add a setting for `async inserts deduplication cache` - how long we wait for cache update. Deprecate setting `async_block_ids_cache_min_update_interval_ms`. Now cache is updated only in case of conflicts. [#57743](https://github.com/ClickHouse/ClickHouse/pull/57743) ([alesapin](https://github.com/alesapin)). +* `sleep()` function now can be cancelled with `KILL QUERY`. [#57746](https://github.com/ClickHouse/ClickHouse/pull/57746) ([Vitaly Baranov](https://github.com/vitlibar)). +* Forbid `CREATE TABLE ... AS SELECT` queries for `Replicated` table engines in the experimental `Replicated` database because they are not supported. Reference [#35408](https://github.com/ClickHouse/ClickHouse/issues/35408). [#57796](https://github.com/ClickHouse/ClickHouse/pull/57796) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix and improve transforming queries for external databases, to recursively obtain all compatible predicates. [#57888](https://github.com/ClickHouse/ClickHouse/pull/57888) ([flynn](https://github.com/ucasfl)). +* Support dynamic reloading of the filesystem cache size. Closes [#57866](https://github.com/ClickHouse/ClickHouse/issues/57866). [#57897](https://github.com/ClickHouse/ClickHouse/pull/57897) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Correctly support `system.stack_trace` for threads with blocked SIGRTMIN (these threads can exist in low-quality external libraries such as Apache rdkafka). [#57907](https://github.com/ClickHouse/ClickHouse/pull/57907) ([Azat Khuzhin](https://github.com/azat)). Aand also send signal to the threads only if it is not blocked to avoid waiting `storage_system_stack_trace_pipe_read_timeout_ms` when it does not make any sense. [#58136](https://github.com/ClickHouse/ClickHouse/pull/58136) ([Azat Khuzhin](https://github.com/azat)). +* Tolerate keeper failures in the quorum inserts' check. [#57986](https://github.com/ClickHouse/ClickHouse/pull/57986) ([Raúl Marín](https://github.com/Algunenano)). +* Add max/peak RSS (`MemoryResidentMax`) into system.asynchronous_metrics. [#58095](https://github.com/ClickHouse/ClickHouse/pull/58095) ([Azat Khuzhin](https://github.com/azat)). +* This PR allows users to use s3-style links (`https://` and `s3://`) without mentioning region if it's not default. Also find the correct region if the user mentioned the wrong one. [#58148](https://github.com/ClickHouse/ClickHouse/pull/58148) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* `clickhouse-format --obfuscate` will know about Settings, MergeTreeSettings, and time zones and keep their names unchanged. [#58179](https://github.com/ClickHouse/ClickHouse/pull/58179) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Added explicit `finalize()` function in `ZipArchiveWriter`. Simplify too complicated code in `ZipArchiveWriter`. This fixes [#58074](https://github.com/ClickHouse/ClickHouse/issues/58074). [#58202](https://github.com/ClickHouse/ClickHouse/pull/58202) ([Vitaly Baranov](https://github.com/vitlibar)). +* Make caches with the same path use the same cache objects. This behaviour existed before, but was broken in 23.4. If such caches with the same path have different set of cache settings, an exception will be thrown, that this is not allowed. [#58264](https://github.com/ClickHouse/ClickHouse/pull/58264) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Parallel replicas (experimental feature): friendly settings [#57542](https://github.com/ClickHouse/ClickHouse/pull/57542) ([Igor Nikonov](https://github.com/devcrafter)). +* Parallel replicas (experimental feature): announcement response handling improvement [#57749](https://github.com/ClickHouse/ClickHouse/pull/57749) ([Igor Nikonov](https://github.com/devcrafter)). +* Parallel replicas (experimental feature): give more respect to `min_number_of_marks` in `ParallelReplicasReadingCoordinator` [#57763](https://github.com/ClickHouse/ClickHouse/pull/57763) ([Nikita Taranov](https://github.com/nickitat)). +* Parallel replicas (experimental feature): disable parallel replicas with IN (subquery) [#58133](https://github.com/ClickHouse/ClickHouse/pull/58133) ([Igor Nikonov](https://github.com/devcrafter)). +* Parallel replicas (experimental feature): add profile event 'ParallelReplicasUsedCount' [#58173](https://github.com/ClickHouse/ClickHouse/pull/58173) ([Igor Nikonov](https://github.com/devcrafter)). +* Non POST requests such as HEAD will be readonly similar to GET. [#58060](https://github.com/ClickHouse/ClickHouse/pull/58060) ([San](https://github.com/santrancisco)). +* Add `bytes_uncompressed` column to `system.part_log` [#58167](https://github.com/ClickHouse/ClickHouse/pull/58167) ([Jordi Villar](https://github.com/jrdi)). +* Add base backup name to `system.backups` and `system.backup_log` tables [#58178](https://github.com/ClickHouse/ClickHouse/pull/58178) ([Pradeep Chhetri](https://github.com/chhetripradeep)). +* Add support for specifying query parameters in the command line in clickhouse-local [#58210](https://github.com/ClickHouse/ClickHouse/pull/58210) ([Pradeep Chhetri](https://github.com/chhetripradeep)). + +#### Build/Testing/Packaging Improvement +* Randomize more settings [#39663](https://github.com/ClickHouse/ClickHouse/pull/39663) ([Anton Popov](https://github.com/CurtizJ)). +* Randomize disabled optimizations in CI [#57315](https://github.com/ClickHouse/ClickHouse/pull/57315) ([Raúl Marín](https://github.com/Algunenano)). +* Allow usage of Azure-related table engines/functions on macOS. [#51866](https://github.com/ClickHouse/ClickHouse/pull/51866) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* ClickHouse Fast Test now uses Musl instead of GLibc. [#57711](https://github.com/ClickHouse/ClickHouse/pull/57711) ([Alexey Milovidov](https://github.com/alexey-milovidov)). The fully-static Musl build is available to download from the CI. +* Run ClickBench for every commit. This closes [#57708](https://github.com/ClickHouse/ClickHouse/issues/57708). [#57712](https://github.com/ClickHouse/ClickHouse/pull/57712) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Remove the usage of a harmful C/POSIX `select` function from external libraries. [#57467](https://github.com/ClickHouse/ClickHouse/pull/57467) ([Igor Nikonov](https://github.com/devcrafter)). +* Settings only available in ClickHouse Cloud will be also present in the open-source ClickHouse build for convenience. [#57638](https://github.com/ClickHouse/ClickHouse/pull/57638) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). + +#### Bug Fix (user-visible misbehavior in an official stable release) +* Fixed a possibility of sorting order breakage in TTL GROUP BY [#49103](https://github.com/ClickHouse/ClickHouse/pull/49103) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix: split `lttb` bucket strategy, first bucket and last bucket should only contain single point [#57003](https://github.com/ClickHouse/ClickHouse/pull/57003) ([FFish](https://github.com/wxybear)). +* Fix possible deadlock in the `Template` format during sync after error [#57004](https://github.com/ClickHouse/ClickHouse/pull/57004) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix early stop while parsing a file with skipping lots of errors [#57006](https://github.com/ClickHouse/ClickHouse/pull/57006) ([Kruglov Pavel](https://github.com/Avogar)). +* Prevent dictionary's ACL bypass via the `dictionary` table function [#57362](https://github.com/ClickHouse/ClickHouse/pull/57362) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Fix another case of a "non-ready set" error found by Fuzzer. [#57423](https://github.com/ClickHouse/ClickHouse/pull/57423) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix several issues regarding PostgreSQL `array_ndims` usage. [#57436](https://github.com/ClickHouse/ClickHouse/pull/57436) ([Ryan Jacobs](https://github.com/ryanmjacobs)). +* Fix RWLock inconsistency after write lock timeout [#57454](https://github.com/ClickHouse/ClickHouse/pull/57454) ([Vitaly Baranov](https://github.com/vitlibar)). Fix RWLock inconsistency after write lock timeout (again) [#57733](https://github.com/ClickHouse/ClickHouse/pull/57733) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix: don't exclude ephemeral column when building pushing to view chain [#57461](https://github.com/ClickHouse/ClickHouse/pull/57461) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* MaterializedPostgreSQL (experimental issue): fix issue [#41922](https://github.com/ClickHouse/ClickHouse/issues/41922), add test for [#41923](https://github.com/ClickHouse/ClickHouse/issues/41923) [#57515](https://github.com/ClickHouse/ClickHouse/pull/57515) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Ignore ON CLUSTER clause in grant/revoke queries for management of replicated access entities. [#57538](https://github.com/ClickHouse/ClickHouse/pull/57538) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* Fix crash in clickhouse-local [#57553](https://github.com/ClickHouse/ClickHouse/pull/57553) ([Nikolay Degterinsky](https://github.com/evillique)). +* A fix for Hash JOIN. [#57564](https://github.com/ClickHouse/ClickHouse/pull/57564) ([vdimir](https://github.com/vdimir)). +* Fix possible error in PostgreSQL source [#57567](https://github.com/ClickHouse/ClickHouse/pull/57567) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix type correction in Hash JOIN for nested LowCardinality. [#57614](https://github.com/ClickHouse/ClickHouse/pull/57614) ([vdimir](https://github.com/vdimir)). +* Avoid hangs of `system.stack_trace` by correctly prohibiting parallel reading from it. [#57641](https://github.com/ClickHouse/ClickHouse/pull/57641) ([Azat Khuzhin](https://github.com/azat)). +* Fix an error for aggregation of sparse columns with `any(...) RESPECT NULL` [#57710](https://github.com/ClickHouse/ClickHouse/pull/57710) ([Azat Khuzhin](https://github.com/azat)). +* Fix unary operators parsing [#57713](https://github.com/ClickHouse/ClickHouse/pull/57713) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix dependency loading for the experimental table engine `MaterializedPostgreSQL`. [#57754](https://github.com/ClickHouse/ClickHouse/pull/57754) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix retries for disconnected nodes for BACKUP/RESTORE ON CLUSTER [#57764](https://github.com/ClickHouse/ClickHouse/pull/57764) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix result of external aggregation in case of partially materialized projection [#57790](https://github.com/ClickHouse/ClickHouse/pull/57790) ([Anton Popov](https://github.com/CurtizJ)). +* Fix merge in aggregation functions with `*Map` combinator [#57795](https://github.com/ClickHouse/ClickHouse/pull/57795) ([Anton Popov](https://github.com/CurtizJ)). +* Disable `system.kafka_consumers` because it has a bug. [#57822](https://github.com/ClickHouse/ClickHouse/pull/57822) ([Azat Khuzhin](https://github.com/azat)). +* Fix LowCardinality keys support in Merge JOIN. [#57827](https://github.com/ClickHouse/ClickHouse/pull/57827) ([vdimir](https://github.com/vdimir)). +* A fix for `InterpreterCreateQuery` related to the sample block. [#57855](https://github.com/ClickHouse/ClickHouse/pull/57855) ([Maksim Kita](https://github.com/kitaisreal)). +* `addresses_expr` were ignored for named collections from PostgreSQL. [#57874](https://github.com/ClickHouse/ClickHouse/pull/57874) ([joelynch](https://github.com/joelynch)). +* Fix invalid memory access in BLAKE3 (Rust) [#57876](https://github.com/ClickHouse/ClickHouse/pull/57876) ([Raúl Marín](https://github.com/Algunenano)). Then it was rewritten from Rust to C++ for better [memory-safety](https://www.memorysafety.org/). [#57994](https://github.com/ClickHouse/ClickHouse/pull/57994) ([Raúl Marín](https://github.com/Algunenano)). +* Normalize function names in `CREATE INDEX` [#57906](https://github.com/ClickHouse/ClickHouse/pull/57906) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix handling of unavailable replicas before first request happened [#57933](https://github.com/ClickHouse/ClickHouse/pull/57933) ([Nikita Taranov](https://github.com/nickitat)). +* Fix literal alias misclassification [#57988](https://github.com/ClickHouse/ClickHouse/pull/57988) ([Chen768959](https://github.com/Chen768959)). +* Fix invalid preprocessing on Keeper [#58069](https://github.com/ClickHouse/ClickHouse/pull/58069) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix integer overflow in the `Poco` library, related to `UTF32Encoding` [#58073](https://github.com/ClickHouse/ClickHouse/pull/58073) ([Andrey Fedotov](https://github.com/anfedotoff)). +* Fix parallel replicas (experimental feature) in presence of a scalar subquery with a big integer value [#58118](https://github.com/ClickHouse/ClickHouse/pull/58118) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix `accurateCastOrNull` for out-of-range `DateTime` [#58139](https://github.com/ClickHouse/ClickHouse/pull/58139) ([Andrey Zvonov](https://github.com/zvonand)). +* Fix possible `PARAMETER_OUT_OF_BOUND` error during subcolumns reading from a wide part in MergeTree [#58175](https://github.com/ClickHouse/ClickHouse/pull/58175) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix a slow-down of CREATE VIEW with an enormous number of subqueries [#58220](https://github.com/ClickHouse/ClickHouse/pull/58220) ([Tao Wang](https://github.com/wangtZJU)). +* Fix parallel parsing for JSONCompactEachRow [#58181](https://github.com/ClickHouse/ClickHouse/pull/58181) ([Alexey Milovidov](https://github.com/alexey-milovidov)). [#58250](https://github.com/ClickHouse/ClickHouse/pull/58250) ([Kruglov Pavel](https://github.com/Avogar)). + + +### ClickHouse release 23.11, 2023-12-06 {#2311} + +#### Backward Incompatible Change +* The default ClickHouse server configuration file has enabled `access_management` (user manipulation by SQL queries) and `named_collection_control` (manipulation of named collection by SQL queries) for the `default` user by default. This closes [#56482](https://github.com/ClickHouse/ClickHouse/issues/56482). [#56619](https://github.com/ClickHouse/ClickHouse/pull/56619) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Multiple improvements for `RESPECT NULLS`/`IGNORE NULLS` for window functions. If you use them as aggregate functions and store the states of aggregate functions with these modifiers, they might become incompatible. [#57189](https://github.com/ClickHouse/ClickHouse/pull/57189) ([Raúl Marín](https://github.com/Algunenano)). +* Remove optimization `optimize_move_functions_out_of_any`. [#57190](https://github.com/ClickHouse/ClickHouse/pull/57190) ([Raúl Marín](https://github.com/Algunenano)). +* Formatters `%l`/`%k`/`%c` in function `parseDateTime` are now able to parse hours/months without leading zeros, e.g. `select parseDateTime('2023-11-26 8:14', '%F %k:%i')` now works. Set `parsedatetime_parse_without_leading_zeros = 0` to restore the previous behavior which required two digits. Function `formatDateTime` is now also able to print hours/months without leading zeros. This is controlled by setting `formatdatetime_format_without_leading_zeros` but off by default to not break existing use cases. [#55872](https://github.com/ClickHouse/ClickHouse/pull/55872) ([Azat Khuzhin](https://github.com/azat)). +* You can no longer use the aggregate function `avgWeighted` with arguments of type `Decimal`. Workaround: convert arguments to `Float64`. This closes [#43928](https://github.com/ClickHouse/ClickHouse/issues/43928). This closes [#31768](https://github.com/ClickHouse/ClickHouse/issues/31768). This closes [#56435](https://github.com/ClickHouse/ClickHouse/issues/56435). If you have used this function inside materialized views or projections with `Decimal` arguments, contact support@clickhouse.com. Fixed error in aggregate function `sumMap` and made it slower around 1.5..2 times. It does not matter because the function is garbage anyway. This closes [#54955](https://github.com/ClickHouse/ClickHouse/issues/54955). This closes [#53134](https://github.com/ClickHouse/ClickHouse/issues/53134). This closes [#55148](https://github.com/ClickHouse/ClickHouse/issues/55148). Fix a bug in function `groupArraySample` - it used the same random seed in case more than one aggregate state is generated in a query. [#56350](https://github.com/ClickHouse/ClickHouse/pull/56350) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### New Feature +* Added server setting `async_load_databases` for asynchronous loading of databases and tables. Speeds up the server start time. Applies to databases with `Ordinary`, `Atomic` and `Replicated` engines. Their tables load metadata asynchronously. Query to a table increases the priority of the load job and waits for it to be done. Added a new table `system.asynchronous_loader` for introspection. [#49351](https://github.com/ClickHouse/ClickHouse/pull/49351) ([Sergei Trifonov](https://github.com/serxa)). +* Add system table `blob_storage_log`. It allows auditing all the data written to S3 and other object storages. [#52918](https://github.com/ClickHouse/ClickHouse/pull/52918) ([vdimir](https://github.com/vdimir)). +* Use statistics to order prewhere conditions better. [#53240](https://github.com/ClickHouse/ClickHouse/pull/53240) ([Han Fei](https://github.com/hanfei1991)). +* Added support for compression in the Keeper's protocol. It can be enabled on the ClickHouse side by using this flag `use_compression` inside `zookeeper` section. Keep in mind that only ClickHouse Keeper supports compression, while Apache ZooKeeper does not. Resolves [#49507](https://github.com/ClickHouse/ClickHouse/issues/49507). [#54957](https://github.com/ClickHouse/ClickHouse/pull/54957) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Introduce the feature `storage_metadata_write_full_object_key`. If it is set as `true` then metadata files are written with the new format. With that format ClickHouse stores full remote object key in the metadata file which allows better flexibility and optimization. [#55566](https://github.com/ClickHouse/ClickHouse/pull/55566) ([Sema Checherinda](https://github.com/CheSema)). +* Add new settings and syntax to protect named collections' fields from being overridden. This is meant to prevent a malicious user from obtaining unauthorized access to secrets. [#55782](https://github.com/ClickHouse/ClickHouse/pull/55782) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Add `hostname` column to all system log tables - it is useful if you make the system tables replicated, shared, or distributed. [#55894](https://github.com/ClickHouse/ClickHouse/pull/55894) ([Bharat Nallan](https://github.com/bharatnc)). +* Add `CHECK ALL TABLES` query. [#56022](https://github.com/ClickHouse/ClickHouse/pull/56022) ([vdimir](https://github.com/vdimir)). +* Added function `fromDaysSinceYearZero` which is similar to MySQL's `FROM_DAYS`. E.g. `SELECT fromDaysSinceYearZero(739136)` returns `2023-09-08`. [#56088](https://github.com/ClickHouse/ClickHouse/pull/56088) ([Joanna Hulboj](https://github.com/jh0x)). +* Add an external Python tool to view backups and to extract information from them without using ClickHouse. [#56268](https://github.com/ClickHouse/ClickHouse/pull/56268) ([Vitaly Baranov](https://github.com/vitlibar)). +* Implement a new setting called `preferred_optimize_projection_name`. If it is set to a non-empty string, the specified projection would be used if possible instead of choosing from all the candidates. [#56309](https://github.com/ClickHouse/ClickHouse/pull/56309) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Add 4-letter command for yielding/resigning leadership (https://github.com/ClickHouse/ClickHouse/issues/56352). [#56354](https://github.com/ClickHouse/ClickHouse/pull/56354) ([Pradeep Chhetri](https://github.com/chhetripradeep)). [#56620](https://github.com/ClickHouse/ClickHouse/pull/56620) ([Pradeep Chhetri](https://github.com/chhetripradeep)). +* Added a new SQL function, `arrayRandomSample(arr, k)` which returns a sample of k elements from the input array. Similar functionality could previously be achieved only with less convenient syntax, e.g. `SELECT arrayReduce('groupArraySample(3)', range(10))`. [#56416](https://github.com/ClickHouse/ClickHouse/pull/56416) ([Robert Schulze](https://github.com/rschu1ze)). +* Added support for `Float16` type data to use in `.npy` files. Closes [#56344](https://github.com/ClickHouse/ClickHouse/issues/56344). [#56424](https://github.com/ClickHouse/ClickHouse/pull/56424) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Added a system view `information_schema.statistics` for better compatibility with Tableau Online. [#56425](https://github.com/ClickHouse/ClickHouse/pull/56425) ([Serge Klochkov](https://github.com/slvrtrn)). +* Add `system.symbols` table useful for introspection of the binary. [#56548](https://github.com/ClickHouse/ClickHouse/pull/56548) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Configurable dashboards. Queries for charts are now loaded using a query, which by default uses a new `system.dashboards` table. [#56771](https://github.com/ClickHouse/ClickHouse/pull/56771) ([Sergei Trifonov](https://github.com/serxa)). +* Introduce `fileCluster` table function - it is useful if you mount a shared filesystem (NFS and similar) into the `user_files` directory. [#56868](https://github.com/ClickHouse/ClickHouse/pull/56868) ([Andrey Zvonov](https://github.com/zvonand)). +* Add `_size` virtual column with file size in bytes to `s3/file/hdfs/url/azureBlobStorage` engines. [#57126](https://github.com/ClickHouse/ClickHouse/pull/57126) ([Kruglov Pavel](https://github.com/Avogar)). +* Expose the number of errors for each error code occurred on a server since last restart from the Prometheus endpoint. [#57209](https://github.com/ClickHouse/ClickHouse/pull/57209) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* ClickHouse keeper reports its running availability zone at `/keeper/availability-zone` path. This can be configured via `us-west-1a`. [#56715](https://github.com/ClickHouse/ClickHouse/pull/56715) ([Jianfei Hu](https://github.com/incfly)). +* Make ALTER materialized_view MODIFY QUERY non experimental and deprecate `allow_experimental_alter_materialized_view_structure` setting. Fixes [#15206](https://github.com/ClickHouse/ClickHouse/issues/15206). [#57311](https://github.com/ClickHouse/ClickHouse/pull/57311) ([alesapin](https://github.com/alesapin)). +* Setting `join_algorithm` respects specified order [#51745](https://github.com/ClickHouse/ClickHouse/pull/51745) ([vdimir](https://github.com/vdimir)). +* Add support for the [well-known Protobuf types](https://protobuf.dev/reference/protobuf/google.protobuf/) in the Protobuf format. [#56741](https://github.com/ClickHouse/ClickHouse/pull/56741) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)). + +#### Performance Improvement +* Adaptive timeouts for interacting with S3. The first attempt is made with low send and receive timeouts. [#56314](https://github.com/ClickHouse/ClickHouse/pull/56314) ([Sema Checherinda](https://github.com/CheSema)). +* Increase the default value of `max_concurrent_queries` from 100 to 1000. This makes sense when there is a large number of connecting clients, which are slowly sending or receiving data, so the server is not limited by CPU, or when the number of CPU cores is larger than 100. Also, enable the concurrency control by default, and set the desired number of query processing threads in total as twice the number of CPU cores. It improves performance in scenarios with a very large number of concurrent queries. [#46927](https://github.com/ClickHouse/ClickHouse/pull/46927) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Support parallel evaluation of window functions. Fixes [#34688](https://github.com/ClickHouse/ClickHouse/issues/34688). [#39631](https://github.com/ClickHouse/ClickHouse/pull/39631) ([Dmitry Novik](https://github.com/novikd)). +* `Numbers` table engine (of the `system.numbers` table) now analyzes the condition to generate the needed subset of data, like table's index. [#50909](https://github.com/ClickHouse/ClickHouse/pull/50909) ([JackyWoo](https://github.com/JackyWoo)). +* Improved the performance of filtering by `IN (...)` condition for `Merge` table engine. [#54905](https://github.com/ClickHouse/ClickHouse/pull/54905) ([Nikita Taranov](https://github.com/nickitat)). +* An improvement which takes place when the filesystem cache is full and there are big reads. [#55158](https://github.com/ClickHouse/ClickHouse/pull/55158) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add ability to disable checksums for S3 to avoid excessive pass over the file (this is controlled by the setting `s3_disable_checksum`). [#55559](https://github.com/ClickHouse/ClickHouse/pull/55559) ([Azat Khuzhin](https://github.com/azat)). +* Now we read synchronously from remote tables when data is in page cache (like we do for local tables). It is faster, it doesn't require synchronisation inside the thread pool, and doesn't hesitate to do `seek`-s on local FS, and reduces CPU wait. [#55841](https://github.com/ClickHouse/ClickHouse/pull/55841) ([Nikita Taranov](https://github.com/nickitat)). +* Optimization for getting value from `map`, `arrayElement`. It will bring about 30% speedup. - reduce the reserved memory - reduce the `resize` call. [#55957](https://github.com/ClickHouse/ClickHouse/pull/55957) ([lgbo](https://github.com/lgbo-ustc)). +* Optimization of multi-stage filtering with AVX-512. The performance experiments of the OnTime dataset on the ICX device (Intel Xeon Platinum 8380 CPU, 80 cores, 160 threads) show that this change could bring the improvements of 7.4%, 5.9%, 4.7%, 3.0%, and 4.6% to the QPS of the query Q2, Q3, Q4, Q5 and Q6 respectively while having no impact on others. [#56079](https://github.com/ClickHouse/ClickHouse/pull/56079) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Limit the number of threads busy inside the query profiler. If there are more - they will skip profiling. [#56105](https://github.com/ClickHouse/ClickHouse/pull/56105) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Decrease the amount of virtual function calls in window functions. [#56120](https://github.com/ClickHouse/ClickHouse/pull/56120) ([Maksim Kita](https://github.com/kitaisreal)). +* Allow recursive Tuple field pruning in ORC data format to speed up scaning. [#56122](https://github.com/ClickHouse/ClickHouse/pull/56122) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Trivial count optimization for `Npy` data format: queries like `select count() from 'data.npy'` will work much more fast because of caching the results. [#56304](https://github.com/ClickHouse/ClickHouse/pull/56304) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Queries with aggregation and a large number of streams will use less amount of memory during the plan's construction. [#57074](https://github.com/ClickHouse/ClickHouse/pull/57074) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Improve performance of executing queries for use cases with many users and highly concurrent queries (>2000 QPS) by optimizing the access to ProcessList. [#57106](https://github.com/ClickHouse/ClickHouse/pull/57106) ([Andrej Hoos](https://github.com/adikus)). +* Trivial improvement on array join, reuse some intermediate results. [#57183](https://github.com/ClickHouse/ClickHouse/pull/57183) ([æŽæ‰¬](https://github.com/taiyang-li)). +* There are cases when stack unwinding was slow. Not anymore. [#57221](https://github.com/ClickHouse/ClickHouse/pull/57221) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Now we use default read pool for reading from external storage when `max_streams = 1`. It is beneficial when read prefetches are enabled. [#57334](https://github.com/ClickHouse/ClickHouse/pull/57334) ([Nikita Taranov](https://github.com/nickitat)). +* Keeper improvement: improve memory-usage during startup by delaying log preprocessing. [#55660](https://github.com/ClickHouse/ClickHouse/pull/55660) ([Antonio Andelic](https://github.com/antonio2368)). +* Improved performance of glob matching for `File` and `HDFS` storages. [#56141](https://github.com/ClickHouse/ClickHouse/pull/56141) ([Andrey Zvonov](https://github.com/zvonand)). +* Posting lists in experimental full text indexes are now compressed which reduces their size by 10-30%. [#56226](https://github.com/ClickHouse/ClickHouse/pull/56226) ([Harry Lee](https://github.com/HarryLeeIBM)). +* Parallelise `BackupEntriesCollector` in backups. [#56312](https://github.com/ClickHouse/ClickHouse/pull/56312) ([Kseniia Sumarokova](https://github.com/kssenii)). + +#### Improvement +* Add a new `MergeTree` setting `add_implicit_sign_column_constraint_for_collapsing_engine` (disabled by default). When enabled, it adds an implicit CHECK constraint for `CollapsingMergeTree` tables that restricts the value of the `Sign` column to be only -1 or 1. [#56701](https://github.com/ClickHouse/ClickHouse/issues/56701). [#56986](https://github.com/ClickHouse/ClickHouse/pull/56986) ([Kevin Mingtarja](https://github.com/kevinmingtarja)). +* Enable adding new disk to storage configuration without restart. [#56367](https://github.com/ClickHouse/ClickHouse/pull/56367) ([Duc Canh Le](https://github.com/canhld94)). +* Support creating and materializing index in the same alter query, also support "modify TTL" and "materialize TTL" in the same query. Closes [#55651](https://github.com/ClickHouse/ClickHouse/issues/55651). [#56331](https://github.com/ClickHouse/ClickHouse/pull/56331) ([flynn](https://github.com/ucasfl)). +* Add a new table function named `fuzzJSON` with rows containing perturbed versions of the source JSON string with random variations. [#56490](https://github.com/ClickHouse/ClickHouse/pull/56490) ([Julia Kartseva](https://github.com/jkartseva)). +* Engine `Merge` filters the records according to the row policies of the underlying tables, so you don't have to create another row policy on a `Merge` table. [#50209](https://github.com/ClickHouse/ClickHouse/pull/50209) ([Ilya Golshtein](https://github.com/ilejn)). +* Add a setting `max_execution_time_leaf` to limit the execution time on shard for distributed query, and `timeout_overflow_mode_leaf` to control the behaviour if timeout happens. [#51823](https://github.com/ClickHouse/ClickHouse/pull/51823) ([Duc Canh Le](https://github.com/canhld94)). +* Add ClickHouse setting to disable tunneling for HTTPS requests over HTTP proxy. [#55033](https://github.com/ClickHouse/ClickHouse/pull/55033) ([Arthur Passos](https://github.com/arthurpassos)). +* Set `background_fetches_pool_size` to 16, background_schedule_pool_size to 512 that is better for production usage with frequent small insertions. [#54327](https://github.com/ClickHouse/ClickHouse/pull/54327) ([Denny Crane](https://github.com/den-crane)). +* While read data from a csv format file, and at end of line is `\r` , which not followed by `\n`, then we will enconter the exception as follows `Cannot parse CSV format: found \r (CR) not followed by \n (LF). Line must end by \n (LF) or \r\n (CR LF) or \n\r.` In clickhouse, the csv end of line must be `\n` or `\r\n` or `\n\r`, so the `\r` must be followed by `\n`, but in some suitation, the csv input data is abnormal, like above, `\r` is at end of line. [#54340](https://github.com/ClickHouse/ClickHouse/pull/54340) ([KevinyhZou](https://github.com/KevinyhZou)). +* Update Arrow library to release-13.0.0 that supports new encodings. Closes [#44505](https://github.com/ClickHouse/ClickHouse/issues/44505). [#54800](https://github.com/ClickHouse/ClickHouse/pull/54800) ([Kruglov Pavel](https://github.com/Avogar)). +* Improve performance of ON CLUSTER queries by removing heavy system calls to get all network interfaces when looking for local ip address in the DDL entry hosts list. [#54909](https://github.com/ClickHouse/ClickHouse/pull/54909) ([Duc Canh Le](https://github.com/canhld94)). +* Fixed accounting of memory allocated before attaching a thread to a query or a user. [#56089](https://github.com/ClickHouse/ClickHouse/pull/56089) ([Nikita Taranov](https://github.com/nickitat)). +* Add support for `LARGE_LIST` in Apache Arrow formats. [#56118](https://github.com/ClickHouse/ClickHouse/pull/56118) ([edef](https://github.com/edef1c)). +* Allow manual compaction of `EmbeddedRocksDB` via `OPTIMIZE` query. [#56225](https://github.com/ClickHouse/ClickHouse/pull/56225) ([Azat Khuzhin](https://github.com/azat)). +* Add ability to specify BlockBasedTableOptions for `EmbeddedRocksDB` tables. [#56264](https://github.com/ClickHouse/ClickHouse/pull/56264) ([Azat Khuzhin](https://github.com/azat)). +* `SHOW COLUMNS` now displays MySQL's equivalent data type name when the connection was made through the MySQL protocol. Previously, this was the case when setting `use_mysql_types_in_show_columns = 1`. The setting is retained but made obsolete. [#56277](https://github.com/ClickHouse/ClickHouse/pull/56277) ([Robert Schulze](https://github.com/rschu1ze)). +* Fixed possible `The local set of parts of table doesn't look like the set of parts in ZooKeeper` error if server was restarted just after `TRUNCATE` or `DROP PARTITION`. [#56282](https://github.com/ClickHouse/ClickHouse/pull/56282) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fixed handling of non-const query strings in functions `formatQuery`/ `formatQuerySingleLine`. Also added `OrNull` variants of both functions that return a NULL when a query cannot be parsed instead of throwing an exception. [#56327](https://github.com/ClickHouse/ClickHouse/pull/56327) ([Robert Schulze](https://github.com/rschu1ze)). +* Allow backup of materialized view with dropped inner table instead of failing the backup. [#56387](https://github.com/ClickHouse/ClickHouse/pull/56387) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Queries to `system.replicas` initiate requests to ZooKeeper when certain columns are queried. When there are thousands of tables these requests might produce a considerable load on ZooKeeper. If there are multiple simultaneous queries to `system.replicas` they do same requests multiple times. The change is to "deduplicate" requests from concurrent queries. [#56420](https://github.com/ClickHouse/ClickHouse/pull/56420) ([Alexander Gololobov](https://github.com/davenger)). +* Fix translation to MySQL compatible query for querying external databases. [#56456](https://github.com/ClickHouse/ClickHouse/pull/56456) ([flynn](https://github.com/ucasfl)). +* Add support for backing up and restoring tables using `KeeperMap` engine. [#56460](https://github.com/ClickHouse/ClickHouse/pull/56460) ([Antonio Andelic](https://github.com/antonio2368)). +* 404 response for CompleteMultipartUpload has to be rechecked. Operation could be done on server even if client got timeout or other network errors. The next retry of CompleteMultipartUpload receives 404 response. If the object key exists that operation is considered as successful. [#56475](https://github.com/ClickHouse/ClickHouse/pull/56475) ([Sema Checherinda](https://github.com/CheSema)). +* Enable the HTTP OPTIONS method by default - it simplifies requesting ClickHouse from a web browser. [#56483](https://github.com/ClickHouse/ClickHouse/pull/56483) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The value for `dns_max_consecutive_failures` was changed by mistake in [#46550](https://github.com/ClickHouse/ClickHouse/issues/46550) - this is reverted and adjusted to a better value. Also, increased the HTTP keep-alive timeout to a reasonable value from production. [#56485](https://github.com/ClickHouse/ClickHouse/pull/56485) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Load base backups lazily (a base backup won't be loaded until it's needed). Also add some log message and profile events for backups. [#56516](https://github.com/ClickHouse/ClickHouse/pull/56516) ([Vitaly Baranov](https://github.com/vitlibar)). +* Setting `query_cache_store_results_of_queries_with_nondeterministic_functions` (with values `false` or `true`) was marked obsolete. It was replaced by setting `query_cache_nondeterministic_function_handling`, a three-valued enum that controls how the query cache handles queries with non-deterministic functions: a) throw an exception (default behavior), b) save the non-deterministic query result regardless, or c) ignore, i.e. don't throw an exception and don't cache the result. [#56519](https://github.com/ClickHouse/ClickHouse/pull/56519) ([Robert Schulze](https://github.com/rschu1ze)). +* Rewrite equality with `is null` check in JOIN ON section. Experimental *Analyzer only*. [#56538](https://github.com/ClickHouse/ClickHouse/pull/56538) ([vdimir](https://github.com/vdimir)). +* Function`concat` now supports arbitrary argument types (instead of only String and FixedString arguments). This makes it behave more similar to MySQL `concat` implementation. For example, `SELECT concat('ab', 42)` now returns `ab42`. [#56540](https://github.com/ClickHouse/ClickHouse/pull/56540) ([Serge Klochkov](https://github.com/slvrtrn)). +* Allow getting cache configuration from 'named_collection' section in config or from SQL created named collections. [#56541](https://github.com/ClickHouse/ClickHouse/pull/56541) ([Kseniia Sumarokova](https://github.com/kssenii)). +* PostgreSQL database engine: Make the removal of outdated tables less aggressive with unsuccessful postgres connection. [#56609](https://github.com/ClickHouse/ClickHouse/pull/56609) ([jsc0218](https://github.com/jsc0218)). +* It took too much time to connnect to PG when URL is not right, so the relevant query stucks there and get cancelled. [#56648](https://github.com/ClickHouse/ClickHouse/pull/56648) ([jsc0218](https://github.com/jsc0218)). +* Keeper improvement: disable compressed logs by default in Keeper. [#56763](https://github.com/ClickHouse/ClickHouse/pull/56763) ([Antonio Andelic](https://github.com/antonio2368)). +* Add config setting `wait_dictionaries_load_at_startup`. [#56782](https://github.com/ClickHouse/ClickHouse/pull/56782) ([Vitaly Baranov](https://github.com/vitlibar)). +* There was a potential vulnerability in previous ClickHouse versions: if a user has connected and unsuccessfully tried to authenticate with the "interserver secret" method, the server didn't terminate the connection immediately but continued to receive and ignore the leftover packets from the client. While these packets are ignored, they are still parsed, and if they use a compression method with another known vulnerability, it will lead to exploitation of it without authentication. This issue was found with [ClickHouse Bug Bounty Program](https://github.com/ClickHouse/ClickHouse/issues/38986) by https://twitter.com/malacupa. [#56794](https://github.com/ClickHouse/ClickHouse/pull/56794) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fetching a part waits when that part is fully committed on remote replica. It is better not send part in PreActive state. In case of zero copy this is mandatory restriction. [#56808](https://github.com/ClickHouse/ClickHouse/pull/56808) ([Sema Checherinda](https://github.com/CheSema)). +* Fix possible postgresql logical replication conversion error when using experimental `MaterializedPostgreSQL`. [#53721](https://github.com/ClickHouse/ClickHouse/pull/53721) ([takakawa](https://github.com/takakawa)). +* Implement user-level setting `alter_move_to_space_execute_async` which allow to execute queries `ALTER TABLE ... MOVE PARTITION|PART TO DISK|VOLUME` asynchronously. The size of pool for background executions is controlled by `background_move_pool_size`. Default behavior is synchronous execution. Fixes [#47643](https://github.com/ClickHouse/ClickHouse/issues/47643). [#56809](https://github.com/ClickHouse/ClickHouse/pull/56809) ([alesapin](https://github.com/alesapin)). +* Able to filter by engine when scanning system.tables, avoid unnecessary (potentially time-consuming) connection. [#56813](https://github.com/ClickHouse/ClickHouse/pull/56813) ([jsc0218](https://github.com/jsc0218)). +* Show `total_bytes` and `total_rows` in system tables for RocksDB storage. [#56816](https://github.com/ClickHouse/ClickHouse/pull/56816) ([Aleksandr Musorin](https://github.com/AVMusorin)). +* Allow basic commands in ALTER for TEMPORARY tables. [#56892](https://github.com/ClickHouse/ClickHouse/pull/56892) ([Sergey](https://github.com/icuken)). +* LZ4 compression. Buffer compressed block in a rare case when out buffer capacity is not enough for writing compressed block directly to out's buffer. [#56938](https://github.com/ClickHouse/ClickHouse/pull/56938) ([Sema Checherinda](https://github.com/CheSema)). +* Add metrics for the number of queued jobs, which is useful for the IO thread pool. [#56958](https://github.com/ClickHouse/ClickHouse/pull/56958) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add a setting for PostgreSQL table engine setting in the config file. Added a check for the setting Added documentation around the additional setting. [#56959](https://github.com/ClickHouse/ClickHouse/pull/56959) ([Peignon Melvyn](https://github.com/melvynator)). +* Function `concat` can now be called with a single argument, e.g., `SELECT concat('abc')`. This makes its behavior more consistent with MySQL's concat implementation. [#57000](https://github.com/ClickHouse/ClickHouse/pull/57000) ([Serge Klochkov](https://github.com/slvrtrn)). +* Signs all `x-amz-*` headers as required by AWS S3 docs. [#57001](https://github.com/ClickHouse/ClickHouse/pull/57001) ([Arthur Passos](https://github.com/arthurpassos)). +* Function `fromDaysSinceYearZero` (alias: `FROM_DAYS`) can now be used with unsigned and signed integer types (previously, it had to be an unsigned integer). This improve compatibility with 3rd party tools such as Tableau Online. [#57002](https://github.com/ClickHouse/ClickHouse/pull/57002) ([Serge Klochkov](https://github.com/slvrtrn)). +* Add `system.s3queue_log` to default config. [#57036](https://github.com/ClickHouse/ClickHouse/pull/57036) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Change the default for `wait_dictionaries_load_at_startup` to true, and use this setting only if `dictionaries_lazy_load` is false. [#57133](https://github.com/ClickHouse/ClickHouse/pull/57133) ([Vitaly Baranov](https://github.com/vitlibar)). +* Check dictionary source type on creation even if `dictionaries_lazy_load` is enabled. [#57134](https://github.com/ClickHouse/ClickHouse/pull/57134) ([Vitaly Baranov](https://github.com/vitlibar)). +* Plan-level optimizations can now be enabled/disabled individually. Previously, it was only possible to disable them all. The setting which previously did that (`query_plan_enable_optimizations`) is retained and can still be used to disable all optimizations. [#57152](https://github.com/ClickHouse/ClickHouse/pull/57152) ([Robert Schulze](https://github.com/rschu1ze)). +* The server's exit code will correspond to the exception code. For example, if the server cannot start due to memory limit, it will exit with the code 241 = MEMORY_LIMIT_EXCEEDED. In previous versions, the exit code for exceptions was always 70 = Poco::Util::ExitCode::EXIT_SOFTWARE. [#57153](https://github.com/ClickHouse/ClickHouse/pull/57153) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Do not demangle and symbolize stack frames from `functional` C++ header. [#57201](https://github.com/ClickHouse/ClickHouse/pull/57201) ([Mike Kot](https://github.com/myrrc)). +* HTTP server page `/dashboard` now supports charts with multiple lines. [#57236](https://github.com/ClickHouse/ClickHouse/pull/57236) ([Sergei Trifonov](https://github.com/serxa)). +* The `max_memory_usage_in_client` command line option supports a string value with a suffix (K, M, G, etc). Closes [#56879](https://github.com/ClickHouse/ClickHouse/issues/56879). [#57273](https://github.com/ClickHouse/ClickHouse/pull/57273) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Bumped Intel QPL (used by codec `DEFLATE_QPL`) from v1.2.0 to v1.3.1 . Also fixed a bug in case of BOF (Block On Fault) = 0, changed to handle page faults by falling back to SW path. [#57291](https://github.com/ClickHouse/ClickHouse/pull/57291) ([jasperzhu](https://github.com/jinjunzh)). +* Increase default `replicated_deduplication_window` of MergeTree settings from 100 to 1k. [#57335](https://github.com/ClickHouse/ClickHouse/pull/57335) ([sichenzhao](https://github.com/sichenzhao)). +* Stop using `INCONSISTENT_METADATA_FOR_BACKUP` that much. If possible prefer to continue scanning instead of stopping and starting the scanning for backup from the beginning. [#57385](https://github.com/ClickHouse/ClickHouse/pull/57385) ([Vitaly Baranov](https://github.com/vitlibar)). + +#### Build/Testing/Packaging Improvement +* Add SQLLogic test. [#56078](https://github.com/ClickHouse/ClickHouse/pull/56078) ([Han Fei](https://github.com/hanfei1991)). +* Make `clickhouse-local` and `clickhouse-client` available under short names (`ch`, `chl`, `chc`) for usability. [#56634](https://github.com/ClickHouse/ClickHouse/pull/56634) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Optimized build size further by removing unused code from external libraries. [#56786](https://github.com/ClickHouse/ClickHouse/pull/56786) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add automatic check that there are no large translation units. [#56559](https://github.com/ClickHouse/ClickHouse/pull/56559) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Lower the size of the single-binary distribution. This closes [#55181](https://github.com/ClickHouse/ClickHouse/issues/55181). [#56617](https://github.com/ClickHouse/ClickHouse/pull/56617) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Information about the sizes of every translation unit and binary file after each build will be sent to the CI database in ClickHouse Cloud. This closes [#56107](https://github.com/ClickHouse/ClickHouse/issues/56107). [#56636](https://github.com/ClickHouse/ClickHouse/pull/56636) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Certain files of "Apache Arrow" library (which we use only for non-essential things like parsing the arrow format) were rebuilt all the time regardless of the build cache. This is fixed. [#56657](https://github.com/ClickHouse/ClickHouse/pull/56657) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Avoid recompiling translation units depending on the autogenerated source file about version. [#56660](https://github.com/ClickHouse/ClickHouse/pull/56660) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Tracing data of the linker invocations will be sent to the CI database in ClickHouse Cloud. [#56725](https://github.com/ClickHouse/ClickHouse/pull/56725) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Use DWARF 5 debug symbols for the clickhouse binary (was DWARF 4 previously). [#56770](https://github.com/ClickHouse/ClickHouse/pull/56770) ([Michael Kolupaev](https://github.com/al13n321)). +* Add a new build option `SANITIZE_COVERAGE`. If it is enabled, the code is instrumented to track the coverage. The collected information is available inside ClickHouse with: (1) a new function `coverage` that returns an array of unique addresses in the code found after the previous coverage reset; (2) `SYSTEM RESET COVERAGE` query that resets the accumulated data. This allows us to compare the coverage of different tests, including differential code coverage. Continuation of [#20539](https://github.com/ClickHouse/ClickHouse/issues/20539). [#56102](https://github.com/ClickHouse/ClickHouse/pull/56102) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Some of the stack frames might not be resolved when collecting stacks. In such cases the raw address might be helpful. [#56267](https://github.com/ClickHouse/ClickHouse/pull/56267) ([Alexander Gololobov](https://github.com/davenger)). +* Add an option to disable `libssh`. [#56333](https://github.com/ClickHouse/ClickHouse/pull/56333) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Enable temporary_data_in_cache in S3 tests in CI. [#48425](https://github.com/ClickHouse/ClickHouse/pull/48425) ([vdimir](https://github.com/vdimir)). +* Set the max memory usage for clickhouse-client (`1G`) in the CI. [#56873](https://github.com/ClickHouse/ClickHouse/pull/56873) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). + +#### Bug Fix (user-visible misbehavior in an official stable release) +* Fix exerimental Analyzer - insertion from select with subquery referencing insertion table should process only insertion block. [#50857](https://github.com/ClickHouse/ClickHouse/pull/50857) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix a bug in `str_to_map` function. [#56423](https://github.com/ClickHouse/ClickHouse/pull/56423) ([Arthur Passos](https://github.com/arthurpassos)). +* Keeper `reconfig`: add timeout before yielding/taking leadership [#53481](https://github.com/ClickHouse/ClickHouse/pull/53481) ([Mike Kot](https://github.com/myrrc)). +* Fix incorrect header in grace hash join and filter pushdown [#53922](https://github.com/ClickHouse/ClickHouse/pull/53922) ([vdimir](https://github.com/vdimir)). +* Select from system tables when table based on table function. [#55540](https://github.com/ClickHouse/ClickHouse/pull/55540) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* RFC: Fix "Cannot find column X in source stream" for Distributed queries with LIMIT BY [#55836](https://github.com/ClickHouse/ClickHouse/pull/55836) ([Azat Khuzhin](https://github.com/azat)). +* Fix 'Cannot read from file:' while running client in a background [#55976](https://github.com/ClickHouse/ClickHouse/pull/55976) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix clickhouse-local exit on bad send_logs_level setting [#55994](https://github.com/ClickHouse/ClickHouse/pull/55994) ([Kruglov Pavel](https://github.com/Avogar)). +* Bug fix explain ast with parameterized view [#56004](https://github.com/ClickHouse/ClickHouse/pull/56004) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fix a crash during table loading on startup [#56232](https://github.com/ClickHouse/ClickHouse/pull/56232) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix ClickHouse-sourced dictionaries with an explicit query [#56236](https://github.com/ClickHouse/ClickHouse/pull/56236) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix segfault in signal handler for Keeper [#56266](https://github.com/ClickHouse/ClickHouse/pull/56266) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix incomplete query result for UNION in view() function. [#56274](https://github.com/ClickHouse/ClickHouse/pull/56274) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix inconsistency of "cast('0' as DateTime64(3))" and "cast('0' as Nullable(DateTime64(3)))" [#56286](https://github.com/ClickHouse/ClickHouse/pull/56286) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Fix rare race condition related to Memory allocation failure [#56303](https://github.com/ClickHouse/ClickHouse/pull/56303) ([alesapin](https://github.com/alesapin)). +* Fix restore from backup with `flatten_nested` and `data_type_default_nullable` [#56306](https://github.com/ClickHouse/ClickHouse/pull/56306) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix crash in case of adding a column with type Object(JSON) [#56307](https://github.com/ClickHouse/ClickHouse/pull/56307) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix crash in filterPushDown [#56380](https://github.com/ClickHouse/ClickHouse/pull/56380) ([vdimir](https://github.com/vdimir)). +* Fix restore from backup with mat view and dropped source table [#56383](https://github.com/ClickHouse/ClickHouse/pull/56383) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix segfault during Kerberos initialization [#56401](https://github.com/ClickHouse/ClickHouse/pull/56401) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix buffer overflow in T64 [#56434](https://github.com/ClickHouse/ClickHouse/pull/56434) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix nullable primary key in final (2) [#56452](https://github.com/ClickHouse/ClickHouse/pull/56452) ([Amos Bird](https://github.com/amosbird)). +* Fix ON CLUSTER queries without database on initial node [#56484](https://github.com/ClickHouse/ClickHouse/pull/56484) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix startup failure due to TTL dependency [#56489](https://github.com/ClickHouse/ClickHouse/pull/56489) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix ALTER COMMENT queries ON CLUSTER [#56491](https://github.com/ClickHouse/ClickHouse/pull/56491) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix ALTER COLUMN with ALIAS [#56493](https://github.com/ClickHouse/ClickHouse/pull/56493) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix empty NAMED COLLECTIONs [#56494](https://github.com/ClickHouse/ClickHouse/pull/56494) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix two cases of projection analysis. [#56502](https://github.com/ClickHouse/ClickHouse/pull/56502) ([Amos Bird](https://github.com/amosbird)). +* Fix handling of aliases in query cache [#56545](https://github.com/ClickHouse/ClickHouse/pull/56545) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix conversion from `Nullable(Enum)` to `Nullable(String)` [#56644](https://github.com/ClickHouse/ClickHouse/pull/56644) ([Nikolay Degterinsky](https://github.com/evillique)). +* More reliable log handling in Keeper [#56670](https://github.com/ClickHouse/ClickHouse/pull/56670) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix configuration merge for nodes with substitution attributes [#56694](https://github.com/ClickHouse/ClickHouse/pull/56694) ([Konstantin Bogdanov](https://github.com/thevar1able)). +* Fix duplicate usage of table function input(). [#56695](https://github.com/ClickHouse/ClickHouse/pull/56695) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix: RabbitMQ OpenSSL dynamic loading issue [#56703](https://github.com/ClickHouse/ClickHouse/pull/56703) ([Igor Nikonov](https://github.com/devcrafter)). +* Fix crash in GCD codec in case when zeros present in data [#56704](https://github.com/ClickHouse/ClickHouse/pull/56704) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix 'mutex lock failed: Invalid argument' in clickhouse-local during insert into function [#56710](https://github.com/ClickHouse/ClickHouse/pull/56710) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix Date text parsing in optimistic path [#56765](https://github.com/ClickHouse/ClickHouse/pull/56765) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix crash in FPC codec [#56795](https://github.com/ClickHouse/ClickHouse/pull/56795) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* DatabaseReplicated: fix DDL query timeout after recovering a replica [#56796](https://github.com/ClickHouse/ClickHouse/pull/56796) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix incorrect nullable columns reporting in MySQL binary protocol [#56799](https://github.com/ClickHouse/ClickHouse/pull/56799) ([Serge Klochkov](https://github.com/slvrtrn)). +* Support Iceberg metadata files for metastore tables [#56810](https://github.com/ClickHouse/ClickHouse/pull/56810) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix TSAN report under transform [#56817](https://github.com/ClickHouse/ClickHouse/pull/56817) ([Raúl Marín](https://github.com/Algunenano)). +* Fix SET query and SETTINGS formatting [#56825](https://github.com/ClickHouse/ClickHouse/pull/56825) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix failure to start due to table dependency in joinGet [#56828](https://github.com/ClickHouse/ClickHouse/pull/56828) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix flattening existing Nested columns during ADD COLUMN [#56830](https://github.com/ClickHouse/ClickHouse/pull/56830) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix allow cr end of line for csv [#56901](https://github.com/ClickHouse/ClickHouse/pull/56901) ([KevinyhZou](https://github.com/KevinyhZou)). +* Fix `tryBase64Decode` with invalid input [#56913](https://github.com/ClickHouse/ClickHouse/pull/56913) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix generating deep nested columns in CapnProto/Protobuf schemas [#56941](https://github.com/ClickHouse/ClickHouse/pull/56941) ([Kruglov Pavel](https://github.com/Avogar)). +* Prevent incompatible ALTER of projection columns [#56948](https://github.com/ClickHouse/ClickHouse/pull/56948) ([Amos Bird](https://github.com/amosbird)). +* Fix sqlite file path validation [#56984](https://github.com/ClickHouse/ClickHouse/pull/56984) ([San](https://github.com/santrancisco)). +* S3Queue: fix metadata reference increment [#56990](https://github.com/ClickHouse/ClickHouse/pull/56990) ([Kseniia Sumarokova](https://github.com/kssenii)). +* S3Queue minor fix [#56999](https://github.com/ClickHouse/ClickHouse/pull/56999) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix file path validation for DatabaseFileSystem [#57029](https://github.com/ClickHouse/ClickHouse/pull/57029) ([San](https://github.com/santrancisco)). +* Fix `fuzzBits` with `ARRAY JOIN` [#57033](https://github.com/ClickHouse/ClickHouse/pull/57033) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix Nullptr dereference in partial merge join with joined_subquery_re… [#57048](https://github.com/ClickHouse/ClickHouse/pull/57048) ([vdimir](https://github.com/vdimir)). +* Fix race condition in RemoteSource [#57052](https://github.com/ClickHouse/ClickHouse/pull/57052) ([Raúl Marín](https://github.com/Algunenano)). +* Implement `bitHammingDistance` for big integers [#57073](https://github.com/ClickHouse/ClickHouse/pull/57073) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* S3-style links bug fix [#57075](https://github.com/ClickHouse/ClickHouse/pull/57075) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Fix JSON_QUERY function with multiple numeric paths [#57096](https://github.com/ClickHouse/ClickHouse/pull/57096) ([KevinyhZou](https://github.com/KevinyhZou)). +* Fix buffer overflow in Gorilla codec [#57107](https://github.com/ClickHouse/ClickHouse/pull/57107) ([Nikolay Degterinsky](https://github.com/evillique)). +* Close interserver connection on any exception before authentication [#57142](https://github.com/ClickHouse/ClickHouse/pull/57142) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix segfault after ALTER UPDATE with Nullable MATERIALIZED column [#57147](https://github.com/ClickHouse/ClickHouse/pull/57147) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix incorrect JOIN plan optimization with partially materialized normal projection [#57196](https://github.com/ClickHouse/ClickHouse/pull/57196) ([Amos Bird](https://github.com/amosbird)). +* Ignore comments when comparing column descriptions [#57259](https://github.com/ClickHouse/ClickHouse/pull/57259) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix `ReadonlyReplica` metric for all cases [#57267](https://github.com/ClickHouse/ClickHouse/pull/57267) ([Antonio Andelic](https://github.com/antonio2368)). +* Background merges correctly use temporary data storage in the cache [#57275](https://github.com/ClickHouse/ClickHouse/pull/57275) ([vdimir](https://github.com/vdimir)). +* Keeper fix for changelog and snapshots [#57299](https://github.com/ClickHouse/ClickHouse/pull/57299) ([Antonio Andelic](https://github.com/antonio2368)). +* Ignore finished ON CLUSTER tasks if hostname changed [#57339](https://github.com/ClickHouse/ClickHouse/pull/57339) ([Alexander Tokmakov](https://github.com/tavplubix)). +* MergeTree mutations reuse source part index granularity [#57352](https://github.com/ClickHouse/ClickHouse/pull/57352) ([Maksim Kita](https://github.com/kitaisreal)). +* FS cache: add a limit for background download [#57424](https://github.com/ClickHouse/ClickHouse/pull/57424) ([Kseniia Sumarokova](https://github.com/kssenii)). + + +### ClickHouse release 23.10, 2023-11-02 {#2310} + +#### Backward Incompatible Change +* There is no longer an option to automatically remove broken data parts. This closes [#55174](https://github.com/ClickHouse/ClickHouse/issues/55174). [#55184](https://github.com/ClickHouse/ClickHouse/pull/55184) ([Alexey Milovidov](https://github.com/alexey-milovidov)). [#55557](https://github.com/ClickHouse/ClickHouse/pull/55557) ([Jihyuk Bok](https://github.com/tomahawk28)). +* The obsolete in-memory data parts can no longer be read from the write-ahead log. If you have configured in-memory parts before, they have to be removed before the upgrade. [#55186](https://github.com/ClickHouse/ClickHouse/pull/55186) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Remove the integration with Meilisearch. Reason: it was compatible only with the old version 0.18. The recent version of Meilisearch changed the protocol and does not work anymore. Note: we would appreciate it if you help to return it back. [#55189](https://github.com/ClickHouse/ClickHouse/pull/55189) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Rename directory monitor concept into background INSERT. All the settings `*directory_monitor*` had been renamed to `distributed_background_insert*`. *Backward compatibility should be preserved* (since old settings had been added as an alias). [#55978](https://github.com/ClickHouse/ClickHouse/pull/55978) ([Azat Khuzhin](https://github.com/azat)). +* Do not interpret the `send_timeout` set on the client side as the `receive_timeout` on the server side and vise-versa. [#56035](https://github.com/ClickHouse/ClickHouse/pull/56035) ([Azat Khuzhin](https://github.com/azat)). +* Comparison of time intervals with different units will throw an exception. This closes [#55942](https://github.com/ClickHouse/ClickHouse/issues/55942). You might have occasionally rely on the previous behavior when the underlying numeric values were compared regardless of the units. [#56090](https://github.com/ClickHouse/ClickHouse/pull/56090) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Rewrited the experimental `S3Queue` table engine completely: changed the way we keep information in zookeeper which allows to make less zookeeper requests, added caching of zookeeper state in cases when we know the state will not change, improved the polling from s3 process to make it less aggressive, changed the way ttl and max set for trached files is maintained, now it is a background process. Added `system.s3queue` and `system.s3queue_log` tables. Closes [#54998](https://github.com/ClickHouse/ClickHouse/issues/54998). [#54422](https://github.com/ClickHouse/ClickHouse/pull/54422) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Arbitrary paths on HTTP endpoint are no longer interpreted as a request to the `/query` endpoint. [#55521](https://github.com/ClickHouse/ClickHouse/pull/55521) ([Konstantin Bogdanov](https://github.com/thevar1able)). + +#### New Feature +* Add function `arrayFold(accumulator, x1, ..., xn -> expression, initial, array1, ..., arrayn)` which applies a lambda function to multiple arrays of the same cardinality and collects the result in an accumulator. [#49794](https://github.com/ClickHouse/ClickHouse/pull/49794) ([Lirikl](https://github.com/Lirikl)). +* Support for `Npy` format. `SELECT * FROM file('example_array.npy', Npy)`. [#55982](https://github.com/ClickHouse/ClickHouse/pull/55982) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* If a table has a space-filling curve in its key, e.g., `ORDER BY mortonEncode(x, y)`, the conditions on its arguments, e.g., `x >= 10 AND x <= 20 AND y >= 20 AND y <= 30` can be used for indexing. A setting `analyze_index_with_space_filling_curves` is added to enable or disable this analysis. This closes [#41195](https://github.com/ClickHouse/ClickHouse/issue/41195). Continuation of [#4538](https://github.com/ClickHouse/ClickHouse/pull/4538). Continuation of [#6286](https://github.com/ClickHouse/ClickHouse/pull/6286). Continuation of [#28130](https://github.com/ClickHouse/ClickHouse/pull/28130). Continuation of [#41753](https://github.com/ClickHouse/ClickHouse/pull/#41753). [#55642](https://github.com/ClickHouse/ClickHouse/pull/55642) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* A new setting called `force_optimize_projection_name`, it takes a name of projection as an argument. If it's value set to a non-empty string, ClickHouse checks that this projection is used in the query at least once. Closes [#55331](https://github.com/ClickHouse/ClickHouse/issues/55331). [#56134](https://github.com/ClickHouse/ClickHouse/pull/56134) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Support asynchronous inserts with external data via native protocol. Previously it worked only if data is inlined into query. [#54730](https://github.com/ClickHouse/ClickHouse/pull/54730) ([Anton Popov](https://github.com/CurtizJ)). +* Added aggregation function `lttb` which uses the [Largest-Triangle-Three-Buckets](https://skemman.is/bitstream/1946/15343/3/SS_MSthesis.pdf) algorithm for downsampling data for visualization. [#53145](https://github.com/ClickHouse/ClickHouse/pull/53145) ([Sinan](https://github.com/sinsinan)). +* Query`CHECK TABLE` has better performance and usability (sends progress updates, cancellable). Support checking particular part with `CHECK TABLE ... PART 'part_name'`. [#53404](https://github.com/ClickHouse/ClickHouse/pull/53404) ([vdimir](https://github.com/vdimir)). +* Added function `jsonMergePatch`. When working with JSON data as strings, it provides a way to merge these strings (of JSON objects) together to form a single string containing a single JSON object. [#54364](https://github.com/ClickHouse/ClickHouse/pull/54364) ([Memo](https://github.com/Joeywzr)). +* The second part of Kusto Query Language dialect support. [Phase 1 implementation ](https://github.com/ClickHouse/ClickHouse/pull/37961) has been merged. [#42510](https://github.com/ClickHouse/ClickHouse/pull/42510) ([larryluogit](https://github.com/larryluogit)). +* Added a new SQL function, `arrayRandomSample(arr, k)` which returns a sample of k elements from the input array. Similar functionality could previously be achieved only with less convenient syntax, e.g. "SELECT arrayReduce('groupArraySample(3)', range(10))". [#54391](https://github.com/ClickHouse/ClickHouse/pull/54391) ([itayisraelov](https://github.com/itayisraelov)). +* Introduce `-ArgMin`/`-ArgMax` aggregate combinators which allow to aggregate by min/max values only. One use case can be found in [#54818](https://github.com/ClickHouse/ClickHouse/issues/54818). This PR also reorganize combinators into dedicated folder. [#54947](https://github.com/ClickHouse/ClickHouse/pull/54947) ([Amos Bird](https://github.com/amosbird)). +* Allow to drop cache for Protobuf format with `SYSTEM DROP SCHEMA FORMAT CACHE [FOR Protobuf]`. [#55064](https://github.com/ClickHouse/ClickHouse/pull/55064) ([Aleksandr Musorin](https://github.com/AVMusorin)). +* Add external HTTP Basic authenticator. [#55199](https://github.com/ClickHouse/ClickHouse/pull/55199) ([Aleksei Filatov](https://github.com/aalexfvk)). +* Added function `byteSwap` which reverses the bytes of unsigned integers. This is particularly useful for reversing values of types which are represented as unsigned integers internally such as IPv4. [#55211](https://github.com/ClickHouse/ClickHouse/pull/55211) ([Priyansh Agrawal](https://github.com/Priyansh121096)). +* Added function `formatQuery` which returns a formatted version (possibly spanning multiple lines) of a SQL query string. Also added function `formatQuerySingleLine` which does the same but the returned string will not contain linebreaks. [#55239](https://github.com/ClickHouse/ClickHouse/pull/55239) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Added `DWARF` input format that reads debug symbols from an ELF executable/library/object file. [#55450](https://github.com/ClickHouse/ClickHouse/pull/55450) ([Michael Kolupaev](https://github.com/al13n321)). +* Allow to save unparsed records and errors in RabbitMQ, NATS and FileLog engines. Add virtual columns `_error` and `_raw_message`(for NATS and RabbitMQ), `_raw_record` (for FileLog) that are filled when ClickHouse fails to parse new record. The behaviour is controlled under storage settings `nats_handle_error_mode` for NATS, `rabbitmq_handle_error_mode` for RabbitMQ, `handle_error_mode` for FileLog similar to `kafka_handle_error_mode`. If it's set to `default`, en exception will be thrown when ClickHouse fails to parse a record, if it's set to `stream`, erorr and raw record will be saved into virtual columns. Closes [#36035](https://github.com/ClickHouse/ClickHouse/issues/36035). [#55477](https://github.com/ClickHouse/ClickHouse/pull/55477) ([Kruglov Pavel](https://github.com/Avogar)). +* Keeper client improvement: add `get_all_children_number command` that returns number of all children nodes under a specific path. [#55485](https://github.com/ClickHouse/ClickHouse/pull/55485) ([guoxiaolong](https://github.com/guoxiaolongzte)). +* Keeper client improvement: add `get_direct_children_number` command that returns number of direct children nodes under a path. [#55898](https://github.com/ClickHouse/ClickHouse/pull/55898) ([xuzifu666](https://github.com/xuzifu666)). +* Add statement `SHOW SETTING setting_name` which is a simpler version of existing statement `SHOW SETTINGS`. [#55979](https://github.com/ClickHouse/ClickHouse/pull/55979) ([Maksim Kita](https://github.com/kitaisreal)). +* Added fields `substreams` and `filenames` to the `system.parts_columns` table. [#55108](https://github.com/ClickHouse/ClickHouse/pull/55108) ([Anton Popov](https://github.com/CurtizJ)). +* Add support for `SHOW MERGES` query. [#55815](https://github.com/ClickHouse/ClickHouse/pull/55815) ([megao](https://github.com/jetgm)). +* Introduce a setting `create_table_empty_primary_key_by_default` for default `ORDER BY ()`. [#55899](https://github.com/ClickHouse/ClickHouse/pull/55899) ([Srikanth Chekuri](https://github.com/srikanthccv)). + +#### Performance Improvement +* Add option `query_plan_preserve_num_streams_after_window_functions` to preserve the number of streams after evaluating window functions to allow parallel stream processing. [#50771](https://github.com/ClickHouse/ClickHouse/pull/50771) ([frinkr](https://github.com/frinkr)). +* Release more streams if data is small. [#53867](https://github.com/ClickHouse/ClickHouse/pull/53867) ([Jiebin Sun](https://github.com/jiebinn)). +* RoaringBitmaps being optimized before serialization. [#55044](https://github.com/ClickHouse/ClickHouse/pull/55044) ([UnamedRus](https://github.com/UnamedRus)). +* Posting lists in inverted indexes are now optimized to use the smallest possible representation for internal bitmaps. Depending on the repetitiveness of the data, this may significantly reduce the space consumption of inverted indexes. [#55069](https://github.com/ClickHouse/ClickHouse/pull/55069) ([Harry Lee](https://github.com/HarryLeeIBM)). +* Fix contention on Context lock, this significantly improves performance for a lot of short-running concurrent queries. [#55121](https://github.com/ClickHouse/ClickHouse/pull/55121) ([Maksim Kita](https://github.com/kitaisreal)). +* Improved the performance of inverted index creation by 30%. This was achieved by replacing `std::unordered_map` with `absl::flat_hash_map`. [#55210](https://github.com/ClickHouse/ClickHouse/pull/55210) ([Harry Lee](https://github.com/HarryLeeIBM)). +* Support ORC filter push down (rowgroup level). [#55330](https://github.com/ClickHouse/ClickHouse/pull/55330) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Improve performance of external aggregation with a lot of temporary files. [#55489](https://github.com/ClickHouse/ClickHouse/pull/55489) ([Maksim Kita](https://github.com/kitaisreal)). +* Set a reasonable size for the marks cache for secondary indices by default to avoid loading the marks over and over again. [#55654](https://github.com/ClickHouse/ClickHouse/pull/55654) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Avoid unnecessary reconstruction of index granules when reading skip indexes. This addresses [#55653](https://github.com/ClickHouse/ClickHouse/issues/55653#issuecomment-1763766009). [#55683](https://github.com/ClickHouse/ClickHouse/pull/55683) ([Amos Bird](https://github.com/amosbird)). +* Cache CAST function in set during execution to improve the performance of function `IN` when set element type doesn't exactly match column type. [#55712](https://github.com/ClickHouse/ClickHouse/pull/55712) ([Duc Canh Le](https://github.com/canhld94)). +* Performance improvement for `ColumnVector::insertMany` and `ColumnVector::insertManyFrom`. [#55714](https://github.com/ClickHouse/ClickHouse/pull/55714) ([frinkr](https://github.com/frinkr)). +* Optimized Map subscript operations by predicting the next row's key position and reduce the comparisons. [#55929](https://github.com/ClickHouse/ClickHouse/pull/55929) ([lgbo](https://github.com/lgbo-ustc)). +* Support struct fields pruning in Parquet (in previous versions it didn't work in some cases). [#56117](https://github.com/ClickHouse/ClickHouse/pull/56117) ([lgbo](https://github.com/lgbo-ustc)). +* Add the ability to tune the number of parallel replicas used in a query execution based on the estimation of rows to read. [#51692](https://github.com/ClickHouse/ClickHouse/pull/51692) ([Raúl Marín](https://github.com/Algunenano)). +* Optimized external aggregation memory consumption in case many temporary files were generated. [#54798](https://github.com/ClickHouse/ClickHouse/pull/54798) ([Nikita Taranov](https://github.com/nickitat)). +* Distributed queries executed in `async_socket_for_remote` mode (default) now respect `max_threads` limit. Previously, some queries could create excessive threads (up to `max_distributed_connections`), causing server performance issues. [#53504](https://github.com/ClickHouse/ClickHouse/pull/53504) ([filimonov](https://github.com/filimonov)). +* Caching skip-able entries while executing DDL from Zookeeper distributed DDL queue. [#54828](https://github.com/ClickHouse/ClickHouse/pull/54828) ([Duc Canh Le](https://github.com/canhld94)). +* Experimental inverted indexes do not store tokens with too many matches (i.e. row ids in the posting list). This saves space and avoids ineffective index lookups when sequential scans would be equally fast or faster. The previous heuristics (`density` parameter passed to the index definition) that controlled when tokens would not be stored was too confusing for users. A much simpler heuristics based on parameter `max_rows_per_postings_list` (default: 64k) is introduced which directly controls the maximum allowed number of row ids in a postings list. [#55616](https://github.com/ClickHouse/ClickHouse/pull/55616) ([Harry Lee](https://github.com/HarryLeeIBM)). +* Improve write performance to `EmbeddedRocksDB` tables. [#55732](https://github.com/ClickHouse/ClickHouse/pull/55732) ([Duc Canh Le](https://github.com/canhld94)). +* Improved overall resilience for ClickHouse in case of many parts within partition (more than 1000). It might reduce the number of `TOO_MANY_PARTS` errors. [#55526](https://github.com/ClickHouse/ClickHouse/pull/55526) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Reduced memory consumption during loading of hierarchical dictionaries. [#55838](https://github.com/ClickHouse/ClickHouse/pull/55838) ([Nikita Taranov](https://github.com/nickitat)). +* All dictionaries support setting `dictionary_use_async_executor`. [#55839](https://github.com/ClickHouse/ClickHouse/pull/55839) ([vdimir](https://github.com/vdimir)). +* Prevent excesive memory usage when deserializing AggregateFunctionTopKGenericData. [#55947](https://github.com/ClickHouse/ClickHouse/pull/55947) ([Raúl Marín](https://github.com/Algunenano)). +* On a Keeper with lots of watches AsyncMetrics threads can consume 100% of CPU for noticable time in `DB::KeeperStorage::getSessionsWithWatchesCount`. The fix is to avoid traversing heavy `watches` and `list_watches` sets. [#56054](https://github.com/ClickHouse/ClickHouse/pull/56054) ([Alexander Gololobov](https://github.com/davenger)). +* Add setting `optimize_trivial_approximate_count_query` to use `count` approximation for storage EmbeddedRocksDB. Enable trivial count for StorageJoin. [#55806](https://github.com/ClickHouse/ClickHouse/pull/55806) ([Duc Canh Le](https://github.com/canhld94)). + +#### Improvement +* Functions `toDayOfWeek` (MySQL alias: `DAYOFWEEK`), `toYearWeek` (`YEARWEEK`) and `toWeek` (`WEEK`) now supports `String` arguments. This makes its behavior consistent with MySQL's behavior. [#55589](https://github.com/ClickHouse/ClickHouse/pull/55589) ([Robert Schulze](https://github.com/rschu1ze)). +* Introduced setting `date_time_overflow_behavior` with possible values `ignore`, `throw`, `saturate` that controls the overflow behavior when converting from Date, Date32, DateTime64, Integer or Float to Date, Date32, DateTime or DateTime64. [#55696](https://github.com/ClickHouse/ClickHouse/pull/55696) ([Andrey Zvonov](https://github.com/zvonand)). +* Implement query parameters support for `ALTER TABLE ... ACTION PARTITION [ID] {parameter_name:ParameterType}`. Merges [#49516](https://github.com/ClickHouse/ClickHouse/issues/49516). Closes [#49449](https://github.com/ClickHouse/ClickHouse/issues/49449). [#55604](https://github.com/ClickHouse/ClickHouse/pull/55604) ([alesapin](https://github.com/alesapin)). +* Print processor ids in a prettier manner in EXPLAIN. [#48852](https://github.com/ClickHouse/ClickHouse/pull/48852) ([Vlad Seliverstov](https://github.com/behebot)). +* Creating a direct dictionary with a lifetime field will be rejected at create time (as the lifetime does not make sense for direct dictionaries). Fixes: [#27861](https://github.com/ClickHouse/ClickHouse/issues/27861). [#49043](https://github.com/ClickHouse/ClickHouse/pull/49043) ([Rory Crispin](https://github.com/RoryCrispin)). +* Allow parameters in queries with partitions like `ALTER TABLE t DROP PARTITION`. Closes [#49449](https://github.com/ClickHouse/ClickHouse/issues/49449). [#49516](https://github.com/ClickHouse/ClickHouse/pull/49516) ([Nikolay Degterinsky](https://github.com/evillique)). +* Add a new column `xid` for `system.zookeeper_connection`. [#50702](https://github.com/ClickHouse/ClickHouse/pull/50702) ([helifu](https://github.com/helifu)). +* Display the correct server settings in `system.server_settings` after configuration reload. [#53774](https://github.com/ClickHouse/ClickHouse/pull/53774) ([helifu](https://github.com/helifu)). +* Add support for mathematical minus `−` character in queries, similar to `-`. [#54100](https://github.com/ClickHouse/ClickHouse/pull/54100) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add replica groups to the experimental `Replicated` database engine. Closes [#53620](https://github.com/ClickHouse/ClickHouse/issues/53620). [#54421](https://github.com/ClickHouse/ClickHouse/pull/54421) ([Nikolay Degterinsky](https://github.com/evillique)). +* It is better to retry retriable s3 errors than totally fail the query. Set bigger value to the s3_retry_attempts by default. [#54770](https://github.com/ClickHouse/ClickHouse/pull/54770) ([Sema Checherinda](https://github.com/CheSema)). +* Add load balancing mode `hostname_levenshtein_distance`. [#54826](https://github.com/ClickHouse/ClickHouse/pull/54826) ([JackyWoo](https://github.com/JackyWoo)). +* Improve hiding secrets in logs. [#55089](https://github.com/ClickHouse/ClickHouse/pull/55089) ([Vitaly Baranov](https://github.com/vitlibar)). +* For now the projection analysis will be performed only on top of query plan. The setting `query_plan_optimize_projection` became obsolete (it was enabled by default long time ago). [#55112](https://github.com/ClickHouse/ClickHouse/pull/55112) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* When function `untuple` is now called on a tuple with named elements and itself has an alias (e.g. `select untuple(tuple(1)::Tuple(element_alias Int)) AS untuple_alias`), then the result column name is now generated from the untuple alias and the tuple element alias (in the example: "untuple_alias.element_alias"). [#55123](https://github.com/ClickHouse/ClickHouse/pull/55123) ([garcher22](https://github.com/garcher22)). +* Added setting `describe_include_virtual_columns`, which allows to include virtual columns of table into result of `DESCRIBE` query. Added setting `describe_compact_output`. If it is set to `true`, `DESCRIBE` query returns only names and types of columns without extra information. [#55129](https://github.com/ClickHouse/ClickHouse/pull/55129) ([Anton Popov](https://github.com/CurtizJ)). +* Sometimes `OPTIMIZE` with `optimize_throw_if_noop=1` may fail with an error `unknown reason` while the real cause of it - different projections in different parts. This behavior is fixed. [#55130](https://github.com/ClickHouse/ClickHouse/pull/55130) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Allow to have several `MaterializedPostgreSQL` tables following the same Postgres table. By default this behaviour is not enabled (for compatibility, because it is a backward-incompatible change), but can be turned on with setting `materialized_postgresql_use_unique_replication_consumer_identifier`. Closes [#54918](https://github.com/ClickHouse/ClickHouse/issues/54918). [#55145](https://github.com/ClickHouse/ClickHouse/pull/55145) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Allow to parse negative `DateTime64` and `DateTime` with fractional part from short strings. [#55146](https://github.com/ClickHouse/ClickHouse/pull/55146) ([Andrey Zvonov](https://github.com/zvonand)). +* To improve compatibility with MySQL, 1. `information_schema.tables` now includes the new field `table_rows`, and 2. `information_schema.columns` now includes the new field `extra`. [#55215](https://github.com/ClickHouse/ClickHouse/pull/55215) ([Robert Schulze](https://github.com/rschu1ze)). +* Clickhouse-client won't show "0 rows in set" if it is zero and if exception was thrown. [#55240](https://github.com/ClickHouse/ClickHouse/pull/55240) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Support rename table without keyword `TABLE` like `RENAME db.t1 to db.t2`. [#55373](https://github.com/ClickHouse/ClickHouse/pull/55373) ([凌涛](https://github.com/lingtaolf)). +* Add `internal_replication` to `system.clusters`. [#55377](https://github.com/ClickHouse/ClickHouse/pull/55377) ([Konstantin Morozov](https://github.com/k-morozov)). +* Select remote proxy resolver based on request protocol, add proxy feature docs and remove `DB::ProxyConfiguration::Protocol::ANY`. [#55430](https://github.com/ClickHouse/ClickHouse/pull/55430) ([Arthur Passos](https://github.com/arthurpassos)). +* Avoid retrying keeper operations on INSERT after table shutdown. [#55519](https://github.com/ClickHouse/ClickHouse/pull/55519) ([Azat Khuzhin](https://github.com/azat)). +* `SHOW COLUMNS` now correctly reports type `FixedString` as `BLOB` if setting `use_mysql_types_in_show_columns` is on. Also added two new settings, `mysql_map_string_to_text_in_show_columns` and `mysql_map_fixed_string_to_text_in_show_columns` to switch the output for types `String` and `FixedString` as `TEXT` or `BLOB`. [#55617](https://github.com/ClickHouse/ClickHouse/pull/55617) ([Serge Klochkov](https://github.com/slvrtrn)). +* During ReplicatedMergeTree tables startup clickhouse server checks set of parts for unexpected parts (exists locally, but not in zookeeper). All unexpected parts move to detached directory and instead of them server tries to restore some ancestor (covered) parts. Now server tries to restore closest ancestors instead of random covered parts. [#55645](https://github.com/ClickHouse/ClickHouse/pull/55645) ([alesapin](https://github.com/alesapin)). +* The advanced dashboard now supports draggable charts on touch devices. This closes [#54206](https://github.com/ClickHouse/ClickHouse/issues/54206). [#55649](https://github.com/ClickHouse/ClickHouse/pull/55649) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Use the default query format if declared when outputting exception with `http_write_exception_in_output_format`. [#55739](https://github.com/ClickHouse/ClickHouse/pull/55739) ([Raúl Marín](https://github.com/Algunenano)). +* Provide a better message for common MATERIALIZED VIEW pitfalls. [#55826](https://github.com/ClickHouse/ClickHouse/pull/55826) ([Raúl Marín](https://github.com/Algunenano)). +* If you dropped the current database, you will still be able to run some queries in `clickhouse-local` and switch to another database. This makes the behavior consistent with `clickhouse-client`. This closes [#55834](https://github.com/ClickHouse/ClickHouse/issues/55834). [#55853](https://github.com/ClickHouse/ClickHouse/pull/55853) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Functions `(add|subtract)(Year|Quarter|Month|Week|Day|Hour|Minute|Second|Millisecond|Microsecond|Nanosecond)` now support string-encoded date arguments, e.g. `SELECT addDays('2023-10-22', 1)`. This increases compatibility with MySQL and is needed by Tableau Online. [#55869](https://github.com/ClickHouse/ClickHouse/pull/55869) ([Robert Schulze](https://github.com/rschu1ze)). +* The setting `apply_deleted_mask` when disabled allows to read rows that where marked as deleted by lightweight DELETE queries. This is useful for debugging. [#55952](https://github.com/ClickHouse/ClickHouse/pull/55952) ([Alexander Gololobov](https://github.com/davenger)). +* Allow skipping `null` values when serailizing Tuple to json objects, which makes it possible to keep compatiability with Spark's `to_json` function, which is also useful for gluten. [#55956](https://github.com/ClickHouse/ClickHouse/pull/55956) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Functions `(add|sub)Date` now support string-encoded date arguments, e.g. `SELECT addDate('2023-10-22 11:12:13', INTERVAL 5 MINUTE)`. The same support for string-encoded date arguments is added to the plus and minus operators, e.g. `SELECT '2023-10-23' + INTERVAL 1 DAY`. This increases compatibility with MySQL and is needed by Tableau Online. [#55960](https://github.com/ClickHouse/ClickHouse/pull/55960) ([Robert Schulze](https://github.com/rschu1ze)). +* Allow unquoted strings with CR (`\r`) in CSV format. Closes [#39930](https://github.com/ClickHouse/ClickHouse/issues/39930). [#56046](https://github.com/ClickHouse/ClickHouse/pull/56046) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow to run `clickhouse-keeper` using embedded config. [#56086](https://github.com/ClickHouse/ClickHouse/pull/56086) ([Maksim Kita](https://github.com/kitaisreal)). +* Set limit of the maximum configuration value for `queued.min.messages` to avoid problem with start fetching data with Kafka. [#56121](https://github.com/ClickHouse/ClickHouse/pull/56121) ([Stas Morozov](https://github.com/r3b-fish)). +* Fixed a typo in SQL function `minSampleSizeContinous` (renamed `minSampleSizeContinuous`). Old name is preserved for backward compatibility. This closes: [#56139](https://github.com/ClickHouse/ClickHouse/issues/56139). [#56143](https://github.com/ClickHouse/ClickHouse/pull/56143) ([Dorota Szeremeta](https://github.com/orotaday)). +* Print path for broken parts on disk before shutting down the server. Before this change if a part is corrupted on disk and server cannot start, it was almost impossible to understand which part is broken. This is fixed. [#56181](https://github.com/ClickHouse/ClickHouse/pull/56181) ([Duc Canh Le](https://github.com/canhld94)). + +#### Build/Testing/Packaging Improvement +* If the database in Docker is already initialized, it doesn't need to be initialized again upon subsequent launches. This can potentially fix the issue of infinite container restarts when the database fails to load within 1000 attempts (relevant for very large databases and multi-node setups). [#50724](https://github.com/ClickHouse/ClickHouse/pull/50724) ([Alexander Nikolaev](https://github.com/AlexNik)). +* Resource with source code including submodules is built in Darwin special build task. It may be used to build ClickHouse without checking out the submodules. [#51435](https://github.com/ClickHouse/ClickHouse/pull/51435) ([Ilya Yatsishin](https://github.com/qoega)). +* An error was occuring when building ClickHouse with the AVX series of instructions enabled globally (which isn't recommended). The reason is that snappy does not enable `SNAPPY_HAVE_X86_CRC32`. [#55049](https://github.com/ClickHouse/ClickHouse/pull/55049) ([monchickey](https://github.com/monchickey)). +* Solve issue with launching standalone `clickhouse-keeper` from `clickhouse-server` package. [#55226](https://github.com/ClickHouse/ClickHouse/pull/55226) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* In the tests, RabbitMQ version is updated to 3.12.6. Improved logs collection for RabbitMQ tests. [#55424](https://github.com/ClickHouse/ClickHouse/pull/55424) ([Ilya Yatsishin](https://github.com/qoega)). +* Modified the error message difference between openssl and boringssl to fix the functional test. [#55975](https://github.com/ClickHouse/ClickHouse/pull/55975) ([MeenaRenganathan22](https://github.com/MeenaRenganathan22)). +* Use upstream repo for apache datasketches. [#55787](https://github.com/ClickHouse/ClickHouse/pull/55787) ([Nikita Taranov](https://github.com/nickitat)). + +#### Bug Fix (user-visible misbehavior in an official stable release) +* Skip hardlinking inverted index files in mutation [#47663](https://github.com/ClickHouse/ClickHouse/pull/47663) ([cangyin](https://github.com/cangyin)). +* Fixed bug of `match` function (regex) with pattern containing alternation produces incorrect key condition. Closes #53222. [#54696](https://github.com/ClickHouse/ClickHouse/pull/54696) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix 'Cannot find column' in read-in-order optimization with ARRAY JOIN [#51746](https://github.com/ClickHouse/ClickHouse/pull/51746) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Support missed experimental `Object(Nullable(json))` subcolumns in query. [#54052](https://github.com/ClickHouse/ClickHouse/pull/54052) ([zps](https://github.com/VanDarkholme7)). +* Re-add fix for `accurateCastOrNull` [#54629](https://github.com/ClickHouse/ClickHouse/pull/54629) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Fix detecting `DEFAULT` for columns of a Distributed table created without AS [#55060](https://github.com/ClickHouse/ClickHouse/pull/55060) ([Vitaly Baranov](https://github.com/vitlibar)). +* Proper cleanup in case of exception in ctor of ShellCommandSource [#55103](https://github.com/ClickHouse/ClickHouse/pull/55103) ([Alexander Gololobov](https://github.com/davenger)). +* Fix deadlock in LDAP assigned role update [#55119](https://github.com/ClickHouse/ClickHouse/pull/55119) ([Julian Maicher](https://github.com/jmaicher)). +* Suppress error statistics update for internal exceptions [#55128](https://github.com/ClickHouse/ClickHouse/pull/55128) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix deadlock in backups [#55132](https://github.com/ClickHouse/ClickHouse/pull/55132) ([alesapin](https://github.com/alesapin)). +* Fix storage Iceberg files retrieval [#55144](https://github.com/ClickHouse/ClickHouse/pull/55144) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix partition pruning of extra columns in set. [#55172](https://github.com/ClickHouse/ClickHouse/pull/55172) ([Amos Bird](https://github.com/amosbird)). +* Fix recalculation of skip indexes in ALTER UPDATE queries when table has adaptive granularity [#55202](https://github.com/ClickHouse/ClickHouse/pull/55202) ([Duc Canh Le](https://github.com/canhld94)). +* Fix for background download in fs cache [#55252](https://github.com/ClickHouse/ClickHouse/pull/55252) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Avoid possible memory leaks in compressors in case of missing buffer finalization [#55262](https://github.com/ClickHouse/ClickHouse/pull/55262) ([Azat Khuzhin](https://github.com/azat)). +* Fix functions execution over sparse columns [#55275](https://github.com/ClickHouse/ClickHouse/pull/55275) ([Azat Khuzhin](https://github.com/azat)). +* Fix incorrect merging of Nested for SELECT FINAL FROM SummingMergeTree [#55276](https://github.com/ClickHouse/ClickHouse/pull/55276) ([Azat Khuzhin](https://github.com/azat)). +* Fix bug with inability to drop detached partition in replicated merge tree on top of S3 without zero copy [#55309](https://github.com/ClickHouse/ClickHouse/pull/55309) ([alesapin](https://github.com/alesapin)). +* Fix a crash in MergeSortingPartialResultTransform (due to zero chunks after `remerge`) [#55335](https://github.com/ClickHouse/ClickHouse/pull/55335) ([Azat Khuzhin](https://github.com/azat)). +* Fix data-race in CreatingSetsTransform (on errors) due to throwing shared exception [#55338](https://github.com/ClickHouse/ClickHouse/pull/55338) ([Azat Khuzhin](https://github.com/azat)). +* Fix trash optimization (up to a certain extent) [#55353](https://github.com/ClickHouse/ClickHouse/pull/55353) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix leak in StorageHDFS [#55370](https://github.com/ClickHouse/ClickHouse/pull/55370) ([Azat Khuzhin](https://github.com/azat)). +* Fix parsing of arrays in cast operator [#55417](https://github.com/ClickHouse/ClickHouse/pull/55417) ([Anton Popov](https://github.com/CurtizJ)). +* Fix filtering by virtual columns with OR filter in query [#55418](https://github.com/ClickHouse/ClickHouse/pull/55418) ([Azat Khuzhin](https://github.com/azat)). +* Fix MongoDB connection issues [#55419](https://github.com/ClickHouse/ClickHouse/pull/55419) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix MySQL interface boolean representation [#55427](https://github.com/ClickHouse/ClickHouse/pull/55427) ([Serge Klochkov](https://github.com/slvrtrn)). +* Fix MySQL text protocol DateTime formatting and LowCardinality(Nullable(T)) types reporting [#55479](https://github.com/ClickHouse/ClickHouse/pull/55479) ([Serge Klochkov](https://github.com/slvrtrn)). +* Make `use_mysql_types_in_show_columns` affect only `SHOW COLUMNS` [#55481](https://github.com/ClickHouse/ClickHouse/pull/55481) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix stack symbolizer parsing `DW_FORM_ref_addr` incorrectly and sometimes crashing [#55483](https://github.com/ClickHouse/ClickHouse/pull/55483) ([Michael Kolupaev](https://github.com/al13n321)). +* Destroy fiber in case of exception in cancelBefore in AsyncTaskExecutor [#55516](https://github.com/ClickHouse/ClickHouse/pull/55516) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix Query Parameters not working with custom HTTP handlers [#55521](https://github.com/ClickHouse/ClickHouse/pull/55521) ([Konstantin Bogdanov](https://github.com/thevar1able)). +* Fix checking of non handled data for Values format [#55527](https://github.com/ClickHouse/ClickHouse/pull/55527) ([Azat Khuzhin](https://github.com/azat)). +* Fix 'Invalid cursor state' in odbc interacting with MS SQL Server [#55558](https://github.com/ClickHouse/ClickHouse/pull/55558) ([vdimir](https://github.com/vdimir)). +* Fix max execution time and 'break' overflow mode [#55577](https://github.com/ClickHouse/ClickHouse/pull/55577) ([Alexander Gololobov](https://github.com/davenger)). +* Fix crash in QueryNormalizer with cyclic aliases [#55602](https://github.com/ClickHouse/ClickHouse/pull/55602) ([vdimir](https://github.com/vdimir)). +* Disable wrong optimization and add a test [#55609](https://github.com/ClickHouse/ClickHouse/pull/55609) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Merging [#52352](https://github.com/ClickHouse/ClickHouse/issues/52352) [#55621](https://github.com/ClickHouse/ClickHouse/pull/55621) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add a test to avoid incorrect decimal sorting [#55662](https://github.com/ClickHouse/ClickHouse/pull/55662) ([Amos Bird](https://github.com/amosbird)). +* Fix progress bar for s3 and azure Cluster functions with url without globs [#55666](https://github.com/ClickHouse/ClickHouse/pull/55666) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix filtering by virtual columns with OR filter in query (resubmit) [#55678](https://github.com/ClickHouse/ClickHouse/pull/55678) ([Azat Khuzhin](https://github.com/azat)). +* Fixes and improvements for Iceberg storage [#55695](https://github.com/ClickHouse/ClickHouse/pull/55695) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix data race in CreatingSetsTransform (v2) [#55786](https://github.com/ClickHouse/ClickHouse/pull/55786) ([Azat Khuzhin](https://github.com/azat)). +* Throw exception when parsing illegal string as float if precise_float_parsing is true [#55861](https://github.com/ClickHouse/ClickHouse/pull/55861) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Disable predicate pushdown if the CTE contains stateful functions [#55871](https://github.com/ClickHouse/ClickHouse/pull/55871) ([Raúl Marín](https://github.com/Algunenano)). +* Fix normalize ASTSelectWithUnionQuery, as it was stripping `FORMAT` from the query [#55887](https://github.com/ClickHouse/ClickHouse/pull/55887) ([flynn](https://github.com/ucasfl)). +* Try to fix possible segfault in Native ORC input format [#55891](https://github.com/ClickHouse/ClickHouse/pull/55891) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix window functions in case of sparse columns. [#55895](https://github.com/ClickHouse/ClickHouse/pull/55895) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)). +* fix: StorageNull supports subcolumns [#55912](https://github.com/ClickHouse/ClickHouse/pull/55912) ([FFish](https://github.com/wxybear)). +* Do not write retriable errors for Replicated mutate/merge into error log [#55944](https://github.com/ClickHouse/ClickHouse/pull/55944) ([Azat Khuzhin](https://github.com/azat)). +* Fix `SHOW DATABASES LIMIT ` [#55962](https://github.com/ClickHouse/ClickHouse/pull/55962) ([Raúl Marín](https://github.com/Algunenano)). +* Fix autogenerated Protobuf schema with fields with underscore [#55974](https://github.com/ClickHouse/ClickHouse/pull/55974) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix dateTime64ToSnowflake64() with non-default scale [#55983](https://github.com/ClickHouse/ClickHouse/pull/55983) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix output/input of Arrow dictionary column [#55989](https://github.com/ClickHouse/ClickHouse/pull/55989) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix fetching schema from schema registry in AvroConfluent [#55991](https://github.com/ClickHouse/ClickHouse/pull/55991) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix 'Block structure mismatch' on concurrent ALTER and INSERTs in Buffer table [#55995](https://github.com/ClickHouse/ClickHouse/pull/55995) ([Michael Kolupaev](https://github.com/al13n321)). +* Fix incorrect free space accounting for least_used JBOD policy [#56030](https://github.com/ClickHouse/ClickHouse/pull/56030) ([Azat Khuzhin](https://github.com/azat)). +* Fix missing scalar issue when evaluating subqueries inside table functions [#56057](https://github.com/ClickHouse/ClickHouse/pull/56057) ([Amos Bird](https://github.com/amosbird)). +* Fix wrong query result when http_write_exception_in_output_format=1 [#56135](https://github.com/ClickHouse/ClickHouse/pull/56135) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix schema cache for fallback JSON->JSONEachRow with changed settings [#56172](https://github.com/ClickHouse/ClickHouse/pull/56172) ([Kruglov Pavel](https://github.com/Avogar)). +* Add error handler to odbc-bridge [#56185](https://github.com/ClickHouse/ClickHouse/pull/56185) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). + + +### ClickHouse release 23.9, 2023-09-28 {#239} + +#### Backward Incompatible Change +* Remove the `status_info` configuration option and dictionaries status from the default Prometheus handler. [#54090](https://github.com/ClickHouse/ClickHouse/pull/54090) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The experimental parts metadata cache is removed from the codebase. [#54215](https://github.com/ClickHouse/ClickHouse/pull/54215) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Disable setting `input_format_json_try_infer_numbers_from_strings` by default, so we don't try to infer numbers from strings in JSON formats by default to avoid possible parsing errors when sample data contains strings that looks like a number. [#55099](https://github.com/ClickHouse/ClickHouse/pull/55099) ([Kruglov Pavel](https://github.com/Avogar)). + +#### New Feature +* Improve schema inference from JSON formats: 1) Now it's possible to infer named Tuples from JSON objects without experimantal JSON type under a setting `input_format_json_try_infer_named_tuples_from_objects` in JSON formats. Previously without experimantal type JSON we could only infer JSON objects as Strings or Maps, now we can infer named Tuple. Resulting Tuple type will conain all keys of objects that were read in data sample during schema inference. It can be useful for reading structured JSON data without sparse objects. The setting is enabled by default. 2) Allow parsing JSON array into a column with type String under setting `input_format_json_read_arrays_as_strings`. It can help reading arrays with values with different types. 3) Allow to use type String for JSON keys with unkown types (`null`/`[]`/`{}`) in sample data under setting `input_format_json_infer_incomplete_types_as_strings`. Now in JSON formats we can read any value into String column and we can avoid getting error `Cannot determine type for column 'column_name' by first 25000 rows of data, most likely this column contains only Nulls or empty Arrays/Maps` during schema inference by using type String for unknown types, so the data will be read successfully. [#54427](https://github.com/ClickHouse/ClickHouse/pull/54427) ([Kruglov Pavel](https://github.com/Avogar)). +* Added IO scheduling support for remote disks. Storage configuration for disk types `s3`, `s3_plain`, `hdfs` and `azure_blob_storage` can now contain `read_resource` and `write_resource` elements holding resource names. Scheduling policies for these resources can be configured in a separate server configuration section `resources`. Queries can be marked using setting `workload` and classified using server configuration section `workload_classifiers` to achieve diverse resource scheduling goals. More details in [the docs](https://clickhouse.com/docs/ja/operations/workload-scheduling). [#47009](https://github.com/ClickHouse/ClickHouse/pull/47009) ([Sergei Trifonov](https://github.com/serxa)). Added "bandwidth_limit" IO scheduling node type. It allows you to specify `max_speed` and `max_burst` constraints on traffic passing though this node. [#54618](https://github.com/ClickHouse/ClickHouse/pull/54618) ([Sergei Trifonov](https://github.com/serxa)). +* Added new type of authentication based on SSH keys. It works only for the native TCP protocol. [#41109](https://github.com/ClickHouse/ClickHouse/pull/41109) ([George Gamezardashvili](https://github.com/InfJoker)). +* Added a new column `_block_number` for MergeTree tables. [#44532](https://github.com/ClickHouse/ClickHouse/issues/44532). [#47532](https://github.com/ClickHouse/ClickHouse/pull/47532) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Add `IF EMPTY` clause for `DROP TABLE` queries. [#48915](https://github.com/ClickHouse/ClickHouse/pull/48915) ([Pavel Novitskiy](https://github.com/pnovitskiy)). +* SQL functions `toString(datetime, timezone)` and `formatDateTime(datetime, format, timezone)` now support non-constant timezone arguments. [#53680](https://github.com/ClickHouse/ClickHouse/pull/53680) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Add support for `ALTER TABLE MODIFY COMMENT`. Note: something similar was added by an external contributor a long time ago, but the feature did not work at all and only confused users. This closes [#36377](https://github.com/ClickHouse/ClickHouse/issues/36377). [#51304](https://github.com/ClickHouse/ClickHouse/pull/51304) ([Alexey Milovidov](https://github.com/alexey-milovidov)). Note: this command does not propagate between replicas, so the replicas of a table could have different comments. +* Added `GCD` a.k.a. "greatest common denominator" as a new data compression codec. The codec computes the GCD of all column values, and then divides each value by the GCD. The GCD codec is a data preparation codec (similar to Delta and DoubleDelta) and cannot be used stand-alone. It works with data integer, decimal and date/time type. A viable use case for the GCD codec are column values that change (increase/decrease) in multiples of the GCD, e.g. 24 - 28 - 16 - 24 - 8 - 24 (assuming GCD = 4). [#53149](https://github.com/ClickHouse/ClickHouse/pull/53149) ([Alexander Nam](https://github.com/seshWCS)). +* Two new type aliases `DECIMAL(P)` (as shortcut for `DECIMAL(P, 0)` and `DECIMAL` (as shortcut for `DECIMAL(10, 0)`) were added. This makes ClickHouse more compatible with MySQL's SQL dialect. [#53328](https://github.com/ClickHouse/ClickHouse/pull/53328) ([Val Doroshchuk](https://github.com/valbok)). +* Added a new system log table `backup_log` to track all `BACKUP` and `RESTORE` operations. [#53638](https://github.com/ClickHouse/ClickHouse/pull/53638) ([Victor Krasnov](https://github.com/sirvickr)). +* Added a format setting `output_format_markdown_escape_special_characters` (default: false). The setting controls whether special characters like `!`, `#`, `$` etc. are escaped (i.e. prefixed by a backslash) in the `Markdown` output format. [#53860](https://github.com/ClickHouse/ClickHouse/pull/53860) ([irenjj](https://github.com/irenjj)). +* Add function `decodeHTMLComponent`. [#54097](https://github.com/ClickHouse/ClickHouse/pull/54097) ([Bharat Nallan](https://github.com/bharatnc)). +* Added `peak_threads_usage` to query_log table. [#54335](https://github.com/ClickHouse/ClickHouse/pull/54335) ([Alexey Gerasimchuck](https://github.com/Demilivor)). +* Add `SHOW FUNCTIONS` support to clickhouse-client. [#54337](https://github.com/ClickHouse/ClickHouse/pull/54337) ([Julia Kartseva](https://github.com/wat-ze-hex)). +* Added function `toDaysSinceYearZero` with alias `TO_DAYS` (for compatibility with MySQL) which returns the number of days passed since `0001-01-01` (in Proleptic Gregorian Calendar). [#54479](https://github.com/ClickHouse/ClickHouse/pull/54479) ([Robert Schulze](https://github.com/rschu1ze)). Function `toDaysSinceYearZero` now supports arguments of type `DateTime` and `DateTime64`. [#54856](https://github.com/ClickHouse/ClickHouse/pull/54856) ([Serge Klochkov](https://github.com/slvrtrn)). +* Added functions `YYYYMMDDtoDate`, `YYYYMMDDtoDate32`, `YYYYMMDDhhmmssToDateTime` and `YYYYMMDDhhmmssToDateTime64`. They convert a date or date with time encoded as integer (e.g. 20230911) into a native date or date with time. As such, they provide the opposite functionality of existing functions `YYYYMMDDToDate`, `YYYYMMDDToDateTime`, `YYYYMMDDhhmmddToDateTime`, `YYYYMMDDhhmmddToDateTime64`. [#54509](https://github.com/ClickHouse/ClickHouse/pull/54509) ([Quanfa Fu](https://github.com/dentiscalprum)) ([Robert Schulze](https://github.com/rschu1ze)). +* Add several string distance functions, including `byteHammingDistance`, `editDistance`. [#54935](https://github.com/ClickHouse/ClickHouse/pull/54935) ([flynn](https://github.com/ucasfl)). +* Allow specifying the expiration date and, optionally, the time for user credentials with `VALID UNTIL datetime` clause. [#51261](https://github.com/ClickHouse/ClickHouse/pull/51261) ([Nikolay Degterinsky](https://github.com/evillique)). +* Allow S3-style URLs for table functions `s3`, `gcs`, `oss`. URL is automatically converted to HTTP. Example: `'s3://clickhouse-public-datasets/hits.csv'` is converted to `'https://clickhouse-public-datasets.s3.amazonaws.com/hits.csv'`. [#54931](https://github.com/ClickHouse/ClickHouse/pull/54931) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Add new setting `print_pretty_type_names` to print pretty deep nested types like Tuple/Maps/Arrays. [#55095](https://github.com/ClickHouse/ClickHouse/pull/55095) ([Kruglov Pavel](https://github.com/Avogar)). + +#### Performance Improvement +* Speed up reading from S3 by enabling prefetches by default. [#53709](https://github.com/ClickHouse/ClickHouse/pull/53709) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Do not implicitly read PK and version columns in lonely parts if unnecessary for queries with FINAL. [#53919](https://github.com/ClickHouse/ClickHouse/pull/53919) ([Duc Canh Le](https://github.com/canhld94)). +* Optimize group by constant keys. Will optimize queries with group by `_file/_path` after https://github.com/ClickHouse/ClickHouse/pull/53529. [#53549](https://github.com/ClickHouse/ClickHouse/pull/53549) ([Kruglov Pavel](https://github.com/Avogar)). +* Improve performance of sorting for `Decimal` columns. Improve performance of insertion into `MergeTree` if ORDER BY contains a `Decimal` column. Improve performance of sorting when data is already sorted or almost sorted. [#35961](https://github.com/ClickHouse/ClickHouse/pull/35961) ([Maksim Kita](https://github.com/kitaisreal)). +* Improve performance for huge query analysis. Fixes [#51224](https://github.com/ClickHouse/ClickHouse/issues/51224). [#51469](https://github.com/ClickHouse/ClickHouse/pull/51469) ([frinkr](https://github.com/frinkr)). +* An optimization to rewrite `COUNT(DISTINCT ...)` and various `uniq` variants to `count` if it is selected from a subquery with GROUP BY. [#52082](https://github.com/ClickHouse/ClickHouse/pull/52082) [#52645](https://github.com/ClickHouse/ClickHouse/pull/52645) ([JackyWoo](https://github.com/JackyWoo)). +* Remove manual calls to `mmap/mremap/munmap` and delegate all this work to `jemalloc` - and it slightly improves performance. [#52792](https://github.com/ClickHouse/ClickHouse/pull/52792) ([Nikita Taranov](https://github.com/nickitat)). +* Fixed high in CPU consumption when working with NATS. [#54399](https://github.com/ClickHouse/ClickHouse/pull/54399) ([Vasilev Pyotr](https://github.com/vahpetr)). +* Since we use separate instructions for executing `toString` with datetime argument, it is possible to improve performance a bit for non-datetime arguments and have some parts of the code cleaner. Follows up [#53680](https://github.com/ClickHouse/ClickHouse/issues/53680). [#54443](https://github.com/ClickHouse/ClickHouse/pull/54443) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Instead of serializing json elements into a `std::stringstream`, this PR try to put the serialization result into `ColumnString` direclty. [#54613](https://github.com/ClickHouse/ClickHouse/pull/54613) ([lgbo](https://github.com/lgbo-ustc)). +* Enable ORDER BY optimization for reading data in corresponding order from a MergeTree table in case that the table is behind a view. [#54628](https://github.com/ClickHouse/ClickHouse/pull/54628) ([Vitaly Baranov](https://github.com/vitlibar)). +* Improve JSON SQL functions by reusing `GeneratorJSONPath` and removing several shared pointers. [#54735](https://github.com/ClickHouse/ClickHouse/pull/54735) ([lgbo](https://github.com/lgbo-ustc)). +* Keeper tries to batch flush requests for better performance. [#53049](https://github.com/ClickHouse/ClickHouse/pull/53049) ([Antonio Andelic](https://github.com/antonio2368)). +* Now `clickhouse-client` processes files in parallel in case of `INFILE 'glob_expression'`. Closes [#54218](https://github.com/ClickHouse/ClickHouse/issues/54218). [#54533](https://github.com/ClickHouse/ClickHouse/pull/54533) ([Max K.](https://github.com/mkaynov)). +* Allow to use primary key for IN function where primary key column types are different from `IN` function right side column types. Example: `SELECT id FROM test_table WHERE id IN (SELECT '5')`. Closes [#48936](https://github.com/ClickHouse/ClickHouse/issues/48936). [#54544](https://github.com/ClickHouse/ClickHouse/pull/54544) ([Maksim Kita](https://github.com/kitaisreal)). +* Hash JOIN tries to shrink internal buffers consuming half of maximal available memory (set by `max_bytes_in_join`). [#54584](https://github.com/ClickHouse/ClickHouse/pull/54584) ([vdimir](https://github.com/vdimir)). +* Respect `max_block_size` for array join to avoid possible OOM. Close [#54290](https://github.com/ClickHouse/ClickHouse/issues/54290). [#54664](https://github.com/ClickHouse/ClickHouse/pull/54664) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Reuse HTTP connections in the `s3` table function. [#54812](https://github.com/ClickHouse/ClickHouse/pull/54812) ([Michael Kolupaev](https://github.com/al13n321)). +* Replace the linear search in `MergeTreeRangeReader::Stream::ceilRowsToCompleteGranules` with a binary search. [#54869](https://github.com/ClickHouse/ClickHouse/pull/54869) ([usurai](https://github.com/usurai)). + +#### Experimental Feature +* The creation of `Annoy` indexes can now be parallelized using setting `max_threads_for_annoy_index_creation`. [#54047](https://github.com/ClickHouse/ClickHouse/pull/54047) ([Robert Schulze](https://github.com/rschu1ze)). +* Parallel replicas over distributed don't read from all replicas [#54199](https://github.com/ClickHouse/ClickHouse/pull/54199) ([Igor Nikonov](https://github.com/devcrafter)). + +#### Improvement +* Allow to replace long names of files of columns in `MergeTree` data parts to hashes of names. It helps to avoid `File name too long` error in some cases. [#50612](https://github.com/ClickHouse/ClickHouse/pull/50612) ([Anton Popov](https://github.com/CurtizJ)). +* Parse data in `JSON` format as `JSONEachRow` if failed to parse metadata. It will allow to read files with `.json` extension even if real format is JSONEachRow. Closes [#45740](https://github.com/ClickHouse/ClickHouse/issues/45740). [#54405](https://github.com/ClickHouse/ClickHouse/pull/54405) ([Kruglov Pavel](https://github.com/Avogar)). +* Output valid JSON/XML on excetpion during HTTP query execution. Add setting `http_write_exception_in_output_format` to enable/disable this behaviour (enabled by default). [#52853](https://github.com/ClickHouse/ClickHouse/pull/52853) ([Kruglov Pavel](https://github.com/Avogar)). +* View `information_schema.tables` now has a new field `data_length` which shows the approximate size of the data on disk. Required to run queries generated by Amazon QuickSight. [#55037](https://github.com/ClickHouse/ClickHouse/pull/55037) ([Robert Schulze](https://github.com/rschu1ze)). +* The MySQL interface gained a minimal implementation of prepared statements, just enough to allow a connection from Tableau Online to ClickHouse via the MySQL connector. [#54115](https://github.com/ClickHouse/ClickHouse/pull/54115) ([Serge Klochkov](https://github.com/slvrtrn)). Please note: the prepared statements implementation is pretty minimal, we do not support arguments binding yet, it is not required in this particular Tableau online use case. It will be implemented as a follow-up if necessary after extensive testing of Tableau Online in case we discover issues. +* Support case-insensitive and dot-all matching modes in `regexp_tree` dictionaries. [#50906](https://github.com/ClickHouse/ClickHouse/pull/50906) ([Johann Gan](https://github.com/johanngan)). +* Keeper improvement: Add a `createIfNotExists` Keeper command. [#48855](https://github.com/ClickHouse/ClickHouse/pull/48855) ([Konstantin Bogdanov](https://github.com/thevar1able)). +* More precise integer type inference, fix [#51236](https://github.com/ClickHouse/ClickHouse/issues/51236). [#53003](https://github.com/ClickHouse/ClickHouse/pull/53003) ([Chen768959](https://github.com/Chen768959)). +* Introduced resolving of charsets in the string literals for MaterializedMySQL. [#53220](https://github.com/ClickHouse/ClickHouse/pull/53220) ([Val Doroshchuk](https://github.com/valbok)). +* Fix a subtle issue with a rarely used `EmbeddedRocksDB` table engine in an extremely rare scenario: sometimes the `EmbeddedRocksDB` table engine does not close files correctly in NFS after running `DROP TABLE`. [#53502](https://github.com/ClickHouse/ClickHouse/pull/53502) ([Mingliang Pan](https://github.com/liangliangpan)). +* `RESTORE TABLE ON CLUSTER` must create replicated tables with a matching UUID on hosts. Otherwise the macro `{uuid}` in ZooKeeper path can't work correctly after RESTORE. This PR implements that. [#53765](https://github.com/ClickHouse/ClickHouse/pull/53765) ([Vitaly Baranov](https://github.com/vitlibar)). +* Added restore setting `restore_broken_parts_as_detached`: if it's true the RESTORE process won't stop on broken parts while restoring, instead all the broken parts will be copied to the `detached` folder with the prefix `broken-from-backup'. If it's false the RESTORE process will stop on the first broken part (if any). The default value is false. [#53877](https://github.com/ClickHouse/ClickHouse/pull/53877) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add `elapsed_ns` field to HTTP headers X-ClickHouse-Progress and X-ClickHouse-Summary. [#54179](https://github.com/ClickHouse/ClickHouse/pull/54179) ([joelynch](https://github.com/joelynch)). +* Implementation of `reconfig` (https://github.com/ClickHouse/ClickHouse/pull/49450), `sync`, and `exists` commands for keeper-client. [#54201](https://github.com/ClickHouse/ClickHouse/pull/54201) ([pufit](https://github.com/pufit)). +* `clickhouse-local` and `clickhouse-client` now allow to specify the `--query` parameter multiple times, e.g. `./clickhouse-client --query "SELECT 1" --query "SELECT 2"`. This syntax is slightly more intuitive than `./clickhouse-client --multiquery "SELECT 1;S ELECT 2"`, a bit easier to script (e.g. `queries.push_back('--query "$q"')`) and more consistent with the behavior of existing parameter `--queries-file` (e.g. `./clickhouse client --queries-file queries1.sql --queries-file queries2.sql`). [#54249](https://github.com/ClickHouse/ClickHouse/pull/54249) ([Robert Schulze](https://github.com/rschu1ze)). +* Add sub-second precision to `formatReadableTimeDelta`. [#54250](https://github.com/ClickHouse/ClickHouse/pull/54250) ([Andrey Zvonov](https://github.com/zvonand)). +* Enable `allow_remove_stale_moving_parts` by default. [#54260](https://github.com/ClickHouse/ClickHouse/pull/54260) ([vdimir](https://github.com/vdimir)). +* Fix using count from cache and improve progress bar for reading from archives. [#54271](https://github.com/ClickHouse/ClickHouse/pull/54271) ([Kruglov Pavel](https://github.com/Avogar)). +* Add support for S3 credentials using SSO. To define a profile to be used with SSO, set `AWS_PROFILE` environment variable. [#54347](https://github.com/ClickHouse/ClickHouse/pull/54347) ([Antonio Andelic](https://github.com/antonio2368)). +* Support NULL as default for nested types Array/Tuple/Map for input formats. Closes [#51100](https://github.com/ClickHouse/ClickHouse/issues/51100). [#54351](https://github.com/ClickHouse/ClickHouse/pull/54351) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow reading some unusual configuration of chunks from Arrow/Parquet formats. [#54370](https://github.com/ClickHouse/ClickHouse/pull/54370) ([Arthur Passos](https://github.com/arthurpassos)). +* Add `STD` alias to `stddevPop` function for MySQL compatibility. Closes [#54274](https://github.com/ClickHouse/ClickHouse/issues/54274). [#54382](https://github.com/ClickHouse/ClickHouse/pull/54382) ([Nikolay Degterinsky](https://github.com/evillique)). +* Add `addDate` function for compatibility with MySQL and `subDate` for consistency. Reference [#54275](https://github.com/ClickHouse/ClickHouse/issues/54275). [#54400](https://github.com/ClickHouse/ClickHouse/pull/54400) ([Nikolay Degterinsky](https://github.com/evillique)). +* Add `modification_time` into `system.detached_parts`. [#54506](https://github.com/ClickHouse/ClickHouse/pull/54506) ([Azat Khuzhin](https://github.com/azat)). +* Added a setting `splitby_max_substrings_includes_remaining_string` which controls if functions "splitBy*()" with argument "max_substring" > 0 include the remaining string (if any) in the result array (Python/Spark semantics) or not. The default behavior does not change. [#54518](https://github.com/ClickHouse/ClickHouse/pull/54518) ([Robert Schulze](https://github.com/rschu1ze)). +* Better integer types inference for `Int64`/`UInt64` fields. Continuation of [#53003](https://github.com/ClickHouse/ClickHouse/pull/53003). Now it works also for nested types like Arrays of Arrays and for functions like `map/tuple`. Issue: [#51236](https://github.com/ClickHouse/ClickHouse/issues/51236). [#54553](https://github.com/ClickHouse/ClickHouse/pull/54553) ([Kruglov Pavel](https://github.com/Avogar)). +* Added array operations for multiplying, dividing and modulo on scalar. Works in each way, for example `5 * [5, 5]` and `[5, 5] * 5` - both cases are possible. [#54608](https://github.com/ClickHouse/ClickHouse/pull/54608) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Add optional `version` argument to `rm` command in `keeper-client` to support safer deletes. [#54708](https://github.com/ClickHouse/ClickHouse/pull/54708) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)). +* Disable killing the server by systemd (that may lead to data loss when using Buffer tables). [#54744](https://github.com/ClickHouse/ClickHouse/pull/54744) ([Azat Khuzhin](https://github.com/azat)). +* Added field `is_deterministic` to system table `system.functions` which indicates whether the result of a function is stable between two invocations (given exactly the same inputs) or not. [#54766](https://github.com/ClickHouse/ClickHouse/pull/54766) [#55035](https://github.com/ClickHouse/ClickHouse/pull/55035) ([Robert Schulze](https://github.com/rschu1ze)). +* Made the views in schema `information_schema` more compatible with the equivalent views in MySQL (i.e. modified and extended them) up to a point where Tableau Online is able to connect to ClickHouse. More specifically: 1. The type of field `information_schema.tables.table_type` changed from Enum8 to String. 2. Added fields `table_comment` and `table_collation` to view `information_schema.table`. 3. Added views `information_schema.key_column_usage` and `referential_constraints`. 4. Replaced uppercase aliases in `information_schema` views with concrete uppercase columns. [#54773](https://github.com/ClickHouse/ClickHouse/pull/54773) ([Serge Klochkov](https://github.com/slvrtrn)). +* The query cache now returns an error if the user tries to cache the result of a query with a non-deterministic function such as `now`, `randomString` and `dictGet`. Compared to the previous behavior (silently don't cache the result), this reduces confusion and surprise for users. [#54801](https://github.com/ClickHouse/ClickHouse/pull/54801) ([Robert Schulze](https://github.com/rschu1ze)). +* Forbid special columns like materialized/ephemeral/alias for `file`/`s3`/`url`/... storages, fix insert into ephemeral columns from files. Closes [#53477](https://github.com/ClickHouse/ClickHouse/issues/53477). [#54803](https://github.com/ClickHouse/ClickHouse/pull/54803) ([Kruglov Pavel](https://github.com/Avogar)). +* More configurable collecting metadata for backup. [#54804](https://github.com/ClickHouse/ClickHouse/pull/54804) ([Vitaly Baranov](https://github.com/vitlibar)). +* `clickhouse-local`'s log file (if enabled with --server_logs_file flag) will now prefix each line with timestamp, thread id, etc, just like `clickhouse-server`. [#54807](https://github.com/ClickHouse/ClickHouse/pull/54807) ([Michael Kolupaev](https://github.com/al13n321)). +* Field `is_obsolete` in the `system.merge_tree_settings` table - it is now 1 for obsolete merge tree settings. Previously, only the description indicated that the setting is obsolete. [#54837](https://github.com/ClickHouse/ClickHouse/pull/54837) ([Robert Schulze](https://github.com/rschu1ze)). +* Make it possible to use plural when using interval literals. `INTERVAL 2 HOURS` should be equivalent to `INTERVAL 2 HOUR`. [#54860](https://github.com/ClickHouse/ClickHouse/pull/54860) ([Jordi Villar](https://github.com/jrdi)). +* Always allow the creation of a projection with `Nullable` PK. This fixes [#54814](https://github.com/ClickHouse/ClickHouse/issues/54814). [#54895](https://github.com/ClickHouse/ClickHouse/pull/54895) ([Amos Bird](https://github.com/amosbird)). +* Retry backup's S3 operations after connection reset failure. [#54900](https://github.com/ClickHouse/ClickHouse/pull/54900) ([Vitaly Baranov](https://github.com/vitlibar)). +* Make the exception message exact in case of the maximum value of a settings is less than the minimum value. [#54925](https://github.com/ClickHouse/ClickHouse/pull/54925) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)). +* `LIKE`, `match`, and other regular expressions matching functions now allow matching with patterns containing non-UTF-8 substrings by falling back to binary matching. Example: you can use `string LIKE '\xFE\xFF%'` to detect BOM. This closes [#54486](https://github.com/ClickHouse/ClickHouse/issues/54486). [#54942](https://github.com/ClickHouse/ClickHouse/pull/54942) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Added `ContextLockWaitMicroseconds` profile event. [#55029](https://github.com/ClickHouse/ClickHouse/pull/55029) ([Maksim Kita](https://github.com/kitaisreal)). +* The Keeper dynamically adjusts log levels. [#50372](https://github.com/ClickHouse/ClickHouse/pull/50372) ([helifu](https://github.com/helifu)). +* Added function `timestamp` for compatibility with MySQL. Closes [#54275](https://github.com/ClickHouse/ClickHouse/issues/54275). [#54639](https://github.com/ClickHouse/ClickHouse/pull/54639) ([Nikolay Degterinsky](https://github.com/evillique)). + +#### Build/Testing/Packaging Improvement +* Bumped the compiler of official and continuous integration builds of ClickHouse from Clang 16 to 17. [#53831](https://github.com/ClickHouse/ClickHouse/pull/53831) ([Robert Schulze](https://github.com/rschu1ze)). +* Regenerated tld data for lookups (`tldLookup.generated.cpp`). [#54269](https://github.com/ClickHouse/ClickHouse/pull/54269) ([Bharat Nallan](https://github.com/bharatnc)). +* Remove the redundant `clickhouse-keeper-client` symlink. [#54587](https://github.com/ClickHouse/ClickHouse/pull/54587) ([Tomas Barton](https://github.com/deric)). +* Use `/usr/bin/env` to resolve bash - now it supports Nix OS. [#54603](https://github.com/ClickHouse/ClickHouse/pull/54603) ([Fionera](https://github.com/fionera)). +* CMake added `PROFILE_CPU` option needed to perform `perf record` without using a DWARF call graph. [#54917](https://github.com/ClickHouse/ClickHouse/pull/54917) ([Maksim Kita](https://github.com/kitaisreal)). +* If the linker is different than LLD, stop with a fatal error. [#55036](https://github.com/ClickHouse/ClickHouse/pull/55036) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Replaced the library to handle (encode/decode) base64 values from Turbo-Base64 to aklomp-base64. Both are SIMD-accelerated on x86 and ARM but 1. the license of the latter (BSD-2) is more favorable for ClickHouse, Turbo64 switched in the meantime to GPL-3, 2. with more GitHub stars, aklomp-base64 seems more future-proof, 3. aklomp-base64 has a slightly nicer API (which is arguably subjective), and 4. aklomp-base64 does not require us to hack around bugs (like non-threadsafe initialization). Note: aklomp-base64 rejects unpadded base64 values whereas Turbo-Base64 decodes them on a best-effort basis. RFC-4648 leaves it open whether padding is mandatory or not, but depending on the context this may be a behavioral change to be aware of. [#54119](https://github.com/ClickHouse/ClickHouse/pull/54119) ([Mikhail Koviazin](https://github.com/mkmkme)). + +#### Bug Fix (user-visible misbehavior in an official stable release) +* Fix REPLACE/MOVE PARTITION with zero-copy replication (note: "zero-copy replication" is an experimental feature) [#54193](https://github.com/ClickHouse/ClickHouse/pull/54193) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix zero copy locks with hardlinks (note: "zero-copy replication" is an experimental feature) [#54859](https://github.com/ClickHouse/ClickHouse/pull/54859) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix zero copy garbage (note: "zero-copy replication" is an experimental feature) [#54550](https://github.com/ClickHouse/ClickHouse/pull/54550) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Pass HTTP retry timeout as milliseconds (it was incorrect before). [#54438](https://github.com/ClickHouse/ClickHouse/pull/54438) ([Duc Canh Le](https://github.com/canhld94)). +* Fix misleading error message in OUTFILE with `CapnProto`/`Protobuf` [#52870](https://github.com/ClickHouse/ClickHouse/pull/52870) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix summary reporting with parallel replicas with LIMIT [#53050](https://github.com/ClickHouse/ClickHouse/pull/53050) ([Raúl Marín](https://github.com/Algunenano)). +* Fix throttling of BACKUPs from/to S3 (in case native copy was not used) and in some other places as well [#53336](https://github.com/ClickHouse/ClickHouse/pull/53336) ([Azat Khuzhin](https://github.com/azat)). +* Fix IO throttling during copying whole directories [#53338](https://github.com/ClickHouse/ClickHouse/pull/53338) ([Azat Khuzhin](https://github.com/azat)). +* Fix: moved to prewhere condition actions can lose column [#53492](https://github.com/ClickHouse/ClickHouse/pull/53492) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fixed internal error when replacing with byte-equal parts [#53735](https://github.com/ClickHouse/ClickHouse/pull/53735) ([Pedro Riera](https://github.com/priera)). +* Fix: require columns participating in interpolate expression [#53754](https://github.com/ClickHouse/ClickHouse/pull/53754) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix cluster discovery initialization + setting up fail points in config [#54113](https://github.com/ClickHouse/ClickHouse/pull/54113) ([vdimir](https://github.com/vdimir)). +* Fix issues in `accurateCastOrNull` [#54136](https://github.com/ClickHouse/ClickHouse/pull/54136) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Fix nullable primary key with the FINAL modifier [#54164](https://github.com/ClickHouse/ClickHouse/pull/54164) ([Amos Bird](https://github.com/amosbird)). +* Fixed error that prevented insertion in replicated materialized view of new data in presence of duplicated data. [#54184](https://github.com/ClickHouse/ClickHouse/pull/54184) ([Pedro Riera](https://github.com/priera)). +* Fix: allow `IPv6` for bloom filter [#54200](https://github.com/ClickHouse/ClickHouse/pull/54200) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* fix possible type mismatch with `IPv4` [#54212](https://github.com/ClickHouse/ClickHouse/pull/54212) ([Bharat Nallan](https://github.com/bharatnc)). +* Fix `system.data_skipping_indices` for recreated indices [#54225](https://github.com/ClickHouse/ClickHouse/pull/54225) ([Artur Malchanau](https://github.com/Hexta)). +* fix name clash for multiple join rewriter v2 [#54240](https://github.com/ClickHouse/ClickHouse/pull/54240) ([Tao Wang](https://github.com/wangtZJU)). +* Fix unexpected errors in `system.errors` after join [#54306](https://github.com/ClickHouse/ClickHouse/pull/54306) ([vdimir](https://github.com/vdimir)). +* Fix `isZeroOrNull(NULL)` [#54316](https://github.com/ClickHouse/ClickHouse/pull/54316) ([flynn](https://github.com/ucasfl)). +* Fix: parallel replicas over distributed with `prefer_localhost_replica` = 1 [#54334](https://github.com/ClickHouse/ClickHouse/pull/54334) ([Igor Nikonov](https://github.com/devcrafter)). +* Fix logical error in vertical merge + replacing merge tree + optimize cleanup [#54368](https://github.com/ClickHouse/ClickHouse/pull/54368) ([alesapin](https://github.com/alesapin)). +* Fix possible error `URI contains invalid characters` in the `s3` table function [#54373](https://github.com/ClickHouse/ClickHouse/pull/54373) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix segfault in AST optimization of `arrayExists` function [#54379](https://github.com/ClickHouse/ClickHouse/pull/54379) ([Nikolay Degterinsky](https://github.com/evillique)). +* Check for overflow before addition in `analysisOfVariance` function [#54385](https://github.com/ClickHouse/ClickHouse/pull/54385) ([Antonio Andelic](https://github.com/antonio2368)). +* Reproduce and fix the bug in removeSharedRecursive [#54430](https://github.com/ClickHouse/ClickHouse/pull/54430) ([Sema Checherinda](https://github.com/CheSema)). +* Fix possible incorrect result with SimpleAggregateFunction in PREWHERE and FINAL [#54436](https://github.com/ClickHouse/ClickHouse/pull/54436) ([Azat Khuzhin](https://github.com/azat)). +* Fix filtering parts with indexHint for non analyzer [#54449](https://github.com/ClickHouse/ClickHouse/pull/54449) ([Azat Khuzhin](https://github.com/azat)). +* Fix aggregate projections with normalized states [#54480](https://github.com/ClickHouse/ClickHouse/pull/54480) ([Amos Bird](https://github.com/amosbird)). +* `clickhouse-local`: something for multiquery parameter [#54498](https://github.com/ClickHouse/ClickHouse/pull/54498) ([CuiShuoGuo](https://github.com/bakam412)). +* `clickhouse-local` supports `--database` command line argument [#54503](https://github.com/ClickHouse/ClickHouse/pull/54503) ([vdimir](https://github.com/vdimir)). +* Fix possible parsing error in `-WithNames` formats with disabled `input_format_with_names_use_header` [#54513](https://github.com/ClickHouse/ClickHouse/pull/54513) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix rare case of CHECKSUM_DOESNT_MATCH error [#54549](https://github.com/ClickHouse/ClickHouse/pull/54549) ([alesapin](https://github.com/alesapin)). +* Fix sorting of UNION ALL of already sorted results [#54564](https://github.com/ClickHouse/ClickHouse/pull/54564) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix snapshot install in Keeper [#54572](https://github.com/ClickHouse/ClickHouse/pull/54572) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix race in `ColumnUnique` [#54575](https://github.com/ClickHouse/ClickHouse/pull/54575) ([Nikita Taranov](https://github.com/nickitat)). +* Annoy/Usearch index: Fix LOGICAL_ERROR during build-up with default values [#54600](https://github.com/ClickHouse/ClickHouse/pull/54600) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix serialization of `ColumnDecimal` [#54601](https://github.com/ClickHouse/ClickHouse/pull/54601) ([Nikita Taranov](https://github.com/nickitat)). +* Fix schema inference for *Cluster functions for column names with spaces [#54635](https://github.com/ClickHouse/ClickHouse/pull/54635) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix using structure from insertion tables in case of defaults and explicit insert columns [#54655](https://github.com/ClickHouse/ClickHouse/pull/54655) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix: avoid using regex match, possibly containing alternation, as a key condition. [#54696](https://github.com/ClickHouse/ClickHouse/pull/54696) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix ReplacingMergeTree with vertical merge and cleanup [#54706](https://github.com/ClickHouse/ClickHouse/pull/54706) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fix virtual columns having incorrect values after ORDER BY [#54811](https://github.com/ClickHouse/ClickHouse/pull/54811) ([Michael Kolupaev](https://github.com/al13n321)). +* Fix filtering parts with indexHint for non analyzer [#54825](https://github.com/ClickHouse/ClickHouse/pull/54825) [#54449](https://github.com/ClickHouse/ClickHouse/pull/54449) ([Azat Khuzhin](https://github.com/azat)). +* Fix Keeper segfault during shutdown [#54841](https://github.com/ClickHouse/ClickHouse/pull/54841) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix `Invalid number of rows in Chunk` in MaterializedPostgreSQL [#54844](https://github.com/ClickHouse/ClickHouse/pull/54844) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Move obsolete format settings to separate section [#54855](https://github.com/ClickHouse/ClickHouse/pull/54855) ([Kruglov Pavel](https://github.com/Avogar)). +* Rebuild `minmax_count_projection` when partition key gets modified [#54943](https://github.com/ClickHouse/ClickHouse/pull/54943) ([Amos Bird](https://github.com/amosbird)). +* Fix bad cast to `ColumnVector` in function `if` [#55019](https://github.com/ClickHouse/ClickHouse/pull/55019) ([Kruglov Pavel](https://github.com/Avogar)). +* Prevent attaching parts from tables with different projections or indices [#55062](https://github.com/ClickHouse/ClickHouse/pull/55062) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)). +* Store NULL in scalar result map for empty subquery result [#52240](https://github.com/ClickHouse/ClickHouse/pull/52240) ([vdimir](https://github.com/vdimir)). +* Fix `FINAL` produces invalid read ranges in a rare case [#54934](https://github.com/ClickHouse/ClickHouse/pull/54934) ([Nikita Taranov](https://github.com/nickitat)). +* Fix: insert quorum w/o keeper retries [#55026](https://github.com/ClickHouse/ClickHouse/pull/55026) ([Igor Nikonov](https://github.com/devcrafter)). +* Fix simple state with nullable [#55030](https://github.com/ClickHouse/ClickHouse/pull/55030) ([Pedro Riera](https://github.com/priera)). + + +### ClickHouse release 23.8 LTS, 2023-08-31 {#238} + +#### Backward Incompatible Change +* If a dynamic disk contains a name, it should be specified as `disk = disk(name = 'disk_name'`, ...) in disk function arguments. In previous version it could be specified as `disk = disk_(...)`, which is no longer supported. [#52820](https://github.com/ClickHouse/ClickHouse/pull/52820) ([Kseniia Sumarokova](https://github.com/kssenii)). +* `clickhouse-benchmark` will establish connections in parallel when invoked with `--concurrency` more than one. Previously it was unusable if you ran it with 1000 concurrent connections from Europe to the US. Correct calculation of QPS for connections with high latency. Backward incompatible change: the option for JSON output of `clickhouse-benchmark` is removed. If you've used this option, you can also extract data from the `system.query_log` in JSON format as a workaround. [#53293](https://github.com/ClickHouse/ClickHouse/pull/53293) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The `microseconds` column is removed from the `system.text_log`, and the `milliseconds` column is removed from the `system.metric_log`, because they are redundant in the presence of the `event_time_microseconds` column. [#53601](https://github.com/ClickHouse/ClickHouse/pull/53601) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Deprecate the metadata cache feature. It is experimental and we have never used it. The feature is dangerous: [#51182](https://github.com/ClickHouse/ClickHouse/issues/51182). Remove the `system.merge_tree_metadata_cache` system table. The metadata cache is still available in this version but will be removed soon. This closes [#39197](https://github.com/ClickHouse/ClickHouse/issues/39197). [#51303](https://github.com/ClickHouse/ClickHouse/pull/51303) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Disable support for 3DES in TLS connections. [#52893](https://github.com/ClickHouse/ClickHouse/pull/52893) ([Kenji Noguchi](https://github.com/knoguchi)). + +#### New Feature +* Direct import from zip/7z/tar archives. Example: `file('*.zip :: *.csv')`. [#50321](https://github.com/ClickHouse/ClickHouse/pull/50321) ([nikitakeba](https://github.com/nikitakeba)). +* Add column `ptr` to `system.trace_log` for `trace_type = 'MemorySample'`. This column contains an address of allocation. Added function `flameGraph` which can build flamegraph containing allocated and not released memory. Reworking of [#38391](https://github.com/ClickHouse/ClickHouse/issues/38391). [#45322](https://github.com/ClickHouse/ClickHouse/pull/45322) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Added table function `azureBlobStorageCluster`. The supported set of features is very similar to table function `s3Cluster`. [#50795](https://github.com/ClickHouse/ClickHouse/pull/50795) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Allow using `cluster`, `clusterAllReplicas`, `remote`, and `remoteSecure` without table name in issue [#50808](https://github.com/ClickHouse/ClickHouse/issues/50808). [#50848](https://github.com/ClickHouse/ClickHouse/pull/50848) ([Yangkuan Liu](https://github.com/LiuYangkuan)). +* A system table to monitor Kafka consumers. [#50999](https://github.com/ClickHouse/ClickHouse/pull/50999) ([Ilya Golshtein](https://github.com/ilejn)). +* Added `max_sessions_for_user` setting. [#51724](https://github.com/ClickHouse/ClickHouse/pull/51724) ([Alexey Gerasimchuck](https://github.com/Demilivor)). +* New functions `toUTCTimestamp/fromUTCTimestamp` to act same as spark's `to_utc_timestamp/from_utc_timestamp`. [#52117](https://github.com/ClickHouse/ClickHouse/pull/52117) ([KevinyhZou](https://github.com/KevinyhZou)). +* Add new functions `structureToCapnProtoSchema`/`structureToProtobufSchema` that convert ClickHouse table structure to CapnProto/Protobuf format schema. Allow to input/output data in CapnProto/Protobuf format without external format schema using autogenerated schema from table structure (controlled by settings `format_capn_proto_use_autogenerated_schema`/`format_protobuf_use_autogenerated_schema`). Allow to export autogenerated schema while input/output using setting `output_format_schema`. [#52278](https://github.com/ClickHouse/ClickHouse/pull/52278) ([Kruglov Pavel](https://github.com/Avogar)). +* A new field `query_cache_usage` in `system.query_log` now shows if and how the query cache was used. [#52384](https://github.com/ClickHouse/ClickHouse/pull/52384) ([Robert Schulze](https://github.com/rschu1ze)). +* Add new function `startsWithUTF8` and `endsWithUTF8`. [#52555](https://github.com/ClickHouse/ClickHouse/pull/52555) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Allow variable number of columns in TSV/CustomSeparated/JSONCompactEachRow, make schema inference work with variable number of columns. Add settings `input_format_tsv_allow_variable_number_of_columns`, `input_format_custom_allow_variable_number_of_columns`, `input_format_json_compact_allow_variable_number_of_columns`. [#52692](https://github.com/ClickHouse/ClickHouse/pull/52692) ([Kruglov Pavel](https://github.com/Avogar)). +* Added `SYSTEM STOP/START PULLING REPLICATION LOG` queries (for testing `ReplicatedMergeTree`). [#52881](https://github.com/ClickHouse/ClickHouse/pull/52881) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Allow to execute constant non-deterministic functions in mutations on initiator. [#53129](https://github.com/ClickHouse/ClickHouse/pull/53129) ([Anton Popov](https://github.com/CurtizJ)). +* Add input format `One` that doesn't read any data and always returns single row with column `dummy` with type `UInt8` and value `0` like `system.one`. It can be used together with `_file/_path` virtual columns to list files in file/s3/url/hdfs/etc table functions without reading any data. [#53209](https://github.com/ClickHouse/ClickHouse/pull/53209) ([Kruglov Pavel](https://github.com/Avogar)). +* Add `tupleConcat` function. Closes [#52759](https://github.com/ClickHouse/ClickHouse/issues/52759). [#53239](https://github.com/ClickHouse/ClickHouse/pull/53239) ([Nikolay Degterinsky](https://github.com/evillique)). +* Support `TRUNCATE DATABASE` operation. [#53261](https://github.com/ClickHouse/ClickHouse/pull/53261) ([Bharat Nallan](https://github.com/bharatnc)). +* Add `max_threads_for_indexes` setting to limit number of threads used for primary key processing. [#53313](https://github.com/ClickHouse/ClickHouse/pull/53313) ([jorisgio](https://github.com/jorisgio)). +* Re-add SipHash keyed functions. [#53525](https://github.com/ClickHouse/ClickHouse/pull/53525) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* ([#52755](https://github.com/ClickHouse/ClickHouse/issues/52755) , [#52895](https://github.com/ClickHouse/ClickHouse/issues/52895)) Added functions `arrayRotateLeft`, `arrayRotateRight`, `arrayShiftLeft`, `arrayShiftRight`. [#53557](https://github.com/ClickHouse/ClickHouse/pull/53557) ([Mikhail Koviazin](https://github.com/mkmkme)). +* Add column `name` to `system.clusters` as an alias to cluster. [#53605](https://github.com/ClickHouse/ClickHouse/pull/53605) ([irenjj](https://github.com/irenjj)). +* The advanced dashboard now allows mass editing (save/load). [#53608](https://github.com/ClickHouse/ClickHouse/pull/53608) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The advanced dashboard now has an option to maximize charts and move them around. [#53622](https://github.com/ClickHouse/ClickHouse/pull/53622) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Added support for adding and subtracting arrays: `[5,2] + [1,7]`. Division and multiplication were not implemented due to confusion between pointwise multiplication and the scalar product of arguments. Closes [#49939](https://github.com/ClickHouse/ClickHouse/issues/49939). [#52625](https://github.com/ClickHouse/ClickHouse/pull/52625) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Add support for string literals as table names. Closes [#52178](https://github.com/ClickHouse/ClickHouse/issues/52178). [#52635](https://github.com/ClickHouse/ClickHouse/pull/52635) ([hendrik-m](https://github.com/hendrik-m)). + +#### Experimental Feature +* Add new table engine `S3Queue` for streaming data import from s3. Closes [#37012](https://github.com/ClickHouse/ClickHouse/issues/37012). [#49086](https://github.com/ClickHouse/ClickHouse/pull/49086) ([s-kat](https://github.com/s-kat)). It is not ready to use. Do not use it. +* Enable parallel reading from replicas over distributed table. Related to [#49708](https://github.com/ClickHouse/ClickHouse/issues/49708). [#53005](https://github.com/ClickHouse/ClickHouse/pull/53005) ([Igor Nikonov](https://github.com/devcrafter)). +* Add experimental support for HNSW as approximate neighbor search method. [#53447](https://github.com/ClickHouse/ClickHouse/pull/53447) ([Davit Vardanyan](https://github.com/davvard)). This is currently intended for those who continue working on the implementation. Do not use it. + +#### Performance Improvement +* Parquet filter pushdown. I.e. when reading Parquet files, row groups (chunks of the file) are skipped based on the WHERE condition and the min/max values in each column. In particular, if the file is roughly sorted by some column, queries that filter by a short range of that column will be much faster. [#52951](https://github.com/ClickHouse/ClickHouse/pull/52951) ([Michael Kolupaev](https://github.com/al13n321)). +* Optimize reading small row groups by batching them together in Parquet. Closes [#53069](https://github.com/ClickHouse/ClickHouse/issues/53069). [#53281](https://github.com/ClickHouse/ClickHouse/pull/53281) ([Kruglov Pavel](https://github.com/Avogar)). +* Optimize count from files in most input formats. Closes [#44334](https://github.com/ClickHouse/ClickHouse/issues/44334). [#53637](https://github.com/ClickHouse/ClickHouse/pull/53637) ([Kruglov Pavel](https://github.com/Avogar)). +* Use filter by file/path before reading in `url`/`file`/`hdfs` table functions. [#53529](https://github.com/ClickHouse/ClickHouse/pull/53529) ([Kruglov Pavel](https://github.com/Avogar)). +* Enable JIT compilation for AArch64, PowerPC, SystemZ, RISC-V. [#38217](https://github.com/ClickHouse/ClickHouse/pull/38217) ([Maksim Kita](https://github.com/kitaisreal)). +* Add setting `rewrite_count_distinct_if_with_count_distinct_implementation` to rewrite `countDistinctIf` with `count_distinct_implementation`. Closes [#30642](https://github.com/ClickHouse/ClickHouse/issues/30642). [#46051](https://github.com/ClickHouse/ClickHouse/pull/46051) ([flynn](https://github.com/ucasfl)). +* Speed up merging of states of `uniq` and `uniqExact` aggregate functions by parallelizing conversion before merge. [#50748](https://github.com/ClickHouse/ClickHouse/pull/50748) ([Jiebin Sun](https://github.com/jiebinn)). +* Optimize aggregation performance of nullable string key when using a large number of variable length keys. [#51399](https://github.com/ClickHouse/ClickHouse/pull/51399) ([LiuNeng](https://github.com/liuneng1994)). +* Add a pass in Analyzer for time filter optimization with preimage. The performance experiments of SSB on the ICX device (Intel Xeon Platinum 8380 CPU, 80 cores, 160 threads) show that this change could bring an improvement of 8.5% to the geomean QPS when the experimental analyzer is enabled. [#52091](https://github.com/ClickHouse/ClickHouse/pull/52091) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Optimize the merge if all hash sets are single-level in the `uniqExact` (COUNT DISTINCT) function. [#52973](https://github.com/ClickHouse/ClickHouse/pull/52973) ([Jiebin Sun](https://github.com/jiebinn)). +* `Join` table engine: do not clone hash join data structure with all columns. [#53046](https://github.com/ClickHouse/ClickHouse/pull/53046) ([Duc Canh Le](https://github.com/canhld94)). +* Implement native `ORC` input format without the "apache arrow" library to improve performance. [#53324](https://github.com/ClickHouse/ClickHouse/pull/53324) ([æŽæ‰¬](https://github.com/taiyang-li)). +* The dashboard will tell the server to compress the data, which is useful for large time frames over slow internet connections. For example, one chart with 86400 points can be 1.5 MB uncompressed and 60 KB compressed with `br`. [#53569](https://github.com/ClickHouse/ClickHouse/pull/53569) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Better utilization of thread pool for BACKUPs and RESTOREs. [#53649](https://github.com/ClickHouse/ClickHouse/pull/53649) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Load filesystem cache metadata on startup in parallel. Configured by `load_metadata_threads` (default: 1) cache config setting. Related to [#52037](https://github.com/ClickHouse/ClickHouse/issues/52037). [#52943](https://github.com/ClickHouse/ClickHouse/pull/52943) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Improve `move_primary_key_columns_to_end_of_prewhere`. [#53337](https://github.com/ClickHouse/ClickHouse/pull/53337) ([Han Fei](https://github.com/hanfei1991)). +* This optimizes the interaction with ClickHouse Keeper. Previously the caller could register the same watch callback multiple times. In that case each entry was consuming memory and the same callback was called multiple times which didn't make much sense. In order to avoid this the caller could have some logic to not add the same watch multiple times. With this change this deduplication is done internally if the watch callback is passed via shared_ptr. [#53452](https://github.com/ClickHouse/ClickHouse/pull/53452) ([Alexander Gololobov](https://github.com/davenger)). +* Cache number of rows in files for count in file/s3/url/hdfs/azure functions. The cache can be enabled/disabled by setting `use_cache_for_count_from_files` (enabled by default). Continuation of https://github.com/ClickHouse/ClickHouse/pull/53637. [#53692](https://github.com/ClickHouse/ClickHouse/pull/53692) ([Kruglov Pavel](https://github.com/Avogar)). +* More careful thread management will improve the speed of the S3 table function over a large number of files by more than ~25%. [#53668](https://github.com/ClickHouse/ClickHouse/pull/53668) ([pufit](https://github.com/pufit)). + +#### Improvement +* Add `stderr_reaction` configuration/setting to control the reaction (none, log or throw) when external command stderr has data. This helps make debugging external command easier. [#43210](https://github.com/ClickHouse/ClickHouse/pull/43210) ([Amos Bird](https://github.com/amosbird)). +* Add `partition` column to the `system part_log` and merge table. [#48990](https://github.com/ClickHouse/ClickHouse/pull/48990) ([Jianfei Hu](https://github.com/incfly)). +* The sizes of the (index) uncompressed/mark, mmap and query caches can now be configured dynamically at runtime (without server restart). [#51446](https://github.com/ClickHouse/ClickHouse/pull/51446) ([Robert Schulze](https://github.com/rschu1ze)). +* If a dictionary is created with a complex key, automatically choose the "complex key" layout variant. [#49587](https://github.com/ClickHouse/ClickHouse/pull/49587) ([xiebin](https://github.com/xbthink)). +* Add setting `use_concurrency_control` for better testing of the new concurrency control feature. [#49618](https://github.com/ClickHouse/ClickHouse/pull/49618) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Added suggestions for mistyped names for databases and tables. [#49801](https://github.com/ClickHouse/ClickHouse/pull/49801) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* While read small files from HDFS by Gluten, we found that it will cost more times when compare to directly query by Spark. And we did something with that. [#50063](https://github.com/ClickHouse/ClickHouse/pull/50063) ([KevinyhZou](https://github.com/KevinyhZou)). +* There were too many worthless error logs after session expiration, which we didn't like. [#50171](https://github.com/ClickHouse/ClickHouse/pull/50171) ([helifu](https://github.com/helifu)). +* Introduce fallback ZooKeeper sessions which are time-bound. Fixed `index` column in system.zookeeper_connection for DNS addresses. [#50424](https://github.com/ClickHouse/ClickHouse/pull/50424) ([Anton Kozlov](https://github.com/tonickkozlov)). +* Add ability to log when max_partitions_per_insert_block is reached. [#50948](https://github.com/ClickHouse/ClickHouse/pull/50948) ([Sean Haynes](https://github.com/seandhaynes)). +* Added a bunch of custom commands to clickhouse-keeper-client (mostly to make ClickHouse debugging easier). [#51117](https://github.com/ClickHouse/ClickHouse/pull/51117) ([pufit](https://github.com/pufit)). +* Updated check for connection string in `azureBlobStorage` table function as connection string with "sas" does not always begin with the default endpoint and updated connection URL to include "sas" token after adding Azure's container to URL. [#51141](https://github.com/ClickHouse/ClickHouse/pull/51141) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fix description for filtering sets in the `full_sorting_merge` JOIN algorithm. [#51329](https://github.com/ClickHouse/ClickHouse/pull/51329) ([Tanay Tummalapalli](https://github.com/ttanay)). +* Fixed memory consumption in `Aggregator` when `max_block_size` is huge. [#51566](https://github.com/ClickHouse/ClickHouse/pull/51566) ([Nikita Taranov](https://github.com/nickitat)). +* Add `SYSTEM SYNC FILESYSTEM CACHE` command. It will compare in-memory state of filesystem cache with what it has on disk and fix in-memory state if needed. This is only needed if you are making manual interventions in on-disk data, which is highly discouraged. [#51622](https://github.com/ClickHouse/ClickHouse/pull/51622) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Attempt to create a generic proxy resolver for CH while keeping backwards compatibility with existing S3 storage conf proxy resolver. [#51749](https://github.com/ClickHouse/ClickHouse/pull/51749) ([Arthur Passos](https://github.com/arthurpassos)). +* Support reading tuple subcolumns from file/s3/hdfs/url/azureBlobStorage table functions. [#51806](https://github.com/ClickHouse/ClickHouse/pull/51806) ([Kruglov Pavel](https://github.com/Avogar)). +* Function `arrayIntersect` now returns the values in the order, corresponding to the first argument. Closes [#27622](https://github.com/ClickHouse/ClickHouse/issues/27622). [#51850](https://github.com/ClickHouse/ClickHouse/pull/51850) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Add new queries, which allow to create/drop of access entities in specified access storage or move access entities from one access storage to another. [#51912](https://github.com/ClickHouse/ClickHouse/pull/51912) ([pufit](https://github.com/pufit)). +* Make `ALTER TABLE FREEZE` queries not replicated in the Replicated database engine. [#52064](https://github.com/ClickHouse/ClickHouse/pull/52064) ([Mike Kot](https://github.com/myrrc)). +* Added possibility to flush system tables on unexpected shutdown. [#52174](https://github.com/ClickHouse/ClickHouse/pull/52174) ([Alexey Gerasimchuck](https://github.com/Demilivor)). +* Fix the case when `s3` table function refused to work with pre-signed URLs. close [#50846](https://github.com/ClickHouse/ClickHouse/issues/50846). [#52310](https://github.com/ClickHouse/ClickHouse/pull/52310) ([chen](https://github.com/xiedeyantu)). +* Add column `name` as an alias to `event` and `metric` in the `system.events` and `system.metrics` tables. Closes [#51257](https://github.com/ClickHouse/ClickHouse/issues/51257). [#52315](https://github.com/ClickHouse/ClickHouse/pull/52315) ([chen](https://github.com/xiedeyantu)). +* Added support of syntax `CREATE UNIQUE INDEX` in parser as a no-op for better SQL compatibility. `UNIQUE` index is not supported. Set `create_index_ignore_unique = 1` to ignore UNIQUE keyword in queries. [#52320](https://github.com/ClickHouse/ClickHouse/pull/52320) ([Ilya Yatsishin](https://github.com/qoega)). +* Add support of predefined macro (`{database}` and `{table}`) in some Kafka engine settings: topic, consumer, client_id, etc. [#52386](https://github.com/ClickHouse/ClickHouse/pull/52386) ([Yury Bogomolov](https://github.com/ybogo)). +* Disable updating the filesystem cache during backup/restore. Filesystem cache must not be updated during backup/restore, it seems it just slows down the process without any profit (because the BACKUP command can read a lot of data and it's no use to put all the data to the filesystem cache and immediately evict it). [#52402](https://github.com/ClickHouse/ClickHouse/pull/52402) ([Vitaly Baranov](https://github.com/vitlibar)). +* The configuration of S3 endpoint allow using it from the root, and append '/' automatically if needed. [#47809](https://github.com/ClickHouse/ClickHouse/issues/47809). [#52600](https://github.com/ClickHouse/ClickHouse/pull/52600) ([xiaolei565](https://github.com/xiaolei565)). +* For clickhouse-local allow positional options and populate global UDF settings (user_scripts_path and user_defined_executable_functions_config). [#52643](https://github.com/ClickHouse/ClickHouse/pull/52643) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* `system.asynchronous_metrics` now includes metrics "QueryCacheEntries" and "QueryCacheBytes" to inspect the query cache. [#52650](https://github.com/ClickHouse/ClickHouse/pull/52650) ([Robert Schulze](https://github.com/rschu1ze)). +* Added possibility to use `s3_storage_class` parameter in the `SETTINGS` clause of the `BACKUP` statement for backups to S3. [#52658](https://github.com/ClickHouse/ClickHouse/pull/52658) ([Roman Vasin](https://github.com/rvasin)). +* Add utility `print-backup-info.py` which parses a backup metadata file and prints information about the backup. [#52690](https://github.com/ClickHouse/ClickHouse/pull/52690) ([Vitaly Baranov](https://github.com/vitlibar)). +* Closes [#49510](https://github.com/ClickHouse/ClickHouse/issues/49510). Currently we have database and table names case-sensitive, but BI tools query `information_schema` sometimes in lowercase, sometimes in uppercase. For this reason we have `information_schema` database, containing lowercase tables, such as `information_schema.tables` and `INFORMATION_SCHEMA` database, containing uppercase tables, such as `INFORMATION_SCHEMA.TABLES`. But some tools are querying `INFORMATION_SCHEMA.tables` and `information_schema.TABLES`. The proposed solution is to duplicate both lowercase and uppercase tables in lowercase and uppercase `information_schema` database. [#52695](https://github.com/ClickHouse/ClickHouse/pull/52695) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Query`CHECK TABLE` has better performance and usability (sends progress updates, cancellable). [#52745](https://github.com/ClickHouse/ClickHouse/pull/52745) ([vdimir](https://github.com/vdimir)). +* Add support for `modulo`, `intDiv`, `intDivOrZero` for tuples by distributing them across tuple's elements. [#52758](https://github.com/ClickHouse/ClickHouse/pull/52758) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Search for default `yaml` and `yml` configs in clickhouse-client after `xml`. [#52767](https://github.com/ClickHouse/ClickHouse/pull/52767) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* When merging into non-'clickhouse' rooted configuration, configs with different root node name just bypassed without exception. [#52770](https://github.com/ClickHouse/ClickHouse/pull/52770) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Now it's possible to specify min (`memory_profiler_sample_min_allocation_size`) and max (`memory_profiler_sample_max_allocation_size`) size for allocations to be tracked with sampling memory profiler. [#52779](https://github.com/ClickHouse/ClickHouse/pull/52779) ([alesapin](https://github.com/alesapin)). +* Add `precise_float_parsing` setting to switch float parsing methods (fast/precise). [#52791](https://github.com/ClickHouse/ClickHouse/pull/52791) ([Andrey Zvonov](https://github.com/zvonand)). +* Use the same default paths for `clickhouse-keeper` (symlink) as for `clickhouse-keeper` (executable). [#52861](https://github.com/ClickHouse/ClickHouse/pull/52861) ([Vitaly Baranov](https://github.com/vitlibar)). +* Improve error message for table function `remote`. Closes [#40220](https://github.com/ClickHouse/ClickHouse/issues/40220). [#52959](https://github.com/ClickHouse/ClickHouse/pull/52959) ([jiyoungyoooo](https://github.com/jiyoungyoooo)). +* Added the possibility to specify custom storage policy in the `SETTINGS` clause of `RESTORE` queries. [#52970](https://github.com/ClickHouse/ClickHouse/pull/52970) ([Victor Krasnov](https://github.com/sirvickr)). +* Add the ability to throttle the S3 requests on backup operations (`BACKUP` and `RESTORE` commands now honor `s3_max_[get/put]_[rps/burst]`). [#52974](https://github.com/ClickHouse/ClickHouse/pull/52974) ([Daniel Pozo Escalona](https://github.com/danipozo)). +* Add settings to ignore ON CLUSTER clause in queries for management of replicated user-defined functions or access control entities with replicated storage. [#52975](https://github.com/ClickHouse/ClickHouse/pull/52975) ([Aleksei Filatov](https://github.com/aalexfvk)). +* EXPLAIN actions for JOIN step. [#53006](https://github.com/ClickHouse/ClickHouse/pull/53006) ([Maksim Kita](https://github.com/kitaisreal)). +* Make `hasTokenOrNull` and `hasTokenCaseInsensitiveOrNull` return null for empty needles. [#53059](https://github.com/ClickHouse/ClickHouse/pull/53059) ([ltrk2](https://github.com/ltrk2)). +* Allow to restrict allowed paths for filesystem caches. Mainly useful for dynamic disks. If in server config `filesystem_caches_path` is specified, all filesystem caches' paths will be restricted to this directory. E.g. if the `path` in cache config is relative - it will be put in `filesystem_caches_path`; if `path` in cache config is absolute, it will be required to lie inside `filesystem_caches_path`. If `filesystem_caches_path` is not specified in config, then behaviour will be the same as in earlier versions. [#53124](https://github.com/ClickHouse/ClickHouse/pull/53124) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Added a bunch of custom commands (mostly to make ClickHouse debugging easier). [#53127](https://github.com/ClickHouse/ClickHouse/pull/53127) ([pufit](https://github.com/pufit)). +* Add diagnostic info about file name during schema inference - it helps when you process multiple files with globs. [#53135](https://github.com/ClickHouse/ClickHouse/pull/53135) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Client will load suggestions using the main connection if the second connection is not allowed to create a session. [#53177](https://github.com/ClickHouse/ClickHouse/pull/53177) ([Alexey Gerasimchuck](https://github.com/Demilivor)). +* Add EXCEPT clause to `SYSTEM STOP/START LISTEN QUERIES [ALL/DEFAULT/CUSTOM]` query, for example `SYSTEM STOP LISTEN QUERIES ALL EXCEPT TCP, HTTP`. [#53280](https://github.com/ClickHouse/ClickHouse/pull/53280) ([Nikolay Degterinsky](https://github.com/evillique)). +* Change the default of `max_concurrent_queries` from 100 to 1000. It's ok to have many concurrent queries if they are not heavy, and mostly waiting for the network. Note: don't confuse concurrent queries and QPS: for example, ClickHouse server can do tens of thousands of QPS with less than 100 concurrent queries. [#53285](https://github.com/ClickHouse/ClickHouse/pull/53285) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Limit number of concurrent background partition optimize merges. [#53405](https://github.com/ClickHouse/ClickHouse/pull/53405) ([Duc Canh Le](https://github.com/canhld94)). +* Added a setting `allow_moving_table_directory_to_trash` that allows to ignore `Directory for table data already exists` error when replicating/recovering a `Replicated` database. [#53425](https://github.com/ClickHouse/ClickHouse/pull/53425) ([Alexander Tokmakov](https://github.com/tavplubix)). +* If server settings `asynchronous_metrics_update_period_s` and `asynchronous_heavy_metrics_update_period_s` are misconfigured to 0, it will now fail gracefully instead of terminating the application. [#53428](https://github.com/ClickHouse/ClickHouse/pull/53428) ([Robert Schulze](https://github.com/rschu1ze)). +* The ClickHouse server now respects memory limits changed via cgroups when reloading its configuration. [#53455](https://github.com/ClickHouse/ClickHouse/pull/53455) ([Robert Schulze](https://github.com/rschu1ze)). +* Add ability to turn off flush of Distributed tables on `DETACH`, `DROP`, or server shutdown. [#53501](https://github.com/ClickHouse/ClickHouse/pull/53501) ([Azat Khuzhin](https://github.com/azat)). +* The `domainRFC` function now supports IPv6 in square brackets. [#53506](https://github.com/ClickHouse/ClickHouse/pull/53506) ([Chen768959](https://github.com/Chen768959)). +* Use longer timeout for S3 CopyObject requests, which are used in backups. [#53533](https://github.com/ClickHouse/ClickHouse/pull/53533) ([Michael Kolupaev](https://github.com/al13n321)). +* Added server setting `aggregate_function_group_array_max_element_size`. This setting is used to limit array size for `groupArray` function at serialization. The default value is `16777215`. [#53550](https://github.com/ClickHouse/ClickHouse/pull/53550) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* `SCHEMA` was added as alias for `DATABASE` to improve MySQL compatibility. [#53587](https://github.com/ClickHouse/ClickHouse/pull/53587) ([Daniël van Eeden](https://github.com/dveeden)). +* Add asynchronous metrics about tables in the system database. For example, `TotalBytesOfMergeTreeTablesSystem`. This closes [#53603](https://github.com/ClickHouse/ClickHouse/issues/53603). [#53604](https://github.com/ClickHouse/ClickHouse/pull/53604) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* SQL editor in the Play UI and Dashboard will not use Grammarly. [#53614](https://github.com/ClickHouse/ClickHouse/pull/53614) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* As expert-level settings, it is now possible to (1) configure the size_ratio (i.e. the relative size of the protected queue) of the [index] mark/uncompressed caches, (2) configure the cache policy of the index mark and index uncompressed caches. [#53657](https://github.com/ClickHouse/ClickHouse/pull/53657) ([Robert Schulze](https://github.com/rschu1ze)). +* Added client info validation to the query packet in TCPHandler. [#53673](https://github.com/ClickHouse/ClickHouse/pull/53673) ([Alexey Gerasimchuck](https://github.com/Demilivor)). +* Retry loading parts in case of network errors while interaction with Microsoft Azure. [#53750](https://github.com/ClickHouse/ClickHouse/pull/53750) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Stacktrace for exceptions, Materailized view exceptions are propagated. [#53766](https://github.com/ClickHouse/ClickHouse/pull/53766) ([Ilya Golshtein](https://github.com/ilejn)). +* If no hostname or port were specified, keeper client will try to search for a connection string in the ClickHouse's config.xml. [#53769](https://github.com/ClickHouse/ClickHouse/pull/53769) ([pufit](https://github.com/pufit)). +* Add profile event `PartsLockMicroseconds` which shows the amount of microseconds we hold the data parts lock in MergeTree table engine family. [#53797](https://github.com/ClickHouse/ClickHouse/pull/53797) ([alesapin](https://github.com/alesapin)). +* Make reconnect limit in RAFT limits configurable for keeper. This configuration can help to make keeper to rebuild connection with peers quicker if the current connection is broken. [#53817](https://github.com/ClickHouse/ClickHouse/pull/53817) ([Pengyuan Bian](https://github.com/bianpengyuan)). +* Ignore foreign keys in tables definition to improve compatibility with MySQL, so a user wouldn't need to rewrite his SQL of the foreign key part, ref [#53380](https://github.com/ClickHouse/ClickHouse/issues/53380). [#53864](https://github.com/ClickHouse/ClickHouse/pull/53864) ([jsc0218](https://github.com/jsc0218)). + +#### Build/Testing/Packaging Improvement +* Don't expose symbols from ClickHouse binary to dynamic linker. It might fix [#43933](https://github.com/ClickHouse/ClickHouse/issues/43933). [#47475](https://github.com/ClickHouse/ClickHouse/pull/47475) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add `clickhouse-keeper-client` symlink to the clickhouse-server package. [#51882](https://github.com/ClickHouse/ClickHouse/pull/51882) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add https://github.com/elliotchance/sqltest to CI to report the SQL 2016 conformance. [#52293](https://github.com/ClickHouse/ClickHouse/pull/52293) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Upgrade PRQL to 0.9.3. [#53060](https://github.com/ClickHouse/ClickHouse/pull/53060) ([Maximilian Roos](https://github.com/max-sixty)). +* System tables from CI checks are exported to ClickHouse Cloud. [#53086](https://github.com/ClickHouse/ClickHouse/pull/53086) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The compiler's profile data (`-ftime-trace`) is uploaded to ClickHouse Cloud. [#53100](https://github.com/ClickHouse/ClickHouse/pull/53100) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Speed up Debug and Tidy builds. [#53178](https://github.com/ClickHouse/ClickHouse/pull/53178) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Speed up the build by removing tons and tonnes of garbage. One of the frequently included headers was poisoned by boost. [#53180](https://github.com/ClickHouse/ClickHouse/pull/53180) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Remove even more garbage. [#53182](https://github.com/ClickHouse/ClickHouse/pull/53182) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The function `arrayAUC` was using heavy C++ templates - ditched them. [#53183](https://github.com/ClickHouse/ClickHouse/pull/53183) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Some translation units were always rebuilt regardless of ccache. The culprit is found and fixed. [#53184](https://github.com/ClickHouse/ClickHouse/pull/53184) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The compiler's profile data (`-ftime-trace`) is uploaded to ClickHouse Cloud., the second attempt after [#53100](https://github.com/ClickHouse/ClickHouse/issues/53100). [#53213](https://github.com/ClickHouse/ClickHouse/pull/53213) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Export logs from CI in stateful tests to ClickHouse Cloud. [#53351](https://github.com/ClickHouse/ClickHouse/pull/53351) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Export logs from CI in stress tests. [#53353](https://github.com/ClickHouse/ClickHouse/pull/53353) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Export logs from CI in fuzzer. [#53354](https://github.com/ClickHouse/ClickHouse/pull/53354) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Preserve environment parameters in `clickhouse start` command. Fixes [#51962](https://github.com/ClickHouse/ClickHouse/issues/51962). [#53418](https://github.com/ClickHouse/ClickHouse/pull/53418) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Follow up for [#53418](https://github.com/ClickHouse/ClickHouse/issues/53418). Small improvements for install_check.py, adding tests for proper ENV parameters passing to the main process on `init.d start`. [#53457](https://github.com/ClickHouse/ClickHouse/pull/53457) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Reorganize file management in CMake to prevent potential duplications. For instance, `indexHint.cpp` is duplicated in both `dbms_sources` and `clickhouse_functions_sources`. [#53621](https://github.com/ClickHouse/ClickHouse/pull/53621) ([Amos Bird](https://github.com/amosbird)). +* Upgrade snappy to 1.1.10. [#53672](https://github.com/ClickHouse/ClickHouse/pull/53672) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Slightly improve cmake build by sanitizing some dependencies and removing some duplicates. Each commit includes a short description of the changes made. [#53759](https://github.com/ClickHouse/ClickHouse/pull/53759) ([Amos Bird](https://github.com/amosbird)). + +#### Bug Fix (user-visible misbehavior in an official stable release) +* Do not reset (experimental) Annoy index during build-up with more than one mark [#51325](https://github.com/ClickHouse/ClickHouse/pull/51325) ([Tian Xinhui](https://github.com/xinhuitian)). +* Fix usage of temporary directories during RESTORE [#51493](https://github.com/ClickHouse/ClickHouse/pull/51493) ([Azat Khuzhin](https://github.com/azat)). +* Fix binary arithmetic for Nullable(IPv4) [#51642](https://github.com/ClickHouse/ClickHouse/pull/51642) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Support IPv4 and IPv6 data types as dictionary attributes [#51756](https://github.com/ClickHouse/ClickHouse/pull/51756) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* A fix for checksum of compress marks [#51777](https://github.com/ClickHouse/ClickHouse/pull/51777) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fix mistakenly comma parsing as part of datetime in CSV best effort parsing [#51950](https://github.com/ClickHouse/ClickHouse/pull/51950) ([Kruglov Pavel](https://github.com/Avogar)). +* Don't throw exception when executable UDF has parameters [#51961](https://github.com/ClickHouse/ClickHouse/pull/51961) ([Nikita Taranov](https://github.com/nickitat)). +* Fix recalculation of skip indexes and projections in `ALTER DELETE` queries [#52530](https://github.com/ClickHouse/ClickHouse/pull/52530) ([Anton Popov](https://github.com/CurtizJ)). +* MaterializedMySQL: Fix the infinite loop in ReadBuffer::read [#52621](https://github.com/ClickHouse/ClickHouse/pull/52621) ([Val Doroshchuk](https://github.com/valbok)). +* Load suggestion only with `clickhouse` dialect [#52628](https://github.com/ClickHouse/ClickHouse/pull/52628) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)). +* Init and destroy ares channel on demand. [#52634](https://github.com/ClickHouse/ClickHouse/pull/52634) ([Arthur Passos](https://github.com/arthurpassos)). +* Fix filtering by virtual columns with OR expression [#52653](https://github.com/ClickHouse/ClickHouse/pull/52653) ([Azat Khuzhin](https://github.com/azat)). +* Fix crash in function `tuple` with one sparse column argument [#52659](https://github.com/ClickHouse/ClickHouse/pull/52659) ([Anton Popov](https://github.com/CurtizJ)). +* Fix named collections on cluster [#52687](https://github.com/ClickHouse/ClickHouse/pull/52687) ([Al Korgun](https://github.com/alkorgun)). +* Fix reading of unnecessary column in case of multistage `PREWHERE` [#52689](https://github.com/ClickHouse/ClickHouse/pull/52689) ([Anton Popov](https://github.com/CurtizJ)). +* Fix unexpected sort result on multi columns with nulls first direction [#52761](https://github.com/ClickHouse/ClickHouse/pull/52761) ([copperybean](https://github.com/copperybean)). +* Fix data race in Keeper reconfiguration [#52804](https://github.com/ClickHouse/ClickHouse/pull/52804) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix sorting of sparse columns with large limit [#52827](https://github.com/ClickHouse/ClickHouse/pull/52827) ([Anton Popov](https://github.com/CurtizJ)). +* clickhouse-keeper: fix implementation of server with poll. [#52833](https://github.com/ClickHouse/ClickHouse/pull/52833) ([Andy Fiddaman](https://github.com/citrus-it)). +* Make regexp analyzer recognize named capturing groups [#52840](https://github.com/ClickHouse/ClickHouse/pull/52840) ([Han Fei](https://github.com/hanfei1991)). +* Fix possible assert in `~PushingAsyncPipelineExecutor` in clickhouse-local [#52862](https://github.com/ClickHouse/ClickHouse/pull/52862) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix reading of empty `Nested(Array(LowCardinality(...)))` [#52949](https://github.com/ClickHouse/ClickHouse/pull/52949) ([Anton Popov](https://github.com/CurtizJ)). +* Added new tests for session_log and fixed the inconsistency between login and logout. [#52958](https://github.com/ClickHouse/ClickHouse/pull/52958) ([Alexey Gerasimchuck](https://github.com/Demilivor)). +* Fix password leak in show create mysql table [#52962](https://github.com/ClickHouse/ClickHouse/pull/52962) ([Duc Canh Le](https://github.com/canhld94)). +* Convert sparse column format to full in CreateSetAndFilterOnTheFlyStep [#53000](https://github.com/ClickHouse/ClickHouse/pull/53000) ([vdimir](https://github.com/vdimir)). +* Fix rare race condition with empty key prefix directory deletion in fs cache [#53055](https://github.com/ClickHouse/ClickHouse/pull/53055) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix ZstdDeflatingWriteBuffer truncating the output sometimes [#53064](https://github.com/ClickHouse/ClickHouse/pull/53064) ([Michael Kolupaev](https://github.com/al13n321)). +* Fix query_id in part_log with async flush queries [#53103](https://github.com/ClickHouse/ClickHouse/pull/53103) ([Raúl Marín](https://github.com/Algunenano)). +* Fix possible error from cache "Read unexpected size" [#53121](https://github.com/ClickHouse/ClickHouse/pull/53121) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Disable the new parquet encoder [#53130](https://github.com/ClickHouse/ClickHouse/pull/53130) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix "Not-ready Set" exception [#53162](https://github.com/ClickHouse/ClickHouse/pull/53162) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix character escaping in the PostgreSQL engine [#53250](https://github.com/ClickHouse/ClickHouse/pull/53250) ([Nikolay Degterinsky](https://github.com/evillique)). +* Experimental session_log table: Added new tests for session_log and fixed the inconsistency between login and logout. [#53255](https://github.com/ClickHouse/ClickHouse/pull/53255) ([Alexey Gerasimchuck](https://github.com/Demilivor)). Fixed inconsistency between login success and logout [#53302](https://github.com/ClickHouse/ClickHouse/pull/53302) ([Alexey Gerasimchuck](https://github.com/Demilivor)). +* Fix adding sub-second intervals to DateTime [#53309](https://github.com/ClickHouse/ClickHouse/pull/53309) ([Michael Kolupaev](https://github.com/al13n321)). +* Fix "Context has expired" error in dictionaries [#53342](https://github.com/ClickHouse/ClickHouse/pull/53342) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix incorrect normal projection AST format [#53347](https://github.com/ClickHouse/ClickHouse/pull/53347) ([Amos Bird](https://github.com/amosbird)). +* Forbid use_structure_from_insertion_table_in_table_functions when execute Scalar [#53348](https://github.com/ClickHouse/ClickHouse/pull/53348) ([flynn](https://github.com/ucasfl)). +* Fix loading lazy database during system.table select query [#53372](https://github.com/ClickHouse/ClickHouse/pull/53372) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fixed system.data_skipping_indices for MaterializedMySQL [#53381](https://github.com/ClickHouse/ClickHouse/pull/53381) ([Filipp Ozinov](https://github.com/bakwc)). +* Fix processing single carriage return in TSV file segmentation engine [#53407](https://github.com/ClickHouse/ClickHouse/pull/53407) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix `Context has expired` error properly [#53433](https://github.com/ClickHouse/ClickHouse/pull/53433) ([Michael Kolupaev](https://github.com/al13n321)). +* Fix `timeout_overflow_mode` when having subquery in the rhs of IN [#53439](https://github.com/ClickHouse/ClickHouse/pull/53439) ([Duc Canh Le](https://github.com/canhld94)). +* Fix an unexpected behavior in [#53152](https://github.com/ClickHouse/ClickHouse/issues/53152) [#53440](https://github.com/ClickHouse/ClickHouse/pull/53440) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Fix JSON_QUERY Function parse error while path is all number [#53470](https://github.com/ClickHouse/ClickHouse/pull/53470) ([KevinyhZou](https://github.com/KevinyhZou)). +* Fix wrong columns order for queries with parallel FINAL. [#53489](https://github.com/ClickHouse/ClickHouse/pull/53489) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed SELECTing from ReplacingMergeTree with do_not_merge_across_partitions_select_final [#53511](https://github.com/ClickHouse/ClickHouse/pull/53511) ([Vasily Nemkov](https://github.com/Enmk)). +* Flush async insert queue first on shutdown [#53547](https://github.com/ClickHouse/ClickHouse/pull/53547) ([joelynch](https://github.com/joelynch)). +* Fix crash in join on sparse columna [#53548](https://github.com/ClickHouse/ClickHouse/pull/53548) ([vdimir](https://github.com/vdimir)). +* Fix possible UB in Set skipping index for functions with incorrect args [#53559](https://github.com/ClickHouse/ClickHouse/pull/53559) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible UB in inverted indexes (experimental feature) [#53560](https://github.com/ClickHouse/ClickHouse/pull/53560) ([Azat Khuzhin](https://github.com/azat)). +* Fix: interpolate expression takes source column instead of same name aliased from select expression. [#53572](https://github.com/ClickHouse/ClickHouse/pull/53572) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix number of dropped granules in EXPLAIN PLAN index=1 [#53616](https://github.com/ClickHouse/ClickHouse/pull/53616) ([wangxiaobo](https://github.com/wzb5212)). +* Correctly handle totals and extremes with `DelayedSource` [#53644](https://github.com/ClickHouse/ClickHouse/pull/53644) ([Antonio Andelic](https://github.com/antonio2368)). +* Prepared set cache in mutation pipeline stuck [#53645](https://github.com/ClickHouse/ClickHouse/pull/53645) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix bug on mutations with subcolumns of type JSON in predicates of UPDATE and DELETE queries. [#53677](https://github.com/ClickHouse/ClickHouse/pull/53677) ([VanDarkholme7](https://github.com/VanDarkholme7)). +* Fix filter pushdown for full_sorting_merge join [#53699](https://github.com/ClickHouse/ClickHouse/pull/53699) ([vdimir](https://github.com/vdimir)). +* Try to fix bug with `NULL::LowCardinality(Nullable(...)) NOT IN` [#53706](https://github.com/ClickHouse/ClickHouse/pull/53706) ([Andrey Zvonov](https://github.com/zvonand)). +* Fix: sorted distinct with sparse columns [#53711](https://github.com/ClickHouse/ClickHouse/pull/53711) ([Igor Nikonov](https://github.com/devcrafter)). +* `transform`: correctly handle default column with multiple rows [#53742](https://github.com/ClickHouse/ClickHouse/pull/53742) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Fix fuzzer crash in parseDateTime [#53764](https://github.com/ClickHouse/ClickHouse/pull/53764) ([Robert Schulze](https://github.com/rschu1ze)). +* MaterializedPostgreSQL: fix uncaught exception in getCreateTableQueryImpl [#53832](https://github.com/ClickHouse/ClickHouse/pull/53832) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix possible segfault while using PostgreSQL engine [#53847](https://github.com/ClickHouse/ClickHouse/pull/53847) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix named_collection_admin alias [#54066](https://github.com/ClickHouse/ClickHouse/pull/54066) ([Kseniia Sumarokova](https://github.com/kssenii)). + +### ClickHouse release 23.7, 2023-07-27 {#237} + +#### Backward Incompatible Change +* Add `NAMED COLLECTION` access type (aliases `USE NAMED COLLECTION`, `NAMED COLLECTION USAGE`). This PR is backward incompatible because this access type is disabled by default (because a parent access type `NAMED COLLECTION ADMIN` is disabled by default as well). Proposed in [#50277](https://github.com/ClickHouse/ClickHouse/issues/50277). To grant use `GRANT NAMED COLLECTION ON collection_name TO user` or `GRANT NAMED COLLECTION ON * TO user`, to be able to give these grants `named_collection_admin` is required in config (previously it was named `named_collection_control`, so will remain as an alias). [#50625](https://github.com/ClickHouse/ClickHouse/pull/50625) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fixing a typo in the `system.parts` column name `last_removal_attemp_time`. Now it is named `last_removal_attempt_time`. [#52104](https://github.com/ClickHouse/ClickHouse/pull/52104) ([filimonov](https://github.com/filimonov)). +* Bump version of the distributed_ddl_entry_format_version to 5 by default (enables opentelemetry and initial_query_idd pass through). This will not allow to process existing entries for distributed DDL after *downgrade* (but note, that usually there should be no such unprocessed entries). [#52128](https://github.com/ClickHouse/ClickHouse/pull/52128) ([Azat Khuzhin](https://github.com/azat)). +* Check projection metadata the same way we check ordinary metadata. This change may prevent the server from starting in case there was a table with an invalid projection. An example is a projection that created positional columns in PK (e.g. `projection p (select * order by 1, 4)` which is not allowed in table PK and can cause a crash during insert/merge). Drop such projections before the update. Fixes [#52353](https://github.com/ClickHouse/ClickHouse/issues/52353). [#52361](https://github.com/ClickHouse/ClickHouse/pull/52361) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* The experimental feature `hashid` is removed due to a bug. The quality of implementation was questionable at the start, and it didn't get through the experimental status. This closes [#52406](https://github.com/ClickHouse/ClickHouse/issues/52406). [#52449](https://github.com/ClickHouse/ClickHouse/pull/52449) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### New Feature +* Added `Overlay` database engine to combine multiple databases into one. Added `Filesystem` database engine to represent a directory in the filesystem as a set of implicitly available tables with auto-detected formats and structures. A new `S3` database engine allows to read-only interact with s3 storage by representing a prefix as a set of tables. A new `HDFS` database engine allows to interact with HDFS storage in the same way. [#48821](https://github.com/ClickHouse/ClickHouse/pull/48821) ([alekseygolub](https://github.com/alekseygolub)). +* Add support for external disks in Keeper for storing snapshots and logs. [#50098](https://github.com/ClickHouse/ClickHouse/pull/50098) ([Antonio Andelic](https://github.com/antonio2368)). +* Add support for multi-directory selection (`{}`) globs. [#50559](https://github.com/ClickHouse/ClickHouse/pull/50559) ([Andrey Zvonov](https://github.com/zvonand)). +* Kafka connector can fetch Avro schema from schema registry with basic authentication using url-encoded credentials. [#49664](https://github.com/ClickHouse/ClickHouse/pull/49664) ([Ilya Golshtein](https://github.com/ilejn)). +* Add function `arrayJaccardIndex` which computes the Jaccard similarity between two arrays. [#50076](https://github.com/ClickHouse/ClickHouse/pull/50076) ([FFFFFFFHHHHHHH](https://github.com/FFFFFFFHHHHHHH)). +* Add a column `is_obsolete` to `system.settings` and similar tables. Closes [#50819](https://github.com/ClickHouse/ClickHouse/issues/50819). [#50826](https://github.com/ClickHouse/ClickHouse/pull/50826) ([flynn](https://github.com/ucasfl)). +* Implement support of encrypted elements in configuration file. Added possibility to use encrypted text in leaf elements of configuration file. The text is encrypted using encryption codecs from `` section. [#50986](https://github.com/ClickHouse/ClickHouse/pull/50986) ([Roman Vasin](https://github.com/rvasin)). +* Grace Hash Join algorithm is now applicable to FULL and RIGHT JOINs. [#49483](https://github.com/ClickHouse/ClickHouse/issues/49483). [#51013](https://github.com/ClickHouse/ClickHouse/pull/51013) ([lgbo](https://github.com/lgbo-ustc)). +* Add `SYSTEM STOP LISTEN` query for more graceful termination. Closes [#47972](https://github.com/ClickHouse/ClickHouse/issues/47972). [#51016](https://github.com/ClickHouse/ClickHouse/pull/51016) ([Nikolay Degterinsky](https://github.com/evillique)). +* Add `input_format_csv_allow_variable_number_of_columns` options. [#51273](https://github.com/ClickHouse/ClickHouse/pull/51273) ([Dmitry Kardymon](https://github.com/kardymonds)). +* Another boring feature: add function `substring_index`, as in Spark or MySQL. [#51472](https://github.com/ClickHouse/ClickHouse/pull/51472) ([æŽæ‰¬](https://github.com/taiyang-li)). +* A system table `jemalloc_bins` to show stats for jemalloc bins. Example `SELECT *, size * (nmalloc - ndalloc) AS allocated_bytes FROM system.jemalloc_bins WHERE allocated_bytes > 0 ORDER BY allocated_bytes DESC LIMIT 10`. Enjoy. [#51674](https://github.com/ClickHouse/ClickHouse/pull/51674) ([Alexander Gololobov](https://github.com/davenger)). +* Add `RowBinaryWithDefaults` format with extra byte before each column as a flag for using the column's default value. Closes [#50854](https://github.com/ClickHouse/ClickHouse/issues/50854). [#51695](https://github.com/ClickHouse/ClickHouse/pull/51695) ([Kruglov Pavel](https://github.com/Avogar)). +* Added `default_temporary_table_engine` setting. Same as `default_table_engine` but for temporary tables. [#51292](https://github.com/ClickHouse/ClickHouse/issues/51292). [#51708](https://github.com/ClickHouse/ClickHouse/pull/51708) ([velavokr](https://github.com/velavokr)). +* Added new `initcap` / `initcapUTF8` functions which convert the first letter of each word to upper case and the rest to lower case. [#51735](https://github.com/ClickHouse/ClickHouse/pull/51735) ([Dmitry Kardymon](https://github.com/kardymonds)). +* Create table now supports `PRIMARY KEY` syntax in column definition. Columns are added to primary index in the same order columns are defined. [#51881](https://github.com/ClickHouse/ClickHouse/pull/51881) ([Ilya Yatsishin](https://github.com/qoega)). +* Added the possibility to use date and time format specifiers in log and error log file names, either in config files (`log` and `errorlog` tags) or command line arguments (`--log-file` and `--errorlog-file`). [#51945](https://github.com/ClickHouse/ClickHouse/pull/51945) ([Victor Krasnov](https://github.com/sirvickr)). +* Added Peak Memory Usage statistic to HTTP headers. [#51946](https://github.com/ClickHouse/ClickHouse/pull/51946) ([Dmitry Kardymon](https://github.com/kardymonds)). +* Added new `hasSubsequence` (+`CaseInsensitive` and `UTF8` versions) functions to match subsequences in strings. [#52050](https://github.com/ClickHouse/ClickHouse/pull/52050) ([Dmitry Kardymon](https://github.com/kardymonds)). +* Add `array_agg` as alias of `groupArray` for PostgreSQL compatibility. Closes [#52100](https://github.com/ClickHouse/ClickHouse/issues/52100). ### Documentation entry for user-facing changes. [#52135](https://github.com/ClickHouse/ClickHouse/pull/52135) ([flynn](https://github.com/ucasfl)). +* Add `any_value` as a compatibility alias for `any` aggregate function. Closes [#52140](https://github.com/ClickHouse/ClickHouse/issues/52140). [#52147](https://github.com/ClickHouse/ClickHouse/pull/52147) ([flynn](https://github.com/ucasfl)). +* Add aggregate function `array_concat_agg` for compatibility with BigQuery, it's alias of `groupArrayArray`. Closes [#52139](https://github.com/ClickHouse/ClickHouse/issues/52139). [#52149](https://github.com/ClickHouse/ClickHouse/pull/52149) ([flynn](https://github.com/ucasfl)). +* Add `OCTET_LENGTH` as an alias to `length`. Closes [#52153](https://github.com/ClickHouse/ClickHouse/issues/52153). [#52176](https://github.com/ClickHouse/ClickHouse/pull/52176) ([FFFFFFFHHHHHHH](https://github.com/FFFFFFFHHHHHHH)). +* Added `firstLine` function to extract the first line from the multi-line string. This closes [#51172](https://github.com/ClickHouse/ClickHouse/issues/51172). [#52209](https://github.com/ClickHouse/ClickHouse/pull/52209) ([Mikhail Koviazin](https://github.com/mkmkme)). +* Implement KQL-style formatting for the `Interval` data type. This is only needed for compatibility with the `Kusto` query language. [#45671](https://github.com/ClickHouse/ClickHouse/pull/45671) ([ltrk2](https://github.com/ltrk2)). +* Added query `SYSTEM FLUSH ASYNC INSERT QUEUE` which flushes all pending asynchronous inserts to the destination tables. Added a server-side setting `async_insert_queue_flush_on_shutdown` (`true` by default) which determines whether to flush queue of asynchronous inserts on graceful shutdown. Setting `async_insert_threads` is now a server-side setting. [#49160](https://github.com/ClickHouse/ClickHouse/pull/49160) ([Anton Popov](https://github.com/CurtizJ)). +* Aliases `current_database` and a new function `current_schemas` for compatibility with PostgreSQL. [#51076](https://github.com/ClickHouse/ClickHouse/pull/51076) ([Pedro Riera](https://github.com/priera)). +* Add alias for functions `today` (now available under the `curdate`/`current_date` names) and `now` (`current_timestamp`). [#52106](https://github.com/ClickHouse/ClickHouse/pull/52106) ([Lloyd-Pottiger](https://github.com/Lloyd-Pottiger)). +* Support `async_deduplication_token` for async insert. [#52136](https://github.com/ClickHouse/ClickHouse/pull/52136) ([Han Fei](https://github.com/hanfei1991)). +* Add new setting `disable_url_encoding` that allows to disable decoding/encoding path in uri in URL engine. [#52337](https://github.com/ClickHouse/ClickHouse/pull/52337) ([Kruglov Pavel](https://github.com/Avogar)). + +#### Performance Improvement +* Enable automatic selection of the sparse serialization format by default. It improves performance. The format is supported since version 22.1. After this change, downgrading to versions older than 22.1 might not be possible. A downgrade may require to set `ratio_of_defaults_for_sparse_serialization=0.9375` [55153](https://github.com/ClickHouse/ClickHouse/issues/55153). You can turn off the usage of the sparse serialization format by providing the `ratio_of_defaults_for_sparse_serialization = 1` setting for your MergeTree tables. [#49631](https://github.com/ClickHouse/ClickHouse/pull/49631) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Enable `move_all_conditions_to_prewhere` and `enable_multiple_prewhere_read_steps` settings by default. [#46365](https://github.com/ClickHouse/ClickHouse/pull/46365) ([Alexander Gololobov](https://github.com/davenger)). +* Improves performance of some queries by tuning allocator. [#46416](https://github.com/ClickHouse/ClickHouse/pull/46416) ([Azat Khuzhin](https://github.com/azat)). +* Now we use fixed-size tasks in `MergeTreePrefetchedReadPool` as in `MergeTreeReadPool`. Also from now we use connection pool for S3 requests. [#49732](https://github.com/ClickHouse/ClickHouse/pull/49732) ([Nikita Taranov](https://github.com/nickitat)). +* More pushdown to the right side of join. [#50532](https://github.com/ClickHouse/ClickHouse/pull/50532) ([Nikita Taranov](https://github.com/nickitat)). +* Improve grace_hash join by reserving hash table's size (resubmit). [#50875](https://github.com/ClickHouse/ClickHouse/pull/50875) ([lgbo](https://github.com/lgbo-ustc)). +* Waiting on lock in `OpenedFileCache` could be noticeable sometimes. We sharded it into multiple sub-maps (each with its own lock) to avoid contention. [#51341](https://github.com/ClickHouse/ClickHouse/pull/51341) ([Nikita Taranov](https://github.com/nickitat)). +* Move conditions with primary key columns to the end of PREWHERE chain. The idea is that conditions with PK columns are likely to be used in PK analysis and will not contribute much more to PREWHERE filtering. [#51958](https://github.com/ClickHouse/ClickHouse/pull/51958) ([Alexander Gololobov](https://github.com/davenger)). +* Speed up `COUNT(DISTINCT)` for String types by inlining SipHash. The performance experiments of *OnTime* on the ICX device (Intel Xeon Platinum 8380 CPU, 80 cores, 160 threads) show that this change could bring an improvement of *11.6%* to the QPS of the query *Q8* while having no impact on others. [#52036](https://github.com/ClickHouse/ClickHouse/pull/52036) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Enable `allow_vertical_merges_from_compact_to_wide_parts` by default. It will save memory usage during merges. [#52295](https://github.com/ClickHouse/ClickHouse/pull/52295) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix incorrect projection analysis which invalidates primary keys. This issue only exists when `query_plan_optimize_primary_key = 1, query_plan_optimize_projection = 1`. This fixes [#48823](https://github.com/ClickHouse/ClickHouse/issues/48823). This fixes [#51173](https://github.com/ClickHouse/ClickHouse/issues/51173). [#52308](https://github.com/ClickHouse/ClickHouse/pull/52308) ([Amos Bird](https://github.com/amosbird)). +* Reduce the number of syscalls in `FileCache::loadMetadata` - this speeds up server startup if the filesystem cache is configured. [#52435](https://github.com/ClickHouse/ClickHouse/pull/52435) ([Raúl Marín](https://github.com/Algunenano)). +* Allow to have strict lower boundary for file segment size by downloading remaining data in the background. Minimum size of file segment (if actual file size is bigger) is configured as cache configuration setting `boundary_alignment`, by default `4Mi`. Number of background threads are configured as cache configuration setting `background_download_threads`, by default `2`. Also `max_file_segment_size` was increased from `8Mi` to `32Mi` in this PR. [#51000](https://github.com/ClickHouse/ClickHouse/pull/51000) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Decreased default timeouts for S3 from 30 seconds to 3 seconds, and for other HTTP from 180 seconds to 30 seconds. [#51171](https://github.com/ClickHouse/ClickHouse/pull/51171) ([Michael Kolupaev](https://github.com/al13n321)). +* New setting `merge_tree_determine_task_size_by_prewhere_columns` added. If set to `true` only sizes of the columns from `PREWHERE` section will be considered to determine reading task size. Otherwise all the columns from query are considered. [#52606](https://github.com/ClickHouse/ClickHouse/pull/52606) ([Nikita Taranov](https://github.com/nickitat)). + +#### Improvement +* Use read_bytes/total_bytes_to_read for progress bar in s3/file/url/... table functions for better progress indication. [#51286](https://github.com/ClickHouse/ClickHouse/pull/51286) ([Kruglov Pavel](https://github.com/Avogar)). +* Introduce a table setting `wait_for_unique_parts_send_before_shutdown_ms` which specify the amount of time replica will wait before closing interserver handler for replicated sends. Also fix inconsistency with shutdown of tables and interserver handlers: now server shutdown tables first and only after it shut down interserver handlers. [#51851](https://github.com/ClickHouse/ClickHouse/pull/51851) ([alesapin](https://github.com/alesapin)). +* Allow SQL standard `FETCH` without `OFFSET`. See https://antonz.org/sql-fetch/. [#51293](https://github.com/ClickHouse/ClickHouse/pull/51293) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Allow filtering HTTP headers for the URL/S3 table functions with the new `http_forbid_headers` section in config. Both exact matching and regexp filters are available. [#51038](https://github.com/ClickHouse/ClickHouse/pull/51038) ([Nikolay Degterinsky](https://github.com/evillique)). +* Don't show messages about `16 EiB` free space in logs, as they don't make sense. This closes [#49320](https://github.com/ClickHouse/ClickHouse/issues/49320). [#49342](https://github.com/ClickHouse/ClickHouse/pull/49342) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Properly check the limit for the `sleepEachRow` function. Add a setting `function_sleep_max_microseconds_per_block`. This is needed for generic query fuzzer. [#49343](https://github.com/ClickHouse/ClickHouse/pull/49343) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix two issues in `geoHash` functions. [#50066](https://github.com/ClickHouse/ClickHouse/pull/50066) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Log async insert flush queries into `system.query_log`. [#51160](https://github.com/ClickHouse/ClickHouse/pull/51160) ([Raúl Marín](https://github.com/Algunenano)). +* Functions `date_diff` and `age` now support millisecond/microsecond unit and work with microsecond precision. [#51291](https://github.com/ClickHouse/ClickHouse/pull/51291) ([Dmitry Kardymon](https://github.com/kardymonds)). +* Improve parsing of path in clickhouse-keeper-client. [#51359](https://github.com/ClickHouse/ClickHouse/pull/51359) ([Azat Khuzhin](https://github.com/azat)). +* A third-party product depending on ClickHouse (Gluten: a Plugin to Double SparkSQL's Performance) had a bug. This fix avoids heap overflow in that third-party product while reading from HDFS. [#51386](https://github.com/ClickHouse/ClickHouse/pull/51386) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Add ability to disable native copy for S3 (setting for BACKUP/RESTORE `allow_s3_native_copy`, and `s3_allow_native_copy` for `s3`/`s3_plain` disks). [#51448](https://github.com/ClickHouse/ClickHouse/pull/51448) ([Azat Khuzhin](https://github.com/azat)). +* Add column `primary_key_size` to `system.parts` table to show compressed primary key size on disk. Closes [#51400](https://github.com/ClickHouse/ClickHouse/issues/51400). [#51496](https://github.com/ClickHouse/ClickHouse/pull/51496) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Allow running `clickhouse-local` without procfs, without home directory existing, and without name resolution plugins from glibc. [#51518](https://github.com/ClickHouse/ClickHouse/pull/51518) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add placeholder `%a` for rull filename in rename_files_after_processing setting. [#51603](https://github.com/ClickHouse/ClickHouse/pull/51603) ([Kruglov Pavel](https://github.com/Avogar)). +* Add column `modification_time` into `system.parts_columns`. [#51685](https://github.com/ClickHouse/ClickHouse/pull/51685) ([Azat Khuzhin](https://github.com/azat)). +* Add new setting `input_format_csv_use_default_on_bad_values` to CSV format that allows to insert default value when parsing of a single field failed. [#51716](https://github.com/ClickHouse/ClickHouse/pull/51716) ([KevinyhZou](https://github.com/KevinyhZou)). +* Added a crash log flush to the disk after the unexpected crash. [#51720](https://github.com/ClickHouse/ClickHouse/pull/51720) ([Alexey Gerasimchuck](https://github.com/Demilivor)). +* Fix behavior in dashboard page where errors unrelated to authentication are not shown. Also fix 'overlapping' chart behavior. [#51744](https://github.com/ClickHouse/ClickHouse/pull/51744) ([Zach Naimon](https://github.com/ArctypeZach)). +* Allow UUID to UInt128 conversion. [#51765](https://github.com/ClickHouse/ClickHouse/pull/51765) ([Dmitry Kardymon](https://github.com/kardymonds)). +* Added support for function `range` of Nullable arguments. [#51767](https://github.com/ClickHouse/ClickHouse/pull/51767) ([Dmitry Kardymon](https://github.com/kardymonds)). +* Convert condition like `toyear(x) = c` to `c1 <= x < c2`. [#51795](https://github.com/ClickHouse/ClickHouse/pull/51795) ([Han Fei](https://github.com/hanfei1991)). +* Improve MySQL compatibility of the statement `SHOW INDEX`. [#51796](https://github.com/ClickHouse/ClickHouse/pull/51796) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix `use_structure_from_insertion_table_in_table_functions` does not work with `MATERIALIZED` and `ALIAS` columns. Closes [#51817](https://github.com/ClickHouse/ClickHouse/issues/51817). Closes [#51019](https://github.com/ClickHouse/ClickHouse/issues/51019). [#51825](https://github.com/ClickHouse/ClickHouse/pull/51825) ([flynn](https://github.com/ucasfl)). +* Cache dictionary now requests only unique keys from source. Closes [#51762](https://github.com/ClickHouse/ClickHouse/issues/51762). [#51853](https://github.com/ClickHouse/ClickHouse/pull/51853) ([Maksim Kita](https://github.com/kitaisreal)). +* Fixed the case when settings were not applied for EXPLAIN query when FORMAT was provided. [#51859](https://github.com/ClickHouse/ClickHouse/pull/51859) ([Nikita Taranov](https://github.com/nickitat)). +* Allow SETTINGS before FORMAT in DESCRIBE TABLE query for compatibility with SELECT query. Closes [#51544](https://github.com/ClickHouse/ClickHouse/issues/51544). [#51899](https://github.com/ClickHouse/ClickHouse/pull/51899) ([Nikolay Degterinsky](https://github.com/evillique)). +* Var-Int encoded integers (e.g. used by the native protocol) can now use the full 64-bit range. 3rd party clients are advised to update their var-int code accordingly. [#51905](https://github.com/ClickHouse/ClickHouse/pull/51905) ([Robert Schulze](https://github.com/rschu1ze)). +* Update certificates when they change without the need to manually SYSTEM RELOAD CONFIG. [#52030](https://github.com/ClickHouse/ClickHouse/pull/52030) ([Mike Kot](https://github.com/myrrc)). +* Added `allow_create_index_without_type` setting that allow to ignore `ADD INDEX` queries without specified `TYPE`. Standard SQL queries will just succeed without changing table schema. [#52056](https://github.com/ClickHouse/ClickHouse/pull/52056) ([Ilya Yatsishin](https://github.com/qoega)). +* Log messages are written to the `system.text_log` from the server startup. [#52113](https://github.com/ClickHouse/ClickHouse/pull/52113) ([Dmitry Kardymon](https://github.com/kardymonds)). +* In cases where the HTTP endpoint has multiple IP addresses and the first of them is unreachable, a timeout exception was thrown. Made session creation with handling all resolved endpoints. [#52116](https://github.com/ClickHouse/ClickHouse/pull/52116) ([Aleksei Filatov](https://github.com/aalexfvk)). +* Avro input format now supports Union even if it contains only a single type. Closes [#52131](https://github.com/ClickHouse/ClickHouse/issues/52131). [#52137](https://github.com/ClickHouse/ClickHouse/pull/52137) ([flynn](https://github.com/ucasfl)). +* Add setting `optimize_use_implicit_projections` to disable implicit projections (currently only `min_max_count` projection). [#52152](https://github.com/ClickHouse/ClickHouse/pull/52152) ([Amos Bird](https://github.com/amosbird)). +* It was possible to use the function `hasToken` for infinite loop. Now this possibility is removed. This closes [#52156](https://github.com/ClickHouse/ClickHouse/issues/52156). [#52160](https://github.com/ClickHouse/ClickHouse/pull/52160) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Create ZK ancestors optimistically. [#52195](https://github.com/ClickHouse/ClickHouse/pull/52195) ([Raúl Marín](https://github.com/Algunenano)). +* Fix [#50582](https://github.com/ClickHouse/ClickHouse/issues/50582). Avoid the `Not found column ... in block` error in some cases of reading in-order and constants. [#52259](https://github.com/ClickHouse/ClickHouse/pull/52259) ([Chen768959](https://github.com/Chen768959)). +* Check whether S2 geo primitives are invalid as early as possible on ClickHouse side. This closes: [#27090](https://github.com/ClickHouse/ClickHouse/issues/27090). [#52260](https://github.com/ClickHouse/ClickHouse/pull/52260) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add back missing projection QueryAccessInfo when `query_plan_optimize_projection = 1`. This fixes [#50183](https://github.com/ClickHouse/ClickHouse/issues/50183) . This fixes [#50093](https://github.com/ClickHouse/ClickHouse/issues/50093). [#52327](https://github.com/ClickHouse/ClickHouse/pull/52327) ([Amos Bird](https://github.com/amosbird)). +* When `ZooKeeperRetriesControl` rethrows an error, it's more useful to see its original stack trace, not the one from `ZooKeeperRetriesControl` itself. [#52347](https://github.com/ClickHouse/ClickHouse/pull/52347) ([Vitaly Baranov](https://github.com/vitlibar)). +* Wait for zero copy replication lock even if some disks don't support it. [#52376](https://github.com/ClickHouse/ClickHouse/pull/52376) ([Raúl Marín](https://github.com/Algunenano)). +* Now interserver port will be closed only after tables are shut down. [#52498](https://github.com/ClickHouse/ClickHouse/pull/52498) ([alesapin](https://github.com/alesapin)). + +#### Experimental Feature +* Writing parquet files is 10x faster, it's multi-threaded now. Almost the same speed as reading. [#49367](https://github.com/ClickHouse/ClickHouse/pull/49367) ([Michael Kolupaev](https://github.com/al13n321)). This is controlled by the setting `output_format_parquet_use_custom_encoder` which is disabled by default, because the feature is non-ideal. +* Added support for [PRQL](https://prql-lang.org/) as a query language. [#50686](https://github.com/ClickHouse/ClickHouse/pull/50686) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)). +* Allow to add disk name for custom disks. Previously custom disks would use an internal generated disk name. Now it will be possible with `disk = disk_(...)` (e.g. disk will have name `name`) . [#51552](https://github.com/ClickHouse/ClickHouse/pull/51552) ([Kseniia Sumarokova](https://github.com/kssenii)). This syntax can be changed in this release. +* (experimental MaterializedMySQL) Fixed crash when `mysqlxx::Pool::Entry` is used after it was disconnected. [#52063](https://github.com/ClickHouse/ClickHouse/pull/52063) ([Val Doroshchuk](https://github.com/valbok)). +* (experimental MaterializedMySQL) `CREATE TABLE ... AS SELECT` .. is now supported in MaterializedMySQL. [#52067](https://github.com/ClickHouse/ClickHouse/pull/52067) ([Val Doroshchuk](https://github.com/valbok)). +* (experimental MaterializedMySQL) Introduced automatic conversion of text types to utf8 for MaterializedMySQL. [#52084](https://github.com/ClickHouse/ClickHouse/pull/52084) ([Val Doroshchuk](https://github.com/valbok)). +* (experimental MaterializedMySQL) Now unquoted UTF-8 strings are supported in DDL for MaterializedMySQL. [#52318](https://github.com/ClickHouse/ClickHouse/pull/52318) ([Val Doroshchuk](https://github.com/valbok)). +* (experimental MaterializedMySQL) Now double quoted comments are supported in MaterializedMySQL. [#52355](https://github.com/ClickHouse/ClickHouse/pull/52355) ([Val Doroshchuk](https://github.com/valbok)). +* Upgrade Intel QPL from v1.1.0 to v1.2.0 2. Upgrade Intel accel-config from v3.5 to v4.0 3. Fixed issue that Device IOTLB miss has big perf. impact for IAA accelerators. [#52180](https://github.com/ClickHouse/ClickHouse/pull/52180) ([jasperzhu](https://github.com/jinjunzh)). +* The `session_timezone` setting (new in version 23.6) is demoted to experimental. [#52445](https://github.com/ClickHouse/ClickHouse/pull/52445) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Support ZooKeeper `reconfig` command for ClickHouse Keeper with incremental reconfiguration which can be enabled via `keeper_server.enable_reconfiguration` setting. Support adding servers, removing servers, and changing server priorities. [#49450](https://github.com/ClickHouse/ClickHouse/pull/49450) ([Mike Kot](https://github.com/myrrc)). It is suspected that this feature is incomplete. + +#### Build/Testing/Packaging Improvement +* Add experimental ClickHouse builds for Linux RISC-V 64 to CI. [#31398](https://github.com/ClickHouse/ClickHouse/pull/31398) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add integration test check with the enabled Analyzer. [#50926](https://github.com/ClickHouse/ClickHouse/pull/50926) [#52210](https://github.com/ClickHouse/ClickHouse/pull/52210) ([Dmitry Novik](https://github.com/novikd)). +* Reproducible builds for Rust. [#52395](https://github.com/ClickHouse/ClickHouse/pull/52395) ([Azat Khuzhin](https://github.com/azat)). +* Update Cargo dependencies. [#51721](https://github.com/ClickHouse/ClickHouse/pull/51721) ([Raúl Marín](https://github.com/Algunenano)). +* Make the function `CHColumnToArrowColumn::fillArrowArrayWithArrayColumnData` to work with nullable arrays, which are not possible in ClickHouse, but needed for Gluten. [#52112](https://github.com/ClickHouse/ClickHouse/pull/52112) ([æŽæ‰¬](https://github.com/taiyang-li)). +* We've updated the CCTZ library to master, but there are no user-visible changes. [#52124](https://github.com/ClickHouse/ClickHouse/pull/52124) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The `system.licenses` table now includes the hard-forked library Poco. This closes [#52066](https://github.com/ClickHouse/ClickHouse/issues/52066). [#52127](https://github.com/ClickHouse/ClickHouse/pull/52127) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Check that there are no cases of bad punctuation: whitespace before a comma like `Hello ,world` instead of `Hello, world`. [#52549](https://github.com/ClickHouse/ClickHouse/pull/52549) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### Bug Fix (user-visible misbehavior in an official stable release) +* Fix MaterializedPostgreSQL syncTables [#49698](https://github.com/ClickHouse/ClickHouse/pull/49698) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix projection with optimize_aggregators_of_group_by_keys [#49709](https://github.com/ClickHouse/ClickHouse/pull/49709) ([Amos Bird](https://github.com/amosbird)). +* Fix optimize_skip_unused_shards with JOINs [#51037](https://github.com/ClickHouse/ClickHouse/pull/51037) ([Azat Khuzhin](https://github.com/azat)). +* Fix formatDateTime() with fractional negative datetime64 [#51290](https://github.com/ClickHouse/ClickHouse/pull/51290) ([Dmitry Kardymon](https://github.com/kardymonds)). +* Functions `hasToken*` were totally wrong. Add a test for [#43358](https://github.com/ClickHouse/ClickHouse/issues/43358) [#51378](https://github.com/ClickHouse/ClickHouse/pull/51378) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix optimization to move functions before sorting. [#51481](https://github.com/ClickHouse/ClickHouse/pull/51481) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix Block structure mismatch in Pipe::unitePipes for FINAL [#51492](https://github.com/ClickHouse/ClickHouse/pull/51492) ([Nikita Taranov](https://github.com/nickitat)). +* Fix SIGSEGV for clusters with zero weight across all shards (fixes INSERT INTO FUNCTION clusterAllReplicas()) [#51545](https://github.com/ClickHouse/ClickHouse/pull/51545) ([Azat Khuzhin](https://github.com/azat)). +* Fix timeout for hedged requests [#51582](https://github.com/ClickHouse/ClickHouse/pull/51582) ([Azat Khuzhin](https://github.com/azat)). +* Fix logical error in ANTI join with NULL [#51601](https://github.com/ClickHouse/ClickHouse/pull/51601) ([vdimir](https://github.com/vdimir)). +* Fix for moving 'IN' conditions to PREWHERE [#51610](https://github.com/ClickHouse/ClickHouse/pull/51610) ([Alexander Gololobov](https://github.com/davenger)). +* Do not apply PredicateExpressionsOptimizer for ASOF/ANTI join [#51633](https://github.com/ClickHouse/ClickHouse/pull/51633) ([vdimir](https://github.com/vdimir)). +* Fix async insert with deduplication for ReplicatedMergeTree using merging algorithms [#51676](https://github.com/ClickHouse/ClickHouse/pull/51676) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix reading from empty column in `parseSipHashKey` [#51804](https://github.com/ClickHouse/ClickHouse/pull/51804) ([Nikita Taranov](https://github.com/nickitat)). +* Fix segfault when create invalid EmbeddedRocksdb table [#51847](https://github.com/ClickHouse/ClickHouse/pull/51847) ([Duc Canh Le](https://github.com/canhld94)). +* Fix inserts into MongoDB tables [#51876](https://github.com/ClickHouse/ClickHouse/pull/51876) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix deadlock on DatabaseCatalog shutdown [#51908](https://github.com/ClickHouse/ClickHouse/pull/51908) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix error in subquery operators [#51922](https://github.com/ClickHouse/ClickHouse/pull/51922) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix async connect to hosts with multiple ips [#51934](https://github.com/ClickHouse/ClickHouse/pull/51934) ([Kruglov Pavel](https://github.com/Avogar)). +* Do not remove inputs after ActionsDAG::merge [#51947](https://github.com/ClickHouse/ClickHouse/pull/51947) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Check refcount in `RemoveManyObjectStorageOperation::finalize` instead of `execute` [#51954](https://github.com/ClickHouse/ClickHouse/pull/51954) ([vdimir](https://github.com/vdimir)). +* Allow parametric UDFs [#51964](https://github.com/ClickHouse/ClickHouse/pull/51964) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Small fix for toDateTime64() for dates after 2283-12-31 [#52130](https://github.com/ClickHouse/ClickHouse/pull/52130) ([Andrey Zvonov](https://github.com/zvonand)). +* Fix ORDER BY tuple of WINDOW functions [#52145](https://github.com/ClickHouse/ClickHouse/pull/52145) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix incorrect projection analysis when aggregation expression contains monotonic functions [#52151](https://github.com/ClickHouse/ClickHouse/pull/52151) ([Amos Bird](https://github.com/amosbird)). +* Fix error in `groupArrayMoving` functions [#52161](https://github.com/ClickHouse/ClickHouse/pull/52161) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Disable direct join for range dictionary [#52187](https://github.com/ClickHouse/ClickHouse/pull/52187) ([Duc Canh Le](https://github.com/canhld94)). +* Fix sticky mutations test (and extremely rare race condition) [#52197](https://github.com/ClickHouse/ClickHouse/pull/52197) ([alesapin](https://github.com/alesapin)). +* Fix race in Web disk [#52211](https://github.com/ClickHouse/ClickHouse/pull/52211) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix data race in Connection::setAsyncCallback on unknown packet from server [#52219](https://github.com/ClickHouse/ClickHouse/pull/52219) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix temp data deletion on startup, add test [#52275](https://github.com/ClickHouse/ClickHouse/pull/52275) ([vdimir](https://github.com/vdimir)). +* Don't use minmax_count projections when counting nullable columns [#52297](https://github.com/ClickHouse/ClickHouse/pull/52297) ([Amos Bird](https://github.com/amosbird)). +* MergeTree/ReplicatedMergeTree should use server timezone for log entries [#52325](https://github.com/ClickHouse/ClickHouse/pull/52325) ([Azat Khuzhin](https://github.com/azat)). +* Fix parameterized view with cte and multiple usage [#52328](https://github.com/ClickHouse/ClickHouse/pull/52328) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Disable expression templates for time intervals [#52335](https://github.com/ClickHouse/ClickHouse/pull/52335) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix `apply_snapshot` in Keeper [#52358](https://github.com/ClickHouse/ClickHouse/pull/52358) ([Antonio Andelic](https://github.com/antonio2368)). +* Update build-osx.md [#52377](https://github.com/ClickHouse/ClickHouse/pull/52377) ([AlexBykovski](https://github.com/AlexBykovski)). +* Fix `countSubstrings` hang with empty needle and a column haystack [#52409](https://github.com/ClickHouse/ClickHouse/pull/52409) ([Sergei Trifonov](https://github.com/serxa)). +* Fix normal projection with merge table [#52432](https://github.com/ClickHouse/ClickHouse/pull/52432) ([Amos Bird](https://github.com/amosbird)). +* Fix possible double-free in Aggregator [#52439](https://github.com/ClickHouse/ClickHouse/pull/52439) ([Nikita Taranov](https://github.com/nickitat)). +* Fixed inserting into Buffer engine [#52440](https://github.com/ClickHouse/ClickHouse/pull/52440) ([Vasily Nemkov](https://github.com/Enmk)). +* The implementation of AnyHash was non-conformant. [#52448](https://github.com/ClickHouse/ClickHouse/pull/52448) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Check recursion depth in OptimizedRegularExpression [#52451](https://github.com/ClickHouse/ClickHouse/pull/52451) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix data-race DatabaseReplicated::startupTables()/canExecuteReplicatedMetadataAlter() [#52490](https://github.com/ClickHouse/ClickHouse/pull/52490) ([Azat Khuzhin](https://github.com/azat)). +* Fix abort in function `transform` [#52513](https://github.com/ClickHouse/ClickHouse/pull/52513) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix lightweight delete after drop of projection [#52517](https://github.com/ClickHouse/ClickHouse/pull/52517) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible error "Cannot drain connections: cancel first" [#52585](https://github.com/ClickHouse/ClickHouse/pull/52585) ([Kruglov Pavel](https://github.com/Avogar)). + + +### ClickHouse release 23.6, 2023-06-29 {#236} + +#### Backward Incompatible Change +* Delete feature `do_not_evict_index_and_mark_files` in the fs cache. This feature was only making things worse. [#51253](https://github.com/ClickHouse/ClickHouse/pull/51253) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Remove ALTER support for experimental LIVE VIEW. [#51287](https://github.com/ClickHouse/ClickHouse/pull/51287) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Decrease the default values for `http_max_field_value_size` and `http_max_field_name_size` to 128 KiB. [#51163](https://github.com/ClickHouse/ClickHouse/pull/51163) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* CGroups metrics related to CPU are replaced with one metric, `CGroupMaxCPU` for better usability. The `Normalized` CPU usage metrics will be normalized to CGroups limits instead of the total number of CPUs when they are set. This closes [#50836](https://github.com/ClickHouse/ClickHouse/issues/50836). [#50835](https://github.com/ClickHouse/ClickHouse/pull/50835) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### New Feature +* The function `transform` as well as `CASE` with value matching started to support all data types. This closes [#29730](https://github.com/ClickHouse/ClickHouse/issues/29730). This closes [#32387](https://github.com/ClickHouse/ClickHouse/issues/32387). This closes [#50827](https://github.com/ClickHouse/ClickHouse/issues/50827). This closes [#31336](https://github.com/ClickHouse/ClickHouse/issues/31336). This closes [#40493](https://github.com/ClickHouse/ClickHouse/issues/40493). [#51351](https://github.com/ClickHouse/ClickHouse/pull/51351) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Added option `--rename_files_after_processing `. This closes [#34207](https://github.com/ClickHouse/ClickHouse/issues/34207). [#49626](https://github.com/ClickHouse/ClickHouse/pull/49626) ([alekseygolub](https://github.com/alekseygolub)). +* Add support for `TRUNCATE` modifier in `INTO OUTFILE` clause. Suggest using `APPEND` or `TRUNCATE` for `INTO OUTFILE` when file exists. [#50950](https://github.com/ClickHouse/ClickHouse/pull/50950) ([alekar](https://github.com/alekar)). +* Add table engine `Redis` and table function `redis`. It allows querying external Redis servers. [#50150](https://github.com/ClickHouse/ClickHouse/pull/50150) ([JackyWoo](https://github.com/JackyWoo)). +* Allow to skip empty files in file/s3/url/hdfs table functions using settings `s3_skip_empty_files`, `hdfs_skip_empty_files`, `engine_file_skip_empty_files`, `engine_url_skip_empty_files`. [#50364](https://github.com/ClickHouse/ClickHouse/pull/50364) ([Kruglov Pavel](https://github.com/Avogar)). +* Add a new setting named `use_mysql_types_in_show_columns` to alter the `SHOW COLUMNS` SQL statement to display MySQL equivalent types when a client is connected via the MySQL compatibility port. [#49577](https://github.com/ClickHouse/ClickHouse/pull/49577) ([Thomas Panetti](https://github.com/tpanetti)). +* Clickhouse-client can now be called with a connection string instead of "--host", "--port", "--user" etc. [#50689](https://github.com/ClickHouse/ClickHouse/pull/50689) ([Alexey Gerasimchuck](https://github.com/Demilivor)). +* Add setting `session_timezone`; it is used as the default timezone for a session when not explicitly specified. [#44149](https://github.com/ClickHouse/ClickHouse/pull/44149) ([Andrey Zvonov](https://github.com/zvonand)). +* Codec DEFLATE_QPL is now controlled via server setting "enable_deflate_qpl_codec" (default: false) instead of setting "allow_experimental_codecs". This marks DEFLATE_QPL non-experimental. [#50775](https://github.com/ClickHouse/ClickHouse/pull/50775) ([Robert Schulze](https://github.com/rschu1ze)). + +#### Performance Improvement +* Improved scheduling of merge selecting and cleanup tasks in `ReplicatedMergeTree`. The tasks will not be executed too frequently when there's nothing to merge or cleanup. Added settings `max_merge_selecting_sleep_ms`, `merge_selecting_sleep_slowdown_factor`, `max_cleanup_delay_period` and `cleanup_thread_preferred_points_per_iteration`. It should close [#31919](https://github.com/ClickHouse/ClickHouse/issues/31919). [#50107](https://github.com/ClickHouse/ClickHouse/pull/50107) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Make filter push down through cross join. [#50605](https://github.com/ClickHouse/ClickHouse/pull/50605) ([Han Fei](https://github.com/hanfei1991)). +* Improve performance with enabled QueryProfiler using thread-local timer_id instead of global object. [#48778](https://github.com/ClickHouse/ClickHouse/pull/48778) ([Jiebin Sun](https://github.com/jiebinn)). +* Rewrite CapnProto input/output format to improve its performance. Map column names and CapnProto fields case insensitive, fix reading/writing of nested structure fields. [#49752](https://github.com/ClickHouse/ClickHouse/pull/49752) ([Kruglov Pavel](https://github.com/Avogar)). +* Optimize parquet write performance for parallel threads. [#50102](https://github.com/ClickHouse/ClickHouse/pull/50102) ([Hongbin Ma](https://github.com/binmahone)). +* Disable `parallelize_output_from_storages` for processing MATERIALIZED VIEWs and storages with one block only. [#50214](https://github.com/ClickHouse/ClickHouse/pull/50214) ([Azat Khuzhin](https://github.com/azat)). +* Merge PR [#46558](https://github.com/ClickHouse/ClickHouse/pull/46558). Avoid block permutation during sort if the block is already sorted. [#50697](https://github.com/ClickHouse/ClickHouse/pull/50697) ([Alexey Milovidov](https://github.com/alexey-milovidov), [Maksim Kita](https://github.com/kitaisreal)). +* Make multiple list requests to ZooKeeper in parallel to speed up reading from system.zookeeper table. [#51042](https://github.com/ClickHouse/ClickHouse/pull/51042) ([Alexander Gololobov](https://github.com/davenger)). +* Speedup initialization of DateTime lookup tables for time zones. This should reduce startup/connect time of clickhouse-client especially in debug build as it is rather heavy. [#51347](https://github.com/ClickHouse/ClickHouse/pull/51347) ([Alexander Gololobov](https://github.com/davenger)). +* Fix data lakes slowness because of synchronous head requests. (Related to Iceberg/Deltalake/Hudi being slow with a lot of files). [#50976](https://github.com/ClickHouse/ClickHouse/pull/50976) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Do not read all the columns from right GLOBAL JOIN table. [#50721](https://github.com/ClickHouse/ClickHouse/pull/50721) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). + +#### Experimental Feature +* Support parallel replicas with the analyzer. [#50441](https://github.com/ClickHouse/ClickHouse/pull/50441) ([Raúl Marín](https://github.com/Algunenano)). +* Add random sleep before large merges/mutations execution to split load more evenly between replicas in case of zero-copy replication. [#51282](https://github.com/ClickHouse/ClickHouse/pull/51282) ([alesapin](https://github.com/alesapin)). +* Do not replicate `ALTER PARTITION` queries and mutations through `Replicated` database if it has only one shard and the underlying table is `ReplicatedMergeTree`. [#51049](https://github.com/ClickHouse/ClickHouse/pull/51049) ([Alexander Tokmakov](https://github.com/tavplubix)). + +#### Improvement +* Relax the thresholds for "too many parts" to be more modern. Return the backpressure during long-running insert queries. [#50856](https://github.com/ClickHouse/ClickHouse/pull/50856) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Allow to cast IPv6 to IPv4 address for CIDR ::ffff:0:0/96 (IPv4-mapped addresses). [#49759](https://github.com/ClickHouse/ClickHouse/pull/49759) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Update MongoDB protocol to support MongoDB 5.1 version and newer. Support for the versions with the old protocol (<3.6) is preserved. Closes [#45621](https://github.com/ClickHouse/ClickHouse/issues/45621), [#49879](https://github.com/ClickHouse/ClickHouse/issues/49879). [#50061](https://github.com/ClickHouse/ClickHouse/pull/50061) ([Nikolay Degterinsky](https://github.com/evillique)). +* Add setting `input_format_max_bytes_to_read_for_schema_inference` to limit the number of bytes to read in schema inference. Closes [#50577](https://github.com/ClickHouse/ClickHouse/issues/50577). [#50592](https://github.com/ClickHouse/ClickHouse/pull/50592) ([Kruglov Pavel](https://github.com/Avogar)). +* Respect setting `input_format_null_as_default` in schema inference. [#50602](https://github.com/ClickHouse/ClickHouse/pull/50602) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow to skip trailing empty lines in CSV/TSV/CustomSeparated formats via settings `input_format_csv_skip_trailing_empty_lines`, `input_format_tsv_skip_trailing_empty_lines` and `input_format_custom_skip_trailing_empty_lines` (disabled by default). Closes [#49315](https://github.com/ClickHouse/ClickHouse/issues/49315). [#50635](https://github.com/ClickHouse/ClickHouse/pull/50635) ([Kruglov Pavel](https://github.com/Avogar)). +* Functions "toDateOrDefault|OrNull" and "accuateCast[OrDefault|OrNull]" now correctly parse numeric arguments. [#50709](https://github.com/ClickHouse/ClickHouse/pull/50709) ([Dmitry Kardymon](https://github.com/kardymonds)). +* Support CSV with whitespace or `\t` field delimiters, and these delimiters are supported in Spark. [#50712](https://github.com/ClickHouse/ClickHouse/pull/50712) ([KevinyhZou](https://github.com/KevinyhZou)). +* Settings `number_of_mutations_to_delay` and `number_of_mutations_to_throw` are enabled by default now with values 500 and 1000 respectively. [#50726](https://github.com/ClickHouse/ClickHouse/pull/50726) ([Anton Popov](https://github.com/CurtizJ)). +* The dashboard correctly shows missing values. This closes [#50831](https://github.com/ClickHouse/ClickHouse/issues/50831). [#50832](https://github.com/ClickHouse/ClickHouse/pull/50832) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Added the possibility to use date and time arguments in the syslog timestamp format in functions `parseDateTimeBestEffort*` and `parseDateTime64BestEffort*`. [#50925](https://github.com/ClickHouse/ClickHouse/pull/50925) ([Victor Krasnov](https://github.com/sirvickr)). +* Command line parameter "--password" in clickhouse-client can now be specified only once. [#50966](https://github.com/ClickHouse/ClickHouse/pull/50966) ([Alexey Gerasimchuck](https://github.com/Demilivor)). +* Use `hash_of_all_files` from `system.parts` to check identity of parts during on-cluster backups. [#50997](https://github.com/ClickHouse/ClickHouse/pull/50997) ([Vitaly Baranov](https://github.com/vitlibar)). +* The system table zookeeper_connection connected_time identifies the time when the connection is established (standard format), and session_uptime_elapsed_seconds is added, which labels the duration of the established connection session (in seconds). [#51026](https://github.com/ClickHouse/ClickHouse/pull/51026) ([郭å°é¾™](https://github.com/guoxiaolongzte)). +* Improve the progress bar for file/s3/hdfs/url table functions by using chunk size from source data and using incremental total size counting in each thread. Fix the progress bar for *Cluster functions. This closes [#47250](https://github.com/ClickHouse/ClickHouse/issues/47250). [#51088](https://github.com/ClickHouse/ClickHouse/pull/51088) ([Kruglov Pavel](https://github.com/Avogar)). +* Add total_bytes_to_read to the Progress packet in TCP protocol for better Progress bar. [#51158](https://github.com/ClickHouse/ClickHouse/pull/51158) ([Kruglov Pavel](https://github.com/Avogar)). +* Better checking of data parts on disks with filesystem cache. [#51164](https://github.com/ClickHouse/ClickHouse/pull/51164) ([Anton Popov](https://github.com/CurtizJ)). +* Fix sometimes not correct current_elements_num in fs cache. [#51242](https://github.com/ClickHouse/ClickHouse/pull/51242) ([Kseniia Sumarokova](https://github.com/kssenii)). + +#### Build/Testing/Packaging Improvement +* Add embedded keeper-client to standalone keeper binary. [#50964](https://github.com/ClickHouse/ClickHouse/pull/50964) ([pufit](https://github.com/pufit)). +* Actual LZ4 version is used now. [#50621](https://github.com/ClickHouse/ClickHouse/pull/50621) ([Nikita Taranov](https://github.com/nickitat)). +* ClickHouse server will print the list of changed settings on fatal errors. This closes [#51137](https://github.com/ClickHouse/ClickHouse/issues/51137). [#51138](https://github.com/ClickHouse/ClickHouse/pull/51138) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Allow building ClickHouse with clang-17. [#51300](https://github.com/ClickHouse/ClickHouse/pull/51300) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* [SQLancer](https://github.com/sqlancer/sqlancer) check is considered stable as bugs that were triggered by it are fixed. Now failures of SQLancer check will be reported as failed check status. [#51340](https://github.com/ClickHouse/ClickHouse/pull/51340) ([Ilya Yatsishin](https://github.com/qoega)). +* Split huge `RUN` in Dockerfile into smaller conditional. Install the necessary tools on demand in the same `RUN` layer, and remove them after that. Upgrade the OS only once at the beginning. Use a modern way to check the signed repository. Downgrade the base repo to ubuntu:20.04 to address the issues on older docker versions. Upgrade golang version to address golang vulnerabilities. [#51504](https://github.com/ClickHouse/ClickHouse/pull/51504) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + +#### Bug Fix (user-visible misbehavior in an official stable release) + +* Report loading status for executable dictionaries correctly [#48775](https://github.com/ClickHouse/ClickHouse/pull/48775) ([Anton Kozlov](https://github.com/tonickkozlov)). +* Proper mutation of skip indices and projections [#50104](https://github.com/ClickHouse/ClickHouse/pull/50104) ([Amos Bird](https://github.com/amosbird)). +* Cleanup moving parts [#50489](https://github.com/ClickHouse/ClickHouse/pull/50489) ([vdimir](https://github.com/vdimir)). +* Fix backward compatibility for IP types hashing in aggregate functions [#50551](https://github.com/ClickHouse/ClickHouse/pull/50551) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix Log family table return wrong rows count after truncate [#50585](https://github.com/ClickHouse/ClickHouse/pull/50585) ([flynn](https://github.com/ucasfl)). +* Fix bug in `uniqExact` parallel merging [#50590](https://github.com/ClickHouse/ClickHouse/pull/50590) ([Nikita Taranov](https://github.com/nickitat)). +* Revert recent grace hash join changes [#50699](https://github.com/ClickHouse/ClickHouse/pull/50699) ([vdimir](https://github.com/vdimir)). +* Query Cache: Try to fix bad cast from `ColumnConst` to `ColumnVector` [#50704](https://github.com/ClickHouse/ClickHouse/pull/50704) ([Robert Schulze](https://github.com/rschu1ze)). +* Avoid storing logs in Keeper containing unknown operation [#50751](https://github.com/ClickHouse/ClickHouse/pull/50751) ([Antonio Andelic](https://github.com/antonio2368)). +* SummingMergeTree support for DateTime64 [#50797](https://github.com/ClickHouse/ClickHouse/pull/50797) ([Jordi Villar](https://github.com/jrdi)). +* Add compatibility setting for non-const timezones [#50834](https://github.com/ClickHouse/ClickHouse/pull/50834) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix hashing of LDAP params in the cache entries [#50865](https://github.com/ClickHouse/ClickHouse/pull/50865) ([Julian Maicher](https://github.com/jmaicher)). +* Fallback to parsing big integer from String instead of exception in Parquet format [#50873](https://github.com/ClickHouse/ClickHouse/pull/50873) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix checking the lock file too often while writing a backup [#50889](https://github.com/ClickHouse/ClickHouse/pull/50889) ([Vitaly Baranov](https://github.com/vitlibar)). +* Do not apply projection if read-in-order was enabled. [#50923](https://github.com/ClickHouse/ClickHouse/pull/50923) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix race in the Azure blob storage iterator [#50936](https://github.com/ClickHouse/ClickHouse/pull/50936) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fix erroneous `sort_description` propagation in `CreatingSets` [#50955](https://github.com/ClickHouse/ClickHouse/pull/50955) ([Nikita Taranov](https://github.com/nickitat)). +* Fix Iceberg v2 optional metadata parsing [#50974](https://github.com/ClickHouse/ClickHouse/pull/50974) ([Kseniia Sumarokova](https://github.com/kssenii)). +* MaterializedMySQL: Keep parentheses for empty table overrides [#50977](https://github.com/ClickHouse/ClickHouse/pull/50977) ([Val Doroshchuk](https://github.com/valbok)). +* Fix crash in BackupCoordinationStageSync::setError() [#51012](https://github.com/ClickHouse/ClickHouse/pull/51012) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix subtly broken copy-on-write of ColumnLowCardinality dictionary [#51064](https://github.com/ClickHouse/ClickHouse/pull/51064) ([Michael Kolupaev](https://github.com/al13n321)). +* Generate safe IVs [#51086](https://github.com/ClickHouse/ClickHouse/pull/51086) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Fix ineffective query cache for SELECTs with subqueries [#51132](https://github.com/ClickHouse/ClickHouse/pull/51132) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix Set index with constant nullable comparison. [#51205](https://github.com/ClickHouse/ClickHouse/pull/51205) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix a crash in s3 and s3Cluster functions [#51209](https://github.com/ClickHouse/ClickHouse/pull/51209) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix a crash with compiled expressions [#51231](https://github.com/ClickHouse/ClickHouse/pull/51231) ([LiuNeng](https://github.com/liuneng1994)). +* Fix use-after-free in StorageURL when switching URLs [#51260](https://github.com/ClickHouse/ClickHouse/pull/51260) ([Michael Kolupaev](https://github.com/al13n321)). +* Updated check for parameterized view [#51272](https://github.com/ClickHouse/ClickHouse/pull/51272) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fix multiple writing of same file to backup [#51299](https://github.com/ClickHouse/ClickHouse/pull/51299) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix fuzzer failure in ActionsDAG [#51301](https://github.com/ClickHouse/ClickHouse/pull/51301) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Remove garbage from function `transform` [#51350](https://github.com/ClickHouse/ClickHouse/pull/51350) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + + +### ClickHouse release 23.5, 2023-06-08 {#235} + +#### Upgrade Notes +* Compress marks and primary key by default. It significantly reduces the cold query time. Upgrade notes: the support for compressed marks and primary key has been added in version 22.9. If you turned on compressed marks or primary key or installed version 23.5 or newer, which has compressed marks or primary key on by default, you will not be able to downgrade to version 22.8 or earlier. You can also explicitly disable compressed marks or primary keys by specifying the `compress_marks` and `compress_primary_key` settings in the `` section of the server configuration file. **Upgrade notes:** If you upgrade from versions prior to 22.9, you should either upgrade all replicas at once or disable the compression before upgrade, or upgrade through an intermediate version, where the compressed marks are supported but not enabled by default, such as 23.3. [#42587](https://github.com/ClickHouse/ClickHouse/pull/42587) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Make local object storage work consistently with s3 object storage, fix problem with append (closes [#48465](https://github.com/ClickHouse/ClickHouse/issues/48465)), make it configurable as independent storage. The change is backward incompatible because the cache on top of local object storage is not compatible to previous versions. [#48791](https://github.com/ClickHouse/ClickHouse/pull/48791) ([Kseniia Sumarokova](https://github.com/kssenii)). +* The experimental feature "in-memory data parts" is removed. The data format is still supported, but the settings are no-op, and compact or wide parts will be used instead. This closes [#45409](https://github.com/ClickHouse/ClickHouse/issues/45409). [#49429](https://github.com/ClickHouse/ClickHouse/pull/49429) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Changed default values of settings `parallelize_output_from_storages` and `input_format_parquet_preserve_order`. This allows ClickHouse to reorder rows when reading from files (e.g. CSV or Parquet), greatly improving performance in many cases. To restore the old behavior of preserving order, use `parallelize_output_from_storages = 0`, `input_format_parquet_preserve_order = 1`. [#49479](https://github.com/ClickHouse/ClickHouse/pull/49479) ([Michael Kolupaev](https://github.com/al13n321)). +* Make projections production-ready. Add the `optimize_use_projections` setting to control whether the projections will be selected for SELECT queries. The setting `allow_experimental_projection_optimization` is obsolete and does nothing. [#49719](https://github.com/ClickHouse/ClickHouse/pull/49719) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Mark `joinGet` as non-deterministic (so as `dictGet`). It allows using them in mutations without an extra setting. [#49843](https://github.com/ClickHouse/ClickHouse/pull/49843) ([Azat Khuzhin](https://github.com/azat)). +* Revert the "`groupArray` returns cannot be nullable" change (due to binary compatibility breakage for `groupArray`/`groupArrayLast`/`groupArraySample` over `Nullable` types, which likely will lead to `TOO_LARGE_ARRAY_SIZE` or `CANNOT_READ_ALL_DATA`). [#49971](https://github.com/ClickHouse/ClickHouse/pull/49971) ([Azat Khuzhin](https://github.com/azat)). +* Setting `enable_memory_bound_merging_of_aggregation_results` is enabled by default. If you update from version prior to 22.12, we recommend to set this flag to `false` until update is finished. [#50319](https://github.com/ClickHouse/ClickHouse/pull/50319) ([Nikita Taranov](https://github.com/nickitat)). + +#### New Feature +* Added storage engine AzureBlobStorage and azureBlobStorage table function. The supported set of features is very similar to storage/table function S3 [#50604] (https://github.com/ClickHouse/ClickHouse/pull/50604) ([alesapin](https://github.com/alesapin)) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni). +* Added native ClickHouse Keeper CLI Client, it is available as `clickhouse keeper-client` [#47414](https://github.com/ClickHouse/ClickHouse/pull/47414) ([pufit](https://github.com/pufit)). +* Add `urlCluster` table function. Refactor all *Cluster table functions to reduce code duplication. Make schema inference work for all possible *Cluster function signatures and for named collections. Closes [#38499](https://github.com/ClickHouse/ClickHouse/issues/38499). [#45427](https://github.com/ClickHouse/ClickHouse/pull/45427) ([attack204](https://github.com/attack204)), Pavel Kruglov. +* The query cache can now be used for production workloads. [#47977](https://github.com/ClickHouse/ClickHouse/pull/47977) ([Robert Schulze](https://github.com/rschu1ze)). The query cache can now support queries with totals and extremes modifier. [#48853](https://github.com/ClickHouse/ClickHouse/pull/48853) ([Robert Schulze](https://github.com/rschu1ze)). Make `allow_experimental_query_cache` setting as obsolete for backward-compatibility. It was removed in https://github.com/ClickHouse/ClickHouse/pull/47977. [#49934](https://github.com/ClickHouse/ClickHouse/pull/49934) ([Timur Solodovnikov](https://github.com/tsolodov)). +* Geographical data types (`Point`, `Ring`, `Polygon`, and `MultiPolygon`) are production-ready. [#50022](https://github.com/ClickHouse/ClickHouse/pull/50022) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add schema inference to PostgreSQL, MySQL, MeiliSearch, and SQLite table engines. Closes [#49972](https://github.com/ClickHouse/ClickHouse/issues/49972). [#50000](https://github.com/ClickHouse/ClickHouse/pull/50000) ([Nikolay Degterinsky](https://github.com/evillique)). +* Password type in queries like `CREATE USER u IDENTIFIED BY 'p'` will be automatically set according to the setting `default_password_type` in the `config.xml` on the server. Closes [#42915](https://github.com/ClickHouse/ClickHouse/issues/42915). [#44674](https://github.com/ClickHouse/ClickHouse/pull/44674) ([Nikolay Degterinsky](https://github.com/evillique)). +* Add bcrypt password authentication type. Closes [#34599](https://github.com/ClickHouse/ClickHouse/issues/34599). [#44905](https://github.com/ClickHouse/ClickHouse/pull/44905) ([Nikolay Degterinsky](https://github.com/evillique)). +* Introduces new keyword `INTO OUTFILE 'file.txt' APPEND`. [#48880](https://github.com/ClickHouse/ClickHouse/pull/48880) ([alekar](https://github.com/alekar)). +* Added `system.zookeeper_connection` table that shows information about Keeper connections. [#45245](https://github.com/ClickHouse/ClickHouse/pull/45245) ([mateng915](https://github.com/mateng0915)). +* Add new function `generateRandomStructure` that generates random table structure. It can be used in combination with table function `generateRandom`. [#47409](https://github.com/ClickHouse/ClickHouse/pull/47409) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow the use of `CASE` without an `ELSE` branch and extended `transform` to deal with more types. Also fix some issues that made transform() return incorrect results when decimal types were mixed with other numeric types. [#48300](https://github.com/ClickHouse/ClickHouse/pull/48300) ([Salvatore Mesoraca](https://github.com/aiven-sal)). This closes #2655. This closes #9596. This closes #38666. +* Added [server-side encryption using KMS keys](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) with S3 tables, and the `header` setting with S3 disks. Closes [#48723](https://github.com/ClickHouse/ClickHouse/issues/48723). [#48724](https://github.com/ClickHouse/ClickHouse/pull/48724) ([Johann Gan](https://github.com/johanngan)). +* Add MemoryTracker for the background tasks (merges and mutation). Introduces `merges_mutations_memory_usage_soft_limit` and `merges_mutations_memory_usage_to_ram_ratio` settings that represent the soft memory limit for merges and mutations. If this limit is reached ClickHouse won't schedule new merge or mutation tasks. Also `MergesMutationsMemoryTracking` metric is introduced to allow observing current memory usage of background tasks. Resubmit [#46089](https://github.com/ClickHouse/ClickHouse/issues/46089). Closes [#48774](https://github.com/ClickHouse/ClickHouse/issues/48774). [#48787](https://github.com/ClickHouse/ClickHouse/pull/48787) ([Dmitry Novik](https://github.com/novikd)). +* Function `dotProduct` work for array. [#49050](https://github.com/ClickHouse/ClickHouse/pull/49050) ([FFFFFFFHHHHHHH](https://github.com/FFFFFFFHHHHHHH)). +* Support statement `SHOW INDEX` to improve compatibility with MySQL. [#49158](https://github.com/ClickHouse/ClickHouse/pull/49158) ([Robert Schulze](https://github.com/rschu1ze)). +* Add virtual column `_file` and `_path` support to table function `url`. - Improve error message for table function `url`. - resolves [#49231](https://github.com/ClickHouse/ClickHouse/issues/49231) - resolves [#49232](https://github.com/ClickHouse/ClickHouse/issues/49232). [#49356](https://github.com/ClickHouse/ClickHouse/pull/49356) ([Ziyi Tan](https://github.com/Ziy1-Tan)). +* Adding the `grants` field in the users.xml file, which allows specifying grants for users. [#49381](https://github.com/ClickHouse/ClickHouse/pull/49381) ([pufit](https://github.com/pufit)). +* Support full/right join by using grace hash join algorithm. [#49483](https://github.com/ClickHouse/ClickHouse/pull/49483) ([lgbo](https://github.com/lgbo-ustc)). +* `WITH FILL` modifier groups filling by sorting prefix. Controlled by `use_with_fill_by_sorting_prefix` setting (enabled by default). Related to [#33203](https://github.com/ClickHouse/ClickHouse/issues/33203)#issuecomment-1418736794. [#49503](https://github.com/ClickHouse/ClickHouse/pull/49503) ([Igor Nikonov](https://github.com/devcrafter)). +* Clickhouse-client now accepts queries after "--multiquery" when "--query" (or "-q") is absent. example: clickhouse-client --multiquery "select 1; select 2;". [#49870](https://github.com/ClickHouse/ClickHouse/pull/49870) ([Alexey Gerasimchuk](https://github.com/Demilivor)). +* Add separate `handshake_timeout` for receiving Hello packet from replica. Closes [#48854](https://github.com/ClickHouse/ClickHouse/issues/48854). [#49948](https://github.com/ClickHouse/ClickHouse/pull/49948) ([Kruglov Pavel](https://github.com/Avogar)). +* Added a function "space" which repeats a space as many times as specified. [#50103](https://github.com/ClickHouse/ClickHouse/pull/50103) ([Robert Schulze](https://github.com/rschu1ze)). +* Added --input_format_csv_trim_whitespaces option. [#50215](https://github.com/ClickHouse/ClickHouse/pull/50215) ([Alexey Gerasimchuk](https://github.com/Demilivor)). +* Allow the `dictGetAll` function for regexp tree dictionaries to return values from multiple matches as arrays. Closes [#50254](https://github.com/ClickHouse/ClickHouse/issues/50254). [#50255](https://github.com/ClickHouse/ClickHouse/pull/50255) ([Johann Gan](https://github.com/johanngan)). +* Added `toLastDayOfWeek` function to round a date or a date with time up to the nearest Saturday or Sunday. [#50315](https://github.com/ClickHouse/ClickHouse/pull/50315) ([Victor Krasnov](https://github.com/sirvickr)). +* Ability to ignore a skip index by specifying `ignore_data_skipping_indices`. [#50329](https://github.com/ClickHouse/ClickHouse/pull/50329) ([Boris Kuschel](https://github.com/bkuschel)). +* Add `system.user_processes` table and `SHOW USER PROCESSES` query to show memory info and ProfileEvents on user level. [#50492](https://github.com/ClickHouse/ClickHouse/pull/50492) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)). +* Add server and format settings `display_secrets_in_show_and_select` for displaying secrets of tables, databases, table functions, and dictionaries. Add privilege `displaySecretsInShowAndSelect` controlling which users can view secrets. [#46528](https://github.com/ClickHouse/ClickHouse/pull/46528) ([Mike Kot](https://github.com/myrrc)). +* Allow to set up a ROW POLICY for all tables that belong to a DATABASE. [#47640](https://github.com/ClickHouse/ClickHouse/pull/47640) ([Ilya Golshtein](https://github.com/ilejn)). + +#### Performance Improvement +* Compress marks and primary key by default. It significantly reduces the cold query time. Upgrade notes: the support for compressed marks and primary key has been added in version 22.9. If you turned on compressed marks or primary key or installed version 23.5 or newer, which has compressed marks or primary key on by default, you will not be able to downgrade to version 22.8 or earlier. You can also explicitly disable compressed marks or primary keys by specifying the `compress_marks` and `compress_primary_key` settings in the `` section of the server configuration file. [#42587](https://github.com/ClickHouse/ClickHouse/pull/42587) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* New setting s3_max_inflight_parts_for_one_file sets the limit of concurrently loaded parts with multipart upload request in scope of one file. [#49961](https://github.com/ClickHouse/ClickHouse/pull/49961) ([Sema Checherinda](https://github.com/CheSema)). +* When reading from multiple files reduce parallel parsing threads for each file. Resolves [#42192](https://github.com/ClickHouse/ClickHouse/issues/42192). [#46661](https://github.com/ClickHouse/ClickHouse/pull/46661) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Use aggregate projection only if it reads fewer granules than normal reading. It should help in case if query hits the PK of the table, but not the projection. Fixes [#49150](https://github.com/ClickHouse/ClickHouse/issues/49150). [#49417](https://github.com/ClickHouse/ClickHouse/pull/49417) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Do not store blocks in `ANY` hash join if nothing is inserted. [#48633](https://github.com/ClickHouse/ClickHouse/pull/48633) ([vdimir](https://github.com/vdimir)). +* Fixes aggregate combinator `-If` when JIT compiled, and enable JIT compilation for aggregate functions. Closes [#48120](https://github.com/ClickHouse/ClickHouse/issues/48120). [#49083](https://github.com/ClickHouse/ClickHouse/pull/49083) ([Igor Nikonov](https://github.com/devcrafter)). +* For reading from remote tables we use smaller tasks (instead of reading the whole part) to make tasks stealing work * task size is determined by size of columns to read * always use 1mb buffers for reading from s3 * boundaries of cache segments aligned to 1mb so they have decent size even with small tasks. it also should prevent fragmentation. [#49287](https://github.com/ClickHouse/ClickHouse/pull/49287) ([Nikita Taranov](https://github.com/nickitat)). +* Introduced settings: - `merge_max_block_size_bytes` to limit the amount of memory used for background operations. - `vertical_merge_algorithm_min_bytes_to_activate` to add another condition to activate vertical merges. [#49313](https://github.com/ClickHouse/ClickHouse/pull/49313) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Default size of a read buffer for reading from local filesystem changed to a slightly better value. Also two new settings are introduced: `max_read_buffer_size_local_fs` and `max_read_buffer_size_remote_fs`. [#49321](https://github.com/ClickHouse/ClickHouse/pull/49321) ([Nikita Taranov](https://github.com/nickitat)). +* Improve memory usage and speed of `SPARSE_HASHED`/`HASHED` dictionaries (e.g. `SPARSE_HASHED` now eats 2.6x less memory, and is ~2x faster). [#49380](https://github.com/ClickHouse/ClickHouse/pull/49380) ([Azat Khuzhin](https://github.com/azat)). +* Optimize the `system.query_log` and `system.query_thread_log` tables by applying `LowCardinality` when appropriate. The queries over these tables will be faster. [#49530](https://github.com/ClickHouse/ClickHouse/pull/49530) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Better performance when reading local `Parquet` files (through parallel reading). [#49539](https://github.com/ClickHouse/ClickHouse/pull/49539) ([Michael Kolupaev](https://github.com/al13n321)). +* Improve the performance of `RIGHT/FULL JOIN` by up to 2 times in certain scenarios, especially when joining a small left table with a large right table. [#49585](https://github.com/ClickHouse/ClickHouse/pull/49585) ([lgbo](https://github.com/lgbo-ustc)). +* Improve performance of BLAKE3 by 11% by enabling LTO for Rust. [#49600](https://github.com/ClickHouse/ClickHouse/pull/49600) ([Azat Khuzhin](https://github.com/azat)). Now it is on par with C++. +* Optimize the structure of the `system.opentelemetry_span_log`. Use `LowCardinality` where appropriate. Although this table is generally stupid (it is using the Map data type even for common attributes), it will be slightly better. [#49647](https://github.com/ClickHouse/ClickHouse/pull/49647) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Try to reserve hash table's size in `grace_hash` join. [#49816](https://github.com/ClickHouse/ClickHouse/pull/49816) ([lgbo](https://github.com/lgbo-ustc)). +* Parallel merge of `uniqExactIf` states. Closes [#49885](https://github.com/ClickHouse/ClickHouse/issues/49885). [#50285](https://github.com/ClickHouse/ClickHouse/pull/50285) ([flynn](https://github.com/ucasfl)). +* Keeper improvement: add `CheckNotExists` request to Keeper, which allows to improve the performance of Replicated tables. [#48897](https://github.com/ClickHouse/ClickHouse/pull/48897) ([Antonio Andelic](https://github.com/antonio2368)). +* Keeper performance improvements: avoid serializing same request twice while processing. Cache deserialization results of large requests. Controlled by new coordination setting `min_request_size_for_cache`. [#49004](https://github.com/ClickHouse/ClickHouse/pull/49004) ([Antonio Andelic](https://github.com/antonio2368)). +* Reduced number of `List` ZooKeeper requests when selecting parts to merge and a lot of partitions do not have anything to merge. [#49637](https://github.com/ClickHouse/ClickHouse/pull/49637) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Rework locking in the FS cache [#44985](https://github.com/ClickHouse/ClickHouse/pull/44985) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Disable pure parallel replicas if trivial count optimization is possible. [#50594](https://github.com/ClickHouse/ClickHouse/pull/50594) ([Raúl Marín](https://github.com/Algunenano)). +* Don't send head request for all keys in Iceberg schema inference, only for keys that are used for reaing data. [#50203](https://github.com/ClickHouse/ClickHouse/pull/50203) ([Kruglov Pavel](https://github.com/Avogar)). +* Setting `enable_memory_bound_merging_of_aggregation_results` is enabled by default. [#50319](https://github.com/ClickHouse/ClickHouse/pull/50319) ([Nikita Taranov](https://github.com/nickitat)). + +#### Experimental Feature +* `DEFLATE_QPL` codec lower the minimum simd version to SSE 4.2. [doc change in qpl](https://github.com/intel/qpl/commit/3f8f5cea27739f5261e8fd577dc233ffe88bf679) - Intel® QPL relies on a run-time kernels dispatcher and cpuid check to choose the best available implementation(sse/avx2/avx512) - restructured cmakefile for qpl build in clickhouse to align with latest upstream qpl. [#49811](https://github.com/ClickHouse/ClickHouse/pull/49811) ([jasperzhu](https://github.com/jinjunzh)). +* Add initial support to do JOINs with pure parallel replicas. [#49544](https://github.com/ClickHouse/ClickHouse/pull/49544) ([Raúl Marín](https://github.com/Algunenano)). +* More parallelism on `Outdated` parts removal with "zero-copy replication". [#49630](https://github.com/ClickHouse/ClickHouse/pull/49630) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Parallel Replicas: 1) Fixed an error `NOT_FOUND_COLUMN_IN_BLOCK` in case of using parallel replicas with non-replicated storage with disabled setting `parallel_replicas_for_non_replicated_merge_tree` 2) Now `allow_experimental_parallel_reading_from_replicas` have 3 possible values - 0, 1 and 2. 0 - disabled, 1 - enabled, silently disable them in case of failure (in case of FINAL or JOIN), 2 - enabled, throw an exception in case of failure. 3) If FINAL modifier is used in SELECT query and parallel replicas are enabled, ClickHouse will try to disable them if `allow_experimental_parallel_reading_from_replicas` is set to 1 and throw an exception otherwise. [#50195](https://github.com/ClickHouse/ClickHouse/pull/50195) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* When parallel replicas are enabled they will always skip unavailable servers (the behavior is controlled by the setting `skip_unavailable_shards`, enabled by default and can be only disabled). This closes: [#48565](https://github.com/ClickHouse/ClickHouse/issues/48565). [#50293](https://github.com/ClickHouse/ClickHouse/pull/50293) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). + +#### Improvement +* The `BACKUP` command will not decrypt data from encrypted disks while making a backup. Instead the data will be stored in a backup in encrypted form. Such backups can be restored only to an encrypted disk with the same (or extended) list of encryption keys. [#48896](https://github.com/ClickHouse/ClickHouse/pull/48896) ([Vitaly Baranov](https://github.com/vitlibar)). +* Added possibility to use temporary tables in FROM part of ATTACH PARTITION FROM and REPLACE PARTITION FROM. [#49436](https://github.com/ClickHouse/ClickHouse/pull/49436) ([Roman Vasin](https://github.com/rvasin)). +* Added setting `async_insert` for `MergeTree` tables. It has the same meaning as query-level setting `async_insert` and enables asynchronous inserts for specific table. Note: it doesn't take effect for insert queries from `clickhouse-client`, use query-level setting in that case. [#49122](https://github.com/ClickHouse/ClickHouse/pull/49122) ([Anton Popov](https://github.com/CurtizJ)). +* Add support for size suffixes in quota creation statement parameters. [#49087](https://github.com/ClickHouse/ClickHouse/pull/49087) ([Eridanus](https://github.com/Eridanus117)). +* Extend `first_value` and `last_value` to accept NULL. [#46467](https://github.com/ClickHouse/ClickHouse/pull/46467) ([lgbo](https://github.com/lgbo-ustc)). +* Add alias `str_to_map` and `mapFromString` for `extractKeyValuePairs`. closes https://github.com/clickhouse/clickhouse/issues/47185. [#49466](https://github.com/ClickHouse/ClickHouse/pull/49466) ([flynn](https://github.com/ucasfl)). +* Add support for CGroup version 2 for asynchronous metrics about the memory usage and availability. This closes [#37983](https://github.com/ClickHouse/ClickHouse/issues/37983). [#45999](https://github.com/ClickHouse/ClickHouse/pull/45999) ([sichenzhao](https://github.com/sichenzhao)). +* Cluster table functions should always skip unavailable shards. close [#46314](https://github.com/ClickHouse/ClickHouse/issues/46314). [#46765](https://github.com/ClickHouse/ClickHouse/pull/46765) ([zk_kiger](https://github.com/zk-kiger)). +* Allow CSV file to contain empty columns in its header. [#47496](https://github.com/ClickHouse/ClickHouse/pull/47496) ([ä½ ä¸è¦è¿‡æ¥å•Š](https://github.com/iiiuwioajdks)). +* Add Google Cloud Storage S3 compatible table function `gcs`. Like the `oss` and `cosn` functions, it is just an alias over the `s3` table function, and it does not bring any new features. [#47815](https://github.com/ClickHouse/ClickHouse/pull/47815) ([Kuba Kaflik](https://github.com/jkaflik)). +* Add ability to use strict parts size for S3 (compatibility with CloudFlare R2 S3 Storage). [#48492](https://github.com/ClickHouse/ClickHouse/pull/48492) ([Azat Khuzhin](https://github.com/azat)). +* Added new columns with info about `Replicated` database replicas to `system.clusters`: `database_shard_name`, `database_replica_name`, `is_active`. Added an optional `FROM SHARD` clause to `SYSTEM DROP DATABASE REPLICA` query. [#48548](https://github.com/ClickHouse/ClickHouse/pull/48548) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Add a new column `zookeeper_name` in system.replicas, to indicate on which (auxiliary) zookeeper cluster the replicated table's metadata is stored. [#48549](https://github.com/ClickHouse/ClickHouse/pull/48549) ([cangyin](https://github.com/cangyin)). +* `IN` operator support the comparison of `Date` and `Date32`. Closes [#48736](https://github.com/ClickHouse/ClickHouse/issues/48736). [#48806](https://github.com/ClickHouse/ClickHouse/pull/48806) ([flynn](https://github.com/ucasfl)). +* Support for erasure codes in `HDFS`, author: @M1eyu2018, @tomscut. [#48833](https://github.com/ClickHouse/ClickHouse/pull/48833) ([M1eyu](https://github.com/M1eyu2018)). +* Implement SYSTEM DROP REPLICA from auxiliary ZooKeeper clusters, may be close [#48931](https://github.com/ClickHouse/ClickHouse/issues/48931). [#48932](https://github.com/ClickHouse/ClickHouse/pull/48932) ([wangxiaobo](https://github.com/wzb5212)). +* Add Array data type to MongoDB. Closes [#48598](https://github.com/ClickHouse/ClickHouse/issues/48598). [#48983](https://github.com/ClickHouse/ClickHouse/pull/48983) ([Nikolay Degterinsky](https://github.com/evillique)). +* Support storing `Interval` data types in tables. [#49085](https://github.com/ClickHouse/ClickHouse/pull/49085) ([larryluogit](https://github.com/larryluogit)). +* Allow using `ntile` window function without explicit window frame definition: `ntile(3) OVER (ORDER BY a)`, close [#46763](https://github.com/ClickHouse/ClickHouse/issues/46763). [#49093](https://github.com/ClickHouse/ClickHouse/pull/49093) ([vdimir](https://github.com/vdimir)). +* Added settings (`number_of_mutations_to_delay`, `number_of_mutations_to_throw`) to delay or throw `ALTER` queries that create mutations (`ALTER UPDATE`, `ALTER DELETE`, `ALTER MODIFY COLUMN`, ...) in case when table already has a lot of unfinished mutations. [#49117](https://github.com/ClickHouse/ClickHouse/pull/49117) ([Anton Popov](https://github.com/CurtizJ)). +* Catch exception from `create_directories` in filesystem cache. [#49203](https://github.com/ClickHouse/ClickHouse/pull/49203) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Copies embedded examples to a new field `example` in `system.functions` to supplement the field `description`. [#49222](https://github.com/ClickHouse/ClickHouse/pull/49222) ([Dan Roscigno](https://github.com/DanRoscigno)). +* Enable connection options for the MongoDB dictionary. Example: ``` xml localhost 27017 test dictionary_source ssl=true ``` ### Documentation entry for user-facing changes. [#49225](https://github.com/ClickHouse/ClickHouse/pull/49225) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* Added an alias `asymptotic` for `asymp` computational method for `kolmogorovSmirnovTest`. Improved documentation. [#49286](https://github.com/ClickHouse/ClickHouse/pull/49286) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Aggregation function groupBitAnd/Or/Xor now work on signed integer data. This makes them consistent with the behavior of scalar functions bitAnd/Or/Xor. [#49292](https://github.com/ClickHouse/ClickHouse/pull/49292) ([exmy](https://github.com/exmy)). +* Split function-documentation into more fine-granular fields. [#49300](https://github.com/ClickHouse/ClickHouse/pull/49300) ([Robert Schulze](https://github.com/rschu1ze)). +* Use multiple threads shared between all tables within a server to load outdated data parts. The the size of the pool and its queue is controlled by `max_outdated_parts_loading_thread_pool_size` and `outdated_part_loading_thread_pool_queue_size` settings. [#49317](https://github.com/ClickHouse/ClickHouse/pull/49317) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Don't overestimate the size of processed data for `LowCardinality` columns when they share dictionaries between blocks. This closes [#49322](https://github.com/ClickHouse/ClickHouse/issues/49322). See also [#48745](https://github.com/ClickHouse/ClickHouse/issues/48745). [#49323](https://github.com/ClickHouse/ClickHouse/pull/49323) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Parquet writer now uses reasonable row group size when invoked through `OUTFILE`. [#49325](https://github.com/ClickHouse/ClickHouse/pull/49325) ([Michael Kolupaev](https://github.com/al13n321)). +* Allow restricted keywords like `ARRAY` as an alias if the alias is quoted. Closes [#49324](https://github.com/ClickHouse/ClickHouse/issues/49324). [#49360](https://github.com/ClickHouse/ClickHouse/pull/49360) ([Nikolay Degterinsky](https://github.com/evillique)). +* Data parts loading and deletion jobs were moved to shared server-wide pools instead of per-table pools. Pools sizes are controlled via settings `max_active_parts_loading_thread_pool_size`, `max_outdated_parts_loading_thread_pool_size` and `max_parts_cleaning_thread_pool_size` in top-level config. Table-level settings `max_part_loading_threads` and `max_part_removal_threads` became obsolete. [#49474](https://github.com/ClickHouse/ClickHouse/pull/49474) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Allow `?password=pass` in URL of the Play UI. Password is replaced in browser history. [#49505](https://github.com/ClickHouse/ClickHouse/pull/49505) ([Mike Kot](https://github.com/myrrc)). +* Allow reading zero-size objects from remote filesystems. (because empty files are not backup'd, so we might end up with zero blobs in metadata file). Closes [#49480](https://github.com/ClickHouse/ClickHouse/issues/49480). [#49519](https://github.com/ClickHouse/ClickHouse/pull/49519) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Attach thread MemoryTracker to `total_memory_tracker` after `ThreadGroup` detached. [#49527](https://github.com/ClickHouse/ClickHouse/pull/49527) ([Dmitry Novik](https://github.com/novikd)). +* Fix parameterized views when a query parameter is used multiple times in the query. [#49556](https://github.com/ClickHouse/ClickHouse/pull/49556) ([Azat Khuzhin](https://github.com/azat)). +* Release memory allocated for the last sent ProfileEvents snapshot in the context of a query. Followup [#47564](https://github.com/ClickHouse/ClickHouse/issues/47564). [#49561](https://github.com/ClickHouse/ClickHouse/pull/49561) ([Dmitry Novik](https://github.com/novikd)). +* Function "makeDate" now provides a MySQL-compatible overload (year & day of the year argument). [#49603](https://github.com/ClickHouse/ClickHouse/pull/49603) ([Robert Schulze](https://github.com/rschu1ze)). +* Support `dictionary` table function for `RegExpTreeDictionary`. [#49666](https://github.com/ClickHouse/ClickHouse/pull/49666) ([Han Fei](https://github.com/hanfei1991)). +* Added weighted fair IO scheduling policy. Added dynamic resource manager, which allows IO scheduling hierarchy to be updated in runtime w/o server restarts. [#49671](https://github.com/ClickHouse/ClickHouse/pull/49671) ([Sergei Trifonov](https://github.com/serxa)). +* Add compose request after multipart upload to GCS. This enables the usage of copy operation on objects uploaded with the multipart upload. It's recommended to set `s3_strict_upload_part_size` to some value because compose request can fail on objects created with parts of different sizes. [#49693](https://github.com/ClickHouse/ClickHouse/pull/49693) ([Antonio Andelic](https://github.com/antonio2368)). +* For the `extractKeyValuePairs` function: improve the "best-effort" parsing logic to accept `key_value_delimiter` as a valid part of the value. This also simplifies branching and might even speed up things a bit. [#49760](https://github.com/ClickHouse/ClickHouse/pull/49760) ([Arthur Passos](https://github.com/arthurpassos)). +* Add `initial_query_id` field for system.processors_profile_log [#49777](https://github.com/ClickHouse/ClickHouse/pull/49777) ([helifu](https://github.com/helifu)). +* System log tables can now have custom sorting keys. [#49778](https://github.com/ClickHouse/ClickHouse/pull/49778) ([helifu](https://github.com/helifu)). +* A new field `partitions` to `system.query_log` is used to indicate which partitions are participating in the calculation. [#49779](https://github.com/ClickHouse/ClickHouse/pull/49779) ([helifu](https://github.com/helifu)). +* Added `enable_the_endpoint_id_with_zookeeper_name_prefix` setting for `ReplicatedMergeTree` (disabled by default). When enabled, it adds ZooKeeper cluster name to table's interserver communication endpoint. It avoids `Duplicate interserver IO endpoint` errors when having replicated tables with the same path, but different auxiliary ZooKeepers. [#49780](https://github.com/ClickHouse/ClickHouse/pull/49780) ([helifu](https://github.com/helifu)). +* Add query parameters to `clickhouse-local`. Closes [#46561](https://github.com/ClickHouse/ClickHouse/issues/46561). [#49785](https://github.com/ClickHouse/ClickHouse/pull/49785) ([Nikolay Degterinsky](https://github.com/evillique)). +* Allow loading dictionaries and functions from YAML by default. In previous versions, it required editing the `dictionaries_config` or `user_defined_executable_functions_config` in the configuration file, as they expected `*.xml` files. [#49812](https://github.com/ClickHouse/ClickHouse/pull/49812) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The Kafka table engine now allows to use alias columns. [#49824](https://github.com/ClickHouse/ClickHouse/pull/49824) ([Aleksandr Musorin](https://github.com/AVMusorin)). +* Add setting to limit the max number of pairs produced by `extractKeyValuePairs`, a safeguard to avoid using way too much memory. [#49836](https://github.com/ClickHouse/ClickHouse/pull/49836) ([Arthur Passos](https://github.com/arthurpassos)). +* Add support for (an unusual) case where the arguments in the `IN` operator are single-element tuples. [#49844](https://github.com/ClickHouse/ClickHouse/pull/49844) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* `bitHammingDistance` function support `String` and `FixedString` data type. Closes [#48827](https://github.com/ClickHouse/ClickHouse/issues/48827). [#49858](https://github.com/ClickHouse/ClickHouse/pull/49858) ([flynn](https://github.com/ucasfl)). +* Fix timeout resetting errors in the client on OS X. [#49863](https://github.com/ClickHouse/ClickHouse/pull/49863) ([alekar](https://github.com/alekar)). +* Add support for big integers, such as UInt128, Int128, UInt256, and Int256 in the function `bitCount`. This enables Hamming distance over large bit masks for AI applications. [#49867](https://github.com/ClickHouse/ClickHouse/pull/49867) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fingerprints to be used instead of key IDs in encrypted disks. This simplifies the configuration of encrypted disks. [#49882](https://github.com/ClickHouse/ClickHouse/pull/49882) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add UUID data type to PostgreSQL. Closes [#49739](https://github.com/ClickHouse/ClickHouse/issues/49739). [#49894](https://github.com/ClickHouse/ClickHouse/pull/49894) ([Nikolay Degterinsky](https://github.com/evillique)). +* Function `toUnixTimestamp` now accepts `Date` and `Date32` arguments. [#49989](https://github.com/ClickHouse/ClickHouse/pull/49989) ([Victor Krasnov](https://github.com/sirvickr)). +* Charge only server memory for dictionaries. [#49995](https://github.com/ClickHouse/ClickHouse/pull/49995) ([Azat Khuzhin](https://github.com/azat)). +* The server will allow using the `SQL_*` settings such as `SQL_AUTO_IS_NULL` as no-ops for MySQL compatibility. This closes [#49927](https://github.com/ClickHouse/ClickHouse/issues/49927). [#50013](https://github.com/ClickHouse/ClickHouse/pull/50013) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Preserve initial_query_id for ON CLUSTER queries, which is useful for introspection (under `distributed_ddl_entry_format_version=5`). [#50015](https://github.com/ClickHouse/ClickHouse/pull/50015) ([Azat Khuzhin](https://github.com/azat)). +* Preserve backward incompatibility for renamed settings by using aliases (`allow_experimental_projection_optimization` for `optimize_use_projections`, `allow_experimental_lightweight_delete` for `enable_lightweight_delete`). [#50044](https://github.com/ClickHouse/ClickHouse/pull/50044) ([Azat Khuzhin](https://github.com/azat)). +* Support passing FQDN through setting my_hostname to register cluster node in keeper. Add setting of invisible to support multi compute groups. A compute group as a cluster, is invisible to other compute groups. [#50186](https://github.com/ClickHouse/ClickHouse/pull/50186) ([Yangkuan Liu](https://github.com/LiuYangkuan)). +* Fix PostgreSQL reading all the data even though `LIMIT n` could be specified. [#50187](https://github.com/ClickHouse/ClickHouse/pull/50187) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add new profile events for queries with subqueries (`QueriesWithSubqueries`/`SelectQueriesWithSubqueries`/`InsertQueriesWithSubqueries`). [#50204](https://github.com/ClickHouse/ClickHouse/pull/50204) ([Azat Khuzhin](https://github.com/azat)). +* Adding the roles field in the users.xml file, which allows specifying roles with grants via a config file. [#50278](https://github.com/ClickHouse/ClickHouse/pull/50278) ([pufit](https://github.com/pufit)). +* Report `CGroupCpuCfsPeriod` and `CGroupCpuCfsQuota` in AsynchronousMetrics. - Respect cgroup v2 memory limits during server startup. [#50379](https://github.com/ClickHouse/ClickHouse/pull/50379) ([alekar](https://github.com/alekar)). +* Add a signal handler for SIGQUIT to work the same way as SIGINT. Closes [#50298](https://github.com/ClickHouse/ClickHouse/issues/50298). [#50435](https://github.com/ClickHouse/ClickHouse/pull/50435) ([Nikolay Degterinsky](https://github.com/evillique)). +* In case JSON parse fails due to the large size of the object output the last position to allow debugging. [#50474](https://github.com/ClickHouse/ClickHouse/pull/50474) ([Valentin Alexeev](https://github.com/valentinalexeev)). +* Support decimals with not fixed size. Closes [#49130](https://github.com/ClickHouse/ClickHouse/issues/49130). [#50586](https://github.com/ClickHouse/ClickHouse/pull/50586) ([Kruglov Pavel](https://github.com/Avogar)). + +#### Build/Testing/Packaging Improvement +* New and improved `keeper-bench`. Everything can be customized from YAML/XML file: - request generator - each type of request generator can have a specific set of fields - multi requests can be generated just by doing the same under `multi` key - for each request or subrequest in multi a `weight` field can be defined to control distribution - define trees that need to be setup for a test run - hosts can be defined with all timeouts customizable and it's possible to control how many sessions to generate for each host - integers defined with `min_value` and `max_value` fields are random number generators. [#48547](https://github.com/ClickHouse/ClickHouse/pull/48547) ([Antonio Andelic](https://github.com/antonio2368)). +* Io_uring is not supported on macos, don't choose it when running tests on local to avoid occasional failures. [#49250](https://github.com/ClickHouse/ClickHouse/pull/49250) ([Frank Chen](https://github.com/FrankChen021)). +* Support named fault injection for testing. [#49361](https://github.com/ClickHouse/ClickHouse/pull/49361) ([Han Fei](https://github.com/hanfei1991)). +* Allow running ClickHouse in the OS where the `prctl` (process control) syscall is not available, such as AWS Lambda. [#49538](https://github.com/ClickHouse/ClickHouse/pull/49538) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fixed the issue of build conflict between contrib/isa-l and isa-l in qpl [49296](https://github.com/ClickHouse/ClickHouse/issues/49296). [#49584](https://github.com/ClickHouse/ClickHouse/pull/49584) ([jasperzhu](https://github.com/jinjunzh)). +* Utilities are now only build if explicitly requested ("-DENABLE_UTILS=1") instead of by default, this reduces link times in typical development builds. [#49620](https://github.com/ClickHouse/ClickHouse/pull/49620) ([Robert Schulze](https://github.com/rschu1ze)). +* Pull build description of idxd-config into a separate CMake file to avoid accidental removal in future. [#49651](https://github.com/ClickHouse/ClickHouse/pull/49651) ([jasperzhu](https://github.com/jinjunzh)). +* Add CI check with an enabled analyzer in the master. Follow-up [#49562](https://github.com/ClickHouse/ClickHouse/issues/49562). [#49668](https://github.com/ClickHouse/ClickHouse/pull/49668) ([Dmitry Novik](https://github.com/novikd)). +* Switch to LLVM/clang 16. [#49678](https://github.com/ClickHouse/ClickHouse/pull/49678) ([Azat Khuzhin](https://github.com/azat)). +* Allow building ClickHouse with clang-17. [#49851](https://github.com/ClickHouse/ClickHouse/pull/49851) ([Alexey Milovidov](https://github.com/alexey-milovidov)). [#50410](https://github.com/ClickHouse/ClickHouse/pull/50410) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* ClickHouse is now easier to be integrated into other cmake projects. [#49991](https://github.com/ClickHouse/ClickHouse/pull/49991) ([Amos Bird](https://github.com/amosbird)). (Which is strongly discouraged - Alexey Milovidov). +* Fix strange additional QEMU logging after [#47151](https://github.com/ClickHouse/ClickHouse/issues/47151), see https://s3.amazonaws.com/clickhouse-test-reports/50078/a4743996ee4f3583884d07bcd6501df0cfdaa346/stateless_tests__release__databasereplicated__[3_4].html. [#50442](https://github.com/ClickHouse/ClickHouse/pull/50442) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* ClickHouse can work on Linux RISC-V 6.1.22. This closes [#50456](https://github.com/ClickHouse/ClickHouse/issues/50456). [#50457](https://github.com/ClickHouse/ClickHouse/pull/50457) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Bump internal protobuf to v3.18 (fixes bogus CVE-2022-1941). [#50400](https://github.com/ClickHouse/ClickHouse/pull/50400) ([Robert Schulze](https://github.com/rschu1ze)). +* Bump internal libxml2 to v2.10.4 (fixes bogus CVE-2023-28484 and bogus CVE-2023-29469). [#50402](https://github.com/ClickHouse/ClickHouse/pull/50402) ([Robert Schulze](https://github.com/rschu1ze)). +* Bump c-ares to v1.19.1 (bogus CVE-2023-32067, bogus CVE-2023-31130, bogus CVE-2023-31147). [#50403](https://github.com/ClickHouse/ClickHouse/pull/50403) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix bogus CVE-2022-2469 in libgsasl. [#50404](https://github.com/ClickHouse/ClickHouse/pull/50404) ([Robert Schulze](https://github.com/rschu1ze)). + +#### Bug Fix (user-visible misbehavior in an official stable release) + +* ActionsDAG: fix wrong optimization [#47584](https://github.com/ClickHouse/ClickHouse/pull/47584) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Correctly handle concurrent snapshots in Keeper [#48466](https://github.com/ClickHouse/ClickHouse/pull/48466) ([Antonio Andelic](https://github.com/antonio2368)). +* MergeTreeMarksLoader holds DataPart instead of DataPartStorage [#48515](https://github.com/ClickHouse/ClickHouse/pull/48515) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Sequence state fix [#48603](https://github.com/ClickHouse/ClickHouse/pull/48603) ([Ilya Golshtein](https://github.com/ilejn)). +* Back/Restore concurrency check on previous fails [#48726](https://github.com/ClickHouse/ClickHouse/pull/48726) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fix Attaching a table with non-existent ZK path does not increase the ReadonlyReplica metric [#48954](https://github.com/ClickHouse/ClickHouse/pull/48954) ([wangxiaobo](https://github.com/wzb5212)). +* Fix possible terminate called for uncaught exception in some places [#49112](https://github.com/ClickHouse/ClickHouse/pull/49112) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix key not found error for queries with multiple StorageJoin [#49137](https://github.com/ClickHouse/ClickHouse/pull/49137) ([vdimir](https://github.com/vdimir)). +* Fix wrong query result when using nullable primary key [#49172](https://github.com/ClickHouse/ClickHouse/pull/49172) ([Duc Canh Le](https://github.com/canhld94)). +* Fix reinterpretAs*() on big endian machines [#49198](https://github.com/ClickHouse/ClickHouse/pull/49198) ([Suzy Wang](https://github.com/SuzyWangIBMer)). +* (Experimental zero-copy replication) Lock zero copy parts more atomically [#49211](https://github.com/ClickHouse/ClickHouse/pull/49211) ([alesapin](https://github.com/alesapin)). +* Fix race on Outdated parts loading [#49223](https://github.com/ClickHouse/ClickHouse/pull/49223) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix all key value is null and group use rollup return wrong answer [#49282](https://github.com/ClickHouse/ClickHouse/pull/49282) ([Shuai li](https://github.com/loneylee)). +* Fix calculating load_factor for HASHED dictionaries with SHARDS [#49319](https://github.com/ClickHouse/ClickHouse/pull/49319) ([Azat Khuzhin](https://github.com/azat)). +* Disallow configuring compression CODECs for alias columns [#49363](https://github.com/ClickHouse/ClickHouse/pull/49363) ([Timur Solodovnikov](https://github.com/tsolodov)). +* Fix bug in removal of existing part directory [#49365](https://github.com/ClickHouse/ClickHouse/pull/49365) ([alesapin](https://github.com/alesapin)). +* Properly fix GCS when HMAC is used [#49390](https://github.com/ClickHouse/ClickHouse/pull/49390) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix fuzz bug when subquery set is not built when reading from remote() [#49425](https://github.com/ClickHouse/ClickHouse/pull/49425) ([Alexander Gololobov](https://github.com/davenger)). +* Invert `shutdown_wait_unfinished_queries` [#49427](https://github.com/ClickHouse/ClickHouse/pull/49427) ([Konstantin Bogdanov](https://github.com/thevar1able)). +* (Experimental zero-copy replication) Fix another zero copy bug [#49473](https://github.com/ClickHouse/ClickHouse/pull/49473) ([alesapin](https://github.com/alesapin)). +* Fix postgres database setting [#49481](https://github.com/ClickHouse/ClickHouse/pull/49481) ([Mal Curtis](https://github.com/snikch)). +* Correctly handle `s3Cluster` arguments [#49490](https://github.com/ClickHouse/ClickHouse/pull/49490) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix bug in TraceCollector destructor. [#49508](https://github.com/ClickHouse/ClickHouse/pull/49508) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix AsynchronousReadIndirectBufferFromRemoteFS breaking on short seeks [#49525](https://github.com/ClickHouse/ClickHouse/pull/49525) ([Michael Kolupaev](https://github.com/al13n321)). +* Fix dictionaries loading order [#49560](https://github.com/ClickHouse/ClickHouse/pull/49560) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Forbid the change of data type of Object('json') column [#49563](https://github.com/ClickHouse/ClickHouse/pull/49563) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix stress test (Logical error: Expected 7134 >= 11030) [#49623](https://github.com/ClickHouse/ClickHouse/pull/49623) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix bug in DISTINCT [#49628](https://github.com/ClickHouse/ClickHouse/pull/49628) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix: DISTINCT in order with zero values in non-sorted columns [#49636](https://github.com/ClickHouse/ClickHouse/pull/49636) ([Igor Nikonov](https://github.com/devcrafter)). +* Fix one-off error in big integers found by UBSan with fuzzer [#49645](https://github.com/ClickHouse/ClickHouse/pull/49645) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix reading from sparse columns after restart [#49660](https://github.com/ClickHouse/ClickHouse/pull/49660) ([Anton Popov](https://github.com/CurtizJ)). +* Fix assert in SpanHolder::finish() with fibers [#49673](https://github.com/ClickHouse/ClickHouse/pull/49673) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix short circuit functions and mutations with sparse arguments [#49716](https://github.com/ClickHouse/ClickHouse/pull/49716) ([Anton Popov](https://github.com/CurtizJ)). +* Fix writing appended files to incremental backups [#49725](https://github.com/ClickHouse/ClickHouse/pull/49725) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix "There is no physical column _row_exists in table" error occurring during lightweight delete mutation on a table with Object column. [#49737](https://github.com/ClickHouse/ClickHouse/pull/49737) ([Alexander Gololobov](https://github.com/davenger)). +* Fix msan issue in randomStringUTF8(uneven number) [#49750](https://github.com/ClickHouse/ClickHouse/pull/49750) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix aggregate function kolmogorovSmirnovTest [#49768](https://github.com/ClickHouse/ClickHouse/pull/49768) ([FFFFFFFHHHHHHH](https://github.com/FFFFFFFHHHHHHH)). +* Fix settings aliases in native protocol [#49776](https://github.com/ClickHouse/ClickHouse/pull/49776) ([Azat Khuzhin](https://github.com/azat)). +* Fix `arrayMap` with array of tuples with single argument [#49789](https://github.com/ClickHouse/ClickHouse/pull/49789) ([Anton Popov](https://github.com/CurtizJ)). +* Fix per-query IO/BACKUPs throttling settings [#49797](https://github.com/ClickHouse/ClickHouse/pull/49797) ([Azat Khuzhin](https://github.com/azat)). +* Fix setting NULL in profile definition [#49831](https://github.com/ClickHouse/ClickHouse/pull/49831) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix a bug with projections and the aggregate_functions_null_for_empty setting (for query_plan_optimize_projection) [#49873](https://github.com/ClickHouse/ClickHouse/pull/49873) ([Amos Bird](https://github.com/amosbird)). +* Fix processing pending batch for Distributed async INSERT after restart [#49884](https://github.com/ClickHouse/ClickHouse/pull/49884) ([Azat Khuzhin](https://github.com/azat)). +* Fix assertion in CacheMetadata::doCleanup [#49914](https://github.com/ClickHouse/ClickHouse/pull/49914) ([Kseniia Sumarokova](https://github.com/kssenii)). +* fix `is_prefix` in OptimizeRegularExpression [#49919](https://github.com/ClickHouse/ClickHouse/pull/49919) ([Han Fei](https://github.com/hanfei1991)). +* Fix metrics `WriteBufferFromS3Bytes`, `WriteBufferFromS3Microseconds` and `WriteBufferFromS3RequestsErrors` [#49930](https://github.com/ClickHouse/ClickHouse/pull/49930) ([Aleksandr Musorin](https://github.com/AVMusorin)). +* Fix IPv6 encoding in protobuf [#49933](https://github.com/ClickHouse/ClickHouse/pull/49933) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix possible Logical error on bad Nullable parsing for text formats [#49960](https://github.com/ClickHouse/ClickHouse/pull/49960) ([Kruglov Pavel](https://github.com/Avogar)). +* Add setting output_format_parquet_compliant_nested_types to produce more compatible Parquet files [#50001](https://github.com/ClickHouse/ClickHouse/pull/50001) ([Michael Kolupaev](https://github.com/al13n321)). +* Fix logical error in stress test "Not enough space to add ..." [#50021](https://github.com/ClickHouse/ClickHouse/pull/50021) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Avoid deadlock when starting table in attach thread of `ReplicatedMergeTree` [#50026](https://github.com/ClickHouse/ClickHouse/pull/50026) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix assert in SpanHolder::finish() with fibers attempt 2 [#50034](https://github.com/ClickHouse/ClickHouse/pull/50034) ([Kruglov Pavel](https://github.com/Avogar)). +* Add proper escaping for DDL OpenTelemetry context serialization [#50045](https://github.com/ClickHouse/ClickHouse/pull/50045) ([Azat Khuzhin](https://github.com/azat)). +* Fix reporting broken projection parts [#50052](https://github.com/ClickHouse/ClickHouse/pull/50052) ([Amos Bird](https://github.com/amosbird)). +* JIT compilation not equals NaN fix [#50056](https://github.com/ClickHouse/ClickHouse/pull/50056) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix crashing in case of Replicated database without arguments [#50058](https://github.com/ClickHouse/ClickHouse/pull/50058) ([Azat Khuzhin](https://github.com/azat)). +* Fix crash with `multiIf` and constant condition and nullable arguments [#50123](https://github.com/ClickHouse/ClickHouse/pull/50123) ([Anton Popov](https://github.com/CurtizJ)). +* Fix invalid index analysis for date related keys [#50153](https://github.com/ClickHouse/ClickHouse/pull/50153) ([Amos Bird](https://github.com/amosbird)). +* do not allow modify order by when there are no order by cols [#50154](https://github.com/ClickHouse/ClickHouse/pull/50154) ([Han Fei](https://github.com/hanfei1991)). +* Fix broken index analysis when binary operator contains a null constant argument [#50177](https://github.com/ClickHouse/ClickHouse/pull/50177) ([Amos Bird](https://github.com/amosbird)). +* clickhouse-client: disallow usage of `--query` and `--queries-file` at the same time [#50210](https://github.com/ClickHouse/ClickHouse/pull/50210) ([Alexey Gerasimchuk](https://github.com/Demilivor)). +* Fix UB for INTO OUTFILE extensions (APPEND / AND STDOUT) and WATCH EVENTS [#50216](https://github.com/ClickHouse/ClickHouse/pull/50216) ([Azat Khuzhin](https://github.com/azat)). +* Fix skipping spaces at end of row in CustomSeparatedIgnoreSpaces format [#50224](https://github.com/ClickHouse/ClickHouse/pull/50224) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix iceberg metadata parsing [#50232](https://github.com/ClickHouse/ClickHouse/pull/50232) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix nested distributed SELECT in WITH clause [#50234](https://github.com/ClickHouse/ClickHouse/pull/50234) ([Azat Khuzhin](https://github.com/azat)). +* Fix msan issue in keyed siphash [#50245](https://github.com/ClickHouse/ClickHouse/pull/50245) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix bugs in Poco sockets in non-blocking mode, use true non-blocking sockets [#50252](https://github.com/ClickHouse/ClickHouse/pull/50252) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix checksum calculation for backup entries [#50264](https://github.com/ClickHouse/ClickHouse/pull/50264) ([Vitaly Baranov](https://github.com/vitlibar)). +* Comparison functions NaN fix [#50287](https://github.com/ClickHouse/ClickHouse/pull/50287) ([Maksim Kita](https://github.com/kitaisreal)). +* JIT aggregation nullable key fix [#50291](https://github.com/ClickHouse/ClickHouse/pull/50291) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix clickhouse-local crashing when writing empty Arrow or Parquet output [#50328](https://github.com/ClickHouse/ClickHouse/pull/50328) ([Michael Kolupaev](https://github.com/al13n321)). +* Fix crash when Pool::Entry::disconnect() is called [#50334](https://github.com/ClickHouse/ClickHouse/pull/50334) ([Val Doroshchuk](https://github.com/valbok)). +* Improved fetch part by holding directory lock longer [#50339](https://github.com/ClickHouse/ClickHouse/pull/50339) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fix bitShift* functions with both constant arguments [#50343](https://github.com/ClickHouse/ClickHouse/pull/50343) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix Keeper deadlock on exception when preprocessing requests. [#50387](https://github.com/ClickHouse/ClickHouse/pull/50387) ([frinkr](https://github.com/frinkr)). +* Fix hashing of const integer values [#50421](https://github.com/ClickHouse/ClickHouse/pull/50421) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix merge_tree_min_rows_for_seek/merge_tree_min_bytes_for_seek for data skipping indexes [#50432](https://github.com/ClickHouse/ClickHouse/pull/50432) ([Azat Khuzhin](https://github.com/azat)). +* Limit the number of in-flight tasks for loading outdated parts [#50450](https://github.com/ClickHouse/ClickHouse/pull/50450) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Keeper fix: apply uncommitted state after snapshot install [#50483](https://github.com/ClickHouse/ClickHouse/pull/50483) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix incorrect constant folding [#50536](https://github.com/ClickHouse/ClickHouse/pull/50536) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix logical error in stress test (Not enough space to add ...) [#50583](https://github.com/ClickHouse/ClickHouse/pull/50583) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix converting Null to LowCardinality(Nullable) in values table function [#50637](https://github.com/ClickHouse/ClickHouse/pull/50637) ([Kruglov Pavel](https://github.com/Avogar)). +* Revert invalid RegExpTreeDictionary optimization [#50642](https://github.com/ClickHouse/ClickHouse/pull/50642) ([Johann Gan](https://github.com/johanngan)). + +### ClickHouse release 23.4, 2023-04-26 {#234} + +#### Backward Incompatible Change +* Formatter '%M' in function formatDateTime() now prints the month name instead of the minutes. This makes the behavior consistent with MySQL. The previous behavior can be restored using setting "formatdatetime_parsedatetime_m_is_month_name = 0". [#47246](https://github.com/ClickHouse/ClickHouse/pull/47246) ([Robert Schulze](https://github.com/rschu1ze)). +* This change makes sense only if you are using the virtual filesystem cache. If `path` in the virtual filesystem cache configuration is not empty and is not an absolute path, then it will be put in `/caches/`. [#48784](https://github.com/ClickHouse/ClickHouse/pull/48784) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Primary/secondary indices and sorting keys with identical expressions are now rejected. This behavior can be disabled using setting `allow_suspicious_indices`. [#48536](https://github.com/ClickHouse/ClickHouse/pull/48536) ([凌涛](https://github.com/lingtaolf)). + +#### New Feature +* Support new aggregate function `quantileGK`/`quantilesGK`, like [approx_percentile](https://spark.apache.org/docs/latest/api/sql/index.html#approx_percentile) in spark. Greenwald-Khanna algorithm refer to http://infolab.stanford.edu/~datar/courses/cs361a/papers/quantiles.pdf. [#46428](https://github.com/ClickHouse/ClickHouse/pull/46428) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Add a statement `SHOW COLUMNS` which shows distilled information from system.columns. [#48017](https://github.com/ClickHouse/ClickHouse/pull/48017) ([Robert Schulze](https://github.com/rschu1ze)). +* Added `LIGHTWEIGHT` and `PULL` modifiers for `SYSTEM SYNC REPLICA` query. `LIGHTWEIGHT` version waits for fetches and drop-ranges only (merges and mutations are ignored). `PULL` version pulls new entries from ZooKeeper and does not wait for them. Fixes [#47794](https://github.com/ClickHouse/ClickHouse/issues/47794). [#48085](https://github.com/ClickHouse/ClickHouse/pull/48085) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Add `kafkaMurmurHash` function for compatibility with Kafka DefaultPartitioner. Closes [#47834](https://github.com/ClickHouse/ClickHouse/issues/47834). [#48185](https://github.com/ClickHouse/ClickHouse/pull/48185) ([Nikolay Degterinsky](https://github.com/evillique)). +* Allow to easily create a user with the same grants as the current user by using `GRANT CURRENT GRANTS`. [#48262](https://github.com/ClickHouse/ClickHouse/pull/48262) ([pufit](https://github.com/pufit)). +* Add statistical aggregate function `kolmogorovSmirnovTest`. Close [#48228](https://github.com/ClickHouse/ClickHouse/issues/48228). [#48325](https://github.com/ClickHouse/ClickHouse/pull/48325) ([FFFFFFFHHHHHHH](https://github.com/FFFFFFFHHHHHHH)). +* Added a `lost_part_count` column to the `system.replicas` table. The column value shows the total number of lost parts in the corresponding table. Value is stored in zookeeper and can be used instead of not persistent `ReplicatedDataLoss` profile event for monitoring. [#48526](https://github.com/ClickHouse/ClickHouse/pull/48526) ([Sergei Trifonov](https://github.com/serxa)). +* Add `soundex` function for compatibility. Closes [#39880](https://github.com/ClickHouse/ClickHouse/issues/39880). [#48567](https://github.com/ClickHouse/ClickHouse/pull/48567) ([FriendLey](https://github.com/FriendLey)). +* Support `Map` type for JSONExtract. [#48629](https://github.com/ClickHouse/ClickHouse/pull/48629) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Add `PrettyJSONEachRow` format to output pretty JSON with new line delimiters and 4 space indents. [#48898](https://github.com/ClickHouse/ClickHouse/pull/48898) ([Kruglov Pavel](https://github.com/Avogar)). +* Add `ParquetMetadata` input format to read Parquet file metadata. [#48911](https://github.com/ClickHouse/ClickHouse/pull/48911) ([Kruglov Pavel](https://github.com/Avogar)). +* Add `extractKeyValuePairs` function to extract key value pairs from strings. Input strings might contain noise (i.e. log files / do not need to be 100% formatted in key-value-pair format), the algorithm will look for key value pairs matching the arguments passed to the function. As of now, function accepts the following arguments: `data_column` (mandatory), `key_value_pair_delimiter` (defaults to `:`), `pair_delimiters` (defaults to `\space \, \;`) and `quoting_character` (defaults to double quotes). [#43606](https://github.com/ClickHouse/ClickHouse/pull/43606) ([Arthur Passos](https://github.com/arthurpassos)). +* Functions replaceOne(), replaceAll(), replaceRegexpOne() and replaceRegexpAll() can now be called with non-const pattern and replacement arguments. [#46589](https://github.com/ClickHouse/ClickHouse/pull/46589) ([Robert Schulze](https://github.com/rschu1ze)). +* Added functions to work with columns of type `Map`: `mapConcat`, `mapSort`, `mapExists`. [#48071](https://github.com/ClickHouse/ClickHouse/pull/48071) ([Anton Popov](https://github.com/CurtizJ)). + +#### Performance Improvement +* Reading files in `Parquet` format is now much faster. IO and decoding are parallelized (controlled by `max_threads` setting), and only required data ranges are read. [#47964](https://github.com/ClickHouse/ClickHouse/pull/47964) ([Michael Kolupaev](https://github.com/al13n321)). +* If we run a mutation with IN (subquery) like this: `ALTER TABLE t UPDATE col='new value' WHERE id IN (SELECT id FROM huge_table)` and the table `t` has multiple parts than for each part a set for subquery `SELECT id FROM huge_table` is built in memory. And if there are many parts then this might consume a lot of memory (and lead to an OOM) and CPU. The solution is to introduce a short-lived cache of sets that are currently being built by mutation tasks. If another task of the same mutation is executed concurrently it can look up the set in the cache, wait for it to be built and reuse it. [#46835](https://github.com/ClickHouse/ClickHouse/pull/46835) ([Alexander Gololobov](https://github.com/davenger)). +* Only check dependencies if necessary when applying `ALTER TABLE` queries. [#48062](https://github.com/ClickHouse/ClickHouse/pull/48062) ([Raúl Marín](https://github.com/Algunenano)). +* Optimize function `mapUpdate`. [#48118](https://github.com/ClickHouse/ClickHouse/pull/48118) ([Anton Popov](https://github.com/CurtizJ)). +* Now an internal query to local replica is sent explicitly and data from it received through loopback interface. Setting `prefer_localhost_replica` is not respected for parallel replicas. This is needed for better scheduling and makes the code cleaner: the initiator is only responsible for coordinating of the reading process and merging results, continuously answering for requests while all the secondary queries read the data. Note: Using loopback interface is not so performant, otherwise some replicas could starve for tasks which could lead to even slower query execution and not utilizing all possible resources. The initialization of the coordinator is now even more lazy. All incoming requests contain the information about the reading algorithm we initialize the coordinator with it when first request comes. If any replica decides to read with a different algorithm–an exception will be thrown and a query will be aborted. [#48246](https://github.com/ClickHouse/ClickHouse/pull/48246) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Do not build set for the right side of `IN` clause with subquery when it is used only for analysis of skip indexes, and they are disabled by setting (`use_skip_indexes=0`). Previously it might affect the performance of queries. [#48299](https://github.com/ClickHouse/ClickHouse/pull/48299) ([Anton Popov](https://github.com/CurtizJ)). +* Query processing is parallelized right after reading `FROM file(...)`. Related to [#38755](https://github.com/ClickHouse/ClickHouse/issues/38755). [#48525](https://github.com/ClickHouse/ClickHouse/pull/48525) ([Igor Nikonov](https://github.com/devcrafter)). Query processing is parallelized right after reading from any data source. Affected data sources are mostly simple or external storages like table functions `url`, `file`. [#48727](https://github.com/ClickHouse/ClickHouse/pull/48727) ([Igor Nikonov](https://github.com/devcrafter)). This is controlled by the setting `parallelize_output_from_storages` which is not enabled by default. +* Lowered contention of ThreadPool mutex (may increase performance for a huge amount of small jobs). [#48750](https://github.com/ClickHouse/ClickHouse/pull/48750) ([Sergei Trifonov](https://github.com/serxa)). +* Reduce memory usage for multiple `ALTER DELETE` mutations. [#48522](https://github.com/ClickHouse/ClickHouse/pull/48522) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Remove the excessive connection attempts if the `skip_unavailable_shards` setting is enabled. [#48771](https://github.com/ClickHouse/ClickHouse/pull/48771) ([Azat Khuzhin](https://github.com/azat)). + +#### Experimental Feature +* Entries in the query cache are now squashed to max_block_size and compressed. [#45912](https://github.com/ClickHouse/ClickHouse/pull/45912) ([Robert Schulze](https://github.com/rschu1ze)). +* It is now possible to define per-user quotas in the query cache. [#48284](https://github.com/ClickHouse/ClickHouse/pull/48284) ([Robert Schulze](https://github.com/rschu1ze)). +* Some fixes for parallel replicas [#48433](https://github.com/ClickHouse/ClickHouse/pull/48433) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Implement zero-copy-replication (an experimental feature) on encrypted disks. [#48741](https://github.com/ClickHouse/ClickHouse/pull/48741) ([Vitaly Baranov](https://github.com/vitlibar)). + +#### Improvement +* Increase default value for `connect_timeout_with_failover_ms` to 1000 ms (because of adding async connections in https://github.com/ClickHouse/ClickHouse/pull/47229) . Closes [#5188](https://github.com/ClickHouse/ClickHouse/issues/5188). [#49009](https://github.com/ClickHouse/ClickHouse/pull/49009) ([Kruglov Pavel](https://github.com/Avogar)). +* Several improvements around data lakes: - Make `Iceberg` work with non-partitioned data. - Support `Iceberg` format version v2 (previously only v1 was supported) - Support reading partitioned data for `DeltaLake`/`Hudi` - Faster reading of `DeltaLake` metadata by using Delta's checkpoint files - Fixed incorrect `Hudi` reads: previously it incorrectly chose which data to read and therefore was able to read correctly only small size tables - Made these engines to pickup updates of changed data (previously the state was set on table creation) - Make proper testing for `Iceberg`/`DeltaLake`/`Hudi` using spark. [#47307](https://github.com/ClickHouse/ClickHouse/pull/47307) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add async connection to socket and async writing to socket. Make creating connections and sending query/external tables async across shards. Refactor code with fibers. Closes [#46931](https://github.com/ClickHouse/ClickHouse/issues/46931). We will be able to increase `connect_timeout_with_failover_ms` by default after this PR (https://github.com/ClickHouse/ClickHouse/issues/5188). [#47229](https://github.com/ClickHouse/ClickHouse/pull/47229) ([Kruglov Pavel](https://github.com/Avogar)). +* Support config sections `keeper`/`keeper_server` as an alternative to `zookeeper`. Close [#34766](https://github.com/ClickHouse/ClickHouse/issues/34766) , [#34767](https://github.com/ClickHouse/ClickHouse/issues/34767). [#35113](https://github.com/ClickHouse/ClickHouse/pull/35113) ([æŽæ‰¬](https://github.com/taiyang-li)). +* It is possible to set _secure_ flag in named_collections for a dictionary with a ClickHouse table source. Addresses [#38450](https://github.com/ClickHouse/ClickHouse/issues/38450) . [#46323](https://github.com/ClickHouse/ClickHouse/pull/46323) ([Ilya Golshtein](https://github.com/ilejn)). +* `bitCount` function support `FixedString` and `String` data type. [#49044](https://github.com/ClickHouse/ClickHouse/pull/49044) ([flynn](https://github.com/ucasfl)). +* Added configurable retries for all operations with [Zoo]Keeper for Backup queries. [#47224](https://github.com/ClickHouse/ClickHouse/pull/47224) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Enable `use_environment_credentials` for S3 by default, so the entire provider chain is constructed by default. [#47397](https://github.com/ClickHouse/ClickHouse/pull/47397) ([Antonio Andelic](https://github.com/antonio2368)). +* Currently, the JSON_VALUE function is similar as spark's get_json_object function, which support to get value from JSON string by a path like '$.key'. But still has something different - 1. in spark's get_json_object will return null while the path is not exist, but in JSON_VALUE will return empty string; - 2. in spark's get_json_object will return a complex type value, such as a JSON object/array value, but in JSON_VALUE will return empty string. [#47494](https://github.com/ClickHouse/ClickHouse/pull/47494) ([KevinyhZou](https://github.com/KevinyhZou)). +* For `use_structure_from_insertion_table_in_table_functions` more flexible insert table structure propagation to table function. Fixed an issue with name mapping and using virtual columns. No more need for 'auto' setting. [#47962](https://github.com/ClickHouse/ClickHouse/pull/47962) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Do not continue retrying to connect to Keeper if the query is killed or over limits. [#47985](https://github.com/ClickHouse/ClickHouse/pull/47985) ([Raúl Marín](https://github.com/Algunenano)). +* Support Enum output/input in `BSONEachRow`, allow all map key types and avoid extra calculations on output. [#48122](https://github.com/ClickHouse/ClickHouse/pull/48122) ([Kruglov Pavel](https://github.com/Avogar)). +* Support more ClickHouse types in `ORC`/`Arrow`/`Parquet` formats: Enum(8|16), (U)Int(128|256), Decimal256 (for ORC), allow reading IPv4 from Int32 values (ORC outputs IPv4 as Int32, and we couldn't read it back), fix reading Nullable(IPv6) from binary data for `ORC`. [#48126](https://github.com/ClickHouse/ClickHouse/pull/48126) ([Kruglov Pavel](https://github.com/Avogar)). +* Add columns `perform_ttl_move_on_insert`, `load_balancing` for table `system.storage_policies`, modify column `volume_type` type to `Enum8`. [#48167](https://github.com/ClickHouse/ClickHouse/pull/48167) ([lizhuoyu5](https://github.com/lzydmxy)). +* Added support for `BACKUP ALL` command which backups all tables and databases, including temporary and system ones. [#48189](https://github.com/ClickHouse/ClickHouse/pull/48189) ([Vitaly Baranov](https://github.com/vitlibar)). +* Function mapFromArrays supports `Map` type as an input. [#48207](https://github.com/ClickHouse/ClickHouse/pull/48207) ([æŽæ‰¬](https://github.com/taiyang-li)). +* The output of some SHOW PROCESSLIST is now sorted. [#48241](https://github.com/ClickHouse/ClickHouse/pull/48241) ([Robert Schulze](https://github.com/rschu1ze)). +* Per-query/per-server throttling for remote IO/local IO/BACKUPs (server settings: `max_remote_read_network_bandwidth_for_server`, `max_remote_write_network_bandwidth_for_server`, `max_local_read_bandwidth_for_server`, `max_local_write_bandwidth_for_server`, `max_backup_bandwidth_for_server`, settings: `max_remote_read_network_bandwidth`, `max_remote_write_network_bandwidth`, `max_local_read_bandwidth`, `max_local_write_bandwidth`, `max_backup_bandwidth`). [#48242](https://github.com/ClickHouse/ClickHouse/pull/48242) ([Azat Khuzhin](https://github.com/azat)). +* Support more types in `CapnProto` format: Map, (U)Int(128|256), Decimal(128|256). Allow integer conversions during input/output. [#48257](https://github.com/ClickHouse/ClickHouse/pull/48257) ([Kruglov Pavel](https://github.com/Avogar)). +* Don't throw CURRENT_WRITE_BUFFER_IS_EXHAUSTED for normal behaviour. [#48288](https://github.com/ClickHouse/ClickHouse/pull/48288) ([Raúl Marín](https://github.com/Algunenano)). +* Add new setting `keeper_map_strict_mode` which enforces extra guarantees on operations made on top of `KeeperMap` tables. [#48293](https://github.com/ClickHouse/ClickHouse/pull/48293) ([Antonio Andelic](https://github.com/antonio2368)). +* Check primary key type for simple dictionary is native unsigned integer type Add setting `check_dictionary_primary_key ` for compatibility(set `check_dictionary_primary_key =false` to disable checking). [#48335](https://github.com/ClickHouse/ClickHouse/pull/48335) ([lizhuoyu5](https://github.com/lzydmxy)). +* Don't replicate mutations for `KeeperMap` because it's unnecessary. [#48354](https://github.com/ClickHouse/ClickHouse/pull/48354) ([Antonio Andelic](https://github.com/antonio2368)). +* Allow to write/read unnamed tuple as nested Message in Protobuf format. Tuple elements and Message fields are matched by position. [#48390](https://github.com/ClickHouse/ClickHouse/pull/48390) ([Kruglov Pavel](https://github.com/Avogar)). +* Support `additional_table_filters` and `additional_result_filter` settings in the new planner. Also, add a documentation entry for `additional_result_filter`. [#48405](https://github.com/ClickHouse/ClickHouse/pull/48405) ([Dmitry Novik](https://github.com/novikd)). +* `parseDateTime` now understands format string '%f' (fractional seconds). [#48420](https://github.com/ClickHouse/ClickHouse/pull/48420) ([Robert Schulze](https://github.com/rschu1ze)). +* Format string "%f" in formatDateTime() now prints "000000" if the formatted value has no fractional seconds, the previous behavior (single zero) can be restored using setting "formatdatetime_f_prints_single_zero = 1". [#48422](https://github.com/ClickHouse/ClickHouse/pull/48422) ([Robert Schulze](https://github.com/rschu1ze)). +* Don't replicate DELETE and TRUNCATE for KeeperMap. [#48434](https://github.com/ClickHouse/ClickHouse/pull/48434) ([Antonio Andelic](https://github.com/antonio2368)). +* Generate valid Decimals and Bools in generateRandom function. [#48436](https://github.com/ClickHouse/ClickHouse/pull/48436) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow trailing commas in expression list of SELECT query, for example `SELECT a, b, c, FROM table`. Closes [#37802](https://github.com/ClickHouse/ClickHouse/issues/37802). [#48438](https://github.com/ClickHouse/ClickHouse/pull/48438) ([Nikolay Degterinsky](https://github.com/evillique)). +* Override `CLICKHOUSE_USER` and `CLICKHOUSE_PASSWORD` environment variables with `--user` and `--password` client parameters. Closes [#38909](https://github.com/ClickHouse/ClickHouse/issues/38909). [#48440](https://github.com/ClickHouse/ClickHouse/pull/48440) ([Nikolay Degterinsky](https://github.com/evillique)). +* Added retries to loading of data parts in `MergeTree` tables in case of retryable errors. [#48442](https://github.com/ClickHouse/ClickHouse/pull/48442) ([Anton Popov](https://github.com/CurtizJ)). +* Add support for `Date`, `Date32`, `DateTime`, `DateTime64` data types to `arrayMin`, `arrayMax`, `arrayDifference` functions. Closes [#21645](https://github.com/ClickHouse/ClickHouse/issues/21645). [#48445](https://github.com/ClickHouse/ClickHouse/pull/48445) ([Nikolay Degterinsky](https://github.com/evillique)). +* Add support for `{server_uuid}` macro. It is useful for identifying replicas in autoscaled clusters when new replicas are constantly added and removed in runtime. This closes [#48554](https://github.com/ClickHouse/ClickHouse/issues/48554). [#48563](https://github.com/ClickHouse/ClickHouse/pull/48563) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The installation script will create a hard link instead of copying if it is possible. [#48578](https://github.com/ClickHouse/ClickHouse/pull/48578) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Support `SHOW TABLE` syntax meaning the same as `SHOW CREATE TABLE`. Closes [#48580](https://github.com/ClickHouse/ClickHouse/issues/48580). [#48591](https://github.com/ClickHouse/ClickHouse/pull/48591) ([flynn](https://github.com/ucasfl)). +* HTTP temporary buffers now support working by evicting data from the virtual filesystem cache. [#48664](https://github.com/ClickHouse/ClickHouse/pull/48664) ([Vladimir C](https://github.com/vdimir)). +* Make Schema inference works for `CREATE AS SELECT`. Closes [#47599](https://github.com/ClickHouse/ClickHouse/issues/47599). [#48679](https://github.com/ClickHouse/ClickHouse/pull/48679) ([flynn](https://github.com/ucasfl)). +* Added a `replicated_max_mutations_in_one_entry` setting for `ReplicatedMergeTree` that allows limiting the number of mutation commands per one `MUTATE_PART` entry (default is 10000). [#48731](https://github.com/ClickHouse/ClickHouse/pull/48731) ([Alexander Tokmakov](https://github.com/tavplubix)). +* In AggregateFunction types, don't count unused arena bytes as `read_bytes`. [#48745](https://github.com/ClickHouse/ClickHouse/pull/48745) ([Raúl Marín](https://github.com/Algunenano)). +* Fix some MySQL-related settings not being handled with the MySQL dictionary source + named collection. Closes [#48402](https://github.com/ClickHouse/ClickHouse/issues/48402). [#48759](https://github.com/ClickHouse/ClickHouse/pull/48759) ([Kseniia Sumarokova](https://github.com/kssenii)). +* If a user set `max_single_part_upload_size` to a very large value, it can lead to a crash due to a bug in the AWS S3 SDK. This fixes [#47679](https://github.com/ClickHouse/ClickHouse/issues/47679). [#48816](https://github.com/ClickHouse/ClickHouse/pull/48816) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix data race in `RabbitMQ` ([report](https://pastila.nl/?004f7100/de1505289ab5bb355e67ebe6c7cc8707)), refactor the code. [#48845](https://github.com/ClickHouse/ClickHouse/pull/48845) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add aliases `name` and `part_name` form `system.parts` and `system.part_log`. Closes [#48718](https://github.com/ClickHouse/ClickHouse/issues/48718). [#48850](https://github.com/ClickHouse/ClickHouse/pull/48850) ([sichenzhao](https://github.com/sichenzhao)). +* Functions "arrayDifferenceSupport()", "arrayCumSum()" and "arrayCumSumNonNegative()" now support input arrays of wide integer types (U)Int128/256. [#48866](https://github.com/ClickHouse/ClickHouse/pull/48866) ([cluster](https://github.com/infdahai)). +* Multi-line history in clickhouse-client is now no longer padded. This makes pasting more natural. [#48870](https://github.com/ClickHouse/ClickHouse/pull/48870) ([Joanna Hulboj](https://github.com/jh0x)). +* Implement a slight improvement for the rare case when ClickHouse is run inside LXC and LXCFS is used. The LXCFS has an issue: sometimes it returns an error "Transport endpoint is not connected" on reading from the file inside `/proc`. This error was correctly logged into ClickHouse's server log. We have additionally workaround this issue by reopening a file. This is a minuscule change. [#48922](https://github.com/ClickHouse/ClickHouse/pull/48922) ([Real](https://github.com/RunningXie)). +* Improve memory accounting for prefetches. Randomise prefetch settings In CI. [#48973](https://github.com/ClickHouse/ClickHouse/pull/48973) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Correctly set headers for native copy operations on GCS. [#48981](https://github.com/ClickHouse/ClickHouse/pull/48981) ([Antonio Andelic](https://github.com/antonio2368)). +* Add support for specifying setting names in the command line with dashes instead of underscores, for example, `--max-threads` instead of `--max_threads`. Additionally, support Unicode dash characters like `—` instead of `--` - this is useful when you communicate with a team in another company, and a manager from that team copy-pasted code from MS Word. [#48985](https://github.com/ClickHouse/ClickHouse/pull/48985) ([alekseygolub](https://github.com/alekseygolub)). +* Add fallback to password authentication when authentication with SSL user certificate has failed. Closes [#48974](https://github.com/ClickHouse/ClickHouse/issues/48974). [#48989](https://github.com/ClickHouse/ClickHouse/pull/48989) ([Nikolay Degterinsky](https://github.com/evillique)). +* Improve the embedded dashboard. Close [#46671](https://github.com/ClickHouse/ClickHouse/issues/46671). [#49036](https://github.com/ClickHouse/ClickHouse/pull/49036) ([Kevin Zhang](https://github.com/Kinzeng)). +* Add profile events for log messages, so you can easily see the count of log messages by severity. [#49042](https://github.com/ClickHouse/ClickHouse/pull/49042) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* In previous versions, the `LineAsString` format worked inconsistently when the parallel parsing was enabled or not, in presence of DOS or macOS Classic line breaks. This closes [#49039](https://github.com/ClickHouse/ClickHouse/issues/49039). [#49052](https://github.com/ClickHouse/ClickHouse/pull/49052) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The exception message about the unparsed query parameter will also tell about the name of the parameter. Reimplement [#48878](https://github.com/ClickHouse/ClickHouse/issues/48878). Close [#48772](https://github.com/ClickHouse/ClickHouse/issues/48772). [#49061](https://github.com/ClickHouse/ClickHouse/pull/49061) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### Build/Testing/Packaging Improvement +* Update time zones. The following were updated: Africa/Cairo, Africa/Casablanca, Africa/El_Aaiun, America/Bogota, America/Cambridge_Bay, America/Ciudad_Juarez, America/Godthab, America/Inuvik, America/Iqaluit, America/Nuuk, America/Ojinaga, America/Pangnirtung, America/Rankin_Inlet, America/Resolute, America/Whitehorse, America/Yellowknife, Asia/Gaza, Asia/Hebron, Asia/Kuala_Lumpur, Asia/Singapore, Canada/Yukon, Egypt, Europe/Kirov, Europe/Volgograd, Singapore. [#48572](https://github.com/ClickHouse/ClickHouse/pull/48572) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Reduce the number of dependencies in the header files to speed up the build. [#47984](https://github.com/ClickHouse/ClickHouse/pull/47984) ([Dmitry Novik](https://github.com/novikd)). +* Randomize compression of marks and indices in tests. [#48286](https://github.com/ClickHouse/ClickHouse/pull/48286) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Bump internal ZSTD from 1.5.4 to 1.5.5. [#46797](https://github.com/ClickHouse/ClickHouse/pull/46797) ([Robert Schulze](https://github.com/rschu1ze)). +* Randomize vertical merges from compact to wide parts in tests. [#48287](https://github.com/ClickHouse/ClickHouse/pull/48287) ([Raúl Marín](https://github.com/Algunenano)). +* Support for CRC32 checksum in HDFS. Fix performance issues. [#48614](https://github.com/ClickHouse/ClickHouse/pull/48614) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Remove remainders of GCC support. [#48671](https://github.com/ClickHouse/ClickHouse/pull/48671) ([Robert Schulze](https://github.com/rschu1ze)). +* Add CI run with new analyzer infrastructure enabled. [#48719](https://github.com/ClickHouse/ClickHouse/pull/48719) ([Dmitry Novik](https://github.com/novikd)). + +#### Bug Fix (user-visible misbehavior in an official stable release) + +* Fix system.query_views_log for MVs that are pushed from background threads [#46668](https://github.com/ClickHouse/ClickHouse/pull/46668) ([Azat Khuzhin](https://github.com/azat)). +* Fix several `RENAME COLUMN` bugs [#46946](https://github.com/ClickHouse/ClickHouse/pull/46946) ([alesapin](https://github.com/alesapin)). +* Fix minor hiliting issues in clickhouse-format [#47610](https://github.com/ClickHouse/ClickHouse/pull/47610) ([Natasha Murashkina](https://github.com/murfel)). +* Fix a bug in LLVM's libc++ leading to a crash for uploading parts to S3 which size is greater than INT_MAX [#47693](https://github.com/ClickHouse/ClickHouse/pull/47693) ([Azat Khuzhin](https://github.com/azat)). +* Fix overflow in the `sparkbar` function [#48121](https://github.com/ClickHouse/ClickHouse/pull/48121) ([Vladimir C](https://github.com/vdimir)). +* Fix race in S3 [#48190](https://github.com/ClickHouse/ClickHouse/pull/48190) ([Anton Popov](https://github.com/CurtizJ)). +* Disable JIT for aggregate functions due to inconsistent behavior [#48195](https://github.com/ClickHouse/ClickHouse/pull/48195) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix alter formatting (minor) [#48289](https://github.com/ClickHouse/ClickHouse/pull/48289) ([Natasha Murashkina](https://github.com/murfel)). +* Fix CPU usage in RabbitMQ (was worsened in 23.2 after [#44404](https://github.com/ClickHouse/ClickHouse/issues/44404)) [#48311](https://github.com/ClickHouse/ClickHouse/pull/48311) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix crash in EXPLAIN PIPELINE for Merge over Distributed [#48320](https://github.com/ClickHouse/ClickHouse/pull/48320) ([Azat Khuzhin](https://github.com/azat)). +* Fix serializing LowCardinality as Arrow dictionary [#48361](https://github.com/ClickHouse/ClickHouse/pull/48361) ([Kruglov Pavel](https://github.com/Avogar)). +* Reset downloader for cache file segment in TemporaryFileStream [#48386](https://github.com/ClickHouse/ClickHouse/pull/48386) ([Vladimir C](https://github.com/vdimir)). +* Fix possible SYSTEM SYNC REPLICA stuck in case of DROP/REPLACE PARTITION [#48391](https://github.com/ClickHouse/ClickHouse/pull/48391) ([Azat Khuzhin](https://github.com/azat)). +* Fix a startup error when loading a distributed table that depends on a dictionary [#48419](https://github.com/ClickHouse/ClickHouse/pull/48419) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* Don't check dependencies when renaming system tables automatically [#48431](https://github.com/ClickHouse/ClickHouse/pull/48431) ([Raúl Marín](https://github.com/Algunenano)). +* Update only affected rows in KeeperMap storage [#48435](https://github.com/ClickHouse/ClickHouse/pull/48435) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix possible segfault in the VFS cache [#48469](https://github.com/ClickHouse/ClickHouse/pull/48469) ([Kseniia Sumarokova](https://github.com/kssenii)). +* `toTimeZone` function throws an error when no constant string is provided [#48471](https://github.com/ClickHouse/ClickHouse/pull/48471) ([Jordi Villar](https://github.com/jrdi)). +* Fix logical error with IPv4 in Protobuf, add support for Date32 [#48486](https://github.com/ClickHouse/ClickHouse/pull/48486) ([Kruglov Pavel](https://github.com/Avogar)). +* "changed" flag in system.settings was calculated incorrectly for settings with multiple values [#48516](https://github.com/ClickHouse/ClickHouse/pull/48516) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* Fix storage `Memory` with enabled compression [#48517](https://github.com/ClickHouse/ClickHouse/pull/48517) ([Anton Popov](https://github.com/CurtizJ)). +* Fix bracketed-paste mode messing up password input in the event of client reconnection [#48528](https://github.com/ClickHouse/ClickHouse/pull/48528) ([Michael Kolupaev](https://github.com/al13n321)). +* Fix nested map for keys of IP and UUID types [#48556](https://github.com/ClickHouse/ClickHouse/pull/48556) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix an uncaught exception in case of parallel loader for hashed dictionaries [#48571](https://github.com/ClickHouse/ClickHouse/pull/48571) ([Azat Khuzhin](https://github.com/azat)). +* The `groupArray` aggregate function correctly works for empty result over nullable types [#48593](https://github.com/ClickHouse/ClickHouse/pull/48593) ([lgbo](https://github.com/lgbo-ustc)). +* Fix bug in Keeper when a node is not created with scheme `auth` in ACL sometimes. [#48595](https://github.com/ClickHouse/ClickHouse/pull/48595) ([Aleksei Filatov](https://github.com/aalexfvk)). +* Allow IPv4 comparison operators with UInt [#48611](https://github.com/ClickHouse/ClickHouse/pull/48611) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix possible error from cache [#48636](https://github.com/ClickHouse/ClickHouse/pull/48636) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Async inserts with empty data will no longer throw exception. [#48663](https://github.com/ClickHouse/ClickHouse/pull/48663) ([Anton Popov](https://github.com/CurtizJ)). +* Fix table dependencies in case of failed RENAME TABLE [#48683](https://github.com/ClickHouse/ClickHouse/pull/48683) ([Azat Khuzhin](https://github.com/azat)). +* If the primary key has duplicate columns (which is only possible for projections), in previous versions it might lead to a bug [#48838](https://github.com/ClickHouse/ClickHouse/pull/48838) ([Amos Bird](https://github.com/amosbird)). +* Fix for a race condition in ZooKeeper when joining send_thread/receive_thread [#48849](https://github.com/ClickHouse/ClickHouse/pull/48849) ([Alexander Gololobov](https://github.com/davenger)). +* Fix unexpected part name error when trying to drop a ignored detached part with zero copy replication [#48862](https://github.com/ClickHouse/ClickHouse/pull/48862) ([Michael Lex](https://github.com/mlex)). +* Fix reading `Date32` Parquet/Arrow column into not a `Date32` column [#48864](https://github.com/ClickHouse/ClickHouse/pull/48864) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix `UNKNOWN_IDENTIFIER` error while selecting from table with row policy and column with dots [#48976](https://github.com/ClickHouse/ClickHouse/pull/48976) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix aggregation by empty nullable strings [#48999](https://github.com/ClickHouse/ClickHouse/pull/48999) ([LiuNeng](https://github.com/liuneng1994)). + +### ClickHouse release 23.3 LTS, 2023-03-30 {#233} + +#### Upgrade Notes +* Lightweight DELETEs are production ready and enabled by default. The `DELETE` query for MergeTree tables is now available by default. +* The behavior of `*domain*RFC` and `netloc` functions is slightly changed: relaxed the set of symbols that are allowed in the URL authority for better conformance. [#46841](https://github.com/ClickHouse/ClickHouse/pull/46841) ([Azat Khuzhin](https://github.com/azat)). +* Prohibited creating tables based on KafkaEngine with DEFAULT/EPHEMERAL/ALIAS/MATERIALIZED statements for columns. [#47138](https://github.com/ClickHouse/ClickHouse/pull/47138) ([Aleksandr Musorin](https://github.com/AVMusorin)). +* An "asynchronous connection drain" feature is removed. Related settings and metrics are removed as well. It was an internal feature, so the removal should not affect users who had never heard about that feature. [#47486](https://github.com/ClickHouse/ClickHouse/pull/47486) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Support 256-bit Decimal data type (more than 38 digits) in `arraySum`/`Min`/`Max`/`Avg`/`Product`, `arrayCumSum`/`CumSumNonNegative`, `arrayDifference`, array construction, IN operator, query parameters, `groupArrayMovingSum`, statistical functions, `min`/`max`/`any`/`argMin`/`argMax`, PostgreSQL wire protocol, MySQL table engine and function, `sumMap`, `mapAdd`, `mapSubtract`, `arrayIntersect`. Add support for big integers in `arrayIntersect`. Statistical aggregate functions involving moments (such as `corr` or various `TTest`s) will use `Float64` as their internal representation (they were using `Decimal128` before this change, but it was pointless), and these functions can return `nan` instead of `inf` in case of infinite variance. Some functions were allowed on `Decimal256` data types but returned `Decimal128` in previous versions - now it is fixed. This closes [#47569](https://github.com/ClickHouse/ClickHouse/issues/47569). This closes [#44864](https://github.com/ClickHouse/ClickHouse/issues/44864). This closes [#28335](https://github.com/ClickHouse/ClickHouse/issues/28335). [#47594](https://github.com/ClickHouse/ClickHouse/pull/47594) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Make backup_threads/restore_threads server settings (instead of user settings). [#47881](https://github.com/ClickHouse/ClickHouse/pull/47881) ([Azat Khuzhin](https://github.com/azat)). +* Do not allow const and non-deterministic secondary indices [#46839](https://github.com/ClickHouse/ClickHouse/pull/46839) ([Anton Popov](https://github.com/CurtizJ)). + +#### New Feature +* Add a new mode for splitting the work on replicas using settings `parallel_replicas_custom_key` and `parallel_replicas_custom_key_filter_type`. If the cluster consists of a single shard with multiple replicas, up to `max_parallel_replicas` will be randomly picked and turned into shards. For each shard, a corresponding filter is added to the query on the initiator before being sent to the shard. If the cluster consists of multiple shards, it will behave the same as `sample_key` but with the possibility to define an arbitrary key. [#45108](https://github.com/ClickHouse/ClickHouse/pull/45108) ([Antonio Andelic](https://github.com/antonio2368)). +* An option to display partial result on cancel: Added query setting `partial_result_on_first_cancel` allowing the canceled query (e.g. due to Ctrl-C) to return a partial result. [#45689](https://github.com/ClickHouse/ClickHouse/pull/45689) ([Alexey Perevyshin](https://github.com/alexX512)). +* Added support of arbitrary tables engines for temporary tables (except for Replicated and KeeperMap engines). Close [#31497](https://github.com/ClickHouse/ClickHouse/issues/31497). [#46071](https://github.com/ClickHouse/ClickHouse/pull/46071) ([Roman Vasin](https://github.com/rvasin)). +* Add support for replication of user-defined SQL functions using centralized storage in Keeper. [#46085](https://github.com/ClickHouse/ClickHouse/pull/46085) ([Aleksei Filatov](https://github.com/aalexfvk)). +* Implement `system.server_settings` (similar to `system.settings`), which will contain server configurations. [#46550](https://github.com/ClickHouse/ClickHouse/pull/46550) ([pufit](https://github.com/pufit)). +* Support for `UNDROP TABLE` query. Closes [#46811](https://github.com/ClickHouse/ClickHouse/issues/46811). [#47241](https://github.com/ClickHouse/ClickHouse/pull/47241) ([chen](https://github.com/xiedeyantu)). +* Allow separate grants for named collections (e.g. to be able to give `SHOW/CREATE/ALTER/DROP named collection` access only to certain collections, instead of all at once). Closes [#40894](https://github.com/ClickHouse/ClickHouse/issues/40894). Add new access type `NAMED_COLLECTION_CONTROL` which is not given to user default unless explicitly added to the user config (is required to be able to do `GRANT ALL`), also `show_named_collections` is no longer obligatory to be manually specified for user default to be able to have full access rights as was in 23.2. [#46241](https://github.com/ClickHouse/ClickHouse/pull/46241) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Allow nested custom disks. Previously custom disks supported only flat disk structure. [#47106](https://github.com/ClickHouse/ClickHouse/pull/47106) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Introduce a function `widthBucket` (with a `WIDTH_BUCKET` alias for compatibility). [#42974](https://github.com/ClickHouse/ClickHouse/issues/42974). [#46790](https://github.com/ClickHouse/ClickHouse/pull/46790) ([avoiderboi](https://github.com/avoiderboi)). +* Add new function `parseDateTime`/`parseDateTimeInJodaSyntax` according to the specified format string. parseDateTime parses String to DateTime in MySQL syntax, parseDateTimeInJodaSyntax parses in Joda syntax. [#46815](https://github.com/ClickHouse/ClickHouse/pull/46815) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Use `dummy UInt8` for the default structure of table function `null`. Closes [#46930](https://github.com/ClickHouse/ClickHouse/issues/46930). [#47006](https://github.com/ClickHouse/ClickHouse/pull/47006) ([flynn](https://github.com/ucasfl)). +* Support for date format with a comma, like `Dec 15, 2021` in the `parseDateTimeBestEffort` function. Closes [#46816](https://github.com/ClickHouse/ClickHouse/issues/46816). [#47071](https://github.com/ClickHouse/ClickHouse/pull/47071) ([chen](https://github.com/xiedeyantu)). +* Add settings `http_wait_end_of_query` and `http_response_buffer_size` that corresponds to URL params `wait_end_of_query` and `buffer_size` for the HTTP interface. This allows changing these settings in the profiles. [#47108](https://github.com/ClickHouse/ClickHouse/pull/47108) ([Vladimir C](https://github.com/vdimir)). +* Add `system.dropped_tables` table that shows tables that were dropped from `Atomic` databases but were not completely removed yet. [#47364](https://github.com/ClickHouse/ClickHouse/pull/47364) ([chen](https://github.com/xiedeyantu)). +* Add `INSTR` as alias of `positionCaseInsensitive` for MySQL compatibility. Closes [#47529](https://github.com/ClickHouse/ClickHouse/issues/47529). [#47535](https://github.com/ClickHouse/ClickHouse/pull/47535) ([flynn](https://github.com/ucasfl)). +* Added `toDecimalString` function allowing to convert numbers to string with fixed precision. [#47838](https://github.com/ClickHouse/ClickHouse/pull/47838) ([Andrey Zvonov](https://github.com/zvonand)). +* Add a merge tree setting `max_number_of_mutations_for_replica`. It limits the number of part mutations per replica to the specified amount. Zero means no limit on the number of mutations per replica (the execution can still be constrained by other settings). [#48047](https://github.com/ClickHouse/ClickHouse/pull/48047) ([Vladimir C](https://github.com/vdimir)). +* Add the Map-related function `mapFromArrays`, which allows the creation of a map from a pair of arrays. [#31125](https://github.com/ClickHouse/ClickHouse/pull/31125) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Allow control of compression in Parquet/ORC/Arrow output formats, adds support for more compression input formats. This closes [#13541](https://github.com/ClickHouse/ClickHouse/issues/13541). [#47114](https://github.com/ClickHouse/ClickHouse/pull/47114) ([Kruglov Pavel](https://github.com/Avogar)). +* Add SSL User Certificate authentication to the native protocol. Closes [#47077](https://github.com/ClickHouse/ClickHouse/issues/47077). [#47596](https://github.com/ClickHouse/ClickHouse/pull/47596) ([Nikolay Degterinsky](https://github.com/evillique)). +* Add *OrNull() and *OrZero() variants for `parseDateTime`, add alias `str_to_date` for MySQL parity. [#48000](https://github.com/ClickHouse/ClickHouse/pull/48000) ([Robert Schulze](https://github.com/rschu1ze)). +* Added operator `REGEXP` (similar to operators "LIKE", "IN", "MOD" etc.) for better compatibility with MySQL [#47869](https://github.com/ClickHouse/ClickHouse/pull/47869) ([Robert Schulze](https://github.com/rschu1ze)). + +#### Performance Improvement +* Marks in memory are now compressed, using 3-6x less memory. [#47290](https://github.com/ClickHouse/ClickHouse/pull/47290) ([Michael Kolupaev](https://github.com/al13n321)). +* Backups for large numbers of files were unbelievably slow in previous versions. Not anymore. Now they are unbelievably fast. [#47251](https://github.com/ClickHouse/ClickHouse/pull/47251) ([Alexey Milovidov](https://github.com/alexey-milovidov)). Introduced a separate thread pool for backup's IO operations. This will allow scaling it independently of other pools and increase performance. [#47174](https://github.com/ClickHouse/ClickHouse/pull/47174) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). Use MultiRead request and retries for collecting metadata at the final stage of backup processing. [#47243](https://github.com/ClickHouse/ClickHouse/pull/47243) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). If a backup and restoring data are both in S3 then server-side copy should be used from now on. [#47546](https://github.com/ClickHouse/ClickHouse/pull/47546) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed excessive reading in queries with `FINAL`. [#47801](https://github.com/ClickHouse/ClickHouse/pull/47801) ([Nikita Taranov](https://github.com/nickitat)). +* Setting `max_final_threads` would be set to the number of cores at server startup (by the same algorithm as used for `max_threads`). This improves the concurrency of `final` execution on servers with high number of CPUs. [#47915](https://github.com/ClickHouse/ClickHouse/pull/47915) ([Nikita Taranov](https://github.com/nickitat)). +* Allow executing reading pipeline for DIRECT dictionary with CLICKHOUSE source in multiple threads. To enable set `dictionary_use_async_executor=1` in `SETTINGS` section for source in `CREATE DICTIONARY` statement. [#47986](https://github.com/ClickHouse/ClickHouse/pull/47986) ([Vladimir C](https://github.com/vdimir)). +* Optimize one nullable key aggregate performance. [#45772](https://github.com/ClickHouse/ClickHouse/pull/45772) ([LiuNeng](https://github.com/liuneng1994)). +* Implemented lowercase `tokenbf_v1` index utilization for `hasTokenOrNull`, `hasTokenCaseInsensitive` and `hasTokenCaseInsensitiveOrNull`. [#46252](https://github.com/ClickHouse/ClickHouse/pull/46252) ([ltrk2](https://github.com/ltrk2)). +* Optimize functions `position` and `LIKE` by searching the first two chars using SIMD. [#46289](https://github.com/ClickHouse/ClickHouse/pull/46289) ([Jiebin Sun](https://github.com/jiebinn)). +* Optimize queries from the `system.detached_parts`, which could be significantly large. Added several sources with respect to the block size limitation; in each block, an IO thread pool is used to calculate the part size, i.e. to make syscalls in parallel. [#46624](https://github.com/ClickHouse/ClickHouse/pull/46624) ([Sema Checherinda](https://github.com/CheSema)). +* Increase the default value of `max_replicated_merges_in_queue` for ReplicatedMergeTree tables from 16 to 1000. It allows faster background merge operation on clusters with a very large number of replicas, such as clusters with shared storage in ClickHouse Cloud. [#47050](https://github.com/ClickHouse/ClickHouse/pull/47050) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Updated `clickhouse-copier` to use `GROUP BY` instead of `DISTINCT` to get the list of partitions. For large tables, this reduced the select time from over 500s to under 1s. [#47386](https://github.com/ClickHouse/ClickHouse/pull/47386) ([Clayton McClure](https://github.com/cmcclure-twilio)). +* Fix performance degradation in `ASOF JOIN`. [#47544](https://github.com/ClickHouse/ClickHouse/pull/47544) ([Ongkong](https://github.com/ongkong)). +* Even more batching in Keeper. Improve performance by avoiding breaking batches on read requests. [#47978](https://github.com/ClickHouse/ClickHouse/pull/47978) ([Antonio Andelic](https://github.com/antonio2368)). +* Allow PREWHERE for Merge with different DEFAULT expressions for columns. [#46831](https://github.com/ClickHouse/ClickHouse/pull/46831) ([Azat Khuzhin](https://github.com/azat)). + +#### Experimental Feature +* Parallel replicas: Improved the overall performance by better utilizing the local replica, and forbid the reading with parallel replicas from non-replicated MergeTree by default. [#47858](https://github.com/ClickHouse/ClickHouse/pull/47858) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Support filter push down to left table for JOIN with `Join`, `Dictionary` and `EmbeddedRocksDB` tables if the experimental Analyzer is enabled. [#47280](https://github.com/ClickHouse/ClickHouse/pull/47280) ([Maksim Kita](https://github.com/kitaisreal)). +* Now ReplicatedMergeTree with zero copy replication has less load to Keeper. [#47676](https://github.com/ClickHouse/ClickHouse/pull/47676) ([alesapin](https://github.com/alesapin)). +* Fix create materialized view with MaterializedPostgreSQL [#40807](https://github.com/ClickHouse/ClickHouse/pull/40807) ([Maksim Buren](https://github.com/maks-buren630501)). + +#### Improvement +* Enable `input_format_json_ignore_unknown_keys_in_named_tuple` by default. [#46742](https://github.com/ClickHouse/ClickHouse/pull/46742) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow errors to be ignored while pushing to MATERIALIZED VIEW (add new setting `materialized_views_ignore_errors`, by default to `false`, but it is set to `true` for flushing logs to `system.*_log` tables unconditionally). [#46658](https://github.com/ClickHouse/ClickHouse/pull/46658) ([Azat Khuzhin](https://github.com/azat)). +* Track the file queue of distributed sends in memory. [#45491](https://github.com/ClickHouse/ClickHouse/pull/45491) ([Azat Khuzhin](https://github.com/azat)). +* Now `X-ClickHouse-Query-Id` and `X-ClickHouse-Timezone` headers are added to responses in all queries via HTTP protocol. Previously it was done only for `SELECT` queries. [#46364](https://github.com/ClickHouse/ClickHouse/pull/46364) ([Anton Popov](https://github.com/CurtizJ)). +* External tables from `MongoDB`: support for connection to a replica set via a URI with a host:port enum and support for the readPreference option in MongoDB dictionaries. Example URI: mongodb://db0.example.com:27017,db1.example.com:27017,db2.example.com:27017/?replicaSet=myRepl&readPreference=primary. [#46524](https://github.com/ClickHouse/ClickHouse/pull/46524) ([artem-yadr](https://github.com/artem-yadr)). +* This improvement should be invisible for users. Re-implement projection analysis on top of query plan. Added setting `query_plan_optimize_projection=1` to switch between old and new version. Fixes [#44963](https://github.com/ClickHouse/ClickHouse/issues/44963). [#46537](https://github.com/ClickHouse/ClickHouse/pull/46537) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Use Parquet format v2 instead of v1 in output format by default. Add setting `output_format_parquet_version` to control parquet version, possible values `1.0`, `2.4`, `2.6`, `2.latest` (default). [#46617](https://github.com/ClickHouse/ClickHouse/pull/46617) ([Kruglov Pavel](https://github.com/Avogar)). +* It is now possible to use the new configuration syntax to configure Kafka topics with periods (`.`) in their name. [#46752](https://github.com/ClickHouse/ClickHouse/pull/46752) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix heuristics that check hyperscan patterns for problematic repeats. [#46819](https://github.com/ClickHouse/ClickHouse/pull/46819) ([Robert Schulze](https://github.com/rschu1ze)). +* Don't report ZK node exists to system.errors when a block was created concurrently by a different replica. [#46820](https://github.com/ClickHouse/ClickHouse/pull/46820) ([Raúl Marín](https://github.com/Algunenano)). +* Increase the limit for opened files in `clickhouse-local`. It will be able to read from `web` tables on servers with a huge number of CPU cores. Do not back off reading from the URL table engine in case of too many opened files. This closes [#46852](https://github.com/ClickHouse/ClickHouse/issues/46852). [#46853](https://github.com/ClickHouse/ClickHouse/pull/46853) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Exceptions thrown when numbers cannot be parsed now have an easier-to-read exception message. [#46917](https://github.com/ClickHouse/ClickHouse/pull/46917) ([Robert Schulze](https://github.com/rschu1ze)). +* Added update `system.backups` after every processed task to track the progress of backups. [#46989](https://github.com/ClickHouse/ClickHouse/pull/46989) ([Aleksandr Musorin](https://github.com/AVMusorin)). +* Allow types conversion in Native input format. Add settings `input_format_native_allow_types_conversion` that controls it (enabled by default). [#46990](https://github.com/ClickHouse/ClickHouse/pull/46990) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow IPv4 in the `range` function to generate IP ranges. [#46995](https://github.com/ClickHouse/ClickHouse/pull/46995) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Improve exception message when it's impossible to move a part from one volume/disk to another. [#47032](https://github.com/ClickHouse/ClickHouse/pull/47032) ([alesapin](https://github.com/alesapin)). +* Support `Bool` type in `JSONType` function. Previously `Null` type was mistakenly returned for bool values. [#47046](https://github.com/ClickHouse/ClickHouse/pull/47046) ([Anton Popov](https://github.com/CurtizJ)). +* Use `_request_body` parameter to configure predefined HTTP queries. [#47086](https://github.com/ClickHouse/ClickHouse/pull/47086) ([Constantine Peresypkin](https://github.com/pkit)). +* Automatic indentation in the built-in UI SQL editor when Enter is pressed. [#47113](https://github.com/ClickHouse/ClickHouse/pull/47113) ([Alexey Korepanov](https://github.com/alexkorep)). +* Self-extraction with 'sudo' will attempt to set uid and gid of extracted files to running user. [#47116](https://github.com/ClickHouse/ClickHouse/pull/47116) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Previously, the `repeat` function's second argument only accepted an unsigned integer type, which meant it could not accept values such as -1. This behavior differed from that of the Spark function. In this update, the repeat function has been modified to match the behavior of the Spark function. It now accepts the same types of inputs, including negative integers. Extensive testing has been performed to verify the correctness of the updated implementation. [#47134](https://github.com/ClickHouse/ClickHouse/pull/47134) ([KevinyhZou](https://github.com/KevinyhZou)). Note: the changelog entry was rewritten by ChatGPT. +* Remove `::__1` part from stacktraces. Display `std::basic_string ClickHouse release 23.2, 2023-02-23 {#232} + +#### Backward Incompatible Change +* Extend function "toDayOfWeek()" (alias: "DAYOFWEEK") with a mode argument that encodes whether the week starts on Monday or Sunday and whether counting starts at 0 or 1. For consistency with other date time functions, the mode argument was inserted between the time and the time zone arguments. This breaks existing usage of the (previously undocumented) 2-argument syntax "toDayOfWeek(time, time_zone)". A fix is to rewrite the function into "toDayOfWeek(time, 0, time_zone)". [#45233](https://github.com/ClickHouse/ClickHouse/pull/45233) ([Robert Schulze](https://github.com/rschu1ze)). +* Rename setting `max_query_cache_size` to `filesystem_cache_max_download_size`. [#45614](https://github.com/ClickHouse/ClickHouse/pull/45614) ([Kseniia Sumarokova](https://github.com/kssenii)). +* The `default` user will not have permissions for access type `SHOW NAMED COLLECTION` by default (e.g. `default` user will no longer be able to grant ALL to other users as it was before, therefore this PR is backward incompatible). [#46010](https://github.com/ClickHouse/ClickHouse/pull/46010) ([Kseniia Sumarokova](https://github.com/kssenii)). +* If the SETTINGS clause is specified before the FORMAT clause, the settings will be applied to formatting as well. [#46003](https://github.com/ClickHouse/ClickHouse/pull/46003) ([Azat Khuzhin](https://github.com/azat)). +* Remove support for setting `materialized_postgresql_allow_automatic_update` (which was by default turned off). [#46106](https://github.com/ClickHouse/ClickHouse/pull/46106) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Slightly improve performance of `countDigits` on realistic datasets. This closed [#44518](https://github.com/ClickHouse/ClickHouse/issues/44518). In previous versions, `countDigits(0)` returned `0`; now it returns `1`, which is more correct, and follows the existing documentation. [#46187](https://github.com/ClickHouse/ClickHouse/pull/46187) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Disallow creation of new columns compressed by a combination of codecs "Delta" or "DoubleDelta" followed by codecs "Gorilla" or "FPC". This can be bypassed using setting "allow_suspicious_codecs = true". [#45652](https://github.com/ClickHouse/ClickHouse/pull/45652) ([Robert Schulze](https://github.com/rschu1ze)). + +#### New Feature +* Add `StorageIceberg` and table function `iceberg` to access iceberg table store on S3. [#45384](https://github.com/ClickHouse/ClickHouse/pull/45384) ([flynn](https://github.com/ucasfl)). +* Allow configuring storage as `SETTINGS disk = ''` (instead of `storage_policy`) and with explicit disk creation `SETTINGS disk = disk(type=s3, ...)`. [#41976](https://github.com/ClickHouse/ClickHouse/pull/41976) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Expose `ProfileEvents` counters in `system.part_log`. [#38614](https://github.com/ClickHouse/ClickHouse/pull/38614) ([Bharat Nallan](https://github.com/bharatnc)). +* Enrichment of the existing `ReplacingMergeTree` engine to allow duplicate the insertion. It leverages the power of both `ReplacingMergeTree` and `CollapsingMergeTree` in one MergeTree engine. Deleted data are not returned when queried, but not removed from disk neither. [#41005](https://github.com/ClickHouse/ClickHouse/pull/41005) ([youennL-cs](https://github.com/youennL-cs)). +* Add `generateULID` function. Closes [#36536](https://github.com/ClickHouse/ClickHouse/issues/36536). [#44662](https://github.com/ClickHouse/ClickHouse/pull/44662) ([Nikolay Degterinsky](https://github.com/evillique)). +* Add `corrMatrix` aggregate function, calculating each two columns. In addition, since Aggregatefunctions `covarSamp` and `covarPop` are similar to `corr`, I add `covarSampMatrix`, `covarPopMatrix` by the way. @alexey-milovidov closes [#44587](https://github.com/ClickHouse/ClickHouse/issues/44587). [#44680](https://github.com/ClickHouse/ClickHouse/pull/44680) ([FFFFFFFHHHHHHH](https://github.com/FFFFFFFHHHHHHH)). +* Introduce arrayShuffle function for random array permutations. [#45271](https://github.com/ClickHouse/ClickHouse/pull/45271) ([Joanna Hulboj](https://github.com/jh0x)). +* Support types `FIXED_SIZE_BINARY` type in Arrow, `FIXED_LENGTH_BYTE_ARRAY` in `Parquet` and match them to `FixedString`. Add settings `output_format_parquet_fixed_string_as_fixed_byte_array/output_format_arrow_fixed_string_as_fixed_byte_array` to control default output type for FixedString. Closes [#45326](https://github.com/ClickHouse/ClickHouse/issues/45326). [#45340](https://github.com/ClickHouse/ClickHouse/pull/45340) ([Kruglov Pavel](https://github.com/Avogar)). +* Add a new column `last_exception_time` to system.replication_queue. [#45457](https://github.com/ClickHouse/ClickHouse/pull/45457) ([Frank Chen](https://github.com/FrankChen021)). +* Add two new functions which allow for user-defined keys/seeds with SipHash{64,128}. [#45513](https://github.com/ClickHouse/ClickHouse/pull/45513) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Allow a three-argument version for table function `format`. close [#45808](https://github.com/ClickHouse/ClickHouse/issues/45808). [#45873](https://github.com/ClickHouse/ClickHouse/pull/45873) ([FFFFFFFHHHHHHH](https://github.com/FFFFFFFHHHHHHH)). +* Add `JodaTime` format support for 'x','w','S'. Refer to https://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html. [#46073](https://github.com/ClickHouse/ClickHouse/pull/46073) ([zk_kiger](https://github.com/zk-kiger)). +* Support window function `ntile`. ([lgbo](https://github.com/lgbo-ustc)). +* Add setting `final` to implicitly apply the `FINAL` modifier to every table. [#40945](https://github.com/ClickHouse/ClickHouse/pull/40945) ([Arthur Passos](https://github.com/arthurpassos)). +* Added `arrayPartialSort` and `arrayPartialReverseSort` functions. [#46296](https://github.com/ClickHouse/ClickHouse/pull/46296) ([Joanna Hulboj](https://github.com/jh0x)). +* The new http parameter `client_protocol_version` allows setting a client protocol version for HTTP responses using the Native format. [#40397](https://github.com/ClickHouse/ClickHouse/issues/40397). [#46360](https://github.com/ClickHouse/ClickHouse/pull/46360) ([Geoff Genz](https://github.com/genzgd)). +* Add new function `regexpExtract`, like spark function `REGEXP_EXTRACT` for compatibility. It is similar to the existing function `extract`. [#46469](https://github.com/ClickHouse/ClickHouse/pull/46469) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Add new function `JSONArrayLength`, which returns the number of elements in the outermost JSON array. The function returns NULL if the input JSON string is invalid. [#46631](https://github.com/ClickHouse/ClickHouse/pull/46631) ([æŽæ‰¬](https://github.com/taiyang-li)). + +#### Performance Improvement +* The introduced logic works if PREWHERE condition is a conjunction of multiple conditions (cond1 AND cond2 AND ... ). It groups those conditions that require reading the same columns into steps. After each step the corresponding part of the full condition is computed and the result rows might be filtered. This allows to read fewer rows in the next steps thus saving IO bandwidth and doing less computation. This logic is disabled by default for now. It will be enabled by default in one of the future releases once it is known to not have any regressions, so it is highly encouraged to be used for testing. It can be controlled by 2 settings: "enable_multiple_prewhere_read_steps" and "move_all_conditions_to_prewhere". [#46140](https://github.com/ClickHouse/ClickHouse/pull/46140) ([Alexander Gololobov](https://github.com/davenger)). +* An option added to aggregate partitions independently if table partition key and group by key are compatible. Controlled by the setting `allow_aggregate_partitions_independently`. Disabled by default because of limited applicability (please refer to the docs). [#45364](https://github.com/ClickHouse/ClickHouse/pull/45364) ([Nikita Taranov](https://github.com/nickitat)). +* Allow using Vertical merge algorithm with parts in Compact format. This will allow ClickHouse server to use much less memory for background operations. This closes [#46084](https://github.com/ClickHouse/ClickHouse/issues/46084). [#45681](https://github.com/ClickHouse/ClickHouse/pull/45681) [#46282](https://github.com/ClickHouse/ClickHouse/pull/46282) ([Anton Popov](https://github.com/CurtizJ)). +* Optimize `Parquet` reader by using batch reader. [#45878](https://github.com/ClickHouse/ClickHouse/pull/45878) ([LiuNeng](https://github.com/liuneng1994)). +* Add new `local_filesystem_read_method` method `io_uring` based on the asynchronous Linux [io_uring](https://kernel.dk/io_uring.pdf) subsystem, improving read performance almost universally compared to the default `pread` method. [#38456](https://github.com/ClickHouse/ClickHouse/pull/38456) ([Saulius Valatka](https://github.com/sauliusvl)). +* Rewrite aggregate functions with `if` expression as argument when logically equivalent. For example, `avg(if(cond, col, null))` can be rewritten to avgIf(cond, col). It is helpful in performance. [#44730](https://github.com/ClickHouse/ClickHouse/pull/44730) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Improve lower/upper function performance with avx512 instructions. [#37894](https://github.com/ClickHouse/ClickHouse/pull/37894) ([yaqi-zhao](https://github.com/yaqi-zhao)). +* Remove the limitation that on systems with >=32 cores and SMT disabled ClickHouse uses only half of the cores (the case when you disable Hyper Threading in BIOS). [#44973](https://github.com/ClickHouse/ClickHouse/pull/44973) ([Robert Schulze](https://github.com/rschu1ze)). +* Improve performance of function `multiIf` by columnar executing, speed up by 2.3x. [#45296](https://github.com/ClickHouse/ClickHouse/pull/45296) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Add fast path for function `position` when the needle is empty. [#45382](https://github.com/ClickHouse/ClickHouse/pull/45382) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Enable `query_plan_remove_redundant_sorting` optimization by default. Optimization implemented in [#45420](https://github.com/ClickHouse/ClickHouse/issues/45420). [#45567](https://github.com/ClickHouse/ClickHouse/pull/45567) ([Igor Nikonov](https://github.com/devcrafter)). +* Increased HTTP Transfer Encoding chunk size to improve performance of large queries using the HTTP interface. [#45593](https://github.com/ClickHouse/ClickHouse/pull/45593) ([Geoff Genz](https://github.com/genzgd)). +* Fixed performance of short `SELECT` queries that read from tables with large number of `Array`/`Map`/`Nested` columns. [#45630](https://github.com/ClickHouse/ClickHouse/pull/45630) ([Anton Popov](https://github.com/CurtizJ)). +* Improve performance of filtering for big integers and decimal types. [#45949](https://github.com/ClickHouse/ClickHouse/pull/45949) ([æŽæ‰¬](https://github.com/taiyang-li)). +* This change could effectively reduce the overhead of obtaining the filter from ColumnNullable(UInt8) and improve the overall query performance. To evaluate the impact of this change, we adopted TPC-H benchmark but revised the column types from non-nullable to nullable, and we measured the QPS of its queries as the performance indicator. [#45962](https://github.com/ClickHouse/ClickHouse/pull/45962) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Make the `_part` and `_partition_id` virtual column be `LowCardinality(String)` type. Closes [#45964](https://github.com/ClickHouse/ClickHouse/issues/45964). [#45975](https://github.com/ClickHouse/ClickHouse/pull/45975) ([flynn](https://github.com/ucasfl)). +* Improve the performance of Decimal conversion when the scale does not change. [#46095](https://github.com/ClickHouse/ClickHouse/pull/46095) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Allow to increase prefetching for read data. [#46168](https://github.com/ClickHouse/ClickHouse/pull/46168) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Rewrite `arrayExists(x -> x = 1, arr)` -> `has(arr, 1)`, which improve performance by 1.34x. [#46188](https://github.com/ClickHouse/ClickHouse/pull/46188) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Fix too big memory usage for vertical merges on non-remote disk. Respect `max_insert_delayed_streams_for_parallel_write` for the remote disk. [#46275](https://github.com/ClickHouse/ClickHouse/pull/46275) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Update zstd to v1.5.4. It has some minor improvements in performance and compression ratio. If you run replicas with different versions of ClickHouse you may see reasonable error messages `Data after merge/mutation is not byte-identical to data on another replicas.` with explanation. These messages are Ok and you should not worry. [#46280](https://github.com/ClickHouse/ClickHouse/pull/46280) ([Raúl Marín](https://github.com/Algunenano)). +* Fix performance degradation caused by [#39737](https://github.com/ClickHouse/ClickHouse/issues/39737). [#46309](https://github.com/ClickHouse/ClickHouse/pull/46309) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The `replicas_status` handle will answer quickly even in case of a large replication queue. [#46310](https://github.com/ClickHouse/ClickHouse/pull/46310) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add avx512 support for aggregate function `sum`, function unary arithmetic, function comparison. [#37870](https://github.com/ClickHouse/ClickHouse/pull/37870) ([zhao zhou](https://github.com/zzachimed)). +* Rewrote the code around marks distribution and the overall coordination of the reading in order to achieve the maximum performance improvement. This closes [#34527](https://github.com/ClickHouse/ClickHouse/issues/34527). [#43772](https://github.com/ClickHouse/ClickHouse/pull/43772) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Remove redundant DISTINCT clauses in query (subqueries). Implemented on top of query plan. It does similar optimization as `optimize_duplicate_order_by_and_distinct` regarding DISTINCT clauses. Can be enabled via `query_plan_remove_redundant_distinct` setting. Related to [#42648](https://github.com/ClickHouse/ClickHouse/issues/42648). [#44176](https://github.com/ClickHouse/ClickHouse/pull/44176) ([Igor Nikonov](https://github.com/devcrafter)). +* A few query rewrite optimizations: `sumIf(123, cond) -> 123 * countIf(1, cond)`, `sum(if(cond, 123, 0)) -> 123 * countIf(cond)`, `sum(if(cond, 0, 123)) -> 123 * countIf(not(cond))` [#44728](https://github.com/ClickHouse/ClickHouse/pull/44728) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Improved how memory bound merging and aggregation in order on top query plan interact. Previously we fell back to explicit sorting for AIO in some cases when it wasn't actually needed. [#45892](https://github.com/ClickHouse/ClickHouse/pull/45892) ([Nikita Taranov](https://github.com/nickitat)). +* Concurrent merges are scheduled using round-robin by default to ensure fair and starvation-free operation. Previously in heavily overloaded shards, big merges could possibly be starved by smaller merges due to the use of strict priority scheduling. Added `background_merges_mutations_scheduling_policy` server config option to select scheduling algorithm (`round_robin` or `shortest_task_first`). [#46247](https://github.com/ClickHouse/ClickHouse/pull/46247) ([Sergei Trifonov](https://github.com/serxa)). + +#### Improvement +* Enable retries for INSERT by default in case of ZooKeeper session loss. We already use it in production. [#46308](https://github.com/ClickHouse/ClickHouse/pull/46308) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add ability to ignore unknown keys in JSON object for named tuples (`input_format_json_ignore_unknown_keys_in_named_tuple`). [#45678](https://github.com/ClickHouse/ClickHouse/pull/45678) ([Azat Khuzhin](https://github.com/azat)). +* Support optimizing the `where` clause with sorting key expression move to `prewhere` for query with `final`. [#38893](https://github.com/ClickHouse/ClickHouse/issues/38893). [#38950](https://github.com/ClickHouse/ClickHouse/pull/38950) ([hexiaoting](https://github.com/hexiaoting)). +* Add new metrics for backups: num_processed_files and processed_files_size described actual number of processed files. [#42244](https://github.com/ClickHouse/ClickHouse/pull/42244) ([Aleksandr](https://github.com/AVMusorin)). +* Added retries on interserver DNS errors. [#43179](https://github.com/ClickHouse/ClickHouse/pull/43179) ([Anton Kozlov](https://github.com/tonickkozlov)). +* Keeper improvement: try preallocating space on the disk to avoid undefined out-of-space issues. Introduce setting `max_log_file_size` for the maximum size of Keeper's Raft log files. [#44370](https://github.com/ClickHouse/ClickHouse/pull/44370) ([Antonio Andelic](https://github.com/antonio2368)). +* Optimize behavior for a replica delay api logic in case the replica is read-only. [#45148](https://github.com/ClickHouse/ClickHouse/pull/45148) ([mateng915](https://github.com/mateng0915)). +* Ask for the password in clickhouse-client interactively in a case when the empty password is wrong. Closes [#46702](https://github.com/ClickHouse/ClickHouse/issues/46702). [#46730](https://github.com/ClickHouse/ClickHouse/pull/46730) ([Nikolay Degterinsky](https://github.com/evillique)). +* Mark `Gorilla` compression on columns of non-Float* type as suspicious. [#45376](https://github.com/ClickHouse/ClickHouse/pull/45376) ([Robert Schulze](https://github.com/rschu1ze)). +* Show replica name that is executing a merge in the `postpone_reason` column. [#45458](https://github.com/ClickHouse/ClickHouse/pull/45458) ([Frank Chen](https://github.com/FrankChen021)). +* Save exception stack trace in part_log. [#45459](https://github.com/ClickHouse/ClickHouse/pull/45459) ([Frank Chen](https://github.com/FrankChen021)). +* The `regexp_tree` dictionary is polished and now it is compatible with https://github.com/ua-parser/uap-core. [#45631](https://github.com/ClickHouse/ClickHouse/pull/45631) ([Han Fei](https://github.com/hanfei1991)). +* Updated checking of `SYSTEM SYNC REPLICA`, resolves [#45508](https://github.com/ClickHouse/ClickHouse/issues/45508) [#45648](https://github.com/ClickHouse/ClickHouse/pull/45648) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Rename setting `replication_alter_partitions_sync` to `alter_sync`. [#45659](https://github.com/ClickHouse/ClickHouse/pull/45659) ([Antonio Andelic](https://github.com/antonio2368)). +* The `generateRandom` table function and the engine now support `LowCardinality` data types. This is useful for testing, for example you can write `INSERT INTO table SELECT * FROM generateRandom() LIMIT 1000`. This is needed to debug [#45590](https://github.com/ClickHouse/ClickHouse/issues/45590). [#45661](https://github.com/ClickHouse/ClickHouse/pull/45661) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The experimental query result cache now provides more modular configuration settings. [#45679](https://github.com/ClickHouse/ClickHouse/pull/45679) ([Robert Schulze](https://github.com/rschu1ze)). +* Renamed "query result cache" to "query cache". [#45682](https://github.com/ClickHouse/ClickHouse/pull/45682) ([Robert Schulze](https://github.com/rschu1ze)). +* add `SYSTEM SYNC FILE CACHE` command. It will do the `sync` syscall. [#8921](https://github.com/ClickHouse/ClickHouse/issues/8921). [#45685](https://github.com/ClickHouse/ClickHouse/pull/45685) ([DR](https://github.com/freedomDR)). +* Add a new S3 setting `allow_head_object_request`. This PR makes usage of `GetObjectAttributes` request instead of `HeadObject` introduced in https://github.com/ClickHouse/ClickHouse/pull/45288 optional (and disabled by default). [#45701](https://github.com/ClickHouse/ClickHouse/pull/45701) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add ability to override connection settings based on connection names (that said that now you can forget about storing password for each connection, you can simply put everything into `~/.clickhouse-client/config.xml` and even use different history files for them, which can be also useful). [#45715](https://github.com/ClickHouse/ClickHouse/pull/45715) ([Azat Khuzhin](https://github.com/azat)). +* Arrow format: support the duration type. Closes [#45669](https://github.com/ClickHouse/ClickHouse/issues/45669). [#45750](https://github.com/ClickHouse/ClickHouse/pull/45750) ([flynn](https://github.com/ucasfl)). +* Extend the logging in the Query Cache to improve investigations of the caching behavior. [#45751](https://github.com/ClickHouse/ClickHouse/pull/45751) ([Robert Schulze](https://github.com/rschu1ze)). +* The query cache's server-level settings are now reconfigurable at runtime. [#45758](https://github.com/ClickHouse/ClickHouse/pull/45758) ([Robert Schulze](https://github.com/rschu1ze)). +* Hide password in logs when a table function's arguments are specified with a named collection. [#45774](https://github.com/ClickHouse/ClickHouse/pull/45774) ([Vitaly Baranov](https://github.com/vitlibar)). +* Improve internal S3 client to correctly deduce regions and redirections for different types of URLs. [#45783](https://github.com/ClickHouse/ClickHouse/pull/45783) ([Antonio Andelic](https://github.com/antonio2368)). +* Add support for Map, IPv4 and IPv6 types in generateRandom. Mostly useful for testing. [#45785](https://github.com/ClickHouse/ClickHouse/pull/45785) ([Raúl Marín](https://github.com/Algunenano)). +* Support empty/notEmpty for IP types. [#45799](https://github.com/ClickHouse/ClickHouse/pull/45799) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* The column `num_processed_files` was split into two columns: `num_files` (for BACKUP) and `files_read` (for RESTORE). The column `processed_files_size` was split into two columns: `total_size` (for BACKUP) and `bytes_read` (for RESTORE). [#45800](https://github.com/ClickHouse/ClickHouse/pull/45800) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add support for `SHOW ENGINES` query for MySQL compatibility. [#45859](https://github.com/ClickHouse/ClickHouse/pull/45859) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Improved how the obfuscator deals with queries. [#45867](https://github.com/ClickHouse/ClickHouse/pull/45867) ([Raúl Marín](https://github.com/Algunenano)). +* Improve behaviour of conversion into Date for boundary value 65535 (2149-06-06). [#46042](https://github.com/ClickHouse/ClickHouse/pull/46042) [#45914](https://github.com/ClickHouse/ClickHouse/pull/45914) ([Joanna Hulboj](https://github.com/jh0x)). +* Add setting `check_referential_table_dependencies` to check referential dependencies on `DROP TABLE`. This PR solves [#38326](https://github.com/ClickHouse/ClickHouse/issues/38326). [#45936](https://github.com/ClickHouse/ClickHouse/pull/45936) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix `tupleElement` to return `Null` when having `Null` argument. Closes [#45894](https://github.com/ClickHouse/ClickHouse/issues/45894). [#45952](https://github.com/ClickHouse/ClickHouse/pull/45952) ([flynn](https://github.com/ucasfl)). +* Throw an error on no files satisfying the S3 wildcard. Closes [#45587](https://github.com/ClickHouse/ClickHouse/issues/45587). [#45957](https://github.com/ClickHouse/ClickHouse/pull/45957) ([chen](https://github.com/xiedeyantu)). +* Use cluster state data to check concurrent backup/restore. [#45982](https://github.com/ClickHouse/ClickHouse/pull/45982) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* ClickHouse Client: Use "exact" matching for fuzzy search, which has correct case ignorance and more appropriate algorithm for matching SQL queries. [#46000](https://github.com/ClickHouse/ClickHouse/pull/46000) ([Azat Khuzhin](https://github.com/azat)). +* Forbid wrong create View syntax `CREATE View X TO Y AS SELECT`. Closes [#4331](https://github.com/ClickHouse/ClickHouse/issues/4331). [#46043](https://github.com/ClickHouse/ClickHouse/pull/46043) ([flynn](https://github.com/ucasfl)). +* Storage `Log` family support setting the `storage_policy`. Closes [#43421](https://github.com/ClickHouse/ClickHouse/issues/43421). [#46044](https://github.com/ClickHouse/ClickHouse/pull/46044) ([flynn](https://github.com/ucasfl)). +* Improve `JSONColumns` format when the result is empty. Closes [#46024](https://github.com/ClickHouse/ClickHouse/issues/46024). [#46053](https://github.com/ClickHouse/ClickHouse/pull/46053) ([flynn](https://github.com/ucasfl)). +* Add reference implementation for SipHash128. [#46065](https://github.com/ClickHouse/ClickHouse/pull/46065) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Add a new metric to record allocations times and bytes using mmap. [#46068](https://github.com/ClickHouse/ClickHouse/pull/46068) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Currently for functions like `leftPad`, `rightPad`, `leftPadUTF8`, `rightPadUTF8`, the second argument `length` must be UInt8|16|32|64|128|256. Which is too strict for clickhouse users, besides, it is not consistent with other similar functions like `arrayResize`, `substring` and so on. [#46103](https://github.com/ClickHouse/ClickHouse/pull/46103) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Fix assertion in the `welchTTest` function in debug build when the resulting statistics is NaN. Unified the behavior with other similar functions. Change the behavior of `studentTTest` to return NaN instead of throwing an exception because the previous behavior was inconvenient. This closes [#41176](https://github.com/ClickHouse/ClickHouse/issues/41176) This closes [#42162](https://github.com/ClickHouse/ClickHouse/issues/42162). [#46141](https://github.com/ClickHouse/ClickHouse/pull/46141) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* More convenient usage of big integers and ORDER BY WITH FILL. Allow using plain integers for start and end points in WITH FILL when ORDER BY big (128-bit and 256-bit) integers. Fix the wrong result for big integers with negative start or end points. This closes [#16733](https://github.com/ClickHouse/ClickHouse/issues/16733). [#46152](https://github.com/ClickHouse/ClickHouse/pull/46152) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add `parts`, `active_parts` and `total_marks` columns to `system.tables` on [issue](https://github.com/ClickHouse/ClickHouse/issues/44336). [#46161](https://github.com/ClickHouse/ClickHouse/pull/46161) ([attack204](https://github.com/attack204)). +* Functions "multi[Fuzzy]Match(Any|AnyIndex|AllIndices}" now reject regexes which will likely evaluate very slowly in vectorscan. [#46167](https://github.com/ClickHouse/ClickHouse/pull/46167) ([Robert Schulze](https://github.com/rschu1ze)). +* When `insert_null_as_default` is enabled and column doesn't have defined default value, the default of column type will be used. Also this PR fixes using default values on nulls in case of LowCardinality columns. [#46171](https://github.com/ClickHouse/ClickHouse/pull/46171) ([Kruglov Pavel](https://github.com/Avogar)). +* Prefer explicitly defined access keys for S3 clients. If `use_environment_credentials` is set to `true`, and the user has provided the access key through query or config, they will be used instead of the ones from the environment variable. [#46191](https://github.com/ClickHouse/ClickHouse/pull/46191) ([Antonio Andelic](https://github.com/antonio2368)). +* Add an alias "DATE_FORMAT()" for function "formatDateTime()" to improve compatibility with MySQL's SQL dialect, extend function `formatDateTime` with substitutions "a", "b", "c", "h", "i", "k", "l" "r", "s", "W". ### Documentation entry for user-facing changes User-readable short description: `DATE_FORMAT` is an alias of `formatDateTime`. Formats a Time according to the given Format string. Format is a constant expression, so you cannot have multiple formats for a single result column. (Provide link to [formatDateTime](https://clickhouse.com/docs/ja/sql-reference/functions/date-time-functions/#formatdatetime)). [#46302](https://github.com/ClickHouse/ClickHouse/pull/46302) ([Jake Bamrah](https://github.com/JakeBamrah)). +* Add `ProfileEvents` and `CurrentMetrics` about the callback tasks for parallel replicas (`s3Cluster` and `MergeTree` tables). [#46313](https://github.com/ClickHouse/ClickHouse/pull/46313) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add support for `DELETE` and `UPDATE` for tables using `KeeperMap` storage engine. [#46330](https://github.com/ClickHouse/ClickHouse/pull/46330) ([Antonio Andelic](https://github.com/antonio2368)). +* Allow writing RENAME queries with query parameters. Resolves [#45778](https://github.com/ClickHouse/ClickHouse/issues/45778). [#46407](https://github.com/ClickHouse/ClickHouse/pull/46407) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix parameterized SELECT queries with REPLACE transformer. Resolves [#33002](https://github.com/ClickHouse/ClickHouse/issues/33002). [#46420](https://github.com/ClickHouse/ClickHouse/pull/46420) ([Nikolay Degterinsky](https://github.com/evillique)). +* Exclude the internal database used for temporary/external tables from the calculation of asynchronous metric "NumberOfDatabases". This makes the behavior consistent with system table "system.databases". [#46435](https://github.com/ClickHouse/ClickHouse/pull/46435) ([Robert Schulze](https://github.com/rschu1ze)). +* Added `last_exception_time` column into distribution_queue table. [#46564](https://github.com/ClickHouse/ClickHouse/pull/46564) ([Aleksandr](https://github.com/AVMusorin)). +* Support for IN clause with parameter in parameterized views. [#46583](https://github.com/ClickHouse/ClickHouse/pull/46583) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Do not load named collections on server startup (load them on first access instead). [#46607](https://github.com/ClickHouse/ClickHouse/pull/46607) ([Kseniia Sumarokova](https://github.com/kssenii)). + + +#### Build/Testing/Packaging Improvement +* Introduce GWP-ASan implemented by the LLVM runtime. This closes [#27039](https://github.com/ClickHouse/ClickHouse/issues/27039). [#45226](https://github.com/ClickHouse/ClickHouse/pull/45226) ([Han Fei](https://github.com/hanfei1991)). +* We want to make our tests less stable and more flaky: add randomization for merge tree settings in tests. [#38983](https://github.com/ClickHouse/ClickHouse/pull/38983) ([Anton Popov](https://github.com/CurtizJ)). +* Enable the HDFS support in PowerPC and which helps to fixes the following functional tests 02113_hdfs_assert.sh, 02244_hdfs_cluster.sql and 02368_cancel_write_into_hdfs.sh. [#44949](https://github.com/ClickHouse/ClickHouse/pull/44949) ([MeenaRenganathan22](https://github.com/MeenaRenganathan22)). +* Add systemd.service file for clickhouse-keeper. Fixes [#44293](https://github.com/ClickHouse/ClickHouse/issues/44293). [#45568](https://github.com/ClickHouse/ClickHouse/pull/45568) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* ClickHouse's fork of poco was moved from "contrib/" to "base/poco/". [#46075](https://github.com/ClickHouse/ClickHouse/pull/46075) ([Robert Schulze](https://github.com/rschu1ze)). +* Add an option for `clickhouse-watchdog` to restart the child process. This does not make a lot of use. [#46312](https://github.com/ClickHouse/ClickHouse/pull/46312) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* If the environment variable `CLICKHOUSE_DOCKER_RESTART_ON_EXIT` is set to 1, the Docker container will run `clickhouse-server` as a child instead of the first process, and restart it when it exited. [#46391](https://github.com/ClickHouse/ClickHouse/pull/46391) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix Systemd service file. [#46461](https://github.com/ClickHouse/ClickHouse/pull/46461) ([SuperDJY](https://github.com/cmsxbc)). +* Raised the minimum Clang version needed to build ClickHouse from 12 to 15. [#46710](https://github.com/ClickHouse/ClickHouse/pull/46710) ([Robert Schulze](https://github.com/rschu1ze)). +* Upgrade Intel QPL from v0.3.0 to v1.0.0 2. Build libaccel-config and link it statically to QPL library instead of dynamically. [#45809](https://github.com/ClickHouse/ClickHouse/pull/45809) ([jasperzhu](https://github.com/jinjunzh)). + + +#### Bug Fix (user-visible misbehavior in official stable release) + +* Flush data exactly by `rabbitmq_flush_interval_ms` or by `rabbitmq_max_block_size` in `StorageRabbitMQ`. Closes [#42389](https://github.com/ClickHouse/ClickHouse/issues/42389). Closes [#45160](https://github.com/ClickHouse/ClickHouse/issues/45160). [#44404](https://github.com/ClickHouse/ClickHouse/pull/44404) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Use PODArray to render in sparkBar function, so we can control the memory usage. Close [#44467](https://github.com/ClickHouse/ClickHouse/issues/44467). [#44489](https://github.com/ClickHouse/ClickHouse/pull/44489) ([Duc Canh Le](https://github.com/canhld94)). +* Fix functions (quantilesExactExclusive, quantilesExactInclusive) return unsorted array element. [#45379](https://github.com/ClickHouse/ClickHouse/pull/45379) ([wujunfu](https://github.com/wujunfu)). +* Fix uncaught exception in HTTPHandler when open telemetry is enabled. [#45456](https://github.com/ClickHouse/ClickHouse/pull/45456) ([Frank Chen](https://github.com/FrankChen021)). +* Don't infer Dates from 8 digit numbers. It could lead to wrong data to be read. [#45581](https://github.com/ClickHouse/ClickHouse/pull/45581) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixes to correctly use `odbc_bridge_use_connection_pooling` setting. [#45591](https://github.com/ClickHouse/ClickHouse/pull/45591) ([Bharat Nallan](https://github.com/bharatnc)). +* When the callback in the cache is called, it is possible that this cache is destructed. To keep it safe, we capture members by value. It's also safe for task schedule because it will be deactivated before storage is destroyed. Resolve [#45548](https://github.com/ClickHouse/ClickHouse/issues/45548). [#45601](https://github.com/ClickHouse/ClickHouse/pull/45601) ([Han Fei](https://github.com/hanfei1991)). +* Fix data corruption when codecs Delta or DoubleDelta are combined with codec Gorilla. [#45615](https://github.com/ClickHouse/ClickHouse/pull/45615) ([Robert Schulze](https://github.com/rschu1ze)). +* Correctly check types when using N-gram bloom filter index to avoid invalid reads. [#45617](https://github.com/ClickHouse/ClickHouse/pull/45617) ([Antonio Andelic](https://github.com/antonio2368)). +* A couple of segfaults have been reported around `c-ares`. They were introduced in my previous pull requests. I have fixed them with the help of Alexander Tokmakov. [#45629](https://github.com/ClickHouse/ClickHouse/pull/45629) ([Arthur Passos](https://github.com/arthurpassos)). +* Fix key description when encountering duplicate primary keys. This can happen in projections. See [#45590](https://github.com/ClickHouse/ClickHouse/issues/45590) for details. [#45686](https://github.com/ClickHouse/ClickHouse/pull/45686) ([Amos Bird](https://github.com/amosbird)). +* Set compression method and level for backup Closes [#45690](https://github.com/ClickHouse/ClickHouse/issues/45690). [#45737](https://github.com/ClickHouse/ClickHouse/pull/45737) ([Pradeep Chhetri](https://github.com/chhetripradeep)). +* Should use `select_query_typed.limitByOffset` instead of `select_query_typed.limitOffset`. [#45817](https://github.com/ClickHouse/ClickHouse/pull/45817) ([刘陶峰](https://github.com/taofengliu)). +* When use experimental analyzer, queries like `SELECT number FROM numbers(100) LIMIT 10 OFFSET 10;` get wrong results (empty result for this sql). That is caused by an unnecessary offset step added by planner. [#45822](https://github.com/ClickHouse/ClickHouse/pull/45822) ([刘陶峰](https://github.com/taofengliu)). +* Backward compatibility - allow implicit narrowing conversion from UInt64 to IPv4 - required for "INSERT ... VALUES ..." expression. [#45865](https://github.com/ClickHouse/ClickHouse/pull/45865) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Bugfix IPv6 parser for mixed ip4 address with missed first octet (like `::.1.2.3`). [#45871](https://github.com/ClickHouse/ClickHouse/pull/45871) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Add the `query_kind` column to the `system.processes` table and the `SHOW PROCESSLIST` query. Remove duplicate code. It fixes a bug: the global configuration parameter `max_concurrent_select_queries` was not respected to queries with `INTERSECT` or `EXCEPT` chains. [#45872](https://github.com/ClickHouse/ClickHouse/pull/45872) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix crash in a function `stochasticLinearRegression`. Found by WingFuzz. [#45985](https://github.com/ClickHouse/ClickHouse/pull/45985) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix crash in `SELECT` queries with `INTERSECT` and `EXCEPT` modifiers that read data from tables with enabled sparse columns (controlled by setting `ratio_of_defaults_for_sparse_serialization`). [#45987](https://github.com/ClickHouse/ClickHouse/pull/45987) ([Anton Popov](https://github.com/CurtizJ)). +* Fix read in order optimization for DESC sorting with FINAL, close [#45815](https://github.com/ClickHouse/ClickHouse/issues/45815). [#46009](https://github.com/ClickHouse/ClickHouse/pull/46009) ([Vladimir C](https://github.com/vdimir)). +* Fix reading of non existing nested columns with multiple level in compact parts. [#46045](https://github.com/ClickHouse/ClickHouse/pull/46045) ([Azat Khuzhin](https://github.com/azat)). +* Fix elapsed column in system.processes (10x error). [#46047](https://github.com/ClickHouse/ClickHouse/pull/46047) ([Azat Khuzhin](https://github.com/azat)). +* Follow-up fix for Replace domain IP types (IPv4, IPv6) with native https://github.com/ClickHouse/ClickHouse/pull/43221. [#46087](https://github.com/ClickHouse/ClickHouse/pull/46087) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix environment variable substitution in the configuration when a parameter already has a value. This closes [#46131](https://github.com/ClickHouse/ClickHouse/issues/46131). This closes [#9547](https://github.com/ClickHouse/ClickHouse/issues/9547). [#46144](https://github.com/ClickHouse/ClickHouse/pull/46144) ([pufit](https://github.com/pufit)). +* Fix incorrect predicate push down with grouping sets. Closes [#45947](https://github.com/ClickHouse/ClickHouse/issues/45947). [#46151](https://github.com/ClickHouse/ClickHouse/pull/46151) ([flynn](https://github.com/ucasfl)). +* Fix possible pipeline stuck error on `fulls_sorting_join` with constant keys. [#46175](https://github.com/ClickHouse/ClickHouse/pull/46175) ([Vladimir C](https://github.com/vdimir)). +* Never rewrite tuple functions as literals during formatting to avoid incorrect results. [#46232](https://github.com/ClickHouse/ClickHouse/pull/46232) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Fix possible out of bounds error while reading LowCardinality(Nullable) in Arrow format. [#46270](https://github.com/ClickHouse/ClickHouse/pull/46270) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix `SYSTEM UNFREEZE` queries failing with the exception `CANNOT_PARSE_INPUT_ASSERTION_FAILED`. [#46325](https://github.com/ClickHouse/ClickHouse/pull/46325) ([Aleksei Filatov](https://github.com/aalexfvk)). +* Fix possible crash which can be caused by an integer overflow while deserializing aggregating state of a function that stores HashTable. [#46349](https://github.com/ClickHouse/ClickHouse/pull/46349) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix possible `LOGICAL_ERROR` in asynchronous inserts with invalid data sent in format `VALUES`. [#46350](https://github.com/ClickHouse/ClickHouse/pull/46350) ([Anton Popov](https://github.com/CurtizJ)). +* Fixed a LOGICAL_ERROR on an attempt to execute `ALTER ... MOVE PART ... TO TABLE`. This type of query was never actually supported. [#46359](https://github.com/ClickHouse/ClickHouse/pull/46359) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix s3Cluster schema inference in parallel distributed insert select when `parallel_distributed_insert_select` is enabled. [#46381](https://github.com/ClickHouse/ClickHouse/pull/46381) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix queries like `ALTER TABLE ... UPDATE nested.arr1 = nested.arr2 ...`, where `arr1` and `arr2` are fields of the same `Nested` column. [#46387](https://github.com/ClickHouse/ClickHouse/pull/46387) ([Anton Popov](https://github.com/CurtizJ)). +* Scheduler may fail to schedule a task. If it happens, the whole MulityPartUpload should be aborted and `UploadHelper` must wait for already scheduled tasks. [#46451](https://github.com/ClickHouse/ClickHouse/pull/46451) ([Dmitry Novik](https://github.com/novikd)). +* Fix PREWHERE for Merge with different default types (fixes some `NOT_FOUND_COLUMN_IN_BLOCK` when the default type for the column differs, also allow `PREWHERE` when the type of column is the same across tables, and prohibit it, only if it differs). [#46454](https://github.com/ClickHouse/ClickHouse/pull/46454) ([Azat Khuzhin](https://github.com/azat)). +* Fix a crash that could happen when constant values are used in `ORDER BY`. Fixes [#46466](https://github.com/ClickHouse/ClickHouse/issues/46466). [#46493](https://github.com/ClickHouse/ClickHouse/pull/46493) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Do not throw exception if `disk` setting was specified on query level, but `storage_policy` was specified in config merge tree settings section. `disk` will override setting from config. [#46533](https://github.com/ClickHouse/ClickHouse/pull/46533) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix an invalid processing of constant `LowCardinality` argument in function `arrayMap`. This bug could lead to a segfault in release, and logical error `Bad cast` in debug build. [#46569](https://github.com/ClickHouse/ClickHouse/pull/46569) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* fixes [#46557](https://github.com/ClickHouse/ClickHouse/issues/46557). [#46611](https://github.com/ClickHouse/ClickHouse/pull/46611) ([Alexander Gololobov](https://github.com/davenger)). +* Fix endless restarts of clickhouse-server systemd unit if server cannot start within 1m30sec (Disable timeout logic for starting clickhouse-server from systemd service). [#46613](https://github.com/ClickHouse/ClickHouse/pull/46613) ([Azat Khuzhin](https://github.com/azat)). +* Allocated during asynchronous inserts memory buffers were deallocated in the global context and MemoryTracker counters for corresponding user and query were not updated correctly. That led to false positive OOM exceptions. [#46622](https://github.com/ClickHouse/ClickHouse/pull/46622) ([Dmitry Novik](https://github.com/novikd)). +* Updated to not clear on_expression from table_join as its used by future analyze runs resolves [#45185](https://github.com/ClickHouse/ClickHouse/issues/45185). [#46487](https://github.com/ClickHouse/ClickHouse/pull/46487) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). + + +### ClickHouse release 23.1, 2023-01-26 {#231} + +### ClickHouse release 23.1 + +#### Upgrade Notes +* The `SYSTEM RESTART DISK` query becomes a no-op. [#44647](https://github.com/ClickHouse/ClickHouse/pull/44647) ([alesapin](https://github.com/alesapin)). +* The `PREALLOCATE` option for `HASHED`/`SPARSE_HASHED` dictionaries becomes a no-op. [#45388](https://github.com/ClickHouse/ClickHouse/pull/45388) ([Azat Khuzhin](https://github.com/azat)). It does not give significant advantages anymore. +* Disallow `Gorilla` codec on columns of non-Float32 or non-Float64 type. [#45252](https://github.com/ClickHouse/ClickHouse/pull/45252) ([Robert Schulze](https://github.com/rschu1ze)). It was pointless and led to inconsistencies. +* Parallel quorum inserts might work incorrectly with `*MergeTree` tables created with the deprecated syntax. Therefore, parallel quorum inserts support is completely disabled for such tables. It does not affect tables created with a new syntax. [#45430](https://github.com/ClickHouse/ClickHouse/pull/45430) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Use the `GetObjectAttributes` request instead of the `HeadObject` request to get the size of an object in AWS S3. This change fixes handling endpoints without explicit regions after updating the AWS SDK, for example. [#45288](https://github.com/ClickHouse/ClickHouse/pull/45288) ([Vitaly Baranov](https://github.com/vitlibar)). AWS S3 and Minio are tested, but keep in mind that various S3-compatible services (GCS, R2, B2) may have subtle incompatibilities. This change also may require you to adjust the ACL to allow the `GetObjectAttributes` request. +* Forbid paths in timezone names. For example, a timezone name like `/usr/share/zoneinfo/Asia/Aden` is not allowed; the IANA timezone database name like `Asia/Aden` should be used. [#44225](https://github.com/ClickHouse/ClickHouse/pull/44225) ([Kruglov Pavel](https://github.com/Avogar)). +* Queries combining equijoin and constant expressions (e.g., `JOIN ON t1.x = t2.x AND 1 = 1`) are forbidden due to incorrect results. [#44016](https://github.com/ClickHouse/ClickHouse/pull/44016) ([Vladimir C](https://github.com/vdimir)). + + +#### New Feature +* Dictionary source for extracting keys by traversing regular expressions tree. It can be used for User-Agent parsing. [#40878](https://github.com/ClickHouse/ClickHouse/pull/40878) ([Vage Ogannisian](https://github.com/nooblose)). [#43858](https://github.com/ClickHouse/ClickHouse/pull/43858) ([Han Fei](https://github.com/hanfei1991)). +* Added parametrized view functionality, now it's possible to specify query parameters for the View table engine. resolves [#40907](https://github.com/ClickHouse/ClickHouse/issues/40907). [#41687](https://github.com/ClickHouse/ClickHouse/pull/41687) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Add `quantileInterpolatedWeighted`/`quantilesInterpolatedWeighted` functions. [#38252](https://github.com/ClickHouse/ClickHouse/pull/38252) ([Bharat Nallan](https://github.com/bharatnc)). +* Array join support for the `Map` type, like the function "explode" in Spark. [#43239](https://github.com/ClickHouse/ClickHouse/pull/43239) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Support SQL standard binary and hex string literals. [#43785](https://github.com/ClickHouse/ClickHouse/pull/43785) ([Mo Xuan](https://github.com/mo-avatar)). +* Allow formatting `DateTime` in Joda-Time style. Refer to [the Joda-Time docs](https://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html). [#43818](https://github.com/ClickHouse/ClickHouse/pull/43818) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Implemented a fractional second formatter (`%f`) for `formatDateTime`. [#44060](https://github.com/ClickHouse/ClickHouse/pull/44060) ([ltrk2](https://github.com/ltrk2)). [#44497](https://github.com/ClickHouse/ClickHouse/pull/44497) ([Alexander Gololobov](https://github.com/davenger)). +* Added `age` function to calculate the difference between two dates or dates with time values expressed as the number of full units. Closes [#41115](https://github.com/ClickHouse/ClickHouse/issues/41115). [#44421](https://github.com/ClickHouse/ClickHouse/pull/44421) ([Robert Schulze](https://github.com/rschu1ze)). +* Add `Null` source for dictionaries. Closes [#44240](https://github.com/ClickHouse/ClickHouse/issues/44240). [#44502](https://github.com/ClickHouse/ClickHouse/pull/44502) ([mayamika](https://github.com/mayamika)). +* Allow configuring the S3 storage class with the `s3_storage_class` configuration option. Such as `STANDARD/INTELLIGENT_TIERING` Closes [#44443](https://github.com/ClickHouse/ClickHouse/issues/44443). [#44707](https://github.com/ClickHouse/ClickHouse/pull/44707) ([chen](https://github.com/xiedeyantu)). +* Insert default values in case of missing elements in JSON object while parsing named tuple. Add setting `input_format_json_defaults_for_missing_elements_in_named_tuple` that controls this behaviour. Closes [#45142](https://github.com/ClickHouse/ClickHouse/issues/45142)#issuecomment-1380153217. [#45231](https://github.com/ClickHouse/ClickHouse/pull/45231) ([Kruglov Pavel](https://github.com/Avogar)). +* Record server startup time in ProfileEvents (`ServerStartupMilliseconds`). Resolves [#43188](https://github.com/ClickHouse/ClickHouse/issues/43188). [#45250](https://github.com/ClickHouse/ClickHouse/pull/45250) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Refactor and Improve streaming engines Kafka/RabbitMQ/NATS and add support for all formats, also refactor formats a bit: - Fix producing messages in row-based formats with suffixes/prefixes. Now every message is formatted completely with all delimiters and can be parsed back using input format. - Support block-based formats like Native, Parquet, ORC, etc. Every block is formatted as a separate message. The number of rows in one message depends on the block size, so you can control it via the setting `max_block_size`. - Add new engine settings `kafka_max_rows_per_message/rabbitmq_max_rows_per_message/nats_max_rows_per_message`. They control the number of rows formatted in one message in row-based formats. Default value: 1. - Fix high memory consumption in the NATS table engine. - Support arbitrary binary data in NATS producer (previously it worked only with strings contained \0 at the end) - Add missing Kafka/RabbitMQ/NATS engine settings in the documentation. - Refactor producing and consuming in Kafka/RabbitMQ/NATS, separate it from WriteBuffers/ReadBuffers semantic. - Refactor output formats: remove callbacks on each row used in Kafka/RabbitMQ/NATS (now we don't use callbacks there), allow to use IRowOutputFormat directly, clarify row end and row between delimiters, make it possible to reset output format to start formatting again - Add proper implementation in formatRow function (bonus after formats refactoring). [#42777](https://github.com/ClickHouse/ClickHouse/pull/42777) ([Kruglov Pavel](https://github.com/Avogar)). +* Support reading/writing `Nested` tables as `List` of `Struct` in `CapnProto` format. Read/write `Decimal32/64` as `Int32/64`. Closes [#43319](https://github.com/ClickHouse/ClickHouse/issues/43319). [#43379](https://github.com/ClickHouse/ClickHouse/pull/43379) ([Kruglov Pavel](https://github.com/Avogar)). +* Added a `message_format_string` column to `system.text_log`. The column contains a pattern that was used to format the message. [#44543](https://github.com/ClickHouse/ClickHouse/pull/44543) ([Alexander Tokmakov](https://github.com/tavplubix)). This allows various analytics over the ClickHouse logs. +* Try to autodetect headers with column names (and maybe types) for CSV/TSV/CustomSeparated input formats. +Add settings input_format_tsv/csv/custom_detect_header that enable this behaviour (enabled by default). Closes [#44640](https://github.com/ClickHouse/ClickHouse/issues/44640). [#44953](https://github.com/ClickHouse/ClickHouse/pull/44953) ([Kruglov Pavel](https://github.com/Avogar)). + +#### Experimental Feature +* Add an experimental inverted index as a new secondary index type for efficient text search. [#38667](https://github.com/ClickHouse/ClickHouse/pull/38667) ([larryluogit](https://github.com/larryluogit)). +* Add experimental query result cache. [#43797](https://github.com/ClickHouse/ClickHouse/pull/43797) ([Robert Schulze](https://github.com/rschu1ze)). +* Added extendable and configurable scheduling subsystem for IO requests (not yet integrated with IO code itself). [#41840](https://github.com/ClickHouse/ClickHouse/pull/41840) ([Sergei Trifonov](https://github.com/serxa)). This feature does nothing at all, enjoy. +* Added `SYSTEM DROP DATABASE REPLICA` that removes metadata of a dead replica of a `Replicated` database. Resolves [#41794](https://github.com/ClickHouse/ClickHouse/issues/41794). [#42807](https://github.com/ClickHouse/ClickHouse/pull/42807) ([Alexander Tokmakov](https://github.com/tavplubix)). + +#### Performance Improvement +* Do not load inactive parts at startup of `MergeTree` tables. [#42181](https://github.com/ClickHouse/ClickHouse/pull/42181) ([Anton Popov](https://github.com/CurtizJ)). +* Improved latency of reading from storage `S3` and table function `s3` with large numbers of small files. Now settings `remote_filesystem_read_method` and `remote_filesystem_read_prefetch` take effect while reading from storage `S3`. [#43726](https://github.com/ClickHouse/ClickHouse/pull/43726) ([Anton Popov](https://github.com/CurtizJ)). +* Optimization for reading struct fields in Parquet/ORC files. Only the required fields are loaded. [#44484](https://github.com/ClickHouse/ClickHouse/pull/44484) ([lgbo](https://github.com/lgbo-ustc)). +* Two-level aggregation algorithm was mistakenly disabled for queries over the HTTP interface. It was enabled back, and it leads to a major performance improvement. [#45450](https://github.com/ClickHouse/ClickHouse/pull/45450) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Added mmap support for StorageFile, which should improve the performance of clickhouse-local. [#43927](https://github.com/ClickHouse/ClickHouse/pull/43927) ([pufit](https://github.com/pufit)). +* Added sharding support in HashedDictionary to allow parallel load (almost linear scaling based on number of shards). [#40003](https://github.com/ClickHouse/ClickHouse/pull/40003) ([Azat Khuzhin](https://github.com/azat)). +* Speed up query parsing. [#42284](https://github.com/ClickHouse/ClickHouse/pull/42284) ([Raúl Marín](https://github.com/Algunenano)). +* Always replace OR chain `expr = x1 OR ... OR expr = xN` to `expr IN (x1, ..., xN)` in the case where `expr` is a `LowCardinality` column. Setting `optimize_min_equality_disjunction_chain_length` is ignored in this case. [#42889](https://github.com/ClickHouse/ClickHouse/pull/42889) ([Guo Wangyang](https://github.com/guowangy)). +* Slightly improve performance by optimizing the code around ThreadStatus. [#43586](https://github.com/ClickHouse/ClickHouse/pull/43586) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Optimize the column-wise ternary logic evaluation by achieving auto-vectorization. In the performance test of this [microbenchmark](https://github.com/ZhiguoZh/ClickHouse/blob/20221123-ternary-logic-opt-example/src/Functions/examples/associative_applier_perf.cpp), we've observed a peak **performance gain** of **21x** on the ICX device (Intel Xeon Platinum 8380 CPU). [#43669](https://github.com/ClickHouse/ClickHouse/pull/43669) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Avoid acquiring read locks in the `system.tables` table if possible. [#43840](https://github.com/ClickHouse/ClickHouse/pull/43840) ([Raúl Marín](https://github.com/Algunenano)). +* Optimize ThreadPool. The performance experiments of SSB (Star Schema Benchmark) on the ICX device (Intel Xeon Platinum 8380 CPU, 80 cores, 160 threads) shows that this change could effectively decrease the lock contention for ThreadPoolImpl::mutex by **75%**, increasing the CPU utilization and improving the overall performance by **2.4%**. [#44308](https://github.com/ClickHouse/ClickHouse/pull/44308) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Now the optimisation for predicting the hash table size is applied only if the cached hash table size is sufficiently large (thresholds were determined empirically and hardcoded). [#44455](https://github.com/ClickHouse/ClickHouse/pull/44455) ([Nikita Taranov](https://github.com/nickitat)). +* Small performance improvement for asynchronous reading from remote filesystems. [#44868](https://github.com/ClickHouse/ClickHouse/pull/44868) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add fast path for: - `col like '%%'`; - `col like '%'`; - `col not like '%'`; - `col not like '%'`; - `match(col, '.*')`. [#45244](https://github.com/ClickHouse/ClickHouse/pull/45244) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Slightly improve happy path optimisation in filtering (WHERE clause). [#45289](https://github.com/ClickHouse/ClickHouse/pull/45289) ([Nikita Taranov](https://github.com/nickitat)). +* Provide monotonicity info for `toUnixTimestamp64*` to enable more algebraic optimizations for index analysis. [#44116](https://github.com/ClickHouse/ClickHouse/pull/44116) ([Nikita Taranov](https://github.com/nickitat)). +* Allow the configuration of temporary data for query processing (spilling to disk) to cooperate with the filesystem cache (taking up the space from the cache disk) [#43972](https://github.com/ClickHouse/ClickHouse/pull/43972) ([Vladimir C](https://github.com/vdimir)). This mainly improves [ClickHouse Cloud](https://clickhouse.cloud/), but can be used for self-managed setups as well, if you know what to do. +* Make `system.replicas` table do parallel fetches of replicas statuses. Closes [#43918](https://github.com/ClickHouse/ClickHouse/issues/43918). [#43998](https://github.com/ClickHouse/ClickHouse/pull/43998) ([Nikolay Degterinsky](https://github.com/evillique)). +* Optimize memory consumption during backup to S3: files to S3 now will be copied directly without using `WriteBufferFromS3` (which could use a lot of memory). [#45188](https://github.com/ClickHouse/ClickHouse/pull/45188) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add a cache for async block ids. This will reduce the number of requests of ZooKeeper when we enable async inserts deduplication. [#45106](https://github.com/ClickHouse/ClickHouse/pull/45106) ([Han Fei](https://github.com/hanfei1991)). + +#### Improvement + +* Use structure from insertion table in generateRandom without arguments. [#45239](https://github.com/ClickHouse/ClickHouse/pull/45239) ([Kruglov Pavel](https://github.com/Avogar)). +* Allow to implicitly convert floats stored in string fields of JSON to integers in `JSONExtract` functions. E.g. `JSONExtract('{"a": "1000.111"}', 'a', 'UInt64')` -> `1000`, previously it returned 0. [#45432](https://github.com/ClickHouse/ClickHouse/pull/45432) ([Anton Popov](https://github.com/CurtizJ)). +* Added fields `supports_parallel_parsing` and `supports_parallel_formatting` to table `system.formats` for better introspection. [#45499](https://github.com/ClickHouse/ClickHouse/pull/45499) ([Anton Popov](https://github.com/CurtizJ)). +* Improve reading CSV field in CustomSeparated/Template format. Closes [#42352](https://github.com/ClickHouse/ClickHouse/issues/42352) Closes [#39620](https://github.com/ClickHouse/ClickHouse/issues/39620). [#43332](https://github.com/ClickHouse/ClickHouse/pull/43332) ([Kruglov Pavel](https://github.com/Avogar)). +* Unify query elapsed time measurements. [#43455](https://github.com/ClickHouse/ClickHouse/pull/43455) ([Raúl Marín](https://github.com/Algunenano)). +* Improve automatic usage of structure from insertion table in table functions file/hdfs/s3 when virtual columns are present in a select query, it fixes the possible error `Block structure mismatch` or `number of columns mismatch`. [#43695](https://github.com/ClickHouse/ClickHouse/pull/43695) ([Kruglov Pavel](https://github.com/Avogar)). +* Add support for signed arguments in the function `range`. Fixes [#43333](https://github.com/ClickHouse/ClickHouse/issues/43333). [#43733](https://github.com/ClickHouse/ClickHouse/pull/43733) ([sanyu](https://github.com/wineternity)). +* Remove redundant sorting, for example, sorting related ORDER BY clauses in subqueries. Implemented on top of query plan. It does similar optimization as `optimize_duplicate_order_by_and_distinct` regarding `ORDER BY` clauses, but more generic, since it's applied to any redundant sorting steps (not only caused by ORDER BY clause) and applied to subqueries of any depth. Related to [#42648](https://github.com/ClickHouse/ClickHouse/issues/42648). [#43905](https://github.com/ClickHouse/ClickHouse/pull/43905) ([Igor Nikonov](https://github.com/devcrafter)). +* Add the ability to disable deduplication of files for BACKUP (for backups without deduplication ATTACH can be used instead of full RESTORE). For example `BACKUP foo TO S3(...) SETTINGS deduplicate_files=0` (default `deduplicate_files=1`). [#43947](https://github.com/ClickHouse/ClickHouse/pull/43947) ([Azat Khuzhin](https://github.com/azat)). +* Refactor and improve schema inference for text formats. Add new setting `schema_inference_make_columns_nullable` that controls making result types `Nullable` (enabled by default);. [#44019](https://github.com/ClickHouse/ClickHouse/pull/44019) ([Kruglov Pavel](https://github.com/Avogar)). +* Better support for `PROXYv1` protocol. [#44135](https://github.com/ClickHouse/ClickHouse/pull/44135) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Add information about the latest part check by cleanup threads into `system.parts` table. [#44244](https://github.com/ClickHouse/ClickHouse/pull/44244) ([Dmitry Novik](https://github.com/novikd)). +* Disable table functions in readonly mode for inserts. [#44290](https://github.com/ClickHouse/ClickHouse/pull/44290) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Add a setting `simultaneous_parts_removal_limit` to allow limiting the number of parts being processed by one iteration of CleanupThread. [#44461](https://github.com/ClickHouse/ClickHouse/pull/44461) ([Dmitry Novik](https://github.com/novikd)). +* Do not initialize ReadBufferFromS3 when only virtual columns are needed in a query. This may be helpful to [#44246](https://github.com/ClickHouse/ClickHouse/issues/44246). [#44493](https://github.com/ClickHouse/ClickHouse/pull/44493) ([chen](https://github.com/xiedeyantu)). +* Prevent duplicate column names hints. Closes [#44130](https://github.com/ClickHouse/ClickHouse/issues/44130). [#44519](https://github.com/ClickHouse/ClickHouse/pull/44519) ([Joanna Hulboj](https://github.com/jh0x)). +* Allow macro substitution in endpoint of disks. Resolve [#40951](https://github.com/ClickHouse/ClickHouse/issues/40951). [#44533](https://github.com/ClickHouse/ClickHouse/pull/44533) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Improve schema inference when `input_format_json_read_object_as_string` is enabled. [#44546](https://github.com/ClickHouse/ClickHouse/pull/44546) ([Kruglov Pavel](https://github.com/Avogar)). +* Add a user-level setting `database_replicated_allow_replicated_engine_arguments` which allows banning the creation of `ReplicatedMergeTree` tables with arguments in `DatabaseReplicated`. [#44566](https://github.com/ClickHouse/ClickHouse/pull/44566) ([alesapin](https://github.com/alesapin)). +* Prevent users from mistakenly specifying zero (invalid) value for `index_granularity`. This closes [#44536](https://github.com/ClickHouse/ClickHouse/issues/44536). [#44578](https://github.com/ClickHouse/ClickHouse/pull/44578) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Added possibility to set path to service keytab file in `keytab` parameter in `kerberos` section of config.xml. [#44594](https://github.com/ClickHouse/ClickHouse/pull/44594) ([Roman Vasin](https://github.com/rvasin)). +* Use already written part of the query for fuzzy search (pass to the `skim` library, which is written in Rust and linked statically to ClickHouse). [#44600](https://github.com/ClickHouse/ClickHouse/pull/44600) ([Azat Khuzhin](https://github.com/azat)). +* Enable `input_format_json_read_objects_as_strings` by default to be able to read nested JSON objects while JSON Object type is experimental. [#44657](https://github.com/ClickHouse/ClickHouse/pull/44657) ([Kruglov Pavel](https://github.com/Avogar)). +* Improvement for deduplication of async inserts: when users do duplicate async inserts, we should deduplicate inside the memory before we query Keeper. [#44682](https://github.com/ClickHouse/ClickHouse/pull/44682) ([Han Fei](https://github.com/hanfei1991)). +* Input/output `Avro` format will parse bool type as ClickHouse bool type. [#44684](https://github.com/ClickHouse/ClickHouse/pull/44684) ([Kruglov Pavel](https://github.com/Avogar)). +* Support Bool type in Arrow/Parquet/ORC. Closes [#43970](https://github.com/ClickHouse/ClickHouse/issues/43970). [#44698](https://github.com/ClickHouse/ClickHouse/pull/44698) ([Kruglov Pavel](https://github.com/Avogar)). +* Don't greedily parse beyond the quotes when reading UUIDs - it may lead to mistakenly successful parsing of incorrect data. [#44686](https://github.com/ClickHouse/ClickHouse/pull/44686) ([Raúl Marín](https://github.com/Algunenano)). +* Infer UInt64 in case of Int64 overflow and fix some transforms in schema inference. [#44696](https://github.com/ClickHouse/ClickHouse/pull/44696) ([Kruglov Pavel](https://github.com/Avogar)). +* Previously dependency resolving inside `Replicated` database was done in a hacky way, and now it's done right using an explicit graph. [#44697](https://github.com/ClickHouse/ClickHouse/pull/44697) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Fix `output_format_pretty_row_numbers` does not preserve the counter across the blocks. Closes [#44815](https://github.com/ClickHouse/ClickHouse/issues/44815). [#44832](https://github.com/ClickHouse/ClickHouse/pull/44832) ([flynn](https://github.com/ucasfl)). +* Don't report errors in `system.errors` due to parts being merged concurrently with the background cleanup process. [#44874](https://github.com/ClickHouse/ClickHouse/pull/44874) ([Raúl Marín](https://github.com/Algunenano)). +* Optimize and fix metrics for Distributed async INSERT. [#44922](https://github.com/ClickHouse/ClickHouse/pull/44922) ([Azat Khuzhin](https://github.com/azat)). +* Added settings to disallow concurrent backups and restores resolves [#43891](https://github.com/ClickHouse/ClickHouse/issues/43891) Implementation: * Added server-level settings to disallow concurrent backups and restores, which are read and set when BackupWorker is created in Context. * Settings are set to true by default. * Before starting backup or restores, added a check to see if any other backups/restores are running. For internal requests, it checks if it is from the self node using backup_uuid. [#45072](https://github.com/ClickHouse/ClickHouse/pull/45072) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Add `` config parameter for system logs. [#45320](https://github.com/ClickHouse/ClickHouse/pull/45320) ([Stig Bakken](https://github.com/stigsb)). + +#### Build/Testing/Packaging Improvement +* Statically link with the `skim` library (it is written in Rust) for fuzzy search in clickhouse client/local history. [#44239](https://github.com/ClickHouse/ClickHouse/pull/44239) ([Azat Khuzhin](https://github.com/azat)). +* We removed support for shared linking because of Rust. Actually, Rust is only an excuse for this removal, and we wanted to remove it nevertheless. [#44828](https://github.com/ClickHouse/ClickHouse/pull/44828) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Remove the dependency on the `adduser` tool from the packages, because we don't use it. This fixes [#44934](https://github.com/ClickHouse/ClickHouse/issues/44934). [#45011](https://github.com/ClickHouse/ClickHouse/pull/45011) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The `SQLite` library is updated to the latest. It is used for the SQLite database and table integration engines. Also, fixed a false-positive TSan report. This closes [#45027](https://github.com/ClickHouse/ClickHouse/issues/45027). [#45031](https://github.com/ClickHouse/ClickHouse/pull/45031) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* CRC-32 changes to address the WeakHash collision issue in PowerPC. [#45144](https://github.com/ClickHouse/ClickHouse/pull/45144) ([MeenaRenganathan22](https://github.com/MeenaRenganathan22)). +* Update aws-c* submodules [#43020](https://github.com/ClickHouse/ClickHouse/pull/43020) ([Vitaly Baranov](https://github.com/vitlibar)). +* Automatically merge green backport PRs and green approved PRs [#41110](https://github.com/ClickHouse/ClickHouse/pull/41110) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Introduce a [website](https://aretestsgreenyet.com/) for the status of ClickHouse CI. [Source](https://github.com/ClickHouse/aretestsgreenyet). + +#### Bug Fix + +* Replace domain IP types (IPv4, IPv6) with native. [#43221](https://github.com/ClickHouse/ClickHouse/pull/43221) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). It automatically fixes some missing implementations in the code. +* Fix the backup process if mutations get killed during the backup process. [#45351](https://github.com/ClickHouse/ClickHouse/pull/45351) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix the `Invalid number of rows in Chunk` exception message. [#41404](https://github.com/ClickHouse/ClickHouse/issues/41404). [#42126](https://github.com/ClickHouse/ClickHouse/pull/42126) ([Alexander Gololobov](https://github.com/davenger)). +* Fix possible use of an uninitialized value after executing expressions after sorting. Closes [#43386](https://github.com/ClickHouse/ClickHouse/issues/43386) [#43635](https://github.com/ClickHouse/ClickHouse/pull/43635) ([Kruglov Pavel](https://github.com/Avogar)). +* Better handling of NULL in aggregate combinators, fix possible segfault/logical error while using an obscure optimization `optimize_rewrite_sum_if_to_count_if`. Closes [#43758](https://github.com/ClickHouse/ClickHouse/issues/43758). [#43813](https://github.com/ClickHouse/ClickHouse/pull/43813) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix CREATE USER/ROLE query settings constraints. [#43993](https://github.com/ClickHouse/ClickHouse/pull/43993) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fixed bug with non-parsable default value for `EPHEMERAL` column in table metadata. [#44026](https://github.com/ClickHouse/ClickHouse/pull/44026) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix parsing of bad version from compatibility setting. [#44224](https://github.com/ClickHouse/ClickHouse/pull/44224) ([Kruglov Pavel](https://github.com/Avogar)). +* Bring interval subtraction from datetime in line with addition. [#44241](https://github.com/ClickHouse/ClickHouse/pull/44241) ([ltrk2](https://github.com/ltrk2)). +* Remove limits on the maximum size of the result for view. [#44261](https://github.com/ClickHouse/ClickHouse/pull/44261) ([lizhuoyu5](https://github.com/lzydmxy)). +* Fix possible logical error in cache if `do_not_evict_index_and_mrk_files=1`. Closes [#42142](https://github.com/ClickHouse/ClickHouse/issues/42142). [#44268](https://github.com/ClickHouse/ClickHouse/pull/44268) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix possible too early cache write interruption in write-through cache (caching could be stopped due to false assumption when it shouldn't have). [#44289](https://github.com/ClickHouse/ClickHouse/pull/44289) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix possible crash in the case function `IN` with constant arguments was used as a constant argument together with `LowCardinality`. Fixes [#44221](https://github.com/ClickHouse/ClickHouse/issues/44221). [#44346](https://github.com/ClickHouse/ClickHouse/pull/44346) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix support for complex parameters (like arrays) of parametric aggregate functions. This closes [#30975](https://github.com/ClickHouse/ClickHouse/issues/30975). The aggregate function `sumMapFiltered` was unusable in distributed queries before this change. [#44358](https://github.com/ClickHouse/ClickHouse/pull/44358) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix reading ObjectId in BSON schema inference. [#44382](https://github.com/ClickHouse/ClickHouse/pull/44382) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix race which can lead to premature temp parts removal before merge finishes in ReplicatedMergeTree. This issue could lead to errors like `No such file or directory: xxx`. Fixes [#43983](https://github.com/ClickHouse/ClickHouse/issues/43983). [#44383](https://github.com/ClickHouse/ClickHouse/pull/44383) ([alesapin](https://github.com/alesapin)). +* Some invalid `SYSTEM ... ON CLUSTER` queries worked in an unexpected way if a cluster name was not specified. It's fixed, now invalid queries throw `SYNTAX_ERROR` as they should. Fixes [#44264](https://github.com/ClickHouse/ClickHouse/issues/44264). [#44387](https://github.com/ClickHouse/ClickHouse/pull/44387) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix reading Map type in ORC format. [#44400](https://github.com/ClickHouse/ClickHouse/pull/44400) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix reading columns that are not presented in input data in Parquet/ORC formats. Previously it could lead to error `INCORRECT_NUMBER_OF_COLUMNS`. Closes [#44333](https://github.com/ClickHouse/ClickHouse/issues/44333). [#44405](https://github.com/ClickHouse/ClickHouse/pull/44405) ([Kruglov Pavel](https://github.com/Avogar)). +* Previously the `bar` function used the same 'â–‹' (U+258B "Left five eighths block") character to display both 5/8 and 6/8 bars. This change corrects this behavior by using 'â–Š' (U+258A "Left three quarters block") for displaying 6/8 bar. [#44410](https://github.com/ClickHouse/ClickHouse/pull/44410) ([Alexander Gololobov](https://github.com/davenger)). +* Placing profile settings after profile settings constraints in the configuration file made constraints ineffective. [#44411](https://github.com/ClickHouse/ClickHouse/pull/44411) ([Konstantin Bogdanov](https://github.com/thevar1able)). +* Fix `SYNTAX_ERROR` while running `EXPLAIN AST INSERT` queries with data. Closes [#44207](https://github.com/ClickHouse/ClickHouse/issues/44207). [#44413](https://github.com/ClickHouse/ClickHouse/pull/44413) ([save-my-heart](https://github.com/save-my-heart)). +* Fix reading bool value with CRLF in CSV format. Closes [#44401](https://github.com/ClickHouse/ClickHouse/issues/44401). [#44442](https://github.com/ClickHouse/ClickHouse/pull/44442) ([Kruglov Pavel](https://github.com/Avogar)). +* Don't execute and/or/if/multiIf on a LowCardinality dictionary, so the result type cannot be LowCardinality. It could lead to the error `Illegal column ColumnLowCardinality` in some cases. Fixes [#43603](https://github.com/ClickHouse/ClickHouse/issues/43603). [#44469](https://github.com/ClickHouse/ClickHouse/pull/44469) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix mutations with the setting `max_streams_for_merge_tree_reading`. [#44472](https://github.com/ClickHouse/ClickHouse/pull/44472) ([Anton Popov](https://github.com/CurtizJ)). +* Fix potential null pointer dereference with GROUPING SETS in ASTSelectQuery::formatImpl ([#43049](https://github.com/ClickHouse/ClickHouse/issues/43049)). [#44479](https://github.com/ClickHouse/ClickHouse/pull/44479) ([Robert Schulze](https://github.com/rschu1ze)). +* Validate types in table function arguments, CAST function arguments, JSONAsObject schema inference according to settings. [#44501](https://github.com/ClickHouse/ClickHouse/pull/44501) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix IN function with LowCardinality and const column, close [#44503](https://github.com/ClickHouse/ClickHouse/issues/44503). [#44506](https://github.com/ClickHouse/ClickHouse/pull/44506) ([Duc Canh Le](https://github.com/canhld94)). +* Fixed a bug in the normalization of a `DEFAULT` expression in `CREATE TABLE` statement. The second argument of the function `in` (or the right argument of operator `IN`) might be replaced with the result of its evaluation during CREATE query execution. Fixes [#44496](https://github.com/ClickHouse/ClickHouse/issues/44496). [#44547](https://github.com/ClickHouse/ClickHouse/pull/44547) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Projections do not work in presence of WITH ROLLUP, WITH CUBE and WITH TOTALS. In previous versions, a query produced an exception instead of skipping the usage of projections. This closes [#44614](https://github.com/ClickHouse/ClickHouse/issues/44614). This closes [#42772](https://github.com/ClickHouse/ClickHouse/issues/42772). [#44615](https://github.com/ClickHouse/ClickHouse/pull/44615) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Async blocks were not cleaned because the function `get all blocks sorted by time` didn't get async blocks. [#44651](https://github.com/ClickHouse/ClickHouse/pull/44651) ([Han Fei](https://github.com/hanfei1991)). +* Fix `LOGICAL_ERROR` `The top step of the right pipeline should be ExpressionStep` for JOIN with subquery, UNION, and TOTALS. Fixes [#43687](https://github.com/ClickHouse/ClickHouse/issues/43687). [#44673](https://github.com/ClickHouse/ClickHouse/pull/44673) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Avoid `std::out_of_range` exception in the Executable table engine. [#44681](https://github.com/ClickHouse/ClickHouse/pull/44681) ([Kruglov Pavel](https://github.com/Avogar)). +* Do not apply `optimize_syntax_fuse_functions` to quantiles on AST, close [#44712](https://github.com/ClickHouse/ClickHouse/issues/44712). [#44713](https://github.com/ClickHouse/ClickHouse/pull/44713) ([Vladimir C](https://github.com/vdimir)). +* Fix bug with wrong type in Merge table and PREWHERE, close [#43324](https://github.com/ClickHouse/ClickHouse/issues/43324). [#44716](https://github.com/ClickHouse/ClickHouse/pull/44716) ([Vladimir C](https://github.com/vdimir)). +* Fix a possible crash during shutdown (while destroying TraceCollector). Fixes [#44757](https://github.com/ClickHouse/ClickHouse/issues/44757). [#44758](https://github.com/ClickHouse/ClickHouse/pull/44758) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix a possible crash in distributed query processing. The crash could happen if a query with totals or extremes returned an empty result and there are mismatched types in the Distributed and the local tables. Fixes [#44738](https://github.com/ClickHouse/ClickHouse/issues/44738). [#44760](https://github.com/ClickHouse/ClickHouse/pull/44760) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix fsync for fetches (`min_compressed_bytes_to_fsync_after_fetch`)/small files (ttl.txt, columns.txt) in mutations (`min_rows_to_fsync_after_merge`/`min_compressed_bytes_to_fsync_after_merge`). [#44781](https://github.com/ClickHouse/ClickHouse/pull/44781) ([Azat Khuzhin](https://github.com/azat)). +* A rare race condition was possible when querying the `system.parts` or `system.parts_columns` tables in the presence of parts being moved between disks. Introduced in [#41145](https://github.com/ClickHouse/ClickHouse/issues/41145). [#44809](https://github.com/ClickHouse/ClickHouse/pull/44809) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix the error `Context has expired` which could appear with enabled projections optimization. Can be reproduced for queries with specific functions, like `dictHas/dictGet` which use context in runtime. Fixes [#44844](https://github.com/ClickHouse/ClickHouse/issues/44844). [#44850](https://github.com/ClickHouse/ClickHouse/pull/44850) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* A fix for `Cannot read all data` error which could happen while reading `LowCardinality` dictionary from remote fs. Fixes [#44709](https://github.com/ClickHouse/ClickHouse/issues/44709). [#44875](https://github.com/ClickHouse/ClickHouse/pull/44875) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Ignore cases when hardware monitor sensors cannot be read instead of showing a full exception message in logs. [#44895](https://github.com/ClickHouse/ClickHouse/pull/44895) ([Raúl Marín](https://github.com/Algunenano)). +* Use `max_delay_to_insert` value in case the calculated time to delay INSERT exceeds the setting value. Related to [#44902](https://github.com/ClickHouse/ClickHouse/issues/44902). [#44916](https://github.com/ClickHouse/ClickHouse/pull/44916) ([Igor Nikonov](https://github.com/devcrafter)). +* Fix error `Different order of columns in UNION subquery` for queries with `UNION`. Fixes [#44866](https://github.com/ClickHouse/ClickHouse/issues/44866). [#44920](https://github.com/ClickHouse/ClickHouse/pull/44920) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Delay for INSERT can be calculated incorrectly, which can lead to always using `max_delay_to_insert` setting as delay instead of a correct value. Using simple formula `max_delay_to_insert * (parts_over_threshold/max_allowed_parts_over_threshold)` i.e. delay grows proportionally to parts over threshold. Closes [#44902](https://github.com/ClickHouse/ClickHouse/issues/44902). [#44954](https://github.com/ClickHouse/ClickHouse/pull/44954) ([Igor Nikonov](https://github.com/devcrafter)). +* Fix alter table TTL error when a wide part has the lightweight delete mask. [#44959](https://github.com/ClickHouse/ClickHouse/pull/44959) ([Mingliang Pan](https://github.com/liangliangpan)). +* Follow-up fix for Replace domain IP types (IPv4, IPv6) with native [#43221](https://github.com/ClickHouse/ClickHouse/issues/43221). [#45024](https://github.com/ClickHouse/ClickHouse/pull/45024) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Follow-up fix for Replace domain IP types (IPv4, IPv6) with native https://github.com/ClickHouse/ClickHouse/pull/43221. [#45043](https://github.com/ClickHouse/ClickHouse/pull/45043) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* A buffer overflow was possible in the parser. Found by fuzzer. [#45047](https://github.com/ClickHouse/ClickHouse/pull/45047) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix possible cannot-read-all-data error in storage FileLog. Closes [#45051](https://github.com/ClickHouse/ClickHouse/issues/45051), [#38257](https://github.com/ClickHouse/ClickHouse/issues/38257). [#45057](https://github.com/ClickHouse/ClickHouse/pull/45057) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Memory efficient aggregation (setting `distributed_aggregation_memory_efficient`) is disabled when grouping sets are present in the query. [#45058](https://github.com/ClickHouse/ClickHouse/pull/45058) ([Nikita Taranov](https://github.com/nickitat)). +* Fix `RANGE_HASHED` dictionary to count range columns as part of the primary key during updates when `update_field` is specified. Closes [#44588](https://github.com/ClickHouse/ClickHouse/issues/44588). [#45061](https://github.com/ClickHouse/ClickHouse/pull/45061) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix error `Cannot capture column` for `LowCardinality` captured argument of nested lambda. Fixes [#45028](https://github.com/ClickHouse/ClickHouse/issues/45028). [#45065](https://github.com/ClickHouse/ClickHouse/pull/45065) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix the wrong query result of `additional_table_filters` (additional filter was not applied) in case the minmax/count projection is used. [#45133](https://github.com/ClickHouse/ClickHouse/pull/45133) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed bug in `histogram` function accepting negative values. [#45147](https://github.com/ClickHouse/ClickHouse/pull/45147) ([simpleton](https://github.com/rgzntrade)). +* Fix wrong column nullability in StoreageJoin, close [#44940](https://github.com/ClickHouse/ClickHouse/issues/44940). [#45184](https://github.com/ClickHouse/ClickHouse/pull/45184) ([Vladimir C](https://github.com/vdimir)). +* Fix `background_fetches_pool_size` settings reload (increase at runtime). [#45189](https://github.com/ClickHouse/ClickHouse/pull/45189) ([Raúl Marín](https://github.com/Algunenano)). +* Correctly process `SELECT` queries on KV engines (e.g. KeeperMap, EmbeddedRocksDB) using `IN` on the key with subquery producing different type. [#45215](https://github.com/ClickHouse/ClickHouse/pull/45215) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix logical error in SEMI JOIN & join_use_nulls in some cases, close [#45163](https://github.com/ClickHouse/ClickHouse/issues/45163), close [#45209](https://github.com/ClickHouse/ClickHouse/issues/45209). [#45230](https://github.com/ClickHouse/ClickHouse/pull/45230) ([Vladimir C](https://github.com/vdimir)). +* Fix heap-use-after-free in reading from s3. [#45253](https://github.com/ClickHouse/ClickHouse/pull/45253) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix bug when the Avro Union type is ['null', Nested type], closes [#45275](https://github.com/ClickHouse/ClickHouse/issues/45275). Fix bug that incorrectly infers `bytes` type to `Float`. [#45276](https://github.com/ClickHouse/ClickHouse/pull/45276) ([flynn](https://github.com/ucasfl)). +* Throw a correct exception when explicit PREWHERE cannot be used with a table using the storage engine `Merge`. [#45319](https://github.com/ClickHouse/ClickHouse/pull/45319) ([Antonio Andelic](https://github.com/antonio2368)). +* Under WSL1 Ubuntu self-extracting ClickHouse fails to decompress due to inconsistency - /proc/self/maps reporting 32bit file's inode, while stat reporting 64bit inode. [#45339](https://github.com/ClickHouse/ClickHouse/pull/45339) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix race in Distributed table startup (that could lead to processing file of async INSERT multiple times). [#45360](https://github.com/ClickHouse/ClickHouse/pull/45360) ([Azat Khuzhin](https://github.com/azat)). +* Fix a possible crash while reading from storage `S3` and table function `s3` in the case when `ListObject` request has failed. [#45371](https://github.com/ClickHouse/ClickHouse/pull/45371) ([Anton Popov](https://github.com/CurtizJ)). +* Fix `SELECT ... FROM system.dictionaries` exception when there is a dictionary with a bad structure (e.g. incorrect type in XML config). [#45399](https://github.com/ClickHouse/ClickHouse/pull/45399) ([Aleksei Filatov](https://github.com/aalexfvk)). +* Fix s3Cluster schema inference when structure from insertion table is used in `INSERT INTO ... SELECT * FROM s3Cluster` queries. [#45422](https://github.com/ClickHouse/ClickHouse/pull/45422) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix bug in JSON/BSONEachRow parsing with HTTP that could lead to using default values for some columns instead of values from data. [#45424](https://github.com/ClickHouse/ClickHouse/pull/45424) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixed bug (Code: 632. DB::Exception: Unexpected data ... after parsed IPv6 value ...) with typed parsing of IP types from text source. [#45425](https://github.com/ClickHouse/ClickHouse/pull/45425) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* close [#45297](https://github.com/ClickHouse/ClickHouse/issues/45297) Add check for empty regular expressions. [#45428](https://github.com/ClickHouse/ClickHouse/pull/45428) ([Han Fei](https://github.com/hanfei1991)). +* Fix possible (likely distributed) query hung. [#45448](https://github.com/ClickHouse/ClickHouse/pull/45448) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible deadlock with `allow_asynchronous_read_from_io_pool_for_merge_tree` enabled in case of exception from `ThreadPool::schedule`. [#45481](https://github.com/ClickHouse/ClickHouse/pull/45481) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix possible in-use table after DETACH. [#45493](https://github.com/ClickHouse/ClickHouse/pull/45493) ([Azat Khuzhin](https://github.com/azat)). +* Fix rare abort in the case when a query is canceled and parallel parsing was used during its execution. [#45498](https://github.com/ClickHouse/ClickHouse/pull/45498) ([Anton Popov](https://github.com/CurtizJ)). +* Fix a race between Distributed table creation and INSERT into it (could lead to CANNOT_LINK during INSERT into the table). [#45502](https://github.com/ClickHouse/ClickHouse/pull/45502) ([Azat Khuzhin](https://github.com/azat)). +* Add proper default (SLRU) to cache policy getter. Closes [#45514](https://github.com/ClickHouse/ClickHouse/issues/45514). [#45524](https://github.com/ClickHouse/ClickHouse/pull/45524) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Disallow array join in mutations closes [#42637](https://github.com/ClickHouse/ClickHouse/issues/42637) [#44447](https://github.com/ClickHouse/ClickHouse/pull/44447) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Fix for qualified asterisks with alias table name and column transformer. Resolves [#44736](https://github.com/ClickHouse/ClickHouse/issues/44736). [#44755](https://github.com/ClickHouse/ClickHouse/pull/44755) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). + +## [Changelog for 2022](https://clickhouse.com/docs/ja/whats-new/changelog/2022) diff --git a/docs/ja/whats-new/changelog/_category_.yml b/docs/ja/whats-new/changelog/_category_.yml new file mode 100644 index 00000000000..133c43eeda3 --- /dev/null +++ b/docs/ja/whats-new/changelog/_category_.yml @@ -0,0 +1,7 @@ +position: 10 +label: 'Changelog' +collapsible: true +collapsed: true +link: + type: generated-index + title: Changelog diff --git a/docs/ja/whats-new/changelog/cloud.md b/docs/ja/whats-new/changelog/cloud.md new file mode 100644 index 00000000000..fd538cf56d5 --- /dev/null +++ b/docs/ja/whats-new/changelog/cloud.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 1 +sidebar_label: Cloud +--- +# Cloud Changelog + +import CloudChangelog from '@site/docs/ja/cloud/reference/changelog.md'; + + diff --git a/docs/ja/whats-new/changelog/index.md b/docs/ja/whats-new/changelog/index.md new file mode 100644 index 00000000000..67cd30a94a6 --- /dev/null +++ b/docs/ja/whats-new/changelog/index.md @@ -0,0 +1,184 @@ +--- +slug: /ja/whats-new/changelog/ +sidebar_position: 2 +sidebar_label: 2024 +title: 2024 Changelog +note: This file is autogenerated by the yarn new-build +--- + +### Table of Contents +**[ClickHouse release v24.1, 2024-01-30](#241)**
    +**[Changelog for 2023](https://clickhouse.com/docs/en/whats-new/changelog/2023/)**
    + +# 2024 Changelog + +### ClickHouse release 24.1, 2024-01-30 + +#### Backward Incompatible Change +* The setting `print_pretty_type_names` is turned on by default. You can turn it off to keep the old behavior or `SET compatibility = '23.12'`. [#57726](https://github.com/ClickHouse/ClickHouse/pull/57726) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The MergeTree setting `clean_deleted_rows` is deprecated, it has no effect anymore. The `CLEANUP` keyword for `OPTIMIZE` is not allowed by default (unless `allow_experimental_replacing_merge_with_cleanup` is enabled). [#58316](https://github.com/ClickHouse/ClickHouse/pull/58316) ([Alexander Tokmakov](https://github.com/tavplubix)). +* The function `reverseDNSQuery` is no longer available. This closes [#58368](https://github.com/ClickHouse/ClickHouse/issues/58368). [#58369](https://github.com/ClickHouse/ClickHouse/pull/58369) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Enable various changes to improve the access control in the configuration file. These changes affect the behavior, and you check the `config.xml` in the `access_control_improvements` section. In case you are not confident, keep the values in the configuration file as they were in the previous version. [#58584](https://github.com/ClickHouse/ClickHouse/pull/58584) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Improve the operation of `sumMapFiltered` with NaN values. NaN values are now placed at the end (instead of randomly) and considered different from any values. `-0` is now also treated as equal to `0`; since 0 values are discarded, `-0` values are discarded too. [#58959](https://github.com/ClickHouse/ClickHouse/pull/58959) ([Raúl Marín](https://github.com/Algunenano)). +* The function `visibleWidth` will behave according to the docs. In previous versions, it simply counted code points after string serialization, like the `lengthUTF8` function, but didn't consider zero-width and combining characters, full-width characters, tabs, and deletes. Now the behavior is changed accordingly. If you want to keep the old behavior, set `function_visible_width_behavior` to `0`, or set `compatibility` to `23.12` or lower. [#59022](https://github.com/ClickHouse/ClickHouse/pull/59022) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* `Kusto` dialect is disabled until these two bugs will be fixed: [#59037](https://github.com/ClickHouse/ClickHouse/issues/59037) and [#59036](https://github.com/ClickHouse/ClickHouse/issues/59036). [#59305](https://github.com/ClickHouse/ClickHouse/pull/59305) ([Alexey Milovidov](https://github.com/alexey-milovidov)). Any attempt to use `Kusto` will result in exception. +* More efficient implementation of the `FINAL` modifier no longer guarantees preserving the order even if `max_threads = 1`. If you counted on the previous behavior, set `enable_vertical_final` to 0 or `compatibility` to `23.12`. + +#### New Feature +* Implement Variant data type that represents a union of other data types. Type `Variant(T1, T2, ..., TN)` means that each row of this type has a value of either type `T1` or `T2` or ... or `TN` or none of them (`NULL` value). Variant type is available under a setting `allow_experimental_variant_type`. Reference: [#54864](https://github.com/ClickHouse/ClickHouse/issues/54864). [#58047](https://github.com/ClickHouse/ClickHouse/pull/58047) ([Kruglov Pavel](https://github.com/Avogar)). +* Certain settings (currently `min_compress_block_size` and `max_compress_block_size`) can now be specified at column-level where they take precedence over the corresponding table-level setting. Example: `CREATE TABLE tab (col String SETTINGS (min_compress_block_size = 81920, max_compress_block_size = 163840)) ENGINE = MergeTree ORDER BY tuple();`. [#55201](https://github.com/ClickHouse/ClickHouse/pull/55201) ([Duc Canh Le](https://github.com/canhld94)). +* Add `quantileDD` aggregate function as well as the corresponding `quantilesDD` and `medianDD`. It is based on the DDSketch https://www.vldb.org/pvldb/vol12/p2195-masson.pdf. ### Documentation entry for user-facing changes. [#56342](https://github.com/ClickHouse/ClickHouse/pull/56342) ([Srikanth Chekuri](https://github.com/srikanthccv)). +* Allow to configure any kind of object storage with any kind of metadata type. [#58357](https://github.com/ClickHouse/ClickHouse/pull/58357) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Added `null_status_on_timeout_only_active` and `throw_only_active` modes for `distributed_ddl_output_mode` that allow to avoid waiting for inactive replicas. [#58350](https://github.com/ClickHouse/ClickHouse/pull/58350) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Allow partitions from tables with different partition expressions to be attached when the destination table partition expression doesn't re-partition/split the part. [#39507](https://github.com/ClickHouse/ClickHouse/pull/39507) ([Arthur Passos](https://github.com/arthurpassos)). +* Add function `arrayShingles` to compute subarrays, e.g. `arrayShingles([1, 2, 3, 4, 5], 3)` returns `[[1,2,3],[2,3,4],[3,4,5]]`. [#58396](https://github.com/ClickHouse/ClickHouse/pull/58396) ([Zheng Miao](https://github.com/zenmiao7)). +* Added functions `punycodeEncode`, `punycodeDecode`, `idnaEncode` and `idnaDecode` which are useful for translating international domain names to an ASCII representation according to the IDNA standard. [#58454](https://github.com/ClickHouse/ClickHouse/pull/58454) ([Robert Schulze](https://github.com/rschu1ze)). +* Added string similarity functions `dramerauLevenshteinDistance`, `jaroSimilarity` and `jaroWinklerSimilarity`. [#58531](https://github.com/ClickHouse/ClickHouse/pull/58531) ([Robert Schulze](https://github.com/rschu1ze)). +* Add two settings `output_format_compression_level` to change output compression level and `output_format_compression_zstd_window_log` to explicitly set compression window size and enable long-range mode for zstd compression if output compression method is `zstd`. Applied for `INTO OUTFILE` and when writing to table functions `file`, `url`, `hdfs`, `s3`, and `azureBlobStorage`. [#58539](https://github.com/ClickHouse/ClickHouse/pull/58539) ([Duc Canh Le](https://github.com/canhld94)). +* Automatically disable ANSI escape sequences in Pretty formats if the output is not a terminal. Add new `auto` mode to setting `output_format_pretty_color`. [#58614](https://github.com/ClickHouse/ClickHouse/pull/58614) ([Shaun Struwig](https://github.com/Blargian)). +* Added function `sqidDecode` which decodes [Sqids](https://sqids.org/). [#58544](https://github.com/ClickHouse/ClickHouse/pull/58544) ([Robert Schulze](https://github.com/rschu1ze)). +* Allow to read Bool values into String in JSON input formats. It's done under a setting `input_format_json_read_bools_as_strings` that is enabled by default. [#58561](https://github.com/ClickHouse/ClickHouse/pull/58561) ([Kruglov Pavel](https://github.com/Avogar)). +* Added function `seriesDecomposeSTL` which decomposes a time series into a season, a trend and a residual component. [#57078](https://github.com/ClickHouse/ClickHouse/pull/57078) ([Bhavna Jindal](https://github.com/bhavnajindal)). +* Introduced MySQL Binlog Client for MaterializedMySQL: One binlog connection for many databases. [#57323](https://github.com/ClickHouse/ClickHouse/pull/57323) ([Val Doroshchuk](https://github.com/valbok)). +* Intel QuickAssist Technology (QAT) provides hardware-accelerated compression and cryptograpy. ClickHouse got a new compression codec `ZSTD_QAT` which utilizes QAT for zstd compression. The codec uses [Intel's QATlib](https://github.com/intel/qatlib) and [Inte's QAT ZSTD Plugin](https://github.com/intel/QAT-ZSTD-Plugin). Right now, only compression can be accelerated in hardware (a software fallback kicks in in case QAT could not be initialized), decompression always runs in software. [#57509](https://github.com/ClickHouse/ClickHouse/pull/57509) ([jasperzhu](https://github.com/jinjunzh)). +* Implementing the new way how object storage keys are generated for s3 disks. Now the format could be defined in terms of `re2` regex syntax with `key_template` option in disc description. [#57663](https://github.com/ClickHouse/ClickHouse/pull/57663) ([Sema Checherinda](https://github.com/CheSema)). +* Table system.dropped_tables_parts contains parts of system.dropped_tables tables (dropped but not yet removed tables). [#58038](https://github.com/ClickHouse/ClickHouse/pull/58038) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Add settings `max_materialized_views_size_for_table` to limit the number of materialized views attached to a table. [#58068](https://github.com/ClickHouse/ClickHouse/pull/58068) ([zhongyuankai](https://github.com/zhongyuankai)). +* `clickhouse-format` improvements: support INSERT queries with `VALUES`; support comments (use `--comments` to output them); support `--max_line_length` option to format only long queries in multiline. [#58246](https://github.com/ClickHouse/ClickHouse/pull/58246) ([vdimir](https://github.com/vdimir)). +* Attach all system tables in `clickhouse-local`, including `system.parts`. This closes [#58312](https://github.com/ClickHouse/ClickHouse/issues/58312). [#58359](https://github.com/ClickHouse/ClickHouse/pull/58359) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Support for `Enum` data types in function `transform`. This closes [#58241](https://github.com/ClickHouse/ClickHouse/issues/58241). [#58360](https://github.com/ClickHouse/ClickHouse/pull/58360) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add table `system.database_engines`. [#58390](https://github.com/ClickHouse/ClickHouse/pull/58390) ([Bharat Nallan](https://github.com/bharatnc)). Allow registering database engines independently in the codebase. [#58365](https://github.com/ClickHouse/ClickHouse/pull/58365) ([Bharat Nallan](https://github.com/bharatnc)). Allow registering interpreters independently. [#58443](https://github.com/ClickHouse/ClickHouse/pull/58443) ([Bharat Nallan](https://github.com/bharatnc)). +* Added `FROM ` modifier for `SYSTEM SYNC REPLICA LIGHTWEIGHT` query. With the `FROM` modifier ensures we wait for fetches and drop-ranges only for the specified source replicas, as well as any replica not in zookeeper or with an empty source_replica. [#58393](https://github.com/ClickHouse/ClickHouse/pull/58393) ([Jayme Bird](https://github.com/jaymebrd)). +* Added setting `update_insert_deduplication_token_in_dependent_materialized_views`. This setting allows to update insert deduplication token with table identifier during insert in dependent materialized views. Closes [#59165](https://github.com/ClickHouse/ClickHouse/issues/59165). [#59238](https://github.com/ClickHouse/ClickHouse/pull/59238) ([Maksim Kita](https://github.com/kitaisreal)). +* Added statement `SYSTEM RELOAD ASYNCHRONOUS METRICS` which updates the asynchronous metrics. Mostly useful for testing and development. [#53710](https://github.com/ClickHouse/ClickHouse/pull/53710) ([Robert Schulze](https://github.com/rschu1ze)). + +#### Performance Improvement +* Coordination for parallel replicas is rewritten for better parallelism and cache locality. It has been tested for linear scalability on hundreds of replicas. It also got support for reading in order. [#57968](https://github.com/ClickHouse/ClickHouse/pull/57968) ([Nikita Taranov](https://github.com/nickitat)). +* Replace HTTP outgoing buffering based with the native ClickHouse buffers. Add bytes counting metrics for interfaces. [#56064](https://github.com/ClickHouse/ClickHouse/pull/56064) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Large aggregation states of `uniqExact` will be merged in parallel in distrubuted queries. [#59009](https://github.com/ClickHouse/ClickHouse/pull/59009) ([Nikita Taranov](https://github.com/nickitat)). +* Lower memory usage after reading from `MergeTree` tables. [#59290](https://github.com/ClickHouse/ClickHouse/pull/59290) ([Anton Popov](https://github.com/CurtizJ)). +* Lower memory usage in vertical merges. [#59340](https://github.com/ClickHouse/ClickHouse/pull/59340) ([Anton Popov](https://github.com/CurtizJ)). +* Avoid huge memory consumption during Keeper startup for more cases. [#58455](https://github.com/ClickHouse/ClickHouse/pull/58455) ([Antonio Andelic](https://github.com/antonio2368)). +* Keeper improvement: reduce Keeper's memory usage for stored nodes. [#59002](https://github.com/ClickHouse/ClickHouse/pull/59002) ([Antonio Andelic](https://github.com/antonio2368)). +* More cache-friendly final implementation. Note on the behaviour change: previously queries with `FINAL` modifier that read with a single stream (e.g. `max_threads = 1`) produced sorted output without explicitly provided `ORDER BY` clause. This is no longer guaranteed when `enable_vertical_final = true` (and it is so by default). [#54366](https://github.com/ClickHouse/ClickHouse/pull/54366) ([Duc Canh Le](https://github.com/canhld94)). +* Bypass extra copying in `ReadBufferFromIStream` which is used, e.g., for reading from S3. [#56961](https://github.com/ClickHouse/ClickHouse/pull/56961) ([Nikita Taranov](https://github.com/nickitat)). +* Optimize array element function when input is Array(Map)/Array(Array(Num)/Array(Array(String))/Array(BigInt)/Array(Decimal). The previous implementations did more allocations than needed. The optimization speed up is up to ~6x especially when input type is Array(Map). [#56403](https://github.com/ClickHouse/ClickHouse/pull/56403) ([æŽæ‰¬](https://github.com/taiyang-li)). +* Read column once while reading more than one subcolumn from it in compact parts. [#57631](https://github.com/ClickHouse/ClickHouse/pull/57631) ([Kruglov Pavel](https://github.com/Avogar)). +* Rewrite the AST of `sum(column + constant)` function. This is available as an optimization pass for Analyzer [#57853](https://github.com/ClickHouse/ClickHouse/pull/57853) ([Jiebin Sun](https://github.com/jiebinn)). +* The evaluation of function `match` now utilizes skipping indices `ngrambf_v1` and `tokenbf_v1`. [#57882](https://github.com/ClickHouse/ClickHouse/pull/57882) ([凌涛](https://github.com/lingtaolf)). +* The evaluation of function `match` now utilizes inverted indices. [#58284](https://github.com/ClickHouse/ClickHouse/pull/58284) ([凌涛](https://github.com/lingtaolf)). +* MergeTree `FINAL` does not compare rows from same non-L0 part. [#58142](https://github.com/ClickHouse/ClickHouse/pull/58142) ([Duc Canh Le](https://github.com/canhld94)). +* Speed up iota calls (filling array with consecutive numbers). [#58271](https://github.com/ClickHouse/ClickHouse/pull/58271) ([Raúl Marín](https://github.com/Algunenano)). +* Speedup MIN/MAX for non-numeric types. [#58334](https://github.com/ClickHouse/ClickHouse/pull/58334) ([Raúl Marín](https://github.com/Algunenano)). +* Optimize the combination of filters (like in multi-stage PREWHERE) with BMI2/SSE intrinsics [#58800](https://github.com/ClickHouse/ClickHouse/pull/58800) ([Zhiguo Zhou](https://github.com/ZhiguoZh)). +* Use one thread less in `clickhouse-local`. [#58968](https://github.com/ClickHouse/ClickHouse/pull/58968) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Improve the `multiIf` function performance when the type is Nullable. [#57745](https://github.com/ClickHouse/ClickHouse/pull/57745) ([KevinyhZou](https://github.com/KevinyhZou)). +* Add `SYSTEM JEMALLOC PURGE` for purging unused jemalloc pages, `SYSTEM JEMALLOC [ ENABLE | DISABLE | FLUSH ] PROFILE` for controlling jemalloc profile if the profiler is enabled. Add jemalloc-related 4LW command in Keeper: `jmst` for dumping jemalloc stats, `jmfp`, `jmep`, `jmdp` for controlling jemalloc profile if the profiler is enabled. [#58665](https://github.com/ClickHouse/ClickHouse/pull/58665) ([Antonio Andelic](https://github.com/antonio2368)). +* Lower memory consumption in backups to S3. [#58962](https://github.com/ClickHouse/ClickHouse/pull/58962) ([Vitaly Baranov](https://github.com/vitlibar)). + +#### Improvement +* Added comments (brief descriptions) to all columns of system tables. There are several reasons for this: - We use system tables a lot, and sometimes it could be very difficult for developer to understand the purpose and the meaning of a particular column. - We change (add new ones or modify existing) system tables a lot and the documentation for them is always outdated. For example take a look at the documentation page for [`system.parts`](https://clickhouse.com/docs/en/operations/system-tables/parts). It misses a lot of columns - We would like to eventually generate documentation directly from ClickHouse. [#58356](https://github.com/ClickHouse/ClickHouse/pull/58356) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Allow queries without aliases for subqueries for `PASTE JOIN`. [#58654](https://github.com/ClickHouse/ClickHouse/pull/58654) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Enable `MySQL`/`MariaDB` integration on macOS. This closes [#21191](https://github.com/ClickHouse/ClickHouse/issues/21191). [#46316](https://github.com/ClickHouse/ClickHouse/pull/46316) ([Alexey Milovidov](https://github.com/alexey-milovidov)) ([Robert Schulze](https://github.com/rschu1ze)). +* Disable `max_rows_in_set_to_optimize_join` by default. [#56396](https://github.com/ClickHouse/ClickHouse/pull/56396) ([vdimir](https://github.com/vdimir)). +* Add `` config parameter that allows avoiding resolving hostnames in ON CLUSTER DDL queries and Replicated database engines. This mitigates the possibility of the queue being stuck in case of a change in cluster definition. Closes [#57573](https://github.com/ClickHouse/ClickHouse/issues/57573). [#57603](https://github.com/ClickHouse/ClickHouse/pull/57603) ([Nikolay Degterinsky](https://github.com/evillique)). +* Increase `load_metadata_threads` to 16 for the filesystem cache. It will make the server start up faster. [#57732](https://github.com/ClickHouse/ClickHouse/pull/57732) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add ability to throttle merges/mutations (`max_mutations_bandwidth_for_server`/`max_merges_bandwidth_for_server`). [#57877](https://github.com/ClickHouse/ClickHouse/pull/57877) ([Azat Khuzhin](https://github.com/azat)). +* Replaced undocumented (boolean) column `is_hot_reloadable` in system table `system.server_settings` by (Enum8) column `changeable_without_restart` with possible values `No`, `Yes`, `IncreaseOnly` and `DecreaseOnly`. Also documented the column. [#58029](https://github.com/ClickHouse/ClickHouse/pull/58029) ([skyoct](https://github.com/skyoct)). +* Cluster discovery supports setting username and password, close [#58063](https://github.com/ClickHouse/ClickHouse/issues/58063). [#58123](https://github.com/ClickHouse/ClickHouse/pull/58123) ([vdimir](https://github.com/vdimir)). +* Support query parameters in `ALTER TABLE ... PART`. [#58297](https://github.com/ClickHouse/ClickHouse/pull/58297) ([Azat Khuzhin](https://github.com/azat)). +* Create consumers for Kafka tables on the fly (but keep them for some period - `kafka_consumers_pool_ttl_ms`, since last used), this should fix problem with statistics for `system.kafka_consumers` (that does not consumed when nobody reads from Kafka table, which leads to live memory leak and slow table detach) and also this PR enables stats for `system.kafka_consumers` by default again. [#58310](https://github.com/ClickHouse/ClickHouse/pull/58310) ([Azat Khuzhin](https://github.com/azat)). +* `sparkBar` as an alias to `sparkbar`. [#58335](https://github.com/ClickHouse/ClickHouse/pull/58335) ([凌涛](https://github.com/lingtaolf)). +* Avoid sending `ComposeObject` requests after upload to `GCS`. [#58343](https://github.com/ClickHouse/ClickHouse/pull/58343) ([Azat Khuzhin](https://github.com/azat)). +* Correctly handle keys with dot in the name in configurations XMLs. [#58354](https://github.com/ClickHouse/ClickHouse/pull/58354) ([Azat Khuzhin](https://github.com/azat)). +* Make function `format` return constant on constant arguments. This closes [#58355](https://github.com/ClickHouse/ClickHouse/issues/58355). [#58358](https://github.com/ClickHouse/ClickHouse/pull/58358) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Adding a setting `max_estimated_execution_time` to separate `max_execution_time` and `max_estimated_execution_time`. [#58402](https://github.com/ClickHouse/ClickHouse/pull/58402) ([Zhang Yifan](https://github.com/zhangyifan27)). +* Provide a hint when an invalid database engine name is used. [#58444](https://github.com/ClickHouse/ClickHouse/pull/58444) ([Bharat Nallan](https://github.com/bharatnc)). +* Add settings for better control of indexes type in Arrow dictionary. Use signed integer type for indexes by default as Arrow recommends. Closes [#57401](https://github.com/ClickHouse/ClickHouse/issues/57401). [#58519](https://github.com/ClickHouse/ClickHouse/pull/58519) ([Kruglov Pavel](https://github.com/Avogar)). +* Implement [#58575](https://github.com/ClickHouse/ClickHouse/issues/58575) Support `CLICKHOUSE_PASSWORD_FILE ` environment variable when running the docker image. [#58583](https://github.com/ClickHouse/ClickHouse/pull/58583) ([Eyal Halpern Shalev](https://github.com/Eyal-Shalev)). +* When executing some queries, which require a lot of streams for reading data, the error `"Paste JOIN requires sorted tables only"` was previously thrown. Now the numbers of streams resize to 1 in that case. [#58608](https://github.com/ClickHouse/ClickHouse/pull/58608) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Better message for INVALID_IDENTIFIER error. [#58703](https://github.com/ClickHouse/ClickHouse/pull/58703) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Improved handling of signed numeric literals in normalizeQuery. [#58710](https://github.com/ClickHouse/ClickHouse/pull/58710) ([Salvatore Mesoraca](https://github.com/aiven-sal)). +* Support Point data type for MySQL. [#58721](https://github.com/ClickHouse/ClickHouse/pull/58721) ([Kseniia Sumarokova](https://github.com/kssenii)). +* When comparing a Float32 column and a const string, read the string as Float32 (instead of Float64). [#58724](https://github.com/ClickHouse/ClickHouse/pull/58724) ([Raúl Marín](https://github.com/Algunenano)). +* Improve S3 compatibility, add ECloud EOS storage support. [#58786](https://github.com/ClickHouse/ClickHouse/pull/58786) ([xleoken](https://github.com/xleoken)). +* Allow `KILL QUERY` to cancel backups / restores. This PR also makes running backups and restores visible in `system.processes`. Also, there is a new setting in the server configuration now - `shutdown_wait_backups_and_restores` (default=true) which makes the server either wait on shutdown for all running backups and restores to finish or just cancel them. [#58804](https://github.com/ClickHouse/ClickHouse/pull/58804) ([Vitaly Baranov](https://github.com/vitlibar)). +* Avro format to support ZSTD codec. Closes [#58735](https://github.com/ClickHouse/ClickHouse/issues/58735). [#58805](https://github.com/ClickHouse/ClickHouse/pull/58805) ([flynn](https://github.com/ucasfl)). +* MySQL interface gained support for `net_write_timeout` and `net_read_timeout` settings. `net_write_timeout` is translated into the native `send_timeout` ClickHouse setting and, similarly, `net_read_timeout` into `receive_timeout`. Fixed an issue where it was possible to set MySQL `sql_select_limit` setting only if the entire statement was in upper case. [#58835](https://github.com/ClickHouse/ClickHouse/pull/58835) ([Serge Klochkov](https://github.com/slvrtrn)). +* A better exception message while conflict of creating dictionary and table with the same name. [#58841](https://github.com/ClickHouse/ClickHouse/pull/58841) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Make sure that for custom (created from SQL) disks ether `filesystem_caches_path` (a common directory prefix for all filesystem caches) or `custom_cached_disks_base_directory` (a common directory prefix for only filesystem caches created from custom disks) is specified in server config. `custom_cached_disks_base_directory` has higher priority for custom disks over `filesystem_caches_path`, which is used if the former one is absent. Filesystem cache setting `path` must lie inside that directory, otherwise exception will be thrown preventing disk to be created. This will not affect disks created on an older version and server was upgraded - then the exception will not be thrown to allow the server to successfully start). `custom_cached_disks_base_directory` is added to default server config as `/var/lib/clickhouse/caches/`. Closes [#57825](https://github.com/ClickHouse/ClickHouse/issues/57825). [#58869](https://github.com/ClickHouse/ClickHouse/pull/58869) ([Kseniia Sumarokova](https://github.com/kssenii)). +* MySQL interface gained compatibility with `SHOW WARNINGS`/`SHOW COUNT(*) WARNINGS` queries, though the returned result is always an empty set. [#58929](https://github.com/ClickHouse/ClickHouse/pull/58929) ([Serge Klochkov](https://github.com/slvrtrn)). +* Skip unavailable replicas when executing parallel distributed `INSERT SELECT`. [#58931](https://github.com/ClickHouse/ClickHouse/pull/58931) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Display word-descriptive log level while enabling structured log formatting in json. [#58936](https://github.com/ClickHouse/ClickHouse/pull/58936) ([Tim Liou](https://github.com/wheatdog)). +* MySQL interface gained support for `CAST(x AS SIGNED)` and `CAST(x AS UNSIGNED)` statements via data type aliases: `SIGNED` for Int64, and `UNSIGNED` for UInt64. This improves compatibility with BI tools such as Looker Studio. [#58954](https://github.com/ClickHouse/ClickHouse/pull/58954) ([Serge Klochkov](https://github.com/slvrtrn)). +* Change working directory to the data path in docker container. [#58975](https://github.com/ClickHouse/ClickHouse/pull/58975) ([cangyin](https://github.com/cangyin)). +* Added setting for Azure Blob Storage `azure_max_unexpected_write_error_retries` , can also be set from config under azure section. [#59001](https://github.com/ClickHouse/ClickHouse/pull/59001) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Allow server to start with broken data lake table. Closes [#58625](https://github.com/ClickHouse/ClickHouse/issues/58625). [#59080](https://github.com/ClickHouse/ClickHouse/pull/59080) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Allow to ignore schema evolution in the `Iceberg` table engine and read all data using schema specified by the user on table creation or latest schema parsed from metadata on table creation. This is done under a setting `iceberg_engine_ignore_schema_evolution` that is disabled by default. Note that enabling this setting can lead to incorrect result as in case of evolved schema all data files will be read using the same schema. [#59133](https://github.com/ClickHouse/ClickHouse/pull/59133) ([Kruglov Pavel](https://github.com/Avogar)). +* Prohibit mutable operations (`INSERT`/`ALTER`/`OPTIMIZE`/...) on read-only/write-once storages with a proper `TABLE_IS_READ_ONLY` error (to avoid leftovers). Avoid leaving left-overs on write-once disks (`format_version.txt`) on `CREATE`/`ATTACH`. Ignore `DROP` for `ReplicatedMergeTree` (so as for `MergeTree`). Fix iterating over `s3_plain` (`MetadataStorageFromPlainObjectStorage::iterateDirectory`). Note read-only is `web` disk, and write-once is `s3_plain`. [#59170](https://github.com/ClickHouse/ClickHouse/pull/59170) ([Azat Khuzhin](https://github.com/azat)). +* Fix bug in the experimental `_block_number` column which could lead to logical error during complex combination of `ALTER`s and `merge`s. Fixes [#56202](https://github.com/ClickHouse/ClickHouse/issues/56202). Replaces [#58601](https://github.com/ClickHouse/ClickHouse/issues/58601). [#59295](https://github.com/ClickHouse/ClickHouse/pull/59295) ([alesapin](https://github.com/alesapin)). +* Play UI understands when an exception is returned inside JSON. Adjustment for [#52853](https://github.com/ClickHouse/ClickHouse/issues/52853). [#59303](https://github.com/ClickHouse/ClickHouse/pull/59303) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* `/binary` HTTP handler allows to specify user, host, and optionally, password in the query string. [#59311](https://github.com/ClickHouse/ClickHouse/pull/59311) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Support backups for compressed in-memory tables. This closes [#57893](https://github.com/ClickHouse/ClickHouse/issues/57893). [#59315](https://github.com/ClickHouse/ClickHouse/pull/59315) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Support the `FORMAT` clause in `BACKUP` and `RESTORE` queries. [#59338](https://github.com/ClickHouse/ClickHouse/pull/59338) ([Vitaly Baranov](https://github.com/vitlibar)). +* Function `concatWithSeparator` now supports arbitrary argument types (instead of only `String` and `FixedString` arguments). For example, `SELECT concatWithSeparator('.', 'number', 1)` now returns `number.1`. [#59341](https://github.com/ClickHouse/ClickHouse/pull/59341) ([Robert Schulze](https://github.com/rschu1ze)). + +#### Build/Testing/Packaging Improvement +* Improve aliases for clickhouse binary (now `ch`/`clickhouse` is `clickhouse-local` or `clickhouse` depends on the arguments) and add bash completion for new aliases. [#58344](https://github.com/ClickHouse/ClickHouse/pull/58344) ([Azat Khuzhin](https://github.com/azat)). +* Add settings changes check to CI to check that all settings changes are reflected in settings changes history. [#58555](https://github.com/ClickHouse/ClickHouse/pull/58555) ([Kruglov Pavel](https://github.com/Avogar)). +* Use tables directly attached from S3 in stateful tests. [#58791](https://github.com/ClickHouse/ClickHouse/pull/58791) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Save the whole `fuzzer.log` as an archive instead of the last 100k lines. `tail -n 100000` often removes lines with table definitions. Example:. [#58821](https://github.com/ClickHouse/ClickHouse/pull/58821) ([Dmitry Novik](https://github.com/novikd)). +* Enable Rust on macOS with Aarch64 (this will add fuzzy search in client with skim and the PRQL language, though I don't think that are people who host ClickHouse on darwin, so it is mostly for fuzzy search in client I would say). [#59272](https://github.com/ClickHouse/ClickHouse/pull/59272) ([Azat Khuzhin](https://github.com/azat)). +* Fix aggregation issue in mixed x86_64 and ARM clusters [#59132](https://github.com/ClickHouse/ClickHouse/pull/59132) ([Harry Lee](https://github.com/HarryLeeIBM)). + +#### Bug Fix (user-visible misbehavior in an official stable release) + +* Add join keys conversion for nested LowCardinality [#51550](https://github.com/ClickHouse/ClickHouse/pull/51550) ([vdimir](https://github.com/vdimir)). +* Flatten only true Nested type if flatten_nested=1, not all Array(Tuple) [#56132](https://github.com/ClickHouse/ClickHouse/pull/56132) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix a bug with projections and the `aggregate_functions_null_for_empty` setting during insertion. [#56944](https://github.com/ClickHouse/ClickHouse/pull/56944) ([Amos Bird](https://github.com/amosbird)). +* Fixed potential exception due to stale profile UUID [#57263](https://github.com/ClickHouse/ClickHouse/pull/57263) ([Vasily Nemkov](https://github.com/Enmk)). +* Fix working with read buffers in StreamingFormatExecutor [#57438](https://github.com/ClickHouse/ClickHouse/pull/57438) ([Kruglov Pavel](https://github.com/Avogar)). +* Ignore MVs with dropped target table during pushing to views [#57520](https://github.com/ClickHouse/ClickHouse/pull/57520) ([Kruglov Pavel](https://github.com/Avogar)). +* Eliminate possible race between ALTER_METADATA and MERGE_PARTS [#57755](https://github.com/ClickHouse/ClickHouse/pull/57755) ([Azat Khuzhin](https://github.com/azat)). +* Fix the expressions order bug in group by with rollup [#57786](https://github.com/ClickHouse/ClickHouse/pull/57786) ([Chen768959](https://github.com/Chen768959)). +* A fix for the obsolete "zero-copy" replication feature: Fix lost blobs after dropping a replica with broken detached parts [#58333](https://github.com/ClickHouse/ClickHouse/pull/58333) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Allow users to work with symlinks in user_files_path [#58447](https://github.com/ClickHouse/ClickHouse/pull/58447) ([Duc Canh Le](https://github.com/canhld94)). +* Fix a crash when graphite table does not have an agg function [#58453](https://github.com/ClickHouse/ClickHouse/pull/58453) ([Duc Canh Le](https://github.com/canhld94)). +* Delay reading from StorageKafka to allow multiple reads in materialized views [#58477](https://github.com/ClickHouse/ClickHouse/pull/58477) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)). +* Fix a stupid case of intersecting parts [#58482](https://github.com/ClickHouse/ClickHouse/pull/58482) ([Alexander Tokmakov](https://github.com/tavplubix)). +* MergeTreePrefetchedReadPool disable for LIMIT only queries [#58505](https://github.com/ClickHouse/ClickHouse/pull/58505) ([Maksim Kita](https://github.com/kitaisreal)). +* Enable ordinary databases while restoration [#58520](https://github.com/ClickHouse/ClickHouse/pull/58520) ([Jihyuk Bok](https://github.com/tomahawk28)). +* Fix Apache Hive threadpool reading for ORC/Parquet/... [#58537](https://github.com/ClickHouse/ClickHouse/pull/58537) ([sunny](https://github.com/sunny19930321)). +* Hide credentials in `system.backup_log`'s `base_backup_name` column [#58550](https://github.com/ClickHouse/ClickHouse/pull/58550) ([Daniel Pozo Escalona](https://github.com/danipozo)). +* `toStartOfInterval` for milli- microsencods values rounding [#58557](https://github.com/ClickHouse/ClickHouse/pull/58557) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Disable `max_joined_block_rows` in ConcurrentHashJoin [#58595](https://github.com/ClickHouse/ClickHouse/pull/58595) ([vdimir](https://github.com/vdimir)). +* Fix join using nullable in the old analyzer [#58596](https://github.com/ClickHouse/ClickHouse/pull/58596) ([vdimir](https://github.com/vdimir)). +* `makeDateTime64`: Allow non-const fraction argument [#58597](https://github.com/ClickHouse/ClickHouse/pull/58597) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix possible NULL dereference during symbolizing inline frames [#58607](https://github.com/ClickHouse/ClickHouse/pull/58607) ([Azat Khuzhin](https://github.com/azat)). +* Improve isolation of query cache entries under re-created users or role switches [#58611](https://github.com/ClickHouse/ClickHouse/pull/58611) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix broken partition key analysis when doing projection optimization [#58638](https://github.com/ClickHouse/ClickHouse/pull/58638) ([Amos Bird](https://github.com/amosbird)). +* Query cache: Fix per-user quota [#58731](https://github.com/ClickHouse/ClickHouse/pull/58731) ([Robert Schulze](https://github.com/rschu1ze)). +* Fix stream partitioning in parallel window functions [#58739](https://github.com/ClickHouse/ClickHouse/pull/58739) ([Dmitry Novik](https://github.com/novikd)). +* Fix double destroy call on exception throw in addBatchLookupTable8 [#58745](https://github.com/ClickHouse/ClickHouse/pull/58745) ([Raúl Marín](https://github.com/Algunenano)). +* Don't process requests in Keeper during shutdown [#58765](https://github.com/ClickHouse/ClickHouse/pull/58765) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix a null pointer dereference in `SlabsPolygonIndex::find` [#58771](https://github.com/ClickHouse/ClickHouse/pull/58771) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Fix JSONExtract function for LowCardinality(Nullable) columns [#58808](https://github.com/ClickHouse/ClickHouse/pull/58808) ([vdimir](https://github.com/vdimir)). +* A fix for unexpected accumulation of memory usage while creating a huge number of tables by CREATE and DROP. [#58831](https://github.com/ClickHouse/ClickHouse/pull/58831) ([Maksim Kita](https://github.com/kitaisreal)). +* Multiple read file log storage in mv [#58877](https://github.com/ClickHouse/ClickHouse/pull/58877) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)). +* Restriction for the access key id for s3. [#58900](https://github.com/ClickHouse/ClickHouse/pull/58900) ([MikhailBurdukov](https://github.com/MikhailBurdukov)). +* Fix possible crash in clickhouse-local during loading suggestions [#58907](https://github.com/ClickHouse/ClickHouse/pull/58907) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix crash when `indexHint` is used [#58911](https://github.com/ClickHouse/ClickHouse/pull/58911) ([Dmitry Novik](https://github.com/novikd)). +* Fix StorageURL forgetting headers on server restart [#58933](https://github.com/ClickHouse/ClickHouse/pull/58933) ([Michael Kolupaev](https://github.com/al13n321)). +* Analyzer: fix storage replacement with insertion block [#58958](https://github.com/ClickHouse/ClickHouse/pull/58958) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix seek in ReadBufferFromZipArchive [#58966](https://github.com/ClickHouse/ClickHouse/pull/58966) ([Michael Kolupaev](https://github.com/al13n321)). +* A fix for experimental inverted indices (don't use in production): `DROP INDEX` of inverted index now removes all relevant files from persistence [#59040](https://github.com/ClickHouse/ClickHouse/pull/59040) ([mochi](https://github.com/MochiXu)). +* Fix data race on query_factories_info [#59049](https://github.com/ClickHouse/ClickHouse/pull/59049) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Disable "Too many redirects" error retry [#59099](https://github.com/ClickHouse/ClickHouse/pull/59099) ([skyoct](https://github.com/skyoct)). +* Fix not started database shutdown deadlock [#59137](https://github.com/ClickHouse/ClickHouse/pull/59137) ([Sergei Trifonov](https://github.com/serxa)). +* Fix: LIMIT BY and LIMIT in distributed query [#59153](https://github.com/ClickHouse/ClickHouse/pull/59153) ([Igor Nikonov](https://github.com/devcrafter)). +* Fix crash with nullable timezone for `toString` [#59190](https://github.com/ClickHouse/ClickHouse/pull/59190) ([Yarik Briukhovetskyi](https://github.com/yariks5s)). +* Fix abort in iceberg metadata on bad file paths [#59275](https://github.com/ClickHouse/ClickHouse/pull/59275) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix architecture name in select of Rust target [#59307](https://github.com/ClickHouse/ClickHouse/pull/59307) ([p1rattttt](https://github.com/p1rattttt)). +* Fix a logical error about "not-ready set" for querying from `system.tables` with a subquery in the IN clause. [#59351](https://github.com/ClickHouse/ClickHouse/pull/59351) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). + +## [Changelog for 2023](https://clickhouse.com/docs/en/whats-new/changelog/2023) diff --git a/docs/ja/whats-new/roadmap.md b/docs/ja/whats-new/roadmap.md new file mode 100644 index 00000000000..23864fa05f7 --- /dev/null +++ b/docs/ja/whats-new/roadmap.md @@ -0,0 +1,20 @@ +--- +title: "Roadmap" +slug: /ja/whats-new/roadmap +sidebar_position: 50 +--- + +## Current Roadmap + +The current roadmap is published for open discussion: + +- [2024](https://github.com/ClickHouse/ClickHouse/issues/58392) + +## Previous Roadmaps + +- [2023](https://github.com/ClickHouse/ClickHouse/issues/44767) +- [2022](https://github.com/ClickHouse/ClickHouse/issues/44767) +- [2021](https://github.com/ClickHouse/ClickHouse/issues/17623) +- [2020](https://github.com/ClickHouse/ClickHouse/blob/be29057de1835f6f4a17e03a422b45b81efe6833/docs/ru/whats-new/extended-roadmap.md) +- [2019](https://github.com/ClickHouse/ClickHouse/issues/4785) +- [2018](https://github.com/ClickHouse/clickhouse-presentations/tree/master/roadmap2018) diff --git a/docs/ja/whats-new/security-changelog.md b/docs/ja/whats-new/security-changelog.md new file mode 100644 index 00000000000..202c71ff304 --- /dev/null +++ b/docs/ja/whats-new/security-changelog.md @@ -0,0 +1,204 @@ +--- +slug: /ja/whats-new/security-changelog +sidebar_position: 20 +sidebar_label: Security Changelog +--- + +# Security Changelog + +## Fixed in ClickHouse v24.5, 2024-08-01 {#fixed-in-clickhouse-release-2024-08-01} + +### [CVE-2024-6873](https://github.com/ClickHouse/ClickHouse/security/advisories/GHSA-432f-r822-j66f) {#CVE-2024-6873} + +It is possible to redirect the execution flow of the ClickHouse server process from an unauthenticated vector by sending a specially crafted request to the ClickHouse server native interface. This redirection is limited to what is available within a 256-byte range of memory at the time of execution. This vulnerability was identified through our Bugbounty program and no known Proof of Concept Remote Code Execution (RCE) code has been produced or exploited. + +Fix has been pushed to the following open-source versions: v23.8.15.35-lts, v24.3.4.147-lts, v24.4.2.141-stable, v24.5.1.1763, v24.6.1.4423-stable + +ClickHouse Cloud uses different versioning and a fix for this vulnerability was applied to all instances running v24.2 onward. + +Credits: malacupa (Independent researcher) + +## Fixed in ClickHouse v24.1, 2024-01-30 {#fixed-in-clickhouse-release-24-01-30} + +### [CVE-2024-22412](https://github.com/ClickHouse/ClickHouse/security/advisories/GHSA-45h5-f7g3-gr8r) {#CVE-2024-22412} + +When toggling between user roles while using ClickHouse with query cache enabled, there is a risk of obtaining inaccurate data. ClickHouse advises users with vulnerable versions of ClickHouse not to use the query cache when their application dynamically switches between various roles. + +Fix has been pushed to the following open-source versions: v24.1.1.2048, v24.1.8.22-stable, v23.12.6.19-stable, v23.8.12.13-lts, v23.3.22.3-lts + +ClickHouse Cloud uses different versioning and a fix for this vulnerability was applied at v24.0.2.54535. + +Credits: Evan Johnson and Alan Braithwaite from Runreveal team - More information can be found on [their blog post](https://blog.runreveal.com/cve-2024-22412-behind-the-bug-a-classic-caching-problem-in-the-clickhouse-query-cache/). + +## Fixed in ClickHouse v23.10.5.20, 2023-11-26 {#fixed-in-clickhouse-release-23-10-5-20-2023-11-26} + +### [CVE-2023-47118](https://github.com/ClickHouse/ClickHouse/security/advisories/GHSA-g22g-p6q2-x39v) {#CVE-2023-47118} + +A heap buffer overflow vulnerability affecting the native interface running by default on port 9000/tcp. An attacker, by triggering a bug in the T64 compression codec, can cause the ClickHouse server process to crash. This vulnerability can be exploited without the need to authenticate. + +Fix has been pushed to the following open-source versions: v23.10.2.13, v23.9.4.11, v23.8.6.16, v23.3.16.7 + +ClickHouse Cloud uses different versioning and a fix for this vulnerability was applied at v23.9.2.47475. + +Credits: malacupa (Independent researcher) + +### [CVE-2023-48298](https://github.com/ClickHouse/ClickHouse/security/advisories/GHSA-qw9f-qv29-8938) {#CVE-2023-48298} + +An integer underflow vulnerability in the FPC compressions codec. An attacker can use it to cause the ClickHouse server process to crash. This vulnerability can be exploited without the need to authenticate. + +Fix has been pushed to the following open-source versions: v23.10.4.25, v23.9.5.29, v23.8.7.24, v23.3.17.13. + +ClickHouse Cloud uses different versioning and a fix for this vulnerability was applied at v23.9.2.47475. + +Credits: malacupa (Independent researcher) + +### [CVE-2023-48704](https://github.com/ClickHouse/ClickHouse/security/advisories/GHSA-5rmf-5g48-xv63) {#CVE-2023-48704} + +A heap buffer overflow vulnerability affecting the native interface running by default on port 9000/tcp. An attacker, by triggering a bug in the Gorilla codec, can cause the ClickHouse server process to crash. This vulnerability can be exploited without the need to authenticate. + +Fix has been pushed to the following open-source versions: v23.10.5.20, v23.9.6.20, v23.8.8.20, v23.3.18.15. + +ClickHouse Cloud uses different versioning and a fix for this vulnerability was applied at v23.9.2.47551. + +Credits: malacupa (Independent researcher) + +## Fixed in ClickHouse 22.9.1.2603, 2022-09-22 {#fixed-in-clickhouse-release-22-9-1-2603-2022-9-22} + +### CVE-2022-44011 {#CVE-2022-44011} + +A heap buffer overflow issue was discovered in ClickHouse server. A malicious user with ability to load data into ClickHouse server could crash the ClickHouse server by inserting a malformed CapnProto object. + +Fix has been pushed to version 22.9.1.2603, 22.8.2.11, 22.7.4.16, 22.6.6.16, 22.3.12.19 + +Credits: Kiojj (independent researcher) + +### CVE-2022-44010 {#CVE-2022-44010} + +A heap buffer overflow issue was discovered in ClickHouse server. An attacker could send a specially crafted HTTP request to the HTTP Endpoint (listening on port 8123 by default), causing a heap-based buffer overflow that crashes the ClickHouse server process. This attack does not require authentication. + +Fix has been pushed to version 22.9.1.2603, 22.8.2.11, 22.7.4.16, 22.6.6.16, 22.3.12.19 + +Credits: Kiojj (independent researcher) + +## Fixed in ClickHouse 21.10.2.15, 2021-10-18 {#fixed-in-clickhouse-release-21-10-2-215-2021-10-18} + +### CVE-2021-43304 {#cve-2021-43304} + +Heap buffer overflow in ClickHouse's LZ4 compression codec when parsing a malicious query. There is no verification that the copy operations in the LZ4::decompressImpl loop and especially the arbitrary copy operation wildCopy(op, ip, copy_end), don’t exceed the destination buffer’s limits. + +Credits: JFrog Security Research Team + +### CVE-2021-43305 {#cve-2021-43305} + +Heap buffer overflow in ClickHouse's LZ4 compression codec when parsing a malicious query. There is no verification that the copy operations in the LZ4::decompressImpl loop and especially the arbitrary copy operation wildCopy(op, ip, copy_end), don’t exceed the destination buffer’s limits. This issue is very similar to CVE-2021-43304, but the vulnerable copy operation is in a different wildCopy call. + +Credits: JFrog Security Research Team + +### CVE-2021-42387 {#cve-2021-42387} + +Heap out-of-bounds read in ClickHouse's LZ4 compression codec when parsing a malicious query. As part of the LZ4::decompressImpl() loop, a 16-bit unsigned user-supplied value ('offset') is read from the compressed data. The offset is later used in the length of a copy operation, without checking the upper bounds of the source of the copy operation. + +Credits: JFrog Security Research Team + +### CVE-2021-42388 {#cve-2021-42388} + +Heap out-of-bounds read in ClickHouse's LZ4 compression codec when parsing a malicious query. As part of the LZ4::decompressImpl() loop, a 16-bit unsigned user-supplied value ('offset') is read from the compressed data. The offset is later used in the length of a copy operation, without checking the lower bounds of the source of the copy operation. + +Credits: JFrog Security Research Team + +### CVE-2021-42389 {#cve-2021-42389} + +Divide-by-zero in ClickHouse's Delta compression codec when parsing a malicious query. The first byte of the compressed buffer is used in a modulo operation without being checked for 0. + +Credits: JFrog Security Research Team + +### CVE-2021-42390 {#cve-2021-42390} + +Divide-by-zero in ClickHouse's DeltaDouble compression codec when parsing a malicious query. The first byte of the compressed buffer is used in a modulo operation without being checked for 0. + +Credits: JFrog Security Research Team + +### CVE-2021-42391 {#cve-2021-42391} + +Divide-by-zero in ClickHouse's Gorilla compression codec when parsing a malicious query. The first byte of the compressed buffer is used in a modulo operation without being checked for 0. + +Credits: JFrog Security Research Team + +## Fixed in ClickHouse 21.4.3.21, 2021-04-12 {#fixed-in-clickhouse-release-21-4-3-21-2021-04-12} + +### CVE-2021-25263 {#cve-2021-25263} + +An attacker that has CREATE DICTIONARY privilege, can read arbitary file outside permitted directory. + +Fix has been pushed to versions 20.8.18.32-lts, 21.1.9.41-stable, 21.2.9.41-stable, 21.3.6.55-lts, 21.4.3.21-stable and later. + +Credits: [Vyacheslav Egoshin](https://twitter.com/vegoshin) + +## Fixed in ClickHouse Release 19.14.3.3, 2019-09-10 {#fixed-in-clickhouse-release-19-14-3-3-2019-09-10} + +### CVE-2019-15024 {#cve-2019-15024} + +Ðn attacker that has write access to ZooKeeper and who can run a custom server available from the network where ClickHouse runs, can create a custom-built malicious server that will act as a ClickHouse replica and register it in ZooKeeper. When another replica will fetch data part from the malicious replica, it can force clickhouse-server to write to arbitrary path on filesystem. + +Credits: Eldar Zaitov of Yandex Information Security Team + +### CVE-2019-16535 {#cve-2019-16535} + +Ðn OOB read, OOB write and integer underflow in decompression algorithms can be used to achieve RCE or DoS via native protocol. + +Credits: Eldar Zaitov of Yandex Information Security Team + +### CVE-2019-16536 {#cve-2019-16536} + +Stack overflow leading to DoS can be triggered by a malicious authenticated client. + +Credits: Eldar Zaitov of Yandex Information Security Team + +## Fixed in ClickHouse Release 19.13.6.1, 2019-09-20 {#fixed-in-clickhouse-release-19-13-6-1-2019-09-20} + +### CVE-2019-18657 {#cve-2019-18657} + +Table function `url` had the vulnerability allowed the attacker to inject arbitrary HTTP headers in the request. + +Credits: [Nikita Tikhomirov](https://github.com/NSTikhomirov) + +## Fixed in ClickHouse Release 18.12.13, 2018-09-10 {#fixed-in-clickhouse-release-18-12-13-2018-09-10} + +### CVE-2018-14672 {#cve-2018-14672} + +Functions for loading CatBoost models allowed path traversal and reading arbitrary files through error messages. + +Credits: Andrey Krasichkov of Yandex Information Security Team + +## Fixed in ClickHouse Release 18.10.3, 2018-08-13 {#fixed-in-clickhouse-release-18-10-3-2018-08-13} + +### CVE-2018-14671 {#cve-2018-14671} + +unixODBC allowed loading arbitrary shared objects from the file system which led to a Remote Code Execution vulnerability. + +Credits: Andrey Krasichkov and Evgeny Sidorov of Yandex Information Security Team + +## Fixed in ClickHouse Release 1.1.54388, 2018-06-28 {#fixed-in-clickhouse-release-1-1-54388-2018-06-28} + +### CVE-2018-14668 {#cve-2018-14668} + +“remote†table function allowed arbitrary symbols in “userâ€, “password†and “default_database†fields which led to Cross Protocol Request Forgery Attacks. + +Credits: Andrey Krasichkov of Yandex Information Security Team + +## Fixed in ClickHouse Release 1.1.54390, 2018-07-06 {#fixed-in-clickhouse-release-1-1-54390-2018-07-06} + +### CVE-2018-14669 {#cve-2018-14669} + +ClickHouse MySQL client had “LOAD DATA LOCAL INFILE†functionality enabled that allowed a malicious MySQL database read arbitrary files from the connected ClickHouse server. + +Credits: Andrey Krasichkov and Evgeny Sidorov of Yandex Information Security Team + +## Fixed in ClickHouse Release 1.1.54131, 2017-01-10 {#fixed-in-clickhouse-release-1-1-54131-2017-01-10} + +### CVE-2018-14670 {#cve-2018-14670} + +Incorrect configuration in deb package could lead to the unauthorized use of the database. + +Credits: the UK’s National Cyber Security Centre (NCSC) + diff --git a/docs/ru/faq/general/who-is-using-clickhouse.md b/docs/ru/faq/general/who-is-using-clickhouse.md index 1aa84906fe8..06ed53276ad 100644 --- a/docs/ru/faq/general/who-is-using-clickhouse.md +++ b/docs/ru/faq/general/who-is-using-clickhouse.md @@ -12,7 +12,7 @@ sidebar_position: 9 Итак, как же узнать, кто пользуетÑÑ ClickHouse? -Один из ÑпоÑобов — **поÑпрашивать в Ñвоем окружении**. Ð’ разговорах люди более охотно делÑÑ‚ÑÑ Ñ‚ÐµÐ¼, какие технологии внедрены в их компаниÑÑ…, какие задачи решаютÑÑ Ñ Ð¸Ñ… помощью, могут назвать характериÑтики аппаратного обеÑпечениÑ, объемы данных и Ñ‚.д. Мы регулÑрно разговариваем Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñми во Ð²Ñ€ÐµÐ¼Ñ [митапов ClickHouse](https://www.youtube.com/channel/UChtmrD-dsdpspr42P_PyRAw/playlists) по вÑему миру и Ñлышали о более чем 1000 компаний, которые пользуютÑÑ ClickHouse. К Ñожалению, мы не можем раÑкрывать подробноÑти, потому что по умолчанию Ñчитаем такие иÑтории защищенными NDA, чтобы избежать любых возможных проблем. Ð’Ñ‹ можете прийти на любой из наших будущих митапов и ÑамоÑтоÑтельно поговорить Ñ Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð¸ пользователÑми. Мы анонÑируем ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ Ð¿Ð¾ разным каналам, например, вы можете подпиÑатьÑÑ Ð½Ð° [наш Twitter](http://twitter.com/ClickHouseDB/). +Один из ÑпоÑобов — **поÑпрашивать в Ñвоем окружении**. Ð’ разговорах люди более охотно делÑÑ‚ÑÑ Ñ‚ÐµÐ¼, какие технологии внедрены в их компаниÑÑ…, какие задачи решаютÑÑ Ñ Ð¸Ñ… помощью, могут назвать характериÑтики аппаратного обеÑпечениÑ, объемы данных и Ñ‚.д. Мы регулÑрно разговариваем Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñми во Ð²Ñ€ÐµÐ¼Ñ [митапов ClickHouse](https://www.youtube.com/channel/UChtmrD-dsdpspr42P_PyRAw/playlists) по вÑему миру и Ñлышали о более чем 1000 компаний, которые пользуютÑÑ ClickHouse. К Ñожалению, мы не можем раÑкрывать подробноÑти, потому что по умолчанию Ñчитаем такие иÑтории защищенными NDA, чтобы избежать любых возможных проблем. Ð’Ñ‹ можете прийти на любой из наших будущих митапов и ÑамоÑтоÑтельно поговорить Ñ Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð¸ пользователÑми. Мы анонÑируем ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ Ð¿Ð¾ разным каналам, например, вы можете подпиÑатьÑÑ Ð½Ð° [наш X](http://x.com/ClickHouseDB/) или [Bluesky](https://bsky.app/profile/clickhouse.com). Второй ÑпоÑоб узнать — поÑмотреть, что компании **говорÑÑ‚ публично** о том, как именно они пользуютÑÑ ClickHouse. Это более ÑущеÑÑ‚Ð²ÐµÐ½Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ, потому что ее можно найти в публикациÑÑ… в блогах, видеозапиÑÑÑ… разговоров, презентациÑÑ… и Ñ‚.д. Мы Ñобираем ÑÑылки на такие материалы на Ñвоей Ñтранице **[Пользователи ClickHouse](https://clickhouse.com/docs/en/introduction/adopters/)**. Будем рады, еÑли вы поделитеÑÑŒ иÑторией вашей компании или ÑÑылками по теме (но вÑегда помните о том, что не Ñтоит нарушать NDA). diff --git a/docs/ru/getting-started/install.md b/docs/ru/getting-started/install.md index 083ddc8c39c..4b4b018697e 100644 --- a/docs/ru/getting-started/install.md +++ b/docs/ru/getting-started/install.md @@ -154,7 +154,7 @@ sudo "clickhouse-client-$LATEST_VERSION/install/doinst.sh" ### Из Docker образа {#from-docker-image} -Ð”Ð»Ñ Ð·Ð°Ð¿ÑƒÑка ClickHouse в Docker нужно Ñледовать инÑтрукции на [Docker Hub](https://hub.docker.com/r/clickhouse/clickhouse-server/). Внутри образов иÑпользуютÑÑ Ð¾Ñ„Ð¸Ñ†Ð¸Ð°Ð»ÑŒÐ½Ñ‹Ðµ `deb`-пакеты. +Ð”Ð»Ñ Ð·Ð°Ð¿ÑƒÑка ClickHouse в Docker нужно Ñледовать инÑтрукции на [Docker Hub](https://hub.docker.com/_/clickhouse). Внутри образов иÑпользуютÑÑ Ð¾Ñ„Ð¸Ñ†Ð¸Ð°Ð»ÑŒÐ½Ñ‹Ðµ `deb`-пакеты. ### Из единого бинарного файла {#from-single-binary} diff --git a/docs/ru/operations/settings/settings.md b/docs/ru/operations/settings/settings.md index 84bbf6c83d3..222acc7aa4c 100644 --- a/docs/ru/operations/settings/settings.md +++ b/docs/ru/operations/settings/settings.md @@ -136,7 +136,7 @@ ClickHouse применÑет наÑтройку в тех ÑлучаÑÑ…, ко - 0 — выключена. - 1 — включена. -Значение по умолчанию: 0. +Значение по умолчанию: 1. ## http_zlib_compression_level {#settings-http_zlib_compression_level} @@ -4215,3 +4215,9 @@ SELECT toFloat64('1.7091'), toFloat64('1.5008753E7') SETTINGS precise_float_pars │ 1.7091 │ 15008753 │ └─────────────────────┴──────────────────────────┘ ``` + +## push_external_roles_in_interserver_queries + +ПозволÑет передавать роли Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¾Ñ‚ инициатора запроÑа другим нодам при выполнении запроÑа. + +Значение по умолчанию: `true`. diff --git a/docs/zh/faq/general/who-is-using-clickhouse.md b/docs/zh/faq/general/who-is-using-clickhouse.md index c5ea6a07307..35585bb7dab 100644 --- a/docs/zh/faq/general/who-is-using-clickhouse.md +++ b/docs/zh/faq/general/who-is-using-clickhouse.md @@ -13,8 +13,8 @@ sidebar_position: 9 那么,如何辨别è°åœ¨ä½¿ç”¨ClickHouseå‘¢? -一ç§æ–¹æ³•æ˜¯è¯¢é—®å‘¨å›´çš„人。如果ä¸æ˜¯ä¹¦é¢å½¢å¼ï¼Œäººä»¬æ›´æ„¿æ„分享他们公å¸ä½¿ç”¨çš„技术ã€ç”¨ä¾‹ã€ä½¿ç”¨çš„硬件类型ã€æ•°æ®é‡ç­‰ã€‚我们定期在[ClickHouse meetup](https://www.youtube.com/channel/UChtmrD-dsdpspr42P_PyRAw/playlists)上与世界å„地的用户进行交æµï¼Œå¹¶å¬åˆ°äº†å¤§çº¦1000多家使用ClickHouseçš„å…¬å¸çš„故事。ä¸å¹¸çš„是,这是ä¸å¯å¤åˆ¶çš„,我们试图把这些故事当作是在ä¿å¯†å议下被告知的,以é¿å…任何潜在的麻烦。但你å¯ä»¥å‚加我们未æ¥çš„任何èšä¼šï¼Œå¹¶ä¸Žå…¶ä»–用户å•ç‹¬äº¤è°ˆã€‚有多ç§æ–¹å¼å®£å¸ƒèšä¼šï¼Œä¾‹å¦‚,你å¯ä»¥è®¢é˜…[我们的Twitter](http://twitter.com/ClickHouseDB/)。 +一ç§æ–¹æ³•æ˜¯è¯¢é—®å‘¨å›´çš„人。如果ä¸æ˜¯ä¹¦é¢å½¢å¼ï¼Œäººä»¬æ›´æ„¿æ„分享他们公å¸ä½¿ç”¨çš„技术ã€ç”¨ä¾‹ã€ä½¿ç”¨çš„硬件类型ã€æ•°æ®é‡ç­‰ã€‚我们定期在[ClickHouse meetup](https://www.youtube.com/channel/UChtmrD-dsdpspr42P_PyRAw/playlists)上与世界å„地的用户进行交æµï¼Œå¹¶å¬åˆ°äº†å¤§çº¦1000多家使用ClickHouseçš„å…¬å¸çš„故事。ä¸å¹¸çš„是,这是ä¸å¯å¤åˆ¶çš„,我们试图把这些故事当作是在ä¿å¯†å议下被告知的,以é¿å…任何潜在的麻烦。但你å¯ä»¥å‚加我们未æ¥çš„任何èšä¼šï¼Œå¹¶ä¸Žå…¶ä»–用户å•ç‹¬äº¤è°ˆã€‚有多ç§æ–¹å¼å®£å¸ƒèšä¼šï¼Œä¾‹å¦‚,你å¯ä»¥è®¢é˜…[我们的X](http://x.com/ClickHouseDB/)ã€[Bluesky](https://bsky.app/profile/clickhouse.com)。 第二ç§æ–¹æ³•æ˜¯å¯»æ‰¾**公开表示**使用ClickHouseçš„å…¬å¸ã€‚因为通常会有一些确凿的è¯æ®ï¼Œå¦‚åšå®¢æ–‡ç« ã€è°ˆè¯è§†é¢‘录音ã€å¹»ç¯ç‰‡ç­‰ã€‚我们在我们的[**Adopters**](../../introduction/adopters.md)页é¢ä¸Šæ”¶é›†æŒ‡å‘此类è¯æ®çš„链接。你å¯ä»¥éšæ„æ供你雇主的故事,或者åªæ˜¯ä¸€äº›ä½ å¶ç„¶å‘现的链接(但尽é‡ä¸è¦åœ¨è¿™ä¸ªè¿‡ç¨‹ä¸­è¿åä¿å¯†åè®®)。 -ä½ å¯ä»¥åœ¨é‡‡ç”¨è€…åå•ä¸­æ‰¾åˆ°ä¸€äº›éžå¸¸å¤§çš„å…¬å¸ï¼Œæ¯”如彭åšç¤¾ã€æ€ç§‘ã€ä¸­å›½ç”µä¿¡ã€è…¾è®¯æˆ–优步,但通过第一ç§æ–¹æ³•ï¼Œæˆ‘们å‘现还有更多。例如,如果你看看《ç¦å¸ƒæ–¯ã€‹[(2020å¹´)列出的最大ITå…¬å¸åå•](https://www.forbes.com/sites/hanktucker/2020/05/13/worlds-largest-technology-companies-2020-apple-stays-on-top-zoom-and-uber-debut/),超过一åŠçš„å…¬å¸éƒ½åœ¨ä»¥æŸç§æ–¹å¼ä½¿ç”¨ClickHouse。此外,ä¸æ[Yandex](../../introduction/history.md)是ä¸å…¬å¹³çš„,该公å¸æœ€åˆäºŽ2016年开放ClickHouse,碰巧是欧洲最大的itå…¬å¸ä¹‹ä¸€ã€‚ \ No newline at end of file +ä½ å¯ä»¥åœ¨é‡‡ç”¨è€…åå•ä¸­æ‰¾åˆ°ä¸€äº›éžå¸¸å¤§çš„å…¬å¸ï¼Œæ¯”如彭åšç¤¾ã€æ€ç§‘ã€ä¸­å›½ç”µä¿¡ã€è…¾è®¯æˆ–优步,但通过第一ç§æ–¹æ³•ï¼Œæˆ‘们å‘现还有更多。例如,如果你看看《ç¦å¸ƒæ–¯ã€‹[(2020å¹´)列出的最大ITå…¬å¸åå•](https://www.forbes.com/sites/hanktucker/2020/05/13/worlds-largest-technology-companies-2020-apple-stays-on-top-zoom-and-uber-debut/),超过一åŠçš„å…¬å¸éƒ½åœ¨ä»¥æŸç§æ–¹å¼ä½¿ç”¨ClickHouse。此外,ä¸æ[Yandex](../../introduction/history.md)是ä¸å…¬å¹³çš„,该公å¸æœ€åˆäºŽ2016年开放ClickHouse,碰巧是欧洲最大的itå…¬å¸ä¹‹ä¸€ã€‚ diff --git a/docs/zh/getting-started/install.md b/docs/zh/getting-started/install.md index 7e4fb6826e4..8a9c4cd1c60 100644 --- a/docs/zh/getting-started/install.md +++ b/docs/zh/getting-started/install.md @@ -132,7 +132,7 @@ sudo "clickhouse-client-$LATEST_VERSION/install/doinst.sh" ### `Docker`安装包 {#from-docker-image} -è¦åœ¨Docker中è¿è¡ŒClickHouse,请éµå¾ª[Docker Hub](https://hub.docker.com/r/clickhouse/clickhouse-server/)上的指å—。它是官方的`deb`安装包。 +è¦åœ¨Docker中è¿è¡ŒClickHouse,请éµå¾ª[Docker Hub](https://hub.docker.com/_/clickhouse)上的指å—。它是官方的`deb`安装包。 ### 其他环境安装包 {#from-other} diff --git a/docs/zh/operations/settings/settings.md b/docs/zh/operations/settings/settings.md index 5e59196f56c..baa4fcb0754 100644 --- a/docs/zh/operations/settings/settings.md +++ b/docs/zh/operations/settings/settings.md @@ -97,7 +97,7 @@ ClickHouse从表的过时副本中选择最相关的副本。 - 0 — Disabled. - 1 — Enabled. -默认值:0。 +默认值:1。 ## http_zlib_compression_level {#settings-http_zlib_compression_level} diff --git a/docs/zh/sql-reference/statements/check-grant.mdx b/docs/zh/sql-reference/statements/check-grant.mdx new file mode 100644 index 00000000000..60c95699a5e --- /dev/null +++ b/docs/zh/sql-reference/statements/check-grant.mdx @@ -0,0 +1,10 @@ +--- +slug: /zh/sql-reference/statements/check-grant +sidebar_position: 56 +sidebar_label: CHECK +title: "CHECK GRANT Statement" +--- + +import Content from '@site/docs/en/sql-reference/statements/check-grant.md'; + + diff --git a/programs/benchmark/Benchmark.cpp b/programs/benchmark/Benchmark.cpp index 86cc2ebe92f..19fd46b5f1a 100644 --- a/programs/benchmark/Benchmark.cpp +++ b/programs/benchmark/Benchmark.cpp @@ -36,6 +36,7 @@ #include #include #include +#include "IO/WriteBuffer.h" /** A tool for evaluating ClickHouse performance. @@ -223,7 +224,7 @@ private: ContextMutablePtr global_context; QueryProcessingStage::Enum query_processing_stage; - WriteBufferFromFileDescriptor log{STDERR_FILENO}; + AutoFinalizedWriteBuffer log{STDERR_FILENO}; std::atomic consecutive_errors{0}; diff --git a/programs/client/Client.cpp b/programs/client/Client.cpp index 05e1e61be7b..f78071b1278 100644 --- a/programs/client/Client.cpp +++ b/programs/client/Client.cpp @@ -220,7 +220,7 @@ std::vector Client::loadWarningMessages() "" /* query_id */, QueryProcessingStage::Complete, &client_context->getSettingsRef(), - &client_context->getClientInfo(), false, {}); + &client_context->getClientInfo(), false, {}, {}); while (true) { Packet packet = connection->receivePacket(); diff --git a/programs/compressor/Compressor.cpp b/programs/compressor/Compressor.cpp index e73f61dde83..27f0bd1614b 100644 --- a/programs/compressor/Compressor.cpp +++ b/programs/compressor/Compressor.cpp @@ -216,6 +216,8 @@ int mainEntryClickHouseCompressor(int argc, char ** argv) to.finalize(); } } + + wb->finalize(); } catch (...) { diff --git a/programs/git-import/git-import.cpp b/programs/git-import/git-import.cpp index 5430c4b0a42..0a1a2e99dbc 100644 --- a/programs/git-import/git-import.cpp +++ b/programs/git-import/git-import.cpp @@ -529,6 +529,13 @@ struct ResultWriter } } } + + void finalize() + { + commits.finalize(); + file_changes.finalize(); + line_changes.finalize(); + } }; @@ -1178,6 +1185,8 @@ void processLog(const Options & options) if (i + num_threads < num_commits) show_commands[i % num_threads] = gitShow(hashes[i + num_threads]); } + + result.finalize(); } diff --git a/programs/install/Install.cpp b/programs/install/Install.cpp index 4029d3203b0..281d0e45aa9 100644 --- a/programs/install/Install.cpp +++ b/programs/install/Install.cpp @@ -100,10 +100,14 @@ namespace fs = std::filesystem; static auto executeScript(const std::string & command, bool throw_on_error = false) { auto sh = ShellCommand::execute(command); + WriteBufferFromFileDescriptor wb_stdout(STDOUT_FILENO); - WriteBufferFromFileDescriptor wb_stderr(STDERR_FILENO); copyData(sh->out, wb_stdout); + wb_stdout.finalize(); + + WriteBufferFromFileDescriptor wb_stderr(STDERR_FILENO); copyData(sh->err, wb_stderr); + wb_stderr.finalize(); if (throw_on_error) { @@ -1125,6 +1129,7 @@ namespace WriteBufferFromFileDescriptor std_err(STDERR_FILENO); copyData(sh->err, std_err); + std_err.finalize(); sh->tryWait(); } diff --git a/programs/keeper-client/KeeperClient.cpp b/programs/keeper-client/KeeperClient.cpp index 4bdddaec59c..782ac816150 100644 --- a/programs/keeper-client/KeeperClient.cpp +++ b/programs/keeper-client/KeeperClient.cpp @@ -34,6 +34,7 @@ String KeeperClient::executeFourLetterCommand(const String & command) out.write(command.data(), command.size()); out.next(); + out.finalize(); String result; readStringUntilEOF(result, in); diff --git a/programs/library-bridge/LibraryBridgeHandlers.cpp b/programs/library-bridge/LibraryBridgeHandlers.cpp index 71fb45ec06b..8280a6d25ad 100644 --- a/programs/library-bridge/LibraryBridgeHandlers.cpp +++ b/programs/library-bridge/LibraryBridgeHandlers.cpp @@ -579,34 +579,13 @@ void CatBoostLibraryBridgeRequestHandler::handleRequest(HTTPServerRequest & requ processError(response, "Unknown library method '" + method + "'"); LOG_ERROR(log, "Unknown library method: '{}'", method); } - } - catch (...) - { - auto message = getCurrentExceptionMessage(true); - LOG_ERROR(log, "Failed to process request. Error: {}", message); - response.setStatusAndReason(Poco::Net::HTTPResponse::HTTP_INTERNAL_SERVER_ERROR, message); // can't call process_error, because of too soon response sending - try - { - writeStringBinary(message, out); - out.finalize(); - } - catch (...) - { - tryLogCurrentException(log); - out.cancel(); - } - - return; - } - - try - { out.finalize(); } catch (...) { - tryLogCurrentException(log); + tryLogCurrentException(log, "Failed to process request"); + out.cancelWithException(request, getCurrentExceptionCode(), getCurrentExceptionMessage(true), nullptr); } } diff --git a/programs/local/LocalServer.cpp b/programs/local/LocalServer.cpp index e6f8ecef097..3ecc6ecf24d 100644 --- a/programs/local/LocalServer.cpp +++ b/programs/local/LocalServer.cpp @@ -79,6 +79,7 @@ namespace Setting namespace ServerSetting { + extern const ServerSettingsUInt32 allowed_feature_tier; extern const ServerSettingsDouble cache_size_to_ram_max_ratio; extern const ServerSettingsUInt64 compiled_expression_cache_elements_size; extern const ServerSettingsUInt64 compiled_expression_cache_size; @@ -789,6 +790,9 @@ void LocalServer::processConfig() /// Initialize a dummy query cache. global_context->setQueryCache(0, 0, 0, 0); + /// Initialize allowed tiers + global_context->getAccessControl().setAllowTierSettings(server_settings[ServerSetting::allowed_feature_tier]); + #if USE_EMBEDDED_COMPILER size_t compiled_expression_cache_max_size_in_bytes = server_settings[ServerSetting::compiled_expression_cache_size]; size_t compiled_expression_cache_max_elements = server_settings[ServerSetting::compiled_expression_cache_elements_size]; diff --git a/programs/obfuscator/Obfuscator.cpp b/programs/obfuscator/Obfuscator.cpp index 6bd3865b591..8aa91ebaae0 100644 --- a/programs/obfuscator/Obfuscator.cpp +++ b/programs/obfuscator/Obfuscator.cpp @@ -1474,6 +1474,8 @@ try rewind_needed = true; } + file_out.finalize(); + return 0; } catch (...) diff --git a/programs/odbc-bridge/ColumnInfoHandler.cpp b/programs/odbc-bridge/ColumnInfoHandler.cpp index 06dd25ce274..058c23dc2ee 100644 --- a/programs/odbc-bridge/ColumnInfoHandler.cpp +++ b/programs/odbc-bridge/ColumnInfoHandler.cpp @@ -207,15 +207,8 @@ void ODBCColumnsInfoHandler::handleRequest(HTTPServerRequest & request, HTTPServ throw Exception(ErrorCodes::UNKNOWN_TABLE, "Columns definition was not returned"); WriteBufferFromHTTPServerResponse out(response, request.getMethod() == Poco::Net::HTTPRequest::HTTP_HEAD); - try - { - writeStringBinary(columns.toString(), out); - out.finalize(); - } - catch (...) - { - out.finalize(); - } + writeStringBinary(columns.toString(), out); + out.finalize(); } catch (...) { diff --git a/programs/odbc-bridge/IdentifierQuoteHandler.cpp b/programs/odbc-bridge/IdentifierQuoteHandler.cpp index 7b5b69cff63..03d34175bbe 100644 --- a/programs/odbc-bridge/IdentifierQuoteHandler.cpp +++ b/programs/odbc-bridge/IdentifierQuoteHandler.cpp @@ -80,15 +80,8 @@ void IdentifierQuoteHandler::handleRequest(HTTPServerRequest & request, HTTPServ auto identifier = getIdentifierQuote(std::move(connection)); WriteBufferFromHTTPServerResponse out(response, request.getMethod() == Poco::Net::HTTPRequest::HTTP_HEAD); - try - { - writeStringBinary(identifier, out); - out.finalize(); - } - catch (...) - { - out.finalize(); - } + writeStringBinary(identifier, out); + out.finalize(); } catch (...) { diff --git a/programs/odbc-bridge/MainHandler.cpp b/programs/odbc-bridge/MainHandler.cpp index 82ebcc3340a..7ab5b9def6f 100644 --- a/programs/odbc-bridge/MainHandler.cpp +++ b/programs/odbc-bridge/MainHandler.cpp @@ -194,33 +194,13 @@ void ODBCHandler::handleRequest(HTTPServerRequest & request, HTTPServerResponse CompletedPipelineExecutor executor(pipeline); executor.execute(); } - } - catch (...) - { - auto message = getCurrentExceptionMessage(true); - response.setStatusAndReason( - Poco::Net::HTTPResponse::HTTP_INTERNAL_SERVER_ERROR); // can't call process_error, because of too soon response sending - try - { - writeStringBinary(message, out); - out.finalize(); - } - catch (...) - { - tryLogCurrentException(log); - } - - tryLogCurrentException(log); - } - - try - { out.finalize(); } catch (...) { tryLogCurrentException(log); + out.cancelWithException(request, getCurrentExceptionCode(), getCurrentExceptionMessage(true), nullptr); } } diff --git a/programs/odbc-bridge/SchemaAllowedHandler.cpp b/programs/odbc-bridge/SchemaAllowedHandler.cpp index c986e61e715..5c12bd95489 100644 --- a/programs/odbc-bridge/SchemaAllowedHandler.cpp +++ b/programs/odbc-bridge/SchemaAllowedHandler.cpp @@ -94,15 +94,8 @@ void SchemaAllowedHandler::handleRequest(HTTPServerRequest & request, HTTPServer bool result = isSchemaAllowed(std::move(connection)); WriteBufferFromHTTPServerResponse out(response, request.getMethod() == Poco::Net::HTTPRequest::HTTP_HEAD); - try - { - writeBoolText(result, out); - out.finalize(); - } - catch (...) - { - out.finalize(); - } + writeBoolText(result, out); + out.finalize(); } catch (...) { diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index 68f262079ff..af383334128 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -166,6 +166,7 @@ namespace MergeTreeSetting namespace ServerSetting { + extern const ServerSettingsUInt32 allowed_feature_tier; extern const ServerSettingsUInt32 asynchronous_heavy_metrics_update_period_s; extern const ServerSettingsUInt32 asynchronous_metrics_update_period_s; extern const ServerSettingsBool asynchronous_metrics_enable_heavy_metrics; @@ -1771,6 +1772,7 @@ try global_context->setMaxDictionaryNumToWarn(new_server_settings[ServerSetting::max_dictionary_num_to_warn]); global_context->setMaxDatabaseNumToWarn(new_server_settings[ServerSetting::max_database_num_to_warn]); global_context->setMaxPartNumToWarn(new_server_settings[ServerSetting::max_part_num_to_warn]); + global_context->getAccessControl().setAllowTierSettings(new_server_settings[ServerSetting::allowed_feature_tier]); /// Only for system.server_settings global_context->setConfigReloaderInterval(new_server_settings[ServerSetting::config_reload_interval_ms]); @@ -2161,9 +2163,12 @@ try /// Check sanity of MergeTreeSettings on server startup { + /// All settings can be changed in the global config + bool allowed_experimental = true; + bool allowed_beta = true; size_t background_pool_tasks = global_context->getMergeMutateExecutor()->getMaxTasksCount(); - global_context->getMergeTreeSettings().sanityCheck(background_pool_tasks); - global_context->getReplicatedMergeTreeSettings().sanityCheck(background_pool_tasks); + global_context->getMergeTreeSettings().sanityCheck(background_pool_tasks, allowed_experimental, allowed_beta); + global_context->getReplicatedMergeTreeSettings().sanityCheck(background_pool_tasks, allowed_experimental, allowed_beta); } /// try set up encryption. There are some errors in config, error will be printed and server wouldn't start. CompressionCodecEncrypted::Configuration::instance().load(config(), "encryption_codecs"); diff --git a/programs/server/config.xml b/programs/server/config.xml index 9807f8c0d5a..8ec49d804bd 100644 --- a/programs/server/config.xml +++ b/programs/server/config.xml @@ -70,12 +70,15 @@ You can specify log format(for now, JSON only). In that case, the console log will be printed in specified format like JSON. For example, as below: + {"date_time":"1650918987.180175","thread_name":"#1","thread_id":"254545","level":"Trace","query_id":"","logger_name":"BaseDaemon","message":"Received signal 2","source_file":"../base/daemon/BaseDaemon.cpp; virtual void SignalListener::run()","source_line":"192"} + {"date_time_utc":"2024-11-06T09:06:09Z","thread_name":"#1","thread_id":"254545","level":"Trace","query_id":"","logger_name":"BaseDaemon","message":"Received signal 2","source_file":"../base/daemon/BaseDaemon.cpp; virtual void SignalListener::run()","source_line":"192"} To enable JSON logging support, please uncomment the entire tag below. a) You can modify key names by changing values under tag values inside tag. For example, to change DATE_TIME to MY_DATE_TIME, you can do like: MY_DATE_TIME + MY_UTC_DATE_TIME b) You can stop unwanted log properties to appear in logs. To do so, you can simply comment out (recommended) that property from this file. For example, if you do not want your log to print query_id, you can comment out only tag. @@ -86,6 +89,7 @@ json date_time + date_time_utc thread_name thread_id level diff --git a/src/Access/AccessControl.cpp b/src/Access/AccessControl.cpp index 9b3b8d2a977..1583ccecf94 100644 --- a/src/Access/AccessControl.cpp +++ b/src/Access/AccessControl.cpp @@ -876,4 +876,28 @@ void AccessControl::allowAllSettings() custom_settings_prefixes->registerPrefixes({""}); } +void AccessControl::setAllowTierSettings(UInt32 value) +{ + allow_experimental_tier_settings = value == 0; + allow_beta_tier_settings = value <= 1; +} + +UInt32 AccessControl::getAllowTierSettings() const +{ + if (allow_experimental_tier_settings) + return 0; + if (allow_beta_tier_settings) + return 1; + return 2; +} + +bool AccessControl::getAllowExperimentalTierSettings() const +{ + return allow_experimental_tier_settings; +} + +bool AccessControl::getAllowBetaTierSettings() const +{ + return allow_beta_tier_settings; +} } diff --git a/src/Access/AccessControl.h b/src/Access/AccessControl.h index a342c5300bf..1fbe7a3fccd 100644 --- a/src/Access/AccessControl.h +++ b/src/Access/AccessControl.h @@ -243,6 +243,11 @@ public: /// Allow all setting names - this can be used in clients to pass-through unknown settings to the server. void allowAllSettings(); + void setAllowTierSettings(UInt32 value); + UInt32 getAllowTierSettings() const; + bool getAllowExperimentalTierSettings() const; + bool getAllowBetaTierSettings() const; + private: class ContextAccessCache; class CustomSettingsPrefixes; @@ -272,6 +277,8 @@ private: std::atomic_bool table_engines_require_grant = false; std::atomic_int bcrypt_workfactor = 12; std::atomic default_password_type = AuthenticationType::SHA256_PASSWORD; + std::atomic_bool allow_experimental_tier_settings = true; + std::atomic_bool allow_beta_tier_settings = true; }; } diff --git a/src/Access/Common/AccessRightsElement.cpp b/src/Access/Common/AccessRightsElement.cpp index 3a78420f411..1246992f9b6 100644 --- a/src/Access/Common/AccessRightsElement.cpp +++ b/src/Access/Common/AccessRightsElement.cpp @@ -9,6 +9,12 @@ namespace DB { + +namespace ErrorCodes +{ + extern const int INVALID_GRANT; +} + namespace { void formatOptions(bool grant_option, bool is_partial_revoke, String & result) @@ -211,18 +217,43 @@ AccessRightsElement::AccessRightsElement( { } -void AccessRightsElement::eraseNonGrantable() +AccessFlags AccessRightsElement::getGrantableFlags() const { if (isGlobalWithParameter() && !anyParameter()) - access_flags &= AccessFlags::allFlagsGrantableOnGlobalWithParameterLevel(); + return access_flags & AccessFlags::allFlagsGrantableOnGlobalWithParameterLevel(); else if (!anyColumn()) - access_flags &= AccessFlags::allFlagsGrantableOnColumnLevel(); + return access_flags & AccessFlags::allFlagsGrantableOnColumnLevel(); else if (!anyTable()) - access_flags &= AccessFlags::allFlagsGrantableOnTableLevel(); + return access_flags & AccessFlags::allFlagsGrantableOnTableLevel(); else if (!anyDatabase()) - access_flags &= AccessFlags::allFlagsGrantableOnDatabaseLevel(); + return access_flags & AccessFlags::allFlagsGrantableOnDatabaseLevel(); else - access_flags &= AccessFlags::allFlagsGrantableOnGlobalLevel(); + return access_flags & AccessFlags::allFlagsGrantableOnGlobalLevel(); +} + +void AccessRightsElement::throwIfNotGrantable() const +{ + if (empty()) + return; + auto grantable_flags = getGrantableFlags(); + if (grantable_flags) + return; + + if (!anyColumn()) + throw Exception(ErrorCodes::INVALID_GRANT, "{} cannot be granted on the column level", access_flags.toString()); + if (!anyTable()) + throw Exception(ErrorCodes::INVALID_GRANT, "{} cannot be granted on the table level", access_flags.toString()); + if (!anyDatabase()) + throw Exception(ErrorCodes::INVALID_GRANT, "{} cannot be granted on the database level", access_flags.toString()); + if (!anyParameter()) + throw Exception(ErrorCodes::INVALID_GRANT, "{} cannot be granted on the global with parameter level", access_flags.toString()); + + throw Exception(ErrorCodes::INVALID_GRANT, "{} cannot be granted", access_flags.toString()); +} + +void AccessRightsElement::eraseNotGrantable() +{ + access_flags = getGrantableFlags(); } void AccessRightsElement::replaceEmptyDatabase(const String & current_database) @@ -251,11 +282,17 @@ bool AccessRightsElements::sameOptions() const return (size() < 2) || std::all_of(std::next(begin()), end(), [this](const AccessRightsElement & e) { return e.sameOptions(front()); }); } -void AccessRightsElements::eraseNonGrantable() +void AccessRightsElements::throwIfNotGrantable() const +{ + for (const auto & element : *this) + element.throwIfNotGrantable(); +} + +void AccessRightsElements::eraseNotGrantable() { std::erase_if(*this, [](AccessRightsElement & element) { - element.eraseNonGrantable(); + element.eraseNotGrantable(); return element.empty(); }); } @@ -269,4 +306,45 @@ void AccessRightsElements::replaceEmptyDatabase(const String & current_database) String AccessRightsElements::toString() const { return toStringImpl(*this, true); } String AccessRightsElements::toStringWithoutOptions() const { return toStringImpl(*this, false); } +void AccessRightsElements::formatElementsWithoutOptions(WriteBuffer & buffer, bool hilite) const +{ + bool no_output = true; + for (size_t i = 0; i != size(); ++i) + { + const auto & element = (*this)[i]; + auto keywords = element.access_flags.toKeywords(); + if (keywords.empty() || (!element.anyColumn() && element.columns.empty())) + continue; + + for (const auto & keyword : keywords) + { + if (!std::exchange(no_output, false)) + buffer << ", "; + + buffer << (hilite ? IAST::hilite_keyword : "") << keyword << (hilite ? IAST::hilite_none : ""); + if (!element.anyColumn()) + element.formatColumnNames(buffer); + } + + bool next_element_on_same_db_and_table = false; + if (i != size() - 1) + { + const auto & next_element = (*this)[i + 1]; + if (element.sameDatabaseAndTableAndParameter(next_element)) + { + next_element_on_same_db_and_table = true; + } + } + + if (!next_element_on_same_db_and_table) + { + buffer << " "; + element.formatONClause(buffer, hilite); + } + } + + if (no_output) + buffer << (hilite ? IAST::hilite_keyword : "") << "USAGE ON " << (hilite ? IAST::hilite_none : "") << "*.*"; +} + } diff --git a/src/Access/Common/AccessRightsElement.h b/src/Access/Common/AccessRightsElement.h index 4749db09c56..85997b48a38 100644 --- a/src/Access/Common/AccessRightsElement.h +++ b/src/Access/Common/AccessRightsElement.h @@ -79,8 +79,14 @@ struct AccessRightsElement return (grant_option == other.grant_option) && (is_partial_revoke == other.is_partial_revoke); } + /// Returns only those flags which can be granted. + AccessFlags getGrantableFlags() const; + + /// Throws an exception if some flags can't be granted. + void throwIfNotGrantable() const; + /// Resets flags which cannot be granted. - void eraseNonGrantable(); + void eraseNotGrantable(); bool isEmptyDatabase() const { return database.empty() and !anyDatabase(); } @@ -110,8 +116,11 @@ public: bool sameDatabaseAndTable() const; bool sameOptions() const; + /// Throws an exception if some flags can't be granted. + void throwIfNotGrantable() const; + /// Resets flags which cannot be granted. - void eraseNonGrantable(); + void eraseNotGrantable(); /// If the database is empty, replaces it with `current_database`. Otherwise does nothing. void replaceEmptyDatabase(const String & current_database); @@ -119,6 +128,7 @@ public: /// Returns a human-readable representation like "GRANT SELECT, UPDATE(x, y) ON db.table". String toString() const; String toStringWithoutOptions() const; + void formatElementsWithoutOptions(WriteBuffer & buffer, bool hilite) const; }; } diff --git a/src/Access/ContextAccess.cpp b/src/Access/ContextAccess.cpp index 06e89d78339..fd7803f1d27 100644 --- a/src/Access/ContextAccess.cpp +++ b/src/Access/ContextAccess.cpp @@ -366,6 +366,13 @@ void ContextAccess::setUser(const UserPtr & user_) const current_roles_with_admin_option = user->granted_roles.findGrantedWithAdminOption(*params.current_roles); } + if (params.external_roles && !params.external_roles->empty()) + { + current_roles.insert(current_roles.end(), params.external_roles->begin(), params.external_roles->end()); + auto new_granted_with_admin_option = user->granted_roles.findGrantedWithAdminOption(*params.external_roles); + current_roles_with_admin_option.insert(current_roles_with_admin_option.end(), new_granted_with_admin_option.begin(), new_granted_with_admin_option.end()); + } + subscription_for_roles_changes.reset(); enabled_roles = access_control->getEnabledRoles(current_roles, current_roles_with_admin_option); subscription_for_roles_changes = enabled_roles->subscribeForChanges([weak_ptr = weak_from_this()](const std::shared_ptr & roles_info_) @@ -516,7 +523,6 @@ std::optional ContextAccess::getQuotaUsage() const return getQuota()->getUsage(); } - SettingsChanges ContextAccess::getDefaultSettings() const { std::lock_guard lock{mutex}; diff --git a/src/Access/ContextAccessParams.cpp b/src/Access/ContextAccessParams.cpp index f5a405c7bc1..4d86940b842 100644 --- a/src/Access/ContextAccessParams.cpp +++ b/src/Access/ContextAccessParams.cpp @@ -18,6 +18,7 @@ ContextAccessParams::ContextAccessParams( bool full_access_, bool use_default_roles_, const std::shared_ptr> & current_roles_, + const std::shared_ptr> & external_roles_, const Settings & settings_, const String & current_database_, const ClientInfo & client_info_) @@ -25,6 +26,7 @@ ContextAccessParams::ContextAccessParams( , full_access(full_access_) , use_default_roles(use_default_roles_) , current_roles(current_roles_) + , external_roles(external_roles_) , readonly(settings_[Setting::readonly]) , allow_ddl(settings_[Setting::allow_ddl]) , allow_introspection(settings_[Setting::allow_introspection_functions]) @@ -59,6 +61,17 @@ String ContextAccessParams::toString() const } out << "]"; } + if (external_roles && !external_roles->empty()) + { + out << separator() << "external_roles = ["; + for (size_t i = 0; i != external_roles->size(); ++i) + { + if (i) + out << ", "; + out << (*external_roles)[i]; + } + out << "]"; + } if (readonly) out << separator() << "readonly = " << readonly; if (allow_ddl) @@ -107,6 +120,7 @@ bool operator ==(const ContextAccessParams & left, const ContextAccessParams & r CONTEXT_ACCESS_PARAMS_EQUALS(full_access) CONTEXT_ACCESS_PARAMS_EQUALS(use_default_roles) CONTEXT_ACCESS_PARAMS_EQUALS(current_roles) + CONTEXT_ACCESS_PARAMS_EQUALS(external_roles) CONTEXT_ACCESS_PARAMS_EQUALS(readonly) CONTEXT_ACCESS_PARAMS_EQUALS(allow_ddl) CONTEXT_ACCESS_PARAMS_EQUALS(allow_introspection) @@ -157,6 +171,7 @@ bool operator <(const ContextAccessParams & left, const ContextAccessParams & ri CONTEXT_ACCESS_PARAMS_LESS(full_access) CONTEXT_ACCESS_PARAMS_LESS(use_default_roles) CONTEXT_ACCESS_PARAMS_LESS(current_roles) + CONTEXT_ACCESS_PARAMS_LESS(external_roles) CONTEXT_ACCESS_PARAMS_LESS(readonly) CONTEXT_ACCESS_PARAMS_LESS(allow_ddl) CONTEXT_ACCESS_PARAMS_LESS(allow_introspection) diff --git a/src/Access/ContextAccessParams.h b/src/Access/ContextAccessParams.h index 07503a3af6d..82592d630dd 100644 --- a/src/Access/ContextAccessParams.h +++ b/src/Access/ContextAccessParams.h @@ -19,6 +19,7 @@ public: bool full_access_, bool use_default_roles_, const std::shared_ptr> & current_roles_, + const std::shared_ptr> & external_roles_, const Settings & settings_, const String & current_database_, const ClientInfo & client_info_); @@ -31,6 +32,7 @@ public: const bool use_default_roles; const std::shared_ptr> current_roles; + const std::shared_ptr> external_roles; const UInt64 readonly; const bool allow_ddl; diff --git a/src/Access/LDAPAccessStorage.cpp b/src/Access/LDAPAccessStorage.cpp index 2636a3cffbb..97b7b1ac52e 100644 --- a/src/Access/LDAPAccessStorage.cpp +++ b/src/Access/LDAPAccessStorage.cpp @@ -26,7 +26,6 @@ namespace ErrorCodes extern const int BAD_ARGUMENTS; } - LDAPAccessStorage::LDAPAccessStorage(const String & storage_name_, AccessControl & access_control_, const Poco::Util::AbstractConfiguration & config, const String & prefix) : IAccessStorage(storage_name_), access_control(access_control_), memory_storage(storage_name_, access_control.getChangesNotifier(), false) { @@ -320,6 +319,10 @@ std::set LDAPAccessStorage::mapExternalRolesNoLock(const LDAPClient::Sea { std::set role_names; + // If this node can't access LDAP server (or has not privileges to fetch roles) and gets empty list of external roles + if (external_roles.empty()) + return role_names; + if (external_roles.size() != role_search_params.size()) throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unable to map external roles"); diff --git a/src/Access/SettingsConstraints.cpp b/src/Access/SettingsConstraints.cpp index cdf3dac192e..cb1d433766a 100644 --- a/src/Access/SettingsConstraints.cpp +++ b/src/Access/SettingsConstraints.cpp @@ -397,13 +397,35 @@ SettingsConstraints::Checker SettingsConstraints::getChecker(const Settings & cu /** The `readonly` value is understood as follows: * 0 - no read-only restrictions. - * 1 - only read requests, as well as changing settings with `changable_in_readonly` flag. + * 1 - only read requests, as well as changing settings with `changeable_in_readonly` flag. * 2 - only read requests, as well as changing settings, except for the `readonly` setting. */ if (current_settings[Setting::readonly] > 1 && resolved_name == "readonly") return Checker(PreformattedMessage::create("Cannot modify 'readonly' setting in readonly mode"), ErrorCodes::READONLY); + if (access_control) + { + bool allowed_experimental = access_control->getAllowExperimentalTierSettings(); + bool allowed_beta = access_control->getAllowBetaTierSettings(); + if (!allowed_experimental || !allowed_beta) + { + auto setting_tier = current_settings.getTier(resolved_name); + if (setting_tier == SettingsTierType::EXPERIMENTAL && !allowed_experimental) + return Checker( + PreformattedMessage::create( + "Cannot modify setting '{}'. Changes to EXPERIMENTAL settings are disabled in the server config ('allowed_feature_tier')", + setting_name), + ErrorCodes::READONLY); + if (setting_tier == SettingsTierType::BETA && !allowed_beta) + return Checker( + PreformattedMessage::create( + "Cannot modify setting '{}'. Changes to BETA settings are disabled in the server config ('allowed_feature_tier')", + setting_name), + ErrorCodes::READONLY); + } + } + auto it = constraints.find(resolved_name); if (current_settings[Setting::readonly] == 1) { diff --git a/src/Access/SettingsConstraints.h b/src/Access/SettingsConstraints.h index 5bbff86ff61..f5e4335252c 100644 --- a/src/Access/SettingsConstraints.h +++ b/src/Access/SettingsConstraints.h @@ -40,7 +40,7 @@ class AccessControl; * * * - * + * * * * @@ -50,7 +50,7 @@ class AccessControl; * If a setting cannot be change due to the read-only mode this class throws an exception. * The value of `readonly` is understood as follows: * 0 - not read-only mode, no additional checks. - * 1 - only read queries, as well as changing settings with flag. + * 1 - only read queries, as well as changing settings with flag. * 2 - only read queries and you can change the settings, except for the `readonly` setting. * */ diff --git a/src/AggregateFunctions/AggregateFunctionAnyRespectNulls.cpp b/src/AggregateFunctions/AggregateFunctionAnyRespectNulls.cpp index cce4f26d813..83fc98ada11 100644 --- a/src/AggregateFunctions/AggregateFunctionAnyRespectNulls.cpp +++ b/src/AggregateFunctions/AggregateFunctionAnyRespectNulls.cpp @@ -221,11 +221,16 @@ void registerAggregateFunctionsAnyRespectNulls(AggregateFunctionFactory & factor = {.returns_default_when_only_null = false, .is_order_dependent = true, .is_window_function = true}; factory.registerFunction("any_respect_nulls", {createAggregateFunctionAnyRespectNulls, default_properties_for_respect_nulls}); - factory.registerAlias("any_value_respect_nulls", "any_respect_nulls", AggregateFunctionFactory::Case::Insensitive); + factory.registerAlias("anyRespectNulls", "any_respect_nulls", AggregateFunctionFactory::Case::Sensitive); factory.registerAlias("first_value_respect_nulls", "any_respect_nulls", AggregateFunctionFactory::Case::Insensitive); + factory.registerAlias("firstValueRespectNulls", "any_respect_nulls", AggregateFunctionFactory::Case::Sensitive); + factory.registerAlias("any_value_respect_nulls", "any_respect_nulls", AggregateFunctionFactory::Case::Insensitive); + factory.registerAlias("anyValueRespectNulls", "any_respect_nulls", AggregateFunctionFactory::Case::Sensitive); factory.registerFunction("anyLast_respect_nulls", {createAggregateFunctionAnyLastRespectNulls, default_properties_for_respect_nulls}); + factory.registerAlias("anyLastRespectNulls", "anyLast_respect_nulls", AggregateFunctionFactory::Case::Sensitive); factory.registerAlias("last_value_respect_nulls", "anyLast_respect_nulls", AggregateFunctionFactory::Case::Insensitive); + factory.registerAlias("lastValueRespectNulls", "anyLast_respect_nulls", AggregateFunctionFactory::Case::Sensitive); /// Must happen after registering any and anyLast factory.registerNullsActionTransformation("any", "any_respect_nulls"); diff --git a/src/AggregateFunctions/AggregateFunctionDeltaSumTimestamp.cpp b/src/AggregateFunctions/AggregateFunctionDeltaSumTimestamp.cpp index dc1adead87c..c4691b93253 100644 --- a/src/AggregateFunctions/AggregateFunctionDeltaSumTimestamp.cpp +++ b/src/AggregateFunctions/AggregateFunctionDeltaSumTimestamp.cpp @@ -22,6 +22,13 @@ namespace ErrorCodes namespace { +/** Due to a lack of proper code review, this code was contributed with a multiplication of template instantiations + * over all pairs of data types, and we deeply regret that. + * + * We cannot remove all combinations, because the binary representation of serialized data has to remain the same, + * but we can partially heal the wound by treating unsigned and signed data types in the same way. + */ + template struct AggregationFunctionDeltaSumTimestampData { @@ -37,23 +44,22 @@ template class AggregationFunctionDeltaSumTimestamp final : public IAggregateFunctionDataHelper< AggregationFunctionDeltaSumTimestampData, - AggregationFunctionDeltaSumTimestamp - > + AggregationFunctionDeltaSumTimestamp> { public: AggregationFunctionDeltaSumTimestamp(const DataTypes & arguments, const Array & params) : IAggregateFunctionDataHelper< AggregationFunctionDeltaSumTimestampData, - AggregationFunctionDeltaSumTimestamp - >{arguments, params, createResultType()} - {} + AggregationFunctionDeltaSumTimestamp>{arguments, params, createResultType()} + { + } AggregationFunctionDeltaSumTimestamp() : IAggregateFunctionDataHelper< AggregationFunctionDeltaSumTimestampData, - AggregationFunctionDeltaSumTimestamp - >{} - {} + AggregationFunctionDeltaSumTimestamp>{} + { + } bool allocatesMemoryInArena() const override { return false; } @@ -63,8 +69,8 @@ public: void NO_SANITIZE_UNDEFINED ALWAYS_INLINE add(AggregateDataPtr __restrict place, const IColumn ** columns, size_t row_num, Arena *) const override { - auto value = assert_cast &>(*columns[0]).getData()[row_num]; - auto ts = assert_cast &>(*columns[1]).getData()[row_num]; + auto value = unalignedLoad(columns[0]->getRawData().data() + row_num * sizeof(ValueType)); + auto ts = unalignedLoad(columns[1]->getRawData().data() + row_num * sizeof(TimestampType)); auto & data = this->data(place); @@ -172,10 +178,48 @@ public: void insertResultInto(AggregateDataPtr __restrict place, IColumn & to, Arena *) const override { - assert_cast &>(to).getData().push_back(this->data(place).sum); + static_cast(to).template insertRawData( + reinterpret_cast(&this->data(place).sum)); } }; + +template class AggregateFunctionTemplate, typename... TArgs> +IAggregateFunction * createWithTwoTypesSecond(const IDataType & second_type, TArgs && ... args) +{ + WhichDataType which(second_type); + + if (which.idx == TypeIndex::UInt32) return new AggregateFunctionTemplate(args...); + if (which.idx == TypeIndex::UInt64) return new AggregateFunctionTemplate(args...); + if (which.idx == TypeIndex::Int32) return new AggregateFunctionTemplate(args...); + if (which.idx == TypeIndex::Int64) return new AggregateFunctionTemplate(args...); + if (which.idx == TypeIndex::Float32) return new AggregateFunctionTemplate(args...); + if (which.idx == TypeIndex::Float64) return new AggregateFunctionTemplate(args...); + if (which.idx == TypeIndex::Date) return new AggregateFunctionTemplate(args...); + if (which.idx == TypeIndex::DateTime) return new AggregateFunctionTemplate(args...); + + return nullptr; +} + +template